@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,388 @@
|
|
|
1
|
+
import type { Surface } from "./engine/device";
|
|
2
|
+
import { CardPass } from "./card/card";
|
|
3
|
+
import { HoldPass } from "./hold/focus";
|
|
4
|
+
import type { HoldShaders } from "./hold/shaders";
|
|
5
|
+
import { type KindPass, type KindProgram, type RenderTarget, type StratumName } from "./kind";
|
|
6
|
+
import { type View } from "./lattice/lod";
|
|
7
|
+
import type { MatLight } from "./mat/night";
|
|
8
|
+
import { type GridConfig, type GridStats, type SlotFrame } from "./mat/grid";
|
|
9
|
+
import { CuttingMat } from "./mat/mat-pass";
|
|
10
|
+
import type { MatShaders } from "./mat/shaders";
|
|
11
|
+
import type { MarksInput } from "./marks/layout";
|
|
12
|
+
import { MarksPass } from "./marks/pass";
|
|
13
|
+
import type { MarksShaders } from "./marks/shaders";
|
|
14
|
+
import { type TrayFrameInputs, TrayPass } from "./tray/pass";
|
|
15
|
+
import type { TrayShaders } from "./tray/shaders";
|
|
16
|
+
import { TraySlots } from "./tray/specimens";
|
|
17
|
+
import { type Presentation } from "./nav/portal";
|
|
18
|
+
import type { GroundTheme } from "./theme";
|
|
19
|
+
export type { CardBinding, CardMaterial, KindExtra, KindPass, KindProgram, RenderTarget, SlotContext, StratumName } from "./kind";
|
|
20
|
+
export { STRATA } from "./kind";
|
|
21
|
+
export type { MarkBar, MarkBox, MarkFrame, MarkGuide, MarkMarquee, MarkObject, MarkRuler, MarksInput, MarkTape, MarkUnion } from "./marks/layout";
|
|
22
|
+
export { MARKS_SHADER_FILES, marksShaders } from "./marks/shaders";
|
|
23
|
+
export type { TrayFrameInputs } from "./tray/pass";
|
|
24
|
+
export { TRAY_SHADER_FILES, trayShaders } from "./tray/shaders";
|
|
25
|
+
export interface GroundOptions {
|
|
26
|
+
/**
|
|
27
|
+
* The device the HOST owns — the engine's (`acquireCompositorDevice()`, handed to the layer through its
|
|
28
|
+
* context) or the layer's own (`engine/device.ts` `acquire()`, as the oracle's is). The ground never
|
|
29
|
+
* makes one: every texture the compose pass samples must live on the same device.
|
|
30
|
+
*/
|
|
31
|
+
readonly device: GPUDevice;
|
|
32
|
+
/**
|
|
33
|
+
* The swap chain the frames go into — the HOST makes it (`surface(device, canvas)` from
|
|
34
|
+
* `@ice/desk`'s src/host/, the one module that names a canvas; a test's fake), so this composition
|
|
35
|
+
* root never touches the DOM (design-015 §3 `desk-dom-free`, D2a-world).
|
|
36
|
+
*/
|
|
37
|
+
readonly surface: Surface;
|
|
38
|
+
/** The cutting mat (mat/mat-pass.ts) — the ground's own: every slot draws it first. */
|
|
39
|
+
readonly mat: MatShaders;
|
|
40
|
+
/**
|
|
41
|
+
* The kinds this ground draws — its REGISTRY (kind.ts; the desk's own are `DESK_KINDS`, `@ice/desk/kinds`).
|
|
42
|
+
* Names are unique. Each kind's pass is made on the root's mat; the kinds prepare in this order and draw
|
|
43
|
+
* stratum by stratum, then in each slot's paint order.
|
|
44
|
+
*/
|
|
45
|
+
readonly kinds: readonly KindProgram[];
|
|
46
|
+
/**
|
|
47
|
+
* The desk's chrome (marks/pass.ts; design-015 §7, D4a): the marks pass, drawn in the ROOT's pass after every
|
|
48
|
+
* stratum — the selection's brackets, the vellum, the laser, the tape — when a frame names its `marks`. Absent =
|
|
49
|
+
* a ground that draws no chrome.
|
|
50
|
+
*/
|
|
51
|
+
readonly marks?: MarksShaders;
|
|
52
|
+
/**
|
|
53
|
+
* The hand (hold/focus.ts; design-015 §8, D4b): the focus behind an object in hand and the object over it, when a
|
|
54
|
+
* frame names its `held`. Absent = a ground that never picks anything up (a frame's `held` is then ignored).
|
|
55
|
+
*/
|
|
56
|
+
readonly hold?: HoldShaders;
|
|
57
|
+
/**
|
|
58
|
+
* The pegboard tray (tray/pass.ts; design-017, K3): the drawer, drawn in the ROOT's pass after the marks when a frame names its
|
|
59
|
+
* `tray`. Absent = a ground with no tray.
|
|
60
|
+
*/
|
|
61
|
+
readonly tray?: TrayShaders;
|
|
62
|
+
}
|
|
63
|
+
/** A layer a host rendered first, laid on the mat inside the ground's pass (it sets its own scissor; the ground restores the slot's). */
|
|
64
|
+
export interface Underlay {
|
|
65
|
+
draw(pass: GPURenderPassEncoder): void;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* One object on a desk as the ground takes it: its kind's name (a registered one) and the record that kind's pass draws — and
|
|
69
|
+
* its KEY (D6, design-015 §4.3): stable across frames (the builder's entity; a ghost's negated), so the kind's persistent records
|
|
70
|
+
* keep the object's slot and write it only when the record object changed. Absent: the record is packed afresh every frame.
|
|
71
|
+
*/
|
|
72
|
+
export interface SlotObject {
|
|
73
|
+
readonly kind: string;
|
|
74
|
+
readonly record: unknown;
|
|
75
|
+
readonly key?: number | undefined;
|
|
76
|
+
}
|
|
77
|
+
/** One desk's ground: its camera, grid, objects and presentation — the root's, a departed desk's, or a mini mat's inside. */
|
|
78
|
+
export interface SlotInputs extends SlotFrame {
|
|
79
|
+
/** The grid; the root may leave it unset and set `ground.grid` instead — every other slot names its own. */
|
|
80
|
+
readonly grid?: GridConfig;
|
|
81
|
+
/**
|
|
82
|
+
* Things drawn ON THE MAT by passes of their own, beneath everything else on the desk
|
|
83
|
+
* (CALENDAR.md: the desk calendar — the host renders its layer first, the ground lays it here).
|
|
84
|
+
*/
|
|
85
|
+
readonly underlays?: readonly Underlay[];
|
|
86
|
+
/**
|
|
87
|
+
* The objects on this desk in PAINT ORDER, lowest first — the caller sorts: strata first (the ground draws
|
|
88
|
+
* stratum by stratum whatever the list says), then its own order within each. A kind's records are its
|
|
89
|
+
* objects, in this order; every kind named must be registered.
|
|
90
|
+
*/
|
|
91
|
+
readonly objects?: readonly SlotObject[];
|
|
92
|
+
/** The live insides of this desk's sheets (MINIMAT.md §3): each drawn right after the object `at` names. */
|
|
93
|
+
readonly portals?: readonly PortalInputs[];
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* A mini mat's inside through its face (PORTAL.md §2.1, MINIMAT.md §3): `present` carries
|
|
97
|
+
* the presence (its opacity — the gate's answer) and the face (its clip); `view` may leave
|
|
98
|
+
* `box` unset — the ground sizes the slot's box from the clip.
|
|
99
|
+
*/
|
|
100
|
+
export interface PortalInputs extends SlotInputs {
|
|
101
|
+
readonly grid: GridConfig;
|
|
102
|
+
/** The mini mat's index in the parent's `objects` (paint order): the slot draws just AFTER it, over its face. */
|
|
103
|
+
readonly at: number;
|
|
104
|
+
}
|
|
105
|
+
/** The departed desk's ground for one flight frame: its own camera, grid, objects and presentation. */
|
|
106
|
+
export interface OutgoingInputs extends SlotInputs {
|
|
107
|
+
readonly grid: GridConfig;
|
|
108
|
+
/** design-006's z-rule for a FROZEN flight: under on enter, over on exit. */
|
|
109
|
+
readonly order: "under" | "over";
|
|
110
|
+
/**
|
|
111
|
+
* ENTER through a live portal (PORTAL.md §2.4): the mini mat's index in the DEPARTED desk's
|
|
112
|
+
* `objects` — the two desks draw as one tree, the arriving one through the mini mat's face,
|
|
113
|
+
* so the objects over the mini mat stay over the inside and fade with their desk (a live
|
|
114
|
+
* portal of the departed desk at the same index is neither prepared nor drawn: the arriving
|
|
115
|
+
* desk is that face). Absent = two whole slots, `order` decides: a frozen flight, and every
|
|
116
|
+
* EXIT — the departed inside draws OVER the whole parent (whose own live portal shows the
|
|
117
|
+
* same pixels under it) and fades onto them at the landing.
|
|
118
|
+
*/
|
|
119
|
+
readonly at?: number;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* THE HAND for one frame (design-015 §8; D4b — the builder makes it, the ground draws it): the one object in hand as a slot
|
|
123
|
+
* of its own — its record, the pose's CAMERA (`view`) and its grid (no dapple in hand) — drawn by its kind's own pass over the
|
|
124
|
+
* desk out of focus. `e` is the carry amount (the focus follows it); `blur` the radius the ONE blur is made at (CSS px: 14, a
|
|
125
|
+
* phone's 10); `dim` the desk's dim behind (already by the carry); `filter` the reading light on the hand (1, 1 by day);
|
|
126
|
+
* `light` the hand's own light (the day's mixed in by night); `stamp` the desk copy's identity — while it stands, the blurred
|
|
127
|
+
* desk is reused (rendered ONCE per settled state, the held object alone redrawing).
|
|
128
|
+
*/
|
|
129
|
+
export interface HeldFrameInputs {
|
|
130
|
+
readonly object: SlotObject;
|
|
131
|
+
/** What rides with it (D3t-c — a calendar's stuck notes): drawn in the hand's slot after it, under the same camera. */
|
|
132
|
+
readonly riders?: readonly SlotObject[];
|
|
133
|
+
readonly view: View & {
|
|
134
|
+
readonly dpr: number;
|
|
135
|
+
};
|
|
136
|
+
readonly grid: GridConfig;
|
|
137
|
+
readonly e: number;
|
|
138
|
+
readonly blur: number;
|
|
139
|
+
readonly dim: number;
|
|
140
|
+
readonly filter: {
|
|
141
|
+
readonly saturate: number;
|
|
142
|
+
readonly brightness: number;
|
|
143
|
+
};
|
|
144
|
+
readonly light: MatLight;
|
|
145
|
+
readonly stamp: string;
|
|
146
|
+
}
|
|
147
|
+
export interface GroundFrameInputs extends SlotInputs {
|
|
148
|
+
/** The theme in force (`theme.ts`): the clear colour, the selection's colour and the mat's light (the Sun or the Moon) come from it. */
|
|
149
|
+
readonly theme: GroundTheme;
|
|
150
|
+
/** Present only while a nav flight is on. */
|
|
151
|
+
readonly outgoing?: OutgoingInputs;
|
|
152
|
+
/** The desk's marks this frame, in screen px (marks/layout.ts) — stratum 5, over everything; absent = none. */
|
|
153
|
+
readonly marks?: MarksInput;
|
|
154
|
+
/** The object in hand (design-015 §8, D4b) while one is held or flying home; absent = the desk as it is. At `e` 0 the frame is the rest frame, byte for byte. */
|
|
155
|
+
readonly held?: HeldFrameInputs;
|
|
156
|
+
/** The pegboard drawer this frame (design-017 — the renderer's flux: its slide, its shown scroll), over the marks; absent = none. Never drawn over the hand. */
|
|
157
|
+
readonly tray?: TrayFrameInputs;
|
|
158
|
+
}
|
|
159
|
+
export interface GroundStats extends GridStats {
|
|
160
|
+
/** The root's records drawn this frame, by kind name — every registered kind, 0 where it had none. */
|
|
161
|
+
readonly kinds: Readonly<Record<string, number>>;
|
|
162
|
+
/** The departed slot's grid while a flight is on. */
|
|
163
|
+
readonly outgoing: GridStats | null;
|
|
164
|
+
/** Live portals drawn this frame, the root's and the departed desk's together. */
|
|
165
|
+
readonly portals: number;
|
|
166
|
+
/** The records the kinds' CAPS turned away this frame, by kind name, every slot's (absent: none) — resolved and NOT drawn (D7). */
|
|
167
|
+
readonly dropped?: Readonly<Record<string, number>>;
|
|
168
|
+
}
|
|
169
|
+
/** One registered kind as a slot holds it: the registry's name and stratum, and the slot's own pass (and whether it lays a composite — `KindProgram.composite`). */
|
|
170
|
+
export interface SlotKind {
|
|
171
|
+
readonly name: string;
|
|
172
|
+
readonly stratum: StratumName;
|
|
173
|
+
readonly pass: KindPass;
|
|
174
|
+
readonly composite?: boolean;
|
|
175
|
+
}
|
|
176
|
+
/** The passes one slot owns: the mat's, and every registered kind's by name, in registration order. The root's are the ground's; the pool spawns the rest on the same pipelines. */
|
|
177
|
+
export interface SlotSet {
|
|
178
|
+
readonly mat: CuttingMat;
|
|
179
|
+
readonly kinds: ReadonlyMap<string, SlotKind>;
|
|
180
|
+
/** The slot's FLAT-CARD pass (K7b, card/card.ts) over its kinds — absent when no registered kind declares a card material. */
|
|
181
|
+
readonly card?: CardPass;
|
|
182
|
+
}
|
|
183
|
+
/** One slot's passes for `drawFrame` — the ground's own, or the oracle's. A parent carries its nested slots. */
|
|
184
|
+
export interface DrawSlot {
|
|
185
|
+
readonly mat: CuttingMat;
|
|
186
|
+
readonly present?: Presentation | undefined;
|
|
187
|
+
/** BARE: no mat is drawn — the hand's slot (D4b) lays its one object over a frame that is already there. */
|
|
188
|
+
readonly bare?: boolean | undefined;
|
|
189
|
+
/** Layers laid on the mat before everything (the calendar's). */
|
|
190
|
+
readonly underlays?: readonly Underlay[] | undefined;
|
|
191
|
+
/** The slot's kinds, prepared (its `SlotSet.kinds`): an object's kind names its stratum and its pass. */
|
|
192
|
+
readonly kinds: ReadonlyMap<string, SlotKind>;
|
|
193
|
+
/** The slot's objects in paint order — only their kinds matter to the draw: each kind's records are counted along them. */
|
|
194
|
+
readonly objects?: readonly {
|
|
195
|
+
readonly kind: string;
|
|
196
|
+
}[] | undefined;
|
|
197
|
+
/**
|
|
198
|
+
* The FLAT CARDS (K7b): each object's card in the card pass's list this frame (`route[i]`, −1 = its kind draws it) — a run of cards
|
|
199
|
+
* is one draw whatever kinds it interleaves. Absent: every object is its kind's.
|
|
200
|
+
*/
|
|
201
|
+
readonly card?: {
|
|
202
|
+
readonly pass: CardPass;
|
|
203
|
+
readonly route: Int32Array;
|
|
204
|
+
} | undefined;
|
|
205
|
+
/** Nested slots, each drawn right after the object `at` names (MINIMAT.md §3) — one that names no object here draws over them all. */
|
|
206
|
+
readonly children?: readonly {
|
|
207
|
+
readonly at: number;
|
|
208
|
+
readonly slot: DrawSlot;
|
|
209
|
+
}[] | undefined;
|
|
210
|
+
/** What the slot's grid did this frame. */
|
|
211
|
+
readonly stats: GridStats;
|
|
212
|
+
}
|
|
213
|
+
/** A slot at opacity 0 draws nothing: "source over" with alpha 0 leaves every pixel as it was. */
|
|
214
|
+
export declare const visible: (p: Presentation | undefined) => boolean;
|
|
215
|
+
/**
|
|
216
|
+
* The root slot's passes: the mat's (made first — every kind's pass is made on it) and every registered
|
|
217
|
+
* kind's, made in parallel on the root's mat, in registration order. Names must be unique and strata known.
|
|
218
|
+
* Shared by the ground and the Node oracle.
|
|
219
|
+
*/
|
|
220
|
+
export declare function createSlotSet(device: GPUDevice, format: GPUTextureFormat, mat: CuttingMat, programs: readonly KindProgram[]): Promise<SlotSet>;
|
|
221
|
+
/** Slots beyond the root, spawned on first use and reused every frame: `reset()` then `acquire()` per slot the frame needs. */
|
|
222
|
+
export declare class SlotPool {
|
|
223
|
+
private readonly slots;
|
|
224
|
+
private used;
|
|
225
|
+
private readonly root;
|
|
226
|
+
constructor(root: SlotSet);
|
|
227
|
+
reset(): void;
|
|
228
|
+
/** The next slot: on first use its mat spawned from the root's, then every registered kind's pass on that mat, in registration order. */
|
|
229
|
+
acquire(): SlotSet;
|
|
230
|
+
/** Slots spawned so far — the churn instrument. */
|
|
231
|
+
get size(): number;
|
|
232
|
+
dispose(): void;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Draw one slot into an open render pass: scissored to its portal (nothing
|
|
236
|
+
* outside it is shaded), skipped outright at opacity 0 — the mat, the layers on
|
|
237
|
+
* it, then the objects stratum by stratum: within a stratum in paint order, one
|
|
238
|
+
* `drawRange` per RUN of one kind (each kind counting its own records), the run
|
|
239
|
+
* cut after an object with a live inside — the inside over its face (restoring
|
|
240
|
+
* this slot's scissor), then that object's marks over the inside. Returns
|
|
241
|
+
* whether it drew.
|
|
242
|
+
*/
|
|
243
|
+
export declare function drawSlot(pass: GPURenderPassEncoder, size: {
|
|
244
|
+
readonly w: number;
|
|
245
|
+
readonly h: number;
|
|
246
|
+
}, dpr: number, slot: DrawSlot): boolean;
|
|
247
|
+
/**
|
|
248
|
+
* Record one frame into an open render pass: the root slot with its nested
|
|
249
|
+
* slots, and — while a flight is on — the departed slot: through the mini mat
|
|
250
|
+
* as one tree (`outgoing.at`), or whole, under or over, when the flight is
|
|
251
|
+
* frozen. Shared with the Node oracle so both hosts draw a frame through the
|
|
252
|
+
* same code. Returns each slot's grid stats (null = not drawn).
|
|
253
|
+
*/
|
|
254
|
+
export declare function drawFrame(pass: GPURenderPassEncoder, size: {
|
|
255
|
+
readonly w: number;
|
|
256
|
+
readonly h: number;
|
|
257
|
+
}, dpr: number, incoming: DrawSlot, outgoing?: (DrawSlot & {
|
|
258
|
+
readonly order: "under" | "over";
|
|
259
|
+
readonly at?: number | undefined;
|
|
260
|
+
}) | null): {
|
|
261
|
+
incoming: GridStats;
|
|
262
|
+
outgoing: GridStats | null;
|
|
263
|
+
};
|
|
264
|
+
/** What `prepareFrame` hands the draw: the two slots and the counts the stats report. */
|
|
265
|
+
export interface PreparedFrame {
|
|
266
|
+
readonly incoming: DrawSlot;
|
|
267
|
+
readonly outgoing: (DrawSlot & {
|
|
268
|
+
readonly order: "under" | "over";
|
|
269
|
+
readonly at?: number | undefined;
|
|
270
|
+
}) | null;
|
|
271
|
+
readonly portals: number;
|
|
272
|
+
/** The root's records that will draw, by kind name — every registered kind. */
|
|
273
|
+
readonly kinds: Readonly<Record<string, number>>;
|
|
274
|
+
/** What the kinds' caps turned away, by kind name, every slot's (absent: nothing) — `GroundStats.dropped` (D7). */
|
|
275
|
+
readonly dropped?: Readonly<Record<string, number>>;
|
|
276
|
+
/** K5a: the tray's specimens, one slot each, prepared — drawn over the board, inside its edge (`drawTray`); absent = none. */
|
|
277
|
+
readonly tray?: readonly DrawSlot[];
|
|
278
|
+
/** K5b: what the tray carries, one slot each, prepared — drawn over the drawer, whole (`drawTray`); absent = none. */
|
|
279
|
+
readonly carried?: readonly DrawSlot[];
|
|
280
|
+
}
|
|
281
|
+
/** Where `prepareFrame` finds a specimen's slot (tray/specimens.ts `TraySlots`): undefined while its kind's pass is being made. */
|
|
282
|
+
export interface TraySlotSource {
|
|
283
|
+
get(type: string, kind: string): SlotSet | undefined;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Upload one frame's records into its slots — the root's, each live portal's
|
|
287
|
+
* (from the pool), the departed desk's — run the mat's wind where its clock
|
|
288
|
+
* moved, and return the draw tree. Per slot, every registered kind prepares its
|
|
289
|
+
* own records (the slot's objects of that kind, in paint order), told which of
|
|
290
|
+
* them carries a live inside. Shared by the ground and the Node oracle. `grid`
|
|
291
|
+
* is the root's when its inputs name none.
|
|
292
|
+
*/
|
|
293
|
+
export declare function prepareFrame(encoder: GPUCommandEncoder, root: SlotSet, pool: SlotPool, inputs: GroundFrameInputs, grid?: GridConfig, target?: RenderTarget, traySlots?: TraySlotSource): PreparedFrame;
|
|
294
|
+
/**
|
|
295
|
+
* THE TRAY, drawn (design-017 §5, §8; K5a) — shared by `Ground.render` and the Node oracle: the drawer UNDER its specimens (the dim, its
|
|
296
|
+
* shadows, the board to its edge, the accessories), each specimen by its own kind through the drawer's face (inside the edge — the rim
|
|
297
|
+
* laid over them all retired, design-018 §2), their name tags (the marks' pills), then the VEIL over them all at the top (design-018
|
|
298
|
+
* rev 5: the plain board, whole in the header and fading out over its ramp — what hangs there fades into the board, never see-through
|
|
299
|
+
* over a hole); then what the tray carries, whole. Shut (p 0) the drawer draws nothing (its pass laid no quad) and only a carried copy
|
|
300
|
+
* is drawn. Leaves the scissor on the whole view.
|
|
301
|
+
*/
|
|
302
|
+
export declare function drawTray(pass: GPURenderPassEncoder, size: {
|
|
303
|
+
readonly w: number;
|
|
304
|
+
readonly h: number;
|
|
305
|
+
}, dpr: number, tray: TrayPass, slots: readonly DrawSlot[] | undefined, marks: MarksPass | null, carried?: readonly DrawSlot[]): void;
|
|
306
|
+
export declare class Ground {
|
|
307
|
+
readonly device: GPUDevice;
|
|
308
|
+
readonly surface: Surface;
|
|
309
|
+
/** The cutting mat — the root slot's; its plates, noise and glyph atlas are every slot's. */
|
|
310
|
+
readonly mat: CuttingMat;
|
|
311
|
+
/** The root slot's passes: the mat's and every registered kind's, by name (the registry, in registration order). */
|
|
312
|
+
readonly root: SlotSet;
|
|
313
|
+
/** Slots beyond the root — the departed desk's, the live insides of mini mats — spawned on first use. */
|
|
314
|
+
readonly pool: SlotPool;
|
|
315
|
+
/** The root's grid when a frame names none. */
|
|
316
|
+
grid: GridConfig;
|
|
317
|
+
/** The desk's chrome — stratum 5 (D4a); null when the options named no marks shaders. */
|
|
318
|
+
readonly marks: MarksPass | null;
|
|
319
|
+
/** The hand — the focus behind an object in hand and the object over it (D4b); null when the options named no hold shaders. */
|
|
320
|
+
readonly hold: HoldPass | null;
|
|
321
|
+
/** The pegboard drawer (design-017, K3); null when the options named no tray shaders. */
|
|
322
|
+
readonly tray: TrayPass | null;
|
|
323
|
+
/** The tray's specimens' slots (K5a) — one per specimen, made as the tray first shows each; null with no tray. */
|
|
324
|
+
readonly traySlots: TraySlots | null;
|
|
325
|
+
/** The desk copy's cache (D4b): the stamp it was made for and the stats of that frame. */
|
|
326
|
+
private readonly heldCache;
|
|
327
|
+
/** How many desk copies the hand has made so far (D4b) — a rig's witness that the blurred desk is made once per settled state. */
|
|
328
|
+
heldCopies(): number;
|
|
329
|
+
/** The drops last said, by kind (D7). */
|
|
330
|
+
private readonly dropSaid;
|
|
331
|
+
private constructor();
|
|
332
|
+
static create(opts: GroundOptions): Promise<Ground>;
|
|
333
|
+
/** The root's pass of the kind registered as `name` (undefined if none) — a host reaches its kind's own API through it: the note's ink pages, the whiteboard's rasters. */
|
|
334
|
+
pass(name: string): KindPass | undefined;
|
|
335
|
+
/** Size the canvas to its CSS box; returns the CSS size and dpr the frame should use. (A host may size the canvas itself instead.) */
|
|
336
|
+
fit(maxDpr?: number): {
|
|
337
|
+
changed: boolean;
|
|
338
|
+
width: number;
|
|
339
|
+
height: number;
|
|
340
|
+
cssWidth: number;
|
|
341
|
+
cssHeight: number;
|
|
342
|
+
dpr: number;
|
|
343
|
+
};
|
|
344
|
+
/** Render one frame now. Synchronous submit; the caller owns the cadence. */
|
|
345
|
+
render(inputs: GroundFrameInputs): GroundStats;
|
|
346
|
+
/** A kind whose cap turns objects away is an ERROR on the host's console (D7): said when the drop begins and again if it grows. */
|
|
347
|
+
private said;
|
|
348
|
+
/** The pool's slots, then the root's kinds in reverse registration order, then the mat. */
|
|
349
|
+
dispose(): void;
|
|
350
|
+
/** Make the passes the tray's composite specimens need (K5a — `TraySlots.warm`); `onReady` asks for the frame that shows them. */
|
|
351
|
+
warmTray(wanted: readonly (readonly [string, string])[], onReady: () => void): void;
|
|
352
|
+
/** The tray's slots let go of what they make again at their next draw once undrawn a while (D-K6a.3; `TraySlots.idle`) — every tick. */
|
|
353
|
+
idleTray(): void;
|
|
354
|
+
/** When `idleTray` next lets a tray layer go (K7a — a time the host registers; ∞ — nothing to let go). */
|
|
355
|
+
trayIdleAt(): number;
|
|
356
|
+
}
|
|
357
|
+
/** The specimens' name tags this frame (K5a): each label centred under its specimen — below a shelf's plank — in screen px. */
|
|
358
|
+
export declare function tagsOf(tray: TrayFrameInputs | undefined): {
|
|
359
|
+
readonly label: string;
|
|
360
|
+
readonly x: number;
|
|
361
|
+
readonly y: number;
|
|
362
|
+
}[];
|
|
363
|
+
/** The desk copy's cache between held frames (D4b): the `stamp` it was made for (null: none yet), the stats of that frame, and how many copies were ever made (the "once per settled state" witness). */
|
|
364
|
+
export interface HeldCache {
|
|
365
|
+
stamp: string | null;
|
|
366
|
+
stats: GroundStats | null;
|
|
367
|
+
copies: number;
|
|
368
|
+
}
|
|
369
|
+
/** Where a held frame goes: the swap chain's view and size (the ground's surface, or the oracle's target dressed as one). */
|
|
370
|
+
export interface HeldInto {
|
|
371
|
+
view(): GPUTextureView;
|
|
372
|
+
size(): {
|
|
373
|
+
readonly w: number;
|
|
374
|
+
readonly h: number;
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* A HELD FRAME (design-015 §8; D4b) — shared by `Ground.render` and the Node oracle so both hosts draw it through one code path:
|
|
379
|
+
* 1. the DESK COPY, only when its `stamp` moved: the frame WITHOUT the held object (the builder left it out), no marks, prepared
|
|
380
|
+
* and drawn at half the dpr into the hold pass's half-size target, then blurred — its own encoder, SUBMITTED FIRST: the root's
|
|
381
|
+
* passes are about to be prepared again for the hand, and a queue write lands before every later submit, never an earlier one;
|
|
382
|
+
* 2. the HAND: the one object under the pose's camera, its kind's own pass into a transparent full-size target (no mat — a bare
|
|
383
|
+
* slot), the hand's light (the day's by night, as the carry rises);
|
|
384
|
+
* 3. the FRAME: the desk out of focus (the sharp copy mixed toward the blurred one by the carry, dimmed), then the hand over it
|
|
385
|
+
* through the reading light. Two fullscreen draws; the marks stay quiet (the builder hands none).
|
|
386
|
+
* Returns the desk copy's stats (the frame's objects behind the hand).
|
|
387
|
+
*/
|
|
388
|
+
export declare function renderHeldFrame(device: GPUDevice, hold: HoldPass, root: SlotSet, pool: SlotPool, grid: GridConfig, into: HeldInto, inputs: GroundFrameInputs, held: HeldFrameInputs, cache: HeldCache): GroundStats;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Target } from "../engine/target";
|
|
2
|
+
import type { HoldShaders } from "./shaders";
|
|
3
|
+
/** The pass's knobs: `texel` = (1/w, 1/h of the SOURCE, the Kawase offset in half-texels, 0); `mix` = (the carry e, the dim, the saturate, the brightness). */
|
|
4
|
+
export declare const HoldUniformsStruct: import("../engine").StructDef<"texel" | "mix">;
|
|
5
|
+
/** The dual-Kawase chain's shape: two levels below the half-size copy; the offset per texel of radius. */
|
|
6
|
+
export declare const KAWASE: {
|
|
7
|
+
readonly levels: 2;
|
|
8
|
+
readonly offsetPerTexel: 0.25;
|
|
9
|
+
};
|
|
10
|
+
export interface CompositeKnobs {
|
|
11
|
+
/** The carry amount: how far toward the blurred copy the background goes. */
|
|
12
|
+
readonly e: number;
|
|
13
|
+
/** The dim of the desk behind (already scaled by the carry). */
|
|
14
|
+
readonly dim: number;
|
|
15
|
+
/** The reading light on the hand (1, 1 by day; toward .62, .82 by night as the carry rises). */
|
|
16
|
+
readonly saturate: number;
|
|
17
|
+
readonly brightness: number;
|
|
18
|
+
}
|
|
19
|
+
export declare class HoldPass {
|
|
20
|
+
private readonly device;
|
|
21
|
+
private readonly layout;
|
|
22
|
+
private readonly sampler;
|
|
23
|
+
private readonly down;
|
|
24
|
+
private readonly up;
|
|
25
|
+
private readonly deskPipe;
|
|
26
|
+
private readonly handPipe;
|
|
27
|
+
/** The desk's half-size copy, the Kawase levels below it, the blurred copy back at half size, the hand at full size. */
|
|
28
|
+
readonly desk: Target;
|
|
29
|
+
readonly blurred: Target;
|
|
30
|
+
readonly hand: Target;
|
|
31
|
+
private readonly levels;
|
|
32
|
+
/** One uniform buffer per draw the chain records (each holds its own texel size and offset). */
|
|
33
|
+
private readonly knobs;
|
|
34
|
+
private readonly values;
|
|
35
|
+
private groups;
|
|
36
|
+
/** The size the groups were built for — rebuilt when a target resized. */
|
|
37
|
+
private built;
|
|
38
|
+
private constructor();
|
|
39
|
+
/** The four pipelines on `format` (the surface's — every target here is that format too, so one layout serves all). */
|
|
40
|
+
static create(device: GPUDevice, format: GPUTextureFormat, src: HoldShaders): Promise<HoldPass>;
|
|
41
|
+
/** Size the targets to the surface (device px): the copies at half, the hand at full. True when any target was remade (its contents gone). */
|
|
42
|
+
fit(w: number, h: number): boolean;
|
|
43
|
+
private rebind;
|
|
44
|
+
private knob;
|
|
45
|
+
/**
|
|
46
|
+
* The blur: from the desk copy through the levels and back into `blurred`, at `radiusTexels` (the radius in the copy's
|
|
47
|
+
* texels: the CSS radius × dpr / 2). Recorded into `encoder` after the copy was drawn; one chain per settled desk.
|
|
48
|
+
*/
|
|
49
|
+
blur(encoder: GPUCommandEncoder, radiusTexels: number): void;
|
|
50
|
+
/** The frame: the desk out of focus, then the hand over it in its light — two fullscreen draws into the open pass. */
|
|
51
|
+
composite(pass: GPURenderPassEncoder, k: CompositeKnobs): void;
|
|
52
|
+
dispose(): void;
|
|
53
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import type { ObjectRect } from "../kinds/world";
|
|
2
|
+
import { type MatLight } from "../mat/night";
|
|
3
|
+
import type { CameraState } from "../nav/flight";
|
|
4
|
+
/** The hand's numbers (desk.js `HOLD`). Times in ms; `margin`/`top`/`band` CSS px; `blur` CSS px; `narrow` = a phone's width. */
|
|
5
|
+
export declare const HOLD: {
|
|
6
|
+
readonly inMs: 560;
|
|
7
|
+
readonly outMs: 440;
|
|
8
|
+
readonly closeLead: 0.14;
|
|
9
|
+
readonly openAt: 0.42;
|
|
10
|
+
readonly blur: 14;
|
|
11
|
+
readonly blurPhone: 10;
|
|
12
|
+
readonly dim: 0.08;
|
|
13
|
+
readonly margin: 56;
|
|
14
|
+
readonly marginPhone: 16;
|
|
15
|
+
readonly top: 56;
|
|
16
|
+
readonly topPhone: 60;
|
|
17
|
+
readonly band: 72;
|
|
18
|
+
readonly max: 3;
|
|
19
|
+
readonly zoomMin: 0.72;
|
|
20
|
+
readonly zoomMax: 3;
|
|
21
|
+
readonly narrow: 640;
|
|
22
|
+
/** The reading light by night (Q-n): the held object keeps its day light, filtered. */
|
|
23
|
+
readonly light: {
|
|
24
|
+
readonly saturate: 0.62;
|
|
25
|
+
readonly brightness: 0.82;
|
|
26
|
+
};
|
|
27
|
+
/** The cover's spring in hand (desk.js `COVER`): a palm, not a desk. */
|
|
28
|
+
readonly cover: {
|
|
29
|
+
readonly hz: 1.4;
|
|
30
|
+
readonly zeta: 0.78;
|
|
31
|
+
};
|
|
32
|
+
/** The held bar's travel (M1 morph) and its return after the landing. */
|
|
33
|
+
readonly bar: {
|
|
34
|
+
readonly travelMs: 340;
|
|
35
|
+
readonly backMs: 200;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export interface HeldViewport {
|
|
39
|
+
readonly width: number;
|
|
40
|
+
readonly height: number;
|
|
41
|
+
}
|
|
42
|
+
/** The reading pose's target: where the open extent's centre goes on screen (CSS px), the scale there (CSS px per object unit), one page or the spread. */
|
|
43
|
+
export interface ReadingTarget {
|
|
44
|
+
readonly cx: number;
|
|
45
|
+
readonly cy: number;
|
|
46
|
+
readonly s: number;
|
|
47
|
+
readonly single: boolean;
|
|
48
|
+
}
|
|
49
|
+
/** A phone's width (desk.js `narrow`). */
|
|
50
|
+
export declare const isNarrow: (vp: HeldViewport) => boolean;
|
|
51
|
+
/**
|
|
52
|
+
* The reading size (desk.js `heldTarget`): the extent fits the view inside the margins and above the bar's band, never past 3×.
|
|
53
|
+
* `spread`: the extent is a two-page spread that may open one page at a time — on a portrait phone (W < 0.85·H) it does when
|
|
54
|
+
* one page reads at least 1.3× larger than the whole spread would; then the RIGHT page is centred (the extent's centre sits a
|
|
55
|
+
* quarter of its width left of the middle) — or, `face` → 1, the LEFT (D3t-b: the notebook reads page by page; between, the view
|
|
56
|
+
* glides).
|
|
57
|
+
*/
|
|
58
|
+
export declare function readingTarget(extent: ObjectRect, vp: HeldViewport, spread?: boolean, face?: number): ReadingTarget;
|
|
59
|
+
/** Where the extent lies on screen at rest, under the desk's camera: its centre (CSS px), the scale (the zoom) and the object's turn. */
|
|
60
|
+
export interface HomePose {
|
|
61
|
+
readonly cx: number;
|
|
62
|
+
readonly cy: number;
|
|
63
|
+
readonly s: number;
|
|
64
|
+
readonly angle: number;
|
|
65
|
+
}
|
|
66
|
+
export declare function homePose(extent: ObjectRect, angle: number, cam: CameraState): HomePose;
|
|
67
|
+
/** The user's facts on the held object (core's `HeldView`). */
|
|
68
|
+
export interface HeldUser {
|
|
69
|
+
readonly zoom: number;
|
|
70
|
+
readonly panX: number;
|
|
71
|
+
readonly panY: number;
|
|
72
|
+
}
|
|
73
|
+
export declare const HELD_USER_REST: HeldUser;
|
|
74
|
+
/** The pose between the desk and the hand: the extent's centre on screen, CSS px per unit, the turn, the carry amount. */
|
|
75
|
+
export interface HeldPose {
|
|
76
|
+
readonly cx: number;
|
|
77
|
+
readonly cy: number;
|
|
78
|
+
readonly s: number;
|
|
79
|
+
readonly angle: number;
|
|
80
|
+
readonly e: number;
|
|
81
|
+
}
|
|
82
|
+
/** desk.js `heldPose`: position on the island curve (the caller eases `e`), size in log scale, the tilt let go. */
|
|
83
|
+
export declare function heldPose(home: HomePose, target: ReadingTarget, user: HeldUser, e: number): HeldPose;
|
|
84
|
+
/** The carry amount for the pickup's progress `p` (0 … 1) — the island ease; the put-down runs it backwards from where it was. */
|
|
85
|
+
export declare const carryOf: (p: number) => number;
|
|
86
|
+
/** The pickup's progress at a carry amount — the island ease inverted by bisection (a put-down caught mid-flight, a pinned still). */
|
|
87
|
+
export declare function progressOf(e: number): number;
|
|
88
|
+
/** The focus behind the hand and the light on it at a carry amount (the builder's and the oracle's ONE reading of §8's numbers). */
|
|
89
|
+
export interface HeldFocus {
|
|
90
|
+
/** The radius the ONE blur is made at, CSS px (14; a phone's 10). */
|
|
91
|
+
readonly blur: number;
|
|
92
|
+
/** The desk's dim behind, by the carry (8 % at the top). */
|
|
93
|
+
readonly dim: number;
|
|
94
|
+
/** The reading light on the hand (Q-n): 1, 1 by day; toward saturate .62 · brightness .82 by night as the carry rises. */
|
|
95
|
+
readonly filter: {
|
|
96
|
+
readonly saturate: number;
|
|
97
|
+
readonly brightness: number;
|
|
98
|
+
};
|
|
99
|
+
/** The hand's own light: the desk's by day; by night the day's mixed in by the carry. */
|
|
100
|
+
readonly light: MatLight;
|
|
101
|
+
}
|
|
102
|
+
export declare function heldFocus(e: number, vp: HeldViewport, theme: {
|
|
103
|
+
readonly name: string;
|
|
104
|
+
readonly matLight: MatLight;
|
|
105
|
+
}): HeldFocus;
|
|
106
|
+
/**
|
|
107
|
+
* The held slot's CAMERA (the pose IS a camera) and the factor a kind with height must reach by rising. The object's rect centre
|
|
108
|
+
* lies `offset` (its own units, unturned) from its extent's centre; the pose turns that offset by its angle and puts the extent's
|
|
109
|
+
* centre at (pose.cx, pose.cy), so the rect's centre lands at P − R(angle)·offset·s. A flat kind's camera zooms to `pose.s` and
|
|
110
|
+
* grows nothing; an `eye` kind keeps the desk's zoom when the pose is larger (grow = pose.s / zoom ≥ 1, the rise does the rest)
|
|
111
|
+
* and zooms out with the camera when the pose is smaller (a book picked up from very close: grow 1).
|
|
112
|
+
*/
|
|
113
|
+
export declare function heldCamera(pose: HeldPose, rect: ObjectRect, extent: ObjectRect, deskZoom: number, eye: boolean, vp: HeldViewport): {
|
|
114
|
+
readonly cam: CameraState;
|
|
115
|
+
readonly grow: number;
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* The held object's frame ON SCREEN (what the pose seam publishes, core's `HeldScreenFrame`): the shown extent's centre and half
|
|
119
|
+
* extents, CSS px, its scale. `single`: one page alone — the right (`face` 0), the left (`face` 1), a glide between (D3t-b).
|
|
120
|
+
*/
|
|
121
|
+
export declare function heldFrame(pose: HeldPose, extent: ObjectRect, single: boolean, face?: number): {
|
|
122
|
+
readonly cx: number;
|
|
123
|
+
readonly cy: number;
|
|
124
|
+
readonly hx: number;
|
|
125
|
+
readonly hy: number;
|
|
126
|
+
readonly s: number;
|
|
127
|
+
};
|
|
128
|
+
/** The focus behind the hand: the blur radius (CSS px) and the dim at a carry amount. */
|
|
129
|
+
export declare const focusOf: (e: number, vp: HeldViewport) => {
|
|
130
|
+
readonly blur: number;
|
|
131
|
+
readonly dim: number;
|
|
132
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ShaderPart } from "../engine/shader";
|
|
2
|
+
export interface HoldShaders {
|
|
3
|
+
readonly entry: ShaderPart;
|
|
4
|
+
}
|
|
5
|
+
export interface HoldShaderText {
|
|
6
|
+
readonly hold: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const HOLD_SHADER_FILES: Record<keyof HoldShaderText, string>;
|
|
9
|
+
export declare function holdShaders(t: HoldShaderText): HoldShaders;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type World } from "../../../core/src/index";
|
|
2
|
+
import type { DeskEditor, TextPart } from "../kit/editor";
|
|
3
|
+
/** design-007's claim marker (`@ice/dom` KEYBOARD_CLAIM_ATTR — the desk may not import dom): the keymap cedes to a focused claim. */
|
|
4
|
+
export declare const KEYBOARD_CLAIM_ATTR = "data-canvas-keyboard";
|
|
5
|
+
/** The editor's own marker — the one element the desk puts in screen space for text. */
|
|
6
|
+
export declare const EDITOR_ATTR = "data-desk-editor";
|
|
7
|
+
export interface DeskEditorOptions {
|
|
8
|
+
/** The host's container (screen space): the editor goes in it, the taps are read on it. */
|
|
9
|
+
readonly container: HTMLElement;
|
|
10
|
+
readonly world: World;
|
|
11
|
+
/** The text parts the registered objects declared, in registration order (asked at each tap — the layer fills them after the drivers). */
|
|
12
|
+
readonly parts: () => readonly TextPart[];
|
|
13
|
+
/** A session ends after this long without input, ms (1000). */
|
|
14
|
+
readonly idleMs?: number;
|
|
15
|
+
/** Ask the desk for a frame. */
|
|
16
|
+
readonly wake: () => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function createDeskEditor(opts: DeskEditorOptions): DeskEditor;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { deskLayer, type DeskLayerContext, type DeskLayerFactory, type DeskLayerHandle, type DeskLayerOptions, type DeskLayerPerf, type DeskLayerStatus, type DeskTrayDoor, type MatPin, type SelectionSource, type TrayAnchor } from "./layer";
|
|
2
|
+
export type { SelectionAnchor } from "../compose/marks";
|
|
3
|
+
export { surface, type Surface } from "./surface";
|
|
4
|
+
export { createDeskEditor, type DeskEditorOptions, EDITOR_ATTR, KEYBOARD_CLAIM_ATTR } from "./editor";
|
|
5
|
+
export { type FaceSpec, inkRaster, type InkRaster, type InkRasterOptions, PEN_FACES, penFaces } from "./ink";
|
|
6
|
+
export { decodePicture } from "./picture";
|
|
7
|
+
export { DEFAULT_MAT_CONFIG, GLYPH_PAD, GLYPHS, type GlyphAtlasMeta, type MatConfig, type PlateName, type RulerConfig } from "../mat/layout";
|
|
8
|
+
export type { GridConfig } from "../mat/grid";
|
|
9
|
+
export { type ObjectSprings, SPRINGS } from "../kit/springs";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { TextRaster } from "../kit/raster";
|
|
2
|
+
import { type FaceSpec } from "../kit/text";
|
|
3
|
+
export { type FaceSpec, PEN_FACES } from "../kit/text";
|
|
4
|
+
/** The desk's faces with the app's files: `{ caveat: url, "caveat-bold": url, kalam: url }` → face specs. */
|
|
5
|
+
export declare function penFaces(urls: Readonly<Record<string, string>>): Readonly<Record<string, FaceSpec>>;
|
|
6
|
+
export interface InkRasterOptions {
|
|
7
|
+
/** The faces by name — `penFaces({ … })` for the desk's own. */
|
|
8
|
+
readonly faces: Readonly<Record<string, FaceSpec>>;
|
|
9
|
+
/** The document whose font set the faces join (the window's). */
|
|
10
|
+
readonly document?: Document;
|
|
11
|
+
}
|
|
12
|
+
export interface InkRaster extends TextRaster {
|
|
13
|
+
/** Load a face (once): resolves whether the browser can draw it. `metrics()` asks for this itself. */
|
|
14
|
+
load(face: string): Promise<boolean>;
|
|
15
|
+
/** Is the face loaded (and drawable)? */
|
|
16
|
+
ready(face: string): boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function inkRaster(opts: InkRasterOptions): InkRaster;
|