@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,285 @@
|
|
|
1
|
+
import { type MarqueeBuffer, type NavFace, type Entity, type WidgetType, type World } from "../../../core/src/index";
|
|
2
|
+
import type { HeldFrameInputs, OutgoingInputs, PortalInputs, SlotObject } from "../ground";
|
|
3
|
+
import { FLUX_REST, type KindLocal, type ObjectFlux, type ObjectKind } from "../kinds/world";
|
|
4
|
+
import type { MarksInput } from "../marks/layout";
|
|
5
|
+
import { type SelectionAnchor } from "./marks";
|
|
6
|
+
import type { GridConfig } from "../mat/grid";
|
|
7
|
+
import type { MatFrame, SlotLight } from "../mat/layout";
|
|
8
|
+
import { type InsideView } from "../kit/inside";
|
|
9
|
+
import { type CameraState } from "../nav/flight";
|
|
10
|
+
import { type Presentation } from "../nav/portal";
|
|
11
|
+
import { type ObjectSprings } from "../kit/springs";
|
|
12
|
+
import type { GroundTheme } from "../theme";
|
|
13
|
+
/** The view a frame is built for: CSS px and the dpr the canvas is at. */
|
|
14
|
+
export interface BuildViewport {
|
|
15
|
+
readonly width: number;
|
|
16
|
+
readonly height: number;
|
|
17
|
+
readonly dpr: number;
|
|
18
|
+
}
|
|
19
|
+
export interface DeskBuilderOptions {
|
|
20
|
+
/**
|
|
21
|
+
* The OBJECT widget types this desk may hold: their prop groups join the change journal and
|
|
22
|
+
* their kinds' `reach` the pick pad. An object of a type not listed still draws (its kind is found
|
|
23
|
+
* off the widget type) but its props are refreshed only on a Position/Size/tag change.
|
|
24
|
+
*/
|
|
25
|
+
readonly objects: readonly WidgetType[];
|
|
26
|
+
/** The objects' springs (springs.ts `SPRINGS`). */
|
|
27
|
+
readonly springs?: ObjectSprings;
|
|
28
|
+
/** A deleted object's fade, ms (the prototype's 0.22 s). */
|
|
29
|
+
readonly ghostMs?: number;
|
|
30
|
+
/** The cull margin past the view, CSS px (the prototype's 200). */
|
|
31
|
+
readonly marginPx?: number;
|
|
32
|
+
/** The re-dressing after a zoom-through cut, ms (PORTAL.md §9's 320). */
|
|
33
|
+
readonly redressMs?: number;
|
|
34
|
+
/**
|
|
35
|
+
* The kinds' own state on this desk by kind name (kinds/world.ts `KindLocal` — the note's writing,
|
|
36
|
+
* D2c): threaded into every context of the kind as `ctx.local`, and told when an entity is FORGOTTEN
|
|
37
|
+
* (its ghost faded, it left the frame, it died unseen) so what it held — a raster's rect — goes back.
|
|
38
|
+
*/
|
|
39
|
+
readonly locals?: ReadonlyMap<string, KindLocal>;
|
|
40
|
+
/** The interaction stack's marquee preview (out of the ECS — design-003 §5.7): the vellum the marks draw (D4a). */
|
|
41
|
+
readonly marquee?: () => MarqueeBuffer | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* The engine's spatial index (design-015 §2.5; D6): the cull's broad phase — the frame's objects within the view, its margin and the
|
|
44
|
+
* kinds' reach, asked with a hysteresis band so a pan asks it again only when the view leaves the last answer. Absent (a test, a bare
|
|
45
|
+
* host), every member is tested.
|
|
46
|
+
*/
|
|
47
|
+
readonly spatial?: SpatialSource;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* What the builder asks of the spatial index: the entries whose rects meet a world AABB (kernel's `SpatialIndex.search`), and how
|
|
51
|
+
* many it holds — core clears it at a nav cut and refills it on the NEXT tick's `spatialSync` (design-004 §7), so a build in which it
|
|
52
|
+
* holds fewer entries than the frame has members culls linearly and asks again next build.
|
|
53
|
+
*/
|
|
54
|
+
export interface SpatialSource {
|
|
55
|
+
search(bounds: {
|
|
56
|
+
readonly minX: number;
|
|
57
|
+
readonly minY: number;
|
|
58
|
+
readonly maxX: number;
|
|
59
|
+
readonly maxY: number;
|
|
60
|
+
}): readonly {
|
|
61
|
+
readonly id: Entity;
|
|
62
|
+
}[];
|
|
63
|
+
readonly size?: number;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The builder's PER-ENTITY WORK in a build — the O(1)-pan witness (design-015 §2.5, §11.4: "no per-entity work — a counter
|
|
67
|
+
* proves it"; D6). A camera move over a settled desk must leave every count at 0 but the cull's `visited`, which is the
|
|
68
|
+
* spatial index's answer, never the desk's population.
|
|
69
|
+
*/
|
|
70
|
+
export interface BuildWork {
|
|
71
|
+
/** Entities the membership query yielded (the frame's objects walked). */
|
|
72
|
+
readonly queried: number;
|
|
73
|
+
/** Members the cull walked, every slot. */
|
|
74
|
+
readonly visited: number;
|
|
75
|
+
/** Members sorted into paint order (0 = the last order stood). */
|
|
76
|
+
readonly sorted: number;
|
|
77
|
+
/** A kind's `resolve` — every slot's rows, the chips, the ghosts, the hand and its riders. */
|
|
78
|
+
readonly resolved: number;
|
|
79
|
+
/** A kind's `record`. */
|
|
80
|
+
readonly recorded: number;
|
|
81
|
+
/** Records REUSED from the last build — nothing about them changed (D6). */
|
|
82
|
+
readonly reused: number;
|
|
83
|
+
/** A kind's `rung` read (K6b): of each drawn object of a kind with one, on a frame its slot's zoom or the dpr moved — a remake only when it moved. */
|
|
84
|
+
readonly rungs: number;
|
|
85
|
+
/**
|
|
86
|
+
* Why records were remade (K6b, a rig's witness — the zoom's): the object had none (it came on screen), its RUNG moved, a `rezoom`
|
|
87
|
+
* kind's zoom moved, its kind's own state was restless (a board's density raised). Counted per cause: one remake may count twice.
|
|
88
|
+
*/
|
|
89
|
+
readonly fresh: number;
|
|
90
|
+
readonly rerung: number;
|
|
91
|
+
readonly rezoomed: number;
|
|
92
|
+
readonly restless: number;
|
|
93
|
+
/** Chips a container's face could not draw (K8a): the child's chip named no finish of the container's `faceLaw` — left out, never redressed. */
|
|
94
|
+
readonly unchipped: number;
|
|
95
|
+
}
|
|
96
|
+
export interface DeskBuilderStats {
|
|
97
|
+
/** Objects Active in the frame this build saw. */
|
|
98
|
+
readonly active: number;
|
|
99
|
+
/** Objects drawn in the root slot — within the view and its margin, plus the ghosts. */
|
|
100
|
+
readonly objects: number;
|
|
101
|
+
/** Objects off screen this build (the root slot). */
|
|
102
|
+
readonly culled: number;
|
|
103
|
+
/** Deleted objects still fading. */
|
|
104
|
+
readonly ghosts: number;
|
|
105
|
+
/** Live insides built this frame, every depth (the departed desk's included). */
|
|
106
|
+
readonly portals: number;
|
|
107
|
+
/** True after a build while any spring or ghost is still moving, or a re-dressing ramp runs. */
|
|
108
|
+
readonly live: boolean;
|
|
109
|
+
/** This build's per-entity work (D6). */
|
|
110
|
+
readonly work: BuildWork;
|
|
111
|
+
/** The work of every build since the builder was made — a rig diffs two readings. */
|
|
112
|
+
readonly totals: BuildWork;
|
|
113
|
+
/** Under `verify(true)`: reused records that a fresh resolve would NOT have made — the persistent path's own witness; 0 or a bug. */
|
|
114
|
+
readonly mismatches: number;
|
|
115
|
+
}
|
|
116
|
+
/** What can dirty the builder: a journaled world write, a despawn, a document reset, the sibling order, the hover target, the marks' own facts (the snap's chrome, the vellum, a drag meeting tape, the gestures — D4a). */
|
|
117
|
+
export type DeskWakeReason = "world" | "removed" | "reset" | "order" | "hover" | "marks";
|
|
118
|
+
/** The springs a host may pin: each present key holds that spring at the value. */
|
|
119
|
+
export type FluxPin = Partial<Pick<ObjectFlux, "lift" | "hover">>;
|
|
120
|
+
/** What a build may be told beyond the camera (a harness's pins, the reflector's clocks). */
|
|
121
|
+
export interface BuildOptions {
|
|
122
|
+
/** The frame's clock, ms (`FrameInfo.now`) — the re-dressing ramp's. */
|
|
123
|
+
readonly now?: number;
|
|
124
|
+
/** The mat's clocks and tilt for every slot this frame (the reflector's ambient frame). */
|
|
125
|
+
readonly mat?: MatFrame;
|
|
126
|
+
/** Live insides on (the default). Off, every face draws its far LOD alone (the oracle's `portals: false`). */
|
|
127
|
+
readonly portals?: boolean;
|
|
128
|
+
/** A pinned root dressing (the oracle's `lodZoom`). */
|
|
129
|
+
readonly lodZoom?: number;
|
|
130
|
+
/** Hold every spring and ghost where it is — a still of a moving frame (a rig's flight pin). */
|
|
131
|
+
readonly freeze?: boolean;
|
|
132
|
+
/** Hold the re-dressing ramp at its start (the prototype harness's `redressPinned`). */
|
|
133
|
+
readonly holdRedress?: boolean;
|
|
134
|
+
/** THE HAND PINNED (D4b — a still of the opening): the carry amount held at `e`, the kind's open motion snapped to `open` (default: open past 42 %). */
|
|
135
|
+
readonly hold?: HoldPin;
|
|
136
|
+
/** The kinds whose own state moved this tick (their `local.tick` wanted a frame — a print gliding, ink drying): their records are remade (D6). */
|
|
137
|
+
readonly restless?: ReadonlySet<string>;
|
|
138
|
+
/** Objects another presenter draws this frame (K5b — the tray's carry: an insert ghost growing out of the lifted copy, or shrinking home): none of the root's rows, no marks, their springs still run. */
|
|
139
|
+
readonly presented?: ReadonlySet<Entity>;
|
|
140
|
+
}
|
|
141
|
+
export interface HoldPin {
|
|
142
|
+
readonly e: number;
|
|
143
|
+
readonly open?: boolean;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* The object IN HAND as the last build made it (design-015 §8; D4b): the entity, whether the pickup has settled and whether
|
|
147
|
+
* it is flying home (the fact already gone), the frame the pose seam publishes (core's `HeldScreenFrame`, CSS px), what the
|
|
148
|
+
* ground draws (`GroundFrameInputs.held` less its `stamp` — the reflector adds the camera's and the viewport's stamps), and the
|
|
149
|
+
* desk's own change count `deskSeq` — everything the desk copy depends on, never the held object's own facts.
|
|
150
|
+
*/
|
|
151
|
+
export interface HeldBuild {
|
|
152
|
+
readonly entity: Entity;
|
|
153
|
+
/** The carry amount this frame, 0 on the desk … 1 in hand (also `inputs.e` — here for the witnesses). */
|
|
154
|
+
readonly e: number;
|
|
155
|
+
readonly settled: boolean;
|
|
156
|
+
readonly landing: boolean;
|
|
157
|
+
readonly frame: {
|
|
158
|
+
readonly cx: number;
|
|
159
|
+
readonly cy: number;
|
|
160
|
+
readonly hx: number;
|
|
161
|
+
readonly hy: number;
|
|
162
|
+
readonly s: number;
|
|
163
|
+
readonly settled: boolean;
|
|
164
|
+
};
|
|
165
|
+
readonly inputs: Omit<HeldFrameInputs, "stamp">;
|
|
166
|
+
readonly deskSeq: number;
|
|
167
|
+
}
|
|
168
|
+
export interface BuiltDesk {
|
|
169
|
+
/** The root slot's objects in paint order — what `SlotInputs.objects` takes. */
|
|
170
|
+
readonly objects: readonly SlotObject[];
|
|
171
|
+
/** The root slot's live insides (MINIMAT.md §3). */
|
|
172
|
+
readonly portals: readonly PortalInputs[];
|
|
173
|
+
/** The current frame's grid: the root's, or the entered mini mat's inside grid. */
|
|
174
|
+
readonly grid: GridConfig;
|
|
175
|
+
/** The root's dressing: a flight's landing, a re-dressing's ramp, a pin — absent = its own zoom. */
|
|
176
|
+
readonly lodZoom?: number;
|
|
177
|
+
/** The root's presentation while a flight is on. */
|
|
178
|
+
readonly present?: Presentation;
|
|
179
|
+
/** The root's lamp while it is handed over (a flight, a re-dressing after a cut in). */
|
|
180
|
+
readonly light?: SlotLight;
|
|
181
|
+
/** The departed desk while a flight is on. */
|
|
182
|
+
readonly outgoing?: OutgoingInputs;
|
|
183
|
+
/** The desk's chrome this frame (stratum 5 — `GroundFrameInputs.marks`, D4a): the root slot's, the current frame's desk. */
|
|
184
|
+
readonly marks: MarksInput;
|
|
185
|
+
/** The object in hand, or flying home (D4b): out of `objects` and of the marks, drawn as a slot of its own over the desk out of focus. */
|
|
186
|
+
readonly held?: HeldBuild;
|
|
187
|
+
readonly stats: DeskBuilderStats;
|
|
188
|
+
}
|
|
189
|
+
export interface DeskBuilder {
|
|
190
|
+
/**
|
|
191
|
+
* Advance every on-screen object's springs by `dt` SECONDS and build this frame's records under
|
|
192
|
+
* `cam` and `vp`: `theme` and `grid` are the root's; `looks` is each kind's `theme()` result by
|
|
193
|
+
* kind name (the reflector keeps them per theme); `opts` the clocks and a harness's pins.
|
|
194
|
+
*/
|
|
195
|
+
build(cam: CameraState, vp: BuildViewport, dt: number, theme: GroundTheme, grid: GridConfig, looks: ReadonlyMap<string, unknown>, opts?: BuildOptions): BuiltDesk;
|
|
196
|
+
/** True while a spring, a ghost or a re-dressing ramp still moves after the last build — the reflector paints again. */
|
|
197
|
+
live(): boolean;
|
|
198
|
+
/**
|
|
199
|
+
* PULL the world's dirt: did any fact a build reads change since the last pull — an object's
|
|
200
|
+
* position, size or props, its Grab, its selection, the Active set, a despawn, a document reset,
|
|
201
|
+
* the sibling order, the hover target? Call it every tick (it drains the journal); `wakes()` names
|
|
202
|
+
* what changed.
|
|
203
|
+
*/
|
|
204
|
+
changed(): boolean;
|
|
205
|
+
/** How many times each fact has dirtied the builder since creation. */
|
|
206
|
+
wakes(): Readonly<Record<DeskWakeReason, number>>;
|
|
207
|
+
/** The last build's geometry for an entity — the pick source's mirror; `undefined` = not drawn (unseen, culled, gone). */
|
|
208
|
+
geometryOf(e: Entity): unknown | undefined;
|
|
209
|
+
/** The kind an entity draws by, once the builder has met it. */
|
|
210
|
+
kindOf(e: Entity): ObjectKind | undefined;
|
|
211
|
+
/** The last build's flux for an entity (the rig's witness). */
|
|
212
|
+
fluxOf(e: Entity): ObjectFlux | undefined;
|
|
213
|
+
/** The last build's view of a container's inside — its camera, presence and clip under the slot it was drawn in (a rig's witness). */
|
|
214
|
+
insideViewOf(e: Entity): InsideView | undefined;
|
|
215
|
+
/**
|
|
216
|
+
* THE SEAM's answer (design-015 §9): the container's face under the host camera `cam` — AS DRAWN
|
|
217
|
+
* when it was built in the current frame this frame, at REST otherwise (the frame's own container,
|
|
218
|
+
* an exit's) — with the inside's arrival, embedding, camera, presence and cover test. `undefined`:
|
|
219
|
+
* not a container kind, or a face with no area.
|
|
220
|
+
*/
|
|
221
|
+
navFace(container: Entity, cam: CameraState): NavFace | undefined;
|
|
222
|
+
/**
|
|
223
|
+
* A per-entity asset the host pins — a committed raster, a note's greeked writing (`ObjectContext.asset`);
|
|
224
|
+
* `undefined` unpins. Kept BY ENTITY, met or not: a pin made in the same task as the spawn (the parity
|
|
225
|
+
* scene's ink, before the entity's facts are readable) waits for the first build. Dirties the builder.
|
|
226
|
+
*/
|
|
227
|
+
pin(e: Entity, asset: unknown): void;
|
|
228
|
+
/**
|
|
229
|
+
* Pin an object's springs for a STILL (a parity scene's `held` = `{ lift: 1 }` — never a `Grab`,
|
|
230
|
+
* which would also carry it to the top of the paint order): each pinned spring SITS at its
|
|
231
|
+
* target, snapped, whatever the facts say; the unpinned ones keep following them. `undefined`
|
|
232
|
+
* unpins. Dirties the builder. Flux, never a world fact.
|
|
233
|
+
*/
|
|
234
|
+
pinFlux(e: Entity, targets: FluxPin | undefined): void;
|
|
235
|
+
/** Every flux pin lifted. */
|
|
236
|
+
clearFlux(): void;
|
|
237
|
+
/** The widest `reach` among the desk's kinds, world units — the pick source's pad. */
|
|
238
|
+
reach(): number;
|
|
239
|
+
/** The selection menu's anchor as of the last build: the marks' box around the selection on screen, whether a gesture is on (D4a). */
|
|
240
|
+
anchor(): SelectionAnchor;
|
|
241
|
+
/**
|
|
242
|
+
* A drag a host refused on `e` outside core's move — a print's own carry (D3w): a taped object gives, as a core drag that
|
|
243
|
+
* meets the tape makes it give (D4a). The next `changed()` reports it.
|
|
244
|
+
*/
|
|
245
|
+
meetTape(e: Entity): void;
|
|
246
|
+
/** The object in hand as of the last build (D4b) — what the pose seam answers from; undefined = nothing held or flying home. */
|
|
247
|
+
hand(): HeldBuild | undefined;
|
|
248
|
+
/**
|
|
249
|
+
* A point of the held object's own frame (core's `HeldPointer`: its open extent's units, centred) as a DESK point, through the
|
|
250
|
+
* pose the last build drew (the frame on screen, then the held slot's camera) — undefined unless `e` is in hand (D3t-a).
|
|
251
|
+
*/
|
|
252
|
+
heldToWorld(e: Entity, x: number, y: number): readonly [number, number] | undefined;
|
|
253
|
+
/**
|
|
254
|
+
* A DESK point into the held slot's world for the object in hand or FLYING HOME (D7 #11): the pose the last build drew, through
|
|
255
|
+
* the desk camera of that build. The pick asks the kind's mirror there — the held geometry is resolved under the held slot's own
|
|
256
|
+
* camera, so a desk point tested against it raw picked nothing where the object is drawn. Undefined unless `e` is the hand's.
|
|
257
|
+
*/
|
|
258
|
+
heldPoint(e: Entity, wx: number, wy: number): readonly [number, number] | undefined;
|
|
259
|
+
/** The held kind's part under such a point — its `hit` on the geometry it was drawn with in hand; null over nothing (the pose seam's `part`, D3t-a). */
|
|
260
|
+
heldPart(e: Entity, x: number, y: number): string | null;
|
|
261
|
+
/** The objects the last build painted LIFTED by their kind's own state (D3t-a — a print carried or in the air): above their siblings, asked first by the pick. */
|
|
262
|
+
lifted(): readonly Entity[];
|
|
263
|
+
/** An entity a kind's state veiled in the last build (D3t-c — a note gone with its month): not drawn, never picked. */
|
|
264
|
+
veiled(e: Entity): boolean;
|
|
265
|
+
/** The last build's paint rank of `e` in the ROOT slot (D6 — a kind's residency asks it); undefined = not drawn there. */
|
|
266
|
+
rankOf(e: Entity): number | undefined;
|
|
267
|
+
/** Was `e` drawn in the last build — its record made or reused in ANY slot, the root's, an inside's, the hand's (K6b: the raster queue lets go of an ask whose object is not)? */
|
|
268
|
+
shows(e: Entity): boolean;
|
|
269
|
+
/** `e`'s record remade at the next build, and the desk woken (K6b — a raster LANDED on it: its record says where its ink is). */
|
|
270
|
+
remake(e: Entity): void;
|
|
271
|
+
/** Every record remade at the next build (a kind's law changed under them — `tuneLaw`). */
|
|
272
|
+
invalidate(): void;
|
|
273
|
+
/** Check every reused record against a fresh resolve each build (`stats().mismatches`) — a rig's witness, dear per frame. */
|
|
274
|
+
verify(on: boolean): void;
|
|
275
|
+
stats(): DeskBuilderStats;
|
|
276
|
+
dispose(): void;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Two records the same, value for value (D6's `verify`): plain objects and arrays by their entries, typed arrays by their elements,
|
|
280
|
+
* numbers with NaN equal to NaN, anything else — a picture's texture, a class instance — by identity.
|
|
281
|
+
*/
|
|
282
|
+
export declare function sameRecord(a: unknown, b: unknown): boolean;
|
|
283
|
+
export declare function createDeskBuilder(world: World, opts: DeskBuilderOptions): DeskBuilder;
|
|
284
|
+
/** The flux of an object nobody has met: at rest. */
|
|
285
|
+
export { FLUX_REST };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { AMBIENT_DEFAULTS, type Ambient, type AmbientMode, type AmbientOptions, type AmbientPhase, type AmbientPin, type AmbientState, createAmbient } from "./ambient";
|
|
2
|
+
export { type BuildViewport, type BuildWork, type BuiltDesk, createDeskBuilder, type DeskBuilder, type DeskBuilderOptions, type DeskBuilderStats, type DeskWakeReason, type HeldBuild, type HoldPin } from "./builder";
|
|
3
|
+
export { createMarksCollector, type MarkRow, type MarksCollector, type MenuSlot, menuSlots, type SelectionAnchor, withKindActs } from "./marks";
|
|
4
|
+
export { createPickSource } from "./pick";
|
|
5
|
+
export { tapHit } from "./tap";
|
|
6
|
+
export { createDeskReflector, type DeskReflector, type DeskReflectorOptions, type DeskReflectorStats, type DeskWakes } from "./reflector";
|
|
7
|
+
export { instrumentSubmits, type SubmitHook, type SubmitInstrument, tapSubmits, type UploadTally } from "../submit-instrument";
|
|
8
|
+
export { type Ablation, ablateKinds, type KindCost, type KindCostOptions, type KindCostReport, kindsIn, type Sampled, withoutKind } from "../gpu-ablation";
|
|
9
|
+
export { createGpuProfiler, type GpuFrameCounts, type GpuFrameReport, type GpuProfileStats, type GpuProfiler, type GpuProfilerOptions, type Rolling, rolling, busyOf, spanOf, type TraceEvent, type TraceJson, traceOf } from "../gpu-profiler";
|
|
10
|
+
export { instrumentPasses, type KindDraws, type PassCounts, type PassFrame, type PassInstrument, type PassInstrumentOptions, type PassTime, type PassTiming, readTimestamps, TIMESTAMP_QUANTUM_NS, UNQUANTISED_TIMESTAMPS_FLAG } from "../pass-instrument";
|
|
11
|
+
export { type FormatBlock, formatBlock, type GpuMemory, type GpuMemoryRow, instrumentMemory, type MemoryLedger, regionBytes, textureBytes } from "../gpu-memory";
|
|
12
|
+
export { type BudgetStats, createRasterBudget, type RasterBudget } from "../engine/budget";
|
|
13
|
+
export { createRasterQueue, RASTER_BUDGET_MS, rasterPriority, type RasterQueue, type RasterQueueOptions, type RasterQueueStats, type RasterRun, type RasterWait } from "../engine/rasters";
|
|
14
|
+
export { createRecordStore, type RecordStore, type RecordStoreStats } from "../engine/records";
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { type HeldGlyph, type MenuActionDef, type MarqueeBuffer, type Entity, type World } from "../../../core/src/index";
|
|
2
|
+
import type { HeldToolDef } from "../kinds/world";
|
|
3
|
+
import { type MarkBox, type MarkFrame, type MarksInput } from "../marks/layout";
|
|
4
|
+
/** One object as the builder hands it to the marks: its drawn frame and rect (world), the facts it cached. */
|
|
5
|
+
export interface MarkRow {
|
|
6
|
+
readonly entity: Entity;
|
|
7
|
+
readonly frame: MarkFrame;
|
|
8
|
+
/** ICE's rect: Position (top-left) + Size, world units. */
|
|
9
|
+
readonly rect: {
|
|
10
|
+
readonly x0: number;
|
|
11
|
+
readonly y0: number;
|
|
12
|
+
readonly x1: number;
|
|
13
|
+
readonly y1: number;
|
|
14
|
+
};
|
|
15
|
+
readonly selected: boolean;
|
|
16
|
+
readonly locked: boolean;
|
|
17
|
+
readonly grabbed: boolean;
|
|
18
|
+
readonly resizable: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** What the selection menu is placed from (the desk handle publishes it): the marks' box around the selection ON SCREEN, CSS px. */
|
|
21
|
+
export interface SelectionAnchor {
|
|
22
|
+
/** The brackets' box (6 out) for one object, the union's (10 out) for several — null when nothing is selected. */
|
|
23
|
+
readonly box: MarkBox | null;
|
|
24
|
+
readonly count: number;
|
|
25
|
+
/** Every selected object is taped (the menu offers "Lift the tape"). */
|
|
26
|
+
readonly locked: boolean;
|
|
27
|
+
/** A gesture is on (a drag, a vellum, a pan, a pinch): the menu steps aside. */
|
|
28
|
+
readonly gesturing: boolean;
|
|
29
|
+
/** A note is being written (core's `Editing` — the one focused editor, D2c): the menu steps aside as for a gesture; the brackets stay. */
|
|
30
|
+
readonly editing: boolean;
|
|
31
|
+
/** The view it was placed in, CSS px, and whether the rulers are printed (the menu flips below their band). */
|
|
32
|
+
readonly view: {
|
|
33
|
+
readonly width: number;
|
|
34
|
+
readonly height: number;
|
|
35
|
+
};
|
|
36
|
+
readonly rulers: {
|
|
37
|
+
readonly margin: number;
|
|
38
|
+
readonly band: number;
|
|
39
|
+
} | null;
|
|
40
|
+
/** An object is IN HAND (design-015 §8, D4b): the menu travels to the foot and becomes the held bar — Send · the kind's tools · Done. Absent = nothing held. */
|
|
41
|
+
readonly held?: HeldAnchor;
|
|
42
|
+
/**
|
|
43
|
+
* The selection's KIND ACTS (K8a — its types' `defineObject({ menu })`): those every selected object's type declares, as plain data
|
|
44
|
+
* (the op stays on the type — the menu runs one through `ops.runMenuAction`). Absent: none (nothing selected declares any).
|
|
45
|
+
*/
|
|
46
|
+
readonly menu?: readonly MenuSlot[];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The hand as the menu takes it (D4b): the kind's tools that take a slot in the bar (its `open.tools`, D3t-a: live), the mode
|
|
50
|
+
* in hand (core's `HeldTool` — the one slot marked), whether the object is flying home (the bar hides) and whether the pickup
|
|
51
|
+
* has settled.
|
|
52
|
+
*/
|
|
53
|
+
export interface HeldAnchor {
|
|
54
|
+
readonly tools: readonly HeldSlot[];
|
|
55
|
+
readonly active: string;
|
|
56
|
+
readonly landing: boolean;
|
|
57
|
+
readonly settled: boolean;
|
|
58
|
+
}
|
|
59
|
+
/** A kind's act as the selection menu shows it (K8a): plain data — the op stays on the widget type (`ops.runMenuAction`). */
|
|
60
|
+
export interface MenuSlot {
|
|
61
|
+
readonly id: string;
|
|
62
|
+
readonly label: string;
|
|
63
|
+
readonly glyph?: HeldGlyph;
|
|
64
|
+
readonly keys?: string;
|
|
65
|
+
}
|
|
66
|
+
/** A selection's kind acts as the menu's slots (K8a): every act its types all declare (core's `menuActionsFor`), as plain data. */
|
|
67
|
+
export declare function menuSlots(acts: readonly MenuActionDef[]): MenuSlot[];
|
|
68
|
+
/**
|
|
69
|
+
* The anchor with the selection's KIND ACTS (K8a): every act all the selected objects' types declare (`menuOf` reads an object's
|
|
70
|
+
* type's `menu`), as the menu's slots — the anchor unchanged when nothing is selected or no act is shared.
|
|
71
|
+
*/
|
|
72
|
+
export declare function withKindActs(a: SelectionAnchor, selected: readonly Entity[], menuOf: (e: Entity) => readonly MenuActionDef[]): SelectionAnchor;
|
|
73
|
+
/** A tool's slot as the bar shows it: plain data (the op stays on the widget type — the bar uses a tool through `ops.useHeldTool`). */
|
|
74
|
+
export interface HeldSlot {
|
|
75
|
+
readonly id: string;
|
|
76
|
+
readonly label: string;
|
|
77
|
+
/** `mode` · `action`; absent = declared only (dim). */
|
|
78
|
+
readonly kind?: "mode" | "action";
|
|
79
|
+
readonly hint?: string;
|
|
80
|
+
/** Its glyph (core's `HeldGlyph`, K8a): a name of the bar's set, or the tool's own drawing (`{ path }`) — plain data either way. */
|
|
81
|
+
readonly glyph?: HeldGlyph;
|
|
82
|
+
/** A colour the slot shows instead of its glyph (a marker's ink), CSS. */
|
|
83
|
+
readonly swatch?: string;
|
|
84
|
+
}
|
|
85
|
+
/** The slots a kind's tools take in the bar: every tool not keys-only, as plain data, its swatch from the kind's look. */
|
|
86
|
+
export declare function heldSlots(tools: readonly HeldToolDef[], swatches?: Readonly<Record<string, string>>): HeldSlot[];
|
|
87
|
+
export interface MarksFrameInput {
|
|
88
|
+
readonly rows: readonly MarkRow[];
|
|
89
|
+
readonly cam: {
|
|
90
|
+
readonly x: number;
|
|
91
|
+
readonly y: number;
|
|
92
|
+
readonly zoom: number;
|
|
93
|
+
};
|
|
94
|
+
readonly view: {
|
|
95
|
+
readonly width: number;
|
|
96
|
+
readonly height: number;
|
|
97
|
+
readonly dpr: number;
|
|
98
|
+
};
|
|
99
|
+
readonly dt: number;
|
|
100
|
+
readonly night: boolean;
|
|
101
|
+
readonly rulers: {
|
|
102
|
+
readonly margin: number;
|
|
103
|
+
readonly band: number;
|
|
104
|
+
} | null;
|
|
105
|
+
}
|
|
106
|
+
export interface MarksCollector {
|
|
107
|
+
/** PULL what the marks read outside the builder's journal — the snap's chrome, the vellum, a drag meeting tape, the gestures; true when any changed (a wake). */
|
|
108
|
+
changed(): boolean;
|
|
109
|
+
/** This frame's marks: the clocks stepped by `dt`, the state assembled. */
|
|
110
|
+
frame(input: MarksFrameInput): MarksInput;
|
|
111
|
+
/** A clock still moves: the next frame paints too. */
|
|
112
|
+
live(): boolean;
|
|
113
|
+
/** The tape's give on an entity this frame, CSS px along x (0 at rest) — the builder shifts the object by it. */
|
|
114
|
+
giveOf(e: Entity): number;
|
|
115
|
+
/**
|
|
116
|
+
* A drag refused on `e` outside core's move — a print's own carry (D3w: a print is not core-movable, so no core drag of
|
|
117
|
+
* it ever meets the tape here): a taped `e` gives, as a core drag meeting tape makes it give. The next `changed()` wakes.
|
|
118
|
+
*/
|
|
119
|
+
refused(e: Entity): void;
|
|
120
|
+
/** The selection menu's anchor, as of the last frame. */
|
|
121
|
+
anchor(): SelectionAnchor;
|
|
122
|
+
dispose(): void;
|
|
123
|
+
}
|
|
124
|
+
export declare function createMarksCollector(world: World, opts?: {
|
|
125
|
+
readonly marquee?: () => MarqueeBuffer | undefined;
|
|
126
|
+
}): MarksCollector;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { FramePickSource } from "../../../core/src/index";
|
|
2
|
+
import type { DeskBuilder } from "./builder";
|
|
3
|
+
export declare function createPickSource(builder: Pick<DeskBuilder, "geometryOf" | "kindOf" | "live" | "reach" | "lifted"> & Partial<Pick<DeskBuilder, "veiled" | "heldPoint" | "hand">>, opts?: {
|
|
4
|
+
readonly moving?: () => boolean;
|
|
5
|
+
}): FramePickSource;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { type Entity, type ReflectorDef, type World } from "../../../core/src/index";
|
|
2
|
+
import type { Ground, GroundFrameInputs, GroundStats } from "../ground";
|
|
3
|
+
import { type KindLocal, type ObjectKind } from "../kinds/world";
|
|
4
|
+
import { type GridConfig } from "../mat/grid";
|
|
5
|
+
import type { GroundTheme, Palette } from "../theme";
|
|
6
|
+
import { type TrayFlux } from "../tray/flux";
|
|
7
|
+
import { type TrayCarry } from "../tray/carry";
|
|
8
|
+
import { type TrayCarriedFrame, type TraySpecimenFrame } from "../tray/specimens";
|
|
9
|
+
import type { Ambient, AmbientState } from "./ambient";
|
|
10
|
+
import type { DeskBuilder, DeskBuilderStats, DeskWakeReason, HoldPin } from "./builder";
|
|
11
|
+
export interface DeskReflectorOptions {
|
|
12
|
+
readonly world: World;
|
|
13
|
+
readonly builder: DeskBuilder;
|
|
14
|
+
/** The kinds whose `theme()` makes a look — every object kind the ground registers. */
|
|
15
|
+
readonly kinds: readonly ObjectKind[];
|
|
16
|
+
readonly ambient: Ambient;
|
|
17
|
+
/** The ground once `Ground.create` resolved, null before and after the layer ends. */
|
|
18
|
+
readonly ground: () => Ground | null;
|
|
19
|
+
/** The host sizes its canvas to `width × height` DEVICE px (the swap chain follows). */
|
|
20
|
+
readonly attach: {
|
|
21
|
+
resize(width: number, height: number): void;
|
|
22
|
+
};
|
|
23
|
+
readonly theme: GroundTheme;
|
|
24
|
+
/** The host's palette — what each kind's `theme()` reads its look from. */
|
|
25
|
+
readonly palette: Palette;
|
|
26
|
+
/** The root's grid: the lattice's fade-in and the mat's config (its gobo, its rulers). */
|
|
27
|
+
readonly grid?: GridConfig;
|
|
28
|
+
/** The device pixel ratio the canvas is capped at (2). */
|
|
29
|
+
readonly maxDpr?: number;
|
|
30
|
+
readonly name?: string;
|
|
31
|
+
/** Called after every frame drawn — the layer publishes the selection menu's anchor from it (D4a). */
|
|
32
|
+
readonly onFrame?: () => void;
|
|
33
|
+
/** The kinds' own state on this desk (`KindLocal`, by kind name): what the tray's carried objects are drawn with, as the builder's are (K5b). */
|
|
34
|
+
readonly locals?: ReadonlyMap<string, KindLocal>;
|
|
35
|
+
/**
|
|
36
|
+
* Called when a frame is asked for from OUTSIDE the flush — a wake (a pin, an ink landing, the ambient's policy), the ground
|
|
37
|
+
* arriving, a theme, a grid, a harness's pin (K7a): the host wakes a sleeping loop with it.
|
|
38
|
+
*/
|
|
39
|
+
readonly onWake?: (reason: string) => void;
|
|
40
|
+
}
|
|
41
|
+
/** What woke a frame, counted since the mount — the builder's reasons and the reflector's own. */
|
|
42
|
+
export type DeskWakes = Readonly<Record<DeskWakeReason | "camera" | "viewport" | "nav" | "theme" | "grid" | "pin" | "ambient" | "live" | "ink" | "tray", number>>;
|
|
43
|
+
export interface DeskReflectorStats extends DeskBuilderStats {
|
|
44
|
+
/** Whole-frame renders so far — the churn instrument (0 on an idle desk). */
|
|
45
|
+
readonly redraws: number;
|
|
46
|
+
/** The ground's stats for the last frame drawn (null before the first). */
|
|
47
|
+
readonly frame: GroundStats | null;
|
|
48
|
+
readonly ambient: AmbientState;
|
|
49
|
+
}
|
|
50
|
+
export interface DeskReflector {
|
|
51
|
+
/** The drawing reflector (`always: true`): register it where the ground layer goes. */
|
|
52
|
+
readonly reflector: ReflectorDef & {
|
|
53
|
+
available(): boolean;
|
|
54
|
+
};
|
|
55
|
+
/** The ground is here (or gone): the next tick paints. */
|
|
56
|
+
ready(): void;
|
|
57
|
+
/** The host's projection changed (a theme switch): the looks are remade, the next frame re-renders. */
|
|
58
|
+
setTheme(theme: GroundTheme, palette?: Palette): void;
|
|
59
|
+
/** The root's grid (the mat's config, the fade-in) as a whole. */
|
|
60
|
+
configureGrid(grid: GridConfig): void;
|
|
61
|
+
/** Wake a frame for a reason the world does not carry (a pin, an asset, the writing's flux — D2c's `ink`). */
|
|
62
|
+
wake(reason: "pin" | "ambient" | "ink"): void;
|
|
63
|
+
/**
|
|
64
|
+
* A harness's pins on the build (D2b): live insides on or off (the oracle's `portals: false`), a pinned root
|
|
65
|
+
* dressing (`lodZoom`), every spring and ghost held where it is (`freeze` — a still of a moving frame), the
|
|
66
|
+
* re-dressing ramp held at its start (`holdRedress`). Each present key is set; the next frame paints.
|
|
67
|
+
*/
|
|
68
|
+
pinBuild(pins: {
|
|
69
|
+
readonly portals?: boolean;
|
|
70
|
+
readonly lodZoom?: number | null;
|
|
71
|
+
readonly freeze?: boolean;
|
|
72
|
+
readonly holdRedress?: boolean;
|
|
73
|
+
readonly hold?: HoldPin | null;
|
|
74
|
+
}): void;
|
|
75
|
+
/** The kinds whose own state moved this tick (their `local.tick` wanted a frame): the builder remakes their records this build (D6). */
|
|
76
|
+
restless(kinds: ReadonlySet<string>): void;
|
|
77
|
+
/** The frame dirty and not yet drawn (a rig's witness). */
|
|
78
|
+
dirty(): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* WHEN THE REFLECTOR IS NEXT DUE (K7a — its registered wake): `now` while a frame is owed (dirt, a live spring or ghost, the
|
|
81
|
+
* drawer on its way) or the ambient still moves (the wind's clock is a frame); `Infinity` otherwise — and while it cannot
|
|
82
|
+
* draw (no ground yet, no viewport): the ground's arrival and the viewport's write wake it.
|
|
83
|
+
*/
|
|
84
|
+
due(now: number): number;
|
|
85
|
+
redraws(): number;
|
|
86
|
+
stats(): DeskReflectorStats;
|
|
87
|
+
wakes(): DeskWakes;
|
|
88
|
+
/** The inputs of the last render, as handed to `Ground.render`. */
|
|
89
|
+
lastInputs(): GroundFrameInputs | null;
|
|
90
|
+
grid(): GridConfig;
|
|
91
|
+
theme(): GroundTheme;
|
|
92
|
+
/** A kind's look for the theme in force (its `theme()` of the palette) — the held bar's swatches read it (D3t-a). */
|
|
93
|
+
look(kind: string): unknown;
|
|
94
|
+
/** The pegboard drawer's flux (design-017 §3): its motion, the drawer as drawn (the pose seam's answer), the pins for a still. */
|
|
95
|
+
readonly tray: TrayFlux;
|
|
96
|
+
/** The tray's specimens as the last frame drew them (K5a) — a rig's witness; empty while the drawer is shut or bare. */
|
|
97
|
+
traySpecimens(): readonly TraySpecimenFrame[];
|
|
98
|
+
/**
|
|
99
|
+
* Did the last frame's TRAY draw `e` — a specimen, a lifted copy's key, an insert ghost it presented (K5b over K6b)? The frame raster
|
|
100
|
+
* queue's word on what shows is the builder's and this: an ask a specimen's writing made (its word, `tray.local`) is run, not let go.
|
|
101
|
+
*/
|
|
102
|
+
trayShows(e: Entity): boolean;
|
|
103
|
+
/** The take's motion (K5b — tray/carry.ts): the lifted copy, the ghost's grow and its flight home. */
|
|
104
|
+
readonly carry: TrayCarry;
|
|
105
|
+
/** What the tray carried in the last frame drawn (K5b) — a rig's witness: each pose's slot, phase, ghost and rect on screen. */
|
|
106
|
+
trayCarried(): readonly TrayCarriedFrame[];
|
|
107
|
+
dispose(): void;
|
|
108
|
+
}
|
|
109
|
+
export declare function createDeskReflector(opts: DeskReflectorOptions): DeskReflector;
|
|
110
|
+
/** Each kind's look for a theme, by kind name — what `ObjectContext.look` carries. */
|
|
111
|
+
export declare function looksOf(kinds: readonly ObjectKind[], palette: Palette, theme: GroundTheme): Map<string, unknown>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type CommitExtender, type DocSession } from "../../core/src/index";
|
|
2
|
+
/** The document a driver writes into — the facade's `engine.docs` (its `current()` session: store + live writer + the gate's verdict). */
|
|
3
|
+
export interface TypingDocs {
|
|
4
|
+
current(): Pick<DocSession, "store" | "liveWriter" | "readOnly" | "versionReport"> | undefined;
|
|
5
|
+
/** The facade's door into a gesture's own transaction (`docs.extendCommits`, D7 #2): a landing's writes in the gesture's undo step. Absent (a bare store), a driver has no such door. */
|
|
6
|
+
extendCommits?(extend: CommitExtender): () => void;
|
|
7
|
+
/** The facade's history doors (`docs.undo`/`docs.redo` — historyStep: the tween retarget, the read-only posture; D7 #9). Absent (a bare store), a driver moves no history. */
|
|
8
|
+
undo?(): boolean;
|
|
9
|
+
redo?(): boolean;
|
|
10
|
+
}
|
|
11
|
+
/** What a desk writer holds while it commits: the session's store and live writer. */
|
|
12
|
+
export type WritableSession = Pick<DocSession, "store" | "liveWriter">;
|
|
13
|
+
/**
|
|
14
|
+
* THE WRITER'S GATE (D7 #1): the session a desk gesture may commit into — none without a document, and none when the
|
|
15
|
+
* version gate's verdict is read-only (a doc a newer build wrote, a pack this build does not compile, a root that does not
|
|
16
|
+
* agree). `readOnly` is the verdict at open; the report is asked again because a peer's pack can move it after. This is
|
|
17
|
+
* the facade's `requireWritable` law at the desk's own write surfaces: strata's store has no read-only mode, and every desk
|
|
18
|
+
* writer commits through it directly (guardedTransaction, setWidgetProps), never through the doc kit's commit sink, so a
|
|
19
|
+
* gate that lived only in the sink never reached them. A refused writer does what "no document" means to it: nothing lands.
|
|
20
|
+
*/
|
|
21
|
+
export declare function writable(docs: TypingDocs): WritableSession | undefined;
|
|
22
|
+
/** No document at all: the runtime is all there is (a desk without a facade, a catalog harness). */
|
|
23
|
+
export declare const NO_DOCS: TypingDocs;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface BudgetStats {
|
|
2
|
+
readonly cap: number;
|
|
3
|
+
/** Bytes charged across every owner — the resident arrays and the caches together. */
|
|
4
|
+
readonly used: number;
|
|
5
|
+
/** Bytes that reside (never evicted): the thumbnail arrays. */
|
|
6
|
+
readonly resident: number;
|
|
7
|
+
/** What the caches may hold beside what resides: `cap − resident`, never under the floor. */
|
|
8
|
+
readonly room: number;
|
|
9
|
+
readonly entries: number;
|
|
10
|
+
/** Evictions since the ledger was made. */
|
|
11
|
+
readonly evictions: number;
|
|
12
|
+
readonly byOwner: Readonly<Record<string, {
|
|
13
|
+
readonly bytes: number;
|
|
14
|
+
readonly entries: number;
|
|
15
|
+
}>>;
|
|
16
|
+
}
|
|
17
|
+
export interface RasterBudget {
|
|
18
|
+
readonly cap: number;
|
|
19
|
+
/** The caches' room this moment: `cap − resident`, never under the floor. */
|
|
20
|
+
room(): number;
|
|
21
|
+
/** An owner's raster `key` of `bytes`, and how to let it go; a second charge of the same key re-sizes it (the old bytes released). Touches it. */
|
|
22
|
+
charge(owner: string, key: string, bytes: number, evict: () => void): void;
|
|
23
|
+
/** An owner's `key` kept WHOLE (a thumbnail array): never evicted, outside the caches' room; a second call re-sizes it. */
|
|
24
|
+
reside(owner: string, key: string, bytes: number): void;
|
|
25
|
+
/** The raster was used (drawn, written): it is the most recently used now. */
|
|
26
|
+
touch(owner: string, key: string): void;
|
|
27
|
+
/** The owner let the raster (or the resident array) go itself (no eviction). */
|
|
28
|
+
release(owner: string, key: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* Evict least-recently-used caches until they are within their room — never one `keep` says to hold (an owner's word on
|
|
31
|
+
* what is on screen this frame; absent, every cache may go), never a resident charge. Returns the bytes freed.
|
|
32
|
+
*/
|
|
33
|
+
trim(keep?: (owner: string, key: string) => boolean): number;
|
|
34
|
+
stats(): BudgetStats;
|
|
35
|
+
}
|
|
36
|
+
/** The caches' floor as a share of the cap: what they may always hold, however much resides (D-K9-d.1). */
|
|
37
|
+
export declare const BUDGET_FLOOR: number;
|
|
38
|
+
export declare function createRasterBudget(cap: number, floor?: number): RasterBudget;
|