@vibecook/ice 0.11.0 → 0.15.0-desk.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (389) hide show
  1. package/README.md +79 -50
  2. package/dist/chunk-AMMFQP2C.js +2444 -0
  3. package/dist/chunk-AMMFQP2C.js.map +1 -0
  4. package/dist/chunk-BKV4ZEU3.js +1 -0
  5. package/dist/chunk-BKV4ZEU3.js.map +1 -0
  6. package/dist/chunk-ENIFIUEP.js +155 -0
  7. package/dist/chunk-ENIFIUEP.js.map +1 -0
  8. package/dist/chunk-H3SKYJLK.js +8269 -0
  9. package/dist/chunk-H3SKYJLK.js.map +1 -0
  10. package/dist/{chunk-OR5FNVUE.js → chunk-JS6PG6YD.js} +398 -167
  11. package/dist/chunk-JS6PG6YD.js.map +1 -0
  12. package/dist/{chunk-VGVDJZSP.js → chunk-PFJN3XN2.js} +13232 -7388
  13. package/dist/chunk-PFJN3XN2.js.map +1 -0
  14. package/dist/chunk-QXOCF56A.js +148 -0
  15. package/dist/chunk-QXOCF56A.js.map +1 -0
  16. package/dist/chunk-U4YMA4TJ.js +635 -0
  17. package/dist/chunk-U4YMA4TJ.js.map +1 -0
  18. package/dist/desk-engine.js +36 -0
  19. package/dist/desk-engine.js.map +1 -0
  20. package/dist/desk-kit.js +244 -0
  21. package/dist/desk-kit.js.map +1 -0
  22. package/dist/desk-objects.js +12734 -0
  23. package/dist/desk-objects.js.map +1 -0
  24. package/dist/desk.js +497 -0
  25. package/dist/desk.js.map +1 -0
  26. package/dist/devtools.js +233 -189
  27. package/dist/devtools.js.map +1 -1
  28. package/dist/dom.js +7 -19
  29. package/dist/index.js +232 -20
  30. package/dist/kernel.js +53 -25
  31. package/dist/react.js +1047 -38
  32. package/dist/react.js.map +1 -1
  33. package/dist/types/packages/core/src/behavior/define-behavior.d.ts +11 -0
  34. package/dist/types/packages/core/src/behavior/runtime.d.ts +4 -0
  35. package/dist/types/packages/core/src/canvas/define-canvas-type.d.ts +86 -0
  36. package/dist/types/packages/core/src/canvas/define-container.d.ts +17 -0
  37. package/dist/types/packages/core/src/canvas/diagnostics.d.ts +27 -0
  38. package/dist/types/packages/core/src/canvas/engine-catalog.d.ts +70 -0
  39. package/dist/types/packages/core/src/canvas/extensions.d.ts +125 -0
  40. package/dist/types/packages/core/src/canvas/frame-behavior-host.d.ts +16 -0
  41. package/dist/types/packages/core/src/canvas/frame-preview.d.ts +79 -0
  42. package/dist/types/packages/core/src/canvas/frame-projection.d.ts +38 -0
  43. package/dist/types/packages/core/src/canvas/frame-view.d.ts +36 -0
  44. package/dist/types/packages/core/src/canvas/migrate.d.ts +14 -0
  45. package/dist/types/packages/core/src/canvas/placement.d.ts +30 -0
  46. package/dist/types/packages/core/src/canvas/presentation-transition.d.ts +100 -0
  47. package/dist/types/packages/core/src/canvas/runtime-extension-host.d.ts +16 -0
  48. package/dist/types/packages/core/src/canvas/session.d.ts +47 -0
  49. package/dist/types/packages/core/src/catalog/camera-derived.d.ts +16 -27
  50. package/dist/types/packages/core/src/catalog/desk.d.ts +326 -0
  51. package/dist/types/packages/core/src/catalog/gesture.d.ts +51 -0
  52. package/dist/types/packages/core/src/catalog/graph.d.ts +2 -2
  53. package/dist/types/packages/core/src/catalog/index.d.ts +2 -0
  54. package/dist/types/packages/core/src/catalog/pointer.d.ts +42 -0
  55. package/dist/types/packages/core/src/catalog/selection-presence.d.ts +7 -0
  56. package/dist/types/packages/core/src/catalog/settings-resources.d.ts +28 -2
  57. package/dist/types/packages/core/src/catalog/surface.d.ts +1 -0
  58. package/dist/types/packages/core/src/doc/doc-commit-sink.d.ts +18 -2
  59. package/dist/types/packages/core/src/doc/doc-kit.d.ts +21 -2
  60. package/dist/types/packages/core/src/doc/envelope.d.ts +5 -2
  61. package/dist/types/packages/core/src/doc/schema-migrate.d.ts +1 -1
  62. package/dist/types/packages/core/src/doc/version-gate.d.ts +21 -3
  63. package/dist/types/packages/core/src/engine/commit-sink.d.ts +10 -1
  64. package/dist/types/packages/core/src/engine/engine.d.ts +6 -0
  65. package/dist/types/packages/core/src/engine/frame-control.d.ts +74 -0
  66. package/dist/types/packages/core/src/engine/guests.d.ts +4 -1
  67. package/dist/types/packages/core/src/engine/world-doors.d.ts +12 -0
  68. package/dist/types/packages/core/src/facade/create-canvas-engine.d.ts +146 -13
  69. package/dist/types/packages/core/src/index.d.ts +33 -12
  70. package/dist/types/packages/core/src/input/queue.d.ts +3 -1
  71. package/dist/types/packages/core/src/interaction/install.d.ts +36 -0
  72. package/dist/types/packages/core/src/interaction/wakes.d.ts +24 -0
  73. package/dist/types/packages/core/src/nav/nav-geometry.d.ts +100 -0
  74. package/dist/types/packages/core/src/nav/nested-canvas.d.ts +47 -4
  75. package/dist/types/packages/core/src/ops/cascade.d.ts +2 -1
  76. package/dist/types/packages/core/src/ops/claims.d.ts +6 -0
  77. package/dist/types/packages/core/src/ops/insert.d.ts +4 -0
  78. package/dist/types/packages/core/src/ops/point-pick.d.ts +4 -1
  79. package/dist/types/packages/core/src/ops/sibling-order.d.ts +14 -4
  80. package/dist/types/packages/core/src/ops/tray.d.ts +48 -0
  81. package/dist/types/packages/core/src/presence/presence-kit.d.ts +5 -0
  82. package/dist/types/packages/core/src/schema/meta.d.ts +10 -0
  83. package/dist/types/packages/core/src/schema/prefab.d.ts +8 -0
  84. package/dist/types/packages/core/src/settings/defaults.d.ts +25 -6
  85. package/dist/types/packages/core/src/surface/gpu-device.d.ts +55 -0
  86. package/dist/types/packages/core/src/systems/camera-sim.d.ts +29 -0
  87. package/dist/types/packages/core/src/systems/chrome.d.ts +15 -23
  88. package/dist/types/packages/core/src/systems/drag-mods.d.ts +34 -0
  89. package/dist/types/packages/core/src/systems/held.d.ts +73 -0
  90. package/dist/types/packages/core/src/systems/insert-ghost.d.ts +2 -0
  91. package/dist/types/packages/core/src/systems/l0-input.d.ts +14 -0
  92. package/dist/types/packages/core/src/systems/l1-pick.d.ts +53 -1
  93. package/dist/types/packages/core/src/systems/l2-arbitrate.d.ts +18 -4
  94. package/dist/types/packages/core/src/systems/l2-recognize.d.ts +3 -1
  95. package/dist/types/packages/core/src/systems/l3-behave.d.ts +4 -1
  96. package/dist/types/packages/core/src/systems/l3-claim.d.ts +7 -0
  97. package/dist/types/packages/core/src/systems/l3-connect.d.ts +1 -1
  98. package/dist/types/packages/core/src/systems/l3-drop.d.ts +30 -1
  99. package/dist/types/packages/core/src/systems/l3-marquee.d.ts +2 -1
  100. package/dist/types/packages/core/src/systems/l3-ports.d.ts +1 -1
  101. package/dist/types/packages/core/src/systems/l4-cursor.d.ts +5 -0
  102. package/dist/types/packages/core/src/systems/nav-flight.d.ts +85 -3
  103. package/dist/types/packages/core/src/systems/nav-tap.d.ts +44 -0
  104. package/dist/types/packages/core/src/systems/press-button.d.ts +25 -0
  105. package/dist/types/packages/core/src/systems/press-wheel.d.ts +11 -0
  106. package/dist/types/packages/core/src/systems/tray.d.ts +111 -0
  107. package/dist/types/packages/core/src/systems/zoom-through.d.ts +30 -0
  108. package/dist/types/packages/core/src/tools/define-tool.d.ts +10 -0
  109. package/dist/types/packages/core/src/widget/define-widget.d.ts +166 -63
  110. package/dist/types/packages/core/src/widget/equip.d.ts +14 -2
  111. package/dist/types/packages/core/src/widget/held-tools.d.ts +83 -0
  112. package/dist/types/packages/core/src/widget/menu-actions.d.ts +44 -0
  113. package/dist/types/packages/core/src/widget/mount-store.d.ts +21 -46
  114. package/dist/types/packages/core/src/widget/spawn.d.ts +1 -1
  115. package/dist/types/packages/desk/src/assets/blue-noise.gen.d.ts +10 -0
  116. package/dist/types/packages/desk/src/card/card.d.ts +103 -0
  117. package/dist/types/packages/desk/src/compose/ambient.d.ts +59 -0
  118. package/dist/types/packages/desk/src/compose/builder.d.ts +306 -0
  119. package/dist/types/packages/desk/src/compose/children.d.ts +3 -0
  120. package/dist/types/packages/desk/src/compose/index.d.ts +14 -0
  121. package/dist/types/packages/desk/src/compose/marks.d.ts +133 -0
  122. package/dist/types/packages/desk/src/compose/pick.d.ts +5 -0
  123. package/dist/types/packages/desk/src/compose/reflector.d.ts +120 -0
  124. package/dist/types/packages/desk/src/compose/tap.d.ts +5 -0
  125. package/dist/types/packages/desk/src/docs.d.ts +23 -0
  126. package/dist/types/packages/desk/src/engine/budget.d.ts +43 -0
  127. package/dist/types/packages/desk/src/engine/device.d.ts +54 -0
  128. package/dist/types/packages/desk/src/engine/index.d.ts +5 -0
  129. package/dist/types/packages/desk/src/engine/pipeline.d.ts +36 -0
  130. package/dist/types/packages/desk/src/engine/rasters.d.ts +66 -0
  131. package/dist/types/packages/desk/src/engine/records.d.ts +56 -0
  132. package/dist/types/packages/desk/src/engine/shader.d.ts +22 -0
  133. package/dist/types/packages/desk/src/engine/struct.d.ts +39 -0
  134. package/dist/types/packages/desk/src/engine/target.d.ts +26 -0
  135. package/dist/types/packages/desk/src/faults.d.ts +38 -0
  136. package/dist/types/packages/desk/src/gpu-ablation.d.ts +61 -0
  137. package/dist/types/packages/desk/src/gpu-memory.d.ts +54 -0
  138. package/dist/types/packages/desk/src/gpu-profiler.d.ts +141 -0
  139. package/dist/types/packages/desk/src/gpu-wrap.d.ts +8 -0
  140. package/dist/types/packages/desk/src/ground.d.ts +537 -0
  141. package/dist/types/packages/desk/src/hold/focus.d.ts +53 -0
  142. package/dist/types/packages/desk/src/hold/pose.d.ts +152 -0
  143. package/dist/types/packages/desk/src/hold/shaders.d.ts +9 -0
  144. package/dist/types/packages/desk/src/host/editor.d.ts +18 -0
  145. package/dist/types/packages/desk/src/host/index.d.ts +9 -0
  146. package/dist/types/packages/desk/src/host/ink.d.ts +18 -0
  147. package/dist/types/packages/desk/src/host/layer.d.ts +536 -0
  148. package/dist/types/packages/desk/src/host/picture.d.ts +2 -0
  149. package/dist/types/packages/desk/src/host/surface.d.ts +5 -0
  150. package/dist/types/packages/desk/src/index.d.ts +16 -0
  151. package/dist/types/packages/desk/src/kind.d.ts +189 -0
  152. package/dist/types/packages/desk/src/kinds/world.d.ts +447 -0
  153. package/dist/types/packages/desk/src/kit/arrays.d.ts +88 -0
  154. package/dist/types/packages/desk/src/kit/blobs.d.ts +40 -0
  155. package/dist/types/packages/desk/src/kit/book.d.ts +2 -0
  156. package/dist/types/packages/desk/src/kit/editor.d.ts +105 -0
  157. package/dist/types/packages/desk/src/kit/eye.d.ts +37 -0
  158. package/dist/types/packages/desk/src/kit/hold.d.ts +1 -0
  159. package/dist/types/packages/desk/src/kit/index.d.ts +26 -0
  160. package/dist/types/packages/desk/src/kit/inside.d.ts +116 -0
  161. package/dist/types/packages/desk/src/kit/layer.d.ts +159 -0
  162. package/dist/types/packages/desk/src/kit/light.d.ts +3 -0
  163. package/dist/types/packages/desk/src/kit/mesh.d.ts +29 -0
  164. package/dist/types/packages/desk/src/kit/mips.d.ts +2 -0
  165. package/dist/types/packages/desk/src/kit/nav.d.ts +2 -0
  166. package/dist/types/packages/desk/src/kit/paper-tex.d.ts +5 -0
  167. package/dist/types/packages/desk/src/kit/physics.d.ts +44 -0
  168. package/dist/types/packages/desk/src/kit/place.d.ts +44 -0
  169. package/dist/types/packages/desk/src/kit/print.d.ts +30 -0
  170. package/dist/types/packages/desk/src/kit/raster.d.ts +34 -0
  171. package/dist/types/packages/desk/src/kit/sdf.d.ts +1 -0
  172. package/dist/types/packages/desk/src/kit/seeds.d.ts +11 -0
  173. package/dist/types/packages/desk/src/kit/services.d.ts +34 -0
  174. package/dist/types/packages/desk/src/kit/springs.d.ts +12 -0
  175. package/dist/types/packages/desk/src/kit/strokes.d.ts +93 -0
  176. package/dist/types/packages/desk/src/kit/text.d.ts +142 -0
  177. package/dist/types/packages/desk/src/kit/uniform.d.ts +8 -0
  178. package/dist/types/packages/desk/src/kit/view.d.ts +39 -0
  179. package/dist/types/packages/desk/src/kit/wgsl.d.ts +15 -0
  180. package/dist/types/packages/desk/src/lattice/line.d.ts +15 -0
  181. package/dist/types/packages/desk/src/lattice/lod.d.ts +52 -0
  182. package/dist/types/packages/desk/src/lattice/ruler.d.ts +88 -0
  183. package/dist/types/packages/desk/src/marks/assemble.d.ts +65 -0
  184. package/dist/types/packages/desk/src/marks/ease.d.ts +4 -0
  185. package/dist/types/packages/desk/src/marks/laser.d.ts +41 -0
  186. package/dist/types/packages/desk/src/marks/layout.d.ts +167 -0
  187. package/dist/types/packages/desk/src/marks/pass.d.ts +59 -0
  188. package/dist/types/packages/desk/src/marks/shaders.d.ts +12 -0
  189. package/dist/types/packages/desk/src/mat/grid.d.ts +50 -0
  190. package/dist/types/packages/desk/src/mat/lamp.d.ts +14 -0
  191. package/dist/types/packages/desk/src/mat/layout.d.ts +144 -0
  192. package/dist/types/packages/desk/src/mat/mat-pass.d.ts +83 -0
  193. package/dist/types/packages/desk/src/mat/night.d.ts +95 -0
  194. package/dist/types/packages/desk/src/mat/projector.d.ts +39 -0
  195. package/dist/types/packages/desk/src/mat/shaders.d.ts +17 -0
  196. package/dist/types/packages/desk/src/mat/tilt.d.ts +14 -0
  197. package/dist/types/packages/desk/src/missing/layout.d.ts +27 -0
  198. package/dist/types/packages/desk/src/missing/object.d.ts +6 -0
  199. package/dist/types/packages/desk/src/missing/pass.d.ts +39 -0
  200. package/dist/types/packages/desk/src/missing/shaders.d.ts +7 -0
  201. package/dist/types/packages/desk/src/missing/slots.d.ts +8 -0
  202. package/dist/types/packages/desk/src/nav/flight.d.ts +186 -0
  203. package/dist/types/packages/desk/src/nav/portal.d.ts +95 -0
  204. package/dist/types/packages/desk/src/object.d.ts +46 -0
  205. package/dist/types/packages/desk/src/pass-instrument.d.ts +89 -0
  206. package/dist/types/packages/desk/src/shaders.d.ts +12 -0
  207. package/dist/types/packages/desk/src/shaders.gen.d.ts +17 -0
  208. package/dist/types/packages/desk/src/submit-instrument.d.ts +36 -0
  209. package/dist/types/packages/desk/src/theme.d.ts +497 -0
  210. package/dist/types/packages/desk/src/tray/carry.d.ts +99 -0
  211. package/dist/types/packages/desk/src/tray/drawer.d.ts +124 -0
  212. package/dist/types/packages/desk/src/tray/flux.d.ts +49 -0
  213. package/dist/types/packages/desk/src/tray/index.d.ts +4 -0
  214. package/dist/types/packages/desk/src/tray/lattice.d.ts +71 -0
  215. package/dist/types/packages/desk/src/tray/layout.d.ts +7 -0
  216. package/dist/types/packages/desk/src/tray/look.d.ts +29 -0
  217. package/dist/types/packages/desk/src/tray/pass.d.ts +101 -0
  218. package/dist/types/packages/desk/src/tray/shaders.d.ts +10 -0
  219. package/dist/types/packages/desk/src/tray/specimens.d.ts +214 -0
  220. package/dist/types/packages/devtools/src/attach.d.ts +22 -8
  221. package/dist/types/packages/devtools/src/dock.d.ts +18 -14
  222. package/dist/types/packages/devtools/src/gpu-panel.d.ts +105 -0
  223. package/dist/types/packages/devtools/src/index.d.ts +5 -4
  224. package/dist/types/packages/dom/src/desk-host.d.ts +104 -0
  225. package/dist/types/packages/dom/src/host.d.ts +13 -14
  226. package/dist/types/packages/dom/src/index.d.ts +12 -10
  227. package/dist/types/packages/dom/src/loop.d.ts +18 -1
  228. package/dist/types/packages/dom/src/pointer-adapter.d.ts +11 -29
  229. package/dist/types/packages/dom/src/widget-focus.d.ts +17 -13
  230. package/dist/types/packages/ice/src/desk-engine.d.ts +2 -0
  231. package/dist/types/packages/ice/src/desk-kit.d.ts +6 -0
  232. package/dist/types/packages/ice/src/desk-objects.d.ts +5 -0
  233. package/dist/types/packages/ice/src/desk.d.ts +5 -0
  234. package/dist/types/packages/kernel/src/atlas-pack.d.ts +157 -0
  235. package/dist/types/packages/kernel/src/bezier.d.ts +0 -15
  236. package/dist/types/packages/kernel/src/coords.d.ts +0 -39
  237. package/dist/types/packages/kernel/src/index.d.ts +2 -2
  238. package/dist/types/packages/kernel/src/nav-flight.d.ts +6 -0
  239. package/dist/types/packages/kernel/src/tray.d.ts +155 -0
  240. package/dist/types/packages/objects/src/board/board-pass.d.ts +180 -0
  241. package/dist/types/packages/objects/src/board/board-pen.d.ts +36 -0
  242. package/dist/types/packages/objects/src/board/board.d.ts +104 -0
  243. package/dist/types/packages/objects/src/board/data.d.ts +31 -0
  244. package/dist/types/packages/objects/src/board/history.d.ts +33 -0
  245. package/dist/types/packages/objects/src/board/kind.d.ts +208 -0
  246. package/dist/types/packages/objects/src/board/layout.d.ts +102 -0
  247. package/dist/types/packages/objects/src/board/object.d.ts +7 -0
  248. package/dist/types/packages/objects/src/board/pen.d.ts +71 -0
  249. package/dist/types/packages/objects/src/board/shaders.d.ts +36 -0
  250. package/dist/types/packages/objects/src/board/stroke.d.ts +99 -0
  251. package/dist/types/packages/objects/src/board/theme.d.ts +150 -0
  252. package/dist/types/packages/objects/src/calendar/data.d.ts +97 -0
  253. package/dist/types/packages/objects/src/calendar/events.d.ts +58 -0
  254. package/dist/types/packages/objects/src/calendar/hand.d.ts +53 -0
  255. package/dist/types/packages/objects/src/calendar/host/input.d.ts +67 -0
  256. package/dist/types/packages/objects/src/calendar/host/print.d.ts +9 -0
  257. package/dist/types/packages/objects/src/calendar/kind.d.ts +297 -0
  258. package/dist/types/packages/objects/src/calendar/law.d.ts +151 -0
  259. package/dist/types/packages/objects/src/calendar/layout.d.ts +47 -0
  260. package/dist/types/packages/objects/src/calendar/month.d.ts +75 -0
  261. package/dist/types/packages/objects/src/calendar/object.d.ts +45 -0
  262. package/dist/types/packages/objects/src/calendar/pad.d.ts +42 -0
  263. package/dist/types/packages/objects/src/calendar/pass.d.ts +229 -0
  264. package/dist/types/packages/objects/src/calendar/print.d.ts +87 -0
  265. package/dist/types/packages/objects/src/calendar/printing.d.ts +80 -0
  266. package/dist/types/packages/objects/src/calendar/roll.d.ts +45 -0
  267. package/dist/types/packages/objects/src/calendar/shaders.d.ts +12 -0
  268. package/dist/types/packages/objects/src/calendar/sheet.d.ts +43 -0
  269. package/dist/types/packages/objects/src/calendar/tiles.d.ts +67 -0
  270. package/dist/types/packages/objects/src/calendar/turn.d.ts +73 -0
  271. package/dist/types/packages/objects/src/calendar/writing.d.ts +42 -0
  272. package/dist/types/packages/objects/src/index.d.ts +22 -0
  273. package/dist/types/packages/objects/src/kinds.d.ts +24 -0
  274. package/dist/types/packages/objects/src/minimat/inside.d.ts +17 -0
  275. package/dist/types/packages/objects/src/minimat/kind.d.ts +51 -0
  276. package/dist/types/packages/objects/src/minimat/layout.d.ts +83 -0
  277. package/dist/types/packages/objects/src/minimat/minimat.d.ts +179 -0
  278. package/dist/types/packages/objects/src/minimat/object.d.ts +8 -0
  279. package/dist/types/packages/objects/src/minimat/pass.d.ts +61 -0
  280. package/dist/types/packages/objects/src/minimat/shaders.d.ts +10 -0
  281. package/dist/types/packages/objects/src/minimat/theme.d.ts +98 -0
  282. package/dist/types/packages/objects/src/notebook/ink.d.ts +70 -0
  283. package/dist/types/packages/objects/src/notebook/kind.d.ts +236 -0
  284. package/dist/types/packages/objects/src/notebook/law.d.ts +129 -0
  285. package/dist/types/packages/objects/src/notebook/layout.d.ts +46 -0
  286. package/dist/types/packages/objects/src/notebook/leaf.d.ts +44 -0
  287. package/dist/types/packages/objects/src/notebook/mesh.d.ts +20 -0
  288. package/dist/types/packages/objects/src/notebook/motion.d.ts +107 -0
  289. package/dist/types/packages/objects/src/notebook/object.d.ts +8 -0
  290. package/dist/types/packages/objects/src/notebook/pages.d.ts +56 -0
  291. package/dist/types/packages/objects/src/notebook/pass.d.ts +197 -0
  292. package/dist/types/packages/objects/src/notebook/pick.d.ts +30 -0
  293. package/dist/types/packages/objects/src/notebook/raster.d.ts +28 -0
  294. package/dist/types/packages/objects/src/notebook/shaders.d.ts +11 -0
  295. package/dist/types/packages/objects/src/notebook/shape.d.ts +155 -0
  296. package/dist/types/packages/objects/src/notebook/theme.d.ts +76 -0
  297. package/dist/types/packages/objects/src/palette.d.ts +577 -0
  298. package/dist/types/packages/objects/src/paper/host/body.d.ts +30 -0
  299. package/dist/types/packages/objects/src/paper/kind.d.ts +81 -0
  300. package/dist/types/packages/objects/src/paper/layout.d.ts +73 -0
  301. package/dist/types/packages/objects/src/paper/object.d.ts +31 -0
  302. package/dist/types/packages/objects/src/paper/pages.d.ts +43 -0
  303. package/dist/types/packages/objects/src/paper/paper-pass.d.ts +86 -0
  304. package/dist/types/packages/objects/src/paper/paper.d.ts +117 -0
  305. package/dist/types/packages/objects/src/paper/shaders.d.ts +18 -0
  306. package/dist/types/packages/objects/src/paper/theme.d.ts +58 -0
  307. package/dist/types/packages/objects/src/paper/typing.d.ts +51 -0
  308. package/dist/types/packages/objects/src/paper/writing.d.ts +161 -0
  309. package/dist/types/packages/objects/src/photo/carry.d.ts +33 -0
  310. package/dist/types/packages/objects/src/photo/kind.d.ts +136 -0
  311. package/dist/types/packages/objects/src/photo/layout.d.ts +39 -0
  312. package/dist/types/packages/objects/src/photo/object.d.ts +5 -0
  313. package/dist/types/packages/objects/src/photo/photo-pass.d.ts +104 -0
  314. package/dist/types/packages/objects/src/photo/photo.d.ts +262 -0
  315. package/dist/types/packages/objects/src/photo/pictures.d.ts +152 -0
  316. package/dist/types/packages/objects/src/photo/sample.d.ts +9 -0
  317. package/dist/types/packages/objects/src/photo/shaders.d.ts +18 -0
  318. package/dist/types/packages/objects/src/preset.d.ts +44 -0
  319. package/dist/types/packages/objects/src/shaders.d.ts +3 -0
  320. package/dist/types/packages/objects/src/shaders.gen.d.ts +21 -0
  321. package/dist/types/packages/react/src/canvas-hooks.d.ts +12 -0
  322. package/dist/types/packages/react/src/desk.d.ts +56 -0
  323. package/dist/types/packages/react/src/engine-context.d.ts +2 -2
  324. package/dist/types/packages/react/src/frame-preview-boundary.d.ts +19 -0
  325. package/dist/types/packages/react/src/hooks.d.ts +9 -14
  326. package/dist/types/packages/react/src/index.d.ts +16 -9
  327. package/dist/types/packages/react/src/keymap.d.ts +21 -2
  328. package/dist/types/packages/react/src/selection-menu.d.ts +174 -0
  329. package/dist/types/packages/react/src/tray-bar.d.ts +124 -0
  330. package/package.json +64 -31
  331. package/dist/chunk-2TNVB2ON.js +0 -1163
  332. package/dist/chunk-2TNVB2ON.js.map +0 -1
  333. package/dist/chunk-OR5FNVUE.js.map +0 -1
  334. package/dist/chunk-Q665T4L7.js +0 -681
  335. package/dist/chunk-Q665T4L7.js.map +0 -1
  336. package/dist/chunk-VGVDJZSP.js.map +0 -1
  337. package/dist/ground.js +0 -1108
  338. package/dist/ground.js.map +0 -1
  339. package/dist/r3f.js +0 -1644
  340. package/dist/r3f.js.map +0 -1
  341. package/dist/types/packages/core/src/input/measure-queue.d.ts +0 -30
  342. package/dist/types/packages/core/src/settings/ground-config.d.ts +0 -101
  343. package/dist/types/packages/core/src/systems/measure-ingest.d.ts +0 -26
  344. package/dist/types/packages/devtools/src/gl-panel.d.ts +0 -69
  345. package/dist/types/packages/dom/src/measure-adapter.d.ts +0 -31
  346. package/dist/types/packages/dom/src/measure-wiring.d.ts +0 -49
  347. package/dist/types/packages/dom/src/planes.d.ts +0 -33
  348. package/dist/types/packages/dom/src/reflectors/chrome.d.ts +0 -33
  349. package/dist/types/packages/dom/src/reflectors/dom-widgets.d.ts +0 -59
  350. package/dist/types/packages/dom/src/reflectors/graybox.d.ts +0 -31
  351. package/dist/types/packages/dom/src/reflectors/plane-transform.d.ts +0 -38
  352. package/dist/types/packages/ground/src/index.d.ts +0 -69
  353. package/dist/types/packages/ground/src/layer.d.ts +0 -40
  354. package/dist/types/packages/ground/src/pass.d.ts +0 -41
  355. package/dist/types/packages/ground/src/passes/grid-contract.d.ts +0 -28
  356. package/dist/types/packages/ground/src/passes/grid-magnet-pass.d.ts +0 -2
  357. package/dist/types/packages/ground/src/passes/grid-magnet.d.ts +0 -31
  358. package/dist/types/packages/ground/src/passes/grid.d.ts +0 -10
  359. package/dist/types/packages/ground/src/passes/guides-collect.d.ts +0 -14
  360. package/dist/types/packages/ground/src/passes/guides.d.ts +0 -3
  361. package/dist/types/packages/ground/src/passes/magnet-collect.d.ts +0 -63
  362. package/dist/types/packages/ground/src/passes/soup-collect.d.ts +0 -35
  363. package/dist/types/packages/ground/src/passes/soup-mesh.d.ts +0 -8
  364. package/dist/types/packages/ground/src/passes/wires-collect.d.ts +0 -35
  365. package/dist/types/packages/ground/src/passes/wires.d.ts +0 -10
  366. package/dist/types/packages/ground/src/poles.d.ts +0 -47
  367. package/dist/types/packages/ground/src/renderer.d.ts +0 -15
  368. package/dist/types/packages/ice/src/ground.d.ts +0 -1
  369. package/dist/types/packages/ice/src/r3f.d.ts +0 -1
  370. package/dist/types/packages/kernel/src/eviction.d.ts +0 -23
  371. package/dist/types/packages/kernel/src/zoom-bands.d.ts +0 -19
  372. package/dist/types/packages/r3f/src/bridge.d.ts +0 -129
  373. package/dist/types/packages/r3f/src/composite-material.d.ts +0 -26
  374. package/dist/types/packages/r3f/src/compositor-pass.d.ts +0 -105
  375. package/dist/types/packages/r3f/src/dev-write-trap.d.ts +0 -30
  376. package/dist/types/packages/r3f/src/gl-root.d.ts +0 -96
  377. package/dist/types/packages/r3f/src/gl-router.d.ts +0 -70
  378. package/dist/types/packages/r3f/src/index.d.ts +0 -17
  379. package/dist/types/packages/r3f/src/island-state.d.ts +0 -112
  380. package/dist/types/packages/r3f/src/island.d.ts +0 -13
  381. package/dist/types/packages/r3f/src/pool.d.ts +0 -56
  382. package/dist/types/packages/r3f/src/preview-capture.d.ts +0 -19
  383. package/dist/types/packages/r3f/src/resource-registry.d.ts +0 -30
  384. package/dist/types/packages/r3f/src/self-sustain.d.ts +0 -39
  385. package/dist/types/packages/r3f/src/use-island-frame.d.ts +0 -39
  386. package/dist/types/packages/react/src/infinite-canvas.d.ts +0 -140
  387. package/dist/types/packages/react/src/preview-snapshots.d.ts +0 -17
  388. package/dist/types/packages/react/src/widget-preview.d.ts +0 -14
  389. package/dist/types/packages/react/src/widget-root.d.ts +0 -33
