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

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 (340) 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 +182 -10
  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 +270 -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 +5 -1
  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/cdn-addons.md +1 -0
  323. package/src/docs/_getting-started/concorde-outside.md +3 -3
  324. package/src/docs/_misc/formelement-subscriber-removal.md +115 -0
  325. package/src/docs/_misc/html-integration.md +2 -0
  326. package/src/docs/code.ts +3 -1
  327. package/src/docs/components/docs-demo-sources.ts +60 -0
  328. package/src/docs/docs.ts +1 -0
  329. package/src/docs/example/docs-input-autocomplete-demos.ts +110 -0
  330. package/src/docs/mock-api/router.ts +17 -1
  331. package/src/docs/navigation/navigation.ts +8 -0
  332. package/src/docs/search/docs-search.json +956 -243
  333. package/src/docs/tailwind/css/tailwind.css +13 -6
  334. package/src/tsconfig.json +135 -6
  335. package/src/tsconfig.tsbuildinfo +1 -1
  336. package/tailwind.config.js +50 -3
  337. package/vite/config.js +23 -35
  338. package/vite.config.mts +5 -0
  339. package/vitest.setup.ts +49 -13
  340. 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 { get } from "@supersoniks/concorde/core/utils/PublisherProxy";
4
+ import { dispatch, type SonicActionMessage } from "./registry";
5
+
6
+ const tagName = "sonic-ticker";
7
+
8
+ /**
9
+ * Horloge déclarative : émet `tick` avec `dt` vers un store.
10
+ */
11
+ @customElement(tagName)
12
+ export class SonicTicker extends LitElement {
13
+ static styles = css`
14
+ :host {
15
+ display: contents;
16
+ }
17
+ `;
18
+
19
+ @property({ type: String })
20
+ target = "";
21
+
22
+ @property({ type: Number })
23
+ interval = 500;
24
+
25
+ /** Chemin dans le DP du store pour l’intervalle (ex. `speed`). */
26
+ @property({ type: String, attribute: "interval-key" })
27
+ intervalKey = "";
28
+
29
+ /** Chemin booléen pause (ex. `running`). */
30
+ @property({ type: String, attribute: "running-key" })
31
+ runningKey = "";
32
+
33
+ /** `interval` | `raf` */
34
+ @property({ type: String })
35
+ mode: "interval" | "raf" = "interval";
36
+
37
+ @property({ type: Boolean, attribute: "dispatch-event" })
38
+ dispatchEventFlag = false;
39
+
40
+ private timer: number | null = null;
41
+ private raf = 0;
42
+ private last = 0;
43
+ private acc = 0;
44
+
45
+ connectedCallback(): void {
46
+ super.connectedCallback();
47
+ document.addEventListener("visibilitychange", this.onVis);
48
+ this.restart();
49
+ }
50
+
51
+ disconnectedCallback(): void {
52
+ document.removeEventListener("visibilitychange", this.onVis);
53
+ this.stop();
54
+ super.disconnectedCallback();
55
+ }
56
+
57
+ protected updated(changed: Map<string | number | symbol, unknown>): void {
58
+ if (
59
+ changed.has("interval") ||
60
+ changed.has("mode") ||
61
+ changed.has("target") ||
62
+ changed.has("intervalKey") ||
63
+ changed.has("runningKey")
64
+ ) {
65
+ this.restart();
66
+ }
67
+ }
68
+
69
+ private onVis = () => {
70
+ if (document.hidden) this.stop();
71
+ else this.restart();
72
+ };
73
+
74
+ private stop(): void {
75
+ if (this.timer != null) {
76
+ clearInterval(this.timer);
77
+ this.timer = null;
78
+ }
79
+ if (this.raf) {
80
+ cancelAnimationFrame(this.raf);
81
+ this.raf = 0;
82
+ }
83
+ this.acc = 0;
84
+ }
85
+
86
+ private restart(): void {
87
+ this.stop();
88
+ if (!this.target || document.hidden) return;
89
+ this.last = performance.now();
90
+ if (this.mode === "raf") {
91
+ const loop = (now: number) => {
92
+ this.raf = requestAnimationFrame(loop);
93
+ if (!this.isRunning()) {
94
+ this.last = now;
95
+ return;
96
+ }
97
+ const raw = Math.min(100, now - this.last);
98
+ this.last = now;
99
+ this.acc += raw;
100
+ const ms = this.currentInterval();
101
+ while (this.acc >= ms) {
102
+ this.acc -= ms;
103
+ this.emit(ms);
104
+ }
105
+ };
106
+ this.raf = requestAnimationFrame(loop);
107
+ return;
108
+ }
109
+ this.timer = window.setInterval(() => {
110
+ if (!this.isRunning()) return;
111
+ const now = performance.now();
112
+ const dt = Math.min(1000, now - this.last);
113
+ this.last = now;
114
+ this.emit(dt);
115
+ }, this.currentInterval());
116
+ }
117
+
118
+ private currentInterval(): number {
119
+ let ms = this.interval;
120
+ if (this.intervalKey && this.target) {
121
+ try {
122
+ const state = get(this.target) as Record<string, unknown> | undefined;
123
+ const v = this.path(state, this.intervalKey);
124
+ if (typeof v === "number" && Number.isFinite(v)) ms = v;
125
+ } catch {
126
+ /* keep */
127
+ }
128
+ }
129
+ return Math.max(16, ms);
130
+ }
131
+
132
+ private isRunning(): boolean {
133
+ if (!this.runningKey || !this.target) return true;
134
+ try {
135
+ const state = get(this.target) as Record<string, unknown> | undefined;
136
+ return Boolean(this.path(state, this.runningKey));
137
+ } catch {
138
+ return true;
139
+ }
140
+ }
141
+
142
+ private path(obj: unknown, path: string): unknown {
143
+ if (!obj || typeof obj !== "object") return undefined;
144
+ let cur: any = obj;
145
+ for (const p of path.split(".").filter(Boolean)) {
146
+ if (cur == null) return undefined;
147
+ cur = cur[p];
148
+ }
149
+ return cur;
150
+ }
151
+
152
+ private emit(dt: number): void {
153
+ const action: SonicActionMessage = { type: "tick", payload: { dt }, dt };
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 html``;
168
+ }
169
+ }
170
+
171
+ export default SonicTicker;
File without changes
@@ -1,18 +1,58 @@
1
1
  import {LitElement, html} from "lit";
