@simplex-viz/svg 0.1.3 → 0.2.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/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img src="https://raw.githubusercontent.com/ghackenberg/simplex-viz/main/docs/assets/logo-svg.png" width="640" alt="SimplexViz / svg — @simplex-viz/svg" />
2
+ <img src="https://raw.githubusercontent.com/ghackenberg/simplex-viz/main/docs/assets/logo-svg.png" width="525" alt="SimplexViz / svg — @simplex-viz/svg" />
3
3
  </p>
4
4
 
5
5
  # @simplex-viz/svg
@@ -30,23 +30,90 @@ While `@simplex-viz/core` computes pure spatial coordinates, `@simplex-viz/svg`
30
30
 
31
31
  ## Installation
32
32
 
33
- Install `@simplex-viz/core` alongside `@simplex-viz/svg` in any browser or TypeScript project:
33
+ Install `@simplex-viz/svg` alone (`@simplex-viz/core` is installed automatically and key utilities and types are re-exported directly from `@simplex-viz/svg`):
34
34
 
35
35
  ```bash
36
- npm install @simplex-viz/core @simplex-viz/svg
36
+ npm install @simplex-viz/svg
37
37
  ```
38
38
 
39
- ## Quickstart (Vanilla TypeScript)
39
+ ## Quickstart (Zero-Config)
40
+
41
+ ### One-Liner Mount (`createSimplexSvg`)
42
+
43
+ Pass a container `HTMLElement` or CSS selector together with an array of `{ id, tags }` items to `createSimplexSvg`. Drag-to-pan, cursor wheel zoom, cluster click-focus, and floating hover tooltips are enabled automatically:
44
+
45
+ ```ts
46
+ import { createSimplexSvg } from '@simplex-viz/svg';
47
+
48
+ const items = [
49
+ { id: '1', label: 'Simplex Mesh', tags: ['geometry', 'triangulation', 'math'] },
50
+ { id: '2', label: 'OKLab Mixing', tags: ['color', 'geometry', 'perception'] },
51
+ { id: '3', label: 'SAT Solver', tags: ['collision', 'geometry'] },
52
+ ];
53
+
54
+ const controller = createSimplexSvg('#graph', items);
55
+ ```
56
+
57
+ ### Presets, Labels & Custom Domain Records (`SimplexSvgController`)
58
+
59
+ When you want to pick a built-in visual preset (`'geometric'`, `'glyphs'`, or `'badges'`), display custom labels, or connect records without `{ id, tags }`, pass an options object to `createSimplexSvg` or `new SimplexSvgController(...)`:
60
+
61
+ ```ts
62
+ import { SimplexSvgController } from '@simplex-viz/svg';
63
+
64
+ interface Article {
65
+ readonly slug: string;
66
+ readonly headline: string;
67
+ readonly topics: readonly string[];
68
+ }
69
+
70
+ const controller = new SimplexSvgController('#graph', {
71
+ items: articles,
72
+ getId: (a) => a.slug,
73
+ getTags: (a) => a.topics,
74
+ getLabel: (a) => a.headline,
75
+ preset: 'glyphs', // 'geometric' | 'glyphs' | 'badges'
76
+ tooltip: true, // Built-in hover tooltip (or custom formatter)
77
+ });
78
+ ```
79
+
80
+ You can also format hover tooltips yourself without building separate DOM overlays:
81
+
82
+ ```ts
83
+ const controller = new SimplexSvgController('#graph', {
84
+ items: articles,
85
+ getId: (a) => a.slug,
86
+ getTags: (a) => a.topics,
87
+ preset: 'badges',
88
+ tooltip: (target) =>
89
+ target.kind === 'content'
90
+ ? `${target.item.headline} (${target.layoutContext.tags.length} tags)`
91
+ : `${target.cluster.defaultLabel}: ${target.cluster.members.length} articles`,
92
+ });
93
+ ```
94
+
95
+ Switch presets or mutate data smoothly at runtime—camera pan/zoom stays intact while springs retarget mid-flight:
96
+
97
+ ```ts
98
+ controller.setPreset('badges');
99
+ controller.addItems({ slug: 'new-1', headline: 'Dual-Layer Crossfade', topics: ['svg', 'animation'] });
100
+ controller.removeItems('old-slug');
101
+ controller.camera.reset();
102
+ ```
103
+
104
+ ## Progressive Customization: Custom `VisualResolver` & `SvgNodeView`
105
+
106
+ Whenever built-in presets are not specific enough, swap in your own `VisualResolver`, view plugins, or root-SVG event handlers without rewriting the container lifecycle.
40
107
 
