@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.
- package/CHANGELOG.md +96 -0
- package/README.md +38 -27
- package/dist/base.css +6 -4
- package/dist/cli/dev/fill-state.js +5 -3
- package/dist/cli/link/overlay.js +1 -1
- package/dist/cli/new/scaffold/template/sections/hero/fixtures.ts +7 -7
- package/dist/contracts/slot-catalog.d.ts +2 -2
- package/dist/contracts/slot-catalog.js +3 -1
- package/dist/eslint/rules/no-raw-element.js +3 -2
- package/dist/fixtures/helpers.d.ts +23 -0
- package/dist/fixtures/helpers.js +50 -0
- package/dist/fixtures/sample-property.d.ts +7 -17
- package/dist/fixtures/sample-property.js +179 -57
- package/dist/fixtures/scenario.d.ts +20 -0
- package/dist/fixtures/scenarios/for-rent-condo.d.ts +5 -0
- package/dist/fixtures/scenarios/for-rent-condo.js +364 -0
- package/dist/fixtures/scenarios/index.d.ts +8 -0
- package/dist/fixtures/scenarios/index.js +13 -0
- package/dist/fixtures/scenarios/luxury-multi-unit.d.ts +5 -0
- package/dist/fixtures/scenarios/luxury-multi-unit.js +19 -0
- package/dist/fixtures/scenarios/sparse-single-family.d.ts +5 -0
- package/dist/fixtures/scenarios/sparse-single-family.js +233 -0
- package/dist/fixtures.d.ts +8 -2
- package/dist/fixtures.js +7 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -1
- package/dist/island-runtime.js +22 -7
- package/dist/islands/wrap.d.ts +1 -0
- package/dist/islands/wrap.js +1 -1
- package/dist/package.js +1 -1
- package/dist/primitives/Image.d.ts +1 -1
- package/dist/primitives/Video.d.ts +38 -0
- package/dist/primitives/Video.js +63 -0
- package/dist/primitives/index.d.ts +2 -1
- package/dist/rules/registry.js +3 -3
- package/dist/schema/index.d.ts +2 -2
- package/dist/schema/runtime-values.d.ts +20 -1
- package/dist/schema/section-props.d.ts +8 -1
- package/dist/schema/section-schema.d.ts +2 -2
- package/dist/schema/slot-types.d.ts +15 -1
- package/dist/schema/slot-types.js +34 -0
- package/dist/schema/synthesize-nullable.js +1 -0
- package/{docs → guide}/INDEX.md +7 -6
- package/{docs → guide}/check.md +2 -2
- package/{docs → guide}/islands.md +6 -1
- package/{docs → guide}/llms.txt +34 -14
- package/{docs → guide}/overview.md +4 -4
- package/{docs → guide}/pack.md +2 -2
- package/{docs → guide}/primitives.md +59 -11
- package/{docs → guide}/recipes/INDEX.md +1 -0
- package/{docs → guide}/recipes/collection-slot.md +10 -8
- package/guide/recipes/fixture-states.md +109 -0
- package/{docs → guide}/recipes/image-slot-crop.md +5 -3
- package/guide/recipes/pick-a-scenario.md +119 -0
- package/{docs → guide}/rules/INDEX.md +2 -2
- package/{docs → guide}/rules/fixtures-invalid.md +2 -2
- package/{docs → guide}/rules/no-raw-element.md +13 -8
- package/{docs → guide}/rules/render-invariant.md +4 -3
- package/{docs → guide}/schema-system.md +97 -16
- package/{docs → guide}/theme-and-css.md +3 -2
- package/guide/upgrading.md +61 -0
- package/{docs → guide}/vocabulary.md +3 -1
- package/package.json +9 -3
- package/dist/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js +0 -77
- package/dist/node_modules/magic-string/dist/magic-string.es.js +0 -939
- package/docs/recipes/fixture-states.md +0 -68
- /package/{docs → guide}/assets.md +0 -0
- /package/{docs → guide}/dev.md +0 -0
- /package/{docs → guide}/eslint.md +0 -0
- /package/{docs → guide}/new.md +0 -0
- /package/{docs → guide}/quickstart.md +0 -0
- /package/{docs → guide}/recipes/bind-property-fact.md +0 -0
- /package/{docs → guide}/recipes/fill-spec-decision.md +0 -0
- /package/{docs → guide}/recipes/interactive-island.md +0 -0
- /package/{docs → guide}/recipes/organize-section-folder.md +0 -0
- /package/{docs → guide}/recipes/prepare-submission.md +0 -0
- /package/{docs → guide}/recipes/second-template.md +0 -0
- /package/{docs → guide}/recipes/select-slot.md +0 -0
- /package/{docs → guide}/recipes/static-asset.md +0 -0
- /package/{docs → guide}/recipes/third-party-package.md +0 -0
- /package/{docs → guide}/rules/audit-severity.md +0 -0
- /package/{docs → guide}/rules/bundle-binary-asset.md +0 -0
- /package/{docs → guide}/rules/bundle-incomplete.md +0 -0
- /package/{docs → guide}/rules/css-reason.md +0 -0
- /package/{docs → guide}/rules/determinism-drift.md +0 -0
- /package/{docs → guide}/rules/image-bare-needs-reason.md +0 -0
- /package/{docs → guide}/rules/license-denied.md +0 -0
- /package/{docs → guide}/rules/lockfile-missing.md +0 -0
- /package/{docs → guide}/rules/lockfile-stale.md +0 -0
- /package/{docs → guide}/rules/manifest-invalid.md +0 -0
- /package/{docs → guide}/rules/missing-slot-marker.md +0 -0
- /package/{docs → guide}/rules/no-bare-css-import.md +0 -0
- /package/{docs → guide}/rules/no-client-directive-in-contract.md +0 -0
- /package/{docs → guide}/rules/no-client-runtime-in-server.md +0 -0
- /package/{docs → guide}/rules/no-css-import-from-render-path.md +0 -0
- /package/{docs → guide}/rules/no-hex.md +0 -0
- /package/{docs → guide}/rules/no-inline-style.md +0 -0
- /package/{docs → guide}/rules/no-nondeterminism.md +0 -0
- /package/{docs → guide}/rules/no-templates.md +0 -0
- /package/{docs → guide}/rules/parse-error.md +0 -0
- /package/{docs → guide}/rules/props-from-schema.md +0 -0
- /package/{docs → guide}/rules/schema-invalid.md +0 -0
- /package/{docs → guide}/rules/serializable-island-props.md +0 -0
- /package/{docs → guide}/rules/server-vs-client.md +0 -0
- /package/{docs → guide}/rules/sidebar-order.md +0 -0
- /package/{docs → guide}/rules/single-react.md +0 -0
- /package/{docs → guide}/rules/size-assets.md +0 -0
- /package/{docs → guide}/rules/size-island-bundle.md +0 -0
- /package/{docs → guide}/rules/size-renderer-bundle.md +0 -0
- /package/{docs → guide}/rules/size-section-css.md +0 -0
- /package/{docs → guide}/rules/slot-group-marker.md +0 -0
- /package/{docs → guide}/rules/slot-marker-literal.md +0 -0
- /package/{docs → guide}/rules/typecheck.md +0 -0
- /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
|
/package/{docs → guide}/dev.md
RENAMED
|
File without changes
|
|
File without changes
|
/package/{docs → guide}/new.md
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|