@supersoniks/concorde 5.1.1 → 5.1.3-immutable.1

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 (459) hide show
  1. package/.agents/skills/concorde-docs/SKILL.md +153 -0
  2. package/.agents/skills/{concorde-component-docs/template.md → concorde-docs/templates/component.md} +6 -2
  3. package/.agents/skills/concorde-docs/templates/decorator.md +43 -0
  4. package/.agents/skills/concorde-docs/templates/guide.md +25 -0
  5. package/.claude/skills +1 -0
  6. package/.github/workflows/ci.yml +21 -0
  7. package/.github-export-ignore +30 -0
  8. package/CONTRIBUTING.md +59 -0
  9. package/DEV.md +54 -0
  10. package/LICENSE +21 -0
  11. package/OPEN_SOURCE_CHECKPOINT.md +133 -0
  12. package/README.md +4 -4
  13. package/ai/README.md +29 -41
  14. package/ai/skills/concorde/SKILL.md +54 -324
  15. package/ai/skills/concorde/rules/composition.md +32 -0
  16. package/ai/skills/concorde/rules/data.md +47 -0
  17. package/ai/skills/concorde/rules/http.md +25 -0
  18. package/ai/skills/concorde/rules/lists-forms.md +35 -0
  19. package/ai/skills/concorde/rules/styling.md +46 -0
  20. package/ai/skills/concorde/rules/troubleshooting.md +45 -0
  21. package/build-infos.json +1 -1
  22. package/concorde-core.bundle.js +177 -177
  23. package/concorde-core.es.js +4993 -4833
  24. package/custom-elements-manifest.public.config.mjs +8 -0
  25. package/{.tmp-cem/custom-elements.json → custom-elements.json} +11758 -8904
  26. package/dist/concorde-core.bundle.js +177 -177
  27. package/dist/concorde-core.es.js +4993 -4833
  28. package/dist/docs-mock-api-sw.js +58 -223
  29. package/dist/docs-mock-api-sw.js.map +4 -4
  30. package/dist/img/concorde/plane_01.jpg +0 -0
  31. package/dist/img/concorde/plane_02.jpg +0 -0
  32. package/dist/img/concorde/plane_03.jpg +0 -0
  33. package/dist/img/concorde/plane_04.jpg +0 -0
  34. package/dist/img/concorde/plane_05.jpg +0 -0
  35. package/dist/img/concorde/plane_06.jpg +0 -0
  36. package/dist/img/concorde/plane_07.jpg +0 -0
  37. package/dist/img/concorde/plane_08.jpg +0 -0
  38. package/dist/img/concorde/plane_09.jpg +0 -0
  39. package/dist/img/concorde/plane_10.jpg +0 -0
  40. package/dist/img/concorde/plane_11.jpg +0 -0
  41. package/dist/img/concorde/plane_12.jpg +0 -0
  42. package/dist/img/concorde/plane_13.jpg +0 -0
  43. package/dist/img/og-concorde.jpg +0 -0
  44. package/dist/robots.txt +11 -10
  45. package/docs/assets/index-D_alEsng.js +12122 -0
  46. package/docs/crawl/core/components/functional/date/date.html +190 -0
  47. package/docs/crawl/core/components/functional/fetch/fetch.html +109 -0
  48. package/docs/crawl/core/components/functional/if/if.html +27 -0
  49. package/docs/crawl/core/components/functional/jsonata/jsonata.html +79 -0
  50. package/docs/crawl/core/components/functional/list/list.html +70 -0
  51. package/docs/crawl/core/components/functional/mix/mix.html +45 -0
  52. package/docs/crawl/core/components/functional/queue/queue.html +96 -0
  53. package/docs/crawl/core/components/functional/router/router.html +106 -0
  54. package/docs/crawl/core/components/functional/sdui/sdui-extension-points.html +126 -0
  55. package/docs/crawl/core/components/functional/sdui/sdui.html +368 -0
  56. package/docs/crawl/core/components/functional/states/states.html +66 -0
  57. package/docs/crawl/core/components/functional/submit/submit.html +160 -0
  58. package/docs/crawl/core/components/functional/subscriber/subscriber.html +67 -0
  59. package/docs/crawl/core/components/functional/value/value.html +51 -0
  60. package/docs/crawl/core/components/ui/alert/alert.html +211 -0
  61. package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +131 -0
  62. package/docs/crawl/core/components/ui/badge/badge.html +197 -0
  63. package/docs/crawl/core/components/ui/button/button.html +150 -0
  64. package/docs/crawl/core/components/ui/captcha/captcha.html +112 -0
  65. package/docs/crawl/core/components/ui/card/card.html +253 -0
  66. package/docs/crawl/core/components/ui/divider/divider.html +144 -0
  67. package/docs/crawl/core/components/ui/form/checkbox/checkbox.html +73 -0
  68. package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +266 -0
  69. package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +122 -0
  70. package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +121 -0
  71. package/docs/crawl/core/components/ui/form/input/input.html +109 -0
  72. package/docs/crawl/core/components/ui/form/input-autocomplete/input-autocomplete.html +38 -0
  73. package/docs/crawl/core/components/ui/form/radio/radio.html +56 -0
  74. package/docs/crawl/core/components/ui/form/select/select.html +73 -0
  75. package/docs/crawl/core/components/ui/form/switch/switch.html +56 -0
  76. package/docs/crawl/core/components/ui/form/textarea/textarea.html +59 -0
  77. package/docs/crawl/core/components/ui/group/group.html +104 -0
  78. package/docs/crawl/core/components/ui/icon/icon.html +222 -0
  79. package/docs/crawl/core/components/ui/image/image.html +298 -0
  80. package/docs/crawl/core/components/ui/link/link.html +100 -0
  81. package/docs/crawl/core/components/ui/loader/loader.html +124 -0
  82. package/docs/crawl/core/components/ui/menu/menu.html +394 -0
  83. package/docs/crawl/core/components/ui/modal/modal.html +342 -0
  84. package/docs/crawl/core/components/ui/pop/pop.html +296 -0
  85. package/docs/crawl/core/components/ui/progress/progress.html +131 -0
  86. package/docs/crawl/core/components/ui/table/table.html +545 -0
  87. package/docs/crawl/core/components/ui/theme/theme.html +131 -0
  88. package/docs/crawl/core/components/ui/toast/toast.html +233 -0
  89. package/docs/crawl/core/components/ui/tooltip/tooltip.html +140 -0
  90. package/docs/crawl/docs/_core-concept/dataFlow.html +177 -0
  91. package/docs/crawl/docs/_core-concept/overview.html +66 -0
  92. package/docs/crawl/docs/_core-concept/subscriber.html +75 -0
  93. package/docs/crawl/docs/_decorators/ancestor-attribute.html +117 -0
  94. package/docs/crawl/docs/_decorators/auto-subscribe.html +202 -0
  95. package/docs/crawl/docs/_decorators/bind.html +141 -0
  96. package/docs/crawl/docs/_decorators/get.html +149 -0
  97. package/docs/crawl/docs/_decorators/handle.html +165 -0
  98. package/docs/crawl/docs/_decorators/on-assign.html +355 -0
  99. package/docs/crawl/docs/_decorators/patch.html +78 -0
  100. package/docs/crawl/docs/_decorators/post.html +139 -0
  101. package/docs/crawl/docs/_decorators/publish.html +61 -0
  102. package/docs/crawl/docs/_decorators/put.html +78 -0
  103. package/docs/crawl/docs/_decorators/subscribe.html +109 -0
  104. package/docs/crawl/docs/_decorators/wait-for-ancestors.html +137 -0
  105. package/docs/crawl/docs/_directives/sub.html +93 -0
  106. package/docs/crawl/docs/_getting-started/ai-agents.html +173 -0
  107. package/docs/crawl/docs/_getting-started/concorde-manual-install.html +100 -0
  108. package/docs/crawl/docs/_getting-started/concorde-outside.html +58 -0
  109. package/docs/crawl/docs/_getting-started/create-a-component.html +111 -0
  110. package/docs/crawl/docs/_getting-started/my-first-component.html +189 -0
  111. package/docs/crawl/docs/_getting-started/my-first-subscriber.html +110 -0
  112. package/docs/crawl/docs/_getting-started/pubsub.html +62 -0
  113. package/docs/crawl/docs/_getting-started/start.html +76 -0
  114. package/docs/crawl/docs/_getting-started/theming.html +333 -0
  115. package/docs/crawl/docs/_misc/api-configuration.html +149 -0
  116. package/docs/crawl/docs/_misc/dataProviderKey.html +135 -0
  117. package/docs/crawl/docs/_misc/docs-mock-api.html +158 -0
  118. package/docs/crawl/docs/_misc/dynamic-path.html +180 -0
  119. package/docs/crawl/docs/_misc/endpoint.html +50 -0
  120. package/docs/crawl/docs/_misc/formelement-subscriber-removal.html +138 -0
  121. package/docs/crawl/docs/_misc/html-integration.html +48 -0
  122. package/docs/crawl/hubs/decorators.html +547 -0
  123. package/docs/crawl/hubs/form-components.html +381 -0
  124. package/docs/crawl/hubs/remote-data.html +452 -0
  125. package/docs/crawl/index.html +103 -0
  126. package/docs/index.html +1 -1
  127. package/docs/llms-full.txt +7174 -0
  128. package/docs/llms.txt +98 -0
  129. package/docs/sitemap.xml +243 -0
  130. package/docs/src/core/components/functional/date/date.md +290 -0
  131. package/docs/src/core/components/functional/fetch/fetch.md +125 -0
  132. package/docs/src/core/components/functional/if/if.md +9 -0
  133. package/docs/src/core/components/functional/jsonata/jsonata.md +56 -0
  134. package/docs/src/core/components/functional/list/list.md +65 -0
  135. package/docs/src/core/components/functional/mix/mix.md +41 -0
  136. package/docs/src/core/components/functional/queue/queue.md +72 -0
  137. package/docs/src/core/components/functional/router/router.md +94 -0
  138. package/docs/src/core/components/functional/sdui/component-catalog.gaps.json +511 -0
  139. package/docs/src/core/components/functional/sdui/component-catalog.json +3103 -0
  140. package/docs/src/core/components/functional/sdui/default-library.json +108 -0
  141. package/docs/src/core/components/functional/sdui/example.json +99 -0
  142. package/docs/src/core/components/functional/sdui/sdui-extension-points.md +94 -0
  143. package/docs/src/core/components/functional/sdui/sdui.md +478 -0
  144. package/docs/src/core/components/functional/states/states.md +87 -0
  145. package/docs/src/core/components/functional/submit/submit.md +114 -0
  146. package/docs/src/core/components/functional/subscriber/subscriber.md +91 -0
  147. package/docs/src/core/components/functional/value/value.md +35 -0
  148. package/docs/src/core/components/ui/alert/alert.md +196 -0
  149. package/docs/src/core/components/ui/alert-messages/alert-messages.md +85 -0
  150. package/docs/src/core/components/ui/badge/badge.md +188 -0
  151. package/docs/src/core/components/ui/button/button.md +183 -0
  152. package/docs/src/core/components/ui/captcha/captcha.md +71 -0
  153. package/docs/src/core/components/ui/card/card.md +215 -0
  154. package/docs/src/core/components/ui/divider/divider.md +129 -0
  155. package/docs/src/core/components/ui/form/checkbox/checkbox.md +77 -0
  156. package/docs/src/core/components/ui/form/fieldset/fieldset.md +205 -0
  157. package/docs/src/core/components/ui/form/form-actions/form-actions.md +100 -0
  158. package/docs/src/core/components/ui/form/form-layout/form-layout.md +119 -0
  159. package/docs/src/core/components/ui/form/input/input.md +142 -0
  160. package/docs/src/core/components/ui/form/radio/radio.md +57 -0
  161. package/docs/src/core/components/ui/form/select/select.md +71 -0
  162. package/docs/src/core/components/ui/form/switch/switch.md +57 -0
  163. package/docs/src/core/components/ui/form/textarea/textarea.md +65 -0
  164. package/docs/src/core/components/ui/group/group.md +75 -0
  165. package/docs/src/core/components/ui/icon/icon.md +214 -0
  166. package/docs/src/core/components/ui/icon/icons.json +1 -0
  167. package/docs/src/core/components/ui/image/image.md +233 -0
  168. package/docs/src/core/components/ui/link/link.md +81 -0
  169. package/docs/src/core/components/ui/loader/loader.md +112 -0
  170. package/docs/src/core/components/ui/menu/menu.md +370 -0
  171. package/docs/src/core/components/ui/modal/modal.md +235 -0
  172. package/docs/src/core/components/ui/pop/pop.md +294 -0
  173. package/docs/src/core/components/ui/progress/progress.md +109 -0
  174. package/docs/src/core/components/ui/table/table.md +431 -0
  175. package/docs/src/core/components/ui/theme/theme.md +122 -0
  176. package/docs/src/core/components/ui/toast/toast.md +216 -0
  177. package/docs/src/core/components/ui/tooltip/tooltip.md +124 -0
  178. package/{src → docs/src}/docs/_core-concept/subscriber.md +0 -0
  179. package/{src → docs/src}/docs/_getting-started/my-first-subscriber.md +0 -0
  180. package/{src → docs/src}/docs/_getting-started/pubsub.md +0 -0
  181. package/docs/src/docs/_getting-started/theming.md +253 -0
  182. package/docs/src/docs/search/docs-search.json +12242 -0
  183. package/docs/src/tag-list.json +1 -0
  184. package/docs/src/tsconfig-model.json +23 -0
  185. package/docs/src/tsconfig.declarations.json +22 -0
  186. package/docs/src/tsconfig.emit.json +23 -0
  187. package/docs/src/tsconfig.json +1332 -0
  188. package/gitlab/job_github_mirror.sh +39 -0
  189. package/index.html +157 -5
  190. package/package.json +22 -4
  191. package/public/docs-mock-api-sw.js +58 -223
  192. package/public/docs-mock-api-sw.js.map +4 -4
  193. package/public/img/concorde/plane_01.jpg +0 -0
  194. package/public/img/concorde/plane_02.jpg +0 -0
  195. package/public/img/concorde/plane_03.jpg +0 -0
  196. package/public/img/concorde/plane_04.jpg +0 -0
  197. package/public/img/concorde/plane_05.jpg +0 -0
  198. package/public/img/concorde/plane_06.jpg +0 -0
  199. package/public/img/concorde/plane_07.jpg +0 -0
  200. package/public/img/concorde/plane_08.jpg +0 -0
  201. package/public/img/concorde/plane_09.jpg +0 -0
  202. package/public/img/concorde/plane_10.jpg +0 -0
  203. package/public/img/concorde/plane_11.jpg +0 -0
  204. package/public/img/concorde/plane_12.jpg +0 -0
  205. package/public/img/concorde/plane_13.jpg +0 -0
  206. package/public/img/og-concorde.jpg +0 -0
  207. package/public/robots.txt +11 -10
  208. package/scripts/ai-init.mjs +104 -379
  209. package/scripts/ai-init.test.mjs +81 -239
  210. package/scripts/docs-markdown-vite-plugin.ts +43 -0
  211. package/scripts/docs-public-url.mjs +56 -0
  212. package/scripts/docs.htaccess +82 -0
  213. package/scripts/generate-cem.mjs +244 -0
  214. package/scripts/generate-cem.test.mjs +122 -0
  215. package/scripts/generate-crawl-docs.mjs +233 -118
  216. package/scripts/generate-crawl-docs.test.mjs +124 -0
  217. package/scripts/generate-sdui-catalog.mjs +11 -10
  218. package/scripts/github-export.mjs +150 -0
  219. package/scripts/post-build-docs.js +37 -50
  220. package/scripts/post-build.mjs +0 -0
  221. package/scripts/pre-publish.mjs +2 -1
  222. package/scripts/site-pages.mjs +212 -0
  223. package/scripts/site-pages.test.mjs +116 -0
  224. package/site-pages/about.md +22 -0
  225. package/site-pages/privacy.md +32 -0
  226. package/src/core/components/functional/date/date.md +91 -231
  227. package/src/core/components/functional/example/example.ts +3 -1
  228. package/src/core/components/functional/fetch/fetch.md +66 -83
  229. package/src/core/components/functional/if/if.md +28 -3
  230. package/src/core/components/functional/if/if.ts +0 -0
  231. package/src/core/components/functional/jsonata/jsonata.md +42 -37
  232. package/src/core/components/functional/list/list.demo.ts +0 -0
  233. package/src/core/components/functional/list/list.md +103 -43
  234. package/src/core/components/functional/list/list.ts +17 -4
  235. package/src/core/components/functional/mix/mix.md +31 -26
  236. package/src/core/components/functional/queue/queue.demo.ts +10 -7
  237. package/src/core/components/functional/queue/queue.md +40 -61
  238. package/src/core/components/functional/router/router.demo.ts +16 -16
  239. package/src/core/components/functional/router/router.md +64 -65
  240. package/src/core/components/functional/router/router.ts +0 -0
  241. package/src/core/components/functional/sdui/SDUIDescriptorTransformer.ts +0 -0
  242. package/src/core/components/functional/sdui/component-catalog.gaps.json +1 -1
  243. package/src/core/components/functional/sdui/component-catalog.json +2 -2
  244. package/src/core/components/functional/sdui/example.json +19 -86
  245. package/src/core/components/functional/sdui/sdui-extension-points.md +1 -1
  246. package/src/core/components/functional/sdui/sdui-immutable.spec.ts +74 -0
  247. package/src/core/components/functional/sdui/sdui.md +187 -358
  248. package/src/core/components/functional/sdui/sdui.ts +33 -8
  249. package/src/core/components/functional/sdui/types.ts +0 -0
  250. package/src/core/components/functional/states/states.demo.ts +21 -22
  251. package/src/core/components/functional/states/states.md +86 -61
  252. package/src/core/components/functional/states/states.ts +1 -1
  253. package/src/core/components/functional/submit/submit.md +64 -72
  254. package/src/core/components/functional/submit/submit.spec.ts +60 -0
  255. package/src/core/components/functional/submit/submit.ts +6 -3
  256. package/src/core/components/functional/subscriber/subscriber.ts +0 -0
  257. package/src/core/components/functional/translation/translation.md +38 -0
  258. package/src/core/components/functional/value/value.md +34 -22
  259. package/src/core/components/functional/value/value.ts +0 -0
  260. package/src/core/components/ui/_css/size.ts +0 -0
  261. package/src/core/components/ui/alert/alert.md +48 -58
  262. package/src/core/components/ui/badge/badge.md +27 -34
  263. package/src/core/components/ui/button/button.md +139 -106
  264. package/src/core/components/ui/captcha/altchaStyles.ts +0 -0
  265. package/src/core/components/ui/captcha/captcha.md +17 -32
  266. package/src/core/components/ui/card/card.md +6 -6
  267. package/src/core/components/ui/divider/divider.md +8 -11
  268. package/src/core/components/ui/form/checkbox/checkbox.md +90 -42
  269. package/src/core/components/ui/form/fieldset/fieldset.md +31 -75
  270. package/src/core/components/ui/form/form-actions/form-actions.md +14 -16
  271. package/src/core/components/ui/form/form-layout/form-layout.md +19 -29
  272. package/src/core/components/ui/form/input/input.md +108 -90
  273. package/src/core/components/ui/form/input/input.ts +8 -2
  274. package/src/core/components/ui/form/radio/radio.md +65 -30
  275. package/src/core/components/ui/form/select/select.md +60 -45
  276. package/src/core/components/ui/form/switch/switch.md +57 -34
  277. package/src/core/components/ui/form/textarea/textarea.md +55 -38
  278. package/src/core/components/ui/group/group.md +35 -33
  279. package/src/core/components/ui/icon/icon.md +4 -4
  280. package/src/core/components/ui/image/image.md +41 -107
  281. package/src/core/components/ui/link/link.md +6 -6
  282. package/src/core/components/ui/loader/loader.md +30 -55
  283. package/src/core/components/ui/menu/menu.md +27 -27
  284. package/src/core/components/ui/modal/modal.md +72 -96
  285. package/src/core/components/ui/pop/pop.md +80 -158
  286. package/src/core/components/ui/progress/progress.md +2 -2
  287. package/src/core/components/ui/table/table.md +91 -255
  288. package/src/core/components/ui/theme/theme.md +11 -36
  289. package/src/core/components/ui/toast/toast.md +48 -117
  290. package/src/core/components/ui/tooltip/tooltip.md +27 -62
  291. package/src/core/decorators/subscriber/bind.ts +9 -14
  292. package/src/core/decorators/subscriber/subscribe.ts +15 -9
  293. package/src/core/decorators/subscriber/subscribe.type-test.ts +14 -5
  294. package/src/core/mixins/Subscriber.ts +0 -0
  295. package/src/core/utils/DataBindObserver.ts +0 -0
  296. package/src/core/utils/LocationHandler.spec.ts +80 -0
  297. package/src/core/utils/LocationHandler.ts +5 -9
  298. package/src/core/utils/Objects.ts +0 -0
  299. package/src/core/utils/PublisherProxy.ts +166 -125
  300. package/src/core/utils/deepReadonly.spec.ts +66 -0
  301. package/src/core/utils/deepReadonly.ts +71 -0
  302. package/src/core/utils/immutableValue.spec.ts +54 -0
  303. package/src/core/utils/immutableValue.ts +102 -0
  304. package/src/core/utils/nestedDotForm.spec.ts +88 -0
  305. package/src/core/utils/publisherImmutable.spec.ts +76 -0
  306. package/src/core/utils/route.ts +0 -0
  307. package/src/core/utils/strictGet.spec.ts +61 -0
  308. package/src/core/utils/strictGet.ts +102 -0
  309. package/src/css.d.ts +19 -0
  310. package/src/docs/components/docs-demo-sources.ts +55 -140
  311. package/src/docs/components/docs-lit-demo.ts +1 -3
  312. package/src/docs/components/docs-source-link.ts +0 -82
  313. package/src/docs/decorators/ancestor-attribute.md +59 -0
  314. package/src/docs/decorators/auto-subscribe.md +40 -0
  315. package/src/docs/decorators/bind.md +76 -0
  316. package/src/docs/decorators/get.md +160 -0
  317. package/src/docs/decorators/handle.md +119 -0
  318. package/src/docs/decorators/on-assign.md +63 -0
  319. package/src/docs/decorators/patch.md +44 -0
  320. package/src/docs/decorators/post.md +134 -0
  321. package/src/docs/decorators/publish.md +56 -0
  322. package/src/docs/decorators/put.md +51 -0
  323. package/src/docs/decorators/subscribe.md +87 -0
  324. package/src/docs/decorators/wait-for-ancestors.md +76 -0
  325. package/src/docs/directives/sub.md +75 -0
  326. package/src/docs/directives/t.md +73 -0
  327. package/src/docs/docs-location.spec.ts +56 -0
  328. package/src/docs/docs-location.ts +133 -32
  329. package/src/docs/docs.ts +1 -2
  330. package/src/docs/example/decorators-demo-bind-demos.ts +83 -135
  331. package/src/docs/example/decorators-demo-geo.ts +30 -19
  332. package/src/docs/example/decorators-demo-post.ts +88 -186
  333. package/src/docs/example/decorators-demo-subscribe-publish-get-demos.ts +165 -268
  334. package/src/docs/example/decorators-demo.ts +85 -98
  335. package/src/docs/example/docs-api-config-demos.ts +19 -20
  336. package/src/docs/example/docs-flight-demos.ts +147 -0
  337. package/src/docs/example/docs-jsonata-demos.ts +52 -52
  338. package/src/docs/example/docs-list-demos.ts +43 -123
  339. package/src/docs/example/docs-provider-keys.ts +21 -28
  340. package/src/docs/example/docs-queue-demos.ts +37 -77
  341. package/src/docs/example/docs-router-demos.ts +20 -25
  342. package/src/docs/example/docs-submit-demos.ts +48 -48
  343. package/src/docs/example/docs-toggle-demos.ts +4 -3
  344. package/src/docs/example/users.ts +0 -0
  345. package/src/docs/getting-started/ai-agents.md +50 -0
  346. package/src/docs/getting-started/create-a-component.md +136 -0
  347. package/src/docs/getting-started/dataFlow.md +87 -0
  348. package/src/docs/getting-started/installation.md +36 -0
  349. package/src/docs/getting-started/my-first-component.md +227 -0
  350. package/src/docs/getting-started/start.md +35 -0
  351. package/src/docs/header/header.ts +11 -6
  352. package/src/docs/home/catalog.ts +1 -1
  353. package/src/docs/home/home.ts +20 -11
  354. package/src/docs/layout.ts +12 -13
  355. package/src/docs/misc/api-configuration.md +79 -0
  356. package/src/docs/misc/dataProviderKey.md +168 -0
  357. package/src/docs/misc/docs-mock-api.md +62 -0
  358. package/src/docs/misc/dynamic-path.md +71 -0
  359. package/src/docs/misc/endpoint.md +45 -0
  360. package/src/docs/misc/html-integration.md +14 -0
  361. package/src/docs/misc/publisher-get-immutability-docs-crawl.json +902 -0
  362. package/src/docs/misc/publisher-get-immutability-docs-recheck.json +13 -0
  363. package/src/docs/misc/publisher-get-immutability-study.md +229 -0
  364. package/src/docs/mock-api/api-config-mock.ts +5 -0
  365. package/src/docs/mock-api/fixtures.ts +0 -278
  366. package/src/docs/mock-api/flights.ts +89 -0
  367. package/src/docs/mock-api/router.ts +3 -4
  368. package/src/docs/mock-api/urls.ts +1 -2
  369. package/src/docs/navigation/navigation.ts +84 -101
  370. package/src/docs/navigation/toc.ts +7 -4
  371. package/src/docs/search/docs-search.json +3188 -5153
  372. package/src/docs/search/markdown-renderer.ts +31 -8
  373. package/src/docs/search/page.ts +9 -6
  374. package/src/docs/search/search.ts +154 -122
  375. package/src/docs/tailwind/css/docs/content.css +4 -5
  376. package/src/tsconfig.declarations.json +22 -0
  377. package/src/tsconfig.emit.json +23 -0
  378. package/src/tsconfig.json +53 -5
  379. package/src/tsconfig.tsbuildinfo +1 -1
  380. package/vite.config.mts +11 -2
  381. package/.agents/skills/concorde-component-docs/SKILL.md +0 -194
  382. package/.taste-skill/after/desktop-fold.jpg +0 -0
  383. package/.taste-skill/after/desktop-page-01.jpg +0 -0
  384. package/.taste-skill/after/desktop-page-02.jpg +0 -0
  385. package/.taste-skill/after/desktop-page-03.jpg +0 -0
  386. package/.taste-skill/after/mobile-fold.jpg +0 -0
  387. package/.taste-skill/after/mobile-page-01.jpg +0 -0
  388. package/.taste-skill/after/report.json +0 -4103
  389. package/.taste-skill/after/tablet-fold.jpg +0 -0
  390. package/.taste-skill/after/tablet-page-01.jpg +0 -0
  391. package/.taste-skill/after/tablet-page-02.jpg +0 -0
  392. package/.taste-skill/before/desktop-fold.jpg +0 -0
  393. package/.taste-skill/before/desktop-page-01.jpg +0 -0
  394. package/.taste-skill/before/desktop-page-02.jpg +0 -0
  395. package/.taste-skill/before/mobile-fold.jpg +0 -0
  396. package/.taste-skill/before/mobile-page-01.jpg +0 -0
  397. package/.taste-skill/before/report.json +0 -2556
  398. package/.taste-skill/before/tablet-fold.jpg +0 -0
  399. package/.taste-skill/before/tablet-page-01.jpg +0 -0
  400. package/.taste-skill/direction.json +0 -510
  401. package/.taste-skill/notes.md +0 -84
  402. package/.taste-skill/prod/desktop-fold.jpg +0 -0
  403. package/.taste-skill/prod/desktop-page-01.jpg +0 -0
  404. package/.taste-skill/prod/desktop-page-02.jpg +0 -0
  405. package/.taste-skill/prod/desktop-page-03.jpg +0 -0
  406. package/.taste-skill/prod/mobile-fold.jpg +0 -0
  407. package/.taste-skill/prod/mobile-page-01.jpg +0 -0
  408. package/.taste-skill/prod/mobile-page-02.jpg +0 -0
  409. package/.taste-skill/prod/report.json +0 -1973
  410. package/.taste-skill/prod/tablet-fold.jpg +0 -0
  411. package/.taste-skill/prod/tablet-page-01.jpg +0 -0
  412. package/.taste-skill/prod/tablet-page-02.jpg +0 -0
  413. package/AUDIT.md +0 -228
  414. package/PLAN-AMELIORATION.md +0 -220
  415. package/ai/AGENTS.md +0 -56
  416. package/ai/cursor/rules/concorde-menu.mdc +0 -15
  417. package/ai/cursor/rules/concorde-scope.mdc +0 -14
  418. package/ai/cursor/rules/concorde-theme.mdc +0 -13
  419. package/ai/cursor/rules/concorde.mdc +0 -66
  420. package/ai/jetbrains/rules/concorde.md +0 -53
  421. package/ai/skills/concorde-get-set-dp/SKILL.md +0 -194
  422. package/ai/skills/concorde-imports/SKILL.md +0 -78
  423. package/ai/skills/concorde-menu/SKILL.md +0 -74
  424. package/ai/skills/concorde-scope/SKILL.md +0 -70
  425. package/ai/skills/concorde-theme/SKILL.md +0 -57
  426. package/docs/assets/index-Bb-_LRyY.js +0 -12280
  427. package/src/docs/example/docs-input-autocomplete-demos.ts +0 -110
  428. package/src/docs/example/docs-joke-demos.ts +0 -297
  429. /package/{src → docs/src}/core/components/ui/form/input-autocomplete/input-autocomplete.md +0 -0
  430. /package/{src → docs/src}/docs/_core-concept/dataFlow.md +0 -0
  431. /package/{src → docs/src}/docs/_core-concept/overview.md +0 -0
  432. /package/{src → docs/src}/docs/_decorators/ancestor-attribute.md +0 -0
  433. /package/{src → docs/src}/docs/_decorators/auto-subscribe.md +0 -0
  434. /package/{src → docs/src}/docs/_decorators/bind.md +0 -0
  435. /package/{src → docs/src}/docs/_decorators/get.md +0 -0
  436. /package/{src → docs/src}/docs/_decorators/handle.md +0 -0
  437. /package/{src → docs/src}/docs/_decorators/on-assign.md +0 -0
  438. /package/{src → docs/src}/docs/_decorators/patch.md +0 -0
  439. /package/{src → docs/src}/docs/_decorators/post.md +0 -0
  440. /package/{src → docs/src}/docs/_decorators/publish.md +0 -0
  441. /package/{src → docs/src}/docs/_decorators/put.md +0 -0
  442. /package/{src → docs/src}/docs/_decorators/subscribe.md +0 -0
  443. /package/{src → docs/src}/docs/_decorators/wait-for-ancestors.md +0 -0
  444. /package/{src → docs/src}/docs/_directives/sub.md +0 -0
  445. /package/{src → docs/src}/docs/_getting-started/ai-agents.md +0 -0
  446. /package/{src → docs/src}/docs/_getting-started/concorde-manual-install.md +0 -0
  447. /package/{src → docs/src}/docs/_getting-started/concorde-outside.md +0 -0
  448. /package/{src → docs/src}/docs/_getting-started/create-a-component.md +0 -0
  449. /package/{src → docs/src}/docs/_getting-started/my-first-component.md +0 -0
  450. /package/{src → docs/src}/docs/_getting-started/start.md +0 -0
  451. /package/{src → docs/src}/docs/_misc/api-configuration.md +0 -0
  452. /package/{src → docs/src}/docs/_misc/dataProviderKey.md +0 -0
  453. /package/{src → docs/src}/docs/_misc/docs-mock-api.md +0 -0
  454. /package/{src → docs/src}/docs/_misc/dynamic-path.md +0 -0
  455. /package/{src → docs/src}/docs/_misc/endpoint.md +0 -0
  456. /package/{src → docs/src}/docs/_misc/formelement-subscriber-removal.md +0 -0
  457. /package/{src → docs/src}/docs/_misc/html-integration.md +0 -0
  458. /package/src/docs/{_getting-started → getting-started}/components.md +0 -0
  459. /package/src/docs/{_getting-started → getting-started}/theming.md +0 -0
