@homepages/template-kit 0.8.1-dev-20260718224903 → 0.9.0-dev-20260719224319

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 (112) hide show
  1. package/CHANGELOG.md +61 -1
  2. package/README.md +2 -2
  3. package/dist/canvas-core/chrome-css.d.ts +24 -0
  4. package/dist/canvas-core/chrome-css.js +403 -0
  5. package/dist/canvas-core/chrome.d.ts +49 -0
  6. package/dist/canvas-core/chrome.js +147 -0
  7. package/dist/canvas-core/frame.d.ts +20 -0
  8. package/dist/canvas-core/frame.js +23 -0
  9. package/dist/canvas-core/hidden-tabs.d.ts +16 -0
  10. package/dist/canvas-core/hidden-tabs.js +84 -0
  11. package/dist/canvas-core/resolve-target.js +55 -0
  12. package/dist/canvas-core/scroll.d.ts +10 -0
  13. package/dist/canvas-core/scroll.js +15 -0
  14. package/dist/canvas-core/section-dom.d.ts +6 -0
  15. package/dist/canvas-core/section-dom.js +43 -0
  16. package/dist/canvas-core/srcdoc.d.ts +8 -0
  17. package/dist/canvas-core/srcdoc.js +77 -0
  18. package/dist/canvas-core/types.d.ts +76 -0
  19. package/dist/canvas-core.d.ts +9 -0
  20. package/dist/canvas-core.js +9 -0
  21. package/dist/cli/check/css.js +2 -2
  22. package/dist/cli/check/loader.js +1 -1
  23. package/dist/cli/check/stages/deps.js +1 -1
  24. package/dist/cli/check/stages/render.js +3 -2
  25. package/dist/cli/check/stages/size.js +2 -2
  26. package/dist/cli/check/stages/tree.js +1 -1
  27. package/dist/cli/check/stages/validate/index.js +1 -1
  28. package/dist/cli/check/stages/validate/nav-contract.js +4 -3
  29. package/dist/cli/check/stages/validate/orchestrator.js +1 -1
  30. package/dist/cli/check/workspace.js +2 -2
  31. package/dist/cli/dev/build-css.js +1 -1
  32. package/dist/cli/dev/discover.js +2 -2
  33. package/dist/cli/dev/inspect.js +1 -1
  34. package/dist/cli/dev/island-bootstrap.js +1 -1
  35. package/dist/cli/dev/island-canvas-bootstrap.js +37 -5
  36. package/dist/cli/dev/section-page.js +1 -1
  37. package/dist/cli/dev/server.js +12 -5
  38. package/dist/cli/dev/tailwind.js +1 -1
  39. package/dist/cli/dev/tsconfig-paths-plugin.js +1 -1
  40. package/dist/cli/dev/workspace.js +2 -2
  41. package/dist/cli/link/index.js +1 -1
  42. package/dist/cli/link/overlay.js +1 -1
  43. package/dist/cli/new/emit.js +1 -1
  44. package/dist/cli/new/index.js +1 -1
  45. package/dist/cli/new/scaffold/template/sections/hero/fixtures.ts +4 -4
  46. package/dist/cli/new/scaffold-assets.js +2 -2
  47. package/dist/cli/pack/collect.js +1 -1
  48. package/dist/cli/pack/guards.js +1 -1
  49. package/dist/cli/pack/index.js +1 -1
  50. package/dist/cli/theme/generate.js +1 -1
  51. package/dist/cli/theme/load-theme.js +1 -1
  52. package/dist/dev-client/assets/index-CJa9G1Na.css +1 -0
  53. package/dist/dev-client/assets/index-C_1atZs4.js +450 -0
  54. package/dist/dev-client/index.html +2 -2
  55. package/dist/fixtures/sample-property.d.ts +4 -7
  56. package/dist/fixtures/sample-property.js +41 -97
  57. package/dist/fixtures/scenario.d.ts +1 -1
  58. package/dist/fixtures/scenarios/for-rent-condo.js +24 -44
  59. package/dist/fixtures/scenarios/luxury-multi-unit.js +1 -1
  60. package/dist/fixtures/scenarios/sparse-single-family.js +14 -26
  61. package/dist/fixtures.d.ts +2 -2
  62. package/dist/fixtures.js +1 -2
  63. package/dist/islands/client-directive.d.ts +7 -0
  64. package/dist/{eslint/is-client-file.js → islands/client-directive.js} +6 -3
  65. package/dist/islands/detect.d.ts +1 -1
  66. package/dist/islands/detect.js +1 -1
  67. package/dist/islands/discover.js +1 -1
  68. package/dist/islands/esbuild-plugin.js +1 -1
  69. package/dist/islands/wrap.js +1 -1
  70. package/dist/manifest.json +940 -0
  71. package/dist/media/pack.d.ts +49 -0
  72. package/dist/media/pack.js +69 -0
  73. package/dist/media/resolve-fixture-media.js +73 -0
  74. package/dist/media/resolve-media.js +195 -0
  75. package/dist/package.js +1 -1
  76. package/dist/rules.d.ts +176 -0
  77. package/dist/rules.js +209 -0
  78. package/dist/schema/property-facts.d.ts +2 -2
  79. package/dist/ssr.d.ts +14 -2
  80. package/dist/ssr.js +28 -13
  81. package/dist/tokens.css +21 -0
  82. package/guide/INDEX.md +2 -2
  83. package/guide/check.md +5 -5
  84. package/guide/dev.md +39 -30
  85. package/guide/eslint.md +13 -10
  86. package/guide/llms.txt +4 -3
  87. package/guide/quickstart.md +1 -1
  88. package/guide/recipes/image-slot-crop.md +6 -6
  89. package/guide/recipes/pick-a-scenario.md +13 -5
  90. package/guide/rules/INDEX.md +3 -2
  91. package/guide/schema-system.md +36 -12
  92. package/guide/upgrading.md +18 -2
  93. package/package.json +8 -4
  94. package/tsconfig.json +1 -1
  95. package/dist/dev-client/assets/index-3Gn34X_P.js +0 -50
  96. package/dist/dev-client/assets/index-DxQeiHfu.css +0 -1
  97. package/dist/eslint/is-client-file.d.ts +0 -4
  98. package/dist/eslint/rules/image-bare-needs-reason.js +0 -43
  99. package/dist/eslint/rules/no-client-directive-in-contract.js +0 -31
  100. package/dist/eslint/rules/no-client-runtime-in-server.js +0 -103
  101. package/dist/eslint/rules/no-css-import-from-render-path.js +0 -29
  102. package/dist/eslint/rules/no-hex.js +0 -188
  103. package/dist/eslint/rules/no-inline-style.js +0 -27
  104. package/dist/eslint/rules/no-nondeterminism.js +0 -48
  105. package/dist/eslint/rules/no-raw-element.js +0 -38
  106. package/dist/eslint/rules/props-from-schema.js +0 -37
  107. package/dist/eslint/rules/require-island-editor.js +0 -74
  108. package/dist/eslint/rules/serializable-island-props.js +0 -112
  109. package/dist/eslint/rules/slot-marker-literal.js +0 -38
  110. package/dist/eslint.d.ts +0 -6
  111. package/dist/eslint.js +0 -80
  112. package/dist/rules/registry.js +0 -16
