@supersoniks/concorde 4.9.98-visual-stack.0 → 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 (476) hide show
  1. package/.gitlab-ci.yml +0 -13
  2. package/build-infos.json +1 -1
  3. package/concorde-3d.bundle.js +201 -152
  4. package/concorde-3d.es.js +14688 -13906
  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 +31 -20
  12. package/concorde-shader.es.js +2773 -2547
  13. package/concorde-webgpu.bundle.js +43 -32
  14. package/concorde-webgpu.es.js +1819 -1553
  15. package/dist/concorde-3d.bundle.js +201 -152
  16. package/dist/concorde-3d.es.js +14688 -13906
  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 +31 -20
  24. package/dist/concorde-shader.es.js +2773 -2547
  25. package/dist/concorde-webgpu.bundle.js +43 -32
  26. package/dist/concorde-webgpu.es.js +1819 -1553
  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/3d/3d.js +90 -2
  32. package/dist/js/core/components/functional/3d/3d.js.map +1 -1
  33. package/dist/js/core/components/functional/3d/constants.js +1 -0
  34. package/dist/js/core/components/functional/3d/constants.js.map +1 -1
  35. package/dist/js/core/components/functional/3d/ensure.js +6 -3
  36. package/dist/js/core/components/functional/3d/ensure.js.map +1 -1
  37. package/dist/js/core/components/functional/3d/form-params.js +2 -0
  38. package/dist/js/core/components/functional/3d/form-params.js.map +1 -1
  39. package/dist/js/core/components/functional/3d/life.js +2 -1
  40. package/dist/js/core/components/functional/3d/life.js.map +1 -1
  41. package/dist/js/core/components/functional/3d/out-publish.js +3 -2
  42. package/dist/js/core/components/functional/3d/out-publish.js.map +1 -1
  43. package/dist/js/core/components/functional/3d/playback.js +6 -1
  44. package/dist/js/core/components/functional/3d/playback.js.map +1 -1
  45. package/dist/js/core/components/functional/3d/post-bind.js +207 -0
  46. package/dist/js/core/components/functional/3d/post-bind.js.map +1 -0
  47. package/dist/js/core/components/functional/3d/post-channels.js +39 -0
  48. package/dist/js/core/components/functional/3d/post-channels.js.map +1 -0
  49. package/dist/js/core/components/functional/3d/post-fx.js +495 -0
  50. package/dist/js/core/components/functional/3d/post-fx.js.map +1 -0
  51. package/dist/js/core/components/functional/3d/props.js +142 -0
  52. package/dist/js/core/components/functional/3d/props.js.map +1 -1
  53. package/dist/js/core/components/functional/3d/reload.js +2 -0
  54. package/dist/js/core/components/functional/3d/reload.js.map +1 -1
  55. package/dist/js/core/components/functional/3d/runtime.js +80 -3
  56. package/dist/js/core/components/functional/3d/runtime.js.map +1 -1
  57. package/dist/js/core/components/functional/3d/scene-runtime.js +1 -1
  58. package/dist/js/core/components/functional/3d/scene-runtime.js.map +1 -1
  59. package/dist/js/core/components/functional/3d/tune.js +21 -0
  60. package/dist/js/core/components/functional/3d/tune.js.map +1 -1
  61. package/dist/js/core/components/functional/3d/updated.js +13 -1
  62. package/dist/js/core/components/functional/3d/updated.js.map +1 -1
  63. package/dist/js/core/components/functional/if/if.js +65 -7
  64. package/dist/js/core/components/functional/if/if.js.map +1 -1
  65. package/dist/js/core/components/functional/interactive/action.js +96 -0
  66. package/dist/js/core/components/functional/interactive/action.js.map +1 -0
  67. package/dist/js/core/components/functional/interactive/gamepad.js +206 -0
  68. package/dist/js/core/components/functional/interactive/gamepad.js.map +1 -0
  69. package/dist/js/core/components/functional/interactive/gesture.js +148 -0
  70. package/dist/js/core/components/functional/interactive/gesture.js.map +1 -0
  71. package/dist/js/core/components/functional/interactive/helpers.js +82 -0
  72. package/dist/js/core/components/functional/interactive/helpers.js.map +1 -0
  73. package/dist/js/core/components/functional/interactive/index.js +20 -0
  74. package/dist/js/core/components/functional/interactive/index.js.map +1 -0
  75. package/dist/js/core/components/functional/interactive/keyboard.js +183 -0
  76. package/dist/js/core/components/functional/interactive/keyboard.js.map +1 -0
  77. package/dist/js/core/components/functional/interactive/matrix.js +201 -0
  78. package/dist/js/core/components/functional/interactive/matrix.js.map +1 -0
  79. package/dist/js/core/components/functional/interactive/registry.js +28 -0
  80. package/dist/js/core/components/functional/interactive/registry.js.map +1 -0
  81. package/dist/js/core/components/functional/interactive/store.js +264 -0
  82. package/dist/js/core/components/functional/interactive/store.js.map +1 -0
  83. package/dist/js/core/components/functional/interactive/ticker.js +182 -0
  84. package/dist/js/core/components/functional/interactive/ticker.js.map +1 -0
  85. package/dist/js/core/components/functional/shader/gl-runtime.js +128 -14
  86. package/dist/js/core/components/functional/shader/gl-runtime.js.map +1 -1
  87. package/dist/js/core/components/functional/shader/shader.js +154 -57
  88. package/dist/js/core/components/functional/shader/shader.js.map +1 -1
  89. package/dist/js/core/components/functional/shader/shadertoy-prelude.js +39 -5
  90. package/dist/js/core/components/functional/shader/shadertoy-prelude.js.map +1 -1
  91. package/dist/js/core/components/functional/shader/types.js +58 -7
  92. package/dist/js/core/components/functional/shader/types.js.map +1 -1
  93. package/dist/js/core/components/functional/value/value.js +49 -4
  94. package/dist/js/core/components/functional/value/value.js.map +1 -1
  95. package/dist/js/core/components/functional/webgpu/gl-fallback.js +27 -6
  96. package/dist/js/core/components/functional/webgpu/gl-fallback.js.map +1 -1
  97. package/dist/js/core/components/functional/webgpu/gpu-runtime.js +115 -13
  98. package/dist/js/core/components/functional/webgpu/gpu-runtime.js.map +1 -1
  99. package/dist/js/core/components/functional/webgpu/helpers.js +8 -2
  100. package/dist/js/core/components/functional/webgpu/helpers.js.map +1 -1
  101. package/dist/js/core/components/functional/webgpu/webgpu.js +34 -1
  102. package/dist/js/core/components/functional/webgpu/webgpu.js.map +1 -1
  103. package/dist/js/core/components/ui/_css/rounded.js +34 -0
  104. package/dist/js/core/components/ui/_css/rounded.js.map +1 -0
  105. package/dist/js/core/components/ui/_css/type.js +44 -0
  106. package/dist/js/core/components/ui/_css/type.js.map +1 -1
  107. package/dist/js/core/components/ui/_i18n/ui-aria-labels.js +95 -0
  108. package/dist/js/core/components/ui/_i18n/ui-aria-labels.js.map +1 -0
  109. package/dist/js/core/components/ui/alert/alert.js +72 -87
  110. package/dist/js/core/components/ui/alert/alert.js.map +1 -1
  111. package/dist/js/core/components/ui/alert-messages/alert-messages.js +1 -0
  112. package/dist/js/core/components/ui/alert-messages/alert-messages.js.map +1 -1
  113. package/dist/js/core/components/ui/badge/badge.js +29 -80
  114. package/dist/js/core/components/ui/badge/badge.js.map +1 -1
  115. package/dist/js/core/components/ui/button/button.js +8 -7
  116. package/dist/js/core/components/ui/button/button.js.map +1 -1
  117. package/dist/js/core/components/ui/card/card-header.js +7 -2
  118. package/dist/js/core/components/ui/card/card-header.js.map +1 -1
  119. package/dist/js/core/components/ui/divider/divider.js +1 -1
  120. package/dist/js/core/components/ui/divider/divider.js.map +1 -1
  121. package/dist/js/core/components/ui/form/checkbox/checkbox.js +4 -20
  122. package/dist/js/core/components/ui/form/checkbox/checkbox.js.map +1 -1
  123. package/dist/js/core/components/ui/form/fieldset/legend-description.js +1 -1
  124. package/dist/js/core/components/ui/form/fieldset/legend.js +1 -1
  125. package/dist/js/core/components/ui/form/input/input.js +12 -15
  126. package/dist/js/core/components/ui/form/input/input.js.map +1 -1
  127. package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js +363 -158
  128. package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js.map +1 -1
  129. package/dist/js/core/components/ui/form/radio/radio.js +1 -1
  130. package/dist/js/core/components/ui/form/select/select.js +3 -6
  131. package/dist/js/core/components/ui/form/select/select.js.map +1 -1
  132. package/dist/js/core/components/ui/form/textarea/textarea.js +1 -2
  133. package/dist/js/core/components/ui/form/textarea/textarea.js.map +1 -1
  134. package/dist/js/core/components/ui/image/image.js +9 -37
  135. package/dist/js/core/components/ui/image/image.js.map +1 -1
  136. package/dist/js/core/components/ui/link/link.js +25 -26
  137. package/dist/js/core/components/ui/link/link.js.map +1 -1
  138. package/dist/js/core/components/ui/modal/modal-close.js +3 -12
  139. package/dist/js/core/components/ui/modal/modal-close.js.map +1 -1
  140. package/dist/js/core/components/ui/modal/modal.js +18 -18
  141. package/dist/js/core/components/ui/modal/modal.js.map +1 -1
  142. package/dist/js/core/components/ui/pop/pop.js +131 -112
  143. package/dist/js/core/components/ui/pop/pop.js.map +1 -1
  144. package/dist/js/core/components/ui/table/table.js.map +1 -1
  145. package/dist/js/core/components/ui/theme/theme.js +1 -1
  146. package/dist/js/core/components/ui/toast/dismissed.js +9 -0
  147. package/dist/js/core/components/ui/toast/dismissed.js.map +1 -0
  148. package/dist/js/core/components/ui/toast/render-content.js +14 -0
  149. package/dist/js/core/components/ui/toast/render-content.js.map +1 -0
  150. package/dist/js/core/components/ui/toast/toast-item.js +150 -96
  151. package/dist/js/core/components/ui/toast/toast-item.js.map +1 -1
  152. package/dist/js/core/components/ui/toast/toast.js +41 -13
  153. package/dist/js/core/components/ui/toast/toast.js.map +1 -1
  154. package/dist/js/core/components/ui/tooltip/tooltip.js +144 -143
  155. package/dist/js/core/components/ui/tooltip/tooltip.js.map +1 -1
  156. package/dist/js/core/decorators/subscriber/ancestorAttribute.js.map +1 -1
  157. package/dist/js/core/decorators/subscriber/derive.js +3 -1
  158. package/dist/js/core/decorators/subscriber/derive.js.map +1 -1
  159. package/dist/js/core/mixins/Fetcher.js.map +1 -1
  160. package/dist/js/core/mixins/FormCheckable.js +1 -8
  161. package/dist/js/core/mixins/FormCheckable.js.map +1 -1
  162. package/dist/js/core/mixins/FormElement.js +26 -53
  163. package/dist/js/core/mixins/FormElement.js.map +1 -1
  164. package/dist/js/core/utils/AncestorAttributeObserver.js +130 -55
  165. package/dist/js/core/utils/AncestorAttributeObserver.js.map +1 -1
  166. package/dist/js/core/utils/LocationHandler.js +1 -1
  167. package/dist/js/core/utils/LocationHandler.js.map +1 -1
  168. package/dist/js/core/utils/dismissed.js +23 -0
  169. package/dist/js/core/utils/dismissed.js.map +1 -0
  170. package/dist/js/core/utils/mediaRef.js +37 -0
  171. package/dist/js/core/utils/mediaRef.js.map +1 -1
  172. package/dist/js/core/utils/positioning.js +110 -0
  173. package/dist/js/core/utils/positioning.js.map +1 -0
  174. package/dist/js/directives.js +1 -2
  175. package/dist/js/directives.js.map +1 -1
  176. package/dist/types/addons/interactive.d.ts +6 -0
  177. package/dist/types/addons/interactive.d.ts.map +1 -0
  178. package/dist/types/core/components/functional/3d/3d.d.ts +26 -3
  179. package/dist/types/core/components/functional/3d/3d.d.ts.map +1 -1
  180. package/dist/types/core/components/functional/3d/constants.d.ts +1 -1
  181. package/dist/types/core/components/functional/3d/constants.d.ts.map +1 -1
  182. package/dist/types/core/components/functional/3d/ensure.d.ts +3 -0
  183. package/dist/types/core/components/functional/3d/ensure.d.ts.map +1 -1
  184. package/dist/types/core/components/functional/3d/form-params.d.ts.map +1 -1
  185. package/dist/types/core/components/functional/3d/life.d.ts +2 -0
  186. package/dist/types/core/components/functional/3d/life.d.ts.map +1 -1
  187. package/dist/types/core/components/functional/3d/out-publish.d.ts +1 -0
  188. package/dist/types/core/components/functional/3d/out-publish.d.ts.map +1 -1
  189. package/dist/types/core/components/functional/3d/playback.d.ts +9 -0
  190. package/dist/types/core/components/functional/3d/playback.d.ts.map +1 -1
  191. package/dist/types/core/components/functional/3d/post-bind.d.ts +52 -0
  192. package/dist/types/core/components/functional/3d/post-bind.d.ts.map +1 -0
  193. package/dist/types/core/components/functional/3d/post-channels.d.ts +40 -0
  194. package/dist/types/core/components/functional/3d/post-channels.d.ts.map +1 -0
  195. package/dist/types/core/components/functional/3d/post-fx.d.ts +73 -0
  196. package/dist/types/core/components/functional/3d/post-fx.d.ts.map +1 -0
  197. package/dist/types/core/components/functional/3d/props.d.ts +42 -0
  198. package/dist/types/core/components/functional/3d/props.d.ts.map +1 -1
  199. package/dist/types/core/components/functional/3d/reload.d.ts.map +1 -1
  200. package/dist/types/core/components/functional/3d/runtime.d.ts +16 -1
  201. package/dist/types/core/components/functional/3d/runtime.d.ts.map +1 -1
  202. package/dist/types/core/components/functional/3d/scene-runtime.d.ts +1 -1
  203. package/dist/types/core/components/functional/3d/scene-runtime.d.ts.map +1 -1
  204. package/dist/types/core/components/functional/3d/tune.d.ts +5 -0
  205. package/dist/types/core/components/functional/3d/tune.d.ts.map +1 -1
  206. package/dist/types/core/components/functional/3d/types.d.ts +9 -0
  207. package/dist/types/core/components/functional/3d/types.d.ts.map +1 -1
  208. package/dist/types/core/components/functional/3d/updated.d.ts.map +1 -1
  209. package/dist/types/core/components/functional/if/if.d.ts +14 -5
  210. package/dist/types/core/components/functional/if/if.d.ts.map +1 -1
  211. package/dist/types/core/components/functional/interactive/action.d.ts +22 -0
  212. package/dist/types/core/components/functional/interactive/action.d.ts.map +1 -0
  213. package/dist/types/core/components/functional/interactive/gamepad.d.ts +37 -0
  214. package/dist/types/core/components/functional/interactive/gamepad.d.ts.map +1 -0
  215. package/dist/types/core/components/functional/interactive/gesture.d.ts +26 -0
  216. package/dist/types/core/components/functional/interactive/gesture.d.ts.map +1 -0
  217. package/dist/types/core/components/functional/interactive/helpers.d.ts +23 -0
  218. package/dist/types/core/components/functional/interactive/helpers.d.ts.map +1 -0
  219. package/dist/types/core/components/functional/interactive/index.d.ts +20 -0
  220. package/dist/types/core/components/functional/interactive/index.d.ts.map +1 -0
  221. package/dist/types/core/components/functional/interactive/keyboard.d.ts +37 -0
  222. package/dist/types/core/components/functional/interactive/keyboard.d.ts.map +1 -0
  223. package/dist/types/core/components/functional/interactive/matrix.d.ts +31 -0
  224. package/dist/types/core/components/functional/interactive/matrix.d.ts.map +1 -0
  225. package/dist/types/core/components/functional/interactive/registry.d.ts +23 -0
  226. package/dist/types/core/components/functional/interactive/registry.d.ts.map +1 -0
  227. package/dist/types/core/components/functional/interactive/store.d.ts +46 -0
  228. package/dist/types/core/components/functional/interactive/store.d.ts.map +1 -0
  229. package/dist/types/core/components/functional/interactive/ticker.d.ts +33 -0
  230. package/dist/types/core/components/functional/interactive/ticker.d.ts.map +1 -0
  231. package/dist/types/core/components/functional/shader/gl-runtime.d.ts +33 -1
  232. package/dist/types/core/components/functional/shader/gl-runtime.d.ts.map +1 -1
  233. package/dist/types/core/components/functional/shader/shader.d.ts +28 -7
  234. package/dist/types/core/components/functional/shader/shader.d.ts.map +1 -1
  235. package/dist/types/core/components/functional/shader/shadertoy-prelude.d.ts +16 -2
  236. package/dist/types/core/components/functional/shader/shadertoy-prelude.d.ts.map +1 -1
  237. package/dist/types/core/components/functional/shader/types.d.ts +29 -5
  238. package/dist/types/core/components/functional/shader/types.d.ts.map +1 -1
  239. package/dist/types/core/components/functional/value/value.d.ts +6 -0
  240. package/dist/types/core/components/functional/value/value.d.ts.map +1 -1
  241. package/dist/types/core/components/functional/webgpu/gl-fallback.d.ts +4 -0
  242. package/dist/types/core/components/functional/webgpu/gl-fallback.d.ts.map +1 -1
  243. package/dist/types/core/components/functional/webgpu/gpu-runtime.d.ts +14 -0
  244. package/dist/types/core/components/functional/webgpu/gpu-runtime.d.ts.map +1 -1
  245. package/dist/types/core/components/functional/webgpu/helpers.d.ts +1 -0
  246. package/dist/types/core/components/functional/webgpu/helpers.d.ts.map +1 -1
  247. package/dist/types/core/components/functional/webgpu/webgpu.d.ts +7 -1
  248. package/dist/types/core/components/functional/webgpu/webgpu.d.ts.map +1 -1
  249. package/dist/types/core/components/ui/_css/rounded.d.ts +3 -0
  250. package/dist/types/core/components/ui/_css/rounded.d.ts.map +1 -0
  251. package/dist/types/core/components/ui/_css/type.d.ts +13 -0
  252. package/dist/types/core/components/ui/_css/type.d.ts.map +1 -1
  253. package/dist/types/core/components/ui/_i18n/ui-aria-labels.d.ts +83 -0
  254. package/dist/types/core/components/ui/_i18n/ui-aria-labels.d.ts.map +1 -0
  255. package/dist/types/core/components/ui/alert/alert.d.ts +14 -12
  256. package/dist/types/core/components/ui/alert/alert.d.ts.map +1 -1
  257. package/dist/types/core/components/ui/alert-messages/alert-messages.d.ts.map +1 -1
  258. package/dist/types/core/components/ui/badge/badge.d.ts +1 -1
  259. package/dist/types/core/components/ui/badge/badge.d.ts.map +1 -1
  260. package/dist/types/core/components/ui/button/button.d.ts +13 -29
  261. package/dist/types/core/components/ui/button/button.d.ts.map +1 -1
  262. package/dist/types/core/components/ui/card/card-header.d.ts.map +1 -1
  263. package/dist/types/core/components/ui/divider/divider.d.ts +2 -1
  264. package/dist/types/core/components/ui/divider/divider.d.ts.map +1 -1
  265. package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts +25 -73
  266. package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts.map +1 -1
  267. package/dist/types/core/components/ui/form/input/input.d.ts +14 -29
  268. package/dist/types/core/components/ui/form/input/input.d.ts.map +1 -1
  269. package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +63 -65
  270. package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts.map +1 -1
  271. package/dist/types/core/components/ui/form/radio/radio.d.ts +1 -1
  272. package/dist/types/core/components/ui/form/select/select.d.ts +3 -5
  273. package/dist/types/core/components/ui/form/select/select.d.ts.map +1 -1
  274. package/dist/types/core/components/ui/form/textarea/textarea.d.ts +12 -28
  275. package/dist/types/core/components/ui/form/textarea/textarea.d.ts.map +1 -1
  276. package/dist/types/core/components/ui/image/image.d.ts +2 -1
  277. package/dist/types/core/components/ui/image/image.d.ts.map +1 -1
  278. package/dist/types/core/components/ui/link/link.d.ts +10 -9
  279. package/dist/types/core/components/ui/link/link.d.ts.map +1 -1
  280. package/dist/types/core/components/ui/modal/modal-close.d.ts +2 -2
  281. package/dist/types/core/components/ui/modal/modal-close.d.ts.map +1 -1
  282. package/dist/types/core/components/ui/pop/pop.d.ts +12 -4
  283. package/dist/types/core/components/ui/pop/pop.d.ts.map +1 -1
  284. package/dist/types/core/components/ui/table/table.d.ts +2 -1
  285. package/dist/types/core/components/ui/table/table.d.ts.map +1 -1
  286. package/dist/types/core/components/ui/toast/dismissed.d.ts +3 -0
  287. package/dist/types/core/components/ui/toast/dismissed.d.ts.map +1 -0
  288. package/dist/types/core/components/ui/toast/render-content.d.ts +7 -0
  289. package/dist/types/core/components/ui/toast/render-content.d.ts.map +1 -0
  290. package/dist/types/core/components/ui/toast/toast-item.d.ts +26 -9
  291. package/dist/types/core/components/ui/toast/toast-item.d.ts.map +1 -1
  292. package/dist/types/core/components/ui/toast/toast.d.ts +6 -3
  293. package/dist/types/core/components/ui/toast/toast.d.ts.map +1 -1
  294. package/dist/types/core/components/ui/toast/types.d.ts +12 -2
  295. package/dist/types/core/components/ui/toast/types.d.ts.map +1 -1
  296. package/dist/types/core/components/ui/tooltip/tooltip.d.ts +19 -11
  297. package/dist/types/core/components/ui/tooltip/tooltip.d.ts.map +1 -1
  298. package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts +3 -4
  299. package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts.map +1 -1
  300. package/dist/types/core/decorators/subscriber/derive.d.ts.map +1 -1
  301. package/dist/types/core/mixins/FormCheckable.d.ts +10 -27
  302. package/dist/types/core/mixins/FormCheckable.d.ts.map +1 -1
  303. package/dist/types/core/mixins/FormElement.d.ts +21 -10
  304. package/dist/types/core/mixins/FormElement.d.ts.map +1 -1
  305. package/dist/types/core/mixins/FormInput.d.ts +11 -27
  306. package/dist/types/core/mixins/FormInput.d.ts.map +1 -1
  307. package/dist/types/core/utils/AncestorAttributeObserver.d.ts +17 -9
  308. package/dist/types/core/utils/AncestorAttributeObserver.d.ts.map +1 -1
  309. package/dist/types/core/utils/LocationHandler.d.ts +3 -2
  310. package/dist/types/core/utils/LocationHandler.d.ts.map +1 -1
  311. package/dist/types/core/utils/dismissed.d.ts +3 -0
  312. package/dist/types/core/utils/dismissed.d.ts.map +1 -0
  313. package/dist/types/core/utils/mediaRef.d.ts +15 -0
  314. package/dist/types/core/utils/mediaRef.d.ts.map +1 -1
  315. package/dist/types/core/utils/positioning.d.ts +44 -0
  316. package/dist/types/core/utils/positioning.d.ts.map +1 -0
  317. package/dist/types/directives.d.ts +1 -3
  318. package/dist/types/directives.d.ts.map +1 -1
  319. package/dist/types/mixins.d.ts +22 -55
  320. package/dist/types/mixins.d.ts.map +1 -1
  321. package/docs/assets/{index-FmK4JaIM.js → index-D8MVWqY6.js} +946 -687
  322. package/docs/assets/index-DiD0qYvE.css +1 -0
  323. package/docs/crawl/core/components/ui/form/input-autocomplete/input-autocomplete.html +17 -85
  324. package/docs/crawl/docs/_misc/formelement-subscriber-removal.html +1 -1
  325. package/docs/crawl/hubs/form-components.html +13 -11
  326. package/docs/docs-mock-api-sw.js +5 -1
  327. package/docs/docs-mock-api-sw.js.map +2 -2
  328. package/docs/index.html +2 -2
  329. package/docs/llms-full.txt +12 -38
  330. package/docs/llms.txt +1 -1
  331. package/docs/src/core/components/functional/sdui/sdui.md +0 -0
  332. package/docs/src/core/components/ui/form/checkbox/checkbox.md +0 -0
  333. package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +14 -118
  334. package/docs/src/docs/_getting-started/create-a-component.md +0 -0
  335. package/docs/src/docs/_misc/formelement-subscriber-removal.md +1 -1
  336. package/docs/src/docs/search/docs-search.json +195 -200
  337. package/docs/src/tsconfig.json +324 -0
  338. package/gitlab/job_tests.sh +25 -12
  339. package/index.html +3 -3
  340. package/package.json +217 -9
  341. package/public/docs-mock-api-sw.js +5 -1
  342. package/public/docs-mock-api-sw.js.map +2 -2
  343. package/scripts/build-addons.mjs +2 -2
  344. package/scripts/post-build.mjs +9 -0
  345. package/src/addons/interactive.ts +5 -0
  346. package/src/core/components/functional/3d/3d.md +34 -1
  347. package/src/core/components/functional/3d/3d.spec.ts +42 -0
  348. package/src/core/components/functional/3d/3d.ts +101 -3
  349. package/src/core/components/functional/3d/constants.ts +1 -0
  350. package/src/core/components/functional/3d/ensure.ts +11 -3
  351. package/src/core/components/functional/3d/form-params.ts +2 -0
  352. package/src/core/components/functional/3d/life.ts +4 -1
  353. package/src/core/components/functional/3d/out-publish.ts +4 -3
  354. package/src/core/components/functional/3d/playback.ts +13 -1
  355. package/src/core/components/functional/3d/post-bind.ts +262 -0
  356. package/src/core/components/functional/3d/post-channels.spec.ts +36 -0
  357. package/src/core/components/functional/3d/post-channels.ts +69 -0
  358. package/src/core/components/functional/3d/post-fx.ts +594 -0
  359. package/src/core/components/functional/3d/props.ts +45 -0
  360. package/src/core/components/functional/3d/reload.ts +2 -0
  361. package/src/core/components/functional/3d/runtime.ts +93 -4
  362. package/src/core/components/functional/3d/scene-runtime.ts +3 -0
  363. package/src/core/components/functional/3d/tune.ts +21 -0
  364. package/src/core/components/functional/3d/types.ts +9 -0
  365. package/src/core/components/functional/3d/updated.ts +17 -1
  366. package/src/core/components/functional/if/if.ts +54 -7
  367. package/src/core/components/functional/interactive/action.ts +84 -0
  368. package/src/core/components/functional/interactive/gamepad.ts +197 -0
  369. package/src/core/components/functional/interactive/gesture.ts +136 -0
  370. package/src/core/components/functional/interactive/helpers.spec.ts +50 -0
  371. package/src/core/components/functional/interactive/helpers.ts +97 -0
  372. package/src/core/components/functional/interactive/index.ts +25 -0
  373. package/src/core/components/functional/interactive/interactive.md +33 -0
  374. package/src/core/components/functional/interactive/keyboard.ts +171 -0
  375. package/src/core/components/functional/interactive/matrix.ts +185 -0
  376. package/src/core/components/functional/interactive/registry.ts +46 -0
  377. package/src/core/components/functional/interactive/store.ts +264 -0
  378. package/src/core/components/functional/interactive/ticker.ts +171 -0
  379. package/src/core/components/functional/list/list.ts +0 -0
  380. package/src/core/components/functional/shader/gl-runtime.ts +169 -12
  381. package/src/core/components/functional/shader/shader.md +27 -4
  382. package/src/core/components/functional/shader/shader.spec.ts +267 -0
  383. package/src/core/components/functional/shader/shader.ts +177 -55
  384. package/src/core/components/functional/shader/shadertoy-prelude.ts +49 -5
  385. package/src/core/components/functional/shader/types.ts +89 -12
  386. package/src/core/components/functional/subscriber/subscriber.ts +0 -0
  387. package/src/core/components/functional/value/value.ts +44 -4
  388. package/src/core/components/functional/webgpu/gl-fallback.ts +28 -4
  389. package/src/core/components/functional/webgpu/gpu-runtime.ts +154 -18
  390. package/src/core/components/functional/webgpu/helpers.ts +8 -2
  391. package/src/core/components/functional/webgpu/webgpu.md +13 -2
  392. package/src/core/components/functional/webgpu/webgpu.spec.ts +37 -0
  393. package/src/core/components/functional/webgpu/webgpu.ts +39 -1
  394. package/src/core/components/ui/_css/rounded.ts +36 -0
  395. package/src/core/components/ui/_css/type.ts +49 -0
  396. package/src/core/components/ui/_i18n/ui-aria-labels.ts +104 -0
  397. package/src/core/components/ui/alert/alert.md +128 -72
  398. package/src/core/components/ui/alert/alert.spec.ts +145 -0
  399. package/src/core/components/ui/alert/alert.ts +86 -91
  400. package/src/core/components/ui/alert-messages/alert-messages.ts +1 -1
  401. package/src/core/components/ui/badge/badge.md +126 -78
  402. package/src/core/components/ui/badge/badge.ts +29 -81
  403. package/src/core/components/ui/button/button.md +1 -0
  404. package/src/core/components/ui/button/button.ts +12 -10
  405. package/src/core/components/ui/card/card-header.ts +7 -2
  406. package/src/core/components/ui/card/card.md +120 -65
  407. package/src/core/components/ui/divider/divider.ts +4 -9
  408. package/src/core/components/ui/form/checkbox/checkbox.md +1 -1
  409. package/src/core/components/ui/form/checkbox/checkbox.ts +4 -20
  410. package/src/core/components/ui/form/fieldset/legend-description.ts +1 -1
  411. package/src/core/components/ui/form/fieldset/legend.ts +1 -1
  412. package/src/core/components/ui/form/input/input.md +1 -1
  413. package/src/core/components/ui/form/input/input.ts +25 -27
  414. package/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +14 -118
  415. package/src/core/components/ui/form/input-autocomplete/input-autocomplete.ts +419 -187
  416. package/src/core/components/ui/form/radio/radio.ts +1 -1
  417. package/src/core/components/ui/form/select/select.ts +3 -6
  418. package/src/core/components/ui/form/textarea/textarea.md +1 -1
  419. package/src/core/components/ui/form/textarea/textarea.ts +1 -2
  420. package/src/core/components/ui/image/image.md +147 -53
  421. package/src/core/components/ui/image/image.ts +10 -44
  422. package/src/core/components/ui/link/link.md +2 -2
  423. package/src/core/components/ui/link/link.ts +42 -37
  424. package/src/core/components/ui/modal/modal-close.ts +8 -12
  425. package/src/core/components/ui/modal/modal.ts +18 -18
  426. package/src/core/components/ui/pop/pop.md +105 -1
  427. package/src/core/components/ui/pop/pop.ts +145 -141
  428. package/src/core/components/ui/table/table.ts +2 -8
  429. package/src/core/components/ui/theme/theme.ts +1 -1
  430. package/src/core/components/ui/toast/dismissed.ts +14 -0
  431. package/src/core/components/ui/toast/render-content.ts +13 -0
  432. package/src/core/components/ui/toast/toast-item.ts +179 -103
  433. package/src/core/components/ui/toast/toast.ts +58 -21
  434. package/src/core/components/ui/toast/types.ts +14 -2
  435. package/src/core/components/ui/tooltip/tooltip.ts +176 -154
  436. package/src/core/decorators/subscriber/ancestorAttribute.spec.ts +26 -0
  437. package/src/core/decorators/subscriber/ancestorAttribute.ts +3 -4
  438. package/src/core/decorators/subscriber/derive.ts +3 -3
  439. package/src/core/mixins/Fetcher.ts +1 -1
  440. package/src/core/mixins/FormCheckable.ts +1 -8
  441. package/src/core/mixins/FormElement.ts +74 -76
  442. package/src/core/mixins/Subscriber.ts +0 -0
  443. package/src/core/utils/AncestorAttributeObserver.ts +183 -70
  444. package/src/core/utils/DataBindObserver.ts +0 -0
  445. package/src/core/utils/LocationHandler.ts +12 -5
  446. package/src/core/utils/Objects.ts +0 -0
  447. package/src/core/utils/dismissed.ts +22 -0
  448. package/src/core/utils/mediaRef.spec.ts +25 -0
  449. package/src/core/utils/mediaRef.ts +45 -0
  450. package/src/core/utils/positioning.spec.ts +208 -0
  451. package/src/core/utils/positioning.ts +183 -0
  452. package/src/directives.ts +1 -3
  453. package/src/docs/_core-concept/dataFlow.md +1 -1
  454. package/src/docs/_decorators/ancestor-attribute.md +3 -2
  455. package/src/docs/_getting-started/concorde-outside.md +3 -3
  456. package/src/docs/_misc/formelement-subscriber-removal.md +115 -0
  457. package/src/docs/_misc/html-integration.md +2 -0
  458. package/src/docs/_misc/visual-stack.md +19 -1
  459. package/src/docs/code.ts +3 -1
  460. package/src/docs/components/docs-demo-sources.ts +88 -0
  461. package/src/docs/docs.ts +3 -0
  462. package/src/docs/example/docs-3d-post-depth-demo.ts +68 -0
  463. package/src/docs/example/docs-3d-webgpu-live-demo.ts +83 -0
  464. package/src/docs/example/docs-harris-webgpu-demo.ts +53 -55
  465. package/src/docs/example/docs-input-autocomplete-demos.ts +110 -0
  466. package/src/docs/mock-api/router.ts +17 -1
  467. package/src/docs/navigation/navigation.ts +4 -0
  468. package/src/docs/search/docs-search.json +922 -1762
  469. package/src/docs/tailwind/css/tailwind.css +13 -6
  470. package/src/tsconfig.json +162 -6
  471. package/src/tsconfig.tsbuildinfo +1 -1
  472. package/tailwind.config.js +50 -3
  473. package/vite/config.js +23 -35
  474. package/vite.config.mts +5 -0
  475. package/vitest.setup.ts +49 -13
  476. package/docs/assets/index-BZiZXMU-.css +0 -1
