@vibecook/ice 0.11.0 → 0.15.0-desk.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 +79 -50
- package/dist/chunk-AMMFQP2C.js +2444 -0
- package/dist/chunk-AMMFQP2C.js.map +1 -0
- package/dist/chunk-BKV4ZEU3.js +1 -0
- package/dist/chunk-BKV4ZEU3.js.map +1 -0
- package/dist/chunk-ENIFIUEP.js +155 -0
- package/dist/chunk-ENIFIUEP.js.map +1 -0
- package/dist/chunk-H3SKYJLK.js +8269 -0
- package/dist/chunk-H3SKYJLK.js.map +1 -0
- package/dist/{chunk-OR5FNVUE.js → chunk-JS6PG6YD.js} +398 -167
- package/dist/chunk-JS6PG6YD.js.map +1 -0
- package/dist/{chunk-VGVDJZSP.js → chunk-PFJN3XN2.js} +13232 -7388
- package/dist/chunk-PFJN3XN2.js.map +1 -0
- package/dist/chunk-QXOCF56A.js +148 -0
- package/dist/chunk-QXOCF56A.js.map +1 -0
- package/dist/chunk-U4YMA4TJ.js +635 -0
- package/dist/chunk-U4YMA4TJ.js.map +1 -0
- package/dist/desk-engine.js +36 -0
- package/dist/desk-engine.js.map +1 -0
- package/dist/desk-kit.js +244 -0
- package/dist/desk-kit.js.map +1 -0
- package/dist/desk-objects.js +12734 -0
- package/dist/desk-objects.js.map +1 -0
- package/dist/desk.js +497 -0
- package/dist/desk.js.map +1 -0
- package/dist/devtools.js +233 -189
- package/dist/devtools.js.map +1 -1
- package/dist/dom.js +7 -19
- package/dist/index.js +232 -20
- package/dist/kernel.js +53 -25
- package/dist/react.js +1047 -38
- package/dist/react.js.map +1 -1
- package/dist/types/packages/core/src/behavior/define-behavior.d.ts +11 -0
- package/dist/types/packages/core/src/behavior/runtime.d.ts +4 -0
- package/dist/types/packages/core/src/canvas/define-canvas-type.d.ts +86 -0
- package/dist/types/packages/core/src/canvas/define-container.d.ts +17 -0
- package/dist/types/packages/core/src/canvas/diagnostics.d.ts +27 -0
- package/dist/types/packages/core/src/canvas/engine-catalog.d.ts +70 -0
- package/dist/types/packages/core/src/canvas/extensions.d.ts +125 -0
- package/dist/types/packages/core/src/canvas/frame-behavior-host.d.ts +16 -0
- package/dist/types/packages/core/src/canvas/frame-preview.d.ts +79 -0
- package/dist/types/packages/core/src/canvas/frame-projection.d.ts +38 -0
- package/dist/types/packages/core/src/canvas/frame-view.d.ts +36 -0
- package/dist/types/packages/core/src/canvas/migrate.d.ts +14 -0
- package/dist/types/packages/core/src/canvas/placement.d.ts +30 -0
- package/dist/types/packages/core/src/canvas/presentation-transition.d.ts +100 -0
- package/dist/types/packages/core/src/canvas/runtime-extension-host.d.ts +16 -0
- package/dist/types/packages/core/src/canvas/session.d.ts +47 -0
- package/dist/types/packages/core/src/catalog/camera-derived.d.ts +16 -27
- package/dist/types/packages/core/src/catalog/desk.d.ts +326 -0
- package/dist/types/packages/core/src/catalog/gesture.d.ts +51 -0
- package/dist/types/packages/core/src/catalog/graph.d.ts +2 -2
- package/dist/types/packages/core/src/catalog/index.d.ts +2 -0
- package/dist/types/packages/core/src/catalog/pointer.d.ts +42 -0
- package/dist/types/packages/core/src/catalog/selection-presence.d.ts +7 -0
- package/dist/types/packages/core/src/catalog/settings-resources.d.ts +28 -2
- package/dist/types/packages/core/src/catalog/surface.d.ts +1 -0
- package/dist/types/packages/core/src/doc/doc-commit-sink.d.ts +18 -2
- package/dist/types/packages/core/src/doc/doc-kit.d.ts +21 -2
- package/dist/types/packages/core/src/doc/envelope.d.ts +5 -2
- package/dist/types/packages/core/src/doc/schema-migrate.d.ts +1 -1
- package/dist/types/packages/core/src/doc/version-gate.d.ts +21 -3
- package/dist/types/packages/core/src/engine/commit-sink.d.ts +10 -1
- package/dist/types/packages/core/src/engine/engine.d.ts +6 -0
- package/dist/types/packages/core/src/engine/frame-control.d.ts +74 -0
- package/dist/types/packages/core/src/engine/guests.d.ts +4 -1
- package/dist/types/packages/core/src/engine/world-doors.d.ts +12 -0
- package/dist/types/packages/core/src/facade/create-canvas-engine.d.ts +146 -13
- package/dist/types/packages/core/src/index.d.ts +33 -12
- package/dist/types/packages/core/src/input/queue.d.ts +3 -1
- package/dist/types/packages/core/src/interaction/install.d.ts +36 -0
- package/dist/types/packages/core/src/interaction/wakes.d.ts +24 -0
- package/dist/types/packages/core/src/nav/nav-geometry.d.ts +100 -0
- package/dist/types/packages/core/src/nav/nested-canvas.d.ts +47 -4
- package/dist/types/packages/core/src/ops/cascade.d.ts +2 -1
- package/dist/types/packages/core/src/ops/claims.d.ts +6 -0
- package/dist/types/packages/core/src/ops/insert.d.ts +4 -0
- package/dist/types/packages/core/src/ops/point-pick.d.ts +4 -1
- package/dist/types/packages/core/src/ops/sibling-order.d.ts +14 -4
- package/dist/types/packages/core/src/ops/tray.d.ts +48 -0
- package/dist/types/packages/core/src/presence/presence-kit.d.ts +5 -0
- package/dist/types/packages/core/src/schema/meta.d.ts +10 -0
- package/dist/types/packages/core/src/schema/prefab.d.ts +8 -0
- package/dist/types/packages/core/src/settings/defaults.d.ts +25 -6
- package/dist/types/packages/core/src/surface/gpu-device.d.ts +55 -0
- package/dist/types/packages/core/src/systems/camera-sim.d.ts +29 -0
- package/dist/types/packages/core/src/systems/chrome.d.ts +15 -23
- package/dist/types/packages/core/src/systems/drag-mods.d.ts +34 -0
- package/dist/types/packages/core/src/systems/held.d.ts +73 -0
- package/dist/types/packages/core/src/systems/insert-ghost.d.ts +2 -0
- package/dist/types/packages/core/src/systems/l0-input.d.ts +14 -0
- package/dist/types/packages/core/src/systems/l1-pick.d.ts +53 -1
- package/dist/types/packages/core/src/systems/l2-arbitrate.d.ts +18 -4
- package/dist/types/packages/core/src/systems/l2-recognize.d.ts +3 -1
- package/dist/types/packages/core/src/systems/l3-behave.d.ts +4 -1
- package/dist/types/packages/core/src/systems/l3-claim.d.ts +7 -0
- package/dist/types/packages/core/src/systems/l3-connect.d.ts +1 -1
- package/dist/types/packages/core/src/systems/l3-drop.d.ts +30 -1
- package/dist/types/packages/core/src/systems/l3-marquee.d.ts +2 -1
- package/dist/types/packages/core/src/systems/l3-ports.d.ts +1 -1
- package/dist/types/packages/core/src/systems/l4-cursor.d.ts +5 -0
- package/dist/types/packages/core/src/systems/nav-flight.d.ts +85 -3
- package/dist/types/packages/core/src/systems/nav-tap.d.ts +44 -0
- package/dist/types/packages/core/src/systems/press-button.d.ts +25 -0
- package/dist/types/packages/core/src/systems/press-wheel.d.ts +11 -0
- package/dist/types/packages/core/src/systems/tray.d.ts +111 -0
- package/dist/types/packages/core/src/systems/zoom-through.d.ts +30 -0
- package/dist/types/packages/core/src/tools/define-tool.d.ts +10 -0
- package/dist/types/packages/core/src/widget/define-widget.d.ts +166 -63
- package/dist/types/packages/core/src/widget/equip.d.ts +14 -2
- package/dist/types/packages/core/src/widget/held-tools.d.ts +83 -0
- package/dist/types/packages/core/src/widget/menu-actions.d.ts +44 -0
- package/dist/types/packages/core/src/widget/mount-store.d.ts +21 -46
- package/dist/types/packages/core/src/widget/spawn.d.ts +1 -1
- package/dist/types/packages/desk/src/assets/blue-noise.gen.d.ts +10 -0
- package/dist/types/packages/desk/src/card/card.d.ts +103 -0
- package/dist/types/packages/desk/src/compose/ambient.d.ts +59 -0
- package/dist/types/packages/desk/src/compose/builder.d.ts +306 -0
- package/dist/types/packages/desk/src/compose/children.d.ts +3 -0
- package/dist/types/packages/desk/src/compose/index.d.ts +14 -0
- package/dist/types/packages/desk/src/compose/marks.d.ts +133 -0
- package/dist/types/packages/desk/src/compose/pick.d.ts +5 -0
- package/dist/types/packages/desk/src/compose/reflector.d.ts +120 -0
- package/dist/types/packages/desk/src/compose/tap.d.ts +5 -0
- package/dist/types/packages/desk/src/docs.d.ts +23 -0
- package/dist/types/packages/desk/src/engine/budget.d.ts +43 -0
- package/dist/types/packages/desk/src/engine/device.d.ts +54 -0
- package/dist/types/packages/desk/src/engine/index.d.ts +5 -0
- package/dist/types/packages/desk/src/engine/pipeline.d.ts +36 -0
- package/dist/types/packages/desk/src/engine/rasters.d.ts +66 -0
- package/dist/types/packages/desk/src/engine/records.d.ts +56 -0
- package/dist/types/packages/desk/src/engine/shader.d.ts +22 -0
- package/dist/types/packages/desk/src/engine/struct.d.ts +39 -0
- package/dist/types/packages/desk/src/engine/target.d.ts +26 -0
- package/dist/types/packages/desk/src/faults.d.ts +38 -0
- package/dist/types/packages/desk/src/gpu-ablation.d.ts +61 -0
- package/dist/types/packages/desk/src/gpu-memory.d.ts +54 -0
- package/dist/types/packages/desk/src/gpu-profiler.d.ts +141 -0
- package/dist/types/packages/desk/src/gpu-wrap.d.ts +8 -0
- package/dist/types/packages/desk/src/ground.d.ts +537 -0
- package/dist/types/packages/desk/src/hold/focus.d.ts +53 -0
- package/dist/types/packages/desk/src/hold/pose.d.ts +152 -0
- package/dist/types/packages/desk/src/hold/shaders.d.ts +9 -0
- package/dist/types/packages/desk/src/host/editor.d.ts +18 -0
- package/dist/types/packages/desk/src/host/index.d.ts +9 -0
- package/dist/types/packages/desk/src/host/ink.d.ts +18 -0
- package/dist/types/packages/desk/src/host/layer.d.ts +536 -0
- package/dist/types/packages/desk/src/host/picture.d.ts +2 -0
- package/dist/types/packages/desk/src/host/surface.d.ts +5 -0
- package/dist/types/packages/desk/src/index.d.ts +16 -0
- package/dist/types/packages/desk/src/kind.d.ts +189 -0
- package/dist/types/packages/desk/src/kinds/world.d.ts +447 -0
- package/dist/types/packages/desk/src/kit/arrays.d.ts +88 -0
- package/dist/types/packages/desk/src/kit/blobs.d.ts +40 -0
- package/dist/types/packages/desk/src/kit/book.d.ts +2 -0
- package/dist/types/packages/desk/src/kit/editor.d.ts +105 -0
- package/dist/types/packages/desk/src/kit/eye.d.ts +37 -0
- package/dist/types/packages/desk/src/kit/hold.d.ts +1 -0
- package/dist/types/packages/desk/src/kit/index.d.ts +26 -0
- package/dist/types/packages/desk/src/kit/inside.d.ts +116 -0
- package/dist/types/packages/desk/src/kit/layer.d.ts +159 -0
- package/dist/types/packages/desk/src/kit/light.d.ts +3 -0
- package/dist/types/packages/desk/src/kit/mesh.d.ts +29 -0
- package/dist/types/packages/desk/src/kit/mips.d.ts +2 -0
- package/dist/types/packages/desk/src/kit/nav.d.ts +2 -0
- package/dist/types/packages/desk/src/kit/paper-tex.d.ts +5 -0
- package/dist/types/packages/desk/src/kit/physics.d.ts +44 -0
- package/dist/types/packages/desk/src/kit/place.d.ts +44 -0
- package/dist/types/packages/desk/src/kit/print.d.ts +30 -0
- package/dist/types/packages/desk/src/kit/raster.d.ts +34 -0
- package/dist/types/packages/desk/src/kit/sdf.d.ts +1 -0
- package/dist/types/packages/desk/src/kit/seeds.d.ts +11 -0
- package/dist/types/packages/desk/src/kit/services.d.ts +34 -0
- package/dist/types/packages/desk/src/kit/springs.d.ts +12 -0
- package/dist/types/packages/desk/src/kit/strokes.d.ts +93 -0
- package/dist/types/packages/desk/src/kit/text.d.ts +142 -0
- package/dist/types/packages/desk/src/kit/uniform.d.ts +8 -0
- package/dist/types/packages/desk/src/kit/view.d.ts +39 -0
- package/dist/types/packages/desk/src/kit/wgsl.d.ts +15 -0
- package/dist/types/packages/desk/src/lattice/line.d.ts +15 -0
- package/dist/types/packages/desk/src/lattice/lod.d.ts +52 -0
- package/dist/types/packages/desk/src/lattice/ruler.d.ts +88 -0
- package/dist/types/packages/desk/src/marks/assemble.d.ts +65 -0
- package/dist/types/packages/desk/src/marks/ease.d.ts +4 -0
- package/dist/types/packages/desk/src/marks/laser.d.ts +41 -0
- package/dist/types/packages/desk/src/marks/layout.d.ts +167 -0
- package/dist/types/packages/desk/src/marks/pass.d.ts +59 -0
- package/dist/types/packages/desk/src/marks/shaders.d.ts +12 -0
- package/dist/types/packages/desk/src/mat/grid.d.ts +50 -0
- package/dist/types/packages/desk/src/mat/lamp.d.ts +14 -0
- package/dist/types/packages/desk/src/mat/layout.d.ts +144 -0
- package/dist/types/packages/desk/src/mat/mat-pass.d.ts +83 -0
- package/dist/types/packages/desk/src/mat/night.d.ts +95 -0
- package/dist/types/packages/desk/src/mat/projector.d.ts +39 -0
- package/dist/types/packages/desk/src/mat/shaders.d.ts +17 -0
- package/dist/types/packages/desk/src/mat/tilt.d.ts +14 -0
- package/dist/types/packages/desk/src/missing/layout.d.ts +27 -0
- package/dist/types/packages/desk/src/missing/object.d.ts +6 -0
- package/dist/types/packages/desk/src/missing/pass.d.ts +39 -0
- package/dist/types/packages/desk/src/missing/shaders.d.ts +7 -0
- package/dist/types/packages/desk/src/missing/slots.d.ts +8 -0
- package/dist/types/packages/desk/src/nav/flight.d.ts +186 -0
- package/dist/types/packages/desk/src/nav/portal.d.ts +95 -0
- package/dist/types/packages/desk/src/object.d.ts +46 -0
- package/dist/types/packages/desk/src/pass-instrument.d.ts +89 -0
- package/dist/types/packages/desk/src/shaders.d.ts +12 -0
- package/dist/types/packages/desk/src/shaders.gen.d.ts +17 -0
- package/dist/types/packages/desk/src/submit-instrument.d.ts +36 -0
- package/dist/types/packages/desk/src/theme.d.ts +497 -0
- package/dist/types/packages/desk/src/tray/carry.d.ts +99 -0
- package/dist/types/packages/desk/src/tray/drawer.d.ts +124 -0
- package/dist/types/packages/desk/src/tray/flux.d.ts +49 -0
- package/dist/types/packages/desk/src/tray/index.d.ts +4 -0
- package/dist/types/packages/desk/src/tray/lattice.d.ts +71 -0
- package/dist/types/packages/desk/src/tray/layout.d.ts +7 -0
- package/dist/types/packages/desk/src/tray/look.d.ts +29 -0
- package/dist/types/packages/desk/src/tray/pass.d.ts +101 -0
- package/dist/types/packages/desk/src/tray/shaders.d.ts +10 -0
- package/dist/types/packages/desk/src/tray/specimens.d.ts +214 -0
- package/dist/types/packages/devtools/src/attach.d.ts +22 -8
- package/dist/types/packages/devtools/src/dock.d.ts +18 -14
- package/dist/types/packages/devtools/src/gpu-panel.d.ts +105 -0
- package/dist/types/packages/devtools/src/index.d.ts +5 -4
- package/dist/types/packages/dom/src/desk-host.d.ts +104 -0
- package/dist/types/packages/dom/src/host.d.ts +13 -14
- package/dist/types/packages/dom/src/index.d.ts +12 -10
- package/dist/types/packages/dom/src/loop.d.ts +18 -1
- package/dist/types/packages/dom/src/pointer-adapter.d.ts +11 -29
- package/dist/types/packages/dom/src/widget-focus.d.ts +17 -13
- package/dist/types/packages/ice/src/desk-engine.d.ts +2 -0
- package/dist/types/packages/ice/src/desk-kit.d.ts +6 -0
- package/dist/types/packages/ice/src/desk-objects.d.ts +5 -0
- package/dist/types/packages/ice/src/desk.d.ts +5 -0
- package/dist/types/packages/kernel/src/atlas-pack.d.ts +157 -0
- package/dist/types/packages/kernel/src/bezier.d.ts +0 -15
- package/dist/types/packages/kernel/src/coords.d.ts +0 -39
- package/dist/types/packages/kernel/src/index.d.ts +2 -2
- package/dist/types/packages/kernel/src/nav-flight.d.ts +6 -0
- package/dist/types/packages/kernel/src/tray.d.ts +155 -0
- package/dist/types/packages/objects/src/board/board-pass.d.ts +180 -0
- package/dist/types/packages/objects/src/board/board-pen.d.ts +36 -0
- package/dist/types/packages/objects/src/board/board.d.ts +104 -0
- package/dist/types/packages/objects/src/board/data.d.ts +31 -0
- package/dist/types/packages/objects/src/board/history.d.ts +33 -0
- package/dist/types/packages/objects/src/board/kind.d.ts +208 -0
- package/dist/types/packages/objects/src/board/layout.d.ts +102 -0
- package/dist/types/packages/objects/src/board/object.d.ts +7 -0
- package/dist/types/packages/objects/src/board/pen.d.ts +71 -0
- package/dist/types/packages/objects/src/board/shaders.d.ts +36 -0
- package/dist/types/packages/objects/src/board/stroke.d.ts +99 -0
- package/dist/types/packages/objects/src/board/theme.d.ts +150 -0
- package/dist/types/packages/objects/src/calendar/data.d.ts +97 -0
- package/dist/types/packages/objects/src/calendar/events.d.ts +58 -0
- package/dist/types/packages/objects/src/calendar/hand.d.ts +53 -0
- package/dist/types/packages/objects/src/calendar/host/input.d.ts +67 -0
- package/dist/types/packages/objects/src/calendar/host/print.d.ts +9 -0
- package/dist/types/packages/objects/src/calendar/kind.d.ts +297 -0
- package/dist/types/packages/objects/src/calendar/law.d.ts +151 -0
- package/dist/types/packages/objects/src/calendar/layout.d.ts +47 -0
- package/dist/types/packages/objects/src/calendar/month.d.ts +75 -0
- package/dist/types/packages/objects/src/calendar/object.d.ts +45 -0
- package/dist/types/packages/objects/src/calendar/pad.d.ts +42 -0
- package/dist/types/packages/objects/src/calendar/pass.d.ts +229 -0
- package/dist/types/packages/objects/src/calendar/print.d.ts +87 -0
- package/dist/types/packages/objects/src/calendar/printing.d.ts +80 -0
- package/dist/types/packages/objects/src/calendar/roll.d.ts +45 -0
- package/dist/types/packages/objects/src/calendar/shaders.d.ts +12 -0
- package/dist/types/packages/objects/src/calendar/sheet.d.ts +43 -0
- package/dist/types/packages/objects/src/calendar/tiles.d.ts +67 -0
- package/dist/types/packages/objects/src/calendar/turn.d.ts +73 -0
- package/dist/types/packages/objects/src/calendar/writing.d.ts +42 -0
- package/dist/types/packages/objects/src/index.d.ts +22 -0
- package/dist/types/packages/objects/src/kinds.d.ts +24 -0
- package/dist/types/packages/objects/src/minimat/inside.d.ts +17 -0
- package/dist/types/packages/objects/src/minimat/kind.d.ts +51 -0
- package/dist/types/packages/objects/src/minimat/layout.d.ts +83 -0
- package/dist/types/packages/objects/src/minimat/minimat.d.ts +179 -0
- package/dist/types/packages/objects/src/minimat/object.d.ts +8 -0
- package/dist/types/packages/objects/src/minimat/pass.d.ts +61 -0
- package/dist/types/packages/objects/src/minimat/shaders.d.ts +10 -0
- package/dist/types/packages/objects/src/minimat/theme.d.ts +98 -0
- package/dist/types/packages/objects/src/notebook/ink.d.ts +70 -0
- package/dist/types/packages/objects/src/notebook/kind.d.ts +236 -0
- package/dist/types/packages/objects/src/notebook/law.d.ts +129 -0
- package/dist/types/packages/objects/src/notebook/layout.d.ts +46 -0
- package/dist/types/packages/objects/src/notebook/leaf.d.ts +44 -0
- package/dist/types/packages/objects/src/notebook/mesh.d.ts +20 -0
- package/dist/types/packages/objects/src/notebook/motion.d.ts +107 -0
- package/dist/types/packages/objects/src/notebook/object.d.ts +8 -0
- package/dist/types/packages/objects/src/notebook/pages.d.ts +56 -0
- package/dist/types/packages/objects/src/notebook/pass.d.ts +197 -0
- package/dist/types/packages/objects/src/notebook/pick.d.ts +30 -0
- package/dist/types/packages/objects/src/notebook/raster.d.ts +28 -0
- package/dist/types/packages/objects/src/notebook/shaders.d.ts +11 -0
- package/dist/types/packages/objects/src/notebook/shape.d.ts +155 -0
- package/dist/types/packages/objects/src/notebook/theme.d.ts +76 -0
- package/dist/types/packages/objects/src/palette.d.ts +577 -0
- package/dist/types/packages/objects/src/paper/host/body.d.ts +30 -0
- package/dist/types/packages/objects/src/paper/kind.d.ts +81 -0
- package/dist/types/packages/objects/src/paper/layout.d.ts +73 -0
- package/dist/types/packages/objects/src/paper/object.d.ts +31 -0
- package/dist/types/packages/objects/src/paper/pages.d.ts +43 -0
- package/dist/types/packages/objects/src/paper/paper-pass.d.ts +86 -0
- package/dist/types/packages/objects/src/paper/paper.d.ts +117 -0
- package/dist/types/packages/objects/src/paper/shaders.d.ts +18 -0
- package/dist/types/packages/objects/src/paper/theme.d.ts +58 -0
- package/dist/types/packages/objects/src/paper/typing.d.ts +51 -0
- package/dist/types/packages/objects/src/paper/writing.d.ts +161 -0
- package/dist/types/packages/objects/src/photo/carry.d.ts +33 -0
- package/dist/types/packages/objects/src/photo/kind.d.ts +136 -0
- package/dist/types/packages/objects/src/photo/layout.d.ts +39 -0
- package/dist/types/packages/objects/src/photo/object.d.ts +5 -0
- package/dist/types/packages/objects/src/photo/photo-pass.d.ts +104 -0
- package/dist/types/packages/objects/src/photo/photo.d.ts +262 -0
- package/dist/types/packages/objects/src/photo/pictures.d.ts +152 -0
- package/dist/types/packages/objects/src/photo/sample.d.ts +9 -0
- package/dist/types/packages/objects/src/photo/shaders.d.ts +18 -0
- package/dist/types/packages/objects/src/preset.d.ts +44 -0
- package/dist/types/packages/objects/src/shaders.d.ts +3 -0
- package/dist/types/packages/objects/src/shaders.gen.d.ts +21 -0
- package/dist/types/packages/react/src/canvas-hooks.d.ts +12 -0
- package/dist/types/packages/react/src/desk.d.ts +56 -0
- package/dist/types/packages/react/src/engine-context.d.ts +2 -2
- package/dist/types/packages/react/src/frame-preview-boundary.d.ts +19 -0
- package/dist/types/packages/react/src/hooks.d.ts +9 -14
- package/dist/types/packages/react/src/index.d.ts +16 -9
- package/dist/types/packages/react/src/keymap.d.ts +21 -2
- package/dist/types/packages/react/src/selection-menu.d.ts +174 -0
- package/dist/types/packages/react/src/tray-bar.d.ts +124 -0
- package/package.json +64 -31
- package/dist/chunk-2TNVB2ON.js +0 -1163
- package/dist/chunk-2TNVB2ON.js.map +0 -1
- package/dist/chunk-OR5FNVUE.js.map +0 -1
- package/dist/chunk-Q665T4L7.js +0 -681
- package/dist/chunk-Q665T4L7.js.map +0 -1
- package/dist/chunk-VGVDJZSP.js.map +0 -1
- package/dist/ground.js +0 -1108
- package/dist/ground.js.map +0 -1
- package/dist/r3f.js +0 -1644
- package/dist/r3f.js.map +0 -1
- package/dist/types/packages/core/src/input/measure-queue.d.ts +0 -30
- package/dist/types/packages/core/src/settings/ground-config.d.ts +0 -101
- package/dist/types/packages/core/src/systems/measure-ingest.d.ts +0 -26
- package/dist/types/packages/devtools/src/gl-panel.d.ts +0 -69
- package/dist/types/packages/dom/src/measure-adapter.d.ts +0 -31
- package/dist/types/packages/dom/src/measure-wiring.d.ts +0 -49
- package/dist/types/packages/dom/src/planes.d.ts +0 -33
- package/dist/types/packages/dom/src/reflectors/chrome.d.ts +0 -33
- package/dist/types/packages/dom/src/reflectors/dom-widgets.d.ts +0 -59
- package/dist/types/packages/dom/src/reflectors/graybox.d.ts +0 -31
- package/dist/types/packages/dom/src/reflectors/plane-transform.d.ts +0 -38
- package/dist/types/packages/ground/src/index.d.ts +0 -69
- package/dist/types/packages/ground/src/layer.d.ts +0 -40
- package/dist/types/packages/ground/src/pass.d.ts +0 -41
- package/dist/types/packages/ground/src/passes/grid-contract.d.ts +0 -28
- package/dist/types/packages/ground/src/passes/grid-magnet-pass.d.ts +0 -2
- package/dist/types/packages/ground/src/passes/grid-magnet.d.ts +0 -31
- package/dist/types/packages/ground/src/passes/grid.d.ts +0 -10
- package/dist/types/packages/ground/src/passes/guides-collect.d.ts +0 -14
- package/dist/types/packages/ground/src/passes/guides.d.ts +0 -3
- package/dist/types/packages/ground/src/passes/magnet-collect.d.ts +0 -63
- package/dist/types/packages/ground/src/passes/soup-collect.d.ts +0 -35
- package/dist/types/packages/ground/src/passes/soup-mesh.d.ts +0 -8
- package/dist/types/packages/ground/src/passes/wires-collect.d.ts +0 -35
- package/dist/types/packages/ground/src/passes/wires.d.ts +0 -10
- package/dist/types/packages/ground/src/poles.d.ts +0 -47
- package/dist/types/packages/ground/src/renderer.d.ts +0 -15
- package/dist/types/packages/ice/src/ground.d.ts +0 -1
- package/dist/types/packages/ice/src/r3f.d.ts +0 -1
- package/dist/types/packages/kernel/src/eviction.d.ts +0 -23
- package/dist/types/packages/kernel/src/zoom-bands.d.ts +0 -19
- package/dist/types/packages/r3f/src/bridge.d.ts +0 -129
- package/dist/types/packages/r3f/src/composite-material.d.ts +0 -26
- package/dist/types/packages/r3f/src/compositor-pass.d.ts +0 -105
- package/dist/types/packages/r3f/src/dev-write-trap.d.ts +0 -30
- package/dist/types/packages/r3f/src/gl-root.d.ts +0 -96
- package/dist/types/packages/r3f/src/gl-router.d.ts +0 -70
- package/dist/types/packages/r3f/src/index.d.ts +0 -17
- package/dist/types/packages/r3f/src/island-state.d.ts +0 -112
- package/dist/types/packages/r3f/src/island.d.ts +0 -13
- package/dist/types/packages/r3f/src/pool.d.ts +0 -56
- package/dist/types/packages/r3f/src/preview-capture.d.ts +0 -19
- package/dist/types/packages/r3f/src/resource-registry.d.ts +0 -30
- package/dist/types/packages/r3f/src/self-sustain.d.ts +0 -39
- package/dist/types/packages/r3f/src/use-island-frame.d.ts +0 -39
- package/dist/types/packages/react/src/infinite-canvas.d.ts +0 -140
- package/dist/types/packages/react/src/preview-snapshots.d.ts +0 -17
- package/dist/types/packages/react/src/widget-preview.d.ts +0 -14
- package/dist/types/packages/react/src/widget-root.d.ts +0 -33
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import type { Component, Tag } from "@vibecook/strata-ecs";
|
|
1
|
+
import type { Component, Entity, Tag, World } from "@vibecook/strata-ecs";
|
|
2
2
|
import type { AnyBehaviorAttachSpec, AnyBehaviorDef } from "../behavior/types";
|
|
3
|
+
import { type DeskStratum } from "../catalog";
|
|
3
4
|
import { type Prefab } from "../schema/prefab";
|
|
4
5
|
import type { PropSpec, PropsDecl } from "./props";
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
import { type HeldToolDef } from "./held-tools";
|
|
7
|
+
import { type MenuActionDef } from "./menu-actions";
|
|
8
|
+
import { type TrayHang } from "../../../kernel/src/index";
|
|
9
|
+
import type { CanvasType } from "../canvas/define-canvas-type";
|
|
10
|
+
import type { FrameProjection } from "../canvas/frame-projection";
|
|
7
11
|
export interface WidgetPortDecl {
|
|
8
12
|
readonly id: string;
|
|
9
13
|
readonly side: "n" | "e" | "s" | "w";
|
|
@@ -43,6 +47,39 @@ export interface WidgetRenameEntry {
|
|
|
43
47
|
* `Behavior.with({...})` for a starting value (design-009 §6).
|
|
44
48
|
*/
|
|
45
49
|
export type WidgetBehaviorDecl = AnyBehaviorDef | AnyBehaviorAttachSpec;
|
|
50
|
+
export interface WidgetPortalInsets {
|
|
51
|
+
readonly top?: number;
|
|
52
|
+
readonly right?: number;
|
|
53
|
+
readonly bottom?: number;
|
|
54
|
+
readonly left?: number;
|
|
55
|
+
}
|
|
56
|
+
export interface WidgetContainerDef {
|
|
57
|
+
/** Compatibility-key projection written to the durable Accepts cell. */
|
|
58
|
+
readonly accepts: readonly string[];
|
|
59
|
+
readonly provides?: readonly string[];
|
|
60
|
+
/** Fixed CanvasType binding; omitted by legacy defineWidget({container}). */
|
|
61
|
+
readonly canvas?: CanvasType;
|
|
62
|
+
/** Explicit narrower ingress WidgetTypes, unioned with accepts keys. */
|
|
63
|
+
readonly widgets?: readonly WidgetType[];
|
|
64
|
+
/** Omitted drop policy inherits the complete CanvasType legal set. */
|
|
65
|
+
readonly inheritCanvasPlacement?: boolean;
|
|
66
|
+
/** Card-local portal insets; full widget body when absent. */
|
|
67
|
+
readonly portal?: WidgetPortalInsets;
|
|
68
|
+
/** Optional declared facet projection overriding the CanvasType default. */
|
|
69
|
+
readonly frameProjection?: FrameProjection;
|
|
70
|
+
/** Internal normalized distinction between defineContainer and legacy sugar. */
|
|
71
|
+
readonly typed?: boolean;
|
|
72
|
+
}
|
|
73
|
+
export interface WidgetContainerEntry {
|
|
74
|
+
readonly canvasTypeId: string;
|
|
75
|
+
readonly canvasSemanticVersion: number;
|
|
76
|
+
readonly accepts: readonly string[];
|
|
77
|
+
readonly widgetTypeIds: readonly string[];
|
|
78
|
+
readonly inheritCanvasPlacement: boolean;
|
|
79
|
+
readonly portal: Readonly<Required<WidgetPortalInsets>>;
|
|
80
|
+
readonly frameProjection: FrameProjection | undefined;
|
|
81
|
+
readonly typed: boolean;
|
|
82
|
+
}
|
|
46
83
|
/** Normalized pre-attachment (registry truth for the spawn + equip paths). */
|
|
47
84
|
export interface WidgetBehaviorEntry {
|
|
48
85
|
readonly behavior: AnyBehaviorDef;
|
|
@@ -51,6 +88,14 @@ export interface WidgetBehaviorEntry {
|
|
|
51
88
|
export interface WidgetInteraction {
|
|
52
89
|
readonly selectable?: boolean;
|
|
53
90
|
readonly movable?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* May this widget be dropped INTO an accepting container (design-015 §9, D-D6 — D2b)?
|
|
93
|
+
* `"into"` (default): yes — for a GPU object, when its centre is let go over the container's
|
|
94
|
+
* FACE, at the point where it lay in the inside's own units (it takes the inside's scale), ⌥
|
|
95
|
+
* held at the release keeping it out. `"never"`: a root object always (D-D18: the notebook, the
|
|
96
|
+
* whiteboard, the calendar) — the widget offers itself to no container (no `Provides`).
|
|
97
|
+
*/
|
|
98
|
+
readonly drop?: "into" | "never";
|
|
54
99
|
readonly resizable?: boolean;
|
|
55
100
|
readonly snap?: "source" | "target" | "both" | "none";
|
|
56
101
|
/** Drop-REJECTING target: widgets dropped onto this one fly back (v1 iOS-card contract). */
|
|
@@ -63,15 +108,19 @@ export interface WidgetInteraction {
|
|
|
63
108
|
* membership — never reparenting). Default false.
|
|
64
109
|
*/
|
|
65
110
|
readonly sweepContained?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* The wheel TURNS it while a press holds it (design-015 §6's photo, D3t-a — the `WheelTurns` capability): the wheel on
|
|
113
|
+
* that pointer is the widget's, never the camera's; its deltas add up in the pointer's `PressWheel`. Default false.
|
|
114
|
+
*/
|
|
115
|
+
readonly wheelTurns?: boolean;
|
|
66
116
|
/**
|
|
67
117
|
* Keyboard claim (design-007 §3.1, petitions I1/I4). `"exclusive"`: while a
|
|
68
|
-
* node inside this widget holds browser focus, the engine keymap and
|
|
69
|
-
* adapter's Space pan modifier stand down — keys flow to the widget's own
|
|
70
|
-
* handlers (the engine stops competing; it never delivers behavior). The
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* canvas zoom always). Default `"shared"` — today's behavior, byte-identical.
|
|
118
|
+
* node inside this widget's claim holds browser focus, the engine keymap and
|
|
119
|
+
* the adapter's Space pan modifier stand down — keys flow to the widget's own
|
|
120
|
+
* handlers (the engine stops competing; it never delivers behavior). The claim
|
|
121
|
+
* is a `data-canvas-keyboard` host in screen space (the desk's one focused
|
|
122
|
+
* editor carries it), and plain wheel over its scrollable content cedes to
|
|
123
|
+
* native scroll (ctrl/pinch stays canvas zoom always). Default `"shared"`.
|
|
75
124
|
*/
|
|
76
125
|
readonly keyboard?: "shared" | "exclusive";
|
|
77
126
|
/**
|
|
@@ -93,20 +142,57 @@ export interface WidgetDef {
|
|
|
93
142
|
};
|
|
94
143
|
/** Conflict groups: group name → prop names. Ungrouped props → "props". */
|
|
95
144
|
readonly groups?: Readonly<Record<string, readonly string[]>>;
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
145
|
+
/**
|
|
146
|
+
* The KIND BINDING (design-015 §5.2, D-D16) — the widget's FACE: what the
|
|
147
|
+
* desk's renderer dispatches on through `widgetTypeFor`: the kind's program,
|
|
148
|
+
* its pick mirror, its opening. Opaque to core: it carries it and never reads
|
|
149
|
+
* it. Optional — a widget without one (a port, a test fixture) is a type the
|
|
150
|
+
* desk draws nothing for; since D5b there is no other face a widget can have.
|
|
151
|
+
*/
|
|
152
|
+
readonly object?: unknown;
|
|
153
|
+
/**
|
|
154
|
+
* Which stratum of the desk instances lie in (design-015 §4.2, D-D4):
|
|
155
|
+
* `pads` under everything, `sheets` flat on the mat holding a desk, `things`
|
|
156
|
+
* above both. Equip stamps it as the runtime `Stratum` rider, and
|
|
157
|
+
* `compareStackOrder` ranks by it before sibling order, so pick order is paint
|
|
158
|
+
* order across kinds. An `object` that declares none is a `things`; any other
|
|
159
|
+
* widget that declares none gets no `Stratum` at all (and sorts as a thing).
|
|
160
|
+
*/
|
|
161
|
+
readonly stratum?: DeskStratum;
|
|
162
|
+
/**
|
|
163
|
+
* An object that OPENS (design-015 §8, D4b): its kind declares an `open` binding — an open
|
|
164
|
+
* extent, an open motion, the held bar's tools — and `ops.open(entity)` picks it up into the
|
|
165
|
+
* hand (the double-tap, ⏎). A kind without one is refused by the op: a note is written where it
|
|
166
|
+
* lies, a mini mat is entered, a print has nothing to open. Refused without an `object` binding.
|
|
167
|
+
*/
|
|
168
|
+
readonly openable?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* The held bar's tools of an object that opens (design-015 §8; D3t-a — widget/held-tools.ts): each a mode (the
|
|
171
|
+
* object's active tool in hand) or an action (an op), with its keys. The keymap and the bar reach them through the
|
|
172
|
+
* engine; `ops.useHeldTool` uses one. Refused on anything that does not open.
|
|
173
|
+
*/
|
|
174
|
+
readonly heldTools?: readonly HeldToolDef[];
|
|
175
|
+
/** The mode in hand when the object is picked up, from its props (the board: its capped marker's ink). Default: the first mode, else none. */
|
|
176
|
+
readonly heldTool?: (props: Readonly<Record<string, unknown>>) => string;
|
|
177
|
+
/**
|
|
178
|
+
* The acts the SELECTION MENU offers for a selection of this type's objects (design-016 §5 · K-L2, K8a — widget/menu-actions.ts):
|
|
179
|
+
* each an id, a label, a glyph and an op; the menu shows one when every selected object's type declares it, and
|
|
180
|
+
* `ops.runMenuAction` runs it. A kind's own acts live here, never in app code over its type name.
|
|
181
|
+
*/
|
|
182
|
+
readonly menu?: readonly MenuActionDef[];
|
|
183
|
+
/**
|
|
184
|
+
* What RIDES with the widget when a gesture moves it (design-015 D3t-c — the desk calendar's stuck notes): widgets of the same
|
|
185
|
+
* frame the move claim adds to its dragged set, so they move with it live and land in the SAME transaction (one undo step).
|
|
186
|
+
* Read from the world at the claim; a taped rider stays put, as a taped member of a selection does.
|
|
187
|
+
*/
|
|
188
|
+
readonly riders?: (world: World, entity: Entity) => readonly Entity[];
|
|
189
|
+
/**
|
|
190
|
+
* The object's DATA prefabs (design-015 §5.1; D3t-a): durable children `ChildOf` it that are never widgets — the board's
|
|
191
|
+
* strokes. An engine catalog that registers the widget tracks them as it tracks the widget's own: their packs are stamped on
|
|
192
|
+
* a new document and gated at open, a guarded transaction resolves them, and one whose version moved migrates by its own
|
|
193
|
+
* `migrate` chain (doc/migrate.ts).
|
|
194
|
+
*/
|
|
195
|
+
readonly data?: readonly Prefab[];
|
|
110
196
|
readonly defaultSize?: {
|
|
111
197
|
readonly w: number;
|
|
112
198
|
readonly h: number;
|
|
@@ -115,13 +201,6 @@ export interface WidgetDef {
|
|
|
115
201
|
readonly w: number;
|
|
116
202
|
readonly h: number;
|
|
117
203
|
};
|
|
118
|
-
/**
|
|
119
|
-
* GL only: the island repaints every frame while visible (design-004 §3
|
|
120
|
-
* animation contract — the EXPLICIT opt-in; plain `useFrame` inside a
|
|
121
|
-
* portal cannot be attributed to an island, so it never drives repaints;
|
|
122
|
-
* content-driven animation goes through `useIslandFrame`).
|
|
123
|
-
*/
|
|
124
|
-
readonly animated?: boolean;
|
|
125
204
|
readonly interaction?: WidgetInteraction;
|
|
126
205
|
/**
|
|
127
206
|
* Node-editor port schema (design-005 §2; design-001 §5.3): wires bind to
|
|
@@ -129,27 +208,7 @@ export interface WidgetDef {
|
|
|
129
208
|
* the compatibility key list the connect gesture checks.
|
|
130
209
|
*/
|
|
131
210
|
readonly ports?: readonly WidgetPortDecl[];
|
|
132
|
-
|
|
133
|
-
* Palette/tray preview (design-005 §2 amendment, 2026-07-19). ENGINE-FREE
|
|
134
|
-
* BY CONTRACT: a preview renders with no world, no entity, no ops — a pure
|
|
135
|
-
* picture the host mounts inert (that is what makes it portable: trays,
|
|
136
|
-
* docs sites, a widget store). Authored at `defaultSize`; hosts scale.
|
|
137
|
-
* Three tiers, least effort first:
|
|
138
|
-
* - absent → the REAL component mounts with default props in
|
|
139
|
-
* the framework's preview sandbox (dom surfaces;
|
|
140
|
-
* truthful by construction);
|
|
141
|
-
* - `{ props: {…} }` → same sandbox mount with curated props;
|
|
142
|
-
* - a component, or `{ component }` → author-owned preview (a static
|
|
143
|
-
* mockup, a live self-ticking clock — the author's call). In P1 all
|
|
144
|
-
* declared previews are DOM components — the sanctioned escape hatch
|
|
145
|
-
* for GL widgets too (P2 adds the r3f snapshot pipeline).
|
|
146
|
-
* Opaque to core — the react package narrows it (`component` precedent).
|
|
147
|
-
*/
|
|
148
|
-
readonly preview?: unknown;
|
|
149
|
-
readonly container?: {
|
|
150
|
-
readonly accepts: readonly string[];
|
|
151
|
-
readonly provides?: readonly string[];
|
|
152
|
-
};
|
|
211
|
+
readonly container?: WidgetContainerDef;
|
|
153
212
|
/**
|
|
154
213
|
* Provides-keys WITHOUT container semantics (nodeboard field finding): a
|
|
155
214
|
* leaf that only offers itself to containers must not become a Container
|
|
@@ -192,6 +251,31 @@ export interface WidgetDef {
|
|
|
192
251
|
* §6.4 cross-schema movement).
|
|
193
252
|
*/
|
|
194
253
|
readonly migrate?: Readonly<Record<number, (prev: Record<string, unknown>) => Record<string, unknown>>>;
|
|
254
|
+
/**
|
|
255
|
+
* The widget's TRAY ENTRY (design-017 §8; K5a — K-L2: a plugin kind declares the same): a specimen of the object hangs on the
|
|
256
|
+
* pegboard tray, drawn by its own kind. No list in the engine names a kind — the catalog's widgets that carry an entry ARE the
|
|
257
|
+
* tray's contents. Only an object has one (a specimen is its face).
|
|
258
|
+
*/
|
|
259
|
+
readonly tray?: TrayEntry;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* A tray entry (design-017 §8): `label` — the specimen's name tag; `props` — the specimen's props over the widget's defaults: its FACE
|
|
263
|
+
* on the board (K5b — a note with a word on it, a print with a picture); `take` — what one taken off the board is made with (K5b,
|
|
264
|
+
* D-K5b.1): absent, the widget's own defaults (a taken note is blank, a taken calendar shows its today's month); `"face"`, the
|
|
265
|
+
* specimen's props; a record, those props (each valid as `props`'); `local` — K5b, D-K5b.3: the specimen (and a copy lifted off it) is
|
|
266
|
+
* drawn with its kind's DESK STATE (`ObjectKind.local` — a note's writing, a print's pictures, a pad's print), as its objects are, for a
|
|
267
|
+
* face that lives there; absent, a specimen is its kind's stateless drawing (K5a); `hang` — how it hangs (kernel `TrayHang`: its size on
|
|
268
|
+
* the board in CSS px, its pegs in pitches from its hang point, its accessory); `category`, then `order`, then the type — its place in
|
|
269
|
+
* the lattice law's order.
|
|
270
|
+
*/
|
|
271
|
+
export interface TrayEntry {
|
|
272
|
+
readonly label: string;
|
|
273
|
+
readonly props?: Readonly<Record<string, unknown>>;
|
|
274
|
+
readonly take?: "face" | Readonly<Record<string, unknown>>;
|
|
275
|
+
readonly local?: boolean;
|
|
276
|
+
readonly hang: TrayHang;
|
|
277
|
+
readonly order?: number;
|
|
278
|
+
readonly category?: string;
|
|
195
279
|
}
|
|
196
280
|
export interface WidgetGroup {
|
|
197
281
|
readonly name: string;
|
|
@@ -205,11 +289,26 @@ export interface WidgetType {
|
|
|
205
289
|
readonly prefab: Prefab;
|
|
206
290
|
readonly groups: readonly WidgetGroup[];
|
|
207
291
|
readonly propToGroup: Readonly<Record<string, string>>;
|
|
208
|
-
|
|
209
|
-
readonly
|
|
210
|
-
/**
|
|
211
|
-
|
|
212
|
-
|
|
292
|
+
/** The `object` kind binding (design-015 §5.2) — the face; opaque; `undefined` for a widget the desk draws nothing for. */
|
|
293
|
+
readonly object: unknown;
|
|
294
|
+
/**
|
|
295
|
+
* The desk stratum equip stamps as `Stratum` (design-015 §4.2): the declared
|
|
296
|
+
* one, `things` for an object that declared none, `undefined` (no rider) for
|
|
297
|
+
* a faceless widget that declared none.
|
|
298
|
+
*/
|
|
299
|
+
readonly stratum: DeskStratum | undefined;
|
|
300
|
+
/** An object whose kind opens — `ops.open` picks it up (design-015 §8); false on every other widget. */
|
|
301
|
+
readonly openable: boolean;
|
|
302
|
+
/** The held bar's tools (design-015 §8, D3t-a); empty for anything that does not open. */
|
|
303
|
+
readonly heldTools: readonly HeldToolDef[];
|
|
304
|
+
/** The mode in hand at the pick-up, from the object's props; undefined = the first mode. */
|
|
305
|
+
readonly heldTool: ((props: Readonly<Record<string, unknown>>) => string) | undefined;
|
|
306
|
+
/** The selection menu's acts for this type's objects (K8a); empty when it declares none. */
|
|
307
|
+
readonly menu: readonly MenuActionDef[];
|
|
308
|
+
/** What rides with the widget when a gesture moves it (design-015 D3t-c); undefined = nothing. */
|
|
309
|
+
readonly riders: ((world: World, entity: Entity) => readonly Entity[]) | undefined;
|
|
310
|
+
/** The object's data prefabs (design-015 §5.1, D3t-a) — the catalog tracks them with the widget; empty for most. */
|
|
311
|
+
readonly data: readonly Prefab[];
|
|
213
312
|
readonly defaultSize: {
|
|
214
313
|
readonly w: number;
|
|
215
314
|
readonly h: number;
|
|
@@ -218,23 +317,25 @@ export interface WidgetType {
|
|
|
218
317
|
readonly w: number;
|
|
219
318
|
readonly h: number;
|
|
220
319
|
};
|
|
221
|
-
/** GL islands: repaint every visible frame (design-004 §3). */
|
|
222
|
-
readonly animated: boolean;
|
|
223
320
|
/** Node-editor ports (empty when not a node). */
|
|
224
321
|
readonly ports: readonly WidgetPortDecl[];
|
|
225
322
|
/** Runtime capability tags the equip system stamps at projection. */
|
|
226
323
|
readonly capabilityTags: readonly Tag[];
|
|
324
|
+
/** Normalized capability advertisement; never re-read from durable cells. */
|
|
325
|
+
readonly provides: readonly string[];
|
|
326
|
+
/** Fixed nested-frame binding and ingress/portal metadata, when a container. */
|
|
327
|
+
readonly container: WidgetContainerEntry | undefined;
|
|
227
328
|
/** Keyboard claim (design-007): the dom layer reads THIS (registry truth), not the tag. */
|
|
228
329
|
readonly keyboard: "shared" | "exclusive";
|
|
229
330
|
/** Escape ownership under an exclusive claim ("release" = engine-reserved). */
|
|
230
331
|
readonly keyboardEscape: "release" | "widget";
|
|
332
|
+
/** May instances be dropped INTO an accepting container (design-015 §9; `"never"` = a root object always, D-D18)? The drop system reads THIS. */
|
|
333
|
+
readonly drop: "into" | "never";
|
|
231
334
|
readonly migrate: Readonly<Record<number, (prev: Record<string, unknown>) => Record<string, unknown>>>;
|
|
232
335
|
/** Pre-attached behaviors, normalized (spawn tx for durable, equip for runtime). */
|
|
233
336
|
readonly behaviors: readonly WidgetBehaviorEntry[];
|
|
234
|
-
/**
|
|
235
|
-
readonly
|
|
236
|
-
/** Prop overrides for the default real-component preview mount (validated names). */
|
|
237
|
-
readonly previewProps?: Readonly<Record<string, unknown>>;
|
|
337
|
+
/** The tray entry (design-017 §8; K5a), validated and frozen; undefined = the widget hangs nothing on the tray. */
|
|
338
|
+
readonly tray: TrayEntry | undefined;
|
|
238
339
|
}
|
|
239
340
|
/** Stamped by the equip system once a projected widget carries its capability tags. */
|
|
240
341
|
export declare const WidgetEquipped: Tag;
|
|
@@ -248,5 +349,7 @@ export declare const renames: {
|
|
|
248
349
|
all(): WidgetRenameEntry[];
|
|
249
350
|
};
|
|
250
351
|
export declare function defineWidget(def: WidgetDef): WidgetType;
|
|
352
|
+
/** What one taken off the tray is made with (design-017 §9; K5b, D-K5b.1): the entry's `take` — the face's props, its own, or none (the widget's defaults). */
|
|
353
|
+
export declare function trayTakeProps(entry: TrayEntry): Readonly<Record<string, unknown>> | undefined;
|
|
251
354
|
/** TEST-ONLY wipe (mirrors __resetPrefabsForTests; not on the barrel). */
|
|
252
355
|
export declare function __resetWidgetsForTests(): void;
|
|
@@ -9,6 +9,18 @@
|
|
|
9
9
|
* projections from this frame's sync() are visible by then.
|
|
10
10
|
*
|
|
11
11
|
* This generalizes the graybox demo's equipSceneBoxes into the engine.
|
|
12
|
+
*
|
|
13
|
+
* RIDERS take the same path — session-local facts derivable from the widget
|
|
14
|
+
* TYPE and needed on every peer's projection, including one that received the
|
|
15
|
+
* widget over the wire or restored it from a file, neither of which ran a spawn
|
|
16
|
+
* path (design-013 D4: never sync what every peer can compute from `PrefabId`):
|
|
17
|
+
* the desk `Stratum` (design-015 §4.2, D2a-core) and the type's runtime
|
|
18
|
+
* pre-attached behaviours (design-009 §6). Structural `ctx.addComponent` lands
|
|
19
|
+
* at the derive flush like the tags. Until design-015 D5b the six presentation
|
|
20
|
+
* facts (`SurfaceKind` … `TextureRef`, design-013 §5) rode here too; they left
|
|
21
|
+
* with the DOM/GPU presentation choice — an object presents on the desk and
|
|
22
|
+
* nowhere else, so there is no kind to name, no target to choose and no texture
|
|
23
|
+
* to reserve.
|
|
12
24
|
*/
|
|
13
|
-
import { type System } from "@vibecook/strata-ecs";
|
|
14
|
-
export declare function createWidgetEquipSystem(): System;
|
|
25
|
+
import { type System, type World } from "@vibecook/strata-ecs";
|
|
26
|
+
export declare function createWidgetEquipSystem(world: World): System;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE HELD BAR'S TOOLS (design-015 §8; D3t-a) — what an object in hand offers beyond being held: the kind's
|
|
3
|
+
* `open.tools`, declared on its WIDGET TYPE (`defineWidget({ heldTools, heldTool })` — the desk's `defineObject`
|
|
4
|
+
* passes its kind's), so the one keymap and the one held bar reach them through the engine, never through a kind.
|
|
5
|
+
* Each tool is a glyph, a key and a KIND:
|
|
6
|
+
* - a `mode` makes itself the held object's ACTIVE tool — the runtime `HeldTool` on the object in hand, the user's
|
|
7
|
+
* fact, never in the document (the board's four markers and its eraser; a notebook's pens; a calendar's pen). A
|
|
8
|
+
* `toggle` mode chosen again while active hands back the mode before it (the board's eraser lays down for the
|
|
9
|
+
* marker it took over from);
|
|
10
|
+
* - an `action` runs its op once (`run`, handed a `HeldToolApi` — outside the tick, like every op): undo and redo
|
|
11
|
+
* (the DOCUMENT's history: a held object's history is the document's, design-015 §5.1), the board's wipe.
|
|
12
|
+
* Keys route only while an object is held (the keymap asks `matchHeldTool` before its own entries). A tool with no
|
|
13
|
+
* `kind` is DECLARED ONLY — the bar shows it dim and nothing routes to it (a kind whose tools are a later slice's).
|
|
14
|
+
*/
|
|
15
|
+
import type { Entity, World } from "@vibecook/strata-ecs";
|
|
16
|
+
import type { GuardedTx } from "../guards/guarded-tx";
|
|
17
|
+
/** What an action's op is handed: the object in hand, the document's history and ONE transaction on the document. */
|
|
18
|
+
export interface HeldToolApi {
|
|
19
|
+
readonly world: World;
|
|
20
|
+
/** The object in hand. */
|
|
21
|
+
readonly entity: Entity;
|
|
22
|
+
/** The document's history — the one ⌘Z walks (false: nothing to undo, or a read-only document). */
|
|
23
|
+
undo(): boolean;
|
|
24
|
+
redo(): boolean;
|
|
25
|
+
/** ONE transaction on the document (one undo step unless `undoable: false`); false — nothing written — on a read-only one. */
|
|
26
|
+
transact(fn: (tx: GuardedTx) => void, opts?: {
|
|
27
|
+
readonly undoable?: boolean;
|
|
28
|
+
}): boolean;
|
|
29
|
+
/** The held object's own props as the world holds them now. */
|
|
30
|
+
props(): Readonly<Record<string, unknown>>;
|
|
31
|
+
/** The held object's own props, validated, in ONE transaction (`ops.setWidgetProps`'s path — the board's tip, a calendar's month); false on a read-only document. */
|
|
32
|
+
setProps(props: Readonly<Record<string, unknown>>, opts?: {
|
|
33
|
+
readonly undoable?: boolean;
|
|
34
|
+
}): boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A held tool's GLYPH (design-016 §5 · K-L2, K8a): a NAME the bar draws (its set — `SELECTION_GLYPHS` in `@ice/react`, which an
|
|
38
|
+
* app may extend), or the tool's OWN drawing — SVG path data in the bar's 24-unit box, stroked 2 units in the bar's ink as the
|
|
39
|
+
* bar's own are, or filled (`fill`). A plugin kind in its own package, which draws no React, declares its drawing; a name the bar
|
|
40
|
+
* does not know is never drawn as another glyph (the bar marks it missing and says so).
|
|
41
|
+
*/
|
|
42
|
+
export type HeldGlyph = string | {
|
|
43
|
+
readonly path: string;
|
|
44
|
+
readonly fill?: boolean;
|
|
45
|
+
};
|
|
46
|
+
/** One tool of the held bar, as a kind declares it (its `open.tools`). */
|
|
47
|
+
export interface HeldToolDef {
|
|
48
|
+
/** Unique within the type: what `HeldTool.id` holds for a mode, what `ops.useHeldTool` names. */
|
|
49
|
+
readonly id: string;
|
|
50
|
+
/** Its name — the slot's accessible label and its tip. */
|
|
51
|
+
readonly label: string;
|
|
52
|
+
/** `mode` (the active tool) or `action` (an op, run once); absent = declared only (dim, inert). */
|
|
53
|
+
readonly kind?: "mode" | "action";
|
|
54
|
+
/** The keys that choose it while held: `KeyboardEvent.key` with `mod+` (⌘ or ctrl), `shift+`, `alt+` — "1", "e", "mod+z", "mod+Backspace". */
|
|
55
|
+
readonly keys?: readonly string[];
|
|
56
|
+
/** The key as the tip shows it ("1", "E", "⌘Z"). */
|
|
57
|
+
readonly hint?: string;
|
|
58
|
+
/** Its glyph (`HeldGlyph`, K8a): a name of the bar's set, or its own drawing (`{ path }`). */
|
|
59
|
+
readonly glyph?: HeldGlyph;
|
|
60
|
+
/** A mode chosen again while active hands the hand back the mode before it. */
|
|
61
|
+
readonly toggle?: boolean;
|
|
62
|
+
/** The cursor over the object's drawing surface (its `content` part) while this mode is active — "none" where the tool draws itself. */
|
|
63
|
+
readonly cursor?: string;
|
|
64
|
+
/** false: keys only — no slot in the bar (the board's tip, its wipe). */
|
|
65
|
+
readonly bar?: boolean;
|
|
66
|
+
/** An action's op. */
|
|
67
|
+
run?(api: HeldToolApi): void;
|
|
68
|
+
}
|
|
69
|
+
/** A key press as the keymap reads it: `KeyboardEvent.key`, ⌘-or-ctrl, ⇧, ⌥. */
|
|
70
|
+
export interface KeyChord {
|
|
71
|
+
readonly key: string;
|
|
72
|
+
readonly mod: boolean;
|
|
73
|
+
readonly shift: boolean;
|
|
74
|
+
readonly alt: boolean;
|
|
75
|
+
}
|
|
76
|
+
/** Does a tool's key spec name this chord? Every modifier must match exactly; the key compares case-blind (Caps Lock types "E"). */
|
|
77
|
+
export declare function keyMatches(spec: string, chord: KeyChord): boolean;
|
|
78
|
+
/** The live tool a chord chooses among `tools` — the first whose keys name it; a declared-only tool routes nothing. */
|
|
79
|
+
export declare function matchHeldTool(tools: readonly HeldToolDef[], chord: KeyChord): HeldToolDef | undefined;
|
|
80
|
+
/** A type's tools at definition time: unique ids, a known kind, an action with its op, well-formed keys. */
|
|
81
|
+
/** Is this a glyph a tool may declare — none, a non-empty name, or a drawing with non-empty path data (K8a)? */
|
|
82
|
+
export declare function isHeldGlyph(g: unknown): g is HeldGlyph | undefined;
|
|
83
|
+
export declare function validateHeldTools(type: string, tools: readonly HeldToolDef[]): void;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A KIND'S MENU ACTIONS (design-016 §5 · K-L2, K8a) — the acts a widget type offers in the selection menu for a selection of its
|
|
3
|
+
* objects, declared on its TYPE (`defineWidget({ menu })` — the desk's `defineObject` passes them through), so the one menu and
|
|
4
|
+
* an app's keys reach them through the engine (`ops.runMenuAction`), never through a kind: the menu shows an act when EVERY selected
|
|
5
|
+
* object's type declares it (a selection of that kind), and the op runs it on the selected objects whose types declare it — each
|
|
6
|
+
* type's own `run`, handed its own objects. Until K8a a kind's act (the mini mat's vinyl) was app code over a type name.
|
|
7
|
+
*/
|
|
8
|
+
import type { Entity, World } from "@vibecook/strata-ecs";
|
|
9
|
+
import type { GuardedTx } from "../guards/guarded-tx";
|
|
10
|
+
import { type HeldGlyph } from "./held-tools";
|
|
11
|
+
/** What an act's op is handed (outside the tick, like every op): its type's selected objects and ONE door each to write them. */
|
|
12
|
+
export interface MenuActionApi {
|
|
13
|
+
readonly world: World;
|
|
14
|
+
/** The selected objects of the declaring type, in selection order. */
|
|
15
|
+
readonly entities: readonly Entity[];
|
|
16
|
+
/** An object's own props as the world holds them now. */
|
|
17
|
+
props(entity: Entity): Readonly<Record<string, unknown>>;
|
|
18
|
+
/** An object's props, validated, in ONE transaction (`ops.setWidgetProps`'s path); false on a read-only document. */
|
|
19
|
+
setProps(entity: Entity, props: Readonly<Record<string, unknown>>, opts?: {
|
|
20
|
+
readonly undoable?: boolean;
|
|
21
|
+
}): boolean;
|
|
22
|
+
/** ONE transaction on the document (one undo step unless `undoable: false`); false — nothing written — on a read-only one. */
|
|
23
|
+
transact(fn: (tx: GuardedTx) => void, opts?: {
|
|
24
|
+
readonly undoable?: boolean;
|
|
25
|
+
}): boolean;
|
|
26
|
+
}
|
|
27
|
+
/** One act of the selection menu, as a type declares it. */
|
|
28
|
+
export interface MenuActionDef {
|
|
29
|
+
/** Unique within the type: what `ops.runMenuAction` names (and what an app's key names). */
|
|
30
|
+
readonly id: string;
|
|
31
|
+
/** Its name — the button's accessible label and its tip. */
|
|
32
|
+
readonly label: string;
|
|
33
|
+
/** Its glyph (`HeldGlyph`): a name of the bar's set, or its own drawing (`{ path }`). */
|
|
34
|
+
readonly glyph?: HeldGlyph;
|
|
35
|
+
/** The key that does the same, as the tip and More show it ("T") — the app binds it to `ops.runMenuAction`. */
|
|
36
|
+
readonly keys?: string;
|
|
37
|
+
run(api: MenuActionApi): void;
|
|
38
|
+
}
|
|
39
|
+
export declare function validateMenuActions(type: string, acts: readonly MenuActionDef[]): void;
|
|
40
|
+
/**
|
|
41
|
+
* The acts the selection menu shows for `entities`: those EVERY entity's type declares (by id; the first type's declaration names
|
|
42
|
+
* it), in the first type's order — none for an empty selection or an object of a type that declares none.
|
|
43
|
+
*/
|
|
44
|
+
export declare function menuActionsFor(entities: readonly Entity[], menuOf: (entity: Entity) => readonly MenuActionDef[]): readonly MenuActionDef[];
|
|
@@ -1,55 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* (design-004 §2).
|
|
2
|
+
* The widget runtime: the CULL (design-004 §2, what survives of it at design-015 D5b).
|
|
4
3
|
*
|
|
5
|
-
* - `cullSystem` (derive): viewport test over equipped widgets'
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* "last tick seen visible" = the tick it stopped being visible).
|
|
22
|
-
* - The store implements the `useSyncExternalStore` contract: `subscribe` /
|
|
23
|
-
* `getSnapshot` with snapshot identity changing IFF membership or a hidden
|
|
24
|
-
* flag changed. Listener notification is deferred to post-notify (the
|
|
25
|
-
* engine flush reflector) — never from inside the tick.
|
|
4
|
+
* - `cullSystem` (derive): viewport test over equipped widgets' `Size`, overscan
|
|
5
|
+
* scaled by zoom; flips Visible/Culled CHANGE-ONLY. GATED (2026-07-15, the
|
|
6
|
+
* activeMembership playbook): a real `runIf` — camera/viewport window compare
|
|
7
|
+
* as the `extra` trigger (full pass; the window moved under everyone) ∨ a
|
|
8
|
+
* petition-7 collector on Position/Size + Active flips (delta pass —
|
|
9
|
+
* drags/spawns re-test only the journaled entities). Idle frames skip; camera
|
|
10
|
+
* frames stay O(active) by the widgetQ Active scope. `Visible`/`Culled` is the
|
|
11
|
+
* desk renderer's WORKING SET: the builder walks the visible objects and the
|
|
12
|
+
* pick source answers for them.
|
|
13
|
+
*
|
|
14
|
+
* GONE at design-015 D5b: the mount system, its keep-mounted LRU, the
|
|
15
|
+
* `useSyncExternalStore` snapshot, `retainForTransition` and the post-notify
|
|
16
|
+
* listener flush — every one of them existed so a DOM host or a GL island could
|
|
17
|
+
* stay mounted-but-hidden and be held across a nav crossfade. An object has no
|
|
18
|
+
* view to mount; the desk draws it from the world (design-015 §1). The
|
|
19
|
+
* facade's `runtime.store` went with them.
|
|
26
20
|
*/
|
|
27
|
-
import { type
|
|
21
|
+
import { type TickSystem, type World } from "@vibecook/strata-ecs";
|
|
28
22
|
import type { Engine } from "../engine/engine";
|
|
29
|
-
import type { MeasureQueue } from "../input/measure-queue";
|
|
30
|
-
export interface MountEntry {
|
|
31
|
-
readonly entity: Entity;
|
|
32
|
-
/** Culled-but-kept-mounted: host hides, React state survives. */
|
|
33
|
-
readonly hidden: boolean;
|
|
34
|
-
}
|
|
35
|
-
export interface WidgetMountStore {
|
|
36
|
-
subscribe(listener: () => void): () => void;
|
|
37
|
-
getSnapshot(): readonly MountEntry[];
|
|
38
|
-
}
|
|
39
23
|
export interface WidgetRuntime {
|
|
40
|
-
readonly store: WidgetMountStore;
|
|
41
24
|
readonly cullSystem: TickSystem;
|
|
42
|
-
readonly mountSystem: TickSystem;
|
|
43
|
-
/** Post-notify listener flush — install registers it as a reflector. */
|
|
44
|
-
flush(): void;
|
|
45
25
|
}
|
|
46
|
-
export declare function createWidgetRuntime(world: World
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
/** Install cull + mount + the post-notify listener flush on an engine. */
|
|
50
|
-
export declare function installWidgetRuntime(engine: Engine, opts?: {
|
|
51
|
-
keepMounted?: number;
|
|
52
|
-
measureQueue?: MeasureQueue;
|
|
53
|
-
}): WidgetRuntime & {
|
|
26
|
+
export declare function createWidgetRuntime(world: World): WidgetRuntime;
|
|
27
|
+
/** Install membership → equip → cull → breakpoint on an engine. */
|
|
28
|
+
export declare function installWidgetRuntime(engine: Engine): WidgetRuntime & {
|
|
54
29
|
uninstall(): void;
|
|
55
30
|
};
|
|
@@ -45,7 +45,7 @@ export declare function attachSpawnParent(tx: {
|
|
|
45
45
|
* whole-group prop values). Shared by `spawnWidget` and the doc sink's
|
|
46
46
|
* create-intent execution (draw tool) so the two can never diverge.
|
|
47
47
|
*/
|
|
48
|
-
export declare function widgetSpawnInits(type: string, opts: SpawnWidgetOpts): {
|
|
48
|
+
export declare function widgetSpawnInits(type: string, opts: SpawnWidgetOpts, resolvedWidget?: WidgetType): {
|
|
49
49
|
prefab: import("../schema/prefab").Prefab;
|
|
50
50
|
overrides: ComponentInit[];
|
|
51
51
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** The tile is square and rgba8: 128 × 128 × 4 = 65536 bytes. */
|
|
2
|
+
export declare const BLUE_NOISE_SIZE = 128;
|
|
3
|
+
/**
|
|
4
|
+
* The 128×128 rgba8 blue-noise tile the cutting mat samples, decoded once.
|
|
5
|
+
*
|
|
6
|
+
* Hand it to the pack's injection point — `matPass.setNoise(blueNoise())` — the
|
|
7
|
+
* same seam a lab feeds from a `?url` fetch. Decoding is lazy so a board that
|
|
8
|
+
* never registers the mat pays nothing for it.
|
|
9
|
+
*/
|
|
10
|
+
export declare function blueNoise(): Uint8Array<ArrayBuffer>;
|