@homepages/template-kit 0.4.0 → 0.5.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 (114) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/README.md +38 -27
  3. package/dist/base.css +6 -4
  4. package/dist/cli/dev/fill-state.js +5 -3
  5. package/dist/cli/link/overlay.js +1 -1
  6. package/dist/cli/new/scaffold/template/sections/hero/fixtures.ts +7 -7
  7. package/dist/contracts/slot-catalog.d.ts +2 -2
  8. package/dist/contracts/slot-catalog.js +3 -1
  9. package/dist/eslint/rules/no-raw-element.js +3 -2
  10. package/dist/fixtures/helpers.d.ts +23 -0
  11. package/dist/fixtures/helpers.js +50 -0
  12. package/dist/fixtures/sample-property.d.ts +7 -17
  13. package/dist/fixtures/sample-property.js +179 -57
  14. package/dist/fixtures/scenario.d.ts +20 -0
  15. package/dist/fixtures/scenarios/for-rent-condo.d.ts +5 -0
  16. package/dist/fixtures/scenarios/for-rent-condo.js +364 -0
  17. package/dist/fixtures/scenarios/index.d.ts +8 -0
  18. package/dist/fixtures/scenarios/index.js +13 -0
  19. package/dist/fixtures/scenarios/luxury-multi-unit.d.ts +5 -0
  20. package/dist/fixtures/scenarios/luxury-multi-unit.js +19 -0
  21. package/dist/fixtures/scenarios/sparse-single-family.d.ts +5 -0
  22. package/dist/fixtures/scenarios/sparse-single-family.js +233 -0
  23. package/dist/fixtures.d.ts +8 -2
  24. package/dist/fixtures.js +7 -2
  25. package/dist/index.d.ts +3 -2
  26. package/dist/index.js +2 -1
  27. package/dist/island-runtime.js +22 -7
  28. package/dist/islands/wrap.d.ts +1 -0
  29. package/dist/islands/wrap.js +1 -1
  30. package/dist/package.js +1 -1
  31. package/dist/primitives/Image.d.ts +1 -1
  32. package/dist/primitives/Video.d.ts +38 -0
  33. package/dist/primitives/Video.js +63 -0
  34. package/dist/primitives/index.d.ts +2 -1
  35. package/dist/rules/registry.js +3 -3
  36. package/dist/schema/index.d.ts +2 -2
  37. package/dist/schema/runtime-values.d.ts +20 -1
  38. package/dist/schema/section-props.d.ts +8 -1
  39. package/dist/schema/section-schema.d.ts +2 -2
  40. package/dist/schema/slot-types.d.ts +15 -1
  41. package/dist/schema/slot-types.js +34 -0
  42. package/dist/schema/synthesize-nullable.js +1 -0
  43. package/{docs → guide}/INDEX.md +7 -6
  44. package/{docs → guide}/check.md +2 -2
  45. package/{docs → guide}/islands.md +6 -1
  46. package/{docs → guide}/llms.txt +34 -14
  47. package/{docs → guide}/overview.md +4 -4
  48. package/{docs → guide}/pack.md +2 -2
  49. package/{docs → guide}/primitives.md +59 -11
  50. package/{docs → guide}/recipes/INDEX.md +1 -0
  51. package/{docs → guide}/recipes/collection-slot.md +10 -8
  52. package/guide/recipes/fixture-states.md +109 -0
  53. package/{docs → guide}/recipes/image-slot-crop.md +5 -3
  54. package/guide/recipes/pick-a-scenario.md +119 -0
  55. package/{docs → guide}/rules/INDEX.md +2 -2
  56. package/{docs → guide}/rules/fixtures-invalid.md +2 -2
  57. package/{docs → guide}/rules/no-raw-element.md +13 -8
  58. package/{docs → guide}/rules/render-invariant.md +4 -3
  59. package/{docs → guide}/schema-system.md +97 -16
  60. package/{docs → guide}/theme-and-css.md +3 -2
  61. package/guide/upgrading.md +61 -0
  62. package/{docs → guide}/vocabulary.md +3 -1
  63. package/package.json +9 -3
  64. package/dist/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js +0 -77
  65. package/dist/node_modules/magic-string/dist/magic-string.es.js +0 -939
  66. package/docs/recipes/fixture-states.md +0 -68
  67. /package/{docs → guide}/assets.md +0 -0
  68. /package/{docs → guide}/dev.md +0 -0
  69. /package/{docs → guide}/eslint.md +0 -0
  70. /package/{docs → guide}/new.md +0 -0
  71. /package/{docs → guide}/quickstart.md +0 -0
  72. /package/{docs → guide}/recipes/bind-property-fact.md +0 -0
  73. /package/{docs → guide}/recipes/fill-spec-decision.md +0 -0
  74. /package/{docs → guide}/recipes/interactive-island.md +0 -0
  75. /package/{docs → guide}/recipes/organize-section-folder.md +0 -0
  76. /package/{docs → guide}/recipes/prepare-submission.md +0 -0
  77. /package/{docs → guide}/recipes/second-template.md +0 -0
  78. /package/{docs → guide}/recipes/select-slot.md +0 -0
  79. /package/{docs → guide}/recipes/static-asset.md +0 -0
  80. /package/{docs → guide}/recipes/third-party-package.md +0 -0
  81. /package/{docs → guide}/rules/audit-severity.md +0 -0
  82. /package/{docs → guide}/rules/bundle-binary-asset.md +0 -0
  83. /package/{docs → guide}/rules/bundle-incomplete.md +0 -0
  84. /package/{docs → guide}/rules/css-reason.md +0 -0
  85. /package/{docs → guide}/rules/determinism-drift.md +0 -0
  86. /package/{docs → guide}/rules/image-bare-needs-reason.md +0 -0
  87. /package/{docs → guide}/rules/license-denied.md +0 -0
  88. /package/{docs → guide}/rules/lockfile-missing.md +0 -0
  89. /package/{docs → guide}/rules/lockfile-stale.md +0 -0
  90. /package/{docs → guide}/rules/manifest-invalid.md +0 -0
  91. /package/{docs → guide}/rules/missing-slot-marker.md +0 -0
  92. /package/{docs → guide}/rules/no-bare-css-import.md +0 -0
  93. /package/{docs → guide}/rules/no-client-directive-in-contract.md +0 -0
  94. /package/{docs → guide}/rules/no-client-runtime-in-server.md +0 -0
  95. /package/{docs → guide}/rules/no-css-import-from-render-path.md +0 -0
  96. /package/{docs → guide}/rules/no-hex.md +0 -0
  97. /package/{docs → guide}/rules/no-inline-style.md +0 -0
  98. /package/{docs → guide}/rules/no-nondeterminism.md +0 -0
  99. /package/{docs → guide}/rules/no-templates.md +0 -0
  100. /package/{docs → guide}/rules/parse-error.md +0 -0
  101. /package/{docs → guide}/rules/props-from-schema.md +0 -0
  102. /package/{docs → guide}/rules/schema-invalid.md +0 -0
  103. /package/{docs → guide}/rules/serializable-island-props.md +0 -0
  104. /package/{docs → guide}/rules/server-vs-client.md +0 -0
  105. /package/{docs → guide}/rules/sidebar-order.md +0 -0
  106. /package/{docs → guide}/rules/single-react.md +0 -0
  107. /package/{docs → guide}/rules/size-assets.md +0 -0
  108. /package/{docs → guide}/rules/size-island-bundle.md +0 -0
  109. /package/{docs → guide}/rules/size-renderer-bundle.md +0 -0
  110. /package/{docs → guide}/rules/size-section-css.md +0 -0
  111. /package/{docs → guide}/rules/slot-group-marker.md +0 -0
  112. /package/{docs → guide}/rules/slot-marker-literal.md +0 -0
  113. /package/{docs → guide}/rules/typecheck.md +0 -0
  114. /package/{docs → guide}/rules/unlayered-fence.md +0 -0
