@plexui/vue 0.38.0 → 0.39.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.
@@ -1 +1 @@
1
- {"version":3,"file":"inputMode.js","sourceRoot":"","sources":["../../../src/lib/inputMode.ts"],"names":[],"mappings":"AAKA,0FAA0F;AAC1F,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAwB,EAAW,EAAE;IAClE,IAAI,KAAK,CAAC,WAAW,KAAK,OAAO;QAAE,OAAO,KAAK,CAAA;IAC/C,MAAM,MAAM,GAAG,KAAK,CAAC,aAAa,CAAA;IAClC,MAAM,GAAG,GAAG,MAAM,YAAY,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,YAAY,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAA;IACtG,OAAO,GAAG,EAAE,eAAe,CAAC,OAAO,CAAC,KAAK,KAAK,OAAO,CAAA;AACvD,CAAC,CAAA","sourcesContent":["type HoverPointerEvent = {\n pointerType: string\n currentTarget: EventTarget | null\n}\n\n/** Pointer hover is unavailable to touch input and explicitly touch-rendered surfaces. */\nexport const isHoverPointer = (event: HoverPointerEvent): boolean => {\n if (event.pointerType === \"touch\") return false\n const target = event.currentTarget\n const doc = target instanceof Document ? target : target instanceof Node ? target.ownerDocument : null\n return doc?.documentElement.dataset.input !== \"touch\"\n}\n"]}
1
+ {"version":3,"file":"inputMode.js","sourceRoot":"","sources":["../../../src/lib/inputMode.ts"],"names":[],"mappings":"AAKA,0FAA0F;AAC1F,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAwB,EAAW,EAAE;IAClE,IAAI,KAAK,CAAC,WAAW,KAAK,OAAO;QAAE,OAAO,KAAK,CAAA;IAC/C,MAAM,MAAM,GAAG,KAAK,CAAC,aAAa,CAAA;IAClC,MAAM,GAAG,GAAG,MAAM,YAAY,QAAQ,CAAC,CAAC,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,IAAI,CAAC,GAAG;QAAE,OAAM;IAChB,kBAAkB,CAAC,GAAG,CAAC,CAAA;IACvB,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAA;AAC/B,CAAC,CAAA;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAgB,EAAW,EAAE;IAC1D,IAAI,CAAC;QACH,IAAI,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC;YAAE,OAAO,IAAI,CAAA;IACpD,CAAC;IAAC,MAAM,CAAC;QACP,6DAA6D;IAC/D,CAAC;IACD,OAAO,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,SAAS,CAAA;AAC3D,CAAC,CAAA","sourcesContent":["type HoverPointerEvent = {\n pointerType: string\n currentTarget: EventTarget | null\n}\n\n/** Pointer hover is unavailable to touch input and explicitly touch-rendered surfaces. */\nexport const isHoverPointer = (event: HoverPointerEvent): boolean => {\n if (event.pointerType === \"touch\") return false\n const target = event.currentTarget\n const doc = target instanceof Document ? target : target instanceof Node ? target.ownerDocument : null\n return doc?.documentElement.dataset.input !== \"touch\"\n}\n\n// The last input of each document: a pointer press or a key. A focus that follows a pointer press is one the press\n// gave or a script moved after it (a dialog closed with the mouse returns focus to its trigger), and no focus ring\n// shows for it; a key, Tab or an arrow, shows one.\nconst lastInput = new WeakMap<Document, \"pointer\" | \"keyboard\">()\nconst tracked = new WeakSet<Document>()\n\n/** Starts tracking the last input of a document (once per document). */\nexport const trackInputModality = (doc: Document | null | undefined): void => {\n if (!doc || tracked.has(doc)) return\n tracked.add(doc)\n doc.addEventListener(\"pointerdown\", () => lastInput.set(doc, \"pointer\"), { capture: true, passive: true })\n doc.addEventListener(\"mousedown\", () => lastInput.set(doc, \"pointer\"), { capture: true, passive: true })\n // Any key counts, with a modifier too: a screen reader moves focus with its own keys (Control-Option-arrows), and\n // a tooltip it misses is worse than one more after a shortcut\n doc.addEventListener(\"keydown\", () => lastInput.set(doc, \"keyboard\"), { capture: true, passive: true })\n}\n\n/**\n * Notes a pointer press from the element's own handler: a document that starts being tracked during that press (the\n * first touch on a trigger in an iframe) has already let it pass its capture phase.\n */\nexport const notePointerInput = (doc: Document | null | undefined): void => {\n if (!doc) return\n trackInputModality(doc)\n lastInput.set(doc, \"pointer\")\n}\n\n/**\n * Whether a focus shows its ring, as the browser's :focus-visible: a focus after a key or with no input yet does, one\n * a pointer press gave or a script moved after it does not. A tooltip opens on the first only.\n */\nexport const isFocusVisible = (element: Element): boolean => {\n try {\n if (element.matches(\":focus-visible\")) return true\n } catch {\n // A browser without the selector leaves it to the last input\n }\n return lastInput.get(element.ownerDocument) !== \"pointer\"\n}\n"]}
@@ -46,4 +46,10 @@ export const observeTextareaWidth = (element, resize) => {
46
46
  view?.removeEventListener("resize", onResize);
47
47
  };
