myoperator-ui 0.0.65 → 0.0.67

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 (2) hide show
  1. package/dist/index.js +2 -3
  2. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -114,7 +114,7 @@ function prefixClassString(classString, prefix) {
114
114
  return classString.split(" ").map((cls) => {
115
115
  if (!cls) return cls;
116
116
  if ((cls.startsWith("aria-") || cls.startsWith("data-")) && !cls.includes("[") && !cls.includes(":")) return cls;
117
- const variantMatch = cls.match(/^([a-z][a-z0-9]*(-[a-z0-9]+)*:)+/);
117
+ const variantMatch = cls.match(/^(([a-z][a-z0-9]*(-[a-z0-9]+)*:)|((data|aria)-\[[^\]]+\]:))+/);
118
118
  if (variantMatch) {
119
119
  const variants = variantMatch[0];
120
120
  const utility = cls.slice(variants.length);
@@ -163,7 +163,6 @@ function prefixTailwindClasses(content, prefix) {
163
163
  else if (content[i] === ")") depth--;
164
164
  i++;
165
165
  }
166
- const fullMatch = content.slice(cnMatch.index, i);
167
166
  const args = content.slice(cnMatch.index + cnMatch[0].length, i - 1);
168
167
  const prefixedArgs = args.replace(
169
168
  /"([^"]*)"/g,
@@ -187,7 +186,7 @@ function prefixTailwindClasses(content, prefix) {
187
186
  }
188
187
  );
189
188
  content = content.replace(
190
- /(\w+|"[^"]+"):\s*"([^"]+)"/g,
189
+ /(\w+|"[^"]+"):\s*"([^"\n]+)"/g,
191
190
  (match, key, value) => {
192
191
  const cleanKey = key.replace(/"/g, "");
193
192
  const nonClassKeys = ["name", "description", "displayName", "type", "role", "id", "htmlFor", "for", "placeholder", "title", "alt", "src", "href", "target", "rel", "method", "action", "enctype", "accept", "pattern", "autocomplete", "value", "defaultValue", "label", "text", "message", "helperText", "ariaLabel", "ariaDescribedBy"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-ui",
3
- "version": "0.0.65",
3
+ "version": "0.0.67",
4
4
  "description": "CLI for adding myOperator UI components to your project",
5
5
  "type": "module",
6
6
  "exports": "./dist/index.js",
@@ -13,10 +13,11 @@
13
13
  "scripts": {
14
14
  "generate-registry": "node scripts/generate-registry.js",
15
15
  "validate-registry": "node scripts/validate-registry.js",
16
+ "validate:prefix": "node scripts/validate-prefix-output.js",
16
17
  "verify-build": "node scripts/verify-build.js",
17
18
  "integrity:snapshot": "node scripts/check-integrity.js snapshot",
18
19
  "integrity:verify": "node scripts/check-integrity.js verify",
19
- "build": "npm run generate-registry && tsup src/index.ts --format esm --dts && npm run verify-build",
20
+ "build": "npm run generate-registry && npm run validate:prefix && tsup src/index.ts --format esm --dts && npm run verify-build",
20
21
  "build:safe": "npm run integrity:snapshot && npm run build",
21
22
  "dev": "tsup src/index.ts --format esm --watch",
22
23
  "typecheck": "tsc --noEmit",