@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
@@ -1,23 +1,22 @@
1
- import { isObject } from './helpers/isObject.mjs';
2
- import { transformContentProperty } from './helpers/transformContentProperty.mjs';
3
-
4
- const transformValuePropertyMap = {
5
- content: transformContentProperty
6
- };
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { isObject } from "./helpers/isObject.mjs";
5
+ import { transformContentProperty } from "./helpers/transformContentProperty.mjs";
6
+ //#region src/processKeyframes.ts
7
+ const transformValuePropertyMap = { content: transformContentProperty };
7
8
  function processKeyframes(keyframes) {
8
- const newKeyframes = {};
9
- for (const [key, value] of Object.entries(keyframes)){
10
- if (isObject(value)) {
11
- newKeyframes[key] = processKeyframes(value);
12
- continue;
13
- }
14
- let newValue = value;
15
- if (transformValuePropertyMap[key]) {
16
- newValue = transformValuePropertyMap[key](newValue);
17
- }
18
- newKeyframes[key] = newValue;
19
- }
20
- return newKeyframes;
9
+ const newKeyframes = {};
10
+ for (const [key, value] of Object.entries(keyframes)) {
11
+ if (isObject(value)) {
12
+ newKeyframes[key] = processKeyframes(value);
13
+ continue;
14
+ }
15
+ let newValue = value;
16
+ if (transformValuePropertyMap[key]) newValue = transformValuePropertyMap[key](newValue);
17
+ newKeyframes[key] = newValue;
18
+ }
19
+ return newKeyframes;
21
20
  }
22
-
21
+ //#endregion
23
22
  export { processKeyframes };
