foldkit-primitives 0.15.4 → 0.16.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/device/fullscreen.d.ts +28 -0
- package/dist/device/fullscreen.d.ts.map +1 -0
- package/dist/device/fullscreen.js +69 -0
- package/dist/device/fullscreen.js.map +1 -0
- package/dist/device/geolocation.d.ts +56 -0
- package/dist/device/geolocation.d.ts.map +1 -0
- package/dist/device/geolocation.js +87 -0
- package/dist/device/geolocation.js.map +1 -0
- package/dist/device/index.d.ts +5 -0
- package/dist/device/index.js +6 -0
- package/dist/device/media-devices.d.ts +88 -0
- package/dist/device/media-devices.d.ts.map +1 -0
- package/dist/device/media-devices.js +117 -0
- package/dist/device/media-devices.js.map +1 -0
- package/dist/device/media-stream.d.ts +93 -0
- package/dist/device/media-stream.d.ts.map +1 -0
- package/dist/device/media-stream.js +106 -0
- package/dist/device/media-stream.js.map +1 -0
- package/dist/device/permissions.d.ts +106 -0
- package/dist/device/permissions.d.ts.map +1 -0
- package/dist/device/permissions.js +143 -0
- package/dist/device/permissions.js.map +1 -0
- package/dist/dom/autofocus.d.ts +15 -0
- package/dist/dom/autofocus.d.ts.map +1 -0
- package/dist/dom/autofocus.js +22 -0
- package/dist/dom/autofocus.js.map +1 -0
- package/dist/dom/clipboard.d.ts +30 -0
- package/dist/dom/clipboard.d.ts.map +1 -0
- package/dist/dom/clipboard.js +50 -0
- package/dist/dom/clipboard.js.map +1 -0
- package/dist/dom/editable-text.d.ts +72 -0
- package/dist/dom/editable-text.d.ts.map +1 -0
- package/dist/dom/editable-text.js +232 -0
- package/dist/dom/editable-text.js.map +1 -0
- package/dist/dom/fluid-hover.d.ts +93 -0
- package/dist/dom/fluid-hover.d.ts.map +1 -0
- package/dist/dom/fluid-hover.js +294 -0
- package/dist/dom/fluid-hover.js.map +1 -0
- package/dist/dom/focus-scope.d.ts +21 -0
- package/dist/dom/focus-scope.d.ts.map +1 -0
- package/dist/dom/focus-scope.js +93 -0
- package/dist/dom/focus-scope.js.map +1 -0
- package/dist/dom/follow-tab-stop.d.ts +11 -0
- package/dist/dom/follow-tab-stop.d.ts.map +1 -0
- package/dist/dom/follow-tab-stop.js +54 -0
- package/dist/dom/follow-tab-stop.js.map +1 -0
- package/dist/dom/image-decode.d.ts +27 -0
- package/dist/dom/image-decode.d.ts.map +1 -0
- package/dist/dom/image-decode.js +50 -0
- package/dist/dom/image-decode.js.map +1 -0
- package/dist/dom/index.d.ts +24 -0
- package/dist/dom/index.js +25 -0
- package/dist/dom/input-mask.d.ts +35 -0
- package/dist/dom/input-mask.d.ts.map +1 -0
- package/dist/dom/input-mask.js +90 -0
- package/dist/dom/input-mask.js.map +1 -0
- package/dist/dom/keep-in-view.d.ts +16 -0
- package/dist/dom/keep-in-view.d.ts.map +1 -0
- package/dist/dom/keep-in-view.js +38 -0
- package/dist/dom/keep-in-view.js.map +1 -0
- package/dist/dom/keyboard-inset.d.ts +29 -0
- package/dist/dom/keyboard-inset.d.ts.map +1 -0
- package/dist/dom/keyboard-inset.js +45 -0
- package/dist/dom/keyboard-inset.js.map +1 -0
- package/dist/dom/layers.d.ts +6 -0
- package/dist/dom/layers.d.ts.map +1 -0
- package/dist/dom/layers.js +35 -0
- package/dist/dom/layers.js.map +1 -0
- package/dist/dom/measure.d.ts +42 -0
- package/dist/dom/measure.d.ts.map +1 -0
- package/dist/dom/measure.js +123 -0
- package/dist/dom/measure.js.map +1 -0
- package/dist/dom/move.d.ts +45 -0
- package/dist/dom/move.d.ts.map +1 -0
- package/dist/dom/move.js +96 -0
- package/dist/dom/move.js.map +1 -0
- package/dist/dom/pointed-links.d.ts +13 -0
- package/dist/dom/pointed-links.d.ts.map +1 -0
- package/dist/dom/pointed-links.js +59 -0
- package/dist/dom/pointed-links.js.map +1 -0
- package/dist/dom/pointer-drag.d.ts +132 -0
- package/dist/dom/pointer-drag.d.ts.map +1 -0
- package/dist/dom/pointer-drag.js +307 -0
- package/dist/dom/pointer-drag.js.map +1 -0
- package/dist/dom/pointer-position.d.ts +133 -0
- package/dist/dom/pointer-position.d.ts.map +1 -0
- package/dist/dom/pointer-position.js +173 -0
- package/dist/dom/pointer-position.js.map +1 -0
- package/dist/dom/script-loader.d.ts +12 -0
- package/dist/dom/script-loader.d.ts.map +1 -0
- package/dist/dom/script-loader.js +54 -0
- package/dist/dom/script-loader.js.map +1 -0
- package/dist/dom/scroll-bars.d.ts +52 -0
- package/dist/dom/scroll-bars.d.ts.map +1 -0
- package/dist/dom/scroll-bars.js +259 -0
- package/dist/dom/scroll-bars.js.map +1 -0
- package/dist/dom/scroll-settle.d.ts +33 -0
- package/dist/dom/scroll-settle.d.ts.map +1 -0
- package/dist/dom/scroll-settle.js +84 -0
- package/dist/dom/scroll-settle.js.map +1 -0
- package/dist/dom/scroll.d.ts +21 -0
- package/dist/dom/scroll.d.ts.map +1 -0
- package/dist/dom/scroll.js +141 -0
- package/dist/dom/scroll.js.map +1 -0
- package/dist/dom/share.d.ts +19 -0
- package/dist/dom/share.d.ts.map +1 -0
- package/dist/dom/share.js +41 -0
- package/dist/dom/share.js.map +1 -0
- package/dist/dom/swipe.d.ts +121 -0
- package/dist/dom/swipe.d.ts.map +1 -0
- package/dist/dom/swipe.js +291 -0
- package/dist/dom/swipe.js.map +1 -0
- package/dist/dom/targets.d.ts +45 -0
- package/dist/dom/targets.d.ts.map +1 -0
- package/dist/dom/targets.js +70 -0
- package/dist/dom/targets.js.map +1 -0
- package/dist/dom/track-box.d.ts +61 -0
- package/dist/dom/track-box.d.ts.map +1 -0
- package/dist/dom/track-box.js +131 -0
- package/dist/dom/track-box.js.map +1 -0
- package/dist/events/active-element.d.ts +15 -0
- package/dist/events/active-element.d.ts.map +1 -0
- package/dist/events/active-element.js +33 -0
- package/dist/events/active-element.js.map +1 -0
- package/dist/events/hotkeys.d.ts +22 -0
- package/dist/events/hotkeys.d.ts.map +1 -0
- package/dist/events/hotkeys.js +56 -0
- package/dist/events/hotkeys.js.map +1 -0
- package/dist/events/idle.d.ts +29 -0
- package/dist/events/idle.d.ts.map +1 -0
- package/dist/events/idle.js +51 -0
- package/dist/events/idle.js.map +1 -0
- package/dist/events/index.d.ts +9 -0
- package/dist/events/index.js +10 -0
- package/dist/{input-modality-l7InESYh.d.mts → events/input-modality.d.ts} +9 -10
- package/dist/events/input-modality.d.ts.map +1 -0
- package/dist/{input-modality-XwQOFLip.mjs → events/input-modality.js} +2 -2
- package/dist/events/input-modality.js.map +1 -0
- package/dist/events/keyboard.d.ts +30 -0
- package/dist/events/keyboard.d.ts.map +1 -0
- package/dist/events/keyboard.js +55 -0
- package/dist/events/keyboard.js.map +1 -0
- package/dist/events/pointer.d.ts +15 -0
- package/dist/events/pointer.d.ts.map +1 -0
- package/dist/events/pointer.js +28 -0
- package/dist/events/pointer.js.map +1 -0
- package/dist/events/scroll.d.ts +16 -0
- package/dist/events/scroll.d.ts.map +1 -0
- package/dist/events/scroll.js +29 -0
- package/dist/events/scroll.js.map +1 -0
- package/dist/events/visibility.d.ts +25 -0
- package/dist/events/visibility.d.ts.map +1 -0
- package/dist/events/visibility.js +28 -0
- package/dist/events/visibility.js.map +1 -0
- package/dist/events/window-size.d.ts +30 -0
- package/dist/events/window-size.d.ts.map +1 -0
- package/dist/events/window-size.js +63 -0
- package/dist/events/window-size.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +10 -0
- package/dist/interaction/bundle-behavior.d.ts +37 -0
- package/dist/interaction/bundle-behavior.d.ts.map +1 -0
- package/dist/interaction/bundle-behavior.js +34 -0
- package/dist/interaction/bundle-behavior.js.map +1 -0
- package/dist/interaction/dismiss-layer.d.ts +100 -0
- package/dist/interaction/dismiss-layer.d.ts.map +1 -0
- package/dist/interaction/dismiss-layer.js +140 -0
- package/dist/interaction/dismiss-layer.js.map +1 -0
- package/dist/interaction/editable-text.d.ts +13 -0
- package/dist/interaction/editable-text.d.ts.map +1 -0
- package/dist/interaction/editable-text.js +17 -0
- package/dist/interaction/editable-text.js.map +1 -0
- package/dist/interaction/focus-scope.d.ts +21 -0
- package/dist/interaction/focus-scope.d.ts.map +1 -0
- package/dist/interaction/focus-scope.js +25 -0
- package/dist/interaction/focus-scope.js.map +1 -0
- package/dist/interaction/focus-visible.d.ts +9 -0
- package/dist/interaction/focus-visible.d.ts.map +1 -0
- package/dist/interaction/focus-visible.js +10 -0
- package/dist/interaction/focus-visible.js.map +1 -0
- package/dist/interaction/grid-navigation.d.ts +73 -0
- package/dist/interaction/grid-navigation.d.ts.map +1 -0
- package/dist/interaction/grid-navigation.js +137 -0
- package/dist/interaction/grid-navigation.js.map +1 -0
- package/dist/interaction/index.d.ts +21 -0
- package/dist/interaction/index.js +21 -0
- package/dist/interaction/layers.d.ts +12 -0
- package/dist/interaction/layers.d.ts.map +1 -0
- package/dist/interaction/layers.js +14 -0
- package/dist/interaction/layers.js.map +1 -0
- package/dist/interaction/list-navigation.d.ts +105 -0
- package/dist/interaction/list-navigation.d.ts.map +1 -0
- package/dist/interaction/list-navigation.js +168 -0
- package/dist/interaction/list-navigation.js.map +1 -0
- package/dist/interaction/live-announce.d.ts +70 -0
- package/dist/interaction/live-announce.d.ts.map +1 -0
- package/dist/interaction/live-announce.js +115 -0
- package/dist/interaction/live-announce.js.map +1 -0
- package/dist/interaction/long-press.d.ts +102 -0
- package/dist/interaction/long-press.d.ts.map +1 -0
- package/dist/interaction/long-press.js +115 -0
- package/dist/interaction/long-press.js.map +1 -0
- package/dist/interaction/move.d.ts +10 -0
- package/dist/interaction/move.d.ts.map +1 -0
- package/dist/interaction/move.js +17 -0
- package/dist/interaction/move.js.map +1 -0
- package/dist/interaction/overlay.d.ts +45 -0
- package/dist/interaction/overlay.d.ts.map +1 -0
- package/dist/interaction/overlay.js +57 -0
- package/dist/interaction/overlay.js.map +1 -0
- package/dist/interaction/placing.d.ts +86 -0
- package/dist/interaction/placing.d.ts.map +1 -0
- package/dist/interaction/placing.js +239 -0
- package/dist/interaction/placing.js.map +1 -0
- package/dist/interaction/pointer-drag.d.ts +23 -0
- package/dist/interaction/pointer-drag.d.ts.map +1 -0
- package/dist/interaction/pointer-drag.js +21 -0
- package/dist/interaction/pointer-drag.js.map +1 -0
- package/dist/interaction/press.d.ts +152 -0
- package/dist/interaction/press.d.ts.map +1 -0
- package/dist/interaction/press.js +229 -0
- package/dist/interaction/press.js.map +1 -0
- package/dist/interaction/roving-tabindex.d.ts +85 -0
- package/dist/interaction/roving-tabindex.d.ts.map +1 -0
- package/dist/interaction/roving-tabindex.js +142 -0
- package/dist/interaction/roving-tabindex.js.map +1 -0
- package/dist/interaction/selection.d.ts +72 -0
- package/dist/interaction/selection.d.ts.map +1 -0
- package/dist/interaction/selection.js +129 -0
- package/dist/interaction/selection.js.map +1 -0
- package/dist/interaction/targets.d.ts +15 -0
- package/dist/interaction/targets.d.ts.map +1 -0
- package/dist/interaction/targets.js +20 -0
- package/dist/interaction/targets.js.map +1 -0
- package/dist/interaction/tree-navigation.d.ts +111 -0
- package/dist/interaction/tree-navigation.d.ts.map +1 -0
- package/dist/interaction/tree-navigation.js +207 -0
- package/dist/interaction/tree-navigation.js.map +1 -0
- package/dist/interaction/typeahead.d.ts +73 -0
- package/dist/interaction/typeahead.d.ts.map +1 -0
- package/dist/interaction/typeahead.js +113 -0
- package/dist/interaction/typeahead.js.map +1 -0
- package/dist/internal.d.ts +16 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/{internal-C4gHodLc.mjs → internal.js} +7 -5
- package/dist/internal.js.map +1 -0
- package/dist/media/breakpoints.d.ts +37 -0
- package/dist/media/breakpoints.d.ts.map +1 -0
- package/dist/media/breakpoints.js +64 -0
- package/dist/media/breakpoints.js.map +1 -0
- package/dist/media/index.d.ts +3 -0
- package/dist/media/index.js +4 -0
- package/dist/media/mediaquery.d.ts +40 -0
- package/dist/media/mediaquery.d.ts.map +1 -0
- package/dist/media/mediaquery.js +42 -0
- package/dist/media/mediaquery.js.map +1 -0
- package/dist/media/platform.d.ts +30 -0
- package/dist/media/platform.d.ts.map +1 -0
- package/dist/media/platform.js +50 -0
- package/dist/media/platform.js.map +1 -0
- package/dist/motion/index.d.ts +5 -0
- package/dist/motion/index.js +5 -0
- package/dist/motion/motion.d.ts +16 -0
- package/dist/motion/motion.d.ts.map +1 -0
- package/dist/motion/motion.js +25 -0
- package/dist/motion/motion.js.map +1 -0
- package/dist/motion/presence.d.ts +37 -0
- package/dist/motion/presence.d.ts.map +1 -0
- package/dist/motion/presence.js +65 -0
- package/dist/motion/presence.js.map +1 -0
- package/dist/motion/spring.d.ts +50 -0
- package/dist/motion/spring.d.ts.map +1 -0
- package/dist/motion/spring.js +92 -0
- package/dist/motion/spring.js.map +1 -0
- package/dist/motion/tween.d.ts +44 -0
- package/dist/motion/tween.d.ts.map +1 -0
- package/dist/motion/tween.js +65 -0
- package/dist/motion/tween.js.map +1 -0
- package/dist/net/broadcast.d.ts +39 -0
- package/dist/net/broadcast.d.ts.map +1 -0
- package/dist/net/broadcast.js +73 -0
- package/dist/net/broadcast.js.map +1 -0
- package/dist/net/index.d.ts +5 -0
- package/dist/net/index.js +6 -0
- package/dist/net/online.d.ts +24 -0
- package/dist/net/online.d.ts.map +1 -0
- package/dist/net/online.js +26 -0
- package/dist/net/online.js.map +1 -0
- package/dist/net/sharedHost.d.ts +64 -0
- package/dist/net/sharedHost.d.ts.map +1 -0
- package/dist/net/sharedHost.js +124 -0
- package/dist/net/sharedHost.js.map +1 -0
- package/dist/net/sse.d.ts +115 -0
- package/dist/net/sse.d.ts.map +1 -0
- package/dist/net/sse.js +138 -0
- package/dist/net/sse.js.map +1 -0
- package/dist/net/websocket.d.ts +172 -0
- package/dist/net/websocket.d.ts.map +1 -0
- package/dist/net/websocket.js +199 -0
- package/dist/net/websocket.js.map +1 -0
- package/dist/observers/bounds.d.ts +24 -0
- package/dist/observers/bounds.d.ts.map +1 -0
- package/dist/observers/bounds.js +51 -0
- package/dist/observers/bounds.js.map +1 -0
- package/dist/observers/index.d.ts +4 -0
- package/dist/observers/index.js +5 -0
- package/dist/observers/intersection.d.ts +18 -0
- package/dist/observers/intersection.d.ts.map +1 -0
- package/dist/observers/intersection.js +33 -0
- package/dist/observers/intersection.js.map +1 -0
- package/dist/observers/mutation.d.ts +25 -0
- package/dist/observers/mutation.d.ts.map +1 -0
- package/dist/observers/mutation.js +53 -0
- package/dist/observers/mutation.js.map +1 -0
- package/dist/observers/resize.d.ts +18 -0
- package/dist/observers/resize.d.ts.map +1 -0
- package/dist/observers/resize.js +33 -0
- package/dist/observers/resize.js.map +1 -0
- package/dist/state/history.d.ts +115 -0
- package/dist/state/history.d.ts.map +1 -0
- package/dist/state/history.js +167 -0
- package/dist/state/history.js.map +1 -0
- package/dist/state/index.d.ts +6 -0
- package/dist/state/index.js +7 -0
- package/dist/state/locale.d.ts +27 -0
- package/dist/state/locale.d.ts.map +1 -0
- package/dist/state/locale.js +25 -0
- package/dist/state/locale.js.map +1 -0
- package/dist/state/pagination.d.ts +53 -0
- package/dist/state/pagination.d.ts.map +1 -0
- package/dist/state/pagination.js +72 -0
- package/dist/state/pagination.js.map +1 -0
- package/dist/state/range.d.ts +9 -0
- package/dist/state/range.d.ts.map +1 -0
- package/dist/state/range.js +18 -0
- package/dist/state/range.js.map +1 -0
- package/dist/state/selection.d.ts +47 -0
- package/dist/state/selection.d.ts.map +1 -0
- package/dist/state/selection.js +39 -0
- package/dist/state/selection.js.map +1 -0
- package/dist/state/virtual.d.ts +201 -0
- package/dist/state/virtual.d.ts.map +1 -0
- package/dist/state/{index.mjs → virtual.js} +10 -306
- package/dist/state/virtual.js.map +1 -0
- package/dist/time/debounce.d.ts +43 -0
- package/dist/time/debounce.d.ts.map +1 -0
- package/dist/time/debounce.js +65 -0
- package/dist/time/debounce.js.map +1 -0
- package/dist/time/index.d.ts +6 -0
- package/dist/time/index.js +7 -0
- package/dist/time/interval.d.ts +37 -0
- package/dist/time/interval.d.ts.map +1 -0
- package/dist/time/interval.js +52 -0
- package/dist/time/interval.js.map +1 -0
- package/dist/time/relative.d.ts +8 -0
- package/dist/time/relative.d.ts.map +1 -0
- package/dist/time/relative.js +27 -0
- package/dist/time/relative.js.map +1 -0
- package/dist/time/throttle.d.ts +38 -0
- package/dist/time/throttle.d.ts.map +1 -0
- package/dist/time/throttle.js +39 -0
- package/dist/time/throttle.js.map +1 -0
- package/dist/time/ticks.d.ts +21 -0
- package/dist/time/ticks.d.ts.map +1 -0
- package/dist/time/ticks.js +30 -0
- package/dist/time/ticks.js.map +1 -0
- package/dist/time/timer.d.ts +32 -0
- package/dist/time/timer.d.ts.map +1 -0
- package/dist/time/timer.js +50 -0
- package/dist/time/timer.js.map +1 -0
- package/package.json +31 -31
- package/dist/device/index.d.mts +0 -335
- package/dist/device/index.d.mts.map +0 -1
- package/dist/device/index.mjs +0 -493
- package/dist/device/index.mjs.map +0 -1
- package/dist/dom/index.d.mts +0 -714
- package/dist/dom/index.d.mts.map +0 -1
- package/dist/dom/index.mjs +0 -1840
- package/dist/dom/index.mjs.map +0 -1
- package/dist/editable-text-Bg7vil7h.d.mts +0 -307
- package/dist/editable-text-Bg7vil7h.d.mts.map +0 -1
- package/dist/events/index.d.mts +0 -168
- package/dist/events/index.d.mts.map +0 -1
- package/dist/events/index.mjs +0 -307
- package/dist/events/index.mjs.map +0 -1
- package/dist/follow-tab-stop-DM5EI4Ci.mjs +0 -856
- package/dist/follow-tab-stop-DM5EI4Ci.mjs.map +0 -1
- package/dist/index-Bomdwb7e.d.mts +0 -142
- package/dist/index-Bomdwb7e.d.mts.map +0 -1
- package/dist/index.d.mts +0 -12
- package/dist/index.mjs +0 -12
- package/dist/input-modality-XwQOFLip.mjs.map +0 -1
- package/dist/input-modality-l7InESYh.d.mts.map +0 -1
- package/dist/interaction/index.d.mts +0 -1193
- package/dist/interaction/index.d.mts.map +0 -1
- package/dist/interaction/index.mjs +0 -1992
- package/dist/interaction/index.mjs.map +0 -1
- package/dist/internal-C4gHodLc.mjs.map +0 -1
- package/dist/media/index.d.mts +0 -103
- package/dist/media/index.d.mts.map +0 -1
- package/dist/media/index.mjs +0 -146
- package/dist/media/index.mjs.map +0 -1
- package/dist/motion/index.d.mts +0 -2
- package/dist/motion/index.mjs +0 -1
- package/dist/motion-BmlJCjn6.mjs +0 -236
- package/dist/motion-BmlJCjn6.mjs.map +0 -1
- package/dist/net/index.d.mts +0 -338
- package/dist/net/index.d.mts.map +0 -1
- package/dist/net/index.mjs +0 -530
- package/dist/net/index.mjs.map +0 -1
- package/dist/observers/index.d.mts +0 -76
- package/dist/observers/index.d.mts.map +0 -1
- package/dist/observers/index.mjs +0 -155
- package/dist/observers/index.mjs.map +0 -1
- package/dist/rolldown-runtime-D8jQpDG7.mjs +0 -12
- package/dist/state/index.d.mts +0 -432
- package/dist/state/index.d.mts.map +0 -1
- package/dist/state/index.mjs.map +0 -1
- package/dist/time/index.d.mts +0 -167
- package/dist/time/index.d.mts.map +0 -1
- package/dist/time/index.mjs +0 -236
- package/dist/time/index.mjs.map +0 -1
package/dist/net/index.d.mts
DELETED
|
@@ -1,338 +0,0 @@
|
|
|
1
|
-
import { Option, Queue, Schema, Stream } from "effect";
|
|
2
|
-
import { Bundle } from "foldkit-bundle";
|
|
3
|
-
import * as ManagedResource from "foldkit/managedResource";
|
|
4
|
-
import { Command } from "foldkit/command";
|
|
5
|
-
import * as Update from "foldkit/update";
|
|
6
|
-
export declare const BroadcastMessage: import("foldkit/message").MessageUnion<{
|
|
7
|
-
/** Notifies without storing: project the payload into your own field to keep it. */
|
|
8
|
-
readonly Received: {
|
|
9
|
-
data: Schema.Unknown;
|
|
10
|
-
};
|
|
11
|
-
readonly Posted: {};
|
|
12
|
-
readonly BroadcastFailed: {
|
|
13
|
-
message: Schema.String;
|
|
14
|
-
};
|
|
15
|
-
}>;
|
|
16
|
-
export type BroadcastMessage = typeof BroadcastMessage.Type;
|
|
17
|
-
/** The slice of a BroadcastChannel this module needs; satisfied by the platform class. */
|
|
18
|
-
export interface BroadcastChannelHandle {
|
|
19
|
-
postMessage(data: unknown): void;
|
|
20
|
-
close(): void;
|
|
21
|
-
onmessage: ((event: {
|
|
22
|
-
readonly data: unknown;
|
|
23
|
-
}) => void) | null;
|
|
24
|
-
}
|
|
25
|
-
type ChannelFactory = (name: string) => BroadcastChannelHandle;
|
|
26
|
-
/**
|
|
27
|
-
* Every post to `name` from another channel, as Messages. Without a
|
|
28
|
-
* BroadcastChannel API the stream is empty instead of throwing; closing the
|
|
29
|
-
* stream closes the channel.
|
|
30
|
-
*/
|
|
31
|
-
export declare const broadcastMessages: (name: string,
|
|
32
|
-
/** Read lazily so tests can substitute a double, like the SSE bundle. */
|
|
33
|
-
create?: ChannelFactory | undefined) => Stream.Stream<BroadcastMessage>;
|
|
34
|
-
/**
|
|
35
|
-
* Posts one message to `name`. Opens a channel, posts, and closes it: the
|
|
36
|
-
* send is one-shot, so it is a Command, not a resource. Without a
|
|
37
|
-
* BroadcastChannel API — or when the post throws — it yields
|
|
38
|
-
* `BroadcastFailed` instead of throwing.
|
|
39
|
-
*/
|
|
40
|
-
export declare const postBroadcast: (name: string, data: unknown, create?: ChannelFactory | undefined) => Command<BroadcastMessage, never, never>;
|
|
41
|
-
export declare const OnlineModel: Schema.Struct<{
|
|
42
|
-
readonly online: Schema.Boolean;
|
|
43
|
-
}>;
|
|
44
|
-
export type OnlineModel = typeof OnlineModel.Type;
|
|
45
|
-
export declare const OnlineMessage: import("foldkit/message").MessageUnion<{
|
|
46
|
-
readonly Changed: {
|
|
47
|
-
online: Schema.Boolean;
|
|
48
|
-
};
|
|
49
|
-
}>;
|
|
50
|
-
export type OnlineMessage = typeof OnlineMessage.Type;
|
|
51
|
-
/**
|
|
52
|
-
* Online presence as a bundle: `online` in the Model, kept current by the
|
|
53
|
-
* window's online/offline events. The browser reports facts; the Model owns
|
|
54
|
-
* the state, so presence replays like any other transition.
|
|
55
|
-
*/
|
|
56
|
-
export declare const Online: Bundle.Bundle<"Online", void, {
|
|
57
|
-
readonly online: boolean;
|
|
58
|
-
}, {
|
|
59
|
-
readonly _tag: "Changed";
|
|
60
|
-
readonly online: boolean;
|
|
61
|
-
}, never, never, never, void, {}, {}>;
|
|
62
|
-
/** One conversation a page opened: its port, and a signal that aborts once the page is gone. */
|
|
63
|
-
export interface Conversation {
|
|
64
|
-
readonly port: MessagePort;
|
|
65
|
-
readonly signal: AbortSignal;
|
|
66
|
-
}
|
|
67
|
-
/** What the host does with each conversation, told what the page opened it for. */
|
|
68
|
-
export type ConversationHandler<Opening> = (opening: Opening, conversation: Conversation) => void;
|
|
69
|
-
/** Starts the host, once, the first time a conversation needs it. */
|
|
70
|
-
export type StartHost<Opening> = () => ConversationHandler<Opening> | Promise<ConversationHandler<Opening>>;
|
|
71
|
-
/** Where `SharedHost` runs the host: in a SharedWorker, or in the page when there is none. */
|
|
72
|
-
export interface SharedHostOptions<Opening> {
|
|
73
|
-
/**
|
|
74
|
-
* The SharedWorker whose entry calls `serve`. Constructed by the
|
|
75
|
-
* application, since a bundler finds a worker only in a literal
|
|
76
|
-
* `new SharedWorker(new URL('./worker.ts', import.meta.url), …)`.
|
|
77
|
-
*/
|
|
78
|
-
readonly worker: () => {
|
|
79
|
-
readonly port: MessagePort;
|
|
80
|
-
};
|
|
81
|
-
/** The host, for a browser without SharedWorker: started in the top document. */
|
|
82
|
-
readonly inPage: StartHost<Opening>;
|
|
83
|
-
}
|
|
84
|
-
/** A page's way to the host. */
|
|
85
|
-
export interface SharedHostConnection<Opening> {
|
|
86
|
-
/** Opens a conversation for `opening`, returning the page's end of it. */
|
|
87
|
-
readonly open: (opening: Opening) => MessagePort;
|
|
88
|
-
}
|
|
89
|
-
export interface SharedHost<Opening> {
|
|
90
|
-
readonly name: string;
|
|
91
|
-
/** A SharedWorker's entry: hands the host every conversation a page opens. */
|
|
92
|
-
readonly serve: (start: StartHost<Opening>) => void;
|
|
93
|
-
/**
|
|
94
|
-
* A page's connection: through the SharedWorker, or, without one, to the
|
|
95
|
-
* host in the top document. Call it in the top document too when that
|
|
96
|
-
* document frames the pages, so that it is the one the frames meet.
|
|
97
|
-
*/
|
|
98
|
-
readonly connect: (options: SharedHostOptions<Opening>) => SharedHostConnection<Opening>;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* A shared host: its `name`, which keeps two on one origin apart, and
|
|
102
|
-
* the schema of what opens a conversation, which the host decodes before
|
|
103
|
-
* anything else, ignoring a message that does not decode.
|
|
104
|
-
*/
|
|
105
|
-
declare const define: <Opening, Encoded>(options: {
|
|
106
|
-
readonly name: string;
|
|
107
|
-
readonly opening: Schema.Codec<Opening, Encoded, never, never>;
|
|
108
|
-
}) => SharedHost<Opening>;
|
|
109
|
-
/**
|
|
110
|
-
* One server in the browser for many documents: every tab and frame of an
|
|
111
|
-
* application meets the same host. A page opens conversations, each a
|
|
112
|
-
* `MessagePort` with a decoded opening that says what it is for; the host, in
|
|
113
|
-
* a SharedWorker shared by every tab, or in the top document where there is no
|
|
114
|
-
* SharedWorker, is handed each one with a signal that aborts when the page
|
|
115
|
-
* that opened it is gone.
|
|
116
|
-
*
|
|
117
|
-
* It owns the host's lifetime and the routing of conversations, nothing
|
|
118
|
-
* spoken over them: Sync's `portSocket` and Remote's `port` do that.
|
|
119
|
-
*/
|
|
120
|
-
export declare const SharedHost: {
|
|
121
|
-
define: typeof define;
|
|
122
|
-
};
|
|
123
|
-
/** The slice of an EventSource the bundle needs; satisfied by the platform class. */
|
|
124
|
-
export interface SourceHandle {
|
|
125
|
-
readonly readyState: number;
|
|
126
|
-
close(): void;
|
|
127
|
-
onopen: ((event: any) => void) | null;
|
|
128
|
-
onmessage: ((event: any) => void) | null;
|
|
129
|
-
onerror: ((event: any) => void) | null;
|
|
130
|
-
}
|
|
131
|
-
export declare const SseModel: Schema.Struct<{
|
|
132
|
-
readonly url: Schema.String;
|
|
133
|
-
readonly status: Schema.Literals<readonly ["closed", "connecting", "open"]>;
|
|
134
|
-
readonly lastError: Schema.NullOr<Schema.String>;
|
|
135
|
-
}>;
|
|
136
|
-
export type SseModel = typeof SseModel.Type;
|
|
137
|
-
export declare const SseMessage: import("foldkit/message").MessageUnion<{
|
|
138
|
-
readonly Connecting: {};
|
|
139
|
-
readonly Opened: {};
|
|
140
|
-
/** Notifies without storing: project the payload into your own field to keep it. */
|
|
141
|
-
readonly Received: {
|
|
142
|
-
data: Schema.String;
|
|
143
|
-
};
|
|
144
|
-
readonly Closed: {};
|
|
145
|
-
readonly Failed: {
|
|
146
|
-
message: Schema.String;
|
|
147
|
-
};
|
|
148
|
-
}>;
|
|
149
|
-
export type SseMessage = typeof SseMessage.Type;
|
|
150
|
-
/**
|
|
151
|
-
* What the reader sees: the stream's state, or its error. A page derives
|
|
152
|
-
* this instead of keeping its own connection state machine. `lastError`
|
|
153
|
-
* carries the stored failure text: the runtime error sentence (`event stream
|
|
154
|
-
* error for …`) or the acquire error's own message.
|
|
155
|
-
*/
|
|
156
|
-
export declare const SseView: import("foldkit/schema").TaggedUnion<{
|
|
157
|
-
readonly Disconnected: {};
|
|
158
|
-
readonly Connecting: {};
|
|
159
|
-
readonly Connected: {};
|
|
160
|
-
readonly Error: {
|
|
161
|
-
error: Schema.String;
|
|
162
|
-
};
|
|
163
|
-
}>;
|
|
164
|
-
export type SseView = typeof SseView.Type;
|
|
165
|
-
/**
|
|
166
|
-
* Whether the stream is live: open with no error outstanding. The browser
|
|
167
|
-
* reconnects a dropped stream itself; a `Failed` only records the error.
|
|
168
|
-
*/
|
|
169
|
-
export declare const isLive: (model: SseModel) => boolean;
|
|
170
|
-
/**
|
|
171
|
-
* The view of a stream, and whether its page still wants it. An error stands
|
|
172
|
-
* until the page stops wanting the stream; a retry still waiting for its
|
|
173
|
-
* stream reads as connecting, so it answers at once.
|
|
174
|
-
*/
|
|
175
|
-
export declare const viewOfSse: (model: SseModel, wanted: boolean) => SseView;
|
|
176
|
-
/** The registry value behind the source tag: the live source and its incoming queue. */
|
|
177
|
-
export interface AcquiredSource {
|
|
178
|
-
readonly source: SourceHandle;
|
|
179
|
-
readonly events: Queue.Queue<SseMessage>;
|
|
180
|
-
}
|
|
181
|
-
/** The live stream, for the incoming subscription. One assembly holds one. */
|
|
182
|
-
export declare const Source: ManagedResource.ManagedResource<AcquiredSource, ManagedResource.ManagedResourceService<"sse">>;
|
|
183
|
-
/** The source service a placed SSE stream requires. */
|
|
184
|
-
export type SourceService = ManagedResource.ServiceOf<typeof Source>;
|
|
185
|
-
/**
|
|
186
|
-
* Server-sent events as a bundle: connection lifecycle in the Model, the
|
|
187
|
-
* event stream through one Managed Resource. One-directional, so there is no
|
|
188
|
-
* send: the server speaks, the Model listens. The browser reconnects dropped
|
|
189
|
-
* streams itself; a Failed only records the error.
|
|
190
|
-
*/
|
|
191
|
-
export declare const sse: <const Name extends string>(config: {
|
|
192
|
-
readonly name: Name;
|
|
193
|
-
/** Defaults to the platform EventSource, read lazily so tests can substitute a double. */
|
|
194
|
-
readonly createSource?: ((url: string) => SourceHandle) | undefined;
|
|
195
|
-
}) => Bundle.Bundle<Name, {
|
|
196
|
-
readonly url: string;
|
|
197
|
-
}, {
|
|
198
|
-
readonly url: string;
|
|
199
|
-
readonly status: "closed" | "connecting" | "open";
|
|
200
|
-
readonly lastError: string | null;
|
|
201
|
-
}, {
|
|
202
|
-
readonly _tag: "Connecting";
|
|
203
|
-
} | {
|
|
204
|
-
readonly _tag: "Closed";
|
|
205
|
-
} | {
|
|
206
|
-
readonly _tag: "Failed";
|
|
207
|
-
readonly message: string;
|
|
208
|
-
} | {
|
|
209
|
-
readonly _tag: "Opened";
|
|
210
|
-
} | {
|
|
211
|
-
readonly _tag: "Received";
|
|
212
|
-
readonly data: string;
|
|
213
|
-
}, never, ManagedResource.ManagedResourceService<"sse">, ManagedResource.ManagedResourceService<"sse">, void, Readonly<{
|
|
214
|
-
source: ManagedResource.Entry<SseModel, SseMessage, Option.Option<string>, AcquiredSource, SourceService, () => SseMessage>;
|
|
215
|
-
}>, {}>;
|
|
216
|
-
/** The slice of a WebSocket the bundle needs; satisfied by the platform socket and test doubles. Handler events are `any`: the DOM and `ws` type them differently, and only `data` is read. */
|
|
217
|
-
export interface SocketHandle {
|
|
218
|
-
readonly readyState: number;
|
|
219
|
-
send(data: string): void;
|
|
220
|
-
close(): void;
|
|
221
|
-
onopen: ((event: any) => void) | null;
|
|
222
|
-
onmessage: ((event: any) => void) | null;
|
|
223
|
-
onclose: ((event: any) => void) | null;
|
|
224
|
-
onerror: ((event: any) => void) | null;
|
|
225
|
-
}
|
|
226
|
-
export declare const WebSocketModel: Schema.Struct<{
|
|
227
|
-
readonly url: Schema.String;
|
|
228
|
-
readonly status: Schema.Literals<readonly ["closed", "connecting", "open"]>;
|
|
229
|
-
readonly lastError: Schema.NullOr<Schema.String>;
|
|
230
|
-
/** Whether this connection attempt ever reached open; reset on Connecting. */
|
|
231
|
-
readonly opened: Schema.Boolean;
|
|
232
|
-
}>;
|
|
233
|
-
export type WebSocketModel = typeof WebSocketModel.Type;
|
|
234
|
-
export declare const WebSocketMessage: import("foldkit/message").MessageUnion<{
|
|
235
|
-
readonly Connecting: {};
|
|
236
|
-
readonly Opened: {};
|
|
237
|
-
/** Notifies without storing: project the payload into your own field to keep it. */
|
|
238
|
-
readonly Received: {
|
|
239
|
-
data: Schema.String;
|
|
240
|
-
};
|
|
241
|
-
readonly Closed: {};
|
|
242
|
-
readonly Failed: {
|
|
243
|
-
message: Schema.String;
|
|
244
|
-
};
|
|
245
|
-
readonly SendFailed: {
|
|
246
|
-
message: Schema.String;
|
|
247
|
-
};
|
|
248
|
-
/** Acknowledges dispatch of `data`, not its delivery; update ignores it. */
|
|
249
|
-
readonly Sent: {
|
|
250
|
-
data: Schema.String;
|
|
251
|
-
};
|
|
252
|
-
/** The socket was still connecting when `connectTimeoutMs` ran out, and was closed. */
|
|
253
|
-
readonly TimedOut: {};
|
|
254
|
-
}>;
|
|
255
|
-
export type WebSocketMessage = typeof WebSocketMessage.Type;
|
|
256
|
-
/** The registry value behind the socket tag: the live socket and its incoming queue. */
|
|
257
|
-
export interface Acquired {
|
|
258
|
-
readonly socket: SocketHandle;
|
|
259
|
-
readonly events: Queue.Queue<WebSocketMessage>;
|
|
260
|
-
}
|
|
261
|
-
/**
|
|
262
|
-
* What the reader sees: the socket's state, or its error. A page derives
|
|
263
|
-
* this instead of keeping its own connection state machine. `lastError` is
|
|
264
|
-
* already worded for the reader (`Failed to connect to WebSocket`, never the
|
|
265
|
-
* socket's own text, which error handling drops in favor of the sentence).
|
|
266
|
-
*/
|
|
267
|
-
export declare const SocketView: import("foldkit/schema").TaggedUnion<{
|
|
268
|
-
readonly Disconnected: {};
|
|
269
|
-
readonly Connecting: {};
|
|
270
|
-
readonly Connected: {};
|
|
271
|
-
readonly Error: {
|
|
272
|
-
error: Schema.String;
|
|
273
|
-
};
|
|
274
|
-
}>;
|
|
275
|
-
export type SocketView = typeof SocketView.Type;
|
|
276
|
-
/**
|
|
277
|
-
* Whether the socket is usable: open with no error outstanding. Gates sends
|
|
278
|
-
* and received frames.
|
|
279
|
-
*/
|
|
280
|
-
export declare const isOpen: (model: WebSocketModel) => boolean;
|
|
281
|
-
/**
|
|
282
|
-
* The view of a socket, and whether its page still wants it. An error stands
|
|
283
|
-
* until the page stops wanting the socket; a retry still waiting for its
|
|
284
|
-
* socket reads as connecting, so it answers at once. An error on an open
|
|
285
|
-
* socket always reads as an error.
|
|
286
|
-
*/
|
|
287
|
-
export declare const viewOf: (model: WebSocketModel, wanted: boolean) => SocketView;
|
|
288
|
-
/** The live connection, for `send` and the incoming stream. One assembly holds one. */
|
|
289
|
-
export declare const Socket: ManagedResource.ManagedResource<Acquired, ManagedResource.ManagedResourceService<"websocket">>;
|
|
290
|
-
/** The socket service a placed WebSocket's streams and send commands require. */
|
|
291
|
-
export type SocketService = ManagedResource.ServiceOf<typeof Socket>;
|
|
292
|
-
/**
|
|
293
|
-
* A WebSocket as a bundle: connection lifecycle in the Model, full duplex
|
|
294
|
-
* through one Managed Resource. The resource owns the socket; a `send`
|
|
295
|
-
* helper writes through its tag service (lifted to the parent like every
|
|
296
|
-
* helper); a subscription stream reads incoming messages through the same
|
|
297
|
-
* tag. No hidden hub: everything the bundle touches is the Model, the
|
|
298
|
-
* resource registry, or a Message.
|
|
299
|
-
*/
|
|
300
|
-
export declare const websocket: <const Name extends string>(config: {
|
|
301
|
-
readonly name: Name;
|
|
302
|
-
/** Defaults to the platform WebSocket, read lazily so tests can substitute a double. */
|
|
303
|
-
readonly createSocket?: ((url: string) => SocketHandle) | undefined;
|
|
304
|
-
}) => Bundle.Bundle<Name, {
|
|
305
|
-
readonly url: string;
|
|
306
|
-
readonly connectTimeoutMs?: number | undefined;
|
|
307
|
-
}, {
|
|
308
|
-
readonly url: string;
|
|
309
|
-
readonly status: "closed" | "connecting" | "open";
|
|
310
|
-
readonly lastError: string | null;
|
|
311
|
-
readonly opened: boolean;
|
|
312
|
-
}, {
|
|
313
|
-
readonly _tag: "Connecting";
|
|
314
|
-
} | {
|
|
315
|
-
readonly _tag: "Closed";
|
|
316
|
-
} | {
|
|
317
|
-
readonly _tag: "Failed";
|
|
318
|
-
readonly message: string;
|
|
319
|
-
} | {
|
|
320
|
-
readonly _tag: "Opened";
|
|
321
|
-
} | {
|
|
322
|
-
readonly _tag: "Received";
|
|
323
|
-
readonly data: string;
|
|
324
|
-
} | {
|
|
325
|
-
readonly _tag: "SendFailed";
|
|
326
|
-
readonly message: string;
|
|
327
|
-
} | {
|
|
328
|
-
readonly _tag: "Sent";
|
|
329
|
-
readonly data: string;
|
|
330
|
-
} | {
|
|
331
|
-
readonly _tag: "TimedOut";
|
|
332
|
-
}, never, ManagedResource.ManagedResourceService<"websocket">, ManagedResource.ManagedResourceService<"websocket">, void, Readonly<{
|
|
333
|
-
socket: ManagedResource.Entry<WebSocketModel, WebSocketMessage, Option.Option<string>, Acquired, SocketService, () => WebSocketMessage>;
|
|
334
|
-
}>, Readonly<{
|
|
335
|
-
send: (model: WebSocketModel, data: string) => Update.ReturnWithOutMessage<WebSocketModel, WebSocketMessage, never, SocketService>;
|
|
336
|
-
}>>;
|
|
337
|
-
export {};
|
|
338
|
-
//# sourceMappingURL=index.d.mts.map
|
package/dist/net/index.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/net/broadcast.ts","../../src/net/online.ts","../../src/net/sharedHost.ts","../../src/net/sse.ts","../../src/net/websocket.ts"],"mappings":";;;;;qBAaa,4CAAgB;;;IAEf,MAAI,OAAA;;;;IAEG,SAAO,OAAA;;;YAEhB,0BAA0B,iBAAiB;;iBAGtC;EACf,YAAY;EACZ;EACA,aAAa;aAAkB;;;KAG5B,kBAAkB,iBAAiB;;;;;;qBAmB3B,oBAAiB;;AAGnB,SAAA,+BACR,OAAO,OAAO;;;;;;;qBAyBJ,gBAAa,cACZ,eACC,SACJ,+BACR,QAAQ;qBC3EE,aAAW,OAAA;;;YACZ,qBAAqB,YAAY;qBAEhC,yCAAa;;IAAmC,QAAM,OAAA;;;YACvD,uBAAuB,cAAc;;;;;;qBAuBpC,QAAM,OAAA;;;;;;;iBC7BF;WACN,MAAM;WACN,QAAQ;;;YAIP,oBAAoB,YAAY,SAAS,SAAS,cAAc;;YAGhE,UAAU,iBAClB,oBAAoB,WACpB,QAAQ,oBAAoB;;iBAGf,kBAAkB;;;;;;WAMxB;aAAyB,MAAM;;;WAE/B,QAAQ,UAAU;;;iBAIZ,qBAAqB;;WAE3B,OAAO,SAAS,YAAY;;iBAGtB,WAAW;WACjB;;WAEA,QAAQ,OAAO,UAAU;;;;;;WAMzB,UAAU,SAAS,kBAAkB,aAAa,qBAAqB;;;;;;;cAQ5E,SAAU,SAAS,SAAO;WACrB;WACA,SAAS,OAAO,MAAM,SAAS;MACtC,WAAW;;;;;;;;;;;;qBA4IF;;;;iBCxLI;WACN;EACT;EACA,UAAU;EACV,aAAa;EACb,WAAW;;qBAGA,UAAQ,OAAA;;;;;YAKT,kBAAkB,SAAS;qBAE1B,sCAAU;;;;;IAIT,MAAI,OAAA;;;;IAEN,SAAO,OAAA;;;YAEP,oBAAoB,WAAW;;;;;;;qBAQ9B,kCAAO;;;;;IAIT,OAAK,OAAA;;;YAEJ,iBAAiB,QAAQ;;;;;qBAMxB,SAAM,OAAW;;;;;;qBAQjB,YAAS,OAAW,UAAQ,oBAAoB;;iBAW5C;WACN,QAAQ;WACR,QAAQ,MAAM,MAAM;;;qBAIlB,QAAM,gBAAA,gBAAA,gBAAA,gBAAA;;YAGP,gBAAgB,gBAAgB,iBAAiB;;;;;;;qBAsBhD,YAAa,qBAAmB;WAClC,MAAM;;WAEN,iBAAiB,gBAAgB;MAC3C,OAAA,OAAA;WAOmB;;;;;;;;;;;;;;;;;;EA9BV,QAAA,gBAAgB,MACtB,UACA,YACA,OAAO,gBACP,gBACA,qBACM;;;iBChFO;WACN;EACT,KAAK;EACL;EACA,UAAU;EACV,aAAa;EACb,WAAW;EACX,WAAW;;qBAGA,gBAAc,OAAA;;;;;;;YAOf,wBAAwB,eAAe;qBAEtC,4CAAgB;;;;;IAIf,MAAI,OAAA;;;;IAEN,SAAO,OAAA;;;IACH,SAAO,OAAA;;;;IAEb,MAAI,OAAA;;;;;YAIF,0BAA0B,iBAAiB;;iBAGtC;WACN,QAAQ;WACR,QAAQ,MAAM,MAAM;;;;;;;;qBASlB,qCAAU;;;;;IAIZ,OAAK,OAAA;;;YAEJ,oBAAoB,WAAW;;;;;qBAM9B,SAAM,OAAW;;;;;;;qBASjB,SAAM,OAAW,gBAAc,oBAAoB;;qBAWnD,QAAM,gBAAA,gBAAA,UAAA,gBAAA;;YAGP,gBAAgB,gBAAgB,iBAAiB;;;;;;;;;qBAiDhD,kBAAmB,qBAAmB;WACxC,MAAM;;WAEN,iBAAiB,gBAAgB;MAC3C,OAAA,OAAA;WAOmB;WAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;EAzD9C,QAAA,gBAAgB,MACtB,gBACA,kBACA,OAAO,gBACP,UACA,qBACM;;EAKF,OACJ,OAAO,gBACP,iBACG,OAAO,qBAAqB,gBAAgB,yBAAyB"}
|