@vibecook/ice 0.11.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -50
- package/dist/chunk-BA7XJC27.js +2429 -0
- package/dist/chunk-BA7XJC27.js.map +1 -0
- package/dist/chunk-BKV4ZEU3.js +1 -0
- package/dist/chunk-BKV4ZEU3.js.map +1 -0
- package/dist/{chunk-VGVDJZSP.js → chunk-DYK6KNLG.js} +13206 -7387
- package/dist/chunk-DYK6KNLG.js.map +1 -0
- package/dist/chunk-ENIFIUEP.js +155 -0
- package/dist/chunk-ENIFIUEP.js.map +1 -0
- package/dist/chunk-IBWWLA6D.js +634 -0
- package/dist/chunk-IBWWLA6D.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-QXOCF56A.js +148 -0
- package/dist/chunk-QXOCF56A.js.map +1 -0
- package/dist/chunk-ZPUPBULB.js +7399 -0
- package/dist/chunk-ZPUPBULB.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 +12728 -0
- package/dist/desk-objects.js.map +1 -0
- package/dist/desk.js +469 -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 +1045 -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 +30 -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 +71 -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 +37 -1
- package/dist/types/packages/core/src/systems/l2-arbitrate.d.ts +18 -4
- 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-wheel.d.ts +11 -0
- package/dist/types/packages/core/src/systems/tray.d.ts +108 -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 +285 -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 +126 -0
- package/dist/types/packages/desk/src/compose/pick.d.ts +5 -0
- package/dist/types/packages/desk/src/compose/reflector.d.ts +111 -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 +38 -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/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 +388 -0
- package/dist/types/packages/desk/src/hold/focus.d.ts +53 -0
- package/dist/types/packages/desk/src/hold/pose.d.ts +132 -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 +430 -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 +13 -0
- package/dist/types/packages/desk/src/kind.d.ts +187 -0
- package/dist/types/packages/desk/src/kinds/world.d.ts +429 -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 +103 -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/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 +16 -0
- package/dist/types/packages/desk/src/submit-instrument.d.ts +36 -0
- package/dist/types/packages/desk/src/theme.d.ts +475 -0
- package/dist/types/packages/desk/src/tray/carry.d.ts +99 -0
- package/dist/types/packages/desk/src/tray/drawer.d.ts +113 -0
- package/dist/types/packages/desk/src/tray/flux.d.ts +46 -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 +96 -0
- package/dist/types/packages/desk/src/tray/shaders.d.ts +10 -0
- package/dist/types/packages/desk/src/tray/specimens.d.ts +199 -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 +91 -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 +5 -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 +171 -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,8 +1,11 @@
|
|
|
1
1
|
import type { World } from "@vibecook/strata-ecs";
|
|
2
2
|
import type { Attachment, DurableStore } from "@vibecook/strata-ecs/durable";
|
|
3
|
-
import type
|
|
3
|
+
import { type CanvasTypeIdentity } from "../canvas/define-canvas-type";
|
|
4
|
+
import type { EngineCatalog } from "../canvas/engine-catalog";
|
|
5
|
+
import type { CommitIntent, CommitSink } from "../engine/commit-sink";
|
|
6
|
+
import { type CommitExtender } from "./doc-commit-sink";
|
|
4
7
|
import { type LiveWriter } from "../guards/live-writer";
|
|
5
|
-
import { type DocVersionReport, type GateVerdict } from "./version-gate";
|
|
8
|
+
import { type DocVersionScope, type DocVersionReport, type GateVerdict } from "./version-gate";
|
|
6
9
|
export interface DocSessionOpts {
|
|
7
10
|
readonly maxUndoSteps?: number;
|
|
8
11
|
/** Override the default gate policy (design-005 §6.3 facade hook). */
|
|
@@ -14,6 +17,16 @@ export interface DocSessionOpts {
|
|
|
14
17
|
* "migrate" verdict attaches read-only, no upgrade).
|
|
15
18
|
*/
|
|
16
19
|
readonly migrate?: boolean;
|
|
20
|
+
/** Low-level engine-scoped pack authority; the facade always supplies this. */
|
|
21
|
+
readonly versionScope?: DocVersionScope;
|
|
22
|
+
/** New-document identity only. Existing documents always use their stored value. */
|
|
23
|
+
readonly rootCanvas?: CanvasTypeIdentity;
|
|
24
|
+
/** Engine-owned final mutation guard; low-level unscoped sessions may omit it. */
|
|
25
|
+
readonly commitGuard?: (intent: CommitIntent) => CommitIntent | undefined;
|
|
26
|
+
/** The layers' word on a gesture's landing, inside its transaction (the facade fans its registered extenders through this). */
|
|
27
|
+
readonly commitExtend?: CommitExtender;
|
|
28
|
+
/** Engine-scoped CanvasType definitions used by solo semantic migration. */
|
|
29
|
+
readonly canvasCatalog?: EngineCatalog;
|
|
17
30
|
}
|
|
18
31
|
export interface DocSession {
|
|
19
32
|
readonly store: DurableStore;
|
|
@@ -25,6 +38,8 @@ export interface DocSession {
|
|
|
25
38
|
*/
|
|
26
39
|
readonly attachment: Attachment;
|
|
27
40
|
readonly readOnly: boolean;
|
|
41
|
+
/** Authoritative stored root identity, absent only for malformed legacy/read-only data. */
|
|
42
|
+
readonly rootCanvas?: CanvasTypeIdentity;
|
|
28
43
|
/**
|
|
29
44
|
* The design-001 §3 step-2 DEV guard, wired to THIS doc: userland live
|
|
30
45
|
* writes to doc cells go through it (throws without a claim/tween;
|
|
@@ -34,6 +49,10 @@ export interface DocSession {
|
|
|
34
49
|
readonly liveWriter: LiveWriter;
|
|
35
50
|
/** Present on the open path (the gate's evidence). */
|
|
36
51
|
readonly report?: DocVersionReport;
|
|
52
|
+
/** Re-read current monotone requirements after remote/capability changes. */
|
|
53
|
+
versionReport(): DocVersionReport;
|
|
54
|
+
/** Solo/local capability grant: requirement markers land before any content. */
|
|
55
|
+
upgradePacks(packs: Readonly<Record<string, number>>): boolean;
|
|
37
56
|
/** Envelope-framed snapshot for storage (autosave kit consumes this). */
|
|
38
57
|
exportEnvelope(savedAt?: number): Uint8Array;
|
|
39
58
|
/** Relay passthroughs (M5 dumb relay; M9 brings the bootstrap protocol). */
|
|
@@ -9,20 +9,23 @@
|
|
|
9
9
|
* bytes 0..3 magic "ICE1"
|
|
10
10
|
* byte 4 envelope version (1)
|
|
11
11
|
* bytes 5..8 u32 header length
|
|
12
|
-
* ... header JSON: { engineSchema, prefabVersions, savedAt? }
|
|
12
|
+
* ... header JSON: { engineSchema, prefabVersions, rootCanvas?, savedAt? }
|
|
13
13
|
* ... payload: Loro snapshot bytes (opaque here)
|
|
14
14
|
*
|
|
15
15
|
* WHERE bytes go (fs/IndexedDB/cloud) is app-owned; WHAT they are is this file.
|
|
16
16
|
*/
|
|
17
|
+
import type { CanvasTypeIdentity } from "../canvas/define-canvas-type";
|
|
17
18
|
export declare const ENVELOPE_MAGIC = "ICE1";
|
|
18
19
|
export declare const ENVELOPE_VERSION = 1;
|
|
19
20
|
export declare const MAX_ENVELOPE_HEADER_BYTES: number;
|
|
20
21
|
/** The document-format version this build writes (gate compares against it). */
|
|
21
|
-
export declare const ENGINE_SCHEMA_VERSION =
|
|
22
|
+
export declare const ENGINE_SCHEMA_VERSION = 3;
|
|
22
23
|
export interface EnvelopeHeader {
|
|
23
24
|
readonly engineSchema: number;
|
|
24
25
|
/** Per-prefab pack versions at save time ({ [prefabId]: version }). */
|
|
25
26
|
readonly prefabVersions: Readonly<Record<string, number>>;
|
|
27
|
+
/** Coarse pre-import mirror; in-document ice:rootCanvas remains authoritative. */
|
|
28
|
+
readonly rootCanvas?: CanvasTypeIdentity;
|
|
26
29
|
/** App-supplied wall-clock ms (the engine never reads a clock). */
|
|
27
30
|
readonly savedAt?: number;
|
|
28
31
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* STRUCTURAL schema migrations (
|
|
2
|
+
* STRUCTURAL schema migrations (engineSchema 1 → current).
|
|
3
3
|
*
|
|
4
4
|
* The per-prefab runner (migrate.ts) folds per-entity group values — it cannot spawn entities,
|
|
5
5
|
* see siblings, write relations, or stamp `engine.schema`, so a schema-version bump used to
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
*/
|
|
24
24
|
import type { LoroDoc } from "loro-crdt";
|
|
25
25
|
import type { DurableStore } from "@vibecook/strata-ecs/durable";
|
|
26
|
+
import { type CanvasTypeIdentity } from "../canvas/define-canvas-type";
|
|
26
27
|
import { type EnvelopeHeader } from "./envelope";
|
|
27
28
|
export interface DocVersionReport {
|
|
28
29
|
/** Highest engine.schema.<n> marker present (0 = unstamped/pre-engine doc). */
|
|
@@ -44,6 +45,23 @@ export interface DocVersionReport {
|
|
|
44
45
|
* would brick the doc `readOnly` via `newerInDoc` — the I5 failure mode.
|
|
45
46
|
*/
|
|
46
47
|
readonly renamedInDoc: Readonly<Record<string, number>>;
|
|
48
|
+
/** Authoritative semantic identity for the document's BoardRoot. */
|
|
49
|
+
readonly rootCanvas?: CanvasTypeIdentity;
|
|
50
|
+
/** A schema-3 root invariant failure. It can never be overridden into writable. */
|
|
51
|
+
readonly rootIssue?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Missing exact semantic dependency markers for otherwise-current packs.
|
|
54
|
+
* Evaluated only on a CURRENT-schema document — see {@link dependencyIssues}.
|
|
55
|
+
*/
|
|
56
|
+
readonly dependencyIssues?: readonly string[];
|
|
57
|
+
}
|
|
58
|
+
/** Engine-scoped definition authority used by stamping and comparison. */
|
|
59
|
+
export interface DocVersionScope {
|
|
60
|
+
/** Every pack/version this engine can understand while opening a document. */
|
|
61
|
+
readonly localPacks: Readonly<Record<string, number>>;
|
|
62
|
+
/** Exact capability manifest stamped on a newly created document. */
|
|
63
|
+
readonly initialPacks?: Readonly<Record<string, number>>;
|
|
64
|
+
readonly packDependencies?: Readonly<Record<string, Readonly<Record<string, number>>>>;
|
|
47
65
|
}
|
|
48
66
|
export type GateVerdict = "ok" | "readOnly" | "migrate" | "reject";
|
|
49
67
|
/**
|
|
@@ -51,15 +69,15 @@ export type GateVerdict = "ok" | "readOnly" | "migrate" | "reject";
|
|
|
51
69
|
* path; idempotent write-once; callable BEFORE attach — the order is
|
|
52
70
|
* `createDurableStore(doc)` first, then stamp, then `attachDurable`).
|
|
53
71
|
*/
|
|
54
|
-
export declare function stampEngineMeta(store: DurableStore): void;
|
|
72
|
+
export declare function stampEngineMeta(store: DurableStore, scope?: DocVersionScope, rootCanvas?: CanvasTypeIdentity): void;
|
|
55
73
|
/** Read the marker keys off a raw (imported, unattached) doc and compare. */
|
|
56
|
-
export declare function readDocVersionReport(doc: LoroDoc): DocVersionReport;
|
|
74
|
+
export declare function readDocVersionReport(doc: LoroDoc, scope?: DocVersionScope): DocVersionReport;
|
|
57
75
|
/**
|
|
58
76
|
* Build the same comparison report from an envelope header, before Loro
|
|
59
77
|
* import. The header carries no meta, so no tombstone knowledge here —
|
|
60
78
|
* registry aliasing only. This preflight is coarse by design; the
|
|
61
79
|
* authoritative in-document gate re-runs right after import.
|
|
62
80
|
*/
|
|
63
|
-
export declare function readEnvelopeVersionReport(header: EnvelopeHeader): DocVersionReport;
|
|
81
|
+
export declare function readEnvelopeVersionReport(header: EnvelopeHeader, scope?: DocVersionScope): DocVersionReport;
|
|
64
82
|
/** The default M5 policy. A facade policy hook may override (design-005 §6.3). */
|
|
65
83
|
export declare function gateVerdict(report: DocVersionReport): GateVerdict;
|
|
@@ -62,6 +62,13 @@ export interface CommitCreate {
|
|
|
62
62
|
readonly props?: Readonly<Record<string, unknown>>;
|
|
63
63
|
readonly parent?: Entity;
|
|
64
64
|
readonly select?: boolean;
|
|
65
|
+
/** Where the widget joins its parent's sibling sequence (default: last — on top). An ⌥-drag's copy goes `{ before: original }` (D4a). */
|
|
66
|
+
readonly order?: OrderPlace;
|
|
67
|
+
}
|
|
68
|
+
/** Generation key captured by an interactive commit before final validation. */
|
|
69
|
+
export interface CommitScope {
|
|
70
|
+
readonly documentEpoch: number;
|
|
71
|
+
readonly canvasEpoch: number;
|
|
65
72
|
}
|
|
66
73
|
export interface CommitIntent {
|
|
67
74
|
/** Outcome kind — traces assert on it. */
|
|
@@ -73,9 +80,11 @@ export interface CommitIntent {
|
|
|
73
80
|
readonly orders?: readonly CommitOrder[];
|
|
74
81
|
readonly wires?: readonly CommitWireSpawn[];
|
|
75
82
|
readonly creates?: readonly CommitCreate[];
|
|
83
|
+
readonly scope?: CommitScope;
|
|
76
84
|
}
|
|
77
85
|
export interface CommitSink {
|
|
78
|
-
|
|
86
|
+
/** `false` asks gesture behavior to restore/fly back its runtime draft. */
|
|
87
|
+
commit(intent: CommitIntent): boolean | void;
|
|
79
88
|
}
|
|
80
89
|
/** The M4 default: record intents for traces/devtools; commit nothing. */
|
|
81
90
|
export declare function createRecordingCommitSink(): CommitSink & {
|
|
@@ -88,6 +88,12 @@ export interface Engine {
|
|
|
88
88
|
readonly guests: GuestRegistry;
|
|
89
89
|
/** Run one full frame. `now` in ms (rAF timestamp or a test counter). */
|
|
90
90
|
step(now: number): void;
|
|
91
|
+
/**
|
|
92
|
+
* Register a hook that runs right AFTER every `step` — outside the tick, after the reflectors
|
|
93
|
+
* (design-015 §9, D2b): where an op a system asked for inside the tick is applied (the facade's
|
|
94
|
+
* nav intent), whichever `step` a host drives. Returns a remover.
|
|
95
|
+
*/
|
|
96
|
+
afterStep(hook: () => void): () => void;
|
|
91
97
|
/**
|
|
92
98
|
* The frame gate (2026-08-04): freeze/thaw plus the settle protocol a host
|
|
93
99
|
* loop consults before each frame. It lives HERE, next to the step it
|
|
@@ -26,6 +26,24 @@
|
|
|
26
26
|
* transitions. The DOM package's rAF loop is what actually parks and restarts;
|
|
27
27
|
* `engine.step(now)` itself stays callable by hand (headless hosts, traces),
|
|
28
28
|
* because the gate governs the LOOP, not the primitive.
|
|
29
|
+
*
|
|
30
|
+
* THE SLEEP (2026-09-27, ICE M21 K7a — design-015 §2.4 idle-zero, §11.4's
|
|
31
|
+
* ≤ 0.1 ms of main thread a second at rest). A freeze is taken; a sleep is
|
|
32
|
+
* FALLEN INTO: a host loop that opts in (`startRafLoop(…, { sleep: true })`,
|
|
33
|
+
* the desk host's default) asks {@link FrameControl.nextStep} after every step
|
|
34
|
+
* and stops scheduling frames once the engine is QUIET — no wake pending, no
|
|
35
|
+
* registered wake due, no settle reporter busy, for {@link SLEEP_TAIL} steps
|
|
36
|
+
* in a row (the tail lets a one-tick protocol — a cleared one-tick tag, a
|
|
37
|
+
* reaped recognizer, a commit at `JustEnded` — finish without a reporter of
|
|
38
|
+
* its own). Nothing is polled at rest: what can change the frame from outside
|
|
39
|
+
* a step says so — the world's outside doors (engine.ts: a write made outside
|
|
40
|
+
* a step), the input queue, the document's and the room's arrivals (the
|
|
41
|
+
* facade), a desk's own flux and its assets (`wake`) — and what is next live at
|
|
42
|
+
* a TIME says when (`wakeWhen`: a flight, a caret's blink, a layer let go,
|
|
43
|
+
* midnight). A step a sleeping loop takes for a registered time alone is
|
|
44
|
+
* {@link FrameControl.settled}: a host that polls its parts (the desk's kinds)
|
|
45
|
+
* asks only the parts that are due. A wake taken INSIDE a step asks for one
|
|
46
|
+
* more frame and restarts no tail (a kind's wanted frame is not an outside event).
|
|
29
47
|
*/
|
|
30
48
|
import type { World } from "@vibecook/strata-ecs";
|
|
31
49
|
/**
|
|
@@ -35,6 +53,28 @@ import type { World } from "@vibecook/strata-ecs";
|
|
|
35
53
|
* reporter reads as a hiccup rather than a hang.
|
|
36
54
|
*/
|
|
37
55
|
export declare const SETTLE_CAP = 120;
|
|
56
|
+
/**
|
|
57
|
+
* Quiet steps a sleeping loop takes after the last outside wake (or the last
|
|
58
|
+
* busy step) before it sleeps (K7a): enough for the interaction stack's
|
|
59
|
+
* one-tick protocols — a pointer's up processed, its recognizer ended, the
|
|
60
|
+
* one-tick tags cleared and the recognizer reaped a tick later — to land
|
|
61
|
+
* without each needing a reporter. Three steps ≈ 50 ms at 60 Hz, once per
|
|
62
|
+
* outside event; a registered time's step takes none.
|
|
63
|
+
*/
|
|
64
|
+
export declare const SLEEP_TAIL = 3;
|
|
65
|
+
/** What the sleep has done since the control was made (the rigs' and the units' instrument). */
|
|
66
|
+
export interface SleepStats {
|
|
67
|
+
/** The host loop sleeps now (no frame scheduled; a wake or a registered time restarts it). */
|
|
68
|
+
readonly asleep: boolean;
|
|
69
|
+
/** Times the loop fell asleep. */
|
|
70
|
+
readonly sleeps: number;
|
|
71
|
+
/** Outside wakes by reason (`world`, `input`, `doc`, `presence`, `desk:…`, …) — each call counted, asleep or not. */
|
|
72
|
+
readonly wakes: Readonly<Record<string, number>>;
|
|
73
|
+
/** Steps a registered time started (the loop's own timer, nothing else pending). */
|
|
74
|
+
readonly timed: number;
|
|
75
|
+
/** Steps since the control was made (entered through the engine's `step`). */
|
|
76
|
+
readonly steps: number;
|
|
77
|
+
}
|
|
38
78
|
export interface FrameControl {
|
|
39
79
|
/**
|
|
40
80
|
* Take a named freeze. Returns an IDEMPOTENT thaw — the disposer pattern
|
|
@@ -67,5 +107,39 @@ export interface FrameControl {
|
|
|
67
107
|
claimStep(): boolean;
|
|
68
108
|
/** Wake on any freeze/thaw transition (the host loop restarts here). */
|
|
69
109
|
onChange(fn: () => void): () => void;
|
|
110
|
+
/**
|
|
111
|
+
* Something happened that the next frame must see — an input, a write from outside a step, a document's or a room's
|
|
112
|
+
* arrival, an asset landing, a desk's flux: outside a step it restarts a sleeping loop and the tail; inside one it asks
|
|
113
|
+
* for one more frame. Counted by `reason`.
|
|
114
|
+
*/
|
|
115
|
+
wake(reason: string): void;
|
|
116
|
+
/**
|
|
117
|
+
* A REGISTERED WAKE: after every step the host asks each source when it is next due, on `performance.now()`'s clock —
|
|
118
|
+
* at or before `now`: the next frame (it still moves); a later time: then (a sleeping loop sets a timer); `Infinity`:
|
|
119
|
+
* never on its own (only a `wake` brings it back). Returns an idempotent unregister.
|
|
120
|
+
*/
|
|
121
|
+
wakeWhen(name: string, due: (now: number) => number): () => void;
|
|
122
|
+
/** The sources due at `now` or before (debug/devtools: "why is the loop awake?") — settle reporters busy included. */
|
|
123
|
+
due(now: number): readonly string[];
|
|
124
|
+
/**
|
|
125
|
+
* For frame hosts, once after every step: when the next step must run — `≤ now`: the next frame; a later time: then;
|
|
126
|
+
* `Infinity`: only on a wake. CONSUMING (it counts the quiet steps of the tail), never a predicate to poll.
|
|
127
|
+
*/
|
|
128
|
+
nextStep(now: number): number;
|
|
129
|
+
/** The host loop fell asleep (`true`) or woke (`false`, `timed`: for a registered time alone) — bookkeeping for the stats. */
|
|
130
|
+
sleeping(asleep: boolean, timed?: boolean): void;
|
|
131
|
+
/** A wake arrived while the host sleeps: restart here (the host loop's subscription). Returns an unsubscribe. */
|
|
132
|
+
onWake(fn: () => void): () => void;
|
|
133
|
+
/**
|
|
134
|
+
* The step in progress began SETTLED — nothing pending, the tail long run: a sleeping loop's step for a registered time
|
|
135
|
+
* alone (or a headless host's step with nothing new). A host that polls its parts asks only those that are due.
|
|
136
|
+
*/
|
|
137
|
+
settled(): boolean;
|
|
138
|
+
/** The engine's `step` entered and left (engine.ts): wakes inside a step ask for a frame, never a tail. */
|
|
139
|
+
enterStep(): void;
|
|
140
|
+
leaveStep(): void;
|
|
141
|
+
/** Inside the engine's `step` right now. */
|
|
142
|
+
stepping(): boolean;
|
|
143
|
+
sleepStats(): SleepStats;
|
|
70
144
|
}
|
|
71
145
|
export declare function createFrameControl(world: World): FrameControl;
|
|
@@ -56,7 +56,10 @@ export interface GuestInstance {
|
|
|
56
56
|
* freeze taken mid-derive parks only AFTER the guest has caught up — the
|
|
57
57
|
* canvas is never photographed between a structural change and its reflow.
|
|
58
58
|
* A guest with no owed-work notion simply omits it (the frame gate then
|
|
59
|
-
* treats it as quiet, which is the honest default).
|
|
59
|
+
* treats it as quiet, which is the honest default). The same answer keeps a
|
|
60
|
+
* SLEEPING loop awake (K7a, frame-control.ts): a guest runs on the frames the
|
|
61
|
+
* engine steps — after a wake — and one that animates on its own clock says
|
|
62
|
+
* so here, or it runs only when something else wakes the loop.
|
|
60
63
|
*/
|
|
61
64
|
busy?: () => boolean;
|
|
62
65
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE WORLD'S OUTSIDE DOORS (2026-09-27, ICE M21 K7a — frame-control.ts's sleep). A write made OUTSIDE a step — an app's
|
|
3
|
+
* command, a rig's camera, the host's viewport sync, a document's transaction projected, a reset or an import — must wake a
|
|
4
|
+
* sleeping loop, or the frame that shows it never comes. Every state-changing method strata names (`WorldMutatorName`,
|
|
5
|
+
* petition 4's exhaustive list, which strata's own devwrite drift test keeps whole) is wrapped ONCE on the world instance
|
|
6
|
+
* to tell its listeners after it returns; the step's own doors (`sync`, `tick`) are not wrapped. A listener decides what a
|
|
7
|
+
* write means — the engine's asks the frame for a wake, which a write INSIDE a step (a system's, a publish hook's, an
|
|
8
|
+
* after-step hook's) never is. The type below fails the build the day strata names a mutator this list does not.
|
|
9
|
+
*/
|
|
10
|
+
import type { World } from "@vibecook/strata-ecs";
|
|
11
|
+
/** Tell `fn` after every write through one of `world`'s doors. Returns an idempotent unwatch. */
|
|
12
|
+
export declare function watchWrites(world: World, fn: () => void): () => void;
|
|
@@ -14,11 +14,21 @@
|
|
|
14
14
|
* write path that didn't already exist — ops BIND existing primitives to
|
|
15
15
|
* the current session.
|
|
16
16
|
*
|
|
17
|
-
* Budgets:
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* Budgets: the frame preview's (children, bytes). Port budgets remain reviewed
|
|
18
|
+
* constants (RUNTIME_BUDGETS) in v1 — recorded. `keepMounted` and `fboBytes`
|
|
19
|
+
* left at design-015 D5b with the mount LRU and the GL ledger.
|
|
20
20
|
*/
|
|
21
21
|
import type { Entity, World } from "@vibecook/strata-ecs";
|
|
22
|
+
import { type CanvasCatalogContribution, type CanvasType } from "../canvas/define-canvas-type";
|
|
23
|
+
import { type EngineCatalog } from "../canvas/engine-catalog";
|
|
24
|
+
import { type PlacementAuthority } from "../canvas/placement";
|
|
25
|
+
import { type CanvasSessionValue } from "../canvas/session";
|
|
26
|
+
import type { CanvasRuntimeExtension, FrameBehavior } from "../canvas/extensions";
|
|
27
|
+
import type { FrameProjection } from "../canvas/frame-projection";
|
|
28
|
+
import { type CanvasDiagnostic } from "../canvas/diagnostics";
|
|
29
|
+
import { type FramePreviewStore } from "../canvas/frame-preview";
|
|
30
|
+
import { type PresentationTransitionCoordinator } from "../canvas/presentation-transition";
|
|
31
|
+
import type { CanvasCatalogSection } from "../canvas/define-canvas-type";
|
|
22
32
|
import { type BehaviorRuntime } from "../behavior/runtime";
|
|
23
33
|
import type { AnyBehaviorDef } from "../behavior/types";
|
|
24
34
|
import { type Engine } from "../engine/engine";
|
|
@@ -31,12 +41,13 @@ import { type WidgetRuntime } from "../widget/mount-store";
|
|
|
31
41
|
import { type SpawnWidgetOpts } from "../widget/spawn";
|
|
32
42
|
import { type Tool } from "../tools/define-tool";
|
|
33
43
|
import { type DocSession, type DocSessionOpts, type OpenDocResult } from "../doc/doc-kit";
|
|
44
|
+
import type { CommitExtender } from "../doc/doc-commit-sink";
|
|
34
45
|
import { type JoinDocOpts, type JoinResult } from "../doc/bootstrap";
|
|
35
46
|
import type { ByteChannel } from "../doc/channels";
|
|
36
47
|
import { type Autosave, type AutosaveOpts, type AutosaveStorageWrite } from "../doc/autosave";
|
|
37
48
|
import { type PresenceOpts, type PresenceSession } from "../presence/presence-kit";
|
|
38
|
-
import type {
|
|
39
|
-
import { GESTURE_DEFAULTS, POINTER_DEFAULTS } from "../settings/defaults";
|
|
49
|
+
import type { EngineGpu } from "../surface/gpu-device";
|
|
50
|
+
import { GESTURE_DEFAULTS, POINTER_DEFAULTS, type WheelMode } from "../settings/defaults";
|
|
40
51
|
export interface CanvasEngineOpts {
|
|
41
52
|
/** Registered widget types (definition happens at defineWidget; this list is validated). */
|
|
42
53
|
readonly widgets?: readonly {
|
|
@@ -44,6 +55,20 @@ export interface CanvasEngineOpts {
|
|
|
44
55
|
}[];
|
|
45
56
|
/** Registered tools (definition happens at defineTool; validated). */
|
|
46
57
|
readonly tools?: readonly Tool[];
|
|
58
|
+
/** Explicit Canvas SDK definitions. Supplying any typed field enables typed mode. */
|
|
59
|
+
readonly canvasTypes?: readonly CanvasType[];
|
|
60
|
+
/** New-document root only; existing documents retain their durable identity. */
|
|
61
|
+
readonly rootCanvas?: CanvasType;
|
|
62
|
+
/** Presentation-only fallback for unknown/incompatible document semantics. */
|
|
63
|
+
readonly presentationFallback?: CanvasType;
|
|
64
|
+
/** Presentation-only sections merged deterministically at compilation. */
|
|
65
|
+
readonly catalogContributions?: readonly CanvasCatalogContribution[];
|
|
66
|
+
/** Governed current-frame runtime definitions compiled by this engine. */
|
|
67
|
+
readonly canvasRuntimeExtensions?: readonly CanvasRuntimeExtension[];
|
|
68
|
+
/** Governed view-independent semantic frame definitions compiled by this engine. */
|
|
69
|
+
readonly frameBehaviors?: readonly FrameBehavior[];
|
|
70
|
+
/** Bounded read-only instance-preview projections compiled by this engine. */
|
|
71
|
+
readonly frameProjections?: readonly FrameProjection[];
|
|
47
72
|
/**
|
|
48
73
|
* Behaviors this engine runs (design-009). Definition is the import
|
|
49
74
|
* side-effect; listing them here COMPILES and installs them — a behavior that
|
|
@@ -53,6 +78,11 @@ export interface CanvasEngineOpts {
|
|
|
53
78
|
readonly behaviors?: readonly AnyBehaviorDef[];
|
|
54
79
|
/** Generic guest breaker routing for hosts that use the published facade. */
|
|
55
80
|
readonly onGuestFault?: (id: string, error: unknown) => void;
|
|
81
|
+
/**
|
|
82
|
+
* A reflector that threw (design-015 D7): the flush contains it — that frame is skipped — and routes it here (default:
|
|
83
|
+
* `console.error`). A host that counts its faults (apps/desk's `window.__desk.faults`, the rigs' "no page errors") passes it.
|
|
84
|
+
*/
|
|
85
|
+
readonly onReflectorFault?: (name: string, error: unknown) => void;
|
|
56
86
|
readonly onGuestNotice?: (message: string) => void;
|
|
57
87
|
/** Behavior-specific routing preserves hook and entity provenance. The two
|
|
58
88
|
* pairs are COMPLEMENTARY, not alternatives: a fault that also strikes the
|
|
@@ -62,31 +92,63 @@ export interface CanvasEngineOpts {
|
|
|
62
92
|
readonly onBehaviorFault?: (behavior: string, hook: string, entity: Entity | undefined, error: unknown) => void;
|
|
63
93
|
readonly onBehaviorLog?: (behavior: string, message: string, rest: readonly unknown[]) => void;
|
|
64
94
|
readonly budgets?: {
|
|
65
|
-
|
|
66
|
-
readonly
|
|
95
|
+
/** Portal-preview limits may be lowered from 128 children / 256 KiB. */
|
|
96
|
+
readonly framePreviewChildren?: number;
|
|
97
|
+
readonly framePreviewBytes?: number;
|
|
67
98
|
};
|
|
68
99
|
readonly settings?: {
|
|
100
|
+
/**
|
|
101
|
+
* The CameraLimits clamp. The desk's is infinite: `{ min: 1e-8, max: 1e8 }`
|
|
102
|
+
* (design-015 §9) — every camera path holds finite and invertible there.
|
|
103
|
+
*/
|
|
69
104
|
readonly zoom?: {
|
|
70
105
|
readonly min?: number;
|
|
71
106
|
readonly max?: number;
|
|
72
107
|
};
|
|
73
|
-
|
|
108
|
+
/**
|
|
109
|
+
* GestureSettings seeds. `wheel` is a plain wheel's job (design-015 §9,
|
|
110
|
+
* D-D11): "pan" (default) or the desk's "zoom" about the pointer by
|
|
111
|
+
* `zoom · exp(−Δ · wheelZoomRate)` (default rate 0.0016, the prototype's).
|
|
112
|
+
*/
|
|
113
|
+
readonly gestures?: Partial<Record<Exclude<keyof typeof GESTURE_DEFAULTS, "wheel">, number>> & {
|
|
114
|
+
readonly wheel?: WheelMode;
|
|
115
|
+
};
|
|
74
116
|
readonly pointers?: Partial<Record<keyof typeof POINTER_DEFAULTS, number>>;
|
|
75
117
|
readonly snap?: {
|
|
76
118
|
readonly enabled?: boolean;
|
|
77
119
|
readonly thresholdPx?: number;
|
|
78
120
|
};
|
|
79
|
-
/** Selection-chrome
|
|
121
|
+
/** Selection-chrome knob: liftScale = the app's visual drag-lift scale (the resize handles wrap it). */
|
|
80
122
|
readonly chrome?: {
|
|
81
123
|
readonly liftScale?: number;
|
|
82
124
|
};
|
|
125
|
+
/**
|
|
126
|
+
* Nav seeds (design-015 §9 — D2b). `zoomThrough`: a wheel zoom that leaves a container's
|
|
127
|
+
* face covering the view by `in` CSS px cuts into it, one that leaves the current frame's
|
|
128
|
+
* face `out` px short cuts back out — off unless `enabled` (the desk's is on); `gate` is the
|
|
129
|
+
* face's short side (CSS px) across which a live inside comes in (a face enters only at 1).
|
|
130
|
+
*/
|
|
131
|
+
readonly nav?: {
|
|
132
|
+
readonly zoomThrough?: {
|
|
133
|
+
readonly enabled?: boolean;
|
|
134
|
+
readonly in?: number;
|
|
135
|
+
readonly out?: number;
|
|
136
|
+
readonly gate?: readonly [number, number];
|
|
137
|
+
};
|
|
138
|
+
};
|
|
83
139
|
};
|
|
84
140
|
readonly policy?: {
|
|
85
141
|
/** The gate verdict a "migrate"-classified doc downgrades to when migration is off/fails. */
|
|
86
142
|
readonly versionGate?: "reject" | "readOnly" | "migrate";
|
|
87
143
|
};
|
|
88
|
-
/**
|
|
89
|
-
|
|
144
|
+
/**
|
|
145
|
+
* The engine's GPU device (design-012 §4; the device door since design-015 D5b): acquire it with
|
|
146
|
+
* `acquireCompositorDevice()` before constructing the engine and pass it here. ONE device per engine
|
|
147
|
+
* (D7): the desk's layer draws with it — `createDeskHost` hands it through the layer context — and never
|
|
148
|
+
* acquires its own, so its `errors()` sees the desk's uncaptured GPU errors; the app owns its end of life.
|
|
149
|
+
* Absent — the common case, and every headless engine — the desk acquires its own device.
|
|
150
|
+
*/
|
|
151
|
+
readonly compositorDevice?: EngineGpu;
|
|
90
152
|
}
|
|
91
153
|
export interface CanvasOps {
|
|
92
154
|
/** cancel active gestures → switch (design-003 §8; the strata-example lesson). */
|
|
@@ -112,6 +174,15 @@ export interface CanvasOps {
|
|
|
112
174
|
selectAll(): void;
|
|
113
175
|
/** Sibling-sequence sweep, one tx: the ids to the frame top/bottom (petition 8). */
|
|
114
176
|
reorder(ids: readonly Entity[], mode: "top" | "bottom"): void;
|
|
177
|
+
/**
|
|
178
|
+
* Tape widgets down, or lift the tape (design-015 §5.1, *Marks on the Mat*
|
|
179
|
+
* Q-e): writes the durable `Locked` tag on every id that is a widget of the
|
|
180
|
+
* current frame whose state differs, in ONE transaction (one undo step; no
|
|
181
|
+
* transaction at all when nothing changes). A taped widget is never moved or
|
|
182
|
+
* resized by a gesture and the marquee passes over it; it stays selectable,
|
|
183
|
+
* pickable and openable. Refuses on a read-only document like every write op.
|
|
184
|
+
*/
|
|
185
|
+
setLocked(ids: readonly Entity[], locked: boolean): void;
|
|
115
186
|
/**
|
|
116
187
|
* Desktop-style Clean Up (kernel packLayout): tidy reading-order rows, one
|
|
117
188
|
* undo step, 240ms glide (durationMs: 0 snaps). Scope: ids > selection ≥2 >
|
|
@@ -138,6 +209,32 @@ export interface CanvasOps {
|
|
|
138
209
|
/** Pop several levels in ONE transition (breadcrumb jumps; design-006 §5). */
|
|
139
210
|
exitTo(targetDepth: number, opts?: NavOpts): void;
|
|
140
211
|
cancelActiveGestures(): void;
|
|
212
|
+
/**
|
|
213
|
+
* Pick an object up into the hand (design-015 §8, D4b): the ONE writer of the runtime `Held`
|
|
214
|
+
* tag (with a fresh `HeldView`) — no camera moves, the renderer lifts the object to its reading
|
|
215
|
+
* size and the desk behind goes out of focus. The object is selected as it is picked up (it
|
|
216
|
+
* stays selected when put down, so ⏎ opens it again) and any live gesture is cancelled. Refused
|
|
217
|
+
* — an Error, like `enterContainer` on a non-container — for an entity that is not a live object
|
|
218
|
+
* of the current frame whose type declares `openable` (its kind has an `open` binding), and while
|
|
219
|
+
* another object is held (put that one down first). Never a document write. The object's tool in
|
|
220
|
+
* hand (`HeldTool`, D3t-a) comes with it: its type's `heldTool` of its props, else its first mode.
|
|
221
|
+
*/
|
|
222
|
+
open(entity: Entity): void;
|
|
223
|
+
/** Put the held object down (design-015 §8): `Held`, `HeldView` and `HeldTool` leave; the renderer flies it home. Nothing held: no-op. */
|
|
224
|
+
putDown(): void;
|
|
225
|
+
/**
|
|
226
|
+
* Use a tool of the held bar (design-015 §8; D3t-a — widget/held-tools.ts): a `mode` becomes the held object's ACTIVE
|
|
227
|
+
* tool (`HeldTool` — a runtime write, the user's fact; a `toggle` mode chosen again hands back the one before it), an
|
|
228
|
+
* `action` runs its op once (its transaction, the document's undo or redo). False when nothing is held, the held type
|
|
229
|
+
* names no such tool, or the tool is declared only.
|
|
230
|
+
*/
|
|
231
|
+
useHeldTool(id: string): boolean;
|
|
232
|
+
/**
|
|
233
|
+
* Run a SELECTION MENU act (design-016 §5 · K-L2, K8a — widget/menu-actions.ts): the act `id` of the selected objects' types, each
|
|
234
|
+
* declaring type's `run` handed its own selected objects. False when nothing selected declares it (the menu shows an act only when
|
|
235
|
+
* every selected object's type does; an app's key reaches the ones that do).
|
|
236
|
+
*/
|
|
237
|
+
runMenuAction(id: string): boolean;
|
|
141
238
|
}
|
|
142
239
|
export interface CanvasDocs {
|
|
143
240
|
create(opts?: DocSessionOpts): DocSession;
|
|
@@ -155,6 +252,16 @@ export interface CanvasDocs {
|
|
|
155
252
|
};
|
|
156
253
|
}): Promise<JoinResult>;
|
|
157
254
|
current(): DocSession | undefined;
|
|
255
|
+
/**
|
|
256
|
+
* A layer's word on a gesture's landing: `extend` runs INSIDE every gesture's committing transaction (a move, a consume,
|
|
257
|
+
* a resize, a create…), after the gesture's own writes, with the intent that made them — so what it adds is the gesture's
|
|
258
|
+
* undo step, not a second one (the desk sticks a note to a calendar's day this way: the pin and the slot land with the
|
|
259
|
+
* move, one ⌘Z takes the whole drop back). A cancelled gesture commits nothing and so reaches no extender. Registered on
|
|
260
|
+
* the engine, not a session: it serves every document this engine opens until the returned function is called.
|
|
261
|
+
*/
|
|
262
|
+
extendCommits(extend: CommitExtender): () => void;
|
|
263
|
+
/** Add compiled widget capability requirements before creating their content. */
|
|
264
|
+
upgradeCapabilities(widgetTypeIds: readonly string[]): boolean;
|
|
158
265
|
/**
|
|
159
266
|
* Attach facade presence to an ALREADY-live document (petition I18) — for
|
|
160
267
|
* hosts that own their document lifecycle (`create()`/`open()` + their own
|
|
@@ -204,9 +311,27 @@ export interface StageControl {
|
|
|
204
311
|
/** Live hold names, in take order (debug/devtools). */
|
|
205
312
|
holds(): readonly string[];
|
|
206
313
|
}
|
|
314
|
+
/** Headless current-canvas surface consumed by trays, keymaps, and adapters. */
|
|
315
|
+
export interface CurrentCanvasScope {
|
|
316
|
+
current(): CanvasSessionValue;
|
|
317
|
+
type(): CanvasType;
|
|
318
|
+
catalog(): readonly CanvasCatalogSection[];
|
|
319
|
+
tools(): readonly Tool[];
|
|
320
|
+
/** Stable, locally derived compatibility/policy diagnostics for the attached document. */
|
|
321
|
+
diagnostics(): readonly CanvasDiagnostic[];
|
|
322
|
+
subscribe(onChange: () => void): () => void;
|
|
323
|
+
}
|
|
207
324
|
export interface CanvasEngine {
|
|
208
325
|
readonly world: World;
|
|
209
326
|
readonly engine: Engine;
|
|
327
|
+
/** Immutable definition authority for this engine instance. */
|
|
328
|
+
readonly catalog: EngineCatalog;
|
|
329
|
+
/** The one semantic authority used by all local placement paths. */
|
|
330
|
+
readonly placement: PlacementAuthority;
|
|
331
|
+
/** Resource-backed current CanvasType/catalog/tool projection. */
|
|
332
|
+
readonly canvas: CurrentCanvasScope;
|
|
333
|
+
/** Demand-driven semantic projections for visible container previews. */
|
|
334
|
+
readonly previews: FramePreviewStore;
|
|
210
335
|
/**
|
|
211
336
|
* The behavior runtime (design-009 §6): attach/detach/has/read for
|
|
212
337
|
* runtime-class behaviors, plus `list()` for devtools and the doctor.
|
|
@@ -218,6 +343,8 @@ export interface CanvasEngine {
|
|
|
218
343
|
readonly runtime: WidgetRuntime & {
|
|
219
344
|
uninstall(): void;
|
|
220
345
|
};
|
|
346
|
+
/** Trusted cross-package retention seam for cut-first canvas transitions. */
|
|
347
|
+
readonly transitions: PresentationTransitionCoordinator;
|
|
221
348
|
readonly nav: NestedCanvas;
|
|
222
349
|
readonly ops: CanvasOps;
|
|
223
350
|
readonly docs: CanvasDocs;
|
|
@@ -230,9 +357,15 @@ export interface CanvasEngine {
|
|
|
230
357
|
* whether you hold the facade or the raw engine.
|
|
231
358
|
*/
|
|
232
359
|
readonly frame: FrameControl;
|
|
360
|
+
/**
|
|
361
|
+
* The app-owned GPU device when the app passed one (design-012 §4); undefined
|
|
362
|
+
* otherwise. `dispose()` deliberately does NOT destroy it: the device outlives
|
|
363
|
+
* layers by design, and its owner is the app that acquired it.
|
|
364
|
+
*/
|
|
365
|
+
readonly compositorDevice?: EngineGpu;
|
|
233
366
|
readonly budgets: {
|
|
234
|
-
readonly
|
|
235
|
-
readonly
|
|
367
|
+
readonly framePreviewChildren: number;
|
|
368
|
+
readonly framePreviewBytes: number;
|
|
236
369
|
};
|
|
237
370
|
/** step(now) passthrough — the app's rAF loop drives this. */
|
|
238
371
|
step(now: number): void;
|