@mozole/cli 2.0.0-b → 2.1.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 +1 -1
- package/dist/cli.d.ts +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +147 -23
- package/dist/cli.js.map +1 -1
- package/dist/commands/add.d.ts +7 -0
- package/dist/commands/add.d.ts.map +1 -0
- package/dist/commands/add.js +87 -0
- package/dist/commands/add.js.map +1 -0
- package/dist/commands/adopt.d.ts +2 -0
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +243 -45
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/assets.d.ts +28 -0
- package/dist/commands/assets.d.ts.map +1 -0
- package/dist/commands/assets.js +176 -0
- package/dist/commands/assets.js.map +1 -0
- package/dist/commands/backend.d.ts +5 -0
- package/dist/commands/backend.d.ts.map +1 -0
- package/dist/commands/backend.js +68 -0
- package/dist/commands/backend.js.map +1 -0
- package/dist/commands/new.d.ts +1 -1
- package/dist/commands/new.d.ts.map +1 -1
- package/dist/commands/new.js +13 -5
- package/dist/commands/new.js.map +1 -1
- package/dist/commands/prototype.d.ts.map +1 -1
- package/dist/commands/prototype.js +68 -20
- package/dist/commands/prototype.js.map +1 -1
- package/dist/commands/release.d.ts +10 -0
- package/dist/commands/release.d.ts.map +1 -0
- package/dist/commands/release.js +181 -0
- package/dist/commands/release.js.map +1 -0
- package/dist/commands/ui.d.ts +12 -1
- package/dist/commands/ui.d.ts.map +1 -1
- package/dist/commands/ui.js +182 -68
- package/dist/commands/ui.js.map +1 -1
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +37 -5
- package/dist/commands/verify.js.map +1 -1
- package/dist/scaffold/agents.d.ts.map +1 -1
- package/dist/scaffold/agents.js +40 -6
- package/dist/scaffold/agents.js.map +1 -1
- package/dist/scaffold/backend.d.ts +1 -1
- package/dist/scaffold/backend.d.ts.map +1 -1
- package/dist/scaffold/backend.js +63 -31
- package/dist/scaffold/backend.js.map +1 -1
- package/dist/scaffold/components.d.ts +8 -0
- package/dist/scaffold/components.d.ts.map +1 -0
- package/dist/scaffold/components.js +305 -0
- package/dist/scaffold/components.js.map +1 -0
- package/dist/scaffold/design.d.ts.map +1 -1
- package/dist/scaffold/design.js +47 -25
- package/dist/scaffold/design.js.map +1 -1
- package/dist/scaffold/flagship.d.ts +5 -0
- package/dist/scaffold/flagship.d.ts.map +1 -1
- package/dist/scaffold/flagship.js +161 -102
- package/dist/scaffold/flagship.js.map +1 -1
- package/dist/scaffold/index.d.ts +1 -1
- package/dist/scaffold/index.d.ts.map +1 -1
- package/dist/scaffold/index.js +22 -7
- package/dist/scaffold/index.js.map +1 -1
- package/dist/scaffold/library.d.ts +3 -0
- package/dist/scaffold/library.d.ts.map +1 -0
- package/dist/scaffold/library.js +98 -0
- package/dist/scaffold/library.js.map +1 -0
- package/dist/scaffold/phases.d.ts.map +1 -1
- package/dist/scaffold/phases.js +19 -14
- package/dist/scaffold/phases.js.map +1 -1
- package/dist/scaffold/repomap.d.ts +3 -3
- package/dist/scaffold/repomap.d.ts.map +1 -1
- package/dist/scaffold/repomap.js +22 -10
- package/dist/scaffold/repomap.js.map +1 -1
- package/dist/scaffold/standard.d.ts.map +1 -1
- package/dist/scaffold/standard.js +3 -2
- package/dist/scaffold/standard.js.map +1 -1
- package/dist/scaffold/tokens.js +4 -4
- package/dist/scaffold/tools-guide.d.ts +3 -0
- package/dist/scaffold/tools-guide.d.ts.map +1 -0
- package/dist/scaffold/tools-guide.js +117 -0
- package/dist/scaffold/tools-guide.js.map +1 -0
- package/dist/scaffold/workflow.d.ts +5 -0
- package/dist/scaffold/workflow.d.ts.map +1 -0
- package/dist/scaffold/workflow.js +221 -0
- package/dist/scaffold/workflow.js.map +1 -0
- package/dist/ui/CockpitApp.d.ts +13 -0
- package/dist/ui/CockpitApp.d.ts.map +1 -0
- package/dist/ui/CockpitApp.js +612 -0
- package/dist/ui/CockpitApp.js.map +1 -0
- package/dist/ui/ToolsPanel.d.ts +6 -0
- package/dist/ui/ToolsPanel.d.ts.map +1 -0
- package/dist/ui/ToolsPanel.js +128 -0
- package/dist/ui/ToolsPanel.js.map +1 -0
- package/dist/utils/fs.d.ts +7 -0
- package/dist/utils/fs.d.ts.map +1 -1
- package/dist/utils/fs.js +169 -3
- package/dist/utils/fs.js.map +1 -1
- package/dist/utils/project-files.d.ts +4 -0
- package/dist/utils/project-files.d.ts.map +1 -0
- package/dist/utils/project-files.js +49 -0
- package/dist/utils/project-files.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +32 -4
package/dist/scaffold/backend.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
1
2
|
import path from "node:path";
|
|
2
|
-
import { atomicWrite } from "../utils/fs.js";
|
|
3
|
+
import { atomicWrite, exists, writeFiles } from "../utils/fs.js";
|
|
3
4
|
export function generatePhpConfig() {
|
|
4
5
|
return `<?php
|
|
5
6
|
/**
|
|
@@ -263,12 +264,15 @@ export function generatePhpSecurityHtaccess() {
|
|
|
263
264
|
return `# Mozole Studio - Shared Hosting Security
|
|
264
265
|
# Blocks direct access to sensitive PHP files and enforces strict methods
|
|
265
266
|
|
|
266
|
-
<FilesMatch "^config\\.php$">
|
|
267
|
+
<FilesMatch "^(config|mailer|router)\\.php$">
|
|
267
268
|
Require all denied
|
|
268
269
|
</FilesMatch>
|
|
269
270
|
|
|
270
271
|
Options -Indexes -MultiViews
|
|
271
272
|
|
|
273
|
+
RewriteEngine On
|
|
274
|
+
RewriteRule ^(health|contact)$ index.php [L]
|
|
275
|
+
|
|
272
276
|
<LimitExcept GET POST OPTIONS>
|
|
273
277
|
Require all denied
|
|
274
278
|
</LimitExcept>
|
|
@@ -281,7 +285,7 @@ const PORT = Number(process.env.PORT || 3001);
|
|
|
281
285
|
|
|
282
286
|
const server = createServer(async (req, res) => {
|
|
283
287
|
res.setHeader("Content-Type", "application/json");
|
|
284
|
-
res.setHeader("
|
|
288
|
+
res.setHeader("X-Content-Type-Options", "nosniff");
|
|
285
289
|
res.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS");
|
|
286
290
|
res.setHeader("Access-Control-Allow-Headers", "Content-Type");
|
|
287
291
|
|
|
@@ -298,23 +302,8 @@ const server = createServer(async (req, res) => {
|
|
|
298
302
|
}
|
|
299
303
|
|
|
300
304
|
if (req.method === "POST" && req.url === "/api/contact") {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
req.on("end", () => {
|
|
304
|
-
try {
|
|
305
|
-
const data = JSON.parse(body);
|
|
306
|
-
if (data._honey) {
|
|
307
|
-
res.writeHead(200);
|
|
308
|
-
res.end(JSON.stringify({ success: true }));
|
|
309
|
-
return;
|
|
310
|
-
}
|
|
311
|
-
res.writeHead(200);
|
|
312
|
-
res.end(JSON.stringify({ success: true, message: "Message received." }));
|
|
313
|
-
} catch {
|
|
314
|
-
res.writeHead(400);
|
|
315
|
-
res.end(JSON.stringify({ error: "Invalid JSON" }));
|
|
316
|
-
}
|
|
317
|
-
});
|
|
305
|
+
res.writeHead(501);
|
|
306
|
+
res.end(JSON.stringify({ error: "Configure a project contact delivery adapter before accepting messages." }));
|
|
318
307
|
return;
|
|
319
308
|
}
|
|
320
309
|
|
|
@@ -322,22 +311,65 @@ const server = createServer(async (req, res) => {
|
|
|
322
311
|
res.end(JSON.stringify({ error: "Not found" }));
|
|
323
312
|
});
|
|
324
313
|
|
|
325
|
-
server.
|
|
314
|
+
server.requestTimeout = 15_000;
|
|
315
|
+
server.headersTimeout = 10_000;
|
|
316
|
+
server.listen(PORT, process.env.HOST || "127.0.0.1", () => {
|
|
326
317
|
console.log(\`Backend API running on http://localhost:\${PORT}\`);
|
|
327
318
|
});
|
|
328
319
|
`;
|
|
329
320
|
}
|
|
330
|
-
export async function scaffoldBackend(projectRoot, type = "
|
|
331
|
-
if (type === "
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
321
|
+
export async function scaffoldBackend(projectRoot, type = "none") {
|
|
322
|
+
if (type === "none")
|
|
323
|
+
return;
|
|
324
|
+
if (type !== "php" && type !== "node")
|
|
325
|
+
throw new Error("Backend must be php or node.");
|
|
326
|
+
const pkgPath = path.join(projectRoot, "package.json");
|
|
327
|
+
const pkg = (await exists(pkgPath)) ? JSON.parse(await readFile(pkgPath, "utf8")) : null;
|
|
328
|
+
const command = type === "php" ? "php -S 127.0.0.1:3001 -t api api/router.php" : "node server/index.mjs";
|
|
329
|
+
if (pkg?.scripts?.["dev:backend"] && pkg.scripts["dev:backend"] !== command) {
|
|
330
|
+
throw new Error("Existing dev:backend script conflicts with the selected runtime.");
|
|
337
331
|
}
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
332
|
+
const files = type === "php"
|
|
333
|
+
? {
|
|
334
|
+
"api/config.php": generatePhpConfig(),
|
|
335
|
+
"api/mailer.php": generatePhpMailer(),
|
|
336
|
+
"api/index.php": generatePhpIndex(),
|
|
337
|
+
"api/.htaccess": generatePhpSecurityHtaccess(),
|
|
338
|
+
"api/router.php": `<?php
|
|
339
|
+
$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
|
340
|
+
if (!in_array($path, ['/api/health', '/api/contact', '/api/index.php'], true)) {
|
|
341
|
+
http_response_code(404);
|
|
342
|
+
header('Content-Type: application/json');
|
|
343
|
+
echo json_encode(['error' => 'Not found']);
|
|
344
|
+
exit;
|
|
345
|
+
}
|
|
346
|
+
require __DIR__ . '/index.php';
|
|
347
|
+
`,
|
|
348
|
+
}
|
|
349
|
+
: { "server/index.mjs": generateNodeBackend() };
|
|
350
|
+
const entries = Object.entries(files);
|
|
351
|
+
for (const [file] of entries) {
|
|
352
|
+
if (await exists(path.join(projectRoot, file))) {
|
|
353
|
+
throw new Error(`Backend file already exists; preserving it: ${file}`);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
await writeFiles(projectRoot, Object.fromEntries(entries));
|
|
357
|
+
await writeFiles(projectRoot, {
|
|
358
|
+
"docs/backend.md": `# Backend: ${type}
|
|
359
|
+
|
|
360
|
+
Run npm run dev:backend in one terminal and npm run dev in another.
|
|
361
|
+
The frontend uses relative /api URLs; Vite proxies them to 127.0.0.1:3001.
|
|
362
|
+
Production hosting must route /api to this runtime separately from static assets.
|
|
363
|
+
${type === "php" ? "Requires PHP 8.1+. Configure api/config.php with the customer's recipients and origins. Mail delivery requires a configured server mail transport. For Apache, route /api/health and /api/contact to api/index.php; block access to configuration files." : "Requires Node.js 20+. GET /api/health is ready. POST /api/contact returns 501 until a project-owned delivery or storage adapter is implemented."}
|
|
364
|
+
|
|
365
|
+
This module provides the API foundation. Add project-owned authentication, authorization,
|
|
366
|
+
persistence and admin routes for customer menu management. It does not create a ready CMS.
|
|
367
|
+
Never expose an unauthenticated content mutation endpoint.
|
|
368
|
+
`,
|
|
369
|
+
});
|
|
370
|
+
if (pkg) {
|
|
371
|
+
pkg.scripts = { ...pkg.scripts, "dev:backend": command };
|
|
372
|
+
await atomicWrite(pkgPath, JSON.stringify(pkg, null, 2));
|
|
341
373
|
}
|
|
342
374
|
}
|
|
343
375
|
//# sourceMappingURL=backend.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../../src/scaffold/backend.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../../src/scaffold/backend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,EAA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AE,CAAC;QACzD,MAAM,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/scaffold/components.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,WAAW,EAAE,MAAM,CAAC;CACrB;AAwFD,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CA0U1D,CAAC"}
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import { generateDialog } from "./library.js";
|
|
2
|
+
import { generateBespokeButton, generateBespokeInput } from "./standard.js";
|
|
3
|
+
const control = "rounded-[var(--radius-sm)] border border-[var(--color-border)] bg-[var(--color-surface)] px-3 py-2 text-[var(--color-foreground)] focus-visible:outline-2 focus-visible:outline-[var(--color-primary)] disabled:opacity-50 disabled:pointer-events-none";
|
|
4
|
+
const panel = "rounded-[var(--radius-sm)] border border-[var(--color-border)] bg-[var(--color-surface)] p-4 text-[var(--color-foreground)]";
|
|
5
|
+
const overlay = "fixed inset-0 z-50 bg-[var(--color-background)]/80";
|
|
6
|
+
const floating = `${panel} z-50 max-h-[var(--radix-popper-available-height)] overflow-auto`;
|
|
7
|
+
function native(name, tag, classes = panel, defaults = "") {
|
|
8
|
+
const d = defaults ? ` ${defaults}` : "";
|
|
9
|
+
return `export function ${name}({ className = "", ...props }: ComponentProps<"${tag}">) {
|
|
10
|
+
return <${tag}${d} className={\`${classes} \${className}\`} {...props} />;
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
13
|
+
}
|
|
14
|
+
function wrap(name, part, classes = control, defaults = "") {
|
|
15
|
+
const d = defaults ? ` ${defaults}` : "";
|
|
16
|
+
return `export function ${name}({ className = "", ...props }: ComponentProps<typeof Primitive.${part}>) {
|
|
17
|
+
return <Primitive.${part}${d} className={\`${classes} \${className}\`} {...props} />;
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
}
|
|
21
|
+
function family(name, exports, wrappers = [], extra = "") {
|
|
22
|
+
const source = `import { ${name} as Primitive } from "radix-ui";
|
|
23
|
+
${wrappers.length || extra ? 'import type { ComponentProps } from "react";\n' : ""}
|
|
24
|
+
${exports.map((part) => `export const ${name}${part === "Root" ? "" : part} = Primitive.${part};`).join("\n")}
|
|
25
|
+
${wrappers.map(([suffix, part, classes]) => wrap(`${name}${suffix}`, part, classes)).join("\n")}
|
|
26
|
+
${extra}`;
|
|
27
|
+
return {
|
|
28
|
+
file: name,
|
|
29
|
+
source,
|
|
30
|
+
dependencies: { "radix-ui": "^1.6.7" },
|
|
31
|
+
description: `${name}: project-owned Radix foundation`,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function html(file, definitions) {
|
|
35
|
+
return {
|
|
36
|
+
file,
|
|
37
|
+
dependencies: {},
|
|
38
|
+
description: `${file}: semantic project-owned foundation`,
|
|
39
|
+
source: `import type { ComponentProps } from "react";\n\n${definitions.map(([name, tag, classes, defaults]) => native(name, tag, classes, defaults)).join("\n")}`,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function portalContent(name, bodyClass = floating) {
|
|
43
|
+
return `export function ${name}Content({ className = "", ...props }: ComponentProps<typeof Primitive.Content>) {
|
|
44
|
+
return <Primitive.Portal><Primitive.Content className={\`${bodyClass} \${className}\`} {...props} /></Primitive.Portal>;
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
47
|
+
}
|
|
48
|
+
function slidingPanel(name, position) {
|
|
49
|
+
return {
|
|
50
|
+
file: name,
|
|
51
|
+
dependencies: { "@radix-ui/react-dialog": "^1.1.6" },
|
|
52
|
+
description: `${name}: accessible ${name === "Drawer" ? "bottom panel (no drag gesture)" : "side panel"}`,
|
|
53
|
+
source: `import * as Primitive from "@radix-ui/react-dialog";
|
|
54
|
+
import type { ComponentProps } from "react";
|
|
55
|
+
export const ${name} = Primitive.Root;
|
|
56
|
+
export const ${name}Trigger = Primitive.Trigger;
|
|
57
|
+
export const ${name}Close = Primitive.Close;
|
|
58
|
+
export const ${name}Title = Primitive.Title;
|
|
59
|
+
export const ${name}Description = Primitive.Description;
|
|
60
|
+
export function ${name}Content({ className = "", children, ...props }: ComponentProps<typeof Primitive.Content>) {
|
|
61
|
+
return <Primitive.Portal>
|
|
62
|
+
<Primitive.Overlay className="${overlay}" />
|
|
63
|
+
<Primitive.Content className={\`fixed z-50 overflow-y-auto ${position} ${panel} \${className}\`} {...props}>
|
|
64
|
+
{children}
|
|
65
|
+
<Primitive.Close className="${control} mt-4">Close</Primitive.Close>
|
|
66
|
+
</Primitive.Content>
|
|
67
|
+
</Primitive.Portal>;
|
|
68
|
+
}
|
|
69
|
+
`,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
export const COMPONENTS = {
|
|
73
|
+
button: {
|
|
74
|
+
file: "Button",
|
|
75
|
+
source: generateBespokeButton(),
|
|
76
|
+
dependencies: { "@radix-ui/react-slot": "^1.1.2" },
|
|
77
|
+
description: "Button with variants and asChild composition",
|
|
78
|
+
},
|
|
79
|
+
input: {
|
|
80
|
+
file: "Input",
|
|
81
|
+
source: generateBespokeInput(),
|
|
82
|
+
dependencies: {},
|
|
83
|
+
description: "Input with accessible error state",
|
|
84
|
+
},
|
|
85
|
+
dialog: {
|
|
86
|
+
file: "Dialog",
|
|
87
|
+
source: generateDialog(),
|
|
88
|
+
dependencies: { "@radix-ui/react-dialog": "^1.1.6" },
|
|
89
|
+
description: "Accessible modal dialog",
|
|
90
|
+
},
|
|
91
|
+
accordion: family("Accordion", ["Root"], [
|
|
92
|
+
["Item", "Item", "border-b border-[var(--color-border)]"],
|
|
93
|
+
["Content", "Content", "py-3"],
|
|
94
|
+
], `export function AccordionTrigger({ className = "", children, ...props }: ComponentProps<typeof Primitive.Trigger>) {
|
|
95
|
+
return <Primitive.Header><Primitive.Trigger className={\`w-full text-left ${control} \${className}\`} {...props}>{children}</Primitive.Trigger></Primitive.Header>;
|
|
96
|
+
}`),
|
|
97
|
+
"alert-dialog": family("AlertDialog", ["Root", "Trigger", "Title", "Description"], [
|
|
98
|
+
["Action", "Action"],
|
|
99
|
+
["Cancel", "Cancel"],
|
|
100
|
+
], `export function AlertDialogContent({ className = "", ...props }: ComponentProps<typeof Primitive.Content>) {
|
|
101
|
+
return <Primitive.Portal><Primitive.Overlay className="${overlay}" /><Primitive.Content className={\`fixed left-1/2 top-1/2 z-50 w-full max-w-lg -translate-x-1/2 -translate-y-1/2 ${panel} \${className}\`} {...props} /></Primitive.Portal>;
|
|
102
|
+
}`),
|
|
103
|
+
"aspect-ratio": family("AspectRatio", ["Root"]),
|
|
104
|
+
avatar: family("Avatar", [], [
|
|
105
|
+
["", "Root", "relative inline-flex size-10 shrink-0 overflow-hidden rounded-full"],
|
|
106
|
+
["Image", "Image", "size-full object-cover"],
|
|
107
|
+
[
|
|
108
|
+
"Fallback",
|
|
109
|
+
"Fallback",
|
|
110
|
+
"flex size-full items-center justify-center bg-[var(--color-surface)]",
|
|
111
|
+
],
|
|
112
|
+
]),
|
|
113
|
+
checkbox: family("Checkbox", ["Indicator"], [], `export function Checkbox({ className = "", children, ...props }: ComponentProps<typeof Primitive.Root>) {
|
|
114
|
+
return <Primitive.Root className={\`inline-flex size-6 items-center justify-center ${control} p-0 \${className}\`} {...props}>{children ?? <Primitive.Indicator aria-hidden="true">✓</Primitive.Indicator>}</Primitive.Root>;
|
|
115
|
+
}`),
|
|
116
|
+
collapsible: family("Collapsible", ["Root", "Trigger", "Content"]),
|
|
117
|
+
"context-menu": family("ContextMenu", ["Root", "Trigger", "Group", "RadioGroup", "Sub", "SubTrigger", "SubContent", "ItemIndicator"], [
|
|
118
|
+
["Item", "Item"],
|
|
119
|
+
["CheckboxItem", "CheckboxItem"],
|
|
120
|
+
["RadioItem", "RadioItem"],
|
|
121
|
+
["Label", "Label", "px-3 py-1 font-medium"],
|
|
122
|
+
["Separator", "Separator", "h-px bg-[var(--color-border)]"],
|
|
123
|
+
], portalContent("ContextMenu")),
|
|
124
|
+
"dropdown-menu": family("DropdownMenu", ["Root", "Trigger", "Group", "RadioGroup", "Sub", "SubTrigger", "SubContent", "ItemIndicator"], [
|
|
125
|
+
["Item", "Item"],
|
|
126
|
+
["CheckboxItem", "CheckboxItem"],
|
|
127
|
+
["RadioItem", "RadioItem"],
|
|
128
|
+
["Label", "Label", "px-3 py-1 font-medium"],
|
|
129
|
+
["Separator", "Separator", "h-px bg-[var(--color-border)]"],
|
|
130
|
+
], portalContent("DropdownMenu")),
|
|
131
|
+
"hover-card": family("HoverCard", ["Root", "Trigger", "Arrow"], [], portalContent("HoverCard")),
|
|
132
|
+
label: family("Label", [], [["", "Root", "text-sm font-medium"]]),
|
|
133
|
+
menubar: family("Menubar", ["Menu", "Group", "Sub", "SubTrigger", "SubContent", "RadioGroup", "ItemIndicator"], [
|
|
134
|
+
["", "Root", `flex gap-1 ${panel}`],
|
|
135
|
+
["Trigger", "Trigger"],
|
|
136
|
+
["Item", "Item"],
|
|
137
|
+
["CheckboxItem", "CheckboxItem"],
|
|
138
|
+
["RadioItem", "RadioItem"],
|
|
139
|
+
["Label", "Label", "font-medium"],
|
|
140
|
+
["Separator", "Separator", "h-px bg-[var(--color-border)]"],
|
|
141
|
+
], portalContent("Menubar")),
|
|
142
|
+
"navigation-menu": family("NavigationMenu", ["Root", "Item", "Indicator", "Viewport"], [
|
|
143
|
+
["List", "List", "flex flex-wrap gap-2"],
|
|
144
|
+
["Trigger", "Trigger"],
|
|
145
|
+
["Link", "Link"],
|
|
146
|
+
["Content", "Content", panel],
|
|
147
|
+
]),
|
|
148
|
+
popover: family("Popover", ["Root", "Trigger", "Anchor", "Close", "Arrow"], [], portalContent("Popover")),
|
|
149
|
+
progress: family("Progress", [], [], `export function Progress({ value = 0, max = 100, className = "", ...props }: ComponentProps<typeof Primitive.Root>) {
|
|
150
|
+
const percent = value === null ? 0 : Math.min(100, Math.max(0, value / max * 100));
|
|
151
|
+
return <Primitive.Root value={value} max={max} className={\`h-2 overflow-hidden rounded-full bg-[var(--color-surface)] \${className}\`} {...props}>
|
|
152
|
+
<Primitive.Indicator className="h-full bg-[var(--color-primary)]" style={{ width: value === null ? "100%" : percent + "%" }} />
|
|
153
|
+
</Primitive.Root>;
|
|
154
|
+
}`),
|
|
155
|
+
"radio-group": family("RadioGroup", ["Root"], [], `export function RadioGroupItem({ className = "", children, ...props }: ComponentProps<typeof Primitive.Item>) {
|
|
156
|
+
return <Primitive.Item className={\`size-6 rounded-full border border-[var(--color-border)] ${control} p-0 \${className}\`} {...props}>{children ?? <Primitive.Indicator className="block size-3 mx-auto rounded-full bg-[var(--color-primary)]" />}</Primitive.Item>;
|
|
157
|
+
}`),
|
|
158
|
+
"scroll-area": family("ScrollArea", [], [], `export function ScrollArea({ className = "", children, ...props }: ComponentProps<typeof Primitive.Root>) {
|
|
159
|
+
return <Primitive.Root className={\`relative overflow-hidden \${className}\`} {...props}>
|
|
160
|
+
<Primitive.Viewport className="size-full rounded-[inherit]">{children}</Primitive.Viewport>
|
|
161
|
+
<Primitive.Scrollbar orientation="vertical" className="flex w-2"><Primitive.Thumb className="relative flex-1 rounded-full bg-[var(--color-border)]" /></Primitive.Scrollbar>
|
|
162
|
+
<Primitive.Scrollbar orientation="horizontal" className="flex h-2"><Primitive.Thumb className="relative flex-1 rounded-full bg-[var(--color-border)]" /></Primitive.Scrollbar>
|
|
163
|
+
<Primitive.Corner />
|
|
164
|
+
</Primitive.Root>;
|
|
165
|
+
}`),
|
|
166
|
+
select: family("Select", ["Root", "Value", "Group", "Label", "Separator"], [["Trigger", "Trigger", `inline-flex items-center gap-2 ${control}`]], `export function SelectContent({ className = "", children, ...props }: ComponentProps<typeof Primitive.Content>) {
|
|
167
|
+
return <Primitive.Portal><Primitive.Content position="popper" className={\`${floating} \${className}\`} {...props}>
|
|
168
|
+
<Primitive.ScrollUpButton aria-label="Scroll up">▲</Primitive.ScrollUpButton>
|
|
169
|
+
<Primitive.Viewport>{children}</Primitive.Viewport><Primitive.ScrollDownButton aria-label="Scroll down">▼</Primitive.ScrollDownButton>
|
|
170
|
+
</Primitive.Content></Primitive.Portal>;
|
|
171
|
+
}
|
|
172
|
+
export function SelectItem({ className = "", children, ...props }: ComponentProps<typeof Primitive.Item>) {
|
|
173
|
+
return <Primitive.Item className={\`${control} \${className}\`} {...props}><Primitive.ItemText>{children}</Primitive.ItemText><Primitive.ItemIndicator aria-hidden="true">✓</Primitive.ItemIndicator></Primitive.Item>;
|
|
174
|
+
}`),
|
|
175
|
+
separator: family("Separator", [], [
|
|
176
|
+
[
|
|
177
|
+
"",
|
|
178
|
+
"Root",
|
|
179
|
+
"bg-[var(--color-border)] data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:h-full",
|
|
180
|
+
],
|
|
181
|
+
]),
|
|
182
|
+
slider: family("Slider", [], [], `export function Slider({ className = "", value, defaultValue = [50], thumbLabels = ["Value"], ...props }: ComponentProps<typeof Primitive.Root> & { thumbLabels?: string[] }) {
|
|
183
|
+
return <Primitive.Root value={value} defaultValue={defaultValue} className={\`relative flex h-6 w-full touch-none items-center data-[orientation=vertical]:h-48 data-[orientation=vertical]:w-6 data-[orientation=vertical]:flex-col \${className}\`} {...props}>
|
|
184
|
+
<Primitive.Track className="relative grow h-2 data-[orientation=vertical]:w-2 rounded-full bg-[var(--color-surface)]"><Primitive.Range className="absolute h-full data-[orientation=vertical]:w-full bg-[var(--color-primary)]" /></Primitive.Track>
|
|
185
|
+
{(value ?? defaultValue).map((_, index) => <Primitive.Thumb key={index} aria-label={thumbLabels[index] ?? "Value " + (index + 1)} className="block size-6 rounded-full bg-[var(--color-primary)] focus-visible:outline-2 focus-visible:outline-offset-2" />)}
|
|
186
|
+
</Primitive.Root>;
|
|
187
|
+
}`),
|
|
188
|
+
switch: family("Switch", [], [], `export function Switch({ className = "", children, ...props }: ComponentProps<typeof Primitive.Root>) {
|
|
189
|
+
return <Primitive.Root className={\`inline-flex h-6 w-11 items-center rounded-full bg-[var(--color-border)] data-[state=checked]:bg-[var(--color-primary)] focus-visible:outline-2 focus-visible:outline-offset-2 disabled:opacity-50 \${className}\`} {...props}>{children ?? <Primitive.Thumb className="block size-5 translate-x-0.5 rounded-full bg-[var(--color-foreground)] data-[state=checked]:translate-x-5" />}</Primitive.Root>;
|
|
190
|
+
}`),
|
|
191
|
+
tabs: family("Tabs", ["Root"], [
|
|
192
|
+
["List", "List", "flex gap-2 border-b border-[var(--color-border)]"],
|
|
193
|
+
[
|
|
194
|
+
"Trigger",
|
|
195
|
+
"Trigger",
|
|
196
|
+
`${control} data-[state=active]:bg-[var(--color-primary)] data-[state=active]:text-[var(--color-primary-foreground)]`,
|
|
197
|
+
],
|
|
198
|
+
["Content", "Content", "py-4"],
|
|
199
|
+
]),
|
|
200
|
+
toast: family("Toast", ["Provider", "Title", "Description", "Action", "Close"], [
|
|
201
|
+
["", "Root", panel],
|
|
202
|
+
["Viewport", "Viewport", "fixed bottom-4 right-4 z-50 flex max-w-sm flex-col gap-2"],
|
|
203
|
+
]),
|
|
204
|
+
toggle: family("Toggle", [], [
|
|
205
|
+
[
|
|
206
|
+
"",
|
|
207
|
+
"Root",
|
|
208
|
+
`${control} data-[state=on]:bg-[var(--color-primary)] data-[state=on]:text-[var(--color-primary-foreground)]`,
|
|
209
|
+
],
|
|
210
|
+
]),
|
|
211
|
+
"toggle-group": family("ToggleGroup", ["Root"], [
|
|
212
|
+
[
|
|
213
|
+
"Item",
|
|
214
|
+
"Item",
|
|
215
|
+
`${control} data-[state=on]:bg-[var(--color-primary)] data-[state=on]:text-[var(--color-primary-foreground)]`,
|
|
216
|
+
],
|
|
217
|
+
]),
|
|
218
|
+
tooltip: family("Tooltip", ["Provider", "Root", "Trigger", "Arrow"], [], portalContent("Tooltip")),
|
|
219
|
+
sheet: slidingPanel("Sheet", "inset-y-0 right-0 w-full max-w-md"),
|
|
220
|
+
drawer: slidingPanel("Drawer", "inset-x-0 bottom-0 max-h-[85dvh] rounded-t-[var(--radius-sm)]"),
|
|
221
|
+
card: html("Card", [
|
|
222
|
+
["Card", "div"],
|
|
223
|
+
["CardHeader", "div", "mb-4"],
|
|
224
|
+
["CardTitle", "h3", "text-lg font-semibold"],
|
|
225
|
+
["CardDescription", "p", "text-[var(--color-muted-foreground)]"],
|
|
226
|
+
["CardContent", "div", ""],
|
|
227
|
+
["CardFooter", "div", "mt-4 flex items-center gap-2"],
|
|
228
|
+
]),
|
|
229
|
+
badge: html("Badge", [
|
|
230
|
+
[
|
|
231
|
+
"Badge",
|
|
232
|
+
"span",
|
|
233
|
+
"inline-flex rounded-full border border-[var(--color-border)] px-2 py-0.5 text-xs",
|
|
234
|
+
],
|
|
235
|
+
]),
|
|
236
|
+
textarea: html("Textarea", [["Textarea", "textarea", `${control} min-h-24 w-full text-base`]]),
|
|
237
|
+
table: html("Table", [
|
|
238
|
+
["Table", "table", "w-full text-sm"],
|
|
239
|
+
["TableHeader", "thead", "border-b border-[var(--color-border)]"],
|
|
240
|
+
["TableBody", "tbody", ""],
|
|
241
|
+
["TableFooter", "tfoot", "border-t border-[var(--color-border)]"],
|
|
242
|
+
["TableRow", "tr", "border-b border-[var(--color-border)]"],
|
|
243
|
+
["TableHead", "th", "p-3 text-left font-medium", 'scope="col"'],
|
|
244
|
+
["TableCell", "td", "p-3"],
|
|
245
|
+
["TableCaption", "caption", "p-3 text-[var(--color-muted-foreground)]"],
|
|
246
|
+
]),
|
|
247
|
+
skeleton: html("Skeleton", [
|
|
248
|
+
[
|
|
249
|
+
"Skeleton",
|
|
250
|
+
"div",
|
|
251
|
+
"rounded-[var(--radius-sm)] bg-[var(--color-border)] motion-safe:animate-pulse",
|
|
252
|
+
'aria-hidden="true"',
|
|
253
|
+
],
|
|
254
|
+
]),
|
|
255
|
+
alert: html("Alert", [
|
|
256
|
+
["Alert", "div", panel, 'role="alert"'],
|
|
257
|
+
["AlertTitle", "h4", "font-medium"],
|
|
258
|
+
["AlertDescription", "div", "text-sm text-[var(--color-muted-foreground)]"],
|
|
259
|
+
]),
|
|
260
|
+
breadcrumb: html("Breadcrumb", [
|
|
261
|
+
["Breadcrumb", "nav", "", 'aria-label="Breadcrumb"'],
|
|
262
|
+
["BreadcrumbList", "ol", "flex flex-wrap items-center gap-2"],
|
|
263
|
+
["BreadcrumbItem", "li", "inline-flex gap-2"],
|
|
264
|
+
["BreadcrumbLink", "a", "underline-offset-4 hover:underline"],
|
|
265
|
+
["BreadcrumbPage", "span", "font-medium", 'aria-current="page"'],
|
|
266
|
+
["BreadcrumbSeparator", "li", "", 'aria-hidden="true"'],
|
|
267
|
+
]),
|
|
268
|
+
pagination: html("Pagination", [
|
|
269
|
+
["Pagination", "nav", "", 'aria-label="Pagination"'],
|
|
270
|
+
["PaginationContent", "ul", "flex items-center gap-2"],
|
|
271
|
+
["PaginationItem", "li", ""],
|
|
272
|
+
["PaginationLink", "a", control],
|
|
273
|
+
]),
|
|
274
|
+
spinner: html("Spinner", [
|
|
275
|
+
[
|
|
276
|
+
"Spinner",
|
|
277
|
+
"span",
|
|
278
|
+
"inline-block size-5 rounded-full border-2 border-[var(--color-border)] border-t-[var(--color-primary)] motion-safe:animate-spin",
|
|
279
|
+
'role="status" aria-label="Loading"',
|
|
280
|
+
],
|
|
281
|
+
]),
|
|
282
|
+
"native-select": html("NativeSelect", [
|
|
283
|
+
["NativeSelect", "select", control],
|
|
284
|
+
["NativeSelectOption", "option", ""],
|
|
285
|
+
["NativeSelectGroup", "optgroup", ""],
|
|
286
|
+
]),
|
|
287
|
+
field: html("Field", [
|
|
288
|
+
["Field", "fieldset", "flex flex-col gap-2"],
|
|
289
|
+
["FieldLegend", "legend", "font-medium"],
|
|
290
|
+
["FieldLabel", "label", "text-sm font-medium"],
|
|
291
|
+
["FieldDescription", "p", "text-sm text-[var(--color-muted-foreground)]"],
|
|
292
|
+
["FieldError", "p", "text-sm text-[var(--color-danger)]", 'role="alert"'],
|
|
293
|
+
]),
|
|
294
|
+
"button-group": html("ButtonGroup", [
|
|
295
|
+
["ButtonGroup", "div", "inline-flex flex-wrap gap-1", 'role="group"'],
|
|
296
|
+
]),
|
|
297
|
+
kbd: html("Kbd", [
|
|
298
|
+
[
|
|
299
|
+
"Kbd",
|
|
300
|
+
"kbd",
|
|
301
|
+
"rounded-[var(--radius-sm)] border border-[var(--color-border)] px-1 text-xs font-mono",
|
|
302
|
+
],
|
|
303
|
+
]),
|
|
304
|
+
};
|
|
305
|
+
//# sourceMappingURL=components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../src/scaffold/components.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAS5E,MAAM,OAAO,GACX,yPAAyP,CAAC;AAC5P,MAAM,KAAK,GACT,6HAA6H,CAAC;AAChI,MAAM,OAAO,GAAG,oDAAoD,CAAC;AACrE,MAAM,QAAQ,GAAG,GAAG,KAAK,kEAAkE,CAAC;AAE5F,SAAS,MAAM,CAAC,IAAY,EAAE,GAAW,EAAE,OAAO,GAAG,KAAK,EAAE,QAAQ,GAAG,EAAE;IACvE,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACzC,OAAO,mBAAmB,IAAI,kDAAkD,GAAG;YACzE,GAAG,GAAG,CAAC,iBAAiB,OAAO;;CAE1C,CAAC;AACF,CAAC;AAED,SAAS,IAAI,CAAC,IAAY,EAAE,IAAY,EAAE,OAAO,GAAG,OAAO,EAAE,QAA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L,KAAK;YACL,uFAAuF;SACxF;KACF,CAAC;CACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"design.d.ts","sourceRoot":"","sources":["../../src/scaffold/design.ts"],"names":[],"mappings":"AAGA,wBAAgB,oBAAoB,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"design.d.ts","sourceRoot":"","sources":["../../src/scaffold/design.ts"],"names":[],"mappings":"AAGA,wBAAgB,oBAAoB,IAAI,MAAM,CAoB7C;AAED,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAc5D;AAED,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAY3D;AAED,wBAAsB,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAW5F"}
|
package/dist/scaffold/design.js
CHANGED
|
@@ -1,42 +1,64 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import {
|
|
2
|
+
import { exists, writeFiles } from "../utils/fs.js";
|
|
3
3
|
export function generateDesignReadme() {
|
|
4
|
-
return `# Design References
|
|
4
|
+
return `# Design References
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
The user determines the design direction in conversation. Root design.md (if supplied),
|
|
7
|
+
this directory's design.md and brief.md, and extracted Stitch/Superdesign prototypes
|
|
8
|
+
are supporting references only. None overrides current user instructions.
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
Preserve original exports. Do not execute exported scripts, install their dependencies,
|
|
11
|
+
or copy their architecture/styles wholesale. Translate relevant textual/source details
|
|
12
|
+
into the project component structure within the user's requested scope.
|
|
13
|
+
|
|
14
|
+
Never independently render, capture, diff or visually inspect reference screens or the
|
|
15
|
+
application. The user supplies screenshots and specific feedback when needed; analyze
|
|
16
|
+
those supplied images only for that correction. Headless technical checks are separate
|
|
17
|
+
from visual approval and may run only when validation is authorized.
|
|
18
|
+
|
|
19
|
+
See ../workflow.md for production order, ../decisions.md for settled conversation choices,
|
|
20
|
+
and ../toolkit.md for commands. Do not generate an extra design.md when the user already
|
|
21
|
+
provides one elsewhere, or rewrite originals to match agent assumptions.
|
|
12
22
|
`;
|
|
13
23
|
}
|
|
14
24
|
export function generateDesignMd(projectName) {
|
|
15
|
-
return `# Design
|
|
25
|
+
return `# Design Reference - ${projectName}
|
|
26
|
+
|
|
27
|
+
Supporting reference only. Design direction is determined in conversation, not by this
|
|
28
|
+
file or the starter template. Leave unspecified choices open until the user directs them.
|
|
16
29
|
|
|
17
|
-
##
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
30
|
+
## Reference notes
|
|
31
|
+
- Brand/context: not specified.
|
|
32
|
+
- Relevant prototype files: not specified.
|
|
33
|
+
- Useful patterns or constraints mentioned by the user: not specified.
|
|
34
|
+
|
|
35
|
+
Settled conversation decisions belong in ../decisions.md. Do not invent an approved
|
|
36
|
+
palette, typography, atmosphere or animation style from scaffold defaults.
|
|
22
37
|
`;
|
|
23
38
|
}
|
|
24
39
|
export function generateBriefMd(projectName) {
|
|
25
|
-
return `#
|
|
40
|
+
return `# Brief Reference - ${projectName}
|
|
41
|
+
|
|
42
|
+
Supplemental context; current user instructions take precedence.
|
|
43
|
+
|
|
44
|
+
- Audience and business objective: not specified.
|
|
45
|
+
- Requested pages and sections: not specified.
|
|
46
|
+
- Requested current stage: determined in conversation.
|
|
47
|
+
- Backend/customer panel requirements: not specified.
|
|
26
48
|
|
|
27
|
-
|
|
28
|
-
- Build a high-performance web experience for ${projectName}.
|
|
29
|
-
- Ensure full WCAG 2.1 AA accessibility conformance.
|
|
30
|
-
- Achieve 95+ Core Web Vitals on mobile and desktop.
|
|
49
|
+
Record agreed scope in ../decisions.md. Do not infer extra pages, panels or features.
|
|
31
50
|
`;
|
|
32
51
|
}
|
|
33
52
|
export async function scaffoldDesign(projectRoot, projectName) {
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
await
|
|
53
|
+
const files = {
|
|
54
|
+
"docs/design/README.md": generateDesignReadme(),
|
|
55
|
+
"docs/design/brief.md": generateBriefMd(projectName),
|
|
56
|
+
"docs/design/assets/.gitkeep": "",
|
|
57
|
+
"docs/design/screens/.gitkeep": "",
|
|
58
|
+
};
|
|
59
|
+
if (!(await exists(path.join(projectRoot, "design.md")))) {
|
|
60
|
+
files["docs/design/design.md"] = generateDesignMd(projectName);
|
|
61
|
+
}
|
|
62
|
+
await writeFiles(projectRoot, files);
|
|
41
63
|
}
|
|
42
64
|
//# sourceMappingURL=design.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"design.js","sourceRoot":"","sources":["../../src/scaffold/design.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"design.js","sourceRoot":"","sources":["../../src/scaffold/design.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,UAAU,oBAAoB;IAClC,OAAO;;;;;;;;;;;;;;;;;;CAkBR,CAAC;AACF,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,WAAmB;IAClD,OAAO,wBAAwB,WAAW;;;;;;;;;;;;CAY3C,CAAC;AACF,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,WAAmB;IACjD,OAAO,uBAAuB,WAAW;;;;;;;;;;CAU1C,CAAC;AACF,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,WAAmB,EAAE,WAAmB;IAC3E,MAAM,KAAK,GAA2B;QACpC,uBAAuB,EAAE,oBAAoB,EAAE;QAC/C,sBAAsB,EAAE,eAAe,CAAC,WAAW,CAAC;QACpD,6BAA6B,EAAE,EAAE;QACjC,8BAA8B,EAAE,EAAE;KACnC,CAAC;IACF,IAAI,CAAC,CAAC,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;QACzD,KAAK,CAAC,uBAAuB,CAAC,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACjE,CAAC;IACD,MAAM,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -5,4 +5,9 @@ export declare function generateFlagshipMain(): string;
|
|
|
5
5
|
export declare function generateFlagshipCanvasLayer(): string;
|
|
6
6
|
export declare function generateFlagshipApp(): string;
|
|
7
7
|
export declare function scaffoldFlagshipProject(projectRoot: string, projectName: string): Promise<void>;
|
|
8
|
+
export declare function generateSmoothScroll(): string;
|
|
9
|
+
export declare function generateFlagshipHeader(): string;
|
|
10
|
+
export declare function generateFlagshipFooter(): string;
|
|
11
|
+
export declare function generateFlagshipHome(): string;
|
|
12
|
+
export declare function generateFlagshipShowcase(): string;
|
|
8
13
|
//# sourceMappingURL=flagship.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flagship.d.ts","sourceRoot":"","sources":["../../src/scaffold/flagship.ts"],"names":[],"mappings":"AAIA,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAkCvE;AAED,wBAAgB,0BAA0B,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"flagship.d.ts","sourceRoot":"","sources":["../../src/scaffold/flagship.ts"],"names":[],"mappings":"AAIA,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAkCvE;AAED,wBAAgB,0BAA0B,IAAI,MAAM,CAanD;AAED,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAcrE;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAe7C;AAED,wBAAgB,2BAA2B,IAAI,MAAM,CAuEpD;AAED,wBAAgB,mBAAmB,IAAI,MAAM,CAiD5C;AAED,wBAAsB,uBAAuB,CAC3C,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAuFf;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAuC7C;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAgC/C;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAW/C;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CA4B7C;AAED,wBAAgB,wBAAwB,IAAI,MAAM,CAYjD"}
|