@supersoniks/concorde 4.9.98-visual-stack.1 → 4.9.98-visual-stack.2

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 (339) hide show
  1. package/.gitlab-ci.yml +0 -13
  2. package/build-infos.json +1 -1
  3. package/concorde-3d.bundle.js +1 -1
  4. package/concorde-3d.es.js +2 -2
  5. package/concorde-core.bundle.js +557 -622
  6. package/concorde-core.es.js +6025 -5575
  7. package/concorde-hugging-face-infer.bundle.js +1 -1
  8. package/concorde-hugging-face-infer.es.js +1 -1
  9. package/concorde-interactive.bundle.js +1162 -0
  10. package/concorde-interactive.es.js +10723 -0
  11. package/concorde-shader.bundle.js +1 -1
  12. package/concorde-shader.es.js +2 -2
  13. package/concorde-webgpu.bundle.js +1 -1
  14. package/concorde-webgpu.es.js +2 -2
  15. package/dist/concorde-3d.bundle.js +1 -1
  16. package/dist/concorde-3d.es.js +2 -2
  17. package/dist/concorde-core.bundle.js +557 -622
  18. package/dist/concorde-core.es.js +6025 -5575
  19. package/dist/concorde-hugging-face-infer.bundle.js +1 -1
  20. package/dist/concorde-hugging-face-infer.es.js +1 -1
  21. package/dist/concorde-interactive.bundle.js +1162 -0
  22. package/dist/concorde-interactive.es.js +10723 -0
  23. package/dist/concorde-shader.bundle.js +1 -1
  24. package/dist/concorde-shader.es.js +2 -2
  25. package/dist/concorde-webgpu.bundle.js +1 -1
  26. package/dist/concorde-webgpu.es.js +2 -2
  27. package/dist/docs-mock-api-sw.js +5 -1
  28. package/dist/docs-mock-api-sw.js.map +2 -2
  29. package/dist/js/addons/interactive.js +6 -0
  30. package/dist/js/addons/interactive.js.map +1 -0
  31. package/dist/js/core/components/functional/if/if.js +65 -7
  32. package/dist/js/core/components/functional/if/if.js.map +1 -1
  33. package/dist/js/core/components/functional/interactive/action.js +96 -0
  34. package/dist/js/core/components/functional/interactive/action.js.map +1 -0
  35. package/dist/js/core/components/functional/interactive/gamepad.js +206 -0
  36. package/dist/js/core/components/functional/interactive/gamepad.js.map +1 -0
  37. package/dist/js/core/components/functional/interactive/gesture.js +148 -0
  38. package/dist/js/core/components/functional/interactive/gesture.js.map +1 -0
  39. package/dist/js/core/components/functional/interactive/helpers.js +82 -0
  40. package/dist/js/core/components/functional/interactive/helpers.js.map +1 -0
  41. package/dist/js/core/components/functional/interactive/index.js +20 -0
  42. package/dist/js/core/components/functional/interactive/index.js.map +1 -0
  43. package/dist/js/core/components/functional/interactive/keyboard.js +183 -0
  44. package/dist/js/core/components/functional/interactive/keyboard.js.map +1 -0
  45. package/dist/js/core/components/functional/interactive/matrix.js +201 -0
  46. package/dist/js/core/components/functional/interactive/matrix.js.map +1 -0
  47. package/dist/js/core/components/functional/interactive/registry.js +28 -0
  48. package/dist/js/core/components/functional/interactive/registry.js.map +1 -0
  49. package/dist/js/core/components/functional/interactive/store.js +264 -0
  50. package/dist/js/core/components/functional/interactive/store.js.map +1 -0
  51. package/dist/js/core/components/functional/interactive/ticker.js +182 -0
  52. package/dist/js/core/components/functional/interactive/ticker.js.map +1 -0
  53. package/dist/js/core/components/functional/value/value.js +49 -4
  54. package/dist/js/core/components/functional/value/value.js.map +1 -1
  55. package/dist/js/core/components/ui/_css/rounded.js +34 -0
  56. package/dist/js/core/components/ui/_css/rounded.js.map +1 -0
  57. package/dist/js/core/components/ui/_css/type.js +44 -0
  58. package/dist/js/core/components/ui/_css/type.js.map +1 -1
  59. package/dist/js/core/components/ui/_i18n/ui-aria-labels.js +95 -0
  60. package/dist/js/core/components/ui/_i18n/ui-aria-labels.js.map +1 -0
  61. package/dist/js/core/components/ui/alert/alert.js +72 -87
  62. package/dist/js/core/components/ui/alert/alert.js.map +1 -1
  63. package/dist/js/core/components/ui/alert-messages/alert-messages.js +1 -0
  64. package/dist/js/core/components/ui/alert-messages/alert-messages.js.map +1 -1
  65. package/dist/js/core/components/ui/badge/badge.js +29 -80
  66. package/dist/js/core/components/ui/badge/badge.js.map +1 -1
  67. package/dist/js/core/components/ui/button/button.js +8 -7
  68. package/dist/js/core/components/ui/button/button.js.map +1 -1
  69. package/dist/js/core/components/ui/card/card-header.js +7 -2
  70. package/dist/js/core/components/ui/card/card-header.js.map +1 -1
  71. package/dist/js/core/components/ui/divider/divider.js +1 -1
  72. package/dist/js/core/components/ui/divider/divider.js.map +1 -1
  73. package/dist/js/core/components/ui/form/checkbox/checkbox.js +4 -20
  74. package/dist/js/core/components/ui/form/checkbox/checkbox.js.map +1 -1
  75. package/dist/js/core/components/ui/form/fieldset/legend-description.js +1 -1
  76. package/dist/js/core/components/ui/form/fieldset/legend.js +1 -1
  77. package/dist/js/core/components/ui/form/input/input.js +12 -15
  78. package/dist/js/core/components/ui/form/input/input.js.map +1 -1
  79. package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js +363 -158
  80. package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js.map +1 -1
  81. package/dist/js/core/components/ui/form/radio/radio.js +1 -1
  82. package/dist/js/core/components/ui/form/select/select.js +3 -6
  83. package/dist/js/core/components/ui/form/select/select.js.map +1 -1
  84. package/dist/js/core/components/ui/form/textarea/textarea.js +1 -2
  85. package/dist/js/core/components/ui/form/textarea/textarea.js.map +1 -1
  86. package/dist/js/core/components/ui/image/image.js +9 -37
  87. package/dist/js/core/components/ui/image/image.js.map +1 -1
  88. package/dist/js/core/components/ui/link/link.js +25 -26
  89. package/dist/js/core/components/ui/link/link.js.map +1 -1
  90. package/dist/js/core/components/ui/modal/modal-close.js +3 -12
  91. package/dist/js/core/components/ui/modal/modal-close.js.map +1 -1
  92. package/dist/js/core/components/ui/modal/modal.js +18 -18
  93. package/dist/js/core/components/ui/modal/modal.js.map +1 -1
  94. package/dist/js/core/components/ui/pop/pop.js +131 -112
  95. package/dist/js/core/components/ui/pop/pop.js.map +1 -1
  96. package/dist/js/core/components/ui/table/table.js.map +1 -1
  97. package/dist/js/core/components/ui/theme/theme.js +1 -1
  98. package/dist/js/core/components/ui/toast/dismissed.js +9 -0
  99. package/dist/js/core/components/ui/toast/dismissed.js.map +1 -0
  100. package/dist/js/core/components/ui/toast/render-content.js +14 -0
  101. package/dist/js/core/components/ui/toast/render-content.js.map +1 -0
  102. package/dist/js/core/components/ui/toast/toast-item.js +150 -96
  103. package/dist/js/core/components/ui/toast/toast-item.js.map +1 -1
  104. package/dist/js/core/components/ui/toast/toast.js +41 -13
  105. package/dist/js/core/components/ui/toast/toast.js.map +1 -1
  106. package/dist/js/core/components/ui/tooltip/tooltip.js +144 -143
  107. package/dist/js/core/components/ui/tooltip/tooltip.js.map +1 -1
  108. package/dist/js/core/decorators/subscriber/ancestorAttribute.js.map +1 -1
  109. package/dist/js/core/decorators/subscriber/derive.js +3 -1
  110. package/dist/js/core/decorators/subscriber/derive.js.map +1 -1
  111. package/dist/js/core/mixins/Fetcher.js.map +1 -1
  112. package/dist/js/core/mixins/FormCheckable.js +1 -8
  113. package/dist/js/core/mixins/FormCheckable.js.map +1 -1
  114. package/dist/js/core/mixins/FormElement.js +26 -53
  115. package/dist/js/core/mixins/FormElement.js.map +1 -1
  116. package/dist/js/core/utils/AncestorAttributeObserver.js +130 -55
  117. package/dist/js/core/utils/AncestorAttributeObserver.js.map +1 -1
  118. package/dist/js/core/utils/LocationHandler.js +1 -1
  119. package/dist/js/core/utils/LocationHandler.js.map +1 -1
  120. package/dist/js/core/utils/dismissed.js +23 -0
  121. package/dist/js/core/utils/dismissed.js.map +1 -0
  122. package/dist/js/core/utils/positioning.js +110 -0
  123. package/dist/js/core/utils/positioning.js.map +1 -0
  124. package/dist/js/directives.js +1 -2
  125. package/dist/js/directives.js.map +1 -1
  126. package/dist/types/addons/interactive.d.ts +6 -0
  127. package/dist/types/addons/interactive.d.ts.map +1 -0
  128. package/dist/types/core/components/functional/if/if.d.ts +14 -5
  129. package/dist/types/core/components/functional/if/if.d.ts.map +1 -1
  130. package/dist/types/core/components/functional/interactive/action.d.ts +22 -0
  131. package/dist/types/core/components/functional/interactive/action.d.ts.map +1 -0
  132. package/dist/types/core/components/functional/interactive/gamepad.d.ts +37 -0
  133. package/dist/types/core/components/functional/interactive/gamepad.d.ts.map +1 -0
  134. package/dist/types/core/components/functional/interactive/gesture.d.ts +26 -0
  135. package/dist/types/core/components/functional/interactive/gesture.d.ts.map +1 -0
  136. package/dist/types/core/components/functional/interactive/helpers.d.ts +23 -0
  137. package/dist/types/core/components/functional/interactive/helpers.d.ts.map +1 -0
  138. package/dist/types/core/components/functional/interactive/index.d.ts +20 -0
  139. package/dist/types/core/components/functional/interactive/index.d.ts.map +1 -0
  140. package/dist/types/core/components/functional/interactive/keyboard.d.ts +37 -0
  141. package/dist/types/core/components/functional/interactive/keyboard.d.ts.map +1 -0
  142. package/dist/types/core/components/functional/interactive/matrix.d.ts +31 -0
  143. package/dist/types/core/components/functional/interactive/matrix.d.ts.map +1 -0
  144. package/dist/types/core/components/functional/interactive/registry.d.ts +23 -0
  145. package/dist/types/core/components/functional/interactive/registry.d.ts.map +1 -0
  146. package/dist/types/core/components/functional/interactive/store.d.ts +46 -0
  147. package/dist/types/core/components/functional/interactive/store.d.ts.map +1 -0
  148. package/dist/types/core/components/functional/interactive/ticker.d.ts +33 -0
  149. package/dist/types/core/components/functional/interactive/ticker.d.ts.map +1 -0
  150. package/dist/types/core/components/functional/value/value.d.ts +6 -0
  151. package/dist/types/core/components/functional/value/value.d.ts.map +1 -1
  152. package/dist/types/core/components/ui/_css/rounded.d.ts +3 -0
  153. package/dist/types/core/components/ui/_css/rounded.d.ts.map +1 -0
  154. package/dist/types/core/components/ui/_css/type.d.ts +13 -0
  155. package/dist/types/core/components/ui/_css/type.d.ts.map +1 -1
  156. package/dist/types/core/components/ui/_i18n/ui-aria-labels.d.ts +83 -0
  157. package/dist/types/core/components/ui/_i18n/ui-aria-labels.d.ts.map +1 -0
  158. package/dist/types/core/components/ui/alert/alert.d.ts +14 -12
  159. package/dist/types/core/components/ui/alert/alert.d.ts.map +1 -1
  160. package/dist/types/core/components/ui/alert-messages/alert-messages.d.ts.map +1 -1
  161. package/dist/types/core/components/ui/badge/badge.d.ts +1 -1
  162. package/dist/types/core/components/ui/badge/badge.d.ts.map +1 -1
  163. package/dist/types/core/components/ui/button/button.d.ts +13 -29
  164. package/dist/types/core/components/ui/button/button.d.ts.map +1 -1
  165. package/dist/types/core/components/ui/card/card-header.d.ts.map +1 -1
  166. package/dist/types/core/components/ui/divider/divider.d.ts +2 -1
  167. package/dist/types/core/components/ui/divider/divider.d.ts.map +1 -1
  168. package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts +25 -73
  169. package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts.map +1 -1
  170. package/dist/types/core/components/ui/form/input/input.d.ts +14 -29
  171. package/dist/types/core/components/ui/form/input/input.d.ts.map +1 -1
  172. package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +63 -65
  173. package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts.map +1 -1
  174. package/dist/types/core/components/ui/form/radio/radio.d.ts +1 -1
  175. package/dist/types/core/components/ui/form/select/select.d.ts +3 -5
  176. package/dist/types/core/components/ui/form/select/select.d.ts.map +1 -1
  177. package/dist/types/core/components/ui/form/textarea/textarea.d.ts +12 -28
  178. package/dist/types/core/components/ui/form/textarea/textarea.d.ts.map +1 -1
  179. package/dist/types/core/components/ui/image/image.d.ts +2 -1
  180. package/dist/types/core/components/ui/image/image.d.ts.map +1 -1
  181. package/dist/types/core/components/ui/link/link.d.ts +10 -9
  182. package/dist/types/core/components/ui/link/link.d.ts.map +1 -1
  183. package/dist/types/core/components/ui/modal/modal-close.d.ts +2 -2
  184. package/dist/types/core/components/ui/modal/modal-close.d.ts.map +1 -1
  185. package/dist/types/core/components/ui/pop/pop.d.ts +12 -4
  186. package/dist/types/core/components/ui/pop/pop.d.ts.map +1 -1
  187. package/dist/types/core/components/ui/table/table.d.ts +2 -1
  188. package/dist/types/core/components/ui/table/table.d.ts.map +1 -1
  189. package/dist/types/core/components/ui/toast/dismissed.d.ts +3 -0
  190. package/dist/types/core/components/ui/toast/dismissed.d.ts.map +1 -0
  191. package/dist/types/core/components/ui/toast/render-content.d.ts +7 -0
  192. package/dist/types/core/components/ui/toast/render-content.d.ts.map +1 -0
  193. package/dist/types/core/components/ui/toast/toast-item.d.ts +26 -9
  194. package/dist/types/core/components/ui/toast/toast-item.d.ts.map +1 -1
  195. package/dist/types/core/components/ui/toast/toast.d.ts +6 -3
  196. package/dist/types/core/components/ui/toast/toast.d.ts.map +1 -1
  197. package/dist/types/core/components/ui/toast/types.d.ts +12 -2
  198. package/dist/types/core/components/ui/toast/types.d.ts.map +1 -1
  199. package/dist/types/core/components/ui/tooltip/tooltip.d.ts +19 -11
  200. package/dist/types/core/components/ui/tooltip/tooltip.d.ts.map +1 -1
  201. package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts +3 -4
  202. package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts.map +1 -1
  203. package/dist/types/core/decorators/subscriber/derive.d.ts.map +1 -1
  204. package/dist/types/core/mixins/FormCheckable.d.ts +10 -27
  205. package/dist/types/core/mixins/FormCheckable.d.ts.map +1 -1
  206. package/dist/types/core/mixins/FormElement.d.ts +21 -10
  207. package/dist/types/core/mixins/FormElement.d.ts.map +1 -1
  208. package/dist/types/core/mixins/FormInput.d.ts +11 -27
  209. package/dist/types/core/mixins/FormInput.d.ts.map +1 -1
  210. package/dist/types/core/utils/AncestorAttributeObserver.d.ts +17 -9
  211. package/dist/types/core/utils/AncestorAttributeObserver.d.ts.map +1 -1
  212. package/dist/types/core/utils/LocationHandler.d.ts +3 -2
  213. package/dist/types/core/utils/LocationHandler.d.ts.map +1 -1
  214. package/dist/types/core/utils/dismissed.d.ts +3 -0
  215. package/dist/types/core/utils/dismissed.d.ts.map +1 -0
  216. package/dist/types/core/utils/positioning.d.ts +44 -0
  217. package/dist/types/core/utils/positioning.d.ts.map +1 -0
  218. package/dist/types/directives.d.ts +1 -3
  219. package/dist/types/directives.d.ts.map +1 -1
  220. package/dist/types/mixins.d.ts +22 -55
  221. package/dist/types/mixins.d.ts.map +1 -1
  222. package/docs/assets/{index-FmK4JaIM.js → index-D8MVWqY6.js} +946 -687
  223. package/docs/assets/index-DiD0qYvE.css +1 -0
  224. package/docs/crawl/core/components/ui/form/input-autocomplete/input-autocomplete.html +17 -85
  225. package/docs/crawl/docs/_misc/formelement-subscriber-removal.html +1 -1
  226. package/docs/crawl/hubs/form-components.html +13 -11
  227. package/docs/docs-mock-api-sw.js +5 -1
  228. package/docs/docs-mock-api-sw.js.map +2 -2
  229. package/docs/index.html +2 -2
  230. package/docs/llms-full.txt +12 -38
  231. package/docs/llms.txt +1 -1
  232. package/docs/src/core/components/functional/sdui/sdui.md +0 -0
  233. package/docs/src/core/components/ui/form/checkbox/checkbox.md +0 -0
  234. package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +14 -118
  235. package/docs/src/docs/_getting-started/create-a-component.md +0 -0
  236. package/docs/src/docs/_misc/formelement-subscriber-removal.md +1 -1
  237. package/docs/src/docs/search/docs-search.json +195 -200
  238. package/docs/src/tsconfig.json +324 -0
  239. package/gitlab/job_tests.sh +25 -12
  240. package/index.html +3 -3
  241. package/package.json +181 -9
  242. package/public/docs-mock-api-sw.js +5 -1
  243. package/public/docs-mock-api-sw.js.map +2 -2
  244. package/scripts/build-addons.mjs +2 -2
  245. package/scripts/post-build.mjs +9 -0
  246. package/src/addons/interactive.ts +5 -0
  247. package/src/core/components/functional/if/if.ts +54 -7
  248. package/src/core/components/functional/interactive/action.ts +84 -0
  249. package/src/core/components/functional/interactive/gamepad.ts +197 -0
  250. package/src/core/components/functional/interactive/gesture.ts +136 -0
  251. package/src/core/components/functional/interactive/helpers.spec.ts +50 -0
  252. package/src/core/components/functional/interactive/helpers.ts +97 -0
  253. package/src/core/components/functional/interactive/index.ts +25 -0
  254. package/src/core/components/functional/interactive/interactive.md +33 -0
  255. package/src/core/components/functional/interactive/keyboard.ts +171 -0
  256. package/src/core/components/functional/interactive/matrix.ts +185 -0
  257. package/src/core/components/functional/interactive/registry.ts +46 -0
  258. package/src/core/components/functional/interactive/store.ts +264 -0
  259. package/src/core/components/functional/interactive/ticker.ts +171 -0
  260. package/src/core/components/functional/list/list.ts +0 -0
  261. package/src/core/components/functional/subscriber/subscriber.ts +0 -0
  262. package/src/core/components/functional/value/value.ts +44 -4
  263. package/src/core/components/ui/_css/rounded.ts +36 -0
  264. package/src/core/components/ui/_css/type.ts +49 -0
  265. package/src/core/components/ui/_i18n/ui-aria-labels.ts +104 -0
  266. package/src/core/components/ui/alert/alert.md +128 -72
  267. package/src/core/components/ui/alert/alert.spec.ts +145 -0
  268. package/src/core/components/ui/alert/alert.ts +86 -91
  269. package/src/core/components/ui/alert-messages/alert-messages.ts +1 -1
  270. package/src/core/components/ui/badge/badge.md +126 -78
  271. package/src/core/components/ui/badge/badge.ts +29 -81
  272. package/src/core/components/ui/button/button.md +1 -0
  273. package/src/core/components/ui/button/button.ts +12 -10
  274. package/src/core/components/ui/card/card-header.ts +7 -2
  275. package/src/core/components/ui/card/card.md +120 -65
  276. package/src/core/components/ui/divider/divider.ts +4 -9
  277. package/src/core/components/ui/form/checkbox/checkbox.md +1 -1
  278. package/src/core/components/ui/form/checkbox/checkbox.ts +4 -20
  279. package/src/core/components/ui/form/fieldset/legend-description.ts +1 -1
  280. package/src/core/components/ui/form/fieldset/legend.ts +1 -1
  281. package/src/core/components/ui/form/input/input.md +1 -1
  282. package/src/core/components/ui/form/input/input.ts +25 -27
  283. package/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +14 -118
  284. package/src/core/components/ui/form/input-autocomplete/input-autocomplete.ts +419 -187
  285. package/src/core/components/ui/form/radio/radio.ts +1 -1
  286. package/src/core/components/ui/form/select/select.ts +3 -6
  287. package/src/core/components/ui/form/textarea/textarea.md +1 -1
  288. package/src/core/components/ui/form/textarea/textarea.ts +1 -2
  289. package/src/core/components/ui/image/image.md +147 -53
  290. package/src/core/components/ui/image/image.ts +10 -44
  291. package/src/core/components/ui/link/link.md +2 -2
  292. package/src/core/components/ui/link/link.ts +42 -37
  293. package/src/core/components/ui/modal/modal-close.ts +8 -12
  294. package/src/core/components/ui/modal/modal.ts +18 -18
  295. package/src/core/components/ui/pop/pop.md +105 -1
  296. package/src/core/components/ui/pop/pop.ts +145 -141
  297. package/src/core/components/ui/table/table.ts +2 -8
  298. package/src/core/components/ui/theme/theme.ts +1 -1
  299. package/src/core/components/ui/toast/dismissed.ts +14 -0
  300. package/src/core/components/ui/toast/render-content.ts +13 -0
  301. package/src/core/components/ui/toast/toast-item.ts +179 -103
  302. package/src/core/components/ui/toast/toast.ts +58 -21
  303. package/src/core/components/ui/toast/types.ts +14 -2
  304. package/src/core/components/ui/tooltip/tooltip.ts +176 -154
  305. package/src/core/decorators/subscriber/ancestorAttribute.spec.ts +26 -0
  306. package/src/core/decorators/subscriber/ancestorAttribute.ts +3 -4
  307. package/src/core/decorators/subscriber/derive.ts +3 -3
  308. package/src/core/mixins/Fetcher.ts +1 -1
  309. package/src/core/mixins/FormCheckable.ts +1 -8
  310. package/src/core/mixins/FormElement.ts +74 -76
  311. package/src/core/mixins/Subscriber.ts +0 -0
  312. package/src/core/utils/AncestorAttributeObserver.ts +183 -70
  313. package/src/core/utils/DataBindObserver.ts +0 -0
  314. package/src/core/utils/LocationHandler.ts +12 -5
  315. package/src/core/utils/Objects.ts +0 -0
  316. package/src/core/utils/dismissed.ts +22 -0
  317. package/src/core/utils/positioning.spec.ts +208 -0
  318. package/src/core/utils/positioning.ts +183 -0
  319. package/src/directives.ts +1 -3
  320. package/src/docs/_core-concept/dataFlow.md +1 -1
  321. package/src/docs/_decorators/ancestor-attribute.md +3 -2
  322. package/src/docs/_getting-started/concorde-outside.md +3 -3
  323. package/src/docs/_misc/formelement-subscriber-removal.md +115 -0
  324. package/src/docs/_misc/html-integration.md +2 -0
  325. package/src/docs/code.ts +3 -1
  326. package/src/docs/components/docs-demo-sources.ts +60 -0
  327. package/src/docs/docs.ts +1 -0
  328. package/src/docs/example/docs-input-autocomplete-demos.ts +110 -0
  329. package/src/docs/mock-api/router.ts +17 -1
  330. package/src/docs/navigation/navigation.ts +4 -0
  331. package/src/docs/search/docs-search.json +943 -2033
  332. package/src/docs/tailwind/css/tailwind.css +13 -6
  333. package/src/tsconfig.json +135 -6
  334. package/src/tsconfig.tsbuildinfo +1 -1
  335. package/tailwind.config.js +50 -3
  336. package/vite/config.js +23 -35
  337. package/vite.config.mts +5 -0
  338. package/vitest.setup.ts +49 -13
  339. package/docs/assets/index-BZiZXMU-.css +0 -1