48
48
  };
49
+ /**
50
+ * Whether the browser sizes an auto-resizing textarea itself (`field-sizing: content`, Safari 26+, Chrome 123+): then
51
+ * the style sheet holds it between its rows and maximum rows, and no script measures it. Measuring set the height to
52
+ * 0 and read scrollHeight, a forced layout on mount of every such textarea.
53
+ */
54
+ export const sizesByContent = () => typeof CSS !== "undefined" && typeof CSS.supports === "function" && CSS.supports("field-sizing", "content");
49
55
  //# sourceMappingURL=observeTextareaWidth.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"observeTextareaWidth.js","sourceRoot":"","sources":["../../../src/lib/observeTextareaWidth.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAoB,EAAE,MAAkB,EAAgB,EAAE;IAC7F,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,WAAW,CAAA;IAC9C,IAAI,MAAM,GAAG,IAAI,CAAA;IACjB,IAAI,KAAyB,CAAA;IAC7B,IAAI,aAAiC,CAAA;IAErC,IAAI,OAAO,cAAc,KAAK,WAAW,EAAE,CAAC;QAC1C,MAAM,QAAQ,GAAG,IAAI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Q,EAAE,QAAQ,CAAC,CAAA;IAC1C,OAAO,GAAG,EAAE;QACV,MAAM,GAAG,KAAK,CAAA;QACd,IAAI,EAAE,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;IAC/C,CAAC,CAAA;AACH,CAAC,CAAA","sourcesContent":["/** Observe width only; autosizing height must not feed back into the observer. */\nexport const observeTextareaWidth = (element: HTMLElement, resize: () => void): (() => void) => {\n const view = element.ownerDocument.defaultView\n let active = true\n let frame: number | undefined\n let previousWidth: number | undefined\n\n if (typeof ResizeObserver !== \"undefined\") {\n const observer = new ResizeObserver((entries) => {\n const entry = entries.find(({ target }) => target === element)\n if (!active || !entry || entry.contentRect.width === previousWidth) return\n previousWidth = entry.contentRect.width\n if (frame !== undefined) return\n // Write height outside ResizeObserver delivery to avoid a resize loop.\n if (view) {\n frame = view.requestAnimationFrame(() => {\n frame = undefined\n if (active) resize()\n })\n } else {\n resize()\n }\n })\n observer.observe(element)\n return () => {\n active = false\n observer.disconnect()\n if (frame !== undefined) view?.cancelAnimationFrame(frame)\n }\n }\n\n previousWidth = element.getBoundingClientRect().width\n const onResize = () => {\n const width = element.getBoundingClientRect().width\n if (!active || width === previousWidth) return\n previousWidth = width\n resize()\n }\n view?.addEventListener(\"resize\", onResize)\n return () => {\n active = false\n view?.removeEventListener(\"resize\", onResize)\n }\n}\n"]}
1
+ {"version":3,"file":"observeTextareaWidth.js","sourceRoot":"","sources":["../../../src/lib/observeTextareaWidth.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAoB,EAAE,MAAkB,EAAgB,EAAE;IAC7F,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,WAAW,CAAA;IAC9C,IAAI,MAAM,GAAG,IAAI,CAAA;IACjB,IAAI,KAAyB,CAAA;IAC7B,IAAI,aAAiC,CAAA;IAErC,IAAI,OAAO,cAAc,KAAK,WAAW,EAAE,CAAC;QAC1C,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EAAE,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;IAC1C,OAAO,GAAG,EAAE;QACV,MAAM,GAAG,KAAK,CAAA;QACd,IAAI,EAAE,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;IAC/C,CAAC,CAAA;AACH,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,GAAY,EAAE,CAC1C,OAAO,GAAG,KAAK,WAAW,IAAI,OAAO,GAAG,CAAC,QAAQ,KAAK,UAAU,IAAI,GAAG,CAAC,QAAQ,CAAC,cAAc,EAAE,SAAS,CAAC,CAAA","sourcesContent":["/** Observe width only; autosizing height must not feed back into the observer. */\nexport const observeTextareaWidth = (element: HTMLElement, resize: () => void): (() => void) => {\n const view = element.ownerDocument.defaultView\n let active = true\n let frame: number | undefined\n let previousWidth: number | undefined\n\n if (typeof ResizeObserver !== \"undefined\") {\n const observer = new ResizeObserver((entries) => {\n const entry = entries.find(({ target }) => target === element)\n if (!active || !entry || entry.contentRect.width === previousWidth) return\n previousWidth = entry.contentRect.width\n if (frame !== undefined) return\n // Write height outside ResizeObserver delivery to avoid a resize loop.\n if (view) {\n frame = view.requestAnimationFrame(() => {\n frame = undefined\n if (active) resize()\n })\n } else {\n resize()\n }\n })\n observer.observe(element)\n return () => {\n active = false\n observer.disconnect()\n if (frame !== undefined) view?.cancelAnimationFrame(frame)\n }\n }\n\n previousWidth = element.getBoundingClientRect().width\n const onResize = () => {\n const width = element.getBoundingClientRect().width\n if (!active || width === previousWidth) return\n previousWidth = width\n resize()\n }\n view?.addEventListener(\"resize\", onResize)\n return () => {\n active = false\n view?.removeEventListener(\"resize\", onResize)\n }\n}\n\n/**\n * Whether the browser sizes an auto-resizing textarea itself (`field-sizing: content`, Safari 26+, Chrome 123+): then\n * the style sheet holds it between its rows and maximum rows, and no script measures it. Measuring set the height to\n * 0 and read scrollHeight, a forced layout on mount of every such textarea.\n */\nexport const sizesByContent = (): boolean =>\n typeof CSS !== \"undefined\" && typeof CSS.supports === \"function\" && CSS.supports(\"field-sizing\", \"content\")\n"]}
@@ -109,6 +109,14 @@ declare const SelectComponent: import("vue").DefineComponent<import("vue").Extra
109
109
  type: BooleanConstructor;
110
110
  default: undefined;
111
111
  };
