@salla.sa/twilight-theme-engine 1.0.86 → 1.0.88

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 (147) hide show
  1. package/README.md +4 -3
  2. package/bin/twilight-check-manifest.mjs +16 -0
  3. package/dist/{AddToCartForm-5X2WZDWR.js → AddToCartForm-YY7DDANL.js} +4 -4
  4. package/dist/{AddToCartForm-5X2WZDWR.js.map → AddToCartForm-YY7DDANL.js.map} +1 -1
  5. package/dist/{BlogAuthorPage-LO7FSSJR.js → BlogAuthorPage-4IXOEQA4.js} +9 -9
  6. package/dist/{BlogAuthorPage-LO7FSSJR.js.map → BlogAuthorPage-4IXOEQA4.js.map} +1 -1
  7. package/dist/{BlogCategoryPage-KKFQ3PGR.js → BlogCategoryPage-NYB7EMKQ.js} +9 -9
  8. package/dist/{BlogCategoryPage-KKFQ3PGR.js.map → BlogCategoryPage-NYB7EMKQ.js.map} +1 -1
  9. package/dist/{BlogPage-VLF3NSGE.js → BlogPage-B2A47OBZ.js} +8 -8
  10. package/dist/{BlogPage-VLF3NSGE.js.map → BlogPage-B2A47OBZ.js.map} +1 -1
  11. package/dist/{BlogSinglePage-AVK535IW.js → BlogSinglePage-ZSOHP2GJ.js} +8 -8
  12. package/dist/{BlogSinglePage-AVK535IW.js.map → BlogSinglePage-ZSOHP2GJ.js.map} +1 -1
  13. package/dist/{BlogTagPage-F3T4D7RH.js → BlogTagPage-24MZSPCO.js} +9 -9
  14. package/dist/{BlogTagPage-F3T4D7RH.js.map → BlogTagPage-24MZSPCO.js.map} +1 -1
  15. package/dist/{BrandsPage-LVSBZSVC.js → BrandsPage-WJUCPMKH.js} +8 -8
  16. package/dist/{BrandsPage-LVSBZSVC.js.map → BrandsPage-WJUCPMKH.js.map} +1 -1
  17. package/dist/{Breadcrumb-VLFTXRFC.js → Breadcrumb-TMUSQ2XY.js} +8 -8
  18. package/dist/{Breadcrumb-VLFTXRFC.js.map → Breadcrumb-TMUSQ2XY.js.map} +1 -1
  19. package/dist/{CartItem-G3H34GW6.js → CartItem-QH6X7576.js} +8 -8
  20. package/dist/{CartItem-G3H34GW6.js.map → CartItem-QH6X7576.js.map} +1 -1
  21. package/dist/{CartSummary-VH37RPUI.js → CartSummary-MERS5R3X.js} +8 -8
  22. package/dist/{CartSummary-VH37RPUI.js.map → CartSummary-MERS5R3X.js.map} +1 -1
  23. package/dist/{Copyright-HE5ZWINZ.js → Copyright-JPOX7PLQ.js} +4 -4
  24. package/dist/{Copyright-HE5ZWINZ.js.map → Copyright-JPOX7PLQ.js.map} +1 -1
  25. package/dist/{CustomerLayout-LKBLOAVW.js → CustomerLayout-ER5SZO7U.js} +8 -8
  26. package/dist/{CustomerLayout-LKBLOAVW.js.map → CustomerLayout-ER5SZO7U.js.map} +1 -1
  27. package/dist/{Footer-HHXAST72.js → Footer-7O5CQ72M.js} +5 -5
  28. package/dist/{Footer-HHXAST72.js.map → Footer-7O5CQ72M.js.map} +1 -1
  29. package/dist/{Header-GEVZM2YG.js → Header-CH56KO3D.js} +5 -5
  30. package/dist/{Header-GEVZM2YG.js.map → Header-CH56KO3D.js.map} +1 -1
  31. package/dist/{LoyaltyPage-M5CT3CFD.js → LoyaltyPage-S74ZELSW.js} +8 -8
  32. package/dist/{LoyaltyPage-M5CT3CFD.js.map → LoyaltyPage-S74ZELSW.js.map} +1 -1
  33. package/dist/{LoyaltyPointsPage-SDJB52U6.js → LoyaltyPointsPage-TCKZTXSB.js} +3 -3
  34. package/dist/{LoyaltyPointsPage-SDJB52U6.js.map → LoyaltyPointsPage-TCKZTXSB.js.map} +1 -1
  35. package/dist/{MainMenu-I7EYS752.js → MainMenu-3WDXPG2J.js} +4 -4
  36. package/dist/{MainMenu-I7EYS752.js.map → MainMenu-3WDXPG2J.js.map} +1 -1
  37. package/dist/{MasterLayout-QDK4T3NE.js → MasterLayout-EC6LIXFB.js} +8 -8
  38. package/dist/{MasterLayout-QDK4T3NE.js.map → MasterLayout-EC6LIXFB.js.map} +1 -1
  39. package/dist/{MobileMenu-7VTCWAVJ.js → MobileMenu-VIMGPLKV.js} +8 -8
  40. package/dist/{MobileMenu-7VTCWAVJ.js.map → MobileMenu-VIMGPLKV.js.map} +1 -1
  41. package/dist/{NotificationsPage-QCABE6QD.js → NotificationsPage-HYID6XAA.js} +8 -8
  42. package/dist/{NotificationsPage-QCABE6QD.js.map → NotificationsPage-HYID6XAA.js.map} +1 -1
  43. package/dist/{OrderSinglePage-2HVBKBG4.js → OrderSinglePage-5GMYPKA6.js} +8 -8
  44. package/dist/{OrderSinglePage-2HVBKBG4.js.map → OrderSinglePage-5GMYPKA6.js.map} +1 -1
  45. package/dist/{OrdersPage-5MNCPCM3.js → OrdersPage-SKTTDOJ6.js} +8 -8
  46. package/dist/{OrdersPage-5MNCPCM3.js.map → OrdersPage-SKTTDOJ6.js.map} +1 -1
  47. package/dist/{PageSingle-EN5XIM2B.js → PageSingle-RNWFQQEM.js} +4 -4
  48. package/dist/{PageSingle-EN5XIM2B.js.map → PageSingle-RNWFQQEM.js.map} +1 -1
  49. package/dist/{ProductDetails-UEWQPPDZ.js → ProductDetails-OYPJ6MW7.js} +4 -4
  50. package/dist/{ProductDetails-UEWQPPDZ.js.map → ProductDetails-OYPJ6MW7.js.map} +1 -1
  51. package/dist/{ProfilePage-TZSU3GHZ.js → ProfilePage-BQE63RHK.js} +8 -8
  52. package/dist/{ProfilePage-TZSU3GHZ.js.map → ProfilePage-BQE63RHK.js.map} +1 -1
  53. package/dist/{ReviewsPage-WYZ6CHF2.js → ReviewsPage-VEYN7BSR.js} +4 -4
  54. package/dist/{ReviewsPage-WYZ6CHF2.js.map → ReviewsPage-VEYN7BSR.js.map} +1 -1
  55. package/dist/{SeoCartWidget-5JR5RXQM.js → SeoCartWidget-3BVMA4WY.js} +8 -8
  56. package/dist/{SeoCartWidget-5JR5RXQM.js.map → SeoCartWidget-3BVMA4WY.js.map} +1 -1
  57. package/dist/{SettingsPage-DIDRQXMM.js → SettingsPage-QLKKYVGH.js} +8 -8
  58. package/dist/{SettingsPage-DIDRQXMM.js.map → SettingsPage-QLKKYVGH.js.map} +1 -1
  59. package/dist/{StoreClosedNotification-C2G32E34.js → StoreClosedNotification-LQXGW2SB.js} +9 -9
  60. package/dist/{StoreClosedNotification-C2G32E34.js.map → StoreClosedNotification-LQXGW2SB.js.map} +1 -1
  61. package/dist/{TestimonialsPage-XPHFRBZ7.js → TestimonialsPage-OKDDAMJL.js} +4 -4
  62. package/dist/{TestimonialsPage-XPHFRBZ7.js.map → TestimonialsPage-OKDDAMJL.js.map} +1 -1
  63. package/dist/{ThankYouPage-UA6YYFB2.js → ThankYouPage-YWLG6UF7.js} +8 -8
  64. package/dist/{ThankYouPage-UA6YYFB2.js.map → ThankYouPage-YWLG6UF7.js.map} +1 -1
  65. package/dist/{WalletPage-AJVV7LVL.js → WalletPage-UEYRVSWR.js} +8 -8
  66. package/dist/{WalletPage-AJVV7LVL.js.map → WalletPage-UEYRVSWR.js.map} +1 -1
  67. package/dist/{WishlistPage-UW6LJLSW.js → WishlistPage-7257GI3Y.js} +8 -8
  68. package/dist/{WishlistPage-UW6LJLSW.js.map → WishlistPage-7257GI3Y.js.map} +1 -1
  69. package/dist/{chunk-4WVJJ7SN.js → chunk-6VOF5SB4.js} +3 -3
  70. package/dist/{chunk-4WVJJ7SN.js.map → chunk-6VOF5SB4.js.map} +1 -1
  71. package/dist/{chunk-WSDG4ZRI.js → chunk-7JVKUFFT.js} +4 -4
  72. package/dist/{chunk-WSDG4ZRI.js.map → chunk-7JVKUFFT.js.map} +1 -1
  73. package/dist/{chunk-BAYGWTNM.js → chunk-7PQPQEDN.js} +3 -3
  74. package/dist/{chunk-BAYGWTNM.js.map → chunk-7PQPQEDN.js.map} +1 -1
  75. package/dist/{chunk-E26YG3AO.js → chunk-A64SSH6M.js} +4 -4
  76. package/dist/{chunk-E26YG3AO.js.map → chunk-A64SSH6M.js.map} +1 -1
  77. package/dist/chunk-AUC6QMF7.js +14 -0
  78. package/dist/{chunk-QJYUTRAQ.js.map → chunk-AUC6QMF7.js.map} +1 -1
  79. package/dist/{chunk-PWTXR4RR.js → chunk-CTCVO7YU.js} +8 -9
  80. package/dist/chunk-CTCVO7YU.js.map +1 -0
  81. package/dist/{chunk-HQ7WA37L.js → chunk-H42Z4YFB.js} +7 -7
  82. package/dist/{chunk-HQ7WA37L.js.map → chunk-H42Z4YFB.js.map} +1 -1
  83. package/dist/{chunk-CLBFF2CY.js → chunk-NB7KGKLY.js} +3 -3
  84. package/dist/{chunk-CLBFF2CY.js.map → chunk-NB7KGKLY.js.map} +1 -1
  85. package/dist/{chunk-2HCCIHU7.js → chunk-NNNTEVFU.js} +4 -4
  86. package/dist/{chunk-2HCCIHU7.js.map → chunk-NNNTEVFU.js.map} +1 -1
  87. package/dist/{chunk-X54QP332.js → chunk-PKXEZRSJ.js} +5 -5
  88. package/dist/{chunk-X54QP332.js.map → chunk-PKXEZRSJ.js.map} +1 -1
  89. package/dist/{chunk-U55ZJC2X.js → chunk-SYVIMWYW.js} +18 -21
  90. package/dist/chunk-SYVIMWYW.js.map +1 -0
  91. package/dist/{chunk-KP3VYG4F.js → chunk-UKLZQK2J.js} +6 -6
  92. package/dist/{chunk-KP3VYG4F.js.map → chunk-UKLZQK2J.js.map} +1 -1
  93. package/dist/{chunk-DBXH3EMJ.js → chunk-V5OF7CV4.js} +3 -3
  94. package/dist/{chunk-DBXH3EMJ.js.map → chunk-V5OF7CV4.js.map} +1 -1
  95. package/dist/chunk-X5NK4TZH.js +228 -0
  96. package/dist/chunk-X5NK4TZH.js.map +1 -0
  97. package/dist/cli/check-manifest.d.ts +10 -0
  98. package/dist/cli/check-manifest.d.ts.map +1 -0
  99. package/dist/cli/check-manifest.js +44 -0
  100. package/dist/cli/check-manifest.js.map +1 -0
  101. package/dist/components/cart/index.js +1 -1
  102. package/dist/components/common/index.js +2 -2
  103. package/dist/components/drawer/index.js +6 -6
  104. package/dist/components/home/index.js +8 -8
  105. package/dist/components/layout/Footer.d.ts.map +1 -1
  106. package/dist/components/layout/MasterLayout.d.ts.map +1 -1
  107. package/dist/components/layout/index.js +1 -1
  108. package/dist/components/product/index.js +7 -7
  109. package/dist/components/store/index.js +8 -8
  110. package/dist/{document-class-7AXAAWGZ.js → document-class-WMKWZN7O.js} +3 -3
  111. package/dist/{document-class-7AXAAWGZ.js.map → document-class-WMKWZN7O.js.map} +1 -1
  112. package/dist/hooks/index.js +6 -6
  113. package/dist/hooks/useGtm.js +6 -6
  114. package/dist/hooks/useMoney.js +6 -6
  115. package/dist/hooks/useStore.js +6 -6
  116. package/dist/index.js +6 -6
  117. package/dist/{not-found-3EEMQZMU.js → not-found-NAXLRGC2.js} +8 -8
  118. package/dist/{not-found-3EEMQZMU.js.map → not-found-NAXLRGC2.js.map} +1 -1
  119. package/dist/providers/index.js +6 -6
  120. package/dist/routes/account/orders.js +1 -1
  121. package/dist/routes/account.js +6 -6
  122. package/dist/routes/blog.js +5 -5
  123. package/dist/routes/brands.js +1 -1
  124. package/dist/routes/cart.js +10 -10
  125. package/dist/routes/home.js +9 -9
  126. package/dist/routes/loyalty.js +2 -2
  127. package/dist/routes/page.js +1 -1
  128. package/dist/routes/product-listing.js +8 -8
  129. package/dist/routes/product.js +8 -8
  130. package/dist/routes/testimonials.js +2 -2
  131. package/dist/routes/thank-you.js +1 -1
  132. package/dist/skeleton.js +9 -9
  133. package/dist/tanstack.js +3 -3
  134. package/dist/utils/index.js +1 -1
  135. package/dist/vite/index.d.ts +1 -1
  136. package/dist/vite/index.d.ts.map +1 -1
  137. package/dist/vite/index.js +15 -26
  138. package/dist/vite/index.js.map +1 -1
  139. package/dist/vite/plugins/twilight-manifest.d.ts +23 -0
  140. package/dist/vite/plugins/twilight-manifest.d.ts.map +1 -1
  141. package/dist/vite/plugins/twilight-schema.plugin.d.ts.map +1 -1
  142. package/package.json +5 -1
  143. package/tailwind/components/layout/Footer.tsx.txt +20 -19
  144. package/tailwind/components/layout/MasterLayout.tsx.txt +0 -1
  145. package/dist/chunk-PWTXR4RR.js.map +0 -1
  146. package/dist/chunk-QJYUTRAQ.js +0 -14
  147. package/dist/chunk-U55ZJC2X.js.map +0 -1
