@vibecook/ice 0.11.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/README.md +79 -50
  2. package/dist/chunk-BA7XJC27.js +2429 -0
  3. package/dist/chunk-BA7XJC27.js.map +1 -0
  4. package/dist/chunk-BKV4ZEU3.js +1 -0
  5. package/dist/chunk-BKV4ZEU3.js.map +1 -0
  6. package/dist/{chunk-VGVDJZSP.js → chunk-DYK6KNLG.js} +13206 -7387
  7. package/dist/chunk-DYK6KNLG.js.map +1 -0
  8. package/dist/chunk-ENIFIUEP.js +155 -0
  9. package/dist/chunk-ENIFIUEP.js.map +1 -0
  10. package/dist/chunk-IBWWLA6D.js +634 -0
  11. package/dist/chunk-IBWWLA6D.js.map +1 -0
  12. package/dist/{chunk-OR5FNVUE.js → chunk-JS6PG6YD.js} +398 -167
  13. package/dist/chunk-JS6PG6YD.js.map +1 -0
  14. package/dist/chunk-QXOCF56A.js +148 -0
  15. package/dist/chunk-QXOCF56A.js.map +1 -0
  16. package/dist/chunk-ZPUPBULB.js +7399 -0
  17. package/dist/chunk-ZPUPBULB.js.map +1 -0
  18. package/dist/desk-engine.js +36 -0
  19. package/dist/desk-engine.js.map +1 -0
  20. package/dist/desk-kit.js +244 -0
  21. package/dist/desk-kit.js.map +1 -0
  22. package/dist/desk-objects.js +12728 -0
  23. package/dist/desk-objects.js.map +1 -0
  24. package/dist/desk.js +469 -0
  25. package/dist/desk.js.map +1 -0
  26. package/dist/devtools.js +233 -189
  27. package/dist/devtools.js.map +1 -1
  28. package/dist/dom.js +7 -19
  29. package/dist/index.js +232 -20
  30. package/dist/kernel.js +53 -25
  31. package/dist/react.js +1045 -38
  32. package/dist/react.js.map +1 -1
  33. package/dist/types/packages/core/src/behavior/define-behavior.d.ts +11 -0
  34. package/dist/types/packages/core/src/behavior/runtime.d.ts +4 -0
  35. package/dist/types/packages/core/src/canvas/define-canvas-type.d.ts +86 -0
  36. package/dist/types/packages/core/src/canvas/define-container.d.ts +17 -0
  37. package/dist/types/packages/core/src/canvas/diagnostics.d.ts +27 -0
  38. package/dist/types/packages/core/src/canvas/engine-catalog.d.ts +70 -0
  39. package/dist/types/packages/core/src/canvas/extensions.d.ts +125 -0
  40. package/dist/types/packages/core/src/canvas/frame-behavior-host.d.ts +16 -0
  41. package/dist/types/packages/core/src/canvas/frame-preview.d.ts +79 -0
  42. package/dist/types/packages/core/src/canvas/frame-projection.d.ts +38 -0
  43. package/dist/types/packages/core/src/canvas/frame-view.d.ts +36 -0
  44. package/dist/types/packages/core/src/canvas/migrate.d.ts +14 -0
  45. package/dist/types/packages/core/src/canvas/placement.d.ts +30 -0
  46. package/dist/types/packages/core/src/canvas/presentation-transition.d.ts +100 -0
  47. package/dist/types/packages/core/src/canvas/runtime-extension-host.d.ts +16 -0
  48. package/dist/types/packages/core/src/canvas/session.d.ts +47 -0
  49. package/dist/types/packages/core/src/catalog/camera-derived.d.ts +16 -27
  50. package/dist/types/packages/core/src/catalog/desk.d.ts +326 -0
  51. package/dist/types/packages/core/src/catalog/gesture.d.ts +51 -0
  52. package/dist/types/packages/core/src/catalog/graph.d.ts +2 -2
  53. package/dist/types/packages/core/src/catalog/index.d.ts +2 -0
  54. package/dist/types/packages/core/src/catalog/pointer.d.ts +42 -0
  55. package/dist/types/packages/core/src/catalog/selection-presence.d.ts +7 -0
  56. package/dist/types/packages/core/src/catalog/settings-resources.d.ts +28 -2
  57. package/dist/types/packages/core/src/catalog/surface.d.ts +1 -0
  58. package/dist/types/packages/core/src/doc/doc-commit-sink.d.ts +18 -2
  59. package/dist/types/packages/core/src/doc/doc-kit.d.ts +21 -2
  60. package/dist/types/packages/core/src/doc/envelope.d.ts +5 -2
  61. package/dist/types/packages/core/src/doc/schema-migrate.d.ts +1 -1
  62. package/dist/types/packages/core/src/doc/version-gate.d.ts +21 -3
  63. package/dist/types/packages/core/src/engine/commit-sink.d.ts +10 -1
  64. package/dist/types/packages/core/src/engine/engine.d.ts +6 -0
  65. package/dist/types/packages/core/src/engine/frame-control.d.ts +74 -0
  66. package/dist/types/packages/core/src/engine/guests.d.ts +4 -1
  67. package/dist/types/packages/core/src/engine/world-doors.d.ts +12 -0
  68. package/dist/types/packages/core/src/facade/create-canvas-engine.d.ts +146 -13
  69. package/dist/types/packages/core/src/index.d.ts +33 -12
  70. package/dist/types/packages/core/src/input/queue.d.ts +3 -1
  71. package/dist/types/packages/core/src/interaction/install.d.ts +30 -0
  72. package/dist/types/packages/core/src/interaction/wakes.d.ts +24 -0
  73. package/dist/types/packages/core/src/nav/nav-geometry.d.ts +100 -0
  74. package/dist/types/packages/core/src/nav/nested-canvas.d.ts +47 -4
  75. package/dist/types/packages/core/src/ops/cascade.d.ts +2 -1
  76. package/dist/types/packages/core/src/ops/claims.d.ts +6 -0
  77. package/dist/types/packages/core/src/ops/insert.d.ts +4 -0
  78. package/dist/types/packages/core/src/ops/point-pick.d.ts +4 -1
  79. package/dist/types/packages/core/src/ops/sibling-order.d.ts +14 -4
  80. package/dist/types/packages/core/src/ops/tray.d.ts +48 -0
  81. package/dist/types/packages/core/src/presence/presence-kit.d.ts +5 -0
  82. package/dist/types/packages/core/src/schema/meta.d.ts +10 -0
  83. package/dist/types/packages/core/src/schema/prefab.d.ts +8 -0
  84. package/dist/types/packages/core/src/settings/defaults.d.ts +25 -6
  85. package/dist/types/packages/core/src/surface/gpu-device.d.ts +55 -0
  86. package/dist/types/packages/core/src/systems/camera-sim.d.ts +29 -0
  87. package/dist/types/packages/core/src/systems/chrome.d.ts +15 -23
  88. package/dist/types/packages/core/src/systems/drag-mods.d.ts +34 -0
  89. package/dist/types/packages/core/src/systems/held.d.ts +71 -0
  90. package/dist/types/packages/core/src/systems/insert-ghost.d.ts +2 -0
  91. package/dist/types/packages/core/src/systems/l0-input.d.ts +14 -0
  92. package/dist/types/packages/core/src/systems/l1-pick.d.ts +37 -1
  93. package/dist/types/packages/core/src/systems/l2-arbitrate.d.ts +18 -4
  94. package/dist/types/packages/core/src/systems/l3-behave.d.ts +4 -1
  95. package/dist/types/packages/core/src/systems/l3-claim.d.ts +7 -0
  96. package/dist/types/packages/core/src/systems/l3-connect.d.ts +1 -1
  97. package/dist/types/packages/core/src/systems/l3-drop.d.ts +30 -1
  98. package/dist/types/packages/core/src/systems/l3-marquee.d.ts +2 -1
  99. package/dist/types/packages/core/src/systems/l3-ports.d.ts +1 -1
  100. package/dist/types/packages/core/src/systems/l4-cursor.d.ts +5 -0
  101. package/dist/types/packages/core/src/systems/nav-flight.d.ts +85 -3
  102. package/dist/types/packages/core/src/systems/nav-tap.d.ts +44 -0
  103. package/dist/types/packages/core/src/systems/press-wheel.d.ts +11 -0
  104. package/dist/types/packages/core/src/systems/tray.d.ts +108 -0
  105. package/dist/types/packages/core/src/systems/zoom-through.d.ts +30 -0
  106. package/dist/types/packages/core/src/tools/define-tool.d.ts +10 -0
  107. package/dist/types/packages/core/src/widget/define-widget.d.ts +166 -63
  108. package/dist/types/packages/core/src/widget/equip.d.ts +14 -2
  109. package/dist/types/packages/core/src/widget/held-tools.d.ts +83 -0
  110. package/dist/types/packages/core/src/widget/menu-actions.d.ts +44 -0
  111. package/dist/types/packages/core/src/widget/mount-store.d.ts +21 -46
  112. package/dist/types/packages/core/src/widget/spawn.d.ts +1 -1
  113. package/dist/types/packages/desk/src/assets/blue-noise.gen.d.ts +10 -0
  114. package/dist/types/packages/desk/src/card/card.d.ts +103 -0
  115. package/dist/types/packages/desk/src/compose/ambient.d.ts +59 -0
  116. package/dist/types/packages/desk/src/compose/builder.d.ts +285 -0
  117. package/dist/types/packages/desk/src/compose/children.d.ts +3 -0
  118. package/dist/types/packages/desk/src/compose/index.d.ts +14 -0
  119. package/dist/types/packages/desk/src/compose/marks.d.ts +126 -0
  120. package/dist/types/packages/desk/src/compose/pick.d.ts +5 -0
  121. package/dist/types/packages/desk/src/compose/reflector.d.ts +111 -0
  122. package/dist/types/packages/desk/src/compose/tap.d.ts +5 -0
  123. package/dist/types/packages/desk/src/docs.d.ts +23 -0
  124. package/dist/types/packages/desk/src/engine/budget.d.ts +38 -0
  125. package/dist/types/packages/desk/src/engine/device.d.ts +54 -0
  126. package/dist/types/packages/desk/src/engine/index.d.ts +5 -0
  127. package/dist/types/packages/desk/src/engine/pipeline.d.ts +36 -0
  128. package/dist/types/packages/desk/src/engine/rasters.d.ts +66 -0
  129. package/dist/types/packages/desk/src/engine/records.d.ts +56 -0
  130. package/dist/types/packages/desk/src/engine/shader.d.ts +22 -0
  131. package/dist/types/packages/desk/src/engine/struct.d.ts +39 -0
  132. package/dist/types/packages/desk/src/engine/target.d.ts +26 -0
  133. package/dist/types/packages/desk/src/gpu-ablation.d.ts +61 -0
  134. package/dist/types/packages/desk/src/gpu-memory.d.ts +54 -0
  135. package/dist/types/packages/desk/src/gpu-profiler.d.ts +141 -0
  136. package/dist/types/packages/desk/src/gpu-wrap.d.ts +8 -0
  137. package/dist/types/packages/desk/src/ground.d.ts +388 -0
  138. package/dist/types/packages/desk/src/hold/focus.d.ts +53 -0
  139. package/dist/types/packages/desk/src/hold/pose.d.ts +132 -0
  140. package/dist/types/packages/desk/src/hold/shaders.d.ts +9 -0
  141. package/dist/types/packages/desk/src/host/editor.d.ts +18 -0
  142. package/dist/types/packages/desk/src/host/index.d.ts +9 -0
  143. package/dist/types/packages/desk/src/host/ink.d.ts +18 -0
  144. package/dist/types/packages/desk/src/host/layer.d.ts +430 -0
  145. package/dist/types/packages/desk/src/host/picture.d.ts +2 -0
  146. package/dist/types/packages/desk/src/host/surface.d.ts +5 -0
  147. package/dist/types/packages/desk/src/index.d.ts +13 -0
  148. package/dist/types/packages/desk/src/kind.d.ts +187 -0
  149. package/dist/types/packages/desk/src/kinds/world.d.ts +429 -0
  150. package/dist/types/packages/desk/src/kit/arrays.d.ts +88 -0
  151. package/dist/types/packages/desk/src/kit/blobs.d.ts +40 -0
  152. package/dist/types/packages/desk/src/kit/book.d.ts +2 -0
  153. package/dist/types/packages/desk/src/kit/editor.d.ts +103 -0
  154. package/dist/types/packages/desk/src/kit/eye.d.ts +37 -0
  155. package/dist/types/packages/desk/src/kit/hold.d.ts +1 -0
  156. package/dist/types/packages/desk/src/kit/index.d.ts +26 -0
  157. package/dist/types/packages/desk/src/kit/inside.d.ts +116 -0
  158. package/dist/types/packages/desk/src/kit/layer.d.ts +159 -0
  159. package/dist/types/packages/desk/src/kit/light.d.ts +3 -0
  160. package/dist/types/packages/desk/src/kit/mesh.d.ts +29 -0
  161. package/dist/types/packages/desk/src/kit/mips.d.ts +2 -0
  162. package/dist/types/packages/desk/src/kit/nav.d.ts +2 -0
  163. package/dist/types/packages/desk/src/kit/paper-tex.d.ts +5 -0
  164. package/dist/types/packages/desk/src/kit/physics.d.ts +44 -0
  165. package/dist/types/packages/desk/src/kit/place.d.ts +44 -0
  166. package/dist/types/packages/desk/src/kit/print.d.ts +30 -0
  167. package/dist/types/packages/desk/src/kit/raster.d.ts +34 -0
  168. package/dist/types/packages/desk/src/kit/sdf.d.ts +1 -0
  169. package/dist/types/packages/desk/src/kit/seeds.d.ts +11 -0
  170. package/dist/types/packages/desk/src/kit/services.d.ts +34 -0
  171. package/dist/types/packages/desk/src/kit/springs.d.ts +12 -0
  172. package/dist/types/packages/desk/src/kit/strokes.d.ts +93 -0
  173. package/dist/types/packages/desk/src/kit/text.d.ts +142 -0
  174. package/dist/types/packages/desk/src/kit/uniform.d.ts +8 -0
  175. package/dist/types/packages/desk/src/kit/view.d.ts +39 -0
  176. package/dist/types/packages/desk/src/kit/wgsl.d.ts +15 -0
  177. package/dist/types/packages/desk/src/lattice/line.d.ts +15 -0
  178. package/dist/types/packages/desk/src/lattice/lod.d.ts +52 -0
  179. package/dist/types/packages/desk/src/lattice/ruler.d.ts +88 -0
  180. package/dist/types/packages/desk/src/marks/assemble.d.ts +65 -0
  181. package/dist/types/packages/desk/src/marks/ease.d.ts +4 -0
  182. package/dist/types/packages/desk/src/marks/laser.d.ts +41 -0
  183. package/dist/types/packages/desk/src/marks/layout.d.ts +167 -0
  184. package/dist/types/packages/desk/src/marks/pass.d.ts +59 -0
  185. package/dist/types/packages/desk/src/marks/shaders.d.ts +12 -0
  186. package/dist/types/packages/desk/src/mat/grid.d.ts +50 -0
  187. package/dist/types/packages/desk/src/mat/lamp.d.ts +14 -0
  188. package/dist/types/packages/desk/src/mat/layout.d.ts +144 -0
  189. package/dist/types/packages/desk/src/mat/mat-pass.d.ts +83 -0
  190. package/dist/types/packages/desk/src/mat/night.d.ts +95 -0
  191. package/dist/types/packages/desk/src/mat/projector.d.ts +39 -0
  192. package/dist/types/packages/desk/src/mat/shaders.d.ts +17 -0
  193. package/dist/types/packages/desk/src/mat/tilt.d.ts +14 -0
  194. package/dist/types/packages/desk/src/nav/flight.d.ts +186 -0
  195. package/dist/types/packages/desk/src/nav/portal.d.ts +95 -0
  196. package/dist/types/packages/desk/src/object.d.ts +46 -0
  197. package/dist/types/packages/desk/src/pass-instrument.d.ts +89 -0
  198. package/dist/types/packages/desk/src/shaders.d.ts +12 -0
  199. package/dist/types/packages/desk/src/shaders.gen.d.ts +16 -0
  200. package/dist/types/packages/desk/src/submit-instrument.d.ts +36 -0
  201. package/dist/types/packages/desk/src/theme.d.ts +475 -0
  202. package/dist/types/packages/desk/src/tray/carry.d.ts +99 -0
  203. package/dist/types/packages/desk/src/tray/drawer.d.ts +113 -0
  204. package/dist/types/packages/desk/src/tray/flux.d.ts +46 -0
  205. package/dist/types/packages/desk/src/tray/index.d.ts +4 -0
  206. package/dist/types/packages/desk/src/tray/lattice.d.ts +71 -0
  207. package/dist/types/packages/desk/src/tray/layout.d.ts +7 -0
  208. package/dist/types/packages/desk/src/tray/look.d.ts +29 -0
  209. package/dist/types/packages/desk/src/tray/pass.d.ts +96 -0
  210. package/dist/types/packages/desk/src/tray/shaders.d.ts +10 -0
  211. package/dist/types/packages/desk/src/tray/specimens.d.ts +199 -0
  212. package/dist/types/packages/devtools/src/attach.d.ts +22 -8
  213. package/dist/types/packages/devtools/src/dock.d.ts +18 -14
  214. package/dist/types/packages/devtools/src/gpu-panel.d.ts +105 -0
  215. package/dist/types/packages/devtools/src/index.d.ts +5 -4
  216. package/dist/types/packages/dom/src/desk-host.d.ts +91 -0
  217. package/dist/types/packages/dom/src/host.d.ts +13 -14
  218. package/dist/types/packages/dom/src/index.d.ts +12 -10
  219. package/dist/types/packages/dom/src/loop.d.ts +18 -1
  220. package/dist/types/packages/dom/src/pointer-adapter.d.ts +5 -29
  221. package/dist/types/packages/dom/src/widget-focus.d.ts +17 -13
  222. package/dist/types/packages/ice/src/desk-engine.d.ts +2 -0
  223. package/dist/types/packages/ice/src/desk-kit.d.ts +6 -0
  224. package/dist/types/packages/ice/src/desk-objects.d.ts +5 -0
  225. package/dist/types/packages/ice/src/desk.d.ts +5 -0
  226. package/dist/types/packages/kernel/src/atlas-pack.d.ts +157 -0
  227. package/dist/types/packages/kernel/src/bezier.d.ts +0 -15
  228. package/dist/types/packages/kernel/src/coords.d.ts +0 -39
  229. package/dist/types/packages/kernel/src/index.d.ts +2 -2
  230. package/dist/types/packages/kernel/src/nav-flight.d.ts +6 -0
  231. package/dist/types/packages/kernel/src/tray.d.ts +155 -0
  232. package/dist/types/packages/objects/src/board/board-pass.d.ts +180 -0
  233. package/dist/types/packages/objects/src/board/board-pen.d.ts +36 -0
  234. package/dist/types/packages/objects/src/board/board.d.ts +104 -0
  235. package/dist/types/packages/objects/src/board/data.d.ts +31 -0
  236. package/dist/types/packages/objects/src/board/history.d.ts +33 -0
  237. package/dist/types/packages/objects/src/board/kind.d.ts +208 -0
  238. package/dist/types/packages/objects/src/board/layout.d.ts +102 -0
  239. package/dist/types/packages/objects/src/board/object.d.ts +7 -0
  240. package/dist/types/packages/objects/src/board/pen.d.ts +71 -0
  241. package/dist/types/packages/objects/src/board/shaders.d.ts +36 -0
  242. package/dist/types/packages/objects/src/board/stroke.d.ts +99 -0
  243. package/dist/types/packages/objects/src/board/theme.d.ts +150 -0
  244. package/dist/types/packages/objects/src/calendar/data.d.ts +97 -0
  245. package/dist/types/packages/objects/src/calendar/events.d.ts +58 -0
  246. package/dist/types/packages/objects/src/calendar/hand.d.ts +53 -0
  247. package/dist/types/packages/objects/src/calendar/host/input.d.ts +67 -0
  248. package/dist/types/packages/objects/src/calendar/host/print.d.ts +9 -0
  249. package/dist/types/packages/objects/src/calendar/kind.d.ts +297 -0
  250. package/dist/types/packages/objects/src/calendar/law.d.ts +151 -0
  251. package/dist/types/packages/objects/src/calendar/layout.d.ts +47 -0
  252. package/dist/types/packages/objects/src/calendar/month.d.ts +75 -0
  253. package/dist/types/packages/objects/src/calendar/object.d.ts +45 -0
  254. package/dist/types/packages/objects/src/calendar/pad.d.ts +42 -0
  255. package/dist/types/packages/objects/src/calendar/pass.d.ts +229 -0
  256. package/dist/types/packages/objects/src/calendar/print.d.ts +87 -0
  257. package/dist/types/packages/objects/src/calendar/printing.d.ts +80 -0
  258. package/dist/types/packages/objects/src/calendar/roll.d.ts +45 -0
  259. package/dist/types/packages/objects/src/calendar/shaders.d.ts +12 -0
  260. package/dist/types/packages/objects/src/calendar/sheet.d.ts +43 -0
  261. package/dist/types/packages/objects/src/calendar/tiles.d.ts +67 -0
  262. package/dist/types/packages/objects/src/calendar/turn.d.ts +73 -0
  263. package/dist/types/packages/objects/src/calendar/writing.d.ts +42 -0
  264. package/dist/types/packages/objects/src/index.d.ts +22 -0
  265. package/dist/types/packages/objects/src/kinds.d.ts +24 -0
  266. package/dist/types/packages/objects/src/minimat/inside.d.ts +17 -0
  267. package/dist/types/packages/objects/src/minimat/kind.d.ts +51 -0
  268. package/dist/types/packages/objects/src/minimat/layout.d.ts +83 -0
  269. package/dist/types/packages/objects/src/minimat/minimat.d.ts +179 -0
  270. package/dist/types/packages/objects/src/minimat/object.d.ts +8 -0
  271. package/dist/types/packages/objects/src/minimat/pass.d.ts +61 -0
  272. package/dist/types/packages/objects/src/minimat/shaders.d.ts +10 -0
  273. package/dist/types/packages/objects/src/minimat/theme.d.ts +98 -0
  274. package/dist/types/packages/objects/src/notebook/ink.d.ts +70 -0
  275. package/dist/types/packages/objects/src/notebook/kind.d.ts +236 -0
  276. package/dist/types/packages/objects/src/notebook/law.d.ts +129 -0
  277. package/dist/types/packages/objects/src/notebook/layout.d.ts +46 -0
  278. package/dist/types/packages/objects/src/notebook/leaf.d.ts +44 -0
  279. package/dist/types/packages/objects/src/notebook/mesh.d.ts +20 -0
  280. package/dist/types/packages/objects/src/notebook/motion.d.ts +107 -0
  281. package/dist/types/packages/objects/src/notebook/object.d.ts +8 -0
  282. package/dist/types/packages/objects/src/notebook/pages.d.ts +56 -0
  283. package/dist/types/packages/objects/src/notebook/pass.d.ts +197 -0
  284. package/dist/types/packages/objects/src/notebook/pick.d.ts +30 -0
  285. package/dist/types/packages/objects/src/notebook/raster.d.ts +28 -0
  286. package/dist/types/packages/objects/src/notebook/shaders.d.ts +11 -0
  287. package/dist/types/packages/objects/src/notebook/shape.d.ts +155 -0
  288. package/dist/types/packages/objects/src/notebook/theme.d.ts +76 -0
  289. package/dist/types/packages/objects/src/palette.d.ts +577 -0
  290. package/dist/types/packages/objects/src/paper/host/body.d.ts +30 -0
  291. package/dist/types/packages/objects/src/paper/kind.d.ts +81 -0
  292. package/dist/types/packages/objects/src/paper/layout.d.ts +73 -0
  293. package/dist/types/packages/objects/src/paper/object.d.ts +31 -0
  294. package/dist/types/packages/objects/src/paper/pages.d.ts +43 -0
  295. package/dist/types/packages/objects/src/paper/paper-pass.d.ts +86 -0
  296. package/dist/types/packages/objects/src/paper/paper.d.ts +117 -0
  297. package/dist/types/packages/objects/src/paper/shaders.d.ts +18 -0
  298. package/dist/types/packages/objects/src/paper/theme.d.ts +58 -0
  299. package/dist/types/packages/objects/src/paper/typing.d.ts +51 -0
  300. package/dist/types/packages/objects/src/paper/writing.d.ts +161 -0
  301. package/dist/types/packages/objects/src/photo/carry.d.ts +33 -0
  302. package/dist/types/packages/objects/src/photo/kind.d.ts +136 -0
  303. package/dist/types/packages/objects/src/photo/layout.d.ts +39 -0
  304. package/dist/types/packages/objects/src/photo/object.d.ts +5 -0
  305. package/dist/types/packages/objects/src/photo/photo-pass.d.ts +104 -0
  306. package/dist/types/packages/objects/src/photo/photo.d.ts +262 -0
  307. package/dist/types/packages/objects/src/photo/pictures.d.ts +152 -0
  308. package/dist/types/packages/objects/src/photo/sample.d.ts +9 -0
  309. package/dist/types/packages/objects/src/photo/shaders.d.ts +18 -0
  310. package/dist/types/packages/objects/src/preset.d.ts +44 -0
  311. package/dist/types/packages/objects/src/shaders.d.ts +3 -0
  312. package/dist/types/packages/objects/src/shaders.gen.d.ts +21 -0
  313. package/dist/types/packages/react/src/canvas-hooks.d.ts +12 -0
  314. package/dist/types/packages/react/src/desk.d.ts +56 -0
  315. package/dist/types/packages/react/src/engine-context.d.ts +2 -2
  316. package/dist/types/packages/react/src/frame-preview-boundary.d.ts +19 -0
  317. package/dist/types/packages/react/src/hooks.d.ts +9 -14
  318. package/dist/types/packages/react/src/index.d.ts +16 -9
  319. package/dist/types/packages/react/src/keymap.d.ts +21 -2
  320. package/dist/types/packages/react/src/selection-menu.d.ts +171 -0
  321. package/dist/types/packages/react/src/tray-bar.d.ts +124 -0
  322. package/package.json +64 -31
  323. package/dist/chunk-2TNVB2ON.js +0 -1163
  324. package/dist/chunk-2TNVB2ON.js.map +0 -1
  325. package/dist/chunk-OR5FNVUE.js.map +0 -1
  326. package/dist/chunk-Q665T4L7.js +0 -681
  327. package/dist/chunk-Q665T4L7.js.map +0 -1
  328. package/dist/chunk-VGVDJZSP.js.map +0 -1
  329. package/dist/ground.js +0 -1108
  330. package/dist/ground.js.map +0 -1
  331. package/dist/r3f.js +0 -1644
  332. package/dist/r3f.js.map +0 -1
  333. package/dist/types/packages/core/src/input/measure-queue.d.ts +0 -30
  334. package/dist/types/packages/core/src/settings/ground-config.d.ts +0 -101
  335. package/dist/types/packages/core/src/systems/measure-ingest.d.ts +0 -26
  336. package/dist/types/packages/devtools/src/gl-panel.d.ts +0 -69
  337. package/dist/types/packages/dom/src/measure-adapter.d.ts +0 -31
  338. package/dist/types/packages/dom/src/measure-wiring.d.ts +0 -49
  339. package/dist/types/packages/dom/src/planes.d.ts +0 -33
  340. package/dist/types/packages/dom/src/reflectors/chrome.d.ts +0 -33
  341. package/dist/types/packages/dom/src/reflectors/dom-widgets.d.ts +0 -59
  342. package/dist/types/packages/dom/src/reflectors/graybox.d.ts +0 -31
  343. package/dist/types/packages/dom/src/reflectors/plane-transform.d.ts +0 -38
  344. package/dist/types/packages/ground/src/index.d.ts +0 -69
  345. package/dist/types/packages/ground/src/layer.d.ts +0 -40
  346. package/dist/types/packages/ground/src/pass.d.ts +0 -41
  347. package/dist/types/packages/ground/src/passes/grid-contract.d.ts +0 -28
  348. package/dist/types/packages/ground/src/passes/grid-magnet-pass.d.ts +0 -2
  349. package/dist/types/packages/ground/src/passes/grid-magnet.d.ts +0 -31
  350. package/dist/types/packages/ground/src/passes/grid.d.ts +0 -10
  351. package/dist/types/packages/ground/src/passes/guides-collect.d.ts +0 -14
  352. package/dist/types/packages/ground/src/passes/guides.d.ts +0 -3
  353. package/dist/types/packages/ground/src/passes/magnet-collect.d.ts +0 -63
  354. package/dist/types/packages/ground/src/passes/soup-collect.d.ts +0 -35
  355. package/dist/types/packages/ground/src/passes/soup-mesh.d.ts +0 -8
  356. package/dist/types/packages/ground/src/passes/wires-collect.d.ts +0 -35
  357. package/dist/types/packages/ground/src/passes/wires.d.ts +0 -10
  358. package/dist/types/packages/ground/src/poles.d.ts +0 -47
  359. package/dist/types/packages/ground/src/renderer.d.ts +0 -15
  360. package/dist/types/packages/ice/src/ground.d.ts +0 -1
  361. package/dist/types/packages/ice/src/r3f.d.ts +0 -1
  362. package/dist/types/packages/kernel/src/eviction.d.ts +0 -23
  363. package/dist/types/packages/kernel/src/zoom-bands.d.ts +0 -19
  364. package/dist/types/packages/r3f/src/bridge.d.ts +0 -129
  365. package/dist/types/packages/r3f/src/composite-material.d.ts +0 -26
  366. package/dist/types/packages/r3f/src/compositor-pass.d.ts +0 -105
  367. package/dist/types/packages/r3f/src/dev-write-trap.d.ts +0 -30
  368. package/dist/types/packages/r3f/src/gl-root.d.ts +0 -96
  369. package/dist/types/packages/r3f/src/gl-router.d.ts +0 -70
  370. package/dist/types/packages/r3f/src/index.d.ts +0 -17
  371. package/dist/types/packages/r3f/src/island-state.d.ts +0 -112
  372. package/dist/types/packages/r3f/src/island.d.ts +0 -13
  373. package/dist/types/packages/r3f/src/pool.d.ts +0 -56
  374. package/dist/types/packages/r3f/src/preview-capture.d.ts +0 -19
  375. package/dist/types/packages/r3f/src/resource-registry.d.ts +0 -30
  376. package/dist/types/packages/r3f/src/self-sustain.d.ts +0 -39
  377. package/dist/types/packages/r3f/src/use-island-frame.d.ts +0 -39
  378. package/dist/types/packages/react/src/infinite-canvas.d.ts +0 -140
  379. package/dist/types/packages/react/src/preview-snapshots.d.ts +0 -17
  380. package/dist/types/packages/react/src/widget-preview.d.ts +0 -14
  381. package/dist/types/packages/react/src/widget-root.d.ts +0 -33
