@developer_tribe/react-builder 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/android.svg +43 -0
- package/dist/apple.svg +16 -0
- package/dist/assets/samples/getSamples.d.ts +1 -0
- package/dist/attributes-editor/Field.d.ts +2 -1
- package/dist/attributes-editor/SizeField.d.ts +9 -0
- package/dist/background.jpg +0 -0
- package/dist/build-components/BIcon/BIcon.d.ts +5 -0
- package/dist/build-components/BIcon/BIconProps.generated.d.ts +55 -0
- package/dist/build-components/BackgroundImage/BackgroundImageProps.generated.d.ts +5 -0
- package/dist/build-components/Button/ButtonProps.generated.d.ts +5 -0
- package/dist/build-components/Carousel/CarouselProps.generated.d.ts +5 -0
- package/dist/build-components/CarouselButtons/CarouselButtonsProps.generated.d.ts +5 -0
- package/dist/build-components/CarouselDots/CarouselDotsProps.generated.d.ts +5 -0
- package/dist/build-components/CarouselItem/CarouselItemProps.generated.d.ts +5 -0
- package/dist/build-components/CarouselProvider/CarouselProviderProps.generated.d.ts +5 -0
- package/dist/build-components/Image/ImageProps.generated.d.ts +5 -0
- package/dist/build-components/Main/Main.d.ts +5 -0
- package/dist/build-components/Main/MainProps.generated.d.ts +48 -0
- package/dist/build-components/Onboard/OnboardProps.generated.d.ts +5 -0
- package/dist/build-components/OnboardButton/OnboardButtonProps.generated.d.ts +5 -1
- package/dist/build-components/OnboardButtons/OnboardButtonsProps.generated.d.ts +5 -0
- package/dist/build-components/OnboardDot/OnboardDotProps.generated.d.ts +6 -3
- package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +5 -0
- package/dist/build-components/OnboardImage/OnboardImageProps.generated.d.ts +6 -1
- package/dist/build-components/OnboardItem/OnboardItemProps.generated.d.ts +5 -0
- package/dist/build-components/OnboardProvider/OnboardProviderProps.generated.d.ts +5 -1
- package/dist/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.d.ts +5 -0
- package/dist/build-components/OnboardTitle/OnboardTitleProps.generated.d.ts +5 -0
- package/dist/build-components/PaywallBackground/PaywallBackground.d.ts +5 -0
- package/dist/build-components/PaywallBackground/PaywallBackgroundProps.generated.d.ts +47 -0
- package/dist/build-components/PaywallCloseButton/PaywallCloseButton.d.ts +5 -0
- package/dist/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.d.ts +56 -0
- package/dist/build-components/PaywallOptions/PaywallOptionButton.d.ts +9 -0
- package/dist/build-components/PaywallOptions/PaywallOptions.d.ts +5 -0
- package/dist/build-components/PaywallOptions/PaywallOptionsProps.generated.d.ts +47 -0
- package/dist/build-components/PaywallOptions/usePaywallOptionParamsFactory.d.ts +10 -0
- package/dist/build-components/PaywallProvider/PaywallProvider.d.ts +5 -0
- package/dist/build-components/PaywallProvider/PaywallProviderProps.generated.d.ts +47 -0
- package/dist/build-components/PaywallSubscriButton/PaywallSubscriButton.d.ts +5 -0
- package/dist/build-components/PaywallSubscriButton/PaywallSubscriButtonProps.generated.d.ts +50 -0
- package/dist/build-components/PaywallSubscribeButton/PaywallSubscribeButton.d.ts +5 -0
- package/dist/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.d.ts +50 -0
- package/dist/build-components/RadioButton/RadioButton.d.ts +11 -0
- package/dist/build-components/RadioButton/RadioButtonProps.generated.d.ts +50 -0
- package/dist/build-components/RenderNode.generated.d.ts +1 -1
- package/dist/build-components/Text/TextProps.generated.d.ts +5 -0
- package/dist/build-components/View/ViewProps.generated.d.ts +5 -0
- package/dist/build-components/index.d.ts +10 -1
- package/dist/build-components/patterns.generated.d.ts +5030 -723
- package/dist/components/AttributesEditorPanel.d.ts +2 -1
- package/dist/components/Builder.d.ts +1 -1
- package/dist/components/BuilderButton.d.ts +1 -1
- package/dist/components/BuilderProvider.d.ts +15 -0
- package/dist/components/EditorHeader.d.ts +1 -1
- package/dist/components/Icon.generated.d.ts +11 -0
- package/dist/components/JsonTextEditor.d.ts +9 -0
- package/dist/components/LocalizationParamsProvider.d.ts +11 -0
- package/dist/components/ParamsProvider.d.ts +14 -0
- package/dist/hooks/useLocalizationParams.d.ts +1 -0
- package/dist/hooks/useLocalize.d.ts +2 -0
- package/dist/hooks/useParams.d.ts +1 -0
- package/dist/hooks/useSafeAreaViewStyle.d.ts +1 -0
- package/dist/index.cjs.js +5 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.esm.js +5 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.cjs.js +29 -0
- package/dist/index.native.cjs.js.map +1 -0
- package/dist/index.native.d.ts +31 -0
- package/dist/index.native.esm.js +29 -0
- package/dist/index.native.esm.js.map +1 -0
- package/dist/mockOS/components/MockOSRouter.d.ts +1 -1
- package/dist/mockOS/context/MockOSContext.d.ts +4 -18
- package/dist/mockOS/context/MockOSContextBase.d.ts +21 -0
- package/dist/mockOS/index.d.ts +3 -2
- package/dist/modals/BenefitEditModal.d.ts +13 -0
- package/dist/modals/BenefitPresetsModal.d.ts +9 -0
- package/dist/modals/IconPickerModal.d.ts +9 -0
- package/dist/modals/MockableFeatureModal.d.ts +6 -0
- package/dist/modals/ProductEditModal.d.ts +9 -0
- package/dist/modals/ProductPresetsModal.d.ts +9 -0
- package/dist/modals/index.d.ts +6 -0
- package/dist/pages/ProjectPage.d.ts +3 -2
- package/dist/pages/tabs/BuilderPanel.d.ts +1 -1
- package/dist/pages/tabs/SideTool.d.ts +3 -2
- package/dist/paywall/hooks/index.d.ts +5 -0
- package/dist/paywall/hooks/useCalculateLocalizedPrice.d.ts +4 -0
- package/dist/paywall/hooks/useCarouselOptionsSeperator.d.ts +6 -0
- package/dist/paywall/hooks/useCloseStatusPaywall.d.ts +4 -0
- package/dist/paywall/hooks/useDiscountRate.d.ts +4 -0
- package/dist/paywall/hooks/usePaywallCounter.d.ts +4 -0
- package/dist/paywall/types/benefits.d.ts +14 -0
- package/dist/paywall/types/paywall-types.d.ts +43 -0
- package/dist/store.d.ts +31 -1
- package/dist/styles.css +1 -1
- package/dist/types/Icons.d.ts +2 -0
- package/dist/types/Project.d.ts +5 -0
- package/dist/utils/analyseNode.d.ts +1 -4
- package/dist/utils/analyseNodeByPatterns.d.ts +16 -0
- package/dist/utils/analyseNodeStructural.d.ts +11 -0
- package/dist/utils/extractImageStyle.d.ts +2 -1
- package/dist/utils/extractViewStyle.d.ts +1 -2
- package/dist/utils/findNodeByKeyNested.d.ts +2 -0
- package/dist/utils/nodeGuards.d.ts +5 -0
- package/dist/utils/novaToJson.d.ts +5 -0
- package/dist/utils/patterns.d.ts +14 -0
- package/dist/utils/replaceLocalizationParams.d.ts +1 -0
- package/dist/utils/selection.d.ts +7 -0
- package/dist/utils/useMergedStyle.d.ts +2 -0
- package/package.json +33 -6
- package/scripts/prebuild/assets/icon.template +71 -0
- package/scripts/prebuild/build-components.js +5 -0
- package/scripts/prebuild/icon-generator.js +206 -0
- package/scripts/prebuild/prebuild.js +10 -1
- package/scripts/prebuild/utils/createComponentTsx.js +6 -3
- package/scripts/prebuild/utils/createGeneratedProps.js +4 -2
- package/scripts/prebuild/utils/createRenderNodeGenerated.js +43 -8
- package/scripts/prebuild/utils/validateAllComponentsOrThrow.js +20 -9
- package/scripts/prebuild/utils/validatePatternJson.js +3 -2
- package/src/.DS_Store +0 -0
- package/src/AttributesEditor.tsx +185 -36
- package/src/DeviceMockFrame.tsx +41 -43
- package/src/RenderPage.tsx +6 -43
- package/src/assets/benefits.json +24 -0
- package/src/assets/iconset/activity-heart.svg +3 -0
- package/src/assets/iconset/activity.svg +3 -0
- package/src/assets/iconset/alert-circle.svg +3 -0
- package/src/assets/iconset/alert-triangle.svg +3 -0
- package/src/assets/iconset/anchor.svg +3 -0
- package/src/assets/iconset/archive.svg +3 -0
- package/src/assets/iconset/arrow-down.svg +3 -0
- package/src/assets/iconset/arrow-left.svg +3 -0
- package/src/assets/iconset/arrow-narrow-down-left.svg +3 -0
- package/src/assets/iconset/arrow-narrow-up-right.svg +3 -0
- package/src/assets/iconset/arrow-right-smooth.svg +4 -0
- package/src/assets/iconset/arrow-right.svg +7 -0
- package/src/assets/iconset/asterisk-01.svg +3 -0
- package/src/assets/iconset/asterisk-02.svg +3 -0
- package/src/assets/iconset/at-sign.svg +3 -0
- package/src/assets/iconset/award.svg +4 -0
- package/src/assets/iconset/battery-charging.svg +6 -0
- package/src/assets/iconset/bell-01.svg +5 -0
- package/src/assets/iconset/bell-02.svg +3 -0
- package/src/assets/iconset/bell-ringing-02.svg +3 -0
- package/src/assets/iconset/bookmark-add.svg +3 -0
- package/src/assets/iconset/bookmark-check.svg +3 -0
- package/src/assets/iconset/bookmark-minus.svg +3 -0
- package/src/assets/iconset/bookmark-x.svg +3 -0
- package/src/assets/iconset/bookmark.svg +3 -0
- package/src/assets/iconset/bubble.svg +5 -0
- package/src/assets/iconset/building-01.svg +3 -0
- package/src/assets/iconset/building-02.svg +3 -0
- package/src/assets/iconset/building-03.svg +3 -0
- package/src/assets/iconset/building-04.svg +3 -0
- package/src/assets/iconset/building-05.svg +3 -0
- package/src/assets/iconset/building-06.svg +3 -0
- package/src/assets/iconset/building-07.svg +3 -0
- package/src/assets/iconset/building-08.svg +3 -0
- package/src/assets/iconset/building-09.svg +3 -0
- package/src/assets/iconset/camera-01.svg +8 -0
- package/src/assets/iconset/camera-steel.svg +4 -0
- package/src/assets/iconset/camera.svg +4 -0
- package/src/assets/iconset/check-circle-bold.svg +3 -0
- package/src/assets/iconset/check-circle-broken.svg +3 -0
- package/src/assets/iconset/check-circle.svg +3 -0
- package/src/assets/iconset/check-done-01.svg +3 -0
- package/src/assets/iconset/check-done-02.svg +3 -0
- package/src/assets/iconset/check-heart.svg +3 -0
- package/src/assets/iconset/check-square-broken.svg +3 -0
- package/src/assets/iconset/check-square.svg +3 -0
- package/src/assets/iconset/check-verified-01.svg +3 -0
- package/src/assets/iconset/check-verified-02.svg +3 -0
- package/src/assets/iconset/check-verified-03.svg +3 -0
- package/src/assets/iconset/check.svg +3 -0
- package/src/assets/iconset/checkbox.svg +4 -0
- package/src/assets/iconset/checkv.svg +3 -0
- package/src/assets/iconset/chevron-down.svg +3 -0
- package/src/assets/iconset/chevron-down2.svg +3 -0
- package/src/assets/iconset/chevron-left-2.svg +3 -0
- package/src/assets/iconset/chevron-left.svg +3 -0
- package/src/assets/iconset/chevron-right-empty.svg +3 -0
- package/src/assets/iconset/chevron-right-smooth.svg +3 -0
- package/src/assets/iconset/chevron-right.svg +3 -0
- package/src/assets/iconset/chevron-up.svg +3 -0
- package/src/assets/iconset/circle.svg +32 -0
- package/src/assets/iconset/clock-fast-forward.svg +10 -0
- package/src/assets/iconset/clock.svg +3 -0
- package/src/assets/iconset/close-circle.svg +3 -0
- package/src/assets/iconset/close.svg +3 -0
- package/src/assets/iconset/cloud-01.svg +5 -0
- package/src/assets/iconset/cloud-blank-01.svg +3 -0
- package/src/assets/iconset/cloud-blank-02.svg +3 -0
- package/src/assets/iconset/coin.svg +5 -0
- package/src/assets/iconset/coins-02.svg +3 -0
- package/src/assets/iconset/colors.svg +3 -0
- package/src/assets/iconset/copy-01.svg +3 -0
- package/src/assets/iconset/copy-02.svg +3 -0
- package/src/assets/iconset/copy-03.svg +3 -0
- package/src/assets/iconset/copy-04.svg +3 -0
- package/src/assets/iconset/copy-05.svg +3 -0
- package/src/assets/iconset/copy-06.svg +3 -0
- package/src/assets/iconset/copy-07.svg +3 -0
- package/src/assets/iconset/corner-down-right.svg +3 -0
- package/src/assets/iconset/crypto-bold.svg +4 -0
- package/src/assets/iconset/delete-icon.svg +5 -0
- package/src/assets/iconset/diamond.svg +3 -0
- package/src/assets/iconset/dice-3.svg +3 -0
- package/src/assets/iconset/divide-01.svg +3 -0
- package/src/assets/iconset/divide-02.svg +3 -0
- package/src/assets/iconset/divide-03.svg +3 -0
- package/src/assets/iconset/document-check-bold.svg +4 -0
- package/src/assets/iconset/dots-circle.svg +10 -0
- package/src/assets/iconset/dots-grid.svg +11 -0
- package/src/assets/iconset/dots-horizontal.svg +5 -0
- package/src/assets/iconset/dots-vertical.svg +5 -0
- package/src/assets/iconset/download-01.svg +3 -0
- package/src/assets/iconset/download-02.svg +3 -0
- package/src/assets/iconset/download-03.svg +3 -0
- package/src/assets/iconset/edit-03.svg +3 -0
- package/src/assets/iconset/edit-04.svg +3 -0
- package/src/assets/iconset/edit-05.svg +3 -0
- package/src/assets/iconset/element-3.svg +6 -0
- package/src/assets/iconset/ellipse-127.svg +3 -0
- package/src/assets/iconset/exclaimation-circle.svg +8 -0
- package/src/assets/iconset/eye-off-line.svg +5 -0
- package/src/assets/iconset/face-smile.svg +5 -0
- package/src/assets/iconset/file-04.svg +3 -0
- package/src/assets/iconset/file-05.svg +3 -0
- package/src/assets/iconset/file-check-02.svg +3 -0
- package/src/assets/iconset/file-plus-01.svg +5 -0
- package/src/assets/iconset/file-shield-02.svg +5 -0
- package/src/assets/iconset/filter-funnel-01.svg +3 -0
- package/src/assets/iconset/flag-03.svg +3 -0
- package/src/assets/iconset/flash.svg +3 -0
- package/src/assets/iconset/folder-plus.svg +3 -0
- package/src/assets/iconset/folder.svg +3 -0
- package/src/assets/iconset/gallery.svg +3 -0
- package/src/assets/iconset/globe-01.svg +3 -0
- package/src/assets/iconset/globe-04.svg +5 -0
- package/src/assets/iconset/globe-bold.svg +4 -0
- package/src/assets/iconset/guard.svg +3 -0
- package/src/assets/iconset/headphones-01.svg +3 -0
- package/src/assets/iconset/headphones-02.svg +5 -0
- package/src/assets/iconset/headset-bold.svg +4 -0
- package/src/assets/iconset/heart-bold.svg +3 -0
- package/src/assets/iconset/heart.svg +3 -0
- package/src/assets/iconset/help-circle.svg +5 -0
- package/src/assets/iconset/home-2.svg +4 -0
- package/src/assets/iconset/home-line.svg +3 -0
- package/src/assets/iconset/hourglass-02.svg +5 -0
- package/src/assets/iconset/image-01.svg +5 -0
- package/src/assets/iconset/image-03.svg +3 -0
- package/src/assets/iconset/image.svg +4 -0
- package/src/assets/iconset/inbox-01.svg +3 -0
- package/src/assets/iconset/inbox-arrow-down.svg +3 -0
- package/src/assets/iconset/info-circle.svg +3 -0
- package/src/assets/iconset/keyboard-line.svg +9 -0
- package/src/assets/iconset/lamp-charge.svg +5 -0
- package/src/assets/iconset/layer.svg +3 -0
- package/src/assets/iconset/light.svg +6 -0
- package/src/assets/iconset/like-dislike.svg +6 -0
- package/src/assets/iconset/lock-03.svg +3 -0
- package/src/assets/iconset/logout.svg +3 -0
- package/src/assets/iconset/magicpen.svg +7 -0
- package/src/assets/iconset/mail-01.svg +5 -0
- package/src/assets/iconset/mail.svg +3 -0
- package/src/assets/iconset/marker.svg +3 -0
- package/src/assets/iconset/medal-star.svg +5 -0
- package/src/assets/iconset/menu-04.svg +3 -0
- package/src/assets/iconset/menu.svg +5 -0
- package/src/assets/iconset/message-circle-01.svg +5 -0
- package/src/assets/iconset/message-plus-circle.svg +3 -0
- package/src/assets/iconset/message-question-circle.svg +5 -0
- package/src/assets/iconset/message-text-circle-01.svg +5 -0
- package/src/assets/iconset/message-text-square-02.svg +3 -0
- package/src/assets/iconset/message-x-square.svg +3 -0
- package/src/assets/iconset/microphone-02.svg +3 -0
- package/src/assets/iconset/microphone-slash.svg +8 -0
- package/src/assets/iconset/mirror.svg +4 -0
- package/src/assets/iconset/moon-01.svg +3 -0
- package/src/assets/iconset/moon-bold.svg +3 -0
- package/src/assets/iconset/mouse-circle.svg +4 -0
- package/src/assets/iconset/move.svg +5 -0
- package/src/assets/iconset/notification-fill.svg +3 -0
- package/src/assets/iconset/notification-text.svg +3 -0
- package/src/assets/iconset/notification.svg +5 -0
- package/src/assets/iconset/pdf-01.svg +6 -0
- package/src/assets/iconset/pencil-01.svg +5 -0
- package/src/assets/iconset/phone-01.svg +3 -0
- package/src/assets/iconset/phone-arrow-down-left.svg +4 -0
- package/src/assets/iconset/phone-arrow-up-right.svg +8 -0
- package/src/assets/iconset/phone-hang-up.svg +5 -0
- package/src/assets/iconset/phone-hangup2.svg +8 -0
- package/src/assets/iconset/phone-incoming-01.svg +3 -0
- package/src/assets/iconset/phone-outgoing-01.svg +3 -0
- package/src/assets/iconset/phone-plus.svg +3 -0
- package/src/assets/iconset/phone-x.svg +3 -0
- package/src/assets/iconset/phone.svg +3 -0
- package/src/assets/iconset/plus-circle.svg +3 -0
- package/src/assets/iconset/plus.svg +4 -0
- package/src/assets/iconset/printer.svg +3 -0
- package/src/assets/iconset/question-mark-circle.svg +5 -0
- package/src/assets/iconset/refresh-ccw-01.svg +3 -0
- package/src/assets/iconset/refresh-cw-01.svg +3 -0
- package/src/assets/iconset/refresh-cw-04.svg +3 -0
- package/src/assets/iconset/refresh-right-square-bold.svg +3 -0
- package/src/assets/iconset/remove-circle.svg +12 -0
- package/src/assets/iconset/repeat-04.svg +3 -0
- package/src/assets/iconset/repeat-bold.svg +3 -0
- package/src/assets/iconset/ruler-pen.svg +4 -0
- package/src/assets/iconset/search-lg.svg +3 -0
- package/src/assets/iconset/search-md.svg +5 -0
- package/src/assets/iconset/search-refraction.svg +5 -0
- package/src/assets/iconset/search.svg +3 -0
- package/src/assets/iconset/send-01.svg +3 -0
- package/src/assets/iconset/send-02.svg +5 -0
- package/src/assets/iconset/send-diagonal.svg +3 -0
- package/src/assets/iconset/setting-2.svg +4 -0
- package/src/assets/iconset/settings-02.svg +4 -0
- package/src/assets/iconset/settings-04.svg +5 -0
- package/src/assets/iconset/settings-2.svg +4 -0
- package/src/assets/iconset/settings-cog.svg +3 -0
- package/src/assets/iconset/settings.svg +4 -0
- package/src/assets/iconset/share-01.svg +4 -0
- package/src/assets/iconset/share-03.svg +3 -0
- package/src/assets/iconset/share-04.svg +3 -0
- package/src/assets/iconset/share-05.svg +5 -0
- package/src/assets/iconset/share-06.svg +3 -0
- package/src/assets/iconset/share-bold.svg +3 -0
- package/src/assets/iconset/shield-01.svg +3 -0
- package/src/assets/iconset/shield-bold.svg +3 -0
- package/src/assets/iconset/solar-check.svg +3 -0
- package/src/assets/iconset/speaker-wave.svg +9 -0
- package/src/assets/iconset/speaker.svg +5 -0
- package/src/assets/iconset/speedometer-03.svg +3 -0
- package/src/assets/iconset/star-rounded.svg +3 -0
- package/src/assets/iconset/star.svg +3 -0
- package/src/assets/iconset/sun.svg +5 -0
- package/src/assets/iconset/target-03.svg +3 -0
- package/src/assets/iconset/text-input.svg +3 -0
- package/src/assets/iconset/translate.svg +7 -0
- package/src/assets/iconset/trash-02.svg +3 -0
- package/src/assets/iconset/trash-03.svg +5 -0
- package/src/assets/iconset/trash-04.svg +3 -0
- package/src/assets/iconset/trash.svg +7 -0
- package/src/assets/iconset/trush-square-bold.svg +3 -0
- package/src/assets/iconset/unlimited.svg +3 -0
- package/src/assets/iconset/user-circle.svg +3 -0
- package/src/assets/iconset/user-jogging.svg +3 -0
- package/src/assets/iconset/user-plus-01.svg +5 -0
- package/src/assets/iconset/user-square.svg +5 -0
- package/src/assets/iconset/user-x-01.svg +5 -0
- package/src/assets/iconset/user-x-02.svg +3 -0
- package/src/assets/iconset/user2.svg +3 -0
- package/src/assets/iconset/users-02.svg +5 -0
- package/src/assets/iconset/users-speaker.svg +7 -0
- package/src/assets/iconset/verify.svg +3 -0
- package/src/assets/iconset/voice-cricle.svg +8 -0
- package/src/assets/iconset/x-circle.svg +3 -0
- package/src/assets/iconset/x-close.svg +3 -0
- package/src/assets/iconset/x-sm.svg +3 -0
- package/src/assets/iconset/zap.svg +3 -0
- package/src/assets/images/background.jpg +0 -0
- package/src/assets/loading_animation.json +1 -0
- package/src/assets/products.json +98 -0
- package/src/assets/samples/carousel-sample.json +1 -0
- package/src/assets/samples/getSamples.ts +39 -66
- package/src/assets/samples/paywall-1.json +220 -0
- package/src/assets/samples/simple-1.json +1 -0
- package/src/assets/samples/simple-2.json +1 -0
- package/src/assets/samples/vpn-onboard-1.json +324 -720
- package/src/assets/samples/vpn-onboard-2.json +299 -683
- package/src/assets/samples/vpn-onboard-3.json +270 -680
- package/src/assets/samples/vpn-onboard-4.json +270 -681
- package/src/assets/samples/vpn-onboard-5.json +408 -893
- package/src/assets/samples/vpn-onboard-6.json +279 -594
- package/src/attributes-editor/Field.tsx +48 -160
- package/src/attributes-editor/SizeField.tsx +184 -0
- package/src/attributes-editor/SpecialCategorySection.tsx +11 -4
- package/src/build-components/BIcon/BIcon.tsx +56 -0
- package/src/build-components/BIcon/BIconProps.generated.ts +82 -0
- package/src/build-components/BIcon/pattern.json +47 -0
- package/src/build-components/BackgroundImage/BackgroundImage.tsx +7 -17
- package/src/build-components/BackgroundImage/BackgroundImageProps.generated.ts +5 -0
- package/src/build-components/BackgroundImage/pattern.json +2 -2
- package/src/build-components/Button/Button.tsx +20 -9
- package/src/build-components/Button/ButtonProps.generated.ts +5 -0
- package/src/build-components/Button/pattern.json +4 -1
- package/src/build-components/Carousel/Carousel.tsx +7 -9
- package/src/build-components/Carousel/CarouselProps.generated.ts +5 -0
- package/src/build-components/Carousel/pattern.json +2 -2
- package/src/build-components/CarouselButtons/CarouselButtonsProps.generated.ts +5 -0
- package/src/build-components/CarouselButtons/pattern.json +1 -1
- package/src/build-components/CarouselDots/CarouselDotsProps.generated.ts +5 -0
- package/src/build-components/CarouselDots/pattern.json +1 -1
- package/src/build-components/CarouselItem/CarouselItem.tsx +1 -1
- package/src/build-components/CarouselItem/CarouselItemProps.generated.ts +5 -0
- package/src/build-components/CarouselItem/pattern.json +1 -1
- package/src/build-components/CarouselProvider/CarouselProvider.tsx +1 -1
- package/src/build-components/CarouselProvider/CarouselProviderProps.generated.ts +5 -0
- package/src/build-components/CarouselProvider/pattern.json +1 -1
- package/src/build-components/Image/Image.tsx +11 -18
- package/src/build-components/Image/ImageProps.generated.ts +5 -0
- package/src/build-components/Image/pattern.json +2 -10
- package/src/build-components/Main/Main.tsx +61 -0
- package/src/build-components/Main/MainProps.generated.ts +64 -0
- package/src/build-components/Main/pattern.json +35 -0
- package/src/build-components/Onboard/OnboardProps.generated.ts +5 -0
- package/src/build-components/OnboardButton/OnboardButton.tsx +0 -3
- package/src/build-components/OnboardButton/OnboardButtonProps.generated.ts +5 -1
- package/src/build-components/OnboardButtons/OnboardButtonsProps.generated.ts +5 -0
- package/src/build-components/OnboardDot/OnboardDot.tsx +59 -39
- package/src/build-components/OnboardDot/OnboardDotProps.generated.ts +6 -3
- package/src/build-components/OnboardDot/pattern.json +2 -18
- package/src/build-components/OnboardFooter/OnboardFooter.tsx +28 -15
- package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +5 -0
- package/src/build-components/OnboardImage/OnboardImageProps.generated.ts +6 -1
- package/src/build-components/OnboardItem/OnboardItem.tsx +2 -12
- package/src/build-components/OnboardItem/OnboardItemProps.generated.ts +5 -0
- package/src/build-components/OnboardProvider/OnboardProvider.tsx +1 -8
- package/src/build-components/OnboardProvider/OnboardProviderProps.generated.ts +5 -1
- package/src/build-components/OnboardProvider/pattern.json +6 -16
- package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +5 -0
- package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +5 -0
- package/src/build-components/PaywallBackground/PaywallBackground.tsx +47 -0
- package/src/build-components/PaywallBackground/PaywallBackgroundProps.generated.ts +63 -0
- package/src/build-components/PaywallBackground/pattern.json +16 -0
- package/src/build-components/PaywallCloseButton/PaywallCloseButton.tsx +62 -0
- package/src/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.ts +83 -0
- package/src/build-components/PaywallCloseButton/pattern.json +23 -0
- package/src/build-components/PaywallOptions/PaywallOptionButton.tsx +64 -0
- package/src/build-components/PaywallOptions/PaywallOptions.tsx +92 -0
- package/src/build-components/PaywallOptions/PaywallOptionsProps.generated.ts +63 -0
- package/src/build-components/PaywallOptions/pattern.json +22 -0
- package/src/build-components/PaywallOptions/usePaywallOptionParamsFactory.ts +42 -0
- package/src/build-components/PaywallProvider/PaywallProvider.tsx +78 -0
- package/src/build-components/PaywallProvider/PaywallProviderProps.generated.ts +63 -0
- package/src/build-components/PaywallProvider/pattern.json +24 -0
- package/src/build-components/PaywallSubscriButton/PaywallSubscriButton.tsx +10 -0
- package/src/build-components/PaywallSubscriButton/PaywallSubscriButtonProps.generated.ts +77 -0
- package/src/build-components/PaywallSubscriButton/pattern.json +27 -0
- package/src/build-components/PaywallSubscribeButton/PaywallSubscribeButton.tsx +60 -0
- package/src/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.ts +77 -0
- package/src/build-components/PaywallSubscribeButton/pattern.json +27 -0
- package/src/build-components/RadioButton/RadioButton.tsx +123 -0
- package/src/build-components/RadioButton/RadioButtonProps.generated.ts +66 -0
- package/src/build-components/RadioButton/pattern.json +42 -0
- package/src/build-components/RenderNode.generated.tsx +140 -37
- package/src/build-components/Text/Text.tsx +12 -18
- package/src/build-components/Text/TextProps.generated.ts +5 -0
- package/src/build-components/Text/pattern.json +1 -1
- package/src/build-components/View/View.tsx +7 -9
- package/src/build-components/View/ViewProps.generated.ts +5 -0
- package/src/build-components/View/pattern.json +50 -4
- package/src/build-components/index.ts +55 -10
- package/src/build-components/patterns.generated.ts +5085 -745
- package/src/components/AttributesEditorPanel.tsx +3 -1
- package/src/components/Builder.tsx +64 -22
- package/src/components/BuilderButton.tsx +2 -7
- package/src/components/BuilderProvider.tsx +45 -0
- package/src/components/DeviceNavigationBar.tsx +1 -2
- package/src/components/EditorHeader.tsx +15 -2
- package/src/components/Icon.generated.tsx +540 -0
- package/src/components/JsonTextEditor.tsx +185 -0
- package/src/components/LocalizationParamsProvider.tsx +22 -0
- package/src/components/ParamsProvider.tsx +38 -0
- package/src/hooks/useLocalizationParams.ts +5 -0
- package/src/hooks/useLocalize.ts +23 -0
- package/src/hooks/useParams.ts +8 -0
- package/src/hooks/useSafeAreaViewStyle.ts +67 -0
- package/src/index.native.ts +75 -0
- package/src/index.ts +26 -0
- package/src/mockOS/components/MockOSRouter.tsx +12 -11
- package/src/mockOS/context/MockOSContext.tsx +12 -41
- package/src/mockOS/context/MockOSContextBase.ts +35 -0
- package/src/mockOS/index.ts +3 -2
- package/src/mockOS/managers/mockPermissionManager.ts +0 -4
- package/src/mockOS/managers/navigationManager.ts +1 -6
- package/src/modals/AddComponentModal.tsx +1 -0
- package/src/modals/BenefitEditModal.tsx +160 -0
- package/src/modals/BenefitPresetsModal.tsx +166 -0
- package/src/modals/ColorModal.tsx +103 -25
- package/src/modals/IconPickerModal.tsx +109 -0
- package/src/modals/LocalicationModal.tsx +4 -5
- package/src/modals/MockableFeatureModal.tsx +292 -0
- package/src/modals/Modal.tsx +8 -1
- package/src/modals/ProductEditModal.tsx +215 -0
- package/src/modals/ProductPresetsModal.tsx +151 -0
- package/src/modals/index.ts +6 -0
- package/src/pages/ProjectPage.tsx +79 -16
- package/src/pages/tabs/BuilderPanel.tsx +1 -1
- package/src/pages/tabs/SideTool.tsx +13 -19
- package/src/paywall/hooks/index.ts +5 -0
- package/src/paywall/hooks/useCalculateLocalizedPrice.ts +6 -0
- package/src/paywall/hooks/useCarouselOptionsSeperator.ts +8 -0
- package/src/paywall/hooks/useCloseStatusPaywall.ts +6 -0
- package/src/paywall/hooks/useDiscountRate.ts +6 -0
- package/src/paywall/hooks/usePaywallCounter.ts +6 -0
- package/src/paywall/types/benefits.ts +44 -0
- package/src/paywall/types/paywall-types.ts +51 -0
- package/src/store.ts +157 -38
- package/src/styles/base/_global.scss +54 -41
- package/src/styles/components/_attributes-editor.scss +40 -5
- package/src/styles/components/_editor-shell.scss +5 -9
- package/src/styles/components/_ui-components.scss +2 -1
- package/src/styles/index.scss +5 -0
- package/src/styles/modals/_benefit-edit-modal.scss +17 -0
- package/src/styles/modals/_benefit-presets-modal.scss +79 -0
- package/src/styles/modals/_color-modal.scss +30 -1
- package/src/styles/modals/_mockable-feature-modal.scss +15 -0
- package/src/styles/modals/_product-edit-modal.scss +23 -0
- package/src/styles/modals/_product-presets-modal.scss +81 -0
- package/src/styles/utilities/_carousel.scss +9 -8
- package/src/types/Icons.ts +244 -0
- package/src/types/Project.ts +5 -0
- package/src/types/jest-globals.d.ts +13 -0
- package/src/utils/analyseNode.ts +22 -109
- package/src/utils/analyseNodeByPatterns.ts +438 -0
- package/src/utils/analyseNodeStructural.ts +52 -0
- package/src/utils/extractImageStyle.ts +3 -6
- package/src/utils/extractTextStyle.ts +2 -81
- package/src/utils/extractViewStyle.ts +39 -15
- package/src/utils/findNodeByKeyNested.ts +32 -0
- package/src/utils/isCarousel.ts +21 -5
- package/src/utils/nodeGuards.ts +26 -0
- package/src/utils/novaToJson.ts +21 -9
- package/src/utils/patterns.ts +62 -3
- package/src/utils/replaceLocalizationParams.ts +15 -0
- package/src/utils/selection.ts +24 -0
- package/src/utils/useMergedStyle.ts +16 -0
|
@@ -5,6 +5,10 @@ import useNode from '../useNode';
|
|
|
5
5
|
import { useLogRender } from '../../utils/useLogRender';
|
|
6
6
|
import { extractViewStyle } from '../../utils/extractViewStyle';
|
|
7
7
|
import { useRenderStore } from '../../store';
|
|
8
|
+
import { isNodeSelected, SELECTED_OUTLINE_STYLE } from '../../utils/selection';
|
|
9
|
+
import { useMergedStyle } from '../../utils/useMergedStyle';
|
|
10
|
+
import { parseColor } from '../../utils/parseColor';
|
|
11
|
+
import { parseSize } from '../../size-matters';
|
|
8
12
|
|
|
9
13
|
function OnboardDot({ node }: OnboardDotComponentProps) {
|
|
10
14
|
useLogRender('OnboardDot');
|
|
@@ -17,10 +21,14 @@ function OnboardDot({ node }: OnboardDotComponentProps) {
|
|
|
17
21
|
const dotType = node.attributes?.dotType || 'normal_dot';
|
|
18
22
|
const GHOST_DOT_DARK_COLOR = '#E4E5E7';
|
|
19
23
|
const GHOST_DOT_LIGHT_COLOR = '#F7F7F9';
|
|
20
|
-
const { appConfig, projectColors } = useRenderStore(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
const { previewMode, current, appConfig, projectColors } = useRenderStore(
|
|
25
|
+
(s) => ({
|
|
26
|
+
previewMode: s.previewMode,
|
|
27
|
+
current: s.current,
|
|
28
|
+
appConfig: s.appConfig,
|
|
29
|
+
projectColors: s.projectColors,
|
|
30
|
+
}),
|
|
31
|
+
);
|
|
24
32
|
const isDark = appConfig.theme === 'dark';
|
|
25
33
|
|
|
26
34
|
// OnboardDot specific attributes
|
|
@@ -28,23 +36,43 @@ function OnboardDot({ node }: OnboardDotComponentProps) {
|
|
|
28
36
|
? GHOST_DOT_DARK_COLOR
|
|
29
37
|
: GHOST_DOT_LIGHT_COLOR;
|
|
30
38
|
const inactiveDotOpacity = node.attributes?.inactive_dot_opacity ?? 0.3;
|
|
31
|
-
const dotStyle = node.attributes?.dot_style;
|
|
32
|
-
const containerStyle = node.attributes?.container_style;
|
|
33
39
|
const activeDotColor = node.attributes?.active_dot_color;
|
|
40
|
+
const resolvedActiveDotColor = useMemo(
|
|
41
|
+
() => parseColor(activeDotColor, { appConfig, projectColors }),
|
|
42
|
+
[activeDotColor, appConfig, projectColors],
|
|
43
|
+
);
|
|
34
44
|
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
const baseStyle = useMemo(() => {
|
|
46
|
+
let innerStyle = extractViewStyle(node, { appConfig, projectColors });
|
|
47
|
+
delete innerStyle.flexDirection;
|
|
48
|
+
return innerStyle;
|
|
49
|
+
}, [node, appConfig, projectColors]);
|
|
50
|
+
const isSelected = isNodeSelected({ previewMode, current, node });
|
|
51
|
+
const style = useMergedStyle(
|
|
52
|
+
baseStyle,
|
|
53
|
+
isSelected ? SELECTED_OUTLINE_STYLE : undefined,
|
|
54
|
+
);
|
|
55
|
+
const expandingDotWidthRaw = node.attributes?.expanding_dot_width;
|
|
56
|
+
const expandingDotWidthOverride = useMemo(() => {
|
|
57
|
+
const parsed = parseSize(expandingDotWidthRaw);
|
|
58
|
+
if (parsed === undefined) return undefined;
|
|
59
|
+
|
|
60
|
+
// `parseSize` may return number (px) or a string (e.g. "50%").
|
|
61
|
+
const cssWidth =
|
|
62
|
+
typeof parsed === 'number'
|
|
63
|
+
? `${parsed}px`
|
|
64
|
+
: typeof parsed === 'string'
|
|
65
|
+
? parsed
|
|
66
|
+
: undefined;
|
|
67
|
+
|
|
68
|
+
if (!cssWidth) return undefined;
|
|
69
|
+
|
|
70
|
+
return {
|
|
71
|
+
// Controls the actual dot diameter (`.embla__dot:after`).
|
|
72
|
+
['--embla-dot-size' as any]: cssWidth,
|
|
73
|
+
} as React.CSSProperties;
|
|
74
|
+
}, [expandingDotWidthRaw]);
|
|
75
|
+
const containerStyle = useMergedStyle(style, expandingDotWidthOverride);
|
|
48
76
|
|
|
49
77
|
const onboardApi = useContext(onboardContext);
|
|
50
78
|
const emblaApi = onboardApi?.emblaApi;
|
|
@@ -72,34 +100,24 @@ function OnboardDot({ node }: OnboardDotComponentProps) {
|
|
|
72
100
|
};
|
|
73
101
|
}, [emblaApi]);
|
|
74
102
|
|
|
75
|
-
// Parse dot_style if provided
|
|
76
|
-
const parsedDotStyle = useMemo(() => {
|
|
77
|
-
if (!dotStyle) return {};
|
|
78
|
-
try {
|
|
79
|
-
return JSON.parse(dotStyle);
|
|
80
|
-
} catch (e) {
|
|
81
|
-
return {};
|
|
82
|
-
}
|
|
83
|
-
}, [dotStyle]);
|
|
84
|
-
|
|
85
103
|
return (
|
|
86
104
|
<div
|
|
87
105
|
attribute-name={attributeName}
|
|
88
106
|
attribute-key={attributeKey}
|
|
89
107
|
className={`embla__dots embla__dots--${dotType}`}
|
|
90
|
-
style={
|
|
108
|
+
style={containerStyle}
|
|
91
109
|
>
|
|
92
110
|
{scrollSnaps.map((snap, index) => {
|
|
93
|
-
const
|
|
111
|
+
const isDotSelected = selectedIndex === index;
|
|
94
112
|
const dotStyles: React.CSSProperties = {
|
|
95
|
-
|
|
96
|
-
opacity: isSelected ? 1 : inactiveDotOpacity,
|
|
113
|
+
opacity: isDotSelected ? 1 : inactiveDotOpacity,
|
|
97
114
|
};
|
|
98
115
|
|
|
99
|
-
if (
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
116
|
+
if (resolvedActiveDotColor && isDotSelected) {
|
|
117
|
+
// Style the actual visual dot (rendered via `.embla__dot:after`) using a CSS variable.
|
|
118
|
+
(dotStyles as any)['--embla-dot-color'] = resolvedActiveDotColor;
|
|
119
|
+
} else if (!isDotSelected) {
|
|
120
|
+
(dotStyles as any)['--embla-dot-color'] = inactiveDotColor;
|
|
103
121
|
}
|
|
104
122
|
|
|
105
123
|
return (
|
|
@@ -108,10 +126,12 @@ function OnboardDot({ node }: OnboardDotComponentProps) {
|
|
|
108
126
|
onClick={() => {
|
|
109
127
|
emblaApi?.scrollTo(snap);
|
|
110
128
|
}}
|
|
111
|
-
className={`embla__dot ${
|
|
129
|
+
className={`embla__dot ${isDotSelected ? 'embla__dot--selected' : ''}`}
|
|
112
130
|
style={dotStyles}
|
|
131
|
+
aria-label={`Go to slide ${index + 1}`}
|
|
132
|
+
aria-current={isDotSelected ? 'true' : undefined}
|
|
113
133
|
>
|
|
114
|
-
{
|
|
134
|
+
{/* Dot visuals are rendered via CSS (`.embla__dot:after`). */}
|
|
115
135
|
</button>
|
|
116
136
|
);
|
|
117
137
|
})}
|
|
@@ -35,7 +35,12 @@ export interface OnboardDotPropsGenerated {
|
|
|
35
35
|
backgroundColor?: string;
|
|
36
36
|
borderRadius?: string;
|
|
37
37
|
width?: string;
|
|
38
|
+
minWidth?: string;
|
|
39
|
+
maxWidth?: string;
|
|
38
40
|
height?: string;
|
|
41
|
+
minHeight?: string;
|
|
42
|
+
maxHeight?: string;
|
|
43
|
+
flex?: number;
|
|
39
44
|
position?: PositionOptionType;
|
|
40
45
|
top?: string;
|
|
41
46
|
bottom?: string;
|
|
@@ -44,9 +49,7 @@ export interface OnboardDotPropsGenerated {
|
|
|
44
49
|
zIndex?: number;
|
|
45
50
|
dotType?: DotTypeOptionType;
|
|
46
51
|
inactive_dot_opacity?: number;
|
|
47
|
-
expanding_dot_width?:
|
|
48
|
-
dot_style?: string;
|
|
49
|
-
container_style?: string;
|
|
52
|
+
expanding_dot_width?: string;
|
|
50
53
|
active_dot_color?: string;
|
|
51
54
|
};
|
|
52
55
|
}
|
|
@@ -15,9 +15,7 @@
|
|
|
15
15
|
"liquid_like"
|
|
16
16
|
],
|
|
17
17
|
"inactive_dot_opacity": "number",
|
|
18
|
-
"expanding_dot_width": "
|
|
19
|
-
"dot_style": "string",
|
|
20
|
-
"container_style": "string",
|
|
18
|
+
"expanding_dot_width": "size",
|
|
21
19
|
"active_dot_color": "color",
|
|
22
20
|
"flexDirection": "never",
|
|
23
21
|
"alignItems": "never",
|
|
@@ -50,26 +48,12 @@
|
|
|
50
48
|
"specialCategory": null,
|
|
51
49
|
"sort": 3
|
|
52
50
|
},
|
|
53
|
-
"dot_style": {
|
|
54
|
-
"label": "Dot Style",
|
|
55
|
-
"description": "Custom style for each dot.",
|
|
56
|
-
"category": "style",
|
|
57
|
-
"specialCategory": null,
|
|
58
|
-
"sort": 4
|
|
59
|
-
},
|
|
60
|
-
"container_style": {
|
|
61
|
-
"label": "Container Style",
|
|
62
|
-
"description": "Style for the dot wrapper.",
|
|
63
|
-
"category": "style",
|
|
64
|
-
"specialCategory": null,
|
|
65
|
-
"sort": 5
|
|
66
|
-
},
|
|
67
51
|
"active_dot_color": {
|
|
68
52
|
"label": "Active Dot Color",
|
|
69
53
|
"description": "Color of the active dot.",
|
|
70
54
|
"category": "style",
|
|
71
55
|
"specialCategory": null,
|
|
72
|
-
"sort":
|
|
56
|
+
"sort": 4
|
|
73
57
|
}
|
|
74
58
|
}
|
|
75
59
|
}
|
|
@@ -6,6 +6,8 @@ import { parseSize } from '../../size-matters';
|
|
|
6
6
|
import { extractTextStyle } from '../../utils/extractTextStyle';
|
|
7
7
|
import { extractViewStyle } from '../../utils/extractViewStyle';
|
|
8
8
|
import { useLogRender } from '../../utils/useLogRender';
|
|
9
|
+
import { isNodeSelected } from '../../utils/selection';
|
|
10
|
+
import { useMergedStyle } from '../../utils/useMergedStyle';
|
|
9
11
|
|
|
10
12
|
type Segment =
|
|
11
13
|
| { type: 'text'; value: string }
|
|
@@ -92,19 +94,23 @@ function OnboardFooter({ node }: OnboardFooterComponentProps) {
|
|
|
92
94
|
node = useNode(node);
|
|
93
95
|
const attributeName =
|
|
94
96
|
(node as any)?.sourceType ?? node.type ?? 'OnboardFooter';
|
|
95
|
-
const { appConfig, projectColors } = useRenderStore(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
const { appConfig, projectColors, previewMode, current } = useRenderStore(
|
|
98
|
+
(s) => ({
|
|
99
|
+
appConfig: s.appConfig,
|
|
100
|
+
projectColors: s.projectColors,
|
|
101
|
+
previewMode: s.previewMode,
|
|
102
|
+
current: s.current,
|
|
103
|
+
}),
|
|
104
|
+
);
|
|
99
105
|
const { localication, defaultLanguage } = appConfig;
|
|
100
106
|
const t = (key?: string) =>
|
|
101
107
|
key ? (localication?.[defaultLanguage ?? 'en']?.[key] ?? key) : '';
|
|
102
108
|
|
|
103
109
|
const text = t(node?.attributes?.textLocalizationKey);
|
|
104
|
-
const textStyle
|
|
105
|
-
appConfig,
|
|
106
|
-
projectColors,
|
|
107
|
-
|
|
110
|
+
const textStyle = useMemo(
|
|
111
|
+
() => extractTextStyle(node, { appConfig, projectColors }),
|
|
112
|
+
[node, appConfig, projectColors],
|
|
113
|
+
);
|
|
108
114
|
const viewStyle = useMemo(
|
|
109
115
|
() => extractViewStyle(node, { appConfig, projectColors }),
|
|
110
116
|
[node, appConfig, projectColors],
|
|
@@ -116,19 +122,26 @@ function OnboardFooter({ node }: OnboardFooterComponentProps) {
|
|
|
116
122
|
});
|
|
117
123
|
|
|
118
124
|
const paddingHorizontal = parseSize(node?.attributes?.paddingHorizontal);
|
|
125
|
+
const layoutStyle = useMemo<React.CSSProperties>(
|
|
126
|
+
() => ({
|
|
127
|
+
paddingLeft: paddingHorizontal,
|
|
128
|
+
paddingRight: paddingHorizontal,
|
|
129
|
+
textAlign: 'center',
|
|
130
|
+
}),
|
|
131
|
+
[paddingHorizontal],
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
const isSelected = isNodeSelected({ previewMode, current, node });
|
|
135
|
+
const baseStyle = useMergedStyle(viewStyle, textStyle);
|
|
136
|
+
const paddedStyle = useMergedStyle(baseStyle, layoutStyle);
|
|
119
137
|
const generatedId = useId();
|
|
120
138
|
const attributeKey = node.key ?? generatedId;
|
|
121
139
|
return (
|
|
122
140
|
<div
|
|
123
141
|
attribute-name={attributeName}
|
|
124
142
|
attribute-key={attributeKey}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
...textStyle,
|
|
128
|
-
paddingLeft: paddingHorizontal,
|
|
129
|
-
paddingRight: paddingHorizontal,
|
|
130
|
-
textAlign: 'center',
|
|
131
|
-
}}
|
|
143
|
+
className={isSelected ? 'rb-node-selected' : undefined}
|
|
144
|
+
style={paddedStyle}
|
|
132
145
|
>
|
|
133
146
|
{!!text &&
|
|
134
147
|
(() => {
|
|
@@ -59,7 +59,12 @@ export interface OnboardFooterPropsGenerated {
|
|
|
59
59
|
backgroundColor?: string;
|
|
60
60
|
borderRadius?: string;
|
|
61
61
|
width?: string;
|
|
62
|
+
minWidth?: string;
|
|
63
|
+
maxWidth?: string;
|
|
62
64
|
height?: string;
|
|
65
|
+
minHeight?: string;
|
|
66
|
+
maxHeight?: string;
|
|
67
|
+
flex?: number;
|
|
63
68
|
position?: PositionOptionType;
|
|
64
69
|
top?: string;
|
|
65
70
|
bottom?: string;
|
|
@@ -26,7 +26,6 @@ export interface OnboardImagePropsGenerated {
|
|
|
26
26
|
width?: string;
|
|
27
27
|
height?: string;
|
|
28
28
|
resizeMode?: ResizeModeOptionType;
|
|
29
|
-
borderRadius?: string;
|
|
30
29
|
scrollable?: boolean;
|
|
31
30
|
flexDirection?: FlexDirectionOptionType;
|
|
32
31
|
alignItems?: AlignItemsOptionType;
|
|
@@ -46,6 +45,12 @@ export interface OnboardImagePropsGenerated {
|
|
|
46
45
|
marginLeft?: string;
|
|
47
46
|
marginRight?: string;
|
|
48
47
|
backgroundColor?: string;
|
|
48
|
+
borderRadius?: string;
|
|
49
|
+
minWidth?: string;
|
|
50
|
+
maxWidth?: string;
|
|
51
|
+
minHeight?: string;
|
|
52
|
+
maxHeight?: string;
|
|
53
|
+
flex?: number;
|
|
49
54
|
position?: PositionOptionType;
|
|
50
55
|
top?: string;
|
|
51
56
|
bottom?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useId, useMemo } from 'react';
|
|
2
2
|
import type { OnboardItemComponentProps } from './OnboardItemProps.generated';
|
|
3
3
|
import useNode from '../useNode';
|
|
4
|
-
import
|
|
4
|
+
import RenderNode from '../RenderNode.generated';
|
|
5
5
|
import { useRenderStore } from '../../store';
|
|
6
6
|
import { parseSize } from '../../size-matters';
|
|
7
7
|
import { useLogRender } from '../../utils/useLogRender';
|
|
@@ -13,9 +13,6 @@ function OnboardItem({ node }: OnboardItemComponentProps) {
|
|
|
13
13
|
const generatedId = useId();
|
|
14
14
|
const attributeName = (node as any)?.sourceType ?? node.type ?? 'OnboardItem';
|
|
15
15
|
const attributeKey = node.key ?? generatedId;
|
|
16
|
-
const flexDirection = node.attributes?.flexDirection;
|
|
17
|
-
const display = node.attributes?.display;
|
|
18
|
-
const paddingHorizontal = parseSize(node.attributes?.paddingHorizontal);
|
|
19
16
|
const { appConfig, projectColors } = useRenderStore((s) => ({
|
|
20
17
|
appConfig: s.appConfig,
|
|
21
18
|
projectColors: s.projectColors,
|
|
@@ -29,14 +26,7 @@ function OnboardItem({ node }: OnboardItemComponentProps) {
|
|
|
29
26
|
attribute-name={attributeName}
|
|
30
27
|
attribute-key={attributeKey}
|
|
31
28
|
className="embla__slide"
|
|
32
|
-
style={
|
|
33
|
-
...viewStyle,
|
|
34
|
-
gap: parseSize(node.attributes?.gap),
|
|
35
|
-
flexDirection,
|
|
36
|
-
display,
|
|
37
|
-
paddingRight: paddingHorizontal,
|
|
38
|
-
paddingLeft: paddingHorizontal,
|
|
39
|
-
}}
|
|
29
|
+
style={viewStyle}
|
|
40
30
|
>
|
|
41
31
|
{node.children && <RenderNode node={node.children} />}
|
|
42
32
|
</div>
|
|
@@ -43,7 +43,12 @@ export interface OnboardItemPropsGenerated {
|
|
|
43
43
|
backgroundColor?: string;
|
|
44
44
|
borderRadius?: string;
|
|
45
45
|
width?: string;
|
|
46
|
+
minWidth?: string;
|
|
47
|
+
maxWidth?: string;
|
|
46
48
|
height?: string;
|
|
49
|
+
minHeight?: string;
|
|
50
|
+
maxHeight?: string;
|
|
51
|
+
flex?: number;
|
|
47
52
|
position?: PositionOptionType;
|
|
48
53
|
top?: string;
|
|
49
54
|
bottom?: string;
|
|
@@ -23,7 +23,6 @@ function OnboardProvider({ node }: OnboardProviderComponentProps) {
|
|
|
23
23
|
const generatedId = useId();
|
|
24
24
|
const attributeName =
|
|
25
25
|
(node as any)?.sourceType ?? node.type ?? 'OnboardProvider';
|
|
26
|
-
const device = useRenderStore((s) => s.device);
|
|
27
26
|
const { appConfig, projectColors } = useRenderStore((s) => ({
|
|
28
27
|
appConfig: s.appConfig,
|
|
29
28
|
projectColors: s.projectColors,
|
|
@@ -92,13 +91,7 @@ function OnboardProvider({ node }: OnboardProviderComponentProps) {
|
|
|
92
91
|
attribute-name={attributeName}
|
|
93
92
|
attribute-key={attributeKey}
|
|
94
93
|
className="carousel-provider"
|
|
95
|
-
style={
|
|
96
|
-
...viewStyle,
|
|
97
|
-
paddingTop: node.attributes?.paddingTop,
|
|
98
|
-
paddingRight: node.attributes?.paddingRight,
|
|
99
|
-
paddingBottom: node.attributes?.paddingBottom,
|
|
100
|
-
paddingLeft: node.attributes?.paddingLeft,
|
|
101
|
-
}}
|
|
94
|
+
style={viewStyle}
|
|
102
95
|
>
|
|
103
96
|
<div className="embla">
|
|
104
97
|
<div className="embla__viewport" ref={emblaRef}>
|
|
@@ -42,14 +42,18 @@ export interface OnboardProviderPropsGenerated {
|
|
|
42
42
|
backgroundColor?: string;
|
|
43
43
|
borderRadius?: never;
|
|
44
44
|
width?: string;
|
|
45
|
+
minWidth?: string;
|
|
46
|
+
maxWidth?: string;
|
|
45
47
|
height?: string;
|
|
48
|
+
minHeight?: string;
|
|
49
|
+
maxHeight?: string;
|
|
50
|
+
flex?: number;
|
|
46
51
|
position?: PositionOptionType;
|
|
47
52
|
top?: string;
|
|
48
53
|
bottom?: string;
|
|
49
54
|
left?: string;
|
|
50
55
|
right?: string;
|
|
51
56
|
zIndex?: number;
|
|
52
|
-
use_safe_area_inset?: boolean;
|
|
53
57
|
};
|
|
54
58
|
}
|
|
55
59
|
|
|
@@ -6,55 +6,45 @@
|
|
|
6
6
|
"children": "node",
|
|
7
7
|
"extends": "View",
|
|
8
8
|
"attributes": {
|
|
9
|
-
"use_safe_area_inset": "boolean",
|
|
10
9
|
"borderRadius": "never"
|
|
11
10
|
}
|
|
12
11
|
},
|
|
13
12
|
"defaults": {
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"paddingBottom": 8,
|
|
17
|
-
"paddingLeft": 0
|
|
13
|
+
"width": "100%",
|
|
14
|
+
"height": "100%"
|
|
18
15
|
},
|
|
19
16
|
"meta": {
|
|
20
17
|
"desiredParent": ["root"],
|
|
21
18
|
"label": "Onboard Provider",
|
|
22
19
|
"description": "Provides shared settings for onboarding.",
|
|
23
20
|
"attributes": {
|
|
24
|
-
"use_safe_area_inset": {
|
|
25
|
-
"label": "Use Safe Area Inset",
|
|
26
|
-
"description": "Adds safe area padding.",
|
|
27
|
-
"category": "container",
|
|
28
|
-
"specialCategory": null,
|
|
29
|
-
"sort": 2
|
|
30
|
-
},
|
|
31
21
|
"paddingTop": {
|
|
32
22
|
"label": "Padding Top",
|
|
33
23
|
"description": "Top padding for the provider.",
|
|
34
24
|
"category": "container",
|
|
35
25
|
"specialCategory": "padding",
|
|
36
|
-
"sort":
|
|
26
|
+
"sort": 1
|
|
37
27
|
},
|
|
38
28
|
"paddingRight": {
|
|
39
29
|
"label": "Padding Right",
|
|
40
30
|
"description": "Right padding for the provider.",
|
|
41
31
|
"category": "container",
|
|
42
32
|
"specialCategory": "padding",
|
|
43
|
-
"sort":
|
|
33
|
+
"sort": 2
|
|
44
34
|
},
|
|
45
35
|
"paddingBottom": {
|
|
46
36
|
"label": "Padding Bottom",
|
|
47
37
|
"description": "Bottom padding for the provider.",
|
|
48
38
|
"category": "container",
|
|
49
39
|
"specialCategory": "padding",
|
|
50
|
-
"sort":
|
|
40
|
+
"sort": 3
|
|
51
41
|
},
|
|
52
42
|
"paddingLeft": {
|
|
53
43
|
"label": "Padding Left",
|
|
54
44
|
"description": "Left padding for the provider.",
|
|
55
45
|
"category": "container",
|
|
56
46
|
"specialCategory": "padding",
|
|
57
|
-
"sort":
|
|
47
|
+
"sort": 4
|
|
58
48
|
}
|
|
59
49
|
}
|
|
60
50
|
}
|
|
@@ -59,7 +59,12 @@ export interface OnboardSubtitlePropsGenerated {
|
|
|
59
59
|
backgroundColor?: string;
|
|
60
60
|
borderRadius?: string;
|
|
61
61
|
width?: string;
|
|
62
|
+
minWidth?: string;
|
|
63
|
+
maxWidth?: string;
|
|
62
64
|
height?: string;
|
|
65
|
+
minHeight?: string;
|
|
66
|
+
maxHeight?: string;
|
|
67
|
+
flex?: number;
|
|
63
68
|
position?: PositionOptionType;
|
|
64
69
|
top?: string;
|
|
65
70
|
bottom?: string;
|
|
@@ -59,7 +59,12 @@ export interface OnboardTitlePropsGenerated {
|
|
|
59
59
|
backgroundColor?: string;
|
|
60
60
|
borderRadius?: string;
|
|
61
61
|
width?: string;
|
|
62
|
+
minWidth?: string;
|
|
63
|
+
maxWidth?: string;
|
|
62
64
|
height?: string;
|
|
65
|
+
minHeight?: string;
|
|
66
|
+
maxHeight?: string;
|
|
67
|
+
flex?: number;
|
|
63
68
|
position?: PositionOptionType;
|
|
64
69
|
top?: string;
|
|
65
70
|
bottom?: string;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React, { useId, useMemo } from 'react';
|
|
2
|
+
import type { PaywallBackgroundComponentProps } from './PaywallBackgroundProps.generated';
|
|
3
|
+
import useNode from '../useNode';
|
|
4
|
+
import { useRenderStore } from '../../store';
|
|
5
|
+
import { extractViewStyle } from '../../utils/extractViewStyle';
|
|
6
|
+
import { useLogRender } from '../../utils/useLogRender';
|
|
7
|
+
import { isNodeSelected, SELECTED_OUTLINE_STYLE } from '../../utils/selection';
|
|
8
|
+
import { useMergedStyle } from '../../utils/useMergedStyle';
|
|
9
|
+
|
|
10
|
+
function PaywallBackground({ node }: PaywallBackgroundComponentProps) {
|
|
11
|
+
useLogRender('PaywallBackground');
|
|
12
|
+
node = useNode(node);
|
|
13
|
+
|
|
14
|
+
const generatedId = useId();
|
|
15
|
+
const attributeName = node.type ?? 'PaywallBackground';
|
|
16
|
+
const attributeKey = node.key ?? generatedId;
|
|
17
|
+
|
|
18
|
+
const { previewMode, current, appConfig, projectColors } = useRenderStore(
|
|
19
|
+
(s) => ({
|
|
20
|
+
previewMode: s.previewMode,
|
|
21
|
+
current: s.current,
|
|
22
|
+
appConfig: s.appConfig,
|
|
23
|
+
projectColors: s.projectColors,
|
|
24
|
+
}),
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
const baseStyle = useMemo(
|
|
28
|
+
() => extractViewStyle(node, { appConfig, projectColors }),
|
|
29
|
+
[node, appConfig, projectColors],
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
const isSelected = isNodeSelected({ previewMode, current, node });
|
|
33
|
+
const style = useMergedStyle(
|
|
34
|
+
baseStyle,
|
|
35
|
+
isSelected ? SELECTED_OUTLINE_STYLE : undefined,
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<div
|
|
40
|
+
attribute-name={attributeName}
|
|
41
|
+
attribute-key={attributeKey}
|
|
42
|
+
style={style}
|
|
43
|
+
/>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export default React.memo(PaywallBackground);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/* AUTO-GENERATED FILE - DO NOT EDIT */
|
|
2
|
+
|
|
3
|
+
import type { NodeData } from '../../types/Node';
|
|
4
|
+
|
|
5
|
+
export type FlexDirectionOptionType = 'row' | 'column';
|
|
6
|
+
export type AlignItemsOptionType =
|
|
7
|
+
| 'flex-start'
|
|
8
|
+
| 'center'
|
|
9
|
+
| 'flex-end'
|
|
10
|
+
| 'stretch'
|
|
11
|
+
| 'baseline';
|
|
12
|
+
export type JustifyContentOptionType =
|
|
13
|
+
| 'flex-start'
|
|
14
|
+
| 'center'
|
|
15
|
+
| 'flex-end'
|
|
16
|
+
| 'space-between'
|
|
17
|
+
| 'space-around'
|
|
18
|
+
| 'space-evenly';
|
|
19
|
+
export type PositionOptionType = 'relative' | 'absolute';
|
|
20
|
+
|
|
21
|
+
export interface PaywallBackgroundPropsGenerated {
|
|
22
|
+
child: string;
|
|
23
|
+
attributes: {
|
|
24
|
+
scrollable?: boolean;
|
|
25
|
+
flexDirection?: FlexDirectionOptionType;
|
|
26
|
+
alignItems?: AlignItemsOptionType;
|
|
27
|
+
justifyContent?: JustifyContentOptionType;
|
|
28
|
+
gap?: string;
|
|
29
|
+
padding?: string;
|
|
30
|
+
paddingHorizontal?: string;
|
|
31
|
+
paddingVertical?: string;
|
|
32
|
+
paddingTop?: string;
|
|
33
|
+
paddingBottom?: string;
|
|
34
|
+
paddingLeft?: string;
|
|
35
|
+
paddingRight?: string;
|
|
36
|
+
margin?: string;
|
|
37
|
+
marginVertical?: string;
|
|
38
|
+
marginTop?: string;
|
|
39
|
+
marginBottom?: string;
|
|
40
|
+
marginLeft?: string;
|
|
41
|
+
marginRight?: string;
|
|
42
|
+
backgroundColor?: string;
|
|
43
|
+
borderRadius?: string;
|
|
44
|
+
width?: string;
|
|
45
|
+
minWidth?: string;
|
|
46
|
+
maxWidth?: string;
|
|
47
|
+
height?: string;
|
|
48
|
+
minHeight?: string;
|
|
49
|
+
maxHeight?: string;
|
|
50
|
+
flex?: number;
|
|
51
|
+
position?: PositionOptionType;
|
|
52
|
+
top?: string;
|
|
53
|
+
bottom?: string;
|
|
54
|
+
left?: string;
|
|
55
|
+
right?: string;
|
|
56
|
+
zIndex?: number;
|
|
57
|
+
[key: string]: string | number | boolean | undefined;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface PaywallBackgroundComponentProps {
|
|
62
|
+
node: NodeData<PaywallBackgroundPropsGenerated['attributes']>;
|
|
63
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"allowUnknownAttributes": true,
|
|
4
|
+
"pattern": {
|
|
5
|
+
"type": "PaywallBackground",
|
|
6
|
+
"children": "never",
|
|
7
|
+
"extends": "View",
|
|
8
|
+
"attributes": {}
|
|
9
|
+
},
|
|
10
|
+
"meta": {
|
|
11
|
+
"desiredParent": [">PaywallProvider"],
|
|
12
|
+
"label": "Paywall Background",
|
|
13
|
+
"description": "Paywall Background component.",
|
|
14
|
+
"attributes": {}
|
|
15
|
+
}
|
|
16
|
+
}
|