@myrmidon/gve-snapshot-rendition 2.0.5 → 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.
Files changed (59) hide show
  1. package/dist/adapter/data-feature-adapter.d.ts +2 -3
  2. package/dist/animation/animation-engine.d.ts +0 -13
  3. package/dist/core/gve-snapshot-rendition.d.ts +71 -30
  4. package/dist/hint-designer/gve-hint-designer.d.ts +11 -1
  5. package/dist/index.cjs.min.js +1 -1
  6. package/dist/index.cjs.min.js.map +1 -1
  7. package/dist/index.d.ts +1 -0
  8. package/dist/index.js +2 -2
  9. package/dist/index.js.map +1 -1
  10. package/dist/models.d.ts +21 -50
  11. package/dist/rendering/feature-resolver.d.ts +10 -10
  12. package/dist/rendering/hint-renderer.d.ts +6 -12
  13. package/dist/rendering/svg-utils.d.ts +23 -2
  14. package/dist/rendering/text-layout.d.ts +29 -4
  15. package/dist/rendering/text-renderer.d.ts +22 -14
  16. package/dist/settings/hint-models.d.ts +0 -5
  17. package/dist/settings/settings.d.ts +0 -4
  18. package/dist/ui/details-area.d.ts +31 -0
  19. package/dist/ui/hilites.d.ts +3 -9
  20. package/dist/ui/operation-summary-service.d.ts +4 -7
  21. package/dist/ui/toolbar.d.ts +10 -0
  22. package/dist/utils/feature-utils.d.ts +7 -3
  23. package/package.json +82 -73
  24. package/dist/rendering/spreading-engine.d.ts +0 -98
  25. package/dist/src/adapter/adapter-models.d.ts +0 -171
  26. package/dist/src/adapter/data-feature-adapter.d.ts +0 -30
  27. package/dist/src/adapter/feature-adapter.d.ts +0 -34
  28. package/dist/src/adapter/index.d.ts +0 -6
  29. package/dist/src/adapter/matcher.d.ts +0 -38
  30. package/dist/src/adapter/parser.d.ts +0 -58
  31. package/dist/src/adapter/tokenizer.d.ts +0 -55
  32. package/dist/src/animation/animation-engine.d.ts +0 -105
  33. package/dist/src/animation/animation-factory.d.ts +0 -49
  34. package/dist/src/core/color-palette.d.ts +0 -39
  35. package/dist/src/core/gve-snapshot-rendition.d.ts +0 -359
  36. package/dist/src/core/logger.d.ts +0 -37
  37. package/dist/src/hint-designer/gve-hint-designer.d.ts +0 -356
  38. package/dist/src/hint-designer/hint-designer-models.d.ts +0 -32
  39. package/dist/src/index.d.ts +0 -17
  40. package/dist/src/models.d.ts +0 -171
  41. package/dist/src/rendering/bounds-cache.d.ts +0 -62
  42. package/dist/src/rendering/feature-resolver.d.ts +0 -98
  43. package/dist/src/rendering/hint-renderer.d.ts +0 -103
  44. package/dist/src/rendering/svg-utils.d.ts +0 -133
  45. package/dist/src/rendering/text-layout.d.ts +0 -100
  46. package/dist/src/rendering/text-renderer.d.ts +0 -81
  47. package/dist/src/settings/hint-models.d.ts +0 -61
  48. package/dist/src/settings/settings.d.ts +0 -118
  49. package/dist/src/ui/details-area.d.ts +0 -112
  50. package/dist/src/ui/hilites.d.ts +0 -63
  51. package/dist/src/ui/operation-summary-service.d.ts +0 -73
  52. package/dist/src/ui/toolbar.d.ts +0 -141
  53. package/dist/src/ui/version-text-area.d.ts +0 -131
  54. package/dist/src/ui/versions-list-area.d.ts +0 -88
  55. package/dist/src/utils/color-palette.d.ts +0 -36
  56. package/dist/src/utils/feature-utils.d.ts +0 -80
  57. package/dist/src/utils/node-utils.d.ts +0 -47
  58. package/dist/src/utils/text-utils.d.ts +0 -35
  59. /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
