stimeo-ui 0.18.0 → 0.18.1

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 (33) hide show
  1. package/CHANGELOG.md +31 -2
  2. package/dist/cable/index.d.ts +2 -1
  3. package/dist/controllers/command_palette_controller.js +1 -0
  4. package/dist/controllers/command_palette_controller.js.map +1 -1
  5. package/dist/controllers/dismissible_controller.js +2 -0
  6. package/dist/controllers/dismissible_controller.js.map +1 -1
  7. package/dist/controllers/editable_controller.js +1 -0
  8. package/dist/controllers/editable_controller.js.map +1 -1
  9. package/dist/controllers/form_field_controller.d.ts +2 -1
  10. package/dist/controllers/input_mask_controller.d.ts +2 -1
  11. package/dist/controllers/input_mask_controller.js +23 -0
  12. package/dist/controllers/input_mask_controller.js.map +1 -1
  13. package/dist/controllers/multi_select_controller.d.ts +2 -1
  14. package/dist/controllers/multi_select_controller.js +21 -1
  15. package/dist/controllers/multi_select_controller.js.map +1 -1
  16. package/dist/controllers/pointer_drag_controller.d.ts +1 -0
  17. package/dist/controllers/pointer_drag_controller.js +6 -1
  18. package/dist/controllers/pointer_drag_controller.js.map +1 -1
  19. package/dist/controllers/popover_controller.d.ts +6 -2
  20. package/dist/controllers/popover_controller.js +9 -0
  21. package/dist/controllers/popover_controller.js.map +1 -1
  22. package/dist/index.d.ts +2 -1
  23. package/dist/index.js +63 -2
  24. package/dist/index.js.map +1 -1
  25. package/dist/inspector/cli.d.ts +10 -1
  26. package/dist/inspector/cli.js +5 -0
  27. package/dist/inspector/cli.js.map +1 -1
  28. package/dist/inspector/cli_bin.d.ts +1 -1
  29. package/dist/inspector/cli_bin.js +9 -0
  30. package/dist/inspector/cli_bin.js.map +1 -1
  31. package/dist/inspector/manifest.json +2 -2
  32. package/dist/positioning/index.d.ts +2 -1
  33. package/package.json +5 -5
@@ -401,11 +401,13 @@ interface KeyboardRequirement {
401
401
  * of its targets must use semantics the controller can own without competing
402
402
  * with another native interaction.
403
403
  *
404
- * `"non-interactive"` admits only generic, non-interactive elements.
404
+ * `"non-interactive"` admits generic, non-interactive elements by default.
405
405
  * `"non-interactive-or-button"` additionally admits a `<button>` whose
406
406
  * literal `type` is listed in {@link buttonTypes}. The explicit type matters:
407
407
  * a missing or invalid button type defaults to `submit`, so treating it as an
408
408
  * ordinary action button would silently submit an enclosing form.
409
+ * In either mode, {@link inputTypes} can admit `<input>` types whose native
410
+ * activation the controller supports.
409
411
  */
410
412
  interface HostRequirement {
411
413
  /** Target name; the empty string `""` means the controller scope element. */
@@ -414,6 +416,13 @@ interface HostRequirement {
414
416
  readonly mode: "non-interactive" | "non-interactive-or-button";
415
417
  /** Literal button types admitted by `"non-interactive-or-button"`. */
416
418
  readonly buttonTypes?: readonly string[];
419
+ /**
420
+ * Literal `<input>` types admitted in either mode, for a controller that composes
421
+ * with that input's own activation instead of replacing it. A missing or empty
422
+ * type reads as `text`; any type not listed, an invalid one included, is not
423
+ * admitted.
424
+ */
425
+ readonly inputTypes?: readonly string[];
417
426
  /** Human-readable fix suggestion shown by the CLI (stage 4). */
418
427
  readonly suggestion: string;
419
428
  }
@@ -1182,6 +1182,11 @@ function checkSource(source, manifest) {
1182
1182
  const effectiveType = type?.value.trim().toLowerCase() || "submit";
1183
1183
  return (rule.buttonTypes ?? []).includes(effectiveType);
1184
1184
  }
1185
+ if (element.tag === "input" && rule.inputTypes) {
1186
+ const type = element.attrs.find((attr) => attr.name === "type");
1187
+ if (type && isDynamicValue(type)) return null;
1188
+ return rule.inputTypes.includes(type?.value.toLowerCase() || "text");
1189
+ }
1185
1190
  if (ALWAYS_INTERACTIVE_HOSTS.has(element.tag)) return false;
1186
1191
  if ((element.tag === "a" || element.tag === "area") && hasAttr(element, "href")) return false;
1187
1192
  if ((element.tag === "audio" || element.tag === "video") && hasAttr(element, "controls")) {