@vibecook/ice 0.10.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (380) hide show
  1. package/README.md +79 -50
  2. package/dist/chunk-BA7XJC27.js +2429 -0
  3. package/dist/chunk-BA7XJC27.js.map +1 -0
  4. package/dist/chunk-BKV4ZEU3.js +1 -0
  5. package/dist/chunk-BKV4ZEU3.js.map +1 -0
  6. package/dist/{chunk-5FQS7V2C.js → chunk-DYK6KNLG.js} +13303 -7485
  7. package/dist/chunk-DYK6KNLG.js.map +1 -0
  8. package/dist/chunk-ENIFIUEP.js +155 -0
  9. package/dist/chunk-ENIFIUEP.js.map +1 -0
  10. package/dist/chunk-IBWWLA6D.js +634 -0
  11. package/dist/chunk-IBWWLA6D.js.map +1 -0
  12. package/dist/{chunk-OR5FNVUE.js → chunk-JS6PG6YD.js} +398 -167
  13. package/dist/chunk-JS6PG6YD.js.map +1 -0
  14. package/dist/chunk-QXOCF56A.js +148 -0
  15. package/dist/chunk-QXOCF56A.js.map +1 -0
  16. package/dist/chunk-ZPUPBULB.js +7399 -0
  17. package/dist/chunk-ZPUPBULB.js.map +1 -0
  18. package/dist/desk-engine.js +36 -0
  19. package/dist/desk-engine.js.map +1 -0
  20. package/dist/desk-kit.js +244 -0
  21. package/dist/desk-kit.js.map +1 -0
  22. package/dist/desk-objects.js +12728 -0
  23. package/dist/desk-objects.js.map +1 -0
  24. package/dist/desk.js +469 -0
  25. package/dist/desk.js.map +1 -0
  26. package/dist/devtools.js +233 -189
  27. package/dist/devtools.js.map +1 -1
  28. package/dist/dom.js +7 -19
  29. package/dist/index.js +232 -20
  30. package/dist/kernel.js +53 -25
  31. package/dist/react.js +1045 -38
  32. package/dist/react.js.map +1 -1
  33. package/dist/types/packages/core/src/behavior/define-behavior.d.ts +11 -0
  34. package/dist/types/packages/core/src/behavior/runtime.d.ts +4 -0
  35. package/dist/types/packages/core/src/canvas/define-canvas-type.d.ts +86 -0
  36. package/dist/types/packages/core/src/canvas/define-container.d.ts +17 -0
  37. package/dist/types/packages/core/src/canvas/diagnostics.d.ts +27 -0
  38. package/dist/types/packages/core/src/canvas/engine-catalog.d.ts +70 -0
  39. package/dist/types/packages/core/src/canvas/extensions.d.ts +125 -0
  40. package/dist/types/packages/core/src/canvas/frame-behavior-host.d.ts +16 -0
  41. package/dist/types/packages/core/src/canvas/frame-preview.d.ts +79 -0
  42. package/dist/types/packages/core/src/canvas/frame-projection.d.ts +38 -0
  43. package/dist/types/packages/core/src/canvas/frame-view.d.ts +36 -0
  44. package/dist/types/packages/core/src/canvas/migrate.d.ts +14 -0
  45. package/dist/types/packages/core/src/canvas/placement.d.ts +30 -0
  46. package/dist/types/packages/core/src/canvas/presentation-transition.d.ts +100 -0
  47. package/dist/types/packages/core/src/canvas/runtime-extension-host.d.ts +16 -0
  48. package/dist/types/packages/core/src/canvas/session.d.ts +47 -0
  49. package/dist/types/packages/core/src/catalog/camera-derived.d.ts +16 -27
  50. package/dist/types/packages/core/src/catalog/desk.d.ts +326 -0
  51. package/dist/types/packages/core/src/catalog/gesture.d.ts +51 -0
  52. package/dist/types/packages/core/src/catalog/graph.d.ts +2 -2
  53. package/dist/types/packages/core/src/catalog/index.d.ts +2 -0
  54. package/dist/types/packages/core/src/catalog/pointer.d.ts +42 -0
  55. package/dist/types/packages/core/src/catalog/selection-presence.d.ts +7 -0
  56. package/dist/types/packages/core/src/catalog/settings-resources.d.ts +28 -2
  57. package/dist/types/packages/core/src/catalog/surface.d.ts +1 -0
  58. package/dist/types/packages/core/src/doc/doc-commit-sink.d.ts +18 -2
  59. package/dist/types/packages/core/src/doc/doc-kit.d.ts +21 -2
  60. package/dist/types/packages/core/src/doc/envelope.d.ts +5 -2
  61. package/dist/types/packages/core/src/doc/schema-migrate.d.ts +1 -1
  62. package/dist/types/packages/core/src/doc/version-gate.d.ts +21 -3
  63. package/dist/types/packages/core/src/engine/commit-sink.d.ts +10 -1
  64. package/dist/types/packages/core/src/engine/engine.d.ts +6 -0
  65. package/dist/types/packages/core/src/engine/frame-control.d.ts +74 -0
  66. package/dist/types/packages/core/src/engine/guests.d.ts +4 -1
  67. package/dist/types/packages/core/src/engine/world-doors.d.ts +12 -0
  68. package/dist/types/packages/core/src/facade/create-canvas-engine.d.ts +146 -13
  69. package/dist/types/packages/core/src/index.d.ts +34 -13
  70. package/dist/types/packages/core/src/input/queue.d.ts +3 -1
  71. package/dist/types/packages/core/src/interaction/install.d.ts +30 -0
  72. package/dist/types/packages/core/src/interaction/wakes.d.ts +24 -0
  73. package/dist/types/packages/core/src/nav/nav-geometry.d.ts +100 -0
  74. package/dist/types/packages/core/src/nav/nested-canvas.d.ts +47 -4
  75. package/dist/types/packages/core/src/ops/cascade.d.ts +2 -1
  76. package/dist/types/packages/core/src/ops/claims.d.ts +6 -0
  77. package/dist/types/packages/core/src/ops/insert.d.ts +4 -0
  78. package/dist/types/packages/core/src/ops/point-pick.d.ts +4 -1
  79. package/dist/types/packages/core/src/ops/sibling-order.d.ts +14 -4
  80. package/dist/types/packages/core/src/ops/tray.d.ts +48 -0
  81. package/dist/types/packages/core/src/presence/presence-kit.d.ts +5 -0
  82. package/dist/types/packages/core/src/schema/meta.d.ts +10 -0
  83. package/dist/types/packages/core/src/schema/prefab.d.ts +8 -0
  84. package/dist/types/packages/core/src/settings/defaults.d.ts +25 -6
  85. package/dist/types/packages/core/src/surface/gpu-device.d.ts +55 -0
  86. package/dist/types/packages/core/src/systems/camera-sim.d.ts +29 -0
  87. package/dist/types/packages/core/src/systems/chrome.d.ts +15 -23
  88. package/dist/types/packages/core/src/systems/drag-mods.d.ts +34 -0
  89. package/dist/types/packages/core/src/systems/held.d.ts +71 -0
  90. package/dist/types/packages/core/src/systems/insert-ghost.d.ts +2 -0
  91. package/dist/types/packages/core/src/systems/l0-input.d.ts +14 -0
  92. package/dist/types/packages/core/src/systems/l1-pick.d.ts +37 -1
  93. package/dist/types/packages/core/src/systems/l2-arbitrate.d.ts +18 -4
  94. package/dist/types/packages/core/src/systems/l3-behave.d.ts +4 -1
  95. package/dist/types/packages/core/src/systems/l3-claim.d.ts +7 -0
  96. package/dist/types/packages/core/src/systems/l3-connect.d.ts +1 -1
  97. package/dist/types/packages/core/src/systems/l3-drop.d.ts +30 -1
  98. package/dist/types/packages/core/src/systems/l3-marquee.d.ts +2 -1
  99. package/dist/types/packages/core/src/systems/l3-ports.d.ts +1 -1
  100. package/dist/types/packages/core/src/systems/l4-cursor.d.ts +5 -0
  101. package/dist/types/packages/core/src/systems/nav-flight.d.ts +85 -3
  102. package/dist/types/packages/core/src/systems/nav-tap.d.ts +44 -0
  103. package/dist/types/packages/core/src/systems/press-wheel.d.ts +11 -0
  104. package/dist/types/packages/core/src/systems/tray.d.ts +108 -0
  105. package/dist/types/packages/core/src/systems/zoom-through.d.ts +30 -0
  106. package/dist/types/packages/core/src/tools/define-tool.d.ts +10 -0
  107. package/dist/types/packages/core/src/widget/define-widget.d.ts +166 -63
  108. package/dist/types/packages/core/src/widget/equip.d.ts +14 -2
  109. package/dist/types/packages/core/src/widget/held-tools.d.ts +83 -0
  110. package/dist/types/packages/core/src/widget/menu-actions.d.ts +44 -0
  111. package/dist/types/packages/core/src/widget/mount-store.d.ts +21 -46
  112. package/dist/types/packages/core/src/widget/spawn.d.ts +1 -1
  113. package/dist/types/packages/desk/src/assets/blue-noise.gen.d.ts +10 -0
  114. package/dist/types/packages/desk/src/card/card.d.ts +103 -0
  115. package/dist/types/packages/desk/src/compose/ambient.d.ts +59 -0
  116. package/dist/types/packages/desk/src/compose/builder.d.ts +285 -0
  117. package/dist/types/packages/desk/src/compose/children.d.ts +3 -0
  118. package/dist/types/packages/desk/src/compose/index.d.ts +14 -0
  119. package/dist/types/packages/desk/src/compose/marks.d.ts +126 -0
  120. package/dist/types/packages/desk/src/compose/pick.d.ts +5 -0
  121. package/dist/types/packages/desk/src/compose/reflector.d.ts +111 -0
  122. package/dist/types/packages/desk/src/compose/tap.d.ts +5 -0
  123. package/dist/types/packages/desk/src/docs.d.ts +23 -0
  124. package/dist/types/packages/desk/src/engine/budget.d.ts +38 -0
  125. package/dist/types/packages/desk/src/engine/device.d.ts +54 -0
  126. package/dist/types/packages/desk/src/engine/index.d.ts +5 -0
  127. package/dist/types/packages/desk/src/engine/pipeline.d.ts +36 -0
  128. package/dist/types/packages/desk/src/engine/rasters.d.ts +66 -0
  129. package/dist/types/packages/desk/src/engine/records.d.ts +56 -0
  130. package/dist/types/packages/desk/src/engine/shader.d.ts +22 -0
  131. package/dist/types/packages/desk/src/engine/struct.d.ts +39 -0
  132. package/dist/types/packages/desk/src/engine/target.d.ts +26 -0
  133. package/dist/types/packages/desk/src/gpu-ablation.d.ts +61 -0
  134. package/dist/types/packages/desk/src/gpu-memory.d.ts +54 -0
  135. package/dist/types/packages/desk/src/gpu-profiler.d.ts +141 -0
  136. package/dist/types/packages/desk/src/gpu-wrap.d.ts +8 -0
  137. package/dist/types/packages/desk/src/ground.d.ts +388 -0
  138. package/dist/types/packages/desk/src/hold/focus.d.ts +53 -0
  139. package/dist/types/packages/desk/src/hold/pose.d.ts +132 -0
  140. package/dist/types/packages/desk/src/hold/shaders.d.ts +9 -0
  141. package/dist/types/packages/desk/src/host/editor.d.ts +18 -0
  142. package/dist/types/packages/desk/src/host/index.d.ts +9 -0
  143. package/dist/types/packages/desk/src/host/ink.d.ts +18 -0
  144. package/dist/types/packages/desk/src/host/layer.d.ts +430 -0
  145. package/dist/types/packages/desk/src/host/picture.d.ts +2 -0
  146. package/dist/types/packages/desk/src/host/surface.d.ts +5 -0
  147. package/dist/types/packages/desk/src/index.d.ts +13 -0
  148. package/dist/types/packages/desk/src/kind.d.ts +187 -0
  149. package/dist/types/packages/desk/src/kinds/world.d.ts +429 -0
  150. package/dist/types/packages/desk/src/kit/arrays.d.ts +88 -0
  151. package/dist/types/packages/desk/src/kit/blobs.d.ts +40 -0
  152. package/dist/types/packages/desk/src/kit/book.d.ts +2 -0
  153. package/dist/types/packages/desk/src/kit/editor.d.ts +103 -0
  154. package/dist/types/packages/desk/src/kit/eye.d.ts +37 -0
  155. package/dist/types/packages/desk/src/kit/hold.d.ts +1 -0
  156. package/dist/types/packages/desk/src/kit/index.d.ts +26 -0
  157. package/dist/types/packages/desk/src/kit/inside.d.ts +116 -0
  158. package/dist/types/packages/desk/src/kit/layer.d.ts +159 -0
  159. package/dist/types/packages/desk/src/kit/light.d.ts +3 -0
  160. package/dist/types/packages/desk/src/kit/mesh.d.ts +29 -0
  161. package/dist/types/packages/desk/src/kit/mips.d.ts +2 -0
  162. package/dist/types/packages/desk/src/kit/nav.d.ts +2 -0
  163. package/dist/types/packages/desk/src/kit/paper-tex.d.ts +5 -0
  164. package/dist/types/packages/desk/src/kit/physics.d.ts +44 -0
  165. package/dist/types/packages/desk/src/kit/place.d.ts +44 -0
  166. package/dist/types/packages/desk/src/kit/print.d.ts +30 -0
  167. package/dist/types/packages/desk/src/kit/raster.d.ts +34 -0
  168. package/dist/types/packages/desk/src/kit/sdf.d.ts +1 -0
  169. package/dist/types/packages/desk/src/kit/seeds.d.ts +11 -0
  170. package/dist/types/packages/desk/src/kit/services.d.ts +34 -0
  171. package/dist/types/packages/desk/src/kit/springs.d.ts +12 -0
  172. package/dist/types/packages/desk/src/kit/strokes.d.ts +93 -0
  173. package/dist/types/packages/desk/src/kit/text.d.ts +142 -0
  174. package/dist/types/packages/desk/src/kit/uniform.d.ts +8 -0
  175. package/dist/types/packages/desk/src/kit/view.d.ts +39 -0
  176. package/dist/types/packages/desk/src/kit/wgsl.d.ts +15 -0
  177. package/dist/types/packages/desk/src/lattice/line.d.ts +15 -0
  178. package/dist/types/packages/desk/src/lattice/lod.d.ts +52 -0
  179. package/dist/types/packages/desk/src/lattice/ruler.d.ts +88 -0
  180. package/dist/types/packages/desk/src/marks/assemble.d.ts +65 -0
  181. package/dist/types/packages/desk/src/marks/ease.d.ts +4 -0
  182. package/dist/types/packages/desk/src/marks/laser.d.ts +41 -0
  183. package/dist/types/packages/desk/src/marks/layout.d.ts +167 -0
  184. package/dist/types/packages/desk/src/marks/pass.d.ts +59 -0
  185. package/dist/types/packages/desk/src/marks/shaders.d.ts +12 -0
  186. package/dist/types/packages/desk/src/mat/grid.d.ts +50 -0
  187. package/dist/types/packages/desk/src/mat/lamp.d.ts +14 -0
  188. package/dist/types/packages/desk/src/mat/layout.d.ts +144 -0
  189. package/dist/types/packages/desk/src/mat/mat-pass.d.ts +83 -0
  190. package/dist/types/packages/desk/src/mat/night.d.ts +95 -0
  191. package/dist/types/packages/desk/src/mat/projector.d.ts +39 -0
  192. package/dist/types/packages/desk/src/mat/shaders.d.ts +17 -0
  193. package/dist/types/packages/desk/src/mat/tilt.d.ts +14 -0
  194. package/dist/types/packages/desk/src/nav/flight.d.ts +186 -0
  195. package/dist/types/packages/desk/src/nav/portal.d.ts +95 -0
  196. package/dist/types/packages/desk/src/object.d.ts +46 -0
  197. package/dist/types/packages/desk/src/pass-instrument.d.ts +89 -0
  198. package/dist/types/packages/desk/src/shaders.d.ts +12 -0
  199. package/dist/types/packages/desk/src/shaders.gen.d.ts +16 -0
  200. package/dist/types/packages/desk/src/submit-instrument.d.ts +36 -0
  201. package/dist/types/packages/desk/src/theme.d.ts +475 -0
  202. package/dist/types/packages/desk/src/tray/carry.d.ts +99 -0
  203. package/dist/types/packages/desk/src/tray/drawer.d.ts +113 -0
  204. package/dist/types/packages/desk/src/tray/flux.d.ts +46 -0
  205. package/dist/types/packages/desk/src/tray/index.d.ts +4 -0
  206. package/dist/types/packages/desk/src/tray/lattice.d.ts +71 -0
  207. package/dist/types/packages/desk/src/tray/layout.d.ts +7 -0
  208. package/dist/types/packages/desk/src/tray/look.d.ts +29 -0
  209. package/dist/types/packages/desk/src/tray/pass.d.ts +96 -0
  210. package/dist/types/packages/desk/src/tray/shaders.d.ts +10 -0
  211. package/dist/types/packages/desk/src/tray/specimens.d.ts +199 -0
  212. package/dist/types/packages/devtools/src/attach.d.ts +22 -8
  213. package/dist/types/packages/devtools/src/dock.d.ts +18 -14
  214. package/dist/types/packages/devtools/src/gpu-panel.d.ts +105 -0
  215. package/dist/types/packages/devtools/src/index.d.ts +5 -4
  216. package/dist/types/packages/dom/src/desk-host.d.ts +91 -0
  217. package/dist/types/packages/dom/src/host.d.ts +13 -14
  218. package/dist/types/packages/dom/src/index.d.ts +12 -10
  219. package/dist/types/packages/dom/src/loop.d.ts +18 -1
  220. package/dist/types/packages/dom/src/pointer-adapter.d.ts +5 -29
  221. package/dist/types/packages/dom/src/widget-focus.d.ts +17 -13
  222. package/dist/types/packages/ice/src/desk-engine.d.ts +2 -0
  223. package/dist/types/packages/ice/src/desk-kit.d.ts +6 -0
  224. package/dist/types/packages/ice/src/desk-objects.d.ts +5 -0
  225. package/dist/types/packages/ice/src/desk.d.ts +5 -0
  226. package/dist/types/packages/kernel/src/atlas-pack.d.ts +157 -0
  227. package/dist/types/packages/kernel/src/bezier.d.ts +0 -15
  228. package/dist/types/packages/kernel/src/coords.d.ts +0 -39
  229. package/dist/types/packages/kernel/src/index.d.ts +2 -2
  230. package/dist/types/packages/kernel/src/nav-flight.d.ts +6 -0
  231. package/dist/types/packages/kernel/src/tray.d.ts +155 -0
  232. package/dist/types/packages/objects/src/board/board-pass.d.ts +180 -0
  233. package/dist/types/packages/objects/src/board/board-pen.d.ts +36 -0
  234. package/dist/types/packages/objects/src/board/board.d.ts +104 -0
  235. package/dist/types/packages/objects/src/board/data.d.ts +31 -0
  236. package/dist/types/packages/objects/src/board/history.d.ts +33 -0
  237. package/dist/types/packages/objects/src/board/kind.d.ts +208 -0
  238. package/dist/types/packages/objects/src/board/layout.d.ts +102 -0
  239. package/dist/types/packages/objects/src/board/object.d.ts +7 -0
  240. package/dist/types/packages/objects/src/board/pen.d.ts +71 -0
  241. package/dist/types/packages/objects/src/board/shaders.d.ts +36 -0
  242. package/dist/types/packages/objects/src/board/stroke.d.ts +99 -0
  243. package/dist/types/packages/objects/src/board/theme.d.ts +150 -0
  244. package/dist/types/packages/objects/src/calendar/data.d.ts +97 -0
  245. package/dist/types/packages/objects/src/calendar/events.d.ts +58 -0
  246. package/dist/types/packages/objects/src/calendar/hand.d.ts +53 -0
  247. package/dist/types/packages/objects/src/calendar/host/input.d.ts +67 -0
  248. package/dist/types/packages/objects/src/calendar/host/print.d.ts +9 -0
  249. package/dist/types/packages/objects/src/calendar/kind.d.ts +297 -0
  250. package/dist/types/packages/objects/src/calendar/law.d.ts +151 -0
  251. package/dist/types/packages/objects/src/calendar/layout.d.ts +47 -0
  252. package/dist/types/packages/objects/src/calendar/month.d.ts +75 -0
  253. package/dist/types/packages/objects/src/calendar/object.d.ts +45 -0
  254. package/dist/types/packages/objects/src/calendar/pad.d.ts +42 -0
  255. package/dist/types/packages/objects/src/calendar/pass.d.ts +229 -0
  256. package/dist/types/packages/objects/src/calendar/print.d.ts +87 -0
  257. package/dist/types/packages/objects/src/calendar/printing.d.ts +80 -0
  258. package/dist/types/packages/objects/src/calendar/roll.d.ts +45 -0
  259. package/dist/types/packages/objects/src/calendar/shaders.d.ts +12 -0
  260. package/dist/types/packages/objects/src/calendar/sheet.d.ts +43 -0
  261. package/dist/types/packages/objects/src/calendar/tiles.d.ts +67 -0
  262. package/dist/types/packages/objects/src/calendar/turn.d.ts +73 -0
  263. package/dist/types/packages/objects/src/calendar/writing.d.ts +42 -0
  264. package/dist/types/packages/objects/src/index.d.ts +22 -0
  265. package/dist/types/packages/objects/src/kinds.d.ts +24 -0
  266. package/dist/types/packages/objects/src/minimat/inside.d.ts +17 -0
  267. package/dist/types/packages/objects/src/minimat/kind.d.ts +51 -0
  268. package/dist/types/packages/objects/src/minimat/layout.d.ts +83 -0
  269. package/dist/types/packages/objects/src/minimat/minimat.d.ts +179 -0
  270. package/dist/types/packages/objects/src/minimat/object.d.ts +8 -0
  271. package/dist/types/packages/objects/src/minimat/pass.d.ts +61 -0
  272. package/dist/types/packages/objects/src/minimat/shaders.d.ts +10 -0
  273. package/dist/types/packages/objects/src/minimat/theme.d.ts +98 -0
  274. package/dist/types/packages/objects/src/notebook/ink.d.ts +70 -0
  275. package/dist/types/packages/objects/src/notebook/kind.d.ts +236 -0
  276. package/dist/types/packages/objects/src/notebook/law.d.ts +129 -0
  277. package/dist/types/packages/objects/src/notebook/layout.d.ts +46 -0
  278. package/dist/types/packages/objects/src/notebook/leaf.d.ts +44 -0
  279. package/dist/types/packages/objects/src/notebook/mesh.d.ts +20 -0
  280. package/dist/types/packages/objects/src/notebook/motion.d.ts +107 -0
  281. package/dist/types/packages/objects/src/notebook/object.d.ts +8 -0
  282. package/dist/types/packages/objects/src/notebook/pages.d.ts +56 -0
  283. package/dist/types/packages/objects/src/notebook/pass.d.ts +197 -0
  284. package/dist/types/packages/objects/src/notebook/pick.d.ts +30 -0
  285. package/dist/types/packages/objects/src/notebook/raster.d.ts +28 -0
  286. package/dist/types/packages/objects/src/notebook/shaders.d.ts +11 -0
  287. package/dist/types/packages/objects/src/notebook/shape.d.ts +155 -0
  288. package/dist/types/packages/objects/src/notebook/theme.d.ts +76 -0
  289. package/dist/types/packages/objects/src/palette.d.ts +577 -0
  290. package/dist/types/packages/objects/src/paper/host/body.d.ts +30 -0
  291. package/dist/types/packages/objects/src/paper/kind.d.ts +81 -0
  292. package/dist/types/packages/objects/src/paper/layout.d.ts +73 -0
  293. package/dist/types/packages/objects/src/paper/object.d.ts +31 -0
  294. package/dist/types/packages/objects/src/paper/pages.d.ts +43 -0
  295. package/dist/types/packages/objects/src/paper/paper-pass.d.ts +86 -0
  296. package/dist/types/packages/objects/src/paper/paper.d.ts +117 -0
  297. package/dist/types/packages/objects/src/paper/shaders.d.ts +18 -0
  298. package/dist/types/packages/objects/src/paper/theme.d.ts +58 -0
  299. package/dist/types/packages/objects/src/paper/typing.d.ts +51 -0
  300. package/dist/types/packages/objects/src/paper/writing.d.ts +161 -0
  301. package/dist/types/packages/objects/src/photo/carry.d.ts +33 -0
  302. package/dist/types/packages/objects/src/photo/kind.d.ts +136 -0
  303. package/dist/types/packages/objects/src/photo/layout.d.ts +39 -0
  304. package/dist/types/packages/objects/src/photo/object.d.ts +5 -0
  305. package/dist/types/packages/objects/src/photo/photo-pass.d.ts +104 -0
  306. package/dist/types/packages/objects/src/photo/photo.d.ts +262 -0
  307. package/dist/types/packages/objects/src/photo/pictures.d.ts +152 -0
  308. package/dist/types/packages/objects/src/photo/sample.d.ts +9 -0
  309. package/dist/types/packages/objects/src/photo/shaders.d.ts +18 -0
  310. package/dist/types/packages/objects/src/preset.d.ts +44 -0
  311. package/dist/types/packages/objects/src/shaders.d.ts +3 -0
  312. package/dist/types/packages/objects/src/shaders.gen.d.ts +21 -0
  313. package/dist/types/packages/react/src/canvas-hooks.d.ts +12 -0
  314. package/dist/types/packages/react/src/desk.d.ts +56 -0
  315. package/dist/types/packages/react/src/engine-context.d.ts +2 -2
  316. package/dist/types/packages/react/src/frame-preview-boundary.d.ts +19 -0
  317. package/dist/types/packages/react/src/hooks.d.ts +9 -14
  318. package/dist/types/packages/react/src/index.d.ts +16 -9
  319. package/dist/types/packages/react/src/keymap.d.ts +21 -2
  320. package/dist/types/packages/react/src/selection-menu.d.ts +171 -0
  321. package/dist/types/packages/react/src/tray-bar.d.ts +124 -0
  322. package/package.json +64 -31
  323. package/dist/chunk-5FQS7V2C.js.map +0 -1
  324. package/dist/chunk-JWRHAM7L.js +0 -1163
  325. package/dist/chunk-JWRHAM7L.js.map +0 -1
  326. package/dist/chunk-MFTMPJUF.js +0 -681
  327. package/dist/chunk-MFTMPJUF.js.map +0 -1
  328. package/dist/chunk-OR5FNVUE.js.map +0 -1
  329. package/dist/ground.js +0 -1213
  330. package/dist/ground.js.map +0 -1
  331. package/dist/r3f.js +0 -1644
  332. package/dist/r3f.js.map +0 -1
  333. package/dist/types/packages/core/src/input/measure-queue.d.ts +0 -30
  334. package/dist/types/packages/core/src/settings/ground-config.d.ts +0 -103
  335. package/dist/types/packages/core/src/systems/measure-ingest.d.ts +0 -26
  336. package/dist/types/packages/devtools/src/gl-panel.d.ts +0 -69
  337. package/dist/types/packages/dom/src/measure-adapter.d.ts +0 -31
  338. package/dist/types/packages/dom/src/measure-wiring.d.ts +0 -49
  339. package/dist/types/packages/dom/src/planes.d.ts +0 -33
  340. package/dist/types/packages/dom/src/reflectors/chrome.d.ts +0 -33
  341. package/dist/types/packages/dom/src/reflectors/dom-widgets.d.ts +0 -59
  342. package/dist/types/packages/dom/src/reflectors/graybox.d.ts +0 -31
  343. package/dist/types/packages/dom/src/reflectors/plane-transform.d.ts +0 -38
  344. package/dist/types/packages/ground/src/index.d.ts +0 -69
  345. package/dist/types/packages/ground/src/layer.d.ts +0 -40
  346. package/dist/types/packages/ground/src/pass.d.ts +0 -41
  347. package/dist/types/packages/ground/src/passes/grid-classic.d.ts +0 -30
  348. package/dist/types/packages/ground/src/passes/grid-magnet.d.ts +0 -31
  349. package/dist/types/packages/ground/src/passes/grid.d.ts +0 -28
  350. package/dist/types/packages/ground/src/passes/guides-collect.d.ts +0 -14
  351. package/dist/types/packages/ground/src/passes/guides.d.ts +0 -3
  352. package/dist/types/packages/ground/src/passes/magnet-collect.d.ts +0 -63
  353. package/dist/types/packages/ground/src/passes/soup-collect.d.ts +0 -35
  354. package/dist/types/packages/ground/src/passes/soup-mesh.d.ts +0 -8
  355. package/dist/types/packages/ground/src/passes/wires-collect.d.ts +0 -35
  356. package/dist/types/packages/ground/src/passes/wires.d.ts +0 -10
  357. package/dist/types/packages/ground/src/poles.d.ts +0 -47
  358. package/dist/types/packages/ground/src/renderer.d.ts +0 -15
  359. package/dist/types/packages/ice/src/ground.d.ts +0 -1
  360. package/dist/types/packages/ice/src/r3f.d.ts +0 -1
  361. package/dist/types/packages/kernel/src/eviction.d.ts +0 -23
  362. package/dist/types/packages/kernel/src/zoom-bands.d.ts +0 -19
  363. package/dist/types/packages/r3f/src/bridge.d.ts +0 -129
  364. package/dist/types/packages/r3f/src/composite-material.d.ts +0 -26
  365. package/dist/types/packages/r3f/src/compositor-pass.d.ts +0 -105
  366. package/dist/types/packages/r3f/src/dev-write-trap.d.ts +0 -30
  367. package/dist/types/packages/r3f/src/gl-root.d.ts +0 -96
  368. package/dist/types/packages/r3f/src/gl-router.d.ts +0 -70
  369. package/dist/types/packages/r3f/src/index.d.ts +0 -17
  370. package/dist/types/packages/r3f/src/island-state.d.ts +0 -112
  371. package/dist/types/packages/r3f/src/island.d.ts +0 -13
  372. package/dist/types/packages/r3f/src/pool.d.ts +0 -56
  373. package/dist/types/packages/r3f/src/preview-capture.d.ts +0 -19
  374. package/dist/types/packages/r3f/src/resource-registry.d.ts +0 -30
  375. package/dist/types/packages/r3f/src/self-sustain.d.ts +0 -39
  376. package/dist/types/packages/r3f/src/use-island-frame.d.ts +0 -39
  377. package/dist/types/packages/react/src/infinite-canvas.d.ts +0 -140
  378. package/dist/types/packages/react/src/preview-snapshots.d.ts +0 -17
  379. package/dist/types/packages/react/src/widget-preview.d.ts +0 -14
  380. package/dist/types/packages/react/src/widget-root.d.ts +0 -33
