@mgdis/core-ui-helpers 1.0.2 → 1.0.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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Client Platform v4.28.2 | MIT Licensed | https://stenciljs.com
2
+ Stencil Client Platform v4.36.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var __defProp = Object.defineProperty;
5
5
  var __export = (target, all) => {
@@ -7,6 +7,11 @@ var __export = (target, all) => {
7
7
  __defProp(target, name, { get: all[name], enumerable: true });
8
8
  };
9
9
 
10
+ // src/utils/regular-expression.ts
11
+ var escapeRegExpSpecialCharacters = (text) => {
12
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
13
+ };
14
+
10
15
  // src/utils/result.ts
11
16
  var result_exports = {};
12
17
  __export(result_exports, {
@@ -55,6 +60,18 @@ var unwrapErr = (result) => {
55
60
  throw result.value;
56
61
  }
57
62
  };
63
+ var createSupportsRuleRe = (selector) => {
64
+ const safeSelector2 = escapeRegExpSpecialCharacters(selector);
65
+ return new RegExp(
66
+ // First capture group: match any context before the selector that's not inside @supports selector()
67
+ // Using negative lookahead to avoid matching inside @supports selector(...) condition
68
+ `(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
69
+ "g"
70
+ );
71
+ };
72
+ createSupportsRuleRe("::slotted");
73
+ createSupportsRuleRe(":host");
74
+ createSupportsRuleRe(":host-context");
58
75
 
59
76
  /**
60
77
  * Retrieve Component Storybook URL from file path