@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
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Models and types for the feature adapter system.
|
|
3
|
-
*/
|
|
4
|
-
import { Feature } from "../models.js";
|
|
5
|
-
/**
|
|
6
|
-
* Comparison operator for feature matching.
|
|
7
|
-
*/
|
|
8
|
-
export declare enum ComparisonOperator {
|
|
9
|
-
/** Equals (string) */
|
|
10
|
-
EQUALS = "=",
|
|
11
|
-
/** Not equals (string) */
|
|
12
|
-
NOT_EQUALS = "!=",
|
|
13
|
-
/** Starts with */
|
|
14
|
-
STARTS_WITH = "^=",
|
|
15
|
-
/** Ends with */
|
|
16
|
-
ENDS_WITH = "$=",
|
|
17
|
-
/** Contains */
|
|
18
|
-
CONTAINS = "*=",
|
|
19
|
-
/** Matches wildcards (? and *) */
|
|
20
|
-
MATCHES_WILDCARDS = "?=",
|
|
21
|
-
/** Matches regular expression */
|
|
22
|
-
MATCHES_REGEX = "~",
|
|
23
|
-
/** Numeric equals */
|
|
24
|
-
NUMERIC_EQUALS = "==",
|
|
25
|
-
/** Numeric not equals */
|
|
26
|
-
NUMERIC_NOT_EQUALS = "<>",
|
|
27
|
-
/** Numeric greater than */
|
|
28
|
-
NUMERIC_GT = ">",
|
|
29
|
-
/** Numeric less than */
|
|
30
|
-
NUMERIC_LT = "<",
|
|
31
|
-
/** Numeric greater than or equal */
|
|
32
|
-
NUMERIC_GTE = ">=",
|
|
33
|
-
/** Numeric less than or equal */
|
|
34
|
-
NUMERIC_LTE = "<="
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Logical operator for combining clauses.
|
|
38
|
-
*/
|
|
39
|
-
export declare enum LogicalOperator {
|
|
40
|
-
AND = "AND",
|
|
41
|
-
OR = "OR",
|
|
42
|
-
AND_NOT = "AND NOT",
|
|
43
|
-
OR_NOT = "OR NOT"
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Token type for DSL parsing.
|
|
47
|
-
*/
|
|
48
|
-
export declare enum TokenType {
|
|
49
|
-
/** Feature name */
|
|
50
|
-
NAME = 0,
|
|
51
|
-
/** Comparison operator */
|
|
52
|
-
OPERATOR = 1,
|
|
53
|
-
/** Value (quoted or unquoted) */
|
|
54
|
-
VALUE = 2,
|
|
55
|
-
/** Logical operator (AND, OR, AND NOT, OR NOT) */
|
|
56
|
-
LOGICAL = 3,
|
|
57
|
-
/** Left parenthesis */
|
|
58
|
-
LPAREN = 4,
|
|
59
|
-
/** Right parenthesis */
|
|
60
|
-
RPAREN = 5,
|
|
61
|
-
/** Left square bracket for group capture */
|
|
62
|
-
LBRACKET = 6,
|
|
63
|
-
/** Right square bracket for group capture */
|
|
64
|
-
RBRACKET = 7,
|
|
65
|
-
/** Colon (used in named groups) */
|
|
66
|
-
COLON = 8,
|
|
67
|
-
/** End of input */
|
|
68
|
-
EOF = 9
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Token from DSL parsing.
|
|
72
|
-
*/
|
|
73
|
-
export interface Token {
|
|
74
|
-
type: TokenType;
|
|
75
|
-
value: string;
|
|
76
|
-
position: number;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* A single clause in a pattern (e.g., "name=value").
|
|
80
|
-
*/
|
|
81
|
-
export interface Clause {
|
|
82
|
-
/** Feature name to match */
|
|
83
|
-
name: string;
|
|
84
|
-
/** Comparison operator (optional if just matching by name) */
|
|
85
|
-
operator?: ComparisonOperator;
|
|
86
|
-
/** Value to compare against (optional if just matching by name) */
|
|
87
|
-
value?: string;
|
|
88
|
-
/** Whether this clause should be captured as a group */
|
|
89
|
-
capture?: boolean;
|
|
90
|
-
/** Group name (if named capture), or undefined for numbered capture */
|
|
91
|
-
groupName?: string;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Pattern expression node (for AST representation).
|
|
95
|
-
*/
|
|
96
|
-
export interface PatternExpression {
|
|
97
|
-
type: "clause" | "logical";
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Clause expression node.
|
|
101
|
-
*/
|
|
102
|
-
export interface ClauseExpression extends PatternExpression {
|
|
103
|
-
type: "clause";
|
|
104
|
-
clause: Clause;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Logical expression node (binary operation).
|
|
108
|
-
*/
|
|
109
|
-
export interface LogicalExpression extends PatternExpression {
|
|
110
|
-
type: "logical";
|
|
111
|
-
operator: LogicalOperator;
|
|
112
|
-
left: PatternExpression;
|
|
113
|
-
right: PatternExpression;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Result of matching a pattern against features.
|
|
117
|
-
*/
|
|
118
|
-
export interface MatchResult {
|
|
119
|
-
/** Whether the pattern matched */
|
|
120
|
-
matched: boolean;
|
|
121
|
-
/** Captured groups (keyed by group name or number as string) */
|
|
122
|
-
captures: Map<string, CapturedGroup>;
|
|
123
|
-
/** Features that were matched */
|
|
124
|
-
matchedFeatures: Feature[];
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* A captured group from pattern matching.
|
|
128
|
-
*/
|
|
129
|
-
export interface CapturedGroup {
|
|
130
|
-
name: string;
|
|
131
|
-
value: string;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Mode for feature processing.
|
|
135
|
-
*/
|
|
136
|
-
export declare enum ProcessingMode {
|
|
137
|
-
/** Add features without removing matched ones */
|
|
138
|
-
ADD = "add",
|
|
139
|
-
/** Replace: remove matched features, then add new ones */
|
|
140
|
-
REPLACE = "replace"
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* A single adapter operation configuration.
|
|
144
|
-
*/
|
|
145
|
-
export interface AdapterOperation {
|
|
146
|
-
/** Pattern DSL string to match features */
|
|
147
|
-
pattern: string;
|
|
148
|
-
/** Features to add (with format "name=value", can include placeholders) */
|
|
149
|
-
features: string[];
|
|
150
|
-
/** Processing mode (default: add) */
|
|
151
|
-
mode?: ProcessingMode;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Configuration for the feature adapter.
|
|
155
|
-
*/
|
|
156
|
-
export interface FeatureAdapterSettings {
|
|
157
|
-
/** List of adapter operations to apply in order */
|
|
158
|
-
operations: AdapterOperation[];
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Error thrown during DSL parsing or pattern matching.
|
|
162
|
-
*/
|
|
163
|
-
export declare class AdapterError extends Error {
|
|
164
|
-
position?: number | undefined;
|
|
165
|
-
context?: string | undefined;
|
|
166
|
-
constructor(message: string, position?: number | undefined, context?: string | undefined);
|
|
167
|
-
/**
|
|
168
|
-
* Format error message with context.
|
|
169
|
-
*/
|
|
170
|
-
toString(): string;
|
|
171
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Data feature adapter for applying feature transformations to CharChainResult data.
|
|
3
|
-
*/
|
|
4
|
-
import { CharChainResult } from "../models";
|
|
5
|
-
import { FeatureAdapterSettings } from "./adapter-models";
|
|
6
|
-
/**
|
|
7
|
-
* Adapter service that applies feature transformations to CharChainResult data.
|
|
8
|
-
* This service creates a copy of the data and adapts all features except those
|
|
9
|
-
* belonging to operation metadata.
|
|
10
|
-
*/
|
|
11
|
-
export declare class DataFeatureAdapter {
|
|
12
|
-
private featureAdapter;
|
|
13
|
-
constructor(settings: FeatureAdapterSettings);
|
|
14
|
-
/**
|
|
15
|
-
* Adapt all features in the CharChainResult data.
|
|
16
|
-
* Returns a new copy of the data with adapted features.
|
|
17
|
-
*
|
|
18
|
-
* Features adapted:
|
|
19
|
-
* - globalFeatures[tag][i] (global features per version)
|
|
20
|
-
* - nodes[i].features[tag][j] (per-node, per-version features)
|
|
21
|
-
*
|
|
22
|
-
* Features NOT adapted:
|
|
23
|
-
* - steps[i].operation.features (operation metadata)
|
|
24
|
-
*/
|
|
25
|
-
adaptData(data: CharChainResult): CharChainResult;
|
|
26
|
-
/**
|
|
27
|
-
* Deep copy the CharChainResult data structure.
|
|
28
|
-
*/
|
|
29
|
-
private deepCopyData;
|
|
30
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Feature adapter service for transforming feature sets.
|
|
3
|
-
*/
|
|
4
|
-
import { FeatureAdapterSettings } from "./adapter-models";
|
|
5
|
-
import { Feature } from "../models";
|
|
6
|
-
/**
|
|
7
|
-
* Service for adapting features based on configured operations.
|
|
8
|
-
*/
|
|
9
|
-
export declare class FeatureAdapter {
|
|
10
|
-
private settings;
|
|
11
|
-
private compiledPatterns;
|
|
12
|
-
private matcher;
|
|
13
|
-
constructor(settings: FeatureAdapterSettings);
|
|
14
|
-
/**
|
|
15
|
-
* Adapt a feature array by applying all configured operations.
|
|
16
|
-
*/
|
|
17
|
-
adapt(features: Feature[]): Feature[];
|
|
18
|
-
/**
|
|
19
|
-
* Apply a single operation to a feature array.
|
|
20
|
-
*/
|
|
21
|
-
private applyOperation;
|
|
22
|
-
/**
|
|
23
|
-
* Create features from feature specifications, resolving placeholders.
|
|
24
|
-
*/
|
|
25
|
-
private createFeatures;
|
|
26
|
-
/**
|
|
27
|
-
* Resolve placeholders in a string (e.g., $1.value, $color.name).
|
|
28
|
-
*/
|
|
29
|
-
private resolvePlaceholders;
|
|
30
|
-
/**
|
|
31
|
-
* Pre-compile all patterns to detect errors early.
|
|
32
|
-
*/
|
|
33
|
-
private compilePatterns;
|
|
34
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Feature adapter module - public API.
|
|
3
|
-
*/
|
|
4
|
-
export { FeatureAdapter } from "./feature-adapter.js";
|
|
5
|
-
export { DataFeatureAdapter } from "./data-feature-adapter.js";
|
|
6
|
-
export type { FeatureAdapterSettings, AdapterOperation, ProcessingMode, ComparisonOperator, LogicalOperator, AdapterError, } from "./adapter-models.js";
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Feature matching engine for the adapter.
|
|
3
|
-
*/
|
|
4
|
-
import { PatternExpression, MatchResult } from "./adapter-models";
|
|
5
|
-
import { Feature } from "../models";
|
|
6
|
-
/**
|
|
7
|
-
* Matches features against a pattern expression.
|
|
8
|
-
*/
|
|
9
|
-
export declare class FeatureMatcher {
|
|
10
|
-
/**
|
|
11
|
-
* Match features against a parsed pattern expression.
|
|
12
|
-
*/
|
|
13
|
-
match(features: Feature[], expression: PatternExpression): MatchResult;
|
|
14
|
-
/**
|
|
15
|
-
* Evaluate a pattern expression against features.
|
|
16
|
-
*/
|
|
17
|
-
private evaluateExpression;
|
|
18
|
-
/**
|
|
19
|
-
* Evaluate a clause against features.
|
|
20
|
-
*/
|
|
21
|
-
private evaluateClause;
|
|
22
|
-
/**
|
|
23
|
-
* Check if a single feature matches a clause.
|
|
24
|
-
*/
|
|
25
|
-
private matchFeature;
|
|
26
|
-
/**
|
|
27
|
-
* Compare values using the specified operator.
|
|
28
|
-
*/
|
|
29
|
-
private compareValues;
|
|
30
|
-
/**
|
|
31
|
-
* Match a value against a wildcard pattern (? and *).
|
|
32
|
-
*/
|
|
33
|
-
private matchWildcard;
|
|
34
|
-
/**
|
|
35
|
-
* Compare numeric values.
|
|
36
|
-
*/
|
|
37
|
-
private compareNumeric;
|
|
38
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parser for the feature adapter DSL.
|
|
3
|
-
* Implements recursive descent parsing with operator precedence:
|
|
4
|
-
* 1. NOT (highest)
|
|
5
|
-
* 2. AND
|
|
6
|
-
* 3. OR (lowest)
|
|
7
|
-
*/
|
|
8
|
-
import { PatternExpression } from "./adapter-models";
|
|
9
|
-
/**
|
|
10
|
-
* Parser for DSL patterns.
|
|
11
|
-
*/
|
|
12
|
-
export declare class Parser {
|
|
13
|
-
private input;
|
|
14
|
-
private tokens;
|
|
15
|
-
private position;
|
|
16
|
-
private current;
|
|
17
|
-
private groupCounter;
|
|
18
|
-
constructor(input: string);
|
|
19
|
-
/**
|
|
20
|
-
* Parse the pattern and return the AST.
|
|
21
|
-
*/
|
|
22
|
-
parse(): PatternExpression;
|
|
23
|
-
/**
|
|
24
|
-
* Parse OR expression (lowest precedence).
|
|
25
|
-
* or_expr := and_expr (OR and_expr | OR NOT and_expr)*
|
|
26
|
-
*/
|
|
27
|
-
private parseOrExpression;
|
|
28
|
-
/**
|
|
29
|
-
* Parse AND expression (middle precedence).
|
|
30
|
-
* and_expr := primary (AND primary | AND NOT primary)*
|
|
31
|
-
*/
|
|
32
|
-
private parseAndExpression;
|
|
33
|
-
/**
|
|
34
|
-
* Parse primary expression (clause or grouped expression).
|
|
35
|
-
* primary := clause | '(' or_expr ')' | '[' clause ']' | '[' NAME ':' clause ']'
|
|
36
|
-
*/
|
|
37
|
-
private parsePrimary;
|
|
38
|
-
/**
|
|
39
|
-
* Parse a captured clause: [name:clause] or [clause]
|
|
40
|
-
*/
|
|
41
|
-
private parseCapturedClause;
|
|
42
|
-
/**
|
|
43
|
-
* Parse a clause: name [operator value]
|
|
44
|
-
*/
|
|
45
|
-
private parseClause;
|
|
46
|
-
/**
|
|
47
|
-
* Advance to the next token.
|
|
48
|
-
*/
|
|
49
|
-
private advance;
|
|
50
|
-
/**
|
|
51
|
-
* Peek at the next token without consuming it.
|
|
52
|
-
*/
|
|
53
|
-
private peek;
|
|
54
|
-
/**
|
|
55
|
-
* Get context around a position for error messages.
|
|
56
|
-
*/
|
|
57
|
-
private getContext;
|
|
58
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tokenizer for the feature adapter DSL.
|
|
3
|
-
*/
|
|
4
|
-
import { Token } from "./adapter-models";
|
|
5
|
-
/**
|
|
6
|
-
* Tokenizes a DSL pattern string into tokens.
|
|
7
|
-
*/
|
|
8
|
-
export declare class Tokenizer {
|
|
9
|
-
private input;
|
|
10
|
-
private position;
|
|
11
|
-
private current;
|
|
12
|
-
private expectValue;
|
|
13
|
-
constructor(input: string);
|
|
14
|
-
/**
|
|
15
|
-
* Tokenize the entire input.
|
|
16
|
-
*/
|
|
17
|
-
tokenize(): Token[];
|
|
18
|
-
/**
|
|
19
|
-
* Get the next token from input.
|
|
20
|
-
*/
|
|
21
|
-
private nextToken;
|
|
22
|
-
/**
|
|
23
|
-
* Try to read a comparison operator.
|
|
24
|
-
*/
|
|
25
|
-
private tryReadOperator;
|
|
26
|
-
/**
|
|
27
|
-
* Read a quoted string (handles escape sequences).
|
|
28
|
-
*/
|
|
29
|
-
private readQuotedString;
|
|
30
|
-
/**
|
|
31
|
-
* Read a word (name or keyword).
|
|
32
|
-
*/
|
|
33
|
-
private readWord;
|
|
34
|
-
/**
|
|
35
|
-
* Read an unquoted value (after an operator).
|
|
36
|
-
* Values can include special characters like *, ?, ^, $, etc.
|
|
37
|
-
*/
|
|
38
|
-
private readUnquotedValue;
|
|
39
|
-
/**
|
|
40
|
-
* Peek at the next word without consuming it.
|
|
41
|
-
*/
|
|
42
|
-
private peekWord;
|
|
43
|
-
/**
|
|
44
|
-
* Skip whitespace.
|
|
45
|
-
*/
|
|
46
|
-
private skipWhitespace;
|
|
47
|
-
/**
|
|
48
|
-
* Advance to next character.
|
|
49
|
-
*/
|
|
50
|
-
private advance;
|
|
51
|
-
/**
|
|
52
|
-
* Get context around current position for error messages.
|
|
53
|
-
*/
|
|
54
|
-
private getContext;
|
|
55
|
-
}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { Logger } from "../core/logger";
|
|
2
|
-
import { AnimationFactory, AnimationFunction } from "./animation-factory";
|
|
3
|
-
/**
|
|
4
|
-
* Animation engine that wraps GSAP and provides a consistent API.
|
|
5
|
-
*/
|
|
6
|
-
export declare class AnimationEngine {
|
|
7
|
-
private _gsap;
|
|
8
|
-
private _logger;
|
|
9
|
-
private _factory;
|
|
10
|
-
constructor(gsap: any, logger: Logger);
|
|
11
|
-
/**
|
|
12
|
-
* Get the animation factory.
|
|
13
|
-
*/
|
|
14
|
-
getFactory(): AnimationFactory;
|
|
15
|
-
/**
|
|
16
|
-
* Animate an element with an animation function.
|
|
17
|
-
*
|
|
18
|
-
* @param element - The target SVG element
|
|
19
|
-
* @param animation - The animation function to execute
|
|
20
|
-
* @param rootElement - The root SVG element
|
|
21
|
-
* @returns Promise that resolves when animation completes
|
|
22
|
-
*/
|
|
23
|
-
animate(element: SVGElement, animation: AnimationFunction, rootElement: SVGElement): Promise<void>;
|
|
24
|
-
/**
|
|
25
|
-
* Fade in multiple elements (used for hilites).
|
|
26
|
-
*
|
|
27
|
-
* @param elements - Array of elements to fade in
|
|
28
|
-
* @param duration - Duration in milliseconds
|
|
29
|
-
* @returns Promise that resolves when animation completes
|
|
30
|
-
*/
|
|
31
|
-
fadeIn(elements: SVGElement[], duration: number): Promise<void>;
|
|
32
|
-
/**
|
|
33
|
-
* Fade out multiple elements (used for hilites).
|
|
34
|
-
*
|
|
35
|
-
* @param elements - Array of elements to fade out
|
|
36
|
-
* @param duration - Duration in milliseconds
|
|
37
|
-
* @returns Promise that resolves when animation completes
|
|
38
|
-
*/
|
|
39
|
-
fadeOut(elements: SVGElement[], duration: number): Promise<void>;
|
|
40
|
-
/**
|
|
41
|
-
* Animate pan and zoom transition.
|
|
42
|
-
*
|
|
43
|
-
* @param panZoomInstance - The svg-pan-zoom instance
|
|
44
|
-
* @param newPan - New pan coordinates {x, y}
|
|
45
|
-
* @param newZoom - New zoom level
|
|
46
|
-
* @param duration - Duration in milliseconds
|
|
47
|
-
* @returns Promise that resolves when animation completes
|
|
48
|
-
*/
|
|
49
|
-
animatePanZoom(panZoomInstance: any, newPan: {
|
|
50
|
-
x: number;
|
|
51
|
-
y: number;
|
|
52
|
-
}, newZoom: number, duration: number): Promise<void>;
|
|
53
|
-
/**
|
|
54
|
-
* Animate prolog panning to make an element visible.
|
|
55
|
-
* This gracefully pans the viewport so there is room to display an element
|
|
56
|
-
* that would otherwise fall outside the visible area.
|
|
57
|
-
*
|
|
58
|
-
* @param panZoomInstance - The svg-pan-zoom instance
|
|
59
|
-
* @param elementBounds - Bounding rectangle of the element to make visible
|
|
60
|
-
* @param viewportWidth - Width of the visible viewport
|
|
61
|
-
* @param viewportHeight - Height of the visible viewport
|
|
62
|
-
* @param duration - Duration in milliseconds
|
|
63
|
-
* @returns Promise that resolves when animation completes
|
|
64
|
-
*/
|
|
65
|
-
animateProlog(panZoomInstance: any, elementBounds: {
|
|
66
|
-
x: number;
|
|
67
|
-
y: number;
|
|
68
|
-
width: number;
|
|
69
|
-
height: number;
|
|
70
|
-
}, viewportWidth: number, viewportHeight: number, duration: number): Promise<void>;
|
|
71
|
-
/**
|
|
72
|
-
* Calculate the pan adjustment needed to make an element visible.
|
|
73
|
-
* Returns null if the element is already fully visible.
|
|
74
|
-
*
|
|
75
|
-
* @param elementBounds - Bounding rectangle of the element in SVG coordinates
|
|
76
|
-
* @param panZoomInstance - The svg-pan-zoom instance
|
|
77
|
-
* @param viewportWidth - Width of the visible viewport
|
|
78
|
-
* @param viewportHeight - Height of the visible viewport
|
|
79
|
-
* @returns New pan coordinates or null if no adjustment needed
|
|
80
|
-
*/
|
|
81
|
-
private calculatePrologPan;
|
|
82
|
-
/**
|
|
83
|
-
* Check if an element is fully visible in the current viewport.
|
|
84
|
-
*
|
|
85
|
-
* @param elementBounds - Bounding rectangle of the element in SVG coordinates
|
|
86
|
-
* @param panZoomInstance - The svg-pan-zoom instance
|
|
87
|
-
* @param viewportWidth - Width of the visible viewport
|
|
88
|
-
* @param viewportHeight - Height of the visible viewport
|
|
89
|
-
* @returns True if element is fully visible, false otherwise
|
|
90
|
-
*/
|
|
91
|
-
isElementVisible(elementBounds: {
|
|
92
|
-
x: number;
|
|
93
|
-
y: number;
|
|
94
|
-
width: number;
|
|
95
|
-
height: number;
|
|
96
|
-
}, panZoomInstance: any, viewportWidth: number, viewportHeight: number): boolean;
|
|
97
|
-
/**
|
|
98
|
-
* Kill all active animations.
|
|
99
|
-
*/
|
|
100
|
-
killAll(): void;
|
|
101
|
-
/**
|
|
102
|
-
* Get the GSAP instance.
|
|
103
|
-
*/
|
|
104
|
-
getGsap(): any;
|
|
105
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Logger } from "../core/logger";
|
|
2
|
-
/**
|
|
3
|
-
* Animation function signature.
|
|
4
|
-
* Receives gsap instance, target element, and root SVG element.
|
|
5
|
-
* Returns a Promise that resolves when animation completes.
|
|
6
|
-
*/
|
|
7
|
-
export type AnimationFunction = (gsap: any, targetEl: SVGElement, rootEl: SVGElement) => Promise<void>;
|
|
8
|
-
/**
|
|
9
|
-
* Factory for creating animation functions from code strings.
|
|
10
|
-
* This wraps user-provided GSAP animation code into executable functions.
|
|
11
|
-
*/
|
|
12
|
-
export declare class AnimationFactory {
|
|
13
|
-
private _logger;
|
|
14
|
-
private _gsap;
|
|
15
|
-
constructor(gsap: any, logger: Logger);
|
|
16
|
-
/**
|
|
17
|
-
* Create an animation function from a code string.
|
|
18
|
-
*
|
|
19
|
-
* @param code - The JavaScript code as a string that uses GSAP
|
|
20
|
-
* @param label - Optional label for debugging
|
|
21
|
-
* @returns An animation function that returns a Promise
|
|
22
|
-
*/
|
|
23
|
-
createAnimation(code: string, label?: string): AnimationFunction;
|
|
24
|
-
/**
|
|
25
|
-
* Create an animation function from an ID reference.
|
|
26
|
-
* The ID should exist in the animations catalog.
|
|
27
|
-
*
|
|
28
|
-
* @param animationId - The ID of the animation (with or without # prefix)
|
|
29
|
-
* @param animationsCatalog - The catalog of animations from settings
|
|
30
|
-
* @param label - Optional label for debugging
|
|
31
|
-
* @returns An animation function or undefined if not found
|
|
32
|
-
*/
|
|
33
|
-
createAnimationFromId(animationId: string, animationsCatalog: Record<string, string>, label?: string): AnimationFunction | undefined;
|
|
34
|
-
/**
|
|
35
|
-
* Resolve an animation property value to an animation function.
|
|
36
|
-
* Handles both direct code strings and ID references.
|
|
37
|
-
*
|
|
38
|
-
* @param animationValue - Either a code string or an ID reference (starting with #)
|
|
39
|
-
* @param animationsCatalog - The catalog of animations from settings
|
|
40
|
-
* @param label - Optional label for debugging
|
|
41
|
-
* @returns An animation function or undefined
|
|
42
|
-
*/
|
|
43
|
-
resolveAnimation(animationValue: string | undefined, animationsCatalog: Record<string, string>, label?: string): AnimationFunction | undefined;
|
|
44
|
-
/**
|
|
45
|
-
* Create a no-op animation that resolves immediately.
|
|
46
|
-
* Used when no animation is specified.
|
|
47
|
-
*/
|
|
48
|
-
createNoOpAnimation(): AnimationFunction;
|
|
49
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generate a pastel color palette for version tags with maximum visual distinction.
|
|
3
|
-
* Uses HSL color space to generate evenly distributed, light, pastel colors.
|
|
4
|
-
*/
|
|
5
|
-
export declare class ColorPalette {
|
|
6
|
-
private colors;
|
|
7
|
-
/**
|
|
8
|
-
* Generate a pastel color for a given version tag.
|
|
9
|
-
* The color generation is idempotent - same version tag always generates the same color.
|
|
10
|
-
* @param versionTag - Version tag (e.g., "v0", "v1", "v2")
|
|
11
|
-
* @returns Pastel color as hex string (e.g., "#FFE4E1")
|
|
12
|
-
*/
|
|
13
|
-
getColor(versionTag: string): string;
|
|
14
|
-
/**
|
|
15
|
-
* Extract version number from version tag.
|
|
16
|
-
* @param versionTag - Version tag like "v0", "v1", etc.
|
|
17
|
-
* @returns Version number
|
|
18
|
-
*/
|
|
19
|
-
private extractVersionNumber;
|
|
20
|
-
/**
|
|
21
|
-
* Generate a pastel color using HSL color space with golden ratio distribution.
|
|
22
|
-
* This ensures maximum visual distinction between colors.
|
|
23
|
-
* @param index - Version index number
|
|
24
|
-
* @returns Hex color string
|
|
25
|
-
*/
|
|
26
|
-
private generatePastelColor;
|
|
27
|
-
/**
|
|
28
|
-
* Convert HSL to hex color.
|
|
29
|
-
* @param h - Hue (0-360)
|
|
30
|
-
* @param s - Saturation (0-100)
|
|
31
|
-
* @param l - Lightness (0-100)
|
|
32
|
-
* @returns Hex color string
|
|
33
|
-
*/
|
|
34
|
-
private hslToHex;
|
|
35
|
-
/**
|
|
36
|
-
* Clear all cached colors.
|
|
37
|
-
*/
|
|
38
|
-
clear(): void;
|
|
39
|
-
}
|