@vizejs/composable 0.809.0 → 0.811.0
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.
- package/dist/abort-signal.mjs +0 -62
- package/dist/active-element.mjs +0 -11
- package/dist/animate.mjs +0 -19
- package/dist/async-resource.mjs +0 -17
- package/dist/battery.mjs +0 -13
- package/dist/breakpoints.mjs +0 -24
- package/dist/capability.mjs +0 -12
- package/dist/{catalog-BRX-Wg8B.mjs → catalog-CcpCnLjb.mjs} +0 -14
- package/dist/catalog.mjs +1 -1
- package/dist/color-mode.mjs +0 -23
- package/dist/computed-with-control.mjs +0 -22
- package/dist/create-event-hook.mjs +0 -27
- package/dist/create-global-state.mjs +0 -23
- package/dist/create-shared-composable.mjs +0 -23
- package/dist/device-motion.mjs +0 -11
- package/dist/device-orientation.mjs +0 -23
- package/dist/device-pixel-ratio.mjs +0 -11
- package/dist/disposal-scope.mjs +0 -25
- package/dist/document-visibility.mjs +0 -14
- package/dist/draggable.mjs +0 -14
- package/dist/element-bounding.mjs +0 -14
- package/dist/element-by-point.mjs +0 -10
- package/dist/element-hover.mjs +0 -13
- package/dist/element-target.mjs +0 -30
- package/dist/focus.mjs +0 -23
- package/dist/fps.mjs +0 -12
- package/dist/geolocation.mjs +0 -14
- package/dist/i18n.mjs +0 -86
- package/dist/icu-message.mjs +0 -58
- package/dist/idle.mjs +0 -16
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/infinite-scroll.mjs +0 -16
- package/dist/intersection-observer.mjs +0 -27
- package/dist/locale.mjs +0 -20
- package/dist/magic-keys.mjs +0 -35
- package/dist/math.mjs +0 -37
- package/dist/media-query.mjs +0 -29
- package/dist/mouse-in-element.mjs +0 -12
- package/dist/mouse.mjs +0 -12
- package/dist/mutation-observer.mjs +0 -15
- package/dist/network.mjs +0 -24
- package/dist/on-click-outside.mjs +0 -16
- package/dist/on-key-stroke.mjs +0 -33
- package/dist/on-long-press.mjs +0 -14
- package/dist/on-start-typing.mjs +0 -23
- package/dist/page-leave.mjs +0 -11
- package/dist/parent-element.mjs +0 -9
- package/dist/pinch.mjs +0 -14
- package/dist/pointer-lock.mjs +0 -23
- package/dist/pointer.mjs +0 -18
- package/dist/preferences.mjs +0 -31
- package/dist/preferred-languages.mjs +0 -13
- package/dist/ref-auto-reset.mjs +0 -24
- package/dist/ref-debounced.mjs +0 -22
- package/dist/ref-default.mjs +0 -21
- package/dist/resize-observer.mjs +0 -31
- package/dist/resolver.mjs +1 -58
- package/dist/retry-async.mjs +0 -25
- package/dist/retry-delay.mjs +0 -23
- package/dist/scope.mjs +0 -14
- package/dist/screen-orientation.mjs +0 -15
- package/dist/scroll-lock.mjs +0 -14
- package/dist/scroll.mjs +0 -27
- package/dist/standard-schema.mjs +0 -31
- package/dist/swipe.mjs +0 -36
- package/dist/temporal.mjs +0 -30
- package/dist/text-selection.mjs +0 -15
- package/dist/textarea-autosize.mjs +0 -13
- package/dist/to-reactive.mjs +0 -20
- package/dist/transition.mjs +0 -7
- package/dist/until.mjs +0 -25
- package/dist/use-array.mjs +0 -52
- package/dist/use-barcode-detector.mjs +0 -25
- package/dist/use-bluetooth.mjs +0 -27
- package/dist/use-broadcast-channel.mjs +0 -30
- package/dist/use-builtin-ai.mjs +0 -68
- package/dist/use-clipboard.mjs +0 -27
- package/dist/use-compression-stream.mjs +0 -78
- package/dist/use-contact-picker.mjs +0 -22
- package/dist/use-cookie.mjs +0 -63
- package/dist/use-countdown.mjs +0 -22
- package/dist/use-counter.mjs +0 -29
- package/dist/use-css-var.mjs +0 -28
- package/dist/use-date-format.mjs +0 -48
- package/dist/use-date-time-format.mjs +0 -22
- package/dist/use-debounced.mjs +0 -39
- package/dist/use-display-media.mjs +0 -22
- package/dist/use-display-names.mjs +0 -19
- package/dist/use-document-title.mjs +0 -25
- package/dist/use-drop-zone.mjs +0 -36
- package/dist/use-event-source.mjs +0 -25
- package/dist/use-eye-dropper.mjs +0 -19
- package/dist/use-favicon.mjs +0 -23
- package/dist/use-fetch.mjs +0 -27
- package/dist/use-field.mjs +0 -27
- package/dist/use-file-dialog.mjs +0 -21
- package/dist/{use-form-C2JXZ0i7.mjs → use-form-BZqwMs6k.mjs} +143 -70
- package/dist/use-form-field-props.mjs +0 -57
- package/dist/use-form.d.mts +123 -18
- package/dist/use-form.mjs +1 -1
- package/dist/use-fullscreen.mjs +0 -23
- package/dist/use-gamepad.mjs +0 -50
- package/dist/use-hid.mjs +0 -25
- package/dist/use-history.mjs +0 -43
- package/dist/use-id-generator.mjs +0 -21
- package/dist/use-image.mjs +0 -22
- package/dist/use-indexed-db.mjs +0 -39
- package/dist/use-interval.mjs +0 -28
- package/dist/use-list-format.mjs +0 -18
- package/dist/use-machine.mjs +0 -34
- package/dist/use-map.mjs +0 -28
- package/dist/use-media-controls.mjs +0 -28
- package/dist/use-mounted.mjs +0 -18
- package/dist/use-navigation-api.mjs +0 -27
- package/dist/use-notification.mjs +0 -24
- package/dist/use-number-format.mjs +0 -23
- package/dist/use-object-url.mjs +0 -22
- package/dist/use-offset-pagination.mjs +0 -18
- package/dist/use-payment-request.mjs +0 -25
- package/dist/use-performance-observer.mjs +0 -27
- package/dist/use-permission.mjs +0 -26
- package/dist/use-plural-rules.mjs +0 -21
- package/dist/use-push-subscription.mjs +0 -28
- package/dist/use-queue.mjs +0 -29
- package/dist/use-raf-fn.mjs +0 -23
- package/dist/use-relative-time-format.mjs +0 -35
- package/dist/use-request-idle-callback.mjs +0 -42
- package/dist/use-route-query.mjs +0 -17
- package/dist/use-scheduler-post-task.mjs +0 -27
- package/dist/use-screen-details.mjs +0 -42
- package/dist/use-script-tag.mjs +0 -28
- package/dist/use-segmenter.mjs +0 -20
- package/dist/use-serial.mjs +0 -24
- package/dist/use-service-worker.mjs +0 -27
- package/dist/use-set.mjs +0 -23
- package/dist/use-share.mjs +0 -23
- package/dist/use-sorted-locale.mjs +0 -20
- package/dist/use-speech-recognition.mjs +0 -24
- package/dist/use-speech-synthesis.mjs +0 -26
- package/dist/use-stack.mjs +0 -27
- package/dist/use-storage-estimate.mjs +0 -41
- package/dist/use-storage.mjs +0 -68
- package/dist/use-style-tag.mjs +0 -22
- package/dist/use-supported.mjs +0 -17
- package/dist/use-throttled.mjs +0 -46
- package/dist/use-time-ago.mjs +0 -22
- package/dist/use-toggle.mjs +0 -19
- package/dist/use-url-hash.mjs +0 -28
- package/dist/use-url-search-params.mjs +0 -99
- package/dist/use-usb.mjs +0 -23
- package/dist/use-user-activation.mjs +0 -22
- package/dist/use-user-media.mjs +0 -50
- package/dist/use-vibrate.mjs +0 -21
- package/dist/use-view-transition.mjs +0 -22
- package/dist/use-visual-viewport.mjs +0 -25
- package/dist/use-wake-lock.mjs +0 -21
- package/dist/use-web-authn.mjs +0 -61
- package/dist/use-web-locks.mjs +0 -25
- package/dist/use-web-midi.mjs +0 -22
- package/dist/use-web-vitals.mjs +0 -41
- package/dist/use-websocket.mjs +0 -27
- package/dist/use-worker-fn.mjs +0 -37
- package/dist/virtual-list.mjs +0 -14
- package/dist/whenever.mjs +0 -21
- package/dist/window-size.mjs +0 -12
- package/package.json +2 -2
- package/registry/files/form-control-types.ts +260 -0
- package/registry/files/form-dirty.ts +131 -0
- package/registry/files/form-options.ts +156 -0
- package/registry/files/form-path-types.ts +135 -0
- package/registry/files/use-form.ts +102 -449
- package/registry/registry.json +28 -4
package/dist/element-hover.mjs
CHANGED
|
@@ -8,19 +8,6 @@ const defaultScheduler = {
|
|
|
8
8
|
globalThis.clearTimeout(handle);
|
|
9
9
|
}
|
|
10
10
|
};
|
|
11
|
-
/**
|
|
12
|
-
* Track whether the pointer hovers an element.
|
|
13
|
-
*
|
|
14
|
-
* Uses `pointerenter`/`pointerleave` (which ignore descendants) with optional
|
|
15
|
-
* enter/leave delays; a pending delay is cancelled by the opposite event.
|
|
16
|
-
* Server renders report `false`; listeners and timers are released with the
|
|
17
|
-
* owning reactive scope.
|
|
18
|
-
*
|
|
19
|
-
* @param target Reactive element target.
|
|
20
|
-
* @param options Enter/leave delays and timer scheduler.
|
|
21
|
-
* @default options {}
|
|
22
|
-
* @returns Readonly hover flag.
|
|
23
|
-
*/
|
|
24
11
|
function useElementHover(target, options = {}) {
|
|
25
12
|
const { delayEnter = 0, delayLeave = 0, scheduler = defaultScheduler } = options;
|
|
26
13
|
const hovered = ref(false);
|
package/dist/element-target.mjs
CHANGED
|
@@ -1,29 +1,8 @@
|
|
|
1
1
|
import { toValue } from "vue";
|
|
2
2
|
//#region src/element-target.ts
|
|
3
|
-
/**
|
|
4
|
-
* Whether a value is a DOM element node.
|
|
5
|
-
*
|
|
6
|
-
* Uses the `nodeType` contract instead of `instanceof Element`, so the check
|
|
7
|
-
* reads no browser globals and works across realms (iframes, happy-dom,
|
|
8
|
-
* jsdom).
|
|
9
|
-
*
|
|
10
|
-
* @param value Candidate value.
|
|
11
|
-
* @returns Whether `value` is an element node.
|
|
12
|
-
*/
|
|
13
3
|
function isElementNode(value) {
|
|
14
4
|
return typeof value === "object" && value !== null && "nodeType" in value && value.nodeType === 1 && "getBoundingClientRect" in value;
|
|
15
5
|
}
|
|
16
|
-
/**
|
|
17
|
-
* Resolve a reactive element target to its concrete element.
|
|
18
|
-
*
|
|
19
|
-
* Reads the reactive source once (tracking it when called inside an effect).
|
|
20
|
-
* Component instances resolve to their root element; fragment or text roots
|
|
21
|
-
* resolve to `null`. Never throws and reads no browser globals, so it is safe
|
|
22
|
-
* during server rendering, where it always returns `null`.
|
|
23
|
-
*
|
|
24
|
-
* @param target Reactive element target.
|
|
25
|
-
* @returns The resolved element, or `null` while unresolved.
|
|
26
|
-
*/
|
|
27
6
|
function resolveElement(target) {
|
|
28
7
|
return elementFromValue(toValue(target));
|
|
29
8
|
}
|
|
@@ -35,15 +14,6 @@ function elementFromValue(value) {
|
|
|
35
14
|
}
|
|
36
15
|
return null;
|
|
37
16
|
}
|
|
38
|
-
/**
|
|
39
|
-
* Resolve a reactive list (or single) element target to its concrete elements.
|
|
40
|
-
*
|
|
41
|
-
* Unresolved entries are dropped and duplicates are removed while keeping the
|
|
42
|
-
* first-seen order, so observers never register the same node twice.
|
|
43
|
-
*
|
|
44
|
-
* @param targets Reactive element target or target list.
|
|
45
|
-
* @returns The resolved, de-duplicated elements.
|
|
46
|
-
*/
|
|
47
17
|
function resolveElements(targets) {
|
|
48
18
|
const value = toValue(targets);
|
|
49
19
|
const items = Array.isArray(value) ? value : [value];
|
package/dist/focus.mjs
CHANGED
|
@@ -2,19 +2,6 @@ import { tryOnScopeDispose } from "./scope.mjs";
|
|
|
2
2
|
import { resolveElement } from "./element-target.mjs";
|
|
3
3
|
import { computed, readonly, ref, watch } from "vue";
|
|
4
4
|
//#region src/focus.ts
|
|
5
|
-
/**
|
|
6
|
-
* Track and control focus of a single element.
|
|
7
|
-
*
|
|
8
|
-
* Listens for `focus`/`blur` on the resolved element and re-syncs when the
|
|
9
|
-
* target changes. Assigning `focused` calls `focus()`/`blur()`. Server renders
|
|
10
|
-
* always report `false`; `initialValue` is applied only after the element
|
|
11
|
-
* resolves on the client, so hydration output is unaffected.
|
|
12
|
-
*
|
|
13
|
-
* @param target Reactive element target.
|
|
14
|
-
* @param options Initial focus, focus-visible filtering, and scroll behavior.
|
|
15
|
-
* @default options {}
|
|
16
|
-
* @returns Writable focus ref and stop control.
|
|
17
|
-
*/
|
|
18
5
|
function useFocus(target, options = {}) {
|
|
19
6
|
const inner = ref(false);
|
|
20
7
|
const element = computed(() => {
|
|
@@ -64,16 +51,6 @@ function useFocus(target, options = {}) {
|
|
|
64
51
|
stop
|
|
65
52
|
};
|
|
66
53
|
}
|
|
67
|
-
/**
|
|
68
|
-
* Track whether focus is inside an element (the `:focus-within` state).
|
|
69
|
-
*
|
|
70
|
-
* Uses bubbling `focusin`/`focusout` and checks the `relatedTarget` so moving
|
|
71
|
-
* focus between descendants never flickers to `false`. Server renders report
|
|
72
|
-
* `false`.
|
|
73
|
-
*
|
|
74
|
-
* @param target Reactive element target.
|
|
75
|
-
* @returns Readonly focus-within ref and stop control.
|
|
76
|
-
*/
|
|
77
54
|
function useFocusWithin(target) {
|
|
78
55
|
const focused = ref(false);
|
|
79
56
|
const stopWatch = watch(() => resolveElement(target), (el, _previous, onCleanup) => {
|
package/dist/fps.mjs
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
import { tryOnScopeDispose } from "./scope.mjs";
|
|
2
2
|
import { hasInjectionContext, onMounted, readonly, ref, shallowRef, toValue, watch } from "vue";
|
|
3
3
|
//#region src/fps.ts
|
|
4
|
-
/**
|
|
5
|
-
* Measure the rendering frame rate with `requestAnimationFrame`.
|
|
6
|
-
*
|
|
7
|
-
* Uses the frame timestamps passed to the callback (no extra clock) and
|
|
8
|
-
* publishes a rounded average every `every` frames. No frames are requested
|
|
9
|
-
* during server rendering (`fps` stays `0`), and the pending frame is
|
|
10
|
-
* cancelled when paused or when the owning reactive scope stops.
|
|
11
|
-
*
|
|
12
|
-
* @param options Averaging window, start mode, and frame capability.
|
|
13
|
-
* @default options {}
|
|
14
|
-
* @returns Reactive frame rate plus pause/resume controls.
|
|
15
|
-
*/
|
|
16
4
|
function useFps(options = {}) {
|
|
17
5
|
const every = Math.max(1, Math.floor(options.every ?? 10));
|
|
18
6
|
const fps = ref(0);
|
package/dist/geolocation.mjs
CHANGED
|
@@ -4,20 +4,6 @@ import { computed, hasInjectionContext, onMounted, readonly, ref, shallowRef, to
|
|
|
4
4
|
//#region src/geolocation.ts
|
|
5
5
|
const PERMISSION_DENIED = 1;
|
|
6
6
|
const POSITION_UNAVAILABLE = 2;
|
|
7
|
-
/**
|
|
8
|
-
* Watch the device position with the Geolocation API.
|
|
9
|
-
*
|
|
10
|
-
* The watch follows the reactive host and is cleared when paused or when the
|
|
11
|
-
* owning reactive scope stops. Coordinates are copied into a plain snapshot
|
|
12
|
-
* so they are serializable. The `capability` result reports
|
|
13
|
-
* `"unsupported"`, `"permission-denied"`, `"unavailable"`, or `"not-ready"`
|
|
14
|
-
* (before the first fix) as data instead of throwing. Server renders expose
|
|
15
|
-
* `null` coordinates.
|
|
16
|
-
*
|
|
17
|
-
* @param options Accuracy, caching, start mode, and navigator capability.
|
|
18
|
-
* @default options {}
|
|
19
|
-
* @returns Reactive position, error, capability, and controls.
|
|
20
|
-
*/
|
|
21
7
|
function useGeolocation(options = {}) {
|
|
22
8
|
const isSupported = ref(false);
|
|
23
9
|
const coords = shallowRef(null);
|
package/dist/i18n.mjs
CHANGED
|
@@ -2,48 +2,10 @@ import { createMessageFormatter } from "./icu-message.mjs";
|
|
|
2
2
|
import { useLocale } from "./locale.mjs";
|
|
3
3
|
import { computed, inject, shallowReactive, shallowRef } from "vue";
|
|
4
4
|
//#region src/i18n.ts
|
|
5
|
-
/**
|
|
6
|
-
* Declare typed message catalogs for several locales.
|
|
7
|
-
*
|
|
8
|
-
* The literal messages are preserved, so {@link MessageParamsFor} knows the
|
|
9
|
-
* ICU parameters of every key. The compiler rejects catalogs whose locales
|
|
10
|
-
* do not share the same keys (`__missingTranslations`) or whose
|
|
11
|
-
* translations need incompatible parameter types (`__incompatibleParams`).
|
|
12
|
-
* Returns the catalogs unchanged; the function exists for inference and
|
|
13
|
-
* validation only.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```ts
|
|
17
|
-
* const messages = defineMessages({
|
|
18
|
-
* en: { cart: "{count, plural, one {# item} other {# items}}" },
|
|
19
|
-
* ja: { cart: "{count, plural, other {# 個}}" },
|
|
20
|
-
* });
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* @param catalogs Messages keyed by locale, then by (nested) key.
|
|
24
|
-
* @throws `TypeError` tagged `VIZE_COMPOSE_I18N_INVALID_KEY` when a key
|
|
25
|
-
* contains a dot (dots separate nested keys).
|
|
26
|
-
* @returns The same catalogs.
|
|
27
|
-
*/
|
|
28
5
|
function defineMessages(catalogs) {
|
|
29
6
|
for (const tree of Object.values(catalogs)) assertKeys(tree, "");
|
|
30
7
|
return catalogs;
|
|
31
8
|
}
|
|
32
|
-
/**
|
|
33
|
-
* Declare one additional locale (typically a lazily loaded module) against
|
|
34
|
-
* the catalogs produced by {@link defineMessages}.
|
|
35
|
-
*
|
|
36
|
-
* The keys must match exactly, and every translation may only use
|
|
37
|
-
* parameters the schema declares, with compatible types.
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```ts
|
|
41
|
-
* // fr.ts
|
|
42
|
-
* export default defineLocale<typeof messages>()({ cart: "{count, plural, one {# article} other {# articles}}" });
|
|
43
|
-
* ```
|
|
44
|
-
*
|
|
45
|
-
* @returns A function that validates and returns the locale catalog.
|
|
46
|
-
*/
|
|
47
9
|
function defineLocale() {
|
|
48
10
|
return (catalog) => {
|
|
49
11
|
assertKeys(catalog, "");
|
|
@@ -67,40 +29,6 @@ function readMessage(tree, key) {
|
|
|
67
29
|
function unwrapModule(loaded) {
|
|
68
30
|
return typeof loaded === "object" && loaded !== null && "default" in loaded ? loaded.default : loaded;
|
|
69
31
|
}
|
|
70
|
-
/**
|
|
71
|
-
* Define the typed i18n setup of an application.
|
|
72
|
-
*
|
|
73
|
-
* The definition holds only static configuration (catalogs, loaders,
|
|
74
|
-
* formats) and an injection key; it has no mutable module state. Call
|
|
75
|
-
* `create()` per request on the server and once on the client, install the
|
|
76
|
-
* instance with `app.use(instance)`, and read it in components with
|
|
77
|
-
* `definition.use()` (or {@link useI18n}). Locale changes are reactive
|
|
78
|
-
* through `setLocale`, which loads lazy locales first; `Intl` formatting
|
|
79
|
-
* follows the locale through the existing `useLocale` composable.
|
|
80
|
-
*
|
|
81
|
-
* Hydration: locale detection is never automatic. Resolve the locale per
|
|
82
|
-
* request, pass it to `create({ locale })` on both sides, and await
|
|
83
|
-
* `instance.ready` before rendering or mounting when it is lazy.
|
|
84
|
-
* `date`/`time` arguments use a fixed time zone (UTC unless configured).
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* ```ts
|
|
88
|
-
* export const appI18n = defineI18n({
|
|
89
|
-
* messages,
|
|
90
|
-
* loaders: { fr: () => import("./locales/fr.ts") },
|
|
91
|
-
* });
|
|
92
|
-
* // per request / client entry
|
|
93
|
-
* const i18n = appI18n.create({ locale: "fr" });
|
|
94
|
-
* await i18n.ready;
|
|
95
|
-
* app.use(i18n);
|
|
96
|
-
* // component
|
|
97
|
-
* const { t } = appI18n.use();
|
|
98
|
-
* t("cart", { count: 2 });
|
|
99
|
-
* ```
|
|
100
|
-
*
|
|
101
|
-
* @param options Catalogs, fallback, loaders, formats, and missing-key hook.
|
|
102
|
-
* @returns The i18n definition.
|
|
103
|
-
*/
|
|
104
32
|
function defineI18n(options) {
|
|
105
33
|
const key = Symbol("vize-i18n");
|
|
106
34
|
const eager = Object.keys(options.messages);
|
|
@@ -194,20 +122,6 @@ function defineI18n(options) {
|
|
|
194
122
|
use
|
|
195
123
|
};
|
|
196
124
|
}
|
|
197
|
-
/**
|
|
198
|
-
* Inject the i18n instance of a definition. Equivalent to
|
|
199
|
-
* `definition.use()`; must run inside `setup` (or `app.runWithContext`).
|
|
200
|
-
*
|
|
201
|
-
* @example
|
|
202
|
-
* ```ts
|
|
203
|
-
* const { t, setLocale } = useI18n(appI18n);
|
|
204
|
-
* ```
|
|
205
|
-
*
|
|
206
|
-
* @param definition Result of {@link defineI18n}.
|
|
207
|
-
* @throws `Error` tagged `VIZE_COMPOSE_I18N_NOT_PROVIDED` when no instance
|
|
208
|
-
* was provided.
|
|
209
|
-
* @returns The typed instance.
|
|
210
|
-
*/
|
|
211
125
|
function useI18n(definition) {
|
|
212
126
|
return definition.use();
|
|
213
127
|
}
|
package/dist/icu-message.mjs
CHANGED
|
@@ -11,24 +11,6 @@ const quoteStarters = new Set([
|
|
|
11
11
|
"#",
|
|
12
12
|
"|"
|
|
13
13
|
]);
|
|
14
|
-
/**
|
|
15
|
-
* Parse an ICU MessageFormat string into an AST.
|
|
16
|
-
*
|
|
17
|
-
* Supports simple arguments, `number`/`date`/`time` with an optional style,
|
|
18
|
-
* `plural` and `selectordinal` (with `offset:` and `=N` cases), `select`,
|
|
19
|
-
* nesting, `#` inside plural cases, and apostrophe quoting (`''` is a
|
|
20
|
-
* literal apostrophe; `'{…}'` is literal text). Pure and deterministic.
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```ts
|
|
24
|
-
* parseMessage("{n, plural, one {# item} other {# items}}");
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* @param message ICU message source.
|
|
28
|
-
* @throws {@link MessageSyntaxError} tagged `VIZE_COMPOSE_ICU_SYNTAX` for
|
|
29
|
-
* malformed messages, including a plural or select without an `other` case.
|
|
30
|
-
* @returns The parsed nodes.
|
|
31
|
-
*/
|
|
32
14
|
function parseMessage(message) {
|
|
33
15
|
let position = 0;
|
|
34
16
|
const skipSpace = () => {
|
|
@@ -199,30 +181,11 @@ function dateTimeOptions(kind, style, named) {
|
|
|
199
181
|
const value = resolved === "short" || resolved === "long" || resolved === "full" ? resolved : "medium";
|
|
200
182
|
return kind === "date" ? { dateStyle: value } : { timeStyle: value };
|
|
201
183
|
}
|
|
202
|
-
/** Stringify an argument value; plain objects use JSON rather than `[object Object]`. */
|
|
203
184
|
function stringify(value) {
|
|
204
185
|
if (typeof value === "string") return value;
|
|
205
186
|
if (typeof value === "bigint" || typeof value === "boolean" || typeof value === "symbol") return value.toString();
|
|
206
187
|
return typeof value === "function" ? "[function]" : JSON.stringify(value);
|
|
207
188
|
}
|
|
208
|
-
/**
|
|
209
|
-
* Create a caching formatter for one locale.
|
|
210
|
-
*
|
|
211
|
-
* Parsed messages and `Intl` formatters are cached inside the returned
|
|
212
|
-
* object only (no module state), so one formatter per request or per
|
|
213
|
-
* i18n instance keeps server rendering isolated.
|
|
214
|
-
*
|
|
215
|
-
* @example
|
|
216
|
-
* ```ts
|
|
217
|
-
* const formatter = createMessageFormatter("en");
|
|
218
|
-
* formatter.format("{n, plural, one {# file} other {# files}}", { n: 3 }); // "3 files"
|
|
219
|
-
* ```
|
|
220
|
-
*
|
|
221
|
-
* @param locale BCP 47 locale.
|
|
222
|
-
* @param options Time zone and named formats.
|
|
223
|
-
* @default options {}
|
|
224
|
-
* @returns The formatter.
|
|
225
|
-
*/
|
|
226
189
|
function createMessageFormatter(locale, options = {}) {
|
|
227
190
|
const timeZone = options.timeZone ?? "UTC";
|
|
228
191
|
const numberFormats = options.numberFormats ?? {};
|
|
@@ -315,27 +278,6 @@ function createMessageFormatter(locale, options = {}) {
|
|
|
315
278
|
}
|
|
316
279
|
};
|
|
317
280
|
}
|
|
318
|
-
/**
|
|
319
|
-
* Format one ICU message with typed parameters.
|
|
320
|
-
*
|
|
321
|
-
* Parameters are checked against the message literal at compile time via
|
|
322
|
-
* {@link MessageParams}. For repeated formatting prefer
|
|
323
|
-
* {@link createMessageFormatter}, which caches parsing and `Intl` objects.
|
|
324
|
-
* Deterministic: `date`/`time` arguments use `timeZone` (UTC by default).
|
|
325
|
-
*
|
|
326
|
-
* @example
|
|
327
|
-
* ```ts
|
|
328
|
-
* formatMessage("en", "Hello {name}!", { name: "Ada" }); // "Hello Ada!"
|
|
329
|
-
* ```
|
|
330
|
-
*
|
|
331
|
-
* @param locale BCP 47 locale.
|
|
332
|
-
* @param message ICU message.
|
|
333
|
-
* @param params Values for the message's arguments.
|
|
334
|
-
* @param options Time zone and named formats.
|
|
335
|
-
* @default options {}
|
|
336
|
-
* @throws {@link MessageSyntaxError} for malformed messages.
|
|
337
|
-
* @returns The formatted string.
|
|
338
|
-
*/
|
|
339
281
|
function formatMessage(locale, message, params, options = {}) {
|
|
340
282
|
return createMessageFormatter(locale, options).format(message, params);
|
|
341
283
|
}
|
package/dist/idle.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { tryOnScopeDispose } from "./scope.mjs";
|
|
2
2
|
import { hasInjectionContext, onMounted, readonly, ref, shallowRef, toValue, watch } from "vue";
|
|
3
3
|
//#region src/idle.ts
|
|
4
|
-
/** Default activity events. */
|
|
5
4
|
const DEFAULT_IDLE_EVENTS = [
|
|
6
5
|
"mousemove",
|
|
7
6
|
"mousedown",
|
|
@@ -16,21 +15,6 @@ const defaultScheduler = {
|
|
|
16
15
|
globalThis.clearTimeout(handle);
|
|
17
16
|
}
|
|
18
17
|
};
|
|
19
|
-
/**
|
|
20
|
-
* Detect user inactivity.
|
|
21
|
-
*
|
|
22
|
-
* Any configured activity event resets a single timer; when it fires, `idle`
|
|
23
|
-
* becomes `true` until the next activity. No timer runs during server
|
|
24
|
-
* rendering (`idle` is `initialState`, `lastActive` is `null`), so the
|
|
25
|
-
* output is hydration-stable. Listeners and the timer are released with the
|
|
26
|
-
* owning reactive scope.
|
|
27
|
-
*
|
|
28
|
-
* @param timeout Inactivity window in milliseconds.
|
|
29
|
-
* @param options Activity events, clock, scheduler, and window capability.
|
|
30
|
-
* @default timeout 60000
|
|
31
|
-
* @default options {}
|
|
32
|
-
* @returns Reactive idle flag, last activity time, and a reset action.
|
|
33
|
-
*/
|
|
34
18
|
function useIdle(timeout = 6e4, options = {}) {
|
|
35
19
|
const { events = DEFAULT_IDLE_EVENTS, listenForVisibilityChange = true, initialState = false, now = Date.now, scheduler = defaultScheduler } = options;
|
|
36
20
|
const idle = ref(initialState);
|
package/dist/index.d.mts
CHANGED
|
@@ -107,7 +107,7 @@ import { FetchAfterResponseContext, FetchBeforeRequestContext, FetchControls, Fe
|
|
|
107
107
|
import { FieldControls, FieldRule, FieldRuleContext, FieldRuleResult, FieldRuleSource, FieldValidationTrigger, UseFieldOptions, useField } from "./use-field.mjs";
|
|
108
108
|
import { FileDialogCapture, FileDialogControls, FileDialogHost, FileDialogSettings, FileInputLike, UseFileDialogOptions, useFileDialog } from "./use-file-dialog.mjs";
|
|
109
109
|
import { FilePickerAcceptTypeLike, FileSystemAccessControls, FileSystemAccessDataMap, FileSystemAccessDataType, FileSystemAccessHost, FileSystemAccessResult, FileSystemFileHandleLike, FileSystemWritableLike, OpenFilePickerOptionsLike, SaveFilePickerOptionsLike, UseFileSystemAccessOptions, useFileSystemAccess } from "./use-file-system-access.mjs";
|
|
110
|
-
import { FieldValidator, FieldValidatorContext, FormArrayEntry, FormArrayItem, FormArrayPath, FormControls, FormErrorRecord, FormErrors, FormFieldArrayControls, FormFieldControls, FormFieldValidators, FormLeaf, FormPath, FormPathValue, FormResult, FormValidationTrigger, FormValidator, SetFieldValueOptions, UseFormOptions, ValidatorResult, useForm } from "./use-form.mjs";
|
|
110
|
+
import { DirtyFields, DirtyNode, FieldValidator, FieldValidatorContext, FormArrayEntry, FormArrayItem, FormArrayPath, FormControls, FormCriteriaMode, FormErrorRecord, FormErrors, FormFieldArrayControls, FormFieldControls, FormFieldValidators, FormLeaf, FormPath, FormPathValue, FormResetOptions, FormResult, FormValidationTrigger, FormValidator, SetFieldValueOptions, UseFormOptions, ValidatorResult, useForm } from "./use-form.mjs";
|
|
111
111
|
import { FormErrorSummaryItem, FormFieldControlProps, FormFieldErrorEntry, FormFieldErrorVisibility, FormFieldLabelProps, FormFieldModelProps, FormFieldPropsControls, FormFieldTextProps, UseFormErrorSummaryFieldsOptions, UseFormFieldPropsOptions, formFieldId, toFormFieldErrors, useFormErrorSummaryFields, useFormFieldProps } from "./use-form-field-props.mjs";
|
|
112
112
|
import { FullscreenControls, FullscreenElementLike, FullscreenHost, FullscreenNavigationUI, UseFullscreenOptions, useFullscreen } from "./use-fullscreen.mjs";
|
|
113
113
|
import { ConnectedGamepad, GamepadAxisBinding, GamepadButtonBinding, GamepadButtonLike, GamepadButtonState, GamepadControls, GamepadHost, GamepadLike, GamepadMapping, GamepadSnapshot, GamepadVibrationActuatorLike, GamepadVibrationParams, MappedGamepad, UseGamepadOptions, mapGamepad, snapshotGamepad, standardGamepadAxes, standardGamepadButtons, useGamepad } from "./use-gamepad.mjs";
|
|
@@ -183,4 +183,4 @@ import { WatchThrottledOptions, watchThrottled } from "./watch-throttled.mjs";
|
|
|
183
183
|
import { Falsy, WheneverOptions, whenever } from "./whenever.mjs";
|
|
184
184
|
import { UseWindowSizeOptions, WindowSizeControls, WindowSizeHost, WindowSizeKind, useWindowSize } from "./window-size.mjs";
|
|
185
185
|
import { UseVisualViewportOptions, VirtualKeyboardHost, VisualViewportControls, VisualViewportHost, VisualViewportWindowHost, useVisualViewport } from "./use-visual-viewport.mjs";
|
|
186
|
-
export { ActiveElementHost, AnimatableCssProperty, AnimateControls, AnimateFrameHost, AnimationFrameHost, AnimationKeyframes, ArrayCallback, AsyncQueue, AsyncQueueContext, AsyncQueuePrevious, AsyncQueueTask, AsyncQueueTaskResult, AsyncQueueTaskState, AsyncQueueTasks, AsyncResource, AsyncResourceContext, AsyncResourceExecution, AsyncResourceStatus, AsyncState, AuthenticationCredentialLike, AuthenticationResponseJSON, AvailableCapability, BarcodeBoundingBox, BarcodeDetectorControls, BarcodeDetectorHost, BarcodeDetectorLike, BarcodeFormat, BarcodePoint, BasicColorMode, BatteryControls, BatteryHost, BatteryManagerLike, BluetoothCharacteristicLike, BluetoothControls, BluetoothDeviceFilter, BluetoothDeviceLike, BluetoothGATTServerLike, BluetoothHost, BluetoothNotificationStop, BluetoothRequestOptions, BluetoothServiceLike, BluetoothUUIDLike, BreakpointValue, Breakpoints, BreakpointsControls, BroadcastChannelConstructor, BroadcastChannelControls, BroadcastChannelErrorCode, BroadcastChannelFailure, BroadcastChannelHost, BroadcastChannelLike, BuiltinAiAvailability, BuiltinAiCreateMonitorOptions, BuiltinAiDownloadProgressEvent, BuiltinAiMonitorLike, BuiltinAiSessionControls, BuiltinAiStatus, BuiltinAiTextStream, COMPOSABLE_CATALOG, COOKIE_ADAPTER_KEY, CapabilityResult, CapabilitySource, CapabilityTarget, CapabilityUnavailableReason, CleanupRegistration, ClickOutsideHost, ClickOutsideIgnore, ClipboardControls, ClipboardFailure, ClipboardFailureReason, ClipboardHost, ClipboardItemLike, ClipboardLike, ClipboardResult, ClipboardSuccess, ColorModeControls, ColorModeStorage, ColorModeValue, ColorSchemePreference, type ComposableCatalog, type ComposableCategory, type ComposableCleanupOwner, type ComposableEntryMetadata, type ComposableHydrationBehavior, type ComposableInstallationAvailability, type ComposableRootEntryMetadata, type ComposableSsrBehavior, type ComposableStability, type ComposableUtilityMetadata, CompressOptions, CompressionFormatName, CompressionInput, CompressionStreamConstructor, CompressionStreamControls, CompressionTransformLike, ComputedAsyncCancel, ComputedAsyncContext, ComputedAsyncOptions, ComputedWithControl, ComputedWithControlOptions, ComputedWithControlSource, ConfirmDialog, ConfirmDialogPayload, ConfirmDialogResult, ConfirmDialogState, ConnectedGamepad, ContactAddressLike, ContactInfo, ContactPickerControls, ContactPickerResult, ContactProperty, ContactSelectOptions, ContactsManagerLike, ContrastPreference, CookieAdapter, CookieAttributes, CookieControls, CookieErrorCode, CookieFailure, CookieSameSite, CookieSerializer, CountdownControls, CounterControls, CreateDisposalScopeOptions, CreateEventHookOptions, CreateGlobalStateOptions, CreateI18nOptions, CreateInjectionStateOptions, CreateSharedComposableOptions, CssVarControls, CssVarHost, CssVarObserver, CssVarStyle, CssVarTarget, CubicBezierPoints, CustomSearchParam, CycleList, DEFAULT_IDLE_EVENTS, DEFAULT_KEY_ALIASES, DISPOSAL_ERROR_CODE, DataTransferItemLike, DataTransferLike, DateFormatInput, DateFormatToken, DateTimeFormatControls, DeadlineAbortSignalOptions, DebouncedControls, DecompressOptions, DefineI18nOptions, DetectedBarcode, DetectedBarcodeLike, DeviceMotionControls, DeviceMotionHost, DeviceOrientationControls, DeviceOrientationHost, DevicePixelRatioControls, DevicePixelRatioHost, DisplayMediaHost, DisplayNamesControls, DisplayNamesKind, DisposalError, DisposalScope, DocumentTitleControls, DocumentTitleHost, DocumentTitleRestore, DocumentTitleTemplate, DocumentVisibilityControls, DocumentVisibilityHost, DragAxis, DragBounds, DraggableControls, DropZoneAccept, DropZoneControls, DropZoneFileInfo, ElementBoundingControls, ElementBoundingHost, ElementBoundingRect, ElementByPointControls, ElementByPointFrameHost, ElementByPointHost, ElementRefControls, ElementRefSetter, ElementSize, ElementSizeControls, ElementTargetValue, ElementTimingEntryLike, ElementVisibilityControls, EventHook, EventHookListener, EventHookSubscription, EventListenerControls, EventSourceConstructorLike, EventSourceControls, EventSourceEventMap, EventSourceFailure, EventSourceLike, EventSourceMessage, EventSourceParseRequirement, EventSourceParsers, EventSourceReconnectOptions, EventSourceStatus, EventTimingEntryLike, EventTimingFieldsLike, EyeDropperColor, EyeDropperControls, EyeDropperHost, EyeDropperLike, EyeDropperResult, Falsy, FaviconControls, FaviconHost, FaviconLink, FetchAfterResponseContext, FetchBeforeRequestContext, FetchControls, FetchFailure, FetchImplementation, FetchRequest, FetchResponseType, FetchResponseTypeMap, FetchResult, FetchRetryOptions, FetchStatus, FieldControls, FieldRule, FieldRuleContext, FieldRuleResult, FieldRuleSource, FieldValidationTrigger, FieldValidator, FieldValidatorContext, FileDialogCapture, FileDialogControls, FileDialogHost, FileDialogSettings, FileInputLike, FilePickerAcceptTypeLike, FileSystemAccessControls, FileSystemAccessDataMap, FileSystemAccessDataType, FileSystemAccessHost, FileSystemAccessResult, FileSystemFileHandleLike, FileSystemWritableLike, FirstInputEntryLike, FocusControls, FocusWithinControls, FocusableElement, FormArrayEntry, FormArrayItem, FormArrayPath, FormControls, FormErrorRecord, FormErrorSummaryItem, FormErrors, FormFieldArrayControls, FormFieldControlProps, FormFieldControls, FormFieldErrorEntry, FormFieldErrorVisibility, FormFieldLabelProps, FormFieldModelProps, FormFieldPropsControls, FormFieldTextProps, FormFieldValidators, FormLeaf, FormPath, FormPathValue, FormResult, FormValidationTrigger, FormValidator, FormatDateOptions, FormatMessageOptions, FormatTimeAgoOptions, FormattableDate, FormattableNumber, FpsControls, FrameScheduler, FullscreenControls, FullscreenElementLike, FullscreenHost, FullscreenNavigationUI, GamepadAxisBinding, GamepadButtonBinding, GamepadButtonLike, GamepadButtonState, GamepadControls, GamepadHost, GamepadLike, GamepadMapping, GamepadSnapshot, GamepadVibrationActuatorLike, GamepadVibrationParams, GeolocationControls, GeolocationCoordinatesSnapshot, GeolocationHost, GeolocationUnavailableReason, HIDControls, HIDDeviceFilter, HIDDeviceInfo, HIDDeviceLike, HIDHost, HIDInputReport, HasNoParams, HistoryControls, I18n, I18nDefinition, IdGenerator, IdleCallbackHost, IdleControls, IdleDeadlineLike, IdleHost, IdleOptions, IdleSchedulingOptions, IgnorableWatchHandle, ImageControls, ImageHost, ImageLike, ImageLoadResult, ImageSource, ImageStatus, IndexedDBControls, IndexedDBDatabaseLike, IndexedDBErrorCode, IndexedDBFactoryLike, IndexedDBFailure, IndexedDBKeyval, IndexedDBKeyvalOptions, IndexedDBObjectStoreLike, IndexedDBRequestLike, IndexedDBTransactionLike, IndexedKeyframeValue, InferSearchParams, InferStandardSchemaInput, InferStandardSchemaOutput, InfiniteScrollControls, InfiniteScrollDirection, InjectionState, IntersectionObserverControls, IntersectionObserverHost, IntersectionRoot, IntervalControls, IntervalScheduler, KeyCombo, KeyFilter, KeyStrokeEventName, LanguageDetectionResult, LanguageDetectorControls, LanguageDetectorCreateOptions, LanguageDetectorHost, LanguageDetectorLike, LargestContentfulPaintEntryLike, LayoutShiftEntryLike, ListFormatControls, LocaleControls, LocaleLoader, LocaleMessages, LockManagerLike, LongAnimationFrameEntryLike, LongPressModifiers, LongPressRelease, LongTaskEntryLike, MIDIAccessLike, MIDIAccessStatus, MIDIHost, MIDIInputMessage, MIDIOutputLike, MIDIPortInfo, MIDIPortLike, MIDIRequestFlags, Machine, MachineConfig, MachineStateNode, MachineTransition, MagicKeys, MapControls, MappedGamepad, MarkEntryLike, MaybeElementTarget, MaybeElementTargets, MeasureEntryLike, MediaControls, MediaDeviceInfoLike, MediaElementLike, MediaQueryHost, MediaSourceCandidate, MediaStreamControls, MediaStreamErrorCode, MediaStreamFailure, MediaStreamLike, MediaStreamSource, MediaStreamStatus, MediaStreamTrackLike, MediaTextTrack, MemoizeCache, Memoized, MessageArgument, MessageArguments, MessageAt, MessageCatalogs, MessageFormatter, MessageKey, MessageKeysOf, MessageNode, MessageParams, MessageParamsFor, MessageShape, MessageSyntaxError, MessageSyntaxErrorCode, MessageTree, ModifierKeyName, MotionPermissionConstructor, MotionPermissionState, MotionPreference, MotionRotationRate, MotionVector, MouseControls, MouseCoordinateExtractor, MouseCoordinateType, MouseInElementControls, MouseSourceType, MutationObserverControls, MutationObserverHost, NaturallyOrdered, NavigateEventLike, NavigationApiControls, NavigationDestinationLike, NavigationEntryChange, NavigationEntrySnapshot, NavigationEventName, NavigationHistoryEntryLike, NavigationHistoryMode, NavigationHost, NavigationInterceptInit, NavigationInterceptOptions, NavigationNavigateOptions, NavigationOutcome, NavigationResultLike, NavigationTimingEntryLike, NavigationTransitionSnapshot, NavigationTypeName, NetworkConnectionType, NetworkControls, NetworkEffectiveType, NetworkHost, NetworkInformationLike, NormalizedSchemaIssue, NormalizedSchemaResult, NotificationHost, NotificationLike, NotificationOptionsLike, NotificationPermissionState, NowControls, NumberFormatControls, ObjectUrlHost, ObjectUrlSource, OffsetPagination, OffsetPaginationInfo, OnClickOutsideOptions, OnKeyStrokeOptions, OnLongPressOptions, OnStartTypingOptions, OpenFilePickerOptionsLike, OpenOnScreenOptions, PageVisibilityState, PaintEntryLike, PausableControls, PausableWatchHandle, PaymentAmount, PaymentCompletion, PaymentDetails, PaymentDetailsUpdate, PaymentLineItem, PaymentMethod, PaymentRequestControls, PaymentRequestHost, PaymentRequestLike, PaymentRequestOptionsInit, PaymentRequestState, PaymentResponseLike, PaymentShippingChange, PaymentShippingChangeHook, PaymentShippingOption, PaymentShippingType, PaymentShowResult, PerformanceEntryLike, PerformanceEntryType, PerformanceEntryTypeMap, PerformanceObserveInit, PerformanceObserverCallback, PerformanceObserverControls, PerformanceObserverEntryListLike, PerformanceObserverHost, PerformanceObserverLike, PermissionControls, PermissionDescriptorLike, PermissionQueryState, PermissionStatusLike, PermissionsHost, PersistentStorageControls, PictureInPictureDocumentLike, PinchControls, PinchSnapshot, PluralCategory, PluralMessage, PluralMessages, PluralRulesControls, Point, PointerControls, PointerKind, PointerLockControls, PointerLockError, PointerLockErrorCode, PointerLockHost, PointerState, PostTaskCallOptions, PreferredLanguagesHost, ProjectionDomain, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialDescriptorJSON, PublicKeyCredentialLike, PublicKeyCredentialRequestOptionsJSON, PublicKeyCredentialStatics, PushManagerLike, PushManagerSubscribeOptions, PushPermissionState, PushRegistrationLike, PushSubscribeOptions, PushSubscriptionControls, PushSubscriptionJsonLike, PushSubscriptionLike, PushSubscriptionSnapshot, QueryParser, QuerySerializer, QueueControls, QueueOverflowPolicy, RafFrame, RawQueryValue, Reactified, ReactifiedArguments, RefAutoResetOptions, RegistrationCredentialLike, RegistrationResponseJSON, RelativeTimeFormatControls, RelativeTimeFromOptions, RelativeTimeUnitSelection, RelativeTimeValue, RequestIdleCallbackControls, ReservedBreakpointName, ResizeObserverControls, ResizeObserverHost, ResolveMessageArguments, ResourceTimingEntryLike, ResourceTimingFieldsLike, RetryAsyncOptions, RetryAttemptContext, RetryDelayOptions, RetryFailureContext, RetryScheduledContext, RoundingMethod, RouteLocationLike, RouteParamsOf, RouteQueryRecord, SaveFilePickerOptionsLike, SchedulerHost, SchedulerPostTaskControls, SchedulerPostTaskInit, SchedulerTaskPriority, ScreenArea, ScreenDetailedLike, ScreenDetailsControls, ScreenDetailsHost, ScreenDetailsLike, ScreenDetailsResult, ScreenOrientationControls, ScreenOrientationHost, ScreenOrientationLike, ScreenOrientationLockType, ScreenSnapshot, ScriptTagControls, ScriptTagElement, ScriptTagHost, ScriptTagResult, ScriptTagStatus, ScrollControls, ScrollEdges, ScrollMetrics, ScrollOffset, ScrollTargetValue, ScrollWindowHost, SearchParamCodec, SearchParamSchema, SegmenterControls, SegmenterGranularity, SelectedContact, Selection, SerialChunk, SerialControls, SerialDecoding, SerialHost, SerialOpenOptions, SerialPortFilter, SerialPortLike, SerializeSearchParamsOptions, ServiceWorkerContainerLike, ServiceWorkerControls, ServiceWorkerLike, ServiceWorkerRegisterOptions, ServiceWorkerRegistrationLike, ServiceWorkerStateName, ServiceWorkerStates, SetControls, SetFieldValueOptions, ShareControls, ShareDataLike, ShareHost, ShareResult, SortComparator, SortedLocaleControls, SpeechRecognitionAlternativeLike, SpeechRecognitionControls, SpeechRecognitionErrorCode, SpeechRecognitionFailure, SpeechRecognitionHost, SpeechRecognitionLike, SpeechRecognitionResultLike, SpeechRecognitionResultListLike, SpeechSynthesisControls, SpeechSynthesisErrorCode, SpeechSynthesisHost, SpeechSynthesisLike, SpeechSynthesisStatus, SpeechSynthesisUtteranceLike, SpeechSynthesisVoiceLike, StackControls, StackOverflowPolicy, StandardSchemaFailure, StandardSchemaIssue, StandardSchemaPathSegment, StandardSchemaProps, StandardSchemaResult, StandardSchemaSuccess, StandardSchemaV1, StartTypingHost, StartViewTransitionArgument, StepValues, Stepper, StorageControls, StorageErrorCode, StorageEstimateControls, StorageEstimateLike, StorageFailure, StorageLike, StorageManagerLike, StorageSerializer, StorageSerializerKind, StorageValidator, StringQueryOptions, StyleTagControls, StyleTagElement, StyleTagHost, SummarizeCallOptions, SummarizerControls, SummarizerCreateOptions, SummarizerFormat, SummarizerHost, SummarizerLength, SummarizerLike, SummarizerType, SwipeCallbacks, SwipeControls, SwipeDirection, SyncRefBaseOptions, SyncRefDirection, SyncRefOptions, SyncRefTransform, TaskControllerHost, TaskControllerLike, TextDirection, TextSegment, TextSelectionControls, TextSelectionHost, TextTrackLike, TextTrackListLike, TextareaAutosizeControls, TextareaAutosizeStyleProperty, ThrottledControls, TimeAgoControls, TimeAgoInput, TimeAgoUnit, TimeRangesLike, TimedWatchHandle, TimeoutAbortSignalOptions, TimeoutControls, TimeoutFnControls, TimeoutScheduler, TimestampControls, ToggleControls, TransitionEasing, TransitionFrameHost, TransitionPresetName, TransitionPresets, TransitionTupleOutput, TransitionValue, TranslateArguments, TranslatorControls, TranslatorHost, TranslatorLanguages, TranslatorLike, TypedKeyframe, TypedPropertyIndexedKeyframes, USBControlTransferSetup, USBControls, USBDeviceFilter, USBDeviceInfo, USBDeviceLike, USBHost, USBInTransferResultLike, USBOutTransferResultLike, USBTransferStatus, UnavailableCapability, UntilChain, UntilMatchers, UntilNegatedMatchers, UntilOptions, UntilTimeoutCode, UntilTimeoutError, UrlHashControls, UrlHashHost, UrlHistoryMode, UrlSearchParamsControls, UrlSearchParamsHost, UseActiveElementOptions, UseAnimateOptions, UseAsyncQueueOptions, UseAsyncResourceOptions, UseAsyncStateOptions, UseBarcodeDetectorOptions, UseBatteryOptions, UseBluetoothOptions, UseBreakpointsOptions, UseBroadcastChannelOptions, UseClipboardOptions, UseColorModeOptions, UseCompressionStreamOptions, UseContactPickerOptions, UseCookieOptions, UseCountdownOptions, UseCounterOptions, UseCssVarOptions, UseCycleListOptions, UseDarkOptions, UseDateFormatOptions, UseDateTimeFormatOptions, UseDebouncedOptions, UseDeviceMotionOptions, UseDeviceOrientationOptions, UseDevicePixelRatioOptions, UseDisplayMediaOptions, UseDisplayNamesOptions, UseDocumentTitleOptions, UseDocumentVisibilityOptions, UseDraggableOptions, UseDropZoneOptions, UseElementBoundingOptions, UseElementByPointOptions, UseElementHoverOptions, UseElementSizeOptions, UseElementVisibilityOptions, UseEventListenerOptions, UseEventSourceOptions, UseEyeDropperOptions, UseFaviconOptions, UseFetchOptions, UseFieldOptions, UseFileDialogOptions, UseFileSystemAccessOptions, UseFocusOptions, UseFormErrorSummaryFieldsOptions, UseFormFieldPropsOptions, UseFormOptions, UseFpsOptions, UseFullscreenOptions, UseGamepadOptions, UseGeolocationOptions, UseHIDOptions, UseHistoryOptions, UseIdGeneratorOptions, UseIdleOptions, UseImageOptions, UseIndexedDBOptions, UseInfiniteScrollOptions, UseIntersectionObserverOptions, UseIntervalFnOptions, UseIntervalOptions, UseKeyboardTargetOptions, UseLanguageDetectorOptions, UseListFormatOptions, UseLocaleOptions, UseMagicKeysOptions, UseMediaControlsOptions, UseMediaQueryOptions, UseMediaStreamOptions, UseMemoizeOptions, UseMouseInElementOptions, UseMouseOptions, UseMutationObserverOptions, UseNavigationApiOptions, UseNetworkOptions, UseNowOptions, UseNumberFormatOptions, UseObjectUrlOptions, UseOffsetPaginationOptions, UsePageLeaveOptions, UsePaymentRequestOptions, UsePerformanceObserverOptions, UsePermissionOptions, UsePersistentStorageOptions, UsePinchOptions, UsePluralRulesOptions, UsePointerLockOptions, UsePointerOptions, UsePointerSwipeOptions, UsePreferenceOptions, UsePreferredLanguagesOptions, UseProjectionOptions, UsePushSubscriptionOptions, UseQueueOptions, UseRafFnOptions, UseRelativeTimeFormatOptions, UseRequestIdleCallbackOptions, UseResizeObserverOptions, UseRoundOptions, UseRouteQueryOptions, UseSchedulerPostTaskOptions, UseScreenDetailsOptions, UseScreenOrientationOptions, UseScriptTagOptions, UseScrollLockOptions, UseScrollOptions, UseSegmenterOptions, UseSelectionOptions, UseSerialOptions, UseServiceWorkerOptions, UseShareOptions, UseSortedLocaleOptions, UseSpeechRecognitionOptions, UseSpeechSynthesisOptions, UseStackOptions, UseStorageEstimateOptions, UseStorageOptions, UseStyleTagOptions, UseSummarizerOptions, UseSwipeOptions, UseTextSelectionOptions, UseTextareaAutosizeOptions, UseThrottledOptions, UseTimeAgoOptions, UseTimeoutFnOptions, UseTimeoutOptions, UseTimestampOptions, UseTransitionOptions, UseTranslatorOptions, UseTypedUrlHashOptions, UseUSBOptions, UseUrlHashOptions, UseUrlSearchParamsOptions, UseUserActivationOptions, UseUserMediaOptions, UseVModelOptions, UseVModelsOptions, UseVibrateOptions, UseViewTransitionOptions, UseVirtualListOptions, UseVisualViewportOptions, UseWakeLockOptions, UseWebAuthnOptions, UseWebLocksOptions, UseWebMIDIOptions, UseWebNotificationOptions, UseWebSocketOptions, UseWebVitalsOptions, UseWindowScrollOptions, UseWindowSizeOptions, UseWorkerFnOptions, UserActivationControls, UserActivationLike, UserMediaControls, UserMediaHost, VModelEmit, VModelValue, VModelsEmit, ValidateCatalogs, ValidatorResult, VibrateControls, VibrationHost, VibrationPattern, ViewTransitionControls, ViewTransitionDocumentHost, ViewTransitionLike, ViewTransitionStartOptions, VirtualContainerStyle, VirtualItemSize, VirtualKeyboardHost, VirtualListControls, VirtualListItem, VirtualListOrientation, VirtualWrapperStyle, VisualViewportControls, VisualViewportHost, VisualViewportWindowHost, WEB_VITALS_THRESHOLDS, WakeLockControls, WakeLockHost, WakeLockKind, WakeLockSentinelLike, WatchCleanupRegistrar, WatchDebouncedOptions, WatchHelperCallback, WatchOldValue, WatchOnceOptions, WatchPausableOptions, WatchSourceInput, WatchSourceValue, WatchSources, WatchThrottledOptions, WatchValue, WebAuthnAttestation, WebAuthnAuthenticatorAttachment, WebAuthnAuthenticatorSelection, WebAuthnCeremonyOptions, WebAuthnControls, WebAuthnCreationInit, WebAuthnCredentialDescriptor, WebAuthnCredentialParameter, WebAuthnCredentialsHost, WebAuthnHint, WebAuthnMediation, WebAuthnRelyingParty, WebAuthnRequestInit, WebAuthnResidentKey, WebAuthnResult, WebAuthnTransport, WebAuthnUserVerification, WebLockAttempt, WebLockInfo, WebLockLike, WebLockManagerRequestOptions, WebLockMode, WebLockRequest, WebLockRequestOptions, WebLocksControls, WebLocksSnapshot, WebMIDIControls, WebNotificationControls, WebNotificationDefaults, WebNotificationEvent, WebNotificationResult, WebSocketCodecRequirements, WebSocketConstructorLike, WebSocketControls, WebSocketFailure, WebSocketHeartbeatOptions, WebSocketLike, WebSocketRawData, WebSocketReconnectOptions, WebSocketSendData, WebSocketStatus, WebVitalMetric, WebVitalName, WebVitalRating, WebVitalsControls, WebVitalsDocumentEvent, WebVitalsDocumentHost, WebVitalsRecord, WellKnownPermissionName, WheneverOptions, WindowPlacement, WindowPlacementOptions, WindowSizeControls, WindowSizeHost, WindowSizeKind, WorkerConstructorLike, WorkerFnControls, WorkerFnErrorCode, WorkerFnHost, WorkerFnStatus, WorkerLike, anyAbortSignal, availableCapability, breakpointsBootstrapV5, breakpointsTailwind, calculateRetryDelay, compress, computedAsync, computedWithControl, createDisposalScope, createEventHook, createGlobalState, createIndexedDBKeyval, createInjectionState, createMessageFormatter, createSharedComposable, createWorkerFnScript, cubicBezier, deadlineAbortSignal, decodeBase64Url, decompress, decompressText, defineI18n, defineLocale, defineMessages, encodeBase64Url, formFieldId, formatDate, formatMessage, formatSchemaPath, formatTimeAgo, idle, inferStorageSerializerKind, isCapabilityAvailable, isCapabilityUnavailable, isElementNode, isStandardSchema, isTypingKeystroke, mapGamepad, matchesAccept, normalizeKeyName, onClickOutside, onKeyDown, onKeyStroke, onKeyUp, onLongPress, onStartTyping, oneOf, parseCookieHeader, parseCreationOptionsFromJSON, parseMessage, parseRequestOptionsFromJSON, parseSearchParams, placeWindow, provideCookieAdapter, queryParsers, rateMetric, reactify, refAutoReset, refDebounced, refDefault, requestMotionPermission, resolveElement, resolveElements, retryAsync, searchParam, selectRelativeTimeUnit, serializeAuthenticationCredential, serializeCookie, serializeRegistrationCredential, serializeSearchParams, snapshotGamepad, snapshotScreen, standardGamepadAxes, standardGamepadButtons, storageSerializers, swipeDirection, syncRef, timeoutAbortSignal, toFormFieldErrors, toPixels, toPointerKind, toReactive, tryOnScopeDispose, unavailableCapability, until, useActiveElement, useAnimate, useArrayEvery, useArrayFilter, useArrayFind, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useAsyncQueue, useAsyncResource, useAsyncState, useBarcodeDetector, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useClamp, useClipboard, useColorMode, useCompressionStream, useConfirmDialog, useContactPicker, useCookie, useCountdown, useCounter, useCssVar, useCycleList, useDark, useDateFormat, useDateTimeFormat, useDebounced, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDisplayMedia, useDisplayNames, useDocumentTitle, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementRef, useElementSize, useElementVisibility, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useField, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useForm, useFormErrorSummaryFields, useFormFieldProps, useFps, useFullscreen, useGamepad, useGeolocation, useHID, useHistory, useI18n, useIdGenerator, useIdle, useImage, useIndexedDB, useInfiniteScroll, useIntersectionObserver, useInterval, useIntervalFn, useKeyPressed, useLanguageDetector, useListFormat, useLocalStorage, useLocale, useMachine, useMagicKeys, useMap, useMediaControls, useMediaQuery, useMediaStream, useMemoize, useMounted, useMouse, useMouseInElement, useMutationObserver, useNavigationApi, useNetwork, useNow, useNumberFormat, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParentElement, usePaymentRequest, usePerformanceObserver, usePermission, usePersistentStorage, usePinch, usePluralRules, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedTransparency, usePrevious, useProjection, usePushSubscription, useQueue, useRafFn, useReducedMotion, useRelativeTimeFormat, useRequestIdleCallback, useResizeObserver, useRound, useRouteParams, useRouteQuery, useSchedulerPostTask, useScreenDetails, useScreenOrientation, useScriptTag, useScroll, useScrollLock, useSegmenter, useSelection, useSerial, useServiceWorker, useSessionStorage, useSet, useShare, useSorted, useSortedLocale, useSpeechRecognition, useSpeechSynthesis, useStack, useStepper, useStorage, useStorageEstimate, useStyleTag, useSummarizer, useSupported, useSwipe, useTextSelection, useTextareaAutosize, useThrottled, useTimeAgo, useTimeout, useTimeoutFn, useTimestamp, useToggle, useTransition, useTranslator, useUSB, useUrlHash, useUrlSearchParams, useUserActivation, useUserMedia, useVModel, useVModels, useVibrate, useViewTransition, useVirtualList, useVisualViewport, useWakeLock, useWebAuthn, useWebLocks, useWebMIDI, useWebNotification, useWebSocket, useWebVitals, useWindowScroll, useWindowSize, useWorkerFn, validateStandardSchema, watchDebounced, watchIgnorable, watchOnce, watchPausable, watchThrottled, whenever };
|
|
186
|
+
export { ActiveElementHost, AnimatableCssProperty, AnimateControls, AnimateFrameHost, AnimationFrameHost, AnimationKeyframes, ArrayCallback, AsyncQueue, AsyncQueueContext, AsyncQueuePrevious, AsyncQueueTask, AsyncQueueTaskResult, AsyncQueueTaskState, AsyncQueueTasks, AsyncResource, AsyncResourceContext, AsyncResourceExecution, AsyncResourceStatus, AsyncState, AuthenticationCredentialLike, AuthenticationResponseJSON, AvailableCapability, BarcodeBoundingBox, BarcodeDetectorControls, BarcodeDetectorHost, BarcodeDetectorLike, BarcodeFormat, BarcodePoint, BasicColorMode, BatteryControls, BatteryHost, BatteryManagerLike, BluetoothCharacteristicLike, BluetoothControls, BluetoothDeviceFilter, BluetoothDeviceLike, BluetoothGATTServerLike, BluetoothHost, BluetoothNotificationStop, BluetoothRequestOptions, BluetoothServiceLike, BluetoothUUIDLike, BreakpointValue, Breakpoints, BreakpointsControls, BroadcastChannelConstructor, BroadcastChannelControls, BroadcastChannelErrorCode, BroadcastChannelFailure, BroadcastChannelHost, BroadcastChannelLike, BuiltinAiAvailability, BuiltinAiCreateMonitorOptions, BuiltinAiDownloadProgressEvent, BuiltinAiMonitorLike, BuiltinAiSessionControls, BuiltinAiStatus, BuiltinAiTextStream, COMPOSABLE_CATALOG, COOKIE_ADAPTER_KEY, CapabilityResult, CapabilitySource, CapabilityTarget, CapabilityUnavailableReason, CleanupRegistration, ClickOutsideHost, ClickOutsideIgnore, ClipboardControls, ClipboardFailure, ClipboardFailureReason, ClipboardHost, ClipboardItemLike, ClipboardLike, ClipboardResult, ClipboardSuccess, ColorModeControls, ColorModeStorage, ColorModeValue, ColorSchemePreference, type ComposableCatalog, type ComposableCategory, type ComposableCleanupOwner, type ComposableEntryMetadata, type ComposableHydrationBehavior, type ComposableInstallationAvailability, type ComposableRootEntryMetadata, type ComposableSsrBehavior, type ComposableStability, type ComposableUtilityMetadata, CompressOptions, CompressionFormatName, CompressionInput, CompressionStreamConstructor, CompressionStreamControls, CompressionTransformLike, ComputedAsyncCancel, ComputedAsyncContext, ComputedAsyncOptions, ComputedWithControl, ComputedWithControlOptions, ComputedWithControlSource, ConfirmDialog, ConfirmDialogPayload, ConfirmDialogResult, ConfirmDialogState, ConnectedGamepad, ContactAddressLike, ContactInfo, ContactPickerControls, ContactPickerResult, ContactProperty, ContactSelectOptions, ContactsManagerLike, ContrastPreference, CookieAdapter, CookieAttributes, CookieControls, CookieErrorCode, CookieFailure, CookieSameSite, CookieSerializer, CountdownControls, CounterControls, CreateDisposalScopeOptions, CreateEventHookOptions, CreateGlobalStateOptions, CreateI18nOptions, CreateInjectionStateOptions, CreateSharedComposableOptions, CssVarControls, CssVarHost, CssVarObserver, CssVarStyle, CssVarTarget, CubicBezierPoints, CustomSearchParam, CycleList, DEFAULT_IDLE_EVENTS, DEFAULT_KEY_ALIASES, DISPOSAL_ERROR_CODE, DataTransferItemLike, DataTransferLike, DateFormatInput, DateFormatToken, DateTimeFormatControls, DeadlineAbortSignalOptions, DebouncedControls, DecompressOptions, DefineI18nOptions, DetectedBarcode, DetectedBarcodeLike, DeviceMotionControls, DeviceMotionHost, DeviceOrientationControls, DeviceOrientationHost, DevicePixelRatioControls, DevicePixelRatioHost, type DirtyFields, type DirtyNode, DisplayMediaHost, DisplayNamesControls, DisplayNamesKind, DisposalError, DisposalScope, DocumentTitleControls, DocumentTitleHost, DocumentTitleRestore, DocumentTitleTemplate, DocumentVisibilityControls, DocumentVisibilityHost, DragAxis, DragBounds, DraggableControls, DropZoneAccept, DropZoneControls, DropZoneFileInfo, ElementBoundingControls, ElementBoundingHost, ElementBoundingRect, ElementByPointControls, ElementByPointFrameHost, ElementByPointHost, ElementRefControls, ElementRefSetter, ElementSize, ElementSizeControls, ElementTargetValue, ElementTimingEntryLike, ElementVisibilityControls, EventHook, EventHookListener, EventHookSubscription, EventListenerControls, EventSourceConstructorLike, EventSourceControls, EventSourceEventMap, EventSourceFailure, EventSourceLike, EventSourceMessage, EventSourceParseRequirement, EventSourceParsers, EventSourceReconnectOptions, EventSourceStatus, EventTimingEntryLike, EventTimingFieldsLike, EyeDropperColor, EyeDropperControls, EyeDropperHost, EyeDropperLike, EyeDropperResult, Falsy, FaviconControls, FaviconHost, FaviconLink, FetchAfterResponseContext, FetchBeforeRequestContext, FetchControls, FetchFailure, FetchImplementation, FetchRequest, FetchResponseType, FetchResponseTypeMap, FetchResult, FetchRetryOptions, FetchStatus, FieldControls, FieldRule, FieldRuleContext, FieldRuleResult, FieldRuleSource, FieldValidationTrigger, type FieldValidator, type FieldValidatorContext, FileDialogCapture, FileDialogControls, FileDialogHost, FileDialogSettings, FileInputLike, FilePickerAcceptTypeLike, FileSystemAccessControls, FileSystemAccessDataMap, FileSystemAccessDataType, FileSystemAccessHost, FileSystemAccessResult, FileSystemFileHandleLike, FileSystemWritableLike, FirstInputEntryLike, FocusControls, FocusWithinControls, FocusableElement, type FormArrayEntry, type FormArrayItem, type FormArrayPath, type FormControls, type FormCriteriaMode, type FormErrorRecord, FormErrorSummaryItem, type FormErrors, type FormFieldArrayControls, FormFieldControlProps, type FormFieldControls, FormFieldErrorEntry, FormFieldErrorVisibility, FormFieldLabelProps, FormFieldModelProps, FormFieldPropsControls, FormFieldTextProps, type FormFieldValidators, type FormLeaf, type FormPath, type FormPathValue, type FormResetOptions, type FormResult, type FormValidationTrigger, type FormValidator, FormatDateOptions, FormatMessageOptions, FormatTimeAgoOptions, FormattableDate, FormattableNumber, FpsControls, FrameScheduler, FullscreenControls, FullscreenElementLike, FullscreenHost, FullscreenNavigationUI, GamepadAxisBinding, GamepadButtonBinding, GamepadButtonLike, GamepadButtonState, GamepadControls, GamepadHost, GamepadLike, GamepadMapping, GamepadSnapshot, GamepadVibrationActuatorLike, GamepadVibrationParams, GeolocationControls, GeolocationCoordinatesSnapshot, GeolocationHost, GeolocationUnavailableReason, HIDControls, HIDDeviceFilter, HIDDeviceInfo, HIDDeviceLike, HIDHost, HIDInputReport, HasNoParams, HistoryControls, I18n, I18nDefinition, IdGenerator, IdleCallbackHost, IdleControls, IdleDeadlineLike, IdleHost, IdleOptions, IdleSchedulingOptions, IgnorableWatchHandle, ImageControls, ImageHost, ImageLike, ImageLoadResult, ImageSource, ImageStatus, IndexedDBControls, IndexedDBDatabaseLike, IndexedDBErrorCode, IndexedDBFactoryLike, IndexedDBFailure, IndexedDBKeyval, IndexedDBKeyvalOptions, IndexedDBObjectStoreLike, IndexedDBRequestLike, IndexedDBTransactionLike, IndexedKeyframeValue, InferSearchParams, InferStandardSchemaInput, InferStandardSchemaOutput, InfiniteScrollControls, InfiniteScrollDirection, InjectionState, IntersectionObserverControls, IntersectionObserverHost, IntersectionRoot, IntervalControls, IntervalScheduler, KeyCombo, KeyFilter, KeyStrokeEventName, LanguageDetectionResult, LanguageDetectorControls, LanguageDetectorCreateOptions, LanguageDetectorHost, LanguageDetectorLike, LargestContentfulPaintEntryLike, LayoutShiftEntryLike, ListFormatControls, LocaleControls, LocaleLoader, LocaleMessages, LockManagerLike, LongAnimationFrameEntryLike, LongPressModifiers, LongPressRelease, LongTaskEntryLike, MIDIAccessLike, MIDIAccessStatus, MIDIHost, MIDIInputMessage, MIDIOutputLike, MIDIPortInfo, MIDIPortLike, MIDIRequestFlags, Machine, MachineConfig, MachineStateNode, MachineTransition, MagicKeys, MapControls, MappedGamepad, MarkEntryLike, MaybeElementTarget, MaybeElementTargets, MeasureEntryLike, MediaControls, MediaDeviceInfoLike, MediaElementLike, MediaQueryHost, MediaSourceCandidate, MediaStreamControls, MediaStreamErrorCode, MediaStreamFailure, MediaStreamLike, MediaStreamSource, MediaStreamStatus, MediaStreamTrackLike, MediaTextTrack, MemoizeCache, Memoized, MessageArgument, MessageArguments, MessageAt, MessageCatalogs, MessageFormatter, MessageKey, MessageKeysOf, MessageNode, MessageParams, MessageParamsFor, MessageShape, MessageSyntaxError, MessageSyntaxErrorCode, MessageTree, ModifierKeyName, MotionPermissionConstructor, MotionPermissionState, MotionPreference, MotionRotationRate, MotionVector, MouseControls, MouseCoordinateExtractor, MouseCoordinateType, MouseInElementControls, MouseSourceType, MutationObserverControls, MutationObserverHost, NaturallyOrdered, NavigateEventLike, NavigationApiControls, NavigationDestinationLike, NavigationEntryChange, NavigationEntrySnapshot, NavigationEventName, NavigationHistoryEntryLike, NavigationHistoryMode, NavigationHost, NavigationInterceptInit, NavigationInterceptOptions, NavigationNavigateOptions, NavigationOutcome, NavigationResultLike, NavigationTimingEntryLike, NavigationTransitionSnapshot, NavigationTypeName, NetworkConnectionType, NetworkControls, NetworkEffectiveType, NetworkHost, NetworkInformationLike, NormalizedSchemaIssue, NormalizedSchemaResult, NotificationHost, NotificationLike, NotificationOptionsLike, NotificationPermissionState, NowControls, NumberFormatControls, ObjectUrlHost, ObjectUrlSource, OffsetPagination, OffsetPaginationInfo, OnClickOutsideOptions, OnKeyStrokeOptions, OnLongPressOptions, OnStartTypingOptions, OpenFilePickerOptionsLike, OpenOnScreenOptions, PageVisibilityState, PaintEntryLike, PausableControls, PausableWatchHandle, PaymentAmount, PaymentCompletion, PaymentDetails, PaymentDetailsUpdate, PaymentLineItem, PaymentMethod, PaymentRequestControls, PaymentRequestHost, PaymentRequestLike, PaymentRequestOptionsInit, PaymentRequestState, PaymentResponseLike, PaymentShippingChange, PaymentShippingChangeHook, PaymentShippingOption, PaymentShippingType, PaymentShowResult, PerformanceEntryLike, PerformanceEntryType, PerformanceEntryTypeMap, PerformanceObserveInit, PerformanceObserverCallback, PerformanceObserverControls, PerformanceObserverEntryListLike, PerformanceObserverHost, PerformanceObserverLike, PermissionControls, PermissionDescriptorLike, PermissionQueryState, PermissionStatusLike, PermissionsHost, PersistentStorageControls, PictureInPictureDocumentLike, PinchControls, PinchSnapshot, PluralCategory, PluralMessage, PluralMessages, PluralRulesControls, Point, PointerControls, PointerKind, PointerLockControls, PointerLockError, PointerLockErrorCode, PointerLockHost, PointerState, PostTaskCallOptions, PreferredLanguagesHost, ProjectionDomain, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialDescriptorJSON, PublicKeyCredentialLike, PublicKeyCredentialRequestOptionsJSON, PublicKeyCredentialStatics, PushManagerLike, PushManagerSubscribeOptions, PushPermissionState, PushRegistrationLike, PushSubscribeOptions, PushSubscriptionControls, PushSubscriptionJsonLike, PushSubscriptionLike, PushSubscriptionSnapshot, QueryParser, QuerySerializer, QueueControls, QueueOverflowPolicy, RafFrame, RawQueryValue, Reactified, ReactifiedArguments, RefAutoResetOptions, RegistrationCredentialLike, RegistrationResponseJSON, RelativeTimeFormatControls, RelativeTimeFromOptions, RelativeTimeUnitSelection, RelativeTimeValue, RequestIdleCallbackControls, ReservedBreakpointName, ResizeObserverControls, ResizeObserverHost, ResolveMessageArguments, ResourceTimingEntryLike, ResourceTimingFieldsLike, RetryAsyncOptions, RetryAttemptContext, RetryDelayOptions, RetryFailureContext, RetryScheduledContext, RoundingMethod, RouteLocationLike, RouteParamsOf, RouteQueryRecord, SaveFilePickerOptionsLike, SchedulerHost, SchedulerPostTaskControls, SchedulerPostTaskInit, SchedulerTaskPriority, ScreenArea, ScreenDetailedLike, ScreenDetailsControls, ScreenDetailsHost, ScreenDetailsLike, ScreenDetailsResult, ScreenOrientationControls, ScreenOrientationHost, ScreenOrientationLike, ScreenOrientationLockType, ScreenSnapshot, ScriptTagControls, ScriptTagElement, ScriptTagHost, ScriptTagResult, ScriptTagStatus, ScrollControls, ScrollEdges, ScrollMetrics, ScrollOffset, ScrollTargetValue, ScrollWindowHost, SearchParamCodec, SearchParamSchema, SegmenterControls, SegmenterGranularity, SelectedContact, Selection, SerialChunk, SerialControls, SerialDecoding, SerialHost, SerialOpenOptions, SerialPortFilter, SerialPortLike, SerializeSearchParamsOptions, ServiceWorkerContainerLike, ServiceWorkerControls, ServiceWorkerLike, ServiceWorkerRegisterOptions, ServiceWorkerRegistrationLike, ServiceWorkerStateName, ServiceWorkerStates, SetControls, type SetFieldValueOptions, ShareControls, ShareDataLike, ShareHost, ShareResult, SortComparator, SortedLocaleControls, SpeechRecognitionAlternativeLike, SpeechRecognitionControls, SpeechRecognitionErrorCode, SpeechRecognitionFailure, SpeechRecognitionHost, SpeechRecognitionLike, SpeechRecognitionResultLike, SpeechRecognitionResultListLike, SpeechSynthesisControls, SpeechSynthesisErrorCode, SpeechSynthesisHost, SpeechSynthesisLike, SpeechSynthesisStatus, SpeechSynthesisUtteranceLike, SpeechSynthesisVoiceLike, StackControls, StackOverflowPolicy, StandardSchemaFailure, StandardSchemaIssue, StandardSchemaPathSegment, StandardSchemaProps, StandardSchemaResult, StandardSchemaSuccess, StandardSchemaV1, StartTypingHost, StartViewTransitionArgument, StepValues, Stepper, StorageControls, StorageErrorCode, StorageEstimateControls, StorageEstimateLike, StorageFailure, StorageLike, StorageManagerLike, StorageSerializer, StorageSerializerKind, StorageValidator, StringQueryOptions, StyleTagControls, StyleTagElement, StyleTagHost, SummarizeCallOptions, SummarizerControls, SummarizerCreateOptions, SummarizerFormat, SummarizerHost, SummarizerLength, SummarizerLike, SummarizerType, SwipeCallbacks, SwipeControls, SwipeDirection, SyncRefBaseOptions, SyncRefDirection, SyncRefOptions, SyncRefTransform, TaskControllerHost, TaskControllerLike, TextDirection, TextSegment, TextSelectionControls, TextSelectionHost, TextTrackLike, TextTrackListLike, TextareaAutosizeControls, TextareaAutosizeStyleProperty, ThrottledControls, TimeAgoControls, TimeAgoInput, TimeAgoUnit, TimeRangesLike, TimedWatchHandle, TimeoutAbortSignalOptions, TimeoutControls, TimeoutFnControls, TimeoutScheduler, TimestampControls, ToggleControls, TransitionEasing, TransitionFrameHost, TransitionPresetName, TransitionPresets, TransitionTupleOutput, TransitionValue, TranslateArguments, TranslatorControls, TranslatorHost, TranslatorLanguages, TranslatorLike, TypedKeyframe, TypedPropertyIndexedKeyframes, USBControlTransferSetup, USBControls, USBDeviceFilter, USBDeviceInfo, USBDeviceLike, USBHost, USBInTransferResultLike, USBOutTransferResultLike, USBTransferStatus, UnavailableCapability, UntilChain, UntilMatchers, UntilNegatedMatchers, UntilOptions, UntilTimeoutCode, UntilTimeoutError, UrlHashControls, UrlHashHost, UrlHistoryMode, UrlSearchParamsControls, UrlSearchParamsHost, UseActiveElementOptions, UseAnimateOptions, UseAsyncQueueOptions, UseAsyncResourceOptions, UseAsyncStateOptions, UseBarcodeDetectorOptions, UseBatteryOptions, UseBluetoothOptions, UseBreakpointsOptions, UseBroadcastChannelOptions, UseClipboardOptions, UseColorModeOptions, UseCompressionStreamOptions, UseContactPickerOptions, UseCookieOptions, UseCountdownOptions, UseCounterOptions, UseCssVarOptions, UseCycleListOptions, UseDarkOptions, UseDateFormatOptions, UseDateTimeFormatOptions, UseDebouncedOptions, UseDeviceMotionOptions, UseDeviceOrientationOptions, UseDevicePixelRatioOptions, UseDisplayMediaOptions, UseDisplayNamesOptions, UseDocumentTitleOptions, UseDocumentVisibilityOptions, UseDraggableOptions, UseDropZoneOptions, UseElementBoundingOptions, UseElementByPointOptions, UseElementHoverOptions, UseElementSizeOptions, UseElementVisibilityOptions, UseEventListenerOptions, UseEventSourceOptions, UseEyeDropperOptions, UseFaviconOptions, UseFetchOptions, UseFieldOptions, UseFileDialogOptions, UseFileSystemAccessOptions, UseFocusOptions, UseFormErrorSummaryFieldsOptions, UseFormFieldPropsOptions, type UseFormOptions, UseFpsOptions, UseFullscreenOptions, UseGamepadOptions, UseGeolocationOptions, UseHIDOptions, UseHistoryOptions, UseIdGeneratorOptions, UseIdleOptions, UseImageOptions, UseIndexedDBOptions, UseInfiniteScrollOptions, UseIntersectionObserverOptions, UseIntervalFnOptions, UseIntervalOptions, UseKeyboardTargetOptions, UseLanguageDetectorOptions, UseListFormatOptions, UseLocaleOptions, UseMagicKeysOptions, UseMediaControlsOptions, UseMediaQueryOptions, UseMediaStreamOptions, UseMemoizeOptions, UseMouseInElementOptions, UseMouseOptions, UseMutationObserverOptions, UseNavigationApiOptions, UseNetworkOptions, UseNowOptions, UseNumberFormatOptions, UseObjectUrlOptions, UseOffsetPaginationOptions, UsePageLeaveOptions, UsePaymentRequestOptions, UsePerformanceObserverOptions, UsePermissionOptions, UsePersistentStorageOptions, UsePinchOptions, UsePluralRulesOptions, UsePointerLockOptions, UsePointerOptions, UsePointerSwipeOptions, UsePreferenceOptions, UsePreferredLanguagesOptions, UseProjectionOptions, UsePushSubscriptionOptions, UseQueueOptions, UseRafFnOptions, UseRelativeTimeFormatOptions, UseRequestIdleCallbackOptions, UseResizeObserverOptions, UseRoundOptions, UseRouteQueryOptions, UseSchedulerPostTaskOptions, UseScreenDetailsOptions, UseScreenOrientationOptions, UseScriptTagOptions, UseScrollLockOptions, UseScrollOptions, UseSegmenterOptions, UseSelectionOptions, UseSerialOptions, UseServiceWorkerOptions, UseShareOptions, UseSortedLocaleOptions, UseSpeechRecognitionOptions, UseSpeechSynthesisOptions, UseStackOptions, UseStorageEstimateOptions, UseStorageOptions, UseStyleTagOptions, UseSummarizerOptions, UseSwipeOptions, UseTextSelectionOptions, UseTextareaAutosizeOptions, UseThrottledOptions, UseTimeAgoOptions, UseTimeoutFnOptions, UseTimeoutOptions, UseTimestampOptions, UseTransitionOptions, UseTranslatorOptions, UseTypedUrlHashOptions, UseUSBOptions, UseUrlHashOptions, UseUrlSearchParamsOptions, UseUserActivationOptions, UseUserMediaOptions, UseVModelOptions, UseVModelsOptions, UseVibrateOptions, UseViewTransitionOptions, UseVirtualListOptions, UseVisualViewportOptions, UseWakeLockOptions, UseWebAuthnOptions, UseWebLocksOptions, UseWebMIDIOptions, UseWebNotificationOptions, UseWebSocketOptions, UseWebVitalsOptions, UseWindowScrollOptions, UseWindowSizeOptions, UseWorkerFnOptions, UserActivationControls, UserActivationLike, UserMediaControls, UserMediaHost, VModelEmit, VModelValue, VModelsEmit, ValidateCatalogs, type ValidatorResult, VibrateControls, VibrationHost, VibrationPattern, ViewTransitionControls, ViewTransitionDocumentHost, ViewTransitionLike, ViewTransitionStartOptions, VirtualContainerStyle, VirtualItemSize, VirtualKeyboardHost, VirtualListControls, VirtualListItem, VirtualListOrientation, VirtualWrapperStyle, VisualViewportControls, VisualViewportHost, VisualViewportWindowHost, WEB_VITALS_THRESHOLDS, WakeLockControls, WakeLockHost, WakeLockKind, WakeLockSentinelLike, WatchCleanupRegistrar, WatchDebouncedOptions, WatchHelperCallback, WatchOldValue, WatchOnceOptions, WatchPausableOptions, WatchSourceInput, WatchSourceValue, WatchSources, WatchThrottledOptions, WatchValue, WebAuthnAttestation, WebAuthnAuthenticatorAttachment, WebAuthnAuthenticatorSelection, WebAuthnCeremonyOptions, WebAuthnControls, WebAuthnCreationInit, WebAuthnCredentialDescriptor, WebAuthnCredentialParameter, WebAuthnCredentialsHost, WebAuthnHint, WebAuthnMediation, WebAuthnRelyingParty, WebAuthnRequestInit, WebAuthnResidentKey, WebAuthnResult, WebAuthnTransport, WebAuthnUserVerification, WebLockAttempt, WebLockInfo, WebLockLike, WebLockManagerRequestOptions, WebLockMode, WebLockRequest, WebLockRequestOptions, WebLocksControls, WebLocksSnapshot, WebMIDIControls, WebNotificationControls, WebNotificationDefaults, WebNotificationEvent, WebNotificationResult, WebSocketCodecRequirements, WebSocketConstructorLike, WebSocketControls, WebSocketFailure, WebSocketHeartbeatOptions, WebSocketLike, WebSocketRawData, WebSocketReconnectOptions, WebSocketSendData, WebSocketStatus, WebVitalMetric, WebVitalName, WebVitalRating, WebVitalsControls, WebVitalsDocumentEvent, WebVitalsDocumentHost, WebVitalsRecord, WellKnownPermissionName, WheneverOptions, WindowPlacement, WindowPlacementOptions, WindowSizeControls, WindowSizeHost, WindowSizeKind, WorkerConstructorLike, WorkerFnControls, WorkerFnErrorCode, WorkerFnHost, WorkerFnStatus, WorkerLike, anyAbortSignal, availableCapability, breakpointsBootstrapV5, breakpointsTailwind, calculateRetryDelay, compress, computedAsync, computedWithControl, createDisposalScope, createEventHook, createGlobalState, createIndexedDBKeyval, createInjectionState, createMessageFormatter, createSharedComposable, createWorkerFnScript, cubicBezier, deadlineAbortSignal, decodeBase64Url, decompress, decompressText, defineI18n, defineLocale, defineMessages, encodeBase64Url, formFieldId, formatDate, formatMessage, formatSchemaPath, formatTimeAgo, idle, inferStorageSerializerKind, isCapabilityAvailable, isCapabilityUnavailable, isElementNode, isStandardSchema, isTypingKeystroke, mapGamepad, matchesAccept, normalizeKeyName, onClickOutside, onKeyDown, onKeyStroke, onKeyUp, onLongPress, onStartTyping, oneOf, parseCookieHeader, parseCreationOptionsFromJSON, parseMessage, parseRequestOptionsFromJSON, parseSearchParams, placeWindow, provideCookieAdapter, queryParsers, rateMetric, reactify, refAutoReset, refDebounced, refDefault, requestMotionPermission, resolveElement, resolveElements, retryAsync, searchParam, selectRelativeTimeUnit, serializeAuthenticationCredential, serializeCookie, serializeRegistrationCredential, serializeSearchParams, snapshotGamepad, snapshotScreen, standardGamepadAxes, standardGamepadButtons, storageSerializers, swipeDirection, syncRef, timeoutAbortSignal, toFormFieldErrors, toPixels, toPointerKind, toReactive, tryOnScopeDispose, unavailableCapability, until, useActiveElement, useAnimate, useArrayEvery, useArrayFilter, useArrayFind, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useAsyncQueue, useAsyncResource, useAsyncState, useBarcodeDetector, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useClamp, useClipboard, useColorMode, useCompressionStream, useConfirmDialog, useContactPicker, useCookie, useCountdown, useCounter, useCssVar, useCycleList, useDark, useDateFormat, useDateTimeFormat, useDebounced, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDisplayMedia, useDisplayNames, useDocumentTitle, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementRef, useElementSize, useElementVisibility, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useField, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useForm, useFormErrorSummaryFields, useFormFieldProps, useFps, useFullscreen, useGamepad, useGeolocation, useHID, useHistory, useI18n, useIdGenerator, useIdle, useImage, useIndexedDB, useInfiniteScroll, useIntersectionObserver, useInterval, useIntervalFn, useKeyPressed, useLanguageDetector, useListFormat, useLocalStorage, useLocale, useMachine, useMagicKeys, useMap, useMediaControls, useMediaQuery, useMediaStream, useMemoize, useMounted, useMouse, useMouseInElement, useMutationObserver, useNavigationApi, useNetwork, useNow, useNumberFormat, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParentElement, usePaymentRequest, usePerformanceObserver, usePermission, usePersistentStorage, usePinch, usePluralRules, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedTransparency, usePrevious, useProjection, usePushSubscription, useQueue, useRafFn, useReducedMotion, useRelativeTimeFormat, useRequestIdleCallback, useResizeObserver, useRound, useRouteParams, useRouteQuery, useSchedulerPostTask, useScreenDetails, useScreenOrientation, useScriptTag, useScroll, useScrollLock, useSegmenter, useSelection, useSerial, useServiceWorker, useSessionStorage, useSet, useShare, useSorted, useSortedLocale, useSpeechRecognition, useSpeechSynthesis, useStack, useStepper, useStorage, useStorageEstimate, useStyleTag, useSummarizer, useSupported, useSwipe, useTextSelection, useTextareaAutosize, useThrottled, useTimeAgo, useTimeout, useTimeoutFn, useTimestamp, useToggle, useTransition, useTranslator, useUSB, useUrlHash, useUrlSearchParams, useUserActivation, useUserMedia, useVModel, useVModels, useVibrate, useViewTransition, useVirtualList, useVisualViewport, useWakeLock, useWebAuthn, useWebLocks, useWebMIDI, useWebNotification, useWebSocket, useWebVitals, useWindowScroll, useWindowSize, useWorkerFn, validateStandardSchema, watchDebounced, watchIgnorable, watchOnce, watchPausable, watchThrottled, whenever };
|
package/dist/index.mjs
CHANGED
|
@@ -17,7 +17,7 @@ import { useBattery } from "./battery.mjs";
|
|
|
17
17
|
import { useMediaQuery, useReducedMotion } from "./media-query.mjs";
|
|
18
18
|
import { breakpointsBootstrapV5, breakpointsTailwind, toPixels, useBreakpoints } from "./breakpoints.mjs";
|
|
19
19
|
import { availableCapability, isCapabilityAvailable, isCapabilityUnavailable, unavailableCapability } from "./capability.mjs";
|
|
20
|
-
import { t as COMPOSABLE_CATALOG } from "./catalog-
|
|
20
|
+
import { t as COMPOSABLE_CATALOG } from "./catalog-CcpCnLjb.mjs";
|
|
21
21
|
import { useColorMode, useDark } from "./color-mode.mjs";
|
|
22
22
|
import { requestMotionPermission, useDeviceOrientation } from "./device-orientation.mjs";
|
|
23
23
|
import { useDeviceMotion } from "./device-motion.mjs";
|
|
@@ -107,7 +107,7 @@ import { useFetch } from "./use-fetch.mjs";
|
|
|
107
107
|
import { useField } from "./use-field.mjs";
|
|
108
108
|
import { useFileDialog } from "./use-file-dialog.mjs";
|
|
109
109
|
import { useFileSystemAccess } from "./use-file-system-access.mjs";
|
|
110
|
-
import { t as useForm } from "./use-form-
|
|
110
|
+
import { t as useForm } from "./use-form-BZqwMs6k.mjs";
|
|
111
111
|
import { formFieldId, toFormFieldErrors, useFormErrorSummaryFields, useFormFieldProps } from "./use-form-field-props.mjs";
|
|
112
112
|
import { useFullscreen } from "./use-fullscreen.mjs";
|
|
113
113
|
import { mapGamepad, snapshotGamepad, standardGamepadAxes, standardGamepadButtons, useGamepad } from "./use-gamepad.mjs";
|
package/dist/infinite-scroll.mjs
CHANGED
|
@@ -2,22 +2,6 @@ import { tryOnScopeDispose } from "./scope.mjs";
|
|
|
2
2
|
import { useScroll } from "./scroll.mjs";
|
|
3
3
|
import { nextTick, readonly, ref, toValue, watch } from "vue";
|
|
4
4
|
//#region src/infinite-scroll.ts
|
|
5
|
-
/**
|
|
6
|
-
* Load more content when a scroll container reaches an edge.
|
|
7
|
-
*
|
|
8
|
-
* Built on `useScroll`: when the configured edge is within `distance`,
|
|
9
|
-
* `onLoadMore` runs; concurrent calls are prevented, and after each load the
|
|
10
|
-
* edge is re-measured so short pages keep loading until the container
|
|
11
|
-
* overflows or `canLoadMore` returns `false`. Loader errors propagate to the
|
|
12
|
-
* returned promise of the internal run but never leave `isLoading` stuck.
|
|
13
|
-
* No loading happens during server rendering.
|
|
14
|
-
*
|
|
15
|
-
* @param target Reactive scroll container (element, component, or window).
|
|
16
|
-
* @param onLoadMore Loader invoked at the edge.
|
|
17
|
-
* @param options Edge, distance, gating, and {@link useScroll} options.
|
|
18
|
-
* @default options {}
|
|
19
|
-
* @returns Loading flag and a manual re-check.
|
|
20
|
-
*/
|
|
21
5
|
function useInfiniteScroll(target, onLoadMore, options = {}) {
|
|
22
6
|
const { distance = 0, direction = "bottom", canLoadMore = true, ...scrollOptions } = options;
|
|
23
7
|
const isLoading = ref(false);
|
|
@@ -2,21 +2,6 @@ import { tryOnScopeDispose } from "./scope.mjs";
|
|
|
2
2
|
import { resolveElement, resolveElements } from "./element-target.mjs";
|
|
3
3
|
import { hasInjectionContext, onMounted, readonly, ref, shallowRef, toValue, watch } from "vue";
|
|
4
4
|
//#region src/intersection-observer.ts
|
|
5
|
-
/**
|
|
6
|
-
* Observe the intersection of reactive elements with a root.
|
|
7
|
-
*
|
|
8
|
-
* One observer is created per combination of resolved targets, root,
|
|
9
|
-
* margin, and threshold; changing any of them disconnects the previous
|
|
10
|
-
* observer first. During server rendering `isSupported` is `false` and the
|
|
11
|
-
* callback never runs. The observer is disconnected when the owning scope
|
|
12
|
-
* stops.
|
|
13
|
-
*
|
|
14
|
-
* @param targets Reactive element target or list of targets.
|
|
15
|
-
* @param callback Native `IntersectionObserver` callback.
|
|
16
|
-
* @param options Root, margin, thresholds, capability, and timing.
|
|
17
|
-
* @default options {}
|
|
18
|
-
* @returns Support/activity flags and pause/resume/stop controls.
|
|
19
|
-
*/
|
|
20
5
|
function useIntersectionObserver(targets, callback, options = {}) {
|
|
21
6
|
const isSupported = ref(false);
|
|
22
7
|
const isActive = ref(options.immediate ?? true);
|
|
@@ -75,18 +60,6 @@ function useIntersectionObserver(targets, callback, options = {}) {
|
|
|
75
60
|
stop
|
|
76
61
|
};
|
|
77
62
|
}
|
|
78
|
-
/**
|
|
79
|
-
* Track whether an element is visible inside the viewport (or a root).
|
|
80
|
-
*
|
|
81
|
-
* Uses the latest intersection entry, so rapid enter/leave sequences settle
|
|
82
|
-
* on the final state. With `once`, the observer disconnects after the first
|
|
83
|
-
* visible entry and `isVisible` stays `true`.
|
|
84
|
-
*
|
|
85
|
-
* @param target Reactive element target.
|
|
86
|
-
* @param options Initial value, one-shot mode, and observer options.
|
|
87
|
-
* @default options {}
|
|
88
|
-
* @returns Reactive visibility plus controls.
|
|
89
|
-
*/
|
|
90
63
|
function useElementVisibility(target, options = {}) {
|
|
91
64
|
const isVisible = ref(options.initialValue ?? false);
|
|
92
65
|
const controls = useIntersectionObserver(target, (entries) => {
|
package/dist/locale.mjs
CHANGED
|
@@ -1,26 +1,6 @@
|
|
|
1
1
|
import { computed, toValue } from "vue";
|
|
2
2
|
//#region src/locale.ts
|
|
3
3
|
const FORMATTER_CACHE_LIMIT = 32;
|
|
4
|
-
/**
|
|
5
|
-
* Create reactive locale metadata and platform-native formatter factories.
|
|
6
|
-
*
|
|
7
|
-
* Equivalent formatter options reuse instances. The bounded cache follows the
|
|
8
|
-
* active locale automatically and prevents repeated constructor overhead in
|
|
9
|
-
* reactive render paths.
|
|
10
|
-
*
|
|
11
|
-
* Detection is lazy and guarded: the default detector reads
|
|
12
|
-
* `navigator.language` behind a `typeof` check at call time, so importing and
|
|
13
|
-
* calling this during server rendering is safe, and runtimes without a
|
|
14
|
-
* `navigator` resolve to the fallback locale. The composable owns no timers
|
|
15
|
-
* or listeners, so no scope cleanup is required.
|
|
16
|
-
*
|
|
17
|
-
* @param source Reactive locale source. Empty values defer to the detector.
|
|
18
|
-
* @param options Detection and fallback behavior.
|
|
19
|
-
* @default options {}
|
|
20
|
-
* @throws `RangeError` on first read of the reactive values when the winning
|
|
21
|
-
* candidate is not a structurally valid locale identifier.
|
|
22
|
-
* @returns Reactive locale metadata and cached formatter factories.
|
|
23
|
-
*/
|
|
24
4
|
function useLocale(source, options = {}) {
|
|
25
5
|
const locale = computed(() => {
|
|
26
6
|
const candidate = (source === void 0 ? void 0 : toValue(source)) ?? (options.detect ?? detectBrowserLocale)() ?? options.fallback ?? "en";
|