@@ -0,0 +1,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>;
@@ -0,0 +1,34 @@
1
+ import { type ServiceKey } from "./services";
2
+ import type { HandLayout, HandMetrics } from "./text";
3
+ /** r8 coverage rows, row 0 at the top — what the ink pages take (`PaperPass.write`). */
4
+ export interface InkBitmap {
5
+ readonly bytes: Uint8Array<ArrayBuffer>;
6
+ readonly w: number;
7
+ readonly h: number;
8
+ }
9
+ export interface TextRaster {
10
+ /**
11
+ * The face's metrics in em (advances and kerning measured at 100 px, the box from the font's own
12
+ * ascent and descent) — `undefined` while the face loads: a sheet waits, blank, rather than write
13
+ * in a stand-in hand and re-write itself a moment later.
14
+ */
15
+ metrics(face: string): HandMetrics | undefined;
16
+ /** Bumped whenever a face lands: every layout keyed by it is laid again (the prototype's `fontVersion`). */
17
+ version(): number;
18
+ /**
19
+ * Tell `fn` whenever `version` moves — a face landed between frames (K7a: the desk wakes for it; a loop at rest polls no
20
+ * version). Returns an unsubscribe. Absent (a fake, a raster with fixed faces): the version never moves on its own.
21
+ */
22
+ onVersion?(fn: () => void): () => void;
23
+ /**
24
+ * Draw a layout's glyphs for a `box` (note units) at `band` texels per note unit: each glyph in its
25
+ * own frame — turned, scaled, at its pressure — over a faint stroke `bleed` note units wide (the pen's
26
+ * spread), the canvas's alpha read back as coverage.
27
+ */
28
+ raster(layout: HandLayout, face: string, box: {
29
+ readonly w: number;
30
+ readonly h: number;
31
+ }, band: number, bleed: number): InkBitmap;
32
+ }
33
+ /** The app's text raster as a desk SERVICE (K8a, kit/services.ts — `deskLayer({ text })` lends it): `host.use?.(TEXT_RASTER)`. */
34
+ export declare const TEXT_RASTER: ServiceKey<TextRaster>;
@@ -0,0 +1 @@
1
+ export declare const sdRoundBox: (px: number, py: number, bx: number, by: number, r: number) => number;
@@ -0,0 +1,11 @@
1
+ /** The seeds as the cell stores them: base64 (no padding) of little-endian u32s. */
2
+ export declare function encodeSeeds(seeds: ArrayLike<number>): string;
3
+ /** The seeds a cell holds, as i32s (the layout's `seeds`) — whole seeds only; anything unreadable ends the run. */
4
+ export declare function decodeSeeds(s: string): number[];
5
+ /**
6
+ * The seeds a note's text is written with: the stored ones, index for index, and for every glyph
7
+ * past them the note's own `glyphSeed(noteSeed, i)` — exactly `text.length` of them.
8
+ */
9
+ export declare function seedsFor(text: string, stored: string, noteSeed: number): number[];
10
+ /** A fresh seed for a glyph just written — the host's randomness (`Math.random` in a browser). */
11
+ export declare const freshSeed: () => number;
@@ -0,0 +1,34 @@
1
+ /** A service's KEY (K8a): its name — the registry's identity — and, as a phantom, the type of what is lent under it. */
2
+ export interface ServiceKey<T> {
3
+ readonly name: string;
4
+ /** Never set: carries `T` so `use(key)` answers the lent thing's own type. */
5
+ readonly __service?: T;
6
+ }
7
+ /** A key for a service of type `T` under `name` — namespace a plugin's own (`"clock.face"`); the desk's are bare words. */
8
+ export declare const serviceKey: <T>(name: string) => ServiceKey<T>;
9
+ /** One service as it is LENT: its key and the thing. Made by `service(key, value)`, which checks the pair's type. */
10
+ export interface Lent<T = unknown> {
11
+ readonly key: ServiceKey<T>;
12
+ readonly value: T;
13
+ }
14
+ /** An entry to lend: `service(PRINT_RASTER, printRaster({ text }))`. */
15
+ export declare const service: <T>(key: ServiceKey<T>, value: T) => Lent<T>;
16
+ /** Where a service is found: `use(key)` answers what is lent under the key's name, or undefined — none on this desk. */
17
+ export interface Services {
18
+ use<T>(key: ServiceKey<T>): T | undefined;
19
+ }
20
+ /**
21
+ * What an object's DOM half is handed to LEND (K8a): what is lent so far, and the desk's WAKE — a service whose work LANDS later (a
22
+ * face loaded, a picture decoded, a feed arrived) calls it when it does, so a sleeping loop steps and every kind is asked again (K7a's
23
+ * law: nothing is polled at rest; what arrives outside a step says so). The kinds that read the service see the landing in their tick.
24
+ */
25
+ export interface LendHost extends Services {
26
+ wake(): void;
27
+ }
28
+ /** A registry of what has been lent so far (the desk layer's): `lend` adds entries — a name lent twice throws, naming both lenders. */
29
+ export interface ServiceRegistry extends Services {
30
+ lend(entries: readonly Lent[], by: string): void;
31
+ /** The names lent, in lending order (a rig's and a test's witness). */
32
+ names(): readonly string[];
33
+ }
34
+ export declare function createServices(entries?: readonly Lent[], by?: string): ServiceRegistry;
@@ -0,0 +1,12 @@
1
+ export declare function spring(x0: number, v0: number, target: number, hz: number, damping: number, dt: number, substeps?: number): [number, number];
2
+ export declare function settled(x: number, v: number, target: number, eps?: number): boolean;
3
+ /**
4
+ * The objects' springs: the hold's lift (the hover's rise rides the same numbers). The selection RING's spring is gone (D6): the
5
+ * kinds' own ring retired at D4a — the marks draw the selection — and a spring that only ever fed a zero kept the desk live for
6
+ * a second after every selection change (the D4a landing's owed item).
7
+ */
8
+ export interface ObjectSprings {
9
+ readonly liftHz: number;
10
+ readonly liftDamp: number;
11
+ }
12
+ export declare const SPRINGS: ObjectSprings;
@@ -0,0 +1,93 @@
1
+ import { type Entity, type GuardedTx, type World } from "../../../core/src/index";
2
+ /** A board's data child: a stroke (`marker`, with `erase` for the eraser) or a wipe. */
3
+ export declare const BoardStroke: import("@vibecook/strata-ecs").Component<import("@vibecook/strata-ecs").ValueOf<{
4
+ readonly tool: import("@vibecook/strata-ecs").FieldSpec<"string", true>;
5
+ readonly ink: import("@vibecook/strata-ecs").FieldSpec<"string", true>;
6
+ readonly tip: import("@vibecook/strata-ecs").FieldSpec<"string", true>;
7
+ readonly erase: import("@vibecook/strata-ecs").FieldSpec<"bool", true>;
8
+ readonly points: import("@vibecook/strata-ecs").FieldSpec<"string", true>;
9
+ readonly speed: import("@vibecook/strata-ecs").FieldSpec<"f64", true>;
10
+ readonly times: import("@vibecook/strata-ecs").FieldSpec<"string", true>;
11
+ readonly page: import("@vibecook/strata-ecs").FieldSpec<"u32", true>;
12
+ readonly seed: import("@vibecook/strata-ecs").FieldSpec<"f64", true>;
13
+ }>, {
14
+ readonly tool: import("@vibecook/strata-ecs").FieldSpec<"string", true>;
15
+ readonly ink: import("@vibecook/strata-ecs").FieldSpec<"string", true>;
16
+ readonly tip: import("@vibecook/strata-ecs").FieldSpec<"string", true>;
17
+ readonly erase: import("@vibecook/strata-ecs").FieldSpec<"bool", true>;
18
+ readonly points: import("@vibecook/strata-ecs").FieldSpec<"string", true>;
19
+ readonly speed: import("@vibecook/strata-ecs").FieldSpec<"f64", true>;
20
+ readonly times: import("@vibecook/strata-ecs").FieldSpec<"string", true>;
21
+ readonly page: import("@vibecook/strata-ecs").FieldSpec<"u32", true>;
22
+ readonly seed: import("@vibecook/strata-ecs").FieldSpec<"f64", true>;
23
+ }>;
24
+ /** A stroke's cell as the board reads it (a tolerant reader: a string field strata hands back as null reads as its default). */
25
+ export interface StrokeRow {
26
+ readonly tool: string | null;
27
+ readonly ink: string | null;
28
+ readonly tip: string | null;
29
+ readonly erase: boolean | null;
30
+ readonly points: string | null;
31
+ readonly speed: number | null;
32
+ readonly times?: string | null;
33
+ /** The notebook page it is on (D3t-b — v3): 2i + 1 a sheet's recto, 2i + 2 its verso; 0 (or absent, a v2 reader's) = none. */
34
+ readonly page?: number | null;
35
+ /** Its fibre seed (D7 #13 — v4): the one the live pen laid with; −1 (or absent, a v3 reader's) = the seed its position gives it. */
36
+ readonly seed?: number | null;
37
+ }
38
+ /** The durable id a stroke entity carries (`PrefabId`) — a data child, never a widget. */
39
+ export declare const STROKE_TYPE = "desk.stroke";
40
+ /**
41
+ * A stroke's durable prefab: its one cell and its `ChildOf` edge to the board (or the book) it is on. Version 2 (D3t-a) added
42
+ * `times`; a v1 stroke migrates to an empty one — it keeps its `speed` (the replay spaces it as before). Version 3 (D3t-b) added
43
+ * `page`; a v2 stroke — a board's — migrates to page 0. The Board and the Notebook declare it as their `data`, so the engine's
44
+ * catalog stamps, gates and migrates it with them.
45
+ */
46
+ export declare const StrokePrefab: import("../../../core/src/index").Prefab;
47
+ /** A row's fibre seed: its own (v4, the pen's) — or, for a row from before or without one, the `n`-th op's positional seed. */
48
+ export declare const seedOfRow: (s: Pick<StrokeRow, "seed">, n: number) => number;
49
+ /**
50
+ * A stroke as an author states one: the path in melamine units (a notebook's: page units, on its `page`) and its pace — each
51
+ * sample's time (ms from the first), or one speed; a wipe has no path.
52
+ */
53
+ export interface StrokeSpec {
54
+ readonly tool?: "marker" | "wipe" | "pen";
55
+ readonly ink?: string;
56
+ readonly tip?: string;
57
+ readonly erase?: boolean;
58
+ readonly points?: readonly (readonly [number, number])[];
59
+ readonly times?: readonly number[];
60
+ readonly speed?: number;
61
+ /** The notebook page (D3t-b): 2i + 1 sheet i's recto, 2i + 2 its verso; absent = 0, a board's. */
62
+ readonly page?: number;
63
+ /** The fibre seed the pen laid with (D7 #13): stored, so the replay lays the same stamps whatever lands before it; absent = the position's. */
64
+ readonly seed?: number;
65
+ }
66
+ /** A path as the cell stores it: base64 (no padding) of LE f32 (x, y) pairs. */
67
+ export declare function encodePoints(points: readonly (readonly [number, number])[]): string;
68
+ /** A cell's path back: whole points only (a tolerant reader — anything unreadable ends the path). */
69
+ export declare function decodePoints(s: string): Array<readonly [number, number]>;
70
+ /** The samples' times as the cell stores them (D3t-a): base64 (no padding) of LE f32 milliseconds from the first sample. */
71
+ export declare function encodeTimes(times: readonly number[]): string;
72
+ /** A cell's times back (a tolerant reader: "" — an old stroke — is none). */
73
+ export declare function decodeTimes(s: string): number[];
74
+ /** A path's mean pace, world units/s — what a v2 stroke leaves in `speed` for a reader that knows no `times`; the default for a dot. */
75
+ export declare function meanSpeed(points: readonly (readonly [number, number])[], times: readonly number[]): number;
76
+ /** The row a spec is — defaults as the prefab has them; timed, its `speed` is the path's mean pace unless the spec names one. */
77
+ export declare function strokeRow(s: StrokeSpec): {
78
+ tool: string;
79
+ ink: string;
80
+ tip: string;
81
+ erase: boolean;
82
+ points: string;
83
+ speed: number;
84
+ times: string;
85
+ page: number;
86
+ seed: number;
87
+ };
88
+ /** Lay a stroke on a board (or a book's page) — one entity, the object's newest child — inside the caller's transaction (one stroke, one undo step). */
89
+ export declare function addStroke(tx: GuardedTx, board: Entity, s: StrokeSpec): Entity;
90
+ /** The fibre seed of the `n`-th op a replay walks — the bench's `97.13 ×` the ops before it; the live pen seeds its stroke with the next. */
91
+ export declare const strokeSeed: (n: number) => number;
92
+ /** A stroke is in hand (a local pointer's press is a tool's): a history waits for it to land (BOARD.md §5 — the bench's `!this.open?.stroke`). */
93
+ export declare function inking(world: World): boolean;
@@ -0,0 +1,142 @@
1
+ export interface HandMetrics {
2
+ /** em above the baseline, em below — the face's own box. */
3
+ readonly ascent: number;
4
+ readonly descent: number;
5
+ /** A glyph's advance, em. */
6
+ advance(ch: string): number;
7
+ /** Optional pair kerning, em (negative tightens). */
8
+ kern?(a: string, b: string): number;
9
+ }
10
+ /** The hand's law (theme.ts `HAND`): the size in world units, and how far each glyph may stray. */
11
+ export interface HandLaw {
12
+ /** The pen's size, world units (CSS px at zoom 1). */
13
+ readonly size: number;
14
+ /** Line pitch, × size. */
15
+ readonly lineHeight: number;
16
+ /** The margin the writing keeps from the paper's edge, world units. */
17
+ readonly pad: number;
18
+ readonly jitter: {
19
+ /** Each glyph's tilt, ± radians. */
20
+ readonly rot: number;
21
+ /** Each glyph's rise off the baseline, ± em. */
22
+ readonly rise: number;
23
+ /** Each glyph's size, ± fraction. */
24
+ readonly scale: number;
25
+ /** The pen's pressure — the ink's presence — between these. */
26
+ readonly press: readonly [number, number];
27
+ };
28
+ readonly wander: {
29
+ /** The line's slow drift, ± em. */
30
+ readonly amp: number;
31
+ /** …over this many em along the line. */
32
+ readonly period: number;
33
+ };
34
+ }
35
+ export interface HandGlyph {
36
+ readonly ch: string;
37
+ /** Its index in the text. */
38
+ readonly index: number;
39
+ /** The glyph's origin on its baseline, note units from the paper's top-left. */
40
+ readonly x: number;
41
+ readonly y: number;
42
+ /** The advance it takes, note units. */
43
+ readonly advance: number;
44
+ readonly rot: number;
45
+ readonly scale: number;
46
+ readonly press: number;
47
+ readonly line: number;
48
+ }
49
+ export interface HandLine {
50
+ /** Text indices [start, end). */
51
+ readonly start: number;
52
+ readonly end: number;
53
+ /** The baseline, note units. */
54
+ readonly y: number;
55
+ readonly width: number;
56
+ }
57
+ export interface HandLayout {
58
+ readonly glyphs: readonly HandGlyph[];
59
+ readonly lines: readonly HandLine[];
60
+ /** The caret's place BEFORE each index (and after the last): x, baseline y — `2 × (text.length + 1)`. */
61
+ readonly positions: Float32Array;
62
+ /** The writing ran past the bottom margin. */
63
+ readonly overflow: boolean;
64
+ /** The em, and the caret's height above and below the baseline. */
65
+ readonly em: number;
66
+ readonly ascent: number;
67
+ readonly descent: number;
68
+ }
69
+ /**
70
+ * Four floats in [0, 1) from a glyph's seed and its character — a 32-bit mix
71
+ * (Wang's hash twice, xorshift between) that changes wholly for a change of
72
+ * one bit in either. Deterministic across hosts: only integer arithmetic.
73
+ */
74
+ export declare function hashHand(seed: number, code: number): readonly [number, number, number, number];
75
+ /** A glyph's seed when the host carries none: the note's seed and the glyph's place. */
76
+ export declare const glyphSeed: (noteSeed: number, index: number) => number;
77
+ /**
78
+ * Lay `text` into a `box` (note units) under `law` with the face's `metrics`.
79
+ * `seeds[i]` is glyph i's own seed (the host's, carried through edits) — absent,
80
+ * it is derived from `noteSeed` and the index.
81
+ */
82
+ export declare function layoutText(text: string, box: {
83
+ readonly w: number;
84
+ readonly h: number;
85
+ }, law: HandLaw, metrics: HandMetrics, noteSeed?: number, seeds?: ArrayLike<number>): HandLayout;
86
+ /** The caret before `index`: its left edge on the baseline, and its extent above and below. */
87
+ export declare function caretAt(L: HandLayout, index: number): {
88
+ readonly x: number;
89
+ readonly y: number;
90
+ readonly above: number;
91
+ readonly below: number;
92
+ };
93
+ /** The box a glyph's ink can reach (its advance wide, the face's box tall, grown by the hand's jitter), note units — what the wipe reveals. */
94
+ export declare function glyphBox(L: HandLayout, g: HandGlyph): {
95
+ readonly x0: number;
96
+ readonly y0: number;
97
+ readonly x1: number;
98
+ readonly y1: number;
99
+ };
100
+ /**
101
+ * The hand's seeds carried through an edit: the common prefix and suffix of
102
+ * the old and new text keep their seeds, the inserted run gets fresh ones from
103
+ * `fresh()`. Returns the new seeds and the inserted range [from, to).
104
+ */
105
+ export declare function carrySeeds(oldText: string, oldSeeds: ArrayLike<number>, newText: string, fresh: () => number): {
106
+ seeds: number[];
107
+ from: number;
108
+ to: number;
109
+ };
110
+ /**
111
+ * The HAND — how the pen writes on the paper (STICKY.md §3; `paper/text.ts`). The face is
112
+ * the host's (the lab's Caveat, an OFL hand); its size is in world units; the jitter is
113
+ * each glyph's own — a tilt, a rise, a size, a pressure — and the line wanders slowly.
114
+ * The wipe is how a typed glyph arrives: revealed left to right in `wipeMs`, the pen's stroke.
115
+ */
116
+ export declare const HAND: {
117
+ readonly size: 24;
118
+ readonly lineHeight: 1.16;
119
+ readonly pad: 16;
120
+ readonly jitter: {
121
+ readonly rot: 0.028;
122
+ readonly rise: 0.03;
123
+ readonly scale: 0.05;
124
+ readonly press: readonly [number, number];
125
+ };
126
+ readonly wander: {
127
+ readonly amp: 0.022;
128
+ readonly period: 9;
129
+ };
130
+ readonly wipeMs: 110;
131
+ };
132
+ /** The pens a hand writes with (STICKY.md §3) — names; the inks are the host's (the note's, and the desk calendar's lines). */
133
+ export declare const PENS: readonly ["felt", "ball", "fountain", "red"];
134
+ export type PenName = (typeof PENS)[number];
135
+ /** A face: its family and weight, and the file it loads from (absent = the platform's own). */
136
+ export interface FaceSpec {
137
+ readonly family: string;
138
+ readonly weight: number;
139
+ readonly url?: string;
140
+ }
141
+ /** The hand's faces by name (STICKY.md §3) — the families and weights; the app supplies the files (desk/host/ink.ts `penFaces`). */
142
+ export declare const PEN_FACES: Readonly<Record<string, Omit<FaceSpec, "url">>>;
@@ -0,0 +1,8 @@
1
+ import type { StructBuffer } from "../engine/struct";
2
+ /** What a pass keeps beside a buffer it writes change-only: the bytes the GPU holds (sized to the buffer). */
3
+ export declare const sentBytes: (size: number) => Uint8Array;
4
+ /**
5
+ * Write `block` (its first `elements`, or all) into `buffer` at 0 only when its bytes differ from `sent` — which then holds
6
+ * them. Returns whether it wrote.
7
+ */
8
+ export declare function writeChanged(queue: GPUQueue, buffer: GPUBuffer, block: StructBuffer<string>, sent: Uint8Array, elements?: number): boolean;
@@ -0,0 +1,39 @@
1
+ import type { GlyphAtlasMeta } from "../mat/layout";
2
+ export { type Box, type FadeIn, type Lod, lod, type View } from "../lattice/lod";
3
+ export { type LineLaw, type LineWeight, lineWeight } from "../lattice/line";
4
+ export type { RulerLaw } from "../lattice/ruler";
5
+ export { DEFAULT_GRID, dressScale, type GridConfig } from "../mat/grid";
6
+ export { type GlyphAtlasMeta, GLYPHS, litByOwn, type MatConfig, type MatFrame, MatUniforms, type PlateName, type RulerConfig, type SlotLight } from "../mat/layout";
7
+ export type { Mat4 } from "../mat/projector";
8
+ /** The silhouette a kind's marks go around (`ObjectKind.frame`) — the marks' own type (marks/layout.ts). */
9
+ export type { MarkFrame } from "../marks/layout";
10
+ /**
11
+ * A SLOT'S MAT as a kind's pass reads it: what the slot lends every kind drawn in it — the mat's animated silhouette (the
12
+ * lamp's gobo through the wind, this slot's own), the blue noise, the rulers' glyph atlas and its metrics, and the version
13
+ * of those assets (a pass rebinds when it turns over). `KindProgram.create` makes a kind's root pass on the root's; every
14
+ * other slot's pass is `spawn`ed onto that slot's. The ground's `CuttingMat` is the one there is; a kind never makes one.
15
+ */
16
+ export interface MatPass {
17
+ /**
18
+ * The slot's ONE VIEW BLOCK (design-016 K-L3): a `MatUniforms` buffer the slot writes once a frame — the camera and box, the
19
+ * clocks, the lamp's gobo, the night, the portal chain, the objects' presence (`view.w`; the mat's own is `presence.x`) — which every kind pass binds at
20
+ * `@group(0) @binding(0)` as `u` (`kitWgsl`'s `view` piece). A kind never writes it and never keeps a copy.
21
+ */
22
+ readonly view: GPUBuffer;
23
+ /** The slot's animated gobo silhouette (r8, PLATE_SIZE²) — what an object's shadow and dapple sample. */
24
+ readonly silhouette: GPUTextureView;
25
+ /** The blue-noise tile (NOISE_SIZE², shared by every slot). */
26
+ readonly noiseTexture: GPUTexture;
27
+ /** The rulers' glyph atlas (a 1×1 empty cell until a host uploads one) and its metrics. */
28
+ readonly glyphTexture: GPUTexture;
29
+ readonly glyphs: GlyphAtlasMeta;
30
+ /** Turns over whenever a plate, the noise or the glyphs land: a pass holding a bind group over them rebinds. */
31
+ readonly assetVersion: number;
32
+ /**
33
+ * The view block's bytes as the slot last uploaded them, and the key of what the silhouette holds (K7a): a layered kind whose
34
+ * layer was drawn from the same bytes and key, with nothing of its own moved, lays it again without drawing it. Absent (a host's
35
+ * own mat): the layer is always drawn.
36
+ */
37
+ readonly viewBytes?: Uint8Array;
38
+ readonly silhouetteKey?: number;
39
+ }
@@ -0,0 +1,15 @@
1
+ import type { ComposeOptions } from "../engine/shader";
2
+ import { type ShaderText } from "../shaders";
3
+ export { type ShaderText, shaderText } from "../shaders";
4
+ /** The kit's pieces of WGSL (below, in compose order). */
5
+ export type KitWgslPiece = "view" | "portal" | "sdf" | "light" | "ruler" | "book";
6
+ /** A name of the kit's WGSL: a piece, or another name for one (`lamp`, `gobo`, `night` and `noise` are `light`). */
7
+ export type KitWgslName = KitWgslPiece | "lamp" | "gobo" | "night" | "noise";
8
+ /** The .wgsl file behind each of the kit's module pieces — what a host's `ShaderText` is asked for. */
9
+ export declare const KIT_WGSL_FILES: Readonly<Partial<Record<KitWgslPiece, string>>>;
10
+ /**
11
+ * A kind's program with the kit's named pieces before its own: the kit's structs, then its modules (each labelled by its
12
+ * file, as a kind's own map labelled it), in the kit's order; then the kind's `own` structs, modules and entry. `text` is
13
+ * the host's (default: the generated module). An unknown name throws — a misspelt piece never composes silently.
14
+ */
15
+ export declare function kitWgsl(names: readonly KitWgslName[], own: ComposeOptions, text?: ShaderText): ComposeOptions;
@@ -0,0 +1,15 @@
1
+ import { type FadeIn } from "./lod";
2
+ export interface LineLaw {
3
+ /** Half-widths at the window's top and a decade above it, DEVICE px (the reference's hairlines). */
4
+ readonly thin: number;
5
+ readonly thick: number;
6
+ /** Coverage alphas at the same two points. */
7
+ readonly alphaThin: number;
8
+ readonly alphaThick: number;
9
+ }
10
+ export interface LineWeight {
11
+ readonly halfWidth: number;
12
+ readonly alpha: number;
13
+ }
14
+ /** mat.wgsl `line_weight`, for a rung whose on-screen cell is `cellPx` (CSS px). */
15
+ export declare function lineWeight(cellPx: number, fadeIn: FadeIn, law: LineLaw): LineWeight;
@@ -0,0 +1,52 @@
1
+ export declare const BASE_SPACING = 20;
2
+ export declare const LOD_TARGET = 20;
3
+ export declare const ZOOM_MIN = 1e-8;
4
+ export declare const ZOOM_MAX = 100000000;
5
+ export interface View {
6
+ readonly camX: number;
7
+ readonly camY: number;
8
+ readonly zoom: number;
9
+ /** CSS px — the attachment. */
10
+ readonly width: number;
11
+ readonly height: number;
12
+ /**
13
+ * The slot's BOX on the attachment, CSS px (PORTAL.md §2.3): what is
14
+ * culled — a mini mat's face for a nested slot.
15
+ * Absent = the whole attachment. Positions never change with it: a site
16
+ * lands where it lands under the camera; the box only decides which sites
17
+ * exist. A root slot's box is the attachment and every number is what it
18
+ * always was.
19
+ */
20
+ readonly box?: Box;
21
+ }
22
+ export interface Box {
23
+ readonly x: number;
24
+ readonly y: number;
25
+ readonly w: number;
26
+ readonly h: number;
27
+ }
28
+ /** The effective box: the view's own, or the attachment. */
29
+ export declare const boxOf: (v: View) => Box;
30
+ /** The `box` record the uniform blocks carry: x, y, w, h. */
31
+ export declare const boxValues: (v: View) => number[];
32
+ export interface Lod {
33
+ readonly k0: number;
34
+ readonly fade: number;
35
+ readonly fine: number;
36
+ readonly mid: number;
37
+ readonly coarse: number;
38
+ readonly wrapPeriod: number;
39
+ }
40
+ export declare const wrap: (v: number, p: number) => number;
41
+ /**
42
+ * How a rung presents itself: ONE size for every rung, and a rung's alpha is
43
+ * `smoothstep(fadeIn, cellPx)` of its OWN cell — so a decade wrap (the fine rung
44
+ * becoming the mid rung at the same cell) is continuous by construction, and
45
+ * nothing is drawn below `fadeIn[0]` px of pitch: the product's classic-grid law
46
+ * (`worldGrid.fadeIn`). The prototype's size LADDER (fine 0.55× · mid 0.85→1.25×
47
+ * · coarse 1.55×, the fine rung's alpha the decade fade — every tenth site bigger,
48
+ * a size pop at every wrap) was retired on 2026-09-04; nothing of it remains.
49
+ */
50
+ export type FadeIn = readonly [number, number];
51
+ export declare const smoothstep: (a: number, b: number, x: number) => number;
52
+ export declare function lod(v: View): Lod;