@vibecook/ice 0.11.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/README.md +79 -50
  2. package/dist/chunk-BA7XJC27.js +2429 -0
  3. package/dist/chunk-BA7XJC27.js.map +1 -0
  4. package/dist/chunk-BKV4ZEU3.js +1 -0
  5. package/dist/chunk-BKV4ZEU3.js.map +1 -0
  6. package/dist/{chunk-VGVDJZSP.js → chunk-DYK6KNLG.js} +13206 -7387
  7. package/dist/chunk-DYK6KNLG.js.map +1 -0
  8. package/dist/chunk-ENIFIUEP.js +155 -0
  9. package/dist/chunk-ENIFIUEP.js.map +1 -0
  10. package/dist/chunk-IBWWLA6D.js +634 -0
  11. package/dist/chunk-IBWWLA6D.js.map +1 -0
  12. package/dist/{chunk-OR5FNVUE.js → chunk-JS6PG6YD.js} +398 -167
  13. package/dist/chunk-JS6PG6YD.js.map +1 -0
  14. package/dist/chunk-QXOCF56A.js +148 -0
  15. package/dist/chunk-QXOCF56A.js.map +1 -0
  16. package/dist/chunk-ZPUPBULB.js +7399 -0
  17. package/dist/chunk-ZPUPBULB.js.map +1 -0
  18. package/dist/desk-engine.js +36 -0
  19. package/dist/desk-engine.js.map +1 -0
  20. package/dist/desk-kit.js +244 -0
  21. package/dist/desk-kit.js.map +1 -0
  22. package/dist/desk-objects.js +12728 -0
  23. package/dist/desk-objects.js.map +1 -0
  24. package/dist/desk.js +469 -0
  25. package/dist/desk.js.map +1 -0
  26. package/dist/devtools.js +233 -189
  27. package/dist/devtools.js.map +1 -1
  28. package/dist/dom.js +7 -19
  29. package/dist/index.js +232 -20
  30. package/dist/kernel.js +53 -25
  31. package/dist/react.js +1045 -38
  32. package/dist/react.js.map +1 -1
  33. package/dist/types/packages/core/src/behavior/define-behavior.d.ts +11 -0
  34. package/dist/types/packages/core/src/behavior/runtime.d.ts +4 -0
  35. package/dist/types/packages/core/src/canvas/define-canvas-type.d.ts +86 -0
  36. package/dist/types/packages/core/src/canvas/define-container.d.ts +17 -0
  37. package/dist/types/packages/core/src/canvas/diagnostics.d.ts +27 -0
  38. package/dist/types/packages/core/src/canvas/engine-catalog.d.ts +70 -0
  39. package/dist/types/packages/core/src/canvas/extensions.d.ts +125 -0
  40. package/dist/types/packages/core/src/canvas/frame-behavior-host.d.ts +16 -0
  41. package/dist/types/packages/core/src/canvas/frame-preview.d.ts +79 -0
  42. package/dist/types/packages/core/src/canvas/frame-projection.d.ts +38 -0
  43. package/dist/types/packages/core/src/canvas/frame-view.d.ts +36 -0
  44. package/dist/types/packages/core/src/canvas/migrate.d.ts +14 -0
  45. package/dist/types/packages/core/src/canvas/placement.d.ts +30 -0
  46. package/dist/types/packages/core/src/canvas/presentation-transition.d.ts +100 -0
  47. package/dist/types/packages/core/src/canvas/runtime-extension-host.d.ts +16 -0
  48. package/dist/types/packages/core/src/canvas/session.d.ts +47 -0
  49. package/dist/types/packages/core/src/catalog/camera-derived.d.ts +16 -27
  50. package/dist/types/packages/core/src/catalog/desk.d.ts +326 -0
  51. package/dist/types/packages/core/src/catalog/gesture.d.ts +51 -0
  52. package/dist/types/packages/core/src/catalog/graph.d.ts +2 -2
  53. package/dist/types/packages/core/src/catalog/index.d.ts +2 -0
  54. package/dist/types/packages/core/src/catalog/pointer.d.ts +42 -0
  55. package/dist/types/packages/core/src/catalog/selection-presence.d.ts +7 -0
  56. package/dist/types/packages/core/src/catalog/settings-resources.d.ts +28 -2
  57. package/dist/types/packages/core/src/catalog/surface.d.ts +1 -0
  58. package/dist/types/packages/core/src/doc/doc-commit-sink.d.ts +18 -2
  59. package/dist/types/packages/core/src/doc/doc-kit.d.ts +21 -2
  60. package/dist/types/packages/core/src/doc/envelope.d.ts +5 -2
  61. package/dist/types/packages/core/src/doc/schema-migrate.d.ts +1 -1
  62. package/dist/types/packages/core/src/doc/version-gate.d.ts +21 -3
  63. package/dist/types/packages/core/src/engine/commit-sink.d.ts +10 -1
  64. package/dist/types/packages/core/src/engine/engine.d.ts +6 -0
  65. package/dist/types/packages/core/src/engine/frame-control.d.ts +74 -0
  66. package/dist/types/packages/core/src/engine/guests.d.ts +4 -1
  67. package/dist/types/packages/core/src/engine/world-doors.d.ts +12 -0
  68. package/dist/types/packages/core/src/facade/create-canvas-engine.d.ts +146 -13
  69. package/dist/types/packages/core/src/index.d.ts +33 -12
  70. package/dist/types/packages/core/src/input/queue.d.ts +3 -1
  71. package/dist/types/packages/core/src/interaction/install.d.ts +30 -0
  72. package/dist/types/packages/core/src/interaction/wakes.d.ts +24 -0
  73. package/dist/types/packages/core/src/nav/nav-geometry.d.ts +100 -0
  74. package/dist/types/packages/core/src/nav/nested-canvas.d.ts +47 -4
  75. package/dist/types/packages/core/src/ops/cascade.d.ts +2 -1
  76. package/dist/types/packages/core/src/ops/claims.d.ts +6 -0
  77. package/dist/types/packages/core/src/ops/insert.d.ts +4 -0
  78. package/dist/types/packages/core/src/ops/point-pick.d.ts +4 -1
  79. package/dist/types/packages/core/src/ops/sibling-order.d.ts +14 -4
  80. package/dist/types/packages/core/src/ops/tray.d.ts +48 -0
  81. package/dist/types/packages/core/src/presence/presence-kit.d.ts +5 -0
  82. package/dist/types/packages/core/src/schema/meta.d.ts +10 -0
  83. package/dist/types/packages/core/src/schema/prefab.d.ts +8 -0
  84. package/dist/types/packages/core/src/settings/defaults.d.ts +25 -6
  85. package/dist/types/packages/core/src/surface/gpu-device.d.ts +55 -0
  86. package/dist/types/packages/core/src/systems/camera-sim.d.ts +29 -0
  87. package/dist/types/packages/core/src/systems/chrome.d.ts +15 -23
  88. package/dist/types/packages/core/src/systems/drag-mods.d.ts +34 -0
  89. package/dist/types/packages/core/src/systems/held.d.ts +71 -0
  90. package/dist/types/packages/core/src/systems/insert-ghost.d.ts +2 -0
  91. package/dist/types/packages/core/src/systems/l0-input.d.ts +14 -0
  92. package/dist/types/packages/core/src/systems/l1-pick.d.ts +37 -1
  93. package/dist/types/packages/core/src/systems/l2-arbitrate.d.ts +18 -4
  94. package/dist/types/packages/core/src/systems/l3-behave.d.ts +4 -1
  95. package/dist/types/packages/core/src/systems/l3-claim.d.ts +7 -0
  96. package/dist/types/packages/core/src/systems/l3-connect.d.ts +1 -1
  97. package/dist/types/packages/core/src/systems/l3-drop.d.ts +30 -1
  98. package/dist/types/packages/core/src/systems/l3-marquee.d.ts +2 -1
  99. package/dist/types/packages/core/src/systems/l3-ports.d.ts +1 -1
  100. package/dist/types/packages/core/src/systems/l4-cursor.d.ts +5 -0
  101. package/dist/types/packages/core/src/systems/nav-flight.d.ts +85 -3
  102. package/dist/types/packages/core/src/systems/nav-tap.d.ts +44 -0
  103. package/dist/types/packages/core/src/systems/press-wheel.d.ts +11 -0
  104. package/dist/types/packages/core/src/systems/tray.d.ts +108 -0
  105. package/dist/types/packages/core/src/systems/zoom-through.d.ts +30 -0
  106. package/dist/types/packages/core/src/tools/define-tool.d.ts +10 -0
  107. package/dist/types/packages/core/src/widget/define-widget.d.ts +166 -63
  108. package/dist/types/packages/core/src/widget/equip.d.ts +14 -2
  109. package/dist/types/packages/core/src/widget/held-tools.d.ts +83 -0
  110. package/dist/types/packages/core/src/widget/menu-actions.d.ts +44 -0
  111. package/dist/types/packages/core/src/widget/mount-store.d.ts +21 -46
  112. package/dist/types/packages/core/src/widget/spawn.d.ts +1 -1
  113. package/dist/types/packages/desk/src/assets/blue-noise.gen.d.ts +10 -0
  114. package/dist/types/packages/desk/src/card/card.d.ts +103 -0
  115. package/dist/types/packages/desk/src/compose/ambient.d.ts +59 -0
  116. package/dist/types/packages/desk/src/compose/builder.d.ts +285 -0
  117. package/dist/types/packages/desk/src/compose/children.d.ts +3 -0
  118. package/dist/types/packages/desk/src/compose/index.d.ts +14 -0
  119. package/dist/types/packages/desk/src/compose/marks.d.ts +126 -0
  120. package/dist/types/packages/desk/src/compose/pick.d.ts +5 -0
  121. package/dist/types/packages/desk/src/compose/reflector.d.ts +111 -0
  122. package/dist/types/packages/desk/src/compose/tap.d.ts +5 -0
  123. package/dist/types/packages/desk/src/docs.d.ts +23 -0
  124. package/dist/types/packages/desk/src/engine/budget.d.ts +38 -0
  125. package/dist/types/packages/desk/src/engine/device.d.ts +54 -0
  126. package/dist/types/packages/desk/src/engine/index.d.ts +5 -0
  127. package/dist/types/packages/desk/src/engine/pipeline.d.ts +36 -0
  128. package/dist/types/packages/desk/src/engine/rasters.d.ts +66 -0
  129. package/dist/types/packages/desk/src/engine/records.d.ts +56 -0
  130. package/dist/types/packages/desk/src/engine/shader.d.ts +22 -0
  131. package/dist/types/packages/desk/src/engine/struct.d.ts +39 -0
  132. package/dist/types/packages/desk/src/engine/target.d.ts +26 -0
  133. package/dist/types/packages/desk/src/gpu-ablation.d.ts +61 -0
  134. package/dist/types/packages/desk/src/gpu-memory.d.ts +54 -0
  135. package/dist/types/packages/desk/src/gpu-profiler.d.ts +141 -0
  136. package/dist/types/packages/desk/src/gpu-wrap.d.ts +8 -0
  137. package/dist/types/packages/desk/src/ground.d.ts +388 -0
  138. package/dist/types/packages/desk/src/hold/focus.d.ts +53 -0
  139. package/dist/types/packages/desk/src/hold/pose.d.ts +132 -0
  140. package/dist/types/packages/desk/src/hold/shaders.d.ts +9 -0
  141. package/dist/types/packages/desk/src/host/editor.d.ts +18 -0
  142. package/dist/types/packages/desk/src/host/index.d.ts +9 -0
  143. package/dist/types/packages/desk/src/host/ink.d.ts +18 -0
  144. package/dist/types/packages/desk/src/host/layer.d.ts +430 -0
  145. package/dist/types/packages/desk/src/host/picture.d.ts +2 -0
  146. package/dist/types/packages/desk/src/host/surface.d.ts +5 -0
  147. package/dist/types/packages/desk/src/index.d.ts +13 -0
  148. package/dist/types/packages/desk/src/kind.d.ts +187 -0
  149. package/dist/types/packages/desk/src/kinds/world.d.ts +429 -0
  150. package/dist/types/packages/desk/src/kit/arrays.d.ts +88 -0
  151. package/dist/types/packages/desk/src/kit/blobs.d.ts +40 -0
  152. package/dist/types/packages/desk/src/kit/book.d.ts +2 -0
  153. package/dist/types/packages/desk/src/kit/editor.d.ts +103 -0
  154. package/dist/types/packages/desk/src/kit/eye.d.ts +37 -0
  155. package/dist/types/packages/desk/src/kit/hold.d.ts +1 -0
  156. package/dist/types/packages/desk/src/kit/index.d.ts +26 -0
  157. package/dist/types/packages/desk/src/kit/inside.d.ts +116 -0
  158. package/dist/types/packages/desk/src/kit/layer.d.ts +159 -0
  159. package/dist/types/packages/desk/src/kit/light.d.ts +3 -0
  160. package/dist/types/packages/desk/src/kit/mesh.d.ts +29 -0
  161. package/dist/types/packages/desk/src/kit/mips.d.ts +2 -0
  162. package/dist/types/packages/desk/src/kit/nav.d.ts +2 -0
  163. package/dist/types/packages/desk/src/kit/paper-tex.d.ts +5 -0
  164. package/dist/types/packages/desk/src/kit/physics.d.ts +44 -0
  165. package/dist/types/packages/desk/src/kit/place.d.ts +44 -0
  166. package/dist/types/packages/desk/src/kit/print.d.ts +30 -0
  167. package/dist/types/packages/desk/src/kit/raster.d.ts +34 -0
  168. package/dist/types/packages/desk/src/kit/sdf.d.ts +1 -0
  169. package/dist/types/packages/desk/src/kit/seeds.d.ts +11 -0
  170. package/dist/types/packages/desk/src/kit/services.d.ts +34 -0
  171. package/dist/types/packages/desk/src/kit/springs.d.ts +12 -0
  172. package/dist/types/packages/desk/src/kit/strokes.d.ts +93 -0
  173. package/dist/types/packages/desk/src/kit/text.d.ts +142 -0
  174. package/dist/types/packages/desk/src/kit/uniform.d.ts +8 -0
  175. package/dist/types/packages/desk/src/kit/view.d.ts +39 -0
  176. package/dist/types/packages/desk/src/kit/wgsl.d.ts +15 -0
  177. package/dist/types/packages/desk/src/lattice/line.d.ts +15 -0
  178. package/dist/types/packages/desk/src/lattice/lod.d.ts +52 -0
  179. package/dist/types/packages/desk/src/lattice/ruler.d.ts +88 -0
  180. package/dist/types/packages/desk/src/marks/assemble.d.ts +65 -0
  181. package/dist/types/packages/desk/src/marks/ease.d.ts +4 -0
  182. package/dist/types/packages/desk/src/marks/laser.d.ts +41 -0
  183. package/dist/types/packages/desk/src/marks/layout.d.ts +167 -0
  184. package/dist/types/packages/desk/src/marks/pass.d.ts +59 -0
  185. package/dist/types/packages/desk/src/marks/shaders.d.ts +12 -0
  186. package/dist/types/packages/desk/src/mat/grid.d.ts +50 -0
  187. package/dist/types/packages/desk/src/mat/lamp.d.ts +14 -0
  188. package/dist/types/packages/desk/src/mat/layout.d.ts +144 -0
  189. package/dist/types/packages/desk/src/mat/mat-pass.d.ts +83 -0
  190. package/dist/types/packages/desk/src/mat/night.d.ts +95 -0
  191. package/dist/types/packages/desk/src/mat/projector.d.ts +39 -0
  192. package/dist/types/packages/desk/src/mat/shaders.d.ts +17 -0
  193. package/dist/types/packages/desk/src/mat/tilt.d.ts +14 -0
  194. package/dist/types/packages/desk/src/nav/flight.d.ts +186 -0
  195. package/dist/types/packages/desk/src/nav/portal.d.ts +95 -0
  196. package/dist/types/packages/desk/src/object.d.ts +46 -0
  197. package/dist/types/packages/desk/src/pass-instrument.d.ts +89 -0
  198. package/dist/types/packages/desk/src/shaders.d.ts +12 -0
  199. package/dist/types/packages/desk/src/shaders.gen.d.ts +16 -0
  200. package/dist/types/packages/desk/src/submit-instrument.d.ts +36 -0
  201. package/dist/types/packages/desk/src/theme.d.ts +475 -0
  202. package/dist/types/packages/desk/src/tray/carry.d.ts +99 -0
  203. package/dist/types/packages/desk/src/tray/drawer.d.ts +113 -0
  204. package/dist/types/packages/desk/src/tray/flux.d.ts +46 -0
  205. package/dist/types/packages/desk/src/tray/index.d.ts +4 -0
  206. package/dist/types/packages/desk/src/tray/lattice.d.ts +71 -0
  207. package/dist/types/packages/desk/src/tray/layout.d.ts +7 -0
  208. package/dist/types/packages/desk/src/tray/look.d.ts +29 -0
  209. package/dist/types/packages/desk/src/tray/pass.d.ts +96 -0
  210. package/dist/types/packages/desk/src/tray/shaders.d.ts +10 -0
  211. package/dist/types/packages/desk/src/tray/specimens.d.ts +199 -0
  212. package/dist/types/packages/devtools/src/attach.d.ts +22 -8
  213. package/dist/types/packages/devtools/src/dock.d.ts +18 -14
  214. package/dist/types/packages/devtools/src/gpu-panel.d.ts +105 -0
  215. package/dist/types/packages/devtools/src/index.d.ts +5 -4
  216. package/dist/types/packages/dom/src/desk-host.d.ts +91 -0
  217. package/dist/types/packages/dom/src/host.d.ts +13 -14
  218. package/dist/types/packages/dom/src/index.d.ts +12 -10
  219. package/dist/types/packages/dom/src/loop.d.ts +18 -1
  220. package/dist/types/packages/dom/src/pointer-adapter.d.ts +5 -29
  221. package/dist/types/packages/dom/src/widget-focus.d.ts +17 -13
  222. package/dist/types/packages/ice/src/desk-engine.d.ts +2 -0
  223. package/dist/types/packages/ice/src/desk-kit.d.ts +6 -0
  224. package/dist/types/packages/ice/src/desk-objects.d.ts +5 -0
  225. package/dist/types/packages/ice/src/desk.d.ts +5 -0
  226. package/dist/types/packages/kernel/src/atlas-pack.d.ts +157 -0
  227. package/dist/types/packages/kernel/src/bezier.d.ts +0 -15
  228. package/dist/types/packages/kernel/src/coords.d.ts +0 -39
  229. package/dist/types/packages/kernel/src/index.d.ts +2 -2
  230. package/dist/types/packages/kernel/src/nav-flight.d.ts +6 -0
  231. package/dist/types/packages/kernel/src/tray.d.ts +155 -0
  232. package/dist/types/packages/objects/src/board/board-pass.d.ts +180 -0
  233. package/dist/types/packages/objects/src/board/board-pen.d.ts +36 -0
  234. package/dist/types/packages/objects/src/board/board.d.ts +104 -0
  235. package/dist/types/packages/objects/src/board/data.d.ts +31 -0
  236. package/dist/types/packages/objects/src/board/history.d.ts +33 -0
  237. package/dist/types/packages/objects/src/board/kind.d.ts +208 -0
  238. package/dist/types/packages/objects/src/board/layout.d.ts +102 -0
  239. package/dist/types/packages/objects/src/board/object.d.ts +7 -0
  240. package/dist/types/packages/objects/src/board/pen.d.ts +71 -0
  241. package/dist/types/packages/objects/src/board/shaders.d.ts +36 -0
  242. package/dist/types/packages/objects/src/board/stroke.d.ts +99 -0
  243. package/dist/types/packages/objects/src/board/theme.d.ts +150 -0
  244. package/dist/types/packages/objects/src/calendar/data.d.ts +97 -0
  245. package/dist/types/packages/objects/src/calendar/events.d.ts +58 -0
  246. package/dist/types/packages/objects/src/calendar/hand.d.ts +53 -0
  247. package/dist/types/packages/objects/src/calendar/host/input.d.ts +67 -0
  248. package/dist/types/packages/objects/src/calendar/host/print.d.ts +9 -0
  249. package/dist/types/packages/objects/src/calendar/kind.d.ts +297 -0
  250. package/dist/types/packages/objects/src/calendar/law.d.ts +151 -0
  251. package/dist/types/packages/objects/src/calendar/layout.d.ts +47 -0
  252. package/dist/types/packages/objects/src/calendar/month.d.ts +75 -0
  253. package/dist/types/packages/objects/src/calendar/object.d.ts +45 -0
  254. package/dist/types/packages/objects/src/calendar/pad.d.ts +42 -0
  255. package/dist/types/packages/objects/src/calendar/pass.d.ts +229 -0
  256. package/dist/types/packages/objects/src/calendar/print.d.ts +87 -0
  257. package/dist/types/packages/objects/src/calendar/printing.d.ts +80 -0
  258. package/dist/types/packages/objects/src/calendar/roll.d.ts +45 -0
  259. package/dist/types/packages/objects/src/calendar/shaders.d.ts +12 -0
  260. package/dist/types/packages/objects/src/calendar/sheet.d.ts +43 -0
  261. package/dist/types/packages/objects/src/calendar/tiles.d.ts +67 -0
  262. package/dist/types/packages/objects/src/calendar/turn.d.ts +73 -0
  263. package/dist/types/packages/objects/src/calendar/writing.d.ts +42 -0
  264. package/dist/types/packages/objects/src/index.d.ts +22 -0
  265. package/dist/types/packages/objects/src/kinds.d.ts +24 -0
  266. package/dist/types/packages/objects/src/minimat/inside.d.ts +17 -0
  267. package/dist/types/packages/objects/src/minimat/kind.d.ts +51 -0
  268. package/dist/types/packages/objects/src/minimat/layout.d.ts +83 -0
  269. package/dist/types/packages/objects/src/minimat/minimat.d.ts +179 -0
  270. package/dist/types/packages/objects/src/minimat/object.d.ts +8 -0
  271. package/dist/types/packages/objects/src/minimat/pass.d.ts +61 -0
  272. package/dist/types/packages/objects/src/minimat/shaders.d.ts +10 -0
  273. package/dist/types/packages/objects/src/minimat/theme.d.ts +98 -0
  274. package/dist/types/packages/objects/src/notebook/ink.d.ts +70 -0
  275. package/dist/types/packages/objects/src/notebook/kind.d.ts +236 -0
  276. package/dist/types/packages/objects/src/notebook/law.d.ts +129 -0
  277. package/dist/types/packages/objects/src/notebook/layout.d.ts +46 -0
  278. package/dist/types/packages/objects/src/notebook/leaf.d.ts +44 -0
  279. package/dist/types/packages/objects/src/notebook/mesh.d.ts +20 -0
  280. package/dist/types/packages/objects/src/notebook/motion.d.ts +107 -0
  281. package/dist/types/packages/objects/src/notebook/object.d.ts +8 -0
  282. package/dist/types/packages/objects/src/notebook/pages.d.ts +56 -0
  283. package/dist/types/packages/objects/src/notebook/pass.d.ts +197 -0
  284. package/dist/types/packages/objects/src/notebook/pick.d.ts +30 -0
  285. package/dist/types/packages/objects/src/notebook/raster.d.ts +28 -0
  286. package/dist/types/packages/objects/src/notebook/shaders.d.ts +11 -0
  287. package/dist/types/packages/objects/src/notebook/shape.d.ts +155 -0
  288. package/dist/types/packages/objects/src/notebook/theme.d.ts +76 -0
  289. package/dist/types/packages/objects/src/palette.d.ts +577 -0
  290. package/dist/types/packages/objects/src/paper/host/body.d.ts +30 -0
  291. package/dist/types/packages/objects/src/paper/kind.d.ts +81 -0
  292. package/dist/types/packages/objects/src/paper/layout.d.ts +73 -0
  293. package/dist/types/packages/objects/src/paper/object.d.ts +31 -0
  294. package/dist/types/packages/objects/src/paper/pages.d.ts +43 -0
  295. package/dist/types/packages/objects/src/paper/paper-pass.d.ts +86 -0
  296. package/dist/types/packages/objects/src/paper/paper.d.ts +117 -0
  297. package/dist/types/packages/objects/src/paper/shaders.d.ts +18 -0
  298. package/dist/types/packages/objects/src/paper/theme.d.ts +58 -0
  299. package/dist/types/packages/objects/src/paper/typing.d.ts +51 -0
  300. package/dist/types/packages/objects/src/paper/writing.d.ts +161 -0
  301. package/dist/types/packages/objects/src/photo/carry.d.ts +33 -0
  302. package/dist/types/packages/objects/src/photo/kind.d.ts +136 -0
  303. package/dist/types/packages/objects/src/photo/layout.d.ts +39 -0
  304. package/dist/types/packages/objects/src/photo/object.d.ts +5 -0
  305. package/dist/types/packages/objects/src/photo/photo-pass.d.ts +104 -0
  306. package/dist/types/packages/objects/src/photo/photo.d.ts +262 -0
  307. package/dist/types/packages/objects/src/photo/pictures.d.ts +152 -0
  308. package/dist/types/packages/objects/src/photo/sample.d.ts +9 -0
  309. package/dist/types/packages/objects/src/photo/shaders.d.ts +18 -0
  310. package/dist/types/packages/objects/src/preset.d.ts +44 -0
  311. package/dist/types/packages/objects/src/shaders.d.ts +3 -0
  312. package/dist/types/packages/objects/src/shaders.gen.d.ts +21 -0
  313. package/dist/types/packages/react/src/canvas-hooks.d.ts +12 -0
  314. package/dist/types/packages/react/src/desk.d.ts +56 -0
  315. package/dist/types/packages/react/src/engine-context.d.ts +2 -2
  316. package/dist/types/packages/react/src/frame-preview-boundary.d.ts +19 -0
  317. package/dist/types/packages/react/src/hooks.d.ts +9 -14
  318. package/dist/types/packages/react/src/index.d.ts +16 -9
  319. package/dist/types/packages/react/src/keymap.d.ts +21 -2
  320. package/dist/types/packages/react/src/selection-menu.d.ts +171 -0
  321. package/dist/types/packages/react/src/tray-bar.d.ts +124 -0
  322. package/package.json +64 -31
  323. package/dist/chunk-2TNVB2ON.js +0 -1163
  324. package/dist/chunk-2TNVB2ON.js.map +0 -1
  325. package/dist/chunk-OR5FNVUE.js.map +0 -1
  326. package/dist/chunk-Q665T4L7.js +0 -681
  327. package/dist/chunk-Q665T4L7.js.map +0 -1
  328. package/dist/chunk-VGVDJZSP.js.map +0 -1
  329. package/dist/ground.js +0 -1108
  330. package/dist/ground.js.map +0 -1
  331. package/dist/r3f.js +0 -1644
  332. package/dist/r3f.js.map +0 -1
  333. package/dist/types/packages/core/src/input/measure-queue.d.ts +0 -30
  334. package/dist/types/packages/core/src/settings/ground-config.d.ts +0 -101
  335. package/dist/types/packages/core/src/systems/measure-ingest.d.ts +0 -26
  336. package/dist/types/packages/devtools/src/gl-panel.d.ts +0 -69
  337. package/dist/types/packages/dom/src/measure-adapter.d.ts +0 -31
  338. package/dist/types/packages/dom/src/measure-wiring.d.ts +0 -49
  339. package/dist/types/packages/dom/src/planes.d.ts +0 -33
  340. package/dist/types/packages/dom/src/reflectors/chrome.d.ts +0 -33
  341. package/dist/types/packages/dom/src/reflectors/dom-widgets.d.ts +0 -59
  342. package/dist/types/packages/dom/src/reflectors/graybox.d.ts +0 -31
  343. package/dist/types/packages/dom/src/reflectors/plane-transform.d.ts +0 -38
  344. package/dist/types/packages/ground/src/index.d.ts +0 -69
  345. package/dist/types/packages/ground/src/layer.d.ts +0 -40
  346. package/dist/types/packages/ground/src/pass.d.ts +0 -41
  347. package/dist/types/packages/ground/src/passes/grid-contract.d.ts +0 -28
  348. package/dist/types/packages/ground/src/passes/grid-magnet-pass.d.ts +0 -2
  349. package/dist/types/packages/ground/src/passes/grid-magnet.d.ts +0 -31
  350. package/dist/types/packages/ground/src/passes/grid.d.ts +0 -10
  351. package/dist/types/packages/ground/src/passes/guides-collect.d.ts +0 -14
  352. package/dist/types/packages/ground/src/passes/guides.d.ts +0 -3
  353. package/dist/types/packages/ground/src/passes/magnet-collect.d.ts +0 -63
  354. package/dist/types/packages/ground/src/passes/soup-collect.d.ts +0 -35
  355. package/dist/types/packages/ground/src/passes/soup-mesh.d.ts +0 -8
  356. package/dist/types/packages/ground/src/passes/wires-collect.d.ts +0 -35
  357. package/dist/types/packages/ground/src/passes/wires.d.ts +0 -10
  358. package/dist/types/packages/ground/src/poles.d.ts +0 -47
  359. package/dist/types/packages/ground/src/renderer.d.ts +0 -15
  360. package/dist/types/packages/ice/src/ground.d.ts +0 -1
  361. package/dist/types/packages/ice/src/r3f.d.ts +0 -1
  362. package/dist/types/packages/kernel/src/eviction.d.ts +0 -23
  363. package/dist/types/packages/kernel/src/zoom-bands.d.ts +0 -19
  364. package/dist/types/packages/r3f/src/bridge.d.ts +0 -129
  365. package/dist/types/packages/r3f/src/composite-material.d.ts +0 -26
  366. package/dist/types/packages/r3f/src/compositor-pass.d.ts +0 -105
  367. package/dist/types/packages/r3f/src/dev-write-trap.d.ts +0 -30
  368. package/dist/types/packages/r3f/src/gl-root.d.ts +0 -96
  369. package/dist/types/packages/r3f/src/gl-router.d.ts +0 -70
  370. package/dist/types/packages/r3f/src/index.d.ts +0 -17
  371. package/dist/types/packages/r3f/src/island-state.d.ts +0 -112
  372. package/dist/types/packages/r3f/src/island.d.ts +0 -13
  373. package/dist/types/packages/r3f/src/pool.d.ts +0 -56
  374. package/dist/types/packages/r3f/src/preview-capture.d.ts +0 -19
  375. package/dist/types/packages/r3f/src/resource-registry.d.ts +0 -30
  376. package/dist/types/packages/r3f/src/self-sustain.d.ts +0 -39
  377. package/dist/types/packages/r3f/src/use-island-frame.d.ts +0 -39
  378. package/dist/types/packages/react/src/infinite-canvas.d.ts +0 -140
  379. package/dist/types/packages/react/src/preview-snapshots.d.ts +0 -17
  380. package/dist/types/packages/react/src/widget-preview.d.ts +0 -14
  381. package/dist/types/packages/react/src/widget-root.d.ts +0 -33
