@delopay/sdk 0.361.0 → 0.362.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.
@@ -12344,6 +12344,7 @@ function enigmaCustomCssProblem(css) {
12344
12344
  if (/[^\x20-\x7e\n\r\t]/.test(css)) return "not_ascii";
12345
12345
  if (css.includes("<")) return "markup";
12346
12346
  if (css.includes("\\")) return "escape";
12347
+ if (/["']/.test(css)) return "quote";
12347
12348
  const lower = css.toLowerCase();
12348
12349
  if (lower.includes("/*")) return "comment";
12349
12350
  if (["url(", "image-set(", "image(", "element(", "cross-fade(", "src(", "data:"].some(
@@ -12359,9 +12360,19 @@ function enigmaCustomCssProblem(css) {
12359
12360
  if (/@(?!media)/.test(lower)) return "at_rule";
12360
12361
  const compact = lower.split(/\s+/).filter(Boolean).join(" ");
12361
12362
  const blocks = [];
12363
+ const brackets = [];
12362
12364
  let text = "";
12363
12365
  for (const ch of compact) {
12364
- if (ch === "{") {
12366
+ if ((ch === "{" || ch === "}" || ch === ";") && brackets.length > 0) return "misplaced";
12367
+ if (ch === "(" || ch === "[") {
12368
+ brackets.push(ch);
12369
+ text += ch;
12370
+ } else if (ch === ")" || ch === "]") {
12371
+ if (brackets.pop() !== (ch === ")" ? "(" : "[")) return "unbalanced";
12372
+ text += ch;
12373
+ } else if (ch === "{") {
12374
+ const outer = blocks[blocks.length - 1];
12375
+ if (outer && !outer.media) return "misplaced";
12365
12376
  const prelude = text.trim();
12366
12377
  text = "";
12367
12378
  const media = prelude.startsWith("@media");
@@ -12376,9 +12387,11 @@ function enigmaCustomCssProblem(css) {
12376
12387
  const top = blocks[blocks.length - 1];
12377
12388
  if (!top) {
12378
12389
  if (ch === "}") return "unbalanced";
12390
+ if (declaration.trim()) return "misplaced";
12379
12391
  continue;
12380
12392
  }
12381
- if (!top.media && declaration.trim()) {
12393
+ if (declaration.trim()) {
12394
+ if (top.media) return "misplaced";
12382
12395
  const problem = declarationProblem(top.selector.replace(/, /g, ","), declaration);
12383
12396
  if (problem) return problem;
12384
12397
  }
@@ -12387,7 +12400,8 @@ function enigmaCustomCssProblem(css) {
12387
12400
  text += ch;
12388
12401
  }
12389
12402
  }
12390
- return blocks.length > 0 ? "unbalanced" : null;
12403
+ if (blocks.length > 0 || brackets.length > 0) return "unbalanced";
12404
+ return text.trim() ? "misplaced" : null;
12391
12405
  }
12392
12406
  function enigmaCornerPx(corner) {
12393
12407
  return { square: 0, small: 6, medium: 8, large: 12, pill: 22 }[corner];
@@ -16971,4 +16985,4 @@ export {
16971
16985
  decodeNativePanes,
16972
16986
  encodeNativePanes
16973
16987
  };
16974
- //# sourceMappingURL=chunk-P2Q4GXEB.js.map
16988
+ //# sourceMappingURL=chunk-RI3ZRID4.js.map