sibujs 4.4.0 → 4.6.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/README.md +11 -0
- package/dist/browser.cjs +339 -130
- package/dist/browser.d.cts +61 -16
- package/dist/browser.d.ts +61 -16
- package/dist/browser.js +8 -6
- package/dist/build.cjs +273 -82
- package/dist/build.js +15 -16
- package/dist/cdn.dev.global.js +12 -12
- package/dist/cdn.full.dev.global.js +11 -11
- package/dist/cdn.full.global.js +10 -10
- package/dist/cdn.global.js +12 -12
- package/dist/{chunk-IXKSNWV5.js → chunk-2INLLLMZ.js} +1 -1
- package/dist/chunk-3ISI6ACU.js +44 -0
- package/dist/{chunk-VCTAEPSB.js → chunk-47M47FOM.js} +11 -3
- package/dist/chunk-5HZXGZ6T.js +24 -0
- package/dist/{chunk-KKLW7YWL.js → chunk-5MT6SJ3P.js} +275 -144
- package/dist/{chunk-3BTTCZ5J.js → chunk-5Q4R7HCL.js} +42 -4
- package/dist/{chunk-ADM46X22.js → chunk-7GQCWFOE.js} +157 -61
- package/dist/{chunk-4Z3SPQ67.js → chunk-7NCARGJW.js} +16 -8
- package/dist/{chunk-5DXA2J44.js → chunk-7XHATCIH.js} +5 -2
- package/dist/{chunk-LQFGQNMV.js → chunk-AIF3Z2T7.js} +302 -39
- package/dist/{chunk-UCALUKB5.js → chunk-BAAG6ZTI.js} +98 -29
- package/dist/{chunk-NVNJH22U.js → chunk-D33YTSX5.js} +2 -2
- package/dist/{chunk-M2F7TZHH.js → chunk-DKGBBKOF.js} +136 -80
- package/dist/{chunk-NIOYEGBQ.js → chunk-HURREPU2.js} +27 -13
- package/dist/{chunk-HFCOH2GN.js → chunk-HYXDKS4N.js} +153 -110
- package/dist/chunk-J6FW5TV6.js +233 -0
- package/dist/{chunk-36S2YPP4.js → chunk-JSXPZCET.js} +1 -1
- package/dist/chunk-NYNYSPK7.js +318 -0
- package/dist/{chunk-HQSEH5F6.js → chunk-ORMZXBKQ.js} +108 -45
- package/dist/{chunk-LYVUX7NT.js → chunk-OXUY2A6L.js} +287 -130
- package/dist/{chunk-6GSIXTWX.js → chunk-PK6FK2G2.js} +187 -66
- package/dist/{chunk-W2EQ7X2L.js → chunk-QE4TTDU3.js} +47 -9
- package/dist/{chunk-XLO7SLIX.js → chunk-SXXVZMKZ.js} +262 -70
- package/dist/{chunk-R25EFXXC.js → chunk-TUCPL2HB.js} +3 -3
- package/dist/{chunk-RR7M3FHM.js → chunk-UZQ6ALFS.js} +3 -3
- package/dist/{chunk-PNIRUQ4C.js → chunk-VVWPJ543.js} +6 -8
- package/dist/{chunk-7GIHSAWB.js → chunk-XC4MEKGA.js} +3 -3
- package/dist/{chunk-SKPTERHP.js → chunk-XRRZKZYX.js} +55 -31
- package/dist/{contracts-DBdg9J_a.d.cts → contracts-DRIuclVT.d.cts} +10 -2
- package/dist/{contracts-DBdg9J_a.d.ts → contracts-DRIuclVT.d.ts} +10 -2
- package/dist/{customElement-CNZxEB9G.d.ts → customElement-MmInOW1U.d.cts} +59 -10
- package/dist/{customElement-CNZxEB9G.d.cts → customElement-MmInOW1U.d.ts} +59 -10
- package/dist/data.cjs +293 -125
- package/dist/data.d.cts +47 -9
- package/dist/data.d.ts +47 -9
- package/dist/data.js +12 -9
- package/dist/devtools.cjs +121 -58
- package/dist/devtools.js +7 -8
- package/dist/dispose-GEIG2KOF.js +28 -0
- package/dist/ecosystem.cjs +391 -112
- package/dist/ecosystem.d.cts +31 -7
- package/dist/ecosystem.d.ts +31 -7
- package/dist/ecosystem.js +12 -12
- package/dist/extras.cjs +2250 -879
- package/dist/extras.d.cts +10 -9
- package/dist/extras.d.ts +10 -9
- package/dist/extras.js +39 -28
- package/dist/index.cjs +273 -82
- package/dist/index.d.cts +44 -154
- package/dist/index.d.ts +44 -154
- package/dist/index.js +24 -27
- package/dist/motion.cjs +137 -42
- package/dist/motion.js +5 -5
- package/dist/patterns.cjs +397 -48
- package/dist/patterns.d.cts +32 -9
- package/dist/patterns.d.ts +32 -9
- package/dist/patterns.js +8 -8
- package/dist/performance.cjs +338 -217
- package/dist/performance.d.cts +2 -2
- package/dist/performance.d.ts +2 -2
- package/dist/performance.js +8 -9
- package/dist/plugin-DVgSnTfK.d.cts +112 -0
- package/dist/plugin-DVgSnTfK.d.ts +112 -0
- package/dist/plugins.cjs +587 -203
- package/dist/plugins.d.cts +3 -3
- package/dist/plugins.d.ts +3 -3
- package/dist/plugins.js +35 -23
- package/dist/signal-EotCj4hS.d.cts +110 -0
- package/dist/signal-EotCj4hS.d.ts +110 -0
- package/dist/{ssr-BiPRdZ6n.d.cts → ssr-Bli9XRW5.d.cts} +5 -0
- package/dist/{ssr-BiPRdZ6n.d.ts → ssr-Bli9XRW5.d.ts} +5 -0
- package/dist/{ssr-Y7XOEPEN.js → ssr-XOTUASDO.js} +4 -5
- package/dist/ssr.cjs +214 -73
- package/dist/ssr.d.cts +9 -3
- package/dist/ssr.d.ts +9 -3
- package/dist/ssr.js +11 -12
- package/dist/{startup-BMpaiMhP.d.ts → startup-BLfSeL15.d.cts} +73 -22
- package/dist/{startup-BMpaiMhP.d.cts → startup-BLfSeL15.d.ts} +73 -22
- package/dist/tagFactory-DFstCLQV.d.cts +117 -0
- package/dist/tagFactory-DkaNVUNV.d.ts +117 -0
- package/dist/testing.cjs +2481 -2153
- package/dist/testing.d.cts +56 -5
- package/dist/testing.d.ts +56 -5
- package/dist/testing.js +580 -307
- package/dist/ui.cjs +798 -328
- package/dist/ui.d.cts +40 -7
- package/dist/ui.d.ts +40 -7
- package/dist/ui.js +151 -56
- package/dist/widgets.cjs +319 -285
- package/dist/widgets.js +9 -10
- package/package.json +2 -2
- package/dist/chunk-2WLZ6757.js +0 -149
- package/dist/chunk-7NBDXVHS.js +0 -60
- package/dist/chunk-CCSJMTRN.js +0 -15
- package/dist/chunk-QKRPLZ2V.js +0 -108
- package/dist/chunk-WWV3SJ3L.js +0 -131
- package/dist/dispose-46BOMMQJ.js +0 -19
- package/dist/plugin-D30wlGW5.d.cts +0 -71
- package/dist/plugin-D30wlGW5.d.ts +0 -71
- package/dist/tagFactory-Bzupt4Pj.d.cts +0 -55
- package/dist/tagFactory-Bzupt4Pj.d.ts +0 -55
package/dist/browser.d.cts
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* media
|
|
2
|
+
* media tracks whether a CSS media query matches.
|
|
3
3
|
* Uses `window.matchMedia` and listens to `change` events for live updates.
|
|
4
4
|
*
|
|
5
|
+
* It returns an object, not a bare `() => boolean`. The `change` listener stays
|
|
6
|
+
* attached until `dispose()` is called, so a query created by a component must
|
|
7
|
+
* be released with it (e.g. `onUnmount(dispose, el)`). After disposal `matches()`
|
|
8
|
+
* keeps returning its last value.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const { matches: small, dispose } = media("(max-width: 640px)");
|
|
13
|
+
*
|
|
14
|
+
* small();
|
|
15
|
+
* dispose();
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
5
18
|
* @param query CSS media query string (e.g. "(max-width: 768px)")
|
|
6
|
-
* @returns
|
|
19
|
+
* @returns `{ matches, dispose }` — a reactive getter and the listener release
|
|
7
20
|
*/
|
|
8
21
|
declare function media(query: string): {
|
|
9
22
|
matches: () => boolean;
|
|
@@ -147,15 +160,6 @@ declare function draggable(element: ElementTarget, data?: unknown): {
|
|
|
147
160
|
isDragging: () => boolean;
|
|
148
161
|
dispose: () => void;
|
|
149
162
|
};
|
|
150
|
-
/**
|
|
151
|
-
* dropZone turns an element into a drop zone and tracks drag-over state.
|
|
152
|
-
* Listens for dragenter, dragleave, dragover, and drop events.
|
|
153
|
-
* Calls options.onDrop with the parsed data payload and the DragEvent.
|
|
154
|
-
*
|
|
155
|
-
* @param element Reactive getter or ref returning the HTMLElement to use as drop zone (or null)
|
|
156
|
-
* @param options Object with onDrop callback receiving the transferred data and event
|
|
157
|
-
* @returns Object with reactive isOver getter and dispose function
|
|
158
|
-
*/
|
|
159
163
|
declare function dropZone(element: ElementTarget, options: {
|
|
160
164
|
onDrop: (data: unknown, event: DragEvent) => void;
|
|
161
165
|
}): {
|
|
@@ -205,9 +209,11 @@ declare function colorScheme(): {
|
|
|
205
209
|
declare function formatNumber(value: number, options?: Intl.NumberFormatOptions & {
|
|
206
210
|
locale?: string;
|
|
207
211
|
}): string;
|
|
208
|
-
|
|
212
|
+
/** Options for {@link formatCurrency}: any `Intl.NumberFormat` option except the ones it fixes. */
|
|
213
|
+
type CurrencyFormatOptions = Omit<Intl.NumberFormatOptions, "style" | "currency"> & {
|
|
209
214
|
locale?: string;
|
|
210
|
-
}
|
|
215
|
+
};
|
|
216
|
+
declare function formatCurrency(value: number, currency: string, options?: CurrencyFormatOptions): string;
|
|
211
217
|
|
|
212
218
|
/**
|
|
213
219
|
* visibility tracks the document's Page Visibility state.
|
|
@@ -371,6 +377,15 @@ declare function windowSize(): {
|
|
|
371
377
|
interface UrlStateOptions {
|
|
372
378
|
/** Use `replaceState` instead of `pushState`. Default: false */
|
|
373
379
|
replace?: boolean;
|
|
380
|
+
/**
|
|
381
|
+
* The history entry's state. When omitted, the current `history.state` is
|
|
382
|
+
* kept — on a replaced entry and carried forward onto a pushed one — so router
|
|
383
|
+
* metadata, scroll restoration data and application state are not erased. A
|
|
384
|
+
* pushed entry does not inherit `scrollRestoration()`'s entry identity
|
|
385
|
+
* (`__sibuScrollKey`), which belongs to the entry it was set on.
|
|
386
|
+
* Pass it (including `null`) only to set new state deliberately.
|
|
387
|
+
*/
|
|
388
|
+
state?: unknown;
|
|
374
389
|
}
|
|
375
390
|
declare function urlState(): {
|
|
376
391
|
params: () => URLSearchParams;
|
|
@@ -397,6 +412,9 @@ declare function urlState(): {
|
|
|
397
412
|
* the local `last()` signal — BroadcastChannel doesn't deliver to its own
|
|
398
413
|
* sender, matching the browser's native behavior.
|
|
399
414
|
*
|
|
415
|
+
* After `dispose()`, `post()` is a no-op and `last()` no longer changes;
|
|
416
|
+
* `dispose()` may be called repeatedly.
|
|
417
|
+
*
|
|
400
418
|
* @param channelName Name of the broadcast channel
|
|
401
419
|
* @returns `{ last, post, dispose }`
|
|
402
420
|
*
|
|
@@ -639,11 +657,27 @@ interface SpeakOptions {
|
|
|
639
657
|
/** Voice name (match against `getVoices()[i].name`). */
|
|
640
658
|
voice?: string;
|
|
641
659
|
}
|
|
660
|
+
/**
|
|
661
|
+
* Reset the shared queue. Intended for tests only.
|
|
662
|
+
*
|
|
663
|
+
* @internal
|
|
664
|
+
*/
|
|
665
|
+
declare function __resetSpeechCoordinator(): void;
|
|
642
666
|
/**
|
|
643
667
|
* speech wraps the Web Speech Synthesis API as a reactive controller.
|
|
644
668
|
* Exposes `speaking` / `paused` reactive booleans plus `speak()`, `pause()`,
|
|
645
669
|
* `resume()`, `cancel()` actions.
|
|
646
670
|
*
|
|
671
|
+
* Controllers are isolated from each other: utterances from every controller
|
|
672
|
+
* play in order, one at a time, and `cancel()`, `pause()`, `resume()` and
|
|
673
|
+
* `dispose()` affect only this controller's utterances. The native
|
|
674
|
+
* `speechSynthesis` queue is paused, resumed or cancelled only while one of this
|
|
675
|
+
* controller's utterances is the one being spoken — and native cancellation
|
|
676
|
+
* also drops utterances queued directly on `speechSynthesis` by other code.
|
|
677
|
+
*
|
|
678
|
+
* - `speaking()` — this controller has an utterance playing or waiting.
|
|
679
|
+
* - `paused()` — this controller is paused; its waiting utterances do not start.
|
|
680
|
+
*
|
|
647
681
|
* Automatically gracefully degrades on runtimes without `speechSynthesis`.
|
|
648
682
|
*
|
|
649
683
|
* @example
|
|
@@ -718,7 +752,15 @@ declare function gamepad(): {
|
|
|
718
752
|
*/
|
|
719
753
|
declare function pointerLock(): {
|
|
720
754
|
locked: () => boolean;
|
|
721
|
-
|
|
755
|
+
/**
|
|
756
|
+
* Request pointer lock on `element`. Resolves once the browser grants it and
|
|
757
|
+
* rejects with the browser's own error (e.g. missing user activation), so the
|
|
758
|
+
* failure can be caught and shown. Resolves without doing anything when the
|
|
759
|
+
* element has no Pointer Lock support (e.g. iOS Safari) or during SSR, so a
|
|
760
|
+
* fire-and-forget `onclick: () => lock.request(el)` never raises an unhandled
|
|
761
|
+
* rejection there; check `locked()` to see whether the lock took effect.
|
|
762
|
+
*/
|
|
763
|
+
request: (element: Element) => Promise<void>;
|
|
722
764
|
exit: () => void;
|
|
723
765
|
dispose: () => void;
|
|
724
766
|
};
|
|
@@ -816,7 +858,10 @@ interface ImageLoaderState {
|
|
|
816
858
|
width: () => number;
|
|
817
859
|
/** Intrinsic height, 0 until loaded. */
|
|
818
860
|
height: () => number;
|
|
819
|
-
/**
|
|
861
|
+
/**
|
|
862
|
+
* Stop tracking `src`, best-effort cancel an in-flight load (its result is
|
|
863
|
+
* ignored either way), and reset every signal to its initial value.
|
|
864
|
+
*/
|
|
820
865
|
dispose: () => void;
|
|
821
866
|
}
|
|
822
867
|
/**
|
|
@@ -840,4 +885,4 @@ interface ImageLoaderState {
|
|
|
840
885
|
*/
|
|
841
886
|
declare function imageLoader(src: string | (() => string)): ImageLoaderState;
|
|
842
887
|
|
|
843
|
-
export { type AnimationFrameOptions, type BoundsRect, type GamepadSnapshot, type ImageLoaderState, type KeyboardOptions, type MouseOptions, type MutationObserverOptions, type SpeakOptions, type SwipeDirection, type SwipeOptions, type TextSelectionState, type UrlStateOptions, animationFrame, battery, bounds, broadcast, clipboard, colorScheme, draggable, dropZone, favicon, formatCurrency, formatNumber, fullscreen, gamepad, geo, idle, imageLoader, keyboard, media, mouse, mutationObserver, network, online, permissions, pointerLock, resize, scroll, speech, svgFavicon, swipe, textSelection, title, urlState, vibrate, visibility, wakeLock, windowSize };
|
|
888
|
+
export { type AnimationFrameOptions, type BoundsRect, type CurrencyFormatOptions, type GamepadSnapshot, type ImageLoaderState, type KeyboardOptions, type MouseOptions, type MutationObserverOptions, type SpeakOptions, type SwipeDirection, type SwipeOptions, type TextSelectionState, type UrlStateOptions, __resetSpeechCoordinator, animationFrame, battery, bounds, broadcast, clipboard, colorScheme, draggable, dropZone, favicon, formatCurrency, formatNumber, fullscreen, gamepad, geo, idle, imageLoader, keyboard, media, mouse, mutationObserver, network, online, permissions, pointerLock, resize, scroll, speech, svgFavicon, swipe, textSelection, title, urlState, vibrate, visibility, wakeLock, windowSize };
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* media
|
|
2
|
+
* media tracks whether a CSS media query matches.
|
|
3
3
|
* Uses `window.matchMedia` and listens to `change` events for live updates.
|
|
4
4
|
*
|
|
5
|
+
* It returns an object, not a bare `() => boolean`. The `change` listener stays
|
|
6
|
+
* attached until `dispose()` is called, so a query created by a component must
|
|
7
|
+
* be released with it (e.g. `onUnmount(dispose, el)`). After disposal `matches()`
|
|
8
|
+
* keeps returning its last value.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const { matches: small, dispose } = media("(max-width: 640px)");
|
|
13
|
+
*
|
|
14
|
+
* small();
|
|
15
|
+
* dispose();
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
5
18
|
* @param query CSS media query string (e.g. "(max-width: 768px)")
|
|
6
|
-
* @returns
|
|
19
|
+
* @returns `{ matches, dispose }` — a reactive getter and the listener release
|
|
7
20
|
*/
|
|
8
21
|
declare function media(query: string): {
|
|
9
22
|
matches: () => boolean;
|
|
@@ -147,15 +160,6 @@ declare function draggable(element: ElementTarget, data?: unknown): {
|
|
|
147
160
|
isDragging: () => boolean;
|
|
148
161
|
dispose: () => void;
|
|
149
162
|
};
|
|
150
|
-
/**
|
|
151
|
-
* dropZone turns an element into a drop zone and tracks drag-over state.
|
|
152
|
-
* Listens for dragenter, dragleave, dragover, and drop events.
|
|
153
|
-
* Calls options.onDrop with the parsed data payload and the DragEvent.
|
|
154
|
-
*
|
|
155
|
-
* @param element Reactive getter or ref returning the HTMLElement to use as drop zone (or null)
|
|
156
|
-
* @param options Object with onDrop callback receiving the transferred data and event
|
|
157
|
-
* @returns Object with reactive isOver getter and dispose function
|
|
158
|
-
*/
|
|
159
163
|
declare function dropZone(element: ElementTarget, options: {
|
|
160
164
|
onDrop: (data: unknown, event: DragEvent) => void;
|
|
161
165
|
}): {
|
|
@@ -205,9 +209,11 @@ declare function colorScheme(): {
|
|
|
205
209
|
declare function formatNumber(value: number, options?: Intl.NumberFormatOptions & {
|
|
206
210
|
locale?: string;
|
|
207
211
|
}): string;
|
|
208
|
-
|
|
212
|
+
/** Options for {@link formatCurrency}: any `Intl.NumberFormat` option except the ones it fixes. */
|
|
213
|
+
type CurrencyFormatOptions = Omit<Intl.NumberFormatOptions, "style" | "currency"> & {
|
|
209
214
|
locale?: string;
|
|
210
|
-
}
|
|
215
|
+
};
|
|
216
|
+
declare function formatCurrency(value: number, currency: string, options?: CurrencyFormatOptions): string;
|
|
211
217
|
|
|
212
218
|
/**
|
|
213
219
|
* visibility tracks the document's Page Visibility state.
|
|
@@ -371,6 +377,15 @@ declare function windowSize(): {
|
|
|
371
377
|
interface UrlStateOptions {
|
|
372
378
|
/** Use `replaceState` instead of `pushState`. Default: false */
|
|
373
379
|
replace?: boolean;
|
|
380
|
+
/**
|
|
381
|
+
* The history entry's state. When omitted, the current `history.state` is
|
|
382
|
+
* kept — on a replaced entry and carried forward onto a pushed one — so router
|
|
383
|
+
* metadata, scroll restoration data and application state are not erased. A
|
|
384
|
+
* pushed entry does not inherit `scrollRestoration()`'s entry identity
|
|
385
|
+
* (`__sibuScrollKey`), which belongs to the entry it was set on.
|
|
386
|
+
* Pass it (including `null`) only to set new state deliberately.
|
|
387
|
+
*/
|
|
388
|
+
state?: unknown;
|
|
374
389
|
}
|
|
375
390
|
declare function urlState(): {
|
|
376
391
|
params: () => URLSearchParams;
|
|
@@ -397,6 +412,9 @@ declare function urlState(): {
|
|
|
397
412
|
* the local `last()` signal — BroadcastChannel doesn't deliver to its own
|
|
398
413
|
* sender, matching the browser's native behavior.
|
|
399
414
|
*
|
|
415
|
+
* After `dispose()`, `post()` is a no-op and `last()` no longer changes;
|
|
416
|
+
* `dispose()` may be called repeatedly.
|
|
417
|
+
*
|
|
400
418
|
* @param channelName Name of the broadcast channel
|
|
401
419
|
* @returns `{ last, post, dispose }`
|
|
402
420
|
*
|
|
@@ -639,11 +657,27 @@ interface SpeakOptions {
|
|
|
639
657
|
/** Voice name (match against `getVoices()[i].name`). */
|
|
640
658
|
voice?: string;
|
|
641
659
|
}
|
|
660
|
+
/**
|
|
661
|
+
* Reset the shared queue. Intended for tests only.
|
|
662
|
+
*
|
|
663
|
+
* @internal
|
|
664
|
+
*/
|
|
665
|
+
declare function __resetSpeechCoordinator(): void;
|
|
642
666
|
/**
|
|
643
667
|
* speech wraps the Web Speech Synthesis API as a reactive controller.
|
|
644
668
|
* Exposes `speaking` / `paused` reactive booleans plus `speak()`, `pause()`,
|
|
645
669
|
* `resume()`, `cancel()` actions.
|
|
646
670
|
*
|
|
671
|
+
* Controllers are isolated from each other: utterances from every controller
|
|
672
|
+
* play in order, one at a time, and `cancel()`, `pause()`, `resume()` and
|
|
673
|
+
* `dispose()` affect only this controller's utterances. The native
|
|
674
|
+
* `speechSynthesis` queue is paused, resumed or cancelled only while one of this
|
|
675
|
+
* controller's utterances is the one being spoken — and native cancellation
|
|
676
|
+
* also drops utterances queued directly on `speechSynthesis` by other code.
|
|
677
|
+
*
|
|
678
|
+
* - `speaking()` — this controller has an utterance playing or waiting.
|
|
679
|
+
* - `paused()` — this controller is paused; its waiting utterances do not start.
|
|
680
|
+
*
|
|
647
681
|
* Automatically gracefully degrades on runtimes without `speechSynthesis`.
|
|
648
682
|
*
|
|
649
683
|
* @example
|
|
@@ -718,7 +752,15 @@ declare function gamepad(): {
|
|
|
718
752
|
*/
|
|
719
753
|
declare function pointerLock(): {
|
|
720
754
|
locked: () => boolean;
|
|
721
|
-
|
|
755
|
+
/**
|
|
756
|
+
* Request pointer lock on `element`. Resolves once the browser grants it and
|
|
757
|
+
* rejects with the browser's own error (e.g. missing user activation), so the
|
|
758
|
+
* failure can be caught and shown. Resolves without doing anything when the
|
|
759
|
+
* element has no Pointer Lock support (e.g. iOS Safari) or during SSR, so a
|
|
760
|
+
* fire-and-forget `onclick: () => lock.request(el)` never raises an unhandled
|
|
761
|
+
* rejection there; check `locked()` to see whether the lock took effect.
|
|
762
|
+
*/
|
|
763
|
+
request: (element: Element) => Promise<void>;
|
|
722
764
|
exit: () => void;
|
|
723
765
|
dispose: () => void;
|
|
724
766
|
};
|
|
@@ -816,7 +858,10 @@ interface ImageLoaderState {
|
|
|
816
858
|
width: () => number;
|
|
817
859
|
/** Intrinsic height, 0 until loaded. */
|
|
818
860
|
height: () => number;
|
|
819
|
-
/**
|
|
861
|
+
/**
|
|
862
|
+
* Stop tracking `src`, best-effort cancel an in-flight load (its result is
|
|
863
|
+
* ignored either way), and reset every signal to its initial value.
|
|
864
|
+
*/
|
|
820
865
|
dispose: () => void;
|
|
821
866
|
}
|
|
822
867
|
/**
|
|
@@ -840,4 +885,4 @@ interface ImageLoaderState {
|
|
|
840
885
|
*/
|
|
841
886
|
declare function imageLoader(src: string | (() => string)): ImageLoaderState;
|
|
842
887
|
|
|
843
|
-
export { type AnimationFrameOptions, type BoundsRect, type GamepadSnapshot, type ImageLoaderState, type KeyboardOptions, type MouseOptions, type MutationObserverOptions, type SpeakOptions, type SwipeDirection, type SwipeOptions, type TextSelectionState, type UrlStateOptions, animationFrame, battery, bounds, broadcast, clipboard, colorScheme, draggable, dropZone, favicon, formatCurrency, formatNumber, fullscreen, gamepad, geo, idle, imageLoader, keyboard, media, mouse, mutationObserver, network, online, permissions, pointerLock, resize, scroll, speech, svgFavicon, swipe, textSelection, title, urlState, vibrate, visibility, wakeLock, windowSize };
|
|
888
|
+
export { type AnimationFrameOptions, type BoundsRect, type CurrencyFormatOptions, type GamepadSnapshot, type ImageLoaderState, type KeyboardOptions, type MouseOptions, type MutationObserverOptions, type SpeakOptions, type SwipeDirection, type SwipeOptions, type TextSelectionState, type UrlStateOptions, __resetSpeechCoordinator, animationFrame, battery, bounds, broadcast, clipboard, colorScheme, draggable, dropZone, favicon, formatCurrency, formatNumber, fullscreen, gamepad, geo, idle, imageLoader, keyboard, media, mouse, mutationObserver, network, online, permissions, pointerLock, resize, scroll, speech, svgFavicon, swipe, textSelection, title, urlState, vibrate, visibility, wakeLock, windowSize };
|
package/dist/browser.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
__resetSpeechCoordinator,
|
|
2
3
|
animationFrame,
|
|
3
4
|
battery,
|
|
4
5
|
bounds,
|
|
@@ -35,16 +36,17 @@ import {
|
|
|
35
36
|
visibility,
|
|
36
37
|
wakeLock,
|
|
37
38
|
windowSize
|
|
38
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-OXUY2A6L.js";
|
|
39
40
|
import "./chunk-H3SRKIYX.js";
|
|
40
41
|
import "./chunk-52XFPGSN.js";
|
|
41
42
|
import "./chunk-7ZHH77QA.js";
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-XC4MEKGA.js";
|
|
44
|
+
import "./chunk-7XHATCIH.js";
|
|
45
|
+
import "./chunk-D33YTSX5.js";
|
|
46
|
+
import "./chunk-5Q4R7HCL.js";
|
|
47
|
+
import "./chunk-NYNYSPK7.js";
|
|
47
48
|
export {
|
|
49
|
+
__resetSpeechCoordinator,
|
|
48
50
|
animationFrame,
|
|
49
51
|
battery,
|
|
50
52
|
bounds,
|