@myrmidon/gve-snapshot-rendition 2.0.4 → 2.0.6
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 +49 -44
- package/dist/hint-designer/gve-hint-designer.d.ts +11 -1
- package/dist/index.cjs.min.js +1 -1
- package/dist/index.cjs.min.js.map +1 -1
- package/dist/index.js +483 -470
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +21 -50
- package/dist/rendering/feature-resolver.d.ts +6 -7
- package/dist/rendering/hint-renderer.d.ts +6 -12
- package/dist/rendering/text-layout.d.ts +2 -1
- package/dist/rendering/text-renderer.d.ts +13 -12
- package/dist/settings/hint-models.d.ts +0 -5
- package/dist/settings/settings.d.ts +0 -4
- package/dist/ui/details-area.d.ts +2 -1
- package/dist/ui/hilites.d.ts +3 -9
- package/dist/ui/operation-summary-service.d.ts +4 -7
- 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/spreading-engine.d.ts +0 -98
- 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,10 +29,11 @@ export declare class GveSnapshotRendition extends HTMLElement {
|
|
|
30
29
|
private _hilites?;
|
|
31
30
|
private _panZoomInstance?;
|
|
32
31
|
private _keyboardHandler?;
|
|
33
|
-
private
|
|
34
|
-
private
|
|
35
|
-
private
|
|
36
|
-
private
|
|
32
|
+
private _goldenLayout?;
|
|
33
|
+
private _versionsListEl?;
|
|
34
|
+
private _svgContainerEl?;
|
|
35
|
+
private _versionTextEl?;
|
|
36
|
+
private _detailsEl?;
|
|
37
37
|
/**
|
|
38
38
|
* Get the library version.
|
|
39
39
|
* This value is injected at build time via @rollup/plugin-replace
|
|
@@ -42,12 +42,13 @@ export declare class GveSnapshotRendition extends HTMLElement {
|
|
|
42
42
|
*/
|
|
43
43
|
static get version(): string;
|
|
44
44
|
private _baseNodes;
|
|
45
|
-
private
|
|
45
|
+
private _nodeMap;
|
|
46
46
|
private _slideshowTimerId;
|
|
47
47
|
private _currentVersion;
|
|
48
48
|
private _currentVersionIndex;
|
|
49
49
|
private _autoForwardEnabled;
|
|
50
50
|
private _autoForwardTimerId;
|
|
51
|
+
private _renderScheduled;
|
|
51
52
|
constructor();
|
|
52
53
|
/**
|
|
53
54
|
* Observed attributes for the web component.
|
|
@@ -93,21 +94,35 @@ export declare class GveSnapshotRendition extends HTMLElement {
|
|
|
93
94
|
*/
|
|
94
95
|
private render;
|
|
95
96
|
/**
|
|
96
|
-
*
|
|
97
|
+
* Wire up the drag-to-resize handle at the bottom of the component.
|
|
98
|
+
* Dragging it adjusts the host element's inline height, which overrides
|
|
99
|
+
* the --gve-height CSS variable while keeping GL's ResizeObserver in sync.
|
|
97
100
|
*/
|
|
98
|
-
private
|
|
101
|
+
private setupBottomResizeHandle;
|
|
99
102
|
/**
|
|
100
|
-
*
|
|
103
|
+
* Initialize Golden Layout with the four resizable panels.
|
|
104
|
+
* The SVG rendition panel has no header and acts as the fixed background.
|
|
101
105
|
*/
|
|
102
|
-
private
|
|
106
|
+
private initializeGoldenLayout;
|
|
103
107
|
/**
|
|
104
|
-
*
|
|
108
|
+
* Default layout: mirrors the original Split.js arrangement.
|
|
109
|
+
* Column:
|
|
110
|
+
* Row (60 %): VersionsList (15 %) | TextRendition (85 %, no header)
|
|
111
|
+
* Row (40 %): VersionText (60 %) | Details (40 %)
|
|
105
112
|
*/
|
|
106
|
-
private
|
|
113
|
+
private getDefaultLayout;
|
|
107
114
|
/**
|
|
108
|
-
* Reset layout to default sizes.
|
|
115
|
+
* Reset layout to default panel sizes by reloading the default config.
|
|
109
116
|
*/
|
|
110
117
|
resetLayout(): void;
|
|
118
|
+
/**
|
|
119
|
+
* Coalesce concurrent render requests into a single call.
|
|
120
|
+
* Multiple same-turn invocations (e.g. settings setter + data setter both
|
|
121
|
+
* firing in the same Angular expression) collapse into one microtask render,
|
|
122
|
+
* always running after all synchronous assignments have completed so the
|
|
123
|
+
* latest data is used.
|
|
124
|
+
*/
|
|
125
|
+
private scheduleRenderContent;
|
|
111
126
|
/**
|
|
112
127
|
* Render content (base text only - starts at v0).
|
|
113
128
|
* Use goToVersionIndex() to navigate to specific versions.
|
|
@@ -118,11 +133,6 @@ export declare class GveSnapshotRendition extends HTMLElement {
|
|
|
118
133
|
* Enables mouse wheel zoom, click-and-drag pan, with configurable limits.
|
|
119
134
|
*/
|
|
120
135
|
private initializePanZoom;
|
|
121
|
-
/**
|
|
122
|
-
* Process operations to render text transformations.
|
|
123
|
-
* Processes operations in order, rendering hints and additional text.
|
|
124
|
-
*/
|
|
125
|
-
private processOperations;
|
|
126
136
|
/**
|
|
127
137
|
* Process a single operation step.
|
|
128
138
|
*/
|
|
@@ -132,34 +142,18 @@ export declare class GveSnapshotRendition extends HTMLElement {
|
|
|
132
142
|
*/
|
|
133
143
|
private processOperationInternal;
|
|
134
144
|
/**
|
|
135
|
-
* Get reference nodes for an operation
|
|
136
|
-
*
|
|
145
|
+
* Get reference nodes for an operation from the flat node map.
|
|
146
|
+
* All nodes (including deleted ones) are always present in the map.
|
|
137
147
|
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* previous versions until we find it.
|
|
141
|
-
*
|
|
142
|
-
* @param nodeIds - Array of node IDs from step.refNodeIds (extracted from trace features)
|
|
143
|
-
* @param inputTag - The input version tag to look for nodes (e.g., "v11")
|
|
148
|
+
* @param nodeIds - Array of node IDs from step.refNodeIds
|
|
149
|
+
* @param inputTag - Kept for API compatibility; unused in new model
|
|
144
150
|
* @returns Array of CharNode objects matching the IDs
|
|
145
151
|
*/
|
|
146
152
|
private getReferenceNodes;
|
|
147
|
-
/**
|
|
148
|
-
* Find a node by ID, searching backwards through versions if needed.
|
|
149
|
-
* This handles the case where a node was deleted in a previous version but
|
|
150
|
-
* is still referenced by a later operation (e.g., to add a hint to a deleted node).
|
|
151
|
-
*
|
|
152
|
-
* Searches backwards from the specified version to v0. Since v0 is now normalized
|
|
153
|
-
* and added to taggedNodes during data processing, no special handling is needed.
|
|
154
|
-
*
|
|
155
|
-
* @param nodeId - The node ID to find
|
|
156
|
-
* @param startTag - The version tag to start searching from (e.g., "v11")
|
|
157
|
-
* @returns The node if found, undefined otherwise
|
|
158
|
-
*/
|
|
159
|
-
private findNodeById;
|
|
160
153
|
/**
|
|
161
154
|
* Get nodes added by a specific operation.
|
|
162
|
-
*
|
|
155
|
+
* Nodes added by an operation carry an `opid` feature in their per-version
|
|
156
|
+
* features for the output tag.
|
|
163
157
|
*
|
|
164
158
|
* @param operationId - The operation ID to match
|
|
165
159
|
* @param outputTag - The output version tag (e.g., "v3") where the nodes were added
|
|
@@ -190,10 +184,10 @@ export declare class GveSnapshotRendition extends HTMLElement {
|
|
|
190
184
|
*/
|
|
191
185
|
private setupTextElementHoverListeners;
|
|
192
186
|
/**
|
|
193
|
-
*
|
|
194
|
-
*
|
|
187
|
+
* Get the node from the node map by its SVG element ID.
|
|
188
|
+
* Returns the node and the version tag at which to read its features.
|
|
195
189
|
*/
|
|
196
|
-
private
|
|
190
|
+
private getNodeForElement;
|
|
197
191
|
/**
|
|
198
192
|
* Handle hover over a text element.
|
|
199
193
|
*/
|
|
@@ -225,6 +219,12 @@ export declare class GveSnapshotRendition extends HTMLElement {
|
|
|
225
219
|
* Extract char offsets from first operation if it's an annotate.
|
|
226
220
|
*/
|
|
227
221
|
private extractCharOffsets;
|
|
222
|
+
/**
|
|
223
|
+
* Extract per-node rendition configs from the first operation if it's an annotate.
|
|
224
|
+
* This allows init features like r_font-size, r_fore-color, etc. to override
|
|
225
|
+
* the component-wide settings for specific base text nodes.
|
|
226
|
+
*/
|
|
227
|
+
private extractInitNodeConfigs;
|
|
228
228
|
/**
|
|
229
229
|
* Zoom in by configured step amount.
|
|
230
230
|
*/
|
|
@@ -253,6 +253,11 @@ export declare class GveSnapshotRendition extends HTMLElement {
|
|
|
253
253
|
* Handle toolbar navigation actions.
|
|
254
254
|
*/
|
|
255
255
|
private handleToolbarNavigation;
|
|
256
|
+
/**
|
|
257
|
+
* Returns true when the given version tag is a staged version.
|
|
258
|
+
* Checks globalFeatures (from new API) for a "version" feature.
|
|
259
|
+
*/
|
|
260
|
+
private isStagedVersion;
|
|
256
261
|
/**
|
|
257
262
|
* Navigate to previous staged version.
|
|
258
263
|
*/
|
|
@@ -348,7 +353,7 @@ export declare class GveSnapshotRendition extends HTMLElement {
|
|
|
348
353
|
*/
|
|
349
354
|
private toggleHilites;
|
|
350
355
|
/**
|
|
351
|
-
* Get component styles.
|
|
356
|
+
* Get component styles (includes inlined GL CSS for Shadow DOM compatibility).
|
|
352
357
|
*/
|
|
353
358
|
private getStyles;
|
|
354
359
|
}
|
|
@@ -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
|
*/
|