@posthog/rrdom 0.0.30 → 0.0.34
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/dist/rrdom.cjs +76 -76
- package/dist/rrdom.cjs.map +1 -1
- package/dist/rrdom.js +76 -76
- package/dist/rrdom.js.map +1 -1
- package/dist/rrdom.umd.cjs +76 -76
- package/dist/rrdom.umd.cjs.map +4 -4
- package/dist/rrdom.umd.min.cjs.map +4 -4
- package/package.json +1 -1
package/dist/rrdom.umd.cjs
CHANGED
|
@@ -113,27 +113,27 @@ function getDefaultExportFromCjs(x) {
|
|
|
113
113
|
}
|
|
114
114
|
function getAugmentedNamespace(n) {
|
|
115
115
|
if (n.__esModule) return n;
|
|
116
|
-
var
|
|
117
|
-
if (typeof
|
|
118
|
-
var
|
|
119
|
-
if (this instanceof
|
|
120
|
-
return Reflect.construct(
|
|
116
|
+
var f2 = n.default;
|
|
117
|
+
if (typeof f2 == "function") {
|
|
118
|
+
var a2 = function a3() {
|
|
119
|
+
if (this instanceof a3) {
|
|
120
|
+
return Reflect.construct(f2, arguments, this.constructor);
|
|
121
121
|
}
|
|
122
|
-
return
|
|
122
|
+
return f2.apply(this, arguments);
|
|
123
123
|
};
|
|
124
|
-
|
|
125
|
-
} else
|
|
126
|
-
Object.defineProperty(
|
|
124
|
+
a2.prototype = f2.prototype;
|
|
125
|
+
} else a2 = {};
|
|
126
|
+
Object.defineProperty(a2, "__esModule", { value: true });
|
|
127
127
|
Object.keys(n).forEach(function(k) {
|
|
128
|
-
var
|
|
129
|
-
Object.defineProperty(
|
|
128
|
+
var d2 = Object.getOwnPropertyDescriptor(n, k);
|
|
129
|
+
Object.defineProperty(a2, k, d2.get ? d2 : {
|
|
130
130
|
enumerable: true,
|
|
131
131
|
get: function() {
|
|
132
132
|
return n[k];
|
|
133
133
|
}
|
|
134
134
|
});
|
|
135
135
|
});
|
|
136
|
-
return
|
|
136
|
+
return a2;
|
|
137
137
|
}
|
|
138
138
|
var picocolors_browser = { exports: {} };
|
|
139
139
|
var hasRequiredPicocolors_browser;
|
|
@@ -218,8 +218,8 @@ function requireCssSyntaxError() {
|
|
|
218
218
|
let start = Math.max(this.line - 3, 0);
|
|
219
219
|
let end = Math.min(this.line + 2, lines.length);
|
|
220
220
|
let maxWidth = String(end).length;
|
|
221
|
-
return lines.slice(start, end).map((line,
|
|
222
|
-
let number = start + 1 +
|
|
221
|
+
return lines.slice(start, end).map((line, index) => {
|
|
222
|
+
let number = start + 1 + index;
|
|
223
223
|
let gutter = " " + (" " + number).slice(-maxWidth) + " | ";
|
|
224
224
|
if (number === this.line) {
|
|
225
225
|
if (line.length > 160) {
|
|
@@ -502,8 +502,8 @@ function requireStringifier() {
|
|
|
502
502
|
if (root2.raws.indent) return root2.raws.indent;
|
|
503
503
|
let value;
|
|
504
504
|
root2.walk((i) => {
|
|
505
|
-
let
|
|
506
|
-
if (
|
|
505
|
+
let p2 = i.parent;
|
|
506
|
+
if (p2 && p2 !== root2 && p2.parent && p2.parent === root2) {
|
|
507
507
|
if (typeof i.raws.before !== "undefined") {
|
|
508
508
|
let parts = i.raws.before.split("\n");
|
|
509
509
|
value = parts[parts.length - 1];
|
|
@@ -601,7 +601,7 @@ function requireNode() {
|
|
|
601
601
|
} else if (i === "source") {
|
|
602
602
|
cloned[i] = value;
|
|
603
603
|
} else if (Array.isArray(value)) {
|
|
604
|
-
cloned[i] = value.map((
|
|
604
|
+
cloned[i] = value.map((j2) => cloneNode(j2, cloned));
|
|
605
605
|
} else {
|
|
606
606
|
if (type === "object" && value !== null) value = cloneNode(value);
|
|
607
607
|
cloned[i] = value;
|
|
@@ -653,10 +653,10 @@ function requireNode() {
|
|
|
653
653
|
addToError(error) {
|
|
654
654
|
error.postcssNode = this;
|
|
655
655
|
if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) {
|
|
656
|
-
let
|
|
656
|
+
let s2 = this.source;
|
|
657
657
|
error.stack = error.stack.replace(
|
|
658
658
|
/\n\s{4}at /,
|
|
659
|
-
`$&${
|
|
659
|
+
`$&${s2.input.from}:${s2.start.line}:${s2.start.column}$&`
|
|
660
660
|
);
|
|
661
661
|
}
|
|
662
662
|
return error;
|
|
@@ -746,8 +746,8 @@ function requireNode() {
|
|
|
746
746
|
}
|
|
747
747
|
next() {
|
|
748
748
|
if (!this.parent) return void 0;
|
|
749
|
-
let
|
|
750
|
-
return this.parent.nodes[
|
|
749
|
+
let index = this.parent.index(this);
|
|
750
|
+
return this.parent.nodes[index + 1];
|
|
751
751
|
}
|
|
752
752
|
positionBy(opts) {
|
|
753
753
|
let pos = this.source.start;
|
|
@@ -759,17 +759,17 @@ function requireNode() {
|
|
|
759
759
|
sourceOffset(inputString, this.source.start),
|
|
760
760
|
sourceOffset(inputString, this.source.end)
|
|
761
761
|
);
|
|
762
|
-
let
|
|
763
|
-
if (
|
|
762
|
+
let index = stringRepresentation.indexOf(opts.word);
|
|
763
|
+
if (index !== -1) pos = this.positionInside(index);
|
|
764
764
|
}
|
|
765
765
|
return pos;
|
|
766
766
|
}
|
|
767
|
-
positionInside(
|
|
767
|
+
positionInside(index) {
|
|
768
768
|
let column = this.source.start.column;
|
|
769
769
|
let line = this.source.start.line;
|
|
770
770
|
let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
|
|
771
771
|
let offset = sourceOffset(inputString, this.source.start);
|
|
772
|
-
let end = offset +
|
|
772
|
+
let end = offset + index;
|
|
773
773
|
for (let i = offset; i < end; i++) {
|
|
774
774
|
if (inputString[i] === "\n") {
|
|
775
775
|
column = 1;
|
|
@@ -782,8 +782,8 @@ function requireNode() {
|
|
|
782
782
|
}
|
|
783
783
|
prev() {
|
|
784
784
|
if (!this.parent) return void 0;
|
|
785
|
-
let
|
|
786
|
-
return this.parent.nodes[
|
|
785
|
+
let index = this.parent.index(this);
|
|
786
|
+
return this.parent.nodes[index - 1];
|
|
787
787
|
}
|
|
788
788
|
rangeBy(opts) {
|
|
789
789
|
let start = {
|
|
@@ -803,11 +803,11 @@ function requireNode() {
|
|
|
803
803
|
sourceOffset(inputString, this.source.start),
|
|
804
804
|
sourceOffset(inputString, this.source.end)
|
|
805
805
|
);
|
|
806
|
-
let
|
|
807
|
-
if (
|
|
808
|
-
start = this.positionInside(
|
|
806
|
+
let index = stringRepresentation.indexOf(opts.word);
|
|
807
|
+
if (index !== -1) {
|
|
808
|
+
start = this.positionInside(index);
|
|
809
809
|
end = this.positionInside(
|
|
810
|
-
|
|
810
|
+
index + opts.word.length
|
|
811
811
|
);
|
|
812
812
|
}
|
|
813
813
|
} else {
|
|
@@ -1023,10 +1023,10 @@ function requireContainer() {
|
|
|
1023
1023
|
each(callback) {
|
|
1024
1024
|
if (!this.proxyOf.nodes) return void 0;
|
|
1025
1025
|
let iterator = this.getIterator();
|
|
1026
|
-
let
|
|
1026
|
+
let index, result2;
|
|
1027
1027
|
while (this.indexes[iterator] < this.proxyOf.nodes.length) {
|
|
1028
|
-
|
|
1029
|
-
result2 = callback(this.proxyOf.nodes[
|
|
1028
|
+
index = this.indexes[iterator];
|
|
1029
|
+
result2 = callback(this.proxyOf.nodes[index], index);
|
|
1030
1030
|
if (result2 === false) break;
|
|
1031
1031
|
this.indexes[iterator] += 1;
|
|
1032
1032
|
}
|
|
@@ -1056,7 +1056,7 @@ function requireContainer() {
|
|
|
1056
1056
|
return node2[prop](
|
|
1057
1057
|
...args.map((i) => {
|
|
1058
1058
|
if (typeof i === "function") {
|
|
1059
|
-
return (child,
|
|
1059
|
+
return (child, index) => i(child.toProxy(), index);
|
|
1060
1060
|
} else {
|
|
1061
1061
|
return i;
|
|
1062
1062
|
}
|
|
@@ -1099,11 +1099,11 @@ function requireContainer() {
|
|
|
1099
1099
|
let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse();
|
|
1100
1100
|
existIndex = this.index(exist);
|
|
1101
1101
|
for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node2);
|
|
1102
|
-
let
|
|
1102
|
+
let index;
|
|
1103
1103
|
for (let id in this.indexes) {
|
|
1104
|
-
|
|
1105
|
-
if (existIndex <
|
|
1106
|
-
this.indexes[id] =
|
|
1104
|
+
index = this.indexes[id];
|
|
1105
|
+
if (existIndex < index) {
|
|
1106
|
+
this.indexes[id] = index + nodes.length;
|
|
1107
1107
|
}
|
|
1108
1108
|
}
|
|
1109
1109
|
this.markDirty();
|
|
@@ -1119,11 +1119,11 @@ function requireContainer() {
|
|
|
1119
1119
|
).reverse();
|
|
1120
1120
|
existIndex = this.index(exist);
|
|
1121
1121
|
for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex, 0, node2);
|
|
1122
|
-
let
|
|
1122
|
+
let index;
|
|
1123
1123
|
for (let id in this.indexes) {
|
|
1124
|
-
|
|
1125
|
-
if (existIndex <=
|
|
1126
|
-
this.indexes[id] =
|
|
1124
|
+
index = this.indexes[id];
|
|
1125
|
+
if (existIndex <= index) {
|
|
1126
|
+
this.indexes[id] = index + nodes.length;
|
|
1127
1127
|
}
|
|
1128
1128
|
}
|
|
1129
1129
|
this.markDirty();
|
|
@@ -1205,11 +1205,11 @@ function requireContainer() {
|
|
|
1205
1205
|
child = this.index(child);
|
|
1206
1206
|
this.proxyOf.nodes[child].parent = void 0;
|
|
1207
1207
|
this.proxyOf.nodes.splice(child, 1);
|
|
1208
|
-
let
|
|
1208
|
+
let index;
|
|
1209
1209
|
for (let id in this.indexes) {
|
|
1210
|
-
|
|
1211
|
-
if (
|
|
1212
|
-
this.indexes[id] =
|
|
1210
|
+
index = this.indexes[id];
|
|
1211
|
+
if (index >= child) {
|
|
1212
|
+
this.indexes[id] = index - 1;
|
|
1213
1213
|
}
|
|
1214
1214
|
}
|
|
1215
1215
|
this.markDirty();
|
|
@@ -1236,8 +1236,8 @@ function requireContainer() {
|
|
|
1236
1236
|
let result2;
|
|
1237
1237
|
try {
|
|
1238
1238
|
result2 = callback(child, i);
|
|
1239
|
-
} catch (
|
|
1240
|
-
throw child.addToError(
|
|
1239
|
+
} catch (e2) {
|
|
1240
|
+
throw child.addToError(e2);
|
|
1241
1241
|
}
|
|
1242
1242
|
if (result2 !== false && child.walk) {
|
|
1243
1243
|
result2 = child.walk(callback);
|
|
@@ -1673,7 +1673,7 @@ function requireInput() {
|
|
|
1673
1673
|
let lines = this.css.split("\n");
|
|
1674
1674
|
lineToIndex = new Array(lines.length);
|
|
1675
1675
|
let prevIndex = 0;
|
|
1676
|
-
for (let i = 0,
|
|
1676
|
+
for (let i = 0, l2 = lines.length; i < l2; i++) {
|
|
1677
1677
|
lineToIndex[i] = prevIndex;
|
|
1678
1678
|
prevIndex += lines[i].length + 1;
|
|
1679
1679
|
}
|
|
@@ -1804,9 +1804,9 @@ function requireRoot() {
|
|
|
1804
1804
|
return nodes;
|
|
1805
1805
|
}
|
|
1806
1806
|
removeChild(child, ignore) {
|
|
1807
|
-
let
|
|
1808
|
-
if (!ignore &&
|
|
1809
|
-
this.nodes[1].raws.before = this.nodes[
|
|
1807
|
+
let index = this.index(child);
|
|
1808
|
+
if (!ignore && index === 0 && this.nodes.length > 1) {
|
|
1809
|
+
this.nodes[1].raws.before = this.nodes[index].raws.before;
|
|
1810
1810
|
}
|
|
1811
1811
|
return super.removeChild(child);
|
|
1812
1812
|
}
|
|
@@ -2116,9 +2116,9 @@ function requireMapGenerator() {
|
|
|
2116
2116
|
column += str.length;
|
|
2117
2117
|
}
|
|
2118
2118
|
if (node2 && type !== "start") {
|
|
2119
|
-
let
|
|
2119
|
+
let p2 = node2.parent || { raws: {} };
|
|
2120
2120
|
let childless = node2.type === "decl" || node2.type === "atrule" && !node2.nodes;
|
|
2121
|
-
if (!childless || node2 !==
|
|
2121
|
+
if (!childless || node2 !== p2.last || p2.raws.semicolon) {
|
|
2122
2122
|
if (node2.source && node2.source.end) {
|
|
2123
2123
|
mapping.source = this.sourcePath(node2);
|
|
2124
2124
|
mapping.original.line = node2.source.end.line;
|
|
@@ -2611,8 +2611,8 @@ function requireParser() {
|
|
|
2611
2611
|
if (colon === false) return;
|
|
2612
2612
|
let founded = 0;
|
|
2613
2613
|
let token;
|
|
2614
|
-
for (let
|
|
2615
|
-
token = tokens[
|
|
2614
|
+
for (let j2 = colon - 1; j2 >= 0; j2--) {
|
|
2615
|
+
token = tokens[j2];
|
|
2616
2616
|
if (token[0] !== "space") {
|
|
2617
2617
|
founded += 1;
|
|
2618
2618
|
if (founded === 2) break;
|
|
@@ -2730,8 +2730,8 @@ function requireParser() {
|
|
|
2730
2730
|
} else if (token[1].toLowerCase() === "important") {
|
|
2731
2731
|
let cache = tokens.slice(0);
|
|
2732
2732
|
let str = "";
|
|
2733
|
-
for (let
|
|
2734
|
-
let type = cache[
|
|
2733
|
+
for (let j2 = i; j2 > 0; j2--) {
|
|
2734
|
+
let type = cache[j2][0];
|
|
2735
2735
|
if (str.trim().startsWith("!") && type !== "space") {
|
|
2736
2736
|
break;
|
|
2737
2737
|
}
|
|
@@ -3041,19 +3041,19 @@ function requireParse() {
|
|
|
3041
3041
|
let parser2 = new Parser(input2);
|
|
3042
3042
|
try {
|
|
3043
3043
|
parser2.parse();
|
|
3044
|
-
} catch (
|
|
3044
|
+
} catch (e2) {
|
|
3045
3045
|
if (true) {
|
|
3046
|
-
if (
|
|
3046
|
+
if (e2.name === "CssSyntaxError" && opts && opts.from) {
|
|
3047
3047
|
if (/\.scss$/i.test(opts.from)) {
|
|
3048
|
-
|
|
3048
|
+
e2.message += "\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser";
|
|
3049
3049
|
} else if (/\.sass/i.test(opts.from)) {
|
|
3050
|
-
|
|
3050
|
+
e2.message += "\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser";
|
|
3051
3051
|
} else if (/\.less$/i.test(opts.from)) {
|
|
3052
|
-
|
|
3052
|
+
e2.message += "\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser";
|
|
3053
3053
|
}
|
|
3054
3054
|
}
|
|
3055
3055
|
}
|
|
3056
|
-
throw
|
|
3056
|
+
throw e2;
|
|
3057
3057
|
}
|
|
3058
3058
|
return parser2.root;
|
|
3059
3059
|
}
|
|
@@ -3318,9 +3318,9 @@ function requireLazyResult() {
|
|
|
3318
3318
|
let pluginName = plugin.postcssPlugin;
|
|
3319
3319
|
let pluginVer = plugin.postcssVersion;
|
|
3320
3320
|
let runtimeVer = this.result.processor.version;
|
|
3321
|
-
let
|
|
3322
|
-
let
|
|
3323
|
-
if (
|
|
3321
|
+
let a2 = pluginVer.split(".");
|
|
3322
|
+
let b2 = runtimeVer.split(".");
|
|
3323
|
+
if (a2[0] !== b2[0] || parseInt(a2[1]) > parseInt(b2[1])) {
|
|
3324
3324
|
console.error(
|
|
3325
3325
|
"Unknown error from PostCSS plugin. Your current PostCSS version is " + runtimeVer + ", but " + pluginName + " uses " + pluginVer + ". Perhaps this is the source of the error below."
|
|
3326
3326
|
);
|
|
@@ -3392,9 +3392,9 @@ function requireLazyResult() {
|
|
|
3392
3392
|
if (isPromise(promise)) {
|
|
3393
3393
|
try {
|
|
3394
3394
|
await promise;
|
|
3395
|
-
} catch (
|
|
3395
|
+
} catch (e2) {
|
|
3396
3396
|
let node2 = stack[stack.length - 1].node;
|
|
3397
|
-
throw this.handleError(
|
|
3397
|
+
throw this.handleError(e2, node2);
|
|
3398
3398
|
}
|
|
3399
3399
|
}
|
|
3400
3400
|
}
|
|
@@ -3411,8 +3411,8 @@ function requireLazyResult() {
|
|
|
3411
3411
|
} else {
|
|
3412
3412
|
await visitor(root2, this.helpers);
|
|
3413
3413
|
}
|
|
3414
|
-
} catch (
|
|
3415
|
-
throw this.handleError(
|
|
3414
|
+
} catch (e2) {
|
|
3415
|
+
throw this.handleError(e2);
|
|
3416
3416
|
}
|
|
3417
3417
|
}
|
|
3418
3418
|
}
|
|
@@ -3508,8 +3508,8 @@ function requireLazyResult() {
|
|
|
3508
3508
|
let promise;
|
|
3509
3509
|
try {
|
|
3510
3510
|
promise = visitor(node2, this.helpers);
|
|
3511
|
-
} catch (
|
|
3512
|
-
throw this.handleError(
|
|
3511
|
+
} catch (e2) {
|
|
3512
|
+
throw this.handleError(e2, node2.proxyOf);
|
|
3513
3513
|
}
|
|
3514
3514
|
if (node2.type !== "root" && node2.type !== "document" && !node2.parent) {
|
|
3515
3515
|
return true;
|
|
@@ -3536,8 +3536,8 @@ function requireLazyResult() {
|
|
|
3536
3536
|
this.result.lastPlugin = plugin;
|
|
3537
3537
|
try {
|
|
3538
3538
|
return visitor(node2.toProxy(), this.helpers);
|
|
3539
|
-
} catch (
|
|
3540
|
-
throw this.handleError(
|
|
3539
|
+
} catch (e2) {
|
|
3540
|
+
throw this.handleError(e2, node2);
|
|
3541
3541
|
}
|
|
3542
3542
|
}
|
|
3543
3543
|
if (visit2.iterator !== 0) {
|