@vizejs/ui 0.345.0 → 0.350.2

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 (96) hide show
  1. package/dist/{button-D7sM9Xmj.d.mts → button-CVX8UBXj.d.mts} +6 -7
  2. package/dist/{button-8BOlFJNu.mjs → button-DT8AKlds.mjs} +2 -2
  3. package/dist/button.d.mts +1 -1
  4. package/dist/button.mjs +1 -1
  5. package/dist/catalog.d.mts +541 -0
  6. package/dist/catalog.mjs +784 -0
  7. package/dist/{checkbox-B4y9GUen.mjs → checkbox-BgIvwjyC.mjs} +2 -2
  8. package/dist/{checkbox-DkwZFC80.d.mts → checkbox-DP3_ko7D.d.mts} +7 -8
  9. package/dist/checkbox.d.mts +1 -1
  10. package/dist/checkbox.mjs +1 -1
  11. package/dist/collection-B_dFZOHO.d.mts +185 -0
  12. package/dist/collection-eHN150dT.mjs +453 -0
  13. package/dist/collection.d.mts +2 -0
  14. package/dist/collection.mjs +2 -0
  15. package/dist/composite-navigation-QINW9GLy.d.mts +115 -0
  16. package/dist/composite-navigation-Skx3LZsv.mjs +354 -0
  17. package/dist/composite-navigation.d.mts +2 -0
  18. package/dist/composite-navigation.mjs +2 -0
  19. package/dist/controllable-state.d.mts +1 -1
  20. package/dist/dismissable-layer-4icKahVs.d.mts +119 -0
  21. package/dist/dismissable-layer-CwG1gtdz.mjs +488 -0
  22. package/dist/dismissable-layer.d.mts +2 -0
  23. package/dist/dismissable-layer.mjs +2 -0
  24. package/dist/focus-CAWi_I-0.mjs +318 -0
  25. package/dist/focus-K6dOifoZ.d.mts +112 -0
  26. package/dist/focus-guards-Bt0C-0qS.d.mts +81 -0
  27. package/dist/focus-guards-DhMPQAT8.mjs +299 -0
  28. package/dist/focus-guards.d.mts +2 -0
  29. package/dist/focus-guards.mjs +2 -0
  30. package/dist/focus-scope-CavhKWx0.d.mts +100 -0
  31. package/dist/focus-scope-D9U1aj67.mjs +340 -0
  32. package/dist/focus-scope-dom-DBwNEWxG.mjs +264 -0
  33. package/dist/focus-scope.d.mts +2 -0
  34. package/dist/focus-scope.mjs +2 -0
  35. package/dist/focus.d.mts +2 -0
  36. package/dist/focus.mjs +2 -0
  37. package/dist/hover-BXwwbSaO.d.mts +80 -0
  38. package/dist/hover.d.mts +2 -0
  39. package/dist/hover.mjs +197 -0
  40. package/dist/id-5OAUyVPd.d.mts +126 -0
  41. package/dist/id-mziSyAse.mjs +137 -0
  42. package/dist/id.d.mts +2 -0
  43. package/dist/id.mjs +2 -0
  44. package/dist/index.d.mts +23 -6
  45. package/dist/index.mjs +21 -5
  46. package/dist/inert-outside-CyqtoKQ4.mjs +346 -0
  47. package/dist/inert-outside-tuHRmaqJ.d.mts +43 -0
  48. package/dist/inert-outside.d.mts +2 -0
  49. package/dist/inert-outside.mjs +2 -0
  50. package/dist/interaction-modality-DOZK0BpZ.mjs +304 -0
  51. package/dist/interaction-modality-jgHKjPFB.d.mts +89 -0
  52. package/dist/interaction-modality.d.mts +2 -0
  53. package/dist/interaction-modality.mjs +2 -0
  54. package/dist/long-press-Dsul69gk.mjs +340 -0
  55. package/dist/long-press-cll6z2K9.d.mts +105 -0
  56. package/dist/long-press.d.mts +2 -0
  57. package/dist/long-press.mjs +2 -0
  58. package/dist/media-pdf.d.mts +1 -1
  59. package/dist/media-pdf.mjs +1 -1
  60. package/dist/media.d.mts +1 -1
  61. package/dist/media.mjs +1 -1
  62. package/dist/move-BOmXDYbh.d.mts +103 -0
  63. package/dist/move-BVvMHzxr.mjs +386 -0
  64. package/dist/move.d.mts +2 -0
  65. package/dist/move.mjs +2 -0
  66. package/dist/press-N_mE3Mgx.mjs +469 -0
  67. package/dist/press-event-Cd2OPpmw.mjs +149 -0
  68. package/dist/press-types-CNqStzJf.d.mts +112 -0
  69. package/dist/press.d.mts +14 -0
  70. package/dist/press.mjs +2 -0
  71. package/dist/{primitive-DJB7pOf3.mjs → primitive-BX31dogp.mjs} +2 -2
  72. package/dist/{primitive-BtvwikH1.d.mts → primitive-C8jW7DLd.d.mts} +3 -4
  73. package/dist/primitive.d.mts +1 -1
  74. package/dist/primitive.mjs +1 -1
  75. package/dist/scroll-lock-BgVtX4wT.d.mts +49 -0
  76. package/dist/scroll-lock-Ckbmm0-J.mjs +313 -0
  77. package/dist/scroll-lock.d.mts +2 -0
  78. package/dist/scroll-lock.mjs +2 -0
  79. package/dist/spatial-navigation-CHj9mDZH.d.mts +106 -0
  80. package/dist/spatial-navigation-D6-UDavU.mjs +301 -0
  81. package/dist/spatial-navigation.d.mts +2 -0
  82. package/dist/spatial-navigation.mjs +2 -0
  83. package/dist/typeahead-B7KDxE_u.mjs +175 -0
  84. package/dist/typeahead-BbgUB2Bj.d.mts +71 -0
  85. package/dist/typeahead.d.mts +2 -0
  86. package/dist/typeahead.mjs +2 -0
  87. package/dist/visually-hidden-BOqfqBFt.d.mts +17 -0
  88. package/dist/{visually-hidden-QENRapzW.mjs → visually-hidden-BwDOx5yf.mjs} +2 -2
  89. package/dist/visually-hidden.d.mts +1 -1
  90. package/dist/visually-hidden.mjs +1 -1
  91. package/package.json +99 -11
  92. package/dist/visually-hidden-BegtnMng.d.mts +0 -19
  93. /package/dist/{_plugin-vue_export-helper-BVN2DL-U.mjs → _plugin-vue_export-helper-BOaGB7Aw.mjs} +0 -0
  94. /package/dist/{controllable-state-DXsYJ3yl.d.mts → controllable-state-BtoxKahh.d.mts} +0 -0
  95. /package/dist/{pdf-source-COxN3A1l.d.mts → pdf-source-BYFK2Pks.d.mts} +0 -0
  96. /package/dist/{pdf-source-C52YE8tp.mjs → pdf-source-zu1LkCeE.mjs} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { useControllableState } from "./controllable-state.mjs";