@@ -1,13 +1,24 @@
1
+ /**
2
+ * Post-build agent/SEO artifacts for the docs site.
3
+ *
4
+ * Canonical page URLs are the SPA pathnames (`/docs/…`, `/core/…`):
5
+ * - Browsers → index.html (pushState SPA)
6
+ * - Accept: text/markdown → sibling `*.md` (same pathname + `.md`)
7
+ * - Known crawler UAs → sibling `*.html` static pages (same path + `.html`)
8
+ *
9
+ * No redirects for old URL shapes (`/crawl/`, `/docs/…`, `…/name/name`).
10
+ */
1
11
  import fs from "fs";
2
12
  import path from "path";
3
13
  import { fileURLToPath } from "url";
4
14
  import { marked } from "marked";
5
15
  import { gfmHeadingId } from "marked-gfm-heading-id";
16
+ import { toPublicPath } from "./docs-public-url.mjs";
17
+ import { STATIC_PAGES, renderSitePage } from "./site-pages.mjs";
6
18
 
7
19
  const SITE_ORIGIN = "https://concorde.supersoniks.org";
8
20
  const SRC_DIR = path.resolve("src");
9
21
  const DOCS_OUT = path.resolve("docs");
10
- const CRAWL_DIR = path.join(DOCS_OUT, "crawl");
11
22
 
12
23
  const SONIC_CODE_BLOCK_RE = /<sonic-code\b[\s\S]*?<\/sonic-code>/gi;
13
24
  const DOC_HASH_LINK_RE = /#([^)\s"']+)\.md\/([^)\s"'#]+)/g;
@@ -48,28 +59,44 @@ function mdRelativePath(absPath) {
48
59
  return path.relative(SRC_DIR, absPath).replace(/\\/g, "/");
49
60
  }
50
61
 
51
- function crawlHtmlPath(mdRel) {
52
- return path.join("crawl", mdRel.replace(/\.mdx?$/, ".html")).replace(/\\/g, "/");
53
- }
54
-
55
62
  function docId(mdRel) {
56
63
  return mdRel.replace(/\.mdx?$/, "");
57
64
  }
58
65
 
59
- function relativeCrawlLink(fromMdRel, toMdPath, anchor) {
60
- const fromHtml = crawlHtmlPath(fromMdRel);
61
- const toHtml = crawlHtmlPath(`${toMdPath}.md`);
62
- const rel = path
63
- .relative(path.dirname(fromHtml), toHtml)
64
- .replace(/\\/g, "/");
65
- const href = rel.startsWith(".") ? rel : `./${rel}`;
66
- return `${href}#${anchor}`;
66
+ /** Public pathname (SPA + agents): /docs/getting-started/start */
67
+ export function pagePath(mdRel) {
68
+ return toPublicPath(mdRel);
69
+ }
70
+
71
+ /** On-disk static HTML next to the SPA build: docs/getting-started/start.html */
72
+ function staticHtmlRel(mdRel) {
73
+ return `${docId(mdRel)}.html`;
74
+ }
75
+
76
+ function pageUrl(mdRel) {
77
+ return `${SITE_ORIGIN}${pagePath(mdRel)}`;
78
+ }
79
+
80
+ function docLink(toMdPath, anchor) {
81
+ const base = pagePath(`${toMdPath}.md`);
82
+ const slug = toMdPath.split("/").pop() || "page";
83
+ if (!anchor || anchor === slug) return base;
84
+ return `${base}#${anchor}`;
67
85
  }
68
86
 
69
- function rewriteDocLinks(text, fromMdRel) {
70
- return text.replace(DOC_HASH_LINK_RE, (match, mdPath, anchor) => {
71
- return relativeCrawlLink(fromMdRel, mdPath, anchor);
87
+ function rewriteDocLinks(text) {
88
+ let out = text.replace(DOC_HASH_LINK_RE, (match, mdPath, anchor) => {
89
+ return docLink(mdPath, anchor);
72
90
  });
91
+ out = out.replace(
92
+ /\]\((\/(?:docs|core)\/[^)\s"'#]+)(#[^)\s"']*)?\)/g,
93
+ (match, pathname, fragment) => {
94
+ const mdPath = pathname.replace(/^\//, "");
95
+ const anchor = fragment ? fragment.slice(1) : mdPath.split("/").pop() || "page";
96
+ return `](${docLink(mdPath, anchor)})`;
97
+ },
98
+ );
99
+ return out;
73
100
  }
74
101
 
75
102
  function extractTitle(markdown) {
@@ -133,11 +160,10 @@ function extractDescription(markdown, title) {
133
160
  }
134
161
 
135
162
  function docKind(mdRel) {
136
- if (mdRel.includes("/_decorators/")) return "decorator";
137
- if (mdRel.includes("/_directives/")) return "directive";
138
- if (mdRel.includes("/_getting-started/")) return "guide";
139
- if (mdRel.includes("/_core-concept/")) return "concept";
140
- if (mdRel.includes("/_misc/")) return "reference";
163
+ if (mdRel.includes("/decorators/")) return "decorator";
164
+ if (mdRel.includes("/directives/")) return "directive";
165
+ if (mdRel.includes("/getting-started/")) return "guide";
166
+ if (mdRel.includes("/misc/")) return "reference";
141
167
  if (mdRel.includes("/components/functional/")) return "functional component";
142
168
  if (mdRel.includes("/components/ui/")) return "UI component";
143
169
  return "documentation";
@@ -167,10 +193,10 @@ function extractKeywords(mdRel, title, raw) {
167
193
  keywords.add(`sonic-${baseName}`);
168
194
  keywords.add("web component", "Lit");
169
195
  }
170
- if (mdRel.includes("/_decorators/")) {
196
+ if (mdRel.includes("/decorators/")) {
171
197
  keywords.add("decorator", "DataProvider", "ApiResult", "Endpoint");
172
198
  }
173
- if (mdRel.includes("/_core-concept/")) {
199
+ if (mdRel.endsWith("/dataFlow.md")) {
174
200
  keywords.add("DataProvider", "data flow");
175
201
  }
176
202
 
@@ -184,16 +210,6 @@ function extractKeywords(mdRel, title, raw) {
184
210
  return [...keywords].join(", ");
185
211
  }
186
212
 
187
- function pageHash(mdRel) {
188
- const base = mdRel.replace(/\.mdx?$/, "");
189
- const anchor = base.split("/").pop() || "page";
190
- return `#${base}.md/${anchor}`;
191
- }
192
-
193
- function crawlPageUrl(crawlRel) {
194
- return `${SITE_ORIGIN}/${crawlRel}`;
195
- }
196
-
197
213
  function buildLeadParagraph({ title, mdRel, description, canonical, keywords }) {
198
214
  const id = docId(mdRel);
199
215
  const kind = docKind(mdRel);
@@ -201,11 +217,7 @@ function buildLeadParagraph({ title, mdRel, description, canonical, keywords })
201
217
  }
202
218
 
203
219
  function renderPage({ mdRel, title, description, keywords, bodyHtml }) {
204
- const crawlRel = crawlHtmlPath(mdRel);
205
- const canonical = crawlPageUrl(crawlRel);
206
- const interactiveDoc = `${SITE_ORIGIN}/${pageHash(mdRel)}`;
207
- const depth = path.dirname(crawlRel).split("/").length - 1;
208
- const indexHref = `${"../".repeat(depth)}index.html`;
220
+ const canonical = pageUrl(mdRel);
209
221
  const id = docId(mdRel);
210
222
  const leadHtml = buildLeadParagraph({
211
223
  title,
@@ -216,19 +228,20 @@ function renderPage({ mdRel, title, description, keywords, bodyHtml }) {
216
228
  });
217
229
 
218
230
  return `<!DOCTYPE html>
219
- <html lang="fr" data-crawl-url="${escapeHtml(canonical)}" data-doc-id="${escapeHtml(id)}">
231
+ <html lang="en" data-doc-url="${escapeHtml(canonical)}" data-doc-id="${escapeHtml(id)}">
220
232
  <head>
221
233
  <meta charset="UTF-8">
222
234
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
223
- <title>${escapeHtml(title)} — Concorde</title>
235
+ <title>${escapeHtml(title)} — Concorde by Supersoniks</title>
224
236
  <meta name="description" content="${escapeHtml(description)}">
225
237
  <meta name="keywords" content="${escapeHtml(keywords)}">
226
238
  <meta name="concorde-doc-id" content="${escapeHtml(id)}">
227
239
  <link rel="canonical" href="${escapeHtml(canonical)}">
240
+ <link rel="alternate" type="text/markdown" href="${SITE_ORIGIN}${pagePath(mdRel)}.md">
228
241
  </head>
229
242
  <body>
230
243
  <header>
231
- <p><a href="${indexHref}">Concorde documentation (crawl)</a> · <a href="${escapeHtml(interactiveDoc)}" rel="nofollow">interactive version</a></p>
244
+ <p><a href="/docs/index.html">Concorde documentation</a> · <a href="${escapeHtml(canonical)}">same URL (interactive)</a> · <a href="/llms.txt">llms.txt</a></p>
232
245
  </header>
233
246
  <main>
234
247
  <article>
@@ -245,29 +258,29 @@ function renderIndex(pages) {
245
258
  const items = pages
246
259
  .map(
247
260
  (p) =>
248
- ` <li><a href="${escapeHtml(p.crawlHref)}">${escapeHtml(p.title)}</a> <small>(${escapeHtml(p.docId)})</small></li>`,
261
+ ` <li><a href="${escapeHtml(p.pagePath)}">${escapeHtml(p.title)}</a> <small>(${escapeHtml(p.docId)})</small></li>`,
249
262
  )
250
263
  .join("\n");
251
264
 
252
265
  return `<!DOCTYPE html>
253
- <html lang="fr" data-doc-id="crawl-index">
266
+ <html lang="en" data-doc-id="docs-index">
254
267
  <head>
255
268
  <meta charset="UTF-8">
256
269
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
257
- <title>Concorde documentation index</title>
258
- <meta name="description" content="Static crawl index for Concorde framework documentation. All pages use .html under /crawl/.">
259
- <meta name="keywords" content="Concorde, documentation index, web components, Lit, DataProvider">
260
- <link rel="canonical" href="${SITE_ORIGIN}/crawl/index.html">
270
+ <title>Concorde documentation index — Supersoniks</title>
271
+ <meta name="description" content="Documentation index for Concorde by Supersoniks. Same pathnames as the interactive docs; static HTML for crawlers, Markdown via Accept: text/markdown.">
272
+ <meta name="keywords" content="Concorde, Supersoniks, documentation index, web components, Lit, DataProvider">
273
+ <link rel="canonical" href="${SITE_ORIGIN}/docs/index.html">
261
274
  </head>
262
275
  <body>
263
276
  <header>
264
277
  <h1>Concorde documentation</h1>
265
- <p>Static pages for crawlers and AI indexing. Interactive docs: <a href="${SITE_ORIGIN}/">${SITE_ORIGIN}/</a></p>
266
- <p>Full text mirror: <a href="${SITE_ORIGIN}/llms-full.txt">llms-full.txt</a></p>
278
+ <p>Canonical URLs match the interactive docs (<code>/docs/…</code>, <code>/core/…</code>). Crawlers receive static HTML; agents can request <code>Accept: text/markdown</code>.</p>
279
+ <p>Interactive site: <a href="${SITE_ORIGIN}/">${SITE_ORIGIN}/</a> · Full text: <a href="${SITE_ORIGIN}/llms-full.txt">llms-full.txt</a></p>
267
280
  <ul>
268
- <li><a href="hubs/decorators.html">Decorators hub (@get, @post, …)</a></li>
269
- <li><a href="hubs/remote-data.html">Remote data hub (@get, List, Queue)</a></li>
270
- <li><a href="hubs/form-components.html">Form components hub</a></li>
281
+ <li><a href="/hubs/decorators.html">Decorators hub (@get, @post, …)</a></li>
282
+ <li><a href="/hubs/remote-data.html">Remote data hub (@get, List, Queue)</a></li>
283
+ <li><a href="/hubs/form-components.html">Form components hub</a></li>
271
284
  </ul>
272
285
  </header>
273
286
  <main>
@@ -285,17 +298,31 @@ function writeFileEnsuringDir(filePath, content) {
285
298
  fs.writeFileSync(filePath, content);
286
299
  }
287
300
 
288
- function generateLlmsTxt(pages, hubs = []) {
301
+ export function generateLlmsTxt(pages, hubs = []) {
289
302
  const lines = [
290
- "# Concorde",
303
+ "# Concorde by Supersoniks",
304
+ "",
305
+ "> Concorde is the Supersoniks Lit web-components library (UI, DataProvider, decorators, forms, SDUI).",
306
+ "> npm: `@supersoniks/concorde` — https://www.npmjs.com/package/@supersoniks/concorde",
307
+ `> Site: ${SITE_ORIGIN}/`,
291
308
  "",
292
- "> Web components framework (Lit, DataProvider, decorators).",
309
+ "## Developer resources",
293
310
  "",
294
- "Documentation for AI indexers lives under `/crawl/` as **HTML** (`.html`), not Markdown.",
295
- "Example: https://concorde.supersoniks.org/crawl/docs/_decorators/post.html",
296
- "Do not fetch `/crawl/**/*.md` (does not exist) nor `/src/docs/**/*.md` (SPA source only).",
311
+ `- [Homepage (HTML)](${SITE_ORIGIN}/) — interactive docs SPA`,
312
+ `- [Homepage (Markdown)](${SITE_ORIGIN}/index.md) — also via \`Accept: text/markdown\` on ${SITE_ORIGIN}/`,
313
+ `- [llms-full.txt](${SITE_ORIGIN}/llms-full.txt) — full plain-text mirror`,
314
+ `- [Docs index](${SITE_ORIGIN}/docs/index.html)`,
315
+ `- [Sitemap](${SITE_ORIGIN}/sitemap.xml)`,
316
+ `- [npm package @supersoniks/concorde](https://www.npmjs.com/package/@supersoniks/concorde)`,
317
+ `- [Getting started](${SITE_ORIGIN}/docs/getting-started/start)`,
318
+ `- [AI agents (skill)](${SITE_ORIGIN}/docs/getting-started/ai-agents)`,
319
+ `- [Components index](${SITE_ORIGIN}/docs/getting-started/components)`,
320
+ `- [custom-elements.json](${SITE_ORIGIN}/custom-elements.json) — Custom Elements Manifest: attributes, properties, events and slots of every \`sonic-*\` element`,
321
+ `- [About](${SITE_ORIGIN}/about) · [Privacy](${SITE_ORIGIN}/privacy)`,
297
322
  "",
298
- `Full text: ${SITE_ORIGIN}/llms-full.txt`,
323
+ "Doc pages use the same pathnames as the interactive site (`/docs/…`, `/core/…`).",
324
+ "Markdown: same URL with `.md` (e.g. `/docs/getting-started/start.md`), or `Accept: text/markdown` on the pathname.",
325
+ "HTML crawlers receive a static HTML variant of the same URL.",
299
326
  "",
300
327
  "## Topic hubs (start here for RAG)",
301
328
  "",
@@ -303,7 +330,7 @@ function generateLlmsTxt(pages, hubs = []) {
303
330
 
304
331
  for (const h of hubs) {
305
332
  lines.push(
306
- `- [${h.title}](${SITE_ORIGIN}/${h.crawlPath}) (${h.docId}, ${h.sectionCount} pages)`,
333
+ `- [${h.title}](${SITE_ORIGIN}/${h.hubPath}) (${h.docId}, ${h.sectionCount} pages)`,
307
334
  );
308
335
  }
309
336
 
@@ -311,27 +338,29 @@ function generateLlmsTxt(pages, hubs = []) {
311
338
 
312
339
  for (const p of pages) {
313
340
  lines.push(
314
- `- [${p.title}](${SITE_ORIGIN}/${p.crawlPath}) (${p.docId}): ${p.description}`,
341
+ `- [${p.title}](${SITE_ORIGIN}${p.pagePath}) (${p.docId}): ${p.description}`,
315
342
  );
316
343
  }
317
344
 
318
- lines.push("", "## Optional", "", `- [Full index](${SITE_ORIGIN}/crawl/index.html)`);
345
+ lines.push("", "## Optional", "", `- [Full index](${SITE_ORIGIN}/docs/index.html)`);
319
346
  return lines.join("\n");
320
347
  }
321
348
 
322
349
  function generateLlmsFullTxt(pages, hubs = []) {
323
350
  const lines = [
324
- "# Concorde — full documentation (plain text)",
351
+ "# Concorde by Supersoniks — full documentation (plain text)",
325
352
  "",
326
353
  "> Mirror for AI indexers. Each page is a section below.",
327
- "> HTML URLs use /crawl/**/*.html — never .md under /crawl/.",
354
+ "> Canonical URLs: /docs/** and /core/** (Markdown via Accept: text/markdown).",
355
+ `> Homepage Markdown: ${SITE_ORIGIN}/index.md`,
356
+ `> npm: https://www.npmjs.com/package/@supersoniks/concorde`,
328
357
  "",
329
358
  "## Topic hubs",
330
359
  "",
331
360
  ];
332
361
 
333
362
  for (const h of hubs) {
334
- lines.push(`- ${h.title}: ${SITE_ORIGIN}/${h.crawlPath} (${h.docId})`);
363
+ lines.push(`- ${h.title}: ${SITE_ORIGIN}/${h.hubPath} (${h.docId})`);
335
364
  }
336
365
 
337
366
  lines.push("");
@@ -342,7 +371,7 @@ function generateLlmsFullTxt(pages, hubs = []) {
342
371
  "",
343
372
  `## ${p.title}`,
344
373
  "",
345
- `- URL: ${SITE_ORIGIN}/${p.crawlPath}`,
374
+ `- URL: ${SITE_ORIGIN}${p.pagePath}`,
346
375
  `- Doc ID: ${p.docId}`,
347
376
  `- Keywords: ${p.keywords}`,
348
377
  "",
@@ -363,7 +392,7 @@ const TOPIC_HUBS = [
363
392
  "Hub for all Concorde Lit decorators: @get @post @put @patch @subscribe @publish @bind @handle and related. Use this page when asking about any decorator.",
364
393
  keywords:
365
394
  "decorator, @get, @post, @put, @patch, @subscribe, @publish, @bind, @handle, ApiResult, Endpoint, DataProviderKey",
366
- filter: (p) => p.docId.startsWith("docs/_decorators/"),
395
+ filter: (p) => p.docId.startsWith("docs/decorators/"),
367
396
  },
368
397
  {
369
398
  slug: "remote-data",
@@ -375,14 +404,14 @@ const TOPIC_HUBS = [
375
404
  "@get, fetch, remote data, API, Endpoint, ApiResult, serviceURL, sonic-list, sonic-queue, HTTP GET",
376
405
  filter: (p) =>
377
406
  [
378
- "docs/_decorators/get",
379
- "docs/_decorators/post",
380
- "docs/_decorators/put",
381
- "docs/_decorators/patch",
382
- "docs/_misc/endpoint",
383
- "docs/_misc/api-configuration",
384
- "docs/_misc/dynamic-path",
385
- "docs/_core-concept/dataFlow",
407
+ "docs/decorators/get",
408
+ "docs/decorators/post",
409
+ "docs/decorators/put",
410
+ "docs/decorators/patch",
411
+ "docs/misc/endpoint",
412
+ "docs/misc/api-configuration",
413
+ "docs/misc/dynamic-path",
414
+ "docs/getting-started/dataFlow",
386
415
  "core/components/functional/fetch/fetch",
387
416
  "core/components/functional/list/list",
388
417
  "core/components/functional/queue/queue",
@@ -400,26 +429,19 @@ const TOPIC_HUBS = [
400
429
  },
401
430
  ];
402
431
 
403
- function hubCrawlPath(slug) {
404
- return `crawl/hubs/${slug}.html`;
405
- }
406
-
407
- function relativeHubLink(fromHubSlug, targetCrawlPath) {
408
- const from = hubCrawlPath(fromHubSlug);
409
- const rel = path.relative(path.dirname(from), targetCrawlPath).replace(/\\/g, "/");
410
- return rel.startsWith(".") ? rel : `./${rel}`;
432
+ function hubPath(slug) {
433
+ return `hubs/${slug}.html`;
411
434
  }
412
435
 
413
436
  function renderHubPage(hub, sections) {
414
- const crawlRel = hubCrawlPath(hub.slug);
415
- const canonical = crawlPageUrl(crawlRel);
437
+ const hubRel = hubPath(hub.slug);
438
+ const canonical = `${SITE_ORIGIN}/${hubRel}`;
416
439
  const sectionHtml = sections
417
440
  .map((p) => {
418
441
  const excerpt = p.plainText.slice(0, 1200);
419
- const href = relativeHubLink(hub.slug, p.crawlPath);
420
442
  return `<section id="${escapeHtml(p.docId.replace(/\//g, "-"))}" data-doc-id="${escapeHtml(p.docId)}">
421
- <h2><a href="${escapeHtml(href)}">${escapeHtml(p.title)}</a></h2>
422
- <p><strong>Doc ID:</strong> <code>${escapeHtml(p.docId)}</code> · <a href="${escapeHtml(href)}">full page</a></p>
443
+ <h2><a href="${escapeHtml(p.pagePath)}">${escapeHtml(p.title)}</a></h2>
444
+ <p><strong>Doc ID:</strong> <code>${escapeHtml(p.docId)}</code> · <a href="${escapeHtml(p.pagePath)}">full page</a></p>
423
445
  <p>${escapeHtml(p.description)}</p>
424
446
  <pre class="doc-excerpt">${escapeHtml(excerpt)}</pre>
425
447
  </section>`;
@@ -435,11 +457,11 @@ function renderHubPage(hub, sections) {
435
457
  });
436
458
 
437
459
  return `<!DOCTYPE html>
438
- <html lang="fr" data-crawl-url="${escapeHtml(canonical)}" data-doc-id="${escapeHtml(hub.docId)}">
460
+ <html lang="en" data-doc-url="${escapeHtml(canonical)}" data-doc-id="${escapeHtml(hub.docId)}">
439
461
  <head>
440
462
  <meta charset="UTF-8">
441
463
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
442
- <title>${escapeHtml(hub.title)} — Concorde</title>
464
+ <title>${escapeHtml(hub.title)} — Concorde by Supersoniks</title>
443
465
  <meta name="description" content="${escapeHtml(hub.intro)}">
444
466
  <meta name="keywords" content="${escapeHtml(hub.keywords)}">
445
467
  <meta name="concorde-doc-id" content="${escapeHtml(hub.docId)}">
@@ -447,7 +469,7 @@ function renderHubPage(hub, sections) {
447
469
  </head>
448
470
  <body>
449
471
  <header>
450
- <p><a href="../index.html">Concorde documentation (crawl)</a></p>
472
+ <p><a href="/docs/index.html">Concorde documentation</a></p>
451
473
  </header>
452
474
  <main>
453
475
  <article>
@@ -465,47 +487,145 @@ function generateTopicHubs(pages) {
465
487
  for (const hub of TOPIC_HUBS) {
466
488
  const sections = pages.filter(hub.filter);
467
489
  if (sections.length === 0) continue;
468
- const crawlRel = hubCrawlPath(hub.slug);
469
- writeFileEnsuringDir(
470
- path.join(DOCS_OUT, crawlRel),
471
- renderHubPage(hub, sections),
472
- );
490
+ const rel = hubPath(hub.slug);
491
+ writeFileEnsuringDir(path.join(DOCS_OUT, rel), renderHubPage(hub, sections));
473
492
  hubs.push({
474
493
  ...hub,
475
- crawlPath: crawlRel,
494
+ hubPath: rel,
476
495
  sectionCount: sections.length,
477
496
  });
478
497
  }
479
498
  return hubs;
480
499
  }
481
500
 
482
- function generateSitemap(pages, hubs = []) {
483
- const indexUrl = ` <url>\n <loc>${SITE_ORIGIN}/crawl/index.html</loc>\n </url>`;
501
+ export function generateSitemap(pages, hubs = []) {
502
+ const homeUrl = ` <url>\n <loc>${SITE_ORIGIN}/</loc>\n </url>`;
503
+ const homeMdUrl = ` <url>\n <loc>${SITE_ORIGIN}/index.md</loc>\n </url>`;
504
+ const indexUrl = ` <url>\n <loc>${SITE_ORIGIN}/docs/index.html</loc>\n </url>`;
484
505
  const hubUrls = hubs
485
- .map((h) => ` <url>\n <loc>${SITE_ORIGIN}/${h.crawlPath}</loc>\n </url>`)
506
+ .map((h) => ` <url>\n <loc>${SITE_ORIGIN}/${h.hubPath}</loc>\n </url>`)
486
507
  .join("\n");
508
+ const staticUrls = STATIC_PAGES.map(
509
+ (p) => ` <url>\n <loc>${SITE_ORIGIN}/${p.slug}</loc>\n </url>`,
510
+ ).join("\n");
487
511
  const urls = pages
488
- .map((p) => ` <url>\n <loc>${SITE_ORIGIN}/${p.crawlPath}</loc>\n </url>`)
512
+ .map((p) => ` <url>\n <loc>${SITE_ORIGIN}${p.pagePath}</loc>\n </url>`)
489
513
  .join("\n");
490
514
 
491
515
  return `<?xml version="1.0" encoding="UTF-8"?>
492
516
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
517
+ ${homeUrl}
518
+ ${homeMdUrl}
493
519
  ${indexUrl}
520
+ ${staticUrls}
494
521
  ${hubUrls}
495
522
  ${urls}
496
523
  </urlset>
497
524
  `;
498
525
  }
499
526
 
527
+ /** Homepage Markdown for Accept: text/markdown negotiation (acceptmarkdown.com). */
528
+ export function generateHomepageMarkdown() {
529
+ return `# Concorde by Supersoniks
530
+
531
+ Concorde is an open-source Lit web-components library from Supersoniks. It provides UI primitives, data binding, forms, routing helpers and theming that run the same way in React, Vue, PHP templates or a static HTML page.
532
+
533
+ Install the npm package [\`@supersoniks/concorde\`](https://www.npmjs.com/package/@supersoniks/concorde).
534
+
535
+ ## Developer resources
536
+
537
+ - Interactive docs: ${SITE_ORIGIN}/
538
+ - Agent index: ${SITE_ORIGIN}/llms.txt
539
+ - Full text mirror: ${SITE_ORIGIN}/llms-full.txt
540
+ - Docs index: ${SITE_ORIGIN}/docs/index.html
541
+ - Sitemap: ${SITE_ORIGIN}/sitemap.xml
542
+ - Getting started: ${SITE_ORIGIN}/docs/getting-started/start
543
+ - AI agents (skill): ${SITE_ORIGIN}/docs/getting-started/ai-agents
544
+ - Components: ${SITE_ORIGIN}/docs/getting-started/components
545
+
546
+ Doc pages share pathnames with the interactive site (\`/docs/…\`, \`/core/…\`). Markdown is at the same path with a \`.md\` suffix (e.g. \`/docs/getting-started/start.md\`), or via \`Accept: text/markdown\` on the pathname (\`Content-Type: text/markdown\`, \`Vary: Accept\`).
547
+
548
+ ## What Concorde includes
549
+
550
+ Custom elements (\`sonic-*\`) for buttons, forms, lists, queues, SDUI trees and more. Decorators such as \`@get\`, \`@post\`, \`@subscribe\` and \`@bind\` wire components to a shared DataProvider without framework lock-in. Concorde is MIT-licensed and maintained by Supersoniks ([about](${SITE_ORIGIN}/about), [privacy](${SITE_ORIGIN}/privacy)).
551
+ `;
552
+ }
553
+
554
+ /** Markdown 404 body for agents (HTTP 404 + text/markdown). */
555
+ export function generateNotFoundMarkdown() {
556
+ return `# Page not found
557
+
558
+ The requested URL does not exist on the Concorde documentation site (Concorde by Supersoniks).
559
+
560
+ Try the [homepage](${SITE_ORIGIN}/), the [documentation index](${SITE_ORIGIN}/docs/index.html), [llms.txt](${SITE_ORIGIN}/llms.txt), or the [sitemap](${SITE_ORIGIN}/sitemap.xml).
561
+ `;
562
+ }
563
+
564
+ export function generateNotFoundHtml() {
565
+ return `<!DOCTYPE html>
566
+ <html lang="en">
567
+ <head>
568
+ <meta charset="UTF-8">
569
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
570
+ <title>Page not found — Concorde by Supersoniks</title>
571
+ <meta name="robots" content="noindex">
572
+ <link rel="canonical" href="${SITE_ORIGIN}/">
573
+ </head>
574
+ <body>
575
+ <h1>Page not found</h1>
576
+ <p>The requested URL does not exist on the Concorde documentation site (Concorde by Supersoniks).</p>
577
+ <p>Try the <a href="${SITE_ORIGIN}/">homepage</a>, the <a href="${SITE_ORIGIN}/docs/index.html">documentation index</a>, <a href="${SITE_ORIGIN}/llms.txt">llms.txt</a>, or the <a href="${SITE_ORIGIN}/sitemap.xml">sitemap</a>.</p>
578
+ </body>
579
+ </html>
580
+ `;
581
+ }
582
+
583
+ /**
584
+ * Apache rules live in scripts/docs.htaccess (pretty URLs + negotiation).
585
+ */
586
+ export function generateHtaccess() {
587
+ const htaccessPath = fileURLToPath(new URL("./docs.htaccess", import.meta.url));
588
+ return fs.readFileSync(htaccessPath, "utf8");
589
+ }
590
+
591
+ /** SPA shell for site pages: the built docs/index.html, else the source one. */
592
+ function readSpaShell(docsOut) {
593
+ const built = path.join(docsOut, "index.html");
594
+ return fs.readFileSync(
595
+ fs.existsSync(built) ? built : path.resolve("index.html"),
596
+ "utf8",
597
+ );
598
+ }
599
+
600
+ export function writeAgentSiteArtifacts(docsOut = DOCS_OUT) {
601
+ fs.writeFileSync(path.join(docsOut, "index.md"), generateHomepageMarkdown());
602
+ fs.writeFileSync(path.join(docsOut, "404.md"), generateNotFoundMarkdown());
603
+ fs.writeFileSync(path.join(docsOut, "404.html"), generateNotFoundHtml());
604
+ fs.writeFileSync(path.join(docsOut, ".htaccess"), generateHtaccess());
605
+ const shell = readSpaShell(docsOut);
606
+ for (const page of STATIC_PAGES) {
607
+ fs.writeFileSync(path.join(docsOut, `${page.slug}.md`), page.markdown);
608
+ fs.writeFileSync(
609
+ path.join(docsOut, `${page.slug}.html`),
610
+ renderSitePage(page, marked.parse(page.markdown), shell),
611
+ );
612
+ }
613
+ }
614
+
615
+ function removeLegacyCrawlDir() {
616
+ const crawlDir = path.join(DOCS_OUT, "crawl");
617
+ if (fs.existsSync(crawlDir)) {
618
+ fs.rmSync(crawlDir, { recursive: true, force: true });
619
+ }
620
+ }
621
+
500
622
  export function generateCrawlDocs() {
501
623
  if (!fs.existsSync(DOCS_OUT)) {
502
624
  console.warn("generate-crawl-docs: docs/ not found, skipping");
503
625
  return;
504
626
  }
505
627
 
506
- if (fs.existsSync(CRAWL_DIR)) {
507
- fs.rmSync(CRAWL_DIR, { recursive: true, force: true });
508
- }
628
+ removeLegacyCrawlDir();
509
629
 
510
630
  const mdFiles = listMdFiles(SRC_DIR).sort();
511
631
  const pages = [];
@@ -517,14 +637,13 @@ export function generateCrawlDocs() {
517
637
  const description = extractDescription(raw, title);
518
638
  const keywords = extractKeywords(mdRel, title, raw);
519
639
  const plainText = markdownToPlainText(raw);
520
- const markdown = rewriteDocLinks(preprocessSonicCode(raw), mdRel);
640
+ const markdown = rewriteDocLinks(preprocessSonicCode(raw));
521
641
  const bodyHtml = marked.parse(markdown);
522
- const crawlRel = crawlHtmlPath(mdRel);
523
- const outPath = path.join(DOCS_OUT, crawlRel);
642
+ const htmlRel = staticHtmlRel(mdRel);
524
643
  const id = docId(mdRel);
525
644
 
526
645
  writeFileEnsuringDir(
527
- outPath,
646
+ path.join(DOCS_OUT, htmlRel),
528
647
  renderPage({ mdRel, title, description, keywords, bodyHtml }),
529
648
  );
530
649
 
@@ -535,19 +654,14 @@ export function generateCrawlDocs() {
535
654
  description,
536
655
  keywords,
537
656
  plainText,
538
- crawlPath: crawlRel,
539
- crawlHref: crawlRel.replace(/^crawl\//, ""),
657
+ pagePath: pagePath(mdRel),
658
+ htmlRel,
540
659
  });
541
660
  }
542
661
 
543
662
  writeFileEnsuringDir(
544
- path.join(CRAWL_DIR, "index.html"),
545
- renderIndex(
546
- pages.map((p) => ({
547
- ...p,
548
- crawlHref: p.mdRel.replace(/\.mdx?$/, ".html"),
549
- })),
550
- ),
663
+ path.join(DOCS_OUT, "docs/index.html"),
664
+ renderIndex(pages),
551
665
  );
552
666
 
553
667
  const hubs = generateTopicHubs(pages);
@@ -558,9 +672,10 @@ export function generateCrawlDocs() {
558
672
  path.join(DOCS_OUT, "llms-full.txt"),
559
673
  generateLlmsFullTxt(pages, hubs),
560
674
  );
675
+ writeAgentSiteArtifacts(DOCS_OUT);
561
676
 
562
677
  console.info(
563
- `generate-crawl-docs: ${pages.length} pages, ${hubs.length} hubs → docs/crawl/, sitemap.xml, llms.txt, llms-full.txt`,
678
+ `generate-crawl-docs: ${pages.length} pages, ${hubs.length} hubs → pathnames /docs|/core + hubs/, sitemap, llms*, index.md (no /crawl/)`,
564
679
  );
565
680
  }
566
681