generator-white-label 5.0.0 → 8.0.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 (299) hide show
  1. package/.editorconfig +15 -0
  2. package/.yarnrc.yml +6 -0
  3. package/CLI.md +82 -0
  4. package/LICENSE +9 -0
  5. package/PACKAGE_MANAGERS.md +35 -0
  6. package/README.md +204 -124
  7. package/app/404.tsx +28 -0
  8. package/app/README.md +66 -8
  9. package/app/assets/data/view/global.json +7 -47
  10. package/app/assets/data/view/index.json +9 -1
  11. package/app/assets/script/index.tsx +13 -0
  12. package/app/assets/script/tasks/TaskApplication.ts +77 -0
  13. package/app/assets/script/tasks/TaskMediator.ts +20 -0
  14. package/app/assets/script/tasks/TaskModel.ts +32 -0
  15. package/app/assets/script/tasks/TaskRouter.ts +30 -0
  16. package/app/assets/script/tasks/TaskView.tsx +24 -0
  17. package/app/assets/style/global.css +111 -0
  18. package/app/assets/style/print.css +8 -0
  19. package/app/assets/view/CodeBlock.tsx +17 -0
  20. package/app/assets/view/examples/tasks/TaskExample.tsx +63 -0
  21. package/app/assets/view/examples/tasks/task-state.ts +46 -0
  22. package/app/assets/view/layout/SiteFooter.tsx +11 -0
  23. package/app/assets/view/layout/SiteHeader.tsx +23 -0
  24. package/app/assets/view/page-data.ts +14 -0
  25. package/app/assets/view/sections/GettingStartedSection.tsx +27 -0
  26. package/app/assets/view/sections/HeroSection.tsx +21 -0
  27. package/app/assets/view/sections/LiveExampleSection.tsx +29 -0
  28. package/app/assets/view/sections/PackageDocsSection.tsx +69 -0
  29. package/app/assets/view/sections/SourceGuideSection.tsx +28 -0
  30. package/app/index.tsx +54 -0
  31. package/cli/index.ts +117 -0
  32. package/dist/app/404.d.ts +1 -0
  33. package/dist/app/404.js +6 -0
  34. package/dist/app/404.js.map +1 -0
  35. package/dist/app/assets/script/index.d.ts +8 -2
  36. package/dist/app/assets/script/index.js +11 -1
  37. package/dist/app/assets/script/index.js.map +1 -1
  38. package/dist/app/assets/script/tasks/TaskApplication.d.ts +20 -0
  39. package/dist/app/assets/script/tasks/TaskApplication.js +63 -0
  40. package/dist/app/assets/script/tasks/TaskApplication.js.map +1 -0
  41. package/dist/app/assets/script/tasks/TaskMediator.d.ts +15 -0
  42. package/dist/app/assets/script/tasks/TaskMediator.js +5 -0
  43. package/dist/app/assets/script/tasks/TaskMediator.js.map +1 -0
  44. package/dist/app/assets/script/tasks/TaskModel.d.ts +13 -0
  45. package/dist/app/assets/script/tasks/TaskModel.js +33 -0
  46. package/dist/app/assets/script/tasks/TaskModel.js.map +1 -0
  47. package/dist/app/assets/script/tasks/TaskRouter.d.ts +12 -0
  48. package/dist/app/assets/script/tasks/TaskRouter.js +28 -0
  49. package/dist/app/assets/script/tasks/TaskRouter.js.map +1 -0
  50. package/dist/app/assets/script/tasks/TaskView.d.ts +9 -0
  51. package/dist/app/assets/script/tasks/TaskView.js +24 -0
  52. package/dist/app/assets/script/tasks/TaskView.js.map +1 -0
  53. package/dist/app/assets/view/CodeBlock.d.ts +11 -0
  54. package/dist/app/assets/view/CodeBlock.js +12 -0
  55. package/dist/app/assets/view/CodeBlock.js.map +1 -0
  56. package/dist/app/assets/view/examples/tasks/TaskExample.d.ts +11 -0
  57. package/dist/app/assets/view/examples/tasks/TaskExample.js +16 -0
  58. package/dist/app/assets/view/examples/tasks/TaskExample.js.map +1 -0
  59. package/dist/app/assets/view/examples/tasks/task-state.d.ts +22 -0
  60. package/dist/app/assets/view/examples/tasks/task-state.js +30 -0
  61. package/dist/app/assets/view/examples/tasks/task-state.js.map +1 -0
  62. package/dist/app/assets/view/layout/SiteFooter.d.ts +2 -0
  63. package/dist/app/assets/view/layout/SiteFooter.js +6 -0
  64. package/dist/app/assets/view/layout/SiteFooter.js.map +1 -0
  65. package/dist/app/assets/view/layout/SiteHeader.d.ts +8 -0
  66. package/dist/app/assets/view/layout/SiteHeader.js +12 -0
  67. package/dist/app/assets/view/layout/SiteHeader.js.map +1 -0
  68. package/dist/app/assets/view/page-data.d.ts +16 -0
  69. package/dist/app/assets/view/page-data.js +2 -0
  70. package/dist/app/assets/view/page-data.js.map +1 -0
  71. package/dist/app/assets/view/sections/GettingStartedSection.d.ts +2 -0
  72. package/dist/app/assets/view/sections/GettingStartedSection.js +11 -0
  73. package/dist/app/assets/view/sections/GettingStartedSection.js.map +1 -0
  74. package/dist/app/assets/view/sections/HeroSection.d.ts +8 -0
  75. package/dist/app/assets/view/sections/HeroSection.js +12 -0
  76. package/dist/app/assets/view/sections/HeroSection.js.map +1 -0
  77. package/dist/app/assets/view/sections/LiveExampleSection.d.ts +6 -0
  78. package/dist/app/assets/view/sections/LiveExampleSection.js +13 -0
  79. package/dist/app/assets/view/sections/LiveExampleSection.js.map +1 -0
  80. package/dist/app/assets/view/sections/PackageDocsSection.d.ts +2 -0
  81. package/dist/app/assets/view/sections/PackageDocsSection.js +31 -0
  82. package/dist/app/assets/view/sections/PackageDocsSection.js.map +1 -0
  83. package/dist/app/assets/view/sections/SourceGuideSection.d.ts +7 -0
  84. package/dist/app/assets/view/sections/SourceGuideSection.js +11 -0
  85. package/dist/app/assets/view/sections/SourceGuideSection.js.map +1 -0
  86. package/dist/app/index.d.ts +8 -0
  87. package/dist/app/index.js +22 -0
  88. package/dist/app/index.js.map +1 -0
  89. package/dist/cli/index.d.ts +13 -0
  90. package/dist/cli/index.js +97 -0
  91. package/dist/cli/index.js.map +1 -0
  92. package/dist/scaffold/index.d.ts +64 -0
  93. package/dist/scaffold/index.js +109 -0
  94. package/dist/scaffold/index.js.map +1 -0
  95. package/dist/scripts/build.d.ts +5 -13
  96. package/dist/scripts/build.js +48 -79
  97. package/dist/scripts/build.js.map +1 -1
  98. package/package.json +77 -40
  99. package/pnpm-workspace.yaml +4 -0
  100. package/scaffold/index.ts +127 -0
  101. package/scaffold/no-jsx/README.md +47 -0
  102. package/scaffold/no-jsx/app/404.ts +10 -0
  103. package/scaffold/no-jsx/app/assets/script/index.ts +7 -0
  104. package/scaffold/no-jsx/app/assets/script/tasks/TaskView.ts +19 -0
  105. package/scaffold/no-jsx/app/assets/view/examples/tasks/TaskExample.ts +39 -0
  106. package/scaffold/no-jsx/app/index.ts +58 -0
  107. package/scripts/build.ts +55 -86
  108. package/server/handler.ts +75 -0
  109. package/template-test/site.test.js +233 -0
  110. package/tsconfig.site.json +6 -5
  111. package/tsconfig.site.no-jsx.json +24 -0
  112. package/app/404.hbs +0 -20
  113. package/app/assets/data/coutries.json +0 -992
  114. package/app/assets/data/states.json +0 -204
  115. package/app/assets/data/view/toolkit/colors.json +0 -17
  116. package/app/assets/data/view/toolkit/components.json +0 -39
  117. package/app/assets/data/view/toolkit/elements.json +0 -119
  118. package/app/assets/data/view/toolkit/grids.json +0 -17
  119. package/app/assets/data/view/toolkit/icons.json +0 -17
  120. package/app/assets/data/view/toolkit/index.json +0 -17
  121. package/app/assets/data/view/toolkit/type.json +0 -17
  122. package/app/assets/font/opensans/LICENSE.txt +0 -202
  123. package/app/assets/font/opensans/opensans-bold-webfont.woff2 +0 -0
  124. package/app/assets/font/opensans/opensans-bolditalic-webfont.woff2 +0 -0
  125. package/app/assets/font/opensans/opensans-extrabold-webfont.woff2 +0 -0
  126. package/app/assets/font/opensans/opensans-extrabolditalic-webfont.woff2 +0 -0
  127. package/app/assets/font/opensans/opensans-italic-webfont.woff2 +0 -0
  128. package/app/assets/font/opensans/opensans-light-webfont.woff2 +0 -0
  129. package/app/assets/font/opensans/opensans-lightitalic-webfont.woff2 +0 -0
  130. package/app/assets/font/opensans/opensans-regular-webfont.woff2 +0 -0
  131. package/app/assets/font/opensans/opensans-semibold-webfont.woff2 +0 -0
  132. package/app/assets/font/opensans/opensans-semibolditalic-webfont.woff2 +0 -0
  133. package/app/assets/font/opensans/stylesheet.css +0 -120
  134. package/app/assets/image/apple-touch-icon.png +0 -0
  135. package/app/assets/image/demo/fallback.avif +0 -0
  136. package/app/assets/image/demo/fallback.jpg +0 -0
  137. package/app/assets/image/demo/fallback.webp +0 -0
  138. package/app/assets/image/demo/large.avif +0 -0
  139. package/app/assets/image/demo/large.webp +0 -0
  140. package/app/assets/image/demo/small.avif +0 -0
  141. package/app/assets/image/demo/small.webp +0 -0
  142. package/app/assets/image/favicon.png +0 -0
  143. package/app/assets/image/graphic-css3.svg +0 -30
  144. package/app/assets/image/graphic-html5.svg +0 -29
  145. package/app/assets/markup/element/a.hbs +0 -29
  146. package/app/assets/markup/element/button.hbs +0 -30
  147. package/app/assets/markup/element/div.hbs +0 -11
  148. package/app/assets/markup/element/head.hbs +0 -78
  149. package/app/assets/markup/element/iframe.hbs +0 -20
  150. package/app/assets/markup/element/img.hbs +0 -30
  151. package/app/assets/markup/element/input.hbs +0 -43
  152. package/app/assets/markup/element/label.hbs +0 -14
  153. package/app/assets/markup/element/legend.hbs +0 -5
  154. package/app/assets/markup/element/meta.hbs +0 -11
  155. package/app/assets/markup/element/nav.hbs +0 -13
  156. package/app/assets/markup/element/p.hbs +0 -8
  157. package/app/assets/markup/element/picture.hbs +0 -58
  158. package/app/assets/markup/element/script.hbs +0 -3
  159. package/app/assets/markup/element/select.hbs +0 -35
  160. package/app/assets/markup/element/span.hbs +0 -8
  161. package/app/assets/markup/element/svg.hbs +0 -11
  162. package/app/assets/markup/element/table.hbs +0 -50
  163. package/app/assets/markup/element/textarea.hbs +0 -24
  164. package/app/assets/markup/element/ul.hbs +0 -13
  165. package/app/assets/markup/modal/modal-example-1.handlebars +0 -8
  166. package/app/assets/markup/toolkit/accessibility-skip-to-element-1.handlebars +0 -1
  167. package/app/assets/markup/toolkit/accessibility-speaker-1.handlebars +0 -1
  168. package/app/assets/markup/toolkit/anchor-1.handlebars +0 -1
  169. package/app/assets/markup/toolkit/button-1.handlebars +0 -1
  170. package/app/assets/markup/toolkit/footer-1.handlebars +0 -3
  171. package/app/assets/markup/toolkit/header-1.handlebars +0 -1
  172. package/app/assets/markup/toolkit/heading-1.handlebars +0 -1
  173. package/app/assets/markup/toolkit/heading-2.handlebars +0 -1
  174. package/app/assets/markup/toolkit/heading-3.handlebars +0 -1
  175. package/app/assets/markup/toolkit/heading-4.handlebars +0 -1
  176. package/app/assets/markup/toolkit/image-1.handlebars +0 -1
  177. package/app/assets/markup/toolkit/input-checkbox-1.handlebars +0 -1
  178. package/app/assets/markup/toolkit/input-error-1.handlebars +0 -8
  179. package/app/assets/markup/toolkit/input-radio-1.handlebars +0 -1
  180. package/app/assets/markup/toolkit/input-text-1.handlebars +0 -1
  181. package/app/assets/markup/toolkit/label-1.handlebars +0 -1
  182. package/app/assets/markup/toolkit/legend-1.handlebars +0 -1
  183. package/app/assets/markup/toolkit/list-1.handlebars +0 -1
  184. package/app/assets/markup/toolkit/modal-1.handlebars +0 -4
  185. package/app/assets/markup/toolkit/nav-1.handlebars +0 -1
  186. package/app/assets/markup/toolkit/picture-1.handlebars +0 -1
  187. package/app/assets/markup/toolkit/select-1.handlebars +0 -1
  188. package/app/assets/markup/toolkit/table-1.handlebars +0 -1
  189. package/app/assets/markup/toolkit/text-1.handlebars +0 -1
  190. package/app/assets/markup/toolkit/textarea-1.handlebars +0 -1
  191. package/app/assets/markup/toolkit/youtube-player-1.handlebars +0 -1
  192. package/app/assets/script/api/facebook.ts +0 -41
  193. package/app/assets/script/api/youtube.ts +0 -22
  194. package/app/assets/script/index.ts +0 -2
  195. package/app/assets/script/mediator/global.ts +0 -4
  196. package/app/assets/script/model/singletons/countries.ts +0 -5
  197. package/app/assets/script/model/singletons/global.ts +0 -5
  198. package/app/assets/script/model/singletons/states.ts +0 -5
  199. package/app/assets/script/model/user.ts +0 -4
  200. package/app/assets/script/toolkit.ts +0 -11
  201. package/app/assets/script/types.d.ts +0 -16
  202. package/app/assets/script/utility/ajax.ts +0 -15
  203. package/app/assets/script/utility/form.ts +0 -119
  204. package/app/assets/script/utility/regex.ts +0 -26
  205. package/app/assets/script/utility/share.ts +0 -77
  206. package/app/assets/script/utility/string.ts +0 -148
  207. package/app/assets/script/view/default.tsx +0 -14
  208. package/app/assets/script/view/toolkit/youtube-player-1.ts +0 -31
  209. package/app/assets/style/base/_toolkit.scss +0 -39
  210. package/app/assets/style/base/colors/_colors.scss +0 -18
  211. package/app/assets/style/base/components/_modal-1.scss +0 -80
  212. package/app/assets/style/base/components/_sticky-1.scss +0 -19
  213. package/app/assets/style/base/components/_tabpanel-1.scss +0 -115
  214. package/app/assets/style/base/components/_tabpanel-2.scss +0 -64
  215. package/app/assets/style/base/components/_tabpanel-base-1.scss +0 -13
  216. package/app/assets/style/base/components/_youtube-player-1.scss +0 -16
  217. package/app/assets/style/base/elements/_anchors.scss +0 -27
  218. package/app/assets/style/base/elements/_buttons.scss +0 -25
  219. package/app/assets/style/base/elements/_fieldsets.scss +0 -9
  220. package/app/assets/style/base/elements/_images.scss +0 -8
  221. package/app/assets/style/base/elements/_inputs.scss +0 -78
  222. package/app/assets/style/base/elements/_labels.scss +0 -16
  223. package/app/assets/style/base/elements/_landmarks.scss +0 -3
  224. package/app/assets/style/base/elements/_legends.scss +0 -11
  225. package/app/assets/style/base/elements/_lists.scss +0 -15
  226. package/app/assets/style/base/elements/_pictures.scss +0 -4
  227. package/app/assets/style/base/elements/_tables.scss +0 -39
  228. package/app/assets/style/base/layouts/_staggered-1.scss +0 -29
  229. package/app/assets/style/base/type/_fonts.scss +0 -125
  230. package/app/assets/style/base/type/_headings.scss +0 -36
  231. package/app/assets/style/base/type/_text.scss +0 -9
  232. package/app/assets/style/base/utilities/_accessibility.scss +0 -55
  233. package/app/assets/style/base/utilities/_functions.scss +0 -98
  234. package/app/assets/style/base/utilities/_scroll.scss +0 -11
  235. package/app/assets/style/base/utilities/_type.scss +0 -13
  236. package/app/assets/style/global.scss +0 -123
  237. package/app/assets/style/print.scss +0 -6
  238. package/app/assets/style/toolkit.scss +0 -387
  239. package/app/index.hbs +0 -21
  240. package/app/robots.txt +0 -1
  241. package/app/toolkit/colors.hbs +0 -102
  242. package/app/toolkit/components.hbs +0 -261
  243. package/app/toolkit/elements.hbs +0 -497
  244. package/app/toolkit/grids.hbs +0 -413
  245. package/app/toolkit/icons.hbs +0 -87
  246. package/app/toolkit/index.hbs +0 -144
  247. package/app/toolkit/type.hbs +0 -120
  248. package/dist/app/assets/data/coutries.json +0 -992
  249. package/dist/app/assets/data/states.json +0 -204
  250. package/dist/app/assets/script/api/facebook.d.ts +0 -8
  251. package/dist/app/assets/script/api/facebook.js +0 -42
  252. package/dist/app/assets/script/api/facebook.js.map +0 -1
  253. package/dist/app/assets/script/api/youtube.d.ts +0 -8
  254. package/dist/app/assets/script/api/youtube.js +0 -22
  255. package/dist/app/assets/script/api/youtube.js.map +0 -1
  256. package/dist/app/assets/script/mediator/global.d.ts +0 -4
  257. package/dist/app/assets/script/mediator/global.js +0 -4
  258. package/dist/app/assets/script/mediator/global.js.map +0 -1
  259. package/dist/app/assets/script/model/singletons/countries.d.ts +0 -20
  260. package/dist/app/assets/script/model/singletons/countries.js +0 -5
  261. package/dist/app/assets/script/model/singletons/countries.js.map +0 -1
  262. package/dist/app/assets/script/model/singletons/global.d.ts +0 -20
  263. package/dist/app/assets/script/model/singletons/global.js +0 -5
  264. package/dist/app/assets/script/model/singletons/global.js.map +0 -1
  265. package/dist/app/assets/script/model/singletons/states.d.ts +0 -20
  266. package/dist/app/assets/script/model/singletons/states.js +0 -5
  267. package/dist/app/assets/script/model/singletons/states.js.map +0 -1
  268. package/dist/app/assets/script/model/user.d.ts +0 -4
  269. package/dist/app/assets/script/model/user.js +0 -6
  270. package/dist/app/assets/script/model/user.js.map +0 -1
  271. package/dist/app/assets/script/toolkit.d.ts +0 -1
  272. package/dist/app/assets/script/toolkit.js +0 -7
  273. package/dist/app/assets/script/toolkit.js.map +0 -1
  274. package/dist/app/assets/script/utility/ajax.d.ts +0 -8
  275. package/dist/app/assets/script/utility/ajax.js +0 -17
  276. package/dist/app/assets/script/utility/ajax.js.map +0 -1
  277. package/dist/app/assets/script/utility/form.d.ts +0 -64
  278. package/dist/app/assets/script/utility/form.js +0 -111
  279. package/dist/app/assets/script/utility/form.js.map +0 -1
  280. package/dist/app/assets/script/utility/regex.d.ts +0 -14
  281. package/dist/app/assets/script/utility/regex.js +0 -27
  282. package/dist/app/assets/script/utility/regex.js.map +0 -1
  283. package/dist/app/assets/script/utility/share.d.ts +0 -68
  284. package/dist/app/assets/script/utility/share.js +0 -81
  285. package/dist/app/assets/script/utility/share.js.map +0 -1
  286. package/dist/app/assets/script/utility/string.d.ts +0 -64
  287. package/dist/app/assets/script/utility/string.js +0 -135
  288. package/dist/app/assets/script/utility/string.js.map +0 -1
  289. package/dist/app/assets/script/view/default.d.ts +0 -11
  290. package/dist/app/assets/script/view/default.js +0 -15
  291. package/dist/app/assets/script/view/default.js.map +0 -1
  292. package/dist/app/assets/script/view/toolkit/youtube-player-1.d.ts +0 -23
  293. package/dist/app/assets/script/view/toolkit/youtube-player-1.js +0 -32
  294. package/dist/app/assets/script/view/toolkit/youtube-player-1.js.map +0 -1
  295. package/dist/generators/app/index.d.ts +0 -18
  296. package/dist/generators/app/index.js +0 -59
  297. package/dist/generators/app/index.js.map +0 -1
  298. package/generators/app/index.js +0 -2
  299. package/generators/app/index.ts +0 -61