@@ -0,0 +1,228 @@
1
+ // src/vite/plugins/twilight-manifest.ts
2
+ var REACT_THEME_TYPE = "react";
3
+ function getThemeType(raw) {
4
+ if (!raw || typeof raw !== "object") return void 0;
5
+ const { type } = raw;
6
+ return typeof type === "string" && type.trim() ? type : void 0;
7
+ }
8
+ function isReactThemeManifest(raw) {
9
+ return getThemeType(raw) === REACT_THEME_TYPE;
10
+ }
11
+ function describeThemeTypeIssue(raw, fileLabel = "twilight.json") {
12
+ const type = getThemeType(raw);
13
+ if (type === REACT_THEME_TYPE) return null;
14
+ if (!type) {
15
+ return `${fileLabel} has no "type": "${REACT_THEME_TYPE}" \u2014 the Salla CLI treats a manifest without it as a twig theme, so \`salla theme dev\` and publishing will take the wrong path. Add "type": "${REACT_THEME_TYPE}" as the first key.`;
16
+ }
17
+ if (type.trim() === REACT_THEME_TYPE) {
18
+ return `${fileLabel} declares "type": ${JSON.stringify(type)} \u2014 the Salla CLI compares this value exactly, so the surrounding whitespace still routes the theme to the twig path. Use "type": "${REACT_THEME_TYPE}".`;
19
+ }
20
+ return `${fileLabel} declares "type": "${type}", but this theme is built with the React theme engine. Change it to "${REACT_THEME_TYPE}" so the Salla CLI routes it correctly.`;
21
+ }
22
+ var ALLOWED_TYPES = ["string", "boolean", "collection", "number", "items", "static"];
23
+ var KNOWN_FORMATS = {
24
+ boolean: ["switch"],
25
+ items: ["dropdown", "dropdown-list", "variable-list"],
26
+ string: ["text", "textarea", "hidden", "image", "url", "email", "color", "icon", "line"],
27
+ number: ["integer", "number", "numeric", "text"],
28
+ static: ["title", "line", "description"],
29
+ collection: ["collection"]
30
+ };
31
+ var SLUG = /^([-._a-z0-9]+)*$/i;
32
+ var isRecord = (value) => !!value && typeof value === "object" && !Array.isArray(value);
33
+ function checkDropdown(entry, path, error, warn) {
34
+ const { options, source } = entry;
35
+ const hasSource = typeof source === "string" && source !== "";
36
+ if (options !== void 0 && !Array.isArray(options)) {
37
+ error(`${path}.options`, "Must be an array of { label, value }.");
38
+ } else if (!hasSource && (!Array.isArray(options) || options.length === 0)) {
39
+ error(
40
+ `${path}.options`,
41
+ 'A dropdown needs "options" (a list of { label, value }) or a "source" that loads them.'
42
+ );
43
+ } else if (Array.isArray(options)) {
44
+ const values = /* @__PURE__ */ new Set();
45
+ options.forEach((option, i) => {
46
+ const value = isRecord(option) ? option.value : void 0;
47
+ if (typeof value !== "string" || !value) {
48
+ error(`${path}.options[${i}].value`, 'Missing. Each option needs a string "value".');
49
+ } else {
50
+ if (values.has(value))
51
+ warn(`${path}.options[${i}].value`, `Duplicate option value "${value}".`);
52
+ values.add(value);
53
+ }
54
+ });
55
+ }
56
+ }
57
+ function checkCollection(entry, path, inComponent, error, checkEntry) {
58
+ const nested = entry.fields;
59
+ if (!Array.isArray(nested)) {
60
+ error(`${path}.fields`, 'A collection needs "fields": the array of fields each item has.');
61
+ } else {
62
+ const nestedSeen = /* @__PURE__ */ new Set();
63
+ nested.forEach(
64
+ (field, i) => checkEntry(field, `${path}.fields[${i}]`, nestedSeen, inComponent)
65
+ );
66
+ }
67
+ const { minLength, maxLength } = entry;
68
+ if (inComponent) {
69
+ for (const key of ["minLength", "maxLength"]) {
70
+ if (!Number.isInteger(entry[key])) {
71
+ error(
72
+ `${path}.${key}`,
73
+ 'A collection in a home block needs whole-number "minLength" and "maxLength".'
74
+ );
75
+ }
76
+ }
77
+ }
78
+ if (typeof minLength === "number" && typeof maxLength === "number" && minLength > maxLength) {
79
+ error(
80
+ `${path}.minLength`,
81
+ `minLength (${minLength}) is greater than maxLength (${maxLength}).`
82
+ );
83
+ }
84
+ }
85
+ function validateTwilightManifest(raw, fileLabel = "twilight.json") {
86
+ const errors = [];
87
+ const warnings = [];
88
+ const error = (path, message) => errors.push({ path, message });
89
+ const warn = (path, message) => warnings.push({ path, message });
90
+ if (!isRecord(raw)) {
91
+ error("", `${fileLabel} must be a JSON object.`);
92
+ return { errors, warnings };
93
+ }
94
+ const typeIssue = describeThemeTypeIssue(raw, fileLabel);
95
+ if (typeIssue) error("type", typeIssue);
96
+ for (const key of ["name", "description"]) {
97
+ const value = raw[key];
98
+ if (value === void 0) {
99
+ if (key === "name")
100
+ warn(
101
+ key,
102
+ 'Missing. Give the theme a name per language, for example { "ar": "...", "en": "..." }.'
103
+ );
104
+ } else if (!isRecord(value)) {
105
+ error(
106
+ key,
107
+ 'Must be an object of language to text, for example { "ar": "...", "en": "..." }.'
108
+ );
109
+ } else if (typeof value.en !== "string" || typeof value.ar !== "string") {
110
+ warn(key, 'Has no "ar" or no "en" text. The dashboard shows the theme in both languages.');
111
+ }
112
+ }
113
+ const features = raw.features;
114
+ if (features !== void 0) {
115
+ if (!Array.isArray(features)) error("features", "Must be an array of strings.");
116
+ else
117
+ features.forEach((feature, i) => {
118
+ if (typeof feature !== "string" || !feature)
119
+ error(`features[${i}]`, "Must be a non-empty string.");
120
+ });
121
+ }
122
+ const checkEntry = (entry, path, seen, inComponent = false) => {
123
+ if (!isRecord(entry)) {
124
+ error(path, "Must be an object.");
125
+ return;
126
+ }
127
+ const { id, type, format } = entry;
128
+ if (typeof id !== "string" || !id.trim()) {
129
+ error(
130
+ `${path}.id`,
131
+ "Missing. Every entry needs a unique string id: code reads the value by it."
132
+ );
133
+ } else {
134
+ if (seen.has(id))
135
+ error(`${path}.id`, `Duplicate id "${id}". Ids must be unique in the same list.`);
136
+ seen.add(id);
137
+ if (!SLUG.test(id)) {
138
+ const message = `"${id}" may only use letters, digits, "-", "." and "_".`;
139
+ if (inComponent) error(`${path}.id`, message);
140
+ else warn(`${path}.id`, message);
141
+ }
142
+ }
143
+ if (typeof type !== "string" || !type) {
144
+ error(`${path}.type`, "Missing. Use one of: " + ALLOWED_TYPES.join(", ") + ".");
145
+ return;
146
+ }
147
+ if (!ALLOWED_TYPES.includes(type)) {
148
+ error(
149
+ `${path}.type`,
150
+ `"${type}" is not an allowed type. The dashboard rejects the theme. Use one of: ${ALLOWED_TYPES.join(", ")}.`
151
+ );
152
+ return;
153
+ }
154
+ const formats = KNOWN_FORMATS[type];
155
+ if (typeof format === "string" && !formats.includes(format)) {
156
+ warn(
157
+ `${path}.format`,
158
+ `Unrecognised format "${format}" for type "${type}" (seen: ${formats.join(", ")}).`
159
+ );
160
+ }
161
+ if (inComponent) {
162
+ for (const flag of ["required", "multichoice"]) {
163
+ if (entry[flag] !== void 0 && typeof entry[flag] !== "boolean") {
164
+ error(`${path}.${flag}`, "Must be true or false.");
165
+ }
166
+ }
167
+ }
168
+ if (type === "boolean" && entry.value !== void 0 && typeof entry.value !== "boolean") {
169
+ error(`${path}.value`, "A boolean setting needs a true or false value.");
170
+ }
171
+ if (type === "items" && format === "dropdown-list") checkDropdown(entry, path, error, warn);
172
+ if (type === "collection") checkCollection(entry, path, inComponent, error, checkEntry);
173
+ };
174
+ const settings = raw.settings;
175
+ if (settings !== void 0) {
176
+ if (!Array.isArray(settings)) error("settings", "Must be an array.");
177
+ else {
178
+ const seen = /* @__PURE__ */ new Set();
179
+ settings.forEach((setting, i) => checkEntry(setting, `settings[${i}]`, seen));
180
+ }
181
+ }
182
+ const components = raw.components;
183
+ if (components !== void 0) {
184
+ if (!Array.isArray(components)) error("components", "Must be an array.");
185
+ else {
186
+ const paths = /* @__PURE__ */ new Set();
187
+ components.forEach((component, i) => {
188
+ const at = `components[${i}]`;
189
+ if (!isRecord(component)) {
190
+ error(at, "Must be an object.");
191
+ return;
192
+ }
193
+ for (const key of ["title", "key", "path", "fields"]) {
194
+ if (component[key] === void 0 || component[key] === null) {
195
+ error(`${at}.${key}`, `Missing. A home block needs title, key, path and fields.`);
196
+ }
197
+ }
198
+ const { path } = component;
199
+ if (typeof path === "string" && path.trim()) {
200
+ if (!SLUG.test(path))
201
+ error(`${at}.path`, `"${path}" may only use letters, digits, "-", "." and "_".`);
202
+ if (!path.startsWith("home."))
203
+ warn(
204
+ `${at}.path`,
205
+ `"${path}" does not start with "home.". Home blocks are registered as "home.<key>".`
206
+ );
207
+ if (paths.has(path)) error(`${at}.path`, `Duplicate path "${path}".`);
208
+ paths.add(path);
209
+ } else if (path !== void 0 && path !== null) {
210
+ error(`${at}.path`, 'Must be a non-empty string such as "home.my-block".');
211
+ }
212
+ const fields = component.fields;
213
+ if (fields !== void 0) {
214
+ if (!Array.isArray(fields)) error(`${at}.fields`, "Must be an array of fields.");
215
+ else {
216
+ const fieldIds = /* @__PURE__ */ new Set();
217
+ fields.forEach((field, j) => checkEntry(field, `${at}.fields[${j}]`, fieldIds, true));
218
+ }
219
+ }
220
+ });
221
+ }
222
+ }
223
+ return { errors, warnings };
224
+ }
225
+
226
+ export { REACT_THEME_TYPE, describeThemeTypeIssue, getThemeType, isReactThemeManifest, validateTwilightManifest };
227
+ //# sourceMappingURL=chunk-X5NK4TZH.js.map
228
+ //# sourceMappingURL=chunk-X5NK4TZH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/vite/plugins/twilight-manifest.ts"],"names":[],"mappings":";AAcO,IAAM,gBAAA,GAAmB;AA4BzB,SAAS,aAAa,GAAA,EAAkC;AAC7D,EAAA,IAAI,CAAC,GAAA,IAAO,OAAO,GAAA,KAAQ,UAAU,OAAO,MAAA;AAC5C,EAAA,MAAM,EAAE,MAAK,GAAI,GAAA;AACjB,EAAA,OAAO,OAAO,IAAA,KAAS,QAAA,IAAY,IAAA,CAAK,IAAA,KAAS,IAAA,GAAO,MAAA;AAC1D;AAGO,SAAS,qBAAqB,GAAA,EAAuB;AAC1D,EAAA,OAAO,YAAA,CAAa,GAAG,CAAA,KAAM,gBAAA;AAC/B;AAQO,SAAS,sBAAA,CAAuB,GAAA,EAAc,SAAA,GAAY,eAAA,EAAgC;AAC/F,EAAA,MAAM,IAAA,GAAO,aAAa,GAAG,CAAA;AAC7B,EAAA,IAAI,IAAA,KAAS,kBAAkB,OAAO,IAAA;AAEtC,EAAA,IAAI,CA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QAC3E;AACA,QAAA,MAAM,SAAS,SAAA,CAAU,MAAA;AACzB,QAAA,IAAI,WAAW,MAAA,EAAW;AACxB,UAAA,IAAI,CAAC,MAAM,OAAA,CAAQ,MAAM,GAAG,KAAA,CAAM,CAAA,EAAG,EAAE,CAAA,OAAA,CAAA,EAAW,6BAA6B,CAAA;AAAA,eAC1E;AACH,YAAA,MAAM,QAAA,uBAAe,GAAA,EAAY;AACjC,YAAA,MAAA,CAAO,OAAA,CAAQ,CAAC,KAAA,EAAO,CAAA,KAAM,UAAA,CAAW,KAAA,EAAO,CAAA,EAAG,EAAE,CAAA,QAAA,EAAW,CAAC,CAAA,CAAA,CAAA,EAAK,QAAA,EAAU,IAAI,CAAC,CAAA;AAAA,UACtF;AAAA,QACF;AAAA,MACF,CAAC,CAAA;AAAA,IACH;AAAA,EACF;AAEA,EAAA,OAAO,EAAE,QAAQ,QAAA,EAAS;AAC5B","file":"chunk-X5NK4TZH.js","sourcesContent":["/**\n * The `type` discriminator that marks a `twilight.json` as a React/SSR theme.\n *\n * A twig theme's manifest has no `type` at all — every theme that predates the\n * React engine omits it — so `\"type\": \"react\"` is what tells the toolchain this\n * folder is rendered by this engine rather than by twig. The Salla CLI reads the\n * same field (`detectKind()` in `src/helpers/themes/kind.js`) to route\n * `salla theme dev` / `preview` / `publish` to the React driver, and the same\n * value travels to the portal on `POST /theme`.\n *\n * Pure and Node-safe: consumed by the dev-only vite plugin, never bundled.\n */\n\n/** Value of `twilight.json`'s `type` for a React/SSR theme. */\nexport const REACT_THEME_TYPE = 'react';\n\n/** The top-level shape of `twilight.json` that the engine cares about. */\nexport interface TwilightManifest {\n /**\n * Theme kind. `'react'` for themes rendered by this engine; absent on twig\n * themes. See {@link REACT_THEME_TYPE}.\n */\n type?: string;\n name?: Record<string, string>;\n repository?: string;\n author_email?: string;\n support_url?: string;\n description?: Record<string, string>;\n features?: string[];\n settings?: unknown[];\n components?: unknown[];\n}\n\n/**\n * Read the declared theme type, tolerating any hand-edited shape.\n *\n * The value is returned **verbatim**, never trimmed: the CLI compares it with\n * `===`, so normalising here would green-light a `\" react \"` that the CLI still\n * routes to twig — the engine would go quiet about the one thing it exists to\n * catch. Whitespace is reported as the problem it is by\n * {@link describeThemeTypeIssue} instead.\n */\nexport function getThemeType(raw: unknown): string | undefined {\n if (!raw || typeof raw !== 'object') return undefined;\n const { type } = raw as TwilightManifest;\n return typeof type === 'string' && type.trim() ? type : undefined;\n}\n\n/** Whether a parsed manifest declares itself a React/SSR theme. */\nexport function isReactThemeManifest(raw: unknown): boolean {\n return getThemeType(raw) === REACT_THEME_TYPE;\n}\n\n/**\n * Dev-time diagnostic for the `type` field, or `null` when it is correct.\n *\n * Returns a message rather than logging so it stays pure and testable; the\n * plugin owns the console.\n */\nexport function describeThemeTypeIssue(raw: unknown, fileLabel = 'twilight.json'): string | null {\n const type = getThemeType(raw);\n if (type === REACT_THEME_TYPE) return null;\n\n if (!type) {\n return (\n `${fileLabel} has no \"type\": \"${REACT_THEME_TYPE}\" — the Salla CLI treats a manifest ` +\n `without it as a twig theme, so \\`salla theme dev\\` and publishing will take the wrong path. ` +\n `Add \"type\": \"${REACT_THEME_TYPE}\" as the first key.`\n );\n }\n\n // Whitespace-only difference — easy to miss by eye, so name it explicitly.\n if (type.trim() === REACT_THEME_TYPE) {\n return (\n `${fileLabel} declares \"type\": ${JSON.stringify(type)} — the Salla CLI compares this value ` +\n `exactly, so the surrounding whitespace still routes the theme to the twig path. ` +\n `Use \"type\": \"${REACT_THEME_TYPE}\".`\n );\n }\n\n return (\n `${fileLabel} declares \"type\": \"${type}\", but this theme is built with the React theme engine. ` +\n `Change it to \"${REACT_THEME_TYPE}\" so the Salla CLI routes it correctly.`\n );\n}\n\n// ─── Full manifest validation ───────────────────────────────────────────────────\n\n/** One problem found in a `twilight.json`. */\nexport interface ManifestIssue {\n /** Where it is, as a path into the file: `settings[3].id`, `components[0].fields[2]`. */\n path: string;\n /** What is wrong and what to do about it. */\n message: string;\n}\n\nexport interface ManifestValidation {\n /** Problems that break the theme or the dashboard. Fix these. */\n errors: ManifestIssue[];\n /** Things that are unusual or not recognised. Check them, they may be intended. */\n warnings: ManifestIssue[];\n}\n\n/**\n * The `type` values the Salla dashboard accepts for a setting or a field. Anything else makes the\n * dashboard reject the manifest when the theme is published (it throws \"Type (x) not allowed\").\n */\nconst ALLOWED_TYPES = ['string', 'boolean', 'collection', 'number', 'items', 'static'] as const;\n\n/**\n * `format` values seen for each type: the dashboard's field format list plus the reference theme.\n * A format outside this table is only a warning: it is not checked at publish time (a missing\n * format falls back to a default per type), and the dev settings widget shows what it does not know\n * as read-only.\n */\nconst KNOWN_FORMATS: Record<string, readonly string[]> = {\n boolean: ['switch'],\n items: ['dropdown', 'dropdown-list', 'variable-list'],\n string: ['text', 'textarea', 'hidden', 'image', 'url', 'email', 'color', 'icon', 'line'],\n number: ['integer', 'number', 'numeric', 'text'],\n static: ['title', 'line', 'description'],\n collection: ['collection'],\n};\n\n/** Ids and component paths may use letters, digits, \"-\", \".\" and \"_\" only. */\nconst SLUG = /^([-._a-z0-9]+)*$/i;\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n !!value && typeof value === 'object' && !Array.isArray(value);\n\ntype Report = (path: string, message: string) => void;\n\n/** A dropdown needs inline options or a source that loads them. */\nfunction checkDropdown(\n entry: Record<string, unknown>,\n path: string,\n error: Report,\n warn: Report\n): void {\n const { options, source } = entry;\n const hasSource = typeof source === 'string' && source !== '';\n if (options !== undefined && !Array.isArray(options)) {\n error(`${path}.options`, 'Must be an array of { label, value }.');\n } else if (!hasSource && (!Array.isArray(options) || options.length === 0)) {\n // A dropdown that loads its choices from the store (products, brands, categories) has a\n // \"source\" and an empty \"options\" list. Without a source it needs inline options.\n error(\n `${path}.options`,\n 'A dropdown needs \"options\" (a list of { label, value }) or a \"source\" that loads them.'\n );\n } else if (Array.isArray(options)) {\n const values = new Set<string>();\n options.forEach((option, i) => {\n const value = isRecord(option) ? option.value : undefined;\n if (typeof value !== 'string' || !value) {\n error(`${path}.options[${i}].value`, 'Missing. Each option needs a string \"value\".');\n } else {\n if (values.has(value))\n warn(`${path}.options[${i}].value`, `Duplicate option value \"${value}\".`);\n values.add(value);\n }\n });\n }\n}\n\n/** A collection holds nested fields, and in a home block the dashboard also needs its size limits. */\nfunction checkCollection(\n entry: Record<string, unknown>,\n path: string,\n inComponent: boolean,\n error: Report,\n checkEntry: (entry: unknown, path: string, seen: Set<string>, inComponent?: boolean) => void\n): void {\n const nested = entry.fields;\n if (!Array.isArray(nested)) {\n error(`${path}.fields`, 'A collection needs \"fields\": the array of fields each item has.');\n } else {\n const nestedSeen = new Set<string>();\n nested.forEach((field, i) =>\n checkEntry(field, `${path}.fields[${i}]`, nestedSeen, inComponent)\n );\n }\n\n const { minLength, maxLength } = entry;\n if (inComponent) {\n for (const key of ['minLength', 'maxLength'] as const) {\n if (!Number.isInteger(entry[key])) {\n error(\n `${path}.${key}`,\n 'A collection in a home block needs whole-number \"minLength\" and \"maxLength\".'\n );\n }\n }\n }\n if (typeof minLength === 'number' && typeof maxLength === 'number' && minLength > maxLength) {\n error(\n `${path}.minLength`,\n `minLength (${minLength}) is greater than maxLength (${maxLength}).`\n );\n }\n}\n\n/**\n * Check a parsed `twilight.json` for mistakes that are easy to make by hand and hard to see:\n * a missing `type`, a duplicate setting `id`, a dropdown with no options, a boolean whose `value`\n * is not a boolean, a component with no `path`.\n *\n * Pure and dependency-free, so it runs in Node, in a test or in a script. It never throws.\n * It checks the structure the engine and the dev settings widget read. It cannot know everything\n * the Salla dashboard accepts, so anything merely unfamiliar is a warning.\n */\nexport function validateTwilightManifest(\n raw: unknown,\n fileLabel = 'twilight.json'\n): ManifestValidation {\n const errors: ManifestIssue[] = [];\n const warnings: ManifestIssue[] = [];\n const error = (path: string, message: string) => errors.push({ path, message });\n const warn = (path: string, message: string) => warnings.push({ path, message });\n\n if (!isRecord(raw)) {\n error('', `${fileLabel} must be a JSON object.`);\n return { errors, warnings };\n }\n\n const typeIssue = describeThemeTypeIssue(raw, fileLabel);\n if (typeIssue) error('type', typeIssue);\n\n for (const key of ['name', 'description'] as const) {\n const value = raw[key];\n if (value === undefined) {\n if (key === 'name')\n warn(\n key,\n 'Missing. Give the theme a name per language, for example { \"ar\": \"...\", \"en\": \"...\" }.'\n );\n } else if (!isRecord(value)) {\n error(\n key,\n 'Must be an object of language to text, for example { \"ar\": \"...\", \"en\": \"...\" }.'\n );\n } else if (typeof value.en !== 'string' || typeof value.ar !== 'string') {\n warn(key, 'Has no \"ar\" or no \"en\" text. The dashboard shows the theme in both languages.');\n }\n }\n\n const features = raw.features;\n if (features !== undefined) {\n if (!Array.isArray(features)) error('features', 'Must be an array of strings.');\n else\n features.forEach((feature, i) => {\n if (typeof feature !== 'string' || !feature)\n error(`features[${i}]`, 'Must be a non-empty string.');\n });\n }\n\n /** Checks one setting or one component field. */\n const checkEntry = (entry: unknown, path: string, seen: Set<string>, inComponent = false) => {\n if (!isRecord(entry)) {\n error(path, 'Must be an object.');\n return;\n }\n const { id, type, format } = entry;\n\n if (typeof id !== 'string' || !id.trim()) {\n error(\n `${path}.id`,\n 'Missing. Every entry needs a unique string id: code reads the value by it.'\n );\n } else {\n if (seen.has(id))\n error(`${path}.id`, `Duplicate id \"${id}\". Ids must be unique in the same list.`);\n seen.add(id);\n if (!SLUG.test(id)) {\n // The dashboard rejects a component field id like this; a setting id is not checked there.\n const message = `\"${id}\" may only use letters, digits, \"-\", \".\" and \"_\".`;\n if (inComponent) error(`${path}.id`, message);\n else warn(`${path}.id`, message);\n }\n }\n\n if (typeof type !== 'string' || !type) {\n error(`${path}.type`, 'Missing. Use one of: ' + ALLOWED_TYPES.join(', ') + '.');\n return;\n }\n if (!(ALLOWED_TYPES as readonly string[]).includes(type)) {\n error(\n `${path}.type`,\n `\"${type}\" is not an allowed type. The dashboard rejects the theme. Use one of: ${ALLOWED_TYPES.join(', ')}.`\n );\n return;\n }\n const formats = KNOWN_FORMATS[type];\n if (typeof format === 'string' && !formats.includes(format)) {\n warn(\n `${path}.format`,\n `Unrecognised format \"${format}\" for type \"${type}\" (seen: ${formats.join(', ')}).`\n );\n }\n\n if (inComponent) {\n for (const flag of ['required', 'multichoice'] as const) {\n if (entry[flag] !== undefined && typeof entry[flag] !== 'boolean') {\n error(`${path}.${flag}`, 'Must be true or false.');\n }\n }\n }\n\n if (type === 'boolean' && entry.value !== undefined && typeof entry.value !== 'boolean') {\n error(`${path}.value`, 'A boolean setting needs a true or false value.');\n }\n\n if (type === 'items' && format === 'dropdown-list') checkDropdown(entry, path, error, warn);\n\n if (type === 'collection') checkCollection(entry, path, inComponent, error, checkEntry);\n };\n\n const settings = raw.settings;\n if (settings !== undefined) {\n if (!Array.isArray(settings)) error('settings', 'Must be an array.');\n else {\n const seen = new Set<string>();\n settings.forEach((setting, i) => checkEntry(setting, `settings[${i}]`, seen));\n }\n }\n\n const components = raw.components;\n if (components !== undefined) {\n if (!Array.isArray(components)) error('components', 'Must be an array.');\n else {\n const paths = new Set<string>();\n components.forEach((component, i) => {\n const at = `components[${i}]`;\n if (!isRecord(component)) {\n error(at, 'Must be an object.');\n return;\n }\n // The dashboard requires all four, and treats null like missing.\n for (const key of ['title', 'key', 'path', 'fields'] as const) {\n if (component[key] === undefined || component[key] === null) {\n error(`${at}.${key}`, `Missing. A home block needs title, key, path and fields.`);\n }\n }\n const { path } = component;\n if (typeof path === 'string' && path.trim()) {\n if (!SLUG.test(path))\n error(`${at}.path`, `\"${path}\" may only use letters, digits, \"-\", \".\" and \"_\".`);\n if (!path.startsWith('home.'))\n warn(\n `${at}.path`,\n `\"${path}\" does not start with \"home.\". Home blocks are registered as \"home.<key>\".`\n );\n if (paths.has(path)) error(`${at}.path`, `Duplicate path \"${path}\".`);\n paths.add(path);\n } else if (path !== undefined && path !== null) {\n error(`${at}.path`, 'Must be a non-empty string such as \"home.my-block\".');\n }\n const fields = component.fields;\n if (fields !== undefined) {\n if (!Array.isArray(fields)) error(`${at}.fields`, 'Must be an array of fields.');\n else {\n const fieldIds = new Set<string>();\n fields.forEach((field, j) => checkEntry(field, `${at}.fields[${j}]`, fieldIds, true));\n }\n }\n });\n }\n }\n\n return { errors, warnings };\n}\n"]}
@@ -0,0 +1,10 @@
1
+ export declare const CHECK_MANIFEST_USAGE = "Usage: twilight-check-manifest [path/to/twilight.json] [--strict]\n\nChecks twilight.json (default: ./twilight.json) for mistakes the dashboard would reject.\nErrors fail the command; warnings are listed and fail it only with --strict.";
2
+ export interface CheckManifestIO {
3
+ /** Directory a relative path (and the default ./twilight.json) resolves against. */
4
+ cwd?: string;
5
+ log?: (line: string) => void;
6
+ error?: (line: string) => void;
7
+ }
8
+ /** Runs the check and returns the process exit code: 0 when it passes, 1 when it fails. */
9
+ export declare function checkManifest(args: string[], io?: CheckManifestIO): number;
10
+ //# sourceMappingURL=check-manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-manifest.d.ts","sourceRoot":"","sources":["../../src/cli/check-manifest.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,oBAAoB,gPAG4C,CAAC;AAE9E,MAAM,WAAW,eAAe;IAC9B,oFAAoF;IACpF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED,2FAA2F;AAC3F,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,GAAE,eAAoB,GAAG,MAAM,CAmC9E"}
@@ -0,0 +1,44 @@
1
+ import { validateTwilightManifest } from '../chunk-X5NK4TZH.js';
2
+ import '../chunk-DGUM43GV.js';
3
+ import { readFileSync } from 'fs';
4
+ import { resolve } from 'path';
5
+
6
+ var CHECK_MANIFEST_USAGE = `Usage: twilight-check-manifest [path/to/twilight.json] [--strict]
7
+
8
+ Checks twilight.json (default: ./twilight.json) for mistakes the dashboard would reject.
9
+ Errors fail the command; warnings are listed and fail it only with --strict.`;
10
+ function checkManifest(args, io = {}) {
11
+ const {
12
+ cwd = process.cwd(),
13
+ log = (line) => process.stdout.write(`${line}
14
+ `),
15
+ error = console.error
16
+ } = io;
17
+ if (args.includes("--help") || args.includes("-h")) {
18
+ log(CHECK_MANIFEST_USAGE);
19
+ return 0;
20
+ }
21
+ const strict = args.includes("--strict");
22
+ const file = resolve(cwd, args.find((a) => !a.startsWith("-")) ?? "twilight.json");
23
+ let raw;
24
+ try {
25
+ raw = JSON.parse(readFileSync(file, "utf8"));
26
+ } catch (cause) {
27
+ error(`\u2717 ${file} could not be read as JSON: ${cause.message}`);
28
+ return 1;
29
+ }
30
+ const { errors, warnings } = validateTwilightManifest(raw);
31
+ const show = (mark, issues) => issues.forEach((i) => log(`${mark} ${i.path || "(file)"}: ${i.message}`));
32
+ show("\u2717", errors);
33
+ show("!", warnings);
34
+ const failed = errors.length > 0 || strict && warnings.length > 0;
35
+ log(
36
+ `
37
+ ${failed ? "\u2717" : "\u2713"} twilight.json: ${errors.length} error(s), ${warnings.length} warning(s)` + (!failed && warnings.length ? " (warnings do not fail; use --strict to fail on them)" : "")
38
+ );
39
+ return failed ? 1 : 0;
40
+ }
41
+
42
+ export { CHECK_MANIFEST_USAGE, checkManifest };
43
+ //# sourceMappingURL=check-manifest.js.map
44
+ //# sourceMappingURL=check-manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/cli/check-manifest.ts"],"names":[],"mappings":";;;;;AAgBO,IAAM,oBAAA,GAAuB,CAAA;;AAAA;AAAA,4EAAA;AAa7B,SAAS,aAAA,CAAc,IAAA,EAAgB,EAAA,GAAsB,EAAC,EAAW;AAC9E,EAAA,MAAM;AAAA,IACJ,GAAA,GAAM,QAAQ,GAAA,EAAI;AAAA,IAClB,MAAM,CAAC,IAAA,KAAiB,QAAQ,MAAA,CAAO,KAAA,CAAM,GAAG,IAAI;AAAA,CAAI,CAAA;AAAA,IACxD,Q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,EAAK,MAAA,GAAS,QAAA,GAAM,QAAG,CAAA,gBAAA,EAAmB,OAAO,MAAM,CAAA,WAAA,EAAc,QAAA,CAAS,MAAM,CAAA,WAAA,CAAA,IACjF,CAAC,MAAA,IAAU,QAAA,CAAS,SAAS,uDAAA,GAA0D,EAAA;AAAA,GAC5F;AACA,EAAA,OAAO,SAAS,CAAA,GAAI,CAAA;AACtB","file":"check-manifest.js","sourcesContent":["/**\n * `twilight-check-manifest`: checks a theme's twilight.json for mistakes that are easy to make by\n * hand (a missing \"type\", duplicate setting ids, a dropdown with no options, a boolean whose value\n * is not true or false, a home block with no path). The rules are {@link validateTwilightManifest}'s.\n *\n * twilight-check-manifest ./twilight.json; errors fail, warnings are listed\n * twilight-check-manifest --strict warnings fail too\n * twilight-check-manifest path/to/twilight.json\n *\n * The starter kit runs it as `pnpm check:manifest`. Bundled on its own (no vite, no React), so the\n * bin in `bin/twilight-check-manifest.mjs` starts fast.\n */\nimport { readFileSync } from 'node:fs';\nimport { resolve } from 'node:path';\nimport { validateTwilightManifest, type ManifestIssue } from '../vite/plugins/twilight-manifest';\n\nexport const CHECK_MANIFEST_USAGE = `Usage: twilight-check-manifest [path/to/twilight.json] [--strict]\n\nChecks twilight.json (default: ./twilight.json) for mistakes the dashboard would reject.\nErrors fail the command; warnings are listed and fail it only with --strict.`;\n\nexport interface CheckManifestIO {\n /** Directory a relative path (and the default ./twilight.json) resolves against. */\n cwd?: string;\n log?: (line: string) => void;\n error?: (line: string) => void;\n}\n\n/** Runs the check and returns the process exit code: 0 when it passes, 1 when it fails. */\nexport function checkManifest(args: string[], io: CheckManifestIO = {}): number {\n const {\n cwd = process.cwd(),\n log = (line: string) => process.stdout.write(`${line}\\n`),\n error = console.error,\n } = io;\n\n if (args.includes('--help') || args.includes('-h')) {\n log(CHECK_MANIFEST_USAGE);\n return 0;\n }\n\n const strict = args.includes('--strict');\n const file = resolve(cwd, args.find((a) => !a.startsWith('-')) ?? 'twilight.json');\n\n let raw: unknown;\n try {\n raw = JSON.parse(readFileSync(file, 'utf8'));\n } catch (cause) {\n error(`✗ ${file} could not be read as JSON: ${(cause as Error).message}`);\n return 1;\n }\n\n const { errors, warnings } = validateTwilightManifest(raw);\n const show = (mark: string, issues: ManifestIssue[]) =>\n issues.forEach((i) => log(`${mark} ${i.path || '(file)'}: ${i.message}`));\n show('✗', errors);\n show('!', warnings);\n\n const failed = errors.length > 0 || (strict && warnings.length > 0);\n log(\n `\\n${failed ? '✗' : '✓'} twilight.json: ${errors.length} error(s), ${warnings.length} warning(s)` +\n (!failed && warnings.length ? ' (warnings do not fail; use --strict to fail on them)' : '')\n );\n return failed ? 1 : 0;\n}\n"]}
@@ -1,4 +1,4 @@
1
- export { LazyCartItem as CartItem, LazyCartSummary as CartSummary, LazySeoCartWidget as SeoCartWidget } from '../../chunk-QJYUTRAQ.js';
1
+ export { LazyCartItem as CartItem, LazyCartSummary as CartSummary, LazySeoCartWidget as SeoCartWidget } from '../../chunk-AUC6QMF7.js';
2
2
  import '../../chunk-DGUM43GV.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
