@myrmidon/gve-snapshot-rendition 0.0.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.
Files changed (42) hide show
  1. package/LICENSE +4 -0
  2. package/README.md +135 -0
  3. package/dist/adapter/adapter-models.d.ts +171 -0
  4. package/dist/adapter/data-feature-adapter.d.ts +31 -0
  5. package/dist/adapter/feature-adapter.d.ts +34 -0
  6. package/dist/adapter/index.d.ts +6 -0
  7. package/dist/adapter/matcher.d.ts +38 -0
  8. package/dist/adapter/parser.d.ts +58 -0
  9. package/dist/adapter/tokenizer.d.ts +55 -0
  10. package/dist/animation/animation-engine.d.ts +118 -0
  11. package/dist/animation/animation-factory.d.ts +49 -0
  12. package/dist/core/color-palette.d.ts +39 -0
  13. package/dist/core/gve-snapshot-rendition.d.ts +318 -0
  14. package/dist/core/logger.d.ts +37 -0
  15. package/dist/hint-designer/gve-hint-designer.d.ts +298 -0
  16. package/dist/hint-designer/hint-designer-models.d.ts +32 -0
  17. package/dist/index.cjs.min.js +348 -0
  18. package/dist/index.cjs.min.js.map +1 -0
  19. package/dist/index.d.ts +16 -0
  20. package/dist/index.js +83396 -0
  21. package/dist/index.js.map +1 -0
  22. package/dist/models.d.ts +200 -0
  23. package/dist/rendering/bounds-cache.d.ts +62 -0
  24. package/dist/rendering/feature-resolver.d.ts +98 -0
  25. package/dist/rendering/hint-renderer.d.ts +109 -0
  26. package/dist/rendering/spreading-engine.d.ts +98 -0
  27. package/dist/rendering/svg-utils.d.ts +112 -0
  28. package/dist/rendering/text-layout.d.ts +75 -0
  29. package/dist/rendering/text-renderer.d.ts +73 -0
  30. package/dist/settings/hint-models.d.ts +66 -0
  31. package/dist/settings/settings.d.ts +122 -0
  32. package/dist/ui/details-area.d.ts +81 -0
  33. package/dist/ui/hilites.d.ts +69 -0
  34. package/dist/ui/operation-summary-service.d.ts +76 -0
  35. package/dist/ui/toolbar.d.ts +131 -0
  36. package/dist/ui/version-text-area.d.ts +131 -0
  37. package/dist/ui/versions-list-area.d.ts +88 -0
  38. package/dist/utils/color-palette.d.ts +36 -0
  39. package/dist/utils/feature-utils.d.ts +76 -0
  40. package/dist/utils/node-utils.d.ts +47 -0
  41. package/dist/utils/text-utils.d.ts +35 -0
  42. package/package.json +79 -0
