@master/css 2.0.0-beta.185 → 2.0.0-beta.186
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 -5
- package/dist/config/index.d.ts +9 -34
- package/dist/config/rules.d.ts +6189 -270
- package/dist/config/styles.d.ts +3 -0
- package/dist/config/variables.d.ts +1 -1
- package/dist/core.d.ts +1 -2
- package/dist/index.browser.bundle.js +1 -1
- package/dist/index.bundle.js +2 -2
- package/dist/index.bundle.mjs +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/rule.d.ts +49 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,12 +65,12 @@ Visit [beta.css.master.co](https://beta.css.master.co) to view the full document
|
|
|
65
65
|
## Getting Started
|
|
66
66
|
Check out the [official guides](https://beta.css.master.co/docs) to get started with Master CSS, or walk through the [examples](https://github.com/master-co/css/tree/beta/examples) for a quick overview of integrating with your framework.
|
|
67
67
|
|
|
68
|
-
##
|
|
69
|
-
Master CSS provides various [
|
|
68
|
+
## Rendering Modes
|
|
69
|
+
Master CSS provides various [rendering modes](https://beta.css.master.co/docs/rendering-modes), allowing you to choose according to the characteristics and needs of different projects.
|
|
70
70
|
|
|
71
|
-
- [Progressive Rendering](https://beta.css.master.co/docs/
|
|
72
|
-
- [Runtime Rendering](https://beta.css.master.co/docs/
|
|
73
|
-
- [Static Extraction](https://beta.css.master.co/docs/
|
|
71
|
+
- [Progressive Rendering](https://beta.css.master.co/docs/rendering-modes/progressive-rendering) - Scan the requested HTML on the server side, generate CSS rules, and enable runtime engine on the browser side
|
|
72
|
+
- [Runtime Rendering](https://beta.css.master.co/docs/rendering-modes/runtime-rendering) - Observe the DOM tree, manipulate CSS rules according to the changed class name, and synchronize to the running style sheet at runtime
|
|
73
|
+
- [Static Extraction](https://beta.css.master.co/docs/rendering-modes/static-extraction) - Scan source files for class names at build time, extract class names, and generate CSS files/virtual modules, then import them in the entry file
|
|
74
74
|
|
|
75
75
|
## Ecosystem
|
|
76
76
|
We've built various Master CSS core functionality/integration packages:
|
package/dist/config/index.d.ts
CHANGED
|
@@ -8,40 +8,11 @@ import rules from './rules';
|
|
|
8
8
|
import functions from './functions';
|
|
9
9
|
import { CSSDeclarations } from '../types/css-declarations';
|
|
10
10
|
import type { Rule } from '../rule';
|
|
11
|
-
import { CoreLayer, Layer } from '../layer';
|
|
12
11
|
declare const config: Config;
|
|
13
12
|
export { config, mediaQueries, colors, selectors, semantics, rules, functions, animations, variables };
|
|
14
|
-
|
|
15
|
-
id?: string;
|
|
16
|
-
match?: RegExp | [string, string[]?];
|
|
17
|
-
resolvedMatch?: RegExp;
|
|
18
|
-
resolvedVariables?: any;
|
|
19
|
-
variables?: Record<string, string | number> | Array<string | number | Record<string, string | number>>;
|
|
20
|
-
order?: number;
|
|
21
|
-
separators?: string[];
|
|
22
|
-
shorthand?: string;
|
|
23
|
-
colored?: boolean;
|
|
24
|
-
numeric?: boolean;
|
|
25
|
-
unit?: any;
|
|
26
|
-
native?: boolean;
|
|
27
|
-
declarations?: CSSDeclarations;
|
|
28
|
-
resolvedPropName?: string;
|
|
29
|
-
layer?: Layer | CoreLayer;
|
|
30
|
-
analyze?(this: Rule, className: string): [valueToken: string, prefixToken?: string];
|
|
31
|
-
transform?(this: Rule, value: string): string;
|
|
32
|
-
declare?(this: Rule, value: string, unit: string): CSSDeclarations;
|
|
33
|
-
delete?(this: Rule, className: string): void;
|
|
34
|
-
create?(this: Rule, className: string): void;
|
|
35
|
-
insert?(this: Rule): void;
|
|
36
|
-
}
|
|
37
|
-
type VariableValue = number | string | VariableGroup | (number | string)[];
|
|
13
|
+
type Variable = number | string | (number | string)[];
|
|
38
14
|
type VariableGroup = {
|
|
39
|
-
[key: string]:
|
|
40
|
-
};
|
|
41
|
-
type Variables = {
|
|
42
|
-
[key in keyof typeof rules]: VariableGroup;
|
|
43
|
-
} | {
|
|
44
|
-
[key in string]: VariableGroup | VariableValue;
|
|
15
|
+
[key: string]: Variable;
|
|
45
16
|
};
|
|
46
17
|
export interface Config {
|
|
47
18
|
extends?: (Config | {
|
|
@@ -54,7 +25,7 @@ export interface Config {
|
|
|
54
25
|
[key: string]: string | Config['colors'];
|
|
55
26
|
};
|
|
56
27
|
mediaQueries?: {
|
|
57
|
-
[key: string]: number | Config['mediaQueries'];
|
|
28
|
+
[key: string]: number | string | Config['mediaQueries'];
|
|
58
29
|
};
|
|
59
30
|
selectors?: {
|
|
60
31
|
[key: string]: string | string[] | Config['selectors'];
|
|
@@ -64,9 +35,13 @@ export interface Config {
|
|
|
64
35
|
} & {
|
|
65
36
|
[key: string]: CSSDeclarations;
|
|
66
37
|
};
|
|
67
|
-
variables?:
|
|
38
|
+
variables?: {
|
|
39
|
+
[key in keyof typeof rules]: VariableGroup;
|
|
40
|
+
} | {
|
|
41
|
+
[key in string]: VariableGroup | Variable;
|
|
42
|
+
};
|
|
68
43
|
rules?: {
|
|
69
|
-
[key in keyof typeof rules | string]?:
|
|
44
|
+
[key in keyof typeof rules | string]?: Rule['options'];
|
|
70
45
|
};
|
|
71
46
|
rootSize?: number;
|
|
72
47
|
scope?: string;
|