@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,70 @@
1
+ import type { RGB } from "../../../desk/src/index";
2
+ export interface InkPoint {
3
+ readonly s: number;
4
+ readonly y: number;
5
+ readonly w: number;
6
+ }
7
+ export interface InkStroke {
8
+ readonly colour: RGB;
9
+ readonly points: InkPoint[];
10
+ }
11
+ /** A page's ink: its strokes, and a version that moves whenever they change (a raster's key). */
12
+ export interface PageInk {
13
+ strokes: InkStroke[];
14
+ version: number;
15
+ }
16
+ /** One page's raster: 1024 texels across its width (5.5 per world unit on the law's page), its height in proportion. */
17
+ export declare const INK_W = 1024;
18
+ export declare const INK_H = 1360;
19
+ /** Page rasters on the device at once — the spread, a sheet or two in the air, a turn's neighbours. */
20
+ export declare const INK_LAYERS = 8;
21
+ /** Pages a book can name in its record's table (the spread and the sheets in the air). */
22
+ export declare const INK_TABLE = 8;
23
+ /**
24
+ * The pen's law: a nib `width` wide at a writing pace, thinning as it hurries (a fountain pen
25
+ * laying down less ink) and swelling slow — bounded both ways; a stylus's pressure, when the
26
+ * device has one, leads instead.
27
+ */
28
+ export interface PenLaw {
29
+ readonly width: number;
30
+ readonly thin: number;
31
+ readonly thick: number;
32
+ readonly pace: number;
33
+ }
34
+ export declare const PEN: PenLaw;
35
+ /** The nib's width at a speed (world units per second) and, from a stylus, a pressure in 0 … 1. */
36
+ export declare function nibWidth(law: PenLaw, speed: number, pressure: number | null): number;
37
+ /** A page point → its raster's texel (the page is `len` wide and `height` tall in world units). */
38
+ export declare function texelOf(p: {
39
+ readonly s: number;
40
+ readonly y: number;
41
+ }, len: number, height: number): readonly [number, number];
42
+ /** Texels per world unit across the page — a nib's width in the raster. */
43
+ export declare const texelsPerUnit: (len: number) => number;
44
+ /**
45
+ * The nib's width at each sample (D3t-b) — the pen's law over the hand's pace, as the prototype's pen laid it (lab/notebook.ts
46
+ * `penTo`): the first at rest; each sample that moved at least `still` from the last that did takes 0.6 of that one's width and
47
+ * 0.4 of the law's at the pace between them; one nearer keeps the width it had (a resting pen neither swells nor thins — the
48
+ * prototype dropped such a sample, the data keeps it). Timed samples (ms from the first) read their own clocks; untimed ones are
49
+ * spaced by `speed` (world units/s) as the board's replay spaces an old stroke. Square roots and the four operations only: the
50
+ * widths are bit-identical wherever they are computed (the oracle's Node, the desk's Chrome).
51
+ */
52
+ export declare function nibWidths(points: readonly (readonly [number, number])[], times: readonly number[] | null, speed: number, law?: PenLaw, still?: number): number[];
53
+ /** A stroke's samples as the raster draws them: page units with the nib's width at each (`nibWidths`). */
54
+ export declare function inkPoints(points: readonly (readonly [number, number])[], times: readonly number[] | null, speed: number, law?: PenLaw): InkPoint[];
55
+ /** The page a side of the open spread shows (D3t-b): the right is its top sheet's recto (2i + 1), the left its top sheet's verso (2i + 2); null — an endpaper. */
56
+ export declare function pageOfSide(pose: {
57
+ readonly rightTop: number;
58
+ readonly leftTop: number;
59
+ }, side: 0 | 1): number | null;
60
+ /**
61
+ * The pages in view (the prototype's `drawBooks`): once the cover stands past the vertical, the spread — its left page, then its
62
+ * right — and both faces of every sheet in the air (a turn, the peek); none while the book is shut.
63
+ */
64
+ export declare function pagesInView(pose: {
65
+ readonly rightTop: number;
66
+ readonly leftTop: number;
67
+ readonly airs: readonly {
68
+ readonly index: number;
69
+ }[];
70
+ }, swing: number): number[];
@@ -0,0 +1,236 @@
1
+ import { type Entity, type HeldToolApi, type HeldToolDef } from "../../../core/src/index";
2
+ import { type MatPass, type MarkFrame, type DeskEye, type BuiltMesh, MeshWriter, type Rigid, type ShaderText, LayeredKind } from "../../../desk/src/kit/index";
3
+ import { type KindPass, type KindProgram, type SlotContext, type Palette, type RGB, type RGBA, type TokenRef, type KindHost, type KindLocal, type ObjectHit, type ObjectKind } from "../../../desk/src/index";
4
+ import { type NotebookLaw } from "./law";
5
+ import { type NotebookLook } from "./layout";
6
+ import { type NotebookMotion } from "./motion";
7
+ import { type InkTable, type LiveStroke, PageInk, type PageStroke } from "./pages";
8
+ import { type NotebookDraw, NotebookPass } from "./pass";
9
+ import { type NotebookHit } from "./pick";
10
+ import { type Frame, type NotebookPose } from "./shape";
11
+ /** The notebook's kind name — its key in the registry and in every slot's `objects`. */
12
+ export declare const NOTEBOOK_KIND = "notebook";
13
+ export declare class NotebookKind extends LayeredKind<NotebookDraw, NotebookPass> {
14
+ /** The notebook's law — its eye, its light and shadow, its lift: the host's (a lab's panel edits it); `NOTEBOOK` until one says. */
15
+ law: NotebookLaw;
16
+ /** The ruling's ink and its presence on the page — the PRODUCT's colour (the theme gate): a host sets it before a book draws. */
17
+ ruleInk: RGBA | null;
18
+ /** Root only (D-D18): a spawned slot's pass — a mini mat's inside, a flight's departed desk — holds nothing and draws nothing. */
19
+ spawn(_mat: MatPass): NotebookKind;
20
+ /**
21
+ * A slot's own pass of this kind takes the ROOT's host-set state before it prepares (its law and the ruling's ink): a spawned pass draws nothing, but a
22
+ * slot that made its own from the program — the tray's specimen (design-017 §8, K5a) — draws with the desk's.
23
+ */
24
+ tune(root: KindPass<unknown>): void;
25
+ /** The pass's own `prepare`, as the prototype's lab called it: the slot's camera, grid, clocks and light, the desk eye over the slot's view, the law, the colours. */
26
+ protected prepareOwn(pass: NotebookPass, s: SlotContext, records: readonly NotebookDraw[]): number;
27
+ }
28
+ /** The notebook's program for a host's shader text: its pass made on the root's mat; its objects one composite run, last in `things`. */
29
+ export declare function notebookProgram(text: ShaderText): KindProgram<NotebookDraw>;
30
+ /**
31
+ * What the notebook's kind takes from the host's palette (NOTEBOOK.md's covers): the page, the ruling's ink and its
32
+ * presence, and each cover by name — its cloth, band, three accents, endpaper, its design and whether it is paper. Its
33
+ * pens' inks (D3t-b) are the note's — the palette's `pens` (kinds/paper.ts `PaperPalette`), by name.
34
+ */
35
+ export interface NotebookPalette extends Palette {
36
+ readonly notebooks?: {
37
+ readonly paper: TokenRef;
38
+ readonly ink: TokenRef;
39
+ /** The ruling's presence on the page (the dots, the rules), 0 … 1. */
40
+ readonly rule: number;
41
+ readonly covers: Readonly<Record<string, {
42
+ readonly cloth: TokenRef;
43
+ readonly band: TokenRef;
44
+ readonly a: TokenRef;
45
+ readonly b: TokenRef;
46
+ readonly c: TokenRef;
47
+ readonly endpaper: TokenRef;
48
+ readonly design: NotebookLook["design"];
49
+ readonly paperCover: boolean;
50
+ }>>;
51
+ };
52
+ readonly pens?: Readonly<Record<string, TokenRef>>;
53
+ }
54
+ /** The notebook's look for a theme, parsed: each cover's `NotebookLook`, the ruling's ink with its presence; the pens' inks (sRGB) and each pen tool's swatch (D3t-b). */
55
+ export interface NotebookObjectLook {
56
+ readonly covers: Readonly<Record<string, NotebookLook>>;
57
+ readonly ruleInk: RGBA;
58
+ readonly pens: Readonly<Record<string, RGB>>;
59
+ readonly swatches: Readonly<Record<string, string>>;
60
+ }
61
+ /** A book's still, pinned on the kind's own state (a FLUX pin — D-D2a-world.5): open (or a swing, 0 … 1), a sheet mid-turn, the peek, the tilt. */
62
+ export interface BookPose {
63
+ readonly open?: boolean | number;
64
+ readonly turn?: {
65
+ readonly dir: 1 | -1;
66
+ readonly phi: number;
67
+ readonly psi: number;
68
+ readonly twist?: number;
69
+ };
70
+ readonly peek?: number;
71
+ readonly tilt?: readonly [number, number];
72
+ }
73
+ /** A book as the builder resolved it: what its record draws, and what its hit reads — the same eye the pass draws with. */
74
+ export interface NotebookGeometry {
75
+ readonly frame: Frame;
76
+ readonly pose: NotebookPose;
77
+ readonly mesh: BuiltMesh;
78
+ readonly version: number;
79
+ readonly rigid: Rigid;
80
+ readonly lamp: readonly [number, number, number];
81
+ readonly theta: number;
82
+ readonly ring: number;
83
+ readonly eye: DeskEye;
84
+ readonly fade: number;
85
+ /** Where it lies: the case's centre on the mat and its turn (the placement's, before the lift and the tilt). */
86
+ readonly cx: number;
87
+ readonly cy: number;
88
+ readonly angle: number;
89
+ /** In hand (D3t-b): its hit answers parts — a turn, the pen's page, the case. */
90
+ readonly held: boolean;
91
+ /** Its pages can turn (open, the cover landed) — the turn parts exist only then. */
92
+ readonly turnable: boolean;
93
+ /** The law it was resolved under (the hit, the hand's pick). */
94
+ readonly law: NotebookLaw;
95
+ }
96
+ /** The notebook's own state on one desk: each book's id, mesh and pinned pose, the carry's tilt; the ruling's ink on the root pass; in hand (D3t-b) its sheets' motion, the pen's stroke and the pages' ink. */
97
+ export interface Books extends KindLocal {
98
+ /** When the kind is next live (K7a — `KindLocal.due`, declared: the six built-ins all say). */
99
+ due(now: number): number;
100
+ /** A still's pose on `e` (undefined unpins). */
101
+ pin(e: Entity, pose: BookPose | undefined): void;
102
+ /** The world half's: the book's pin and its tilt state. */
103
+ state(e: Entity): BookState;
104
+ /** The world half's: the mesh for a pose, rebuilt only when the pose moved. */
105
+ meshFor(e: Entity, F: Frame, pose: NotebookPose, law: NotebookLaw): {
106
+ readonly mesh: BuiltMesh;
107
+ readonly version: number;
108
+ };
109
+ /** The world half's: the ruling's ink on the root pass — the product's colour (the theme gate). */
110
+ ink(rule: RGBA): void;
111
+ /** The pages' ink on this desk — the pass's eight layers, a cache of the strokes (a witness's door: its replays, a page's raster). */
112
+ readonly pages: PageInk;
113
+ /** A book's strokes on a page as its raster draws them — the children's, in order, then the stroke the pen lifted until it lands. */
114
+ strokesOn(e: Entity, page: number): readonly PageStroke[];
115
+ /** The world half's: the ink table for a resolved book — its pages in view with ink, each on a layer, brought up to its strokes. */
116
+ table(e: Entity, G: NotebookGeometry, look: NotebookObjectLook): InkTable;
117
+ /** The pen (D3t-b): its stroke in hand on `e` — begun (its samples grow in place, laid a segment at a time) or dropped (null). */
118
+ write(e: Entity, live: LiveStroke | null): void;
119
+ /** The pen lifted its stroke, whose cell will read `key`: drawn to its end, then ADOPTED when its child lands (no replay). */
120
+ lift(e: Entity, key: string): void;
121
+ /** Its transaction was refused (a read-only document, the book gone): the page is its children's again. */
122
+ refuse(e: Entity): void;
123
+ /** The spread the hand asks for (a turn by hand, a click, a key), until its transaction lands; null — the document's again. */
124
+ ask(e: Entity, spread: number | null): void;
125
+ /** The hand moved the book's sheets (a sheet in the hand, the peek): the next frame builds. */
126
+ stir(e: Entity): void;
127
+ /** On a portrait phone, the page of the spread in view (D3t-b — page by page): 0 the right, 1 the left; sprung (the view glides to it). */
128
+ face(e: Entity, side: 0 | 1): void;
129
+ }
130
+ interface BookState {
131
+ readonly id: number;
132
+ pose: BookPose | undefined;
133
+ /** The carry's tilt (radians about x and y), sprung into the rect's motion; where the rect was. */
134
+ tiltX: number;
135
+ tiltXV: number;
136
+ tiltY: number;
137
+ tiltYV: number;
138
+ lastX: number;
139
+ lastY: number;
140
+ /** The cover IN HAND (D4b): its swing 0 shut … 1 open on the hand's spring, and its velocity. */
141
+ coverT: number;
142
+ coverV: number;
143
+ writer: MeshWriter | null;
144
+ mesh: BuiltMesh | null;
145
+ key: string;
146
+ version: number;
147
+ /** IN HAND (D3t-b): the sheets' motion, kept from frame to frame (null on the desk and in a still). */
148
+ motion: NotebookMotion | null;
149
+ /** The spread the hand asked for, until the document says it (null: the document's). */
150
+ pending: number | null;
151
+ /** The pen's stroke in hand, and the one it lifted until its child lands (with the page's stroke count at the lift). */
152
+ live: LiveStroke | null;
153
+ adopt: {
154
+ readonly page: number;
155
+ readonly stroke: PageStroke;
156
+ readonly at: number;
157
+ } | null;
158
+ /** The book's strokes by page, as of the children's stamp — and each decoded once (by `pageStrokeKey`), kept while it is the book's. */
159
+ byPage: Map<number, PageStroke[]>;
160
+ decoded: Map<string, PageStroke>;
161
+ stamp: number;
162
+ /** The last frame in hand moved a sheet or the peek, or has turns to go: the next asks a frame too. */
163
+ stirring: boolean;
164
+ /** The phone's page in view (0 the right … 1 the left), sprung toward `faceT`. */
165
+ face: number;
166
+ faceV: number;
167
+ faceT: 0 | 1;
168
+ }
169
+ /** The notebook's `local()`. */
170
+ export declare function createBooks(host: KindHost): Books;
171
+ /** A page of the law's book, open: its width out of the gutter and its height, page units — what a page's raster spans (`INK_W × INK_H`). */
172
+ export declare const NOTEBOOK_PAGE: {
173
+ readonly len: number;
174
+ readonly height: number;
175
+ };
176
+ /** A book's DEFAULT turn on the mat when a host lays one: the lab's `makeBook` (never set down quite square). */
177
+ export declare const bookAngle: (seed: number) => number;
178
+ /**
179
+ * How far a book's drawing reaches past its closed case, world units: the open spread to its left (a cover and the
180
+ * spine), the lift (held and opening) seen through the desk eye and cast along the lamp's capped slope, blurred.
181
+ */
182
+ export declare function notebookReach(law?: NotebookLaw): number;
183
+ /**
184
+ * A book's silhouette for the desk's marks (D4a — the brackets, a member's ticks, the tape): the footprint of its case on
185
+ * the mat at its turn — the closed case W × H about the book's centre and, as the cover swings over, the cover's own
186
+ * footprint beside it (open, the whole spread) — with the fore-edge's corner. The height's parallax aside, as the print's:
187
+ * the marks go around where the book LIES. The oracle's marks read the same function (oracle/frame.mjs).
188
+ */
189
+ export declare function bookFrame(F: Frame, theta: number, cx: number, cy: number, angle: number): MarkFrame;
190
+ /** The notebook's silhouette on a resolved book (`bookFrame` on its geometry). */
191
+ export declare const notebookFrame: (G: NotebookGeometry) => MarkFrame;
192
+ /** The page (and where on it) under a desk point of a resolved book — the pick through the SAME eye the pass drew it with (the hand's). */
193
+ export declare const pageHitAt: (G: NotebookGeometry, wx: number, wy: number) => NotebookHit | null;
194
+ /** A page hit's share of the page that TURNS it (the outer `turnZone` of its length — NOTEBOOK.md §7). */
195
+ export declare const inTurnZone: (h: NotebookHit, law: NotebookLaw) => boolean;
196
+ /**
197
+ * A held book's PART under a hit (D3t-b): a page's outer 30 % that has a sheet to turn — `turn`; the rest of a page that takes
198
+ * ink — `content`, the pen's (a mode in hand makes a press there the tool's); the case, the endpapers — `frame`, the book itself
199
+ * (two taps put it down — the notebook's case rule).
200
+ */
201
+ export declare function partOf(G: NotebookGeometry, h: NotebookHit): ObjectHit;
202
+ /** The pens a notebook is written with — the NOTE's (objects/note.ts `PENS`, STICKY.md §3): names; the inks are the host's. */
203
+ export declare const NOTEBOOK_PENS: readonly ["felt", "ball", "fountain", "red"];
204
+ /** The pen in hand when a book is picked up (the note's own default). */
205
+ export declare const DEFAULT_PEN = "fountain";
206
+ /** A pen's tool id in the held bar ("pen:fountain"). */
207
+ export declare const penToolId: (pen: string) => string;
208
+ /** The pen a tool id names, or undefined. */
209
+ export declare const penOfTool: (id: string) => string | undefined;
210
+ /**
211
+ * Runtime, on the notebook in hand (D3t-b): the pages the keys and the bar asked to turn — a running count, +1 a page on, −1 a
212
+ * page back. The hand (objects/leaf.ts) turns by what the count moved since it last looked: a tool writes a fact, the hand
213
+ * turns (a spread of turns — a sheet each frame — fans; on a portrait phone a step is ONE page). The user's, never the document's.
214
+ */
215
+ export declare const PageTurns: import("@vibecook/strata-ecs").Component<import("@vibecook/strata-ecs").ValueOf<{
216
+ readonly n: import("@vibecook/strata-ecs").FieldSpec<"f64", true>;
217
+ }>, {
218
+ readonly n: import("@vibecook/strata-ecs").FieldSpec<"f64", true>;
219
+ }>;
220
+ /** Ask for a turn: the count moves by `dir` (a tool's op — a runtime write, as the tool in hand is). */
221
+ export declare function askTurn(api: Pick<HeldToolApi, "world" | "entity">, dir: 1 | -1): void;
222
+ /**
223
+ * The notebook's tools in hand (*Marks on the Mat* v2's held bar, `heldBarHTML`): ‹ and › (← → and PageUp/PageDown) — a page
224
+ * back, a page on; the four pens (`1`–`4`) — MODES, the tool in hand, the cursor a crosshair over a page (NOTEBOOK.md §7); undo
225
+ * (⌘Z) and, on keys alone, redo (⇧⌘Z) — the DOCUMENT's history over the book's strokes (a stroke is one transaction), waiting
226
+ * for a stroke in hand to land. A turn is never on the undo stack (D-D3t-b.2): ⌘Z takes back ink, never a page.
227
+ */
228
+ export declare const NOTEBOOK_TOOLS: readonly HeldToolDef[];
229
+ export interface NotebookKindOptions {
230
+ readonly text?: ShaderText;
231
+ /** The notebook's numbers (notebook/law.ts `NOTEBOOK`) — the engine's unless a host tweaks them. */
232
+ readonly law?: NotebookLaw;
233
+ }
234
+ /** The notebook's kind, whole (kinds/world.ts `ObjectKind`): the program, and the world half on the lab's own book. */
235
+ export declare function notebookKind(opts?: NotebookKindOptions): ObjectKind<NotebookGeometry, NotebookDraw, NotebookObjectLook>;
236
+ export {};
@@ -0,0 +1,129 @@
1
+ export interface NotebookLaw {
2
+ /** The case: the cover's width × height, a board's thickness, its fore-edge corner radius. */
3
+ readonly cover: {
4
+ readonly width: number;
5
+ readonly height: number;
6
+ readonly board: number;
7
+ readonly radius: number;
8
+ };
9
+ /** The text block: sheets and their thickness; the squares (the case's overhang past the pages); the joint (the gap between the spine and the first page when closed); a page's fore-edge corner radius. */
10
+ readonly block: {
11
+ readonly sheets: number;
12
+ readonly sheet: number;
13
+ readonly square: number;
14
+ readonly joint: number;
15
+ readonly radius: number;
16
+ };
17
+ /** The quarter binding: the spine band's width on the face; the spine's bulge when closed. */
18
+ readonly spine: {
19
+ readonly band: number;
20
+ readonly bulge: number;
21
+ };
22
+ /**
23
+ * The GUTTER, open: every sheet is bound at one line and rises from it to its own height in the
24
+ * stack. A sheet leaves the binding at `entry0 + entryPer · rise` radians (at most `entryMax`) and
25
+ * bends flat — so a thick stack climbs steeply out of the valley and a thin one barely dips, and
26
+ * the upper sheets' fore-edges are drawn in toward the gutter more than the lower ones' (the fan
27
+ * a real open notebook shows). `dip` is the least a page falls into the valley even when its
28
+ * stack is thin (the binding pulls every page down).
29
+ */
30
+ readonly gutter: {
31
+ readonly entry0: number;
32
+ readonly entryPer: number;
33
+ readonly entryMax: number;
34
+ readonly dip: number;
35
+ };
36
+ /**
37
+ * The desk EYE: the camera stays top-down, but what rises off the mat is seen from a point above
38
+ * the view's centre, so a lifted book grows and a standing cover keystones — the desk plane
39
+ * itself maps exactly as the ortho camera maps it. The eye stands `k` view-diagonals up (a fixed
40
+ * field of view when zoomed out), never nearer than `min` world units (the perspective of a book
41
+ * held close stays a book's, not a fish-eye's).
42
+ */
43
+ readonly eye: {
44
+ readonly k: number;
45
+ readonly min: number;
46
+ };
47
+ /** The lamp's shading: the sky's share where the lamp is blocked or faced away, and how far a face turned toward it may brighten over a flat one. */
48
+ readonly light: {
49
+ readonly ambient: number;
50
+ readonly cap: number;
51
+ };
52
+ /**
53
+ * The SHADOW — the desk's one law (the note's, PAPER.shadow, and the photo's): a penumbra σ at
54
+ * contact that grows per unit of height between the caster and the receiver; its darkness on
55
+ * the mat; the slope's cap (a book far from the lamp keeps a finite shadow). Plus a CONTACT term
56
+ * (ambient occlusion where the case meets the mat) that lets go as the book rises.
57
+ */
58
+ readonly shadow: {
59
+ readonly sigma0: number;
60
+ readonly perUnit: number;
61
+ readonly alpha: number;
62
+ readonly slopeMax: number;
63
+ readonly contact: {
64
+ readonly sigma: number;
65
+ readonly alpha: number;
66
+ readonly reach: number;
67
+ };
68
+ };
69
+ /** How much of the leaves' dapple a page takes (1 = the mat's own) — the palm must not blind the writing. */
70
+ readonly dapple: {
71
+ readonly page: number;
72
+ readonly cover: number;
73
+ };
74
+ /** The lift: a held book rises `held` units and tilts into its motion (radians per unit of CSS px/s, capped). Opening, it rises `open` units while the cover stands, and settles as it lands. Under the pointer a closed book rises `hover` — an invitation to pick it up. */
75
+ readonly lift: {
76
+ readonly held: number;
77
+ readonly open: number;
78
+ readonly hover: number;
79
+ readonly tiltPer: number;
80
+ readonly tiltMax: number;
81
+ };
82
+ /** The springs (Hz, damping ratio): the cover's swing, a sheet's root and its free edge, the lift, the tilt, the corner's peek, the ring. */
83
+ readonly springs: {
84
+ readonly cover: readonly [number, number];
85
+ readonly root: readonly [number, number];
86
+ readonly edge: readonly [number, number];
87
+ readonly lift: readonly [number, number];
88
+ readonly tilt: readonly [number, number];
89
+ readonly peek: readonly [number, number];
90
+ readonly ring: readonly [number, number];
91
+ };
92
+ /** A sheet's bend: how its angle travels from the root to the free edge (1 = a circular arc; more = the edge curls most). */
93
+ readonly bend: number;
94
+ /** The corner's peek on hover: the free edge's lift (rad) and the twist that keeps it to one corner; the zone that invites it (units from the corner). */
95
+ readonly peek: {
96
+ readonly angle: number;
97
+ readonly twist: number;
98
+ readonly zone: number;
99
+ };
100
+ /** A page's outer share that turns it on a click (the rest of the page is for the pen). */
101
+ readonly turnZone: number;
102
+ /** The flutter as a book lands open: the first sheets' kick (rad/s), falling off by sheet. */
103
+ readonly flutter: {
104
+ readonly kick: number;
105
+ readonly sheets: number;
106
+ };
107
+ /** The paper: fibre and mottle (±/255), the tooth's relief, the cockle (units), the ruling (units). */
108
+ readonly paper: {
109
+ readonly fibre: number;
110
+ readonly mottle: number;
111
+ readonly tooth: number;
112
+ readonly cockle: number;
113
+ readonly pitch: number;
114
+ readonly dot: number;
115
+ readonly margin: number;
116
+ };
117
+ /** The cloth: the weave's pitch (units), its relief, the sheen (blinn exponent, strength). */
118
+ readonly cloth: {
119
+ readonly pitch: number;
120
+ readonly relief: number;
121
+ readonly sheen: readonly [number, number];
122
+ };
123
+ /** The selection ring on the mat around a selected book: offset from the footprint, width (CSS px). */
124
+ readonly ring: {
125
+ readonly offset: number;
126
+ readonly width: number;
127
+ };
128
+ }
129
+ export declare const NOTEBOOK: NotebookLaw;
@@ -0,0 +1,46 @@
1
+ import type { RGB, RGBA } from "../../../desk/src/index";
2
+ import type { NotebookLaw } from "./law";
3
+ export { NbBook, NbUniforms } from "../../../desk/src/kit/index";
4
+ export declare const MAX_NOTEBOOKS = 32;
5
+ /** Books with a shadow map of their own (the rest cast the contact only). */
6
+ export declare const MAX_SHADOWED = 8;
7
+ export declare const SHADOW_RES = 1024;
8
+ export type Ruling = "plain" | "dots" | "rules" | "grid";
9
+ export declare const RULINGS: readonly Ruling[];
10
+ export type Design = "plain" | "orbit" | "tiles" | "label" | "bordered";
11
+ export declare const DESIGNS: readonly Design[];
12
+ /**
13
+ * A notebook's LOOK — the host's colours (lab/theme.ts `NOTEBOOK_LOOK`) and its choices: the
14
+ * cloth, the band, three accents the design prints with, the endpaper, the page, the print's
15
+ * ink; the design; whether the cover is paper rather than cloth.
16
+ */
17
+ export interface NotebookLook {
18
+ readonly cloth: RGB;
19
+ readonly band: RGB;
20
+ readonly accents: readonly [RGB, RGB, RGB];
21
+ readonly endpaper: RGB;
22
+ readonly paper: RGB;
23
+ readonly ink: RGB;
24
+ readonly design: Design;
25
+ readonly paperCover: boolean;
26
+ }
27
+ export declare const rulingCode: (r: Ruling) => number;
28
+ export declare const designCode: (d: Design) => number;
29
+ /** The pass's knobs by name, from the law and the host's colours. */
30
+ export declare function nbUniformValues(law: NotebookLaw, eye: {
31
+ eye: number[];
32
+ view: number[];
33
+ }, dpr: number, cast: RGB, select: RGB, ruleInk: RGBA): {
34
+ eye: number[];
35
+ view: number[];
36
+ light: number[];
37
+ shadow: number[];
38
+ shadow2: number[];
39
+ paper: number[];
40
+ rule: number[];
41
+ cloth: number[];
42
+ castCol: number[];
43
+ select: number[];
44
+ ruleInk: number[];
45
+ ring: number[];
46
+ };
@@ -0,0 +1,44 @@
1
+ import { type Component, type Entity, type World } from "../../../core/src/index";
2
+ import { type Books } from "./kind";
3
+ import { type TypingDocs } from "../../../desk/src/index";
4
+ /** The notebook's props cell (`desk.notebook:props` — its `spread` the durable fact a completed turn moves). */
5
+ export interface NotebookHandOptions {
6
+ readonly world: World;
7
+ /** The document a stroke commits into — the facade's `engine.docs`. */
8
+ readonly docs: TypingDocs;
9
+ /** The notebook's props cell (its `spread`) — the object hands its own (D-D7-A.3); absent, the spread reads 0. */
10
+ readonly props?: Component | undefined;
11
+ /** The notebook kind's state on this desk (undefined before it is made). */
12
+ readonly books: () => Books | undefined;
13
+ /** Is this entity a notebook (the desk's builder knows each entity's kind). */
14
+ readonly isBook: (e: Entity) => boolean;
15
+ /** A point of the held object's own frame as a desk point, through the pose the last frame drew (the builder's). */
16
+ readonly heldToWorld: (e: Entity, x: number, y: number) => readonly [number, number] | undefined;
17
+ /** The geometry the book was drawn with in hand (the builder's). */
18
+ readonly geometryOf: (e: Entity) => unknown;
19
+ /** Where a transaction runs: out of the frame (a microtask) unless a test says. */
20
+ readonly defer?: (fn: () => void) => void;
21
+ }
22
+ export interface NotebookHand {
23
+ /** Once a frame, before the kinds' clocks: the hand onto the book in hand — its stroke laid, lifted, committed. */
24
+ follow(now: number): void;
25
+ /** Nothing to follow (D7 #14): no book in hand, no stroke laid, no turn in progress. */
26
+ idle(): boolean;
27
+ /** The stroke in hand: its book, its page and how many samples so far; null when none. */
28
+ live(): {
29
+ readonly book: Entity;
30
+ readonly page: number;
31
+ readonly samples: number;
32
+ } | null;
33
+ /** Strokes committed since creation (a rig's witness). */
34
+ commits(): number;
35
+ /** The turn in the hand: its book, the side it was taken from, the sheet held (null until the hand has travelled); null when none. */
36
+ turning(): {
37
+ readonly book: Entity;
38
+ readonly side: 0 | 1;
39
+ readonly sheet: number | null;
40
+ } | null;
41
+ /** Spreads written since creation — each completed turn one transaction (a rig's witness). */
42
+ turns(): number;
43
+ }
44
+ export declare function createNotebookHand(opts: NotebookHandOptions): NotebookHand;
@@ -0,0 +1,20 @@
1
+ import { type BuiltMesh, type MeshWriter } from "../../../desk/src/kit/index";
2
+ import type { NotebookLaw } from "./law";
3
+ import { type Frame, type NotebookPose } from "./shape";
4
+ /** The materials, by the number a vertex carries. */
5
+ export declare const MAT: {
6
+ readonly cover: 0;
7
+ readonly endpaper: 1;
8
+ readonly board: 2;
9
+ readonly page: 3;
10
+ readonly edge: 4;
11
+ readonly spine: 5;
12
+ readonly ribbon: 6;
13
+ };
14
+ export { type BuiltMesh, FLAG_TWO_SIDED, MeshWriter, VERTEX_BYTES, VERTEX_FLOATS } from "../../../desk/src/kit/index";
15
+ /**
16
+ * The whole notebook for a pose, into the writer (reset first). The back board never moves;
17
+ * the front board swings on the spine's arc; the stacks sit on their boards; the sheets in the
18
+ * air turn between them. Bounds are tracked as it writes.
19
+ */
20
+ export declare function buildMesh(m: MeshWriter, F: Frame, pose: NotebookPose, law: NotebookLaw): BuiltMesh;
@@ -0,0 +1,107 @@
1
+ import type { NotebookLaw } from "./law";
2
+ import type { NotebookPose } from "./shape";
3
+ export interface SheetMotion {
4
+ /** Where it rests, or is heading when in the air: 0 right, 1 left. */
5
+ side: 0 | 1;
6
+ air: boolean;
7
+ phi: number;
8
+ phiV: number;
9
+ psi: number;
10
+ psiV: number;
11
+ tw: number;
12
+ twV: number;
13
+ /** Held by the pointer: the pinch's angle (and its pace, from the hand) set the sheet; its twist follows the hand. */
14
+ held: boolean;
15
+ psiT: number;
16
+ twT: number;
17
+ /** The held sheet's pinch angle, its pace (rad/s, smoothed), and the side it was taken from. */
18
+ grip: number;
19
+ gripV: number;
20
+ from: 0 | 1;
21
+ }
22
+ export interface NotebookMotion {
23
+ opened: boolean;
24
+ theta: number;
25
+ thetaV: number;
26
+ held: boolean;
27
+ lift: number;
28
+ liftV: number;
29
+ /** The tilt (radians about x and y) and where the hand's motion asks it to be. */
30
+ tiltX: number;
31
+ tiltXV: number;
32
+ tiltY: number;
33
+ tiltYV: number;
34
+ tiltTX: number;
35
+ tiltTY: number;
36
+ selected: boolean;
37
+ ring: number;
38
+ ringV: number;
39
+ sheets: SheetMotion[];
40
+ /** The corner's peek: its amount and which corner (+1 the tail's, −1 the head's). */
41
+ peek: number;
42
+ peekV: number;
43
+ peekOn: boolean;
44
+ peekSide: 1 | -1;
45
+ /** The landing flutter has played for this opening. */
46
+ fluttered: boolean;
47
+ /** The pointer is over the (closed) book: it rises a little. */
48
+ hover: number;
49
+ hoverV: number;
50
+ hoverOn: boolean;
51
+ }
52
+ /** A notebook at rest: closed (or open), `left` sheets turned. */
53
+ export declare function newMotion(sheets: number, left?: number, opened?: boolean): NotebookMotion;
54
+ /** The lowest index resting on the right — its recto is the right page; −1 when none. */
55
+ export declare function rightTop(m: NotebookMotion): number;
56
+ /** The highest index resting on the left — its verso is the left page; −1 when none. */
57
+ export declare function leftTop(m: NotebookMotion): number;
58
+ /** Sheets resting on each side. */
59
+ export declare function counts(m: NotebookMotion): {
60
+ right: number;
61
+ left: number;
62
+ };
63
+ /** The spread as a reader names it: the left page's number (0 = the endpaper) and the right's. */
64
+ export declare function spreadOf(m: NotebookMotion): {
65
+ left: number;
66
+ right: number;
67
+ };
68
+ export declare const anyAir: (m: NotebookMotion) => boolean;
69
+ /** A page may turn only in an open book whose cover has landed. */
70
+ export declare const turnable: (m: NotebookMotion) => boolean;
71
+ /**
72
+ * Turn a page: forward (+1) lifts the right stack's top sheet, back (−1) the left's. A turn the
73
+ * other way while sheets are still flying the first way sends the last of them back instead —
74
+ * sheets are bound in order and can never cross. The edge is kicked up first. False when
75
+ * there is nothing to turn.
76
+ */
77
+ export declare function turnPage(m: NotebookMotion, dir: 1 | -1, law: NotebookLaw): boolean;
78
+ /** Take hold of the top sheet on a side (0 the right page, 1 the left) — a drag begins. Null when there is none or sheets are flying. */
79
+ export declare function grabSheet(m: NotebookMotion, side: 0 | 1): number | null;
80
+ /**
81
+ * The hand moves a held sheet: the page is pinched at arc length `sGrab` from the gutter, and the
82
+ * pointer is at `xLocal` across the book (right-model x). The pinch follows the pointer's x — its
83
+ * angle about the gutter is the GRIP — and the sheet bows toward the hand: the edge leads the
84
+ * root by a bend that is most while the sheet stands and nothing while it lies. `yFrac` (−1 the
85
+ * head … +1 the tail) is where along the page the pinch is: that corner leads. `dt` is the time
86
+ * since the last move (the grip's pace, which a release reads).
87
+ */
88
+ export declare function dragSheet(m: NotebookMotion, i: number, xLocal: number, xg: number, sGrab: number, _len: number, yFrac: number, law: NotebookLaw, dt?: number): void;
89
+ /** Let go of a held sheet: it goes where the hand was taking it — flung, or past the vertical — else back. */
90
+ export declare function releaseSheet(m: NotebookMotion, i: number): void;
91
+ /** Open or close. Closing lands every sheet in the air on the side it was heading. */
92
+ export declare function setOpen(m: NotebookMotion, open: boolean): void;
93
+ /**
94
+ * The SHEETS and the PEEK alone, by dt seconds (D3t-b): a book in hand, whose cover, lift and tilt are the hand's (kinds/notebook.ts
95
+ * — the cover on the palm's spring), keeps its sheets' springs here — the same substeps `stepMotion` takes. True while any moves.
96
+ */
97
+ export declare function stepLeaves(m: NotebookMotion, dt0: number, law: NotebookLaw): boolean;
98
+ /** Advance every spring by dt seconds; true while anything still moves. */
99
+ export declare function stepMotion(m: NotebookMotion, dt0: number, law: NotebookLaw): boolean;
100
+ /** The hand's velocity (CSS px / s) → the tilt it asks for: the leading edge dips, capped. */
101
+ export declare function tiltToward(m: NotebookMotion, vx: number, vy: number, law: NotebookLaw): void;
102
+ /** The pose the mesh is built for: the swing, the stacks' counts and tops, the sheets in the air (a peek is one). */
103
+ export declare function poseOf(m: NotebookMotion, law: NotebookLaw): NotebookPose;
104
+ /** The pose with the desk under the book (−its lift, in its own z): what the ribbon hangs to. */
105
+ export declare const withDesk: (p: NotebookPose, lift: number) => NotebookPose;
106
+ /** A key that changes whenever the pose would build a different mesh. */
107
+ export declare function poseKey(p: NotebookPose): string;