@@ -0,0 +1,41 @@
1
+ import type { MarkBar, MarkGuide } from "./layout";
2
+ /** A world rect, top-left to bottom-right. */
3
+ export interface WorldBox {
4
+ readonly x0: number;
5
+ readonly y0: number;
6
+ readonly x1: number;
7
+ readonly y1: number;
8
+ }
9
+ /** A guide as the world states it: a line along `axis` at world `at` (kernel `SnapGuide.position`); its type when the caller knows it. */
10
+ export interface WorldGuide {
11
+ readonly axis: "x" | "y";
12
+ readonly at: number;
13
+ readonly type?: "edge" | "center";
14
+ }
15
+ /** An equal gap as the world states it (core `SpacingBar`): world units. */
16
+ export interface WorldBar {
17
+ readonly axis: "x" | "y";
18
+ readonly from: number;
19
+ readonly to: number;
20
+ readonly perp: number;
21
+ readonly gap: number;
22
+ }
23
+ export interface LaserCamera {
24
+ readonly x: number;
25
+ readonly y: number;
26
+ readonly zoom: number;
27
+ }
28
+ /** desk.js `setGuides`: the span a guide is bright over reaches this far (CSS px) past the objects it aligns. */
29
+ export declare const LASER_PAST = 14;
30
+ /**
31
+ * The laser on screen: each guide's line, type, bright span and flares; each gap's bar. `others` are the rects the
32
+ * snap aligned against (the objects not dragged), `dragged` the dragged set's union (null: none — a guide with nothing
33
+ * dragged is still drawn, over what lies on it). An object lies on a line when its edge or centre is within half a
34
+ * screen px of it (desk.js's 0.05 world units at zoom 1 — relative here, so it holds at every zoom).
35
+ */
36
+ export declare function laserOf(guides: readonly WorldGuide[], bars: readonly WorldBar[], others: readonly WorldBox[], dragged: WorldBox | null, cam: LaserCamera, past?: number): {
37
+ readonly guides: MarkGuide[];
38
+ readonly bars: MarkBar[];
39
+ };
40
+ /** The key a guide set strikes on (desk.js: a NEW alignment flashes) — the axes and positions, then the gaps, at 0.1 (desk.js ran the two lists together; a `#` keeps them apart). */
41
+ export declare function laserKey(guides: readonly WorldGuide[], bars: readonly WorldBar[]): string;
@@ -0,0 +1,167 @@
1
+ import { type GlyphAtlasMeta } from "../mat/layout";
2
+ /** One mark, as the shader reads it — see each field's use per kind in marks.wgsl. */
3
+ export declare const MarkStruct: import("../engine").StructDef<"aux" | "shape" | "centre" | "half" | "colour" | "quad">;
4
+ /** The pass's block: the view (CSS px, dpr) and the glyph atlas (width, height in texels, texels per CSS px, cell width in texels). */
5
+ export declare const MarksUniformsStruct: import("../engine").StructDef<"view" | "fade" | "atlas">;
6
+ /** The primitives (marks.wgsl's `MARK_*`). */
7
+ export declare const MARK: {
8
+ readonly stroke: 0;
9
+ readonly fill: 1;
10
+ readonly brackets: 2;
11
+ readonly segment: 3;
12
+ readonly bar: 4;
13
+ readonly flare: 5;
14
+ readonly glyph: 6;
15
+ readonly tape: 7;
16
+ };
17
+ /** A mark of light: added, never painted over. */
18
+ export declare const LIGHT = 1;
19
+ export type V4 = readonly [number, number, number, number];
20
+ export interface MarkRecord {
21
+ readonly shape: V4;
22
+ readonly centre: V4;
23
+ readonly half: V4;
24
+ readonly colour: V4;
25
+ readonly aux: V4;
26
+ readonly quad: V4;
27
+ }
28
+ /** A screen rect, CSS px. */
29
+ export interface MarkBox {
30
+ readonly x0: number;
31
+ readonly y0: number;
32
+ readonly x1: number;
33
+ readonly y1: number;
34
+ }
35
+ /** An object's silhouette as the marks go around it: its centre, half extents, turn and corner — world units from a kind (`frame`), CSS px on screen. */
36
+ export interface MarkFrame {
37
+ readonly cx: number;
38
+ readonly cy: number;
39
+ readonly hx: number;
40
+ readonly hy: number;
41
+ readonly angle: number;
42
+ readonly r: number;
43
+ }
44
+ /**
45
+ * One object's marks: `brackets` (a sole selection — `t` the lock-on's LINEAR progress 0..1, eased here on
46
+ * `--vf-ease-lift`; `alpha` its presence, 0 when it has left) or `member` (one of several, or touched by the
47
+ * vellum: quiet ticks at `alpha`); `knobs` where it resizes and nothing moves it.
48
+ */
49
+ export interface MarkObject {
50
+ readonly frame: MarkFrame;
51
+ readonly style: "brackets" | "member";
52
+ readonly t: number;
53
+ readonly alpha: number;
54
+ readonly knobs: boolean;
55
+ }
56
+ /** Several's union: the members' screen box (the frames' extents), its lock-on and presence. */
57
+ export interface MarkUnion {
58
+ readonly box: MarkBox;
59
+ readonly t: number;
60
+ readonly alpha: number;
61
+ }
62
+ /** The vellum being drawn: its screen rect, what it touches (the count by the cursor), the cursor. */
63
+ export interface MarkMarquee {
64
+ readonly rect: MarkBox;
65
+ readonly count: number;
66
+ readonly pointer: {
67
+ readonly x: number;
68
+ readonly y: number;
69
+ } | null;
70
+ }
71
+ /** A laser guide (kernel `SnapGuide` on screen): its line's `at`, edge or centre, the span it is bright over (the aligned objects' extent), the aligned corners (flares). */
72
+ export interface MarkGuide {
73
+ readonly axis: "x" | "y";
74
+ readonly at: number;
75
+ readonly type: "edge" | "center";
76
+ readonly span: readonly [number, number];
77
+ readonly points: readonly (readonly [number, number])[];
78
+ }
79
+ /** An equal gap (core `SpacingBar` on screen): along `axis` from → to at `perp`, its size in WORLD units (the number). */
80
+ export interface MarkBar {
81
+ readonly axis: "x" | "y";
82
+ readonly from: number;
83
+ readonly to: number;
84
+ readonly perp: number;
85
+ readonly gap: number;
86
+ }
87
+ /** A taped object's tape: its frame on screen, CSS px per object unit (the zoom, the lift), each strip's press (0..1, linear), the tape's presence. */
88
+ export interface MarkTape {
89
+ readonly frame: MarkFrame;
90
+ readonly units: number;
91
+ readonly press: readonly [number, number];
92
+ readonly alpha: number;
93
+ }
94
+ /** Your extent on the rulers: the selection's screen box, its world edges, and the rulers' margin and band (CSS px). */
95
+ export interface MarkRuler {
96
+ readonly sel: MarkBox;
97
+ readonly world: MarkBox;
98
+ readonly margin: number;
99
+ readonly band: number;
100
+ }
101
+ export interface MarksInput {
102
+ readonly view: {
103
+ readonly width: number;
104
+ readonly height: number;
105
+ readonly dpr: number;
106
+ };
107
+ /** The Moon is up: the tape is moonlit and the vellum cooler; the pencil and the laser are light and do not change. */
108
+ readonly night: boolean;
109
+ readonly tape: readonly MarkTape[];
110
+ readonly objects: readonly MarkObject[];
111
+ readonly union: MarkUnion | null;
112
+ readonly marquee: MarkMarquee | null;
113
+ readonly guides: readonly MarkGuide[];
114
+ readonly bars: readonly MarkBar[];
115
+ /** A new alignment's strike, 1 … 0 over 160 ms: the bloom and the flares at up to 1.8×. */
116
+ readonly strike: number;
117
+ readonly ruler: MarkRuler | null;
118
+ }
119
+ /** A frame with nothing marked. */
120
+ export declare const NO_MARKS: (view: MarksInput["view"], night?: boolean) => MarksInput;
121
+ /** A bracket's reach: never over 30 % of the frame's side, never under its corner + 2 (chrome.js `bracketsPath`). */
122
+ export declare const bracketReach: (reach: number, X: number, Y: number, R: number) => number;
123
+ /** A sole selection's frame at lock-on progress `t`: how far out it stands (6 at rest, 8 further as it arrives), its corner, its presence at `alpha`. */
124
+ export declare function selectionGeometry(f: MarkFrame, t: number, alpha: number): {
125
+ readonly gap: number;
126
+ readonly X: number;
127
+ readonly Y: number;
128
+ readonly R: number;
129
+ readonly a: number;
130
+ readonly collapsed: boolean;
131
+ };
132
+ /** How wide a string sets in the atlas, CSS px (10 px mono: a 6 px advance before an atlas is here). */
133
+ export declare function textWidth(text: string, atlas: GlyphAtlasMeta): number;
134
+ /** A number the desk states: a rounded pill 8 wider than its text and 15 tall, the text centred in it (chrome.js `pill`). */
135
+ export declare function pillBox(x: number, y: number, s: string, align: "center" | "left" | "right", atlas: GlyphAtlasMeta): MarkBox;
136
+ /**
137
+ * The tray's name tags' look (K5b, D-K5b.7 — a call for James; one word switches back): `"tape"` — a strip of LABEL-MAKER tape stuck
138
+ * to the board under each specimen, its capitals embossed; `"pill"` — K5a's marks-style chip.
139
+ */
140
+ export declare const TRAY_TAG_STYLE: "tape" | "pill";
141
+ /**
142
+ * A NAME TAG (design-017 §8; K5a — under each of the tray's specimens), centred at (x, y) — screen px, the label in the rulers' capitals
143
+ * (the atlas holds no other case): by `TRAY_TAG_STYLE`, a strip of embossed label tape (K5b) or the marks' pill in the paper's white with
144
+ * the pencil's ink (K5a). By night (`night` 0 … 1) each steps back as a card does under the Moon.
145
+ */
146
+ export declare function tagMarks(label: string, x: number, y: number, atlas: GlyphAtlasMeta, dpr: number, night?: number, style?: "tape" | "pill"): MarkRecord[];
147
+ /** The two strips on screen: centre, half extents, turn, presence — each pressed from 1.22× on `--vf-ease-lift`. */
148
+ export declare function tapeStrips(t: MarkTape): {
149
+ readonly cx: number;
150
+ readonly cy: number;
151
+ readonly hx: number;
152
+ readonly hy: number;
153
+ readonly angle: number;
154
+ readonly alpha: number;
155
+ }[];
156
+ /** Every mark this frame, in paint order, for the pass. `atlas` = the rulers' glyph atlas (the numbers; none = no numbers). */
157
+ export declare function layoutMarks(input: MarksInput, atlas?: GlyphAtlasMeta): MarkRecord[];
158
+ /** The screen box of the frames (each turned frame's extent) — several's union, the menu's anchor. */
159
+ export declare function framesBox(frames: readonly MarkFrame[]): MarkBox | null;
160
+ /** A world frame under a camera (`Camera.x/y` = the view's world top-left), CSS px — the marks' one conversion. */
161
+ export declare function frameOnScreen(f: MarkFrame, cam: {
162
+ readonly x: number;
163
+ readonly y: number;
164
+ readonly zoom: number;
165
+ }): MarkFrame;
166
+ /** The box the marks around a selection occupy on screen — the brackets' (6 out) or the union's (10 out): the selection menu's anchor. */
167
+ export declare function selectionBox(frames: readonly MarkFrame[]): MarkBox | null;
@@ -0,0 +1,59 @@
1
+ import type { MatPass } from "../kit/view";
2
+ import { type MarkRecord, type MarksInput } from "./layout";
3
+ import type { MarksShaders } from "./shaders";
4
+ export declare class MarksPass {
5
+ private readonly device;
6
+ private readonly mat;
7
+ private readonly pipeline;
8
+ private readonly layout;
9
+ private readonly sampler;
10
+ private readonly uniformBuf;
11
+ private readonly uniforms;
12
+ private records;
13
+ private recordBuf;
14
+ private group;
15
+ private boundAssets;
16
+ private count;
17
+ private tags;
18
+ private last;
19
+ private lastTags;
20
+ private constructor();
21
+ /** The pipeline on `format`, sampling `mat`'s glyph atlas (the root's: its assets are every slot's). */
22
+ static create(device: GPUDevice, format: GPUTextureFormat, src: MarksShaders, mat: MatPass): Promise<MarksPass>;
23
+ /**
24
+ * Lay this frame's marks out and upload them (before the frame's pass begins); after them, the tray's NAME TAGS (K5a — drawn apart,
25
+ * `drawTags`, where the tray says). Returns the count of the frame's marks that will draw (`draw`).
26
+ */
27
+ prepare(input: MarksInput | undefined, tray?: {
28
+ readonly view: {
29
+ readonly width: number;
30
+ readonly height: number;
31
+ readonly dpr: number;
32
+ };
33
+ readonly tags: readonly {
34
+ readonly label: string;
35
+ readonly x: number;
36
+ readonly y: number;
37
+ }[];
38
+ readonly night?: number;
39
+ readonly fade?: {
40
+ readonly top: number;
41
+ readonly band: number;
42
+ } | undefined;
43
+ }): number;
44
+ /** The pipeline and its group, bound (rebound when the mat's assets or the records' buffer changed). */
45
+ private bind;
46
+ /** The marks into the open pass — over everything drawn so far (the caller resets the scissor to the view). */
47
+ draw(pass: GPURenderPassEncoder): void;
48
+ /** The tray's name tags (K5a) into the open pass, under the caller's scissor (the drawer's face). */
49
+ drawTags(pass: GPURenderPassEncoder): void;
50
+ /** The tray's name tags laid by the last prepare. */
51
+ get tagCount(): number;
52
+ /** …and their records (a rig's witness). */
53
+ get tagsLaid(): readonly MarkRecord[];
54
+ /** Marks drawn by the last prepare. */
55
+ get drawn(): number;
56
+ /** The last prepare's records — a rig's and a check's witness (what was drawn, where). */
57
+ get laid(): readonly MarkRecord[];
58
+ dispose(): void;
59
+ }
@@ -0,0 +1,12 @@
1
+ import type { ShaderPart } from "../engine/shader";
2
+ export interface MarksShaders {
3
+ readonly modules: readonly ShaderPart[];
4
+ readonly entry: ShaderPart;
5
+ }
6
+ export interface MarksShaderText {
7
+ readonly primitives: string;
8
+ readonly marks: string;
9
+ readonly marksPass: string;
10
+ }
11
+ export declare const MARKS_SHADER_FILES: Record<keyof MarksShaderText, string>;
12
+ export declare function marksShaders(t: MarksShaderText): MarksShaders;
@@ -0,0 +1,50 @@
1
+ import { type FadeIn, type View } from "../lattice/lod";
2
+ import type { Presentation } from "../nav/portal";
3
+ import { type MatConfig, type MatFrame, type SlotLight } from "./layout";
4
+ export interface GridConfig {
5
+ /** A rung fades in between these cell sizes, CSS px (lod.ts `FadeIn`) — the mat's lines, the rulers' ticks, a mini mat's face. */
6
+ readonly fadeIn: FadeIn;
7
+ /** The cutting mat's tuning (mat/layout.ts) — theme.ts's numbers unless a host tweaks them. */
8
+ readonly mat: MatConfig;
9
+ }
10
+ /** The engine's grid: the fade-in law and the mat as theme.ts has them. */
11
+ export declare const DEFAULT_GRID: GridConfig;
12
+ /** One slot's frame: the root's, a flight's departed one, or a mini mat's inside. */
13
+ export interface SlotFrame {
14
+ readonly view: View & {
15
+ readonly dpr: number;
16
+ };
17
+ /**
18
+ * The zoom this slot's lattice is DRESSED for (PORTAL.md §9): its fade-in window scales by
19
+ * `view.zoom / lodZoom`, so the grid looks like the grid at `lodZoom`, scaled — a mini mat's
20
+ * face shows its inside as it will look at the arrival, an arriving slot lands on its own
21
+ * dressing, a departed one keeps the cut's. Absent = the view's zoom: the root at rest.
22
+ */
23
+ readonly lodZoom?: number;
24
+ /** The mat's clocks and tilt for this frame; absent = a still (STILL_MAT_FRAME). */
25
+ readonly mat?: MatFrame;
26
+ /** Opacity and the portal clip (nav/portal.ts); absent = everything, at full strength. */
27
+ readonly present?: Presentation;
28
+ /**
29
+ * The lamp this slot is lit by (MINIMAT.md §4; mat/layout.ts `SlotLight`). Absent = the
30
+ * host's: a mini mat's inside lies under the lamp of the desk the mini mat lies on, so the
31
+ * ground hands every nested slot its parent's light, and the root its own camera.
32
+ */
33
+ readonly light?: SlotLight;
34
+ }
35
+ /**
36
+ * The scale a lattice is dressed by for `lodZoom` (PORTAL.md §9): `σ = zoom / lodZoom` — the
37
+ * lattice at `lodZoom` scaled whole — floored at `GRID.dressFloor` (a miniature's grid is never
38
+ * finer than that share of the desk's). 1 = the identity: the object itself, not a copy.
39
+ */
40
+ export declare function dressScale(zoom: number, lodZoom?: number): number;
41
+ /** The grid a slot renders with when dressed for `lodZoom`: its fade-in window scaled by `dressScale`. */
42
+ export declare function dressGrid(cfg: GridConfig, zoom: number, lodZoom?: number): GridConfig;
43
+ /** What a slot's grid did this frame: the lattice's decade and its fade, and whether the wind blew. */
44
+ export interface GridStats {
45
+ readonly k0: number;
46
+ readonly fade: number;
47
+ readonly wind: boolean;
48
+ }
49
+ /** The stats of a view's lattice (the wind the pass reports). */
50
+ export declare const gridStats: (view: View, wind: boolean) => GridStats;
@@ -0,0 +1,14 @@
1
+ import { type ProjectorSpec } from "./projector";
2
+ /** The lamp over the desk in WORLD units: where it stands on the plane, and how high above it. */
3
+ export interface Lamp {
4
+ readonly x: number;
5
+ readonly y: number;
6
+ readonly h: number;
7
+ }
8
+ /** The gobo projector as a lamp on the world plane (mat.wgsl `desk_of` inverted: world = (desk − origin) / metresPerUnit). */
9
+ export declare function lampOf(plane: {
10
+ readonly originX: number;
11
+ readonly originZ: number;
12
+ readonly metresPerUnit: number;
13
+ readonly deskY: number;
14
+ }, p?: ProjectorSpec): Lamp;
@@ -0,0 +1,144 @@
1
+ import { type FadeIn, type View } from "../lattice/lod";
2
+ import type { LineLaw } from "../lattice/line";
3
+ import { type RulerLaw } from "../lattice/ruler";
4
+ import { type RGB } from "../theme";
5
+ import { type Presentation } from "../nav/portal";
6
+ import type { CameraState } from "../nav/flight";
7
+ import { type Mat4 } from "./projector";
8
+ import { type MatLight } from "./night";
9
+ export declare const MatUniforms: import("../engine").StructDef<"ground" | "view" | "light" | "phase" | "presence" | "cam" | "rungs" | "lod" | "line" | "grain" | "ink" | "plane" | "goboMatrix" | "goboParams" | "gobo" | "grade" | "noise" | "wind" | "night" | "moon" | "rod" | "eigengrau" | "portals" | "clips" | "ruler" | "rulerText" | "rulerAlpha" | "rulerOrigin" | "rulerGlyph" | "rulerAtlas" | "rulerSites" | "rulerFormat" | "box" | "light2">;
10
+ export type PlateName = "c" | "b";
11
+ /** The rulers printed on the mat (RULER.md): the law's numbers, and whether this slot prints them at all — the ROOT does, a portal's inside never. */
12
+ export interface RulerConfig extends RulerLaw {
13
+ readonly on: boolean;
14
+ }
15
+ /**
16
+ * What the pass knows about the glyph atlas it samples for the labels
17
+ * (`MatPass.setGlyphs`): "0123456789-." in that order, one cell each, drawn
18
+ * `PAD` texels in from the cell's left edge with the baseline `baseline`
19
+ * texels under the cell's top, at `scale` texels per CSS px of the ruler's
20
+ * text size. The lab renders it from the product's mono stack at the device's
21
+ * ratio; the oracle reads a committed one (lab/assets/glyphs-mono-2x.r8).
22
+ */
23
+ export interface GlyphAtlasMeta {
24
+ readonly scale: number;
25
+ readonly cellW: number;
26
+ readonly cellH: number;
27
+ readonly advance: number;
28
+ readonly baseline: number;
29
+ readonly cap: number;
30
+ readonly width: number;
31
+ readonly height: number;
32
+ readonly count: number;
33
+ }
34
+ /** Texels between a cell's left edge and its glyph's origin — room for a bearing either way. */
35
+ export declare const GLYPH_PAD = 2;
36
+ /**
37
+ * The glyphs the atlas holds, in cell order: the rulers' twelve first (ruler.wgsl indexes them by
38
+ * this), then the capitals and the few marks a mini mat's printed NAME may use (MINIMAT.md §2) —
39
+ * the design's print label is mono capitals. An atlas holds at least the rulers' twelve.
40
+ */
41
+ export declare const GLYPHS: string;
42
+ /** The rulers' own glyphs — the first this many of `GLYPHS`, what every atlas must hold. */
43
+ export declare const RULER_GLYPHS = 12;
44
+ /** No atlas uploaded: a 1×1 empty cell — labels sample nothing. */
45
+ export declare const NO_GLYPHS: GlyphAtlasMeta;
46
+ /** The mat's tuning — theme.ts's numbers unless a host tweaks them. */
47
+ export interface MatConfig {
48
+ readonly line: LineLaw;
49
+ readonly grain: number;
50
+ readonly ground: RGB;
51
+ readonly ink: RGB;
52
+ readonly gobo: {
53
+ readonly opacity: number;
54
+ readonly blurTexels: number;
55
+ readonly shadeMix: number;
56
+ readonly darkFloor: number;
57
+ readonly saturate: number;
58
+ readonly sharp: number;
59
+ readonly soft: number;
60
+ readonly plate: PlateName;
61
+ };
62
+ readonly plane: {
63
+ readonly metresPerUnit: number;
64
+ readonly originX: number;
65
+ readonly originZ: number;
66
+ readonly deskY: number;
67
+ };
68
+ /** The rulers (RULER.md); off unless a host prints them on this slot. */
69
+ readonly ruler: RulerConfig;
70
+ }
71
+ /**
72
+ * The LIGHT a slot is lit by (MINIMAT.md §4) — the camera the lamp's gobo is sampled under, not the one
73
+ * the slot draws under. The root at rest is lit by its own lamp (absent = that). A mini mat's inside is
74
+ * lit by the lamp of the desk the mini mat lies on — `a` is the host's camera — so the dapple runs across
75
+ * the mini mat as across any object on the desk. While a flight, or a zoom-through's re-dressing, hands
76
+ * one desk's lamp to the other, the two are cross-faded: `t` of the way to `b`. Each camera is in the
77
+ * frame it belongs to; none need share the slot's.
78
+ */
79
+ export interface SlotLight {
80
+ readonly a: CameraState;
81
+ readonly b?: CameraState;
82
+ readonly t?: number;
83
+ }
84
+ /** What moves per frame — the host owns every clock and the tilt. */
85
+ export interface MatFrame {
86
+ /** Seconds; drives the grain's drift. */
87
+ readonly time: number;
88
+ /** Seconds; drives the wind. Advanced by the host at its wind speed. */
89
+ readonly goboTime: number;
90
+ /** `projection · view` (· tilt), column-major — `projector.ts`. */
91
+ readonly goboMatrix: Mat4;
92
+ /** Blue-noise UV offset for this frame — random while animating, fixed for a still. */
93
+ readonly noise: readonly [number, number];
94
+ }
95
+ export declare const DEFAULT_MAT_CONFIG: MatConfig;
96
+ export declare const HERO_MATRIX: Mat4;
97
+ export declare const STILL_MAT_FRAME: MatFrame;
98
+ export declare const NOISE_SIZE = 128;
99
+ export declare const PLATE_SIZE = 512;
100
+ export declare function matUniformValues(view: View & {
101
+ readonly dpr: number;
102
+ }, fadeIn: FadeIn, cfg: MatConfig, f: MatFrame, plateStrength: number, present?: Presentation, light?: MatLight, glyphs?: GlyphAtlasMeta, lit?: SlotLight): {
103
+ presence: number[];
104
+ light: number[];
105
+ light2: number[];
106
+ ruler: number[];
107
+ rulerText: number[];
108
+ rulerAlpha: number[];
109
+ rulerOrigin: number[];
110
+ rulerGlyph: number[];
111
+ rulerAtlas: number[];
112
+ rulerSites: number[];
113
+ rulerFormat: number[];
114
+ box: number[];
115
+ portals: number[];
116
+ clips: number[];
117
+ night: number[];
118
+ moon: number[];
119
+ rod: number[];
120
+ eigengrau: number[];
121
+ cam: number[];
122
+ view: number[];
123
+ phase: number[];
124
+ rungs: number[];
125
+ lod: number[];
126
+ line: number[];
127
+ grain: number[];
128
+ ground: number[];
129
+ ink: number[];
130
+ plane: number[];
131
+ goboMatrix: Mat4;
132
+ goboParams: number[];
133
+ gobo: number[];
134
+ grade: number[];
135
+ noise: number[];
136
+ wind: number[];
137
+ };
138
+ /**
139
+ * A light with its ends collapsed: a handover at t ≤ 0 is `a` alone, at t ≥ 1 `b` alone — so a slot
140
+ * at either end of one is lit through exactly the path a slot lit by that camera always takes.
141
+ */
142
+ export declare function settleLight(lit: SlotLight | undefined): SlotLight | undefined;
143
+ /** Is a slot lit by its own camera — no light, or one that settles on the camera it draws under? */
144
+ export declare function litByOwn(view: View, lit: SlotLight | undefined): boolean;
@@ -0,0 +1,83 @@
1
+ import type { FadeIn, View } from "../lattice/lod";
2
+ import type { Presentation } from "../nav/portal";
3
+ import { type GlyphAtlasMeta, type MatConfig, type MatFrame, type PlateName, type SlotLight } from "./layout";
4
+ import { type MatLight } from "./night";
5
+ import type { MatPass } from "../kit/view";
6
+ import type { MatShaders } from "./shaders";
7
+ export declare class CuttingMat implements MatPass {
8
+ readonly name = "mat/mat";
9
+ private readonly uniforms;
10
+ private readonly uniformBuf;
11
+ /** The wind target this slot samples: its plate's shared one, or its own (`own`) after a clash in one frame. */
12
+ private wind;
13
+ /** This slot's own wind target, made only when two keys meet on one plate in one frame. */
14
+ private own;
15
+ private windGroups;
16
+ private matGroup;
17
+ private bound;
18
+ private boundWind;
19
+ /** Turns over whenever this slot's bind groups are made again — a shared asset landed, or the slot samples another silhouette. */
20
+ private assets;
21
+ private windRuns;
22
+ /** The view block as last uploaded (K7a: uploaded only when its bytes moved; a layered kind compares a layer's view by it). */
23
+ private readonly sentView;
24
+ private viewSent;
25
+ private readonly device;
26
+ private readonly shared;
27
+ private constructor();
28
+ static create(device: GPUDevice, format: GPUTextureFormat, src: MatShaders): Promise<CuttingMat>;
29
+ /** A second slot on the same pipelines and plates — a flight's departed mat, a mini mat's inside. */
30
+ spawn(): CuttingMat;
31
+ /** Which assets a host has uploaded — stats, and the lab's boot line. Shared by every slot. */
32
+ get loaded(): {
33
+ readonly c: boolean;
34
+ readonly b: boolean;
35
+ readonly noise: boolean;
36
+ readonly glyphs: boolean;
37
+ };
38
+ /** What the pass knows about the glyph atlas it samples (RULER.md). */
39
+ get glyphs(): GlyphAtlasMeta;
40
+ /** This slot's animated silhouette — the wind target the mat samples; the paper pass (STICKY.md) samples the same, so a note takes the mat's dapple. */
41
+ get silhouette(): GPUTextureView;
42
+ /** The slot's ONE VIEW BLOCK (K4a, design-016 K-L3): the uniforms this mat writes once a frame, which every kind in the slot binds. */
43
+ get view(): GPUBuffer;
44
+ /** The glyph atlas as uploaded (a 1×1 empty cell until a host uploads one) — the mini mat pass prints with it. */
45
+ get glyphTexture(): GPUTexture;
46
+ /** The shared blue noise, as uploaded (a 1×1 grey until a host uploads the tile). */
47
+ get noiseTexture(): GPUTexture;
48
+ /** Bumped whenever a shared asset lands or the slot samples another silhouette — a pass that binds them rebinds on a change. */
49
+ get assetVersion(): number;
50
+ get viewBytes(): Uint8Array;
51
+ get silhouetteKey(): number;
52
+ /** A new frame (the ground's `prepareFrame`, before its slots prepare): a wind key drawn before it may be drawn over. */
53
+ newFrame(): void;
54
+ /** A plate's shared wind target, made on first use. */
55
+ private windOf;
56
+ private upload;
57
+ /** (Re)build this slot's bind groups against the shared assets' current version. */
58
+ private rebind;
59
+ /** A 512×512 rgba8 plate: R silhouette, G wind amp 1, B phase, A amps 2+3 (assets/gobo-*.rgba). Every slot samples it. */
60
+ setPlate(name: PlateName, bytes: Uint8Array<ArrayBuffer>): void;
61
+ /** The 128×128 rgba8 blue-noise tile (assets/blue-noise.rgba). Every slot samples it. */
62
+ setNoise(bytes: Uint8Array<ArrayBuffer>): void;
63
+ /**
64
+ * The glyph atlas (RULER.md): r8 coverage, `meta.width × meta.height` texels, the
65
+ * first `meta.count` glyphs of `GLYPHS` in a row of `meta.cellW` cells — at least the
66
+ * rulers' twelve; the capitals after them print a mini mat's name (MINIMAT.md §2).
67
+ * Every slot samples it (the mini mat pass too); a host re-uploads when the device's
68
+ * ratio or the text size changes.
69
+ */
70
+ setGlyphs(bytes: Uint8Array<ArrayBuffer>, meta: GlyphAtlasMeta): void;
71
+ get windPasses(): number;
72
+ /**
73
+ * Upload the uniforms (under `light` — the theme's Sun or Moon, mat/night.ts — through the lamp `lit`
74
+ * says: the slot's own when absent, the host desk's for a mini mat's inside, MINIMAT.md §4); run the
75
+ * wind pass if the silhouette it holds is stale. Returns whether it ran.
76
+ */
77
+ prepare(encoder: GPUCommandEncoder, view: View & {
78
+ readonly dpr: number;
79
+ }, fadeIn: FadeIn, cfg: MatConfig, frame: MatFrame, present?: Presentation, light?: MatLight, lit?: SlotLight): boolean;
80
+ draw(pass: GPURenderPassEncoder): void;
81
+ /** This slot's buffers; the shared plates go with the last slot standing. */
82
+ dispose(): void;
83
+ }