@vibecook/ice 0.10.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -50
- package/dist/chunk-BA7XJC27.js +2429 -0
- package/dist/chunk-BA7XJC27.js.map +1 -0
- package/dist/chunk-BKV4ZEU3.js +1 -0
- package/dist/chunk-BKV4ZEU3.js.map +1 -0
- package/dist/{chunk-5FQS7V2C.js → chunk-DYK6KNLG.js} +13303 -7485
- package/dist/chunk-DYK6KNLG.js.map +1 -0
- package/dist/chunk-ENIFIUEP.js +155 -0
- package/dist/chunk-ENIFIUEP.js.map +1 -0
- package/dist/chunk-IBWWLA6D.js +634 -0
- package/dist/chunk-IBWWLA6D.js.map +1 -0
- package/dist/{chunk-OR5FNVUE.js → chunk-JS6PG6YD.js} +398 -167
- package/dist/chunk-JS6PG6YD.js.map +1 -0
- package/dist/chunk-QXOCF56A.js +148 -0
- package/dist/chunk-QXOCF56A.js.map +1 -0
- package/dist/chunk-ZPUPBULB.js +7399 -0
- package/dist/chunk-ZPUPBULB.js.map +1 -0
- package/dist/desk-engine.js +36 -0
- package/dist/desk-engine.js.map +1 -0
- package/dist/desk-kit.js +244 -0
- package/dist/desk-kit.js.map +1 -0
- package/dist/desk-objects.js +12728 -0
- package/dist/desk-objects.js.map +1 -0
- package/dist/desk.js +469 -0
- package/dist/desk.js.map +1 -0
- package/dist/devtools.js +233 -189
- package/dist/devtools.js.map +1 -1
- package/dist/dom.js +7 -19
- package/dist/index.js +232 -20
- package/dist/kernel.js +53 -25
- package/dist/react.js +1045 -38
- package/dist/react.js.map +1 -1
- package/dist/types/packages/core/src/behavior/define-behavior.d.ts +11 -0
- package/dist/types/packages/core/src/behavior/runtime.d.ts +4 -0
- package/dist/types/packages/core/src/canvas/define-canvas-type.d.ts +86 -0
- package/dist/types/packages/core/src/canvas/define-container.d.ts +17 -0
- package/dist/types/packages/core/src/canvas/diagnostics.d.ts +27 -0
- package/dist/types/packages/core/src/canvas/engine-catalog.d.ts +70 -0
- package/dist/types/packages/core/src/canvas/extensions.d.ts +125 -0
- package/dist/types/packages/core/src/canvas/frame-behavior-host.d.ts +16 -0
- package/dist/types/packages/core/src/canvas/frame-preview.d.ts +79 -0
- package/dist/types/packages/core/src/canvas/frame-projection.d.ts +38 -0
- package/dist/types/packages/core/src/canvas/frame-view.d.ts +36 -0
- package/dist/types/packages/core/src/canvas/migrate.d.ts +14 -0
- package/dist/types/packages/core/src/canvas/placement.d.ts +30 -0
- package/dist/types/packages/core/src/canvas/presentation-transition.d.ts +100 -0
- package/dist/types/packages/core/src/canvas/runtime-extension-host.d.ts +16 -0
- package/dist/types/packages/core/src/canvas/session.d.ts +47 -0
- package/dist/types/packages/core/src/catalog/camera-derived.d.ts +16 -27
- package/dist/types/packages/core/src/catalog/desk.d.ts +326 -0
- package/dist/types/packages/core/src/catalog/gesture.d.ts +51 -0
- package/dist/types/packages/core/src/catalog/graph.d.ts +2 -2
- package/dist/types/packages/core/src/catalog/index.d.ts +2 -0
- package/dist/types/packages/core/src/catalog/pointer.d.ts +42 -0
- package/dist/types/packages/core/src/catalog/selection-presence.d.ts +7 -0
- package/dist/types/packages/core/src/catalog/settings-resources.d.ts +28 -2
- package/dist/types/packages/core/src/catalog/surface.d.ts +1 -0
- package/dist/types/packages/core/src/doc/doc-commit-sink.d.ts +18 -2
- package/dist/types/packages/core/src/doc/doc-kit.d.ts +21 -2
- package/dist/types/packages/core/src/doc/envelope.d.ts +5 -2
- package/dist/types/packages/core/src/doc/schema-migrate.d.ts +1 -1
- package/dist/types/packages/core/src/doc/version-gate.d.ts +21 -3
- package/dist/types/packages/core/src/engine/commit-sink.d.ts +10 -1
- package/dist/types/packages/core/src/engine/engine.d.ts +6 -0
- package/dist/types/packages/core/src/engine/frame-control.d.ts +74 -0
- package/dist/types/packages/core/src/engine/guests.d.ts +4 -1
- package/dist/types/packages/core/src/engine/world-doors.d.ts +12 -0
- package/dist/types/packages/core/src/facade/create-canvas-engine.d.ts +146 -13
- package/dist/types/packages/core/src/index.d.ts +34 -13
- package/dist/types/packages/core/src/input/queue.d.ts +3 -1
- package/dist/types/packages/core/src/interaction/install.d.ts +30 -0
- package/dist/types/packages/core/src/interaction/wakes.d.ts +24 -0
- package/dist/types/packages/core/src/nav/nav-geometry.d.ts +100 -0
- package/dist/types/packages/core/src/nav/nested-canvas.d.ts +47 -4
- package/dist/types/packages/core/src/ops/cascade.d.ts +2 -1
- package/dist/types/packages/core/src/ops/claims.d.ts +6 -0
- package/dist/types/packages/core/src/ops/insert.d.ts +4 -0
- package/dist/types/packages/core/src/ops/point-pick.d.ts +4 -1
- package/dist/types/packages/core/src/ops/sibling-order.d.ts +14 -4
- package/dist/types/packages/core/src/ops/tray.d.ts +48 -0
- package/dist/types/packages/core/src/presence/presence-kit.d.ts +5 -0
- package/dist/types/packages/core/src/schema/meta.d.ts +10 -0
- package/dist/types/packages/core/src/schema/prefab.d.ts +8 -0
- package/dist/types/packages/core/src/settings/defaults.d.ts +25 -6
- package/dist/types/packages/core/src/surface/gpu-device.d.ts +55 -0
- package/dist/types/packages/core/src/systems/camera-sim.d.ts +29 -0
- package/dist/types/packages/core/src/systems/chrome.d.ts +15 -23
- package/dist/types/packages/core/src/systems/drag-mods.d.ts +34 -0
- package/dist/types/packages/core/src/systems/held.d.ts +71 -0
- package/dist/types/packages/core/src/systems/insert-ghost.d.ts +2 -0
- package/dist/types/packages/core/src/systems/l0-input.d.ts +14 -0
- package/dist/types/packages/core/src/systems/l1-pick.d.ts +37 -1
- package/dist/types/packages/core/src/systems/l2-arbitrate.d.ts +18 -4
- package/dist/types/packages/core/src/systems/l3-behave.d.ts +4 -1
- package/dist/types/packages/core/src/systems/l3-claim.d.ts +7 -0
- package/dist/types/packages/core/src/systems/l3-connect.d.ts +1 -1
- package/dist/types/packages/core/src/systems/l3-drop.d.ts +30 -1
- package/dist/types/packages/core/src/systems/l3-marquee.d.ts +2 -1
- package/dist/types/packages/core/src/systems/l3-ports.d.ts +1 -1
- package/dist/types/packages/core/src/systems/l4-cursor.d.ts +5 -0
- package/dist/types/packages/core/src/systems/nav-flight.d.ts +85 -3
- package/dist/types/packages/core/src/systems/nav-tap.d.ts +44 -0
- package/dist/types/packages/core/src/systems/press-wheel.d.ts +11 -0
- package/dist/types/packages/core/src/systems/tray.d.ts +108 -0
- package/dist/types/packages/core/src/systems/zoom-through.d.ts +30 -0
- package/dist/types/packages/core/src/tools/define-tool.d.ts +10 -0
- package/dist/types/packages/core/src/widget/define-widget.d.ts +166 -63
- package/dist/types/packages/core/src/widget/equip.d.ts +14 -2
- package/dist/types/packages/core/src/widget/held-tools.d.ts +83 -0
- package/dist/types/packages/core/src/widget/menu-actions.d.ts +44 -0
- package/dist/types/packages/core/src/widget/mount-store.d.ts +21 -46
- package/dist/types/packages/core/src/widget/spawn.d.ts +1 -1
- package/dist/types/packages/desk/src/assets/blue-noise.gen.d.ts +10 -0
- package/dist/types/packages/desk/src/card/card.d.ts +103 -0
- package/dist/types/packages/desk/src/compose/ambient.d.ts +59 -0
- package/dist/types/packages/desk/src/compose/builder.d.ts +285 -0
- package/dist/types/packages/desk/src/compose/children.d.ts +3 -0
- package/dist/types/packages/desk/src/compose/index.d.ts +14 -0
- package/dist/types/packages/desk/src/compose/marks.d.ts +126 -0
- package/dist/types/packages/desk/src/compose/pick.d.ts +5 -0
- package/dist/types/packages/desk/src/compose/reflector.d.ts +111 -0
- package/dist/types/packages/desk/src/compose/tap.d.ts +5 -0
- package/dist/types/packages/desk/src/docs.d.ts +23 -0
- package/dist/types/packages/desk/src/engine/budget.d.ts +38 -0
- package/dist/types/packages/desk/src/engine/device.d.ts +54 -0
- package/dist/types/packages/desk/src/engine/index.d.ts +5 -0
- package/dist/types/packages/desk/src/engine/pipeline.d.ts +36 -0
- package/dist/types/packages/desk/src/engine/rasters.d.ts +66 -0
- package/dist/types/packages/desk/src/engine/records.d.ts +56 -0
- package/dist/types/packages/desk/src/engine/shader.d.ts +22 -0
- package/dist/types/packages/desk/src/engine/struct.d.ts +39 -0
- package/dist/types/packages/desk/src/engine/target.d.ts +26 -0
- package/dist/types/packages/desk/src/gpu-ablation.d.ts +61 -0
- package/dist/types/packages/desk/src/gpu-memory.d.ts +54 -0
- package/dist/types/packages/desk/src/gpu-profiler.d.ts +141 -0
- package/dist/types/packages/desk/src/gpu-wrap.d.ts +8 -0
- package/dist/types/packages/desk/src/ground.d.ts +388 -0
- package/dist/types/packages/desk/src/hold/focus.d.ts +53 -0
- package/dist/types/packages/desk/src/hold/pose.d.ts +132 -0
- package/dist/types/packages/desk/src/hold/shaders.d.ts +9 -0
- package/dist/types/packages/desk/src/host/editor.d.ts +18 -0
- package/dist/types/packages/desk/src/host/index.d.ts +9 -0
- package/dist/types/packages/desk/src/host/ink.d.ts +18 -0
- package/dist/types/packages/desk/src/host/layer.d.ts +430 -0
- package/dist/types/packages/desk/src/host/picture.d.ts +2 -0
- package/dist/types/packages/desk/src/host/surface.d.ts +5 -0
- package/dist/types/packages/desk/src/index.d.ts +13 -0
- package/dist/types/packages/desk/src/kind.d.ts +187 -0
- package/dist/types/packages/desk/src/kinds/world.d.ts +429 -0
- package/dist/types/packages/desk/src/kit/arrays.d.ts +88 -0
- package/dist/types/packages/desk/src/kit/blobs.d.ts +40 -0
- package/dist/types/packages/desk/src/kit/book.d.ts +2 -0
- package/dist/types/packages/desk/src/kit/editor.d.ts +103 -0
- package/dist/types/packages/desk/src/kit/eye.d.ts +37 -0
- package/dist/types/packages/desk/src/kit/hold.d.ts +1 -0
- package/dist/types/packages/desk/src/kit/index.d.ts +26 -0
- package/dist/types/packages/desk/src/kit/inside.d.ts +116 -0
- package/dist/types/packages/desk/src/kit/layer.d.ts +159 -0
- package/dist/types/packages/desk/src/kit/light.d.ts +3 -0
- package/dist/types/packages/desk/src/kit/mesh.d.ts +29 -0
- package/dist/types/packages/desk/src/kit/mips.d.ts +2 -0
- package/dist/types/packages/desk/src/kit/nav.d.ts +2 -0
- package/dist/types/packages/desk/src/kit/paper-tex.d.ts +5 -0
- package/dist/types/packages/desk/src/kit/physics.d.ts +44 -0
- package/dist/types/packages/desk/src/kit/place.d.ts +44 -0
- package/dist/types/packages/desk/src/kit/print.d.ts +30 -0
- package/dist/types/packages/desk/src/kit/raster.d.ts +34 -0
- package/dist/types/packages/desk/src/kit/sdf.d.ts +1 -0
- package/dist/types/packages/desk/src/kit/seeds.d.ts +11 -0
- package/dist/types/packages/desk/src/kit/services.d.ts +34 -0
- package/dist/types/packages/desk/src/kit/springs.d.ts +12 -0
- package/dist/types/packages/desk/src/kit/strokes.d.ts +93 -0
- package/dist/types/packages/desk/src/kit/text.d.ts +142 -0
- package/dist/types/packages/desk/src/kit/uniform.d.ts +8 -0
- package/dist/types/packages/desk/src/kit/view.d.ts +39 -0
- package/dist/types/packages/desk/src/kit/wgsl.d.ts +15 -0
- package/dist/types/packages/desk/src/lattice/line.d.ts +15 -0
- package/dist/types/packages/desk/src/lattice/lod.d.ts +52 -0
- package/dist/types/packages/desk/src/lattice/ruler.d.ts +88 -0
- package/dist/types/packages/desk/src/marks/assemble.d.ts +65 -0
- package/dist/types/packages/desk/src/marks/ease.d.ts +4 -0
- package/dist/types/packages/desk/src/marks/laser.d.ts +41 -0
- package/dist/types/packages/desk/src/marks/layout.d.ts +167 -0
- package/dist/types/packages/desk/src/marks/pass.d.ts +59 -0
- package/dist/types/packages/desk/src/marks/shaders.d.ts +12 -0
- package/dist/types/packages/desk/src/mat/grid.d.ts +50 -0
- package/dist/types/packages/desk/src/mat/lamp.d.ts +14 -0
- package/dist/types/packages/desk/src/mat/layout.d.ts +144 -0
- package/dist/types/packages/desk/src/mat/mat-pass.d.ts +83 -0
- package/dist/types/packages/desk/src/mat/night.d.ts +95 -0
- package/dist/types/packages/desk/src/mat/projector.d.ts +39 -0
- package/dist/types/packages/desk/src/mat/shaders.d.ts +17 -0
- package/dist/types/packages/desk/src/mat/tilt.d.ts +14 -0
- package/dist/types/packages/desk/src/nav/flight.d.ts +186 -0
- package/dist/types/packages/desk/src/nav/portal.d.ts +95 -0
- package/dist/types/packages/desk/src/object.d.ts +46 -0
- package/dist/types/packages/desk/src/pass-instrument.d.ts +89 -0
- package/dist/types/packages/desk/src/shaders.d.ts +12 -0
- package/dist/types/packages/desk/src/shaders.gen.d.ts +16 -0
- package/dist/types/packages/desk/src/submit-instrument.d.ts +36 -0
- package/dist/types/packages/desk/src/theme.d.ts +475 -0
- package/dist/types/packages/desk/src/tray/carry.d.ts +99 -0
- package/dist/types/packages/desk/src/tray/drawer.d.ts +113 -0
- package/dist/types/packages/desk/src/tray/flux.d.ts +46 -0
- package/dist/types/packages/desk/src/tray/index.d.ts +4 -0
- package/dist/types/packages/desk/src/tray/lattice.d.ts +71 -0
- package/dist/types/packages/desk/src/tray/layout.d.ts +7 -0
- package/dist/types/packages/desk/src/tray/look.d.ts +29 -0
- package/dist/types/packages/desk/src/tray/pass.d.ts +96 -0
- package/dist/types/packages/desk/src/tray/shaders.d.ts +10 -0
- package/dist/types/packages/desk/src/tray/specimens.d.ts +199 -0
- package/dist/types/packages/devtools/src/attach.d.ts +22 -8
- package/dist/types/packages/devtools/src/dock.d.ts +18 -14
- package/dist/types/packages/devtools/src/gpu-panel.d.ts +105 -0
- package/dist/types/packages/devtools/src/index.d.ts +5 -4
- package/dist/types/packages/dom/src/desk-host.d.ts +91 -0
- package/dist/types/packages/dom/src/host.d.ts +13 -14
- package/dist/types/packages/dom/src/index.d.ts +12 -10
- package/dist/types/packages/dom/src/loop.d.ts +18 -1
- package/dist/types/packages/dom/src/pointer-adapter.d.ts +5 -29
- package/dist/types/packages/dom/src/widget-focus.d.ts +17 -13
- package/dist/types/packages/ice/src/desk-engine.d.ts +2 -0
- package/dist/types/packages/ice/src/desk-kit.d.ts +6 -0
- package/dist/types/packages/ice/src/desk-objects.d.ts +5 -0
- package/dist/types/packages/ice/src/desk.d.ts +5 -0
- package/dist/types/packages/kernel/src/atlas-pack.d.ts +157 -0
- package/dist/types/packages/kernel/src/bezier.d.ts +0 -15
- package/dist/types/packages/kernel/src/coords.d.ts +0 -39
- package/dist/types/packages/kernel/src/index.d.ts +2 -2
- package/dist/types/packages/kernel/src/nav-flight.d.ts +6 -0
- package/dist/types/packages/kernel/src/tray.d.ts +155 -0
- package/dist/types/packages/objects/src/board/board-pass.d.ts +180 -0
- package/dist/types/packages/objects/src/board/board-pen.d.ts +36 -0
- package/dist/types/packages/objects/src/board/board.d.ts +104 -0
- package/dist/types/packages/objects/src/board/data.d.ts +31 -0
- package/dist/types/packages/objects/src/board/history.d.ts +33 -0
- package/dist/types/packages/objects/src/board/kind.d.ts +208 -0
- package/dist/types/packages/objects/src/board/layout.d.ts +102 -0
- package/dist/types/packages/objects/src/board/object.d.ts +7 -0
- package/dist/types/packages/objects/src/board/pen.d.ts +71 -0
- package/dist/types/packages/objects/src/board/shaders.d.ts +36 -0
- package/dist/types/packages/objects/src/board/stroke.d.ts +99 -0
- package/dist/types/packages/objects/src/board/theme.d.ts +150 -0
- package/dist/types/packages/objects/src/calendar/data.d.ts +97 -0
- package/dist/types/packages/objects/src/calendar/events.d.ts +58 -0
- package/dist/types/packages/objects/src/calendar/hand.d.ts +53 -0
- package/dist/types/packages/objects/src/calendar/host/input.d.ts +67 -0
- package/dist/types/packages/objects/src/calendar/host/print.d.ts +9 -0
- package/dist/types/packages/objects/src/calendar/kind.d.ts +297 -0
- package/dist/types/packages/objects/src/calendar/law.d.ts +151 -0
- package/dist/types/packages/objects/src/calendar/layout.d.ts +47 -0
- package/dist/types/packages/objects/src/calendar/month.d.ts +75 -0
- package/dist/types/packages/objects/src/calendar/object.d.ts +45 -0
- package/dist/types/packages/objects/src/calendar/pad.d.ts +42 -0
- package/dist/types/packages/objects/src/calendar/pass.d.ts +229 -0
- package/dist/types/packages/objects/src/calendar/print.d.ts +87 -0
- package/dist/types/packages/objects/src/calendar/printing.d.ts +80 -0
- package/dist/types/packages/objects/src/calendar/roll.d.ts +45 -0
- package/dist/types/packages/objects/src/calendar/shaders.d.ts +12 -0
- package/dist/types/packages/objects/src/calendar/sheet.d.ts +43 -0
- package/dist/types/packages/objects/src/calendar/tiles.d.ts +67 -0
- package/dist/types/packages/objects/src/calendar/turn.d.ts +73 -0
- package/dist/types/packages/objects/src/calendar/writing.d.ts +42 -0
- package/dist/types/packages/objects/src/index.d.ts +22 -0
- package/dist/types/packages/objects/src/kinds.d.ts +24 -0
- package/dist/types/packages/objects/src/minimat/inside.d.ts +17 -0
- package/dist/types/packages/objects/src/minimat/kind.d.ts +51 -0
- package/dist/types/packages/objects/src/minimat/layout.d.ts +83 -0
- package/dist/types/packages/objects/src/minimat/minimat.d.ts +179 -0
- package/dist/types/packages/objects/src/minimat/object.d.ts +8 -0
- package/dist/types/packages/objects/src/minimat/pass.d.ts +61 -0
- package/dist/types/packages/objects/src/minimat/shaders.d.ts +10 -0
- package/dist/types/packages/objects/src/minimat/theme.d.ts +98 -0
- package/dist/types/packages/objects/src/notebook/ink.d.ts +70 -0
- package/dist/types/packages/objects/src/notebook/kind.d.ts +236 -0
- package/dist/types/packages/objects/src/notebook/law.d.ts +129 -0
- package/dist/types/packages/objects/src/notebook/layout.d.ts +46 -0
- package/dist/types/packages/objects/src/notebook/leaf.d.ts +44 -0
- package/dist/types/packages/objects/src/notebook/mesh.d.ts +20 -0
- package/dist/types/packages/objects/src/notebook/motion.d.ts +107 -0
- package/dist/types/packages/objects/src/notebook/object.d.ts +8 -0
- package/dist/types/packages/objects/src/notebook/pages.d.ts +56 -0
- package/dist/types/packages/objects/src/notebook/pass.d.ts +197 -0
- package/dist/types/packages/objects/src/notebook/pick.d.ts +30 -0
- package/dist/types/packages/objects/src/notebook/raster.d.ts +28 -0
- package/dist/types/packages/objects/src/notebook/shaders.d.ts +11 -0
- package/dist/types/packages/objects/src/notebook/shape.d.ts +155 -0
- package/dist/types/packages/objects/src/notebook/theme.d.ts +76 -0
- package/dist/types/packages/objects/src/palette.d.ts +577 -0
- package/dist/types/packages/objects/src/paper/host/body.d.ts +30 -0
- package/dist/types/packages/objects/src/paper/kind.d.ts +81 -0
- package/dist/types/packages/objects/src/paper/layout.d.ts +73 -0
- package/dist/types/packages/objects/src/paper/object.d.ts +31 -0
- package/dist/types/packages/objects/src/paper/pages.d.ts +43 -0
- package/dist/types/packages/objects/src/paper/paper-pass.d.ts +86 -0
- package/dist/types/packages/objects/src/paper/paper.d.ts +117 -0
- package/dist/types/packages/objects/src/paper/shaders.d.ts +18 -0
- package/dist/types/packages/objects/src/paper/theme.d.ts +58 -0
- package/dist/types/packages/objects/src/paper/typing.d.ts +51 -0
- package/dist/types/packages/objects/src/paper/writing.d.ts +161 -0
- package/dist/types/packages/objects/src/photo/carry.d.ts +33 -0
- package/dist/types/packages/objects/src/photo/kind.d.ts +136 -0
- package/dist/types/packages/objects/src/photo/layout.d.ts +39 -0
- package/dist/types/packages/objects/src/photo/object.d.ts +5 -0
- package/dist/types/packages/objects/src/photo/photo-pass.d.ts +104 -0
- package/dist/types/packages/objects/src/photo/photo.d.ts +262 -0
- package/dist/types/packages/objects/src/photo/pictures.d.ts +152 -0
- package/dist/types/packages/objects/src/photo/sample.d.ts +9 -0
- package/dist/types/packages/objects/src/photo/shaders.d.ts +18 -0
- package/dist/types/packages/objects/src/preset.d.ts +44 -0
- package/dist/types/packages/objects/src/shaders.d.ts +3 -0
- package/dist/types/packages/objects/src/shaders.gen.d.ts +21 -0
- package/dist/types/packages/react/src/canvas-hooks.d.ts +12 -0
- package/dist/types/packages/react/src/desk.d.ts +56 -0
- package/dist/types/packages/react/src/engine-context.d.ts +2 -2
- package/dist/types/packages/react/src/frame-preview-boundary.d.ts +19 -0
- package/dist/types/packages/react/src/hooks.d.ts +9 -14
- package/dist/types/packages/react/src/index.d.ts +16 -9
- package/dist/types/packages/react/src/keymap.d.ts +21 -2
- package/dist/types/packages/react/src/selection-menu.d.ts +171 -0
- package/dist/types/packages/react/src/tray-bar.d.ts +124 -0
- package/package.json +64 -31
- package/dist/chunk-5FQS7V2C.js.map +0 -1
- package/dist/chunk-JWRHAM7L.js +0 -1163
- package/dist/chunk-JWRHAM7L.js.map +0 -1
- package/dist/chunk-MFTMPJUF.js +0 -681
- package/dist/chunk-MFTMPJUF.js.map +0 -1
- package/dist/chunk-OR5FNVUE.js.map +0 -1
- package/dist/ground.js +0 -1213
- package/dist/ground.js.map +0 -1
- package/dist/r3f.js +0 -1644
- package/dist/r3f.js.map +0 -1
- package/dist/types/packages/core/src/input/measure-queue.d.ts +0 -30
- package/dist/types/packages/core/src/settings/ground-config.d.ts +0 -103
- package/dist/types/packages/core/src/systems/measure-ingest.d.ts +0 -26
- package/dist/types/packages/devtools/src/gl-panel.d.ts +0 -69
- package/dist/types/packages/dom/src/measure-adapter.d.ts +0 -31
- package/dist/types/packages/dom/src/measure-wiring.d.ts +0 -49
- package/dist/types/packages/dom/src/planes.d.ts +0 -33
- package/dist/types/packages/dom/src/reflectors/chrome.d.ts +0 -33
- package/dist/types/packages/dom/src/reflectors/dom-widgets.d.ts +0 -59
- package/dist/types/packages/dom/src/reflectors/graybox.d.ts +0 -31
- package/dist/types/packages/dom/src/reflectors/plane-transform.d.ts +0 -38
- package/dist/types/packages/ground/src/index.d.ts +0 -69
- package/dist/types/packages/ground/src/layer.d.ts +0 -40
- package/dist/types/packages/ground/src/pass.d.ts +0 -41
- package/dist/types/packages/ground/src/passes/grid-classic.d.ts +0 -30
- package/dist/types/packages/ground/src/passes/grid-magnet.d.ts +0 -31
- package/dist/types/packages/ground/src/passes/grid.d.ts +0 -28
- package/dist/types/packages/ground/src/passes/guides-collect.d.ts +0 -14
- package/dist/types/packages/ground/src/passes/guides.d.ts +0 -3
- package/dist/types/packages/ground/src/passes/magnet-collect.d.ts +0 -63
- package/dist/types/packages/ground/src/passes/soup-collect.d.ts +0 -35
- package/dist/types/packages/ground/src/passes/soup-mesh.d.ts +0 -8
- package/dist/types/packages/ground/src/passes/wires-collect.d.ts +0 -35
- package/dist/types/packages/ground/src/passes/wires.d.ts +0 -10
- package/dist/types/packages/ground/src/poles.d.ts +0 -47
- package/dist/types/packages/ground/src/renderer.d.ts +0 -15
- package/dist/types/packages/ice/src/ground.d.ts +0 -1
- package/dist/types/packages/ice/src/r3f.d.ts +0 -1
- package/dist/types/packages/kernel/src/eviction.d.ts +0 -23
- package/dist/types/packages/kernel/src/zoom-bands.d.ts +0 -19
- package/dist/types/packages/r3f/src/bridge.d.ts +0 -129
- package/dist/types/packages/r3f/src/composite-material.d.ts +0 -26
- package/dist/types/packages/r3f/src/compositor-pass.d.ts +0 -105
- package/dist/types/packages/r3f/src/dev-write-trap.d.ts +0 -30
- package/dist/types/packages/r3f/src/gl-root.d.ts +0 -96
- package/dist/types/packages/r3f/src/gl-router.d.ts +0 -70
- package/dist/types/packages/r3f/src/index.d.ts +0 -17
- package/dist/types/packages/r3f/src/island-state.d.ts +0 -112
- package/dist/types/packages/r3f/src/island.d.ts +0 -13
- package/dist/types/packages/r3f/src/pool.d.ts +0 -56
- package/dist/types/packages/r3f/src/preview-capture.d.ts +0 -19
- package/dist/types/packages/r3f/src/resource-registry.d.ts +0 -30
- package/dist/types/packages/r3f/src/self-sustain.d.ts +0 -39
- package/dist/types/packages/r3f/src/use-island-frame.d.ts +0 -39
- package/dist/types/packages/react/src/infinite-canvas.d.ts +0 -140
- package/dist/types/packages/react/src/preview-snapshots.d.ts +0 -17
- package/dist/types/packages/react/src/widget-preview.d.ts +0 -14
- package/dist/types/packages/react/src/widget-root.d.ts +0 -33
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ServiceKey } from "./services";
|
|
2
|
+
import type { HandLayout, HandMetrics } from "./text";
|
|
3
|
+
/** r8 coverage rows, row 0 at the top — what the ink pages take (`PaperPass.write`). */
|
|
4
|
+
export interface InkBitmap {
|
|
5
|
+
readonly bytes: Uint8Array<ArrayBuffer>;
|
|
6
|
+
readonly w: number;
|
|
7
|
+
readonly h: number;
|
|
8
|
+
}
|
|
9
|
+
export interface TextRaster {
|
|
10
|
+
/**
|
|
11
|
+
* The face's metrics in em (advances and kerning measured at 100 px, the box from the font's own
|
|
12
|
+
* ascent and descent) — `undefined` while the face loads: a sheet waits, blank, rather than write
|
|
13
|
+
* in a stand-in hand and re-write itself a moment later.
|
|
14
|
+
*/
|
|
15
|
+
metrics(face: string): HandMetrics | undefined;
|
|
16
|
+
/** Bumped whenever a face lands: every layout keyed by it is laid again (the prototype's `fontVersion`). */
|
|
17
|
+
version(): number;
|
|
18
|
+
/**
|
|
19
|
+
* Tell `fn` whenever `version` moves — a face landed between frames (K7a: the desk wakes for it; a loop at rest polls no
|
|
20
|
+
* version). Returns an unsubscribe. Absent (a fake, a raster with fixed faces): the version never moves on its own.
|
|
21
|
+
*/
|
|
22
|
+
onVersion?(fn: () => void): () => void;
|
|
23
|
+
/**
|
|
24
|
+
* Draw a layout's glyphs for a `box` (note units) at `band` texels per note unit: each glyph in its
|
|
25
|
+
* own frame — turned, scaled, at its pressure — over a faint stroke `bleed` note units wide (the pen's
|
|
26
|
+
* spread), the canvas's alpha read back as coverage.
|
|
27
|
+
*/
|
|
28
|
+
raster(layout: HandLayout, face: string, box: {
|
|
29
|
+
readonly w: number;
|
|
30
|
+
readonly h: number;
|
|
31
|
+
}, band: number, bleed: number): InkBitmap;
|
|
32
|
+
}
|
|
33
|
+
/** The app's text raster as a desk SERVICE (K8a, kit/services.ts — `deskLayer({ text })` lends it): `host.use?.(TEXT_RASTER)`. */
|
|
34
|
+
export declare const TEXT_RASTER: ServiceKey<TextRaster>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const sdRoundBox: (px: number, py: number, bx: number, by: number, r: number) => number;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** The seeds as the cell stores them: base64 (no padding) of little-endian u32s. */
|
|
2
|
+
export declare function encodeSeeds(seeds: ArrayLike<number>): string;
|
|
3
|
+
/** The seeds a cell holds, as i32s (the layout's `seeds`) — whole seeds only; anything unreadable ends the run. */
|
|
4
|
+
export declare function decodeSeeds(s: string): number[];
|
|
5
|
+
/**
|
|
6
|
+
* The seeds a note's text is written with: the stored ones, index for index, and for every glyph
|
|
7
|
+
* past them the note's own `glyphSeed(noteSeed, i)` — exactly `text.length` of them.
|
|
8
|
+
*/
|
|
9
|
+
export declare function seedsFor(text: string, stored: string, noteSeed: number): number[];
|
|
10
|
+
/** A fresh seed for a glyph just written — the host's randomness (`Math.random` in a browser). */
|
|
11
|
+
export declare const freshSeed: () => number;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** A service's KEY (K8a): its name — the registry's identity — and, as a phantom, the type of what is lent under it. */
|
|
2
|
+
export interface ServiceKey<T> {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
/** Never set: carries `T` so `use(key)` answers the lent thing's own type. */
|
|
5
|
+
readonly __service?: T;
|
|
6
|
+
}
|
|
7
|
+
/** A key for a service of type `T` under `name` — namespace a plugin's own (`"clock.face"`); the desk's are bare words. */
|
|
8
|
+
export declare const serviceKey: <T>(name: string) => ServiceKey<T>;
|
|
9
|
+
/** One service as it is LENT: its key and the thing. Made by `service(key, value)`, which checks the pair's type. */
|
|
10
|
+
export interface Lent<T = unknown> {
|
|
11
|
+
readonly key: ServiceKey<T>;
|
|
12
|
+
readonly value: T;
|
|
13
|
+
}
|
|
14
|
+
/** An entry to lend: `service(PRINT_RASTER, printRaster({ text }))`. */
|
|
15
|
+
export declare const service: <T>(key: ServiceKey<T>, value: T) => Lent<T>;
|
|
16
|
+
/** Where a service is found: `use(key)` answers what is lent under the key's name, or undefined — none on this desk. */
|
|
17
|
+
export interface Services {
|
|
18
|
+
use<T>(key: ServiceKey<T>): T | undefined;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* What an object's DOM half is handed to LEND (K8a): what is lent so far, and the desk's WAKE — a service whose work LANDS later (a
|
|
22
|
+
* face loaded, a picture decoded, a feed arrived) calls it when it does, so a sleeping loop steps and every kind is asked again (K7a's
|
|
23
|
+
* law: nothing is polled at rest; what arrives outside a step says so). The kinds that read the service see the landing in their tick.
|
|
24
|
+
*/
|
|
25
|
+
export interface LendHost extends Services {
|
|
26
|
+
wake(): void;
|
|
27
|
+
}
|
|
28
|
+
/** A registry of what has been lent so far (the desk layer's): `lend` adds entries — a name lent twice throws, naming both lenders. */
|
|
29
|
+
export interface ServiceRegistry extends Services {
|
|
30
|
+
lend(entries: readonly Lent[], by: string): void;
|
|
31
|
+
/** The names lent, in lending order (a rig's and a test's witness). */
|
|
32
|
+
names(): readonly string[];
|
|
33
|
+
}
|
|
34
|
+
export declare function createServices(entries?: readonly Lent[], by?: string): ServiceRegistry;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function spring(x0: number, v0: number, target: number, hz: number, damping: number, dt: number, substeps?: number): [number, number];
|
|
2
|
+
export declare function settled(x: number, v: number, target: number, eps?: number): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* The objects' springs: the hold's lift (the hover's rise rides the same numbers). The selection RING's spring is gone (D6): the
|
|
5
|
+
* kinds' own ring retired at D4a — the marks draw the selection — and a spring that only ever fed a zero kept the desk live for
|
|
6
|
+
* a second after every selection change (the D4a landing's owed item).
|
|
7
|
+
*/
|
|
8
|
+
export interface ObjectSprings {
|
|
9
|
+
readonly liftHz: number;
|
|
10
|
+
readonly liftDamp: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const SPRINGS: ObjectSprings;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { type Entity, type GuardedTx, type World } from "../../../core/src/index";
|
|
2
|
+
/** A board's data child: a stroke (`marker`, with `erase` for the eraser) or a wipe. */
|
|
3
|
+
export declare const BoardStroke: import("@vibecook/strata-ecs").Component<import("@vibecook/strata-ecs").ValueOf<{
|
|
4
|
+
readonly tool: import("@vibecook/strata-ecs").FieldSpec<"string", true>;
|
|
5
|
+
readonly ink: import("@vibecook/strata-ecs").FieldSpec<"string", true>;
|
|
6
|
+
readonly tip: import("@vibecook/strata-ecs").FieldSpec<"string", true>;
|
|
7
|
+
readonly erase: import("@vibecook/strata-ecs").FieldSpec<"bool", true>;
|
|
8
|
+
readonly points: import("@vibecook/strata-ecs").FieldSpec<"string", true>;
|
|
9
|
+
readonly speed: import("@vibecook/strata-ecs").FieldSpec<"f64", true>;
|
|
10
|
+
readonly times: import("@vibecook/strata-ecs").FieldSpec<"string", true>;
|
|
11
|
+
readonly page: import("@vibecook/strata-ecs").FieldSpec<"u32", true>;
|
|
12
|
+
readonly seed: import("@vibecook/strata-ecs").FieldSpec<"f64", true>;
|
|
13
|
+
}>, {
|
|
14
|
+
readonly tool: import("@vibecook/strata-ecs").FieldSpec<"string", true>;
|
|
15
|
+
readonly ink: import("@vibecook/strata-ecs").FieldSpec<"string", true>;
|
|
16
|
+
readonly tip: import("@vibecook/strata-ecs").FieldSpec<"string", true>;
|
|
17
|
+
readonly erase: import("@vibecook/strata-ecs").FieldSpec<"bool", true>;
|
|
18
|
+
readonly points: import("@vibecook/strata-ecs").FieldSpec<"string", true>;
|
|
19
|
+
readonly speed: import("@vibecook/strata-ecs").FieldSpec<"f64", true>;
|
|
20
|
+
readonly times: import("@vibecook/strata-ecs").FieldSpec<"string", true>;
|
|
21
|
+
readonly page: import("@vibecook/strata-ecs").FieldSpec<"u32", true>;
|
|
22
|
+
readonly seed: import("@vibecook/strata-ecs").FieldSpec<"f64", true>;
|
|
23
|
+
}>;
|
|
24
|
+
/** A stroke's cell as the board reads it (a tolerant reader: a string field strata hands back as null reads as its default). */
|
|
25
|
+
export interface StrokeRow {
|
|
26
|
+
readonly tool: string | null;
|
|
27
|
+
readonly ink: string | null;
|
|
28
|
+
readonly tip: string | null;
|
|
29
|
+
readonly erase: boolean | null;
|
|
30
|
+
readonly points: string | null;
|
|
31
|
+
readonly speed: number | null;
|
|
32
|
+
readonly times?: string | null;
|
|
33
|
+
/** The notebook page it is on (D3t-b — v3): 2i + 1 a sheet's recto, 2i + 2 its verso; 0 (or absent, a v2 reader's) = none. */
|
|
34
|
+
readonly page?: number | null;
|
|
35
|
+
/** Its fibre seed (D7 #13 — v4): the one the live pen laid with; −1 (or absent, a v3 reader's) = the seed its position gives it. */
|
|
36
|
+
readonly seed?: number | null;
|
|
37
|
+
}
|
|
38
|
+
/** The durable id a stroke entity carries (`PrefabId`) — a data child, never a widget. */
|
|
39
|
+
export declare const STROKE_TYPE = "desk.stroke";
|
|
40
|
+
/**
|
|
41
|
+
* A stroke's durable prefab: its one cell and its `ChildOf` edge to the board (or the book) it is on. Version 2 (D3t-a) added
|
|
42
|
+
* `times`; a v1 stroke migrates to an empty one — it keeps its `speed` (the replay spaces it as before). Version 3 (D3t-b) added
|
|
43
|
+
* `page`; a v2 stroke — a board's — migrates to page 0. The Board and the Notebook declare it as their `data`, so the engine's
|
|
44
|
+
* catalog stamps, gates and migrates it with them.
|
|
45
|
+
*/
|
|
46
|
+
export declare const StrokePrefab: import("../../../core/src/index").Prefab;
|
|
47
|
+
/** A row's fibre seed: its own (v4, the pen's) — or, for a row from before or without one, the `n`-th op's positional seed. */
|
|
48
|
+
export declare const seedOfRow: (s: Pick<StrokeRow, "seed">, n: number) => number;
|
|
49
|
+
/**
|
|
50
|
+
* A stroke as an author states one: the path in melamine units (a notebook's: page units, on its `page`) and its pace — each
|
|
51
|
+
* sample's time (ms from the first), or one speed; a wipe has no path.
|
|
52
|
+
*/
|
|
53
|
+
export interface StrokeSpec {
|
|
54
|
+
readonly tool?: "marker" | "wipe" | "pen";
|
|
55
|
+
readonly ink?: string;
|
|
56
|
+
readonly tip?: string;
|
|
57
|
+
readonly erase?: boolean;
|
|
58
|
+
readonly points?: readonly (readonly [number, number])[];
|
|
59
|
+
readonly times?: readonly number[];
|
|
60
|
+
readonly speed?: number;
|
|
61
|
+
/** The notebook page (D3t-b): 2i + 1 sheet i's recto, 2i + 2 its verso; absent = 0, a board's. */
|
|
62
|
+
readonly page?: number;
|
|
63
|
+
/** The fibre seed the pen laid with (D7 #13): stored, so the replay lays the same stamps whatever lands before it; absent = the position's. */
|
|
64
|
+
readonly seed?: number;
|
|
65
|
+
}
|
|
66
|
+
/** A path as the cell stores it: base64 (no padding) of LE f32 (x, y) pairs. */
|
|
67
|
+
export declare function encodePoints(points: readonly (readonly [number, number])[]): string;
|
|
68
|
+
/** A cell's path back: whole points only (a tolerant reader — anything unreadable ends the path). */
|
|
69
|
+
export declare function decodePoints(s: string): Array<readonly [number, number]>;
|
|
70
|
+
/** The samples' times as the cell stores them (D3t-a): base64 (no padding) of LE f32 milliseconds from the first sample. */
|
|
71
|
+
export declare function encodeTimes(times: readonly number[]): string;
|
|
72
|
+
/** A cell's times back (a tolerant reader: "" — an old stroke — is none). */
|
|
73
|
+
export declare function decodeTimes(s: string): number[];
|
|
74
|
+
/** A path's mean pace, world units/s — what a v2 stroke leaves in `speed` for a reader that knows no `times`; the default for a dot. */
|
|
75
|
+
export declare function meanSpeed(points: readonly (readonly [number, number])[], times: readonly number[]): number;
|
|
76
|
+
/** The row a spec is — defaults as the prefab has them; timed, its `speed` is the path's mean pace unless the spec names one. */
|
|
77
|
+
export declare function strokeRow(s: StrokeSpec): {
|
|
78
|
+
tool: string;
|
|
79
|
+
ink: string;
|
|
80
|
+
tip: string;
|
|
81
|
+
erase: boolean;
|
|
82
|
+
points: string;
|
|
83
|
+
speed: number;
|
|
84
|
+
times: string;
|
|
85
|
+
page: number;
|
|
86
|
+
seed: number;
|
|
87
|
+
};
|
|
88
|
+
/** Lay a stroke on a board (or a book's page) — one entity, the object's newest child — inside the caller's transaction (one stroke, one undo step). */
|
|
89
|
+
export declare function addStroke(tx: GuardedTx, board: Entity, s: StrokeSpec): Entity;
|
|
90
|
+
/** The fibre seed of the `n`-th op a replay walks — the bench's `97.13 ×` the ops before it; the live pen seeds its stroke with the next. */
|
|
91
|
+
export declare const strokeSeed: (n: number) => number;
|
|
92
|
+
/** A stroke is in hand (a local pointer's press is a tool's): a history waits for it to land (BOARD.md §5 — the bench's `!this.open?.stroke`). */
|
|
93
|
+
export declare function inking(world: World): boolean;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
export interface HandMetrics {
|
|
2
|
+
/** em above the baseline, em below — the face's own box. */
|
|
3
|
+
readonly ascent: number;
|
|
4
|
+
readonly descent: number;
|
|
5
|
+
/** A glyph's advance, em. */
|
|
6
|
+
advance(ch: string): number;
|
|
7
|
+
/** Optional pair kerning, em (negative tightens). */
|
|
8
|
+
kern?(a: string, b: string): number;
|
|
9
|
+
}
|
|
10
|
+
/** The hand's law (theme.ts `HAND`): the size in world units, and how far each glyph may stray. */
|
|
11
|
+
export interface HandLaw {
|
|
12
|
+
/** The pen's size, world units (CSS px at zoom 1). */
|
|
13
|
+
readonly size: number;
|
|
14
|
+
/** Line pitch, × size. */
|
|
15
|
+
readonly lineHeight: number;
|
|
16
|
+
/** The margin the writing keeps from the paper's edge, world units. */
|
|
17
|
+
readonly pad: number;
|
|
18
|
+
readonly jitter: {
|
|
19
|
+
/** Each glyph's tilt, ± radians. */
|
|
20
|
+
readonly rot: number;
|
|
21
|
+
/** Each glyph's rise off the baseline, ± em. */
|
|
22
|
+
readonly rise: number;
|
|
23
|
+
/** Each glyph's size, ± fraction. */
|
|
24
|
+
readonly scale: number;
|
|
25
|
+
/** The pen's pressure — the ink's presence — between these. */
|
|
26
|
+
readonly press: readonly [number, number];
|
|
27
|
+
};
|
|
28
|
+
readonly wander: {
|
|
29
|
+
/** The line's slow drift, ± em. */
|
|
30
|
+
readonly amp: number;
|
|
31
|
+
/** …over this many em along the line. */
|
|
32
|
+
readonly period: number;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface HandGlyph {
|
|
36
|
+
readonly ch: string;
|
|
37
|
+
/** Its index in the text. */
|
|
38
|
+
readonly index: number;
|
|
39
|
+
/** The glyph's origin on its baseline, note units from the paper's top-left. */
|
|
40
|
+
readonly x: number;
|
|
41
|
+
readonly y: number;
|
|
42
|
+
/** The advance it takes, note units. */
|
|
43
|
+
readonly advance: number;
|
|
44
|
+
readonly rot: number;
|
|
45
|
+
readonly scale: number;
|
|
46
|
+
readonly press: number;
|
|
47
|
+
readonly line: number;
|
|
48
|
+
}
|
|
49
|
+
export interface HandLine {
|
|
50
|
+
/** Text indices [start, end). */
|
|
51
|
+
readonly start: number;
|
|
52
|
+
readonly end: number;
|
|
53
|
+
/** The baseline, note units. */
|
|
54
|
+
readonly y: number;
|
|
55
|
+
readonly width: number;
|
|
56
|
+
}
|
|
57
|
+
export interface HandLayout {
|
|
58
|
+
readonly glyphs: readonly HandGlyph[];
|
|
59
|
+
readonly lines: readonly HandLine[];
|
|
60
|
+
/** The caret's place BEFORE each index (and after the last): x, baseline y — `2 × (text.length + 1)`. */
|
|
61
|
+
readonly positions: Float32Array;
|
|
62
|
+
/** The writing ran past the bottom margin. */
|
|
63
|
+
readonly overflow: boolean;
|
|
64
|
+
/** The em, and the caret's height above and below the baseline. */
|
|
65
|
+
readonly em: number;
|
|
66
|
+
readonly ascent: number;
|
|
67
|
+
readonly descent: number;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Four floats in [0, 1) from a glyph's seed and its character — a 32-bit mix
|
|
71
|
+
* (Wang's hash twice, xorshift between) that changes wholly for a change of
|
|
72
|
+
* one bit in either. Deterministic across hosts: only integer arithmetic.
|
|
73
|
+
*/
|
|
74
|
+
export declare function hashHand(seed: number, code: number): readonly [number, number, number, number];
|
|
75
|
+
/** A glyph's seed when the host carries none: the note's seed and the glyph's place. */
|
|
76
|
+
export declare const glyphSeed: (noteSeed: number, index: number) => number;
|
|
77
|
+
/**
|
|
78
|
+
* Lay `text` into a `box` (note units) under `law` with the face's `metrics`.
|
|
79
|
+
* `seeds[i]` is glyph i's own seed (the host's, carried through edits) — absent,
|
|
80
|
+
* it is derived from `noteSeed` and the index.
|
|
81
|
+
*/
|
|
82
|
+
export declare function layoutText(text: string, box: {
|
|
83
|
+
readonly w: number;
|
|
84
|
+
readonly h: number;
|
|
85
|
+
}, law: HandLaw, metrics: HandMetrics, noteSeed?: number, seeds?: ArrayLike<number>): HandLayout;
|
|
86
|
+
/** The caret before `index`: its left edge on the baseline, and its extent above and below. */
|
|
87
|
+
export declare function caretAt(L: HandLayout, index: number): {
|
|
88
|
+
readonly x: number;
|
|
89
|
+
readonly y: number;
|
|
90
|
+
readonly above: number;
|
|
91
|
+
readonly below: number;
|
|
92
|
+
};
|
|
93
|
+
/** The box a glyph's ink can reach (its advance wide, the face's box tall, grown by the hand's jitter), note units — what the wipe reveals. */
|
|
94
|
+
export declare function glyphBox(L: HandLayout, g: HandGlyph): {
|
|
95
|
+
readonly x0: number;
|
|
96
|
+
readonly y0: number;
|
|
97
|
+
readonly x1: number;
|
|
98
|
+
readonly y1: number;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* The hand's seeds carried through an edit: the common prefix and suffix of
|
|
102
|
+
* the old and new text keep their seeds, the inserted run gets fresh ones from
|
|
103
|
+
* `fresh()`. Returns the new seeds and the inserted range [from, to).
|
|
104
|
+
*/
|
|
105
|
+
export declare function carrySeeds(oldText: string, oldSeeds: ArrayLike<number>, newText: string, fresh: () => number): {
|
|
106
|
+
seeds: number[];
|
|
107
|
+
from: number;
|
|
108
|
+
to: number;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* The HAND — how the pen writes on the paper (STICKY.md §3; `paper/text.ts`). The face is
|
|
112
|
+
* the host's (the lab's Caveat, an OFL hand); its size is in world units; the jitter is
|
|
113
|
+
* each glyph's own — a tilt, a rise, a size, a pressure — and the line wanders slowly.
|
|
114
|
+
* The wipe is how a typed glyph arrives: revealed left to right in `wipeMs`, the pen's stroke.
|
|
115
|
+
*/
|
|
116
|
+
export declare const HAND: {
|
|
117
|
+
readonly size: 24;
|
|
118
|
+
readonly lineHeight: 1.16;
|
|
119
|
+
readonly pad: 16;
|
|
120
|
+
readonly jitter: {
|
|
121
|
+
readonly rot: 0.028;
|
|
122
|
+
readonly rise: 0.03;
|
|
123
|
+
readonly scale: 0.05;
|
|
124
|
+
readonly press: readonly [number, number];
|
|
125
|
+
};
|
|
126
|
+
readonly wander: {
|
|
127
|
+
readonly amp: 0.022;
|
|
128
|
+
readonly period: 9;
|
|
129
|
+
};
|
|
130
|
+
readonly wipeMs: 110;
|
|
131
|
+
};
|
|
132
|
+
/** The pens a hand writes with (STICKY.md §3) — names; the inks are the host's (the note's, and the desk calendar's lines). */
|
|
133
|
+
export declare const PENS: readonly ["felt", "ball", "fountain", "red"];
|
|
134
|
+
export type PenName = (typeof PENS)[number];
|
|
135
|
+
/** A face: its family and weight, and the file it loads from (absent = the platform's own). */
|
|
136
|
+
export interface FaceSpec {
|
|
137
|
+
readonly family: string;
|
|
138
|
+
readonly weight: number;
|
|
139
|
+
readonly url?: string;
|
|
140
|
+
}
|
|
141
|
+
/** The hand's faces by name (STICKY.md §3) — the families and weights; the app supplies the files (desk/host/ink.ts `penFaces`). */
|
|
142
|
+
export declare const PEN_FACES: Readonly<Record<string, Omit<FaceSpec, "url">>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { StructBuffer } from "../engine/struct";
|
|
2
|
+
/** What a pass keeps beside a buffer it writes change-only: the bytes the GPU holds (sized to the buffer). */
|
|
3
|
+
export declare const sentBytes: (size: number) => Uint8Array;
|
|
4
|
+
/**
|
|
5
|
+
* Write `block` (its first `elements`, or all) into `buffer` at 0 only when its bytes differ from `sent` — which then holds
|
|
6
|
+
* them. Returns whether it wrote.
|
|
7
|
+
*/
|
|
8
|
+
export declare function writeChanged(queue: GPUQueue, buffer: GPUBuffer, block: StructBuffer<string>, sent: Uint8Array, elements?: number): boolean;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { GlyphAtlasMeta } from "../mat/layout";
|
|
2
|
+
export { type Box, type FadeIn, type Lod, lod, type View } from "../lattice/lod";
|
|
3
|
+
export { type LineLaw, type LineWeight, lineWeight } from "../lattice/line";
|
|
4
|
+
export type { RulerLaw } from "../lattice/ruler";
|
|
5
|
+
export { DEFAULT_GRID, dressScale, type GridConfig } from "../mat/grid";
|
|
6
|
+
export { type GlyphAtlasMeta, GLYPHS, litByOwn, type MatConfig, type MatFrame, MatUniforms, type PlateName, type RulerConfig, type SlotLight } from "../mat/layout";
|
|
7
|
+
export type { Mat4 } from "../mat/projector";
|
|
8
|
+
/** The silhouette a kind's marks go around (`ObjectKind.frame`) — the marks' own type (marks/layout.ts). */
|
|
9
|
+
export type { MarkFrame } from "../marks/layout";
|
|
10
|
+
/**
|
|
11
|
+
* A SLOT'S MAT as a kind's pass reads it: what the slot lends every kind drawn in it — the mat's animated silhouette (the
|
|
12
|
+
* lamp's gobo through the wind, this slot's own), the blue noise, the rulers' glyph atlas and its metrics, and the version
|
|
13
|
+
* of those assets (a pass rebinds when it turns over). `KindProgram.create` makes a kind's root pass on the root's; every
|
|
14
|
+
* other slot's pass is `spawn`ed onto that slot's. The ground's `CuttingMat` is the one there is; a kind never makes one.
|
|
15
|
+
*/
|
|
16
|
+
export interface MatPass {
|
|
17
|
+
/**
|
|
18
|
+
* The slot's ONE VIEW BLOCK (design-016 K-L3): a `MatUniforms` buffer the slot writes once a frame — the camera and box, the
|
|
19
|
+
* clocks, the lamp's gobo, the night, the portal chain, the objects' presence (`view.w`; the mat's own is `presence.x`) — which every kind pass binds at
|
|
20
|
+
* `@group(0) @binding(0)` as `u` (`kitWgsl`'s `view` piece). A kind never writes it and never keeps a copy.
|
|
21
|
+
*/
|
|
22
|
+
readonly view: GPUBuffer;
|
|
23
|
+
/** The slot's animated gobo silhouette (r8, PLATE_SIZE²) — what an object's shadow and dapple sample. */
|
|
24
|
+
readonly silhouette: GPUTextureView;
|
|
25
|
+
/** The blue-noise tile (NOISE_SIZE², shared by every slot). */
|
|
26
|
+
readonly noiseTexture: GPUTexture;
|
|
27
|
+
/** The rulers' glyph atlas (a 1×1 empty cell until a host uploads one) and its metrics. */
|
|
28
|
+
readonly glyphTexture: GPUTexture;
|
|
29
|
+
readonly glyphs: GlyphAtlasMeta;
|
|
30
|
+
/** Turns over whenever a plate, the noise or the glyphs land: a pass holding a bind group over them rebinds. */
|
|
31
|
+
readonly assetVersion: number;
|
|
32
|
+
/**
|
|
33
|
+
* The view block's bytes as the slot last uploaded them, and the key of what the silhouette holds (K7a): a layered kind whose
|
|
34
|
+
* layer was drawn from the same bytes and key, with nothing of its own moved, lays it again without drawing it. Absent (a host's
|
|
35
|
+
* own mat): the layer is always drawn.
|
|
36
|
+
*/
|
|
37
|
+
readonly viewBytes?: Uint8Array;
|
|
38
|
+
readonly silhouetteKey?: number;
|
|
39
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ComposeOptions } from "../engine/shader";
|
|
2
|
+
import { type ShaderText } from "../shaders";
|
|
3
|
+
export { type ShaderText, shaderText } from "../shaders";
|
|
4
|
+
/** The kit's pieces of WGSL (below, in compose order). */
|
|
5
|
+
export type KitWgslPiece = "view" | "portal" | "sdf" | "light" | "ruler" | "book";
|
|
6
|
+
/** A name of the kit's WGSL: a piece, or another name for one (`lamp`, `gobo`, `night` and `noise` are `light`). */
|
|
7
|
+
export type KitWgslName = KitWgslPiece | "lamp" | "gobo" | "night" | "noise";
|
|
8
|
+
/** The .wgsl file behind each of the kit's module pieces — what a host's `ShaderText` is asked for. */
|
|
9
|
+
export declare const KIT_WGSL_FILES: Readonly<Partial<Record<KitWgslPiece, string>>>;
|
|
10
|
+
/**
|
|
11
|
+
* A kind's program with the kit's named pieces before its own: the kit's structs, then its modules (each labelled by its
|
|
12
|
+
* file, as a kind's own map labelled it), in the kit's order; then the kind's `own` structs, modules and entry. `text` is
|
|
13
|
+
* the host's (default: the generated module). An unknown name throws — a misspelt piece never composes silently.
|
|
14
|
+
*/
|
|
15
|
+
export declare function kitWgsl(names: readonly KitWgslName[], own: ComposeOptions, text?: ShaderText): ComposeOptions;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type FadeIn } from "./lod";
|
|
2
|
+
export interface LineLaw {
|
|
3
|
+
/** Half-widths at the window's top and a decade above it, DEVICE px (the reference's hairlines). */
|
|
4
|
+
readonly thin: number;
|
|
5
|
+
readonly thick: number;
|
|
6
|
+
/** Coverage alphas at the same two points. */
|
|
7
|
+
readonly alphaThin: number;
|
|
8
|
+
readonly alphaThick: number;
|
|
9
|
+
}
|
|
10
|
+
export interface LineWeight {
|
|
11
|
+
readonly halfWidth: number;
|
|
12
|
+
readonly alpha: number;
|
|
13
|
+
}
|
|
14
|
+
/** mat.wgsl `line_weight`, for a rung whose on-screen cell is `cellPx` (CSS px). */
|
|
15
|
+
export declare function lineWeight(cellPx: number, fadeIn: FadeIn, law: LineLaw): LineWeight;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export declare const BASE_SPACING = 20;
|
|
2
|
+
export declare const LOD_TARGET = 20;
|
|
3
|
+
export declare const ZOOM_MIN = 1e-8;
|
|
4
|
+
export declare const ZOOM_MAX = 100000000;
|
|
5
|
+
export interface View {
|
|
6
|
+
readonly camX: number;
|
|
7
|
+
readonly camY: number;
|
|
8
|
+
readonly zoom: number;
|
|
9
|
+
/** CSS px — the attachment. */
|
|
10
|
+
readonly width: number;
|
|
11
|
+
readonly height: number;
|
|
12
|
+
/**
|
|
13
|
+
* The slot's BOX on the attachment, CSS px (PORTAL.md §2.3): what is
|
|
14
|
+
* culled — a mini mat's face for a nested slot.
|
|
15
|
+
* Absent = the whole attachment. Positions never change with it: a site
|
|
16
|
+
* lands where it lands under the camera; the box only decides which sites
|
|
17
|
+
* exist. A root slot's box is the attachment and every number is what it
|
|
18
|
+
* always was.
|
|
19
|
+
*/
|
|
20
|
+
readonly box?: Box;
|
|
21
|
+
}
|
|
22
|
+
export interface Box {
|
|
23
|
+
readonly x: number;
|
|
24
|
+
readonly y: number;
|
|
25
|
+
readonly w: number;
|
|
26
|
+
readonly h: number;
|
|
27
|
+
}
|
|
28
|
+
/** The effective box: the view's own, or the attachment. */
|
|
29
|
+
export declare const boxOf: (v: View) => Box;
|
|
30
|
+
/** The `box` record the uniform blocks carry: x, y, w, h. */
|
|
31
|
+
export declare const boxValues: (v: View) => number[];
|
|
32
|
+
export interface Lod {
|
|
33
|
+
readonly k0: number;
|
|
34
|
+
readonly fade: number;
|
|
35
|
+
readonly fine: number;
|
|
36
|
+
readonly mid: number;
|
|
37
|
+
readonly coarse: number;
|
|
38
|
+
readonly wrapPeriod: number;
|
|
39
|
+
}
|
|
40
|
+
export declare const wrap: (v: number, p: number) => number;
|
|
41
|
+
/**
|
|
42
|
+
* How a rung presents itself: ONE size for every rung, and a rung's alpha is
|
|
43
|
+
* `smoothstep(fadeIn, cellPx)` of its OWN cell — so a decade wrap (the fine rung
|
|
44
|
+
* becoming the mid rung at the same cell) is continuous by construction, and
|
|
45
|
+
* nothing is drawn below `fadeIn[0]` px of pitch: the product's classic-grid law
|
|
46
|
+
* (`worldGrid.fadeIn`). The prototype's size LADDER (fine 0.55× · mid 0.85→1.25×
|
|
47
|
+
* · coarse 1.55×, the fine rung's alpha the decade fade — every tenth site bigger,
|
|
48
|
+
* a size pop at every wrap) was retired on 2026-09-04; nothing of it remains.
|
|
49
|
+
*/
|
|
50
|
+
export type FadeIn = readonly [number, number];
|
|
51
|
+
export declare const smoothstep: (a: number, b: number, x: number) => number;
|
|
52
|
+
export declare function lod(v: View): Lod;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { type Lod } from "./lod";
|
|
2
|
+
export interface RulerLaw {
|
|
3
|
+
/** CSS px: the band's width, and the mat's unprinted margin between the viewport's edge and the frame. */
|
|
4
|
+
readonly band: number;
|
|
5
|
+
readonly margin: number;
|
|
6
|
+
/** CSS px: the ticks' lengths — minor · medium · major. */
|
|
7
|
+
readonly tick: readonly [number, number, number];
|
|
8
|
+
/** CSS px: the width of every printed line — the ticks and the frame. */
|
|
9
|
+
readonly line: number;
|
|
10
|
+
/** Ink presence of the frame's lines, the ticks and the labels (1 = the mat's cream, full). */
|
|
11
|
+
readonly alpha: {
|
|
12
|
+
readonly frame: number;
|
|
13
|
+
readonly tick: number;
|
|
14
|
+
readonly label: number;
|
|
15
|
+
};
|
|
16
|
+
/** CSS px of pitch between which the fine rung's ticks (and its fifths) fade in. */
|
|
17
|
+
readonly ticksFrom: readonly [number, number];
|
|
18
|
+
/** CSS px of pitch between which a level's labels fade in. */
|
|
19
|
+
readonly labelsFrom: readonly [number, number];
|
|
20
|
+
/** The text: its size (CSS px — the atlas's em), its inset from the outer line, its gap after the tick. */
|
|
21
|
+
readonly text: {
|
|
22
|
+
readonly size: number;
|
|
23
|
+
readonly top: number;
|
|
24
|
+
readonly gap: number;
|
|
25
|
+
};
|
|
26
|
+
/** The most characters a label may have; a level whose labels would be wider than its pitch carries none. */
|
|
27
|
+
readonly maxChars: number;
|
|
28
|
+
}
|
|
29
|
+
/** One level of sites, with everything the pass draws for it this frame. */
|
|
30
|
+
export interface RulerLevel {
|
|
31
|
+
/** World units between sites. */
|
|
32
|
+
readonly spacing: number;
|
|
33
|
+
/** CSS px between sites. */
|
|
34
|
+
readonly pitch: number;
|
|
35
|
+
/** A site's value is `index · mult · 10^exp` (index = its count from the world origin). */
|
|
36
|
+
readonly mult: 1 | 2;
|
|
37
|
+
readonly exp: number;
|
|
38
|
+
/** CSS px; the label pulls a tick to the major length as it appears. */
|
|
39
|
+
readonly tickLen: number;
|
|
40
|
+
readonly tickAlpha: number;
|
|
41
|
+
readonly labelAlpha: number;
|
|
42
|
+
/** The lattice's wrap period over this spacing — an exact integer (100 · 20 · 10 · 2 · 1). */
|
|
43
|
+
readonly perWrap: number;
|
|
44
|
+
}
|
|
45
|
+
export type RulerLevels = readonly [RulerLevel, RulerLevel, RulerLevel, RulerLevel, RulerLevel];
|
|
46
|
+
/**
|
|
47
|
+
* The five levels this frame. `maxAbs` is the largest |value| a label on
|
|
48
|
+
* screen can carry (`labelReach`) — a level whose widest label would not fit
|
|
49
|
+
* its pitch carries none, so labels never overlap whatever the coordinates.
|
|
50
|
+
*/
|
|
51
|
+
export declare function rulerLevels(l: Lod, zoom: number, law: RulerLaw, maxAbs?: number): RulerLevels;
|
|
52
|
+
/** A mono glyph's advance as a fraction of its em — the layout's estimate (the atlas carries the measured one; SF Mono is 0.6). */
|
|
53
|
+
export declare const ADVANCE_EM = 0.6;
|
|
54
|
+
/** The finest level that carries labels this frame, or -1 — the level the pass lays text out on. */
|
|
55
|
+
export declare function finestLabelled(levels: RulerLevels): number;
|
|
56
|
+
/** The lattice's wrap count of a camera coordinate: `cam = wraps · period + phase`, exact in doubles (lod.ts wraps the phase). */
|
|
57
|
+
export declare const wrapsOf: (cam: number, period: number) => number;
|
|
58
|
+
/**
|
|
59
|
+
* The text of a site's label: `index · mult · 10^exp`, plain digits — no
|
|
60
|
+
* suffixes (a "1k" that reads "1000" at the next zoom would change under the
|
|
61
|
+
* eye), and no trailing zeros in a fraction ("1.0" is "1" at every level, so
|
|
62
|
+
* a label's text never changes while it is visible). ruler.wgsl `ruler_char`
|
|
63
|
+
* is the same arithmetic per character.
|
|
64
|
+
*/
|
|
65
|
+
export declare function formatLabel(index: number, mult: 1 | 2, exp: number): string;
|
|
66
|
+
/** How many characters the widest label of magnitude ≤ `maxAbs` takes at this level (the sign included). */
|
|
67
|
+
export declare function labelChars(maxAbs: number, mult: 1 | 2, exp: number): number;
|
|
68
|
+
/** The largest |world coordinate| a label along an axis can show: the far edge of the band's reach. */
|
|
69
|
+
export declare function labelReach(cam: number, zoom: number, span: number): number;
|
|
70
|
+
export interface RulerLabel {
|
|
71
|
+
/** The site's world coordinate and its count from the origin at the finest labelled level. */
|
|
72
|
+
readonly value: number;
|
|
73
|
+
readonly index: number;
|
|
74
|
+
/** CSS px along the axis where the site (its tick) stands. */
|
|
75
|
+
readonly at: number;
|
|
76
|
+
readonly text: string;
|
|
77
|
+
readonly alpha: number;
|
|
78
|
+
/** The site's level — the coarsest it lies on. */
|
|
79
|
+
readonly level: number;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The labels along one axis this frame, in order — the CPU mirror of what
|
|
83
|
+
* ruler.wgsl lays out, site for site: the finest labelled level's sites from
|
|
84
|
+
* the band's inner corner to the frame's far line, each with the alpha of the
|
|
85
|
+
* coarsest level it lies on. `cam` is the camera's UNWRAPPED coordinate;
|
|
86
|
+
* `span` the attachment's extent along the axis (CSS px).
|
|
87
|
+
*/
|
|
88
|
+
export declare function labelsAlong(cam: number, zoom: number, span: number, levels: RulerLevels, law: RulerLaw): RulerLabel[];
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { type LaserCamera, type WorldBar, type WorldBox, type WorldGuide } from "./laser";
|
|
2
|
+
import { type MarkBox, type MarkFrame, type MarksInput } from "./layout";
|
|
3
|
+
/** One object as its marks need it — the builder's cached facts and flux, or a still's. */
|
|
4
|
+
export interface MarkedObject {
|
|
5
|
+
/** Its silhouette AS DRAWN, world units (the kind's `frame` on this frame's geometry). */
|
|
6
|
+
readonly frame: MarkFrame;
|
|
7
|
+
/** ICE's rect (Position + Size), unturned, world units — what the snap aligned and the vellum touches. */
|
|
8
|
+
readonly rect: WorldBox;
|
|
9
|
+
readonly selected: boolean;
|
|
10
|
+
/** Taped down (`Locked`): no knobs, and the vellum passes over it. */
|
|
11
|
+
readonly locked: boolean;
|
|
12
|
+
/** Carried (`Grab`): its knobs hide, and it is the laser's dragged set. */
|
|
13
|
+
readonly moving: boolean;
|
|
14
|
+
readonly resizable: boolean;
|
|
15
|
+
/** The selection's clocks: the lock-on's LINEAR progress and the presence (1 at rest; the leave fades it). */
|
|
16
|
+
readonly lock: {
|
|
17
|
+
readonly t: number;
|
|
18
|
+
readonly a: number;
|
|
19
|
+
};
|
|
20
|
+
/** The tape's clocks: each strip's press (0..1, linear) and the tape's presence (0 = none drawn). */
|
|
21
|
+
readonly tape: {
|
|
22
|
+
readonly press: readonly [number, number];
|
|
23
|
+
readonly a: number;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export interface MarksState {
|
|
27
|
+
readonly view: MarksInput["view"];
|
|
28
|
+
/** The ROOT slot's camera (`Camera.x/y` = the view's world top-left). */
|
|
29
|
+
readonly cam: LaserCamera;
|
|
30
|
+
readonly night: boolean;
|
|
31
|
+
/** The desk's objects in paint order. */
|
|
32
|
+
readonly objects: readonly MarkedObject[];
|
|
33
|
+
/** Several's union: its lock-on (linear) and presence. */
|
|
34
|
+
readonly union: {
|
|
35
|
+
readonly t: number;
|
|
36
|
+
readonly a: number;
|
|
37
|
+
};
|
|
38
|
+
/** The vellum being drawn: its WORLD rect (core's `MarqueeBuffer.rect`) and the cursor on screen. */
|
|
39
|
+
readonly marquee: {
|
|
40
|
+
readonly rect: WorldBox;
|
|
41
|
+
readonly pointer: {
|
|
42
|
+
readonly x: number;
|
|
43
|
+
readonly y: number;
|
|
44
|
+
} | null;
|
|
45
|
+
} | null;
|
|
46
|
+
/** The vellum released: its last rect ON SCREEN and the fold's linear progress. */
|
|
47
|
+
readonly fold: {
|
|
48
|
+
readonly rect: MarkBox;
|
|
49
|
+
readonly t: number;
|
|
50
|
+
} | null;
|
|
51
|
+
/** The snap's facts, world units (core's `GuideLine` / `SpacingBar`). */
|
|
52
|
+
readonly guides: readonly WorldGuide[];
|
|
53
|
+
readonly bars: readonly WorldBar[];
|
|
54
|
+
readonly strike: number;
|
|
55
|
+
/** The rulers printed on this desk (their margin and band, CSS px), or null. */
|
|
56
|
+
readonly ruler: {
|
|
57
|
+
readonly margin: number;
|
|
58
|
+
readonly band: number;
|
|
59
|
+
} | null;
|
|
60
|
+
}
|
|
61
|
+
/** The vellum's world rect, normalised (a drag may run any way). */
|
|
62
|
+
export declare const normalBox: (b: WorldBox) => WorldBox;
|
|
63
|
+
/** What the vellum touches — never the tape (Q-g); core's `queryHits` on the same rects. */
|
|
64
|
+
export declare function vellumHits(objects: readonly MarkedObject[], rect: WorldBox): MarkedObject[];
|
|
65
|
+
export declare function assembleMarks(s: MarksState): MarksInput;
|