@vibecook/ice 0.1.0 → 0.2.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.
- package/README.md +37 -2
- package/dist/chunk-5SJYHQI4.js +636 -0
- package/dist/chunk-5SJYHQI4.js.map +1 -0
- package/dist/{chunk-5S7GSXJG.js → chunk-DXU3RZZS.js} +2913 -1180
- package/dist/chunk-DXU3RZZS.js.map +1 -0
- package/dist/{chunk-FIAXPNNY.js → chunk-IASTQMU5.js} +130 -551
- package/dist/chunk-IASTQMU5.js.map +1 -0
- package/dist/{chunk-BCJ47SX7.js → chunk-OR5FNVUE.js} +460 -1
- package/dist/chunk-OR5FNVUE.js.map +1 -0
- package/dist/devtools.js +508 -372
- package/dist/devtools.js.map +1 -1
- package/dist/dom.js +3 -11
- package/dist/ground.js +715 -0
- package/dist/ground.js.map +1 -0
- package/dist/index.js +70 -2
- package/dist/kernel.js +31 -1
- package/dist/r3f.js +599 -62
- package/dist/r3f.js.map +1 -1
- package/dist/react.js +34 -418
- package/dist/react.js.map +1 -1
- package/dist/types/packages/core/src/catalog/camera-derived.d.ts +41 -3
- package/dist/types/packages/core/src/catalog/gesture.d.ts +39 -3
- package/dist/types/packages/core/src/catalog/graph.d.ts +7 -6
- package/dist/types/packages/core/src/catalog/index.d.ts +1 -0
- package/dist/types/packages/core/src/catalog/insert.d.ts +31 -0
- package/dist/types/packages/core/src/catalog/pointer.d.ts +11 -0
- package/dist/types/packages/core/src/catalog/scene.d.ts +37 -4
- package/dist/types/packages/core/src/catalog/selection-presence.d.ts +7 -0
- package/dist/types/packages/core/src/catalog/settings-resources.d.ts +21 -0
- package/dist/types/packages/core/src/doc/autosave.d.ts +15 -2
- package/dist/types/packages/core/src/doc/bootstrap.d.ts +29 -0
- package/dist/types/packages/core/src/doc/channels.d.ts +9 -0
- package/dist/types/packages/core/src/doc/doc-commit-sink.d.ts +2 -1
- package/dist/types/packages/core/src/doc/doc-kit.d.ts +16 -1
- package/dist/types/packages/core/src/doc/envelope.d.ts +2 -1
- package/dist/types/packages/core/src/doc/migrate.d.ts +8 -6
- package/dist/types/packages/core/src/doc/schema-migrate.d.ts +50 -0
- package/dist/types/packages/core/src/doc/version-gate.d.ts +3 -0
- package/dist/types/packages/core/src/engine/commit-sink.d.ts +24 -2
- package/dist/types/packages/core/src/engine/frame-info.d.ts +16 -1
- package/dist/types/packages/core/src/facade/create-canvas-engine.d.ts +70 -6
- package/dist/types/packages/core/src/guards/guarded-tx.d.ts +4 -2
- package/dist/types/packages/core/src/helpers/churn-guard.d.ts +40 -0
- package/dist/types/packages/core/src/index.d.ts +13 -7
- package/dist/types/packages/core/src/input/queue.d.ts +11 -0
- package/dist/types/packages/core/src/nav/nested-canvas.d.ts +47 -11
- package/dist/types/packages/core/src/ops/arrange.d.ts +15 -0
- package/dist/types/packages/core/src/ops/insert.d.ts +62 -0
- package/dist/types/packages/core/src/ops/point-pick.d.ts +11 -7
- package/dist/types/packages/core/src/ops/sibling-order.d.ts +70 -0
- package/dist/types/packages/core/src/schema/meta.d.ts +1 -0
- package/dist/types/packages/core/src/settings/defaults.d.ts +45 -0
- package/dist/types/packages/core/src/settings/ground-config.d.ts +55 -0
- package/dist/types/packages/core/src/systems/chrome.d.ts +6 -2
- package/dist/types/packages/core/src/systems/insert-ghost.d.ts +25 -0
- package/dist/types/packages/core/src/systems/l1-pick.d.ts +25 -11
- package/dist/types/packages/core/src/systems/l2-recognize.d.ts +10 -4
- package/dist/types/packages/core/src/systems/l3-behave.d.ts +6 -4
- package/dist/types/packages/core/src/systems/l3-claim.d.ts +7 -3
- package/dist/types/packages/core/src/systems/l3-drop.d.ts +3 -1
- package/dist/types/packages/core/src/systems/l3-resize.d.ts +3 -1
- package/dist/types/packages/core/src/systems/l3-snap.d.ts +25 -7
- package/dist/types/packages/core/src/systems/nav-flight.d.ts +95 -0
- package/dist/types/packages/core/src/widget/define-widget.d.ts +39 -0
- package/dist/types/packages/core/src/widget/mount-store.d.ts +11 -3
- package/dist/types/packages/core/src/widget/set-props.d.ts +16 -0
- package/dist/types/packages/core/src/widget/spawn.d.ts +21 -1
- package/dist/types/packages/devtools/src/attach.d.ts +77 -0
- package/dist/types/packages/devtools/src/dock.d.ts +38 -0
- package/dist/types/packages/devtools/src/gl-panel.d.ts +69 -0
- package/dist/types/packages/devtools/src/index.d.ts +8 -6
- package/dist/types/packages/dom/src/index.d.ts +1 -3
- package/dist/types/packages/dom/src/measure-wiring.d.ts +2 -2
- package/dist/types/packages/dom/src/pointer-adapter.d.ts +21 -1
- package/dist/types/packages/dom/src/reflectors/dom-widgets.d.ts +5 -0
- package/dist/types/packages/ground/src/index.d.ts +52 -0
- package/dist/types/packages/ground/src/layer.d.ts +40 -0
- package/dist/types/packages/ground/src/pass.d.ts +41 -0
- package/dist/types/packages/ground/src/passes/grid.d.ts +21 -0
- package/dist/types/packages/ground/src/passes/guides-collect.d.ts +14 -0
- package/dist/types/packages/ground/src/passes/guides.d.ts +3 -0
- package/dist/types/packages/ground/src/passes/soup-collect.d.ts +35 -0
- package/dist/types/packages/ground/src/passes/soup-mesh.d.ts +8 -0
- package/dist/types/packages/ground/src/passes/wires-collect.d.ts +31 -0
- package/dist/types/packages/ground/src/passes/wires.d.ts +10 -0
- package/dist/types/packages/ground/src/renderer.d.ts +15 -0
- package/dist/types/packages/ice/src/ground.d.ts +1 -0
- package/dist/types/packages/kernel/src/bezier.d.ts +15 -0
- package/dist/types/packages/kernel/src/coords.d.ts +15 -0
- package/dist/types/packages/kernel/src/easing.d.ts +11 -0
- package/dist/types/packages/kernel/src/index.d.ts +3 -0
- package/dist/types/packages/kernel/src/layout.d.ts +118 -0
- package/dist/types/packages/kernel/src/nav-flight.d.ts +93 -0
- package/dist/types/packages/r3f/src/bridge.d.ts +73 -12
- package/dist/types/packages/r3f/src/composite-material.d.ts +9 -0
- package/dist/types/packages/r3f/src/compositor-pass.d.ts +22 -0
- package/dist/types/packages/r3f/src/gl-root.d.ts +76 -1
- package/dist/types/packages/r3f/src/gl-router.d.ts +10 -0
- package/dist/types/packages/r3f/src/index.d.ts +3 -2
- package/dist/types/packages/r3f/src/island-state.d.ts +44 -0
- package/dist/types/packages/r3f/src/preview-capture.d.ts +19 -0
- package/dist/types/packages/r3f/src/self-sustain.d.ts +39 -0
- package/dist/types/packages/r3f/src/use-island-frame.d.ts +16 -1
- package/dist/types/packages/react/src/engine-context.d.ts +8 -0
- package/dist/types/packages/react/src/index.d.ts +4 -2
- package/dist/types/packages/react/src/infinite-canvas.d.ts +40 -6
- package/dist/types/packages/react/src/preview-snapshots.d.ts +17 -0
- package/dist/types/packages/react/src/widget-preview.d.ts +14 -0
- package/package.json +13 -8
- package/dist/chunk-5S7GSXJG.js.map +0 -1
- package/dist/chunk-BCJ47SX7.js.map +0 -1
- package/dist/chunk-FIAXPNNY.js.map +0 -1
- package/dist/types/packages/devtools/src/panel.d.ts +0 -48
- package/dist/types/packages/dom/src/reflectors/grid.d.ts +0 -63
- package/dist/types/packages/dom/src/reflectors/wires.d.ts +0 -88
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../ground/src/layer.ts","../../ground/src/passes/grid.ts","../../ground/src/passes/soup-collect.ts","../../ground/src/passes/guides-collect.ts","../../ground/src/passes/soup-mesh.ts","../../ground/src/passes/guides.ts","../../ground/src/passes/wires-collect.ts","../../ground/src/passes/wires.ts","../../ground/src/renderer.ts","../../ground/src/index.ts"],"sourcesContent":["/**\n * The ground LAYER — one reflector, one canvas, one render (design-004 §1\n * as-built 2026-07-16: P0 consolidated from three stacked canvases into a\n * single WebGPU canvas; grid, wires and snap-guides are now PASSES of this\n * layer, and future ground effects join the same registry).\n *\n * Coordinate model: the layer renders in SCREEN CSS-px space — an ortho\n * camera maps [0..w]×[0..h] (y-down) to clip, and passes build their geometry\n * through the kernel `worldToScreen` seam per collect (the proven 2D-canvas\n * semantics: geometry rebuilds on the same dirt that re-stroked the old\n * canvases; the grid stays a per-pixel screen-space shader). The Y-flip\n * question never arises here — `worldToScreen` IS the one conversion (L13).\n *\n * Reflector contract (design-002 §5): post-notify, output-only, never reads\n * layout in flush (the ResizeObserver owns sizing), never writes ECS.\n * `always: true` with a private dirty union — an idle scene renders zero\n * frames; ANY dirty pass re-renders the whole canvas (one draw, same cost\n * class as a pan frame under the old grid). WebGPU init is async: flushes\n * before ready are deferred (flags stay armed), the first ready flush paints.\n */\nimport { Camera, type ReflectorDef, type World } from \"@ice/core\";\nimport { OrthographicCamera, Scene } from \"three/webgpu\";\nimport type { GroundFrame, GroundPass } from \"./pass\";\nimport type { GroundRendererLike } from \"./renderer\";\n\nexport interface GroundLayerHost {\n readonly container: HTMLElement;\n readonly contentPlane: HTMLElement;\n}\n\nexport interface GroundReflector extends ReflectorDef {\n /** False while init is pending or after a device/context failure. */\n available(): boolean;\n /** Whole-canvas renders so far (the churn instrument — 0 on an idle scene). */\n redraws(): number;\n}\n\nexport interface GroundLayerInternals {\n reflector: GroundReflector;\n /** Wake every pass + render (config changes, external invalidation). */\n invalidateAll(): void;\n dispose(): void;\n}\n\nexport function createLayer(\n host: GroundLayerHost,\n world: World,\n renderer: GroundRendererLike,\n passes: readonly GroundPass[],\n): GroundLayerInternals {\n const doc = host.container.ownerDocument;\n const canvas = renderer.canvas;\n canvas.style.position = \"absolute\";\n canvas.style.left = \"0\";\n canvas.style.top = \"0\";\n canvas.style.width = \"100%\";\n canvas.style.height = \"100%\";\n canvas.style.display = \"block\";\n // P0 is never a DOM hit target (the router owns picking, design-004 §4).\n canvas.style.pointerEvents = \"none\";\n // The whole ground stratum is this ONE canvas, immediately before content.\n host.container.insertBefore(canvas, host.contentPlane);\n\n const scene = new Scene();\n // Screen-px ortho, y-down: (0,0) = top-left, (w,h) = bottom-right.\n const camera = new OrthographicCamera(0, 1, 0, 1, -1000, 1000);\n for (const pass of passes) scene.add(pass.object);\n\n // --- dirt ------------------------------------------------------------------\n const dirty = new Map<GroundPass, boolean>();\n for (const pass of passes) dirty.set(pass, true);\n let anyDirty = true;\n const wakeAll = (): void => {\n for (const pass of passes) dirty.set(pass, true);\n anyDirty = true;\n };\n const unsubs: Array<() => void> = [\n // Camera moves re-map every pass's screen-space geometry (2D-canvas parity).\n world.reactive.observeResource(Camera, wakeAll),\n ];\n for (const pass of passes) {\n unsubs.push(\n ...pass.arm(world, () => {\n dirty.set(pass, true);\n anyDirty = true;\n }),\n );\n }\n renderer.onReady(wakeAll); // the deferred pre-ready flushes are owed one paint\n\n // --- sizing (RO owns layout reads — never the flush) -----------------------\n let cssW = 0;\n let cssH = 0;\n let dpr = 1;\n const applySize = (w: number, h: number): void => {\n dpr = doc.defaultView?.devicePixelRatio ?? 1;\n cssW = w;\n cssH = h;\n renderer.setSize(w, h, dpr);\n camera.left = 0;\n camera.right = Math.max(1, w);\n camera.top = 0;\n camera.bottom = Math.max(1, h);\n camera.updateProjectionMatrix();\n wakeAll();\n };\n const initialRect = host.container.getBoundingClientRect();\n applySize(initialRect.width, initialRect.height);\n let ro: ResizeObserver | null = null;\n try {\n ro = new ResizeObserver((entries) => {\n const entry = entries[0];\n if (entry === undefined) return;\n applySize(entry.contentRect.width, entry.contentRect.height);\n });\n ro.observe(host.container);\n } catch {\n ro = null;\n }\n\n let redraws = 0;\n\n const reflector: GroundReflector = {\n name: \"ground\",\n // Self-gated on the dirty union (wires/chrome precedent) — the every-frame\n // cost is one boolean check.\n always: true,\n flush(w: World) {\n if (!anyDirty || renderer.failed()) return;\n if (!renderer.ready()) return; // init pending — flags stay armed, retry next frame\n const cam = w.getResource(Camera);\n if (cam === undefined) return;\n anyDirty = false;\n const frame: GroundFrame = { width: cssW, height: cssH, dpr, camera: cam };\n for (const pass of passes) {\n if (dirty.get(pass) === true) {\n dirty.set(pass, false);\n pass.collect(w, frame);\n }\n }\n redraws++;\n renderer.render(scene, camera);\n },\n available: () => renderer.ready() && !renderer.failed(),\n redraws: () => redraws,\n };\n\n return {\n reflector,\n invalidateAll: wakeAll,\n dispose() {\n for (const u of unsubs) u();\n unsubs.length = 0;\n ro?.disconnect();\n ro = null;\n for (const pass of passes) pass.dispose();\n renderer.dispose();\n canvas.remove();\n },\n };\n}\n","/**\n * The dot-grid pass — TSL port of the raw-WebGL grid (itself verbatim from v1\n * GridRenderer.ts; the fragment math below is that shader re-expressed as a\n * node graph, level loop unrolled in JS). Screen-space: a fullscreen triangle\n * whose vertex stage passes clip coords through; the fragment reconstructs\n * world position from `screenCoordinate` (top-left device px on BOTH backends\n * — three normalizes, so the old manual y-flip is gone) + camera uniforms.\n *\n * One deliberate re-expression: the GLSL if/else fade ladder became the\n * closed form `clamp(min(rise, fall), 0, 1)` — identical piecewise output\n * (rise 0→1 across fadeIn, plateau 1, fall 1→0 across fadeOut) with no\n * branching. Everything else (fract-distance dots, 0.5-device-px AA,\n * max-composited levels) matches term for term.\n */\nimport { DEFAULT_GRID_CONFIG, type GridConfig } from \"@ice/core\";\nimport {\n clamp,\n float,\n fract,\n length,\n max,\n min,\n mix,\n positionGeometry,\n screenCoordinate,\n smoothstep,\n uniform,\n vec4,\n} from \"three/tsl\";\nimport {\n BufferAttribute,\n BufferGeometry,\n Mesh,\n MeshBasicNodeMaterial,\n Vector2,\n Vector3,\n type Node,\n} from \"three/webgpu\";\nimport type { GroundFrame, GroundPass } from \"../pass\";\n\nconst FULLSCREEN_TRIANGLE = new Float32Array([-1, -1, 0, 3, -1, 0, -1, 3, 0]);\n\nexport interface GridPass extends GroundPass {\n /** Live re-tune (the react `grid` prop seam) — partial merge over current values. */\n configure(cfg: Partial<GridConfig>): void;\n}\n\nexport function createGridPass(initial: Partial<GridConfig> = {}): GridPass {\n let cfg: GridConfig = { ...DEFAULT_GRID_CONFIG, ...initial };\n\n // Camera facts (layer-written each collect).\n const uCamera = uniform(new Vector2(0, 0));\n const uZoom = uniform(1);\n const uDpr = uniform(1);\n // Config (configure-written).\n const uSpacings = uniform(new Vector3(...cfg.spacings));\n const uDotColor = uniform(new Vector3(...cfg.dotColor));\n const uDotAlpha = uniform(cfg.dotAlpha);\n const uFadeIn = uniform(new Vector2(...cfg.fadeIn));\n const uFadeOut = uniform(new Vector2(...cfg.fadeOut));\n const uDotRadius = uniform(new Vector2(...cfg.dotRadius));\n const uLevelWeight = uniform(new Vector2(...cfg.levelWeight));\n\n const effZoom = uZoom.mul(uDpr);\n const worldPos = screenCoordinate.xy.div(effZoom).add(uCamera);\n\n let total: Node<\"float\"> = float(0);\n for (let i = 0; i < 3; i++) {\n const spacing = i === 0 ? uSpacings.x : i === 1 ? uSpacings.y : uSpacings.z;\n const cssSpacing = spacing.mul(uZoom);\n // Fade ladder, closed form (see header).\n const rise = cssSpacing.sub(uFadeIn.x).div(uFadeIn.y.sub(uFadeIn.x));\n const fall = float(1).sub(cssSpacing.sub(uFadeOut.x).div(uFadeOut.y.sub(uFadeOut.x)));\n const opacity = clamp(min(rise, fall), 0, 1);\n // Distance to the nearest grid intersection, in device px.\n const f = fract(worldPos.div(spacing).add(0.5)).sub(0.5);\n const dist = length(f).mul(spacing).mul(effZoom);\n // Radius optionally grows toward sparser levels (min==max ⇒ constant dots).\n const t = clamp(cssSpacing.sub(uFadeIn.x).div(40), 0, 1);\n const radius = mix(uDotRadius.x, uDotRadius.y, t).mul(uDpr);\n // Anti-aliased dot (0.5 device-px smoothstep), max-composited across levels\n // (additive stacking fattens joint intersections — the CAD tell).\n const dot = smoothstep(radius.sub(0.5), radius.add(0.5), dist).oneMinus();\n const weight = uLevelWeight.x.add(float(i).mul(uLevelWeight.y));\n total = max(total, dot.mul(opacity).mul(weight));\n }\n\n const material = new MeshBasicNodeMaterial();\n material.vertexNode = vec4(positionGeometry.xy, 0, 1); // clip-space passthrough\n material.fragmentNode = vec4(uDotColor, clamp(total.mul(uDotAlpha), 0, 1));\n material.transparent = true;\n material.depthTest = false;\n material.depthWrite = false;\n\n const geometry = new BufferGeometry();\n geometry.setAttribute(\"position\", new BufferAttribute(FULLSCREEN_TRIANGLE, 3));\n const mesh = new Mesh(geometry, material);\n mesh.frustumCulled = false;\n mesh.renderOrder = 0;\n\n return {\n name: \"grid\",\n object: mesh,\n arm: () => [], // camera/resize dirt is layer-owned; config re-tunes call invalidate\n collect(_world, frame: GroundFrame) {\n uCamera.value.set(frame.camera.x, frame.camera.y);\n uZoom.value = frame.camera.zoom;\n uDpr.value = frame.dpr;\n },\n configure(next) {\n cfg = { ...cfg, ...next };\n uSpacings.value.set(...cfg.spacings);\n uDotColor.value.set(...cfg.dotColor);\n uDotAlpha.value = cfg.dotAlpha;\n uFadeIn.value.set(...cfg.fadeIn);\n uFadeOut.value.set(...cfg.fadeOut);\n uDotRadius.value.set(...cfg.dotRadius);\n uLevelWeight.value.set(...cfg.levelWeight);\n },\n dispose() {\n geometry.dispose();\n material.dispose();\n },\n };\n}\n","/**\n * Triangle-soup builders — the PURE half of the geometry passes (no three\n * import; unit-tested under happy-dom). Collectors emit screen-px triangles\n * with per-vertex rgba into a growable soup; the three-side `soup-mesh`\n * uploads them. MSAA (renderer antialias) smooths edges, matching the old 2D\n * canvases' stroke AA closely enough at 1–2 px widths.\n */\n\nexport interface TriSoup {\n /** xyz per vertex (z = 0 — the layer renders flat in screen space). */\n positions: Float32Array;\n /** rgba per vertex, 0-1. */\n colors: Float32Array;\n vertexCount: number;\n}\n\nexport type Rgba = readonly [number, number, number, number];\n\nexport class SoupBuilder {\n private pos: number[] = [];\n private col: number[] = [];\n\n private vert(x: number, y: number, c: Rgba): void {\n this.pos.push(x, y, 0);\n this.col.push(c[0], c[1], c[2], c[3]);\n }\n\n /** Axis-aligned rect (two triangles). */\n rect(x: number, y: number, w: number, h: number, c: Rgba): void {\n this.vert(x, y, c);\n this.vert(x + w, y, c);\n this.vert(x + w, y + h, c);\n this.vert(x, y, c);\n this.vert(x + w, y + h, c);\n this.vert(x, y + h, c);\n }\n\n /** Stroke segment (a→b) of `width`, flat caps — a quad across the segment normal. */\n segment(ax: number, ay: number, bx: number, by: number, width: number, c: Rgba): void {\n const dx = bx - ax;\n const dy = by - ay;\n const len = Math.hypot(dx, dy);\n if (len < 1e-6) return;\n const nx = (-dy / len) * (width / 2);\n const ny = (dx / len) * (width / 2);\n this.vert(ax + nx, ay + ny, c);\n this.vert(bx + nx, by + ny, c);\n this.vert(bx - nx, by - ny, c);\n this.vert(ax + nx, ay + ny, c);\n this.vert(bx - nx, by - ny, c);\n this.vert(ax - nx, ay - ny, c);\n }\n\n /** Stroke a polyline (interleaved xy) as per-segment quads (smooth-curve joins). */\n polyline(points: ArrayLike<number>, width: number, c: Rgba): void {\n const n = Math.floor((points.length as number) / 2);\n for (let i = 1; i < n; i++) {\n this.segment(\n points[(i - 1) * 2] as number,\n points[(i - 1) * 2 + 1] as number,\n points[i * 2] as number,\n points[i * 2 + 1] as number,\n width,\n c,\n );\n }\n }\n\n /** Filled disc as a triangle fan (MSAA smooths the rim; 16 segs ≈ round at ≤8 px). */\n disc(cx: number, cy: number, r: number, c: Rgba, segments = 16): void {\n for (let i = 0; i < segments; i++) {\n const a0 = (i / segments) * Math.PI * 2;\n const a1 = ((i + 1) / segments) * Math.PI * 2;\n this.vert(cx, cy, c);\n this.vert(cx + Math.cos(a0) * r, cy + Math.sin(a0) * r, c);\n this.vert(cx + Math.cos(a1) * r, cy + Math.sin(a1) * r, c);\n }\n }\n\n build(): TriSoup {\n return {\n positions: new Float32Array(this.pos),\n colors: new Float32Array(this.col),\n vertexCount: this.pos.length / 3,\n };\n }\n}\n\n/**\n * `rgba(r, g, b, a)` / `rgb(…)` / `#rrggbb` → [r,g,b,a] 0-1 (the WiresConfig\n * colors are CSS strings — v1/2D-canvas heritage). Unknown formats fall back\n * to opaque mid-gray rather than throwing in a reflector path.\n */\nexport function parseCssColor(css: string): Rgba {\n const rgba = /^rgba?\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*(?:,\\s*([\\d.]+)\\s*)?\\)$/.exec(css);\n if (rgba !== null) {\n return [\n Number(rgba[1]) / 255,\n Number(rgba[2]) / 255,\n Number(rgba[3]) / 255,\n rgba[4] === undefined ? 1 : Number(rgba[4]),\n ];\n }\n const hex = /^#([0-9a-f]{6})$/i.exec(css);\n if (hex !== null) {\n const v = Number.parseInt(hex[1] as string, 16);\n return [((v >> 16) & 0xff) / 255, ((v >> 8) & 0xff) / 255, (v & 0xff) / 255, 1];\n }\n return [0.5, 0.5, 0.5, 1];\n}\n","/**\n * Snap-guides collector — the pure ECS→triangles half of the guides pass\n * (v1 SnapGuideRenderer look, carried over from the 2D-canvas reflector it\n * replaces): full-viewport magenta alignment lines (`GuideLine.from == to` ⇒\n * full span — design-003 §6), bounded spans, and equal-spacing bars with 4px\n * end ticks. Screen-px output via the kernel `worldToScreen` seam. NO guide\n * count caps (the pool grows; so does the soup).\n */\nimport {\n DEFAULT_SNAP_GUIDES_CONFIG,\n GuideLine,\n SpacingBar,\n defineQuery,\n type SnapGuidesConfig,\n type World,\n} from \"@ice/core\";\nimport { worldToScreen } from \"@ice/kernel\";\nimport type { GroundFrame } from \"../pass\";\nimport { SoupBuilder, type Rgba, type TriSoup } from \"./soup-collect\";\n\nexport const guideQ = defineQuery([GuideLine]);\nexport const barQ = defineQuery([SpacingBar]);\n\nexport function collectGuides(\n world: World,\n frame: GroundFrame,\n config: SnapGuidesConfig = DEFAULT_SNAP_GUIDES_CONFIG,\n): TriSoup {\n const soup = new SoupBuilder();\n const cam = frame.camera;\n const lw = config.lineWidth;\n const guideColor: Rgba = [config.color[0], config.color[1], config.color[2], config.guideAlpha];\n const barColor: Rgba = [config.color[0], config.color[1], config.color[2], config.spacingAlpha];\n\n world.query(guideQ).each((b) => {\n for (const r of b) {\n const g = world.read(b.entity(r), GuideLine);\n const fullSpan = g.from === g.to;\n if (g.axis === \"x\") {\n const sx = worldToScreen(g.at, 0, cam).x;\n if (frame.width > 0 && (sx < -1 || sx > frame.width + 1)) continue;\n const y0 = fullSpan ? 0 : worldToScreen(0, g.from, cam).y;\n const y1 = fullSpan ? frame.height : worldToScreen(0, g.to, cam).y;\n soup.rect(sx - lw / 2, Math.min(y0, y1), lw, Math.abs(y1 - y0), guideColor);\n } else {\n const sy = worldToScreen(0, g.at, cam).y;\n if (frame.height > 0 && (sy < -1 || sy > frame.height + 1)) continue;\n const x0 = fullSpan ? 0 : worldToScreen(g.from, 0, cam).x;\n const x1 = fullSpan ? frame.width : worldToScreen(g.to, 0, cam).x;\n soup.rect(Math.min(x0, x1), sy - lw / 2, Math.abs(x1 - x0), lw, guideColor);\n }\n }\n });\n\n world.query(barQ).each((b) => {\n for (const r of b) {\n const s = world.read(b.entity(r), SpacingBar);\n const t = config.tickPx;\n if (s.axis === \"x\") {\n // Horizontal gap along x at world-y perp (kernel/v1 axis semantics).\n const a = worldToScreen(s.from, s.perp, cam);\n const bp = worldToScreen(s.to, s.perp, cam);\n if (frame.width > 0 && (Math.max(a.x, bp.x) < 0 || Math.min(a.x, bp.x) > frame.width)) continue;\n soup.rect(Math.min(a.x, bp.x), a.y - lw / 2, Math.abs(bp.x - a.x), lw, barColor);\n soup.rect(a.x - lw / 2, a.y - t, lw, t * 2, barColor);\n soup.rect(bp.x - lw / 2, bp.y - t, lw, t * 2, barColor);\n } else {\n const a = worldToScreen(s.perp, s.from, cam);\n const bp = worldToScreen(s.perp, s.to, cam);\n if (frame.height > 0 && (Math.max(a.y, bp.y) < 0 || Math.min(a.y, bp.y) > frame.height)) continue;\n soup.rect(a.x - lw / 2, Math.min(a.y, bp.y), lw, Math.abs(bp.y - a.y), barColor);\n soup.rect(a.x - t, a.y - lw / 2, t * 2, lw, barColor);\n soup.rect(bp.x - t, bp.y - lw / 2, t * 2, lw, barColor);\n }\n }\n });\n\n return soup.build();\n}\n","/**\n * The three-side half of a triangle-soup pass: a Mesh over a dynamic\n * BufferGeometry (position xyz + color rgba) with an unlit TSL material whose\n * fragment IS the vertex color. Capacity grows geometrically; shrink keeps the\n * buffer and narrows the draw range (guide/wire counts oscillate per frame —\n * reallocating every collect would churn).\n */\nimport { attribute } from \"three/tsl\";\nimport { BufferAttribute, BufferGeometry, DoubleSide, Mesh, MeshBasicNodeMaterial } from \"three/webgpu\";\nimport type { TriSoup } from \"./soup-collect\";\n\nexport interface SoupMesh {\n readonly mesh: Mesh;\n update(soup: TriSoup): void;\n dispose(): void;\n}\n\nexport function createSoupMesh(renderOrder: number): SoupMesh {\n const material = new MeshBasicNodeMaterial();\n material.fragmentNode = attribute(\"color\", \"vec4\");\n material.transparent = true;\n material.depthTest = false;\n material.depthWrite = false;\n // Screen-px collectors emit y-down geometry, which lands CLOCKWISE in NDC\n // through the top=0/bottom=h ortho camera — front-face culling would drop\n // every triangle (the invisible-guides field find, 2026-07-16).\n material.side = DoubleSide;\n\n let geometry = new BufferGeometry();\n let capacity = 0;\n const mesh = new Mesh(geometry, material);\n mesh.frustumCulled = false;\n mesh.renderOrder = renderOrder;\n mesh.visible = false; // until the first non-empty soup\n\n return {\n mesh,\n update(soup) {\n if (soup.vertexCount === 0) {\n mesh.visible = false;\n geometry.setDrawRange(0, 0);\n return;\n }\n if (soup.vertexCount > capacity) {\n capacity = Math.max(soup.vertexCount, capacity * 2, 256);\n const old = geometry;\n geometry = new BufferGeometry();\n const pos = new Float32Array(capacity * 3);\n const col = new Float32Array(capacity * 4);\n pos.set(soup.positions);\n col.set(soup.colors);\n geometry.setAttribute(\"position\", new BufferAttribute(pos, 3));\n geometry.setAttribute(\"color\", new BufferAttribute(col, 4));\n mesh.geometry = geometry;\n old.dispose();\n } else {\n const pos = geometry.getAttribute(\"position\") as BufferAttribute;\n const col = geometry.getAttribute(\"color\") as BufferAttribute;\n (pos.array as Float32Array).set(soup.positions);\n (col.array as Float32Array).set(soup.colors);\n pos.needsUpdate = true;\n col.needsUpdate = true;\n }\n geometry.setDrawRange(0, soup.vertexCount);\n mesh.visible = true;\n },\n dispose() {\n geometry.dispose();\n material.dispose();\n },\n };\n}\n","/**\n * Snap-guides pass — the three-side wrapper over the pure `collectGuides`\n * (renders ABOVE grid and wires within the ground canvas, matching the old\n * P0 stacking order).\n */\nimport { GuideLine, SpacingBar, type World } from \"@ice/core\";\nimport { DEFAULT_SNAP_GUIDES_CONFIG, type SnapGuidesConfig } from \"@ice/core\";\nimport type { GroundFrame, GroundPass } from \"../pass\";\nimport { barQ, collectGuides, guideQ } from \"./guides-collect\";\nimport { createSoupMesh } from \"./soup-mesh\";\n\nexport function createGuidesPass(initial: Partial<SnapGuidesConfig> = {}): GroundPass {\n const config: SnapGuidesConfig = { ...DEFAULT_SNAP_GUIDES_CONFIG, ...initial };\n const soup = createSoupMesh(2);\n\n return {\n name: \"snap-guides\",\n object: soup.mesh,\n arm(world: World, wake: () => void) {\n return [\n world.reactive.observeQuery(guideQ, wake, { cols: [GuideLine] }),\n world.reactive.observeQuery(barQ, wake, { cols: [SpacingBar] }),\n ];\n },\n collect(world: World, frame: GroundFrame) {\n soup.update(collectGuides(world, frame, config));\n },\n dispose() {\n soup.dispose();\n },\n };\n}\n","/**\n * Wires collector — the pure ECS→triangles half of the wires pass. Port of\n * the 2D-canvas wires reflector's drawing, kernel-tessellated:\n *\n * - Wire geometry NEVER reads a port ENTITY (design-001 §5.3): endpoints\n * resolve from the wire's `WireFrom`/`WireTo` widgets + `WirePorts` ids\n * against the type registry's static port schema (core `portSlots` — the\n * old local resolver's TODO, retired), so a CULLED endpoint still draws.\n * - Cubics build in WORLD space then map control points through the kernel\n * `worldToScreen` seam — bezier curves are affine-invariant, so the mapped\n * cubic IS the screen curve — and `tessellateCubic` (0.25 px tolerance)\n * flattens with density that tracks zoom for free.\n * - Connect preview: solid when snapped-compatible, dashed [6,4] otherwise\n * (dash placement from the tessellation's arc-length prefix).\n * - Materialized port dots: triangle-fan discs, active color while any\n * connect drag is routed.\n */\nimport {\n Active,\n Culled,\n DEFAULT_WIRES_CONFIG,\n Drag,\n MeasuredSize,\n Port,\n PortAnchor,\n Position,\n PrefabId,\n RoutedConnect,\n Selected,\n Size,\n Wire,\n WireFrom,\n WirePorts,\n WireTo,\n defineQuery,\n portSlots,\n widgets,\n type Entity,\n type WidgetType,\n type WirePreviewBuffer,\n type WiresConfig,\n type World,\n} from \"@ice/core\";\nimport {\n portAnchor,\n tessellateCubic,\n wireCubic,\n worldToScreen,\n type Cubic,\n type PortSlot,\n type Rect,\n type Tessellation,\n} from \"@ice/kernel\";\nimport type { GroundFrame } from \"../pass\";\nimport { SoupBuilder, parseCssColor, type Rgba, type TriSoup } from \"./soup-collect\";\n\nexport const wireQ = defineQuery([Wire]);\nexport const geometryQ = defineQuery([Position, Size]);\nexport const measuredQ = defineQuery([MeasuredSize]);\nexport const selectedQ = defineQuery([Selected]);\nexport const portQ = defineQuery([Port, PortAnchor]);\nexport const routedConnectQ = defineQuery([RoutedConnect]);\n/** A live connect drag moves the preview every frame — Drag value dirt covers it. */\nexport const connectDragQ = defineQuery([RoutedConnect, Drag]);\n/** Nav churn signal: Active membership flips re-collect (scope filter below). */\nexport const activeQ = defineQuery([Active]);\n\n/**\n * Scope filter (field bug 2026-07-17: root wires floated inside a folder).\n * Coordinates are FRAME-LOCAL (design-001 §5.1) — a wire whose endpoint\n * belongs to another nav frame is geometric nonsense in this one. The\n * signature of \"out of scope\" is the canonical non-member state the\n * activeMembership system stamps: Culled ∧ ¬Active. A VIEWPORT-culled member\n * is Culled ∧ Active and must keep drawing (long wires with offscreen\n * endpoints), and bare worlds with no membership system (unit tests,\n * membership-less rigs) carry neither tag and draw everything.\n */\nfunction outOfScope(world: World, e: Entity): boolean {\n return world.hasTag(e, Culled) && !world.hasTag(e, Active);\n}\n\nconst TESSELLATION_TOLERANCE_PX = 0.25;\nconst DASH_PX = 6;\nconst GAP_PX = 4;\n\n/** Effective widget rect: non-zero MeasuredSize over Size (design-004 §2). */\nfunction readRect(world: World, e: Entity): Rect | undefined {\n const p = world.get(e, Position);\n if (p === undefined) return undefined;\n const measured = world.get(e, MeasuredSize);\n const s = measured !== undefined && measured.w > 0 ? measured : world.get(e, Size);\n if (s === undefined) return undefined;\n return { x: p.x, y: p.y, width: s.w, height: s.h };\n}\n\n/** Per-type slot cache (schemas are immutable; mirrors core ops/port-geometry). */\nconst slotCache = new Map<string, Map<string, PortSlot>>();\nfunction slotOf(wt: WidgetType, portId: string): PortSlot | undefined {\n let slots = slotCache.get(wt.type);\n if (slots === undefined) {\n slots = portSlots(wt.ports);\n slotCache.set(wt.type, slots);\n }\n return slots.get(portId);\n}\n\nfunction endpointAnchor(\n world: World,\n widget: Entity | undefined,\n portId: string,\n): { anchor: Rect; slot: PortSlot } | undefined {\n if (widget === undefined) return undefined;\n const rect = readRect(world, widget);\n if (rect === undefined) return undefined;\n const type = world.get(widget, PrefabId)?.id;\n if (typeof type !== \"string\") return undefined;\n const wt = widgets.get(type);\n if (wt === undefined) return undefined;\n const slot = slotOf(wt, portId);\n if (slot === undefined) return undefined;\n return { anchor: rect, slot };\n}\n\n/** Map a world cubic's control points to screen (affine ⇒ exact curve map). */\nfunction cubicToScreen(c: Cubic, cam: GroundFrame[\"camera\"]): Cubic {\n const p0 = worldToScreen(c.x0, c.y0, cam);\n const p1 = worldToScreen(c.x1, c.y1, cam);\n const p2 = worldToScreen(c.x2, c.y2, cam);\n const p3 = worldToScreen(c.x3, c.y3, cam);\n return { x0: p0.x, y0: p0.y, x1: p1.x, y1: p1.y, x2: p2.x, y2: p2.y, x3: p3.x, y3: p3.y };\n}\n\n/** Point at arc length `d` via the tessellation's prefix sums (binary search + lerp). */\nfunction pointAtLength(t: Tessellation, d: number): { x: number; y: number } {\n const arc = t.arcLength;\n const n = arc.length;\n let lo = 0;\n let hi = n - 1;\n while (lo < hi) {\n const mid = (lo + hi) >> 1;\n if ((arc[mid] as number) < d) lo = mid + 1;\n else hi = mid;\n }\n const i = Math.max(1, lo);\n const a = arc[i - 1] as number;\n const b = arc[i] as number;\n const f = b > a ? (d - a) / (b - a) : 0;\n const x0 = t.points[(i - 1) * 2] as number;\n const y0 = t.points[(i - 1) * 2 + 1] as number;\n const x1 = t.points[i * 2] as number;\n const y1 = t.points[i * 2 + 1] as number;\n return { x: x0 + (x1 - x0) * f, y: y0 + (y1 - y0) * f };\n}\n\n/** Emit a dashed stroke along the tessellation (straight dash segments — canvas parity at 6px dashes). */\nfunction dashedStroke(soup: SoupBuilder, t: Tessellation, width: number, c: Rgba): void {\n const total = t.arcLength[t.arcLength.length - 1] as number;\n for (let d = 0; d < total; d += DASH_PX + GAP_PX) {\n const a = pointAtLength(t, d);\n const b = pointAtLength(t, Math.min(d + DASH_PX, total));\n soup.segment(a.x, a.y, b.x, b.y, width, c);\n }\n}\n\nexport function collectWires(\n world: World,\n frame: GroundFrame,\n config: WiresConfig = DEFAULT_WIRES_CONFIG,\n preview?: WirePreviewBuffer,\n): TriSoup {\n const soup = new SoupBuilder();\n const cam = frame.camera;\n const wireColor = parseCssColor(config.wireColor);\n const selectedColor = parseCssColor(config.selectedColor);\n\n // Committed wires.\n world.query(wireQ).each((batch) => {\n for (const r of batch) {\n const wire = batch.entity(r);\n const ports = world.get(wire, WirePorts);\n if (ports === undefined) continue;\n const fromWidget = world.getRelation(wire, WireFrom);\n const toWidget = world.getRelation(wire, WireTo);\n // Both endpoints must be IN the current nav frame (scope filter above).\n if (fromWidget !== undefined && outOfScope(world, fromWidget)) continue;\n if (toWidget !== undefined && outOfScope(world, toWidget)) continue;\n const from = endpointAnchor(world, fromWidget, ports.from ?? \"\");\n const to = endpointAnchor(world, toWidget, ports.to ?? \"\");\n if (from === undefined || to === undefined) continue;\n const cubic = wireCubic(\n portAnchor(from.anchor, from.slot),\n from.slot.side,\n portAnchor(to.anchor, to.slot),\n to.slot.side,\n );\n const selected = world.hasTag(wire, Selected);\n const t = tessellateCubic(cubicToScreen(cubic, cam), TESSELLATION_TOLERANCE_PX);\n soup.polyline(t.points, selected ? config.selectedWidth : config.wireWidth, selected ? selectedColor : wireColor);\n }\n });\n\n // Connect-drag preview (world coords in the buffer; horizontal-stub cubic —\n // the old reflector's readable stand-in until the wire commits real sides).\n if (preview?.active === true) {\n const stub = Math.max(24, Math.abs(preview.tx - preview.sx) * 0.5);\n const cubic: Cubic = {\n x0: preview.sx,\n y0: preview.sy,\n x1: preview.sx + stub,\n y1: preview.sy,\n x2: preview.tx - stub,\n y2: preview.ty,\n x3: preview.tx,\n y3: preview.ty,\n };\n const t = tessellateCubic(cubicToScreen(cubic, cam), TESSELLATION_TOLERANCE_PX);\n if (preview.compatible) soup.polyline(t.points, config.wireWidth, selectedColor);\n else dashedStroke(soup, t, config.wireWidth, wireColor);\n }\n\n // Materialized port dots.\n const connecting = world.firstOf(routedConnectQ) !== undefined;\n const dotColor = parseCssColor(connecting ? config.portActiveColor : config.portColor);\n world.query(portQ).each((batch) => {\n const ax = batch.col(PortAnchor).x;\n const ay = batch.col(PortAnchor).y;\n for (const r of batch) {\n const s = worldToScreen(ax[r] as number, ay[r] as number, cam);\n soup.disc(s.x, s.y, config.portRadius, dotColor);\n }\n });\n\n return soup.build();\n}\n","/**\n * Wires pass — the three-side wrapper over the pure `collectWires` (renders\n * above the grid, below the guides, matching the old P0 canvas order).\n * Dirt mirrors the old 2D reflector's observers; the connect preview rides\n * `[RoutedConnect, Drag]` value dirt (the buffer updates exactly when the\n * connect recognizer's Drag advances) instead of a per-frame value diff.\n */\nimport {\n DEFAULT_WIRES_CONFIG,\n Drag,\n MeasuredSize,\n PortAnchor,\n Position,\n Size,\n type WirePreviewBuffer,\n type WiresConfig,\n type World,\n} from \"@ice/core\";\nimport type { GroundFrame, GroundPass } from \"../pass\";\nimport { createSoupMesh } from \"./soup-mesh\";\nimport {\n activeQ,\n collectWires,\n connectDragQ,\n geometryQ,\n measuredQ,\n portQ,\n routedConnectQ,\n selectedQ,\n wireQ,\n} from \"./wires-collect\";\n\nexport function createWiresPass(\n initial: Partial<WiresConfig> = {},\n readPreview?: () => WirePreviewBuffer,\n): GroundPass {\n const config: WiresConfig = { ...DEFAULT_WIRES_CONFIG, ...initial };\n const soup = createSoupMesh(1);\n\n return {\n name: \"wires\",\n object: soup.mesh,\n arm(world: World, wake: () => void) {\n return [\n world.reactive.observeQuery(wireQ, wake, { cols: [] }),\n world.reactive.observeQuery(geometryQ, wake, { cols: [Position, Size] }),\n // MeasuredSize rides its own observer (readRect prefers it over Size):\n // in geometryQ's cols it would REQUIRE the rider and drop plain widgets.\n world.reactive.observeQuery(measuredQ, wake, { cols: [MeasuredSize] }),\n world.reactive.observeQuery(selectedQ, wake, { cols: [] }),\n // Nav churn: Active membership flips gate the scope filter (a wire\n // whose endpoints left the current frame must disappear this frame).\n world.reactive.observeQuery(activeQ, wake, { cols: [] }),\n world.reactive.observeQuery(portQ, wake, { cols: [PortAnchor] }),\n world.reactive.observeQuery(routedConnectQ, wake, { cols: [] }),\n world.reactive.observeQuery(connectDragQ, wake, { cols: [Drag] }),\n ];\n },\n collect(world: World, frame: GroundFrame) {\n soup.update(collectWires(world, frame, config, readPreview?.()));\n },\n dispose() {\n soup.dispose();\n },\n };\n}\n","/**\n * WebGPU renderer bootstrap for the ground layer.\n *\n * WebGPU-first (James, 2026-07-16): three's `WebGPURenderer` picks the WebGPU\n * backend when `navigator.gpu` exists and falls back to WebGL2 otherwise —\n * one code path, TSL compiles to WGSL or GLSL per backend. Init is ASYNC\n * (`renderer.init()`), but the reflector flush is synchronous: `ready()`\n * gates drawing, the layer keeps its dirty flags armed, and the first flush\n * after resolution paints (the rAF loop retries every frame — no extra wake\n * plumbing). Any construction/init failure (happy-dom, device loss, no\n * WebGL2 either) degrades to `failed()` — the layer reports available() =\n * false and never throws (grid.ts fault-isolation contract, design-002 §5).\n */\nimport { WebGPURenderer } from \"three/webgpu\";\nimport type { Camera, Scene } from \"three/webgpu\";\n\n/** The layer's renderer seam — tests inject a fake (compositor `GlLike` precedent). */\nexport interface GroundRendererLike {\n readonly canvas: HTMLCanvasElement;\n ready(): boolean;\n failed(): boolean;\n /** Register a one-shot \"became ready\" callback (fires immediately if already ready). */\n onReady(cb: () => void): void;\n setSize(cssW: number, cssH: number, dpr: number): void;\n render(scene: Scene, camera: Camera): void;\n dispose(): void;\n}\n\nexport function createGroundRenderer(\n doc: Document,\n opts: { forceWebGL?: boolean } = {},\n): GroundRendererLike {\n const canvas = doc.createElement(\"canvas\");\n let renderer: WebGPURenderer | null = null;\n let isReady = false;\n let isFailed = false;\n const readyCbs: Array<() => void> = [];\n\n // Probe BEFORE constructing: with neither WebGPU nor WebGL2 (happy-dom,\n // ancient browsers), three's WebGL2 fallback dies inside an internal\n // un-awaited promise — an unhandled rejection our init().catch never sees\n // (widgetlab app-mount test, 2026-07-16). The WebGL2 probe uses a SCRATCH\n // canvas: getContext('webgl2') on the real one would lock it out of a\n // 'webgpu' context (contexts are exclusive per canvas).\n const gpu = (globalThis.navigator as { gpu?: unknown } | undefined)?.gpu;\n if (gpu == null || opts.forceWebGL === true) {\n let gl2: unknown = null;\n try {\n gl2 = doc.createElement(\"canvas\").getContext(\"webgl2\");\n } catch {\n gl2 = null;\n }\n if (gl2 === null) isFailed = true;\n }\n\n if (!isFailed) {\n try {\n renderer = new WebGPURenderer({\n canvas: canvas as unknown as HTMLCanvasElement,\n alpha: true, // transparent clear — the page background shows through P0\n antialias: true,\n ...(opts.forceWebGL === true ? { forceWebGL: true } : {}),\n });\n renderer\n .init()\n .then(() => {\n isReady = true;\n for (const cb of readyCbs.splice(0)) cb();\n })\n .catch(() => {\n isFailed = true; // device loss mid-init\n });\n } catch {\n isFailed = true; // constructor threw\n }\n }\n\n let lastW = 0;\n let lastH = 0;\n let lastDpr = 0;\n\n return {\n canvas,\n ready: () => isReady,\n failed: () => isFailed,\n onReady(cb) {\n if (isReady) cb();\n else readyCbs.push(cb);\n },\n setSize(cssW, cssH, dpr) {\n if (renderer === null || (cssW === lastW && cssH === lastH && dpr === lastDpr)) return;\n lastW = cssW;\n lastH = cssH;\n lastDpr = dpr;\n try {\n renderer.setPixelRatio(dpr);\n // false: the layer owns the canvas CSS size (100% inset-0)\n renderer.setSize(Math.max(1, cssW), Math.max(1, cssH), false);\n } catch {\n isFailed = true;\n }\n },\n render(scene, camera) {\n if (renderer === null || !isReady || isFailed) return;\n try {\n renderer.render(scene, camera);\n } catch {\n isFailed = true; // device loss ⇒ silent no-op forever, never a throwing reflector\n }\n },\n dispose() {\n try {\n renderer?.dispose();\n } catch {\n /* already lost */\n }\n renderer = null;\n },\n };\n}\n","/**\n * @ice/ground — the P0 ground stratum as ONE WebGPU canvas (design-004 §1\n * as-built amendment, 2026-07-16). three's WebGPURenderer + TSL, WebGL2\n * fallback automatic. Off the react chain: react receives the layer as an\n * OPAQUE factory (`<InfiniteCanvas ground={ground(...)}>`); imperative apps\n * register `layer.reflector` themselves. Passes: dot grid, wires, snap\n * guides — future ground shaders/effects join the same pass registry.\n * (Selection chrome moved OFF the ground 2026-07-17: rings live with the\n * cards, the multi-select union box is P4 dom chrome — always on top.)\n */\nimport type { GridConfig, SnapGuidesConfig, WirePreviewBuffer, WiresConfig, World } from \"@ice/core\";\nimport { createLayer, type GroundLayerHost, type GroundReflector } from \"./layer\";\nimport type { GroundPass } from \"./pass\";\nimport { createGridPass } from \"./passes/grid\";\nimport { createGuidesPass } from \"./passes/guides\";\nimport { createWiresPass } from \"./passes/wires\";\nimport { createGroundRenderer, type GroundRendererLike } from \"./renderer\";\n\nexport type { GroundFrame, GroundPass } from \"./pass\";\nexport type { GroundReflector } from \"./layer\";\nexport type { GroundRendererLike } from \"./renderer\";\nexport { SoupBuilder, parseCssColor, type Rgba, type TriSoup } from \"./passes/soup-collect\";\nexport { collectGuides } from \"./passes/guides-collect\";\nexport { collectWires } from \"./passes/wires-collect\";\n// Config vocabulary re-exported for app ergonomics (canonical home: @ice/core).\nexport {\n DEFAULT_GRID_CONFIG,\n DEFAULT_SNAP_GUIDES_CONFIG,\n DEFAULT_WIRES_CONFIG,\n type GridConfig,\n type SnapGuidesConfig,\n type WiresConfig,\n} from \"@ice/core\";\n\nexport interface GroundContext {\n readonly host: GroundLayerHost;\n readonly world: World;\n /** Connect-drag preview reader (graph boards); omit on boards without wires. */\n readonly readWirePreview?: () => WirePreviewBuffer;\n}\n\nexport interface GroundLayer {\n readonly reflector: GroundReflector;\n /** Live grid re-tune (the react `grid` prop forwards here). */\n configureGrid(cfg: Partial<GridConfig>): void;\n dispose(): void;\n}\n\nexport interface GroundOptions {\n readonly grid?: Partial<GridConfig>;\n readonly wires?: Partial<WiresConfig>;\n readonly guides?: Partial<SnapGuidesConfig>;\n /** Extra app passes, rendered after the built-ins (renderOrder ≥ 3 is yours). */\n readonly passes?: readonly GroundPass[];\n /** Force the WebGL2 backend (debug / e2e A-B runs). */\n readonly forceWebGL?: boolean;\n /** TEST seam: inject a fake renderer (headless orchestration tests). */\n readonly rendererOverride?: GroundRendererLike;\n}\n\nexport type GroundFactory = (ctx: GroundContext) => GroundLayer;\n\n/**\n * Build the ground layer factory. Usage:\n * react apps: <InfiniteCanvas ground={ground({ grid: {...} })} …>\n * imperative apps: const layer = ground()( { host, world, readWirePreview } );\n * engine.registerReflector(layer.reflector);\n */\nexport function ground(opts: GroundOptions = {}): GroundFactory {\n return (ctx) => {\n const doc = ctx.host.container.ownerDocument;\n const renderer = opts.rendererOverride ?? createGroundRenderer(doc, { forceWebGL: opts.forceWebGL === true });\n const grid = createGridPass(opts.grid ?? {});\n const wires = createWiresPass(opts.wires ?? {}, ctx.readWirePreview);\n const guides = createGuidesPass(opts.guides ?? {});\n const passes: GroundPass[] = [grid, wires, guides, ...(opts.passes ?? [])];\n const layer = createLayer(ctx.host, ctx.world, renderer, passes);\n return {\n reflector: layer.reflector,\n configureGrid(cfg) {\n grid.configure(cfg);\n layer.invalidateAll();\n },\n dispose: layer.dispose,\n };\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,SAAS,oBAAoB,aAAa;AAuBnC,SAAS,YACd,MACA,OACA,UACA,QACsB;AACtB,QAAM,MAAM,KAAK,UAAU;AAC3B,QAAM,SAAS,SAAS;AACxB,SAAO,MAAM,WAAW;AACxB,SAAO,MAAM,OAAO;AACpB,SAAO,MAAM,MAAM;AACnB,SAAO,MAAM,QAAQ;AACrB,SAAO,MAAM,SAAS;AACtB,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AS,CAAC,GAAG,IAAI,eAAe;AACnE,UAAM,SAAS,iBAAiB,KAAK,UAAU,CAAC,CAAC;AACjD,UAAM,SAAuB,CAAC,MAAM,OAAO,QAAQ,GAAI,KAAK,UAAU,CAAC,CAAE;AACzE,UAAM,QAAQ,YAAY,IAAI,MAAM,IAAI,OAAO,UAAU,MAAM;AAC/D,WAAO;AAAA,MACL,WAAW,MAAM;AAAA,MACjB,cAAc,KAAK;AACjB,aAAK,UAAU,GAAG;AAClB,cAAM,cAAc;AAAA,MACtB;AAAA,MACA,SAAS,MAAM;AAAA,IACjB;AAAA,EACF;AACF;","names":["BufferAttribute","BufferGeometry","Mesh","MeshBasicNodeMaterial"]}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,9 @@ import {
|
|
|
4
4
|
ActiveTool,
|
|
5
5
|
All,
|
|
6
6
|
Any,
|
|
7
|
+
BoardRoot,
|
|
7
8
|
CAMERA_DEFAULTS,
|
|
9
|
+
CHROME_DEFAULTS,
|
|
8
10
|
CORE_VERSION,
|
|
9
11
|
Camera,
|
|
10
12
|
CameraInertia,
|
|
@@ -13,13 +15,17 @@ import {
|
|
|
13
15
|
CanvasSurface,
|
|
14
16
|
Captures,
|
|
15
17
|
ChildOf,
|
|
18
|
+
ChromeSettings,
|
|
16
19
|
ClaimedBy,
|
|
17
20
|
Container,
|
|
18
21
|
ContainerCamera,
|
|
19
22
|
Culled,
|
|
20
23
|
CursorVisual,
|
|
24
|
+
DEFAULT_GRID_CONFIG,
|
|
21
25
|
DEFAULT_PRESENCE_TTL_MS,
|
|
26
|
+
DEFAULT_SNAP_GUIDES_CONFIG,
|
|
22
27
|
DEFAULT_SPAWN_PROFILES,
|
|
28
|
+
DEFAULT_WIRES_CONFIG,
|
|
23
29
|
Down,
|
|
24
30
|
Drag,
|
|
25
31
|
Drags,
|
|
@@ -29,6 +35,7 @@ import {
|
|
|
29
35
|
ENVELOPE_MAGIC,
|
|
30
36
|
ENVELOPE_VERSION,
|
|
31
37
|
EnvelopeError,
|
|
38
|
+
FIT_DEFAULTS,
|
|
32
39
|
Follows,
|
|
33
40
|
FrameInfo,
|
|
34
41
|
GESTURE_DEFAULTS,
|
|
@@ -43,6 +50,8 @@ import {
|
|
|
43
50
|
GestureRecognized,
|
|
44
51
|
GestureSettings,
|
|
45
52
|
GestureSuspended,
|
|
53
|
+
GhostCommitted,
|
|
54
|
+
GhostRetiring,
|
|
46
55
|
Grab,
|
|
47
56
|
GuideLine,
|
|
48
57
|
HadCapture,
|
|
@@ -50,6 +59,7 @@ import {
|
|
|
50
59
|
HadSequence,
|
|
51
60
|
HandleSpec,
|
|
52
61
|
HandledByWidget,
|
|
62
|
+
InsertGhost,
|
|
53
63
|
Keyboard,
|
|
54
64
|
Local,
|
|
55
65
|
LocalPointer,
|
|
@@ -59,11 +69,17 @@ import {
|
|
|
59
69
|
MeasuredSize,
|
|
60
70
|
Movable,
|
|
61
71
|
MultiTap,
|
|
72
|
+
NAV_TRANSITION_DEFAULTS,
|
|
73
|
+
NO_ENTITY,
|
|
62
74
|
NO_MODS,
|
|
63
75
|
NavCamera,
|
|
64
76
|
NavDepth,
|
|
65
77
|
NavFrame,
|
|
78
|
+
NavTransition,
|
|
79
|
+
NavTransitionSettings,
|
|
66
80
|
Not,
|
|
81
|
+
Opacity,
|
|
82
|
+
OverInteractive,
|
|
67
83
|
OverlapCandidate,
|
|
68
84
|
OverlapRejected,
|
|
69
85
|
PHASE_GROUPS,
|
|
@@ -112,8 +128,11 @@ import {
|
|
|
112
128
|
SnapState,
|
|
113
129
|
SnapTarget,
|
|
114
130
|
Solid,
|
|
131
|
+
SpacingBar,
|
|
115
132
|
SpatialVersion,
|
|
116
133
|
StackZ,
|
|
134
|
+
StageMode,
|
|
135
|
+
SweepsContained,
|
|
117
136
|
Tap,
|
|
118
137
|
Targets,
|
|
119
138
|
TouchesExact,
|
|
@@ -134,13 +153,19 @@ import {
|
|
|
134
153
|
WirePorts,
|
|
135
154
|
WirePrefab,
|
|
136
155
|
WireTo,
|
|
156
|
+
abortNavFlight,
|
|
157
|
+
arrangeWidgets,
|
|
137
158
|
attachBroadcastRelay,
|
|
138
159
|
attachPresence,
|
|
160
|
+
attachSpawnParent,
|
|
139
161
|
broadcastChannelByteChannel,
|
|
162
|
+
buildOrdinals,
|
|
140
163
|
bumpVersion,
|
|
141
164
|
cancelActiveGestures,
|
|
142
165
|
cascadeDestroy,
|
|
143
166
|
clearSelection,
|
|
167
|
+
compareStackOrder,
|
|
168
|
+
createActiveMembership,
|
|
144
169
|
createBreakpointSystem,
|
|
145
170
|
createCameraSystems,
|
|
146
171
|
createCanvasEngine,
|
|
@@ -155,6 +180,7 @@ import {
|
|
|
155
180
|
createLiveWriter,
|
|
156
181
|
createMeasureIngest,
|
|
157
182
|
createMeasureQueue,
|
|
183
|
+
createNavFlight,
|
|
158
184
|
createNestedCanvas,
|
|
159
185
|
createPipelineRegistry,
|
|
160
186
|
createPortMaterialize,
|
|
@@ -164,6 +190,7 @@ import {
|
|
|
164
190
|
createReflectorRegistry,
|
|
165
191
|
createRemoteCursorsSystem,
|
|
166
192
|
createSelectionChromeSystem,
|
|
193
|
+
createSiblingOrderIndex,
|
|
167
194
|
createWidgetEquipSystem,
|
|
168
195
|
createWidgetRuntime,
|
|
169
196
|
createWireSync,
|
|
@@ -189,6 +216,7 @@ import {
|
|
|
189
216
|
ensureCanvasSurface,
|
|
190
217
|
enumOf,
|
|
191
218
|
field,
|
|
219
|
+
frameParent,
|
|
192
220
|
gateVerdict,
|
|
193
221
|
guardedTransaction,
|
|
194
222
|
hmrInvalidateOnSchemaChange,
|
|
@@ -201,9 +229,13 @@ import {
|
|
|
201
229
|
joinDoc,
|
|
202
230
|
makeDefaultMayDiverge,
|
|
203
231
|
makeVersionGuard,
|
|
232
|
+
navFlightActive,
|
|
233
|
+
offerBase,
|
|
204
234
|
openDocSession,
|
|
205
235
|
p,
|
|
206
236
|
pickTopAt,
|
|
237
|
+
portSlotOf,
|
|
238
|
+
portSlots,
|
|
207
239
|
prefabs,
|
|
208
240
|
readDocVersionReport,
|
|
209
241
|
restoreAutosave,
|
|
@@ -213,23 +245,27 @@ import {
|
|
|
213
245
|
setDevGuards,
|
|
214
246
|
setFrameInfo,
|
|
215
247
|
setSelection,
|
|
248
|
+
setWidgetProps,
|
|
216
249
|
spawnWidget,
|
|
217
250
|
stampEngineMeta,
|
|
218
251
|
startAutosave,
|
|
252
|
+
startNavFlight,
|
|
219
253
|
tools,
|
|
220
254
|
webSocketByteChannel,
|
|
221
255
|
widgetSpawnInits,
|
|
222
256
|
widgets,
|
|
223
257
|
writeRuntimeResource
|
|
224
|
-
} from "./chunk-
|
|
225
|
-
import "./chunk-
|
|
258
|
+
} from "./chunk-DXU3RZZS.js";
|
|
259
|
+
import "./chunk-OR5FNVUE.js";
|
|
226
260
|
export {
|
|
227
261
|
Accepts,
|
|
228
262
|
Active,
|
|
229
263
|
ActiveTool,
|
|
230
264
|
All,
|
|
231
265
|
Any,
|
|
266
|
+
BoardRoot,
|
|
232
267
|
CAMERA_DEFAULTS,
|
|
268
|
+
CHROME_DEFAULTS,
|
|
233
269
|
CORE_VERSION,
|
|
234
270
|
Camera,
|
|
235
271
|
CameraInertia,
|
|
@@ -238,13 +274,17 @@ export {
|
|
|
238
274
|
CanvasSurface,
|
|
239
275
|
Captures,
|
|
240
276
|
ChildOf,
|
|
277
|
+
ChromeSettings,
|
|
241
278
|
ClaimedBy,
|
|
242
279
|
Container,
|
|
243
280
|
ContainerCamera,
|
|
244
281
|
Culled,
|
|
245
282
|
CursorVisual,
|
|
283
|
+
DEFAULT_GRID_CONFIG,
|
|
246
284
|
DEFAULT_PRESENCE_TTL_MS,
|
|
285
|
+
DEFAULT_SNAP_GUIDES_CONFIG,
|
|
247
286
|
DEFAULT_SPAWN_PROFILES,
|
|
287
|
+
DEFAULT_WIRES_CONFIG,
|
|
248
288
|
Down,
|
|
249
289
|
Drag,
|
|
250
290
|
Drags,
|
|
@@ -254,6 +294,7 @@ export {
|
|
|
254
294
|
ENVELOPE_MAGIC,
|
|
255
295
|
ENVELOPE_VERSION,
|
|
256
296
|
EnvelopeError,
|
|
297
|
+
FIT_DEFAULTS,
|
|
257
298
|
Follows,
|
|
258
299
|
FrameInfo,
|
|
259
300
|
GESTURE_DEFAULTS,
|
|
@@ -268,6 +309,8 @@ export {
|
|
|
268
309
|
GestureRecognized,
|
|
269
310
|
GestureSettings,
|
|
270
311
|
GestureSuspended,
|
|
312
|
+
GhostCommitted,
|
|
313
|
+
GhostRetiring,
|
|
271
314
|
Grab,
|
|
272
315
|
GuideLine,
|
|
273
316
|
HadCapture,
|
|
@@ -275,6 +318,7 @@ export {
|
|
|
275
318
|
HadSequence,
|
|
276
319
|
HandleSpec,
|
|
277
320
|
HandledByWidget,
|
|
321
|
+
InsertGhost,
|
|
278
322
|
Keyboard,
|
|
279
323
|
Local,
|
|
280
324
|
LocalPointer,
|
|
@@ -284,11 +328,17 @@ export {
|
|
|
284
328
|
MeasuredSize,
|
|
285
329
|
Movable,
|
|
286
330
|
MultiTap,
|
|
331
|
+
NAV_TRANSITION_DEFAULTS,
|
|
332
|
+
NO_ENTITY,
|
|
287
333
|
NO_MODS,
|
|
288
334
|
NavCamera,
|
|
289
335
|
NavDepth,
|
|
290
336
|
NavFrame,
|
|
337
|
+
NavTransition,
|
|
338
|
+
NavTransitionSettings,
|
|
291
339
|
Not,
|
|
340
|
+
Opacity,
|
|
341
|
+
OverInteractive,
|
|
292
342
|
OverlapCandidate,
|
|
293
343
|
OverlapRejected,
|
|
294
344
|
PHASE_GROUPS,
|
|
@@ -337,8 +387,11 @@ export {
|
|
|
337
387
|
SnapState,
|
|
338
388
|
SnapTarget,
|
|
339
389
|
Solid,
|
|
390
|
+
SpacingBar,
|
|
340
391
|
SpatialVersion,
|
|
341
392
|
StackZ,
|
|
393
|
+
StageMode,
|
|
394
|
+
SweepsContained,
|
|
342
395
|
Tap,
|
|
343
396
|
Targets,
|
|
344
397
|
TouchesExact,
|
|
@@ -359,13 +412,19 @@ export {
|
|
|
359
412
|
WirePorts,
|
|
360
413
|
WirePrefab,
|
|
361
414
|
WireTo,
|
|
415
|
+
abortNavFlight,
|
|
416
|
+
arrangeWidgets,
|
|
362
417
|
attachBroadcastRelay,
|
|
363
418
|
attachPresence,
|
|
419
|
+
attachSpawnParent,
|
|
364
420
|
broadcastChannelByteChannel,
|
|
421
|
+
buildOrdinals,
|
|
365
422
|
bumpVersion,
|
|
366
423
|
cancelActiveGestures,
|
|
367
424
|
cascadeDestroy,
|
|
368
425
|
clearSelection,
|
|
426
|
+
compareStackOrder,
|
|
427
|
+
createActiveMembership,
|
|
369
428
|
createBreakpointSystem,
|
|
370
429
|
createCameraSystems,
|
|
371
430
|
createCanvasEngine,
|
|
@@ -380,6 +439,7 @@ export {
|
|
|
380
439
|
createLiveWriter,
|
|
381
440
|
createMeasureIngest,
|
|
382
441
|
createMeasureQueue,
|
|
442
|
+
createNavFlight,
|
|
383
443
|
createNestedCanvas,
|
|
384
444
|
createPipelineRegistry,
|
|
385
445
|
createPortMaterialize,
|
|
@@ -389,6 +449,7 @@ export {
|
|
|
389
449
|
createReflectorRegistry,
|
|
390
450
|
createRemoteCursorsSystem,
|
|
391
451
|
createSelectionChromeSystem,
|
|
452
|
+
createSiblingOrderIndex,
|
|
392
453
|
createWidgetEquipSystem,
|
|
393
454
|
createWidgetRuntime,
|
|
394
455
|
createWireSync,
|
|
@@ -414,6 +475,7 @@ export {
|
|
|
414
475
|
ensureCanvasSurface,
|
|
415
476
|
enumOf,
|
|
416
477
|
field,
|
|
478
|
+
frameParent,
|
|
417
479
|
gateVerdict,
|
|
418
480
|
guardedTransaction,
|
|
419
481
|
hmrInvalidateOnSchemaChange,
|
|
@@ -426,9 +488,13 @@ export {
|
|
|
426
488
|
joinDoc,
|
|
427
489
|
makeDefaultMayDiverge,
|
|
428
490
|
makeVersionGuard,
|
|
491
|
+
navFlightActive,
|
|
492
|
+
offerBase,
|
|
429
493
|
openDocSession,
|
|
430
494
|
p,
|
|
431
495
|
pickTopAt,
|
|
496
|
+
portSlotOf,
|
|
497
|
+
portSlots,
|
|
432
498
|
prefabs,
|
|
433
499
|
readDocVersionReport,
|
|
434
500
|
restoreAutosave,
|
|
@@ -438,9 +504,11 @@ export {
|
|
|
438
504
|
setDevGuards,
|
|
439
505
|
setFrameInfo,
|
|
440
506
|
setSelection,
|
|
507
|
+
setWidgetProps,
|
|
441
508
|
spawnWidget,
|
|
442
509
|
stampEngineMeta,
|
|
443
510
|
startAutosave,
|
|
511
|
+
startNavFlight,
|
|
444
512
|
tools,
|
|
445
513
|
webSocketByteChannel,
|
|
446
514
|
widgetSpawnInits,
|
package/dist/kernel.js
CHANGED
|
@@ -3,57 +3,87 @@ import {
|
|
|
3
3
|
SpatialIndex,
|
|
4
4
|
ZOOM_BANDS,
|
|
5
5
|
aabbToRect,
|
|
6
|
+
capFlightStart,
|
|
6
7
|
clamp,
|
|
8
|
+
composeAffine,
|
|
7
9
|
compositeCameraFrustum,
|
|
8
10
|
computeIslandPhase,
|
|
9
11
|
computeSnapGuides,
|
|
10
12
|
cubicAABB,
|
|
13
|
+
cubicBezierEase,
|
|
11
14
|
cubicPoint,
|
|
12
15
|
distanceToCubic,
|
|
13
16
|
distanceToSegment,
|
|
14
17
|
fboPixelSize,
|
|
18
|
+
fitCamera,
|
|
19
|
+
flightCamera,
|
|
20
|
+
flightOctaves,
|
|
21
|
+
insertSlot,
|
|
15
22
|
intersectsAABB,
|
|
23
|
+
invertAffine,
|
|
16
24
|
isOutOfBand,
|
|
17
25
|
islandToWorld,
|
|
26
|
+
layerGraph,
|
|
27
|
+
packLayout,
|
|
18
28
|
planeCssTransform,
|
|
19
29
|
pointInAABB,
|
|
20
30
|
portAnchor,
|
|
31
|
+
portalAffine,
|
|
21
32
|
rectToAABB,
|
|
22
33
|
screenToWorld,
|
|
23
34
|
selectBand,
|
|
24
35
|
selectEvictions,
|
|
25
36
|
sideDirection,
|
|
37
|
+
solveFlightStart,
|
|
38
|
+
springStep,
|
|
39
|
+
tessellateCubic,
|
|
40
|
+
visibleRect,
|
|
26
41
|
wireCubic,
|
|
27
42
|
worldRectToComposite,
|
|
28
43
|
worldToIsland,
|
|
29
44
|
worldToScreen,
|
|
30
45
|
zoomAtPoint
|
|
31
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-OR5FNVUE.js";
|
|
32
47
|
export {
|
|
33
48
|
KERNEL_VERSION,
|
|
34
49
|
SpatialIndex,
|
|
35
50
|
ZOOM_BANDS,
|
|
36
51
|
aabbToRect,
|
|
52
|
+
capFlightStart,
|
|
37
53
|
clamp,
|
|
54
|
+
composeAffine,
|
|
38
55
|
compositeCameraFrustum,
|
|
39
56
|
computeIslandPhase,
|
|
40
57
|
computeSnapGuides,
|
|
41
58
|
cubicAABB,
|
|
59
|
+
cubicBezierEase,
|
|
42
60
|
cubicPoint,
|
|
43
61
|
distanceToCubic,
|
|
44
62
|
distanceToSegment,
|
|
45
63
|
fboPixelSize,
|
|
64
|
+
fitCamera,
|
|
65
|
+
flightCamera,
|
|
66
|
+
flightOctaves,
|
|
67
|
+
insertSlot,
|
|
46
68
|
intersectsAABB,
|
|
69
|
+
invertAffine,
|
|
47
70
|
isOutOfBand,
|
|
48
71
|
islandToWorld,
|
|
72
|
+
layerGraph,
|
|
73
|
+
packLayout,
|
|
49
74
|
planeCssTransform,
|
|
50
75
|
pointInAABB,
|
|
51
76
|
portAnchor,
|
|
77
|
+
portalAffine,
|
|
52
78
|
rectToAABB,
|
|
53
79
|
screenToWorld,
|
|
54
80
|
selectBand,
|
|
55
81
|
selectEvictions,
|
|
56
82
|
sideDirection,
|
|
83
|
+
solveFlightStart,
|
|
84
|
+
springStep,
|
|
85
|
+
tessellateCubic,
|
|
86
|
+
visibleRect,
|
|
57
87
|
wireCubic,
|
|
58
88
|
worldRectToComposite,
|
|
59
89
|
worldToIsland,
|