- * - steps[i].featureSet.features (global features)
20
- * - steps[i].featureSet.nodeFeatures (node-specific features)
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,26 @@ 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 _versionPalette;
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;
40
52
  constructor();
41
53
  /**
42
54
  * Observed attributes for the web component.
@@ -81,6 +93,36 @@ export declare class GveSnapshotRendition extends HTMLElement {
81
93
  * Render the component UI.
82
94
  */
83
95
  private render;
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.
100
+ */
101
+ private setupBottomResizeHandle;
102
+ /**
103
+ * Initialize Golden Layout with the four resizable panels.
104
+ * The SVG rendition panel has no header and acts as the fixed background.
105
+ */
106
+ private initializeGoldenLayout;
107
+ /**
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 %)
112
+ */
113
+ private getDefaultLayout;
114
+ /**
115
+ * Reset layout to default panel sizes by reloading the default config.
116
+ */
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;
84
126
  /**
85
127
  * Render content (base text only - starts at v0).
86
128
  * Use goToVersionIndex() to navigate to specific versions.
@@ -91,11 +133,6 @@ export declare class GveSnapshotRendition extends HTMLElement {
91
133
  * Enables mouse wheel zoom, click-and-drag pan, with configurable limits.
92
134
  */
93
135
  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
136
  /**
100
137
  * Process a single operation step.
101
138
  */
@@ -105,34 +142,18 @@ export declare class GveSnapshotRendition extends HTMLElement {
105
142
  */
106
143
  private processOperationInternal;
107
144
  /**
108
- * Get reference nodes for an operation using node IDs from trace features.
109
- * Reference nodes are the nodes affected by the operation.
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.
145
+ * Get reference nodes for an operation from the flat node map.
146
+ * All nodes (including deleted ones) are always present in the map.
114
147
  *
115
- * @param nodeIds - Array of node IDs from step.refNodeIds (extracted from trace features)
116
- * @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
117
150
  * @returns Array of CharNode objects matching the IDs
118
151
  */
119
152
  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
153
  /**
134
154
  * Get nodes added by a specific operation.
135
- * These are nodes with opid feature matching the operation ID.
155
+ * Nodes added by an operation carry an `opid` feature in their per-version
156
+ * features for the output tag.
136
157
  *
137
158
  * @param operationId - The operation ID to match
138
159
  * @param outputTag - The output version tag (e.g., "v3") where the nodes were added
@@ -162,6 +183,11 @@ export declare class GveSnapshotRendition extends HTMLElement {
162
183
  * Set up hover listeners on all text elements to update details area.
163
184
  */
164
185
  private setupTextElementHoverListeners;
186
+ /**
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.
189
+ */
190
+ private getNodeForElement;
165
191
  /**
166
192
  * Handle hover over a text element.
167
193
  */
@@ -170,6 +196,10 @@ export declare class GveSnapshotRendition extends HTMLElement {
170
196
  * Handle leaving a text element.
171
197
  */
172
198
  private handleTextElementLeave;
199
+ /**
200
+ * Handle click on a text element (for pinning).
201
+ */
202
+ private handleTextElementClick;
173
203
  /**
174
204
  * Navigate forward by processing operations one by one.
175
205
  * Each operation adds hints and/or text that persist for all future versions.
@@ -189,6 +219,12 @@ export declare class GveSnapshotRendition extends HTMLElement {
189
219
  * Extract char offsets from first operation if it's an annotate.
190
220
  */
191
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;
192
228
  /**
193
229
  * Zoom in by configured step amount.
194
230
  */
@@ -217,6 +253,11 @@ export declare class GveSnapshotRendition extends HTMLElement {
217
253
  * Handle toolbar navigation actions.
218
254
  */
219
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;
220
261
  /**
221
262
  * Navigate to previous staged version.
222
263
  */
@@ -312,7 +353,7 @@ export declare class GveSnapshotRendition extends HTMLElement {
312
353
  */
313
354
  private toggleHilites;
314
355
  /**
315
- * Get component styles.
356
+ * Get component styles (includes inlined GL CSS for Shadow DOM compatibility).
316
357
  */
317
358
  private getStyles;
318
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
  */