@supersoniks/concorde 5.0.2 → 5.0.4

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 (266) hide show
  1. package/.github/workflows/ci.yml +21 -0
  2. package/.github-export-ignore +30 -0
  3. package/CONTRIBUTING.md +59 -0
  4. package/DEV.md +54 -0
  5. package/LICENSE +21 -0
  6. package/OPEN_SOURCE_CHECKPOINT.md +133 -0
  7. package/build-infos.json +1 -1
  8. package/concorde-core.bundle.js +66 -66
  9. package/concorde-core.es.js +1368 -1318
  10. package/dist/concorde-core.bundle.js +66 -66
  11. package/dist/concorde-core.es.js +1368 -1318
  12. package/docs/altcha-widget.js +2662 -0
  13. package/docs/assets/index-D8MVWqY6.js +12251 -0
  14. package/docs/assets/index-DiD0qYvE.css +1 -0
  15. package/docs/crawl/core/components/functional/date/date.html +190 -0
  16. package/docs/crawl/core/components/functional/fetch/fetch.html +109 -0
  17. package/docs/crawl/core/components/functional/if/if.html +27 -0
  18. package/docs/crawl/core/components/functional/jsonata/jsonata.html +79 -0
  19. package/docs/crawl/core/components/functional/list/list.html +70 -0
  20. package/docs/crawl/core/components/functional/mix/mix.html +45 -0
  21. package/docs/crawl/core/components/functional/queue/queue.html +96 -0
  22. package/docs/crawl/core/components/functional/router/router.html +106 -0
  23. package/docs/crawl/core/components/functional/sdui/sdui.html +269 -0
  24. package/docs/crawl/core/components/functional/states/states.html +66 -0
  25. package/docs/crawl/core/components/functional/submit/submit.html +160 -0
  26. package/docs/crawl/core/components/functional/subscriber/subscriber.html +67 -0
  27. package/docs/crawl/core/components/functional/value/value.html +51 -0
  28. package/docs/crawl/core/components/ui/alert/alert.html +110 -0
  29. package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +23 -0
  30. package/docs/crawl/core/components/ui/badge/badge.html +119 -0
  31. package/docs/crawl/core/components/ui/button/button.html +149 -0
  32. package/docs/crawl/core/components/ui/captcha/captcha.html +30 -0
  33. package/docs/crawl/core/components/ui/card/card.html +99 -0
  34. package/docs/crawl/core/components/ui/divider/divider.html +58 -0
  35. package/docs/crawl/core/components/ui/form/checkbox/checkbox.html +73 -0
  36. package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +135 -0
  37. package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +79 -0
  38. package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +62 -0
  39. package/docs/crawl/core/components/ui/form/input/input.html +109 -0
  40. package/docs/crawl/core/components/ui/form/input-autocomplete/input-autocomplete.html +38 -0
  41. package/docs/crawl/core/components/ui/form/radio/radio.html +56 -0
  42. package/docs/crawl/core/components/ui/form/select/select.html +73 -0
  43. package/docs/crawl/core/components/ui/form/switch/switch.html +56 -0
  44. package/docs/crawl/core/components/ui/form/textarea/textarea.html +59 -0
  45. package/docs/crawl/core/components/ui/group/group.html +82 -0
  46. package/docs/crawl/core/components/ui/icon/icon.html +133 -0
  47. package/docs/crawl/core/components/ui/image/image.html +110 -0
  48. package/docs/crawl/core/components/ui/link/link.html +42 -0
  49. package/docs/crawl/core/components/ui/loader/loader.html +50 -0
  50. package/docs/crawl/core/components/ui/menu/menu.html +322 -0
  51. package/docs/crawl/core/components/ui/modal/modal.html +117 -0
  52. package/docs/crawl/core/components/ui/pop/pop.html +102 -0
  53. package/docs/crawl/core/components/ui/progress/progress.html +58 -0
  54. package/docs/crawl/core/components/ui/table/table.html +413 -0
  55. package/docs/crawl/core/components/ui/toast/toast.html +122 -0
  56. package/docs/crawl/core/components/ui/tooltip/tooltip.html +79 -0
  57. package/docs/crawl/docs/_core-concept/dataFlow.html +177 -0
  58. package/docs/crawl/docs/_core-concept/overview.html +66 -0
  59. package/docs/crawl/docs/_core-concept/subscriber.html +75 -0
  60. package/docs/crawl/docs/_decorators/ancestor-attribute.html +116 -0
  61. package/docs/crawl/docs/_decorators/auto-subscribe.html +202 -0
  62. package/docs/crawl/docs/_decorators/bind.html +141 -0
  63. package/docs/crawl/docs/_decorators/get.html +149 -0
  64. package/docs/crawl/docs/_decorators/handle.html +165 -0
  65. package/docs/crawl/docs/_decorators/on-assign.html +355 -0
  66. package/docs/crawl/docs/_decorators/patch.html +78 -0
  67. package/docs/crawl/docs/_decorators/post.html +139 -0
  68. package/docs/crawl/docs/_decorators/publish.html +61 -0
  69. package/docs/crawl/docs/_decorators/put.html +78 -0
  70. package/docs/crawl/docs/_decorators/subscribe.html +109 -0
  71. package/docs/crawl/docs/_decorators/wait-for-ancestors.html +137 -0
  72. package/docs/crawl/docs/_directives/sub.html +93 -0
  73. package/docs/crawl/docs/_getting-started/ai-agents.html +173 -0
  74. package/docs/crawl/docs/_getting-started/concorde-manual-install.html +100 -0
  75. package/docs/crawl/docs/_getting-started/concorde-outside.html +58 -0
  76. package/docs/crawl/docs/_getting-started/create-a-component.html +111 -0
  77. package/docs/crawl/docs/_getting-started/my-first-component.html +189 -0
  78. package/docs/crawl/docs/_getting-started/my-first-subscriber.html +110 -0
  79. package/docs/crawl/docs/_getting-started/pubsub.html +62 -0
  80. package/docs/crawl/docs/_getting-started/start.html +76 -0
  81. package/docs/crawl/docs/_getting-started/theming.html +85 -0
  82. package/docs/crawl/docs/_misc/api-configuration.html +149 -0
  83. package/docs/crawl/docs/_misc/dataProviderKey.html +135 -0
  84. package/docs/crawl/docs/_misc/docs-mock-api.html +158 -0
  85. package/docs/crawl/docs/_misc/dynamic-path.html +180 -0
  86. package/docs/crawl/docs/_misc/endpoint.html +50 -0
  87. package/docs/crawl/docs/_misc/formelement-subscriber-removal.html +138 -0
  88. package/docs/crawl/docs/_misc/html-integration.html +48 -0
  89. package/docs/crawl/hubs/decorators.html +547 -0
  90. package/docs/crawl/hubs/form-components.html +359 -0
  91. package/docs/crawl/hubs/remote-data.html +452 -0
  92. package/docs/crawl/index.html +101 -0
  93. package/docs/css/docs.css +0 -0
  94. package/docs/docs-mock-api-sw.js +724 -0
  95. package/docs/docs-mock-api-sw.js.map +7 -0
  96. package/docs/fonts/ClashGrotesk-Bold.eot +0 -0
  97. package/docs/fonts/ClashGrotesk-Bold.ttf +0 -0
  98. package/docs/fonts/ClashGrotesk-Bold.woff +0 -0
  99. package/docs/fonts/ClashGrotesk-Bold.woff2 +0 -0
  100. package/docs/fonts/ClashGrotesk-Extralight.eot +0 -0
  101. package/docs/fonts/ClashGrotesk-Extralight.ttf +0 -0
  102. package/docs/fonts/ClashGrotesk-Extralight.woff +0 -0
  103. package/docs/fonts/ClashGrotesk-Extralight.woff2 +0 -0
  104. package/docs/fonts/ClashGrotesk-Light.eot +0 -0
  105. package/docs/fonts/ClashGrotesk-Light.ttf +0 -0
  106. package/docs/fonts/ClashGrotesk-Light.woff +0 -0
  107. package/docs/fonts/ClashGrotesk-Light.woff2 +0 -0
  108. package/docs/fonts/ClashGrotesk-Medium.eot +0 -0
  109. package/docs/fonts/ClashGrotesk-Medium.ttf +0 -0
  110. package/docs/fonts/ClashGrotesk-Medium.woff +0 -0
  111. package/docs/fonts/ClashGrotesk-Medium.woff2 +0 -0
  112. package/docs/fonts/ClashGrotesk-Regular.eot +0 -0
  113. package/docs/fonts/ClashGrotesk-Regular.ttf +0 -0
  114. package/docs/fonts/ClashGrotesk-Regular.woff +0 -0
  115. package/docs/fonts/ClashGrotesk-Regular.woff2 +0 -0
  116. package/docs/fonts/ClashGrotesk-Semibold.eot +0 -0
  117. package/docs/fonts/ClashGrotesk-Semibold.ttf +0 -0
  118. package/docs/fonts/ClashGrotesk-Semibold.woff +0 -0
  119. package/docs/fonts/ClashGrotesk-Semibold.woff2 +0 -0
  120. package/docs/fonts/ClashGrotesk-Variable.eot +0 -0
  121. package/docs/fonts/ClashGrotesk-Variable.ttf +0 -0
  122. package/docs/fonts/ClashGrotesk-Variable.woff +0 -0
  123. package/docs/fonts/ClashGrotesk-Variable.woff2 +0 -0
  124. package/docs/img/concorde-icon.svg +5 -0
  125. package/docs/img/concorde-logo.svg +1 -0
  126. package/docs/img/concorde.png +0 -0
  127. package/docs/img/concorde_def.png +0 -0
  128. package/docs/img/concorde_seuil.png.webp +0 -0
  129. package/docs/img/concorde_seuil_invert.png +0 -0
  130. package/docs/img/paul_metrand.jpg +0 -0
  131. package/docs/img/paul_metrand_xs.jpg +0 -0
  132. package/docs/index.html +93 -0
  133. package/docs/llms-full.txt +5761 -0
  134. package/docs/llms.txt +104 -0
  135. package/docs/robots.txt +16 -0
  136. package/docs/sitemap.xml +237 -0
  137. package/docs/src/core/components/functional/date/date.md +290 -0
  138. package/docs/src/core/components/functional/fetch/fetch.md +125 -0
  139. package/docs/src/core/components/functional/if/if.md +9 -0
  140. package/docs/src/core/components/functional/jsonata/jsonata.md +56 -0
  141. package/docs/src/core/components/functional/list/list.md +65 -0
  142. package/docs/src/core/components/functional/mix/mix.md +41 -0
  143. package/docs/src/core/components/functional/queue/queue.md +72 -0
  144. package/docs/src/core/components/functional/router/router.md +94 -0
  145. package/docs/src/core/components/functional/sdui/default-library.json +108 -0
  146. package/docs/src/core/components/functional/sdui/example.json +99 -0
  147. package/docs/src/core/components/functional/sdui/sdui.md +356 -0
  148. package/docs/src/core/components/functional/states/states.md +87 -0
  149. package/docs/src/core/components/functional/submit/submit.md +114 -0
  150. package/docs/src/core/components/functional/subscriber/subscriber.md +91 -0
  151. package/docs/src/core/components/functional/value/value.md +35 -0
  152. package/docs/src/core/components/ui/alert/alert.md +121 -0
  153. package/docs/src/core/components/ui/alert-messages/alert-messages.md +0 -0
  154. package/docs/src/core/components/ui/badge/badge.md +127 -0
  155. package/docs/src/core/components/ui/button/button.md +182 -0
  156. package/docs/src/core/components/ui/captcha/captcha.md +12 -0
  157. package/docs/src/core/components/ui/card/card.md +97 -0
  158. package/docs/src/core/components/ui/divider/divider.md +35 -0
  159. package/docs/src/core/components/ui/form/checkbox/checkbox.md +77 -0
  160. package/docs/src/core/components/ui/form/fieldset/fieldset.md +129 -0
  161. package/docs/src/core/components/ui/form/form-actions/form-actions.md +77 -0
  162. package/docs/src/core/components/ui/form/form-layout/form-layout.md +44 -0
  163. package/docs/src/core/components/ui/form/input/input.md +142 -0
  164. package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +29 -0
  165. package/docs/src/core/components/ui/form/radio/radio.md +57 -0
  166. package/docs/src/core/components/ui/form/select/select.md +71 -0
  167. package/docs/src/core/components/ui/form/switch/switch.md +57 -0
  168. package/docs/src/core/components/ui/form/textarea/textarea.md +65 -0
  169. package/docs/src/core/components/ui/group/group.md +75 -0
  170. package/docs/src/core/components/ui/icon/icon.md +125 -0
  171. package/docs/src/core/components/ui/icon/icons.json +1 -0
  172. package/docs/src/core/components/ui/image/image.md +107 -0
  173. package/docs/src/core/components/ui/link/link.md +43 -0
  174. package/docs/src/core/components/ui/loader/loader.md +55 -0
  175. package/docs/src/core/components/ui/menu/menu.md +329 -0
  176. package/docs/src/core/components/ui/modal/modal.md +119 -0
  177. package/docs/src/core/components/ui/pop/pop.md +96 -0
  178. package/docs/src/core/components/ui/progress/progress.md +63 -0
  179. package/docs/src/core/components/ui/table/table.md +455 -0
  180. package/docs/src/core/components/ui/toast/toast.md +166 -0
  181. package/docs/src/core/components/ui/tooltip/tooltip.md +82 -0
  182. package/docs/src/docs/_core-concept/dataFlow.md +88 -0
  183. package/docs/src/docs/_core-concept/overview.md +57 -0
  184. package/docs/src/docs/_core-concept/subscriber.md +75 -0
  185. package/docs/src/docs/_decorators/ancestor-attribute.md +127 -0
  186. package/docs/src/docs/_decorators/auto-subscribe.md +202 -0
  187. package/docs/src/docs/_decorators/bind.md +167 -0
  188. package/docs/src/docs/_decorators/get.md +162 -0
  189. package/docs/src/docs/_decorators/handle.md +175 -0
  190. package/docs/src/docs/_decorators/on-assign.md +390 -0
  191. package/docs/src/docs/_decorators/patch.md +70 -0
  192. package/docs/src/docs/_decorators/post.md +146 -0
  193. package/docs/src/docs/_decorators/publish.md +55 -0
  194. package/docs/src/docs/_decorators/put.md +70 -0
  195. package/docs/src/docs/_decorators/subscribe.md +100 -0
  196. package/docs/src/docs/_decorators/wait-for-ancestors.md +163 -0
  197. package/docs/src/docs/_directives/sub.md +91 -0
  198. package/docs/src/docs/_getting-started/ai-agents.md +76 -0
  199. package/docs/src/docs/_getting-started/concorde-manual-install.md +133 -0
  200. package/docs/src/docs/_getting-started/concorde-outside.md +33 -0
  201. package/docs/src/docs/_getting-started/create-a-component.md +139 -0
  202. package/docs/src/docs/_getting-started/my-first-component.md +236 -0
  203. package/docs/src/docs/_getting-started/my-first-subscriber.md +120 -0
  204. package/docs/src/docs/_getting-started/pubsub.md +37 -0
  205. package/docs/src/docs/_getting-started/start.md +47 -0
  206. package/docs/src/docs/_getting-started/theming.md +91 -0
  207. package/docs/src/docs/_misc/api-configuration.md +81 -0
  208. package/docs/src/docs/_misc/dataProviderKey.md +168 -0
  209. package/docs/src/docs/_misc/docs-mock-api.md +63 -0
  210. package/docs/src/docs/_misc/dynamic-path.md +71 -0
  211. package/docs/src/docs/_misc/endpoint.md +45 -0
  212. package/docs/src/docs/_misc/formelement-subscriber-removal.md +115 -0
  213. package/docs/src/docs/_misc/html-integration.md +15 -0
  214. package/docs/src/docs/search/docs-search.json +9507 -0
  215. package/docs/src/tag-list.json +1 -0
  216. package/docs/src/tsconfig-model.json +23 -0
  217. package/docs/src/tsconfig.declarations.json +22 -0
  218. package/docs/src/tsconfig.emit.json +23 -0
  219. package/docs/src/tsconfig.json +1182 -0
  220. package/docs/svg/regular/plane.svg +1 -0
  221. package/docs/svg/solid/plane.svg +1 -0
  222. package/gitlab/job_github_mirror.sh +39 -0
  223. package/gitlab/job_tests.sh +0 -0
  224. package/package.json +1 -1
  225. package/scripts/github-export.mjs +150 -0
  226. package/scripts/post-build-docs.js +0 -0
  227. package/scripts/post-build.mjs +0 -0
  228. package/src/core/components/functional/fetch/fetch.md +0 -0
  229. package/src/core/components/functional/if/if.md +0 -0
  230. package/src/core/components/functional/list/list.demo.ts +0 -0
  231. package/src/core/components/functional/list/list.md +0 -0
  232. package/src/core/components/functional/router/router.md +0 -0
  233. package/src/core/components/functional/router/router.ts +0 -0
  234. package/src/core/components/functional/sdui/sdui.md +0 -0
  235. package/src/core/components/functional/states/states.md +0 -0
  236. package/src/core/components/functional/submit/submit.md +0 -0
  237. package/src/core/components/functional/subscriber/subscriber.ts +0 -0
  238. package/src/core/components/ui/_css/size.ts +0 -0
  239. package/src/core/components/ui/captcha/altchaStyles.ts +0 -0
  240. package/src/core/components/ui/captcha/captcha.md +0 -0
  241. package/src/core/components/ui/form/radio/radio.md +0 -0
  242. package/src/core/components/ui/form/select/select.md +0 -0
  243. package/src/core/components/ui/form/switch/switch.md +0 -0
  244. package/src/core/components/ui/loader/loader.md +0 -0
  245. package/src/core/components/ui/menu/menu.md +0 -0
  246. package/src/core/components/ui/modal/modal.md +0 -0
  247. package/src/core/components/ui/table/table-caption.ts +0 -0
  248. package/src/core/components/ui/table/table.md +0 -0
  249. package/src/core/decorators/subscriber/ancestorAttribute.spec.ts +26 -0
  250. package/src/core/decorators/subscriber/ancestorAttribute.ts +3 -4
  251. package/src/core/mixins/Subscriber.ts +0 -0
  252. package/src/core/utils/AncestorAttributeObserver.ts +183 -70
  253. package/src/core/utils/DataBindObserver.ts +0 -0
  254. package/src/core/utils/Objects.ts +0 -0
  255. package/src/core/utils/route.ts +0 -0
  256. package/src/css.d.ts +19 -0
  257. package/src/docs/_core-concept/subscriber.md +0 -0
  258. package/src/docs/_decorators/ancestor-attribute.md +3 -2
  259. package/src/docs/_getting-started/my-first-subscriber.md +0 -0
  260. package/src/docs/_getting-started/pubsub.md +0 -0
  261. package/src/docs/_getting-started/start.md +0 -0
  262. package/src/docs/example/users.ts +0 -0
  263. package/src/docs/search/page.ts +0 -0
  264. package/src/tsconfig.declarations.json +22 -0
  265. package/src/tsconfig.emit.json +23 -0
  266. package/src/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,149 @@