2
- import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BVN2DL-U.mjs";
2
+ import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.mjs";
3
3
  import { computed, createElementBlock, defineComponent, nextTick, openBlock, unref, useTemplateRef, watch, watchEffect } from "vue";
4
4
  //#region src/checkbox-state.ts
5
5
  /** Resolve the visual state while giving the mixed state precedence. */
@@ -18,7 +18,7 @@ const _hoisted_1 = [
18
18
  ];
19
19
  //#endregion
20
20
  //#region src/CheckboxControl.vue
21
- var CheckboxControl_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
21
+ var CheckboxControl_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
22
22
  __name: "CheckboxControl",
23
23
  props: {
24
24
  modelValue: {
@@ -1,5 +1,4 @@
1
- import { r as StateUpdate } from "./controllable-state-DXsYJ3yl.mjs";
2
- import * as _$vue from "vue";
1
+ import { r as StateUpdate } from "./controllable-state-BtoxKahh.mjs";
3
2
 
4
3
  //#region src/checkbox-state.d.ts
5
4
  /** Visual state exposed by the Checkbox Native CSS contract. */
@@ -42,21 +41,21 @@ type __VLS_Props = {
42
41
  };
43
42
  /** Move focus to the native checkbox. */
44
43
  declare function focus(options?: FocusOptions): void;
45
- declare const __VLS_export: _$vue.DefineComponent<__VLS_Props, {
46
- element: Readonly<_$vue.ShallowRef<HTMLInputElement | null>>;
47
- checked: _$vue.ComputedRef<boolean>;
44
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
45
+ element: Readonly<import("vue").ShallowRef<HTMLInputElement | null>>;
46
+ checked: import("vue").ComputedRef<boolean>;
48
47
  focus: typeof focus;
49
48
  reset: () => boolean;
50
49
  setChecked: (update: StateUpdate<boolean>) => boolean;
51
- }, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
50
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
52
51
  "update:modelValue": (value: boolean) => any;
53
52
  "update:indeterminate": (value: boolean) => any;
54
53
  change: (value: boolean, nativeEvent: Event) => any;
55
- }, string, _$vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
54
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
56
55
  "onUpdate:modelValue"?: (value: boolean) => any;
57
56
  "onUpdate:indeterminate"?: (value: boolean) => any;
58
57
  onChange?: (value: boolean, nativeEvent: Event) => any;
59
- }>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
58
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
60
59
  declare const _default: typeof __VLS_export;