41
108
  ### Step 1 — Define Your Domain Record & `VisualResolver`
42
109
 
43
- Start by describing your data model (`Bookmark`) and mapping each item and topic cluster into visual descriptors for `GeometricShapeSvgView` and `ClusterAnchorSvgView`. `ctx.mixedColorHex` provides the item's barycentric OKLab color blend automatically:
110
+ Map each item and topic cluster into typed descriptors for any `SvgNodeView` plugin. Notice that `VisualResolver` and descriptor types can be imported directly from `@simplex-viz/svg`:
44
111
 
45
112
  ```ts
46
- import type { VisualResolver } from '@simplex-viz/core';
47
113
  import type {
48
114
  ClusterAnchorVisual,
49
115
  GeometricShapeVisual,
116
+ VisualResolver,
50
117
  } from '@simplex-viz/svg';
51
118
 
52
119
  interface Bookmark {
@@ -82,9 +149,9 @@ const visualResolver: VisualResolver<
82
149
  };
83
150
  ```
84
151
 
85
- ### Step 2 — Mount `SimplexSvgController`
152
+ ### Step 2 — Mount `SimplexSvgController` with Custom Views
86
153
 
87
- Pass any container `HTMLElement` to `SimplexSvgController` along with `getId`, `getTags`, `visualResolver`, and the built-in views. The controller creates the root `<svg>`, attaches a `ResizeObserver`, computes the initial triangulation, and begins the 60 fps spring loop:
154
+ Pass `visualResolver` together with `contentView` and `clusterView` plugins. You can omit `interactions` to keep default cluster click-focus and cursor zoom, or override individual handlers below:
88
155
 
89
156
  ```ts
90
157
  import {
@@ -93,9 +160,7 @@ import {
93
160
  ClusterAnchorSvgView,
94
161
  } from '@simplex-viz/svg';
95
162
 
96
- const container = document.getElementById('graph')!;
97
-
98
- const controller = new SimplexSvgController(container, {
163
+ const controller = new SimplexSvgController('#graph', {
99
164
  items: myBookmarks,
100
165
  getId: (b) => b.url,
101
166
  getTags: (b) => b.topics,
@@ -110,9 +175,9 @@ const controller = new SimplexSvgController(container, {
110
175
  });
111
176
  ```
112
177
 
113
- ### Step 3 — Wire Hover, Click & Wheel Interactions
178
+ ### Step 3 — Override Hover, Click & Wheel Interactions
114
179
 
115
- Attach centralized pointer, click, context-menu, and wheel handlers via `setInteractions` (or pass `interactions` directly in the constructor). Listeners live exclusively on the root `<svg>`, while hit-testing uses exact convex hulls:
180
+ Attach custom click, context-menu, and wheel policies at any time via `setInteractions`. Setting `interactions.onLeftClick` overrides the default cluster click-focus toggle:
116
181
 
117
182
  ```ts
118
183
  controller.setInteractions({
@@ -136,23 +201,7 @@ controller.setInteractions({
136
201
  });
137
202
  ```
138
203
 
139
- ### Step 4 — Apply Live Mutations & Clean Up
140
-
141
- Mutate items or reset the camera smoothly at runtime without interrupting user navigation. Call `controller.destroy()` on unmount to stop animations and disconnect observers:
142
-
143
- ```ts
144
- controller.addItems({
145
- url: 'https://example.com/oklab',
146
- title: 'Perceptual Color Mixing',
147
- topics: ['oklab', 'color-science'],
148
- minutes: 12,
149
- });
150
- controller.removeItems('https://example.com/old');
151
- controller.camera.reset();
152
-
153
- // Call on component unmount / teardown:
154
- // controller.destroy();
155
- ```
204
+ Always call `controller.destroy()` when tearing down your component or view to cancel animations, clean up tooltips, and disconnect `ResizeObserver`.
156
205
 
157
206
  ## Built-In `SvgNodeView` Plugins
158
207
 
