@forumone/create-throughline 0.2.1 → 0.3.1
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/CHANGELOG.md +21 -0
- package/dist/generator.d.ts +2 -0
- package/dist/generator.d.ts.map +1 -1
- package/dist/generator.js +23 -4
- package/dist/generator.js.map +1 -1
- package/dist/post-install.js +1 -1
- package/dist/post-install.js.map +1 -1
- package/dist/templates/base/README.md +8 -9
- package/dist/templates/base/apps/web/package.json.template +11 -10
- package/dist/templates/base/apps/web/src/app/api/inngest/route.ts.template +33 -4
- package/dist/templates/base/apps/web/src/payload.config.ts.template +21 -6
- package/dist/templates/base/apps/web/tsconfig.json +2 -1
- package/dist/templates/base/gitignore +15 -0
- package/dist/templates/base/package.json.template +4 -1
- package/dist/templates/base/pnpm-workspace.yaml +1 -0
- package/dist/templates/base/turbo.json +11 -0
- package/dist/templates/with-reference-ds/design-system/.storybook/main.ts +21 -0
- package/dist/templates/with-reference-ds/design-system/.storybook/preview.ts +19 -0
- package/dist/templates/with-reference-ds/design-system/README.md +33 -0
- package/dist/templates/with-reference-ds/design-system/gitignore +5 -0
- package/dist/templates/with-reference-ds/design-system/package.json.template +62 -0
- package/dist/templates/with-reference-ds/design-system/scripts/build-manifest.ts +89 -0
- package/dist/templates/with-reference-ds/design-system/scripts/build-styles.ts +28 -0
- package/dist/templates/with-reference-ds/design-system/scripts/build-tokens-css.ts +43 -0
- package/dist/templates/with-reference-ds/design-system/scripts/validate.ts +58 -0
- package/dist/templates/with-reference-ds/design-system/src/components/CTASection/CTASection.contract.ts +128 -0
- package/dist/templates/with-reference-ds/design-system/src/components/CTASection/CTASection.module.css +83 -0
- package/dist/templates/with-reference-ds/design-system/src/components/CTASection/CTASection.stories.tsx +39 -0
- package/dist/templates/with-reference-ds/design-system/src/components/CTASection/CTASection.test.tsx +27 -0
- package/dist/templates/with-reference-ds/design-system/src/components/CTASection/CTASection.tsx +41 -0
- package/dist/templates/with-reference-ds/design-system/src/components/CTASection/index.ts +2 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Card/Card.contract.ts +122 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Card/Card.module.css +64 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Card/Card.stories.tsx +45 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Card/Card.test.tsx +37 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Card/Card.tsx +39 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Card/index.ts +2 -0
- package/dist/templates/with-reference-ds/design-system/src/components/CardGrid/CardGrid.contract.ts +78 -0
- package/dist/templates/with-reference-ds/design-system/src/components/CardGrid/CardGrid.module.css +34 -0
- package/dist/templates/with-reference-ds/design-system/src/components/CardGrid/CardGrid.stories.tsx +36 -0
- package/dist/templates/with-reference-ds/design-system/src/components/CardGrid/CardGrid.test.tsx +25 -0
- package/dist/templates/with-reference-ds/design-system/src/components/CardGrid/CardGrid.tsx +19 -0
- package/dist/templates/with-reference-ds/design-system/src/components/CardGrid/index.ts +2 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Divider/Divider.contract.ts +87 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Divider/Divider.module.css +18 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Divider/Divider.stories.tsx +35 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Divider/Divider.test.tsx +20 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Divider/Divider.tsx +17 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Divider/index.ts +2 -0
- package/dist/templates/with-reference-ds/design-system/src/components/FAQ/FAQ.contract.ts +104 -0
- package/dist/templates/with-reference-ds/design-system/src/components/FAQ/FAQ.module.css +66 -0
- package/dist/templates/with-reference-ds/design-system/src/components/FAQ/FAQ.stories.tsx +61 -0
- package/dist/templates/with-reference-ds/design-system/src/components/FAQ/FAQ.test.tsx +30 -0
- package/dist/templates/with-reference-ds/design-system/src/components/FAQ/FAQ.tsx +41 -0
- package/dist/templates/with-reference-ds/design-system/src/components/FAQ/index.ts +2 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Hero/Hero.contract.ts +182 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Hero/Hero.module.css +124 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Hero/Hero.stories.tsx +58 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Hero/Hero.test.tsx +49 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Hero/Hero.tsx +67 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Hero/index.ts +2 -0
- package/dist/templates/with-reference-ds/design-system/src/components/MediaBlock/MediaBlock.contract.ts +94 -0
- package/dist/templates/with-reference-ds/design-system/src/components/MediaBlock/MediaBlock.module.css +49 -0
- package/dist/templates/with-reference-ds/design-system/src/components/MediaBlock/MediaBlock.stories.tsx +37 -0
- package/dist/templates/with-reference-ds/design-system/src/components/MediaBlock/MediaBlock.test.tsx +35 -0
- package/dist/templates/with-reference-ds/design-system/src/components/MediaBlock/MediaBlock.tsx +49 -0
- package/dist/templates/with-reference-ds/design-system/src/components/MediaBlock/index.ts +7 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Prose/Prose.contract.ts +107 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Prose/Prose.module.css +72 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Prose/Prose.stories.tsx +39 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Prose/Prose.test.tsx +26 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Prose/Prose.tsx +15 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Prose/index.ts +2 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Quote/Quote.contract.ts +101 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Quote/Quote.module.css +59 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Quote/Quote.stories.tsx +44 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Quote/Quote.test.tsx +37 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Quote/Quote.tsx +40 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Quote/index.ts +2 -0
- package/dist/templates/with-reference-ds/design-system/src/components/SectionIntro/SectionIntro.contract.ts +108 -0
- package/dist/templates/with-reference-ds/design-system/src/components/SectionIntro/SectionIntro.module.css +36 -0
- package/dist/templates/with-reference-ds/design-system/src/components/SectionIntro/SectionIntro.stories.tsx +33 -0
- package/dist/templates/with-reference-ds/design-system/src/components/SectionIntro/SectionIntro.test.tsx +28 -0
- package/dist/templates/with-reference-ds/design-system/src/components/SectionIntro/SectionIntro.tsx +28 -0
- package/dist/templates/with-reference-ds/design-system/src/components/SectionIntro/index.ts +2 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Spacer/Spacer.contract.ts +76 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Spacer/Spacer.module.css +23 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Spacer/Spacer.stories.tsx +25 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Spacer/Spacer.test.tsx +17 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Spacer/Spacer.tsx +19 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Spacer/index.ts +2 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Stats/Stats.contract.ts +103 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Stats/Stats.module.css +88 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Stats/Stats.stories.tsx +44 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Stats/Stats.test.tsx +44 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Stats/Stats.tsx +39 -0
- package/dist/templates/with-reference-ds/design-system/src/components/Stats/index.ts +2 -0
- package/dist/templates/with-reference-ds/design-system/src/css-modules.d.ts +5 -0
- package/dist/templates/with-reference-ds/design-system/src/foundations/Colors.stories.tsx +46 -0
- package/dist/templates/with-reference-ds/design-system/src/foundations/Elevation.stories.tsx +37 -0
- package/dist/templates/with-reference-ds/design-system/src/foundations/LayoutContainers.stories.tsx +86 -0
- package/dist/templates/with-reference-ds/design-system/src/foundations/Radii.stories.tsx +38 -0
- package/dist/templates/with-reference-ds/design-system/src/foundations/Spacing.stories.tsx +33 -0
- package/dist/templates/with-reference-ds/design-system/src/foundations/Typography.stories.tsx +55 -0
- package/dist/templates/with-reference-ds/design-system/src/foundations/_helpers.tsx +82 -0
- package/dist/templates/with-reference-ds/design-system/src/index.ts +14 -0
- package/dist/templates/with-reference-ds/design-system/src/styles/base.css +55 -0
- package/dist/templates/with-reference-ds/design-system/src/styles/reset.css +48 -0
- package/dist/templates/with-reference-ds/design-system/src/styles/tokens.css +116 -0
- package/dist/templates/with-reference-ds/design-system/src/tokens/colors.ts +54 -0
- package/dist/templates/with-reference-ds/design-system/src/tokens/index.ts +32 -0
- package/dist/templates/with-reference-ds/design-system/src/tokens/layout.ts +26 -0
- package/dist/templates/with-reference-ds/design-system/src/tokens/radii.ts +11 -0
- package/dist/templates/with-reference-ds/design-system/src/tokens/spacing.ts +26 -0
- package/dist/templates/with-reference-ds/design-system/src/tokens/typography.ts +32 -0
- package/dist/templates/with-reference-ds/design-system/tsconfig.json +24 -0
- package/dist/templates/with-reference-ds/design-system/vitest.config.ts +15 -0
- package/dist/templates/with-reference-ds/design-system/vitest.setup.ts +7 -0
- package/dist/templates/without-reference-ds/design-system/.storybook/main.ts +21 -0
- package/dist/templates/without-reference-ds/design-system/.storybook/preview.ts +16 -0
- package/dist/templates/without-reference-ds/design-system/README.md +20 -0
- package/dist/templates/without-reference-ds/design-system/gitignore +5 -0
- package/dist/templates/without-reference-ds/design-system/package.json.template +33 -0
- package/dist/templates/without-reference-ds/design-system/src/foundations/Welcome.stories.tsx +24 -0
- package/dist/templates/without-reference-ds/design-system/src/index.ts +9 -0
- package/dist/templates/without-reference-ds/design-system/tsconfig.json +11 -0
- package/dist/utils/versions.d.ts +20 -0
- package/dist/utils/versions.d.ts.map +1 -0
- package/dist/utils/versions.js +59 -0
- package/dist/utils/versions.js.map +1 -0
- package/dist/versions.json +14 -0
- package/package.json +7 -5
- package/dist/templates/with-reference-ds/packages/design-system/package.json.template +0 -18
- package/dist/templates/with-reference-ds/packages/design-system/src/index.ts +0 -6
- package/dist/templates/with-reference-ds/packages/design-system/src/manifest.ts +0 -6
- package/dist/templates/with-reference-ds/packages/design-system/tsconfig.json +0 -9
- package/dist/templates/without-reference-ds/packages/design-system/README.md +0 -19
- package/dist/templates/without-reference-ds/packages/design-system/package.json.template +0 -14
- package/dist/templates/without-reference-ds/packages/design-system/src/index.ts +0 -8
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
|
|
3
|
+
const meta: Meta = {
|
|
4
|
+
title: 'Foundations/Welcome',
|
|
5
|
+
}
|
|
6
|
+
export default meta
|
|
7
|
+
|
|
8
|
+
export const Welcome: StoryObj = {
|
|
9
|
+
render: () => (
|
|
10
|
+
<div style={{ fontFamily: 'system-ui, sans-serif', padding: '2rem', maxWidth: '40rem', lineHeight: 1.6 }}>
|
|
11
|
+
<h1>Your design system</h1>
|
|
12
|
+
<p>
|
|
13
|
+
This is an empty Storybook authoring environment. Add components under{' '}
|
|
14
|
+
<code>src/components/</code> with a <code>.stories.tsx</code> story and a{' '}
|
|
15
|
+
<code>.contract.ts</code> contract, and document your tokens in{' '}
|
|
16
|
+
<code>src/foundations/</code> (Colors, Typography, Spacing, Radii, Layout & Containers).
|
|
17
|
+
</p>
|
|
18
|
+
<p>
|
|
19
|
+
Tip: <code>pnpm create @forumone/throughline</code> with the reference design system gives
|
|
20
|
+
you 12 worked examples to start from.
|
|
21
|
+
</p>
|
|
22
|
+
</div>
|
|
23
|
+
),
|
|
24
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Your design system's public surface. Export your components from here as you
|
|
2
|
+
// build them under `./components/`, then write a contract (`.contract.ts`) and
|
|
3
|
+
// a Storybook story (`.stories.tsx`) for each so the Components MCP server can
|
|
4
|
+
// reason about them.
|
|
5
|
+
//
|
|
6
|
+
// The web app's Components MCP server reads a manifest. Point it at your
|
|
7
|
+
// manifest in `apps/web/src/payload.config.ts` (`componentsPlugin({ manifest })`)
|
|
8
|
+
// once you generate one.
|
|
9
|
+
export {}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
5
|
+
"jsx": "react-jsx",
|
|
6
|
+
"noEmit": true,
|
|
7
|
+
"resolveJsonModule": true
|
|
8
|
+
},
|
|
9
|
+
"include": ["src/**/*"],
|
|
10
|
+
"exclude": ["dist", "storybook-static", "node_modules"]
|
|
11
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The version of every Throughline package the scaffold depends on, keyed for
|
|
3
|
+
* the template renderer: `@forumone/throughline-design-contract` becomes
|
|
4
|
+
* `version_design_contract`, rendered as `"^{{version_design_contract}}"`.
|
|
5
|
+
*
|
|
6
|
+
* The ranges used to be typed into the templates by hand, and nothing moved
|
|
7
|
+
* them: they sat at `^0.2.0` — which for a 0.x version admits patches only —
|
|
8
|
+
* while the packages reached 0.9 and 0.10. A scaffolded site installed the
|
|
9
|
+
* earliest releases, against a `payload.config.ts` written for today's APIs.
|
|
10
|
+
*
|
|
11
|
+
* So the versions are read, never typed. A published scaffolder reads
|
|
12
|
+
* `versions.json`, which `copy-templates` writes beside `templates/` at build
|
|
13
|
+
* time; `publish-packages` builds after `changeset version`, so that file names
|
|
14
|
+
* exactly the set being published. Running from source (tests, `tsx`), there is
|
|
15
|
+
* no such file and the workspace's own `package.json` files are the answer.
|
|
16
|
+
*/
|
|
17
|
+
export declare function loadPackageVersions(templatesDir: string): Promise<Record<string, string>>;
|
|
18
|
+
/** `{ '@forumone/throughline-core': '0.9.1', … }` from a `packages/` directory. */
|
|
19
|
+
export declare function readWorkspaceVersions(packagesDir: string): Promise<Record<string, string>>;
|
|
20
|
+
//# sourceMappingURL=versions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../src/utils/versions.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAO/F;AAED,mFAAmF;AACnF,wBAAsB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CA0BhG"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { readFile, readdir } from 'node:fs/promises';
|
|
3
|
+
import { join, resolve } from 'node:path';
|
|
4
|
+
const SCOPE_PREFIX = '@forumone/throughline-';
|
|
5
|
+
/**
|
|
6
|
+
* The version of every Throughline package the scaffold depends on, keyed for
|
|
7
|
+
* the template renderer: `@forumone/throughline-design-contract` becomes
|
|
8
|
+
* `version_design_contract`, rendered as `"^{{version_design_contract}}"`.
|
|
9
|
+
*
|
|
10
|
+
* The ranges used to be typed into the templates by hand, and nothing moved
|
|
11
|
+
* them: they sat at `^0.2.0` — which for a 0.x version admits patches only —
|
|
12
|
+
* while the packages reached 0.9 and 0.10. A scaffolded site installed the
|
|
13
|
+
* earliest releases, against a `payload.config.ts` written for today's APIs.
|
|
14
|
+
*
|
|
15
|
+
* So the versions are read, never typed. A published scaffolder reads
|
|
16
|
+
* `versions.json`, which `copy-templates` writes beside `templates/` at build
|
|
17
|
+
* time; `publish-packages` builds after `changeset version`, so that file names
|
|
18
|
+
* exactly the set being published. Running from source (tests, `tsx`), there is
|
|
19
|
+
* no such file and the workspace's own `package.json` files are the answer.
|
|
20
|
+
*/
|
|
21
|
+
export async function loadPackageVersions(templatesDir) {
|
|
22
|
+
const baked = resolve(templatesDir, '..', 'versions.json');
|
|
23
|
+
if (existsSync(baked)) {
|
|
24
|
+
return templateKeys(JSON.parse(await readFile(baked, 'utf-8')));
|
|
25
|
+
}
|
|
26
|
+
// src/templates or dist/templates -> the package -> packages/
|
|
27
|
+
return templateKeys(await readWorkspaceVersions(resolve(templatesDir, '..', '..', '..')));
|
|
28
|
+
}
|
|
29
|
+
/** `{ '@forumone/throughline-core': '0.9.1', … }` from a `packages/` directory. */
|
|
30
|
+
export async function readWorkspaceVersions(packagesDir) {
|
|
31
|
+
const versions = {};
|
|
32
|
+
const entries = await readdir(packagesDir, { withFileTypes: true }).catch(() => []);
|
|
33
|
+
for (const entry of entries) {
|
|
34
|
+
if (!entry.isDirectory())
|
|
35
|
+
continue;
|
|
36
|
+
const manifest = join(packagesDir, entry.name, 'package.json');
|
|
37
|
+
if (!existsSync(manifest))
|
|
38
|
+
continue;
|
|
39
|
+
const { name, version, private: isPrivate, } = JSON.parse(await readFile(manifest, 'utf-8'));
|
|
40
|
+
if (!name?.startsWith(SCOPE_PREFIX) || !version || isPrivate)
|
|
41
|
+
continue;
|
|
42
|
+
versions[name] = version;
|
|
43
|
+
}
|
|
44
|
+
if (Object.keys(versions).length === 0) {
|
|
45
|
+
throw new Error(`create-throughline: no package versions found. Expected versions.json beside the ` +
|
|
46
|
+
`templates, or @forumone/throughline-* packages in ${packagesDir}.`);
|
|
47
|
+
}
|
|
48
|
+
return versions;
|
|
49
|
+
}
|
|
50
|
+
function templateKeys(versions) {
|
|
51
|
+
const keys = {};
|
|
52
|
+
for (const [name, version] of Object.entries(versions)) {
|
|
53
|
+
if (!name.startsWith(SCOPE_PREFIX))
|
|
54
|
+
continue;
|
|
55
|
+
keys[`version_${name.slice(SCOPE_PREFIX.length).replace(/-/g, '_')}`] = version;
|
|
56
|
+
}
|
|
57
|
+
return keys;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=versions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versions.js","sourceRoot":"","sources":["../../src/utils/versions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEzC,MAAM,YAAY,GAAG,wBAAwB,CAAA;AAE7C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,YAAoB;IAC5D,MAAM,KAAK,GAAG,OAAO,CAAC,YAAY,EAAE,IAAI,EAAE,eAAe,CAAC,CAAA;IAC1D,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,CAA2B,CAAC,CAAA;IAC3F,CAAC;IACD,8DAA8D;IAC9D,OAAO,YAAY,CAAC,MAAM,qBAAqB,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;AAC3F,CAAC;AAED,mFAAmF;AACnF,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,WAAmB;IAC7D,MAAM,QAAQ,GAA2B,EAAE,CAAA;IAC3C,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,WAAW,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAA;IACnF,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;YAAE,SAAQ;QAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,IAAI,EAAE,cAAc,CAAC,CAAA;QAC9D,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;YAAE,SAAQ;QACnC,MAAM,EACJ,IAAI,EACJ,OAAO,EACP,OAAO,EAAE,SAAS,GACnB,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAI/C,CAAA;QACD,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,IAAI,SAAS;YAAE,SAAQ;QACtE,QAAQ,CAAC,IAAI,CAAC,GAAG,OAAO,CAAA;IAC1B,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CACb,mFAAmF;YACjF,qDAAqD,WAAW,GAAG,CACtE,CAAA;IACH,CAAC;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED,SAAS,YAAY,CAAC,QAAgC;IACpD,MAAM,IAAI,GAA2B,EAAE,CAAA;IACvC,KAAK,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACvD,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC;YAAE,SAAQ;QAC5C,IAAI,CAAC,WAAW,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAA;IACjF,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@forumone/throughline-approvals": "0.8.8",
|
|
3
|
+
"@forumone/throughline-audit": "0.5.4",
|
|
4
|
+
"@forumone/throughline-components": "0.5.7",
|
|
5
|
+
"@forumone/throughline-core": "0.9.1",
|
|
6
|
+
"@forumone/throughline-design-contract": "0.6.0",
|
|
7
|
+
"@forumone/throughline-email": "0.2.12",
|
|
8
|
+
"@forumone/throughline-forms": "0.6.4",
|
|
9
|
+
"@forumone/throughline-integrations": "0.8.5",
|
|
10
|
+
"@forumone/throughline-plugin-contract": "0.4.1",
|
|
11
|
+
"@forumone/throughline-publishing": "0.10.0",
|
|
12
|
+
"@forumone/throughline-reference-ds": "0.3.5",
|
|
13
|
+
"@forumone/throughline-workflows": "0.4.0"
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forumone/create-throughline",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Scaffolder for new Throughline projects (Payload CMS + MCP servers + Inngest workflows).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -45,11 +45,12 @@
|
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/node": "^20.17.0",
|
|
48
|
-
"eslint": "^
|
|
48
|
+
"eslint": "^10.11.0",
|
|
49
|
+
"tsx": "^4.21.0",
|
|
49
50
|
"typescript": "^5.6.0",
|
|
50
|
-
"vitest": "^
|
|
51
|
-
"@forumone/throughline-
|
|
52
|
-
"@forumone/throughline-
|
|
51
|
+
"vitest": "^4.1.10",
|
|
52
|
+
"@forumone/throughline-tsconfig": "0.0.0",
|
|
53
|
+
"@forumone/throughline-eslint-config": "0.0.0"
|
|
53
54
|
},
|
|
54
55
|
"engines": {
|
|
55
56
|
"node": ">=20.9.0"
|
|
@@ -58,6 +59,7 @@
|
|
|
58
59
|
"build": "tsc -b && pnpm copy-templates && pnpm chmod-bin",
|
|
59
60
|
"copy-templates": "node ./scripts/copy-templates.mjs",
|
|
60
61
|
"chmod-bin": "node ./scripts/chmod-bin.mjs",
|
|
62
|
+
"sync-reference-ds": "tsx scripts/sync-reference-ds.ts",
|
|
61
63
|
"dev": "tsc -b -w",
|
|
62
64
|
"clean": "rm -rf dist .turbo *.tsbuildinfo",
|
|
63
65
|
"typecheck": "tsc --noEmit",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{#if packageScope}}@{{packageScope}}/design-system{{else}}{{projectName}}-design-system{{/if}}",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./src/index.ts",
|
|
7
|
-
"types": "./src/index.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": "./src/index.ts",
|
|
10
|
-
"./manifest": "./src/manifest.ts"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@forumone/throughline-reference-ds": "^0.2.0"
|
|
14
|
-
},
|
|
15
|
-
"devDependencies": {
|
|
16
|
-
"typescript": "^5.6.0"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// Re-export the Throughline reference design system. Wrap or override
|
|
2
|
-
// individual components here when you start building your own brand layer
|
|
3
|
-
// (e.g. swap colors, replace Hero, add new components). When you have
|
|
4
|
-
// enough custom work to stand alone, drop the reference DS dependency
|
|
5
|
-
// and replace this file with your own component exports.
|
|
6
|
-
export * from '@forumone/throughline-reference-ds'
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// Re-export the reference DS manifest so payload.config.ts can import
|
|
2
|
-
// it from a single workspace path. Replace this with your own manifest
|
|
3
|
-
// import when you stop using the reference DS.
|
|
4
|
-
import manifest from '@forumone/throughline-reference-ds/manifest' with { type: 'json' }
|
|
5
|
-
|
|
6
|
-
export default manifest
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# {{projectName}} design system
|
|
2
|
-
|
|
3
|
-
This is a placeholder for your design system. The Components MCP server in `apps/web/src/payload.config.ts` is configured to read a manifest URL — replace the `https://your-design-system.example.com/manifest.json` value with your real DS's manifest endpoint.
|
|
4
|
-
|
|
5
|
-
## What the manifest needs to contain
|
|
6
|
-
|
|
7
|
-
A list of components, each with:
|
|
8
|
-
|
|
9
|
-
- `name`, `description`, `categories`
|
|
10
|
-
- `props` schema (Zod-compatible JSON description)
|
|
11
|
-
- `slots` (named regions)
|
|
12
|
-
- `tokens` (CSS variables / brand tokens consumed)
|
|
13
|
-
- `examples` (sample inputs Claude can learn from)
|
|
14
|
-
|
|
15
|
-
See `@forumone/throughline-design-contract` for the full schema.
|
|
16
|
-
|
|
17
|
-
## Quickest path
|
|
18
|
-
|
|
19
|
-
If you just want to start moving, `pnpm create @forumone/throughline` again and answer "yes" to the reference design system. You'll get a working setup you can study, swap components in, and slowly replace.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{#if packageScope}}@{{packageScope}}/design-system{{else}}{{projectName}}-design-system{{/if}}",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./src/index.ts",
|
|
7
|
-
"types": "./src/index.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": "./src/index.ts"
|
|
10
|
-
},
|
|
11
|
-
"devDependencies": {
|
|
12
|
-
"typescript": "^5.6.0"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// This file is a placeholder. Bring your own design system here:
|
|
2
|
-
// - Vendor your component source under `./components/` and re-export from here
|
|
3
|
-
// - Or publish the DS separately and replace this package with the consumer
|
|
4
|
-
//
|
|
5
|
-
// The Components MCP server reads a manifest URL from your payload.config.ts
|
|
6
|
-
// (see `componentsPlugin({ manifest })`). Update that URL to point at your
|
|
7
|
-
// design system's manifest endpoint once you have one.
|
|
8
|
-
export {}
|