myoperator-ui 0.0.206-beta.3 → 0.0.206-beta.4

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 +12 -9
  2. package/package.json +2 -1
package/dist/index.js CHANGED
@@ -179,7 +179,6 @@ function looksLikeTailwindClasses(str) {
179
179
  "checkbox",
180
180
  "radio",
181
181
  "file",
182
- "hidden",
183
182
  "image",
184
183
  "color",
185
184
  "date",
@@ -239,6 +238,11 @@ function looksLikeTailwindClasses(str) {
239
238
  "descending"
240
239
  ];
241
240
  if (nonClassValues.includes(str.toLowerCase())) return false;
241
+ if (/[A-Z][a-z]{2,}/.test(str) && !str.includes("[")) return false;
242
+ if (/[.!?]$/.test(str.trim())) return false;
243
+ const sentenceWords = ["for", "and", "the", "with", "over", "from", "into", "that", "this", "your", "our"];
244
+ const tokens = str.split(/s+/);
245
+ if (tokens.length >= 3 && tokens.some((w) => sentenceWords.includes(w.toLowerCase()))) return false;
242
246
  if (/^[A-Z][a-zA-Z]*$/.test(str)) return false;
243
247
  if (str.startsWith("@") || str.startsWith(".") || str.startsWith("/") || str.includes("::") && !str.includes("[&")) return false;
244
248
  const tailwindUtilityPrefixes = ["text", "bg", "p", "m", "px", "py", "mx", "my", "pt", "pb", "pl", "pr", "mt", "mb", "ml", "mr", "w", "h", "min", "max", "gap", "space", "border", "rounded", "shadow", "opacity", "font", "leading", "tracking", "z", "inset", "top", "bottom", "left", "right", "flex", "grid", "col", "row", "justify", "items", "content", "self", "place", "order", "float", "clear", "object", "overflow", "overscroll", "scroll", "list", "appearance", "cursor", "pointer", "resize", "select", "fill", "stroke", "table", "caption", "transition", "duration", "ease", "delay", "animate", "transform", "origin", "scale", "rotate", "translate", "skew", "accent", "caret", "outline", "ring", "blur", "brightness", "contrast", "grayscale", "hue", "invert", "saturate", "sepia", "backdrop", "divide", "sr", "not", "snap", "touch", "will", "aspect", "container", "columns", "break", "box", "isolation", "mix", "filter", "drop", "size", "shrink", "grow", "basis", "whitespace", "decoration", "indent"];
@@ -369,7 +373,7 @@ function prefixTailwindClasses(content, prefix) {
369
373
  return `className="${prefixed}"`;
370
374
  }
371
375
  );
372
- const nonClassKeys = ["name", "displayName", "type", "role", "id", "htmlFor", "for", "placeholder", "alt", "src", "href", "target", "rel", "method", "action", "enctype", "accept", "pattern", "autocomplete", "value", "defaultValue", "label", "text", "message", "helperText", "ariaLabel", "ariaDescribedBy"];
376
+ const nonClassKeys = ["name", "displayName", "type", "role", "id", "htmlFor", "for", "placeholder", "alt", "src", "href", "target", "rel", "method", "action", "enctype", "accept", "pattern", "autocomplete", "value", "defaultValue", "label", "text", "message", "helperText", "ariaLabel", "ariaDescribedBy", "description", "title", "content", "header", "footer", "caption", "summary", "tooltip", "errorMessage", "successMessage", "warningMessage", "infoMessage", "hint"];
373
377
  function hasObviousTailwindPatterns(value) {
374
378
  return /(?:^|\s)(hover|focus|active|disabled|group|peer|data-|aria-|sm:|md:|lg:|xl:|2xl:|dark:)/.test(value) || // Group/peer with selectors
375
379
  /group-\[|peer-\[/.test(value) || // Arbitrary selectors
@@ -12792,7 +12796,7 @@ export const CreateBotModal = React.forwardRef<
12792
12796
  <span className="text-sm font-semibold text-semantic-text-secondary tracking-[0.014px]">
12793
12797
  Select Bot Type
12794
12798
  </span>
12795
- <div className="flex flex-col gap-3 sm:flex-row">
12799
+ <div className="flex gap-3">
12796
12800
  {BOT_TYPE_OPTIONS.map(({ id, label, description }) => {
12797
12801
  const isSelected = selectedType === id;
12798
12802
  return (
@@ -12801,10 +12805,10 @@ export const CreateBotModal = React.forwardRef<
12801
12805
  type="button"
12802
12806
  onClick={() => setSelectedType(id)}
12803
12807
  className={cn(
12804
- "flex flex-row items-center gap-3 p-3 rounded-lg border text-left sm:flex-col sm:gap-2.5 sm:flex-1 sm:h-[134px] sm:justify-center",
12808
+ "flex flex-col items-start gap-2.5 p-3 rounded-lg border text-left flex-1 h-[134px] justify-center",
12805
12809
  "transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-focus",
12806
12810
  isSelected
12807
- ? "bg-semantic-info-surface border-semantic-border-focus shadow-sm"
12811
+ ? "bg-semantic-brand-surface border-semantic-brand shadow-sm"
12808
12812
  : "bg-semantic-bg-primary border-semantic-border-layout hover:bg-semantic-bg-hover"
12809
12813
  )}
12810
12814
  aria-pressed={isSelected}
@@ -12814,7 +12818,7 @@ export const CreateBotModal = React.forwardRef<
12814
12818
  "flex items-center justify-center size-[34px] rounded-lg",
12815
12819
  isSelected
12816
12820
  ? "bg-semantic-bg-primary"
12817
- : "bg-semantic-info-surface"
12821
+ : "bg-semantic-info-surface-subtle"
12818
12822
  )}
12819
12823
  >
12820
12824
  {id === "chatbot" ? (
@@ -12847,13 +12851,12 @@ export const CreateBotModal = React.forwardRef<
12847
12851
  </div>
12848
12852
 
12849
12853
  {/* Footer actions */}
12850
- <div className="flex flex-col-reverse gap-3 mt-2 sm:flex-row sm:justify-end sm:gap-4">
12851
- <Button variant="outline" className="w-full sm:w-auto" onClick={handleClose}>
12854
+ <div className="flex gap-4 justify-end mt-2">
12855
+ <Button variant="outline" onClick={handleClose}>
12852
12856
  Cancel
12853
12857
  </Button>
12854
12858
  <Button
12855
12859
  variant="default"
12856
- className="w-full sm:w-auto"
12857
12860
  onClick={handleSubmit}
12858
12861
  disabled={!name.trim()}
12859
12862
  >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-ui",
3
- "version": "0.0.206-beta.3",
3
+ "version": "0.0.206-beta.4",
4
4
  "description": "CLI for adding myOperator UI components to your project",
5
5
  "type": "module",
6
6
  "exports": "./dist/index.js",
@@ -30,6 +30,7 @@
30
30
  "typecheck": "tsc --noEmit",
31
31
  "test": "vitest run",
32
32
  "test:e2e": "vitest run src/__tests__/e2e.test.ts --testTimeout 180000",
33
+ "test:e2e:smoke": "E2E_SMOKE=1 vitest run src/__tests__/e2e.test.ts --testTimeout 60000",
33
34
  "test:watch": "vitest",
34
35
  "prepublishOnly": "node scripts/check-publish-allowed.js && npm run validate-types && npm run build && npm run validate-registry && npm run test:e2e"
35
36
  },