@nascentdigital/funnel-ui 4.4.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Tailwind.d.ts +201 -0
- package/dist/Tailwind.js +282 -0
- package/dist/client/app/AppContainer.d.ts +10 -0
- package/dist/client/app/AppContainer.js +22 -0
- package/dist/client/app/AppContext.d.ts +11 -0
- package/dist/client/app/AppContext.js +6 -0
- package/dist/client/app/AppPreview.d.ts +7 -0
- package/dist/client/app/AppPreview.js +51 -0
- package/dist/client/app/PageContainer.d.ts +8 -0
- package/dist/client/app/PageContainer.js +22 -0
- package/dist/client/app/index.d.ts +9 -0
- package/dist/client/app/index.js +25 -0
- package/dist/client/app/useAppConfig.d.ts +2 -0
- package/dist/client/app/useAppConfig.js +9 -0
- package/dist/client/app/useBrand.d.ts +9 -0
- package/dist/client/app/useBrand.js +17 -0
- package/dist/client/app/useLanguage.d.ts +2 -0
- package/dist/client/app/useLanguage.js +11 -0
- package/dist/client/app/usePageData.d.ts +2 -0
- package/dist/client/app/usePageData.js +25 -0
- package/dist/client/app/usePageUrl.d.ts +1 -0
- package/dist/client/app/usePageUrl.js +12 -0
- package/dist/client/app/useRegion.d.ts +1 -0
- package/dist/client/app/useRegion.js +10 -0
- package/dist/client/app/useSite.d.ts +2 -0
- package/dist/client/app/useSite.js +13 -0
- package/dist/client/atomic/AnimatedText.d.ts +12 -0
- package/dist/client/atomic/AnimatedText.js +90 -0
- package/dist/client/atomic/MaskedInput.d.ts +20 -0
- package/dist/client/atomic/MaskedInput.js +63 -0
- package/dist/client/atomic/index.d.ts +2 -0
- package/dist/client/atomic/index.js +18 -0
- package/dist/client/fields/EmbeddedVideo/EmbeddedPlayer.d.ts +36 -0
- package/dist/client/fields/EmbeddedVideo/EmbeddedPlayer.js +2 -0
- package/dist/client/fields/EmbeddedVideo/EmbeddedVideo.d.ts +13 -0
- package/dist/client/fields/EmbeddedVideo/EmbeddedVideo.js +22 -0
- package/dist/client/fields/EmbeddedVideo/EmbeddedVideoContainer.d.ts +7 -0
- package/dist/client/fields/EmbeddedVideo/EmbeddedVideoContainer.js +24 -0
- package/dist/client/fields/EmbeddedVideo/EmbeddedVideoContext.d.ts +8 -0
- package/dist/client/fields/EmbeddedVideo/EmbeddedVideoContext.js +11 -0
- package/dist/client/fields/EmbeddedVideo/index.d.ts +4 -0
- package/dist/client/fields/EmbeddedVideo/index.js +20 -0
- package/dist/client/fields/EmbeddedVideo/useEmbeddedPlayerProgress.d.ts +10 -0
- package/dist/client/fields/EmbeddedVideo/useEmbeddedPlayerProgress.js +66 -0
- package/dist/client/fields/EmbeddedVideo/useEmbeddedPlayerRef.d.ts +9 -0
- package/dist/client/fields/EmbeddedVideo/useEmbeddedPlayerRef.js +29 -0
- package/dist/client/fields/EmbeddedVideo/vimeo/VimeoPlayer.d.ts +63 -0
- package/dist/client/fields/EmbeddedVideo/vimeo/VimeoPlayer.js +326 -0
- package/dist/client/fields/EmbeddedVideo/vimeo/VimeoVideo.d.ts +13 -0
- package/dist/client/fields/EmbeddedVideo/vimeo/VimeoVideo.js +60 -0
- package/dist/client/fields/EmbeddedVideo/vimeo/index.d.ts +1 -0
- package/dist/client/fields/EmbeddedVideo/vimeo/index.js +17 -0
- package/dist/client/fields/EmbeddedVideo/youtube/YTApi.d.ts +92 -0
- package/dist/client/fields/EmbeddedVideo/youtube/YTApi.js +24 -0
- package/dist/client/fields/EmbeddedVideo/youtube/YoutubePlayer.d.ts +56 -0
- package/dist/client/fields/EmbeddedVideo/youtube/YoutubePlayer.js +288 -0
- package/dist/client/fields/EmbeddedVideo/youtube/YoutubeVideo.d.ts +13 -0
- package/dist/client/fields/EmbeddedVideo/youtube/YoutubeVideo.js +71 -0
- package/dist/client/fields/EmbeddedVideo/youtube/index.d.ts +3 -0
- package/dist/client/fields/EmbeddedVideo/youtube/index.js +19 -0
- package/dist/client/fields/LazyVideo.d.ts +8 -0
- package/dist/client/fields/LazyVideo.js +100 -0
- package/dist/client/fields/index.d.ts +2 -0
- package/dist/client/fields/index.js +18 -0
- package/dist/client/forms/Form.d.ts +13 -0
- package/dist/client/forms/Form.js +68 -0
- package/dist/client/forms/FormContext.d.ts +5 -0
- package/dist/client/forms/FormContext.js +6 -0
- package/dist/client/forms/fields/BooleanField.d.ts +16 -0
- package/dist/client/forms/fields/BooleanField.js +47 -0
- package/dist/client/forms/fields/EnumField.d.ts +20 -0
- package/dist/client/forms/fields/EnumField.js +65 -0
- package/dist/client/forms/fields/Field.d.ts +15 -0
- package/dist/client/forms/fields/Field.js +39 -0
- package/dist/client/forms/fields/FieldErrorController.d.ts +12 -0
- package/dist/client/forms/fields/FieldErrorController.js +13 -0
- package/dist/client/forms/fields/FieldLayout.d.ts +16 -0
- package/dist/client/forms/fields/FieldLayout.js +32 -0
- package/dist/client/forms/fields/TextField.d.ts +25 -0
- package/dist/client/forms/fields/TextField.js +178 -0
- package/dist/client/forms/fields/index.d.ts +2 -0
- package/dist/client/forms/fields/index.js +18 -0
- package/dist/client/forms/fields/useField.d.ts +2 -0
- package/dist/client/forms/fields/useField.js +26 -0
- package/dist/client/forms/index.d.ts +4 -0
- package/dist/client/forms/index.js +20 -0
- package/dist/client/forms/interactive/CheckboxField.d.ts +14 -0
- package/dist/client/forms/interactive/CheckboxField.js +19 -0
- package/dist/client/forms/interactive/RadioField.d.ts +12 -0
- package/dist/client/forms/interactive/RadioField.js +16 -0
- package/dist/client/forms/interactive/RadioGroupField.d.ts +12 -0
- package/dist/client/forms/interactive/RadioGroupField.js +10 -0
- package/dist/client/forms/interactive/SelectField.d.ts +17 -0
- package/dist/client/forms/interactive/SelectField.js +16 -0
- package/dist/client/forms/interactive/index.d.ts +4 -0
- package/dist/client/forms/interactive/index.js +20 -0
- package/dist/client/forms/useForm.d.ts +2 -0
- package/dist/client/forms/useForm.js +17 -0
- package/dist/client/forms/useTempFields.d.ts +7 -0
- package/dist/client/forms/useTempFields.js +54 -0
- package/dist/client/hooks/assets/index.d.ts +2 -0
- package/dist/client/hooks/assets/index.js +18 -0
- package/dist/client/hooks/assets/useImageProxy.d.ts +2 -0
- package/dist/client/hooks/assets/useImageProxy.js +43 -0
- package/dist/client/hooks/assets/useVideoProxy.d.ts +2 -0
- package/dist/client/hooks/assets/useVideoProxy.js +43 -0
- package/dist/client/hooks/breakpoint/BreakpointContainer.d.ts +9 -0
- package/dist/client/hooks/breakpoint/BreakpointContainer.js +39 -0
- package/dist/client/hooks/breakpoint/BreakpointContext.d.ts +7 -0
- package/dist/client/hooks/breakpoint/BreakpointContext.js +9 -0
- package/dist/client/hooks/breakpoint/index.d.ts +3 -0
- package/dist/client/hooks/breakpoint/index.js +19 -0
- package/dist/client/hooks/breakpoint/useCurrentBreakpoint.d.ts +2 -0
- package/dist/client/hooks/breakpoint/useCurrentBreakpoint.js +10 -0
- package/dist/client/hooks/index.d.ts +26 -0
- package/dist/client/hooks/index.js +42 -0
- package/dist/client/hooks/ui-lock/UILockContainer.d.ts +5 -0
- package/dist/client/hooks/ui-lock/UILockContainer.js +57 -0
- package/dist/client/hooks/ui-lock/UILockContext.d.ts +9 -0
- package/dist/client/hooks/ui-lock/UILockContext.js +6 -0
- package/dist/client/hooks/ui-lock/UILockRef.d.ts +36 -0
- package/dist/client/hooks/ui-lock/UILockRef.js +32 -0
- package/dist/client/hooks/ui-lock/index.d.ts +3 -0
- package/dist/client/hooks/ui-lock/index.js +19 -0
- package/dist/client/hooks/ui-lock/useUILock.d.ts +16 -0
- package/dist/client/hooks/ui-lock/useUILock.js +121 -0
- package/dist/client/hooks/useCounter.d.ts +11 -0
- package/dist/client/hooks/useCounter.js +57 -0
- package/dist/client/hooks/useCycle.d.ts +5 -0
- package/dist/client/hooks/useCycle.js +15 -0
- package/dist/client/hooks/useElementRect.d.ts +2 -0
- package/dist/client/hooks/useElementRect.js +63 -0
- package/dist/client/hooks/useElementScrolled.d.ts +17 -0
- package/dist/client/hooks/useElementScrolled.js +51 -0
- package/dist/client/hooks/useElementSelector.d.ts +2 -0
- package/dist/client/hooks/useElementSelector.js +160 -0
- package/dist/client/hooks/useElementSize.d.ts +2 -0
- package/dist/client/hooks/useElementSize.js +64 -0
- package/dist/client/hooks/useFindElements.d.ts +9 -0
- package/dist/client/hooks/useFindElements.js +147 -0
- package/dist/client/hooks/useInViewport.d.ts +16 -0
- package/dist/client/hooks/useInViewport.js +46 -0
- package/dist/client/hooks/useIsDesktop.d.ts +1 -0
- package/dist/client/hooks/useIsDesktop.js +22 -0
- package/dist/client/hooks/useKeyboardFocus.d.ts +7 -0
- package/dist/client/hooks/useKeyboardFocus.js +40 -0
- package/dist/client/hooks/useLatestValue.d.ts +1 -0
- package/dist/client/hooks/useLatestValue.js +21 -0
- package/dist/client/hooks/useLock.d.ts +13 -0
- package/dist/client/hooks/useLock.js +161 -0
- package/dist/client/hooks/useMixedResponsiveValue.d.ts +2 -0
- package/dist/client/hooks/useMixedResponsiveValue.js +20 -0
- package/dist/client/hooks/usePathname.d.ts +9 -0
- package/dist/client/hooks/usePathname.js +25 -0
- package/dist/client/hooks/useRefElement.d.ts +8 -0
- package/dist/client/hooks/useRefElement.js +34 -0
- package/dist/client/hooks/useRefresh.d.ts +2 -0
- package/dist/client/hooks/useRefresh.js +25 -0
- package/dist/client/hooks/useResizeObserver.d.ts +5 -0
- package/dist/client/hooks/useResizeObserver.js +179 -0
- package/dist/client/hooks/useResponsiveValue.d.ts +2 -0
- package/dist/client/hooks/useResponsiveValue.js +16 -0
- package/dist/client/hooks/useRouter.d.ts +20 -0
- package/dist/client/hooks/useRouter.js +49 -0
- package/dist/client/hooks/useSafeLayoutEffect.d.ts +2 -0
- package/dist/client/hooks/useSafeLayoutEffect.js +9 -0
- package/dist/client/hooks/useTouch.d.ts +2 -0
- package/dist/client/hooks/useTouch.js +10 -0
- package/dist/client/hooks/useViewportSize.d.ts +7 -0
- package/dist/client/hooks/useViewportSize.js +66 -0
- package/dist/client/hooks/useWindowScrolled.d.ts +8 -0
- package/dist/client/hooks/useWindowScrolled.js +52 -0
- package/dist/client/index.d.ts +9 -0
- package/dist/client/index.js +25 -0
- package/dist/client/interaction/Carousel.d.ts +48 -0
- package/dist/client/interaction/Carousel.js +498 -0
- package/dist/client/interaction/ClickObserver.d.ts +19 -0
- package/dist/client/interaction/ClickObserver.js +76 -0
- package/dist/client/interaction/InfiniteScroller.d.ts +9 -0
- package/dist/client/interaction/InfiniteScroller.js +47 -0
- package/dist/client/interaction/Loader.d.ts +14 -0
- package/dist/client/interaction/Loader.js +74 -0
- package/dist/client/interaction/Marquee.d.ts +5 -0
- package/dist/client/interaction/Marquee.js +26 -0
- package/dist/client/interaction/Popup.d.ts +36 -0
- package/dist/client/interaction/Popup.js +244 -0
- package/dist/client/interaction/Tooltip.d.ts +16 -0
- package/dist/client/interaction/Tooltip.js +122 -0
- package/dist/client/interaction/UILevel.d.ts +1 -0
- package/dist/client/interaction/UILevel.js +2 -0
- package/dist/client/interaction/backdrop/BackdropContainer.d.ts +5 -0
- package/dist/client/interaction/backdrop/BackdropContainer.js +114 -0
- package/dist/client/interaction/backdrop/BackdropContext.d.ts +8 -0
- package/dist/client/interaction/backdrop/BackdropContext.js +6 -0
- package/dist/client/interaction/backdrop/BackdropEvent.d.ts +64 -0
- package/dist/client/interaction/backdrop/BackdropEvent.js +92 -0
- package/dist/client/interaction/backdrop/index.d.ts +4 -0
- package/dist/client/interaction/backdrop/index.js +20 -0
- package/dist/client/interaction/backdrop/useBackdrop.d.ts +13 -0
- package/dist/client/interaction/backdrop/useBackdrop.js +58 -0
- package/dist/client/interaction/backdrop/useBackdropClick.d.ts +2 -0
- package/dist/client/interaction/backdrop/useBackdropClick.js +21 -0
- package/dist/client/interaction/backdrop/useBackdropVisible.d.ts +1 -0
- package/dist/client/interaction/backdrop/useBackdropVisible.js +30 -0
- package/dist/client/interaction/focus/FocusArea.d.ts +10 -0
- package/dist/client/interaction/focus/FocusArea.js +38 -0
- package/dist/client/interaction/focus/FocusContext.d.ts +7 -0
- package/dist/client/interaction/focus/FocusContext.js +7 -0
- package/dist/client/interaction/focus/FocusController.d.ts +9 -0
- package/dist/client/interaction/focus/FocusController.js +40 -0
- package/dist/client/interaction/focus/FocusService.d.ts +20 -0
- package/dist/client/interaction/focus/FocusService.js +204 -0
- package/dist/client/interaction/focus/LinkedList.d.ts +18 -0
- package/dist/client/interaction/focus/LinkedList.js +122 -0
- package/dist/client/interaction/focus/index.d.ts +2 -0
- package/dist/client/interaction/focus/index.js +18 -0
- package/dist/client/interaction/focus/useFocusService.d.ts +2 -0
- package/dist/client/interaction/focus/useFocusService.js +14 -0
- package/dist/client/interaction/index.d.ts +12 -0
- package/dist/client/interaction/index.js +28 -0
- package/dist/client/interaction/modal/Modal.d.ts +29 -0
- package/dist/client/interaction/modal/Modal.js +136 -0
- package/dist/client/interaction/modal/ModalContainer.d.ts +5 -0
- package/dist/client/interaction/modal/ModalContainer.js +104 -0
- package/dist/client/interaction/modal/ModalContext.d.ts +8 -0
- package/dist/client/interaction/modal/ModalContext.js +6 -0
- package/dist/client/interaction/modal/ModalEvent.d.ts +39 -0
- package/dist/client/interaction/modal/ModalEvent.js +53 -0
- package/dist/client/interaction/modal/index.d.ts +2 -0
- package/dist/client/interaction/modal/index.js +18 -0
- package/dist/client/interaction/paginator/Paginator.d.ts +33 -0
- package/dist/client/interaction/paginator/Paginator.js +67 -0
- package/dist/client/interaction/paginator/index.d.ts +1 -0
- package/dist/client/interaction/paginator/index.js +17 -0
- package/dist/client/layouts/MasonaryLayout.d.ts +7 -0
- package/dist/client/layouts/MasonaryLayout.js +53 -0
- package/dist/client/layouts/index.d.ts +1 -0
- package/dist/client/layouts/index.js +17 -0
- package/dist/client/refs.d.ts +2 -0
- package/dist/client/refs.js +13 -0
- package/dist/client/transitions/Revelator.d.ts +42 -0
- package/dist/client/transitions/Revelator.js +60 -0
- package/dist/client/transitions/SideScroll.d.ts +14 -0
- package/dist/client/transitions/SideScroll.js +51 -0
- package/dist/client/transitions/StyleInViewport.d.ts +20 -0
- package/dist/client/transitions/StyleInViewport.js +66 -0
- package/dist/client/transitions/StyleSwitch.d.ts +297 -0
- package/dist/client/transitions/StyleSwitch.js +78 -0
- package/dist/client/transitions/index.d.ts +6 -0
- package/dist/client/transitions/index.js +22 -0
- package/dist/client/transitions/parallax/Parallax.d.ts +20 -0
- package/dist/client/transitions/parallax/Parallax.js +72 -0
- package/dist/client/transitions/parallax/ParallaxContext.d.ts +11 -0
- package/dist/client/transitions/parallax/ParallaxContext.js +6 -0
- package/dist/client/transitions/parallax/ParallaxItem.d.ts +14 -0
- package/dist/client/transitions/parallax/ParallaxItem.js +37 -0
- package/dist/client/transitions/parallax/ParallaxRemote.d.ts +29 -0
- package/dist/client/transitions/parallax/ParallaxRemote.js +136 -0
- package/dist/client/transitions/parallax/ParallaxUtils.d.ts +5 -0
- package/dist/client/transitions/parallax/ParallaxUtils.js +19 -0
- package/dist/client/transitions/parallax/index.d.ts +2 -0
- package/dist/client/transitions/parallax/index.js +18 -0
- package/dist/client/transitions/parallax/useDisableParallax.d.ts +4 -0
- package/dist/client/transitions/parallax/useDisableParallax.js +13 -0
- package/dist/client/transitions/parallax/useParallax.d.ts +2 -0
- package/dist/client/transitions/parallax/useParallax.js +18 -0
- package/dist/client/transitions/parallax/useTransforms.d.ts +34 -0
- package/dist/client/transitions/parallax/useTransforms.js +176 -0
- package/dist/client/transitions/reveal/Reveal.d.ts +14 -0
- package/dist/client/transitions/reveal/Reveal.js +75 -0
- package/dist/client/transitions/reveal/RevealAnimation.d.ts +17 -0
- package/dist/client/transitions/reveal/RevealAnimation.js +2 -0
- package/dist/client/transitions/reveal/RevealAnimator.d.ts +13 -0
- package/dist/client/transitions/reveal/RevealAnimator.js +41 -0
- package/dist/client/transitions/reveal/RevealController.d.ts +13 -0
- package/dist/client/transitions/reveal/RevealController.js +114 -0
- package/dist/client/transitions/reveal/RevealElementAnimator.d.ts +13 -0
- package/dist/client/transitions/reveal/RevealElementAnimator.js +65 -0
- package/dist/client/transitions/reveal/index.d.ts +2 -0
- package/dist/client/transitions/reveal/index.js +18 -0
- package/dist/client/utils/OnKey.d.ts +20 -0
- package/dist/client/utils/OnKey.js +33 -0
- package/dist/client/utils/SharedMutationObserver.d.ts +20 -0
- package/dist/client/utils/SharedMutationObserver.js +202 -0
- package/dist/client/utils/index.d.ts +2 -0
- package/dist/client/utils/index.js +18 -0
- package/dist/server/atomic/Markup.d.ts +14 -0
- package/dist/server/atomic/Markup.js +34 -0
- package/dist/server/atomic/NascentLogo.d.ts +6 -0
- package/dist/server/atomic/NascentLogo.js +9 -0
- package/dist/server/atomic/index.d.ts +2 -0
- package/dist/server/atomic/index.js +18 -0
- package/dist/server/blocks/Block.d.ts +16 -0
- package/dist/server/blocks/Block.js +92 -0
- package/dist/server/blocks/Clients.d.ts +33 -0
- package/dist/server/blocks/Clients.js +82 -0
- package/dist/server/blocks/Editorial.d.ts +33 -0
- package/dist/server/blocks/Editorial.js +80 -0
- package/dist/server/blocks/Form.d.ts +46 -0
- package/dist/server/blocks/Form.js +74 -0
- package/dist/server/blocks/FormMessage.d.ts +15 -0
- package/dist/server/blocks/FormMessage.js +37 -0
- package/dist/server/blocks/MediaLayout.d.ts +309 -0
- package/dist/server/blocks/MediaLayout.js +105 -0
- package/dist/server/blocks/Message.d.ts +76 -0
- package/dist/server/blocks/Message.js +352 -0
- package/dist/server/blocks/Outcome.d.ts +84 -0
- package/dist/server/blocks/Outcome.js +489 -0
- package/dist/server/blocks/OutcomeDetail.d.ts +303 -0
- package/dist/server/blocks/OutcomeDetail.js +63 -0
- package/dist/server/blocks/Projects.d.ts +43 -0
- package/dist/server/blocks/Projects.js +109 -0
- package/dist/server/blocks/Stat.d.ts +325 -0
- package/dist/server/blocks/Stat.js +107 -0
- package/dist/server/blocks/Stats.d.ts +36 -0
- package/dist/server/blocks/Stats.js +79 -0
- package/dist/server/blocks/Testimonial.d.ts +30 -0
- package/dist/server/blocks/Testimonial.js +68 -0
- package/dist/server/blocks/ValueProp.d.ts +43 -0
- package/dist/server/blocks/ValueProp.js +125 -0
- package/dist/server/blocks/index.d.ts +13 -0
- package/dist/server/blocks/index.js +29 -0
- package/dist/server/data/PrePaginator.d.ts +8 -0
- package/dist/server/data/PrePaginator.js +30 -0
- package/dist/server/data/index.d.ts +1 -0
- package/dist/server/data/index.js +17 -0
- package/dist/server/entities/Client.d.ts +327 -0
- package/dist/server/entities/Client.js +118 -0
- package/dist/server/entities/ClientBadge.d.ts +293 -0
- package/dist/server/entities/ClientBadge.js +37 -0
- package/dist/server/entities/Person.d.ts +314 -0
- package/dist/server/entities/Person.js +98 -0
- package/dist/server/entities/Project.d.ts +329 -0
- package/dist/server/entities/Project.js +112 -0
- package/dist/server/entities/UniqueSellingPoint.d.ts +327 -0
- package/dist/server/entities/UniqueSellingPoint.js +119 -0
- package/dist/server/entities/index.d.ts +6 -0
- package/dist/server/entities/index.js +22 -0
- package/dist/server/entities/previews/MessagePreview.d.ts +299 -0
- package/dist/server/entities/previews/MessagePreview.js +41 -0
- package/dist/server/entities/previews/PagePreview.d.ts +10 -0
- package/dist/server/entities/previews/PagePreview.js +42 -0
- package/dist/server/entities/previews/index.d.ts +2 -0
- package/dist/server/entities/previews/index.js +18 -0
- package/dist/server/fields/Caption.d.ts +13 -0
- package/dist/server/fields/Caption.js +45 -0
- package/dist/server/fields/Description.d.ts +13 -0
- package/dist/server/fields/Description.js +46 -0
- package/dist/server/fields/FreeFormContent.d.ts +17 -0
- package/dist/server/fields/FreeFormContent.js +43 -0
- package/dist/server/fields/Headline.d.ts +13 -0
- package/dist/server/fields/Headline.js +46 -0
- package/dist/server/fields/Icon.d.ts +10 -0
- package/dist/server/fields/Icon.js +39 -0
- package/dist/server/fields/Link.d.ts +16 -0
- package/dist/server/fields/Link.js +61 -0
- package/dist/server/fields/Quote.d.ts +13 -0
- package/dist/server/fields/Quote.js +46 -0
- package/dist/server/fields/RichText.d.ts +296 -0
- package/dist/server/fields/RichText.js +217 -0
- package/dist/server/fields/Title.d.ts +292 -0
- package/dist/server/fields/Title.js +38 -0
- package/dist/server/fields/Visual.d.ts +12 -0
- package/dist/server/fields/Visual.js +66 -0
- package/dist/server/fields/index.d.ts +10 -0
- package/dist/server/fields/index.js +26 -0
- package/dist/server/index.d.ts +9 -0
- package/dist/server/index.js +25 -0
- package/dist/server/panels/BlockPanel.d.ts +14 -0
- package/dist/server/panels/BlockPanel.js +56 -0
- package/dist/server/panels/MessagePanel.d.ts +31 -0
- package/dist/server/panels/MessagePanel.js +81 -0
- package/dist/server/panels/VisualPanel.d.ts +36 -0
- package/dist/server/panels/VisualPanel.js +143 -0
- package/dist/server/panels/index.d.ts +3 -0
- package/dist/server/panels/index.js +19 -0
- package/dist/server/schema/Anchor.d.ts +7 -0
- package/dist/server/schema/Anchor.js +24 -0
- package/dist/server/schema/AspectRatio.d.ts +9 -0
- package/dist/server/schema/AspectRatio.js +43 -0
- package/dist/server/schema/BlockConfig.d.ts +56 -0
- package/dist/server/schema/BlockConfig.js +192 -0
- package/dist/server/schema/CollectionSchema.d.ts +4 -0
- package/dist/server/schema/CollectionSchema.js +15 -0
- package/dist/server/schema/ItemAlignment.d.ts +12 -0
- package/dist/server/schema/ItemAlignment.js +42 -0
- package/dist/server/schema/ItemPosition.d.ts +6 -0
- package/dist/server/schema/ItemPosition.js +25 -0
- package/dist/server/schema/ItemSize.d.ts +6 -0
- package/dist/server/schema/ItemSize.js +24 -0
- package/dist/server/schema/TextAlignment.d.ts +6 -0
- package/dist/server/schema/TextAlignment.js +22 -0
- package/dist/server/schema/index.d.ts +8 -0
- package/dist/server/schema/index.js +24 -0
- package/dist/server/sections/index.d.ts +1 -0
- package/dist/server/sections/index.js +17 -0
- package/dist/server/sections/renderSection.d.ts +6 -0
- package/dist/server/sections/renderSection.js +19 -0
- package/dist/server/transitions/Slide.d.ts +293 -0
- package/dist/server/transitions/Slide.js +31 -0
- package/dist/server/transitions/index.d.ts +3 -0
- package/dist/server/transitions/index.js +19 -0
- package/dist/styles/app/AppPreview.css +49 -0
- package/dist/styles/app/_index.css +1 -0
- package/dist/styles/base/_index.css +2 -0
- package/dist/styles/base/global.css +9 -0
- package/dist/styles/base/tailwind.css +3 -0
- package/dist/styles/blocks/Block-layout.css +244 -0
- package/dist/styles/blocks/Block-spacing.css +150 -0
- package/dist/styles/blocks/Block-theming.css +14 -0
- package/dist/styles/blocks/Clients.css +10 -0
- package/dist/styles/blocks/Editorial.css +133 -0
- package/dist/styles/blocks/Form.css +13 -0
- package/dist/styles/blocks/MediaLayout.css +215 -0
- package/dist/styles/blocks/Message.css +353 -0
- package/dist/styles/blocks/Outcome.css +83 -0
- package/dist/styles/blocks/Projects.css +18 -0
- package/dist/styles/blocks/Stat.css +45 -0
- package/dist/styles/blocks/Stats.css +38 -0
- package/dist/styles/blocks/Testimonial.css +323 -0
- package/dist/styles/blocks/ValueProp.css +135 -0
- package/dist/styles/blocks/_index.css +14 -0
- package/dist/styles/components/_index.css +3 -0
- package/dist/styles/components/container.css +58 -0
- package/dist/styles/components/divider.css +6 -0
- package/dist/styles/components/embed/VimeoPlayer.css +49 -0
- package/dist/styles/components/embed/YoutubePlayer.css +72 -0
- package/dist/styles/components/embed/_index.css +2 -0
- package/dist/styles/entities/Client.css +5 -0
- package/dist/styles/entities/ClientBadge.css +14 -0
- package/dist/styles/entities/Person.css +76 -0
- package/dist/styles/entities/Project.css +44 -0
- package/dist/styles/entities/UniqueSellingPoint.css +54 -0
- package/dist/styles/entities/_index.css +5 -0
- package/dist/styles/fields/Caption.css +23 -0
- package/dist/styles/fields/Description.css +23 -0
- package/dist/styles/fields/FreeFormContent.css +24 -0
- package/dist/styles/fields/Headline.css +38 -0
- package/dist/styles/fields/Icon.css +20 -0
- package/dist/styles/fields/LazyVideo.css +12 -0
- package/dist/styles/fields/Link.css +16 -0
- package/dist/styles/fields/Quote.css +48 -0
- package/dist/styles/fields/RichText.css +243 -0
- package/dist/styles/fields/Title.css +17 -0
- package/dist/styles/fields/Visual.css +27 -0
- package/dist/styles/fields/_index.css +11 -0
- package/dist/styles/index.css +9 -0
- package/dist/styles/layouts/MasonryLayout.css +24 -0
- package/dist/styles/layouts/_index.css +1 -0
- package/dist/styles/panels/MessagePanel.css +56 -0
- package/dist/styles/panels/VisualPanel.css +58 -0
- package/dist/styles/panels/_index.css +2 -0
- package/dist/styles/utilities/_index.css +7 -0
- package/dist/styles/utilities/ellipsis.css +7 -0
- package/dist/styles/utilities/fade.css +16 -0
- package/dist/styles/utilities/glass.css +8 -0
- package/dist/styles/utilities/interpolate.css +22 -0
- package/dist/styles/utilities/masks.css +18 -0
- package/dist/styles/utilities/stacked.css +24 -0
- package/dist/styles/utilities/text-gradient.css +37 -0
- package/dist/types/HTMLBlockElement.d.ts +6 -0
- package/dist/types/HTMLBlockElement.js +2 -0
- package/dist/types/HTMLElements.d.ts +129 -0
- package/dist/types/HTMLElements.js +2 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +18 -0
- package/package.json +73 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useAppConfig = useAppConfig;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const AppContext_1 = require("./AppContext");
|
|
6
|
+
// hook
|
|
7
|
+
function useAppConfig() {
|
|
8
|
+
return (0, react_1.useContext)(AppContext_1.AppContext).appConfig;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RegionsConfig } from '@nascentdigital/funnel-core';
|
|
2
|
+
export declare function useBrand<TRegion extends string = string>(): useBrand.Brand<TRegion>;
|
|
3
|
+
export declare namespace useBrand {
|
|
4
|
+
type Brand<TRegion extends string> = {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
regionalization: RegionsConfig<TRegion>;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useBrand = useBrand;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const AppContext_1 = require("./AppContext");
|
|
6
|
+
// hook
|
|
7
|
+
function useBrand() {
|
|
8
|
+
// bind context
|
|
9
|
+
const { brand, appConfig } = (0, react_1.useContext)(AppContext_1.AppContext);
|
|
10
|
+
// unpack
|
|
11
|
+
const brandConfig = appConfig.brands[brand];
|
|
12
|
+
return {
|
|
13
|
+
id: brand,
|
|
14
|
+
name: brandConfig.name,
|
|
15
|
+
regionalization: brandConfig.regionalization
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useLanguage = useLanguage;
|
|
4
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
5
|
+
const navigation_1 = require("next/navigation");
|
|
6
|
+
function useLanguage() {
|
|
7
|
+
// bind hooks
|
|
8
|
+
const params = (0, navigation_1.useParams)();
|
|
9
|
+
// get locale
|
|
10
|
+
return funnel_core_1.Language.parse(params.language);
|
|
11
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.usePageData = usePageData;
|
|
4
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const AppContext_1 = require("./AppContext");
|
|
7
|
+
const useRegion_1 = require("./useRegion");
|
|
8
|
+
// hook
|
|
9
|
+
function usePageData(pageType) {
|
|
10
|
+
// bind context
|
|
11
|
+
const { siteData } = (0, react_1.useContext)(AppContext_1.AppContext);
|
|
12
|
+
const region = (0, useRegion_1.useRegion)();
|
|
13
|
+
// resolve pages for region (or blow up)
|
|
14
|
+
const pages = siteData[region];
|
|
15
|
+
if (!pages) {
|
|
16
|
+
throw new funnel_core_1.IllegalStateError(`Schema.Site.current() doesn't have mapping for region "${region}"`);
|
|
17
|
+
}
|
|
18
|
+
// resolve page for id (or blow up)
|
|
19
|
+
const page = pages[pageType];
|
|
20
|
+
if (!page) {
|
|
21
|
+
throw new funnel_core_1.IllegalStateError(`Schema.Site.current() doesn't have mapping for page "${pageType}" in region "${region}"`);
|
|
22
|
+
}
|
|
23
|
+
// return page
|
|
24
|
+
return page;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function usePageUrl(): string | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.usePageUrl = usePageUrl;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const AppContext_1 = require("./AppContext");
|
|
6
|
+
// hook
|
|
7
|
+
function usePageUrl() {
|
|
8
|
+
// bind context
|
|
9
|
+
const { page } = (0, react_1.useContext)(AppContext_1.AppContext);
|
|
10
|
+
// return page
|
|
11
|
+
return page === null || page === void 0 ? void 0 : page.url;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useRegion<TRegion extends string = string>(): TRegion;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useRegion = useRegion;
|
|
4
|
+
const navigation_1 = require("next/navigation");
|
|
5
|
+
function useRegion() {
|
|
6
|
+
// bind hooks
|
|
7
|
+
const params = (0, navigation_1.useParams)();
|
|
8
|
+
// get locale
|
|
9
|
+
return params.region;
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSite = useSite;
|
|
4
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const AppContext_1 = require("./AppContext");
|
|
7
|
+
// hook
|
|
8
|
+
function useSite() {
|
|
9
|
+
// bind context
|
|
10
|
+
const { siteData } = (0, react_1.useContext)(AppContext_1.AppContext);
|
|
11
|
+
// return site data
|
|
12
|
+
return new funnel_core_1.Schema.SiteModel(siteData);
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MotionProps } from 'motion/react';
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
3
|
+
import { HTMLElements } from '../../types';
|
|
4
|
+
export declare function AnimatedText({ variant, className, textOptions: rawTextOptions, ...sectionProps }: AnimatedText.Props): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare namespace AnimatedText {
|
|
6
|
+
type Props = Omit<HTMLAttributes<HTMLElements['section']>, 'children' | keyof MotionProps> & {
|
|
7
|
+
variant?: Variant;
|
|
8
|
+
className?: string;
|
|
9
|
+
textOptions: string;
|
|
10
|
+
};
|
|
11
|
+
type Variant = 'typed' | 'slide-up';
|
|
12
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
4
|
+
var t = {};
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
8
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
9
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
10
|
+
t[p[i]] = s[p[i]];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.AnimatedText = AnimatedText;
|
|
19
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
20
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
21
|
+
const react_1 = require("motion/react");
|
|
22
|
+
const react_2 = require("react");
|
|
23
|
+
const rxjs_1 = require("rxjs");
|
|
24
|
+
const hooks_1 = require("../hooks");
|
|
25
|
+
// component
|
|
26
|
+
function AnimatedText(_a) {
|
|
27
|
+
var _b;
|
|
28
|
+
var { variant = 'typed', className, textOptions: rawTextOptions } = _a, sectionProps = __rest(_a, ["variant", "className", "textOptions"]);
|
|
29
|
+
// bind hooks
|
|
30
|
+
const textOptions = rawTextOptions.split('|');
|
|
31
|
+
const [text, cycleText] = (0, hooks_1.useCycle)(textOptions);
|
|
32
|
+
const reducedMotion = (_b = (0, react_1.useReducedMotion)()) !== null && _b !== void 0 ? _b : false;
|
|
33
|
+
// keep cycling
|
|
34
|
+
(0, react_2.useEffect)(() => {
|
|
35
|
+
// ignore if we're in reduced motion
|
|
36
|
+
if (reducedMotion) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
// use a timed animation
|
|
40
|
+
const subscription = (0, rxjs_1.interval)(5000)
|
|
41
|
+
.subscribe(() => cycleText());
|
|
42
|
+
// cancel subscription on unmount
|
|
43
|
+
return () => subscription.unsubscribe();
|
|
44
|
+
}, [reducedMotion, cycleText]);
|
|
45
|
+
// skip if reduced motion
|
|
46
|
+
if (reducedMotion) {
|
|
47
|
+
return (0, jsx_runtime_1.jsx)("span", Object.assign({ className: className }, sectionProps, { children: text }));
|
|
48
|
+
}
|
|
49
|
+
// render content based on variant
|
|
50
|
+
switch (variant) {
|
|
51
|
+
case 'typed':
|
|
52
|
+
return ((0, jsx_runtime_1.jsx)(react_1.AnimatePresence, { mode: "wait", children: (0, jsx_runtime_1.jsx)(react_1.motion.span, Object.assign({ className: (0, classnames_1.default)(className, 'overflow-hidden'), variants: Animations.typed, initial: "hidden", animate: "visible", exit: "hidden", "aria-hidden": true }, sectionProps, { children: text.split('').map((letter, index) => ((0, jsx_runtime_1.jsx)(react_1.motion.span, { className: "inline-block", variants: Animations.typedCharacter, "aria-hidden": true, children: letter === ' ' ? (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "\u00A0" }) : letter }, letter + '_' + index))) }), text) }));
|
|
53
|
+
case 'slide-up':
|
|
54
|
+
return ((0, jsx_runtime_1.jsx)(react_1.AnimatePresence, { initial: false, mode: "wait", children: (0, jsx_runtime_1.jsx)(react_1.motion.span, Object.assign({ className: (0, classnames_1.default)(className, 'inline-block'), variants: Animations.slideUp, initial: "hidden", animate: "visible", exit: "exit", transition: { duration: 0.25 }, "aria-hidden": true }, sectionProps, { children: text }), text) }));
|
|
55
|
+
default:
|
|
56
|
+
return (0, jsx_runtime_1.jsx)("span", { className: className, children: text });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
// helpers
|
|
60
|
+
const Animations = {
|
|
61
|
+
typed: {
|
|
62
|
+
hidden: {
|
|
63
|
+
opacity: 0
|
|
64
|
+
},
|
|
65
|
+
visible: {
|
|
66
|
+
opacity: 1,
|
|
67
|
+
transition: {
|
|
68
|
+
staggerChildren: 0.08
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
typedCharacter: {
|
|
73
|
+
hidden: { opacity: 0, y: 5 },
|
|
74
|
+
visible: { opacity: 1, y: 0 }
|
|
75
|
+
},
|
|
76
|
+
slideUp: {
|
|
77
|
+
hidden: {
|
|
78
|
+
opacity: 0,
|
|
79
|
+
y: '50%'
|
|
80
|
+
},
|
|
81
|
+
visible: {
|
|
82
|
+
opacity: 1,
|
|
83
|
+
y: 0
|
|
84
|
+
},
|
|
85
|
+
exit: {
|
|
86
|
+
opacity: 0,
|
|
87
|
+
y: '-50%'
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Callback } from '@nascentdigital/funnel-core';
|
|
2
|
+
import { MaskedDateOptions, MaskedDynamicOptions, MaskedPatternOptions, MaskedRangeOptions, MaskedRegExpOptions } from 'imask';
|
|
3
|
+
import { InputHTMLAttributes } from 'react';
|
|
4
|
+
import { HTMLElements } from '../../types';
|
|
5
|
+
export declare const MaskedInput: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "defaultValue" | "onChange"> & {
|
|
6
|
+
mask: MaskedInput.Mask;
|
|
7
|
+
initialValue?: string;
|
|
8
|
+
onValueChanged?: Callback<string>;
|
|
9
|
+
} & import("react").RefAttributes<MaskedInput.Service>>;
|
|
10
|
+
export declare namespace MaskedInput {
|
|
11
|
+
type Props = Omit<InputHTMLAttributes<HTMLElements['input']>, 'defaultValue' | 'value' | 'onChange'> & {
|
|
12
|
+
mask: Mask;
|
|
13
|
+
initialValue?: string;
|
|
14
|
+
onValueChanged?: Callback<string>;
|
|
15
|
+
};
|
|
16
|
+
type Mask = MaskedRegExpOptions | MaskedPatternOptions | MaskedDateOptions | MaskedRangeOptions | MaskedDynamicOptions;
|
|
17
|
+
interface Service {
|
|
18
|
+
setValue(value: string): void;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.MaskedInput = void 0;
|
|
15
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
17
|
+
const imask_1 = require("imask");
|
|
18
|
+
const react_1 = require("react");
|
|
19
|
+
const hooks_1 = require("../hooks");
|
|
20
|
+
// component
|
|
21
|
+
exports.MaskedInput = (0, react_1.forwardRef)(function MaskedInput(_a, ref) {
|
|
22
|
+
var { mask: maskOptionsRaw, initialValue, onValueChanged = funnel_core_1.Fn.NoOp } = _a, props = __rest(_a, ["mask", "initialValue", "onValueChanged"]);
|
|
23
|
+
// bind ref + hooks
|
|
24
|
+
const [elementRef, element] = (0, hooks_1.useRefElement)();
|
|
25
|
+
const maskOptions = (0, hooks_1.useLatestValue)(maskOptionsRaw);
|
|
26
|
+
const [mask, setMask] = (0, react_1.useState)();
|
|
27
|
+
const onValueChangedRef = (0, react_1.useRef)(onValueChanged);
|
|
28
|
+
onValueChangedRef.current = onValueChanged;
|
|
29
|
+
// create mask when element + options change
|
|
30
|
+
(0, react_1.useEffect)(() => {
|
|
31
|
+
// skip if element isn't ready
|
|
32
|
+
if (!element) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
// bind mask
|
|
36
|
+
const mask = new imask_1.InputMask(element, maskOptions);
|
|
37
|
+
setMask(mask);
|
|
38
|
+
// bind events
|
|
39
|
+
const onAccept = () => {
|
|
40
|
+
const onValueChanged = onValueChangedRef.current;
|
|
41
|
+
onValueChanged(mask.unmaskedValue);
|
|
42
|
+
};
|
|
43
|
+
mask.on('accept', onAccept);
|
|
44
|
+
// destroy mask
|
|
45
|
+
return () => {
|
|
46
|
+
// unbind events
|
|
47
|
+
mask.off(onAccept);
|
|
48
|
+
// destroy mask
|
|
49
|
+
mask.destroy();
|
|
50
|
+
};
|
|
51
|
+
}, [element, maskOptions]);
|
|
52
|
+
// bind service
|
|
53
|
+
(0, react_1.useImperativeHandle)(ref, () => ({
|
|
54
|
+
setValue: value => {
|
|
55
|
+
if (mask) {
|
|
56
|
+
mask.unmaskedValue = value;
|
|
57
|
+
mask.updateValue();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}), [mask]);
|
|
61
|
+
// render
|
|
62
|
+
return ((0, jsx_runtime_1.jsx)("input", Object.assign({ ref: elementRef, defaultValue: initialValue }, props)));
|
|
63
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./AnimatedText"), exports);
|
|
18
|
+
__exportStar(require("./MaskedInput"), exports);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Language } from '@nascentdigital/funnel-core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
export interface EmbeddedPlayer {
|
|
4
|
+
readonly elementId: string;
|
|
5
|
+
target: EmbeddedPlayer.Target;
|
|
6
|
+
readonly videoUrl: URL;
|
|
7
|
+
readonly language: Language;
|
|
8
|
+
readonly background: boolean;
|
|
9
|
+
readonly state$: Observable<EmbeddedPlayer.State>;
|
|
10
|
+
readonly state: EmbeddedPlayer.State;
|
|
11
|
+
readonly ready: boolean;
|
|
12
|
+
readonly started: boolean;
|
|
13
|
+
readonly muted$: Observable<boolean>;
|
|
14
|
+
readonly muted: boolean;
|
|
15
|
+
readonly hasCaptions: boolean;
|
|
16
|
+
readonly captions$: Observable<boolean>;
|
|
17
|
+
readonly captions: boolean;
|
|
18
|
+
readonly duration: number;
|
|
19
|
+
readonly currentTime: number;
|
|
20
|
+
initialize(): void;
|
|
21
|
+
destroy(): void;
|
|
22
|
+
play(): void;
|
|
23
|
+
seekTo(timeInSeconds: number): void;
|
|
24
|
+
pause(): void;
|
|
25
|
+
mute(): void;
|
|
26
|
+
unmute(): void;
|
|
27
|
+
captionsOn(): void;
|
|
28
|
+
captionsOff(): void;
|
|
29
|
+
}
|
|
30
|
+
export declare namespace EmbeddedPlayer {
|
|
31
|
+
type Target = {
|
|
32
|
+
videoId: string;
|
|
33
|
+
hash?: string;
|
|
34
|
+
};
|
|
35
|
+
type State = 'uninitialized' | 'initializing' | 'initialized' | 'playing' | 'paused' | 'ended' | 'error' | 'destroyed';
|
|
36
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Language, Schema } from '@nascentdigital/funnel-core';
|
|
2
|
+
import { EmbeddedPlayer } from './EmbeddedPlayer';
|
|
3
|
+
export declare const EmbeddedVideo: import("react").ForwardRefExoticComponent<EmbeddedVideo.Props & import("react").RefAttributes<EmbeddedPlayer>>;
|
|
4
|
+
export declare namespace EmbeddedVideo {
|
|
5
|
+
type Props = {
|
|
6
|
+
className?: string;
|
|
7
|
+
video?: Schema.EmbeddedVideoField.Value;
|
|
8
|
+
language?: Language;
|
|
9
|
+
background?: boolean;
|
|
10
|
+
muted?: boolean;
|
|
11
|
+
disableControls?: boolean;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmbeddedVideo = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const vimeo_1 = require("./vimeo");
|
|
7
|
+
const youtube_1 = require("./youtube");
|
|
8
|
+
// component
|
|
9
|
+
exports.EmbeddedVideo = (0, react_1.forwardRef)(function EmbeddedVideo({ className, video, language, muted, background = false, disableControls = false }, ref) {
|
|
10
|
+
// skip if there's no video
|
|
11
|
+
if (!video) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
// render youtube
|
|
15
|
+
else if (video.type === 'youtube') {
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)(youtube_1.YoutubeVideo, { ref: ref, className: className, video: video, language: language, muted: muted || video.muted, background: background, disableControls: disableControls }));
|
|
17
|
+
}
|
|
18
|
+
// render vimeo
|
|
19
|
+
else {
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(vimeo_1.VimeoVideo, { ref: ref, className: className, video: video, language: language, muted: muted || video.muted, background: background, disableControls: disableControls }));
|
|
21
|
+
}
|
|
22
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
export declare function EmbeddedVideoContainer({ nativeYoutube, children }: EmbeddedVideoContainer.Props): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare namespace EmbeddedVideoContainer {
|
|
4
|
+
type Props = PropsWithChildren & {
|
|
5
|
+
nativeYoutube?: boolean;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.EmbeddedVideoContainer = EmbeddedVideoContainer;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const script_1 = __importDefault(require("next/script"));
|
|
9
|
+
const react_1 = require("react");
|
|
10
|
+
const EmbeddedVideoContext_1 = require("./EmbeddedVideoContext");
|
|
11
|
+
// component
|
|
12
|
+
function EmbeddedVideoContainer({ nativeYoutube = false, children }) {
|
|
13
|
+
// bind context
|
|
14
|
+
const [context, setContext] = (0, react_1.useState)(() => (Object.assign(Object.assign({}, EmbeddedVideoContext_1.EMBEDDED_VIDEO_CONTEXT_DEFAULTS), { youtubeHack: !nativeYoutube })));
|
|
15
|
+
// mount callback for when youtube is ready
|
|
16
|
+
(0, react_1.useEffect)(() => {
|
|
17
|
+
window.onYouTubeIframeAPIReady = () => {
|
|
18
|
+
console.debug('[EmbeddedVideoContainer] youtube frame api is ready');
|
|
19
|
+
setContext(context => (Object.assign(Object.assign({}, context), { youtubeReady: true })));
|
|
20
|
+
};
|
|
21
|
+
}, []);
|
|
22
|
+
// render
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)(EmbeddedVideoContext_1.EmbeddedVideoContext.Provider, { value: context, children: [(0, jsx_runtime_1.jsx)(script_1.default, { src: "https://www.youtube.com/iframe_api", strategy: "afterInteractive" }), children] }));
|
|
24
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const EMBEDDED_VIDEO_CONTEXT_DEFAULTS: EmbeddedVideoContext.Data;
|
|
2
|
+
export declare const EmbeddedVideoContext: import("react").Context<EmbeddedVideoContext.Data>;
|
|
3
|
+
export declare namespace EmbeddedVideoContext {
|
|
4
|
+
type Data = {
|
|
5
|
+
youtubeReady: boolean;
|
|
6
|
+
youtubeHack: boolean;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmbeddedVideoContext = exports.EMBEDDED_VIDEO_CONTEXT_DEFAULTS = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
// defaults
|
|
6
|
+
exports.EMBEDDED_VIDEO_CONTEXT_DEFAULTS = {
|
|
7
|
+
youtubeReady: false,
|
|
8
|
+
youtubeHack: true
|
|
9
|
+
};
|
|
10
|
+
// context
|
|
11
|
+
exports.EmbeddedVideoContext = (0, react_1.createContext)(exports.EMBEDDED_VIDEO_CONTEXT_DEFAULTS);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./EmbeddedVideo"), exports);
|
|
18
|
+
__exportStar(require("./EmbeddedVideoContainer"), exports);
|
|
19
|
+
__exportStar(require("./useEmbeddedPlayerProgress"), exports);
|
|
20
|
+
__exportStar(require("./useEmbeddedPlayerRef"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EmbeddedPlayer } from './EmbeddedPlayer';
|
|
2
|
+
export declare function useEmbeddedPlayerProgress(player: EmbeddedPlayer | null): Readonly<useEmbeddedPlayerProgress.Progress>;
|
|
3
|
+
export declare namespace useEmbeddedPlayerProgress {
|
|
4
|
+
type Progress = {
|
|
5
|
+
currentTime: number;
|
|
6
|
+
currentTimeLabel: string;
|
|
7
|
+
duration: number;
|
|
8
|
+
durationLabel: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useEmbeddedPlayerProgress = useEmbeddedPlayerProgress;
|
|
4
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const rxjs_1 = require("rxjs");
|
|
7
|
+
// hook
|
|
8
|
+
function useEmbeddedPlayerProgress(player) {
|
|
9
|
+
// bind state
|
|
10
|
+
const [progress, setProgress] = (0, react_1.useState)(PROGRESS_UNKNOWN);
|
|
11
|
+
const [active, setActive] = (0, react_1.useState)(false);
|
|
12
|
+
// activate when playing
|
|
13
|
+
(0, react_1.useEffect)(() => {
|
|
14
|
+
// skip if there's no player
|
|
15
|
+
if (!player) {
|
|
16
|
+
setActive(false);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
// track player state
|
|
20
|
+
const subscription = player.state$.subscribe(state => {
|
|
21
|
+
setActive(state === 'playing');
|
|
22
|
+
});
|
|
23
|
+
// unsubscribe on unmount
|
|
24
|
+
return () => subscription.unsubscribe();
|
|
25
|
+
}, [player]);
|
|
26
|
+
// track player progress
|
|
27
|
+
(0, react_1.useEffect)(() => {
|
|
28
|
+
// skip if there's no player
|
|
29
|
+
if (!player) {
|
|
30
|
+
setProgress(PROGRESS_UNKNOWN);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
// or skip if not active
|
|
34
|
+
else if (!active) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
// sync progress now
|
|
38
|
+
const syncProgress = () => {
|
|
39
|
+
const { currentTime, duration } = player;
|
|
40
|
+
setProgress({
|
|
41
|
+
currentTime,
|
|
42
|
+
currentTimeLabel: currentTime < 0
|
|
43
|
+
? TIME_UNKNOWN_LABEL
|
|
44
|
+
: funnel_core_1.Duration.formatSeconds(currentTime),
|
|
45
|
+
duration,
|
|
46
|
+
durationLabel: duration < 0
|
|
47
|
+
? TIME_UNKNOWN_LABEL
|
|
48
|
+
: funnel_core_1.Duration.formatSeconds(duration)
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
// sync on interval
|
|
52
|
+
const subscription = (0, rxjs_1.interval)(1000).subscribe(syncProgress);
|
|
53
|
+
// destroy on unmount
|
|
54
|
+
return () => subscription.unsubscribe();
|
|
55
|
+
}, [player, active]);
|
|
56
|
+
// return progress
|
|
57
|
+
return progress;
|
|
58
|
+
}
|
|
59
|
+
// default progress
|
|
60
|
+
const TIME_UNKNOWN_LABEL = '00:00';
|
|
61
|
+
const PROGRESS_UNKNOWN = {
|
|
62
|
+
currentTime: -1,
|
|
63
|
+
currentTimeLabel: TIME_UNKNOWN_LABEL,
|
|
64
|
+
duration: -1,
|
|
65
|
+
durationLabel: TIME_UNKNOWN_LABEL,
|
|
66
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RefCallback } from 'react';
|
|
2
|
+
import { EmbeddedPlayer } from './EmbeddedPlayer';
|
|
3
|
+
export declare function useEmbeddedPlayerRef(): useEmbeddedPlayerRef.Service;
|
|
4
|
+
export declare namespace useEmbeddedPlayerRef {
|
|
5
|
+
type Service = {
|
|
6
|
+
ref: RefCallback<EmbeddedPlayer>;
|
|
7
|
+
player: EmbeddedPlayer | null;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useEmbeddedPlayerRef = useEmbeddedPlayerRef;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const hooks_1 = require("../../hooks");
|
|
6
|
+
// hook
|
|
7
|
+
function useEmbeddedPlayerRef() {
|
|
8
|
+
// bind state + hooks
|
|
9
|
+
const [player, setPlayer] = (0, react_1.useState)(null);
|
|
10
|
+
const ref = (0, react_1.useCallback)((player) => setPlayer(player), []);
|
|
11
|
+
const touch = (0, hooks_1.useTouch)();
|
|
12
|
+
// watch player
|
|
13
|
+
(0, react_1.useEffect)(() => {
|
|
14
|
+
// skip if there's no player
|
|
15
|
+
if (!player) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
// subscribe to changes
|
|
19
|
+
const subscriptions = [
|
|
20
|
+
player.state$.subscribe(touch),
|
|
21
|
+
player.muted$.subscribe(touch),
|
|
22
|
+
player.captions$.subscribe(touch)
|
|
23
|
+
];
|
|
24
|
+
// unsubscribe on unmount
|
|
25
|
+
return () => subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
26
|
+
}, [touch, player]);
|
|
27
|
+
// return
|
|
28
|
+
return { ref, player };
|
|
29
|
+
}
|