@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,290 +1,150 @@
1
1
  # Date
2
2
 
3
- ## No attribute
3
+ **`sonic-date`** formats a date or a date range with `Intl.DateTimeFormat`. Pass a Unix timestamp in seconds (`date`) or a parsable string (`date_string`), add `end_date` for a range, and tune each part (`weekday` · `month` · `hour` …) with attributes. With no date and no `now`, it renders nothing.
4
4
 
5
- **Nothing** is displayed.
5
+ ## Basic example
6
6
 
7
- <sonic-code>
8
- <template>
9
- <sonic-date></sonic-date>
10
- </template>
11
- </sonic-code>
12
-
13
- ## Now
14
-
15
- Displays the **current date**.
7
+ `date` is in **seconds**, not milliseconds. `date_string` accepts anything `new Date()` parses: prefer ISO 8601 with an explicit offset. `now` shows the current date.
16
8
 
17
9
  <sonic-code>
18
10
  <template>
19
- <sonic-date now></sonic-date>
20
- </template>
21
- </sonic-code>
22
-
23
-
24
- ## Date
25
-
26
- Displays a date from a **timestamp**.
27
-
28
- <sonic-code>
29
- <template>
30
- <sonic-date date= "1640265629"></sonic-date>
31
- </template>
32
- </sonic-code>
33
-
34
- ## Date_string
35
-
36
- Displays a date from a **string**.
37
-
38
- <sonic-code>
39
- <template>
40
- <sonic-date date_string="July 20, 69 20:17:40 GMT+00:00"></sonic-date>
41
- </template>
42
- </sonic-code>
43
-
44
- ## Start_date / end_date
45
-
46
- Displays a period of time **from start_date to end_date**.
47
- When by itself **start_date** will act as **date**
48
- if a **start_date is not specified** it will be set by the **current date**.
49
- if the **end_date is anterior** to start date date it will be **used as the start_date**.
50
-
51
- <sonic-code>
52
- <template>
53
- <!-- from start_date to end_date -->
54
- <sonic-date start_date="1640265629" end_date= "1640365629"></sonic-date>
55
- <br>
56
- <!-- start_date is not specified -->
57
- <sonic-date end_date= "2640365629"></sonic-date>
58
- <br>
59
- <!-- end_date is anterior -->
60
- <sonic-date end_date= "640365629"></sonic-date>
61
- </template>
62
- </sonic-code>
63
-
64
-
65
- ## Start_date_string / end_date_string
66
-
67
- <sonic-code>
68
- <template>
69
- <!-- from start_date to end_date -->
70
- <sonic-date date_string="July 20, 90 20:17:40 GMT+00:00" end_date_string= "June 20, 94 20:17:40 GMT+00:00"></sonic-date>
71
- <br>
72
- <!-- start_date is not specified -->
73
- <sonic-date end_date_string= "May 20, 34 20:17:40 GMT+00:00"></sonic-date>
74
- <br>
75
- <!-- end_date is anterior -->
76
- <sonic-date end_date_string= "April 20, 06 20:17:40 GMT+00:00"></sonic-date>
77
- </template>
78
- </sonic-code>
79
-
80
- ## Wording_billet_periode_validite
81
-
82
- <sonic-code>
83
- <template>
84
- <sonic-date wording_billet_periode_validite= "À partir du %s jusqu'au %s" start_date="1640265629" end_date= "1640365629"></sonic-date>
11
+ <div class="grid gap-2">
12
+ <div>Departure: <sonic-date date="1781514000" language="en"></sonic-date></div>
13
+ <div>Arrival: <sonic-date date_string="2026-06-15T12:45:00Z" language="en"></sonic-date></div>
14
+ <div>Now: <sonic-date now language="en"></sonic-date></div>
15
+ </div>
85
16
  </template>
86
17
  </sonic-code>
87
18
 
19
+ ## Date range
88
20
 
89
- ## Weekday
90
-
91
- <sonic-code>
92
- <template>
93
- <b>narrow : </b>
94
- <sonic-date weekday="narrow" now></sonic-date>
95
- <br>
96
- <b>short (default) : </b>
97
- <sonic-date weekday="short" now></sonic-date>
98
- <br>
99
- <b>long : </b>
100
- <sonic-date weekday="long" now></sonic-date>
101
- <br>
102
- <b>hidden : </b>
103
- <sonic-date weekday="hidden" now></sonic-date>
104
- </template>
105
- </sonic-code>
21
+ Set `start_date` and `end_date` (or their `_string` variants). On two different days, only the dates are shown, with the "from … to …" wording. On the same day, the hours are kept. `hide_hours` drops them anyway.
106
22
 