@@ -1,68 +0,0 @@
1
- ---
2
- purpose: Preview a section's structural edge cases.
3
- status: living
4
- related: [../schema-system.md, ../dev.md]
5
- updated: 2026-07-15
6
- ---
7
- # Preview a section's structural edge cases
8
-
9
- ## Goal
10
-
11
- Preview a section's structural edge cases.
12
-
13
- ## The delta
14
-
15
- Add entries under `states` in `fixtures.ts` — each one overrides part of
16
- `base`, the same pattern the starter's `left` and `long-blurb` states use.
17
- A `states` entry is for a DESIGNED scenario, not raw coverage: nullability
18
- and empty-slot coverage (every optional slot rendered empty) is derived
19
- automatically from `schema.ts`, so a fixture state is for a case the
20
- section renders *differently* — a content-length branch, an option branch,
21
- or several overrides combined.
22
-
23
- ```ts
24
- // fixtures.ts — a content-length case and an option-branch case
25
- const fixtures: FixtureModule = {
26
- base: {
27
- slots: {
28
- headline: "101 Queensway, Jamaica Plain, MA 02130",
29
- summary: "A bright corner home moments from the Emerald Necklace.",
30
- },
31
- options: { align: "center" },
32
- },
33
- states: {
34
- // Content-length branch: exercises a long value's wrap/expand behavior.
35
- "long-summary": {
36
- slots: {
37
- summary:
38
- "A bright corner home moments from the Emerald Necklace, with a " +
39
- "chef's kitchen, three sun-filled bedrooms, off-street parking, and " +
40
- "a landscaped yard that backs onto a quiet dead-end street.",
41
- },
42
- },
43
- // Option branch: exercises the layout under the other enum value.
44
- left: { options: { align: "left" } },
45
- },
46
- };
47
- ```
48
-
49
- Each `states` key names a scenario; its value overrides `slots` and/or
50
- `options` on top of `base` — omit either key to inherit `base`'s value
51
- unchanged. Each state is a selectable fixture in the dev preview, so every one
52
- you add is there to render and review alongside `base`.
53
-
54
- ## Commands
55
-
56
- None — this is a pure content edit. No CLI command beyond the author loop below.
57
-
58
- ## Verify
59
-
60
- Verify with [the author loop](../quickstart.md#the-author-loop).
61
-
62
- ## See also
63
-
64
- - [The schema system](../schema-system.md#fixturests--content-for-local-preview) —
65
- the `fixtures.ts` contract: `base`, `states`, and the golden-property
66
- fixture exports.
67
- - [`template-kit dev`](../dev.md) — the preview server that renders each
68
- fixture state across the breakpoint ladder.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes