@vibecook/ice 0.10.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 (380) 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-5FQS7V2C.js → chunk-DYK6KNLG.js} +13303 -7485
  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 +34 -13
  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-5FQS7V2C.js.map +0 -1
  324. package/dist/chunk-JWRHAM7L.js +0 -1163
  325. package/dist/chunk-JWRHAM7L.js.map +0 -1
  326. package/dist/chunk-MFTMPJUF.js +0 -681
  327. package/dist/chunk-MFTMPJUF.js.map +0 -1
  328. package/dist/chunk-OR5FNVUE.js.map +0 -1
  329. package/dist/ground.js +0 -1213
  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 -103
  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-classic.d.ts +0 -30
  348. package/dist/types/packages/ground/src/passes/grid-magnet.d.ts +0 -31
  349. package/dist/types/packages/ground/src/passes/grid.d.ts +0 -28
  350. package/dist/types/packages/ground/src/passes/guides-collect.d.ts +0 -14
  351. package/dist/types/packages/ground/src/passes/guides.d.ts +0 -3
  352. package/dist/types/packages/ground/src/passes/magnet-collect.d.ts +0 -63
  353. package/dist/types/packages/ground/src/passes/soup-collect.d.ts +0 -35
  354. package/dist/types/packages/ground/src/passes/soup-mesh.d.ts +0 -8
  355. package/dist/types/packages/ground/src/passes/wires-collect.d.ts +0 -35
  356. package/dist/types/packages/ground/src/passes/wires.d.ts +0 -10
  357. package/dist/types/packages/ground/src/poles.d.ts +0 -47
  358. package/dist/types/packages/ground/src/renderer.d.ts +0 -15
  359. package/dist/types/packages/ice/src/ground.d.ts +0 -1
  360. package/dist/types/packages/ice/src/r3f.d.ts +0 -1
  361. package/dist/types/packages/kernel/src/eviction.d.ts +0 -23
  362. package/dist/types/packages/kernel/src/zoom-bands.d.ts +0 -19
  363. package/dist/types/packages/r3f/src/bridge.d.ts +0 -129
  364. package/dist/types/packages/r3f/src/composite-material.d.ts +0 -26
  365. package/dist/types/packages/r3f/src/compositor-pass.d.ts +0 -105
  366. package/dist/types/packages/r3f/src/dev-write-trap.d.ts +0 -30
  367. package/dist/types/packages/r3f/src/gl-root.d.ts +0 -96
  368. package/dist/types/packages/r3f/src/gl-router.d.ts +0 -70
  369. package/dist/types/packages/r3f/src/index.d.ts +0 -17
  370. package/dist/types/packages/r3f/src/island-state.d.ts +0 -112
  371. package/dist/types/packages/r3f/src/island.d.ts +0 -13
  372. package/dist/types/packages/r3f/src/pool.d.ts +0 -56
  373. package/dist/types/packages/r3f/src/preview-capture.d.ts +0 -19
  374. package/dist/types/packages/r3f/src/resource-registry.d.ts +0 -30
  375. package/dist/types/packages/r3f/src/self-sustain.d.ts +0 -39
  376. package/dist/types/packages/r3f/src/use-island-frame.d.ts +0 -39
  377. package/dist/types/packages/react/src/infinite-canvas.d.ts +0 -140
  378. package/dist/types/packages/react/src/preview-snapshots.d.ts +0 -17
  379. package/dist/types/packages/react/src/widget-preview.d.ts +0 -14
  380. package/dist/types/packages/react/src/widget-root.d.ts +0 -33
@@ -0,0 +1,8 @@
1
+ /** The covers a notebook is bound in (NOTEBOOK.md §4) — names; the cloths and designs are the host's. */
2
+ export declare const COVERS: readonly ["ink", "orbit", "tiles", "label", "linen"];
3
+ export type CoverName = (typeof COVERS)[number];
4
+ /** The rulings its pages are printed with (notebook/layout.ts `RULINGS`). */
5
+ export declare const RULING_NAMES: readonly ["plain", "dots", "rules", "grid"];
6
+ /** The notebook's durable type id. */
7
+ export declare const NOTEBOOK_TYPE = "desk.notebook";
8
+ export declare const Notebook: import("../../../core/src/index").WidgetType;
@@ -0,0 +1,56 @@
1
+ import type { RasterBudget, RGB } from "../../../desk/src/index";
2
+ import { type InkPoint } from "./ink";
3
+ import { PageRaster } from "./raster";
4
+ /**
5
+ * A stroke's identity on its page — what a raster compares: its pen, its pace (the cell's `times`; an untimed stroke's `speed`) and
6
+ * its path (the cell's `points`). Two dots on one spot in two pens are two strokes.
7
+ */
8
+ export declare const pageStrokeKey: (ink: string, points: string, times: string, speed: number) => string;
9
+ /** A stroke as a page's raster draws it: its identity (`pageStrokeKey`), its pen by name, its samples with their widths. */
10
+ export interface PageStroke {
11
+ readonly key: string;
12
+ readonly ink: string;
13
+ readonly points: readonly InkPoint[];
14
+ }
15
+ /** The pen in hand's stroke (the pen driver's): its page, its pen, its samples so far (grown in place), lifted or not; its key once lifted. */
16
+ export interface LiveStroke {
17
+ readonly page: number;
18
+ readonly ink: string;
19
+ readonly points: InkPoint[];
20
+ lifted: boolean;
21
+ key: string;
22
+ }
23
+ /** The pages a record names and the layer each is in (the pass's `NotebookDraw.ink`). */
24
+ export interface InkTable {
25
+ readonly pages: readonly number[];
26
+ readonly layers: readonly number[];
27
+ }
28
+ /** Where a raster's bytes go: the notebook pass's layers (`NotebookPass.uploadInk`). */
29
+ export interface InkUploader {
30
+ uploadInk(layer: number, bytes: Uint8Array<ArrayBuffer>, x?: number, y?: number, w?: number, h?: number): void;
31
+ }
32
+ export declare class PageInk {
33
+ private readonly slots;
34
+ private clock;
35
+ /** Whole-page replays since the cache was made (a witness: the pen's own stroke lands with none). */
36
+ replays: number;
37
+ /** THE BUDGET (D6): each layer's CPU raster (5.6 MB) charged as it is made; evicted, the layer replays from its strokes when next used. */
38
+ private readonly budget;
39
+ constructor(budget?: RasterBudget);
40
+ /** The budget's ask (D6): a layer's raster is kept while its page was in a table this frame. */
41
+ keeps(key: string): boolean;
42
+ /**
43
+ * The table for one book's pages in view this frame (`pages` in the pass's order): every page with ink — strokes, or the live
44
+ * stroke on it — gets a layer (kept if it has one, else the least recently used is taken), its raster brought up to its
45
+ * strokes (replayed, or the live stroke's new final segments drawn) and uploaded (whole after a replay, else the touched
46
+ * rectangle). `book` is the book's id on this desk; `len × height` the page's open extent in page units. Without an uploader
47
+ * (no pass yet) nothing is drawn and the table is empty — the next frame tries again.
48
+ */
49
+ table(book: number, pages: readonly number[], strokesOf: (page: number) => readonly PageStroke[], live: LiveStroke | null, colourOf: (ink: string) => RGB, look: unknown, up: InkUploader | undefined, len: number, height: number): InkTable;
50
+ /** A page's raster as its layer holds it (a witness), or undefined when it has none. */
51
+ rasterOf(book: number, page: number): PageRaster | undefined;
52
+ /** A book left the desk: its layers are free (their rasters kept for the next page to take). */
53
+ forget(book: number): void;
54
+ /** Everything dropped (the desk ends). */
55
+ dispose(): void;
56
+ }
@@ -0,0 +1,197 @@
1
+ import type { RenderTarget, RGB, RGBA } from "../../../desk/src/index";
2
+ import { type FadeIn, type View, type MatConfig, type MatFrame, type MatPass, type MatLight, type DeskEye, type BuiltMesh, type Rigid } from "../../../desk/src/kit/index";
3
+ import type { NotebookLaw } from "./law";
4
+ import { type NotebookLook, type Ruling } from "./layout";
5
+ import type { Frame } from "./shape";
6
+ import type { NotebookShaders } from "./shaders";
7
+ /** One book as the pass draws it this frame. */
8
+ export interface NotebookDraw {
9
+ /** A stable id: the book's GPU buffers are kept under it. */
10
+ readonly id: number;
11
+ readonly mesh: BuiltMesh;
12
+ /** Bumped whenever the mesh was rebuilt — the upload's key. */
13
+ readonly version: number;
14
+ readonly frame: Frame;
15
+ readonly rigid: Rigid;
16
+ /** The unit direction toward the lamp. */
17
+ readonly lamp: readonly [number, number, number];
18
+ readonly theta: number;
19
+ readonly gamma: number;
20
+ readonly look: NotebookLook;
21
+ readonly ruling: Ruling;
22
+ readonly seed: number;
23
+ /** The selection ring's presence, 0..1. */
24
+ readonly ring: number;
25
+ /** Something of the book rises over the rest (a sheet in the air, the cover swinging): its surfaces read the shadow map. */
26
+ readonly selfShadow: boolean;
27
+ /** The pages whose ink is on the device, and the layer each is in (at most `INK_TABLE`). */
28
+ readonly ink: {
29
+ readonly pages: readonly number[];
30
+ readonly layers: readonly number[];
31
+ };
32
+ /** The look's ruling ink — the pass's fallback where no host set its own (a record made without the desk's local: a tray specimen, K5a). */
33
+ readonly rule?: RGBA;
34
+ }
35
+ export interface NotebookStats {
36
+ readonly books: number;
37
+ readonly triangles: number;
38
+ readonly shadowed: number;
39
+ }
40
+ export declare class NotebookPass {
41
+ readonly name = "notebook/books";
42
+ private readonly device;
43
+ private readonly format;
44
+ private readonly mat;
45
+ private readonly knobs;
46
+ private readonly records;
47
+ /** What the GPU holds of the records: a prefix is written only when it changed (K4a). */
48
+ private readonly recordsSent;
49
+ private readonly knobBuf;
50
+ /** What the GPU holds of the knobs: they are written only when they change (K4a — a standing value costs a frame nothing). */
51
+ private readonly knobsSent;
52
+ private readonly recordBuf;
53
+ private readonly layoutMain;
54
+ private readonly layoutShadow;
55
+ private readonly layoutComp;
56
+ private readonly bookPipe;
57
+ private readonly recvPipe;
58
+ private readonly shadowPipe;
59
+ private readonly compPipe;
60
+ private readonly goboSampler;
61
+ private readonly noiseSampler;
62
+ private readonly cmpSampler;
63
+ /**
64
+ * The shadow maps (K6a, design-016 §6): a placeholder until a book is drawn, then a layer a book drawn (up to MAX_SHADOWED — they
65
+ * are drawn again every frame, so growing them keeps nothing): a desk with no notebook holds none of their 33.5 MB, one with one
66
+ * book 4 MB. With the frame's layer targets they are let go when no book was drawn for a while (`releaseLayer`, the kind's tick)
67
+ * and with the last book — render targets, never under the raster budget (D-K6a.3; sizing them to the books' box is K7's).
68
+ */
69
+ private shadowTex;
70
+ private shadowLayers;
71
+ /**
72
+ * What each shadow map holds (K7a — cached while the lamp and the book stand still): the book's id, its mesh's version, its
73
+ * placement and its light's frame as the map was drawn — the map is drawn again only when one of them moved. The lamp stands
74
+ * in world space and the eye is not in the map, so a pan, a zoom or a frame drawn for another object draws none.
75
+ */
76
+ private readonly shadowKeys;
77
+ private readonly recordFloats;
78
+ /** Shadow maps drawn and kept since the pass was made (a witness). */
79
+ private shadowDraws;
80
+ private shadowKept;
81
+ /**
82
+ * Turns over at every pass-wide resource a layer reads changing (K7a) — a page's ink uploaded, the main group made again (the
83
+ * mat's assets, the ink or the shadow maps' texture): with the target's meshes' generation, the silhouette's key, what the pass
84
+ * lists and the box — and by CONTENT the knobs, the records and the slot's view block — what a target's layer is laid again by,
85
+ * undrawn (`BoxTargets.holds`). A shadow map drawn is not in it: its content is its book, mesh and light — in the records.
86
+ */
87
+ private gen;
88
+ private readonly sig;
89
+ private readonly read;
90
+ /** Layers drawn and laid again undrawn since the pass was made (a witness). */
91
+ private layerDraws;
92
+ private layerKept;
93
+ private drawnAt;
94
+ private readonly shadowGroup;
95
+ private readonly inkSampler;
96
+ private readonly paperTex;
97
+ private readonly paperSampler;
98
+ /** The pages' ink rasters: a placeholder until the first stroke, then `INK_LAYERS` full pages. */
99
+ private inkTex;
100
+ private inkReady;
101
+ private mainGroup;
102
+ private boundAssets;
103
+ private boundInk;
104
+ /** The frame's target (the canvas; the hand) and the held desk copy's, apart (D7) — `t` the one this prepare is for (`use`). */
105
+ private readonly frameT;
106
+ private copyT;
107
+ private t;
108
+ /** The records the last prepare turned away at the pass's cap — not drawn; the ground reports them (`GroundStats.dropped`, D7). */
109
+ dropped: number;
110
+ /** Profiling switches (a harness's): 1 no PCSS · 2 no material detail · 4 no gobo · 8 no shadow maps · 16 no composite · 32 no book draw · 64 no mat draw. */
111
+ debug: number;
112
+ private constructor();
113
+ static create(device: GPUDevice, format: GPUTextureFormat, src: NotebookShaders, mat: MatPass): Promise<NotebookPass>;
114
+ private rebind;
115
+ /**
116
+ * Copy part of a page's raster (its bytes — notebook/raster.ts: RGBA8, straight alpha, `INK_W` texels a row) into its layer:
117
+ * only the rectangle the pen touched goes (D3t-b — the bytes, not a canvas: the Node oracle writes the same layers). The first
118
+ * call makes the layers — a book with no ink costs the device nothing.
119
+ */
120
+ uploadInk(layer: number, bytes: Uint8Array<ArrayBuffer>, x?: number, y?: number, w?: number, h?: number): void;
121
+ /** The layer's targets at the books' screen `box` (K7a) — and a shadow map a book drawn — made on the first book drawn (K6a). */
122
+ private fit;
123
+ /** Was a book drawn within the last `ms`? (The kind lets the layer go once none was for a while.) */
124
+ drawnWithin(ms: number): boolean;
125
+ /** When the layer was last drawn (`performance.now()`; -Infinity before the first) — the kind's registered wake lets it go LAYER_IDLE_MS after (K7a). */
126
+ get lastDrawn(): number;
127
+ /** Is the frame's layer made (its targets and shadow maps on the device)? */
128
+ get layerMade(): boolean;
129
+ /** The pages' ink layers let go (the desk has no notebook — K6a): the placeholder again, made anew by the next page's ink. */
130
+ releaseInk(): void;
131
+ /**
132
+ * Every mesh on the device given back — the frame's and the held copy's (K7a: the desk has none of this kind's objects left, and
133
+ * no prepare will come to sweep the ones it no longer lists).
134
+ */
135
+ releaseMeshes(): void;
136
+ /**
137
+ * The frame's layer targets and the shadow maps let go (no book drawn for a while, or none on the desk): made again at the next
138
+ * book drawn. The meshes stay (the books'); the held copy's targets are the hold's (`endHold`).
139
+ */
140
+ releaseLayer(): void;
141
+ /** Every shadow map's content forgotten (its texture made again or let go): each is drawn afresh at its next book. */
142
+ private forgetShadows;
143
+ /** The shadow maps drawn and the ones kept (not drawn: their book, mesh and light stood) since the pass was made (K7a). */
144
+ get shadows(): {
145
+ readonly drawn: number;
146
+ readonly kept: number;
147
+ };
148
+ /** The layers drawn and the ones laid again undrawn (nothing they are drawn from moved) since the pass was made (K7a). */
149
+ get layerFrames(): {
150
+ readonly drawn: number;
151
+ readonly kept: number;
152
+ };
153
+ /** A book's mesh on the device — uploaded when its version moved, the buffers grown when too small. */
154
+ private upload;
155
+ /**
156
+ * This frame's books, the mat's block for the camera and the light, the pass's knobs, the
157
+ * eye. Records every book's placement, lamp, shadow frame, pose and palette; uploads what
158
+ * moved. Returns the count that will draw.
159
+ */
160
+ prepare(view: View & {
161
+ readonly dpr: number;
162
+ }, fadeIn: FadeIn, cfg: MatConfig, frame: MatFrame | undefined, light: MatLight | undefined, eye: DeskEye, law: NotebookLaw, colours: {
163
+ readonly cast: RGB;
164
+ readonly select: RGB;
165
+ readonly ruleInk: RGBA;
166
+ }, books: readonly NotebookDraw[]): number;
167
+ get drawn(): NotebookStats;
168
+ /** The render target the next prepare, layer and composite are for (D7): the frame's, or the held desk copy's — made on first use. */
169
+ use(target: RenderTarget): void;
170
+ /** The hold is over: the desk copy's target gives its layer and meshes back (D7). */
171
+ endHold(): void;
172
+ /** The books' screen box on an attachment of `size` device px, clamped to it — the layer's scissor and the composite's; null when none shows. */
173
+ private boxOf;
174
+ /** The books' screen box of the last `layer`, device px [x, y, w, h] — what the composite paints at most; null: no layer to lay. */
175
+ get screenBox(): readonly [number, number, number, number] | null;
176
+ /** Draw the prepared books onto `target` (the canvas, holding what the ground drew). Its own command buffer: the layer, then the composite. */
177
+ render(target: GPUTextureView, size: {
178
+ readonly w: number;
179
+ readonly h: number;
180
+ }, dpr: number): void;
181
+ /**
182
+ * Record this frame's books into their LAYER, into `encoder` — ahead of the pass the layer is laid in (the host's own, `render`;
183
+ * or the desk's frame, the notebook a kind of its registry — kinds/notebook.ts): (1) each book's shadow map, (2) the 4× layer —
184
+ * the books, then the mat under them — resolved. `size`: the attachment's device px. Returns whether there is a layer to lay
185
+ * (its box: `screenBox`).
186
+ */
187
+ layer(encoder: GPUCommandEncoder, size: {
188
+ readonly w: number;
189
+ readonly h: number;
190
+ }, dpr: number): boolean;
191
+ /**
192
+ * (3) Lay the last `layer` over what `pass` holds — premultiplied, one fullscreen triangle — scissored to `scissor` (the books'
193
+ * box, or a part of it a host narrows it to). Nothing without a layer, or with the debug bit 16 (no composite).
194
+ */
195
+ composite(pass: GPURenderPassEncoder, scissor?: readonly [number, number, number, number] | null): void;
196
+ dispose(): void;
197
+ }
@@ -0,0 +1,30 @@
1
+ import { type DeskEye, type Rigid } from "../../../desk/src/kit/index";
2
+ import type { NotebookLaw } from "./law";
3
+ import { type Frame, type NotebookPose } from "./shape";
4
+ export type NotebookHit = {
5
+ readonly part: "case";
6
+ readonly t: number;
7
+ } | {
8
+ readonly part: "page";
9
+ readonly side: 0 | 1;
10
+ readonly s: number;
11
+ readonly y: number;
12
+ readonly len: number;
13
+ readonly t: number;
14
+ };
15
+ /** The ray from the eye through a desk point, in the book's own coordinates. */
16
+ export declare function localRay(e: DeskEye, g: Rigid, dx: number, dy: number): {
17
+ o: [number, number, number];
18
+ d: [number, number, number];
19
+ };
20
+ /**
21
+ * The notebook under a desk point, and where. Closed (or mostly), the whole case is one hit;
22
+ * open, a page on either side (the left one found in the right model, through the mirror the
23
+ * cover's full swing is), else the case's margins. Null when the ray misses the book.
24
+ */
25
+ export declare function pickNotebook(F: Frame, pose: NotebookPose, law: NotebookLaw, g: Rigid, e: DeskEye, dx: number, dy: number, bounds: {
26
+ readonly min: readonly number[];
27
+ readonly max: readonly number[];
28
+ }): NotebookHit | null;
29
+ /** The x a pointer's ray reaches at height z in the book's own coordinates (the right model's x for a drag). */
30
+ export declare function localXAt(e: DeskEye, g: Rigid, dx: number, dy: number, z: number): number;
@@ -0,0 +1,28 @@
1
+ import type { RGB } from "../../../desk/src/index";
2
+ import { type InkPoint } from "./ink";
3
+ /** A texel rectangle of a page's raster (x, y its top-left; w, h ≥ 0), clipped to the raster. */
4
+ export interface InkRect {
5
+ readonly x: number;
6
+ readonly y: number;
7
+ readonly w: number;
8
+ readonly h: number;
9
+ }
10
+ /** One page's ink: RGBA8, straight alpha, `INK_W × INK_H` texels, row by row — the layer the pass holds is a copy of these bytes. */
11
+ export declare class PageRaster {
12
+ readonly bytes: Uint8Array<ArrayBuffer>;
13
+ clear(): void;
14
+ }
15
+ /** The union of two rects (either may be null — nothing touched). */
16
+ export declare function unionRect(a: InkRect | null, b: InkRect | null): InkRect | null;
17
+ /** How many segments a stroke of `n` samples is drawn as, and how many of them are FINAL — known whole (all of them once lifted). */
18
+ export declare function segmentsOf(n: number, lifted: boolean): number;
19
+ /**
20
+ * Segment `k` of a stroke into a raster (1 ≤ k < n; for a stroke of one sample, k = 1 is its dot): the midpoint quadratic from
21
+ * the midpoint before sample k (sample 0 itself for k = 1) through sample k to the midpoint after it (sample k itself when it is
22
+ * the last), `sx`/`sy` texels per page unit. Returns the rect it touched, or null.
23
+ */
24
+ export declare function drawSegment(r: PageRaster, colour: RGB, p: readonly InkPoint[], k: number, sx: number, sy: number): InkRect | null;
25
+ /** A page's texels per page unit across and down (the raster spans the page's open width `len` and its height). */
26
+ export declare const scaleOf: (len: number, height: number) => readonly [number, number];
27
+ /** A whole stroke into a raster — every segment, as the pen laid them; the rect it touched. */
28
+ export declare function drawStroke(r: PageRaster, colour: RGB, p: readonly InkPoint[], sx: number, sy: number): InkRect | null;
@@ -0,0 +1,11 @@
1
+ import type { ComposeOptions } from "../../../desk/src/engine/index";
2
+ import { type ShaderText } from "../../../desk/src/kit/index";
3
+ /** The notebook's own shader file (the kit's pieces come by name). */
4
+ export declare const NOTEBOOK_SHADER_FILES: {
5
+ readonly pass: "notebook/notebook-pass.wgsl";
6
+ };
7
+ export interface NotebookShaders {
8
+ readonly program: ComposeOptions;
9
+ readonly composite: ComposeOptions;
10
+ }
11
+ export declare function notebookShaders(text: ShaderText): NotebookShaders;
@@ -0,0 +1,155 @@
1
+ import type { NotebookLaw } from "./law";
2
+ /** One notebook's dimensions (the law's, unless a scene gives its own). */
3
+ export interface NotebookSpec {
4
+ readonly width: number;
5
+ readonly height: number;
6
+ readonly board: number;
7
+ readonly coverRadius: number;
8
+ readonly sheets: number;
9
+ readonly sheet: number;
10
+ readonly square: number;
11
+ readonly joint: number;
12
+ readonly pageRadius: number;
13
+ readonly band: number;
14
+ readonly bulge: number;
15
+ }
16
+ export declare const specOf: (law: NotebookLaw, over?: Partial<NotebookSpec>) => NotebookSpec;
17
+ /** The numbers derived from a spec that every part reads. */
18
+ export interface Frame {
19
+ readonly spec: NotebookSpec;
20
+ /** Cover width, height, board. */
21
+ readonly W: number;
22
+ readonly H: number;
23
+ readonly b: number;
24
+ /** The whole block's thickness. */
25
+ readonly T: number;
26
+ /** The spine's width (the closed book's thickness) — the gap between the two covers when open. */
27
+ readonly sw: number;
28
+ /** A page: its height; its width as bound in the closed book (`Wp`) and as it lies open, out of the gutter (`Wo`). */
29
+ readonly Hp: number;
30
+ readonly Wp: number;
31
+ readonly Wo: number;
32
+ /** The closed block's spine edge, x. */
33
+ readonly xp0: number;
34
+ /** The gutter, open: x, and the valley floor's height. */
35
+ readonly xg: number;
36
+ readonly zg: number;
37
+ }
38
+ export declare function frameOf(spec: NotebookSpec): Frame;
39
+ /** The ease every curve here uses. */
40
+ export declare const smooth: (u: number) => number;
41
+ /** A swing past either end bounces back up off the desk or the block — never through it. */
42
+ export declare const swingOf: (theta: number) => number;
43
+ /** How far the gutter has relaxed into its open curve: none until the cover is nearly down. */
44
+ export declare const relaxOf: (theta: number) => number;
45
+ /**
46
+ * The front cover's frame at a swing θ: its origin (the INNER face's spine edge), its u axis
47
+ * (across, spine → fore-edge) and its w axis (through the board, inner → outer), all in the
48
+ * x–z plane. Closed it rests on the block (inner face at b + T); open it lies on the desk to
49
+ * the left of the spine. The hinge travels on the spine's own arc — up like a door, over, and
50
+ * down onto the desk — the spine rotating a quarter turn while the cover rotates a half.
51
+ */
52
+ export interface CoverFrame {
53
+ readonly ox: number;
54
+ readonly oz: number;
55
+ readonly ux: number;
56
+ readonly uz: number;
57
+ readonly wx: number;
58
+ readonly wz: number;
59
+ }
60
+ export declare function coverFrame(F: Frame, theta: number): CoverFrame;
61
+ /** A point in the cover's frame (u across from the spine edge, w through the board from the inner face) → book x, z. */
62
+ export declare const coverPoint: (C: CoverFrame, u: number, w: number) => readonly [number, number];
63
+ /**
64
+ * The RIDE: a point of the right model (x′, z′) carried by the front cover — the left stack.
65
+ * At the full swing this is the mirror about the gutter (x ↦ 2·xg − x, z unchanged).
66
+ */
67
+ export declare const ride: (F: Frame, C: CoverFrame, x: number, z: number) => readonly [number, number];
68
+ /** A right-model direction (nx, nz) carried by the cover (the ride's linear part — a reflection with a turn). */
69
+ export declare const rideDir: (C: CoverFrame, nx: number, nz: number) => readonly [number, number];
70
+ /**
71
+ * A sheet's rise out of the gutter: tangent angle a·(1 − smooth(s/dc)) for s < dc, flat beyond —
72
+ * `a` from the rise (steeper for a thicker stack), `dc` the length the climb takes.
73
+ */
74
+ export interface Profile {
75
+ readonly a: number;
76
+ readonly dc: number;
77
+ }
78
+ export declare function profileOf(rise: number, law: NotebookLaw["gutter"]): Profile;
79
+ export declare const angleAt: (p: Profile, s: number) => number;
80
+ /**
81
+ * A resting sheet of the right model at height `h` (its mid-plane) with the gutter relaxed by
82
+ * `gamma`: where it starts, how long it is, and its climb. Closed (γ 0) it is flat from the
83
+ * block's spine edge; open (γ 1) it is bound at the gutter and climbs to `h`.
84
+ */
85
+ export interface RestSheet {
86
+ readonly x0: number;
87
+ readonly z0: number;
88
+ readonly len: number;
89
+ readonly profile: Profile;
90
+ }
91
+ export declare function restSheet(F: Frame, h: number, gamma: number, law: NotebookLaw["gutter"]): RestSheet;
92
+ /**
93
+ * Integrate a curve of tangent angle α(s) from (x0, z0) and sample it at `ss` (ascending, from 0):
94
+ * out[i] = x, z, cos α, sin α. Midpoint rule, at least `sub` steps per interval and none longer
95
+ * than `STEP` — the one integrator every curve here goes through, so a sheet in the air, the
96
+ * stack it lands on and the hit test agree however each is sampled.
97
+ */
98
+ export declare function integrate(alpha: (s: number) => number, x0: number, z0: number, ss: ArrayLike<number>, sub?: number, out?: Float64Array): Float64Array;
99
+ /** A resting sheet sampled at arc lengths `ss`: x, z, cos, sin per sample. */
100
+ export declare function sampleRest(r: RestSheet, ss: ArrayLike<number>, out?: Float64Array): Float64Array;
101
+ /** A sheet in the air: its root's angle φ and its free edge's ψ (0 = lying right … π = lying left), and the twist that lets one corner lead. */
102
+ export interface Air {
103
+ readonly index: number;
104
+ readonly phi: number;
105
+ readonly psi: number;
106
+ readonly twist: number;
107
+ }
108
+ /** What the mesh needs: the swing, the counts at rest on each side, and the sheets in the air. */
109
+ export interface NotebookPose {
110
+ readonly theta: number;
111
+ /** Sheets at rest on the right (on the back cover) and on the left (on the front cover). */
112
+ readonly right: number;
113
+ readonly left: number;
114
+ /** The right stack's top sheet (its recto shows) and the left stack's (its verso shows); −1 = none. */
115
+ readonly rightTop: number;
116
+ readonly leftTop: number;
117
+ readonly airs: readonly Air[];
118
+ /** Where the desk is under the book, in its own z (0 lying; −lift held) — what the ribbon hangs down to. */
119
+ readonly desk?: number;
120
+ }
121
+ export declare const CLOSED_POSE: NotebookPose;
122
+ /** A stack's top and bottom mid-plane heights for k sheets (right model: on a board at z = b). */
123
+ export declare const stackHeights: (F: Frame, k: number) => readonly [number, number];
124
+ /**
125
+ * A sheet in the air, sampled on the grid (ss × ys), in BOOK coordinates (valid at the full
126
+ * swing — sheets only turn in an open book): each row's tangent angle blends the right stack's
127
+ * resting curve into the left's, by a turn fraction that runs from the root's φ to the edge's
128
+ * ψ (bent by `bend` — the edge curls most), the edge's ψ twisted along the row so one corner
129
+ * leads. Out: per vertex x, y, z and the tangent along s (cos, sin in x–z).
130
+ */
131
+ export declare function sampleAir(F: Frame, air: Air, right: number, left: number, gamma: number, ss: ArrayLike<number>, ys: ArrayLike<number>, law: NotebookLaw, rowSS?: (j: number) => ArrayLike<number>): {
132
+ pos: Float64Array;
133
+ tan: Float64Array;
134
+ };
135
+ /**
136
+ * A page's rows, down from the head: a few tracing each fore-edge corner's arc (so the grid's
137
+ * last column IS the rounded corner — no pixel is cut away in the shader, and the GPU can hide
138
+ * what lies under a page before shading it), `mid` between. `extent(len, j)` is how far along
139
+ * the page row j reaches.
140
+ */
141
+ export declare function pageRows(Hp: number, r: number, mid?: number, arc?: number): {
142
+ ys: Float64Array;
143
+ extent: (len: number, j: number) => number;
144
+ };
145
+ /** A resting sheet as a dense table (one sample per world unit), read by `curveAt` — rows of any extent from one integration. */
146
+ export interface CurveTable {
147
+ readonly data: Float64Array;
148
+ readonly step: number;
149
+ readonly n: number;
150
+ }
151
+ export declare function curveTable(r: RestSheet, step?: number): CurveTable;
152
+ /** x, z, cos, sin at arc length s (linear between the table's samples). */
153
+ export declare function curveAt(t: CurveTable, s: number, out: Float64Array): Float64Array;
154
+ /** Arc-length samples across a page: denser toward the gutter, where the curves are. */
155
+ export declare function sheetSamples(len: number, n: number): Float64Array;
@@ -0,0 +1,76 @@
1
+ /**
2
+ * The NOTEBOOK (BOOK.md) — a desk object under the mat's lamp, ONE PHYSICS with the sticky
3
+ * note: it lifts as the note lifts and casts as the note casts (`PAPER`'s numbers, by name),
4
+ * plus what a slab has and a sheet has not — a CONTACT shadow at its base (the tree-shadow
5
+ * design system's paper elevation, mat.css `--lift-1`: a tight `-1px 2px 0 cast/.22` under the
6
+ * soft `-3px 5px 10px`), the lamp's fill on a face turned from it (the cover mid-swing), and
7
+ * the materials: the page's fibre is the note's grain; the board wears a cloth, a rolled edge
8
+ * and the spine's roll; a bound page dips into the gutter; a stack shows its sheets' edges.
9
+ * Lengths are world units (CSS px at zoom 1); the colours are the product's (lab/theme.ts).
10
+ */
11
+ export declare const BOOK: {
12
+ readonly lift: {
13
+ readonly height: 12;
14
+ readonly scale: 1.03;
15
+ };
16
+ /** The slab's shadow: the note's penumbra with a contact term at its base — the one physics's (kit/physics.ts). */
17
+ readonly shadow: {
18
+ readonly penumbra: {
19
+ readonly sigma0: 2.2;
20
+ readonly sigmaPerHeight: 0.9;
21
+ readonly alpha: 0.36;
22
+ };
23
+ readonly contact: {
24
+ readonly sigma: 1.1;
25
+ readonly alpha: 0.3;
26
+ readonly reach: 2.5;
27
+ };
28
+ readonly slopeMax: 2.2;
29
+ };
30
+ /** The lamp's fill on a face: the one physics's. */
31
+ readonly light: {
32
+ readonly ambient: 0.5;
33
+ readonly cap: 1.35;
34
+ };
35
+ /**
36
+ * The leaves' dapple on the object, as a share of the mat's own (1 = the reference's shade, floor 0.5):
37
+ * a PAGE takes it gently so writing under the palm stays legible (thinking-the-desk §6 guardrail 3),
38
+ * a board takes it whole. BOOK.md Q-b — James's to rule.
39
+ */
40
+ readonly dapple: {
41
+ readonly page: 0.55;
42
+ readonly board: 1;
43
+ };
44
+ /** The fibre (the note's grain, a touch more — a notebook's sheet is heavier than a Post-it's), the gutter's depth and width, the sheets' edge pitch (device px). */
45
+ readonly paper: {
46
+ readonly fibre: number;
47
+ readonly gutterDepth: 0.35;
48
+ readonly gutterWidth: 14;
49
+ readonly edgeStep: 1.3;
50
+ };
51
+ /** The board: its cloth (±/255), the rolled edge's width and tilt (rad), the spine's roll. */
52
+ readonly cover: {
53
+ readonly cloth: number;
54
+ readonly bevel: 2.2;
55
+ readonly bevelTilt: 0.96;
56
+ readonly roll: 5;
57
+ };
58
+ /** The ruling: the pitch (the fine lattice at zoom 1), a dot's radius, a rule's width. */
59
+ readonly rule: {
60
+ readonly pitch: 20;
61
+ readonly dot: 0.7;
62
+ readonly width: 0.6;
63
+ };
64
+ readonly ring: 1.5;
65
+ /** A notebook as a host spawns one: A6 at the card grid's scale — 176 × 248, a 16 px tape, 9 px fore-edge corners, 1.8 px boards, 80 sheets of 0.12, 2.5 px squares. */
66
+ readonly spec: {
67
+ readonly width: 176;
68
+ readonly height: 248;
69
+ readonly spine: 16;
70
+ readonly radius: 9;
71
+ readonly board: 1.8;
72
+ readonly sheet: 0.12;
73
+ readonly sheets: 80;
74
+ readonly inset: 2.5;
75
+ };
76
+ };