107
- ## Day
23
+ Without a start, the range starts now. If the end is before the start, the two are swapped.
108
24
 
109
25
  <sonic-code>
110
26
  <template>
111
- <b>numeric : </b>
112
- <sonic-date day="numeric" date_string="July 01, 69"></sonic-date>
113
- <br>
114
- <b>2-digit (default) : </b>
115
- <sonic-date day="2-digit" date_string="July 01, 69"></sonic-date>
27
+ <div class="grid gap-2">
28
+ <sonic-date start_date_string="2026-06-15T09:00:00Z" end_date_string="2026-06-22T18:00:00Z" language="en" wording_billet_periode_validite="From %s to %s"></sonic-date>
29
+ <sonic-date start_date_string="2026-06-15T09:00:00Z" end_date_string="2026-06-15T12:45:00Z" language="en"></sonic-date>
30
+ <sonic-date start_date_string="2026-06-15T09:00:00Z" end_date_string="2026-06-15T12:45:00Z" language="en" hide_hours></sonic-date>
31
+ </div>
116
32
  </template>
117
33
  </sonic-code>
118
34
 
119
- ## Month
35
+ ## Range wording
120
36
 
121
- <sonic-code>
122
- <template>
123
- <b>numeric : </b>
124
- <sonic-date month="numeric" now></sonic-date>
125
- <br>
126
- <b>2-digit : </b>
127
- <sonic-date month="2-digit" now></sonic-date>
128
- <br>
129
- <b>narrow : </b>
130
- <sonic-date month="narrow" now></sonic-date>
131
- <br>
132
- <b>short (default) : </b>
133
- <sonic-date month="short" now></sonic-date>
134
- <br>
135
- <b>long : </b>
136
- <sonic-date month="long" now></sonic-date>
137
- </template>
138
- </sonic-code>
139
-
140
- ## Year
37
+ `wording_billet_periode_validite` holds the range wording, with one `%s` per date. It defaults to the French `Du %s au %s`, whatever the language: **set it for every non-French page**.
141
38
 
142
39
  <sonic-code>
143
40
  <template>
144
- <b>numeric (default) : </b>
145
- <sonic-date year="numeric" now></sonic-date>
146
- <br>
147
- <b>2-digit : </b>
148
- <sonic-date year="2-digit" now></sonic-date>
41
+ <sonic-date start_date_string="2026-06-15" end_date_string="2026-06-22" language="en" wording_billet_periode_validite="Valid from %s until %s"></sonic-date>
149
42
  </template>
150
43
  </sonic-code>
151
44
 
152
- ## Hour
153
-
154
- <sonic-code>
155
- <template>
156
- <b>numeric : </b>
157
- <sonic-date hour="numeric" date_string= "June 20, 04 02:06:02 GMT+00:00"></sonic-date>
158
- <br>
159
- <b>2-digit (default) : </b>
160
- <sonic-date hour="2-digit" date_string= "June 20, 04 02:06:02 GMT+00:00"></sonic-date>
161
- <br>
162
- <b>hidden : </b>
163
- <sonic-date hour="hidden" date_string= "June 20, 04 02:06:02 GMT+00:00"></sonic-date>
164
- </template>
165
- </sonic-code>
45
+ ## Format options
166
46
 
167
- ## Minute
47
+ Defaults: `weekday="short"` · `day="2-digit"` · `month="short"` · `year="numeric"` · `hour="2-digit"` · `minute="2-digit"`, 24-hour clock, no era. `hidden` removes a part.
168
48
 
169
49
  <sonic-code>
170
50
  <template>
