@vibecook/ice 0.10.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-5FQS7V2C.js → chunk-DYK6KNLG.js} +13303 -7485
- 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 +34 -13
- 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-5FQS7V2C.js.map +0 -1
- package/dist/chunk-JWRHAM7L.js +0 -1163
- package/dist/chunk-JWRHAM7L.js.map +0 -1
- package/dist/chunk-MFTMPJUF.js +0 -681
- package/dist/chunk-MFTMPJUF.js.map +0 -1
- package/dist/chunk-OR5FNVUE.js.map +0 -1
- package/dist/ground.js +0 -1213
- 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 -103
- 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-classic.d.ts +0 -30
- package/dist/types/packages/ground/src/passes/grid-magnet.d.ts +0 -31
- package/dist/types/packages/ground/src/passes/grid.d.ts +0 -28
- 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,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Magnet-grid collector — the pure ECS→packed-sources half of the magnet pass
|
|
3
|
-
* (design-010 §4; the `*-collect.ts` convention: imports ONLY core/kernel so
|
|
4
|
-
* it unit-tests under happy-dom with no GPU and no three import).
|
|
5
|
-
*
|
|
6
|
-
* Ported from vibe-field draft/magnet-grid `main.js` (latticeWindow,
|
|
7
|
-
* packCards) with the design-010 upgrades the experiment lacked:
|
|
8
|
-
* - rbush broad-phase over the ONE spatial index instead of an all-cards
|
|
9
|
-
* walk (D2 — document size becomes irrelevant by construction);
|
|
10
|
-
* - N poles from injected sources, packed as DEGENERATE rounded boxes
|
|
11
|
-
* (half = 0, r = 0 — reduces exactly to the point-charge formula, D3);
|
|
12
|
-
* - `maxSources` prioritization (largest screen area, then nearest to the
|
|
13
|
-
* viewport center; poles pack first and are never evicted);
|
|
14
|
-
* - `fadeZoom` — the field quiets below a zoom threshold (scale 0 skips the
|
|
15
|
-
* spatial query entirely: the cheap valve is also the right look).
|
|
16
|
-
*/
|
|
17
|
-
import { type Entity, type GridConfig, type GridMagnetConfig, type World } from "../../../core/src/index";
|
|
18
|
-
import { type AABB, type SpatialEntry } from "../../../kernel/src/index";
|
|
19
|
-
import type { GroundFrame } from "../pass";
|
|
20
|
-
import type { Pole } from "../poles";
|
|
21
|
-
/** Floats per packed source: [cx, cy, hx, hy] + [r, strength, 0, 0] (screen px). */
|
|
22
|
-
export declare const MAGNET_SOURCE_FLOATS = 8;
|
|
23
|
-
/** Source-buffer capacity — the scratch array and GPU buffer are sized to this. */
|
|
24
|
-
export declare const MAX_MAGNET_SOURCES = 256;
|
|
25
|
-
/** Per-level instance guard (vibe-field main.js:621 — a level beyond it draws nothing). */
|
|
26
|
-
export declare const MAX_MAGNET_INSTANCES = 220000;
|
|
27
|
-
/** The broad-phase reader over the shared spatial index (ctx seam, design-010 §3.2). */
|
|
28
|
-
export type ReadSpatial = (bounds: AABB) => readonly SpatialEntry<Entity>[];
|
|
29
|
-
/** Resolve the partial config block over the defaults — the ONE resolution point. */
|
|
30
|
-
export declare function resolveMagnet(cfg: GridConfig): GridMagnetConfig;
|
|
31
|
-
/** Closed-form fade ladder (grid.ts:72-74 re-expressed in JS for level skip). */
|
|
32
|
-
export declare function fadeOpacity(cssSpacing: number, fadeIn: readonly [number, number], fadeOut: readonly [number, number]): number;
|
|
33
|
-
/**
|
|
34
|
-
* The field zoom valve: 1 at `zoom ≥ fadeZoom`, lerping to 0 across
|
|
35
|
-
* [0.7·fadeZoom, fadeZoom]. 0 disables the valve entirely.
|
|
36
|
-
*/
|
|
37
|
-
export declare function magnetFieldScale(zoom: number, fadeZoom: number): number;
|
|
38
|
-
/** One lattice level's visible window + fade (vibe-field main.js:81-91 port). */
|
|
39
|
-
export interface MagnetLevel {
|
|
40
|
-
/** Integer lattice coords of the window origin. */
|
|
41
|
-
readonly i0: number;
|
|
42
|
-
readonly j0: number;
|
|
43
|
-
readonly cols: number;
|
|
44
|
-
readonly rows: number;
|
|
45
|
-
/** Instances to draw; 0 = level skipped (faded out or over the guard). */
|
|
46
|
-
readonly count: number;
|
|
47
|
-
/** Fade-ladder opacity × level weight (CPU-baked; the shader gets one alpha). */
|
|
48
|
-
readonly alpha: number;
|
|
49
|
-
/**
|
|
50
|
-
* Coincidence skip (design-010 §5.4): when the NEXT level up is visible and
|
|
51
|
-
* its spacing is an integer multiple m of this one, sites whose absolute
|
|
52
|
-
* lattice index is ≡ 0 (mod m) on both axes drop out — replicating the
|
|
53
|
-
* classic shader's max-composite look. 0 = no skip.
|
|
54
|
-
*/
|
|
55
|
-
readonly skipModulo: number;
|
|
56
|
-
}
|
|
57
|
-
export declare function collectMagnetLevels(frame: GroundFrame, cfg: GridConfig): MagnetLevel[];
|
|
58
|
-
/**
|
|
59
|
-
* Pack field sources into `out` (stride {@link MAGNET_SOURCE_FLOATS}, screen
|
|
60
|
-
* CSS px). Returns the packed count. `fieldScale` multiplies every strength
|
|
61
|
-
* (the zoom valve); 0 short-circuits to an empty buffer — no spatial query.
|
|
62
|
-
*/
|
|
63
|
-
export declare function collectMagnetSources(world: World, frame: GroundFrame, magnet: GridMagnetConfig, fieldScale: number, poles: readonly Pole[], readSpatial: ReadSpatial | undefined, out: Float32Array): number;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Triangle-soup builders — the PURE half of the geometry passes (no three
|
|
3
|
-
* import; unit-tested under happy-dom). Collectors emit screen-px triangles
|
|
4
|
-
* with per-vertex rgba into a growable soup; the three-side `soup-mesh`
|
|
5
|
-
* uploads them. MSAA (renderer antialias) smooths edges, matching the old 2D
|
|
6
|
-
* canvases' stroke AA closely enough at 1–2 px widths.
|
|
7
|
-
*/
|
|
8
|
-
export interface TriSoup {
|
|
9
|
-
/** xyz per vertex (z = 0 — the layer renders flat in screen space). */
|
|
10
|
-
positions: Float32Array;
|
|
11
|
-
/** rgba per vertex, 0-1. */
|
|
12
|
-
colors: Float32Array;
|
|
13
|
-
vertexCount: number;
|
|
14
|
-
}
|
|
15
|
-
export type Rgba = readonly [number, number, number, number];
|
|
16
|
-
export declare class SoupBuilder {
|
|
17
|
-
private pos;
|
|
18
|
-
private col;
|
|
19
|
-
private vert;
|
|
20
|
-
/** Axis-aligned rect (two triangles). */
|
|
21
|
-
rect(x: number, y: number, w: number, h: number, c: Rgba): void;
|
|
22
|
-
/** Stroke segment (a→b) of `width`, flat caps — a quad across the segment normal. */
|
|
23
|
-
segment(ax: number, ay: number, bx: number, by: number, width: number, c: Rgba): void;
|
|
24
|
-
/** Stroke a polyline (interleaved xy) as per-segment quads (smooth-curve joins). */
|
|
25
|
-
polyline(points: ArrayLike<number>, width: number, c: Rgba): void;
|
|
26
|
-
/** Filled disc as a triangle fan (MSAA smooths the rim; 16 segs ≈ round at ≤8 px). */
|
|
27
|
-
disc(cx: number, cy: number, r: number, c: Rgba, segments?: number): void;
|
|
28
|
-
build(): TriSoup;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* `rgba(r, g, b, a)` / `rgb(…)` / `#rrggbb` → [r,g,b,a] 0-1 (the WiresConfig
|
|
32
|
-
* colors are CSS strings — v1/2D-canvas heritage). Unknown formats fall back
|
|
33
|
-
* to opaque mid-gray rather than throwing in a reflector path.
|
|
34
|
-
*/
|
|
35
|
-
export declare function parseCssColor(css: string): Rgba;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Wires collector — the pure ECS→triangles half of the wires pass. Port of
|
|
3
|
-
* the 2D-canvas wires reflector's drawing, kernel-tessellated:
|
|
4
|
-
*
|
|
5
|
-
* - Wire geometry NEVER reads a port ENTITY (design-001 §5.3): endpoints
|
|
6
|
-
* resolve from the wire's `WireFrom`/`WireTo` widgets + `WirePorts` ids
|
|
7
|
-
* against the type registry's static port schema (core `portSlots` — the
|
|
8
|
-
* old local resolver's TODO, retired), so a CULLED endpoint still draws.
|
|
9
|
-
* - Cubics build in WORLD space then map control points through the kernel
|
|
10
|
-
* `worldToScreen` seam — bezier curves are affine-invariant, so the mapped
|
|
11
|
-
* cubic IS the screen curve — and `tessellateCubic` (0.25 px tolerance)
|
|
12
|
-
* flattens with density that tracks zoom for free.
|
|
13
|
-
* - Connect preview: solid when snapped-compatible, dashed [6,4] otherwise
|
|
14
|
-
* (dash placement from the tessellation's arc-length prefix).
|
|
15
|
-
* - Materialized port dots: triangle-fan discs, active color while any
|
|
16
|
-
* connect drag is routed.
|
|
17
|
-
*/
|
|
18
|
-
import { type Entity, type WirePreviewBuffer, type WiresConfig, type World } from "../../../core/src/index";
|
|
19
|
-
import { type Rect } from "../../../kernel/src/index";
|
|
20
|
-
import type { GroundFrame } from "../pass";
|
|
21
|
-
import { type TriSoup } from "./soup-collect";
|
|
22
|
-
export declare const wireQ: import("@vibecook/strata-ecs").Query;
|
|
23
|
-
export declare const geometryQ: import("@vibecook/strata-ecs").Query;
|
|
24
|
-
export declare const measuredQ: import("@vibecook/strata-ecs").Query;
|
|
25
|
-
export declare const selectedQ: import("@vibecook/strata-ecs").Query;
|
|
26
|
-
export declare const portQ: import("@vibecook/strata-ecs").Query;
|
|
27
|
-
export declare const routedConnectQ: import("@vibecook/strata-ecs").Query;
|
|
28
|
-
/** A live connect drag moves the preview every frame — Drag value dirt covers it. */
|
|
29
|
-
export declare const connectDragQ: import("@vibecook/strata-ecs").Query;
|
|
30
|
-
/** Nav churn signal: Active membership flips re-collect (scope filter below). */
|
|
31
|
-
export declare const activeQ: import("@vibecook/strata-ecs").Query;
|
|
32
|
-
/** Effective widget rect: non-zero MeasuredSize over Size (design-004 §2).
|
|
33
|
-
* Exported for the magnet collector (design-010 §4) — ONE rect-reading rule. */
|
|
34
|
-
export declare function readWidgetRect(world: World, e: Entity): Rect | undefined;
|
|
35
|
-
export declare function collectWires(world: World, frame: GroundFrame, config?: WiresConfig, preview?: WirePreviewBuffer): TriSoup;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Wires pass — the three-side wrapper over the pure `collectWires` (renders
|
|
3
|
-
* above the grid, below the guides, matching the old P0 canvas order).
|
|
4
|
-
* Dirt mirrors the old 2D reflector's observers; the connect preview rides
|
|
5
|
-
* `[RoutedConnect, Drag]` value dirt (the buffer updates exactly when the
|
|
6
|
-
* connect recognizer's Drag advances) instead of a per-frame value diff.
|
|
7
|
-
*/
|
|
8
|
-
import { type WirePreviewBuffer, type WiresConfig } from "../../../core/src/index";
|
|
9
|
-
import type { GroundPass } from "../pass";
|
|
10
|
-
export declare function createWiresPass(initial?: Partial<WiresConfig>, readPreview?: () => WirePreviewBuffer): GroundPass;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Magnet pole sources (design-010 §3.3, decision D5): the grid pass is
|
|
3
|
-
* CURSOR-AGNOSTIC — point field sources enter through this injected protocol,
|
|
4
|
-
* never through pass-known vocabulary. No source wired ⇒ no subscription, no
|
|
5
|
-
* reads, widget-only field. The canned helpers below are where any cursor
|
|
6
|
-
* dependency lives; the pass imports NEITHER — apps compose what fits
|
|
7
|
-
* (vibe-field wraps its own `Cur` halo the same way, in its own repo).
|
|
8
|
-
*/
|
|
9
|
-
import { type World } from "../../core/src/index";
|
|
10
|
-
/**
|
|
11
|
-
* One point field source. Packed as a degenerate rounded-box SDF (half = 0,
|
|
12
|
-
* r = 0), which reduces exactly to the point-charge formula (design-010 D3).
|
|
13
|
-
* `space` defaults to "world"; "screen" is CSS px — zero-conversion for
|
|
14
|
-
* screen-space cursors (field evaluation is screen-space anyway).
|
|
15
|
-
*/
|
|
16
|
-
export interface Pole {
|
|
17
|
-
readonly x: number;
|
|
18
|
-
readonly y: number;
|
|
19
|
-
/** Relative field strength; ≤ 0 poles are skipped at pack time. */
|
|
20
|
-
readonly strength: number;
|
|
21
|
-
readonly space?: "world" | "screen";
|
|
22
|
-
}
|
|
23
|
-
export interface PoleSource {
|
|
24
|
-
/** Called during collect — read-only world access (GroundPass.collect rules). */
|
|
25
|
-
read(world: World): readonly Pole[];
|
|
26
|
-
/**
|
|
27
|
-
* Called during arm — `wake` marks the grid pass dirty (the pass gates it on
|
|
28
|
-
* `magnet.enabled`, so idle scenes stay at zero frames). Returns unsubscriber.
|
|
29
|
-
*/
|
|
30
|
-
subscribe(world: World, wake: () => void): () => void;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Poles from the local pointer entity (`LocalPointer` + `PointerWorld`) — the
|
|
34
|
-
* raw-cursor wiring for apps without their own cursor visual. World-space; one
|
|
35
|
-
* pole per local pointer (multi-touch yields one per finger while pressed).
|
|
36
|
-
*/
|
|
37
|
-
export declare function localPointerPoles(opts?: {
|
|
38
|
-
readonly strength?: number;
|
|
39
|
-
}): PoleSource;
|
|
40
|
-
/**
|
|
41
|
-
* Poles from cursor-visual entities (`Position` + `CursorVisual`) — presence
|
|
42
|
-
* apps: remote collaborators' pooled cursors (core `remote-cursors.ts`) drive
|
|
43
|
-
* the field. This helper is where the CursorVisual dependency lives (D5).
|
|
44
|
-
*/
|
|
45
|
-
export declare function cursorVisualPoles(opts?: {
|
|
46
|
-
readonly strength?: number;
|
|
47
|
-
}): PoleSource;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Camera, Scene } from "three/webgpu";
|
|
2
|
-
/** The layer's renderer seam — tests inject a fake (compositor `GlLike` precedent). */
|
|
3
|
-
export interface GroundRendererLike {
|
|
4
|
-
readonly canvas: HTMLCanvasElement;
|
|
5
|
-
ready(): boolean;
|
|
6
|
-
failed(): boolean;
|
|
7
|
-
/** Register a one-shot "became ready" callback (fires immediately if already ready). */
|
|
8
|
-
onReady(cb: () => void): void;
|
|
9
|
-
setSize(cssW: number, cssH: number, dpr: number): void;
|
|
10
|
-
render(scene: Scene, camera: Camera): void;
|
|
11
|
-
dispose(): void;
|
|
12
|
-
}
|
|
13
|
-
export declare function createGroundRenderer(doc: Document, opts?: {
|
|
14
|
-
forceWebGL?: boolean;
|
|
15
|
-
}): GroundRendererLike;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../ground/src/index";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../r3f/src/index";
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FBO-pool eviction policy — ported from v1 `eviction.ts` (pure part of the
|
|
3
|
-
* pool). Priority: Cold(0) < Warm(1) < Dormant(2); LRU within a phase;
|
|
4
|
-
* Hot/Waking are never evicted even under an impossible budget.
|
|
5
|
-
*/
|
|
6
|
-
export type IslandPhase = "Hot" | "Warm" | "Waking" | "Cold" | "Dormant";
|
|
7
|
-
export interface EvictionCandidate<Id> {
|
|
8
|
-
id: Id;
|
|
9
|
-
phase: IslandPhase;
|
|
10
|
-
bytes: number;
|
|
11
|
-
lastUsedMs: number;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* The island phase truth table (design-004 §3; v1 `computePhase` verbatim —
|
|
15
|
-
* RFC-002 pinned it with tests). `active` is the nested-canvas membership
|
|
16
|
-
* signal (always true until M8); `hasFbo` splits Warm (retained texture,
|
|
17
|
-
* composite-ready) from Waking (must paint before compositing) — after an
|
|
18
|
-
* eviction a re-entering island comes back as Waking, after a plain cull
|
|
19
|
-
* round-trip it comes back Warm from the retained texture.
|
|
20
|
-
*/
|
|
21
|
-
export declare function computeIslandPhase(active: boolean, visible: boolean, animating: boolean, hasFbo: boolean): IslandPhase;
|
|
22
|
-
/** Ordered ids to release so total bytes ≤ budget. Pure. */
|
|
23
|
-
export declare function selectEvictions<Id>(candidates: EvictionCandidate<Id>[], totalBytes: number, maxBytes: number): Id[];
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hysteresis-banded zoom-resolution policy — ported from v1 `ZoomBands.ts`
|
|
3
|
-
* (RFC-002). An island FBO is allocated at `widget bounds × dpr × band(zoom)`;
|
|
4
|
-
* while zoom stays within `[band × 0.5, band × 2]` no repaint is needed.
|
|
5
|
-
* Bands are powers of 2 (each covers a 4× display range).
|
|
6
|
-
*/
|
|
7
|
-
export declare const ZOOM_BANDS: readonly [0.0625, 0.125, 0.25, 0.5, 1, 2, 4, 8, 16];
|
|
8
|
-
/** Smallest band ≥ zoom (clamped to the ladder). */
|
|
9
|
-
export declare function selectBand(zoom: number): number;
|
|
10
|
-
/**
|
|
11
|
-
* True when zoom left the `[band × 0.5, band × 2]` window of the band the
|
|
12
|
-
* island was painted at. `paintedBand ≤ 0` = never painted (handled elsewhere).
|
|
13
|
-
*/
|
|
14
|
-
export declare function isOutOfBand(currentZoom: number, paintedBand: number): boolean;
|
|
15
|
-
/** FBO pixel size for a widget at a band (v1: `bounds × dpr × band`, min 1px). */
|
|
16
|
-
export declare function fboPixelSize(worldWidth: number, worldHeight: number, dpr: number, band: number): {
|
|
17
|
-
width: number;
|
|
18
|
-
height: number;
|
|
19
|
-
};
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The GL bridge — the engine↔R3F seam (design-004 §3, two-level invalidation).
|
|
3
|
-
*
|
|
4
|
-
* Owns everything ENGINE-facing: the module-side island state, the island
|
|
5
|
-
* registry (scene+camera handles the frame pass iterates), per-island dirt
|
|
6
|
-
* observers, the `r3fInvalidator`/`r3fAdvance` reflectors, `useIslandFrame`
|
|
7
|
-
* callbacks, the render write trap, and entity-death cleanup. Everything
|
|
8
|
-
* GL-facing (FBO pool, quads, the actual passes) lives in `GLViews`, whose
|
|
9
|
-
* lifetime is the Canvas/context's — the bridge outlives Canvas remounts
|
|
10
|
-
* (HMR) and carries the frame wiring across them.
|
|
11
|
-
*
|
|
12
|
-
* Two-level invalidation, mechanized:
|
|
13
|
-
* - COMPOSITE dirt (cheap — re-run the frame pass, sample cached textures):
|
|
14
|
-
* camera/viewport via the reflector; per-island Position Tier-3; the frame
|
|
15
|
-
* ChildOf reorder wake (petition 8 — quad renderOrder is sibling order);
|
|
16
|
-
* island enter/exit via register/unregister. All call `requestFrame()`.
|
|
17
|
-
* - ISLAND dirt (expensive — repaint the FBO): per-island props-group and
|
|
18
|
-
* Size Tier-3 → `bumpPaint()` + `requestFrame()`; the animation signal
|
|
19
|
-
* (declared `animated` / live `useIslandFrame` refs) and band crossings
|
|
20
|
-
* are evaluated IN the frame pass (band repaints suppressed while
|
|
21
|
-
* `Camera.gesturing`; the gesture-end camera write re-fires the reflector,
|
|
22
|
-
* so the once-at-gesture-end repaint needs no extra machinery).
|
|
23
|
-
*
|
|
24
|
-
* REFLECT-PHASE ADVANCE (design-004 §3 amendment, 2026-07-20 — the pan-lag
|
|
25
|
-
* fix): the composite render is driven FROM the engine's reflect phase, not
|
|
26
|
-
* from R3F's demand loop. `requestFrame()` only latches `wantsFrame`; the
|
|
27
|
-
* `r3fAdvance` reflector (`always: true` — registered right after the
|
|
28
|
-
* observed invalidator so same-flush dirt is consumed) calls the wired
|
|
29
|
-
* `renderNow` (R3F `advance`) synchronously. DOM plane transforms and the GL
|
|
30
|
-
* composite therefore commit in the SAME task and present in the same frame.
|
|
31
|
-
* The prior wiring (`invalidate()` → R3F's own rAF) could only arm R3F for
|
|
32
|
-
* the NEXT frame, and rAF registration order between the two loops is sticky
|
|
33
|
-
* luck — field-measured on 2026-07-20: R3F rendering the PREVIOUS frame's
|
|
34
|
-
* camera while the DOM plane showed the current one, a permanent one-frame
|
|
35
|
-
* smear under fast pans. Ambient animation rides the same seam: the pass
|
|
36
|
-
* reports its self-sustain plan via `schedulePass`, and the due-time check
|
|
37
|
-
* replaces the old wake-up timer (the engine loop runs every frame anyway).
|
|
38
|
-
* The Canvas must mount `frameloop="never"` — a self-scheduling loop would
|
|
39
|
-
* re-render out of phase again.
|
|
40
|
-
*
|
|
41
|
-
* Runtime-three-free (type-only imports): unit tests drive the bridge with a
|
|
42
|
-
* real world and fake scene/camera handles, no GL context.
|
|
43
|
-
*/
|
|
44
|
-
import type { OrthographicCamera, Scene } from "three";
|
|
45
|
-
import { type Engine, type Entity, type SiblingOrderIndex } from "../../core/src/index";
|
|
46
|
-
import { type IslandStateStore } from "./island-state";
|
|
47
|
-
import { type RenderWriteTrap } from "./dev-write-trap";
|
|
48
|
-
export interface IslandHandle {
|
|
49
|
-
readonly scene: Scene;
|
|
50
|
-
readonly camera: OrthographicCamera;
|
|
51
|
-
}
|
|
52
|
-
/** `useIslandFrame` callback: dt in ms, fired only on frames its island paints. */
|
|
53
|
-
export type IslandFrameCallback = (dtMs: number) => void;
|
|
54
|
-
export interface GLBridgeOpts {
|
|
55
|
-
/** Arm the zero-render→ECS-writes trap (DEV builds / traces). Default false. */
|
|
56
|
-
readonly devAssertRenderWrites?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Injected monotonic clock for the ambient-animation due-time (tests pass a
|
|
59
|
-
* stub — the pool's injected-`now` precedent). Default `performance.now`.
|
|
60
|
-
*/
|
|
61
|
-
readonly now?: () => number;
|
|
62
|
-
}
|
|
63
|
-
export interface GLBridge {
|
|
64
|
-
readonly engine: Engine;
|
|
65
|
-
readonly state: IslandStateStore;
|
|
66
|
-
readonly renderAssert: RenderWriteTrap;
|
|
67
|
-
/**
|
|
68
|
-
* The frame ordinal cache (petition 8): the compositor pass reads quad
|
|
69
|
-
* renderOrder from it, and its `ordinals()` read resets the staleness the
|
|
70
|
-
* bridge's reorder wake filters on — bridge and pass MUST share it.
|
|
71
|
-
*/
|
|
72
|
-
readonly order: SiblingOrderIndex;
|
|
73
|
-
/**
|
|
74
|
-
* Island mount (the `<Island>` component): registers the scene/camera pair,
|
|
75
|
-
* stamps `animatedDecl` from the widget type, and arms the per-island dirt
|
|
76
|
-
* observers. The returned cleanup removes handle + observers ONLY — state
|
|
77
|
-
* and any pooled FBO survive (retention is decoupled from cull; they die on
|
|
78
|
-
* entity death, reset, or eviction).
|
|
79
|
-
*/
|
|
80
|
-
registerIsland(entity: Entity, handle: IslandHandle): () => void;
|
|
81
|
-
islandFor(entity: Entity): IslandHandle | undefined;
|
|
82
|
-
islands(): IterableIterator<[Entity, IslandHandle]>;
|
|
83
|
-
/** Subscribe a paint-time callback; holds an animation ref while live. */
|
|
84
|
-
addFrameCallback(entity: Entity, cb: IslandFrameCallback): () => void;
|
|
85
|
-
frameCallbacksFor(entity: Entity): readonly IslandFrameCallback[];
|
|
86
|
-
/**
|
|
87
|
-
* Composite invalidation — latch a frame pass (coalesced). Consumed by the
|
|
88
|
-
* `r3fAdvance` reflector on the NEXT engine flush: dirt raised during a
|
|
89
|
-
* step (observers, the invalidator reflector) renders the SAME frame; dirt
|
|
90
|
-
* raised outside a step (React effects) renders on the next tick.
|
|
91
|
-
*/
|
|
92
|
-
requestFrame(): void;
|
|
93
|
-
/** Island invalidation — this island must repaint (props/size/manual dirt). */
|
|
94
|
-
bumpPaint(entity: Entity): void;
|
|
95
|
-
/**
|
|
96
|
-
* Composite-quad lift scale (1 = rest). Scales the CARD on the canvas,
|
|
97
|
-
* corners intact. Sets the TARGET: the compositor pass eases the drawn
|
|
98
|
-
* value there over `durationMs` (default 180 — the DOM card-lift spring;
|
|
99
|
-
* 0 snaps). Mid-flight retargets restart from the current drawn value.
|
|
100
|
-
*/
|
|
101
|
-
setCompositeScale(entity: Entity, scale: number, durationMs?: number): void;
|
|
102
|
-
/**
|
|
103
|
-
* Composite-quad opacity (1 = rest) — the lift's fade twin. MULTIPLIES the
|
|
104
|
-
* widget's durable `Opacity` cell in the pass (presentation-transient over
|
|
105
|
-
* the doc fact). Sets the TARGET: the pass eases the drawn value there over
|
|
106
|
-
* `durationMs` (default 180; 0 snaps); mid-flight retargets restart from the
|
|
107
|
-
* current drawn value.
|
|
108
|
-
*/
|
|
109
|
-
setCompositeOpacity(entity: Entity, opacity: number, durationMs?: number): void;
|
|
110
|
-
/**
|
|
111
|
-
* GLViews wires R3F's `advance` here (null on unmount). Called ONLY by the
|
|
112
|
-
* `r3fAdvance` reflector, synchronously inside the engine's reflect phase —
|
|
113
|
-
* the same task the DOM reflectors write in, so both surfaces present the
|
|
114
|
-
* same camera. While unwired, latched dirt survives and renders on the
|
|
115
|
-
* first flush after (re)mount.
|
|
116
|
-
*/
|
|
117
|
-
setRenderNow(fn: ((nowMs: number) => void) | null): void;
|
|
118
|
-
/**
|
|
119
|
-
* The pass reports how the frame loop continues (`selfSustainPlan`):
|
|
120
|
-
* `"now"` latches an immediate next frame (lift eases, stagger backlogs —
|
|
121
|
-
* native refresh); a number arms the ambient-animation due-time (the
|
|
122
|
-
* `maxAnimationFps` cap — replaces the old wake-up timer); `"none"` parks.
|
|
123
|
-
* Each pass re-reports, so the due-time is always the LAST pass's plan.
|
|
124
|
-
*/
|
|
125
|
-
schedulePass(plan: "none" | "now" | number): void;
|
|
126
|
-
/** Tear down reflector + observers + state (doc close / app teardown). */
|
|
127
|
-
uninstall(): void;
|
|
128
|
-
}
|
|
129
|
-
export declare function createGLBridge(engine: Engine, opts?: GLBridgeOpts): GLBridge;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ShaderMaterial } from "three";
|
|
2
|
-
import type { Texture } from "three";
|
|
3
|
-
/**
|
|
4
|
-
* Per-island composite material. Each island quad gets its own instance so the
|
|
5
|
-
* per-quad `map` uniform is independent; Three compiles the shader once and
|
|
6
|
-
* reuses the program across instances since they share source (verify in dev via
|
|
7
|
-
* `renderer.info.programs.length === 1` for the composite shader).
|
|
8
|
-
*/
|
|
9
|
-
export declare class CompositeMaterial extends ShaderMaterial {
|
|
10
|
-
private readonly mapUniform;
|
|
11
|
-
private readonly opacityUniform;
|
|
12
|
-
private readonly draggedRectUniform;
|
|
13
|
-
private readonly isDraggedUniform;
|
|
14
|
-
constructor();
|
|
15
|
-
/** Bind the island's FBO texture (null clears). */
|
|
16
|
-
setMap(map: Texture | null): void;
|
|
17
|
-
/** Composite opacity. Pass-through — no clamping; callers pass valid 0..1. */
|
|
18
|
-
setOpacity(opacity: number): void;
|
|
19
|
-
/**
|
|
20
|
-
* Drag clip, composite-space min/max (v1's uDraggedRect re-cut from screen
|
|
21
|
-
* space). (0,0,0,0) = inactive. Mutates the vec4 in place — no allocation.
|
|
22
|
-
*/
|
|
23
|
-
setDraggedRect(minX: number, minY: number, maxX: number, maxY: number): void;
|
|
24
|
-
/** True on the dragged card's own quad — exempt from the clip. */
|
|
25
|
-
setIsDragged(isDragged: boolean): void;
|
|
26
|
-
}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { type Entity, type World } from "../../core/src/index";
|
|
2
|
-
import type { GLBridge } from "./bridge";
|
|
3
|
-
export interface TargetLike {
|
|
4
|
-
/** Opaque texture handle threaded to the quad (three: `.texture`). */
|
|
5
|
-
readonly texture: unknown;
|
|
6
|
-
}
|
|
7
|
-
export interface PoolLike {
|
|
8
|
-
acquire(key: number, worldW: number, worldH: number, effectiveDpr: number): TargetLike;
|
|
9
|
-
get(key: number): TargetLike | null;
|
|
10
|
-
touch(key: number): void;
|
|
11
|
-
release(key: number): void;
|
|
12
|
-
bytesUsed(): number;
|
|
13
|
-
entryInfos(): readonly {
|
|
14
|
-
key: number;
|
|
15
|
-
bytes: number;
|
|
16
|
-
lastUsedMs: number;
|
|
17
|
-
}[];
|
|
18
|
-
}
|
|
19
|
-
export interface QuadLike {
|
|
20
|
-
setTransform(x: number, y: number, sx: number, sy: number): void;
|
|
21
|
-
setTexture(t: unknown): void;
|
|
22
|
-
setVisible(v: boolean): void;
|
|
23
|
-
setRenderOrder(n: number): void;
|
|
24
|
-
/**
|
|
25
|
-
* Composite opacity, 0..1 (design-004 §3: the neutral composite's whole
|
|
26
|
-
* per-widget fact) — the pass passes `Opacity` cell × eased fade channel.
|
|
27
|
-
*/
|
|
28
|
-
setOpacity(o: number): void;
|
|
29
|
-
/**
|
|
30
|
-
* Drag clip (v1 RFC-003, composite-space): non-exempt quads discard
|
|
31
|
-
* fragments inside the rect so a dragged card's P1 DOM chrome shows
|
|
32
|
-
* through. (0,0,0,0, false) = inactive.
|
|
33
|
-
*/
|
|
34
|
-
setDragClip(minX: number, minY: number, maxX: number, maxY: number, exempt: boolean): void;
|
|
35
|
-
}
|
|
36
|
-
export interface QuadsLike {
|
|
37
|
-
ensure(key: number): QuadLike;
|
|
38
|
-
remove(key: number): void;
|
|
39
|
-
keys(): readonly number[];
|
|
40
|
-
}
|
|
41
|
-
export interface GlLike {
|
|
42
|
-
setRenderTarget(t: TargetLike | null): void;
|
|
43
|
-
/** Clear the CURRENT target to transparent black. */
|
|
44
|
-
clear(): void;
|
|
45
|
-
render(scene: object, camera: object): void;
|
|
46
|
-
setPixelRatio(n: number): void;
|
|
47
|
-
getPixelRatio(): number;
|
|
48
|
-
}
|
|
49
|
-
export interface CompCameraLike {
|
|
50
|
-
setFrustum(f: {
|
|
51
|
-
left: number;
|
|
52
|
-
right: number;
|
|
53
|
-
top: number;
|
|
54
|
-
bottom: number;
|
|
55
|
-
x: number;
|
|
56
|
-
y: number;
|
|
57
|
-
}): void;
|
|
58
|
-
/**
|
|
59
|
-
* The ACTUAL camera object handed to `gl.render` for the composite pass —
|
|
60
|
-
* three's renderer instanceof-checks it, so this must be the real
|
|
61
|
-
* `OrthographicCamera`, NOT this adapter. (Field bug 2026-07-10: the pass
|
|
62
|
-
* rendered with the adapter itself; three threw "camera is not an instance
|
|
63
|
-
* of THREE.Camera" every frame and P2 never composited. The headless fakes
|
|
64
|
-
* couldn't catch it — both types erase to `object` and the fake render is
|
|
65
|
-
* a no-op.)
|
|
66
|
-
*/
|
|
67
|
-
readonly raw: object;
|
|
68
|
-
}
|
|
69
|
-
export interface IslandCameraLike {
|
|
70
|
-
setFrustum(halfW: number, halfH: number): void;
|
|
71
|
-
}
|
|
72
|
-
export interface PassContext {
|
|
73
|
-
readonly world: World;
|
|
74
|
-
readonly bridge: GLBridge;
|
|
75
|
-
readonly pool: PoolLike;
|
|
76
|
-
readonly quads: QuadsLike;
|
|
77
|
-
readonly gl: GlLike;
|
|
78
|
-
readonly compCamera: CompCameraLike;
|
|
79
|
-
/** Adapt an island's ortho camera (three or fake) for frustum writes. */
|
|
80
|
-
readonly islandCamera: (entity: Entity) => IslandCameraLike | undefined;
|
|
81
|
-
readonly compositeScene: object;
|
|
82
|
-
readonly maxFboBytes: number;
|
|
83
|
-
readonly maxRepaintsPerFrame: number;
|
|
84
|
-
/**
|
|
85
|
-
* Idle ceiling on island paint resolution (design-004 §3 amendment,
|
|
86
|
-
* 2026-07-14): new paints allocate at `min(pixelRatio, maxPaintDpr) × band`.
|
|
87
|
-
* On a dpr-2 display the composite's bilinear upscale from a 1.5× texture is
|
|
88
|
-
* visually indistinguishable (A/B knot crops) while Hot repaint cost drops
|
|
89
|
-
* ~22 %. Composes with the gesture drop (pixelRatio is already 1 while
|
|
90
|
-
* gesturing) and with zoom bands. `Infinity` = uncapped.
|
|
91
|
-
*/
|
|
92
|
-
readonly maxPaintDpr: number;
|
|
93
|
-
readonly dtMs: number;
|
|
94
|
-
}
|
|
95
|
-
export interface PassStats {
|
|
96
|
-
repainted: number;
|
|
97
|
-
/** Paint-needing islands deferred by the stagger cap — caller re-invalidates. */
|
|
98
|
-
pendingPaints: number;
|
|
99
|
-
evicted: number;
|
|
100
|
-
fboBytes: number;
|
|
101
|
-
anyHot: boolean;
|
|
102
|
-
/** A composite ease (lift scale or fade) is mid-flight — caller re-invalidates (composite-only frames). */
|
|
103
|
-
liftAnimating: boolean;
|
|
104
|
-
}
|
|
105
|
-
export declare function runCompositorPass(ctx: PassContext): PassStats;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The zero-render→ECS-writes DEV assertion (M7 exit criterion; design-004 §3
|
|
3
|
-
* fix #3). While a compositor frame pass runs — including island paints and
|
|
4
|
-
* `useIslandFrame` callbacks — every world mutation throws with attribution.
|
|
5
|
-
*
|
|
6
|
-
* strata 0.4.0 (petition 4 LANDED): one persistent `world.devOnWrite`
|
|
7
|
-
* registration + an armed flag. The hook is DEV-only, synchronous, and
|
|
8
|
-
* PRE-MUTATION with throws propagating to the mutator's caller — so a throw
|
|
9
|
-
* while armed is a clean veto whose stack names the offender. Fired from
|
|
10
|
-
* strata's internal chokepoints, it covers every route the old own-property
|
|
11
|
-
* mutator shadows could miss: bound/destructured method references, document
|
|
12
|
-
* transactions, sync/attach drains, undo echoes, and any mutator added
|
|
13
|
-
* upstream later. (Raw `batch.col()` column pokes remain the documented
|
|
14
|
-
* carve-out — no chokepoint exists by design.)
|
|
15
|
-
*
|
|
16
|
-
* `enabled` is the app-side production gate the 0.4.0 notes ask for: in an
|
|
17
|
-
* un-shimmed browser production bundle strata's own DEV flag can evaluate
|
|
18
|
-
* true, so registration is gated HERE (default off; demos/traces opt in).
|
|
19
|
-
*/
|
|
20
|
-
import type { World } from "../../core/src/index";
|
|
21
|
-
export interface RenderWriteTrap {
|
|
22
|
-
/** Arm the trap (begin twice without end is a bug — throws). */
|
|
23
|
-
begin(): void;
|
|
24
|
-
/** Disarm; always call in `finally`. */
|
|
25
|
-
end(): void;
|
|
26
|
-
/** Unregister the hook entirely (bridge teardown). */
|
|
27
|
-
dispose(): void;
|
|
28
|
-
readonly enabled: boolean;
|
|
29
|
-
}
|
|
30
|
-
export declare function createRenderWriteTrap(world: World, enabled: boolean): RenderWriteTrap;
|