@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,536 @@
1
+ import { type Entity, type FramePickSlot, type HeldPoseSlot, type MarqueeBuffer, type NavFace, type NavGeometrySlot, type PointPick, 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 HoldOptions } from "../hold/pose";
8
+ import { type SelectionAnchor } from "../compose/marks";
9
+ import { type DeskReflector, type DeskReflectorStats, type DeskWakes } from "../compose/reflector";
10
+ import { type KindFault } from "../faults";
11
+ import { type CaptureOptions, Ground, type GroundFrameInputs } from "../ground";
12
+ import type { KindProgram } from "../kind";
13
+ import type { ObjectFlux } from "../kinds/world";
14
+ import { type GridConfig } from "../mat/grid";
15
+ import type { GlyphAtlasMeta, MatConfig, PlateName } from "../mat/layout";
16
+ import type { ObjectSprings } from "../kit/springs";
17
+ import type { KindDriver, KindLocal } from "../kinds/world";
18
+ import { type BlobStore } from "../kit/blobs";
19
+ import { type Lent } from "../kit/services";
20
+ import { type TypingDocs } from "../docs";
21
+ import { type TextRaster } from "../kit/raster";
22
+ import type { DeskEditor } from "../kit/editor";
23
+ import type { InsideView } from "../kit/inside";
24
+ import { type MemoryLedger } from "../gpu-memory";
25
+ import { type GpuProfiler } from "../gpu-profiler";
26
+ import { type SubmitInstrument } from "../submit-instrument";
27
+ import type { GroundTheme, Palette } from "../theme";
28
+ import { type TrayOptions } from "../tray/drawer";
29
+ import type { TrayFluxState, TrayPin } from "../tray/flux";
30
+ import type { TrayLaid } from "../tray/pass";
31
+ export interface DeskLayerOptions {
32
+ /** The theme in force at the mount (the app's `themeFrom(name, palette)`). */
33
+ readonly theme: GroundTheme;
34
+ /** The app's palette — what each kind's `theme()` reads its look from (`PaperPalette`, `MiniMatPalette`). */
35
+ readonly palette: Palette;
36
+ /**
37
+ * The OBJECT widget types this desk draws, beyond the engine catalog's own: their kinds are registered
38
+ * with the ground and join the builder's journal. The catalog's object types are always included.
39
+ */
40
+ readonly objects?: readonly WidgetType[];
41
+ /** Render-only kinds to register beside the objects' (a program with no world half yet). */
42
+ readonly kinds?: readonly KindProgram[];
43
+ /** The ambient policy (design-015 §4.6): `idle` by default. */
44
+ readonly ambient?: AmbientMode;
45
+ /** How long after the last touch the wind blows, ms (20 000). */
46
+ readonly ambientIdleMs?: number;
47
+ /** The root's grid at the mount: the mat's config (its gobo, its rulers) and the lattice's fade-in. */
48
+ readonly grid?: GridConfig;
49
+ /**
50
+ * THE HAND as the host's chrome needs it (petition I20), read at the mount: the held object's reading fit keeps `top` CSS px under
51
+ * the view's top (`HOLD.top`, 56 — a phone keeps `HOLD.topPhone`) and `band` above its foot (`HOLD.band`, 72 — the held bar's band),
52
+ * and the held bar travels `travelMs` (M1; the bar is the host's — the anchor carries it, `HeldAnchor.travelMs`; absent, the bar's
53
+ * own). Each a finite number ≥ 0; absent, `HOLD`'s.
54
+ */
55
+ readonly hold?: HoldOptions;
56
+ /**
57
+ * THE DRAWER as the host's chrome needs it (petition I21), read at the mount: its `foot` inset, CSS px (0) — the pegboard's laid
58
+ * content ends this far above the board's bottom edge (the face's clip ends there, the veil lays the plain board over it and feathers
59
+ * out over `DRAWER.fade` above it — the header's mirror), where a host's line floats over the board; the scroll's range grows by it,
60
+ * so the last line is still reached; the board runs to its edge. A finite number ≥ 0; absent, 0.
61
+ */
62
+ readonly tray?: TrayOptions;
63
+ /**
64
+ * THE ROOM'S OTHER PEOPLE (petition I26), read at the mount: `false` — the host draws its peers itself (VibeField draws each by
65
+ * face, from `usePresencePeers`), so the host the layer is mounted in (`@ice/dom`'s `createDeskHost`, `<Desk>`) mounts no remote
66
+ * cursors — no plane, no reflector; the layer says so on its handle (`DeskLayerHandle.cursors`). The presence session,
67
+ * `usePresencePeers` and the local OS and open-hand cursors are untouched. Absent or `true`, the host draws them, as ever.
68
+ */
69
+ readonly cursors?: boolean;
70
+ /** 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). */
71
+ readonly springs?: ObjectSprings;
72
+ /** The device pixel ratio the canvas is capped at (2). */
73
+ readonly maxDpr?: number;
74
+ /** 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. */
75
+ readonly gpu?: GPU;
76
+ /** Called once with the layer's OWN device, before anything submits. */
77
+ readonly onDevice?: (device: GPUDevice) => void;
78
+ /** The layer's name in the reflector roster. */
79
+ readonly name?: string;
80
+ /** The app's text raster (`inkRaster({ faces: penFaces({ … }) })`, D2c): absent, no note is written live — the pinned rasters only. */
81
+ readonly text?: TextRaster;
82
+ /** The document a note's typing session commits into — the facade's `engine.docs` (D2c); absent, typing stays runtime-only. */
83
+ readonly docs?: TypingDocs;
84
+ /** A typing session ends after this long without input, ms (1000). */
85
+ readonly idleMs?: number;
86
+ /** 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. */
87
+ readonly blobs?: BlobStore;
88
+ /**
89
+ * More SERVICES the host lends its kinds (K8a, kit/services.ts), each under its key — `service(KEY, value)` — beside the three it
90
+ * lends by name (`text` → `TEXT_RASTER`, `blobs` → `BLOB_STORE`, and `PICTURE_DECODER`, the desk's own decode). A plugin kind
91
+ * `use`s one by its key; a name lent twice (here, or by an object's DOM half) is a mount error.
92
+ */
93
+ readonly services?: readonly Lent[];
94
+ /**
95
+ * THE RASTER BUDGET (D6, design-015 §11.4), bytes: what every kind's raster caches may hold together — a board's ink (its strokes
96
+ * are the truth; evicted, it replays when next drawn), a notebook page's CPU raster, the calendar's tiles. The least recently used
97
+ * off-screen raster goes first. Default 192 MB.
98
+ */
99
+ readonly rasterBudget?: number;
100
+ /**
101
+ * THE FRAME'S RASTER BUDGET (K6b, design-016 §6), ms: what one frame spends making the rasters the kinds asked of the queue
102
+ * (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
103
+ * raster standing. Default `RASTER_BUDGET_MS` (4).
104
+ */
105
+ readonly rasterMs?: number;
106
+ /**
107
+ * 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
108
+ * map entry per texture or buffer MADE, nothing per frame. Off by default (D-K2.2): a resource made before the ledger cannot be
109
+ * found after it (WebGPU has no enumeration), so it is the one instrument a host decides on at the mount.
110
+ */
111
+ readonly gpuLedger?: boolean;
112
+ }
113
+ /**
114
+ * 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
115
+ * eight page rasters and the calendar's tiles beside them) and 64 more since the PICTURES joined it (K6a, K-L4): their
116
+ * thumbnail array (1.4 MB a picture, always kept) and the details a frame binds — each its print's chain from the finest level
117
+ * it samples, so together at most about four texels a device pixel of the prints on screen (≈ 82 MB were prints to tile a
118
+ * 2400 × 1600 screen), where before every picture's whole chain stood outside any budget.
119
+ */
120
+ export declare const DEFAULT_RASTER_BUDGET: number;
121
+ /** The pinned still a parity scene states: the clocks, the plate and the gobo's opacity, the wind (0 = a still). */
122
+ export interface MatPin extends AmbientPin {
123
+ readonly plate?: PlateName;
124
+ readonly opacity?: number;
125
+ readonly wind?: number;
126
+ }
127
+ /**
128
+ * The layer's honest state: `pending` until the device and the pipelines are here; `ready`; `degraded` — the device reported an error
129
+ * nobody captured (out of memory, a validation or an internal error): the desk still draws what it can, but a frame — or every frame,
130
+ * an attachment left invalid — may be lost, and the state never reads `ready` again on its own (D7); `failed` — no desk (refused, or
131
+ * the device lost). `message` names the cause.
132
+ *
133
+ * `faults` (petition I24) — the KINDS this desk draws as MISSING, each its name and why, in the order they went: refused at create (a
134
+ * pass that would not compile, a pipeline that failed validation) or quarantined at three strikes (a `resolve`, `record`, `chip`, `hit`,
135
+ * `tick` or `due` that threw — src/faults.ts). Absent while none is. One kind's fault is that kind's: the state does not move for it
136
+ * (`ready` stays `ready`), its objects wear the desk's missing face, nothing of it is called again. Each is said ONCE — the status
137
+ * moves when a kind goes missing (`onStatus` hears it; a kind refused at the boot rides the boot's own `ready`), never again for it.
138
+ */
139
+ export interface DeskLayerStatus {
140
+ readonly state: "pending" | "ready" | "degraded" | "failed";
141
+ readonly message?: string;
142
+ readonly faults?: readonly KindFault[];
143
+ }
144
+ /** The mount context — the fields of `@ice/dom`'s `LayerContext` this layer reads, mirrored structurally (dom never imports the desk). */
145
+ export interface DeskLayerContext {
146
+ readonly host: {
147
+ readonly container: HTMLElement;
148
+ };
149
+ readonly world: World;
150
+ readonly framePick?: FramePickSlot;
151
+ /**
152
+ * The interaction stack's exact pick out of the tick (`stack.pickAt`, petition I27 — what a press at a screen point would touch now,
153
+ * through `framePick` above): the handle's `pick` answers a host through it. Absent (a bare host), `pick` answers null.
154
+ */
155
+ readonly pickAt?: (sx: number, sy: number) => PointPick | undefined;
156
+ /** The nav geometry seam (design-015 §9, D2b): the desk sets its word on its containers' drawn faces here, clears it at dispose. */
157
+ readonly navGeometry?: NavGeometrySlot;
158
+ /** 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. */
159
+ readonly heldPose?: HeldPoseSlot;
160
+ /** 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. */
161
+ readonly trayPose?: TrayPoseSlot;
162
+ readonly transitions?: {
163
+ register(adapter: PresentationTransitionAdapter): () => void;
164
+ };
165
+ readonly catalog?: {
166
+ widgetTypes(): readonly WidgetType[];
167
+ };
168
+ /** The interaction stack's marquee preview (`stack.marqueeBuffer`, out of the ECS): the vellum the marks draw (D4a). */
169
+ readonly readMarquee?: () => MarqueeBuffer;
170
+ /** The engine's spatial index (`stack.index`; design-015 §2.5, D6): the cull's broad phase. Absent, every member is tested. */
171
+ readonly spatial?: SpatialSource;
172
+ /** The engine's device (`engine.compositorDevice`, D7): the layer draws with it and never acquires its own — ONE device per engine. */
173
+ readonly gpu?: {
174
+ readonly adapter: GPUAdapter;
175
+ readonly device: GPUDevice;
176
+ };
177
+ /**
178
+ * The engine's frame gate (K7a — the SLEEP, `@ice/core` frame-control.ts): the layer registers the desk's wake (when its reflector,
179
+ * 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
180
+ * alone started (`settled`) asks only what is due. Absent (a headless host): every part is asked every step, as before.
181
+ */
182
+ readonly frame?: {
183
+ wake(reason: string): void;
184
+ wakeWhen(name: string, due: (now: number) => number): () => void;
185
+ settled(): boolean;
186
+ };
187
+ }
188
+ /** The selection menu's source (D4a): the marks' anchor as of the last frame, and a subscription that fires when it changes. */
189
+ export interface SelectionSource {
190
+ anchor(): SelectionAnchor;
191
+ subscribe(listener: () => void): () => void;
192
+ }
193
+ /**
194
+ * The object under a screen point as the desk's own pick resolves it (petition I27 — `DeskLayerHandle.pick`): what a press there
195
+ * touches, so what a primary click there selects — the host selects it through the engine's ops (`ops.setSelection([entity])`) and
196
+ * reads its acts off the selection's anchor.
197
+ */
198
+ export interface PickResult {
199
+ readonly entity: Entity;
200
+ /** Its object type (its `PrefabId`) — what the host names it by and finds its type with (`engine.catalog.widget(type)`). */
201
+ readonly type: string;
202
+ /**
203
+ * The canvas it lies in — the frame the pick is made in: the board root on the root desk, the container entered (a mini mat whose
204
+ * desk is the view); `NO_ENTITY` in a world with no document.
205
+ */
206
+ readonly canvas: Entity;
207
+ /**
208
+ * Its kind's PART under the point (design-014): `""` the object itself — its body or its frame, which a click selects; a named part
209
+ * (the calendar's roll, corner and foot) is the kind's own — a click there works the part and selects nothing.
210
+ */
211
+ readonly part: string;
212
+ }
213
+ /**
214
+ * The desk's MAIN-THREAD time (D6): every flush of the layer's reflector — the kinds' ticks, the pull, the build and the
215
+ * render when a frame is due — counted and timed since the mount; `frames` are the flushes that drew, `frameMs` their share.
216
+ * At rest a tick that draws nothing must cost next to nothing (design-015 §11.4: ≤ 0.1 ms of main thread per second).
217
+ */
218
+ export interface DeskLayerPerf {
219
+ readonly ticks: number;
220
+ readonly ms: number;
221
+ readonly frames: number;
222
+ readonly frameMs: number;
223
+ /** Each kind's `tick`, asked (K7a): at rest a kind is asked only when it is due — the registered-wake witness. */
224
+ readonly kindTicks: Readonly<Record<string, number>>;
225
+ /** The drivers asked (`idle`, then `follow`): none on a step a registered time alone started (K7a). */
226
+ readonly driverAsks: number;
227
+ /** The mount's own cost as its boot went (petition I25). */
228
+ readonly boot: DeskLayerBoot;
229
+ }
230
+ /**
231
+ * THE MOUNT'S COST (petition I25 — a desk's kinds are compiled at its mount, so a host that changes them remounts, and may veil it):
232
+ * the boot's milestones, ms since the mount (the factory's call, on `performance.now()`'s clock), each absent until it happens — for
233
+ * good on a boot that failed. `device`: the device in hand (the adapter and the device asked for, or the engine's adopted); `compiled`:
234
+ * the passes compiled (`Ground.create` resolved — the status `ready`); `presented`: the first frame's GPU work done
235
+ * (`queue.onSubmittedWorkDone()` after its submit — the compositor's from then).
236
+ */
237
+ export interface DeskLayerBoot {
238
+ readonly device?: number;
239
+ readonly compiled?: number;
240
+ readonly presented?: number;
241
+ }
242
+ /**
243
+ * 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
244
+ * the tray's input), the flux's pins and its state.
245
+ */
246
+ /** 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. */
247
+ export interface TraySpecimenSeen {
248
+ readonly type: string;
249
+ readonly kind: string;
250
+ readonly label: string;
251
+ readonly accessory: string;
252
+ readonly screen: {
253
+ readonly x0: number;
254
+ readonly y0: number;
255
+ readonly x1: number;
256
+ readonly y1: number;
257
+ };
258
+ readonly pegs: readonly (readonly [number, number])[];
259
+ readonly zoom: number;
260
+ /** K5b: its object as drawn on screen (the fit inside the hang). */
261
+ readonly object: {
262
+ readonly x0: number;
263
+ readonly y0: number;
264
+ readonly x1: number;
265
+ readonly y1: number;
266
+ };
267
+ }
268
+ /** 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. */
269
+ export interface TrayCarriedSeen {
270
+ readonly type: string;
271
+ readonly phase: string;
272
+ readonly ghost?: number;
273
+ readonly screen: {
274
+ readonly x0: number;
275
+ readonly y0: number;
276
+ readonly x1: number;
277
+ readonly y1: number;
278
+ };
279
+ readonly zoom: number;
280
+ }
281
+ /**
282
+ * Where the tray's BAR is placed from (design-018 §5 — `<TrayBar>`, @ice/react, reads it structurally): the drawer as the last frame
283
+ * 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
284
+ * 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
285
+ * chips lie in the header as drawn.
286
+ */
287
+ export interface TrayAnchor {
288
+ /** The drawer is out (the fact: its slide may still be on its way). */
289
+ readonly open: boolean;
290
+ /**
291
+ * 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
292
+ * 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`,
293
+ * where nothing of the board's content shows and the bar lays its chips.
294
+ */
295
+ readonly drawer: {
296
+ readonly x: number;
297
+ readonly y: number;
298
+ readonly w: number;
299
+ readonly p: number;
300
+ readonly header: {
301
+ readonly y: number;
302
+ readonly h: number;
303
+ };
304
+ } | null;
305
+ readonly view: {
306
+ readonly width: number;
307
+ readonly height: number;
308
+ };
309
+ /** 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). */
310
+ readonly night: number;
311
+ /** An object is IN HAND (not flying home): the selection menu has the view's foot — the bar steps aside. */
312
+ readonly held: boolean;
313
+ /** How many entries the drawer's frame hangs, every category (0: nothing to offer here — the bar steps aside). */
314
+ readonly entries: number;
315
+ /** The category the drawer shows ("" all) and the categories its frame hangs, in the lay's order (design-018 §6). */
316
+ readonly category: string;
317
+ readonly categories: readonly TrayCategory[];
318
+ }
319
+ export interface DeskTrayDoor {
320
+ /** Open the drawer: refused (false) while an object is in hand; gestures in flight cancel. */
321
+ open(): boolean;
322
+ close(): void;
323
+ /** Open or close; returns whether it is open now. */
324
+ toggle(): boolean;
325
+ isOpen(): boolean;
326
+ /** The board's scroll, CSS px past its top — set when given (any value: a rig's 10⁶ rows down), and returned. */
327
+ scroll(px?: number): number;
328
+ /** The facts and the flux as of now, the drawer as last drawn (the pose seam's answer) and what the pass last laid. */
329
+ state(): TrayFluxState & {
330
+ readonly frame: TrayScreenFrame | undefined;
331
+ readonly laid: TrayLaid | null;
332
+ readonly specimens: readonly TraySpecimenSeen[];
333
+ readonly tags: number;
334
+ readonly slots: number;
335
+ readonly carried: readonly TrayCarriedSeen[];
336
+ readonly presented: readonly number[];
337
+ };
338
+ /** Pin the drawer for a still — the slide, the band, or hidden; `null` unpins. */
339
+ pin(pin: TrayPin | null): void;
340
+ /**
341
+ * design-018 §6 — the category the drawer shows ("" all): set when given (core's `setTrayCategory` — the lay lays only its
342
+ * entries, the board starts at its top, and it falls back to all when the frame hangs none of it), and returned.
343
+ */
344
+ category(id?: string): string;
345
+ /** 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). */
346
+ categories(): readonly TrayCategory[];
347
+ /** design-018 §5 — what the bar is placed from, as of the last frame drawn. */
348
+ anchor(): TrayAnchor;
349
+ /**
350
+ * design-018 §5 — tell `listener` after each frame that moved what `anchor()` says: the drawer as drawn (its slide, frame by frame),
351
+ * open or shut, the category or the categories, the hand, the entries, the view. Never at rest: no frame, no call.
352
+ */
353
+ subscribe(listener: () => void): () => void;
354
+ }
355
+ export interface DeskLayerHandle {
356
+ /** The drawing reflector — the facade registers it right after the plane transform, where the ground layer has always gone. */
357
+ readonly reflector: ReflectorDef & {
358
+ available(): boolean;
359
+ };
360
+ dispose(): void;
361
+ /**
362
+ * Whether the host mounts the room's other people's cursors (petition I26): `deskLayer({ cursors })` as read at the mount, `true`
363
+ * when absent — `@ice/dom`'s `createDeskHost` reads it off the handle (its structural `LayerHandle.cursors`) before it registers them.
364
+ */
365
+ readonly cursors: boolean;
366
+ /** The canvas in the ground slot. */
367
+ readonly canvas: HTMLCanvasElement;
368
+ /** The device is acquired and `Ground.create` resolved. */
369
+ available(): boolean;
370
+ status(): DeskLayerStatus;
371
+ /**
372
+ * Told each time `status()` moves — the boot's end, an uncaptured error, the device lost after the boot (K9: a host says so on
373
+ * its page; a desk that just ended leaves no canvas behind). Returns the unsubscribe; `dispose` drops every listener.
374
+ */
375
+ onStatus(listener: (status: DeskLayerStatus) => void): () => void;
376
+ /** 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. */
377
+ device(): GPUDevice | undefined;
378
+ /** The ground once made (a rig's door to a pass: `ground()?.pass("paper")`). */
379
+ ground(): Ground | null;
380
+ /** The theme changed (and, with it, the palette): the looks are remade, the next frame re-renders. */
381
+ setTheme(theme: GroundTheme, palette?: Palette): void;
382
+ /**
383
+ * THE CAPTURE DOOR (petition I23 — the covers' still, the thumbnails, "Send to…"): the desk as the LAST PRESENTED frame showed
384
+ * it — the same camera, theme, selection marks, hand and tray (what to hide is the host's, by its own doors, before the call) —
385
+ * as an `ImageBitmap` of `rect` (CSS px of the view; the whole view when absent) at the view's dpr × `scale` (1; a thumbnail
386
+ * asks 0.25). Inside: that frame's inputs drawn ONCE MORE into a readable texture at the asked size and read back
387
+ * (`Ground.capture`) — never a copy kept of every frame, never a frame: the swap chain is not touched, the loop is not woken, no
388
+ * frame is counted (`redraws()`, `perf().frames`), and the memory ledger shows the still and its readback as a `capture` line of
389
+ * its own while they live and nothing after. Taken while the frame gate holds (`engine.frame.freeze`), it is the parked frame;
390
+ * live, the most recent. `undefined`, never a throw, while `status()` is `failed` or `degraded`, before the first frame has been
391
+ * presented, or when the device is lost mid-copy (a malformed option throws at the call). Captures serialize; one asked for the
392
+ * same picture (equal options, no frame since) while another is in flight resolves to that one's bitmap.
393
+ */
394
+ capture(opts?: CaptureOptions): Promise<ImageBitmap | undefined>;
395
+ /**
396
+ * THE DESK'S PICK (petition I27 — a host's right-click selects the object under the pointer before it grows the menu): the object
397
+ * at `point` (CSS px of the view, the container's top-left at 0, 0 — a pointer event's client point less the container's rect) as
398
+ * the desk's own pick resolves it. Inside: the interaction stack's exact pick (`stack.pickAt`, through the mount context) — the one
399
+ * body a press's `TouchesExact` is written by, never a second hit path — so the answer is what a primary click there selects: the
400
+ * topmost object by stratum and sibling order through its kind's mirror on the last frame's geometry, its PART reported; on a live
401
+ * mini mat's face the mini mat (its inside's objects are no members of this frame — entered, they pick with it as their canvas).
402
+ * Synchronous; reads the last frame's world — no redraw, no wake, no write; it never selects (the host decides). `null` over the
403
+ * bare mat and its rulers (printed on it), over what is not an object (a resize handle), while an object is in hand or the
404
+ * pegboard drawer is out (the desk inert to the pointer — D4b, design-017 §4), before the first frame, and while `status()` is
405
+ * `pending` or `failed` (`degraded` picks: the desk still draws, a click still selects). A point that is not two finite numbers throws.
406
+ */
407
+ pick(point: {
408
+ readonly x: number;
409
+ readonly y: number;
410
+ }): PickResult | null;
411
+ /** The mat's config over the current one (the rulers, the gobo): the root's grid. */
412
+ configureMat(mat: Partial<MatConfig>): void;
413
+ /** The lattice's fade-in window. */
414
+ configureFadeIn(fadeIn: GridConfig["fadeIn"]): void;
415
+ /** A 512² rgba8 plate into slot `c` or `b` — the app's generated plates (never the study's). */
416
+ setPlate(name: PlateName, bytes: Uint8Array<ArrayBuffer>): void;
417
+ /** The 128² blue-noise tile; the desk's own is uploaded at the mount. */
418
+ setNoise(bytes: Uint8Array<ArrayBuffer>): void;
419
+ /** The rulers' and the mini mats' glyph atlas (RULER.md). */
420
+ setGlyphs(bytes: Uint8Array<ArrayBuffer>, meta: GlyphAtlasMeta): void;
421
+ /** 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. */
422
+ pinMat(pin: MatPin | null): void;
423
+ /**
424
+ * 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 —
425
+ * the note's greeked writing is `{ greek }`, `PaperAsset`; the desk never knows it); `undefined` unpins. Until K8a this door was
426
+ * `pinGreek`, a note's writing stated by its shape (`GreekPin`) — the one kind-shaped door on the handle.
427
+ */
428
+ pinAsset(entity: Entity, asset: unknown): void;
429
+ /** Pin an object's spring targets for a still (a scene's `held` = `{ lift: 1 }`, never a `Grab`); `undefined` unpins. */
430
+ pinFlux(entity: Entity, targets: Partial<Pick<ObjectFlux, "lift" | "hover">> | undefined): void;
431
+ /** Every flux pin lifted. */
432
+ clearFlux(): void;
433
+ /** Live insides on or off (the oracle's `portals: false` — every face draws its far LOD alone). */
434
+ setPortals(on: boolean): void;
435
+ /**
436
+ * A kind's LAW, live (D5a — the dev panel's door): every object of `kind` resolves under `law` from the next build and the
437
+ * 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.
438
+ */
439
+ tuneLaw(kind: string, law: unknown): void;
440
+ /** Pin the root's dressing (the oracle's `lodZoom`); `null` unpins. */
441
+ pinLodZoom(zoom: number | null): void;
442
+ /** Hold every spring and ghost where it is — a still of a moving frame (a rig's flight pin). */
443
+ freeze(on: boolean): void;
444
+ /** Hold the re-dressing ramp at its start (the prototype harness's `redressPinned`). */
445
+ holdRedress(on: boolean): void;
446
+ /** 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`. */
447
+ pinHold(pin: HoldPin | null): void;
448
+ /** 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. */
449
+ hand(): HeldBuild | undefined;
450
+ /** THE SEAM's answer for a container under the camera (the live one unless given) — a rig's witness (`DeskBuilder.navFace`). */
451
+ navFace(entity: Entity, cam?: {
452
+ readonly x: number;
453
+ readonly y: number;
454
+ readonly zoom: number;
455
+ }): NavFace | undefined;
456
+ /** The last build's view of a container's inside (a rig's witness). */
457
+ insideViewOf(entity: Entity): InsideView | undefined;
458
+ /**
459
+ * The camera of the flight on now at progress `p` (the prototype's `flightAt`: the endpoints c0 and c1 themselves,
460
+ * `flightCamera` between) — what a rig's flight pin writes each tick; `undefined` when no flight drives.
461
+ */
462
+ flightCameraAt(p: number): {
463
+ readonly x: number;
464
+ readonly y: number;
465
+ readonly zoom: number;
466
+ } | undefined;
467
+ /** The ambient policy, live: the mode, the idle window. */
468
+ setAmbient(mode: AmbientMode, idleMs?: number): void;
469
+ ambient(): Ambient;
470
+ /** 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. */
471
+ submits(): SubmitInstrument | undefined;
472
+ /** The layer's own main-thread time since the mount (D6, design-015 §11.4's idle gate): a rig diffs two readings. And the boot's milestones (`boot`, petition I25). */
473
+ perf(): DeskLayerPerf;
474
+ /** The raster budget's ledger (D6): what the kinds' caches hold, by owner, against the cap; the evictions so far. */
475
+ memory(): BudgetStats;
476
+ /** The frame's raster queue (K6b): the asks waiting and held, the runs, the turns, their ms and the most a turn spent. */
477
+ rasters(): RasterQueueStats;
478
+ /** The device's live GPU memory by label (K2) — kept only under `gpuLedger: true`, from the boot; undefined otherwise or before the device. */
479
+ gpuMemory(): MemoryLedger | undefined;
480
+ /**
481
+ * THE GPU PROFILER (K2, design-016 §4) on the layer's device — made on first ask, UNARMED (nothing installed) until `arm()`:
482
+ * each drawn frame's GPU span and passes, its draws by kind, pipelines, bind groups, uploads, and the ledger's memory; the
483
+ * layer's flush is its boundary. Undefined before the device.
484
+ */
485
+ profiler(): GpuProfiler | undefined;
486
+ /** The kinds' persistent record stores' counters by kind (D6, design-015 §4.3) — the root passes'; a rig diffs two readings. */
487
+ records(): Readonly<Record<string, RecordStoreStats>>;
488
+ redraws(): number;
489
+ stats(): DeskReflectorStats;
490
+ wakes(): DeskWakes;
491
+ /**
492
+ * The desk's registered wake taken apart (K7a — "why is the desk awake?"): when each part is next due, on `performance.now()`'s
493
+ * clock (`Infinity`: never on its own) — the reflector's, the drivers' (now while one follows), a kind woken, each kind's `due`,
494
+ * the tray's layers' let-go (`tray`, K7a over K5a) and the raster queue's waiting asks (`rasters`, K6b: now while any wait). A
495
+ * MISSING kind (petition I24) is a row of `kinds` whatever it declares: `KIND_MISSING` (−1 — no time; it is never due, nothing of
496
+ * it runs), and `at` never counts it.
497
+ */
498
+ due(now: number): {
499
+ readonly at: number;
500
+ readonly reflector: number;
501
+ readonly drivers: number;
502
+ readonly following: readonly string[];
503
+ readonly woken: readonly string[];
504
+ readonly kinds: Readonly<Record<string, number>>;
505
+ readonly tray: number;
506
+ readonly rasters: number;
507
+ };
508
+ geometryOf(e: Entity): unknown | undefined;
509
+ fluxOf(e: Entity): ObjectFlux | undefined;
510
+ lastInputs(): GroundFrameInputs | null;
511
+ /** 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. */
512
+ dirty(): boolean;
513
+ readonly builder: DeskBuilder;
514
+ /** 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. */
515
+ local(name: string): KindLocal | undefined;
516
+ /** 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). */
517
+ editor(): DeskEditor;
518
+ /**
519
+ * 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
520
+ * board's pen, the notebook's hand, the print's carry, the calendar's writing + hand + DOM half), or undefined. A rig casts to
521
+ * the kind's own driver type (`PaperDriver`, `CalendarDriver`); the desk itself never names one.
522
+ */
523
+ driver(type: string): KindDriver | undefined;
524
+ /** Where the selection menu goes (D4a): the marks' box around the selection, published after each frame it moved. */
525
+ readonly selection: SelectionSource;
526
+ /** The pegboard tray's door (design-017; K3). */
527
+ readonly tray: DeskTrayDoor;
528
+ /**
529
+ * The DOM-free reflector behind `reflector` — named `desk`, never `compose`: react's retired
530
+ * `GroundLayerHandle.compose?` was the ground's COMPOSE handle (the composited profile read its
531
+ * `sourceCanvas` seam off it, until D5b), and the desk was never one. The slot stays absent.
532
+ */
533
+ readonly desk: DeskReflector;
534
+ }
535
+ export type DeskLayerFactory = (ctx: DeskLayerContext) => DeskLayerHandle;
536
+ 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,16 @@
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 HeldReadoutContext, 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 HoldOptions, type HoldReserves, type HomePose, homePose, isNarrow, type ReadingTarget, readingTarget } from "./hold/pose";
9
+ export { NO_DOCS, type TypingDocs, type WritableSession, writable } from "./docs";
10
+ export { createKindFaults, faultText, KIND_MISSING, KIND_STRIKES, type KindFault, type KindFaults } from "./faults";
11
+ export { MISSING_KIND, MISSING_OBJECT } from "./missing/object";
12
+ export { isMissingRecord, missingFace, type MissingRecord } from "./missing/layout";
13
+ export * from "./theme";
14
+ export * from "./shaders";
15
+ export { BLUE_NOISE_SIZE, blueNoise } from "./assets/blue-noise.gen";
16
+ export { ZOOM_MAX, ZOOM_MIN } from "./lattice/lod";