@arkitektio/bsx 0.0.0-stage → 1.0.1
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 +36 -2
- package/dist/bsx/analyze.d.ts +30 -0
- package/dist/bsx/analyze.d.ts.map +1 -0
- package/dist/bsx/analyze.js +47 -0
- package/dist/bsx/analyze.js.map +1 -0
- package/dist/bsx/expr.d.ts +116 -0
- package/dist/bsx/expr.d.ts.map +1 -0
- package/dist/bsx/expr.js +476 -0
- package/dist/bsx/expr.js.map +1 -0
- package/dist/bsx/index.d.ts +9 -0
- package/dist/bsx/index.d.ts.map +1 -0
- package/dist/bsx/index.js +9 -0
- package/dist/bsx/index.js.map +1 -0
- package/dist/bsx/infer.d.ts +77 -0
- package/dist/bsx/infer.d.ts.map +1 -0
- package/dist/bsx/infer.js +279 -0
- package/dist/bsx/infer.js.map +1 -0
- package/dist/bsx/language.d.ts +106 -0
- package/dist/bsx/language.d.ts.map +1 -0
- package/dist/bsx/language.js +717 -0
- package/dist/bsx/language.js.map +1 -0
- package/dist/bsx/parse.d.ts +77 -0
- package/dist/bsx/parse.d.ts.map +1 -0
- package/dist/bsx/parse.js +801 -0
- package/dist/bsx/parse.js.map +1 -0
- package/dist/bsx/partial.d.ts +37 -0
- package/dist/bsx/partial.d.ts.map +1 -0
- package/dist/bsx/partial.js +184 -0
- package/dist/bsx/partial.js.map +1 -0
- package/dist/bsx/print.d.ts +21 -0
- package/dist/bsx/print.d.ts.map +1 -0
- package/dist/bsx/print.js +407 -0
- package/dist/bsx/print.js.map +1 -0
- package/dist/bsx/references.d.ts +155 -0
- package/dist/bsx/references.d.ts.map +1 -0
- package/dist/bsx/references.js +971 -0
- package/dist/bsx/references.js.map +1 -0
- package/dist/bsx/source.d.ts +34 -0
- package/dist/bsx/source.d.ts.map +1 -0
- package/dist/bsx/source.js +53 -0
- package/dist/bsx/source.js.map +1 -0
- package/dist/cache/keyedStore.d.ts +44 -0
- package/dist/cache/keyedStore.d.ts.map +1 -0
- package/dist/cache/keyedStore.js +84 -0
- package/dist/cache/keyedStore.js.map +1 -0
- package/dist/editor/BsxEditor.d.ts +19 -0
- package/dist/editor/BsxEditor.d.ts.map +1 -0
- package/dist/editor/BsxEditor.js +214 -0
- package/dist/editor/BsxEditor.js.map +1 -0
- package/dist/editor.d.ts +2 -0
- package/dist/editor.d.ts.map +1 -0
- package/dist/editor.js +3 -0
- package/dist/editor.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/logo/CachedBlokLogo.d.ts +38 -0
- package/dist/logo/CachedBlokLogo.d.ts.map +1 -0
- package/dist/logo/CachedBlokLogo.js +84 -0
- package/dist/logo/CachedBlokLogo.js.map +1 -0
- package/dist/logo/SourceLogo.d.ts +8 -0
- package/dist/logo/SourceLogo.d.ts.map +1 -0
- package/dist/logo/SourceLogo.js +40 -0
- package/dist/logo/SourceLogo.js.map +1 -0
- package/dist/logo/actionLogoSource.d.ts +18 -0
- package/dist/logo/actionLogoSource.d.ts.map +1 -0
- package/dist/logo/actionLogoSource.js +20 -0
- package/dist/logo/actionLogoSource.js.map +1 -0
- package/dist/logo/demo.d.ts +8 -0
- package/dist/logo/demo.d.ts.map +1 -0
- package/dist/logo/demo.js +20 -0
- package/dist/logo/demo.js.map +1 -0
- package/dist/logo/logoCache.d.ts +44 -0
- package/dist/logo/logoCache.d.ts.map +1 -0
- package/dist/logo/logoCache.js +121 -0
- package/dist/logo/logoCache.js.map +1 -0
- package/dist/platform.d.ts +83 -0
- package/dist/platform.d.ts.map +1 -0
- package/dist/platform.js +52 -0
- package/dist/platform.js.map +1 -0
- package/dist/preview/CachedBlokPreview.d.ts +49 -0
- package/dist/preview/CachedBlokPreview.d.ts.map +1 -0
- package/dist/preview/CachedBlokPreview.js +200 -0
- package/dist/preview/CachedBlokPreview.js.map +1 -0
- package/dist/preview/previewCache.d.ts +18 -0
- package/dist/preview/previewCache.d.ts.map +1 -0
- package/dist/preview/previewCache.js +50 -0
- package/dist/preview/previewCache.js.map +1 -0
- package/dist/preview/queue.d.ts +17 -0
- package/dist/preview/queue.d.ts.map +1 -0
- package/dist/preview/queue.js +67 -0
- package/dist/preview/queue.js.map +1 -0
- package/dist/preview/snapshot.d.ts +40 -0
- package/dist/preview/snapshot.d.ts.map +1 -0
- package/dist/preview/snapshot.js +211 -0
- package/dist/preview/snapshot.js.map +1 -0
- package/dist/preview/snapshotMode.d.ts +31 -0
- package/dist/preview/snapshotMode.d.ts.map +1 -0
- package/dist/preview/snapshotMode.js +19 -0
- package/dist/preview/snapshotMode.js.map +1 -0
- package/dist/renderer/BlokComponentHost.d.ts +46 -0
- package/dist/renderer/BlokComponentHost.d.ts.map +1 -0
- package/dist/renderer/BlokComponentHost.js +83 -0
- package/dist/renderer/BlokComponentHost.js.map +1 -0
- package/dist/renderer/BlokDebugState.d.ts +7 -0
- package/dist/renderer/BlokDebugState.d.ts.map +1 -0
- package/dist/renderer/BlokDebugState.js +19 -0
- package/dist/renderer/BlokDebugState.js.map +1 -0
- package/dist/renderer/BlokRenderer.d.ts +57 -0
- package/dist/renderer/BlokRenderer.d.ts.map +1 -0
- package/dist/renderer/BlokRenderer.js +136 -0
- package/dist/renderer/BlokRenderer.js.map +1 -0
- package/dist/renderer/assets.d.ts +85 -0
- package/dist/renderer/assets.d.ts.map +1 -0
- package/dist/renderer/assets.js +99 -0
- package/dist/renderer/assets.js.map +1 -0
- package/dist/renderer/baseCatalog.d.ts +12 -0
- package/dist/renderer/baseCatalog.d.ts.map +1 -0
- package/dist/renderer/baseCatalog.js +13 -0
- package/dist/renderer/baseCatalog.js.map +1 -0
- package/dist/renderer/bloks/control.d.ts +25 -0
- package/dist/renderer/bloks/control.d.ts.map +1 -0
- package/dist/renderer/bloks/control.js +294 -0
- package/dist/renderer/bloks/control.js.map +1 -0
- package/dist/renderer/bloks/data.d.ts +28 -0
- package/dist/renderer/bloks/data.d.ts.map +1 -0
- package/dist/renderer/bloks/data.js +409 -0
- package/dist/renderer/bloks/data.js.map +1 -0
- package/dist/renderer/bloks/feedback.d.ts +9 -0
- package/dist/renderer/bloks/feedback.d.ts.map +1 -0
- package/dist/renderer/bloks/feedback.js +128 -0
- package/dist/renderer/bloks/feedback.js.map +1 -0
- package/dist/renderer/bloks/forms.d.ts +43 -0
- package/dist/renderer/bloks/forms.d.ts.map +1 -0
- package/dist/renderer/bloks/forms.js +777 -0
- package/dist/renderer/bloks/forms.js.map +1 -0
- package/dist/renderer/bloks/html.d.ts +10 -0
- package/dist/renderer/bloks/html.d.ts.map +1 -0
- package/dist/renderer/bloks/html.js +99 -0
- package/dist/renderer/bloks/html.js.map +1 -0
- package/dist/renderer/bloks/icons.d.ts +263 -0
- package/dist/renderer/bloks/icons.d.ts.map +1 -0
- package/dist/renderer/bloks/icons.js +173 -0
- package/dist/renderer/bloks/icons.js.map +1 -0
- package/dist/renderer/bloks/index.d.ts +19 -0
- package/dist/renderer/bloks/index.d.ts.map +1 -0
- package/dist/renderer/bloks/index.js +30 -0
- package/dist/renderer/bloks/index.js.map +1 -0
- package/dist/renderer/bloks/inspector/Inspector.d.ts +2 -0
- package/dist/renderer/bloks/inspector/Inspector.d.ts.map +1 -0
- package/dist/renderer/bloks/inspector/Inspector.js +14 -0
- package/dist/renderer/bloks/inspector/Inspector.js.map +1 -0
- package/dist/renderer/bloks/layout.d.ts +16 -0
- package/dist/renderer/bloks/layout.d.ts.map +1 -0
- package/dist/renderer/bloks/layout.js +345 -0
- package/dist/renderer/bloks/layout.js.map +1 -0
- package/dist/renderer/bloks/logo/index.d.ts +26 -0
- package/dist/renderer/bloks/logo/index.d.ts.map +1 -0
- package/dist/renderer/bloks/logo/index.js +361 -0
- package/dist/renderer/bloks/logo/index.js.map +1 -0
- package/dist/renderer/bloks/logo/logo.fixture.json +323 -0
- package/dist/renderer/bloks/navigation.d.ts +29 -0
- package/dist/renderer/bloks/navigation.d.ts.map +1 -0
- package/dist/renderer/bloks/navigation.js +421 -0
- package/dist/renderer/bloks/navigation.js.map +1 -0
- package/dist/renderer/bloks/overlays.d.ts +56 -0
- package/dist/renderer/bloks/overlays.d.ts.map +1 -0
- package/dist/renderer/bloks/overlays.js +391 -0
- package/dist/renderer/bloks/overlays.js.map +1 -0
- package/dist/renderer/bloks/run/components.d.ts +5 -0
- package/dist/renderer/bloks/run/components.d.ts.map +1 -0
- package/dist/renderer/bloks/run/components.js +121 -0
- package/dist/renderer/bloks/run/components.js.map +1 -0
- package/dist/renderer/bloks/run/host.d.ts +38 -0
- package/dist/renderer/bloks/run/host.d.ts.map +1 -0
- package/dist/renderer/bloks/run/host.js +21 -0
- package/dist/renderer/bloks/run/host.js.map +1 -0
- package/dist/renderer/bloks/run/index.d.ts +4 -0
- package/dist/renderer/bloks/run/index.d.ts.map +1 -0
- package/dist/renderer/bloks/run/index.js +4 -0
- package/dist/renderer/bloks/run/index.js.map +1 -0
- package/dist/renderer/bloks/run/math.d.ts +50 -0
- package/dist/renderer/bloks/run/math.d.ts.map +1 -0
- package/dist/renderer/bloks/run/math.js +79 -0
- package/dist/renderer/bloks/run/math.js.map +1 -0
- package/dist/renderer/bloks/scene/Model.d.ts +3 -0
- package/dist/renderer/bloks/scene/Model.d.ts.map +1 -0
- package/dist/renderer/bloks/scene/Model.js +367 -0
- package/dist/renderer/bloks/scene/Model.js.map +1 -0
- package/dist/renderer/bloks/scene/Scene.d.ts +46 -0
- package/dist/renderer/bloks/scene/Scene.d.ts.map +1 -0
- package/dist/renderer/bloks/scene/Scene.js +467 -0
- package/dist/renderer/bloks/scene/Scene.js.map +1 -0
- package/dist/renderer/bloks/scene/Transform.d.ts +2 -0
- package/dist/renderer/bloks/scene/Transform.d.ts.map +1 -0
- package/dist/renderer/bloks/scene/Transform.js +83 -0
- package/dist/renderer/bloks/scene/Transform.js.map +1 -0
- package/dist/renderer/bloks/scene/bindings.d.ts +9 -0
- package/dist/renderer/bloks/scene/bindings.d.ts.map +1 -0
- package/dist/renderer/bloks/scene/bindings.js +387 -0
- package/dist/renderer/bloks/scene/bindings.js.map +1 -0
- package/dist/renderer/bloks/scene/colour.d.ts +23 -0
- package/dist/renderer/bloks/scene/colour.d.ts.map +1 -0
- package/dist/renderer/bloks/scene/colour.js +45 -0
- package/dist/renderer/bloks/scene/colour.js.map +1 -0
- package/dist/renderer/bloks/scene/context.d.ts +115 -0
- package/dist/renderer/bloks/scene/context.d.ts.map +1 -0
- package/dist/renderer/bloks/scene/context.js +120 -0
- package/dist/renderer/bloks/scene/context.js.map +1 -0
- package/dist/renderer/bloks/scene/host.d.ts +36 -0
- package/dist/renderer/bloks/scene/host.d.ts.map +1 -0
- package/dist/renderer/bloks/scene/host.js +41 -0
- package/dist/renderer/bloks/scene/host.js.map +1 -0
- package/dist/renderer/bloks/scene/index.d.ts +10 -0
- package/dist/renderer/bloks/scene/index.d.ts.map +1 -0
- package/dist/renderer/bloks/scene/index.js +30 -0
- package/dist/renderer/bloks/scene/index.js.map +1 -0
- package/dist/renderer/bloks/scene/interaction.d.ts +3 -0
- package/dist/renderer/bloks/scene/interaction.d.ts.map +1 -0
- package/dist/renderer/bloks/scene/interaction.js +166 -0
- package/dist/renderer/bloks/scene/interaction.js.map +1 -0
- package/dist/renderer/bloks/scene/loadModel.d.ts +35 -0
- package/dist/renderer/bloks/scene/loadModel.d.ts.map +1 -0
- package/dist/renderer/bloks/scene/loadModel.js +106 -0
- package/dist/renderer/bloks/scene/loadModel.js.map +1 -0
- package/dist/renderer/bloks/scene/scene.fixture.json +203 -0
- package/dist/renderer/bloks/scene/scope.fixture.glb +0 -0
- package/dist/renderer/bloks/shared/index.d.ts +6 -0
- package/dist/renderer/bloks/shared/index.d.ts.map +1 -0
- package/dist/renderer/bloks/shared/index.js +6 -0
- package/dist/renderer/bloks/shared/index.js.map +1 -0
- package/dist/renderer/bloks/shared/props.d.ts +72 -0
- package/dist/renderer/bloks/shared/props.d.ts.map +1 -0
- package/dist/renderer/bloks/shared/props.js +152 -0
- package/dist/renderer/bloks/shared/props.js.map +1 -0
- package/dist/renderer/bloks/shared/render.d.ts +20 -0
- package/dist/renderer/bloks/shared/render.d.ts.map +1 -0
- package/dist/renderer/bloks/shared/render.js +42 -0
- package/dist/renderer/bloks/shared/render.js.map +1 -0
- package/dist/renderer/bloks/shared/schemas.d.ts +226 -0
- package/dist/renderer/bloks/shared/schemas.d.ts.map +1 -0
- package/dist/renderer/bloks/shared/schemas.js +174 -0
- package/dist/renderer/bloks/shared/schemas.js.map +1 -0
- package/dist/renderer/bloks/shared/state.d.ts +40 -0
- package/dist/renderer/bloks/shared/state.d.ts.map +1 -0
- package/dist/renderer/bloks/shared/state.js +49 -0
- package/dist/renderer/bloks/shared/state.js.map +1 -0
- package/dist/renderer/bloks/shared/throttle.d.ts +17 -0
- package/dist/renderer/bloks/shared/throttle.d.ts.map +1 -0
- package/dist/renderer/bloks/shared/throttle.js +38 -0
- package/dist/renderer/bloks/shared/throttle.js.map +1 -0
- package/dist/renderer/bloks/testing.d.ts +29 -0
- package/dist/renderer/bloks/testing.d.ts.map +1 -0
- package/dist/renderer/bloks/testing.js +32 -0
- package/dist/renderer/bloks/testing.js.map +1 -0
- package/dist/renderer/bloks/toast.d.ts +32 -0
- package/dist/renderer/bloks/toast.d.ts.map +1 -0
- package/dist/renderer/bloks/toast.js +89 -0
- package/dist/renderer/bloks/toast.js.map +1 -0
- package/dist/renderer/bloks/typography.d.ts +25 -0
- package/dist/renderer/bloks/typography.d.ts.map +1 -0
- package/dist/renderer/bloks/typography.js +188 -0
- package/dist/renderer/bloks/typography.js.map +1 -0
- package/dist/renderer/catalog.d.ts +42 -0
- package/dist/renderer/catalog.d.ts.map +1 -0
- package/dist/renderer/catalog.js +83 -0
- package/dist/renderer/catalog.js.map +1 -0
- package/dist/renderer/declarations.d.ts +102 -0
- package/dist/renderer/declarations.d.ts.map +1 -0
- package/dist/renderer/declarations.js +159 -0
- package/dist/renderer/declarations.js.map +1 -0
- package/dist/renderer/functions/index.d.ts +3 -0
- package/dist/renderer/functions/index.d.ts.map +1 -0
- package/dist/renderer/functions/index.js +4 -0
- package/dist/renderer/functions/index.js.map +1 -0
- package/dist/renderer/functions/v2/handler.d.ts +9 -0
- package/dist/renderer/functions/v2/handler.d.ts.map +1 -0
- package/dist/renderer/functions/v2/handler.js +9 -0
- package/dist/renderer/functions/v2/handler.js.map +1 -0
- package/dist/renderer/functions/v2/index.d.ts +41 -0
- package/dist/renderer/functions/v2/index.d.ts.map +1 -0
- package/dist/renderer/functions/v2/index.js +602 -0
- package/dist/renderer/functions/v2/index.js.map +1 -0
- package/dist/renderer/modules.d.ts +21 -0
- package/dist/renderer/modules.d.ts.map +1 -0
- package/dist/renderer/modules.js +41 -0
- package/dist/renderer/modules.js.map +1 -0
- package/dist/renderer/persist.d.ts +121 -0
- package/dist/renderer/persist.d.ts.map +1 -0
- package/dist/renderer/persist.js +201 -0
- package/dist/renderer/persist.js.map +1 -0
- package/dist/renderer/runtime/checks.d.ts +13 -0
- package/dist/renderer/runtime/checks.d.ts.map +1 -0
- package/dist/renderer/runtime/checks.js +132 -0
- package/dist/renderer/runtime/checks.js.map +1 -0
- package/dist/renderer/runtime/components.d.ts +118 -0
- package/dist/renderer/runtime/components.d.ts.map +1 -0
- package/dist/renderer/runtime/components.js +158 -0
- package/dist/renderer/runtime/components.js.map +1 -0
- package/dist/renderer/runtime/context.d.ts +43 -0
- package/dist/renderer/runtime/context.d.ts.map +1 -0
- package/dist/renderer/runtime/context.js +286 -0
- package/dist/renderer/runtime/context.js.map +1 -0
- package/dist/renderer/runtime/functions.d.ts +36 -0
- package/dist/renderer/runtime/functions.d.ts.map +1 -0
- package/dist/renderer/runtime/functions.js +37 -0
- package/dist/renderer/runtime/functions.js.map +1 -0
- package/dist/renderer/runtime/hooks.d.ts +138 -0
- package/dist/renderer/runtime/hooks.d.ts.map +1 -0
- package/dist/renderer/runtime/hooks.js +535 -0
- package/dist/renderer/runtime/hooks.js.map +1 -0
- package/dist/renderer/runtime/index.d.ts +21 -0
- package/dist/renderer/runtime/index.d.ts.map +1 -0
- package/dist/renderer/runtime/index.js +26 -0
- package/dist/renderer/runtime/index.js.map +1 -0
- package/dist/renderer/runtime/nodeState.d.ts +34 -0
- package/dist/renderer/runtime/nodeState.d.ts.map +1 -0
- package/dist/renderer/runtime/nodeState.js +13 -0
- package/dist/renderer/runtime/nodeState.js.map +1 -0
- package/dist/renderer/runtime/normalize.d.ts +21 -0
- package/dist/renderer/runtime/normalize.d.ts.map +1 -0
- package/dist/renderer/runtime/normalize.js +107 -0
- package/dist/renderer/runtime/normalize.js.map +1 -0
- package/dist/renderer/runtime/port.d.ts +24 -0
- package/dist/renderer/runtime/port.d.ts.map +1 -0
- package/dist/renderer/runtime/port.js +5 -0
- package/dist/renderer/runtime/port.js.map +1 -0
- package/dist/renderer/runtime/preflight.d.ts +20 -0
- package/dist/renderer/runtime/preflight.d.ts.map +1 -0
- package/dist/renderer/runtime/preflight.js +195 -0
- package/dist/renderer/runtime/preflight.js.map +1 -0
- package/dist/renderer/runtime/reads.d.ts +101 -0
- package/dist/renderer/runtime/reads.d.ts.map +1 -0
- package/dist/renderer/runtime/reads.js +284 -0
- package/dist/renderer/runtime/reads.js.map +1 -0
- package/dist/renderer/runtime/resolution.d.ts +71 -0
- package/dist/renderer/runtime/resolution.d.ts.map +1 -0
- package/dist/renderer/runtime/resolution.js +403 -0
- package/dist/renderer/runtime/resolution.js.map +1 -0
- package/dist/renderer/runtime/resource.d.ts +71 -0
- package/dist/renderer/runtime/resource.d.ts.map +1 -0
- package/dist/renderer/runtime/resource.js +138 -0
- package/dist/renderer/runtime/resource.js.map +1 -0
- package/dist/renderer/runtime/schemas.d.ts +119 -0
- package/dist/renderer/runtime/schemas.d.ts.map +1 -0
- package/dist/renderer/runtime/schemas.js +139 -0
- package/dist/renderer/runtime/schemas.js.map +1 -0
- package/dist/renderer/runtime/scope.d.ts +41 -0
- package/dist/renderer/runtime/scope.d.ts.map +1 -0
- package/dist/renderer/runtime/scope.js +95 -0
- package/dist/renderer/runtime/scope.js.map +1 -0
- package/dist/renderer/runtime/status.d.ts +35 -0
- package/dist/renderer/runtime/status.d.ts.map +1 -0
- package/dist/renderer/runtime/status.js +23 -0
- package/dist/renderer/runtime/status.js.map +1 -0
- package/dist/renderer/runtime/task.d.ts +63 -0
- package/dist/renderer/runtime/task.d.ts.map +1 -0
- package/dist/renderer/runtime/task.js +99 -0
- package/dist/renderer/runtime/task.js.map +1 -0
- package/dist/renderer/runtime/tree.d.ts +33 -0
- package/dist/renderer/runtime/tree.d.ts.map +1 -0
- package/dist/renderer/runtime/tree.js +59 -0
- package/dist/renderer/runtime/tree.js.map +1 -0
- package/dist/renderer/runtime/types.d.ts +247 -0
- package/dist/renderer/runtime/types.d.ts.map +1 -0
- package/dist/renderer/runtime/types.js +4 -0
- package/dist/renderer/runtime/types.js.map +1 -0
- package/dist/renderer/runtime/utils.d.ts +13 -0
- package/dist/renderer/runtime/utils.d.ts.map +1 -0
- package/dist/renderer/runtime/utils.js +48 -0
- package/dist/renderer/runtime/utils.js.map +1 -0
- package/dist/renderer/runtime/viewer.d.ts +17 -0
- package/dist/renderer/runtime/viewer.d.ts.map +1 -0
- package/dist/renderer/runtime/viewer.js +15 -0
- package/dist/renderer/runtime/viewer.js.map +1 -0
- package/dist/runtime.d.ts +9 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +10 -0
- package/dist/runtime.js.map +1 -0
- package/dist/scene.d.ts +3 -0
- package/dist/scene.d.ts.map +1 -0
- package/dist/scene.js +4 -0
- package/dist/scene.js.map +1 -0
- package/dist/spec/bsx_v2.json +11380 -0
- package/dist/spec/catalogs/base@2.json +210 -0
- package/dist/spec/catalogs/base@2.json.js +210 -0
- package/dist/spec/catalogs/html@1.json +308 -0
- package/dist/spec/catalogs/html@1.json.js +308 -0
- package/dist/spec/catalogs/logo@1.json +1673 -0
- package/dist/spec/catalogs/logo@1.json.js +1673 -0
- package/dist/spec/catalogs/scene@1.json +806 -0
- package/dist/spec/catalogs/scene@1.json.js +806 -0
- package/dist/spec/catalogs/structure@1.json +185 -0
- package/dist/spec/catalogs/structure@1.json.js +185 -0
- package/dist/spec/catalogs/ui@1.json +3696 -0
- package/dist/spec/catalogs/ui@1.json.js +3696 -0
- package/dist/spec/catalogs.d.ts +101 -0
- package/dist/spec/catalogs.d.ts.map +1 -0
- package/dist/spec/catalogs.js +131 -0
- package/dist/spec/catalogs.js.map +1 -0
- package/dist/spec/locals.d.ts +14 -0
- package/dist/spec/locals.d.ts.map +1 -0
- package/dist/spec/locals.js +29 -0
- package/dist/spec/locals.js.map +1 -0
- package/dist/spec/modules/orkestrator.json +2755 -0
- package/dist/spec/modules/orkestrator.json.js +2755 -0
- package/dist/spec/vocabulary.d.ts +209 -0
- package/dist/spec/vocabulary.d.ts.map +1 -0
- package/dist/spec/vocabulary.js +307 -0
- package/dist/spec/vocabulary.js.map +1 -0
- package/dist/spec/vocabulary.json +411 -0
- package/dist/spec/vocabulary.json.js +411 -0
- package/dist/tailwind/defaultTheme.d.ts +3 -0
- package/dist/tailwind/defaultTheme.d.ts.map +1 -0
- package/dist/tailwind/defaultTheme.js +4 -0
- package/dist/tailwind/defaultTheme.js.map +1 -0
- package/dist/tailwind/runtimeTailwind.d.ts +14 -0
- package/dist/tailwind/runtimeTailwind.d.ts.map +1 -0
- package/dist/tailwind/runtimeTailwind.js +124 -0
- package/dist/tailwind/runtimeTailwind.js.map +1 -0
- package/dist/tailwind/theme.css +137 -0
- package/dist/tailwind/useBlokTailwind.d.ts +5 -0
- package/dist/tailwind/useBlokTailwind.d.ts.map +1 -0
- package/dist/tailwind/useBlokTailwind.js +74 -0
- package/dist/tailwind/useBlokTailwind.js.map +1 -0
- package/dist/tailwind.d.ts +3 -0
- package/dist/tailwind.d.ts.map +1 -0
- package/dist/tailwind.js +4 -0
- package/dist/tailwind.js.map +1 -0
- package/dist/vendor/core/data/scene/camera/navigateButtons.d.ts +15 -0
- package/dist/vendor/core/data/scene/camera/navigateButtons.d.ts.map +1 -0
- package/dist/vendor/core/data/scene/camera/navigateButtons.js +15 -0
- package/dist/vendor/core/data/scene/camera/navigateButtons.js.map +1 -0
- package/dist/vendor/core/dialogs/PageDialogHost.d.ts +5 -0
- package/dist/vendor/core/dialogs/PageDialogHost.d.ts.map +1 -0
- package/dist/vendor/core/dialogs/PageDialogHost.js +32 -0
- package/dist/vendor/core/dialogs/PageDialogHost.js.map +1 -0
- package/dist/vendor/core/model/affine.d.ts +44 -0
- package/dist/vendor/core/model/affine.d.ts.map +1 -0
- package/dist/vendor/core/model/affine.js +94 -0
- package/dist/vendor/core/model/affine.js.map +1 -0
- package/dist/vendor/core/model/glb.d.ts +75 -0
- package/dist/vendor/core/model/glb.d.ts.map +1 -0
- package/dist/vendor/core/model/glb.js +478 -0
- package/dist/vendor/core/model/glb.js.map +1 -0
- package/dist/vendor/core/model/joints.d.ts +26 -0
- package/dist/vendor/core/model/joints.d.ts.map +1 -0
- package/dist/vendor/core/model/joints.js +44 -0
- package/dist/vendor/core/model/joints.js.map +1 -0
- package/dist/vendor/core/model/motion.d.ts +65 -0
- package/dist/vendor/core/model/motion.d.ts.map +1 -0
- package/dist/vendor/core/model/motion.js +89 -0
- package/dist/vendor/core/model/motion.js.map +1 -0
- package/dist/vendor/core/model/testing.d.ts +7 -0
- package/dist/vendor/core/model/testing.d.ts.map +1 -0
- package/dist/vendor/core/model/testing.js +54 -0
- package/dist/vendor/core/model/testing.js.map +1 -0
- package/dist/vendor/core/model/units.d.ts +21 -0
- package/dist/vendor/core/model/units.d.ts.map +1 -0
- package/dist/vendor/core/model/units.js +107 -0
- package/dist/vendor/core/model/units.js.map +1 -0
- package/dist/vendor/core/model/writers.d.ts +24 -0
- package/dist/vendor/core/model/writers.d.ts.map +1 -0
- package/dist/vendor/core/model/writers.js +45 -0
- package/dist/vendor/core/model/writers.js.map +1 -0
- package/dist/vendor/core/ui/AsyncBoundary.d.ts +14 -0
- package/dist/vendor/core/ui/AsyncBoundary.d.ts.map +1 -0
- package/dist/vendor/core/ui/AsyncBoundary.js +42 -0
- package/dist/vendor/core/ui/AsyncBoundary.js.map +1 -0
- package/dist/vendor/core/ui/ChromeSurface.d.ts +16 -0
- package/dist/vendor/core/ui/ChromeSurface.d.ts.map +1 -0
- package/dist/vendor/core/ui/ChromeSurface.js +44 -0
- package/dist/vendor/core/ui/ChromeSurface.js.map +1 -0
- package/dist/vendor/core/ui/accordion.d.ts +8 -0
- package/dist/vendor/core/ui/accordion.d.ts.map +1 -0
- package/dist/vendor/core/ui/accordion.js +19 -0
- package/dist/vendor/core/ui/accordion.js.map +1 -0
- package/dist/vendor/core/ui/actionPlan.d.ts +54 -0
- package/dist/vendor/core/ui/actionPlan.d.ts.map +1 -0
- package/dist/vendor/core/ui/actionPlan.js +101 -0
- package/dist/vendor/core/ui/actionPlan.js.map +1 -0
- package/dist/vendor/core/ui/alert-dialog.d.ts +19 -0
- package/dist/vendor/core/ui/alert-dialog.d.ts.map +1 -0
- package/dist/vendor/core/ui/alert-dialog.js +50 -0
- package/dist/vendor/core/ui/alert-dialog.js.map +1 -0
- package/dist/vendor/core/ui/alert.d.ts +11 -0
- package/dist/vendor/core/ui/alert.d.ts.map +1 -0
- package/dist/vendor/core/ui/alert.js +29 -0
- package/dist/vendor/core/ui/alert.js.map +1 -0
- package/dist/vendor/core/ui/aspect-ratio.d.ts +4 -0
- package/dist/vendor/core/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/vendor/core/ui/aspect-ratio.js +8 -0
- package/dist/vendor/core/ui/aspect-ratio.js.map +1 -0
- package/dist/vendor/core/ui/avatar.d.ts +12 -0
- package/dist/vendor/core/ui/avatar.d.ts.map +1 -0
- package/dist/vendor/core/ui/avatar.js +24 -0
- package/dist/vendor/core/ui/avatar.js.map +1 -0
- package/dist/vendor/core/ui/badge.d.ts +10 -0
- package/dist/vendor/core/ui/badge.d.ts.map +1 -0
- package/dist/vendor/core/ui/badge.js +26 -0
- package/dist/vendor/core/ui/badge.js.map +1 -0
- package/dist/vendor/core/ui/bento-grid.d.ts +107 -0
- package/dist/vendor/core/ui/bento-grid.d.ts.map +1 -0
- package/dist/vendor/core/ui/bento-grid.js +631 -0
- package/dist/vendor/core/ui/bento-grid.js.map +1 -0
- package/dist/vendor/core/ui/breadcrumb.d.ts +12 -0
- package/dist/vendor/core/ui/breadcrumb.d.ts.map +1 -0
- package/dist/vendor/core/ui/breadcrumb.js +29 -0
- package/dist/vendor/core/ui/breadcrumb.js.map +1 -0
- package/dist/vendor/core/ui/button-group.d.ts +12 -0
- package/dist/vendor/core/ui/button-group.d.ts.map +1 -0
- package/dist/vendor/core/ui/button-group.js +28 -0
- package/dist/vendor/core/ui/button-group.js.map +1 -0
- package/dist/vendor/core/ui/button.d.ts +24 -0
- package/dist/vendor/core/ui/button.d.ts.map +1 -0
- package/dist/vendor/core/ui/button.js +39 -0
- package/dist/vendor/core/ui/button.js.map +1 -0
- package/dist/vendor/core/ui/calendar.d.ts +9 -0
- package/dist/vendor/core/ui/calendar.d.ts.map +1 -0
- package/dist/vendor/core/ui/calendar.js +76 -0
- package/dist/vendor/core/ui/calendar.js.map +1 -0
- package/dist/vendor/core/ui/card.d.ts +12 -0
- package/dist/vendor/core/ui/card.d.ts.map +1 -0
- package/dist/vendor/core/ui/card.js +26 -0
- package/dist/vendor/core/ui/card.js.map +1 -0
- package/dist/vendor/core/ui/carousel.d.ts +29 -0
- package/dist/vendor/core/ui/carousel.d.ts.map +1 -0
- package/dist/vendor/core/ui/carousel.js +92 -0
- package/dist/vendor/core/ui/carousel.js.map +1 -0
- package/dist/vendor/core/ui/chart.d.ts +41 -0
- package/dist/vendor/core/ui/chart.d.ts.map +1 -0
- package/dist/vendor/core/ui/chart.js +132 -0
- package/dist/vendor/core/ui/chart.js.map +1 -0
- package/dist/vendor/core/ui/checkbox.d.ts +5 -0
- package/dist/vendor/core/ui/checkbox.d.ts.map +1 -0
- package/dist/vendor/core/ui/checkbox.js +10 -0
- package/dist/vendor/core/ui/checkbox.js.map +1 -0
- package/dist/vendor/core/ui/collapsible.d.ts +6 -0
- package/dist/vendor/core/ui/collapsible.d.ts.map +1 -0
- package/dist/vendor/core/ui/collapsible.js +15 -0
- package/dist/vendor/core/ui/collapsible.js.map +1 -0
- package/dist/vendor/core/ui/context-menu.d.ts +28 -0
- package/dist/vendor/core/ui/context-menu.d.ts.map +1 -0
- package/dist/vendor/core/ui/context-menu.js +55 -0
- package/dist/vendor/core/ui/context-menu.js.map +1 -0
- package/dist/vendor/core/ui/dialog.d.ts +20 -0
- package/dist/vendor/core/ui/dialog.d.ts.map +1 -0
- package/dist/vendor/core/ui/dialog.js +44 -0
- package/dist/vendor/core/ui/dialog.js.map +1 -0
- package/dist/vendor/core/ui/drawer.d.ts +14 -0
- package/dist/vendor/core/ui/drawer.d.ts.map +1 -0
- package/dist/vendor/core/ui/drawer.js +38 -0
- package/dist/vendor/core/ui/drawer.js.map +1 -0
- package/dist/vendor/core/ui/dropdown-menu.d.ts +26 -0
- package/dist/vendor/core/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/vendor/core/ui/dropdown-menu.js +56 -0
- package/dist/vendor/core/ui/dropdown-menu.js.map +1 -0
- package/dist/vendor/core/ui/empty.d.ts +12 -0
- package/dist/vendor/core/ui/empty.d.ts.map +1 -0
- package/dist/vendor/core/ui/empty.js +34 -0
- package/dist/vendor/core/ui/empty.js.map +1 -0
- package/dist/vendor/core/ui/field.d.ts +25 -0
- package/dist/vendor/core/ui/field.d.ts.map +1 -0
- package/dist/vendor/core/ui/field.js +68 -0
- package/dist/vendor/core/ui/field.js.map +1 -0
- package/dist/vendor/core/ui/hover-card.d.ts +7 -0
- package/dist/vendor/core/ui/hover-card.d.ts.map +1 -0
- package/dist/vendor/core/ui/hover-card.js +19 -0
- package/dist/vendor/core/ui/hover-card.js.map +1 -0
- package/dist/vendor/core/ui/image.d.ts +10 -0
- package/dist/vendor/core/ui/image.d.ts.map +1 -0
- package/dist/vendor/core/ui/image.js +49 -0
- package/dist/vendor/core/ui/image.js.map +1 -0
- package/dist/vendor/core/ui/input-group.d.ts +17 -0
- package/dist/vendor/core/ui/input-group.d.ts.map +1 -0
- package/dist/vendor/core/ui/input-group.js +59 -0
- package/dist/vendor/core/ui/input-group.js.map +1 -0
- package/dist/vendor/core/ui/input-otp.d.ts +12 -0
- package/dist/vendor/core/ui/input-otp.d.ts.map +1 -0
- package/dist/vendor/core/ui/input-otp.js +21 -0
- package/dist/vendor/core/ui/input-otp.js.map +1 -0
- package/dist/vendor/core/ui/input.d.ts +4 -0
- package/dist/vendor/core/ui/input.d.ts.map +1 -0
- package/dist/vendor/core/ui/input.js +8 -0
- package/dist/vendor/core/ui/input.js.map +1 -0
- package/dist/vendor/core/ui/item.d.ts +24 -0
- package/dist/vendor/core/ui/item.d.ts.map +1 -0
- package/dist/vendor/core/ui/item.js +69 -0
- package/dist/vendor/core/ui/item.js.map +1 -0
- package/dist/vendor/core/ui/kbd.d.ts +4 -0
- package/dist/vendor/core/ui/kbd.d.ts.map +1 -0
- package/dist/vendor/core/ui/kbd.js +10 -0
- package/dist/vendor/core/ui/kbd.js.map +1 -0
- package/dist/vendor/core/ui/label.d.ts +5 -0
- package/dist/vendor/core/ui/label.d.ts.map +1 -0
- package/dist/vendor/core/ui/label.js +10 -0
- package/dist/vendor/core/ui/label.js.map +1 -0
- package/dist/vendor/core/ui/markdown.d.ts +19 -0
- package/dist/vendor/core/ui/markdown.d.ts.map +1 -0
- package/dist/vendor/core/ui/markdown.js +236 -0
- package/dist/vendor/core/ui/markdown.js.map +1 -0
- package/dist/vendor/core/ui/menubar.d.ts +27 -0
- package/dist/vendor/core/ui/menubar.d.ts.map +1 -0
- package/dist/vendor/core/ui/menubar.js +55 -0
- package/dist/vendor/core/ui/menubar.js.map +1 -0
- package/dist/vendor/core/ui/pagination.d.ts +14 -0
- package/dist/vendor/core/ui/pagination.d.ts.map +1 -0
- package/dist/vendor/core/ui/pagination.js +28 -0
- package/dist/vendor/core/ui/pagination.js.map +1 -0
- package/dist/vendor/core/ui/popover.d.ts +11 -0
- package/dist/vendor/core/ui/popover.d.ts.map +1 -0
- package/dist/vendor/core/ui/popover.js +31 -0
- package/dist/vendor/core/ui/popover.js.map +1 -0
- package/dist/vendor/core/ui/progress.d.ts +5 -0
- package/dist/vendor/core/ui/progress.d.ts.map +1 -0
- package/dist/vendor/core/ui/progress.js +9 -0
- package/dist/vendor/core/ui/progress.js.map +1 -0
- package/dist/vendor/core/ui/radio-group.d.ts +6 -0
- package/dist/vendor/core/ui/radio-group.d.ts.map +1 -0
- package/dist/vendor/core/ui/radio-group.js +14 -0
- package/dist/vendor/core/ui/radio-group.js.map +1 -0
- package/dist/vendor/core/ui/resizable.d.ts +9 -0
- package/dist/vendor/core/ui/resizable.d.ts.map +1 -0
- package/dist/vendor/core/ui/resizable.js +15 -0
- package/dist/vendor/core/ui/resizable.js.map +1 -0
- package/dist/vendor/core/ui/scroll-area.d.ts +6 -0
- package/dist/vendor/core/ui/scroll-area.d.ts.map +1 -0
- package/dist/vendor/core/ui/scroll-area.js +13 -0
- package/dist/vendor/core/ui/scroll-area.js.map +1 -0
- package/dist/vendor/core/ui/select.d.ts +16 -0
- package/dist/vendor/core/ui/select.d.ts.map +1 -0
- package/dist/vendor/core/ui/select.js +39 -0
- package/dist/vendor/core/ui/select.js.map +1 -0
- package/dist/vendor/core/ui/separator.d.ts +5 -0
- package/dist/vendor/core/ui/separator.d.ts.map +1 -0
- package/dist/vendor/core/ui/separator.js +10 -0
- package/dist/vendor/core/ui/separator.js.map +1 -0
- package/dist/vendor/core/ui/sheet.d.ts +17 -0
- package/dist/vendor/core/ui/sheet.d.ts.map +1 -0
- package/dist/vendor/core/ui/sheet.js +45 -0
- package/dist/vendor/core/ui/sheet.js.map +1 -0
- package/dist/vendor/core/ui/skeleton.d.ts +3 -0
- package/dist/vendor/core/ui/skeleton.d.ts.map +1 -0
- package/dist/vendor/core/ui/skeleton.js +7 -0
- package/dist/vendor/core/ui/skeleton.js.map +1 -0
- package/dist/vendor/core/ui/slider.d.ts +5 -0
- package/dist/vendor/core/ui/slider.d.ts.map +1 -0
- package/dist/vendor/core/ui/slider.js +14 -0
- package/dist/vendor/core/ui/slider.js.map +1 -0
- package/dist/vendor/core/ui/spinner.d.ts +3 -0
- package/dist/vendor/core/ui/spinner.d.ts.map +1 -0
- package/dist/vendor/core/ui/spinner.js +8 -0
- package/dist/vendor/core/ui/spinner.js.map +1 -0
- package/dist/vendor/core/ui/switch.d.ts +7 -0
- package/dist/vendor/core/ui/switch.d.ts.map +1 -0
- package/dist/vendor/core/ui/switch.js +9 -0
- package/dist/vendor/core/ui/switch.js.map +1 -0
- package/dist/vendor/core/ui/table.d.ts +11 -0
- package/dist/vendor/core/ui/table.d.ts.map +1 -0
- package/dist/vendor/core/ui/table.js +30 -0
- package/dist/vendor/core/ui/table.js.map +1 -0
- package/dist/vendor/core/ui/tabs.d.ts +12 -0
- package/dist/vendor/core/ui/tabs.d.ts.map +1 -0
- package/dist/vendor/core/ui/tabs.js +30 -0
- package/dist/vendor/core/ui/tabs.js.map +1 -0
- package/dist/vendor/core/ui/textarea.d.ts +4 -0
- package/dist/vendor/core/ui/textarea.d.ts.map +1 -0
- package/dist/vendor/core/ui/textarea.js +8 -0
- package/dist/vendor/core/ui/textarea.js.map +1 -0
- package/dist/vendor/core/ui/toggle-group.d.ts +11 -0
- package/dist/vendor/core/ui/toggle-group.d.ts.map +1 -0
- package/dist/vendor/core/ui/toggle-group.js +24 -0
- package/dist/vendor/core/ui/toggle-group.js.map +1 -0
- package/dist/vendor/core/ui/toggle.d.ts +12 -0
- package/dist/vendor/core/ui/toggle.d.ts.map +1 -0
- package/dist/vendor/core/ui/toggle.js +28 -0
- package/dist/vendor/core/ui/toggle.js.map +1 -0
- package/dist/vendor/core/ui/tooltip.d.ts +8 -0
- package/dist/vendor/core/ui/tooltip.d.ts.map +1 -0
- package/dist/vendor/core/ui/tooltip.js +21 -0
- package/dist/vendor/core/ui/tooltip.js.map +1 -0
- package/dist/vendor/core/ui/trigger-child.d.ts +17 -0
- package/dist/vendor/core/ui/trigger-child.d.ts.map +1 -0
- package/dist/vendor/core/ui/trigger-child.js +31 -0
- package/dist/vendor/core/ui/trigger-child.js.map +1 -0
- package/dist/vendor/core/util/hooks/useLatestRef.d.ts +10 -0
- package/dist/vendor/core/util/hooks/useLatestRef.d.ts.map +1 -0
- package/dist/vendor/core/util/hooks/useLatestRef.js +17 -0
- package/dist/vendor/core/util/hooks/useLatestRef.js.map +1 -0
- package/dist/vendor/core/util/utils.d.ts +8 -0
- package/dist/vendor/core/util/utils.d.ts.map +1 -0
- package/dist/vendor/core/util/utils.js +17 -0
- package/dist/vendor/core/util/utils.js.map +1 -0
- package/dist/web.d.ts +13 -0
- package/dist/web.d.ts.map +1 -0
- package/dist/web.js +14 -0
- package/dist/web.js.map +1 -0
- package/package.json +188 -4
- package/src/bsx/analyze.ts +65 -0
- package/src/bsx/bsx.test.ts +111 -0
- package/src/bsx/expr.ts +541 -0
- package/src/bsx/index.ts +8 -0
- package/src/bsx/infer.test.ts +149 -0
- package/src/bsx/infer.ts +308 -0
- package/src/bsx/language.test.ts +204 -0
- package/src/bsx/language.ts +750 -0
- package/src/bsx/parse.ts +848 -0
- package/src/bsx/partial.test.ts +88 -0
- package/src/bsx/partial.ts +193 -0
- package/src/bsx/print.ts +412 -0
- package/src/bsx/references.test.ts +161 -0
- package/src/bsx/references.ts +1155 -0
- package/src/bsx/source.ts +70 -0
- package/src/cache/keyedStore.ts +122 -0
- package/src/editor/BsxEditor.tsx +252 -0
- package/src/editor.ts +2 -0
- package/src/env.d.ts +5 -0
- package/src/index.ts +6 -0
- package/src/logo/CachedBlokLogo.tsx +179 -0
- package/src/logo/SourceLogo.tsx +52 -0
- package/src/logo/actionLogoSource.ts +24 -0
- package/src/logo/demo.ts +21 -0
- package/src/logo/logoCache.test.ts +75 -0
- package/src/logo/logoCache.ts +130 -0
- package/src/platform.ts +121 -0
- package/src/preview/CachedBlokPreview.test.tsx +63 -0
- package/src/preview/CachedBlokPreview.tsx +336 -0
- package/src/preview/previewCache.test.ts +28 -0
- package/src/preview/previewCache.ts +64 -0
- package/src/preview/queue.test.ts +40 -0
- package/src/preview/queue.ts +75 -0
- package/src/preview/snapshot.test.ts +86 -0
- package/src/preview/snapshot.ts +226 -0
- package/src/preview/snapshotMode.test.tsx +45 -0
- package/src/preview/snapshotMode.tsx +45 -0
- package/src/renderer/BlokComponentHost.tsx +151 -0
- package/src/renderer/BlokDebugState.tsx +50 -0
- package/src/renderer/BlokRenderer.test.tsx +124 -0
- package/src/renderer/BlokRenderer.tsx +370 -0
- package/src/renderer/addBlokComponents.test.tsx +62 -0
- package/src/renderer/assets.test.tsx +123 -0
- package/src/renderer/assets.tsx +174 -0
- package/src/renderer/baseCatalog.ts +14 -0
- package/src/renderer/bloks/components.test.tsx +415 -0
- package/src/renderer/bloks/control.tsx +412 -0
- package/src/renderer/bloks/data.tsx +766 -0
- package/src/renderer/bloks/events.test.tsx +139 -0
- package/src/renderer/bloks/feedback.tsx +205 -0
- package/src/renderer/bloks/flow.test.tsx +201 -0
- package/src/renderer/bloks/forms.tsx +1195 -0
- package/src/renderer/bloks/html.tsx +171 -0
- package/src/renderer/bloks/icons.tsx +308 -0
- package/src/renderer/bloks/index.ts +42 -0
- package/src/renderer/bloks/inspector/Inspector.tsx +19 -0
- package/src/renderer/bloks/layout.tsx +538 -0
- package/src/renderer/bloks/logo/index.tsx +529 -0
- package/src/renderer/bloks/logo/logo.fixture.json +323 -0
- package/src/renderer/bloks/logo/logo.test.tsx +192 -0
- package/src/renderer/bloks/navigation.tsx +699 -0
- package/src/renderer/bloks/overlays.tsx +869 -0
- package/src/renderer/bloks/primitives.test.tsx +307 -0
- package/src/renderer/bloks/run/components.tsx +212 -0
- package/src/renderer/bloks/run/host.tsx +63 -0
- package/src/renderer/bloks/run/index.ts +3 -0
- package/src/renderer/bloks/run/math.test.ts +81 -0
- package/src/renderer/bloks/run/math.ts +112 -0
- package/src/renderer/bloks/run/run.test.tsx +164 -0
- package/src/renderer/bloks/scene/Model.tsx +571 -0
- package/src/renderer/bloks/scene/Scene.tsx +882 -0
- package/src/renderer/bloks/scene/Transform.tsx +116 -0
- package/src/renderer/bloks/scene/animate.test.tsx +81 -0
- package/src/renderer/bloks/scene/bindings.tsx +432 -0
- package/src/renderer/bloks/scene/colour.test.ts +47 -0
- package/src/renderer/bloks/scene/colour.ts +56 -0
- package/src/renderer/bloks/scene/context.tsx +228 -0
- package/src/renderer/bloks/scene/embedded.test.tsx +68 -0
- package/src/renderer/bloks/scene/host.tsx +84 -0
- package/src/renderer/bloks/scene/index.ts +32 -0
- package/src/renderer/bloks/scene/interaction.tsx +212 -0
- package/src/renderer/bloks/scene/loadModel.test.ts +69 -0
- package/src/renderer/bloks/scene/loadModel.ts +135 -0
- package/src/renderer/bloks/scene/scene.fixture.json +203 -0
- package/src/renderer/bloks/scene/scene.test.ts +35 -0
- package/src/renderer/bloks/scene/scope.fixture.glb +0 -0
- package/src/renderer/bloks/scene/transform.test.ts +26 -0
- package/src/renderer/bloks/shared/index.ts +5 -0
- package/src/renderer/bloks/shared/props.ts +224 -0
- package/src/renderer/bloks/shared/render.tsx +62 -0
- package/src/renderer/bloks/shared/schemas.ts +215 -0
- package/src/renderer/bloks/shared/state.ts +96 -0
- package/src/renderer/bloks/shared/throttle.test.ts +50 -0
- package/src/renderer/bloks/shared/throttle.ts +53 -0
- package/src/renderer/bloks/testing.tsx +73 -0
- package/src/renderer/bloks/time.test.tsx +78 -0
- package/src/renderer/bloks/toast.test.tsx +82 -0
- package/src/renderer/bloks/toast.tsx +132 -0
- package/src/renderer/bloks/typography.tsx +265 -0
- package/src/renderer/bloks/unavailable.test.tsx +52 -0
- package/src/renderer/catalog.tsx +97 -0
- package/src/renderer/declarations.test.ts +72 -0
- package/src/renderer/declarations.ts +285 -0
- package/src/renderer/functions/index.ts +3 -0
- package/src/renderer/functions/v2/functions.test.ts +256 -0
- package/src/renderer/functions/v2/handler.ts +11 -0
- package/src/renderer/functions/v2/index.ts +638 -0
- package/src/renderer/modules.ts +54 -0
- package/src/renderer/persist.test.ts +182 -0
- package/src/renderer/persist.ts +320 -0
- package/src/renderer/persistComponent.test.tsx +68 -0
- package/src/renderer/runtime/checks.ts +177 -0
- package/src/renderer/runtime/components.tsx +311 -0
- package/src/renderer/runtime/context.test.ts +137 -0
- package/src/renderer/runtime/context.tsx +369 -0
- package/src/renderer/runtime/functions.ts +69 -0
- package/src/renderer/runtime/hooks.ts +764 -0
- package/src/renderer/runtime/index.ts +31 -0
- package/src/renderer/runtime/nodeState.ts +43 -0
- package/src/renderer/runtime/normalize.test.ts +154 -0
- package/src/renderer/runtime/normalize.ts +121 -0
- package/src/renderer/runtime/port.tsx +24 -0
- package/src/renderer/runtime/preflight.test.ts +127 -0
- package/src/renderer/runtime/preflight.ts +264 -0
- package/src/renderer/runtime/reads.test.tsx +278 -0
- package/src/renderer/runtime/reads.tsx +448 -0
- package/src/renderer/runtime/resolution.test.ts +467 -0
- package/src/renderer/runtime/resolution.ts +531 -0
- package/src/renderer/runtime/resource.ts +196 -0
- package/src/renderer/runtime/schemas.ts +181 -0
- package/src/renderer/runtime/scope.tsx +123 -0
- package/src/renderer/runtime/status.ts +54 -0
- package/src/renderer/runtime/task.test.ts +131 -0
- package/src/renderer/runtime/task.ts +149 -0
- package/src/renderer/runtime/tree.tsx +138 -0
- package/src/renderer/runtime/types.ts +285 -0
- package/src/renderer/runtime/utils.test.ts +68 -0
- package/src/renderer/runtime/utils.ts +67 -0
- package/src/renderer/runtime/viewer.tsx +21 -0
- package/src/renderer/unbound.test.tsx +75 -0
- package/src/runtime.ts +9 -0
- package/src/scene.ts +3 -0
- package/src/spec/bsx_v2.json +11380 -0
- package/src/spec/catalogs/base@2.json +210 -0
- package/src/spec/catalogs/html@1.json +308 -0
- package/src/spec/catalogs/logo@1.json +1673 -0
- package/src/spec/catalogs/scene@1.json +806 -0
- package/src/spec/catalogs/structure@1.json +185 -0
- package/src/spec/catalogs/ui@1.json +3696 -0
- package/src/spec/catalogs.ts +210 -0
- package/src/spec/locals.ts +35 -0
- package/src/spec/modules/orkestrator.json +2755 -0
- package/src/spec/spec.test.ts +87 -0
- package/src/spec/vocabulary.json +411 -0
- package/src/spec/vocabulary.ts +514 -0
- package/src/tailwind/defaultTheme.ts +3 -0
- package/src/tailwind/runtimeTailwind.test.ts +86 -0
- package/src/tailwind/runtimeTailwind.ts +137 -0
- package/src/tailwind/theme.css +137 -0
- package/src/tailwind/useBlokTailwind.test.tsx +52 -0
- package/src/tailwind/useBlokTailwind.ts +84 -0
- package/src/tailwind.ts +3 -0
- package/src/vendor/core/data/scene/camera/navigateButtons.ts +15 -0
- package/src/vendor/core/dialogs/PageDialogHost.tsx +42 -0
- package/src/vendor/core/model/affine.ts +117 -0
- package/src/vendor/core/model/glb.ts +580 -0
- package/src/vendor/core/model/joints.ts +65 -0
- package/src/vendor/core/model/model.test.ts +241 -0
- package/src/vendor/core/model/motion.ts +134 -0
- package/src/vendor/core/model/testing.ts +57 -0
- package/src/vendor/core/model/units.ts +112 -0
- package/src/vendor/core/model/writers.ts +62 -0
- package/src/vendor/core/ui/AsyncBoundary.tsx +96 -0
- package/src/vendor/core/ui/ChromeSurface.tsx +51 -0
- package/src/vendor/core/ui/accordion.tsx +79 -0
- package/src/vendor/core/ui/actionPlan.ts +150 -0
- package/src/vendor/core/ui/alert-dialog.tsx +201 -0
- package/src/vendor/core/ui/alert.tsx +72 -0
- package/src/vendor/core/ui/aspect-ratio.tsx +11 -0
- package/src/vendor/core/ui/avatar.tsx +104 -0
- package/src/vendor/core/ui/badge.tsx +45 -0
- package/src/vendor/core/ui/bento-grid.tsx +818 -0
- package/src/vendor/core/ui/breadcrumb.tsx +119 -0
- package/src/vendor/core/ui/button-group.tsx +83 -0
- package/src/vendor/core/ui/button.tsx +82 -0
- package/src/vendor/core/ui/calendar.tsx +214 -0
- package/src/vendor/core/ui/card.tsx +94 -0
- package/src/vendor/core/ui/carousel.tsx +240 -0
- package/src/vendor/core/ui/chart.tsx +354 -0
- package/src/vendor/core/ui/checkbox.tsx +31 -0
- package/src/vendor/core/ui/collapsible.tsx +36 -0
- package/src/vendor/core/ui/context-menu.tsx +239 -0
- package/src/vendor/core/ui/dialog.tsx +165 -0
- package/src/vendor/core/ui/drawer.tsx +119 -0
- package/src/vendor/core/ui/dropdown-menu.tsx +250 -0
- package/src/vendor/core/ui/empty.tsx +99 -0
- package/src/vendor/core/ui/field.tsx +220 -0
- package/src/vendor/core/ui/hover-card.tsx +53 -0
- package/src/vendor/core/ui/image.tsx +70 -0
- package/src/vendor/core/ui/input-group.tsx +144 -0
- package/src/vendor/core/ui/input-otp.tsx +85 -0
- package/src/vendor/core/ui/input.tsx +19 -0
- package/src/vendor/core/ui/item.tsx +187 -0
- package/src/vendor/core/ui/kbd.tsx +26 -0
- package/src/vendor/core/ui/label.tsx +24 -0
- package/src/vendor/core/ui/markdown.tsx +398 -0
- package/src/vendor/core/ui/menubar.tsx +248 -0
- package/src/vendor/core/ui/pagination.tsx +132 -0
- package/src/vendor/core/ui/popover.tsx +96 -0
- package/src/vendor/core/ui/progress.tsx +29 -0
- package/src/vendor/core/ui/radio-group.tsx +45 -0
- package/src/vendor/core/ui/resizable.tsx +51 -0
- package/src/vendor/core/ui/scroll-area.tsx +55 -0
- package/src/vendor/core/ui/select.tsx +185 -0
- package/src/vendor/core/ui/separator.tsx +28 -0
- package/src/vendor/core/ui/sheet.tsx +139 -0
- package/src/vendor/core/ui/skeleton.tsx +13 -0
- package/src/vendor/core/ui/slider.tsx +57 -0
- package/src/vendor/core/ui/spinner.tsx +10 -0
- package/src/vendor/core/ui/switch.tsx +31 -0
- package/src/vendor/core/ui/table.tsx +95 -0
- package/src/vendor/core/ui/tabs.tsx +88 -0
- package/src/vendor/core/ui/textarea.tsx +18 -0
- package/src/vendor/core/ui/toggle-group.tsx +87 -0
- package/src/vendor/core/ui/toggle.tsx +46 -0
- package/src/vendor/core/ui/tooltip.tsx +64 -0
- package/src/vendor/core/ui/trigger-child.ts +35 -0
- package/src/vendor/core/util/hooks/useLatestRef.ts +17 -0
- package/src/vendor/core/util/utils.ts +18 -0
- package/src/web.ts +13 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.js","sourceRoot":"","sources":["../../../src/renderer/bloks/testing.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAC,kBAAkB,EAAE,iBAAiB,EAAC,MAAM,YAAY,CAAC;AACjE,OAAO,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AACxC,OAAO,EAAC,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EACL,QAAQ,EACR,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,GAItB,MAAM,YAAY,CAAC;AAEpB,IAAI,IAAI,GAAuB,IAAI,CAAC;AAEpC,oHAAoH;AACpH,MAAM,CAAC,MAAM,WAAW,GAAG,GAAgB,EAAE,CAC3C,CAAC,IAAI,KAAK,kBAAkB,CAAC,0CAA0C,EAAE,CAAC,GAAG,iBAAiB,EAAE,GAAG,mBAAmB,EAAE,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAWlJ;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,OAAoB,EACpB,KAAgB,EAChB,YAAsB,EACtB,UAA6B,EAAE,EAC6E,EAAE;IAC9G,MAAM,SAAS,GAAG,qBAAqB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACxD,MAAM,KAAK,GAAG,sBAAsB,CAAC;QACnC,gBAAgB,EAAE,YAAY;QAC9B,cAAc,EAAE,kBAAkB;QAClC,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,IAAI;KACnC,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,CACX,KAAC,mBAAmB,IAAC,KAAK,EAAE,KAAK,YAC/B,KAAC,gBAAgB,IAAC,IAAI,EAAE,EAAC,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,YAAY,EAAE,SAAS,CAAC,YAAY,EAAC,YAC5F,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAC3B,KAAC,QAAQ,IAAU,EAAE,EAAE,EAAE,IAAV,EAAE,CAAY,CAC9B,CAAC,GACe,GACC,CACvB,CAAC;IACF,MAAM,EAAC,OAAO,EAAC,GAAG,MAAM,CAAC,4BAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,GAAI,CAAC,CAAC;IAE1E,OAAO,EAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAC,CAAC;AACpD,CAAC,CAAC;AAEF,qEAAqE;AACrE,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,OAAoB,EACpB,MAAc,EACd,YAAsB,EACtB,UAA6B,EAAE,EAC/B,EAAE,CAAC,kBAAkB,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* `<Toast task={move}>`: a notification when a task settles, once per task
|
|
4
|
+
* (ui@1). Each outcome slot (`done`, `failed`, `cancelled`) is optional and
|
|
5
|
+
* holds the text shown for it:
|
|
6
|
+
*
|
|
7
|
+
* <Toast task={move}>
|
|
8
|
+
* <done>Arrived at {move.args.position}</done>
|
|
9
|
+
* <failed>Move failed: {move.error}</failed>
|
|
10
|
+
* </Toast>
|
|
11
|
+
*
|
|
12
|
+
* - It is keyed by the task's id: a task toasts at most once.
|
|
13
|
+
* - It fires only for a task that settles while the blok is open, never on
|
|
14
|
+
* mount for one already settled.
|
|
15
|
+
* - It never fires while the blok shows the past.
|
|
16
|
+
* - It watches only the blok's own `into` records and `task` (the validator
|
|
17
|
+
* refuses anything else: `toast.task`); there is no imperative toast.
|
|
18
|
+
*/
|
|
19
|
+
export type BlokToastOutcome = 'done' | 'failed' | 'cancelled';
|
|
20
|
+
/** Where a settled task's toast goes; the app's toast island unless a host (a test) says otherwise. */
|
|
21
|
+
export type BlokToastSink = (toast: {
|
|
22
|
+
id: string;
|
|
23
|
+
outcome: BlokToastOutcome;
|
|
24
|
+
text: string;
|
|
25
|
+
}) => void;
|
|
26
|
+
export declare const BlokToastSinkContext: React.Context<BlokToastSink>;
|
|
27
|
+
export declare const Toast: import("../runtime").BlokComponentDefinition;
|
|
28
|
+
export declare const ToastDone: import("../runtime").BlokComponentDefinition;
|
|
29
|
+
export declare const ToastFailed: import("../runtime").BlokComponentDefinition;
|
|
30
|
+
export declare const ToastCancelled: import("../runtime").BlokComponentDefinition;
|
|
31
|
+
export declare const toastBlokComponents: import("../runtime").BlokComponentDefinition[];
|
|
32
|
+
//# sourceMappingURL=toast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../src/renderer/bloks/toast.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAc/B;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,CAAC;AAE/D,uGAAuG;AACvG,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,gBAAgB,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,KAAK,IAAI,CAAC;AASnG,eAAO,MAAM,oBAAoB,8BAAiD,CAAC;AA4BnF,eAAO,MAAM,KAAK,8CAyCjB,CAAC;AAcF,eAAO,MAAM,SAAS,8CAAsE,CAAC;AAC7F,eAAO,MAAM,WAAW,8CAA+F,CAAC;AACxH,eAAO,MAAM,cAAc,8CAAiF,CAAC;AAE7G,eAAO,MAAM,mBAAmB,gDAAkD,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as z from 'zod';
|
|
3
|
+
import { toast } from '../../platform.js';
|
|
4
|
+
import { BlokPropSchemas, createBlokComponent, useBlok, useBlokRuntime, useResolvedProp, useValue, } from '../runtime/index.js';
|
|
5
|
+
import { isSettledStatus, isTaskStatus } from '../runtime/task.js';
|
|
6
|
+
const islandSink = ({ id, outcome, text }) => {
|
|
7
|
+
const options = { id: `blok-toast:${id}` };
|
|
8
|
+
if (outcome === 'done')
|
|
9
|
+
toast.success(text, options);
|
|
10
|
+
else if (outcome === 'failed')
|
|
11
|
+
toast.error(text, options);
|
|
12
|
+
else
|
|
13
|
+
toast.info(text, options);
|
|
14
|
+
};
|
|
15
|
+
export const BlokToastSinkContext = React.createContext(islandSink);
|
|
16
|
+
const OUTCOMES = ['done', 'failed', 'cancelled'];
|
|
17
|
+
const textSchema = z.unknown();
|
|
18
|
+
const readRecord = (value) => {
|
|
19
|
+
if (typeof value !== 'object' || value === null)
|
|
20
|
+
return null;
|
|
21
|
+
const record = value;
|
|
22
|
+
if (!isTaskStatus(record.status))
|
|
23
|
+
return null;
|
|
24
|
+
return { id: typeof record.id === 'string' ? record.id : null, status: record.status };
|
|
25
|
+
};
|
|
26
|
+
const slotNode = (component, outcome) => component.children?.find(child => child.component === outcome);
|
|
27
|
+
const asText = (value) => {
|
|
28
|
+
if (value === null || value === undefined)
|
|
29
|
+
return '';
|
|
30
|
+
return typeof value === 'string' ? value : typeof value === 'object' ? JSON.stringify(value) : String(value);
|
|
31
|
+
};
|
|
32
|
+
const toastSchema = z
|
|
33
|
+
.object({
|
|
34
|
+
task: z.unknown().describe('The task record to follow: an `into` name of this blok (`task={move}`), or `task`.'),
|
|
35
|
+
})
|
|
36
|
+
.describe('A notification when a task settles, once per task: its `done`, `failed` and `cancelled` slots hold the text.');
|
|
37
|
+
export const Toast = createBlokComponent({ name: 'Toast', acceptsChildren: true, schema: toastSchema }, ({ component, schema }) => {
|
|
38
|
+
const blok = useBlok(component, schema);
|
|
39
|
+
const record = readRecord(useValue(blok.task));
|
|
40
|
+
const travelling = useBlokRuntime(state => state.travelAt !== null);
|
|
41
|
+
const sink = React.useContext(BlokToastSinkContext);
|
|
42
|
+
// The slots' text, resolved as the record changes: what a toast says is what the blok knows when it fires.
|
|
43
|
+
const done = slotNode(component, 'done');
|
|
44
|
+
const failed = slotNode(component, 'failed');
|
|
45
|
+
const cancelled = slotNode(component, 'cancelled');
|
|
46
|
+
const texts = {
|
|
47
|
+
done: useResolvedProp(done ?? component, done ? 'text' : undefined, textSchema),
|
|
48
|
+
failed: useResolvedProp(failed ?? component, failed ? 'text' : undefined, textSchema),
|
|
49
|
+
cancelled: useResolvedProp(cancelled ?? component, cancelled ? 'text' : undefined, textSchema),
|
|
50
|
+
};
|
|
51
|
+
const last = React.useRef(undefined);
|
|
52
|
+
const toasted = React.useRef(new Set());
|
|
53
|
+
React.useEffect(() => {
|
|
54
|
+
const previous = last.current;
|
|
55
|
+
last.current = record;
|
|
56
|
+
// The first look is the state on mount: nothing settles in front of the viewer then.
|
|
57
|
+
if (previous === undefined || !record || travelling)
|
|
58
|
+
return;
|
|
59
|
+
if (!isSettledStatus(record.status) || !record.id)
|
|
60
|
+
return;
|
|
61
|
+
if (toasted.current.has(record.id))
|
|
62
|
+
return;
|
|
63
|
+
// A task this blok saw before it settled: running then, or (a fast one) not seen with this id yet.
|
|
64
|
+
const sawItRun = previous !== null && (!isSettledStatus(previous.status) || previous.id !== record.id);
|
|
65
|
+
if (!sawItRun)
|
|
66
|
+
return;
|
|
67
|
+
toasted.current.add(record.id);
|
|
68
|
+
const outcome = record.status;
|
|
69
|
+
if (!OUTCOMES.includes(outcome))
|
|
70
|
+
return;
|
|
71
|
+
if (!slotNode(component, outcome))
|
|
72
|
+
return;
|
|
73
|
+
const resolved = texts[outcome];
|
|
74
|
+
sink({ id: record.id, outcome, text: resolved.ok ? asText(resolved.value) : '' });
|
|
75
|
+
});
|
|
76
|
+
return null;
|
|
77
|
+
});
|
|
78
|
+
const outcomeSlot = (name, description) => createBlokComponent({
|
|
79
|
+
name,
|
|
80
|
+
placement: { downstreamOf: ['Toast'] },
|
|
81
|
+
schema: z
|
|
82
|
+
.object({ text: BlokPropSchemas.DynamicString.optional().describe('What the toast says.') })
|
|
83
|
+
.describe(description),
|
|
84
|
+
}, () => null);
|
|
85
|
+
export const ToastDone = outcomeSlot('done', 'What a `<Toast>` says when its task is done.');
|
|
86
|
+
export const ToastFailed = outcomeSlot('failed', 'What a `<Toast>` says when its task failed (`move.error` says why).');
|
|
87
|
+
export const ToastCancelled = outcomeSlot('cancelled', 'What a `<Toast>` says when its task was cancelled.');
|
|
88
|
+
export const toastBlokComponents = [Toast, ToastDone, ToastFailed, ToastCancelled];
|
|
89
|
+
//# sourceMappingURL=toast.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast.js","sourceRoot":"","sources":["../../../src/renderer/bloks/toast.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AACrC,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,OAAO,EACP,cAAc,EACd,eAAe,EACf,QAAQ,GAET,MAAM,YAAY,CAAC;AACpB,OAAO,EAAC,eAAe,EAAE,YAAY,EAAsB,MAAM,iBAA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M,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const Text: import("../runtime").BlokComponentDefinition;
|
|
2
|
+
export declare const Paragraph: import("../runtime").BlokComponentDefinition;
|
|
3
|
+
export declare const Span: import("../runtime").BlokComponentDefinition;
|
|
4
|
+
/**
|
|
5
|
+
* `Heading` takes the level as a prop; `h1`…`h6` are the same renderer with
|
|
6
|
+
* the level fixed, so a payload can use whichever reads better. The fixed ones
|
|
7
|
+
* deliberately do not publish a `level` prop — it would have no effect.
|
|
8
|
+
*/
|
|
9
|
+
export declare const Heading: import("../runtime").BlokComponentDefinition;
|
|
10
|
+
export declare const H1: import("../runtime").BlokComponentDefinition;
|
|
11
|
+
export declare const H2: import("../runtime").BlokComponentDefinition;
|
|
12
|
+
export declare const H3: import("../runtime").BlokComponentDefinition;
|
|
13
|
+
export declare const H4: import("../runtime").BlokComponentDefinition;
|
|
14
|
+
export declare const H5: import("../runtime").BlokComponentDefinition;
|
|
15
|
+
export declare const H6: import("../runtime").BlokComponentDefinition;
|
|
16
|
+
export declare const Kbd: import("../runtime").BlokComponentDefinition;
|
|
17
|
+
export declare const Markdown: import("../runtime").BlokComponentDefinition;
|
|
18
|
+
/**
|
|
19
|
+
* `<Time value relative? format?>` (ui@1): a moment, absolute or relative.
|
|
20
|
+
* Relative time is measured from the viewed moment: the wall clock live
|
|
21
|
+
* (ticking here), `then` while travelling, so the past renders as it did.
|
|
22
|
+
*/
|
|
23
|
+
export declare const Time: import("../runtime").BlokComponentDefinition;
|
|
24
|
+
export declare const typographyBlokComponents: import("../runtime").BlokComponentDefinition[];
|
|
25
|
+
//# sourceMappingURL=typography.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../../src/renderer/bloks/typography.tsx"],"names":[],"mappings":"AAyDA,eAAO,MAAM,IAAI,8CAA2D,CAAC;AAC7E,eAAO,MAAM,SAAS,8CAAsD,CAAC;AAC7E,eAAO,MAAM,IAAI,8CAAgE,CAAC;AAsBlF;;;;GAIG;AACH,eAAO,MAAM,OAAO,8CAyBnB,CAAC;AAwBF,eAAO,MAAM,EAAE,8CAA2B,CAAC;AAC3C,eAAO,MAAM,EAAE,8CAA2B,CAAC;AAC3C,eAAO,MAAM,EAAE,8CAA2B,CAAC;AAC3C,eAAO,MAAM,EAAE,8CAA2B,CAAC;AAC3C,eAAO,MAAM,EAAE,8CAA2B,CAAC;AAC3C,eAAO,MAAM,EAAE,8CAA2B,CAAC;AAE3C,eAAO,MAAM,GAAG,8CAmBf,CAAC;AAEF,eAAO,MAAM,QAAQ,8CAiBpB,CAAC;AA8CF;;;;GAIG;AACH,eAAO,MAAM,IAAI,8CAuBhB,CAAC;AAEF,eAAO,MAAM,wBAAwB,gDAQpC,CAAC"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Kbd as ShadKbd } from '../../vendor/core/ui/kbd.js';
|
|
3
|
+
import { Markdown as ShadMarkdown } from '../../vendor/core/ui/markdown.js';
|
|
4
|
+
import { cn } from '../../vendor/core/util/utils.js';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import * as z from 'zod';
|
|
7
|
+
import { dateText, relativeTime } from '../functions/v2/index.js';
|
|
8
|
+
import { BlokPropSchemas, createBlokComponent, useBlok, useBlokDataAttributes, useBlokRuntime, useValue } from '../runtime/index.js';
|
|
9
|
+
import { classNameSchema, contentSchema, headingLevelSchema, mapTextAlign, renderContent, textAlignSchema, textFields, textPresentationClasses, useTextPresentationProps, } from './shared/index.js';
|
|
10
|
+
/** Text-bearing bloks. See `layout.tsx` for the naming convention. */
|
|
11
|
+
/**
|
|
12
|
+
* `Text` and `p`/`span` differ only in the element they render, so they share
|
|
13
|
+
* one factory over one schema.
|
|
14
|
+
*/
|
|
15
|
+
const textComponentSchema = z
|
|
16
|
+
.object({
|
|
17
|
+
text: BlokPropSchemas.DynamicString.optional().describe('The text to render.'),
|
|
18
|
+
children: contentSchema,
|
|
19
|
+
className: classNameSchema,
|
|
20
|
+
...textFields,
|
|
21
|
+
})
|
|
22
|
+
.describe('A run of text.');
|
|
23
|
+
const createTextComponent = (name, element, description) => createBlokComponent({
|
|
24
|
+
name,
|
|
25
|
+
schema: textComponentSchema.describe(description),
|
|
26
|
+
}, ({ buildChild, component, schema }) => {
|
|
27
|
+
const blok = useBlok(component, schema);
|
|
28
|
+
const text = useValue(blok.text);
|
|
29
|
+
const children = useValue(blok.children);
|
|
30
|
+
const className = useValue(blok.className);
|
|
31
|
+
const presentation = useTextPresentationProps(blok);
|
|
32
|
+
const attributes = useBlokDataAttributes();
|
|
33
|
+
const Element = element;
|
|
34
|
+
return (_jsx(Element, { ...attributes, className: cn(...textPresentationClasses(presentation), className), children: renderContent(children ?? text, buildChild) }));
|
|
35
|
+
});
|
|
36
|
+
export const Text = createTextComponent('Text', 'p', 'A paragraph of text.');
|
|
37
|
+
export const Paragraph = createTextComponent('p', 'p', 'An HTML paragraph.');
|
|
38
|
+
export const Span = createTextComponent('span', 'span', 'An inline run of text.');
|
|
39
|
+
const headingFields = {
|
|
40
|
+
text: BlokPropSchemas.DynamicString.optional().describe('The heading text.'),
|
|
41
|
+
children: contentSchema,
|
|
42
|
+
align: textAlignSchema,
|
|
43
|
+
className: classNameSchema,
|
|
44
|
+
};
|
|
45
|
+
const headingClassName = (level, align) => cn(mapTextAlign(align), level === 'h1' && 'text-4xl font-extrabold tracking-tight', level === 'h2' && 'text-3xl font-bold tracking-tight', level === 'h3' && 'text-2xl font-semibold tracking-tight', level === 'h4' && 'text-xl font-semibold tracking-tight', level === 'h5' && 'text-lg font-semibold', level === 'h6' && 'text-base font-semibold uppercase tracking-wide text-muted-foreground');
|
|
46
|
+
/**
|
|
47
|
+
* `Heading` takes the level as a prop; `h1`…`h6` are the same renderer with
|
|
48
|
+
* the level fixed, so a payload can use whichever reads better. The fixed ones
|
|
49
|
+
* deliberately do not publish a `level` prop — it would have no effect.
|
|
50
|
+
*/
|
|
51
|
+
export const Heading = createBlokComponent({
|
|
52
|
+
name: 'Heading',
|
|
53
|
+
schema: z
|
|
54
|
+
.object({ ...headingFields, level: headingLevelSchema })
|
|
55
|
+
.describe('A section heading at an author-chosen level.'),
|
|
56
|
+
}, ({ buildChild, component, schema }) => {
|
|
57
|
+
const blok = useBlok(component, schema);
|
|
58
|
+
const text = useValue(blok.text);
|
|
59
|
+
const children = useValue(blok.children);
|
|
60
|
+
const level = useValue(blok.level);
|
|
61
|
+
const align = useValue(blok.align);
|
|
62
|
+
const className = useValue(blok.className);
|
|
63
|
+
const resolvedLevel = (level ?? 'h3');
|
|
64
|
+
const Element = resolvedLevel;
|
|
65
|
+
const attributes = useBlokDataAttributes();
|
|
66
|
+
return (_jsx(Element, { ...attributes, className: cn(headingClassName(resolvedLevel, align), className), children: renderContent(children ?? text, buildChild) }));
|
|
67
|
+
});
|
|
68
|
+
const createFixedHeading = (level) => createBlokComponent({
|
|
69
|
+
name: level,
|
|
70
|
+
schema: z.object(headingFields).describe(`An HTML ${level} heading.`),
|
|
71
|
+
}, ({ buildChild, component, schema }) => {
|
|
72
|
+
const blok = useBlok(component, schema);
|
|
73
|
+
const text = useValue(blok.text);
|
|
74
|
+
const children = useValue(blok.children);
|
|
75
|
+
const align = useValue(blok.align);
|
|
76
|
+
const className = useValue(blok.className);
|
|
77
|
+
const Element = level;
|
|
78
|
+
return (_jsx(Element, { className: cn(headingClassName(level, align), className), children: renderContent(children ?? text, buildChild) }));
|
|
79
|
+
});
|
|
80
|
+
export const H1 = createFixedHeading('h1');
|
|
81
|
+
export const H2 = createFixedHeading('h2');
|
|
82
|
+
export const H3 = createFixedHeading('h3');
|
|
83
|
+
export const H4 = createFixedHeading('h4');
|
|
84
|
+
export const H5 = createFixedHeading('h5');
|
|
85
|
+
export const H6 = createFixedHeading('h6');
|
|
86
|
+
export const Kbd = createBlokComponent({
|
|
87
|
+
name: 'Kbd',
|
|
88
|
+
schema: z
|
|
89
|
+
.object({
|
|
90
|
+
text: BlokPropSchemas.DynamicString.optional().describe('The key or chord to show.'),
|
|
91
|
+
children: contentSchema,
|
|
92
|
+
className: classNameSchema,
|
|
93
|
+
})
|
|
94
|
+
.describe('A keyboard key or shortcut.'),
|
|
95
|
+
}, ({ buildChild, component, schema }) => {
|
|
96
|
+
const blok = useBlok(component, schema);
|
|
97
|
+
const text = useValue(blok.text);
|
|
98
|
+
const children = useValue(blok.children);
|
|
99
|
+
const className = useValue(blok.className);
|
|
100
|
+
return _jsx(ShadKbd, { className: className, children: renderContent(children ?? text, buildChild) });
|
|
101
|
+
});
|
|
102
|
+
export const Markdown = createBlokComponent({
|
|
103
|
+
name: 'Markdown',
|
|
104
|
+
schema: z
|
|
105
|
+
.object({
|
|
106
|
+
content: BlokPropSchemas.DynamicString.optional().describe('Markdown source to render.'),
|
|
107
|
+
className: classNameSchema,
|
|
108
|
+
})
|
|
109
|
+
.describe('Renders a Markdown document.'),
|
|
110
|
+
}, ({ component, schema }) => {
|
|
111
|
+
const blok = useBlok(component, schema);
|
|
112
|
+
const content = useValue(blok.content);
|
|
113
|
+
const className = useValue(blok.className);
|
|
114
|
+
return _jsx(ShadMarkdown, { text: content ?? '', className: className });
|
|
115
|
+
});
|
|
116
|
+
/* -------------------------------------------------------------------------- */
|
|
117
|
+
/* Time */
|
|
118
|
+
/* -------------------------------------------------------------------------- */
|
|
119
|
+
const timeSchema = z
|
|
120
|
+
.object({
|
|
121
|
+
value: z.string().nullish().describe('The moment, an ISO 8601 datetime. Null renders nothing.'),
|
|
122
|
+
relative: BlokPropSchemas.DynamicBoolean.optional().describe('Show the distance to now (live) or to then (travelling) instead of the moment, ticking as it changes.'),
|
|
123
|
+
format: z.string().nullish().describe("How an absolute moment is written, as fmt.datetime's format."),
|
|
124
|
+
className: classNameSchema,
|
|
125
|
+
})
|
|
126
|
+
.describe("A moment, shown absolute (format) or relative ('3 hours ago'). Relative time ticks inside the component.");
|
|
127
|
+
/** How long until a relative text can change: every second under a minute, then every half minute. */
|
|
128
|
+
const tickFor = (distanceMs) => (Math.abs(distanceMs) < 60_000 ? 1_000 : 30_000);
|
|
129
|
+
/**
|
|
130
|
+
* The wall clock, ticking while `active`: the one place a blok's view reads
|
|
131
|
+
* it (the language never does). Measured from `then` while travelling, it
|
|
132
|
+
* does not tick at all.
|
|
133
|
+
*/
|
|
134
|
+
const useClock = (active, target) => {
|
|
135
|
+
const [now, setNow] = React.useState(() => Date.now());
|
|
136
|
+
React.useEffect(() => {
|
|
137
|
+
if (!active)
|
|
138
|
+
return;
|
|
139
|
+
let timer;
|
|
140
|
+
const schedule = (delay) => {
|
|
141
|
+
timer = setTimeout(() => {
|
|
142
|
+
const current = Date.now();
|
|
143
|
+
setNow(current);
|
|
144
|
+
schedule(tickFor(target === null ? 0 : target - current));
|
|
145
|
+
}, delay);
|
|
146
|
+
};
|
|
147
|
+
// Caught up at once (it may have been off while travelling), then on its own beat.
|
|
148
|
+
schedule(0);
|
|
149
|
+
return () => {
|
|
150
|
+
if (timer !== undefined)
|
|
151
|
+
clearTimeout(timer);
|
|
152
|
+
};
|
|
153
|
+
}, [active, target]);
|
|
154
|
+
return now;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* `<Time value relative? format?>` (ui@1): a moment, absolute or relative.
|
|
158
|
+
* Relative time is measured from the viewed moment: the wall clock live
|
|
159
|
+
* (ticking here), `then` while travelling, so the past renders as it did.
|
|
160
|
+
*/
|
|
161
|
+
export const Time = createBlokComponent({ name: 'Time', schema: timeSchema }, ({ component, schema }) => {
|
|
162
|
+
const blok = useBlok(component, schema);
|
|
163
|
+
const value = useValue(blok.value);
|
|
164
|
+
const relative = useValue(blok.relative) === true;
|
|
165
|
+
const format = useValue(blok.format);
|
|
166
|
+
const className = useValue(blok.className);
|
|
167
|
+
const travelAt = useBlokRuntime(state => state.travelAt);
|
|
168
|
+
const attributes = useBlokDataAttributes();
|
|
169
|
+
const moment = typeof value === 'string' ? Date.parse(value) : Number.NaN;
|
|
170
|
+
const known = !Number.isNaN(moment);
|
|
171
|
+
const then = travelAt === null ? Number.NaN : Date.parse(travelAt);
|
|
172
|
+
const live = Number.isNaN(then);
|
|
173
|
+
const now = useClock(relative && known && live, known ? moment : null);
|
|
174
|
+
if (!known || typeof value !== 'string')
|
|
175
|
+
return null;
|
|
176
|
+
const text = relative ? relativeTime((moment - (live ? now : then)) / 1000, undefined) : dateText(value, format ?? null, undefined, true);
|
|
177
|
+
return (_jsx("time", { ...attributes, dateTime: value, title: relative ? dateText(value, null, undefined, true) : undefined, className: cn(className), children: text }));
|
|
178
|
+
});
|
|
179
|
+
export const typographyBlokComponents = [
|
|
180
|
+
Text,
|
|
181
|
+
Paragraph,
|
|
182
|
+
Span,
|
|
183
|
+
Heading,
|
|
184
|
+
Kbd,
|
|
185
|
+
Markdown,
|
|
186
|
+
Time,
|
|
187
|
+
];
|
|
188
|
+
//# sourceMappingURL=typography.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography.js","sourceRoot":"","sources":["../../../src/renderer/bloks/typography.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,GAAG,IAAI,OAAO,EAAC,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAC,QAAQ,IAAI,YAAY,EAAC,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAC,EAAE,EAAC,MAAM,8BAA8B,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAC,QAAQ,EAAE,YAAY,EAAC,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAC,eAAe,EAAE,mBAAmB,EAAE,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC1H,OAAO,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AAE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACvE,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IACrD,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,IAAI,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IAC1I,OAAO,CACL,kBAAU,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,YAClI,IAAI,GACA,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,IAAI;IACJ,SAAS;IACT,IAAI;IACJ,OAAO;IACP,GAAG;IACH,QAAQ;IACR,IAAI;CACL,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type BlokCatalog, type BlokComponentDefinition } from './runtime';
|
|
3
|
+
/**
|
|
4
|
+
* The catalog a blok payload is validated and rendered against: which
|
|
5
|
+
* components exist (what a blok may call is the language's own). Each app composes
|
|
6
|
+
* its own (`composeBlokCatalog`) from what this package draws and what the app
|
|
7
|
+
* brings, and hands it down with `BlokCatalogProvider`.
|
|
8
|
+
*
|
|
9
|
+
* The backend does not enumerate either -- `ComponentNode.component` and
|
|
10
|
+
* `UtilCall.operation` are free-form strings -- so the app's catalog is the
|
|
11
|
+
* authority, and `describeBlokCatalog` turns it into the published manifest.
|
|
12
|
+
*/
|
|
13
|
+
/** What the web renderer draws: the ui@1, html@1 and logo@1 components and the inspector (scene@1 is `@arkitektio/bsx/scene`'s). */
|
|
14
|
+
export declare const webBlokComponents: readonly BlokComponentDefinition[];
|
|
15
|
+
/** A catalog over the base one (control flow) with `components`, published under `url`. */
|
|
16
|
+
export declare const composeBlokCatalog: (url: string, components: readonly BlokComponentDefinition[]) => BlokCatalog;
|
|
17
|
+
/** The web components alone: what a renderer draws when no app gave it a catalog. */
|
|
18
|
+
export declare const standardBlokCatalog: () => BlokCatalog;
|
|
19
|
+
/** The app's catalog, for every renderer below it. */
|
|
20
|
+
export declare const BlokCatalogProvider: ({ catalog, children }: {
|
|
21
|
+
catalog: BlokCatalog;
|
|
22
|
+
children?: React.ReactNode;
|
|
23
|
+
}) => React.JSX.Element;
|
|
24
|
+
/** The app's catalog when no provider says otherwise: the platform's, or the standard one. */
|
|
25
|
+
export declare const appBlokCatalog: () => BlokCatalog;
|
|
26
|
+
/** The catalog the app provides here, or the app's. */
|
|
27
|
+
export declare const useBlokCatalog: () => BlokCatalog;
|
|
28
|
+
/**
|
|
29
|
+
* Adds components a module brings (`ModuleBuiltins.bloks`) to the catalog, so
|
|
30
|
+
* everything that reads the app's catalog (the renderer, the registrar, the
|
|
31
|
+
* export) offers them. Called once, by the composition root that installs the
|
|
32
|
+
* modules; core never imports a module.
|
|
33
|
+
*
|
|
34
|
+
* A module may draw over a standard catalog's component (its own `Slider`):
|
|
35
|
+
* the module's is rendered, as the spec's `blok_view` says, and the validator
|
|
36
|
+
* warns `catalog.shadow` where a blok uses it. Any other name the catalog
|
|
37
|
+
* already holds (base's, the app's own, another module's) is refused, whoever
|
|
38
|
+
* brought it. Returns the undo, which puts a drawn-over component back (a dev
|
|
39
|
+
* hot reload installs the modules again).
|
|
40
|
+
*/
|
|
41
|
+
export declare const addBlokComponents: (components: readonly BlokComponentDefinition[], catalog: BlokCatalog) => (() => void);
|
|
42
|
+
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/renderer/catalog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,EAAoB,KAAK,WAAW,EAAE,KAAK,uBAAuB,EAAC,MAAM,WAAW,CAAC;AAE5F;;;;;;;;;GASG;AAEH,oIAAoI;AACpI,eAAO,MAAM,iBAAiB,EAAE,SAAS,uBAAuB,EAAyE,CAAC;AAE1I,2FAA2F;AAC3F,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,EAAE,YAAY,SAAS,uBAAuB,EAAE,KAAG,WACvC,CAAC;AAI3D,qFAAqF;AACrF,eAAO,MAAM,mBAAmB,QAAO,WAA6G,CAAC;AAIrJ,sDAAsD;AACtD,eAAO,MAAM,mBAAmB,GAAI,uBAAqB;IAAC,OAAO,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAC,sBAE1G,CAAC;AAEF,8FAA8F;AAC9F,eAAO,MAAM,cAAc,QAAO,WAA8D,CAAC;AAEjG,uDAAuD;AACvD,eAAO,MAAM,cAAc,QAAO,WAAuE,CAAC;AAQ1G;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,GAC5B,YAAY,SAAS,uBAAuB,EAAE,EAC9C,SAAS,WAAW,KACnB,CAAC,MAAM,IAAI,CA4Bb,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { RawInspector } from './bloks/inspector/Inspector.js';
|
|
4
|
+
import { logoBlokComponents } from './bloks/logo/index.js';
|
|
5
|
+
import { shadcnComposableComponents } from './bloks/index.js';
|
|
6
|
+
import { baseBlokCatalog } from './baseCatalog.js';
|
|
7
|
+
import { baseCatalog, standardCatalogs } from '../spec/catalogs.js';
|
|
8
|
+
import { moduleShadowsOf } from './modules.js';
|
|
9
|
+
import { blokPlatform } from '../platform.js';
|
|
10
|
+
import { extendBlokCatalog } from './runtime/index.js';
|
|
11
|
+
/**
|
|
12
|
+
* The catalog a blok payload is validated and rendered against: which
|
|
13
|
+
* components exist (what a blok may call is the language's own). Each app composes
|
|
14
|
+
* its own (`composeBlokCatalog`) from what this package draws and what the app
|
|
15
|
+
* brings, and hands it down with `BlokCatalogProvider`.
|
|
16
|
+
*
|
|
17
|
+
* The backend does not enumerate either -- `ComponentNode.component` and
|
|
18
|
+
* `UtilCall.operation` are free-form strings -- so the app's catalog is the
|
|
19
|
+
* authority, and `describeBlokCatalog` turns it into the published manifest.
|
|
20
|
+
*/
|
|
21
|
+
/** What the web renderer draws: the ui@1, html@1 and logo@1 components and the inspector (scene@1 is `@arkitektio/bsx/scene`'s). */
|
|
22
|
+
export const webBlokComponents = [...shadcnComposableComponents, ...logoBlokComponents, RawInspector];
|
|
23
|
+
/** A catalog over the base one (control flow) with `components`, published under `url`. */
|
|
24
|
+
export const composeBlokCatalog = (url, components) => extendBlokCatalog(baseBlokCatalog, url, [...components]);
|
|
25
|
+
let standard = null;
|
|
26
|
+
/** The web components alone: what a renderer draws when no app gave it a catalog. */
|
|
27
|
+
export const standardBlokCatalog = () => (standard ??= composeBlokCatalog('https://arkitekt.live/catalogs/v1.json', webBlokComponents));
|
|
28
|
+
const BlokCatalogContext = React.createContext(null);
|
|
29
|
+
/** The app's catalog, for every renderer below it. */
|
|
30
|
+
export const BlokCatalogProvider = ({ catalog, children }) => (_jsx(BlokCatalogContext.Provider, { value: catalog, children: children }));
|
|
31
|
+
/** The app's catalog when no provider says otherwise: the platform's, or the standard one. */
|
|
32
|
+
export const appBlokCatalog = () => blokPlatform().catalog ?? standardBlokCatalog();
|
|
33
|
+
/** The catalog the app provides here, or the app's. */
|
|
34
|
+
export const useBlokCatalog = () => React.useContext(BlokCatalogContext) ?? appBlokCatalog();
|
|
35
|
+
/** The names a standard catalog (`ui@1`, `scene@1`, ...) defines and base does not: what a module may draw over. */
|
|
36
|
+
const shadowableNames = () => {
|
|
37
|
+
const base = new Set(baseCatalog().components.map(component => component.name));
|
|
38
|
+
return new Set(standardCatalogs().flatMap(catalog => catalog.components.map(component => component.name)).filter(name => !base.has(name)));
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Adds components a module brings (`ModuleBuiltins.bloks`) to the catalog, so
|
|
42
|
+
* everything that reads the app's catalog (the renderer, the registrar, the
|
|
43
|
+
* export) offers them. Called once, by the composition root that installs the
|
|
44
|
+
* modules; core never imports a module.
|
|
45
|
+
*
|
|
46
|
+
* A module may draw over a standard catalog's component (its own `Slider`):
|
|
47
|
+
* the module's is rendered, as the spec's `blok_view` says, and the validator
|
|
48
|
+
* warns `catalog.shadow` where a blok uses it. Any other name the catalog
|
|
49
|
+
* already holds (base's, the app's own, another module's) is refused, whoever
|
|
50
|
+
* brought it. Returns the undo, which puts a drawn-over component back (a dev
|
|
51
|
+
* hot reload installs the modules again).
|
|
52
|
+
*/
|
|
53
|
+
export const addBlokComponents = (components, catalog) => {
|
|
54
|
+
const shadowable = shadowableNames();
|
|
55
|
+
const shadows = moduleShadowsOf(catalog);
|
|
56
|
+
const taken = components.filter(component => catalog.components.has(component.name) && (!shadowable.has(component.name) || shadows.has(component.name)));
|
|
57
|
+
if (taken.length > 0) {
|
|
58
|
+
throw new Error(`Blok components already in the catalog: ${taken.map(component => component.name).join(', ')}`);
|
|
59
|
+
}
|
|
60
|
+
const previous = new Map();
|
|
61
|
+
for (const component of components) {
|
|
62
|
+
const drawnOver = catalog.components.get(component.name);
|
|
63
|
+
if (drawnOver) {
|
|
64
|
+
previous.set(component.name, drawnOver);
|
|
65
|
+
shadows.add(component.name);
|
|
66
|
+
}
|
|
67
|
+
catalog.components.set(component.name, component);
|
|
68
|
+
}
|
|
69
|
+
return () => {
|
|
70
|
+
for (const component of components) {
|
|
71
|
+
if (catalog.components.get(component.name) !== component)
|
|
72
|
+
continue;
|
|
73
|
+
const restored = previous.get(component.name);
|
|
74
|
+
if (restored) {
|
|
75
|
+
catalog.components.set(component.name, restored);
|
|
76
|
+
shadows.delete(component.name);
|
|
77
|
+
}
|
|
78
|
+
else
|
|
79
|
+
catalog.components.delete(component.name);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/renderer/catalog.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAC,kBAAkB,EAAC,MAAM,cAAc,CAAC;AAChD,OAAO,EAAC,0BAA0B,EAAC,MAAM,SAAS,CAAC;AACnD,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAC,WAAW,EAAE,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAC,eAAe,EAAC,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AACzC,OAAO,EAAC,iBAAiB,EAAiD,MAAM,WAAW,CAAC;AAE5F;;;;;;;;;GASG;AAEH,oIAAoI;AACpI,MAAM,CAAC,MAAM,iBAAiB,GAAuC,CAAC,GAAG,0BAA0B,EAAE,GAAG,kBAAkB,EAAE,YAAY,CAAC,CAAC;AAE1I,2FAA2F;AAC3F,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,GAAW,EAAE,UAA8C,EAAe,EAAE,CAC7G,iBAAiB,CAAC,eAAe,EAAE,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;AAE3D,IAAI,QAAQ,GAAuB,IAAI,CAAC;AAExC,qFAAqF;AACrF,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,SAAS;YACnE,MAAM,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YAC9C,IAAI,QAAQ,EAAE,CAAC;gBACb,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;gBACjD,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACjC,CAAC;;gBAAM,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACnD,CAAC;IACH,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { type BlokScopeLocal } from '../bsx/references';
|
|
2
|
+
import type { BlokLocal, BlokLocalChoice } from './persist';
|
|
3
|
+
import { type BlokComponentNode, type BlokQuery, type BlokSourceStatus, type BlokSubscription, type BlokTaskRecord } from './runtime';
|
|
4
|
+
/**
|
|
5
|
+
* What a v2 blok declares beside its tree, as a host gets it from the server
|
|
6
|
+
* (`Blok`/`BlokRevision`: `vocab`, `resolvedLocals`, `demo`, `queries`,
|
|
7
|
+
* `subscriptions`), and the data model a renderer starts from.
|
|
8
|
+
*
|
|
9
|
+
* The roots a blok reads (vocabulary `roots.data`) are laid out as:
|
|
10
|
+
*
|
|
11
|
+
* {
|
|
12
|
+
* deps: {<key>: {<state>: ..., tasks: {<action>: TaskRecord}, assets: {...}, id, name}},
|
|
13
|
+
* args: {...}, task: TaskRecord, viewer: {...}, then: null | "...",
|
|
14
|
+
* queries: {<name>: {status, value, error, refetching, fetching_more}},
|
|
15
|
+
* subscriptions: {<name>: {status, value, error}},
|
|
16
|
+
* <local>: value, <into name>: TaskRecord,
|
|
17
|
+
* }
|
|
18
|
+
*
|
|
19
|
+
* `self` reads `deps.self`.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* A local as its tree resolves it (`resolvedLocals`): an arg port (`ArgPort`
|
|
23
|
+
* fields) plus `persist`, its kind always said (inferred where the blok left
|
|
24
|
+
* it out, ANY when nothing tells). A renderer never types a local with the
|
|
25
|
+
* as-written `locals`, whose kind may be missing.
|
|
26
|
+
*/
|
|
27
|
+
export type BlokDeclaredLocal = {
|
|
28
|
+
key: string;
|
|
29
|
+
kind: string;
|
|
30
|
+
identifier?: string | null;
|
|
31
|
+
nullable?: boolean | null;
|
|
32
|
+
default?: unknown;
|
|
33
|
+
children?: readonly BlokDeclaredLocalPort[] | null;
|
|
34
|
+
choices?: readonly BlokLocalChoice[] | null;
|
|
35
|
+
label?: string | null;
|
|
36
|
+
description?: string | null;
|
|
37
|
+
persist?: boolean | null;
|
|
38
|
+
};
|
|
39
|
+
/** A child port of a local (a list's item, a dict's or model's fields). */
|
|
40
|
+
export type BlokDeclaredLocalPort = Omit<BlokDeclaredLocal, 'persist'>;
|
|
41
|
+
export type BlokDeclaredRead = {
|
|
42
|
+
key: string;
|
|
43
|
+
service: string;
|
|
44
|
+
document: string;
|
|
45
|
+
/** Stored call arguments, as the wire carries them (camelCase or snake_case). */
|
|
46
|
+
variables?: unknown;
|
|
47
|
+
poll?: number | null;
|
|
48
|
+
/** A query's list field that `fetch_more` appends to (a dotted path). */
|
|
49
|
+
more?: string | null;
|
|
50
|
+
keep?: number | null;
|
|
51
|
+
history?: string | null;
|
|
52
|
+
};
|
|
53
|
+
export type BlokDeclarations = {
|
|
54
|
+
vocab?: number | null;
|
|
55
|
+
/** The locals as the tree resolves them: what the renderer types them with. */
|
|
56
|
+
resolvedLocals: readonly BlokDeclaredLocal[];
|
|
57
|
+
demo?: unknown;
|
|
58
|
+
queries?: readonly BlokDeclaredRead[] | null;
|
|
59
|
+
subscriptions?: readonly BlokDeclaredRead[] | null;
|
|
60
|
+
};
|
|
61
|
+
export declare const declaredLocals: (declarations: BlokDeclarations) => BlokLocal[];
|
|
62
|
+
export declare const declaredQueries: (declarations: BlokDeclarations) => BlokQuery[];
|
|
63
|
+
export declare const declaredSubscriptions: (declarations: BlokDeclarations) => BlokSubscription[];
|
|
64
|
+
/** Each declared local at its default. */
|
|
65
|
+
export declare const localsModel: (locals: readonly BlokLocal[]) => Record<string, unknown>;
|
|
66
|
+
/** The names `into` gives a task call's record, in the tree. */
|
|
67
|
+
export declare const intoNames: (roots: ReadonlyArray<unknown>) => string[];
|
|
68
|
+
/** Every `into` record before its call ran: idle. */
|
|
69
|
+
export declare const intoModel: (roots: ReadonlyArray<unknown>) => Record<string, BlokTaskRecord>;
|
|
70
|
+
/** What a renderer shows live before anything synced: locals, idle `into` records, pending reads. */
|
|
71
|
+
export declare const liveModel: (roots: ReadonlyArray<unknown>, declarations: BlokDeclarations) => {
|
|
72
|
+
data: Record<string, unknown>;
|
|
73
|
+
statuses: Record<string, BlokSourceStatus>;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* What a preview renders: the blok's `demo`, mirroring the roots
|
|
77
|
+
* (`{deps, args, task, queries, subscriptions}`), with every declared read
|
|
78
|
+
* answered by its demo value. Nothing is pending in a preview.
|
|
79
|
+
*/
|
|
80
|
+
export declare const demoModel: (roots: ReadonlyArray<unknown>, declarations: BlokDeclarations) => Record<string, unknown>;
|
|
81
|
+
/**
|
|
82
|
+
* What a service serves of a blok's declarations as JSON (kabinet's `locals`,
|
|
83
|
+
* `queries`, ...: snake_case values). Its `locals` are as the app wrote them
|
|
84
|
+
* (a kind may be left out), so they are resolved here against its tree.
|
|
85
|
+
*/
|
|
86
|
+
export type BlokDeclarationsJson = {
|
|
87
|
+
vocab?: number | null;
|
|
88
|
+
componentTree?: unknown;
|
|
89
|
+
locals?: unknown;
|
|
90
|
+
demo?: unknown;
|
|
91
|
+
queries?: unknown;
|
|
92
|
+
subscriptions?: unknown;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Locals as written, resolved against the tree the way the spec and the
|
|
96
|
+
* server resolve them (`resolveBlokScope`: default, task argument, bind, else
|
|
97
|
+
* ANY); a given kind is kept.
|
|
98
|
+
*/
|
|
99
|
+
export declare const resolveWrittenLocals: (roots: readonly BlokComponentNode[], locals: readonly BlokScopeLocal[]) => BlokDeclaredLocal[];
|
|
100
|
+
/** A blok's declarations from JSON a service serves, keeping only well-formed entries. */
|
|
101
|
+
export declare const parseBlokDeclarations: (raw: BlokDeclarationsJson) => BlokDeclarations;
|
|
102
|
+
//# sourceMappingURL=declarations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declarations.d.ts","sourceRoot":"","sources":["../../src/renderer/declarations.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAGtE,OAAO,KAAK,EAAC,SAAS,EAAE,eAAe,EAAgB,MAAM,WAAW,CAAC;AACzE,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAEd,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EAErB,KAAK,cAAc,EACpB,MAAM,WAAW,CAAC;AAEnB;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,qBAAqB,EAAE,GAAG,IAAI,CAAC;IACnD,OAAO,CAAC,EAAE,SAAS,eAAe,EAAE,GAAG,IAAI,CAAC;IAC5C,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC1B,CAAC;AAEF,2EAA2E;AAC3E,MAAM,MAAM,qBAAqB,GAAG,IAAI,C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