@camox/cli 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +7 -2
- package/package.json +2 -2
- package/template/.vite-hooks/pre-commit +1 -0
- package/template/node_modules/.bin/camox +21 -0
- package/template/node_modules/.bin/intent +21 -0
- package/template/node_modules/.bin/nitro +21 -0
- package/template/node_modules/.bin/oxfmt +21 -0
- package/template/node_modules/.bin/oxlint +21 -0
- package/template/node_modules/.bin/shadcn +21 -0
- package/template/node_modules/.bin/tsgo +21 -0
- package/template/node_modules/.bin/vp +21 -0
- package/template/package.json +3 -2
- package/template/src/components/ui/accordion.tsx +70 -0
- package/template/tsconfig.json +1 -1
- package/template/vite.config.ts +15 -13
package/dist/index.mjs
CHANGED
|
@@ -361,9 +361,14 @@ async function init() {
|
|
|
361
361
|
s.start("Scaffolding project...");
|
|
362
362
|
copyDir(path.resolve(__dirname, "..", "template"), targetDir, {
|
|
363
363
|
"{{projectName}}": name,
|
|
364
|
-
"{{projectSlug}}": project.slug
|
|
365
|
-
"{{camoxVersion}}": ownPkg.version
|
|
364
|
+
"{{projectSlug}}": project.slug
|
|
366
365
|
});
|
|
366
|
+
const pkgPath = path.join(targetDir, "package.json");
|
|
367
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
|
|
368
|
+
pkg.name = project.slug;
|
|
369
|
+
delete pkg.version;
|
|
370
|
+
pkg.dependencies.camox = `^${ownPkg.version}`;
|
|
371
|
+
fs.writeFileSync(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`);
|
|
367
372
|
fs.writeFileSync(path.join(targetDir, ".env"), `CAMOX_SYNC_SECRET=${project.syncSecret}\n`);
|
|
368
373
|
fs.writeFileSync(path.join(targetDir, ".gitignore"), `node_modules
|
|
369
374
|
.DS_Store
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camox/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"bin": {
|
|
5
5
|
"camox": "./dist/index.mjs"
|
|
6
6
|
},
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@typescript/native-preview": "7.0.0-dev.20260412.1",
|
|
27
27
|
"oxlint": "^0.15.0",
|
|
28
28
|
"tsdown": "^0.21.8",
|
|
29
|
-
"@camox/api-contract": "0.
|
|
29
|
+
"@camox/api-contract": "0.14.0"
|
|
30
30
|
},
|
|
31
31
|
"nx": {
|
|
32
32
|
"tags": [
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
vp staged
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/home/runner/work/camox/camox/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/home/runner/work/camox/camox/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../camox/bin/camox.mjs" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../camox/bin/camox.mjs" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/home/runner/work/camox/camox/node_modules/.pnpm/@tanstack+router-plugin@1.167.18_@tanstack+react-router@1.168.18_react-dom@19.2.5_react_f2f9ae7a1065a6f93975c3fa53defc29/node_modules/@tanstack/router-plugin/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/@tanstack+router-plugin@1.167.18_@tanstack+react-router@1.168.18_react-dom@19.2.5_react_f2f9ae7a1065a6f93975c3fa53defc29/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/home/runner/work/camox/camox/node_modules/.pnpm/@tanstack+router-plugin@1.167.18_@tanstack+react-router@1.168.18_react-dom@19.2.5_react_f2f9ae7a1065a6f93975c3fa53defc29/node_modules/@tanstack/router-plugin/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/@tanstack+router-plugin@1.167.18_@tanstack+react-router@1.168.18_react-dom@19.2.5_react_f2f9ae7a1065a6f93975c3fa53defc29/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../@tanstack/router-plugin/bin/intent.js" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../@tanstack/router-plugin/bin/intent.js" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/home/runner/work/camox/camox/node_modules/.pnpm/nitro@3.0.260311-beta_@libsql+client@0.17.2_better-sqlite3@12.8.0_dotenv@17.4.2_drizzle_5fa6c7540198165a12d0aaffa3900f1f/node_modules/nitro/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/nitro@3.0.260311-beta_@libsql+client@0.17.2_better-sqlite3@12.8.0_dotenv@17.4.2_drizzle_5fa6c7540198165a12d0aaffa3900f1f/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/home/runner/work/camox/camox/node_modules/.pnpm/nitro@3.0.260311-beta_@libsql+client@0.17.2_better-sqlite3@12.8.0_dotenv@17.4.2_drizzle_5fa6c7540198165a12d0aaffa3900f1f/node_modules/nitro/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/nitro@3.0.260311-beta_@libsql+client@0.17.2_better-sqlite3@12.8.0_dotenv@17.4.2_drizzle_5fa6c7540198165a12d0aaffa3900f1f/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../nitro/dist/cli/index.mjs" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../nitro/dist/cli/index.mjs" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/home/runner/work/camox/camox/node_modules/.pnpm/vite-plus@0.1.19_@opentelemetry+api@1.9.0_@types+node@24.12.2_esbuild@0.27.4_jiti@2.6.1_33f3463065f7b1de4fbe98a97ee72736/node_modules/vite-plus/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/vite-plus@0.1.19_@opentelemetry+api@1.9.0_@types+node@24.12.2_esbuild@0.27.4_jiti@2.6.1_33f3463065f7b1de4fbe98a97ee72736/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/home/runner/work/camox/camox/node_modules/.pnpm/vite-plus@0.1.19_@opentelemetry+api@1.9.0_@types+node@24.12.2_esbuild@0.27.4_jiti@2.6.1_33f3463065f7b1de4fbe98a97ee72736/node_modules/vite-plus/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/vite-plus@0.1.19_@opentelemetry+api@1.9.0_@types+node@24.12.2_esbuild@0.27.4_jiti@2.6.1_33f3463065f7b1de4fbe98a97ee72736/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../vite-plus/bin/oxfmt" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../vite-plus/bin/oxfmt" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/home/runner/work/camox/camox/node_modules/.pnpm/vite-plus@0.1.19_@opentelemetry+api@1.9.0_@types+node@24.12.2_esbuild@0.27.4_jiti@2.6.1_33f3463065f7b1de4fbe98a97ee72736/node_modules/vite-plus/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/vite-plus@0.1.19_@opentelemetry+api@1.9.0_@types+node@24.12.2_esbuild@0.27.4_jiti@2.6.1_33f3463065f7b1de4fbe98a97ee72736/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/home/runner/work/camox/camox/node_modules/.pnpm/vite-plus@0.1.19_@opentelemetry+api@1.9.0_@types+node@24.12.2_esbuild@0.27.4_jiti@2.6.1_33f3463065f7b1de4fbe98a97ee72736/node_modules/vite-plus/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/vite-plus@0.1.19_@opentelemetry+api@1.9.0_@types+node@24.12.2_esbuild@0.27.4_jiti@2.6.1_33f3463065f7b1de4fbe98a97ee72736/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../vite-plus/bin/oxlint" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../vite-plus/bin/oxlint" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/home/runner/work/camox/camox/node_modules/.pnpm/shadcn@4.3.1_@types+node@24.12.2_typescript@5.9.2/node_modules/shadcn/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/shadcn@4.3.1_@types+node@24.12.2_typescript@5.9.2/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/home/runner/work/camox/camox/node_modules/.pnpm/shadcn@4.3.1_@types+node@24.12.2_typescript@5.9.2/node_modules/shadcn/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/shadcn@4.3.1_@types+node@24.12.2_typescript@5.9.2/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../shadcn/dist/index.js" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../shadcn/dist/index.js" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/home/runner/work/camox/camox/node_modules/.pnpm/@typescript+native-preview@7.0.0-dev.20260412.1/node_modules/@typescript/native-preview/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/@typescript+native-preview@7.0.0-dev.20260412.1/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/home/runner/work/camox/camox/node_modules/.pnpm/@typescript+native-preview@7.0.0-dev.20260412.1/node_modules/@typescript/native-preview/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/@typescript+native-preview@7.0.0-dev.20260412.1/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../@typescript/native-preview/bin/tsgo.js" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../@typescript/native-preview/bin/tsgo.js" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/home/runner/work/camox/camox/node_modules/.pnpm/vite-plus@0.1.19_@opentelemetry+api@1.9.0_@types+node@24.12.2_esbuild@0.27.4_jiti@2.6.1_33f3463065f7b1de4fbe98a97ee72736/node_modules/vite-plus/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/vite-plus@0.1.19_@opentelemetry+api@1.9.0_@types+node@24.12.2_esbuild@0.27.4_jiti@2.6.1_33f3463065f7b1de4fbe98a97ee72736/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/home/runner/work/camox/camox/node_modules/.pnpm/vite-plus@0.1.19_@opentelemetry+api@1.9.0_@types+node@24.12.2_esbuild@0.27.4_jiti@2.6.1_33f3463065f7b1de4fbe98a97ee72736/node_modules/vite-plus/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/vite-plus@0.1.19_@opentelemetry+api@1.9.0_@types+node@24.12.2_esbuild@0.27.4_jiti@2.6.1_33f3463065f7b1de4fbe98a97ee72736/node_modules:/home/runner/work/camox/camox/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../vite-plus/bin/vp" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../vite-plus/bin/vp" "$@"
|
|
21
|
+
fi
|
package/template/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
2
|
+
"name": "@camox/template",
|
|
3
|
+
"version": "0.0.0",
|
|
3
4
|
"private": true,
|
|
4
5
|
"type": "module",
|
|
5
6
|
"scripts": {
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
"@tanstack/react-router-ssr-query": "^1.166.11",
|
|
20
21
|
"@tanstack/react-start": "^1.167.32",
|
|
21
22
|
"@tanstack/router-plugin": "^1.167.18",
|
|
22
|
-
"camox": "
|
|
23
|
+
"camox": "workspace:*",
|
|
23
24
|
"class-variance-authority": "^0.7.1",
|
|
24
25
|
"clsx": "^2.1.1",
|
|
25
26
|
"lucide-react": "^0.476.0",
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion";
|
|
2
|
+
import { ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils";
|
|
5
|
+
|
|
6
|
+
function Accordion({ className, ...props }: AccordionPrimitive.Root.Props) {
|
|
7
|
+
return (
|
|
8
|
+
<AccordionPrimitive.Root
|
|
9
|
+
data-slot="accordion"
|
|
10
|
+
className={cn("flex w-full flex-col", className)}
|
|
11
|
+
{...props}
|
|
12
|
+
/>
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function AccordionItem({ className, ...props }: AccordionPrimitive.Item.Props) {
|
|
17
|
+
return (
|
|
18
|
+
<AccordionPrimitive.Item
|
|
19
|
+
data-slot="accordion-item"
|
|
20
|
+
className={cn("not-last:border-b", className)}
|
|
21
|
+
{...props}
|
|
22
|
+
/>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function AccordionTrigger({ className, children, ...props }: AccordionPrimitive.Trigger.Props) {
|
|
27
|
+
return (
|
|
28
|
+
<AccordionPrimitive.Header className="flex">
|
|
29
|
+
<AccordionPrimitive.Trigger
|
|
30
|
+
data-slot="accordion-trigger"
|
|
31
|
+
className={cn(
|
|
32
|
+
"group/accordion-trigger relative flex flex-1 items-start justify-between rounded-md border border-transparent py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground",
|
|
33
|
+
className,
|
|
34
|
+
)}
|
|
35
|
+
{...props}
|
|
36
|
+
>
|
|
37
|
+
{children}
|
|
38
|
+
<ChevronDownIcon
|
|
39
|
+
data-slot="accordion-trigger-icon"
|
|
40
|
+
className="pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"
|
|
41
|
+
/>
|
|
42
|
+
<ChevronUpIcon
|
|
43
|
+
data-slot="accordion-trigger-icon"
|
|
44
|
+
className="pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"
|
|
45
|
+
/>
|
|
46
|
+
</AccordionPrimitive.Trigger>
|
|
47
|
+
</AccordionPrimitive.Header>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function AccordionContent({ className, children, ...props }: AccordionPrimitive.Panel.Props) {
|
|
52
|
+
return (
|
|
53
|
+
<AccordionPrimitive.Panel
|
|
54
|
+
data-slot="accordion-content"
|
|
55
|
+
className="data-open:animate-accordion-down data-closed:animate-accordion-up overflow-hidden text-sm"
|
|
56
|
+
{...props}
|
|
57
|
+
>
|
|
58
|
+
<div
|
|
59
|
+
className={cn(
|
|
60
|
+
"h-(--accordion-panel-height) pt-0 pb-4 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
|
|
61
|
+
className,
|
|
62
|
+
)}
|
|
63
|
+
>
|
|
64
|
+
{children}
|
|
65
|
+
</div>
|
|
66
|
+
</AccordionPrimitive.Panel>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
package/template/tsconfig.json
CHANGED
package/template/vite.config.ts
CHANGED
|
@@ -6,17 +6,19 @@ import { camox } from "camox/vite";
|
|
|
6
6
|
import { nitro } from "nitro/vite";
|
|
7
7
|
import { defineConfig, loadEnv } from "vite-plus";
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
const env = loadEnv(process.env.NODE_ENV!, process.cwd(), "CAMOX_");
|
|
10
|
+
|
|
11
|
+
export default defineConfig({
|
|
12
|
+
staged: {
|
|
13
|
+
"*": "vp check --fix"
|
|
14
|
+
},
|
|
15
|
+
resolve: { tsconfigPaths: true },
|
|
16
|
+
plugins: [
|
|
17
|
+
tailwindcss(),
|
|
18
|
+
nitro(),
|
|
19
|
+
camox({ projectSlug: "{{projectSlug}}", syncSecret: env.CAMOX_SYNC_SECRET }),
|
|
20
|
+
tanstackStart(),
|
|
21
|
+
react(),
|
|
22
|
+
babelPlugin({ presets: [reactCompilerPreset()] }),
|
|
23
|
+
],
|
|
22
24
|
});
|