@@ -162,7 +211,6 @@ Renders `'circle' | 'diamond' | 'star' | 'hexagon'` with analytical convex hulls
162
211
  ```ts
163
212
  import type { GeometricShapeVisual } from '@simplex-viz/svg';
164
213
 
165
- // Descriptor shape:
166
214
  const visual: GeometricShapeVisual = {
167
215
  shape: 'hexagon', // 'circle' | 'diamond' | 'star' | 'hexagon'
168
216
  radius: 11,
@@ -222,11 +270,10 @@ const visual: ClusterAnchorVisual = {
222
270
 
223
271
  Implement `SvgNodeView<TVisual>` centered around local origin `(0, 0)`. `SvgRendererAdapter` handles world positioning `(x, y)`, solver scale `α`, opacity, and crossfading on the parent `<g>`.
224
272
 
225
- First, define your visual descriptor and an optional analytical hull via `measureConvexHull` (if omitted, `@simplex-viz/svg` automatically measures the rendered SVG via offscreen `getBBox()`):
273
+ First, define your visual descriptor and an optional analytical hull via `measureConvexHull` (re-exporting `rectToConvexPolygon` straight from `@simplex-viz/svg`, or omit `measureConvexHull` to measure automatically via offscreen `getBBox()`):
226
274
 
227
275
  ```ts
228
- import type { SvgNodeView } from '@simplex-viz/svg';
229
- import { rectToConvexPolygon } from '@simplex-viz/core';
276
+ import { rectToConvexPolygon, type SvgNodeView } from '@simplex-viz/svg';
230
277
 
