@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
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shelf packing for the atlas-slot allocator (design-012 §4, Q3 RATIFIED
|
|
3
|
+
* 2026-08-31) — pure rect math over a plain page struct. No ids, no sources,
|
|
4
|
+
* no GPU: the caller owns identity, residency and effects; this module owns only
|
|
5
|
+
* where a rect may sit, what it costs, and when a page should grow. That caller
|
|
6
|
+
* was `ground/atlas-allocator.ts` until B8 deleted the old leg; it is
|
|
7
|
+
* `@ice/core`'s `createLayerAllocator` now, over fixed 2048² layers.
|
|
8
|
+
*
|
|
9
|
+
* **Gutters.** Every placed rect is separated from its neighbours AND from the
|
|
10
|
+
* page edge by at least `gutter` px, so a linear tap at a slot's border never
|
|
11
|
+
* reaches a neighbour's texels. 2 px is the default (design-012 §4 says
|
|
12
|
+
* "1–2 px"): 1 px covers a bilinear tap's half-texel reach at dpr 1, 2 px
|
|
13
|
+
* covers non-integer scaling and mip level 1.
|
|
14
|
+
*
|
|
15
|
+
* **Shelves, not skyline.** Slots are top-aligned on horizontal shelves whose
|
|
16
|
+
* height is fixed by the first slot to open them. The band below a short slot
|
|
17
|
+
* on a tall shelf is unusable by construction — that loss is real and shows up
|
|
18
|
+
* in `pageWaste().packingWastePct` rather than hiding. A skyline packer would
|
|
19
|
+
* recover some of it at the cost of an O(n) contour per placement and a much
|
|
20
|
+
* harder free/coalesce story; shelves keep free + coalesce O(holes on one
|
|
21
|
+
* shelf), which is what makes the retention half of the ratified design cheap.
|
|
22
|
+
*
|
|
23
|
+
* **Growth never moves a slot.** Shelves are anchored at y=0 and grow right and
|
|
24
|
+
* down, so widening a page only lengthens every shelf's tail and heightening it
|
|
25
|
+
* only adds room below. Every existing rect stays valid at the same origin —
|
|
26
|
+
* the property that lets a page grow with content (Q3) without a repack.
|
|
27
|
+
*/
|
|
28
|
+
import type { Rect } from "./shapes";
|
|
29
|
+
/** Default slot separation, in device px. See the gutter note above. */
|
|
30
|
+
export declare const DEFAULT_ATLAS_GUTTER = 2;
|
|
31
|
+
export interface SlotSize {
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
}
|
|
35
|
+
export interface PageSize {
|
|
36
|
+
width: number;
|
|
37
|
+
height: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* One horizontal band. `height` is fixed when the shelf opens; `cursorX` is the
|
|
41
|
+
* next free content-origin x (it starts at `gutter` and retracts when the
|
|
42
|
+
* right-most slot is freed).
|
|
43
|
+
*/
|
|
44
|
+
export interface Shelf {
|
|
45
|
+
y: number;
|
|
46
|
+
height: number;
|
|
47
|
+
cursorX: number;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* A packed page. Mutated in place by the functions below (a packer is state by
|
|
51
|
+
* nature — the kernel law it obeys is "no ECS/DOM/GPU", not "no mutation";
|
|
52
|
+
* `spatial-index` sets the same precedent).
|
|
53
|
+
*/
|
|
54
|
+
export interface ShelfPage {
|
|
55
|
+
width: number;
|
|
56
|
+
height: number;
|
|
57
|
+
readonly gutter: number;
|
|
58
|
+
shelves: Shelf[];
|
|
59
|
+
/**
|
|
60
|
+
* Reusable interior holes. Each spans its shelf's FULL height (freeing a
|
|
61
|
+
* short slot on a tall shelf releases the whole band — the sub-shelf
|
|
62
|
+
* remainder was never addressable), so `hole.y` identifies its shelf and
|
|
63
|
+
* coalescing is a one-dimensional merge.
|
|
64
|
+
*/
|
|
65
|
+
holes: Rect[];
|
|
66
|
+
/** Σ of the areas handed out by `packRect` and not yet freed. */
|
|
67
|
+
usedArea: number;
|
|
68
|
+
}
|
|
69
|
+
export interface PageWaste {
|
|
70
|
+
/** `width × height` — addressable space, NOT memory (textures are lazily backed). */
|
|
71
|
+
pageArea: number;
|
|
72
|
+
/** `width × occupiedHeight` — the band shelves actually reach into. */
|
|
73
|
+
occupiedArea: number;
|
|
74
|
+
/** Live slot pixels. */
|
|
75
|
+
usedArea: number;
|
|
76
|
+
/** Interior fragmentation: reusable holes left by freed slots. */
|
|
77
|
+
holeArea: number;
|
|
78
|
+
/** `1 − usedArea/occupiedArea` — the number comparable to the spike's 19.5 %. */
|
|
79
|
+
packingWastePct: number;
|
|
80
|
+
/** `1 − usedArea/pageArea` — how much of the allocation is unspent. */
|
|
81
|
+
allocationWastePct: number;
|
|
82
|
+
/** `holeArea/occupiedArea` — the repack trigger. */
|
|
83
|
+
fragmentationPct: number;
|
|
84
|
+
}
|
|
85
|
+
export declare function createShelfPage(width: number, height: number, gutter?: number): ShelfPage;
|
|
86
|
+
export declare function cloneShelfPage(page: ShelfPage): ShelfPage;
|
|
87
|
+
/** Bottom edge (exclusive, gutter included) of the last shelf; 0 on an untouched page. */
|
|
88
|
+
export declare function pageOccupiedHeight(page: ShelfPage): number;
|
|
89
|
+
export declare function pageWaste(page: ShelfPage): PageWaste;
|
|
90
|
+
/** True when `size` fits a page whose shelves are `page`'s but whose extent is `width × height`. */
|
|
91
|
+
export declare function canPackAt(page: ShelfPage, width: number, height: number, size: SlotSize): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Place a rect, mutating the page. `null` when it does not fit — the caller
|
|
94
|
+
* decides whether to grow (`nextGrowthStep`) or open another page.
|
|
95
|
+
*/
|
|
96
|
+
export declare function packRect(page: ShelfPage, size: SlotSize): Rect | null;
|
|
97
|
+
/**
|
|
98
|
+
* Return a rect to the page. `false` when it belongs to no shelf here (a
|
|
99
|
+
* foreign or already-freed rect — the caller's bookkeeping is wrong).
|
|
100
|
+
*
|
|
101
|
+
* The rect's shelf band becomes reusable in full: a right-most rect retracts
|
|
102
|
+
* the shelf cursor (absorbing any holes the retraction reaches), anything else
|
|
103
|
+
* becomes a hole and coalesces with its neighbours.
|
|
104
|
+
*/
|
|
105
|
+
export declare function freeRect(page: ShelfPage, rect: Rect): boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Merge holes that are gutter-adjacent on the same shelf. The gutter between
|
|
108
|
+
* them joins the merged hole: it is addressable again once the slots either
|
|
109
|
+
* side of it are gone.
|
|
110
|
+
*/
|
|
111
|
+
export declare function coalesceHoles(page: ShelfPage): void;
|
|
112
|
+
/**
|
|
113
|
+
* Reclaim vertical space: drop trailing empty shelves, and merge adjacent
|
|
114
|
+
* empty ones into a single taller shelf. Without the merge, a page that fully
|
|
115
|
+
* cycles its content keeps its original height ladder forever and can no
|
|
116
|
+
* longer accept a slot taller than any single old shelf.
|
|
117
|
+
*/
|
|
118
|
+
export declare function coalesceShelves(page: ShelfPage): void;
|
|
119
|
+
/**
|
|
120
|
+
* The smallest page that could ever hold `size`: the next power of two on both
|
|
121
|
+
* sides, clamped into `[minSize, maxSize]`. `null` when the device limit cannot
|
|
122
|
+
* hold the slot at all — the honest answer is a refusal, not a clipped slot.
|
|
123
|
+
*/
|
|
124
|
+
export declare function initialPageSize(size: SlotSize, minSize: number, maxSize: number, gutter?: number): PageSize | null;
|
|
125
|
+
/**
|
|
126
|
+
* The next growth step for a page: double the SHORTER side (ties go to width),
|
|
127
|
+
* capped at the device limit. `null` when both sides are already at the limit.
|
|
128
|
+
*
|
|
129
|
+
* Doubling overshoots — the 100-card uniform board lands on 4096×4096 where
|
|
130
|
+
* 4096×3044 would do, 34 % more addressable space than it spends. That is
|
|
131
|
+
* deliberate: `hic-bench` FINDINGS §6 measured `createTexture` at 0.0 MB and
|
|
132
|
+
* all cost at first write, so the unwritten tail is addressable, not resident,
|
|
133
|
+
* while every growth step IS a real texture realloc. The alternative that lost
|
|
134
|
+
* was growing height in exact shelf increments (tight pages, ~9 reallocs for
|
|
135
|
+
* that board instead of 3). `pageWaste` reports both numbers so the assumption
|
|
136
|
+
* stays visible: `packingWastePct` for packing quality, `allocationWastePct`
|
|
137
|
+
* for the overshoot.
|
|
138
|
+
*/
|
|
139
|
+
export declare function nextGrowthStep(current: PageSize, maxSize: number): PageSize | null;
|
|
140
|
+
/**
|
|
141
|
+
* The page extent that would admit `size`, growing from the page's current one.
|
|
142
|
+
* `null` when the device limit is reached without room. Pure — the caller
|
|
143
|
+
* applies ONE growth to the answer rather than reallocating per step.
|
|
144
|
+
*/
|
|
145
|
+
export declare function planPageGrowth(page: ShelfPage, size: SlotSize, maxSize: number): PageSize | null;
|
|
146
|
+
/** Widen/heighten a page in place. Existing rects keep their origins (see the module note). */
|
|
147
|
+
export declare function growShelfPage(page: ShelfPage, size: PageSize): void;
|
|
148
|
+
/**
|
|
149
|
+
* Repack a set of sizes into a fresh page of the given extent, tallest first —
|
|
150
|
+
* the classic shelf-packing order, and the only reason a repack is worth its
|
|
151
|
+
* re-uploads. Returns rects positionally matched to `sizes`, or `null` if the
|
|
152
|
+
* set does not fit (the caller keeps the page it has).
|
|
153
|
+
*/
|
|
154
|
+
export declare function packPage(width: number, height: number, gutter: number, sizes: readonly SlotSize[]): {
|
|
155
|
+
page: ShelfPage;
|
|
156
|
+
rects: Rect[];
|
|
157
|
+
} | null;
|
|
@@ -29,21 +29,6 @@ export declare function cubicPoint(c: Cubic, t: number): Vec2;
|
|
|
29
29
|
* culling/picking prefilters.
|
|
30
30
|
*/
|
|
31
31
|
export declare function cubicAABB(c: Cubic): AABB;
|
|
32
|
-
export interface Tessellation {
|
|
33
|
-
/** Flattened polyline, interleaved [x0,y0, x1,y1, …] in the cubic's own space. */
|
|
34
|
-
points: Float32Array;
|
|
35
|
-
/** Cumulative arc length at each polyline point (same unit; [0] = 0). */
|
|
36
|
-
arcLength: Float32Array;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Adaptive cubic flattening + prefix arc length (2026-07-16, the @ice/ground
|
|
40
|
-
* wires pass: stroke tessellation and dash placement both ride this). Emit
|
|
41
|
-
* density follows curvature — flat spans emit one segment regardless of
|
|
42
|
-
* length; tolerance is in the cubic's OWN space (the ground renderer passes
|
|
43
|
-
* screen-px cubics with ~0.25 px tolerance, so density tracks zoom for free).
|
|
44
|
-
* `maxDepth` bounds pathological inputs (2^depth segments worst case).
|
|
45
|
-
*/
|
|
46
|
-
export declare function tessellateCubic(c: Cubic, tolerance?: number, maxDepth?: number): Tessellation;
|
|
47
32
|
/** Distance from a point to a line segment. */
|
|
48
33
|
export declare function distanceToSegment(px: number, py: number, ax: number, ay: number, bx: number, by: number): number;
|
|
49
34
|
/**
|
|
@@ -41,42 +41,3 @@ export declare function fitCamera(content: Rect, vpW: number, vpH: number, opts:
|
|
|
41
41
|
minZoom: number;
|
|
42
42
|
maxZoom: number;
|
|
43
43
|
}): CameraState;
|
|
44
|
-
/**
|
|
45
|
-
* Camera → the ONE per-plane CSS transform (design-002 §5 `planeTransform`).
|
|
46
|
-
* Children are laid out in WORLD units inside the plane (left/top = world x/y),
|
|
47
|
-
* the plane carries `transform: translate(tx px, ty px) scale(scale)` with
|
|
48
|
-
* `transform-origin: 0 0` — so a child at world point p lands at
|
|
49
|
-
* `p·zoom + t = (p − camera)·zoom`, i.e. exactly `worldToScreen(p)`.
|
|
50
|
-
*/
|
|
51
|
-
export declare function planeCssTransform(camera: CameraState): {
|
|
52
|
-
tx: number;
|
|
53
|
-
ty: number;
|
|
54
|
-
scale: number;
|
|
55
|
-
};
|
|
56
|
-
/** World → island (center-origin, Y-up). THE Y-flip, direction one. */
|
|
57
|
-
export declare function worldToIsland(worldX: number, worldY: number, widget: Rect): Vec2;
|
|
58
|
-
/** Island → world. THE Y-flip, direction two. */
|
|
59
|
-
export declare function islandToWorld(islandX: number, islandY: number, widget: Rect): Vec2;
|
|
60
|
-
/**
|
|
61
|
-
* Camera → the P2 composite ortho frustum + camera position (world units,
|
|
62
|
-
* Y-up scene). `left/top` pin the viewport's top-left to `Camera.{x,y}`
|
|
63
|
-
* exactly like `planeCssTransform` does for the DOM planes: the frustum spans
|
|
64
|
-
* `viewport / zoom` world units and the camera sits at the world origin
|
|
65
|
-
* offset, so a quad at `worldRectToComposite(rect)` lands on the same screen
|
|
66
|
-
* pixels as a DOM host at `rect` under the plane transform.
|
|
67
|
-
*/
|
|
68
|
-
export declare function compositeCameraFrustum(camera: CameraState, viewportW: number, viewportH: number): {
|
|
69
|
-
left: number;
|
|
70
|
-
right: number;
|
|
71
|
-
top: number;
|
|
72
|
-
bottom: number;
|
|
73
|
-
x: number;
|
|
74
|
-
y: number;
|
|
75
|
-
};
|
|
76
|
-
/** World rect → composite-quad center + scale in the Y-up P2 scene. */
|
|
77
|
-
export declare function worldRectToComposite(rect: Rect): {
|
|
78
|
-
x: number;
|
|
79
|
-
y: number;
|
|
80
|
-
sx: number;
|
|
81
|
-
sy: number;
|
|
82
|
-
};
|
|
@@ -7,10 +7,10 @@ export * from "./shapes";
|
|
|
7
7
|
export * from "./coords";
|
|
8
8
|
export * from "./snap";
|
|
9
9
|
export * from "./spatial-index";
|
|
10
|
-
export * from "./zoom-bands";
|
|
11
|
-
export * from "./eviction";
|
|
12
10
|
export * from "./anchors";
|
|
13
11
|
export * from "./bezier";
|
|
14
12
|
export * from "./easing";
|
|
15
13
|
export * from "./nav-flight";
|
|
16
14
|
export * from "./layout";
|
|
15
|
+
export * from "./tray";
|
|
16
|
+
export * from "./atlas-pack";
|
|
@@ -58,6 +58,12 @@ export declare function composeAffine(outer: PortalAffine, inner: PortalAffine):
|
|
|
58
58
|
* (design-006 §3.1); only the ARRIVAL camera is clamped by the caller.
|
|
59
59
|
*/
|
|
60
60
|
export declare function solveFlightStart(A: PortalAffine, camPre: CameraState): CameraState;
|
|
61
|
+
/**
|
|
62
|
+
* Destination camera expressed in departed-frame coordinates. Rendering a
|
|
63
|
+
* procedural outgoing program with this camera is pixel-equivalent to first
|
|
64
|
+
* mapping its points through A and then rendering under `destination`.
|
|
65
|
+
*/
|
|
66
|
+
export declare function outgoingCamera(A: PortalAffine, destination: CameraState): CameraState;
|
|
61
67
|
/** Zoom distance in octaves — the flight-length measure (design-006 §4/§5). */
|
|
62
68
|
export declare function flightOctaves(from: CameraState, to: CameraState): number;
|
|
63
69
|
/**
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE PEGBOARD TRAY'S LATTICE LAW (design-017 §8; K5a) — where the kinds hang on the board: pure, one frame (the BOARD's —
|
|
3
|
+
* x from the drawer's left edge, y down from the board's top at scroll 0), plain structs in and out.
|
|
4
|
+
*
|
|
5
|
+
* The lattice (§6.1) in pitches: holes at x = c + ¼ + ½·(r odd), rows at y = r + ¾; a hole is punched only where its centre
|
|
6
|
+
* lies ≥ ¾ from both sides (the solid border, D-K3.1). The desk's shader and its CPU mirror (desk/tray/lattice.ts) read the
|
|
7
|
+
* same three numbers from here.
|
|
8
|
+
*
|
|
9
|
+
* A kind's HANG (its `defineObject({ tray: { hang } })`): its size on the board (CSS px), its accessory — a hook, a shelf, a
|
|
10
|
+
* clip or a rail, SKÅDIS-style — and its PEGS, the holes the accessory plugs into, in pitches from the specimen's HANG POINT:
|
|
11
|
+
* the centre of its top edge (a hook, a clip, a rail hang it from above) or of its bottom edge (a shelf holds it up). Every
|
|
12
|
+
* peg lands on a hole centre, so the pegs' offsets must be what the stagger allows: between two pegs a whole number of rows,
|
|
13
|
+
* and across them a whole number of pitches on the same parity or a half on the other (`hangError`).
|
|
14
|
+
*
|
|
15
|
+
* The LAW (`layTray`): the items in (category, order, type) order, packed left to right across the board's columns, a line
|
|
16
|
+
* at a time; each placed at the first holes at or after the line's top and the cursor — its row's PARITY is where the stagger
|
|
17
|
+
* puts a hole under its first peg; a pitch between neighbours, a clear row between lines. `bottom` is the last line's foot;
|
|
18
|
+
* the scroll's range is that plus a pitch, less the face the drawer shows (`trayScrollMax`).
|
|
19
|
+
*/
|
|
20
|
+
/** The lattice's phase and border, pitches (design-017 §6.1). */
|
|
21
|
+
export declare const PEG_LATTICE: {
|
|
22
|
+
/** A hole's centre: x = c + colPhase + ½·(r odd) from the board's left edge… */
|
|
23
|
+
readonly colPhase: 0.25;
|
|
24
|
+
/** …at y = r + rowPhase below its top at scroll 0. */
|
|
25
|
+
readonly rowPhase: 0.75;
|
|
26
|
+
/** A hole is punched only where its centre lies this far from both sides (the solid border). */
|
|
27
|
+
readonly border: 0.75;
|
|
28
|
+
};
|
|
29
|
+
/** What holds a specimen to the board (design-016 §7.7 — SKÅDIS's accessories). */
|
|
30
|
+
export type TrayAccessory = "hook" | "shelf" | "clip" | "rail";
|
|
31
|
+
export declare const TRAY_ACCESSORIES: readonly TrayAccessory[];
|
|
32
|
+
/** How a kind hangs on the tray: its size (CSS px), its pegs (pitches from its hang point), its accessory. */
|
|
33
|
+
export interface TrayHang {
|
|
34
|
+
readonly w: number;
|
|
35
|
+
readonly h: number;
|
|
36
|
+
/** The holes the accessory plugs into, `[dx, dy]` pitches from the hang point — the top edge's centre, or the bottom edge's on a shelf. */
|
|
37
|
+
readonly pegs: readonly (readonly [number, number])[];
|
|
38
|
+
readonly accessory: TrayAccessory;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The accessories' own geometry, pitches — the law's footprints and the desk's drawing read the same numbers. A HOOK drops
|
|
42
|
+
* from its hole to its tip; a SHELF's plank lies under the specimen (its overhang past each side) on a bracket from each
|
|
43
|
+
* hole; a CLIP's body grips the specimen's top edge from its hole; a RAIL's bar runs through its holes past the outer two.
|
|
44
|
+
*/
|
|
45
|
+
export declare const TRAY_ACCESSORY: {
|
|
46
|
+
/** Round a peg: the plug in its hole and the reach of what sits on it (a hole is 0.26 × 0.66). */
|
|
47
|
+
readonly plug: {
|
|
48
|
+
readonly hx: 0.17;
|
|
49
|
+
readonly hy: 0.4;
|
|
50
|
+
};
|
|
51
|
+
readonly hook: {
|
|
52
|
+
readonly hx: 0.12;
|
|
53
|
+
readonly drop: 0.62;
|
|
54
|
+
};
|
|
55
|
+
readonly shelf: {
|
|
56
|
+
readonly thick: 0.24;
|
|
57
|
+
readonly overhang: 0.3;
|
|
58
|
+
readonly bracket: 0.1;
|
|
59
|
+
};
|
|
60
|
+
readonly clip: {
|
|
61
|
+
readonly hx: 0.3;
|
|
62
|
+
readonly below: 0.55;
|
|
63
|
+
};
|
|
64
|
+
readonly rail: {
|
|
65
|
+
readonly hy: 0.13;
|
|
66
|
+
readonly overhang: 0.4;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
/** One item the law lays: a kind's type, its hang, and its place in the order. */
|
|
70
|
+
export interface TrayItem {
|
|
71
|
+
readonly type: string;
|
|
72
|
+
readonly hang: TrayHang;
|
|
73
|
+
/** Sorted first (strings; absent = ""). */
|
|
74
|
+
readonly category?: string;
|
|
75
|
+
/** Then this (absent = 0), then the type. */
|
|
76
|
+
readonly order?: number;
|
|
77
|
+
}
|
|
78
|
+
/** A box, pitches or px by context: left, top, right, bottom. */
|
|
79
|
+
export interface TrayBox {
|
|
80
|
+
readonly x0: number;
|
|
81
|
+
readonly y0: number;
|
|
82
|
+
readonly x1: number;
|
|
83
|
+
readonly y1: number;
|
|
84
|
+
}
|
|
85
|
+
/** A peg as laid: its hole (row, column) and the hole's centre, board px. */
|
|
86
|
+
export interface TrayPeg {
|
|
87
|
+
readonly row: number;
|
|
88
|
+
readonly col: number;
|
|
89
|
+
readonly x: number;
|
|
90
|
+
readonly y: number;
|
|
91
|
+
}
|
|
92
|
+
/** An item as laid, board px: the specimen's rect (top-left, size), its pegs on their holes, its footprint (the specimen and its accessory), its line. */
|
|
93
|
+
export interface TrayPlaced {
|
|
94
|
+
readonly type: string;
|
|
95
|
+
readonly x: number;
|
|
96
|
+
readonly y: number;
|
|
97
|
+
readonly w: number;
|
|
98
|
+
readonly h: number;
|
|
99
|
+
readonly pegs: readonly TrayPeg[];
|
|
100
|
+
readonly box: TrayBox;
|
|
101
|
+
readonly line: number;
|
|
102
|
+
}
|
|
103
|
+
export interface TrayLayout {
|
|
104
|
+
readonly placed: readonly TrayPlaced[];
|
|
105
|
+
/** The last line's foot, board px (0: nothing laid). */
|
|
106
|
+
readonly bottom: number;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* The law's spacing, pitches: the side margin, the gap between neighbours, the first line's top, the clear row between lines. The first
|
|
110
|
+
* line lies below the drawer's HEADER and its fade (design-018 R4, D-R4.2 — the desk's `DRAWER`: the arris 1.5 px, the clear header 48,
|
|
111
|
+
* the ramp 32): at rest nothing laid is faded, every footprint at 99 % of the ramp or past it (2 pitches = 80 px ≥ 1.5 + 48 + 0.944·32;
|
|
112
|
+
* the desk's test holds the two numbers together — the kernel imports no drawer).
|
|
113
|
+
*/
|
|
114
|
+
export interface TraySpacing {
|
|
115
|
+
readonly margin: number;
|
|
116
|
+
readonly gap: number;
|
|
117
|
+
readonly top: number;
|
|
118
|
+
readonly clear: number;
|
|
119
|
+
}
|
|
120
|
+
export declare const TRAY_SPACING: TraySpacing;
|
|
121
|
+
/** Why a hang cannot be laid (a message), or null: its size, its pegs on the lattice, its accessory. */
|
|
122
|
+
export declare function hangError(h: TrayHang): string | null;
|
|
123
|
+
/** The (category, order, type) order. */
|
|
124
|
+
export declare function trayOrder(a: TrayItem, b: TrayItem): number;
|
|
125
|
+
/** A hang's footprint, pitches from its hang point: the specimen, its pegs' plugs and its accessory. */
|
|
126
|
+
export declare function hangFootprint(h: TrayHang, pitch: number): TrayBox;
|
|
127
|
+
/**
|
|
128
|
+
* Lay the items on a board `width` px wide at `pitch` px (design-017 §8): in (category, order, type) order, left to right, a
|
|
129
|
+
* line at a time — an item that would cross the right margin (or put a peg in the right border) starts the next line, a clear
|
|
130
|
+
* row below the last one's foot. A line's specimens hang with their top edges together (as near as their holes allow): each
|
|
131
|
+
* below the line's top by the most any item's accessory reaches above its specimen. Every peg on a punched hole's centre.
|
|
132
|
+
*/
|
|
133
|
+
export declare function layTray(items: readonly TrayItem[], width: number, pitch: number, spacing?: TraySpacing): TrayLayout;
|
|
134
|
+
/** The board's scroll range (design-017 §8): the last line's foot plus a pitch, less the face the drawer shows — never below 0. */
|
|
135
|
+
export declare function trayScrollMax(bottom: number, face: number, pitch: number): number;
|
|
136
|
+
/**
|
|
137
|
+
* A specimen's FIT (design-017 §8–§9; K5a's law, K5b's grab point): its object at its natural size seen at the scale its hang asks —
|
|
138
|
+
* the smaller of the two ratios, so the whole object shows — centred in the hang's rect. `zoom` is that scale; `x`/`y`/`w`/`h` the
|
|
139
|
+
* object as drawn, in the rect's units: what a press on the specimen grabs (the insert's anchor is the press across THIS rect).
|
|
140
|
+
*/
|
|
141
|
+
export declare function specimenFit(rect: {
|
|
142
|
+
readonly x: number;
|
|
143
|
+
readonly y: number;
|
|
144
|
+
readonly w: number;
|
|
145
|
+
readonly h: number;
|
|
146
|
+
}, natural: {
|
|
147
|
+
readonly w: number;
|
|
148
|
+
readonly h: number;
|
|
149
|
+
}): {
|
|
150
|
+
readonly zoom: number;
|
|
151
|
+
readonly x: number;
|
|
152
|
+
readonly y: number;
|
|
153
|
+
readonly w: number;
|
|
154
|
+
readonly h: number;
|
|
155
|
+
};
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { type GroundTheme, type RGB } from "../../../desk/src/index";
|
|
2
|
+
import { type FadeIn, type View, type MatConfig, type MatFrame, type MatPass, type Presentation, type MatLight } from "../../../desk/src/kit/index";
|
|
3
|
+
import type { BoardOp } from "./history";
|
|
4
|
+
import { type BoardInstance } from "./layout";
|
|
5
|
+
import type { BoardShaders } from "./shaders";
|
|
6
|
+
import { type Tool } from "./stroke";
|
|
7
|
+
/** Stamps one upload carries — a longer stroke replays in chunks. */
|
|
8
|
+
export declare const STAMP_CAP: number;
|
|
9
|
+
/** The far-LOD thumbnails' layer side, texels (a board's ink chain from its first level that fits: 1 texel a unit for the law's board). */
|
|
10
|
+
export declare const BOARD_THUMB = 512;
|
|
11
|
+
/** The pool: the rasters one frame binds (the boards larger on screen than their thumbnail serves). */
|
|
12
|
+
export declare const BOARD_SLOTS = 8;
|
|
13
|
+
/** Density changes (re-rasters) one step asks for — the rest wait a frame, their old raster standing. */
|
|
14
|
+
export declare const BOARD_RASTERS_A_STEP = 2;
|
|
15
|
+
/**
|
|
16
|
+
* THE ZOOM RUNG (K6a): the density a board's raster is made at for `zd` device px a world unit (zoom × dpr × the hold's scale) —
|
|
17
|
+
* two texels a device px as the law's 4 gave at zoom 1 on a 2× screen, a power of two, from 1 (the thumbnail's own) to `max`.
|
|
18
|
+
*/
|
|
19
|
+
export declare function boardRung(zd: number, max?: number): number;
|
|
20
|
+
/** The board's materials the host hands in (lab/theme.ts `BOARD_LOOK`): a marker's barrel, the eraser's felt and back. */
|
|
21
|
+
export interface BoardLook {
|
|
22
|
+
readonly barrel: RGB;
|
|
23
|
+
readonly felt: RGB;
|
|
24
|
+
readonly wood: RGB;
|
|
25
|
+
}
|
|
26
|
+
export declare class BoardPass {
|
|
27
|
+
readonly name = "board/whiteboards";
|
|
28
|
+
private readonly knobs;
|
|
29
|
+
/** The boards' PERSISTENT records (engine/records.ts, design-015 §4.3; D6): a slot per drawn board, written when its record or its raster's facts changed. */
|
|
30
|
+
private readonly store;
|
|
31
|
+
/** The records the last prepare turned away at the pass's cap — not drawn; the ground reports them (`GroundStats.dropped`, D7). */
|
|
32
|
+
dropped: number;
|
|
33
|
+
private readonly stampU;
|
|
34
|
+
private readonly inkU;
|
|
35
|
+
private readonly knobBuf;
|
|
36
|
+
/** What the GPU holds of the knobs: they are written only when they change (K4a — a standing value costs a frame nothing). */
|
|
37
|
+
private readonly knobsSent;
|
|
38
|
+
private group;
|
|
39
|
+
private boundAssets;
|
|
40
|
+
private boundStore;
|
|
41
|
+
/** Each drawn board's index in the list `prepare` was handed (a board with no ink to show is skipped) — what `drawRange` counts in. */
|
|
42
|
+
private drawnFrom;
|
|
43
|
+
/** The materials a host projects (lab/theme.ts); black until it says. */
|
|
44
|
+
look: BoardLook;
|
|
45
|
+
/** The day's chain on the board: false = a lit melamine shows its configured byte; true = the mat's double gamma. */
|
|
46
|
+
chain: boolean;
|
|
47
|
+
private readonly device;
|
|
48
|
+
private readonly shared;
|
|
49
|
+
private readonly mat;
|
|
50
|
+
private constructor();
|
|
51
|
+
/** The root's pass, on the root's mat. */
|
|
52
|
+
static create(device: GPUDevice, format: GPUTextureFormat, src: BoardShaders, mat: MatPass): Promise<BoardPass>;
|
|
53
|
+
/** A second slot on the same pipelines and rasters, reading ITS mat's silhouette — a portal's inside, a flight's departed frame. */
|
|
54
|
+
spawn(mat: MatPass): BoardPass;
|
|
55
|
+
/** Copy the root's tuning — what every slot takes each frame. */
|
|
56
|
+
copy(from: BoardPass): void;
|
|
57
|
+
/** K7b: instance `index` of the last prepare drawn by the flat-card pipeline — its slot in the store — or −1: this pass draws it (or no one). */
|
|
58
|
+
cardSlot(index: number): number;
|
|
59
|
+
private cards;
|
|
60
|
+
private cardsN;
|
|
61
|
+
/** K7b: this slot's resources for the board's card material (shaders.ts `boardCard`), in its bindings' order — made again when the store or the thumbnails grew. */
|
|
62
|
+
cardResources(): {
|
|
63
|
+
readonly version: number;
|
|
64
|
+
readonly resources: readonly (GPUBuffer | GPUTextureView | GPUSampler)[];
|
|
65
|
+
};
|
|
66
|
+
private card;
|
|
67
|
+
private cardOver;
|
|
68
|
+
private rebind;
|
|
69
|
+
/**
|
|
70
|
+
* The raster board `id` draws with: a melamine `surface` world units across at `density`
|
|
71
|
+
* texels a unit. Made on first ask and whenever the size or density changes — `true` then:
|
|
72
|
+
* it is blank, and the host replays the board's history into it.
|
|
73
|
+
*/
|
|
74
|
+
ensure(id: number, surface: readonly [number, number], density?: number): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Would `ensure` make board `id`'s raster — none held (never made, or evicted), or another size or density (K6b: the frame raster
|
|
77
|
+
* queue's to make, in its turn)?
|
|
78
|
+
*/
|
|
79
|
+
makes(id: number, surface: readonly [number, number], density?: number): boolean;
|
|
80
|
+
/** The thumbnails' EMPTY layer (K6b): taken and filled with nothing on first need; null when the device holds no more layers. */
|
|
81
|
+
private bareLayer;
|
|
82
|
+
/**
|
|
83
|
+
* A layer of the thumbnails' array (K9 R1) — the array's own while it has one; at the device's cap, RECLAIMED from the board
|
|
84
|
+
* that can best spare it: one whose raster the budget evicted (its thumbnail was its only ink on the device — replayed when it is
|
|
85
|
+
* next drawn, as after any eviction) and that was drawn neither in this frame nor the last, the least recently drawn of those;
|
|
86
|
+
* failing that, one of a board that HOLDS its raster (its thumbnail is cut again from it at its next commit or replay) drawn as
|
|
87
|
+
* long ago. Null when every thumbnail is a board's drawn lately — the caller draws without a layer, honestly.
|
|
88
|
+
*/
|
|
89
|
+
private takeLayer;
|
|
90
|
+
/** Forget board `id` — its raster, its thumbnail's layer, its slot (it left the desk; a scene's board). */
|
|
91
|
+
release(id: number): void;
|
|
92
|
+
/**
|
|
93
|
+
* Let board `id`'s RASTER go and keep its thumbnail (the budget's eviction — the raster is a cache of its strokes, replayed
|
|
94
|
+
* when it is next wanted): destroyed, its slot freed.
|
|
95
|
+
*/
|
|
96
|
+
evict(id: number): void;
|
|
97
|
+
/** Board `id`'s far-LOD thumbnail cut again from its raster's chain (the ink changed): its layer taken on the first cut. */
|
|
98
|
+
private cutThumb;
|
|
99
|
+
/** Is board `id`'s raster bound this frame (a pool slot, or the live one)? The budget keeps what is. */
|
|
100
|
+
bound(id: number): boolean;
|
|
101
|
+
/** The thumbnails' array: what it weighs on the device, its whole capacity (the GPU ledger's row). */
|
|
102
|
+
get thumbnailBytes(): number;
|
|
103
|
+
/** What the thumbnails' layers IN USE weigh — the budget's resident `board`/`thumbnails` charge (K9 R2). */
|
|
104
|
+
get thumbnailUsedBytes(): number;
|
|
105
|
+
/** The thumbnails' layers in use, and the array's capacity (K9 R5 — the kind's `stats`). */
|
|
106
|
+
get thumbnailLayers(): number;
|
|
107
|
+
get thumbnailCapacity(): number;
|
|
108
|
+
/** Has board `id` its far-LOD thumbnail (a layer, cut)? */
|
|
109
|
+
thumbed(id: number): boolean;
|
|
110
|
+
/** Board `id`'s raster density (texels a unit), or null without one. */
|
|
111
|
+
densityOf(id: number): number | null;
|
|
112
|
+
/**
|
|
113
|
+
* THE FRAME BOUNDARY (the kind's tick, before the next build): the slots of boards no frame asked for since the last step are
|
|
114
|
+
* freed (their rasters stay, a cache), the live slot of a board no longer laid on or wet; and the boards that asked for more
|
|
115
|
+
* than their raster holds — largest first, BOARD_RASTERS_A_STEP a step — are returned with the density to remake them at
|
|
116
|
+
* (the kind replays their strokes into it). Nothing is freed when nothing was drawn since the last step — a frame that drew only
|
|
117
|
+
* FAR boards (K7b: they ask nothing) frees the slots they held.
|
|
118
|
+
*/
|
|
119
|
+
step(): {
|
|
120
|
+
readonly id: number;
|
|
121
|
+
readonly density: number;
|
|
122
|
+
}[];
|
|
123
|
+
/** The last frame's asks still unanswered (K7a): the next tick owes them a `step` — a slot freed, a board raised to its rung. */
|
|
124
|
+
get stepOwed(): boolean;
|
|
125
|
+
/** The raster's size in texels, or null. */
|
|
126
|
+
sizeOf(id: number): readonly [number, number] | null;
|
|
127
|
+
/** Is any board's ink still drying (the host keeps its clock awake)? */
|
|
128
|
+
get wetting(): boolean;
|
|
129
|
+
private clear;
|
|
130
|
+
private writeStampTool;
|
|
131
|
+
/** Stamp `count` stamps (from `data`) into the raster's stroke layer. The caller submits `enc` before the next upload. */
|
|
132
|
+
private stampInto;
|
|
133
|
+
/** Every stamp of `data`, in chunks: one upload and one submit each. */
|
|
134
|
+
private stampAll;
|
|
135
|
+
/** Lay the stroke layer into the ink (and, live, mark it wet), then clear the stroke layer. */
|
|
136
|
+
private composite;
|
|
137
|
+
/** The ink's mip chain, from level 0 down. */
|
|
138
|
+
private mips;
|
|
139
|
+
/** Queue stamps for the stroke being laid on board `id` (they reach its stroke layer at the next `prepare`). */
|
|
140
|
+
lay(id: number, tool: Tool, stamps: Float32Array): void;
|
|
141
|
+
/** Send the queued stamps now: one upload, one submit, per board with any. */
|
|
142
|
+
private flush;
|
|
143
|
+
/** The lift: the stroke's last stamps, laid into the ink, marked wet; the mips follow. */
|
|
144
|
+
commit(id: number, tool: Tool): void;
|
|
145
|
+
/** A stroke abandoned: its stamps dropped, its layer cleared. */
|
|
146
|
+
cancel(id: number): void;
|
|
147
|
+
/** The board's ink rebuilt from its history (history.ts `replay`): a cleared raster, every op in order, dry. */
|
|
148
|
+
replay(id: number, ops: readonly BoardOp[]): void;
|
|
149
|
+
/** Fresh ink dries: every wet raster's wet layer fades by `dt` seconds (sent at the next `prepare`). */
|
|
150
|
+
dry(dt: number): void;
|
|
151
|
+
/** The ink's bytes, level 0 — rgba8 premultiplied linear, row 0 the melamine's top (a harness's witness). */
|
|
152
|
+
readInk(id: number): Promise<{
|
|
153
|
+
width: number;
|
|
154
|
+
height: number;
|
|
155
|
+
bytes: Uint8Array;
|
|
156
|
+
} | null>;
|
|
157
|
+
/**
|
|
158
|
+
* Send what the host queued (stamps, the drying), then upload this frame's boards (in paint
|
|
159
|
+
* order) and the mat's block for this slot's camera and light: the dapple, the lamp's shading
|
|
160
|
+
* and the shadows. A board whose raster is missing is skipped. Returns the count that will draw.
|
|
161
|
+
*/
|
|
162
|
+
prepare(view: View & {
|
|
163
|
+
readonly dpr: number;
|
|
164
|
+
}, fadeIn: FadeIn, cfg: MatConfig, frame: MatFrame | undefined, instances: readonly BoardInstance[], present: Presentation | undefined, light?: MatLight, theme?: GroundTheme, keys?: readonly number[], hand?: boolean): number;
|
|
165
|
+
/** The store's counters (a rig's witness): records written, bytes, draw-list writes, slots in use. */
|
|
166
|
+
get records(): import("../../../desk/src/index").RecordStoreStats;
|
|
167
|
+
/** The wet layers' fading, sent: one pass each at the accumulated factor, or a clear once dry. */
|
|
168
|
+
private dryNow;
|
|
169
|
+
get drawn(): number;
|
|
170
|
+
/** Every board drawn this frame. */
|
|
171
|
+
draw(pass: GPURenderPassEncoder): void;
|
|
172
|
+
/**
|
|
173
|
+
* The boards `prepare` was handed at [first, end) — indices into ITS list, as the ground's runs count a
|
|
174
|
+
* kind's records (a board with no ink to show draws nothing) — as ONE instanced draw (K6a, K-L4): the
|
|
175
|
+
* slot's group and the pool's bound once, each board an instance whose record says where its ink is.
|
|
176
|
+
*/
|
|
177
|
+
drawRange(pass: GPURenderPassEncoder, first: number, end: number): void;
|
|
178
|
+
/** This slot's buffers; the rasters and the stamp buffers go with the last slot standing. */
|
|
179
|
+
dispose(): void;
|
|
180
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type Component, type Entity, type World } from "../../../core/src/index";
|
|
2
|
+
import { type BoardInk, type BoardObjectLook } from "./kind";
|
|
3
|
+
import { type TypingDocs } from "../../../desk/src/index";
|
|
4
|
+
export interface BoardPenOptions {
|
|
5
|
+
readonly world: World;
|
|
6
|
+
/** The document a stroke commits into — the facade's `engine.docs`. */
|
|
7
|
+
readonly docs: TypingDocs;
|
|
8
|
+
/** The board's props cell (its `cap`, its `tip`) — the object hands its own (D-D7-A.3); absent, the marker is black, the tip a bullet. */
|
|
9
|
+
readonly props?: Component | undefined;
|
|
10
|
+
/** The board kind's state on this desk (undefined before it is made). */
|
|
11
|
+
readonly ink: () => BoardInk | undefined;
|
|
12
|
+
/** The board kind's look for the theme in force (the markers' inks). */
|
|
13
|
+
readonly look: () => BoardObjectLook | undefined;
|
|
14
|
+
/** Is this entity a board (the desk's builder knows each entity's kind). */
|
|
15
|
+
readonly isBoard: (e: Entity) => boolean;
|
|
16
|
+
/** A point of the held object's own frame as a desk point, through the pose the last frame drew (the builder's). */
|
|
17
|
+
readonly heldToWorld: (e: Entity, x: number, y: number) => readonly [number, number] | undefined;
|
|
18
|
+
/** The geometry the board was drawn with in hand (the builder's). */
|
|
19
|
+
readonly geometryOf: (e: Entity) => unknown;
|
|
20
|
+
/** Where a transaction runs: out of the frame (a microtask) unless a test says. */
|
|
21
|
+
readonly defer?: (fn: () => void) => void;
|
|
22
|
+
}
|
|
23
|
+
export interface BoardPen {
|
|
24
|
+
/** Nothing to follow (D7 #14): no board in hand, no stroke laid, no marker to lie down. */
|
|
25
|
+
idle(): boolean;
|
|
26
|
+
/** Once a frame, before the kinds' clocks: the hand onto the board in hand, its stroke laid, lifted, committed. */
|
|
27
|
+
follow(now: number): void;
|
|
28
|
+
/** The stroke in hand: its board and how many samples so far; null when none. */
|
|
29
|
+
live(): {
|
|
30
|
+
readonly board: Entity;
|
|
31
|
+
readonly samples: number;
|
|
32
|
+
} | null;
|
|
33
|
+
/** Strokes committed since creation (a rig's witness). */
|
|
34
|
+
commits(): number;
|
|
35
|
+
}
|
|
36
|
+
export declare function createBoardPen(opts: BoardPenOptions): BoardPen;
|