@@ -0,0 +1,171 @@
1
+ import { LitElement, css, html } from "lit";
2
+ import { customElement, property } from "lit/decorators.js";
3
+ import { dispatch, type SonicActionMessage } from "./registry";
4
+
5
+ const tagName = "sonic-keyboard";
6
+
7
+ type KeymapValue = string | { type: string; payload?: unknown };
8
+ type Keymap = Record<string, KeymapValue>;
9
+ type RepeatCfg = Record<string, [number, number]>;
10
+ type HeldKey = { type: string; payload?: unknown; timer?: number; interval?: number };
11
+
12
+ /**
13
+ * Source d’actions clavier → store (`target`).
14
+ * Opt-in `@supersoniks/concorde/interactive`.
15
+ */
16
+ @customElement(tagName)
17
+ export class SonicKeyboard extends LitElement {
18
+ static styles = css`
19
+ :host {
20
+ display: contents;
21
+ }
22
+ :host([scope="focus"]) {
23
+ display: block;
24
+ outline: none;
25
+ }
26
+ :host([scope="focus"]:focus) {
27
+ outline: 2px solid var(--sc-primary, #3b82f6);
28
+ outline-offset: 2px;
29
+ }
30
+ `;
31
+
32
+ @property({ type: String })
33
+ target = "";
34
+
35
+ @property({ type: Object })
36
+ keymap: Keymap = {};
37
+
38
+ /** `document` | `focus` */
39
+ @property({ type: String })
40
+ scope: "document" | "focus" = "document";
41
+
42
+ /** `{ "left": [delayMs, intervalMs] }` */
43
+ @property({ type: Object })
44
+ repeat: RepeatCfg = {};
45
+
46
+ @property({ type: Boolean })
47
+ keyup = false;
48
+
49
+ @property({ type: Boolean, attribute: "dispatch-event" })
50
+ dispatchEventFlag = false;
51
+
52
+ private held = new Map<string, HeldKey>();
53
+
54
+ connectedCallback(): void {
55
+ super.connectedCallback();
56
+ if (this.scope === "focus") {
57
+ if (!this.hasAttribute("tabindex")) this.tabIndex = 0;
58
+ }
59
+ this.bindTarget().addEventListener("keydown", this.onKeyDown);
60
+ this.bindTarget().addEventListener("keyup", this.onKeyUp);
61
+ window.addEventListener("blur", this.releaseAll);
62
+ document.addEventListener("visibilitychange", this.onVis);
63
+ }
64
+
65
+ disconnectedCallback(): void {
66
+ this.bindTarget().removeEventListener("keydown", this.onKeyDown);
67
+ this.bindTarget().removeEventListener("keyup", this.onKeyUp);
68
+ window.removeEventListener("blur", this.releaseAll);
69
+ document.removeEventListener("visibilitychange", this.onVis);
70
+ this.releaseAll();
71
+ super.disconnectedCallback();
72
+ }
73
+
74
+ protected updated(changed: Map<string | number | symbol, unknown>): void {
75
+ if (changed.has("scope")) {
76
+ // rebind would need disconnect/connect; keep simple: focus ring attrs
77
+ if (this.scope === "focus" && !this.hasAttribute("tabindex")) this.tabIndex = 0;
78
+ }
79
+ }
80
+
81
+ private bindTarget(): EventTarget {
82
+ return this.scope === "focus" ? this : window;
83
+ }
84
+
85
+ private onVis = () => {
86
+ if (document.hidden) this.releaseAll();
87
+ };
88
+
89
+ private onKeyDown = (ev: Event) => {
90
+ const e = ev as KeyboardEvent;
91
+ if (e.repeat) return; // handled via our DAS/ARR
92
+ if (this.isEditableTarget(e.target)) return;
93
+ const code = e.code || e.key;
94
+ const mapped = this.keymap?.[code] ?? this.keymap?.[e.key];
95
+ if (!mapped) return;
96
+ e.preventDefault();
97
+ const action = this.toAction(mapped);
98
+ this.emit(action);
99
+ const rep = this.repeat?.[action.type];
100
+ if (rep) {
101
+ const [delay, interval] = rep;
102
+ const entry: HeldKey = {
103
+ type: action.type,
104
+ payload: action.payload,
105
+ timer: window.setTimeout(() => {
106
+ this.emit({ type: action.type, payload: action.payload });
107
+ entry.interval = window.setInterval(() => {
108
+ this.emit({ type: action.type, payload: action.payload });
109
+ }, Math.max(16, interval));
110
+ }, Math.max(0, delay)),
111
+ };
112
+ this.held.set(code, entry);
113
+ } else {
114
+ this.held.set(code, { type: action.type, payload: action.payload });
115
+ }
116
+ };
117
+
118
+ private onKeyUp = (ev: Event) => {
119
+ const e = ev as KeyboardEvent;
120
+ const code = e.code || e.key;
121
+ const held = this.held.get(code);
122
+ if (held) {
123
+ if (held.timer) clearTimeout(held.timer);
124
+ if (held.interval) clearInterval(held.interval);
125
+ this.held.delete(code);
126
+ if (this.keyup) {
127
+ this.emit({ type: `${held.type}:up`, payload: held.payload });
128
+ }
129
+ }
130
+ };
131
+
132
+ private releaseAll = () => {
133
+ for (const [, held] of this.held) {
134
+ if (held.timer) clearTimeout(held.timer);
135
+ if (held.interval) clearInterval(held.interval);
136
+ }
137
+ this.held.clear();
138
+ };
139
+
140
+ private isEditableTarget(t: EventTarget | null): boolean {
141
+ if (!(t instanceof HTMLElement)) return false;
142
+ const tag = t.tagName;
143
+ if (tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT") return true;
144
+ if (t.isContentEditable) return true;
145
+ return Boolean(t.closest("input,textarea,select,[contenteditable=true]"));
146
+ }
147
+
148
+ private toAction(mapped: KeymapValue): SonicActionMessage {
149
+ if (typeof mapped === "string") return { type: mapped };
150
+ return { type: mapped.type, payload: mapped.payload };
151
+ }
152
+
153
+ private emit(action: SonicActionMessage): void {
154
+ if (this.target) dispatch(this.target, action);
155
+ if (this.dispatchEventFlag) {
156
+ this.dispatchEvent(
157
+ new CustomEvent("sonic-action", {
158
+ detail: action,
159
+ bubbles: true,
160
+ composed: true,
161
+ }),
162
+ );
163
+ }
164
+ }
165
+
166
+ render() {
167
+ return this.scope === "focus" ? html`<slot></slot>` : html``;
168
+ }
169
+ }
170
+
171
+ export default SonicKeyboard;
@@ -0,0 +1,185 @@
1
+ import { LitElement, css, html } from "lit";
2
+ import { customElement, property, query } from "lit/decorators.js";
3
+ import { Subscriber } from "@supersoniks/concorde/mixins";
4
+
5
+ const tagName = "sonic-matrix";
6
+
7
+ type Palette = Record<string, string>;
8
+
9
+ function pathGet(obj: unknown, path: string): unknown {
10
+ if (!path) return obj;
11
+ let cur: any = obj;
12
+ for (const p of path.split(".").filter(Boolean)) {
13
+ if (cur == null) return undefined;
14
+ cur = cur[p];
15
+ }
16
+ return cur;
17
+ }
18
+
19
+ /**
20
+ * Rendu canvas d’une grille 2D (number[][] ou flat + cols) depuis dataProvider.
21
+ */
22
+ @customElement(tagName)
23
+ export class SonicMatrix extends Subscriber(LitElement) {
24
+ static styles = css`
25
+ :host {
26
+ display: block;
27
+ width: 100%;
28
+ max-width: 100%;
29
+ line-height: 0;
30
+ }
31
+ canvas {
32
+ display: block;
33
+ width: 100%;
34
+ height: auto;
35
+ image-rendering: pixelated;
36
+ }
37
+ `;
38
+
39
+ /** Clé vers la matrice dans le DP. */
40
+ @property({ type: String })
41
+ key = "grid";
42
+
43
+ @property({ type: Number })
44
+ cols = 0;
45
+
46
+ @property({ type: Object })
47
+ palette: Palette = {
48
+ "0": "transparent",
49
+ "1": "#00f0f0",
50
+ "2": "#0000f0",
51
+ "3": "#f0a000",
52
+ "4": "#f0f000",
53
+ "5": "#00f000",
54
+ "6": "#a000f0",
55
+ "7": "#f00000",
56
+ };
57
+
58
+ /** Taille cellule px, ou `auto`. */
59
+ @property({ type: String })
60
+ cell = "24";
61
+
62
+ @property({ type: Number })
63
+ gap = 1;
64
+
65
+ @property({ type: Number })
66
+ radius = 2;
67
+
68
+ /** Clé couche fantôme optionnelle. */
69
+ @property({ type: String, attribute: "ghost-key" })
70
+ ghostKey = "";
71
+
72
+ @property({ type: String, attribute: "label-key" })
73
+ labelKey = "";
74
+
75
+ @query("canvas") private canvas!: HTMLCanvasElement;
76
+
77
+ private lastSig = "";
78
+
79
+ connectedCallback(): void {
80
+ super.connectedCallback();
81
+ this.setAttribute("role", "img");
82
+ }
83
+
84
+ protected updated(): void {
85
+ this.draw();
86
+ }
87
+
88
+ private readGrid(): number[][] {
89
+ const props = this.props as Record<string, unknown> | undefined;
90
+ const raw = props ? pathGet(props, this.key) : undefined;
91
+ if (Array.isArray(raw) && Array.isArray(raw[0])) {
92
+ return raw as number[][];
93
+ }
94
+ if (Array.isArray(raw) && this.cols > 0) {
95
+ const flat = raw as number[];
96
+ const out: number[][] = [];
97
+ for (let i = 0; i < flat.length; i += this.cols) {
98
+ out.push(flat.slice(i, i + this.cols).map((n) => Number(n) || 0));
99
+ }
100
+ return out;
101
+ }
102
+ return [];
103
+ }
104
+
105
+ private readGhost(): number[][] | null {
106
+ if (!this.ghostKey) return null;
107
+ const props = this.props as Record<string, unknown> | undefined;
108
+ const raw = props ? pathGet(props, this.ghostKey) : undefined;
109
+ if (Array.isArray(raw) && Array.isArray(raw[0])) return raw as number[][];
110
+ return null;
111
+ }
112
+
113
+ private colorFor(v: number, ghost = false): string {
114
+ const c = this.palette?.[String(v)] ?? this.palette?.[v] ?? "#888";
115
+ if (!ghost) return c;
116
+ if (c === "transparent") return c;
117
+ return c.startsWith("var(") ? c : `${c}66`;
118
+ }
119
+
120
+ private draw(): void {
121
+ const grid = this.readGrid();
122
+ const ghost = this.readGhost();
123
+ const h = grid.length;
124
+ const w = h ? grid[0].length : 0;
125
+ if (!w || !h || !this.canvas) return;
126
+
127
+ const sig = JSON.stringify({ grid, ghost, palette: this.palette, cell: this.cell, gap: this.gap });
128
+ if (sig === this.lastSig) return;
129
+ this.lastSig = sig;
130
+
131
+ const hostW = this.clientWidth || w * 24;
132
+ const cellPx =
133
+ this.cell === "auto" ? Math.max(1, Math.floor(hostW / w)) : Math.max(1, Number(this.cell) || 24);
134
+ const gap = Math.max(0, this.gap);
135
+ const dpr = Math.min(2, window.devicePixelRatio || 1);
136
+ const cssW = w * cellPx;
137
+ const cssH = h * cellPx;
138
+ this.canvas.width = Math.floor(cssW * dpr);
139
+ this.canvas.height = Math.floor(cssH * dpr);
140
+ this.canvas.style.width = `${cssW}px`;
141
+ this.canvas.style.height = `${cssH}px`;
142
+ const ctx = this.canvas.getContext("2d");
143
+ if (!ctx) return;
144
+ ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
145
+ ctx.clearRect(0, 0, cssW, cssH);
146
+
147
+ const paint = (mat: number[][], ghostLayer: boolean) => {
148
+ for (let y = 0; y < mat.length; y++) {
149
+ const row = mat[y];
150
+ for (let x = 0; x < row.length; x++) {
151
+ const v = Number(row[x]) || 0;
152
+ if (!v && !ghostLayer) continue;
153
+ if (!v) continue;
154
+ ctx.fillStyle = this.colorFor(v, ghostLayer);
155
+ const px = x * cellPx + gap;
156
+ const py = y * cellPx + gap;
157
+ const s = cellPx - gap * 2;
158
+ if (this.radius > 0) {
159
+ const r = Math.min(this.radius, s / 2);
160
+ ctx.beginPath();
161
+ ctx.roundRect(px, py, s, s, r);
162
+ ctx.fill();
163
+ } else {
164
+ ctx.fillRect(px, py, s, s);
165
+ }
166
+ }
167
+ }
168
+ };
169
+
170
+ if (ghost) paint(ghost, true);
171
+ paint(grid, false);
172
+
173
+ if (this.labelKey) {
174
+ const props = this.props as Record<string, unknown> | undefined;
175
+ const label = props ? pathGet(props, this.labelKey) : undefined;
176
+ if (label != null) this.setAttribute("aria-label", String(label));
177
+ }
178
+ }
179
+
180
+ render() {
181
+ return html`<canvas></canvas>`;
182
+ }
183
+ }
184
+
185
+ export default SonicMatrix;
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Registre global des sonic-store + dispatch typé.
3
+ * Utilisé par keyboard / gamepad / gesture / action / ticker.
4
+ */
5
+
6
+ export type SonicActionMessage = {
7
+ type: string;
8
+ payload?: unknown;
9
+ t?: number;
10
+ dt?: number;
11
+ };
12
+
13
+ export type StoreHandle = {
14
+ id: string;
15
+ dispatch: (action: SonicActionMessage) => void;
16
+ getState: () => unknown;
17
+ reset: () => void;
18
+ };
19
+
20
+ const stores = new Map<string, StoreHandle>();
21
+
22
+ export function registerStore(handle: StoreHandle): void {
23
+ stores.set(handle.id, handle);
24
+ }
25
+
26
+ export function unregisterStore(id: string): void {
27
+ stores.delete(id);
28
+ }
29
+
30
+ export function getStore(id: string): StoreHandle | undefined {
31
+ return stores.get(id);
32
+ }
33
+
34
+ /** Dispatch une action vers un store enregistré. No-op si absent. */
35
+ export function dispatch(storeId: string, action: SonicActionMessage): void {
36
+ const store = stores.get(storeId);
37
+ if (!store) return;
38
+ store.dispatch({
39
+ ...action,
40
+ t: action.t ?? performance.now(),
41
+ });
42
+ }
43
+
44
+ export function listStoreIds(): string[] {
45
+ return [...stores.keys()];
46
+ }
@@ -0,0 +1,264 @@
1
+ import { LitElement, css, html } from "lit";
2
+ import { customElement, property } from "lit/decorators.js";
3
+ import jsonata from "jsonata";
4
+ import { set } from "@supersoniks/concorde/core/utils/PublisherProxy";
5
+ import { registerInteractiveHelpers } from "./helpers";
6
+ import {
7
+ dispatch as registryDispatch,
8
+ registerStore,
9
+ unregisterStore,
10
+ type SonicActionMessage,
11
+ type StoreHandle,
12
+ } from "./registry";
13
+
14
+ const tagName = "sonic-store";
15
+
16
+ const DEFAULT_MAX_STATE_BYTES = 256 * 1024;
17
+ const DEFAULT_BUDGET_MS = 8;
18
+
19
+ type HistoryEntry = unknown;
20
+
21
+ /**
22
+ * Store déclaratif : state' = reducer($state, $action, $env) via JSONata.
23
+ * Opt-in : `@supersoniks/concorde/interactive`.
24
+ */
25
+ @customElement(tagName)
26
+ export class SonicStore extends LitElement {
27
+ static styles = css`
28
+ :host {
29
+ display: contents;
30
+ }
31
+ `;
32
+
33
+ /** Identifiant du store (obligatoire pour dispatch). */
34
+ @property({ type: String })
35
+ id = "";
36
+
37
+ /** DataProvider où publier l’état (défaut = id). */
38
+ @property({ type: String })
39
+ dataProvider = "";
40
+
41
+ /** État initial (JSON attribut / objet). */
42
+ @property({ type: Object })
43
+ initial: unknown = null;
44
+
45
+ /** Expression JSONata du reducer. */
46
+ @property({ type: String })
47
+ reducer = "";
48
+
49
+ @property({ type: Number, attribute: "max-state-bytes" })
50
+ maxStateBytes = DEFAULT_MAX_STATE_BYTES;
51
+
52
+ @property({ type: Number, attribute: "budget-ms" })
53
+ budgetMs = DEFAULT_BUDGET_MS;
54
+
55
+ /** Taille max de l’historique undo (0 = off). */
56
+ @property({ type: Number })
57
+ history = 0;
58
+
59
+ private state: unknown = null;
60
+ private queue: SonicActionMessage[] = [];
61
+ private draining = false;
62
+ private compiled: ReturnType<typeof jsonata> | null = null;
63
+ private historyStack: HistoryEntry[] = [];
64
+ private lastError: string | null = null;
65
+
66
+ connectedCallback(): void {
67
+ super.connectedCallback();
68
+ this.bootstrap();
69
+ }
70
+
71
+ disconnectedCallback(): void {
72
+ if (this.id) unregisterStore(this.id);
73
+ super.disconnectedCallback();
74
+ }
75
+
76
+ protected updated(changed: Map<string | number | symbol, unknown>): void {
77
+ if (
78
+ changed.has("id") ||
79
+ changed.has("reducer") ||
80
+ changed.has("initial") ||
81
+ changed.has("dataProvider")
82
+ ) {
83
+ const prevId = changed.get("id");
84
+ if (typeof prevId === "string" && prevId && prevId !== this.id) {
85
+ unregisterStore(prevId);
86
+ }
87
+ this.bootstrap();
88
+ }
89
+ }
90
+
91
+ private dpId(): string {
92
+ return (this.dataProvider || this.id || "").trim();
93
+ }
94
+
95
+ private bootstrap(): void {
96
+ if (!this.id) return;
97
+ this.compileReducer();
98
+ this.state = this.clone(this.initial);
99
+ this.historyStack = [];
100
+ this.lastError = null;
101
+ this.publish();
102
+ const handle: StoreHandle = {
103
+ id: this.id,
104
+ dispatch: (action) => this.enqueue(action),
105
+ getState: () => this.state,
106
+ reset: () => this.reset(),
107
+ };
108
+ registerStore(handle);
109
+ }
110
+
111
+ private compileReducer(): void {
112
+ this.compiled = null;
113
+ const src = (this.reducer || "").trim();
114
+ if (!src) return;
115
+ if (src.length > 32_768) {
116
+ this.fail("reducer trop long (max 32 Ko)");
117
+ return;
118
+ }
119
+ try {
120
+ const expr = jsonata(src);
121
+ registerInteractiveHelpers(expr);
122
+ // Désactiver impureté
123
+ expr.assign("random", () => {
124
+ throw new Error("$random interdit dans un reducer (utiliser $rand)");
125
+ });
126
+ expr.assign("now", () => {
127
+ throw new Error("$now interdit dans un reducer (utiliser $action.t)");
128
+ });
129
+ this.compiled = expr;
130
+ } catch (err) {
131
+ this.fail(err instanceof Error ? err.message : String(err));
132
+ }
133
+ }
134
+
135
+ private enqueue(action: SonicActionMessage): void {
136
+ if (action.type === "@reset") {
137
+ this.reset();
138
+ return;
139
+ }
140
+ if (action.type === "@undo") {
141
+ this.undo();
142
+ return;
143
+ }
144
+ this.queue.push(action);
145
+ void this.drain();
146
+ }
147
+
148
+ private async drain(): Promise<void> {
149
+ if (this.draining) return;
150
+ this.draining = true;
151
+ try {
152
+ while (this.queue.length) {
153
+ const action = this.queue.shift()!;
154
+ this.apply(action);
155
+ }
156
+ } finally {
157
+ this.draining = false;
158
+ }
159
+ }
160
+
161
+ private apply(action: SonicActionMessage): void {
162
+ if (!this.compiled) return;
163
+ const started = performance.now();
164
+ const env = {
165
+ width: typeof window !== "undefined" ? window.innerWidth : 0,
166
+ height: typeof window !== "undefined" ? window.innerHeight : 0,
167
+ now: action.t ?? started,
168
+ };
169
+ const bindings = {
170
+ state: this.state,
171
+ action: {
172
+ type: action.type,
173
+ payload: action.payload ?? null,
174
+ t: action.t ?? started,
175
+ dt: action.dt ?? null,
176
+ },
177
+ env,
178
+ };
179
+ try {
180
+ const expr = this.compiled;
181
+ // Bindings → $state, $action, $env (purs ; pas de $random / $now)
182
+ const result = expr.evaluate(this.state, {
183
+ state: this.state,
184
+ action: bindings.action,
185
+ env,
186
+ });
187
+ const elapsed = performance.now() - started;
188
+ if (elapsed > this.budgetMs) {
189
+ this.fail(`budget ${this.budgetMs}ms dépassé (${elapsed.toFixed(1)}ms)`);
190
+ return;
191
+ }
192
+ if (result === undefined) return;
193
+ const encoded = JSON.stringify(result);
194
+ if (encoded !== undefined && encoded.length > this.maxStateBytes) {
195
+ this.fail(`état trop gros (max ${this.maxStateBytes} octets)`);
196
+ return;
197
+ }
198
+ if (this.history > 0) {
199
+ this.historyStack.push(this.clone(this.state));
200
+ if (this.historyStack.length > this.history) this.historyStack.shift();
201
+ }
202
+ this.state = result;
203
+ this.lastError = null;
204
+ this.publish();
205
+ } catch (err) {
206
+ this.fail(err instanceof Error ? err.message : String(err));
207
+ }
208
+ }
209
+
210
+ private reset(): void {
211
+ this.state = this.clone(this.initial);
212
+ this.historyStack = [];
213
+ this.lastError = null;
214
+ this.publish();
215
+ }
216
+
217
+ private undo(): void {
218
+ if (!this.historyStack.length) return;
219
+ this.state = this.historyStack.pop();
220
+ this.publish();
221
+ }
222
+
223
+ private publish(): void {
224
+ const id = this.dpId();
225
+ if (!id) return;
226
+ const payload =
227
+ this.state && typeof this.state === "object"
228
+ ? { ...(this.state as object), lastError: this.lastError }
229
+ : { value: this.state, lastError: this.lastError };
230
+ set(id, payload as never);
231
+ }
232
+
233
+ private fail(message: string): void {
234
+ this.lastError = message;
235
+ this.dispatchEvent(
236
+ new CustomEvent("error", {
237
+ detail: { message },
238
+ bubbles: true,
239
+ composed: true,
240
+ }),
241
+ );
242
+ this.publish();
243
+ }
244
+
245
+ private clone(v: unknown): unknown {
246
+ if (v === null || typeof v !== "object") return v;
247
+ try {
248
+ return JSON.parse(JSON.stringify(v));
249
+ } catch {
250
+ return v;
251
+ }
252
+ }
253
+
254
+ /** API élément : dispatch manuel. */
255
+ dispatchAction(action: SonicActionMessage): void {
256
+ registryDispatch(this.id, action);
257
+ }
258
+
259
+ render() {
260
+ return html``;
261
+ }
262
+ }
263
+
264
+ export default SonicStore;