@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,73 @@
1
+ import type { RGB } from "../../../desk/src/index";
2
+ import type { UvRect } from "./pages";
3
+ import type { PaperGeometry } from "./paper";
4
+ /** The most lines of a note's writing its far LOD greeks (K7b) — a mini mat's chip greeks as many (minimat.ts `CHIP_LINES`). */
5
+ export declare const GREEK_LINES = 6;
6
+ export declare const Paper: import("../../../desk/src/engine/index").StructDef<"layer" | "shadow" | "paper" | "ring" | "lamp" | "ink" | "centre" | "half" | "wipe" | "marks" | "lift" | "alpha" | "caret" | "slope" | "radius" | "rot" | "curl" | "cornerCurl" | "glue" | "uv" | "greek" | "glines">;
7
+ export declare const PaperUniforms: import("../../../desk/src/engine/index").StructDef<"select" | "knobs" | "far">;
8
+ export declare const MAX_PAPERS = 1024;
9
+ /** One note for the pass: its geometry, its two colours, its ink and its live marks. */
10
+ export interface PaperInstance {
11
+ readonly geometry: PaperGeometry;
12
+ /** The sheet's colour — the product's note surface (§2.2), or the host's. */
13
+ readonly paper: RGB;
14
+ /** The pen's colour and how dark it lays (1 = the colour itself where the raster is full). */
15
+ readonly ink: RGB;
16
+ readonly inkDensity?: number;
17
+ /** The fibre's amplitude, ±/255 — theme.ts `PAPER.grain` unless the host says. */
18
+ readonly grain?: number;
19
+ /** Where the ink lives (pages.ts): absent = a blank sheet. */
20
+ readonly raster?: {
21
+ readonly layer: number;
22
+ readonly uv: UvRect;
23
+ } | undefined;
24
+ /** The newest glyph's box and how far the pen has got through it. */
25
+ readonly wipe?: {
26
+ readonly x0: number;
27
+ readonly y0: number;
28
+ readonly x1: number;
29
+ readonly y1: number;
30
+ readonly t: number;
31
+ } | undefined;
32
+ /** The caret, when the note is being written. */
33
+ readonly caret?: {
34
+ readonly x: number;
35
+ readonly y: number;
36
+ readonly above: number;
37
+ readonly below: number;
38
+ readonly on: boolean;
39
+ } | undefined;
40
+ /** K7b — its writing GREEKED (the far LOD): the text's left edge and em, each line's baseline and width (note units); absent = unwritten. */
41
+ readonly greek?: {
42
+ readonly x0: number;
43
+ readonly em: number;
44
+ readonly lines: readonly {
45
+ readonly y: number;
46
+ readonly width: number;
47
+ }[];
48
+ } | undefined;
49
+ }
50
+ export declare function paperValues(p: PaperInstance, grain: number): {
51
+ centre: readonly [number, number];
52
+ half: readonly [number, number];
53
+ rot: number[];
54
+ slope: readonly [number, number];
55
+ lift: number;
56
+ curl: number;
57
+ cornerCurl: number;
58
+ glue: number;
59
+ radius: number;
60
+ ring: number;
61
+ alpha: number;
62
+ layer: number;
63
+ lamp: number[];
64
+ paper: number[];
65
+ ink: number[];
66
+ shadow: number[];
67
+ uv: number[];
68
+ wipe: number[];
69
+ caret: number[];
70
+ marks: number[];
71
+ greek: number[];
72
+ glines: number[];
73
+ };
@@ -0,0 +1,31 @@
1
+ import { type Component, type Entity } from "../../../core/src/index";
2
+ import { type KindDriver } from "../../../desk/src/index";
3
+ import type { Writing } from "./writing";
4
+ import { type NoteTyping } from "./typing";
5
+ import { type NoteBody } from "./host/body";
6
+ export { PENS, type PenName } from "../../../desk/src/kit/index";
7
+ /** The papers a note is cut from — names; the sheets are the host's (the product's `--vf-note-surface` is `yellow`). */
8
+ export declare const PAPERS: readonly ["yellow"];
9
+ export type PaperName = (typeof PAPERS)[number];
10
+ /** The note's durable type id — what `PrefabId` carries (a mini mat accepts it by what it provides — K8a, `CONTAINABLE`). */
11
+ export declare const NOTE_TYPE = "desk.note";
12
+ export declare const Note: import("../../../core/src/index").WidgetType;
13
+ /** The note's writing as a cell (`desk.note:ink` — `{ text, seeds }`): what a typing session live-writes and commits whole. */
14
+ export declare const NOTE_INK: Component<{
15
+ text: string;
16
+ seeds: string;
17
+ }>;
18
+ /** The note's other props (`desk.note:props` — `{ pen, paper, seed }`). */
19
+ export declare const NOTE_PROPS: Component<{
20
+ pen: string;
21
+ paper: string;
22
+ seed: number;
23
+ }>;
24
+ /** The note's driver (`driversOf(Note)`): its typing session, its writing local and its membership — what its body asks of it. */
25
+ export interface PaperDriver extends KindDriver {
26
+ readonly typing: NoteTyping;
27
+ readonly writing: () => Writing | undefined;
28
+ readonly isNote: (e: Entity) => boolean;
29
+ /** Its BODY (K8a — the note's text part, host/body.ts), once the host has made it: the doors that put the editor on a note. */
30
+ body: NoteBody | undefined;
31
+ }
@@ -0,0 +1,43 @@
1
+ export interface InkRect {
2
+ readonly layer: number;
3
+ readonly x: number;
4
+ readonly y: number;
5
+ readonly w: number;
6
+ readonly h: number;
7
+ }
8
+ /** A WRITTEN rect inside a layer, normalised — the record's `u0 v0 u1 v1` (design-013 §5's; the card's content term had it first). */
9
+ export interface UvRect {
10
+ readonly u0: number;
11
+ readonly v0: number;
12
+ readonly u1: number;
13
+ readonly v1: number;
14
+ }
15
+ /** A written rect in texels as the record's normalised uv. */
16
+ export declare function uvOf(x: number, y: number, w: number, h: number, texW: number, texH: number): UvRect;
17
+ export declare class InkShelves {
18
+ readonly size: number;
19
+ readonly layers: number;
20
+ private readonly stack;
21
+ constructor(size?: number, layers?: number);
22
+ /** A rect for a `w × h` raster, or null when no layer has room (the note then draws its paper alone). */
23
+ alloc(w0: number, h0: number): InkRect | null;
24
+ /** In layer `l`, the first run of adjacent rows that hold nothing and are `h` tall together: one row of `h` holding the rect, the rest one empty row. */
25
+ private recarve;
26
+ /** Give a rect back; adjacent free spans merge. A rect not from `alloc` is ignored. */
27
+ free(r: InkRect): void;
28
+ reset(): void;
29
+ /**
30
+ * Give back every layer's TRAILING rows that hold nothing (D2c): a row keeps its height for life, so a
31
+ * zoom through the band ladder would otherwise leave each layer carved into rows of every rung, and a
32
+ * raster of a new height would find no room though the texels are free. A trimmed layer's cursor
33
+ * retreats; a layer emptied entirely is carved afresh. Rows before a used one stay — the rects in
34
+ * them are the notes' own. Returns the rows given back.
35
+ */
36
+ trim(): number;
37
+ /** Texels in use, rows opened, layers touched — the churn instrument. */
38
+ get stats(): {
39
+ readonly used: number;
40
+ readonly rows: number;
41
+ readonly layersUsed: number;
42
+ };
43
+ }
@@ -0,0 +1,86 @@
1
+ import { type GroundTheme, type RGB } from "../../../desk/src/index";
2
+ import { type FadeIn, type View, type MatConfig, type MatFrame, type SlotLight, type MatPass, type Presentation, type MatLight } from "../../../desk/src/kit/index";
3
+ import { type PaperInstance } from "./layout";
4
+ import { InkShelves, type InkRect, type UvRect } from "./pages";
5
+ import { type PaperLaw } from "./paper";
6
+ import type { PaperShaders } from "./shaders";
7
+ /** The ink pages: this many texels a side, this many layers — 4 MB a layer as r8, 16 MB in all. */
8
+ export declare const INK_PAGE = 2048;
9
+ export declare const INK_LAYERS = 4;
10
+ export declare class PaperPass {
11
+ readonly name = "paper/notes";
12
+ private readonly knobs;
13
+ /** The notes' PERSISTENT records (engine/records.ts, design-015 §4.3; D6): a slot per note while it is drawn, written when it changed. */
14
+ private readonly store;
15
+ /** The records the last prepare turned away at the pass's cap — not drawn; the ground reports them (`GroundStats.dropped`, D7). */
16
+ dropped: number;
17
+ private readonly knobBuf;
18
+ /** What the GPU holds of the knobs: they are written only when they change (K4a — a standing value costs a frame nothing). */
19
+ private readonly knobsSent;
20
+ private group;
21
+ private boundAssets;
22
+ private boundStore;
23
+ private count;
24
+ /** This frame's slot is lit from elsewhere: it draws with the second pipeline. */
25
+ private litElsewhere;
26
+ private lawNow;
27
+ /** The paper's numbers (theme.ts `PAPER`) — the caret's and the ring's widths, the fibre. A host tweaks the root's; every slot copies it. A new law repacks every record (the fibre is packed). */
28
+ get law(): PaperLaw;
29
+ set law(next: PaperLaw);
30
+ /** The day's chain on the paper: false = a lit sheet shows its configured byte; true = the mat's own double gamma (the golden note). */
31
+ chain: boolean;
32
+ /** The wipe's softness — how wide the pen's edge is as a glyph arrives, note units. */
33
+ wipeSoft: number;
34
+ private readonly device;
35
+ private readonly shared;
36
+ private readonly mat;
37
+ private constructor();
38
+ /** The root's pass, on the root's mat. */
39
+ static create(device: GPUDevice, format: GPUTextureFormat, src: PaperShaders, mat: MatPass): Promise<PaperPass>;
40
+ /** A second slot on the same pipeline and pages, reading ITS mat's silhouette — a portal's inside, a flight's departed frame. */
41
+ spawn(mat: MatPass): PaperPass;
42
+ /** Copy the root's tuning — what every slot takes each frame. */
43
+ tune(from: PaperPass): void;
44
+ /** The ink pages' carving — shared by every slot: a raster's place is the same on both hosts when the notes come in the same order. */
45
+ get shelves(): InkShelves;
46
+ /** Room for a `w × h` raster, or null when the pages are full (the note then draws its paper alone). */
47
+ alloc(w: number, h: number): InkRect | null;
48
+ free(r: InkRect): void;
49
+ /** Give back the layers' trailing empty rows (pages.ts `trim`) — the writing's own housekeeping after a free (D2c). */
50
+ trim(): number;
51
+ /**
52
+ * Every raster forgotten — a scene reload. The texels stay until overwritten — and a raster's
53
+ * edge, sampled bilinearly, reads one texel beyond its rect, so a host that wants the pages as a
54
+ * fresh device has them (a parity scene: the Node oracle's pages start blank) passes `clear`.
55
+ */
56
+ reset(clear?: boolean): void;
57
+ /** Write r8 coverage rows (row 0 = top) into a rect `alloc` gave; returns the rect's uv for the record. */
58
+ write(r: InkRect, bytes: Uint8Array<ArrayBuffer>): UvRect;
59
+ private rebind;
60
+ /**
61
+ * This frame's notes in paint order — through the persistent store (D6): a note keyed by `keys[i]` keeps its slot and is
62
+ * written only when its record changed; no keys = every record packed afresh (the oracle's form) — and the mat's block for
63
+ * this slot's camera, its light (`light` the Sun or the Moon, `lit` the lamp it is seen by — MINIMAT.md §4): the dapple,
64
+ * the lamp's shading and the shadow. Returns the count that will draw.
65
+ */
66
+ prepare(view: View & {
67
+ readonly dpr: number;
68
+ }, fadeIn: FadeIn, cfg: MatConfig, frame: MatFrame | undefined, instances: readonly PaperInstance[], present: Presentation | undefined, light?: MatLight, select?: RGB, lit?: SlotLight, keys?: readonly number[]): number;
69
+ /** The store's counters (a rig's witness): records written, bytes, draw-list writes, slots in use. */
70
+ get records(): import("../../../desk/src/index").RecordStoreStats;
71
+ /** K7b: this slot's resources for the note's card material (shaders.ts `paperCard`), in its bindings' order — made again when the store grew. */
72
+ cardResources(): {
73
+ readonly version: number;
74
+ readonly resources: readonly (GPUBuffer | GPUTextureView | GPUSampler)[];
75
+ };
76
+ private card;
77
+ /** K7b: every note of the last prepare is the card's to draw — its slot in the store. */
78
+ cardSlot(index: number): number;
79
+ get drawn(): number;
80
+ draw(pass: GPURenderPassEncoder): void;
81
+ drawRange(pass: GPURenderPassEncoder, first: number, end: number): void;
82
+ /** This slot's buffers; the pages go with the last slot standing. */
83
+ dispose(): void;
84
+ }
85
+ /** A theme's select for the ring — the one colour the pass takes from the theme. */
86
+ export declare const selectOf: (theme: GroundTheme) => RGB;
@@ -0,0 +1,117 @@
1
+ import { type Lamp } from "../../../desk/src/kit/index";
2
+ /** The paper's numbers (theme.ts `PAPER`) — the engine's unless a host tweaks them. */
3
+ export interface PaperLaw {
4
+ readonly size: number;
5
+ readonly radius: number;
6
+ readonly tilt: number;
7
+ readonly glue: number;
8
+ readonly curl: number;
9
+ readonly cornerCurl: number;
10
+ readonly relief: number;
11
+ readonly lift: {
12
+ readonly height: number;
13
+ readonly scale: number;
14
+ };
15
+ readonly shadow: {
16
+ readonly sigma: number;
17
+ readonly alpha: number;
18
+ readonly sigmaPerUnit: number;
19
+ readonly alphaHeld: number;
20
+ readonly slopeMax: number;
21
+ };
22
+ readonly grain: number;
23
+ readonly ring: number;
24
+ readonly caret: {
25
+ readonly width: number;
26
+ readonly blinkMs: number;
27
+ };
28
+ readonly far: {
29
+ readonly px: readonly [number, number];
30
+ readonly weight: number;
31
+ readonly alpha: number;
32
+ };
33
+ }
34
+ export declare const DEFAULT_PAPER_LAW: PaperLaw;
35
+ export { type Lamp, lampOf } from "../../../desk/src/kit/index";
36
+ /** A note's tilt from its seed: within ± `maxDeg`, radians — never square, never the same twice. */
37
+ export declare const tiltOf: (seed: number, maxDeg: number) => number;
38
+ export interface PaperRect {
39
+ /** World centre. */
40
+ readonly cx: number;
41
+ readonly cy: number;
42
+ /** The sheet, world units. */
43
+ readonly w: number;
44
+ readonly h: number;
45
+ /** Radians; positive turns clockwise on screen. */
46
+ readonly angle: number;
47
+ }
48
+ /** What moves: the hold's lift (0..1), the selection ring's presence (0..1), the presence itself (1 … 0 gone). */
49
+ export interface PaperMotion {
50
+ readonly held: number;
51
+ readonly ring: number;
52
+ readonly fade: number;
53
+ }
54
+ export declare const PAPER_REST: PaperMotion;
55
+ export interface PaperGeometry {
56
+ readonly centre: readonly [number, number];
57
+ /** Half extents as drawn (the hold's scale applied). */
58
+ readonly half: readonly [number, number];
59
+ readonly cos: number;
60
+ readonly sin: number;
61
+ readonly angle: number;
62
+ /** World units off the mat: the hold's rise; the free edge's curl over it; the corners' extra; the flat strip's share. */
63
+ readonly lift: number;
64
+ readonly curl: number;
65
+ readonly cornerCurl: number;
66
+ readonly glue: number;
67
+ /** The slope's exaggeration for the shading. */
68
+ readonly relief: number;
69
+ readonly radius: number;
70
+ readonly shadow: {
71
+ readonly sigma: number;
72
+ readonly alpha: number;
73
+ readonly sigmaPerUnit: number;
74
+ };
75
+ /** The shadow's ground offset per unit of height, world axes — away from the lamp, capped. */
76
+ readonly slope: readonly [number, number];
77
+ /** The unit direction to the lamp, world axes (x right, y down the screen, z off the desk). */
78
+ readonly lamp: readonly [number, number, number];
79
+ readonly ring: number;
80
+ readonly alpha: number;
81
+ readonly scale: number;
82
+ }
83
+ export declare function resolvePaper(n: PaperRect, m: PaperMotion, law: PaperLaw, lamp: Lamp): PaperGeometry;
84
+ /** World → the sheet's own frame (paper.wgsl `paper_local`). */
85
+ export declare function localOf(G: PaperGeometry, wx: number, wy: number): readonly [number, number];
86
+ /** The sheet's own frame → world. */
87
+ export declare function worldOf(G: PaperGeometry, qx: number, qy: number): readonly [number, number];
88
+ /** The sheet's signed distance at a world point. */
89
+ export declare function sdPaper(G: PaperGeometry, wx: number, wy: number): number;
90
+ export type PaperHit = "paper" | "outside";
91
+ export declare const pickPaper: (G: PaperGeometry, wx: number, wy: number) => PaperHit;
92
+ /**
93
+ * The sheet's height off the mat at a local point (paper.wgsl `paper_height`):
94
+ * the hold's rise everywhere; flat under the strip; from the strip's lower edge
95
+ * to the free edge the curl rises as t², the corners by `cornerCurl` more.
96
+ */
97
+ export declare function heightAt(G: PaperGeometry, qx: number, qy: number): number;
98
+ /** How far the shadow can reach past the sheet, world units — the vertex quad's pad. */
99
+ export declare function shadowReach(G: PaperGeometry): number;
100
+ /** The sheet's axis-aligned bounds in world units, grown by `pad`. */
101
+ export declare function boundsOf(G: PaperGeometry, pad?: number): {
102
+ readonly x: number;
103
+ readonly y: number;
104
+ readonly w: number;
105
+ readonly h: number;
106
+ };
107
+ /** Texels per world unit a note's ink is drawn with: the bands are powers of two between these. */
108
+ export declare const BAND_MIN = 0.25;
109
+ export declare const BAND_MAX = 8;
110
+ /**
111
+ * The band for a zoom: the smallest power of two at or above the screen's own
112
+ * density (`zoom × dpr`), so the ink is never magnified — and, given the band
113
+ * in use, that band stays while it is still at or above the density and under
114
+ * 2.3× it (a hysteresis that crosses no band on a frame's wobble). `cap` is the
115
+ * most the note's raster may take (the page's side over the note's).
116
+ */
117
+ export declare function rasterBand(zoom: number, dpr: number, current?: number, cap?: number): number;
@@ -0,0 +1,18 @@
1
+ import type { CardMaterial } from "../../../desk/src/index";
2
+ import type { ComposeOptions } from "../../../desk/src/engine/index";
3
+ import { type ShaderText } from "../../../desk/src/kit/index";
4
+ /** The note's own shader files (the kit's pieces come by name). */
5
+ export declare const PAPER_SHADER_FILES: {
6
+ readonly paper: "paper/paper.wgsl";
7
+ readonly paperCard: "paper/paper-card.wgsl";
8
+ readonly paperPass: "paper/paper-pass.wgsl";
9
+ };
10
+ /** The paper pass's program: the kit's view · portal · sdf · light, then the note's records, module, its quad and fragment, and its entry. */
11
+ export type PaperShaders = ComposeOptions;
12
+ export declare function paperShaders(text: ShaderText): PaperShaders;
13
+ /**
14
+ * The note's CARD MATERIAL (K7b, design-016 §6 K7): the flat-card pipeline draws a note with paper-card.wgsl's quad and fragment
15
+ * over the paper pass's own records, knobs, samplers and ink pages (`PaperPass.cardResources`, in this order) — every note, so
16
+ * interleaved with the prints and the boards it is one run.
17
+ */
18
+ export declare function paperCard(text: ShaderText): CardMaterial;
@@ -0,0 +1,58 @@
1
+ /**
2
+ * PAPER — the desk's first object (STICKY.md): a sticky note as a MATERIAL under the
3
+ * mat's one light. A square of thin paper pressed flat under its adhesive strip and
4
+ * free below it, where it rises a little off the mat and its corners rise most; stuck
5
+ * a degree or two off square, as a hand leaves it; lit by the lamp that casts the
6
+ * palm's shadow (the gobo projector — `paper.ts` `lampOf`), so the dapple crosses it
7
+ * and its shadow falls away from that lamp; by night, under the Moon like the mat.
8
+ * Lengths are world units (CSS px at zoom 1). The paper's colour is the product's
9
+ * (`--vf-note-surface`, lab/theme.ts); the pen's ink is the host's too.
10
+ */
11
+ export declare const PAPER: {
12
+ /** The note's side — a 3″ square read at about the card grid's scale (DESIGN.md §4: small 155). */
13
+ readonly size: 200;
14
+ /** The die-cut corner. */
15
+ readonly radius: 1.5;
16
+ /** Never stuck square: each note takes its own tilt within ± this, degrees. */
17
+ readonly tilt: 2.5;
18
+ /** The fraction of the height pressed flat under the adhesive strip. */
19
+ readonly glue: 0.3;
20
+ /** How far the free edge rises off the mat, and how much more its corners rise than its middle. */
21
+ readonly curl: 3;
22
+ readonly cornerCurl: 0.6;
23
+ /** How far a HELD note rises and the scale it reads at: the one physics's (kit/physics.ts). */
24
+ readonly lift: {
25
+ readonly height: 12;
26
+ readonly scale: 1.03;
27
+ };
28
+ /** The contact shadow on the mat: the one physics's penumbra (kit/physics.ts). */
29
+ readonly shadow: {
30
+ readonly sigma: 2.2;
31
+ readonly alpha: 0.36;
32
+ readonly sigmaPerUnit: 0.9;
33
+ readonly alphaHeld: 0.4;
34
+ readonly slopeMax: 2.2;
35
+ };
36
+ /** How much the sheet's slope is exaggerated for the lamp's shading: a curl of a few px over a hundred is invisible at 1; at this it reads as paper. */
37
+ readonly relief: 3.5;
38
+ /** The paper's fibre: ±/255 on the albedo. */
39
+ readonly grain: number;
40
+ /** The sole-selection ring (DESIGN.md §7), CSS px, in `--vf-select`: the one physics's. */
41
+ readonly ring: 1.5;
42
+ /** The caret: CSS px wide, the platform's blink. */
43
+ readonly caret: {
44
+ readonly width: 1.5;
45
+ readonly blinkMs: 530;
46
+ };
47
+ /**
48
+ * The FAR LOD (K7b, design-016 §6 K7): under `px[1]` CSS px (the sheet's longer side on screen) the writing crossfades to its
49
+ * GREEKED lines — bars of the pen's ink at `alpha`, `weight` × the em thick through each line's x-height, as a mini mat's chip
50
+ * greeks a note (MINIMAT.md §5) — and the fibre fades out with it (the cheap path: the grain aliases once a device px spans units
51
+ * of paper); under `px[0]` the note is greeked alone: no raster held, none asked, no fibre computed.
52
+ */
53
+ readonly far: {
54
+ readonly px: readonly [48, 64];
55
+ readonly weight: 0.3;
56
+ readonly alpha: 0.42;
57
+ };
58
+ };
@@ -0,0 +1,51 @@
1
+ import { type Component, type Entity, type World } from "../../../core/src/index";
2
+ import { type TypingDocs } from "../../../desk/src/index";
3
+ export { type TypingDocs, writable, type WritableSession } from "../../../desk/src/index";
4
+ /**
5
+ * THE TAP'S NOTE (D7 #4): the note a tap by the local pointer `pid` writes into — the interaction stack's exact hit for that
6
+ * pointer — or none. NONE while any object is in hand: a tap in hand is the hand's (a put-down, a held tool), and the pointer's
7
+ * hit is frozen at the pick-up anyway (l1-pick skips `HandledByWidget` pointers, which the hold stamps every tick), so it would
8
+ * name whatever the pointer touched then — the note hovered before ⏎ opened the board. `found` says whether the pointer is
9
+ * known at all (a touch that has lifted is gone: the caller may ask the drawn notes instead).
10
+ */
11
+ export declare function tapNote(world: World, pid: string, isNote: (e: Entity) => boolean): {
12
+ readonly found: boolean;
13
+ readonly note: Entity | undefined;
14
+ };
15
+ export interface NoteTypingOptions {
16
+ readonly world: World;
17
+ readonly docs: TypingDocs;
18
+ /** The note's cells: its writing (`{ text, seeds }`, live-written and committed whole) and its other props (the seed). The object hands its own (D-D7-A.3). */
19
+ readonly ink: Component<{
20
+ text: string;
21
+ seeds: string;
22
+ }>;
23
+ readonly props: Component<{
24
+ seed?: number;
25
+ }>;
26
+ /** A fresh seed for a glyph just written (`Math.random` unless a test says). */
27
+ readonly fresh?: () => number;
28
+ }
29
+ export interface NoteTyping {
30
+ /** The note the editor is on — the `Editing` claim — or undefined. */
31
+ editing(): Entity | undefined;
32
+ /** A session is open: the note's ink written live and not yet committed. */
33
+ open(): boolean;
34
+ /** The note's writing as the world holds it now (the live value mid-session). */
35
+ ink(e: Entity): {
36
+ readonly text: string;
37
+ readonly seeds: string;
38
+ } | undefined;
39
+ /** Claim `e` for writing (`Editing`); a claim on another note ends first. False for a dead entity or a non-note. */
40
+ begin(e: Entity): boolean;
41
+ /** The platform's value for the claimed note: seeds carried, the cell written LIVE. The inserted run, or null when nothing changed. */
42
+ input(value: string): {
43
+ readonly from: number;
44
+ readonly to: number;
45
+ } | null;
46
+ /** End the SESSION: ONE transaction with the live cell, unless it nets to nothing. Whether it committed. The claim stays. */
47
+ commit(): boolean;
48
+ /** End the claim: commit, then lift `Editing`. A dead note has nothing to commit — the claim died with it. */
49
+ end(): void;
50
+ }
51
+ export declare function createNoteTyping(opts: NoteTypingOptions): NoteTyping;
@@ -0,0 +1,161 @@
1
+ import type { Entity } from "../../../core/src/index";
2
+ import { type KindHost } from "../../../desk/src/index";
3
+ import { type View, type HandLaw, type HandLayout, type TextRaster } from "../../../desk/src/kit/index";
4
+ import type { PaperInstance } from "./layout";
5
+ import type { InkRect, UvRect } from "./pages";
6
+ import { type PaperGeometry } from "./paper";
7
+ /** The pages a writing allocates in — the root paper pass (paper-pass.ts) satisfies it. */
8
+ export interface InkPages {
9
+ alloc(w: number, h: number): InkRect | null;
10
+ free(r: InkRect): void;
11
+ write(r: InkRect, bytes: Uint8Array<ArrayBuffer>): UvRect;
12
+ /** Every rect forgotten (the shelves carved afresh); `clear` zeroes the texels too. */
13
+ reset(clear?: boolean): void;
14
+ /** Give back the layers' trailing empty rows (pages.ts `trim`). */
15
+ trim?(): number;
16
+ }
17
+ /** The hand's law as theme.ts states it (`HAND`) — the engine's unless a host says. */
18
+ export declare const DEFAULT_HAND_LAW: HandLaw;
19
+ /** The default face — Caveat medium (STICKY.md §3; the app ships the file). */
20
+ export declare const DEFAULT_FACE = "caveat";
21
+ /** The pen's bleed, note units — a faint stroke under each glyph (STICKY.md §3). */
22
+ export declare const DEFAULT_BLEED = 0.3;
23
+ export interface WritingOptions {
24
+ /** The ink pages — the root paper pass once the ground is made; `undefined` before (a sheet waits). */
25
+ readonly pages: () => InkPages | undefined;
26
+ /** The host's text raster (desk/host/ink.ts); absent — the Node oracle — nothing is rastered live. */
27
+ readonly text?: TextRaster | undefined;
28
+ readonly hand?: HandLaw;
29
+ readonly face?: string;
30
+ readonly bleed?: number;
31
+ /** K7b — the far LOD's low edge (theme.ts `PAPER.far`), CSS px of the sheet's longer side: under it no raster is held or asked (the note greeks). */
32
+ readonly far?: number;
33
+ /** A typed glyph's wipe, ms (theme.ts `HAND.wipeMs`). */
34
+ readonly wipeMs?: number;
35
+ /** The caret's blink, ms (theme.ts `PAPER.caret.blinkMs`). */
36
+ readonly blinkMs?: number;
37
+ /** Only a note within this many CSS px of the view pays for a raster (the prototype's 200). */
38
+ readonly marginPx?: number;
39
+ /**
40
+ * The builder's word on what is DRAWN (D6, persistent records — `KindHost.drawn`): the paint rank of a note in the root slot this
41
+ * frame, undefined when it is not drawn. With it, "drawn" means the builder's set, not the last `draw` call (a reused record makes
42
+ * none): the eviction spares what is on screen and `noteAt` ranks by paint order. Absent, the writing counts its own draws.
43
+ */
44
+ readonly drawn?: ((e: Entity) => number | undefined) | undefined;
45
+ /** The desk's frame raster queue (K6b, `KindHost.rasters`): a new band or a first raster is asked there; absent, laid at once. */
46
+ readonly queue?: KindHost["rasters"];
47
+ /** The builder's door (K6b, `KindHost.remake`): a note's record remade once the queue laid its raster. */
48
+ readonly remake?: KindHost["remake"];
49
+ }
50
+ /** What a note draws with this frame — the paper kind's record takes it whole. */
51
+ export interface NoteInk {
52
+ readonly raster?: {
53
+ readonly layer: number;
54
+ readonly uv: UvRect;
55
+ };
56
+ readonly wipe?: PaperInstance["wipe"];
57
+ readonly caret?: PaperInstance["caret"];
58
+ }
59
+ /** Where a note's ink lives and what it was drawn at — the rigs' witness. */
60
+ export interface NoteRasterInfo {
61
+ readonly band: number;
62
+ readonly w: number;
63
+ readonly h: number;
64
+ readonly layer: number;
65
+ readonly x: number;
66
+ readonly y: number;
67
+ readonly pinned: boolean;
68
+ }
69
+ export interface WritingStats {
70
+ /** Notes holding a raster now (pinned included). */
71
+ readonly resident: number;
72
+ readonly pinned: number;
73
+ /** Layouts laid and rasters drawn since the mount — the "re-rasters on an edit or a rung only" instrument. */
74
+ readonly layouts: number;
75
+ readonly rasters: number;
76
+ /** Rasters refused because the pages were full (the sheet drew blank). */
77
+ readonly blanks: number;
78
+ /** Rasters evicted to make room. */
79
+ readonly evicted: number;
80
+ /** Notes whose raster is asked of the queue and not laid yet (K6b) — each draws what it holds meanwhile. */
81
+ readonly queued: number;
82
+ }
83
+ export interface Writing {
84
+ /** The frame's clock, once a tick before the draw: does the writing want a frame now? */
85
+ tick(now: number): boolean;
86
+ /**
87
+ * When the writing is next live (K7a — `KindLocal.due`): now while a frame is owed or a wipe runs on a drawn note; the
88
+ * caret's next blink phase while it stands; never otherwise — a face landing is the text raster's wake, an edit the
89
+ * editor's. A desk at rest with a caret standing takes one frame a blink phase, and none without one.
90
+ */
91
+ due(now: number): number;
92
+ /**
93
+ * What note `e` draws with this frame: its ink (pinned or live), the pen's wipe, the caret. A `fading` note (a
94
+ * delete ghost) draws only the raster it already holds — never a new layout or raster, no marks.
95
+ */
96
+ draw(e: Entity, props: Readonly<Record<string, unknown>>, rect: {
97
+ readonly cx: number;
98
+ readonly cy: number;
99
+ readonly w: number;
100
+ readonly h: number;
101
+ }, view: View & {
102
+ readonly dpr: number;
103
+ }, geometry: PaperGeometry, fading?: boolean): NoteInk;
104
+ /**
105
+ * The band note `e` asks at `zoom` × `dpr` (K6b — the paper kind's RUNG): its raster's band under the ladder's hysteresis, the one
106
+ * `draw` would raster at; 0 when it asks none (an empty sheet, a pinned still, no text raster). The note's record reads the zoom
107
+ * through this alone, so a zoom within the band remakes nothing.
108
+ */
109
+ bandOf(e: Entity, props: Readonly<Record<string, unknown>>, rect: {
110
+ readonly w: number;
111
+ readonly h: number;
112
+ }, zoom: number, dpr: number): number;
113
+ /**
114
+ * Note `e`'s RUNG at `zoom` × `dpr` (K6b — the paper kind's `rung`): without a queue, the band it asks (`bandOf` — its record,
115
+ * remade at a crossing, rasters it at once); with one, the band of the raster it HOLDS — what its record shows — the band the zoom
116
+ * asks being ASKED of the queue here, `px` (screen px from the view's centre) its order: a crossing remakes no record, the raster's
117
+ * landing does (`remake`).
118
+ */
119
+ rungOf(e: Entity, props: Readonly<Record<string, unknown>>, rect: {
120
+ readonly w: number;
121
+ readonly h: number;
122
+ }, zoom: number, dpr: number, px: number): number;
123
+ /** The note's layout as last drawn (undefined before, for a still, or while the face loads). */
124
+ layoutOf(e: Entity): HandLayout | undefined;
125
+ rasterOf(e: Entity): NoteRasterInfo | undefined;
126
+ /** Pin a committed raster (r8 rows) on a note — allocated NOW, in call order (the oracle's texels). */
127
+ pin(e: Entity, bytes: Uint8Array<ArrayBuffer>, size: {
128
+ readonly w: number;
129
+ readonly h: number;
130
+ }): boolean;
131
+ isPinned(e: Entity): boolean;
132
+ /** The editor's caret: on note `e` before glyph `index`, its blink restarted at `now`; `undefined` lifts it. */
133
+ caret(e: Entity | undefined, index?: number, now?: number): void;
134
+ /** The caret as drawn: its note, its index, whether it shows. */
135
+ caretOf(): {
136
+ readonly entity: Entity;
137
+ readonly index: number;
138
+ readonly on: boolean;
139
+ } | undefined;
140
+ /** A glyph was just written at `index` (the pen's wipe from `now`); `undefined` = nothing to wipe (a paste, a newline). */
141
+ wrote(e: Entity, index: number | undefined, now: number): void;
142
+ wipeOf(e: Entity): {
143
+ readonly index: number;
144
+ readonly t0: number;
145
+ } | undefined;
146
+ /** What has LANDED on the note, counted — its raster laid, its wipe let go (D7 — `KindLocal.landed`); never the wipe running. */
147
+ landed(e: Entity): number;
148
+ /** The caret index nearest a world point on a drawn note — where a tap puts the pen. */
149
+ caretIndexAt(e: Entity, wx: number, wy: number): number | undefined;
150
+ /** The topmost note drawn last frame under a world point. */
151
+ noteAt(wx: number, wy: number): Entity | undefined;
152
+ /** The note left the desk for good: its rect back to the pages. */
153
+ forget(e: Entity): void;
154
+ /** Every raster forgotten and the pages carved afresh (a scene reload). */
155
+ reset(): void;
156
+ stats(): WritingStats;
157
+ dispose(): void;
158
+ }
159
+ /** The caret index nearest a point in a note's own units (the prototype's `caretIndexAt`): lines weigh three times the columns. */
160
+ export declare function caretIndexIn(L: HandLayout, nx: number, ny: number, length: number): number;
161
+ export declare function createWriting(opts: WritingOptions): Writing;