@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,229 @@
1
+ import type { RenderTarget, RGB } 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 { CalendarLaw } from "./law";
4
+ import { type CalendarColours } from "./layout";
5
+ import { type PadFrame } from "./pad";
6
+ import type { RollState } from "./roll";
7
+ import type { CalendarShaders } from "./shaders";
8
+ import { type TileGrid } from "./tiles";
9
+ /** A box on a sheet, x0 y0 x1 y1 (sheet units); absent = none. */
10
+ export type SheetBox = readonly [number, number, number, number];
11
+ /** One sheet in play: where its grid is printed and which rows and days it has, and its tile table. */
12
+ export interface SheetDraw {
13
+ readonly x0: number;
14
+ readonly y0: number;
15
+ readonly cw: number;
16
+ readonly ch: number;
17
+ readonly rows: number;
18
+ /** Bit c set: column c is a weekend. */
19
+ readonly weekends: number;
20
+ readonly lead: number;
21
+ readonly days: number;
22
+ /** Its page table's slot (0 … TABLE_SLOTS − 1). */
23
+ readonly slot: number;
24
+ }
25
+ /** One calendar as the pass draws it this frame. */
26
+ export interface CalendarDraw {
27
+ readonly id: number;
28
+ readonly frame: PadFrame;
29
+ /** The pad's static mesh (pad.ts `buildPad`: its solid parts, then from `sheetFirst` its paper), and its version — the upload's key. */
30
+ readonly mesh: BuiltMesh & {
31
+ readonly sheetFirst: number;
32
+ readonly rollFirst: number;
33
+ };
34
+ readonly version: number;
35
+ readonly rigid: Rigid;
36
+ /** The unit direction toward the lamp (world). */
37
+ readonly lamp: readonly [number, number, number];
38
+ readonly lift: number;
39
+ /** The ring's presence, 0 … 1. */
40
+ readonly ring: number;
41
+ readonly base: SheetDraw;
42
+ /** The sheet in motion and its roll, or none. */
43
+ readonly moving: SheetDraw | null;
44
+ readonly roll: RollState | null;
45
+ /** Which sheet the host's marks are on: 0 the base, 1 the moving sheet. */
46
+ readonly marksOn: 0 | 1;
47
+ readonly sel: readonly SheetBox[];
48
+ readonly mark: SheetBox | null;
49
+ readonly drop: SheetBox | null;
50
+ /** The caret: x, top, bottom, width — or none. */
51
+ readonly caret: readonly [number, number, number, number] | null;
52
+ /** The newest glyph's box and its progress (0 … 1). */
53
+ readonly wipe: {
54
+ readonly box: SheetBox;
55
+ readonly t: number;
56
+ } | null;
57
+ readonly colours: CalendarColours;
58
+ /** The look's print presences — the pass's fallback where no host set its own (a record made without the desk's local: a tray specimen, K5a). */
59
+ readonly alpha?: {
60
+ readonly rule: number;
61
+ readonly head: number;
62
+ readonly weekend: number;
63
+ readonly outside: number;
64
+ };
65
+ }
66
+ export interface CalendarStats {
67
+ readonly calendars: number;
68
+ readonly moving: number;
69
+ }
70
+ export declare class CalendarPass {
71
+ readonly name = "calendar/pads";
72
+ /** Tile layers in the print's texture array. */
73
+ readonly layers: number;
74
+ private readonly device;
75
+ private readonly mat;
76
+ private readonly knobs;
77
+ private readonly records;
78
+ /** What the GPU holds of the records: a prefix is written only when it changed (K4a). */
79
+ private readonly recordsSent;
80
+ private readonly knobBuf;
81
+ /** What the GPU holds of the knobs: they are written only when they change (K4a — a standing value costs a frame nothing). */
82
+ private readonly knobsSent;
83
+ private readonly recordBuf;
84
+ private tableBuf;
85
+ private readonly layoutMain;
86
+ private readonly layoutComp;
87
+ private readonly facePipe;
88
+ private readonly sheetPipe;
89
+ private readonly solidPipe;
90
+ private readonly movingPipe;
91
+ private readonly recvPipe;
92
+ private readonly compPipe;
93
+ private readonly goboSampler;
94
+ private readonly noiseSampler;
95
+ private readonly tileSampler;
96
+ private readonly paperSampler;
97
+ /** The print tiles: a placeholder until the first tile is laid (K6a — a desk with no calendar holds none of their 41 MB). */
98
+ private tileTex;
99
+ private tilesReady;
100
+ /** When a pad was last drawn: its layer targets are let go once none was for a while (the kind's tick — K6a, D-K6a.3). */
101
+ private drawnAt;
102
+ private readonly paperTex;
103
+ private readonly gridVb;
104
+ private readonly gridIb;
105
+ private readonly gridCount;
106
+ private mainGroup;
107
+ private boundAssets;
108
+ /**
109
+ * The pass whose PRINT this one samples — its own, or (K5b) the root's: a slot that made its own calendar pass (the tray's specimen)
110
+ * reads the root's tile texture and page tables, where the desk's pads print (their local writes the root pass), never a copy.
111
+ */
112
+ private print;
113
+ private boundTiles;
114
+ private boundTable;
115
+ /** The frame's target (the canvas; the hand) and the held desk copy's, apart (D7) — `t` the one this prepare is for (`use`). */
116
+ private readonly frameT;
117
+ private copyT;
118
+ private t;
119
+ private tableCount;
120
+ /** The records the last prepare turned away at the pass's cap — not drawn; the ground reports them (`GroundStats.dropped`, D7). */
121
+ dropped: number;
122
+ /** Profiling switches: 2 no print or paper detail · 4 no gobo · 8 no rolls' shade · 16 no layer on the mat · 32 no marks · 64 no tiles · 128 no mat under it · 256 no moving sheet · 512 flat colour. */
123
+ debug: number;
124
+ /**
125
+ * Turns over at every pass-wide resource a layer reads changing (K7a) — a tile, a page table, the main group made again: with the
126
+ * target's meshes' generation, the silhouette's key, what the pass lists and the box — and by CONTENT the knobs, the records and the
127
+ * slot's view block — what a target's layer is laid again by, undrawn (`BoxTargets.holds`).
128
+ */
129
+ private gen;
130
+ private readonly sig;
131
+ private readonly read;
132
+ /** Layers drawn and laid again undrawn since the pass was made (a witness). */
133
+ private layerDraws;
134
+ private layerKept;
135
+ private constructor();
136
+ static create(device: GPUDevice, format: GPUTextureFormat, src: CalendarShaders, mat: MatPass, layers?: number): Promise<CalendarPass>;
137
+ private rebind;
138
+ /** Sample `root`'s print — its tiles and page tables — rather than this pass's own (K5b: the tray's specimen reads the desk's print). */
139
+ sharePrintOf(root: CalendarPass): void;
140
+ /** Size the page tables for a sheet's tile grid (every table the same); re-makes the buffer, all entries missing. */
141
+ private fitTables;
142
+ /**
143
+ * The page tables let go (the desk has no pad — K7a, found by rig:stress: 227 KB of tables stood after the last pad left, the
144
+ * calendar kind over its 1 MB "none on the desk" line): the 16-byte stand-in again; the next sheet's grid makes them afresh.
145
+ */
146
+ releaseTables(): void;
147
+ /** A sheet's page table (a layer per tile, or MISSING / EMPTY), into its slot. */
148
+ writeTable(slot: number, grid: TileGrid, table: Int32Array): void;
149
+ /** The tiles' texture, made on the first tile laid (K6a). */
150
+ private tiles;
151
+ /** What the tiles hold on the device: 0 before the first tile and after `releaseTiles`. */
152
+ get tileBytes(): number;
153
+ /** The tiles let go (the desk has no pad): the placeholder again; the kind's tile cache starts afresh. */
154
+ releaseTiles(): void;
155
+ /** A tile's raster (the host's canvas, TILE_TEX², straight alpha) into its layer. */
156
+ uploadTile(layer: number, source: HTMLCanvasElement | OffscreenCanvas): void;
157
+ /** A tile's COMMITTED raster (RGBA bytes, TILE_TEX² × 4, straight alpha, row 0 at the top) into its layer — a host with no canvas (the Node oracle; D3t-c). */
158
+ writeTileBytes(layer: number, bytes: Uint8Array<ArrayBuffer>): void;
159
+ /** Was a pad drawn within the last `ms`? */
160
+ drawnWithin(ms: number): boolean;
161
+ /** 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). */
162
+ get lastDrawn(): number;
163
+ /** Is the frame's layer made? */
164
+ get layerMade(): boolean;
165
+ /** The layers drawn and the ones laid again undrawn (nothing they are drawn from moved) since the pass was made (K7a). */
166
+ get layerFrames(): {
167
+ readonly drawn: number;
168
+ readonly kept: number;
169
+ };
170
+ /**
171
+ * 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
172
+ * no prepare will come to sweep the ones it no longer lists).
173
+ */
174
+ releaseMeshes(): void;
175
+ /** The frame's layer targets let go (no pad drawn for a while, or none on the desk): made again at the next pad drawn. */
176
+ releaseLayer(): void;
177
+ private upload;
178
+ /**
179
+ * This frame's calendars: the mat's block, the knobs and the eye, each pad's record (placement, lamp,
180
+ * roll, sheets, marks, palette), its mesh. Returns how many will draw.
181
+ */
182
+ prepare(view: View & {
183
+ readonly dpr: number;
184
+ }, fadeIn: FadeIn, cfg: MatConfig, frame: MatFrame | undefined, light: MatLight | undefined, eye: DeskEye, law: CalendarLaw, grid: TileGrid, colours: {
185
+ readonly cast: RGB;
186
+ readonly select: RGB;
187
+ readonly alpha: {
188
+ readonly rule: number;
189
+ readonly head: number;
190
+ readonly weekend: number;
191
+ readonly outside: number;
192
+ };
193
+ }, calendars: readonly CalendarDraw[]): number;
194
+ get drawn(): CalendarStats;
195
+ /** 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. */
196
+ use(target: RenderTarget): void;
197
+ /** The hold is over: the desk copy's target gives its layer and meshes back (D7). */
198
+ endHold(): void;
199
+ /** The pads' screen box on an attachment of `size` device px, clamped to it — the layer's scissor and the composite's; null when none shows. */
200
+ private boxOf;
201
+ /** The pads' screen box of the last layer, device px [x, y, w, h] — what the composite paints at most; null: no layer to lay. */
202
+ get screenBox(): readonly [number, number, number, number] | null;
203
+ /** Draw the prepared pads into the layer (its own command buffer — submit it before the ground's). */
204
+ renderLayer(size: {
205
+ readonly w: number;
206
+ readonly h: number;
207
+ }, dpr: number): void;
208
+ /**
209
+ * Record the prepared pads into their LAYER, into `encoder` — ahead of the pass it is laid in: the host's own command buffer
210
+ * (`renderLayer`), or the desk's frame, after the mat's wind (the calendar a kind of its registry — kinds/calendar.ts). Draw order:
211
+ * the sheet in motion, the faces, the past roll, the solid, the mat under each. `size`: the attachment's device px. Returns
212
+ * whether there is a layer to lay (its box: `screenBox`).
213
+ */
214
+ layer(encoder: GPUCommandEncoder, size: {
215
+ readonly w: number;
216
+ readonly h: number;
217
+ }, dpr: number): boolean;
218
+ /**
219
+ * Lay the last layer over what `pass` holds — premultiplied, one fullscreen triangle — scissored to `scissor` (the pads' box, or
220
+ * a part of it a host narrows it to). Nothing without a layer, or with the debug bit 16 (no layer on the mat). `underlay()` is
221
+ * the same draw for a host that lays it through the ground's `underlays`.
222
+ */
223
+ composite(pass: GPURenderPassEncoder, scissor?: readonly [number, number, number, number] | null): void;
224
+ /** The layer laid on the mat, for the ground to draw inside its own pass (ground.ts `underlays`). */
225
+ underlay(): {
226
+ draw(pass: GPURenderPassEncoder): void;
227
+ } | null;
228
+ dispose(): void;
229
+ }
@@ -0,0 +1,87 @@
1
+ import type { CalendarLaw } from "./law";
2
+ import { type CalEvent } from "./events";
3
+ import { type MonthGrid, type MoonPhase } from "./month";
4
+ import { type Box, type SheetLayout } from "./sheet";
5
+ import { type PrintFace, type HandLaw, type HandLayout, type HandMetrics } from "../../../desk/src/kit/index";
6
+ /** A 2D context the print draws into — the browser's (a canvas's or an OffscreenCanvas's); a TYPE, never a touch of the DOM. */
7
+ export type PrintContext = CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D;
8
+ /** The print's colours as CSS (the product's — `vf-theme.ts` `calendarPrint`): straight colour + alpha, drawn onto a clear canvas. */
9
+ export interface PrintLook {
10
+ /** The dates, the month's name. */
11
+ readonly ink: string;
12
+ /** The year, the eyebrows, the weekend's dates, the small print. */
13
+ readonly muted: string;
14
+ /** A neighbour month's date: the ink at this alpha. */
15
+ readonly faint: number;
16
+ /** Today's ring. */
17
+ readonly hot: string;
18
+ /** A past day's tick. */
19
+ readonly pencil: string;
20
+ readonly pens: Readonly<Record<string, string>>;
21
+ readonly highlighters: Readonly<Record<string, string>>;
22
+ /** The alpha a highlighter lays down (the shader multiplies it into the paper). */
23
+ readonly highlight: number;
24
+ }
25
+ export declare const SANS = "system-ui, -apple-system, \"Helvetica Neue\", sans-serif";
26
+ export declare const MONO = "ui-monospace, \"SF Mono\", SFMono-Regular, Menlo, monospace";
27
+ /** One thing printed or written: its bounds on the sheet, the cells it belongs to, and how to draw it (in sheet coordinates). */
28
+ export interface PrintItem {
29
+ readonly x0: number;
30
+ readonly y0: number;
31
+ readonly x1: number;
32
+ readonly y1: number;
33
+ draw(ctx: PrintContext): void;
34
+ }
35
+ /** Where an event's writing landed: the editor places its caret by it, the pointer picks by it. */
36
+ export interface EventLine {
37
+ readonly event: CalEvent;
38
+ readonly day: number;
39
+ /** The line's (or the band segment's) box on the sheet. */
40
+ readonly box: Box;
41
+ /** The hand's layout and the sheet point its origin is at (a timed line's layout starts after its time). */
42
+ readonly layout: HandLayout;
43
+ readonly ox: number;
44
+ readonly oy: number;
45
+ readonly band: boolean;
46
+ }
47
+ export interface SheetPrint {
48
+ readonly sheet: SheetLayout;
49
+ readonly items: readonly PrintItem[];
50
+ /** What each cell holds, as a key: a tile over a cell whose key moved is drawn again. Index row·7 + col; the last is the sheet's own print. */
51
+ readonly keys: readonly string[];
52
+ readonly lines: readonly EventLine[];
53
+ /** Days whose count of lines did not fit ("+2 more"). */
54
+ readonly hidden: ReadonlyMap<number, number>;
55
+ }
56
+ export interface PrintInputs {
57
+ readonly law: CalendarLaw;
58
+ readonly look: PrintLook;
59
+ readonly sheet: SheetLayout;
60
+ readonly events: readonly CalEvent[];
61
+ /** Days with a sticky note stuck to them (their cells keep the foot clear). */
62
+ readonly noted: ReadonlySet<number>;
63
+ readonly today: number;
64
+ readonly moons: ReadonlyMap<number, MoonPhase>;
65
+ readonly face: PrintFace;
66
+ readonly metrics: HandMetrics;
67
+ /** The sticky note's hand (theme.ts `HAND`): its jitter and wander; the size is the calendar's. */
68
+ readonly hand: HandLaw;
69
+ readonly measure: (font: string, text: string) => number;
70
+ /** Tick the past days off in pencil. */
71
+ readonly ticks: boolean;
72
+ /** A key of everything above that is not per cell (the face, the look, the law's print): part of every cell's key. */
73
+ readonly style: string;
74
+ /** The entry being written: printed whole, its time not set apart, so the pen's caret maps one to one (−1 = none). */
75
+ readonly plain?: number;
76
+ }
77
+ /** Everything inked on one month's sheet. */
78
+ export declare function printSheet(inp: PrintInputs): SheetPrint;
79
+ /** Is an event drawn on this sheet at all (a band may start or end off it)? */
80
+ export declare const onSheet: (e: CalEvent, g: MonthGrid) => boolean;
81
+ /**
82
+ * Draw the rectangle [x, y, w, h] of a sheet (sheet units) into `ctx`, `band` texels a unit, onto a
83
+ * clear canvas: the items it overlaps, in order. The canvas's alpha is the ink's presence.
84
+ */
85
+ export declare function drawRegion(ctx: PrintContext, print: SheetPrint, x: number, y: number, w: number, h: number, band: number): number;
86
+ /** Does anything print in the rectangle? (An empty tile is never drawn nor stored.) */
87
+ export declare function anyIn(print: SheetPrint, x: number, y: number, w: number, h: number): boolean;
@@ -0,0 +1,80 @@
1
+ import type { PrintRaster, TileSource } from "../../../desk/src/kit/index";
2
+ import { type SheetPrint } from "./print";
3
+ import { type TileGrid } from "./tiles";
4
+ /** What the driver asks of the calendar's pass: its layers, a tile uploaded or written, a page table written. */
5
+ export interface PrintPass {
6
+ readonly layers: number;
7
+ uploadTile(layer: number, source: TileSource): void;
8
+ writeTileBytes(layer: number, bytes: Uint8Array<ArrayBuffer>): void;
9
+ writeTable(slot: number, grid: TileGrid, table: Int32Array): void;
10
+ }
11
+ /** A sheet's committed tiles (a fixture): one level's tiles by `tx:ty`, RGBA TILE_TEX² each, and the ones nothing prints in. */
12
+ export interface PinnedSheet {
13
+ readonly level: number;
14
+ readonly tiles: ReadonlyMap<string, Uint8Array<ArrayBuffer>>;
15
+ readonly empty: ReadonlySet<string>;
16
+ }
17
+ /** A sheet rectangle in view (sheet units). */
18
+ export interface SheetView {
19
+ readonly x0: number;
20
+ readonly y0: number;
21
+ readonly x1: number;
22
+ readonly y1: number;
23
+ }
24
+ /** A string's 32-bit FNV-1a, as a tile's content key. */
25
+ export declare function fnv(s: string): string;
26
+ /** What a tile of a print shows — the keys of the cells under it and the sheet's own. */
27
+ export declare function contentOf(print: SheetPrint, x: number, y: number, w: number, h: number): string;
28
+ export interface PrintTilesOptions {
29
+ readonly grid: TileGrid;
30
+ /** The clock the frame's budget runs on (ms). */
31
+ readonly now?: () => number;
32
+ /** The most raster a frame spends, ms (a tile is ~0.3–1 ms): the rest come on the frames after. */
33
+ readonly budgetMs?: number;
34
+ }
35
+ /** The tile driver of one desk's pads: the layers' cache, each slot's page table, the frame's budget. */
36
+ export declare class PrintTiles {
37
+ readonly grid: TileGrid;
38
+ private readonly now;
39
+ private readonly budgetMs;
40
+ private cache;
41
+ private readonly tables;
42
+ private t0;
43
+ /** Tiles the last frame left waiting, by sheet slot — a pad's own, so a pad forgotten takes its waiting tiles with it (D7). */
44
+ private readonly pendingBy;
45
+ private starvedN;
46
+ private drawnN;
47
+ constructor(opts: PrintTilesOptions);
48
+ /** Tiles still to draw after the last frame (the desk asks for another). */
49
+ pending(): number;
50
+ /** Tiles drawn since the driver was made (a witness). */
51
+ drawn(): number;
52
+ /** Tiles the last frame wanted and no layer could hold (every one in use by that frame) — a witness. */
53
+ starved(): number;
54
+ /** Resident tiles. */
55
+ resident(): number;
56
+ private cacheOf;
57
+ /** A new frame: its budget starts now; what it touches is kept from eviction until the next. */
58
+ begin(pass: PrintPass): void;
59
+ /** A sheet's page table in `slot`, owned by (pad, month): made again (all missing) when the owner changes. */
60
+ private tableFor;
61
+ /**
62
+ * Bring a sheet's tiles up to date for this frame: the coarse levels for the whole sheet, the view's level (and the one
63
+ * under it) for what is in view — resident ones kept, empty ones marked, the rest drawn (the view's centre first) within the
64
+ * frame's budget. `owner` names the sheet (`${pad}:${month}`); a sheet with no print yet (its face loading) keeps its table.
65
+ */
66
+ sheet(pass: PrintPass, raster: PrintRaster<SheetPrint>, owner: string, slot: number, print: SheetPrint, view: SheetView, level: number, rungs?: 1 | 2): void;
67
+ /**
68
+ * A sheet's COMMITTED tiles (a still's — the Node oracle's, a rig's pin): its table names the fixture's level alone (the rest
69
+ * missing: the shader falls back to it from any density), each tile written once into a layer of its own. The table is the
70
+ * pinned sheet's EXACTLY: a pin under an owner that pinned another sheet before (the oracle's pad 1 in September, scene after
71
+ * scene) keeps none of that sheet's entries — a blank pin is a blank sheet.
72
+ */
73
+ pin(pass: PrintPass, owner: string, slot: number, pinned: PinnedSheet): void;
74
+ /** The frame's page tables that moved, into the pass. */
75
+ end(pass: PrintPass): void;
76
+ /** A tile gave up its layer: every table pointing at it forgets it (the shader falls back a level). */
77
+ private forget;
78
+ /** A pad gone: its tiles, its tables and its waiting tiles (by its slots) forgotten. */
79
+ drop(pad: number, slots: readonly number[]): void;
80
+ }
@@ -0,0 +1,45 @@
1
+ export interface RollState {
2
+ /** Where the tangent line crosses x = `px`, from the tape's edge (L = nothing wound). */
3
+ readonly a: number;
4
+ /** The line's tilt (radians): negative lifts the right-hand corner first, positive the left. */
5
+ readonly alpha: number;
6
+ readonly px: number;
7
+ /** The core's radius, and how much thinner each turn is. */
8
+ readonly r0: number;
9
+ readonly tau: number;
10
+ /** The sheet's free length (the tape's edge to its foot). */
11
+ readonly L: number;
12
+ }
13
+ export interface RollPoint {
14
+ /** Sheet x, s and height above the sheet's face. */
15
+ readonly x: number;
16
+ readonly s: number;
17
+ readonly z: number;
18
+ /** The FRONT face's normal (the printed side): up when flat, toward the roll's axis when wound. */
19
+ readonly nx: number;
20
+ readonly ns: number;
21
+ readonly nz: number;
22
+ /** How far round the spiral (radians); 0 flat. */
23
+ readonly phi: number;
24
+ }
25
+ /** The core that makes a whole sheet wound (tangent line at `rest`) a roll of radius `rest`. */
26
+ export declare function coreOf(rest: number, tau: number, L: number): number;
27
+ /** The radius of the roll where the wound length is D. */
28
+ export declare const radiusOf: (r0: number, tau: number, D: number) => number;
29
+ /** The roll's outer radius and its axis's place, at x (a tilted roll is a little fatter at its lifted end). */
30
+ export declare function rollAt(R: RollState, x: number): {
31
+ readonly radius: number;
32
+ readonly wound: number;
33
+ };
34
+ /** A sheet point (x, s) as the roll bends it. */
35
+ export declare function rollPoint(R: RollState, x: number, s: number): RollPoint;
36
+ /**
37
+ * The roll for a sheet a fraction `p` of the way up (0 flat … 1 at rest against the tape), with a
38
+ * corner's tilt `tilt0` that straightens over the first third, pivoting at the grabbed side.
39
+ */
40
+ export declare function rollState(p: number, law: {
41
+ readonly rest: number;
42
+ readonly tau: number;
43
+ }, L: number, W: number, tilt0: number): RollState;
44
+ /** Where the tangent line lies at x (the flat part's end, along s). */
45
+ export declare const tangentAt: (R: RollState, x: number) => number;
@@ -0,0 +1,12 @@
1
+ import type { ComposeOptions } from "../../../desk/src/engine/index";
2
+ import { type ShaderText } from "../../../desk/src/kit/index";
3
+ /** The calendar's own shader files (the kit's pieces come by name). */
4
+ export declare const CALENDAR_SHADER_FILES: {
5
+ readonly calendar: "calendar/calendar.wgsl";
6
+ readonly pass: "calendar/calendar-pass.wgsl";
7
+ };
8
+ export interface CalendarShaders {
9
+ readonly program: ComposeOptions;
10
+ readonly composite: ComposeOptions;
11
+ }
12
+ export declare function calendarShaders(text: ShaderText): CalendarShaders;
@@ -0,0 +1,43 @@
1
+ import type { CalendarLaw } from "./law";
2
+ import { type MonthGrid } from "./month";
3
+ export interface Box {
4
+ readonly x: number;
5
+ readonly y: number;
6
+ readonly w: number;
7
+ readonly h: number;
8
+ }
9
+ export interface SheetLayout {
10
+ readonly W: number;
11
+ readonly H: number;
12
+ readonly grid: MonthGrid;
13
+ /** The grid's top-left, a cell's size. */
14
+ readonly x0: number;
15
+ readonly y0: number;
16
+ readonly cw: number;
17
+ readonly ch: number;
18
+ readonly rows: number;
19
+ /** Where the title band and the weekday row start. */
20
+ readonly titleY: number;
21
+ readonly weekdaysY: number;
22
+ }
23
+ export declare function sheetOf(g: MonthGrid, law: CalendarLaw): SheetLayout;
24
+ export declare const cellBox: (L: SheetLayout, row: number, col: number) => Box;
25
+ /** The cell under a sheet point, with its day — or null off the grid. */
26
+ export declare function cellAt(L: SheetLayout, x: number, y: number): {
27
+ readonly row: number;
28
+ readonly col: number;
29
+ readonly day: number;
30
+ } | null;
31
+ /** A day's cell on this sheet (a neighbour month's day in the first or last row counts), or null. */
32
+ export declare function dayBox(L: SheetLayout, day: number): Box | null;
33
+ /** Where a sticky note stuck to a day sits: centred across the cell, its foot `gap` above the cell's. */
34
+ export declare function noteSlot(L: SheetLayout, row: number, col: number, law: CalendarLaw): {
35
+ readonly x: number;
36
+ readonly y: number;
37
+ };
38
+ /** How many lines of writing a cell holds (bands included) — fewer when a note hangs at its foot. */
39
+ export declare function lineCapacity(L: SheetLayout, law: CalendarLaw, noted: boolean): number;
40
+ /** The i-th line's box in a cell (a band's lane or a day's line). */
41
+ export declare function lineBox(L: SheetLayout, row: number, col: number, i: number, law: CalendarLaw): Box;
42
+ /** A band's box in its week row: from its first column to its last, in its lane. */
43
+ export declare function bandBox(L: SheetLayout, row: number, col0: number, col1: number, lane: number, law: CalendarLaw): Box;
@@ -0,0 +1,67 @@
1
+ /** A tile's texels of sheet, and its gutter each side. */
2
+ export declare const TILE = 256;
3
+ export declare const GUTTER = 2;
4
+ export declare const TILE_TEX: number;
5
+ /** 0.25 … 8 texels a unit. */
6
+ export declare const LEVELS = 11;
7
+ /** The coarsest levels kept resident for every sheet in play (the fallbacks). */
8
+ export declare const BASE_LEVELS = 3;
9
+ /** Page-table entries: a layer, or one of these. */
10
+ export declare const MISSING = -1;
11
+ export declare const EMPTY = -2;
12
+ export declare const bandOf: (level: number) => number;
13
+ /** The level for a density (texels wanted per unit): the rung at or above it. */
14
+ export declare function levelFor(density: number): number;
15
+ /** Each level's tile counts across and down a sheet, and where its entries start in the page table. */
16
+ export interface TileGrid {
17
+ readonly W: number;
18
+ readonly H: number;
19
+ readonly nx: readonly number[];
20
+ readonly ny: readonly number[];
21
+ readonly offset: readonly number[];
22
+ /** Entries in one sheet's page table. */
23
+ readonly count: number;
24
+ }
25
+ export declare function tileGrid(W: number, H: number): TileGrid;
26
+ /** A tile's rectangle on the sheet (its content, without the gutter), sheet units. */
27
+ export declare function tileRect(level: number, tx: number, ty: number): {
28
+ readonly x: number;
29
+ readonly y: number;
30
+ readonly w: number;
31
+ readonly h: number;
32
+ };
33
+ /** The tiles of a level that a sheet rectangle touches (clamped to the sheet). */
34
+ export declare function tilesIn(g: TileGrid, level: number, x0: number, y0: number, x1: number, y1: number): Array<readonly [number, number]>;
35
+ /** A tile's page-table index within its sheet's table. */
36
+ export declare const entryOf: (g: TileGrid, level: number, tx: number, ty: number) => number;
37
+ /**
38
+ * The texture layers the tiles live in: `layers` of them, handed out by key (which sheet, level and
39
+ * tile) and CONTENT (what the tile shows — the keys of the cells under it); a tile whose content moved
40
+ * is stale and draws again. When the layers run out, the one used longest ago that this frame has not
41
+ * touched is given up.
42
+ */
43
+ export declare class TileCache {
44
+ readonly layers: number;
45
+ private readonly byKey;
46
+ private readonly byLayer;
47
+ private frame;
48
+ constructor(layers: number);
49
+ /** A new frame: what it touches is protected from eviction until the next. */
50
+ tick(): void;
51
+ /** The layer holding this tile with this content, or null (absent, or stale). Touches it. */
52
+ get(key: string, content: string): number | null;
53
+ /** Is a stale copy of the tile resident (it may be shown until the fresh one is drawn)? */
54
+ stale(key: string): number | null;
55
+ /**
56
+ * A layer for this tile (its old one, a free one, or the least-recently-used one not touched this
57
+ * frame), and the key of the tile it evicted (a page table pointing at it must forget it); null when
58
+ * every layer is in use this frame.
59
+ */
60
+ put(key: string, content: string): {
61
+ readonly layer: number;
62
+ readonly evicted: string | null;
63
+ } | null;
64
+ /** Forget every tile whose key starts with `prefix` (a calendar gone, a style changed). */
65
+ drop(prefix: string): void;
66
+ get size(): number;
67
+ }
@@ -0,0 +1,73 @@
1
+ import type { CalendarLaw } from "./law";
2
+ import type { PadFrame } from "./pad";
3
+ import { type RollState } from "./roll";
4
+ /** A turn in flight. */
5
+ export interface Turn {
6
+ readonly dir: 1 | -1;
7
+ /** How far the moving sheet is rolled: 0 flat on the pad … 1 in the roll at rest. */
8
+ p: number;
9
+ v: number;
10
+ target: 0 | 1;
11
+ /** The corner's tilt it started with. */
12
+ readonly tilt: number;
13
+ /** The hand on it: the sheet point under the finger (`s` from under the tape), its velocity, whether it moved. */
14
+ drag: {
15
+ lastS: number;
16
+ lastT: number;
17
+ vs: number;
18
+ moved: boolean;
19
+ } | null;
20
+ /** A quick run (several months to go): the spring's frequency multiplied. */
21
+ fast: number;
22
+ /** A HAND's turn (its end a month the document does not know yet), not one toward the document's month. */
23
+ readonly hand: boolean;
24
+ }
25
+ /** One pad's turning, the local's own. */
26
+ export interface PadRoll {
27
+ /** The month laid bare (null until the pad is first seen: it shows the document's then). */
28
+ shown: number | null;
29
+ turn: Turn | null;
30
+ peek: number;
31
+ peekV: number;
32
+ peekOn: boolean;
33
+ /** A hand's finished roll asked of the document, not yet there — held until the document SPEAKS (its month moves, to this or elsewhere). */
34
+ pending: number | null;
35
+ /** A hand's roll finished (the hand commits `shown`); cleared by whoever drains it. */
36
+ rolled: boolean;
37
+ /** The document's month as last seen. */
38
+ durable: number | null;
39
+ /** The document's month as `stepRoll` last heard it (a move from it is the document speaking — D7 #3). */
40
+ heard: number | null;
41
+ }
42
+ export declare const newRoll: () => PadRoll;
43
+ /** The sheets in play for a pad: the month on it and the one in motion, the roll's line — the prototype's `sheetsOf`. */
44
+ export declare function rollSheets(r: PadRoll, durable: number, law: CalendarLaw, F: PadFrame): {
45
+ readonly shown: number;
46
+ readonly base: number;
47
+ readonly moving: number | null;
48
+ readonly roll: RollState | null;
49
+ readonly marksOn: 0 | 1;
50
+ readonly turning: boolean;
51
+ };
52
+ /** The month the pad rolls toward: a hand's pending one, else the document's. */
53
+ export declare const targetOf: (r: PadRoll) => number | null;
54
+ /** Start a turn: up (`dir` 1, from the corner's lift) or down (−1, the last month off the roll). False while one runs. */
55
+ export declare function startTurn(r: PadRoll, dir: 1 | -1, tilt: number, law: CalendarLaw, F: PadFrame, opts?: {
56
+ readonly hand?: boolean;
57
+ readonly fast?: number;
58
+ readonly drag?: {
59
+ readonly s: number;
60
+ readonly now: number;
61
+ };
62
+ }): boolean;
63
+ /** A hand takes the sheet in motion mid-turn (the prototype's press on `moving`). */
64
+ export declare function grabMoving(r: PadRoll, s: number, now: number): boolean;
65
+ /** The finger at `s` (the sheet point under it, from under the tape): the moving sheet follows it; `moved` once it has. */
66
+ export declare function dragTo(r: PadRoll, s: number, now: number, moved: boolean, law: CalendarLaw, F: PadFrame): void;
67
+ /** Let go: a click takes the whole month (or brings it); a flick goes where it was flicked; else past a third it goes, short of it it falls back. */
68
+ export declare function letGo(r: PadRoll, now: number, law: CalendarLaw, F: PadFrame, cancel?: boolean): void;
69
+ /**
70
+ * Advance a pad's turning by `dt` seconds toward the document's month `durable`: the corner's peek, the turn's spring, its end (a
71
+ * month rolled away or back — a hand's is `pending` and `rolled`), the next turn toward the target. True while anything moves.
72
+ */
73
+ export declare function stepRoll(r: PadRoll, durable: number, dt: number, law: CalendarLaw, F: PadFrame): boolean;