@ggts-sh/svelte 0.43.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/LICENSE +21 -0
- package/README.md +97 -0
- package/bin/ggts-codemod.js +47 -0
- package/dist/GGPlot.svelte +491 -0
- package/dist/GGPlot.svelte.d.ts +67 -0
- package/dist/a11y/CanvasA11y.svelte +115 -0
- package/dist/a11y/CanvasA11y.svelte.d.ts +15 -0
- package/dist/a11y/canvas-a11y.d.ts +1 -0
- package/dist/a11y/canvas-a11y.js +2 -0
- package/dist/assembly/assemble.d.ts +1 -0
- package/dist/assembly/assemble.js +1 -0
- package/dist/assembly/labels.d.ts +43 -0
- package/dist/assembly/labels.js +126 -0
- package/dist/assembly/layout.d.ts +158 -0
- package/dist/assembly/layout.js +175 -0
- package/dist/chrome/StatusChrome.svelte +125 -0
- package/dist/chrome/StatusChrome.svelte.d.ts +16 -0
- package/dist/chrome/ToolRail.svelte +293 -0
- package/dist/chrome/ToolRail.svelte.d.ts +26 -0
- package/dist/chrome/chrome-state.svelte.d.ts +63 -0
- package/dist/chrome/chrome-state.svelte.js +158 -0
- package/dist/chrome/theme-css.d.ts +16 -0
- package/dist/chrome/theme-css.js +16 -0
- package/dist/codemod/cli.d.ts +16 -0
- package/dist/codemod/cli.js +150 -0
- package/dist/codemod/edits.d.ts +28 -0
- package/dist/codemod/edits.js +36 -0
- package/dist/codemod/index.d.ts +10 -0
- package/dist/codemod/index.js +10 -0
- package/dist/codemod/migrate-plot-props-rewrite.d.ts +86 -0
- package/dist/codemod/migrate-plot-props-rewrite.js +228 -0
- package/dist/codemod/migrate-plot-props.d.ts +38 -0
- package/dist/codemod/migrate-plot-props.js +159 -0
- package/dist/coord/Coord.svelte +21 -0
- package/dist/coord/Coord.svelte.d.ts +16 -0
- package/dist/coord/CoordCartesian.svelte +11 -0
- package/dist/coord/CoordCartesian.svelte.d.ts +18 -0
- package/dist/coord/CoordFixed.svelte +17 -0
- package/dist/coord/CoordFixed.svelte.d.ts +10 -0
- package/dist/coord/CoordFlip.svelte +11 -0
- package/dist/coord/CoordFlip.svelte.d.ts +18 -0
- package/dist/coord/CoordPolar.svelte +16 -0
- package/dist/coord/CoordPolar.svelte.d.ts +9 -0
- package/dist/coord/CoordRadial.svelte +16 -0
- package/dist/coord/CoordRadial.svelte.d.ts +9 -0
- package/dist/coord/CoordSf.svelte +16 -0
- package/dist/coord/CoordSf.svelte.d.ts +9 -0
- package/dist/coord/CoordTransform.svelte +16 -0
- package/dist/coord/CoordTransform.svelte.d.ts +9 -0
- package/dist/data/index.d.ts +1 -0
- package/dist/data/index.js +2 -0
- package/dist/diagnostics/composition.d.ts +112 -0
- package/dist/diagnostics/composition.js +203 -0
- package/dist/diagnostics/deprecation.d.ts +58 -0
- package/dist/diagnostics/deprecation.js +27 -0
- package/dist/diagnostics/plot-engine-diagnostics.svelte.d.ts +44 -0
- package/dist/diagnostics/plot-engine-diagnostics.svelte.js +193 -0
- package/dist/facet/Facet.svelte +23 -0
- package/dist/facet/Facet.svelte.d.ts +16 -0
- package/dist/facet/FacetGrid.svelte +32 -0
- package/dist/facet/FacetGrid.svelte.d.ts +16 -0
- package/dist/facet/FacetWrap.svelte +32 -0
- package/dist/facet/FacetWrap.svelte.d.ts +16 -0
- package/dist/fonts/RobotoCondensed-Bold.ttf +0 -0
- package/dist/fonts/RobotoCondensed-Light.ttf +0 -0
- package/dist/fonts/RobotoCondensed-Regular.ttf +0 -0
- package/dist/fonts/THIRD_PARTY_NOTICES.txt +416 -0
- package/dist/geoms/GeomAbline.svelte +25 -0
- package/dist/geoms/GeomAbline.svelte.d.ts +7 -0
- package/dist/geoms/GeomArea.svelte +12 -0
- package/dist/geoms/GeomArea.svelte.d.ts +7 -0
- package/dist/geoms/GeomBar.svelte +12 -0
- package/dist/geoms/GeomBar.svelte.d.ts +7 -0
- package/dist/geoms/GeomBin2d.svelte +21 -0
- package/dist/geoms/GeomBin2d.svelte.d.ts +7 -0
- package/dist/geoms/GeomBlank.svelte +12 -0
- package/dist/geoms/GeomBlank.svelte.d.ts +7 -0
- package/dist/geoms/GeomBoxplot.svelte +25 -0
- package/dist/geoms/GeomBoxplot.svelte.d.ts +7 -0
- package/dist/geoms/GeomCol.svelte +12 -0
- package/dist/geoms/GeomCol.svelte.d.ts +7 -0
- package/dist/geoms/GeomContour.svelte +25 -0
- package/dist/geoms/GeomContour.svelte.d.ts +7 -0
- package/dist/geoms/GeomCount.svelte +12 -0
- package/dist/geoms/GeomCount.svelte.d.ts +7 -0
- package/dist/geoms/GeomCrossbar.svelte +25 -0
- package/dist/geoms/GeomCrossbar.svelte.d.ts +7 -0
- package/dist/geoms/GeomCurve.svelte +21 -0
- package/dist/geoms/GeomCurve.svelte.d.ts +7 -0
- package/dist/geoms/GeomDensity.svelte +25 -0
- package/dist/geoms/GeomDensity.svelte.d.ts +7 -0
- package/dist/geoms/GeomDensity2d.svelte +25 -0
- package/dist/geoms/GeomDensity2d.svelte.d.ts +7 -0
- package/dist/geoms/GeomDensity2dFilled.svelte +25 -0
- package/dist/geoms/GeomDensity2dFilled.svelte.d.ts +7 -0
- package/dist/geoms/GeomDotplot.svelte +25 -0
- package/dist/geoms/GeomDotplot.svelte.d.ts +7 -0
- package/dist/geoms/GeomErrorbar.svelte +25 -0
- package/dist/geoms/GeomErrorbar.svelte.d.ts +7 -0
- package/dist/geoms/GeomFreqpoly.svelte +25 -0
- package/dist/geoms/GeomFreqpoly.svelte.d.ts +7 -0
- package/dist/geoms/GeomFunction.svelte +25 -0
- package/dist/geoms/GeomFunction.svelte.d.ts +7 -0
- package/dist/geoms/GeomHex.svelte +21 -0
- package/dist/geoms/GeomHex.svelte.d.ts +7 -0
- package/dist/geoms/GeomHistogram.svelte +25 -0
- package/dist/geoms/GeomHistogram.svelte.d.ts +7 -0
- package/dist/geoms/GeomHline.svelte +12 -0
- package/dist/geoms/GeomHline.svelte.d.ts +7 -0
- package/dist/geoms/GeomJitter.svelte +35 -0
- package/dist/geoms/GeomJitter.svelte.d.ts +13 -0
- package/dist/geoms/GeomLabel.svelte +12 -0
- package/dist/geoms/GeomLabel.svelte.d.ts +7 -0
- package/dist/geoms/GeomLine.svelte +12 -0
- package/dist/geoms/GeomLine.svelte.d.ts +7 -0
- package/dist/geoms/GeomLinerange.svelte +25 -0
- package/dist/geoms/GeomLinerange.svelte.d.ts +7 -0
- package/dist/geoms/GeomMap.svelte +21 -0
- package/dist/geoms/GeomMap.svelte.d.ts +7 -0
- package/dist/geoms/GeomPath.svelte +12 -0
- package/dist/geoms/GeomPath.svelte.d.ts +7 -0
- package/dist/geoms/GeomPoint.svelte +12 -0
- package/dist/geoms/GeomPoint.svelte.d.ts +7 -0
- package/dist/geoms/GeomPointrange.svelte +25 -0
- package/dist/geoms/GeomPointrange.svelte.d.ts +7 -0
- package/dist/geoms/GeomPolygon.svelte +25 -0
- package/dist/geoms/GeomPolygon.svelte.d.ts +7 -0
- package/dist/geoms/GeomQq.svelte +21 -0
- package/dist/geoms/GeomQq.svelte.d.ts +7 -0
- package/dist/geoms/GeomQqLine.svelte +25 -0
- package/dist/geoms/GeomQqLine.svelte.d.ts +7 -0
- package/dist/geoms/GeomQuantile.svelte +25 -0
- package/dist/geoms/GeomQuantile.svelte.d.ts +7 -0
- package/dist/geoms/GeomRaster.svelte +25 -0
- package/dist/geoms/GeomRaster.svelte.d.ts +7 -0
- package/dist/geoms/GeomRect.svelte +12 -0
- package/dist/geoms/GeomRect.svelte.d.ts +7 -0
- package/dist/geoms/GeomRibbon.svelte +16 -0
- package/dist/geoms/GeomRibbon.svelte.d.ts +7 -0
- package/dist/geoms/GeomRug.svelte +21 -0
- package/dist/geoms/GeomRug.svelte.d.ts +7 -0
- package/dist/geoms/GeomRule.svelte +12 -0
- package/dist/geoms/GeomRule.svelte.d.ts +7 -0
- package/dist/geoms/GeomSegment.svelte +16 -0
- package/dist/geoms/GeomSegment.svelte.d.ts +7 -0
- package/dist/geoms/GeomSf.svelte +21 -0
- package/dist/geoms/GeomSf.svelte.d.ts +7 -0
- package/dist/geoms/GeomSfLabel.svelte +25 -0
- package/dist/geoms/GeomSfLabel.svelte.d.ts +7 -0
- package/dist/geoms/GeomSfText.svelte +25 -0
- package/dist/geoms/GeomSfText.svelte.d.ts +7 -0
- package/dist/geoms/GeomSmooth.svelte +25 -0
- package/dist/geoms/GeomSmooth.svelte.d.ts +7 -0
- package/dist/geoms/GeomSpoke.svelte +21 -0
- package/dist/geoms/GeomSpoke.svelte.d.ts +7 -0
- package/dist/geoms/GeomStep.svelte +12 -0
- package/dist/geoms/GeomStep.svelte.d.ts +7 -0
- package/dist/geoms/GeomText.svelte +12 -0
- package/dist/geoms/GeomText.svelte.d.ts +7 -0
- package/dist/geoms/GeomTile.svelte +21 -0
- package/dist/geoms/GeomTile.svelte.d.ts +7 -0
- package/dist/geoms/GeomViolin.svelte +25 -0
- package/dist/geoms/GeomViolin.svelte.d.ts +7 -0
- package/dist/geoms/GeomVline.svelte +12 -0
- package/dist/geoms/GeomVline.svelte.d.ts +7 -0
- package/dist/geoms/factory.svelte.d.ts +41 -0
- package/dist/geoms/factory.svelte.js +60 -0
- package/dist/geoms/registry.svelte.d.ts +71 -0
- package/dist/geoms/registry.svelte.js +177 -0
- package/dist/guides/GuideAxis.svelte +20 -0
- package/dist/guides/GuideAxis.svelte.d.ts +14 -0
- package/dist/guides/GuideColorbar.svelte +22 -0
- package/dist/guides/GuideColorbar.svelte.d.ts +13 -0
- package/dist/guides/GuideColorsteps.svelte +22 -0
- package/dist/guides/GuideColorsteps.svelte.d.ts +13 -0
- package/dist/guides/GuideLegend.svelte +90 -0
- package/dist/guides/GuideLegend.svelte.d.ts +37 -0
- package/dist/guides/GuideNone.svelte +19 -0
- package/dist/guides/GuideNone.svelte.d.ts +7 -0
- package/dist/guides/Guides.svelte +14 -0
- package/dist/guides/Guides.svelte.d.ts +13 -0
- package/dist/guides/factory.svelte.d.ts +36 -0
- package/dist/guides/factory.svelte.js +15 -0
- package/dist/index.d.ts +418 -0
- package/dist/index.js +376 -0
- package/dist/inspection/Inspect.svelte +71 -0
- package/dist/inspection/Inspect.svelte.d.ts +36 -0
- package/dist/inspection/Tooltip.svelte +439 -0
- package/dist/inspection/Tooltip.svelte.d.ts +32 -0
- package/dist/inspection/apply.d.ts +120 -0
- package/dist/inspection/apply.js +99 -0
- package/dist/inspection/coordinator.d.ts +51 -0
- package/dist/inspection/coordinator.js +354 -0
- package/dist/inspection/display-members.d.ts +1 -0
- package/dist/inspection/display-members.js +2 -0
- package/dist/inspection/frame.d.ts +90 -0
- package/dist/inspection/frame.js +76 -0
- package/dist/inspection/group-total.d.ts +1 -0
- package/dist/inspection/group-total.js +2 -0
- package/dist/inspection/inspect-guide-axes.d.ts +10 -0
- package/dist/inspection/inspect-guide-axes.js +24 -0
- package/dist/inspection/inspection-reconcile.svelte.d.ts +37 -0
- package/dist/inspection/inspection-reconcile.svelte.js +33 -0
- package/dist/inspection/inspection-state.svelte.d.ts +86 -0
- package/dist/inspection/inspection-state.svelte.js +347 -0
- package/dist/inspection/inspection-traversal.svelte.d.ts +29 -0
- package/dist/inspection/inspection-traversal.svelte.js +52 -0
- package/dist/inspection/pointer-inspect.d.ts +74 -0
- package/dist/inspection/pointer-inspect.js +158 -0
- package/dist/inspection/resolver.d.ts +3 -0
- package/dist/inspection/resolver.js +4 -0
- package/dist/inspection/teardown.d.ts +199 -0
- package/dist/inspection/teardown.js +181 -0
- package/dist/inspection/tooltip-chrome.d.ts +19 -0
- package/dist/inspection/tooltip-chrome.js +17 -0
- package/dist/inspection/tooltip-motion.d.ts +25 -0
- package/dist/inspection/tooltip-motion.js +32 -0
- package/dist/inspection/tooltip-presence.svelte.d.ts +49 -0
- package/dist/inspection/tooltip-presence.svelte.js +110 -0
- package/dist/inspection/tooltip-total.d.ts +1 -0
- package/dist/inspection/tooltip-total.js +2 -0
- package/dist/interaction/capability-resolution.svelte.d.ts +42 -0
- package/dist/interaction/capability-resolution.svelte.js +40 -0
- package/dist/interaction/capability.d.ts +129 -0
- package/dist/interaction/capability.js +134 -0
- package/dist/interaction/controller.svelte.d.ts +4 -0
- package/dist/interaction/controller.svelte.js +43 -0
- package/dist/interaction/inspect-geom-advisories.d.ts +10 -0
- package/dist/interaction/inspect-geom-advisories.js +10 -0
- package/dist/interaction/interaction-context.svelte.d.ts +57 -0
- package/dist/interaction/interaction-context.svelte.js +4 -0
- package/dist/interaction/interaction-diagnostics.d.ts +11 -0
- package/dist/interaction/interaction-diagnostics.js +173 -0
- package/dist/interaction/interaction-states.svelte.d.ts +84 -0
- package/dist/interaction/interaction-states.svelte.js +55 -0
- package/dist/interaction/interaction.d.ts +304 -0
- package/dist/interaction/interaction.js +7 -0
- package/dist/interaction/normalize-interaction-config.d.ts +9 -0
- package/dist/interaction/normalize-interaction-config.js +112 -0
- package/dist/interaction/reducer.d.ts +97 -0
- package/dist/interaction/reducer.js +117 -0
- package/dist/interaction/resolve-inspect-capability.d.ts +40 -0
- package/dist/interaction/resolve-inspect-capability.js +50 -0
- package/dist/interaction/scoped-store.svelte.d.ts +73 -0
- package/dist/interaction/scoped-store.svelte.js +93 -0
- package/dist/interaction/target.d.ts +91 -0
- package/dist/interaction/target.js +68 -0
- package/dist/interaction/transition-owner.d.ts +19 -0
- package/dist/interaction/transition-owner.js +10 -0
- package/dist/interaction/wiring-advisories.d.ts +33 -0
- package/dist/interaction/wiring-advisories.js +46 -0
- package/dist/interval/BoundsEditor.svelte +332 -0
- package/dist/interval/BoundsEditor.svelte.d.ts +10 -0
- package/dist/interval/bounds-editor.d.ts +1 -0
- package/dist/interval/bounds-editor.js +2 -0
- package/dist/interval/consumption.d.ts +1 -0
- package/dist/interval/consumption.js +2 -0
- package/dist/interval/interval-bounds-state.svelte.d.ts +53 -0
- package/dist/interval/interval-bounds-state.svelte.js +117 -0
- package/dist/interval/interval-state-helpers.d.ts +10 -0
- package/dist/interval/interval-state-helpers.js +34 -0
- package/dist/interval/interval-state.svelte.d.ts +60 -0
- package/dist/interval/interval-state.svelte.js +360 -0
- package/dist/interval/interval.d.ts +1 -0
- package/dist/interval/interval.js +2 -0
- package/dist/interval/precise-bounds.d.ts +1 -0
- package/dist/interval/precise-bounds.js +2 -0
- package/dist/interval/query.d.ts +1 -0
- package/dist/interval/query.js +2 -0
- package/dist/labs/Labs.svelte +29 -0
- package/dist/labs/Labs.svelte.d.ts +16 -0
- package/dist/layers/fold.d.ts +2 -0
- package/dist/layers/fold.js +1 -0
- package/dist/layers/grammar-families.d.ts +2 -0
- package/dist/layers/grammar-families.js +1 -0
- package/dist/layers/plot-layer-contract.d.ts +1 -0
- package/dist/layers/plot-layer-contract.js +29 -0
- package/dist/layers/plot-layer.svelte.d.ts +42 -0
- package/dist/layers/plot-layer.svelte.js +34 -0
- package/dist/layers/types.d.ts +2 -0
- package/dist/layers/types.js +1 -0
- package/dist/legend/Legend.svelte +24 -0
- package/dist/legend/Legend.svelte.d.ts +5 -0
- package/dist/legend/LegendFilters.svelte +196 -0
- package/dist/legend/LegendFilters.svelte.d.ts +8 -0
- package/dist/legend/LegendTargets.svelte +393 -0
- package/dist/legend/LegendTargets.svelte.d.ts +31 -0
- package/dist/legend/entry-key-index.d.ts +1 -0
- package/dist/legend/entry-key-index.js +2 -0
- package/dist/legend/entry-key-index.svelte.d.ts +34 -0
- package/dist/legend/entry-key-index.svelte.js +35 -0
- package/dist/legend/filter-state.svelte.d.ts +66 -0
- package/dist/legend/filter-state.svelte.js +284 -0
- package/dist/legend/filter.d.ts +1 -0
- package/dist/legend/filter.js +2 -0
- package/dist/legend/focus-emphasis.d.ts +72 -0
- package/dist/legend/focus-emphasis.js +91 -0
- package/dist/legend/focus-plans.d.ts +89 -0
- package/dist/legend/focus-plans.js +72 -0
- package/dist/legend/focus-reconcile.svelte.d.ts +53 -0
- package/dist/legend/focus-reconcile.svelte.js +113 -0
- package/dist/legend/focus-state.svelte.d.ts +73 -0
- package/dist/legend/focus-state.svelte.js +338 -0
- package/dist/legend/focus.d.ts +1 -0
- package/dist/legend/focus.js +2 -0
- package/dist/legend/resolve-legend-capability.d.ts +52 -0
- package/dist/legend/resolve-legend-capability.js +68 -0
- package/dist/legend/resolve-legend-filter.d.ts +65 -0
- package/dist/legend/resolve-legend-filter.js +54 -0
- package/dist/legend/resolve-legend-focus.d.ts +58 -0
- package/dist/legend/resolve-legend-focus.js +36 -0
- package/dist/legend/surface.d.ts +190 -0
- package/dist/legend/surface.js +158 -0
- package/dist/plot-engine-deriveds.svelte.d.ts +75 -0
- package/dist/plot-engine-deriveds.svelte.js +166 -0
- package/dist/plot-engine.svelte.d.ts +116 -0
- package/dist/plot-engine.svelte.js +316 -0
- package/dist/plot-props.d.ts +144 -0
- package/dist/plot-props.js +81 -0
- package/dist/runtime/announcer.svelte.d.ts +17 -0
- package/dist/runtime/announcer.svelte.js +28 -0
- package/dist/runtime/paint.d.ts +38 -0
- package/dist/runtime/paint.js +45 -0
- package/dist/runtime/resolve-datum-key.d.ts +53 -0
- package/dist/runtime/resolve-datum-key.js +73 -0
- package/dist/runtime/runtime.svelte.d.ts +37 -0
- package/dist/runtime/runtime.svelte.js +233 -0
- package/dist/runtime/semantic-candidate-projection.svelte.d.ts +29 -0
- package/dist/runtime/semantic-candidate-projection.svelte.js +137 -0
- package/dist/runtime/semantic-data-identity.d.ts +64 -0
- package/dist/runtime/semantic-data-identity.js +153 -0
- package/dist/runtime/semantic-keys-projection.d.ts +22 -0
- package/dist/runtime/semantic-keys-projection.js +40 -0
- package/dist/runtime/semantic-keys-resolve.d.ts +69 -0
- package/dist/runtime/semantic-keys-resolve.js +122 -0
- package/dist/runtime/semantic-keys.svelte.d.ts +30 -0
- package/dist/runtime/semantic-keys.svelte.js +69 -0
- package/dist/runtime/semantic-source-identity.d.ts +9 -0
- package/dist/runtime/semantic-source-identity.js +16 -0
- package/dist/scale/Scale.svelte +26 -0
- package/dist/scale/Scale.svelte.d.ts +21 -0
- package/dist/scale/ScaleAlphaBinned.svelte +14 -0
- package/dist/scale/ScaleAlphaBinned.svelte.d.ts +4 -0
- package/dist/scale/ScaleAlphaContinuous.svelte +14 -0
- package/dist/scale/ScaleAlphaContinuous.svelte.d.ts +4 -0
- package/dist/scale/ScaleAlphaDate.svelte +15 -0
- package/dist/scale/ScaleAlphaDate.svelte.d.ts +5 -0
- package/dist/scale/ScaleAlphaDatetime.svelte +15 -0
- package/dist/scale/ScaleAlphaDatetime.svelte.d.ts +5 -0
- package/dist/scale/ScaleAlphaDiscrete.svelte +14 -0
- package/dist/scale/ScaleAlphaDiscrete.svelte.d.ts +4 -0
- package/dist/scale/ScaleAlphaIdentity.svelte +14 -0
- package/dist/scale/ScaleAlphaIdentity.svelte.d.ts +4 -0
- package/dist/scale/ScaleAlphaManual.svelte +14 -0
- package/dist/scale/ScaleAlphaManual.svelte.d.ts +4 -0
- package/dist/scale/ScaleColorBinned.svelte +14 -0
- package/dist/scale/ScaleColorBinned.svelte.d.ts +3 -0
- package/dist/scale/ScaleColorBrewer.svelte +14 -0
- package/dist/scale/ScaleColorBrewer.svelte.d.ts +4 -0
- package/dist/scale/ScaleColorContinuous.svelte +14 -0
- package/dist/scale/ScaleColorContinuous.svelte.d.ts +4 -0
- package/dist/scale/ScaleColorDate.svelte +15 -0
- package/dist/scale/ScaleColorDate.svelte.d.ts +5 -0
- package/dist/scale/ScaleColorDatetime.svelte +15 -0
- package/dist/scale/ScaleColorDatetime.svelte.d.ts +5 -0
- package/dist/scale/ScaleColorDiscrete.svelte +14 -0
- package/dist/scale/ScaleColorDiscrete.svelte.d.ts +4 -0
- package/dist/scale/ScaleColorDistiller.svelte +14 -0
- package/dist/scale/ScaleColorDistiller.svelte.d.ts +4 -0
- package/dist/scale/ScaleColorFermenter.svelte +14 -0
- package/dist/scale/ScaleColorFermenter.svelte.d.ts +4 -0
- package/dist/scale/ScaleColorGradient.svelte +11 -0
- package/dist/scale/ScaleColorGradient.svelte.d.ts +4 -0
- package/dist/scale/ScaleColorGradient2.svelte +14 -0
- package/dist/scale/ScaleColorGradient2.svelte.d.ts +4 -0
- package/dist/scale/ScaleColorGradientn.svelte +14 -0
- package/dist/scale/ScaleColorGradientn.svelte.d.ts +4 -0
- package/dist/scale/ScaleColorGrey.svelte +11 -0
- package/dist/scale/ScaleColorGrey.svelte.d.ts +4 -0
- package/dist/scale/ScaleColorHue.svelte +11 -0
- package/dist/scale/ScaleColorHue.svelte.d.ts +4 -0
- package/dist/scale/ScaleColorIdentity.svelte +14 -0
- package/dist/scale/ScaleColorIdentity.svelte.d.ts +4 -0
- package/dist/scale/ScaleColorLog10.svelte +14 -0
- package/dist/scale/ScaleColorLog10.svelte.d.ts +4 -0
- package/dist/scale/ScaleColorManual.svelte +14 -0
- package/dist/scale/ScaleColorManual.svelte.d.ts +4 -0
- package/dist/scale/ScaleColorOrdinal.svelte +14 -0
- package/dist/scale/ScaleColorOrdinal.svelte.d.ts +3 -0
- package/dist/scale/ScaleColorSqrt.svelte +14 -0
- package/dist/scale/ScaleColorSqrt.svelte.d.ts +4 -0
- package/dist/scale/ScaleColorSteps.svelte +11 -0
- package/dist/scale/ScaleColorSteps.svelte.d.ts +4 -0
- package/dist/scale/ScaleColorSteps2.svelte +11 -0
- package/dist/scale/ScaleColorSteps2.svelte.d.ts +4 -0
- package/dist/scale/ScaleColorStepsn.svelte +11 -0
- package/dist/scale/ScaleColorStepsn.svelte.d.ts +4 -0
- package/dist/scale/ScaleColorViridisB.svelte +11 -0
- package/dist/scale/ScaleColorViridisB.svelte.d.ts +4 -0
- package/dist/scale/ScaleColorViridisC.svelte +11 -0
- package/dist/scale/ScaleColorViridisC.svelte.d.ts +4 -0
- package/dist/scale/ScaleColorViridisD.svelte +11 -0
- package/dist/scale/ScaleColorViridisD.svelte.d.ts +4 -0
- package/dist/scale/ScaleFillBinned.svelte +11 -0
- package/dist/scale/ScaleFillBinned.svelte.d.ts +3 -0
- package/dist/scale/ScaleFillBrewer.svelte +11 -0
- package/dist/scale/ScaleFillBrewer.svelte.d.ts +4 -0
- package/dist/scale/ScaleFillContinuous.svelte +14 -0
- package/dist/scale/ScaleFillContinuous.svelte.d.ts +4 -0
- package/dist/scale/ScaleFillDate.svelte +12 -0
- package/dist/scale/ScaleFillDate.svelte.d.ts +5 -0
- package/dist/scale/ScaleFillDatetime.svelte +15 -0
- package/dist/scale/ScaleFillDatetime.svelte.d.ts +5 -0
- package/dist/scale/ScaleFillDiscrete.svelte +14 -0
- package/dist/scale/ScaleFillDiscrete.svelte.d.ts +4 -0
- package/dist/scale/ScaleFillDistiller.svelte +14 -0
- package/dist/scale/ScaleFillDistiller.svelte.d.ts +4 -0
- package/dist/scale/ScaleFillFermenter.svelte +14 -0
- package/dist/scale/ScaleFillFermenter.svelte.d.ts +4 -0
- package/dist/scale/ScaleFillGradient.svelte +11 -0
- package/dist/scale/ScaleFillGradient.svelte.d.ts +4 -0
- package/dist/scale/ScaleFillGradient2.svelte +14 -0
- package/dist/scale/ScaleFillGradient2.svelte.d.ts +4 -0
- package/dist/scale/ScaleFillGradientn.svelte +14 -0
- package/dist/scale/ScaleFillGradientn.svelte.d.ts +4 -0
- package/dist/scale/ScaleFillGrey.svelte +11 -0
- package/dist/scale/ScaleFillGrey.svelte.d.ts +4 -0
- package/dist/scale/ScaleFillHue.svelte +11 -0
- package/dist/scale/ScaleFillHue.svelte.d.ts +4 -0
- package/dist/scale/ScaleFillIdentity.svelte +14 -0
- package/dist/scale/ScaleFillIdentity.svelte.d.ts +4 -0
- package/dist/scale/ScaleFillLog10.svelte +14 -0
- package/dist/scale/ScaleFillLog10.svelte.d.ts +4 -0
- package/dist/scale/ScaleFillManual.svelte +11 -0
- package/dist/scale/ScaleFillManual.svelte.d.ts +4 -0
- package/dist/scale/ScaleFillOrdinal.svelte +14 -0
- package/dist/scale/ScaleFillOrdinal.svelte.d.ts +3 -0
- package/dist/scale/ScaleFillSqrt.svelte +14 -0
- package/dist/scale/ScaleFillSqrt.svelte.d.ts +4 -0
- package/dist/scale/ScaleFillSteps.svelte +11 -0
- package/dist/scale/ScaleFillSteps.svelte.d.ts +4 -0
- package/dist/scale/ScaleFillSteps2.svelte +11 -0
- package/dist/scale/ScaleFillSteps2.svelte.d.ts +4 -0
- package/dist/scale/ScaleFillStepsn.svelte +11 -0
- package/dist/scale/ScaleFillStepsn.svelte.d.ts +4 -0
- package/dist/scale/ScaleFillViridisB.svelte +11 -0
- package/dist/scale/ScaleFillViridisB.svelte.d.ts +4 -0
- package/dist/scale/ScaleFillViridisC.svelte +11 -0
- package/dist/scale/ScaleFillViridisC.svelte.d.ts +4 -0
- package/dist/scale/ScaleFillViridisD.svelte +11 -0
- package/dist/scale/ScaleFillViridisD.svelte.d.ts +4 -0
- package/dist/scale/ScaleLinetypeBinned.svelte +15 -0
- package/dist/scale/ScaleLinetypeBinned.svelte.d.ts +4 -0
- package/dist/scale/ScaleLinetypeDiscrete.svelte +15 -0
- package/dist/scale/ScaleLinetypeDiscrete.svelte.d.ts +4 -0
- package/dist/scale/ScaleLinetypeIdentity.svelte +15 -0
- package/dist/scale/ScaleLinetypeIdentity.svelte.d.ts +4 -0
- package/dist/scale/ScaleLinetypeManual.svelte +15 -0
- package/dist/scale/ScaleLinetypeManual.svelte.d.ts +4 -0
- package/dist/scale/ScaleLinewidthBinned.svelte +14 -0
- package/dist/scale/ScaleLinewidthBinned.svelte.d.ts +4 -0
- package/dist/scale/ScaleLinewidthContinuous.svelte +14 -0
- package/dist/scale/ScaleLinewidthContinuous.svelte.d.ts +4 -0
- package/dist/scale/ScaleLinewidthDate.svelte +15 -0
- package/dist/scale/ScaleLinewidthDate.svelte.d.ts +5 -0
- package/dist/scale/ScaleLinewidthDatetime.svelte +15 -0
- package/dist/scale/ScaleLinewidthDatetime.svelte.d.ts +5 -0
- package/dist/scale/ScaleLinewidthDiscrete.svelte +14 -0
- package/dist/scale/ScaleLinewidthDiscrete.svelte.d.ts +4 -0
- package/dist/scale/ScaleLinewidthIdentity.svelte +14 -0
- package/dist/scale/ScaleLinewidthIdentity.svelte.d.ts +4 -0
- package/dist/scale/ScaleLinewidthManual.svelte +14 -0
- package/dist/scale/ScaleLinewidthManual.svelte.d.ts +4 -0
- package/dist/scale/ScaleRadius.svelte +11 -0
- package/dist/scale/ScaleRadius.svelte.d.ts +4 -0
- package/dist/scale/ScaleShapeBinned.svelte +15 -0
- package/dist/scale/ScaleShapeBinned.svelte.d.ts +4 -0
- package/dist/scale/ScaleShapeDiscrete.svelte +15 -0
- package/dist/scale/ScaleShapeDiscrete.svelte.d.ts +4 -0
- package/dist/scale/ScaleShapeIdentity.svelte +15 -0
- package/dist/scale/ScaleShapeIdentity.svelte.d.ts +4 -0
- package/dist/scale/ScaleShapeManual.svelte +15 -0
- package/dist/scale/ScaleShapeManual.svelte.d.ts +4 -0
- package/dist/scale/ScaleSizeArea.svelte +11 -0
- package/dist/scale/ScaleSizeArea.svelte.d.ts +4 -0
- package/dist/scale/ScaleSizeBinned.svelte +14 -0
- package/dist/scale/ScaleSizeBinned.svelte.d.ts +4 -0
- package/dist/scale/ScaleSizeBinnedArea.svelte +14 -0
- package/dist/scale/ScaleSizeBinnedArea.svelte.d.ts +4 -0
- package/dist/scale/ScaleSizeContinuous.svelte +14 -0
- package/dist/scale/ScaleSizeContinuous.svelte.d.ts +4 -0
- package/dist/scale/ScaleSizeDate.svelte +15 -0
- package/dist/scale/ScaleSizeDate.svelte.d.ts +5 -0
- package/dist/scale/ScaleSizeDatetime.svelte +15 -0
- package/dist/scale/ScaleSizeDatetime.svelte.d.ts +5 -0
- package/dist/scale/ScaleSizeDiscrete.svelte +14 -0
- package/dist/scale/ScaleSizeDiscrete.svelte.d.ts +4 -0
- package/dist/scale/ScaleSizeIdentity.svelte +14 -0
- package/dist/scale/ScaleSizeIdentity.svelte.d.ts +4 -0
- package/dist/scale/ScaleSizeManual.svelte +14 -0
- package/dist/scale/ScaleSizeManual.svelte.d.ts +4 -0
- package/dist/scale/ScaleXBinned.svelte +14 -0
- package/dist/scale/ScaleXBinned.svelte.d.ts +4 -0
- package/dist/scale/ScaleXContinuous.svelte +14 -0
- package/dist/scale/ScaleXContinuous.svelte.d.ts +4 -0
- package/dist/scale/ScaleXDate.svelte +12 -0
- package/dist/scale/ScaleXDate.svelte.d.ts +5 -0
- package/dist/scale/ScaleXDatetime.svelte +12 -0
- package/dist/scale/ScaleXDatetime.svelte.d.ts +5 -0
- package/dist/scale/ScaleXDiscrete.svelte +14 -0
- package/dist/scale/ScaleXDiscrete.svelte.d.ts +4 -0
- package/dist/scale/ScaleXLog10.svelte +14 -0
- package/dist/scale/ScaleXLog10.svelte.d.ts +4 -0
- package/dist/scale/ScaleXMonthDay.svelte +12 -0
- package/dist/scale/ScaleXMonthDay.svelte.d.ts +5 -0
- package/dist/scale/ScaleXReverse.svelte +15 -0
- package/dist/scale/ScaleXReverse.svelte.d.ts +4 -0
- package/dist/scale/ScaleXSqrt.svelte +14 -0
- package/dist/scale/ScaleXSqrt.svelte.d.ts +4 -0
- package/dist/scale/ScaleXTime.svelte +12 -0
- package/dist/scale/ScaleXTime.svelte.d.ts +5 -0
- package/dist/scale/ScaleYBinned.svelte +14 -0
- package/dist/scale/ScaleYBinned.svelte.d.ts +4 -0
- package/dist/scale/ScaleYContinuous.svelte +14 -0
- package/dist/scale/ScaleYContinuous.svelte.d.ts +4 -0
- package/dist/scale/ScaleYDate.svelte +12 -0
- package/dist/scale/ScaleYDate.svelte.d.ts +5 -0
- package/dist/scale/ScaleYDatetime.svelte +12 -0
- package/dist/scale/ScaleYDatetime.svelte.d.ts +5 -0
- package/dist/scale/ScaleYDiscrete.svelte +14 -0
- package/dist/scale/ScaleYDiscrete.svelte.d.ts +4 -0
- package/dist/scale/ScaleYLog10.svelte +14 -0
- package/dist/scale/ScaleYLog10.svelte.d.ts +4 -0
- package/dist/scale/ScaleYMonthDay.svelte +12 -0
- package/dist/scale/ScaleYMonthDay.svelte.d.ts +5 -0
- package/dist/scale/ScaleYReverse.svelte +15 -0
- package/dist/scale/ScaleYReverse.svelte.d.ts +4 -0
- package/dist/scale/ScaleYSqrt.svelte +14 -0
- package/dist/scale/ScaleYSqrt.svelte.d.ts +4 -0
- package/dist/scale/ScaleYTime.svelte +12 -0
- package/dist/scale/ScaleYTime.svelte.d.ts +5 -0
- package/dist/scene/Axis.svelte +159 -0
- package/dist/scene/Axis.svelte.d.ts +12 -0
- package/dist/scene/Batch.svelte +252 -0
- package/dist/scene/Batch.svelte.d.ts +23 -0
- package/dist/scene/InteractionOverlay.svelte +402 -0
- package/dist/scene/InteractionOverlay.svelte.d.ts +44 -0
- package/dist/scene/Legend.svelte +278 -0
- package/dist/scene/Legend.svelte.d.ts +8 -0
- package/dist/scene/MarkStrata.svelte +129 -0
- package/dist/scene/MarkStrata.svelte.d.ts +15 -0
- package/dist/scene/SceneOverlays.svelte +118 -0
- package/dist/scene/SceneOverlays.svelte.d.ts +49 -0
- package/dist/scene/SceneView.svelte +478 -0
- package/dist/scene/SceneView.svelte.d.ts +32 -0
- package/dist/scene/batch-presentation.svelte.d.ts +111 -0
- package/dist/scene/batch-presentation.svelte.js +207 -0
- package/dist/scene/geometry.d.ts +2 -0
- package/dist/scene/geometry.js +3 -0
- package/dist/scene/stratum-paint.d.ts +25 -0
- package/dist/scene/stratum-paint.js +40 -0
- package/dist/selection/selection-state.svelte.d.ts +23 -0
- package/dist/selection/selection-state.svelte.js +73 -0
- package/dist/selection/selection.d.ts +1 -0
- package/dist/selection/selection.js +2 -0
- package/dist/surface/CaptureSurface.svelte +109 -0
- package/dist/surface/CaptureSurface.svelte.d.ts +27 -0
- package/dist/surface/area-brush.d.ts +48 -0
- package/dist/surface/area-brush.js +44 -0
- package/dist/surface/brush-finish.d.ts +49 -0
- package/dist/surface/brush-finish.js +44 -0
- package/dist/surface/keyboard.d.ts +97 -0
- package/dist/surface/keyboard.js +105 -0
- package/dist/surface/pointer.d.ts +241 -0
- package/dist/surface/pointer.js +179 -0
- package/dist/surface/surface-description.d.ts +10 -0
- package/dist/surface/surface-description.js +11 -0
- package/dist/surface/surface-handlers.svelte.d.ts +53 -0
- package/dist/surface/surface-handlers.svelte.js +418 -0
- package/dist/surface/surface-state.svelte.d.ts +90 -0
- package/dist/surface/surface-state.svelte.js +161 -0
- package/dist/theme/Theme.svelte +27 -0
- package/dist/theme/Theme.svelte.d.ts +23 -0
- package/dist/theme/ThemeBase.svelte +13 -0
- package/dist/theme/ThemeBase.svelte.d.ts +8 -0
- package/dist/theme/ThemeBw.svelte +13 -0
- package/dist/theme/ThemeBw.svelte.d.ts +8 -0
- package/dist/theme/ThemeClassic.svelte +13 -0
- package/dist/theme/ThemeClassic.svelte.d.ts +8 -0
- package/dist/theme/ThemeClean.svelte +13 -0
- package/dist/theme/ThemeClean.svelte.d.ts +8 -0
- package/dist/theme/ThemeDark.svelte +13 -0
- package/dist/theme/ThemeDark.svelte.d.ts +8 -0
- package/dist/theme/ThemeDefault.svelte +13 -0
- package/dist/theme/ThemeDefault.svelte.d.ts +8 -0
- package/dist/theme/ThemeEconomist.svelte +13 -0
- package/dist/theme/ThemeEconomist.svelte.d.ts +8 -0
- package/dist/theme/ThemeEconomistwhite.svelte +13 -0
- package/dist/theme/ThemeEconomistwhite.svelte.d.ts +8 -0
- package/dist/theme/ThemeFew.svelte +13 -0
- package/dist/theme/ThemeFew.svelte.d.ts +8 -0
- package/dist/theme/ThemeFivethirtyeight.svelte +14 -0
- package/dist/theme/ThemeFivethirtyeight.svelte.d.ts +9 -0
- package/dist/theme/ThemeGgplot2.svelte +13 -0
- package/dist/theme/ThemeGgplot2.svelte.d.ts +8 -0
- package/dist/theme/ThemeGray.svelte +13 -0
- package/dist/theme/ThemeGray.svelte.d.ts +8 -0
- package/dist/theme/ThemeGrey.svelte +13 -0
- package/dist/theme/ThemeGrey.svelte.d.ts +8 -0
- package/dist/theme/ThemeHc.svelte +13 -0
- package/dist/theme/ThemeHc.svelte.d.ts +8 -0
- package/dist/theme/ThemeHcdark.svelte +13 -0
- package/dist/theme/ThemeHcdark.svelte.d.ts +8 -0
- package/dist/theme/ThemeHrbr.svelte +13 -0
- package/dist/theme/ThemeHrbr.svelte.d.ts +8 -0
- package/dist/theme/ThemeIgray.svelte +13 -0
- package/dist/theme/ThemeIgray.svelte.d.ts +8 -0
- package/dist/theme/ThemeLight.svelte +13 -0
- package/dist/theme/ThemeLight.svelte.d.ts +8 -0
- package/dist/theme/ThemeLinedraw.svelte +13 -0
- package/dist/theme/ThemeLinedraw.svelte.d.ts +8 -0
- package/dist/theme/ThemeMap.svelte +13 -0
- package/dist/theme/ThemeMap.svelte.d.ts +8 -0
- package/dist/theme/ThemeMinimal.svelte +13 -0
- package/dist/theme/ThemeMinimal.svelte.d.ts +8 -0
- package/dist/theme/ThemePander.svelte +13 -0
- package/dist/theme/ThemePander.svelte.d.ts +8 -0
- package/dist/theme/ThemeSolarized.svelte +13 -0
- package/dist/theme/ThemeSolarized.svelte.d.ts +8 -0
- package/dist/theme/ThemeSolarized2.svelte +13 -0
- package/dist/theme/ThemeSolarized2.svelte.d.ts +8 -0
- package/dist/theme/ThemeSolarized2dark.svelte +13 -0
- package/dist/theme/ThemeSolarized2dark.svelte.d.ts +8 -0
- package/dist/theme/ThemeSolarizeddark.svelte +14 -0
- package/dist/theme/ThemeSolarizeddark.svelte.d.ts +9 -0
- package/dist/theme/ThemeSolid.svelte +13 -0
- package/dist/theme/ThemeSolid.svelte.d.ts +8 -0
- package/dist/theme/ThemeStata.svelte +13 -0
- package/dist/theme/ThemeStata.svelte.d.ts +8 -0
- package/dist/theme/ThemeStatas1color.svelte +13 -0
- package/dist/theme/ThemeStatas1color.svelte.d.ts +8 -0
- package/dist/theme/ThemeTest.svelte +14 -0
- package/dist/theme/ThemeTest.svelte.d.ts +9 -0
- package/dist/theme/ThemeTufte.svelte +13 -0
- package/dist/theme/ThemeTufte.svelte.d.ts +8 -0
- package/dist/theme/ThemeVoid.svelte +14 -0
- package/dist/theme/ThemeVoid.svelte.d.ts +9 -0
- package/dist/theme/ThemeWsj.svelte +13 -0
- package/dist/theme/ThemeWsj.svelte.d.ts +8 -0
- package/dist/theme/factory.svelte.d.ts +36 -0
- package/dist/theme/factory.svelte.js +100 -0
- package/dist/zoom/zoom-state.svelte.d.ts +44 -0
- package/dist/zoom/zoom-state.svelte.js +121 -0
- package/dist/zoom/zoom.d.ts +1 -0
- package/dist/zoom/zoom.js +2 -0
- package/package.json +83 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inspection coordinator: two-slot memo (transient + pinned), semantic /
|
|
3
|
+
* presentation fingerprints, and pin rebind across layout/identity epochs.
|
|
4
|
+
*
|
|
5
|
+
* Snapshot materialization lives in `./resolver.ts`. This module owns identity
|
|
6
|
+
* tokens, cache keys, and the mutable coordinator factory only.
|
|
7
|
+
*/
|
|
8
|
+
import type { CandidateFacts, CellValue, RenderModel } from "@ggts-sh/core";
|
|
9
|
+
import type { InteractionSource, PlotInspectionChange } from "../interaction/interaction.js";
|
|
10
|
+
import { type InspectionSnapshotCompleteness, type ResolveInspectionInput } from "./resolver.js";
|
|
11
|
+
export interface CoordinatedInspectionInput<Row extends Record<string, CellValue>, Key extends PropertyKey> extends ResolveInspectionInput<Row, Key> {
|
|
12
|
+
/** Changes only when source identity/order changes, never for layout-only renders. */
|
|
13
|
+
readonly identityEpoch: PropertyKey;
|
|
14
|
+
/** Changes whenever layout/geometry changes. */
|
|
15
|
+
readonly layoutEpoch: PropertyKey;
|
|
16
|
+
/** Complete is required for pins, custom content, and public callbacks. */
|
|
17
|
+
readonly completeness?: InspectionSnapshotCompleteness;
|
|
18
|
+
}
|
|
19
|
+
export interface CoordinatedInspection<Row, Key> {
|
|
20
|
+
/** Internal seed retained by the chart-local coordinator, never emitted. */
|
|
21
|
+
readonly seed: CandidateFacts;
|
|
22
|
+
readonly snapshot: PlotInspectionChange<Row, Key>;
|
|
23
|
+
readonly semanticFingerprint: string;
|
|
24
|
+
readonly presentationIdentity: string;
|
|
25
|
+
readonly semanticChanged: boolean;
|
|
26
|
+
readonly presentationChanged: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Stable emit-dedupe token for inspection clear events.
|
|
30
|
+
* Non-clear emissions must use the coordinator's `semanticFingerprint`
|
|
31
|
+
* (type-aware key identity); hosts must not invent a second fingerprint.
|
|
32
|
+
*/
|
|
33
|
+
export declare function clearInspectionFingerprint(source: InteractionSource): string;
|
|
34
|
+
/**
|
|
35
|
+
* Internal adapter coordinator. It owns exactly one transient and one pinned
|
|
36
|
+
* immutable snapshot; replacement, release, and invalidation drop references
|
|
37
|
+
* immediately instead of growing a scene-wide rich-object cache.
|
|
38
|
+
*/
|
|
39
|
+
export declare function createInspectionCoordinator<Row extends Record<string, CellValue>, Key extends PropertyKey>(keyAt: (index: number) => Key | null): {
|
|
40
|
+
resolve: (input: Omit<CoordinatedInspectionInput<Row, Key>, "keyOf">) => CoordinatedInspection<Row, Key> | null;
|
|
41
|
+
reconcilePinned: (input: Readonly<{
|
|
42
|
+
model: RenderModel;
|
|
43
|
+
identityEpoch: PropertyKey;
|
|
44
|
+
layoutEpoch: PropertyKey;
|
|
45
|
+
source?: InteractionSource;
|
|
46
|
+
completeness?: InspectionSnapshotCompleteness;
|
|
47
|
+
}>) => CoordinatedInspection<Row, Key> | null;
|
|
48
|
+
release(slot: "transient" | "pinned"): void;
|
|
49
|
+
invalidate(): void;
|
|
50
|
+
readonly memoSize: number;
|
|
51
|
+
};
|
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
import { materializeInspection, resolvedTarget, selectTransientMembers, } from "./resolver.js";
|
|
2
|
+
import { compositionGroupTotal } from "./group-total.js";
|
|
3
|
+
/**
|
|
4
|
+
* Stable emit-dedupe token for inspection clear events.
|
|
5
|
+
* Non-clear emissions must use the coordinator's `semanticFingerprint`
|
|
6
|
+
* (type-aware key identity); hosts must not invent a second fingerprint.
|
|
7
|
+
*/
|
|
8
|
+
export function clearInspectionFingerprint(source) {
|
|
9
|
+
return `clear:${source}`;
|
|
10
|
+
}
|
|
11
|
+
const PRESENTATION_ORDERING_VERSION = 1;
|
|
12
|
+
function axisToken(token) {
|
|
13
|
+
if (token === null)
|
|
14
|
+
return "invalid";
|
|
15
|
+
return `${token.kind}:${String(token.value)}`;
|
|
16
|
+
}
|
|
17
|
+
function cellToken(value) {
|
|
18
|
+
if (value === null)
|
|
19
|
+
return "null";
|
|
20
|
+
if (value instanceof Date)
|
|
21
|
+
return `date:${value.getTime()}`;
|
|
22
|
+
if (typeof value === "number")
|
|
23
|
+
return `number:${Object.is(value, -0) ? 0 : value}`;
|
|
24
|
+
return `${typeof value}:${String(value)}`;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Stable cell payload for semantic fingerprints. Insertion order of Object.keys
|
|
28
|
+
* is used (no O(F log F) sort): same row object is stable; content-equal clones
|
|
29
|
+
* with different key order may re-emit (safe over-emit, not under-emit).
|
|
30
|
+
*/
|
|
31
|
+
function rowCellPayload(row) {
|
|
32
|
+
const parts = [];
|
|
33
|
+
for (const field of Object.keys(row)) {
|
|
34
|
+
parts.push(`${field}=${cellToken(row[field] ?? null)}`);
|
|
35
|
+
}
|
|
36
|
+
return parts.join(",");
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Per-batch role token within one layer's batches of the same geometry kind.
|
|
40
|
+
* Absolute scene batch indices can shift when unrelated layers change; the
|
|
41
|
+
* role still distinguishes composite pieces (smooth ribbon/line, boxplot
|
|
42
|
+
* whisker/median). Built once per model — O(B) prep, O(1) lookup (#1329).
|
|
43
|
+
*/
|
|
44
|
+
function buildBatchRoles(model) {
|
|
45
|
+
const batches = model.scene.batches;
|
|
46
|
+
const roles = [];
|
|
47
|
+
const ordinalByLayerKind = new Map();
|
|
48
|
+
for (let index = 0; index < batches.length; index++) {
|
|
49
|
+
const batch = batches[index];
|
|
50
|
+
const layerKind = `${String(batch.layerIndex)}\0${batch.kind}`;
|
|
51
|
+
const ordinal = ordinalByLayerKind.get(layerKind) ?? 0;
|
|
52
|
+
roles.push(`${batch.kind}:${ordinal}`);
|
|
53
|
+
ordinalByLayerKind.set(layerKind, ordinal + 1);
|
|
54
|
+
}
|
|
55
|
+
return roles;
|
|
56
|
+
}
|
|
57
|
+
/** O(1) role for a candidate against a precomputed per-model role table. */
|
|
58
|
+
function candidateBatchRole(model, candidate, roles) {
|
|
59
|
+
const batch = model.scene.batches[candidate.batchIndex];
|
|
60
|
+
if (batch === undefined ||
|
|
61
|
+
batch.layerIndex !== candidate.layerIndex ||
|
|
62
|
+
batch.kind !== candidate.kind)
|
|
63
|
+
return `${candidate.kind}:missing`;
|
|
64
|
+
return roles[candidate.batchIndex] ?? `${candidate.kind}:missing`;
|
|
65
|
+
}
|
|
66
|
+
function exactGroupTotalToken(mode, model, seed) {
|
|
67
|
+
if (mode !== "exact" && mode !== "xy")
|
|
68
|
+
return "";
|
|
69
|
+
return String(compositionGroupTotal(model, seed));
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Internal adapter coordinator. It owns exactly one transient and one pinned
|
|
73
|
+
* immutable snapshot; replacement, release, and invalidation drop references
|
|
74
|
+
* immediately instead of growing a scene-wide rich-object cache.
|
|
75
|
+
*/
|
|
76
|
+
export function createInspectionCoordinator(keyAt) {
|
|
77
|
+
let transient = null;
|
|
78
|
+
let pinned = null;
|
|
79
|
+
let lastSemanticFingerprint = null;
|
|
80
|
+
let lastPresentationIdentity = null;
|
|
81
|
+
let lastSlot = null;
|
|
82
|
+
/** Last model whose batch-role table is cached (identity compare). */
|
|
83
|
+
let batchRoleModel = null;
|
|
84
|
+
let batchRoles = [];
|
|
85
|
+
const rolesFor = (model) => {
|
|
86
|
+
if (batchRoleModel === model)
|
|
87
|
+
return batchRoles;
|
|
88
|
+
batchRoles = buildBatchRoles(model);
|
|
89
|
+
batchRoleModel = model;
|
|
90
|
+
return batchRoles;
|
|
91
|
+
};
|
|
92
|
+
const symbolIds = new Map();
|
|
93
|
+
const epochIds = new Map();
|
|
94
|
+
const epochToken = (value) => {
|
|
95
|
+
if (typeof value !== "symbol")
|
|
96
|
+
return `${typeof value}:${String(value)}`;
|
|
97
|
+
let id = epochIds.get(value);
|
|
98
|
+
if (id === undefined) {
|
|
99
|
+
id = epochIds.size;
|
|
100
|
+
epochIds.set(value, id);
|
|
101
|
+
}
|
|
102
|
+
return `symbol:${id}`;
|
|
103
|
+
};
|
|
104
|
+
const semanticKeyToken = (key, fallback) => {
|
|
105
|
+
if (key === null)
|
|
106
|
+
return fallback;
|
|
107
|
+
if (typeof key === "symbol") {
|
|
108
|
+
let id = symbolIds.get(key);
|
|
109
|
+
if (id === undefined) {
|
|
110
|
+
id = symbolIds.size;
|
|
111
|
+
symbolIds.set(key, id);
|
|
112
|
+
}
|
|
113
|
+
return `symbol:${id}`;
|
|
114
|
+
}
|
|
115
|
+
return `${typeof key}:${String(key)}`;
|
|
116
|
+
};
|
|
117
|
+
const resolve = (input) => {
|
|
118
|
+
const target = resolvedTarget(input.model, input.seed, input.mode);
|
|
119
|
+
if (target === null)
|
|
120
|
+
return null;
|
|
121
|
+
const completeness = input.state === "pinned" ? "complete" : (input.completeness ?? "transient");
|
|
122
|
+
// Pin/complete fingerprints the full group; transient matches materialize's
|
|
123
|
+
// top-k window so pointer inspect is O(min(M,8)·F), not O(M·F log F) (#1274).
|
|
124
|
+
const fingerprintMembers = completeness === "complete"
|
|
125
|
+
? target.members
|
|
126
|
+
: selectTransientMembers(target.members, target.group?.focusId ?? input.seed.id, {
|
|
127
|
+
groupAxis: input.mode === "y" ? "y" : "x",
|
|
128
|
+
});
|
|
129
|
+
const semanticMembers = fingerprintMembers.map((candidate) => {
|
|
130
|
+
const row = candidate.rowIndex === null ? null : input.model.row(candidate.rowIndex);
|
|
131
|
+
const key = row === null || candidate.rowIndex === null ? null : keyAt(candidate.rowIndex);
|
|
132
|
+
const fallback = `lineage:${input.model.lineage.keys(candidate.lineage).join(",")}`;
|
|
133
|
+
const payload = row === null
|
|
134
|
+
? `${axisToken(candidate.xToken)},${axisToken(candidate.yToken)}`
|
|
135
|
+
: rowCellPayload(row);
|
|
136
|
+
return `${semanticKeyToken(key, fallback)}{${payload}}`;
|
|
137
|
+
});
|
|
138
|
+
const focusRow = input.seed.rowIndex === null ? null : input.model.row(input.seed.rowIndex);
|
|
139
|
+
const focusKey = focusRow === null || input.seed.rowIndex === null ? null : keyAt(input.seed.rowIndex);
|
|
140
|
+
const focusIdentity = semanticKeyToken(focusKey, `lineage:${input.model.lineage.keys(input.seed.lineage).join(",")}`);
|
|
141
|
+
const logicalToken = input.mode === "x"
|
|
142
|
+
? axisToken(input.seed.xToken)
|
|
143
|
+
: input.mode === "y"
|
|
144
|
+
? axisToken(input.seed.yToken)
|
|
145
|
+
: `${axisToken(input.seed.xToken)}|${axisToken(input.seed.yToken)}`;
|
|
146
|
+
const semanticFingerprint = [
|
|
147
|
+
input.mode,
|
|
148
|
+
input.seed.panelId,
|
|
149
|
+
logicalToken,
|
|
150
|
+
focusIdentity,
|
|
151
|
+
semanticMembers.join(";"),
|
|
152
|
+
input.state,
|
|
153
|
+
exactGroupTotalToken(input.mode, input.model, input.seed),
|
|
154
|
+
].join("|");
|
|
155
|
+
const range = target.group?.range;
|
|
156
|
+
// Mirror fingerprintMembers: transient pinches presentation id to the same
|
|
157
|
+
// member window as materialize (layoutEpoch + range already cover the bucket).
|
|
158
|
+
const presentationMembers = fingerprintMembers;
|
|
159
|
+
const presentationIdentity = [
|
|
160
|
+
epochToken(input.layoutEpoch),
|
|
161
|
+
PRESENTATION_ORDERING_VERSION,
|
|
162
|
+
range === undefined
|
|
163
|
+
? `candidate:${input.seed.id}`
|
|
164
|
+
: `${range.axis}:${range.start}:${range.end}`,
|
|
165
|
+
presentationMembers
|
|
166
|
+
.map((candidate) => `${candidate.id}@${candidate.x},${candidate.y}`)
|
|
167
|
+
.join(";"),
|
|
168
|
+
].join("|");
|
|
169
|
+
const cacheKey = `${epochToken(input.layoutEpoch)}|${presentationIdentity}|${semanticFingerprint}|${completeness}|${input.source}`;
|
|
170
|
+
const current = input.state === "pinned" ? pinned : transient;
|
|
171
|
+
if (current?.key === cacheKey)
|
|
172
|
+
return current.value;
|
|
173
|
+
const snapshot = materializeInspection(input, target, completeness, keyAt);
|
|
174
|
+
const value = Object.freeze({
|
|
175
|
+
seed: input.seed,
|
|
176
|
+
snapshot,
|
|
177
|
+
semanticFingerprint,
|
|
178
|
+
presentationIdentity,
|
|
179
|
+
semanticChanged: semanticFingerprint !== lastSemanticFingerprint,
|
|
180
|
+
presentationChanged: presentationIdentity !== lastPresentationIdentity,
|
|
181
|
+
});
|
|
182
|
+
const slot = {
|
|
183
|
+
key: cacheKey,
|
|
184
|
+
value,
|
|
185
|
+
seedId: input.seed.id,
|
|
186
|
+
seedKey: focusKey,
|
|
187
|
+
seedRow: input.seed.rowIndex,
|
|
188
|
+
seedKind: input.seed.kind,
|
|
189
|
+
seedBatchRole: candidateBatchRole(input.model, input.seed, rolesFor(input.model)),
|
|
190
|
+
seedPrimitiveIndex: input.seed.primitiveIndex,
|
|
191
|
+
seedLogicalIdentity: `${axisToken(input.seed.xToken)}|${axisToken(input.seed.yToken)}|${input.model.lineage.keys(input.seed.lineage).join(",")}`,
|
|
192
|
+
layerIndex: input.seed.layerIndex,
|
|
193
|
+
identityEpoch: input.identityEpoch,
|
|
194
|
+
mode: input.mode,
|
|
195
|
+
};
|
|
196
|
+
if (input.state === "pinned")
|
|
197
|
+
pinned = slot;
|
|
198
|
+
else
|
|
199
|
+
transient = slot;
|
|
200
|
+
lastSemanticFingerprint = semanticFingerprint;
|
|
201
|
+
lastPresentationIdentity = presentationIdentity;
|
|
202
|
+
lastSlot = input.state === "pinned" ? "pinned" : "transient";
|
|
203
|
+
return value;
|
|
204
|
+
};
|
|
205
|
+
/** Keyless pin match: cheap filters then O(L) logical identity (#229). */
|
|
206
|
+
const keylessPinMatch = (model, prior, candidate, roles) => {
|
|
207
|
+
if (candidate.layerIndex !== prior.layerIndex)
|
|
208
|
+
return false;
|
|
209
|
+
if (candidate.rowIndex !== prior.seedRow)
|
|
210
|
+
return false;
|
|
211
|
+
if (candidate.kind !== prior.seedKind)
|
|
212
|
+
return false;
|
|
213
|
+
if (candidate.primitiveIndex !== prior.seedPrimitiveIndex)
|
|
214
|
+
return false;
|
|
215
|
+
if (candidateBatchRole(model, candidate, roles) !== prior.seedBatchRole)
|
|
216
|
+
return false;
|
|
217
|
+
const logicalIdentity = `${axisToken(candidate.xToken)}|${axisToken(candidate.yToken)}|${model.lineage.keys(candidate.lineage).join(",")}`;
|
|
218
|
+
return logicalIdentity === prior.seedLogicalIdentity;
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* Keyed pin match: layer + non-null row whose key equals the pinned key.
|
|
222
|
+
* Key first — `model.row` allocates a full Record (O(F)). Identity-change
|
|
223
|
+
* full-scans must not pay that for every candidate in the layer (#1318 /
|
|
224
|
+
* #1329). Live-row gate stays: key bag can outlive a dropped source index.
|
|
225
|
+
*/
|
|
226
|
+
const keyedPinMatch = (model, prior, candidate) => {
|
|
227
|
+
if (candidate.layerIndex !== prior.layerIndex || candidate.rowIndex === null)
|
|
228
|
+
return false;
|
|
229
|
+
if (keyAt(candidate.rowIndex) !== prior.seedKey)
|
|
230
|
+
return false;
|
|
231
|
+
return model.row(candidate.rowIndex) !== null;
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* Strict keyed rebind for the seedId fast path: key match plus kind / batch
|
|
235
|
+
* role / primitive (same filters as multi-match disambiguation). Same-epoch
|
|
236
|
+
* is not always pure layout — layer-prop swaps can keep the identity token
|
|
237
|
+
* while changing primitives that reuse an id (Codex #272 P2).
|
|
238
|
+
*/
|
|
239
|
+
const keyedPinRoleMatch = (model, prior, candidate, roles) => keyedPinMatch(model, prior, candidate) &&
|
|
240
|
+
candidate.kind === prior.seedKind &&
|
|
241
|
+
candidate.primitiveIndex === prior.seedPrimitiveIndex &&
|
|
242
|
+
candidateBatchRole(model, candidate, roles) === prior.seedBatchRole;
|
|
243
|
+
const preferredPinnedSeed = (model, prior, identityEpoch, roles) => {
|
|
244
|
+
if (prior.identityEpoch !== identityEpoch)
|
|
245
|
+
return null;
|
|
246
|
+
const preferred = model.candidates.candidate(prior.seedId);
|
|
247
|
+
if (preferred === null)
|
|
248
|
+
return null;
|
|
249
|
+
if (prior.seedKey === null)
|
|
250
|
+
return keylessPinMatch(model, prior, preferred, roles) ? preferred : null;
|
|
251
|
+
return keyedPinRoleMatch(model, prior, preferred, roles) ? preferred : null;
|
|
252
|
+
};
|
|
253
|
+
const uniqueKeylessPinnedSeed = (model, prior, roles) => {
|
|
254
|
+
const matches = [];
|
|
255
|
+
for (let id = 0; id < model.candidates.size; id++) {
|
|
256
|
+
const candidate = model.candidates.candidate(id);
|
|
257
|
+
if (candidate !== null && keylessPinMatch(model, prior, candidate, roles))
|
|
258
|
+
matches.push(candidate);
|
|
259
|
+
}
|
|
260
|
+
return matches.length === 1 ? matches[0] : null;
|
|
261
|
+
};
|
|
262
|
+
const uniqueKeyedPinnedSeed = (model, prior, roles) => {
|
|
263
|
+
const matches = [];
|
|
264
|
+
for (let id = 0; id < model.candidates.size; id++) {
|
|
265
|
+
const candidate = model.candidates.candidate(id);
|
|
266
|
+
if (candidate !== null && keyedPinMatch(model, prior, candidate))
|
|
267
|
+
matches.push(candidate);
|
|
268
|
+
}
|
|
269
|
+
if (matches.length === 1)
|
|
270
|
+
return matches[0];
|
|
271
|
+
if (matches.length < 2)
|
|
272
|
+
return null;
|
|
273
|
+
const sourceRows = new Set(matches.map((candidate) => candidate.rowIndex));
|
|
274
|
+
if (sourceRows.size !== 1)
|
|
275
|
+
return null;
|
|
276
|
+
const sameRole = matches.filter((candidate) => candidate.kind === prior.seedKind &&
|
|
277
|
+
candidateBatchRole(model, candidate, roles) === prior.seedBatchRole &&
|
|
278
|
+
candidate.primitiveIndex === prior.seedPrimitiveIndex);
|
|
279
|
+
return sameRole.length === 1 ? sameRole[0] : null;
|
|
280
|
+
};
|
|
281
|
+
const clearPinned = () => {
|
|
282
|
+
pinned = null;
|
|
283
|
+
if (lastSlot !== "pinned")
|
|
284
|
+
return;
|
|
285
|
+
lastSemanticFingerprint = null;
|
|
286
|
+
lastPresentationIdentity = null;
|
|
287
|
+
lastSlot = null;
|
|
288
|
+
};
|
|
289
|
+
const reconcilePinned = (input) => {
|
|
290
|
+
const prior = pinned;
|
|
291
|
+
if (prior === null)
|
|
292
|
+
return null;
|
|
293
|
+
const roles = rolesFor(input.model);
|
|
294
|
+
// Same identityEpoch: O(1) seedId revalidation when id + role still match.
|
|
295
|
+
// Keyed path requires kind/batch/primitive (not only layer+key) so geom
|
|
296
|
+
// swaps that reuse seedId cannot pin the wrong primitive. Fall through to
|
|
297
|
+
// full scan on miss. Identity-change keyed still full-scans for ambiguity;
|
|
298
|
+
// keyless identity-change clears immediately below.
|
|
299
|
+
let seed = preferredPinnedSeed(input.model, prior, input.identityEpoch, roles);
|
|
300
|
+
if (seed === null && prior.seedKey === null) {
|
|
301
|
+
if (prior.identityEpoch !== input.identityEpoch) {
|
|
302
|
+
clearPinned();
|
|
303
|
+
return null;
|
|
304
|
+
}
|
|
305
|
+
seed = uniqueKeylessPinnedSeed(input.model, prior, roles);
|
|
306
|
+
}
|
|
307
|
+
else {
|
|
308
|
+
seed ??= uniqueKeyedPinnedSeed(input.model, prior, roles);
|
|
309
|
+
}
|
|
310
|
+
if (seed === null) {
|
|
311
|
+
clearPinned();
|
|
312
|
+
return null;
|
|
313
|
+
}
|
|
314
|
+
return resolve({
|
|
315
|
+
model: input.model,
|
|
316
|
+
seed,
|
|
317
|
+
mode: prior.mode,
|
|
318
|
+
state: "pinned",
|
|
319
|
+
source: input.source ?? "programmatic",
|
|
320
|
+
identityEpoch: input.identityEpoch,
|
|
321
|
+
layoutEpoch: input.layoutEpoch,
|
|
322
|
+
completeness: input.completeness ?? "complete",
|
|
323
|
+
});
|
|
324
|
+
};
|
|
325
|
+
return {
|
|
326
|
+
resolve,
|
|
327
|
+
reconcilePinned,
|
|
328
|
+
release(slot) {
|
|
329
|
+
if (slot === "transient")
|
|
330
|
+
transient = null;
|
|
331
|
+
else
|
|
332
|
+
pinned = null;
|
|
333
|
+
if (lastSlot === slot) {
|
|
334
|
+
lastSemanticFingerprint = null;
|
|
335
|
+
lastPresentationIdentity = null;
|
|
336
|
+
lastSlot = null;
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
invalidate() {
|
|
340
|
+
transient = null;
|
|
341
|
+
pinned = null;
|
|
342
|
+
lastSemanticFingerprint = null;
|
|
343
|
+
lastPresentationIdentity = null;
|
|
344
|
+
lastSlot = null;
|
|
345
|
+
batchRoleModel = null;
|
|
346
|
+
batchRoles = [];
|
|
347
|
+
symbolIds.clear();
|
|
348
|
+
epochIds.clear();
|
|
349
|
+
},
|
|
350
|
+
get memoSize() {
|
|
351
|
+
return Number(transient !== null) + Number(pinned !== null);
|
|
352
|
+
},
|
|
353
|
+
};
|
|
354
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type TooltipAxisFormatters, formatTooltipCell, type TooltipFieldLabs, tooltipFieldLabel, fieldsForDefaultTooltip, defaultTooltipRows, tooltipDisplayPayloadToken, selectHoverDisplayMembers, collapseIdenticalDisplayMembers, } from "@ggts-sh/core/interaction";
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure decision tables for capture-surface inspection *frame* policy:
|
|
3
|
+
* pointer-move queue payloads and onPointerFrame routing.
|
|
4
|
+
* InspectionState owns queue mutation and setInspection side effects;
|
|
5
|
+
* these tables stay pure routing helpers.
|
|
6
|
+
*/
|
|
7
|
+
import type { CandidateFacts, CandidateMatch } from "@ggts-sh/core";
|
|
8
|
+
import type { InteractionSource } from "../interaction/interaction.js";
|
|
9
|
+
import type { InteractionCandidateRef } from "../interaction/reducer.js";
|
|
10
|
+
/** Host inspection lifecycle state used across pure inspection tables. */
|
|
11
|
+
export type InspectionHostState = "none" | "transient" | "pinned";
|
|
12
|
+
/**
|
|
13
|
+
* Host queue payload for pointer-move / touch-inspect frames and pending pin restore.
|
|
14
|
+
* `concreteMode` is present only when a nearest match supplied the mode.
|
|
15
|
+
* Candidate is the sole hit authority — no parallel SceneHit projection (#1038).
|
|
16
|
+
*/
|
|
17
|
+
export type QueuedPointerInspection = {
|
|
18
|
+
candidate: CandidateFacts | null;
|
|
19
|
+
source: InteractionSource;
|
|
20
|
+
concreteMode?: "exact" | "x" | "y" | "xy";
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Build the queued pointer-inspect payload.
|
|
24
|
+
* Match is a single object: mode and candidate always come from the same nearest hit.
|
|
25
|
+
*/
|
|
26
|
+
export declare function buildQueuedPointerInspection(input: {
|
|
27
|
+
readonly source: InteractionSource;
|
|
28
|
+
readonly match: CandidateMatch | null;
|
|
29
|
+
}): QueuedPointerInspection;
|
|
30
|
+
/**
|
|
31
|
+
* Cohesive queue-inspect frame payload for host `onPointerMove` queue-inspect.
|
|
32
|
+
*
|
|
33
|
+
* Owns the single `match === null` branch for hit resolution + reducer
|
|
34
|
+
* candidate ref (avoids three separate null checks / eager hitTest).
|
|
35
|
+
* `fallbackCandidate` is evaluated only on the path that needs it.
|
|
36
|
+
* Candidate `panelId` comes from the facts object (no scene index round-trip).
|
|
37
|
+
*/
|
|
38
|
+
export type QueuedInspectFrameBuild = {
|
|
39
|
+
readonly queued: QueuedPointerInspection;
|
|
40
|
+
readonly candidate: InspectionCandidateRef | null;
|
|
41
|
+
};
|
|
42
|
+
export declare function buildQueuedInspectFrame(input: {
|
|
43
|
+
readonly match: CandidateMatch | null;
|
|
44
|
+
readonly source: InteractionSource;
|
|
45
|
+
readonly epoch: number;
|
|
46
|
+
/** Evaluated only when match is null. */
|
|
47
|
+
readonly fallbackCandidate: () => CandidateFacts | null;
|
|
48
|
+
}): QueuedInspectFrameBuild;
|
|
49
|
+
export type QueuedInspectFrameInput = {
|
|
50
|
+
/** True when a snapshotted `queuedPointerInspection` payload exists. */
|
|
51
|
+
readonly hasPending: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Host: `token === null || reducer.accepts(token)`.
|
|
54
|
+
* Compute only after confirming a pending payload exists (or short-circuit
|
|
55
|
+
* so `reducer.accepts` is not called when `hasPending` is false).
|
|
56
|
+
*/
|
|
57
|
+
readonly tokenAccepted: boolean;
|
|
58
|
+
/** Current host inspection: null → `"none"`, else `inspection.state`. */
|
|
59
|
+
readonly currentState: InspectionHostState;
|
|
60
|
+
/**
|
|
61
|
+
* Host: `action.candidate !== null && action.candidate.epoch !== model?.runId`
|
|
62
|
+
* from the reducer frame action (not the queued candidate snapshot).
|
|
63
|
+
* When the frame action has no candidate, pass false.
|
|
64
|
+
*/
|
|
65
|
+
readonly candidateEpochMismatch: boolean;
|
|
66
|
+
};
|
|
67
|
+
export type QueuedInspectFrameAction = {
|
|
68
|
+
readonly type: "none";
|
|
69
|
+
} | {
|
|
70
|
+
readonly type: "drop";
|
|
71
|
+
} | {
|
|
72
|
+
readonly type: "stash-pending";
|
|
73
|
+
} | {
|
|
74
|
+
readonly type: "apply-pending";
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Pure decision for the inspect branch of `onInspectPointerFrame` after
|
|
78
|
+
* InspectionState has snapshotted and cleared queue fields.
|
|
79
|
+
*
|
|
80
|
+
* Priority:
|
|
81
|
+
* 1. none — !hasPending
|
|
82
|
+
* 2. drop — !tokenAccepted (stale frame token) → skip reducer dispatch
|
|
83
|
+
* 3. stash-pending — currentState === "pinned"
|
|
84
|
+
* 4. drop — candidateEpochMismatch → skip reducer dispatch
|
|
85
|
+
* 5. apply-pending
|
|
86
|
+
*/
|
|
87
|
+
export declare function resolveQueuedInspectFrameAction(input: QueuedInspectFrameInput): QueuedInspectFrameAction;
|
|
88
|
+
/** Reducer inspect payload candidate — same type as InteractionCandidateRef (#1080). */
|
|
89
|
+
type InspectionCandidateRef = InteractionCandidateRef;
|
|
90
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure decision tables for capture-surface inspection *frame* policy:
|
|
3
|
+
* pointer-move queue payloads and onPointerFrame routing.
|
|
4
|
+
* InspectionState owns queue mutation and setInspection side effects;
|
|
5
|
+
* these tables stay pure routing helpers.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Build the queued pointer-inspect payload.
|
|
9
|
+
* Match is a single object: mode and candidate always come from the same nearest hit.
|
|
10
|
+
*/
|
|
11
|
+
export function buildQueuedPointerInspection(input) {
|
|
12
|
+
if (input.match === null) {
|
|
13
|
+
return { candidate: null, source: input.source };
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
candidate: input.match,
|
|
17
|
+
source: input.source,
|
|
18
|
+
concreteMode: input.match.mode,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export function buildQueuedInspectFrame(input) {
|
|
22
|
+
if (input.match === null) {
|
|
23
|
+
const fallback = input.fallbackCandidate();
|
|
24
|
+
if (fallback === null)
|
|
25
|
+
return {
|
|
26
|
+
queued: { candidate: null, source: input.source },
|
|
27
|
+
candidate: null,
|
|
28
|
+
};
|
|
29
|
+
return {
|
|
30
|
+
queued: { candidate: fallback, source: input.source },
|
|
31
|
+
candidate: {
|
|
32
|
+
epoch: input.epoch,
|
|
33
|
+
id: fallback.id,
|
|
34
|
+
panelId: fallback.panelId,
|
|
35
|
+
x: fallback.x,
|
|
36
|
+
y: fallback.y,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
const match = input.match;
|
|
41
|
+
return {
|
|
42
|
+
queued: buildQueuedPointerInspection({
|
|
43
|
+
source: input.source,
|
|
44
|
+
match,
|
|
45
|
+
}),
|
|
46
|
+
candidate: {
|
|
47
|
+
epoch: input.epoch,
|
|
48
|
+
id: match.id,
|
|
49
|
+
panelId: match.panelId,
|
|
50
|
+
x: match.x,
|
|
51
|
+
y: match.y,
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Pure decision for the inspect branch of `onInspectPointerFrame` after
|
|
57
|
+
* InspectionState has snapshotted and cleared queue fields.
|
|
58
|
+
*
|
|
59
|
+
* Priority:
|
|
60
|
+
* 1. none — !hasPending
|
|
61
|
+
* 2. drop — !tokenAccepted (stale frame token) → skip reducer dispatch
|
|
62
|
+
* 3. stash-pending — currentState === "pinned"
|
|
63
|
+
* 4. drop — candidateEpochMismatch → skip reducer dispatch
|
|
64
|
+
* 5. apply-pending
|
|
65
|
+
*/
|
|
66
|
+
export function resolveQueuedInspectFrameAction(input) {
|
|
67
|
+
if (!input.hasPending)
|
|
68
|
+
return { type: "none" };
|
|
69
|
+
if (!input.tokenAccepted)
|
|
70
|
+
return { type: "drop" };
|
|
71
|
+
if (input.currentState === "pinned")
|
|
72
|
+
return { type: "stash-pending" };
|
|
73
|
+
if (input.candidateEpochMismatch)
|
|
74
|
+
return { type: "drop" };
|
|
75
|
+
return { type: "apply-pending" };
|
|
76
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { compositionGroupTotal } from "@ggts-sh/core/interaction";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ResolvedInspectMode } from "../interaction/interaction.js";
|
|
2
|
+
export type InspectGuideAxes = {
|
|
3
|
+
readonly vertical: boolean;
|
|
4
|
+
readonly horizontal: boolean;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Which screen-space crosshairs an inspect mode paints.
|
|
8
|
+
* `coord_flip` swaps x/y guides; exact paints none; xy paints both.
|
|
9
|
+
*/
|
|
10
|
+
export declare function inspectGuideAxes(mode: ResolvedInspectMode, flipped: boolean): InspectGuideAxes;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which screen-space crosshairs an inspect mode paints.
|
|
3
|
+
* `coord_flip` swaps x/y guides; exact paints none; xy paints both.
|
|
4
|
+
*/
|
|
5
|
+
export function inspectGuideAxes(mode, flipped) {
|
|
6
|
+
switch (mode) {
|
|
7
|
+
case "exact":
|
|
8
|
+
return { vertical: false, horizontal: false };
|
|
9
|
+
case "xy":
|
|
10
|
+
return { vertical: true, horizontal: true };
|
|
11
|
+
case "x":
|
|
12
|
+
return flipped
|
|
13
|
+
? { vertical: false, horizontal: true }
|
|
14
|
+
: { vertical: true, horizontal: false };
|
|
15
|
+
case "y":
|
|
16
|
+
return flipped
|
|
17
|
+
? { vertical: true, horizontal: false }
|
|
18
|
+
: { vertical: false, horizontal: true };
|
|
19
|
+
default: {
|
|
20
|
+
const unexpected = mode;
|
|
21
|
+
throw new TypeError(`unexpected inspect mode ${String(unexpected)}`);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scene-run inspection reconcile + coordinator disposal — construction-time
|
|
3
|
+
* effect registration extracted from inspection-state.svelte.ts for S5
|
|
4
|
+
* (plan §4).
|
|
5
|
+
*
|
|
6
|
+
* registerSceneInspectReconcile is invoked synchronously during
|
|
7
|
+
* createInspectionState construction so both $effects register during init
|
|
8
|
+
* (#627). It owns only the reconciledRun cursor. Rune state (inspection,
|
|
9
|
+
* seed), fingerprints, candidate IDs, and the dismissal latch remain in the
|
|
10
|
+
* inspection-state lexical owner; this module reads and mutates them only
|
|
11
|
+
* through the live ports. The plan/apply split stays in teardown.ts (pure) —
|
|
12
|
+
* this module is the $effect shell: plan + bag wiring.
|
|
13
|
+
*/
|
|
14
|
+
import type { RenderModel } from "@ggts-sh/core";
|
|
15
|
+
import type { InspectionHostState } from "./frame.js";
|
|
16
|
+
import { type SceneInspectReconcileBag } from "./teardown.js";
|
|
17
|
+
/**
|
|
18
|
+
* Live ports for the scene-run reconcile effect. Everything except `model`/
|
|
19
|
+
* `inspectEnabled`/`getInspectionState` is applied verbatim as the
|
|
20
|
+
* `SceneInspectReconcileBag`; `setReconciledRun` is owned here — the run
|
|
21
|
+
* cursor never leaves this module.
|
|
22
|
+
*/
|
|
23
|
+
export type SceneInspectReconcilePorts = Pick<SceneInspectReconcileBag, "clearInspection" | "setInspectionFromReconcile" | "setActiveCandidateId" | "clearDismissedLatch" | "dispatchSceneInvalidate" | "cancelPointerDiscardPending" | "clearPointerForSceneInvalidate" | "coordinatorInvalidate" | "releaseTransient" | "reconcilePinned" | "emitClearProgrammatic" | "emitSemanticChange"> & {
|
|
24
|
+
/** Effect dependency: model identity (runId) drives scene-run reconcile. */
|
|
25
|
+
readonly model: () => RenderModel | null;
|
|
26
|
+
/** Effect dependency: inspect enablement gates the clear-disabled plan. */
|
|
27
|
+
readonly inspectEnabled: () => boolean;
|
|
28
|
+
readonly dataIdentityEpoch: () => PropertyKey;
|
|
29
|
+
/** Thunk so same-run skip does not subscribe to hover inspection updates. */
|
|
30
|
+
readonly getInspectionState: () => InspectionHostState;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Register the coordinator-disposal + scene-run reconcile effects (formerly
|
|
34
|
+
* host-phased registerInspectionEffects — registered at construction, #627).
|
|
35
|
+
* Must be called synchronously during createInspectionState construction.
|
|
36
|
+
*/
|
|
37
|
+
export declare function registerSceneInspectReconcile(ports: SceneInspectReconcilePorts): void;
|