171
- <b>numeric : </b>
172
- <sonic-date minute="numeric" date_string= "June 20, 04 02:06:02 GMT+00:00"></sonic-date>
173
- <br>
174
- <b>2-digit (default) : </b>
175
- <sonic-date minute="2-digit" date_string= "June 20, 04 02:06:02 GMT+00:00"></sonic-date>
176
- <br>
177
- <b>hidden : </b>
178
- <sonic-date minute="hidden" date_string= "June 20, 04 02:06:02 GMT+00:00"></sonic-date>
51
+ <div class="grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-sm">
52
+ <code>default</code><sonic-date date_string="2026-06-15T09:00:00Z" time_zone="Europe/Paris" language="en"></sonic-date>
53
+ <code>weekday="long"</code><sonic-date weekday="long" date_string="2026-06-15T09:00:00Z" time_zone="Europe/Paris" language="en"></sonic-date>
54
+ <code>weekday="narrow"</code><sonic-date weekday="narrow" date_string="2026-06-15T09:00:00Z" time_zone="Europe/Paris" language="en"></sonic-date>
55
+ <code>weekday="hidden"</code><sonic-date weekday="hidden" date_string="2026-06-15T09:00:00Z" time_zone="Europe/Paris" language="en"></sonic-date>
56
+ <code>day="numeric"</code><sonic-date day="numeric" date_string="2026-06-05T09:00:00Z" time_zone="Europe/Paris" language="en"></sonic-date>
57
+ <code>month="long"</code><sonic-date month="long" date_string="2026-06-15T09:00:00Z" time_zone="Europe/Paris" language="en"></sonic-date>
58
+ <code>month="narrow"</code><sonic-date month="narrow" date_string="2026-06-15T09:00:00Z" time_zone="Europe/Paris" language="en"></sonic-date>
59
+ <code>month="numeric"</code><sonic-date month="numeric" date_string="2026-06-15T09:00:00Z" time_zone="Europe/Paris" language="en"></sonic-date>
60
+ <code>month="2-digit"</code><sonic-date month="2-digit" date_string="2026-06-15T09:00:00Z" time_zone="Europe/Paris" language="en"></sonic-date>
61
+ <code>year="2-digit"</code><sonic-date year="2-digit" date_string="2026-06-15T09:00:00Z" time_zone="Europe/Paris" language="en"></sonic-date>
62
+ <code>hour="numeric"</code><sonic-date hour="numeric" date_string="2026-06-15T07:05:00Z" time_zone="Europe/Paris" language="en"></sonic-date>
63
+ <code>hour12</code><sonic-date hour12 date_string="2026-06-15T09:00:00Z" time_zone="Europe/Paris" language="en"></sonic-date>
64
+ <code>hour="hidden" minute="hidden"</code><sonic-date hour="hidden" minute="hidden" date_string="2026-06-15T09:00:00Z" time_zone="Europe/Paris" language="en"></sonic-date>
65
+ <code>era="short"</code><sonic-date era="short" date_string="2026-06-15T09:00:00Z" time_zone="Europe/Paris" language="en"></sonic-date>
66
+ </div>
179
67
  </template>
180
68
  </sonic-code>
181
69
 
182
- ## Language
70
+ ## Language
183
71
 
184
- <sonic-button href="https://www.w3schools.com/tags/ref_language_codes.asp" target="_blank" type="info" size="sm">ISO 639-1 Language Codes</sonic-button>
72
+ With no `language`, the component follows `<html lang>` and updates when it changes. Pass a BCP 47 tag to force one.
185
73
 
186
74
  <sonic-code>
187
75
  <template>
188
- <b>fr : </b>
189
- <sonic-date language="fr" now></sonic-date>
190
- <br>
191
- <b>en : </b>
192
- <sonic-date language="en" now></sonic-date>
193
- <br>
194
- <b>zh : </b>
195
- <sonic-date language="zh" now></sonic-date>
196
- <br>
197
- <b>ja : </b>
198
- <sonic-date language="ja" now></sonic-date>
76
+ <div class="grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-sm">
77
+ <code>en</code><sonic-date language="en" date_string="2026-06-15T09:00:00Z"></sonic-date>
78
+ <code>fr</code><sonic-date language="fr" date_string="2026-06-15T09:00:00Z"></sonic-date>
79
+ <code>ja</code><sonic-date language="ja" date_string="2026-06-15T09:00:00Z"></sonic-date>
80
+ </div>
199
81
  </template>
200
82
  </sonic-code>
201
83
 
202
- ## Time_zone
203
-
204
- For the list of supported timeZones, run <b class="text-info">Intl.supportedValuesOf('timeZone')</b> in the console
205
-
206
- <sonic-code>
207
- <template>
208
- <b>Europe/London : </b>
209
- <sonic-date time_zone="Europe/London" now></sonic-date>
210
- <br>
211
- <b>Europe/Paris : </b>
212
- <sonic-date time_zone="Europe/Paris" now></sonic-date>
213
- <br>
214
- <b>America/Tijuana : </b>
215
- <sonic-date time_zone="America/Tijuana" now></sonic-date>
216
- </template>
217
- </sonic-code>
84
+ ## Time zone
218
85
 
219
- ## Era
86
+ With no `time_zone`, dates use the browser time zone. Pass an IANA name (`Intl.supportedValuesOf("timeZone")` lists them) to show local airport time.
220
87
 
221
88
  <sonic-code>
222
89
  <template>
