@vibecook/ice 0.10.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (380) 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-5FQS7V2C.js → chunk-DYK6KNLG.js} +13303 -7485
  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 +34 -13
  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-5FQS7V2C.js.map +0 -1
  324. package/dist/chunk-JWRHAM7L.js +0 -1163
  325. package/dist/chunk-JWRHAM7L.js.map +0 -1
  326. package/dist/chunk-MFTMPJUF.js +0 -681
  327. package/dist/chunk-MFTMPJUF.js.map +0 -1
  328. package/dist/chunk-OR5FNVUE.js.map +0 -1
  329. package/dist/ground.js +0 -1213
  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 -103
  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-classic.d.ts +0 -30
  348. package/dist/types/packages/ground/src/passes/grid-magnet.d.ts +0 -31
  349. package/dist/types/packages/ground/src/passes/grid.d.ts +0 -28
  350. package/dist/types/packages/ground/src/passes/guides-collect.d.ts +0 -14
  351. package/dist/types/packages/ground/src/passes/guides.d.ts +0 -3
  352. package/dist/types/packages/ground/src/passes/magnet-collect.d.ts +0 -63
  353. package/dist/types/packages/ground/src/passes/soup-collect.d.ts +0 -35
  354. package/dist/types/packages/ground/src/passes/soup-mesh.d.ts +0 -8
  355. package/dist/types/packages/ground/src/passes/wires-collect.d.ts +0 -35
  356. package/dist/types/packages/ground/src/passes/wires.d.ts +0 -10
  357. package/dist/types/packages/ground/src/poles.d.ts +0 -47
  358. package/dist/types/packages/ground/src/renderer.d.ts +0 -15
  359. package/dist/types/packages/ice/src/ground.d.ts +0 -1
  360. package/dist/types/packages/ice/src/r3f.d.ts +0 -1
  361. package/dist/types/packages/kernel/src/eviction.d.ts +0 -23
  362. package/dist/types/packages/kernel/src/zoom-bands.d.ts +0 -19
  363. package/dist/types/packages/r3f/src/bridge.d.ts +0 -129
  364. package/dist/types/packages/r3f/src/composite-material.d.ts +0 -26
  365. package/dist/types/packages/r3f/src/compositor-pass.d.ts +0 -105
  366. package/dist/types/packages/r3f/src/dev-write-trap.d.ts +0 -30
  367. package/dist/types/packages/r3f/src/gl-root.d.ts +0 -96
  368. package/dist/types/packages/r3f/src/gl-router.d.ts +0 -70
  369. package/dist/types/packages/r3f/src/index.d.ts +0 -17
  370. package/dist/types/packages/r3f/src/island-state.d.ts +0 -112
  371. package/dist/types/packages/r3f/src/island.d.ts +0 -13
  372. package/dist/types/packages/r3f/src/pool.d.ts +0 -56
  373. package/dist/types/packages/r3f/src/preview-capture.d.ts +0 -19
  374. package/dist/types/packages/r3f/src/resource-registry.d.ts +0 -30
  375. package/dist/types/packages/r3f/src/self-sustain.d.ts +0 -39
  376. package/dist/types/packages/r3f/src/use-island-frame.d.ts +0 -39
  377. package/dist/types/packages/react/src/infinite-canvas.d.ts +0 -140
  378. package/dist/types/packages/react/src/preview-snapshots.d.ts +0 -17
  379. package/dist/types/packages/react/src/widget-preview.d.ts +0 -14
  380. package/dist/types/packages/react/src/widget-root.d.ts +0 -33
