@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,103 @@
1
+ import type { Entity } from "../../../core/src/index";
2
+ /**
3
+ * Where the textarea stands while lent (container px): its box's top-left and size BEFORE any turn, the size its text is laid
4
+ * at, and — for a turned part (a note stuck at its tilt) — the turn about the box's centre, the padding, the line height and
5
+ * whether lines wrap. Absent: unturned, no padding, one line the box's height, no wrap (a day's line).
6
+ */
7
+ export interface EditorPlace {
8
+ readonly x: number;
9
+ readonly y: number;
10
+ readonly w: number;
11
+ readonly h: number;
12
+ readonly fontPx: number;
13
+ /** The turn about the box's centre, radians — the editor is placed translate · rotate · translate (never a scale, never a matrix). */
14
+ readonly angle?: number;
15
+ /** The text's inset from the box's edges, px. */
16
+ readonly pad?: number;
17
+ /** The line height, px (default: the box's height — one line). */
18
+ readonly lineHeight?: number;
19
+ /** Lines wrap (a note's body) or run on (a day's line — default). */
20
+ readonly wrap?: boolean;
21
+ /** The face the platform lays the text in (the caret's arrows by line): the editor's own (the desk's hand) unless the part says. */
22
+ readonly font?: {
23
+ readonly family: string;
24
+ readonly weight: number;
25
+ };
26
+ }
27
+ /**
28
+ * A LEASE on the ONE editor (D3t-c; K8a — any kind's): while lent, the textarea's value, keys, caret and blur are the lease's, and
29
+ * it says where the textarea stands; another lease, a blur, `release`, or `live()` answering false ends it (`ended`).
30
+ */
31
+ export interface EditorLease {
32
+ /** The TEXT PART this lease writes — its kind's declared `TextPart.part` ("note.body", "calendar.line"): what `lease()` names. */
33
+ readonly part?: string;
34
+ /** The textarea's accessible name while lent ("write on the note"). */
35
+ readonly label?: string;
36
+ /**
37
+ * The value the textarea holds — asked when the lease begins and each frame after, so a write the world made between sessions
38
+ * (a peer's, an undo) reaches the platform's field; `null`: keep the field's own (a session is open — the field is the truth).
39
+ */
40
+ value(): string | null;
41
+ /** The platform's value after an input event. */
42
+ input(value: string): void;
43
+ /** A key the lease takes: true — handled (the editor prevents its default, so the keymap stands down). */
44
+ keydown(ev: KeyboardEvent): boolean;
45
+ /** The caret moved (a selection change, a tap, a value the world moved): its index. */
46
+ caret(index: number): void;
47
+ /** Where the textarea stands — null keeps it where it was. */
48
+ place(): EditorPlace | null;
49
+ /** 1 s without input (never mid-IME): a session's end; the focus stays. */
50
+ idle(): void;
51
+ /** The lease is over (a blur, another lease, `release`, `live()` false). */
52
+ ended(): void;
53
+ /** Asked each frame while lent, before the value: false lets the lease go (its object was deleted, or left the frame by a nav cut). */
54
+ live?(): boolean;
55
+ }
56
+ /** THE ONE EDITOR (the desk's service since K8a — `DeskLayerHandle.editor()`, `ObjectDomHost.editor`): lent, never owned by a kind. */
57
+ export interface DeskEditor {
58
+ readonly element: HTMLTextAreaElement;
59
+ /** Lend the editor (D3t-c): a lease holding it ends first; the textarea takes focus, its value the lease's, the caret at `caret` (the end by default). */
60
+ lend(lease: EditorLease, caret?: number): void;
61
+ /** End the lease (only `lease`'s, when named). */
62
+ release(lease?: EditorLease): void;
63
+ /** The lease holding the editor, if any. */
64
+ lease(): EditorLease | undefined;
65
+ /** End whatever lease holds it (the editor hidden, the focus given back). */
66
+ blur(): void;
67
+ /** After each draw: the lease's `live` and value asked, the textarea placed where the lease says. */
68
+ follow(): void;
69
+ /** Where the editor's box stands on screen (container px): its centre, size and turn — null while hidden. */
70
+ placement(): {
71
+ readonly cx: number;
72
+ readonly cy: number;
73
+ readonly w: number;
74
+ readonly h: number;
75
+ readonly angle: number;
76
+ } | null;
77
+ dispose(): void;
78
+ }
79
+ /**
80
+ * A TAP the desk read on its container (DOM-at-event-time, design-007 §2 — a press and release within the drag slop, the primary
81
+ * button, no modifier): its world point and the object the pointer EXACTLY hit — the interaction stack's own answer. `found`
82
+ * false: the pointer is gone (a touch lifted before the click) and a part may look for itself; `hit` undefined with `found`: the
83
+ * pointer hit nothing, or an object is in hand (a tap in hand is the hand's).
84
+ */
85
+ export interface TextTap {
86
+ readonly wx: number;
87
+ readonly wy: number;
88
+ readonly found: boolean;
89
+ readonly hit: Entity | undefined;
90
+ }
91
+ /**
92
+ * A kind's TEXT PART (K8a — declared with its object, `defineObject({ host: { text } })`): a part of its objects that takes the
93
+ * ONE editor. `part` names it ("note.body"); a part with `tap` is routed every TAP by the desk — it answers the lease the tap
94
+ * takes (the editor is lent to it, the caret where the tap put it) or undefined (not its object; refused). A part without `tap`
95
+ * is leased by its kind's own DOM half at event time (the desk calendar's day line: a day selected).
96
+ */
97
+ export interface TextPart {
98
+ readonly part: string;
99
+ tap?(t: TextTap): {
100
+ readonly lease: EditorLease;
101
+ readonly caret?: number;
102
+ } | undefined;
103
+ }
@@ -0,0 +1,37 @@
1
+ import type { CameraState, Viewport } from "./nav";
2
+ export interface DeskEye {
3
+ /** The eye's foot on the desk: the view's centre, world units. */
4
+ readonly ex: number;
5
+ readonly ey: number;
6
+ /** How far up it stands, world units. */
7
+ readonly h: number;
8
+ readonly zoom: number;
9
+ /** The viewport, CSS px. */
10
+ readonly vw: number;
11
+ readonly vh: number;
12
+ }
13
+ /** The eye for a camera: over the view's centre, `k` view-diagonals up, never nearer than `min`. */
14
+ export declare function eyeOf(cam: CameraState, vp: Viewport, law: {
15
+ readonly k: number;
16
+ readonly min: number;
17
+ }): DeskEye;
18
+ /** A world point (z up) → CSS px on the screen. */
19
+ export declare function project(e: DeskEye, x: number, y: number, z: number): readonly [number, number];
20
+ /** CSS px → the desk point under it (z = 0): the ortho camera's own inverse. */
21
+ export declare function deskAt(e: DeskEye, sx: number, sy: number): readonly [number, number];
22
+ /** The world point at height z that lands on the desk point (dx, dy) — along the eye's ray. */
23
+ export declare function unproject(e: DeskEye, dx: number, dy: number, z: number): readonly [number, number];
24
+ /** The eye's ray through a desk point: origin (the eye) and direction (toward the desk point, unnormalised). */
25
+ export declare function rayThrough(e: DeskEye, dx: number, dy: number): {
26
+ readonly o: readonly [number, number, number];
27
+ readonly d: readonly [number, number, number];
28
+ };
29
+ /**
30
+ * The clip-space numbers the shader's `nb_clip` reads: x, y are 2·zoom·(p − E)/viewport (y up),
31
+ * w = (H − z)/H, and z is a perspective depth over distances from the eye in [near, far] —
32
+ * `near` above the tallest thing a book can reach, `far` just under the desk.
33
+ */
34
+ export declare function eyeValues(e: DeskEye, reach?: number): {
35
+ eye: [number, number, number, number];
36
+ view: [number, number, number, number];
37
+ };
@@ -0,0 +1 @@
1
+ export { carryOf, HOLD, readingTarget } from "../hold/pose";
@@ -0,0 +1,26 @@
1
+ export * from "./arrays";
2
+ export * from "./blobs";
3
+ export * from "./book";
4
+ export * from "./editor";
5
+ export * from "./eye";
6
+ export * from "./hold";
7
+ export * from "./inside";
8
+ export * from "./layer";
9
+ export * from "./light";
10
+ export * from "./mesh";
11
+ export * from "./mips";
12
+ export * from "./nav";
13
+ export * from "./paper-tex";
14
+ export * from "./physics";
15
+ export * from "./place";
16
+ export * from "./print";
17
+ export * from "./raster";
18
+ export * from "./sdf";
19
+ export * from "./seeds";
20
+ export * from "./services";
21
+ export * from "./springs";
22
+ export * from "./strokes";
23
+ export * from "./text";
24
+ export * from "./uniform";
25
+ export * from "./view";
26
+ export * from "./wgsl";
@@ -0,0 +1,116 @@
1
+ import type { Box } from "../lattice/lod";
2
+ import type { SlotLight } from "../mat/layout";
3
+ import { type CameraState, type FitBand, type Flight, type PortalAffine, type Rect, type Viewport } from "../nav/flight";
4
+ import { type PortalClip, type Presentation } from "../nav/portal";
5
+ import type { RGB } from "../theme";
6
+ /** A container's inside under the host camera (MINIMAT.md §3–§5): what `insideView` answers — ALWAYS, past the gate or not. */
7
+ export interface InsideView {
8
+ /** The embedding: inside → host (`host = o + inside · s`) — the flight's own. */
9
+ readonly M: PortalAffine;
10
+ /** The inside's arrival camera — what its lattice is DRESSED for (PORTAL.md §9). */
11
+ readonly arrival: CameraState;
12
+ /** The camera the inside renders under at the host's camera: the enter flight's c0 at the cut. */
13
+ readonly cam: CameraState;
14
+ /** The face on screen: the live inside's clip. */
15
+ readonly clip: PortalClip;
16
+ /** The gate's answer (0..1): the live inside's presence — 0 = the face is the far LOD alone. */
17
+ readonly presence: number;
18
+ /** The live inside's box on the attachment. */
19
+ readonly box: Box;
20
+ }
21
+ /**
22
+ * The FINISH a container's face draws a child's chip in (K8a — open: until K8a a chip was a `ChipKind`, `"paper" | "mat"`, the two
23
+ * built-ins' own names, so no plugin kind could have one): a name among the container's `FaceLaw.finishes` — the mini mat draws
24
+ * `"paper"` (a sheet in the chip's colour, its writing greeked) and `"vinyl"` (grained, its frame line at `margin`) — and a plugin
25
+ * container draws its own. A chip names one, or several in preference order; the first the container draws wins, and a chip the
26
+ * container draws none of is not drawn (the builder counts it: `BuildWork.unchipped`) — never a finish it did not ask for.
27
+ */
28
+ export type ChipFinish = string;
29
+ /** The two finishes the kit names — a chip's shared vocabulary (a note's `paper`, a mini mat's `vinyl`); a container may draw more. */
30
+ export declare const PAPER_FINISH: ChipFinish;
31
+ export declare const VINYL_FINISH: ChipFinish;
32
+ /** One child as the face's far LOD draws it, in the CHILD's frame (the inside's world). */
33
+ export interface ChildShape {
34
+ /** Its finish (`ChipFinish`) — or finishes, in preference order; the builder hands the container the one it draws. */
35
+ readonly finish: ChipFinish | readonly ChipFinish[];
36
+ readonly cx: number;
37
+ readonly cy: number;
38
+ /** Half extents, the tilt (radians), the corner radius — the child's own. */
39
+ readonly hx: number;
40
+ readonly hy: number;
41
+ readonly angle: number;
42
+ readonly radius: number;
43
+ /** Its colour: the paper's, or the vinyl's. */
44
+ readonly colour: RGB;
45
+ /** How far it stands off the face, child units — what its contact shadow is cast from. */
46
+ readonly height: number;
47
+ /** A note's writing, GREEKED: the pen's colour, the text's left edge and em (note units from the sheet's top-left), and each line's baseline and width. */
48
+ readonly writing?: {
49
+ readonly ink: RGB;
50
+ readonly x0: number;
51
+ readonly em: number;
52
+ readonly lines: readonly {
53
+ readonly y: number;
54
+ readonly width: number;
55
+ }[];
56
+ } | undefined;
57
+ /** A mini mat's printed border, child units. */
58
+ readonly margin?: number | undefined;
59
+ }
60
+ /**
61
+ * A CONTAINER kind's FACE LAW (K8a — the container's own, declared on its kind as `ObjectKind.faceLaw`; until K8a `FACE_RADIUS` and
62
+ * `FACE_CHIPS_MAX` were the kit's, the mini mat's numbers imposed on every container): the corner its face clips its inside by (the
63
+ * live inside, the far LOD, a flight through it — `clipOf(face, radius, cam)`), the most chips its face draws, and the chip finishes
64
+ * it draws them in. Absent on a kind with a `face`: square, and no chips.
65
+ */
66
+ export interface FaceLaw {
67
+ readonly radius: number;
68
+ readonly chips: number;
69
+ readonly finishes: readonly ChipFinish[];
70
+ }
71
+ /** The finish a container draws a chip in: the chip's first that the container draws, or undefined — none (the chip is not drawn). */
72
+ export declare function finishOf(finish: ChipFinish | readonly ChipFinish[], drawn: readonly ChipFinish[]): ChipFinish | undefined;
73
+ /**
74
+ * The same view from a FACE rect and its corner alone (D2b; the corner the container's own since K8a — `FaceLaw.radius`): what a
75
+ * kind's `face(geometry)` hands the builder, so any container kind's inside is built by the one law — the mini mat's `faceClip` is
76
+ * `clipOf(faceOf(G), its radius, cam)`, so the numbers are its `insideView`'s to the bit.
77
+ */
78
+ export declare function insideViewOfFace(K: Rect, radius: number, content: Rect | null, cam: CameraState, vp: Viewport, fit?: FitBand, gate?: readonly [number, number]): InsideView | null;
79
+ /** The live inside's presentation at rest: through its face, its mat whole, its objects at the gate's answer (MINIMAT.md §5). */
80
+ export declare const insidePresent: (view: InsideView) => Presentation;
81
+ /**
82
+ * The presentations of a flight through a mini mat's face: `flightOpacity` as ever, and — on an
83
+ * ENTER — the arriving desk's objects at the gate's answer for the face as it is this frame, so
84
+ * a mini mat entered from its far LOD grows through the gate on the way in and its chips give way
85
+ * to its objects as it does (the arriving desk's mat is whole from the cut: the same lattice as
86
+ * the face's, by the same lamp). An exit keeps its objects whole and lands on whatever the face
87
+ * shows at the landing (the old landing fade). A frozen flight is a dissolve.
88
+ */
89
+ /** What the flight helpers read of a flight: its kind, its progress, whether it is frozen — the prototype's `Flight` or core's `NavTransition` alike. */
90
+ export type FlightState = Pick<Flight, "kind" | "p" | "frozen">;
91
+ export declare function flightPresent(f: FlightState, clip: PortalClip | undefined, gate?: readonly [number, number]): {
92
+ readonly incoming: Presentation;
93
+ readonly outgoing: Presentation;
94
+ };
95
+ /**
96
+ * When a flight hands the lamp over, as progress windows. ENTER hands it over once the departed
97
+ * desk starts to go (flightOpacity: it holds to 0.3) — until then the frame IS the rest frame
98
+ * under the departed camera; an EXIT hands it back in its first half — from then on the frame IS
99
+ * the rest frame under the flying camera, the inside lit as a mini mat's inside is.
100
+ */
101
+ export declare const HANDOVER: {
102
+ readonly enter: readonly [0.3, 1];
103
+ readonly exit: readonly [0, 0.5];
104
+ };
105
+ /**
106
+ * The LAMPS a flight hands between the two desks (MINIMAT.md §4). At rest a mini mat's inside is
107
+ * lit by the desk the mini mat lies on; a desk the camera is on, by its own lamp. ENTER: the
108
+ * arriving desk starts under the departed desk's lamp (`outCam` — at the cut, the portal's own
109
+ * light, bit for bit) and ends under its own. EXIT: the departed desk starts under its own and
110
+ * ends under the arriving desk's — the lamp its mini mat's inside is lit by at rest. A frozen
111
+ * flight is two whole desks under their own lamps.
112
+ */
113
+ export declare function flightLights(f: FlightState, cam: CameraState, outCam: CameraState): {
114
+ readonly incoming?: SlotLight;
115
+ readonly outgoing?: SlotLight;
116
+ };
@@ -0,0 +1,159 @@
1
+ import type { KindPass, RenderTarget, SlotContext } from "../kind";
2
+ import type { View } from "../lattice/lod";
3
+ import type { MatPass } from "./view";
4
+ import type { ComposeOptions } from "../engine/shader";
5
+ import type { ShaderText } from "../shaders";
6
+ /** The composite's entry: a resolved, premultiplied layer laid over what the ground drew (the layered kinds share it). */
7
+ export declare const LAYER_COMPOSITE_FILE = "kit/composite.wgsl";
8
+ /**
9
+ * The program that lays a layer — its entry, from the host's shader text, after the kit's view block and portal chain: the layer is
10
+ * laid through the slot's chain (design-018 §4), so a layered object keeps the kit's contract as one — the tray's feather included.
11
+ */
12
+ export declare function layerComposite(text: ShaderText): ComposeOptions;
13
+ /** The composite's bindings (every layered kind's): the resolved layer, its box's origin, and the slot's view block (its chain). */
14
+ export declare function layerCompositeLayout(device: GPUDevice, label: string): GPUBindGroupLayout;
15
+ /** A device-px rect: x, y, width, height. */
16
+ export type Rect4 = readonly [number, number, number, number];
17
+ /**
18
+ * The attachment a slot's view names, device px: what every host sizes its canvas to — `surface().fit`, the reflector's
19
+ * `attach.resize`, the oracle's target — `max(1, round(css · dpr))`. A layer is made at this size, so its texel is the pixel.
20
+ */
21
+ export declare const attachmentOf: (v: View & {
22
+ readonly dpr: number;
23
+ }) => {
24
+ readonly w: number;
25
+ readonly h: number;
26
+ };
27
+ /** Two device-px rects intersected; a width or height of 0 when they do not meet. */
28
+ export declare function clip(a: Rect4, b: Rect4): Rect4;
29
+ /** What a layered kind asks of its pass: the layer recorded into an encoder, laid by one draw, its screen box. */
30
+ export interface LayerPass {
31
+ layer(encoder: GPUCommandEncoder, size: {
32
+ readonly w: number;
33
+ readonly h: number;
34
+ }, dpr: number): boolean;
35
+ composite(pass: GPURenderPassEncoder, scissor?: Rect4 | null): void;
36
+ readonly screenBox: Rect4 | null;
37
+ /** The render target the next prepare is for (D7 — `SlotContext.target`): a pass keeps the held desk copy's state apart. */
38
+ use?(target: RenderTarget): void;
39
+ /** The hold is over: the copy's state given back. */
40
+ endHold?(): void;
41
+ /** The records its last prepare turned away at its cap (D7). */
42
+ readonly dropped?: number;
43
+ /** K6a (D-K6a.3): its frame layer's targets are made (at the first object drawn)… */
44
+ readonly layerMade?: boolean;
45
+ /** …was one of its objects drawn within `ms` (and when last: `performance.now()`'s ms — the release's due, K7a)… */
46
+ drawnWithin?(ms: number): boolean;
47
+ readonly lastDrawn?: number;
48
+ /** …and let them go (made again at the next object drawn). */
49
+ releaseLayer?(): void;
50
+ dispose(): void;
51
+ }
52
+ /**
53
+ * The part of a layered kind that is the same for both: ROOT ONLY — a spawned slot's pass holds nothing and draws nothing (its
54
+ * `pass` is null; D-D18: a notebook or a pad is never drawn in a mini mat's inside or a flight's departed desk) — the layer recorded
55
+ * after its pass prepared, and laid ONCE over the whole range the ground hands it (a kind registered with `composite: true`: the
56
+ * ground draws it as one run after the rest of its stratum).
57
+ */
58
+ export declare abstract class LayeredKind<R, P extends LayerPass> implements KindPass<R> {
59
+ /** The root slot's pass — the host's door to its own API (the ink, the tiles, the law); null in a spawned slot (root only). */
60
+ readonly pass: P | null;
61
+ /** The slot's scissor this frame, device px — the layer is laid inside it and it is given back after (null: nothing to lay). */
62
+ private within;
63
+ /** How many records `prepare` was handed: the whole range the layer lays. */
64
+ private handed;
65
+ constructor(pass: P | null);
66
+ abstract spawn(mat: MatPass): KindPass<R>;
67
+ /** The pass's own prepare for this slot (its records, eye and look); returns the count that will draw. */
68
+ protected abstract prepareOwn(pass: P, s: SlotContext, records: readonly R[]): number;
69
+ prepare(encoder: GPUCommandEncoder, s: SlotContext, records: readonly R[]): number;
70
+ /** The layer over the frame: once, for the whole range [0, count) — one draw lays every object; a part of it cannot be drawn from one layer. */
71
+ drawRange(pass: GPURenderPassEncoder, first: number, end: number): void;
72
+ endHold(): void;
73
+ /**
74
+ * Let this slot's layer go when none of its objects was drawn within `ms` (D-K6a.3 for a slot the host keeps beyond the root — the
75
+ * tray's specimen, K5a; the ROOT's layer goes by its kind's own tick). Made again at the next object drawn.
76
+ */
77
+ idle(ms: number): void;
78
+ /** When `idle(ms)` next lets the layer go — its last object drawn + `ms` (K7a: the host's registered TIME wake); ∞ with none. */
79
+ idleAt(ms: number): number;
80
+ dropped(): number;
81
+ dispose(): void;
82
+ }
83
+ /** A box's targets grow and shrink by this many device px a side, so a pan's jitter never makes them again (K7a). */
84
+ export declare const BOX_STEP = 256;
85
+ /**
86
+ * A layered kind's TARGETS AT ITS SCREEN BOX (K7a — design-016 §6): the 4× colour and depth and their resolve sized to the box
87
+ * its objects cover on the attachment (rounded up to BOX_STEP, at most the attachment), never the canvas — a notebook's layer at
88
+ * 2400 × 1600 was 136 MB for a book a tenth of the screen. The layer is drawn through a viewport shifted by the box's ORIGIN over
89
+ * the whole attachment, so the pixel grid is the attachment's (a fragment lands on the pixel it always did, the target's texel
90
+ * `pixel − origin`); the composite reads the texel at its pixel less the origin (its uniform, binding 1 beside the layer). What a
91
+ * fragment samples BY its position adds `origin` back (the passes carry it in their knobs). The rasteriser is not exactly
92
+ * translation-invariant in floating point: a handful of edge samples and 1-LSB interpolants move against a canvas-sized layer
93
+ * (D-K7a.4 — 13 golden scenes re-blessed).
94
+ */
95
+ export declare class BoxTargets {
96
+ private readonly device;
97
+ private readonly label;
98
+ private readonly layoutComp;
99
+ private readonly samples;
100
+ private readonly view;
101
+ msaa: GPUTexture | null;
102
+ depth: GPUTexture | null;
103
+ resolve: GPUTexture | null;
104
+ compGroup: GPUBindGroup | null;
105
+ /** The box's top-left on the attachment, device px (the layer's texel 0, 0). */
106
+ readonly origin: [number, number];
107
+ /** The targets' size as made, device px (0 × 0: none). */
108
+ readonly size: {
109
+ w: number;
110
+ h: number;
111
+ };
112
+ private originBuf;
113
+ private readonly sent;
114
+ private readonly next;
115
+ /** What the layer the targets hold was drawn from — its pass's signature at the draw (K7a); NaN: nothing drawn since made. */
116
+ private readonly drawnFrom;
117
+ /** …and the content it read, by value (the knobs, the records, the view block), with each copy's length. */
118
+ private readonly drawnBytes;
119
+ private readonly drawnLen;
120
+ /** `view`: the slot's view block (`MatPass.view`) — the composite lays the layer through its portal chain (`layerCompositeLayout`). */
121
+ constructor(device: GPUDevice, label: string, layoutComp: GPUBindGroupLayout, samples: number, view: GPUBuffer);
122
+ /** The targets are made (a layer holds device memory). */
123
+ get made(): boolean;
124
+ /**
125
+ * Fit the targets to `box` [x0, y0, x1, y1] (device px) on an `attach` of its size: made when none are or the box outgrew them,
126
+ * made smaller when they are more than four times its area — never larger than the attachment; the origin written for the
127
+ * composite when it moved.
128
+ */
129
+ fit(box: readonly [number, number, number, number], attach: {
130
+ readonly w: number;
131
+ readonly h: number;
132
+ }): void;
133
+ /**
134
+ * Begin the layer's pass into the fitted targets: cleared, the viewport the whole `attach` shifted by the origin, the scissor the
135
+ * box — `box` [x0, y0, x1, y1] as fitted.
136
+ */
137
+ begin(encoder: GPUCommandEncoder, label: string, attach: {
138
+ readonly w: number;
139
+ readonly h: number;
140
+ }, box: readonly [number, number, number, number]): GPURenderPassEncoder;
141
+ /**
142
+ * The layer the targets hold was drawn from exactly `sig` and `bytes` (K7a — every input of its draw the same since: the pass's
143
+ * numbers — its resources' generation, what it lists, the box — and the CONTENT the draw read, compared by value: this target's
144
+ * knobs and records as prepared, the slot's view block. By content, not by version: a held frame's desk copy writes the shared
145
+ * buffers between two of the hand's frames, and the hand's layer is still what they held): it may be laid again undrawn.
146
+ */
147
+ holds(sig: ArrayLike<number>, bytes: readonly Uint8Array[]): boolean;
148
+ /** The layer was drawn from `sig` and `bytes` (copied; the copies grow once and are reused). */
149
+ drew(sig: ArrayLike<number>, bytes: readonly Uint8Array[]): void;
150
+ /** The targets let go, the origin's uniform with them (the next `fit` makes them again). */
151
+ release(): void;
152
+ dispose(): void;
153
+ }
154
+ /**
155
+ * How long a layered kind's frame targets (its 4× layer, its resolve; the notebook's shadow maps) stand with none of its objects
156
+ * drawn before the kind lets them go (K6a, design-016 §6 — made again at the next one drawn): render targets at the canvas's size,
157
+ * never a cache the raster budget holds (D-K6a.3).
158
+ */
159
+ export declare const LAYER_IDLE_MS = 5000;
@@ -0,0 +1,3 @@
1
+ export { type Lamp, lampOf } from "../mat/lamp";
2
+ export { DAY_LIGHT, linear, type MatLight } from "../mat/night";
3
+ export type { ProjectorSpec, Quat, Vec3 } from "../mat/projector";
@@ -0,0 +1,29 @@
1
+ export declare const VERTEX_FLOATS = 16;
2
+ export declare const VERTEX_BYTES: number;
3
+ /** Flags: a face seen from both sides (a sheet in the air, the spine). */
4
+ export declare const FLAG_TWO_SIDED = 1;
5
+ /** A growable vertex + index writer. */
6
+ export declare class MeshWriter {
7
+ v: Float32Array;
8
+ ix: Uint32Array;
9
+ nv: number;
10
+ ni: number;
11
+ readonly min: [number, number, number];
12
+ readonly max: [number, number, number];
13
+ constructor(vcap?: number, icap?: number);
14
+ reset(): void;
15
+ vert(px: number, py: number, pz: number, nx: number, ny: number, nz: number, u: number, v: number, mat: number, page: number, flags: number, ao: number, sx: number, sy: number, e0?: number, e1?: number): number;
16
+ tri(a: number, b: number, c: number): void;
17
+ quad(a: number, b: number, c: number, d: number): void;
18
+ /** A grid's quads: `cols` × `rows` vertices laid out row-major from `first`. */
19
+ gridQuads(first: number, cols: number, rows: number): void;
20
+ }
21
+ /** A built mesh: views onto the writer's arrays (copy before the next build) and the local bounds. */
22
+ export interface BuiltMesh {
23
+ readonly vertices: Float32Array;
24
+ readonly indices: Uint32Array;
25
+ readonly vcount: number;
26
+ readonly icount: number;
27
+ readonly min: readonly [number, number, number];
28
+ readonly max: readonly [number, number, number];
29
+ }
@@ -0,0 +1,2 @@
1
+ export declare const mipCount: (w: number, h: number) => number;
2
+ export declare function generateMips(device: GPUDevice, texture: GPUTexture): void;
@@ -0,0 +1,2 @@
1
+ export { arrivalCamera, type CameraState, FIT, type FitBand, type Flight, flightOpacity, type NavKind, outgoingCamera, type PortalAffine, portalAffine, type Rect, type Viewport, visibleRect } from "../nav/flight";
2
+ export { boxOfPortal, clipOf, PORTAL_GATE, type PortalClip, portalPresence, type Presentation } from "../nav/portal";
@@ -0,0 +1,5 @@
1
+ export declare const PAPER_TEX = 256;
2
+ /** How much of the tooth's slope one step of B/A encodes (the decode multiplies back). */
3
+ export declare const TOOTH_SCALE = 48;
4
+ /** The texture's bytes (deterministic: the same page everywhere, every run). */
5
+ export declare function paperTexture(seed?: number): Uint8Array<ArrayBuffer>;
@@ -0,0 +1,44 @@
1
+ export declare const PHYSICS: {
2
+ /** How far a HELD note rises (§7's lift, as a height), and the scale it reads at (§7's 1.05, kept). */
3
+ readonly lift: {
4
+ readonly height: 12;
5
+ readonly scale: 1.03;
6
+ };
7
+ /**
8
+ * The contact shadow on the mat: Gaussian-blurred coverage of the sheet cast along the lamp's
9
+ * ground direction by its height — σ and alpha at contact, σ growing per unit of height, the
10
+ * alpha a held note casts, and the slope's cap (a note far from the lamp keeps a finite shadow).
11
+ */
12
+ readonly shadow: {
13
+ readonly sigma: 2.2;
14
+ readonly alpha: 0.36;
15
+ readonly sigmaPerUnit: 0.9;
16
+ readonly alphaHeld: 0.4;
17
+ readonly slopeMax: 2.2;
18
+ };
19
+ /**
20
+ * A SLAB's shadow (a notebook, a whiteboard, a mini mat): the note's penumbra swept down its height, with a contact
21
+ * term at its base (the tree-shadow design system's paper elevation, mat.css `--lift-1`) — theme.ts `BOOK.shadow` until K4a.
22
+ */
23
+ readonly slab: {
24
+ readonly penumbra: {
25
+ readonly sigma0: 2.2;
26
+ readonly sigmaPerHeight: 0.9;
27
+ readonly alpha: 0.36;
28
+ };
29
+ /** The contact term: σ, alpha, and the gap (world units) it has faded over once the object floats. */
30
+ readonly contact: {
31
+ readonly sigma: 1.1;
32
+ readonly alpha: 0.3;
33
+ readonly reach: 2.5;
34
+ };
35
+ readonly slopeMax: 2.2;
36
+ };
37
+ /** The lamp's fill on a face turned away from it; how far past a flat face one turned toward it may brighten. */
38
+ readonly light: {
39
+ readonly ambient: 0.5;
40
+ readonly cap: 1.35;
41
+ };
42
+ /** The sole-selection ring (DESIGN.md §7), CSS px, in `--vf-select`. */
43
+ readonly ring: 1.5;
44
+ };
@@ -0,0 +1,44 @@
1
+ import type { Lamp } from "./light";
2
+ export interface Placement {
3
+ readonly cx: number;
4
+ readonly cy: number;
5
+ /** Radians in the mat's plane; positive turns clockwise on screen. */
6
+ readonly angle: number;
7
+ /** Units off the mat. */
8
+ readonly lift: number;
9
+ /** Radians about the book's own x (its head dips for +) and y (its fore-edge dips for +) axes, through its middle `zc` up. */
10
+ readonly tiltX: number;
11
+ readonly tiltY: number;
12
+ readonly zc: number;
13
+ }
14
+ /** A rigid transform: 3×3 rotation (row-major) and a translation. */
15
+ export interface Rigid {
16
+ readonly r: readonly number[];
17
+ readonly t: readonly [number, number, number];
18
+ }
19
+ export declare function rigidOf(p: Placement): Rigid;
20
+ export declare function toWorld(g: Rigid, x: number, y: number, z: number): [number, number, number];
21
+ export declare function dirToWorld(g: Rigid, x: number, y: number, z: number): [number, number, number];
22
+ export declare function toLocal(g: Rigid, x: number, y: number, z: number): [number, number, number];
23
+ export declare function dirToLocal(g: Rigid, x: number, y: number, z: number): [number, number, number];
24
+ /** Column-major 4×4 (WGSL's mat4x4f) of a rigid transform. */
25
+ export declare function matrixOf(g: Rigid): Float32Array;
26
+ /** The unit direction toward the lamp from a desk point, the ground slope capped (a book far from the lamp keeps a finite shadow). */
27
+ export declare function lampDir(lamp: Lamp, x: number, y: number, slopeMax: number): [number, number, number];
28
+ /**
29
+ * The shadow map's frame for a book: an orthographic view along the light, square, fitted to
30
+ * the book's world-space box (grown by `pad`). Out: the world → clip matrix (x, y in −1…1, z
31
+ * 0 nearest the lamp … 1), the world size of one texel at `res`, and the depth range (world).
32
+ */
33
+ export declare function lightFrame(L: readonly [number, number, number], lo: readonly [number, number, number], hi: readonly [number, number, number], res: number, pad?: number, receivers?: readonly (readonly [number, number, number])[]): {
34
+ matrix: Float32Array;
35
+ texel: number;
36
+ depth: number;
37
+ };
38
+ /** A local box through the rigid transform → its world-space bounds. */
39
+ export declare function worldBounds(g: Rigid, lo: readonly [number, number, number], hi: readonly [number, number, number]): {
40
+ lo: [number, number, number];
41
+ hi: [number, number, number];
42
+ };
43
+ /** The inverse of a rigid transform. */
44
+ export declare function inverseOf(g: Rigid): Rigid;
@@ -0,0 +1,30 @@
1
+ import { type ServiceKey } from "./services";
2
+ import type { HandMetrics } from "./text";
3
+ /** The hand's face as a print sets it: a family and a weight (the host loads it — desk/host/ink.ts `PEN_FACES`). */
4
+ export interface PrintFace {
5
+ readonly family: string;
6
+ readonly weight: number;
7
+ }
8
+ /** What a pass takes a tile as: the host's canvas (TILE_TEX², straight alpha) — a type only. */
9
+ export type TileSource = HTMLCanvasElement | OffscreenCanvas;
10
+ /**
11
+ * THE PRINT'S RASTER (the host's seam, as `TextRaster` is the note's): the hand's face and its metrics (undefined while the
12
+ * face loads — the print waits rather than set the hand in a stand-in face), a version that turns over when a face lands,
13
+ * the type's widths, and a rectangle of a print drawn into a tile at `band` texels a unit.
14
+ */
15
+ export interface PrintRaster<P = unknown> {
16
+ hand(): {
17
+ readonly face: PrintFace;
18
+ readonly metrics: HandMetrics;
19
+ } | undefined;
20
+ version(): number;
21
+ measure(font: string, text: string): number;
22
+ tile(print: P, x: number, y: number, w: number, h: number, band: number): TileSource;
23
+ /** The same rectangle as RGBA bytes, TILE_TEX² × 4, row 0 at the top — a fixture's (a rig reads the live print through it). */
24
+ bytes(print: P, x: number, y: number, w: number, h: number, band: number): Uint8Array<ArrayBuffer>;
25
+ }
26
+ /**
27
+ * The print raster as a desk SERVICE (K8a, kit/services.ts): lent by the object whose DOM half makes it (the desk calendar's,
28
+ * over the host's text raster) and `use`d by any kind that prints — `host.use?.(PRINT_RASTER)`.
29
+ */
30
+ export declare const PRINT_RASTER: ServiceKey<PrintRaster>;