@@ -0,0 +1,95 @@
1
+ import type { RGB } from "../theme";
2
+ /** What the mat is lit by — a theme's light. `night` 0 is the reference's day chain, bit for bit. */
3
+ export interface MatLight {
4
+ /** 0 = the day (the reference's chain, exactly) · 1 = the night · between: a cross-fade of the two on the display. */
5
+ readonly night: number;
6
+ /** The Moon's illuminance on the desk, lux — where on the mesopic ramp the eye sits. */
7
+ readonly lux: number;
8
+ /** Scene → display: the scale the adapted eye's report is drawn at. */
9
+ readonly exposure: number;
10
+ /** The rods' own noise, display units, peak to peak. */
11
+ readonly snow: number;
12
+ /** The Moon's colour as the (partly) adapted eye takes it — linear sRGB at Y = 1. */
13
+ readonly moon: RGB;
14
+ /** The sky's share of the light where the Moon is blocked. */
15
+ readonly fill: number;
16
+ /** The rods' signal drawn as a colour — linear sRGB at Y = 1. */
17
+ readonly rod: RGB;
18
+ /** The dark the eye adds to everything — linear sRGB. */
19
+ readonly eigengrau: RGB;
20
+ }
21
+ /** The day: the reference's chain, untouched — every night number inert. */
22
+ export declare const DAY_LIGHT: MatLight;
23
+ /** The night as the theme states it (theme.ts `NIGHT`). */
24
+ export interface NightSpec {
25
+ /** The Moon's colour temperature, K. */
26
+ readonly kelvin: number;
27
+ /** Its illuminance on the desk, lux. */
28
+ readonly lux: number;
29
+ /** The sky's share in the shadow. */
30
+ readonly fill: number;
31
+ /** The rods' hue: a spectral wavelength (470–500 nm) and how far from white toward it. */
32
+ readonly rodHue: {
33
+ readonly nm: number;
34
+ readonly purity: number;
35
+ };
36
+ /** Eigengrau, sRGB 0..1. */
37
+ readonly eigengrau: RGB;
38
+ /** The display luminance (linear, Eigengrau included) the moonlit ground is drawn at — the appearance's one scale. */
39
+ readonly litLuminance: number;
40
+ /** The rods' noise, display units peak to peak. */
41
+ readonly snow: number;
42
+ /** CIECAM02's surround factor F for the degree of adaptation: 1 average · 0.9 dim · 0.8 dark. */
43
+ readonly surround: number;
44
+ }
45
+ export declare const srgbToLinear: (c: number) => number;
46
+ export declare const linearToSrgb: (c: number) => number;
47
+ export declare const linear: (c: RGB) => RGB;
48
+ /** Photopic luminance Y of a linear sRGB colour. */
49
+ export declare const luminance: (c: RGB) => number;
50
+ /**
51
+ * Scotopic luminance V' from XYZ — Larson, Rushmeier & Piatko 1997's regression
52
+ * (the one the night-rendering literature uses: Jensen et al. 2000, Kirk & O'Brien 2011).
53
+ * The rods peak at 507 nm: greens and blues keep their brightness by night, reds die.
54
+ */
55
+ export declare function scotopic(c: RGB): number;
56
+ /** The rods' signal, white = 1 — what the shader calls `rod`. */
57
+ export declare const rodSignal: (c: RGB) => number;
58
+ /** CIE 191:2010's mesopic adaptation coefficient (first order, seeded by the photopic luminance): 0 at 0.005 cd/m² (the rods alone), 1 at 5 (the cones alone). */
59
+ export declare const mesopicWeight: (L: number) => number;
60
+ /** CIECAM02's degree of chromatic adaptation at an adapting luminance (cd/m²): how much of the illuminant's colour the eye discounts. */
61
+ export declare const degreeOfAdaptation: (LA: number, F: number) => number;
62
+ /** The Planckian locus in CIE 1931 xy — Kang et al. 2002's fit, 1667–25000 K. */
63
+ export declare function planckianXY(T: number): readonly [number, number];
64
+ /** A chromaticity as linear sRGB at Y = 1. */
65
+ export declare const xyToLinear: (x: number, y: number) => RGB;
66
+ /** D65's chromaticity — sRGB's white. */
67
+ export declare const D65: readonly [number, number];
68
+ export declare function spectralXY(nm: number): readonly [number, number];
69
+ /** White pulled `purity` of the way toward a spectral hue, as linear sRGB at Y = 1. */
70
+ export declare function hueTint(nm: number, purity: number): RGB;
71
+ /**
72
+ * The reference's day chain writes the LINEARISED albedo to the swap chain as sRGB
73
+ * (README §4e), so what the display shows for a lit pixel is that value decoded once
74
+ * more: the day's displayed luminance of a ground colour.
75
+ */
76
+ export declare const dayLuminance: (groundSrgb: RGB) => number;
77
+ /** The eye's report of a linear albedo under `light` at `shade` (1 lit · `fill` in full shadow) — linear, before Eigengrau and the exposure. */
78
+ export declare function nightReport(light: MatLight, albedoLinear: RGB, shade: number): RGB;
79
+ /** The shader's `night_mat` on the CPU: what the display shows (sRGB 0..1), the snow left out. */
80
+ export declare function nightAppearance(light: MatLight, albedoLinear: RGB, shade: number): RGB;
81
+ /** The theme's night, computed for a ground colour (sRGB 0..1): the light the mat pass reads. */
82
+ export declare function nightLight(spec: NightSpec, groundSrgb: RGB): MatLight;
83
+ /** The light's four vec4s, by name (MatUniforms). */
84
+ export declare function lightValues(l: MatLight): {
85
+ night: number[];
86
+ moon: number[];
87
+ rod: number[];
88
+ eigengrau: number[];
89
+ };
90
+ /**
91
+ * A light between two (design-015 §8, D4b — the reading light): the object in hand keeps its DAY light while the mat
92
+ * stays moonlit, the change riding the carry (`t` 0 = `a`, 1 = `b`); every field lerped, the colours channel-wise.
93
+ * `nightAppearance` is linear in each of them within a frame, so a lerp of the parameters is an honest in-between.
94
+ */
95
+ export declare function mixLight(a: MatLight, b: MatLight, t: number): MatLight;
@@ -0,0 +1,39 @@
1
+ /** 16 column-major floats — `Matrix4.elements`, and what WGSL's `mat4x4f` reads. */
2
+ export type Mat4 = Float32Array;
3
+ /** The sixteen cells as a tuple: the length is the type, so a literal index needs no guard (ICE's kernel casts bounded reads the same way). */
4
+ export type Mat4Cells = readonly [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number];
5
+ export declare const cells: (m: Mat4) => Mat4Cells;
6
+ export type Vec3 = readonly [number, number, number];
7
+ export type Quat = readonly [number, number, number, number];
8
+ export interface ProjectorSpec {
9
+ /** World metres, y up — the desk scene's frame. */
10
+ readonly position: Vec3;
11
+ readonly quaternion: Quat;
12
+ readonly fovDeg: number;
13
+ readonly aspect: number;
14
+ readonly near: number;
15
+ readonly far: number;
16
+ }
17
+ /** three's `makePerspective`, WebGL coordinate system. */
18
+ export declare function perspective(fovDeg: number, aspect: number, near: number, far: number): Mat4;
19
+ /** Rotation matrix of a unit quaternion (three's `makeRotationFromQuaternion`). */
20
+ export declare function fromQuat(q: Quat): Mat4;
21
+ /** `a · b`, column-major. */
22
+ export declare function mul4(a: Mat4, b: Mat4): Mat4;
23
+ /** The inverse of `translate(p) · rotate(q)`: `Rᵀ · translate(−p)` — a camera's `matrixWorldInverse`. */
24
+ export declare function rigidInverse(position: Vec3, q: Quat): Mat4;
25
+ /** `projection · view` for a projector — the matrix a receiver multiplies its world position by. */
26
+ export declare function projectorMatrix(spec: ProjectorSpec): Mat4;
27
+ /** three's `Quaternion.setFromEuler`, order XYZ. */
28
+ export declare function quatFromEuler(x: number, y: number, z: number): Quat;
29
+ /** The reference's mouse tilt: `rotate(euler) · base`, the rotation applied in clip space. */
30
+ export declare function tilted(base: Mat4, ex: number, ey: number, ez: number): Mat4;
31
+ /** A world point through the matrix: NDC xyz and clip w (the linear depth of a perspective projector). */
32
+ export declare function project(m: Mat4, p: Vec3): {
33
+ ndc: [number, number, number];
34
+ w: number;
35
+ };
36
+ /** mat.wgsl `blur_ratio` — the reference's `getGoboBlurRatio`: linearise the WebGL NDC z, then a ramp between two depths. */
37
+ export declare function blurRatio(ndcZ: number, sharp: number, soft: number, near: number, far: number): number;
38
+ /** The hero desk's projector, as baked in the reference (research/tree-shadow/prototype/src/scenes.js). */
39
+ export declare const HERO_PROJECTOR: ProjectorSpec;
@@ -0,0 +1,17 @@
1
+ import type { ShaderPart } from "../engine/shader";
2
+ export interface MatShaders {
3
+ readonly modules: readonly ShaderPart[];
4
+ readonly wind: ShaderPart;
5
+ readonly entry: ShaderPart;
6
+ }
7
+ export interface MatShaderText {
8
+ /** shaders/portal.wgsl — the portal clip every pass includes. */
9
+ readonly portal: string;
10
+ readonly mat: string;
11
+ /** shaders/mat/ruler.wgsl — the rulers' print (RULER.md). */
12
+ readonly ruler: string;
13
+ readonly wind: string;
14
+ readonly matPass: string;
15
+ }
16
+ export declare const MAT_SHADER_FILES: Record<keyof MatShaderText, string>;
17
+ export declare function matShaders(t: MatShaderText): MatShaders;
@@ -0,0 +1,14 @@
1
+ export interface SecondOrder {
2
+ readonly k1: number;
3
+ readonly k2: number;
4
+ readonly k3: number;
5
+ readonly w: number;
6
+ readonly z: number;
7
+ readonly d: number;
8
+ target: [number, number];
9
+ prevTarget: [number, number];
10
+ value: [number, number];
11
+ velocity: [number, number];
12
+ }
13
+ export declare function secondOrder(f?: number, z?: number, r?: number, value?: readonly [number, number]): SecondOrder;
14
+ export declare function stepSecondOrder(s: SecondOrder, dt: number): void;
@@ -0,0 +1,186 @@
1
+ export interface CameraState {
2
+ readonly x: number;
3
+ readonly y: number;
4
+ readonly zoom: number;
5
+ }
6
+ export interface Rect {
7
+ readonly x: number;
8
+ readonly y: number;
9
+ readonly width: number;
10
+ readonly height: number;
11
+ }
12
+ export interface Viewport {
13
+ readonly width: number;
14
+ readonly height: number;
15
+ }
16
+ /** Uniform scale + translate: `A(q) = o + q·s`. */
17
+ export interface PortalAffine {
18
+ readonly s: number;
19
+ readonly ox: number;
20
+ readonly oy: number;
21
+ }
22
+ /** The world rect a camera shows through a viewport. */
23
+ export declare function visibleRect(cam: CameraState, vpW: number, vpH: number): Rect;
24
+ /**
25
+ * The portal embedding: map `arrival` (the world rect the arrival camera will
26
+ * show, in the CHILD frame's coords) onto `portal` (the container's body rect,
27
+ * in the PARENT frame's coords). Aspect-FIT with centres aligned (design-006
28
+ * §8.3 — the container's chrome absorbs the letterbox; a mini mat's face shows
29
+ * the inside past the arrival on its longer side, MINIMAT.md §3).
30
+ */
31
+ export declare function portalAffine(arrival: Rect, portal: Rect): PortalAffine;
32
+ export declare function invertAffine(a: PortalAffine): PortalAffine;
33
+ /** `(outer ∘ inner)(q) = outer(inner(q))` — for multi-level exit portals. */
34
+ export declare function composeAffine(outer: PortalAffine, inner: PortalAffine): PortalAffine;
35
+ /**
36
+ * Continuity solve: the camera `c0` (in the DESTINATION frame) under which
37
+ * departed-frame content mapped through `A` (departed → destination coords)
38
+ * renders EXACTLY as it did under `camPre` (in the departed frame) the instant
39
+ * before the cut. Zoom limits deliberately do NOT apply here — flight paths
40
+ * transit far outside the user-gesture band; only the ARRIVAL camera is
41
+ * clamped by the caller.
42
+ */
43
+ export declare function solveFlightStart(A: PortalAffine, camPre: CameraState): CameraState;
44
+ /**
45
+ * Destination camera expressed in departed-frame coordinates. Rendering the
46
+ * outgoing ground with this camera is pixel-equivalent to first mapping its
47
+ * points through A and then rendering under `destination`.
48
+ */
49
+ export declare function outgoingCamera(A: PortalAffine, destination: CameraState): CameraState;
50
+ /** Zoom distance in octaves — the flight-length measure (design-006 §4/§5). */
51
+ export declare function flightOctaves(from: CameraState, to: CameraState): number;
52
+ /**
53
+ * Depth-cap a flight start (design-006 §5): beyond `maxOctaves`, clamp the
54
+ * start zoom to `capFactor ×` the arrival zoom (dive direction preserved),
55
+ * keeping the exact start's view CENTRE — the portal anchor — so the motion
56
+ * still comes from/goes to the right place. `capped: true` means the caller
57
+ * presents the flight as a crossfade (`flightOpacity` with `frozen`).
58
+ */
59
+ export declare function capFlightStart(exact: CameraState, arrival: CameraState, vpW: number, vpH: number, maxOctaves: number, capFactor: number): {
60
+ c0: CameraState;
61
+ capped: boolean;
62
+ };
63
+ /**
64
+ * The flight path `c(p)`, p ∈ [0,1]: zoom log-lerped (constant perceived zoom
65
+ * velocity); view CENTRE linear in 1/zoom — exactly an anchored zoom whenever
66
+ * a fixed screen point exists between the endpoints, a graceful blend
67
+ * otherwise. Endpoints are exact: c(0) = c0, c(1) = c1.
68
+ */
69
+ export declare function flightCamera(c0: CameraState, c1: CameraState, p: number, vpW: number, vpH: number): CameraState;
70
+ /**
71
+ * One step of the critically-damped progress spring toward 1, in CLOSED FORM:
72
+ * with u = 1 − p, the exact solution is `u(t) = (u₀ + Bt)·e^(−ωt)`,
73
+ * `B = −v₀ + ω·u₀`. Unconditionally stable at ANY dt. From rest (v = 0) the
74
+ * approach is monotonic: p never overshoots 1.
75
+ */
76
+ export declare function springStep(p: number, v: number, omega: number, dtSec: number): {
77
+ p: number;
78
+ v: number;
79
+ };
80
+ /** Zoom-to-fit `content` with `pad` (world units), the zoom clamped into a band (kernel coords.ts). */
81
+ export declare function fitCamera(content: Rect, vpW: number, vpH: number, opts: {
82
+ pad: number;
83
+ minZoom: number;
84
+ maxZoom: number;
85
+ }): CameraState;
86
+ /** `@ice/core` NAV_TRANSITION_DEFAULTS — the response the product flies at. */
87
+ export declare const NAV: {
88
+ readonly responseMs: 420;
89
+ readonly exitResponseFactor: 0.8;
90
+ readonly durationPerOctave: 0.12;
91
+ readonly baseOctaves: 3.5;
92
+ readonly freezeOctaves: 4.2;
93
+ readonly capFactor: 10;
94
+ readonly settleP: 0.999;
95
+ readonly settleV: 0.02;
96
+ };
97
+ export type FlightTuning = {
98
+ readonly [K in keyof typeof NAV]: number;
99
+ };
100
+ /** `@ice/core` FIT_DEFAULTS — the NATURAL band an arrival is framed into (design-006, amended 2026-07-18). */
101
+ export declare const FIT: {
102
+ readonly pad: 80;
103
+ readonly minZoom: 0.5;
104
+ readonly maxZoom: 1;
105
+ };
106
+ export type FitBand = {
107
+ readonly [K in keyof typeof FIT]: number;
108
+ };
109
+ export type NavKind = "enter" | "exit";
110
+ /**
111
+ * The departing and arriving presentations' opacity at progress `p` — ICE
112
+ * core `opacityAt`, verbatim. Enter: the parent holds until p ≈ 0.3 and is
113
+ * gone by 0.75 (most of it has physically left the viewport by then). Exit:
114
+ * the inner frame holds to 0.85 and fades as it lands on the card face. A
115
+ * FROZEN (depth-capped) flight is a crossfade: out 0.05→0.45, in 0.3→0.7.
116
+ */
117
+ export declare function flightOpacity(kind: NavKind, p: number, frozen: boolean): {
118
+ readonly outgoing: number;
119
+ readonly incoming: number;
120
+ };
121
+ /**
122
+ * One in-flight transition — what ICE keeps in its `NavTransition` resource,
123
+ * minus the ECS. The host owns the clock: `stepFlight` each frame until
124
+ * `active` clears, `flightAt` for a pinned still.
125
+ */
126
+ export interface Flight {
127
+ readonly kind: NavKind;
128
+ /** A: departed-frame coords → destination-frame coords. */
129
+ readonly affine: PortalAffine;
130
+ /** The departed frame's camera at the cut — what it renders under at p = 0, and throughout a frozen flight. */
131
+ readonly camPre: CameraState;
132
+ readonly c0: CameraState;
133
+ readonly c1: CameraState;
134
+ /** Depth-capped: present as a crossfade (`flightOpacity`). */
135
+ readonly frozen: boolean;
136
+ /** Response multiplier from octave distance, locked at start (§4). */
137
+ readonly durMul: number;
138
+ p: number;
139
+ v: number;
140
+ active: boolean;
141
+ }
142
+ /**
143
+ * Arm a flight from the already-cut world: `camPre` the departed frame's
144
+ * camera at the cut (the continuity solve gives c0 in destination coords),
145
+ * `c1` the clamped arrival. Applies the depth cap and the octave response.
146
+ * The host snaps its camera to `flight.c0`.
147
+ */
148
+ export declare function startFlight(kind: NavKind, A: PortalAffine, camPre: CameraState, c1: CameraState, vp: Viewport, tune?: FlightTuning, exact?: CameraState): Flight;
149
+ /**
150
+ * The camera the DEPARTED frame renders under this frame. Riding the flight
151
+ * through the affine (`outgoingCamera`) — except at the cut itself, where it
152
+ * is the pre-cut camera bit for bit (the affine and its inverse round-trip to
153
+ * within an ulp, and at zoom 1 an ulp is the other side of a decade), and
154
+ * throughout a FROZEN flight, where the departed frame stays at its pre-cut
155
+ * appearance and fades (design-006 §5: the cap broke the geometry, so the
156
+ * story is a dissolve, not a portal).
157
+ */
158
+ export declare function departedCamera(f: Flight, cam: CameraState): CameraState;
159
+ /** Advance the spring by `dtSec`; returns the camera for this frame. Lands EXACTLY on c1 and clears `active` at settle. */
160
+ export declare function stepFlight(f: Flight, dtSec: number, vp: Viewport, tune?: FlightTuning): CameraState;
161
+ /** The camera at progress `p` — a pinned still (the oracle's scenes, the harness's shots). The endpoints are c0 and c1 themselves, bit for bit. */
162
+ export declare function flightAt(f: Flight, p: number, vp: Viewport): CameraState;
163
+ /** The bounds of some rects, or null when there are none. */
164
+ export declare function boundsOf(rects: readonly Rect[]): Rect | null;
165
+ /**
166
+ * The DEFAULT framing for a frame (design-006 as amended): zoom-to-fit its
167
+ * content capped into the natural band; an empty frame arrives centred on
168
+ * its origin at zoom 1.
169
+ */
170
+ export declare function arrivalCamera(content: Rect | null, vp: Viewport, fit?: FitBand): CameraState;
171
+ /** A flight that is already over — what a degenerate portal (no area) gets: the host snaps to the arrival, as ICE's rect-less link "degrades the whole jump to a snap — never half-fly". */
172
+ export declare function cutFlight(kind: NavKind, camPre: CameraState, c1: CameraState): Flight;
173
+ /**
174
+ * ENTER a container whose body rect is `K` (parent coords) holding `content`
175
+ * (child coords): the arrival is the child's default framing, the portal maps
176
+ * that arrival onto K, and the flight starts where the parent was. The host
177
+ * switches frames, snaps its camera to `flight.c0`, then steps.
178
+ */
179
+ export declare function enterFlight(K: Rect, content: Rect | null, camPre: CameraState, vp: Viewport, tune?: FlightTuning, fit?: FitBand, exact?: CameraState): Flight;
180
+ /**
181
+ * EXIT to the parent: the portal is rebuilt from the container's CURRENT rect
182
+ * `K` and the inner frame's default framing (so arrival and preview agree),
183
+ * and the landing is the camera saved at entry. `camPre` is the inner camera
184
+ * at the cut.
185
+ */
186
+ export declare function exitFlight(K: Rect, inner: Rect | null, camPre: CameraState, saved: CameraState, vp: Viewport, tune?: FlightTuning, fit?: FitBand): Flight;
@@ -0,0 +1,95 @@
1
+ import type { Box } from "../lattice/lod";
2
+ import type { CameraState, Rect, Viewport } from "./flight";
3
+ /**
4
+ * A rounded rect in screen CSS px: centre, half extents, corner radius — and a top FEATHER (design-018 §4): what the face shows
5
+ * fades in over this many CSS px below its top edge, a smoothstep in every pass's `portal_cover` (absent or 0: a hard edge). The
6
+ * pegboard tray's face carries one — its top the foot of the drawer's clear header (design-018 R4) — so its specimens dissolve into the
7
+ * board under the header instead of being cut.
8
+ */
9
+ export interface PortalClip {
10
+ readonly cx: number;
11
+ readonly cy: number;
12
+ readonly hx: number;
13
+ readonly hy: number;
14
+ readonly r: number;
15
+ readonly feather?: number;
16
+ }
17
+ /**
18
+ * The most faces a slot can be seen through, its own included — the length
19
+ * of every uniform block's `portals`/`clips` arrays; portal.wgsl's
20
+ * `PORTAL_CHAIN` is the same number (a mismatch fails to compile). Six holds
21
+ * a host's depth belt of four plus the flight's face.
22
+ */
23
+ export declare const PORTAL_CHAIN = 6;
24
+ /** The struct field type of a chain record (gpu/struct.ts). */
25
+ export declare const PORTAL_CHAIN_TYPE: "array<vec4f, 6>";
26
+ export interface Presentation {
27
+ /** Multiplies the slot's every alpha; 1 at rest. */
28
+ readonly opacity: number;
29
+ /**
30
+ * Multiplies its OBJECTS' alphas on top — not its mat (MINIMAT.md §5): a mini mat's live inside
31
+ * comes in over the face's own drawing with its mat whole at once (the same lattice, lit by the
32
+ * same lamp — nothing to see) and its objects fading in by the gate's answer, as the face's chips
33
+ * fade out over them. Absent = 1.
34
+ */
35
+ readonly objects?: number;
36
+ /** The face this slot is seen through; absent = visible everywhere (the root). */
37
+ readonly portal?: PortalClip;
38
+ /**
39
+ * The faces the slot's PARENT is seen through, nearest first: a nested slot is
40
+ * visible only inside all of them. The ground fills this in from the tree
41
+ * (PORTAL.md §10); a host never needs to.
42
+ */
43
+ readonly within?: readonly PortalClip[];
44
+ }
45
+ /** The chain a presentation clips to: its own face first, then every face above it. Empty = everywhere. */
46
+ export declare function chainOf(p: Presentation | undefined): PortalClip[];
47
+ /** The `portals` and `clips` records every uniform block carries: the chain in order, a zero `clips[i].y` ending it; `clips[i].z` the feather. */
48
+ export declare function portalValues(p: Presentation | undefined): {
49
+ portals: number[];
50
+ clips: number[];
51
+ };
52
+ /** A world rect (with a corner radius) as the portal it makes on screen under `cam`. */
53
+ export declare function clipOf(K: Rect, radius: number, cam: CameraState): PortalClip;
54
+ /**
55
+ * The slot's BOX for a portal (CSS px, inside the attachment; lod.ts `Box`):
56
+ * the portal's bounding box plus a CSS px for the AA ramp. What a nested
57
+ * slot instances, bakes and culls — its cost (PORTAL.md §2.3). The ground
58
+ * intersects it with the parent's box (§10).
59
+ */
60
+ export declare function boxOfPortal(c: PortalClip, attach: {
61
+ readonly width: number;
62
+ readonly height: number;
63
+ }): Box;
64
+ /** The intersection of two boxes; empty (zero size) when they miss. */
65
+ export declare function intersectBox(a: Box, b: Box): Box;
66
+ /**
67
+ * The GATE (PORTAL.md §2.5, MINIMAT.md §5): a container's face shows its LIVE
68
+ * inside only when its short side on screen is at least `lo` CSS px, fading in
69
+ * fully by `hi` — the rung law applied to portals. Below it no slot exists and
70
+ * the mini mat draws its face itself (its far LOD); zoomed out, a desk of mini
71
+ * mats costs one instanced draw. The engine holds the numbers (theme.ts
72
+ * `PORTAL.gate`); the mini mat, the one container, takes them by name.
73
+ */
74
+ export declare const PORTAL_GATE: readonly [number, number];
75
+ /** The pool's cap: at most this many faces carry a slot per frame, largest first (PORTAL.md Q-f). */
76
+ export declare const PORTAL_CAP = 16;
77
+ /** The slot's presence for a face on screen — its opacity; 0 = no slot. */
78
+ export declare const portalPresence: (c: PortalClip, gate?: readonly [number, number]) => number;
79
+ /**
80
+ * ZOOM-THROUGH (PORTAL.md §8, §9): does a face COVER the viewport — every corner of the
81
+ * viewport inside the face's rounded rect by at least `margin` CSS px (negative = may
82
+ * poke out by that much)? Entering when it does is a cut nobody can see: the whole view
83
+ * is already the inside; leaving when it no longer does shows the parent only where the
84
+ * face has left the view. The two margins make the dead band.
85
+ */
86
+ export declare function faceCovers(c: PortalClip, vp: Viewport, margin: number): boolean;
87
+ /** The dead band: enter once the face covers the view by this much … */
88
+ export declare const THROUGH_IN = 2;
89
+ /** … leave once it fails to cover by this much. */
90
+ export declare const THROUGH_OUT = 6;
91
+ /** The scissor a presentation draws inside (device px): the chain's bounding boxes intersected, a device px of slack for the AA ramp; the attachment when there is no chain. */
92
+ export declare function scissorOf(p: Presentation | undefined, dpr: number, size: {
93
+ readonly w: number;
94
+ readonly h: number;
95
+ }): readonly [number, number, number, number];
@@ -0,0 +1,46 @@
1
+ import { type WidgetContainerDef, type WidgetDef, type WidgetType } from "../../core/src/index";
2
+ import { type KindDriver, type KindDriverHost, type ObjectHost, type ObjectKind } from "./kinds/world";
3
+ /** An object that PROVIDES this lies on the desk: the desk canvas places what provides it (K5b's D-K5b.2, folded into the SDK). */
4
+ export declare const DESK_OBJECT = "desk.object";
5
+ /**
6
+ * An object that PROVIDES this may be held in a container's desk — the mini mat accepts it (K8a: D-K4a.3's type names retired). It
7
+ * declares its CHIP (`ObjectKind.chip` — its far impostor in the container's face), or it vanishes there when the face is far.
8
+ */
9
+ export declare const CONTAINABLE = "desk.containable";
10
+ /** An object that PROVIDES this may be pinned to another's part — a note stuck to a desk calendar's day (`KindDriverHost.provides`). */
11
+ export declare const PINNABLE = "desk.pinnable";
12
+ /** A kind's drivers on one desk, made by the host from what it lends (D7 #5, D-D7-A.3). Undefined: the kind has none. */
13
+ export type DriverFactory = (host: KindDriverHost) => KindDriver | undefined;
14
+ /** What an object declares: a widget definition without a view, plus its KIND. */
15
+ export interface ObjectDef extends Omit<WidgetDef, "object" | "stratum" | "openable" | "defaultSize" | "container" | "heldTools" | "heldTool"> {
16
+ /** The kind: its program (the ground registers it) and its world half (the builder and the pick source drive it). */
17
+ readonly kind: ObjectKind;
18
+ /** The size a new one spawns at, world units (`defaultSize`). */
19
+ readonly size?: {
20
+ readonly w: number;
21
+ readonly h: number;
22
+ };
23
+ /** A container object — the mini mat: what it accepts and the FACE its inside shows through (`portal` insets). */
24
+ readonly container?: WidgetContainerDef;
25
+ /**
26
+ * The kind's DRIVERS (D7 #5): the hand onto its state — a pen, a carry, a leaf, a writing session — made once per desk by
27
+ * the host from what it lends (`KindDriverHost`) and ticked before the kinds' clocks. The object hands its own components to
28
+ * its driver here, so no driver need import its object back. Absent: the kind is looked at and moved, never worked in.
29
+ */
30
+ readonly drivers?: DriverFactory;
31
+ /**
32
+ * The object's DOM HALF (K4b, `ObjectHost`): what its kind needs of the browser — services lent by key (K8a: the calendar's print
33
+ * raster), its TEXT PARTS that lease the desk's one editor (the note's body, the calendar's day line), a screen-space half (the
34
+ * calendar's days and pen) — declared here as its drivers are, so the host builds it without naming the kind. Absent: the object
35
+ * needs nothing of the browser.
36
+ */
37
+ readonly host?: ObjectHost;
38
+ }
39
+ /** Compile an object through `defineWidget` — one door, one registry. */
40
+ export declare function defineObject(def: ObjectDef): WidgetType;
41
+ /** The kind behind a widget type, or undefined: not an object, or a binding that is not a desk kind. */
42
+ export declare function objectKindOf(widget: WidgetType | undefined): ObjectKind | undefined;
43
+ /** The drivers an object declared (`ObjectDef.drivers`), or undefined: none, or not an object of this desk. */
44
+ export declare function driversOf(widget: WidgetType | undefined): DriverFactory | undefined;
45
+ /** The DOM half an object declared (`ObjectDef.host`), or undefined: none, or not an object of this desk. */
46
+ export declare function hostOf(widget: WidgetType | undefined): ObjectHost | undefined;
@@ -0,0 +1,89 @@
1
+ /** Dawn's timestamp quantum when quantisation is on: 100 µs, in the nanoseconds a timestamp query reads. */
2
+ export declare const TIMESTAMP_QUANTUM_NS = 100000n;
3
+ /** The Chrome switch that turns the quantisation off (the rigs pass it — scripts/cdp.mjs). */
4
+ export declare const UNQUANTISED_TIMESTAMPS_FLAG = "--disable-dawn-features=timestamp_quantization";
5
+ export interface PassCounts {
6
+ /** Command encoders made. */
7
+ readonly encoders: number;
8
+ /** Render and compute passes begun, and how many of them were timed. */
9
+ readonly passes: number;
10
+ readonly timed: number;
11
+ /** `draw` + `drawIndexed` + `drawIndirect` + `drawIndexedIndirect`. */
12
+ readonly draws: number;
13
+ /** The instances the direct draws asked for (an indirect draw's count is the GPU's: counted in `indirect`, not here). */
14
+ readonly instances: number;
15
+ readonly indirect: number;
16
+ readonly dispatches: number;
17
+ /** `setPipeline` / `setBindGroup` calls — every call is a command, a rebind of the same object included. */
18
+ readonly pipelines: number;
19
+ readonly bindGroups: number;
20
+ /** `executeBundles` calls (their draws are the bundles', unseen here). */
21
+ readonly bundles: number;
22
+ }
23
+ export interface KindDraws {
24
+ readonly draws: number;
25
+ readonly instances: number;
26
+ }
27
+ /** A timed pass: its label, and its begin and end in ms from the frame's earliest timestamp. */
28
+ export interface PassTime {
29
+ readonly label: string;
30
+ readonly begin: number;
31
+ readonly end: number;
32
+ }
33
+ export type PassTiming = "timed" | "unsupported" | "dropped" | "untimed" | "lost";
34
+ export interface PassFrame {
35
+ readonly serial: number;
36
+ /** "frame": closed by the submit of a frame's own encoder — a frame drawn; "loose": GPU work a boundary closed with no frame in it. */
37
+ readonly kind: "frame" | "loose";
38
+ /** `performance.now()` at the frame's first command encoder, at its first submit, and at its close. */
39
+ readonly t0: number;
40
+ readonly firstSubmit: number;
41
+ readonly t1: number;
42
+ readonly counts: PassCounts;
43
+ /** Draws and instances by the pipeline's label prefix — the kind that drew (`paper`, `photo`, `mat` …; `?` before any pipeline). */
44
+ readonly byKind: Readonly<Record<string, KindDraws>>;
45
+ /** The timed passes in the order begun. Empty unless `timing` is "timed". */
46
+ readonly passes: readonly PassTime[];
47
+ /**
48
+ * "timed" — read back; "unsupported" — the device has no timestamp-query; "dropped" — every readback slot was still in flight
49
+ * (never a stall); "untimed" — no labelled pass; "lost" — the readback failed (a lost device).
50
+ */
51
+ readonly timing: PassTiming;
52
+ /** Every delta between the frame's timestamps is a whole multiple of 100 µs (Dawn's quantisation); null with fewer than two. */
53
+ readonly quantised: boolean | null;
54
+ }
55
+ export interface PassInstrumentOptions {
56
+ /** The labels of the encoders whose submit CLOSES a frame — the frame's last command buffer. Default: the ground's, `ground` and `hold`. */
57
+ readonly frameEncoders?: readonly string[];
58
+ /** Timed passes a frame may hold (64); the rest are counted, not timed. */
59
+ readonly capacity?: number;
60
+ /** Readback slots (3). */
61
+ readonly ring?: number;
62
+ /** At a frame's close, synchronously — before its timing is read (a reader of other counters diffs them here). */
63
+ readonly onClose?: (serial: number, kind: "frame" | "loose") => void;
64
+ /** A frame complete: its counts, and its timing once read back — always a later task than its close. */
65
+ readonly onFrame?: (frame: PassFrame) => void;
66
+ }
67
+ export interface PassInstrument {
68
+ /** The device has timestamp-query: labelled passes are timed. */
69
+ readonly supported: boolean;
70
+ /** Close the open frame now (the host's boundary — the layer's flush): whatever was encoded since the last close is a "loose" frame. */
71
+ cut(): void;
72
+ /** Frames closed, readbacks in flight, samples dropped for a full ring. */
73
+ stats(): {
74
+ readonly frames: number;
75
+ readonly inFlight: number;
76
+ readonly dropped: number;
77
+ };
78
+ /** Put `createCommandEncoder` back and leave the submit tap; the query set and buffers go a task later (no encoder of this task then holds them). Idempotent. */
79
+ detach(): void;
80
+ }
81
+ /** A frame's timestamps → its passes and whether they are quantised. Passes with an unwritten (zero) stamp are left out. */
82
+ export declare function readTimestamps(stamps: BigUint64Array, timed: readonly {
83
+ readonly label: string;
84
+ readonly q: number;
85
+ }[]): {
86
+ passes: PassTime[];
87
+ quantised: boolean | null;
88
+ };
89
+ export declare function instrumentPasses(device: GPUDevice, opts?: PassInstrumentOptions): PassInstrument;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * A host's shader text: a shader-file map (`MAT_SHADER_FILES`, …) → the text of every file it names, by the map's
3
+ * keys — `shaderText` below (the generated module) in a browser, the .wgsl files read from disk in the Node oracle.
4
+ * A kind's program is made for one (kinds/: `paperProgram(text)`, `deskKinds(text)`).
5
+ */
6
+ export type ShaderText = <T extends Record<string, string>>(files: T) => {
7
+ readonly [K in keyof T]: string;
8
+ };
9
+ /** The text of every file a shader-file map names, by the map's keys. */
10
+ export declare function shaderText<T extends Record<string, string>>(files: T): {
11
+ readonly [K in keyof T]: string;
12
+ };