- export { BlogSkeleton, LazyBreadcrumb as Breadcrumb, BreadcrumbSkeleton, LazyCurrencySymbol as CurrencySymbol, CustomerLayoutSkeleton, CustomerPageSkeleton, DeferredData, LazyErrorPage as ErrorPage, Image, LazyNoContent as NoContent, PageSkeleton, ProductCardSkeleton, ProductDetailSkeleton, ProductGridSkeleton, LazyRenderWhenVisible as RenderWhenVisible, SkeletonPulse, resolveDeferred } from '../../chunk-DBXH3EMJ.js';
1
+ export { BlogSkeleton, LazyBreadcrumb as Breadcrumb, BreadcrumbSkeleton, LazyCurrencySymbol as CurrencySymbol, CustomerLayoutSkeleton, CustomerPageSkeleton, DeferredData, LazyErrorPage as ErrorPage, Image, LazyNoContent as NoContent, PageSkeleton, ProductCardSkeleton, ProductDetailSkeleton, ProductGridSkeleton, LazyRenderWhenVisible as RenderWhenVisible, SkeletonPulse, resolveDeferred } from '../../chunk-V5OF7CV4.js';
2
2
  export { Link } from '../../chunk-AXW67SY7.js';
3
- import '../../chunk-SKLEJJ6M.js';
4
3
  import '../../chunk-BYMOPN2S.js';
