@milesroxas/design-hub 0.2.0 → 0.4.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.
Files changed (71) hide show
  1. package/README.md +1 -1
  2. package/core/catalog.test.ts +10 -1
  3. package/core/catalog.ts +11 -0
  4. package/core/cms.test.ts +103 -0
  5. package/core/cms.ts +178 -0
  6. package/core/export.test.ts +127 -0
  7. package/core/export.ts +120 -0
  8. package/core/formats.ts +60 -0
  9. package/core/project.test.ts +71 -0
  10. package/core/project.ts +147 -0
  11. package/dist/core/catalog.d.ts +5 -0
  12. package/dist/core/catalog.js +10 -0
  13. package/dist/core/cms.d.ts +40 -0
  14. package/dist/core/cms.js +141 -0
  15. package/dist/core/export.d.ts +52 -0
  16. package/dist/core/export.js +84 -0
  17. package/dist/core/formats.d.ts +90 -0
  18. package/dist/core/formats.js +39 -0
  19. package/dist/core/project.d.ts +56 -0
  20. package/dist/core/project.js +121 -0
  21. package/dist/scripts/bootstrap.d.ts +1 -1
  22. package/dist/scripts/bootstrap.js +38 -6
  23. package/dist/scripts/cli.js +8 -0
  24. package/dist/scripts/commands.js +8 -0
  25. package/dist/scripts/export.d.ts +42 -0
  26. package/dist/scripts/export.js +192 -0
  27. package/dist/scripts/fixtures-pull.d.ts +31 -19
  28. package/dist/scripts/fixtures-pull.js +102 -62
  29. package/dist/scripts/lib/cdp.d.ts +11 -0
  30. package/dist/scripts/lib/cdp.js +110 -0
  31. package/dist/scripts/lib/deploy.d.ts +76 -0
  32. package/dist/scripts/lib/deploy.js +94 -0
  33. package/dist/scripts/lib/vercel.d.ts +5 -0
  34. package/dist/scripts/lib/vercel.js +24 -0
  35. package/dist/scripts/new.d.ts +13 -1
  36. package/dist/scripts/new.js +43 -4
  37. package/dist/scripts/share.d.ts +63 -0
  38. package/dist/scripts/share.js +181 -0
  39. package/dist/scripts/signin.d.ts +31 -0
  40. package/dist/scripts/signin.js +119 -0
  41. package/dist/scripts/tracks.d.ts +40 -0
  42. package/dist/scripts/tracks.js +93 -0
  43. package/dist/server/paths.d.ts +2 -0
  44. package/dist/server/paths.js +2 -0
  45. package/dist/server/project.d.ts +7 -0
  46. package/dist/server/project.js +29 -0
  47. package/kit/Artboard.tsx +160 -0
  48. package/kit/artboard.css +47 -0
  49. package/kit/dials.tsx +2 -1
  50. package/package.json +1 -1
  51. package/shell/Index.tsx +49 -4
  52. package/shell/main.tsx +6 -2
  53. package/shell/shell.css +7 -3
  54. package/skills/miles-brand/SKILL.md +52 -0
  55. package/skills/miles-deploy/SKILL.md +26 -19
  56. package/skills/miles-design-hub/SKILL.md +77 -25
  57. package/skills/miles-get-hostile/SKILL.md +7 -5
  58. package/skills/miles-new-feature/SKILL.md +8 -7
  59. package/skills/miles-port/SKILL.md +14 -2
  60. package/skills/miles-port/references/emdash.md +43 -0
  61. package/skills/miles-port/references/payload.md +31 -0
  62. package/skills/miles-port/references/wordpress.md +31 -0
  63. package/skills/miles-prototype/SKILL.md +2 -2
  64. package/templates/app/README.md +1 -0
  65. package/templates/brand/README.md +48 -0
  66. package/templates/brand/index.tsx +16 -0
  67. package/templates/brand/styles.css +5 -0
  68. package/templates/site/README.md +42 -0
  69. package/templates/site/index.tsx +22 -0
  70. package/templates/site/styles.css +6 -0
  71. package/templates/space/README.md +1 -0