@@ -1,11 +1,7 @@
1
- import { mkResponsive } from "../sample-property.js";
2
-
3
1
  //#region src/fixtures/scenarios/sparse-single-family.ts
4
- const PHOTO_BASE = "https://example.invalid/photos/tuscan-road";
5
2
  const photos = [
6
3
  {
7
- id: "ph_01",
8
- url: `${PHOTO_BASE}/01-exterior-front.jpg`,
4
+ id: "dev_upl_tuscan_road_01_exterior_front",
9
5
  alt: "Center-hall colonial facade with a covered front porch.",
10
6
  tags: {
11
7
  room: "exterior-front",
@@ -13,8 +9,7 @@ const photos = [
13
9
  }
14
10
  },
15
11
  {
16
- id: "ph_02",
17
- url: `${PHOTO_BASE}/02-living.jpg`,
12
+ id: "dev_upl_tuscan_road_02_living",
18
13
  alt: "Living room with a bay window and original hardwood floors.",
19
14
  tags: {
20
15
  room: "living",
@@ -22,8 +17,7 @@ const photos = [
22
17
  }
23
18
  },
24
19
  {
25
- id: "ph_03",
26
- url: `${PHOTO_BASE}/03-kitchen.jpg`,
20
+ id: "dev_upl_tuscan_road_03_kitchen",
27
21
  alt: "Updated kitchen with white shaker cabinets and butcher-block counters.",
28
22
  tags: {
29
23
  room: "kitchen",
@@ -31,8 +25,7 @@ const photos = [
31
25
  }
32
26
  },
33
27
  {
34
- id: "ph_04",
35
- url: `${PHOTO_BASE}/04-bedroom.jpg`,
28
+ id: "dev_upl_tuscan_road_04_bedroom",
36
29
  alt: "Primary bedroom with double-hung windows and a ceiling fan.",
37
30
  tags: {
38
31
  room: "bedroom",
@@ -40,8 +33,7 @@ const photos = [
40
33
  }
41
34
  },
42
35
  {
43
- id: "ph_05",
44
- url: `${PHOTO_BASE}/05-backyard.jpg`,
36
+ id: "dev_upl_tuscan_road_05_backyard",
45
37
  alt: "Fenced backyard with a paver patio and mature shade trees.",
46
38
  tags: {
47
39
  room: "backyard",
@@ -49,7 +41,6 @@ const photos = [
49
41
  }
50
42
  }
51
43
  ];
52
- const floorplanUrl = `https://example.invalid/floorplans/tuscan-road/main-floor.png`;
53
44
  const units = [{
54
45
  unit_id: "unit_01",
55
46
  unit_label: null,
@@ -66,12 +57,9 @@ const units = [{
66
57
  ],
67
58
  position: 0,
68
59
  floor_plans: [{
69
- id: "fp_main",
70
- url: floorplanUrl,
71
- alt: "Full-house floor plan — first and second floor.",
60
+ id: "dev_efp_tuscan_road_main_floor",
72
61
  floor_label: null,
73
- position: 0,
74
- responsive: mkResponsive(floorplanUrl, 1024, 1024)
62
+ position: 0
75
63
  }]
76
64
  }];
77
65
  const pois = [
@@ -168,14 +156,14 @@ const contacts = [{
168
156
  display_name: "Priya Chandran",
169
157
  title: "Owner/Broker",
170
158
  bio: "Priya Chandran is a solo independent broker serving Maplewood and the surrounding South Orange Valley towns. She handles every listing personally, from staging through closing, with a focus on single-family colonials and first-time sellers.",
171
- headshot_url: "https://example.invalid/contacts/priya-chandran.jpg",
159
+ headshot_id: "dev_lib_priya_chandran",
172
160
  website_url: "https://priya-chandran-realty.example.invalid",
173
161
  email: "priya@homepages.io",
174
162
  phone: "(973) 555-0148",
175
163
  address: "1620 Springfield Ave, Maplewood, NJ 07040",
176
164
  org_name: "Priya Chandran Realty",
177
- logo_light: null,
178
- logo_dark: null,
165
+ logo_light_id: null,
166
+ logo_dark_id: null,
179
167
  socials: [{
180
168
  platform: "instagram",
181
169
  url: "https://instagram.com/priyachandranrealty/"
@@ -211,10 +199,10 @@ const facts = {
211
199
  phone: c.fields.phone,
212
200
  address: c.fields.address,
213
201
  website_url: c.fields.website_url,
214
- avatar_upload_id: `upload_headshot_${c.library_item_id}`,
202
+ avatar_upload_id: c.fields.headshot_id,
215
203
  org_name: c.fields.org_name,
216
- logo_light_upload_id: c.fields.logo_light ? `upload_logo_light_${c.library_item_id}` : null,
217
- logo_dark_upload_id: c.fields.logo_dark ? `upload_logo_dark_${c.library_item_id}` : null,
204
+ logo_light_upload_id: c.fields.logo_light_id,
205
+ logo_dark_upload_id: c.fields.logo_dark_id,
218
206
  instagram_url: c.fields.socials.find((s) => s.platform === "instagram")?.url ?? null,
219
207
  linkedin_url: c.fields.socials.find((s) => s.platform === "linkedin")?.url ?? null,
220
208
  x_url: c.fields.socials.find((s) => s.platform === "x")?.url ?? null,
@@ -230,7 +218,7 @@ const sparseSingleFamily = {
230
218
  amenities,
231
219
  contacts,
232
220
  media: {
233
- video_url: null,
221
+ video_id: null,
234
222
  tour_3d_url: null
235
223
  }
236
224
  };
@@ -1,8 +1,8 @@
1
- import { AmenityItem, ContactFixture, PhotoFixture, PoiFixture, mkResponsive } from "./fixtures/sample-property.js";
1
+ import { AmenityItem, ContactFixture, PhotoFixture, PoiFixture } from "./fixtures/sample-property.js";
2
2
  import { MediaFixture, Scenario, ScenarioKey } from "./fixtures/scenario.js";
3
3
  import { forRentCondo } from "./fixtures/scenarios/for-rent-condo.js";
4
4
  import { luxuryMultiUnit } from "./fixtures/scenarios/luxury-multi-unit.js";
5
5
  import { sparseSingleFamily } from "./fixtures/scenarios/sparse-single-family.js";
6
6
  import { scenarios } from "./fixtures/scenarios/index.js";
7
7
  import { PropertyMetrics, contactCards, poisByCategory, primaryContact, propertyMetrics } from "./fixtures/helpers.js";
8
- export { type AmenityItem, type ContactFixture, type MediaFixture, type PhotoFixture, type PoiFixture, type PropertyMetrics, type Scenario, type ScenarioKey, contactCards, forRentCondo, luxuryMultiUnit, mkResponsive, poisByCategory, primaryContact, propertyMetrics, scenarios, sparseSingleFamily };
8
+ export { type AmenityItem, type ContactFixture, type MediaFixture, type PhotoFixture, type PoiFixture, type PropertyMetrics, type Scenario, type ScenarioKey, contactCards, forRentCondo, luxuryMultiUnit, poisByCategory, primaryContact, propertyMetrics, scenarios, sparseSingleFamily };
package/dist/fixtures.js CHANGED
@@ -1,8 +1,7 @@
1
- import { mkResponsive } from "./fixtures/sample-property.js";
2
1
  import { forRentCondo } from "./fixtures/scenarios/for-rent-condo.js";
3
2
  import { luxuryMultiUnit } from "./fixtures/scenarios/luxury-multi-unit.js";
4
3
  import { sparseSingleFamily } from "./fixtures/scenarios/sparse-single-family.js";
5
4
  import { scenarios } from "./fixtures/scenarios/index.js";
6
5
  import { contactCards, poisByCategory, primaryContact, propertyMetrics } from "./fixtures/helpers.js";
7
6
 
8
- export { contactCards, forRentCondo, luxuryMultiUnit, mkResponsive, poisByCategory, primaryContact, propertyMetrics, scenarios, sparseSingleFamily };
7
+ export { contactCards, forRentCondo, luxuryMultiUnit, poisByCategory, primaryContact, propertyMetrics, scenarios, sparseSingleFamily };
@@ -0,0 +1,7 @@
1
+ //#region src/islands/client-directive.d.ts
2
+ declare function hasClientDirective(text: string): boolean;
3
+ declare function resetClientFileCache(): void;
4
+ declare function isClientFile(filename: string): boolean;
5
+ declare function resolveImportedFile(specifier: string, fromFile: string): string | null;
6
+ //#endregion
7
+ export { hasClientDirective, isClientFile, resetClientFileCache, resolveImportedFile };
@@ -1,7 +1,7 @@
1
- import { readFileSync, statSync } from "node:fs";
2
1
  import { dirname, resolve } from "node:path";
2
+ import { readFileSync, statSync } from "node:fs";
3
3
 
4
- //#region src/eslint/is-client-file.ts
4
+ //#region src/islands/client-directive.ts
5
5
  function hasClientDirective(text) {
6
6
  let i = 0;
7
7
  while (i < text.length) {
@@ -29,6 +29,9 @@ function hasClientDirective(text) {
29
29
  return false;
30
30
  }
31
31
  const cache = /* @__PURE__ */ new Map();
32
+ function resetClientFileCache() {
33
+ cache.clear();
34
+ }
32
35
  function isClientFile(filename) {
33
36
  const absolute = resolve(filename);
34
37
  let mtimeMs;
@@ -76,4 +79,4 @@ function resolveImportedFile(specifier, fromFile) {
76
79
  }
77
80
 
78
81
  //#endregion
79
- export { hasClientDirective, isClientFile, resolveImportedFile };
82
+ export { hasClientDirective, isClientFile, resetClientFileCache, resolveImportedFile };
@@ -1,4 +1,4 @@
1
- import { hasClientDirective } from "../eslint/is-client-file.js";
1
+ import { hasClientDirective } from "./client-directive.js";
2
2
  //#region src/islands/detect.d.ts
3
3
  /**
4
4
  * True iff `file` is a client component — an on-disk source file whose directive
@@ -1,4 +1,4 @@
1
- import { hasClientDirective, isClientFile } from "../eslint/is-client-file.js";
1
+ import { hasClientDirective, isClientFile } from "./client-directive.js";
2
2
 
3
3
  //#region src/islands/detect.ts
4
4
  /**
@@ -1,6 +1,6 @@
1
1
  import { isClientComponentFile } from "./detect.js";
2
- import { extname, join } from "node:path";
3
2
  import { readdir } from "node:fs/promises";
3
+ import { extname, join } from "node:path";
4
4
 
5
5
  //#region src/islands/discover.ts
6
6
  const COMPONENT_EXTS = /* @__PURE__ */ new Set([".tsx", ".jsx"]);
@@ -1,7 +1,7 @@
1
1
  import { islandKey } from "./detect.js";
2
2
  import { wrapClientModuleSource } from "./wrap.js";
3
- import { basename, extname } from "node:path";
4
3
  import { readFile } from "node:fs/promises";
4
+ import { basename, extname } from "node:path";
5
5
 
6
6
  //#region src/islands/esbuild-plugin.ts
7
7
  const LOADER = {
@@ -1,4 +1,4 @@
1
- import { hasClientDirective } from "../eslint/is-client-file.js";
1
+ import { hasClientDirective } from "./client-directive.js";
2
2
  import MagicString from "magic-string";
3
3
 
4
4
  //#region src/islands/wrap.ts