4
+ import '../../chunk-SKLEJJ6M.js';
5
5
  import '../../chunk-DGUM43GV.js';
6
6
  //# sourceMappingURL=index.js.map
7
7
  //# sourceMappingURL=index.js.map
@@ -1,9 +1,9 @@
1
1
  export { Drawer } from '../../chunk-6TKIUG5C.js';
2
- import '../../chunk-PWTXR4RR.js';
3
- import '../../chunk-X54QP332.js';
4
- import '../../chunk-U55ZJC2X.js';
5
- import '../../chunk-2JV6WZ6O.js';
2
+ import '../../chunk-CTCVO7YU.js';
3
+ import '../../chunk-PKXEZRSJ.js';
4
+ import '../../chunk-SYVIMWYW.js';
6
5
  import '../../chunk-E7WWO3V3.js';
6
+ import '../../chunk-2JV6WZ6O.js';
7
7
  import '../../chunk-RV54D2D7.js';
8
8
  import '../../chunk-ZVZGLEZ6.js';
9
9
  import '../../chunk-VVZNW5CB.js';
@@ -33,10 +33,10 @@ import '../../chunk-5XDPAKF5.js';
33
33
  import '../../chunk-GCPEMNSU.js';
34
34
  import '../../chunk-QGOPTVV5.js';