@@ -0,0 +1,16 @@
1
+ import { Artboard, Board } from '@kit/Artboard';
2
+ import './styles.css';
3
+
4
+ export default function Prototype() {
5
+ return (
6
+ <Board title="{{title}}" lede="Replace with the question from README.md.">
7
+ <Artboard format="post-square" name="square">
8
+ <div className="piece">
9
+ <p className="piece-kicker">Kicker</p>
10
+ <h2 className="piece-headline">The headline, at the size it ships</h2>
11
+ <p className="piece-sub">Every value here is in real pixels: this artboard is 1080 wide.</p>
12
+ </div>
13
+ </Artboard>
14
+ </Board>
15
+ );
16
+ }
@@ -0,0 +1,5 @@
1
+ /* Values are real pixels at the artboard's size (1080 wide for posts). */
2
+ .piece { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 24px; padding: 96px; background: var(--bg-brand-solid, var(--bg-primary)); color: var(--text-white, var(--text-primary)); }
3
+ .piece-kicker { font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.8; }
4
+ .piece-headline { font-size: 88px; line-height: 1.05; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; max-width: 16ch; }
5
+ .piece-sub { font-size: 32px; line-height: 44px; max-width: 30ch; opacity: 0.85; }
@@ -0,0 +1,42 @@
1
+ ---
2
+ title: {{title}}
3
+ summary: One line on what this explores.
4
+ context: app
5
+ track: {{track}}
6
+ status: exploring
7
+ kind: {{kind}}
8
+ feature: {{feature}}
9
+ created: {{created}}
10
+ ---
11
+
12
+ # {{title}}
13
+
14
+ ## Problem
15
+
16
+ What is wrong or unknown today, and for whom. Write this before any code.
17
+
18
+ ## Question
19
+
20
+ The one decision this prototype exists to make.
21
+
22
+ ## Flows
23
+
24
+ | Flow | Starts from | Edge cases |
25
+ | --- | --- | --- |
26
+ | | | |
27
+
28
+ ## States
29
+
30
+ Every state the prototype holds, one row each. The fidelity guard and `miles-port` read this table: a state that is not here does not exist to them.
31
+
32
+ | State | How to reach it |
33
+ | --- | --- |
34
+ | | |
35
+
36
+ ## Fixtures
37
+
38
+ `fixtures.json` holds `real` and `missing`; `@kit/fixtures` derives `longest`, `empty` and `max`. Say where `real` came from (which CMS collection, or the comp) and the design's maximum count. A website's content is the CMS's: name the collection and the fields each section reads, so the port maps them by name.
39
+
40
+ ## Decision
41
+
42
+ Empty until picked. What was chosen, its values, and what was rejected and why. Then delete the folder.
@@ -0,0 +1,22 @@
1
+ import { SiteShell } from '@kit/SiteShell';
2
+ import { Button, notInPrototype } from '@kit/ui';
3
+ import './styles.css';
4
+
5
+ export default function Prototype() {
6
+ return (
7
+ <SiteShell>
8
+ <section className="page-hero">
9
+ <h1>{{title}}</h1>
10
+ <p className="page-lede">Replace with the question from README.md.</p>
11
+ <Button kind="primary" label="Get started" onClick={() => notInPrototype('The call to action')} />
12
+ </section>
13
+ <section className="page-section">
14
+ <h2>The section under test</h2>
15
+ <p>
16
+ Build the page here with @kit/ui, section by section, each reading its content from fixtures.json
17
+ the way the CMS will hand it over.
18
+ </p>
19
+ </section>
20
+ </SiteShell>
21
+ );
22
+ }
@@ -0,0 +1,6 @@
1
+ .page-hero { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 48px 0 64px; }
2
+ .page-hero h1 { font-size: 48px; line-height: 1.1; letter-spacing: -0.02em; max-width: 18ch; text-wrap: balance; }
3
+ .page-lede { font-size: 18px; line-height: 28px; color: var(--text-secondary); max-width: 56ch; }
4
+ .page-section { display: flex; flex-direction: column; gap: 8px; padding: 48px 0; border-top: 1px solid var(--border-secondary); }
5
+ .page-section h2 { font-size: 24px; line-height: 32px; }
6
+ .page-section p { color: var(--text-secondary); max-width: 64ch; }
@@ -2,6 +2,7 @@
2
2
  title: {{title}}
3
3
  summary: One line on what this explores.
4
4
  context: space
5
+ track: {{track}}
5
6
  status: exploring
6
7
  kind: {{kind}}
7
8
  feature: {{feature}}