@gesslar/sassy 0.22.0 → 0.23.0
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 +1 -1
- package/package.json +47 -47
- package/src/BuildCommand.js +2 -2
- package/src/Colour.js +1 -2
- package/src/Command.js +1 -1
- package/src/Compiler.js +2 -3
- package/src/LintCommand.js +0 -1
- package/src/Session.js +6 -8
- package/src/Theme.js +4 -4
- package/types/BuildCommand.d.ts +0 -40
- package/types/Colour.d.ts +0 -126
- package/types/Command.d.ts +0 -135
- package/types/Compiler.d.ts +0 -16
- package/types/Evaluator.d.ts +0 -86
- package/types/LintCommand.d.ts +0 -58
- package/types/ResolveCommand.d.ts +0 -58
- package/types/Session.d.ts +0 -132
- package/types/Theme.d.ts +0 -336
- package/types/ThemePool.d.ts +0 -81
- package/types/ThemeToken.d.ts +0 -150
- package/types/cli.d.ts +0 -2
- package/types/index.d.ts +0 -9
package/types/ThemePool.d.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ThemePool represents a collection of ThemeTokens serving both as a
|
|
3
|
-
* lookup of string>ThemeToken and dependencies.
|
|
4
|
-
*
|
|
5
|
-
* @class ThemePool
|
|
6
|
-
*/
|
|
7
|
-
export default class ThemePool {
|
|
8
|
-
/**
|
|
9
|
-
* Returns the map of encoded theme token ids to their token object.
|
|
10
|
-
*
|
|
11
|
-
* @returns {Map<string, ThemeToken>} Map of tokens to their children.
|
|
12
|
-
*/
|
|
13
|
-
getTokens(): Map<string, ThemeToken>;
|
|
14
|
-
/**
|
|
15
|
-
* Retrieves a resolved token by its name.
|
|
16
|
-
*
|
|
17
|
-
* @param {string} name - The token to look up.
|
|
18
|
-
* @returns {string|undefined} The resolved token string or undefined.
|
|
19
|
-
*/
|
|
20
|
-
lookup(name: string): string | undefined;
|
|
21
|
-
/**
|
|
22
|
-
* Sets a resolved value for a token key.
|
|
23
|
-
*
|
|
24
|
-
* @param {string} key - The token key.
|
|
25
|
-
* @param {string} value - The resolved value.
|
|
26
|
-
*/
|
|
27
|
-
resolve(key: string, value: string): void;
|
|
28
|
-
/**
|
|
29
|
-
* Sets a raw resolved value for a token key.
|
|
30
|
-
*
|
|
31
|
-
* @param {string} key - The token key.
|
|
32
|
-
* @param {string} value - The raw resolved value.
|
|
33
|
-
*/
|
|
34
|
-
rawResolve(key: string, value: string): void;
|
|
35
|
-
/**
|
|
36
|
-
* Checks if a token name exists in resolved map.
|
|
37
|
-
*
|
|
38
|
-
* @param {string} name - The token name to check.
|
|
39
|
-
* @returns {boolean} True if the token exists.
|
|
40
|
-
*/
|
|
41
|
-
has(name: string): boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Checks if a token exists by its name.
|
|
44
|
-
*
|
|
45
|
-
* @param {ThemeToken} token - The token to check.
|
|
46
|
-
* @returns {boolean} True if the token exists.
|
|
47
|
-
*/
|
|
48
|
-
hasToken(token: ThemeToken): boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Retrieves a token's dependency.
|
|
51
|
-
*
|
|
52
|
-
* @param {ThemeToken} token - The token to look up.
|
|
53
|
-
* @returns {ThemeToken?} The dependent token with the given token, or undefined.
|
|
54
|
-
*/
|
|
55
|
-
reverseLookup(token: ThemeToken): ThemeToken | null;
|
|
56
|
-
/**
|
|
57
|
-
* Adds a token to the pool, optionally setting up dependencies if required.
|
|
58
|
-
*
|
|
59
|
-
* @param {ThemeToken} token - The token to add.
|
|
60
|
-
* @param {ThemeToken} [dependency] - The dependent token.
|
|
61
|
-
* @returns {ThemeToken} The token that was added.
|
|
62
|
-
*/
|
|
63
|
-
addToken(token: ThemeToken, dependency?: ThemeToken): ThemeToken;
|
|
64
|
-
/**
|
|
65
|
-
* Finds a token by its value.
|
|
66
|
-
*
|
|
67
|
-
* @param {string} value - The value to search for.
|
|
68
|
-
* @returns {ThemeToken|undefined} The found token or undefined.
|
|
69
|
-
*/
|
|
70
|
-
findToken(value: string): ThemeToken | undefined;
|
|
71
|
-
/**
|
|
72
|
-
* Checks if one token is an ancestor of another using reverse lookup.
|
|
73
|
-
*
|
|
74
|
-
* @param {ThemeToken} candidate - Potential ancestor token.
|
|
75
|
-
* @param {ThemeToken} token - Potential descendant token.
|
|
76
|
-
* @returns {boolean} True if candidate is an ancestor of token.
|
|
77
|
-
*/
|
|
78
|
-
isAncestorOf(candidate: ThemeToken, token: ThemeToken): boolean;
|
|
79
|
-
#private;
|
|
80
|
-
}
|
|
81
|
-
import ThemeToken from "./ThemeToken.js";
|
package/types/ThemeToken.d.ts
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ThemeToken represents a single token in a theme tree, encapsulating theme
|
|
3
|
-
* token data and relationships.
|
|
4
|
-
*
|
|
5
|
-
* Provides property management, factory methods, tree integration, and
|
|
6
|
-
* serialization.
|
|
7
|
-
*
|
|
8
|
-
* @class ThemeToken
|
|
9
|
-
*/
|
|
10
|
-
export default class ThemeToken {
|
|
11
|
-
/**
|
|
12
|
-
* Constructs a ThemeToken with a given token name.
|
|
13
|
-
*
|
|
14
|
-
* @param {string} name - The token name for this token.
|
|
15
|
-
*/
|
|
16
|
-
constructor(name: string);
|
|
17
|
-
/**
|
|
18
|
-
* Adds this token to a ThemePool with optional dependency.
|
|
19
|
-
*
|
|
20
|
-
* @param {ThemePool} pool - The pool to add to.
|
|
21
|
-
* @param {ThemeToken} [dependency] - Optional dependency token.
|
|
22
|
-
* @returns {ThemeToken} This token instance.
|
|
23
|
-
*/
|
|
24
|
-
addToPool(pool?: ThemePool, dependency?: ThemeToken): ThemeToken;
|
|
25
|
-
/**
|
|
26
|
-
* Sets the name of this token (only if not already set).
|
|
27
|
-
*
|
|
28
|
-
* @param {string} name - The token name.
|
|
29
|
-
* @returns {ThemeToken} This token instance.
|
|
30
|
-
*/
|
|
31
|
-
setName(name: string): ThemeToken;
|
|
32
|
-
/**
|
|
33
|
-
* Gets the name of this token.
|
|
34
|
-
*
|
|
35
|
-
* @returns {string} The token name.
|
|
36
|
-
*/
|
|
37
|
-
getName(): string;
|
|
38
|
-
/**
|
|
39
|
-
* Sets the kind of this token (only if not already set).
|
|
40
|
-
*
|
|
41
|
-
* @param {string} kind - The token kind.
|
|
42
|
-
* @returns {ThemeToken} This token instance.
|
|
43
|
-
*/
|
|
44
|
-
setKind(kind: string): ThemeToken;
|
|
45
|
-
/**
|
|
46
|
-
* Gets the kind of this token.
|
|
47
|
-
*
|
|
48
|
-
* @returns {string} The token kind.
|
|
49
|
-
*/
|
|
50
|
-
getKind(): string;
|
|
51
|
-
/**
|
|
52
|
-
* Sets the value of this token.
|
|
53
|
-
*
|
|
54
|
-
* @param {string} value - The token value.
|
|
55
|
-
* @returns {ThemeToken} This token instance.
|
|
56
|
-
*/
|
|
57
|
-
setValue(value: string): ThemeToken;
|
|
58
|
-
/**
|
|
59
|
-
* Gets the value of this token.
|
|
60
|
-
*
|
|
61
|
-
* @returns {string} The token value.
|
|
62
|
-
*/
|
|
63
|
-
getValue(): string;
|
|
64
|
-
/**
|
|
65
|
-
* Sets the raw value of this token (only if not already set).
|
|
66
|
-
*
|
|
67
|
-
* @param {string} raw - The raw token value.
|
|
68
|
-
* @returns {ThemeToken} This token instance.
|
|
69
|
-
*/
|
|
70
|
-
setRawValue(raw: string): ThemeToken;
|
|
71
|
-
/**
|
|
72
|
-
* Gets the raw value of this token.
|
|
73
|
-
*
|
|
74
|
-
* @returns {string} The raw token value.
|
|
75
|
-
*/
|
|
76
|
-
getRawValue(): string;
|
|
77
|
-
/**
|
|
78
|
-
* Sets the dependency of this token (only if not already set).
|
|
79
|
-
*
|
|
80
|
-
* @param {ThemeToken} dependency - The dependency token.
|
|
81
|
-
* @returns {ThemeToken} This token instance.
|
|
82
|
-
*/
|
|
83
|
-
setDependency(dependency: ThemeToken): ThemeToken;
|
|
84
|
-
/**
|
|
85
|
-
* Gets the dependency of this token.
|
|
86
|
-
*
|
|
87
|
-
* @returns {ThemeToken|null} The dependency token or null.
|
|
88
|
-
*/
|
|
89
|
-
getDependency(): ThemeToken | null;
|
|
90
|
-
/**
|
|
91
|
-
* Sets the parent token key.
|
|
92
|
-
*
|
|
93
|
-
* @param {string} tokenKey - The parent token key.
|
|
94
|
-
* @returns {ThemeToken} This token instance.
|
|
95
|
-
*/
|
|
96
|
-
setParentTokenKey(tokenKey: string): ThemeToken;
|
|
97
|
-
/**
|
|
98
|
-
* Gets the parent token key.
|
|
99
|
-
*
|
|
100
|
-
* @returns {string|null} The parent token key or null.
|
|
101
|
-
*/
|
|
102
|
-
getParentTokenKey(): string | null;
|
|
103
|
-
/**
|
|
104
|
-
* Adds a trail of tokens to this token's trail array.
|
|
105
|
-
*
|
|
106
|
-
* @param {Array<ThemeToken>} trail - Array of tokens to add.
|
|
107
|
-
* @returns {ThemeToken} This token instance.
|
|
108
|
-
*/
|
|
109
|
-
addTrail(trail: Array<ThemeToken>): ThemeToken;
|
|
110
|
-
/**
|
|
111
|
-
* Gets the trail array of this token.
|
|
112
|
-
*
|
|
113
|
-
* @returns {Array<ThemeToken>} The trail array.
|
|
114
|
-
*/
|
|
115
|
-
getTrail(): Array<ThemeToken>;
|
|
116
|
-
/**
|
|
117
|
-
* Sets the parsed color object for this token.
|
|
118
|
-
*
|
|
119
|
-
* @param {object} parsedColor - The parsed Culori color object
|
|
120
|
-
* @returns {ThemeToken} This token instance.
|
|
121
|
-
*/
|
|
122
|
-
setParsedColor(parsedColor: object): ThemeToken;
|
|
123
|
-
/**
|
|
124
|
-
* Gets the parsed color object of this token.
|
|
125
|
-
*
|
|
126
|
-
* @returns {object|null} The parsed Culori color object or null.
|
|
127
|
-
*/
|
|
128
|
-
getParsedColor(): object | null;
|
|
129
|
-
/**
|
|
130
|
-
* Checks if this token has an ancestor with the given token name.
|
|
131
|
-
*
|
|
132
|
-
* @param {string} name - The name of the ancestor token to check for.
|
|
133
|
-
* @returns {boolean} True if ancestor exists.
|
|
134
|
-
*/
|
|
135
|
-
hasDependency(name: string): boolean;
|
|
136
|
-
/**
|
|
137
|
-
* Gets the ThemePool associated with this token.
|
|
138
|
-
*
|
|
139
|
-
* @returns {ThemePool} The associated pool.
|
|
140
|
-
*/
|
|
141
|
-
getPool(): ThemePool;
|
|
142
|
-
/**
|
|
143
|
-
* Returns a JSON representation of the ThemeToken.
|
|
144
|
-
*
|
|
145
|
-
* @returns {object} JSON representation of the ThemeToken
|
|
146
|
-
*/
|
|
147
|
-
toJSON(): object;
|
|
148
|
-
#private;
|
|
149
|
-
}
|
|
150
|
-
import ThemePool from "./ThemePool.js";
|
package/types/cli.d.ts
DELETED
package/types/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { default as Theme } from "./Theme.js";
|
|
2
|
-
export { default as Compiler } from "./Compiler.js";
|
|
3
|
-
export { default as Evaluator } from "./Evaluator.js";
|
|
4
|
-
export { default as Command } from "./Command.js";
|
|
5
|
-
export { default as BuildCommand } from "./BuildCommand.js";
|
|
6
|
-
export { default as LintCommand } from "./LintCommand.js";
|
|
7
|
-
export { default as ResolveCommand } from "./ResolveCommand.js";
|
|
8
|
-
export { default as Session } from "./Session.js";
|
|
9
|
-
export { default as Colour } from "./Colour.js";
|