@navita/engine 0.1.1 → 0.1.3
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/helpers/splitStyleBlocks.cjs +1 -1
- package/helpers/splitStyleBlocks.mjs +1 -1
- package/identifiers/propertyValueIDGenerator.cjs +2 -2
- package/identifiers/propertyValueIDGenerator.mjs +2 -2
- package/package.json +1 -1
- package/printers/sortAtRules.cjs +1 -1
- package/printers/sortAtRules.mjs +1 -1
|
@@ -5,8 +5,8 @@ var identifiers_alphaIDGenerator = require('./alphaIDGenerator.cjs');
|
|
|
5
5
|
class PropertyValueIDGenerator {
|
|
6
6
|
property = new identifiers_alphaIDGenerator.AlphaIDGenerator();
|
|
7
7
|
cache = {};
|
|
8
|
-
next({ property , media ='' , support ='' , pseudo ='' , value }) {
|
|
9
|
-
const propertyKey =
|
|
8
|
+
next({ property , media ='' , support ='' , container ='' , pseudo ='' , value }) {
|
|
9
|
+
const propertyKey = `m${media}s${support}c${container}ps${pseudo}p${property}`;
|
|
10
10
|
if (this.cache[propertyKey] === undefined) {
|
|
11
11
|
this.cache[propertyKey] = {
|
|
12
12
|
key: this.property.next(),
|
|
@@ -3,8 +3,8 @@ import { AlphaIDGenerator } from './alphaIDGenerator.mjs';
|
|
|
3
3
|
class PropertyValueIDGenerator {
|
|
4
4
|
property = new AlphaIDGenerator();
|
|
5
5
|
cache = {};
|
|
6
|
-
next({ property , media ='' , support ='' , pseudo ='' , value }) {
|
|
7
|
-
const propertyKey =
|
|
6
|
+
next({ property , media ='' , support ='' , container ='' , pseudo ='' , value }) {
|
|
7
|
+
const propertyKey = `m${media}s${support}c${container}ps${pseudo}p${property}`;
|
|
8
8
|
if (this.cache[propertyKey] === undefined) {
|
|
9
9
|
this.cache[propertyKey] = {
|
|
10
10
|
key: this.property.next(),
|
package/package.json
CHANGED
package/printers/sortAtRules.cjs
CHANGED
|
@@ -4,7 +4,7 @@ var createSort = require('sort-css-media-queries/lib/create-sort.js');
|
|
|
4
4
|
|
|
5
5
|
const sortCSSMediaQueries = createSort();
|
|
6
6
|
function sortAtRules(blocks) {
|
|
7
|
-
return blocks.sort((a, b)=>sortCSSMediaQueries(a.media, b.media) || a.support.localeCompare(b.support));
|
|
7
|
+
return blocks.sort((a, b)=>sortCSSMediaQueries(a.media, b.media) || sortCSSMediaQueries(a.container, b.container) || a.support.localeCompare(b.support));
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
exports.sortAtRules = sortAtRules;
|
package/printers/sortAtRules.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import createSort from 'sort-css-media-queries/lib/create-sort.js';
|
|
|
2
2
|
|
|
3
3
|
const sortCSSMediaQueries = createSort();
|
|
4
4
|
function sortAtRules(blocks) {
|
|
5
|
-
return blocks.sort((a, b)=>sortCSSMediaQueries(a.media, b.media) || a.support.localeCompare(b.support));
|
|
5
|
+
return blocks.sort((a, b)=>sortCSSMediaQueries(a.media, b.media) || sortCSSMediaQueries(a.container, b.container) || a.support.localeCompare(b.support));
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export { sortAtRules };
|