35
35
  import '../../chunk-TYNZ5B2B.js';
36
- import '../../chunk-DBXH3EMJ.js';
36
+ import '../../chunk-V5OF7CV4.js';
37
37
  import '../../chunk-AXW67SY7.js';
38
- import '../../chunk-SKLEJJ6M.js';
39
38
  import '../../chunk-BYMOPN2S.js';
39
+ import '../../chunk-SKLEJJ6M.js';
40
40
  import '../../chunk-6BZ5TKEV.js';
41
41
  import '../../chunk-FZKRSGLP.js';
42
42
  import '../../chunk-7V5HOZW4.js';
@@ -1,13 +1,13 @@
1
- export { BundleComponent, ComponentErrorBoundary, DefaultHomeComponents, FeaturedProductsStyle1, FeaturedProductsStyle2, FeaturedProductsStyle3, FixedBanner, FixedProducts, HomeComponentRenderer, PageBlocks, ParallaxBackground, PhotosSlider, ProductsSlider, ReorderProducts, SquarePhotos, StoreFeatures, LazyTestimonials as Testimonials, Youtube, registerHomeComponentConfig, registerHomeComponents, useReorderButtons } from '../../chunk-WSDG4ZRI.js';
1
+ export { BundleComponent, ComponentErrorBoundary, DefaultHomeComponents, FeaturedProductsStyle1, FeaturedProductsStyle2, FeaturedProductsStyle3, FixedBanner, FixedProducts, HomeComponentRenderer, PageBlocks, ParallaxBackground, PhotosSlider, ProductsSlider, ReorderProducts, SquarePhotos, StoreFeatures, LazyTestimonials as Testimonials, Youtube, registerHomeComponentConfig, registerHomeComponents, useReorderButtons } from '../../chunk-7JVKUFFT.js';
2
2
  import '../../chunk-FZYR4BA2.js';
