@myrmidon/gve-snapshot-rendition 2.0.5 → 2.0.7
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/adapter/data-feature-adapter.d.ts +2 -3
- package/dist/animation/animation-engine.d.ts +0 -13
- package/dist/core/gve-snapshot-rendition.d.ts +72 -30
- package/dist/hint-designer/gve-hint-designer.d.ts +11 -1
- package/dist/index.cjs.min.js +7 -7
- package/dist/index.cjs.min.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +173 -81
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +21 -50
- package/dist/rendering/feature-resolver.d.ts +10 -10
- package/dist/rendering/hint-renderer.d.ts +9 -12
- package/dist/rendering/svg-utils.d.ts +38 -1
- package/dist/rendering/text-layout.d.ts +29 -4
- package/dist/rendering/text-renderer.d.ts +25 -14
- package/dist/settings/hint-models.d.ts +0 -5
- package/dist/settings/settings.d.ts +0 -4
- package/dist/ui/details-area.d.ts +31 -0
- package/dist/ui/hilites.d.ts +3 -9
- package/dist/ui/operation-summary-service.d.ts +4 -7
- package/dist/ui/toolbar.d.ts +10 -0
- package/dist/utils/feature-utils.d.ts +7 -3
- package/package.json +82 -73
- package/dist/rendering/spreading-engine.d.ts +0 -98
- package/dist/src/adapter/adapter-models.d.ts +0 -171
- package/dist/src/adapter/data-feature-adapter.d.ts +0 -30
- package/dist/src/adapter/feature-adapter.d.ts +0 -34
- package/dist/src/adapter/index.d.ts +0 -6
- package/dist/src/adapter/matcher.d.ts +0 -38
- package/dist/src/adapter/parser.d.ts +0 -58
- package/dist/src/adapter/tokenizer.d.ts +0 -55
- package/dist/src/animation/animation-engine.d.ts +0 -105
- package/dist/src/animation/animation-factory.d.ts +0 -49
- package/dist/src/core/color-palette.d.ts +0 -39
- package/dist/src/core/gve-snapshot-rendition.d.ts +0 -359
- package/dist/src/core/logger.d.ts +0 -37
- package/dist/src/hint-designer/gve-hint-designer.d.ts +0 -356
- package/dist/src/hint-designer/hint-designer-models.d.ts +0 -32
- package/dist/src/index.d.ts +0 -17
- package/dist/src/models.d.ts +0 -171
- package/dist/src/rendering/bounds-cache.d.ts +0 -62
- package/dist/src/rendering/feature-resolver.d.ts +0 -98
- package/dist/src/rendering/hint-renderer.d.ts +0 -103
- package/dist/src/rendering/svg-utils.d.ts +0 -133
- package/dist/src/rendering/text-layout.d.ts +0 -100
- package/dist/src/rendering/text-renderer.d.ts +0 -81
- package/dist/src/settings/hint-models.d.ts +0 -61
- package/dist/src/settings/settings.d.ts +0 -118
- package/dist/src/ui/details-area.d.ts +0 -112
- package/dist/src/ui/hilites.d.ts +0 -63
- package/dist/src/ui/operation-summary-service.d.ts +0 -73
- package/dist/src/ui/toolbar.d.ts +0 -141
- package/dist/src/ui/version-text-area.d.ts +0 -131
- package/dist/src/ui/versions-list-area.d.ts +0 -88
- package/dist/src/utils/color-palette.d.ts +0 -36
- package/dist/src/utils/feature-utils.d.ts +0 -80
- package/dist/src/utils/node-utils.d.ts +0 -47
- package/dist/src/utils/text-utils.d.ts +0 -35
- /package/dist/{src/layout → layout}/golden-layout-styles.d.ts +0 -0
|
@@ -16,9 +16,8 @@ export declare class DataFeatureAdapter {
|
|
|
16
16
|
* Returns a new copy of the data with adapted features.
|
|
17
17
|
*
|
|
18
18
|
* Features adapted:
|
|
19
|
-
* -
|
|
20
|
-
* -
|
|
21
|
-
* - taggedNodes[version][i].features (features on nodes)
|
|
19
|
+
* - globalFeatures[tag][i] (global features per version)
|
|
20
|
+
* - nodes[i].features[tag][j] (per-node, per-version features)
|
|
22
21
|
*
|
|
23
22
|
* Features NOT adapted:
|
|
24
23
|
* - steps[i].operation.features (operation metadata)
|
|
@@ -21,19 +21,6 @@ export declare class AnimationEngine {
|
|
|
21
21
|
* @returns Promise that resolves when animation completes
|
|
22
22
|
*/
|
|
23
23
|
animate(element: SVGElement, animation: AnimationFunction, rootElement: SVGElement): Promise<void>;
|
|
24
|
-
/**
|
|
25
|
-
* Animate multiple elements with spreading transitions.
|
|
26
|
-
* All elements are animated in parallel with GSAP.
|
|
27
|
-
*
|
|
28
|
-
* @param shifts - Map of element IDs to their shift amounts {x, y}
|
|
29
|
-
* @param duration - Duration in milliseconds
|
|
30
|
-
* @param rootElement - The root SVG element containing all elements
|
|
31
|
-
* @returns Promise that resolves when all animations complete
|
|
32
|
-
*/
|
|
33
|
-
animateSpreading(shifts: Map<string, {
|
|
34
|
-
x: number;
|
|
35
|
-
y: number;
|
|
36
|
-
}>, duration: number, rootElement: SVGElement): Promise<void>;
|
|
37
24
|
/**
|
|
38
25
|
* Fade in multiple elements (used for hilites).
|
|
39
26
|
*
|
|
@@ -16,7 +16,6 @@ export declare class GveSnapshotRendition extends HTMLElement {
|
|
|
16
16
|
private _logger;
|
|
17
17
|
private _animationEngine?;
|
|
18
18
|
private _boundsCache;
|
|
19
|
-
private _spreadingEngine;
|
|
20
19
|
private _textRenderer?;
|
|
21
20
|
private _hintRenderer?;
|
|
22
21
|
private _featureResolver;
|
|
@@ -30,13 +29,27 @@ export declare class GveSnapshotRendition extends HTMLElement {
|
|
|
30
29
|
private _hilites?;
|
|
31
30
|
private _panZoomInstance?;
|
|
32
31
|
private _keyboardHandler?;
|
|
32
|
+
private _goldenLayout?;
|
|
33
|
+
private _versionsListEl?;
|
|
34
|
+
private _svgContainerEl?;
|
|
35
|
+
private _versionTextEl?;
|
|
36
|
+
private _detailsEl?;
|
|
37
|
+
/**
|
|
38
|
+
* Get the library version.
|
|
39
|
+
* This value is injected at build time via @rollup/plugin-replace
|
|
40
|
+
* from package.json. It allows consumers to verify which version
|
|
41
|
+
* of the web component is loaded.
|
|
42
|
+
*/
|
|
43
|
+
static get version(): string;
|
|
33
44
|
private _baseNodes;
|
|
34
|
-
private
|
|
45
|
+
private _nodeMap;
|
|
35
46
|
private _slideshowTimerId;
|
|
36
47
|
private _currentVersion;
|
|
37
48
|
private _currentVersionIndex;
|
|
38
49
|
private _autoForwardEnabled;
|
|
39
50
|
private _autoForwardTimerId;
|
|
51
|
+
private _renderScheduled;
|
|
52
|
+
private _isNavigating;
|
|
40
53
|
constructor();
|
|
41
54
|
/**
|
|
42
55
|
* Observed attributes for the web component.
|
|
@@ -81,6 +94,36 @@ export declare class GveSnapshotRendition extends HTMLElement {
|
|
|
81
94
|
* Render the component UI.
|
|
82
95
|
*/
|
|
83
96
|
private render;
|
|
97
|
+
/**
|
|
98
|
+
* Wire up the drag-to-resize handle at the bottom of the component.
|
|
99
|
+
* Dragging it adjusts the host element's inline height, which overrides
|
|
100
|
+
* the --gve-height CSS variable while keeping GL's ResizeObserver in sync.
|
|
101
|
+
*/
|
|
102
|
+
private setupBottomResizeHandle;
|
|
103
|
+
/**
|
|
104
|
+
* Initialize Golden Layout with the four resizable panels.
|
|
105
|
+
* The SVG rendition panel has no header and acts as the fixed background.
|
|
106
|
+
*/
|
|
107
|
+
private initializeGoldenLayout;
|
|
108
|
+
/**
|
|
109
|
+
* Default layout: mirrors the original Split.js arrangement.
|
|
110
|
+
* Column:
|
|
111
|
+
* Row (60 %): VersionsList (15 %) | TextRendition (85 %, no header)
|
|
112
|
+
* Row (40 %): VersionText (60 %) | Details (40 %)
|
|
113
|
+
*/
|
|
114
|
+
private getDefaultLayout;
|
|
115
|
+
/**
|
|
116
|
+
* Reset layout to default panel sizes by reloading the default config.
|
|
117
|
+
*/
|
|
118
|
+
resetLayout(): void;
|
|
119
|
+
/**
|
|
120
|
+
* Coalesce concurrent render requests into a single call.
|
|
121
|
+
* Multiple same-turn invocations (e.g. settings setter + data setter both
|
|
122
|
+
* firing in the same Angular expression) collapse into one microtask render,
|
|
123
|
+
* always running after all synchronous assignments have completed so the
|
|
124
|
+
* latest data is used.
|
|
125
|
+
*/
|
|
126
|
+
private scheduleRenderContent;
|
|
84
127
|
/**
|
|
85
128
|
* Render content (base text only - starts at v0).
|
|
86
129
|
* Use goToVersionIndex() to navigate to specific versions.
|
|
@@ -91,11 +134,6 @@ export declare class GveSnapshotRendition extends HTMLElement {
|
|
|
91
134
|
* Enables mouse wheel zoom, click-and-drag pan, with configurable limits.
|
|
92
135
|
*/
|
|
93
136
|
private initializePanZoom;
|
|
94
|
-
/**
|
|
95
|
-
* Process operations to render text transformations.
|
|
96
|
-
* Processes operations in order, rendering hints and additional text.
|
|
97
|
-
*/
|
|
98
|
-
private processOperations;
|
|
99
137
|
/**
|
|
100
138
|
* Process a single operation step.
|
|
101
139
|
*/
|
|
@@ -105,34 +143,18 @@ export declare class GveSnapshotRendition extends HTMLElement {
|
|
|
105
143
|
*/
|
|
106
144
|
private processOperationInternal;
|
|
107
145
|
/**
|
|
108
|
-
* Get reference nodes for an operation
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
* According to the snapshot model, deleted nodes are not included in subsequent
|
|
112
|
-
* versions' taggedNodes. To find a deleted node, we must search backwards through
|
|
113
|
-
* previous versions until we find it.
|
|
146
|
+
* Get reference nodes for an operation from the flat node map.
|
|
147
|
+
* All nodes (including deleted ones) are always present in the map.
|
|
114
148
|
*
|
|
115
|
-
* @param nodeIds - Array of node IDs from step.refNodeIds
|
|
116
|
-
* @param inputTag -
|
|
149
|
+
* @param nodeIds - Array of node IDs from step.refNodeIds
|
|
150
|
+
* @param inputTag - Kept for API compatibility; unused in new model
|
|
117
151
|
* @returns Array of CharNode objects matching the IDs
|
|
118
152
|
*/
|
|
119
153
|
private getReferenceNodes;
|
|
120
|
-
/**
|
|
121
|
-
* Find a node by ID, searching backwards through versions if needed.
|
|
122
|
-
* This handles the case where a node was deleted in a previous version but
|
|
123
|
-
* is still referenced by a later operation (e.g., to add a hint to a deleted node).
|
|
124
|
-
*
|
|
125
|
-
* Searches backwards from the specified version to v0. Since v0 is now normalized
|
|
126
|
-
* and added to taggedNodes during data processing, no special handling is needed.
|
|
127
|
-
*
|
|
128
|
-
* @param nodeId - The node ID to find
|
|
129
|
-
* @param startTag - The version tag to start searching from (e.g., "v11")
|
|
130
|
-
* @returns The node if found, undefined otherwise
|
|
131
|
-
*/
|
|
132
|
-
private findNodeById;
|
|
133
154
|
/**
|
|
134
155
|
* Get nodes added by a specific operation.
|
|
135
|
-
*
|
|
156
|
+
* Nodes added by an operation carry an `opid` feature in their per-version
|
|
157
|
+
* features for the output tag.
|
|
136
158
|
*
|
|
137
159
|
* @param operationId - The operation ID to match
|
|
138
160
|
* @param outputTag - The output version tag (e.g., "v3") where the nodes were added
|
|
@@ -162,6 +184,11 @@ export declare class GveSnapshotRendition extends HTMLElement {
|
|
|
162
184
|
* Set up hover listeners on all text elements to update details area.
|
|
163
185
|
*/
|
|
164
186
|
private setupTextElementHoverListeners;
|
|
187
|
+
/**
|
|
188
|
+
* Get the node from the node map by its SVG element ID.
|
|
189
|
+
* Returns the node and the version tag at which to read its features.
|
|
190
|
+
*/
|
|
191
|
+
private getNodeForElement;
|
|
165
192
|
/**
|
|
166
193
|
* Handle hover over a text element.
|
|
167
194
|
*/
|
|
@@ -170,6 +197,10 @@ export declare class GveSnapshotRendition extends HTMLElement {
|
|
|
170
197
|
* Handle leaving a text element.
|
|
171
198
|
*/
|
|
172
199
|
private handleTextElementLeave;
|
|
200
|
+
/**
|
|
201
|
+
* Handle click on a text element (for pinning).
|
|
202
|
+
*/
|
|
203
|
+
private handleTextElementClick;
|
|
173
204
|
/**
|
|
174
205
|
* Navigate forward by processing operations one by one.
|
|
175
206
|
* Each operation adds hints and/or text that persist for all future versions.
|
|
@@ -189,6 +220,12 @@ export declare class GveSnapshotRendition extends HTMLElement {
|
|
|
189
220
|
* Extract char offsets from first operation if it's an annotate.
|
|
190
221
|
*/
|
|
191
222
|
private extractCharOffsets;
|
|
223
|
+
/**
|
|
224
|
+
* Extract per-node rendition configs from the first operation if it's an annotate.
|
|
225
|
+
* This allows init features like r_font-size, r_fore-color, etc. to override
|
|
226
|
+
* the component-wide settings for specific base text nodes.
|
|
227
|
+
*/
|
|
228
|
+
private extractInitNodeConfigs;
|
|
192
229
|
/**
|
|
193
230
|
* Zoom in by configured step amount.
|
|
194
231
|
*/
|
|
@@ -217,6 +254,11 @@ export declare class GveSnapshotRendition extends HTMLElement {
|
|
|
217
254
|
* Handle toolbar navigation actions.
|
|
218
255
|
*/
|
|
219
256
|
private handleToolbarNavigation;
|
|
257
|
+
/**
|
|
258
|
+
* Returns true when the given version tag is a staged version.
|
|
259
|
+
* Checks globalFeatures (from new API) for a "version" feature.
|
|
260
|
+
*/
|
|
261
|
+
private isStagedVersion;
|
|
220
262
|
/**
|
|
221
263
|
* Navigate to previous staged version.
|
|
222
264
|
*/
|
|
@@ -312,7 +354,7 @@ export declare class GveSnapshotRendition extends HTMLElement {
|
|
|
312
354
|
*/
|
|
313
355
|
private toggleHilites;
|
|
314
356
|
/**
|
|
315
|
-
* Get component styles.
|
|
357
|
+
* Get component styles (includes inlined GL CSS for Shadow DOM compatibility).
|
|
316
358
|
*/
|
|
317
359
|
private getStyles;
|
|
318
360
|
}
|
|
@@ -34,7 +34,6 @@ export declare class GveHintDesigner extends HTMLElement {
|
|
|
34
34
|
private _scaleXInput?;
|
|
35
35
|
private _scaleYInput?;
|
|
36
36
|
private _rotationInput?;
|
|
37
|
-
private _solidCheckbox?;
|
|
38
37
|
private _displacedRefSpanInput?;
|
|
39
38
|
private _variablesTable?;
|
|
40
39
|
private _playButton?;
|
|
@@ -280,6 +279,10 @@ export declare class GveHintDesigner extends HTMLElement {
|
|
|
280
279
|
* Clear all data.
|
|
281
280
|
*/
|
|
282
281
|
private clearData;
|
|
282
|
+
/**
|
|
283
|
+
* Export the current hint as an InkScape-compatible SVG file.
|
|
284
|
+
*/
|
|
285
|
+
private exportToInkscape;
|
|
283
286
|
/**
|
|
284
287
|
* Load animation code from catalog.
|
|
285
288
|
*/
|
|
@@ -315,6 +318,13 @@ export declare class GveHintDesigner extends HTMLElement {
|
|
|
315
318
|
* Refresh the variables table.
|
|
316
319
|
*/
|
|
317
320
|
private refreshVariablesTable;
|
|
321
|
+
/**
|
|
322
|
+
* Update the highlighted state of all Hint Properties form rows.
|
|
323
|
+
* Rows whose value differs from the default get the form-row--modified class.
|
|
324
|
+
*/
|
|
325
|
+
private updateFormFieldHighlights;
|
|
326
|
+
private isOffsetModified;
|
|
327
|
+
private setFormRowModified;
|
|
318
328
|
/**
|
|
319
329
|
* Show a message in the message panel.
|
|
320
330
|
*/
|