@xanots/sdk 0.0.1 → 0.0.3-beta.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/README.md +10 -1
- package/dist/.build-fingerprint +1 -0
- package/dist/{agent-file-refresh-7XCACU34.js → agent-file-refresh-J3KY54E5.js} +3 -2
- package/dist/bin.js +8 -8
- package/dist/chunk-4HKZH6YK.js +307 -0
- package/dist/{chunk-3DUAGYGP.js → chunk-55VHDNW5.js} +2 -2
- package/dist/{chunk-EMCAWMHC.js → chunk-5L4X5LS6.js} +16 -2
- package/dist/{chunk-LH6Z6KFV.js → chunk-5XZ744TS.js} +1 -1
- package/dist/chunk-6DHJVLYP.js +2044 -0
- package/dist/{chunk-TRU5OHQ5.js → chunk-CBL57QBQ.js} +53 -31
- package/dist/{chunk-5YTBTF25.js → chunk-EWFHDJY5.js} +2 -2
- package/dist/{chunk-MZUI3JNX.js → chunk-F6JCFRKO.js} +2 -2
- package/dist/{chunk-IZW6MK3U.js → chunk-FY6LXRR6.js} +2 -2
- package/dist/{chunk-NOO35BQ2.js → chunk-HKAX756N.js} +3 -3
- package/dist/{chunk-RVB7ITKN.js → chunk-LU7TRWMC.js} +2 -2
- package/dist/{chunk-33ND6LKO.js → chunk-MWLNBSTY.js} +2 -2
- package/dist/{chunk-26CNBZE2.js → chunk-P3TTMWUP.js} +13 -4
- package/dist/{chunk-YYRDLFSJ.js → chunk-QO4I5OYF.js} +40 -2
- package/dist/{chunk-YDZYMZBE.js → chunk-TQUO2OXY.js} +4 -4
- package/dist/{chunk-FJ6ZS5KB.js → chunk-U3G2UW65.js} +177 -60
- package/dist/{chunk-YGPIY3WT.js → chunk-VVXPK6SE.js} +64 -22
- package/dist/{chunk-VKFQJEMW.js → chunk-WRYT2PAX.js} +14 -371
- package/dist/{chunk-WKP4D5MO.js → chunk-YZ4GU6F5.js} +283 -252
- package/dist/cli.d.ts +22 -0
- package/dist/cli.js +8 -8
- package/dist/{codegen-command-OOKK6AZK.js → codegen-command-EXLKZ2ZI.js} +19 -17
- package/dist/codegen.js +2 -2
- package/dist/{completion-TIPPZN7H.js → completion-2PVZK6YX.js} +2 -2
- package/dist/{deploy-command-4EQ7XX5G.js → deploy-command-SXX6RJWM.js} +16 -16
- package/dist/{env-target-IFJ5QDHC.js → env-target-3EGIPR4D.js} +2 -2
- package/dist/{ephemeral-command-3X3I4ULC.js → ephemeral-command-OGOYP7D6.js} +15 -15
- package/dist/index.d.ts +106 -84
- package/dist/index.js +6 -6
- package/dist/{init-command-R6H7ZXW5.js → init-command-6DGXEVZD.js} +13 -11
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +29 -11
- package/dist/{live-diff-Y3AKETHE.js → live-diff-RXSJCVJ7.js} +2 -2
- package/dist/{lock-commands-XTR2YKLY.js → lock-commands-R22J54XV.js} +11 -11
- package/dist/{loop-OM3P2Z6O.js → loop-SAWAOUFO.js} +2 -2
- package/dist/{marketplace-command-RATXTKXN.js → marketplace-command-XJIWL4YP.js} +6 -6
- package/dist/meta-client-OW5WKWW7.js +1 -1
- package/dist/node.d.ts +2 -2
- package/dist/node.js +14 -14
- package/dist/{release-command-VV5UVZKL.js → release-command-6PLMLGDK.js} +20 -20
- package/dist/sandbox-export-command-QCJY4GMV.js +1 -1
- package/dist/scaffold.d.ts +1896 -0
- package/dist/scaffold.js +101 -0
- package/dist/{store-BQ97nKIF.d.ts → store-g45zwB33.d.ts} +91 -75
- package/dist/{test-command-TSPBQHBM.js → test-command-LLPXKT35.js} +4 -4
- package/dist/{validate-command-4ERHJSCO.js → validate-command-WAT3ZJT3.js} +11 -11
- package/dist/{workspace-command-OF23DPNI.js → workspace-command-JKMI7RZ4.js} +20 -18
- package/dist/workspace-export-AJMGN3CQ.js +1 -1
- package/llms/statements-calls.md +4 -4
- package/llms/statements-catalog.md +20 -20
- package/llms/statements-data.md +1 -1
- package/llms-full.txt +26 -26
- package/llms.txt +1 -1
- package/manifest.json +197 -84
- package/package.json +10 -1
|
@@ -9,7 +9,11 @@ import {
|
|
|
9
9
|
unknownFlag,
|
|
10
10
|
unknownHelpTopic,
|
|
11
11
|
unknownSubcommand
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FY6LXRR6.js";
|
|
13
|
+
import {
|
|
14
|
+
readLockFile,
|
|
15
|
+
writeLockFile
|
|
16
|
+
} from "./chunk-HJPTWBLH.js";
|
|
13
17
|
import {
|
|
14
18
|
detail,
|
|
15
19
|
info,
|
|
@@ -20,13 +24,13 @@ import {
|
|
|
20
24
|
Xano,
|
|
21
25
|
assertSeedIds,
|
|
22
26
|
coerceSeedRowValues
|
|
23
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-55VHDNW5.js";
|
|
24
28
|
import {
|
|
25
29
|
getCommand,
|
|
26
30
|
getSubcommand,
|
|
27
31
|
isCommand,
|
|
28
32
|
suggest
|
|
29
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-QO4I5OYF.js";
|
|
30
34
|
import {
|
|
31
35
|
FILTER_NAMES,
|
|
32
36
|
SEED_FILE,
|
|
@@ -38,11 +42,7 @@ import {
|
|
|
38
42
|
pathSegment,
|
|
39
43
|
serializeBundle,
|
|
40
44
|
tableColumns
|
|
41
|
-
} from "./chunk-
|
|
42
|
-
import {
|
|
43
|
-
readLockFile,
|
|
44
|
-
writeLockFile
|
|
45
|
-
} from "./chunk-HJPTWBLH.js";
|
|
45
|
+
} from "./chunk-5L4X5LS6.js";
|
|
46
46
|
import {
|
|
47
47
|
WORKSPACE_KEY,
|
|
48
48
|
createLockContext,
|
|
@@ -329,6 +329,13 @@ function parseArgs(argv) {
|
|
|
329
329
|
let name;
|
|
330
330
|
const ai = [];
|
|
331
331
|
let framework;
|
|
332
|
+
let theme;
|
|
333
|
+
let radius;
|
|
334
|
+
let dark;
|
|
335
|
+
let font;
|
|
336
|
+
let fontMono;
|
|
337
|
+
let fontHeading;
|
|
338
|
+
let icons;
|
|
332
339
|
let force = false;
|
|
333
340
|
let noInstall = false;
|
|
334
341
|
let noVerify = false;
|
|
@@ -470,6 +477,34 @@ function parseArgs(argv) {
|
|
|
470
477
|
framework = rest[++i];
|
|
471
478
|
} else if (arg.startsWith("--framework=")) {
|
|
472
479
|
framework = arg.slice("--framework=".length);
|
|
480
|
+
} else if (arg === "--theme") {
|
|
481
|
+
theme = rest[++i];
|
|
482
|
+
} else if (arg.startsWith("--theme=")) {
|
|
483
|
+
theme = arg.slice("--theme=".length);
|
|
484
|
+
} else if (arg === "--radius") {
|
|
485
|
+
radius = rest[++i];
|
|
486
|
+
} else if (arg.startsWith("--radius=")) {
|
|
487
|
+
radius = arg.slice("--radius=".length);
|
|
488
|
+
} else if (arg === "--dark") {
|
|
489
|
+
dark = rest[++i];
|
|
490
|
+
} else if (arg.startsWith("--dark=")) {
|
|
491
|
+
dark = arg.slice("--dark=".length);
|
|
492
|
+
} else if (arg === "--font-mono") {
|
|
493
|
+
fontMono = rest[++i];
|
|
494
|
+
} else if (arg.startsWith("--font-mono=")) {
|
|
495
|
+
fontMono = arg.slice("--font-mono=".length);
|
|
496
|
+
} else if (arg === "--font-heading") {
|
|
497
|
+
fontHeading = rest[++i];
|
|
498
|
+
} else if (arg.startsWith("--font-heading=")) {
|
|
499
|
+
fontHeading = arg.slice("--font-heading=".length);
|
|
500
|
+
} else if (arg === "--font") {
|
|
501
|
+
font = rest[++i];
|
|
502
|
+
} else if (arg.startsWith("--font=")) {
|
|
503
|
+
font = arg.slice("--font=".length);
|
|
504
|
+
} else if (arg === "--icons") {
|
|
505
|
+
icons = rest[++i];
|
|
506
|
+
} else if (arg.startsWith("--icons=")) {
|
|
507
|
+
icons = arg.slice("--icons=".length);
|
|
473
508
|
} else if (arg === "--ai" || arg.startsWith("--ai=")) {
|
|
474
509
|
const raw = arg === "--ai" ? rest[++i] : arg.slice("--ai=".length);
|
|
475
510
|
for (const p of (raw ?? "").split(",")) {
|
|
@@ -577,6 +612,13 @@ function parseArgs(argv) {
|
|
|
577
612
|
force,
|
|
578
613
|
noInstall,
|
|
579
614
|
framework,
|
|
615
|
+
theme,
|
|
616
|
+
radius,
|
|
617
|
+
dark,
|
|
618
|
+
font,
|
|
619
|
+
fontMono,
|
|
620
|
+
fontHeading,
|
|
621
|
+
icons,
|
|
580
622
|
noVerify,
|
|
581
623
|
requireMicroservices,
|
|
582
624
|
report,
|
|
@@ -790,11 +832,11 @@ async function run(argv) {
|
|
|
790
832
|
return;
|
|
791
833
|
}
|
|
792
834
|
if (command === "init") {
|
|
793
|
-
const { runInitCommand } = await import("./init-command-
|
|
835
|
+
const { runInitCommand } = await import("./init-command-6DGXEVZD.js");
|
|
794
836
|
return runInitCommand(args);
|
|
795
837
|
}
|
|
796
838
|
if (command === "completion") {
|
|
797
|
-
const { isCompletionShell, runCompletionCommand, COMPLETION_SHELLS } = await import("./completion-
|
|
839
|
+
const { isCompletionShell, runCompletionCommand, COMPLETION_SHELLS } = await import("./completion-2PVZK6YX.js");
|
|
798
840
|
const shell = args.positionals[0];
|
|
799
841
|
if (shell === void 0 || !isCompletionShell(shell)) {
|
|
800
842
|
throw new UsageError(
|
|
@@ -805,7 +847,7 @@ async function run(argv) {
|
|
|
805
847
|
return runCompletionCommand(shell);
|
|
806
848
|
}
|
|
807
849
|
if (command === "lock") {
|
|
808
|
-
const { runLockCommand } = await import("./lock-commands-
|
|
850
|
+
const { runLockCommand } = await import("./lock-commands-R22J54XV.js");
|
|
809
851
|
return runLockCommand(args);
|
|
810
852
|
}
|
|
811
853
|
if (command === "login") {
|
|
@@ -817,15 +859,15 @@ async function run(argv) {
|
|
|
817
859
|
return runLogoutCommand(args);
|
|
818
860
|
}
|
|
819
861
|
if (command === "deploy") {
|
|
820
|
-
const { runDeployCommand } = await import("./deploy-command-
|
|
862
|
+
const { runDeployCommand } = await import("./deploy-command-SXX6RJWM.js");
|
|
821
863
|
return runDeployCommand(args);
|
|
822
864
|
}
|
|
823
865
|
if (command === "ephemeral") {
|
|
824
|
-
const { runEphemeralCommand } = await import("./ephemeral-command-
|
|
866
|
+
const { runEphemeralCommand } = await import("./ephemeral-command-OGOYP7D6.js");
|
|
825
867
|
return runEphemeralCommand(args);
|
|
826
868
|
}
|
|
827
869
|
if (command === "release") {
|
|
828
|
-
const { runReleaseCommand } = await import("./release-command-
|
|
870
|
+
const { runReleaseCommand } = await import("./release-command-6PLMLGDK.js");
|
|
829
871
|
return runReleaseCommand(args);
|
|
830
872
|
}
|
|
831
873
|
if (command === "sandbox") {
|
|
@@ -841,21 +883,21 @@ async function run(argv) {
|
|
|
841
883
|
return runSandboxExportCommand(args);
|
|
842
884
|
}
|
|
843
885
|
if (args.subcommand === "codegen") {
|
|
844
|
-
const { runCodegenCommand } = await import("./codegen-command-
|
|
886
|
+
const { runCodegenCommand } = await import("./codegen-command-EXLKZ2ZI.js");
|
|
845
887
|
return runCodegenCommand(args, { kind: "sandbox" });
|
|
846
888
|
}
|
|
847
889
|
throw unknownSubcommand("sandbox", args.subcommand);
|
|
848
890
|
}
|
|
849
891
|
if (command === "test") {
|
|
850
|
-
const { runTestCommand } = await import("./test-command-
|
|
892
|
+
const { runTestCommand } = await import("./test-command-LLPXKT35.js");
|
|
851
893
|
return runTestCommand(args);
|
|
852
894
|
}
|
|
853
895
|
if (command === "workspace") {
|
|
854
|
-
const { runWorkspaceCommand } = await import("./workspace-command-
|
|
896
|
+
const { runWorkspaceCommand } = await import("./workspace-command-JKMI7RZ4.js");
|
|
855
897
|
return runWorkspaceCommand(args);
|
|
856
898
|
}
|
|
857
899
|
if (command === "codegen") {
|
|
858
|
-
const { runCodegenCommand } = await import("./codegen-command-
|
|
900
|
+
const { runCodegenCommand } = await import("./codegen-command-EXLKZ2ZI.js");
|
|
859
901
|
return runCodegenCommand(args, { kind: "file" });
|
|
860
902
|
}
|
|
861
903
|
if (command === "profile") {
|
|
@@ -873,7 +915,7 @@ async function run(argv) {
|
|
|
873
915
|
if (!["list", "search", "details", "install"].includes(args.subcommand ?? "")) {
|
|
874
916
|
throw unknownSubcommand("marketplace", args.subcommand);
|
|
875
917
|
}
|
|
876
|
-
const marketplace = await import("./marketplace-command-
|
|
918
|
+
const marketplace = await import("./marketplace-command-XJIWL4YP.js");
|
|
877
919
|
if (args.subcommand === "list") return marketplace.runMarketplaceListCommand(args);
|
|
878
920
|
if (args.subcommand === "search") return marketplace.runMarketplaceSearchCommand(args);
|
|
879
921
|
if (args.subcommand === "details") return marketplace.runMarketplaceDetailsCommand(args);
|
|
@@ -883,7 +925,7 @@ async function run(argv) {
|
|
|
883
925
|
throw unknownCommand("push");
|
|
884
926
|
}
|
|
885
927
|
if (command === "validate") {
|
|
886
|
-
const { runValidateCommand } = await import("./validate-command-
|
|
928
|
+
const { runValidateCommand } = await import("./validate-command-WAT3ZJT3.js");
|
|
887
929
|
return runValidateCommand(args);
|
|
888
930
|
}
|
|
889
931
|
if (command !== "compile" && command !== "export" && command !== "paths" && command !== "routes") {
|
|
@@ -915,7 +957,7 @@ async function run(argv) {
|
|
|
915
957
|
}
|
|
916
958
|
async function refreshAgentGuidance() {
|
|
917
959
|
try {
|
|
918
|
-
const { refreshAgentFiles } = await import("./agent-file-refresh-
|
|
960
|
+
const { refreshAgentFiles } = await import("./agent-file-refresh-J3KY54E5.js");
|
|
919
961
|
const refreshed = refreshAgentFiles({
|
|
920
962
|
projectDir: process.cwd(),
|
|
921
963
|
sdkVersion: readVersion()
|
|
@@ -1143,4 +1185,4 @@ export {
|
|
|
1143
1185
|
exportBundleJson,
|
|
1144
1186
|
compileBundle
|
|
1145
1187
|
};
|
|
1146
|
-
//# sourceMappingURL=chunk-
|
|
1188
|
+
//# sourceMappingURL=chunk-VVXPK6SE.js.map
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runNpm
|
|
3
3
|
} from "./chunk-47WDWMBJ.js";
|
|
4
|
+
import {
|
|
5
|
+
defaultThemeChoice,
|
|
6
|
+
reactPreset,
|
|
7
|
+
themeGuidanceSection
|
|
8
|
+
} from "./chunk-6DHJVLYP.js";
|
|
4
9
|
import {
|
|
5
10
|
detail,
|
|
6
11
|
step,
|
|
@@ -8,372 +13,6 @@ import {
|
|
|
8
13
|
warn
|
|
9
14
|
} from "./chunk-EZG76F7R.js";
|
|
10
15
|
|
|
11
|
-
// src/emit/frontend-react.ts
|
|
12
|
-
var CODE_CLASS = "bg-muted rounded px-1.5 py-0.5 font-mono text-sm";
|
|
13
|
-
function jsxText(s) {
|
|
14
|
-
return s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/\{/g, "{").replace(/\}/g, "}");
|
|
15
|
-
}
|
|
16
|
-
function renderNode(node) {
|
|
17
|
-
return "code" in node ? `<code className="${CODE_CLASS}">${jsxText(node.code)}</code>` : jsxText(node.text);
|
|
18
|
-
}
|
|
19
|
-
function renderNodes(nodes) {
|
|
20
|
-
return nodes.map(renderNode).join("");
|
|
21
|
-
}
|
|
22
|
-
function renderApp(landing) {
|
|
23
|
-
const steps = landing.steps.map((step2) => ` <li>${renderNodes(step2)}</li>`).join("\n");
|
|
24
|
-
return `import { ArrowRight } from "lucide-react";
|
|
25
|
-
|
|
26
|
-
import { Button } from "@/components/ui/button";
|
|
27
|
-
import {
|
|
28
|
-
Card,
|
|
29
|
-
CardContent,
|
|
30
|
-
CardDescription,
|
|
31
|
-
CardFooter,
|
|
32
|
-
CardHeader,
|
|
33
|
-
CardTitle,
|
|
34
|
-
} from "@/components/ui/card";
|
|
35
|
-
|
|
36
|
-
export default function App() {
|
|
37
|
-
return (
|
|
38
|
-
<main className="mx-auto flex min-h-screen max-w-2xl flex-col justify-center p-8">
|
|
39
|
-
<Card>
|
|
40
|
-
<CardHeader>
|
|
41
|
-
<CardTitle className="text-3xl tracking-tight">${jsxText(landing.title)}</CardTitle>
|
|
42
|
-
<CardDescription className="text-base">
|
|
43
|
-
${renderNodes(landing.lead)}
|
|
44
|
-
</CardDescription>
|
|
45
|
-
</CardHeader>
|
|
46
|
-
<CardContent>
|
|
47
|
-
<ol className="text-muted-foreground list-inside list-decimal space-y-2">
|
|
48
|
-
${steps}
|
|
49
|
-
</ol>
|
|
50
|
-
</CardContent>
|
|
51
|
-
<CardFooter>
|
|
52
|
-
{/* asChild renders the Button's styles onto the anchor. Components come
|
|
53
|
-
from shadcn/ui \u2014 add more with \`npx shadcn@latest add <name>\`. */}
|
|
54
|
-
<Button asChild>
|
|
55
|
-
<a href="${landing.cta.href}" target="_blank" rel="noreferrer">
|
|
56
|
-
${jsxText(landing.cta.label)} <ArrowRight />
|
|
57
|
-
</a>
|
|
58
|
-
</Button>
|
|
59
|
-
</CardFooter>
|
|
60
|
-
</Card>
|
|
61
|
-
</main>
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
`;
|
|
65
|
-
}
|
|
66
|
-
function renderMainTsx() {
|
|
67
|
-
return `import { StrictMode } from "react";
|
|
68
|
-
import { createRoot } from "react-dom/client";
|
|
69
|
-
import App from "./App.js";
|
|
70
|
-
import "./index.css";
|
|
71
|
-
|
|
72
|
-
createRoot(document.getElementById("root")!).render(
|
|
73
|
-
<StrictMode>
|
|
74
|
-
<App />
|
|
75
|
-
</StrictMode>,
|
|
76
|
-
);
|
|
77
|
-
`;
|
|
78
|
-
}
|
|
79
|
-
function renderComponentsJson() {
|
|
80
|
-
const config = {
|
|
81
|
-
$schema: "https://ui.shadcn.com/schema.json",
|
|
82
|
-
style: "new-york",
|
|
83
|
-
rsc: false,
|
|
84
|
-
tsx: true,
|
|
85
|
-
tailwind: {
|
|
86
|
-
// v4 has no config file; the theme lives in the stylesheet.
|
|
87
|
-
config: "",
|
|
88
|
-
css: "frontend/src/index.css",
|
|
89
|
-
baseColor: "neutral",
|
|
90
|
-
cssVariables: true,
|
|
91
|
-
prefix: ""
|
|
92
|
-
},
|
|
93
|
-
aliases: {
|
|
94
|
-
components: "@/components",
|
|
95
|
-
utils: "@/lib/utils",
|
|
96
|
-
ui: "@/components/ui",
|
|
97
|
-
lib: "@/lib",
|
|
98
|
-
hooks: "@/hooks"
|
|
99
|
-
},
|
|
100
|
-
iconLibrary: "lucide"
|
|
101
|
-
};
|
|
102
|
-
return JSON.stringify(config, null, 2) + "\n";
|
|
103
|
-
}
|
|
104
|
-
function renderButtonTsx() {
|
|
105
|
-
return `import * as React from "react"
|
|
106
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
107
|
-
import { Slot } from "radix-ui"
|
|
108
|
-
|
|
109
|
-
import { cn } from "@/lib/utils"
|
|
110
|
-
|
|
111
|
-
const buttonVariants = cva(
|
|
112
|
-
"inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
113
|
-
{
|
|
114
|
-
variants: {
|
|
115
|
-
variant: {
|
|
116
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
117
|
-
destructive:
|
|
118
|
-
"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
119
|
-
outline:
|
|
120
|
-
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
121
|
-
secondary:
|
|
122
|
-
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
123
|
-
ghost:
|
|
124
|
-
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
125
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
126
|
-
},
|
|
127
|
-
size: {
|
|
128
|
-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
129
|
-
xs: "h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
130
|
-
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
131
|
-
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
132
|
-
icon: "size-9",
|
|
133
|
-
"icon-xs": "size-6 rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
134
|
-
"icon-sm": "size-8",
|
|
135
|
-
"icon-lg": "size-10",
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
defaultVariants: {
|
|
139
|
-
variant: "default",
|
|
140
|
-
size: "default",
|
|
141
|
-
},
|
|
142
|
-
}
|
|
143
|
-
)
|
|
144
|
-
|
|
145
|
-
function Button({
|
|
146
|
-
className,
|
|
147
|
-
variant = "default",
|
|
148
|
-
size = "default",
|
|
149
|
-
asChild = false,
|
|
150
|
-
...props
|
|
151
|
-
}: React.ComponentProps<"button"> &
|
|
152
|
-
VariantProps<typeof buttonVariants> & {
|
|
153
|
-
asChild?: boolean
|
|
154
|
-
}) {
|
|
155
|
-
const Comp = asChild ? Slot.Root : "button"
|
|
156
|
-
|
|
157
|
-
return (
|
|
158
|
-
<Comp
|
|
159
|
-
data-slot="button"
|
|
160
|
-
data-variant={variant}
|
|
161
|
-
data-size={size}
|
|
162
|
-
className={cn(buttonVariants({ variant, size, className }))}
|
|
163
|
-
{...props}
|
|
164
|
-
/>
|
|
165
|
-
)
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export { Button, buttonVariants }
|
|
169
|
-
`;
|
|
170
|
-
}
|
|
171
|
-
function renderCardTsx() {
|
|
172
|
-
return `import * as React from "react"
|
|
173
|
-
|
|
174
|
-
import { cn } from "@/lib/utils"
|
|
175
|
-
|
|
176
|
-
function Card({ className, ...props }: React.ComponentProps<"div">) {
|
|
177
|
-
return (
|
|
178
|
-
<div
|
|
179
|
-
data-slot="card"
|
|
180
|
-
className={cn(
|
|
181
|
-
"flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",
|
|
182
|
-
className
|
|
183
|
-
)}
|
|
184
|
-
{...props}
|
|
185
|
-
/>
|
|
186
|
-
)
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
190
|
-
return (
|
|
191
|
-
<div
|
|
192
|
-
data-slot="card-header"
|
|
193
|
-
className={cn(
|
|
194
|
-
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
|
195
|
-
className
|
|
196
|
-
)}
|
|
197
|
-
{...props}
|
|
198
|
-
/>
|
|
199
|
-
)
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
203
|
-
return (
|
|
204
|
-
<div
|
|
205
|
-
data-slot="card-title"
|
|
206
|
-
className={cn("leading-none font-semibold", className)}
|
|
207
|
-
{...props}
|
|
208
|
-
/>
|
|
209
|
-
)
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
|
|
213
|
-
return (
|
|
214
|
-
<div
|
|
215
|
-
data-slot="card-description"
|
|
216
|
-
className={cn("text-sm text-muted-foreground", className)}
|
|
217
|
-
{...props}
|
|
218
|
-
/>
|
|
219
|
-
)
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
|
|
223
|
-
return (
|
|
224
|
-
<div
|
|
225
|
-
data-slot="card-action"
|
|
226
|
-
className={cn(
|
|
227
|
-
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
228
|
-
className
|
|
229
|
-
)}
|
|
230
|
-
{...props}
|
|
231
|
-
/>
|
|
232
|
-
)
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
236
|
-
return (
|
|
237
|
-
<div
|
|
238
|
-
data-slot="card-content"
|
|
239
|
-
className={cn("px-6", className)}
|
|
240
|
-
{...props}
|
|
241
|
-
/>
|
|
242
|
-
)
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
246
|
-
return (
|
|
247
|
-
<div
|
|
248
|
-
data-slot="card-footer"
|
|
249
|
-
className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
|
|
250
|
-
{...props}
|
|
251
|
-
/>
|
|
252
|
-
)
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
export {
|
|
256
|
-
Card,
|
|
257
|
-
CardHeader,
|
|
258
|
-
CardFooter,
|
|
259
|
-
CardTitle,
|
|
260
|
-
CardAction,
|
|
261
|
-
CardDescription,
|
|
262
|
-
CardContent,
|
|
263
|
-
}
|
|
264
|
-
`;
|
|
265
|
-
}
|
|
266
|
-
var reactPreset = {
|
|
267
|
-
id: "react",
|
|
268
|
-
label: "React + Vite",
|
|
269
|
-
dependencies: {
|
|
270
|
-
// shadcn/ui's runtime surface. `radix-ui` is the unified primitives
|
|
271
|
-
// package current components import (`Slot.Root` powers `asChild`) — not
|
|
272
|
-
// the per-primitive `@radix-ui/react-*` packages, which it superseded.
|
|
273
|
-
// cva types the variants, clsx + tailwind-merge back `cn()`, lucide is
|
|
274
|
-
// the icon set. Pre-installed so `npx shadcn@latest add <component>`
|
|
275
|
-
// works without a separate npm i.
|
|
276
|
-
"class-variance-authority": "^0.7.1",
|
|
277
|
-
clsx: "^2.1.1",
|
|
278
|
-
"lucide-react": "^0.475.0",
|
|
279
|
-
"radix-ui": "^1.6.7",
|
|
280
|
-
react: "^19.1.0",
|
|
281
|
-
"react-dom": "^19.1.0",
|
|
282
|
-
"tailwind-merge": "^3.0.1"
|
|
283
|
-
},
|
|
284
|
-
devDependencies: {
|
|
285
|
-
"@tailwindcss/vite": "^4.1.5",
|
|
286
|
-
"@types/node": "^20.19.43",
|
|
287
|
-
"@types/react": "^19.1.0",
|
|
288
|
-
"@types/react-dom": "^19.1.0",
|
|
289
|
-
// 6.x, which peer-requires vite ^8 — the same constraint the Svelte
|
|
290
|
-
// preset's plugin has, which is why both presets share one Vite major.
|
|
291
|
-
// Its `@rolldown/plugin-babel` and `babel-plugin-react-compiler` peers are
|
|
292
|
-
// OPTIONAL (they back the React Compiler path, which this scaffold does
|
|
293
|
-
// not enable), so neither is shipped: verified by a clean install with no
|
|
294
|
-
// unmet-peer warnings.
|
|
295
|
-
"@vitejs/plugin-react": "^6.0.5",
|
|
296
|
-
tailwindcss: "^4.1.5",
|
|
297
|
-
"tw-animate-css": "^1.2.4",
|
|
298
|
-
tsx: "^4.19.2",
|
|
299
|
-
// Kept in step with the Svelte preset — the major `sv create` pins. 7 is
|
|
300
|
-
// out, but svelte-check's peer range stops at 6 and the two presets track
|
|
301
|
-
// one TypeScript major so the shared tsconfig means the same thing in both.
|
|
302
|
-
typescript: "^6.0.3",
|
|
303
|
-
vite: "^8.0.16"
|
|
304
|
-
},
|
|
305
|
-
// `tsc` checks .tsx natively, so React needs nothing beyond it.
|
|
306
|
-
checkCmd: "tsc --noEmit",
|
|
307
|
-
aliasName: "@",
|
|
308
|
-
aliasTarget: "frontend/src",
|
|
309
|
-
// `./`-rooted: with no `baseUrl` (deprecated in TypeScript 6), a `paths`
|
|
310
|
-
// target resolves against tsconfig.json's own directory.
|
|
311
|
-
tsconfigPaths: { "@/*": ["./frontend/src/*"] },
|
|
312
|
-
tsconfigOptions: { jsx: "react-jsx" },
|
|
313
|
-
viteImports: [
|
|
314
|
-
`import react from "@vitejs/plugin-react";`,
|
|
315
|
-
`import tailwindcss from "@tailwindcss/vite";`
|
|
316
|
-
],
|
|
317
|
-
vitePlugins: ["react()", "tailwindcss()"],
|
|
318
|
-
entryScript: "/src/main.tsx",
|
|
319
|
-
files(_vars, landing) {
|
|
320
|
-
return [
|
|
321
|
-
// The shadcn/ui CLI's config — lets `npx shadcn@latest add <component>`
|
|
322
|
-
// work in a fresh scaffold without a separate `shadcn init`.
|
|
323
|
-
{ path: "components.json", content: renderComponentsJson() },
|
|
324
|
-
{ path: "frontend/src/main.tsx", content: renderMainTsx() },
|
|
325
|
-
{ path: "frontend/src/App.tsx", content: renderApp(landing) },
|
|
326
|
-
// The two components the landing page uses. Every other shadcn component
|
|
327
|
-
// is one `npx shadcn@latest add` away and lands beside these.
|
|
328
|
-
{ path: "frontend/src/components/ui/button.tsx", content: renderButtonTsx() },
|
|
329
|
-
{ path: "frontend/src/components/ui/card.tsx", content: renderCardTsx() }
|
|
330
|
-
];
|
|
331
|
-
},
|
|
332
|
-
readmeFrontendSection() {
|
|
333
|
-
return `React + Vite, styled with [Tailwind CSS](https://tailwindcss.com) v4 and
|
|
334
|
-
[shadcn/ui](https://ui.shadcn.com). shadcn is not a dependency \u2014 its components
|
|
335
|
-
are copied into [\`frontend/src/components/ui/\`](frontend/src/components/ui/) and
|
|
336
|
-
owned by this project, so edit them freely. \`Button\` and \`Card\` are already
|
|
337
|
-
there; add more with:
|
|
338
|
-
|
|
339
|
-
\`\`\`bash
|
|
340
|
-
npx shadcn@latest add dialog input form
|
|
341
|
-
\`\`\`
|
|
342
|
-
|
|
343
|
-
[\`components.json\`](components.json) is pre-configured, so that works with no
|
|
344
|
-
\`shadcn init\` step. Icons are [Lucide](https://lucide.dev/icons), installed as
|
|
345
|
-
\`lucide-react\` and imported by name \u2014
|
|
346
|
-
\`import { ArrowRight } from "lucide-react"\`, as
|
|
347
|
-
[\`frontend/src/App.tsx\`](frontend/src/App.tsx) does.
|
|
348
|
-
|
|
349
|
-
Components import through the \`@/\` alias
|
|
350
|
-
(\`@/components/ui/button\`, \`@/lib/utils\`), which maps to \`frontend/src/\` in both
|
|
351
|
-
\`tsconfig.json\` and \`vite.config.ts\` \u2014 change one and change the other.
|
|
352
|
-
|
|
353
|
-
To rebrand, edit the color tokens at the top of
|
|
354
|
-
[\`frontend/src/index.css\`](frontend/src/index.css). Tailwind v4 has no
|
|
355
|
-
\`tailwind.config.js\`; the theme lives in that stylesheet.`;
|
|
356
|
-
},
|
|
357
|
-
agentGuidanceSection() {
|
|
358
|
-
return `- \`frontend/src/\` \u2014 the React app. Tailwind v4 + shadcn/ui.
|
|
359
|
-
- \`frontend/src/components/ui/\` \u2014 shadcn components, **copied in and owned by
|
|
360
|
-
this project**. Edit them directly; there is no library to configure around.
|
|
361
|
-
- Need one that isn't there? \`npx shadcn@latest add <name>\` \u2014 do not hand-roll
|
|
362
|
-
it, and do not add a different component library.
|
|
363
|
-
- Icons are [Lucide](https://lucide.dev/icons), already installed as
|
|
364
|
-
\`lucide-react\`. Import them by name from the package root:
|
|
365
|
-
\`import { ArrowRight } from "lucide-react";\` \u2014 \`frontend/src/App.tsx\` already
|
|
366
|
-
does. Do not add another icon library and do not paste raw inline \`<svg>\`
|
|
367
|
-
markup \u2014 search the set before concluding an icon is missing.
|
|
368
|
-
- Import via the \`@/\` alias (\`@/components/ui/button\`, \`@/lib/utils\`), declared
|
|
369
|
-
in both \`tsconfig.json\` and \`vite.config.ts\`.
|
|
370
|
-
- Style with the semantic tokens (\`bg-primary\`, \`text-muted-foreground\`,
|
|
371
|
-
\`border-input\`), never raw palette classes like \`bg-gray-100\` \u2014 the tokens are
|
|
372
|
-
defined in \`frontend/src/index.css\`, which is also where you rebrand. Tailwind
|
|
373
|
-
v4 has no \`tailwind.config.js\`.`;
|
|
374
|
-
}
|
|
375
|
-
};
|
|
376
|
-
|
|
377
16
|
// src/emit/init-ai-presets.ts
|
|
378
17
|
var AI_PRESETS = ["claude", "codex", "cursor"];
|
|
379
18
|
var GUIDANCE_SENTINEL = "Learn the library from the library";
|
|
@@ -429,6 +68,10 @@ Run them with \`npm run xano:test\` after a deploy \u2014 it compiles nothing an
|
|
|
429
68
|
what is deployed, so deploy first. A failing suite exits 5.
|
|
430
69
|
\`npx xanots deploy ./xano/index.ts --test\` does both in one step. Read
|
|
431
70
|
\`node_modules/@xanots/sdk/llms/tests.md\` before authoring either.`;
|
|
71
|
+
function frontendSection(frontend) {
|
|
72
|
+
return `${frontend.section}
|
|
73
|
+
${themeGuidanceSection(frontend.theme ?? defaultThemeChoice())}`;
|
|
74
|
+
}
|
|
432
75
|
var DEFAULT_FRONTEND_GUIDANCE = {
|
|
433
76
|
label: reactPreset.label,
|
|
434
77
|
section: reactPreset.agentGuidanceSection()
|
|
@@ -457,7 +100,7 @@ frontend types follow.
|
|
|
457
100
|
groups, and endpoints. Pin each API group's canonical slug so public paths are
|
|
458
101
|
stable and \`getPath()\` resolves in the browser bundle.
|
|
459
102
|
- \`xano/EXAMPLE.md\` \u2014 the walkthrough for adding your first table + endpoint.
|
|
460
|
-
${frontend
|
|
103
|
+
${frontendSection(frontend)}
|
|
461
104
|
|
|
462
105
|
### Workflow
|
|
463
106
|
|
|
@@ -550,7 +193,7 @@ endpoint's verb and resolved path.
|
|
|
550
193
|
- \`xano/index.ts\` \u2014 the barrel: default-exports the \`workspace()\` with every pulled object registered.
|
|
551
194
|
- \`xano/_shared.ts\` \u2014 tables, and anything referenced from more than one file.
|
|
552
195
|
- \`xano/README.md\` \u2014 the decode report for this pull.
|
|
553
|
-
${frontend
|
|
196
|
+
${frontendSection(frontend)}
|
|
554
197
|
|
|
555
198
|
### Workflow
|
|
556
199
|
|
|
@@ -774,7 +417,8 @@ async function scaffoldProject(opts) {
|
|
|
774
417
|
version: opts.sdkVersion,
|
|
775
418
|
frontend: {
|
|
776
419
|
label: opts.frontend.label,
|
|
777
|
-
section: opts.frontend.agentGuidanceSection()
|
|
420
|
+
section: opts.frontend.agentGuidanceSection(opts.theme?.icons),
|
|
421
|
+
theme: opts.theme
|
|
778
422
|
}
|
|
779
423
|
});
|
|
780
424
|
const existing = existsSync(join(targetDir, path)) ? readFileSync(join(targetDir, path), "utf8") : null;
|
|
@@ -799,7 +443,6 @@ async function scaffoldProject(opts) {
|
|
|
799
443
|
}
|
|
800
444
|
|
|
801
445
|
export {
|
|
802
|
-
reactPreset,
|
|
803
446
|
AI_PRESETS,
|
|
804
447
|
managedBlockVersion,
|
|
805
448
|
upsertManagedBlock,
|
|
@@ -811,4 +454,4 @@ export {
|
|
|
811
454
|
resolveAiPresets,
|
|
812
455
|
scaffoldProject
|
|
813
456
|
};
|
|
814
|
-
//# sourceMappingURL=chunk-
|
|
457
|
+
//# sourceMappingURL=chunk-WRYT2PAX.js.map
|