223
- <b>narrow : </b>
224
- <sonic-date era="narrow" now></sonic-date>
225
- <br>
226
- <b>short : </b>
227
- <sonic-date era="short" now></sonic-date>
228
- <br>
229
- <b>long : </b>
230
- <sonic-date era="long" now></sonic-date>
90
+ <div class="grid gap-2">
91
+ <div>CN 001 departs CDG at <sonic-date date_string="2026-06-15T09:00:00Z" time_zone="Europe/Paris" weekday="hidden" language="en"></sonic-date> (Paris)</div>
92
+ <div>and lands at JFK at <sonic-date date_string="2026-06-15T12:45:00Z" time_zone="America/New_York" weekday="hidden" language="en"></sonic-date> (New York)</div>
93
+ </div>
231
94
  </template>
232
95
  </sonic-code>
233
96
 
234
- ## .renderIf
235
-
236
- <sonic-alert status="error" background>Deprecated</sonic-alert>
237
-
238
- <sonic-code>
239
- <template>
240
- <b>True statement : </b>
241
- <sonic-date data-bind ::render-if="|10>2" now></sonic-date>
242
- <br>
243
- <b>False statement : </b>
244
- <sonic-date data-bind ::render-if="|10<2" now></sonic-date>
245
- </template>
246
- </sonic-code>
97
+ ## Custom parts
247
98
 
248
- ## DesignMode
99
+ A child `<template data-value="<part>">` wraps a part in your own markup: `weekday` · `day` · `month` · `year` · `hour` · `minute` · `literal`, plus `from` and `to` in ranges. An empty element receives the part value; a non-empty one replaces it. `designMode` drops the leading "from" word and the commas, for stacked layouts. Add `noShadowDom` so page styles reach the parts.
249
100
 
250
101
  <sonic-code>
251
102
  <template>
252
- <div class="relative max-w-lg rounded-lg overflow-hidden">
253
- <div class="absolute top-0 h-1/2 w-full bg-gradient-to-b from-[rgba(0,0,10,.2)] z-10 "></div>
103
+ <div class="relative max-w-sm rounded-lg overflow-hidden">
254
104
  <sonic-date
255
105
  designMode
256
106
  noShadowDom
257
- start_date= "1640265629"
258
- end_date= "1640365629"
259
- language= "fr"
260
- wording_billet_periode_validite= "Du %s au %s"
261
- year= "numeric"
262
- month= "short"
263
- weekday= "short"
264
- hour= "2-digit"
265
- minute= "2-digit"
266
- class="py-4 drop-shadow-lg text-contrast-content p-4 inline-block text-center absolute left-0 z-20 text-sm"
107
+ start_date_string="2026-06-15"
108
+ end_date_string="2026-06-22"
109
+ language="en"
110
+ wording_billet_periode_validite="From %s to %s"
111
+ class="absolute top-0 left-0 z-10 p-4 text-center text-sm text-white drop-shadow-lg"
267
112
  >
268
- <template data-value="weekday">
269
- <span class="hidden"></span>
270
- </template>
271
- <template data-value="day">
272
- <span class="text-4xl block uppercase leading-none font-bold"></span>
273
- </template>
274
- <template data-value="month">
275
- <span class="text-xl block uppercase leading-tight font-bold"></span>
276
- </template>
277
- <template data-value="year">
278
- <span class="text-lg mb-1 font-bold block uppercase leading-tight "></span>
279
- </template>
280
- <template data-value="to">
281
- <span class="font-medium block my-1 text-3xl leading-none">↓</span>
282
- </template>
113
+ <template data-value="weekday"><span class="hidden"></span></template>
114
+ <template data-value="day"><span class="block text-4xl font-bold leading-none"></span></template>
115
+ <template data-value="month"><span class="block text-xl font-bold uppercase leading-tight"></span></template>
116
+ <template data-value="year"><span class="block text-lg font-bold leading-tight"></span></template>
117
+ <template data-value="to"><span class="block my-1 text-3xl leading-none">↓</span></template>
283
118
  </sonic-date>
284
- <sonic-image
285
- ratio="1/1" src="https://picsum.photos/id/237/700/700">
286
- </sonic-image>
119
+ <sonic-image src="/img/concorde/plane_03.jpg" alt="Concorde specifications board" ratio="1/1" cover></sonic-image>
287
120
  </div>
288
121
  </template>
289
122
  </sonic-code>
290
123
 