@@ -0,0 +1,12 @@
1
+ import Router from 'white-label-router';
2
+ import type { TaskFilter } from '../../view/examples/tasks/task-state.js';
3
+ import type { TaskMediator } from './TaskMediator.js';
4
+ /** Normalize URL input at the routing boundary before it reaches domain state. */
5
+ export declare function normalizeTaskFilter(value: string | undefined): TaskFilter;
6
+ /**
7
+ * Router translates URL state into an application event.
8
+ *
9
+ * It does not update the Model or DOM directly. That separation keeps routing
10
+ * usable in different applications and makes browser navigation easy to test.
11
+ */
12
+ export declare function createTaskRouter(documentRoot: Document, mediator: TaskMediator): Router;
@@ -0,0 +1,28 @@
1
+ import Router from 'white-label-router';
2
+ const taskFilters = new Set(['all', 'active', 'completed']);
3
+ /** Normalize URL input at the routing boundary before it reaches domain state. */
4
+ export function normalizeTaskFilter(value) {
5
+ return value && taskFilters.has(value) ? value : 'all';
6
+ }
7
+ /**
8
+ * Router translates URL state into an application event.
9
+ *
10
+ * It does not update the Model or DOM directly. That separation keeps routing
11
+ * usable in different applications and makes browser navigation easy to test.
12
+ */
13
+ export function createTaskRouter(documentRoot, mediator) {
14
+ const router = new Router();
15
+ router.scope = documentRoot.querySelector('main');
16
+ router.mediator = mediator;
17
+ const route = (_scope, location) => {
18
+ const filter = normalizeTaskFilter(location.data.query.tasks);
19
+ const restoreFocus = documentRoot.activeElement?.hasAttribute('data-task-filter') === true;
20
+ mediator.emit('task:filter', filter);
21
+ if (restoreFocus) {
22
+ documentRoot.querySelector(`[data-task-filter="${filter}"]`).focus();
23
+ }
24
+ };
25
+ router.routes = { '/': route, defaultRoute: route };
26
+ return router.initialize();
27
+ }
28
+ //# sourceMappingURL=TaskRouter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskRouter.js","sourceRoot":"","sources":["../../../../../app/assets/script/tasks/TaskRouter.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAIxC,MAAM,WAAW,GAAG,IAAI,GAAG,CAAa,CAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;AAExE,kFAAkF;AAClF,MAAM,UAAU,mBAAmB,CAAC,KAAyB;IACzD,OAAO,KAAK,IAAI,WAAW,CAAC,GAAG,CAAC,KAAmB,CAAC,CAAC,CAAC,CAAC,KAAmB,CAAC,CAAC,CAAC,KAAK,CAAC;AACvF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,YAAsB,EAAE,QAAsB;IAC3E,MAAM,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;IAC5B,MAAM,CAAC,KAAK,GAAG,YAAY,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAClD,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,MAAM,KAAK,GAAG,CAAC,MAAsB,EAAE,QAAiD,EAAQ,EAAE;QAC9F,MAAM,MAAM,GAAG,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC9D,MAAM,YAAY,GAAG,YAAY,CAAC,aAAa,EAAE,YAAY,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;QAC3F,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;QACrC,IAAI,YAAY,EAAE,CAAC;YAAA,YAAY,CAAC,aAAa,CAAoB,sBAAsB,MAAM,IAAI,CAAE,CAAC,KAAK,EAAE,CAAC;QAAA,CAAC;IACjH,CAAC,CAAC;IACF,MAAM,CAAC,MAAM,GAAG,EAAC,GAAG,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAC,CAAC;IAClD,OAAO,MAAM,CAAC,UAAU,EAAE,CAAC;AAC/B,CAAC","sourcesContent":["import Router from 'white-label-router';\nimport type {TaskFilter} from '../../view/examples/tasks/task-state.js';\nimport type {TaskMediator} from './TaskMediator.js';\n\nconst taskFilters = new Set<TaskFilter>(['all', 'active', 'completed']);\n\n/** Normalize URL input at the routing boundary before it reaches domain state. */\nexport function normalizeTaskFilter(value: string | undefined): TaskFilter {\n return value && taskFilters.has(value as TaskFilter) ? value as TaskFilter : 'all';\n}\n\n/**\n * Router translates URL state into an application event.\n *\n * It does not update the Model or DOM directly. That separation keeps routing\n * usable in different applications and makes browser navigation easy to test.\n */\nexport function createTaskRouter(documentRoot: Document, mediator: TaskMediator): Router {\n const router = new Router();\n router.scope = documentRoot.querySelector('main');\n router.mediator = mediator;\n const route = (_scope: Element | null, location: {data: {query: Record<string, string>}}): void => {\n const filter = normalizeTaskFilter(location.data.query.tasks);\n const restoreFocus = documentRoot.activeElement?.hasAttribute('data-task-filter') === true;\n mediator.emit('task:filter', filter);\n if (restoreFocus) {documentRoot.querySelector<HTMLAnchorElement>(`[data-task-filter=\"${filter}\"]`)!.focus();}\n };\n router.routes = {'/': route, defaultRoute: route};\n return router.initialize();\n}\n"]}
@@ -0,0 +1,9 @@
1
+ import View from 'white-label-view';
2
+ import type TaskModel from './TaskModel.js';
3
+ /**
4
+ * View owns rendering, but not application decisions.
5
+ *
6
+ * Passing the already-rendered task root lets View adopt useful static HTML
7
+ * instead of replacing the document merely because JavaScript has started.
8
+ */
9
+ export declare function createTaskView(parentElement: HTMLElement, model: TaskModel): View;
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx } from "white-label-view/jsx-runtime";
2
+ import View from 'white-label-view';
3
+ import TaskExample from '../../view/examples/tasks/TaskExample.js';
4
+ /**
5
+ * View owns rendering, but not application decisions.
6
+ *
7
+ * Passing the already-rendered task root lets View adopt useful static HTML
8
+ * instead of replacing the document merely because JavaScript has started.
9
+ */
10
+ export function createTaskView(parentElement, model) {
11
+ const element = parentElement.querySelector('[data-task-app]');
12
+ if (!element) {
13
+ throw new TypeError('Task example requires its static task-app root');
14
+ }
15
+ return new View({
16
+ element,
17
+ model,
18
+ parentElement,
19
+ template(data) {
20
+ return _jsx(TaskExample, { state: data });
21
+ }
22
+ }).initialize();
23
+ }
24
+ //# sourceMappingURL=TaskView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskView.js","sourceRoot":"","sources":["../../../../../app/assets/script/tasks/TaskView.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,WAAW,MAAM,0CAA0C,CAAC;AAInE;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,aAA0B,EAAE,KAAgB;IACvE,MAAM,OAAO,GAAG,aAAa,CAAC,aAAa,CAAc,iBAAiB,CAAC,CAAC;IAC5E,IAAI,CAAC,OAAO,EAAE,CAAC;QAAA,MAAM,IAAI,SAAS,CAAC,gDAAgD,CAAC,CAAC;IAAA,CAAC;IAEtF,OAAO,IAAI,IAAI,CAAC;QACZ,OAAO;QACP,KAAK;QACL,aAAa;QACb,QAAQ,CAAC,IAAI;YACT,OAAO,KAAC,WAAW,IAAC,KAAK,EAAE,IAAiB,GAAI,CAAC;QACrD,CAAC;KACJ,CAAC,CAAC,UAAU,EAAE,CAAC;AACpB,CAAC","sourcesContent":["import View from 'white-label-view';\nimport TaskExample from '../../view/examples/tasks/TaskExample.js';\nimport type {TaskState} from '../../view/examples/tasks/task-state.js';\nimport type TaskModel from './TaskModel.js';\n\n/**\n * View owns rendering, but not application decisions.\n *\n * Passing the already-rendered task root lets View adopt useful static HTML\n * instead of replacing the document merely because JavaScript has started.\n */\nexport function createTaskView(parentElement: HTMLElement, model: TaskModel): View {\n const element = parentElement.querySelector<HTMLElement>('[data-task-app]');\n if (!element) {throw new TypeError('Task example requires its static task-app root');}\n\n return new View({\n element,\n model,\n parentElement,\n template(data) {\n return <TaskExample state={data as TaskState} />;\n }\n }).initialize();\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import type { JSX } from 'white-label-view/jsx-runtime';
2
+ export declare const syntax: {
3
+ keyword: string;
4
+ type: string;
5
+ value: string;
6
+ muted: string;
7
+ };
8
+ /** Render a readable code example with stable line numbers and caller-supplied syntax spans. */
9
+ export default function CodeBlock({ lines }: {
10
+ lines: JSX.Element[];
11
+ }): import("white-label-view/jsx-runtime").JSXMarkup;
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "white-label-view/jsx-runtime";
2
+ export const syntax = {
3
+ keyword: 'code-syntax-keyword',
4
+ type: 'code-syntax-type',
5
+ value: 'code-syntax-value',
6
+ muted: 'code-syntax-muted'
7
+ };
8
+ /** Render a readable code example with stable line numbers and caller-supplied syntax spans. */
9
+ export default function CodeBlock({ lines }) {
10
+ return (_jsx("pre", { className: "code-block", children: _jsx("code", { children: lines.map((line, index) => (_jsxs("span", { className: "code-block__line", children: [_jsx("span", { "aria-hidden": "true", className: "code-block__number", children: index + 1 }), _jsx("span", { children: line })] }))) }) }));
11
+ }
12
+ //# sourceMappingURL=CodeBlock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeBlock.js","sourceRoot":"","sources":["../../../../app/assets/view/CodeBlock.tsx"],"names":[],"mappings":";AAEA,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,OAAO,EAAE,qBAAqB;IAC9B,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,mBAAmB;IAC1B,KAAK,EAAE,mBAAmB;CAC7B,CAAC;AAEF,gGAAgG;AAChG,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAAC,KAAK,EAAyB;IAC7D,OAAO,CACH,cAAK,SAAS,EAAC,YAAY,YAAC,yBAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1D,gBAAM,SAAS,EAAC,kBAAkB,aAAC,8BAAkB,MAAM,EAAC,SAAS,EAAC,oBAAoB,YAAE,KAAK,GAAG,CAAC,GAAQ,EAAA,yBAAO,IAAI,GAAQ,IAAO,CAC1I,CAAC,GAAQ,GAAM,CACnB,CAAC;AACN,CAAC","sourcesContent":["import type {JSX} from 'white-label-view/jsx-runtime';\n\nexport const syntax = {\n keyword: 'code-syntax-keyword',\n type: 'code-syntax-type',\n value: 'code-syntax-value',\n muted: 'code-syntax-muted'\n};\n\n/** Render a readable code example with stable line numbers and caller-supplied syntax spans. */\nexport default function CodeBlock({lines}: {lines: JSX.Element[]}) {\n return (\n <pre className=\"code-block\"><code>{lines.map((line, index) => (\n <span className=\"code-block__line\"><span aria-hidden=\"true\" className=\"code-block__number\">{index + 1}</span><span>{line}</span></span>\n ))}</code></pre>\n );\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import { type TaskState } from './task-state.js';
2
+ /**
3
+ * Render the task example from state only.
4
+ *
5
+ * The same JSX function is used twice: once while generating the initial HTML
6
+ * and again by white-label-view in the browser. Sharing one renderer keeps the
7
+ * static and interactive versions of the example from drifting apart.
8
+ */
9
+ export default function TaskExample({ state }: {
10
+ state: TaskState;
11
+ }): import("white-label-view/jsx-runtime").JSXMarkup;
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "white-label-view/jsx-runtime";
2
+ import { getVisibleTasks } from './task-state.js';
3
+ const filters = ['all', 'active', 'completed'];
4
+ /**
5
+ * Render the task example from state only.
6
+ *
7
+ * The same JSX function is used twice: once while generating the initial HTML
8
+ * and again by white-label-view in the browser. Sharing one renderer keeps the
9
+ * static and interactive versions of the example from drifting apart.
10
+ */
11
+ export default function TaskExample({ state }) {
12
+ const visibleTasks = getVisibleTasks(state);
13
+ const completed = state.tasks.filter(task => task.complete).length;
14
+ return (_jsxs("section", { className: "task-app", "data-task-app": true, "aria-label": "Interactive task example", children: [_jsxs("form", { className: "task-form", "data-task-form": true, action: "#example", method: "get", children: [_jsx("label", { htmlFor: "task-title", children: "New task" }), _jsxs("div", { className: "task-form__controls", children: [_jsx("input", { id: "task-title", name: "task", type: "text", autocomplete: "off", required: true }), _jsx("button", { type: "submit", children: "Add task" })] })] }), _jsx("nav", { className: "task-filters", "aria-label": "Filter tasks", children: filters.map(filter => (_jsxs("a", { href: `/?tasks=${filter}#example`, "data-task-filter": filter, "data-pushstate": true, "aria-current": state.filter === filter ? 'page' : 'false', children: [filter.charAt(0).toUpperCase(), filter.slice(1)] }))) }), _jsx("ul", { className: "task-list", children: visibleTasks.map(task => (_jsx("li", { children: _jsxs("label", { children: [_jsx("input", { type: "checkbox", checked: task.complete, "data-task-toggle": true, "data-task-id": task.id }), _jsx("span", { children: task.title })] }) }))) }), _jsxs("dl", { className: "demo__trace", children: [_jsxs("div", { children: [_jsx("dt", { children: "Router" }), _jsxs("dd", { children: ["/?tasks=", state.filter] })] }), _jsxs("div", { children: [_jsx("dt", { children: "Mediator" }), _jsx("dd", { children: "task:* application events" })] }), _jsxs("div", { children: [_jsx("dt", { children: "Model" }), _jsxs("dd", { children: [state.tasks.length, " tasks \u00B7 ", completed, " complete"] })] }), _jsxs("div", { children: [_jsx("dt", { children: "View" }), _jsxs("dd", { children: [visibleTasks.length, " tasks rendered"] })] })] })] }));
15
+ }
16
+ //# sourceMappingURL=TaskExample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskExample.js","sourceRoot":"","sources":["../../../../../../app/assets/view/examples/tasks/TaskExample.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,eAAe,EAAkC,MAAM,iBAAiB,CAAC;AAEjF,MAAM,OAAO,GAAiB,CAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;AAE7D;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAC,KAAK,EAAqB;IAC3D,MAAM,YAAY,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC;IAEnE,OAAO,CACH,mBAAS,SAAS,EAAC,UAAU,uCAA0B,0BAA0B,aAC7E,gBAAM,SAAS,EAAC,WAAW,0BAAgB,MAAM,EAAC,UAAU,EAAC,MAAM,EAAC,KAAK,aACrE,gBAAO,OAAO,EAAC,YAAY,yBAAiB,EAC5C,eAAK,SAAS,EAAC,qBAAqB,aAChC,gBAAO,EAAE,EAAC,YAAY,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,MAAM,EAAC,YAAY,EAAC,KAAK,EAAC,QAAQ,SAAG,EAC7E,iBAAQ,IAAI,EAAC,QAAQ,yBAAkB,IACrC,IACH,EAEP,cAAK,SAAS,EAAC,cAAc,gBAAY,cAAc,YAClD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CACnB,aACI,IAAI,EAAE,WAAW,MAAM,UAAU,sBACf,MAAM,0CAEV,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,aAEvD,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAChD,CACP,CAAC,GACA,EAEN,aAAI,SAAS,EAAC,WAAW,YACpB,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACtB,uBACI,4BACI,gBACI,IAAI,EAAC,UAAU,EACf,OAAO,EAAE,IAAI,CAAC,QAAQ,4CAER,IAAI,CAAC,EAAE,GACvB,EACF,yBAAO,IAAI,CAAC,KAAK,GAAQ,IACrB,GACP,CACR,CAAC,GACD,EAEL,cAAI,SAAS,EAAC,aAAa,aACvB,0BAAK,kCAAe,EAAA,qCAAa,KAAK,CAAC,MAAM,IAAM,IAAM,EACzD,0BAAK,oCAAiB,EAAA,qDAAkC,IAAM,EAC9D,0BAAK,iCAAc,EAAA,yBAAK,KAAK,CAAC,KAAK,CAAC,MAAM,oBAAW,SAAS,iBAAe,IAAM,EACnF,0BAAK,gCAAa,EAAA,yBAAK,YAAY,CAAC,MAAM,uBAAqB,IAAM,IACpE,IACC,CACb,CAAC;AACN,CAAC","sourcesContent":["import {getVisibleTasks, type TaskFilter, type TaskState} from './task-state.js';\n\nconst filters: TaskFilter[] = ['all', 'active', 'completed'];\n\n/**\n * Render the task example from state only.\n *\n * The same JSX function is used twice: once while generating the initial HTML\n * and again by white-label-view in the browser. Sharing one renderer keeps the\n * static and interactive versions of the example from drifting apart.\n */\nexport default function TaskExample({state}: {state: TaskState}) {\n const visibleTasks = getVisibleTasks(state);\n const completed = state.tasks.filter(task => task.complete).length;\n\n return (\n <section className=\"task-app\" data-task-app aria-label=\"Interactive task example\">\n <form className=\"task-form\" data-task-form action=\"#example\" method=\"get\">\n <label htmlFor=\"task-title\">New task</label>\n <div className=\"task-form__controls\">\n <input id=\"task-title\" name=\"task\" type=\"text\" autocomplete=\"off\" required />\n <button type=\"submit\">Add task</button>\n </div>\n </form>\n\n <nav className=\"task-filters\" aria-label=\"Filter tasks\">\n {filters.map(filter => (\n <a\n href={`/?tasks=${filter}#example`}\n data-task-filter={filter}\n data-pushstate\n aria-current={state.filter === filter ? 'page' : 'false'}\n >\n {filter.charAt(0).toUpperCase()}{filter.slice(1)}\n </a>\n ))}\n </nav>\n\n <ul className=\"task-list\">\n {visibleTasks.map(task => (\n <li>\n <label>\n <input\n type=\"checkbox\"\n checked={task.complete}\n data-task-toggle\n data-task-id={task.id}\n />\n <span>{task.title}</span>\n </label>\n </li>\n ))}\n </ul>\n\n <dl className=\"demo__trace\">\n <div><dt>Router</dt><dd>/?tasks={state.filter}</dd></div>\n <div><dt>Mediator</dt><dd>task:* application events</dd></div>\n <div><dt>Model</dt><dd>{state.tasks.length} tasks · {completed} complete</dd></div>\n <div><dt>View</dt><dd>{visibleTasks.length} tasks rendered</dd></div>\n </dl>\n </section>\n );\n}\n"]}
@@ -0,0 +1,22 @@
1
+ /** Shared state shape used by build-time JSX and the browser application. */
2
+ export type TaskFilter = 'all' | 'active' | 'completed';
3
+ export interface TaskItem {
4
+ complete: boolean;
5
+ id: number;
6
+ title: string;
7
+ }
8
+ export interface TaskState extends Record<PropertyKey, unknown> {
9
+ filter: TaskFilter;
10
+ tasks: TaskItem[];
11
+ }
12
+ /** Return the tasks visible for the current filter. */
13
+ export declare function getVisibleTasks(state: TaskState): TaskItem[];
14
+ /** Describe the currently rendered task result for assistive technology. */
15
+ export declare function describeTaskStatus(state: TaskState): string;
16
+ /**
17
+ * Return fresh demo data for each application instance.
18
+ *
19
+ * A factory avoids sharing mutable state between tests, pages, or future
20
+ * server-side renders while keeping the initial HTML deterministic.
21
+ */
22
+ export declare function createInitialTaskState(): TaskState;
@@ -0,0 +1,30 @@
1
+ const taskPredicates = {
2
+ active: task => !task.complete,
3
+ all: () => true,
4
+ completed: task => task.complete
5
+ };
6
+ /** Return the tasks visible for the current filter. */
7
+ export function getVisibleTasks(state) {
8
+ return state.tasks.filter(taskPredicates[state.filter]);
9
+ }
10
+ /** Describe the currently rendered task result for assistive technology. */
11
+ export function describeTaskStatus(state) {
12
+ const visible = getVisibleTasks(state).length;
13
+ return `Showing ${visible} ${visible === 1 ? 'task' : 'tasks'} for the ${state.filter} filter.`;
14
+ }
15
+ /**
16
+ * Return fresh demo data for each application instance.
17
+ *
18
+ * A factory avoids sharing mutable state between tests, pages, or future
19
+ * server-side renders while keeping the initial HTML deterministic.
20
+ */
21
+ export function createInitialTaskState() {
22
+ return {
23
+ filter: 'all',
24
+ tasks: [
25
+ { complete: true, id: 1, title: 'Read the architecture' },
26
+ { complete: false, id: 2, title: 'Build something with White Label' }
27
+ ]
28
+ };
29
+ }
30
+ //# sourceMappingURL=task-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-state.js","sourceRoot":"","sources":["../../../../../../app/assets/view/examples/tasks/task-state.ts"],"names":[],"mappings":"AAcA,MAAM,cAAc,GAAoD;IACpE,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ;IAC9B,GAAG,EAAE,GAAG,EAAE,CAAC,IAAI;IACf,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ;CACnC,CAAC;AAEF,uDAAuD;AACvD,MAAM,UAAU,eAAe,CAAC,KAAgB;IAC5C,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,kBAAkB,CAAC,KAAgB;IAC/C,MAAM,OAAO,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;IAC9C,OAAO,WAAW,OAAO,IAAI,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,YAAY,KAAK,CAAC,MAAM,UAAU,CAAC;AACpG,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB;IAClC,OAAO;QACH,MAAM,EAAE,KAAK;QACb,KAAK,EAAE;YACH,EAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,uBAAuB,EAAC;YACvD,EAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,kCAAkC,EAAC;SACtE;KACJ,CAAC;AACN,CAAC","sourcesContent":["/** Shared state shape used by build-time JSX and the browser application. */\nexport type TaskFilter = 'all' | 'active' | 'completed';\n\nexport interface TaskItem {\n complete: boolean;\n id: number;\n title: string;\n}\n\nexport interface TaskState extends Record<PropertyKey, unknown> {\n filter: TaskFilter;\n tasks: TaskItem[];\n}\n\nconst taskPredicates: Record<TaskFilter, (task: TaskItem) => boolean> = {\n active: task => !task.complete,\n all: () => true,\n completed: task => task.complete\n};\n\n/** Return the tasks visible for the current filter. */\nexport function getVisibleTasks(state: TaskState): TaskItem[] {\n return state.tasks.filter(taskPredicates[state.filter]);\n}\n\n/** Describe the currently rendered task result for assistive technology. */\nexport function describeTaskStatus(state: TaskState): string {\n const visible = getVisibleTasks(state).length;\n return `Showing ${visible} ${visible === 1 ? 'task' : 'tasks'} for the ${state.filter} filter.`;\n}\n\n/**\n * Return fresh demo data for each application instance.\n *\n * A factory avoids sharing mutable state between tests, pages, or future\n * server-side renders while keeping the initial HTML deterministic.\n */\nexport function createInitialTaskState(): TaskState {\n return {\n filter: 'all',\n tasks: [\n {complete: true, id: 1, title: 'Read the architecture'},\n {complete: false, id: 2, title: 'Build something with White Label'}\n ]\n };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ /** A small reusable footer keeps the page template focused on page structure. */
2
+ export default function SiteFooter(): import("white-label-view/jsx-runtime").JSXMarkup;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "white-label-view/jsx-runtime";
2
+ /** A small reusable footer keeps the page template focused on page structure. */
3
+ export default function SiteFooter() {
4
+ return (_jsx("footer", { className: "site-footer", children: _jsxs("div", { className: "container site-footer__inner", children: [_jsx("p", { children: "White Label. Framework-independent TypeScript building blocks." }), _jsx("a", { href: "#top", children: "Back to top" })] }) }));
5
+ }
6
+ //# sourceMappingURL=SiteFooter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SiteFooter.js","sourceRoot":"","sources":["../../../../../app/assets/view/layout/SiteFooter.tsx"],"names":[],"mappings":";AAAA,iFAAiF;AACjF,MAAM,CAAC,OAAO,UAAU,UAAU;IAC9B,OAAO,CACH,iBAAQ,SAAS,EAAC,aAAa,YAC3B,eAAK,SAAS,EAAC,8BAA8B,aACzC,yFAAqE,EACrE,YAAG,IAAI,EAAC,MAAM,4BAAgB,IAC5B,GACD,CACZ,CAAC;AACN,CAAC","sourcesContent":["/** A small reusable footer keeps the page template focused on page structure. */\nexport default function SiteFooter() {\n return (\n <footer className=\"site-footer\">\n <div className=\"container site-footer__inner\">\n <p>White Label. Framework-independent TypeScript building blocks.</p>\n <a href=\"#top\">Back to top</a>\n </div>\n </footer>\n );\n}\n"]}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Static navigation is ordinary HTML first.
3
+ *
4
+ * White Label's router enhances only links that opt in with data-pushstate,
5
+ * so global navigation stays conventional, crawlable, and usable without
6
+ * client-side JavaScript.
7
+ */
8
+ export default function SiteHeader(): import("white-label-view/jsx-runtime").JSXMarkup;
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "white-label-view/jsx-runtime";
2
+ /**
3
+ * Static navigation is ordinary HTML first.
4
+ *
5
+ * White Label's router enhances only links that opt in with data-pushstate,
6
+ * so global navigation stays conventional, crawlable, and usable without
7
+ * client-side JavaScript.
8
+ */
9
+ export default function SiteHeader() {
10
+ return (_jsx("header", { className: "site-header", children: _jsxs("div", { className: "container site-header__inner", children: [_jsx("a", { className: "wordmark", href: "#top", children: "White Label" }), _jsxs("nav", { "aria-label": "Primary navigation", children: [_jsx("a", { href: "#example", children: "Example" }), _jsx("a", { href: "#packages", children: "Packages" }), _jsx("a", { href: "#source", children: "Source" }), _jsx("a", { href: "#start", children: "Get started" }), _jsx("a", { href: "https://github.com/bshack/white-label", children: "GitHub" })] })] }) }));
11
+ }
12
+ //# sourceMappingURL=SiteHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SiteHeader.js","sourceRoot":"","sources":["../../../../../app/assets/view/layout/SiteHeader.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU;IAC9B,OAAO,CACH,iBAAQ,SAAS,EAAC,aAAa,YAC3B,eAAK,SAAS,EAAC,8BAA8B,aACzC,YAAG,SAAS,EAAC,UAAU,EAAC,IAAI,EAAC,MAAM,4BAAgB,EACnD,6BAAgB,oBAAoB,aAChC,YAAG,IAAI,EAAC,UAAU,wBAAY,EAC9B,YAAG,IAAI,EAAC,WAAW,yBAAa,EAChC,YAAG,IAAI,EAAC,SAAS,uBAAW,EAC5B,YAAG,IAAI,EAAC,QAAQ,4BAAgB,EAChC,YAAG,IAAI,EAAC,uCAAuC,uBAAW,IACxD,IACJ,GACD,CACZ,CAAC;AACN,CAAC","sourcesContent":["/**\n * Static navigation is ordinary HTML first.\n *\n * White Label's router enhances only links that opt in with data-pushstate,\n * so global navigation stays conventional, crawlable, and usable without\n * client-side JavaScript.\n */\nexport default function SiteHeader() {\n return (\n <header className=\"site-header\">\n <div className=\"container site-header__inner\">\n <a className=\"wordmark\" href=\"#top\">White Label</a>\n <nav aria-label=\"Primary navigation\">\n <a href=\"#example\">Example</a>\n <a href=\"#packages\">Packages</a>\n <a href=\"#source\">Source</a>\n <a href=\"#start\">Get started</a>\n <a href=\"https://github.com/bshack/white-label\">GitHub</a>\n </nav>\n </div>\n </header>\n );\n}\n"]}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Build-time data available to every page template.
3
+ *
4
+ * Keeping this contract separate from the page component makes the top-level
5
+ * JSX read like application composition instead of deployment plumbing.
6
+ */
7
+ export interface PageData {
8
+ cdn: string;
9
+ meta: {
10
+ description: string;
11
+ };
12
+ siteUrl: string;
13
+ structuredData: unknown;
14
+ title: string;
15
+ version: string;
16
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=page-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-data.js","sourceRoot":"","sources":["../../../../app/assets/view/page-data.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Build-time data available to every page template.\n *\n * Keeping this contract separate from the page component makes the top-level\n * JSX read like application composition instead of deployment plumbing.\n */\nexport interface PageData {\n cdn: string;\n meta: {description: string};\n siteUrl: string;\n structuredData: unknown;\n title: string;\n version: string;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ /** Keep the shortest path from generator install to a verified local build visible. */
2
+ export default function GettingStartedSection(): import("white-label-view/jsx-runtime").JSXMarkup;
@@ -0,0 +1,11 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "white-label-view/jsx-runtime";
2
+ import CodeBlock, { syntax } from '../CodeBlock.js';
3
+ /** Keep the shortest path from generator install to a verified local build visible. */
4
+ export default function GettingStartedSection() {
5
+ return (_jsx("section", { className: "section", id: "start", "aria-labelledby": "start-title", children: _jsxs("div", { className: "container start-grid", children: [_jsxs("div", { className: "section-intro", children: [_jsx("p", { className: "eyebrow", children: "Get started" }), _jsx("h2", { id: "start-title", children: "Create a project with the generator." }), _jsx("p", { children: "The generated project is static-first, TypeScript-first, accessible by default, and ready for application-specific code." })] }), _jsxs("div", { children: [_jsx("p", { className: "code-label", children: "Create a project" }), _jsx(CodeBlock, { lines: [_jsxs(_Fragment, { children: [_jsx("span", { className: syntax.type, children: "npx" }), " generator-white-label"] })] }), _jsx("p", { className: "code-label", children: "Then develop" }), _jsx(CodeBlock, { lines: [
6
+ _jsxs(_Fragment, { children: [_jsx("span", { className: syntax.type, children: "npm" }), " ci"] }),
7
+ _jsxs(_Fragment, { children: [_jsx("span", { className: syntax.type, children: "npm" }), " test"] }),
8
+ _jsxs(_Fragment, { children: [_jsx("span", { className: syntax.type, children: "npm" }), " run build -- --version=", _jsx("span", { className: syntax.value, children: "local" })] })
9
+ ] }), _jsx("p", { children: _jsx("a", { href: "https://github.com/bshack/white-label#readme", children: "Read the complete generator documentation" }) })] })] }) }));
10
+ }
11
+ //# sourceMappingURL=GettingStartedSection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GettingStartedSection.js","sourceRoot":"","sources":["../../../../../app/assets/view/sections/GettingStartedSection.tsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,EAAE,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AAElD,uFAAuF;AACvF,MAAM,CAAC,OAAO,UAAU,qBAAqB;IACzC,OAAO,CACH,kBAAS,SAAS,EAAC,SAAS,EAAC,EAAE,EAAC,OAAO,qBAAiB,aAAa,YACjE,eAAK,SAAS,EAAC,sBAAsB,aACjC,eAAK,SAAS,EAAC,eAAe,aAC1B,YAAG,SAAS,EAAC,SAAS,4BAAgB,EACtC,aAAI,EAAE,EAAC,aAAa,qDAA0C,EAC9D,mJAA+H,IAC7H,EACN,0BACI,YAAG,SAAS,EAAC,YAAY,iCAAqB,EAC9C,KAAC,SAAS,IAAC,KAAK,EAAE,CAAC,8BAAE,eAAM,SAAS,EAAE,MAAM,CAAC,IAAI,oBAAY,8BAAyB,CAAC,GAAI,EAC3F,YAAG,SAAS,EAAC,YAAY,6BAAiB,EAC1C,KAAC,SAAS,IAAC,KAAK,EAAE;gCACd,8BAAE,eAAM,SAAS,EAAE,MAAM,CAAC,IAAI,oBAAY,WAAM;gCAChD,8BAAE,eAAM,SAAS,EAAE,MAAM,CAAC,IAAI,oBAAY,aAAQ;gCAClD,8BAAE,eAAM,SAAS,EAAE,MAAM,CAAC,IAAI,oBAAY,8BAAwB,eAAM,SAAS,EAAE,MAAM,CAAC,KAAK,sBAAc,IAAG;6BACnH,GAAI,EACL,sBAAG,YAAG,IAAI,EAAC,8CAA8C,0DAA8C,GAAI,IACzG,IACJ,GACA,CACb,CAAC;AACN,CAAC","sourcesContent":["import CodeBlock, {syntax} from '../CodeBlock.js';\n\n/** Keep the shortest path from generator install to a verified local build visible. */\nexport default function GettingStartedSection() {\n return (\n <section className=\"section\" id=\"start\" aria-labelledby=\"start-title\">\n <div className=\"container start-grid\">\n <div className=\"section-intro\">\n <p className=\"eyebrow\">Get started</p>\n <h2 id=\"start-title\">Create a project with the generator.</h2>\n <p>The generated project is static-first, TypeScript-first, accessible by default, and ready for application-specific code.</p>\n </div>\n <div>\n <p className=\"code-label\">Create a project</p>\n <CodeBlock lines={[<><span className={syntax.type}>npx</span> generator-white-label</>]} />\n <p className=\"code-label\">Then develop</p>\n <CodeBlock lines={[\n <><span className={syntax.type}>npm</span> ci</>,\n <><span className={syntax.type}>npm</span> test</>,\n <><span className={syntax.type}>npm</span> run build -- --version=<span className={syntax.value}>local</span></>\n ]} />\n <p><a href=\"https://github.com/bshack/white-label#readme\">Read the complete generator documentation</a></p>\n </div>\n </div>\n </section>\n );\n}\n"]}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Marketing content can stay a plain JSX function.
3
+ *
4
+ * White Label does not require every piece of markup to become a stateful
5
+ * View instance. Use View where lifecycle or observable state is useful;
6
+ * keep static presentation simple.
7
+ */
8
+ export default function HeroSection(): import("white-label-view/jsx-runtime").JSXMarkup;
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "white-label-view/jsx-runtime";
2
+ /**
3
+ * Marketing content can stay a plain JSX function.
4
+ *
5
+ * White Label does not require every piece of markup to become a stateful
6
+ * View instance. Use View where lifecycle or observable state is useful;
7
+ * keep static presentation simple.
8
+ */
9
+ export default function HeroSection() {
10
+ return (_jsx("section", { className: "hero", id: "top", "aria-labelledby": "hero-title", children: _jsxs("div", { className: "container hero__inner", children: [_jsxs("h1", { id: "hero-title", children: ["Small pieces.", _jsx("br", {}), "Complete applications."] }), _jsx("p", { className: "hero__lede", children: "Framework-independent TypeScript packages for state, rendering, coordination, routing, and project generation." }), _jsxs("div", { className: "hero__links", children: [_jsx("a", { className: "primary-link", href: "#example", children: "See the example" }), _jsx("a", { href: "#start", children: "Install the generator" })] })] }) }));
11
+ }
12
+ //# sourceMappingURL=HeroSection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeroSection.js","sourceRoot":"","sources":["../../../../../app/assets/view/sections/HeroSection.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW;IAC/B,OAAO,CACH,kBAAS,SAAS,EAAC,MAAM,EAAC,EAAE,EAAC,KAAK,qBAAiB,YAAY,YAC3D,eAAK,SAAS,EAAC,uBAAuB,aAClC,cAAI,EAAE,EAAC,YAAY,8BAAc,cAAM,8BAA2B,EAClE,YAAG,SAAS,EAAC,YAAY,+HAAmH,EAC5I,eAAK,SAAS,EAAC,aAAa,aACxB,YAAG,SAAS,EAAC,cAAc,EAAC,IAAI,EAAC,UAAU,gCAAoB,EAC/D,YAAG,IAAI,EAAC,QAAQ,sCAA0B,IACxC,IACJ,GACA,CACb,CAAC;AACN,CAAC","sourcesContent":["/**\n * Marketing content can stay a plain JSX function.\n *\n * White Label does not require every piece of markup to become a stateful\n * View instance. Use View where lifecycle or observable state is useful;\n * keep static presentation simple.\n */\nexport default function HeroSection() {\n return (\n <section className=\"hero\" id=\"top\" aria-labelledby=\"hero-title\">\n <div className=\"container hero__inner\">\n <h1 id=\"hero-title\">Small pieces.<br />Complete applications.</h1>\n <p className=\"hero__lede\">Framework-independent TypeScript packages for state, rendering, coordination, routing, and project generation.</p>\n <div className=\"hero__links\">\n <a className=\"primary-link\" href=\"#example\">See the example</a>\n <a href=\"#start\">Install the generator</a>\n </div>\n </div>\n </section>\n );\n}\n"]}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The initial task UI is rendered at build time with the same JSX used later
3
+ * by white-label-view in the browser. JavaScript adds behavior; it does not
4
+ * need to invent the initial document.
5
+ */
6
+ export default function LiveExampleSection(): import("white-label-view/jsx-runtime").JSXMarkup;
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "white-label-view/jsx-runtime";
2
+ import TaskExample from '../examples/tasks/TaskExample.js';
3
+ import { createInitialTaskState, describeTaskStatus } from '../examples/tasks/task-state.js';
4
+ /**
5
+ * The initial task UI is rendered at build time with the same JSX used later
6
+ * by white-label-view in the browser. JavaScript adds behavior; it does not
7
+ * need to invent the initial document.
8
+ */
9
+ export default function LiveExampleSection() {
10
+ const state = createInitialTaskState();
11
+ return (_jsx("section", { className: "section", id: "example", "aria-labelledby": "example-title", children: _jsxs("div", { className: "container", children: [_jsxs("div", { className: "section-intro", children: [_jsx("p", { className: "eyebrow", children: "Live example" }), _jsx("h2", { id: "example-title", children: "Four packages. One small application." }), _jsx("p", { children: "Add a task, toggle its state, or change the filter. Router translates the URL into intent, Mediator coordinates actions, Model owns state, and View keeps the interface in sync." })] }), _jsxs("div", { className: "demo", "data-task-example": true, children: [_jsx(TaskExample, { state: state }), _jsx("p", { className: "visually-hidden", role: "status", "aria-live": "polite", "aria-atomic": "true", "data-task-status": true, children: describeTaskStatus(state) })] })] }) }));
12
+ }
13
+ //# sourceMappingURL=LiveExampleSection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LiveExampleSection.js","sourceRoot":"","sources":["../../../../../app/assets/view/sections/LiveExampleSection.tsx"],"names":[],"mappings":";AAAA,OAAO,WAAW,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAC,sBAAsB,EAAE,kBAAkB,EAAC,MAAM,iCAAiC,CAAC;AAE3F;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB;IACtC,MAAM,KAAK,GAAG,sBAAsB,EAAE,CAAC;IAEvC,OAAO,CACH,kBAAS,SAAS,EAAC,SAAS,EAAC,EAAE,EAAC,SAAS,qBAAiB,eAAe,YACrE,eAAK,SAAS,EAAC,WAAW,aACtB,eAAK,SAAS,EAAC,eAAe,aAC1B,YAAG,SAAS,EAAC,SAAS,6BAAiB,EACvC,aAAI,EAAE,EAAC,eAAe,sDAA2C,EACjE,2MAAuL,IACrL,EACN,eAAK,SAAS,EAAC,MAAM,wCACjB,KAAC,WAAW,IAAC,KAAK,EAAE,KAAK,GAAI,EAC7B,YAAG,SAAS,EAAC,iBAAiB,EAAC,IAAI,EAAC,QAAQ,eAAW,QAAQ,iBAAa,MAAM,sCAC7E,kBAAkB,CAAC,KAAK,CAAC,GAC1B,IACF,IACJ,GACA,CACb,CAAC;AACN,CAAC","sourcesContent":["import TaskExample from '../examples/tasks/TaskExample.js';\nimport {createInitialTaskState, describeTaskStatus} from '../examples/tasks/task-state.js';\n\n/**\n * The initial task UI is rendered at build time with the same JSX used later\n * by white-label-view in the browser. JavaScript adds behavior; it does not\n * need to invent the initial document.\n */\nexport default function LiveExampleSection() {\n const state = createInitialTaskState();\n\n return (\n <section className=\"section\" id=\"example\" aria-labelledby=\"example-title\">\n <div className=\"container\">\n <div className=\"section-intro\">\n <p className=\"eyebrow\">Live example</p>\n <h2 id=\"example-title\">Four packages. One small application.</h2>\n <p>Add a task, toggle its state, or change the filter. Router translates the URL into intent, Mediator coordinates actions, Model owns state, and View keeps the interface in sync.</p>\n </div>\n <div className=\"demo\" data-task-example>\n <TaskExample state={state} />\n <p className=\"visually-hidden\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\" data-task-status>\n {describeTaskStatus(state)}\n </p>\n </div>\n </div>\n </section>\n );\n}\n"]}
@@ -0,0 +1,2 @@
1
+ /** Package documentation stays close to the example it describes. */
2
+ export default function PackageDocsSection(): import("white-label-view/jsx-runtime").JSXMarkup;
@@ -0,0 +1,31 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "white-label-view/jsx-runtime";
2
+ import CodeBlock, { syntax } from '../CodeBlock.js';
3
+ const repositories = {
4
+ mediator: 'https://github.com/bshack/white-label-mediator',
5
+ model: 'https://github.com/bshack/white-label-model',
6
+ router: 'https://github.com/bshack/white-label-router',
7
+ view: 'https://github.com/bshack/white-label-view'
8
+ };
9
+ /** Package documentation stays close to the example it describes. */
10
+ export default function PackageDocsSection() {
11
+ return (_jsx("section", { className: "section", id: "packages", "aria-labelledby": "packages-title", children: _jsxs("div", { className: "container", children: [_jsxs("div", { className: "section-intro", children: [_jsx("p", { className: "eyebrow", children: "Documentation" }), _jsx("h2", { id: "packages-title", children: "The core flow stays explicit." }), _jsx("p", { children: "Each package has one job, can be used independently, and stays easy to replace or test because application concerns are not hidden behind a framework." })] }), _jsx("div", { className: "architecture", children: _jsxs("ol", { children: [_jsxs("li", { children: [_jsx("strong", { children: "Router" }), _jsx("span", { children: "turns a URL into application intent" })] }), _jsxs("li", { children: [_jsx("strong", { children: "Mediator" }), _jsx("span", { children: "coordinates that intent between modules" })] }), _jsxs("li", { children: [_jsx("strong", { children: "Model" }), _jsx("span", { children: "stores and publishes application state" })] }), _jsxs("li", { children: [_jsx("strong", { children: "View" }), _jsx("span", { children: "renders the resulting interface" })] })] }) }), _jsxs("div", { className: "docs-grid", children: [_jsxs("article", { children: [_jsx("p", { className: "eyebrow", children: "Model" }), _jsx("h3", { children: "State is observable, not magical." }), _jsx(CodeBlock, { lines: [
12
+ _jsxs(_Fragment, { children: [_jsx("span", { className: syntax.keyword, children: "const" }), " model = ", _jsx("span", { className: syntax.keyword, children: "new" }), " ", _jsx("span", { className: syntax.type, children: "Model" }), "(", '{', "count: 0", '}', ");"] }),
13
+ _jsxs(_Fragment, { children: ["model.on(", _jsx("span", { className: syntax.value, children: "'change'" }), ", state => render(state));"] }),
14
+ _jsxs(_Fragment, { children: ["model.update(", '{', "count: 1", '}', ");"] })
15
+ ] }), _jsx("p", { children: _jsx("a", { href: repositories.model, children: "Model documentation" }) })] }), _jsxs("article", { children: [_jsx("p", { className: "eyebrow", children: "View" }), _jsx("h3", { children: "JSX renders through White Label." }), _jsx(CodeBlock, { lines: [
16
+ _jsxs(_Fragment, { children: [_jsx("span", { className: syntax.keyword, children: "const" }), " view = ", _jsx("span", { className: syntax.keyword, children: "new" }), " ", _jsx("span", { className: syntax.type, children: "View" }), "(", '{'] }),
17
+ _jsx(_Fragment, { children: " model," }),
18
+ _jsxs(_Fragment, { children: [" template: state => <p>", '{', "state.count", '}', "</p>"] }),
19
+ _jsxs(_Fragment, { children: ['}', ").initialize();"] })
20
+ ] }), _jsx("p", { children: _jsx("a", { href: repositories.view, children: "View documentation" }) })] }), _jsxs("article", { children: [_jsx("p", { className: "eyebrow", children: "Mediator" }), _jsx("h3", { children: "Modules communicate through events." }), _jsx(CodeBlock, { lines: [
21
+ _jsxs(_Fragment, { children: ["mediator.on(", _jsx("span", { className: syntax.value, children: "'counter:increment'" }), ", increment);"] }),
22
+ _jsxs(_Fragment, { children: ["mediator.emit(", _jsx("span", { className: syntax.value, children: "'counter:increment'" }), ");"] })
23
+ ] }), _jsx("p", { children: _jsx("a", { href: repositories.mediator, children: "Mediator documentation" }) })] }), _jsxs("article", { children: [_jsx("p", { className: "eyebrow", children: "Router" }), _jsx("h3", { children: "Routes describe intent." }), _jsx(CodeBlock, { lines: [
24
+ _jsxs(_Fragment, { children: ["router.routes = ", '{'] }),
25
+ _jsxs(_Fragment, { children: [" ", _jsx("span", { className: syntax.value, children: "'/'" }), ": (_scope, location) => ", '{'] }),
26
+ _jsxs(_Fragment, { children: [" mediator.emit(", _jsx("span", { className: syntax.value, children: "'filter:set'" }), ", location.data.query.filter);"] }),
27
+ _jsxs(_Fragment, { children: [" ", '}'] }),
28
+ _jsxs(_Fragment, { children: ['}', ";"] })
29
+ ] }), _jsx("p", { children: _jsx("a", { href: repositories.router, children: "Router documentation" }) })] })] })] }) }));
30
+ }
31
+ //# sourceMappingURL=PackageDocsSection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PackageDocsSection.js","sourceRoot":"","sources":["../../../../../app/assets/view/sections/PackageDocsSection.tsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,EAAE,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AAElD,MAAM,YAAY,GAAG;IACjB,QAAQ,EAAE,gDAAgD;IAC1D,KAAK,EAAE,6CAA6C;IACpD,MAAM,EAAE,8CAA8C;IACtD,IAAI,EAAE,4CAA4C;CACrD,CAAC;AAEF,qEAAqE;AACrE,MAAM,CAAC,OAAO,UAAU,kBAAkB;IACtC,OAAO,CACH,kBAAS,SAAS,EAAC,SAAS,EAAC,EAAE,EAAC,UAAU,qBAAiB,gBAAgB,YACvE,eAAK,SAAS,EAAC,WAAW,aACtB,eAAK,SAAS,EAAC,eAAe,aAC1B,YAAG,SAAS,EAAC,SAAS,8BAAkB,EACxC,aAAI,EAAE,EAAC,gBAAgB,8CAAmC,EAC1D,iLAA6J,IAC3J,EACN,cAAK,SAAS,EAAC,cAAc,YAAC,yBAC1B,yBAAI,sCAAuB,EAAA,iEAAgD,IAAK,EAChF,yBAAI,wCAAyB,EAAA,qEAAoD,IAAK,EACtF,yBAAI,qCAAsB,EAAA,oEAAmD,IAAK,EAClF,yBAAI,oCAAqB,EAAA,6DAA4C,IAAK,IACzE,GAAM,EACX,eAAK,SAAS,EAAC,WAAW,aACtB,8BACI,YAAG,SAAS,EAAC,SAAS,sBAAU,EAAA,6DAA0C,EAC1E,KAAC,SAAS,IAAC,KAAK,EAAE;wCACd,8BAAE,eAAM,SAAS,EAAE,MAAM,CAAC,OAAO,sBAAc,eAAS,eAAM,SAAS,EAAE,MAAM,CAAC,OAAO,oBAAY,OAAC,eAAM,SAAS,EAAE,MAAM,CAAC,IAAI,sBAAc,OAAE,GAAG,cAAU,GAAG,UAAM;wCACtK,2CAAW,eAAM,SAAS,EAAE,MAAM,CAAC,KAAK,yBAAiB,kCAAgC;wCACzF,+CAAgB,GAAG,cAAU,GAAG,UAAM;qCACzC,GAAI,EACL,sBAAG,YAAG,IAAI,EAAE,YAAY,CAAC,KAAK,oCAAyB,GAAI,IACrD,EACV,8BACI,YAAG,SAAS,EAAC,SAAS,qBAAS,EAAA,4DAAyC,EACxE,KAAC,SAAS,IAAC,KAAK,EAAE;wCACd,8BAAE,eAAM,SAAS,EAAE,MAAM,CAAC,OAAO,sBAAc,cAAQ,eAAM,SAAS,EAAE,MAAM,CAAC,OAAO,oBAAY,OAAC,eAAM,SAAS,EAAE,MAAM,CAAC,IAAI,qBAAa,OAAE,GAAG,IAAI;wCACrJ,yCAAa;wCACb,0DAAoC,GAAG,iBAAa,GAAG,YAAc;wCACrE,8BAAG,GAAG,uBAAmB;qCAC5B,GAAI,EACL,sBAAG,YAAG,IAAI,EAAE,YAAY,CAAC,IAAI,mCAAwB,GAAI,IACnD,EACV,8BACI,YAAG,SAAS,EAAC,SAAS,yBAAa,EAAA,+DAA4C,EAC/E,KAAC,SAAS,IAAC,KAAK,EAAE;wCACd,8CAAc,eAAM,SAAS,EAAE,MAAM,CAAC,KAAK,oCAA4B,qBAAgB;wCACvF,gDAAgB,eAAM,SAAS,EAAE,MAAM,CAAC,KAAK,oCAA4B,UAAK;qCACjF,GAAI,EACL,sBAAG,YAAG,IAAI,EAAE,YAAY,CAAC,QAAQ,uCAA4B,GAAI,IAC3D,EACV,8BACI,YAAG,SAAS,EAAC,SAAS,uBAAW,EAAA,mDAAgC,EACjE,KAAC,SAAS,IAAC,KAAK,EAAE;wCACd,kDAAmB,GAAG,IAAI;wCAC1B,oCAAI,eAAM,SAAS,EAAE,MAAM,CAAC,KAAK,oBAAY,8BAA4B,GAAG,IAAI;wCAChF,oDAAoB,eAAM,SAAS,EAAE,MAAM,CAAC,KAAK,6BAAqB,sCAAiC;wCACvG,oCAAK,GAAG,IAAI;wCACZ,8BAAG,GAAG,SAAK;qCACd,GAAI,EACL,sBAAG,YAAG,IAAI,EAAE,YAAY,CAAC,MAAM,qCAA0B,GAAI,IACvD,IACR,IACJ,GACA,CACb,CAAC;AACN,CAAC","sourcesContent":["import CodeBlock, {syntax} from '../CodeBlock.js';\n\nconst repositories = {\n mediator: 'https://github.com/bshack/white-label-mediator',\n model: 'https://github.com/bshack/white-label-model',\n router: 'https://github.com/bshack/white-label-router',\n view: 'https://github.com/bshack/white-label-view'\n};\n\n/** Package documentation stays close to the example it describes. */\nexport default function PackageDocsSection() {\n return (\n <section className=\"section\" id=\"packages\" aria-labelledby=\"packages-title\">\n <div className=\"container\">\n <div className=\"section-intro\">\n <p className=\"eyebrow\">Documentation</p>\n <h2 id=\"packages-title\">The core flow stays explicit.</h2>\n <p>Each package has one job, can be used independently, and stays easy to replace or test because application concerns are not hidden behind a framework.</p>\n </div>\n <div className=\"architecture\"><ol>\n <li><strong>Router</strong><span>turns a URL into application intent</span></li>\n <li><strong>Mediator</strong><span>coordinates that intent between modules</span></li>\n <li><strong>Model</strong><span>stores and publishes application state</span></li>\n <li><strong>View</strong><span>renders the resulting interface</span></li>\n </ol></div>\n <div className=\"docs-grid\">\n <article>\n <p className=\"eyebrow\">Model</p><h3>State is observable, not magical.</h3>\n <CodeBlock lines={[\n <><span className={syntax.keyword}>const</span> model = <span className={syntax.keyword}>new</span> <span className={syntax.type}>Model</span>({'{'}count: 0{'}'});</>,\n <>model.on(<span className={syntax.value}>'change'</span>, state =&gt; render(state));</>,\n <>model.update({'{'}count: 1{'}'});</>\n ]} />\n <p><a href={repositories.model}>Model documentation</a></p>\n </article>\n <article>\n <p className=\"eyebrow\">View</p><h3>JSX renders through White Label.</h3>\n <CodeBlock lines={[\n <><span className={syntax.keyword}>const</span> view = <span className={syntax.keyword}>new</span> <span className={syntax.type}>View</span>({'{'}</>,\n <> model,</>,\n <> template: state =&gt; &lt;p&gt;{'{'}state.count{'}'}&lt;/p&gt;</>,\n <>{'}'}).initialize();</>\n ]} />\n <p><a href={repositories.view}>View documentation</a></p>\n </article>\n <article>\n <p className=\"eyebrow\">Mediator</p><h3>Modules communicate through events.</h3>\n <CodeBlock lines={[\n <>mediator.on(<span className={syntax.value}>'counter:increment'</span>, increment);</>,\n <>mediator.emit(<span className={syntax.value}>'counter:increment'</span>);</>\n ]} />\n <p><a href={repositories.mediator}>Mediator documentation</a></p>\n </article>\n <article>\n <p className=\"eyebrow\">Router</p><h3>Routes describe intent.</h3>\n <CodeBlock lines={[\n <>router.routes = {'{'}</>,\n <> <span className={syntax.value}>'/'</span>: (_scope, location) =&gt; {'{'}</>,\n <> mediator.emit(<span className={syntax.value}>'filter:set'</span>, location.data.query.filter);</>,\n <> {'}'}</>,\n <>{'}'};</>\n ]} />\n <p><a href={repositories.router}>Router documentation</a></p>\n </article>\n </div>\n </div>\n </section>\n );\n}\n"]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Point learners at the implementation itself.
3
+ *
4
+ * The landing page is intentionally organized so each path answers a different
5
+ * question: composition, rendering, state, coordination, routing, or testing.
6
+ */
7
+ export default function SourceGuideSection(): import("white-label-view/jsx-runtime").JSXMarkup;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "white-label-view/jsx-runtime";
2
+ /**
3
+ * Point learners at the implementation itself.
4
+ *
5
+ * The landing page is intentionally organized so each path answers a different
6
+ * question: composition, rendering, state, coordination, routing, or testing.
7
+ */
8
+ export default function SourceGuideSection() {
9
+ return (_jsx("section", { className: "section", id: "source", "aria-labelledby": "source-title", children: _jsxs("div", { className: "container start-grid", children: [_jsxs("div", { className: "section-intro", children: [_jsx("p", { className: "eyebrow", children: "Read the source" }), _jsx("h2", { id: "source-title", children: "This site is part of the documentation." }), _jsx("p", { children: "The landing page is built with the same White Label packages it teaches. Start at the page composition, then follow the imports into the interactive example." })] }), _jsxs("div", { className: "source-paths", children: [_jsxs("dl", { children: [_jsxs("div", { children: [_jsx("dt", { children: "Page composition" }), _jsx("dd", { children: _jsx("code", { children: "app/index.tsx" }) })] }), _jsxs("div", { children: [_jsx("dt", { children: "Static JSX views" }), _jsx("dd", { children: _jsx("code", { children: "app/assets/view/" }) })] }), _jsxs("div", { children: [_jsx("dt", { children: "Task application" }), _jsx("dd", { children: _jsx("code", { children: "app/assets/script/tasks/" }) })] }), _jsxs("div", { children: [_jsx("dt", { children: "Integration tests" }), _jsx("dd", { children: _jsx("code", { children: "test/app.test.js" }) })] })] }), _jsx("p", { children: _jsx("a", { href: "https://github.com/bshack/white-label/tree/master/app", children: "Browse the application source" }) })] })] }) }));
10
+ }
11
+ //# sourceMappingURL=SourceGuideSection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SourceGuideSection.js","sourceRoot":"","sources":["../../../../../app/assets/view/sections/SourceGuideSection.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB;IACtC,OAAO,CACH,kBAAS,SAAS,EAAC,SAAS,EAAC,EAAE,EAAC,QAAQ,qBAAiB,cAAc,YACnE,eAAK,SAAS,EAAC,sBAAsB,aACjC,eAAK,SAAS,EAAC,eAAe,aAC1B,YAAG,SAAS,EAAC,SAAS,gCAAoB,EAC1C,aAAI,EAAE,EAAC,cAAc,wDAA6C,EAClE,wLAAoK,IAClK,EACN,eAAK,SAAS,EAAC,cAAc,aACzB,yBACI,0BAAK,4CAAyB,EAAA,uBAAI,2CAA0B,GAAK,IAAM,EACvE,0BAAK,4CAAyB,EAAA,uBAAI,8CAA6B,GAAK,IAAM,EAC1E,0BAAK,4CAAyB,EAAA,uBAAI,sDAAqC,GAAK,IAAM,EAClF,0BAAK,6CAA0B,EAAA,uBAAI,8CAA6B,GAAK,IAAM,IAC1E,EACL,sBAAG,YAAG,IAAI,EAAC,uDAAuD,8CAAkC,GAAI,IACtG,IACJ,GACA,CACb,CAAC;AACN,CAAC","sourcesContent":["/**\n * Point learners at the implementation itself.\n *\n * The landing page is intentionally organized so each path answers a different\n * question: composition, rendering, state, coordination, routing, or testing.\n */\nexport default function SourceGuideSection() {\n return (\n <section className=\"section\" id=\"source\" aria-labelledby=\"source-title\">\n <div className=\"container start-grid\">\n <div className=\"section-intro\">\n <p className=\"eyebrow\">Read the source</p>\n <h2 id=\"source-title\">This site is part of the documentation.</h2>\n <p>The landing page is built with the same White Label packages it teaches. Start at the page composition, then follow the imports into the interactive example.</p>\n </div>\n <div className=\"source-paths\">\n <dl>\n <div><dt>Page composition</dt><dd><code>app/index.tsx</code></dd></div>\n <div><dt>Static JSX views</dt><dd><code>app/assets/view/</code></dd></div>\n <div><dt>Task application</dt><dd><code>app/assets/script/tasks/</code></dd></div>\n <div><dt>Integration tests</dt><dd><code>test/app.test.js</code></dd></div>\n </dl>\n <p><a href=\"https://github.com/bshack/white-label/tree/master/app\">Browse the application source</a></p>\n </div>\n </div>\n </section>\n );\n}\n"]}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The page template is intentionally thin.
3
+ *
4
+ * Developers learning White Label can start here to see the complete page at
5
+ * a glance, then follow each import into a focused example. Build-time data is
6
+ * kept at this boundary while individual views stay reusable and easy to read.
7
+ */
8
+ export default function IndexPage(data: Record<string, unknown>): import("white-label-view/jsx-runtime").JSXMarkup;
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "white-label-view/jsx-runtime";
2
+ import { raw } from 'white-label-view/jsx-runtime';
3
+ import SiteFooter from './assets/view/layout/SiteFooter.js';
4
+ import SiteHeader from './assets/view/layout/SiteHeader.js';
5
+ import GettingStartedSection from './assets/view/sections/GettingStartedSection.js';
6
+ import HeroSection from './assets/view/sections/HeroSection.js';
7
+ import LiveExampleSection from './assets/view/sections/LiveExampleSection.js';
8
+ import PackageDocsSection from './assets/view/sections/PackageDocsSection.js';
9
+ import SourceGuideSection from './assets/view/sections/SourceGuideSection.js';
10
+ /**
11
+ * The page template is intentionally thin.
12
+ *
13
+ * Developers learning White Label can start here to see the complete page at
14
+ * a glance, then follow each import into a focused example. Build-time data is
15
+ * kept at this boundary while individual views stay reusable and easy to read.
16
+ */
17
+ export default function IndexPage(data) {
18
+ const page = data;
19
+ const structuredData = JSON.stringify(page.structuredData).replaceAll('<', '\\u003c');
20
+ return (_jsxs("html", { id: "index", lang: "en-US", dir: "ltr", children: [_jsxs("head", { children: [_jsx("meta", { charset: "utf-8" }), _jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }), _jsx("title", { children: page.title }), _jsx("meta", { name: "description", content: page.meta.description }), _jsx("meta", { name: "robots", content: "index,follow,max-image-preview:large,max-snippet:-1,max-video-preview:-1" }), _jsx("link", { rel: "canonical", href: `${page.siteUrl}/` }), _jsx("meta", { property: "og:title", content: page.title }), _jsx("meta", { property: "og:description", content: page.meta.description }), _jsx("meta", { property: "og:type", content: "website" }), _jsx("meta", { property: "og:url", content: `${page.siteUrl}/` }), _jsx("link", { rel: "stylesheet", href: `${page.cdn}release/${page.version}/assets/style/global.css`, media: "all" }), _jsx("link", { rel: "stylesheet", href: `${page.cdn}release/${page.version}/assets/style/print.css`, media: "print" }), _jsx("script", { type: "application/ld+json", children: raw(structuredData) })] }), _jsxs("body", { itemscope: true, itemtype: "https://schema.org/WebPage", children: [_jsx("a", { className: "skip-link", href: "#main", children: "Skip to content" }), _jsx(SiteHeader, {}), _jsxs("main", { id: "main", tabindex: "-1", children: [_jsx(HeroSection, {}), _jsx(LiveExampleSection, {}), _jsx(PackageDocsSection, {}), _jsx(SourceGuideSection, {}), _jsx(GettingStartedSection, {})] }), _jsx(SiteFooter, {}), _jsx("script", { src: `${page.cdn}release/${page.version}/assets/script/index.compiled.js`, defer: true })] })] }));
21
+ }
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../app/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,8BAA8B,CAAC;AACjD,OAAO,UAAU,MAAM,oCAAoC,CAAC;AAC5D,OAAO,UAAU,MAAM,oCAAoC,CAAC;AAE5D,OAAO,qBAAqB,MAAM,iDAAiD,CAAC;AACpF,OAAO,WAAW,MAAM,uCAAuC,CAAC;AAChE,OAAO,kBAAkB,MAAM,8CAA8C,CAAC;AAC9E,OAAO,kBAAkB,MAAM,8CAA8C,CAAC;AAC9E,OAAO,kBAAkB,MAAM,8CAA8C,CAAC;AAE9E;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,IAA6B;IAC3D,MAAM,IAAI,GAAG,IAA2B,CAAC;IACzC,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAEtF,OAAO,CACH,gBAAM,EAAE,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,EAAC,GAAG,EAAC,KAAK,aACnC,2BACI,eAAM,OAAO,EAAC,OAAO,GAAG,EACxB,eAAM,IAAI,EAAC,UAAU,EAAC,OAAO,EAAC,qCAAqC,GAAG,EACtE,0BAAQ,IAAI,CAAC,KAAK,GAAS,EAC3B,eAAM,IAAI,EAAC,aAAa,EAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,GAAI,EAC3D,eAAM,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAC,0EAA0E,GAAG,EACzG,eAAM,GAAG,EAAC,WAAW,EAAC,IAAI,EAAE,GAAG,IAAI,CAAC,OAAO,GAAG,GAAI,EAClD,eAAM,QAAQ,EAAC,UAAU,EAAC,OAAO,EAAE,IAAI,CAAC,KAAK,GAAI,EACjD,eAAM,QAAQ,EAAC,gBAAgB,EAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,GAAI,EAClE,eAAM,QAAQ,EAAC,SAAS,EAAC,OAAO,EAAC,SAAS,GAAG,EAC7C,eAAM,QAAQ,EAAC,QAAQ,EAAC,OAAO,EAAE,GAAG,IAAI,CAAC,OAAO,GAAG,GAAI,EACvD,eAAM,GAAG,EAAC,YAAY,EAAC,IAAI,EAAE,GAAG,IAAI,CAAC,GAAG,WAAW,IAAI,CAAC,OAAO,0BAA0B,EAAE,KAAK,EAAC,KAAK,GAAG,EACzG,eAAM,GAAG,EAAC,YAAY,EAAC,IAAI,EAAE,GAAG,IAAI,CAAC,GAAG,WAAW,IAAI,CAAC,OAAO,yBAAyB,EAAE,KAAK,EAAC,OAAO,GAAG,EAC1G,iBAAQ,IAAI,EAAC,qBAAqB,YAAE,GAAG,CAAC,cAAc,CAAC,GAAU,IAC9D,EACP,gBAAM,SAAS,QAAC,QAAQ,EAAC,4BAA4B,aACjD,YAAG,SAAS,EAAC,WAAW,EAAC,IAAI,EAAC,OAAO,gCAAoB,EACzD,KAAC,UAAU,KAAG,EACd,gBAAM,EAAE,EAAC,MAAM,EAAC,QAAQ,EAAC,IAAI,aACzB,KAAC,WAAW,KAAG,EACf,KAAC,kBAAkB,KAAG,EACtB,KAAC,kBAAkB,KAAG,EACtB,KAAC,kBAAkB,KAAG,EACtB,KAAC,qBAAqB,KAAG,IACtB,EACP,KAAC,UAAU,KAAG,EACd,iBAAQ,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,WAAW,IAAI,CAAC,OAAO,kCAAkC,EAAE,KAAK,SAAG,IACxF,IACJ,CACV,CAAC;AACN,CAAC","sourcesContent":["import {raw} from 'white-label-view/jsx-runtime';\nimport SiteFooter from './assets/view/layout/SiteFooter.js';\nimport SiteHeader from './assets/view/layout/SiteHeader.js';\nimport type {PageData} from './assets/view/page-data.js';\nimport GettingStartedSection from './assets/view/sections/GettingStartedSection.js';\nimport HeroSection from './assets/view/sections/HeroSection.js';\nimport LiveExampleSection from './assets/view/sections/LiveExampleSection.js';\nimport PackageDocsSection from './assets/view/sections/PackageDocsSection.js';\nimport SourceGuideSection from './assets/view/sections/SourceGuideSection.js';\n\n/**\n * The page template is intentionally thin.\n *\n * Developers learning White Label can start here to see the complete page at\n * a glance, then follow each import into a focused example. Build-time data is\n * kept at this boundary while individual views stay reusable and easy to read.\n */\nexport default function IndexPage(data: Record<string, unknown>) {\n const page = data as unknown as PageData;\n const structuredData = JSON.stringify(page.structuredData).replaceAll('<', '\\\\u003c');\n\n return (\n <html id=\"index\" lang=\"en-US\" dir=\"ltr\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <title>{page.title}</title>\n <meta name=\"description\" content={page.meta.description} />\n <meta name=\"robots\" content=\"index,follow,max-image-preview:large,max-snippet:-1,max-video-preview:-1\" />\n <link rel=\"canonical\" href={`${page.siteUrl}/`} />\n <meta property=\"og:title\" content={page.title} />\n <meta property=\"og:description\" content={page.meta.description} />\n <meta property=\"og:type\" content=\"website\" />\n <meta property=\"og:url\" content={`${page.siteUrl}/`} />\n <link rel=\"stylesheet\" href={`${page.cdn}release/${page.version}/assets/style/global.css`} media=\"all\" />\n <link rel=\"stylesheet\" href={`${page.cdn}release/${page.version}/assets/style/print.css`} media=\"print\" />\n <script type=\"application/ld+json\">{raw(structuredData)}</script>\n </head>\n <body itemscope itemtype=\"https://schema.org/WebPage\">\n <a className=\"skip-link\" href=\"#main\">Skip to content</a>\n <SiteHeader />\n <main id=\"main\" tabindex=\"-1\">\n <HeroSection />\n <LiveExampleSection />\n <PackageDocsSection />\n <SourceGuideSection />\n <GettingStartedSection />\n </main>\n <SiteFooter />\n <script src={`${page.cdn}release/${page.version}/assets/script/index.compiled.js`} defer />\n </body>\n </html>\n );\n}\n"]}
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ import { createProject } from '../scaffold/index.js';
3
+ export interface CliDependencies {
4
+ cwd?: () => string;
5
+ createProject?: typeof createProject;
6
+ stdout?: Pick<NodeJS.WriteStream, 'write'>;
7
+ stderr?: Pick<NodeJS.WriteStream, 'write'>;
8
+ input?: NodeJS.ReadableStream;
9
+ output?: NodeJS.WritableStream;
10
+ isInteractive?: boolean;
11
+ }
12
+ export declare function formatCliError(error: unknown): string;
13
+ export declare function runCli(args: readonly string[], dependencies?: CliDependencies): Promise<0 | 1>;