@simplex-viz/svg 0.0.0-stage → 0.1.1

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 SimplexViz Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,36 @@
1
- # Temporary Holding Version
1
+ # @simplex-viz/svg
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Framework-agnostic SVG rendering engine and pluggable `SvgNodeView` architecture for `@simplex-viz/core`. Zero dependency on React—embeds cleanly into Vanilla TypeScript, Vue, Angular, Svelte, and Web Components.
4
+
5
+ - **Live Demo:** <https://hackenberg.tech/simplex-viz/>
6
+ - **Source & Monorepo:** <https://github.com/ghackenberg/simplex-viz/tree/main/packages/svg>
7
+
8
+ ## Installation
9
+
10
+ ```bash
11
+ npm install @simplex-viz/core @simplex-viz/svg
12
+ ```
13
+
14
+ ## Included `SvgNodeView` Plugins
15
+
16
+ - `GeometricShapeSvgView` — Circle, rounded diamond, hexagon, and 5-point star with 64-point parametric SVG path morphing.
17
+ - `MultiSectorGlyphSvgView` — Multi-colored topic weight donut glyphs representing exact barycentric weights.
18
+ - `BadgeClusterSvgView` — Dynamic text badges with automatic offscreen `getBBox()` convex hull measurement.
19
+ - `ClusterAnchorSvgView` — Calibrated double-ring vertex anchors with code & member count.
20
+
21
+ ## Quickstart (Vanilla TS)
22
+
23
+ ```ts
24
+ import {
25
+ SimplexSvgController,
26
+ GeometricShapeSvgView,
27
+ ClusterAnchorSvgView,
28
+ } from '@simplex-viz/svg';
29
+
30
+ const controller = new SimplexSvgController(containerEl, {
31
+ items,
32
+ visualResolver,
33
+ contentView: new GeometricShapeSvgView(),
34
+ clusterView: new ClusterAnchorSvgView(),
35
+ });
36
+ ```
@@ -0,0 +1,78 @@
1
+ import { type CameraController, type ClusterDerivationContext, type ClusterDescriptor, type ClusterMetaConfig, type DefaultTaggedItem, type InteractionHandlers, type ItemIdentityConfig, type LayoutMetrics, type LayoutSolverOptions, type MeshOptions, type VisualResolver } from '@simplex-viz/core';
2
+ import { type SvgRendererOptions } from './SvgRendererAdapter';
3
+ export interface SimplexSvgControllerResolvedOptions<TItem = DefaultTaggedItem, TContentVisual = unknown, TClusterVisual = unknown, TTagMeta = undefined, TClusterMeta = undefined> {
4
+ readonly items: readonly TItem[];
5
+ readonly getId?: (item: TItem) => string;
6
+ readonly getTags?: (item: TItem) => readonly string[];
7
+ readonly deriveClusterMeta?: (ctx: ClusterDerivationContext<TItem, TTagMeta>) => TClusterMeta;
8
+ readonly visualResolver: VisualResolver<TItem, TContentVisual, TClusterVisual, TTagMeta, TClusterMeta>;
9
+ readonly contentView: SvgRendererOptions<TContentVisual, TClusterVisual>['contentView'];
10
+ readonly clusterView: SvgRendererOptions<TContentVisual, TClusterVisual>['clusterView'];
11
+ readonly normalizeTag?: (rawTag: string) => string;
12
+ readonly resolveTagMeta?: (normalizedTag: string) => TTagMeta | undefined;
13
+ readonly meshOptions?: MeshOptions;
14
+ readonly layoutOptions?: LayoutSolverOptions;
15
+ readonly showHulls?: boolean;
16
+ readonly interactions?: InteractionHandlers<TItem, TContentVisual, TClusterVisual, TTagMeta, TClusterMeta>;
17
+ readonly onMetricsChange?: (metrics: LayoutMetrics) => void;
18
+ readonly onClustersChange?: (clusters: readonly ClusterDescriptor<TItem, TTagMeta, TClusterMeta>[]) => void;
19
+ readonly onFpsUpdate?: (fps: number) => void;
20
+ }
21
+ export type SimplexSvgControllerOptions<TItem = DefaultTaggedItem, TContentVisual = unknown, TClusterVisual = unknown, TTagMeta = undefined, TClusterMeta = undefined> = ItemIdentityConfig<TItem> & ClusterMetaConfig<TItem, TTagMeta, TClusterMeta> & Omit<SimplexSvgControllerResolvedOptions<TItem, TContentVisual, TClusterVisual, TTagMeta, TClusterMeta>, 'getId' | 'getTags' | 'deriveClusterMeta'>;
22
+ /**
23
+ * High-level framework-agnostic SVG graph controller for Vanilla TypeScript, Vue, Angular,
24
+ * Svelte, Web Components, and `@simplex-viz/react`.
25
+ *
26
+ * Attaches centralized pointer, click, contextmenu, wheel, and drag-pan handlers solely on the
27
+ * root `<svg>` element and delegates hit-testing to `@simplex-viz/core`'s convex geometry solver.
28
+ */
29
+ export declare class SimplexSvgController<TItem = DefaultTaggedItem, TContentVisual = unknown, TClusterVisual = unknown, TTagMeta = undefined, TClusterMeta = undefined> {
30
+ private readonly containerEl;
31
+ private readonly svgEl;
32
+ private readonly adapter;
33
+ private readonly engine;
34
+ private readonly resizeObserver;
35
+ private readonly onFpsUpdate?;
36
+ private rafId;
37
+ private lastFrameTs;
38
+ private fpsSamples;
39
+ private fpsAccumMs;
40
+ private destroyed;
41
+ private isDraggingPan;
42
+ private dragStartX;
43
+ private dragStartY;
44
+ private dragMoved;
45
+ constructor(containerEl: HTMLElement, options: SimplexSvgControllerOptions<TItem, TContentVisual, TClusterVisual, TTagMeta, TClusterMeta>);
46
+ static createFromResolved<TItem = DefaultTaggedItem, TContentVisual = unknown, TClusterVisual = unknown, TTagMeta = undefined, TClusterMeta = undefined>(containerEl: HTMLElement, options: SimplexSvgControllerResolvedOptions<TItem, TContentVisual, TClusterVisual, TTagMeta, TClusterMeta>): SimplexSvgController<TItem, TContentVisual, TClusterVisual, TTagMeta, TClusterMeta>;
47
+ get camera(): CameraController;
48
+ getSvgElement(): SVGSVGElement;
49
+ getMetrics(): LayoutMetrics;
50
+ getClusters(): readonly ClusterDescriptor<TItem, TTagMeta, TClusterMeta>[];
51
+ getItems(): readonly TItem[];
52
+ addItems(items: TItem | readonly TItem[]): void;
53
+ removeItems(ids: string | readonly string[]): void;
54
+ setItems(items: readonly TItem[]): void;
55
+ setVisualResolver(resolver: VisualResolver<TItem, TContentVisual, TClusterVisual, TTagMeta, TClusterMeta>): void;
56
+ setViews(views: Partial<SvgRendererOptions<TContentVisual, TClusterVisual>>): void;
57
+ setSizeMultiplier(multiplier: number): void;
58
+ setShowHulls(show: boolean): void;
59
+ setInteractions(interactions: InteractionHandlers<TItem, TContentVisual, TClusterVisual, TTagMeta, TClusterMeta>): void;
60
+ setPinnedIds(ids: ReadonlySet<string> | readonly string[]): void;
61
+ setHighlightedIds(ids: ReadonlySet<string> | readonly string[]): void;
62
+ setFocusedClusterUid(clusterUid: string | null): void;
63
+ /** Deterministically advances simulation time in tests without waiting for rAF. */
64
+ stepForTest(dtMs: number): boolean;
65
+ private toLocalCoords;
66
+ private readonly onPointerDown;
67
+ private readonly onPointerMove;
68
+ private readonly onPointerUp;
69
+ private readonly onPointerLeave;
70
+ private readonly onClick;
71
+ private readonly onContextMenu;
72
+ private readonly onWheel;
73
+ private attachSvgListeners;
74
+ private detachSvgListeners;
75
+ private ensureLoopRunning;
76
+ destroy(): void;
77
+ }
78
+ //# sourceMappingURL=SimplexSvgController.d.ts.map
@@ -0,0 +1 @@
1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IAEF,OAAO,CAAC,QAAQ,CAAC,OAAO,CAgBtB;IAEF,OAAO,CAAC,QAAQ,CAAC,aAAa,CAe5B;IAEF,OAAO,CAAC,QAAQ,CAAC,OAAO,CActB;IAEF,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,iBAAiB;IA+BzB,OAAO,IAAI,IAAI,CAad;CACF"}
@@ -0,0 +1,48 @@
1
+ import { type ConvexGeometry, type SceneFrameSnapshot, type SimplexRendererAdapter } from '@simplex-viz/core';
2
+ import type { SvgNodeView } from './types';
3
+ export interface SvgRendererOptions<TContentVisual, TClusterVisual> {
4
+ readonly contentView: SvgNodeView<TContentVisual>;
5
+ readonly clusterView: SvgNodeView<TClusterVisual>;
6
+ }
7
+ /**
8
+ * Framework-agnostic SVG scene-graph renderer implementing `SimplexRendererAdapter`.
9
+ *
10
+ * Performs keyed `<g>` reconciliation, direct 60fps `transform`/`opacity` attribute updates,
11
+ * automatic offscreen `getBBox()` convex hull measurement, and universal Dual-Layer Crossfade
12
+ * (or optional parametric `morph()` when supported by the active `SvgNodeView`).
13
+ */
14
+ export declare class SvgRendererAdapter<TContentVisual, TClusterVisual> implements SimplexRendererAdapter<TContentVisual, TClusterVisual> {
15
+ private readonly svgEl;
16
+ private readonly doc;
17
+ private readonly worldGroup;
18
+ private readonly trianglesGroup;
19
+ private readonly edgesGroup;
20
+ private readonly clustersGroup;
21
+ private readonly itemsGroup;
22
+ private readonly hullsGroup;
23
+ private readonly measureBin;
24
+ private contentView;
25
+ private clusterView;
26
+ private readonly contentHullCache;
27
+ private readonly clusterHullCache;
28
+ private readonly contentViewByKey;
29
+ private readonly clusterViewByKey;
30
+ private readonly clusterDomMap;
31
+ private readonly itemDomMap;
32
+ private readonly trianglePolygons;
33
+ private readonly edgeLines;
34
+ constructor(svgEl: SVGSVGElement, options: SvgRendererOptions<TContentVisual, TClusterVisual>);
35
+ private createGroup;
36
+ /**
37
+ * Swaps active content and/or cluster `SvgNodeView` plugins at runtime and invalidates
38
+ * hull caches so the engine re-measures and smoothly crossfades into the new views.
39
+ */
40
+ setViews(views: Partial<SvgRendererOptions<TContentVisual, TClusterVisual>>): void;
41
+ measureContentHull(visual: TContentVisual, cacheKey: string): ConvexGeometry;
42
+ measureClusterHull(visual: TClusterVisual, cacheKey: string): ConvexGeometry;
43
+ renderFrame(snapshot: SceneFrameSnapshot<TContentVisual, TClusterVisual>): void;
44
+ private reconcileNodes;
45
+ private renderHullOverlay;
46
+ destroy(): void;
47
+ }
48
+ //# sourceMappingURL=SvgRendererAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SvgRendererAdapter.d.ts","sourceRoot":"","sources":["../src/SvgRendererAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC5B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,WAAW,kBAAkB,CAAC,cAAc,EAAE,cAAc;IAChE,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;IAClD,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;CACnD;AAqBD;;;;;;GAMG;AACH,qBAAa,kBAAkB,CAAC,cAAc,EAAE,cAAc,CAC5D,YAAW,sBAAsB,CAAC,cAAc,EAAE,cAAc,CAAC;IAEjE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAW;IAC/B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAc;IACzC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAc;IAC7C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAc;IACzC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAc;IAC5C,OAAO,CAAC,QAAQ,CAAC,UAAU,CA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+ * Measures the unscaled convex collision hull for a visual descriptor using either
6
+ * the view's analytical `measureConvexHull` or automatic offscreen `getBBox()` inspection.
7
+ */
8
+ export declare function measureVisualWithSvgView<TVisual>(view: SvgNodeView<TVisual>, visual: TVisual, cacheKey: string, rootSvg: SVGSVGElement, measureBin: SVGGElement, cache: Map<string, ConvexGeometry>): ConvexGeometry;
9
+ //# sourceMappingURL=hullMeasure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hullMeasure.d.ts","sourceRoot":"","sources":["../src/hullMeasure.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,MAAM,+BAA+B,CAAC;AAqCnD;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAC9C,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,EAC1B,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,WAAW,EACvB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,GACjC,cAAc,CA6DhB"}
@@ -0,0 +1,9 @@
1
+ export * from './types';
2
+ export * from './hullMeasure';
3
+ export * from './SvgRendererAdapter';
4
+ export * from './SimplexSvgController';
5
+ export * from './views/GeometricShapeSvgView';
6
+ export * from './views/MultiSectorGlyphSvgView';
7
+ export * from './views/BadgeClusterSvgView';
8
+ export * from './views/ClusterAnchorSvgView';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC"}