@homepages/template-cli 0.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.
Files changed (110) hide show
  1. package/dist/canvas-core/chrome-css.d.ts +24 -0
  2. package/dist/canvas-core/chrome-css.js +403 -0
  3. package/dist/canvas-core/chrome.d.ts +49 -0
  4. package/dist/canvas-core/chrome.js +147 -0
  5. package/dist/canvas-core/frame.d.ts +20 -0
  6. package/dist/canvas-core/frame.js +23 -0
  7. package/dist/canvas-core/hidden-tabs.d.ts +16 -0
  8. package/dist/canvas-core/hidden-tabs.js +84 -0
  9. package/dist/canvas-core/resolve-target.js +55 -0
  10. package/dist/canvas-core/scroll.d.ts +10 -0
  11. package/dist/canvas-core/scroll.js +15 -0
  12. package/dist/canvas-core/section-dom.d.ts +6 -0
  13. package/dist/canvas-core/section-dom.js +43 -0
  14. package/dist/canvas-core/srcdoc.d.ts +8 -0
  15. package/dist/canvas-core/srcdoc.js +77 -0
  16. package/dist/canvas-core/types.d.ts +76 -0
  17. package/dist/canvas-core.d.ts +9 -0
  18. package/dist/canvas-core.js +9 -0
  19. package/dist/cli/check/config.js +41 -0
  20. package/dist/cli/check/css.js +131 -0
  21. package/dist/cli/check/diagnostics.js +37 -0
  22. package/dist/cli/check/index.js +94 -0
  23. package/dist/cli/check/loader.js +149 -0
  24. package/dist/cli/check/paths.js +15 -0
  25. package/dist/cli/check/relativize.js +18 -0
  26. package/dist/cli/check/render-invariants.js +24 -0
  27. package/dist/cli/check/resolve-tool.js +38 -0
  28. package/dist/cli/check/section-assets.js +58 -0
  29. package/dist/cli/check/stages/deps.js +337 -0
  30. package/dist/cli/check/stages/lint.js +46 -0
  31. package/dist/cli/check/stages/render.js +96 -0
  32. package/dist/cli/check/stages/size.js +274 -0
  33. package/dist/cli/check/stages/tree.js +206 -0
  34. package/dist/cli/check/stages/typecheck.js +46 -0
  35. package/dist/cli/check/stages/validate/catalog-exhaustiveness.js +17 -0
  36. package/dist/cli/check/stages/validate/facts.js +19 -0
  37. package/dist/cli/check/stages/validate/formatter-contract.js +14 -0
  38. package/dist/cli/check/stages/validate/group-contract.js +21 -0
  39. package/dist/cli/check/stages/validate/index.js +66 -0
  40. package/dist/cli/check/stages/validate/list-scalar-contract.js +22 -0
  41. package/dist/cli/check/stages/validate/nav-contract.js +89 -0
  42. package/dist/cli/check/stages/validate/nested-slot-contract.js +12 -0
  43. package/dist/cli/check/stages/validate/object-list-contract.js +31 -0
  44. package/dist/cli/check/stages/validate/orchestrator.js +236 -0
  45. package/dist/cli/check/stages/validate/produced-by-contract.js +18 -0
  46. package/dist/cli/check/stages/validate/row-contract.js +31 -0
  47. package/dist/cli/check/stages/validate/select-contract.js +13 -0
  48. package/dist/cli/check/stages/validate/source-contract.js +20 -0
  49. package/dist/cli/check/stages/validate/variant-contract.js +15 -0
  50. package/dist/cli/check/workspace.js +99 -0
  51. package/dist/cli/dev/build-css.js +97 -0
  52. package/dist/cli/dev/catalog.js +35 -0
  53. package/dist/cli/dev/compose-template.js +39 -0
  54. package/dist/cli/dev/content-override.js +58 -0
  55. package/dist/cli/dev/diagnostics.js +68 -0
  56. package/dist/cli/dev/discover.js +35 -0
  57. package/dist/cli/dev/fill-state.js +77 -0
  58. package/dist/cli/dev/index.js +42 -0
  59. package/dist/cli/dev/inspect.js +38 -0
  60. package/dist/cli/dev/island-bootstrap.js +38 -0
  61. package/dist/cli/dev/island-canvas-bootstrap.js +204 -0
  62. package/dist/cli/dev/island-map.js +34 -0
  63. package/dist/cli/dev/island-transform.js +31 -0
  64. package/dist/cli/dev/manifest-instances.js +31 -0
  65. package/dist/cli/dev/render-section.js +24 -0
  66. package/dist/cli/dev/screenshot-target.js +24 -0
  67. package/dist/cli/dev/section-page.js +91 -0
  68. package/dist/cli/dev/server.js +510 -0
  69. package/dist/cli/dev/slot-schema.js +12 -0
  70. package/dist/cli/dev/structure-summary.js +119 -0
  71. package/dist/cli/dev/tailwind.js +32 -0
  72. package/dist/cli/dev/tsconfig-paths-plugin.js +90 -0
  73. package/dist/cli/dev/vite-server.js +39 -0
  74. package/dist/cli/dev/workspace.js +63 -0
  75. package/dist/cli/link/index.js +74 -0
  76. package/dist/cli/link/overlay.js +59 -0
  77. package/dist/cli/link/watch.js +25 -0
  78. package/dist/cli/new/emit.js +48 -0
  79. package/dist/cli/new/index.js +69 -0
  80. package/dist/cli/new/scaffold/section/_Renderer.tsx +20 -0
  81. package/dist/cli/new/scaffold/section/_fill-spec.ts +18 -0
  82. package/dist/cli/new/scaffold/section/_fixtures.ts +13 -0
  83. package/dist/cli/new/scaffold/section/_schema.ts +24 -0
  84. package/dist/cli/new/scaffold/template/_manifest.json +9 -0
  85. package/dist/cli/new/scaffold/template/sections/hero/ExpandableText.tsx +45 -0
  86. package/dist/cli/new/scaffold/template/sections/hero/Renderer.tsx +40 -0
  87. package/dist/cli/new/scaffold/template/sections/hero/components/Feature.tsx +14 -0
  88. package/dist/cli/new/scaffold/template/sections/hero/fill-spec.ts +29 -0
  89. package/dist/cli/new/scaffold/template/sections/hero/fixtures.ts +41 -0
  90. package/dist/cli/new/scaffold/template/sections/hero/schema.ts +60 -0
  91. package/dist/cli/new/scaffold/template/theme.css +24 -0
  92. package/dist/cli/new/scaffold/template/theme.ts +27 -0
  93. package/dist/cli/new/scaffold-assets.js +20 -0
  94. package/dist/cli/pack/collect.js +44 -0
  95. package/dist/cli/pack/guards.js +57 -0
  96. package/dist/cli/pack/index.js +66 -0
  97. package/dist/cli/pack/manifest.js +15 -0
  98. package/dist/cli/pack/zip.js +86 -0
  99. package/dist/cli/theme/generate.js +43 -0
  100. package/dist/cli/theme/index.js +33 -0
  101. package/dist/cli/theme/load-theme.js +69 -0
  102. package/dist/cli/version.js +20 -0
  103. package/dist/cli.d.ts +1 -0
  104. package/dist/cli.js +139 -0
  105. package/dist/dev-client/assets/index-CJa9G1Na.css +1 -0
  106. package/dist/dev-client/assets/index-C_1atZs4.js +450 -0
  107. package/dist/dev-client/index.html +13 -0
  108. package/dist/package.js +5 -0
  109. package/dist/tokens.css +21 -0
  110. package/package.json +75 -0
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>template-kit dev</title>
7
+ <script type="module" crossorigin src="/dev-client/assets/index-C_1atZs4.js"></script>
8
+ <link rel="stylesheet" crossorigin href="/dev-client/assets/index-CJa9G1Na.css">
9
+ </head>
10
+ <body>
11
+ <div id="root"></div>
12
+ </body>
13
+ </html>
@@ -0,0 +1,5 @@
1
+ //#region package.json
2
+ var version = "0.1.0";
3
+
4
+ //#endregion
5
+ export { version };
@@ -0,0 +1,21 @@
1
+ /* Design tokens the editor surface around the canvas frame reads.
2
+ The kernel itself reads none of these — the iframe is a srcdoc document
3
+ that cannot inherit the host's Tailwind, so its own chrome CSS is built
4
+ from literals on purpose. These are shipped beside the kernel so a
5
+ vendored copy's host stylesheet resolves them identically instead of
6
+ degrading silently to an inherited value.
7
+
8
+ The application's global stylesheet is the source of truth; this partial
9
+ is the shipped mirror and a colocated test fails on any drift between
10
+ them. Change a value there, not here. */
11
+
12
+ @theme inline {
13
+ --color-canvas: #ffffff;
14
+ --color-line: #ebebe6;
15
+ }
16
+
17
+ :root {
18
+ --frame: clamp(1px, calc(1px + (100vw - 1536px) * 0.0006076), 1.41667px);
19
+ --content-follow: 0.25;
20
+ --content: calc(1px + (var(--frame) - 1px) * var(--content-follow));
21
+ }
package/package.json ADDED
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "@homepages/template-cli",
3
+ "version": "0.1.0",
4
+ "description": "The template-kit CLI: check, dev (with the canvas playground), new, pack, theme, and link. Peers @homepages/template-kit.",
5
+ "license": "UNLICENSED",
6
+ "type": "module",
7
+ "engines": {
8
+ "node": ">=20.0.0"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/falktravis/template-packages.git",
13
+ "directory": "packages/template-cli"
14
+ },
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "CHANGELOG.md"
21
+ ],
22
+ "$comment:bin": "The package is @homepages/template-cli but the command stays `template-kit`. Package/bin mismatch is ordinary (@angular/cli -> ng, typescript -> tsc) and it keeps every guide page, workspace script, and skill runbook that types `template-kit dev` working unchanged.",
23
+ "bin": {
24
+ "template-kit": "dist/cli.js"
25
+ },
26
+ "exports": {
27
+ "./package.json": "./package.json"
28
+ },
29
+ "scripts": {
30
+ "prepack": "npm run build",
31
+ "build": "tsdown && node scripts/build-dev-client.mjs && node scripts/build-cli-assets.mjs",
32
+ "typecheck": "tsc --noEmit",
33
+ "lint": "eslint .",
34
+ "pretest": "node test/link-fixture-workspace.mjs",
35
+ "test": "node --import tsx --test 'src/**/*.test.ts' 'src/**/*.test.tsx'",
36
+ "lint:pkg": "publint --strict",
37
+ "verify:consumer": "node scripts/verify-consumer.mjs",
38
+ "check": "npm run typecheck && npm run lint && npm run build && npm run test && npm run lint:pkg && npm run verify:consumer"
39
+ },
40
+ "$comment:peer": "The kit is a PEER, never a dependency. As a dependency, a range here that diverged from the consumer workspace's would make npm install TWO copies of the kit \u2014 two zod schema identities and two sets of marker constants, silently, and invisible to jsdom. The peer makes 'exactly one kit' structural; scripts/verify-consumer.mjs asserts it.",
41
+ "peerDependencies": {
42
+ "@homepages/template-kit": ">=0.9.0-0 <0.10.0"
43
+ },
44
+ "$comment:dependencies": "zod is the ONLY real runtime dependency, and the list stays that way on purpose. TypeScript, ESLint, esbuild, vite and @vitejs/plugin-react are all loaded through src/cli/check/resolve-tool.ts from the WORKSPACE being operated on, never from this package's tree \u2014 so an author's own version judges their code, and every one of them can be a devDependency here, the only block npm never installs for a consumer. An optional peer would NOT be equivalent: npm resolves the peer edge from an installed package and `--omit=dev` keeps it. @homepages/eslint-plugin-template is likewise the workspace's devDependency (the scaffold declares it, and `check` reaches it through the workspace's own eslint.config.mjs), not ours. react/react-dom are type-only on the node side and pre-bundled into dist/dev-client by vite, so they are neither dependency nor peer.",
45
+ "dependencies": {
46
+ "zod": "^4.4.3"
47
+ },
48
+ "devDependencies": {
49
+ "@eslint/js": "^9.39.4",
50
+ "@homepages/eslint-plugin-template": "*",
51
+ "@homepages/template-kit": "*",
52
+ "@playwright/test": "^1.60.0",
53
+ "@tailwindcss/cli": "^4.3.0",
54
+ "@types/jsdom": "^21.1.7",
55
+ "@types/node": "^20.17.10",
56
+ "@types/react": "^19.0.0",
57
+ "@types/react-dom": "^19.0.0",
58
+ "@types/semver": "^7.5.8",
59
+ "@typescript-eslint/parser": "^8.60.1",
60
+ "@vitejs/plugin-react": "^4.3.4",
61
+ "esbuild": "^0.28.1",
62
+ "eslint": "^9.39.4",
63
+ "jsdom": "^26.1.0",
64
+ "publint": "^0.3.21",
65
+ "react": "^19.0.0",
66
+ "react-dom": "^19.0.0",
67
+ "semver": "^7.6.3",
68
+ "tailwindcss": "^4.3.0",
69
+ "tsdown": "0.22.7",
70
+ "tsx": "^4.19.2",
71
+ "typescript": "^5.7.2",
72
+ "typescript-eslint": "^8.60.1",
73
+ "vite": "^6.0.5"
74
+ }
75
+ }