@@ -34,8 +34,19 @@ export class Sonic3dProps extends LitElement {
34
34
  @property({ type: Boolean }) pick = false;
35
35
  @property({ type: Boolean, reflect: true }) play = true;
36
36
  @property({ type: Boolean, attribute: "play-on-hover" }) playOnHover = false;
37
+ /**
38
+ * Garde le RAF / runtime hors viewport (pont live `#id`).
39
+ * Aussi auto si un consommateur a appelé `registerFrameConsumer`.
40
+ */
41
+ @property({ type: Boolean, attribute: "play-offscreen" })
42
+ playOffscreen = false;
37
43
  @property({ type: Boolean, attribute: "release-offscreen" })
38
44
  releaseOffscreen = true;
45
+ /**
46
+ * Inertie OrbitControls (`dampingFactor`). `0` = pas d’inertie.
47
+ * Défaut `0.08`.
48
+ */
49
+ @property({ type: Number }) damping = 0.08;
39
50
  @property({ type: Number, attribute: "dpr-max" }) dprMax = 2;
40
51
  @property({ type: String, attribute: "aspect-ratio" }) aspectRatio = "";
41
52
  @property({ type: String }) dataProvider = "";
@@ -47,4 +58,38 @@ export class Sonic3dProps extends LitElement {
47
58
  snapshotInterval = DEFAULT_SNAPSHOT_INTERVAL_MS;
48
59
  /** Publie `frameUrl` / `snapshot` (canvas) pour chaînage shader / jsonata. */
49
60
  @property({ type: Boolean, attribute: "frame-out" }) frameOut = false;
61
+
62
+ /* —— Post FX (Lot 2) : passes ShaderToy dans le contexte Three —— */
63
+ @property({ attribute: "post-image" }) postImage = "";
64
+ @property({ attribute: "post-buffer-a" }) postBufferA = "";
65
+ @property({ attribute: "post-buffer-b" }) postBufferB = "";
66
+ @property({ attribute: "post-buffer-c" }) postBufferC = "";
67
+ @property({ attribute: "post-buffer-d" }) postBufferD = "";
68
+ @property({ attribute: "post-common" }) postCommon = "";
69
+ @property({ attribute: "post-image-ch0" }) postImageCh0 = "";
70
+ @property({ attribute: "post-image-ch1" }) postImageCh1 = "";
71
+ @property({ attribute: "post-image-ch2" }) postImageCh2 = "";
72
+ @property({ attribute: "post-image-ch3" }) postImageCh3 = "";
73
+ @property({ attribute: "post-buffer-a-ch0" }) postBufferACh0 = "";
74
+ @property({ attribute: "post-buffer-a-ch1" }) postBufferACh1 = "";
75
+ @property({ attribute: "post-buffer-a-ch2" }) postBufferACh2 = "";
76
+ @property({ attribute: "post-buffer-a-ch3" }) postBufferACh3 = "";
77
+ @property({ attribute: "post-buffer-b-ch0" }) postBufferBCh0 = "";
78
+ @property({ attribute: "post-buffer-b-ch1" }) postBufferBCh1 = "";
79
+ @property({ attribute: "post-buffer-b-ch2" }) postBufferBCh2 = "";
80
+ @property({ attribute: "post-buffer-b-ch3" }) postBufferBCh3 = "";
81
+ @property({ attribute: "post-buffer-c-ch0" }) postBufferCCh0 = "";
82
+ @property({ attribute: "post-buffer-c-ch1" }) postBufferCCh1 = "";
83
+ @property({ attribute: "post-buffer-c-ch2" }) postBufferCCh2 = "";
84
+ @property({ attribute: "post-buffer-c-ch3" }) postBufferCCh3 = "";
85
+ @property({ attribute: "post-buffer-d-ch0" }) postBufferDCh0 = "";
86
+ @property({ attribute: "post-buffer-d-ch1" }) postBufferDCh1 = "";
87
+ @property({ attribute: "post-buffer-d-ch2" }) postBufferDCh2 = "";
88
+ @property({ attribute: "post-buffer-d-ch3" }) postBufferDCh3 = "";
89
+ @property({ type: Number }) param0 = 0;
90
+ @property({ type: Number }) param1 = 0;
91
+ @property({ type: Number }) param2 = 0;
92
+ @property({ type: Number }) param3 = 0;
93
+ /** Échelle des cibles post (0.25–1, défaut 1). */
94
+ @property({ type: Number, attribute: "post-scale" }) postScale = 1;
50
95
  }
@@ -2,6 +2,7 @@ import { PublisherManager } from "@supersoniks/concorde/utils";
2
2
  import { asset } from "./asset";
3
3
  import type { FormOrbit } from "./form-params";
4
4
  import { frameSource } from "./frame-source";
5
+ import { postBind } from "./post-bind";
5
6
  import { playback } from "./playback";
6
7
  import type { SceneRuntime } from "./runtime";
7
8
  import type { Sonic3dAsset } from "./types";
@@ -49,6 +50,7 @@ async function run(host: ReloadHost) {
49
50
  host.runtime.render();
50
51
  host.frameSeq++;
51
52
  host.syncPlayback();
53
+ postBind.applyConfig(host as never);
52
54
  frameSource.maybePublish(host as never);
53
55
  host.dispatchEvent(
54
56
  new CustomEvent("ready", {
@@ -6,14 +6,22 @@ import { bootScene } from "./boot";
6
6
  import { ops, type OpsCtx } from "./ops";
7
7
  import type { SceneRuntimeOptions } from "./opts";
8
8
  import type { SceneHit } from "./pick";
9
+ import {
10
+ PostFxCompileError,
11
+ PostFxPipeline,
12
+ type PostFxConfig,
13
+ type PostFxUniforms,
14
+ } from "./post-fx";
9
15
  import { tune, type TuneCtx } from "./tune";
10
16
  import type { Sonic3dAsset, Sonic3dOutput } from "./types";
11
17
  import { view, type ViewCtx } from "./view";
12
18
 
13
19
  export type { SceneHit, SceneRuntimeOptions };
20
+ export { PostFxCompileError };
21
+ export type { PostFxConfig, PostFxUniforms };
14
22
 
15
23
  /**
16
- * Runtime Three.js encapsulé : renderer, scène, caméra, load, fit, pick.
24
+ * Runtime Three.js encapsulé : renderer, scène, caméra, load, fit, pick, post FX.
17
25
  * Le composant Lit gère RAF / viewport / DP.
18
26
  */
19
27
  export class SceneRuntime {
@@ -46,6 +54,19 @@ export class SceneRuntime {
46
54
  private highlighted: THREE.Mesh | null = null;
47
55
  private prevEmissive = new THREE.Color();
48
56
  private prevEmissiveIntensity = 0;
57
+ private postFx: PostFxPipeline;
58
+ private lastCssW = 1;
59
+ private lastCssH = 1;
60
+ private damping = 0.08;
61
+ private postFrame: PostFxUniforms = {
62
+ time: 0,
63
+ timeDelta: 1 / 60,
64
+ frame: 0,
65
+ mouse: [0, 0, 0, 0],
66
+ params: [0, 0, 0, 0],
67
+ near: 0.1,
68
+ far: 100,
69
+ };
49
70
 
50
71
  constructor(opts: SceneRuntimeOptions) {
51
72
  const b = bootScene(opts);
@@ -62,9 +83,32 @@ export class SceneRuntime {
62
83
  this.fov = b.fov;
63
84
  this.fitEnabled = b.fitEnabled;
64
85
  this.limits = b.limits;
86
+ this.postFx = new PostFxPipeline(this.renderer);
65
87
  this.applyCameraMode(this.mode);
66
88
  if (b.autoRotate) this.setAutoRotate(true);
67
- void [this.canvas, this.perspCam, this.orthoCam, this.root, this.content, this.lights, this.loader, this.loadToken, this.blobUrl, this.dprMax, this.fov, this.fitEnabled, this.limits, this.bbox, this.target, this.raycaster, this.pointerNdc, this.highlighted, this.prevEmissive, this.prevEmissiveIntensity, this.unbindWheelRelay];
89
+ void [
90
+ this.canvas,
91
+ this.perspCam,
92
+ this.orthoCam,
93
+ this.root,
94
+ this.content,
95
+ this.lights,
96
+ this.loader,
97
+ this.loadToken,
98
+ this.blobUrl,
99
+ this.dprMax,
100
+ this.fov,
101
+ this.fitEnabled,
102
+ this.limits,
103
+ this.bbox,
104
+ this.target,
105
+ this.raycaster,
106
+ this.pointerNdc,
107
+ this.highlighted,
108
+ this.prevEmissive,
109
+ this.prevEmissiveIntensity,
110
+ this.unbindWheelRelay,
111
+ ];
68
112
  }
69
113
 
70
114
  get ready() {
@@ -79,6 +123,9 @@ export class SceneRuntime {
79
123
  get isLost() {
80
124
  return this.renderer.getContext()?.isContextLost?.() ?? false;
81
125
  }
126
+ get hasPostFx() {
127
+ return this.postFx.isEnabled;
128
+ }
82
129
 
83
130
  setDprMax(v: number) {
84
131
  tune.setDprMax(this.asTuneCtx(), v);
@@ -95,6 +142,15 @@ export class SceneRuntime {
95
142
  setAutoRotate(v: boolean) {
96
143
  tune.setAutoRotate(this.asTuneCtx(), v);
97
144
  }
145
+ setDamping(v: number) {
146
+ this.damping = Number.isFinite(v) ? Math.max(0, v) : 0.08;
147
+ tune.setDamping(this.asTuneCtx(), this.damping);
148
+ }
149
+ /** Coupe autoRotate + inertie OrbitControls. */
150
+ stopMotion() {
151
+ tune.setAutoRotate(this.asTuneCtx(), false);
152
+ tune.stopMotion(this.asTuneCtx());
153
+ }
98
154
  setOrbitLimits(opts: Parameters<typeof tune.setOrbitLimits>[1]) {
99
155
  tune.setOrbitLimits(this.asTuneCtx(), opts);
100
156
  }
@@ -104,9 +160,17 @@ export class SceneRuntime {
104
160
 
105
161
  applyCameraMode(mode: Sonic3dCameraMode) {
106
162
  view.applyCameraMode(this.asViewCtx(), mode);
163
+ tune.setDamping(this.asTuneCtx(), this.damping);
107
164
  }
108
165
  resize(cssW: number, cssH: number) {
166
+ this.lastCssW = cssW;
167
+ this.lastCssH = cssH;
109
168
  view.resize(this.asViewCtx(), cssW, cssH);
169
+ const dpr = Math.min(
170
+ typeof window !== "undefined" ? window.devicePixelRatio || 1 : 1,
171
+ this.dprMax,
172
+ );
173
+ this.postFx.resize(cssW * dpr, cssH * dpr);
110
174
  }
111
175
  async load(asset: Sonic3dAsset | null) {
112
176
  return ops.runLoad(this.asOpsCtx(), asset);
@@ -114,9 +178,34 @@ export class SceneRuntime {
114
178
  fitToContent() {
115
179
  ops.fitToContent(this.asOpsCtx());
116
180
  }
181
+
182
+ setPostConfig(config: PostFxConfig | null) {
183
+ this.postFx.setConfig(config);
184
+ if (config && this.lastCssW > 0) {
185
+ this.resize(this.lastCssW, this.lastCssH);
186
+ }
187
+ }
188
+
189
+ setPostElementResolver(fn: ((key: string) => Element | null) | null) {
190
+ this.postFx.setElementResolver(fn);
191
+ }
192
+
193
+ setPostFrame(frame: Partial<PostFxUniforms>) {
194
+ Object.assign(this.postFrame, frame);
195
+ const cam = this.activeCam as THREE.PerspectiveCamera;
196
+ if ("near" in cam && "far" in cam) {
197
+ this.postFrame.near = cam.near;
198
+ this.postFrame.far = cam.far;
199
+ }
200
+ }
201
+
117
202
  render() {
118
203
  this.controls?.update();
119
- this.renderer.render(this.scene, this.activeCam);
204
+ if (this.postFx.isEnabled) {
205
+ this.postFx.render(this.scene, this.activeCam, this.postFrame);
206
+ } else {
207
+ this.renderer.render(this.scene, this.activeCam);
208
+ }
120
209
  }
121
210
  pick(normX: number, normY: number): SceneHit | null {
122
211
  return ops.pick(this.asOpsCtx(), normX, normY);
@@ -138,6 +227,7 @@ export class SceneRuntime {
138
227
  return ops.buildSnapshot(this.asOpsCtx(), base);
139
228
  }
140
229
  dispose(loseContext = false) {
230
+ this.postFx.dispose();
141
231
  ops.dispose(this.asOpsCtx(), loseContext);
142
232
  }
143
233
 
@@ -145,4 +235,3 @@ export class SceneRuntime {
145
235
  private asViewCtx = () => this as unknown as ViewCtx;
146
236
  private asOpsCtx = () => this as unknown as OpsCtx;
147
237
  }
148
-
@@ -4,6 +4,9 @@
4
4
  */
5
5
  export {
6
6
  SceneRuntime,
7
+ PostFxCompileError,
7
8
  type SceneHit,
8
9
  type SceneRuntimeOptions,
10
+ type PostFxConfig,
11
+ type PostFxUniforms,
9
12
  } from "./runtime";
@@ -37,6 +37,25 @@ function setAutoRotate(ctx: TuneCtx, v: boolean) {
37
37
  if (ctx.controls) ctx.controls.autoRotate = v;
38
38
  }
39
39
 
40
+ function setDamping(ctx: TuneCtx, v: number) {
41
+ if (!ctx.controls) return;
42
+ const d = Number.isFinite(v) ? Math.max(0, v) : 0.08;
43
+ ctx.controls.enableDamping = d > 0;
44
+ ctx.controls.dampingFactor = d > 0 ? d : 0.08;
45
+ }
46
+
47
+ /** Coupe autoRotate + vide l’inertie OrbitControls. */
48
+ function stopMotion(ctx: TuneCtx) {
49
+ if (!ctx.controls) return;
50
+ ctx.controls.autoRotate = false;
51
+ const wasDamping = ctx.controls.enableDamping;
52
+ const factor = ctx.controls.dampingFactor;
53
+ ctx.controls.enableDamping = false;
54
+ ctx.controls.update();
55
+ ctx.controls.enableDamping = wasDamping;
56
+ ctx.controls.dampingFactor = factor;
57
+ }
58
+
40
59
  function setOrbitLimits(ctx: TuneCtx, opts: Partial<OrbitLimits>) {
41
60
  ctx.limits = orbit.mergeLimits(ctx.limits, opts);
42
61
  orbit.applyLimitsToControls(ctx.controls, ctx.limits);
@@ -67,6 +86,8 @@ export const tune = {
67
86
  setFov,
68
87
  setFit,
69
88
  setAutoRotate,
89
+ setDamping,
90
+ stopMotion,
70
91
  setOrbitLimits,
71
92
  setOrbitSpherical,
72
93
  } as const;
@@ -65,6 +65,13 @@ export type Sonic3dConfig = {
65
65
  playOnHover?: boolean;
66
66
  /** Libère le renderer hors viewport (défaut true). */
67
67
  releaseOffscreen?: boolean;
68
+ /**
69
+ * Garde RAF / runtime hors viewport (pont live).
70
+ * Aussi auto via `registerFrameConsumer`.
71
+ */
72
+ playOffscreen?: boolean;
73
+ /** Inertie OrbitControls (défaut 0.08, 0 = off). */
74
+ damping?: number;
68
75
  dprMax?: number;
69
76
  aspectRatio?: string;
70
77
 
@@ -124,6 +131,8 @@ export type Sonic3dOutput = {
124
131
  distance: number;
125
132
  yaw: number;
126
133
  pitch: number;
134
+ /** 1 si la caméra bouge (orbit / inertie / autoRotate), sinon 0. */
135
+ moving?: number;
127
136
  /** Présents après un pick réussi. */
128
137
  hitX?: number;
129
138
  hitY?: number;
@@ -3,6 +3,7 @@ import type { LifeHost } from "./life";
3
3
  import { life } from "./life";
4
4
  import { parse } from "./parse";
5
5
  import { playback } from "./playback";
6
+ import { postBind } from "./post-bind";
6
7
  import { reload } from "./reload";
7
8
 
8
9
  function hasAny(
@@ -61,10 +62,25 @@ function updated(
61
62
  if (changed.has("autoRotate") || changed.has("play")) {
62
63
  playback.syncAutoRotate(host as never);
63
64
  }
64
- if (changed.has("play") || changed.has("playOnHover")) {
65
+ if (
66
+ changed.has("play") ||
67
+ changed.has("playOnHover") ||
68
+ changed.has("playOffscreen")
69
+ ) {
65
70
  host.syncPlayback();
66
71
  }
72
+ if (changed.has("playOffscreen") || changed.has("releaseOffscreen")) {
73
+ ensure.syncVisibility(host as never);
74
+ }
75
+ if (changed.has("damping") && host.runtime) {
76
+ host.runtime.setDamping(
77
+ (host as unknown as { damping: number }).damping,
78
+ );
79
+ }
67
80
  if (changed.has("src") || changed.has("asset")) void reload.run(host as never);
81
+ if (postBind.propsChanged(changed)) {
82
+ postBind.applyConfig(host as never);
83
+ }
68
84
  }
69
85
 
70
86
  export const propUpdate = { updated } as const;
@@ -1,23 +1,70 @@
1
1
  import {css, html, LitElement, nothing} from "lit";
2
2
  import {customElement, property} from "lit/decorators.js";
3
- const tagName = "sonic-if"; // For Astro.build
3
+ import {Subscriber} from "@supersoniks/concorde/mixins";
4
+
5
+ const tagName = "sonic-if";
6
+
7
+ function pathGet(obj: unknown, path: string): unknown {
8
+ if (!path) return obj;
9
+ let cur: any = obj;
10
+ for (const p of path.split(".").filter(Boolean)) {
11
+ if (cur == null) return undefined;
12
+ cur = cur[p];
13
+ }
14
+ return cur;
15
+ }
16
+
4
17
  /**
5
- * Le composant *sonic-if* affiche son contenu dans le slot principal si sa propriété .condition est évaluée à true
18
+ * Affiche le slot si `.condition` est true **ou** via attributs SDUI
19
+ * `dataProvider` + `key` (+ `equals` / `not` / `truthy` / `gt` / `lt`).
6
20
  */
7
21
  @customElement(tagName)
8
- export class SonicIF extends LitElement {
22
+ export class SonicIF extends Subscriber(LitElement) {
9
23
  static styles = css`
10
24
  :host {
11
25
  display: contents;
12
26
  }
13
27
  `;
14
28
 
15
- /**
16
- * Le contenu s'affiche si la condition est évaluée à true.
17
- */
29
+ /** Mode Lit classique. */
18
30
  @property({type: Boolean}) condition = false;
31
+
32
+ @property({type: String}) key = "";
33
+
34
+ @property({type: String}) equals = "";
35
+
36
+ @property({type: String}) not = "";
37
+
38
+ @property({type: Boolean}) truthy = false;
39
+
40
+ @property({type: String}) gt = "";
41
+
42
+ @property({type: String}) lt = "";
43
+
44
+ private attrMode(): boolean {
45
+ return Boolean(
46
+ this.dataProvider &&
47
+ (this.key ||
48
+ this.truthy ||
49
+ this.equals !== "" ||
50
+ this.not !== "" ||
51
+ this.gt !== "" ||
52
+ this.lt !== ""),
53
+ );
54
+ }
55
+
56
+ private show(): boolean {
57
+ if (!this.attrMode()) return this.condition;
58
+ const value = pathGet(this.props, this.key);
59
+ if (this.equals !== "") return String(value) === this.equals;
60
+ if (this.not !== "") return String(value) !== this.not;
61
+ if (this.gt !== "") return Number(value) > Number(this.gt);
62
+ if (this.lt !== "") return Number(value) < Number(this.lt);
63
+ return Boolean(value);
64
+ }
65
+
19
66
  render() {
20
- if (!this.condition) return nothing;
67
+ if (!this.show()) return nothing;
21
68
  return html` <slot></slot> `;
22
69
  }
23
70
  }
@@ -0,0 +1,84 @@
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-action";
6
+
7
+ /**
8
+ * Wrapper clic → dispatch vers un store.
9
+ * `hold-repeat="170,50"` pour d-pad tactile.
10
+ */
11
+ @customElement(tagName)
12
+ export class SonicAction extends LitElement {
13
+ static styles = css`
14
+ :host {
15
+ display: contents;
16
+ }
17
+ `;
18
+
19
+ @property({ type: String })
20
+ target = "";
21
+
22
+ @property({ type: String })
23
+ type = "";
24
+
25
+ @property({ type: Object })
26
+ payload: unknown = null;
27
+
28
+ @property({ type: String, attribute: "hold-repeat" })
29
+ holdRepeat = "";
30
+
31
+ @property({ type: Boolean, attribute: "dispatch-event" })
32
+ dispatchEventFlag = false;
33
+
34
+ private holdTimer: number | null = null;
35
+ private holdInterval: number | null = null;
36
+
37
+ private onPointerDown = (e: PointerEvent) => {
38
+ if (e.button != null && e.button !== 0) return;
39
+ this.emit();
40
+ const parts = this.holdRepeat.split(",").map((s) => Number(s.trim()));
41
+ if (parts.length === 2 && parts.every((n) => Number.isFinite(n))) {
42
+ const [delay, interval] = parts;
43
+ this.holdTimer = window.setTimeout(() => {
44
+ this.emit();
45
+ this.holdInterval = window.setInterval(() => this.emit(), Math.max(16, interval));
46
+ }, Math.max(0, delay));
47
+ }
48
+ };
49
+
50
+ private onPointerUp = () => this.clearHold();
51
+
52
+ private clearHold(): void {
53
+ if (this.holdTimer != null) clearTimeout(this.holdTimer);
54
+ if (this.holdInterval != null) clearInterval(this.holdInterval);
55
+ this.holdTimer = null;
56
+ this.holdInterval = null;
57
+ }
58
+
59
+ private emit(): void {
60
+ if (!this.type) return;
61
+ const action: SonicActionMessage = { type: this.type, payload: this.payload };
62
+ if (this.target) dispatch(this.target, action);
63
+ if (this.dispatchEventFlag) {
64
+ this.dispatchEvent(
65
+ new CustomEvent("sonic-action", {
66
+ detail: action,
67
+ bubbles: true,
68
+ composed: true,
69
+ }),
70
+ );
71
+ }
72
+ }
73
+
74
+ render() {
75
+ return html`<slot
76
+ @pointerdown=${this.onPointerDown}
77
+ @pointerup=${this.onPointerUp}
78
+ @pointercancel=${this.onPointerUp}
79
+ @pointerleave=${this.onPointerUp}
80
+ ></slot>`;
81
+ }
82
+ }
83
+
84
+ export default SonicAction;