@myrmidon/gve-snapshot-rendition 0.0.1 → 0.0.3

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/README.md CHANGED
@@ -16,6 +16,11 @@ Operations also inject metadata, in form of features (essentially name=value pai
16
16
 
17
17
  Both hints and animations are part of the settings for the component. The component is found under [src/core/gve-snapshot-rendition.ts](src/core/gve-snapshot-rendition.ts), and most of its logic is properly encapsulated in its own set of classes, following a systematic separation of concerns to ensure flexibility, extendibility, and easy maintenance.
18
18
 
19
+ ## Usage Guide
20
+
21
+ - [Angular integration](docs/dev/angular-integration.md)
22
+ - [vanilla integration](docs/dev/vanilla-integration.md)
23
+
19
24
  ## Documentation
20
25
 
21
26
  Conceptual documentation and sample data:
@@ -133,3 +138,16 @@ npm unpublish @myrmidon/gve-snapshot-rendition --force
133
138
  ```
134
139
 
135
140
  >⚠️ Unpublishing can break projects that depend on your package. Only do this for critical security issues or accidental publications.
141
+
142
+ Package structure:
143
+
144
+ ```txt
145
+ @myrmidon/gve-snapshot-rendition/
146
+ ├── dist/
147
+ │ ├── index.js # ES Module bundle
148
+ │ ├── index.d.ts # TypeScript declarations
149
+ │ ├── index.cjs.min.js # CommonJS bundle (minified)
150
+ │ └── ...
151
+ ├── README.md
152
+ └── LICENSE
153
+ ```
@@ -23,6 +23,8 @@ export declare class GveHintDesigner extends HTMLElement {
23
23
  private _svgHighlightContainer?;
24
24
  private _jsHighlightContainer?;
25
25
  private _hintsDropdown?;
26
+ private _svgWordWrapEnabled;
27
+ private _jsWordWrapEnabled;
26
28
  private _animationsDropdown?;
27
29
  private _embeddedJsCheckbox?;
28
30
  private _newAnimationCheckbox?;
@@ -39,6 +41,8 @@ export declare class GveHintDesigner extends HTMLElement {
39
41
  private _pauseButton?;
40
42
  private _restartButton?;
41
43
  private _progressBar?;
44
+ private _variablesValidationMsg?;
45
+ private _variablesPanelHeader?;
42
46
  private _currentTimeline?;
43
47
  private _isPlaying;
44
48
  private _progressUpdateInterval?;
@@ -120,7 +124,10 @@ export declare class GveHintDesigner extends HTMLElement {
120
124
  */
121
125
  private createPositionSelect;
122
126
  /**
123
- * Make a panel resizable.
127
+ * Make a splitter resizable between two panels.
128
+ * @param panelAbove The panel above the splitter
129
+ * @param _panelBelow The panel below the splitter (unused but kept for API clarity)
130
+ * @param splitter The splitter element between them
124
131
  */
125
132
  private makeResizable;
126
133
  /**
@@ -163,6 +170,11 @@ export declare class GveHintDesigner extends HTMLElement {
163
170
  * Clear the hint form.
164
171
  */
165
172
  private clearHintForm;
173
+ /**
174
+ * Validate SVG code for well-formedness and structure.
175
+ * Returns an error message if validation fails, or null if valid.
176
+ */
177
+ private validateSvgCode;
166
178
  /**
167
179
  * Add a new hint.
168
180
  */
@@ -187,6 +199,19 @@ export declare class GveHintDesigner extends HTMLElement {
187
199
  * Resolve variables in SVG code.
188
200
  */
189
201
  private resolveVariables;
202
+ /**
203
+ * Extract variable names from SVG code (variables in {{...}} placeholders).
204
+ */
205
+ private extractVariablesFromSvg;
206
+ /**
207
+ * Validate SVG variables and update validation message.
208
+ * Shows a warning if any variables used in SVG are not defined in hint variables.
209
+ */
210
+ private validateSvgVariables;
211
+ /**
212
+ * Update warning icon in variables panel header.
213
+ */
214
+ private updateVariablesHeaderWarning;
190
215
  /**
191
216
  * Play animation.
192
217
  */
@@ -231,6 +256,18 @@ export declare class GveHintDesigner extends HTMLElement {
231
256
  * Update SVG transform based on zoom and pan.
232
257
  */
233
258
  private updateSvgTransform;
259
+ /**
260
+ * Size to fit the SVG content.
261
+ */
262
+ private sizeToFit;
263
+ /**
264
+ * Toggle word wrap for SVG textarea.
265
+ */
266
+ private toggleSvgWordWrap;
267
+ /**
268
+ * Toggle word wrap for JS textarea.
269
+ */
270
+ private toggleJsWordWrap;
234
271
  /**
235
272
  * Save data to file.
236
273
  */
@@ -263,6 +300,17 @@ export declare class GveHintDesigner extends HTMLElement {
263
300
  * Delete all variables.
264
301
  */
265
302
  private deleteAllVariables;
303
+ /**
304
+ * Extract all variable names from all hints in data.
305
+ * Returns a sorted array of unique variable names.
306
+ */
307
+ private extractAllVariablesFromHints;
308
+ /**
309
+ * Populate hint variables from all hints.
310
+ * Extracts all variables from all hints' SVG code and merges them into hintVariables.
311
+ * Only adds variables that don't already exist.
312
+ */
313
+ private populateVariablesFromHints;
266
314
  /**
267
315
  * Refresh the variables table.
268
316
  */