231
278
  interface CardVisual {
232
279
  readonly title: string;
@@ -280,10 +327,15 @@ export const CustomCardSvgView: SvgNodeView<CardVisual> = {
280
327
  };
281
328
  ```
282
329
 
283
- ## `SimplexSvgController` API Summary
330
+ ## API Reference (`createSimplexSvg` & `SimplexSvgController`)
331
+
332
+ `SimplexSvgController(target, options)` accepts an `HTMLElement` or CSS selector string. `createSimplexSvg(target, itemsOrOptions)` accepts either a `{ id, tags }` array directly (with `tooltip: true`, cursor zoom, and cluster click-focus enabled) or any `SimplexSvgControllerOptions` object. `@simplex-viz/svg` also re-exports `solveSimplexSnapshot`, geometry hull helpers (`computeConvexHull`, `rectToConvexPolygon`, `regularPolygon`, `starConvexHull`), and core TypeScript types for single-import setups.
284
333
 
285
- | Method / Property | Description |
334
+ | Method / Option | Description |
286
335
  | --- | --- |
336
+ | `preset` / `setPreset(preset, getLabel?)` | Switches between `'geometric'`, `'glyphs'`, and `'badges'` with smooth transitions. |
337
+ | `tooltip` / `setTooltip(tooltip)` | Enables a floating DOM hover tooltip (`boolean` or `(target) => string` formatter). |
338
+ | `focusOnClusterClick` | Option (default `true`): toggles cluster focus on click when no custom `interactions.onLeftClick` is provided. |
287
339
  | `addItems(items)` | Appends one or more items and triggers an interruptible transition. |
288
340
  | `removeItems(ids)` | Removes items by ID and smoothly fades out exiting nodes. |
289
341
  | `setItems(items)` | Replaces the entire corpus while preserving matching clusters & items. |
@@ -293,12 +345,12 @@ export const CustomCardSvgView: SvgNodeView<CardVisual> = {
293
345
  | `setShowHulls(show)` | Toggles convex bounding hull wireframe overlays. |
294
346
  | `setPinnedIds(ids)` / `setHighlightedIds(ids)` | Controls pinned and highlighted visual emphasis states. |
295
347
  | `setFocusedClusterUid(uid \| null)` | Isolates a cluster and its members, dimming unrelated nodes. |
296
- | `setInteractions(handlers)` | Replaces pointer, click, and wheel callbacks dynamically. |
348
+ | `setInteractions(handlers)` | Replaces pointer, click, and wheel callbacks dynamically (`onWheel` defaults to `'zoom-to-cursor'`). |
297
349
  | `camera` | Exposes `CameraController` (`zoomToCursor`, `panBy`, `reset`, `getState`, `setState`). |
298
350
  | `getMetrics()` / `getClusters()` / `getItems()` | Reads live solver telemetry, clusters, and items. |
299
351
  | `getSvgElement()` | Returns the managed root `<svg>` element. |
300
352
  | `stepForTest(dtMs)` | Deterministically advances simulation time in unit/DOM tests. |
301
- | `destroy()` | Cancels `requestAnimationFrame`, disconnects `ResizeObserver`, and removes the `<svg>`. |
353
+ | `destroy()` | Cancels `requestAnimationFrame`, disconnects `ResizeObserver`, removes tooltips and `<svg>`. |
302
354
 
303
355
  ## License
304
356
 
@@ -1,38 +1,68 @@
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';
1
+ import { type CameraController, type ClusterDerivationContext, type ClusterDescriptor, type ClusterHoverEvent, type ClusterMetaConfig, type ContentHoverEvent, type DefaultTaggedItem, type InteractionHandlers, type ItemIdentityConfig, type LayoutMetrics, type LayoutSolverOptions, type MeshOptions, type VisualResolver } from '@simplex-viz/core';
2
+ import { type DefaultClusterPresetVisual, type DefaultContentPresetVisual, type SimplexTheme, type SimplexVisualPreset } from './presets';
2
3
  import { type SvgRendererOptions } from './SvgRendererAdapter';
3
- export interface SimplexSvgControllerResolvedOptions<TItem = DefaultTaggedItem, TContentVisual = unknown, TClusterVisual = unknown, TTagMeta = undefined, TClusterMeta = undefined> {
4
+ export type SimplexTooltipFormatter<TItem = DefaultTaggedItem, TContentVisual = DefaultContentPresetVisual, TClusterVisual = DefaultClusterPresetVisual, TTagMeta = undefined, TClusterMeta = undefined> = (target: ({
5
+ readonly kind: 'content';
6
+ } & ContentHoverEvent<TItem, TContentVisual, TTagMeta, TClusterMeta>) | ({
7
+ readonly kind: 'cluster';
8
+ } & ClusterHoverEvent<TItem, TClusterVisual, TTagMeta, TClusterMeta>)) => string;
9
+ export interface SimplexSvgControllerResolvedOptions<TItem = DefaultTaggedItem, TContentVisual = DefaultContentPresetVisual, TClusterVisual = DefaultClusterPresetVisual, TTagMeta = undefined, TClusterMeta = undefined> {
4
10
  readonly items: readonly TItem[];
5
11
  readonly getId?: (item: TItem) => string;
6
12
  readonly getTags?: (item: TItem) => readonly string[];
13
+ readonly getLabel?: (item: TItem) => string;
7
14
  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'];
15
+ /** Built-in visual preset used when `visualResolver` / views are omitted. Default: `'geometric'`. */
16
+ readonly preset?: SimplexVisualPreset;
17
+ /** Visual color theme (`'dark'` or `'light'`) for built-in presets and tooltips. Default: `'dark'`. */
18
+ readonly theme?: SimplexTheme;
19
+ /** Optional custom visual resolver (defaults to the active `preset` resolver). */
20
+ readonly visualResolver?: VisualResolver<TItem, TContentVisual, TClusterVisual, TTagMeta, TClusterMeta>;
21
+ /** Optional custom content `SvgNodeView` (defaults to the active `preset` view). */
22
+ readonly contentView?: SvgRendererOptions<TContentVisual, TClusterVisual>['contentView'];
23
+ /** Optional custom cluster `SvgNodeView` (defaults to the active `preset` view). */
24
+ readonly clusterView?: SvgRendererOptions<TContentVisual, TClusterVisual>['clusterView'];
11
25
  readonly normalizeTag?: (rawTag: string) => string;
12
26
  readonly resolveTagMeta?: (normalizedTag: string) => TTagMeta | undefined;
13
27
  readonly meshOptions?: MeshOptions;
14
28
  readonly layoutOptions?: LayoutSolverOptions;
15
29
  readonly showHulls?: boolean;
30
+ /**
31
+ * Automatically toggles cluster focus when clicking a topic cluster (and clears on background click)
32
+ * unless a custom `interactions.onLeftClick` handler is provided. Default: `true`.
33
+ */
34
+ readonly focusOnClusterClick?: boolean;
35
+ /** Enables a built-in floating DOM hover tooltip (or supply a custom text formatter). Default: `false`. */
36
+ readonly tooltip?: boolean | SimplexTooltipFormatter<TItem, TContentVisual, TClusterVisual, TTagMeta, TClusterMeta>;
16
37
  readonly interactions?: InteractionHandlers<TItem, TContentVisual, TClusterVisual, TTagMeta, TClusterMeta>;
17
38
  readonly onMetricsChange?: (metrics: LayoutMetrics) => void;
18
39
  readonly onClustersChange?: (clusters: readonly ClusterDescriptor<TItem, TTagMeta, TClusterMeta>[]) => void;
19
40
  readonly onFpsUpdate?: (fps: number) => void;
20
41
  }
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'>;
42
+ export type SimplexSvgControllerOptions<TItem = DefaultTaggedItem, TContentVisual = DefaultContentPresetVisual, TClusterVisual = DefaultClusterPresetVisual, TTagMeta = undefined, TClusterMeta = undefined> = ItemIdentityConfig<TItem> & ClusterMetaConfig<TItem, TTagMeta, TClusterMeta> & Omit<SimplexSvgControllerResolvedOptions<TItem, TContentVisual, TClusterVisual, TTagMeta, TClusterMeta>, 'getId' | 'getTags' | 'deriveClusterMeta'>;
22
43
  /**
23
44
  * High-level framework-agnostic SVG graph controller for Vanilla TypeScript, Vue, Angular,
24
45
  * Svelte, Web Components, and `@simplex-viz/react`.
25
46
  *
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.
47
+ * Works zero-config with `{ items }` via built-in presets, default zoom/pan/focus interactions,
48
+ * and optional tooltips, while remaining 100% customizable through `VisualResolver` and `SvgNodeView`.
28
49
  */
29
- export declare class SimplexSvgController<TItem = DefaultTaggedItem, TContentVisual = unknown, TClusterVisual = unknown, TTagMeta = undefined, TClusterMeta = undefined> {
50
+ export declare class SimplexSvgController<TItem = DefaultTaggedItem, TContentVisual = DefaultContentPresetVisual, TClusterVisual = DefaultClusterPresetVisual, TTagMeta = undefined, TClusterMeta = undefined> {
30
51
  private readonly containerEl;
31
52
  private readonly svgEl;
32
53
  private readonly adapter;
33
54
  private readonly engine;
34
55
  private readonly resizeObserver;
35
56
  private readonly onFpsUpdate?;
57
+ private readonly focusOnClusterClick;
58
+ private readonly getIdExtractor;
59
+ private getLabelExtractor?;
60
+ private tooltipOption;
61
+ private tooltipEl;
62
+ private focusedClusterUidState;
63
+ private currentPreset;
64
+ private currentTheme;
65
+ private readonly usesCustomVisualResolver;
36
66
  private rafId;
37
67
  private lastFrameTs;
38
68
  private fpsSamples;
@@ -42,8 +72,15 @@ export declare class SimplexSvgController<TItem = DefaultTaggedItem, TContentVis
42
72
  private dragStartX;
43
73
  private dragStartY;
44
74
  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>;
75
+ constructor(containerEl: HTMLElement | string, options: SimplexSvgControllerOptions<TItem, TContentVisual, TClusterVisual, TTagMeta, TClusterMeta>);
76
+ static createFromResolved<TItem = DefaultTaggedItem, TContentVisual = DefaultContentPresetVisual, TClusterVisual = DefaultClusterPresetVisual, TTagMeta = undefined, TClusterMeta = undefined>(containerEl: HTMLElement | string, options: SimplexSvgControllerResolvedOptions<TItem, TContentVisual, TClusterVisual, TTagMeta, TClusterMeta>): SimplexSvgController<TItem, TContentVisual, TClusterVisual, TTagMeta, TClusterMeta>;
77
+ private wrapInteractions;
78
+ private formatContentTooltip;
79
+ private formatClusterTooltip;
80
+ private applyTooltipThemeStyles;
81
+ private ensureTooltipElement;
82
+ private showTooltip;
83
+ private hideTooltip;
47
84
  get camera(): CameraController;
48
85
  getSvgElement(): SVGSVGElement;
49
86
  getMetrics(): LayoutMetrics;
@@ -52,6 +89,16 @@ export declare class SimplexSvgController<TItem = DefaultTaggedItem, TContentVis
52
89
  addItems(items: TItem | readonly TItem[]): void;
53
90
  removeItems(ids: string | readonly string[]): void;
54
91
  setItems(items: readonly TItem[]): void;
92
+ /**
93
+ * Switches between built-in presets (`'geometric'`, `'glyphs'`, `'badges'`) with smooth
94
+ * morph/crossfade transitions.
95
+ */
96
+ setPreset(preset: SimplexVisualPreset, getLabel?: (item: TItem) => string): void;
97
+ /**
98
+ * Switches built-in preset & tooltip theme between `'dark'` and `'light'`.
99
+ */
100
+ setTheme(theme: SimplexTheme): void;
101
+ setTooltip(tooltip: boolean | SimplexTooltipFormatter<TItem, TContentVisual, TClusterVisual, TTagMeta, TClusterMeta>): void;
55
102
  setVisualResolver(resolver: VisualResolver<TItem, TContentVisual, TClusterVisual, TTagMeta, TClusterMeta>): void;
56
103
  setViews(views: Partial<SvgRendererOptions<TContentVisual, TClusterVisual>>): void;
57
104
  setSizeMultiplier(multiplier: number): void;
@@ -73,6 +120,17 @@ export declare class SimplexSvgController<TItem = DefaultTaggedItem, TContentVis
73
120
  private attachSvgListeners;
74
121
  private detachSvgListeners;
75
122
  private ensureLoopRunning;
123
+ /** Helper accessor matching `getId` when external callers inspect items. */
124
+ getItemId(item: TItem): string;
76
125
  destroy(): void;
77
126
  }
127
+ /**
128
+ * Convenience one-liner factory for mounting `@simplex-viz/svg` in Vanilla TypeScript,
129
+ * Vue, Angular, Svelte, or Web Components.
130
+ *
131
+ * Accepts either an array of `{ id, tags }` items directly (with built-in presets,
132
+ * cursor zoom, and cluster click-focus enabled) or a full options object.
133
+ */
134
+ export declare function createSimplexSvg<TItem extends DefaultTaggedItem = DefaultTaggedItem>(target: HTMLElement | string, items: readonly TItem[]): SimplexSvgController<TItem, DefaultContentPresetVisual, DefaultClusterPresetVisual>;
135
+ export declare function createSimplexSvg<TItem = DefaultTaggedItem, TContentVisual = DefaultContentPresetVisual, TClusterVisual = DefaultClusterPresetVisual, TTagMeta = undefined, TClusterMeta = undefined>(target: HTMLElement | string, options: SimplexSvgControllerOptions<TItem, TContentVisual, TClusterVisual, TTagMeta, TClusterMeta>): SimplexSvgController<TItem, TContentVisual, TClusterVisual, TTagMeta, TClusterMeta>;
78
136
  //# sourceMappingURL=SimplexSvgController.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimplexSvgController.d.ts","sourceRoot":"","sources":["../src/SimplexSvgController.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAsB,KAAK,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAEnF,MAAM,WAAW,mCAAmC,CAClD,KAAK,GAAG,iBAAiB,EACzB,cAAc,GAAG,OAAO,EACxB,cAAc,GAAG,OAAO,EACxB,QAAQ,GAAG,SAAS,EACpB,YAAY,GAAG,SAAS;IAExB,QAAQ,CAAC,KAAK,EAAE,SAAS,KAAK,EAAE,CAAC;IACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,MAAM,CAAC;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,IA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CHANGED
@@ -1,9 +1,11 @@
1
1
  export * from './types';
2
2
  export * from './hullMeasure';
3
+ export * from './presets';
3
4
  export * from './SvgRendererAdapter';
4
5
  export * from './SimplexSvgController';
5
6
  export * from './views/GeometricShapeSvgView';
6
7
  export * from './views/MultiSectorGlyphSvgView';
7
8
  export * from './views/BadgeClusterSvgView';
8
9
  export * from './views/ClusterAnchorSvgView';
10
+ export { solveSimplexSnapshot, computeConvexHull, rectToConvexPolygon, regularPolygon, starConvexHull, type CameraController, type CameraState, type ClusterDescriptor, type ClusterHoverEvent, type ContentHoverEvent, type ContentLayoutContext, type ConvexGeometry, type DefaultTaggedItem, type HitTarget, type InteractionHandlers, type LayoutMetrics, type LayoutSolverOptions, type MeshOptions, type NodeRenderState, type SimplexLayoutSnapshot, type SimplexSnapshotOptions, type VisualResolver, } from '@simplex-viz/core';
9
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAG7C,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,cAAc,GACpB,MAAM,mBAAmB,CAAC"}