@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,114 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.RevealController = RevealController;
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const motion_1 = require("motion");
|
|
7
|
+
const useMixedResponsiveValue_1 = require("../../hooks/useMixedResponsiveValue");
|
|
8
|
+
function RevealController({ scroller = 'body', targetContainer, inViewTrigger, percentVisible = 0.8, triggerOffsetPx = 0, animations, }) {
|
|
9
|
+
// extract current values from responsive props
|
|
10
|
+
const _animations = (0, useMixedResponsiveValue_1.useMixedResponsiveValue)(animations);
|
|
11
|
+
const _triggerOffsetPx = (0, useMixedResponsiveValue_1.useMixedResponsiveValue)(triggerOffsetPx);
|
|
12
|
+
const _percentVisible = (0, useMixedResponsiveValue_1.useMixedResponsiveValue)(percentVisible);
|
|
13
|
+
// Intersection Observer
|
|
14
|
+
(0, react_1.useEffect)(() => {
|
|
15
|
+
// exit early if no animations
|
|
16
|
+
if (!_animations) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
// set initial animation states
|
|
20
|
+
setInitialAnimationAttributes(targetContainer, _animations);
|
|
21
|
+
const options = {
|
|
22
|
+
root: document.querySelector(scroller),
|
|
23
|
+
rootMargin: `${_triggerOffsetPx}px`,
|
|
24
|
+
threshold: _percentVisible,
|
|
25
|
+
};
|
|
26
|
+
let animation;
|
|
27
|
+
// declare callback for targets entering/exiting viewport
|
|
28
|
+
const onObservationChanged = (entries) => {
|
|
29
|
+
entries.forEach((entry) => {
|
|
30
|
+
// check if object is intersection
|
|
31
|
+
if (entry.isIntersecting) {
|
|
32
|
+
// run animations
|
|
33
|
+
animation = (0, motion_1.animate)(sequenceFromAnimationOptions(targetContainer, _animations));
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
// create intersection observer
|
|
38
|
+
const observer = new IntersectionObserver(onObservationChanged, options);
|
|
39
|
+
// observe trigger element
|
|
40
|
+
const triggerElement = document.querySelector(`${targetContainer} ${inViewTrigger !== null && inViewTrigger !== void 0 ? inViewTrigger : ''}`);
|
|
41
|
+
// exit early if trigger element doesn't exist
|
|
42
|
+
if (!triggerElement) {
|
|
43
|
+
console.warn(`[RevealController]: trigger element with selector: ${triggerElement} not found`);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
// start observing trigger element
|
|
47
|
+
observer.observe(triggerElement);
|
|
48
|
+
// disconnect intersection observer from DOM
|
|
49
|
+
return () => {
|
|
50
|
+
// cancel animation
|
|
51
|
+
animation === null || animation === void 0 ? void 0 : animation.cancel();
|
|
52
|
+
// reset initial animation states
|
|
53
|
+
resetInitialAnimationAttributes(targetContainer, _animations);
|
|
54
|
+
// stop observing
|
|
55
|
+
observer.disconnect();
|
|
56
|
+
};
|
|
57
|
+
}, [inViewTrigger, scroller, _animations, targetContainer, _triggerOffsetPx, _percentVisible]);
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
function setInitialAnimationAttributes(parentSelector, initialOptions) {
|
|
61
|
+
initialOptions.forEach(({ selector, from, attribute }) => {
|
|
62
|
+
const element = document.querySelector(`${parentSelector} ${selector}`);
|
|
63
|
+
if (!element) {
|
|
64
|
+
console.warn(`[RevealController]: target element for found for selector: ${selector}`);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
setStyleForAttribute(element, attribute, from);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function resetInitialAnimationAttributes(parentSelector, initialOptions) {
|
|
71
|
+
initialOptions.forEach(({ selector, from, attribute }) => {
|
|
72
|
+
const element = document.querySelector(`${parentSelector} ${selector}`);
|
|
73
|
+
if (!element) {
|
|
74
|
+
console.warn(`[RevealController]: target element for found for selector: ${selector}`);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
resetStyleForAttribute(element, attribute);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function resetStyleForAttribute(element, attribute) {
|
|
81
|
+
switch (attribute) {
|
|
82
|
+
case 'x':
|
|
83
|
+
case 'y':
|
|
84
|
+
return element.style.removeProperty('transform');
|
|
85
|
+
default:
|
|
86
|
+
return element.style.removeProperty(attribute);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function setStyleForAttribute(element, attribute, value) {
|
|
90
|
+
switch (attribute) {
|
|
91
|
+
case 'x':
|
|
92
|
+
return element.style.transform = `translateX(${value}px)`;
|
|
93
|
+
case 'y':
|
|
94
|
+
return element.style.transform = `translateY(${value}px)`;
|
|
95
|
+
default:
|
|
96
|
+
return element.style.setProperty(attribute, `${value}`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function sequenceFromAnimationOptions(parentSelector, animationOptions) {
|
|
100
|
+
return animationOptions.map(({ selector, attribute, to, delay, duration, parallel }) => {
|
|
101
|
+
const at = parallel ? '<' : undefined;
|
|
102
|
+
return [
|
|
103
|
+
`${parentSelector} ${selector}`,
|
|
104
|
+
{
|
|
105
|
+
[attribute]: to
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
delay,
|
|
109
|
+
duration,
|
|
110
|
+
at
|
|
111
|
+
}
|
|
112
|
+
];
|
|
113
|
+
});
|
|
114
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RevealAnimation } from './RevealAnimation';
|
|
2
|
+
export declare class RevealElementAnimator {
|
|
3
|
+
private readonly runInParallel;
|
|
4
|
+
animationList: RevealAnimation.Options[];
|
|
5
|
+
constructor(runInParallel?: boolean);
|
|
6
|
+
fadeIn(selector: string, overrides?: RevealAnimation.ConfigurableOptions): void;
|
|
7
|
+
slideDown(selector: string, overrides?: RevealAnimation.ConfigurableOptions): void;
|
|
8
|
+
slideUp(selector: string, overrides?: RevealAnimation.ConfigurableOptions): void;
|
|
9
|
+
slideLeft(selector: string, overrides?: RevealAnimation.ConfigurableOptions): void;
|
|
10
|
+
slideRight(selector: string, overrides?: RevealAnimation.ConfigurableOptions): void;
|
|
11
|
+
fadeAndSlideUp(selector: string, overrides?: RevealAnimation.ConfigurableOptions): void;
|
|
12
|
+
private addAnimation;
|
|
13
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RevealElementAnimator = void 0;
|
|
4
|
+
class RevealElementAnimator {
|
|
5
|
+
constructor(runInParallel = false) {
|
|
6
|
+
this.animationList = [];
|
|
7
|
+
this.runInParallel = runInParallel;
|
|
8
|
+
}
|
|
9
|
+
fadeIn(selector, overrides) {
|
|
10
|
+
this.addAnimation({
|
|
11
|
+
selector,
|
|
12
|
+
attribute: 'opacity',
|
|
13
|
+
from: 0,
|
|
14
|
+
to: 1,
|
|
15
|
+
}, overrides);
|
|
16
|
+
}
|
|
17
|
+
slideDown(selector, overrides) {
|
|
18
|
+
this.addAnimation({
|
|
19
|
+
selector,
|
|
20
|
+
attribute: 'y',
|
|
21
|
+
from: -100,
|
|
22
|
+
to: 0,
|
|
23
|
+
}, overrides);
|
|
24
|
+
}
|
|
25
|
+
slideUp(selector, overrides) {
|
|
26
|
+
this.addAnimation({
|
|
27
|
+
selector,
|
|
28
|
+
attribute: 'y',
|
|
29
|
+
from: 100,
|
|
30
|
+
to: 0,
|
|
31
|
+
}, overrides);
|
|
32
|
+
}
|
|
33
|
+
slideLeft(selector, overrides) {
|
|
34
|
+
this.addAnimation({
|
|
35
|
+
selector,
|
|
36
|
+
attribute: 'x',
|
|
37
|
+
from: 100,
|
|
38
|
+
to: 0,
|
|
39
|
+
}, overrides);
|
|
40
|
+
}
|
|
41
|
+
slideRight(selector, overrides) {
|
|
42
|
+
this.addAnimation({
|
|
43
|
+
selector,
|
|
44
|
+
attribute: 'x',
|
|
45
|
+
from: -100,
|
|
46
|
+
to: 0,
|
|
47
|
+
}, overrides);
|
|
48
|
+
}
|
|
49
|
+
// composed animations
|
|
50
|
+
fadeAndSlideUp(selector, overrides) {
|
|
51
|
+
// create new parallel animator
|
|
52
|
+
const animator = new RevealElementAnimator(true);
|
|
53
|
+
// run both fade in and slide up
|
|
54
|
+
animator.fadeIn(selector, overrides);
|
|
55
|
+
animator.slideUp(selector, overrides);
|
|
56
|
+
// add to current animation list
|
|
57
|
+
this.animationList = this.animationList.concat(animator.animationList);
|
|
58
|
+
}
|
|
59
|
+
addAnimation(options, overrides) {
|
|
60
|
+
// first animation in parallel should not have parallel set to true, it needs to happen following any previous ones
|
|
61
|
+
const shouldRunInParallel = this.runInParallel && this.animationList.length >= 1;
|
|
62
|
+
this.animationList.push(Object.assign(Object.assign(Object.assign({ duration: 0.5 }, options), overrides), { parallel: shouldRunInParallel }));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.RevealElementAnimator = RevealElementAnimator;
|
|
@@ -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("./Reveal"), exports);
|
|
18
|
+
__exportStar(require("./RevealController"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Callback } from '@nascentdigital/funnel-core';
|
|
2
|
+
import { KeyboardEvent, KeyboardEventHandler } from 'react';
|
|
3
|
+
export declare namespace OnKey {
|
|
4
|
+
type Target = {
|
|
5
|
+
key: string;
|
|
6
|
+
shift?: boolean;
|
|
7
|
+
ctrl?: boolean;
|
|
8
|
+
alt?: boolean;
|
|
9
|
+
meta?: boolean;
|
|
10
|
+
};
|
|
11
|
+
namespace Target {
|
|
12
|
+
function matches<T extends HTMLElement = HTMLElement>(target: Target, e: KeyboardEvent<T>): boolean;
|
|
13
|
+
}
|
|
14
|
+
function enter<T extends HTMLElement = HTMLElement>(callback: Callback<KeyboardEvent<T>>): KeyboardEventHandler<T>;
|
|
15
|
+
function esc<T extends HTMLElement = HTMLElement>(callback: Callback<KeyboardEvent<T>>): KeyboardEventHandler<T>;
|
|
16
|
+
type HandleArgs = {
|
|
17
|
+
target: Target | Target[];
|
|
18
|
+
};
|
|
19
|
+
function handle<T extends HTMLElement>(callback: Callback<KeyboardEvent<T>>, ...targets: Target[]): KeyboardEventHandler<T>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OnKey = void 0;
|
|
4
|
+
var OnKey;
|
|
5
|
+
(function (OnKey) {
|
|
6
|
+
let Target;
|
|
7
|
+
(function (Target) {
|
|
8
|
+
function matches(target, e) {
|
|
9
|
+
return target.key === e.key
|
|
10
|
+
&& (target.shift === undefined || target.shift == e.shiftKey)
|
|
11
|
+
&& (target.alt === undefined || target.alt == e.altKey)
|
|
12
|
+
&& (target.ctrl === undefined || target.ctrl == e.ctrlKey)
|
|
13
|
+
&& (target.meta === undefined || target.alt == e.metaKey);
|
|
14
|
+
}
|
|
15
|
+
Target.matches = matches;
|
|
16
|
+
})(Target = OnKey.Target || (OnKey.Target = {}));
|
|
17
|
+
function enter(callback) {
|
|
18
|
+
return handle(callback, { key: 'Enter' });
|
|
19
|
+
}
|
|
20
|
+
OnKey.enter = enter;
|
|
21
|
+
function esc(callback) {
|
|
22
|
+
return handle(callback, { key: 'Escape' });
|
|
23
|
+
}
|
|
24
|
+
OnKey.esc = esc;
|
|
25
|
+
function handle(callback, ...targets) {
|
|
26
|
+
return (e) => {
|
|
27
|
+
if (targets.some(target => Target.matches(target, e))) {
|
|
28
|
+
callback(e);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
OnKey.handle = handle;
|
|
33
|
+
})(OnKey || (exports.OnKey = OnKey = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
export declare class SharedMutationObserver {
|
|
3
|
+
private static _instance?;
|
|
4
|
+
private readonly _observer;
|
|
5
|
+
private readonly _callbacks;
|
|
6
|
+
static get instance(): SharedMutationObserver;
|
|
7
|
+
private constructor();
|
|
8
|
+
private get observer();
|
|
9
|
+
watch(element: Element, scope?: ReadonlyArray<SharedMutationObserver.Scope>): Observable<SharedMutationObserver.Change>;
|
|
10
|
+
private onDisconnect;
|
|
11
|
+
private rebind;
|
|
12
|
+
private onMutate;
|
|
13
|
+
}
|
|
14
|
+
export declare namespace SharedMutationObserver {
|
|
15
|
+
type Scope = 'attributes' | 'children' | 'subtree';
|
|
16
|
+
type Change = {
|
|
17
|
+
element: Element;
|
|
18
|
+
scope: ReadonlySet<Scope>;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SharedMutationObserver = void 0;
|
|
4
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
5
|
+
const rxjs_1 = require("rxjs");
|
|
6
|
+
// class
|
|
7
|
+
class SharedMutationObserver {
|
|
8
|
+
static get instance() {
|
|
9
|
+
// create if required
|
|
10
|
+
if (!SharedMutationObserver._instance) {
|
|
11
|
+
SharedMutationObserver._instance = new SharedMutationObserver();
|
|
12
|
+
}
|
|
13
|
+
// throw if we don't have the instance
|
|
14
|
+
const instance = SharedMutationObserver._instance;
|
|
15
|
+
if (!instance) {
|
|
16
|
+
throw new funnel_core_1.IllegalStateError('Unable to instantiate SharedMutationObserver');
|
|
17
|
+
}
|
|
18
|
+
// return instance
|
|
19
|
+
return instance;
|
|
20
|
+
}
|
|
21
|
+
constructor() {
|
|
22
|
+
// bind callback
|
|
23
|
+
this.onMutate = this.onMutate.bind(this);
|
|
24
|
+
// initialize instance
|
|
25
|
+
this._observer = typeof window === 'undefined'
|
|
26
|
+
? undefined
|
|
27
|
+
: new MutationObserver(this.onMutate);
|
|
28
|
+
this._callbacks = new Map();
|
|
29
|
+
}
|
|
30
|
+
get observer() {
|
|
31
|
+
// throw if the observer isn't bound
|
|
32
|
+
const { _observer } = this;
|
|
33
|
+
if (!_observer) {
|
|
34
|
+
throw new funnel_core_1.InvalidOperationError('Attempt to access unbound observer');
|
|
35
|
+
}
|
|
36
|
+
// return observer
|
|
37
|
+
return _observer;
|
|
38
|
+
}
|
|
39
|
+
watch(element, scope = ['children']) {
|
|
40
|
+
// get active subscriptions (or create set)
|
|
41
|
+
const { _callbacks } = this;
|
|
42
|
+
let subscriptions = _callbacks.get(element);
|
|
43
|
+
if (!subscriptions) {
|
|
44
|
+
subscriptions = [];
|
|
45
|
+
_callbacks.set(element, subscriptions);
|
|
46
|
+
}
|
|
47
|
+
// determine existing scope
|
|
48
|
+
const existingScope = Subscription.mergeScope(subscriptions);
|
|
49
|
+
// create new subscription (and track it)
|
|
50
|
+
const subject = new rxjs_1.Subject();
|
|
51
|
+
subject.next(true);
|
|
52
|
+
subject.unsubscribe();
|
|
53
|
+
const subscription = new Subscription({
|
|
54
|
+
element,
|
|
55
|
+
scope,
|
|
56
|
+
disconnect: () => this.onDisconnect(subscription)
|
|
57
|
+
});
|
|
58
|
+
subscriptions.push(subscription);
|
|
59
|
+
// rebind observer if we need to (it rebinds ALL observations)
|
|
60
|
+
if (!subscription.scope.isSubsetOf(existingScope)) {
|
|
61
|
+
this.rebind();
|
|
62
|
+
}
|
|
63
|
+
// return subscription id
|
|
64
|
+
return subscription.observable;
|
|
65
|
+
}
|
|
66
|
+
onDisconnect(subscription) {
|
|
67
|
+
// skip if it's not subscribed
|
|
68
|
+
const { _callbacks } = this;
|
|
69
|
+
const subscriptions = _callbacks.get(subscription.element);
|
|
70
|
+
if (!subscriptions) {
|
|
71
|
+
console.warn('[SharedMutationObserver/onDisconnect] no subscriptions registered');
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
// remove subscription
|
|
75
|
+
const subscriptionIndex = subscriptions.indexOf(subscription);
|
|
76
|
+
if (subscriptionIndex >= 0) {
|
|
77
|
+
subscriptions.splice(subscriptionIndex, 1);
|
|
78
|
+
}
|
|
79
|
+
// or skip if it's already removed
|
|
80
|
+
else {
|
|
81
|
+
console.warn('[SharedMutationObserver/onDisconnect] cannot find subscription');
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
// remove entry if there are no more subscriptions (forces rebind)
|
|
85
|
+
if (subscriptions.length === 0) {
|
|
86
|
+
// drop mapping
|
|
87
|
+
_callbacks.delete(subscription.element);
|
|
88
|
+
// rebind
|
|
89
|
+
this.rebind();
|
|
90
|
+
}
|
|
91
|
+
// or rebind if scope has changed
|
|
92
|
+
else if (!subscription.scope.isSubsetOf(Subscription.mergeScope(subscriptions))) {
|
|
93
|
+
this.rebind();
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
rebind() {
|
|
97
|
+
// disconnect observer
|
|
98
|
+
const { observer, _callbacks } = this;
|
|
99
|
+
observer.disconnect();
|
|
100
|
+
// connect observer to callbacks
|
|
101
|
+
for (const [element, subscriptions] of _callbacks) {
|
|
102
|
+
// determine scope for element
|
|
103
|
+
const scope = Subscription.mergeScope(subscriptions);
|
|
104
|
+
// wire observer
|
|
105
|
+
observer.observe(element, {
|
|
106
|
+
attributes: scope.has('attributes'),
|
|
107
|
+
childList: scope.has('children'),
|
|
108
|
+
subtree: scope.has('subtree')
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
onMutate(mutations) {
|
|
113
|
+
// aggregate changes
|
|
114
|
+
const changes = new Map();
|
|
115
|
+
for (const mutation of mutations) {
|
|
116
|
+
// get existing changes (or create new set)
|
|
117
|
+
const target = mutation.target;
|
|
118
|
+
let scope = changes.get(target);
|
|
119
|
+
if (!scope) {
|
|
120
|
+
scope = new Set();
|
|
121
|
+
changes.set(target, scope);
|
|
122
|
+
}
|
|
123
|
+
// add changes
|
|
124
|
+
switch (mutation.type) {
|
|
125
|
+
case 'attributes':
|
|
126
|
+
scope.add('attributes');
|
|
127
|
+
break;
|
|
128
|
+
case 'childList':
|
|
129
|
+
if (mutation.addedNodes.length > 0) {
|
|
130
|
+
scope.add(Array.from(mutation.addedNodes.values()).some(node => node.parentElement !== target)
|
|
131
|
+
? 'subtree'
|
|
132
|
+
: 'children');
|
|
133
|
+
}
|
|
134
|
+
if (mutation.removedNodes.length > 0) {
|
|
135
|
+
scope.add(Array.from(mutation.removedNodes.values()).some(node => node.parentElement !== target)
|
|
136
|
+
? 'subtree'
|
|
137
|
+
: 'children');
|
|
138
|
+
}
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
// fire off callbacks (if any)
|
|
143
|
+
const { _callbacks } = this;
|
|
144
|
+
for (const [element, scope] of changes) {
|
|
145
|
+
// get subscriptions for element (or skip if there's none)
|
|
146
|
+
const subscriptions = _callbacks.get(element);
|
|
147
|
+
if (!subscriptions) {
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
// callback for any matching scope
|
|
151
|
+
for (const subscription of subscriptions) {
|
|
152
|
+
// determine subscribed scope
|
|
153
|
+
const subscribedScope = subscription.scope.union(scope);
|
|
154
|
+
// callback if there's any match
|
|
155
|
+
if (subscribedScope.size > 0) {
|
|
156
|
+
subscription.onChange(subscribedScope);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
exports.SharedMutationObserver = SharedMutationObserver;
|
|
163
|
+
// subscription
|
|
164
|
+
class Subscription {
|
|
165
|
+
constructor(args) {
|
|
166
|
+
// initialize instance variables
|
|
167
|
+
this.element = args.element;
|
|
168
|
+
this.scope = new Set(args.scope.length === 0 ? ['children'] : args.scope);
|
|
169
|
+
this.observable = new rxjs_1.Observable(subscriber => {
|
|
170
|
+
// bind subscriber
|
|
171
|
+
this._subscriber = subscriber;
|
|
172
|
+
// disconnect on unsubscribe
|
|
173
|
+
return () => {
|
|
174
|
+
// unhook subscriber
|
|
175
|
+
delete this._subscriber;
|
|
176
|
+
// disconnect
|
|
177
|
+
args.disconnect();
|
|
178
|
+
// raise completion
|
|
179
|
+
subscriber.complete();
|
|
180
|
+
};
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
onChange(scope) {
|
|
184
|
+
// throw if subscriber isn't bound
|
|
185
|
+
const { element, _subscriber } = this;
|
|
186
|
+
if (!_subscriber) {
|
|
187
|
+
throw new funnel_core_1.InvalidOperationError('Cannot raise change before subscriber is bound ');
|
|
188
|
+
}
|
|
189
|
+
// raise change
|
|
190
|
+
_subscriber.next({
|
|
191
|
+
element,
|
|
192
|
+
scope
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
(function (Subscription) {
|
|
197
|
+
// helpers
|
|
198
|
+
function mergeScope(subscriptions) {
|
|
199
|
+
return new Set(subscriptions.flatMap(subscription => Array.from(subscription.scope.values())));
|
|
200
|
+
}
|
|
201
|
+
Subscription.mergeScope = mergeScope;
|
|
202
|
+
})(Subscription || (Subscription = {}));
|
|
@@ -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("./OnKey"), exports);
|
|
18
|
+
__exportStar(require("./SharedMutationObserver"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function Markup({ markdown, disableWrapper, ...props }: Markup.Props): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare namespace Markup {
|
|
4
|
+
type DisableWrapper = {
|
|
5
|
+
disableWrapper: true;
|
|
6
|
+
className?: undefined;
|
|
7
|
+
} | {
|
|
8
|
+
disableWrapper?: false;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
type Props = Omit<React.HTMLAttributes<Element>, 'children' | 'className'> & {
|
|
12
|
+
markdown: string;
|
|
13
|
+
} & DisableWrapper;
|
|
14
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Markup = Markup;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const markdown_to_jsx_1 = __importDefault(require("markdown-to-jsx"));
|
|
20
|
+
const react_1 = __importDefault(require("react"));
|
|
21
|
+
// component
|
|
22
|
+
function Markup(_a) {
|
|
23
|
+
var { markdown = '', disableWrapper = false } = _a, props = __rest(_a, ["markdown", "disableWrapper"]);
|
|
24
|
+
// render
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(markdown_to_jsx_1.default, Object.assign({ options: {
|
|
26
|
+
wrapper: disableWrapper ? react_1.default.Fragment : undefined,
|
|
27
|
+
disableAutoLink: true,
|
|
28
|
+
namedCodesToUnicode
|
|
29
|
+
}, children: markdown }, props)));
|
|
30
|
+
}
|
|
31
|
+
// customization
|
|
32
|
+
const namedCodesToUnicode = {
|
|
33
|
+
'#x20': ' '
|
|
34
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NascentLogo = NascentLogo;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
// component
|
|
6
|
+
function NascentLogo({ className }) {
|
|
7
|
+
// render
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)("svg", { className: className, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 44 48", children: (0, jsx_runtime_1.jsx)("path", { d: "M33.504 29.5541V1.33332H42.5936V41.5219L33.504 29.5541ZM42.5579 46.6771C42.5592 46.6896 42.5576 46.6951 42.5579 46.6953C42.5544 46.6982 42.5428 46.7017 42.5346 46.7022H33.475V31.6333L42.5574 43.6009V46.6665L42.5579 46.6771ZM11.7657 18.2386V3.06298L32.178 29.947V45.1295L11.7657 18.2386ZM1.37603 4.50607V1.36895H10.4656V16.5435L1.37603 4.50607ZM1.34035 46.7379V6.62125L10.4656 18.6668V46.7379H1.34035ZM0.000995636 46.8237C0.0891113 47.4724 0.69035 48 1.34132 48H10.4666C11.1704 48 11.7651 47.4058 11.7651 46.7024V20.3529L32.4528 47.5278C32.7065 47.8235 33.0729 48 33.4331 48H42.5583C43.2622 48 43.8568 47.4058 43.8568 46.7024V1.29762C43.8568 0.594227 43.2622 0 42.5583 0H33.4331C32.7292 0 32.1346 0.594227 32.1346 1.29762V27.8601L11.5259 0.696041C11.2996 0.316078 10.9085 0.106949 10.4238 0.106949H1.29851C0.594677 0.106949 0 0.701248 0 1.40464V46.8093L0.000995636 46.8237Z", fillRule: "evenodd", clipRule: "evenodd" }) }));
|
|
9
|
+
}
|
|
@@ -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("./Markup"), exports);
|
|
18
|
+
__exportStar(require("./NascentLogo"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BlockLayout, Transform } from '@nascentdigital/funnel-core';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { HTMLBlockElement } from '../../types';
|
|
4
|
+
import { BlockConfig } from '../schema';
|
|
5
|
+
export declare function Block({ className, config, layout, renderPanel, ...props }: Block.Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare namespace Block {
|
|
7
|
+
type Props = HTMLBlockElement<'div'> & {
|
|
8
|
+
config?: BlockConfig.Presets.ThemeOnly;
|
|
9
|
+
layout: BlockLayout;
|
|
10
|
+
renderPanel: Transform<RenderPanelArgs, ReactNode>;
|
|
11
|
+
};
|
|
12
|
+
type RenderPanelArgs = {
|
|
13
|
+
className?: string;
|
|
14
|
+
panel: BlockLayout.Panel;
|
|
15
|
+
};
|
|
16
|
+
}
|