61
60
  //#endregion
62
61
  export { CheckboxState as n, getCheckboxState as r, _default as t };
@@ -1,2 +1,2 @@
1
- import { n as CheckboxState, r as getCheckboxState, t as _default } from "./checkbox-DkwZFC80.mjs";
1
+ import { n as CheckboxState, r as getCheckboxState, t as _default } from "./checkbox-DP3_ko7D.mjs";
2
2
  export { _default as Checkbox, CheckboxState, getCheckboxState };
package/dist/checkbox.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { n as getCheckboxState, t as CheckboxControl_default } from "./checkbox-B4y9GUen.mjs";
1
+ import { n as getCheckboxState, t as CheckboxControl_default } from "./checkbox-BgIvwjyC.mjs";
2
2
  export { CheckboxControl_default as Checkbox, getCheckboxState };
@@ -0,0 +1,185 @@
1
+ import { ComputedRef, MaybeRefOrGetter } from "vue";
2
+
3
+ //#region src/collection-types.d.ts
4
+ /** Serializable identity accepted by every collection primitive. */
5
+ type CollectionKey = string | number;
6
+ /** How disabled items participate in focus navigation and typeahead. */
7
+ type CollectionDisabledBehavior = "skip" | "focusable";
8
+ /** Direction understood by {@link CollectionRegistry.getNavigationKey}. */
9
+ type CollectionNavigationDirection = "first" | "last" | "next" | "previous";
10
+ /** Why the registry changed its active key. */
11
+ type CollectionActiveChangeReason = "programmatic" | "navigation" | "typeahead" | "item-removed" | "item-disabled" | "registry-disposed";
12
+ /** Reactive sources registered for one logical collection item. */
13
+ interface CollectionItemInput<Key extends CollectionKey, Value> {
14
+ /** Stable, request-independent identity. Keys must be unique within a registry. */
15
+ readonly key: Key;
16
+ /** Consumer-owned data associated with this item. */
17
+ readonly value: Value;
18
+ /** Rendered element used for live DOM ordering and text extraction. */
19
+ readonly element?: MaybeRefOrGetter<Element | null | undefined>;
20
+ /**
21
+ * Explicit typeahead text. `null` and `undefined` select accessible DOM text
22
+ * extraction; an empty string deliberately opts the item out of typeahead.
23
+ */
24
+ readonly textValue?: MaybeRefOrGetter<string | null | undefined>;
25
+ /** Whether activation is disabled. Navigation follows `disabledBehavior`. */
26
+ readonly disabled?: MaybeRefOrGetter<boolean | undefined>;
27
+ /**
28
+ * Deterministic order for virtualized, portalled, or server-only items.
29
+ *
30
+ * If one item supplies an order, every item must supply a unique safe integer.
31
+ * Otherwise DOM order is used once every item is connected in one document;
32
+ * registration order is the SSR, partial-mount, and disconnected fallback.
33
+ */
34
+ readonly order?: MaybeRefOrGetter<number | undefined>;
35
+ }
36
+ /** Immutable, resolved view of a registered collection item. */
37
+ interface CollectionItem<Key extends CollectionKey, Value> {
38
+ /** Stable item identity. */
39
+ readonly key: Key;
40
+ /** Consumer-owned item data. */
41
+ readonly value: Value;
42
+ /** Current rendered element, or `null` during SSR and before mount. */
43
+ readonly element: Element | null;
44
+ /** Normalized text used by typeahead. */
45
+ readonly textValue: string;
46
+ /** Current disabled state. */
47
+ readonly disabled: boolean;
48
+ /** Explicit virtual order, or `undefined` when DOM order is authoritative. */
49
+ readonly order: number | undefined;
50
+ }
51
+ /** Active-key transition reported to collection consumers. */
52
+ interface CollectionActiveChange<Key extends CollectionKey> {
53
+ /** New active key, or `null` when no navigable item remains. */
54
+ readonly key: Key | null;
55
+ /** Active key before the transition. */
56
+ readonly previousKey: Key | null;
57
+ /** Stable cause suitable for focus and announcement policies. */
58
+ readonly reason: CollectionActiveChangeReason;
59
+ }
60
+ /** Options for {@link createCollectionRegistry}. */
61
+ interface CollectionRegistryOptions<Key extends CollectionKey> {
62
+ /**
63
+ * Whether disabled items are omitted from navigation or remain focusable.
64
+ *
65
+ * Menus commonly use `"focusable"`; listboxes and roving tab stops commonly
66
+ * use `"skip"`.
67
+ *
68
+ * @default "skip"
69
+ */
70
+ readonly disabledBehavior?: CollectionDisabledBehavior;
71
+ /** Locale-aware comparator used by typeahead matching. */
72
+ readonly collator?: Intl.Collator;
73
+ /** Called synchronously after a distinct active-key transition. */
74
+ readonly onActiveKeyChange?: (change: CollectionActiveChange<Key>) => void;
75
+ }
76
+ /** Options for directional collection navigation. */
77
+ interface CollectionNavigationOptions<Key extends CollectionKey> {
78
+ /**
79
+ * Key navigation starts from.
80
+ *
81
+ * @default The registry active key
82
+ */
83
+ readonly fromKey?: Key | null;
84
+ /**
85
+ * Whether navigation wraps at the first and last item.
86
+ *
87
+ * @default false
88
+ */
89
+ readonly loop?: boolean;
90
+ }
91
+ /** Options for locale-aware collection text lookup. */
92
+ interface CollectionTextSearchOptions<Key extends CollectionKey> {
93
+ /**
94
+ * Search begins after this key so repeated input cycles matching items.
95
+ *
96
+ * @default The registry active key
97
+ */
98
+ readonly fromKey?: Key | null;
99
+ /**
100
+ * Match normalized prefixes or the complete normalized text.
101
+ *
102
+ * @default "prefix"
103
+ */
104
+ readonly match?: "prefix" | "exact";
105
+ /**
106
+ * Whether search wraps to the beginning of the collection.
107
+ *
108
+ * @default true
109
+ */
110
+ readonly loop?: boolean;
111
+ /** Per-search locale comparator override. */
112
+ readonly collator?: Intl.Collator;
113
+ }
114
+ /** Idempotent lifecycle handle returned by {@link CollectionRegistry.register}. */
115
+ interface CollectionRegistration<Key extends CollectionKey> {
116
+ /** Registered stable key. */
117
+ readonly key: Key;
118
+ /** Whether this exact registration still owns its key. */
119
+ readonly registered: ComputedRef<boolean>;
120
+ /** Remove this registration and report whether it was present. */
121
+ readonly unregister: () => boolean;
122
+ }
123
+ /** Type-safe registry shared by compound collection components. */
124
+ interface CollectionRegistry<Key extends CollectionKey, Value> {
125
+ /** All items in deterministic virtual, DOM, or registration order. */
126
+ readonly items: ComputedRef<readonly CollectionItem<Key, Value>[]>;
127
+ /** Items eligible for focus navigation under the disabled policy. */
128
+ readonly navigableItems: ComputedRef<readonly CollectionItem<Key, Value>[]>;
129
+ /** Logical focus key used by roving-tabindex and `aria-activedescendant` adapters. */
130
+ readonly activeKey: ComputedRef<Key | null>;
131
+ /** Register one item. Vue scope disposal unregisters it automatically. */
132
+ readonly register: (input: CollectionItemInput<Key, Value>) => CollectionRegistration<Key>;
133
+ /** Resolve the latest immutable snapshot for a key. */
134
+ readonly getItem: (key: Key) => CollectionItem<Key, Value> | undefined;
135
+ /**
136
+ * Re-resolve reactive sources, DOM order, and extracted text immediately.
137
+ *
138
+ * A scoped MutationObserver calls this automatically for connected items;
139
+ * the explicit hook supports custom renderers and observer-free environments.
140
+ */
141
+ readonly refresh: () => void;
142
+ /** Set a registered, navigable active key, or clear it with `null`. */
143
+ readonly setActiveKey: (key: Key | null) => boolean;
144
+ /** Resolve a directional target without changing active state. */
145
+ readonly getNavigationKey: (direction: CollectionNavigationDirection, options?: CollectionNavigationOptions<Key>) => Key | null;
146
+ /** Move active state directionally and return the resulting target. */
147
+ readonly moveActive: (direction: CollectionNavigationDirection, options?: CollectionNavigationOptions<Key>) => Key | null;
148
+ /** Find the next locale-aware text match without changing active state. */
149
+ readonly findByTextValue: (query: string, options?: CollectionTextSearchOptions<Key>) => Key | null;
150
+ /** Move active state to the next locale-aware text match. */
151
+ readonly moveActiveByTextValue: (query: string, options?: CollectionTextSearchOptions<Key>) => Key | null;
152
+ /** Stop observation, clear items, and reject future mutations. */
153
+ readonly dispose: () => boolean;
154
+ }
155
+ //#endregion
156
+ //#region src/collection-registry.d.ts
157
+ /**
158
+ * Create an SSR-safe, mutation-aware registry for one compound collection.
159
+ *
160
+ * The registry never moves DOM focus itself. Consumers bind `activeKey` to
161
+ * roving tabindex or `aria-activedescendant`; synchronous recovery guarantees
162
+ * that removing or disabling the active item selects the next navigable item,
163
+ * then the previous one, before the mutation can leave focus state orphaned.
164
+ */
165
+ declare function createCollectionRegistry<Key extends CollectionKey, Value>(options?: CollectionRegistryOptions<Key>): CollectionRegistry<Key, Value>;
166
+ //#endregion
167
+ //#region src/collection-text.d.ts
168
+ /**
169
+ * Normalize authored or extracted typeahead text without applying a locale.
170
+ *
171
+ * Unicode is normalized to NFC and every whitespace run becomes one ASCII
172
+ * space. Locale-sensitive equality remains the responsibility of a collator.
173
+ */
174
+ declare function normalizeCollectionTextValue(value: string): string;
175
+ /**
176
+ * Extract a practical accessible text value from an item element.
177
+ *
178
+ * `aria-labelledby` and `aria-label` take precedence, hidden descendants are
179
+ * excluded unless explicitly referenced, and image/input fallbacks are
180
+ * included. Complex widgets should still provide `textValue` explicitly when
181
+ * their typeahead label differs from their accessible name.
182
+ */
183
+ declare function extractCollectionTextValue(element: Element): string;
184
+ //#endregion
185
+ export { CollectionActiveChangeReason as a, CollectionItemInput as c, CollectionNavigationOptions as d, CollectionRegistration as f, CollectionTextSearchOptions as h, CollectionActiveChange as i, CollectionKey as l, CollectionRegistryOptions as m, normalizeCollectionTextValue as n, CollectionDisabledBehavior as o, CollectionRegistry as p, createCollectionRegistry as r, CollectionItem as s, extractCollectionTextValue as t, CollectionNavigationDirection as u };