@vibecook/ice 0.11.0 → 0.15.0-desk.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (389) hide show
  1. package/README.md +79 -50
  2. package/dist/chunk-AMMFQP2C.js +2444 -0
  3. package/dist/chunk-AMMFQP2C.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-ENIFIUEP.js +155 -0
  7. package/dist/chunk-ENIFIUEP.js.map +1 -0
  8. package/dist/chunk-H3SKYJLK.js +8269 -0
  9. package/dist/chunk-H3SKYJLK.js.map +1 -0
  10. package/dist/{chunk-OR5FNVUE.js → chunk-JS6PG6YD.js} +398 -167
  11. package/dist/chunk-JS6PG6YD.js.map +1 -0
  12. package/dist/{chunk-VGVDJZSP.js → chunk-PFJN3XN2.js} +13232 -7388
  13. package/dist/chunk-PFJN3XN2.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-U4YMA4TJ.js +635 -0
  17. package/dist/chunk-U4YMA4TJ.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 +12734 -0
  23. package/dist/desk-objects.js.map +1 -0
  24. package/dist/desk.js +497 -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 +1047 -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 +36 -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 +73 -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 +53 -1
  93. package/dist/types/packages/core/src/systems/l2-arbitrate.d.ts +18 -4
  94. package/dist/types/packages/core/src/systems/l2-recognize.d.ts +3 -1
  95. package/dist/types/packages/core/src/systems/l3-behave.d.ts +4 -1
  96. package/dist/types/packages/core/src/systems/l3-claim.d.ts +7 -0
  97. package/dist/types/packages/core/src/systems/l3-connect.d.ts +1 -1
  98. package/dist/types/packages/core/src/systems/l3-drop.d.ts +30 -1
  99. package/dist/types/packages/core/src/systems/l3-marquee.d.ts +2 -1
  100. package/dist/types/packages/core/src/systems/l3-ports.d.ts +1 -1
  101. package/dist/types/packages/core/src/systems/l4-cursor.d.ts +5 -0
  102. package/dist/types/packages/core/src/systems/nav-flight.d.ts +85 -3
  103. package/dist/types/packages/core/src/systems/nav-tap.d.ts +44 -0
  104. package/dist/types/packages/core/src/systems/press-button.d.ts +25 -0
  105. package/dist/types/packages/core/src/systems/press-wheel.d.ts +11 -0
  106. package/dist/types/packages/core/src/systems/tray.d.ts +111 -0
  107. package/dist/types/packages/core/src/systems/zoom-through.d.ts +30 -0
  108. package/dist/types/packages/core/src/tools/define-tool.d.ts +10 -0
  109. package/dist/types/packages/core/src/widget/define-widget.d.ts +166 -63
  110. package/dist/types/packages/core/src/widget/equip.d.ts +14 -2
  111. package/dist/types/packages/core/src/widget/held-tools.d.ts +83 -0
  112. package/dist/types/packages/core/src/widget/menu-actions.d.ts +44 -0
  113. package/dist/types/packages/core/src/widget/mount-store.d.ts +21 -46
  114. package/dist/types/packages/core/src/widget/spawn.d.ts +1 -1
  115. package/dist/types/packages/desk/src/assets/blue-noise.gen.d.ts +10 -0
  116. package/dist/types/packages/desk/src/card/card.d.ts +103 -0
  117. package/dist/types/packages/desk/src/compose/ambient.d.ts +59 -0
  118. package/dist/types/packages/desk/src/compose/builder.d.ts +306 -0
  119. package/dist/types/packages/desk/src/compose/children.d.ts +3 -0
  120. package/dist/types/packages/desk/src/compose/index.d.ts +14 -0
  121. package/dist/types/packages/desk/src/compose/marks.d.ts +133 -0
  122. package/dist/types/packages/desk/src/compose/pick.d.ts +5 -0
  123. package/dist/types/packages/desk/src/compose/reflector.d.ts +120 -0
  124. package/dist/types/packages/desk/src/compose/tap.d.ts +5 -0
  125. package/dist/types/packages/desk/src/docs.d.ts +23 -0
  126. package/dist/types/packages/desk/src/engine/budget.d.ts +43 -0
  127. package/dist/types/packages/desk/src/engine/device.d.ts +54 -0
  128. package/dist/types/packages/desk/src/engine/index.d.ts +5 -0
  129. package/dist/types/packages/desk/src/engine/pipeline.d.ts +36 -0
  130. package/dist/types/packages/desk/src/engine/rasters.d.ts +66 -0
  131. package/dist/types/packages/desk/src/engine/records.d.ts +56 -0
  132. package/dist/types/packages/desk/src/engine/shader.d.ts +22 -0
  133. package/dist/types/packages/desk/src/engine/struct.d.ts +39 -0
  134. package/dist/types/packages/desk/src/engine/target.d.ts +26 -0
  135. package/dist/types/packages/desk/src/faults.d.ts +38 -0
  136. package/dist/types/packages/desk/src/gpu-ablation.d.ts +61 -0
  137. package/dist/types/packages/desk/src/gpu-memory.d.ts +54 -0
  138. package/dist/types/packages/desk/src/gpu-profiler.d.ts +141 -0
  139. package/dist/types/packages/desk/src/gpu-wrap.d.ts +8 -0
  140. package/dist/types/packages/desk/src/ground.d.ts +537 -0
  141. package/dist/types/packages/desk/src/hold/focus.d.ts +53 -0
  142. package/dist/types/packages/desk/src/hold/pose.d.ts +152 -0
  143. package/dist/types/packages/desk/src/hold/shaders.d.ts +9 -0
  144. package/dist/types/packages/desk/src/host/editor.d.ts +18 -0
  145. package/dist/types/packages/desk/src/host/index.d.ts +9 -0
  146. package/dist/types/packages/desk/src/host/ink.d.ts +18 -0
  147. package/dist/types/packages/desk/src/host/layer.d.ts +536 -0
  148. package/dist/types/packages/desk/src/host/picture.d.ts +2 -0
  149. package/dist/types/packages/desk/src/host/surface.d.ts +5 -0
  150. package/dist/types/packages/desk/src/index.d.ts +16 -0
  151. package/dist/types/packages/desk/src/kind.d.ts +189 -0
  152. package/dist/types/packages/desk/src/kinds/world.d.ts +447 -0
  153. package/dist/types/packages/desk/src/kit/arrays.d.ts +88 -0
  154. package/dist/types/packages/desk/src/kit/blobs.d.ts +40 -0
  155. package/dist/types/packages/desk/src/kit/book.d.ts +2 -0
  156. package/dist/types/packages/desk/src/kit/editor.d.ts +105 -0
  157. package/dist/types/packages/desk/src/kit/eye.d.ts +37 -0
  158. package/dist/types/packages/desk/src/kit/hold.d.ts +1 -0
  159. package/dist/types/packages/desk/src/kit/index.d.ts +26 -0
  160. package/dist/types/packages/desk/src/kit/inside.d.ts +116 -0
  161. package/dist/types/packages/desk/src/kit/layer.d.ts +159 -0
  162. package/dist/types/packages/desk/src/kit/light.d.ts +3 -0
  163. package/dist/types/packages/desk/src/kit/mesh.d.ts +29 -0
  164. package/dist/types/packages/desk/src/kit/mips.d.ts +2 -0
  165. package/dist/types/packages/desk/src/kit/nav.d.ts +2 -0
  166. package/dist/types/packages/desk/src/kit/paper-tex.d.ts +5 -0
  167. package/dist/types/packages/desk/src/kit/physics.d.ts +44 -0
  168. package/dist/types/packages/desk/src/kit/place.d.ts +44 -0
  169. package/dist/types/packages/desk/src/kit/print.d.ts +30 -0
  170. package/dist/types/packages/desk/src/kit/raster.d.ts +34 -0
  171. package/dist/types/packages/desk/src/kit/sdf.d.ts +1 -0
  172. package/dist/types/packages/desk/src/kit/seeds.d.ts +11 -0
  173. package/dist/types/packages/desk/src/kit/services.d.ts +34 -0
  174. package/dist/types/packages/desk/src/kit/springs.d.ts +12 -0
  175. package/dist/types/packages/desk/src/kit/strokes.d.ts +93 -0
  176. package/dist/types/packages/desk/src/kit/text.d.ts +142 -0
  177. package/dist/types/packages/desk/src/kit/uniform.d.ts +8 -0
  178. package/dist/types/packages/desk/src/kit/view.d.ts +39 -0
  179. package/dist/types/packages/desk/src/kit/wgsl.d.ts +15 -0
  180. package/dist/types/packages/desk/src/lattice/line.d.ts +15 -0
  181. package/dist/types/packages/desk/src/lattice/lod.d.ts +52 -0
  182. package/dist/types/packages/desk/src/lattice/ruler.d.ts +88 -0
  183. package/dist/types/packages/desk/src/marks/assemble.d.ts +65 -0
  184. package/dist/types/packages/desk/src/marks/ease.d.ts +4 -0
  185. package/dist/types/packages/desk/src/marks/laser.d.ts +41 -0
  186. package/dist/types/packages/desk/src/marks/layout.d.ts +167 -0
  187. package/dist/types/packages/desk/src/marks/pass.d.ts +59 -0
  188. package/dist/types/packages/desk/src/marks/shaders.d.ts +12 -0
  189. package/dist/types/packages/desk/src/mat/grid.d.ts +50 -0
  190. package/dist/types/packages/desk/src/mat/lamp.d.ts +14 -0
  191. package/dist/types/packages/desk/src/mat/layout.d.ts +144 -0
  192. package/dist/types/packages/desk/src/mat/mat-pass.d.ts +83 -0
  193. package/dist/types/packages/desk/src/mat/night.d.ts +95 -0
  194. package/dist/types/packages/desk/src/mat/projector.d.ts +39 -0
  195. package/dist/types/packages/desk/src/mat/shaders.d.ts +17 -0
  196. package/dist/types/packages/desk/src/mat/tilt.d.ts +14 -0
  197. package/dist/types/packages/desk/src/missing/layout.d.ts +27 -0
  198. package/dist/types/packages/desk/src/missing/object.d.ts +6 -0
  199. package/dist/types/packages/desk/src/missing/pass.d.ts +39 -0
  200. package/dist/types/packages/desk/src/missing/shaders.d.ts +7 -0
  201. package/dist/types/packages/desk/src/missing/slots.d.ts +8 -0
  202. package/dist/types/packages/desk/src/nav/flight.d.ts +186 -0
  203. package/dist/types/packages/desk/src/nav/portal.d.ts +95 -0
  204. package/dist/types/packages/desk/src/object.d.ts +46 -0
  205. package/dist/types/packages/desk/src/pass-instrument.d.ts +89 -0
  206. package/dist/types/packages/desk/src/shaders.d.ts +12 -0
  207. package/dist/types/packages/desk/src/shaders.gen.d.ts +17 -0
  208. package/dist/types/packages/desk/src/submit-instrument.d.ts +36 -0
  209. package/dist/types/packages/desk/src/theme.d.ts +497 -0
  210. package/dist/types/packages/desk/src/tray/carry.d.ts +99 -0
  211. package/dist/types/packages/desk/src/tray/drawer.d.ts +124 -0
  212. package/dist/types/packages/desk/src/tray/flux.d.ts +49 -0
  213. package/dist/types/packages/desk/src/tray/index.d.ts +4 -0
  214. package/dist/types/packages/desk/src/tray/lattice.d.ts +71 -0
  215. package/dist/types/packages/desk/src/tray/layout.d.ts +7 -0
  216. package/dist/types/packages/desk/src/tray/look.d.ts +29 -0
  217. package/dist/types/packages/desk/src/tray/pass.d.ts +101 -0
  218. package/dist/types/packages/desk/src/tray/shaders.d.ts +10 -0
  219. package/dist/types/packages/desk/src/tray/specimens.d.ts +214 -0
  220. package/dist/types/packages/devtools/src/attach.d.ts +22 -8
  221. package/dist/types/packages/devtools/src/dock.d.ts +18 -14
  222. package/dist/types/packages/devtools/src/gpu-panel.d.ts +105 -0
  223. package/dist/types/packages/devtools/src/index.d.ts +5 -4
  224. package/dist/types/packages/dom/src/desk-host.d.ts +104 -0
  225. package/dist/types/packages/dom/src/host.d.ts +13 -14
  226. package/dist/types/packages/dom/src/index.d.ts +12 -10
  227. package/dist/types/packages/dom/src/loop.d.ts +18 -1
  228. package/dist/types/packages/dom/src/pointer-adapter.d.ts +11 -29
  229. package/dist/types/packages/dom/src/widget-focus.d.ts +17 -13
  230. package/dist/types/packages/ice/src/desk-engine.d.ts +2 -0
  231. package/dist/types/packages/ice/src/desk-kit.d.ts +6 -0
  232. package/dist/types/packages/ice/src/desk-objects.d.ts +5 -0
  233. package/dist/types/packages/ice/src/desk.d.ts +5 -0
  234. package/dist/types/packages/kernel/src/atlas-pack.d.ts +157 -0
  235. package/dist/types/packages/kernel/src/bezier.d.ts +0 -15
  236. package/dist/types/packages/kernel/src/coords.d.ts +0 -39
  237. package/dist/types/packages/kernel/src/index.d.ts +2 -2
  238. package/dist/types/packages/kernel/src/nav-flight.d.ts +6 -0
  239. package/dist/types/packages/kernel/src/tray.d.ts +155 -0
  240. package/dist/types/packages/objects/src/board/board-pass.d.ts +180 -0
  241. package/dist/types/packages/objects/src/board/board-pen.d.ts +36 -0
  242. package/dist/types/packages/objects/src/board/board.d.ts +104 -0
  243. package/dist/types/packages/objects/src/board/data.d.ts +31 -0
  244. package/dist/types/packages/objects/src/board/history.d.ts +33 -0
  245. package/dist/types/packages/objects/src/board/kind.d.ts +208 -0
  246. package/dist/types/packages/objects/src/board/layout.d.ts +102 -0
  247. package/dist/types/packages/objects/src/board/object.d.ts +7 -0
  248. package/dist/types/packages/objects/src/board/pen.d.ts +71 -0
  249. package/dist/types/packages/objects/src/board/shaders.d.ts +36 -0
  250. package/dist/types/packages/objects/src/board/stroke.d.ts +99 -0
  251. package/dist/types/packages/objects/src/board/theme.d.ts +150 -0
  252. package/dist/types/packages/objects/src/calendar/data.d.ts +97 -0
  253. package/dist/types/packages/objects/src/calendar/events.d.ts +58 -0
  254. package/dist/types/packages/objects/src/calendar/hand.d.ts +53 -0
  255. package/dist/types/packages/objects/src/calendar/host/input.d.ts +67 -0
  256. package/dist/types/packages/objects/src/calendar/host/print.d.ts +9 -0
  257. package/dist/types/packages/objects/src/calendar/kind.d.ts +297 -0
  258. package/dist/types/packages/objects/src/calendar/law.d.ts +151 -0
  259. package/dist/types/packages/objects/src/calendar/layout.d.ts +47 -0
  260. package/dist/types/packages/objects/src/calendar/month.d.ts +75 -0
  261. package/dist/types/packages/objects/src/calendar/object.d.ts +45 -0
  262. package/dist/types/packages/objects/src/calendar/pad.d.ts +42 -0
  263. package/dist/types/packages/objects/src/calendar/pass.d.ts +229 -0
  264. package/dist/types/packages/objects/src/calendar/print.d.ts +87 -0
  265. package/dist/types/packages/objects/src/calendar/printing.d.ts +80 -0
  266. package/dist/types/packages/objects/src/calendar/roll.d.ts +45 -0
  267. package/dist/types/packages/objects/src/calendar/shaders.d.ts +12 -0
  268. package/dist/types/packages/objects/src/calendar/sheet.d.ts +43 -0
  269. package/dist/types/packages/objects/src/calendar/tiles.d.ts +67 -0
  270. package/dist/types/packages/objects/src/calendar/turn.d.ts +73 -0
  271. package/dist/types/packages/objects/src/calendar/writing.d.ts +42 -0
  272. package/dist/types/packages/objects/src/index.d.ts +22 -0
  273. package/dist/types/packages/objects/src/kinds.d.ts +24 -0
  274. package/dist/types/packages/objects/src/minimat/inside.d.ts +17 -0
  275. package/dist/types/packages/objects/src/minimat/kind.d.ts +51 -0
  276. package/dist/types/packages/objects/src/minimat/layout.d.ts +83 -0
  277. package/dist/types/packages/objects/src/minimat/minimat.d.ts +179 -0
  278. package/dist/types/packages/objects/src/minimat/object.d.ts +8 -0
  279. package/dist/types/packages/objects/src/minimat/pass.d.ts +61 -0
  280. package/dist/types/packages/objects/src/minimat/shaders.d.ts +10 -0
  281. package/dist/types/packages/objects/src/minimat/theme.d.ts +98 -0
  282. package/dist/types/packages/objects/src/notebook/ink.d.ts +70 -0
  283. package/dist/types/packages/objects/src/notebook/kind.d.ts +236 -0
  284. package/dist/types/packages/objects/src/notebook/law.d.ts +129 -0
  285. package/dist/types/packages/objects/src/notebook/layout.d.ts +46 -0
  286. package/dist/types/packages/objects/src/notebook/leaf.d.ts +44 -0
  287. package/dist/types/packages/objects/src/notebook/mesh.d.ts +20 -0
  288. package/dist/types/packages/objects/src/notebook/motion.d.ts +107 -0
  289. package/dist/types/packages/objects/src/notebook/object.d.ts +8 -0
  290. package/dist/types/packages/objects/src/notebook/pages.d.ts +56 -0
  291. package/dist/types/packages/objects/src/notebook/pass.d.ts +197 -0
  292. package/dist/types/packages/objects/src/notebook/pick.d.ts +30 -0
  293. package/dist/types/packages/objects/src/notebook/raster.d.ts +28 -0
  294. package/dist/types/packages/objects/src/notebook/shaders.d.ts +11 -0
  295. package/dist/types/packages/objects/src/notebook/shape.d.ts +155 -0
  296. package/dist/types/packages/objects/src/notebook/theme.d.ts +76 -0
  297. package/dist/types/packages/objects/src/palette.d.ts +577 -0
  298. package/dist/types/packages/objects/src/paper/host/body.d.ts +30 -0
  299. package/dist/types/packages/objects/src/paper/kind.d.ts +81 -0
  300. package/dist/types/packages/objects/src/paper/layout.d.ts +73 -0
  301. package/dist/types/packages/objects/src/paper/object.d.ts +31 -0
  302. package/dist/types/packages/objects/src/paper/pages.d.ts +43 -0
  303. package/dist/types/packages/objects/src/paper/paper-pass.d.ts +86 -0
  304. package/dist/types/packages/objects/src/paper/paper.d.ts +117 -0
  305. package/dist/types/packages/objects/src/paper/shaders.d.ts +18 -0
  306. package/dist/types/packages/objects/src/paper/theme.d.ts +58 -0
  307. package/dist/types/packages/objects/src/paper/typing.d.ts +51 -0
  308. package/dist/types/packages/objects/src/paper/writing.d.ts +161 -0
  309. package/dist/types/packages/objects/src/photo/carry.d.ts +33 -0
  310. package/dist/types/packages/objects/src/photo/kind.d.ts +136 -0
  311. package/dist/types/packages/objects/src/photo/layout.d.ts +39 -0
  312. package/dist/types/packages/objects/src/photo/object.d.ts +5 -0
  313. package/dist/types/packages/objects/src/photo/photo-pass.d.ts +104 -0
  314. package/dist/types/packages/objects/src/photo/photo.d.ts +262 -0
  315. package/dist/types/packages/objects/src/photo/pictures.d.ts +152 -0
  316. package/dist/types/packages/objects/src/photo/sample.d.ts +9 -0
  317. package/dist/types/packages/objects/src/photo/shaders.d.ts +18 -0
  318. package/dist/types/packages/objects/src/preset.d.ts +44 -0
  319. package/dist/types/packages/objects/src/shaders.d.ts +3 -0
  320. package/dist/types/packages/objects/src/shaders.gen.d.ts +21 -0
  321. package/dist/types/packages/react/src/canvas-hooks.d.ts +12 -0
  322. package/dist/types/packages/react/src/desk.d.ts +56 -0
  323. package/dist/types/packages/react/src/engine-context.d.ts +2 -2
  324. package/dist/types/packages/react/src/frame-preview-boundary.d.ts +19 -0
  325. package/dist/types/packages/react/src/hooks.d.ts +9 -14
  326. package/dist/types/packages/react/src/index.d.ts +16 -9
  327. package/dist/types/packages/react/src/keymap.d.ts +21 -2
  328. package/dist/types/packages/react/src/selection-menu.d.ts +174 -0
  329. package/dist/types/packages/react/src/tray-bar.d.ts +124 -0
  330. package/package.json +64 -31
  331. package/dist/chunk-2TNVB2ON.js +0 -1163
  332. package/dist/chunk-2TNVB2ON.js.map +0 -1
  333. package/dist/chunk-OR5FNVUE.js.map +0 -1
  334. package/dist/chunk-Q665T4L7.js +0 -681
  335. package/dist/chunk-Q665T4L7.js.map +0 -1
  336. package/dist/chunk-VGVDJZSP.js.map +0 -1
  337. package/dist/ground.js +0 -1108
  338. package/dist/ground.js.map +0 -1
  339. package/dist/r3f.js +0 -1644
  340. package/dist/r3f.js.map +0 -1
  341. package/dist/types/packages/core/src/input/measure-queue.d.ts +0 -30
  342. package/dist/types/packages/core/src/settings/ground-config.d.ts +0 -101
  343. package/dist/types/packages/core/src/systems/measure-ingest.d.ts +0 -26
  344. package/dist/types/packages/devtools/src/gl-panel.d.ts +0 -69
  345. package/dist/types/packages/dom/src/measure-adapter.d.ts +0 -31
  346. package/dist/types/packages/dom/src/measure-wiring.d.ts +0 -49
  347. package/dist/types/packages/dom/src/planes.d.ts +0 -33
  348. package/dist/types/packages/dom/src/reflectors/chrome.d.ts +0 -33
  349. package/dist/types/packages/dom/src/reflectors/dom-widgets.d.ts +0 -59
  350. package/dist/types/packages/dom/src/reflectors/graybox.d.ts +0 -31
  351. package/dist/types/packages/dom/src/reflectors/plane-transform.d.ts +0 -38
  352. package/dist/types/packages/ground/src/index.d.ts +0 -69
  353. package/dist/types/packages/ground/src/layer.d.ts +0 -40
  354. package/dist/types/packages/ground/src/pass.d.ts +0 -41
  355. package/dist/types/packages/ground/src/passes/grid-contract.d.ts +0 -28
  356. package/dist/types/packages/ground/src/passes/grid-magnet-pass.d.ts +0 -2
  357. package/dist/types/packages/ground/src/passes/grid-magnet.d.ts +0 -31
  358. package/dist/types/packages/ground/src/passes/grid.d.ts +0 -10
  359. package/dist/types/packages/ground/src/passes/guides-collect.d.ts +0 -14
  360. package/dist/types/packages/ground/src/passes/guides.d.ts +0 -3
  361. package/dist/types/packages/ground/src/passes/magnet-collect.d.ts +0 -63
  362. package/dist/types/packages/ground/src/passes/soup-collect.d.ts +0 -35
  363. package/dist/types/packages/ground/src/passes/soup-mesh.d.ts +0 -8
  364. package/dist/types/packages/ground/src/passes/wires-collect.d.ts +0 -35
  365. package/dist/types/packages/ground/src/passes/wires.d.ts +0 -10
  366. package/dist/types/packages/ground/src/poles.d.ts +0 -47
  367. package/dist/types/packages/ground/src/renderer.d.ts +0 -15
  368. package/dist/types/packages/ice/src/ground.d.ts +0 -1
  369. package/dist/types/packages/ice/src/r3f.d.ts +0 -1
  370. package/dist/types/packages/kernel/src/eviction.d.ts +0 -23
  371. package/dist/types/packages/kernel/src/zoom-bands.d.ts +0 -19
  372. package/dist/types/packages/r3f/src/bridge.d.ts +0 -129
  373. package/dist/types/packages/r3f/src/composite-material.d.ts +0 -26
  374. package/dist/types/packages/r3f/src/compositor-pass.d.ts +0 -105
  375. package/dist/types/packages/r3f/src/dev-write-trap.d.ts +0 -30
  376. package/dist/types/packages/r3f/src/gl-root.d.ts +0 -96
  377. package/dist/types/packages/r3f/src/gl-router.d.ts +0 -70
  378. package/dist/types/packages/r3f/src/index.d.ts +0 -17
  379. package/dist/types/packages/r3f/src/island-state.d.ts +0 -112
  380. package/dist/types/packages/r3f/src/island.d.ts +0 -13
  381. package/dist/types/packages/r3f/src/pool.d.ts +0 -56
  382. package/dist/types/packages/r3f/src/preview-capture.d.ts +0 -19
  383. package/dist/types/packages/r3f/src/resource-registry.d.ts +0 -30
  384. package/dist/types/packages/r3f/src/self-sustain.d.ts +0 -39
  385. package/dist/types/packages/r3f/src/use-island-frame.d.ts +0 -39
  386. package/dist/types/packages/react/src/infinite-canvas.d.ts +0 -140
  387. package/dist/types/packages/react/src/preview-snapshots.d.ts +0 -17
  388. package/dist/types/packages/react/src/widget-preview.d.ts +0 -14
  389. package/dist/types/packages/react/src/widget-root.d.ts +0 -33
