@master/css-runtime 2.0.0-rc.72 → 2.0.0-rc.74
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/LICENSE +21 -0
- package/dist/class-tracker.d.ts +11 -9
- package/dist/core.d.ts +84 -69
- package/dist/css-runtime.d.ts +14 -11
- package/dist/debuggers/class-count.d.ts +6 -2
- package/dist/debuggers/index.d.ts +7 -3
- package/dist/debuggers/lifecycle.d.ts +13 -9
- package/dist/debuggers/log.d.ts +14 -12
- package/dist/default-manifest.json +1 -1
- package/dist/generated-rule.d.ts +28 -24
- package/dist/global.min.d.ts +1 -1
- package/dist/global.min.js +3 -1
- package/dist/index.d.ts +8 -10
- package/dist/index.development.d.ts +6 -1
- package/dist/index.development.js +1211 -0
- package/dist/index.js +1211 -0
- package/dist/layer.d.ts +19 -15
- package/dist/native-declaration.d.ts +6 -2
- package/dist/register-global.d.ts +8 -4
- package/dist/theme-layer.d.ts +30 -27
- package/dist/types/hydrate-result.d.ts +8 -4
- package/dist/types/index.d.ts +2 -1
- package/dist/utility-layer.d.ts +14 -11
- package/dist/utils/find-native-css-rule-index.d.ts +4 -1
- package/package.json +71 -1
- package/dist/index.development.mjs +0 -1338
- package/dist/index.mjs +0 -1192
package/dist/layer.d.ts
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import CSSRuntime from "./core.js";
|
|
2
|
+
import { Layer, Rule, VariableRule } from "@master/css-engine";
|
|
3
|
+
|
|
4
|
+
//#region src/layer.d.ts
|
|
5
|
+
declare class RuntimeLayer extends Layer {
|
|
6
|
+
name: string;
|
|
7
|
+
cssRuntime: CSSRuntime;
|
|
8
|
+
readonly rules: (Rule | VariableRule)[];
|
|
9
|
+
readonly tokenCounts: Map<string, number>;
|
|
10
|
+
native: CSSLayerBlockRule | null;
|
|
11
|
+
constructor(name: string, cssRuntime: CSSRuntime);
|
|
12
|
+
attach(): void;
|
|
13
|
+
insert(rule: Rule | VariableRule, index?: number): number | undefined;
|
|
14
|
+
getNativeInsertIndex(index: number): number;
|
|
15
|
+
detach(): void;
|
|
16
|
+
delete(key: string): Rule | VariableRule | undefined;
|
|
17
|
+
reset(): void;
|
|
16
18
|
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { RuntimeLayer as default };
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { NativeCSSDeclarationMatcher } from "@master/css-engine";
|
|
2
|
+
|
|
3
|
+
//#region src/native-declaration.d.ts
|
|
4
|
+
declare const browserNativeDeclarationMatcher: NativeCSSDeclarationMatcher;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { browserNativeDeclarationMatcher };
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import CSSRuntime from "./core.js";
|
|
2
|
+
|
|
3
|
+
//#region src/register-global.d.ts
|
|
2
4
|
declare global {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
var MasterCSSRuntime: typeof CSSRuntime;
|
|
6
|
+
var masterCSSRuntime: CSSRuntime;
|
|
5
7
|
}
|
|
6
|
-
|
|
8
|
+
declare function registerGlobal(CSSRuntime: typeof CSSRuntime): void;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { registerGlobal as default };
|
package/dist/theme-layer.d.ts
CHANGED
|
@@ -1,30 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import CSSRuntime from "./core.js";
|
|
2
|
+
import { ThemeLayer, VariableRule } from "@master/css-engine";
|
|
3
|
+
|
|
4
|
+
//#region src/theme-layer.d.ts
|
|
3
5
|
interface NativeBucket {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
key: string;
|
|
7
|
+
mediaText: string;
|
|
8
|
+
mode?: string;
|
|
9
|
+
selectorText: string;
|
|
10
|
+
nativeRule: CSSRule;
|
|
11
|
+
styleRule: CSSStyleRule;
|
|
10
12
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
13
|
+
declare class RuntimeThemeLayer extends ThemeLayer {
|
|
14
|
+
name: string;
|
|
15
|
+
cssRuntime: CSSRuntime;
|
|
16
|
+
native: CSSLayerBlockRule | null;
|
|
17
|
+
private nativeBuckets;
|
|
18
|
+
constructor(name: string, cssRuntime: CSSRuntime);
|
|
19
|
+
attach(): void;
|
|
20
|
+
getBucketKey(mediaText: string, selectorText: string): string;
|
|
21
|
+
private setBucketSyntheticDeclarations;
|
|
22
|
+
private hasVariableDeclarations;
|
|
23
|
+
getStyleRule(nativeRule: CSSRule): CSSStyleRule | undefined;
|
|
24
|
+
syncNativeBuckets(): void;
|
|
25
|
+
ensureNativeBucket(mediaText: string, selectorText: string, mode?: string): NativeBucket | undefined;
|
|
26
|
+
getNativeBucketInsertIndex(mediaText: string, selectorText: string): number;
|
|
27
|
+
insert(rule: VariableRule, index?: number): number | undefined;
|
|
28
|
+
delete(key: string): VariableRule | undefined;
|
|
29
|
+
detach(): void;
|
|
30
|
+
reset(): void;
|
|
29
31
|
}
|
|
30
|
-
|
|
32
|
+
//#endregion
|
|
33
|
+
export { RuntimeThemeLayer as default };
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import HydratedGeneratedRule from "../generated-rule.js";
|
|
2
|
+
import { GeneratedRule } from "@master/css-engine";
|
|
3
|
+
|
|
4
|
+
//#region src/types/hydrate-result.d.ts
|
|
5
|
+
interface HydrateResult {
|
|
6
|
+
allUtilities: (GeneratedRule | HydratedGeneratedRule)[];
|
|
5
7
|
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { HydrateResult };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { HydrateResult } from "./hydrate-result.js";
|
|
2
|
+
export { HydrateResult };
|
package/dist/utility-layer.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import RuntimeLayer from "./layer.js";
|
|
2
|
+
import HydratedGeneratedRule from "./generated-rule.js";
|
|
3
|
+
import { GeneratedRule, Rule } from "@master/css-engine";
|
|
4
|
+
|
|
5
|
+
//#region src/utility-layer.d.ts
|
|
4
6
|
type RuntimeGeneratedRule = GeneratedRule | HydratedGeneratedRule;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
declare class RuntimeUtilityLayer extends RuntimeLayer {
|
|
8
|
+
rules: (RuntimeGeneratedRule | Rule)[];
|
|
9
|
+
insert(utility: RuntimeGeneratedRule | Rule): number | undefined;
|
|
10
|
+
delete(key: string): Rule | RuntimeGeneratedRule | undefined;
|
|
11
|
+
insertVariables(utility: RuntimeGeneratedRule | Rule): void;
|
|
12
|
+
insertAnimations(utility: RuntimeGeneratedRule | Rule): void;
|
|
11
13
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
declare type RuntimeUtilityLayerInstance = RuntimeUtilityLayer;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { RuntimeUtilityLayerInstance, RuntimeUtilityLayer as default };
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/utils/find-native-css-rule-index.d.ts
|
|
2
|
+
declare function findNativeCSSRuleIndex(cssRules: CSSRuleList, nativeRule: CSSRule): number;
|
|
3
|
+
//#endregion
|
|
4
|
+
export { findNativeCSSRuleIndex as default };
|
package/package.json
CHANGED
|
@@ -1 +1,71 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"name": "@master/css-runtime",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "Run Master CSS right in the browser",
|
|
6
|
+
"author": "Aoyue Design LLC.",
|
|
7
|
+
"funding": "https://rc.css.master.co/sponsor",
|
|
8
|
+
"homepage": "https://css.master.co",
|
|
9
|
+
"bugs": {
|
|
10
|
+
"url": "https://github.com/master-co/css/issues"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/master-co/css.git",
|
|
15
|
+
"directory": "packages/runtime"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"utility",
|
|
19
|
+
"css",
|
|
20
|
+
"lightweight",
|
|
21
|
+
"mastercss",
|
|
22
|
+
"master",
|
|
23
|
+
"runtime",
|
|
24
|
+
"cdn"
|
|
25
|
+
],
|
|
26
|
+
"sideEffects": false,
|
|
27
|
+
"main": "./dist/index.js",
|
|
28
|
+
"jsnext:main": "./dist/index.js",
|
|
29
|
+
"esnext": "./dist/index.js",
|
|
30
|
+
"module": "./dist/index.js",
|
|
31
|
+
"browser": "./dist/global.min.js",
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"exports": {
|
|
34
|
+
".": {
|
|
35
|
+
"types": "./dist/index.d.ts",
|
|
36
|
+
"import": {
|
|
37
|
+
"development": "./dist/index.development.js",
|
|
38
|
+
"default": "./dist/index.js"
|
|
39
|
+
},
|
|
40
|
+
"default": "./dist/index.js"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist"
|
|
45
|
+
],
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public",
|
|
48
|
+
"provenance": true
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@master/css-engine": "^2.0.0-rc.74",
|
|
52
|
+
"@master/css-schema": "^2.0.0-rc.74",
|
|
53
|
+
"@master/css-preset": "^2.0.0-rc.74"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@playwright/test": "1.61.0",
|
|
57
|
+
"@master/css": "^2.0.0-rc.74",
|
|
58
|
+
"@master/css-compiler": "^2.0.0-rc.74",
|
|
59
|
+
"@master/css-integration": "^2.0.0-rc.74"
|
|
60
|
+
},
|
|
61
|
+
"version": "2.0.0-rc.74",
|
|
62
|
+
"scripts": {
|
|
63
|
+
"build": "tsdown",
|
|
64
|
+
"bench": "node scripts/benchmark-runtime.js",
|
|
65
|
+
"dev": "tsdown --watch",
|
|
66
|
+
"e2e": "playwright test",
|
|
67
|
+
"e2e:watch": "nodemon -e js,ts,html,css --watch dist --watch e2e --watch tests --exec playwright test",
|
|
68
|
+
"type-check": "tsc -b tsconfig.typecheck.json",
|
|
69
|
+
"lint": "eslint"
|
|
70
|
+
}
|
|
71
|
+
}
|