@g9tm/lynxcontrols-intro-carousel 0.0.0-stage → 1.4.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 CHANGED
@@ -1,3 +1,57 @@
1
- # Temporary Holding Version
1
+ # @g9tm/lynxcontrols-intro-carousel
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ `G9IntroCarousel`: full-screen onboarding slides (MAUI `G9MAUIControls.IntroCarousel`) with one media slot (video or
4
+ image) behind a flat or gradient overlay, logo, localized title and subtitle, step pills, previous / next, a language
5
+ button and the sign-in call to action. Slides swipe through lynx-ui `Swiper`. Depends on `@g9tm/lynxcontrols-foundation` and
6
+ `@g9tm/lynxcontrols` only. Migration table: [`docs/migration/IntroCarousel.Controls.md`](docs/migration/IntroCarousel.Controls.md).
7
+
8
+ ```tsx
9
+ import { G9IntroCarousel, useIntroCarousel } from '@g9tm/lynxcontrols-intro-carousel';
10
+
11
+ const intro = useIntroCarousel();
12
+ <G9IntroCarousel
13
+ controller={intro}
14
+ autoBegin={false} // call intro.beginPresentation() once the page is on screen
15
+ slides={[
16
+ { videoAssetPath: 'Onboarding/1video.mp4', imageSource: 'slide1.png', titleResourceKey: 'IntroSlide1Title', subtitleResourceKey: 'IntroSlide1Subtitle' },
17
+ { imageSource: 'slide2.png', titleResourceKey: 'IntroSlide2Title' },
18
+ ]}
19
+ useGradientOverlay
20
+ onLanguage={openLanguagePicker}
21
+ onComplete={() => setIntroVisible(false)}
22
+ onFirstContentReady={() => host.release()} // dismiss the page splash once the first frame is up
23
+ onMediaFallback={(index, reason) => log(index, reason)}
24
+ />
25
+ ```
26
+
27
+ ## Media
28
+
29
+ - Video goes through `services.media`: `resolve(source)` then `createPlayer(media, { loop, muted, startSeconds,
30
+ nearEndSeconds })` → `{ view, play, pause, dispose, subscribe }`. `view` is the platform video element your
31
+ provider builds (the host registers the video XElement); the carousel never names a video tag.
32
+ - On Android and iOS use `createNativeMediaProvider()` from `@g9tm/lynxcontrols-native/media`: bundled assets resolve through
33
+ the host (`asset:///…` from the APK `assets/`, `file://…` from the iOS bundle), and players render the
34
+ `<g9-video>` element (Media3 ExoPlayer / AVQueuePlayer + AVPlayerLooper; register it as the integration guides
35
+ show). Desktop has no video element yet (decision D14): the Lynxtron services provide no `media`, so the carousel
36
+ shows its images with `'no-media-provider'`.
37
+ - **One player at a time** (MAUI's single `MediaElement`): a slide change fades the current media out
38
+ (`mediaFadeOutDurationMs`), disposes its player, then loads the next slide's media and fades it in
39
+ (`mediaFadeInDurationMs`); the very first reveal is immediate with `skipFirstSlideInitialFadeIn`. Loop fades come
40
+ from the player's `nearEnd` / `looped` events (`useVideoLoopFade`).
41
+ - **Fallback.** When a video slide cannot play, its image shows and `onMediaFallback(index, reason)` reports
42
+ `'no-media-provider'`, `'video-unsupported'` (the provider's `supportsVideo()` is false — desktop until decision
43
+ D14 is resolved; the contract itself is not reduced) or `'video-failed'` (resolve, create or playback error).
44
+ - **Release.** The player is disposed on slide change, when `active` turns false (page in the background, carousel
45
+ hidden), on `stopAndReleaseMedia()` and on unmount.
46
+ - **Readiness.** `onFirstContentReady` fires once: the first video frame is revealed, its fallback image is shown, or
47
+ the slide has nothing to show. `startupCoverImageSource` + `startupCoverDurationMs` keep a poster up for at least
48
+ that long and until media is ready, then fade it (`startupCoverFadeDurationMs`).
49
+
50
+ ## Chrome
51
+
52
+ Title and subtitle are string keys resolved through the app's provider (`strings.resolve`); Next / Previous / the
53
+ call to action resolve `IntroNext`, `IntroPrevious` and `IntroSignIn` with English fallbacks. In RTL the Next and
54
+ Previous targets swap sides and their chevrons flip, and the swiper runs RTL. No text shadows (MAUI removed them):
55
+ readability comes from the overlay.
56
+
57
+ Video playback per platform is a device check (ledger N-046).
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/@types/react/global.d.ts","../../../node_modules/@types/react/node_modules/csstype/index.d.ts","../../../node_modules/@types/prop-types/index.d.ts","../../../node_modules/@types/react/index.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/animation.d.ts","../../../node_modules/csstype/index.d.ts","../../../node_modules/@lynx-js/types/types/common/csstype.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/animation.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/element.d.ts","../../../node_modules/@lynx-js/types/types/common/events.d.ts","../../../node_modules/@lynx-js/types/types/common/system-info.d.ts","../../../node_modules/@lynx-js/types/types/common/performance.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/lynx.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/events.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/index.d.ts","../../../node_modules/@lynx-js/types/types/common/lynx.d.ts","../../../node_modules/@lynx-js/types/types/common/global.d.ts","../../../node_modules/@lynx-js/types/types/common/props.d.ts","../../../node_modules/@lynx-js/types/types/common/element/component.d.ts","../../../node_modules/@lynx-js/types/types/common/element/filter-image.d.ts","../../../node_modules/@lynx-js/types/types/common/element/image.d.ts","../../../node_modules/@lynx-js/types/types/common/element/common.d.ts","../../../node_modules/@lynx-js/types/types/common/element/list.d.ts","../../../node_modules/@lynx-js/types/types/common/element/list-item.d.ts","../../../node_modules/@lynx-js/types/types/common/element/page.d.ts","../../../node_modules/@lynx-js/types/types/common/element/scroll-view.d.ts","../../../node_modules/@lynx-js/types/types/common/element/text.d.ts","../../../node_modules/@lynx-js/types/types/common/element/view.d.ts","../../../node_modules/@lynx-js/types/types/common/element/input.d.ts","../../../node_modules/@lynx-js/types/types/common/element/textarea.d.ts","../../../node_modules/@lynx-js/types/types/common/element/title-bar-view.d.ts","../../../node_modules/@lynx-js/types/types/common/element/svg.d.ts","../../../node_modules/@lynx-js/types/types/common/element/refresh.d.ts","../../../node_modules/@lynx-js/types/types/common/element/scroll-coordinator.d.ts","../../../node_modules/@lynx-js/types/types/common/element/viewpager.d.ts","../../../node_modules/@lynx-js/types/types/common/element/blur-view.d.ts","../../../node_modules/@lynx-js/types/types/common/element/webview.d.ts","../../../node_modules/@lynx-js/types/types/common/element/markdown.d.ts","../../../node_modules/@lynx-js/types/types/common/element/video.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/lynx-performance-entry.d.ts","../../../node_modules/@lynx-js/types/types/common/element/frame.d.ts","../../../node_modules/@lynx-js/types/types/common/element/overlay.d.ts","../../../node_modules/@lynx-js/types/types/common/element/element.d.ts","../../../node_modules/@lynx-js/types/types/common/element/methods.d.ts","../../../node_modules/@lynx-js/types/types/common/element/attributes.d.ts","../../../node_modules/@lynx-js/types/types/common/element/index.d.ts","../../../node_modules/@lynx-js/types/types/common/console.d.ts","../../../node_modules/@lynx-js/types/types/common/index.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/event.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/nodes-ref.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/app.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/performance.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/fetch.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/lynx.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/native-modules.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/text-encoder-decoder.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/index.d.ts","../../../node_modules/@lynx-js/types/types/index.d.ts","../../../node_modules/@types/react/jsx-runtime.d.ts","../../../node_modules/@lynx-js/react/runtime/jsx-runtime/index.d.ts","../../controls/dist/base/control.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/runtime-marker.d.ts","../../../node_modules/preact/src/jsx.d.ts","../../../node_modules/preact/src/dom.d.ts","../../../node_modules/preact/src/index.d.ts","../../../node_modules/preact/hooks/src/index.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/core/hooks/react.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/snapshot/lynx/runWithForce.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/lynx.d.ts","../../../node_modules/preact/compat/src/suspense.d.ts","../../../node_modules/preact/compat/src/index.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/snapshot/lynx/children.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/snapshot/lynx/element.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/snapshot/lynx/portalsPending.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/snapshot/lynx/portals.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/snapshot/lynx/suspense.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/core/hooks/useLynxGlobalEventListener.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/core/globalProps.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/core/initData.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/core/background-function/run-on-background.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/snapshot/worklet/call/runOnMainThread.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/worklet-runtime/api/animation/effect.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/worklet-runtime/api/animation/animation.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/worklet-runtime/api/element.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/worklet-runtime/bindings/types.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/core/main-thread-ref.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/lynx-api.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/index.d.ts","../../../node_modules/@lynx-js/react/types/react.docs.d.ts","../../../node_modules/@lynx-js/react/types/react.d.ts","../../controls/dist/base/corner-badge.d.ts","../../controls/dist/base/disposer.d.ts","../../controls/dist/base/press.d.ts","../../controls/dist/base/pressable.d.ts","../../foundation/dist/collections.d.ts","../../foundation/dist/culture/digits.d.ts","../../foundation/dist/culture/culture.d.ts","../../foundation/dist/culture/calendar.d.ts","../../foundation/dist/culture/date-format.d.ts","../../foundation/dist/culture/duration.d.ts","../../foundation/dist/culture/numbers.d.ts","../../foundation/dist/culture/strings.d.ts","../../foundation/dist/culture/relative-time.d.ts","../../foundation/dist/culture/index.d.ts","../../foundation/dist/enums/index.d.ts","../../foundation/dist/errors.d.ts","../../foundation/dist/exec/diagnostics.d.ts","../../foundation/dist/services/abort.d.ts","../../foundation/dist/exec/options.d.ts","../../foundation/dist/services/clock.d.ts","../../foundation/dist/exec/trace.d.ts","../../foundation/dist/exec/safe-executor.d.ts","../../foundation/dist/exec/index.d.ts","../../foundation/dist/icons/generated/glyph-svg.d.ts","../../foundation/dist/icons/glyph.d.ts","../../foundation/dist/icons/icon.d.ts","../../foundation/dist/icons/glyph-slots.d.ts","../../foundation/dist/icons/icon-fonts.d.ts","../../foundation/dist/icons/svg.d.ts","../../foundation/dist/icons/index.d.ts","../../foundation/dist/services/preferences.d.ts","../../foundation/dist/services/contracts.d.ts","../../foundation/dist/services/index.d.ts","../../foundation/dist/theme/color.d.ts","../../foundation/dist/tokens/generated/palettes.d.ts","../../foundation/dist/theme/theme.d.ts","../../foundation/dist/theme/control-colors.d.ts","../../foundation/dist/theme/variants.d.ts","../../foundation/dist/theme/index.d.ts","../../foundation/dist/tokens/generated/metrics.d.ts","../../foundation/dist/tokens/layout-metrics.d.ts","../../foundation/dist/tokens/css-vars.d.ts","../../foundation/dist/tokens/index.d.ts","../../foundation/dist/index.d.ts","../../controls/dist/popup/types.d.ts","../../controls/dist/display/shimmer.d.ts","../../controls/dist/sheet/options.d.ts","../../controls/dist/provider/settings.d.ts","../../controls/dist/icon/icon.d.ts","../../controls/dist/base/selection-item.d.ts","../../controls/dist/base/timers.d.ts","../../controls/dist/base/use-controllable-state.d.ts","../../controls/dist/base/use-stable-callback.d.ts","../../controls/dist/base/index.d.ts","../../controls/dist/button/visuals.d.ts","../../controls/dist/button/button.d.ts","../../controls/dist/button/header-action-button.d.ts","../../controls/dist/button/icon-button.d.ts","../../controls/dist/button/nav-card.d.ts","../../controls/dist/button/safe.d.ts","../../controls/dist/button/safe-tap.d.ts","../../controls/dist/button/vertical-icon-text-button.d.ts","../../controls/dist/button/index.d.ts","../../controls/dist/display/activity-indicator.d.ts","../../controls/dist/display/culture-date-time-label.d.ts","../../controls/dist/display/progress-bar.d.ts","../../controls/dist/display/separator.d.ts","../../controls/dist/display/title-with-line.d.ts","../../controls/dist/display/index.d.ts","../../controls/dist/icon/slot.d.ts","../../controls/dist/icon/swatch.d.ts","../../controls/dist/icon/index.d.ts","../../controls/dist/provider/contexts.d.ts","../../controls/dist/provider/hooks.d.ts","../../controls/dist/provider/provider.d.ts","../../controls/dist/provider/index.d.ts","../../../node_modules/@lynx-js/lynx-ui-swiper/dist/types/index.docs.d.ts","../../../node_modules/@lynx-js/lynx-ui-swiper/dist/types/index.d.ts","../../../node_modules/@lynx-js/lynx-ui-swiper/dist/Swiper/index.d.ts","../../../node_modules/@lynx-js/lynx-ui-swiper/dist/SwiperItem/index.d.ts","../../../node_modules/@lynx-js/lynx-ui-swiper/dist/index.d.ts","../src/model.ts","../src/media.ts","../src/intro-carousel.tsx","../src/index.ts"],"fileIdsList":[[41,205],[41,95,127,205],[205,206,207],[41,80,95,127,204,205],[95,127,205],[41,95,96,127,205],[102,103,108,114],[41,103],[41,102,103,108,114],[41,122],[99,102,104,106,108,109,110,112,113,124],[41,114,115,116,117,118,123],[104,105],[102,108],[41,95,102,111,127,205],[102],[119],[121],[120],[41,95,97,126,127,205],[41,104,124,125],[42,85,86,87],[53],[42,77,86,87,88,89,91,92,93],[42,85,86,87,89,90],[85,87],[42,85],[49,77],[43],[44],[51,55],[47],[41,51,55,56,57,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,78,79,205],[47,51,55,77],[47,51,55],[56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,78,79,80,81,82],[47,51,55,59],[47,60,63],[46],[48,52,53,94],[44,47,48,49,51,53,54,55,83,84],[44,47],[52,85,94],[45,85],[46,47,55],[45,46,50,51],[49,85],[38,39,40],[41],[100,102,103,107],[100,101],[127],[98,128,129,130,131,177,178,179,180],[98,127,130],[171,176],[98,127,171,176,182],[98,127,171,176],[182,183,184,185,186,187,188,189],[171],[41,171,183,185],[98,127,171],[173,191,192,193,194,195],[98,127],[41,127,171,175],[176,197,198],[127,171,176],[127,171],[41,171,175],[171,175,200],[175,200,201,202],[127,171,175],[127,171,172,174],[127,173,176],[134],[133],[133,134,135],[133,134,135,136,137,138,139,140],[139],[144,146,148,149],[145],[139,144,145,146,147,148],[144,147],[153],[152],[151,152,153,154,155,156],[132,141,142,143,150,157,160,166,170],[143,145,147,158],[145,147,158,159],[143],[161,163],[161,163,164,165],[161,162],[142,161,162],[162,167,168],[162,167,168,169],[97,209,210,211],[97,127,171,181,190,196,199,203,208,209,210],[97,171,209],[97,171]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb5b19b86227ace1d29ea4cf81387279d04bb34051e944bc53df69f58914b788","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"87d9d29dbc745f182683f63187bf3d53fd8673e5fca38ad5eaab69798ed29fbc","impliedFormat":1},{"version":"035312d4945d13efa134ae482f6dc56a1a9346f7ac3be7ccbad5741058ce87f3","affectsGlobalScope":true,"impliedFormat":1},{"version":"07b03f752ae52a7130e06c5a8399d3a0dde07a1a634f8430b80cd6236c56b5c8","impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"acbac4ca6cd4b2b459debc4a274535775cb6278a8315be383fafa623ab78f18e","impliedFormat":1},{"version":"e421d0b097c78304a2597c1f33da586630e1dc665ae381c0c36e5ebc4aaf4566","impliedFormat":1},{"version":"adf624c89a0d509a789f3c0bf522969d2c47033dbeb50920b37cd89be475a65e","impliedFormat":1},{"version":"8ff8dade82d215fba372ec8ca795cb433997a41287e049acf294dd50cba08cc4","impliedFormat":1},{"version":"b32b532dcbe0a91d71fd94cb780e94bdfdce10be21608d914c29fb4b8939b24a","impliedFormat":1},{"version":"eb2b64881998b562a4fe9330e55aa2466cd3a41a1a57e93feac6555218cec06f","impliedFormat":1},{"version":"6db1694d205177322d792d924335b046b80607445a45c0d2de1fcffd190b48c0","impliedFormat":1},{"version":"2b47193137d251e8a5d4cea2d67fe85a68199795ba019e41d635f7cf5f8a35c5","impliedFormat":1},{"version":"f7e5c3960dd9df65d83408b9be446f7119fa1db1dd8266dd343349d90c3bf2ce","impliedFormat":1},{"version":"09c6491ed74af89a4155feafedecaf77780f5751c66d4b65b18d30fc0e053a75","impliedFormat":1},{"version":"188b01044640e5ef65f6edf0dd6e6454f02dd19f4ead66b9e03ebe26cc7298ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"c2be64f223b024c0b70c5096a8c361c9e11c7644f3bd8325d19c2720ee7087cd","impliedFormat":1},{"version":"5bf51107315834a209b08395b141e262b7d143d14f6b4e4d403d8e020cef7e32","impliedFormat":1},{"version":"db0dcbe48d5cb38315083b412c8ab6995b0d42dc73b286833e296827feb0e5b4","impliedFormat":1},{"version":"b3e4a49a3ba19463662e7b821544948b953d2f6708370d42406bda558084000c","impliedFormat":1},{"version":"90bebc017d1c8408719f5a056813cce04e171a53469c263a136c35076121bab0","impliedFormat":1},{"version":"0675f9dddf11b81ec71825d5d97fdd789e445003506255513e0fc829ebfb795a","impliedFormat":1},{"version":"32d1e153cac16ca3a3f5f6b68fae76cddcda509950fa00d038c465776359db0c","impliedFormat":1},{"version":"0d85d0fa55dd433acf924675d7e976c025c8521c91a76079844cd15e52855ccf","impliedFormat":1},{"version":"89da6ea3ee9735e712691227b0e5ee74381779f9ad8b0f4fb7ced0247b16735a","impliedFormat":1},{"version":"37f90d8b4384dae49b873e620b7fff15655c706105104809114ba98df6373124","impliedFormat":1},{"version":"7618f7fdf0abf7f712cefe766ac1ab7fcd1f8e753c513e57d3ada9ada3a57257","impliedFormat":1},{"version":"759df9936f492afeacebec2cea4efafdb647951e0e5edfc4c677ce2441eac9d0","impliedFormat":1},{"version":"8d8848528b40a84ab42200e89d08f3d5cd83efa275de1bb70ae38cb9e6fd5911","impliedFormat":1},{"version":"0e323630cbfda771430e2720f6a2f02f257becd8fb9722aa975ae773fb572210","impliedFormat":1},{"version":"56dbc770513baae28f7cfbadeba5078bb13a37a13132a5292e98a8b103312b98","impliedFormat":1},{"version":"84ff906032fe12e816bfb7441cee6726243e5a7316c4f2d6b0a6c149f1a91a16","impliedFormat":1},{"version":"a8641f25f667160f356c504936576de22899e50ea575d7a4da47fe3b3704dd93","impliedFormat":1},{"version":"dcbbe1fb0f2c0efc12e29db8bbccb5b82513384d01d7a55342065cb0611da272","impliedFormat":1},{"version":"af209189a194cf5ad1f7b22dd680b52843fec2e30f1283be20b2977872fd4424","impliedFormat":1},{"version":"14745f699217e89ff1034f7be978bc28c195472a597b5f36442ef83d954d47b0","impliedFormat":1},{"version":"10c1feac0328f8f90a81f348b7f3c6d3c3b3454e46fc045ba1a706406c58fd8e","impliedFormat":1},{"version":"f64cd565aca17df45f4666473da75e4ce51a2610e2ed1c31198e9f9325747a24","impliedFormat":1},{"version":"e415a17ab6a413d6be640457231e045541405eab1f0f370c7dd1e5567aa25999","impliedFormat":1},{"version":"8c03a41d6dc701b6648db83d71a92dc27147d7677ab5d70f32675e7e37b3795a","impliedFormat":1},{"version":"09c18bc60888c58e8f4568b6ca973af72613a8a01e7b213aab778e910ae18b2f","impliedFormat":1},{"version":"5258d7af58615ea380d959cbcb6d83cb7b9841b8c8267f5a0fcb36c092dadbdb","impliedFormat":1},{"version":"b2d74af681f440a07e714ae9a33e3ea49c79870b9674058114c0404d2aa2f190","impliedFormat":1},{"version":"24f31e43eb3505e5d2946315e7b8ee8b426dfbe92c3031e435a4eb2d9dd8d69f","affectsGlobalScope":true,"impliedFormat":1},{"version":"679f7b45a77210e6dd0d72a4b81fd177868d2eacfd8ee6919ce6babd7512562d","impliedFormat":1},{"version":"c669ee7ba01fa6a60b17c3535f96b65fa82dfd2a475a8760364f2f3952f9bcbd","impliedFormat":1},{"version":"a8b121f6a75d603075e62793ff0c109112e882dd6ca2b70bdccbd8d8f753429b","impliedFormat":1},{"version":"f378d7ed5e3ecbe382ade55127a9c98e826c76f786e06effad6fde91a7023d55","impliedFormat":1},{"version":"4e3e9539df72b3bfcc56fa13140070020dac72f1eff39237b11253482cb99847","impliedFormat":1},{"version":"5a47b3a2bbe2c9b015fe356462afe0abe391c592fffbe277126e2415e0811967","impliedFormat":1},{"version":"a3e797c70a421cda37cdea4349dced37dceb1611669652d9c4c5523467a55cbf","impliedFormat":1},{"version":"9164e652ff4e7cbd993ca20acd0e2ad7e1cb775a7aefc577b506cf588763ec42","impliedFormat":1},{"version":"e52840670587e82e129c9bfc6a2f42d9c2f2e1fd6ce176fea998383a8c941ea5","impliedFormat":1},{"version":"31ca1ee726f5d7c7709913b98be76fc40fdfaaca6ad7fafc222108981e11227c","impliedFormat":1},{"version":"556db73da59f5162cdf5c7ea1bc3b063b6ccb758078ef6517ad6f6e4ae7b199a","impliedFormat":1},{"version":"0a2c8ef08611f5a5f711c7b10ba70d10dc1c6af0c9dba8168cbbf34911b74188","impliedFormat":1},{"version":"1d6ef45145a9939a43062fe18188d4f7bdfdf4547978e1f6b7c9089fe53e81e5","impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"509a86836776d5c821901abc16a2d21de674d2c8943ceb8d018049bf324bc56c","impliedFormat":99},"6fb75b70572bbb0df675403e4f5e68d324c805d4be321744fb9cc66c14089a9b",{"version":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":99},{"version":"8a2ef120c4da7aab664148ed8d283aa0b98df4d5f15c570d830c8998ef05718b","impliedFormat":1},{"version":"4433d18f82991634feae5150a68f9b30f5b05b55416af8ff9f7251fb29431ed5","impliedFormat":1},{"version":"cc5d0b221824b7d8597e8a2bbdad2383af877eb564eaca392992049839e88c9e","impliedFormat":1},{"version":"21898d939444825cee1232af435330610b09171bea22a2f892cf2058d764b63d","impliedFormat":1},{"version":"6ec5f3b496e6f10c4f0a079e3b1102acef9c0bf5e3464909fa6e88b16a26480f","impliedFormat":99},{"version":"d9d320cf31f6d63659484f6c9ca4db4ae673daefa65118dd8589838925ff1397","impliedFormat":99},{"version":"027cf2216d065a97bf5a8ea126b3ea2734fab6cfe32adaff81ab4e94a1b51bbe","impliedFormat":99},{"version":"f6e6313fad233c5141220f7d25eae120cdd6e5079fbe0aba56821a1e99d05df8","impliedFormat":1},{"version":"9534c35b4577c193e499178deb47419fdadddd5e53af5ec8cb88218848013f65","impliedFormat":1},{"version":"804dca323c25404588a6e71d76e52eb09806f05e6013f0be1fcea1fb7eed5fa3","impliedFormat":99},{"version":"aeba529dfa69caa0efcdee1f1455540250d026522e5551b20b8a7ba9eebc707a","impliedFormat":99},{"version":"dfe6945467765f8e7843442a9dfbcf6b5526b6465b07b4c75a54a750329b5f17","impliedFormat":99},{"version":"7f9f6c9fe0e48c401d855d849e28112ffe2425569eca01b08b8c6112b8200695","impliedFormat":99},{"version":"68fcdc663627d12d336b420b19b3e54258844d0cbca0879f711c22aafd853352","impliedFormat":99},{"version":"6e97a7762ca61b836f275a14bf22a1696559bfa01bd6176df9498e717b5ff298","impliedFormat":99},{"version":"86535783bd695ee43e1a403e8cc50b1d643d3741df8074d30fbfae3b0438f996","impliedFormat":99},{"version":"7c94c072f4eef88b15710e2a6dd17036bfd943b390976aecc94af63df2f8a287","impliedFormat":99},{"version":"7e8a2efc54958a4ea7d678671d8703b00ae48a519d0f795a8f44f605abdba3d5","impliedFormat":99},{"version":"1409a9680115403cac91934df0062646e0a77f1b220b60faec5fe26cd775d9ca","impliedFormat":99},{"version":"335226d599a9382c9bea07d37e23bf998c1022c0f67e4d6d2b69633de6ac118f","impliedFormat":99},{"version":"ae430fd9bac320e71c3fe9299d90dcf67555d9a4f97ecaa35947b430ba8648ea","impliedFormat":99},{"version":"9061ff14146280f47d740b344ddd641c16df526ecaa868c348852277a9fb8686","impliedFormat":99},{"version":"7fa70acc5eed701b456f21e33f8f289e9e0e77fdd1f952385c33d6b9ecfb2021","impliedFormat":99},{"version":"16c6bbe197b6bf88db162c620e37218fab4c1c32892132d4aa33e461ae2b990a","impliedFormat":99},{"version":"9778598e1d86d1e544ab77fbc0bb5199d2fbb08ed386b3520732246b90005545","impliedFormat":99},{"version":"feed66ae8815d1981ad575482766fb9a82385e75cce35ae2f13be58e50c4349f","impliedFormat":99},{"version":"7e500d1f51b14c04c6dce8dcbadc5c48f4bec6fca0f321397c165868834916a2","affectsGlobalScope":true,"impliedFormat":99},{"version":"20c1041fbd4f1537686af4b707872b87c90a22201f8979e5def4554d28b46a5b","impliedFormat":99},"1492a06643311a66d01dc0c15259c0dbe7c4d336e7a85cb7ece67085afd2e84f","47ace7a5fa09cb19907ed7cb83a867b05ecff3e10bb229888e24f82b2c03b869","6d878f3072ec5afa5c70f9c13668a98d3bd737a60b9570f6fee4c876f0785fb5","484e21c9eea0ff574a965d93cc3e141ff5863df86182adce9d993dba03113750","d533d1fe3018752aa47ee74ae5dbdca34377441b891176ad99bd33366a64372f","44b82e4f46178400732ea809a906f7ffb9dd38efab331ca23e7ca4586bf903ef","d3dcff003bac57338c3e60be409d0ff167ec1ff513539a5534c7679332dbc992","16d64c89cec74fa23e8cee7c72acc7549f117dcf7845051870c40366c7522d09","11f9f682c02d51de68eed569f8de1e91c56df296a78f3a6c520b93d52aac2308","28b43630d8d29a300e1e5b0f5efb04c8f994d372fff1b653ce8bb70d4e011e1a","b06c48902c3d127098839c1a6500f41d3e21b2f07f277ba7de23ec730df7275d","94659c94bb0ae17efde21aaf59f2beb05d286bea13f2d3b2b288a6df4faeac18","a7a0e658ca429cfb5268d4bf2e2e6e9fe871ffd06b6588d65424ba4eba35338f","ab4c80cb9cf211a7cd100429cb4a823c5bd9f3618bf981e6504c6606abf08656","e60dd3f69310681e28813b910da7d57f5cf0078feccfd683d22a29b45bb7a035","ccd708c3fff99b4ec315e14315dce6b9e85f4c96d10131e9fd219edb6efbdb26","abc924fce33b86b9f8588de3a5be04c609fafa6cb1dc42629b3e9e3e18f7d018","f919e3a8b2d274b631ee4fee0c50eba1d3f39ceaccba04dff915e9f61e9f153c","3ae17ae844491c7326d070c3e70a94a9239394e7a1e84eb203eb1d57470e752e","d1b2970d348eb9f89ef0f0c6730d27e9331067a28f21c8bd667ba1138d5d3e93","b2c4833e6308888c3947953770b3343deaf4276c803bb36148991a3fb90b4f6a","41b7c8204ea79a93e380a228f5c744e9c9a80183133ac62633a4c76e3fdbd7db","d0a441df587b0632c16a813117f110574d903ddd0bc4d28599cc82ff8af7c094","b24ac81f4fcff56ed9827736abcf2f92ea5f86e16d66eb2ee3ccfa0bb8143bc9","068309ff581d08c276c4a772ddf3ab9c8090e591fc9917fdc6cdffc12c95a5bf","5c1d368a451520260ebb6c06121201f18abf86d80540290df6e424d372c5d0ed","bb3ccaacf5c19a7170939b7f735c6a94537fd95ad16b4247a6ad572b23183e74","2c8b86d9d29c4ea62762c3815ffe4fdb0c5dbc0dd096b9703236010f4a17c255","9528dc401d1a2502393af70423c895c3df61ef62240c0dca429a7cd1bd535b82","eebf270ff516980678bf039e03e18a9461f196aee2825d4d65f7d8a1fa362bff","ee4e73f46ce2f6517e82434bd9fc63c8b6b2179d37d74525899f124a76d06669","b04de3a3cd10559130d898b36da5612fda5db2c31c95b502077cad9fe538ed6c","bc4c3476708a74ae09c06bcdbb9765baaa135592e1cf6e25f2ee9a942c6cd5ec","29e6e980f179ac2981d68954462dfd4a4545f73c021f6a4c8a5f442c0e16e56c","faa64d270fa523f80fd31bc7340ee7f6a21632c2ea0cea6535bf5a34bcc6adf7","cbd4ce7ee090549d836cbffac2e76a192ac5b1c5f15bcbe29c06d32dc7006f34","ea5a5d5873c239b97d846fb8c78437e08ffd731924764f746c0ebcb7731d7648","fb6b5b4592e0eca5b8dc2507432e621a18c16d488ae8a610e4d1ddba1edff667","df85ab12f80aced067959d43bd7744017fccb1eb95adcfa343f16cba7c9ef670","613df14d2c8c0ba78286705c4ed01ec701ed03189ca3803dd69bc7086b9c02ff","298f8d2584216932ea238927177ef343d0b8da735eb40a5ba96b1f92e3675e33","7251030d0662b66ffa03f1c75c81ea0e564c9f6c872b0658a25e64f35b68ce7a","c7aae030db999a44577cda213fc5d9b2cac4e55d8572ed5110fe6d187ba502c0","6f1302be2fa00d8a64e3bd48b4ccdf5d77a402441d7728d48c2ecee706c79127","6732e7ad2c80ba3cb1401747b84a5bb72398cabf5f66c6ffa0b987aef9cfaa1d","c1e64c51dadfcea7b7995040c64b5ac7e8f954f2a4adf4eb92e7a462ba5275e8","bc7f95b0d6bad663e863ac377dc7ca204f98b5d45e26a3a98322b749174b212b","0980c5ed20b37d5590006581385fa0978231b063b1568ab20ce89f9d20d7bcf6","6b4f6597bc1bd012b4f4a432712d47a8e8f8f6afa8b31eb09e87b4eaade18dbd","1faecae140107164a7fa6a970b002ba0111507d7b8181ecff0803eb9d467ff9b","665236eec0c0da8d3f7cdba8f01f98233425d8c065058e513b33385e417a56d2","50e8918146f4e8a9240bf867a07cf8aa0deb21fee8d4507e74ff62c8c6af42e9","666640b08e3ce76b6a8c76ce1f9f5b986923d3c76663b7fa4bc36e3af734ec46","06a0c1d5391b25d56e45a6c22e70c87fe7a516603415c190fc9438e53982d5ec","fc20037da0ee727162eafe9263777bf740ae1c8c9d9ceb8a03479fc03033604e","7576b47f944aa81cf93b340906a69198a1bf7df6ec6afa95411682342e5aba21","c4b63e6286ac9d65ad79395357a987ec2aa84c3a0aa2e52a89e18b8cb5dc6361","decf3bcc06a7593b3252de611ab5fd89d67e45ba25b722e8c1c2780ff5cd9893","55d887b9317029846bc0a38d5db8e8e4b0d25bf3069cc340fa89ad030dbb0f06","09a66153ea0f485d886a8cb3fa99c6d4854d12780acde17d8798039949d5b468","12b36faab2cca51d73cf516f5b1d623d1b9aa65199112b6678db5af1c2c3c8f5","a4372188a04177bcacc9675a498e5b7db0cf1780db7a7bc54fc342e19fb31d91","bcc85da2796bd50bfcd5242d6ad8550774fcddaa0488ba1955fb9a763eda7457","cd64b34e8875a6ac5d727f237344998d529ad7a4bef401908de1587cc8c8c7ca","8aef56fa48c05b90e1342fac86649d390de81b985cc9c40c5a1024b331626344","7a82c7b4bfaea3d44e2241353697693daed6881743cec95d1814c23fbfb993bd","61bb1099994be652580d1ac07986a6aa7bf04643fe20ea3fd15148b0ef0f9c4c","0f734c3a2e7c958fa9f82068c541ba3a3fd119dcfb242bbf761b49e91098ce7b","658522866e9c6b8c7ddc5c8502901c08217c0edcd8b868ddb926369d070c4b40","8b157145ca9be70e446f1885f4418babbc9f991704b419106d59584a1670810b","ee57677277db2c2c2b43ff9a860a1a77a47e904170fa856bc3b717d741da0955","a45d84ce55cf73c7de8b034a26fe7db782c42138bee10b0ee8f763445aad9b38","88c4fd5982524a18a8a3e509d4e4bdd4925ea726ca0c650345574bc5f104e1b8","91af1658cb34a091f6e1bb51a0595314f6137c10cec58e743c4214d775e034ff","b66707253e2bdaf88977affb69ea43fc86340481e63013f23bfc52a984dd924c","8177a2190ccc0237516018f568324bcb29031e058320d30a11060316daa14889",{"version":"198889697f5996e93e7d998b7f78ed4fe469ffb10f484b4dc1e76e2900858147","impliedFormat":99},{"version":"3ab07387c3e51e84a5b980fbe4eabfa1a08f155f973452c80ab24a29b06492d4","impliedFormat":99},{"version":"35a4aaa135f2f35947c1e598a1ca145474aa41fe350e0cf33908884f2c852849","impliedFormat":99},{"version":"059363774c3dbcfef5694e9ed2f466723819eae3f31a48ee1e9220427563f63a","impliedFormat":99},{"version":"3cf6c8abd18a778facc501e83977d3712e5d79b470b23c2032e06099399352d2","impliedFormat":99},{"version":"1d57a8761453981ee7d877d57a167b6dde524a402442104c04232851fac75590","signature":"ddb8561043d45cbdec289e9bfa7bf59f66aeb538a6a3f5be61ba8b8ad95369f1"},{"version":"ddb178f37df03f84cd40d94b186f96f8fd33eec917130579bbbb3093d0442fe1","signature":"688cde7dcdcf737180fa9c5ca0f3661796a52c430321e319b9f832a8a7efdd3e"},{"version":"8baf93e0d427323285f263b21ccec6ad9ed235b4495a040c6d1d1101b3a2e01d","signature":"79ec436981790074305d3dcbaedbda64bb1c018c2733415139391dd3b28965b2"},{"version":"b8ba3569721d7066b5d9ea6e5d4641fb8ac1a442b6feb0376d05e602259d5438","signature":"b21ad96995ae88c2918d1cd1ea626d8cd329e3980f84700f73d9af5c176bb37b"}],"root":[[209,212]],"options":{"composite":true,"declaration":true,"declarationDir":"./","declarationMap":true,"emitDeclarationOnly":true,"exactOptionalPropertyTypes":true,"jsx":4,"jsxImportSource":"@lynx-js/react","module":99,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"strict":true,"target":6,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[206,1],[207,2],[208,3],[205,4],[204,5],[97,6],[115,7],[104,8],[116,9],[123,10],[125,11],[124,12],[106,13],[109,14],[110,2],[112,15],[113,16],[120,17],[119,18],[121,19],[122,18],[127,20],[126,21],[88,22],[90,23],[94,24],[91,25],[92,26],[87,27],[89,28],[44,29],[82,30],[73,31],[59,32],[56,31],[80,33],[57,31],[78,34],[58,35],[83,36],[66,35],[61,31],[60,37],[75,35],[81,38],[79,35],[62,31],[70,35],[71,35],[63,37],[69,35],[64,35],[67,35],[68,31],[76,35],[65,31],[72,35],[74,35],[47,39],[54,40],[85,41],[55,42],[95,43],[45,39],[46,44],[51,45],[52,46],[50,47],[41,48],[96,49],[108,50],[107,16],[103,16],[101,16],[102,51],[100,16],[128,52],[181,53],[131,54],[177,55],[183,56],[184,57],[185,57],[190,58],[186,57],[188,59],[187,60],[189,61],[182,59],[191,52],[192,61],[196,62],[193,61],[194,57],[173,52],[195,63],[176,64],[199,65],[197,66],[198,67],[172,66],[200,68],[201,69],[203,70],[202,71],[175,72],[174,73],[135,74],[134,75],[136,76],[141,77],[138,75],[140,78],[139,74],[150,79],[146,80],[149,81],[148,82],[154,83],[155,83],[153,84],[157,85],[156,84],[171,86],[159,87],[160,88],[161,89],[164,90],[166,91],[163,92],[165,93],[169,94],[170,95],[212,96],[211,97],[210,98],[209,99]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
@@ -0,0 +1,4 @@
1
+ export { createIntroCarouselController, G9IntroCarousel, type G9IntroCarouselController, type G9IntroCarouselProps, useIntroCarousel, } from './intro-carousel.js';
2
+ export { type G9IntroMediaConfig, G9IntroMediaController, type G9IntroMediaOptions, type G9IntroMediaSnapshot, } from './media.js';
3
+ export { clampIntroIndex, type G9IntroFallbackReason, type G9IntroSlideItem, g9IntroMetrics, introImageSource, introOverlayOpacities, introSlideHasVideo, introVideoSource, } from './model.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,6BAA6B,EAC7B,eAAe,EACf,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,KAAK,kBAAkB,EACvB,sBAAsB,EACtB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GAC1B,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,eAAe,EACf,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,SAAS,CAAC"}
package/dist/index.jsx ADDED
@@ -0,0 +1,3 @@
1
+ export { G9IntroCarousel, createIntroCarouselController, useIntroCarousel } from "./intro-carousel.jsx";
2
+ export { G9IntroMediaController } from "./media.jsx";
3
+ export { clampIntroIndex, g9IntroMetrics, introImageSource, introOverlayOpacities, introSlideHasVideo, introVideoSource } from "./model.jsx";
@@ -0,0 +1,117 @@
1
+ .g9-intro {
2
+ width: 100%;
3
+ height: 100%;
4
+ position: relative;
5
+ overflow: hidden;
6
+ }
7
+
8
+ .g9-intro__media, .g9-intro__cover, .g9-intro__overlay, .g9-intro__swiper {
9
+ position: absolute;
10
+ top: 0;
11
+ bottom: 0;
12
+ left: 0;
13
+ right: 0;
14
+ }
15
+
16
+ .g9-intro__image, .g9-intro__page {
17
+ width: 100%;
18
+ height: 100%;
19
+ }
20
+
21
+ .g9-intro__spinner {
22
+ pointer-events: none;
23
+ justify-content: center;
24
+ align-items: center;
25
+ display: flex;
26
+ position: absolute;
27
+ top: 0;
28
+ bottom: 0;
29
+ left: 0;
30
+ right: 0;
31
+ }
32
+
33
+ .g9-intro__chrome {
34
+ pointer-events: none;
35
+ flex-direction: column;
36
+ padding: 16px 20px 20px;
37
+ display: flex;
38
+ position: absolute;
39
+ top: 0;
40
+ bottom: 0;
41
+ left: 0;
42
+ right: 0;
43
+ }
44
+
45
+ .g9-intro__header {
46
+ flex-direction: row;
47
+ justify-content: space-between;
48
+ align-items: center;
49
+ margin-top: 48px;
50
+ display: flex;
51
+ }
52
+
53
+ .g9-intro__language, .g9-intro__nav, .g9-intro__cta {
54
+ pointer-events: auto;
55
+ }
56
+
57
+ .g9-intro__spacer {
58
+ flex: 1;
59
+ }
60
+
61
+ .g9-intro__text {
62
+ flex-direction: column;
63
+ gap: 6px;
64
+ margin-bottom: 12px;
65
+ display: flex;
66
+ }
67
+
68
+ .g9-intro__title {
69
+ color: #fff;
70
+ font-size: 18px;
71
+ font-weight: 700;
72
+ }
73
+
74
+ .g9-intro__subtitle {
75
+ color: #fff;
76
+ font-size: 14px;
77
+ }
78
+
79
+ .g9-intro__steps {
80
+ flex-direction: row;
81
+ gap: 6px;
82
+ margin-bottom: 12px;
83
+ display: flex;
84
+ }
85
+
86
+ .g9-intro__step {
87
+ background-color: #ffffff73;
88
+ border-radius: 2px;
89
+ height: 4px;
90
+ }
91
+
92
+ .g9-intro__step--active {
93
+ background-color: #fff;
94
+ }
95
+
96
+ .g9-intro__nav-row {
97
+ flex-direction: row;
98
+ justify-content: space-between;
99
+ margin-bottom: 12px;
100
+ display: flex;
101
+ }
102
+
103
+ .g9-intro__nav {
104
+ flex-direction: row;
105
+ align-items: center;
106
+ gap: 4px;
107
+ min-height: 48px;
108
+ display: flex;
109
+ }
110
+
111
+ .g9-intro__nav-text {
112
+ color: #fff;
113
+ font-size: 14px;
114
+ }
115
+
116
+
117
+ /*# sourceMappingURL=intro-carousel.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["webpack://./src/intro-carousel.css"],"names":[],"mappings":"AACA;EAAE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,gBAAgB;AAClB;;AAGA;EAAE,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAMA;EAHE,WAAW;EACX,YAAY;AACd;;AAWA;EARE,oBAAoB;EACpB,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;EACb,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAWA;EARE,oBAAoB;EACpB,sBAAsB;EACtB,uBAAuB;EACvB,aAAa;EACb,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAWA;EARE,mBAAmB;EACnB,8BAA8B;EAC9B,mBAAmB;EACnB,gBAAgB;EAChB,aAAa;AACf;;AAWA;EARE,oBAAoB;AACtB;;AAaA;EAVE,OAAO;AACT;;AAaA;EAVE,sBAAsB;EACtB,QAAQ;EACR,mBAAmB;EACnB,aAAa;AACf;;AAaA;EAVE,WAAW;EACX,eAAe;EACf,gBAAgB;AAClB;;AAaA;EAVE,WAAW;EACX,eAAe;AACjB;;AAaA;EAVE,mBAAmB;EACnB,QAAQ;EACR,mBAAmB;EACnB,aAAa;AACf;;AAaA;EAVE,2BAA2B;EAC3B,kBAAkB;EAClB,WAAW;AACb;;AAaA;EAVE,sBAAsB;AACxB;;AAaA;EAVE,mBAAmB;EACnB,8BAA8B;EAC9B,mBAAmB;EACnB,aAAa;AACf;;AAaA;EAVE,mBAAmB;EACnB,mBAAmB;EACnB,QAAQ;EACR,gBAAgB;EAChB,aAAa;AACf;;AAaA;EAVE,WAAW;EACX,eAAe;AACjB","sourcesContent":["/* G9IntroCarousel (MAUI G9IntroCarousel): media slot, overlay, swipe layer, chrome. No text shadows (MAUI removed them). */\n.g9-intro {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n\n.g9-intro__media,\n.g9-intro__cover,\n.g9-intro__overlay,\n.g9-intro__swiper {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n\n.g9-intro__image {\n width: 100%;\n height: 100%;\n}\n\n.g9-intro__page {\n width: 100%;\n height: 100%;\n}\n\n.g9-intro__spinner {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: none;\n}\n\n.g9-intro__chrome {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: flex;\n flex-direction: column;\n padding: 16px 20px 20px 20px;\n pointer-events: none;\n}\n\n.g9-intro__header {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n margin-top: 48px;\n}\n\n.g9-intro__language,\n.g9-intro__nav,\n.g9-intro__cta {\n pointer-events: auto;\n}\n\n.g9-intro__spacer {\n flex: 1;\n}\n\n.g9-intro__text {\n display: flex;\n flex-direction: column;\n gap: 6px;\n margin-bottom: 12px;\n}\n\n.g9-intro__title {\n font-size: 18px;\n font-weight: 700;\n color: #ffffff;\n}\n\n.g9-intro__subtitle {\n font-size: 14px;\n color: #ffffff;\n}\n\n.g9-intro__steps {\n display: flex;\n flex-direction: row;\n gap: 6px;\n margin-bottom: 12px;\n}\n\n.g9-intro__step {\n height: 4px;\n border-radius: 2px;\n background-color: rgba(255, 255, 255, 0.45);\n}\n\n.g9-intro__step--active {\n background-color: #ffffff;\n}\n\n.g9-intro__nav-row {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-bottom: 12px;\n}\n\n.g9-intro__nav {\n min-height: 48px;\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n}\n\n.g9-intro__nav-text {\n font-size: 14px;\n color: #ffffff;\n}\n"],"sourceRoot":""}
@@ -0,0 +1,62 @@
1
+ import './intro-carousel.css';
2
+ import type { G9ImageSource } from '@g9tm/lynxcontrols-foundation';
3
+ import { type ReactNode } from '@lynx-js/react';
4
+ import { type G9IntroMediaOptions } from './media.js';
5
+ import { type G9IntroFallbackReason, type G9IntroSlideItem } from './model.js';
6
+ /** Imperative handle (MAUI `BeginPresentation` / `StopAndReleaseMedia`), from {@link useIntroCarousel}. */
7
+ export interface G9IntroCarouselController {
8
+ /** Starts the media (and the startup cover) once the carousel is on screen. */
9
+ beginPresentation(): void;
10
+ /** Stops and releases the player, e.g. before the page goes away. */
11
+ stopAndReleaseMedia(): void;
12
+ /** @internal set by the mounted carousel */
13
+ bind(target: {
14
+ begin(): void;
15
+ release(): void;
16
+ }): () => void;
17
+ }
18
+ /** Creates a controller outside React. */
19
+ export declare function createIntroCarouselController(): G9IntroCarouselController;
20
+ /** A stable controller for a `G9IntroCarousel`. */
21
+ export declare function useIntroCarousel(): G9IntroCarouselController;
22
+ /** Props of {@link G9IntroCarousel} (MAUI bindable properties, commands and events). */
23
+ export interface G9IntroCarouselProps extends Partial<G9IntroMediaOptions> {
24
+ /** Brand logo above the slide text; none by default (MAUI `LogoSource`). */
25
+ readonly logoSource?: string | G9ImageSource | null;
26
+ readonly slides?: readonly G9IntroSlideItem[];
27
+ /** Controlled slide (MAUI `CurrentIndex`, two-way). */
28
+ readonly currentIndex?: number;
29
+ readonly defaultCurrentIndex?: number;
30
+ readonly onCurrentIndexChange?: (index: number) => void;
31
+ /** Bottom (or flat) overlay opacity. Default 0.52. */
32
+ readonly overlayOpacity?: number;
33
+ readonly useGradientOverlay?: boolean;
34
+ /** Gradient top = bottom × ratio unless `overlayTopOpacity` is set. Default 0.4. */
35
+ readonly overlayTopOpacityRatio?: number;
36
+ readonly overlayTopOpacity?: number | null;
37
+ /** Default black. */
38
+ readonly overlayColor?: string;
39
+ /** The header language button (MAUI `LanguageCommand`); hidden without it. */
40
+ readonly onLanguage?: () => void;
41
+ /** The sign-in call to action (MAUI `CompleteCommand`). */
42
+ readonly onComplete?: () => void;
43
+ /** Once, the first time real content is on screen (MAUI `FirstContentReady`). */
44
+ readonly onFirstContentReady?: () => void;
45
+ /** A video slide showed its image instead, and why (desktop video stays `'video-unsupported'` until D14). */
46
+ readonly onMediaFallback?: (index: number, reason: G9IntroFallbackReason) => void;
47
+ /** Start presenting on mount. Default true; set false and call `beginPresentation()` yourself (MAUI login flow). */
48
+ readonly autoBegin?: boolean;
49
+ /** While false the media is released (page in the background, carousel hidden). Default true. */
50
+ readonly active?: boolean;
51
+ readonly controller?: G9IntroCarouselController;
52
+ readonly className?: string;
53
+ }
54
+ /**
55
+ * Full-screen onboarding slides (MAUI `G9IntroCarousel`): one media slot behind a dark (flat or gradient) overlay,
56
+ * logo, localized title and subtitle, step pills, previous / next (swapped in RTL), a language button and the sign-in
57
+ * call to action. Slides swipe through lynx-ui `Swiper`. Video goes through `services.media`
58
+ * (`supportsVideo` / `createPlayer`); when it cannot play, the slide image shows and `onMediaFallback` says why. The
59
+ * player is released on slide change, when `active` turns false, on `stopAndReleaseMedia()` and on unmount.
60
+ */
61
+ export declare function G9IntroCarousel(props: G9IntroCarouselProps): ReactNode;
62
+ //# sourceMappingURL=intro-carousel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intro-carousel.d.ts","sourceRoot":"","sources":["../src/intro-carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAc9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EAAE,KAAK,SAAS,EAAoD,MAAM,gBAAgB,CAAC;AAClG,OAAO,EAA0B,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EAGtB,MAAM,SAAS,CAAC;AAEjB,2GAA2G;AAC3G,MAAM,WAAW,yBAAyB;IACxC,+EAA+E;IAC/E,iBAAiB,IAAI,IAAI,CAAC;IAC1B,qEAAqE;IACrE,mBAAmB,IAAI,IAAI,CAAC;IAC5B,4CAA4C;IAC5C,IAAI,CAAC,MAAM,EAAE;QAAE,KAAK,IAAI,IAAI,CAAC;QAAC,OAAO,IAAI,IAAI,CAAA;KAAE,GAAG,MAAM,IAAI,CAAC;CAC9D;AAED,0CAA0C;AAC1C,wBAAgB,6BAA6B,IAAI,yBAAyB,CAYzE;AAED,mDAAmD;AACnD,wBAAgB,gBAAgB,IAAI,yBAAyB,CAI5D;AAED,wFAAwF;AACxF,MAAM,WAAW,oBAAqB,SAAQ,OAAO,CAAC,mBAAmB,CAAC;IACxE,4EAA4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;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,SAAS,CAgOtE"}
@@ -0,0 +1,232 @@
1
+ import "./intro-carousel.css";
2
+ import { startTimer, stopTimer, useControllableState } from "@g9tm/lynxcontrols/base";
3
+ import { G9Button } from "@g9tm/lynxcontrols/button";
4
+ import { G9ActivityIndicator } from "@g9tm/lynxcontrols/display";
5
+ import { G9IconSlot } from "@g9tm/lynxcontrols/icon";
6
+ import { useG9Core, useG9Diagnostics, useG9Direction, useG9OptionalService, useG9Settings, useG9Strings, useG9Window } from "@g9tm/lynxcontrols/provider";
7
+ import { Swiper } from "@lynx-js/lynx-ui-swiper";
8
+ import { useEffect, useMemo, useRef, useSyncExternalStore } from "@lynx-js/react";
9
+ import { G9IntroMediaController } from "./media.jsx";
10
+ import { clampIntroIndex, g9IntroMetrics, introOverlayOpacities } from "./model.jsx";
11
+ function createIntroCarouselController() {
12
+ let target = null;
13
+ return {
14
+ beginPresentation: ()=>null == target ? void 0 : target.begin(),
15
+ stopAndReleaseMedia: ()=>null == target ? void 0 : target.release(),
16
+ bind (next) {
17
+ target = next;
18
+ return ()=>{
19
+ if (target === next) target = null;
20
+ };
21
+ }
22
+ };
23
+ }
24
+ function useIntroCarousel() {
25
+ const ref = useRef(null);
26
+ if (null === ref.current) ref.current = createIntroCarouselController();
27
+ return ref.current;
28
+ }
29
+ const hex2 = (n)=>Math.round(255 * Math.min(Math.max(n, 0), 1)).toString(16).padStart(2, '0');
30
+ function withAlpha(color, alpha) {
31
+ return /^#[0-9a-f]{6}$/i.test(color) ? `${color}${hex2(alpha)}` : color;
32
+ }
33
+ function G9IntroCarousel(props) {
34
+ var _props_slides, _props_defaultCurrentIndex, _props_active, _props_overlayOpacity, _props_overlayTopOpacityRatio, _props_overlayTopOpacity, _props_overlayColor, _props_className, _snap_fallback, _props_startupCoverFadeDurationMs;
35
+ const slides = null != (_props_slides = props.slides) ? _props_slides : [];
36
+ const strings = useG9Strings();
37
+ const settings = useG9Settings();
38
+ const rtl = 'rtl' === useG9Direction();
39
+ const win = useG9Window();
40
+ const core = useG9Core();
41
+ const media = useG9OptionalService('media');
42
+ const diagnostics = useG9Diagnostics();
43
+ const [rawIndex, setIndex] = useControllableState({
44
+ value: props.currentIndex,
45
+ defaultValue: null != (_props_defaultCurrentIndex = props.defaultCurrentIndex) ? _props_defaultCurrentIndex : 0,
46
+ onChange: props.onCurrentIndexChange,
47
+ name: 'G9IntroCarousel.currentIndex'
48
+ });
49
+ const index = clampIntroIndex(rawIndex, slides.length);
50
+ const latest = useRef(props);
51
+ latest.current = props;
52
+ const mediaRef = useRef(media);
53
+ mediaRef.current = media;
54
+ const controller = useMemo(()=>new G9IntroMediaController({
55
+ setTimer: (cb, ms)=>startTimer(cb, ms),
56
+ clearTimer: (h)=>stopTimer(h),
57
+ now: ()=>core.services.clock.monotonicNow(),
58
+ provider: ()=>mediaRef.current,
59
+ options: ()=>{
60
+ var _p_useMediaFadeTransitions, _p_useVideoLoopFade, _p_skipFirstSlideInitialFadeIn, _p_mediaFadeInDurationMs, _p_mediaFadeOutDurationMs, _p_startupCoverImageSource, _p_startupCoverDurationMs, _p_startupCoverFadeDurationMs, _p_initialVideoStartSeconds;
61
+ const p = latest.current;
62
+ return {
63
+ useMediaFadeTransitions: null != (_p_useMediaFadeTransitions = p.useMediaFadeTransitions) ? _p_useMediaFadeTransitions : true,
64
+ useVideoLoopFade: null != (_p_useVideoLoopFade = p.useVideoLoopFade) ? _p_useVideoLoopFade : true,
65
+ skipFirstSlideInitialFadeIn: null != (_p_skipFirstSlideInitialFadeIn = p.skipFirstSlideInitialFadeIn) ? _p_skipFirstSlideInitialFadeIn : true,
66
+ mediaFadeInDurationMs: null != (_p_mediaFadeInDurationMs = p.mediaFadeInDurationMs) ? _p_mediaFadeInDurationMs : g9IntroMetrics.mediaFadeInDurationMs,
67
+ mediaFadeOutDurationMs: null != (_p_mediaFadeOutDurationMs = p.mediaFadeOutDurationMs) ? _p_mediaFadeOutDurationMs : g9IntroMetrics.mediaFadeOutDurationMs,
68
+ startupCoverImageSource: null != (_p_startupCoverImageSource = p.startupCoverImageSource) ? _p_startupCoverImageSource : null,
69
+ startupCoverDurationMs: null != (_p_startupCoverDurationMs = p.startupCoverDurationMs) ? _p_startupCoverDurationMs : 0,
70
+ startupCoverFadeDurationMs: null != (_p_startupCoverFadeDurationMs = p.startupCoverFadeDurationMs) ? _p_startupCoverFadeDurationMs : g9IntroMetrics.startupCoverFadeDurationMs,
71
+ initialVideoStartSeconds: null != (_p_initialVideoStartSeconds = p.initialVideoStartSeconds) ? _p_initialVideoStartSeconds : 0
72
+ };
73
+ },
74
+ onFirstContentReady: ()=>{
75
+ var _latest_current_onFirstContentReady, _latest_current;
76
+ return null == (_latest_current_onFirstContentReady = (_latest_current = latest.current).onFirstContentReady) ? void 0 : _latest_current_onFirstContentReady.call(_latest_current);
77
+ },
78
+ onFallback: (i, reason)=>{
79
+ var _latest_current_onMediaFallback, _latest_current;
80
+ return null == (_latest_current_onMediaFallback = (_latest_current = latest.current).onMediaFallback) ? void 0 : _latest_current_onMediaFallback.call(_latest_current, i, reason);
81
+ },
82
+ onError: (error)=>diagnostics.log({
83
+ level: 'warning',
84
+ message: 'G9IntroCarousel: media failed.',
85
+ source: 'G9IntroCarousel',
86
+ error
87
+ })
88
+ }), []);
89
+ const snap = useSyncExternalStore(controller.subscribe, controller.getSnapshot);
90
+ const slidesRef = useRef(slides);
91
+ slidesRef.current = slides;
92
+ const indexRef = useRef(index);
93
+ indexRef.current = index;
94
+ const active = null != (_props_active = props.active) ? _props_active : true;
95
+ useEffect(()=>{
96
+ var _props_autoBegin;
97
+ if (!active) return void controller.release();
98
+ if (null != (_props_autoBegin = props.autoBegin) ? _props_autoBegin : true) controller.begin(slidesRef.current, indexRef.current);
99
+ }, [
100
+ active
101
+ ]);
102
+ useEffect(()=>{
103
+ if (controller.isPresented) controller.show(slides, index);
104
+ }, [
105
+ index,
106
+ slides
107
+ ]);
108
+ useEffect(()=>{
109
+ var _props_controller;
110
+ return null == (_props_controller = props.controller) ? void 0 : _props_controller.bind({
111
+ begin: ()=>controller.begin(slidesRef.current, indexRef.current),
112
+ release: ()=>controller.release()
113
+ });
114
+ }, [
115
+ props.controller
116
+ ]);
117
+ useEffect(()=>()=>controller.dispose(), []);
118
+ const swiper = useRef(null);
119
+ const go = (next)=>{
120
+ const target = clampIntroIndex(next, slides.length);
121
+ if (target === index) return;
122
+ setIndex(target);
123
+ try {
124
+ var _swiper_current;
125
+ null == (_swiper_current = swiper.current) || _swiper_current.swipeTo(target, {
126
+ animate: true
127
+ });
128
+ } catch {}
129
+ };
130
+ const overlay = introOverlayOpacities({
131
+ overlayOpacity: null != (_props_overlayOpacity = props.overlayOpacity) ? _props_overlayOpacity : g9IntroMetrics.overlayOpacity,
132
+ useGradientOverlay: true === props.useGradientOverlay,
133
+ overlayTopOpacityRatio: null != (_props_overlayTopOpacityRatio = props.overlayTopOpacityRatio) ? _props_overlayTopOpacityRatio : g9IntroMetrics.overlayTopOpacityRatio,
134
+ overlayTopOpacity: null != (_props_overlayTopOpacity = props.overlayTopOpacity) ? _props_overlayTopOpacity : null
135
+ });
136
+ const color = null != (_props_overlayColor = props.overlayColor) ? _props_overlayColor : '#000000';
137
+ const overlayStyle = props.useGradientOverlay ? {
138
+ backgroundImage: `linear-gradient(to bottom, ${withAlpha(color, overlay.top)}, ${withAlpha(color, overlay.bottom)})`
139
+ } : {
140
+ backgroundColor: color,
141
+ opacity: overlay.bottom
142
+ };
143
+ const slide = slides[index];
144
+ const resolve = (key, fallback)=>{
145
+ var _strings_resolve;
146
+ return key ? null != (_strings_resolve = strings.resolve(key)) ? _strings_resolve : fallback : fallback;
147
+ };
148
+ const nextLabel = resolve('IntroNext', 'Next');
149
+ const prevLabel = resolve('IntroPrevious', 'Previous');
150
+ const prev = <view key="prev" className="g9-intro__nav g9-intro__nav--prev" style={{
151
+ opacity: index > 0 ? 1 : 0
152
+ }} accessibility-element accessibility-traits="button" accessibility-label={prevLabel} bindtap={index > 0 ? ()=>go(index - 1) : void 0}>
153
+ <G9IconSlot icon={rtl ? settings.glyphs.chevronForward : settings.glyphs.chevronBack} size={20} color="#ffffff"/>
154
+ <text className="g9-intro__nav-text">{prevLabel}</text>
155
+ </view>;
156
+ const next = <view key="next" className="g9-intro__nav g9-intro__nav--next" style={{
157
+ opacity: index < slides.length - 1 ? 1 : 0
158
+ }} accessibility-element accessibility-traits="button" accessibility-label={nextLabel} bindtap={index < slides.length - 1 ? ()=>go(index + 1) : void 0}>
159
+ <text className="g9-intro__nav-text">{nextLabel}</text>
160
+ <G9IconSlot icon={rtl ? settings.glyphs.chevronBack : settings.glyphs.chevronForward} size={20} color="#ffffff"/>
161
+ </view>;
162
+ const logo = props.logoSource ? 'string' == typeof props.logoSource ? {
163
+ imagePath: props.logoSource
164
+ } : {
165
+ image: props.logoSource
166
+ } : null;
167
+ return <view className={`g9-intro ${null != (_props_className = props.className) ? _props_className : ''}`} style={{
168
+ backgroundColor: g9IntroMetrics.backdropColor
169
+ }}>
170
+ <view className={`g9-intro__media g9-intro__media--${snap.kind}`} data-fallback={null != (_snap_fallback = snap.fallback) ? _snap_fallback : ''} style={{
171
+ opacity: snap.visible ? 1 : 0,
172
+ transition: `opacity ${snap.fadeMs}ms ease-in-out`
173
+ }}>
174
+ {'video' === snap.kind && snap.player ? snap.player.view : null}
175
+ {'image' === snap.kind && snap.imageUri ? <image className="g9-intro__image" src={snap.imageUri} mode="aspectFill"/> : null}
176
+ </view>
177
+ {props.startupCoverImageSource ? <image className="g9-intro__cover" src={props.startupCoverImageSource} mode="aspectFill" style={{
178
+ opacity: snap.coverVisible ? 1 : 0,
179
+ transition: `opacity ${null != (_props_startupCoverFadeDurationMs = props.startupCoverFadeDurationMs) ? _props_startupCoverFadeDurationMs : g9IntroMetrics.startupCoverFadeDurationMs}ms ease-out`
180
+ }}/> : null}
181
+ <view className="g9-intro__overlay" style={overlayStyle}/>
182
+ <Swiper ref={swiper} style={{
183
+ position: 'absolute',
184
+ top: '0px',
185
+ left: '0px',
186
+ right: '0px',
187
+ bottom: '0px'
188
+ }} data={slides} itemWidth={win.width} initialIndex={index} RTL={rtl} onChange={(current)=>{
189
+ if (current !== indexRef.current) setIndex(clampIntroIndex(current, slidesRef.current.length));
190
+ }}>
191
+ {({ index: i })=><view key={i} className="g9-intro__page"/>}
192
+ </Swiper>
193
+ {snap.loading ? <view className="g9-intro__spinner">
194
+ <G9ActivityIndicator running size={28} color="#ffffff"/>
195
+ </view> : null}
196
+ <view className="g9-intro__chrome">
197
+ <view className="g9-intro__header">
198
+ {logo ? <G9IconSlot {...logo} size={g9IntroMetrics.logoHeight}/> : <view/>}
199
+ {props.onLanguage ? <view className="g9-intro__language" accessibility-element accessibility-traits="button" bindtap={()=>{
200
+ var _latest_current_onLanguage, _latest_current;
201
+ return null == (_latest_current_onLanguage = (_latest_current = latest.current).onLanguage) ? void 0 : _latest_current_onLanguage.call(_latest_current);
202
+ }}>
203
+ <G9IconSlot icon="language" size={22} color="#ffffff"/>
204
+ </view> : null}
205
+ </view>
206
+ <view className="g9-intro__spacer"/>
207
+ <view className="g9-intro__text">
208
+ <text className="g9-intro__title">{resolve(null == slide ? void 0 : slide.titleResourceKey, '')}</text>
209
+ <text className="g9-intro__subtitle">{resolve(null == slide ? void 0 : slide.subtitleResourceKey, '')}</text>
210
+ </view>
211
+ <view className="g9-intro__steps">
212
+ {slides.map((_, i)=><view key={i} className={`g9-intro__step${i === index ? ' g9-intro__step--active' : ''}`} style={{
213
+ width: `${i === index ? g9IntroMetrics.stepActiveWidth : g9IntroMetrics.stepInactiveWidth}px`
214
+ }}/>)}
215
+ </view>
216
+ <view className="g9-intro__nav-row">{rtl ? [
217
+ next,
218
+ prev
219
+ ] : [
220
+ prev,
221
+ next
222
+ ]}</view>
223
+ <G9Button className="g9-intro__cta" text={resolve('IntroSignIn', 'Sign in to your account')} onPress={()=>{
224
+ var _latest_current_onComplete, _latest_current;
225
+ return null == (_latest_current_onComplete = (_latest_current = latest.current).onComplete) ? void 0 : _latest_current_onComplete.call(_latest_current);
226
+ }}/>
227
+ </view>
228
+ </view>;
229
+ }
230
+ export { G9IntroCarousel, createIntroCarouselController, useIntroCarousel };
231
+
232
+ //# sourceMappingURL=intro-carousel.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intro-carousel.jsx","sources":["../src/intro-carousel.tsx"],"sourcesContent":["import './intro-carousel.css';\nimport { startTimer, stopTimer, useControllableState } from '@g9tm/lynxcontrols/base';\nimport { G9Button } from '@g9tm/lynxcontrols/button';\nimport { G9ActivityIndicator } from '@g9tm/lynxcontrols/display';\nimport { G9IconSlot } from '@g9tm/lynxcontrols/icon';\nimport {\n useG9Core,\n useG9Diagnostics,\n useG9Direction,\n useG9OptionalService,\n useG9Settings,\n useG9Strings,\n useG9Window,\n} from '@g9tm/lynxcontrols/provider';\nimport type { G9ImageSource } from '@g9tm/lynxcontrols-foundation';\nimport { Swiper, type SwiperRef } from '@lynx-js/lynx-ui-swiper';\nimport { type ReactNode, useEffect, useMemo, useRef, useSyncExternalStore } from '@lynx-js/react';\nimport { G9IntroMediaController, type G9IntroMediaOptions } from './media';\nimport {\n clampIntroIndex,\n type G9IntroFallbackReason,\n type G9IntroSlideItem,\n g9IntroMetrics,\n introOverlayOpacities,\n} from './model';\n\n/** Imperative handle (MAUI `BeginPresentation` / `StopAndReleaseMedia`), from {@link useIntroCarousel}. */\nexport interface G9IntroCarouselController {\n /** Starts the media (and the startup cover) once the carousel is on screen. */\n beginPresentation(): void;\n /** Stops and releases the player, e.g. before the page goes away. */\n stopAndReleaseMedia(): void;\n /** @internal set by the mounted carousel */\n bind(target: { begin(): void; release(): void }): () => void;\n}\n\n/** Creates a controller outside React. */\nexport function createIntroCarouselController(): G9IntroCarouselController {\n let target: { begin(): void; release(): void } | null = null;\n return {\n beginPresentation: () => target?.begin(),\n stopAndReleaseMedia: () => target?.release(),\n bind(next) {\n target = next;\n return () => {\n if (target === next) target = null;\n };\n },\n };\n}\n\n/** A stable controller for a `G9IntroCarousel`. */\nexport function useIntroCarousel(): G9IntroCarouselController {\n const ref = useRef<G9IntroCarouselController | null>(null);\n if (ref.current === null) ref.current = createIntroCarouselController();\n return ref.current;\n}\n\n/** Props of {@link G9IntroCarousel} (MAUI bindable properties, commands and events). */\nexport interface G9IntroCarouselProps extends Partial<G9IntroMediaOptions> {\n /** Brand logo above the slide text; none by default (MAUI `LogoSource`). */\n readonly logoSource?: string | G9ImageSource | null;\n readonly slides?: readonly G9IntroSlideItem[];\n /** Controlled slide (MAUI `CurrentIndex`, two-way). */\n readonly currentIndex?: number;\n readonly defaultCurrentIndex?: number;\n readonly onCurrentIndexChange?: (index: number) => void;\n /** Bottom (or flat) overlay opacity. Default 0.52. */\n readonly overlayOpacity?: number;\n readonly useGradientOverlay?: boolean;\n /** Gradient top = bottom × ratio unless `overlayTopOpacity` is set. Default 0.4. */\n readonly overlayTopOpacityRatio?: number;\n readonly overlayTopOpacity?: number | null;\n /** Default black. */\n readonly overlayColor?: string;\n /** The header language button (MAUI `LanguageCommand`); hidden without it. */\n readonly onLanguage?: () => void;\n /** The sign-in call to action (MAUI `CompleteCommand`). */\n readonly onComplete?: () => void;\n /** Once, the first time real content is on screen (MAUI `FirstContentReady`). */\n readonly onFirstContentReady?: () => void;\n /** A video slide showed its image instead, and why (desktop video stays `'video-unsupported'` until D14). */\n readonly onMediaFallback?: (index: number, reason: G9IntroFallbackReason) => void;\n /** Start presenting on mount. Default true; set false and call `beginPresentation()` yourself (MAUI login flow). */\n readonly autoBegin?: boolean;\n /** While false the media is released (page in the background, carousel hidden). Default true. */\n readonly active?: boolean;\n readonly controller?: G9IntroCarouselController;\n readonly className?: string;\n}\n\nconst hex2 = (n: number) =>\n Math.round(Math.min(Math.max(n, 0), 1) * 255)\n .toString(16)\n .padStart(2, '0');\n\n/** `#rrggbb` + alpha → `#rrggbbaa` (other colour forms pass through with the opacity applied as `opacity`). */\nfunction withAlpha(color: string, alpha: number): string {\n return /^#[0-9a-f]{6}$/i.test(color) ? `${color}${hex2(alpha)}` : color;\n}\n\n/**\n * Full-screen onboarding slides (MAUI `G9IntroCarousel`): one media slot behind a dark (flat or gradient) overlay,\n * logo, localized title and subtitle, step pills, previous / next (swapped in RTL), a language button and the sign-in\n * call to action. Slides swipe through lynx-ui `Swiper`. Video goes through `services.media`\n * (`supportsVideo` / `createPlayer`); when it cannot play, the slide image shows and `onMediaFallback` says why. The\n * player is released on slide change, when `active` turns false, on `stopAndReleaseMedia()` and on unmount.\n */\nexport function G9IntroCarousel(props: G9IntroCarouselProps): ReactNode {\n const slides = props.slides ?? [];\n const strings = useG9Strings();\n const settings = useG9Settings();\n const rtl = useG9Direction() === 'rtl';\n const win = useG9Window();\n const core = useG9Core();\n const media = useG9OptionalService('media');\n const diagnostics = useG9Diagnostics();\n const [rawIndex, setIndex] = useControllableState<number>({\n value: props.currentIndex,\n defaultValue: props.defaultCurrentIndex ?? 0,\n onChange: props.onCurrentIndexChange,\n name: 'G9IntroCarousel.currentIndex',\n });\n const index = clampIntroIndex(rawIndex, slides.length);\n const latest = useRef(props);\n latest.current = props;\n const mediaRef = useRef(media);\n mediaRef.current = media;\n\n const controller = useMemo(\n () =>\n new G9IntroMediaController({\n setTimer: (cb, ms) => startTimer(cb, ms),\n clearTimer: (h) => stopTimer(h as never),\n now: () => core.services.clock.monotonicNow(),\n provider: () => mediaRef.current,\n options: () => {\n const p = latest.current;\n return {\n useMediaFadeTransitions: p.useMediaFadeTransitions ?? true,\n useVideoLoopFade: p.useVideoLoopFade ?? true,\n skipFirstSlideInitialFadeIn: p.skipFirstSlideInitialFadeIn ?? true,\n mediaFadeInDurationMs: p.mediaFadeInDurationMs ?? g9IntroMetrics.mediaFadeInDurationMs,\n mediaFadeOutDurationMs: p.mediaFadeOutDurationMs ?? g9IntroMetrics.mediaFadeOutDurationMs,\n startupCoverImageSource: p.startupCoverImageSource ?? null,\n startupCoverDurationMs: p.startupCoverDurationMs ?? 0,\n startupCoverFadeDurationMs: p.startupCoverFadeDurationMs ?? g9IntroMetrics.startupCoverFadeDurationMs,\n initialVideoStartSeconds: p.initialVideoStartSeconds ?? 0,\n };\n },\n onFirstContentReady: () => latest.current.onFirstContentReady?.(),\n onFallback: (i, reason) => latest.current.onMediaFallback?.(i, reason),\n onError: (error) =>\n diagnostics.log({\n level: 'warning',\n message: 'G9IntroCarousel: media failed.',\n source: 'G9IntroCarousel',\n error,\n }),\n }),\n [],\n );\n const snap = useSyncExternalStore(controller.subscribe, controller.getSnapshot);\n const slidesRef = useRef(slides);\n slidesRef.current = slides;\n const indexRef = useRef(index);\n indexRef.current = index;\n\n const active = props.active ?? true;\n useEffect(() => {\n if (!active) {\n controller.release();\n return;\n }\n if (props.autoBegin ?? true) controller.begin(slidesRef.current, indexRef.current);\n }, [active]);\n useEffect(() => {\n if (controller.isPresented) controller.show(slides, index);\n }, [index, slides]);\n useEffect(\n () =>\n props.controller?.bind({\n begin: () => controller.begin(slidesRef.current, indexRef.current),\n release: () => controller.release(),\n }),\n [props.controller],\n );\n useEffect(() => () => controller.dispose(), []);\n\n // Swipes go through lynx-ui Swiper; nav taps move it.\n const swiper = useRef<SwiperRef | null>(null);\n const go = (next: number) => {\n const target = clampIntroIndex(next, slides.length);\n if (target === index) return;\n setIndex(target);\n try {\n swiper.current?.swipeTo(target, { animate: true });\n } catch {\n // The swiper is gone (unmounted mid-tap).\n }\n };\n\n const overlay = introOverlayOpacities({\n overlayOpacity: props.overlayOpacity ?? g9IntroMetrics.overlayOpacity,\n useGradientOverlay: props.useGradientOverlay === true,\n overlayTopOpacityRatio: props.overlayTopOpacityRatio ?? g9IntroMetrics.overlayTopOpacityRatio,\n overlayTopOpacity: props.overlayTopOpacity ?? null,\n });\n const color = props.overlayColor ?? '#000000';\n const overlayStyle = props.useGradientOverlay\n ? {\n backgroundImage: `linear-gradient(to bottom, ${withAlpha(color, overlay.top)}, ${withAlpha(color, overlay.bottom)})`,\n }\n : { backgroundColor: color, opacity: overlay.bottom };\n\n const slide = slides[index];\n const resolve = (key: string | undefined, fallback: string) => (key ? (strings.resolve(key) ?? fallback) : fallback);\n const nextLabel = resolve('IntroNext', 'Next');\n const prevLabel = resolve('IntroPrevious', 'Previous');\n const prev = (\n <view\n key=\"prev\"\n className=\"g9-intro__nav g9-intro__nav--prev\"\n style={{ opacity: index > 0 ? 1 : 0 }}\n accessibility-element\n accessibility-traits=\"button\"\n accessibility-label={prevLabel}\n bindtap={index > 0 ? () => go(index - 1) : undefined}\n >\n <G9IconSlot icon={rtl ? settings.glyphs.chevronForward : settings.glyphs.chevronBack} size={20} color=\"#ffffff\" />\n <text className=\"g9-intro__nav-text\">{prevLabel}</text>\n </view>\n );\n const next = (\n <view\n key=\"next\"\n className=\"g9-intro__nav g9-intro__nav--next\"\n style={{ opacity: index < slides.length - 1 ? 1 : 0 }}\n accessibility-element\n accessibility-traits=\"button\"\n accessibility-label={nextLabel}\n bindtap={index < slides.length - 1 ? () => go(index + 1) : undefined}\n >\n <text className=\"g9-intro__nav-text\">{nextLabel}</text>\n <G9IconSlot icon={rtl ? settings.glyphs.chevronBack : settings.glyphs.chevronForward} size={20} color=\"#ffffff\" />\n </view>\n );\n const logo = props.logoSource\n ? typeof props.logoSource === 'string'\n ? { imagePath: props.logoSource }\n : { image: props.logoSource }\n : null;\n\n return (\n <view className={`g9-intro ${props.className ?? ''}`} style={{ backgroundColor: g9IntroMetrics.backdropColor }}>\n <view\n className={`g9-intro__media g9-intro__media--${snap.kind}`}\n data-fallback={snap.fallback ?? ''}\n style={{ opacity: snap.visible ? 1 : 0, transition: `opacity ${snap.fadeMs}ms ease-in-out` }}\n >\n {snap.kind === 'video' && snap.player ? (snap.player.view as ReactNode) : null}\n {snap.kind === 'image' && snap.imageUri ? (\n <image className=\"g9-intro__image\" src={snap.imageUri} mode=\"aspectFill\" />\n ) : null}\n </view>\n {props.startupCoverImageSource ? (\n <image\n className=\"g9-intro__cover\"\n src={props.startupCoverImageSource}\n mode=\"aspectFill\"\n style={{\n opacity: snap.coverVisible ? 1 : 0,\n transition: `opacity ${props.startupCoverFadeDurationMs ?? g9IntroMetrics.startupCoverFadeDurationMs}ms ease-out`,\n }}\n />\n ) : null}\n <view className=\"g9-intro__overlay\" style={overlayStyle} />\n <Swiper\n ref={swiper}\n style={{ position: 'absolute', top: '0px', left: '0px', right: '0px', bottom: '0px' }}\n data={slides as G9IntroSlideItem[]}\n itemWidth={win.width}\n initialIndex={index}\n RTL={rtl}\n onChange={(current: number) => {\n if (current !== indexRef.current) setIndex(clampIntroIndex(current, slidesRef.current.length));\n }}\n >\n {({ index: i }: { index: number }) => <view key={i} className=\"g9-intro__page\" />}\n </Swiper>\n {snap.loading ? (\n <view className=\"g9-intro__spinner\">\n <G9ActivityIndicator running size={28} color=\"#ffffff\" />\n </view>\n ) : null}\n <view className=\"g9-intro__chrome\">\n <view className=\"g9-intro__header\">\n {logo ? <G9IconSlot {...logo} size={g9IntroMetrics.logoHeight} /> : <view />}\n {props.onLanguage ? (\n <view\n className=\"g9-intro__language\"\n accessibility-element\n accessibility-traits=\"button\"\n bindtap={() => latest.current.onLanguage?.()}\n >\n <G9IconSlot icon=\"language\" size={22} color=\"#ffffff\" />\n </view>\n ) : null}\n </view>\n <view className=\"g9-intro__spacer\" />\n <view className=\"g9-intro__text\">\n <text className=\"g9-intro__title\">{resolve(slide?.titleResourceKey, '')}</text>\n <text className=\"g9-intro__subtitle\">{resolve(slide?.subtitleResourceKey, '')}</text>\n </view>\n <view className=\"g9-intro__steps\">\n {slides.map((_, i) => (\n <view\n key={i}\n className={`g9-intro__step${i === index ? ' g9-intro__step--active' : ''}`}\n style={{ width: `${i === index ? g9IntroMetrics.stepActiveWidth : g9IntroMetrics.stepInactiveWidth}px` }}\n />\n ))}\n </view>\n <view className=\"g9-intro__nav-row\">{rtl ? [next, prev] : [prev, next]}</view>\n <G9Button\n className=\"g9-intro__cta\"\n text={resolve('IntroSignIn', 'Sign in to your account')}\n onPress={() => latest.current.onComplete?.()}\n />\n </view>\n </view>\n );\n}\n"],"names":["createIntroCarouselController","target","next","useIntroCarousel","ref","useRef","hex2","n","Math","withAlpha","color","alpha","G9IntroCarousel","props","_props_slides","_props_defaultCurrentIndex","_props_active","_props_overlayOpacity","_props_overlayTopOpacityRatio","_props_overlayTopOpacity","_props_overlayColor","_props_className","_snap_fallback","_props_startupCoverFadeDurationMs","slides","strings","useG9Strings","settings","useG9Settings","rtl","useG9Direction","win","useG9Window","core","useG9Core","media","useG9OptionalService","diagnostics","useG9Diagnostics","rawIndex","setIndex","useControllableState","index","clampIntroIndex","latest","mediaRef","controller","useMemo","G9IntroMediaController","cb","ms","startTimer","h","stopTimer","_p_useMediaFadeTransitions","_p_useVideoLoopFade","_p_skipFirstSlideInitialFadeIn","_p_mediaFadeInDurationMs","_p_mediaFadeOutDurationMs","_p_startupCoverImageSource","_p_startupCoverDurationMs","_p_startupCoverFadeDurationMs","_p_initialVideoStartSeconds","p","g9IntroMetrics","_latest_current","i","reason","error","snap","useSyncExternalStore","slidesRef","indexRef","active","useEffect","_props_autoBegin","_props_controller","swiper","go","_swiper_current","overlay","introOverlayOpacities","overlayStyle","slide","resolve","key","fallback","_strings_resolve","nextLabel","prevLabel","prev","view","undefined","G9IconSlot","text","logo","image","Swiper","current","G9ActivityIndicator","_","G9Button"],"mappings":";;;;;;;;;;AAqCO,SAASA;IACd,IAAIC,SAAoD;IACxD,OAAO;QACL,mBAAmB,IAAMA,QAAAA,SAAAA,KAAAA,IAAAA,OAAQ,KAAK;QACtC,qBAAqB,IAAMA,QAAAA,SAAAA,KAAAA,IAAAA,OAAQ,OAAO;QAC1C,MAAKC,IAAI;YACPD,SAASC;YACT,OAAO;gBACL,IAAID,WAAWC,MAAMD,SAAS;YAChC;QACF;IACF;AACF;AAGO,SAASE;IACd,MAAMC,MAAMC,OAAyC;IACrD,IAAID,AAAgB,SAAhBA,IAAI,OAAO,EAAWA,IAAI,OAAO,GAAGJ;IACxC,OAAOI,IAAI,O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m/lynxcontrols-foundation';
2
+ import { type G9IntroFallbackReason, type G9IntroSlideItem } from './model.js';
3
+ /** What the media layer shows. */
4
+ export interface G9IntroMediaSnapshot {
5
+ /** The slide whose media is loaded (or loading). */
6
+ readonly index: number;
7
+ readonly kind: 'none' | 'video' | 'image' | 'empty';
8
+ readonly player: G9MediaPlayer | null;
9
+ readonly imageUri: string | null;
10
+ /** Media opacity target (1 shown, 0 hidden) and the duration of the move there. */
11
+ readonly visible: boolean;
12
+ readonly fadeMs: number;
13
+ /** A spinner while a slide's media loads (MAUI brief spinner overlay). */
14
+ readonly loading: boolean;
15
+ /** Why the slide shows its image (or nothing) instead of a video; `null` when it plays its video. */
16
+ readonly fallback: G9IntroFallbackReason | null;
17
+ /** Startup poster (MAUI `StartupCoverImageSource`): visible, and fading out. */
18
+ readonly coverVisible: boolean;
19
+ }
20
+ /** Inputs of {@link G9IntroMediaController}. */
21
+ export interface G9IntroMediaConfig {
22
+ setTimer(callback: () => void, ms: number): unknown;
23
+ clearTimer(handle: unknown): void;
24
+ now(): number;
25
+ provider(): G9MediaProvider | undefined;
26
+ options(): G9IntroMediaOptions;
27
+ /** Raised once, the first time real content is on screen (MAUI `FirstContentReady`). */
28
+ onFirstContentReady(): void;
29
+ onFallback(index: number, reason: G9IntroFallbackReason): void;
30
+ onError(error: unknown): void;
31
+ }
32
+ /** The media options of the carousel (MAUI bindable properties). */
33
+ export interface G9IntroMediaOptions {
34
+ readonly useMediaFadeTransitions: boolean;
35
+ readonly useVideoLoopFade: boolean;
36
+ readonly skipFirstSlideInitialFadeIn: boolean;
37
+ readonly mediaFadeInDurationMs: number;
38
+ readonly mediaFadeOutDurationMs: number;
39
+ readonly startupCoverImageSource: string | null;
40
+ readonly startupCoverDurationMs: number;
41
+ readonly startupCoverFadeDurationMs: number;
42
+ readonly initialVideoStartSeconds: number;
43
+ }
44
+ /**
45
+ * The carousel's single media slot (MAUI keeps ONE MediaElement and swaps its source): one player at a time, the
46
+ * previous one disposed before the next slide's media loads; fade out before a manual change, fade in on reveal (not
47
+ * for the very first reveal with `skipFirstSlideInitialFadeIn`); loop fades from the player's `nearEnd` / `looped`
48
+ * events; image fallback with a reason; first-content readiness once; everything released on `release()`.
49
+ */
50
+ export declare class G9IntroMediaController {
51
+ private readonly config;
52
+ private snapshot;
53
+ private readonly listeners;
54
+ private generation;
55
+ private timers;
56
+ private unsubscribePlayer;
57
+ private firstReady;
58
+ private firstRevealDone;
59
+ private videoSeekUsed;
60
+ private presented;
61
+ private coverShownAt;
62
+ private coverMediaReady;
63
+ private disposed;
64
+ constructor(config: G9IntroMediaConfig);
65
+ subscribe: (listener: () => void) => (() => void);
66
+ getSnapshot: () => G9IntroMediaSnapshot;
67
+ private update;
68
+ private later;
69
+ private clearTimers;
70
+ get isPresented(): boolean;
71
+ /** Starts presenting (MAUI `BeginPresentation`): the startup cover, then the current slide's media. */
72
+ begin(slides: readonly G9IntroSlideItem[], index: number): void;
73
+ /** Shows `index`'s media: fades the current media out (manual change), disposes it, loads the next. */
74
+ show(slides: readonly G9IntroSlideItem[], index: number, animateOut?: boolean): void;
75
+ private disposePlayer;
76
+ private load;
77
+ private showImage;
78
+ private settle;
79
+ private reveal;
80
+ private tryDismissCover;
81
+ /** Stops and releases the player (MAUI `StopAndReleaseMedia`); `begin` / `show` load again later. */
82
+ release(): void;
83
+ dispose(): void;
84
+ }
85
+ //# sourceMappingURL=media.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../src/media.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACpF,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EAItB,MAAM,SAAS,CAAC;AAEjB,kCAAkC;AAClC,MAAM,WAAW,oBAAoB;IACnC,oDAAoD;IACpD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAA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C,MAAM;IAcd,OAAO,CAAC,eAAe;IAOvB,qGAAqG;IACrG,OAAO,IAAI,IAAI;IAgBf,OAAO,IAAI,IAAI;CAIhB"}
package/dist/media.jsx ADDED
@@ -0,0 +1,264 @@
1
+ import { introImageSource, introSlideHasVideo, introVideoSource } from "./model.jsx";
2
+ function _define_property(obj, key, value) {
3
+ if (key in obj) Object.defineProperty(obj, key, {
4
+ value: value,
5
+ enumerable: true,
6
+ configurable: true,
7
+ writable: true
8
+ });
9
+ else obj[key] = value;
10
+ return obj;
11
+ }
12
+ class G9IntroMediaController {
13
+ update(patch) {
14
+ this.snapshot = {
15
+ ...this.snapshot,
16
+ ...patch
17
+ };
18
+ for (const listener of Array.from(this.listeners))listener();
19
+ }
20
+ later(callback, ms) {
21
+ const handle = this.config.setTimer(()=>{
22
+ this.timers.delete(handle);
23
+ callback();
24
+ }, ms);
25
+ this.timers.add(handle);
26
+ }
27
+ clearTimers() {
28
+ for (const handle of this.timers)this.config.clearTimer(handle);
29
+ this.timers.clear();
30
+ }
31
+ get isPresented() {
32
+ return this.presented;
33
+ }
34
+ begin(slides, index) {
35
+ if (this.disposed) return;
36
+ if (!this.presented) {
37
+ this.presented = true;
38
+ const o = this.config.options();
39
+ if (o.startupCoverImageSource && o.startupCoverDurationMs > 0) {
40
+ this.coverShownAt = this.config.now();
41
+ this.coverMediaReady = false;
42
+ this.update({
43
+ coverVisible: true
44
+ });
45
+ this.later(()=>this.tryDismissCover(), o.startupCoverDurationMs);
46
+ }
47
+ }
48
+ this.show(slides, index, false);
49
+ }
50
+ show(slides, index, animateOut = true) {
51
+ if (this.disposed || !this.presented) return;
52
+ const slide = slides[index];
53
+ if (this.snapshot.index === index && 'none' !== this.snapshot.kind) return;
54
+ const generation = ++this.generation;
55
+ const o = this.config.options();
56
+ const fadeOut = o.useMediaFadeTransitions && animateOut && 'none' !== this.snapshot.kind ? o.mediaFadeOutDurationMs : 0;
57
+ if (fadeOut > 0) {
58
+ this.update({
59
+ visible: false,
60
+ fadeMs: fadeOut,
61
+ loading: true
62
+ });
63
+ this.later(()=>{
64
+ if (generation === this.generation) this.load(slide, index, generation);
65
+ }, fadeOut);
66
+ return;
67
+ }
68
+ this.load(slide, index, generation);
69
+ }
70
+ disposePlayer() {
71
+ var _this_unsubscribePlayer, _this;
72
+ null == (_this_unsubscribePlayer = (_this = this).unsubscribePlayer) || _this_unsubscribePlayer.call(_this);
73
+ this.unsubscribePlayer = null;
74
+ const player = this.snapshot.player;
75
+ if (!player) return;
76
+ try {
77
+ player.dispose();
78
+ } catch (error) {
79
+ this.config.onError(error);
80
+ }
81
+ }
82
+ load(slide, index, generation) {
83
+ this.disposePlayer();
84
+ this.update({
85
+ index,
86
+ kind: 'none',
87
+ player: null,
88
+ imageUri: null,
89
+ visible: false,
90
+ fadeMs: 0,
91
+ loading: true,
92
+ fallback: null
93
+ });
94
+ if (!slide) return void this.settle(generation, 'empty', null, null);
95
+ const provider = this.config.provider();
96
+ if (!introSlideHasVideo(slide)) return void this.showImage(slide, index, generation, 'no-video', provider);
97
+ if (!(null == provider ? void 0 : provider.createPlayer)) return void this.showImage(slide, index, generation, 'no-media-provider', provider);
98
+ if (provider.supportsVideo && false === provider.supportsVideo()) return void this.showImage(slide, index, generation, 'video-unsupported', provider);
99
+ const createPlayer = provider.createPlayer.bind(provider);
100
+ const o = this.config.options();
101
+ provider.resolve(introVideoSource(slide)).then((media)=>{
102
+ if (generation !== this.generation || this.disposed) return;
103
+ let player;
104
+ try {
105
+ const startSeconds = !this.videoSeekUsed && o.initialVideoStartSeconds > 0 ? o.initialVideoStartSeconds : 0;
106
+ this.videoSeekUsed = true;
107
+ player = createPlayer(media, {
108
+ loop: true,
109
+ muted: true,
110
+ ...startSeconds > 0 ? {
111
+ startSeconds
112
+ } : {},
113
+ ...o.useVideoLoopFade ? {
114
+ nearEndSeconds: o.mediaFadeOutDurationMs / 1000
115
+ } : {}
116
+ });
117
+ } catch (error) {
118
+ this.config.onError(error);
119
+ this.showImage(slide, index, generation, 'video-failed', provider);
120
+ return;
121
+ }
122
+ this.unsubscribePlayer = player.subscribe((event)=>{
123
+ if (generation !== this.generation || this.disposed) return;
124
+ const opts = this.config.options();
125
+ if ('ready' === event.type) this.reveal(generation);
126
+ else if ('error' === event.type) {
127
+ this.config.onError(event.error);
128
+ this.showImage(slide, index, generation, 'video-failed', provider);
129
+ } else if ('nearEnd' === event.type) {
130
+ if (opts.useVideoLoopFade && opts.mediaFadeOutDurationMs > 0) this.update({
131
+ visible: false,
132
+ fadeMs: opts.mediaFadeOutDurationMs
133
+ });
134
+ } else if (opts.useVideoLoopFade) this.update({
135
+ visible: true,
136
+ fadeMs: opts.mediaFadeInDurationMs
137
+ });
138
+ });
139
+ this.update({
140
+ kind: 'video',
141
+ player
142
+ });
143
+ player.play();
144
+ }, (error)=>{
145
+ if (generation !== this.generation || this.disposed) return;
146
+ this.config.onError(error);
147
+ this.showImage(slide, index, generation, 'video-failed', provider);
148
+ });
149
+ }
150
+ showImage(slide, index, generation, reason, provider) {
151
+ this.disposePlayer();
152
+ if ('no-video' !== reason) this.config.onFallback(index, reason);
153
+ const source = introImageSource(slide);
154
+ if (!source) return void this.settle(generation, 'empty', null, reason);
155
+ const raw = 'asset' in source ? source.asset : source.uri;
156
+ if (!provider) return void this.settle(generation, 'image', raw, reason);
157
+ provider.resolve(source).then((media)=>{
158
+ if (generation === this.generation && !this.disposed) this.settle(generation, 'image', media.uri, reason);
159
+ }, ()=>{
160
+ if (generation === this.generation && !this.disposed) this.settle(generation, 'image', raw, reason);
161
+ });
162
+ }
163
+ settle(generation, kind, imageUri, reason) {
164
+ this.update({
165
+ kind,
166
+ player: null,
167
+ imageUri,
168
+ fallback: reason
169
+ });
170
+ this.reveal(generation);
171
+ }
172
+ reveal(generation) {
173
+ if (generation !== this.generation) return;
174
+ const o = this.config.options();
175
+ const immediate = !o.useMediaFadeTransitions || o.skipFirstSlideInitialFadeIn && !this.firstRevealDone;
176
+ this.firstRevealDone = true;
177
+ this.update({
178
+ visible: true,
179
+ fadeMs: immediate ? 0 : o.mediaFadeInDurationMs,
180
+ loading: false
181
+ });
182
+ this.coverMediaReady = true;
183
+ this.tryDismissCover();
184
+ if (!this.firstReady) {
185
+ this.firstReady = true;
186
+ this.config.onFirstContentReady();
187
+ }
188
+ }
189
+ tryDismissCover() {
190
+ if (!this.snapshot.coverVisible || !this.coverMediaReady) return;
191
+ const o = this.config.options();
192
+ if (this.config.now() - this.coverShownAt < o.startupCoverDurationMs) return;
193
+ this.update({
194
+ coverVisible: false
195
+ });
196
+ }
197
+ release() {
198
+ this.generation += 1;
199
+ this.clearTimers();
200
+ this.disposePlayer();
201
+ this.update({
202
+ index: -1,
203
+ kind: 'none',
204
+ player: null,
205
+ imageUri: null,
206
+ visible: false,
207
+ loading: false,
208
+ coverVisible: false
209
+ });
210
+ this.presented = false;
211
+ }
212
+ dispose() {
213
+ this.release();
214
+ this.disposed = true;
215
+ }
216
+ constructor(config){
217
+ _define_property(this, "config", void 0);
218
+ _define_property(this, "snapshot", void 0);
219
+ _define_property(this, "listeners", void 0);
220
+ _define_property(this, "generation", void 0);
221
+ _define_property(this, "timers", void 0);
222
+ _define_property(this, "unsubscribePlayer", void 0);
223
+ _define_property(this, "firstReady", void 0);
224
+ _define_property(this, "firstRevealDone", void 0);
225
+ _define_property(this, "videoSeekUsed", void 0);
226
+ _define_property(this, "presented", void 0);
227
+ _define_property(this, "coverShownAt", void 0);
228
+ _define_property(this, "coverMediaReady", void 0);
229
+ _define_property(this, "disposed", void 0);
230
+ _define_property(this, "subscribe", void 0);
231
+ _define_property(this, "getSnapshot", void 0);
232
+ this.config = config;
233
+ this.snapshot = {
234
+ index: -1,
235
+ kind: 'none',
236
+ player: null,
237
+ imageUri: null,
238
+ visible: false,
239
+ fadeMs: 0,
240
+ loading: false,
241
+ fallback: null,
242
+ coverVisible: false
243
+ };
244
+ this.listeners = new Set();
245
+ this.generation = 0;
246
+ this.timers = new Set();
247
+ this.unsubscribePlayer = null;
248
+ this.firstReady = false;
249
+ this.firstRevealDone = false;
250
+ this.videoSeekUsed = false;
251
+ this.presented = false;
252
+ this.coverShownAt = 0;
253
+ this.coverMediaReady = false;
254
+ this.disposed = false;
255
+ this.subscribe = (listener)=>{
256
+ this.listeners.add(listener);
257
+ return ()=>this.listeners.delete(listener);
258
+ };
259
+ this.getSnapshot = ()=>this.snapshot;
260
+ }
261
+ }
262
+ export { G9IntroMediaController };
263
+
264
+ //# sourceMappingURL=media.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media.jsx","sources":["../src/media.ts"],"sourcesContent":["import type { G9MediaPlayer, G9MediaProvider } from '@g9tm/lynxcontrols-foundation';\nimport {\n type G9IntroFallbackReason,\n type G9IntroSlideItem,\n introImageSource,\n introSlideHasVideo,\n introVideoSource,\n} from './model';\n\n/** What the media layer shows. */\nexport interface G9IntroMediaSnapshot {\n /** The slide whose media is loaded (or loading). */\n readonly index: number;\n readonly kind: 'none' | 'video' | 'image' | 'empty';\n readonly player: G9MediaPlayer | null;\n readonly imageUri: string | null;\n /** Media opacity target (1 shown, 0 hidden) and the duration of the move there. */\n readonly visible: boolean;\n readonly fadeMs: number;\n /** A spinner while a slide's media loads (MAUI brief spinner overlay). */\n readonly loading: boolean;\n /** Why the slide shows its image (or nothing) instead of a video; `null` when it plays its video. */\n readonly fallback: G9IntroFallbackReason | null;\n /** Startup poster (MAUI `StartupCoverImageSource`): visible, and fading out. */\n readonly coverVisible: boolean;\n}\n\n/** Inputs of {@link G9IntroMediaController}. */\nexport interface G9IntroMediaConfig {\n setTimer(callback: () => void, ms: number): unknown;\n clearTimer(handle: unknown): void;\n now(): number;\n provider(): G9MediaProvider | undefined;\n options(): G9IntroMediaOptions;\n /** Raised once, the first time real content is on screen (MAUI `FirstContentReady`). */\n onFirstContentReady(): void;\n onFallback(index: number, reason: G9IntroFallbackReason): void;\n onError(error: unknown): void;\n}\n\n/** The media options of the carousel (MAUI bindable properties). */\nexport interface G9IntroMediaOptions {\n readonly useMediaFadeTransitions: boolean;\n readonly useVideoLoopFade: boolean;\n readonly skipFirstSlideInitialFadeIn: boolean;\n readonly mediaFadeInDurationMs: number;\n readonly mediaFadeOutDurationMs: number;\n readonly startupCoverImageSource: string | null;\n readonly startupCoverDurationMs: number;\n readonly startupCoverFadeDurationMs: number;\n readonly initialVideoStartSeconds: number;\n}\n\n/**\n * The carousel's single media slot (MAUI keeps ONE MediaElement and swaps its source): one player at a time, the\n * previous one disposed before the next slide's media loads; fade out before a manual change, fade in on reveal (not\n * for the very first reveal with `skipFirstSlideInitialFadeIn`); loop fades from the player's `nearEnd` / `looped`\n * events; image fallback with a reason; first-content readiness once; everything released on `release()`.\n */\nexport class G9IntroMediaController {\n private snapshot: G9IntroMediaSnapshot = {\n index: -1,\n kind: 'none',\n player: null,\n imageUri: null,\n visible: false,\n fadeMs: 0,\n loading: false,\n fallback: null,\n coverVisible: false,\n };\n private readonly listeners = new Set<() => void>();\n private generation = 0;\n private timers = new Set<unknown>();\n private unsubscribePlayer: (() => void) | null = null;\n private firstReady = false;\n private firstRevealDone = false;\n private videoSeekUsed = false;\n private presented = false;\n private coverShownAt = 0;\n private coverMediaReady = false;\n private disposed = false;\n\n constructor(private readonly config: G9IntroMediaConfig) {}\n\n subscribe = (listener: () => void): (() => void) => {\n this.listeners.add(listener);\n return () => this.listeners.delete(listener);\n };\n\n getSnapshot = (): G9IntroMediaSnapshot => this.snapshot;\n\n private update(patch: Partial<G9IntroMediaSnapshot>): void {\n this.snapshot = { ...this.snapshot, ...patch };\n for (const listener of Array.from(this.listeners)) listener();\n }\n\n private later(callback: () => void, ms: number): void {\n const handle = this.config.setTimer(() => {\n this.timers.delete(handle);\n callback();\n }, ms);\n this.timers.add(handle);\n }\n\n private clearTimers(): void {\n for (const handle of this.timers) this.config.clearTimer(handle);\n this.timers.clear();\n }\n\n get isPresented(): boolean {\n return this.presented;\n }\n\n /** Starts presenting (MAUI `BeginPresentation`): the startup cover, then the current slide's media. */\n begin(slides: readonly G9IntroSlideItem[], index: number): void {\n if (this.disposed) return;\n if (!this.presented) {\n this.presented = true;\n const o = this.config.options();\n if (o.startupCoverImageSource && o.startupCoverDurationMs > 0) {\n this.coverShownAt = this.config.now();\n this.coverMediaReady = false;\n this.update({ coverVisible: true });\n this.later(() => this.tryDismissCover(), o.startupCoverDurationMs);\n }\n }\n this.show(slides, index, false);\n }\n\n /** Shows `index`'s media: fades the current media out (manual change), disposes it, loads the next. */\n show(slides: readonly G9IntroSlideItem[], index: number, animateOut = true): void {\n if (this.disposed || !this.presented) return;\n const slide = slides[index];\n if (this.snapshot.index === index && this.snapshot.kind !== 'none') return;\n const generation = ++this.generation;\n const o = this.config.options();\n const fadeOut =\n o.useMediaFadeTransitions && animateOut && this.snapshot.kind !== 'none' ? o.mediaFadeOutDurationMs : 0;\n if (fadeOut > 0) {\n this.update({ visible: false, fadeMs: fadeOut, loading: true });\n this.later(() => {\n if (generation === this.generation) this.load(slide, index, generation);\n }, fadeOut);\n return;\n }\n this.load(slide, index, generation);\n }\n\n private disposePlayer(): void {\n this.unsubscribePlayer?.();\n this.unsubscribePlayer = null;\n const player = this.snapshot.player;\n if (!player) return;\n try {\n player.dispose();\n } catch (error) {\n this.config.onError(error);\n }\n }\n\n private load(slide: G9IntroSlideItem | undefined, index: number, generation: number): void {\n this.disposePlayer();\n this.update({\n index,\n kind: 'none',\n player: null,\n imageUri: null,\n visible: false,\n fadeMs: 0,\n loading: true,\n fallback: null,\n });\n if (!slide) {\n this.settle(generation, 'empty', null, null);\n return;\n }\n const provider = this.config.provider();\n if (!introSlideHasVideo(slide)) {\n this.showImage(slide, index, generation, 'no-video', provider);\n return;\n }\n if (!provider?.createPlayer) {\n this.showImage(slide, index, generation, 'no-media-provider', provider);\n return;\n }\n if (provider.supportsVideo && provider.supportsVideo() === false) {\n this.showImage(slide, index, generation, 'video-unsupported', provider);\n return;\n }\n const createPlayer = provider.createPlayer.bind(provider);\n const o = this.config.options();\n provider.resolve(introVideoSource(slide) as never).then(\n (media) => {\n if (generation !== this.generation || this.disposed) return;\n let player: G9MediaPlayer;\n try {\n const startSeconds = !this.videoSeekUsed && o.initialVideoStartSeconds > 0 ? o.initialVideoStartSeconds : 0;\n this.videoSeekUsed = true;\n player = createPlayer(media, {\n loop: true,\n muted: true,\n ...(startSeconds > 0 ? { startSeconds } : {}),\n ...(o.useVideoLoopFade ? { nearEndSeconds: o.mediaFadeOutDurationMs / 1000 } : {}),\n });\n } catch (error) {\n this.config.onError(error);\n this.showImage(slide, index, generation, 'video-failed', provider);\n return;\n }\n this.unsubscribePlayer = player.subscribe((event) => {\n if (generation !== this.generation || this.disposed) return;\n const opts = this.config.options();\n if (event.type === 'ready') {\n this.reveal(generation);\n } else if (event.type === 'error') {\n this.config.onError(event.error);\n this.showImage(slide, index, generation, 'video-failed', provider);\n } else if (event.type === 'nearEnd') {\n if (opts.useVideoLoopFade && opts.mediaFadeOutDurationMs > 0) {\n this.update({ visible: false, fadeMs: opts.mediaFadeOutDurationMs });\n }\n } else if (opts.useVideoLoopFade) {\n this.update({ visible: true, fadeMs: opts.mediaFadeInDurationMs });\n }\n });\n this.update({ kind: 'video', player });\n player.play();\n },\n (error: unknown) => {\n if (generation !== this.generation || this.disposed) return;\n this.config.onError(error);\n this.showImage(slide, index, generation, 'video-failed', provider);\n },\n );\n }\n\n private showImage(\n slide: G9IntroSlideItem,\n index: number,\n generation: number,\n reason: G9IntroFallbackReason,\n provider: G9MediaProvider | undefined,\n ): void {\n this.disposePlayer();\n if (reason !== 'no-video') this.config.onFallback(index, reason);\n const source = introImageSource(slide);\n if (!source) {\n this.settle(generation, 'empty', null, reason);\n return;\n }\n const raw = 'asset' in source ? source.asset : source.uri;\n if (!provider) {\n this.settle(generation, 'image', raw, reason);\n return;\n }\n provider.resolve(source).then(\n (media) => {\n if (generation === this.generation && !this.disposed) this.settle(generation, 'image', media.uri, reason);\n },\n () => {\n if (generation === this.generation && !this.disposed) this.settle(generation, 'image', raw, reason);\n },\n );\n }\n\n private settle(\n generation: number,\n kind: 'image' | 'empty',\n imageUri: string | null,\n reason: G9IntroFallbackReason | null,\n ): void {\n this.update({ kind, player: null, imageUri, fallback: reason });\n this.reveal(generation);\n }\n\n private reveal(generation: number): void {\n if (generation !== this.generation) return;\n const o = this.config.options();\n const immediate = !o.useMediaFadeTransitions || (o.skipFirstSlideInitialFadeIn && !this.firstRevealDone);\n this.firstRevealDone = true;\n this.update({ visible: true, fadeMs: immediate ? 0 : o.mediaFadeInDurationMs, loading: false });\n this.coverMediaReady = true;\n this.tryDismissCover();\n if (!this.firstReady) {\n this.firstReady = true;\n this.config.onFirstContentReady();\n }\n }\n\n private tryDismissCover(): void {\n if (!this.snapshot.coverVisible || !this.coverMediaReady) return;\n const o = this.config.options();\n if (this.config.now() - this.coverShownAt < o.startupCoverDurationMs) return;\n this.update({ coverVisible: false });\n }\n\n /** Stops and releases the player (MAUI `StopAndReleaseMedia`); `begin` / `show` load again later. */\n release(): void {\n this.generation += 1;\n this.clearTimers();\n this.disposePlayer();\n this.update({\n index: -1,\n kind: 'none',\n player: null,\n imageUri: null,\n visible: false,\n loading: false,\n coverVisible: false,\n });\n this.presented = false;\n }\n\n dispose(): void {\n this.release();\n this.disposed = true;\n }\n}\n"],"names":["G9IntroMediaController","patch","listener","Array","callback","ms","handle","slides","index","o","animateOut","slide","generation","fadeOut","_this","player","error","provider","introSlideHasVideo","createPlayer","introVideoSource","media","startSeconds","event","opts","reason","source","introImageSource","raw","kind","imageUri","immediate","config","Set"],"mappings":";;;;;;;;;;;AA2DO,MAAMA;IAiCH,OAAOC,KAAoC,EAAQ;QACzD,IAAI,CAAC,QAAQ,GAAG;YAAE,GAAG,IAAI,CAAC,QAAQ;YAAE,GAAGA,KAAK;QAAC;QAC7C,KAAK,MAAMC,YAAYC,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,EAAGD;IACrD;IAEQ,MAAME,QAAoB,EAAEC,EAAU,EAAQ;QACpD,MAAMC,SAAS,IAAI,CAAC,MAAM,C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/lynxcontrols-foundation';
2
+ /** One onboarding slide (MAUI `G9IntroSlideItem`). */
3
+ export interface G9IntroSlideItem {
4
+ /** Bundled video asset (e.g. `'Onboarding/1video.mp4'`), played through `services.media`. */
5
+ readonly videoAssetPath?: string | null;
6
+ /** Image shown for image-only slides and whenever the video cannot play. */
7
+ readonly imageSource?: string | null;
8
+ /** String key of the title, resolved through the app's string provider. */
9
+ readonly titleResourceKey?: string;
10
+ readonly subtitleResourceKey?: string;
11
+ }
12
+ /** `true` when the slide has a video (MAUI `HasVideo`). */
13
+ export declare function introSlideHasVideo(slide: G9IntroSlideItem): boolean;
14
+ /** Why a slide shows its image instead of a video. */
15
+ export type G9IntroFallbackReason =
16
+ /** The slide has no video. */
17
+ 'no-video'
18
+ /** No `services.media`, or it cannot create players. */
19
+ | 'no-media-provider'
20
+ /** The provider reports no video support on this target (desktop until decision D14 is resolved). */
21
+ | 'video-unsupported'
22
+ /** Resolving or playing the video failed. */
23
+ | 'video-failed';
24
+ /** Intro defaults (MAUI `G9Metrics.Intro*`). */
25
+ export declare const g9IntroMetrics: Readonly<{
26
+ overlayOpacity: 0.52;
27
+ overlayTopOpacityRatio: 0.4;
28
+ startupCoverFadeDurationMs: 320;
29
+ mediaFadeInDurationMs: 420;
30
+ mediaFadeOutDurationMs: 420;
31
+ logoWidth: 192;
32
+ logoHeight: 34;
33
+ titleFontSize: 18;
34
+ subtitleFontSize: 14;
35
+ navFontSize: 14;
36
+ stepActiveWidth: 28;
37
+ stepInactiveWidth: 20;
38
+ stepHeight: 4;
39
+ stepSpacing: 6;
40
+ chromePadding: 20;
41
+ headerTopPadding: 16;
42
+ logoTopMargin: 48;
43
+ textBottomMargin: 12;
44
+ navMinTouchHeight: 48;
45
+ backdropColor: "#2E7D32";
46
+ }>;
47
+ /**
48
+ * The overlay's top and bottom opacity (MAUI `IntroOverlayDrawable`): flat → both `overlayOpacity`; gradient → the
49
+ * bottom is `overlayOpacity` and the top is `overlayTopOpacity` when set, else `overlayOpacity × ratio`.
50
+ */
51
+ export declare function introOverlayOpacities(options: {
52
+ readonly overlayOpacity: number;
53
+ readonly useGradientOverlay: boolean;
54
+ readonly overlayTopOpacityRatio: number;
55
+ readonly overlayTopOpacity: number | null;
56
+ }): {
57
+ readonly top: number;
58
+ readonly bottom: number;
59
+ };
60
+ /** The media source for a slide's video. */
61
+ export declare function introVideoSource(slide: G9IntroSlideItem): G9MediaSource | null;
62
+ /** The media source for a slide's image. */
63
+ export declare function introImageSource(slide: G9IntroSlideItem): G9MediaSource | null;
64
+ /** Clamp an index into the slides (MAUI `ClampIndex`). */
65
+ export declare function clampIntroIndex(index: number, count: number): number;
66
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,sDAAsD;AACtD,MAAM,WAAW,gBAAgB;IAC/B,6FAA6F;IAC7F,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,4EAA4E;IAC5E,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,2EAA2E;IAC3E,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CACvC;AAED,2DAA2D;AAC3D,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAEnE;AAED,sDAAsD;AACtD,MAAM,MAAM,qBAAqB;AAC/B,8BAA8B;AAC5B,UAAU;AACZ,wDAAwD;GACtD,mBAAmB;AACrB,qGAAqG;GACnG,mBAAmB;AACrB,6CAA6C;GAC3C,cAAc,CAAC;AAEnB,gDAAgD;AAChD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;EAqBzB,CAAC;AAEH;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE;IAC7C,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3C,GAAG;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CASpD;AAED,4CAA4C;AAC5C,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,gBAAgB,GAAG,aAAa,GAAG,IAAI,CAI9E;AAED,4CAA4C;AAC5C,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,gBAAgB,GAAG,aAAa,GAAG,IAAI,CAI9E;AAED,0DAA0D;AAC1D,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAIpE"}
package/dist/model.jsx ADDED
@@ -0,0 +1,68 @@
1
+ function introSlideHasVideo(slide) {
2
+ return null != slide.videoAssetPath && '' !== slide.videoAssetPath.trim();
3
+ }
4
+ const g9IntroMetrics = Object.freeze({
5
+ overlayOpacity: 0.52,
6
+ overlayTopOpacityRatio: 0.4,
7
+ startupCoverFadeDurationMs: 320,
8
+ mediaFadeInDurationMs: 420,
9
+ mediaFadeOutDurationMs: 420,
10
+ logoWidth: 192,
11
+ logoHeight: 34,
12
+ titleFontSize: 18,
13
+ subtitleFontSize: 14,
14
+ navFontSize: 14,
15
+ stepActiveWidth: 28,
16
+ stepInactiveWidth: 20,
17
+ stepHeight: 4,
18
+ stepSpacing: 6,
19
+ chromePadding: 20,
20
+ headerTopPadding: 16,
21
+ logoTopMargin: 48,
22
+ textBottomMargin: 12,
23
+ navMinTouchHeight: 48,
24
+ backdropColor: '#2E7D32'
25
+ });
26
+ function introOverlayOpacities(options) {
27
+ const clamp = (v)=>Number.isFinite(v) ? Math.min(Math.max(v, 0), 1) : 0;
28
+ const bottom = clamp(options.overlayOpacity);
29
+ if (!options.useGradientOverlay) return {
30
+ top: bottom,
31
+ bottom
32
+ };
33
+ const top = null != options.overlayTopOpacity && Number.isFinite(options.overlayTopOpacity) ? clamp(options.overlayTopOpacity) : clamp(bottom * options.overlayTopOpacityRatio);
34
+ return {
35
+ top,
36
+ bottom
37
+ };
38
+ }
39
+ function introVideoSource(slide) {
40
+ if (!introSlideHasVideo(slide)) return null;
41
+ const path = slide.videoAssetPath.trim();
42
+ return /^https?:\/\//i.test(path) ? {
43
+ kind: 'video',
44
+ uri: path
45
+ } : {
46
+ kind: 'video',
47
+ asset: path
48
+ };
49
+ }
50
+ function introImageSource(slide) {
51
+ if (null == slide.imageSource || '' === slide.imageSource.trim()) return null;
52
+ const path = slide.imageSource.trim();
53
+ return /^https?:\/\//i.test(path) ? {
54
+ kind: 'image',
55
+ uri: path
56
+ } : {
57
+ kind: 'image',
58
+ asset: path
59
+ };
60
+ }
61
+ function clampIntroIndex(index, count) {
62
+ if (count <= 0) return 0;
63
+ if (!Number.isFinite(index)) return 0;
64
+ return Math.min(Math.max(Math.trunc(index), 0), count - 1);
65
+ }
66
+ export { clampIntroIndex, g9IntroMetrics, introImageSource, introOverlayOpacities, introSlideHasVideo, introVideoSource };
67
+
68
+ //# sourceMappingURL=model.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.jsx","sources":["../src/model.ts"],"sourcesContent":["import type { G9MediaSource } from '@g9tm/lynxcontrols-foundation';\n\n/** One onboarding slide (MAUI `G9IntroSlideItem`). */\nexport interface G9IntroSlideItem {\n /** Bundled video asset (e.g. `'Onboarding/1video.mp4'`), played through `services.media`. */\n readonly videoAssetPath?: string | null;\n /** Image shown for image-only slides and whenever the video cannot play. */\n readonly imageSource?: string | null;\n /** String key of the title, resolved through the app's string provider. */\n readonly titleResourceKey?: string;\n readonly subtitleResourceKey?: string;\n}\n\n/** `true` when the slide has a video (MAUI `HasVideo`). */\nexport function introSlideHasVideo(slide: G9IntroSlideItem): boolean {\n return slide.videoAssetPath != null && slide.videoAssetPath.trim() !== '';\n}\n\n/** Why a slide shows its image instead of a video. */\nexport type G9IntroFallbackReason =\n /** The slide has no video. */\n | 'no-video'\n /** No `services.media`, or it cannot create players. */\n | 'no-media-provider'\n /** The provider reports no video support on this target (desktop until decision D14 is resolved). */\n | 'video-unsupported'\n /** Resolving or playing the video failed. */\n | 'video-failed';\n\n/** Intro defaults (MAUI `G9Metrics.Intro*`). */\nexport const g9IntroMetrics = Object.freeze({\n overlayOpacity: 0.52,\n overlayTopOpacityRatio: 0.4,\n startupCoverFadeDurationMs: 320,\n mediaFadeInDurationMs: 420,\n mediaFadeOutDurationMs: 420,\n logoWidth: 192,\n logoHeight: 34,\n titleFontSize: 18,\n subtitleFontSize: 14,\n navFontSize: 14,\n stepActiveWidth: 28,\n stepInactiveWidth: 20,\n stepHeight: 4,\n stepSpacing: 6,\n chromePadding: 20,\n headerTopPadding: 16,\n logoTopMargin: 48,\n textBottomMargin: 12,\n navMinTouchHeight: 48,\n backdropColor: '#2E7D32',\n});\n\n/**\n * The overlay's top and bottom opacity (MAUI `IntroOverlayDrawable`): flat → both `overlayOpacity`; gradient → the\n * bottom is `overlayOpacity` and the top is `overlayTopOpacity` when set, else `overlayOpacity × ratio`.\n */\nexport function introOverlayOpacities(options: {\n readonly overlayOpacity: number;\n readonly useGradientOverlay: boolean;\n readonly overlayTopOpacityRatio: number;\n readonly overlayTopOpacity: number | null;\n}): { readonly top: number; readonly bottom: number } {\n const clamp = (v: number) => (Number.isFinite(v) ? Math.min(Math.max(v, 0), 1) : 0);\n const bottom = clamp(options.overlayOpacity);\n if (!options.useGradientOverlay) return { top: bottom, bottom };\n const top =\n options.overlayTopOpacity != null && Number.isFinite(options.overlayTopOpacity)\n ? clamp(options.overlayTopOpacity)\n : clamp(bottom * options.overlayTopOpacityRatio);\n return { top, bottom };\n}\n\n/** The media source for a slide's video. */\nexport function introVideoSource(slide: G9IntroSlideItem): G9MediaSource | null {\n if (!introSlideHasVideo(slide)) return null;\n const path = (slide.videoAssetPath as string).trim();\n return /^https?:\\/\\//i.test(path) ? { kind: 'video', uri: path } : { kind: 'video', asset: path };\n}\n\n/** The media source for a slide's image. */\nexport function introImageSource(slide: G9IntroSlideItem): G9MediaSource | null {\n if (slide.imageSource == null || slide.imageSource.trim() === '') return null;\n const path = slide.imageSource.trim();\n return /^https?:\\/\\//i.test(path) ? { kind: 'image', uri: path } : { kind: 'image', asset: path };\n}\n\n/** Clamp an index into the slides (MAUI `ClampIndex`). */\nexport function clampIntroIndex(index: number, count: number): number {\n if (count <= 0) return 0;\n if (!Number.isFinite(index)) return 0;\n return Math.min(Math.max(Math.trunc(index), 0), count - 1);\n}\n"],"names":["introSlideHasVideo","slide","g9IntroMetrics","Object","introOverlayOpacities","options","clamp","v","Number","Math","bottom","top","introVideoSource","path","introImageSource","clampIntroIndex","index","count"],"mappings":"AAcO,SAASA,mBAAmBC,KAAuB;IACxD,OAAOA,AAAwB,QAAxBA,MAAM,cAAc,IAAYA,AAAgC,OAAhCA,MAAM,cAAc,CAAC,IAAI;AAClE;AAcO,MAAMC,iBAAiBC,OAAO,MAAM,CAAC;IAC1C,gBAAgB;IAChB,wBAAwB;IACxB,4BAA4B;IAC5B,uBAAuB;IACvB,wBAAwB;IACxB,WAAW;IACX,YAAY;IACZ,eAAe;IACf,kBAAkB;IAClB,aAAa;IACb,iBAAiB;IACjB,mBAAmB;IACnB,YAAY;IACZ,aAAa;IACb,eAAe;IACf,kBAAkB;IAClB,eAAe;IACf,kBAAkB;IAClB,mBAAmB;IACnB,eAAe;AACjB;AAMO,SAASC,sBAAsBC,OAKrC;IACC,MAAMC,QAAQ,CAACC,IAAeC,OAAO,QAAQ,CAACD,KAAKE,KAAK,GAAG,CAACA,KAAK,GAAG,CAACF,GAAG,IAAI,KAAK;IACjF,MAAMG,SAASJ,MAAMD,QAAQ,cAAc;IAC3C,IAAI,CAACA,QAAQ,kBAAkB,EAAE,OAAO;QAAE,KAAKK;QAAQA;IAAO;IAC9D,MAAMC,MACJN,AAA6B,QAA7BA,QAAQ,iBAAiB,IAAYG,OAAO,QAAQ,CAACH,QAAQ,iBAAiB,IAC1EC,MAAMD,QAAQ,iBAAiB,IAC/BC,MAAMI,SAASL,QAAQ,sBAAsB;IACnD,OAAO;QAAEM;QAAKD;IAAO;AACvB;AAGO,SAASE,iBAAiBX,KAAuB;IACtD,IAAI,CAACD,mBAAmBC,QAAQ,OAAO;IACvC,MAAMY,OAAQZ,MAAM,cAAc,CAAY,IAAI;IAClD,OAAO,gBAAgB,IAAI,CAACY,QAAQ;QAAE,MAAM;QAAS,KAAKA;IAAK,IAAI;QAAE,MAAM;QAAS,OAAOA;IAAK;AAClG;AAGO,SAASC,iBAAiBb,KAAuB;IACtD,IAAIA,AAAqB,QAArBA,MAAM,WAAW,IAAYA,AAA6B,OAA7BA,MAAM,WAAW,CAAC,IAAI,IAAW,OAAO;IACzE,MAAMY,OAAOZ,MAAM,WAAW,CAAC,IAAI;IACnC,OAAO,gBAAgB,IAAI,CAACY,QAAQ;QAAE,MAAM;QAAS,KAAKA;IAAK,IAAI;QAAE,MAAM;QAAS,OAAOA;IAAK;AAClG;AAGO,SAASE,gBAAgBC,KAAa,EAAEC,KAAa;IAC1D,IAAIA,SAAS,GAAG,OAAO;IACvB,IAAI,CAACT,OAAO,QAAQ,CAACQ,QAAQ,OAAO;IACpC,OAAOP,KAAK,GAAG,CAACA,KAAK,GAAG,CAACA,KAAK,KAAK,CAACO,QAAQ,IAAIC,QAAQ;AAC1D"}
package/package.json CHANGED
@@ -1,6 +1,32 @@
1
1
  {
2
2
  "name": "@g9tm/lynxcontrols-intro-carousel",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.4.0",
4
+ "description": "G9IntroCarousel: onboarding slides with image/video through a media provider.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "sideEffects": [
8
+ "**/*.css"
9
+ ],
10
+ "exports": {
11
+ ".": {
12
+ "source": "./src/index.ts",
13
+ "types": "./dist/index.d.ts",
14
+ "default": "./dist/index.jsx"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "README.md"
20
+ ],
21
+ "scripts": {
22
+ "build": "rslib build"
23
+ },
24
+ "dependencies": {
25
+ "@g9tm/lynxcontrols": "1.4.0",
26
+ "@g9tm/lynxcontrols-foundation": "1.4.0",
27
+ "@lynx-js/lynx-ui-swiper": "3.139.0"
28
+ },
29
+ "peerDependencies": {
30
+ "@lynx-js/react": ">=0.126.2 <0.127.0"
31
+ }
32
+ }