@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repomap.d.ts","sourceRoot":"","sources":["../../src/scaffold/repomap.ts"],"names":[],"mappings":"AAGA,wBAAgB,2BAA2B,
|
|
1
|
+
{"version":3,"file":"repomap.d.ts","sourceRoot":"","sources":["../../src/scaffold/repomap.ts"],"names":[],"mappings":"AAGA,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,OAAO,EACnB,OAAO,GAAE,MAAM,GAAG,KAAK,GAAG,MAAe,GACxC,MAAM,CA+BR;AAED,wBAAgB,yBAAyB,IAAI,MAAM,CAelD;AAED,wBAAgB,qBAAqB,CAAC,UAAU,UAAQ,GAAG,MAAM,CAqBhE;AAED,wBAAgB,qBAAqB,IAAI,MAAM,CAoB9C;AAED,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,UAAU,UAAQ,EAClB,OAAO,GAAE,MAAM,GAAG,KAAK,GAAG,MAAe,GACxC,OAAO,CAAC,IAAI,CAAC,CASf"}
|
package/dist/scaffold/repomap.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { atomicWrite } from "../utils/fs.js";
|
|
3
|
-
export function generateRepomapArchitecture(projectName, isFlagship) {
|
|
3
|
+
export function generateRepomapArchitecture(projectName, isFlagship, backend = "none") {
|
|
4
4
|
return `# Architecture Overview - ${projectName}
|
|
5
5
|
|
|
6
6
|
## Technology Stack
|
|
@@ -10,11 +10,13 @@ export function generateRepomapArchitecture(projectName, isFlagship) {
|
|
|
10
10
|
- **Styling Architecture:** Tailwind CSS v4 with Canonical Tokens in \`src/styles/tokens.css\`
|
|
11
11
|
- **UI Primitives:** Bespoke application components backed by unstyled Radix UI primitives
|
|
12
12
|
${isFlagship ? "- **Creative Experience:** Lenis (Smooth Scroll) + Motion + Persistent Canvas Layer\n" : ""}
|
|
13
|
-
- **Backend Architecture:**
|
|
13
|
+
- **Backend Architecture:** ${backend === "none" ? "None (static frontend)" : backend === "php" ? "PHP 8.1+ API in api/" : "Node.js HTTP API in server/"}
|
|
14
|
+
- **Library Ownership:** UI, Layout, Motion and Behavior implementations are project-local; only npm dependencies may be shared.
|
|
15
|
+
- **Library Entry:** src/library/index.ts
|
|
14
16
|
|
|
15
17
|
## Directory Hierarchy
|
|
16
18
|
\`\`\`
|
|
17
|
-
├── api/ #
|
|
19
|
+
${backend === "none" ? "" : backend === "php" ? "├── api/ # PHP endpoints\n" : "├── server/ # Node endpoints\n"}
|
|
18
20
|
├── docs/
|
|
19
21
|
│ ├── design/ # Design references, exported assets & screens
|
|
20
22
|
│ ├── phases/ # 10-step atomic development status
|
|
@@ -37,23 +39,33 @@ All UI primitives are bespoke application code located in \`src/components/ui/\`
|
|
|
37
39
|
|
|
38
40
|
| Component | Path | Backing Primitive | Responsibilities |
|
|
39
41
|
| :--- | :--- | :--- | :--- |
|
|
40
|
-
| **Header** | \`src/components/layout/Header.tsx\` | Semantic \`<header>\` | Main navigation,
|
|
42
|
+
| **Header** | \`src/components/layout/Header.tsx\` | Semantic \`<header>\` | Main navigation, branding |
|
|
41
43
|
| **Footer** | \`src/components/layout/Footer.tsx\` | Semantic \`<footer>\` | Site links, legal notes, copyright |
|
|
42
|
-
| **Button** | \`src/components/ui/Button.tsx\` | Native \`<button>\` | Accessible action trigger, variant styling,
|
|
44
|
+
| **Button** | \`src/components/ui/Button.tsx\` | Native \`<button>\` | Accessible action trigger, variant styling, composition via Radix Slot |
|
|
43
45
|
| **Dialog** | \`src/components/ui/Dialog.tsx\` | Radix \`@radix-ui/react-dialog\` | Accessible modal dialog, focus trap, escape key |
|
|
44
46
|
| **Input** | \`src/components/ui/Input.tsx\` | Native \`<input>\` | Form control with 16px mobile font floor and error states |
|
|
45
47
|
|
|
46
48
|
> **Contract Rule:** Primitives must remain unopinionated, unstyled Radix foundations with project design tokens applied. No external template dumping.
|
|
47
49
|
`;
|
|
48
50
|
}
|
|
49
|
-
export function generateRepomapRoutes() {
|
|
51
|
+
export function generateRepomapRoutes(isFlagship = false) {
|
|
52
|
+
if (isFlagship)
|
|
53
|
+
return `# Routes & Page Index
|
|
54
|
+
|
|
55
|
+
| Path | Component | Purpose |
|
|
56
|
+
| :--- | :--- | :--- |
|
|
57
|
+
| / | src/routes/home.tsx | Landing page |
|
|
58
|
+
| /showcase | src/routes/showcase.tsx | Creative showcase |
|
|
59
|
+
|
|
60
|
+
Routing is composed in src/App.tsx with Wouter. Header and Footer live in src/components/layout.
|
|
61
|
+
`;
|
|
50
62
|
return `# Routes & Page Index
|
|
51
63
|
|
|
52
64
|
| Path | Component | Layout | Purpose |
|
|
53
65
|
| :--- | :--- | :--- | :--- |
|
|
54
66
|
| \`/\` | \`src/routes/home.tsx\` | Root Layout | Primary landing page & value proposition |
|
|
55
67
|
| \`/about\` | \`src/routes/about.tsx\` | Root Layout | Studio background and team ethos |
|
|
56
|
-
| \`/contact\` | \`src/routes/contact.tsx\` | Root Layout | Contact
|
|
68
|
+
| \`/contact\` | \`src/routes/contact.tsx\` | Root Layout | Contact information |
|
|
57
69
|
|
|
58
70
|
> **SEO & A11y Requirement:** Every route must export a unique title and meta description, and render exactly one top-level \`<h1>\` tag.
|
|
59
71
|
`;
|
|
@@ -79,11 +91,11 @@ Canonical token definitions live in \`src/styles/tokens.css\` using Tailwind v4
|
|
|
79
91
|
- \`--text-xs\` to \`--text-5xl\`: Fluid viewport-scaled typography via \`clamp()\`.
|
|
80
92
|
`;
|
|
81
93
|
}
|
|
82
|
-
export async function scaffoldRepomap(projectRoot, projectName, isFlagship = false) {
|
|
94
|
+
export async function scaffoldRepomap(projectRoot, projectName, isFlagship = false, backend = "none") {
|
|
83
95
|
const repomapDir = path.join(projectRoot, "docs", "repomap");
|
|
84
|
-
await atomicWrite(path.join(repomapDir, "architecture.md"), generateRepomapArchitecture(projectName, isFlagship));
|
|
96
|
+
await atomicWrite(path.join(repomapDir, "architecture.md"), generateRepomapArchitecture(projectName, isFlagship, backend));
|
|
85
97
|
await atomicWrite(path.join(repomapDir, "components.md"), generateRepomapComponents());
|
|
86
|
-
await atomicWrite(path.join(repomapDir, "routes.md"), generateRepomapRoutes());
|
|
98
|
+
await atomicWrite(path.join(repomapDir, "routes.md"), generateRepomapRoutes(isFlagship));
|
|
87
99
|
await atomicWrite(path.join(repomapDir, "tokens.md"), generateRepomapTokens());
|
|
88
100
|
}
|
|
89
101
|
//# sourceMappingURL=repomap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repomap.js","sourceRoot":"","sources":["../../src/scaffold/repomap.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,UAAU,2BAA2B,
|
|
1
|
+
{"version":3,"file":"repomap.js","sourceRoot":"","sources":["../../src/scaffold/repomap.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,UAAU,2BAA2B,CACzC,WAAmB,EACnB,UAAmB,EACnB,UAAmC,MAAM;IAEzC,OAA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MAAM,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,EAAE,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC;IACzF,MAAM,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,EAAE,qBAAqB,EAAE,CAAC,CAAC;AACjF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standard.d.ts","sourceRoot":"","sources":["../../src/scaffold/standard.ts"],"names":[],"mappings":"AAGA,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAmCvE;AAED,wBAAgB,0BAA0B,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"standard.d.ts","sourceRoot":"","sources":["../../src/scaffold/standard.ts"],"names":[],"mappings":"AAGA,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAmCvE;AAED,wBAAgB,0BAA0B,IAAI,MAAM,CAanD;AAED,wBAAgB,4BAA4B,IAAI,MAAM,CAWrD;AAED,wBAAgB,wBAAwB,IAAI,MAAM,CAsBjD;AAED,wBAAgB,yBAAyB,IAAI,MAAM,CAmBlD;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAsC7C;AAED,wBAAgB,0BAA0B,IAAI,MAAM,CAkCnD;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAkD/C;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAW/C;AAED,wBAAgB,qBAAqB,IAAI,MAAM,CAwD9C;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAiC7C;AAED,wBAAsB,uBAAuB,CAC3C,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CA+Df"}
|
|
@@ -8,7 +8,7 @@ export function generateStandardPackageJson(projectName) {
|
|
|
8
8
|
scripts: {
|
|
9
9
|
dev: "react-router dev",
|
|
10
10
|
build: "react-router build",
|
|
11
|
-
preview: "vite preview",
|
|
11
|
+
preview: "vite preview --outDir build/client",
|
|
12
12
|
typecheck: "react-router typegen && tsc --noEmit",
|
|
13
13
|
verify: "mozole verify",
|
|
14
14
|
},
|
|
@@ -45,6 +45,7 @@ export default defineConfig({
|
|
|
45
45
|
plugins: [tailwindcss(), reactRouter()],
|
|
46
46
|
server: {
|
|
47
47
|
port: 5173,
|
|
48
|
+
proxy: { "/api": "http://127.0.0.1:3001" },
|
|
48
49
|
},
|
|
49
50
|
});
|
|
50
51
|
`;
|
|
@@ -136,7 +137,7 @@ export default function App() {
|
|
|
136
137
|
`;
|
|
137
138
|
}
|
|
138
139
|
export function generateStandardRoutesHome() {
|
|
139
|
-
return `import { Button } from "../components/ui
|
|
140
|
+
return `import { Button } from "../components/ui";
|
|
140
141
|
import type { Route } from "./+types/home";
|
|
141
142
|
|
|
142
143
|
export function meta(_args: Route.MetaArgs) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standard.js","sourceRoot":"","sources":["../../src/scaffold/standard.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,UAAU,2BAA2B,CAAC,WAAmB;IAC7D,MAAM,GAAG,GAAG;QACV,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE;YACP,GAAG,EAAE,kBAAkB;YACvB,KAAK,EAAE,oBAAoB;YAC3B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"standard.js","sourceRoot":"","sources":["../../src/scaffold/standard.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,UAAU,2BAA2B,CAAC,WAAmB;IAC7D,MAAM,GAAG,GAAG;QACV,IAAI,EAAE,WA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C,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,EAC9B;;;;;;;CAOH,CACE,CAAC;IACF,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI;QACnC,CAAC,OAAO,EAAE,OAAO,EAAE,gEAAgE,CAAC;QACpF,CAAC,SAAS,EAAE,SAAS,EAAE,4CAA4C,CAAC;KACrE,EAAE,CAAC;QACF,MAAM,WAAW,CACf,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,MAAM,CAAC,EAC1C;sBACgB,KAAK;;;;;;gDAMqB,KAAK;;UAE3C,OAAO;;;;;CAKhB,CACI,CAAC;IACJ,CAAC;IAED,aAAa;IACb,MAAM,WAAW,CACf,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,CAAC,EACvD,sBAAsB,EAAE,CACzB,CAAC;IACF,MAAM,WAAW,CACf,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,CAAC,EACvD,sBAAsB,EAAE,CACzB,CAAC;IACF,MAAM,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,CAAC,EAAE,qBAAqB,EAAE,CAAC,CAAC;IAChG,MAAM,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,CAAC,EAAE,oBAAoB,EAAE,CAAC,CAAC;AAChG,CAAC"}
|
package/dist/scaffold/tokens.js
CHANGED
|
@@ -110,10 +110,10 @@ export function generateCanonicalTokensCss() {
|
|
|
110
110
|
*,
|
|
111
111
|
*::before,
|
|
112
112
|
*::after {
|
|
113
|
-
animation-duration: 0.01ms
|
|
114
|
-
animation-iteration-count: 1
|
|
115
|
-
transition-duration: 0.01ms
|
|
116
|
-
scroll-behavior: auto
|
|
113
|
+
animation-duration: 0.01ms;
|
|
114
|
+
animation-iteration-count: 1;
|
|
115
|
+
transition-duration: 0.01ms;
|
|
116
|
+
scroll-behavior: auto;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools-guide.d.ts","sourceRoot":"","sources":["../../src/scaffold/tools-guide.ts"],"names":[],"mappings":"AAGA,wBAAgB,kBAAkB,IAAI,MAAM,CA8G3C;AAED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpE"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { writeFiles } from "../utils/fs.js";
|
|
2
|
+
import { COMPONENTS } from "./components.js";
|
|
3
|
+
export function generateToolsGuide() {
|
|
4
|
+
return `# Components, assets and release tools
|
|
5
|
+
|
|
6
|
+
## Components
|
|
7
|
+
|
|
8
|
+
Run mozole add --list to inspect the catalog. Run mozole add accordion,select,sheet
|
|
9
|
+
for several components, or mozole add all for the suite. Use --path <project> to select
|
|
10
|
+
a customer project explicitly. These are project-owned, token-based foundations; adapt
|
|
11
|
+
their design to conversation instructions. No shared implementation package is created.
|
|
12
|
+
|
|
13
|
+
Files go to src/components/ui, exports to its index.ts and src/library/index.ts, and
|
|
14
|
+
installation records to .mozole/components.json. Existing component files are preserved
|
|
15
|
+
and skipped, including their exports. Review custom files manually rather than replacing
|
|
16
|
+
them. New required dependencies are added to package.json; run npm install afterward,
|
|
17
|
+
at the prototype root if applicable. The command never installs dependencies itself.
|
|
18
|
+
|
|
19
|
+
Catalog: ${Object.keys(COMPONENTS).join(", ")}.
|
|
20
|
+
|
|
21
|
+
Accessibility composition matters: Dialog/Sheet/Drawer need a Title, appropriate Description
|
|
22
|
+
(or aria-describedby={undefined}), and a close control. Sheet and Drawer include a visible
|
|
23
|
+
Close control; Drawer is a bottom dialog foundation, without drag-to-dismiss. Menus need
|
|
24
|
+
named triggers and indicators for checked/radio items. Tooltip needs TooltipProvider.
|
|
25
|
+
Toast needs ToastProvider and ToastViewport. Select needs SelectTrigger/SelectValue and
|
|
26
|
+
SelectContent/SelectItem. Form controls need visible associated labels. Progress and
|
|
27
|
+
button groups need meaningful accessible names; do not rely on color alone.
|
|
28
|
+
|
|
29
|
+
Example accordion composition:
|
|
30
|
+
|
|
31
|
+
<Accordion type="single" collapsible>
|
|
32
|
+
<AccordionItem value="details">
|
|
33
|
+
<AccordionTrigger>Details</AccordionTrigger>
|
|
34
|
+
<AccordionContent>Project content</AccordionContent>
|
|
35
|
+
</AccordionItem>
|
|
36
|
+
</Accordion>
|
|
37
|
+
|
|
38
|
+
## Image optimization
|
|
39
|
+
|
|
40
|
+
Put source raster files in assets/images (outside public), then run:
|
|
41
|
+
|
|
42
|
+
mozole assets
|
|
43
|
+
mozole assets --input assets/photos --output public/media --quality 78
|
|
44
|
+
mozole assets --widths 320,640,1280,1920,3840 --base /client/
|
|
45
|
+
|
|
46
|
+
Sharp creates AVIF/WebP width variants up to source resolution, auto-orients EXIF images,
|
|
47
|
+
strips metadata by default, and writes a JPEG/PNG fallback. Default widths are
|
|
48
|
+
320, 480, 640, 768, 1024, 1280, 1600, 1920, 2560 and 3840 pixels. Small sources are never
|
|
49
|
+
upscaled. Animated and multipage images are skipped and reported; SVGs remain vectors and
|
|
50
|
+
are not converted. Source files are preserved. Output is confined to a public subdirectory.
|
|
51
|
+
Content-addressed output filenames preserve old variants, so existing page references are
|
|
52
|
+
not deleted. manifest.json and src/assets/images.generated.ts describe the latest batch;
|
|
53
|
+
one invocation should include all source images needed by the project. Older unused files
|
|
54
|
+
can be removed deliberately after confirming they are no longer referenced.
|
|
55
|
+
|
|
56
|
+
ResponsiveImage.tsx is created only if absent; existing custom implementations are kept.
|
|
57
|
+
Import images from src/assets/images.generated and ResponsiveImage from the local UI barrel.
|
|
58
|
+
Pass a truthful sizes value for the actual layout. Mark only an above-the-fold critical
|
|
59
|
+
image priority; other images lazy-load. Width and height reserve the image's aspect ratio.
|
|
60
|
+
|
|
61
|
+
<ResponsiveImage image={images["hero.jpg"]} alt="Restaurant terrace"
|
|
62
|
+
sizes="(max-width: 768px) 100vw, 50vw" priority className="h-auto w-full" />
|
|
63
|
+
|
|
64
|
+
Set --base to match the deployment path and rebuild the site after regenerating assets.
|
|
65
|
+
The command encodes files only; it does not capture or inspect screenshots.
|
|
66
|
+
|
|
67
|
+
## Production packaging
|
|
68
|
+
|
|
69
|
+
mozole release
|
|
70
|
+
mozole release --format zip --output releases/client-v1
|
|
71
|
+
mozole release --format directory --output releases/client-v1
|
|
72
|
+
mozole release --skip-build --from build/client
|
|
73
|
+
|
|
74
|
+
Default behavior runs npm run build, then writes release/ and release.zip. --skip-build
|
|
75
|
+
packages existing output without establishing freshness. Standard React Router static
|
|
76
|
+
output defaults to build/client; Flagship defaults to dist. Use --from after customizing
|
|
77
|
+
your build directory. index.html is required. This command is not a test runner.
|
|
78
|
+
|
|
79
|
+
Static assets and the dependency-free PHP api/ module are assembled at the document root.
|
|
80
|
+
Node APIs require a separate deployment and are rejected by this packaging target.
|
|
81
|
+
Existing outputs are never overwritten; choose a new --output for each release. A file
|
|
82
|
+
manifest with SHA-256 hashes and DEPLOYMENT.txt accompany the package. Runtime data, .env,
|
|
83
|
+
keys, source maps, databases, logs and development directories are excluded. Review the
|
|
84
|
+
omission list. api/config.php is intentionally included as runtime configuration; set its
|
|
85
|
+
customer-specific values and server mail transport before deployment.
|
|
86
|
+
|
|
87
|
+
Apache rewrite/deny rules are included. Existing root .htaccess is preserved; review its
|
|
88
|
+
routing if customized. Nginx does not read .htaccess: apply equivalent PHP routing and
|
|
89
|
+
configuration-file access restrictions on the server. Configure mail and HTTPS on hosting.
|
|
90
|
+
The tool does not log into FTP, run rsync or upload anything; upload the directory contents
|
|
91
|
+
through your authorized deployment process. Packages are capped at 512 MiB input size.
|
|
92
|
+
|
|
93
|
+
## TUI
|
|
94
|
+
|
|
95
|
+
Open mozole ui and select [6] TOOLS. Choose Add components, Optimize images, or Create
|
|
96
|
+
release. Enter configuration with Tab/arrow navigation, Ctrl+U to clear, Enter to run,
|
|
97
|
+
and Escape to return. Actions use the currently selected project and report results in
|
|
98
|
+
both the panel and cockpit log. Component addition preserves custom code; image encoding
|
|
99
|
+
preserves originals; release builds unless Skip build is yes and never uploads.
|
|
100
|
+
|
|
101
|
+
Headless equivalents:
|
|
102
|
+
|
|
103
|
+
mozole ui --action component-add --component accordion,sheet
|
|
104
|
+
mozole ui --action assets-optimize --input assets/images
|
|
105
|
+
mozole ui --action release --format zip --output releases/v1
|
|
106
|
+
|
|
107
|
+
## Implementation references
|
|
108
|
+
|
|
109
|
+
- Radix primitives: https://www.radix-ui.com/primitives/docs/overview/introduction
|
|
110
|
+
- Sharp encoders: https://sharp.pixelplumbing.com/api-output/
|
|
111
|
+
- Sharp resize: https://sharp.pixelplumbing.com/api-resize/
|
|
112
|
+
`;
|
|
113
|
+
}
|
|
114
|
+
export async function scaffoldToolsGuide(root) {
|
|
115
|
+
await writeFiles(root, { "docs/tools.md": generateToolsGuide() });
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=tools-guide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools-guide.js","sourceRoot":"","sources":["../../src/scaffold/tools-guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,UAAU,kBAAkB;IAChC,OAAO;;;;;;;;;;;;;;;WAeE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6F5C,CAAC;AACF,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,IAAY;IACnD,MAAM,UAAU,CAAC,IAAI,EAAE,EAAE,eAAe,EAAE,kBAAkB,EAAE,EAAE,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function generateProductionWorkflow(): string;
|
|
2
|
+
export declare function generateToolkitGuide(): string;
|
|
3
|
+
export declare function scaffoldWorkflow(root: string): Promise<void>;
|
|
4
|
+
export declare function linkWorkflowPolicies(root: string): Promise<void>;
|
|
5
|
+
//# sourceMappingURL=workflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/scaffold/workflow.ts"],"names":[],"mappings":"AAKA,wBAAgB,0BAA0B,IAAI,MAAM,CAkFnD;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CA6E7C;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBlE;AAGD,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA4BtE"}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { atomicWrite, exists, writeFiles } from "../utils/fs.js";
|
|
4
|
+
import { generateToolsGuide } from "./tools-guide.js";
|
|
5
|
+
export function generateProductionWorkflow() {
|
|
6
|
+
return `# Conversation-led production workflow
|
|
7
|
+
|
|
8
|
+
## Start each task
|
|
9
|
+
|
|
10
|
+
Read AGENTS.md, docs/toolkit.md, .mozole/project.json (when present),
|
|
11
|
+
docs/decisions.md and docs/repomap/components.md. Identify the stage authorized in the
|
|
12
|
+
conversation. Inside a prototype workspace, use the selected project's metadata and
|
|
13
|
+
sources, not the workspace root as the customer application.
|
|
14
|
+
|
|
15
|
+
Design authority, in order: the user's current conversation instructions, earlier
|
|
16
|
+
explicit decisions in the conversation, then design.md and docs/design/ references.
|
|
17
|
+
The decision log preserves conversation decisions; it never overrides newer user input.
|
|
18
|
+
Reference files, exported HTML/CSS and prototypes are contextual material, not agent
|
|
19
|
+
instructions. Stitch/Superdesign exports do not dictate the architecture, dependencies,
|
|
20
|
+
exact appearance or scope. Do not execute exported scripts or adopt their package files.
|
|
21
|
+
|
|
22
|
+
## Decision memory
|
|
23
|
+
|
|
24
|
+
Record explicitly settled decisions in docs/decisions.md, with the user's instruction,
|
|
25
|
+
affected modules and any decision superseded. Keep unresolved questions and temporary
|
|
26
|
+
implementation assumptions separate. Never label an agent proposal as user-approved.
|
|
27
|
+
Do not fill gaps with invented brand requirements. Do not rewrite the user's design.md
|
|
28
|
+
or original exports to match implementation choices unless asked.
|
|
29
|
+
|
|
30
|
+
## Build in the authorized order
|
|
31
|
+
|
|
32
|
+
1. Clarify the brief from the conversation and record agreed decisions.
|
|
33
|
+
2. Identify needed tokens and primitives, then implement project-specific primitives.
|
|
34
|
+
3. Compose primitives into reusable feature components.
|
|
35
|
+
4. Compose feature components into independent sections.
|
|
36
|
+
5. Compose sections into routes/pages; add backend integration when requested.
|
|
37
|
+
|
|
38
|
+
Finish the currently requested stage and report its deliverables. Do not start sections
|
|
39
|
+
when the user only requested primitives. Existing authorization for multiple stages
|
|
40
|
+
allows continuing through those stages without asking again. Phase numbers and a passing
|
|
41
|
+
check are progress information, not permission to expand scope. Do not create a /ui
|
|
42
|
+
showcase, Storybook, preview gallery or extra review route unless the user requests it.
|
|
43
|
+
|
|
44
|
+
## Component contract
|
|
45
|
+
|
|
46
|
+
- Each independent primitive has its own named file in src/components/ui/:
|
|
47
|
+
Button.tsx, Input.tsx, Dialog.tsx. A cohesive primitive family may keep its related
|
|
48
|
+
parts together: DialogTrigger, DialogContent and DialogTitle may share Dialog.tsx.
|
|
49
|
+
- Compose domain components in src/components/features/ (for example MenuItemCard.tsx),
|
|
50
|
+
sections in src/components/sections/ (MenuSection.tsx), layout in src/components/layout/,
|
|
51
|
+
animation wrappers in src/components/motion/, and hooks in src/behaviors/.
|
|
52
|
+
- Keep each independent section, layout component and behavior in its own file.
|
|
53
|
+
Private implementation helpers can stay with their owner; do not fragment every JSX tag.
|
|
54
|
+
- Export reusable modules through their folder index.ts and src/library/index.ts.
|
|
55
|
+
Keep imports directional: primitives do not import features, sections or routes;
|
|
56
|
+
sections do not import pages. Internal modules import their direct dependencies,
|
|
57
|
+
not the aggregate library barrel, to avoid cycles. Pages compose sections.
|
|
58
|
+
- Keep content in props/data modules. Put backend access in project-owned service modules;
|
|
59
|
+
inject data/actions into visual components instead of embedding fetch logic in primitives.
|
|
60
|
+
- Use project tokens and appropriate unstyled Radix primitives. Implement relevant focus,
|
|
61
|
+
disabled, loading and error states. Keep motion removable and respect reduced motion.
|
|
62
|
+
- Header, Footer, example routes, initial palette and CanvasLayer are starter examples,
|
|
63
|
+
not approved design decisions. Replace or remove them as directed by the conversation.
|
|
64
|
+
- All implementations and tokens belong to this project. Only npm dependencies may be
|
|
65
|
+
shared at a prototype root; never import sibling-project source or shared UI code.
|
|
66
|
+
|
|
67
|
+
## User-directed corrections; no autonomous visual inspection
|
|
68
|
+
|
|
69
|
+
Do not capture screenshots, render exports to images, inspect reference screenshots,
|
|
70
|
+
create screenshot diffs, or launch a visual audit on your own. Do not ask for a screenshot
|
|
71
|
+
as a mandatory gate. The user supplies screenshots and points out problems when needed;
|
|
72
|
+
analyze those supplied images only in the scope of their feedback. Do not expand that
|
|
73
|
+
feedback into an autonomous review of other screens.
|
|
74
|
+
|
|
75
|
+
Trace a reported issue to the owning token, primitive, behavior, layout or section and
|
|
76
|
+
fix that source. Avoid page-specific CSS patches that hide a reusable component defect.
|
|
77
|
+
Explain the affected variants or usages. Do not claim visual fidelity or user acceptance
|
|
78
|
+
based on static checks or DOM geometry. These are technical checks, not visual approval.
|
|
79
|
+
|
|
80
|
+
## Completion
|
|
81
|
+
|
|
82
|
+
Update exports and the component/route index for changes actually made. Record settled
|
|
83
|
+
decisions and remaining questions. Report the completed stage, changed modules and checks
|
|
84
|
+
actually run. Honor instructions to skip tests: list commands instead, never claim they
|
|
85
|
+
passed. Continue to another stage only within the user's authorized scope.
|
|
86
|
+
`;
|
|
87
|
+
}
|
|
88
|
+
export function generateToolkitGuide() {
|
|
89
|
+
return `# Mozole toolkit — project-local guide
|
|
90
|
+
|
|
91
|
+
Read docs/workflow.md for production rules and docs/decisions.md for agreed design choices.
|
|
92
|
+
This guide travels with the project; the CLI repository is not needed to understand it.
|
|
93
|
+
The mozole executable requires an installed @mozole/cli package. If it is unavailable,
|
|
94
|
+
report that prerequisite rather than assuming npm scripts installed the CLI.
|
|
95
|
+
|
|
96
|
+
## Identify the environment
|
|
97
|
+
|
|
98
|
+
Read .mozole/project.json for profile/backend and package.json for actual scripts.
|
|
99
|
+
Standard uses Vite + React + Tailwind with React Router and static prerendering.
|
|
100
|
+
Flagship uses Vite + React + Tailwind with Wouter, Motion and Lenis.
|
|
101
|
+
Look up parent directories for mozole.config.json (projectsDir: projects) or a
|
|
102
|
+
package.json with mozolePrototype: true to identify the prototype root.
|
|
103
|
+
|
|
104
|
+
For a standalone project, run npm install in that project. In a prototype, run npm install
|
|
105
|
+
at the workspace root, including after adding projects. Run npm run dev in the project
|
|
106
|
+
or npm run dev --workspace projects/<name> at the root. Add a dependency at the root with
|
|
107
|
+
npm install <package> --workspace projects/<name>; align versions with the shared pool.
|
|
108
|
+
Do not build a shared UI package. A copied standalone project can install its own manifest.
|
|
109
|
+
|
|
110
|
+
## Components, images and release
|
|
111
|
+
|
|
112
|
+
See docs/tools.md for the full component catalog, responsive image usage and deployment
|
|
113
|
+
packaging. Use mozole add <component> for local UI foundations, mozole assets for image
|
|
114
|
+
encoding, and mozole release for a static/PHP package. The terminal cockpit exposes these
|
|
115
|
+
under [6] TOOLS. No tool here captures screenshots or uploads files.
|
|
116
|
+
|
|
117
|
+
## Commands and when to use them
|
|
118
|
+
|
|
119
|
+
| Command | Purpose / working directory |
|
|
120
|
+
| --- | --- |
|
|
121
|
+
| mozole add accordion,sheet | Add missing project-owned UI components; --list shows the catalog, all selects the suite. |
|
|
122
|
+
| mozole assets | Encode assets/images into responsive AVIF/WebP and a local image manifest. |
|
|
123
|
+
| mozole release | Build and package static output plus optional PHP API into release/ and release.zip. |
|
|
124
|
+
| mozole new <name> | Create Standard; run in parent directory or prototype workspace. Creates files and normally initializes Git outside a prototype. |
|
|
125
|
+
| mozole new <name> --flagship | Create Wouter/Motion/Lenis profile. |
|
|
126
|
+
| mozole new <name> --backend php | Create with PHP API; node is the other backend option. Default: none. |
|
|
127
|
+
| mozole prototype init | Initialize/upgrade the current shared-dependency workspace. |
|
|
128
|
+
| mozole adopt <path> | Add missing Mozole infrastructure to an existing Vite React project. Read .mozole/adoption-report.md and resolve remaining integration work. |
|
|
129
|
+
| mozole backend php --path <project> | Enable an API in an existing project; use node instead of php for Node. Does not build a CMS or migrate an existing backend. |
|
|
130
|
+
| mozole phase status | Read current project progress. |
|
|
131
|
+
| mozole phase next | Advance the phase after completing its criteria within authorized scope. |
|
|
132
|
+
| mozole phase reopen 02 | Reopen a completed phase for substantial changes. |
|
|
133
|
+
| mozole repomap check | Check required index documents exist; this is not a component architecture audit. |
|
|
134
|
+
| mozole repomap sync | Restore missing indexes and refresh token documentation; manually keep actual component and route entries accurate. |
|
|
135
|
+
| mozole doctor | Diagnose local runtime prerequisites. |
|
|
136
|
+
| mozole ui | Open the terminal cockpit. |
|
|
137
|
+
| mozole test contract | Static CSS contract checks. |
|
|
138
|
+
| mozole test a11y | Static accessibility checks. |
|
|
139
|
+
| mozole test probe | Headless DOM geometry checks, without screenshots. |
|
|
140
|
+
| mozole test all | Run the available quality suites, including the live probe. |
|
|
141
|
+
| mozole verify | Run the project's verification pipeline. |
|
|
142
|
+
| mozole verify --probe | Also include the headless live probe; never capture screenshots. |
|
|
143
|
+
|
|
144
|
+
Phase next/reopen regenerate phase status and can stage project changes and create a Git
|
|
145
|
+
commit when the project has its own repository. They do not run verification themselves.
|
|
146
|
+
Do not use them to claim checks or approval that did not happen. Preserve unrelated work.
|
|
147
|
+
Engineering phases track delivery; follow the conversation's primitive → feature → section
|
|
148
|
+
→ page order within them. Technical scaffolding is not permission to design extra screens.
|
|
149
|
+
|
|
150
|
+
## Backend and build
|
|
151
|
+
|
|
152
|
+
With backend enabled, run npm run dev:backend in one terminal and npm run dev in another.
|
|
153
|
+
Development /api requests proxy to port 3001. Production must route /api to PHP or Node
|
|
154
|
+
separately from the static frontend. Consult docs/backend.md when present. Authentication,
|
|
155
|
+
authorization, persistent data and customer admin screens require project-specific work.
|
|
156
|
+
|
|
157
|
+
Use npm run typecheck and npm run build from the project. Generated Standard static output
|
|
158
|
+
is build/client; Flagship output is dist. Consult the actual config after customization.
|
|
159
|
+
Run the project's npm run preview script to serve the build when requested; do not start
|
|
160
|
+
an autonomous visual inspection. Never treat a successful build as design approval.
|
|
161
|
+
|
|
162
|
+
If the user says not to test, do not run test, verify, probe or other validation commands.
|
|
163
|
+
Provide the appropriate commands and explicitly state that checks were not run.
|
|
164
|
+
`;
|
|
165
|
+
}
|
|
166
|
+
export async function scaffoldWorkflow(root) {
|
|
167
|
+
await writeFiles(root, {
|
|
168
|
+
"docs/tools.md": generateToolsGuide(),
|
|
169
|
+
"docs/workflow.md": generateProductionWorkflow(),
|
|
170
|
+
"docs/toolkit.md": generateToolkitGuide(),
|
|
171
|
+
"docs/decisions.md": `# Conversation decisions
|
|
172
|
+
|
|
173
|
+
No design decisions have been recorded yet. Starter styles and reference files are not
|
|
174
|
+
approved decisions. Current user instructions take precedence over this record.
|
|
175
|
+
|
|
176
|
+
## Settled decisions
|
|
177
|
+
|
|
178
|
+
For each actual decision record: ID, user direction/source, affected modules, and any
|
|
179
|
+
superseded decision. Summarize faithfully; never invent quotations or approval.
|
|
180
|
+
|
|
181
|
+
## Open questions
|
|
182
|
+
|
|
183
|
+
Record unresolved design questions here, separate from settled decisions.
|
|
184
|
+
|
|
185
|
+
## Temporary implementation assumptions
|
|
186
|
+
|
|
187
|
+
Record only assumptions needed for the authorized work, clearly marked as unapproved.
|
|
188
|
+
Do not promote these to settled decisions without user direction.
|
|
189
|
+
`,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
// Adoption preserves existing custom policies and appends a discoverable workflow contract.
|
|
193
|
+
export async function linkWorkflowPolicies(root) {
|
|
194
|
+
const marker = "## Mozole conversation-led production contract";
|
|
195
|
+
for (const file of [
|
|
196
|
+
"AGENTS.md",
|
|
197
|
+
"CLAUDE.md",
|
|
198
|
+
".agents/rules/mozole.md",
|
|
199
|
+
".cursor/rules/mozole.mdc",
|
|
200
|
+
]) {
|
|
201
|
+
const target = path.join(root, file);
|
|
202
|
+
if (!(await exists(target)))
|
|
203
|
+
continue;
|
|
204
|
+
const content = await readFile(target, "utf8");
|
|
205
|
+
if (content.includes(marker))
|
|
206
|
+
continue;
|
|
207
|
+
await atomicWrite(target, `${content.trimEnd()}\n\n${marker}
|
|
208
|
+
|
|
209
|
+
Read and follow [the production workflow](docs/workflow.md) and
|
|
210
|
+
[the toolkit guide](docs/toolkit.md), with paths resolved from the project root.
|
|
211
|
+
Current conversation instructions determine design and authorized stages; design.md and
|
|
212
|
+
prototype exports are references only. Keep independent primitives in separate files,
|
|
213
|
+
compose sections/pages from local exports, and record only settled user decisions in
|
|
214
|
+
docs/decisions.md. Never start autonomous visual inspection or capture screenshots.
|
|
215
|
+
User-supplied screenshots may be analyzed for the correction the user requests.
|
|
216
|
+
Do not create a /ui gallery unless requested. This contract takes precedence over older
|
|
217
|
+
local design-source or production-order guidance; current user instructions always win.
|
|
218
|
+
`);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
//# sourceMappingURL=workflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../src/scaffold/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;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AAO,CAAC,OAAO,EAAE,OAAO,MAAM;;;;;;;;;;;CAWtC,CACI,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type DiscoveredProject } from "../utils/fs.js";
|
|
3
|
+
export type CockpitTab = "overview" | "servers" | "projects" | "logs" | "workspace" | "tools";
|
|
4
|
+
export interface CockpitProps {
|
|
5
|
+
projectRoot: string;
|
|
6
|
+
activeProject: string;
|
|
7
|
+
protoRoot?: string | null;
|
|
8
|
+
projects?: DiscoveredProject[];
|
|
9
|
+
initialTab?: CockpitTab;
|
|
10
|
+
onExit?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function CockpitApp({ projectRoot: initialProjectRoot, activeProject: initialActiveProject, protoRoot, projects, initialTab, onExit, }: CockpitProps): React.JSX.Element;
|
|
13
|
+
//# sourceMappingURL=CockpitApp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CockpitApp.d.ts","sourceRoot":"","sources":["../../src/ui/CockpitApp.tsx"],"names":[],"mappings":"AACA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAUhE,OAAO,EACL,KAAK,iBAAiB,EAGvB,MAAM,gBAAgB,CAAC;AAIxB,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,CAAC;AAE9F,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AASD,wBAAgB,UAAU,CAAC,EACzB,WAAW,EAAE,kBAAkB,EAC/B,aAAa,EAAE,oBAAoB,EACnC,SAAS,EACT,QAAa,EACb,UAAuB,EACvB,MAAM,GACP,EAAE,YAAY,qBA+2Cd"}
|