@navita/engine 0.2.2 → 3.0.0-next.1
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/_virtual/_rolldown/runtime.cjs +23 -0
- package/cache.cjs +26 -26
- package/cache.mjs +28 -24
- package/helpers/declarationsToBlock.cjs +10 -14
- package/helpers/declarationsToBlock.mjs +12 -12
- package/helpers/generateCombinedAtRules.cjs +5 -7
- package/helpers/generateCombinedAtRules.mjs +7 -5
- package/helpers/getPropertyPriority.cjs +221 -260
- package/helpers/getPropertyPriority.mjs +223 -258
- package/helpers/hyphenateProperty.cjs +8 -9
- package/helpers/hyphenateProperty.mjs +10 -7
- package/helpers/isContainerQuery.cjs +4 -4
- package/helpers/isContainerQuery.mjs +6 -2
- package/helpers/isMediaQuery.cjs +4 -4
- package/helpers/isMediaQuery.mjs +6 -2
- package/helpers/isNestedSelector.cjs +5 -5
- package/helpers/isNestedSelector.mjs +7 -3
- package/helpers/isObject.cjs +4 -4
- package/helpers/isObject.mjs +6 -2
- package/helpers/isSupportsQuery.cjs +4 -4
- package/helpers/isSupportsQuery.mjs +6 -2
- package/helpers/normalizeCSSVarsProperty.cjs +7 -11
- package/helpers/normalizeCSSVarsProperty.mjs +9 -9
- package/helpers/normalizeCSSVarsValue.cjs +6 -8
- package/helpers/normalizeCSSVarsValue.mjs +8 -6
- package/helpers/normalizeNestedProperty.cjs +5 -7
- package/helpers/normalizeNestedProperty.mjs +7 -5
- package/helpers/pixelifyProperties.cjs +50 -53
- package/helpers/pixelifyProperties.mjs +52 -51
- package/helpers/splitSelectorList.cjs +55 -0
- package/helpers/splitSelectorList.mjs +57 -0
- package/helpers/splitStyleBlocks.cjs +23 -25
- package/helpers/splitStyleBlocks.mjs +25 -23
- package/helpers/transformContentProperty.cjs +4 -5
- package/helpers/transformContentProperty.mjs +6 -3
- package/identifiers/IDGenerator.cjs +9 -9
- package/identifiers/IDGenerator.mjs +11 -7
- package/identifiers/alphaIDGenerator.cjs +23 -26
- package/identifiers/alphaIDGenerator.mjs +25 -24
- package/identifiers/propertyValueIDGenerator.cjs +18 -23
- package/identifiers/propertyValueIDGenerator.mjs +20 -21
- package/index.cjs +187 -238
- package/index.d.ts +91 -84
- package/index.mjs +184 -234
- package/package.json +1 -1
- package/printers/printFontFaces.cjs +7 -12
- package/printers/printFontFaces.mjs +9 -10
- package/printers/printKeyFrames.cjs +10 -16
- package/printers/printKeyFrames.mjs +12 -14
- package/printers/printSourceMap.cjs +34 -39
- package/printers/printSourceMap.mjs +36 -37
- package/printers/printStyleBlocks.cjs +71 -70
- package/printers/printStyleBlocks.mjs +73 -68
- package/printers/sortAtRules.cjs +8 -7
- package/printers/sortAtRules.mjs +7 -4
- package/processKeyframes.cjs +16 -22
- package/processKeyframes.mjs +19 -20
- package/processStyles.cjs +99 -105
- package/processStyles.mjs +101 -103
- package/types.cjs +0 -2
- package/types.mjs +4 -1
- package/wrappers/classList.cjs +4 -5
- package/wrappers/classList.mjs +6 -3
- package/wrappers/static.cjs +4 -5
- package/wrappers/static.mjs +6 -3
- package/printers/sortStatic.cjs +0 -7
- package/printers/sortStatic.mjs +0 -5
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
+
value: mod,
|
|
20
|
+
enumerable: true
|
|
21
|
+
}) : target, mod));
|
|
22
|
+
//#endregion
|
|
23
|
+
exports.__toESM = __toESM;
|
package/cache.cjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/cache.ts
|
|
3
|
+
var Cache = class {
|
|
4
|
+
_idGenerator;
|
|
5
|
+
_items = {};
|
|
6
|
+
constructor(_idGenerator) {
|
|
7
|
+
this._idGenerator = _idGenerator;
|
|
8
|
+
}
|
|
9
|
+
getOrStore(value) {
|
|
10
|
+
const cacheKey = JSON.stringify(value);
|
|
11
|
+
if (this._items[cacheKey]) return this._items[cacheKey];
|
|
12
|
+
const item = {
|
|
13
|
+
id: this._idGenerator.next(value),
|
|
14
|
+
...value
|
|
15
|
+
};
|
|
16
|
+
this._items[cacheKey] = item;
|
|
17
|
+
return item;
|
|
18
|
+
}
|
|
19
|
+
items(ids = void 0) {
|
|
20
|
+
const items = Object.values(this._items);
|
|
21
|
+
if (ids === void 0) return items;
|
|
22
|
+
const idSet = new Set(ids);
|
|
23
|
+
return items.filter((item) => idSet.has(item.id));
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
27
|
exports.Cache = Cache;
|
package/cache.mjs
CHANGED
|
@@ -1,25 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
//#region src/cache.ts
|
|
5
|
+
var Cache = class {
|
|
6
|
+
_idGenerator;
|
|
7
|
+
_items = {};
|
|
8
|
+
constructor(_idGenerator) {
|
|
9
|
+
this._idGenerator = _idGenerator;
|
|
10
|
+
}
|
|
11
|
+
getOrStore(value) {
|
|
12
|
+
const cacheKey = JSON.stringify(value);
|
|
13
|
+
if (this._items[cacheKey]) return this._items[cacheKey];
|
|
14
|
+
const item = {
|
|
15
|
+
id: this._idGenerator.next(value),
|
|
16
|
+
...value
|
|
17
|
+
};
|
|
18
|
+
this._items[cacheKey] = item;
|
|
19
|
+
return item;
|
|
20
|
+
}
|
|
21
|
+
items(ids = void 0) {
|
|
22
|
+
const items = Object.values(this._items);
|
|
23
|
+
if (ids === void 0) return items;
|
|
24
|
+
const idSet = new Set(ids);
|
|
25
|
+
return items.filter((item) => idSet.has(item.id));
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
25
29
|
export { Cache };
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
// https://github.com/styletron/styletron/blob/b552ddc5050a8cc5eec84a46a299d937d3bb0112/packages/styletron-engine-atomic/src/css.ts#L36
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_helpers_hyphenateProperty = require("./hyphenateProperty.cjs");
|
|
3
|
+
//#region src/helpers/declarationsToBlock.ts
|
|
6
4
|
function declarationsToBlock(style) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
return css.slice(0, -1);
|
|
5
|
+
let css = "";
|
|
6
|
+
for (const prop in style) {
|
|
7
|
+
const val = style[prop];
|
|
8
|
+
if (typeof val === "string" || typeof val === "number") css += `${require_helpers_hyphenateProperty.hyphenateProperty(prop)}:${val};`;
|
|
9
|
+
}
|
|
10
|
+
return css.slice(0, -1);
|
|
15
11
|
}
|
|
16
|
-
|
|
12
|
+
//#endregion
|
|
17
13
|
exports.declarationsToBlock = declarationsToBlock;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
import { hyphenateProperty } from "./hyphenateProperty.mjs";
|
|
5
|
+
//#region src/helpers/declarationsToBlock.ts
|
|
4
6
|
function declarationsToBlock(style) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
return css.slice(0, -1);
|
|
7
|
+
let css = "";
|
|
8
|
+
for (const prop in style) {
|
|
9
|
+
const val = style[prop];
|
|
10
|
+
if (typeof val === "string" || typeof val === "number") css += `${hyphenateProperty(prop)}:${val};`;
|
|
11
|
+
}
|
|
12
|
+
return css.slice(0, -1);
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
//#endregion
|
|
15
15
|
export { declarationsToBlock };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/helpers/generateCombinedAtRules.ts
|
|
3
3
|
function generateCombinedAtRules(currentMediaQuery, nestedMediaQuery) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
return `${currentMediaQuery} and ${nestedMediaQuery}`;
|
|
4
|
+
if (currentMediaQuery.length === 0) return nestedMediaQuery;
|
|
5
|
+
return `${currentMediaQuery} and ${nestedMediaQuery}`;
|
|
8
6
|
}
|
|
9
|
-
|
|
7
|
+
//#endregion
|
|
10
8
|
exports.generateCombinedAtRules = generateCombinedAtRules;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
//#region src/helpers/generateCombinedAtRules.ts
|
|
1
5
|
function generateCombinedAtRules(currentMediaQuery, nestedMediaQuery) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
return `${currentMediaQuery} and ${nestedMediaQuery}`;
|
|
6
|
+
if (currentMediaQuery.length === 0) return nestedMediaQuery;
|
|
7
|
+
return `${currentMediaQuery} and ${nestedMediaQuery}`;
|
|
6
8
|
}
|
|
7
|
-
|
|
9
|
+
//#endregion
|
|
8
10
|
export { generateCombinedAtRules };
|