@@ -0,0 +1,42 @@
1
+ import { type Entity, type World } from "../../../core/src/index";
2
+ import type { PadDraft, Pads } from "./kind";
3
+ import { type TypingDocs } from "../../../desk/src/index";
4
+ export interface CalendarWritingOptions {
5
+ readonly world: World;
6
+ readonly docs: TypingDocs;
7
+ /** The calendar kind's state on this desk (the draft is printed through it). */
8
+ readonly pads: () => Pads | undefined;
9
+ /** A fresh seed for a glyph just written (`Math.random` unless a test says). */
10
+ readonly fresh?: () => number;
11
+ }
12
+ /** What is being written: its pad, and the entry (an event entity) or the draft (a new line not yet in the document). */
13
+ export interface WritingTarget {
14
+ readonly pad: Entity;
15
+ readonly entry: Entity | null;
16
+ readonly draft: PadDraft | null;
17
+ }
18
+ export interface CalendarWriting {
19
+ current(): WritingTarget | null;
20
+ /** A NEW line on days `start` … `end` of `pad`, in `ink` — a draft until its session ends. False for a dead pad. */
21
+ beginNew(pad: Entity, start: number, end: number, ink: string): boolean;
22
+ /** Write into an existing entry (the `Editing` claim on it). False for a dead entry or one not of `pad`. */
23
+ beginEntry(pad: Entity, entry: Entity): boolean;
24
+ /** The platform's value (a line: a newline is a space): the draft's text, or the entry's cell written LIVE; the inserted run, or null. */
25
+ input(value: string): {
26
+ readonly from: number;
27
+ readonly to: number;
28
+ } | null;
29
+ /** The text as it stands (the draft's, or the entry's live cell). */
30
+ text(): string;
31
+ /** A session is open: text written and not yet committed. */
32
+ open(): boolean;
33
+ /** End the SESSION — ONE transaction (the draft spawned, the cell committed, an emptied entry removed) or none; the writing stays on. */
34
+ commit(): boolean;
35
+ /** Take the session back — a draft gone, an entry's cell as found — and end the writing. */
36
+ cancel(): void;
37
+ /** End the writing: commit, then lift the claim. */
38
+ end(): void;
39
+ /** Transactions committed since creation (a rig's witness). */
40
+ commits(): number;
41
+ }
42
+ export declare function createCalendarWriting(opts: CalendarWritingOptions): CalendarWriting;
@@ -0,0 +1,22 @@
1
+ export { MINIMAT_TYPE, MiniMat, VINYL_ACT, VINYLS, type VinylName } from "./minimat/object";
2
+ export { NOTE_INK, NOTE_PROPS, NOTE_TYPE, Note, type PaperDriver, PAPERS, type PaperName, PENS, type PenName } from "./paper/object";
3
+ export { createNoteTyping, type NoteTyping, type NoteTypingOptions, type TypingDocs } from "./paper/typing";
4
+ export { BOARD_TYPE, Board, MARKERS, type MarkerName, TIPS } from "./board/object";
5
+ export { CALENDAR_TYPE, Calendar, type CalendarDriver, type CalendarInputDoors, TAPES, type TapeName } from "./calendar/object";
6
+ export { addEvent, calEventOf, CalendarEvent, dayOr, daySlot, EVENT_TYPE, EventPrefab, type EventRow, type EventSpec, monthKeyOf, monthOfKey, NotePin, PadSelection, PIN_TYPE, PinPrefab, pinnedNotes, pinNote, PinsNote } from "./calendar/data";
7
+ export { keyOf as keyOfDay } from "./calendar/month";
8
+ export { type CalendarWriting, type CalendarWritingOptions, createCalendarWriting, type WritingTarget } from "./calendar/writing";
9
+ export { type CalendarHand, type CalendarHandOptions, createCalendarHand } from "./calendar/hand";
10
+ export { COVERS, type CoverName, NOTEBOOK_TYPE, Notebook, RULING_NAMES } from "./notebook/object";
11
+ export { PHOTO_TYPE, Photo, printExtent } from "./photo/object";
12
+ export { createPhotoCarry, type PhotoCarry, type PhotoCarryOptions, TWIST_PER_WHEEL } from "./photo/carry";
13
+ export { type BoardPen, type BoardPenOptions, createBoardPen } from "./board/board-pen";
14
+ export { createNotebookHand, type NotebookHand, type NotebookHandOptions } from "./notebook/leaf";
15
+ export { addStroke, BoardStroke, boardOps, decodePoints, decodeTimes, encodePoints, encodeTimes, feedStroke, type MarkerInk, meanSpeed, seedOfRow, STROKE_TYPE, StrokePrefab, type StrokeRow, strokeRow, strokeSeed, type StrokeSpec } from "./board/data";
16
+ export { DESK_ENGINE, DESK_OBJECTS, DESK_TOOLS, DeskCanvas, deskSelect } from "./preset";
17
+ export { type DeskPalette, deskPalette, deskTheme, PRESENCE_INKS } from "./palette";
18
+ export * from "./kinds";
19
+ export { createNoteBody, NOTE_BODY, type NoteBody, type NoteBodyOptions } from "./paper/host/body";
20
+ export { printRaster, type PrintRasterOptions } from "./calendar/host/print";
21
+ export { CALENDAR_LINE, type CalendarInput, type CalendarInputOptions, caretIndexAt, createCalendarInput } from "./calendar/host/input";
22
+ export { shaderText } from "./shaders";
@@ -0,0 +1,24 @@
1
+ import type { KindProgram, ShaderText } from "../../desk/src/index";
2
+ export { BOARD_KIND, BOARD_TOOLS, type BoardInk, boardInked, BoardKind, type BoardKindOptions, type BoardObjectLook, type BoardPalette, boardFrame, boardKind, boardPose, boardProgram, boardReach, boardRest, createBoardInk, ERASER_TOOL_ID, inking, inkOfTool, markerToolId, type PenHand, type PenPin } from "./board/kind";
3
+ export { CALENDAR_KIND, type CalendarAlpha, calendarFrame, type CalendarGeometry, CalendarKind, type CalendarKindOptions, calendarKind, type CalendarObjectLook, type CalendarPalette, calendarProgram, calendarReach, type CalendarPart, type CalendarPartName, createPads, DRAFT_ID, type PadDraft, type PadMarks, type PadPose, type Pads, partAt, sheetDayBox, sheetDraw, sheetOnScreen, sheetPoint } from "./calendar/kind";
4
+ export type { EventLine, PrintLook, SheetPrint } from "./calendar/print";
5
+ export type { PinnedSheet } from "./calendar/printing";
6
+ export { INSIDE_GRID, MINIMAT_KIND, MiniMatKind, type MiniMatKindOptions, type MiniMatLook, type MiniMatPalette, miniMatFrame, miniMatProgram, miniMatReach, minimatKind, SAGE } from "./minimat/kind";
7
+ export { INK_H, INK_W } from "./notebook/ink";
8
+ export { BOARD } from "./board/theme";
9
+ export { MINIMAT } from "./minimat/theme";
10
+ export { BOOK } from "./notebook/theme";
11
+ export { PAPER } from "./paper/theme";
12
+ export { askTurn, bookAngle, bookFrame, type BookPose, type Books, createBooks, DEFAULT_PEN, inTurnZone, NOTEBOOK_KIND, NOTEBOOK_PAGE, NOTEBOOK_PENS, NOTEBOOK_TOOLS, notebookFrame, type NotebookGeometry, NotebookKind, type NotebookKindOptions, notebookKind, type NotebookObjectLook, type NotebookPalette, notebookProgram, notebookReach, PageTurns, pageHitAt, partOf, penOfTool, penToolId } from "./notebook/kind";
13
+ export { PAPER_KIND, type PaperAsset, PaperKind, type PaperKindOptions, type PaperLook, type PaperPalette, paperFrame, paperProgram, paperReach, paperKind } from "./paper/kind";
14
+ export { createPrints, type FlickWitness, PHOTO_KIND, photoFrame, photoKind, PhotoKind, type PhotoKindOptions, type PhotoPose, photoProgram, photoReach, PRINT_RETURN_MS, printExtent, printRect, type PrintRest, type Prints } from "./photo/kind";
15
+ export { createWriting, DEFAULT_BLEED, DEFAULT_FACE, DEFAULT_HAND_LAW, type InkPages, type NoteInk, type NoteRasterInfo, type Writing, type WritingStats } from "./paper/writing";
16
+ /**
17
+ * The desk's kinds in the order they prepare — the prototype's (the notes, the mini mats, the whiteboards; its prints
18
+ * after the ground, as its photo lab drew them; then its two layers in the order its lab rendered them: the calendar's
19
+ * before the frame, the notebooks' after it) — each made from `text`: the kinds' shader text (theirs and the kit's — ./shaders.ts)
20
+ * unless a host says (the Node oracle hands the .wgsl files on disk).
21
+ */
22
+ export declare function deskKinds(text?: ShaderText): readonly KindProgram[];
23
+ /** The desk's kinds on the kinds' generated shader text (and the kit's) — what a browser host registers: `Ground.create({ device, canvas, mat, kinds: DESK_KINDS })`. */
24
+ export declare const DESK_KINDS: readonly KindProgram[];
@@ -0,0 +1,17 @@
1
+ import { type GridConfig, type CameraState, type FitBand, type Rect, type Viewport, type InsideView } from "../../../desk/src/kit/index";
2
+ import type { MiniMatInstance } from "./layout";
3
+ import { type Chip, type MiniMatGeometry, type MiniMatLaw } from "./minimat";
4
+ /**
5
+ * A mini mat's inside under the host camera `cam`: `content` the bounds of the inside (null = empty
6
+ * — it arrives on its origin at zoom 1). The arrival and the embedding are the flight's own
7
+ * (`arrivalCamera`, `portalAffine` on the same inputs), so a live inside rendered under `cam` IS the
8
+ * flight's first frame. Null only for a face with no area.
9
+ */
10
+ export declare function insideView(G: MiniMatGeometry, content: Rect | null, cam: CameraState, vp: Viewport, fit?: FitBand, gate?: readonly [number, number]): InsideView | null;
11
+ /**
12
+ * What the pass takes for one mini mat: `grid` is the INSIDE's (its fade-in and its line law — the
13
+ * face's far-LOD lattice is the live inside's, dressed for its arrival when `dress`; its vinyl — the
14
+ * inside's mat is the same vinyl, `grid.mat.ground`), `name` what its foot prints; the ruler numbers
15
+ * the rung the law says at the inside's zoom.
16
+ */
17
+ export declare function miniMatInstance(G: MiniMatGeometry, view: InsideView, grid: GridConfig, chips: readonly Chip[], name?: string, dress?: boolean, law?: MiniMatLaw): MiniMatInstance;
@@ -0,0 +1,51 @@
1
+ import { type KindExtra, type KindPass, type KindProgram, type SlotContext, type Palette, type RGB, type TokenRef, type ObjectKind } from "../../../desk/src/index";
2
+ import { type GridConfig, type MatPass, type MarkFrame, type ShaderText } from "../../../desk/src/kit/index";
3
+ import type { MiniMatInstance } from "./layout";
4
+ import { type MiniMatGeometry, type MiniMatLaw } from "./minimat";
5
+ import { MiniMatPass } from "./pass";
6
+ /** The mini mat's kind name — its key in the registry and in every slot's `objects`. */
7
+ export declare const MINIMAT_KIND = "minimat";
8
+ export declare class MiniMatKind implements KindPass<MiniMatInstance> {
9
+ /** The mini mat pass itself: a host's door to its law (`law`) and this frame's chips. */
10
+ readonly pass: MiniMatPass;
11
+ constructor(pass: MiniMatPass);
12
+ spawn(mat: MatPass): MiniMatKind;
13
+ tune(root: KindPass<MiniMatInstance>): void;
14
+ setLaw(law: unknown): void;
15
+ /**
16
+ * The pass's own `prepare`, argument for argument; the ground's word on each mini mat's live inside (`extra.live`,
17
+ * by this kind's record index) overrides the instance's own — absent, the instances say.
18
+ */
19
+ prepare(_encoder: GPUCommandEncoder, s: SlotContext, records: readonly MiniMatInstance[], extra?: KindExtra): number;
20
+ dropped(): number;
21
+ drawRange(pass: GPURenderPassEncoder, first: number, end: number): void;
22
+ records(): import("../../../desk/src/index").RecordStoreStats;
23
+ /** Mini mat `index`'s chips over its live inside, while the inside's objects are not whole. */
24
+ drawOver(pass: GPURenderPassEncoder, index: number): void;
25
+ dispose(): void;
26
+ }
27
+ /** The mini mat's program for a host's shader text: its pass made on the root's mat. */
28
+ export declare function miniMatProgram(text: ShaderText): KindProgram<MiniMatInstance>;
29
+ /** What the mini mat's kind takes from the host's palette: the vinyls by the `vinyl` prop's value (`sage` needs none — it is the desk's own ground). */
30
+ export interface MiniMatPalette extends Palette {
31
+ readonly vinyls?: Readonly<Record<string, TokenRef>>;
32
+ }
33
+ /** The mini mat's look for a theme: its vinyls, parsed. */
34
+ export interface MiniMatLook {
35
+ readonly vinyls: Readonly<Record<string, RGB>>;
36
+ }
37
+ /** The vinyl the desk's own mat is: the `vinyl` prop's value that means "the ground's colour". */
38
+ export declare const SAGE = "sage";
39
+ /** How far a mini mat's drawing reaches past its rect, world units: the slab's shadow swept from its top, its penumbra and contact term, the held scale. */
40
+ export declare function miniMatReach(law?: MiniMatLaw): number;
41
+ export interface MiniMatKindOptions {
42
+ /** The host's shader text; the generated module unless a host says. */
43
+ readonly text?: ShaderText;
44
+ /** The mini mat's numbers (theme.ts `MINIMAT`) — the engine's unless a host tweaks them. */
45
+ readonly law?: MiniMatLaw;
46
+ }
47
+ export declare function minimatKind(opts?: MiniMatKindOptions): ObjectKind<MiniMatGeometry, MiniMatInstance, MiniMatLook>;
48
+ /** The grid a mini mat's inside is drawn with when a host names none: the engine's (re-exported for D2b's live insides). */
49
+ export declare const INSIDE_GRID: GridConfig;
50
+ /** The mini mat's silhouette for the desk's marks (D4a): the sheet as drawn, square to the mat, its die-cut corner. */
51
+ export declare function miniMatFrame(G: MiniMatGeometry): MarkFrame;
@@ -0,0 +1,83 @@
1
+ import { type PortalAffine, type GlyphAtlasMeta } from "../../../desk/src/kit/index";
2
+ import type { RGB } from "../../../desk/src/index";
3
+ import { type Chip, type FaceLattice, type MiniMatGeometry, type MiniMatLaw, type Numerals } from "./minimat";
4
+ export declare const MiniMat: import("../../../desk/src/engine/index").StructDef<"ground" | "ring" | "lamp" | "inside" | "name" | "live" | "rungs" | "centre" | "half" | "lift" | "alpha" | "margin" | "slope" | "radius" | "thick" | "lampZ" | "chipFirst" | "chipCount" | "nameLen" | "pad0" | "weights" | "widths" | "numerals">;
5
+ export declare const ChipRecord: import("../../../desk/src/engine/index").StructDef<"kind" | "frame" | "ink" | "centre" | "half" | "colour" | "radius" | "rot" | "lines">;
6
+ export declare const MiniMatUniforms: import("../../../desk/src/engine/index").StructDef<"shadow" | "shadow2" | "select" | "edge" | "ticks" | "atlas" | "print" | "text" | "cream" | "castTint" | "digits" | "atlas2">;
7
+ export declare const MAX_MINIMATS = 256;
8
+ export declare const MAX_CHIPS = 4096;
9
+ /** One mini mat for the pass: its geometry, its vinyl, its inside's embedding and lattice, the live inside's presence, its chips. */
10
+ export interface MiniMatInstance {
11
+ readonly geometry: MiniMatGeometry;
12
+ /** The vinyl (sRGB) — the mat's own sage unless the host says. */
13
+ readonly ground: RGB;
14
+ /** The grain's amplitude on the vinyl (theme.ts `MAT_GRID.grain`). */
15
+ readonly grain: number;
16
+ /** The inside's embedding (host = o + inside · s) and the lattice the face shows on it. */
17
+ readonly inside: {
18
+ readonly M: PortalAffine;
19
+ readonly lattice: FaceLattice;
20
+ };
21
+ /** The live inside over the face: absent or −1 = none (the face is the mini mat's own drawing), else its objects' presence 0..1. */
22
+ readonly live?: number | undefined;
23
+ /** The children as the face draws them small (the far LOD), in the host's world. */
24
+ readonly chips?: readonly Chip[] | undefined;
25
+ /** The name printed in the foot of the border (capitals; minimat.ts `nameGlyphs`). */
26
+ readonly name?: string | undefined;
27
+ /** The rung the ruler numbers (minimat.ts `numeralsOf`); absent = none. */
28
+ readonly numerals?: Numerals | null | undefined;
29
+ }
30
+ export declare function miniMatValues(m: MiniMatInstance, chipFirst: number, chipCount: number): {
31
+ centre: readonly [number, number];
32
+ half: readonly [number, number];
33
+ slope: readonly [number, number];
34
+ lamp: number[];
35
+ radius: number;
36
+ margin: number;
37
+ lift: number;
38
+ thick: number;
39
+ alpha: number;
40
+ ring: number;
41
+ live: number;
42
+ lampZ: number;
43
+ chipFirst: number;
44
+ chipCount: number;
45
+ ground: number[];
46
+ inside: number[];
47
+ rungs: number[];
48
+ weights: number[];
49
+ widths: number[];
50
+ numerals: number[];
51
+ nameLen: number;
52
+ name: number[];
53
+ };
54
+ export declare function chipValues(c: Chip): {
55
+ centre: readonly [number, number];
56
+ half: readonly [number, number];
57
+ rot: number[];
58
+ radius: number;
59
+ kind: number;
60
+ colour: number[];
61
+ ink: number[];
62
+ frame: number[];
63
+ lines: number[];
64
+ };
65
+ /** The knobs from the law, the colours the pass is handed and the glyph atlas it prints with. */
66
+ export declare function miniMatUniformValues(law: MiniMatLaw, colours: {
67
+ readonly cream: RGB;
68
+ readonly cast: RGB;
69
+ readonly select: RGB;
70
+ }, glyphs: GlyphAtlasMeta): {
71
+ print: number[];
72
+ ticks: number[];
73
+ edge: number[];
74
+ shadow: number[];
75
+ shadow2: number[];
76
+ cream: number[];
77
+ castTint: number[];
78
+ select: number[];
79
+ digits: number[];
80
+ text: number[];
81
+ atlas: number[];
82
+ atlas2: number[];
83
+ };
@@ -0,0 +1,179 @@
1
+ import { type FadeIn, type LineLaw, type CameraState, type PortalAffine, type Rect, type PortalClip, type Lamp, type ChildShape, type ChipFinish } from "../../../desk/src/kit/index";
2
+ import type { RGB } from "../../../desk/src/index";
3
+ /** The mini mat's numbers (theme.ts `MINIMAT`) — the engine's unless a host tweaks them. */
4
+ export interface MiniMatLaw {
5
+ readonly size: {
6
+ readonly w: number;
7
+ readonly h: number;
8
+ };
9
+ readonly radius: number;
10
+ readonly margin: number;
11
+ readonly thick: number;
12
+ readonly lift: {
13
+ readonly height: number;
14
+ readonly scale: number;
15
+ };
16
+ readonly hover: number;
17
+ readonly shadow: {
18
+ readonly penumbra: {
19
+ readonly sigma0: number;
20
+ readonly sigmaPerHeight: number;
21
+ readonly alpha: number;
22
+ };
23
+ readonly contact: {
24
+ readonly sigma: number;
25
+ readonly alpha: number;
26
+ readonly reach: number;
27
+ };
28
+ readonly slopeMax: number;
29
+ };
30
+ readonly edge: {
31
+ readonly width: number;
32
+ readonly light: number;
33
+ readonly dark: number;
34
+ };
35
+ readonly print: {
36
+ readonly frame: number;
37
+ readonly tick: number;
38
+ readonly width: number;
39
+ readonly ticks: readonly [number, number, number];
40
+ readonly digits: {
41
+ readonly cap: number;
42
+ readonly gap: number;
43
+ readonly top: number;
44
+ };
45
+ readonly labelsFrom: readonly [number, number];
46
+ readonly name: {
47
+ readonly cap: number;
48
+ readonly tracking: number;
49
+ };
50
+ readonly legible: readonly [number, number];
51
+ };
52
+ readonly ring: number;
53
+ readonly chips: {
54
+ readonly max: number;
55
+ readonly minPx: number;
56
+ readonly greekPx: number;
57
+ readonly greekAlpha: number;
58
+ readonly greekWeight: number;
59
+ };
60
+ readonly gate: readonly [number, number];
61
+ }
62
+ export declare const DEFAULT_MINIMAT_LAW: MiniMatLaw;
63
+ export interface MiniMatRect {
64
+ /** World centre, in the frame of the desk it lies on. */
65
+ readonly cx: number;
66
+ readonly cy: number;
67
+ /** The sheet, world units. */
68
+ readonly w: number;
69
+ readonly h: number;
70
+ }
71
+ /** What moves: the hold's lift (0..1), the hover's rise (0..1), the selection ring's presence (0..1), the presence itself (1 … 0 gone). */
72
+ export interface MiniMatMotion {
73
+ readonly held: number;
74
+ readonly hover: number;
75
+ readonly ring: number;
76
+ readonly fade: number;
77
+ }
78
+ export declare const MINIMAT_REST: MiniMatMotion;
79
+ export interface MiniMatGeometry {
80
+ readonly centre: readonly [number, number];
81
+ /** Half extents as drawn (the hold's scale applied). */
82
+ readonly half: readonly [number, number];
83
+ /** The die-cut corner and the printed border, as drawn. */
84
+ readonly radius: number;
85
+ readonly margin: number;
86
+ /** The sheet's underside off the desk (the hold's and the hover's rise) and its thickness, world units. */
87
+ readonly lift: number;
88
+ readonly thick: number;
89
+ readonly scale: number;
90
+ /** The shadow's ground offset per unit of height, world axes — away from the lamp, capped. */
91
+ readonly slope: readonly [number, number];
92
+ /** The unit direction to the lamp, world axes (x right, y down the screen, z off the desk). */
93
+ readonly lamp: readonly [number, number, number];
94
+ readonly ring: number;
95
+ readonly alpha: number;
96
+ }
97
+ export declare function resolveMiniMat(r: MiniMatRect, m: MiniMatMotion, law: MiniMatLaw, lamp: Lamp): MiniMatGeometry;
98
+ /** The sheet's signed distance at a world point. */
99
+ export declare const sdMiniMat: (G: MiniMatGeometry, wx: number, wy: number) => number;
100
+ /** The FACE — the cutting area inside the printed border, world units: what the inside shows through. */
101
+ export declare function faceOf(G: MiniMatGeometry): Rect;
102
+ export type MiniMatHit = "face" | "border" | "outside";
103
+ /** What is under a world point: the face (the inside's window), the border (the sheet round it), or nothing. */
104
+ export declare function pickMiniMat(G: MiniMatGeometry, wx: number, wy: number): MiniMatHit;
105
+ /** How far the shadow can reach past the sheet, world units — the vertex quad's pad (the slab's sweep and its penumbra). */
106
+ export declare function shadowReach(G: MiniMatGeometry, law?: MiniMatLaw): number;
107
+ /** The face on screen under a camera — the portal's clip. */
108
+ export declare const faceClip: (G: MiniMatGeometry, cam: CameraState) => PortalClip;
109
+ /** The lattice a face shows at the far LOD — the inside's three rungs, their presences and half-widths. */
110
+ export interface FaceLattice {
111
+ /** Fine, mid, coarse spacing, inside units. */
112
+ readonly rungs: readonly [number, number, number];
113
+ /** Each rung's line presence. */
114
+ readonly weights: readonly [number, number, number];
115
+ /** Each rung's line half-width, DEVICE px. */
116
+ readonly widths: readonly [number, number, number];
117
+ }
118
+ /**
119
+ * The lattice a face draws at the far LOD: the inside's three rungs at the zoom it is seen at
120
+ * (`insideZoom` — M.s × the host camera's zoom: the live inside's own camera zoom), each rung's
121
+ * line weight by the mat's line law under the fade-in window DRESSED for the inside's arrival
122
+ * (`lodZoom`, floored — mat/grid.ts `dressScale`), exactly as the live inside dresses its mat —
123
+ * so the face and the live inside draw the same lines, and the one fades into the other unseen.
124
+ */
125
+ export declare function faceLattice(insideZoom: number, fadeIn: FadeIn, law: LineLaw, lodZoom?: number): FaceLattice;
126
+ /**
127
+ * The finishes a mini mat's face draws its chips in (K8a — its `faceLaw`, the kit's shared vocabulary: never the children's kind
128
+ * names): `paper` — a sheet in the chip's colour, its writing greeked; `vinyl` — grained vinyl with its frame line at the chip's margin.
129
+ */
130
+ export declare const MINIMAT_FINISHES: readonly ChipFinish[];
131
+ /** The most lines of a note's writing a chip greeks. */
132
+ export declare const CHIP_LINES = 6;
133
+ /** A chip as the pass takes it: the child mapped into the HOST's world through the inside's embedding `M` (host = o + child · s). */
134
+ export interface Chip {
135
+ /** The finish it is drawn in — one of the mini mat's own (`MINIMAT_FINISHES`), the builder's pick among the child's. */
136
+ readonly finish: ChipFinish;
137
+ readonly centre: readonly [number, number];
138
+ readonly half: readonly [number, number];
139
+ readonly cos: number;
140
+ readonly sin: number;
141
+ readonly radius: number;
142
+ readonly colour: RGB;
143
+ readonly height: number;
144
+ /** Greeked lines in the chip's own frame, host units: x from, x to, the stroke's centre y — at most CHIP_LINES. */
145
+ readonly lines: readonly (readonly [number, number, number])[];
146
+ /** The lines' stroke half-thickness, host units, and their ink. */
147
+ readonly stroke: number;
148
+ readonly ink: RGB;
149
+ /** A mini mat chip's border, host units. */
150
+ readonly margin: number;
151
+ }
152
+ /** A child through the embedding: its footprint scaled by `M.s` about the host's origin; a note's lines greeked at `weight` × the line pitch (MINIMAT.chips). */
153
+ export declare function chipOf(c: ChildShape, M: PortalAffine, weight?: number): Chip;
154
+ /** The most characters of a NAME the border prints. */
155
+ export declare const NAME_CHARS = 32;
156
+ /** A name as the atlas's glyph indices (mat/layout.ts `GLYPHS`): capitals, a letter it lacks printed as a space; at most NAME_CHARS. */
157
+ export declare function nameGlyphs(name: string, glyphs?: string): number[];
158
+ /**
159
+ * Glyph indices packed four to a float (6 bits each, base 64 — an integer under 2²⁴, exact in
160
+ * an f32), NAME_CHARS / 4 floats: what the record's `name` carries. The shader unpacks slot k
161
+ * as `(u32(f[k / 4]) >> (6 · (k % 4))) & 63`.
162
+ */
163
+ export declare function packGlyphs(indices: readonly number[]): number[];
164
+ /** Which rung of the face's lattice the ruler numbers, and how: its spacing (inside units), the label's `mult · 10^exp` per site index, and the presence of the sites it numbers that the next rung does not. */
165
+ export interface Numerals {
166
+ readonly spacing: number;
167
+ readonly mult: number;
168
+ readonly exp: number;
169
+ readonly fade: number;
170
+ }
171
+ /**
172
+ * The ruler's numerals at the zoom the inside is seen at (`insideZoom`): the finest of the face's rungs
173
+ * whose sites are `from[0]` CSS px apart on screen, its own sites fading in by `from` and every tenth
174
+ * (the next rung's) at full — the rulers' law (RULER.md), on three rungs. A spacing is 2·10^k (lod.ts),
175
+ * so a site's value is `index · 2 · 10^k`. Null = no rung is far enough apart to number.
176
+ */
177
+ export declare function numeralsOf(L: FaceLattice, insideZoom: number, from: readonly [number, number]): Numerals | null;
178
+ /** Is a chip worth drawing at a zoom — its short side at least `minPx` CSS px? */
179
+ export declare const chipVisible: (ch: Chip, zoom: number, minPx?: number) => boolean;
@@ -0,0 +1,8 @@
1
+ /** The vinyls a mini mat is sold in (MINIMAT.md §2) — names; `sage` is the desk's ground, the rest the host's. */
2
+ export declare const VINYLS: readonly ["sage", "slate", "charcoal"];
3
+ export type VinylName = (typeof VINYLS)[number];
4
+ /** The mini mat's durable type id. */
5
+ export declare const MINIMAT_TYPE = "desk.minimat";
6
+ /** Its selection-menu act's id (K8a): the vinyl cycles — an app's key (`t`) runs it through `ops.runMenuAction`. */
7
+ export declare const VINYL_ACT = "vinyl";
8
+ export declare const MiniMat: import("../../../core/src/index").WidgetType;
@@ -0,0 +1,61 @@
1
+ import { type RGB } from "../../../desk/src/index";
2
+ import { type FadeIn, type View, type MatConfig, type MatFrame, type SlotLight, type MatPass, type Presentation, type MatLight } from "../../../desk/src/kit/index";
3
+ import { type MiniMatInstance } from "./layout";
4
+ import { type MiniMatLaw } from "./minimat";
5
+ import type { MiniMatShaders } from "./shaders";
6
+ /** Chips a mini mat's record may name — its BLOCK in the chips buffer (engine/records.ts; the law's `chips.max` caps within it). */
7
+ export declare const CHIPS_PER_MAT: number;
8
+ export declare class MiniMatPass {
9
+ readonly name = "minimat/mats";
10
+ private readonly knobs;
11
+ /** The mini mats' PERSISTENT records and their chips (engine/records.ts, design-015 §4.3; D6): a slot per mini mat while drawn, its chips a fixed block, written when it changed. */
12
+ private readonly store;
13
+ /** The records the last prepare turned away at the pass's cap — not drawn; the ground reports them (`GroundStats.dropped`, D7). */
14
+ dropped: number;
15
+ private readonly knobBuf;
16
+ /** What the GPU holds of the knobs: they are written only when they change (K4a — a standing value costs a frame nothing). */
17
+ private readonly knobsSent;
18
+ private group;
19
+ private boundAssets;
20
+ private boundStore;
21
+ private count;
22
+ private chipsUsed;
23
+ private lawNow;
24
+ /** The mini mat's numbers (theme.ts `MINIMAT`) — the print, the edge, the shadow, the chips. A host tweaks the root's; every slot copies it. A new law repacks every record (the chips' cap is packed). */
25
+ get law(): MiniMatLaw;
26
+ set law(next: MiniMatLaw);
27
+ private readonly device;
28
+ private readonly shared;
29
+ private readonly mat;
30
+ private constructor();
31
+ /** The root's pass, on the root's mat. */
32
+ static create(device: GPUDevice, format: GPUTextureFormat, src: MiniMatShaders, mat: MatPass): Promise<MiniMatPass>;
33
+ /** A second slot on the same pipeline, reading ITS mat's silhouette — a flight's departed desk, a mini mat's inside. */
34
+ spawn(mat: MatPass): MiniMatPass;
35
+ /** Copy the root's tuning — what every slot takes each frame. */
36
+ tune(from: MiniMatPass): void;
37
+ private rebind;
38
+ /**
39
+ * Upload this frame's mini mats in paint order, their chips back to back (a mini mat's
40
+ * beyond the law's cap, or past the buffer, are dropped — the face shows fewer, honestly),
41
+ * and the mat's block for this slot's camera and light (`light` the Sun or the Moon, `lit`
42
+ * the lamp it is seen by — MINIMAT.md §4). `live` is the ground's word on each one's live
43
+ * inside — −1 where none is drawn this frame, else its objects' presence — overriding the
44
+ * instance's own (a portal the ground could not draw leaves the face to the far LOD).
45
+ * Returns the count that will draw.
46
+ */
47
+ prepare(view: View & {
48
+ readonly dpr: number;
49
+ }, fadeIn: FadeIn, cfg: MatConfig, frame: MatFrame | undefined, instances: readonly MiniMatInstance[], present: Presentation | undefined, light?: MatLight, select?: RGB, lit?: SlotLight, live?: (index: number) => number, keys?: readonly number[]): number;
50
+ get drawn(): number;
51
+ /** The chips drawn this frame, every mini mat's together. */
52
+ get chips(): number;
53
+ /** The store's counters (a rig's witness): records written, bytes, draw-list writes, slots in use. */
54
+ get records(): import("../../../desk/src/index").RecordStoreStats;
55
+ draw(pass: GPURenderPassEncoder): void;
56
+ /** Mini mat `at`'s chips OVER its live inside, fading out as the inside's objects fade in — only while the objects are not whole (MINIMAT.md §5). */
57
+ drawChips(pass: GPURenderPassEncoder, at: number): void;
58
+ /** Mini mats [first, end) — paint order is the list's; `drawSlot` cuts the range where a live inside goes. */
59
+ drawRange(pass: GPURenderPassEncoder, first: number, end: number): void;
60
+ dispose(): void;
61
+ }
@@ -0,0 +1,10 @@
1
+ import type { ComposeOptions } from "../../../desk/src/engine/index";
2
+ import { type ShaderText } from "../../../desk/src/kit/index";
3
+ /** The mini mat's own shader files (the kit's pieces come by name). */
4
+ export declare const MINIMAT_SHADER_FILES: {
5
+ readonly minimat: "minimat/minimat.wgsl";
6
+ readonly minimatPass: "minimat/minimat-pass.wgsl";
7
+ };
8
+ /** The mini mat pass's program: the kit's view · portal · sdf · light · ruler, then the mini mat's records, module and entry. */
9
+ export type MiniMatShaders = ComposeOptions;
10
+ export declare function miniMatShaders(text: ShaderText): MiniMatShaders;
@@ -0,0 +1,98 @@
1
+ /**
2
+ * The MINI MAT (MINIMAT.md) — the desk's CONTAINER: a smaller self-healing cutting mat lying on
3
+ * the big one, and inside it another desk (a nested canvas: double-click it, or zoom into it, and
4
+ * it becomes the desk). Its sheet is the mat's own vinyl — the sage and the cream print (`MAT`),
5
+ * the mat's chain by day and the Moon by night — so it is told from the desk by what a real small
6
+ * mat has: its cut edge and its shadow, the printed BORDER round its cutting area (a frame line,
7
+ * a ruler along the top and left edges — its ticks on the very lattice the face shows, numbered
8
+ * in the inside's own units — and its NAME in the foot, as a mat's maker prints its own), and the
9
+ * finer grid of the miniature desk inside. It is thin, so it lies flat and lifts as little as a
10
+ * sheet does, casting the desk's one shadow (`BOOK.shadow`: the note's penumbra with a contact
11
+ * term at the base). World units (CSS px at zoom 1).
12
+ */
13
+ export declare const MINIMAT: {
14
+ /** A new mini mat: 8 × 6 of the tree-shadow design's 80-unit modules (mat.css `--module`). */
15
+ readonly size: {
16
+ readonly w: 640;
17
+ readonly h: 480;
18
+ };
19
+ /** The die-cut corner; the printed border's width (the FACE is the sheet inset by it); the vinyl's thickness. */
20
+ readonly radius: 10;
21
+ readonly margin: 32;
22
+ readonly thick: 3;
23
+ /** Held it rises and reads a touch larger — a thin sheet lifts less than a note (PAPER.lift 12 · 1.03); hovered it rises a fifth of that (Marks on the Mat: hover is a rise, never an outline). */
24
+ readonly lift: {
25
+ readonly height: 10;
26
+ readonly scale: 1.02;
27
+ };
28
+ readonly hover: 0.2;
29
+ /** The shadow: the desk's one law. */
30
+ readonly shadow: {
31
+ readonly penumbra: {
32
+ readonly sigma0: 2.2;
33
+ readonly sigmaPerHeight: 0.9;
34
+ readonly alpha: 0.36;
35
+ };
36
+ readonly contact: {
37
+ readonly sigma: 1.1;
38
+ readonly alpha: 0.3;
39
+ readonly reach: 2.5;
40
+ };
41
+ readonly slopeMax: 2.2;
42
+ };
43
+ /** The cut edge: a bevel this wide, catching the lamp on its near side (× 1 + light) and falling away on the far (× 1 − dark). */
44
+ readonly edge: {
45
+ readonly width: 1.5;
46
+ readonly light: 0.1;
47
+ readonly dark: 0.18;
48
+ };
49
+ /**
50
+ * The print, in the mat's cream at the tree-shadow design's print-strong (55 %): the frame round the
51
+ * face, the ruler's ticks, its numerals and the name. Its lines this wide (world units: a print
52
+ * scales with the sheet — but never under a device px, the ink thinning instead); the ticks' lengths
53
+ * — minor, medium, major, for the lattice's fine, mid and coarse rungs. The NUMERALS: the rulers' own
54
+ * mono digits (RULER.md), this tall (cap, world units), after their tick by `gap`, their cap's top
55
+ * `top` in from the sheet's edge; a rung is numbered once its sites are `labelsFrom` CSS px apart on
56
+ * screen (its every tenth site, the next rung's, stays numbered). The NAME: the design's print label
57
+ * (mono capitals, tracked 0.16 em) this tall, in the foot of the border from the face's left edge.
58
+ * Text fades in as its cap grows from 4 to 6 CSS px (smaller is a smudge, never a word).
59
+ */
60
+ readonly print: {
61
+ readonly frame: 0.55;
62
+ readonly tick: 0.55;
63
+ readonly width: 1;
64
+ readonly ticks: readonly [5, 9, 14];
65
+ readonly digits: {
66
+ readonly cap: 6;
67
+ readonly gap: 2.5;
68
+ readonly top: 4;
69
+ };
70
+ readonly labelsFrom: readonly [48, 64];
71
+ readonly name: {
72
+ readonly cap: 8;
73
+ readonly tracking: 0.16;
74
+ };
75
+ readonly legible: readonly [4, 6];
76
+ };
77
+ /** The sole-selection ring (DESIGN.md §7), CSS px, in `--vf-select`. */
78
+ readonly ring: 1.5;
79
+ /**
80
+ * The face's far LOD (MINIMAT.md §5): its children drawn as CHIPS — at most this many (ICE's preview
81
+ * record keeps 128), none smaller than this many CSS px; a note's writing GREEKED as lines of ink once
82
+ * its chip is this tall (CSS px), at this presence, its lines this thick (× the line pitch).
83
+ */
84
+ readonly chips: {
85
+ readonly max: 64;
86
+ readonly minPx: 1;
87
+ readonly greekPx: 18;
88
+ readonly greekAlpha: 0.42;
89
+ readonly greekWeight: 0.3;
90
+ };
91
+ /**
92
+ * The face's corner (MINIMAT.md §5; D2b): the inside is clipped SQUARE — the live inside, the far LOD and a flight through it
93
+ * (`faceClip`; its `faceLaw.radius`, K8a — the mini mat's own number, which the kit held as `FACE_RADIUS` until then).
94
+ */
95
+ readonly faceRadius: 0;
96
+ /** The live inside's GATE (CSS px of the face's short side): the portal's law (theme.ts `PORTAL`), by name. */
97
+ readonly gate: readonly [140, 220];
98
+ };