124
+ ## API reference
125
+
126
+ | Attribute | Values | Description |
127
+ |-----------|--------|-------------|
128
+ | `date` | number | Unix timestamp in seconds |
129
+ | `date_string` | string | Date parsed with `new Date()`. Overrides `date` |
130
+ | `start_date` / `start_date_string` | number / string | Range start. Overrides `date` |
131
+ | `end_date` / `end_date_string` | number / string | Range end. Swapped with the start when earlier |
132
+ | `now` | boolean | Uses the current date when no start is set |
133
+ | `hide_hours` | boolean | Hides hours and minutes in a same-day range |
134
+ | `weekday` | `narrow` · `short` · `long` · `hidden` (default `short`) | Weekday format |
135
+ | `day` | `numeric` · `2-digit` (default `2-digit`) | Day format |
136
+ | `month` | `numeric` · `2-digit` · `narrow` · `short` · `long` (default `short`) | Month format |
137
+ | `year` | `numeric` · `2-digit` (default `numeric`) | Year format |
138
+ | `hour` | `numeric` · `2-digit` · `hidden` (default `2-digit`) | Hour format |
139
+ | `minute` | `numeric` · `2-digit` · `hidden` (default `2-digit`) | Minute format |
140
+ | `hour12` | boolean | 12-hour clock. Default is 24-hour |
141
+ | `era` | `narrow` · `short` · `long` | Shows the era. Hidden by default |
142
+ | `language` | BCP 47 tag | Locale. Defaults to `<html lang>` |
143
+ | `time_zone` | IANA name | Time zone. Defaults to the browser one |
144
+ | `wording_billet_periode_validite` | string with two `%s` (default `Du %s au %s`) | Wording of a multi-day range |
145
+ | `designMode` | boolean | Removes the "from" word and commas |
146
+ | `noShadowDom` | boolean | Renders in light DOM so page styles apply to the parts |
147
+ | `templates` | `HTMLTemplateElement[]` (property) | Part templates, instead of child `<template>` elements |
148
+ | `renderIf` | boolean | Deprecated: wrap the date in [sonic-if](/core/components/functional/if) instead |
149
+
150
+ No slots. Child `<template data-value>` elements customise the parts.
@@ -2,6 +2,7 @@ import { html, LitElement } from "lit";
2
2
  import { customElement, property, state } from "lit/decorators.js";
3
3
  import { Endpoint } from "@supersoniks/concorde/utils";
4
4
  import { DataProviderKey } from "@supersoniks/concorde/core/utils/dataProviderKey";