@@ -0,0 +1,537 @@
1
+ import type { Surface } from "./engine/device";
2
+ import { CardPass } from "./card/card";
3
+ import { type KindFault } from "./faults";
4
+ import { type MissingFaces } from "./missing/pass";
5
+ import { HoldPass } from "./hold/focus";
6
+ import type { HoldShaders } from "./hold/shaders";
7
+ import { type KindPass, type KindProgram, type RenderTarget, type StratumName } from "./kind";
8
+ import { type View } from "./lattice/lod";
9
+ import type { MatLight } from "./mat/night";
10
+ import { type GridConfig, type GridStats, type SlotFrame } from "./mat/grid";
11
+ import { CuttingMat } from "./mat/mat-pass";
12
+ import type { MatShaders } from "./mat/shaders";
13
+ import type { MarksInput } from "./marks/layout";
14
+ import { MarksPass } from "./marks/pass";
15
+ import type { MarksShaders } from "./marks/shaders";
16
+ import { type TrayFrameInputs, TrayPass } from "./tray/pass";
17
+ import type { TrayShaders } from "./tray/shaders";
18
+ import { TraySlots } from "./tray/specimens";
19
+ import { type Presentation } from "./nav/portal";
20
+ import type { GroundTheme } from "./theme";
21
+ export type { CardBinding, CardMaterial, KindExtra, KindPass, KindProgram, RenderTarget, SlotContext, StratumName } from "./kind";
22
+ export { STRATA } from "./kind";
23
+ export type { MarkBar, MarkBox, MarkFrame, MarkGuide, MarkMarquee, MarkObject, MarkRuler, MarksInput, MarkTape, MarkUnion } from "./marks/layout";
24
+ export { MARKS_SHADER_FILES, marksShaders } from "./marks/shaders";
25
+ export type { TrayFrameInputs } from "./tray/pass";
26
+ export { TRAY_SHADER_FILES, trayShaders } from "./tray/shaders";
27
+ export interface GroundOptions {
28
+ /**
29
+ * The device the HOST owns — the engine's (`acquireCompositorDevice()`, handed to the layer through its
30
+ * context) or the layer's own (`engine/device.ts` `acquire()`, as the oracle's is). The ground never
31
+ * makes one: every texture the compose pass samples must live on the same device.
32
+ */
33
+ readonly device: GPUDevice;
34
+ /**
35
+ * The swap chain the frames go into — the HOST makes it (`surface(device, canvas)` from
36
+ * `@ice/desk`'s src/host/, the one module that names a canvas; a test's fake), so this composition
37
+ * root never touches the DOM (design-015 §3 `desk-dom-free`, D2a-world).
38
+ */
39
+ readonly surface: Surface;
40
+ /** The cutting mat (mat/mat-pass.ts) — the ground's own: every slot draws it first. */
41
+ readonly mat: MatShaders;
42
+ /**
43
+ * The kinds this ground draws — its REGISTRY (kind.ts; the desk's own are `DESK_KINDS`, `@ice/desk/kinds`).
44
+ * Names are unique. Each kind's pass is made on the root's mat; the kinds prepare in this order and draw
45
+ * stratum by stratum, then in each slot's paint order.
46
+ */
47
+ readonly kinds: readonly KindProgram[];
48
+ /**
49
+ * The desk's chrome (marks/pass.ts; design-015 §7, D4a): the marks pass, drawn in the ROOT's pass after every
50
+ * stratum — the selection's brackets, the vellum, the laser, the tape — when a frame names its `marks`. Absent =
51
+ * a ground that draws no chrome.
52
+ */
53
+ readonly marks?: MarksShaders;
54
+ /**
55
+ * The hand (hold/focus.ts; design-015 §8, D4b): the focus behind an object in hand and the object over it, when a
56
+ * frame names its `held`. Absent = a ground that never picks anything up (a frame's `held` is then ignored).
57
+ */
58
+ readonly hold?: HoldShaders;
59
+ /**
60
+ * 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
61
+ * `tray`. Absent = a ground with no tray.
62
+ */
63
+ readonly tray?: TrayShaders;
64
+ /**
65
+ * A GPU error the kinds' creation window caught that no kind raises alone (petition I24, `createKindPasses`): not a kind's — told
66
+ * here as the device would have told its uncaptured-error handler (the layer's `onError`: `degraded`). Absent: it is said on the console.
67
+ */
68
+ readonly onError?: (error: GPUError) => void;
69
+ }
70
+ /** 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). */
71
+ export interface Underlay {
72
+ draw(pass: GPURenderPassEncoder): void;
73
+ }
74
+ /**
75
+ * 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
76
+ * its KEY (D6, design-015 §4.3): stable across frames (the builder's entity; a ghost's negated), so the kind's persistent records
77
+ * keep the object's slot and write it only when the record object changed. Absent: the record is packed afresh every frame.
78
+ */
79
+ export interface SlotObject {
80
+ readonly kind: string;
81
+ readonly record: unknown;
82
+ readonly key?: number | undefined;
83
+ }
84
+ /** One desk's ground: its camera, grid, objects and presentation — the root's, a departed desk's, or a mini mat's inside. */
85
+ export interface SlotInputs extends SlotFrame {
86
+ /** The grid; the root may leave it unset and set `ground.grid` instead — every other slot names its own. */
87
+ readonly grid?: GridConfig;
88
+ /**
89
+ * Things drawn ON THE MAT by passes of their own, beneath everything else on the desk
90
+ * (CALENDAR.md: the desk calendar — the host renders its layer first, the ground lays it here).
91
+ */
92
+ readonly underlays?: readonly Underlay[];
93
+ /**
94
+ * The objects on this desk in PAINT ORDER, lowest first — the caller sorts: strata first (the ground draws
95
+ * stratum by stratum whatever the list says), then its own order within each. A kind's records are its
96
+ * objects, in this order; every kind named must be registered.
97
+ */
98
+ readonly objects?: readonly SlotObject[];
99
+ /** The live insides of this desk's sheets (MINIMAT.md §3): each drawn right after the object `at` names. */
100
+ readonly portals?: readonly PortalInputs[];
101
+ }
102
+ /**
103
+ * A mini mat's inside through its face (PORTAL.md §2.1, MINIMAT.md §3): `present` carries
104
+ * the presence (its opacity — the gate's answer) and the face (its clip); `view` may leave
105
+ * `box` unset — the ground sizes the slot's box from the clip.
106
+ */
107
+ export interface PortalInputs extends SlotInputs {
108
+ readonly grid: GridConfig;
109
+ /** The mini mat's index in the parent's `objects` (paint order): the slot draws just AFTER it, over its face. */
110
+ readonly at: number;
111
+ }
112
+ /** The departed desk's ground for one flight frame: its own camera, grid, objects and presentation. */
113
+ export interface OutgoingInputs extends SlotInputs {
114
+ readonly grid: GridConfig;
115
+ /** design-006's z-rule for a FROZEN flight: under on enter, over on exit. */
116
+ readonly order: "under" | "over";
117
+ /**
118
+ * ENTER through a live portal (PORTAL.md §2.4): the mini mat's index in the DEPARTED desk's
119
+ * `objects` — the two desks draw as one tree, the arriving one through the mini mat's face,
120
+ * so the objects over the mini mat stay over the inside and fade with their desk (a live
121
+ * portal of the departed desk at the same index is neither prepared nor drawn: the arriving
122
+ * desk is that face). Absent = two whole slots, `order` decides: a frozen flight, and every
123
+ * EXIT — the departed inside draws OVER the whole parent (whose own live portal shows the
124
+ * same pixels under it) and fades onto them at the landing.
125
+ */
126
+ readonly at?: number;
127
+ }
128
+ /**
129
+ * 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
130
+ * 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
131
+ * 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
132
+ * phone's 10); `dim` the desk's dim behind (already by the carry); `filter` the reading light on the hand (1, 1 by day);
133
+ * `light` the hand's own light (the day's mixed in by night); `stamp` the desk copy's identity — while it stands, the blurred
134
+ * desk is reused (rendered ONCE per settled state, the held object alone redrawing).
135
+ */
136
+ export interface HeldFrameInputs {
137
+ readonly object: SlotObject;
138
+ /** What rides with it (D3t-c — a calendar's stuck notes): drawn in the hand's slot after it, under the same camera. */
139
+ readonly riders?: readonly SlotObject[];
140
+ readonly view: View & {
141
+ readonly dpr: number;
142
+ };
143
+ readonly grid: GridConfig;
144
+ readonly e: number;
145
+ readonly blur: number;
146
+ readonly dim: number;
147
+ readonly filter: {
148
+ readonly saturate: number;
149
+ readonly brightness: number;
150
+ };
151
+ readonly light: MatLight;
152
+ readonly stamp: string;
153
+ }
154
+ export interface GroundFrameInputs extends SlotInputs {
155
+ /** 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. */
156
+ readonly theme: GroundTheme;
157
+ /** Present only while a nav flight is on. */
158
+ readonly outgoing?: OutgoingInputs;
159
+ /** The desk's marks this frame, in screen px (marks/layout.ts) — stratum 5, over everything; absent = none. */
160
+ readonly marks?: MarksInput;
161
+ /** 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. */
162
+ readonly held?: HeldFrameInputs;
163
+ /** 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. */
164
+ readonly tray?: TrayFrameInputs;
165
+ }
166
+ export interface GroundStats extends GridStats {
167
+ /** The root's records drawn this frame, by kind name — every registered kind, 0 where it had none. */
168
+ readonly kinds: Readonly<Record<string, number>>;
169
+ /** The departed slot's grid while a flight is on. */
170
+ readonly outgoing: GridStats | null;
171
+ /** Live portals drawn this frame, the root's and the departed desk's together. */
172
+ readonly portals: number;
173
+ /** The records the kinds' CAPS turned away this frame, by kind name, every slot's (absent: none) — resolved and NOT drawn (D7). */
174
+ readonly dropped?: Readonly<Record<string, number>>;
175
+ }
176
+ /** 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`). */
177
+ export interface SlotKind {
178
+ readonly name: string;
179
+ readonly stratum: StratumName;
180
+ readonly pass: KindPass;
181
+ readonly composite?: boolean;
182
+ }
183
+ /** 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. */
184
+ export interface SlotSet {
185
+ readonly mat: CuttingMat;
186
+ /**
187
+ * Every registered kind's entry — a MISSING kind's (petition I24) drawn by a spawn of the slot's missing face under the kind's own
188
+ * name and stratum — and, made on the first object that names it, `MISSING_KIND`'s (an object whose type has no kind). The ground
189
+ * swaps an entry when a kind goes missing (`Ground.quarantine`); nothing else writes the map.
190
+ */
191
+ readonly kinds: ReadonlyMap<string, SlotKind>;
192
+ /** The slot's FLAT-CARD pass (K7b, card/card.ts) over its kinds — absent when no registered kind declares a card material. */
193
+ readonly card?: CardPass;
194
+ /**
195
+ * The desk's MISSING FACES (petition I24, missing/ — the root's alone): what draws an object nothing can draw, spawned on a slot's
196
+ * mat into a kind's entry when the kind goes missing; nothing of them is made until the first is asked for. Absent on a slot set
197
+ * made by hand (a unit's): such an object is then refused as an unregistered kind is.
198
+ */
199
+ readonly missing?: MissingFaces;
200
+ /** The kinds REFUSED at create (the root's alone; petition I24): each its name and why — their entries draw the missing face from the start. */
201
+ readonly faults?: readonly KindFault[];
202
+ }
203
+ /** One slot's passes for `drawFrame` — the ground's own, or the oracle's. A parent carries its nested slots. */
204
+ export interface DrawSlot {
205
+ readonly mat: CuttingMat;
206
+ readonly present?: Presentation | undefined;
207
+ /** BARE: no mat is drawn — the hand's slot (D4b) lays its one object over a frame that is already there. */
208
+ readonly bare?: boolean | undefined;
209
+ /** Layers laid on the mat before everything (the calendar's). */
210
+ readonly underlays?: readonly Underlay[] | undefined;
211
+ /** The slot's kinds, prepared (its `SlotSet.kinds`): an object's kind names its stratum and its pass. */
212
+ readonly kinds: ReadonlyMap<string, SlotKind>;
213
+ /** The slot's objects in paint order — only their kinds matter to the draw: each kind's records are counted along them. */
214
+ readonly objects?: readonly {
215
+ readonly kind: string;
216
+ }[] | undefined;
217
+ /**
218
+ * 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
219
+ * is one draw whatever kinds it interleaves. Absent: every object is its kind's.
220
+ */
221
+ readonly card?: {
222
+ readonly pass: CardPass;
223
+ readonly route: Int32Array;
224
+ } | undefined;
225
+ /** Nested slots, each drawn right after the object `at` names (MINIMAT.md §3) — one that names no object here draws over them all. */
226
+ readonly children?: readonly {
227
+ readonly at: number;
228
+ readonly slot: DrawSlot;
229
+ }[] | undefined;
230
+ /** What the slot's grid did this frame. */
231
+ readonly stats: GridStats;
232
+ }
233
+ /** A slot at opacity 0 draws nothing: "source over" with alpha 0 leaves every pixel as it was. */
234
+ export declare const visible: (p: Presentation | undefined) => boolean;
235
+ /** What `createKindPasses` made: each program's root pass in registration order (undefined: refused), and the refusals. */
236
+ export interface KindPasses {
237
+ readonly passes: readonly (KindPass | undefined)[];
238
+ readonly faults: readonly KindFault[];
239
+ }
240
+ /**
241
+ * EVERY KIND'S PASS, EACH IN ITS OWN ERROR SCOPE (petition I24 — one kind's create is that kind's): made in parallel on the root's mat,
242
+ * as before, each settled alone — a create that rejects (a WGSL that does not compile — the engine's `compile` throws — a pipeline the
243
+ * device refused) or whose own scope caught an error is REFUSED, and the rest stand. A kind's scope is pushed before its `create` is
244
+ * called and popped as it returns, so it holds what the kind does before its first await (its layouts, its shader modules — where a
245
+ * compile error is raised); a WINDOW scope around them all holds whatever any kind does after (a pipeline made synchronously after an
246
+ * await). When the window caught something, whose it was is found by making each kind that stood ALONE again, wholly in a scope of its
247
+ * own, one after another (its first pass let go) — a fault's cost; a desk with none pays three scopes a kind. An error the window
248
+ * caught that no kind raises alone is not a kind's: `onError` hears it (the device's handler would have — the layer's `degraded`).
249
+ * Nothing else may run on the device while the window is open: the card, the missing face and the chrome are made after it.
250
+ */
251
+ export declare function createKindPasses(device: GPUDevice, format: GPUTextureFormat, mat: CuttingMat, programs: readonly KindProgram[], onError?: (error: GPUError) => void): Promise<KindPasses>;
252
+ /**
253
+ * The root slot's passes: the mat's (made first — every kind's pass is made on it), every registered kind's — made in parallel on the
254
+ * root's mat, in registration order, each in its own error scope (`createKindPasses`: a kind refused there is MISSING, petition I24) —
255
+ * then the card over the kinds that stood, and the desk's missing faces (made only if a kind was refused). Names must be unique and
256
+ * strata known. Shared by the ground and the Node oracle (whose `onError` is its probe's: it watches the creation in scopes of its own).
257
+ */
258
+ export declare function createSlotSet(device: GPUDevice, format: GPUTextureFormat, mat: CuttingMat, programs: readonly KindProgram[], onError?: (error: GPUError) => void): Promise<SlotSet>;
259
+ /** Slots beyond the root, spawned on first use and reused every frame: `reset()` then `acquire()` per slot the frame needs. */
260
+ export declare class SlotPool {
261
+ private readonly slots;
262
+ private used;
263
+ private readonly root;
264
+ /** False once a kind the card composes went missing (petition I24 — `Ground.quarantine`): every slot's card, spawned or yet to be, is off. */
265
+ cardOn: boolean;
266
+ constructor(root: SlotSet);
267
+ reset(): void;
268
+ /** 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. */
269
+ acquire(): SlotSet;
270
+ /** Every slot spawned so far (a quarantine walks them). */
271
+ each(fn: (s: SlotSet) => void): void;
272
+ /** Slots spawned so far — the churn instrument. */
273
+ get size(): number;
274
+ dispose(): void;
275
+ }
276
+ /**
277
+ * Draw one slot into an open render pass: scissored to its portal (nothing
278
+ * outside it is shaded), skipped outright at opacity 0 — the mat, the layers on
279
+ * it, then the objects stratum by stratum: within a stratum in paint order, one
280
+ * `drawRange` per RUN of one kind (each kind counting its own records), the run
281
+ * cut after an object with a live inside — the inside over its face (restoring
282
+ * this slot's scissor), then that object's marks over the inside. Returns
283
+ * whether it drew.
284
+ */
285
+ export declare function drawSlot(pass: GPURenderPassEncoder, size: {
286
+ readonly w: number;
287
+ readonly h: number;
288
+ }, dpr: number, slot: DrawSlot): boolean;
289
+ /**
290
+ * Record one frame into an open render pass: the root slot with its nested
291
+ * slots, and — while a flight is on — the departed slot: through the mini mat
292
+ * as one tree (`outgoing.at`), or whole, under or over, when the flight is
293
+ * frozen. Shared with the Node oracle so both hosts draw a frame through the
294
+ * same code. Returns each slot's grid stats (null = not drawn).
295
+ */
296
+ export declare function drawFrame(pass: GPURenderPassEncoder, size: {
297
+ readonly w: number;
298
+ readonly h: number;
299
+ }, dpr: number, incoming: DrawSlot, outgoing?: (DrawSlot & {
300
+ readonly order: "under" | "over";
301
+ readonly at?: number | undefined;
302
+ }) | null): {
303
+ incoming: GridStats;
304
+ outgoing: GridStats | null;
305
+ };
306
+ /** What `prepareFrame` hands the draw: the two slots and the counts the stats report. */
307
+ export interface PreparedFrame {
308
+ readonly incoming: DrawSlot;
309
+ readonly outgoing: (DrawSlot & {
310
+ readonly order: "under" | "over";
311
+ readonly at?: number | undefined;
312
+ }) | null;
313
+ readonly portals: number;
314
+ /** The root's records that will draw, by kind name — every registered kind. */
315
+ readonly kinds: Readonly<Record<string, number>>;
316
+ /** What the kinds' caps turned away, by kind name, every slot's (absent: nothing) — `GroundStats.dropped` (D7). */
317
+ readonly dropped?: Readonly<Record<string, number>>;
318
+ /** K5a: the tray's specimens, one slot each, prepared — drawn over the board, inside its edge (`drawTray`); absent = none. */
319
+ readonly tray?: readonly DrawSlot[];
320
+ /** K5b: what the tray carries, one slot each, prepared — drawn over the drawer, whole (`drawTray`); absent = none. */
321
+ readonly carried?: readonly DrawSlot[];
322
+ }
323
+ /** Where `prepareFrame` finds a specimen's slot (tray/specimens.ts `TraySlots`): undefined while its kind's pass is being made. */
324
+ export interface TraySlotSource {
325
+ get(type: string, kind: string): SlotSet | undefined;
326
+ }
327
+ /**
328
+ * Upload one frame's records into its slots — the root's, each live portal's
329
+ * (from the pool), the departed desk's — run the mat's wind where its clock
330
+ * moved, and return the draw tree. Per slot, every registered kind prepares its
331
+ * own records (the slot's objects of that kind, in paint order), told which of
332
+ * them carries a live inside. Shared by the ground and the Node oracle. `grid`
333
+ * is the root's when its inputs name none.
334
+ */
335
+ export declare function prepareFrame(encoder: GPUCommandEncoder, root: SlotSet, pool: SlotPool, inputs: GroundFrameInputs, grid?: GridConfig, target?: RenderTarget, traySlots?: TraySlotSource): PreparedFrame;
336
+ /**
337
+ * THE TRAY, drawn (design-017 §5, §8; K5a) — shared by `Ground.render` and the Node oracle: the drawer UNDER its specimens (the dim, its
338
+ * shadows, the board to its edge, the accessories), each specimen by its own kind through the drawer's face (inside the edge — the rim
339
+ * 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
340
+ * 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
341
+ * 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
342
+ * is drawn. Leaves the scissor on the whole view.
343
+ */
344
+ export declare function drawTray(pass: GPURenderPassEncoder, size: {
345
+ readonly w: number;
346
+ readonly h: number;
347
+ }, dpr: number, tray: TrayPass, slots: readonly DrawSlot[] | undefined, marks: MarksPass | null, carried?: readonly DrawSlot[]): void;
348
+ /**
349
+ * The passes one frame draws with — a `Ground`'s own (it IS one), or the Node oracle's: the root slot and the pool, the root's
350
+ * grid, and the three chrome passes (null where a host made none). What `encodeFrame` and `captureFrame` take, so the swap chain's
351
+ * frame, a capture's still and the oracle's render go through ONE encoding of a frame (petition I23: the capture is the frame path
352
+ * drawn once more into another target — never a second copy of it).
353
+ */
354
+ export interface FramePasses {
355
+ readonly root: SlotSet;
356
+ readonly pool: SlotPool;
357
+ readonly grid: GridConfig;
358
+ readonly marks: MarksPass | null;
359
+ readonly hold: HoldPass | null;
360
+ readonly tray: TrayPass | null;
361
+ readonly traySlots: TraySlotSource | null;
362
+ }
363
+ /** What `encodeFrame` recorded: the frame's stats (`Ground.render`'s answer), the prepared tree, and the marks it laid (0: none). */
364
+ export interface EncodedFrame {
365
+ readonly stats: GroundStats;
366
+ readonly prepared: PreparedFrame;
367
+ readonly marked: number;
368
+ }
369
+ /**
370
+ * Record one REST frame (no object in hand — the held frame is `renderHeldFrame`'s) into `encoder`, drawn into `into` — the swap
371
+ * chain (`Ground.render`), a capture's readable still (`captureFrame`), the oracle's target: the drawer's prepare (shut, p 0, it
372
+ * lays no quad; what the tray carries draws whatever the slide — a ghost grows, or flies home, past it), the slot tree, the marks,
373
+ * then ONE render pass — the frame stratum by stratum, the marks over every slot and stratum (stratum 5; `drawFrame` left the
374
+ * scissor on the whole view), the pegboard drawer over them (design-017: the dim, its shadow, the board, the specimens — K5a).
375
+ * The caller submits. `target` marks what the slots are prepared for (D7, `RenderTarget`); absent, the frame's.
376
+ */
377
+ export declare function encodeFrame(encoder: GPUCommandEncoder, passes: FramePasses, inputs: GroundFrameInputs, into: HeldInto, target?: RenderTarget): EncodedFrame;
378
+ export declare class Ground {
379
+ readonly device: GPUDevice;
380
+ readonly surface: Surface;
381
+ /** The cutting mat — the root slot's; its plates, noise and glyph atlas are every slot's. */
382
+ readonly mat: CuttingMat;
383
+ /** The root slot's passes: the mat's and every registered kind's, by name (the registry, in registration order). */
384
+ readonly root: SlotSet;
385
+ /** Slots beyond the root — the departed desk's, the live insides of mini mats — spawned on first use. */
386
+ readonly pool: SlotPool;
387
+ /** The root's grid when a frame names none. */
388
+ grid: GridConfig;
389
+ /** The desk's chrome — stratum 5 (D4a); null when the options named no marks shaders. */
390
+ readonly marks: MarksPass | null;
391
+ /** The hand — the focus behind an object in hand and the object over it (D4b); null when the options named no hold shaders. */
392
+ readonly hold: HoldPass | null;
393
+ /** The pegboard drawer (design-017, K3); null when the options named no tray shaders. */
394
+ readonly tray: TrayPass | null;
395
+ /** The tray's specimens' slots (K5a) — one per specimen, made as the tray first shows each; null with no tray. */
396
+ readonly traySlots: TraySlots | null;
397
+ /** The desk copy's cache (D4b): the stamp it was made for and the stats of that frame. */
398
+ private readonly heldCache;
399
+ /** 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. */
400
+ heldCopies(): number;
401
+ /** The drops last said, by kind (D7). */
402
+ private readonly dropSaid;
403
+ /** The kinds MISSING on this ground (petition I24): refused at create, or quarantined since — their entries draw the missing face. */
404
+ private readonly missing;
405
+ private constructor();
406
+ /**
407
+ * The mat first (every kind's pass is made on it), then every kind's pass in its own error scope (`createKindPasses` — a kind refused
408
+ * there is MISSING from the start: `faults()`, petition I24), then — once the kinds' window has closed, so nothing of theirs is taken
409
+ * for a kind's — the card over the kinds that stood, the marks, the hand and the tray, together. The missing faces are made only when
410
+ * one is asked for (a kind refused here, a quarantine, an object with no kind).
411
+ */
412
+ static create(opts: GroundOptions): Promise<Ground>;
413
+ /**
414
+ * The root's pass of the kind registered as `name` (undefined if none, or MISSING — petition I24: nothing of a missing kind is reached
415
+ * again) — a host reaches its kind's own API through it: the note's ink pages, the whiteboard's rasters.
416
+ */
417
+ pass(name: string): KindPass | undefined;
418
+ /** The kinds REFUSED when this ground was made (petition I24): each its name and why. Quarantines since are the layer's word. */
419
+ faults(): readonly KindFault[];
420
+ /**
421
+ * THE QUARANTINE (petition I24): kind `name` is MISSING from now on — its entry in every slot this ground holds (the root, the pool's,
422
+ * the tray's) becomes a spawn of that slot's missing face, under its name and in its stratum, and the passes it had are disposed (the
423
+ * pool's and the tray's first; the root's — whose shared resources go with it — last; a dispose that throws is said and passed). A
424
+ * kind the flat card composes turns the card off in every slot, for good (K7b's own A/B door: each material kind then draws its own
425
+ * runs — the card's pixels, more draws): its resources leave the card's bind group, and no draw may reach them. The next frame draws
426
+ * the kind's objects in the missing face (the builder makes their records so); one already made for its own pass is drawn as nothing.
427
+ * A kind already missing, or none of that name: nothing.
428
+ */
429
+ quarantine(name: string): void;
430
+ /** 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.) */
431
+ fit(maxDpr?: number): {
432
+ changed: boolean;
433
+ width: number;
434
+ height: number;
435
+ cssWidth: number;
436
+ cssHeight: number;
437
+ dpr: number;
438
+ };
439
+ /** Render one frame now. Synchronous submit; the caller owns the cadence. */
440
+ render(inputs: GroundFrameInputs): GroundStats;
441
+ /**
442
+ * THE CAPTURE DOOR's GPU half (petition I23; `captureFrame`): `inputs` — the last frame's, as `render` took them — drawn once
443
+ * more into a readable texture at the view's dpr × `scale`, `rect` (CSS px of the view) read back. The swap chain is not touched,
444
+ * no frame is drawn, nothing is kept: the still and its readback buffer are made for the call and destroyed after it. Undefined
445
+ * when the device is lost mid-copy, or the rect lies off the view.
446
+ */
447
+ capture(inputs: GroundFrameInputs, opts?: CaptureOptions): Promise<CaptureBytes | undefined>;
448
+ /** 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. */
449
+ private said;
450
+ /** The pool's slots, then the root's kinds in reverse registration order (a missing kind's face among them), its missing face, then the mat. */
451
+ dispose(): void;
452
+ /** Make the passes the tray's composite specimens need (K5a — `TraySlots.warm`); `onReady` asks for the frame that shows them. */
453
+ warmTray(wanted: readonly (readonly [string, string])[], onReady: () => void): void;
454
+ /** 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. */
455
+ idleTray(): void;
456
+ /** When `idleTray` next lets a tray layer go (K7a — a time the host registers; ∞ — nothing to let go). */
457
+ trayIdleAt(): number;
458
+ }
459
+ /** The specimens' name tags this frame (K5a): each label centred under its specimen — below a shelf's plank — in screen px. */
460
+ export declare function tagsOf(tray: TrayFrameInputs | undefined): {
461
+ readonly label: string;
462
+ readonly x: number;
463
+ readonly y: number;
464
+ }[];
465
+ /** 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). */
466
+ export interface HeldCache {
467
+ stamp: string | null;
468
+ stats: GroundStats | null;
469
+ copies: number;
470
+ }
471
+ /** Where a frame goes: the swap chain's view and size (the ground's surface), the oracle's target dressed as one, or a capture's still. */
472
+ export interface HeldInto {
473
+ view(): GPUTextureView;
474
+ size(): {
475
+ readonly w: number;
476
+ readonly h: number;
477
+ };
478
+ }
479
+ /**
480
+ * A HELD FRAME (design-015 §8; D4b) — shared by `Ground.render` and the Node oracle so both hosts draw it through one code path:
481
+ * 1. the DESK COPY, only when its `stamp` moved: the frame WITHOUT the held object (the builder left it out), no marks, prepared
482
+ * and drawn at half the dpr into the hold pass's half-size target, then blurred — its own encoder, SUBMITTED FIRST: the root's
483
+ * passes are about to be prepared again for the hand, and a queue write lands before every later submit, never an earlier one;
484
+ * 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
485
+ * slot), the hand's light (the day's by night, as the carry rises);
486
+ * 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
487
+ * through the reading light. Two fullscreen draws; the marks stay quiet (the builder hands none).
488
+ * Returns the desk copy's stats (the frame's objects behind the hand). `label` names the encoders (`hold`; a capture's
489
+ * `capture` — the pass instrument closes a profiler frame at the `hold` encoder's submit, and a capture is not a frame).
490
+ */
491
+ export declare function renderHeldFrame(device: GPUDevice, hold: HoldPass, root: SlotSet, pool: SlotPool, grid: GridConfig, into: HeldInto, inputs: GroundFrameInputs, held: HeldFrameInputs, cache: HeldCache, label?: string): GroundStats;
492
+ /** A rect of the view, CSS px: `x`, `y` its top-left, `width` × `height` its size. */
493
+ export interface CaptureRect {
494
+ readonly x: number;
495
+ readonly y: number;
496
+ readonly width: number;
497
+ readonly height: number;
498
+ }
499
+ export interface CaptureOptions {
500
+ /** The part of the view to return, CSS px (the whole view when absent); what lies off the view is cut off. */
501
+ readonly rect?: CaptureRect;
502
+ /** A multiplier on the view's dpr (1 — the still at device pixels; a thumbnail asks 0.25). */
503
+ readonly scale?: number;
504
+ }
505
+ /**
506
+ * A captured still's bytes: `width` × `height` device px, rows tightly packed, four bytes a pixel in `format`'s own channel
507
+ * order and alpha AS DRAWN (`bgra8unorm` on most swap chains; `rgba8unorm` the oracle's) — the texture's texels, exactly:
508
+ * the host turns them into an `ImageBitmap` (host/layer.ts), the oracle hashes them beside its own render.
509
+ */
510
+ export interface CaptureBytes {
511
+ readonly width: number;
512
+ readonly height: number;
513
+ readonly format: GPUTextureFormat;
514
+ readonly bytes: Uint8Array<ArrayBuffer>;
515
+ }
516
+ /** A malformed capture option is a THROW at the call (a programming error, never an honest undefined): the scale positive and finite, the rect's four numbers finite. */
517
+ export declare function checkCapture(opts: CaptureOptions): void;
518
+ /**
519
+ * The frame's inputs with EVERY view's dpr × `scale` — the root's, each live inside's (recursively: a nested slot carries a view of
520
+ * its own, and its mat prepares its lattice against it), the departed desk's and its insides', the hand's, the marks' (their
521
+ * hairlines are 1/dpr), the tray's specimens' and carried copies' — so every slot names the capture's attachment (kit/layer.ts
522
+ * `attachmentOf`), exactly as the reflector's inputs would at that dpr. At scale 1, the inputs themselves.
523
+ */
524
+ export declare function scaledInputs(inputs: GroundFrameInputs, scale: number): GroundFrameInputs;
525
+ /**
526
+ * THE CAPTURE (petition I23 — the covers' still, the thumbnails, "Send to…"): `inputs` — the last PRESENTED frame's, as
527
+ * `Ground.render` took them (the same camera, theme, marks, hand and tray) — drawn ONCE MORE, outside any frame, into a readable
528
+ * texture at the view's size × its dpr × `scale`, through the same encoding the swap chain's frame went through (`encodeFrame`;
529
+ * the held frame through `renderHeldFrame` — at the view's own size the standing desk copy is reused, the hand alone redrawn);
530
+ * then `rect` (CSS px of the view; the whole view when absent), in device px of the still, copied to a buffer and MAPPED. The
531
+ * slots are prepared for the `capture` target (D7, `RenderTarget`: a kind re-asks the residency the frame holds, as under the
532
+ * hand — a thumbnail's coarser asks evict nothing). The per-frame path gains nothing: no copy of any frame is kept, the swap chain
533
+ * is not touched, and the still and the readback buffer — `capture/still`, `capture/readback`, the ledger's own `capture` line
534
+ * while they live — are destroyed before the promise settles. Undefined, never a throw, when the device is lost before the bytes
535
+ * are mapped (the map rejects) or the rect lies wholly off the view; a malformed option throws at the call.
536
+ */
537
+ export declare function captureFrame(device: GPUDevice, passes: FramePasses, format: GPUTextureFormat, inputs: GroundFrameInputs, cache: HeldCache, opts?: CaptureOptions): Promise<CaptureBytes | undefined>;
@@ -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<"mix" | "texel">;
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
+ }