@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.
- package/.gitlab-ci.yml +0 -13
- package/build-infos.json +1 -1
- package/concorde-3d.bundle.js +201 -152
- package/concorde-3d.es.js +14688 -13906
- package/concorde-core.bundle.js +557 -622
- package/concorde-core.es.js +6025 -5575
- package/concorde-hugging-face-infer.bundle.js +1 -1
- package/concorde-hugging-face-infer.es.js +1 -1
- package/concorde-interactive.bundle.js +1162 -0
- package/concorde-interactive.es.js +10723 -0
- package/concorde-shader.bundle.js +31 -20
- package/concorde-shader.es.js +2773 -2547
- package/concorde-webgpu.bundle.js +43 -32
- package/concorde-webgpu.es.js +1819 -1553
- package/dist/concorde-3d.bundle.js +201 -152
- package/dist/concorde-3d.es.js +14688 -13906
- package/dist/concorde-core.bundle.js +557 -622
- package/dist/concorde-core.es.js +6025 -5575
- package/dist/concorde-hugging-face-infer.bundle.js +1 -1
- package/dist/concorde-hugging-face-infer.es.js +1 -1
- package/dist/concorde-interactive.bundle.js +1162 -0
- package/dist/concorde-interactive.es.js +10723 -0
- package/dist/concorde-shader.bundle.js +31 -20
- package/dist/concorde-shader.es.js +2773 -2547
- package/dist/concorde-webgpu.bundle.js +43 -32
- package/dist/concorde-webgpu.es.js +1819 -1553
- package/dist/docs-mock-api-sw.js +5 -1
- package/dist/docs-mock-api-sw.js.map +2 -2
- package/dist/js/addons/interactive.js +6 -0
- package/dist/js/addons/interactive.js.map +1 -0
- package/dist/js/core/components/functional/3d/3d.js +90 -2
- package/dist/js/core/components/functional/3d/3d.js.map +1 -1
- package/dist/js/core/components/functional/3d/constants.js +1 -0
- package/dist/js/core/components/functional/3d/constants.js.map +1 -1
- package/dist/js/core/components/functional/3d/ensure.js +6 -3
- package/dist/js/core/components/functional/3d/ensure.js.map +1 -1
- package/dist/js/core/components/functional/3d/form-params.js +2 -0
- package/dist/js/core/components/functional/3d/form-params.js.map +1 -1
- package/dist/js/core/components/functional/3d/life.js +2 -1
- package/dist/js/core/components/functional/3d/life.js.map +1 -1
- package/dist/js/core/components/functional/3d/out-publish.js +3 -2
- package/dist/js/core/components/functional/3d/out-publish.js.map +1 -1
- package/dist/js/core/components/functional/3d/playback.js +6 -1
- package/dist/js/core/components/functional/3d/playback.js.map +1 -1
- package/dist/js/core/components/functional/3d/post-bind.js +207 -0
- package/dist/js/core/components/functional/3d/post-bind.js.map +1 -0
- package/dist/js/core/components/functional/3d/post-channels.js +39 -0
- package/dist/js/core/components/functional/3d/post-channels.js.map +1 -0
- package/dist/js/core/components/functional/3d/post-fx.js +495 -0
- package/dist/js/core/components/functional/3d/post-fx.js.map +1 -0
- package/dist/js/core/components/functional/3d/props.js +142 -0
- package/dist/js/core/components/functional/3d/props.js.map +1 -1
- package/dist/js/core/components/functional/3d/reload.js +2 -0
- package/dist/js/core/components/functional/3d/reload.js.map +1 -1
- package/dist/js/core/components/functional/3d/runtime.js +80 -3
- package/dist/js/core/components/functional/3d/runtime.js.map +1 -1
- package/dist/js/core/components/functional/3d/scene-runtime.js +1 -1
- package/dist/js/core/components/functional/3d/scene-runtime.js.map +1 -1
- package/dist/js/core/components/functional/3d/tune.js +21 -0
- package/dist/js/core/components/functional/3d/tune.js.map +1 -1
- package/dist/js/core/components/functional/3d/updated.js +13 -1
- package/dist/js/core/components/functional/3d/updated.js.map +1 -1
- package/dist/js/core/components/functional/if/if.js +65 -7
- package/dist/js/core/components/functional/if/if.js.map +1 -1
- package/dist/js/core/components/functional/interactive/action.js +96 -0
- package/dist/js/core/components/functional/interactive/action.js.map +1 -0
- package/dist/js/core/components/functional/interactive/gamepad.js +206 -0
- package/dist/js/core/components/functional/interactive/gamepad.js.map +1 -0
- package/dist/js/core/components/functional/interactive/gesture.js +148 -0
- package/dist/js/core/components/functional/interactive/gesture.js.map +1 -0
- package/dist/js/core/components/functional/interactive/helpers.js +82 -0
- package/dist/js/core/components/functional/interactive/helpers.js.map +1 -0
- package/dist/js/core/components/functional/interactive/index.js +20 -0
- package/dist/js/core/components/functional/interactive/index.js.map +1 -0
- package/dist/js/core/components/functional/interactive/keyboard.js +183 -0
- package/dist/js/core/components/functional/interactive/keyboard.js.map +1 -0
- package/dist/js/core/components/functional/interactive/matrix.js +201 -0
- package/dist/js/core/components/functional/interactive/matrix.js.map +1 -0
- package/dist/js/core/components/functional/interactive/registry.js +28 -0
- package/dist/js/core/components/functional/interactive/registry.js.map +1 -0
- package/dist/js/core/components/functional/interactive/store.js +264 -0
- package/dist/js/core/components/functional/interactive/store.js.map +1 -0
- package/dist/js/core/components/functional/interactive/ticker.js +182 -0
- package/dist/js/core/components/functional/interactive/ticker.js.map +1 -0
- package/dist/js/core/components/functional/shader/gl-runtime.js +128 -14
- package/dist/js/core/components/functional/shader/gl-runtime.js.map +1 -1
- package/dist/js/core/components/functional/shader/shader.js +154 -57
- package/dist/js/core/components/functional/shader/shader.js.map +1 -1
- package/dist/js/core/components/functional/shader/shadertoy-prelude.js +39 -5
- package/dist/js/core/components/functional/shader/shadertoy-prelude.js.map +1 -1
- package/dist/js/core/components/functional/shader/types.js +58 -7
- package/dist/js/core/components/functional/shader/types.js.map +1 -1
- package/dist/js/core/components/functional/value/value.js +49 -4
- package/dist/js/core/components/functional/value/value.js.map +1 -1
- package/dist/js/core/components/functional/webgpu/gl-fallback.js +27 -6
- package/dist/js/core/components/functional/webgpu/gl-fallback.js.map +1 -1
- package/dist/js/core/components/functional/webgpu/gpu-runtime.js +115 -13
- package/dist/js/core/components/functional/webgpu/gpu-runtime.js.map +1 -1
- package/dist/js/core/components/functional/webgpu/helpers.js +8 -2
- package/dist/js/core/components/functional/webgpu/helpers.js.map +1 -1
- package/dist/js/core/components/functional/webgpu/webgpu.js +34 -1
- package/dist/js/core/components/functional/webgpu/webgpu.js.map +1 -1
- package/dist/js/core/components/ui/_css/rounded.js +34 -0
- package/dist/js/core/components/ui/_css/rounded.js.map +1 -0
- package/dist/js/core/components/ui/_css/type.js +44 -0
- package/dist/js/core/components/ui/_css/type.js.map +1 -1
- package/dist/js/core/components/ui/_i18n/ui-aria-labels.js +95 -0
- package/dist/js/core/components/ui/_i18n/ui-aria-labels.js.map +1 -0
- package/dist/js/core/components/ui/alert/alert.js +72 -87
- package/dist/js/core/components/ui/alert/alert.js.map +1 -1
- package/dist/js/core/components/ui/alert-messages/alert-messages.js +1 -0
- package/dist/js/core/components/ui/alert-messages/alert-messages.js.map +1 -1
- package/dist/js/core/components/ui/badge/badge.js +29 -80
- package/dist/js/core/components/ui/badge/badge.js.map +1 -1
- package/dist/js/core/components/ui/button/button.js +8 -7
- package/dist/js/core/components/ui/button/button.js.map +1 -1
- package/dist/js/core/components/ui/card/card-header.js +7 -2
- package/dist/js/core/components/ui/card/card-header.js.map +1 -1
- package/dist/js/core/components/ui/divider/divider.js +1 -1
- package/dist/js/core/components/ui/divider/divider.js.map +1 -1
- package/dist/js/core/components/ui/form/checkbox/checkbox.js +4 -20
- package/dist/js/core/components/ui/form/checkbox/checkbox.js.map +1 -1
- package/dist/js/core/components/ui/form/fieldset/legend-description.js +1 -1
- package/dist/js/core/components/ui/form/fieldset/legend.js +1 -1
- package/dist/js/core/components/ui/form/input/input.js +12 -15
- package/dist/js/core/components/ui/form/input/input.js.map +1 -1
- package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js +363 -158
- package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js.map +1 -1
- package/dist/js/core/components/ui/form/radio/radio.js +1 -1
- package/dist/js/core/components/ui/form/select/select.js +3 -6
- package/dist/js/core/components/ui/form/select/select.js.map +1 -1
- package/dist/js/core/components/ui/form/textarea/textarea.js +1 -2
- package/dist/js/core/components/ui/form/textarea/textarea.js.map +1 -1
- package/dist/js/core/components/ui/image/image.js +9 -37
- package/dist/js/core/components/ui/image/image.js.map +1 -1
- package/dist/js/core/components/ui/link/link.js +25 -26
- package/dist/js/core/components/ui/link/link.js.map +1 -1
- package/dist/js/core/components/ui/modal/modal-close.js +3 -12
- package/dist/js/core/components/ui/modal/modal-close.js.map +1 -1
- package/dist/js/core/components/ui/modal/modal.js +18 -18
- package/dist/js/core/components/ui/modal/modal.js.map +1 -1
- package/dist/js/core/components/ui/pop/pop.js +131 -112
- package/dist/js/core/components/ui/pop/pop.js.map +1 -1
- package/dist/js/core/components/ui/table/table.js.map +1 -1
- package/dist/js/core/components/ui/theme/theme.js +1 -1
- package/dist/js/core/components/ui/toast/dismissed.js +9 -0
- package/dist/js/core/components/ui/toast/dismissed.js.map +1 -0
- package/dist/js/core/components/ui/toast/render-content.js +14 -0
- package/dist/js/core/components/ui/toast/render-content.js.map +1 -0
- package/dist/js/core/components/ui/toast/toast-item.js +150 -96
- package/dist/js/core/components/ui/toast/toast-item.js.map +1 -1
- package/dist/js/core/components/ui/toast/toast.js +41 -13
- package/dist/js/core/components/ui/toast/toast.js.map +1 -1
- package/dist/js/core/components/ui/tooltip/tooltip.js +144 -143
- package/dist/js/core/components/ui/tooltip/tooltip.js.map +1 -1
- package/dist/js/core/decorators/subscriber/ancestorAttribute.js.map +1 -1
- package/dist/js/core/decorators/subscriber/derive.js +3 -1
- package/dist/js/core/decorators/subscriber/derive.js.map +1 -1
- package/dist/js/core/mixins/Fetcher.js.map +1 -1
- package/dist/js/core/mixins/FormCheckable.js +1 -8
- package/dist/js/core/mixins/FormCheckable.js.map +1 -1
- package/dist/js/core/mixins/FormElement.js +26 -53
- package/dist/js/core/mixins/FormElement.js.map +1 -1
- package/dist/js/core/utils/AncestorAttributeObserver.js +130 -55
- package/dist/js/core/utils/AncestorAttributeObserver.js.map +1 -1
- package/dist/js/core/utils/LocationHandler.js +1 -1
- package/dist/js/core/utils/LocationHandler.js.map +1 -1
- package/dist/js/core/utils/dismissed.js +23 -0
- package/dist/js/core/utils/dismissed.js.map +1 -0
- package/dist/js/core/utils/mediaRef.js +37 -0
- package/dist/js/core/utils/mediaRef.js.map +1 -1
- package/dist/js/core/utils/positioning.js +110 -0
- package/dist/js/core/utils/positioning.js.map +1 -0
- package/dist/js/directives.js +1 -2
- package/dist/js/directives.js.map +1 -1
- package/dist/types/addons/interactive.d.ts +6 -0
- package/dist/types/addons/interactive.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/3d.d.ts +26 -3
- package/dist/types/core/components/functional/3d/3d.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/constants.d.ts +1 -1
- package/dist/types/core/components/functional/3d/constants.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/ensure.d.ts +3 -0
- package/dist/types/core/components/functional/3d/ensure.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/form-params.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/life.d.ts +2 -0
- package/dist/types/core/components/functional/3d/life.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/out-publish.d.ts +1 -0
- package/dist/types/core/components/functional/3d/out-publish.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/playback.d.ts +9 -0
- package/dist/types/core/components/functional/3d/playback.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/post-bind.d.ts +52 -0
- package/dist/types/core/components/functional/3d/post-bind.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/post-channels.d.ts +40 -0
- package/dist/types/core/components/functional/3d/post-channels.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/post-fx.d.ts +73 -0
- package/dist/types/core/components/functional/3d/post-fx.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/props.d.ts +42 -0
- package/dist/types/core/components/functional/3d/props.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/reload.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/runtime.d.ts +16 -1
- package/dist/types/core/components/functional/3d/runtime.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/scene-runtime.d.ts +1 -1
- package/dist/types/core/components/functional/3d/scene-runtime.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/tune.d.ts +5 -0
- package/dist/types/core/components/functional/3d/tune.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/types.d.ts +9 -0
- package/dist/types/core/components/functional/3d/types.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/updated.d.ts.map +1 -1
- package/dist/types/core/components/functional/if/if.d.ts +14 -5
- package/dist/types/core/components/functional/if/if.d.ts.map +1 -1
- package/dist/types/core/components/functional/interactive/action.d.ts +22 -0
- package/dist/types/core/components/functional/interactive/action.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/gamepad.d.ts +37 -0
- package/dist/types/core/components/functional/interactive/gamepad.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/gesture.d.ts +26 -0
- package/dist/types/core/components/functional/interactive/gesture.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/helpers.d.ts +23 -0
- package/dist/types/core/components/functional/interactive/helpers.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/index.d.ts +20 -0
- package/dist/types/core/components/functional/interactive/index.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/keyboard.d.ts +37 -0
- package/dist/types/core/components/functional/interactive/keyboard.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/matrix.d.ts +31 -0
- package/dist/types/core/components/functional/interactive/matrix.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/registry.d.ts +23 -0
- package/dist/types/core/components/functional/interactive/registry.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/store.d.ts +46 -0
- package/dist/types/core/components/functional/interactive/store.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/ticker.d.ts +33 -0
- package/dist/types/core/components/functional/interactive/ticker.d.ts.map +1 -0
- package/dist/types/core/components/functional/shader/gl-runtime.d.ts +33 -1
- package/dist/types/core/components/functional/shader/gl-runtime.d.ts.map +1 -1
- package/dist/types/core/components/functional/shader/shader.d.ts +28 -7
- package/dist/types/core/components/functional/shader/shader.d.ts.map +1 -1
- package/dist/types/core/components/functional/shader/shadertoy-prelude.d.ts +16 -2
- package/dist/types/core/components/functional/shader/shadertoy-prelude.d.ts.map +1 -1
- package/dist/types/core/components/functional/shader/types.d.ts +29 -5
- package/dist/types/core/components/functional/shader/types.d.ts.map +1 -1
- package/dist/types/core/components/functional/value/value.d.ts +6 -0
- package/dist/types/core/components/functional/value/value.d.ts.map +1 -1
- package/dist/types/core/components/functional/webgpu/gl-fallback.d.ts +4 -0
- package/dist/types/core/components/functional/webgpu/gl-fallback.d.ts.map +1 -1
- package/dist/types/core/components/functional/webgpu/gpu-runtime.d.ts +14 -0
- package/dist/types/core/components/functional/webgpu/gpu-runtime.d.ts.map +1 -1
- package/dist/types/core/components/functional/webgpu/helpers.d.ts +1 -0
- package/dist/types/core/components/functional/webgpu/helpers.d.ts.map +1 -1
- package/dist/types/core/components/functional/webgpu/webgpu.d.ts +7 -1
- package/dist/types/core/components/functional/webgpu/webgpu.d.ts.map +1 -1
- package/dist/types/core/components/ui/_css/rounded.d.ts +3 -0
- package/dist/types/core/components/ui/_css/rounded.d.ts.map +1 -0
- package/dist/types/core/components/ui/_css/type.d.ts +13 -0
- package/dist/types/core/components/ui/_css/type.d.ts.map +1 -1
- package/dist/types/core/components/ui/_i18n/ui-aria-labels.d.ts +83 -0
- package/dist/types/core/components/ui/_i18n/ui-aria-labels.d.ts.map +1 -0
- package/dist/types/core/components/ui/alert/alert.d.ts +14 -12
- package/dist/types/core/components/ui/alert/alert.d.ts.map +1 -1
- package/dist/types/core/components/ui/alert-messages/alert-messages.d.ts.map +1 -1
- package/dist/types/core/components/ui/badge/badge.d.ts +1 -1
- package/dist/types/core/components/ui/badge/badge.d.ts.map +1 -1
- package/dist/types/core/components/ui/button/button.d.ts +13 -29
- package/dist/types/core/components/ui/button/button.d.ts.map +1 -1
- package/dist/types/core/components/ui/card/card-header.d.ts.map +1 -1
- package/dist/types/core/components/ui/divider/divider.d.ts +2 -1
- package/dist/types/core/components/ui/divider/divider.d.ts.map +1 -1
- package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts +25 -73
- package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts.map +1 -1
- package/dist/types/core/components/ui/form/input/input.d.ts +14 -29
- package/dist/types/core/components/ui/form/input/input.d.ts.map +1 -1
- package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +63 -65
- package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts.map +1 -1
- package/dist/types/core/components/ui/form/radio/radio.d.ts +1 -1
- package/dist/types/core/components/ui/form/select/select.d.ts +3 -5
- package/dist/types/core/components/ui/form/select/select.d.ts.map +1 -1
- package/dist/types/core/components/ui/form/textarea/textarea.d.ts +12 -28
- package/dist/types/core/components/ui/form/textarea/textarea.d.ts.map +1 -1
- package/dist/types/core/components/ui/image/image.d.ts +2 -1
- package/dist/types/core/components/ui/image/image.d.ts.map +1 -1
- package/dist/types/core/components/ui/link/link.d.ts +10 -9
- package/dist/types/core/components/ui/link/link.d.ts.map +1 -1
- package/dist/types/core/components/ui/modal/modal-close.d.ts +2 -2
- package/dist/types/core/components/ui/modal/modal-close.d.ts.map +1 -1
- package/dist/types/core/components/ui/pop/pop.d.ts +12 -4
- package/dist/types/core/components/ui/pop/pop.d.ts.map +1 -1
- package/dist/types/core/components/ui/table/table.d.ts +2 -1
- package/dist/types/core/components/ui/table/table.d.ts.map +1 -1
- package/dist/types/core/components/ui/toast/dismissed.d.ts +3 -0
- package/dist/types/core/components/ui/toast/dismissed.d.ts.map +1 -0
- package/dist/types/core/components/ui/toast/render-content.d.ts +7 -0
- package/dist/types/core/components/ui/toast/render-content.d.ts.map +1 -0
- package/dist/types/core/components/ui/toast/toast-item.d.ts +26 -9
- package/dist/types/core/components/ui/toast/toast-item.d.ts.map +1 -1
- package/dist/types/core/components/ui/toast/toast.d.ts +6 -3
- package/dist/types/core/components/ui/toast/toast.d.ts.map +1 -1
- package/dist/types/core/components/ui/toast/types.d.ts +12 -2
- package/dist/types/core/components/ui/toast/types.d.ts.map +1 -1
- package/dist/types/core/components/ui/tooltip/tooltip.d.ts +19 -11
- package/dist/types/core/components/ui/tooltip/tooltip.d.ts.map +1 -1
- package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts +3 -4
- package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts.map +1 -1
- package/dist/types/core/decorators/subscriber/derive.d.ts.map +1 -1
- package/dist/types/core/mixins/FormCheckable.d.ts +10 -27
- package/dist/types/core/mixins/FormCheckable.d.ts.map +1 -1
- package/dist/types/core/mixins/FormElement.d.ts +21 -10
- package/dist/types/core/mixins/FormElement.d.ts.map +1 -1
- package/dist/types/core/mixins/FormInput.d.ts +11 -27
- package/dist/types/core/mixins/FormInput.d.ts.map +1 -1
- package/dist/types/core/utils/AncestorAttributeObserver.d.ts +17 -9
- package/dist/types/core/utils/AncestorAttributeObserver.d.ts.map +1 -1
- package/dist/types/core/utils/LocationHandler.d.ts +3 -2
- package/dist/types/core/utils/LocationHandler.d.ts.map +1 -1
- package/dist/types/core/utils/dismissed.d.ts +3 -0
- package/dist/types/core/utils/dismissed.d.ts.map +1 -0
- package/dist/types/core/utils/mediaRef.d.ts +15 -0
- package/dist/types/core/utils/mediaRef.d.ts.map +1 -1
- package/dist/types/core/utils/positioning.d.ts +44 -0
- package/dist/types/core/utils/positioning.d.ts.map +1 -0
- package/dist/types/directives.d.ts +1 -3
- package/dist/types/directives.d.ts.map +1 -1
- package/dist/types/mixins.d.ts +22 -55
- package/dist/types/mixins.d.ts.map +1 -1
- package/docs/assets/{index-FmK4JaIM.js → index-D8MVWqY6.js} +946 -687
- package/docs/assets/index-DiD0qYvE.css +1 -0
- package/docs/crawl/core/components/ui/form/input-autocomplete/input-autocomplete.html +17 -85
- package/docs/crawl/docs/_misc/formelement-subscriber-removal.html +1 -1
- package/docs/crawl/hubs/form-components.html +13 -11
- package/docs/docs-mock-api-sw.js +5 -1
- package/docs/docs-mock-api-sw.js.map +2 -2
- package/docs/index.html +2 -2
- package/docs/llms-full.txt +12 -38
- package/docs/llms.txt +1 -1
- package/docs/src/core/components/functional/sdui/sdui.md +0 -0
- package/docs/src/core/components/ui/form/checkbox/checkbox.md +0 -0
- package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +14 -118
- package/docs/src/docs/_getting-started/create-a-component.md +0 -0
- package/docs/src/docs/_misc/formelement-subscriber-removal.md +1 -1
- package/docs/src/docs/search/docs-search.json +195 -200
- package/docs/src/tsconfig.json +324 -0
- package/gitlab/job_tests.sh +25 -12
- package/index.html +3 -3
- package/package.json +217 -9
- package/public/docs-mock-api-sw.js +5 -1
- package/public/docs-mock-api-sw.js.map +2 -2
- package/scripts/build-addons.mjs +2 -2
- package/scripts/post-build.mjs +9 -0
- package/src/addons/interactive.ts +5 -0
- package/src/core/components/functional/3d/3d.md +34 -1
- package/src/core/components/functional/3d/3d.spec.ts +42 -0
- package/src/core/components/functional/3d/3d.ts +101 -3
- package/src/core/components/functional/3d/constants.ts +1 -0
- package/src/core/components/functional/3d/ensure.ts +11 -3
- package/src/core/components/functional/3d/form-params.ts +2 -0
- package/src/core/components/functional/3d/life.ts +4 -1
- package/src/core/components/functional/3d/out-publish.ts +4 -3
- package/src/core/components/functional/3d/playback.ts +13 -1
- package/src/core/components/functional/3d/post-bind.ts +262 -0
- package/src/core/components/functional/3d/post-channels.spec.ts +36 -0
- package/src/core/components/functional/3d/post-channels.ts +69 -0
- package/src/core/components/functional/3d/post-fx.ts +594 -0
- package/src/core/components/functional/3d/props.ts +45 -0
- package/src/core/components/functional/3d/reload.ts +2 -0
- package/src/core/components/functional/3d/runtime.ts +93 -4
- package/src/core/components/functional/3d/scene-runtime.ts +3 -0
- package/src/core/components/functional/3d/tune.ts +21 -0
- package/src/core/components/functional/3d/types.ts +9 -0
- package/src/core/components/functional/3d/updated.ts +17 -1
- package/src/core/components/functional/if/if.ts +54 -7
- package/src/core/components/functional/interactive/action.ts +84 -0
- package/src/core/components/functional/interactive/gamepad.ts +197 -0
- package/src/core/components/functional/interactive/gesture.ts +136 -0
- package/src/core/components/functional/interactive/helpers.spec.ts +50 -0
- package/src/core/components/functional/interactive/helpers.ts +97 -0
- package/src/core/components/functional/interactive/index.ts +25 -0
- package/src/core/components/functional/interactive/interactive.md +33 -0
- package/src/core/components/functional/interactive/keyboard.ts +171 -0
- package/src/core/components/functional/interactive/matrix.ts +185 -0
- package/src/core/components/functional/interactive/registry.ts +46 -0
- package/src/core/components/functional/interactive/store.ts +264 -0
- package/src/core/components/functional/interactive/ticker.ts +171 -0
- package/src/core/components/functional/list/list.ts +0 -0
- package/src/core/components/functional/shader/gl-runtime.ts +169 -12
- package/src/core/components/functional/shader/shader.md +27 -4
- package/src/core/components/functional/shader/shader.spec.ts +267 -0
- package/src/core/components/functional/shader/shader.ts +177 -55
- package/src/core/components/functional/shader/shadertoy-prelude.ts +49 -5
- package/src/core/components/functional/shader/types.ts +89 -12
- package/src/core/components/functional/subscriber/subscriber.ts +0 -0
- package/src/core/components/functional/value/value.ts +44 -4
- package/src/core/components/functional/webgpu/gl-fallback.ts +28 -4
- package/src/core/components/functional/webgpu/gpu-runtime.ts +154 -18
- package/src/core/components/functional/webgpu/helpers.ts +8 -2
- package/src/core/components/functional/webgpu/webgpu.md +13 -2
- package/src/core/components/functional/webgpu/webgpu.spec.ts +37 -0
- package/src/core/components/functional/webgpu/webgpu.ts +39 -1
- package/src/core/components/ui/_css/rounded.ts +36 -0
- package/src/core/components/ui/_css/type.ts +49 -0
- package/src/core/components/ui/_i18n/ui-aria-labels.ts +104 -0
- package/src/core/components/ui/alert/alert.md +128 -72
- package/src/core/components/ui/alert/alert.spec.ts +145 -0
- package/src/core/components/ui/alert/alert.ts +86 -91
- package/src/core/components/ui/alert-messages/alert-messages.ts +1 -1
- package/src/core/components/ui/badge/badge.md +126 -78
- package/src/core/components/ui/badge/badge.ts +29 -81
- package/src/core/components/ui/button/button.md +1 -0
- package/src/core/components/ui/button/button.ts +12 -10
- package/src/core/components/ui/card/card-header.ts +7 -2
- package/src/core/components/ui/card/card.md +120 -65
- package/src/core/components/ui/divider/divider.ts +4 -9
- package/src/core/components/ui/form/checkbox/checkbox.md +1 -1
- package/src/core/components/ui/form/checkbox/checkbox.ts +4 -20
- package/src/core/components/ui/form/fieldset/legend-description.ts +1 -1
- package/src/core/components/ui/form/fieldset/legend.ts +1 -1
- package/src/core/components/ui/form/input/input.md +1 -1
- package/src/core/components/ui/form/input/input.ts +25 -27
- package/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +14 -118
- package/src/core/components/ui/form/input-autocomplete/input-autocomplete.ts +419 -187
- package/src/core/components/ui/form/radio/radio.ts +1 -1
- package/src/core/components/ui/form/select/select.ts +3 -6
- package/src/core/components/ui/form/textarea/textarea.md +1 -1
- package/src/core/components/ui/form/textarea/textarea.ts +1 -2
- package/src/core/components/ui/image/image.md +147 -53
- package/src/core/components/ui/image/image.ts +10 -44
- package/src/core/components/ui/link/link.md +2 -2
- package/src/core/components/ui/link/link.ts +42 -37
- package/src/core/components/ui/modal/modal-close.ts +8 -12
- package/src/core/components/ui/modal/modal.ts +18 -18
- package/src/core/components/ui/pop/pop.md +105 -1
- package/src/core/components/ui/pop/pop.ts +145 -141
- package/src/core/components/ui/table/table.ts +2 -8
- package/src/core/components/ui/theme/theme.ts +1 -1
- package/src/core/components/ui/toast/dismissed.ts +14 -0
- package/src/core/components/ui/toast/render-content.ts +13 -0
- package/src/core/components/ui/toast/toast-item.ts +179 -103
- package/src/core/components/ui/toast/toast.ts +58 -21
- package/src/core/components/ui/toast/types.ts +14 -2
- package/src/core/components/ui/tooltip/tooltip.ts +176 -154
- package/src/core/decorators/subscriber/ancestorAttribute.spec.ts +26 -0
- package/src/core/decorators/subscriber/ancestorAttribute.ts +3 -4
- package/src/core/decorators/subscriber/derive.ts +3 -3
- package/src/core/mixins/Fetcher.ts +1 -1
- package/src/core/mixins/FormCheckable.ts +1 -8
- package/src/core/mixins/FormElement.ts +74 -76
- package/src/core/mixins/Subscriber.ts +0 -0
- package/src/core/utils/AncestorAttributeObserver.ts +183 -70
- package/src/core/utils/DataBindObserver.ts +0 -0
- package/src/core/utils/LocationHandler.ts +12 -5
- package/src/core/utils/Objects.ts +0 -0
- package/src/core/utils/dismissed.ts +22 -0
- package/src/core/utils/mediaRef.spec.ts +25 -0
- package/src/core/utils/mediaRef.ts +45 -0
- package/src/core/utils/positioning.spec.ts +208 -0
- package/src/core/utils/positioning.ts +183 -0
- package/src/directives.ts +1 -3
- package/src/docs/_core-concept/dataFlow.md +1 -1
- package/src/docs/_decorators/ancestor-attribute.md +3 -2
- package/src/docs/_getting-started/concorde-outside.md +3 -3
- package/src/docs/_misc/formelement-subscriber-removal.md +115 -0
- package/src/docs/_misc/html-integration.md +2 -0
- package/src/docs/_misc/visual-stack.md +19 -1
- package/src/docs/code.ts +3 -1
- package/src/docs/components/docs-demo-sources.ts +88 -0
- package/src/docs/docs.ts +3 -0
- package/src/docs/example/docs-3d-post-depth-demo.ts +68 -0
- package/src/docs/example/docs-3d-webgpu-live-demo.ts +83 -0
- package/src/docs/example/docs-harris-webgpu-demo.ts +53 -55
- package/src/docs/example/docs-input-autocomplete-demos.ts +110 -0
- package/src/docs/mock-api/router.ts +17 -1
- package/src/docs/navigation/navigation.ts +4 -0
- package/src/docs/search/docs-search.json +922 -1762
- package/src/docs/tailwind/css/tailwind.css +13 -6
- package/src/tsconfig.json +162 -6
- package/src/tsconfig.tsbuildinfo +1 -1
- package/tailwind.config.js +50 -3
- package/vite/config.js +23 -35
- package/vite.config.mts +5 -0
- package/vitest.setup.ts +49 -13
- package/docs/assets/index-BZiZXMU-.css +0 -1
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, css, html } from "lit";
|
|
8
|
+
import { customElement, property } from "lit/decorators.js";
|
|
9
|
+
import { dispatch } from "./registry";
|
|
10
|
+
const tagName = "sonic-keyboard";
|
|
11
|
+
/**
|
|
12
|
+
* Source d’actions clavier → store (`target`).
|
|
13
|
+
* Opt-in `@supersoniks/concorde/interactive`.
|
|
14
|
+
*/
|
|
15
|
+
let SonicKeyboard = class SonicKeyboard extends LitElement {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.target = "";
|
|
19
|
+
this.keymap = {};
|
|
20
|
+
/** `document` | `focus` */
|
|
21
|
+
this.scope = "document";
|
|
22
|
+
/** `{ "left": [delayMs, intervalMs] }` */
|
|
23
|
+
this.repeat = {};
|
|
24
|
+
this.keyup = false;
|
|
25
|
+
this.dispatchEventFlag = false;
|
|
26
|
+
this.held = new Map();
|
|
27
|
+
this.onVis = () => {
|
|
28
|
+
if (document.hidden)
|
|
29
|
+
this.releaseAll();
|
|
30
|
+
};
|
|
31
|
+
this.onKeyDown = (ev) => {
|
|
32
|
+
const e = ev;
|
|
33
|
+
if (e.repeat)
|
|
34
|
+
return; // handled via our DAS/ARR
|
|
35
|
+
if (this.isEditableTarget(e.target))
|
|
36
|
+
return;
|
|
37
|
+
const code = e.code || e.key;
|
|
38
|
+
const mapped = this.keymap?.[code] ?? this.keymap?.[e.key];
|
|
39
|
+
if (!mapped)
|
|
40
|
+
return;
|
|
41
|
+
e.preventDefault();
|
|
42
|
+
const action = this.toAction(mapped);
|
|
43
|
+
this.emit(action);
|
|
44
|
+
const rep = this.repeat?.[action.type];
|
|
45
|
+
if (rep) {
|
|
46
|
+
const [delay, interval] = rep;
|
|
47
|
+
const entry = {
|
|
48
|
+
type: action.type,
|
|
49
|
+
payload: action.payload,
|
|
50
|
+
timer: window.setTimeout(() => {
|
|
51
|
+
this.emit({ type: action.type, payload: action.payload });
|
|
52
|
+
entry.interval = window.setInterval(() => {
|
|
53
|
+
this.emit({ type: action.type, payload: action.payload });
|
|
54
|
+
}, Math.max(16, interval));
|
|
55
|
+
}, Math.max(0, delay)),
|
|
56
|
+
};
|
|
57
|
+
this.held.set(code, entry);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
this.held.set(code, { type: action.type, payload: action.payload });
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
this.onKeyUp = (ev) => {
|
|
64
|
+
const e = ev;
|
|
65
|
+
const code = e.code || e.key;
|
|
66
|
+
const held = this.held.get(code);
|
|
67
|
+
if (held) {
|
|
68
|
+
if (held.timer)
|
|
69
|
+
clearTimeout(held.timer);
|
|
70
|
+
if (held.interval)
|
|
71
|
+
clearInterval(held.interval);
|
|
72
|
+
this.held.delete(code);
|
|
73
|
+
if (this.keyup) {
|
|
74
|
+
this.emit({ type: `${held.type}:up`, payload: held.payload });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
this.releaseAll = () => {
|
|
79
|
+
for (const [, held] of this.held) {
|
|
80
|
+
if (held.timer)
|
|
81
|
+
clearTimeout(held.timer);
|
|
82
|
+
if (held.interval)
|
|
83
|
+
clearInterval(held.interval);
|
|
84
|
+
}
|
|
85
|
+
this.held.clear();
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
connectedCallback() {
|
|
89
|
+
super.connectedCallback();
|
|
90
|
+
if (this.scope === "focus") {
|
|
91
|
+
if (!this.hasAttribute("tabindex"))
|
|
92
|
+
this.tabIndex = 0;
|
|
93
|
+
}
|
|
94
|
+
this.bindTarget().addEventListener("keydown", this.onKeyDown);
|
|
95
|
+
this.bindTarget().addEventListener("keyup", this.onKeyUp);
|
|
96
|
+
window.addEventListener("blur", this.releaseAll);
|
|
97
|
+
document.addEventListener("visibilitychange", this.onVis);
|
|
98
|
+
}
|
|
99
|
+
disconnectedCallback() {
|
|
100
|
+
this.bindTarget().removeEventListener("keydown", this.onKeyDown);
|
|
101
|
+
this.bindTarget().removeEventListener("keyup", this.onKeyUp);
|
|
102
|
+
window.removeEventListener("blur", this.releaseAll);
|
|
103
|
+
document.removeEventListener("visibilitychange", this.onVis);
|
|
104
|
+
this.releaseAll();
|
|
105
|
+
super.disconnectedCallback();
|
|
106
|
+
}
|
|
107
|
+
updated(changed) {
|
|
108
|
+
if (changed.has("scope")) {
|
|
109
|
+
// rebind would need disconnect/connect; keep simple: focus ring attrs
|
|
110
|
+
if (this.scope === "focus" && !this.hasAttribute("tabindex"))
|
|
111
|
+
this.tabIndex = 0;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
bindTarget() {
|
|
115
|
+
return this.scope === "focus" ? this : window;
|
|
116
|
+
}
|
|
117
|
+
isEditableTarget(t) {
|
|
118
|
+
if (!(t instanceof HTMLElement))
|
|
119
|
+
return false;
|
|
120
|
+
const tag = t.tagName;
|
|
121
|
+
if (tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT")
|
|
122
|
+
return true;
|
|
123
|
+
if (t.isContentEditable)
|
|
124
|
+
return true;
|
|
125
|
+
return Boolean(t.closest("input,textarea,select,[contenteditable=true]"));
|
|
126
|
+
}
|
|
127
|
+
toAction(mapped) {
|
|
128
|
+
if (typeof mapped === "string")
|
|
129
|
+
return { type: mapped };
|
|
130
|
+
return { type: mapped.type, payload: mapped.payload };
|
|
131
|
+
}
|
|
132
|
+
emit(action) {
|
|
133
|
+
if (this.target)
|
|
134
|
+
dispatch(this.target, action);
|
|
135
|
+
if (this.dispatchEventFlag) {
|
|
136
|
+
this.dispatchEvent(new CustomEvent("sonic-action", {
|
|
137
|
+
detail: action,
|
|
138
|
+
bubbles: true,
|
|
139
|
+
composed: true,
|
|
140
|
+
}));
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
render() {
|
|
144
|
+
return this.scope === "focus" ? html `<slot></slot>` : html ``;
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
SonicKeyboard.styles = css `
|
|
148
|
+
:host {
|
|
149
|
+
display: contents;
|
|
150
|
+
}
|
|
151
|
+
:host([scope="focus"]) {
|
|
152
|
+
display: block;
|
|
153
|
+
outline: none;
|
|
154
|
+
}
|
|
155
|
+
:host([scope="focus"]:focus) {
|
|
156
|
+
outline: 2px solid var(--sc-primary, #3b82f6);
|
|
157
|
+
outline-offset: 2px;
|
|
158
|
+
}
|
|
159
|
+
`;
|
|
160
|
+
__decorate([
|
|
161
|
+
property({ type: String })
|
|
162
|
+
], SonicKeyboard.prototype, "target", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
property({ type: Object })
|
|
165
|
+
], SonicKeyboard.prototype, "keymap", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
property({ type: String })
|
|
168
|
+
], SonicKeyboard.prototype, "scope", void 0);
|
|
169
|
+
__decorate([
|
|
170
|
+
property({ type: Object })
|
|
171
|
+
], SonicKeyboard.prototype, "repeat", void 0);
|
|
172
|
+
__decorate([
|
|
173
|
+
property({ type: Boolean })
|
|
174
|
+
], SonicKeyboard.prototype, "keyup", void 0);
|
|
175
|
+
__decorate([
|
|
176
|
+
property({ type: Boolean, attribute: "dispatch-event" })
|
|
177
|
+
], SonicKeyboard.prototype, "dispatchEventFlag", void 0);
|
|
178
|
+
SonicKeyboard = __decorate([
|
|
179
|
+
customElement(tagName)
|
|
180
|
+
], SonicKeyboard);
|
|
181
|
+
export { SonicKeyboard };
|
|
182
|
+
export default SonicKeyboard;
|
|
183
|
+
//# sourceMappingURL=keyboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyboard.js","sourceRoot":"","sources":["../../../../../../src/core/components/functional/interactive/keyboard.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAA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I,EAAE,MAAM,EAAE,CAAC;6CACJ;AAGvB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CACd;AAGd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;wDAC/B;AAjCf,aAAa;IADzB,aAAa,CAAC,OAAO,CAAC;GACV,aAAa,CAwJzB;;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, css, html } from "lit";
|
|
8
|
+
import { customElement, property, query } from "lit/decorators.js";
|
|
9
|
+
import { Subscriber } from "@supersoniks/concorde/mixins";
|
|
10
|
+
const tagName = "sonic-matrix";
|
|
11
|
+
function pathGet(obj, path) {
|
|
12
|
+
if (!path)
|
|
13
|
+
return obj;
|
|
14
|
+
let cur = obj;
|
|
15
|
+
for (const p of path.split(".").filter(Boolean)) {
|
|
16
|
+
if (cur == null)
|
|
17
|
+
return undefined;
|
|
18
|
+
cur = cur[p];
|
|
19
|
+
}
|
|
20
|
+
return cur;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Rendu canvas d’une grille 2D (number[][] ou flat + cols) depuis dataProvider.
|
|
24
|
+
*/
|
|
25
|
+
let SonicMatrix = class SonicMatrix extends Subscriber(LitElement) {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
/** Clé vers la matrice dans le DP. */
|
|
29
|
+
this.key = "grid";
|
|
30
|
+
this.cols = 0;
|
|
31
|
+
this.palette = {
|
|
32
|
+
"0": "transparent",
|
|
33
|
+
"1": "#00f0f0",
|
|
34
|
+
"2": "#0000f0",
|
|
35
|
+
"3": "#f0a000",
|
|
36
|
+
"4": "#f0f000",
|
|
37
|
+
"5": "#00f000",
|
|
38
|
+
"6": "#a000f0",
|
|
39
|
+
"7": "#f00000",
|
|
40
|
+
};
|
|
41
|
+
/** Taille cellule px, ou `auto`. */
|
|
42
|
+
this.cell = "24";
|
|
43
|
+
this.gap = 1;
|
|
44
|
+
this.radius = 2;
|
|
45
|
+
/** Clé couche fantôme optionnelle. */
|
|
46
|
+
this.ghostKey = "";
|
|
47
|
+
this.labelKey = "";
|
|
48
|
+
this.lastSig = "";
|
|
49
|
+
}
|
|
50
|
+
connectedCallback() {
|
|
51
|
+
super.connectedCallback();
|
|
52
|
+
this.setAttribute("role", "img");
|
|
53
|
+
}
|
|
54
|
+
updated() {
|
|
55
|
+
this.draw();
|
|
56
|
+
}
|
|
57
|
+
readGrid() {
|
|
58
|
+
const props = this.props;
|
|
59
|
+
const raw = props ? pathGet(props, this.key) : undefined;
|
|
60
|
+
if (Array.isArray(raw) && Array.isArray(raw[0])) {
|
|
61
|
+
return raw;
|
|
62
|
+
}
|
|
63
|
+
if (Array.isArray(raw) && this.cols > 0) {
|
|
64
|
+
const flat = raw;
|
|
65
|
+
const out = [];
|
|
66
|
+
for (let i = 0; i < flat.length; i += this.cols) {
|
|
67
|
+
out.push(flat.slice(i, i + this.cols).map((n) => Number(n) || 0));
|
|
68
|
+
}
|
|
69
|
+
return out;
|
|
70
|
+
}
|
|
71
|
+
return [];
|
|
72
|
+
}
|
|
73
|
+
readGhost() {
|
|
74
|
+
if (!this.ghostKey)
|
|
75
|
+
return null;
|
|
76
|
+
const props = this.props;
|
|
77
|
+
const raw = props ? pathGet(props, this.ghostKey) : undefined;
|
|
78
|
+
if (Array.isArray(raw) && Array.isArray(raw[0]))
|
|
79
|
+
return raw;
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
colorFor(v, ghost = false) {
|
|
83
|
+
const c = this.palette?.[String(v)] ?? this.palette?.[v] ?? "#888";
|
|
84
|
+
if (!ghost)
|
|
85
|
+
return c;
|
|
86
|
+
if (c === "transparent")
|
|
87
|
+
return c;
|
|
88
|
+
return c.startsWith("var(") ? c : `${c}66`;
|
|
89
|
+
}
|
|
90
|
+
draw() {
|
|
91
|
+
const grid = this.readGrid();
|
|
92
|
+
const ghost = this.readGhost();
|
|
93
|
+
const h = grid.length;
|
|
94
|
+
const w = h ? grid[0].length : 0;
|
|
95
|
+
if (!w || !h || !this.canvas)
|
|
96
|
+
return;
|
|
97
|
+
const sig = JSON.stringify({ grid, ghost, palette: this.palette, cell: this.cell, gap: this.gap });
|
|
98
|
+
if (sig === this.lastSig)
|
|
99
|
+
return;
|
|
100
|
+
this.lastSig = sig;
|
|
101
|
+
const hostW = this.clientWidth || w * 24;
|
|
102
|
+
const cellPx = this.cell === "auto" ? Math.max(1, Math.floor(hostW / w)) : Math.max(1, Number(this.cell) || 24);
|
|
103
|
+
const gap = Math.max(0, this.gap);
|
|
104
|
+
const dpr = Math.min(2, window.devicePixelRatio || 1);
|
|
105
|
+
const cssW = w * cellPx;
|
|
106
|
+
const cssH = h * cellPx;
|
|
107
|
+
this.canvas.width = Math.floor(cssW * dpr);
|
|
108
|
+
this.canvas.height = Math.floor(cssH * dpr);
|
|
109
|
+
this.canvas.style.width = `${cssW}px`;
|
|
110
|
+
this.canvas.style.height = `${cssH}px`;
|
|
111
|
+
const ctx = this.canvas.getContext("2d");
|
|
112
|
+
if (!ctx)
|
|
113
|
+
return;
|
|
114
|
+
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
115
|
+
ctx.clearRect(0, 0, cssW, cssH);
|
|
116
|
+
const paint = (mat, ghostLayer) => {
|
|
117
|
+
for (let y = 0; y < mat.length; y++) {
|
|
118
|
+
const row = mat[y];
|
|
119
|
+
for (let x = 0; x < row.length; x++) {
|
|
120
|
+
const v = Number(row[x]) || 0;
|
|
121
|
+
if (!v && !ghostLayer)
|
|
122
|
+
continue;
|
|
123
|
+
if (!v)
|
|
124
|
+
continue;
|
|
125
|
+
ctx.fillStyle = this.colorFor(v, ghostLayer);
|
|
126
|
+
const px = x * cellPx + gap;
|
|
127
|
+
const py = y * cellPx + gap;
|
|
128
|
+
const s = cellPx - gap * 2;
|
|
129
|
+
if (this.radius > 0) {
|
|
130
|
+
const r = Math.min(this.radius, s / 2);
|
|
131
|
+
ctx.beginPath();
|
|
132
|
+
ctx.roundRect(px, py, s, s, r);
|
|
133
|
+
ctx.fill();
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
ctx.fillRect(px, py, s, s);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
if (ghost)
|
|
142
|
+
paint(ghost, true);
|
|
143
|
+
paint(grid, false);
|
|
144
|
+
if (this.labelKey) {
|
|
145
|
+
const props = this.props;
|
|
146
|
+
const label = props ? pathGet(props, this.labelKey) : undefined;
|
|
147
|
+
if (label != null)
|
|
148
|
+
this.setAttribute("aria-label", String(label));
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
render() {
|
|
152
|
+
return html `<canvas></canvas>`;
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
SonicMatrix.styles = css `
|
|
156
|
+
:host {
|
|
157
|
+
display: block;
|
|
158
|
+
width: 100%;
|
|
159
|
+
max-width: 100%;
|
|
160
|
+
line-height: 0;
|
|
161
|
+
}
|
|
162
|
+
canvas {
|
|
163
|
+
display: block;
|
|
164
|
+
width: 100%;
|
|
165
|
+
height: auto;
|
|
166
|
+
image-rendering: pixelated;
|
|
167
|
+
}
|
|
168
|
+
`;
|
|
169
|
+
__decorate([
|
|
170
|
+
property({ type: String })
|
|
171
|
+
], SonicMatrix.prototype, "key", void 0);
|
|
172
|
+
__decorate([
|
|
173
|
+
property({ type: Number })
|
|
174
|
+
], SonicMatrix.prototype, "cols", void 0);
|
|
175
|
+
__decorate([
|
|
176
|
+
property({ type: Object })
|
|
177
|
+
], SonicMatrix.prototype, "palette", void 0);
|
|
178
|
+
__decorate([
|
|
179
|
+
property({ type: String })
|
|
180
|
+
], SonicMatrix.prototype, "cell", void 0);
|
|
181
|
+
__decorate([
|
|
182
|
+
property({ type: Number })
|
|
183
|
+
], SonicMatrix.prototype, "gap", void 0);
|
|
184
|
+
__decorate([
|
|
185
|
+
property({ type: Number })
|
|
186
|
+
], SonicMatrix.prototype, "radius", void 0);
|
|
187
|
+
__decorate([
|
|
188
|
+
property({ type: String, attribute: "ghost-key" })
|
|
189
|
+
], SonicMatrix.prototype, "ghostKey", void 0);
|
|
190
|
+
__decorate([
|
|
191
|
+
property({ type: String, attribute: "label-key" })
|
|
192
|
+
], SonicMatrix.prototype, "labelKey", void 0);
|
|
193
|
+
__decorate([
|
|
194
|
+
query("canvas")
|
|
195
|
+
], SonicMatrix.prototype, "canvas", void 0);
|
|
196
|
+
SonicMatrix = __decorate([
|
|
197
|
+
customElement(tagName)
|
|
198
|
+
], SonicMatrix);
|
|
199
|
+
export { SonicMatrix };
|
|
200
|
+
export default SonicMatrix;
|
|
201
|
+
//# sourceMappingURL=matrix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matrix.js","sourceRoot":"","sources":["../../../../../../src/core/components/functional/interactive/matrix.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,MAAM,OAAO,GAAG,cAAc,CAAC;AAI/B,S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AQ,CAAC;2CAAoC;AApDzC,WAAW;IADvB,aAAa,CAAC,OAAO,CAAC;GACV,WAAW,CAgKvB;;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registre global des sonic-store + dispatch typé.
|
|
3
|
+
* Utilisé par keyboard / gamepad / gesture / action / ticker.
|
|
4
|
+
*/
|
|
5
|
+
const stores = new Map();
|
|
6
|
+
export function registerStore(handle) {
|
|
7
|
+
stores.set(handle.id, handle);
|
|
8
|
+
}
|
|
9
|
+
export function unregisterStore(id) {
|
|
10
|
+
stores.delete(id);
|
|
11
|
+
}
|
|
12
|
+
export function getStore(id) {
|
|
13
|
+
return stores.get(id);
|
|
14
|
+
}
|
|
15
|
+
/** Dispatch une action vers un store enregistré. No-op si absent. */
|
|
16
|
+
export function dispatch(storeId, action) {
|
|
17
|
+
const store = stores.get(storeId);
|
|
18
|
+
if (!store)
|
|
19
|
+
return;
|
|
20
|
+
store.dispatch({
|
|
21
|
+
...action,
|
|
22
|
+
t: action.t ?? performance.now(),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
export function listStoreIds() {
|
|
26
|
+
return [...stores.keys()];
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../../../src/core/components/functional/interactive/registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgBH,MAAM,MAAM,GAAG,IAAI,GAAG,EAAuB,CAAC;AAE9C,MAAM,UAAU,aAAa,CAAC,MAAmB;IAC/C,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,EAAU;IACxC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,EAAU;IACjC,OAAO,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AACxB,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,QAAQ,CAAC,OAAe,EAAE,MAA0B;IAClE,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAClC,IAAI,CAAC,KAAK;QAAE,OAAO;IACnB,KAAK,CAAC,QAAQ,CAAC;QACb,GAAG,MAAM;QACT,CAAC,EAAE,MAAM,CAAC,CAAC,IAAI,WAAW,CAAC,GAAG,EAAE;KACjC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,OAAO,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;AAC5B,CAAC"}
|