@master/css-schema 0.0.0-site.1793659883.g69c9aebcf628
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 +5 -0
- package/dist/css-common.d.ts +2 -0
- package/dist/css-common.js +1 -0
- package/dist/css-directives.d.ts +145 -0
- package/dist/css-directives.js +36 -0
- package/dist/css-syntax.d.ts +78 -0
- package/dist/css-syntax.js +1 -0
- package/dist/diagnostics.d.ts +41 -0
- package/dist/diagnostics.js +35 -0
- package/dist/emitted-globals.d.ts +7 -0
- package/dist/emitted-globals.js +1 -0
- package/dist/hydration-manifest.d.ts +66 -0
- package/dist/hydration-manifest.js +12 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +5 -0
- package/dist/integration.d.ts +14 -0
- package/dist/integration.js +11 -0
- package/dist/keyframes.d.ts +24 -0
- package/dist/keyframes.js +1 -0
- package/dist/manifest-json.d.ts +4 -0
- package/dist/manifest-json.js +29 -0
- package/dist/manifest.d.ts +80 -0
- package/dist/manifest.js +30 -0
- package/dist/mixin.d.ts +49 -0
- package/dist/mixin.js +1 -0
- package/dist/runtime-style.d.ts +2 -0
- package/dist/runtime-style.js +3 -0
- package/dist/utility-type.d.ts +14 -0
- package/dist/utility-type.js +14 -0
- package/package.json +96 -0
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { MasterCSSKeyframeDefinition } from "./keyframes.js";
|
|
2
|
+
import { MasterCSSMixinDefinition, MasterCSSMixinNode, MasterCSSMixinValue, MasterCSSUtilityDefinition } from "./mixin.js";
|
|
3
|
+
import { MasterCSSThemeNode } from "./manifest.js";
|
|
4
|
+
type CSSDirectiveVariableValue = number | string | false | (number | string)[];
|
|
5
|
+
type CSSDirectiveDeclarations = Record<string, string>;
|
|
6
|
+
interface CSSDirectiveSourceRange {
|
|
7
|
+
start: number;
|
|
8
|
+
end: number;
|
|
9
|
+
}
|
|
10
|
+
interface CSSDirectiveSourceLocation {
|
|
11
|
+
line: number;
|
|
12
|
+
column: number;
|
|
13
|
+
}
|
|
14
|
+
interface CSSDirectiveSourceReference {
|
|
15
|
+
file?: string;
|
|
16
|
+
range: CSSDirectiveSourceRange;
|
|
17
|
+
loc?: {
|
|
18
|
+
start: CSSDirectiveSourceLocation;
|
|
19
|
+
end: CSSDirectiveSourceLocation;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
interface CSSDirectiveRelatedInformation {
|
|
23
|
+
message: string;
|
|
24
|
+
source?: CSSDirectiveSourceReference;
|
|
25
|
+
}
|
|
26
|
+
declare class CSSDirectiveError extends Error {
|
|
27
|
+
code: string;
|
|
28
|
+
source?: CSSDirectiveSourceReference;
|
|
29
|
+
related?: CSSDirectiveRelatedInformation[];
|
|
30
|
+
constructor(code: string, message: string, source?: CSSDirectiveSourceReference, related?: CSSDirectiveRelatedInformation[]);
|
|
31
|
+
}
|
|
32
|
+
declare function createCSSDirectiveSourceReference(file: string | undefined, range: CSSDirectiveSourceRange, source?: string): CSSDirectiveSourceReference;
|
|
33
|
+
interface CSSCustomMediaDefinition {
|
|
34
|
+
name: string;
|
|
35
|
+
query: string;
|
|
36
|
+
source?: CSSDirectiveSourceReference;
|
|
37
|
+
}
|
|
38
|
+
/** An `@custom-container` condition as written, before references expand. */
|
|
39
|
+
interface CSSCustomContainerDefinition {
|
|
40
|
+
name: string;
|
|
41
|
+
query: string;
|
|
42
|
+
source?: CSSDirectiveSourceReference;
|
|
43
|
+
}
|
|
44
|
+
interface CSSDirectiveManifestInput {
|
|
45
|
+
keyframes?: MasterCSSKeyframeDefinition[];
|
|
46
|
+
keyframeSafelist?: string[];
|
|
47
|
+
animationVariables?: Record<string, string[]>;
|
|
48
|
+
theme?: MasterCSSThemeNode[];
|
|
49
|
+
customMedia?: CSSCustomMediaDefinition[];
|
|
50
|
+
customContainers?: CSSCustomContainerDefinition[];
|
|
51
|
+
mixins?: MasterCSSMixinDefinition[];
|
|
52
|
+
utilities?: MasterCSSUtilityDefinition[];
|
|
53
|
+
}
|
|
54
|
+
interface CSSDirectiveExtractionPolicy {
|
|
55
|
+
include: string[];
|
|
56
|
+
exclude: string[];
|
|
57
|
+
safelist: string[];
|
|
58
|
+
safelistKeyframes: string[];
|
|
59
|
+
blocklist: (string | RegExp)[];
|
|
60
|
+
preserveNative: boolean;
|
|
61
|
+
pruneNative: boolean;
|
|
62
|
+
}
|
|
63
|
+
interface CSSDirectiveReference {
|
|
64
|
+
source: string;
|
|
65
|
+
file?: string;
|
|
66
|
+
}
|
|
67
|
+
interface CSSOrderedDeclaration {
|
|
68
|
+
property: string;
|
|
69
|
+
value: string;
|
|
70
|
+
source?: CSSDirectiveSourceReference;
|
|
71
|
+
}
|
|
72
|
+
interface CSSDirectiveStyleNativeDefinition {
|
|
73
|
+
type: 'native';
|
|
74
|
+
order: number;
|
|
75
|
+
selector: string;
|
|
76
|
+
declarations: CSSOrderedDeclaration[];
|
|
77
|
+
source?: CSSDirectiveSourceReference;
|
|
78
|
+
selectorSource?: CSSDirectiveSourceReference;
|
|
79
|
+
/** The enclosing conditional and layer preludes, outermost first. */
|
|
80
|
+
conditions?: string[];
|
|
81
|
+
}
|
|
82
|
+
interface CSSDirectiveStyleApplyDefinition {
|
|
83
|
+
type: 'apply';
|
|
84
|
+
order: number;
|
|
85
|
+
selector: string;
|
|
86
|
+
name: string;
|
|
87
|
+
arguments: MasterCSSMixinValue[];
|
|
88
|
+
contents?: MasterCSSMixinNode[];
|
|
89
|
+
selectorSource?: CSSDirectiveSourceReference;
|
|
90
|
+
source?: CSSDirectiveSourceReference;
|
|
91
|
+
/** The enclosing conditional and layer preludes, outermost first. */
|
|
92
|
+
conditions?: string[];
|
|
93
|
+
}
|
|
94
|
+
type CSSDirectiveStyleDefinition = CSSDirectiveStyleApplyDefinition | CSSDirectiveStyleNativeDefinition;
|
|
95
|
+
/** Generated UTF-16 offset and its original authoring-source anchor. */
|
|
96
|
+
interface CSSOutputMapping {
|
|
97
|
+
generatedStart: number;
|
|
98
|
+
generatedEnd?: number;
|
|
99
|
+
source: CSSDirectiveSourceReference;
|
|
100
|
+
}
|
|
101
|
+
/** Rust output plan; pass it unchanged from parsing to directive lowering. */
|
|
102
|
+
interface CSSNativeOutput {
|
|
103
|
+
css: string;
|
|
104
|
+
mappings: CSSOutputMapping[];
|
|
105
|
+
slots: {
|
|
106
|
+
start: number;
|
|
107
|
+
end: number;
|
|
108
|
+
marker: string;
|
|
109
|
+
definitions: CSSDirectiveStyleDefinition[];
|
|
110
|
+
}[];
|
|
111
|
+
}
|
|
112
|
+
interface CSSDefinitionSource {
|
|
113
|
+
kind: 'utility' | 'mixin';
|
|
114
|
+
name: string;
|
|
115
|
+
identity: string;
|
|
116
|
+
replacedBy?: CSSDirectiveSourceReference;
|
|
117
|
+
source: CSSDirectiveSourceReference;
|
|
118
|
+
}
|
|
119
|
+
interface CSSDirectiveNotice {
|
|
120
|
+
code: string;
|
|
121
|
+
message: string;
|
|
122
|
+
source?: CSSDirectiveSourceReference | null;
|
|
123
|
+
}
|
|
124
|
+
interface CSSDirectiveResult {
|
|
125
|
+
notices?: CSSDirectiveNotice[];
|
|
126
|
+
definitionSources?: CSSDefinitionSource[];
|
|
127
|
+
nativeOutput?: CSSNativeOutput;
|
|
128
|
+
outputMappings?: CSSOutputMapping[];
|
|
129
|
+
/** Serialized source map v3 for the final CSS, when produced by the stylesheet host. */
|
|
130
|
+
sourceMap?: string;
|
|
131
|
+
nativeMappings?: CSSOutputMapping[];
|
|
132
|
+
generatedMappings?: CSSOutputMapping[];
|
|
133
|
+
manifestInput: CSSDirectiveManifestInput;
|
|
134
|
+
extractionPolicy: CSSDirectiveExtractionPolicy;
|
|
135
|
+
classNames: string[];
|
|
136
|
+
nativeClassNames: string[];
|
|
137
|
+
nativeCSS: string;
|
|
138
|
+
css: string;
|
|
139
|
+
generatedCSS: string;
|
|
140
|
+
warnings: string[];
|
|
141
|
+
dependencies: string[];
|
|
142
|
+
references?: CSSDirectiveReference[];
|
|
143
|
+
styleDefinitions?: CSSDirectiveStyleDefinition[];
|
|
144
|
+
}
|
|
145
|
+
export { CSSCustomContainerDefinition, CSSCustomMediaDefinition, CSSDefinitionSource, CSSDirectiveDeclarations, CSSDirectiveError, CSSDirectiveExtractionPolicy, CSSDirectiveManifestInput, CSSDirectiveNotice, CSSDirectiveReference, CSSDirectiveRelatedInformation, CSSDirectiveResult, CSSDirectiveSourceLocation, CSSDirectiveSourceRange, CSSDirectiveSourceReference, CSSDirectiveStyleApplyDefinition, CSSDirectiveStyleDefinition, CSSDirectiveStyleNativeDefinition, CSSDirectiveVariableValue, CSSNativeOutput, CSSOrderedDeclaration, CSSOutputMapping, createCSSDirectiveSourceReference };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// src/css-directives.ts
|
|
2
|
+
var CSSDirectiveError = class extends Error {
|
|
3
|
+
code;
|
|
4
|
+
source;
|
|
5
|
+
related;
|
|
6
|
+
constructor(code, message, source, related) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.name = "CSSDirectiveError";
|
|
9
|
+
this.code = code;
|
|
10
|
+
this.source = source;
|
|
11
|
+
this.related = related;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
function offsetToLocation(source, offset) {
|
|
15
|
+
let line = 1;
|
|
16
|
+
let column = 1;
|
|
17
|
+
for (let index = 0; index < offset && index < source.length; index++) if (source[index] === "\n") {
|
|
18
|
+
line++;
|
|
19
|
+
column = 1;
|
|
20
|
+
} else column++;
|
|
21
|
+
return {
|
|
22
|
+
line,
|
|
23
|
+
column
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function createCSSDirectiveSourceReference(file, range, source) {
|
|
27
|
+
return {
|
|
28
|
+
...file ? { file } : {},
|
|
29
|
+
range,
|
|
30
|
+
...source ? { loc: {
|
|
31
|
+
start: offsetToLocation(source, range.start),
|
|
32
|
+
end: offsetToLocation(source, range.end)
|
|
33
|
+
} } : {}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export { CSSDirectiveError, createCSSDirectiveSourceReference };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { MasterCSSManifestUtilityLayerName, MasterCSSManifestVariableNumericValue } from "./manifest.js";
|
|
2
|
+
type ValueComponent = StringValueComponent | NumberValueComponent | FunctionValueComponent | VariableValueComponent | SeparatorValueComponent;
|
|
3
|
+
interface StringValueComponent {
|
|
4
|
+
text?: string;
|
|
5
|
+
token: string;
|
|
6
|
+
type: 'string';
|
|
7
|
+
value: string;
|
|
8
|
+
}
|
|
9
|
+
interface NumberValueComponent {
|
|
10
|
+
text?: string;
|
|
11
|
+
token: string;
|
|
12
|
+
type: 'number';
|
|
13
|
+
value: number;
|
|
14
|
+
unit?: string;
|
|
15
|
+
}
|
|
16
|
+
interface FunctionValueComponent {
|
|
17
|
+
text?: string;
|
|
18
|
+
token: string;
|
|
19
|
+
type: 'function';
|
|
20
|
+
name: string;
|
|
21
|
+
symbol: string;
|
|
22
|
+
children: ValueComponent[];
|
|
23
|
+
bypassTransform?: boolean;
|
|
24
|
+
}
|
|
25
|
+
interface VariableValueComponent {
|
|
26
|
+
text?: string;
|
|
27
|
+
token: string;
|
|
28
|
+
type: 'variable';
|
|
29
|
+
name: string;
|
|
30
|
+
alpha?: number;
|
|
31
|
+
fallback?: string;
|
|
32
|
+
negative?: boolean;
|
|
33
|
+
variable?: Variable;
|
|
34
|
+
}
|
|
35
|
+
interface SeparatorValueComponent {
|
|
36
|
+
text?: string;
|
|
37
|
+
token: string;
|
|
38
|
+
type: 'separator';
|
|
39
|
+
value: string;
|
|
40
|
+
}
|
|
41
|
+
type ExplicitUtilityLayerName = MasterCSSManifestUtilityLayerName;
|
|
42
|
+
interface MediaFeatureComponent {
|
|
43
|
+
type: string;
|
|
44
|
+
tokenType?: string;
|
|
45
|
+
operator?: string;
|
|
46
|
+
value: number;
|
|
47
|
+
unit: string;
|
|
48
|
+
}
|
|
49
|
+
interface MediaQuery {
|
|
50
|
+
token: string;
|
|
51
|
+
features: Record<string, MediaFeatureComponent>;
|
|
52
|
+
type?: string;
|
|
53
|
+
}
|
|
54
|
+
interface VariableCommon {
|
|
55
|
+
namespace?: string;
|
|
56
|
+
name: string;
|
|
57
|
+
key: string;
|
|
58
|
+
inline?: boolean;
|
|
59
|
+
static?: boolean;
|
|
60
|
+
modes?: Record<string, ResolvedVariableValue>;
|
|
61
|
+
dependencies?: Set<string>;
|
|
62
|
+
}
|
|
63
|
+
interface StringVariable {
|
|
64
|
+
type: 'string';
|
|
65
|
+
value: string | number;
|
|
66
|
+
}
|
|
67
|
+
interface NumberVariable {
|
|
68
|
+
type: 'number';
|
|
69
|
+
value: number | string;
|
|
70
|
+
numeric?: MasterCSSManifestVariableNumericValue;
|
|
71
|
+
}
|
|
72
|
+
type ResolvedVariableValue = StringVariable | NumberVariable;
|
|
73
|
+
type Variable = VariableCommon & {
|
|
74
|
+
type: ResolvedVariableValue['type'];
|
|
75
|
+
value?: ResolvedVariableValue['value'];
|
|
76
|
+
numeric?: MasterCSSManifestVariableNumericValue;
|
|
77
|
+
};
|
|
78
|
+
export { ExplicitUtilityLayerName, FunctionValueComponent, MediaFeatureComponent, MediaQuery, NumberValueComponent, NumberVariable, ResolvedVariableValue, SeparatorValueComponent, StringValueComponent, StringVariable, ValueComponent, Variable, VariableValueComponent };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
declare const MASTER_CSS_DIAGNOSTIC_VERSION: 2;
|
|
2
|
+
type MasterCSSDiagnosticDomain = 'binding' | 'compiler' | 'engine' | 'integration' | 'language' | 'project' | 'runtime' | 'server' | 'tooling';
|
|
3
|
+
type MasterCSSDiagnosticSeverity = 'error' | 'warning' | 'information';
|
|
4
|
+
interface MasterCSSDiagnosticPosition {
|
|
5
|
+
line: number;
|
|
6
|
+
character: number;
|
|
7
|
+
}
|
|
8
|
+
interface MasterCSSDiagnosticRange {
|
|
9
|
+
start: MasterCSSDiagnosticPosition;
|
|
10
|
+
end: MasterCSSDiagnosticPosition;
|
|
11
|
+
}
|
|
12
|
+
interface MasterCSSDiagnostic {
|
|
13
|
+
readonly version: typeof MASTER_CSS_DIAGNOSTIC_VERSION;
|
|
14
|
+
readonly code: string;
|
|
15
|
+
readonly domain: MasterCSSDiagnosticDomain;
|
|
16
|
+
readonly phase?: 'match' | 'css-syntax' | 'css-value' | 'browser-support' | 'compiler';
|
|
17
|
+
readonly severity: MasterCSSDiagnosticSeverity;
|
|
18
|
+
readonly message: string;
|
|
19
|
+
readonly source?: string;
|
|
20
|
+
readonly range?: MasterCSSDiagnosticRange;
|
|
21
|
+
readonly notes?: readonly string[];
|
|
22
|
+
readonly help?: string;
|
|
23
|
+
}
|
|
24
|
+
interface MasterCSSErrorPayload {
|
|
25
|
+
readonly code: string;
|
|
26
|
+
readonly domain: MasterCSSDiagnosticDomain;
|
|
27
|
+
readonly message: string;
|
|
28
|
+
readonly diagnostics?: readonly MasterCSSDiagnostic[];
|
|
29
|
+
}
|
|
30
|
+
interface MasterCSSErrorOptions extends ErrorOptions {
|
|
31
|
+
diagnostics?: readonly MasterCSSDiagnostic[];
|
|
32
|
+
}
|
|
33
|
+
declare class MasterCSSError extends Error {
|
|
34
|
+
readonly code: string;
|
|
35
|
+
readonly domain: MasterCSSDiagnosticDomain;
|
|
36
|
+
readonly diagnostics: readonly MasterCSSDiagnostic[];
|
|
37
|
+
readonly payload: MasterCSSErrorPayload;
|
|
38
|
+
constructor(payload: MasterCSSErrorPayload, options?: MasterCSSErrorOptions);
|
|
39
|
+
toJSON(): MasterCSSErrorPayload;
|
|
40
|
+
}
|
|
41
|
+
export { MASTER_CSS_DIAGNOSTIC_VERSION, MasterCSSDiagnostic, MasterCSSDiagnosticDomain, MasterCSSDiagnosticPosition, MasterCSSDiagnosticRange, MasterCSSDiagnosticSeverity, MasterCSSError, MasterCSSErrorOptions, MasterCSSErrorPayload };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// src/diagnostics.ts
|
|
2
|
+
const MASTER_CSS_DIAGNOSTIC_VERSION = 2;
|
|
3
|
+
function freezeDiagnostic(diagnostic) {
|
|
4
|
+
return Object.freeze({
|
|
5
|
+
...diagnostic,
|
|
6
|
+
...diagnostic.range ? { range: Object.freeze({
|
|
7
|
+
start: Object.freeze({ ...diagnostic.range.start }),
|
|
8
|
+
end: Object.freeze({ ...diagnostic.range.end })
|
|
9
|
+
}) } : {},
|
|
10
|
+
...diagnostic.notes ? { notes: Object.freeze([...diagnostic.notes]) } : {}
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
var MasterCSSError = class extends Error {
|
|
14
|
+
code;
|
|
15
|
+
domain;
|
|
16
|
+
diagnostics;
|
|
17
|
+
payload;
|
|
18
|
+
constructor(payload, options = {}) {
|
|
19
|
+
super(payload.message, options);
|
|
20
|
+
this.name = "MasterCSSError";
|
|
21
|
+
this.code = payload.code;
|
|
22
|
+
this.domain = payload.domain;
|
|
23
|
+
this.diagnostics = Object.freeze((options.diagnostics ?? payload.diagnostics ?? []).map(freezeDiagnostic));
|
|
24
|
+
this.payload = Object.freeze({
|
|
25
|
+
code: this.code,
|
|
26
|
+
domain: this.domain,
|
|
27
|
+
message: this.message,
|
|
28
|
+
...this.diagnostics.length ? { diagnostics: this.diagnostics } : {}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
toJSON() {
|
|
32
|
+
return this.payload;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export { MASTER_CSS_DIAGNOSTIC_VERSION, MasterCSSError };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Resource counts already emitted outside the current Rust engine session. */
|
|
2
|
+
interface MasterCSSEmittedGlobals {
|
|
3
|
+
variables?: Record<string, number>;
|
|
4
|
+
/** Counts keyed by definition ID, rather than animation name. */
|
|
5
|
+
keyframes?: Record<string, number>;
|
|
6
|
+
}
|
|
7
|
+
export { MasterCSSEmittedGlobals };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { MasterCSSManifestUtilityLayerName } from "./manifest.js";
|
|
2
|
+
import { MasterCSSEmittedGlobals } from "./emitted-globals.js";
|
|
3
|
+
import { UtilityType } from "./utility-type.js";
|
|
4
|
+
declare const MASTER_CSS_HYDRATION_MANIFEST_SCRIPT_ID = "master-css-hydration-manifest";
|
|
5
|
+
declare const MASTER_CSS_HYDRATION_MANIFEST_ATTR = "data-master-css-hydration-manifest";
|
|
6
|
+
declare const MASTER_CSS_HYDRATION_MANIFEST_ASSET_BASE = "/_master-css/hydration/";
|
|
7
|
+
declare const MASTER_CSS_HYDRATION_MANIFEST_FILE_BASENAME = "master-css-hydration";
|
|
8
|
+
interface MasterCSSConditionRange {
|
|
9
|
+
readonly domain: string;
|
|
10
|
+
readonly feature: string;
|
|
11
|
+
readonly unit: string;
|
|
12
|
+
readonly lower: {
|
|
13
|
+
readonly value: number;
|
|
14
|
+
readonly inclusive: boolean;
|
|
15
|
+
} | null;
|
|
16
|
+
readonly upper: {
|
|
17
|
+
readonly value: number;
|
|
18
|
+
readonly inclusive: boolean;
|
|
19
|
+
} | null;
|
|
20
|
+
}
|
|
21
|
+
interface MasterCSSRulePriority {
|
|
22
|
+
/** Token values sort before raw values within the same cascade tier. */
|
|
23
|
+
readonly valuePriority?: -1 | 0;
|
|
24
|
+
/** Parsed declaration identity, independent of public aliases. */
|
|
25
|
+
readonly sortKey?: string;
|
|
26
|
+
readonly features: readonly MasterCSSConditionRange[];
|
|
27
|
+
readonly conditions?: readonly string[];
|
|
28
|
+
readonly selector: number;
|
|
29
|
+
}
|
|
30
|
+
interface MasterCSSHydrationRuleNode {
|
|
31
|
+
readonly text: string;
|
|
32
|
+
}
|
|
33
|
+
interface MasterCSSHydrationRule {
|
|
34
|
+
readonly className: string;
|
|
35
|
+
readonly key: string;
|
|
36
|
+
readonly layer: MasterCSSManifestUtilityLayerName;
|
|
37
|
+
readonly type: UtilityType;
|
|
38
|
+
readonly sortTier: number;
|
|
39
|
+
readonly priority: MasterCSSRulePriority;
|
|
40
|
+
readonly text: string;
|
|
41
|
+
readonly nodes?: readonly MasterCSSHydrationRuleNode[];
|
|
42
|
+
readonly selectorText?: string;
|
|
43
|
+
readonly variableNames?: readonly string[];
|
|
44
|
+
readonly keyframeNames?: readonly string[];
|
|
45
|
+
readonly retainAllKeyframes?: boolean;
|
|
46
|
+
}
|
|
47
|
+
interface MasterCSSHydrationManifest {
|
|
48
|
+
readonly version: 5;
|
|
49
|
+
readonly languageVersion: 18;
|
|
50
|
+
/**
|
|
51
|
+
* Every rendered class: those with rules in rule order, then those without, such as
|
|
52
|
+
* authored component classes, then classes manifest selectors reference without rules
|
|
53
|
+
* of their own, such as mode classes. The runtime treats them as covered by the
|
|
54
|
+
* pre-rendered CSS and replays them to verify it when the engine starts.
|
|
55
|
+
*/
|
|
56
|
+
readonly classNames: readonly string[];
|
|
57
|
+
readonly resourceOrder: {
|
|
58
|
+
readonly variables: readonly string[];
|
|
59
|
+
readonly keyframes: readonly string[];
|
|
60
|
+
};
|
|
61
|
+
/** Resource counts the server render treated as emitted by the page's stylesheets. */
|
|
62
|
+
readonly emittedGlobals?: MasterCSSEmittedGlobals;
|
|
63
|
+
}
|
|
64
|
+
declare function serializeMasterCSSHydrationManifest(hydrationManifest: MasterCSSHydrationManifest): string;
|
|
65
|
+
declare function createMasterCSSHydrationManifestScript(hydrationManifest: MasterCSSHydrationManifest): string;
|
|
66
|
+
export { MASTER_CSS_HYDRATION_MANIFEST_ASSET_BASE, MASTER_CSS_HYDRATION_MANIFEST_ATTR, MASTER_CSS_HYDRATION_MANIFEST_FILE_BASENAME, MASTER_CSS_HYDRATION_MANIFEST_SCRIPT_ID, MasterCSSConditionRange, MasterCSSHydrationManifest, MasterCSSHydrationRule, MasterCSSHydrationRuleNode, MasterCSSRulePriority, createMasterCSSHydrationManifestScript, serializeMasterCSSHydrationManifest };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// src/hydration-manifest.ts
|
|
2
|
+
const MASTER_CSS_HYDRATION_MANIFEST_SCRIPT_ID = "master-css-hydration-manifest";
|
|
3
|
+
const MASTER_CSS_HYDRATION_MANIFEST_ATTR = "data-master-css-hydration-manifest";
|
|
4
|
+
const MASTER_CSS_HYDRATION_MANIFEST_ASSET_BASE = "/_master-css/hydration/";
|
|
5
|
+
const MASTER_CSS_HYDRATION_MANIFEST_FILE_BASENAME = "master-css-hydration";
|
|
6
|
+
function serializeMasterCSSHydrationManifest(hydrationManifest) {
|
|
7
|
+
return JSON.stringify(hydrationManifest).replace(/</g, "\\u003c");
|
|
8
|
+
}
|
|
9
|
+
function createMasterCSSHydrationManifestScript(hydrationManifest) {
|
|
10
|
+
return `<script type="application/json" id="${MASTER_CSS_HYDRATION_MANIFEST_SCRIPT_ID}">${serializeMasterCSSHydrationManifest(hydrationManifest)}<\/script>`;
|
|
11
|
+
}
|
|
12
|
+
export { 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 };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { MasterCSSManifest, flattenMasterCSSManifestVariables, getMasterCSSManifestVariableName, groupMasterCSSManifestVariables, normalizeMasterCSSManifest, serializeMasterCSSManifest } from "./manifest.js";
|
|
2
|
+
import { MASTER_CSS_DIAGNOSTIC_VERSION, MasterCSSDiagnostic, MasterCSSDiagnosticDomain, MasterCSSDiagnosticPosition, MasterCSSDiagnosticRange, MasterCSSDiagnosticSeverity, MasterCSSError, MasterCSSErrorOptions, MasterCSSErrorPayload } from "./diagnostics.js";
|
|
3
|
+
import { MASTER_CSS_RENDERING_MODES, MasterCSSIntegrationOptions, MasterCSSIntegrationRuntimeOptions, MasterCSSRenderingMode, isMasterCSSRenderingMode } from "./integration.js";
|
|
4
|
+
export { MASTER_CSS_DIAGNOSTIC_VERSION, MASTER_CSS_RENDERING_MODES, type MasterCSSDiagnostic, type MasterCSSDiagnosticDomain, type MasterCSSDiagnosticPosition, type MasterCSSDiagnosticRange, type MasterCSSDiagnosticSeverity, MasterCSSError, type MasterCSSErrorOptions, type MasterCSSErrorPayload, type MasterCSSIntegrationOptions, type MasterCSSIntegrationRuntimeOptions, type MasterCSSManifest, type MasterCSSRenderingMode, flattenMasterCSSManifestVariables, getMasterCSSManifestVariableName, groupMasterCSSManifestVariables, isMasterCSSRenderingMode, normalizeMasterCSSManifest, serializeMasterCSSManifest };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { normalizeMasterCSSManifest, serializeMasterCSSManifest } from "./manifest-json.js";
|
|
2
|
+
import { MASTER_CSS_RENDERING_MODES, isMasterCSSRenderingMode } from "./integration.js";
|
|
3
|
+
import { MASTER_CSS_DIAGNOSTIC_VERSION, MasterCSSError } from "./diagnostics.js";
|
|
4
|
+
import { flattenMasterCSSManifestVariables, getMasterCSSManifestVariableName, groupMasterCSSManifestVariables } from "./manifest.js";
|
|
5
|
+
export { MASTER_CSS_DIAGNOSTIC_VERSION, MASTER_CSS_RENDERING_MODES, MasterCSSError, flattenMasterCSSManifestVariables, getMasterCSSManifestVariableName, groupMasterCSSManifestVariables, isMasterCSSRenderingMode, normalizeMasterCSSManifest, serializeMasterCSSManifest };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const MASTER_CSS_RENDERING_MODES: readonly ['runtime', 'static', 'pre-render', 'progressive'];
|
|
2
|
+
type MasterCSSRenderingMode = typeof MASTER_CSS_RENDERING_MODES[number];
|
|
3
|
+
interface MasterCSSIntegrationRuntimeOptions {
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
avoidFOUC?: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface MasterCSSIntegrationOptions {
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
mode?: MasterCSSRenderingMode;
|
|
10
|
+
pruneNativeCSS?: boolean;
|
|
11
|
+
runtime?: boolean | MasterCSSIntegrationRuntimeOptions;
|
|
12
|
+
}
|
|
13
|
+
declare function isMasterCSSRenderingMode(value: unknown): value is MasterCSSRenderingMode;
|
|
14
|
+
export { MASTER_CSS_RENDERING_MODES, MasterCSSIntegrationOptions, MasterCSSIntegrationRuntimeOptions, MasterCSSRenderingMode, isMasterCSSRenderingMode };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// src/integration.ts
|
|
2
|
+
const MASTER_CSS_RENDERING_MODES = [
|
|
3
|
+
"runtime",
|
|
4
|
+
"static",
|
|
5
|
+
"pre-render",
|
|
6
|
+
"progressive"
|
|
7
|
+
];
|
|
8
|
+
function isMasterCSSRenderingMode(value) {
|
|
9
|
+
return MASTER_CSS_RENDERING_MODES.includes(value);
|
|
10
|
+
}
|
|
11
|
+
export { MASTER_CSS_RENDERING_MODES, isMasterCSSRenderingMode };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CSSDirectiveSourceReference } from "./css-directives.js";
|
|
2
|
+
/**
|
|
3
|
+
* A native `@keyframes` rule of Master-compiled CSS. A `native` definition is
|
|
4
|
+
* delivered in place by its stylesheet or the host, and engines never emit it.
|
|
5
|
+
* Every other definition comes from a `@prune native` stylesheet and is emitted on
|
|
6
|
+
* demand, like a token, by the engine whose output references it.
|
|
7
|
+
*/
|
|
8
|
+
interface MasterCSSKeyframeDefinition {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
text: string;
|
|
12
|
+
/** The enclosing conditional and layer rules an emitted definition is wrapped in. */
|
|
13
|
+
containers?: MasterCSSKeyframeContainer[];
|
|
14
|
+
native?: boolean;
|
|
15
|
+
/** `@safelist keyframes` emits the definition without a reference. */
|
|
16
|
+
safelisted?: boolean;
|
|
17
|
+
dependencies?: string[];
|
|
18
|
+
source?: CSSDirectiveSourceReference;
|
|
19
|
+
}
|
|
20
|
+
interface MasterCSSKeyframeContainer {
|
|
21
|
+
id: string;
|
|
22
|
+
prelude: string;
|
|
23
|
+
}
|
|
24
|
+
export { MasterCSSKeyframeContainer, MasterCSSKeyframeDefinition };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { MasterCSSManifest } from "./manifest.js";
|
|
2
|
+
declare function normalizeMasterCSSManifest(manifest: MasterCSSManifest): MasterCSSManifest;
|
|
3
|
+
declare function serializeMasterCSSManifest(manifest: MasterCSSManifest): string;
|
|
4
|
+
export { normalizeMasterCSSManifest, serializeMasterCSSManifest };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// src/manifest-json.ts
|
|
2
|
+
function getVariableName(namespace, variable) {
|
|
3
|
+
return variable.name || (namespace ? `${namespace}${variable.key ? "-" + variable.key : ""}` : variable.key);
|
|
4
|
+
}
|
|
5
|
+
function normalizeVariablesForJSON(variables) {
|
|
6
|
+
if (!variables) return;
|
|
7
|
+
const normalized = {};
|
|
8
|
+
for (const [namespace, definitions] of Object.entries(variables)) {
|
|
9
|
+
const nextDefinitions = definitions.map((definition) => {
|
|
10
|
+
const normalizedDefinition = { ...definition };
|
|
11
|
+
if (normalizedDefinition.namespace === namespace || !namespace) delete normalizedDefinition.namespace;
|
|
12
|
+
if (normalizedDefinition.name === getVariableName(namespace, normalizedDefinition)) delete normalizedDefinition.name;
|
|
13
|
+
if (normalizedDefinition.type === "string") delete normalizedDefinition.type;
|
|
14
|
+
return normalizedDefinition;
|
|
15
|
+
});
|
|
16
|
+
if (nextDefinitions.length) normalized[namespace] = nextDefinitions;
|
|
17
|
+
}
|
|
18
|
+
return Object.keys(normalized).length ? normalized : void 0;
|
|
19
|
+
}
|
|
20
|
+
function normalizeMasterCSSManifest(manifest) {
|
|
21
|
+
return {
|
|
22
|
+
...manifest,
|
|
23
|
+
...manifest.variables ? { variables: normalizeVariablesForJSON(manifest.variables) } : {}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function serializeMasterCSSManifest(manifest) {
|
|
27
|
+
return JSON.stringify(normalizeMasterCSSManifest(manifest));
|
|
28
|
+
}
|
|
29
|
+
export { normalizeMasterCSSManifest, serializeMasterCSSManifest };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { MasterCSSKeyframeDefinition, MasterCSSKeyframeDefinition as MasterCSSKeyframeDefinition$1 } from "./keyframes.js";
|
|
2
|
+
import { MasterCSSMixinDefinition, MasterCSSMixinDefinition as MasterCSSMixinDefinition$1, MasterCSSMixinNode, MasterCSSMixinParameter, MasterCSSMixinParameterSyntax, MasterCSSMixinValue, MasterCSSUtilityDefinition, MasterCSSUtilityDefinition as MasterCSSUtilityDefinition$1 } from "./mixin.js";
|
|
3
|
+
import { PropertiesHyphen } from "csstype";
|
|
4
|
+
import { normalizeMasterCSSManifest, serializeMasterCSSManifest } from "./manifest-json.js";
|
|
5
|
+
type MasterCSSManifestConditionIdentifier = 'container' | 'starting-style' | 'supports' | 'media' | 'layer';
|
|
6
|
+
type MasterCSSManifestUtilityLayerName = 'base' | 'defaults' | 'components' | 'utilities';
|
|
7
|
+
type MasterCSSManifestCSSDeclarationPrimitive = string | number | null;
|
|
8
|
+
type MasterCSSManifestCSSDeclarations = PropertiesHyphen | Record<string, MasterCSSManifestCSSDeclarationPrimitive | MasterCSSManifestCSSDeclarationPrimitive[]>;
|
|
9
|
+
type MasterCSSManifestVariableValue = number | string | false | (number | string)[];
|
|
10
|
+
type MasterCSSManifestVariableType = 'number' | 'string';
|
|
11
|
+
interface MasterCSSManifestVariableNumericValue {
|
|
12
|
+
value: number;
|
|
13
|
+
unit?: string;
|
|
14
|
+
}
|
|
15
|
+
interface MasterCSSManifestVariable {
|
|
16
|
+
name?: string;
|
|
17
|
+
key: string;
|
|
18
|
+
namespace?: string;
|
|
19
|
+
type?: MasterCSSManifestVariableType;
|
|
20
|
+
values: MasterCSSScopedThemeValue[];
|
|
21
|
+
numeric?: MasterCSSManifestVariableNumericValue;
|
|
22
|
+
dependencies?: string[];
|
|
23
|
+
}
|
|
24
|
+
type MasterCSSManifestVariables = Record<string, MasterCSSManifestVariable[]>;
|
|
25
|
+
type MasterCSSManifestVariableEntry = MasterCSSManifestVariable & {
|
|
26
|
+
name: string;
|
|
27
|
+
namespace?: string;
|
|
28
|
+
type: MasterCSSManifestVariableType;
|
|
29
|
+
};
|
|
30
|
+
interface MasterCSSScopedThemeValue {
|
|
31
|
+
path: string[];
|
|
32
|
+
value: string;
|
|
33
|
+
inline?: boolean;
|
|
34
|
+
static?: boolean;
|
|
35
|
+
}
|
|
36
|
+
type MasterCSSThemeNode = {
|
|
37
|
+
type: 'rule';
|
|
38
|
+
prelude: string;
|
|
39
|
+
children: MasterCSSThemeNode[];
|
|
40
|
+
} | {
|
|
41
|
+
type: 'declaration';
|
|
42
|
+
name: string;
|
|
43
|
+
value: string;
|
|
44
|
+
inline?: boolean;
|
|
45
|
+
static?: boolean;
|
|
46
|
+
};
|
|
47
|
+
type MasterCSSMediaQueryExpression = {
|
|
48
|
+
type: 'true' | 'false';
|
|
49
|
+
} | {
|
|
50
|
+
type: 'feature';
|
|
51
|
+
value: string;
|
|
52
|
+
} | {
|
|
53
|
+
type: 'media-type';
|
|
54
|
+
name: string;
|
|
55
|
+
} | {
|
|
56
|
+
type: 'not';
|
|
57
|
+
query: MasterCSSMediaQueryExpression;
|
|
58
|
+
} | {
|
|
59
|
+
type: 'and' | 'or';
|
|
60
|
+
queries: MasterCSSMediaQueryExpression[];
|
|
61
|
+
};
|
|
62
|
+
interface MasterCSSManifest {
|
|
63
|
+
/** MasterCSSManifest IR schema/codec version; engines reject any other version. */
|
|
64
|
+
version: 6;
|
|
65
|
+
languageVersion: 18;
|
|
66
|
+
keyframes?: MasterCSSKeyframeDefinition$1[];
|
|
67
|
+
animationVariables?: Record<string, string[]>;
|
|
68
|
+
theme?: MasterCSSThemeNode[];
|
|
69
|
+
customMedia?: Record<string, MasterCSSMediaQueryExpression>;
|
|
70
|
+
/** The expanded condition of each custom container, without references. */
|
|
71
|
+
customContainers?: Record<string, string>;
|
|
72
|
+
variables?: MasterCSSManifestVariables;
|
|
73
|
+
mixins?: MasterCSSMixinDefinition$1[];
|
|
74
|
+
utilities?: MasterCSSUtilityDefinition$1[];
|
|
75
|
+
debug?: Record<string, unknown>;
|
|
76
|
+
}
|
|
77
|
+
declare function getMasterCSSManifestVariableName(namespace: string, variable: Pick<MasterCSSManifestVariable, 'key' | 'name'>): string;
|
|
78
|
+
declare function flattenMasterCSSManifestVariables(variables: MasterCSSManifestVariables | undefined): MasterCSSManifestVariableEntry[];
|
|
79
|
+
declare function groupMasterCSSManifestVariables(variables: readonly MasterCSSManifestVariable[] | undefined): MasterCSSManifestVariables | undefined;
|
|
80
|
+
export { type MasterCSSKeyframeDefinition, MasterCSSManifest, MasterCSSManifestCSSDeclarationPrimitive, MasterCSSManifestCSSDeclarations, MasterCSSManifestConditionIdentifier, MasterCSSManifestUtilityLayerName, MasterCSSManifestVariable, MasterCSSManifestVariableEntry, MasterCSSManifestVariableNumericValue, MasterCSSManifestVariableType, MasterCSSManifestVariableValue, MasterCSSManifestVariables, MasterCSSMediaQueryExpression, type MasterCSSMixinDefinition, type MasterCSSMixinNode, type MasterCSSMixinParameter, type MasterCSSMixinParameterSyntax, type MasterCSSMixinValue, MasterCSSScopedThemeValue, MasterCSSThemeNode, type MasterCSSUtilityDefinition, flattenMasterCSSManifestVariables, getMasterCSSManifestVariableName, groupMasterCSSManifestVariables, normalizeMasterCSSManifest, serializeMasterCSSManifest };
|
package/dist/manifest.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { normalizeMasterCSSManifest, serializeMasterCSSManifest } from "./manifest-json.js";
|
|
2
|
+
// src/manifest.ts
|
|
3
|
+
function getMasterCSSManifestVariableName(namespace, variable) {
|
|
4
|
+
return variable.name || (namespace ? `${namespace}${variable.key ? "-" + variable.key : ""}` : variable.key);
|
|
5
|
+
}
|
|
6
|
+
function flattenMasterCSSManifestVariables(variables) {
|
|
7
|
+
const flattened = [];
|
|
8
|
+
for (const [namespace, definitions] of Object.entries(variables || {})) for (const definition of definitions) {
|
|
9
|
+
const type = definition.type || "string";
|
|
10
|
+
flattened.push({
|
|
11
|
+
...definition,
|
|
12
|
+
name: getMasterCSSManifestVariableName(namespace, definition),
|
|
13
|
+
...namespace ? { namespace } : {},
|
|
14
|
+
type
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return flattened;
|
|
18
|
+
}
|
|
19
|
+
function groupMasterCSSManifestVariables(variables) {
|
|
20
|
+
if (!variables?.length) return;
|
|
21
|
+
const grouped = {};
|
|
22
|
+
for (const variable of variables) {
|
|
23
|
+
const namespace = variable.namespace || "";
|
|
24
|
+
const group = grouped[namespace] ||= [];
|
|
25
|
+
const { namespace: _namespace, ...definition } = variable;
|
|
26
|
+
group.push(definition);
|
|
27
|
+
}
|
|
28
|
+
return Object.keys(grouped).length ? grouped : void 0;
|
|
29
|
+
}
|
|
30
|
+
export { flattenMasterCSSManifestVariables, getMasterCSSManifestVariableName, groupMasterCSSManifestVariables, normalizeMasterCSSManifest, serializeMasterCSSManifest };
|
package/dist/mixin.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { CSSDirectiveSourceReference } from "./css-directives.js";
|
|
2
|
+
type MasterCSSMixinParameterSyntax = 'integer' | 'number' | 'string' | 'custom-ident';
|
|
3
|
+
interface MasterCSSMixinParameter {
|
|
4
|
+
name: string;
|
|
5
|
+
syntax?: MasterCSSMixinParameterSyntax;
|
|
6
|
+
default?: string;
|
|
7
|
+
source?: CSSDirectiveSourceReference;
|
|
8
|
+
}
|
|
9
|
+
type MasterCSSMixinValue = ({
|
|
10
|
+
type: 'text';
|
|
11
|
+
value: string;
|
|
12
|
+
} | {
|
|
13
|
+
type: 'function';
|
|
14
|
+
name: string;
|
|
15
|
+
value: MasterCSSMixinValue;
|
|
16
|
+
})[];
|
|
17
|
+
type MasterCSSMixinNode = {
|
|
18
|
+
type: 'declaration';
|
|
19
|
+
property: string;
|
|
20
|
+
value: MasterCSSMixinValue;
|
|
21
|
+
source?: CSSDirectiveSourceReference;
|
|
22
|
+
} | {
|
|
23
|
+
type: 'rule';
|
|
24
|
+
selector: string;
|
|
25
|
+
body: MasterCSSMixinNode[];
|
|
26
|
+
} | {
|
|
27
|
+
type: 'condition';
|
|
28
|
+
condition: string;
|
|
29
|
+
body: MasterCSSMixinNode[];
|
|
30
|
+
} | {
|
|
31
|
+
type: 'apply';
|
|
32
|
+
name: string;
|
|
33
|
+
arguments: MasterCSSMixinValue[];
|
|
34
|
+
contents?: MasterCSSMixinNode[];
|
|
35
|
+
source?: CSSDirectiveSourceReference;
|
|
36
|
+
} | {
|
|
37
|
+
type: 'contents';
|
|
38
|
+
fallback: MasterCSSMixinNode[];
|
|
39
|
+
};
|
|
40
|
+
interface MasterCSSMixinDefinition {
|
|
41
|
+
name: string;
|
|
42
|
+
parameters?: MasterCSSMixinParameter[];
|
|
43
|
+
body: MasterCSSMixinNode[];
|
|
44
|
+
source?: CSSDirectiveSourceReference;
|
|
45
|
+
}
|
|
46
|
+
interface MasterCSSUtilityDefinition extends MasterCSSMixinDefinition {
|
|
47
|
+
kind: 'static' | 'token' | 'function';
|
|
48
|
+
}
|
|
49
|
+
export { MasterCSSMixinDefinition, MasterCSSMixinNode, MasterCSSMixinParameter, MasterCSSMixinParameterSyntax, MasterCSSMixinValue, MasterCSSUtilityDefinition };
|
package/dist/mixin.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const UtilityType: {
|
|
2
|
+
/**
|
|
3
|
+
* semantic utility classes
|
|
4
|
+
* @example sr-only, text-sm
|
|
5
|
+
*/
|
|
6
|
+
readonly Semantic: -2;
|
|
7
|
+
/**
|
|
8
|
+
* normal
|
|
9
|
+
* @example p-md, font-size:1rem
|
|
10
|
+
*/
|
|
11
|
+
readonly Normal: 0;
|
|
12
|
+
};
|
|
13
|
+
type UtilityType = typeof UtilityType[keyof typeof UtilityType];
|
|
14
|
+
export { UtilityType };
|
package/package.json
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@master/css-schema",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"engines": {
|
|
5
|
+
"node": "^24"
|
|
6
|
+
},
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"description": "Public Master CSS schema and wire-format contracts.",
|
|
9
|
+
"author": "Aoyue Design LLC.",
|
|
10
|
+
"homepage": "https://css.master.co",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/master-co/css/issues"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/master-co/css.git",
|
|
17
|
+
"directory": "packages/schema"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"schema",
|
|
21
|
+
"manifest",
|
|
22
|
+
"css",
|
|
23
|
+
"mastercss"
|
|
24
|
+
],
|
|
25
|
+
"sideEffects": false,
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"import": "./dist/index.js",
|
|
31
|
+
"default": "./dist/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./manifest": {
|
|
34
|
+
"types": "./dist/manifest.d.ts",
|
|
35
|
+
"import": "./dist/manifest.js",
|
|
36
|
+
"default": "./dist/manifest.js"
|
|
37
|
+
},
|
|
38
|
+
"./hydration-manifest": {
|
|
39
|
+
"types": "./dist/hydration-manifest.d.ts",
|
|
40
|
+
"import": "./dist/hydration-manifest.js",
|
|
41
|
+
"default": "./dist/hydration-manifest.js"
|
|
42
|
+
},
|
|
43
|
+
"./css-directives": {
|
|
44
|
+
"types": "./dist/css-directives.d.ts",
|
|
45
|
+
"import": "./dist/css-directives.js",
|
|
46
|
+
"default": "./dist/css-directives.js"
|
|
47
|
+
},
|
|
48
|
+
"./css-syntax": {
|
|
49
|
+
"types": "./dist/css-syntax.d.ts",
|
|
50
|
+
"import": "./dist/css-syntax.js",
|
|
51
|
+
"default": "./dist/css-syntax.js"
|
|
52
|
+
},
|
|
53
|
+
"./utility-type": {
|
|
54
|
+
"types": "./dist/utility-type.d.ts",
|
|
55
|
+
"import": "./dist/utility-type.js",
|
|
56
|
+
"default": "./dist/utility-type.js"
|
|
57
|
+
},
|
|
58
|
+
"./runtime-style": {
|
|
59
|
+
"types": "./dist/runtime-style.d.ts",
|
|
60
|
+
"import": "./dist/runtime-style.js",
|
|
61
|
+
"default": "./dist/runtime-style.js"
|
|
62
|
+
},
|
|
63
|
+
"./emitted-globals": {
|
|
64
|
+
"types": "./dist/emitted-globals.d.ts",
|
|
65
|
+
"import": "./dist/emitted-globals.js",
|
|
66
|
+
"default": "./dist/emitted-globals.js"
|
|
67
|
+
},
|
|
68
|
+
"./css-common": {
|
|
69
|
+
"types": "./dist/css-common.d.ts",
|
|
70
|
+
"import": "./dist/css-common.js",
|
|
71
|
+
"default": "./dist/css-common.js"
|
|
72
|
+
},
|
|
73
|
+
"./diagnostics": {
|
|
74
|
+
"types": "./dist/diagnostics.d.ts",
|
|
75
|
+
"import": "./dist/diagnostics.js",
|
|
76
|
+
"default": "./dist/diagnostics.js"
|
|
77
|
+
},
|
|
78
|
+
"./integration": {
|
|
79
|
+
"types": "./dist/integration.d.ts",
|
|
80
|
+
"import": "./dist/integration.js",
|
|
81
|
+
"default": "./dist/integration.js"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"files": [
|
|
85
|
+
"dist"
|
|
86
|
+
],
|
|
87
|
+
"publishConfig": {
|
|
88
|
+
"access": "public",
|
|
89
|
+
"provenance": true
|
|
90
|
+
},
|
|
91
|
+
"dependencies": {
|
|
92
|
+
"csstype": "^3.2.3"
|
|
93
|
+
},
|
|
94
|
+
"version": "0.0.0-site.1793659883.g69c9aebcf628",
|
|
95
|
+
"gitHead": "69c9aebcf628eb529001b9fa1b3536306f1b139e"
|
|
96
|
+
}
|