@vibecook/ice 0.11.0 → 0.15.0-desk.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -50
- package/dist/chunk-AMMFQP2C.js +2444 -0
- package/dist/chunk-AMMFQP2C.js.map +1 -0
- package/dist/chunk-BKV4ZEU3.js +1 -0
- package/dist/chunk-BKV4ZEU3.js.map +1 -0
- package/dist/chunk-ENIFIUEP.js +155 -0
- package/dist/chunk-ENIFIUEP.js.map +1 -0
- package/dist/chunk-H3SKYJLK.js +8269 -0
- package/dist/chunk-H3SKYJLK.js.map +1 -0
- package/dist/{chunk-OR5FNVUE.js → chunk-JS6PG6YD.js} +398 -167
- package/dist/chunk-JS6PG6YD.js.map +1 -0
- package/dist/{chunk-VGVDJZSP.js → chunk-PFJN3XN2.js} +13232 -7388
- package/dist/chunk-PFJN3XN2.js.map +1 -0
- package/dist/chunk-QXOCF56A.js +148 -0
- package/dist/chunk-QXOCF56A.js.map +1 -0
- package/dist/chunk-U4YMA4TJ.js +635 -0
- package/dist/chunk-U4YMA4TJ.js.map +1 -0
- package/dist/desk-engine.js +36 -0
- package/dist/desk-engine.js.map +1 -0
- package/dist/desk-kit.js +244 -0
- package/dist/desk-kit.js.map +1 -0
- package/dist/desk-objects.js +12734 -0
- package/dist/desk-objects.js.map +1 -0
- package/dist/desk.js +497 -0
- package/dist/desk.js.map +1 -0
- package/dist/devtools.js +233 -189
- package/dist/devtools.js.map +1 -1
- package/dist/dom.js +7 -19
- package/dist/index.js +232 -20
- package/dist/kernel.js +53 -25
- package/dist/react.js +1047 -38
- package/dist/react.js.map +1 -1
- package/dist/types/packages/core/src/behavior/define-behavior.d.ts +11 -0
- package/dist/types/packages/core/src/behavior/runtime.d.ts +4 -0
- package/dist/types/packages/core/src/canvas/define-canvas-type.d.ts +86 -0
- package/dist/types/packages/core/src/canvas/define-container.d.ts +17 -0
- package/dist/types/packages/core/src/canvas/diagnostics.d.ts +27 -0
- package/dist/types/packages/core/src/canvas/engine-catalog.d.ts +70 -0
- package/dist/types/packages/core/src/canvas/extensions.d.ts +125 -0
- package/dist/types/packages/core/src/canvas/frame-behavior-host.d.ts +16 -0
- package/dist/types/packages/core/src/canvas/frame-preview.d.ts +79 -0
- package/dist/types/packages/core/src/canvas/frame-projection.d.ts +38 -0
- package/dist/types/packages/core/src/canvas/frame-view.d.ts +36 -0
- package/dist/types/packages/core/src/canvas/migrate.d.ts +14 -0
- package/dist/types/packages/core/src/canvas/placement.d.ts +30 -0
- package/dist/types/packages/core/src/canvas/presentation-transition.d.ts +100 -0
- package/dist/types/packages/core/src/canvas/runtime-extension-host.d.ts +16 -0
- package/dist/types/packages/core/src/canvas/session.d.ts +47 -0
- package/dist/types/packages/core/src/catalog/camera-derived.d.ts +16 -27
- package/dist/types/packages/core/src/catalog/desk.d.ts +326 -0
- package/dist/types/packages/core/src/catalog/gesture.d.ts +51 -0
- package/dist/types/packages/core/src/catalog/graph.d.ts +2 -2
- package/dist/types/packages/core/src/catalog/index.d.ts +2 -0
- package/dist/types/packages/core/src/catalog/pointer.d.ts +42 -0
- package/dist/types/packages/core/src/catalog/selection-presence.d.ts +7 -0
- package/dist/types/packages/core/src/catalog/settings-resources.d.ts +28 -2
- package/dist/types/packages/core/src/catalog/surface.d.ts +1 -0
- package/dist/types/packages/core/src/doc/doc-commit-sink.d.ts +18 -2
- package/dist/types/packages/core/src/doc/doc-kit.d.ts +21 -2
- package/dist/types/packages/core/src/doc/envelope.d.ts +5 -2
- package/dist/types/packages/core/src/doc/schema-migrate.d.ts +1 -1
- package/dist/types/packages/core/src/doc/version-gate.d.ts +21 -3
- package/dist/types/packages/core/src/engine/commit-sink.d.ts +10 -1
- package/dist/types/packages/core/src/engine/engine.d.ts +6 -0
- package/dist/types/packages/core/src/engine/frame-control.d.ts +74 -0
- package/dist/types/packages/core/src/engine/guests.d.ts +4 -1
- package/dist/types/packages/core/src/engine/world-doors.d.ts +12 -0
- package/dist/types/packages/core/src/facade/create-canvas-engine.d.ts +146 -13
- package/dist/types/packages/core/src/index.d.ts +33 -12
- package/dist/types/packages/core/src/input/queue.d.ts +3 -1
- package/dist/types/packages/core/src/interaction/install.d.ts +36 -0
- package/dist/types/packages/core/src/interaction/wakes.d.ts +24 -0
- package/dist/types/packages/core/src/nav/nav-geometry.d.ts +100 -0
- package/dist/types/packages/core/src/nav/nested-canvas.d.ts +47 -4
- package/dist/types/packages/core/src/ops/cascade.d.ts +2 -1
- package/dist/types/packages/core/src/ops/claims.d.ts +6 -0
- package/dist/types/packages/core/src/ops/insert.d.ts +4 -0
- package/dist/types/packages/core/src/ops/point-pick.d.ts +4 -1
- package/dist/types/packages/core/src/ops/sibling-order.d.ts +14 -4
- package/dist/types/packages/core/src/ops/tray.d.ts +48 -0
- package/dist/types/packages/core/src/presence/presence-kit.d.ts +5 -0
- package/dist/types/packages/core/src/schema/meta.d.ts +10 -0
- package/dist/types/packages/core/src/schema/prefab.d.ts +8 -0
- package/dist/types/packages/core/src/settings/defaults.d.ts +25 -6
- package/dist/types/packages/core/src/surface/gpu-device.d.ts +55 -0
- package/dist/types/packages/core/src/systems/camera-sim.d.ts +29 -0
- package/dist/types/packages/core/src/systems/chrome.d.ts +15 -23
- package/dist/types/packages/core/src/systems/drag-mods.d.ts +34 -0
- package/dist/types/packages/core/src/systems/held.d.ts +73 -0
- package/dist/types/packages/core/src/systems/insert-ghost.d.ts +2 -0
- package/dist/types/packages/core/src/systems/l0-input.d.ts +14 -0
- package/dist/types/packages/core/src/systems/l1-pick.d.ts +53 -1
- package/dist/types/packages/core/src/systems/l2-arbitrate.d.ts +18 -4
- package/dist/types/packages/core/src/systems/l2-recognize.d.ts +3 -1
- package/dist/types/packages/core/src/systems/l3-behave.d.ts +4 -1
- package/dist/types/packages/core/src/systems/l3-claim.d.ts +7 -0
- package/dist/types/packages/core/src/systems/l3-connect.d.ts +1 -1
- package/dist/types/packages/core/src/systems/l3-drop.d.ts +30 -1
- package/dist/types/packages/core/src/systems/l3-marquee.d.ts +2 -1
- package/dist/types/packages/core/src/systems/l3-ports.d.ts +1 -1
- package/dist/types/packages/core/src/systems/l4-cursor.d.ts +5 -0
- package/dist/types/packages/core/src/systems/nav-flight.d.ts +85 -3
- package/dist/types/packages/core/src/systems/nav-tap.d.ts +44 -0
- package/dist/types/packages/core/src/systems/press-button.d.ts +25 -0
- package/dist/types/packages/core/src/systems/press-wheel.d.ts +11 -0
- package/dist/types/packages/core/src/systems/tray.d.ts +111 -0
- package/dist/types/packages/core/src/systems/zoom-through.d.ts +30 -0
- package/dist/types/packages/core/src/tools/define-tool.d.ts +10 -0
- package/dist/types/packages/core/src/widget/define-widget.d.ts +166 -63
- package/dist/types/packages/core/src/widget/equip.d.ts +14 -2
- package/dist/types/packages/core/src/widget/held-tools.d.ts +83 -0
- package/dist/types/packages/core/src/widget/menu-actions.d.ts +44 -0
- package/dist/types/packages/core/src/widget/mount-store.d.ts +21 -46
- package/dist/types/packages/core/src/widget/spawn.d.ts +1 -1
- package/dist/types/packages/desk/src/assets/blue-noise.gen.d.ts +10 -0
- package/dist/types/packages/desk/src/card/card.d.ts +103 -0
- package/dist/types/packages/desk/src/compose/ambient.d.ts +59 -0
- package/dist/types/packages/desk/src/compose/builder.d.ts +306 -0
- package/dist/types/packages/desk/src/compose/children.d.ts +3 -0
- package/dist/types/packages/desk/src/compose/index.d.ts +14 -0
- package/dist/types/packages/desk/src/compose/marks.d.ts +133 -0
- package/dist/types/packages/desk/src/compose/pick.d.ts +5 -0
- package/dist/types/packages/desk/src/compose/reflector.d.ts +120 -0
- package/dist/types/packages/desk/src/compose/tap.d.ts +5 -0
- package/dist/types/packages/desk/src/docs.d.ts +23 -0
- package/dist/types/packages/desk/src/engine/budget.d.ts +43 -0
- package/dist/types/packages/desk/src/engine/device.d.ts +54 -0
- package/dist/types/packages/desk/src/engine/index.d.ts +5 -0
- package/dist/types/packages/desk/src/engine/pipeline.d.ts +36 -0
- package/dist/types/packages/desk/src/engine/rasters.d.ts +66 -0
- package/dist/types/packages/desk/src/engine/records.d.ts +56 -0
- package/dist/types/packages/desk/src/engine/shader.d.ts +22 -0
- package/dist/types/packages/desk/src/engine/struct.d.ts +39 -0
- package/dist/types/packages/desk/src/engine/target.d.ts +26 -0
- package/dist/types/packages/desk/src/faults.d.ts +38 -0
- package/dist/types/packages/desk/src/gpu-ablation.d.ts +61 -0
- package/dist/types/packages/desk/src/gpu-memory.d.ts +54 -0
- package/dist/types/packages/desk/src/gpu-profiler.d.ts +141 -0
- package/dist/types/packages/desk/src/gpu-wrap.d.ts +8 -0
- package/dist/types/packages/desk/src/ground.d.ts +537 -0
- package/dist/types/packages/desk/src/hold/focus.d.ts +53 -0
- package/dist/types/packages/desk/src/hold/pose.d.ts +152 -0
- package/dist/types/packages/desk/src/hold/shaders.d.ts +9 -0
- package/dist/types/packages/desk/src/host/editor.d.ts +18 -0
- package/dist/types/packages/desk/src/host/index.d.ts +9 -0
- package/dist/types/packages/desk/src/host/ink.d.ts +18 -0
- package/dist/types/packages/desk/src/host/layer.d.ts +536 -0
- package/dist/types/packages/desk/src/host/picture.d.ts +2 -0
- package/dist/types/packages/desk/src/host/surface.d.ts +5 -0
- package/dist/types/packages/desk/src/index.d.ts +16 -0
- package/dist/types/packages/desk/src/kind.d.ts +189 -0
- package/dist/types/packages/desk/src/kinds/world.d.ts +447 -0
- package/dist/types/packages/desk/src/kit/arrays.d.ts +88 -0
- package/dist/types/packages/desk/src/kit/blobs.d.ts +40 -0
- package/dist/types/packages/desk/src/kit/book.d.ts +2 -0
- package/dist/types/packages/desk/src/kit/editor.d.ts +105 -0
- package/dist/types/packages/desk/src/kit/eye.d.ts +37 -0
- package/dist/types/packages/desk/src/kit/hold.d.ts +1 -0
- package/dist/types/packages/desk/src/kit/index.d.ts +26 -0
- package/dist/types/packages/desk/src/kit/inside.d.ts +116 -0
- package/dist/types/packages/desk/src/kit/layer.d.ts +159 -0
- package/dist/types/packages/desk/src/kit/light.d.ts +3 -0
- package/dist/types/packages/desk/src/kit/mesh.d.ts +29 -0
- package/dist/types/packages/desk/src/kit/mips.d.ts +2 -0
- package/dist/types/packages/desk/src/kit/nav.d.ts +2 -0
- package/dist/types/packages/desk/src/kit/paper-tex.d.ts +5 -0
- package/dist/types/packages/desk/src/kit/physics.d.ts +44 -0
- package/dist/types/packages/desk/src/kit/place.d.ts +44 -0
- package/dist/types/packages/desk/src/kit/print.d.ts +30 -0
- package/dist/types/packages/desk/src/kit/raster.d.ts +34 -0
- package/dist/types/packages/desk/src/kit/sdf.d.ts +1 -0
- package/dist/types/packages/desk/src/kit/seeds.d.ts +11 -0
- package/dist/types/packages/desk/src/kit/services.d.ts +34 -0
- package/dist/types/packages/desk/src/kit/springs.d.ts +12 -0
- package/dist/types/packages/desk/src/kit/strokes.d.ts +93 -0
- package/dist/types/packages/desk/src/kit/text.d.ts +142 -0
- package/dist/types/packages/desk/src/kit/uniform.d.ts +8 -0
- package/dist/types/packages/desk/src/kit/view.d.ts +39 -0
- package/dist/types/packages/desk/src/kit/wgsl.d.ts +15 -0
- package/dist/types/packages/desk/src/lattice/line.d.ts +15 -0
- package/dist/types/packages/desk/src/lattice/lod.d.ts +52 -0
- package/dist/types/packages/desk/src/lattice/ruler.d.ts +88 -0
- package/dist/types/packages/desk/src/marks/assemble.d.ts +65 -0
- package/dist/types/packages/desk/src/marks/ease.d.ts +4 -0
- package/dist/types/packages/desk/src/marks/laser.d.ts +41 -0
- package/dist/types/packages/desk/src/marks/layout.d.ts +167 -0
- package/dist/types/packages/desk/src/marks/pass.d.ts +59 -0
- package/dist/types/packages/desk/src/marks/shaders.d.ts +12 -0
- package/dist/types/packages/desk/src/mat/grid.d.ts +50 -0
- package/dist/types/packages/desk/src/mat/lamp.d.ts +14 -0
- package/dist/types/packages/desk/src/mat/layout.d.ts +144 -0
- package/dist/types/packages/desk/src/mat/mat-pass.d.ts +83 -0
- package/dist/types/packages/desk/src/mat/night.d.ts +95 -0
- package/dist/types/packages/desk/src/mat/projector.d.ts +39 -0
- package/dist/types/packages/desk/src/mat/shaders.d.ts +17 -0
- package/dist/types/packages/desk/src/mat/tilt.d.ts +14 -0
- package/dist/types/packages/desk/src/missing/layout.d.ts +27 -0
- package/dist/types/packages/desk/src/missing/object.d.ts +6 -0
- package/dist/types/packages/desk/src/missing/pass.d.ts +39 -0
- package/dist/types/packages/desk/src/missing/shaders.d.ts +7 -0
- package/dist/types/packages/desk/src/missing/slots.d.ts +8 -0
- package/dist/types/packages/desk/src/nav/flight.d.ts +186 -0
- package/dist/types/packages/desk/src/nav/portal.d.ts +95 -0
- package/dist/types/packages/desk/src/object.d.ts +46 -0
- package/dist/types/packages/desk/src/pass-instrument.d.ts +89 -0
- package/dist/types/packages/desk/src/shaders.d.ts +12 -0
- package/dist/types/packages/desk/src/shaders.gen.d.ts +17 -0
- package/dist/types/packages/desk/src/submit-instrument.d.ts +36 -0
- package/dist/types/packages/desk/src/theme.d.ts +497 -0
- package/dist/types/packages/desk/src/tray/carry.d.ts +99 -0
- package/dist/types/packages/desk/src/tray/drawer.d.ts +124 -0
- package/dist/types/packages/desk/src/tray/flux.d.ts +49 -0
- package/dist/types/packages/desk/src/tray/index.d.ts +4 -0
- package/dist/types/packages/desk/src/tray/lattice.d.ts +71 -0
- package/dist/types/packages/desk/src/tray/layout.d.ts +7 -0
- package/dist/types/packages/desk/src/tray/look.d.ts +29 -0
- package/dist/types/packages/desk/src/tray/pass.d.ts +101 -0
- package/dist/types/packages/desk/src/tray/shaders.d.ts +10 -0
- package/dist/types/packages/desk/src/tray/specimens.d.ts +214 -0
- package/dist/types/packages/devtools/src/attach.d.ts +22 -8
- package/dist/types/packages/devtools/src/dock.d.ts +18 -14
- package/dist/types/packages/devtools/src/gpu-panel.d.ts +105 -0
- package/dist/types/packages/devtools/src/index.d.ts +5 -4
- package/dist/types/packages/dom/src/desk-host.d.ts +104 -0
- package/dist/types/packages/dom/src/host.d.ts +13 -14
- package/dist/types/packages/dom/src/index.d.ts +12 -10
- package/dist/types/packages/dom/src/loop.d.ts +18 -1
- package/dist/types/packages/dom/src/pointer-adapter.d.ts +11 -29
- package/dist/types/packages/dom/src/widget-focus.d.ts +17 -13
- package/dist/types/packages/ice/src/desk-engine.d.ts +2 -0
- package/dist/types/packages/ice/src/desk-kit.d.ts +6 -0
- package/dist/types/packages/ice/src/desk-objects.d.ts +5 -0
- package/dist/types/packages/ice/src/desk.d.ts +5 -0
- package/dist/types/packages/kernel/src/atlas-pack.d.ts +157 -0
- package/dist/types/packages/kernel/src/bezier.d.ts +0 -15
- package/dist/types/packages/kernel/src/coords.d.ts +0 -39
- package/dist/types/packages/kernel/src/index.d.ts +2 -2
- package/dist/types/packages/kernel/src/nav-flight.d.ts +6 -0
- package/dist/types/packages/kernel/src/tray.d.ts +155 -0
- package/dist/types/packages/objects/src/board/board-pass.d.ts +180 -0
- package/dist/types/packages/objects/src/board/board-pen.d.ts +36 -0
- package/dist/types/packages/objects/src/board/board.d.ts +104 -0
- package/dist/types/packages/objects/src/board/data.d.ts +31 -0
- package/dist/types/packages/objects/src/board/history.d.ts +33 -0
- package/dist/types/packages/objects/src/board/kind.d.ts +208 -0
- package/dist/types/packages/objects/src/board/layout.d.ts +102 -0
- package/dist/types/packages/objects/src/board/object.d.ts +7 -0
- package/dist/types/packages/objects/src/board/pen.d.ts +71 -0
- package/dist/types/packages/objects/src/board/shaders.d.ts +36 -0
- package/dist/types/packages/objects/src/board/stroke.d.ts +99 -0
- package/dist/types/packages/objects/src/board/theme.d.ts +150 -0
- package/dist/types/packages/objects/src/calendar/data.d.ts +97 -0
- package/dist/types/packages/objects/src/calendar/events.d.ts +58 -0
- package/dist/types/packages/objects/src/calendar/hand.d.ts +53 -0
- package/dist/types/packages/objects/src/calendar/host/input.d.ts +67 -0
- package/dist/types/packages/objects/src/calendar/host/print.d.ts +9 -0
- package/dist/types/packages/objects/src/calendar/kind.d.ts +297 -0
- package/dist/types/packages/objects/src/calendar/law.d.ts +151 -0
- package/dist/types/packages/objects/src/calendar/layout.d.ts +47 -0
- package/dist/types/packages/objects/src/calendar/month.d.ts +75 -0
- package/dist/types/packages/objects/src/calendar/object.d.ts +45 -0
- package/dist/types/packages/objects/src/calendar/pad.d.ts +42 -0
- package/dist/types/packages/objects/src/calendar/pass.d.ts +229 -0
- package/dist/types/packages/objects/src/calendar/print.d.ts +87 -0
- package/dist/types/packages/objects/src/calendar/printing.d.ts +80 -0
- package/dist/types/packages/objects/src/calendar/roll.d.ts +45 -0
- package/dist/types/packages/objects/src/calendar/shaders.d.ts +12 -0
- package/dist/types/packages/objects/src/calendar/sheet.d.ts +43 -0
- package/dist/types/packages/objects/src/calendar/tiles.d.ts +67 -0
- package/dist/types/packages/objects/src/calendar/turn.d.ts +73 -0
- package/dist/types/packages/objects/src/calendar/writing.d.ts +42 -0
- package/dist/types/packages/objects/src/index.d.ts +22 -0
- package/dist/types/packages/objects/src/kinds.d.ts +24 -0
- package/dist/types/packages/objects/src/minimat/inside.d.ts +17 -0
- package/dist/types/packages/objects/src/minimat/kind.d.ts +51 -0
- package/dist/types/packages/objects/src/minimat/layout.d.ts +83 -0
- package/dist/types/packages/objects/src/minimat/minimat.d.ts +179 -0
- package/dist/types/packages/objects/src/minimat/object.d.ts +8 -0
- package/dist/types/packages/objects/src/minimat/pass.d.ts +61 -0
- package/dist/types/packages/objects/src/minimat/shaders.d.ts +10 -0
- package/dist/types/packages/objects/src/minimat/theme.d.ts +98 -0
- package/dist/types/packages/objects/src/notebook/ink.d.ts +70 -0
- package/dist/types/packages/objects/src/notebook/kind.d.ts +236 -0
- package/dist/types/packages/objects/src/notebook/law.d.ts +129 -0
- package/dist/types/packages/objects/src/notebook/layout.d.ts +46 -0
- package/dist/types/packages/objects/src/notebook/leaf.d.ts +44 -0
- package/dist/types/packages/objects/src/notebook/mesh.d.ts +20 -0
- package/dist/types/packages/objects/src/notebook/motion.d.ts +107 -0
- package/dist/types/packages/objects/src/notebook/object.d.ts +8 -0
- package/dist/types/packages/objects/src/notebook/pages.d.ts +56 -0
- package/dist/types/packages/objects/src/notebook/pass.d.ts +197 -0
- package/dist/types/packages/objects/src/notebook/pick.d.ts +30 -0
- package/dist/types/packages/objects/src/notebook/raster.d.ts +28 -0
- package/dist/types/packages/objects/src/notebook/shaders.d.ts +11 -0
- package/dist/types/packages/objects/src/notebook/shape.d.ts +155 -0
- package/dist/types/packages/objects/src/notebook/theme.d.ts +76 -0
- package/dist/types/packages/objects/src/palette.d.ts +577 -0
- package/dist/types/packages/objects/src/paper/host/body.d.ts +30 -0
- package/dist/types/packages/objects/src/paper/kind.d.ts +81 -0
- package/dist/types/packages/objects/src/paper/layout.d.ts +73 -0
- package/dist/types/packages/objects/src/paper/object.d.ts +31 -0
- package/dist/types/packages/objects/src/paper/pages.d.ts +43 -0
- package/dist/types/packages/objects/src/paper/paper-pass.d.ts +86 -0
- package/dist/types/packages/objects/src/paper/paper.d.ts +117 -0
- package/dist/types/packages/objects/src/paper/shaders.d.ts +18 -0
- package/dist/types/packages/objects/src/paper/theme.d.ts +58 -0
- package/dist/types/packages/objects/src/paper/typing.d.ts +51 -0
- package/dist/types/packages/objects/src/paper/writing.d.ts +161 -0
- package/dist/types/packages/objects/src/photo/carry.d.ts +33 -0
- package/dist/types/packages/objects/src/photo/kind.d.ts +136 -0
- package/dist/types/packages/objects/src/photo/layout.d.ts +39 -0
- package/dist/types/packages/objects/src/photo/object.d.ts +5 -0
- package/dist/types/packages/objects/src/photo/photo-pass.d.ts +104 -0
- package/dist/types/packages/objects/src/photo/photo.d.ts +262 -0
- package/dist/types/packages/objects/src/photo/pictures.d.ts +152 -0
- package/dist/types/packages/objects/src/photo/sample.d.ts +9 -0
- package/dist/types/packages/objects/src/photo/shaders.d.ts +18 -0
- package/dist/types/packages/objects/src/preset.d.ts +44 -0
- package/dist/types/packages/objects/src/shaders.d.ts +3 -0
- package/dist/types/packages/objects/src/shaders.gen.d.ts +21 -0
- package/dist/types/packages/react/src/canvas-hooks.d.ts +12 -0
- package/dist/types/packages/react/src/desk.d.ts +56 -0
- package/dist/types/packages/react/src/engine-context.d.ts +2 -2
- package/dist/types/packages/react/src/frame-preview-boundary.d.ts +19 -0
- package/dist/types/packages/react/src/hooks.d.ts +9 -14
- package/dist/types/packages/react/src/index.d.ts +16 -9
- package/dist/types/packages/react/src/keymap.d.ts +21 -2
- package/dist/types/packages/react/src/selection-menu.d.ts +174 -0
- package/dist/types/packages/react/src/tray-bar.d.ts +124 -0
- package/package.json +64 -31
- package/dist/chunk-2TNVB2ON.js +0 -1163
- package/dist/chunk-2TNVB2ON.js.map +0 -1
- package/dist/chunk-OR5FNVUE.js.map +0 -1
- package/dist/chunk-Q665T4L7.js +0 -681
- package/dist/chunk-Q665T4L7.js.map +0 -1
- package/dist/chunk-VGVDJZSP.js.map +0 -1
- package/dist/ground.js +0 -1108
- package/dist/ground.js.map +0 -1
- package/dist/r3f.js +0 -1644
- package/dist/r3f.js.map +0 -1
- package/dist/types/packages/core/src/input/measure-queue.d.ts +0 -30
- package/dist/types/packages/core/src/settings/ground-config.d.ts +0 -101
- package/dist/types/packages/core/src/systems/measure-ingest.d.ts +0 -26
- package/dist/types/packages/devtools/src/gl-panel.d.ts +0 -69
- package/dist/types/packages/dom/src/measure-adapter.d.ts +0 -31
- package/dist/types/packages/dom/src/measure-wiring.d.ts +0 -49
- package/dist/types/packages/dom/src/planes.d.ts +0 -33
- package/dist/types/packages/dom/src/reflectors/chrome.d.ts +0 -33
- package/dist/types/packages/dom/src/reflectors/dom-widgets.d.ts +0 -59
- package/dist/types/packages/dom/src/reflectors/graybox.d.ts +0 -31
- package/dist/types/packages/dom/src/reflectors/plane-transform.d.ts +0 -38
- package/dist/types/packages/ground/src/index.d.ts +0 -69
- package/dist/types/packages/ground/src/layer.d.ts +0 -40
- package/dist/types/packages/ground/src/pass.d.ts +0 -41
- package/dist/types/packages/ground/src/passes/grid-contract.d.ts +0 -28
- package/dist/types/packages/ground/src/passes/grid-magnet-pass.d.ts +0 -2
- package/dist/types/packages/ground/src/passes/grid-magnet.d.ts +0 -31
- package/dist/types/packages/ground/src/passes/grid.d.ts +0 -10
- package/dist/types/packages/ground/src/passes/guides-collect.d.ts +0 -14
- package/dist/types/packages/ground/src/passes/guides.d.ts +0 -3
- package/dist/types/packages/ground/src/passes/magnet-collect.d.ts +0 -63
- package/dist/types/packages/ground/src/passes/soup-collect.d.ts +0 -35
- package/dist/types/packages/ground/src/passes/soup-mesh.d.ts +0 -8
- package/dist/types/packages/ground/src/passes/wires-collect.d.ts +0 -35
- package/dist/types/packages/ground/src/passes/wires.d.ts +0 -10
- package/dist/types/packages/ground/src/poles.d.ts +0 -47
- package/dist/types/packages/ground/src/renderer.d.ts +0 -15
- package/dist/types/packages/ice/src/ground.d.ts +0 -1
- package/dist/types/packages/ice/src/r3f.d.ts +0 -1
- package/dist/types/packages/kernel/src/eviction.d.ts +0 -23
- package/dist/types/packages/kernel/src/zoom-bands.d.ts +0 -19
- package/dist/types/packages/r3f/src/bridge.d.ts +0 -129
- package/dist/types/packages/r3f/src/composite-material.d.ts +0 -26
- package/dist/types/packages/r3f/src/compositor-pass.d.ts +0 -105
- package/dist/types/packages/r3f/src/dev-write-trap.d.ts +0 -30
- package/dist/types/packages/r3f/src/gl-root.d.ts +0 -96
- package/dist/types/packages/r3f/src/gl-router.d.ts +0 -70
- package/dist/types/packages/r3f/src/index.d.ts +0 -17
- package/dist/types/packages/r3f/src/island-state.d.ts +0 -112
- package/dist/types/packages/r3f/src/island.d.ts +0 -13
- package/dist/types/packages/r3f/src/pool.d.ts +0 -56
- package/dist/types/packages/r3f/src/preview-capture.d.ts +0 -19
- package/dist/types/packages/r3f/src/resource-registry.d.ts +0 -30
- package/dist/types/packages/r3f/src/self-sustain.d.ts +0 -39
- package/dist/types/packages/r3f/src/use-island-frame.d.ts +0 -39
- package/dist/types/packages/react/src/infinite-canvas.d.ts +0 -140
- package/dist/types/packages/react/src/preview-snapshots.d.ts +0 -17
- package/dist/types/packages/react/src/widget-preview.d.ts +0 -14
- package/dist/types/packages/react/src/widget-root.d.ts +0 -33
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { type BindEntry } from "../engine/pipeline";
|
|
2
|
+
import { type ComposeOptions } from "../engine/shader";
|
|
3
|
+
import type { CardMaterial, KindPass, KindProgram, SlotContext } from "../kind";
|
|
4
|
+
import type { MatPass } from "../kit/view";
|
|
5
|
+
/** A card's slot in its kind's records: the low 24 bits; the high byte its material. */
|
|
6
|
+
export declare const CARD_SLOT_BITS = 24;
|
|
7
|
+
/** A kind composed into the card: its name (the ground's key), its material, and its program (the material's `shaders()`, asked once). */
|
|
8
|
+
export interface CardKind {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly material: CardMaterial;
|
|
11
|
+
readonly shaders: ComposeOptions;
|
|
12
|
+
}
|
|
13
|
+
/** What one card pipeline composes: its kinds by material index, and what it could not (a limit it would pass — they draw themselves). */
|
|
14
|
+
export interface CardPlan {
|
|
15
|
+
readonly kinds: readonly CardKind[];
|
|
16
|
+
readonly left: readonly {
|
|
17
|
+
readonly name: string;
|
|
18
|
+
readonly why: string;
|
|
19
|
+
}[];
|
|
20
|
+
}
|
|
21
|
+
type Limits = Pick<GPUSupportedLimits, "maxSampledTexturesPerShaderStage" | "maxSamplersPerShaderStage" | "maxStorageBuffersPerShaderStage" | "maxUniformBuffersPerShaderStage" | "maxBindingsPerBindGroup">;
|
|
22
|
+
/** A binding's name from its WGSL (`var<uniform> paper_k: PaperUniforms` → `paper_k`); null when it declares none the card can read. */
|
|
23
|
+
export declare const bindingName: (wgsl: string) => string | null;
|
|
24
|
+
/**
|
|
25
|
+
* The kinds one card pipeline composes, in registration order — a material kind is left out (and draws itself) when it is a
|
|
26
|
+
* composite (its objects are one target's), when adding it would pass one of the device's per-stage limits, or (K9 R3) when a
|
|
27
|
+
* name of its would collide with the card's own or an earlier kind's.
|
|
28
|
+
*/
|
|
29
|
+
export declare function planCards(programs: readonly KindProgram[], limits: Limits): CardPlan;
|
|
30
|
+
/** The card's own entry: its bindings, every material's, their `only` and card functions, and the dispatch on the card's material. */
|
|
31
|
+
export declare function cardEntry(kinds: readonly CardKind[]): string;
|
|
32
|
+
/** The card's program: every material's structs (by name) and modules (by label) once, in order, then the card's entry. */
|
|
33
|
+
export declare function cardShaders(kinds: readonly CardKind[]): ComposeOptions;
|
|
34
|
+
/** The layout: the card's own four, then every material's bindings in order. */
|
|
35
|
+
export declare function cardLayoutEntries(kinds: readonly CardKind[]): BindEntry[];
|
|
36
|
+
/** The pipelines every slot's card draws with (once per device). */
|
|
37
|
+
export interface CardShared {
|
|
38
|
+
/** The kinds composed, by material index. */
|
|
39
|
+
readonly kinds: readonly string[];
|
|
40
|
+
readonly material: ReadonlyMap<string, number>;
|
|
41
|
+
readonly layout: GPUBindGroupLayout;
|
|
42
|
+
readonly pipeline: GPURenderPipeline;
|
|
43
|
+
/** The same, for a slot lit from elsewhere (MINIMAT.md §4) — the materials' `LIT_ELSEWHERE`. */
|
|
44
|
+
readonly litPipeline: GPURenderPipeline;
|
|
45
|
+
/** What was left out, and why. */
|
|
46
|
+
readonly left: CardPlan["left"];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The card's pipelines for the registered programs; null when none declares a material the device can compose. A material the
|
|
50
|
+
* device REFUSES (K9 R3 — a plugin's WGSL error, a binding whose type its layout belies) takes only its own kind out of the card:
|
|
51
|
+
* each material is then compiled alone and the ones that fail are left with their error; if what remains still fails together (a
|
|
52
|
+
* collision the plan did not see), the last registered goes until the card compiles (a plugin registers after the built-ins).
|
|
53
|
+
* Every kind left out draws itself, as one past the device's limits does, and is said once (`console.error`, and `left`).
|
|
54
|
+
*/
|
|
55
|
+
export declare function createCardShared(device: GPUDevice, format: GPUTextureFormat, programs: readonly KindProgram[]): Promise<CardShared | null>;
|
|
56
|
+
/**
|
|
57
|
+
* One slot's card: its draw list (the ground pushes a card for every object a material kind's pass lets go, in the order its
|
|
58
|
+
* runs walk them) and the bind group over the slot's view block and mat and ITS kinds' resources — made again only when one of
|
|
59
|
+
* them was replaced. The list is uploaded only when it changed (a camera move over a settled desk writes nothing).
|
|
60
|
+
*/
|
|
61
|
+
export declare class CardPass {
|
|
62
|
+
readonly name = "card";
|
|
63
|
+
/** Off: the ground routes nothing here — every object is drawn by its kind's own pass (a witness's second draw, a rig's A/B). */
|
|
64
|
+
on: boolean;
|
|
65
|
+
private list;
|
|
66
|
+
private sent;
|
|
67
|
+
private n;
|
|
68
|
+
private sentN;
|
|
69
|
+
private buffer;
|
|
70
|
+
private group;
|
|
71
|
+
/** What the group was made over: the mat's assets, the list's buffer, and each material's version. */
|
|
72
|
+
private boundOver;
|
|
73
|
+
private litElsewhere;
|
|
74
|
+
/** Each object's card this frame (−1: none) — a slot's route, reused frame to frame (`route`). */
|
|
75
|
+
private routes;
|
|
76
|
+
private readonly device;
|
|
77
|
+
private readonly shared;
|
|
78
|
+
private readonly mat;
|
|
79
|
+
private readonly kinds;
|
|
80
|
+
private bufferVersion;
|
|
81
|
+
constructor(device: GPUDevice, shared: CardShared, mat: MatPass, kinds: ReadonlyMap<string, {
|
|
82
|
+
readonly pass: KindPass;
|
|
83
|
+
}>);
|
|
84
|
+
/** A slot's card on the same pipelines, over ITS mat and kinds. */
|
|
85
|
+
spawn(mat: MatPass, kinds: ReadonlyMap<string, {
|
|
86
|
+
readonly pass: KindPass;
|
|
87
|
+
}>): CardPass;
|
|
88
|
+
/** The material index of kind `name`, or undefined when the card does not draw it. */
|
|
89
|
+
materialOf(name: string): number | undefined;
|
|
90
|
+
/** A frame's list begins, and a route for `n` objects, every one −1 (drawn by its kind). */
|
|
91
|
+
begin(n: number): Int32Array;
|
|
92
|
+
/** A card for record `slot` of material `m`: its index in this frame's list (the ground's run counts it). */
|
|
93
|
+
push(m: number, slot: number): number;
|
|
94
|
+
/** The list uploaded when it changed, the group made again when anything under it moved, the pipeline for the slot's light. */
|
|
95
|
+
prepare(slot: SlotContext): number;
|
|
96
|
+
private rebind;
|
|
97
|
+
/** Cards [first, end) of this frame's list — interleaved objects of every material kind — as ONE instanced draw. */
|
|
98
|
+
drawRange(pass: GPURenderPassEncoder, first: number, end: number): void;
|
|
99
|
+
/** The cards this frame. */
|
|
100
|
+
get count(): number;
|
|
101
|
+
dispose(): void;
|
|
102
|
+
}
|
|
103
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type MatFrame } from "../mat/layout";
|
|
2
|
+
export type AmbientMode = "live" | "idle" | "still";
|
|
3
|
+
export interface AmbientOptions {
|
|
4
|
+
/** `idle` by default (design-015 D-D9). */
|
|
5
|
+
readonly mode?: AmbientMode;
|
|
6
|
+
/** How long after the last touch the wind keeps blowing, ms (20 000). */
|
|
7
|
+
readonly idleMs?: number;
|
|
8
|
+
/** How long the wind takes to ease to still once idle, ms (2 000). */
|
|
9
|
+
readonly settleMs?: number;
|
|
10
|
+
/** Seconds of gobo time per second at full speed (theme.ts `MAT_GRID.gobo.wind`). */
|
|
11
|
+
readonly wind?: number;
|
|
12
|
+
/** Radians of projector tilt per unit of smoothed pointer NDC (theme.ts `MAT_GRID.gobo.tilt`). */
|
|
13
|
+
readonly tilt?: number;
|
|
14
|
+
/** The OS asked for reduced motion: the mode is `still` whatever was set. */
|
|
15
|
+
readonly reducedMotion?: boolean;
|
|
16
|
+
/** The blue noise's re-roll (Math.random); a test's fake. */
|
|
17
|
+
readonly random?: () => number;
|
|
18
|
+
}
|
|
19
|
+
export type AmbientPhase = "live" | "easing" | "still" | "pinned";
|
|
20
|
+
export interface AmbientState {
|
|
21
|
+
readonly mode: AmbientMode;
|
|
22
|
+
readonly phase: AmbientPhase;
|
|
23
|
+
/** The wind's speed, 0 … 1 of full. */
|
|
24
|
+
readonly speed: number;
|
|
25
|
+
readonly reducedMotion: boolean;
|
|
26
|
+
readonly pinned: boolean;
|
|
27
|
+
}
|
|
28
|
+
/** A pinned still's clocks (a parity scene): whatever is absent keeps the engine's still values. */
|
|
29
|
+
export interface AmbientPin {
|
|
30
|
+
readonly time?: number;
|
|
31
|
+
readonly goboTime?: number;
|
|
32
|
+
readonly noise?: readonly [number, number];
|
|
33
|
+
}
|
|
34
|
+
export interface Ambient {
|
|
35
|
+
/** The pointer moved, a gesture or a flight ran: the wind (re)starts its `idleMs`. */
|
|
36
|
+
touch(now: number): void;
|
|
37
|
+
/** Advance the clocks by `dt` seconds at `now` ms, the tilt following `pointer` (NDC, or null before the pointer was seen); `live` = another frame is wanted. */
|
|
38
|
+
step(dt: number, now: number, pointer: readonly [number, number] | null): {
|
|
39
|
+
readonly frame: MatFrame;
|
|
40
|
+
readonly live: boolean;
|
|
41
|
+
};
|
|
42
|
+
/** The frame as the clocks stand, NOT advanced (the pinned one while pinned) — the desk behind the hand stands still (§8, D7). */
|
|
43
|
+
frame(): MatFrame;
|
|
44
|
+
/** Pin the clocks (a still) or unpin (`null`). Pinned, `step` returns the pinned frame and wants no frame. */
|
|
45
|
+
pin(frame: AmbientPin | null): void;
|
|
46
|
+
configure(opts: Pick<AmbientOptions, "mode" | "idleMs" | "settleMs" | "reducedMotion">): void;
|
|
47
|
+
state(): AmbientState;
|
|
48
|
+
/** The clocks as they stand (a rig's witness). */
|
|
49
|
+
clocks(): {
|
|
50
|
+
readonly time: number;
|
|
51
|
+
readonly goboTime: number;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export declare const AMBIENT_DEFAULTS: {
|
|
55
|
+
readonly mode: AmbientMode;
|
|
56
|
+
readonly idleMs: 20000;
|
|
57
|
+
readonly settleMs: 2000;
|
|
58
|
+
};
|
|
59
|
+
export declare function createAmbient(opts?: AmbientOptions): Ambient;
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import { type MarqueeBuffer, type NavFace, type Entity, type WidgetType, type World } from "../../../core/src/index";
|
|
2
|
+
import type { KindFaults } from "../faults";
|
|
3
|
+
import type { HeldFrameInputs, OutgoingInputs, PortalInputs, SlotObject } from "../ground";
|
|
4
|
+
import { type HoldReserves } from "../hold/pose";
|
|
5
|
+
import { FLUX_REST, type KindLocal, type ObjectFlux, type ObjectKind } from "../kinds/world";
|
|
6
|
+
import type { MarksInput } from "../marks/layout";
|
|
7
|
+
import { type SelectionAnchor } from "./marks";
|
|
8
|
+
import type { GridConfig } from "../mat/grid";
|
|
9
|
+
import type { MatFrame, SlotLight } from "../mat/layout";
|
|
10
|
+
import { type InsideView } from "../kit/inside";
|
|
11
|
+
import { type CameraState } from "../nav/flight";
|
|
12
|
+
import { type Presentation } from "../nav/portal";
|
|
13
|
+
import { type ObjectSprings } from "../kit/springs";
|
|
14
|
+
import type { GroundTheme } from "../theme";
|
|
15
|
+
/** The view a frame is built for: CSS px and the dpr the canvas is at. */
|
|
16
|
+
export interface BuildViewport {
|
|
17
|
+
readonly width: number;
|
|
18
|
+
readonly height: number;
|
|
19
|
+
readonly dpr: number;
|
|
20
|
+
}
|
|
21
|
+
export interface DeskBuilderOptions {
|
|
22
|
+
/**
|
|
23
|
+
* The OBJECT widget types this desk may hold: their prop groups join the change journal and
|
|
24
|
+
* their kinds' `reach` the pick pad. An object of a type not listed still draws (its kind is found
|
|
25
|
+
* off the widget type) but its props are refreshed only on a Position/Size/tag change — unless the
|
|
26
|
+
* boundary is on (`faults`, the layer's): then its kind must be one the listed types name, the set
|
|
27
|
+
* the desk was MOUNTED with and its ground compiled (petition I25), or it wears the missing face.
|
|
28
|
+
*/
|
|
29
|
+
readonly objects: readonly WidgetType[];
|
|
30
|
+
/** The objects' springs (springs.ts `SPRINGS`). */
|
|
31
|
+
readonly springs?: ObjectSprings;
|
|
32
|
+
/** A deleted object's fade, ms (the prototype's 0.22 s). */
|
|
33
|
+
readonly ghostMs?: number;
|
|
34
|
+
/** The cull margin past the view, CSS px (the prototype's 200). */
|
|
35
|
+
readonly marginPx?: number;
|
|
36
|
+
/** The re-dressing after a zoom-through cut, ms (PORTAL.md §9's 320). */
|
|
37
|
+
readonly redressMs?: number;
|
|
38
|
+
/**
|
|
39
|
+
* The kinds' own state on this desk by kind name (kinds/world.ts `KindLocal` — the note's writing,
|
|
40
|
+
* D2c): threaded into every context of the kind as `ctx.local`, and told when an entity is FORGOTTEN
|
|
41
|
+
* (its ghost faded, it left the frame, it died unseen) so what it held — a raster's rect — goes back.
|
|
42
|
+
*/
|
|
43
|
+
readonly locals?: ReadonlyMap<string, KindLocal>;
|
|
44
|
+
/** The interaction stack's marquee preview (out of the ECS — design-003 §5.7): the vellum the marks draw (D4a). */
|
|
45
|
+
readonly marquee?: () => MarqueeBuffer | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* 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
|
|
48
|
+
* 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
|
|
49
|
+
* host), every member is tested.
|
|
50
|
+
*/
|
|
51
|
+
readonly spatial?: SpatialSource;
|
|
52
|
+
/** The hand's reserves (petition I20 — `deskLayer({ hold })`): where the reading fit keeps clear of the host's chrome; `HOLD`'s by default. */
|
|
53
|
+
readonly hold?: HoldReserves;
|
|
54
|
+
/**
|
|
55
|
+
* THE KIND BOUNDARY (petition I24, faults.ts): every call into a kind's world half — `resolve`, `record` (and what a remake asks with
|
|
56
|
+
* them: `face`, `frame`, `rung`, its desk state's `landed`), `chip`, `hit`, the hand's, a ghost's, `lifted` and `veils` — is caught at the
|
|
57
|
+
* kind: the throw is a strike, the object it was made for is left out of this frame (its record reset, made afresh next time), and
|
|
58
|
+
* the frame goes on. A MISSING kind's objects — and an object whose type has no kind — are drawn by the missing face
|
|
59
|
+
* (`MISSING_OBJECT`) under their kind's name; nothing of a missing kind is called again. Absent (a unit, a bare host): as before — a
|
|
60
|
+
* throw is the caller's, and an object whose type has no kind is not drawn.
|
|
61
|
+
*/
|
|
62
|
+
readonly faults?: KindFaults;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* What the builder asks of the spatial index: the entries whose rects meet a world AABB (kernel's `SpatialIndex.search`), and how
|
|
66
|
+
* 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
|
|
67
|
+
* holds fewer entries than the frame has members culls linearly and asks again next build.
|
|
68
|
+
*/
|
|
69
|
+
export interface SpatialSource {
|
|
70
|
+
search(bounds: {
|
|
71
|
+
readonly minX: number;
|
|
72
|
+
readonly minY: number;
|
|
73
|
+
readonly maxX: number;
|
|
74
|
+
readonly maxY: number;
|
|
75
|
+
}): readonly {
|
|
76
|
+
readonly id: Entity;
|
|
77
|
+
}[];
|
|
78
|
+
readonly size?: number;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* 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
|
|
82
|
+
* proves it"; D6). A camera move over a settled desk must leave every count at 0 but the cull's `visited`, which is the
|
|
83
|
+
* spatial index's answer, never the desk's population.
|
|
84
|
+
*/
|
|
85
|
+
export interface BuildWork {
|
|
86
|
+
/** Entities the membership query yielded (the frame's objects walked). */
|
|
87
|
+
readonly queried: number;
|
|
88
|
+
/** Members the cull walked, every slot. */
|
|
89
|
+
readonly visited: number;
|
|
90
|
+
/** Members sorted into paint order (0 = the last order stood). */
|
|
91
|
+
readonly sorted: number;
|
|
92
|
+
/** A kind's `resolve` — every slot's rows, the chips, the ghosts, the hand and its riders. */
|
|
93
|
+
readonly resolved: number;
|
|
94
|
+
/** A kind's `record`. */
|
|
95
|
+
readonly recorded: number;
|
|
96
|
+
/** Records REUSED from the last build — nothing about them changed (D6). */
|
|
97
|
+
readonly reused: number;
|
|
98
|
+
/** 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. */
|
|
99
|
+
readonly rungs: number;
|
|
100
|
+
/**
|
|
101
|
+
* 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`
|
|
102
|
+
* kind's zoom moved, its kind's own state was restless (a board's density raised). Counted per cause: one remake may count twice.
|
|
103
|
+
*/
|
|
104
|
+
readonly fresh: number;
|
|
105
|
+
readonly rerung: number;
|
|
106
|
+
readonly rezoomed: number;
|
|
107
|
+
readonly restless: number;
|
|
108
|
+
/** 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. */
|
|
109
|
+
readonly unchipped: number;
|
|
110
|
+
}
|
|
111
|
+
export interface DeskBuilderStats {
|
|
112
|
+
/** Objects Active in the frame this build saw. */
|
|
113
|
+
readonly active: number;
|
|
114
|
+
/** Objects drawn in the root slot — within the view and its margin, plus the ghosts. */
|
|
115
|
+
readonly objects: number;
|
|
116
|
+
/** Objects off screen this build (the root slot). */
|
|
117
|
+
readonly culled: number;
|
|
118
|
+
/** Deleted objects still fading. */
|
|
119
|
+
readonly ghosts: number;
|
|
120
|
+
/** Live insides built this frame, every depth (the departed desk's included). */
|
|
121
|
+
readonly portals: number;
|
|
122
|
+
/** True after a build while any spring or ghost is still moving, or a re-dressing ramp runs. */
|
|
123
|
+
readonly live: boolean;
|
|
124
|
+
/** This build's per-entity work (D6). */
|
|
125
|
+
readonly work: BuildWork;
|
|
126
|
+
/** The work of every build since the builder was made — a rig diffs two readings. */
|
|
127
|
+
readonly totals: BuildWork;
|
|
128
|
+
/** Under `verify(true)`: reused records that a fresh resolve would NOT have made — the persistent path's own witness; 0 or a bug. */
|
|
129
|
+
readonly mismatches: number;
|
|
130
|
+
}
|
|
131
|
+
/** 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). */
|
|
132
|
+
export type DeskWakeReason = "world" | "removed" | "reset" | "order" | "hover" | "marks";
|
|
133
|
+
/** The springs a host may pin: each present key holds that spring at the value. */
|
|
134
|
+
export type FluxPin = Partial<Pick<ObjectFlux, "lift" | "hover">>;
|
|
135
|
+
/** What a build may be told beyond the camera (a harness's pins, the reflector's clocks). */
|
|
136
|
+
export interface BuildOptions {
|
|
137
|
+
/** The frame's clock, ms (`FrameInfo.now`) — the re-dressing ramp's. */
|
|
138
|
+
readonly now?: number;
|
|
139
|
+
/** The mat's clocks and tilt for every slot this frame (the reflector's ambient frame). */
|
|
140
|
+
readonly mat?: MatFrame;
|
|
141
|
+
/** Live insides on (the default). Off, every face draws its far LOD alone (the oracle's `portals: false`). */
|
|
142
|
+
readonly portals?: boolean;
|
|
143
|
+
/** A pinned root dressing (the oracle's `lodZoom`). */
|
|
144
|
+
readonly lodZoom?: number;
|
|
145
|
+
/** Hold every spring and ghost where it is — a still of a moving frame (a rig's flight pin). */
|
|
146
|
+
readonly freeze?: boolean;
|
|
147
|
+
/** Hold the re-dressing ramp at its start (the prototype harness's `redressPinned`). */
|
|
148
|
+
readonly holdRedress?: boolean;
|
|
149
|
+
/** 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 %). */
|
|
150
|
+
readonly hold?: HoldPin;
|
|
151
|
+
/** The kinds whose own state moved this tick (their `local.tick` wanted a frame — a print gliding, ink drying): their records are remade (D6). */
|
|
152
|
+
readonly restless?: ReadonlySet<string>;
|
|
153
|
+
/** 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. */
|
|
154
|
+
readonly presented?: ReadonlySet<Entity>;
|
|
155
|
+
}
|
|
156
|
+
export interface HoldPin {
|
|
157
|
+
readonly e: number;
|
|
158
|
+
readonly open?: boolean;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* The object IN HAND as the last build made it (design-015 §8; D4b): the entity, whether the pickup has settled and whether
|
|
162
|
+
* it is flying home (the fact already gone), the frame the pose seam publishes (core's `HeldScreenFrame`, CSS px), what the
|
|
163
|
+
* ground draws (`GroundFrameInputs.held` less its `stamp` — the reflector adds the camera's and the viewport's stamps), and the
|
|
164
|
+
* desk's own change count `deskSeq` — everything the desk copy depends on, never the held object's own facts.
|
|
165
|
+
*/
|
|
166
|
+
export interface HeldBuild {
|
|
167
|
+
readonly entity: Entity;
|
|
168
|
+
/** The carry amount this frame, 0 on the desk … 1 in hand (also `inputs.e` — here for the witnesses). */
|
|
169
|
+
readonly e: number;
|
|
170
|
+
readonly settled: boolean;
|
|
171
|
+
readonly landing: boolean;
|
|
172
|
+
readonly frame: {
|
|
173
|
+
readonly cx: number;
|
|
174
|
+
readonly cy: number;
|
|
175
|
+
readonly hx: number;
|
|
176
|
+
readonly hy: number;
|
|
177
|
+
readonly s: number;
|
|
178
|
+
readonly settled: boolean;
|
|
179
|
+
};
|
|
180
|
+
readonly inputs: Omit<HeldFrameInputs, "stamp">;
|
|
181
|
+
readonly deskSeq: number;
|
|
182
|
+
}
|
|
183
|
+
export interface BuiltDesk {
|
|
184
|
+
/** The root slot's objects in paint order — what `SlotInputs.objects` takes. */
|
|
185
|
+
readonly objects: readonly SlotObject[];
|
|
186
|
+
/** The root slot's live insides (MINIMAT.md §3). */
|
|
187
|
+
readonly portals: readonly PortalInputs[];
|
|
188
|
+
/** The current frame's grid: the root's, or the entered mini mat's inside grid. */
|
|
189
|
+
readonly grid: GridConfig;
|
|
190
|
+
/** The root's dressing: a flight's landing, a re-dressing's ramp, a pin — absent = its own zoom. */
|
|
191
|
+
readonly lodZoom?: number;
|
|
192
|
+
/** The root's presentation while a flight is on. */
|
|
193
|
+
readonly present?: Presentation;
|
|
194
|
+
/** The root's lamp while it is handed over (a flight, a re-dressing after a cut in). */
|
|
195
|
+
readonly light?: SlotLight;
|
|
196
|
+
/** The departed desk while a flight is on. */
|
|
197
|
+
readonly outgoing?: OutgoingInputs;
|
|
198
|
+
/** The desk's chrome this frame (stratum 5 — `GroundFrameInputs.marks`, D4a): the root slot's, the current frame's desk. */
|
|
199
|
+
readonly marks: MarksInput;
|
|
200
|
+
/** 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. */
|
|
201
|
+
readonly held?: HeldBuild;
|
|
202
|
+
readonly stats: DeskBuilderStats;
|
|
203
|
+
}
|
|
204
|
+
export interface DeskBuilder {
|
|
205
|
+
/**
|
|
206
|
+
* Advance every on-screen object's springs by `dt` SECONDS and build this frame's records under
|
|
207
|
+
* `cam` and `vp`: `theme` and `grid` are the root's; `looks` is each kind's `theme()` result by
|
|
208
|
+
* kind name (the reflector keeps them per theme); `opts` the clocks and a harness's pins.
|
|
209
|
+
*/
|
|
210
|
+
build(cam: CameraState, vp: BuildViewport, dt: number, theme: GroundTheme, grid: GridConfig, looks: ReadonlyMap<string, unknown>, opts?: BuildOptions): BuiltDesk;
|
|
211
|
+
/** True while a spring, a ghost or a re-dressing ramp still moves after the last build — the reflector paints again. */
|
|
212
|
+
live(): boolean;
|
|
213
|
+
/**
|
|
214
|
+
* PULL the world's dirt: did any fact a build reads change since the last pull — an object's
|
|
215
|
+
* position, size or props, its Grab, its selection, the Active set, a despawn, a document reset,
|
|
216
|
+
* the sibling order, the hover target? Call it every tick (it drains the journal); `wakes()` names
|
|
217
|
+
* what changed.
|
|
218
|
+
*/
|
|
219
|
+
changed(): boolean;
|
|
220
|
+
/** How many times each fact has dirtied the builder since creation. */
|
|
221
|
+
wakes(): Readonly<Record<DeskWakeReason, number>>;
|
|
222
|
+
/** The last build's geometry for an entity — the pick source's mirror; `undefined` = not drawn (unseen, culled, gone). */
|
|
223
|
+
geometryOf(e: Entity): unknown | undefined;
|
|
224
|
+
/** The kind an entity draws by, once the builder has met it. */
|
|
225
|
+
kindOf(e: Entity): ObjectKind | undefined;
|
|
226
|
+
/** The last build's flux for an entity (the rig's witness). */
|
|
227
|
+
fluxOf(e: Entity): ObjectFlux | undefined;
|
|
228
|
+
/** 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). */
|
|
229
|
+
insideViewOf(e: Entity): InsideView | undefined;
|
|
230
|
+
/**
|
|
231
|
+
* THE SEAM's answer (design-015 §9): the container's face under the host camera `cam` — AS DRAWN
|
|
232
|
+
* when it was built in the current frame this frame, at REST otherwise (the frame's own container,
|
|
233
|
+
* an exit's) — with the inside's arrival, embedding, camera, presence and cover test. `undefined`:
|
|
234
|
+
* not a container kind, or a face with no area.
|
|
235
|
+
*/
|
|
236
|
+
navFace(container: Entity, cam: CameraState): NavFace | undefined;
|
|
237
|
+
/**
|
|
238
|
+
* A per-entity asset the host pins — a committed raster, a note's greeked writing (`ObjectContext.asset`);
|
|
239
|
+
* `undefined` unpins. Kept BY ENTITY, met or not: a pin made in the same task as the spawn (the parity
|
|
240
|
+
* scene's ink, before the entity's facts are readable) waits for the first build. Dirties the builder.
|
|
241
|
+
*/
|
|
242
|
+
pin(e: Entity, asset: unknown): void;
|
|
243
|
+
/**
|
|
244
|
+
* Pin an object's springs for a STILL (a parity scene's `held` = `{ lift: 1 }` — never a `Grab`,
|
|
245
|
+
* which would also carry it to the top of the paint order): each pinned spring SITS at its
|
|
246
|
+
* target, snapped, whatever the facts say; the unpinned ones keep following them. `undefined`
|
|
247
|
+
* unpins. Dirties the builder. Flux, never a world fact.
|
|
248
|
+
*/
|
|
249
|
+
pinFlux(e: Entity, targets: FluxPin | undefined): void;
|
|
250
|
+
/** Every flux pin lifted. */
|
|
251
|
+
clearFlux(): void;
|
|
252
|
+
/** The widest `reach` among the desk's kinds, world units — the pick source's pad. */
|
|
253
|
+
reach(): number;
|
|
254
|
+
/** The selection menu's anchor as of the last build: the marks' box around the selection on screen, whether a gesture is on (D4a). */
|
|
255
|
+
anchor(): SelectionAnchor;
|
|
256
|
+
/**
|
|
257
|
+
* 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
|
|
258
|
+
* meets the tape makes it give (D4a). The next `changed()` reports it.
|
|
259
|
+
*/
|
|
260
|
+
meetTape(e: Entity): void;
|
|
261
|
+
/** The object in hand as of the last build (D4b) — what the pose seam answers from; undefined = nothing held or flying home. */
|
|
262
|
+
hand(): HeldBuild | undefined;
|
|
263
|
+
/**
|
|
264
|
+
* A point of the held object's own frame (core's `HeldPointer`: its open extent's units, centred) as a DESK point, through the
|
|
265
|
+
* pose the last build drew (the frame on screen, then the held slot's camera) — undefined unless `e` is in hand (D3t-a).
|
|
266
|
+
*/
|
|
267
|
+
heldToWorld(e: Entity, x: number, y: number): readonly [number, number] | undefined;
|
|
268
|
+
/**
|
|
269
|
+
* 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
|
|
270
|
+
* 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
|
|
271
|
+
* camera, so a desk point tested against it raw picked nothing where the object is drawn. Undefined unless `e` is the hand's.
|
|
272
|
+
*/
|
|
273
|
+
heldPoint(e: Entity, wx: number, wy: number): readonly [number, number] | undefined;
|
|
274
|
+
/** 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). */
|
|
275
|
+
heldPart(e: Entity, x: number, y: number): string | null;
|
|
276
|
+
/**
|
|
277
|
+
* What is under a world point of `e` as the last build drew it (the pick source's mirror, design-015 §4.5): its kind's `hit` on that
|
|
278
|
+
* geometry — or, drawn as the MISSING face (petition I24), its box. `null`: a miss (a kind whose `hit` throws takes a strike and misses
|
|
279
|
+
* — the pick goes on to the next object down); `undefined`: not drawn (unseen, culled, its kind gone missing since).
|
|
280
|
+
*/
|
|
281
|
+
hitAt(e: Entity, wx: number, wy: number): string | null | undefined;
|
|
282
|
+
/** 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. */
|
|
283
|
+
lifted(): readonly Entity[];
|
|
284
|
+
/** An entity a kind's state veiled in the last build (D3t-c — a note gone with its month): not drawn, never picked. */
|
|
285
|
+
veiled(e: Entity): boolean;
|
|
286
|
+
/** The last build's paint rank of `e` in the ROOT slot (D6 — a kind's residency asks it); undefined = not drawn there. */
|
|
287
|
+
rankOf(e: Entity): number | undefined;
|
|
288
|
+
/** 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)? */
|
|
289
|
+
shows(e: Entity): boolean;
|
|
290
|
+
/** `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). */
|
|
291
|
+
remake(e: Entity): void;
|
|
292
|
+
/** Every record remade at the next build (a kind's law changed under them — `tuneLaw`). */
|
|
293
|
+
invalidate(): void;
|
|
294
|
+
/** Check every reused record against a fresh resolve each build (`stats().mismatches`) — a rig's witness, dear per frame. */
|
|
295
|
+
verify(on: boolean): void;
|
|
296
|
+
stats(): DeskBuilderStats;
|
|
297
|
+
dispose(): void;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Two records the same, value for value (D6's `verify`): plain objects and arrays by their entries, typed arrays by their elements,
|
|
301
|
+
* numbers with NaN equal to NaN, anything else — a picture's texture, a class instance — by identity.
|
|
302
|
+
*/
|
|
303
|
+
export declare function sameRecord(a: unknown, b: unknown): boolean;
|
|
304
|
+
export declare function createDeskBuilder(world: World, opts: DeskBuilderOptions): DeskBuilder;
|
|
305
|
+
/** The flux of an object nobody has met: at rest. */
|
|
306
|
+
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,133 @@
|
|
|
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
|
+
* The held bar's TRAVEL (M1), ms, as the host set it (`deskLayer({ hold: { travelMs } })`, petition I20): the bar travels to the
|
|
60
|
+
* foot over it and back. Absent — the host set none — the bar keeps its own.
|
|
61
|
+
*/
|
|
62
|
+
readonly travelMs?: number;
|
|
63
|
+
/** The kind's WORD in hand (petition I22 — its `open.readout`): "Page 2", "September". Absent — the kind says none (or none now). */
|
|
64
|
+
readonly readout?: string;
|
|
65
|
+
}
|
|
66
|
+
/** A kind's act as the selection menu shows it (K8a): plain data — the op stays on the widget type (`ops.runMenuAction`). */
|
|
67
|
+
export interface MenuSlot {
|
|
68
|
+
readonly id: string;
|
|
69
|
+
readonly label: string;
|
|
70
|
+
readonly glyph?: HeldGlyph;
|
|
71
|
+
readonly keys?: string;
|
|
72
|
+
}
|
|
73
|
+
/** A selection's kind acts as the menu's slots (K8a): every act its types all declare (core's `menuActionsFor`), as plain data. */
|
|
74
|
+
export declare function menuSlots(acts: readonly MenuActionDef[]): MenuSlot[];
|
|
75
|
+
/**
|
|
76
|
+
* The anchor with the selection's KIND ACTS (K8a): every act all the selected objects' types declare (`menuOf` reads an object's
|
|
77
|
+
* type's `menu`), as the menu's slots — the anchor unchanged when nothing is selected or no act is shared.
|
|
78
|
+
*/
|
|
79
|
+
export declare function withKindActs(a: SelectionAnchor, selected: readonly Entity[], menuOf: (e: Entity) => readonly MenuActionDef[]): SelectionAnchor;
|
|
80
|
+
/** 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`). */
|
|
81
|
+
export interface HeldSlot {
|
|
82
|
+
readonly id: string;
|
|
83
|
+
readonly label: string;
|
|
84
|
+
/** `mode` · `action`; absent = declared only (dim). */
|
|
85
|
+
readonly kind?: "mode" | "action";
|
|
86
|
+
readonly hint?: string;
|
|
87
|
+
/** Its glyph (core's `HeldGlyph`, K8a): a name of the bar's set, or the tool's own drawing (`{ path }`) — plain data either way. */
|
|
88
|
+
readonly glyph?: HeldGlyph;
|
|
89
|
+
/** A colour the slot shows instead of its glyph (a marker's ink), CSS. */
|
|
90
|
+
readonly swatch?: string;
|
|
91
|
+
}
|
|
92
|
+
/** 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. */
|
|
93
|
+
export declare function heldSlots(tools: readonly HeldToolDef[], swatches?: Readonly<Record<string, string>>): HeldSlot[];
|
|
94
|
+
export interface MarksFrameInput {
|
|
95
|
+
readonly rows: readonly MarkRow[];
|
|
96
|
+
readonly cam: {
|
|
97
|
+
readonly x: number;
|
|
98
|
+
readonly y: number;
|
|
99
|
+
readonly zoom: number;
|
|
100
|
+
};
|
|
101
|
+
readonly view: {
|
|
102
|
+
readonly width: number;
|
|
103
|
+
readonly height: number;
|
|
104
|
+
readonly dpr: number;
|
|
105
|
+
};
|
|
106
|
+
readonly dt: number;
|
|
107
|
+
readonly night: boolean;
|
|
108
|
+
readonly rulers: {
|
|
109
|
+
readonly margin: number;
|
|
110
|
+
readonly band: number;
|
|
111
|
+
} | null;
|
|
112
|
+
}
|
|
113
|
+
export interface MarksCollector {
|
|
114
|
+
/** 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). */
|
|
115
|
+
changed(): boolean;
|
|
116
|
+
/** This frame's marks: the clocks stepped by `dt`, the state assembled. */
|
|
117
|
+
frame(input: MarksFrameInput): MarksInput;
|
|
118
|
+
/** A clock still moves: the next frame paints too. */
|
|
119
|
+
live(): boolean;
|
|
120
|
+
/** The tape's give on an entity this frame, CSS px along x (0 at rest) — the builder shifts the object by it. */
|
|
121
|
+
giveOf(e: Entity): number;
|
|
122
|
+
/**
|
|
123
|
+
* 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
|
|
124
|
+
* it ever meets the tape here): a taped `e` gives, as a core drag meeting tape makes it give. The next `changed()` wakes.
|
|
125
|
+
*/
|
|
126
|
+
refused(e: Entity): void;
|
|
127
|
+
/** The selection menu's anchor, as of the last frame. */
|
|
128
|
+
anchor(): SelectionAnchor;
|
|
129
|
+
dispose(): void;
|
|
130
|
+
}
|
|
131
|
+
export declare function createMarksCollector(world: World, opts?: {
|
|
132
|
+
readonly marquee?: () => MarqueeBuffer | undefined;
|
|
133
|
+
}): 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" | "hitAt">>, opts?: {
|
|
4
|
+
readonly moving?: () => boolean;
|
|
5
|
+
}): FramePickSource;
|