package/processStyles.cjs CHANGED
@@ -1,107 +1,101 @@
1
- 'use strict';
2
-
3
- var generateCombinedAtRules = require('./helpers/generateCombinedAtRules.cjs');
4
- var hyphenateProperty = require('./helpers/hyphenateProperty.cjs');
5
- var isContainerQuery = require('./helpers/isContainerQuery.cjs');
6
- var isMediaQuery = require('./helpers/isMediaQuery.cjs');
7
- var isNestedSelector = require('./helpers/isNestedSelector.cjs');
8
- var isObject = require('./helpers/isObject.cjs');
9
- var isSupportsQuery = require('./helpers/isSupportsQuery.cjs');
10
- var normalizeCSSVarsProperty = require('./helpers/normalizeCSSVarsProperty.cjs');
11
- var normalizeCSSVarsValue = require('./helpers/normalizeCSSVarsValue.cjs');
12
- var normalizeNestedProperty = require('./helpers/normalizeNestedProperty.cjs');
13
- var pixelifyProperties = require('./helpers/pixelifyProperties.cjs');
14
- var transformContentProperty = require('./helpers/transformContentProperty.cjs');
15
-
16
- const transformValuePropertyMap = {
17
- content: transformContentProperty.transformContentProperty
18
- };
19
- function processStyles({ cache , type }) {
20
- return function process({ styles , pseudo ="" , media ="" , support ="" , container ="" , selector ="" }) {
21
- const result = [];
22
- for (const [property, value] of Object.entries(styles)){
23
- if (isObject.isObject(value)) {
24
- if (isMediaQuery.isMediaQuery(property)) {
25
- const combinedMedia = generateCombinedAtRules.generateCombinedAtRules(media, property.slice(6).trim());
26
- result.push(...process({
27
- styles: value,
28
- pseudo,
29
- media: combinedMedia,
30
- support,
31
- container,
32
- selector
33
- }));
34
- continue;
35
- }
36
- if (isSupportsQuery.isSupportsQuery(property)) {
37
- const combinedSupport = generateCombinedAtRules.generateCombinedAtRules(support, property.slice(9).trim());
38
- result.push(...process({
39
- styles: value,
40
- pseudo,
41
- media,
42
- support: combinedSupport,
43
- container,
44
- selector
45
- }));
46
- continue;
47
- }
48
- if (isContainerQuery.isContainerQuery(property)) {
49
- const combinedContainer = generateCombinedAtRules.generateCombinedAtRules(container, property.slice(10).trim());
50
- result.push(...process({
51
- styles: value,
52
- pseudo,
53
- media,
54
- support,
55
- container: combinedContainer,
56
- selector
57
- }));
58
- continue;
59
- }
60
- if (isNestedSelector.isNestedSelector(property)) {
61
- // This is only allowed in simple pseudos currently.
62
- const copies = property.split(',').map((p)=>p.trim());
63
- for (const copy of copies){
64
- result.push(...process({
65
- styles: value,
66
- pseudo: pseudo + normalizeNestedProperty.normalizeNestedProperty(copy),
67
- media,
68
- support,
69
- container,
70
- selector
71
- }));
72
- }
73
- continue;
74
- }
75
- console.warn("Unknown property", property);
76
- continue;
77
- }
78
- let newProperty = normalizeCSSVarsProperty.normalizeCSSVarsProperty(property);
79
- let newValue = value;
80
- if (typeof value === "string") {
81
- newValue = value.trim().replace(/;[\n\s]*$/, "");
82
- newValue = normalizeCSSVarsValue.normalizeCSSVarsValue(newValue);
83
- }
84
- if (typeof value === "number") {
85
- newValue = pixelifyProperties.pixelifyProperties(newProperty, value);
86
- }
87
- if (transformValuePropertyMap[newProperty]) {
88
- newValue = transformValuePropertyMap[newProperty](value);
89
- }
90
- newProperty = hyphenateProperty.hyphenateProperty(newProperty);
91
- // Remove trailing semicolon and new lines with regex
92
- result.push(cache.getOrStore({
93
- type,
94
- selector,
95
- property: newProperty,
96
- value: newValue,
97
- pseudo,
98
- media,
99
- support,
100
- container
101
- }));
102
- }
103
- return result;
104
- };
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_helpers_isObject = require("./helpers/isObject.cjs");
3
+ const require_helpers_hyphenateProperty = require("./helpers/hyphenateProperty.cjs");
4
+ const require_helpers_transformContentProperty = require("./helpers/transformContentProperty.cjs");
5
+ const require_helpers_generateCombinedAtRules = require("./helpers/generateCombinedAtRules.cjs");
6
+ const require_helpers_isContainerQuery = require("./helpers/isContainerQuery.cjs");
7
+ const require_helpers_isMediaQuery = require("./helpers/isMediaQuery.cjs");
8
+ const require_helpers_isNestedSelector = require("./helpers/isNestedSelector.cjs");
9
+ const require_helpers_isSupportsQuery = require("./helpers/isSupportsQuery.cjs");
10
+ const require_helpers_normalizeCSSVarsProperty = require("./helpers/normalizeCSSVarsProperty.cjs");
11
+ const require_helpers_normalizeCSSVarsValue = require("./helpers/normalizeCSSVarsValue.cjs");
12
+ const require_helpers_normalizeNestedProperty = require("./helpers/normalizeNestedProperty.cjs");
13
+ const require_helpers_pixelifyProperties = require("./helpers/pixelifyProperties.cjs");
14
+ const require_helpers_splitSelectorList = require("./helpers/splitSelectorList.cjs");
15
+ //#region src/processStyles.ts
16
+ const transformValuePropertyMap = { content: require_helpers_transformContentProperty.transformContentProperty };
17
+ function processStyles({ cache, type }) {
18
+ return function process({ styles, pseudo = "", media = "", support = "", container = "", selector = "" }) {
19
+ const result = [];
20
+ for (const [property, value] of Object.entries(styles)) {
21
+ if (require_helpers_isObject.isObject(value)) {
22
+ if (require_helpers_isMediaQuery.isMediaQuery(property)) {
23
+ const combinedMedia = require_helpers_generateCombinedAtRules.generateCombinedAtRules(media, property.slice(6).trim());
24
+ result.push(...process({
25
+ styles: value,
26
+ pseudo,
27
+ media: combinedMedia,
28
+ support,
29
+ container,
30
+ selector
31
+ }));
32
+ continue;
33
+ }
34
+ if (require_helpers_isSupportsQuery.isSupportsQuery(property)) {
35
+ const combinedSupport = require_helpers_generateCombinedAtRules.generateCombinedAtRules(support, property.slice(9).trim());
36
+ result.push(...process({
37
+ styles: value,
38
+ pseudo,
39
+ media,
40
+ support: combinedSupport,
41
+ container,
42
+ selector
43
+ }));
44
+ continue;
45
+ }
46
+ if (require_helpers_isContainerQuery.isContainerQuery(property)) {
47
+ const combinedContainer = require_helpers_generateCombinedAtRules.generateCombinedAtRules(container, property.slice(10).trim());
48
+ result.push(...process({
49
+ styles: value,
50
+ pseudo,
51
+ media,
52
+ support,
53
+ container: combinedContainer,
54
+ selector
55
+ }));
56
+ continue;
57
+ }
58
+ if (require_helpers_isNestedSelector.isNestedSelector(property)) {
59
+ const copies = require_helpers_splitSelectorList.splitSelectorList(property);
60
+ const hasLeadingDescendant = /^\s/.test(property);
61
+ for (let i = 0; i < copies.length; i++) {
62
+ const copy = i === 0 && hasLeadingDescendant ? ` ${copies[i]}` : copies[i];
63
+ result.push(...process({
64
+ styles: value,
65
+ pseudo: pseudo + require_helpers_normalizeNestedProperty.normalizeNestedProperty(copy),
66
+ media,
67
+ support,
68
+ container,
69
+ selector
70
+ }));
71
+ }
72
+ continue;
73
+ }
74
+ console.warn("Unknown property", property);
75
+ continue;
76
+ }
77
+ let newProperty = require_helpers_normalizeCSSVarsProperty.normalizeCSSVarsProperty(property);
78
+ let newValue = value;
79
+ if (typeof value === "string") {
80
+ newValue = value.trim().replace(/;[\n\s]*$/, "");
81
+ newValue = require_helpers_normalizeCSSVarsValue.normalizeCSSVarsValue(newValue);
82
+ }
83
+ if (typeof value === "number") newValue = require_helpers_pixelifyProperties.pixelifyProperties(newProperty, value);
84
+ if (transformValuePropertyMap[newProperty]) newValue = transformValuePropertyMap[newProperty](value);
85
+ newProperty = require_helpers_hyphenateProperty.hyphenateProperty(newProperty);
86
+ result.push(cache.getOrStore({
87
+ type,
88
+ selector,
89
+ property: newProperty,
90
+ value: newValue,
91
+ pseudo,
92
+ media,
93
+ support,
94
+ container
95
+ }));
96
+ }
97
+ return result;
98
+ };
105
99
  }
106
-
100
+ //#endregion
107
101
  exports.processStyles = processStyles;
package/processStyles.mjs CHANGED
@@ -1,105 +1,103 @@
1
- import { generateCombinedAtRules } from './helpers/generateCombinedAtRules.mjs';
2
- import { hyphenateProperty } from './helpers/hyphenateProperty.mjs';
3
- import { isContainerQuery } from './helpers/isContainerQuery.mjs';
4
- import { isMediaQuery } from './helpers/isMediaQuery.mjs';
5
- import { isNestedSelector } from './helpers/isNestedSelector.mjs';
6
- import { isObject } from './helpers/isObject.mjs';
7
- import { isSupportsQuery } from './helpers/isSupportsQuery.mjs';
8
- import { normalizeCSSVarsProperty } from './helpers/normalizeCSSVarsProperty.mjs';
9
- import { normalizeCSSVarsValue } from './helpers/normalizeCSSVarsValue.mjs';
10
- import { normalizeNestedProperty } from './helpers/normalizeNestedProperty.mjs';
11
- import { pixelifyProperties } from './helpers/pixelifyProperties.mjs';
12
- import { transformContentProperty } from './helpers/transformContentProperty.mjs';
13
-
14
- const transformValuePropertyMap = {
15
- content: transformContentProperty
16
- };
17
- function processStyles({ cache , type }) {
18
- return function process({ styles , pseudo ="" , media ="" , support ="" , container ="" , selector ="" }) {
19
- const result = [];
20
- for (const [property, value] of Object.entries(styles)){
21
- if (isObject(value)) {
22
- if (isMediaQuery(property)) {
23
- const combinedMedia = generateCombinedAtRules(media, property.slice(6).trim());
24
- result.push(...process({
25
- styles: value,
26
- pseudo,
27
- media: combinedMedia,
28
- support,
29
- container,
30
- selector
31
- }));
32
- continue;
33
- }
34
- if (isSupportsQuery(property)) {
35
- const combinedSupport = generateCombinedAtRules(support, property.slice(9).trim());
36
- result.push(...process({
37
- styles: value,
38
- pseudo,
39
- media,
40
- support: combinedSupport,
41
- container,
42
- selector
43
- }));
44
- continue;
45
- }
46
- if (isContainerQuery(property)) {
47
- const combinedContainer = generateCombinedAtRules(container, property.slice(10).trim());
48
- result.push(...process({
49
- styles: value,
50
- pseudo,
51
- media,
52
- support,
53
- container: combinedContainer,
54
- selector
55
- }));
56
- continue;
57
- }
58
- if (isNestedSelector(property)) {
59
- // This is only allowed in simple pseudos currently.
60
- const copies = property.split(',').map((p)=>p.trim());
61
- for (const copy of copies){
62
- result.push(...process({
63
- styles: value,
64
- pseudo: pseudo + normalizeNestedProperty(copy),
65
- media,
66
- support,
67
- container,
68
- selector
69
- }));
70
- }
71
- continue;
72
- }
73
- console.warn("Unknown property", property);
74
- continue;
75
- }
76
- let newProperty = normalizeCSSVarsProperty(property);
77
- let newValue = value;
78
- if (typeof value === "string") {
79
- newValue = value.trim().replace(/;[\n\s]*$/, "");
80
- newValue = normalizeCSSVarsValue(newValue);
81
- }
82
- if (typeof value === "number") {
83
- newValue = pixelifyProperties(newProperty, value);
84
- }
85
- if (transformValuePropertyMap[newProperty]) {
86
- newValue = transformValuePropertyMap[newProperty](value);
87
- }
88
- newProperty = hyphenateProperty(newProperty);
89
- // Remove trailing semicolon and new lines with regex
90
- result.push(cache.getOrStore({
91
- type,
92
- selector,
93
- property: newProperty,
94
- value: newValue,
95
- pseudo,
96
- media,
97
- support,
98
- container
99
- }));
100
- }
101
- return result;
102
- };
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { isObject } from "./helpers/isObject.mjs";
5
+ import { hyphenateProperty } from "./helpers/hyphenateProperty.mjs";
6
+ import { transformContentProperty } from "./helpers/transformContentProperty.mjs";
7
+ import { generateCombinedAtRules } from "./helpers/generateCombinedAtRules.mjs";
8
+ import { isContainerQuery } from "./helpers/isContainerQuery.mjs";
9
+ import { isMediaQuery } from "./helpers/isMediaQuery.mjs";
10
+ import { isNestedSelector } from "./helpers/isNestedSelector.mjs";
11
+ import { isSupportsQuery } from "./helpers/isSupportsQuery.mjs";
12
+ import { normalizeCSSVarsProperty } from "./helpers/normalizeCSSVarsProperty.mjs";
13
+ import { normalizeCSSVarsValue } from "./helpers/normalizeCSSVarsValue.mjs";
14
+ import { normalizeNestedProperty } from "./helpers/normalizeNestedProperty.mjs";
15
+ import { pixelifyProperties } from "./helpers/pixelifyProperties.mjs";
16
+ import { splitSelectorList } from "./helpers/splitSelectorList.mjs";
17
+ //#region src/processStyles.ts
18
+ const transformValuePropertyMap = { content: transformContentProperty };
19
+ function processStyles({ cache, type }) {
20
+ return function process({ styles, pseudo = "", media = "", support = "", container = "", selector = "" }) {
21
+ const result = [];
22
+ for (const [property, value] of Object.entries(styles)) {
23
+ if (isObject(value)) {
24
+ if (isMediaQuery(property)) {
25
+ const combinedMedia = generateCombinedAtRules(media, property.slice(6).trim());
26
+ result.push(...process({
27
+ styles: value,
28
+ pseudo,
29
+ media: combinedMedia,
30
+ support,
31
+ container,
32
+ selector
33
+ }));
34
+ continue;
35
+ }
36
+ if (isSupportsQuery(property)) {
37
+ const combinedSupport = generateCombinedAtRules(support, property.slice(9).trim());
38
+ result.push(...process({
39
+ styles: value,
40
+ pseudo,
41
+ media,
42
+ support: combinedSupport,
43
+ container,
44
+ selector
45
+ }));
46
+ continue;
47
+ }
48
+ if (isContainerQuery(property)) {
49
+ const combinedContainer = generateCombinedAtRules(container, property.slice(10).trim());
50
+ result.push(...process({
51
+ styles: value,
52
+ pseudo,
53
+ media,
54
+ support,
55
+ container: combinedContainer,
56
+ selector
57
+ }));
58
+ continue;
59
+ }
60
+ if (isNestedSelector(property)) {
61
+ const copies = splitSelectorList(property);
62
+ const hasLeadingDescendant = /^\s/.test(property);
63
+ for (let i = 0; i < copies.length; i++) {
64
+ const copy = i === 0 && hasLeadingDescendant ? ` ${copies[i]}` : copies[i];
65
+ result.push(...process({
66
+ styles: value,
67
+ pseudo: pseudo + normalizeNestedProperty(copy),
68
+ media,
69
+ support,
70
+ container,
71
+ selector
72
+ }));
73
+ }
74
+ continue;
75
+ }
76
+ console.warn("Unknown property", property);
77
+ continue;
78
+ }
79
+ let newProperty = normalizeCSSVarsProperty(property);
80
+ let newValue = value;
81
+ if (typeof value === "string") {
82
+ newValue = value.trim().replace(/;[\n\s]*$/, "");
83
+ newValue = normalizeCSSVarsValue(newValue);
84
+ }
85
+ if (typeof value === "number") newValue = pixelifyProperties(newProperty, value);
86
+ if (transformValuePropertyMap[newProperty]) newValue = transformValuePropertyMap[newProperty](value);
87
+ newProperty = hyphenateProperty(newProperty);
88
+ result.push(cache.getOrStore({
89
+ type,
90
+ selector,
91
+ property: newProperty,
92
+ value: newValue,
93
+ pseudo,
94
+ media,
95
+ support,
96
+ container
97
+ }));
98
+ }
99
+ return result;
100
+ };
103
101
  }
104
-
102
+ //#endregion
105
103
  export { processStyles };
package/types.cjs CHANGED
@@ -1,2 +0,0 @@
1
- 'use strict';
2
-
package/types.mjs CHANGED
@@ -1 +1,4 @@
1
-
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ export {};
@@ -1,6 +1,5 @@
1
- 'use strict';
2
-
3
- class ClassList extends String {
4
- }
5
-
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/wrappers/classList.ts
3
+ var ClassList = class extends String {};
4
+ //#endregion
6
5
  exports.ClassList = ClassList;
@@ -1,4 +1,7 @@
1
- class ClassList extends String {
2
- }
3
-
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ //#region src/wrappers/classList.ts
5
+ var ClassList = class extends String {};
6
+ //#endregion
4
7
  export { ClassList };
@@ -1,6 +1,5 @@
1
- 'use strict';
2
-
3
- class Static {
4
- }
5
-
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/wrappers/static.ts
3
+ var Static = class {};
4
+ //#endregion
6
5
  exports.Static = Static;
@@ -1,4 +1,7 @@
1
- class Static {
2
- }
3
-
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ //#region src/wrappers/static.ts
5
+ var Static = class {};
6
+ //#endregion
4
7
  export { Static };
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- function sortStatic(blocks) {
4
- return blocks.sort((a, b)=>a.id - b.id);
5
- }
6
-
7
- exports.sortStatic = sortStatic;
@@ -1,5 +0,0 @@
1
- function sortStatic(blocks) {
2
- return blocks.sort((a, b)=>a.id - b.id);
3
- }
4
-
5
- export { sortStatic };