@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,96 +0,0 @@
1
- import { type ReactElement } from "react";
2
- import { type Texture } from "three";
3
- import { type Engine, type WidgetMountStore } from "../../core/src/index";
4
- import type { GLBridge } from "./bridge";
5
- export interface GLViewsProps {
6
- readonly engine: Engine;
7
- readonly bridge: GLBridge;
8
- readonly store: WidgetMountStore;
9
- /** FBO byte budget (default `RUNTIME_BUDGETS.fboBytes`, 256 MB). */
10
- readonly maxFboBytes?: number;
11
- /** Repaint stagger per composited frame (v1 default 4). */
12
- readonly maxRepaintsPerFrame?: number;
13
- /**
14
- * Ambient-animation rate cap (default 60; `Infinity` = uncapped). Applies
15
- * ONLY to self-sustained frames — Hot islands and stagger backlogs park the
16
- * loop between paints instead of spinning at native refresh (5 Hot islands
17
- * at 120 Hz dpr-2 measured 96 % GPU duty at idle, 2026-07-14). Lift eases
18
- * and externally invalidated frames (camera, drags, props dirt) still run
19
- * at display rate. Approximate: frames land on the vsync grid.
20
- */
21
- readonly maxAnimationFps?: number;
22
- /**
23
- * Idle paint-DPR ceiling (default 1.5; `Infinity` = uncapped): island FBOs
24
- * allocate at `min(pixelRatio, maxPaintDpr) × band`. On dpr-2 displays the
25
- * composite's bilinear upscale from 1.5× is visually indistinguishable
26
- * (2026-07-14 A/B) and cuts Hot repaint cost ~22 %.
27
- */
28
- readonly maxPaintDpr?: number;
29
- /**
30
- * Shared IBL: stamped as `scene.environment` on EVERY island's private
31
- * scene (arrival/change repaints all islands). Load it app-side (e.g.
32
- * drei's useEnvironment in a Suspense boundary) — undefined until then is
33
- * fine; islands paint unlit-by-IBL and repaint when it lands.
34
- */
35
- readonly environment?: Texture | null;
36
- /**
37
- * GL frame profiling (2026-07-13): fires once per composited frame with the
38
- * pass's real costs. CPU/counts/pass-shape are engine-measured every
39
- * profiled frame; GPU ms rides stats-gl's headless `StatsProfiler`
40
- * (EXT_disjoint_timer_query / WebGPU timestamps — 0 where unsupported, e.g.
41
- * Safari without its flag), DYNAMICALLY imported on first use so the
42
- * dependency costs nothing when profiling is off. Feed the numbers to the
43
- * devtools profiler HUD as lanes (`devtools.lane("gpu", s.gpuMs)`).
44
- */
45
- readonly onFrameStats?: (stats: GlFrameStats) => void;
46
- }
47
- /**
48
- * One profiled composite frame — see {@link GLViewsProps.onFrameStats}.
49
- * MIRRORED structurally as `GlPanelStats` in @ice/devtools (which cannot
50
- * import r3f under the walls) — keep the shapes aligned.
51
- */
52
- export interface GlFrameStats {
53
- /** Whole-pass main-thread ms (reconcile + island paints + composite). */
54
- readonly cpuMs: number;
55
- /** GPU ms summed across the pass's render calls (0 until queries resolve / unsupported). */
56
- readonly gpuMs: number;
57
- /** stats-gl smoothed fps (0 until the profiler is live). */
58
- readonly fps: number;
59
- /** `renderer.info` aggregated across ALL of this pass's render calls. */
60
- readonly drawCalls: number;
61
- readonly triangles: number;
62
- readonly points: number;
63
- readonly lines: number;
64
- /** Live compiled shader programs (renderer-lifetime, not per-frame). */
65
- readonly programs: number;
66
- readonly geometries: number;
67
- readonly textures: number;
68
- /** Virtual texturing: live island render targets + their summed resolution. */
69
- readonly renderTargets: number;
70
- readonly renderMegaPixels: number;
71
- readonly fboBytes: number;
72
- readonly fboBudgetBytes: number;
73
- /** Island phase census (the demand/retention state machine, design-004 §3/§7). */
74
- readonly islands: {
75
- readonly total: number;
76
- readonly hot: number;
77
- readonly warm: number;
78
- readonly waking: number;
79
- readonly cold: number;
80
- readonly dormant: number;
81
- };
82
- /** Live targets per painted zoom band ("×1", "×0.5", …) — the LOD downgrade census. */
83
- readonly bandHistogram: Readonly<Record<string, number>>;
84
- /** This pass's shape (PassStats). */
85
- readonly repainted: number;
86
- readonly pendingPaints: number;
87
- readonly evicted: number;
88
- /** LOD context: camera zoom → hysteresis band → the DPR new paints get. */
89
- readonly zoom: number;
90
- readonly band: number;
91
- readonly effectiveDpr: number;
92
- /** Scene population: Visible vs Culled widgets (all surfaces). */
93
- readonly visibleWidgets: number;
94
- readonly culledWidgets: number;
95
- }
96
- export declare function GLViews({ engine, bridge, store, maxFboBytes, maxRepaintsPerFrame, maxAnimationFps, maxPaintDpr, environment, onFrameStats, }: GLViewsProps): ReactElement;
@@ -1,70 +0,0 @@
1
- /**
2
- * The pointer router's GL path (design-004 §4, rev 2 corrected).
3
- *
4
- * At EVENT time (outside the tick — world reads are verified-unrestricted)
5
- * the router runs its own synchronous point-pick against THE spatial index
6
- * via core's `pickTopAt` — the identical narrow-phase the in-tick `picking`
7
- * system runs, so the two can never disagree. It does NOT consult last-frame
8
- * `Targets`: that relation is absent for a touch's first event (the pointer
9
- * entity doesn't exist yet at down) and stale for fast mouse crossings —
10
- * rev 1 of the design ate the first tap on every interactive GL widget.
11
- * `Targets` remains the in-tick authority; this pick is a routing decision,
12
- * not a second truth.
13
- *
14
- * Hit a GL-view widget → island-local convert (kernel, THE Y-flip) → raycast
15
- * the island's scene through its ortho camera → dispatch synthetic events to
16
- * the intersected objects' R3F handlers. A handler calling
17
- * `stopPropagation()` claims the event: the adapter flags the fact
18
- * `surfaceHandled` and recognizers skip it (`HandledByWidget`, the M4 spine).
19
- *
20
- * Capture semantics (per island): a claimed down captures the pointer — its
21
- * moves/ups go to that island until up/cancel, mirroring how DOM widget
22
- * content holds `setPointerCapture` for sustained interactions. Hover
23
- * enter/leave are synthesized from pick transitions on buttonless moves.
24
- *
25
- * R3F-INTERNAL-ADJACENT (the one acknowledged spot, implementation-plan
26
- * risks): handlers are read from `object.__r3f.handlers` — the instance
27
- * state R3F v9 attaches to every declaratively-created three object. No
28
- * other R3F internal is touched; the dispatcher owns its own event shape.
29
- * Mid-event ordering note (design-004 §4): handlers may run engine ops —
30
- * legal; such mutations land immediately while the same event's position
31
- * facts land next tick via the queue.
32
- */
33
- import { type Intersection, type Object3D } from "three";
34
- import type { SpatialIndex } from "../../kernel/src/index";
35
- import { type Entity, type World } from "../../core/src/index";
36
- import type { GLBridge } from "./bridge";
37
- /** The synthetic event island handlers receive (R3F-handler-compatible core). */
38
- export interface IslandPointerEvent {
39
- readonly type: string;
40
- readonly nativeEvent: PointerEvent;
41
- /** Island-local intersection point (three world = island space). */
42
- readonly point: Intersection["point"] | undefined;
43
- readonly distance: number;
44
- readonly object: Object3D;
45
- readonly eventObject: Object3D;
46
- readonly intersections: readonly Intersection[];
47
- readonly entity: Entity;
48
- stopPropagation(): void;
49
- readonly stopped: boolean;
50
- }
51
- export interface GLPointerRouterDeps {
52
- readonly world: World;
53
- readonly bridge: GLBridge;
54
- readonly index: SpatialIndex<Entity>;
55
- }
56
- export interface GLPointerRouter {
57
- /** The adapter's `glRoute` seam. True = island content claimed the event. */
58
- route(kind: "down" | "move" | "up" | "cancel", screenX: number, screenY: number, native: PointerEvent): boolean;
59
- /**
60
- * Hover-time verdict as of the LAST routed `move` (design-002 §8 amendment,
61
- * 2026-07-18): the pick chain under the pointer holds claim-capable island
62
- * content — a mesh whose handlers include `onPointerDown`/`onClick` (the
63
- * claim/click paths; hover-only handlers like the shapes swarm's move reader
64
- * do NOT count — they never opt a down out). True for the whole life of an
65
- * island capture. Feed it into the adapter's `GLRouteVerdict.overInteractive`
66
- * on moves; presentation truth only, never a routing input.
67
- */
68
- overInteractive(): boolean;
69
- }
70
- export declare function createGLPointerRouter({ world, bridge, index }: GLPointerRouterDeps): GLPointerRouter;
@@ -1,17 +0,0 @@
1
- /**
2
- * @ice/r3f — R3F islands + the virtual-texture compositor (design-004 §3–4).
3
- * The ONLY package that touches three/@react-three (as peers). Top of the
4
- * chain: r3f → react → dom → core → kernel.
5
- */
6
- export { createGLBridge, type GLBridge, type GLBridgeOpts, type IslandHandle, type IslandFrameCallback } from "./bridge";
7
- export { createIslandStateStore, type IslandRenderState, type IslandStateStore, type PaintedAt } from "./island-state";
8
- export { runCompositorPass, type CompCameraLike, type GlLike, type IslandCameraLike, type PassContext, type PassStats, type PoolLike, type QuadLike, type QuadsLike, type TargetLike, } from "./compositor-pass";
9
- export { GLViews, type GLViewsProps, type GlFrameStats } from "./gl-root";
10
- export { Island, type IslandProps } from "./island";
11
- export { IslandContext, useIslandContext, useIslandFrame, useIslandInvalidate, useIslandLift, useIslandOpacity, type IslandContextValue, } from "./use-island-frame";
12
- export { RenderTargetPool, type PoolEntryInfo } from "./pool";
13
- export { ResourceRegistry } from "./resource-registry";
14
- export { CompositeMaterial } from "./composite-material";
15
- export { createRenderWriteTrap, type RenderWriteTrap } from "./dev-write-trap";
16
- export { createGLPointerRouter, type GLPointerRouter, type GLPointerRouterDeps, type IslandPointerEvent, } from "./gl-router";
17
- export { captureWidgetPreviews, type CapturePreviewOpts } from "./preview-capture";
@@ -1,112 +0,0 @@
1
- /**
2
- * Module-side island render state (design-004 §3 fix #3: ZERO render→ECS
3
- * writes — v1 kept this as an ECS component `R3FRenderState` and wrote it
4
- * from inside `useFrame`, which the engine laws ban; band/generation/paint
5
- * bookkeeping now lives here, outside the world entirely).
6
- *
7
- * One entry per GL widget the compositor has ever touched this session.
8
- * Entries OUTLIVE island unmount (cull) — that is the retention decoupling:
9
- * a culled widget's entry keeps its `fboGeneration`/`paintedAt` so re-entry
10
- * composites from the retained texture (phase Warm) instead of re-waking.
11
- * Entries die only on entity death, world reset, or `drop()`.
12
- *
13
- * Pure state + counters; no three.js, no ECS, no timing — the GLViews frame
14
- * pass reads/writes it synchronously.
15
- */
16
- import type { IslandPhase } from "../../kernel/src/index";
17
- /** Resolution + band an island's FBO was last painted at (v1 `paintedAt`). */
18
- export interface PaintedAt {
19
- readonly w: number;
20
- readonly h: number;
21
- readonly dpr: number;
22
- /** The zoom BAND painted at (not live zoom) — hysteresis compares against it. */
23
- readonly band: number;
24
- }
25
- export interface IslandRenderState {
26
- phase: IslandPhase;
27
- /** Bumped by dirt (props Tier-3, size dirt, manual invalidate). */
28
- paintGeneration: number;
29
- /** Generation last painted into the FBO; -1 = no valid texture (fresh or evicted). */
30
- fboGeneration: number;
31
- paintedAt: PaintedAt;
32
- /** Live `useIslandFrame` subscriptions (animation signal while > 0). */
33
- animRefs: number;
34
- /** The widget type declared `animated` (repaint every visible frame). */
35
- animatedDecl: boolean;
36
- /**
37
- * Monotonic stamp of the last repaint — the stagger's FAIRNESS key. Without
38
- * it, more Hot islands than maxRepaintsPerFrame starves the same island
39
- * every pass (5 Hot vs cap 4 froze the shapes card, 2026-07-12).
40
- */
41
- lastPaintSeq: number;
42
- /**
43
- * Animation time OWED to this island's `useIslandFrame` callbacks: every
44
- * pass a Hot island is paint-eligible adds the pass dtMs; the paint that
45
- * finally runs delivers the whole balance and zeroes it. Without this, a
46
- * stagger-deferred island simply LOST the deferred passes' time — 5 Hot vs
47
- * cap 4 ran every animation at 4/5 speed (2026-07-20 rate probe), violating
48
- * design-004's "the cap changes cadence, never speed". Freeze semantics are
49
- * preserved: frozen islands are not paint-eligible, so a stage hold still
50
- * PAUSES animation rather than banking it.
51
- */
52
- pendingDtMs: number;
53
- /**
54
- * Composite-quad scale (lift-on-hold): scales the CARD on the canvas —
55
- * texture, rounded alpha corners and all — instead of the scene content
56
- * (which the card-sized frustum would crop into hard corners, 2026-07-12
57
- * field report). ≠1 also pops render order over neighbors.
58
- *
59
- * This is the DRAWN value: the compositor pass eases it toward
60
- * `liftTarget` (dtMs-driven spring). GL widgets have no CSS transitions, so
61
- * the DOM-lift parity (2026-07-13 field report: "GL lift snaps") lives in
62
- * the pass, not in userland.
63
- */
64
- compositeScale: number;
65
- /** Where the lift is headed; `setCompositeScale` retargets from the drawn value. */
66
- liftTarget: number;
67
- /** Drawn value at (re)target time — the ease runs liftFrom → liftTarget. */
68
- liftFrom: number;
69
- /** Accumulated pass dtMs since the last retarget; ≥ liftMs ⇒ settled. */
70
- liftElapsedMs: number;
71
- /** Transition duration in ms; 0 = snap (the pre-ease behavior). */
72
- liftMs: number;
73
- /**
74
- * Composite-quad opacity channel (the lift's fade twin): the DRAWN value the
75
- * pass eases toward `opacityTarget` and MULTIPLIES with the widget's durable
76
- * `Opacity` cell — presentation-transient (chrome-grade, e.g. the drag-lift
77
- * fade) stacked over the doc-level fact, never written to ECS.
78
- */
79
- compositeOpacity: number;
80
- /** Where the fade is headed; `setCompositeOpacity` retargets from the drawn value. */
81
- opacityTarget: number;
82
- /** Drawn value at (re)target time — the ease runs opacityFrom → opacityTarget. */
83
- opacityFrom: number;
84
- /** Accumulated pass dtMs since the last retarget; ≥ opacityMs ⇒ settled. */
85
- opacityElapsedMs: number;
86
- /** Transition duration in ms; 0 = snap. */
87
- opacityMs: number;
88
- }
89
- /**
90
- * Default lift transition — the GL twin of the DOM card-lift idiom (180ms
91
- * springy pop; the curve itself lives in the compositor pass).
92
- */
93
- export declare const LIFT_DEFAULT_MS = 180;
94
- export interface IslandStateStore {
95
- /** Get-or-create (Cold, unpainted). */
96
- ensure(key: number): IslandRenderState;
97
- get(key: number): IslandRenderState | undefined;
98
- all(): IterableIterator<[number, IslandRenderState]>;
99
- /** Island dirt: the next frame pass must repaint this island. */
100
- bumpPaint(key: number): void;
101
- markPainted(key: number, at: PaintedAt): void;
102
- /** FBO released (eviction/death): the quad hides until first repaint. */
103
- markEvicted(key: number): void;
104
- addAnimRef(key: number): void;
105
- removeAnimRef(key: number): void;
106
- /** Animation signal: declared `animated` OR any live `useIslandFrame`. */
107
- isAnimating(key: number): boolean;
108
- setAnimatedDecl(key: number, animated: boolean): void;
109
- drop(key: number): void;
110
- clear(): void;
111
- }
112
- export declare function createIslandStateStore(): IslandStateStore;
@@ -1,13 +0,0 @@
1
- import { type ReactElement } from "react";
2
- import { type Texture } from "three";
3
- import type { Entity, WidgetType, World } from "../../core/src/index";
4
- import type { GLBridge } from "./bridge";
5
- export interface IslandProps {
6
- readonly bridge: GLBridge;
7
- readonly world: World;
8
- readonly entity: Entity;
9
- readonly widget: WidgetType;
10
- /** Shared IBL for this island's private scene (see GLViews.environment). */
11
- readonly environment?: Texture | null;
12
- }
13
- export declare function Island({ bridge, world, entity, widget, environment }: IslandProps): ReactElement | null;
@@ -1,56 +0,0 @@
1
- import { WebGLRenderTarget } from "three";
2
- /** Snapshot row returned by {@link RenderTargetPool.entryInfos}. */
3
- export interface PoolEntryInfo {
4
- key: number;
5
- bytes: number;
6
- lastUsedMs: number;
7
- }
8
- export declare class RenderTargetPool {
9
- private entries;
10
- private totalBytes;
11
- private disposed;
12
- private readonly now;
13
- /**
14
- * @param now Injected monotonic clock for LRU timestamps. Defaults to
15
- * `performance.now()`; tests pass a deterministic stub so `lastUsedMs`
16
- * assertions do not depend on wall-clock timing.
17
- */
18
- constructor(now?: () => number);
19
- /**
20
- * Get or create an FBO for `key` at the requested world size and effective
21
- * device-pixel-ratio. Returns the existing target unchanged when its pixel
22
- * dimensions already match; otherwise disposes the stale target and allocates
23
- * a new one sized to the new resolution.
24
- */
25
- acquire(key: number, worldW: number, worldH: number, effectiveDpr: number): WebGLRenderTarget;
26
- /** Look up an FBO without creating one. */
27
- get(key: number): WebGLRenderTarget | null;
28
- /**
29
- * Refresh `lastUsedMs` without re-acquiring. The compositor calls this for
30
- * every island it samples in the composition pass — without it, warm islands
31
- * that never repaint would freeze their timestamp at their last paint and the
32
- * LRU would treat still-visible islands as stale (design-004 §3).
33
- */
34
- touch(key: number): void;
35
- /**
36
- * Release `key`'s FBO. Returns true if something was released. Safe after
37
- * dispose — returns false rather than corrupting the byte counter or
38
- * double-disposing the target.
39
- */
40
- release(key: number): boolean;
41
- /** Total GPU bytes consumed by the pool. */
42
- bytesUsed(): number;
43
- /** Number of FBOs currently held. */
44
- size(): number;
45
- /** True after `dispose()` — callers should re-create the pool instead of using it. */
46
- isDisposed(): boolean;
47
- /** Iterate live entries (key + target). */
48
- forEach(cb: (key: number, rt: WebGLRenderTarget) => void): void;
49
- /**
50
- * Snapshot of every live entry's `bytes` + `lastUsedMs` — the input an
51
- * eviction pass ranks by LRU.
52
- */
53
- entryInfos(): PoolEntryInfo[];
54
- /** Dispose every FBO. After this, acquire throws and release returns false. */
55
- dispose(): void;
56
- }
@@ -1,19 +0,0 @@
1
- import type { Texture, WebGLRenderer } from "three";
2
- export interface CapturePreviewOpts {
3
- /** Types to capture (default: every registered gl-surface widget). */
4
- readonly types?: readonly string[];
5
- /**
6
- * Shared IBL. Prefer the FACTORY form: PMREM textures live on the GPU of
7
- * the renderer that generated them (no CPU image), so the app's main-canvas
8
- * env is EMPTY on the capture renderer (field bug 2026-07-19 — black
9
- * metals). The factory receives the capture renderer and builds the env
10
- * there (e.g. `(gl) => new PMREMGenerator(gl).fromScene(new RoomEnvironment(), 0.04).texture`).
11
- * A plain Texture is accepted for same-renderer/CPU-backed cases.
12
- */
13
- readonly environment?: Texture | ((gl: WebGLRenderer) => Texture | null) | null;
14
- /** Pixel density of the capture (default: fit 512px on the long side, ≤2). */
15
- readonly scale?: number;
16
- /** Frames advanced before the capture (animations reach a live pose). */
17
- readonly settleFrames?: number;
18
- }
19
- export declare function captureWidgetPreviews(opts?: CapturePreviewOpts): Promise<string[]>;
@@ -1,30 +0,0 @@
1
- import type { BufferGeometry, Material, Texture } from "three";
2
- export declare class ResourceRegistry {
3
- private geometries;
4
- private materials;
5
- private textures;
6
- private disposed;
7
- acquireGeometry<T extends BufferGeometry>(key: string, factory: () => T): T;
8
- releaseGeometry(key: string): void;
9
- acquireMaterial<T extends Material>(key: string, factory: () => T): T;
10
- releaseMaterial(key: string): void;
11
- acquireTexture<T extends Texture>(key: string, factory: () => T): T;
12
- releaseTexture(key: string): void;
13
- /** Number of distinct shared geometries currently held. */
14
- geometryCount(): number;
15
- /** Number of distinct shared materials currently held. */
16
- materialCount(): number;
17
- /** Number of distinct shared textures currently held. */
18
- textureCount(): number;
19
- /**
20
- * Estimated GPU bytes for shared geometry attribute buffers. Best-effort —
21
- * actual footprint depends on driver alignment, but a useful relative metric
22
- * for the profiler.
23
- */
24
- geometryBytes(): number;
25
- /** Dispose every resource and clear the registry. */
26
- dispose(): void;
27
- /** True after `dispose()` — callers should re-create the registry instead of using it. */
28
- isDisposed(): boolean;
29
- private releaseFrom;
30
- }
@@ -1,39 +0,0 @@
1
- /**
2
- * Self-sustain scheduling for the demand loop (design-004 §3 animation-rate
3
- * amendment, 2026-07-14).
4
- *
5
- * When the ONLY reason to run another frame is ambient animation (Hot islands
6
- * or a stagger backlog), the loop no longer re-invalidates at native refresh:
7
- * on a 120 Hz panel that was 5 always-Hot islands × 120 paints/sec ≈ 96 % GPU
8
- * duty at idle — the fan. Instead the next pass is scheduled `1000/maxFps` ms
9
- * after the last pass STARTED, so ambient animation runs at ~`maxFps` and the
10
- * GPU idles between frames.
11
- *
12
- * What stays at native refresh:
13
- * - lift eases (`liftAnimating`) — 180 ms of interaction feedback;
14
- * - every EXTERNALLY invalidated frame (camera, drag, props dirt): the
15
- * bridge's `requestFrame` path is untouched, so interaction still runs at
16
- * display rate and Hot islands ride along uncapped while it lasts.
17
- *
18
- * The cap is approximate: the wake-up is a timeout and the actual frame lands
19
- * on the next vsync after it. {@link RATE_CAP_SLACK_MS} pulls the timeout half
20
- * a 120 Hz vsync early so the following vsync is the intended one, not one
21
- * past it (naive `interval` scheduling on a 120 Hz grid yields 40 fps, not 60).
22
- */
23
- /** Timeout lead so the post-timeout vsync lands on the target boundary. */
24
- export declare const RATE_CAP_SLACK_MS = 4;
25
- export interface SelfSustainStats {
26
- readonly anyHot: boolean;
27
- readonly pendingPaints: number;
28
- readonly liftAnimating: boolean;
29
- }
30
- /**
31
- * Decide how the demand loop continues after a pass.
32
- *
33
- * @param stats The pass's self-sustain signals.
34
- * @param elapsedMs ms since the pass started (schedule anchor).
35
- * @param maxFps Animation rate cap; `Infinity` restores uncapped.
36
- * @returns `"none"` (park), `"now"` (invalidate immediately), or the timeout
37
- * delay in ms before invalidating.
38
- */
39
- export declare function selfSustainPlan(stats: SelfSustainStats, elapsedMs: number, maxFps: number): "none" | "now" | number;
@@ -1,39 +0,0 @@
1
- import type { Entity } from "../../core/src/index";
2
- import type { GLBridge, IslandFrameCallback } from "./bridge";
3
- export interface IslandContextValue {
4
- readonly bridge: GLBridge;
5
- readonly entity: Entity;
6
- }
7
- /** Provided per-island by `<Island>`; null outside island content. */
8
- export declare const IslandContext: import("react").Context<IslandContextValue | null>;
9
- export declare function useIslandContext(): IslandContextValue;
10
- /** Per-frame tick while mounted (island goes Hot). `cb(dtMs)` on paint. */
11
- export declare function useIslandFrame(cb: IslandFrameCallback): void;
12
- /**
13
- * One-shot repaint scheduler for content that changes outside React's render
14
- * cycle (imperative subscriptions, sockets). Bumps the island's paint
15
- * generation + wakes the demand loop.
16
- */
17
- export declare function useIslandInvalidate(): () => void;
18
- /**
19
- * Composite-quad lift: scales the CARD on the canvas (texture + rounded alpha
20
- * corners together) and pops it over neighbors while ≠1. Scaling scene content
21
- * instead crops the corners at the card-sized frustum — the 2026-07-12
22
- * hard-corner field report. Resets to 1 on unmount.
23
- *
24
- * The scale EASES to each new value (default 180ms, the DOM card-lift
25
- * spring — GL has no CSS transitions, so the compositor runs the curve;
26
- * 2026-07-13 field report: "GL lift snaps while DOM lifts smooth").
27
- * `durationMs: 0` snaps.
28
- */
29
- export declare function useIslandLift(scale: number, durationMs?: number): void;
30
- /**
31
- * Composite-quad fade — the lift's opacity twin (e.g. the drag-lift 75 %
32
- * fade): eases the quad's drawn opacity to `opacity` (default 180ms; 0
33
- * snaps) and MULTIPLIES the widget's durable `Opacity` cell, so a transient
34
- * fade stacks over a doc-level opacity instead of fighting it. The DOM
35
- * chrome runs its own CSS `opacity … ease` transition — same duration/curve
36
- * family, so card body and GL content fade in lockstep. Resets to 1 on
37
- * unmount.
38
- */
39
- export declare function useIslandOpacity(opacity: number, durationMs?: number): void;
@@ -1,140 +0,0 @@
1
- /**
2
- * `<InfiniteCanvas>` — the one-line canvas mount (design-005 §5): planes +
3
- * adapters + reflectors + portal root, wired in node-board's PROVEN boot order
4
- * (apps/nodeboard/src/app.tsx). The app supplies a constructed {@link
5
- * CanvasEngine} (via `createCanvasEngine`); this component owns only the DOM
6
- * host, the reflector registrations, the pointer/keymap adapters, the rAF loop,
7
- * and the viewport sync — everything that must live next to a real container.
8
- *
9
- * Boot order (registration order = reflector flush order, mirrored exactly):
10
- * host → planes → reflectors[ planeTransform · ground(P0, app-injected) ·
11
- * domWidgets(P1/P3) · chrome(P4) · cursor · remoteCursors(P5) ] →
12
- * pointer adapter → measurement (optional) → keymap → rAF loop → viewport RO.
13
- *
14
- * The dom-widgets reflector is BOTH a reflector and the host lookup WidgetRoot
15
- * portals into; it is created before mount and stored in state so WidgetRoot
16
- * renders once the hosts exist.
17
- *
18
- * Lifecycle: this component does NOT own the engine — it never calls
19
- * `engine.dispose()` (the engine outlives the mount; the app owns it). Unmount
20
- * detaches every adapter, unregisters every reflector, stops the loop, and
21
- * disposes the host.
22
- *
23
- * Not handled here (by design):
24
- * - GL / R3F: the `@ice/r3f` wall forbids `@ice/react` importing three, so a
25
- * GL layer (GLViews) mounts APP-SIDE. Use {@link onReady} to receive the host
26
- * + planes and mount it yourself (like apps/glboard).
27
- * - The GROUND layer (P0: dot grid, wires, snap guides — @ice/ground, three's
28
- * WebGPURenderer) rides the same wall: pass its factory through the OPAQUE
29
- * {@link InfiniteCanvasProps.ground} prop (`ground={ground({...})}`); this
30
- * component types it structurally and never imports the package. No factory
31
- * ⇒ no ground layer (headless/test boots).
32
- * - Devtools: the import wall forbids `@ice/react` importing `@ice/devtools`.
33
- * Wire the panel app-side against `engine.engine` (also via {@link onReady}).
34
- * - Measurement: auto-sized widgets need a `MeasureQueue` passed to BOTH
35
- * `createCanvasEngine({ measureQueue })` (ingest side) and this component's
36
- * `measureQueue` prop (ResizeObserver side). Absent ⇒ measurement is skipped.
37
- */
38
- import { type CanvasEngine, type Entity, type GridConfig, type MeasureQueue, type ReflectorDef, type WirePreviewBuffer, type World } from "../../core/src/index";
39
- import { type CanvasHost, type GLRoute, type Planes, type WidgetFocusHandle } from "../../dom/src/index";
40
- import { type CSSProperties, type ReactElement, type ReactNode } from "react";
41
- import { type KeymapEntry } from "./keymap";
42
- /** Handed to {@link InfiniteCanvasProps.onReady} for app-side GL/devtools wiring. */
43
- export interface InfiniteCanvasHandle {
44
- readonly engine: CanvasEngine;
45
- readonly host: CanvasHost;
46
- readonly planes: Planes;
47
- /**
48
- * Programmatic widget focus (design-007 §2.3): `focusWidget(entity)` /
49
- * `blurFocus()` for `keyboard: "exclusive"` widgets. Focus is VIEW state
50
- * (design-007 §2.6) — it rides this handle, not `engine.ops` (a headless
51
- * engine correctly has no focus concept).
52
- */
53
- readonly focus: WidgetFocusHandle;
54
- }
55
- /**
56
- * STRUCTURAL mirror of `@ice/ground`'s GroundLayer/GroundFactory (the
57
- * `WidgetDef.component`-style opaque seam: react never imports the package —
58
- * the wall forbids three here). `@ice/ground.ground(...)` returns a function
59
- * assignable to this type.
60
- */
61
- export interface GroundLayerHandle {
62
- readonly reflector: ReflectorDef & {
63
- available(): boolean;
64
- };
65
- configureGrid(cfg: Partial<GridConfig>): void;
66
- dispose(): void;
67
- }
68
- export type GroundLayerFactory = (ctx: {
69
- readonly host: {
70
- readonly container: HTMLElement;
71
- readonly contentPlane: HTMLElement;
72
- };
73
- readonly world: World;
74
- readonly readWirePreview: () => WirePreviewBuffer;
75
- /**
76
- * Broad-phase rect query over the interaction stack's spatial index (the
77
- * magnet grid's widget sources, design-010 §3.2). Structural mirror of
78
- * `@ice/ground`'s ReadSpatial — kernel AABB/SpatialEntry shapes inlined.
79
- */
80
- readonly readSpatial: (bounds: {
81
- readonly minX: number;
82
- readonly minY: number;
83
- readonly maxX: number;
84
- readonly maxY: number;
85
- }) => ReadonlyArray<{
86
- minX: number;
87
- minY: number;
88
- maxX: number;
89
- maxY: number;
90
- id: Entity;
91
- }>;
92
- }) => GroundLayerHandle;
93
- export interface InfiniteCanvasProps {
94
- /** A constructed engine (`createCanvasEngine(...)`); NOT disposed on unmount. */
95
- readonly engine: CanvasEngine;
96
- /**
97
- * The ResizeObserver side of widget measurement. Pass the SAME queue given to
98
- * `createCanvasEngine({ measureQueue })`. Absent ⇒ measurement skipped.
99
- */
100
- readonly measureQueue?: MeasureQueue;
101
- /** Called once after the host/reflectors/loop are live (app-side GL/devtools). */
102
- readonly onReady?: (handle: InfiniteCanvasHandle) => void;
103
- /**
104
- * The P0 ground layer (dot grid, wires, snap guides — one WebGPU canvas).
105
- * Pass `ground(opts)` from `@ice/ground`; received opaquely (see
106
- * {@link GroundLayerFactory}). Memoize in the caller — a new identity
107
- * re-boots the canvas mount effect. Absent ⇒ no ground layer renders.
108
- */
109
- readonly ground?: GroundLayerFactory;
110
- /**
111
- * Dot-grid tuning (theme dot color, spacing, fades). Applied live via the
112
- * ground layer's `configureGrid` — changing it never re-boots the canvas
113
- * (memoize in the caller to avoid redundant same-value redraws). No-op
114
- * when {@link ground} is absent.
115
- */
116
- readonly grid?: Partial<GridConfig>;
117
- /**
118
- * GL pointer routing (event-time island pick — @ice/r3f's
119
- * createGLPointerRouter). Provide from the FIRST render (a stub delegating
120
- * to a ref is fine — the real router usually arrives in onReady); the prop
121
- * is read through a ref, so later identity changes take effect without
122
- * re-attaching the adapter.
123
- */
124
- readonly glRoute?: GLRoute;
125
- /**
126
- * Keymap overrides plumbed to {@link attachKeymap} (design-007 §5 M-d — the
127
- * declared alternative to capture-phase `stopPropagation` folklore; retires
128
- * the widgetlab C-key hack). An entry replaces a default by its
129
- * `key|mod|shift` signature; conditional behavior belongs INSIDE `run`
130
- * (read engine state there — e.g. selection → comment, else the default's
131
- * action). BOUND ONCE at mount, like the adapter: entries should read live
132
- * state from the engine at run time, never close over render-time values.
133
- */
134
- readonly keymapOverrides?: readonly KeymapEntry[];
135
- readonly className?: string;
136
- readonly style?: CSSProperties;
137
- /** Overlays inside the viewport (toolbars, HUD) — rendered under the EngineProvider. */
138
- readonly children?: ReactNode;
139
- }
140
- export declare function InfiniteCanvas({ engine, measureQueue, onReady, ground, grid: gridConfig, glRoute, keymapOverrides, className, style, children, }: InfiniteCanvasProps): ReactElement;
@@ -1,17 +0,0 @@
1
- /**
2
- * The GL preview snapshot store (design-005 §2 preview contract, P2 —
3
- * 2026-07-19). react stays three-free by LAW, so the capture pipeline lives
4
- * in @ice/r3f and meets `<WidgetPreview>` HERE, at a dumb data seam: a
5
- * module-level map of widget type → captured image, with subscription so an
6
- * open palette re-renders the moment a capture lands.
7
- *
8
- * `PreviewImage` accepts a canvas alongside ImageBitmap so tests (and any
9
- * app-side prebuilt-cache policy — the P3 seam) can inject without a GPU.
10
- */
11
- export type PreviewImage = ImageBitmap | HTMLCanvasElement;
12
- export declare function setPreviewSnapshot(type: string, image: PreviewImage): void;
13
- export declare function getPreviewSnapshot(type: string): PreviewImage | undefined;
14
- export declare function hasPreviewSnapshot(type: string): boolean;
15
- export declare function subscribePreviewSnapshots(listener: () => void): () => void;
16
- /** TEST-ONLY wipe (not on the barrel). */
17
- export declare function __resetPreviewSnapshotsForTests(): void;