3
3
  import '../../chunk-556OT3BN.js';
4
- import '../../chunk-KP3VYG4F.js';
4
+ import '../../chunk-UKLZQK2J.js';
5
5
  import '../../chunk-Y32RHCOH.js';
6
- import '../../chunk-PWTXR4RR.js';
7
- import '../../chunk-X54QP332.js';
8
- import '../../chunk-U55ZJC2X.js';
9
- import '../../chunk-2JV6WZ6O.js';
6
+ import '../../chunk-CTCVO7YU.js';
7
+ import '../../chunk-PKXEZRSJ.js';
8
+ import '../../chunk-SYVIMWYW.js';
10
9
  import '../../chunk-E7WWO3V3.js';
10
+ import '../../chunk-2JV6WZ6O.js';
11
11
  import '../../chunk-RV54D2D7.js';
12
12
  import '../../chunk-ZVZGLEZ6.js';
13
13
  import '../../chunk-VVZNW5CB.js';
@@ -37,10 +37,10 @@ import '../../chunk-5XDPAKF5.js';
37
37
  import '../../chunk-GCPEMNSU.js';
38
38
  import '../../chunk-QGOPTVV5.js';
39
39
  import '../../chunk-TYNZ5B2B.js';
40
- import '../../chunk-DBXH3EMJ.js';
40
+ import '../../chunk-V5OF7CV4.js';
41
41
  import '../../chunk-AXW67SY7.js';
