@starcier/create-builder 0.0.0-stage → 1.0.0-next.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/LICENSE +21 -0
- package/README.md +56 -2
- package/dist/api.js +44 -0
- package/dist/args.js +77 -0
- package/dist/auth.js +68 -0
- package/dist/cli.js +23 -0
- package/dist/errors.js +10 -0
- package/dist/main.js +164 -0
- package/dist/prompt.js +23 -0
- package/dist/slug.js +20 -0
- package/dist/template.js +61 -0
- package/package.json +34 -4
- package/template/.claude/skills/design-system/SKILL.md +177 -0
- package/template/.claude/skills/design-system-audit/SKILL.md +125 -0
- package/template/.claude/skills/design-work-review/SKILL.md +93 -0
- package/template/.claude/skills/process-interviewer/SKILL.md +124 -0
- package/template/.claude/skills/process-interviewer/references/plan-output-template.md +53 -0
- package/template/.claude/skills/process-interviewer/references/skill-output-template.md +72 -0
- package/template/.claude/skills/prototype-page-builder/SKILL.md +76 -0
- package/template/.cursor/rules/code-review.mdc +30 -0
- package/template/.cursor/rules/prototype-authoring.mdc +31 -0
- package/template/.cursor/rules/tokens.mdc +36 -0
- package/template/.cursor/rules/ui-system.mdc +39 -0
- package/template/.env.example +19 -0
- package/template/AGENTS.md +77 -0
- package/template/CLAUDE.md +19 -0
- package/template/README.md +65 -0
- package/template/_gitignore +15 -0
- package/template/docs/design-system-log.md +17 -0
- package/template/eslint.config.js +23 -0
- package/template/index.html +13 -0
- package/template/package.json +35 -0
- package/template/public/favicon.svg +1 -0
- package/template/src/App.tsx +65 -0
- package/template/src/app.css +5 -0
- package/template/src/brand.ts +2 -0
- package/template/src/config.ts +15 -0
- package/template/src/design-system/ThemeProvider.tsx +25 -0
- package/template/src/design-system/components/Button/Button.tsx +15 -0
- package/template/src/design-system/components/Button/button.css +62 -0
- package/template/src/design-system/components/Button/index.ts +1 -0
- package/template/src/design-system/components/Card/Card.tsx +22 -0
- package/template/src/design-system/components/Card/card.css +27 -0
- package/template/src/design-system/components/Card/index.ts +1 -0
- package/template/src/design-system/components/Field/Field.tsx +28 -0
- package/template/src/design-system/components/Field/field.css +37 -0
- package/template/src/design-system/components/Field/index.ts +1 -0
- package/template/src/design-system/components/Modal/Modal.tsx +55 -0
- package/template/src/design-system/components/Modal/index.ts +1 -0
- package/template/src/design-system/components/Modal/modal.css +39 -0
- package/template/src/design-system/components/ThemeToggle/ThemeToggle.tsx +13 -0
- package/template/src/design-system/components/ThemeToggle/index.ts +1 -0
- package/template/src/design-system/global.css +26 -0
- package/template/src/design-system/palette.ts +40 -0
- package/template/src/design-system/theme.ts +55 -0
- package/template/src/design-system/tokens.ts +126 -0
- package/template/src/main.tsx +13 -0
- package/template/src/prototypes/getting-started/welcome/README.md +6 -0
- package/template/src/prototypes/getting-started/welcome/Welcome.tsx +74 -0
- package/template/src/prototypes/getting-started/welcome/data.ts +14 -0
- package/template/src/prototypes/getting-started/welcome/index.ts +2 -0
- package/template/src/prototypes/getting-started/welcome/welcome.css +71 -0
- package/template/src/prototypes/getting-started/welcome/workflows.ts +51 -0
- package/template/src/prototypes/registry.ts +20 -0
- package/template/src/prototypes/workflows.ts +9 -0
- package/template/tsconfig.app.json +28 -0
- package/template/tsconfig.json +7 -0
- package/template/tsconfig.node.json +26 -0
- package/template/vercel.json +4 -0
- package/template/vite.config.ts +12 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
.welcome {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: var(--space-2xl);
|
|
5
|
+
max-width: 960px;
|
|
6
|
+
margin: 0 auto;
|
|
7
|
+
padding: var(--space-3xl) var(--space-2xl);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.welcome__header {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
gap: var(--space-2xs);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.welcome__overline {
|
|
17
|
+
color: var(--color-text-accent);
|
|
18
|
+
font-size: var(--text-overline-size);
|
|
19
|
+
font-weight: var(--text-overline-weight);
|
|
20
|
+
line-height: var(--text-overline-line);
|
|
21
|
+
letter-spacing: var(--text-overline-tracking);
|
|
22
|
+
text-transform: var(--text-overline-case);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.welcome__title {
|
|
26
|
+
margin: 0;
|
|
27
|
+
font-size: var(--text-heading-size);
|
|
28
|
+
font-weight: var(--text-heading-weight);
|
|
29
|
+
line-height: var(--text-heading-line);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.welcome__lead {
|
|
33
|
+
margin: 0;
|
|
34
|
+
color: var(--color-text-secondary);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.welcome__stats {
|
|
38
|
+
display: grid;
|
|
39
|
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
40
|
+
gap: var(--space-l);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.welcome__stat-label,
|
|
44
|
+
.welcome__stat-note {
|
|
45
|
+
color: var(--color-text-secondary);
|
|
46
|
+
font-size: var(--text-caption-size);
|
|
47
|
+
line-height: var(--text-caption-line);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.welcome__stat-value {
|
|
51
|
+
font-size: var(--text-heading-size);
|
|
52
|
+
font-weight: var(--text-heading-weight);
|
|
53
|
+
line-height: var(--text-heading-line);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.welcome .ds-card:has(.welcome__stat-value) {
|
|
57
|
+
gap: var(--space-2xs);
|
|
58
|
+
padding: var(--space-l);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.welcome__form {
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
gap: var(--space-l);
|
|
65
|
+
max-width: 360px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.welcome__summary {
|
|
69
|
+
margin: 0;
|
|
70
|
+
color: var(--color-text-secondary);
|
|
71
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { OnboardingWorkflow } from '@starcier/collab-core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A guided tour of the Welcome prototype. Each step targets a `data-tour`
|
|
5
|
+
* anchor in `Welcome.tsx`; `prototypeId` is the prototype's slug.
|
|
6
|
+
*/
|
|
7
|
+
export const welcomeTour: OnboardingWorkflow = {
|
|
8
|
+
id: 'getting-started-welcome-tour',
|
|
9
|
+
prototypeId: 'getting-started/welcome',
|
|
10
|
+
name: 'Welcome walkthrough',
|
|
11
|
+
description: 'A short tour of the example prototype: the summary, the form and its dialog.',
|
|
12
|
+
steps: [
|
|
13
|
+
{
|
|
14
|
+
id: 'header',
|
|
15
|
+
target: '[data-tour="welcome-header"]',
|
|
16
|
+
title: 'An example prototype',
|
|
17
|
+
description: 'Prototypes are ordinary React screens built from this builder’s design system.',
|
|
18
|
+
placement: 'bottom',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: 'stats',
|
|
22
|
+
target: '[data-tour="welcome-stats"]',
|
|
23
|
+
title: 'Mock data',
|
|
24
|
+
description: 'Everything here comes from data.ts in the prototype’s folder. Prototypes never call a backend.',
|
|
25
|
+
placement: 'bottom',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 'form',
|
|
29
|
+
target: '[data-tour="welcome-form"]',
|
|
30
|
+
title: 'A form',
|
|
31
|
+
description: 'We’ll fill it in for you, so the next step can continue.',
|
|
32
|
+
placement: 'top',
|
|
33
|
+
populateInputs: true,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 'review',
|
|
37
|
+
target: '[data-tour="welcome-review"]',
|
|
38
|
+
title: 'Open the dialog',
|
|
39
|
+
description: 'Pressing Next clicks this button for you.',
|
|
40
|
+
placement: 'right',
|
|
41
|
+
initiateAction: true,
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 'modal',
|
|
45
|
+
target: '[data-tour="welcome-modal"]',
|
|
46
|
+
title: 'Dialogs work in tours',
|
|
47
|
+
description: 'Tours can step into dialogs. Review comments go on the page itself, not inside dialogs.',
|
|
48
|
+
placement: 'bottom',
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { BuilderPrototype } from '@starcier/builder-shell';
|
|
2
|
+
import { Welcome } from './getting-started/welcome';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Every prototype this builder ships. The catalogue groups them by folder, and
|
|
6
|
+
* each opens at `/prototypes/<slug>`. The slug is also the prototype's key in
|
|
7
|
+
* the Starcier API, which comments, tours and shares hang off, so do not rename
|
|
8
|
+
* one that has comments.
|
|
9
|
+
*/
|
|
10
|
+
export const prototypes: readonly BuilderPrototype[] = [
|
|
11
|
+
{
|
|
12
|
+
slug: 'getting-started/welcome',
|
|
13
|
+
title: 'Welcome',
|
|
14
|
+
description: 'An example prototype: a small dashboard and a form with a dialog.',
|
|
15
|
+
folder: 'getting-started',
|
|
16
|
+
folderLabel: 'Getting started',
|
|
17
|
+
status: 'Example',
|
|
18
|
+
component: Welcome,
|
|
19
|
+
},
|
|
20
|
+
];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { OnboardingWorkflow } from '@starcier/collab-core';
|
|
2
|
+
import { welcomeTour } from './getting-started/welcome';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The guided tours defined in code. Offline, each is copied into the browser
|
|
6
|
+
* once; to see an edited tour there, give it a new `id`. With the API on, tours
|
|
7
|
+
* live in the database and are created in the builder instead.
|
|
8
|
+
*/
|
|
9
|
+
export const workflows: readonly OnboardingWorkflow[] = [welcomeTour];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"useDefineForClassFields": true,
|
|
6
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
+
"module": "ESNext",
|
|
8
|
+
"types": ["vite/client"],
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
|
|
11
|
+
/* Bundler mode */
|
|
12
|
+
"moduleResolution": "bundler",
|
|
13
|
+
"allowImportingTsExtensions": true,
|
|
14
|
+
"verbatimModuleSyntax": true,
|
|
15
|
+
"moduleDetection": "force",
|
|
16
|
+
"noEmit": true,
|
|
17
|
+
"jsx": "react-jsx",
|
|
18
|
+
|
|
19
|
+
/* Linting */
|
|
20
|
+
"strict": true,
|
|
21
|
+
"noUnusedLocals": true,
|
|
22
|
+
"noUnusedParameters": true,
|
|
23
|
+
"noFallthroughCasesInSwitch": true,
|
|
24
|
+
"erasableSyntaxOnly": true,
|
|
25
|
+
"noUncheckedSideEffectImports": true
|
|
26
|
+
},
|
|
27
|
+
"include": ["src"]
|
|
28
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
4
|
+
"target": "ES2023",
|
|
5
|
+
"lib": ["ES2023"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"types": ["node"],
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
|
|
10
|
+
/* Bundler mode */
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"allowImportingTsExtensions": true,
|
|
13
|
+
"verbatimModuleSyntax": true,
|
|
14
|
+
"moduleDetection": "force",
|
|
15
|
+
"noEmit": true,
|
|
16
|
+
|
|
17
|
+
/* Linting */
|
|
18
|
+
"strict": true,
|
|
19
|
+
"noUnusedLocals": true,
|
|
20
|
+
"noUnusedParameters": true,
|
|
21
|
+
"noFallthroughCasesInSwitch": true,
|
|
22
|
+
"erasableSyntaxOnly": true,
|
|
23
|
+
"noUncheckedSideEffectImports": true
|
|
24
|
+
},
|
|
25
|
+
"include": ["vite.config.ts"]
|
|
26
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import react from '@vitejs/plugin-react';
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
plugins: [react()],
|
|
6
|
+
server: {
|
|
7
|
+
// The Starcier API allows this origin for local development, and the Auth0
|
|
8
|
+
// application lists it as a callback. Another port would be refused by both.
|
|
9
|
+
port: 5173,
|
|
10
|
+
strictPort: true,
|
|
11
|
+
},
|
|
12
|
+
});
|