2
- import {customElement} from "lit/decorators.js";
2
+ import {customElement, property} from "lit/decorators.js";
3
3
  import {Subscriber} from "@supersoniks/concorde/mixins";
4
4
  import {unsafeHTML} from "lit/directives/unsafe-html.js";
5
- const tagName = "sonic-value"; // For Astro.build
5
+
6
+ const tagName = "sonic-value";
7
+
8
+ /**
9
+ * Affiche une valeur du DataProvider (`key`).
10
+ * `format="00000"` pad numérique, ou `format="intl:fr-FR"` / `format="intl:fr-FR:currency:EUR"`.
11
+ */
6
12
  @customElement(tagName)
7
13
  export class SonicValue extends Subscriber(LitElement) {
14
+ @property({type: String}) format = "";
15
+
8
16
  connectedCallback(): void {
9
17
  this.setAttribute("subDataProvider", this.getAttribute("key"));
10
18
  super.connectedCallback();
11
19
  }
20
+
21
+ private formatted(): string {
22
+ const raw = this.props;
23
+ if (typeof raw === "object" || raw === undefined) return "";
24
+ const s = String(raw);
25
+ if (!this.format) return s;
26
+ if (this.format.startsWith("intl:")) {
27
+ const parts = this.format.slice(5).split(":");
28
+ const locale = parts[0] || "fr-FR";
29
+ const style = parts[1];
30
+ const currency = parts[2] || "EUR";
31
+ const n = Number(raw);
32
+ if (!Number.isFinite(n)) return s;
33
+ if (style === "currency") {
34
+ return new Intl.NumberFormat(locale, {style: "currency", currency}).format(n);
35
+ }
36
+ if (style === "percent") {
37
+ return new Intl.NumberFormat(locale, {style: "percent"}).format(n);
38
+ }
39
+ return new Intl.NumberFormat(locale).format(n);
40
+ }
41
+ // pad pattern like 00000
42
+ if (/^0+$/.test(this.format)) {
43
+ const n = Math.floor(Number(raw));
44
+ if (!Number.isFinite(n)) return s;
45
+ return String(n).padStart(this.format.length, "0");
46
+ }
47
+ return s;
48
+ }
49
+
12
50
  render() {
13
- if (typeof this.props === "object" || this.props === undefined)
51
+ if (typeof this.props === "object" || this.props === undefined) {
14
52
  return html`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`;
15
- return html`${unsafeHTML(this.props.toString())}<slot name="prefix"></slot><slot></slot
53
+ }
54
+ const text = this.format ? this.formatted() : this.props.toString();
55
+ return html`${unsafeHTML(text)}<slot name="prefix"></slot><slot></slot
16
56
  ><slot name="suffix"></slot>`;
17
57
  }
18
58
  }
@@ -0,0 +1,36 @@
1
+ import { css } from "lit";
2
+
3
+ export type Rounded = "" | "base" | "none" | "full" | "sm" | "md" | "lg" | "xl";
4
+
5
+ export const hostRounded = css`
6
+ :host {
7
+ --sc-_rounded: 0;
8
+ border-radius: var(--sc-_rounded);
9
+ }
10
+ :host([rounded]),
11
+ :host([rounded="base"]) {
12
+ --sc-_rounded: var(--sc-rounded);
13
+ overflow: hidden;
14
+ }
15
+ :host([rounded="sm"]) {
16
+ --sc-_rounded: var(--sc-rounded-sm);
17
+ }
18
+
19
+ :host([rounded="md"]) {
20
+ --sc-_rounded: var(--sc-rounded-md);
21
+ }
22
+
23
+ :host([rounded="lg"]) {
24
+ --sc-_rounded: var(--sc-rounded-lg);
25
+ }
26
+ :host([rounded="xl"]) {
27
+ --sc-_rounded: var(--sc-rounded-xl);
28
+ }
29
+
30
+ :host([rounded="full"]) {
31
+ --sc-_rounded: 50% !important;
32
+ }
33
+ :host([rounded="none"]) {
34
+ --sc-_rounded: 0 !important;
35
+ }
36
+ `;
@@ -1,5 +1,54 @@
1
1
  import { css } from "lit";
2
2
 
3
+ /** Icônes pour les composants à `status` (API messages, alert, toast). */
4
+ export const statusIcon = {
5
+ default: "info-empty",
6
+ info: "info-empty",
7
+ success: "check-circled-outline",
8
+ warning: "warning-circled-outline",
9
+ error: "warning-circled-outline",
10
+ };
11
+
12
+ export type StatusIconKey = keyof typeof statusIcon;
13
+
14
+ export function toStatus(value?: string): StatusIconKey | undefined {
15
+ if (!value) return undefined;
16
+ if (value === "danger") return "error";
17
+ return value in statusIcon ? (value as StatusIconKey) : undefined;
18
+ }
19
+
20
+ export function statusAriaRole(status?: StatusIconKey): "alert" | "status" {
21
+ return status === "error" ? "alert" : "status";
22
+ }
23
+
24
+ export function statusAriaLive(status?: StatusIconKey): "polite" | null {
25
+ return status === "error" ? null : "polite";
26
+ }
27
+
28
+ export const statusColor = css`
29
+ :host {
30
+ --sc-_color: var(--sc-base-content, #000);
31
+ color: var(--sc-_color);
32
+ }
33
+
34
+ :host([status="warning"]) {
35
+ --sc-_color: var(--sc-warning, var(--sc-base-content, #000));
36
+ }
37
+ :host([status="error"]) {
38
+ --sc-_color: var(--sc-danger, var(--sc-base-content, #000));
39
+ }
40
+ :host([status="info"]) {
41
+ --sc-_color: var(--sc-info, var(--sc-base-content, #000));
42
+ }
43
+ :host([status="success"]) {
44
+ --sc-_color: var(--sc-success, var(--sc-base-content, #000));
45
+ }
46
+
47
+ .inherit-color {
48
+ color: var(--sc-_color);
49
+ }
50
+ `;
51
+
3
52
  export const typeColor = css`
4
53
  :host {
5
54
  --sc-_color: inherit;
@@ -0,0 +1,104 @@
1
+ import HTML from "@supersoniks/concorde/core/utils/HTML";
2
+
3
+ /** Langues supportées pour les libellés ARIA UI (anglais par défaut). */
4
+ export type UiLang = "en" | "fr" | "de" | "nl" | "es" | "it";
5
+
6
+ export type UiLabelDict = Partial<Record<UiLang, string>> & { en: string };
7
+
8
+ const supported = new Set<string>(["en", "fr", "de", "nl", "es", "it"]);
9
+
10
+ /** Lit la langue courante à chaque appel (pas d'état par composant). */
11
+ export function resolveUiLabel(dict: UiLabelDict, lang?: string): string {
12
+ const code = (lang ?? HTML.getLanguage() ?? "en").split("-")[0].toLowerCase();
13
+ if (supported.has(code) && dict[code as UiLang]) {
14
+ return dict[code as UiLang]!;
15
+ }
16
+ return dict.en;
17
+ }
18
+
19
+ export const uiAriaLabels = {
20
+ closeWindow: {
21
+ en: "Close window",
22
+ fr: "Fermer la fenêtre",
23
+ de: "Fenster schließen",
24
+ nl: "Venster sluiten",
25
+ es: "Cerrar ventana",
26
+ it: "Chiudi finestra",
27
+ },
28
+ closeAlert: {
29
+ en: "Close",
30
+ fr: "Fermer",
31
+ de: "Schließen",
32
+ nl: "Sluiten",
33
+ es: "Cerrar",
34
+ it: "Chiudi",
35
+ },
36
+ showPassword: {
37
+ en: "Show password",
38
+ fr: "Afficher le mot de passe",
39
+ de: "Passwort anzeigen",
40
+ nl: "Wachtwoord tonen",
41
+ es: "Mostrar contraseña",
42
+ it: "Mostra password",
43
+ },
44
+ hidePassword: {
45
+ en: "Hide password",
46
+ fr: "Masquer le mot de passe",
47
+ de: "Passwort ausblenden",
48
+ nl: "Wachtwoord verbergen",
49
+ es: "Ocultar contraseña",
50
+ it: "Nascondi password",
51
+ },
52
+ closeToast: {
53
+ en: "Close notification",
54
+ fr: "Fermer la notification",
55
+ de: "Benachrichtigung schließen",
56
+ nl: "Melding sluiten",
57
+ es: "Cerrar notificación",
58
+ it: "Chiudi notifica",
59
+ },
60
+ closeToastError: {
61
+ en: "Close error message",
62
+ fr: "Fermer le message d'erreur",
63
+ de: "Fehlermeldung schließen",
64
+ nl: "Foutmelding sluiten",
65
+ es: "Cerrar mensaje de error",
66
+ it: "Chiudi messaggio di errore",
67
+ },
68
+ closeToastWarning: {
69
+ en: "Close warning",
70
+ fr: "Fermer l'avertissement",
71
+ de: "Warnung schließen",
72
+ nl: "Waarschuwing sluiten",
73
+ es: "Cerrar advertencia",
74
+ it: "Chiudi avviso",
75
+ },
76
+ closeToastSuccess: {
77
+ en: "Close success message",
78
+ fr: "Fermer le message de succès",
79
+ de: "Erfolgsmeldung schließen",
80
+ nl: "Succesmelding sluiten",
81
+ es: "Cerrar mensaje de éxito",
82
+ it: "Chiudi messaggio di successo",
83
+ },
84
+ closeToastInfo: {
85
+ en: "Close information message",
86
+ fr: "Fermer l'information",
87
+ de: "Information schließen",
88
+ nl: "Informatie sluiten",
89
+ es: "Cerrar información",
90
+ it: "Chiudi informazione",
91
+ },
92
+ } as const satisfies Record<string, UiLabelDict>;
93
+
94
+ const toastCloseByStatus: Record<string, UiLabelDict> = {
95
+ error: uiAriaLabels.closeToastError,
96
+ warning: uiAriaLabels.closeToastWarning,
97
+ success: uiAriaLabels.closeToastSuccess,
98
+ info: uiAriaLabels.closeToastInfo,
99
+ };
100
+
101
+ export function resolveToastCloseLabel(status?: string): string {
102
+ const dict = status ? toastCloseByStatus[status] : undefined;
103
+ return resolveUiLabel(dict ?? uiAriaLabels.closeToast);
104
+ }