Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
pull_request:
branches:
- main
# - solid2 # enable later
push:
branches:
- main
# - solid2 # enable later

jobs:
build:
Expand All @@ -20,10 +22,10 @@ jobs:

- uses: pnpm/action-setup@v4

- name: Setup Node.js 21.6.1
uses: actions/setup-node@v4
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 21.6.1
node-version: "24"
cache: pnpm

- name: Install dependencies
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/format-files-prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- main
- solid2
paths:
- "**.md"
- "**.mdx"
Expand All @@ -15,6 +16,7 @@ on:
push:
branches:
- main
- solid2

jobs:
prettier:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/format-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- main
- solid2
paths:
- "**.js"
- "**.jsx"
Expand All @@ -14,6 +15,7 @@ on:
push:
branches:
- main
- solid2

jobs:
biome:
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/jsr-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: JSR validation

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
jsr:
name: Validate JSR workspace
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: pnpm

- name: Set up Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x

- name: Install dependencies
run: pnpm install

- name: Check deno.jsonc/package.json version and exports sync
run: pnpm jsr:sync:check

- name: Build libraries
run: pnpm build:libs
env:
NODE_OPTIONS: "--max_old_space_size=4096"

- name: Publish dry run with full type checks
run: deno publish --dry-run --allow-slow-types
57 changes: 57 additions & 0 deletions .github/workflows/jsr-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Publish JSR

on:
workflow_dispatch:
inputs:
publish:
description: Run the real JSR publish after the dry run passes
required: true
default: "false"
type: choice
options:
- "false"
- "true"

permissions:
contents: read
id-token: write

jobs:
publish:
name: Publish JSR workspace
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: pnpm

- name: Set up Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x

- name: Install dependencies
run: pnpm install

- name: Sync deno.jsonc versions and exports from package.json
run: pnpm jsr:sync

- name: Build libraries
run: pnpm build:libs
env:
NODE_OPTIONS: "--max_old_space_size=4096"

- name: Publish dry run
run: deno publish --dry-run --allow-slow-types

- name: Publish to JSR
if: ${{ inputs.publish == 'true' }}
run: deno publish --allow-slow-types
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [workflow_dispatch]

permissions:
id-token: write
contents: read
contents: write

concurrency: ${{ github.workflow }}-${{ github.ref }}

Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
pull_request:
branches:
- main
- solid2
push:
branches:
- main
- solid2

jobs:
build:
Expand All @@ -20,10 +22,10 @@ jobs:

- uses: pnpm/action-setup@v4

- name: Setup Node.js 21.6.1
uses: actions/setup-node@v4
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 21.6.1
node-version: "24"
cache: pnpm

- name: Install dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:

- uses: pnpm/action-setup@v4

- name: Setup Node.js 21.6.1
uses: actions/setup-node@v4
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 21.6.1
node-version: "24"
cache: pnpm

- name: Install Dependencies
Expand Down
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log
.claude

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# turbo
.turbo

# solid
.solid
.vinxi
Expand All @@ -43,3 +41,4 @@ packages/core/NOTICE.txt
.DS_Store
Thumbs.db
.vercel
/storybook-static
2 changes: 2 additions & 0 deletions .storybook/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@source "./.storybook/**/*.{ts,tsx}";
@source "./packages/core/src/**/*.{ts,tsx}";
88 changes: 88 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
import type { StorybookConfig } from "storybook-solidjs-vite";
import { mergeConfig } from "vite";

const config: StorybookConfig = {
stories: ["../packages/core/src/**/stories/*.stories.{ts,tsx}"],
staticDirs: ["./public"],
addons: ["@storybook/addon-docs"],
framework: {
name: "storybook-solidjs-vite",
// docgen: false — storybook-solidjs-vite@10.5.2 bug: dynamic import('typescript')
// returns { default: ts } in ESM context so ts.sys is undefined inside the plugin
options: { docgen: false },
},
docs: {},
async viteFinal(config) {
return mergeConfig(config, {
plugins: [
{
name: "solid-addEventListener-compat",
transform(code: string, id: string) {
if (
/\.(tsx?|jsx?)$/.test(id) &&
code.includes("addEventListener as _$addEventListener")
) {
return {
code: code.replace(
/\{ addEventListener as _\$addEventListener \}/g,
"{ addEvent as _$addEventListener }",
),
map: null,
};
}
},
},
// Intercept any file that imports the removed `on` helper from solid-js.
// Logs the filename so we can find the culprit, and replaces the import
// with a shim so rendering continues.
{
name: "solid-on-shim",
transform(code: string, id: string) {
if (
code.includes("from 'solid-js'") ||
code.includes('from "solid-js"')
) {
if (/\bon\b/.test(code)) {
const hasOnImport =
/import\s*\{[^}]*\bon\b[^}]*\}\s*from\s*['"]solid-js['"]/.test(
code,
);
if (hasOnImport) {
console.warn(
`[solid-on-shim] Found legacy 'on' import in: ${id}`,
);
// Remove 'on' from the import and inject a no-op shim after the import
const patched = code
.replace(/,\s*\bon\b/g, "")
.replace(/\bon\b\s*,/g, "")
.replace(/\{\s*\bon\b\s*\}/g, "{ createEffect }");
return {
code:
patched +
"\nconst on = (deps, fn) => { createEffect(deps, fn); };\n",
map: null,
};
}
}
}
},
},
],
resolve: {
alias: [
{ find: "solid-js/web", replacement: "@solidjs/web" },
{
find: "@kobalte/utils",
replacement: new URL(
"../packages/utils/src/index.ts",
import.meta.url,
).pathname,
},
],
dedupe: ["react", "react-dom", "solid-js", "@solidjs/signals", "@solidjs/web"],
},
});
},
};

export default config;
12 changes: 12 additions & 0 deletions .storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { addons } from "storybook/manager-api";
import { create } from "storybook/theming/create";

addons.setConfig({
theme: create({
base: "light",
brandTitle: "Kobalte",
brandImage: "/kobalte-logo.svg",
brandUrl: "https://kobalte.dev",
brandTarget: "_blank",
}),
});
8 changes: 8 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import * as docsAnnotations from "@storybook/addon-docs/preview";
import { definePreview } from "storybook-solidjs-vite/next";
import "./globals.css";

export default definePreview({
addons: [docsAnnotations],
parameters: { layout: "centered", docs: { toc: true } },
});
9 changes: 9 additions & 0 deletions .storybook/public/kobalte-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions .storybook/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Bundler",
"jsxImportSource": "@solidjs/web",
"customConditions": ["@solid-primitives/source"],
"verbatimModuleSyntax": false,
"types": ["vite/client"]
},
"include": ["./**/*", "../packages/core/src/*/stories/**/*"]
}
Loading