@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
@@ -1,69 +0,0 @@
1
- /**
2
- * The GL metrics panel — the engine-specific renderer readout strata has no
3
- * counterpart for (2026-07-13, James: "comprehensive r3f profiler ... and our
4
- * engine specific optimization metrics ... with nice visuals").
5
- *
6
- * Pure DOM, strata's visual language (same palette/typography as the observer
7
- * + profiler HUD so the three read as one toolset). Fed by pushes of
8
- * `GlPanelStats` — the STRUCTURAL MIRROR of @ice/r3f's `GlFrameStats`
9
- * (devtools cannot import r3f under the walls; keep the shapes aligned):
10
- *
11
- * head fps · gpu ms + a gpu sparkline against the frame budget
12
- * frame cpu / gpu bars vs budget, with session maxima
13
- * render draw calls · triangles · points/lines · programs · geoms · textures
14
- * virtual live render targets + total resolution, FBO bytes vs budget,
15
- * textures the island phase census as a segmented bar, repaint/evict counters
16
- * lod zoom → hysteresis band → effective DPR, live targets per band
17
- * widgets Visible vs Culled population
18
- *
19
- * All values land via `textContent` (never innerHTML with data). Rendering is
20
- * throttled — pushes arrive per composited frame, the DOM refreshes at ~8 Hz.
21
- */
22
- /** Mirror of @ice/r3f `GlFrameStats` (structural — see the header). */
23
- export interface GlPanelStats {
24
- readonly cpuMs: number;
25
- readonly gpuMs: number;
26
- readonly fps: number;
27
- readonly drawCalls: number;
28
- readonly triangles: number;
29
- readonly points: number;
30
- readonly lines: number;
31
- readonly programs: number;
32
- readonly geometries: number;
33
- readonly textures: number;
34
- readonly renderTargets: number;
35
- readonly renderMegaPixels: number;
36
- readonly fboBytes: number;
37
- readonly fboBudgetBytes: number;
38
- readonly islands: {
39
- readonly total: number;
40
- readonly hot: number;
41
- readonly warm: number;
42
- readonly waking: number;
43
- readonly cold: number;
44
- readonly dormant: number;
45
- };
46
- readonly bandHistogram: Readonly<Record<string, number>>;
47
- readonly repainted: number;
48
- readonly pendingPaints: number;
49
- readonly evicted: number;
50
- readonly zoom: number;
51
- readonly band: number;
52
- readonly effectiveDpr: number;
53
- readonly visibleWidgets: number;
54
- readonly culledWidgets: number;
55
- }
56
- export type GlPanelCorner = "tl" | "tr" | "bl" | "br";
57
- export interface GlPanelOptions {
58
- readonly container?: HTMLElement;
59
- readonly corner?: GlPanelCorner;
60
- /** Frame budget in ms — the sparkline's reference line (default 16.7). */
61
- readonly budgetMs?: number;
62
- /** Start with the detail body open (default false). */
63
- readonly expanded?: boolean;
64
- }
65
- export interface GlPanel {
66
- push(stats: GlPanelStats): void;
67
- dispose(): void;
68
- }
69
- export declare function createGlPanel(opts?: GlPanelOptions): GlPanel;
@@ -1,31 +0,0 @@
1
- /**
2
- * The measurement adapter (design-004 §2 host pipeline; measure side).
3
- *
4
- * Wraps a `ResizeObserver` over auto-sized widgets' CONTENT elements and pushes
5
- * `{ entity, w, h }` samples into the engine's {@link MeasureQueue} — the
6
- * adapter-only path (Law 2: adapters ONLY enqueue; `measureIngest` turns samples
7
- * into `MeasuredSize` facts inside the frame contract). It resolves an entity's
8
- * content element on demand via the caller's `hostFor` (the widget host reflector
9
- * owns the element↔entity mapping).
10
- *
11
- * §2 hidden-measure rule: a `display:none` host collapses to `0×0`, and a
12
- * full→0 sample would pass any dead-band and corrupt bounds/cull on re-entry —
13
- * so the adapter NEVER enqueues while the host is hidden (computed `display:none`
14
- * / no `offsetParent`), and also drops a literal `0×0`. It is the CALLER's job to
15
- * re-`observe` (or otherwise force a remeasure) on re-show — a `ResizeObserver`
16
- * does not re-fire for an element that was hidden and shown at the same box size.
17
- *
18
- * One shared `ResizeObserver` multiplexes every observed element (fewer objects,
19
- * identical semantics to one-per-element); `element → entity` maps a callback
20
- * entry back to its widget.
21
- */
22
- import type { Entity, MeasureQueue } from "../../core/src/index";
23
- export interface MeasureAdapter {
24
- /** Begin observing the entity's content element (no-op if `hostFor` yields none). */
25
- observe(entity: Entity): void;
26
- /** Stop observing the entity's content element. */
27
- unobserve(entity: Entity): void;
28
- /** Disconnect the observer and drop all mappings. */
29
- dispose(): void;
30
- }
31
- export declare function attachMeasureAdapter(hostFor: (e: Entity) => HTMLElement | undefined, queue: MeasureQueue): MeasureAdapter;
@@ -1,49 +0,0 @@
1
- /**
2
- * Measurement wiring (design-004 §2 host pipeline; measure side, the store half).
3
- *
4
- * `attachMeasureAdapter` owns the `ResizeObserver` and the element→entity
5
- * mapping; THIS module owns *when* to observe/unobserve, driven by the engine's
6
- * widget mount store. It subscribes and reconciles each snapshot diff into four
7
- * transitions (design-004 §2 / decision 4):
8
- *
9
- * - **fresh mount + visible** → `observe` (the RO fires its own first sample);
10
- * - **visible → hidden** (culled-but-kept-mounted) → `unobserve` (disconnect on
11
- * hide — a `display:none` host measures `0×0` and a full→0 sample corrupts
12
- * bounds/cull on re-entry);
13
- * - **hidden → shown** → re-`observe` AND a FORCED synchronous re-measure: a
14
- * `ResizeObserver` does not re-fire for an element hidden and shown at the
15
- * same box size, so the reconnect alone would leave the rider stale;
16
- * - **unmount** (exits the snapshot) → `unobserve`.
17
- *
18
- * Ordering note: the mount store notifies from the widget-runtime flush
19
- * reflector, which is registered BEFORE the `domWidgets` host reflector — so at
20
- * notify time the host `<div>` for a just-mounted (or just-shown) widget may not
21
- * exist / may still be `display:none`. Like the React portal hook (which defers
22
- * via its own scheduler), this defers the reconcile to a microtask so it runs
23
- * AFTER the whole synchronous reflector pass, by which point `domWidgets` has
24
- * created/unhidden the host and `hostFor` + the forced re-measure see a real box.
25
- *
26
- * Law 2 holds: everything here only enqueues (through the adapter or the forced
27
- * sample) — no world writes, no ECS reads.
28
- */
29
- import type { Entity, MeasureQueue, WidgetMountStore } from "../../core/src/index";
30
- /** The element source (the `domWidgets` reflector supplies this via `hostFor`). */
31
- export interface MeasureWiringHosts {
32
- hostFor(entity: Entity): HTMLElement | undefined;
33
- }
34
- export interface MeasureWiringOpts {
35
- /**
36
- * Border-box read for the forced re-measure on show. Defaults to layout
37
- * `offsetWidth`/`offsetHeight`; tests inject a deterministic stub.
38
- */
39
- readonly measure?: (el: HTMLElement) => {
40
- w: number;
41
- h: number;
42
- };
43
- }
44
- /**
45
- * Begin observing auto-sized widget hosts against `store`, pushing measurements
46
- * into `queue` (drained by `measureIngest`). Returns a teardown that
47
- * unsubscribes and disposes the underlying `ResizeObserver`.
48
- */
49
- export declare function wireMeasurement(store: WidgetMountStore, hosts: MeasureWiringHosts, queue: MeasureQueue, opts?: MeasureWiringOpts): () => void;
@@ -1,33 +0,0 @@
1
- /**
2
- * The lifted plane (design-004 §1, planes P1/P3 — M6 slice).
3
- *
4
- * M3 stood up ONE camera-transformed content plane (`host.ts`, P1). M6 adds P3,
5
- * the **lifted** plane: a second transform-origin-0-0 div appended to the
6
- * container AFTER the content plane, so it stacks ABOVE it (P3 over P1) with no
7
- * z-index bookkeeping — DOM order is the strata order (§1: "stacking is
8
- * stratified"). Both planes take the SAME single camera transform (the
9
- * plane-transform reflector writes both), so a promoted widget re-parented
10
- * content→lifted keeps its world position; it just paints above the content
11
- * layer for the duration of the drag.
12
- *
13
- * `createCanvasHost` is intentionally untouched: the content plane it owns is
14
- * the P1 authority. `createPlanes` is additive — it borrows that content plane
15
- * and mints the lifted sibling next to it.
16
- */
17
- import type { CanvasHost } from "./host";
18
- /** The two DOM planes M6 addresses: P1 content (host-owned) + P3 lifted. */
19
- export interface Planes {
20
- /** P1: the host's camera-transformed content plane; world-positioned hosts mount here. */
21
- readonly content: HTMLDivElement;
22
- /** P3: camera-transformed, stacked above content; promoted (dragged) hosts re-parent here. */
23
- readonly lifted: HTMLDivElement;
24
- /** Remove the lifted plane (the content plane is the host's — host.dispose reaps it). */
25
- dispose(): void;
26
- }
27
- /**
28
- * Mint the lifted plane next to the host's content plane. The lifted div is
29
- * appended to the container AFTER the content plane, so it renders above it
30
- * (P3 > P1). Returns both planes for the plane-transform reflector (writes both)
31
- * and the dom-widgets reflector (re-parents hosts between them on drag-promote).
32
- */
33
- export declare function createPlanes(host: CanvasHost): Planes;
@@ -1,33 +0,0 @@
1
- /**
2
- * The chrome reflector (design-004 §5 chrome plane P4; post-notify, SCREEN-space).
3
- *
4
- * Draws the engine's pooled chrome entities plus the out-of-ECS marquee buffer
5
- * into a dedicated, non-transformed overlay plane above the content plane:
6
- * - each `SelectionBox` entity → a 1px outline rect (its world x,y,w,h mapped to
7
- * screen via `worldToScreen` × zoom);
8
- * - each `HandleSpec` entity → an 8×8 screen-px square CENTERED on the handle's
9
- * world AABB center (the handle's world size is zoom-scaled for picking; the
10
- * drawn size is screen-constant);
11
- * - the `marqueeBuffer.rect` (world) → a rect while non-null.
12
- *
13
- * P4 is screen-space by design (design-004 §2 rescope): unlike the content plane
14
- * (one camera transform), chrome is recomputed per camera change — small N. This
15
- * reflector therefore reads the `Camera` resource directly (an acknowledged
16
- * small-N screen-space camera consumer).
17
- *
18
- * `always: true`, not observer-driven: the marquee buffer has no ECS stamp to
19
- * observe, so the reflector must get a chance every frame. A cheap early-out
20
- * keeps it idle-free — it returns immediately when there is nothing to draw AND
21
- * nothing was drawn last frame (so a cleared selection still gets one flush to
22
- * remove its nodes). Style writes are change-only (per-node geometry cache) and
23
- * counted by `writes()` — the churn instrument, mirroring the other reflectors.
24
- *
25
- * Law 10: reflectors write output only, never read layout or write ECS — this
26
- * flush touches only the overlay plane's node styles.
27
- */
28
- import { type MarqueeBuffer, type ReflectorDef, type World } from "../../../core/src/index";
29
- import type { CanvasHost } from "../host";
30
- export declare function createChromeReflector(host: CanvasHost, _world: World, marqueeBuffer: MarqueeBuffer): ReflectorDef & {
31
- writes(): number;
32
- dispose(): void;
33
- };
@@ -1,59 +0,0 @@
1
- /**
2
- * The DOM widget HOST reflector (design-004 §2 host pipeline; design-002 §5
3
- * `domWidgets`).
4
- *
5
- * This is the reflector-owned HALF of the widget runtime: it reconciles a host
6
- * `<div>` per mounted widget against the engine's mount store and paints its
7
- * world-unit geometry. The OTHER half — the React portal list — is owned by a
8
- * hook subscribed to the SAME store (design-004 §2, decision 3); this file never
9
- * touches React. Each host carries an inner `data-ice-content` element that the
10
- * portal targets, so the two halves meet only at that node.
11
- *
12
- * Store, not query: membership (enter/exit) and the culled-but-kept-mounted
13
- * `hidden` flag are ENGINE-side decisions (cull + keep-mounted LRU, mount-store.ts)
14
- * published through a `useSyncExternalStore` snapshot. That store has NO ECS stamp
15
- * for a reflector `observe` to watch, so — like the cursor reflector — this one is
16
- * `always: true` and does its own cheap dirt detection:
17
- * - **membership**: `store.getSnapshot()` identity is O(1); the snapshot changes
18
- * IFF membership or a hidden flag changed, so an unchanged snapshot skips the
19
- * reconcile entirely;
20
- * - **geometry**: a private observer on `[Position, Size]` sets a dirty flag, so
21
- * the (change-only) geometry pass runs only when a widget actually moved/resized
22
- * — a still scene touches no DOM. Effective size is `MeasuredSize` where present
23
- * and non-zero, else `Size` (design-004 §2). (MeasuredSize changes ride a
24
- * dedicated observer; the note below is historical:
25
- * picked up on the next Position/Size stamp or membership change; the ResizeObserver
26
- * measurement path — a later slice — will arm its own dirt.)
27
- * - **opacity**: a private observer on `[Opacity]` (attach/detach/value) sets a
28
- * dirty flag; the change-only pass writes `style.opacity` on the host (absent
29
- * component = 1 = property cleared). The GL twin is the composite quad's
30
- * `uOpacity` — a gl widget's host here carries only its DOM chrome, so the
31
- * two halves fade from the same cell.
32
- * - **drag-promote** (P3): a private observer on `[Grab]` membership sets a dirty
33
- * flag; a host whose entity holds `Grab` re-parents content→lifted plane and back
34
- * on release. Re-parenting MOVES the host node (with its content child), which
35
- * PRESERVES the React portal — the portal targets the content node, and moving a
36
- * portal's container node does not remount it, so widget React state survives the
37
- * lift. While ANY host is lifted, every host's content element is inerted
38
- * (`pointer-events: none`, the pinned inert-during-drag contract, design-004 §4).
39
- *
40
- * Law 10: reflectors run post-notify, write output only, never read layout or
41
- * write ECS — this flush touches only host `<div>` style/attributes/parentage.
42
- */
43
- import { type Entity, type ReflectorDef, type WidgetMountStore, type World } from "../../../core/src/index";
44
- /** The two planes a host can live in (design-004 §1: P1 content, P3 lifted). */
45
- export interface DomWidgetsHost {
46
- readonly contentPlane: HTMLElement;
47
- readonly liftedPlane: HTMLElement;
48
- }
49
- export interface DomWidgetsReflector extends ReflectorDef {
50
- /** The entity's content element (the `data-ice-content` portal target), or undefined if not hosted. */
51
- hostFor(entity: Entity): HTMLElement | undefined;
52
- /** Live host count (= mounted widgets, visible + kept-mounted). */
53
- hostCount(): number;
54
- /** Geometry writes so far — one per enter, one per changed host, zero for unchanged (churn instrument). */
55
- geometryWrites(): number;
56
- /** Tear down the private observers (call when unregistering the reflector before the world dies). */
57
- dispose(): void;
58
- }
59
- export declare function createDomWidgetsReflector(host: DomWidgetsHost, world: World, store: WidgetMountStore): DomWidgetsReflector;
@@ -1,31 +0,0 @@
1
- /**
2
- * The gray-box reflector (design-002 §5 reflector doctrine; M3 exit gate).
3
- *
4
- * A minimal enter/update/exit reconciler: it mirrors every `Position` + `Size`
5
- * entity to an absolutely-positioned div inside the content plane, laying each
6
- * out in WORLD units (`left/top/width/height` in world coordinates) — the
7
- * plane's single camera transform (see plane-transform.ts) does the screen
8
- * mapping, so this reflector never touches the camera and never reads layout
9
- * (Law 10). It is the stand-in for real widget rendering until the widget
10
- * runtime lands (M4+); "gray box" = deterministic per-entity fill, no content.
11
- *
12
- * Reconciliation, dirty-driven on the `Position`/`Size` query (design-002 §5):
13
- * - enter: create a div (fill hashed from the entity handle), write geometry,
14
- * stage it in a DocumentFragment (one plane append per flush — 10k mounts do
15
- * not thrash layout);
16
- * - update: compare against a per-entity geometry cache and rewrite ONLY the
17
- * entities whose world geometry actually changed;
18
- * - exit: remove divs for entities absent from this flush.
19
- *
20
- * `styleWrites()` counts entities whose geometry was (re)written this flush (one
21
- * per enter, one per changed entity, zero for unchanged) — the churn instrument
22
- * the M3 tests assert: change one entity ⇒ exactly one style write. `nodeCount()`
23
- * is the live div count. Because the reflector is dirty-driven, a static frame
24
- * does not flush at all, so neither counter moves.
25
- */
26
- import { type ReflectorDef } from "../../../core/src/index";
27
- import type { CanvasHost } from "../host";
28
- export declare function createGrayboxReflector(host: CanvasHost): ReflectorDef & {
29
- styleWrites(): number;
30
- nodeCount(): number;
31
- };
@@ -1,38 +0,0 @@
1
- /**
2
- * The plane-transform reflector (design-002 §5 `planeTransform`; M3 exit gate,
3
- * widened for the M6 lifted plane).
4
- *
5
- * Observes the `Camera` RESOURCE and nothing else. Each flush reads the camera,
6
- * derives the ONE per-plane CSS transform via kernel `planeCssTransform` (the
7
- * sole owner of that math — Law 13), and writes it to EVERY camera-transformed
8
- * DOM plane in a SINGLE `style.transform` assignment each. Panning the whole
9
- * canvas is therefore O(1) in the DOM: one transform write per plane per moving
10
- * frame, independent of node count — the property that makes an infinite canvas
11
- * of 10k gray boxes pan at frame rate.
12
- *
13
- * The input is widened to `{ contentPlane; liftedPlane? }` (design-004 §1: P1 +
14
- * P3 share the one camera). A `CanvasHost` still satisfies it structurally, so
15
- * M3 callers are unchanged; M6 passes both planes and the lifted plane (P3)
16
- * tracks the content plane (P1) exactly, so a promoted widget keeps its world
17
- * position across the content→lifted re-parent.
18
- *
19
- * `transformWrites()` is the M3 instrument: because the reflector is dirty-
20
- * driven on the Camera resource (equality-suppressed — design-002 §5), a static
21
- * camera flushes zero times and the counter stays flat; every distinct camera
22
- * value bumps it exactly once. The frame-contract tests assert both halves.
23
- *
24
- * Law 10: reflectors run post-notify, write output only, and NEVER read layout
25
- * or write ECS — this flush touches only `host.contentPlane.style`.
26
- */
27
- import { type ReflectorDef } from "../../../core/src/index";
28
- /**
29
- * The camera-transformed DOM plane(s). A `CanvasHost` satisfies this
30
- * structurally (M3 backward compat); M6 passes `liftedPlane` too so P3 tracks P1.
31
- */
32
- export interface CameraPlanes {
33
- readonly contentPlane: HTMLElement;
34
- readonly liftedPlane?: HTMLElement;
35
- }
36
- export declare function createPlaneTransformReflector(host: CameraPlanes): ReflectorDef & {
37
- transformWrites(): number;
38
- };
@@ -1,69 +0,0 @@
1
- /**
2
- * @ice/ground — the P0 ground stratum as ONE WebGPU canvas (design-004 §1
3
- * as-built amendment, 2026-07-16). three's WebGPURenderer + TSL, WebGL2
4
- * fallback automatic. Off the react chain: react receives the layer as an
5
- * OPAQUE factory (`<InfiniteCanvas ground={ground(...)}>`); imperative apps
6
- * register `layer.reflector` themselves. Passes: dot grid, wires, snap
7
- * guides — future ground shaders/effects join the same pass registry.
8
- * (Selection chrome moved OFF the ground 2026-07-17: rings live with the
9
- * cards, the multi-select union box is P4 dom chrome — always on top.)
10
- */
11
- import type { GridConfig, SnapGuidesConfig, WirePreviewBuffer, WiresConfig, World } from "../../core/src/index";
12
- import { type GroundLayerHost, type GroundReflector } from "./layer";
13
- import type { GroundPass } from "./pass";
14
- import type { ReadSpatial } from "./passes/magnet-collect";
15
- import type { PoleSource } from "./poles";
16
- import { type GroundRendererLike } from "./renderer";
17
- export type { GroundFrame, GroundPass } from "./pass";
18
- export type { GroundReflector } from "./layer";
19
- export type { GroundRendererLike } from "./renderer";
20
- export { SoupBuilder, parseCssColor, type Rgba, type TriSoup } from "./passes/soup-collect";
21
- export { collectGuides } from "./passes/guides-collect";
22
- export { collectWires } from "./passes/wires-collect";
23
- export { cursorVisualPoles, localPointerPoles, type Pole, type PoleSource } from "./poles";
24
- export { collectMagnetLevels, collectMagnetSources, magnetFieldScale, resolveMagnet, MAX_MAGNET_SOURCES, type MagnetLevel, type ReadSpatial, } from "./passes/magnet-collect";
25
- export { DEFAULT_GRID_CONFIG, DEFAULT_GRID_MAGNET_CONFIG, DEFAULT_SNAP_GUIDES_CONFIG, DEFAULT_WIRES_CONFIG, type GridConfig, type GridMagnetConfig, type SnapGuidesConfig, type WiresConfig, } from "../../core/src/index";
26
- export interface GroundContext {
27
- readonly host: GroundLayerHost;
28
- readonly world: World;
29
- /** Connect-drag preview reader (graph boards); omit on boards without wires. */
30
- readonly readWirePreview?: () => WirePreviewBuffer;
31
- /**
32
- * Broad-phase reader over the ONE spatial index (design-010 §3.2, the
33
- * readWirePreview precedent) — the magnet grid's widget sources. Facades
34
- * wire `stack.index.search`; omit ⇒ magnet renders a pole-only field.
35
- */
36
- readonly readSpatial?: ReadSpatial;
37
- }
38
- export interface GroundLayer {
39
- readonly reflector: GroundReflector;
40
- /** Live grid re-tune (the react `grid` prop forwards here). */
41
- configureGrid(cfg: Partial<GridConfig>): void;
42
- dispose(): void;
43
- }
44
- export interface GroundOptions {
45
- readonly grid?: Partial<GridConfig>;
46
- readonly wires?: Partial<WiresConfig>;
47
- readonly guides?: Partial<SnapGuidesConfig>;
48
- /**
49
- * Magnet pole sources (design-010 §3.3) — live app-authored objects, so they
50
- * live HERE, not in the plain-data GridConfig. Nothing wired ⇒ the magnet
51
- * field (if enabled) is widget-only; with magnet off they cost one gated
52
- * no-op subscription each.
53
- */
54
- readonly poles?: PoleSource | readonly PoleSource[];
55
- /** Extra app passes, rendered after the built-ins (renderOrder ≥ 3 is yours). */
56
- readonly passes?: readonly GroundPass[];
57
- /** Force the WebGL2 backend (debug / e2e A-B runs). */
58
- readonly forceWebGL?: boolean;
59
- /** TEST seam: inject a fake renderer (headless orchestration tests). */
60
- readonly rendererOverride?: GroundRendererLike;
61
- }
62
- export type GroundFactory = (ctx: GroundContext) => GroundLayer;
63
- /**
64
- * Build the ground layer factory. Usage:
65
- * react apps: <InfiniteCanvas ground={ground({ grid: {...} })} …>
66
- * imperative apps: const layer = ground()( { host, world, readWirePreview } );
67
- * engine.registerReflector(layer.reflector);
68
- */
69
- export declare function ground(opts?: GroundOptions): GroundFactory;
@@ -1,40 +0,0 @@
1
- /**
2
- * The ground LAYER — one reflector, one canvas, one render (design-004 §1
3
- * as-built 2026-07-16: P0 consolidated from three stacked canvases into a
4
- * single WebGPU canvas; grid, wires and snap-guides are now PASSES of this
5
- * layer, and future ground effects join the same registry).
6
- *
7
- * Coordinate model: the layer renders in SCREEN CSS-px space — an ortho
8
- * camera maps [0..w]×[0..h] (y-down) to clip, and passes build their geometry
9
- * through the kernel `worldToScreen` seam per collect (the proven 2D-canvas
10
- * semantics: geometry rebuilds on the same dirt that re-stroked the old
11
- * canvases; the grid stays a per-pixel screen-space shader). The Y-flip
12
- * question never arises here — `worldToScreen` IS the one conversion (L13).
13
- *
14
- * Reflector contract (design-002 §5): post-notify, output-only, never reads
15
- * layout in flush (the ResizeObserver owns sizing), never writes ECS.
16
- * `always: true` with a private dirty union — an idle scene renders zero
17
- * frames; ANY dirty pass re-renders the whole canvas (one draw, same cost
18
- * class as a pan frame under the old grid). WebGPU init is async: flushes
19
- * before ready are deferred (flags stay armed), the first ready flush paints.
20
- */
21
- import { type ReflectorDef, type World } from "../../core/src/index";
22
- import type { GroundPass } from "./pass";
23
- import type { GroundRendererLike } from "./renderer";
24
- export interface GroundLayerHost {
25
- readonly container: HTMLElement;
26
- readonly contentPlane: HTMLElement;
27
- }
28
- export interface GroundReflector extends ReflectorDef {
29
- /** False while init is pending or after a device/context failure. */
30
- available(): boolean;
31
- /** Whole-canvas renders so far (the churn instrument — 0 on an idle scene). */
32
- redraws(): number;
33
- }
34
- export interface GroundLayerInternals {
35
- reflector: GroundReflector;
36
- /** Wake every pass + render (config changes, external invalidation). */
37
- invalidateAll(): void;
38
- dispose(): void;
39
- }
40
- export declare function createLayer(host: GroundLayerHost, world: World, renderer: GroundRendererLike, passes: readonly GroundPass[]): GroundLayerInternals;
@@ -1,41 +0,0 @@
1
- /**
2
- * The ground-pass contract (design-004 §1, as-built 2026-07-16: P0 is ONE
3
- * WebGPU canvas; passes are its draw layers).
4
- *
5
- * A pass owns a scene `object` (mesh/group with a TSL node material), arms its
6
- * own dirty observers, and rebuilds its geometry/uniforms in `collect` — PURE
7
- * world reads in the layer's SCREEN-px coordinate space (the ortho camera maps
8
- * CSS px → clip; world→screen goes through the kernel `worldToScreen` seam,
9
- * Law 13). Heavy per-pass math (tessellation, triangle-soup emission) lives in
10
- * sibling `*-collect.ts` modules that import ONLY core/kernel, so collectors
11
- * unit-test under happy-dom with no GPU and no three import.
12
- */
13
- import type { World } from "../../core/src/index";
14
- import type { Object3D } from "three/webgpu";
15
- /** Per-flush frame facts every pass collects against. */
16
- export interface GroundFrame {
17
- /** CSS-px viewport size. */
18
- readonly width: number;
19
- readonly height: number;
20
- readonly dpr: number;
21
- /** Engine camera: world top-left + zoom (grid.ts P0 contract). */
22
- readonly camera: {
23
- readonly x: number;
24
- readonly y: number;
25
- readonly zoom: number;
26
- };
27
- }
28
- export interface GroundPass {
29
- readonly name: string;
30
- /** The pass's scene object; the layer adds it once and disposes with the pass. */
31
- readonly object: Object3D;
32
- /**
33
- * Arm dirty observers on the world; `wake()` marks this pass for a
34
- * re-collect on the next flush. Camera/resize dirt is LAYER-owned (it wakes
35
- * every pass) — arm only pass-specific sources here. Returns unsubscribers.
36
- */
37
- arm(world: World, wake: () => void): Array<() => void>;
38
- /** Rebuild geometry/uniforms from the world (read-only; screen-px space). */
39
- collect(world: World, frame: GroundFrame): void;
40
- dispose(): void;
41
- }
@@ -1,30 +0,0 @@
1
- /**
2
- * The CLASSIC dot-grid renderer — extracted VERBATIM from grid.ts when the
3
- * magnet mode arrived (design-010 D1: classic stays the default and the
4
- * pixel-exact baseline; the pass facade in grid.ts owns mode switching).
5
- *
6
- * TSL port of the raw-WebGL grid (itself verbatim from v1 GridRenderer.ts;
7
- * the fragment math below is that shader re-expressed as a node graph, level
8
- * loop unrolled in JS). Screen-space: a fullscreen triangle whose vertex
9
- * stage passes clip coords through; the fragment reconstructs world position
10
- * from `screenCoordinate` (top-left device px on BOTH backends — three
11
- * normalizes, so the old manual y-flip is gone) + camera uniforms.
12
- *
13
- * One deliberate re-expression: the GLSL if/else fade ladder became the
14
- * closed form `clamp(min(rise, fall), 0, 1)` — identical piecewise output
15
- * (rise 0→1 across fadeIn, plateau 1, fall 1→0 across fadeOut) with no
16
- * branching. Everything else (fract-distance dots, 0.5-device-px AA,
17
- * max-composited levels) matches term for term.
18
- */
19
- import type { GridConfig } from "../../../core/src/index";
20
- import { Mesh } from "three/webgpu";
21
- import type { GroundFrame } from "../pass";
22
- export interface ClassicGridRenderer {
23
- readonly mesh: Mesh;
24
- /** Layer-written each collect. */
25
- setCamera(frame: GroundFrame): void;
26
- /** Config-written (the configure seam). */
27
- configure(cfg: GridConfig): void;
28
- dispose(): void;
29
- }
30
- export declare function createClassicGrid(cfg: GridConfig): ClassicGridRenderer;
@@ -1,31 +0,0 @@
1
- /**
2
- * The MAGNET grid renderer — TSL port of vibe-field draft/magnet-grid's
3
- * `magnet.wgsl` (design-010 §5). Three instanced-quad meshes (one per lattice
4
- * level) whose vertex stage reconstructs sites from `instanceIndex`, evaluates
5
- * the field (superposition of rounded-box SDF sources; poles are DEGENERATE
6
- * boxes with half = 0, r = 0 — D3), and shapes the glyph (needle orients
7
- * along the field; dot swells with |field|).
8
- *
9
- * Deltas from the WGSL, per design-010:
10
- * - ONE source buffer (storage, read-only, `setPBO` for the WebGL fallback —
11
- * D4); the mouse uniform / `mouseOn` branch are deleted.
12
- * - fade ladder, level weight and dotAlpha are CPU-baked into ONE per-level
13
- * alpha (they are per-level constants per frame — magnet-collect owns them).
14
- * - dot rest radius comes from `GridConfig.dotRadius[0]` (config continuity
15
- * with the classic grid), not the WGSL's hardcoded `halfLen·0.16`.
16
- * - coincidence skip (§5.4): sites shared with a visible coarser level drop
17
- * out (integer spacing ratios), replicating the classic max-composite look.
18
- * - NDC is computed from CSS-px directly (the WGSL path) — glyph sizes are
19
- * CSS px, DPR rides the viewport; the layer's ortho camera is bypassed.
20
- */
21
- import type { GridConfig, GridMagnetConfig } from "../../../core/src/index";
22
- import { Group } from "three/webgpu";
23
- import type { GroundFrame } from "../pass";
24
- import { type MagnetLevel } from "./magnet-collect";
25
- export interface MagnetGridRenderer {
26
- readonly group: Group;
27
- /** Rewrite every uniform + the source buffer from this frame's collect. */
28
- update(frame: GroundFrame, cfg: GridConfig, magnet: GridMagnetConfig, levels: readonly MagnetLevel[], sources: Float32Array, sourceCount: number): void;
29
- dispose(): void;
30
- }
31
- export declare function createMagnetGrid(): MagnetGridRenderer;
@@ -1,28 +0,0 @@
1
- /**
2
- * The grid pass — a MODE FACADE since design-010: the classic analytic dot
3
- * grid (grid-classic.ts, the default — byte-identical to pre-magnet builds)
4
- * and the magnet field lattice (grid-magnet.ts + magnet-collect.ts) behind
5
- * ONE `GridPass` contract. `configure` deep-merges the `magnet` key one level
6
- * (§3.1) so partial re-tunes never clobber the block.
7
- *
8
- * Wake graph (all magnet wakes gated on `enabled` — the idle-scene zero-frame
9
- * guarantee is untouched when off): camera/resize are layer-owned;
10
- * `SpatialVersion` re-collects widget sources (gated on `widgets` too);
11
- * injected pole sources wake through their own subscriptions (D5 — the pass
12
- * observes no pointer/cursor/presence vocabulary). The magnet renderer is
13
- * built LAZILY on first enable: classic-only apps pay zero magnet cost.
14
- */
15
- import { type GridConfig } from "../../../core/src/index";
16
- import type { GroundPass } from "../pass";
17
- import type { PoleSource } from "../poles";
18
- import { type ReadSpatial } from "./magnet-collect";
19
- export interface GridPass extends GroundPass {
20
- /** Live re-tune (the react `grid` prop seam) — partial merge over current values. */
21
- configure(cfg: Partial<GridConfig>): void;
22
- }
23
- /** Injected magnet inputs (design-010 §3.2) — absent pieces disable their sources. */
24
- export interface GridPassDeps {
25
- readonly poles?: readonly PoleSource[];
26
- readonly readSpatial?: ReadSpatial;
27
- }
28
- export declare function createGridPass(initial?: Partial<GridConfig>, deps?: GridPassDeps): GridPass;
@@ -1,14 +0,0 @@
1
- /**
2
- * Snap-guides collector — the pure ECS→triangles half of the guides pass
3
- * (v1 SnapGuideRenderer look, carried over from the 2D-canvas reflector it
4
- * replaces): full-viewport magenta alignment lines (`GuideLine.from == to` ⇒
5
- * full span — design-003 §6), bounded spans, and equal-spacing bars with 4px
6
- * end ticks. Screen-px output via the kernel `worldToScreen` seam. NO guide
7
- * count caps (the pool grows; so does the soup).
8
- */
9
- import { type SnapGuidesConfig, type World } from "../../../core/src/index";
10
- import type { GroundFrame } from "../pass";
11
- import { type TriSoup } from "./soup-collect";
12
- export declare const guideQ: import("@vibecook/strata-ecs").Query;
13
- export declare const barQ: import("@vibecook/strata-ecs").Query;
14
- export declare function collectGuides(world: World, frame: GroundFrame, config?: SnapGuidesConfig): TriSoup;
@@ -1,3 +0,0 @@
1
- import { type SnapGuidesConfig } from "../../../core/src/index";
2
- import type { GroundPass } from "../pass";
3
- export declare function createGuidesPass(initial?: Partial<SnapGuidesConfig>): GroundPass;