Skip to content

Commit c9c4eda

Browse files
committed
HUGE UPDATE
1 parent 6112e9b commit c9c4eda

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+4773
-2527
lines changed

.changeset/hip-ways-hide.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"solidui-cli": minor
3+
"docs": minor
4+
---
5+
6+
tailwind preset moved back into config & dark-mode fix for root.css
Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
1-
import { defineConfig } from "vite"
2-
3-
import solid from "solid-start/vite"
4-
5-
import mdx from "@mdx-js/rollup"
1+
import { defineConfig } from "@solidjs/start/config"
2+
/* @ts-ignore */
3+
import pkg from "@vinxi/plugin-mdx"
64
import rehypePrettyCode from "rehype-pretty-code"
75
import rehypeSlug from "rehype-slug"
86
import remarkFrontmatter from "remark-frontmatter"
97
import remarkGfm from "remark-gfm"
108
import { getHighlighter } from "shiki"
11-
import vercel from "solid-start-vercel"
129

1310
import rehypeComponent from "./src/lib/mdx/component"
1411
import remarkSolidFrontmatter from "./src/lib/mdx/frontmatter"
1512
import rehypeHeadings from "./src/lib/mdx/headings"
16-
import path from "path"
13+
14+
const { default: mdx } = pkg
1715

1816
export default defineConfig({
19-
plugins: [
20-
{
21-
...mdx({
17+
ssr: true,
18+
server: {
19+
preset: "vercel"
20+
},
21+
extensions: ["mdx", "md"],
22+
vite: {
23+
plugins: [
24+
mdx.withImports({})({
2225
jsx: true,
2326
jsxImportSource: "solid-js",
2427
providerImportSource: "solid-mdx",
@@ -27,8 +30,8 @@ export default defineConfig({
2730
rehypeSlug,
2831
rehypeHeadings,
2932
rehypeComponent,
33+
//[rehypePrettyCode, { theme: "nord" }],
3034
[
31-
//@ts-expect-error
3235
rehypePrettyCode,
3336
{
3437
getHighlighter: async () => {
@@ -37,17 +40,7 @@ export default defineConfig({
3740
}
3841
]
3942
]
40-
}),
41-
enforce: "pre"
42-
},
43-
solid({ ssr: true, adapter: vercel({}), extensions: [".mdx"] })
44-
],
45-
ssr: {
46-
noExternal: ["@kobalte/core", "@internationalized/message"]
47-
},
48-
resolve: {
49-
alias: {
50-
"@": path.resolve(__dirname, "./src")
51-
}
43+
})
44+
]
5245
}
5346
})

apps/docs/package.json

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,58 +4,56 @@
44
"version": "0.3.0",
55
"private": true,
66
"scripts": {
7-
"dev": "solid-start dev",
8-
"build": "solid-start build",
7+
"dev": "vinxi dev",
8+
"build": "vinxi build",
99
"build:registry": "tsx ./src/scripts/build-registry.ts",
10-
"start": "solid-start start",
10+
"start": "vinxi start",
1111
"release": "changeset version",
1212
"lint": "eslint --fix \"**/*.{ts,tsx,js,jsx}\""
1313
},
1414
"dependencies": {
15-
"@fontsource/inter": "^5.0.16",
16-
"@kobalte/core": "^0.12.4",
15+
"@fontsource/inter": "^5.0.17",
16+
"@kobalte/core": "^0.12.6",
17+
"@mdx-js/mdx": "^2.3.0",
1718
"@modular-forms/solid": "^0.20.0",
18-
"@solid-primitives/keyboard": "^1.2.5",
19-
"@solid-primitives/refs": "^1.0.6",
20-
"@solidjs/meta": "^0.28.6",
21-
"@solidjs/router": "^0.8.3",
22-
"@tanstack/solid-table": "^8.9.3",
23-
"@vercel/analytics": "^1.1.1",
24-
"chart.js": "^4.4.1",
19+
"@solid-primitives/keyboard": "^1.2.8",
20+
"@solid-primitives/refs": "^1.0.8",
21+
"@solidjs/meta": "^0.29.3",
22+
"@solidjs/router": "^0.13.1",
23+
"@solidjs/start": "^0.7.7",
24+
"@vinxi/plugin-mdx": "^3.7.1",
25+
"chart.js": "^4.4.2",
2526
"class-variance-authority": "^0.7.0",
26-
"clsx": "^2.0.0",
27-
"corvu": "^0.4.0",
27+
"clsx": "^2.1.0",
28+
"corvu": "^0.4.8",
2829
"embla-carousel-autoplay": "^8.0.0",
2930
"embla-carousel-solid": "^8.0.0",
3031
"shosho": "^1.4.3",
31-
"solid-icons": "^1.0.12",
32-
"solid-js": "1.7.12",
32+
"solid-icons": "^1.1.0",
33+
"solid-js": "1.8.16",
3334
"solid-mdx": "^0.0.7",
34-
"solid-start": "0.3.6",
35-
"tailwind-merge": "^1.14.0",
35+
"tailwind-merge": "^2.2.2",
3636
"tailwindcss-animate": "^1.0.7",
37-
"undici": "^5.26.4"
37+
"undici": "^5.28.3",
38+
"vinxi": "^0.3.11"
3839
},
3940
"devDependencies": {
40-
"@mdx-js/rollup": "^2.3.0",
41-
"@types/node": "^18.17.3",
42-
"@types/unist": "^3.0.1",
43-
"autoprefixer": "^10.4.15",
44-
"eslint": "^8.56.0",
41+
"@types/node": "^18.19.26",
42+
"@types/unist": "^3.0.2",
43+
"autoprefixer": "^10.4.19",
44+
"eslint": "^8.57.0",
4545
"estree-util-value-to-estree": "^3.0.1",
46-
"postcss": "^8.4.30",
47-
"rehype-pretty-code": "^0.10.1",
46+
"postcss": "^8.4.38",
47+
"rehype-pretty-code": "0.10.1",
4848
"rehype-slug": "^6.0.0",
4949
"remark-frontmatter": "^5.0.0",
5050
"remark-gfm": "^3.0.1",
51-
"shiki": "^0.14.5",
52-
"solid-start-node": "0.3.6",
53-
"solid-start-vercel": "0.3.6",
54-
"tailwindcss": "^3.3.3",
55-
"tsx": "^3.13.0",
51+
"shiki": "0.14.5",
52+
"tailwindcss": "^3.4.1",
53+
"tsx": "^4.7.1",
5654
"unist-builder": "^4.0.0",
5755
"unist-util-visit": "^5.0.0",
58-
"vite": "^4.5.0",
59-
"yaml": "^2.3.3"
56+
"vite": "^5.2.6",
57+
"yaml": "^2.4.1"
6058
}
6159
}

apps/docs/postcss.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export default {
22
plugins: {
33
tailwindcss: {},
4-
autoprefixer: {},
5-
},
4+
autoprefixer: {}
5+
}
66
}

apps/docs/public/registry/ui/command.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"files": [
1111
{
1212
"name": "command.tsx",
13-
"content": "import type { ComponentProps, VoidComponent, VoidProps } from \"solid-js\"\nimport { splitProps, type ParentComponent } from \"solid-js\"\n\nimport type { Dialog as DialogPrimitive } from \"@kobalte/core\"\nimport { Combobox as ComboboxPrimitive } from \"@kobalte/core\"\nimport { TbSearch } from \"solid-icons/tb\"\n\nimport { cn } from \"~/lib/utils\"\nimport { Dialog, DialogContent } from \"~/registry/ui/dialog\"\n\ntype CommandProps<Option, OptGroup> = Omit<\n ComboboxPrimitive.ComboboxRootProps<Option, OptGroup>,\n | \"open\"\n | \"defaultOpen\"\n | \"multiple\"\n | \"value\"\n | \"defaultValue\"\n | \"removeOnBackspace\"\n | \"readOnly\"\n | \"allowsEmptyCollection\"\n>\n\nconst Command = <Option, OptGroup>(props: CommandProps<Option, OptGroup>) => {\n const [local, rest] = splitProps(props, [\"class\"])\n\n return (\n <ComboboxPrimitive.Root\n // force render list\n open\n // @ts-ignore -- prevent select\n value=\"\"\n allowsEmptyCollection\n class={cn(\n \"flex size-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n local.class\n )}\n {...rest}\n />\n )\n}\n\nconst CommandInput: VoidComponent<ComboboxPrimitive.ComboboxInputProps> = (props) => {\n const [local, rest] = splitProps(props, [\"class\"])\n\n return (\n <ComboboxPrimitive.Control class=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <TbSearch class=\"mr-2 size-4 shrink-0 opacity-50\" />\n <ComboboxPrimitive.Input\n cmdk-input=\"\"\n class={cn(\n \"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n local.class\n )}\n {...rest}\n />\n </ComboboxPrimitive.Control>\n )\n}\n\nconst CommandList = <Option, OptGroup>(\n props: VoidProps<ComboboxPrimitive.ComboboxListboxProps<Option, OptGroup>>\n) => {\n const [local, rest] = splitProps(props, [\"class\"])\n\n return (\n <ComboboxPrimitive.Listbox\n cmdk-list=\"\"\n class={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden p-1\", local.class)}\n {...rest}\n />\n )\n}\n\nconst CommandItem: ParentComponent<ComboboxPrimitive.ComboboxItemProps> = (props) => {\n const [local, rest] = splitProps(props, [\"class\", \"item\"])\n\n return (\n <ComboboxPrimitive.Item\n item={local.item}\n cmdk-item=\"\"\n class={cn(\n \"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50\",\n local.class\n )}\n {...rest}\n />\n )\n}\n\nconst CommandItemLabel = ComboboxPrimitive.ItemLabel\n\nconst CommandHeading: ParentComponent<ComboboxPrimitive.ComboboxSectionProps> = (props) => {\n const [local, rest] = splitProps(props, [\"class\"])\n\n return (\n <ComboboxPrimitive.Section\n cmdk-heading=\"\"\n class={cn(\n \"px-2 py-1.5 text-xs font-medium text-muted-foreground [&:not(&:first-of-type)]:mt-2\",\n local.class\n )}\n {...rest}\n />\n )\n}\n\nconst CommandItemShortcut: ParentComponent<ComponentProps<\"span\">> = (props) => {\n const [local, rest] = splitProps(props, [\"class\"])\n\n return (\n <span\n class={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", local.class)}\n {...rest}\n />\n )\n}\n\ntype CommandDialogProps<Option, OptGroup> = DialogPrimitive.DialogRootProps &\n CommandProps<Option, OptGroup>\n\nconst CommandDialog = <Option, OptGroup>(props: CommandDialogProps<Option, OptGroup>) => {\n const [local, rest] = splitProps(props, [\"children\"])\n\n return (\n <Dialog {...rest}>\n <DialogContent class=\"overflow-hidden p-0\">\n <Command\n class=\"[&_[cmdk-heading]]:px-2 [&_[cmdk-heading]]:font-medium [&_[cmdk-heading]]:text-muted-foreground [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5 [&_[cmdk-list]:not([hidden])_~[cmdk-list]]:pt-0 [&_[cmdk-list]]:px-2\"\n {...rest}\n >\n {local.children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nexport {\n Command,\n CommandInput,\n CommandList,\n CommandItem,\n CommandItemLabel,\n CommandItemShortcut,\n CommandHeading,\n CommandDialog\n}\n"
13+
"content": "import type { ComponentProps, VoidComponent, VoidProps } from \"solid-js\"\nimport { splitProps, type ParentComponent } from \"solid-js\"\n\nimport type { Dialog as DialogPrimitive } from \"@kobalte/core\"\nimport { Combobox as ComboboxPrimitive } from \"@kobalte/core\"\nimport { TbSearch } from \"solid-icons/tb\"\n\nimport { cn } from \"~/lib/utils\"\nimport { Dialog, DialogContent } from \"~/registry/ui/dialog\"\n\ntype CommandProps<Option, OptGroup> = Omit<\n ComboboxPrimitive.ComboboxRootProps<Option, OptGroup>,\n | \"open\"\n | \"defaultOpen\"\n | \"multiple\"\n | \"value\"\n | \"defaultValue\"\n | \"removeOnBackspace\"\n | \"readOnly\"\n | \"allowsEmptyCollection\"\n>\n\nconst Command = <Option, OptGroup>(props: CommandProps<Option, OptGroup>) => {\n const [local, rest] = splitProps(props, [\"class\"])\n\n return (\n <ComboboxPrimitive.Root\n // force render list\n open\n // @ts-expect-error -- prevent select\n value=\"\"\n allowsEmptyCollection\n class={cn(\n \"flex size-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n local.class\n )}\n {...rest}\n />\n )\n}\n\nconst CommandInput: VoidComponent<ComboboxPrimitive.ComboboxInputProps> = (props) => {\n const [local, rest] = splitProps(props, [\"class\"])\n\n return (\n <ComboboxPrimitive.Control class=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <TbSearch class=\"mr-2 size-4 shrink-0 opacity-50\" />\n <ComboboxPrimitive.Input\n cmdk-input=\"\"\n class={cn(\n \"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n local.class\n )}\n {...rest}\n />\n </ComboboxPrimitive.Control>\n )\n}\n\nconst CommandList = <Option, OptGroup>(\n props: VoidProps<ComboboxPrimitive.ComboboxListboxProps<Option, OptGroup>>\n) => {\n const [local, rest] = splitProps(props, [\"class\"])\n\n return (\n <ComboboxPrimitive.Listbox\n cmdk-list=\"\"\n class={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden p-1\", local.class)}\n {...rest}\n />\n )\n}\n\nconst CommandItem: ParentComponent<ComboboxPrimitive.ComboboxItemProps> = (props) => {\n const [local, rest] = splitProps(props, [\"class\", \"item\"])\n\n return (\n <ComboboxPrimitive.Item\n item={local.item}\n cmdk-item=\"\"\n class={cn(\n \"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50\",\n local.class\n )}\n {...rest}\n />\n )\n}\n\nconst CommandItemLabel = ComboboxPrimitive.ItemLabel\n\nconst CommandHeading: ParentComponent<ComboboxPrimitive.ComboboxSectionProps> = (props) => {\n const [local, rest] = splitProps(props, [\"class\"])\n\n return (\n <ComboboxPrimitive.Section\n cmdk-heading=\"\"\n class={cn(\n \"px-2 py-1.5 text-xs font-medium text-muted-foreground [&:not(&:first-of-type)]:mt-2\",\n local.class\n )}\n {...rest}\n />\n )\n}\n\nconst CommandItemShortcut: ParentComponent<ComponentProps<\"span\">> = (props) => {\n const [local, rest] = splitProps(props, [\"class\"])\n\n return (\n <span\n class={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", local.class)}\n {...rest}\n />\n )\n}\n\ntype CommandDialogProps<Option, OptGroup> = DialogPrimitive.DialogRootProps &\n CommandProps<Option, OptGroup>\n\nconst CommandDialog = <Option, OptGroup>(props: CommandDialogProps<Option, OptGroup>) => {\n const [local, rest] = splitProps(props, [\"children\"])\n\n return (\n <Dialog {...rest}>\n <DialogContent class=\"overflow-hidden p-0\">\n <Command\n class=\"[&_[cmdk-heading]]:px-2 [&_[cmdk-heading]]:font-medium [&_[cmdk-heading]]:text-muted-foreground [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5 [&_[cmdk-list]:not([hidden])_~[cmdk-list]]:pt-0 [&_[cmdk-list]]:px-2\"\n {...rest}\n >\n {local.children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nexport {\n Command,\n CommandInput,\n CommandList,\n CommandItem,\n CommandItemLabel,\n CommandItemShortcut,\n CommandHeading,\n CommandDialog\n}\n"
1414
}
1515
],
1616
"type": "ui"

apps/docs/public/registry/ui/delta-bar.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": [
44
{
55
"name": "delta-bar.tsx",
6-
"content": "import { mergeProps, Show, splitProps, type Component, type ComponentProps } from \"solid-js\"\n\nimport { cn } from \"~/lib/utils\"\n\nexport interface DeltaBarProps extends ComponentProps<\"div\"> {\n value: number\n isIncreasePositive?: boolean\n}\n\nconst DeltaBar: Component<DeltaBarProps> = (rawProps) => {\n const props = mergeProps(\n {\n isIncreasePositive: true\n },\n rawProps\n )\n const [, rest] = splitProps(props, [\"value\", \"isIncreasePositive\", \"class\"])\n\n const barColor =\n (props.value > 0 && props.isIncreasePositive) || (props.value < 0 && !props.isIncreasePositive)\n ? \"bg-success-foreground\"\n : \"bg-error-foreground\"\n\n const barWidth = `${Math.abs(props.value)}%`\n\n return (\n <div\n class={cn(\"relative flex h-2 w-full items-center rounded-full bg-secondary\", props.class)}\n {...rest}\n >\n <div class=\"flex h-full w-1/2 justify-end\">\n <Show when={props.value < 0}>\n <div class={cn(\"rounded-l-full\", barColor)} style={{ width: barWidth }} />\n </Show>\n </div>\n <div class={cn(\"z-10 h-4 w-1 rounded-full bg-primary ring-2 ring-background\")} />\n <div class=\"flex h-full w-1/2 justify-start\">\n <Show when={props.value > 0}>\n <div class={cn(\"rounded-r-full\", barColor)} style={{ width: barWidth }} />\n </Show>\n </div>\n </div>\n )\n}\n\nexport { DeltaBar }\n"
6+
"content": "import { mergeProps, Show, splitProps, type Component, type ComponentProps } from \"solid-js\"\n\nimport { cn } from \"~/lib/utils\"\n\nexport interface DeltaBarProps extends ComponentProps<\"div\"> {\n value: number\n isIncreasePositive?: boolean\n}\n\nconst DeltaBar: Component<DeltaBarProps> = (rawProps) => {\n const props = mergeProps(\n {\n isIncreasePositive: true\n },\n rawProps\n )\n const [, rest] = splitProps(props, [\"value\", \"isIncreasePositive\", \"class\"])\n\n return (\n <div\n class={cn(\"relative flex h-2 w-full items-center rounded-full bg-secondary\", props.class)}\n {...rest}\n >\n <div class=\"flex h-full w-1/2 justify-end\">\n <Show when={props.value < 0}>\n <div\n class={cn(\n \"rounded-l-full\",\n (props.value > 0 && props.isIncreasePositive) ||\n (props.value < 0 && !props.isIncreasePositive)\n ? \"bg-success-foreground\"\n : \"bg-error-foreground\"\n )}\n style={{ width: `${Math.abs(props.value)}%` }}\n />\n </Show>\n </div>\n <div class={cn(\"z-10 h-4 w-1 rounded-full bg-primary ring-2 ring-background\")} />\n <div class=\"flex h-full w-1/2 justify-start\">\n <Show when={props.value > 0}>\n <div\n class={cn(\n \"rounded-r-full\",\n (props.value > 0 && props.isIncreasePositive) ||\n (props.value < 0 && !props.isIncreasePositive)\n ? \"bg-success-foreground\"\n : \"bg-error-foreground\"\n )}\n style={{ width: `${Math.abs(props.value)}%` }}\n />\n </Show>\n </div>\n </div>\n )\n}\n\nexport { DeltaBar }\n"
77
}
88
],
99
"type": "ui"

0 commit comments

Comments
 (0)