1
+ <!DOCTYPE html>
2
+ <html lang="fr" data-crawl-url="https://concorde.supersoniks.org/crawl/docs/_misc/api-configuration.html" data-doc-id="docs/_misc/api-configuration">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>API configuration — Concorde</title>
7
+ <meta name="description" content="APIConfiguration is the object built by HTML.getApiConfiguration from ancestor attributes on the DOM (or from a typed publisher — see @get / @post configuration key). It is passed to API by fetchers, ">
8
+ <meta name="keywords" content="Concorde, supersoniks, docs/_misc/api-configuration, api-configuration, API configuration, reference, APIConfiguration, HTML.getApiConfiguration, API, wording(), @get, @post, @put, @patch, serviceURL">
9
+ <meta name="concorde-doc-id" content="docs/_misc/api-configuration">
10
+ <link rel="canonical" href="https://concorde.supersoniks.org/crawl/docs/_misc/api-configuration.html">
11
+ </head>
12
+ <body>
13
+ <header>
14
+ <p><a href="../../index.html">Concorde documentation (crawl)</a> · <a href="https://concorde.supersoniks.org/#docs/_misc/api-configuration.md/api-configuration" rel="nofollow">interactive version</a></p>
15
+ </header>
16
+ <main>
17
+ <article>
18
+ <p class="doc-lead" id="doc-summary"><strong>Concorde reference — API configuration</strong>. APIConfiguration is the object built by HTML.getApiConfiguration from ancestor attributes on the DOM (or from a typed publisher — see @get / @post configuration key). It is passed to API by fetchers, <span>Doc ID: <code>docs/_misc/api-configuration</code>. Keywords: Concorde, supersoniks, docs/_misc/api-configuration, api-configuration, API configuration, reference, APIConfiguration, HTML.getApiConfiguration, API, wording(), @get, @post, @put, @patch, serviceURL. URL: <a href="https://concorde.supersoniks.org/crawl/docs/_misc/api-configuration.html">https://concorde.supersoniks.org/crawl/docs/_misc/api-configuration.html</a>.</span></p>
19
+ <h1 id="api-configuration">API configuration</h1>
20
+ <p><code>APIConfiguration</code> is the object built by <a href="../../core/utils/HTML.ts"><code>HTML.getApiConfiguration</code></a> from <strong>ancestor attributes</strong> on the DOM (or from a typed publisher — see <a href="../_decorators/get.html#get">@get</a> / <a href="../_decorators/post.html#post">@post</a> configuration key). It is passed to <a href="../../core/utils/api.ts"><code>API</code></a> by fetchers, <strong>sonic-submit</strong>, the <strong><code>wording()</code></strong> directive, <strong><code>@get</code></strong>, <strong><code>@post</code></strong>, <strong><code>@put</code></strong>, and <strong><code>@patch</code></strong>.</p>
21
+ <blockquote>
22
+ <p><strong>Mock service:</strong> same <a href="./docs-mock-api.html#docs-mock-api">Local API demos</a> Service Worker / Vite middleware. Routes used on this page are listed in the <a href="#api-config-routes">API config routes</a> section below.</p>
23
+ </blockquote>
24
+ <h2 id="attribute-map">Attribute map</h2>
25
+ <table>
26
+ <thead>
27
+ <tr>
28
+ <th>Attribute (ancestor)</th>
29
+ <th><code>APIConfiguration</code> field</th>
30
+ <th>Role</th>
31
+ </tr>
32
+ </thead>
33
+ <tbody><tr>
34
+ <td><code>serviceURL</code></td>
35
+ <td><code>serviceURL</code></td>
36
+ <td>Base URL (e.g. <code>/docs-mock-api</code>)</td>
37
+ </tr>
38
+ <tr>
39
+ <td><code>token</code></td>
40
+ <td><code>token</code></td>
41
+ <td>Static Bearer sent on REST calls</td>
42
+ </tr>
43
+ <tr>
44
+ <td><code>userName</code> / <code>password</code></td>
45
+ <td><code>userName</code> / <code>password</code></td>
46
+ <td>Basic auth for <strong>tokenProvider</strong> fetch only</td>
47
+ </tr>
48
+ <tr>
49
+ <td><code>eventsApiToken</code></td>
50
+ <td><code>authToken</code></td>
51
+ <td>Bearer for <strong>tokenProvider</strong> when no Basic</td>
52
+ </tr>
53
+ <tr>
54
+ <td><code>tokenProvider</code></td>
55
+ <td><code>tokenProvider</code></td>
56
+ <td>Path to GET a new token (<code>{ token }</code> JSON)</td>
57
+ </tr>
58
+ <tr>
59
+ <td><code>wordingProvider</code></td>
60
+ <td>— (read by <code>wording()</code>)</td>
61
+ <td>Base path + query for label batch GET</td>
62
+ </tr>
63
+ <tr>
64
+ <td><code>wordingVersionProvider</code></td>
65
+ <td>—</td>
66
+ <td>Publisher id; bump version → reload wordings</td>
67
+ </tr>
68
+ <tr>
69
+ <td><code>credentials</code></td>
70
+ <td><code>credentials</code></td>
71
+ <td><code>fetch</code> credentials mode</td>
72
+ </tr>
73
+ <tr>
74
+ <td><code>addHTTPResponse</code></td>
75
+ <td><code>addHTTPResponse</code></td>
76
+ <td>Attach <code>_sonic_http_response_</code> on result</td>
77
+ </tr>
78
+ <tr>
79
+ <td><code>cache</code></td>
80
+ <td><code>cache</code></td>
81
+ <td><code>fetch</code> cache mode</td>
82
+ </tr>
83
+ <tr>
84
+ <td><code>blockUntilDone</code></td>
85
+ <td><code>blockUntilDone</code></td>
86
+ <td>Serialize calls per <code>serviceURL</code></td>
87
+ </tr>
88
+ <tr>
89
+ <td><code>keepAlive</code></td>
90
+ <td><code>keepAlive</code></td>
91
+ <td><code>fetch</code> keepalive</td>
92
+ </tr>
93
+ </tbody></table>
94
+ <p><strong>Lit / TypeScript:</strong> store the same shape in a publisher and pass <code>DataProviderKey&lt;APIConfiguration&gt;</code> as the second argument of <code>@get</code> (see <a href="./dataProviderKey.html#dataProviderKey">DataProviderKey</a>).</p>
95
+ <h2 id="bearer-token-static">Bearer token (static)</h2>
96
+ <p>Publisher <code>docsApiConfBearerKey</code> (<code>set(docsApiConfBearerKey, { token: &quot;docs-mock-valid-token&quot;, … })</code>) — mock returns the protected payload.</p>
97
+ <p><docs-lit-demo for="docs-api-config-bearer-demo"></docs-lit-demo></p>
98
+ <h2 id="tokenprovider--basic-auth">tokenProvider + Basic auth</h2>
99
+ <p>No static <code>token</code>: <code>API.auth()</code> calls <code>GET /docs-mock-api/auth/token</code> with Basic <strong>demo</strong> / <strong>secret</strong>, stores <code>token</code>, then calls the protected route.</p>
100
+ <p><docs-lit-demo for="docs-api-config-token-provider-demo"></docs-lit-demo></p>
101
+ <h2 id="http-498--stale-token-refresh">HTTP 498 — stale token refresh</h2>
102
+ <p>Initial <code>token=&quot;docs-mock-stale-token&quot;</code> → mock responds <strong>498</strong> → Concorde invalidates the token, runs <code>auth()</code> again (same <code>tokenProvider</code> + Basic), retries with <code>docs-mock-fresh-token</code>.</p>
103
+ <p><docs-lit-demo for="docs-api-config-stale-token-demo"></docs-lit-demo></p>
104
+ <h2 id="eventsapitoken">eventsApiToken</h2>
105
+ <p>Attribute <strong><code>eventsApiToken</code></strong> on an ancestor maps to <strong><code>authToken</code></strong> in config (used as Bearer when calling <code>tokenProvider</code>, instead of Basic).</p>
106
+ <p><docs-lit-demo for="docs-api-config-events-token-demo"></docs-lit-demo></p>
107
+ <h2 id="wording-api">Wording API</h2>
108
+ <p><code>wordingProvider=&quot;wording/labels?lang=fr&quot;</code> + <code>wording(&#39;api-config.greeting&#39;)</code> in Lit. Mock returns label map from <code>labels[]</code> query params.</p>
109
+ <p><docs-lit-demo for="docs-api-config-wording-demo"></docs-lit-demo></p>
110
+ <h2 id="scoped-attributes-html--sonic-scope">Scoped attributes (HTML / sonic-scope)</h2>
111
+ <p>Attributes on <strong><code>sonic-scope</code></strong> (or any ancestor) are visible to descendants via <code>getAncestorAttributeValue</code>.</p>
112
+ <p><docs-lit-demo for="docs-api-config-scoped-attrs-demo"></docs-lit-demo></p>
113
+ <h2 id="api-config-routes">API config routes</h2>
114
+ <table>
115
+ <thead>
116
+ <tr>
117
+ <th>Route</th>
118
+ <th>Demo</th>
119
+ </tr>
120
+ </thead>
121
+ <tbody><tr>
122
+ <td><code>GET /docs-mock-api/auth/token</code></td>
123
+ <td>tokenProvider, eventsApiToken</td>
124
+ </tr>
125
+ <tr>
126
+ <td><code>GET /docs-mock-api/api/config/protected</code></td>
127
+ <td>Bearer / Basic / 498</td>
128
+ </tr>
129
+ <tr>
130
+ <td><code>GET /docs-mock-api/wording/labels?labels[]=…&amp;lang=fr</code></td>
131
+ <td><code>wording()</code></td>
132
+ </tr>
133
+ </tbody></table>
134
+ <p>Mock tokens (doc only): <code>docs-mock-valid-token</code>, <code>docs-mock-stale-token</code> (498), <code>docs-mock-fresh-token</code> (after refresh). Basic: <strong>demo</strong> / <strong>secret</strong>. Events token: <code>docs-mock-events-token</code>.</p>
135
+ <p>Implementation: <code>src/docs/mock-api/api-config-mock.ts</code> (bundled in the Service Worker with <code>router.ts</code>).</p>
136
+ <h2 id="see-also">See also</h2>
137
+ <ul>
138
+ <li><a href="../_decorators/get.html#get">@get</a> — <code>APIConfiguration</code> + <code>Endpoint</code></li>
139
+ <li><a href="../_decorators/post.html#post">@post</a> — same configuration model for POST</li>
140
+ <li><a href="../_decorators/put.html#put">@put</a> · <a href="../_decorators/patch.html#patch">@patch</a> — PUT / PATCH</li>
141
+ <li><a href="./endpoint.html#endpoint">Endpoint</a> — typed path</li>
142
+ <li><a href="./docs-mock-api.html#docs-mock-api">Local API demos</a> — offline <code>serviceURL</code></li>
143
+ <li><a href="../../core/components/functional/fetch/fetch.html#fetch">Fetch</a> — attribute table (legacy sonic-fetch)</li>
144
+ </ul>
145
+
146
+ </article>
147
+ </main>
148
+ </body>
149
+ </html>
@@ -0,0 +1,135 @@
1
+ <!DOCTYPE html>
2
+ <html lang="fr" data-crawl-url="https://concorde.supersoniks.org/crawl/docs/_misc/dataProviderKey.html" data-doc-id="docs/_misc/dataProviderKey">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>DataProviderKey — Concorde</title>
7
+ <meta name="description" content="The DataProviderKey&lt;T&gt; utility provides type-safe navigation through composite data structures. Each property or index access extends the path, and the final key can be retrieved via toString() or the">
8
+ <meta name="keywords" content="Concorde, supersoniks, docs/_misc/dataProviderKey, dataProviderKey, DataProviderKey, reference, toString(), path, myKey.items[0], items, Item[], .path">
9
+ <meta name="concorde-doc-id" content="docs/_misc/dataProviderKey">
10
+ <link rel="canonical" href="https://concorde.supersoniks.org/crawl/docs/_misc/dataProviderKey.html">
11
+ </head>
12
+ <body>
13
+ <header>
14
+ <p><a href="../../index.html">Concorde documentation (crawl)</a> · <a href="https://concorde.supersoniks.org/#docs/_misc/dataProviderKey.md/dataProviderKey" rel="nofollow">interactive version</a></p>
15
+ </header>
16
+ <main>
17
+ <article>
18
+ <p class="doc-lead" id="doc-summary"><strong>Concorde reference — DataProviderKey</strong>. The DataProviderKey&lt;T&gt; utility provides type-safe navigation through composite data structures. Each property or index access extends the path, and the final key can be retrieved via toString() or the <span>Doc ID: <code>docs/_misc/dataProviderKey</code>. Keywords: Concorde, supersoniks, docs/_misc/dataProviderKey, dataProviderKey, DataProviderKey, reference, toString(), path, myKey.items[0], items, Item[], .path. URL: <a href="https://concorde.supersoniks.org/crawl/docs/_misc/dataProviderKey.html">https://concorde.supersoniks.org/crawl/docs/_misc/dataProviderKey.html</a>.</span></p>
19
+ <h1 id="dataproviderkey">DataProviderKey</h1>
20
+ <p>The <code>DataProviderKey&lt;T&gt;</code> utility provides type-safe navigation through composite data structures. Each property or index access extends the path, and the final key can be retrieved via <code>toString()</code> or the <code>path</code> property.</p>
21
+ <p>For a <strong>single HTTP path string</strong> (no dot-syntax), see <a href="./endpoint.html#endpoint">Endpoint</a>. For <strong><code>DataProviderKey&lt;APIConfiguration&gt;</code></strong>, see <a href="./api-configuration.html#api-configuration">API configuration</a>.</p>
22
+ <h2 id="principle">Principle</h2>
23
+ <p><code>DataProviderKey</code> uses a Proxy to intercept property access and build a cumulative path string. TypeScript infers the nested type at each level, so <code>myKey.items[0]</code> is correctly typed as <code>DataProviderKey&lt;Item&gt;</code> when <code>items</code> is <code>Item[]</code>.</p>
24
+ <p>In Lit demos, bind HTML attributes from a key’s <strong><code>.path</code></strong> (single source of truth), and use <strong><code>get</code> / <code>set</code> / <code>dp</code></strong> instead of <code>PublisherManager.get(&quot;…&quot;)</code>:</p>
25
+ <pre><code class="language-typescript">import { DataProviderKey } from &quot;@supersoniks/concorde/dataProviderKey&quot;;
26
+ import { get, set } from &quot;@supersoniks/concorde/utils&quot;;
27
+
28
+ export const myFormKey = new DataProviderKey&amp;lt;{ email: string }&amp;gt;(&quot;myForm&quot;);
29
+ set(myFormKey, { email: &quot;a@b.c&quot; });
30
+
31
+ // template: formDataProvider=${myFormKey.path}
32
+ </code></pre>
33
+ <h2 id="usage">Usage</h2>
34
+ <h3 id="import">Import</h3>
35
+ <pre><code class="language-typescript">import { DataProviderKey } from &quot;@supersoniks/concorde/dataProviderKey&quot;;
36
+ </code></pre>
37
+ <h3 id="basic-example">Basic example</h3>
38
+ <pre><code class="language-typescript">type Item = { id: string; name: string };
39
+ //
40
+ type Data = {
41
+ items: Item[];
42
+ count: number;
43
+ };
44
+ //
45
+ const myKey = new DataProviderKey&amp;lt;Data&amp;gt;(&quot;data&quot;).items[0];
46
+ // Equivalent to: new DataProviderKey&amp;lt;Item&amp;gt;(&quot;data.items.0&quot;)
47
+ myKey.toString(); // &quot;data.items.0&quot;
48
+ myKey.path; // same value
49
+ // myKey is typed as DataProviderKey&amp;lt;Item&amp;gt;
50
+ </code></pre>
51
+ <h3 id="object-property-access">Object property access</h3>
52
+ <pre><code class="language-typescript">const key = new DataProviderKey&amp;lt;Data&amp;gt;(&quot;data&quot;);
53
+ const countKey = key.count;
54
+ countKey.path; // &quot;data.count&quot;
55
+ countKey.toString(); // &quot;data.count&quot;
56
+ </code></pre>
57
+ <h3 id="array-index-access">Array index access</h3>
58
+ <pre><code class="language-typescript">const itemsKey = new DataProviderKey&amp;lt;Data&amp;gt;(&quot;data&quot;).items;
59
+ itemsKey.path; // &quot;data.items&quot;
60
+ // itemsKey is DataProviderKey&amp;lt;Item[]&amp;gt;
61
+ //
62
+ const firstItem = itemsKey[0];
63
+ firstItem.path; // &quot;data.items.0&quot;
64
+ // firstItem is DataProviderKey&amp;lt;Item&amp;gt;
65
+ </code></pre>
66
+ <h3 id="dynamic-paths">Dynamic paths</h3>
67
+ <p>Use placeholders <code>${prop}</code> or <code>{$prop}</code> in the path string. The path is resolved at runtime from the component&#39;s properties. See <a href="./dynamic-path.html#dynamic-path">Dynamic path placeholders</a> for resolution rules and <code>skipEmptyPlaceholder</code>. The type remains declarative:</p>
68
+ <pre><code class="language-typescript">type User = { name: string; email: string };
69
+ //
70
+ // Path resolved from component.userIndex at runtime
71
+ @subscribe(new DataProviderKey&amp;lt;User&amp;gt;(&quot;users.${userIndex}&quot;))
72
+ @state()
73
+ user: User | null = null;
74
+ </code></pre>
75
+ <p>Dynamic keys are <strong>not</strong> supported by <code>get</code>, <code>set</code>, or <code>dp</code> — those APIs take a snapshot at call time with no component context. For dynamic paths use decorators (<code>@subscribe</code>, <code>@publish</code>, <code>@handle</code>) or <strong><code>sub(key)</code></strong> in Lit templates (resolves <code>${…}</code> from the host component). See <a href="../_directives/sub.html#sub">sub()</a>.</p>
76
+ <h3 id="get--set--dp-with-static-keys">get / set / dp with static keys</h3>
77
+ <p>For programmatic access, pass a <code>DataProviderKey</code> or a static path string. Dynamic placeholders are rejected:</p>
78
+ <pre><code class="language-typescript">import { dp, get, set } from &quot;@supersoniks/concorde/utils&quot;;
79
+ import { DataProviderKey } from &quot;@supersoniks/concorde/dataProviderKey&quot;;
80
+ //
81
+ const counterKey = new DataProviderKey&amp;lt;{ count: number }&amp;gt;(&quot;myCounter&quot;);
82
+ //
83
+ set(counterKey, { count: 0 });
84
+ dp(counterKey.count).set(1);
85
+ get(counterKey); // snapshot: { count: 1 }
86
+ </code></pre>
87
+ <h2 id="path-retrieval">Path retrieval</h2>
88
+ <p>The final path is built by concatenating each accessed property with a dot:</p>
89
+ <ul>
90
+ <li><code>new DataProviderKey&lt;T&gt;(&quot;base&quot;)</code> → <code>&quot;base&quot;</code></li>
91
+ <li><code>key.prop</code> → <code>&quot;base.prop&quot;</code></li>
92
+ <li><code>key.items[0]</code> → <code>&quot;base.items.0&quot;</code></li>
93
+ </ul>
94
+ <p>Use <code>toString()</code> or <code>path</code> to get the full path string:</p>
95
+ <pre><code class="language-typescript">const key = new DataProviderKey&amp;lt;Data&amp;gt;(&quot;data&quot;).count;
96
+ const pathString = key.toString(); // &quot;data.count&quot;
97
+ const pathProp = key.path; // &quot;data.count&quot;
98
+ </code></pre>
99
+ <h2 id="use-cases">Use cases</h2>
100
+ <ul>
101
+ <li><strong>Type-safe bindings</strong>: paths for <code>@bind</code>, <code>@subscribe</code>, <code>@publish</code>, <code>@handle</code></li>
102
+ <li><strong>Dynamic paths</strong>: reusable keys with <code>${...}</code> placeholders</li>
103
+ <li><strong>Form fields</strong>: form data paths with compile-time checking</li>
104
+ </ul>
105
+ <h2 id="integration-with-subscribe-publish-and-handle">Integration with @subscribe, @publish and @handle</h2>
106
+ <p>Use <code>DataProviderKey</code> with <code>@subscribe</code> (read-only), <code>@publish</code> (write-only), or <code>@handle</code> (method callback on assign). With <code>@subscribe</code> / <code>@publish</code>, the decorated property <strong>must</strong> match the key’s value type. With <code>@handle</code>, the method receives <code>(value: T)</code>.</p>
107
+ <pre><code class="language-typescript">import { subscribe } from &quot;@supersoniks/concorde/decorators&quot;;
108
+ import { DataProviderKey } from &quot;@supersoniks/concorde/dataProviderKey&quot;;
109
+ //
110
+ type FormData = { email: string };
111
+ const formKey = new DataProviderKey&amp;lt;FormData&amp;gt;(&quot;formData&quot;);
112
+ //
113
+ @customElement(&quot;user-form&quot;)
114
+ export class UserForm extends LitElement {
115
+ @subscribe(formKey.email)
116
+ @state()
117
+ email = &quot;&quot;;
118
+ //
119
+ render() {
120
+ return html`&amp;lt;input .value=${this.email} @input=${(e) =&gt; this.email = (e.target as HTMLInputElement).value}&amp;gt;`;
121
+ }
122
+ }
123
+ </code></pre>
124
+ <p>These decorators support dynamic paths: <code>&quot;base.${prop}&quot;</code> in the constructor. A wrong property type (e.g. <code>number</code> for <code>DataProviderKey&lt;string&gt;</code>) is a TypeScript error. Resolution rules: <a href="./dynamic-path.html#dynamic-path">Dynamic path placeholders</a>. See <a href="../_decorators/handle.html#handle">@handle</a> for method callbacks.</p>
125
+ <h2 id="notes">Notes</h2>
126
+ <ul>
127
+ <li>Function properties are excluded from navigation (no <code>key.method()</code> chaining)</li>
128
+ <li>Primitives have no navigable properties</li>
129
+ <li>The <code>path</code> property and <code>toString()</code> are equivalent for retrieving the key</li>
130
+ </ul>
131
+
132
+ </article>
133
+ </main>
134
+ </body>
135
+ </html>
@@ -0,0 +1,158 @@
1
+ <!DOCTYPE html>
2
+ <html lang="fr" data-crawl-url="https://concorde.supersoniks.org/crawl/docs/_misc/docs-mock-api.html" data-doc-id="docs/_misc/docs-mock-api">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Local API demos (offline) — Concorde</title>
7
+ <meta name="description" content="The Concorde doc site does not call fragile third-party APIs during yarn dev. A Service Worker and the Vite dev middleware serve /docs-mock-api/* on the same origin.">
8
+ <meta name="keywords" content="Concorde, supersoniks, docs/_misc/docs-mock-api, docs-mock-api, Local API demos (offline), reference, yarn dev, /docs-mock-api/*, registerDocsMockApiServiceWorker(), /docs-mock-api-sw.js, /docs-mock-api/..., serviceURL=&quot;/docs-mock-api&quot;, src/docs/mock-api/urls.ts, DOCS_MOCK_REQRES_SERVICE, DOCS_MOCK_GEO_SERVICE, /docs-mock-api/api/users">
9
+ <meta name="concorde-doc-id" content="docs/_misc/docs-mock-api">
10
+ <link rel="canonical" href="https://concorde.supersoniks.org/crawl/docs/_misc/docs-mock-api.html">
11
+ </head>
12
+ <body>
13
+ <header>
14
+ <p><a href="../../index.html">Concorde documentation (crawl)</a> · <a href="https://concorde.supersoniks.org/#docs/_misc/docs-mock-api.md/docs-mock-api" rel="nofollow">interactive version</a></p>
15
+ </header>
16
+ <main>
17
+ <article>
18
+ <p class="doc-lead" id="doc-summary"><strong>Concorde reference — Local API demos (offline)</strong>. The Concorde doc site does not call fragile third-party APIs during yarn dev. A Service Worker and the Vite dev middleware serve /docs-mock-api/* on the same origin. <span>Doc ID: <code>docs/_misc/docs-mock-api</code>. Keywords: Concorde, supersoniks, docs/_misc/docs-mock-api, docs-mock-api, Local API demos (offline), reference, yarn dev, /docs-mock-api/*, registerDocsMockApiServiceWorker(), /docs-mock-api-sw.js, /docs-mock-api/..., serviceURL=&quot;/docs-mock-api&quot;, src/docs/mock-api/urls.ts, DOCS_MOCK_REQRES_SERVICE, DOCS_MOCK_GEO_SERVICE, /docs-mock-api/api/users. URL: <a href="https://concorde.supersoniks.org/crawl/docs/_misc/docs-mock-api.html">https://concorde.supersoniks.org/crawl/docs/_misc/docs-mock-api.html</a>.</span></p>
19
+ <h1 id="local-api-demos-offline">Local API demos (offline)</h1>
20
+ <p>The Concorde doc site does not call fragile third-party APIs during <code>yarn dev</code>. A <strong>Service Worker</strong> and the Vite dev middleware serve <strong><code>/docs-mock-api/*</code></strong> on the same origin.</p>
21
+ <h2 id="how-it-works">How it works</h2>
22
+ <ol>
23
+ <li>On load, <code>registerDocsMockApiServiceWorker()</code> registers <code>/docs-mock-api-sw.js</code>.</li>
24
+ <li>Requests to <code>/docs-mock-api/...</code> are handled by the SW (production build) or Vite middleware (dev).</li>
25
+ <li>Live examples use <code>serviceURL=&quot;/docs-mock-api&quot;</code> and relative paths.</li>
26
+ </ol>
27
+ <p>TypeScript constants: <code>src/docs/mock-api/urls.ts</code> (<code>DOCS_MOCK_REQRES_SERVICE</code>, <code>DOCS_MOCK_GEO_SERVICE</code>, …).</p>
28
+ <h2 id="routes">Routes</h2>
29
+ <table>
30
+ <thead>
31
+ <tr>
32
+ <th>Path</th>
33
+ <th>Used in</th>
34
+ </tr>
35
+ </thead>
36
+ <tbody><tr>
37
+ <td><code>/docs-mock-api/api/users</code></td>
38
+ <td><code>sonic-list</code>, <code>sonic-fetch</code>, <code>sonic-queue</code> (users)</td>
39
+ </tr>
40
+ <tr>
41
+ <td><code>/docs-mock-api/api/users/:id</code></td>
42
+ <td>Single user, <code>docs-user</code></td>
43
+ </tr>
44
+ <tr>
45
+ <td><code>/docs-mock-api/api/space-cats</code></td>
46
+ <td><code>sonic-jsonata</code> top-N demo</td>
47
+ </tr>
48
+ <tr>
49
+ <td><code>/docs-mock-api/api/coffee-bags</code></td>
50
+ <td>fixtures / tests jsonata (<code>?roast=</code>)</td>
51
+ </tr>
52
+ <tr>
53
+ <td><code>/docs-mock-api/api/market-order</code></td>
54
+ <td><code>sonic-jsonata</code> totals demo</td>
55
+ </tr>
56
+ <tr>
57
+ <td><code>POST /docs-mock-api/api/register</code></td>
58
+ <td><strong>sonic-submit</strong> — JSON, <code>multipart/form-data</code> (<code>sendAsFormData</code>), or <code>application/x-www-form-urlencoded</code> (native <code>&lt;form&gt;</code>); response includes parsed <code>email</code> + <code>token</code></td>
59
+ </tr>
60
+ <tr>
61
+ <td><code>POST /docs-mock-api/api/register/nested</code></td>
62
+ <td>Wrapped body <code>{ data: { id, token } }</code> for <code>submit-result-key</code> demo</td>
63
+ </tr>
64
+ <tr>
65
+ <td><code>GET /docs-mock-api/api/register/echo</code></td>
66
+ <td>Echoes query string (<code>method=&quot;get&quot;</code> on submit)</td>
67
+ </tr>
68
+ <tr>
69
+ <td><code>GET /docs-mock-api/auth/token</code></td>
70
+ <td><a href="./api-configuration.html#api-configuration">API configuration</a> — tokenProvider (Basic or <code>eventsApiToken</code>)</td>
71
+ </tr>
72
+ <tr>
73
+ <td><code>GET /docs-mock-api/api/config/protected</code></td>
74
+ <td>Bearer / Basic; <code>docs-mock-stale-token</code> → <strong>498</strong></td>
75
+ </tr>
76
+ <tr>
77
+ <td><code>GET /docs-mock-api/wording/labels</code></td>
78
+ <td>Wording batch (<code>labels[]</code>, <code>lang</code>)</td>
79
+ </tr>
80
+ <tr>
81
+ <td><code>/docs-mock-api/geo/communes</code></td>
82
+ <td>Geo list, <code>@get</code> demos</td>
83
+ </tr>
84
+ <tr>
85
+ <td><code>/docs-mock-api/jokes/joke/:category</code></td>
86
+ <td>JokeAPI-shaped list (<code>key=&quot;jokes&quot;</code> on queue/list)</td>
87
+ </tr>
88
+ </tbody></table>
89
+ <h3 id="filtres-get-jokesjoke">Filtres <code>GET /jokes/joke/…</code></h3>
90
+ <table>
91
+ <thead>
92
+ <tr>
93
+ <th>Query</th>
94
+ <th>Meaning</th>
95
+ </tr>
96
+ </thead>
97
+ <tbody><tr>
98
+ <td><code>amount</code></td>
99
+ <td>Max jokes per request when not using <code>offset</code></td>
100
+ </tr>
101
+ <tr>
102
+ <td><code>offset</code> + <code>limit</code> / <code>per_page</code></td>
103
+ <td>Pagination for <strong>sonic-queue</strong> lazy load</td>
104
+ </tr>
105
+ <tr>
106
+ <td><code>contains</code></td>
107
+ <td>Substring on joke text, setup/delivery, categories (<strong>input</strong> demo, <code>name=&quot;contains&quot;</code>)</td>
108
+ </tr>
109
+ <tr>
110
+ <td><code>lang</code></td>
111
+ <td><code>fr</code> or <code>en</code> — filters the local dataset (<strong>select</strong> demo, <code>name=&quot;lang&quot;</code>)</td>
112
+ </tr>
113
+ <tr>
114
+ <td><code>blacklistFlags</code></td>
115
+ <td>Comma-separated flags to <strong>exclude</strong> (<code>nsfw</code>, <code>religious</code>, <code>political</code>, <code>racist</code>, <code>sexist</code>, <code>explicit</code>) — checkbox/radio/switch « Remove following jokes » demos; each joke has matching <code>flags</code> in fixtures</td>
116
+ </tr>
117
+ </tbody></table>
118
+ <h3 id="pagination-get-apiusers">Pagination <code>GET /api/users</code></h3>
119
+ <table>
120
+ <thead>
121
+ <tr>
122
+ <th>Query</th>
123
+ <th>Meaning</th>
124
+ </tr>
125
+ </thead>
126
+ <tbody><tr>
127
+ <td><code>offset</code> + <code>per_page</code></td>
128
+ <td>Index-based slice on the filtered set — <strong>sonic-queue</strong> (<code>offset=$offset&amp;per_page=$limit</code>)</td>
129
+ </tr>
130
+ <tr>
131
+ <td><code>page</code> + <code>per_page</code></td>
132
+ <td>1-based page — static fetch examples (<code>?page=2</code>)</td>
133
+ </tr>
134
+ <tr>
135
+ <td><code>limit</code></td>
136
+ <td>Alias of <code>per_page</code></td>
137
+ </tr>
138
+ <tr>
139
+ <td><code>q</code></td>
140
+ <td>Search on first name, last name, email (optional; <strong>sonic-queue</strong> + <code>dataFilterProvider</code>, field <code>name=&quot;q&quot;</code>)</td>
141
+ </tr>
142
+ </tbody></table>
143
+ <p><strong>ALTCHA</strong> (<code>sonic-captcha</code>) is <strong>not</strong> mocked — it still uses the Supersoniks service.</p>
144
+ <p>In TypeScript demos, import from <code>src/docs/mock-api/urls.ts</code> (e.g. <code>DOCS_MOCK_REQRES_SERVICE</code> on <code>serviceURL</code>).</p>
145
+ <h2 id="source-files">Source files</h2>
146
+ <ul>
147
+ <li><code>src/docs/mock-api/</code> — router, fixtures, service worker, <code>urls.ts</code></li>
148
+ <li><code>scripts/docs-mock-api-vite-plugin.ts</code> — SW build + middleware</li>
149
+ <li><code>public/docs-mock-api-sw.js</code> — generated on <code>yarn dev</code> / <code>yarn build-docs</code></li>
150
+ </ul>
151
+ <pre><code class="language-bash">yarn dev # mock API on by default
152
+ yarn build-docs # includes SW bundle
153
+ </code></pre>
154
+
155
+ </article>
156
+ </main>
157
+ </body>
158
+ </html>
@@ -0,0 +1,180 @@
1
+ <!DOCTYPE html>
2
+ <html lang="fr" data-crawl-url="https://concorde.supersoniks.org/crawl/docs/_misc/dynamic-path.html" data-doc-id="docs/_misc/dynamic-path">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Dynamic path placeholders — Concorde</title>
7
+ <meta name="description" content="Decorators and DataProviderKey paths can include placeholders resolved on the host component at runtime:">
8
+ <meta name="keywords" content="Concorde, supersoniks, docs/_misc/dynamic-path, dynamic-path, Dynamic path placeholders, reference, DataProviderKey, ${prop}, {$prop}, &quot;users/${userId}&quot;, &quot;api/sessions/${sessionId}/sync&quot;, &quot;teams.${teamId}.members&quot;, resolveDynamicPath, userId, sessionId, requestAnimationFrame">
9
+ <meta name="concorde-doc-id" content="docs/_misc/dynamic-path">
10
+ <link rel="canonical" href="https://concorde.supersoniks.org/crawl/docs/_misc/dynamic-path.html">
11
+ </head>
12
+ <body>
13
+ <header>
14
+ <p><a href="../../index.html">Concorde documentation (crawl)</a> · <a href="https://concorde.supersoniks.org/#docs/_misc/dynamic-path.md/dynamic-path" rel="nofollow">interactive version</a></p>
15
+ </header>
16
+ <main>
17
+ <article>
18
+ <p class="doc-lead" id="doc-summary"><strong>Concorde reference — Dynamic path placeholders</strong>. Decorators and DataProviderKey paths can include placeholders resolved on the host component at runtime: <span>Doc ID: <code>docs/_misc/dynamic-path</code>. Keywords: Concorde, supersoniks, docs/_misc/dynamic-path, dynamic-path, Dynamic path placeholders, reference, DataProviderKey, ${prop}, {$prop}, &quot;users/${userId}&quot;, &quot;api/sessions/${sessionId}/sync&quot;, &quot;teams.${teamId}.members&quot;, resolveDynamicPath, userId, sessionId, requestAnimationFrame. URL: <a href="https://concorde.supersoniks.org/crawl/docs/_misc/dynamic-path.html">https://concorde.supersoniks.org/crawl/docs/_misc/dynamic-path.html</a>.</span></p>
19
+ <h1 id="dynamic-path-placeholders">Dynamic path placeholders</h1>
20
+ <p>Decorators and <code>DataProviderKey</code> paths can include <strong>placeholders</strong> resolved on the host component at runtime:</p>
21
+ <ul>
22
+ <li><code>${prop}</code> or <code>{$prop}</code> — e.g. <code>&quot;users/${userId}&quot;</code>, <code>&quot;api/sessions/${sessionId}/sync&quot;</code></li>
23
+ <li>Nested expressions — e.g. <code>&quot;teams.${teamId}.members&quot;</code></li>
24
+ </ul>
25
+ <p>Resolution is done by <a href="../../core/decorators/subscriber/dynamicPath.ts"><code>resolveDynamicPath</code></a>. The root property names (<code>userId</code>, <code>sessionId</code>, …) are watched via <code>requestAnimationFrame</code> (see <code>dynamicPropertyWatch.ts</code>).</p>
26
+ <h2 id="default-behaviour-ready--not-ready">Default behaviour (<code>ready</code> / <code>not ready</code>)</h2>
27
+ <table>
28
+ <thead>
29
+ <tr>
30
+ <th>Placeholder value</th>
31
+ <th>Path <code>ready</code>?</th>
32
+ <th>Inserted segment</th>
33
+ <th>Notes</th>
34
+ </tr>
35
+ </thead>
36
+ <tbody><tr>
37
+ <td><code>undefined</code></td>
38
+ <td><strong>no</strong></td>
39
+ <td>—</td>
40
+ <td>Wait until defined</td>
41
+ </tr>
42
+ <tr>
43
+ <td><code>null</code></td>
44
+ <td><strong>no</strong></td>
45
+ <td>—</td>
46
+ <td>Same as undefined</td>
47
+ </tr>
48
+ <tr>
49
+ <td><code>&quot;&quot;</code></td>
50
+ <td><strong>yes</strong></td>
51
+ <td>empty string</td>
52
+ <td>e.g. <code>sessions//sync</code> — request may still run</td>
53
+ </tr>
54
+ <tr>
55
+ <td><code>0</code></td>
56
+ <td><strong>yes</strong></td>
57
+ <td><code>&quot;0&quot;</code></td>
58
+ <td>Not treated as “missing”</td>
59
+ </tr>
60
+ <tr>
61
+ <td><code>false</code></td>
62
+ <td><strong>yes</strong></td>
63
+ <td><code>&quot;false&quot;</code></td>
64
+ <td></td>
65
+ </tr>
66
+ <tr>
67
+ <td><code>42</code>, <code>&quot;alpha&quot;</code></td>
68
+ <td><strong>yes</strong></td>
69
+ <td><code>&quot;42&quot;</code>, <code>&quot;alpha&quot;</code></td>
70
+ <td></td>
71
+ </tr>
72
+ </tbody></table>
73
+ <p>When <code>ready: false</code>, decorators <strong>do not</strong> call the network (for <code>@get</code> / <code>@post</code> / <code>@put</code> / <code>@patch</code>), <strong>unsubscribe</strong> (<code>@bind</code> / <code>@subscribe</code>), or skip publisher binding (<code>@publish</code> / <code>@handle</code>). The decorated property is often left unchanged or set to <code>undefined</code> (HTTP decorators).</p>
74
+ <p>When the placeholder later becomes valid, observers run again and behaviour resumes.</p>
75
+ <h2 id="skipemptyplaceholder-option"><code>skipEmptyPlaceholder</code> option</h2>
76
+ <p>Some APIs should not run while an id is still <code>&quot;&quot;</code>. Opt in per decorator:</p>
77
+ <pre><code class="language-typescript">@get(new Endpoint&lt;User, { userId: string }&gt;(&quot;users/${userId}&quot;), {
78
+ skipEmptyPlaceholder: true,
79
+ })
80
+ </code></pre>
81
+ <table>
82
+ <thead>
83
+ <tr>
84
+ <th>Option</th>
85
+ <th>Scope</th>
86
+ </tr>
87
+ </thead>
88
+ <tbody><tr>
89
+ <td><code>skipEmptyPlaceholder?: boolean</code></td>
90
+ <td><strong>Only</strong> empty string <code>&#39;&#39;</code> on a placeholder</td>
91
+ </tr>
92
+ <tr>
93
+ <td>Default <code>false</code></td>
94
+ <td><code>&quot;&quot;</code> is inserted into the path (legacy behaviour)</td>
95
+ </tr>
96
+ <tr>
97
+ <td><code>true</code></td>
98
+ <td><code>&quot;&quot;</code> → <code>ready: false</code>, same as <code>null</code> / <code>undefined</code> for that segment</td>
99
+ </tr>
100
+ </tbody></table>
101
+ <p>Does <strong>not</strong> affect <code>0</code>, <code>false</code>, <code>null</code>, or <code>undefined</code> (nullish stays “not ready” regardless).</p>
102
+ <p>Available on:</p>
103
+ <table>
104
+ <thead>
105
+ <tr>
106
+ <th>API</th>
107
+ <th>Where</th>
108
+ </tr>
109
+ </thead>
110
+ <tbody><tr>
111
+ <td><code>@get</code></td>
112
+ <td>2nd or 3rd argument (<code>GetOptions</code>)</td>
113
+ </tr>
114
+ <tr>
115
+ <td><code>@post</code> / <code>@put</code> / <code>@patch</code></td>
116
+ <td><code>PostOptions</code> / <code>ApiSendOptions</code></td>
117
+ </tr>
118
+ <tr>
119
+ <td><code>@bind</code> / <code>@subscribe</code></td>
120
+ <td><code>BindOptions</code></td>
121
+ </tr>
122
+ <tr>
123
+ <td><code>@publish</code></td>
124
+ <td>2nd argument <code>PublishOptions</code></td>
125
+ </tr>
126
+ <tr>
127
+ <td><code>@handle</code></td>
128
+ <td><code>HandleOptions</code></td>
129
+ </tr>
130
+ </tbody></table>
131
+ <h2 id="per-decorator-summary">Per-decorator summary</h2>
132
+ <table>
133
+ <thead>
134
+ <tr>
135
+ <th>Decorator</th>
136
+ <th><code>ready: false</code></th>
137
+ <th><code>ready: true</code></th>
138
+ </tr>
139
+ </thead>
140
+ <tbody><tr>
141
+ <td><code>@get</code></td>
142
+ <td>No HTTP; <code>payload</code> → <code>undefined</code></td>
143
+ <td><code>ApiResult</code> assigned</td>
144
+ </tr>
145
+ <tr>
146
+ <td><code>@post</code> / <code>@put</code> / <code>@patch</code></td>
147
+ <td>No HTTP; <code>payload</code> → <code>undefined</code></td>
148
+ <td><code>ApiResult</code> assigned</td>
149
+ </tr>
150
+ <tr>
151
+ <td><code>@subscribe</code> / <code>@bind</code></td>
152
+ <td>Unsubscribe; prop keeps last value</td>
153
+ <td>Subscribe <code>onAssign</code></td>
154
+ </tr>
155
+ <tr>
156
+ <td><code>@publish</code></td>
157
+ <td>Internal publisher <code>null</code>; writes ignored</td>
158
+ <td><code>publisher.set</code> on assign</td>
159
+ </tr>
160
+ <tr>
161
+ <td><code>@handle</code></td>
162
+ <td>No subscription; with <code>waitForAllDefined</code>, method not called</td>
163
+ <td>Callback on assign</td>
164
+ </tr>
165
+ </tbody></table>
166
+ <h2 id="see-also">See also</h2>
167
+ <ul>
168
+ <li><a href="./dataProviderKey.html#dataProviderKey">DataProviderKey</a> — path syntax</li>
169
+ <li><a href="./endpoint.html#endpoint">Endpoint</a> — HTTP paths + host generic <code>U</code></li>
170
+ <li>HTTP: <a href="../_decorators/get.html#get">@get</a> · <a href="../_decorators/post.html#post">@post</a> · <a href="../_decorators/put.html#put">@put</a> · <a href="../_decorators/patch.html#patch">@patch</a></li>
171
+ <li>Store: <a href="../_decorators/subscribe.html#subscribe">@subscribe</a> · <a href="../_decorators/bind.html#bind">@bind</a> · <a href="../_decorators/publish.html#publish">@publish</a> · <a href="../_decorators/handle.html#handle">@handle</a></li>
172
+ <li>Legacy strings: <a href="../_decorators/on-assign.html#on-assign">@onAssign</a> (dynamic paths section)</li>
173
+ <li>Templates: <a href="../_directives/sub.html#sub">sub()</a> — dynamic paths in Lit (no <code>skipEmptyPlaceholder</code> yet)</li>
174
+ <li>Tutorial: <a href="../_getting-started/my-first-component.html#my-first-component">My first component</a> — <code>&quot;${dataProvider}&quot;</code> scope pattern</li>
175
+ </ul>
176
+
177
+ </article>
178
+ </main>
179
+ </body>
180
+ </html>