@@ -0,0 +1,298 @@
1
+ import { HintDesignerData, HintDesignerSettings, StringPair } from "./hint-designer-models";
2
+ /**
3
+ * GVE Hint Designer Web Component.
4
+ * A minimalist editing environment to design hints and test their animations.
5
+ */
6
+ export declare class GveHintDesigner extends HTMLElement {
7
+ private _data;
8
+ private _settings;
9
+ private _hintId?;
10
+ private _hintVariables;
11
+ private _logger;
12
+ private _shadow;
13
+ private _svgDisplay?;
14
+ private _messagePanel?;
15
+ private _zoomLevel;
16
+ private _panX;
17
+ private _panY;
18
+ private _isPanning;
19
+ private _lastPanX;
20
+ private _lastPanY;
21
+ private _svgTextarea?;
22
+ private _jsTextarea?;
23
+ private _svgHighlightContainer?;
24
+ private _jsHighlightContainer?;
25
+ private _hintsDropdown?;
26
+ private _animationsDropdown?;
27
+ private _embeddedJsCheckbox?;
28
+ private _newAnimationCheckbox?;
29
+ private _positionSelect?;
30
+ private _offsetXInput?;
31
+ private _offsetYInput?;
32
+ private _scaleXInput?;
33
+ private _scaleYInput?;
34
+ private _rotationInput?;
35
+ private _solidCheckbox?;
36
+ private _displacedRefSpanInput?;
37
+ private _variablesTable?;
38
+ private _playButton?;
39
+ private _pauseButton?;
40
+ private _restartButton?;
41
+ private _progressBar?;
42
+ private _currentTimeline?;
43
+ private _isPlaying;
44
+ private _progressUpdateInterval?;
45
+ constructor();
46
+ /**
47
+ * Called when component is added to the DOM.
48
+ */
49
+ connectedCallback(): void;
50
+ /**
51
+ * Called when component is removed from the DOM.
52
+ */
53
+ disconnectedCallback(): void;
54
+ /**
55
+ * Data property (bindable).
56
+ */
57
+ get data(): HintDesignerData;
58
+ set data(value: HintDesignerData);
59
+ /**
60
+ * Settings property (bindable).
61
+ */
62
+ get settings(): HintDesignerSettings;
63
+ set settings(value: HintDesignerSettings);
64
+ /**
65
+ * Hint ID property (bindable).
66
+ */
67
+ get hintId(): string | undefined;
68
+ set hintId(value: string | undefined);
69
+ /**
70
+ * Hint variables property (bindable).
71
+ */
72
+ get hintVariables(): StringPair[];
73
+ set hintVariables(value: StringPair[]);
74
+ /**
75
+ * Render the component UI.
76
+ */
77
+ private render;
78
+ /**
79
+ * Create the toolbar.
80
+ */
81
+ private createToolbar;
82
+ /**
83
+ * Create the SVG display panel.
84
+ */
85
+ private createSvgDisplay;
86
+ /**
87
+ * Add grid and rulers to the SVG display as background.
88
+ */
89
+ private addGridAndRulers;
90
+ /**
91
+ * Create the timeline player.
92
+ */
93
+ private createTimelinePlayer;
94
+ /**
95
+ * Create the message panel.
96
+ */
97
+ private createMessagePanel;
98
+ /**
99
+ * Create the hint properties editor.
100
+ */
101
+ private createHintPropertiesEditor;
102
+ /**
103
+ * Create the hint variables list.
104
+ */
105
+ private createHintVariablesList;
106
+ /**
107
+ * Create a button element with a Feather icon.
108
+ */
109
+ private createButton;
110
+ /**
111
+ * Create an input element.
112
+ */
113
+ private createInput;
114
+ /**
115
+ * Create a form row with label and control.
116
+ */
117
+ private createFormRow;
118
+ /**
119
+ * Create position select dropdown.
120
+ */
121
+ private createPositionSelect;
122
+ /**
123
+ * Make a panel resizable.
124
+ */
125
+ private makeResizable;
126
+ /**
127
+ * Initialize event listeners.
128
+ */
129
+ private initializeEventListeners;
130
+ /**
131
+ * Initialize panning with mouse drag.
132
+ */
133
+ private initializePanning;
134
+ /**
135
+ * Initialize zooming with mouse wheel.
136
+ */
137
+ private initializeWheelZoom;
138
+ /**
139
+ * Add click listener to a button by ID.
140
+ */
141
+ private addClickListener;
142
+ /**
143
+ * Cleanup resources.
144
+ */
145
+ private cleanup;
146
+ /**
147
+ * Refresh the entire UI.
148
+ */
149
+ private refreshUI;
150
+ /**
151
+ * Refresh the hints dropdown.
152
+ */
153
+ private refreshHintsDropdown;
154
+ /**
155
+ * Refresh the animations dropdown.
156
+ */
157
+ private refreshAnimationsDropdown;
158
+ /**
159
+ * Load a hint for editing.
160
+ */
161
+ private loadHint;
162
+ /**
163
+ * Clear the hint form.
164
+ */
165
+ private clearHintForm;
166
+ /**
167
+ * Add a new hint.
168
+ */
169
+ private addHint;
170
+ /**
171
+ * Save the current hint.
172
+ */
173
+ private saveHint;
174
+ /**
175
+ * Delete the current hint.
176
+ */
177
+ private deleteHint;
178
+ /**
179
+ * Parse offset value (number or string with suffix).
180
+ */
181
+ private parseOffset;
182
+ /**
183
+ * Refresh the SVG display.
184
+ */
185
+ private refreshSvgDisplay;
186
+ /**
187
+ * Resolve variables in SVG code.
188
+ */
189
+ private resolveVariables;
190
+ /**
191
+ * Play animation.
192
+ */
193
+ private playAnimation;
194
+ /**
195
+ * Create the GSAP timeline for the current hint.
196
+ */
197
+ private createTimeline;
198
+ /**
199
+ * Pause animation.
200
+ */
201
+ private pauseAnimation;
202
+ /**
203
+ * Restart animation.
204
+ */
205
+ private restartAnimation;
206
+ /**
207
+ * Seek animation (timeline scrubbing).
208
+ */
209
+ private seekAnimation;
210
+ /**
211
+ * Start updating progress bar.
212
+ */
213
+ private startProgressUpdate;
214
+ /**
215
+ * Stop updating progress bar.
216
+ */
217
+ private stopProgressUpdate;
218
+ /**
219
+ * Zoom in.
220
+ */
221
+ private zoomIn;
222
+ /**
223
+ * Zoom out.
224
+ */
225
+ private zoomOut;
226
+ /**
227
+ * Reset zoom.
228
+ */
229
+ private resetZoom;
230
+ /**
231
+ * Update SVG transform based on zoom and pan.
232
+ */
233
+ private updateSvgTransform;
234
+ /**
235
+ * Save data to file.
236
+ */
237
+ private saveData;
238
+ /**
239
+ * Load data from file.
240
+ */
241
+ private loadData;
242
+ /**
243
+ * Clear all data.
244
+ */
245
+ private clearData;
246
+ /**
247
+ * Load animation code from catalog.
248
+ */
249
+ private loadAnimationCode;
250
+ /**
251
+ * Add a new variable.
252
+ */
253
+ private addVariable;
254
+ /**
255
+ * Delete a variable.
256
+ */
257
+ private deleteVariable;
258
+ /**
259
+ * Edit a variable.
260
+ */
261
+ private editVariable;
262
+ /**
263
+ * Delete all variables.
264
+ */
265
+ private deleteAllVariables;
266
+ /**
267
+ * Refresh the variables table.
268
+ */
269
+ private refreshVariablesTable;
270
+ /**
271
+ * Show a message in the message panel.
272
+ */
273
+ private showMessage;
274
+ /**
275
+ * Apply syntax highlighting to SVG textarea.
276
+ */
277
+ private highlightSvg;
278
+ /**
279
+ * Apply syntax highlighting to JS textarea.
280
+ */
281
+ private highlightJs;
282
+ /**
283
+ * Sync scroll position for SVG textarea and highlight container.
284
+ */
285
+ private syncSvgScroll;
286
+ /**
287
+ * Sync scroll position for JS textarea and highlight container.
288
+ */
289
+ private syncJsScroll;
290
+ /**
291
+ * Fire a custom event.
292
+ */
293
+ private fireEvent;
294
+ /**
295
+ * Get component styles.
296
+ */
297
+ private getStyles;
298
+ }
@@ -0,0 +1,32 @@
1
+ import { OperationHint } from "../settings/hint-models";
2
+ /**
3
+ * String name-value pair used for hint variables.
4
+ */
5
+ export interface StringPair {
6
+ name: string;
7
+ value: string;
8
+ }
9
+ /**
10
+ * Data model for the hint designer component.
11
+ */
12
+ export interface HintDesignerData {
13
+ /** Dictionary of hints, keyed by hint ID */
14
+ hints: Record<string, OperationHint>;
15
+ /** Catalog of animation JS code fragments, keyed by ID */
16
+ animations: Record<string, string>;
17
+ }
18
+ /**
19
+ * Settings for the hint designer component.
20
+ */
21
+ export interface HintDesignerSettings {
22
+ /** Width of the hint's SVG design area in the editor */
23
+ hintDesignWidth: number;
24
+ /** Height of the hint's SVG design area in the editor */
25
+ hintDesignHeight: number;
26
+ /** Debug mode for verbose logging */
27
+ debug: boolean;
28
+ }
29
+ /**
30
+ * Default settings for the hint designer component.
31
+ */
32
+ export declare const DEFAULT_HINT_DESIGNER_SETTINGS: HintDesignerSettings;