42
- import '../../chunk-SKLEJJ6M.js';
43
42
  import '../../chunk-BYMOPN2S.js';
43
+ import '../../chunk-SKLEJJ6M.js';
44
44
  import '../../chunk-6BZ5TKEV.js';
45
45
  import '../../chunk-FZKRSGLP.js';
46
46
  import '../../chunk-7V5HOZW4.js';
@@ -1 +1 @@
1
- {"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../src/components/layout/Footer.tsx"],"names":[],"mappings":"AAqQA,MAAM,WAAW,WAAW;IAC1B;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,MAAM,CAAC,EAAE,OAAe,EAAE,GAAE,WAAgB,+BAsD3D"}
1
+ {"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../src/components/layout/Footer.tsx"],"names":[],"mappings":"AAsQA,MAAM,WAAW,WAAW;IAC1B;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,MAAM,CAAC,EAAE,OAAe,EAAE,GAAE,WAAgB,+BAsD3D"}
@@ -1 +1 @@
1
- {"version":3,"file":"MasterLayout.d.ts","sourceRoot":"","sources":["../../../src/components/layout/MasterLayout.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAoB/C,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE,WAAW,+BAuCrD"}
1
+ {"version":3,"file":"MasterLayout.d.ts","sourceRoot":"","sources":["../../../src/components/layout/MasterLayout.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAoB/C,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE,WAAW,+BAsCrD"}
@@ -1,4 +1,4 @@
1
- export { LazyCopyright as Copyright, LazyCustomerLayout as CustomerLayout, LazyFooter as Footer, LazyHeader as Header, LazyMasterLayout as MasterLayout, LazyWidgetHead as WidgetHead } from '../../chunk-HQ7WA37L.js';
1
+ export { LazyCopyright as Copyright, LazyCustomerLayout as CustomerLayout, LazyFooter as Footer, LazyHeader as Header, LazyMasterLayout as MasterLayout, LazyWidgetHead as WidgetHead } from '../../chunk-H42Z4YFB.js';
2
2
  export { PageAdvertisements } from '../../chunk-DBW7XXNE.js';
3
3
  export { pushEqualHeightConfig } from '../../chunk-V2ZDTY6H.js';
4
4
  import '../../chunk-IVBOLREE.js';
@@ -1,10 +1,10 @@
1
- export { LazyAddToCartForm as AddToCartForm, ProductCard, LazyProductDetails as ProductDetails, ProductGallery } from '../../chunk-KP3VYG4F.js';
1
+ export { LazyAddToCartForm as AddToCartForm, ProductCard, LazyProductDetails as ProductDetails, ProductGallery } from '../../chunk-UKLZQK2J.js';
2
2
  import '../../chunk-Y32RHCOH.js';
3
- import '../../chunk-PWTXR4RR.js';
4
- import '../../chunk-X54QP332.js';
5
- import '../../chunk-U55ZJC2X.js';
6
- import '../../chunk-2JV6WZ6O.js';
3
+ import '../../chunk-CTCVO7YU.js';
4
+ import '../../chunk-PKXEZRSJ.js';
5
+ import '../../chunk-SYVIMWYW.js';
7
6
  import '../../chunk-E7WWO3V3.js';
7
+ import '../../chunk-2JV6WZ6O.js';
8
8
  import '../../chunk-RV54D2D7.js';
9
9
  import '../../chunk-ZVZGLEZ6.js';
10
10
  import '../../chunk-VVZNW5CB.js';
@@ -34,10 +34,10 @@ import '../../chunk-5XDPAKF5.js';
34
34
  import '../../chunk-GCPEMNSU.js';
35
35
  import '../../chunk-QGOPTVV5.js';
36
36
  import '../../chunk-TYNZ5B2B.js';
37
- import '../../chunk-DBXH3EMJ.js';
37
+ import '../../chunk-V5OF7CV4.js';
38
38
  import '../../chunk-AXW67SY7.js';
39
- import '../../chunk-SKLEJJ6M.js';
40
39
  import '../../chunk-BYMOPN2S.js';
40
+ import '../../chunk-SKLEJJ6M.js';
41
41
  import '../../chunk-6BZ5TKEV.js';
42
42
  import '../../chunk-FZKRSGLP.js';
43
43
  import '../../chunk-7V5HOZW4.js';
@@ -1,9 +1,9 @@
1
- export { StoreClosedNotification } from '../../chunk-CLBFF2CY.js';
2
- import '../../chunk-PWTXR4RR.js';
3
- import '../../chunk-X54QP332.js';
4
- import '../../chunk-U55ZJC2X.js';
5
- import '../../chunk-2JV6WZ6O.js';
1
+ export { StoreClosedNotification } from '../../chunk-NB7KGKLY.js';
2
+ import '../../chunk-CTCVO7YU.js';
3
+ import '../../chunk-PKXEZRSJ.js';
4
+ import '../../chunk-SYVIMWYW.js';
6
5
  import '../../chunk-E7WWO3V3.js';
6
+ import '../../chunk-2JV6WZ6O.js';
7
7
  import '../../chunk-RV54D2D7.js';
8
8
  import '../../chunk-ZVZGLEZ6.js';
9
9
  import '../../chunk-VVZNW5CB.js';
@@ -33,10 +33,10 @@ import '../../chunk-5XDPAKF5.js';
33
33
  import '../../chunk-GCPEMNSU.js';
34
34
  import '../../chunk-QGOPTVV5.js';
35
35
  import '../../chunk-TYNZ5B2B.js';
36
- import '../../chunk-DBXH3EMJ.js';
36
+ import '../../chunk-V5OF7CV4.js';
37
37
  import '../../chunk-AXW67SY7.js';
38
- import '../../chunk-SKLEJJ6M.js';
39
38
  import '../../chunk-BYMOPN2S.js';
39
+ import '../../chunk-SKLEJJ6M.js';
40
40
  import '../../chunk-6BZ5TKEV.js';
41
41
  import '../../chunk-FZKRSGLP.js';
42
42
  import '../../chunk-7V5HOZW4.js';
@@ -51,7 +51,7 @@ import '../../chunk-DGUM43GV.js';
51
51
  import { lazy } from 'react';
52
52
 
53
53
  var LazyStoreClosedNotification = lazy(
54
- () => import('../../StoreClosedNotification-C2G32E34.js').then((m) => ({
54
+ () => import('../../StoreClosedNotification-LQXGW2SB.js').then((m) => ({
55
55
  default: m.StoreClosedNotification
56
56
  }))
57
57
  );
@@ -1,4 +1,4 @@
1
- export { RouteDocumentSync, TanStackDocumentSync, tanstackDocumentAdapter, useTanstackDocumentAttrs } from './chunk-4WVJJ7SN.js';
1
+ export { RouteDocumentSync, TanStackDocumentSync, tanstackDocumentAdapter, useTanstackDocumentAttrs } from './chunk-6VOF5SB4.js';
2
2
  import './chunk-Z4Y55HWX.js';
3
3
  import './chunk-3LXB4VFK.js';
4
4
  import './chunk-MKVCFBVF.js';
@@ -23,5 +23,5 @@ import './chunk-N2S25NXP.js';
23
23
  import './chunk-T72DAX7R.js';
24
24
  import './chunk-DF6FBKDN.js';
25
25
  import './chunk-DGUM43GV.js';
26
- //# sourceMappingURL=document-class-7AXAAWGZ.js.map
27
- //# sourceMappingURL=document-class-7AXAAWGZ.js.map
26
+ //# sourceMappingURL=document-class-WMKWZN7O.js.map
27
+ //# sourceMappingURL=document-class-WMKWZN7O.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"document-class-7AXAAWGZ.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"document-class-WMKWZN7O.js"}
@@ -1,8 +1,8 @@
1
- export { registerDefaultHooks, useBreadcrumbs, useDate, useGtm, useMoney, useNumber, useOpeningHours, usePageConfig, useStore } from '../chunk-PWTXR4RR.js';
2
- import '../chunk-X54QP332.js';
3
- import '../chunk-U55ZJC2X.js';
4
- import '../chunk-2JV6WZ6O.js';
1
+ export { registerDefaultHooks, useBreadcrumbs, useDate, useGtm, useMoney, useNumber, useOpeningHours, usePageConfig, useStore } from '../chunk-CTCVO7YU.js';
2
+ import '../chunk-PKXEZRSJ.js';
3
+ import '../chunk-SYVIMWYW.js';
5
4
  import '../chunk-E7WWO3V3.js';
5
+ import '../chunk-2JV6WZ6O.js';
6
6
  import '../chunk-RV54D2D7.js';
7
7
  import '../chunk-ZVZGLEZ6.js';
8
8
  import '../chunk-VVZNW5CB.js';
@@ -32,10 +32,10 @@ export { HookSlot, useIsClient } from '../chunk-5XDPAKF5.js';
32
32
  export { HookRegistry, defineHooks, hookRegistry } from '../chunk-GCPEMNSU.js';
33
33
  import '../chunk-QGOPTVV5.js';
34
34
  import '../chunk-TYNZ5B2B.js';
35
- import '../chunk-DBXH3EMJ.js';
35
+ import '../chunk-V5OF7CV4.js';
36
36
  import '../chunk-AXW67SY7.js';
37
- import '../chunk-SKLEJJ6M.js';
38
37
  import '../chunk-BYMOPN2S.js';
38
+ import '../chunk-SKLEJJ6M.js';
39
39
  export { useAsyncFn } from '../chunk-6BZ5TKEV.js';
40
40
  export { useTheme } from '../chunk-FZKRSGLP.js';
41
41
  import '../chunk-7V5HOZW4.js';
@@ -1,8 +1,8 @@
1
- export { useGtm } from '../chunk-PWTXR4RR.js';
2
- import '../chunk-X54QP332.js';
3
- import '../chunk-U55ZJC2X.js';
4
- import '../chunk-2JV6WZ6O.js';
1
+ export { useGtm } from '../chunk-CTCVO7YU.js';
2
+ import '../chunk-PKXEZRSJ.js';
3
+ import '../chunk-SYVIMWYW.js';
5
4
  import '../chunk-E7WWO3V3.js';
5
+ import '../chunk-2JV6WZ6O.js';
6
6
  import '../chunk-RV54D2D7.js';
7
7
  import '../chunk-ZVZGLEZ6.js';
8
8
  import '../chunk-VVZNW5CB.js';
@@ -32,10 +32,10 @@ import '../chunk-5XDPAKF5.js';
32
32
  import '../chunk-GCPEMNSU.js';
33
33
  import '../chunk-QGOPTVV5.js';
34
34
  import '../chunk-TYNZ5B2B.js';
35
- import '../chunk-DBXH3EMJ.js';
35
+ import '../chunk-V5OF7CV4.js';
36
36
  import '../chunk-AXW67SY7.js';
37
- import '../chunk-SKLEJJ6M.js';
38
37
  import '../chunk-BYMOPN2S.js';
38
+ import '../chunk-SKLEJJ6M.js';
39
39
  import '../chunk-6BZ5TKEV.js';
40
40
  import '../chunk-FZKRSGLP.js';
41
41
  import '../chunk-7V5HOZW4.js';
@@ -1,8 +1,8 @@
1
- export { useMoney } from '../chunk-PWTXR4RR.js';
2
- import '../chunk-X54QP332.js';
3
- import '../chunk-U55ZJC2X.js';
4
- import '../chunk-2JV6WZ6O.js';
1
+ export { useMoney } from '../chunk-CTCVO7YU.js';
2
+ import '../chunk-PKXEZRSJ.js';
3
+ import '../chunk-SYVIMWYW.js';
5
4
  import '../chunk-E7WWO3V3.js';
5
+ import '../chunk-2JV6WZ6O.js';
6
6
  import '../chunk-RV54D2D7.js';
7
7
  import '../chunk-ZVZGLEZ6.js';
8
8
  import '../chunk-VVZNW5CB.js';
@@ -32,10 +32,10 @@ import '../chunk-5XDPAKF5.js';
32
32
  import '../chunk-GCPEMNSU.js';
33
33
  import '../chunk-QGOPTVV5.js';
34
34
  import '../chunk-TYNZ5B2B.js';
35
- import '../chunk-DBXH3EMJ.js';
35
+ import '../chunk-V5OF7CV4.js';
36
36
  import '../chunk-AXW67SY7.js';
37
- import '../chunk-SKLEJJ6M.js';
38
37
  import '../chunk-BYMOPN2S.js';
38
+ import '../chunk-SKLEJJ6M.js';
39
39
  import '../chunk-6BZ5TKEV.js';
40
40
  import '../chunk-FZKRSGLP.js';
41
41
  import '../chunk-7V5HOZW4.js';