@master/css-schema 2.0.0-rc.84 → 2.0.0-rc.86
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/css-directives.d.ts +17 -9
- package/dist/css-directives.js +1 -8
- package/dist/css-syntax.d.ts +0 -1
- package/dist/hydration-manifest.d.ts +0 -1
- package/dist/index.js +2 -2
- package/dist/manifest-json.d.ts +0 -1
- package/dist/manifest.d.ts +24 -24
- package/package.json +1 -1
package/dist/css-directives.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { MasterCSSManifestDefaultMode, MasterCSSManifestModeTrigger, MasterCSSManifestUtilityKind, MasterCSSManifestUtilityLayerName, MasterCSSManifestVariant } from "./manifest.js";
|
|
2
|
-
|
|
3
2
|
//#region src/css-directives.d.ts
|
|
4
3
|
type CSSDirectiveVariableValue = number | string | false | (number | string)[];
|
|
5
4
|
type CSSDirectiveDeclarations = Record<string, string>;
|
|
@@ -47,14 +46,23 @@ type CSSDirectiveAnimationDefinitions = Record<string, Record<string, CSSDirecti
|
|
|
47
46
|
type CSSDirectiveAnimationOptions = Record<string, {
|
|
48
47
|
static?: boolean;
|
|
49
48
|
}>;
|
|
49
|
+
type CSSDirectiveConditionPathEntry = {
|
|
50
|
+
type: 'condition';
|
|
51
|
+
value: string;
|
|
52
|
+
} | {
|
|
53
|
+
type: 'variant';
|
|
54
|
+
token: string;
|
|
55
|
+
};
|
|
50
56
|
interface CSSDirectiveUtilityRuleDefinition {
|
|
51
57
|
declarations: CSSDirectiveDeclarations;
|
|
52
|
-
|
|
58
|
+
conditions?: string[];
|
|
59
|
+
conditionPath?: CSSDirectiveConditionPathEntry[];
|
|
53
60
|
selector?: string;
|
|
54
61
|
}
|
|
55
62
|
interface CSSDirectiveUtilityPatternDefinition {
|
|
56
63
|
prefix: string;
|
|
57
64
|
values: string[];
|
|
65
|
+
valueMap?: Record<string, string>;
|
|
58
66
|
}
|
|
59
67
|
interface CSSDirectiveUtilityDynamicDefinition {
|
|
60
68
|
key: string;
|
|
@@ -70,7 +78,8 @@ interface CSSDirectiveUtilityDefinition {
|
|
|
70
78
|
pattern?: CSSDirectiveUtilityPatternDefinition;
|
|
71
79
|
dynamic?: CSSDirectiveUtilityDynamicDefinition;
|
|
72
80
|
declarations?: CSSDirectiveDeclarations;
|
|
73
|
-
|
|
81
|
+
conditions?: string[];
|
|
82
|
+
conditionPath?: CSSDirectiveConditionPathEntry[];
|
|
74
83
|
rules?: CSSDirectiveUtilityRuleDefinition[];
|
|
75
84
|
}
|
|
76
85
|
interface CSSDirectiveManifestInput {
|
|
@@ -106,7 +115,8 @@ interface CSSDirectiveStyleComposeDefinition {
|
|
|
106
115
|
source?: CSSDirectiveSourceReference;
|
|
107
116
|
directiveSource?: CSSDirectiveSourceReference;
|
|
108
117
|
selectorSource?: CSSDirectiveSourceReference;
|
|
109
|
-
|
|
118
|
+
conditions?: string[];
|
|
119
|
+
conditionPath?: CSSDirectiveConditionPathEntry[];
|
|
110
120
|
layer?: CSSDirectiveLayerName;
|
|
111
121
|
name?: string;
|
|
112
122
|
}
|
|
@@ -117,7 +127,8 @@ interface CSSDirectiveStyleNativeDefinition {
|
|
|
117
127
|
declarations: CSSDirectiveDeclarations;
|
|
118
128
|
source?: CSSDirectiveSourceReference;
|
|
119
129
|
selectorSource?: CSSDirectiveSourceReference;
|
|
120
|
-
|
|
130
|
+
conditions?: string[];
|
|
131
|
+
conditionPath?: CSSDirectiveConditionPathEntry[];
|
|
121
132
|
layer?: CSSDirectiveLayerName;
|
|
122
133
|
name?: string;
|
|
123
134
|
}
|
|
@@ -135,8 +146,5 @@ interface CSSDirectiveResult {
|
|
|
135
146
|
references?: CSSDirectiveReference[];
|
|
136
147
|
styleDefinitions?: CSSDirectiveStyleDefinition[];
|
|
137
148
|
}
|
|
138
|
-
declare const CSS_DIRECTIVE_VARIANT_REFERENCE_PREFIX = "__master_variant__:";
|
|
139
|
-
declare function createCSSDirectiveVariantReference(token: string): string;
|
|
140
|
-
declare function readCSSDirectiveVariantReference(atRule: string): string | undefined;
|
|
141
149
|
//#endregion
|
|
142
|
-
export { CSSDirectiveAnimationDefinitions, CSSDirectiveAnimationOptions, CSSDirectiveDeclarations, CSSDirectiveDefaultMode, CSSDirectiveError, CSSDirectiveExtractionPolicy, CSSDirectiveLayerName, CSSDirectiveManifestInput, CSSDirectiveModeTrigger, CSSDirectiveReference, CSSDirectiveRelatedInformation, CSSDirectiveResult, CSSDirectiveSourceLocation, CSSDirectiveSourceRange, CSSDirectiveSourceReference, CSSDirectiveStyleComposeDefinition, CSSDirectiveStyleDefinition, CSSDirectiveStyleNativeDefinition, CSSDirectiveUtilityDefinition, CSSDirectiveUtilityDynamicDefinition, CSSDirectiveUtilityPatternDefinition, CSSDirectiveUtilityRuleDefinition, CSSDirectiveVariableDefinition, CSSDirectiveVariableValue, CSSDirectiveVariantDefinitions,
|
|
150
|
+
export { CSSDirectiveAnimationDefinitions, CSSDirectiveAnimationOptions, CSSDirectiveConditionPathEntry, CSSDirectiveDeclarations, CSSDirectiveDefaultMode, CSSDirectiveError, CSSDirectiveExtractionPolicy, CSSDirectiveLayerName, CSSDirectiveManifestInput, CSSDirectiveModeTrigger, CSSDirectiveReference, CSSDirectiveRelatedInformation, CSSDirectiveResult, CSSDirectiveSourceLocation, CSSDirectiveSourceRange, CSSDirectiveSourceReference, CSSDirectiveStyleComposeDefinition, CSSDirectiveStyleDefinition, CSSDirectiveStyleNativeDefinition, CSSDirectiveUtilityDefinition, CSSDirectiveUtilityDynamicDefinition, CSSDirectiveUtilityPatternDefinition, CSSDirectiveUtilityRuleDefinition, CSSDirectiveVariableDefinition, CSSDirectiveVariableValue, CSSDirectiveVariantDefinitions, createCSSDirectiveSourceReference };
|
package/dist/css-directives.js
CHANGED
|
@@ -33,12 +33,5 @@ function createCSSDirectiveSourceReference(file, range, source) {
|
|
|
33
33
|
} } : {}
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
const CSS_DIRECTIVE_VARIANT_REFERENCE_PREFIX = "__master_variant__:";
|
|
37
|
-
function createCSSDirectiveVariantReference(token) {
|
|
38
|
-
return CSS_DIRECTIVE_VARIANT_REFERENCE_PREFIX + token;
|
|
39
|
-
}
|
|
40
|
-
function readCSSDirectiveVariantReference(atRule) {
|
|
41
|
-
return atRule.startsWith("__master_variant__:") ? atRule.slice(19) : void 0;
|
|
42
|
-
}
|
|
43
36
|
//#endregion
|
|
44
|
-
export { CSSDirectiveError,
|
|
37
|
+
export { CSSDirectiveError, createCSSDirectiveSourceReference };
|
package/dist/css-syntax.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { MasterCSSManifestUtility, MasterCSSManifestUtilityLayerName, MasterCSSManifestVariableNumericValue } from "./manifest.js";
|
|
2
|
-
|
|
3
2
|
//#region src/css-syntax.d.ts
|
|
4
3
|
type ValueComponent = StringValueComponent | NumberValueComponent | FunctionValueComponent | VariableValueComponent | SeparatorValueComponent;
|
|
5
4
|
interface StringValueComponent {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { MasterCSSManifestUtilityLayerName } from "./manifest.js";
|
|
2
2
|
import { UtilityType } from "./utility-type.js";
|
|
3
|
-
|
|
4
3
|
//#region src/hydration-manifest.d.ts
|
|
5
4
|
declare const MASTER_CSS_HYDRATION_MANIFEST_SCRIPT_ID = "master-css-hydration-manifest";
|
|
6
5
|
declare const MASTER_CSS_HYDRATION_MANIFEST_ATTR = "data-master-css-hydration-manifest";
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CSSDirectiveError,
|
|
1
|
+
import { CSSDirectiveError, createCSSDirectiveSourceReference } from "./css-directives.js";
|
|
2
2
|
import { MASTER_CSS_HYDRATION_MANIFEST_ASSET_BASE, MASTER_CSS_HYDRATION_MANIFEST_ATTR, MASTER_CSS_HYDRATION_MANIFEST_FILE_BASENAME, MASTER_CSS_HYDRATION_MANIFEST_SCRIPT_ID, createMasterCSSHydrationManifestScript, serializeMasterCSSHydrationManifest } from "./hydration-manifest.js";
|
|
3
3
|
import { flattenMasterCSSManifestVariables, getMasterCSSManifestVariableName, groupMasterCSSManifestVariables } from "./manifest.js";
|
|
4
4
|
import { normalizeMasterCSSManifestForJSON, stringifyMasterCSSManifestJSON } from "./manifest-json.js";
|
|
5
5
|
import { UtilityType } from "./utility-type.js";
|
|
6
6
|
import { MASTER_CSS_RUNTIME_STYLE_ID } from "./runtime-style.js";
|
|
7
7
|
import { isNativeCSSShorthandProperty } from "./native-css-shorthand.js";
|
|
8
|
-
export { CSSDirectiveError,
|
|
8
|
+
export { CSSDirectiveError, MASTER_CSS_HYDRATION_MANIFEST_ASSET_BASE, MASTER_CSS_HYDRATION_MANIFEST_ATTR, MASTER_CSS_HYDRATION_MANIFEST_FILE_BASENAME, MASTER_CSS_HYDRATION_MANIFEST_SCRIPT_ID, MASTER_CSS_RUNTIME_STYLE_ID, UtilityType, createCSSDirectiveSourceReference, createMasterCSSHydrationManifestScript, flattenMasterCSSManifestVariables, getMasterCSSManifestVariableName, groupMasterCSSManifestVariables, isNativeCSSShorthandProperty, normalizeMasterCSSManifestForJSON, serializeMasterCSSHydrationManifest, stringifyMasterCSSManifestJSON };
|
package/dist/manifest-json.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { MasterCSSManifest } from "./manifest.js";
|
|
2
|
-
|
|
3
2
|
//#region src/manifest-json.d.ts
|
|
4
3
|
declare function normalizeMasterCSSManifestForJSON(manifest: MasterCSSManifest): MasterCSSManifest;
|
|
5
4
|
declare function stringifyMasterCSSManifestJSON(manifest: MasterCSSManifest): string;
|
package/dist/manifest.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { UtilityType } from "./utility-type.js";
|
|
2
2
|
import { PropertiesHyphen } from "csstype";
|
|
3
|
-
|
|
4
3
|
//#region src/manifest.d.ts
|
|
5
|
-
type
|
|
4
|
+
type MasterCSSManifestConditionIdentifier = 'container' | 'starting-style' | 'supports' | 'media' | 'layer';
|
|
6
5
|
type MasterCSSManifestUtilityLayerName = 'base' | 'defaults' | 'components' | 'utilities';
|
|
7
6
|
type MasterCSSManifestDefaultMode = 'light' | 'dark' | 'none' | string;
|
|
8
7
|
type MasterCSSManifestModeTrigger = 'class' | 'media' | 'host';
|
|
@@ -18,12 +17,12 @@ interface MasterCSSManifestVariableNumericValue {
|
|
|
18
17
|
value: number;
|
|
19
18
|
unit?: string;
|
|
20
19
|
}
|
|
21
|
-
interface
|
|
20
|
+
interface MasterCSSManifestConditionBooleanNode {
|
|
22
21
|
raw?: string;
|
|
23
22
|
name: string;
|
|
24
23
|
type: 'boolean';
|
|
25
24
|
}
|
|
26
|
-
interface
|
|
25
|
+
interface MasterCSSManifestConditionNumberNode {
|
|
27
26
|
raw?: string;
|
|
28
27
|
name?: string;
|
|
29
28
|
type: 'number';
|
|
@@ -31,35 +30,35 @@ interface MasterCSSManifestAtRuleNumberNode {
|
|
|
31
30
|
unit?: string;
|
|
32
31
|
operator?: string;
|
|
33
32
|
}
|
|
34
|
-
interface
|
|
33
|
+
interface MasterCSSManifestConditionStringNode {
|
|
35
34
|
raw?: string;
|
|
36
35
|
name?: string;
|
|
37
36
|
type: 'string';
|
|
38
37
|
value: string;
|
|
39
38
|
}
|
|
40
|
-
type
|
|
41
|
-
interface
|
|
39
|
+
type MasterCSSManifestConditionValueNode = MasterCSSManifestConditionNumberNode | MasterCSSManifestConditionStringNode;
|
|
40
|
+
interface MasterCSSManifestConditionComparisonOperatorNode {
|
|
42
41
|
type: 'comparison';
|
|
43
42
|
raw?: string;
|
|
44
43
|
value: string;
|
|
45
44
|
}
|
|
46
|
-
interface
|
|
45
|
+
interface MasterCSSManifestConditionLogicalOperatorNode {
|
|
47
46
|
type: 'logical';
|
|
48
47
|
raw?: string;
|
|
49
48
|
value: string;
|
|
50
49
|
}
|
|
51
|
-
type
|
|
52
|
-
interface
|
|
50
|
+
type MasterCSSManifestConditionOperatorNode = MasterCSSManifestConditionComparisonOperatorNode | MasterCSSManifestConditionLogicalOperatorNode;
|
|
51
|
+
interface MasterCSSManifestConditionGroupNode {
|
|
53
52
|
type?: 'group';
|
|
54
53
|
raw?: string;
|
|
55
|
-
children:
|
|
54
|
+
children: MasterCSSManifestConditionNode[];
|
|
56
55
|
}
|
|
57
|
-
type
|
|
58
|
-
interface
|
|
59
|
-
id:
|
|
60
|
-
nodes:
|
|
56
|
+
type MasterCSSManifestConditionNode = MasterCSSManifestConditionBooleanNode | MasterCSSManifestConditionValueNode | MasterCSSManifestConditionComparisonOperatorNode | MasterCSSManifestConditionLogicalOperatorNode | MasterCSSManifestConditionGroupNode;
|
|
57
|
+
interface MasterCSSManifestCondition {
|
|
58
|
+
id: MasterCSSManifestConditionIdentifier;
|
|
59
|
+
nodes: MasterCSSManifestConditionNode[];
|
|
61
60
|
}
|
|
62
|
-
type
|
|
61
|
+
type MasterCSSManifestConditions = Record<string, MasterCSSManifestCondition>;
|
|
63
62
|
interface MasterCSSManifestSelectorLiteralNode {
|
|
64
63
|
type?: 'attribute' | 'pseudo-class' | 'pseudo-element' | 'class' | 'universal' | 'id';
|
|
65
64
|
raw?: string;
|
|
@@ -118,8 +117,8 @@ type MasterCSSManifestAnimationOptions = Record<string, {
|
|
|
118
117
|
interface MasterCSSManifestVariantBranch {
|
|
119
118
|
selector?: string;
|
|
120
119
|
selectorNodes?: MasterCSSManifestSelectorNode[];
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
conditions?: string[];
|
|
121
|
+
conditionNodes?: MasterCSSManifestCondition[];
|
|
123
122
|
layer?: MasterCSSManifestUtilityLayerName;
|
|
124
123
|
}
|
|
125
124
|
interface MasterCSSManifestVariant {
|
|
@@ -134,6 +133,7 @@ type MasterCSSManifestUtilityMatcher = {
|
|
|
134
133
|
type: 'pattern';
|
|
135
134
|
prefix: string;
|
|
136
135
|
values: string[];
|
|
136
|
+
valueMap?: Record<string, string>;
|
|
137
137
|
} | {
|
|
138
138
|
type: 'key';
|
|
139
139
|
keys: string[];
|
|
@@ -163,7 +163,7 @@ type MasterCSSManifestUtilityEmit = {
|
|
|
163
163
|
};
|
|
164
164
|
interface MasterCSSManifestUtilityRule<TDeclarations = MasterCSSManifestCSSDeclarations> {
|
|
165
165
|
declarations: TDeclarations;
|
|
166
|
-
|
|
166
|
+
conditions?: string[];
|
|
167
167
|
selector?: string;
|
|
168
168
|
}
|
|
169
169
|
interface MasterCSSManifestUtility {
|
|
@@ -180,7 +180,7 @@ interface MasterCSSManifestUtility {
|
|
|
180
180
|
namespaces?: string[];
|
|
181
181
|
implicitNamespace?: boolean;
|
|
182
182
|
separators?: string[];
|
|
183
|
-
|
|
183
|
+
conditions?: string[];
|
|
184
184
|
variableAliases?: MasterCSSManifestVariableAliasSet;
|
|
185
185
|
variableAliasRefs?: string[];
|
|
186
186
|
emit: MasterCSSManifestUtilityEmit;
|
|
@@ -200,9 +200,9 @@ interface MasterCSSManifest {
|
|
|
200
200
|
animations?: MasterCSSManifestAnimations;
|
|
201
201
|
animationOptions?: MasterCSSManifestAnimationOptions;
|
|
202
202
|
variants?: MasterCSSManifestVariants;
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
203
|
+
conditions?: MasterCSSManifestConditions;
|
|
204
|
+
breakpointConditions?: MasterCSSManifestConditions;
|
|
205
|
+
containerConditions?: MasterCSSManifestConditions;
|
|
206
206
|
selectors?: MasterCSSManifestSelectors;
|
|
207
207
|
utilities?: MasterCSSManifestUtilities;
|
|
208
208
|
debug?: Record<string, unknown>;
|
|
@@ -211,4 +211,4 @@ declare function getMasterCSSManifestVariableName(namespace: string, variable: P
|
|
|
211
211
|
declare function flattenMasterCSSManifestVariables(variables: MasterCSSManifestVariables | undefined): MasterCSSManifestVariableEntry[];
|
|
212
212
|
declare function groupMasterCSSManifestVariables(variables: readonly MasterCSSManifestVariable[] | undefined): MasterCSSManifestVariables | undefined;
|
|
213
213
|
//#endregion
|
|
214
|
-
export { MasterCSSManifest, MasterCSSManifestAnimationOptions, MasterCSSManifestAnimations,
|
|
214
|
+
export { MasterCSSManifest, MasterCSSManifestAnimationOptions, MasterCSSManifestAnimations, MasterCSSManifestCSSDeclarationPrimitive, MasterCSSManifestCSSDeclarations, MasterCSSManifestCondition, MasterCSSManifestConditionBooleanNode, MasterCSSManifestConditionComparisonOperatorNode, MasterCSSManifestConditionGroupNode, MasterCSSManifestConditionIdentifier, MasterCSSManifestConditionLogicalOperatorNode, MasterCSSManifestConditionNode, MasterCSSManifestConditionNumberNode, MasterCSSManifestConditionOperatorNode, MasterCSSManifestConditionStringNode, MasterCSSManifestConditionValueNode, MasterCSSManifestConditions, MasterCSSManifestDefaultMode, MasterCSSManifestKeyframes, MasterCSSManifestModeTrigger, MasterCSSManifestSelectorCombinatorNode, MasterCSSManifestSelectorLiteralNode, MasterCSSManifestSelectorNode, MasterCSSManifestSelectorSeparatorNode, MasterCSSManifestSelectors, MasterCSSManifestSettings, MasterCSSManifestUtilities, MasterCSSManifestUtility, MasterCSSManifestUtilityEmit, MasterCSSManifestUtilityKind, MasterCSSManifestUtilityLayerName, MasterCSSManifestUtilityMatcher, MasterCSSManifestUtilityMatcherValueSegments, MasterCSSManifestUtilityRule, MasterCSSManifestVariable, MasterCSSManifestVariableAlias, MasterCSSManifestVariableAliasSet, MasterCSSManifestVariableEntry, MasterCSSManifestVariableNumericValue, MasterCSSManifestVariableType, MasterCSSManifestVariableValue, MasterCSSManifestVariables, MasterCSSManifestVariant, MasterCSSManifestVariantBranch, MasterCSSManifestVariantToken, MasterCSSManifestVariants, flattenMasterCSSManifestVariables, getMasterCSSManifestVariableName, groupMasterCSSManifestVariables };
|
package/package.json
CHANGED
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"dependencies": {
|
|
89
89
|
"csstype": "^3.2.3"
|
|
90
90
|
},
|
|
91
|
-
"version": "2.0.0-rc.
|
|
91
|
+
"version": "2.0.0-rc.86",
|
|
92
92
|
"scripts": {
|
|
93
93
|
"build": "tsdown --config ../../shared/tsdown-package.config.ts",
|
|
94
94
|
"dev": "tsdown --config ../../shared/tsdown-package.config.ts --watch",
|