@shumoku/renderer 0.2.1 → 0.2.4
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/dist/html/index.d.ts +25 -0
- package/dist/html/index.d.ts.map +1 -1
- package/dist/html/index.js +742 -158
- package/dist/html/index.js.map +1 -1
- package/dist/html/navigation.d.ts +54 -0
- package/dist/html/navigation.d.ts.map +1 -0
- package/dist/html/navigation.js +210 -0
- package/dist/html/navigation.js.map +1 -0
- package/dist/html/runtime.d.ts +2 -1
- package/dist/html/runtime.d.ts.map +1 -1
- package/dist/html/runtime.js +245 -482
- package/dist/html/runtime.js.map +1 -1
- package/dist/html/spotlight.d.ts +9 -0
- package/dist/html/spotlight.d.ts.map +1 -0
- package/dist/html/spotlight.js +119 -0
- package/dist/html/spotlight.js.map +1 -0
- package/dist/html/tooltip.d.ts +14 -0
- package/dist/html/tooltip.d.ts.map +1 -0
- package/dist/html/tooltip.js +133 -0
- package/dist/html/tooltip.js.map +1 -0
- package/dist/html/viewbox.d.ts +14 -0
- package/dist/html/viewbox.d.ts.map +1 -0
- package/dist/html/viewbox.js +21 -0
- package/dist/html/viewbox.js.map +1 -0
- package/dist/iife-string.d.ts +2 -0
- package/dist/iife-string.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/shumoku-interactive.iife.js +25 -20
- package/dist/svg.d.ts +27 -0
- package/dist/svg.d.ts.map +1 -1
- package/dist/svg.js +202 -101
- package/dist/svg.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -2
- package/src/build-iife-string.ts +26 -19
- package/src/html/index.ts +880 -226
- package/src/html/navigation.ts +256 -0
- package/src/html/runtime.ts +412 -654
- package/src/html/spotlight.ts +135 -0
- package/src/html/tooltip.ts +141 -0
- package/src/html/viewbox.ts +28 -0
- package/src/index.ts +25 -22
- package/src/svg.ts +1640 -1502
- package/src/types.ts +127 -125
package/dist/html/index.d.ts
CHANGED
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { LayoutResult, NetworkGraph } from '@shumoku/core';
|
|
6
6
|
import type { HTMLRendererOptions } from '../types.js';
|
|
7
|
+
import { type NavigationState } from './navigation.js';
|
|
7
8
|
export type { InteractiveInstance, InteractiveOptions } from '../types.js';
|
|
9
|
+
export type { NavigationState, SheetInfo } from './navigation.js';
|
|
8
10
|
export { initInteractive } from './runtime.js';
|
|
9
11
|
/**
|
|
10
12
|
* Set the IIFE content for standalone HTML pages
|
|
@@ -15,9 +17,32 @@ export declare function setIIFE(iife: string): void;
|
|
|
15
17
|
*/
|
|
16
18
|
export declare function getIIFE(): string;
|
|
17
19
|
export interface RenderOptions extends HTMLRendererOptions {
|
|
20
|
+
/**
|
|
21
|
+
* Enable hierarchical navigation UI
|
|
22
|
+
*/
|
|
23
|
+
hierarchical?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Current sheet ID for hierarchical rendering
|
|
26
|
+
*/
|
|
27
|
+
currentSheet?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Navigation state for hierarchical diagrams
|
|
30
|
+
*/
|
|
31
|
+
navigation?: NavigationState;
|
|
18
32
|
}
|
|
19
33
|
/**
|
|
20
34
|
* Render a complete standalone HTML page from NetworkGraph
|
|
21
35
|
*/
|
|
22
36
|
export declare function render(graph: NetworkGraph, layout: LayoutResult, options?: RenderOptions): string;
|
|
37
|
+
/**
|
|
38
|
+
* Sheet data for hierarchical rendering
|
|
39
|
+
*/
|
|
40
|
+
export interface SheetData {
|
|
41
|
+
graph: NetworkGraph;
|
|
42
|
+
layout: LayoutResult;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Render a hierarchical HTML page with multiple embedded sheets
|
|
46
|
+
*/
|
|
47
|
+
export declare function renderHierarchical(sheets: Map<string, SheetData>, options?: RenderOptions): string;
|
|
23
48
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/html/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/html/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/html/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAA4B,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEzF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAIL,KAAK,eAAe,EAErB,MAAM,iBAAiB,CAAA;AAExB,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAE1E,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAK9C;;GAEG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAE1C;AAED;;GAEG;AACH,wBAAgB,OAAO,IAAI,MAAM,CAEhC;AAED,MAAM,WAAW,aAAc,SAAQ,mBAAmB;IACxD;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB;;OAEG;IACH,UAAU,CAAC,EAAE,eAAe,CAAA;CAC7B;AAQD;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM,CAmBjG;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,YAAY,CAAA;IACnB,MAAM,EAAE,YAAY,CAAA;CACrB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,EAC9B,OAAO,CAAC,EAAE,aAAa,GACtB,MAAM,CAgDR"}
|