112
+ /**
113
+ * The list in the rounder shape of a pill menu (as `MenuContent pill`), whatever the trigger: a `#trigger` of its own or
114
+ * a rounded field can open the same list as a pill one. @default the trigger's `pill`
115
+ */
116
+ listPill: {
117
+ type: BooleanConstructor;
118
+ default: undefined;
119
+ };
112
120
  /** Size of the trigger: `3xs` 22px up to `3xl` 48px. @default "md" */
113
121
  size: {
114
122
  type: PropType<ControlSize>;
@@ -263,6 +271,14 @@ declare const SelectComponent: import("vue").DefineComponent<import("vue").Extra
263
271
  type: BooleanConstructor;
264
272
  default: undefined;
265
273
  };
274
+ /**
275
+ * The list in the rounder shape of a pill menu (as `MenuContent pill`), whatever the trigger: a `#trigger` of its own or
276
+ * a rounded field can open the same list as a pill one. @default the trigger's `pill`
277
+ */
278
+ listPill: {
279
+ type: BooleanConstructor;
280
+ default: undefined;
281
+ };
266
282
  /** Size of the trigger: `3xs` 22px up to `3xl` 48px. @default "md" */
267
283
  size: {
268
284
  type: PropType<ControlSize>;
@@ -374,6 +390,7 @@ declare const SelectComponent: import("vue").DefineComponent<import("vue").Extra
374
390
  dropdownIconType: DropdownIconType;
375
391
  loadingPlaceholder: string;
376
392
  allSelectedLabel: string;
393
+ listPill: boolean;
377
394
  noneLabel: string;
378
395
  searchPlaceholder: string;
379
396
  searchAriaLabel: string;
@@ -4,4 +4,16 @@ type HoverPointerEvent = {
4
4
  };
5
5
  /** Pointer hover is unavailable to touch input and explicitly touch-rendered surfaces. */
6
6
  export declare const isHoverPointer: (event: HoverPointerEvent) => boolean;
7
+ /** Starts tracking the last input of a document (once per document). */
8
+ export declare const trackInputModality: (doc: Document | null | undefined) => void;
9
+ /**
10
+ * Notes a pointer press from the element's own handler: a document that starts being tracked during that press (the
11
+ * first touch on a trigger in an iframe) has already let it pass its capture phase.
12
+ */
13
+ export declare const notePointerInput: (doc: Document | null | undefined) => void;
14
+ /**
15
+ * Whether a focus shows its ring, as the browser's :focus-visible: a focus after a key or with no input yet does, one
16
+ * a pointer press gave or a script moved after it does not. A tooltip opens on the first only.
17
+ */
18
+ export declare const isFocusVisible: (element: Element) => boolean;
7
19
  export {};
@@ -1,2 +1,8 @@
1
1
  /** Observe width only; autosizing height must not feed back into the observer. */
2
2
  export declare const observeTextareaWidth: (element: HTMLElement, resize: () => void) => (() => void);
3
+ /**
4
+ * Whether the browser sizes an auto-resizing textarea itself (`field-sizing: content`, Safari 26+, Chrome 123+): then
5
+ * the style sheet holds it between its rows and maximum rows, and no script measures it. Measuring set the height to
6
+ * 0 and read scrollHeight, a forced layout on mount of every such textarea.
7
+ */
8
+ export declare const sizesByContent: () => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plexui/vue",
3
- "version": "0.38.0",
3
+ "version": "0.39.1",
4
4
  "description": "Plex UI components for Vue 3, built on Reka UI and the shared @plexui/styles CSS",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -77,7 +77,7 @@
77
77
  "@maskito/core": "5.2.2",
78
78
  "@maskito/kit": "5.2.2",
79
79
  "@maskito/vue": "5.2.2",
80
- "@plexui/styles": "^0.16.0",
80
+ "@plexui/styles": "^0.16.1",
81
81
  "@tanstack/table-core": "8.21.3",
82
82
  "@tanstack/vue-table": "8.21.3",
83
83
  "@tiptap/core": "3.21.0",