5
+ import type { Frozen } from "@supersoniks/concorde/utils/deepReadonly";
5
6
  import {
6
7
  get,
7
8
  publish,
@@ -19,6 +20,7 @@ const endpoint = new Endpoint<City[], { limit: number }>(
19
20
  /** Même path que l’endpoint ; type = charge utile `@get` pour `@publish`. */
20
21
  const dpKey = new DataProviderKey<ApiResult<City[]>>(endpoint.path);
21
22
 
23
+
22
24
  const tagName = "sonic-example"; // For Astro.build
23
25
  @customElement(tagName)
24
26
  export class SonicComponent extends LitElement {
@@ -31,7 +33,7 @@ export class SonicComponent extends LitElement {
31
33
 
32
34
  @state()
33
35
  @subscribe(dpKey.result)
34
- geoCommunesResult?: City[];
36
+ geoCommunesResult?: Frozen<City[]>;
35
37
 
36
38
  render() {
37
39
  return html` <span part="api-get-demo">
@@ -1,125 +1,108 @@
1
1
  # Fetch
2
2
 
3
- > **New apps:** prefer [@get](#docs/_decorators/get.md/get) for a typed GET on a component, or [List](#core/components/functional/list/list.md/list) / [Queue](#core/components/functional/queue/queue.md/queue) with `fetch` for collections. Use [Local API demos](#docs/_misc/docs-mock-api.md/docs-mock-api) (`serviceURL="/docs-mock-api"`) to try examples offline.
4
-
5
- The **sonic-fetch** component requests and stores API data. It extends the Fetcher and [Subscriber](#docs/_core-concept/subscriber.md/subscriber) mixins.
6
-
7
-
8
-
9
-
10
-
11
- ## Basic usage
12
- In order to work properly the <b>sonic-fetch</b> component needs at least the following attributes.
13
- - **serviceURL** : A base service url. This attribute can be inherited from an ancestor.
14
- *ex : /docs-mock-api*
15
- - **endPoint** : the specific location where requests for information are sent (see the api docs).
16
- *ex : api/users | api/users?page=2 | api/users/2*
17
- - **dataProvider *(Required)*** : An ID that is used as a reference to the object storing the data returned by the API.
18
- This attribute can be inherited from an ancestor.
3
+ **`sonic-fetch`** sends a GET request to `serviceURL` + `endPoint` and publishes the response under `dataProvider`, so its children and any subscriber of that provider can render it. In a Lit component, prefer the [@get](/docs/decorators/get) decorator; for collections, use [List](/core/components/functional/list) or [Queue](/core/components/functional/queue).
19
4
 
5
+ ## Basic example
20
6
 
7
+ `dataProvider` is required; `serviceURL` and `dataProvider` can be set on an ancestor. Children are hidden while the request is pending. With no `serviceURL`, requests go to the page origin.
21
8
 
22
9
  <sonic-code>
23
10
  <template>
24
- <sonic-fetch serviceURL="/docs-mock-api" endPoint="api/users?page=2" dataProvider="myDataObj"></sonic-fetch>
25
- <sonic-button dataProvider="myDataObj" debug>Hover to see the data</sonic-button>
11
+ <sonic-fetch serviceURL="/docs-mock-api" endPoint="flights?direction=departures" dataProvider="docsFetchNextDeparture" key="flights.0">
12
+ <p data-bind ::inner-html="Next departure: <b>$code</b> to $city, gate $gate"></p>
13
+ </sonic-fetch>
26
14
  </template>
27
15
  </sonic-code>
28
16
 
29
- ## DataProvider as an endPoint
30
- If no **endPoint** is specified it will be filled by the **dataProvider ID** instead
17
+ ## Data provider as endpoint
18
+
19
+ With no `endPoint`, the `dataProvider` value is used as the endpoint.
31
20
 
32
21
  <sonic-code>
33
22
  <template>
34
- <sonic-fetch serviceURL="/docs-mock-api" dataProvider="api/users?page=2" ></sonic-fetch>
35
- <sonic-button dataProvider="api/users?page=2" debug>Hover to see the data</sonic-button>
23
+ <sonic-fetch serviceURL="/docs-mock-api" dataProvider="flights?direction=arrivals" key="flights.0">
24
+ <p data-bind ::inner-html="Next arrival: <b>$code</b> from $city at $time"></p>
25
+ </sonic-fetch>
36
26
  </template>
37
27
  </sonic-code>
38
28
 
39
- ## HeadersDataProvider
40
-
41
- <sonic-alert status="error" background>Deprecated</sonic-alert>
42
-
43
29
  ## Key
44
- When the **key** attribute is present, only a sub-part of the data received is injected into the **dataProvider**.
45
- We can use the dot syntax to target what we want to keep.
46
30
 
47
- For example if the data is `{my:{data:{a:1,b:2}}}` and the key is `key="my.data"`, the data available in the **dataProvider** will be `{a:1 , b:2}`
31
+ `key` keeps only part of the response, using a dot path: with `{ "flights": [ … ] }` and `key="flights.1"`, the provider holds the second flight. Add `preserveOtherKeys` to merge the target into the parent object instead of dropping its siblings. With no `key`, the whole response is published.
48
32
 
49
33
  <sonic-code>
50
34
  <template>
51
- <sonic-fetch serviceURL="/docs-mock-api" dataProvider="api/users/2" ></sonic-fetch>
52
- <sonic-button dataProvider="api/users/2" debug>dataProvider object</sonic-button>
53
- <!-- Get the user ID -->
54
- <sonic-fetch serviceURL="/docs-mock-api" dataProvider="id" endPoint="api/users/2" key="data.id"></sonic-fetch>
55
- <sonic-button dataProvider="id" debug>data.id</sonic-button>
56
- <!-- Get the user First name -->
57
- <sonic-fetch serviceURL="/docs-mock-api" dataProvider="first_name" endPoint="api/users/2" key="data.first_name"></sonic-fetch>
58
- <sonic-button dataProvider="first_name" debug>data.first_name</sonic-button>
59
- <!-- Get the user Last name -->
60
- <sonic-fetch serviceURL="/docs-mock-api" dataProvider="last_name" endPoint="api/users/2" key="data.last_name"></sonic-fetch>
61
- <sonic-button dataProvider="last_name" debug>data.last_name</sonic-button>
62
- <!-- Get the user email -->
63
- <sonic-fetch serviceURL="/docs-mock-api" dataProvider="email" endPoint="api/users/2" key="data.email"></sonic-fetch>
64
- <sonic-button dataProvider="email" debug>data.email</sonic-button>
35
+ <sonic-fetch serviceURL="/docs-mock-api" endPoint="flights?direction=departures" dataProvider="docsFetchKey" key="flights.1">
36
+ <p data-bind ::inner-html="$code to $city ($airport), status $status"></p>
37
+ </sonic-fetch>
65
38
  </template>
66
39
  </sonic-code>
67
40
 
68
- ## Text mode
41
+ ## Loader and skeleton
69
42
 
70
- if the mime type of the content returned by the service begins with **text/**, then the dataProvider has a key named "text" which contains the text returned by the service.
43
+ With no `loader`, nothing is shown during the request. Set `loader` (`fixed` overlay) or `loader="inline"` to show a [Loader](/core/components/ui/loader), or add a `<template skeleton>` child rendered in place of the content while loading.
71
44
 
72
45
  <sonic-code>
73
46
  <template>
74
- <sonic-fetch endPoint="README.md" dataProvider="fetchText"></sonic-fetch>
75
- <sonic-button dataProvider="fetchText" debug>Hover to see the data</sonic-button>
47
+ <sonic-fetch loader="inline" serviceURL="/docs-mock-api" endPoint="flights?direction=arrivals" dataProvider="docsFetchLoader" key="flights.2">
48
+ <template skeleton>
49
+ <p class="text-neutral-400">Loading arrivals…</p>
50
+ </template>
51
+ <p data-bind ::inner-html="<b>$code</b> from $city: $status"></p>
52
+ </sonic-fetch>
76
53
  </template>
77
54
  </sonic-code>
78
55
 
79
- ## NoLoader
56
+ ## Text responses
80
57
 
81
- The noLoader attribute disables display of the default loader
58
+ When the response type starts with `text/`, the provider holds `{ text: "…" }`.
82
59
 
83
60
  <sonic-code>
84
61
  <template>
85
- <sonic-fetch noLoader serviceURL="/docs-mock-api" endPoint="api/users?page=2" dataProvider="myDataObj"></sonic-fetch>
86
- <sonic-button dataProvider="myDataObj" debug>Basic fetch with noLoader attribute</sonic-button>
62
+ <sonic-fetch endPoint="robots.txt" dataProvider="docsFetchText">
63
+ <pre class="max-h-40 overflow-auto text-xs" data-bind ::inner-html="$text"></pre>
64
+ </sonic-fetch>
87
65
  </template>
88
66
  </sonic-code>
89
67
 
68
+ ## Reloading
90
69
 
70
+ `endPoint` is reactive: changing it fetches again. Call `invalidate()` on the publisher to reload the same endpoint, or set `refetchEveryMs` to poll. A request that fails with no data shows an error toast.
91
71
 
72
+ <sonic-code language="typescript">
73
+ <template>
74
+ import { PublisherManager } from "@supersoniks/concorde/utils";
92
75
 
93
- <!--
94
- ## Summary
95
- Extends mixins : Fetcher, [Subscriber](#core/components/functional/subscriber/subscriber.md/subscriber)
96
-
97
- ### Configuration via les attributs
98
-
99
- | nom | sur quelle balise | Description | Exemple de valeur | défaut / requis |
100
- |-----|-----|---|---|---|
101
- | serviceURL |Fetcher ou un de ses parents | URL de base des services. | http://la-billetterie.net/api/v2 | domain du site |
102
- | endpoint |Fetcher | point d'accès d'un service | user/2 | valeur de l'attribut dataProvider |
103
- | dataProvider |Fetcher ou un de ses parents | Identifiant d'un publisher qui stock les données, voir [subscriber](#core/components/functional/subscriber/subscriber.md/subscriber). | billetterie/user/2 | *REQUIS* |
104
- | headersDataProvider |Fetcher ou un de ses parents | Identifiant d'un publisher qui stock les données destinées à être envoyées en entêtes de la requetes | MyCoockieHEaders | null |
105
- | key |Fetcher | extrait une sous propriété de la donnée chargée avant de l'assignée à son publisher | ma.data | null |
106
-
107
- *Si la données est `{ma:{data:{a:1,b:2}}}` et `key="ma.data"`, la données disponible dans le composant sera `{a:1, b:2}`*
108
-
109
- ### Intégration auto de basic auth (pour tester une api qui nécessite une authentification)
110
-
111
- Fetch utilise le service pour générer le token et l'ajoute au header de l'appel qui récupère les données.
112
-
113
- | nom | sur quelle balise | Description | Exemple de valeur | défaut / requis |
114
- |-----|-----|---|---|---|
115
- | userName | Fetcher ou un de ses parents | Nom de l'utilisateur | DjuDju | null |
116
- | password | Fetcher ou un de ses parents | mot de passe | pom_549 | null |
117
- | tokenProvider | Fetcher ou un de ses parents | point d'accès du service fournissant le token | auth | null |
118
- | token | Fetcher ou un de ses parents | A fournir à la place des autres attributs si on le possède | q<d34gb | null |
119
-
120
- ### Autres choses utiles
121
- L'attribut *noLoader* du composant permet de désactiver l'affichage du loader par défaut.
122
- On peut appeler la methode invalidate() sur le publisher associé au composant pour declencher le rechargement des données.
123
- endPoint est une propriété réctive, par conséquent, sa modification, manuelle via template ou data binbding provoque la mise à jour du contenu.
124
- -->
76
+ PublisherManager.get("docsFetchNextDeparture").invalidate();
77
+ </template>
78
+ </sonic-code>
125
79
 
80
+ ## API reference
81
+
82
+ | Attribute | Values | Description |
83
+ |-----------|--------|-------------|
84
+ | `dataProvider` | string | **Required.** Publisher that receives the data. Also the endpoint when `endPoint` is empty. Inherited from ancestors |
85
+ | `serviceURL` | URL (default page origin) | Base URL of the API. Inherited from ancestors |
86
+ | `endPoint` | string | Path appended to `serviceURL`. Reactive |
87
+ | `key` | dot path | Part of the response to publish |
88
+ | `preserveOtherKeys` | boolean | With `key`, keeps the sibling properties of the target |
89
+ | `loader` | `fixed` (when empty) · `inline` | Loader shown during the request. None by default |
90
+ | `lazyload` | boolean | Fetches when the element nears the viewport |
91
+ | `lazyBoundsRatio` | number (default `1`) | Viewport ratio used as margin by `lazyload` |
92
+ | `refetchEveryMs` | number (default `0`) | Polling interval in milliseconds; `0` disables it |
93
+ | `headersDataProvider` | string | Publisher whose data is sent as request headers. Inherited from ancestors |
94
+ | `token` | string | Bearer token. Inherited from ancestors |
95
+ | `userName` · `password` · `tokenProvider` | string | Basic auth used to get a token from `tokenProvider` when no `token` is set. Inherited from ancestors |
96
+ | `credentials` | `omit` · `same-origin` · `include` | `fetch` credentials mode. Inherited from ancestors |
97
+ | `cache` | `RequestCache` value | `fetch` cache mode |
98
+ | `addHTTPResponse` | boolean | Adds the HTTP response as `_sonic_http_response_` on the data. Inherited from ancestors |
99
+ | `localStorage` | `disabled` (default) · `enabled` | Persists the publisher in `localStorage` |
100
+
101
+ | Slot | Description |
102
+ |------|-------------|
103
+ | *(default)* | Content, hidden while the request is pending |
104
+
105
+ | Event | Description |
106
+ |-------|-------------|
107
+ | `loading` | The request starts |
108
+ | `load` | The data is published |
@@ -1,9 +1,34 @@
1
- # if
1
+ # If
2
2
 
3
- The **sonic-if** component shows its slot when **`.condition`** is true. In Lit, bind `.condition` from store-driven state (`@subscribe` on a `formDataProvider` field) — live preview and **TypeScript source are the same file** (`docs-lit-demo`):
3
+ **`sonic-if`** renders its default slot only while `condition` is true. Use it to show or hide a block from reactive state; with no `condition`, the content is not rendered. The host uses `display: contents`, so it adds no box to the layout.
4
+
5
+ ## Basic example
6
+
7
+ <sonic-code>
8
+ <template>
9
+ <sonic-if condition>
10
+ <sonic-badge type="success">CN 001 · Boarding</sonic-badge>
11
+ </sonic-if>
12
+ <sonic-if>
13
+ <sonic-badge type="danger">Never rendered</sonic-badge>
14
+ </sonic-if>
15
+ </template>
16
+ </sonic-code>
17
+
18
+ `condition` is a boolean attribute: **any value, even `condition="false"`, counts as true**. To toggle it, remove the attribute or bind the property.
19
+
20
+ ## Reactive condition
21
+
22
+ In Lit, bind `.condition` to state read with `@subscribe`. Here a checkbox writes to a `formDataProvider` and the component re-renders from it.
4
23
 
5
24
  <docs-lit-demo for="docs-toggle-if-demo"></docs-lit-demo>
6
25
 
7
- Plain HTML without Lit: [HTML integration](#docs/_misc/html-integration.md/html-integration).
26
+ ## API reference
8
27
 
28
+ | Attribute | Values | Description |
29
+ |-----------|--------|-------------|
30
+ | `condition` | boolean (default `false`) | Renders the default slot when true |
9
31
 
32
+ | Slot | Description |
33
+ |------|-------------|
34
+ | *(default)* | Content rendered while `condition` is true |