@navita/engine 0.2.2 → 3.0.0-next.0

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.
Files changed (67) hide show
  1. package/_virtual/_rolldown/runtime.cjs +23 -0
  2. package/cache.cjs +26 -26
  3. package/cache.mjs +28 -24
  4. package/helpers/declarationsToBlock.cjs +10 -14
  5. package/helpers/declarationsToBlock.mjs +12 -12
  6. package/helpers/generateCombinedAtRules.cjs +5 -7
  7. package/helpers/generateCombinedAtRules.mjs +7 -5
  8. package/helpers/getPropertyPriority.cjs +221 -260
  9. package/helpers/getPropertyPriority.mjs +223 -258
  10. package/helpers/hyphenateProperty.cjs +8 -9
  11. package/helpers/hyphenateProperty.mjs +10 -7
  12. package/helpers/isContainerQuery.cjs +4 -4
  13. package/helpers/isContainerQuery.mjs +6 -2
  14. package/helpers/isMediaQuery.cjs +4 -4
  15. package/helpers/isMediaQuery.mjs +6 -2
  16. package/helpers/isNestedSelector.cjs +5 -5
  17. package/helpers/isNestedSelector.mjs +7 -3
  18. package/helpers/isObject.cjs +4 -4
  19. package/helpers/isObject.mjs +6 -2
  20. package/helpers/isSupportsQuery.cjs +4 -4
  21. package/helpers/isSupportsQuery.mjs +6 -2
  22. package/helpers/normalizeCSSVarsProperty.cjs +7 -11
  23. package/helpers/normalizeCSSVarsProperty.mjs +9 -9
  24. package/helpers/normalizeCSSVarsValue.cjs +6 -8
  25. package/helpers/normalizeCSSVarsValue.mjs +8 -6
  26. package/helpers/normalizeNestedProperty.cjs +5 -7
  27. package/helpers/normalizeNestedProperty.mjs +7 -5
  28. package/helpers/pixelifyProperties.cjs +50 -53
  29. package/helpers/pixelifyProperties.mjs +52 -51
  30. package/helpers/splitSelectorList.cjs +55 -0
  31. package/helpers/splitSelectorList.mjs +57 -0
  32. package/helpers/splitStyleBlocks.cjs +23 -25
  33. package/helpers/splitStyleBlocks.mjs +25 -23
  34. package/helpers/transformContentProperty.cjs +4 -5
  35. package/helpers/transformContentProperty.mjs +6 -3
  36. package/identifiers/IDGenerator.cjs +9 -9
  37. package/identifiers/IDGenerator.mjs +11 -7
  38. package/identifiers/alphaIDGenerator.cjs +23 -26
  39. package/identifiers/alphaIDGenerator.mjs +25 -24
  40. package/identifiers/propertyValueIDGenerator.cjs +18 -23
  41. package/identifiers/propertyValueIDGenerator.mjs +20 -21
  42. package/index.cjs +187 -238
  43. package/index.d.ts +91 -84
  44. package/index.mjs +184 -234
  45. package/package.json +1 -1
  46. package/printers/printFontFaces.cjs +7 -12
  47. package/printers/printFontFaces.mjs +9 -10
  48. package/printers/printKeyFrames.cjs +10 -16
  49. package/printers/printKeyFrames.mjs +12 -14
  50. package/printers/printSourceMap.cjs +34 -39
  51. package/printers/printSourceMap.mjs +36 -37
  52. package/printers/printStyleBlocks.cjs +71 -70
  53. package/printers/printStyleBlocks.mjs +73 -68
  54. package/printers/sortAtRules.cjs +8 -7
  55. package/printers/sortAtRules.mjs +7 -4
  56. package/processKeyframes.cjs +16 -22
  57. package/processKeyframes.mjs +19 -20
  58. package/processStyles.cjs +99 -105
  59. package/processStyles.mjs +101 -103
  60. package/types.cjs +0 -2
  61. package/types.mjs +4 -1
  62. package/wrappers/classList.cjs +4 -5
  63. package/wrappers/classList.mjs +6 -3
  64. package/wrappers/static.cjs +4 -5
  65. package/wrappers/static.mjs +6 -3
  66. package/printers/sortStatic.cjs +0 -7
  67. 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
- 'use strict';
2
-
3
- class Cache {
4
- constructor(_idGenerator){
5
- this._idGenerator = _idGenerator;
6
- this._items = {};
7
- }
8
- getOrStore(value) {
9
- const cacheKey = JSON.stringify(value);
10
- if (this._items[cacheKey]) {
11
- return this._items[cacheKey];
12
- }
13
- return this._items[cacheKey] = {
14
- id: this._idGenerator.next(value),
15
- ...value
16
- };
17
- }
18
- items(ids = undefined) {
19
- const items = Object.values(this._items);
20
- if (ids === undefined) {
21
- return items;
22
- }
23
- return items.filter((item)=>ids.includes(item.id));
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
- class Cache {
2
- constructor(_idGenerator){
3
- this._idGenerator = _idGenerator;
4
- this._items = {};
5
- }
6
- getOrStore(value) {
7
- const cacheKey = JSON.stringify(value);
8
- if (this._items[cacheKey]) {
9
- return this._items[cacheKey];
10
- }
11
- return this._items[cacheKey] = {
12
- id: this._idGenerator.next(value),
13
- ...value
14
- };
15
- }
16
- items(ids = undefined) {
17
- const items = Object.values(this._items);
18
- if (ids === undefined) {
19
- return items;
20
- }
21
- return items.filter((item)=>ids.includes(item.id));
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
- 'use strict';
2
-
3
- var hyphenateProperty = require('./hyphenateProperty.cjs');
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
- let css = "";
8
- for(const prop in style){
9
- const val = style[prop];
10
- if (typeof val === "string" || typeof val === "number") {
11
- css += `${hyphenateProperty.hyphenateProperty(prop)}:${val};`;
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 { hyphenateProperty } from './hyphenateProperty.mjs';
2
-
3
- // https://github.com/styletron/styletron/blob/b552ddc5050a8cc5eec84a46a299d937d3bb0112/packages/styletron-engine-atomic/src/css.ts#L36
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
- let css = "";
6
- for(const prop in style){
7
- const val = style[prop];
8
- if (typeof val === "string" || typeof val === "number") {
9
- css += `${hyphenateProperty(prop)}:${val};`;
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
- 'use strict';
2
-
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/helpers/generateCombinedAtRules.ts
3
3
  function generateCombinedAtRules(currentMediaQuery, nestedMediaQuery) {
4
- if (currentMediaQuery.length === 0) {
5
- return nestedMediaQuery;
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
- if (currentMediaQuery.length === 0) {
3
- return nestedMediaQuery;
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 };