@@ -0,0 +1,430 @@
1
+ import { type Entity, type FramePickSlot, type HeldPoseSlot, type MarqueeBuffer, type NavFace, type NavGeometrySlot, type PresentationTransitionAdapter, type ReflectorDef, type TrayCategory, type TrayPoseSlot, type TrayScreenFrame, type WidgetType, type World } from "../../../core/src/index";
2
+ import { type Ambient, type AmbientMode, type AmbientPin } from "../compose/ambient";
3
+ import { type DeskBuilder, type HeldBuild, type HoldPin, type SpatialSource } from "../compose/builder";
4
+ import { type BudgetStats } from "../engine/budget";
5
+ import { type RasterQueueStats } from "../engine/rasters";
6
+ import type { RecordStoreStats } from "../engine/records";
7
+ import { type SelectionAnchor } from "../compose/marks";
8
+ import { type DeskReflector, type DeskReflectorStats, type DeskWakes } from "../compose/reflector";
9
+ import { Ground, type GroundFrameInputs } from "../ground";
10
+ import type { KindProgram } from "../kind";
11
+ import type { ObjectFlux } from "../kinds/world";
12
+ import { type GridConfig } from "../mat/grid";
13
+ import type { GlyphAtlasMeta, MatConfig, PlateName } from "../mat/layout";
14
+ import type { ObjectSprings } from "../kit/springs";
15
+ import type { KindDriver, KindLocal } from "../kinds/world";
16
+ import { type BlobStore } from "../kit/blobs";
17
+ import { type Lent } from "../kit/services";
18
+ import { type TypingDocs } from "../docs";
19
+ import { type TextRaster } from "../kit/raster";
20
+ import type { DeskEditor } from "../kit/editor";
21
+ import type { InsideView } from "../kit/inside";
22
+ import { type MemoryLedger } from "../gpu-memory";
23
+ import { type GpuProfiler } from "../gpu-profiler";
24
+ import { type SubmitInstrument } from "../submit-instrument";
25
+ import type { GroundTheme, Palette } from "../theme";
26
+ import type { TrayFluxState, TrayPin } from "../tray/flux";
27
+ import type { TrayLaid } from "../tray/pass";
28
+ export interface DeskLayerOptions {
29
+ /** The theme in force at the mount (the app's `themeFrom(name, palette)`). */
30
+ readonly theme: GroundTheme;
31
+ /** The app's palette — what each kind's `theme()` reads its look from (`PaperPalette`, `MiniMatPalette`). */
32
+ readonly palette: Palette;
33
+ /**
34
+ * The OBJECT widget types this desk draws, beyond the engine catalog's own: their kinds are registered
35
+ * with the ground and join the builder's journal. The catalog's object types are always included.
36
+ */
37
+ readonly objects?: readonly WidgetType[];
38
+ /** Render-only kinds to register beside the objects' (a program with no world half yet). */
39
+ readonly kinds?: readonly KindProgram[];
40
+ /** The ambient policy (design-015 §4.6): `idle` by default. */
41
+ readonly ambient?: AmbientMode;
42
+ /** How long after the last touch the wind blows, ms (20 000). */
43
+ readonly ambientIdleMs?: number;
44
+ /** The root's grid at the mount: the mat's config (its gobo, its rulers) and the lattice's fade-in. */
45
+ readonly grid?: GridConfig;
46
+ /** The objects' springs (springs.ts `SPRINGS`): the builder reads these numbers every frame, so a host that keeps the object may tune them live (the dev panel — D5a). */
47
+ readonly springs?: ObjectSprings;
48
+ /** The device pixel ratio the canvas is capped at (2). */
49
+ readonly maxDpr?: number;
50
+ /** Where the layer acquires its OWN device when the engine has none (`engine.compositorDevice` — then it draws with that): `navigator.gpu` unless a host hands another. */
51
+ readonly gpu?: GPU;
52
+ /** Called once with the layer's OWN device, before anything submits. */
53
+ readonly onDevice?: (device: GPUDevice) => void;
54
+ /** The layer's name in the reflector roster. */
55
+ readonly name?: string;
56
+ /** The app's text raster (`inkRaster({ faces: penFaces({ … }) })`, D2c): absent, no note is written live — the pinned rasters only. */
57
+ readonly text?: TextRaster;
58
+ /** The document a note's typing session commits into — the facade's `engine.docs` (D2c); absent, typing stays runtime-only. */
59
+ readonly docs?: TypingDocs;
60
+ /** A typing session ends after this long without input, ms (1000). */
61
+ readonly idleMs?: number;
62
+ /** The app's byte store (D3w, D-D12): a print's picture by the hash its `blob` prop names; absent, prints draw their paper alone. */
63
+ readonly blobs?: BlobStore;
64
+ /**
65
+ * More SERVICES the host lends its kinds (K8a, kit/services.ts), each under its key — `service(KEY, value)` — beside the three it
66
+ * lends by name (`text` → `TEXT_RASTER`, `blobs` → `BLOB_STORE`, and `PICTURE_DECODER`, the desk's own decode). A plugin kind
67
+ * `use`s one by its key; a name lent twice (here, or by an object's DOM half) is a mount error.
68
+ */
69
+ readonly services?: readonly Lent[];
70
+ /**
71
+ * THE RASTER BUDGET (D6, design-015 §11.4), bytes: what every kind's raster caches may hold together — a board's ink (its strokes
72
+ * are the truth; evicted, it replays when next drawn), a notebook page's CPU raster, the calendar's tiles. The least recently used
73
+ * off-screen raster goes first. Default 192 MB.
74
+ */
75
+ readonly rasterBudget?: number;
76
+ /**
77
+ * THE FRAME'S RASTER BUDGET (K6b, design-016 §6), ms: what one frame spends making the rasters the kinds asked of the queue
78
+ * (engine/rasters.ts — a note's ink at a new band, a board's strokes on coming on screen); the rest wait their turn, their old
79
+ * raster standing. Default `RASTER_BUDGET_MS` (4).
80
+ */
81
+ readonly rasterMs?: number;
82
+ /**
83
+ * Keep the device's LIVE GPU MEMORY by label from the boot on (gpu-memory.ts, design-016 §4 — the profiler's memory table): a
84
+ * map entry per texture or buffer MADE, nothing per frame. Off by default (D-K2.2): a resource made before the ledger cannot be
85
+ * found after it (WebGPU has no enumeration), so it is the one instrument a host decides on at the mount.
86
+ */
87
+ readonly gpuLedger?: boolean;
88
+ }
89
+ /**
90
+ * The raster budget a host does not size: 256 MB — D6's 192 (about ten whiteboards' ink at the law's density, the notebook's
91
+ * eight page rasters and the calendar's tiles beside them) and 64 more since the PICTURES joined it (K6a, K-L4): their
92
+ * thumbnail array (1.4 MB a picture, always kept) and the details a frame binds — each its print's chain from the finest level
93
+ * it samples, so together at most about four texels a device pixel of the prints on screen (≈ 82 MB were prints to tile a
94
+ * 2400 × 1600 screen), where before every picture's whole chain stood outside any budget.
95
+ */
96
+ export declare const DEFAULT_RASTER_BUDGET: number;
97
+ /** The pinned still a parity scene states: the clocks, the plate and the gobo's opacity, the wind (0 = a still). */
98
+ export interface MatPin extends AmbientPin {
99
+ readonly plate?: PlateName;
100
+ readonly opacity?: number;
101
+ readonly wind?: number;
102
+ }
103
+ /**
104
+ * The layer's honest state: `pending` until the device and the pipelines are here; `ready`; `degraded` — the device reported an error
105
+ * nobody captured (out of memory, a validation or an internal error): the desk still draws what it can, but a frame — or every frame,
106
+ * an attachment left invalid — may be lost, and the state never reads `ready` again on its own (D7); `failed` — no desk (refused, or
107
+ * the device lost). `message` names the cause.
108
+ */
109
+ export interface DeskLayerStatus {
110
+ readonly state: "pending" | "ready" | "degraded" | "failed";
111
+ readonly message?: string;
112
+ }
113
+ /** The mount context — the fields of `@ice/dom`'s `LayerContext` this layer reads, mirrored structurally (dom never imports the desk). */
114
+ export interface DeskLayerContext {
115
+ readonly host: {
116
+ readonly container: HTMLElement;
117
+ };
118
+ readonly world: World;
119
+ readonly framePick?: FramePickSlot;
120
+ /** The nav geometry seam (design-015 §9, D2b): the desk sets its word on its containers' drawn faces here, clears it at dispose. */
121
+ readonly navGeometry?: NavGeometrySlot;
122
+ /** The held pose seam (design-015 §8, D4b): the desk publishes where the object in hand is ON SCREEN as it drew it; core's held input maps every pointer through it. */
123
+ readonly heldPose?: HeldPoseSlot;
124
+ /** The tray pose seam (design-017 §4, K3): the desk publishes where the pegboard drawer is ON SCREEN as it drew it; core's tray input hit-tests through it. */
125
+ readonly trayPose?: TrayPoseSlot;
126
+ readonly transitions?: {
127
+ register(adapter: PresentationTransitionAdapter): () => void;
128
+ };
129
+ readonly catalog?: {
130
+ widgetTypes(): readonly WidgetType[];
131
+ };
132
+ /** The interaction stack's marquee preview (`stack.marqueeBuffer`, out of the ECS): the vellum the marks draw (D4a). */
133
+ readonly readMarquee?: () => MarqueeBuffer;
134
+ /** The engine's spatial index (`stack.index`; design-015 §2.5, D6): the cull's broad phase. Absent, every member is tested. */
135
+ readonly spatial?: SpatialSource;
136
+ /** The engine's device (`engine.compositorDevice`, D7): the layer draws with it and never acquires its own — ONE device per engine. */
137
+ readonly gpu?: {
138
+ readonly adapter: GPUAdapter;
139
+ readonly device: GPUDevice;
140
+ };
141
+ /**
142
+ * The engine's frame gate (K7a — the SLEEP, `@ice/core` frame-control.ts): the layer registers the desk's wake (when its reflector,
143
+ * its kinds and its drivers are next due), wakes a sleeping loop for what arrives outside a step, and on a step a registered time
144
+ * alone started (`settled`) asks only what is due. Absent (a headless host): every part is asked every step, as before.
145
+ */
146
+ readonly frame?: {
147
+ wake(reason: string): void;
148
+ wakeWhen(name: string, due: (now: number) => number): () => void;
149
+ settled(): boolean;
150
+ };
151
+ }
152
+ /** The selection menu's source (D4a): the marks' anchor as of the last frame, and a subscription that fires when it changes. */
153
+ export interface SelectionSource {
154
+ anchor(): SelectionAnchor;
155
+ subscribe(listener: () => void): () => void;
156
+ }
157
+ /**
158
+ * The desk's MAIN-THREAD time (D6): every flush of the layer's reflector — the kinds' ticks, the pull, the build and the
159
+ * render when a frame is due — counted and timed since the mount; `frames` are the flushes that drew, `frameMs` their share.
160
+ * At rest a tick that draws nothing must cost next to nothing (design-015 §11.4: ≤ 0.1 ms of main thread per second).
161
+ */
162
+ export interface DeskLayerPerf {
163
+ readonly ticks: number;
164
+ readonly ms: number;
165
+ readonly frames: number;
166
+ readonly frameMs: number;
167
+ /** Each kind's `tick`, asked (K7a): at rest a kind is asked only when it is due — the registered-wake witness. */
168
+ readonly kindTicks: Readonly<Record<string, number>>;
169
+ /** The drivers asked (`idle`, then `follow`): none on a step a registered time alone started (K7a). */
170
+ readonly driverAsks: number;
171
+ }
172
+ /**
173
+ * The pegboard tray's door (design-017; K3) — the app's `a` and a rig's hand: the facts through core's tray ops (the one writer beside
174
+ * the tray's input), the flux's pins and its state.
175
+ */
176
+ /** A specimen as the last frame drew it (K5a — the tray door's witness): its type, kind, tag and accessory, its rect and pegs on screen (CSS px), the scale its kind drew it at. */
177
+ export interface TraySpecimenSeen {
178
+ readonly type: string;
179
+ readonly kind: string;
180
+ readonly label: string;
181
+ readonly accessory: string;
182
+ readonly screen: {
183
+ readonly x0: number;
184
+ readonly y0: number;
185
+ readonly x1: number;
186
+ readonly y1: number;
187
+ };
188
+ readonly pegs: readonly (readonly [number, number])[];
189
+ readonly zoom: number;
190
+ /** K5b: its object as drawn on screen (the fit inside the hang). */
191
+ readonly object: {
192
+ readonly x0: number;
193
+ readonly y0: number;
194
+ readonly x1: number;
195
+ readonly y1: number;
196
+ };
197
+ }
198
+ /** What the tray carried in the last frame drawn (K5b — the door's witness): its type and phase, the ghost it presents (absent: the copy), its object's rect on screen, its scale. */
199
+ export interface TrayCarriedSeen {
200
+ readonly type: string;
201
+ readonly phase: string;
202
+ readonly ghost?: number;
203
+ readonly screen: {
204
+ readonly x0: number;
205
+ readonly y0: number;
206
+ readonly x1: number;
207
+ readonly y1: number;
208
+ };
209
+ readonly zoom: number;
210
+ }
211
+ /**
212
+ * Where the tray's BAR is placed from (design-018 §5 — `<TrayBar>`, @ice/react, reads it structurally): the drawer as the last frame
213
+ * DREW it — its outline's top-left and width, its slide, its HEADER (R4) — the view, the hand, the category model its chips show, and
214
+ * the theme's night. A fact the bar follows is never a pixel it guesses: the pill rides `drawer.y` exactly, frame by frame, and the
215
+ * chips lie in the header as drawn.
216
+ */
217
+ export interface TrayAnchor {
218
+ /** The drawer is out (the fact: its slide may still be on its way). */
219
+ readonly open: boolean;
220
+ /**
221
+ * The drawer's outline as drawn this frame (CSS px; its bottom runs on under the view) and its slide — null before its first frame, or
222
+ * while a pin hides it — and its HEADER (design-018 R4, `DRAWER.header`): the clear band under the edge's inside, from `y` for `h`,
223
+ * where nothing of the board's content shows and the bar lays its chips.
224
+ */
225
+ readonly drawer: {
226
+ readonly x: number;
227
+ readonly y: number;
228
+ readonly w: number;
229
+ readonly p: number;
230
+ readonly header: {
231
+ readonly y: number;
232
+ readonly h: number;
233
+ };
234
+ } | null;
235
+ readonly view: {
236
+ readonly width: number;
237
+ readonly height: number;
238
+ };
239
+ /** The theme's night, 0 day … 1 the Moon (`MatLight.night`): the bar's label tape steps back by it as the specimens' tags do (design-018 R4). */
240
+ readonly night: number;
241
+ /** An object is IN HAND (not flying home): the selection menu has the view's foot — the bar steps aside. */
242
+ readonly held: boolean;
243
+ /** How many entries the drawer's frame hangs, every category (0: nothing to offer here — the bar steps aside). */
244
+ readonly entries: number;
245
+ /** The category the drawer shows ("" all) and the categories its frame hangs, in the lay's order (design-018 §6). */
246
+ readonly category: string;
247
+ readonly categories: readonly TrayCategory[];
248
+ }
249
+ export interface DeskTrayDoor {
250
+ /** Open the drawer: refused (false) while an object is in hand; gestures in flight cancel. */
251
+ open(): boolean;
252
+ close(): void;
253
+ /** Open or close; returns whether it is open now. */
254
+ toggle(): boolean;
255
+ isOpen(): boolean;
256
+ /** The board's scroll, CSS px past its top — set when given (any value: a rig's 10⁶ rows down), and returned. */
257
+ scroll(px?: number): number;
258
+ /** The facts and the flux as of now, the drawer as last drawn (the pose seam's answer) and what the pass last laid. */
259
+ state(): TrayFluxState & {
260
+ readonly frame: TrayScreenFrame | undefined;
261
+ readonly laid: TrayLaid | null;
262
+ readonly specimens: readonly TraySpecimenSeen[];
263
+ readonly tags: number;
264
+ readonly slots: number;
265
+ readonly carried: readonly TrayCarriedSeen[];
266
+ readonly presented: readonly number[];
267
+ };
268
+ /** Pin the drawer for a still — the slide, the band, or hidden; `null` unpins. */
269
+ pin(pin: TrayPin | null): void;
270
+ /**
271
+ * design-018 §6 — the category the drawer shows ("" all): set when given (core's `setTrayCategory` — the lay lays only its
272
+ * entries, the board starts at its top, and it falls back to all when the frame hangs none of it), and returned.
273
+ */
274
+ category(id?: string): string;
275
+ /** design-018 §6 — the categories the drawer's frame hangs, in the lay's order: each its id, its label and its count (a host's chips). */
276
+ categories(): readonly TrayCategory[];
277
+ /** design-018 §5 — what the bar is placed from, as of the last frame drawn. */
278
+ anchor(): TrayAnchor;
279
+ /**
280
+ * design-018 §5 — tell `listener` after each frame that moved what `anchor()` says: the drawer as drawn (its slide, frame by frame),
281
+ * open or shut, the category or the categories, the hand, the entries, the view. Never at rest: no frame, no call.
282
+ */
283
+ subscribe(listener: () => void): () => void;
284
+ }
285
+ export interface DeskLayerHandle {
286
+ /** The drawing reflector — the facade registers it right after the plane transform, where the ground layer has always gone. */
287
+ readonly reflector: ReflectorDef & {
288
+ available(): boolean;
289
+ };
290
+ dispose(): void;
291
+ /** The canvas in the ground slot. */
292
+ readonly canvas: HTMLCanvasElement;
293
+ /** The device is acquired and `Ground.create` resolved. */
294
+ available(): boolean;
295
+ status(): DeskLayerStatus;
296
+ /**
297
+ * Told each time `status()` moves — the boot's end, an uncaptured error, the device lost after the boot (K9: a host says so on
298
+ * its page; a desk that just ended leaves no canvas behind). Returns the unsubscribe; `dispose` drops every listener.
299
+ */
300
+ onStatus(listener: (status: DeskLayerStatus) => void): () => void;
301
+ /** The device the layer draws with once it is here — the engine's when the context carries one (D7: one device per engine), else the layer's own. */
302
+ device(): GPUDevice | undefined;
303
+ /** The ground once made (a rig's door to a pass: `ground()?.pass("paper")`). */
304
+ ground(): Ground | null;
305
+ /** The theme changed (and, with it, the palette): the looks are remade, the next frame re-renders. */
306
+ setTheme(theme: GroundTheme, palette?: Palette): void;
307
+ /** The mat's config over the current one (the rulers, the gobo): the root's grid. */
308
+ configureMat(mat: Partial<MatConfig>): void;
309
+ /** The lattice's fade-in window. */
310
+ configureFadeIn(fadeIn: GridConfig["fadeIn"]): void;
311
+ /** A 512² rgba8 plate into slot `c` or `b` — the app's generated plates (never the study's). */
312
+ setPlate(name: PlateName, bytes: Uint8Array<ArrayBuffer>): void;
313
+ /** The 128² blue-noise tile; the desk's own is uploaded at the mount. */
314
+ setNoise(bytes: Uint8Array<ArrayBuffer>): void;
315
+ /** The rulers' and the mini mats' glyph atlas (RULER.md). */
316
+ setGlyphs(bytes: Uint8Array<ArrayBuffer>, meta: GlyphAtlasMeta): void;
317
+ /** Pin the mat for a still (a parity scene): the clocks, the plate, the gobo's opacity; `wind` > 0 unpins the clocks. `null` unpins everything. */
318
+ pinMat(pin: MatPin | null): void;
319
+ /**
320
+ * Pin a kind's own ASSET on an object for a still (K8a — generic: the kind reads it as `ctx.asset`, in a shape the KIND defines —
321
+ * the note's greeked writing is `{ greek }`, `PaperAsset`; the desk never knows it); `undefined` unpins. Until K8a this door was
322
+ * `pinGreek`, a note's writing stated by its shape (`GreekPin`) — the one kind-shaped door on the handle.
323
+ */
324
+ pinAsset(entity: Entity, asset: unknown): void;
325
+ /** Pin an object's spring targets for a still (a scene's `held` = `{ lift: 1 }`, never a `Grab`); `undefined` unpins. */
326
+ pinFlux(entity: Entity, targets: Partial<Pick<ObjectFlux, "lift" | "hover">> | undefined): void;
327
+ /** Every flux pin lifted. */
328
+ clearFlux(): void;
329
+ /** Live insides on or off (the oracle's `portals: false` — every face draws its far LOD alone). */
330
+ setPortals(on: boolean): void;
331
+ /**
332
+ * A kind's LAW, live (D5a — the dev panel's door): every object of `kind` resolves under `law` from the next build and the
333
+ * root's pass (its slots after it) draws with it; a kind with no live law ignores it. The host owns the law it hands in.
334
+ */
335
+ tuneLaw(kind: string, law: unknown): void;
336
+ /** Pin the root's dressing (the oracle's `lodZoom`); `null` unpins. */
337
+ pinLodZoom(zoom: number | null): void;
338
+ /** Hold every spring and ghost where it is — a still of a moving frame (a rig's flight pin). */
339
+ freeze(on: boolean): void;
340
+ /** Hold the re-dressing ramp at its start (the prototype harness's `redressPinned`). */
341
+ holdRedress(on: boolean): void;
342
+ /** THE HAND PINNED for a still (D4b): the carry amount at `e`, the kind's open motion snapped; `null` unpins. The object itself is picked up through `ops.open`. */
343
+ pinHold(pin: HoldPin | null): void;
344
+ /** The object in hand as of the last frame (D4b) — a rig's witness: its carry, its frame on screen, whether settled or flying home. */
345
+ hand(): HeldBuild | undefined;
346
+ /** THE SEAM's answer for a container under the camera (the live one unless given) — a rig's witness (`DeskBuilder.navFace`). */
347
+ navFace(entity: Entity, cam?: {
348
+ readonly x: number;
349
+ readonly y: number;
350
+ readonly zoom: number;
351
+ }): NavFace | undefined;
352
+ /** The last build's view of a container's inside (a rig's witness). */
353
+ insideViewOf(entity: Entity): InsideView | undefined;
354
+ /**
355
+ * The camera of the flight on now at progress `p` (the prototype's `flightAt`: the endpoints c0 and c1 themselves,
356
+ * `flightCamera` between) — what a rig's flight pin writes each tick; `undefined` when no flight drives.
357
+ */
358
+ flightCameraAt(p: number): {
359
+ readonly x: number;
360
+ readonly y: number;
361
+ readonly zoom: number;
362
+ } | undefined;
363
+ /** The ambient policy, live: the mode, the idle window. */
364
+ setAmbient(mode: AmbientMode, idleMs?: number): void;
365
+ ambient(): Ambient;
366
+ /** The submit instrument on the layer's device — installed the first time it is asked for (K2, D-K2.1: never asked, the queue carries no wrapper), counting from then; undefined before the device. */
367
+ submits(): SubmitInstrument | undefined;
368
+ /** The layer's own main-thread time since the mount (D6, design-015 §11.4's idle gate): a rig diffs two readings. */
369
+ perf(): DeskLayerPerf;
370
+ /** The raster budget's ledger (D6): what the kinds' caches hold, by owner, against the cap; the evictions so far. */
371
+ memory(): BudgetStats;
372
+ /** The frame's raster queue (K6b): the asks waiting and held, the runs, the turns, their ms and the most a turn spent. */
373
+ rasters(): RasterQueueStats;
374
+ /** The device's live GPU memory by label (K2) — kept only under `gpuLedger: true`, from the boot; undefined otherwise or before the device. */
375
+ gpuMemory(): MemoryLedger | undefined;
376
+ /**
377
+ * THE GPU PROFILER (K2, design-016 §4) on the layer's device — made on first ask, UNARMED (nothing installed) until `arm()`:
378
+ * each drawn frame's GPU span and passes, its draws by kind, pipelines, bind groups, uploads, and the ledger's memory; the
379
+ * layer's flush is its boundary. Undefined before the device.
380
+ */
381
+ profiler(): GpuProfiler | undefined;
382
+ /** The kinds' persistent record stores' counters by kind (D6, design-015 §4.3) — the root passes'; a rig diffs two readings. */
383
+ records(): Readonly<Record<string, RecordStoreStats>>;
384
+ redraws(): number;
385
+ stats(): DeskReflectorStats;
386
+ wakes(): DeskWakes;
387
+ /**
388
+ * The desk's registered wake taken apart (K7a — "why is the desk awake?"): when each part is next due, on `performance.now()`'s
389
+ * clock (`Infinity`: never on its own) — the reflector's, the drivers' (now while one follows), a kind woken, each kind's `due`,
390
+ * the tray's layers' let-go (`tray`, K7a over K5a) and the raster queue's waiting asks (`rasters`, K6b: now while any wait).
391
+ */
392
+ due(now: number): {
393
+ readonly at: number;
394
+ readonly reflector: number;
395
+ readonly drivers: number;
396
+ readonly following: readonly string[];
397
+ readonly woken: readonly string[];
398
+ readonly kinds: Readonly<Record<string, number>>;
399
+ readonly tray: number;
400
+ readonly rasters: number;
401
+ };
402
+ geometryOf(e: Entity): unknown | undefined;
403
+ fluxOf(e: Entity): ObjectFlux | undefined;
404
+ lastInputs(): GroundFrameInputs | null;
405
+ /** The frame dirty and not yet drawn, or a kind still moving on its own (a print in the air — D3w): a rig's settle witness. */
406
+ dirty(): boolean;
407
+ readonly builder: DeskBuilder;
408
+ /** A kind's own state on this desk by kind name (D3w: a print's body, a book's or a pad's pinned pose) — `undefined` when it keeps none. */
409
+ local(name: string): KindLocal | undefined;
410
+ /** The desk's ONE focused editor (D2c; the desk's since K8a — made at the mount whatever kinds are registered, leased by every kind that takes text). */
411
+ editor(): DeskEditor;
412
+ /**
413
+ * A kind's DRIVER on this desk by object type (D-D7-A.3) — what the object declared in `defineObject` (the note's typing, the
414
+ * board's pen, the notebook's hand, the print's carry, the calendar's writing + hand + DOM half), or undefined. A rig casts to
415
+ * the kind's own driver type (`PaperDriver`, `CalendarDriver`); the desk itself never names one.
416
+ */
417
+ driver(type: string): KindDriver | undefined;
418
+ /** Where the selection menu goes (D4a): the marks' box around the selection, published after each frame it moved. */
419
+ readonly selection: SelectionSource;
420
+ /** The pegboard tray's door (design-017; K3). */
421
+ readonly tray: DeskTrayDoor;
422
+ /**
423
+ * The DOM-free reflector behind `reflector` — named `desk`, never `compose`: react's retired
424
+ * `GroundLayerHandle.compose?` was the ground's COMPOSE handle (the composited profile read its
425
+ * `sourceCanvas` seam off it, until D5b), and the desk was never one. The slot stays absent.
426
+ */
427
+ readonly desk: DeskReflector;
428
+ }
429
+ export type DeskLayerFactory = (ctx: DeskLayerContext) => DeskLayerHandle;
430
+ export declare function deskLayer(opts: DeskLayerOptions): DeskLayerFactory;
@@ -0,0 +1,2 @@
1
+ import type { PictureDecoder } from "../kit/blobs";
2
+ export declare const decodePicture: PictureDecoder;
@@ -0,0 +1,5 @@
1
+ import type { Surface } from "../engine/device";
2
+ export type { Surface } from "../engine/device";
3
+ export declare function surface(device: GPUDevice, canvas: HTMLCanvasElement, opts?: {
4
+ alphaMode?: GPUCanvasAlphaMode;
5
+ }): Surface;
@@ -0,0 +1,13 @@
1
+ export * from "./ground";
2
+ export * from "./tray/index";
3
+ export * from "./host/index";
4
+ export * from "./compose/index";
5
+ export * from "./kit/index";
6
+ export * from "./object";
7
+ export { type DataChildren, FLUX_REST, type HeldContext, type HeldToolDef, type InsideContext, isObjectKind, type KindDriver, type KindDriverHost, type KindHost, type KindLocal, numberProp, type ObjectContext, type ObjectDomHost, type ObjectFlux, type ObjectHit, type ObjectHost, type ObjectKind, type ObjectRect, type OpenBinding, rectFrame, rectOf, type RungContext, type StratumName, stringProp } from "./kinds/world";
8
+ export { carryOf, focusOf, HELD_USER_REST, type HeldPose, type HeldUser, type HeldViewport, heldCamera, heldFrame, heldPose, HOLD, type HomePose, homePose, isNarrow, type ReadingTarget, readingTarget } from "./hold/pose";
9
+ export { NO_DOCS, type TypingDocs, type WritableSession, writable } from "./docs";
10
+ export * from "./theme";
11
+ export * from "./shaders";
12
+ export { BLUE_NOISE_SIZE, blueNoise } from "./assets/blue-noise.gen";
13
+ export { ZOOM_MAX, ZOOM_MIN } from "./lattice/lod";
@@ -0,0 +1,187 @@
1
+ import type { BindKind } from "./engine/pipeline";
2
+ import type { RecordStoreStats } from "./engine/records";
3
+ import type { ComposeOptions } from "./engine/shader";
4
+ import type { MatLight } from "./kit/light";
5
+ import type { Presentation } from "./kit/nav";
6
+ import type { FadeIn, MatConfig, MatFrame, MatPass, SlotLight, View } from "./kit/view";
7
+ import type { GroundTheme, RGB } from "./theme";
8
+ /** The strata of the desk a kind can lie in (design-015 §4.2): beneath everything, flat on the mat holding a desk, every other thing. */
9
+ export type StratumName = "pads" | "sheets" | "things";
10
+ /**
11
+ * The strata in paint order. The mat (stratum 0) is the ground's own and draws first; the held set and the
12
+ * marks (strata 4 and 5) are D4's. A kind's place in the registry never moves it out of its stratum.
13
+ */
14
+ export declare const STRATA: readonly StratumName[];
15
+ /**
16
+ * Everything a kind's pass is prepared with for one slot, one frame — what each object pass's `prepare`
17
+ * took as arguments before the registry, in one record. The ground fills it; a kind reads what it needs.
18
+ */
19
+ /**
20
+ * What a slot is prepared FOR (D7): `frame` — the canvas (and the hand's own slot over it); `copy` — the held desk copy behind the
21
+ * hand, the desk at half the dpr (design-015 §8). A held frame prepares the root twice, once for each, so a pass that keeps state
22
+ * between its prepares keeps the copy's apart.
23
+ */
24
+ /**
25
+ * The render a slot is prepared for (D7): the FRAME (the desk as it is), the COPY (the desk behind a carried object, made once
26
+ * per stamp and blurred), or the HAND (K9 R4 — the carried object alone, prepared EVERY frame of the carry while the copy
27
+ * stands). A pass that keeps state per render keeps the copy's apart; a pass whose residency asks are per prepare (the
28
+ * pictures' details, the boards' pool) re-asks what it has bound under the hand, else the tick's step — seeing only the hand's
29
+ * asks — would free every other detail on the desk behind it, a softness pop at every put-down.
30
+ */
31
+ export type RenderTarget = "frame" | "copy" | "hand";
32
+ export interface SlotContext {
33
+ /** The slot's camera and box (CSS px) and the device pixel ratio. */
34
+ readonly view: View & {
35
+ readonly dpr: number;
36
+ };
37
+ /** The slot's grid's fade-in window AS ITS GRID NAMES IT — `dressGrid` dresses the mat's lattice alone, never the objects. */
38
+ readonly fadeIn: FadeIn;
39
+ /** The slot's mat config (its gobo, its rulers, its vinyl). The block a pass draws with is the slot's (`MatPass.view`, K4a): read, never copied. */
40
+ readonly cfg: MatConfig;
41
+ /** The mat's clocks and tilt this frame; undefined = a still (a pass fills `STILL_MAT_FRAME`). */
42
+ readonly frame: MatFrame | undefined;
43
+ /** The OBJECTS' presentation: the slot's opacity times their own presence (`Presentation.objects`), and the slot's chain. */
44
+ readonly present: Presentation | undefined;
45
+ /** The Sun or the Moon (the theme's `matLight`). */
46
+ readonly light: MatLight;
47
+ /** The lamp the slot is lit by: undefined = its own camera's, exactly (the root at rest); else its host's (MINIMAT.md §4). */
48
+ readonly lit: SlotLight | undefined;
49
+ /** The selection ring's colour (the theme's `select`). */
50
+ readonly select: RGB;
51
+ /** The theme in force. */
52
+ readonly theme: GroundTheme;
53
+ /** The render this slot is prepared for; absent = the frame's (D7). */
54
+ readonly target?: RenderTarget;
55
+ }
56
+ /**
57
+ * What the ground knows of a kind's records beyond the slot, this frame. `live(i)`: record `i`'s live inside —
58
+ * its objects' presence over the record's face (0..1), or −1 where none is drawn — which the ground computes from
59
+ * the slot's portals, by the kind's OWN record index. A sheet that holds a desk lets its face's far LOD give way
60
+ * to it (the mini mat); every other kind ignores it.
61
+ */
62
+ export interface KindExtra {
63
+ readonly live: (index: number) => number;
64
+ /**
65
+ * The records' KEYS, one per record in the same order (design-015 §4.3; D6) — the builder's entity (a ghost's negated), stable
66
+ * across frames, so a pass with persistent records keeps a record's slot and writes it only when the record object changed.
67
+ * Absent (the oracle, a bare host): every record is packed afresh this frame.
68
+ */
69
+ readonly keys?: readonly number[];
70
+ }
71
+ /**
72
+ * One slot's pass of one kind. The root's is made by the kind's program on the root's mat; every other slot's is
73
+ * `spawn`ed from it — its own buffers on the shared pipelines, reading its own mat's wind and light.
74
+ */
75
+ export interface KindPass<R = unknown> {
76
+ /** A slot's own buffers on the shared pipelines, reading `mat`'s silhouette — a live inside's, a flight's departed desk's. */
77
+ spawn(mat: MatPass): KindPass<R>;
78
+ /** Take the root's laws (the prototype's `tune()` / `copy()`): a spawned slot's pass does, every frame, before it prepares. */
79
+ tune?(root: KindPass<R>): void;
80
+ /** Draw with a host's LIVE law (D5a — `handle.tuneLaw`): the root's pass takes it, and its slots follow through `tune`. */
81
+ setLaw?(law: unknown): void;
82
+ /**
83
+ * Upload this frame's records — the kind's objects in this slot, in paint order — for `slot`'s camera and light.
84
+ * `encoder` is the frame's: work that must precede the frame's pass may be recorded into it (or a pass may submit
85
+ * its own before the frame's, as the whiteboard's stamps and drying do). Returns the count that will draw.
86
+ */
87
+ prepare(encoder: GPUCommandEncoder, slot: SlotContext, records: readonly R[], extra?: KindExtra): number;
88
+ /** Draw records [first, end) — indices into this frame's `records` — in their order, into the open pass. */
89
+ drawRange(pass: GPURenderPassEncoder, first: number, end: number): void;
90
+ /**
91
+ * The kind's persistent record store's counters (design-015 §4.3; D6) — records packed and uploaded, draw lists rewritten — a
92
+ * rig's witness that a camera move writes no standing record. Absent for a kind that keeps none (the composites' layers).
93
+ */
94
+ records?(): RecordStoreStats;
95
+ /**
96
+ * The records this slot's last `prepare` turned away at the pass's CAP (its buffers' ceiling — the layered kinds' fixed tables,
97
+ * the record stores' most) — objects the builder resolved that will NOT draw. Never silent (D7): the ground sums them into the
98
+ * frame's `GroundStats.dropped` and the host says so.
99
+ */
100
+ dropped?(): number;
101
+ /** The hold is over (D7): a pass that kept the held desk copy's state apart (`SlotContext.target`) gives it back. */
102
+ endHold?(): void;
103
+ /**
104
+ * Let go of the device targets this slot's pass makes again at its next draw, when none of its objects was drawn within `ms`
105
+ * (K6a's D-K6a.3 — a layered kind's layer): asked each tick of the slots a host keeps beyond the root (the tray's, K5a).
106
+ */
107
+ idle?(ms: number): void;
108
+ /**
109
+ * When `idle(ms)` next lets something go (K7a): the host registers it as a TIME wake, so a desk asleep since the drawer shut
110
+ * still wakes to give the layer back. ∞, or absent: nothing to let go (a pass that says no time is let go at a tick taken anyway).
111
+ */
112
+ idleAt?(ms: number): number;
113
+ /** A sheet's marks over its live inside, drawn right after the inside (the mini mat's chips while the inside's objects come in). */
114
+ drawOver?(pass: GPURenderPassEncoder, index: number): void;
115
+ /**
116
+ * K7b: this slot's resources for the kind's CARD MATERIAL (`KindProgram.card`), in its `bindings` order, and a number that moves
117
+ * whenever one of them is replaced (a record store grown, a texture array grown) — the card's bind group is made again then.
118
+ */
119
+ cardResources?(): {
120
+ readonly version: number;
121
+ readonly resources: readonly (GPUBuffer | GPUTextureView | GPUSampler)[];
122
+ };
123
+ /**
124
+ * K7b: record `index` of the last `prepare` drawn by the desk's FLAT-CARD pipeline — its slot in the kind's records, which the
125
+ * material's functions read — or −1: this pass draws it itself (a print with its detail bound, a board with its raster).
126
+ */
127
+ cardSlot?(index: number): number;
128
+ /** This slot's buffers (the shared resources go with the last slot standing). */
129
+ dispose(): void;
130
+ }
131
+ /**
132
+ * A kind as the ground registers it: its name (unique in a ground), its stratum, and how its root pass is made on
133
+ * the root's mat — once per device; every other slot's pass is `spawn`ed from that one.
134
+ */
135
+ export interface KindProgram<R = unknown> {
136
+ readonly name: string;
137
+ readonly stratum: StratumName;
138
+ /**
139
+ * A kind that lays a COMPOSITE (design-015 §4.2): its pass renders every one of its objects into a target of its own in `prepare`
140
+ * (depth, MSAA, shadow maps — the notebook's layer, the calendar's) and `drawRange` lays that target over the frame in one draw.
141
+ * The ground draws such a kind as ONE run, [0, count), after every other run of its stratum — its objects cannot interleave with
142
+ * another kind's without a target per run (D-D4's exception: a note laid on a notebook draws under it). Absent: the kind's objects
143
+ * are cut into runs in the slot's paint order.
144
+ */
145
+ readonly composite?: boolean;
146
+ /**
147
+ * K7b: the kind's CARD MATERIAL — its records drawn by the desk's ONE flat-card pipeline (card/card.ts), interleaved with every
148
+ * other material kind's objects in one run. Absent: the kind draws every record itself, a run of its own.
149
+ */
150
+ readonly card?: CardMaterial;
151
+ create(device: GPUDevice, format: GPUTextureFormat, mat: MatPass): Promise<KindPass<R>>;
152
+ }
153
+ /** A binding of a CARD MATERIAL (K7b): the WGSL the card declares after `@group(0) @binding(n)`, and its layout (the stages, what it is). */
154
+ export interface CardBinding {
155
+ /** Whole, after the attribute: `var<uniform> paper_k: PaperUniforms` — its name UNIQUE across every kind's material (a kind prefixes its own). */
156
+ readonly wgsl: string;
157
+ readonly entry: BindKind;
158
+ }
159
+ /**
160
+ * A kind's CARD MATERIAL (K7b, design-016 §6 K7 — the run question). In mixed sibling order a run of one kind ends at the next
161
+ * object of another (rig:scale: draws ≈ 0.3 × the objects drawn, at every zoom); the kinds that declare a material are composed
162
+ * into ONE pipeline, so interleaved objects of every such kind are one run, one draw. Each object is drawn there by its OWN kind's
163
+ * functions over its own kind's records, uniforms and textures — the pixels its own pipeline makes. The card's module is the
164
+ * kit's pieces and every material's structs and modules (deduplicated by name and label), then its bindings, its `only`, its
165
+ * card functions (`shaders.entry` — the same text its own pass composes) and a dispatch on the card's material.
166
+ */
167
+ export interface CardMaterial {
168
+ /**
169
+ * The kind's program as its own pass composes it — the kit's pieces, its structs, its pure modules — its `entry` the CARD FUNCTIONS
170
+ * over its bindings; asked when the card is composed (a host's text read then, as a pass reads it when it is made).
171
+ */
172
+ shaders(): ComposeOptions;
173
+ /** WGSL the card composes that the kind's own entry defines otherwise (a texel read from its thumbnails alone — the card binds no pool). */
174
+ readonly only?: string;
175
+ /** Its bindings beyond the slot's view block and mat (`u`, `gobo_tex`, `noise_tex` — the card's), in its pass's `cardResources` order. */
176
+ readonly bindings: readonly CardBinding[];
177
+ /** `fn <quad>(slot: u32, vid: u32) -> vec4f`: corner `vid`'s clip position; (2, 2, 2, 1) — the degenerate — collapses a culled one. */
178
+ readonly quad: string;
179
+ /** `fn <frag>(slot: u32, clip: vec4f) -> vec4f`: the fragment's premultiplied colour through the slot's presentation; alpha < 0 = discard. */
180
+ readonly frag?: string;
181
+ /**
182
+ * The fragment WRITTEN OUT instead of `frag`'s call: WGSL statements over `slot` and `in.clip` that set `c` (or discard) — the
183
+ * kind's own entry's fragment, statement for statement. For a kind whose shade reached through one more function compiles to
184
+ * other bits (the board's: one LSB on a pixel a scene — measured, K7b): the card then runs the very code its entry runs.
185
+ */
186
+ readonly fragInline?: string;
187
+ }