@supersoniks/concorde 4.9.96 → 4.9.97-visual-stack.0
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/README.md +34 -17
- package/build-infos.json +1 -1
- package/concorde-3d.bundle.js +3911 -0
- package/concorde-3d.es.js +32635 -0
- package/concorde-core.bundle.js +147 -147
- package/concorde-core.es.js +4375 -4282
- package/concorde-hugging-face-infer.bundle.js +32 -0
- package/concorde-hugging-face-infer.es.js +2952 -0
- package/concorde-shader.bundle.js +105 -0
- package/concorde-shader.es.js +7982 -0
- package/concorde-webgpu.bundle.js +296 -0
- package/concorde-webgpu.es.js +8268 -0
- package/dist/concorde-3d.bundle.js +3911 -0
- package/dist/concorde-3d.es.js +32635 -0
- package/dist/concorde-core.bundle.js +147 -147
- package/dist/concorde-core.es.js +4375 -4282
- package/dist/concorde-hugging-face-infer.bundle.js +32 -0
- package/dist/concorde-hugging-face-infer.es.js +2952 -0
- package/dist/concorde-shader.bundle.js +105 -0
- package/dist/concorde-shader.es.js +7982 -0
- package/dist/concorde-webgpu.bundle.js +296 -0
- package/dist/concorde-webgpu.es.js +8268 -0
- package/dist/docs/hf-samples/beach.jpg +0 -0
- package/dist/docs/hf-samples/cats.jpg +0 -0
- package/dist/docs/hf-samples/corgi.jpg +0 -0
- package/dist/docs/hf-samples/portrait.jpg +0 -0
- package/dist/docs/hf-samples/scene.jpg +0 -0
- package/dist/docs/hf-samples/singer.jpg +0 -0
- package/dist/docs/shader-samples/color.jpg +0 -0
- package/dist/docs/shader-samples/depth.png +0 -0
- package/dist/docs/shader-samples/impact.jpg +0 -0
- package/dist/docs/shader-samples/video.webm +0 -0
- package/dist/js/addons/3d.js +6 -0
- package/dist/js/addons/3d.js.map +1 -0
- package/dist/js/addons/hugging-face-infer.js +8 -0
- package/dist/js/addons/hugging-face-infer.js.map +1 -0
- package/dist/js/addons/shader.js +6 -0
- package/dist/js/addons/shader.js.map +1 -0
- package/dist/js/addons/webgpu.js +7 -0
- package/dist/js/addons/webgpu.js.map +1 -0
- package/dist/js/components.js +12 -0
- package/dist/js/components.js.map +1 -0
- package/dist/js/concorde-loaded.js +5 -0
- package/dist/js/concorde-loaded.js.map +1 -0
- package/dist/js/core/_types/endpoint.js +5 -0
- package/dist/js/core/_types/endpoint.js.map +1 -0
- package/dist/js/core/_types/key.js +2 -0
- package/dist/js/core/_types/key.js.map +1 -0
- package/dist/js/core/_types/types.js +3 -0
- package/dist/js/core/_types/types.js.map +1 -0
- package/dist/js/core/components/functional/3d/3d.js +151 -0
- package/dist/js/core/components/functional/3d/3d.js.map +1 -0
- package/dist/js/core/components/functional/3d/asset.js +20 -0
- package/dist/js/core/components/functional/3d/asset.js.map +1 -0
- package/dist/js/core/components/functional/3d/boot.js +47 -0
- package/dist/js/core/components/functional/3d/boot.js.map +1 -0
- package/dist/js/core/components/functional/3d/constants.js +88 -0
- package/dist/js/core/components/functional/3d/constants.js.map +1 -0
- package/dist/js/core/components/functional/3d/demo-content.js +38 -0
- package/dist/js/core/components/functional/3d/demo-content.js.map +1 -0
- package/dist/js/core/components/functional/3d/ensure.js +73 -0
- package/dist/js/core/components/functional/3d/ensure.js.map +1 -0
- package/dist/js/core/components/functional/3d/form-bind.js +25 -0
- package/dist/js/core/components/functional/3d/form-bind.js.map +1 -0
- package/dist/js/core/components/functional/3d/form-fields.js +76 -0
- package/dist/js/core/components/functional/3d/form-fields.js.map +1 -0
- package/dist/js/core/components/functional/3d/form-params.js +67 -0
- package/dist/js/core/components/functional/3d/form-params.js.map +1 -0
- package/dist/js/core/components/functional/3d/frame-capture.js +108 -0
- package/dist/js/core/components/functional/3d/frame-capture.js.map +1 -0
- package/dist/js/core/components/functional/3d/gl.js +34 -0
- package/dist/js/core/components/functional/3d/gl.js.map +1 -0
- package/dist/js/core/components/functional/3d/life.js +55 -0
- package/dist/js/core/components/functional/3d/life.js.map +1 -0
- package/dist/js/core/components/functional/3d/load.js +109 -0
- package/dist/js/core/components/functional/3d/load.js.map +1 -0
- package/dist/js/core/components/functional/3d/ops.js +78 -0
- package/dist/js/core/components/functional/3d/ops.js.map +1 -0
- package/dist/js/core/components/functional/3d/opts.js +2 -0
- package/dist/js/core/components/functional/3d/opts.js.map +1 -0
- package/dist/js/core/components/functional/3d/orbit.js +136 -0
- package/dist/js/core/components/functional/3d/orbit.js.map +1 -0
- package/dist/js/core/components/functional/3d/out-publish.js +103 -0
- package/dist/js/core/components/functional/3d/out-publish.js.map +1 -0
- package/dist/js/core/components/functional/3d/parse.js +95 -0
- package/dist/js/core/components/functional/3d/parse.js.map +1 -0
- package/dist/js/core/components/functional/3d/pick.js +62 -0
- package/dist/js/core/components/functional/3d/pick.js.map +1 -0
- package/dist/js/core/components/functional/3d/playback.js +56 -0
- package/dist/js/core/components/functional/3d/playback.js.map +1 -0
- package/dist/js/core/components/functional/3d/pointer.js +58 -0
- package/dist/js/core/components/functional/3d/pointer.js.map +1 -0
- package/dist/js/core/components/functional/3d/props.js +105 -0
- package/dist/js/core/components/functional/3d/props.js.map +1 -0
- package/dist/js/core/components/functional/3d/publisher-listen.js +6 -0
- package/dist/js/core/components/functional/3d/publisher-listen.js.map +1 -0
- package/dist/js/core/components/functional/3d/reload.js +60 -0
- package/dist/js/core/components/functional/3d/reload.js.map +1 -0
- package/dist/js/core/components/functional/3d/runtime.js +116 -0
- package/dist/js/core/components/functional/3d/runtime.js.map +1 -0
- package/dist/js/core/components/functional/3d/scene-runtime.js +6 -0
- package/dist/js/core/components/functional/3d/scene-runtime.js.map +1 -0
- package/dist/js/core/components/functional/3d/snapshot.js +47 -0
- package/dist/js/core/components/functional/3d/snapshot.js.map +1 -0
- package/dist/js/core/components/functional/3d/styles.js +38 -0
- package/dist/js/core/components/functional/3d/styles.js.map +1 -0
- package/dist/js/core/components/functional/3d/tune.js +42 -0
- package/dist/js/core/components/functional/3d/tune.js.map +1 -0
- package/dist/js/core/components/functional/3d/types.js +8 -0
- package/dist/js/core/components/functional/3d/types.js.map +1 -0
- package/dist/js/core/components/functional/3d/updated.js +58 -0
- package/dist/js/core/components/functional/3d/updated.js.map +1 -0
- package/dist/js/core/components/functional/3d/view.js +40 -0
- package/dist/js/core/components/functional/3d/view.js.map +1 -0
- package/dist/js/core/components/functional/3d/wire.js +34 -0
- package/dist/js/core/components/functional/3d/wire.js.map +1 -0
- package/dist/js/core/components/functional/date/date.js +272 -0
- package/dist/js/core/components/functional/date/date.js.map +1 -0
- package/dist/js/core/components/functional/example/example.js +44 -0
- package/dist/js/core/components/functional/example/example.js.map +1 -0
- package/dist/js/core/components/functional/fetch/fetch.js +79 -0
- package/dist/js/core/components/functional/fetch/fetch.js.map +1 -0
- package/dist/js/core/components/functional/functional.js +18 -0
- package/dist/js/core/components/functional/functional.js.map +1 -0
- package/dist/js/core/components/functional/if/if.js +39 -0
- package/dist/js/core/components/functional/if/if.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-cache.js +183 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-cache.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-config.js +50 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-config.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-controller.js +460 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-controller.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-engine.js +116 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-engine.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-input.js +170 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-input.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-protocol.js +2 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-protocol.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-registry.js +367 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-registry.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-schema.js +288 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-schema.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-worker-runtime.js +309 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-worker-runtime.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hugging-face-infer.js +213 -0
- package/dist/js/core/components/functional/infer/hugging-face/hugging-face-infer.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hugging-face.js +76 -0
- package/dist/js/core/components/functional/infer/hugging-face/hugging-face.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/types.js +62 -0
- package/dist/js/core/components/functional/infer/hugging-face/types.js.map +1 -0
- package/dist/js/core/components/functional/jsonata/jsonata.js +119 -0
- package/dist/js/core/components/functional/jsonata/jsonata.js.map +1 -0
- package/dist/js/core/components/functional/list/list.js +341 -0
- package/dist/js/core/components/functional/list/list.js.map +1 -0
- package/dist/js/core/components/functional/mix/mix.js +103 -0
- package/dist/js/core/components/functional/mix/mix.js.map +1 -0
- package/dist/js/core/components/functional/queue/queue.js +450 -0
- package/dist/js/core/components/functional/queue/queue.js.map +1 -0
- package/dist/js/core/components/functional/router/redirect.js +54 -0
- package/dist/js/core/components/functional/router/redirect.js.map +1 -0
- package/dist/js/core/components/functional/router/router.js +179 -0
- package/dist/js/core/components/functional/router/router.js.map +1 -0
- package/dist/js/core/components/functional/sdui/SDUIDescriptorTransformer.js +216 -0
- package/dist/js/core/components/functional/sdui/SDUIDescriptorTransformer.js.map +1 -0
- package/dist/js/core/components/functional/sdui/default-library.json +108 -0
- package/dist/js/core/components/functional/sdui/sdui-utils.js +64 -0
- package/dist/js/core/components/functional/sdui/sdui-utils.js.map +1 -0
- package/dist/js/core/components/functional/sdui/sdui.js +271 -0
- package/dist/js/core/components/functional/sdui/sdui.js.map +1 -0
- package/dist/js/core/components/functional/sdui/types.js +2 -0
- package/dist/js/core/components/functional/sdui/types.js.map +1 -0
- package/dist/js/core/components/functional/shader/gl-runtime.js +603 -0
- package/dist/js/core/components/functional/shader/gl-runtime.js.map +1 -0
- package/dist/js/core/components/functional/shader/shader.js +1593 -0
- package/dist/js/core/components/functional/shader/shader.js.map +1 -0
- package/dist/js/core/components/functional/shader/shadertoy-prelude.js +48 -0
- package/dist/js/core/components/functional/shader/shadertoy-prelude.js.map +1 -0
- package/dist/js/core/components/functional/shader/types.js +179 -0
- package/dist/js/core/components/functional/shader/types.js.map +1 -0
- package/dist/js/core/components/functional/sonic-scope/sonic-scope.js +22 -0
- package/dist/js/core/components/functional/sonic-scope/sonic-scope.js.map +1 -0
- package/dist/js/core/components/functional/states/states.js +172 -0
- package/dist/js/core/components/functional/states/states.js.map +1 -0
- package/dist/js/core/components/functional/submit/submit.js +284 -0
- package/dist/js/core/components/functional/submit/submit.js.map +1 -0
- package/dist/js/core/components/functional/subscriber/subscriber.js +39 -0
- package/dist/js/core/components/functional/subscriber/subscriber.js.map +1 -0
- package/dist/js/core/components/functional/translation/translation.js +28 -0
- package/dist/js/core/components/functional/translation/translation.js.map +1 -0
- package/dist/js/core/components/functional/value/value.js +28 -0
- package/dist/js/core/components/functional/value/value.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/canvas2d-fallback.js +117 -0
- package/dist/js/core/components/functional/webgpu/canvas2d-fallback.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/form-bind.js +92 -0
- package/dist/js/core/components/functional/webgpu/form-bind.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/gl-fallback.js +135 -0
- package/dist/js/core/components/functional/webgpu/gl-fallback.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/gpu-runtime.js +305 -0
- package/dist/js/core/components/functional/webgpu/gpu-runtime.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/helpers.js +44 -0
- package/dist/js/core/components/functional/webgpu/helpers.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/out-frame.js +117 -0
- package/dist/js/core/components/functional/webgpu/out-frame.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/particles-runtime.js +407 -0
- package/dist/js/core/components/functional/webgpu/particles-runtime.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/pointer.js +56 -0
- package/dist/js/core/components/functional/webgpu/pointer.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/types.js +24 -0
- package/dist/js/core/components/functional/webgpu/types.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/webgpu.js +667 -0
- package/dist/js/core/components/functional/webgpu/webgpu.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/wgsl-prelude.js +77 -0
- package/dist/js/core/components/functional/webgpu/wgsl-prelude.js.map +1 -0
- package/dist/js/core/components/ui/_css/scroll.js +27 -0
- package/dist/js/core/components/ui/_css/scroll.js.map +1 -0
- package/dist/js/core/components/ui/_css/shadow.js +22 -0
- package/dist/js/core/components/ui/_css/shadow.js.map +1 -0
- package/dist/js/core/components/ui/_css/size.js +36 -0
- package/dist/js/core/components/ui/_css/size.js.map +1 -0
- package/dist/js/core/components/ui/_css/type.js +92 -0
- package/dist/js/core/components/ui/_css/type.js.map +1 -0
- package/dist/js/core/components/ui/alert/alert.js +213 -0
- package/dist/js/core/components/ui/alert/alert.js.map +1 -0
- package/dist/js/core/components/ui/alert-messages/alert-messages.js +68 -0
- package/dist/js/core/components/ui/alert-messages/alert-messages.js.map +1 -0
- package/dist/js/core/components/ui/badge/badge.js +199 -0
- package/dist/js/core/components/ui/badge/badge.js.map +1 -0
- package/dist/js/core/components/ui/button/button.js +697 -0
- package/dist/js/core/components/ui/button/button.js.map +1 -0
- package/dist/js/core/components/ui/captcha/altchaStyles.js +226 -0
- package/dist/js/core/components/ui/captcha/altchaStyles.js.map +1 -0
- package/dist/js/core/components/ui/captcha/captcha.js +167 -0
- package/dist/js/core/components/ui/captcha/captcha.js.map +1 -0
- package/dist/js/core/components/ui/card/card-footer.js +26 -0
- package/dist/js/core/components/ui/card/card-footer.js.map +1 -0
- package/dist/js/core/components/ui/card/card-header-descripton.js +30 -0
- package/dist/js/core/components/ui/card/card-header-descripton.js.map +1 -0
- package/dist/js/core/components/ui/card/card-header.js +79 -0
- package/dist/js/core/components/ui/card/card-header.js.map +1 -0
- package/dist/js/core/components/ui/card/card-main.js +26 -0
- package/dist/js/core/components/ui/card/card-main.js.map +1 -0
- package/dist/js/core/components/ui/card/card.js +67 -0
- package/dist/js/core/components/ui/card/card.js.map +1 -0
- package/dist/js/core/components/ui/divider/divider.js +200 -0
- package/dist/js/core/components/ui/divider/divider.js.map +1 -0
- package/dist/js/core/components/ui/form/checkbox/checkbox.js +257 -0
- package/dist/js/core/components/ui/form/checkbox/checkbox.js.map +1 -0
- package/dist/js/core/components/ui/form/css/form-control.js +393 -0
- package/dist/js/core/components/ui/form/css/form-control.js.map +1 -0
- package/dist/js/core/components/ui/form/fieldset/fieldset.js +124 -0
- package/dist/js/core/components/ui/form/fieldset/fieldset.js.map +1 -0
- package/dist/js/core/components/ui/form/fieldset/legend-description.js +38 -0
- package/dist/js/core/components/ui/form/fieldset/legend-description.js.map +1 -0
- package/dist/js/core/components/ui/form/fieldset/legend.js +130 -0
- package/dist/js/core/components/ui/form/fieldset/legend.js.map +1 -0
- package/dist/js/core/components/ui/form/form-actions/form-actions.js +47 -0
- package/dist/js/core/components/ui/form/form-actions/form-actions.js.map +1 -0
- package/dist/js/core/components/ui/form/form-layout/form-layout.js +84 -0
- package/dist/js/core/components/ui/form/form-layout/form-layout.js.map +1 -0
- package/dist/js/core/components/ui/form/input/input.js +316 -0
- package/dist/js/core/components/ui/form/input/input.js.map +1 -0
- package/dist/js/core/components/ui/form/input/password-helper.js +134 -0
- package/dist/js/core/components/ui/form/input/password-helper.js.map +1 -0
- package/dist/js/core/components/ui/form/input/same-value-helper.js +85 -0
- package/dist/js/core/components/ui/form/input/same-value-helper.js.map +1 -0
- package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js +405 -0
- package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js.map +1 -0
- package/dist/js/core/components/ui/form/radio/radio.js +63 -0
- package/dist/js/core/components/ui/form/radio/radio.js.map +1 -0
- package/dist/js/core/components/ui/form/select/select.js +323 -0
- package/dist/js/core/components/ui/form/select/select.js.map +1 -0
- package/dist/js/core/components/ui/form/switch/switch.js +90 -0
- package/dist/js/core/components/ui/form/switch/switch.js.map +1 -0
- package/dist/js/core/components/ui/form/textarea/textarea.js +162 -0
- package/dist/js/core/components/ui/form/textarea/textarea.js.map +1 -0
- package/dist/js/core/components/ui/group/group.js +128 -0
- package/dist/js/core/components/ui/group/group.js.map +1 -0
- package/dist/js/core/components/ui/icon/icon.js +145 -0
- package/dist/js/core/components/ui/icon/icon.js.map +1 -0
- package/dist/js/core/components/ui/icon/icons.js +184 -0
- package/dist/js/core/components/ui/icon/icons.js.map +1 -0
- package/dist/js/core/components/ui/icon/icons.json +1 -0
- package/dist/js/core/components/ui/image/image.js +160 -0
- package/dist/js/core/components/ui/image/image.js.map +1 -0
- package/dist/js/core/components/ui/link/link.js +125 -0
- package/dist/js/core/components/ui/link/link.js.map +1 -0
- package/dist/js/core/components/ui/loader/loader.js +106 -0
- package/dist/js/core/components/ui/loader/loader.js.map +1 -0
- package/dist/js/core/components/ui/loader/styles/fixed.js +56 -0
- package/dist/js/core/components/ui/loader/styles/fixed.js.map +1 -0
- package/dist/js/core/components/ui/loader/styles/inline.js +70 -0
- package/dist/js/core/components/ui/loader/styles/inline.js.map +1 -0
- package/dist/js/core/components/ui/menu/menu-item.js +35 -0
- package/dist/js/core/components/ui/menu/menu-item.js.map +1 -0
- package/dist/js/core/components/ui/menu/menu.js +436 -0
- package/dist/js/core/components/ui/menu/menu.js.map +1 -0
- package/dist/js/core/components/ui/modal/modal-actions.js +44 -0
- package/dist/js/core/components/ui/modal/modal-actions.js.map +1 -0
- package/dist/js/core/components/ui/modal/modal-close.js +56 -0
- package/dist/js/core/components/ui/modal/modal-close.js.map +1 -0
- package/dist/js/core/components/ui/modal/modal-content.js +27 -0
- package/dist/js/core/components/ui/modal/modal-content.js.map +1 -0
- package/dist/js/core/components/ui/modal/modal-subtitle.js +34 -0
- package/dist/js/core/components/ui/modal/modal-subtitle.js.map +1 -0
- package/dist/js/core/components/ui/modal/modal-title.js +35 -0
- package/dist/js/core/components/ui/modal/modal-title.js.map +1 -0
- package/dist/js/core/components/ui/modal/modal-utils.js +32 -0
- package/dist/js/core/components/ui/modal/modal-utils.js.map +1 -0
- package/dist/js/core/components/ui/modal/modal.js +568 -0
- package/dist/js/core/components/ui/modal/modal.js.map +1 -0
- package/dist/js/core/components/ui/pop/pop.js +337 -0
- package/dist/js/core/components/ui/pop/pop.js.map +1 -0
- package/dist/js/core/components/ui/progress/progress.js +164 -0
- package/dist/js/core/components/ui/progress/progress.js.map +1 -0
- package/dist/js/core/components/ui/table/table-caption.js +29 -0
- package/dist/js/core/components/ui/table/table-caption.js.map +1 -0
- package/dist/js/core/components/ui/table/table-tbody.js +41 -0
- package/dist/js/core/components/ui/table/table-tbody.js.map +1 -0
- package/dist/js/core/components/ui/table/table-td.js +69 -0
- package/dist/js/core/components/ui/table/table-td.js.map +1 -0
- package/dist/js/core/components/ui/table/table-tfoot.js +28 -0
- package/dist/js/core/components/ui/table/table-tfoot.js.map +1 -0
- package/dist/js/core/components/ui/table/table-th.js +80 -0
- package/dist/js/core/components/ui/table/table-th.js.map +1 -0
- package/dist/js/core/components/ui/table/table-thead.js +26 -0
- package/dist/js/core/components/ui/table/table-thead.js.map +1 -0
- package/dist/js/core/components/ui/table/table-tr.js +67 -0
- package/dist/js/core/components/ui/table/table-tr.js.map +1 -0
- package/dist/js/core/components/ui/table/table.js +106 -0
- package/dist/js/core/components/ui/table/table.js.map +1 -0
- package/dist/js/core/components/ui/theme/theme-collection/core-variables.js +74 -0
- package/dist/js/core/components/ui/theme/theme-collection/core-variables.js.map +1 -0
- package/dist/js/core/components/ui/theme/theme-collection/dark.js +39 -0
- package/dist/js/core/components/ui/theme/theme-collection/dark.js.map +1 -0
- package/dist/js/core/components/ui/theme/theme-collection/light.js +32 -0
- package/dist/js/core/components/ui/theme/theme-collection/light.js.map +1 -0
- package/dist/js/core/components/ui/theme/theme.js +150 -0
- package/dist/js/core/components/ui/theme/theme.js.map +1 -0
- package/dist/js/core/components/ui/toast/message-subscriber.js +41 -0
- package/dist/js/core/components/ui/toast/message-subscriber.js.map +1 -0
- package/dist/js/core/components/ui/toast/toast-item.js +379 -0
- package/dist/js/core/components/ui/toast/toast-item.js.map +1 -0
- package/dist/js/core/components/ui/toast/toast.js +269 -0
- package/dist/js/core/components/ui/toast/toast.js.map +1 -0
- package/dist/js/core/components/ui/toast/types.js +2 -0
- package/dist/js/core/components/ui/toast/types.js.map +1 -0
- package/dist/js/core/components/ui/tooltip/tooltip.js +219 -0
- package/dist/js/core/components/ui/tooltip/tooltip.js.map +1 -0
- package/dist/js/core/components/ui/ui.js +41 -0
- package/dist/js/core/components/ui/ui.js.map +1 -0
- package/dist/js/core/core.js +14 -0
- package/dist/js/core/core.js.map +1 -0
- package/dist/js/core/decorators/Subscriber.js +10 -0
- package/dist/js/core/decorators/Subscriber.js.map +1 -0
- package/dist/js/core/decorators/api.js +806 -0
- package/dist/js/core/decorators/api.js.map +1 -0
- package/dist/js/core/decorators/lifecycle.js +67 -0
- package/dist/js/core/decorators/lifecycle.js.map +1 -0
- package/dist/js/core/decorators/subscriber/ancestorAttribute.js +27 -0
- package/dist/js/core/decorators/subscriber/ancestorAttribute.js.map +1 -0
- package/dist/js/core/decorators/subscriber/autoFill.js +26 -0
- package/dist/js/core/decorators/subscriber/autoFill.js.map +1 -0
- package/dist/js/core/decorators/subscriber/autoSubscribe.js +46 -0
- package/dist/js/core/decorators/subscriber/autoSubscribe.js.map +1 -0
- package/dist/js/core/decorators/subscriber/bind.js +150 -0
- package/dist/js/core/decorators/subscriber/bind.js.map +1 -0
- package/dist/js/core/decorators/subscriber/common.js +44 -0
- package/dist/js/core/decorators/subscriber/common.js.map +1 -0
- package/dist/js/core/decorators/subscriber/derive.js +60 -0
- package/dist/js/core/decorators/subscriber/derive.js.map +1 -0
- package/dist/js/core/decorators/subscriber/dynamicPath.js +75 -0
- package/dist/js/core/decorators/subscriber/dynamicPath.js.map +1 -0
- package/dist/js/core/decorators/subscriber/dynamicPropertyWatch.js +138 -0
- package/dist/js/core/decorators/subscriber/dynamicPropertyWatch.js.map +1 -0
- package/dist/js/core/decorators/subscriber/handle.js +22 -0
- package/dist/js/core/decorators/subscriber/handle.js.map +1 -0
- package/dist/js/core/decorators/subscriber/onAssign.js +199 -0
- package/dist/js/core/decorators/subscriber/onAssign.js.map +1 -0
- package/dist/js/core/decorators/subscriber/publish.js +108 -0
- package/dist/js/core/decorators/subscriber/publish.js.map +1 -0
- package/dist/js/core/decorators/subscriber/publisherPath.js +16 -0
- package/dist/js/core/decorators/subscriber/publisherPath.js.map +1 -0
- package/dist/js/core/decorators/subscriber/subscribe.js +20 -0
- package/dist/js/core/decorators/subscriber/subscribe.js.map +1 -0
- package/dist/js/core/directives/DataProvider.js +127 -0
- package/dist/js/core/directives/DataProvider.js.map +1 -0
- package/dist/js/core/directives/Wording.js +221 -0
- package/dist/js/core/directives/Wording.js.map +1 -0
- package/dist/js/core/mixins/Fetcher.js +325 -0
- package/dist/js/core/mixins/Fetcher.js.map +1 -0
- package/dist/js/core/mixins/FormCheckable.js +313 -0
- package/dist/js/core/mixins/FormCheckable.js.map +1 -0
- package/dist/js/core/mixins/FormElement.js +304 -0
- package/dist/js/core/mixins/FormElement.js.map +1 -0
- package/dist/js/core/mixins/FormInput.js +82 -0
- package/dist/js/core/mixins/FormInput.js.map +1 -0
- package/dist/js/core/mixins/Subscriber.js +354 -0
- package/dist/js/core/mixins/Subscriber.js.map +1 -0
- package/dist/js/core/mixins/TemplatesContainer.js +70 -0
- package/dist/js/core/mixins/TemplatesContainer.js.map +1 -0
- package/dist/js/core/mixins/mixins.js +7 -0
- package/dist/js/core/mixins/mixins.js.map +1 -0
- package/dist/js/core/utils/AncestorAttributeObserver.js +140 -0
- package/dist/js/core/utils/AncestorAttributeObserver.js.map +1 -0
- package/dist/js/core/utils/Arrays.js +141 -0
- package/dist/js/core/utils/Arrays.js.map +1 -0
- package/dist/js/core/utils/DataBindObserver.js +265 -0
- package/dist/js/core/utils/DataBindObserver.js.map +1 -0
- package/dist/js/core/utils/Electron.js +14 -0
- package/dist/js/core/utils/Electron.js.map +1 -0
- package/dist/js/core/utils/Format.js +43 -0
- package/dist/js/core/utils/Format.js.map +1 -0
- package/dist/js/core/utils/HTML.js +307 -0
- package/dist/js/core/utils/HTML.js.map +1 -0
- package/dist/js/core/utils/LocationHandler.js +143 -0
- package/dist/js/core/utils/LocationHandler.js.map +1 -0
- package/dist/js/core/utils/Objects.js +111 -0
- package/dist/js/core/utils/Objects.js.map +1 -0
- package/dist/js/core/utils/PublisherProxy.js +970 -0
- package/dist/js/core/utils/PublisherProxy.js.map +1 -0
- package/dist/js/core/utils/SafariScrollGuard.js +384 -0
- package/dist/js/core/utils/SafariScrollGuard.js.map +1 -0
- package/dist/js/core/utils/Utils.js +19 -0
- package/dist/js/core/utils/Utils.js.map +1 -0
- package/dist/js/core/utils/aesCrypto.js +98 -0
- package/dist/js/core/utils/aesCrypto.js.map +1 -0
- package/dist/js/core/utils/api.js +595 -0
- package/dist/js/core/utils/api.js.map +1 -0
- package/dist/js/core/utils/dataProviderKey.js +64 -0
- package/dist/js/core/utils/dataProviderKey.js.map +1 -0
- package/dist/js/core/utils/derive.js +246 -0
- package/dist/js/core/utils/derive.js.map +1 -0
- package/dist/js/core/utils/endpoint.js +74 -0
- package/dist/js/core/utils/endpoint.js.map +1 -0
- package/dist/js/core/utils/jsonataHelpers.js +84 -0
- package/dist/js/core/utils/jsonataHelpers.js.map +1 -0
- package/dist/js/core/utils/jsonataRuntime.js +75 -0
- package/dist/js/core/utils/jsonataRuntime.js.map +1 -0
- package/dist/js/core/utils/mediaRef.js +120 -0
- package/dist/js/core/utils/mediaRef.js.map +1 -0
- package/dist/js/core/utils/route.js +149 -0
- package/dist/js/core/utils/route.js.map +1 -0
- package/dist/js/core/utils/similarity.js +44 -0
- package/dist/js/core/utils/similarity.js.map +1 -0
- package/dist/js/core/utils/url-pattern.js +3 -0
- package/dist/js/core/utils/url-pattern.js.map +1 -0
- package/dist/js/dataprovider.js +2 -0
- package/dist/js/dataprovider.js.map +1 -0
- package/dist/js/decorators.js +43 -0
- package/dist/js/decorators.js.map +1 -0
- package/dist/js/directives.js +30 -0
- package/dist/js/directives.js.map +1 -0
- package/dist/js/index.js +8 -0
- package/dist/js/index.js.map +1 -0
- package/dist/js/mixins.js +23 -0
- package/dist/js/mixins.js.map +1 -0
- package/dist/js/test-utils/TestUtils.js +10 -0
- package/dist/js/test-utils/TestUtils.js.map +1 -0
- package/dist/js/utils.js +46 -0
- package/dist/js/utils.js.map +1 -0
- package/dist/types/addons/3d.d.ts +6 -0
- package/dist/types/addons/3d.d.ts.map +1 -0
- package/dist/types/addons/hugging-face-infer.d.ts +8 -0
- package/dist/types/addons/hugging-face-infer.d.ts.map +1 -0
- package/dist/types/addons/shader.d.ts +6 -0
- package/dist/types/addons/shader.d.ts.map +1 -0
- package/dist/types/addons/webgpu.d.ts +7 -0
- package/dist/types/addons/webgpu.d.ts.map +1 -0
- package/dist/types/components.d.ts +5 -0
- package/dist/types/components.d.ts.map +1 -0
- package/dist/types/concorde-loaded.d.ts +2 -0
- package/dist/types/concorde-loaded.d.ts.map +1 -0
- package/dist/types/core/_types/endpoint.d.ts +5 -0
- package/dist/types/core/_types/endpoint.d.ts.map +1 -0
- package/dist/types/core/_types/key.d.ts +2 -0
- package/dist/types/core/_types/key.d.ts.map +1 -0
- package/dist/types/core/_types/types.d.ts +28 -0
- package/dist/types/core/_types/types.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/3d.d.ts +66 -0
- package/dist/types/core/components/functional/3d/3d.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/asset.d.ts +12 -0
- package/dist/types/core/components/functional/3d/asset.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/boot.d.ts +23 -0
- package/dist/types/core/components/functional/3d/boot.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/constants.d.ts +43 -0
- package/dist/types/core/components/functional/3d/constants.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/demo-content.d.ts +10 -0
- package/dist/types/core/components/functional/3d/demo-content.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/ensure.d.ts +36 -0
- package/dist/types/core/components/functional/3d/ensure.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/form-bind.d.ts +20 -0
- package/dist/types/core/components/functional/3d/form-bind.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/form-fields.d.ts +14 -0
- package/dist/types/core/components/functional/3d/form-fields.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/form-params.d.ts +37 -0
- package/dist/types/core/components/functional/3d/form-params.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/frame-capture.d.ts +33 -0
- package/dist/types/core/components/functional/3d/frame-capture.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/gl.d.ts +4 -0
- package/dist/types/core/components/functional/3d/gl.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/life.d.ts +41 -0
- package/dist/types/core/components/functional/3d/life.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/load.d.ts +36 -0
- package/dist/types/core/components/functional/3d/load.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/ops.d.ts +48 -0
- package/dist/types/core/components/functional/3d/ops.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/opts.d.ts +16 -0
- package/dist/types/core/components/functional/3d/opts.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/orbit.d.ts +55 -0
- package/dist/types/core/components/functional/3d/orbit.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/out-publish.d.ts +47 -0
- package/dist/types/core/components/functional/3d/out-publish.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/parse.d.ts +23 -0
- package/dist/types/core/components/functional/3d/parse.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/pick.d.ts +32 -0
- package/dist/types/core/components/functional/3d/pick.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/playback.d.ts +26 -0
- package/dist/types/core/components/functional/3d/playback.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/pointer.d.ts +27 -0
- package/dist/types/core/components/functional/3d/pointer.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/props.d.ts +30 -0
- package/dist/types/core/components/functional/3d/props.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/publisher-listen.d.ts +8 -0
- package/dist/types/core/components/functional/3d/publisher-listen.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/reload.d.ts +35 -0
- package/dist/types/core/components/functional/3d/reload.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/runtime.d.ts +75 -0
- package/dist/types/core/components/functional/3d/runtime.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/scene-runtime.d.ts +6 -0
- package/dist/types/core/components/functional/3d/scene-runtime.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/snapshot.d.ts +29 -0
- package/dist/types/core/components/functional/3d/snapshot.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/styles.d.ts +2 -0
- package/dist/types/core/components/functional/3d/styles.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/tune.d.ts +32 -0
- package/dist/types/core/components/functional/3d/tune.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/types.d.ts +133 -0
- package/dist/types/core/components/functional/3d/types.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/updated.d.ts +7 -0
- package/dist/types/core/components/functional/3d/updated.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/view.d.ts +25 -0
- package/dist/types/core/components/functional/3d/view.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/wire.d.ts +32 -0
- package/dist/types/core/components/functional/3d/wire.d.ts.map +1 -0
- package/dist/types/core/components/functional/date/date.d.ts +52 -0
- package/dist/types/core/components/functional/date/date.d.ts.map +1 -0
- package/dist/types/core/components/functional/example/example.d.ts +15 -0
- package/dist/types/core/components/functional/example/example.d.ts.map +1 -0
- package/dist/types/core/components/functional/fetch/fetch.d.ts +102 -0
- package/dist/types/core/components/functional/fetch/fetch.d.ts.map +1 -0
- package/dist/types/core/components/functional/functional.d.ts +18 -0
- package/dist/types/core/components/functional/functional.d.ts.map +1 -0
- package/dist/types/core/components/functional/if/if.d.ts +13 -0
- package/dist/types/core/components/functional/if/if.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-cache.d.ts +21 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-cache.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-config.d.ts +133 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-config.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-controller.d.ts +79 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-controller.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-engine.d.ts +43 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-engine.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-input.d.ts +47 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-input.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-protocol.d.ts +95 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-protocol.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-registry.d.ts +77 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-registry.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-schema.d.ts +1251 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-schema.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-worker-runtime.d.ts +56 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-worker-runtime.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hugging-face-infer.d.ts +67 -0
- package/dist/types/core/components/functional/infer/hugging-face/hugging-face-infer.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hugging-face.d.ts +116 -0
- package/dist/types/core/components/functional/infer/hugging-face/hugging-face.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/types.d.ts +167 -0
- package/dist/types/core/components/functional/infer/hugging-face/types.d.ts.map +1 -0
- package/dist/types/core/components/functional/jsonata/jsonata.d.ts +29 -0
- package/dist/types/core/components/functional/jsonata/jsonata.d.ts.map +1 -0
- package/dist/types/core/components/functional/list/list.d.ts +149 -0
- package/dist/types/core/components/functional/list/list.d.ts.map +1 -0
- package/dist/types/core/components/functional/mix/mix.d.ts +23 -0
- package/dist/types/core/components/functional/mix/mix.d.ts.map +1 -0
- package/dist/types/core/components/functional/queue/queue.d.ts +93 -0
- package/dist/types/core/components/functional/queue/queue.d.ts.map +1 -0
- package/dist/types/core/components/functional/router/redirect.d.ts +19 -0
- package/dist/types/core/components/functional/router/redirect.d.ts.map +1 -0
- package/dist/types/core/components/functional/router/router.d.ts +46 -0
- package/dist/types/core/components/functional/router/router.d.ts.map +1 -0
- package/dist/types/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +59 -0
- package/dist/types/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts.map +1 -0
- package/dist/types/core/components/functional/sdui/sdui-utils.d.ts +6 -0
- package/dist/types/core/components/functional/sdui/sdui-utils.d.ts.map +1 -0
- package/dist/types/core/components/functional/sdui/sdui.d.ts +148 -0
- package/dist/types/core/components/functional/sdui/sdui.d.ts.map +1 -0
- package/dist/types/core/components/functional/sdui/types.d.ts +38 -0
- package/dist/types/core/components/functional/sdui/types.d.ts.map +1 -0
- package/dist/types/core/components/functional/shader/gl-runtime.d.ts +71 -0
- package/dist/types/core/components/functional/shader/gl-runtime.d.ts.map +1 -0
- package/dist/types/core/components/functional/shader/shader.d.ts +274 -0
- package/dist/types/core/components/functional/shader/shader.d.ts.map +1 -0
- package/dist/types/core/components/functional/shader/shadertoy-prelude.d.ts +6 -0
- package/dist/types/core/components/functional/shader/shadertoy-prelude.d.ts.map +1 -0
- package/dist/types/core/components/functional/shader/types.d.ts +256 -0
- package/dist/types/core/components/functional/shader/types.d.ts.map +1 -0
- package/dist/types/core/components/functional/sonic-scope/sonic-scope.d.ts +6 -0
- package/dist/types/core/components/functional/sonic-scope/sonic-scope.d.ts.map +1 -0
- package/dist/types/core/components/functional/states/states.d.ts +42 -0
- package/dist/types/core/components/functional/states/states.d.ts.map +1 -0
- package/dist/types/core/components/functional/submit/submit.d.ts +37 -0
- package/dist/types/core/components/functional/submit/submit.d.ts.map +1 -0
- package/dist/types/core/components/functional/subscriber/subscriber.d.ts +13 -0
- package/dist/types/core/components/functional/subscriber/subscriber.d.ts.map +1 -0
- package/dist/types/core/components/functional/translation/translation.d.ts +7 -0
- package/dist/types/core/components/functional/translation/translation.d.ts.map +1 -0
- package/dist/types/core/components/functional/value/value.d.ts +8 -0
- package/dist/types/core/components/functional/value/value.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/canvas2d-fallback.d.ts +29 -0
- package/dist/types/core/components/functional/webgpu/canvas2d-fallback.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/form-bind.d.ts +43 -0
- package/dist/types/core/components/functional/webgpu/form-bind.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/gl-fallback.d.ts +31 -0
- package/dist/types/core/components/functional/webgpu/gl-fallback.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/gpu-runtime.d.ts +53 -0
- package/dist/types/core/components/functional/webgpu/gpu-runtime.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/helpers.d.ts +9 -0
- package/dist/types/core/components/functional/webgpu/helpers.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/out-frame.d.ts +29 -0
- package/dist/types/core/components/functional/webgpu/out-frame.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/particles-runtime.d.ts +37 -0
- package/dist/types/core/components/functional/webgpu/particles-runtime.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/pointer.d.ts +41 -0
- package/dist/types/core/components/functional/webgpu/pointer.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/types.d.ts +75 -0
- package/dist/types/core/components/functional/webgpu/types.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/webgpu.d.ts +123 -0
- package/dist/types/core/components/functional/webgpu/webgpu.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/wgsl-prelude.d.ts +8 -0
- package/dist/types/core/components/functional/webgpu/wgsl-prelude.d.ts.map +1 -0
- package/dist/types/core/components/ui/_css/scroll.d.ts +2 -0
- package/dist/types/core/components/ui/_css/scroll.d.ts.map +1 -0
- package/dist/types/core/components/ui/_css/shadow.d.ts +3 -0
- package/dist/types/core/components/ui/_css/shadow.d.ts.map +1 -0
- package/dist/types/core/components/ui/_css/size.d.ts +3 -0
- package/dist/types/core/components/ui/_css/size.d.ts.map +1 -0
- package/dist/types/core/components/ui/_css/type.d.ts +3 -0
- package/dist/types/core/components/ui/_css/type.d.ts.map +1 -0
- package/dist/types/core/components/ui/alert/alert.d.ts +37 -0
- package/dist/types/core/components/ui/alert/alert.d.ts.map +1 -0
- package/dist/types/core/components/ui/alert-messages/alert-messages.d.ts +15 -0
- package/dist/types/core/components/ui/alert-messages/alert-messages.d.ts.map +1 -0
- package/dist/types/core/components/ui/badge/badge.d.ts +27 -0
- package/dist/types/core/components/ui/badge/badge.d.ts.map +1 -0
- package/dist/types/core/components/ui/button/button.d.ts +180 -0
- package/dist/types/core/components/ui/button/button.d.ts.map +1 -0
- package/dist/types/core/components/ui/captcha/altchaStyles.d.ts +2 -0
- package/dist/types/core/components/ui/captcha/altchaStyles.d.ts.map +1 -0
- package/dist/types/core/components/ui/captcha/captcha.d.ts +30 -0
- package/dist/types/core/components/ui/captcha/captcha.d.ts.map +1 -0
- package/dist/types/core/components/ui/card/card-footer.d.ts +6 -0
- package/dist/types/core/components/ui/card/card-footer.d.ts.map +1 -0
- package/dist/types/core/components/ui/card/card-header-descripton.d.ts +6 -0
- package/dist/types/core/components/ui/card/card-header-descripton.d.ts.map +1 -0
- package/dist/types/core/components/ui/card/card-header.d.ts +9 -0
- package/dist/types/core/components/ui/card/card-header.d.ts.map +1 -0
- package/dist/types/core/components/ui/card/card-main.d.ts +6 -0
- package/dist/types/core/components/ui/card/card-main.d.ts.map +1 -0
- package/dist/types/core/components/ui/card/card.d.ts +13 -0
- package/dist/types/core/components/ui/card/card.d.ts.map +1 -0
- package/dist/types/core/components/ui/divider/divider.d.ts +16 -0
- package/dist/types/core/components/ui/divider/divider.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts +176 -0
- package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/css/form-control.d.ts +5 -0
- package/dist/types/core/components/ui/form/css/form-control.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/fieldset/fieldset.d.ts +24 -0
- package/dist/types/core/components/ui/form/fieldset/fieldset.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/fieldset/legend-description.d.ts +6 -0
- package/dist/types/core/components/ui/form/fieldset/legend-description.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/fieldset/legend.d.ts +17 -0
- package/dist/types/core/components/ui/form/fieldset/legend.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/form-actions/form-actions.d.ts +8 -0
- package/dist/types/core/components/ui/form/form-actions/form-actions.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/form-layout/form-layout.d.ts +13 -0
- package/dist/types/core/components/ui/form/form-layout/form-layout.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/input/input.d.ts +123 -0
- package/dist/types/core/components/ui/form/input/input.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/input/password-helper.d.ts +26 -0
- package/dist/types/core/components/ui/form/input/password-helper.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/input/same-value-helper.d.ts +17 -0
- package/dist/types/core/components/ui/form/input/same-value-helper.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +155 -0
- package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/radio/radio.d.ts +15 -0
- package/dist/types/core/components/ui/form/radio/radio.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/select/select.d.ts +59 -0
- package/dist/types/core/components/ui/form/select/select.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/switch/switch.d.ts +6 -0
- package/dist/types/core/components/ui/form/switch/switch.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/textarea/textarea.d.ts +94 -0
- package/dist/types/core/components/ui/form/textarea/textarea.d.ts.map +1 -0
- package/dist/types/core/components/ui/group/group.d.ts +17 -0
- package/dist/types/core/components/ui/group/group.d.ts.map +1 -0
- package/dist/types/core/components/ui/icon/icon.d.ts +30 -0
- package/dist/types/core/components/ui/icon/icon.d.ts.map +1 -0
- package/dist/types/core/components/ui/icon/icons.d.ts +13 -0
- package/dist/types/core/components/ui/icon/icons.d.ts.map +1 -0
- package/dist/types/core/components/ui/image/image.d.ts +16 -0
- package/dist/types/core/components/ui/image/image.d.ts.map +1 -0
- package/dist/types/core/components/ui/link/link.d.ts +30 -0
- package/dist/types/core/components/ui/link/link.d.ts.map +1 -0
- package/dist/types/core/components/ui/loader/loader.d.ts +24 -0
- package/dist/types/core/components/ui/loader/loader.d.ts.map +1 -0
- package/dist/types/core/components/ui/loader/styles/fixed.d.ts +2 -0
- package/dist/types/core/components/ui/loader/styles/fixed.d.ts.map +1 -0
- package/dist/types/core/components/ui/loader/styles/inline.d.ts +2 -0
- package/dist/types/core/components/ui/loader/styles/inline.d.ts.map +1 -0
- package/dist/types/core/components/ui/menu/menu-item.d.ts +6 -0
- package/dist/types/core/components/ui/menu/menu-item.d.ts.map +1 -0
- package/dist/types/core/components/ui/menu/menu.d.ts +52 -0
- package/dist/types/core/components/ui/menu/menu.d.ts.map +1 -0
- package/dist/types/core/components/ui/modal/modal-actions.d.ts +9 -0
- package/dist/types/core/components/ui/modal/modal-actions.d.ts.map +1 -0
- package/dist/types/core/components/ui/modal/modal-close.d.ts +11 -0
- package/dist/types/core/components/ui/modal/modal-close.d.ts.map +1 -0
- package/dist/types/core/components/ui/modal/modal-content.d.ts +6 -0
- package/dist/types/core/components/ui/modal/modal-content.d.ts.map +1 -0
- package/dist/types/core/components/ui/modal/modal-subtitle.d.ts +6 -0
- package/dist/types/core/components/ui/modal/modal-subtitle.d.ts.map +1 -0
- package/dist/types/core/components/ui/modal/modal-title.d.ts +6 -0
- package/dist/types/core/components/ui/modal/modal-title.d.ts.map +1 -0
- package/dist/types/core/components/ui/modal/modal-utils.d.ts +4 -0
- package/dist/types/core/components/ui/modal/modal-utils.d.ts.map +1 -0
- package/dist/types/core/components/ui/modal/modal.d.ts +79 -0
- package/dist/types/core/components/ui/modal/modal.d.ts.map +1 -0
- package/dist/types/core/components/ui/pop/pop.d.ts +42 -0
- package/dist/types/core/components/ui/pop/pop.d.ts.map +1 -0
- package/dist/types/core/components/ui/progress/progress.d.ts +12 -0
- package/dist/types/core/components/ui/progress/progress.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table-caption.d.ts +6 -0
- package/dist/types/core/components/ui/table/table-caption.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table-tbody.d.ts +6 -0
- package/dist/types/core/components/ui/table/table-tbody.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table-td.d.ts +13 -0
- package/dist/types/core/components/ui/table/table-td.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table-tfoot.d.ts +6 -0
- package/dist/types/core/components/ui/table/table-tfoot.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table-th.d.ts +12 -0
- package/dist/types/core/components/ui/table/table-th.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table-thead.d.ts +6 -0
- package/dist/types/core/components/ui/table/table-thead.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table-tr.d.ts +14 -0
- package/dist/types/core/components/ui/table/table-tr.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table.d.ts +18 -0
- package/dist/types/core/components/ui/table/table.d.ts.map +1 -0
- package/dist/types/core/components/ui/theme/theme-collection/core-variables.d.ts +2 -0
- package/dist/types/core/components/ui/theme/theme-collection/core-variables.d.ts.map +1 -0
- package/dist/types/core/components/ui/theme/theme-collection/dark.d.ts +2 -0
- package/dist/types/core/components/ui/theme/theme-collection/dark.d.ts.map +1 -0
- package/dist/types/core/components/ui/theme/theme-collection/light.d.ts +2 -0
- package/dist/types/core/components/ui/theme/theme-collection/light.d.ts.map +1 -0
- package/dist/types/core/components/ui/theme/theme.d.ts +20 -0
- package/dist/types/core/components/ui/theme/theme.d.ts.map +1 -0
- package/dist/types/core/components/ui/toast/message-subscriber.d.ts +19 -0
- package/dist/types/core/components/ui/toast/message-subscriber.d.ts.map +1 -0
- package/dist/types/core/components/ui/toast/toast-item.d.ts +41 -0
- package/dist/types/core/components/ui/toast/toast-item.d.ts.map +1 -0
- package/dist/types/core/components/ui/toast/toast.d.ts +28 -0
- package/dist/types/core/components/ui/toast/toast.d.ts.map +1 -0
- package/dist/types/core/components/ui/toast/types.d.ts +12 -0
- package/dist/types/core/components/ui/toast/types.d.ts.map +1 -0
- package/dist/types/core/components/ui/tooltip/tooltip.d.ts +21 -0
- package/dist/types/core/components/ui/tooltip/tooltip.d.ts.map +1 -0
- package/dist/types/core/components/ui/ui.d.ts +35 -0
- package/dist/types/core/components/ui/ui.d.ts.map +1 -0
- package/dist/types/core/core.d.ts +5 -0
- package/dist/types/core/core.d.ts.map +1 -0
- package/dist/types/core/decorators/Subscriber.d.ts +13 -0
- package/dist/types/core/decorators/Subscriber.d.ts.map +1 -0
- package/dist/types/core/decorators/api.d.ts +155 -0
- package/dist/types/core/decorators/api.d.ts.map +1 -0
- package/dist/types/core/decorators/lifecycle.d.ts +19 -0
- package/dist/types/core/decorators/lifecycle.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts +11 -0
- package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/autoFill.d.ts +2 -0
- package/dist/types/core/decorators/subscriber/autoFill.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/autoSubscribe.d.ts +2 -0
- package/dist/types/core/decorators/subscriber/autoSubscribe.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/bind.d.ts +28 -0
- package/dist/types/core/decorators/subscriber/bind.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/common.d.ts +14 -0
- package/dist/types/core/decorators/subscriber/common.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/derive.d.ts +30 -0
- package/dist/types/core/decorators/subscriber/derive.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/dynamicPath.d.ts +23 -0
- package/dist/types/core/decorators/subscriber/dynamicPath.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/dynamicPropertyWatch.d.ts +42 -0
- package/dist/types/core/decorators/subscriber/dynamicPropertyWatch.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/handle.d.ts +74 -0
- package/dist/types/core/decorators/subscriber/handle.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/onAssign.d.ts +53 -0
- package/dist/types/core/decorators/subscriber/onAssign.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/publish.d.ts +23 -0
- package/dist/types/core/decorators/subscriber/publish.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/publisherPath.d.ts +3 -0
- package/dist/types/core/decorators/subscriber/publisherPath.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/subscribe.d.ts +20 -0
- package/dist/types/core/decorators/subscriber/subscribe.d.ts.map +1 -0
- package/dist/types/core/directives/DataProvider.d.ts +45 -0
- package/dist/types/core/directives/DataProvider.d.ts.map +1 -0
- package/dist/types/core/directives/Wording.d.ts +44 -0
- package/dist/types/core/directives/Wording.d.ts.map +1 -0
- package/dist/types/core/mixins/Fetcher.d.ts +108 -0
- package/dist/types/core/mixins/Fetcher.d.ts.map +1 -0
- package/dist/types/core/mixins/FormCheckable.d.ts +95 -0
- package/dist/types/core/mixins/FormCheckable.d.ts.map +1 -0
- package/dist/types/core/mixins/FormElement.d.ts +37 -0
- package/dist/types/core/mixins/FormElement.d.ts.map +1 -0
- package/dist/types/core/mixins/FormInput.d.ts +79 -0
- package/dist/types/core/mixins/FormInput.d.ts.map +1 -0
- package/dist/types/core/mixins/Subscriber.d.ts +38 -0
- package/dist/types/core/mixins/Subscriber.d.ts.map +1 -0
- package/dist/types/core/mixins/TemplatesContainer.d.ts +14 -0
- package/dist/types/core/mixins/TemplatesContainer.d.ts.map +1 -0
- package/dist/types/core/mixins/mixins.d.ts +7 -0
- package/dist/types/core/mixins/mixins.d.ts.map +1 -0
- package/dist/types/core/utils/AncestorAttributeObserver.d.ts +38 -0
- package/dist/types/core/utils/AncestorAttributeObserver.d.ts.map +1 -0
- package/dist/types/core/utils/Arrays.d.ts +98 -0
- package/dist/types/core/utils/Arrays.d.ts.map +1 -0
- package/dist/types/core/utils/DataBindObserver.d.ts +84 -0
- package/dist/types/core/utils/DataBindObserver.d.ts.map +1 -0
- package/dist/types/core/utils/Electron.d.ts +8 -0
- package/dist/types/core/utils/Electron.d.ts.map +1 -0
- package/dist/types/core/utils/Format.d.ts +13 -0
- package/dist/types/core/utils/Format.d.ts.map +1 -0
- package/dist/types/core/utils/HTML.d.ts +59 -0
- package/dist/types/core/utils/HTML.d.ts.map +1 -0
- package/dist/types/core/utils/LocationHandler.d.ts +48 -0
- package/dist/types/core/utils/LocationHandler.d.ts.map +1 -0
- package/dist/types/core/utils/Objects.d.ts +31 -0
- package/dist/types/core/utils/Objects.d.ts.map +1 -0
- package/dist/types/core/utils/PublisherProxy.d.ts +230 -0
- package/dist/types/core/utils/PublisherProxy.d.ts.map +1 -0
- package/dist/types/core/utils/SafariScrollGuard.d.ts +36 -0
- package/dist/types/core/utils/SafariScrollGuard.d.ts.map +1 -0
- package/dist/types/core/utils/Utils.d.ts +6 -0
- package/dist/types/core/utils/Utils.d.ts.map +1 -0
- package/dist/types/core/utils/aesCrypto.d.ts +53 -0
- package/dist/types/core/utils/aesCrypto.d.ts.map +1 -0
- package/dist/types/core/utils/api.d.ts +173 -0
- package/dist/types/core/utils/api.d.ts.map +1 -0
- package/dist/types/core/utils/dataProviderKey.d.ts +56 -0
- package/dist/types/core/utils/dataProviderKey.d.ts.map +1 -0
- package/dist/types/core/utils/derive.d.ts +40 -0
- package/dist/types/core/utils/derive.d.ts.map +1 -0
- package/dist/types/core/utils/endpoint.d.ts +37 -0
- package/dist/types/core/utils/endpoint.d.ts.map +1 -0
- package/dist/types/core/utils/jsonataHelpers.d.ts +15 -0
- package/dist/types/core/utils/jsonataHelpers.d.ts.map +1 -0
- package/dist/types/core/utils/jsonataRuntime.d.ts +13 -0
- package/dist/types/core/utils/jsonataRuntime.d.ts.map +1 -0
- package/dist/types/core/utils/mediaRef.d.ts +34 -0
- package/dist/types/core/utils/mediaRef.d.ts.map +1 -0
- package/dist/types/core/utils/route.d.ts +41 -0
- package/dist/types/core/utils/route.d.ts.map +1 -0
- package/dist/types/core/utils/similarity.d.ts +15 -0
- package/dist/types/core/utils/similarity.d.ts.map +1 -0
- package/dist/types/core/utils/url-pattern.d.ts +3 -0
- package/dist/types/core/utils/url-pattern.d.ts.map +1 -0
- package/dist/types/dataprovider.d.ts +2 -0
- package/dist/types/dataprovider.d.ts.map +1 -0
- package/dist/types/decorators.d.ts +30 -0
- package/dist/types/decorators.d.ts.map +1 -0
- package/dist/types/directives.d.ts +21 -0
- package/dist/types/directives.d.ts.map +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/mixins.d.ts +204 -0
- package/dist/types/mixins.d.ts.map +1 -0
- package/dist/types/test-utils/TestUtils.d.ts +4 -0
- package/dist/types/test-utils/TestUtils.d.ts.map +1 -0
- package/dist/types/utils.d.ts +20 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/package.json +1780 -382
- package/public/docs/hf-samples/beach.jpg +0 -0
- package/public/docs/hf-samples/cats.jpg +0 -0
- package/public/docs/hf-samples/corgi.jpg +0 -0
- package/public/docs/hf-samples/portrait.jpg +0 -0
- package/public/docs/hf-samples/scene.jpg +0 -0
- package/public/docs/hf-samples/singer.jpg +0 -0
- package/public/docs/shader-samples/color.jpg +0 -0
- package/public/docs/shader-samples/depth.png +0 -0
- package/public/docs/shader-samples/impact.jpg +0 -0
- package/public/docs/shader-samples/video.webm +0 -0
- package/scripts/build-addons.mjs +26 -0
- package/scripts/gen-shader-depth.mjs +85 -0
- package/scripts/gen-shader-harris-video.mjs +17 -0
- package/scripts/gen-shader-harris-video.py +84 -0
- package/scripts/hf-vendor.mjs +154 -0
- package/scripts/post-build.mjs +116 -10
- package/scripts/pre-build.mjs +119 -36
- package/scripts/pre-publish.mjs +76 -54
- package/src/addons/3d.ts +5 -0
- package/src/addons/hugging-face-infer.ts +11 -0
- package/src/addons/shader.ts +5 -0
- package/src/addons/webgpu.ts +15 -0
- package/src/core/components/functional/3d/3d.md +118 -0
- package/src/core/components/functional/3d/3d.spec.ts +171 -0
- package/src/core/components/functional/3d/3d.ts +175 -0
- package/src/core/components/functional/3d/asset.ts +22 -0
- package/src/core/components/functional/3d/boot.ts +77 -0
- package/src/core/components/functional/3d/constants.ts +98 -0
- package/src/core/components/functional/3d/demo-content.ts +45 -0
- package/src/core/components/functional/3d/ensure.ts +99 -0
- package/src/core/components/functional/3d/form-bind.ts +40 -0
- package/src/core/components/functional/3d/form-fields.ts +80 -0
- package/src/core/components/functional/3d/form-params.ts +97 -0
- package/src/core/components/functional/3d/frame-capture.spec.ts +72 -0
- package/src/core/components/functional/3d/frame-capture.ts +135 -0
- package/src/core/components/functional/3d/gl.ts +35 -0
- package/src/core/components/functional/3d/life.ts +101 -0
- package/src/core/components/functional/3d/load.ts +129 -0
- package/src/core/components/functional/3d/ops.ts +126 -0
- package/src/core/components/functional/3d/opts.ts +16 -0
- package/src/core/components/functional/3d/orbit.ts +185 -0
- package/src/core/components/functional/3d/out-publish.ts +140 -0
- package/src/core/components/functional/3d/parse.ts +95 -0
- package/src/core/components/functional/3d/pick.ts +92 -0
- package/src/core/components/functional/3d/playback.ts +70 -0
- package/src/core/components/functional/3d/pointer.ts +79 -0
- package/src/core/components/functional/3d/props.ts +50 -0
- package/src/core/components/functional/3d/publisher-listen.ts +13 -0
- package/src/core/components/functional/3d/reload.ts +88 -0
- package/src/core/components/functional/3d/runtime.ts +148 -0
- package/src/core/components/functional/3d/scene-runtime.ts +9 -0
- package/src/core/components/functional/3d/snapshot.ts +73 -0
- package/src/core/components/functional/3d/styles.ts +38 -0
- package/src/core/components/functional/3d/tune.ts +72 -0
- package/src/core/components/functional/3d/types.ts +145 -0
- package/src/core/components/functional/3d/updated.ts +70 -0
- package/src/core/components/functional/3d/view.ts +63 -0
- package/src/core/components/functional/3d/wire.ts +65 -0
- package/src/core/components/functional/infer/hugging-face/hf-cache.ts +198 -0
- package/src/core/components/functional/infer/hugging-face/hf-config.ts +188 -0
- package/src/core/components/functional/infer/hugging-face/hf-controller.spec.ts +350 -0
- package/src/core/components/functional/infer/hugging-face/hf-controller.ts +622 -0
- package/src/core/components/functional/infer/hugging-face/hf-engine.ts +178 -0
- package/src/core/components/functional/infer/hugging-face/hf-input.spec.ts +99 -0
- package/src/core/components/functional/infer/hugging-face/hf-input.ts +218 -0
- package/src/core/components/functional/infer/hugging-face/hf-protocol.ts +76 -0
- package/src/core/components/functional/infer/hugging-face/hf-registry.ts +457 -0
- package/src/core/components/functional/infer/hugging-face/hf-schema.spec.ts +124 -0
- package/src/core/components/functional/infer/hugging-face/hf-schema.ts +390 -0
- package/src/core/components/functional/infer/hugging-face/hf-worker-runtime.spec.ts +147 -0
- package/src/core/components/functional/infer/hugging-face/hf-worker-runtime.ts +381 -0
- package/src/core/components/functional/infer/hugging-face/hugging-face-infer.md +304 -0
- package/src/core/components/functional/infer/hugging-face/hugging-face-infer.ts +202 -0
- package/src/core/components/functional/infer/hugging-face/hugging-face.ts +282 -0
- package/src/core/components/functional/infer/hugging-face/types.ts +325 -0
- package/src/core/components/functional/jsonata/jsonata.md +4 -2
- package/src/core/components/functional/sdui/sdui.md +2 -2
- package/src/core/components/functional/sdui/sdui.ts +40 -29
- package/src/core/components/functional/shader/gl-runtime.ts +782 -0
- package/src/core/components/functional/shader/shader.md +207 -0
- package/src/core/components/functional/shader/shader.spec.ts +288 -0
- package/src/core/components/functional/shader/shader.ts +1569 -0
- package/src/core/components/functional/shader/shadertoy-prelude.ts +52 -0
- package/src/core/components/functional/shader/types.ts +446 -0
- package/src/core/components/functional/webgpu/canvas2d-fallback.ts +125 -0
- package/src/core/components/functional/webgpu/form-bind.ts +116 -0
- package/src/core/components/functional/webgpu/gl-fallback.ts +158 -0
- package/src/core/components/functional/webgpu/gpu-runtime.ts +349 -0
- package/src/core/components/functional/webgpu/helpers.ts +47 -0
- package/src/core/components/functional/webgpu/out-frame.ts +137 -0
- package/src/core/components/functional/webgpu/particles-runtime.ts +426 -0
- package/src/core/components/functional/webgpu/pointer.ts +85 -0
- package/src/core/components/functional/webgpu/types.ts +96 -0
- package/src/core/components/functional/webgpu/webgpu.md +75 -0
- package/src/core/components/functional/webgpu/webgpu.spec.ts +141 -0
- package/src/core/components/functional/webgpu/webgpu.ts +659 -0
- package/src/core/components/functional/webgpu/wgsl-prelude.ts +81 -0
- package/src/core/mixins/Fetcher.ts +1 -1
- package/src/core/utils/HTML.ts +107 -74
- package/src/core/utils/PublisherProxy.ts +29 -6
- package/src/core/utils/jsonataHelpers.ts +36 -0
- package/src/core/utils/mediaRef.spec.ts +85 -0
- package/src/core/utils/mediaRef.ts +130 -0
- package/src/core/utils/similarity.spec.ts +34 -0
- package/src/core/utils/similarity.ts +54 -0
- package/src/docs/_core-concept/dataFlow.md +2 -0
- package/src/docs/_getting-started/cdn-addons.md +73 -0
- package/src/docs/_getting-started/create-a-component.md +1 -1
- package/src/docs/_misc/visual-stack.md +49 -0
- package/src/docs/components/docs-demo-sources.ts +359 -39
- package/src/docs/docs.ts +6 -0
- package/src/docs/example/docs-3d-demos.ts +8 -0
- package/src/docs/example/docs-3d-form.ts +95 -0
- package/src/docs/example/docs-3d-orbit.ts +44 -0
- package/src/docs/example/docs-3d-out.ts +56 -0
- package/src/docs/example/docs-3d-shared.ts +15 -0
- package/src/docs/example/docs-harris-webgpu-demo.ts +482 -0
- package/src/docs/example/docs-hugging-face-demos.ts +516 -0
- package/src/docs/example/docs-shader-demos.ts +357 -0
- package/src/docs/example/docs-visual-stack-demo.ts +394 -0
- package/src/docs/example/docs-webgpu-demo.ts +77 -0
- package/src/docs/navigation/navigation.ts +25 -0
- package/src/docs/search/docs-search.json +899 -2319
- package/src/tsconfig.json +481 -301
- package/src/tsconfig.tsbuildinfo +1 -1
- package/vite/config.js +42 -30
- package/vite.config.mts +51 -12
|
@@ -0,0 +1,970 @@
|
|
|
1
|
+
import { resolveStaticPublisherPath } from "./dataProviderKey";
|
|
2
|
+
import HTML from "./HTML";
|
|
3
|
+
import Objects from "./Objects";
|
|
4
|
+
import { sonicClassPrefix } from "./Utils";
|
|
5
|
+
const DP_OPTION_KEYS = new Set([
|
|
6
|
+
"localStorageMode",
|
|
7
|
+
"expirationDelayMs",
|
|
8
|
+
"invalidateOnPageShow",
|
|
9
|
+
]);
|
|
10
|
+
function isDpOptions(value) {
|
|
11
|
+
if (value == null || typeof value !== "object" || Array.isArray(value)) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
return Object.keys(value).some((key) => DP_OPTION_KEYS.has(key));
|
|
15
|
+
}
|
|
16
|
+
function isLeaf(value) {
|
|
17
|
+
return Object.prototype.hasOwnProperty.call(value, "__value");
|
|
18
|
+
}
|
|
19
|
+
function isComplex(value) {
|
|
20
|
+
return typeof value === "object" && value !== null;
|
|
21
|
+
}
|
|
22
|
+
let SONIC_PREFIX = "sonic";
|
|
23
|
+
if (typeof __BUILD_DATE__ === "undefined") {
|
|
24
|
+
window.__BUILD_DATE__ = "No build date";
|
|
25
|
+
}
|
|
26
|
+
if (typeof __SONIC_PREFIX__ === "undefined") {
|
|
27
|
+
SONIC_PREFIX = "sonic";
|
|
28
|
+
}
|
|
29
|
+
export const prefix = SONIC_PREFIX;
|
|
30
|
+
const localStorageDataKey = SONIC_PREFIX == "sonic"
|
|
31
|
+
? "publisher-proxies-data"
|
|
32
|
+
: SONIC_PREFIX + "-publisher-proxies-data";
|
|
33
|
+
/**
|
|
34
|
+
* Custom Proxy contient les méthodes des publishers retournés par PublisherManager.get(publisherId) qui seront utilisées couramment
|
|
35
|
+
*/
|
|
36
|
+
export class PublisherProxy {
|
|
37
|
+
constructor(target, parentProxPub, parentKey) {
|
|
38
|
+
this._proxies_ = new Map();
|
|
39
|
+
this._is_savable_ = false;
|
|
40
|
+
this._expiration_delay_ = 1000 * 60 * 60 * 12;
|
|
41
|
+
this._invalidate_on_page_show_ = false;
|
|
42
|
+
this._invalidateListeners_ = new Set();
|
|
43
|
+
this._formInvalidateListeners_ = new Set();
|
|
44
|
+
this._assignListeners_ = new Set();
|
|
45
|
+
this._mutationListeners_ = new Set();
|
|
46
|
+
this._fillListeners_ = new Set();
|
|
47
|
+
this._templateFillListeners_ = new Set();
|
|
48
|
+
this._lockInternalMutationPublishing_ = false;
|
|
49
|
+
this._instanceCounter_ = 0;
|
|
50
|
+
this._assignmentId_ = 0;
|
|
51
|
+
this._value_ = target;
|
|
52
|
+
this.parent = parentProxPub || null;
|
|
53
|
+
this._parentKey_ = parentKey;
|
|
54
|
+
this.root = this;
|
|
55
|
+
this._instanceCounter_ = 0;
|
|
56
|
+
while (this.root.parent) {
|
|
57
|
+
this.root = this.root.parent;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Supprime le proxy et ses sous proxy
|
|
62
|
+
* Supprime les écouteurs associés
|
|
63
|
+
*/
|
|
64
|
+
delete() {
|
|
65
|
+
for (const key in this._proxies_.keys()) {
|
|
66
|
+
if (key == "_parent_")
|
|
67
|
+
continue;
|
|
68
|
+
this._proxies_.get(key)?.delete();
|
|
69
|
+
}
|
|
70
|
+
this._invalidateListeners_.clear();
|
|
71
|
+
this._formInvalidateListeners_.clear();
|
|
72
|
+
this._assignListeners_.clear();
|
|
73
|
+
this._mutationListeners_.clear();
|
|
74
|
+
this._fillListeners_.clear();
|
|
75
|
+
this._templateFillListeners_.clear();
|
|
76
|
+
this._proxies_.clear();
|
|
77
|
+
PublisherProxy.instances.delete(this._instanceCounter_);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Utile pour savoir si quelque chose est en écoute d'une modification sur le proxy via une des methodes associées
|
|
81
|
+
*/
|
|
82
|
+
hasListener() {
|
|
83
|
+
return (this._templateFillListeners_.size > 0 ||
|
|
84
|
+
this._assignListeners_.size > 0 ||
|
|
85
|
+
this._invalidateListeners_.size > 0 ||
|
|
86
|
+
this._formInvalidateListeners_.size > 0 ||
|
|
87
|
+
this._mutationListeners_.size > 0 ||
|
|
88
|
+
this._fillListeners_.size > 0);
|
|
89
|
+
}
|
|
90
|
+
_publishInternalMutation_(lockInternalMutationsTransmission = false) {
|
|
91
|
+
this._mutationListeners_.forEach((handler) => handler());
|
|
92
|
+
if (this._is_savable_ && !PublisherManager.changed) {
|
|
93
|
+
PublisherManager.changed = true;
|
|
94
|
+
PublisherManager.saveId++;
|
|
95
|
+
const saveId = PublisherManager.saveId;
|
|
96
|
+
setTimeout(() => PublisherManager.getInstance().saveToLocalStorage(saveId), 1000);
|
|
97
|
+
}
|
|
98
|
+
if (lockInternalMutationsTransmission)
|
|
99
|
+
return;
|
|
100
|
+
if (this.parent) {
|
|
101
|
+
this.parent._publishInternalMutation_();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
async _publishAssignement_(lockInternalMutationsTransmission = false) {
|
|
105
|
+
this._assignmentId_++;
|
|
106
|
+
const currentId = this._assignmentId_;
|
|
107
|
+
if (currentId !== this._assignmentId_)
|
|
108
|
+
return;
|
|
109
|
+
const newValue = this.get();
|
|
110
|
+
this._assignListeners_.forEach((handler) => {
|
|
111
|
+
handler(newValue);
|
|
112
|
+
});
|
|
113
|
+
this._publishInternalMutation_(lockInternalMutationsTransmission);
|
|
114
|
+
}
|
|
115
|
+
_publishInvalidation_() {
|
|
116
|
+
this._invalidateListeners_.forEach((handler) => handler());
|
|
117
|
+
}
|
|
118
|
+
_publishFormInvalidation_() {
|
|
119
|
+
this._formInvalidateListeners_.forEach((handler) => handler());
|
|
120
|
+
}
|
|
121
|
+
_publishDynamicFilling_(key, value) {
|
|
122
|
+
this._fillListeners_.forEach((handler) => {
|
|
123
|
+
if (handler[key] !== value)
|
|
124
|
+
handler[key] = value;
|
|
125
|
+
});
|
|
126
|
+
this._publishTemplateFilling_(key, value);
|
|
127
|
+
}
|
|
128
|
+
_publishTemplateFilling_(key, value) {
|
|
129
|
+
this._templateFillListeners_.forEach((handler) => {
|
|
130
|
+
const desc = Object.getOwnPropertyDescriptor(handler, key);
|
|
131
|
+
if (desc && !desc.set && !desc.writable)
|
|
132
|
+
return;
|
|
133
|
+
if (handler.propertyMap && handler.propertyMap[key]) {
|
|
134
|
+
key = handler.propertyMap[key];
|
|
135
|
+
}
|
|
136
|
+
if (typeof handler[key] != "undefined" && handler[key] !== value) {
|
|
137
|
+
handler[key] = value;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Appel la fonction "handler" (passée en paramettre) lorsque la valeur gérée par le proxy change par assignation
|
|
143
|
+
* hanlder reçois alors la nouvelle valeur interne du proxy en paramètre
|
|
144
|
+
*/
|
|
145
|
+
onAssign(handler, directHandlerCall = true) {
|
|
146
|
+
if (typeof handler != "function")
|
|
147
|
+
return;
|
|
148
|
+
if (this._assignListeners_.has(handler))
|
|
149
|
+
return;
|
|
150
|
+
this._assignListeners_.add(handler);
|
|
151
|
+
if (directHandlerCall)
|
|
152
|
+
handler(this.get());
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Stop les appels de la fonction "handler" (passée en paramettre) lorsque la valeur gérée par le proxy change par assignation
|
|
156
|
+
*/
|
|
157
|
+
offAssign(handler) {
|
|
158
|
+
this._assignListeners_.delete(handler);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Appel la fonction "handler" (passée en paramettre) lorsque la donnée est flaggée comme invalide
|
|
162
|
+
*/
|
|
163
|
+
onInvalidate(handler) {
|
|
164
|
+
if (typeof handler != "function")
|
|
165
|
+
return;
|
|
166
|
+
this._invalidateListeners_.add(handler);
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Stop les appels de la fonction "handler" (passée en paramettre) lorsque la donnée est flaggée comme invalide
|
|
170
|
+
*/
|
|
171
|
+
offInvalidate(handler) {
|
|
172
|
+
if (typeof handler != "function")
|
|
173
|
+
return;
|
|
174
|
+
this._invalidateListeners_.delete(handler);
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Flag les données comme étant invalides
|
|
178
|
+
*/
|
|
179
|
+
invalidate() {
|
|
180
|
+
this._publishInvalidation_();
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Appel la fonction "handler" (passée en paramettre) lorsque la donnée est flaggée comme invalide
|
|
184
|
+
*/
|
|
185
|
+
onFormInvalidate(handler) {
|
|
186
|
+
if (typeof handler != "function")
|
|
187
|
+
return;
|
|
188
|
+
this._formInvalidateListeners_.add(handler);
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Stop les appels de la fonction "handler" (passée en paramettre) lorsque la donnée est flaggée comme invalide
|
|
192
|
+
*/
|
|
193
|
+
offFormInvalidate(handler) {
|
|
194
|
+
if (typeof handler != "function")
|
|
195
|
+
return;
|
|
196
|
+
this._formInvalidateListeners_.delete(handler);
|
|
197
|
+
}
|
|
198
|
+
invalidateForm() {
|
|
199
|
+
this._publishFormInvalidation_();
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Appel la fonction "handler" (passée en paramettre) lorsque quelque chose change la valeur gérée par le proxy quelque soit la profondeur de la donnée
|
|
203
|
+
*
|
|
204
|
+
*/
|
|
205
|
+
onInternalMutation(handler) {
|
|
206
|
+
if (typeof handler != "function")
|
|
207
|
+
return;
|
|
208
|
+
this._mutationListeners_.add(handler);
|
|
209
|
+
handler();
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Stop les Appels de la fonction "handler" (passée en paramettre) lorsque quelque chose change la valeur gérée par le proxy quelque soit la profondeur de la donnée
|
|
213
|
+
*/
|
|
214
|
+
offInternalMutation(handler) {
|
|
215
|
+
if (typeof handler != "function")
|
|
216
|
+
return;
|
|
217
|
+
this._mutationListeners_.delete(handler);
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Maintient le remplissage de l'objet / tableau "handler" passé en paramètre avec les valeurs du proxy
|
|
221
|
+
* Remplit uniquement les valeurs déjà présentes dans l'objet / tableau passé en paramètre
|
|
222
|
+
*/
|
|
223
|
+
startTemplateFilling(handler) {
|
|
224
|
+
this._templateFillListeners_.add(handler);
|
|
225
|
+
if (typeof this._value_ != "object")
|
|
226
|
+
return;
|
|
227
|
+
for (const z in this._value_) {
|
|
228
|
+
let valueKey = z;
|
|
229
|
+
const value = this._value_[z];
|
|
230
|
+
if (handler.propertyMap && handler.propertyMap[z]) {
|
|
231
|
+
valueKey = handler.propertyMap[z];
|
|
232
|
+
}
|
|
233
|
+
if (typeof handler[z] != "undefined" && handler[z] !== value) {
|
|
234
|
+
handler[valueKey] = value;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Arrête de maintenir le remplissage de l'objet / tableau "handler" passé en paramètre avec les valeurs du proxy
|
|
240
|
+
*/
|
|
241
|
+
stopTemplateFilling(handler) {
|
|
242
|
+
this._templateFillListeners_.delete(handler);
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Maintient le remplissage de l'objet / tableau "handler" passé en paramètre avec les valeurs du proxy
|
|
246
|
+
* Remplit toute valeur qu'elle soit présente ou pas initialement dans l'objet
|
|
247
|
+
*/
|
|
248
|
+
startDynamicFilling(handler) {
|
|
249
|
+
this._fillListeners_.add(handler);
|
|
250
|
+
for (const z in this._value_) {
|
|
251
|
+
const value = this._value_[z];
|
|
252
|
+
if (handler[z] !== value)
|
|
253
|
+
handler[z] = value;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
/*
|
|
257
|
+
* Arrête de maintenir le remplissage de l'objet / tableau "handler" passé en paramètre avec les valeurs du proxy
|
|
258
|
+
*/
|
|
259
|
+
stopDynamicFilling(handler) {
|
|
260
|
+
this._fillListeners_.delete(handler);
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Assigne une nouvelle valeur au proxy ce qui déclenche la transmission de la donnée en fonction des "écouteurs" associés
|
|
264
|
+
*/
|
|
265
|
+
set(newValue, lockInternalMutationsTransmission = false) {
|
|
266
|
+
/**
|
|
267
|
+
* On retounre tout de suite si la valeur n'a pas changé
|
|
268
|
+
*/
|
|
269
|
+
if (this._value_ === newValue)
|
|
270
|
+
return true;
|
|
271
|
+
/**
|
|
272
|
+
* On retounre tout de suite si la valeur n'a pas changé
|
|
273
|
+
* et qu'elle est primitive
|
|
274
|
+
*/
|
|
275
|
+
if ((isComplex(this._value_) &&
|
|
276
|
+
isComplex(newValue) &&
|
|
277
|
+
newValue &&
|
|
278
|
+
isLeaf(this._value_) &&
|
|
279
|
+
isLeaf(newValue) &&
|
|
280
|
+
this._value_.__value === newValue.__value) ||
|
|
281
|
+
(!isComplex(newValue) && newValue === this._value_.__value)) {
|
|
282
|
+
return true;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* On assigne la nouvelle valeur
|
|
286
|
+
*/
|
|
287
|
+
/** Si la valeur est complexe on assigne newValue directe sinon on le met dans une sous valeur __value */
|
|
288
|
+
this._value_ = isComplex(newValue)
|
|
289
|
+
? newValue
|
|
290
|
+
: { __value: newValue };
|
|
291
|
+
this._cachedGet_ = undefined;
|
|
292
|
+
/**
|
|
293
|
+
* Si il s'agit d'une valeur primitive (un entier, une chaine ) la valeure en renseignée par un objet contenant la vaeur {__value}
|
|
294
|
+
* On publie juste et on sen va.
|
|
295
|
+
*/
|
|
296
|
+
const isLeafNewValue = isLeaf(this._value_);
|
|
297
|
+
if (this._parentKey_ && this.parent) {
|
|
298
|
+
//si le parent n'a pas de valeur, on la crée en renseignant this.value et on retourne.
|
|
299
|
+
const valueTosetInParent = isLeaf(this._value_)
|
|
300
|
+
? this._value_.__value
|
|
301
|
+
: this._value_;
|
|
302
|
+
if (this.parent?.get() == null && this.parent?.get() == undefined) {
|
|
303
|
+
//if _parentKey_ is a number, we assume it's an array
|
|
304
|
+
if (!isNaN(Number(this._parentKey_))) {
|
|
305
|
+
const parent = [];
|
|
306
|
+
parent[Number(this._parentKey_)] = valueTosetInParent;
|
|
307
|
+
this.parent.set(parent);
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
this.parent.set({ [this._parentKey_]: valueTosetInParent });
|
|
311
|
+
}
|
|
312
|
+
// return;
|
|
313
|
+
}
|
|
314
|
+
else {
|
|
315
|
+
//on mets à jour la valeur de la clef dans l'objet parnet pour refléter le changement au ca sou elle n'existait pas
|
|
316
|
+
this.parent._value_[this._parentKey_] = valueTosetInParent;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
if (isLeafNewValue) {
|
|
320
|
+
// Si la valeur précédente était composite, on reset tous les sous-éléments à null
|
|
321
|
+
this._proxies_.forEach((_subProxy, key) => {
|
|
322
|
+
/**
|
|
323
|
+
*
|
|
324
|
+
* On reùmplace les undefined par des nuls pour eviter la suppression des clefs sauf pour les clef tableaux
|
|
325
|
+
**/
|
|
326
|
+
if (key != "_parent_") {
|
|
327
|
+
_subProxy.set(null);
|
|
328
|
+
this._publishDynamicFilling_(key, null);
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
//await //await here gives better performance but can cause issues with some listeners
|
|
332
|
+
this._publishAssignement_(lockInternalMutationsTransmission);
|
|
333
|
+
if (this.parent && this._parentKey_) {
|
|
334
|
+
this.parent._publishDynamicFilling_(this._parentKey_, this._value_.__value);
|
|
335
|
+
}
|
|
336
|
+
return true;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* On fait la diff sur l'existant.
|
|
340
|
+
* On maintient les proxys à supprimer et ceux à ajouter.
|
|
341
|
+
* On met à jour leur valeur interne
|
|
342
|
+
* On publie les maj au fur et a mesure de modifications
|
|
343
|
+
*/
|
|
344
|
+
for (const key in this._value_) {
|
|
345
|
+
const currentValue = this._value_[key];
|
|
346
|
+
if (currentValue === undefined)
|
|
347
|
+
delete this._value_[key];
|
|
348
|
+
}
|
|
349
|
+
this._proxies_.forEach((_subProxy, key) => {
|
|
350
|
+
/**
|
|
351
|
+
*
|
|
352
|
+
* On reùmplace les undefined par des nuls pour eviter la suppression des clefs sauf pour les clef tableaux
|
|
353
|
+
**/
|
|
354
|
+
const currentValue = this._value_[key];
|
|
355
|
+
if (key != "_parent_") {
|
|
356
|
+
if (currentValue === undefined &&
|
|
357
|
+
currentValue !== null &&
|
|
358
|
+
isNaN(Number(key))) {
|
|
359
|
+
_subProxy.set(null);
|
|
360
|
+
this._publishDynamicFilling_(key, null);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
/**
|
|
365
|
+
* On prévient les écouteurs que la valeur a changé
|
|
366
|
+
*/
|
|
367
|
+
//await //await here gives better performance but can cause issues with some listeners
|
|
368
|
+
this._publishAssignement_();
|
|
369
|
+
if (this.parent && this._parentKey_)
|
|
370
|
+
this.parent._publishDynamicFilling_(this._parentKey_, this._value_);
|
|
371
|
+
/**
|
|
372
|
+
* Si la donnée est complexe (objet, tableau)
|
|
373
|
+
* on crée les proxys pour les sous-éléments qui n'en on pas
|
|
374
|
+
* On renseigne les nouvelles valeurs internes des proxies
|
|
375
|
+
*/
|
|
376
|
+
if (isComplex(this._value_)) {
|
|
377
|
+
for (const key in this._value_) {
|
|
378
|
+
const v = newValue[key];
|
|
379
|
+
const isVComplex = isComplex(v);
|
|
380
|
+
const valueV = isVComplex ? v : { __value: v };
|
|
381
|
+
if (!this._proxies_.has(key)) {
|
|
382
|
+
// A surveiller ancienne version
|
|
383
|
+
// const newPublisher = new DataProvider({}, this);
|
|
384
|
+
// this._proxies_.set(key, newPublisher);
|
|
385
|
+
// newPublisher._proxies_.set("_parent_", this);
|
|
386
|
+
this._publishDynamicFilling_(key, v);
|
|
387
|
+
continue;
|
|
388
|
+
}
|
|
389
|
+
//await //await here gives better performance but can cause issues with some listeners
|
|
390
|
+
this._proxies_.get(key)?.set(valueV, true);
|
|
391
|
+
this._publishDynamicFilling_(key, v);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
return true;
|
|
395
|
+
}
|
|
396
|
+
get() {
|
|
397
|
+
trackModifiedPublisher(this);
|
|
398
|
+
if (this._cachedGet_ !== undefined)
|
|
399
|
+
return this._cachedGet_;
|
|
400
|
+
if (Object.prototype.hasOwnProperty.call(this._value_, "__value")) {
|
|
401
|
+
const v = this._value_.__value;
|
|
402
|
+
return (this._cachedGet_ = (v != undefined ? v : null));
|
|
403
|
+
}
|
|
404
|
+
return (this._cachedGet_ = (this._value_ != undefined ? this._value_ : null));
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* retourner le webcomponent auquel le proxy est associé
|
|
408
|
+
*/
|
|
409
|
+
get $tag() {
|
|
410
|
+
if (!this._instanceCounter_) {
|
|
411
|
+
PublisherProxy.instancesCounter++;
|
|
412
|
+
this._instanceCounter_ = PublisherProxy.instancesCounter;
|
|
413
|
+
}
|
|
414
|
+
PublisherProxy.instances.set(this._instanceCounter_, this);
|
|
415
|
+
const str = "<" +
|
|
416
|
+
SONIC_PREFIX +
|
|
417
|
+
'-publisher-proxy publisher="' +
|
|
418
|
+
this._instanceCounter_ +
|
|
419
|
+
'"></' +
|
|
420
|
+
SONIC_PREFIX +
|
|
421
|
+
"-publisher-proxy>";
|
|
422
|
+
return str;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
PublisherProxy.instances = new Map();
|
|
426
|
+
PublisherProxy.instancesCounter = 0;
|
|
427
|
+
/**
|
|
428
|
+
* Utilitaires de gestion des DataProvider
|
|
429
|
+
* Obtenir, replacer ou supprimer un DataProvider
|
|
430
|
+
*
|
|
431
|
+
*/
|
|
432
|
+
const modifiedCollectore = [];
|
|
433
|
+
function trackModifiedPublisher(proxy) {
|
|
434
|
+
if (modifiedCollectore.length > 0)
|
|
435
|
+
modifiedCollectore[0].add(proxy);
|
|
436
|
+
}
|
|
437
|
+
export function collectModifiedPublisher() {
|
|
438
|
+
modifiedCollectore.unshift(new Set());
|
|
439
|
+
}
|
|
440
|
+
export function getModifiedPublishers() {
|
|
441
|
+
return modifiedCollectore.shift();
|
|
442
|
+
}
|
|
443
|
+
export class PublisherManager {
|
|
444
|
+
constructor() {
|
|
445
|
+
this.enabledLocaStorageProxies = [];
|
|
446
|
+
this.publishers = new Map();
|
|
447
|
+
this.localStorageData = {};
|
|
448
|
+
this.isLocalStrorageReady = null;
|
|
449
|
+
this.initialisedData = [];
|
|
450
|
+
if (PublisherManager.instance != null)
|
|
451
|
+
throw "Singleton / use getInstance";
|
|
452
|
+
PublisherManager.instance = this;
|
|
453
|
+
this.isLocalStrorageReady = this.cleanStorageData();
|
|
454
|
+
PublisherManager.initPageShowHandler();
|
|
455
|
+
}
|
|
456
|
+
static initPageShowHandler() {
|
|
457
|
+
if (PublisherManager.pageShowHandlerInitialized)
|
|
458
|
+
return;
|
|
459
|
+
PublisherManager.pageShowHandlerInitialized = true;
|
|
460
|
+
window.addEventListener("pageshow", (e) => {
|
|
461
|
+
if (e.persisted)
|
|
462
|
+
PublisherManager.getInstance().invalidateAll();
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
invalidateAll() {
|
|
466
|
+
this.publishers.forEach((publisher) => {
|
|
467
|
+
if (!publisher._invalidate_on_page_show_) {
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
publisher.invalidate();
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
async cleanStorageData() {
|
|
474
|
+
return new Promise((resolve) => {
|
|
475
|
+
const doiIt = async () => {
|
|
476
|
+
try {
|
|
477
|
+
let compressedData = localStorage.getItem(localStorageDataKey);
|
|
478
|
+
let localStorageJSON = null;
|
|
479
|
+
if (compressedData)
|
|
480
|
+
localStorageJSON = await this.decompress(compressedData, "gzip");
|
|
481
|
+
if (localStorageJSON) {
|
|
482
|
+
try {
|
|
483
|
+
this.localStorageData = JSON.parse(localStorageJSON);
|
|
484
|
+
}
|
|
485
|
+
catch (e) {
|
|
486
|
+
this.localStorageData = {};
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
else {
|
|
490
|
+
compressedData = await this.compress("{}", "gzip");
|
|
491
|
+
localStorage.setItem(localStorageDataKey, compressedData);
|
|
492
|
+
this.localStorageData = {};
|
|
493
|
+
}
|
|
494
|
+
const expirationDelay = 1000 * 60 * 60 * 12;
|
|
495
|
+
for (const key in this.localStorageData) {
|
|
496
|
+
const item = this.localStorageData[key];
|
|
497
|
+
const expires = new Date().getTime() -
|
|
498
|
+
(item.expirationDelayMs || expirationDelay);
|
|
499
|
+
if (item.lastModifiationMS < expires) {
|
|
500
|
+
delete this.localStorageData[key];
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
resolve(true);
|
|
504
|
+
}
|
|
505
|
+
catch (e) {
|
|
506
|
+
window.requestAnimationFrame(() => {
|
|
507
|
+
resolve(false);
|
|
508
|
+
});
|
|
509
|
+
console.warn("no publisher cache in this browser");
|
|
510
|
+
}
|
|
511
|
+
};
|
|
512
|
+
doiIt();
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* PublisherManager est un singleton
|
|
517
|
+
*/
|
|
518
|
+
static getInstance(id) {
|
|
519
|
+
if (id) {
|
|
520
|
+
const pm = PublisherManager.instances.get(id);
|
|
521
|
+
if (pm) {
|
|
522
|
+
return pm;
|
|
523
|
+
}
|
|
524
|
+
else {
|
|
525
|
+
console.warn("No PublisherManager instance registered with id:", id, "creating new one");
|
|
526
|
+
return new PublisherManager();
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
if (PublisherManager.instance == null)
|
|
530
|
+
return new PublisherManager();
|
|
531
|
+
return PublisherManager.instance;
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* shortcut static pour obtenir un publisher vias sont id/adresse sans taper getInstance.
|
|
535
|
+
* Si le publisher n'existe pas, il est créé.
|
|
536
|
+
*/
|
|
537
|
+
static get(id, options) {
|
|
538
|
+
return PublisherManager.getInstance().get(id, options);
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Obtenir un publisher vias sont id/adresse
|
|
542
|
+
* Si le publisher n'existe pas, il est créé.
|
|
543
|
+
*/
|
|
544
|
+
async setLocalData(publisher, id) {
|
|
545
|
+
await this.isLocalStrorageReady;
|
|
546
|
+
publisher.set(this.localStorageData[id + "¤lang_" + HTML.getLanguage()]?.data ||
|
|
547
|
+
publisher.get());
|
|
548
|
+
}
|
|
549
|
+
get(id, options) {
|
|
550
|
+
const hasLocalStorage = options?.localStorageMode === "enabled";
|
|
551
|
+
const invalidateOnPageShow = options?.invalidateOnPageShow === true;
|
|
552
|
+
if (!this.publishers.has(id)) {
|
|
553
|
+
const data = {};
|
|
554
|
+
const publisher = createPublisher(data);
|
|
555
|
+
this.set(id, publisher);
|
|
556
|
+
}
|
|
557
|
+
const publisher = this.publishers.get(id);
|
|
558
|
+
if (hasLocalStorage && this.initialisedData.indexOf(id) === -1) {
|
|
559
|
+
if (options?.expirationDelayMs) {
|
|
560
|
+
publisher._expiration_delay_ =
|
|
561
|
+
options.expirationDelayMs;
|
|
562
|
+
}
|
|
563
|
+
publisher._is_savable_ = true;
|
|
564
|
+
this.initialisedData.push(id);
|
|
565
|
+
this.setLocalData(publisher, id);
|
|
566
|
+
}
|
|
567
|
+
if (invalidateOnPageShow) {
|
|
568
|
+
publisher._invalidate_on_page_show_ =
|
|
569
|
+
invalidateOnPageShow;
|
|
570
|
+
}
|
|
571
|
+
return this.publishers.get(id);
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Remplace un publisher pour l'id fourni par un autre.
|
|
575
|
+
* L'autre publisher n'est pas supprimé.
|
|
576
|
+
*/
|
|
577
|
+
set(id, publisher) {
|
|
578
|
+
this.publishers.set(id, publisher);
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* @warning
|
|
582
|
+
* !!!!! ATTENTION !!!!!
|
|
583
|
+
* Il est fort à aprier que vous ne voulez pas utiliser cette methode
|
|
584
|
+
* Il s'agit d'une supression complete
|
|
585
|
+
* * du publisher de la liste
|
|
586
|
+
* * des bindings
|
|
587
|
+
* * de même que ses sous publishers
|
|
588
|
+
*
|
|
589
|
+
* UTILISEZ PLUTÔT la méthode publisher.set({}) pour réinitialiser un publisher sans perdre les ecouteurs
|
|
590
|
+
*/
|
|
591
|
+
delete(id) {
|
|
592
|
+
if (!this.publishers.has(id))
|
|
593
|
+
return false;
|
|
594
|
+
this.publishers.delete(id);
|
|
595
|
+
return true;
|
|
596
|
+
}
|
|
597
|
+
async saveToLocalStorage(saveId = 0) {
|
|
598
|
+
/**
|
|
599
|
+
* si l'id a changé et que ce n'est pas un multiple de 10, on ne sauve pas
|
|
600
|
+
* on sauvegarde quand même tous les 10 au cas ou on aurrait des changements en continue, par exemple à chaque frame
|
|
601
|
+
*/
|
|
602
|
+
if (saveId !== PublisherManager.saveId && saveId % 10 != 0)
|
|
603
|
+
return;
|
|
604
|
+
try {
|
|
605
|
+
if (!PublisherManager.changed || PublisherManager.saving)
|
|
606
|
+
return;
|
|
607
|
+
PublisherManager.saving = true;
|
|
608
|
+
PublisherManager.changed = false;
|
|
609
|
+
const keys = Array.from(this.publishers.keys());
|
|
610
|
+
let hasChanged = false;
|
|
611
|
+
for (const key of keys) {
|
|
612
|
+
const publisher = this.publishers.get(key);
|
|
613
|
+
if (!publisher?._is_savable_)
|
|
614
|
+
continue;
|
|
615
|
+
const data = publisher?.get();
|
|
616
|
+
if (!data)
|
|
617
|
+
continue;
|
|
618
|
+
this.localStorageData[key + "¤lang_" + HTML.getLanguage()] = {
|
|
619
|
+
lastModifiationMS: new Date().getTime(),
|
|
620
|
+
expirationDelayMs: publisher._expiration_delay_,
|
|
621
|
+
data: data,
|
|
622
|
+
};
|
|
623
|
+
hasChanged = true;
|
|
624
|
+
}
|
|
625
|
+
// on enregistre les données
|
|
626
|
+
if (hasChanged) {
|
|
627
|
+
const compressedData = await this.compress(JSON.stringify(this.localStorageData), "gzip");
|
|
628
|
+
localStorage.setItem(localStorageDataKey, compressedData);
|
|
629
|
+
}
|
|
630
|
+
PublisherManager.saving = false;
|
|
631
|
+
if (PublisherManager.changed) {
|
|
632
|
+
PublisherManager.saveId++;
|
|
633
|
+
const saveId = PublisherManager.saveId;
|
|
634
|
+
setTimeout(() => this.saveToLocalStorage(saveId), 1000);
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
catch (e) {
|
|
638
|
+
PublisherManager.saving = false;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
async compress(string, encoding) {
|
|
642
|
+
const byteArray = new TextEncoder().encode(string);
|
|
643
|
+
const win = window;
|
|
644
|
+
const cs = new win.CompressionStream(encoding);
|
|
645
|
+
const writer = cs.writable.getWriter();
|
|
646
|
+
writer.write(byteArray);
|
|
647
|
+
writer.close();
|
|
648
|
+
const result = await new Response(cs.readable).arrayBuffer();
|
|
649
|
+
const arrayBufferView = new Uint8Array(result);
|
|
650
|
+
let str = "";
|
|
651
|
+
for (let i = 0; i < arrayBufferView.length; i++) {
|
|
652
|
+
str += String.fromCharCode(arrayBufferView[i]);
|
|
653
|
+
}
|
|
654
|
+
return btoa(str);
|
|
655
|
+
}
|
|
656
|
+
async decompress(str, encoding) {
|
|
657
|
+
const decodedString = atob(str);
|
|
658
|
+
const arrayBufferViewFromLocalStorage = Uint8Array.from(decodedString, (c) => c.charCodeAt(0));
|
|
659
|
+
const byteArray = arrayBufferViewFromLocalStorage.buffer;
|
|
660
|
+
const win = window;
|
|
661
|
+
const cs = new win.DecompressionStream(encoding);
|
|
662
|
+
const writer = cs.writable.getWriter();
|
|
663
|
+
writer.write(byteArray);
|
|
664
|
+
writer.close();
|
|
665
|
+
const result = await new Response(cs.readable).arrayBuffer();
|
|
666
|
+
return new TextDecoder().decode(result);
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
PublisherManager.buildDate = __BUILD_DATE__;
|
|
670
|
+
PublisherManager.changed = false;
|
|
671
|
+
PublisherManager.saving = false;
|
|
672
|
+
PublisherManager.saveId = 0;
|
|
673
|
+
PublisherManager.instance = null;
|
|
674
|
+
PublisherManager.instances = new Map();
|
|
675
|
+
PublisherManager.pageShowHandlerInitialized = false;
|
|
676
|
+
/**
|
|
677
|
+
* Partage le singleton entre le bundle core et les addons CDN (3d / shader / hf).
|
|
678
|
+
* Sans cela, chaque IIFE aurait sa propre classe `PublisherManager` et des
|
|
679
|
+
* dataProviders isolés.
|
|
680
|
+
*/
|
|
681
|
+
if (typeof window !== "undefined") {
|
|
682
|
+
const win = window;
|
|
683
|
+
const sharedKey = sonicClassPrefix + "PublisherManager";
|
|
684
|
+
const Shared = (win[sharedKey] || PublisherManager);
|
|
685
|
+
if (!win[sharedKey])
|
|
686
|
+
win[sharedKey] = PublisherManager;
|
|
687
|
+
if (Shared !== PublisherManager) {
|
|
688
|
+
const syncKeys = [
|
|
689
|
+
"instance",
|
|
690
|
+
"instances",
|
|
691
|
+
"changed",
|
|
692
|
+
"saving",
|
|
693
|
+
"saveId",
|
|
694
|
+
"pageShowHandlerInitialized",
|
|
695
|
+
];
|
|
696
|
+
for (const key of syncKeys) {
|
|
697
|
+
Object.defineProperty(PublisherManager, key, {
|
|
698
|
+
configurable: true,
|
|
699
|
+
get() {
|
|
700
|
+
return Shared[key];
|
|
701
|
+
},
|
|
702
|
+
set(value) {
|
|
703
|
+
Shared[key] = value;
|
|
704
|
+
},
|
|
705
|
+
});
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
const internalProps = new Set([
|
|
710
|
+
"invalidate",
|
|
711
|
+
"onInvalidate",
|
|
712
|
+
"offInvalidate",
|
|
713
|
+
"invalidateForm",
|
|
714
|
+
"onFormInvalidate",
|
|
715
|
+
"offFormInvalidate",
|
|
716
|
+
"onAssign",
|
|
717
|
+
"offAssign",
|
|
718
|
+
"startDynamicFilling",
|
|
719
|
+
"stopDynamicFilling",
|
|
720
|
+
"startTemplateFilling",
|
|
721
|
+
"stopTemplateFilling",
|
|
722
|
+
"onInternalMutation",
|
|
723
|
+
"offInternalMutation",
|
|
724
|
+
"set",
|
|
725
|
+
"get",
|
|
726
|
+
"$tag",
|
|
727
|
+
"_cachedGet_",
|
|
728
|
+
"_templateFillListeners_",
|
|
729
|
+
"_fillListeners_",
|
|
730
|
+
"_assignListeners_",
|
|
731
|
+
"_invalidateListeners_",
|
|
732
|
+
"_formInvalidateListeners_",
|
|
733
|
+
"_publishInternalMutation_",
|
|
734
|
+
"hasListener",
|
|
735
|
+
"delete",
|
|
736
|
+
"_mutationListeners_",
|
|
737
|
+
"_publishDynamicFilling_",
|
|
738
|
+
"_publishInvalidation_",
|
|
739
|
+
"_publishFormInvalidation_",
|
|
740
|
+
"_publishTemplateFilling_",
|
|
741
|
+
"_publishAssignement_",
|
|
742
|
+
"_proxies_",
|
|
743
|
+
"parent",
|
|
744
|
+
"_parentKey_",
|
|
745
|
+
"_value_",
|
|
746
|
+
"_is_savable_",
|
|
747
|
+
"_expiration_delay_",
|
|
748
|
+
"_lockInternalMutationPublishing_",
|
|
749
|
+
"_instanceCounter_",
|
|
750
|
+
"_assignmentId_",
|
|
751
|
+
"_invalidate_on_page_show_",
|
|
752
|
+
]);
|
|
753
|
+
function createPublisherHandler(publisherInstance, getProxy) {
|
|
754
|
+
return {
|
|
755
|
+
/**
|
|
756
|
+
* Lorsque l'on écrit monConteneur = publisher.maClef ou monConteneur = publisher["maClef"] monConteneur contient :
|
|
757
|
+
* Les methodes de PublisherProxy (onAssign... : voir liste dans kle tableaus si dessous), si la clef est une méthode de PublisherProxy,,
|
|
758
|
+
* Sinon un autre proxy qui a comme valeur interne la valeur corespondante à la clef dans l'objet.
|
|
759
|
+
*/
|
|
760
|
+
get: function (_publisherInstance, sKey) {
|
|
761
|
+
if (typeof sKey === "string" && internalProps.has(sKey))
|
|
762
|
+
return publisherInstance[sKey];
|
|
763
|
+
if (sKey == Symbol.toPrimitive) {
|
|
764
|
+
return () => getProxy().get();
|
|
765
|
+
}
|
|
766
|
+
// Support de la notation à points (rigolo mais pas intuitif)
|
|
767
|
+
// if (sKey.includes(".")) {
|
|
768
|
+
// const keys = sKey.split(".");
|
|
769
|
+
// return thisProxy[keys.shift()][keys.join(".")];
|
|
770
|
+
// }
|
|
771
|
+
if (!publisherInstance._proxies_.has(sKey)) {
|
|
772
|
+
const vValue = publisherInstance._value_[sKey];
|
|
773
|
+
const newPublisher = createPublisher(isComplex(vValue) ? vValue : { __value: vValue }, publisherInstance, sKey);
|
|
774
|
+
newPublisher._proxies_.set("_parent_", getProxy());
|
|
775
|
+
publisherInstance._proxies_.set(sKey, newPublisher);
|
|
776
|
+
}
|
|
777
|
+
return publisherInstance._proxies_.get(sKey);
|
|
778
|
+
},
|
|
779
|
+
/**
|
|
780
|
+
* Lorsque l'on écrit publisher.maClef = value ou publisher["maClef"] = value, on assigne la valeur à la clef dans l'objet interne.
|
|
781
|
+
* Les gestionnairs associés sopnt déclenchés en conséquence de manière profonde et remontante si nécessaire.
|
|
782
|
+
*/
|
|
783
|
+
set: function (_publisherInstance, sKey, vValue) {
|
|
784
|
+
//Fonctionnement pour la donnée interne pas de dispatch;
|
|
785
|
+
if (sKey == "_value_") {
|
|
786
|
+
publisherInstance._value_ = vValue;
|
|
787
|
+
return true;
|
|
788
|
+
}
|
|
789
|
+
if (sKey == "_cachedGet_") {
|
|
790
|
+
publisherInstance._cachedGet_ = vValue;
|
|
791
|
+
return true;
|
|
792
|
+
}
|
|
793
|
+
if (sKey == "_assignmentId_") {
|
|
794
|
+
publisherInstance._assignmentId_ = vValue;
|
|
795
|
+
return true;
|
|
796
|
+
}
|
|
797
|
+
if (sKey == "_is_savable_") {
|
|
798
|
+
publisherInstance._is_savable_ = vValue;
|
|
799
|
+
return true;
|
|
800
|
+
}
|
|
801
|
+
if (sKey == "_expiration_delay_") {
|
|
802
|
+
publisherInstance._expiration_delay_ = vValue;
|
|
803
|
+
return true;
|
|
804
|
+
}
|
|
805
|
+
if (sKey == "_invalidate_on_page_show_") {
|
|
806
|
+
publisherInstance._invalidate_on_page_show_ = vValue;
|
|
807
|
+
return true;
|
|
808
|
+
}
|
|
809
|
+
if (sKey == "_instanceCounter_") {
|
|
810
|
+
publisherInstance._instanceCounter_ = vValue;
|
|
811
|
+
return true;
|
|
812
|
+
}
|
|
813
|
+
// Support de la notation à points (rigolo mais pas intuitif)
|
|
814
|
+
// if (sKey.includes(".")) {
|
|
815
|
+
// const keys = sKey.split(".");
|
|
816
|
+
// thisProxy[keys.shift() || ""][keys.join(".")].set(vValue);
|
|
817
|
+
// return true;
|
|
818
|
+
// }
|
|
819
|
+
//Création du publisher si il n'existe pas
|
|
820
|
+
if (!publisherInstance._proxies_.has(sKey)) {
|
|
821
|
+
const newPublisher = createPublisher({}, publisherInstance, sKey);
|
|
822
|
+
newPublisher._proxies_.set("_parent_", getProxy());
|
|
823
|
+
publisherInstance._proxies_.set(sKey, newPublisher);
|
|
824
|
+
}
|
|
825
|
+
//mis à jour et publication de la donnée si elle a changé
|
|
826
|
+
const prevValue = publisherInstance._value_[sKey];
|
|
827
|
+
if (prevValue !== vValue) {
|
|
828
|
+
publisherInstance._value_[sKey] = vValue;
|
|
829
|
+
publisherInstance._publishDynamicFilling_(sKey, vValue);
|
|
830
|
+
publisherInstance._proxies_
|
|
831
|
+
.get(sKey)
|
|
832
|
+
?.set(isComplex(vValue) ? vValue : { __value: vValue });
|
|
833
|
+
}
|
|
834
|
+
//on retourne le proxy pour pouvoir chainer les assignements
|
|
835
|
+
// return publisherInstance._proxies_.get(sKey);
|
|
836
|
+
return true;
|
|
837
|
+
},
|
|
838
|
+
/**
|
|
839
|
+
* Autres propriétés classiques d'un objet implémentées par le proxy
|
|
840
|
+
*/
|
|
841
|
+
deleteProperty: function (_publisherInstance, sKey) {
|
|
842
|
+
publisherInstance._publishDynamicFilling_(sKey, null);
|
|
843
|
+
// if (!publisherInstance._proxies_.get(sKey)?.hasListener()) {
|
|
844
|
+
// publisherInstance._proxies_.delete(sKey);
|
|
845
|
+
// } else {
|
|
846
|
+
publisherInstance._proxies_.get(sKey)?.set(null);
|
|
847
|
+
// }
|
|
848
|
+
return delete publisherInstance._value_[sKey];
|
|
849
|
+
},
|
|
850
|
+
// enumerate: function (publisherInstance, sKey): CoreJSType {
|
|
851
|
+
// return publisherInstance._value_.keys();
|
|
852
|
+
// },
|
|
853
|
+
has: function (_publisherInstance, sKey) {
|
|
854
|
+
return (sKey in publisherInstance._value_ &&
|
|
855
|
+
sKey != "_lockInternalMutationPublishing_");
|
|
856
|
+
},
|
|
857
|
+
defineProperty: function (_publisherInstance, sKey, oDesc) {
|
|
858
|
+
if (oDesc && "value" in oDesc) {
|
|
859
|
+
publisherInstance._value_[sKey] = oDesc.value;
|
|
860
|
+
}
|
|
861
|
+
return true;
|
|
862
|
+
// return publisherInstance._value_;
|
|
863
|
+
},
|
|
864
|
+
getOwnPropertyDescriptor: function (_publisherInstance, sKey) {
|
|
865
|
+
sKey;
|
|
866
|
+
return {
|
|
867
|
+
enumerable: true,
|
|
868
|
+
configurable: true,
|
|
869
|
+
};
|
|
870
|
+
},
|
|
871
|
+
ownKeys: function (_publisherInstance) {
|
|
872
|
+
if (publisherInstance._value_.__value)
|
|
873
|
+
return Object.keys(publisherInstance._value_.__value);
|
|
874
|
+
return Object.keys(publisherInstance._value_);
|
|
875
|
+
},
|
|
876
|
+
};
|
|
877
|
+
}
|
|
878
|
+
export function createPublisher(target, parentProxPub = null, parentKey) {
|
|
879
|
+
const instance = new PublisherProxy(target, parentProxPub, parentKey);
|
|
880
|
+
let proxy = null;
|
|
881
|
+
const handler = createPublisherHandler(instance, () => proxy);
|
|
882
|
+
proxy = new Proxy(instance, handler);
|
|
883
|
+
return proxy;
|
|
884
|
+
}
|
|
885
|
+
// if (typeof module != "undefined") module.exports = {DataProvider: DataProvider, PublisherManager: PublisherManager};
|
|
886
|
+
class PublisherWebComponent extends HTMLElement {
|
|
887
|
+
constructor() {
|
|
888
|
+
super();
|
|
889
|
+
this.publisherId = "";
|
|
890
|
+
this.onAssign = (value) => {
|
|
891
|
+
this.innerHTML = value.toString();
|
|
892
|
+
};
|
|
893
|
+
}
|
|
894
|
+
connectedCallback() {
|
|
895
|
+
this.publisherId = this.getAttribute("publisher") || "";
|
|
896
|
+
this.publisher = PublisherProxy.instances.get(parseInt(this.publisherId));
|
|
897
|
+
this.publisher?.onAssign(this.onAssign);
|
|
898
|
+
}
|
|
899
|
+
disconnectedCallback() {
|
|
900
|
+
this.publisher?.offAssign(this.onAssign);
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
try {
|
|
904
|
+
customElements.define(SONIC_PREFIX + "-publisher-proxy", PublisherWebComponent);
|
|
905
|
+
}
|
|
906
|
+
catch (e) { }
|
|
907
|
+
export const getObservables = (observable, options) => {
|
|
908
|
+
if (typeof observable === "function") {
|
|
909
|
+
const func = observable;
|
|
910
|
+
collectModifiedPublisher();
|
|
911
|
+
func();
|
|
912
|
+
return getModifiedPublishers();
|
|
913
|
+
}
|
|
914
|
+
if (typeof observable === "string") {
|
|
915
|
+
const split = observable.split(".");
|
|
916
|
+
const dataProvider = split.shift() || "";
|
|
917
|
+
let publisher = PublisherManager.get(dataProvider, options);
|
|
918
|
+
publisher = Objects.traverse(publisher, split);
|
|
919
|
+
const set = new Set();
|
|
920
|
+
set.add(publisher);
|
|
921
|
+
return set;
|
|
922
|
+
}
|
|
923
|
+
return new Set([observable]);
|
|
924
|
+
};
|
|
925
|
+
export function get(id) {
|
|
926
|
+
const path = resolveStaticPublisherPath(id);
|
|
927
|
+
return getObservables(path).values().next().value?.get();
|
|
928
|
+
}
|
|
929
|
+
function deepee(id, _defaultValue, options) {
|
|
930
|
+
const path = resolveStaticPublisherPath(id);
|
|
931
|
+
const value = getObservables(path, options).values().next()
|
|
932
|
+
.value;
|
|
933
|
+
// if (defaultValue !== undefined && value) {
|
|
934
|
+
// const innerValue = value.get();
|
|
935
|
+
// if (Objects.isEmpty(innerValue as Record<string, any>)) {
|
|
936
|
+
// value.set(defaultValue);
|
|
937
|
+
// }
|
|
938
|
+
// }
|
|
939
|
+
return value;
|
|
940
|
+
}
|
|
941
|
+
function isDataProvider(value) {
|
|
942
|
+
return (value != null &&
|
|
943
|
+
typeof value === "object" &&
|
|
944
|
+
typeof value.get === "function" &&
|
|
945
|
+
typeof value.set === "function" &&
|
|
946
|
+
typeof value.onAssign === "function");
|
|
947
|
+
}
|
|
948
|
+
function resolvePublisherRef(ref, options) {
|
|
949
|
+
if (isDataProvider(ref))
|
|
950
|
+
return ref;
|
|
951
|
+
return deepee(ref, undefined, options);
|
|
952
|
+
}
|
|
953
|
+
export function dataProvider(id, second) {
|
|
954
|
+
if (isDpOptions(second))
|
|
955
|
+
return deepee(id, undefined, second);
|
|
956
|
+
return deepee(id, second);
|
|
957
|
+
}
|
|
958
|
+
export function dp(id, second) {
|
|
959
|
+
if (isDpOptions(second))
|
|
960
|
+
return deepee(id, undefined, second);
|
|
961
|
+
return deepee(id, second);
|
|
962
|
+
}
|
|
963
|
+
export function mirrorDp(aliasKey, source) {
|
|
964
|
+
PublisherManager.getInstance().set(resolveStaticPublisherPath(aliasKey), resolvePublisherRef(source));
|
|
965
|
+
}
|
|
966
|
+
export function set(id, value) {
|
|
967
|
+
const path = resolveStaticPublisherPath(id);
|
|
968
|
+
getObservables(path).values().next().value?.set(value);
|
|
969
|
+
}
|
|
970
|
+
//# sourceMappingURL=PublisherProxy.js.map
|