@developer_tribe/react-builder 1.0.4 → 1.0.6
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/assets/samples/getSamples.d.ts +1 -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 +4 -0
- package/dist/build-components/Button/ButtonProps.generated.d.ts +4 -0
- package/dist/build-components/Carousel/CarouselProps.generated.d.ts +4 -0
- package/dist/build-components/CarouselButtons/CarouselButtonsProps.generated.d.ts +4 -0
- package/dist/build-components/CarouselDots/CarouselDotsProps.generated.d.ts +4 -0
- package/dist/build-components/CarouselItem/CarouselItemProps.generated.d.ts +4 -0
- package/dist/build-components/CarouselProvider/CarouselProviderProps.generated.d.ts +4 -0
- package/dist/build-components/Image/ImageProps.generated.d.ts +4 -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 +4 -0
- package/dist/build-components/OnboardButton/OnboardButtonProps.generated.d.ts +4 -0
- package/dist/build-components/OnboardButtons/OnboardButtonsProps.generated.d.ts +4 -0
- package/dist/build-components/OnboardDot/OnboardDotProps.generated.d.ts +4 -0
- package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +4 -0
- package/dist/build-components/OnboardImage/OnboardImageProps.generated.d.ts +4 -0
- package/dist/build-components/OnboardItem/OnboardItemProps.generated.d.ts +4 -0
- package/dist/build-components/OnboardProvider/OnboardProviderProps.generated.d.ts +4 -1
- package/dist/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.d.ts +4 -0
- package/dist/build-components/OnboardTitle/OnboardTitleProps.generated.d.ts +4 -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/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 +4 -0
- package/dist/build-components/View/ViewProps.generated.d.ts +4 -0
- package/dist/build-components/index.d.ts +9 -1
- package/dist/build-components/patterns.generated.d.ts +4442 -655
- package/dist/components/AttributesEditorPanel.d.ts +4 -3
- package/dist/components/BottomBar.d.ts +8 -0
- 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/Checkbox.d.ts +1 -1
- package/dist/components/EditorHeader.d.ts +1 -1
- package/dist/components/Icon.generated.d.ts +11 -0
- package/dist/components/LoadingComponent.d.ts +1 -0
- package/dist/components/LocalizationParamsProvider.d.ts +11 -0
- package/dist/components/MobilePanelToggleButton.d.ts +8 -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/useMinimumDelay.d.ts +7 -0
- package/dist/hooks/useMobileEditorPanels.d.ts +12 -0
- package/dist/hooks/useParams.d.ts +1 -0
- package/dist/hooks/useSafeAreaViewStyle.d.ts +1 -0
- package/dist/hooks/useSyncProjectPageStore.d.ts +15 -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/ScreenColorsModal.d.ts +8 -0
- package/dist/modals/index.d.ts +7 -0
- package/dist/pages/ProjectPage.d.ts +3 -2
- package/dist/pages/tabs/BuilderPanel.d.ts +3 -3
- 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 +35 -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/findNodeByKeyNested.d.ts +2 -0
- package/dist/utils/nodeGuards.d.ts +5 -0
- package/dist/utils/nodeTree.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/package.json +33 -3
- 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/AttributesEditor.tsx +178 -34
- package/src/DeviceMockFrame.tsx +41 -43
- package/src/RenderPage.tsx +11 -49
- 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 +100 -81
- package/src/assets/samples/getSamples.ts +39 -66
- package/src/assets/samples/paywall-1.json +220 -0
- package/src/assets/samples/simple-1.json +9 -2
- package/src/assets/samples/simple-2.json +37 -9
- package/src/assets/samples/vpn-onboard-1.json +326 -718
- package/src/assets/samples/vpn-onboard-2.json +329 -709
- package/src/assets/samples/vpn-onboard-3.json +297 -706
- package/src/assets/samples/vpn-onboard-4.json +297 -707
- package/src/assets/samples/vpn-onboard-5.json +440 -919
- package/src/assets/samples/vpn-onboard-6.json +301 -612
- package/src/attributes-editor/SpecialCategorySection.tsx +1 -1
- 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/BackgroundImageProps.generated.ts +4 -0
- package/src/build-components/BackgroundImage/pattern.json +2 -2
- package/src/build-components/Button/Button.tsx +14 -1
- package/src/build-components/Button/ButtonProps.generated.ts +4 -0
- package/src/build-components/Button/pattern.json +4 -1
- package/src/build-components/Carousel/CarouselProps.generated.ts +4 -0
- package/src/build-components/Carousel/pattern.json +2 -2
- package/src/build-components/CarouselButtons/CarouselButtonsProps.generated.ts +4 -0
- package/src/build-components/CarouselButtons/pattern.json +1 -1
- package/src/build-components/CarouselDots/CarouselDotsProps.generated.ts +4 -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 +4 -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 +4 -0
- package/src/build-components/CarouselProvider/pattern.json +1 -1
- package/src/build-components/Image/ImageProps.generated.ts +4 -0
- package/src/build-components/Image/pattern.json +1 -1
- 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 +4 -0
- package/src/build-components/OnboardButton/OnboardButtonProps.generated.ts +4 -0
- package/src/build-components/OnboardButtons/OnboardButtonsProps.generated.ts +4 -0
- package/src/build-components/OnboardDot/OnboardDotProps.generated.ts +4 -0
- package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +4 -0
- package/src/build-components/OnboardImage/OnboardImageProps.generated.ts +4 -0
- package/src/build-components/OnboardItem/OnboardItem.tsx +1 -1
- package/src/build-components/OnboardItem/OnboardItemProps.generated.ts +4 -0
- package/src/build-components/OnboardProvider/OnboardProviderProps.generated.ts +4 -1
- package/src/build-components/OnboardProvider/pattern.json +6 -16
- package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +4 -0
- package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +4 -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/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 +133 -37
- package/src/build-components/Text/Text.tsx +3 -3
- package/src/build-components/Text/TextProps.generated.ts +4 -0
- package/src/build-components/Text/pattern.json +1 -1
- package/src/build-components/View/ViewProps.generated.ts +4 -0
- package/src/build-components/View/pattern.json +44 -6
- package/src/build-components/index.ts +50 -10
- package/src/build-components/patterns.generated.ts +4516 -712
- package/src/components/AttributesEditorPanel.tsx +15 -9
- package/src/components/BottomBar.tsx +236 -0
- package/src/components/Builder.tsx +3 -5
- package/src/components/BuilderButton.tsx +2 -7
- package/src/components/BuilderProvider.tsx +45 -0
- package/src/components/DeviceNavigationBar.tsx +1 -1
- package/src/components/EditorHeader.tsx +15 -5
- package/src/components/Icon.generated.tsx +540 -0
- package/src/components/LoadingComponent.tsx +10 -0
- package/src/components/LocalizationParamsProvider.tsx +22 -0
- package/src/components/MobilePanelToggleButton.tsx +39 -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/useMinimumDelay.ts +20 -0
- package/src/hooks/useMobileEditorPanels.ts +56 -0
- package/src/hooks/useParams.ts +8 -0
- package/src/hooks/useSafeAreaViewStyle.ts +67 -0
- package/src/hooks/useSyncProjectPageStore.ts +40 -0
- package/src/index.native.ts +75 -0
- package/src/index.ts +26 -0
- package/src/mockOS/components/MockOSRouter.tsx +9 -14
- package/src/mockOS/context/MockOSContext.tsx +12 -36
- package/src/mockOS/context/MockOSContextBase.ts +35 -0
- package/src/mockOS/index.ts +3 -2
- package/src/modals/AddComponentModal.tsx +1 -0
- package/src/modals/BenefitEditModal.tsx +160 -0
- package/src/modals/BenefitPresetsModal.tsx +166 -0
- package/src/modals/IconPickerModal.tsx +109 -0
- package/src/modals/MockableFeatureModal.tsx +292 -0
- package/src/modals/ProductEditModal.tsx +215 -0
- package/src/modals/ProductPresetsModal.tsx +151 -0
- package/src/modals/ScreenColorsModal.tsx +115 -0
- package/src/modals/index.ts +7 -0
- package/src/pages/ProjectPage.tsx +99 -232
- package/src/pages/tabs/BuilderPanel.tsx +15 -9
- 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 +165 -47
- package/src/styles/base/_global.scss +61 -45
- package/src/styles/components/_attributes-editor.scss +49 -6
- package/src/styles/components/_bottom-bar.scss +113 -0
- package/src/styles/components/_editor-shell.scss +0 -25
- package/src/styles/components/_ui-components.scss +2 -1
- package/src/styles/index.scss +6 -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/_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/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 +453 -0
- package/src/utils/analyseNodeStructural.ts +52 -0
- package/src/utils/extractViewStyle.ts +19 -0
- package/src/utils/findNodeByKeyNested.ts +32 -0
- package/src/utils/isCarousel.ts +21 -5
- package/src/utils/nodeGuards.ts +26 -0
- package/src/utils/nodeTree.ts +99 -0
- package/src/utils/novaToJson.ts +21 -9
- package/src/utils/patterns.ts +62 -3
- package/src/utils/replaceLocalizationParams.ts +15 -0
- package/dist/pages/tabs/SideTool.d.ts +0 -8
- package/src/pages/tabs/SideTool.tsx +0 -260
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Benefits are a simple key/value map used by paywall UIs to show feature bullets,
|
|
3
|
+
* trial metadata, headlines, etc.
|
|
4
|
+
*
|
|
5
|
+
* We keep the value type primitive so it serializes cleanly and is easy to mock.
|
|
6
|
+
*/
|
|
7
|
+
export type PaywallBenefitValue = string | number | boolean;
|
|
8
|
+
|
|
9
|
+
export type PaywallBenefits = Record<string, PaywallBenefitValue>;
|
|
10
|
+
|
|
11
|
+
export type PaywallBenefitEntry = {
|
|
12
|
+
key: string;
|
|
13
|
+
value: PaywallBenefitValue;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export function benefitMapToEntries(
|
|
17
|
+
map: PaywallBenefits | undefined,
|
|
18
|
+
): PaywallBenefitEntry[] {
|
|
19
|
+
if (!map || typeof map !== 'object') return [];
|
|
20
|
+
return Object.entries(map)
|
|
21
|
+
.filter(([key]) => typeof key === 'string' && key.trim().length > 0)
|
|
22
|
+
.map(([key, value]) => ({ key, value: value as PaywallBenefitValue }));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function benefitEntriesToMap(
|
|
26
|
+
entries: Array<PaywallBenefitEntry | null | undefined> | undefined,
|
|
27
|
+
): PaywallBenefits {
|
|
28
|
+
const out: PaywallBenefits = {};
|
|
29
|
+
if (!Array.isArray(entries)) return out;
|
|
30
|
+
entries.forEach((entry) => {
|
|
31
|
+
const key = entry?.key?.toString?.().trim?.() ?? '';
|
|
32
|
+
if (!key) return;
|
|
33
|
+
const value = entry?.value as PaywallBenefitValue;
|
|
34
|
+
if (
|
|
35
|
+
typeof value !== 'string' &&
|
|
36
|
+
typeof value !== 'number' &&
|
|
37
|
+
typeof value !== 'boolean'
|
|
38
|
+
) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
out[key] = value;
|
|
42
|
+
});
|
|
43
|
+
return out;
|
|
44
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simple paywall-related types.
|
|
3
|
+
*
|
|
4
|
+
* We keep this intentionally small and runtime-agnostic.
|
|
5
|
+
*
|
|
6
|
+
* Product fields are based on the common shape returned by `react-native-iap`
|
|
7
|
+
* calls like `getProducts()` / `getSubscriptions()`.
|
|
8
|
+
* See: `https://www.npmjs.com/package/react-native-iap`
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export type { PaywallBenefits, PaywallBenefitValue } from './benefits';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Minimal "product" representation (compatible with `react-native-iap` product-ish objects).
|
|
15
|
+
*
|
|
16
|
+
* Note: `react-native-iap` has slightly different fields per platform/product type.
|
|
17
|
+
* This is the common subset most paywalls need.
|
|
18
|
+
*/
|
|
19
|
+
export interface Product {
|
|
20
|
+
/** iOS: `productId`, Android: `productId` */
|
|
21
|
+
productId: string;
|
|
22
|
+
|
|
23
|
+
/** Display name / title from the store (when available). */
|
|
24
|
+
title?: string;
|
|
25
|
+
|
|
26
|
+
/** Description from the store (when available). */
|
|
27
|
+
description?: string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Localized formatted price (e.g. "$4.99", "€9,99").
|
|
31
|
+
* In `react-native-iap` this is typically `localizedPrice`.
|
|
32
|
+
*/
|
|
33
|
+
localizedPrice?: string;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Raw price string from the store (often numeric string).
|
|
37
|
+
* In `react-native-iap` this is typically `price`.
|
|
38
|
+
*/
|
|
39
|
+
price?: string;
|
|
40
|
+
|
|
41
|
+
/** Currency code (e.g. "USD", "EUR"). */
|
|
42
|
+
currency?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* A simple paywall model you can store/serialize.
|
|
47
|
+
*/
|
|
48
|
+
export interface PaywallModel {
|
|
49
|
+
product: Product[];
|
|
50
|
+
benefits: import('./benefits').PaywallBenefits;
|
|
51
|
+
}
|
package/src/store.ts
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import { createWithEqualityFn } from 'zustand/traditional';
|
|
2
2
|
import { shallow } from 'zustand/shallow';
|
|
3
3
|
import type { Device } from './types/Device';
|
|
4
|
-
import {
|
|
5
|
-
defaultAppConfig,
|
|
6
|
-
type AppConfig,
|
|
7
|
-
type Localication,
|
|
8
|
-
} from './types/PreviewConfig';
|
|
4
|
+
import { defaultAppConfig, type AppConfig } from './types/PreviewConfig';
|
|
9
5
|
import { getDefaultDevice } from './utils/getDevices';
|
|
10
|
-
import {
|
|
11
|
-
import { createJSONStorage } from 'zustand/middleware';
|
|
6
|
+
import { createJSONStorage, persist } from 'zustand/middleware';
|
|
12
7
|
import { Node } from './types/Node';
|
|
13
8
|
import type { LogEntry, LogLevel, ProjectColors } from './types/Project';
|
|
9
|
+
import type { Product } from './paywall/types/paywall-types';
|
|
10
|
+
import type {
|
|
11
|
+
PaywallBenefits,
|
|
12
|
+
PaywallBenefitValue,
|
|
13
|
+
} from './paywall/types/benefits';
|
|
14
14
|
|
|
15
15
|
type RenderStore = {
|
|
16
|
+
projectName: string;
|
|
17
|
+
setProjectName: (name: string) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Root node tree being edited (a.k.a. "editor data").
|
|
20
|
+
* Not persisted: it comes from the currently opened project.
|
|
21
|
+
*/
|
|
22
|
+
editorData: Node | null;
|
|
23
|
+
setEditorData: (data: Node | null) => void;
|
|
16
24
|
copiedNode: Node | null;
|
|
17
25
|
setCopiedNode: (node: Node | null) => void;
|
|
18
26
|
current: Node | null;
|
|
@@ -27,6 +35,20 @@ type RenderStore = {
|
|
|
27
35
|
setProjectColors: (projectColors?: ProjectColors) => void;
|
|
28
36
|
previewMode: boolean;
|
|
29
37
|
setPreviewMode: (previewMode: boolean) => void;
|
|
38
|
+
// Mockable: products (persisted)
|
|
39
|
+
products: Product[];
|
|
40
|
+
addProduct: () => void;
|
|
41
|
+
removeProduct: (index: number) => void;
|
|
42
|
+
updateProduct: (index: number, patch: Partial<Product>) => void;
|
|
43
|
+
setProducts: (products: Product[]) => void;
|
|
44
|
+
clearProducts: () => void;
|
|
45
|
+
// Mockable: benefits (persisted)
|
|
46
|
+
benefits: PaywallBenefits;
|
|
47
|
+
setBenefits: (benefits: PaywallBenefits) => void;
|
|
48
|
+
clearBenefits: () => void;
|
|
49
|
+
upsertBenefit: (key: string, value: PaywallBenefitValue) => void;
|
|
50
|
+
removeBenefit: (key: string) => void;
|
|
51
|
+
renameBenefit: (fromKey: string, toKey: string) => void;
|
|
30
52
|
// Logging
|
|
31
53
|
logs: LogEntry[];
|
|
32
54
|
logLevel: LogLevel;
|
|
@@ -41,51 +63,147 @@ type RenderStore = {
|
|
|
41
63
|
};
|
|
42
64
|
|
|
43
65
|
export const useRenderStore = createWithEqualityFn<RenderStore>()(
|
|
44
|
-
(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
66
|
+
persist(
|
|
67
|
+
(set) => ({
|
|
68
|
+
projectName: '',
|
|
69
|
+
setProjectName: (name) => set({ projectName: name }),
|
|
70
|
+
editorData: null,
|
|
71
|
+
setEditorData: (data) => set({ editorData: data, current: data }),
|
|
72
|
+
copiedNode: null,
|
|
73
|
+
setCopiedNode: (node) => set({ copiedNode: node }),
|
|
74
|
+
current: null,
|
|
75
|
+
setCurrent: (node) => set({ current: node }),
|
|
76
|
+
forceRender: 0,
|
|
77
|
+
incForceRender: () =>
|
|
78
|
+
set((state) => ({ forceRender: state.forceRender + 1 })),
|
|
79
|
+
device: getDefaultDevice(),
|
|
80
|
+
setDevice: (device) => set({ device }),
|
|
81
|
+
appConfig: defaultAppConfig,
|
|
82
|
+
setAppConfig: (appConfig) => set({ appConfig }),
|
|
83
|
+
projectColors: undefined,
|
|
84
|
+
setProjectColors: (projectColors) => set({ projectColors }),
|
|
85
|
+
previewMode: false,
|
|
86
|
+
setPreviewMode: (previewMode) => set({ previewMode }),
|
|
87
|
+
products: [],
|
|
88
|
+
addProduct: () =>
|
|
89
|
+
set((state) => ({
|
|
90
|
+
products: [
|
|
91
|
+
...(Array.isArray(state.products) ? state.products : []),
|
|
92
|
+
{
|
|
93
|
+
productId: '',
|
|
94
|
+
title: '',
|
|
95
|
+
description: '',
|
|
96
|
+
localizedPrice: '',
|
|
97
|
+
price: '',
|
|
98
|
+
currency: '',
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
})),
|
|
102
|
+
removeProduct: (index) =>
|
|
103
|
+
set((state) => ({
|
|
104
|
+
products: state.products.filter((_, idx) => idx !== index),
|
|
105
|
+
})),
|
|
106
|
+
updateProduct: (index, patch) =>
|
|
107
|
+
set((state) => {
|
|
108
|
+
const prev = state.products;
|
|
109
|
+
if (!Array.isArray(prev)) return state;
|
|
110
|
+
if (index < 0 || index >= prev.length) return state;
|
|
111
|
+
const next = prev.map((p, idx) =>
|
|
112
|
+
idx === index ? { ...p, ...(patch ?? {}) } : p,
|
|
113
|
+
);
|
|
114
|
+
return { products: next };
|
|
115
|
+
}),
|
|
116
|
+
setProducts: (products) =>
|
|
117
|
+
set({
|
|
118
|
+
products: Array.isArray(products) ? products : [],
|
|
119
|
+
}),
|
|
120
|
+
clearProducts: () => set({ products: [] }),
|
|
121
|
+
|
|
122
|
+
benefits: {},
|
|
123
|
+
setBenefits: (benefits) =>
|
|
124
|
+
set({
|
|
125
|
+
benefits:
|
|
126
|
+
benefits && typeof benefits === 'object' && !Array.isArray(benefits)
|
|
127
|
+
? (benefits as PaywallBenefits)
|
|
128
|
+
: {},
|
|
129
|
+
}),
|
|
130
|
+
clearBenefits: () => set({ benefits: {} }),
|
|
131
|
+
upsertBenefit: (key, value) =>
|
|
132
|
+
set((state) => {
|
|
133
|
+
const normalizedKey = typeof key === 'string' ? key.trim() : '';
|
|
134
|
+
if (!normalizedKey) return state;
|
|
135
|
+
if (
|
|
136
|
+
typeof value !== 'string' &&
|
|
137
|
+
typeof value !== 'number' &&
|
|
138
|
+
typeof value !== 'boolean'
|
|
139
|
+
) {
|
|
140
|
+
return state;
|
|
141
|
+
}
|
|
142
|
+
const prev = state.benefits;
|
|
143
|
+
const next: PaywallBenefits = { ...(prev ?? {}) };
|
|
144
|
+
next[normalizedKey] = value;
|
|
145
|
+
return { benefits: next };
|
|
146
|
+
}),
|
|
147
|
+
removeBenefit: (key) =>
|
|
148
|
+
set((state) => {
|
|
149
|
+
const normalizedKey = typeof key === 'string' ? key.trim() : '';
|
|
150
|
+
if (!normalizedKey) return state;
|
|
151
|
+
const prev = state.benefits;
|
|
152
|
+
if (!prev || typeof prev !== 'object') return state;
|
|
153
|
+
if (!(normalizedKey in prev)) return state;
|
|
154
|
+
const next: PaywallBenefits = { ...(prev ?? {}) };
|
|
155
|
+
delete next[normalizedKey];
|
|
156
|
+
return { benefits: next };
|
|
157
|
+
}),
|
|
158
|
+
renameBenefit: (fromKey, toKey) =>
|
|
159
|
+
set((state) => {
|
|
160
|
+
const from = typeof fromKey === 'string' ? fromKey.trim() : '';
|
|
161
|
+
const to = typeof toKey === 'string' ? toKey.trim() : '';
|
|
162
|
+
if (!from || !to) return state;
|
|
163
|
+
if (from === to) return state;
|
|
164
|
+
const prev = state.benefits;
|
|
165
|
+
if (!prev || typeof prev !== 'object') return state;
|
|
166
|
+
if (!(from in prev)) return state;
|
|
167
|
+
const next: PaywallBenefits = { ...(prev ?? {}) };
|
|
168
|
+
const value = next[from] as PaywallBenefitValue;
|
|
169
|
+
delete next[from];
|
|
170
|
+
next[to] = value;
|
|
171
|
+
return { benefits: next };
|
|
172
|
+
}),
|
|
173
|
+
// Logging defaults
|
|
174
|
+
logs: [],
|
|
175
|
+
logLevel: 'INFO',
|
|
176
|
+
setLogLevel: (level) => set({ logLevel: level }),
|
|
177
|
+
addLog: (entry) =>
|
|
178
|
+
set((state) => {
|
|
179
|
+
const now = Date.now();
|
|
180
|
+
const id =
|
|
181
|
+
entry.id ?? `${now}-${Math.random().toString(36).slice(2, 8)}`;
|
|
182
|
+
const timestamp = entry.timestamp ?? now;
|
|
183
|
+
const newEntry: LogEntry = {
|
|
184
|
+
id,
|
|
185
|
+
timestamp,
|
|
186
|
+
level: entry.level,
|
|
187
|
+
source: entry.source,
|
|
188
|
+
message: entry.message,
|
|
189
|
+
payload: entry.payload,
|
|
190
|
+
};
|
|
191
|
+
return { logs: [...state.logs, newEntry] };
|
|
192
|
+
}),
|
|
193
|
+
clearLogs: () => set({ logs: [] }),
|
|
194
|
+
}),
|
|
195
|
+
{
|
|
82
196
|
name: 'render-store',
|
|
83
|
-
partialize: (state
|
|
197
|
+
partialize: (state) => ({
|
|
198
|
+
// Explicitly DO NOT persist projectName (it comes from ProjectPage props)
|
|
199
|
+
// Explicitly DO NOT persist editorData/current (they come from the opened project)
|
|
84
200
|
copiedNode: state.copiedNode ?? null,
|
|
85
201
|
logLevel: state.logLevel,
|
|
202
|
+
products: state.products,
|
|
203
|
+
benefits: state.benefits,
|
|
86
204
|
}),
|
|
87
205
|
storage: createJSONStorage(() => localStorage),
|
|
88
206
|
},
|
|
89
|
-
|
|
207
|
+
),
|
|
90
208
|
shallow,
|
|
91
209
|
);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
@use '../foundation/sizes' as sizes;
|
|
3
3
|
@use '../foundation/typography' as type;
|
|
4
4
|
@use '../foundation/mixins' as *;
|
|
5
|
+
@use 'sass:color';
|
|
5
6
|
|
|
6
7
|
/* Global utility classes */
|
|
7
8
|
html,
|
|
@@ -47,7 +48,7 @@ body,
|
|
|
47
48
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
|
|
48
49
|
|
|
49
50
|
&:hover {
|
|
50
|
-
border-color:
|
|
51
|
+
border-color: color.adjust(colors.$mutedTextColor, $lightness: -10%);
|
|
51
52
|
transform: translateY(-1px);
|
|
52
53
|
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
|
|
53
54
|
}
|
|
@@ -63,60 +64,41 @@ body,
|
|
|
63
64
|
|
|
64
65
|
.split-right {
|
|
65
66
|
position: relative;
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: column;
|
|
66
69
|
flex: 1 1 45%;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
padding: sizes.$spaceComfy;
|
|
71
|
-
padding-bottom: 120px;
|
|
70
|
+
width: 100%;
|
|
71
|
+
height: auto;
|
|
72
|
+
max-height: calc(100vh - 120px);
|
|
72
73
|
overflow: auto;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
padding: sizes.$spaceComfy;
|
|
75
|
+
background-size: cover;
|
|
76
|
+
background-position: center;
|
|
77
|
+
background-repeat: repeat;
|
|
78
|
+
background-size: 500px auto;
|
|
79
|
+
> * {
|
|
80
|
+
position: relative;
|
|
81
|
+
z-index: 1;
|
|
82
|
+
}
|
|
81
83
|
}
|
|
82
84
|
|
|
83
85
|
.split-third {
|
|
84
86
|
flex: 1 1 25%;
|
|
85
87
|
border-right: 1px solid colors.$borderColor;
|
|
86
88
|
overflow: auto;
|
|
89
|
+
//TODO: depth bir sebepten sağa kayıyor (ama componentler kaymadan) çözülse iyi olabilir
|
|
90
|
+
overflow-x: hidden;
|
|
87
91
|
max-height: calc(100vh - 120px);
|
|
88
92
|
}
|
|
89
93
|
|
|
90
|
-
.split-right-background {
|
|
91
|
-
position: absolute;
|
|
92
|
-
top: 0;
|
|
93
|
-
left: 0;
|
|
94
|
-
right: 0;
|
|
95
|
-
bottom: 0;
|
|
96
|
-
height: calc(100vh + 60px);
|
|
97
|
-
background-size: cover;
|
|
98
|
-
background-position: center;
|
|
99
|
-
background-repeat: repeat;
|
|
100
|
-
background-size: 500px auto;
|
|
101
|
-
opacity: 0.2;
|
|
102
|
-
z-index: 0;
|
|
103
|
-
pointer-events: none;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.stage-wrapper {
|
|
107
|
-
display: flex;
|
|
108
|
-
justify-content: center;
|
|
109
|
-
background: transparent;
|
|
110
|
-
padding: sizes.$spaceComfy;
|
|
111
|
-
position: relative;
|
|
112
|
-
z-index: 1;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
94
|
.stage {
|
|
116
95
|
@include card;
|
|
117
|
-
|
|
96
|
+
align-self: center;
|
|
97
|
+
border: 1px solid color.adjust(colors.$borderColor, $lightness: -10%);
|
|
98
|
+
box-shadow:
|
|
99
|
+
0 18px 50px rgba(0, 0, 0, 0.16),
|
|
100
|
+
0 6px 16px rgba(0, 0, 0, 0.1);
|
|
118
101
|
overflow: hidden;
|
|
119
|
-
|
|
120
102
|
.scroll-container {
|
|
121
103
|
/* Mobile-like scrollbar styling */
|
|
122
104
|
&::-webkit-scrollbar {
|
|
@@ -183,6 +165,7 @@ body,
|
|
|
183
165
|
display: flex;
|
|
184
166
|
align-items: center;
|
|
185
167
|
gap: sizes.$spaceCozy;
|
|
168
|
+
flex-wrap: wrap;
|
|
186
169
|
font-size: 12px;
|
|
187
170
|
color: colors.$mutedTextColor;
|
|
188
171
|
}
|
|
@@ -218,11 +201,15 @@ body,
|
|
|
218
201
|
display: flex;
|
|
219
202
|
align-items: center;
|
|
220
203
|
gap: sizes.$spaceCompact;
|
|
204
|
+
flex-wrap: wrap;
|
|
205
|
+
row-gap: sizes.$spaceTight;
|
|
221
206
|
}
|
|
222
207
|
|
|
223
208
|
.breadcrumb__item {
|
|
224
209
|
display: inline-flex;
|
|
225
210
|
align-items: center;
|
|
211
|
+
max-width: 100%;
|
|
212
|
+
overflow-wrap: anywhere;
|
|
226
213
|
&--clickable {
|
|
227
214
|
cursor: pointer;
|
|
228
215
|
}
|
|
@@ -230,7 +217,7 @@ body,
|
|
|
230
217
|
|
|
231
218
|
.breadcrumb__separator {
|
|
232
219
|
color: colors.$borderColor;
|
|
233
|
-
margin: 0
|
|
220
|
+
margin: 0;
|
|
234
221
|
}
|
|
235
222
|
|
|
236
223
|
.breadcrumb__link {
|
|
@@ -402,8 +389,37 @@ body,
|
|
|
402
389
|
top: sizes.$spaceCozy;
|
|
403
390
|
z-index: 5;
|
|
404
391
|
padding-bottom: sizes.$spaceCozy;
|
|
405
|
-
.side-tool {
|
|
406
|
-
width: 100%;
|
|
407
|
-
}
|
|
408
392
|
}
|
|
409
393
|
}
|
|
394
|
+
.screen-preview {
|
|
395
|
+
position: relative;
|
|
396
|
+
width: 100%;
|
|
397
|
+
height: 100%;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// Custom blue/glow cursor while preview mode is enabled
|
|
401
|
+
.screen-preview--preview {
|
|
402
|
+
cursor: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%3E%3Cdefs%3E%3Cfilter%20id='g'%20x='-50%25'%20y='-50%25'%20width='200%25'%20height='200%25'%3E%3CfeDropShadow%20dx='0'%20dy='0'%20stdDeviation='1.6'%20flood-color='%2360a5fa'%20flood-opacity='0.95'/%3E%3C/filter%3E%3C/defs%3E%3Cpath%20filter='url(%23g)'%20d='M6%202%20L6%2022%20L11%2017%20L15%2027%20L18%2026%20L14%2016%20L21%2016%20Z'%20fill='%2360a5fa'%20stroke='%231d4ed8'%20stroke-width='1'/%3E%3C/svg%3E") 6 2,
|
|
403
|
+
pointer;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/* ProjectPage loading overlay */
|
|
407
|
+
.rb-loading-overlay {
|
|
408
|
+
position: absolute;
|
|
409
|
+
inset: 0;
|
|
410
|
+
z-index: 3;
|
|
411
|
+
display: flex;
|
|
412
|
+
align-items: center;
|
|
413
|
+
justify-content: center;
|
|
414
|
+
pointer-events: none;
|
|
415
|
+
background: rgba(255, 255, 255, 0.55);
|
|
416
|
+
backdrop-filter: blur(1px);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.rb-loading {
|
|
420
|
+
position: relative;
|
|
421
|
+
top: -20%;
|
|
422
|
+
width: min(320px, 70vw);
|
|
423
|
+
max-width: 360px;
|
|
424
|
+
opacity: 0.95;
|
|
425
|
+
}
|
|
@@ -81,15 +81,17 @@
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
&__size-grid {
|
|
84
|
-
display:
|
|
84
|
+
display: grid;
|
|
85
85
|
gap: sizes.$spaceCozy;
|
|
86
|
-
|
|
86
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
87
|
+
|
|
88
|
+
@media (max-width: 1400px) {
|
|
89
|
+
grid-template-columns: minmax(0, 1fr);
|
|
90
|
+
}
|
|
87
91
|
}
|
|
88
92
|
|
|
89
93
|
&__size-grid-item {
|
|
90
|
-
|
|
91
|
-
min-width: sizes.$dimensionSizeGridMin;
|
|
92
|
-
max-width: sizes.$dimensionSizeGridMax;
|
|
94
|
+
min-width: 0;
|
|
93
95
|
}
|
|
94
96
|
|
|
95
97
|
&__size-field {
|
|
@@ -113,6 +115,39 @@
|
|
|
113
115
|
line-height: sizes.$controlHeightMd;
|
|
114
116
|
padding-inline: sizes.$spaceSnug;
|
|
115
117
|
}
|
|
118
|
+
|
|
119
|
+
&__mockable {
|
|
120
|
+
margin-bottom: sizes.$spaceComfy;
|
|
121
|
+
padding: sizes.$spaceCozy sizes.$spaceComfy;
|
|
122
|
+
border-radius: sizes.$radiusRounded;
|
|
123
|
+
border: sizes.$borderWidthHairline solid #eee;
|
|
124
|
+
background: #fff;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&__mockable-title {
|
|
128
|
+
margin: 0 0 sizes.$spaceCompact 0;
|
|
129
|
+
font-weight: 700;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&__mockable-table {
|
|
133
|
+
width: 100%;
|
|
134
|
+
border-collapse: collapse;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&__mockable-row + &__mockable-row {
|
|
138
|
+
border-top: sizes.$borderWidthHairline solid #eee;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&__mockable-name {
|
|
142
|
+
padding: sizes.$spaceCompact 0;
|
|
143
|
+
font-weight: 600;
|
|
144
|
+
text-transform: capitalize;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&__mockable-action {
|
|
148
|
+
padding: sizes.$spaceCompact 0;
|
|
149
|
+
text-align: right;
|
|
150
|
+
}
|
|
116
151
|
}
|
|
117
152
|
|
|
118
153
|
.field-info-tooltip {
|
|
@@ -155,8 +190,16 @@
|
|
|
155
190
|
border-radius: sizes.$radiusSoft;
|
|
156
191
|
font-size: sizes.$fontSizeSm;
|
|
157
192
|
line-height: 1.4;
|
|
158
|
-
|
|
193
|
+
// Prevent long descriptions (e.g. URLs or long tokens) from overflowing the tooltip bubble.
|
|
194
|
+
width: min(
|
|
195
|
+
sizes.$dimensionSizeGridMax,
|
|
196
|
+
calc(100vw - (2 * sizes.$spaceComfy))
|
|
197
|
+
);
|
|
159
198
|
text-align: left;
|
|
199
|
+
white-space: normal;
|
|
200
|
+
overflow-wrap: anywhere;
|
|
201
|
+
word-break: break-word;
|
|
202
|
+
hyphens: auto;
|
|
160
203
|
box-shadow: sizes.$shadowTooltip;
|
|
161
204
|
z-index: sizes.$zIndexRaised;
|
|
162
205
|
opacity: 0;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
@use '../foundation/colors';
|
|
2
|
+
|
|
3
|
+
.rb-bottom-bar {
|
|
4
|
+
position: fixed;
|
|
5
|
+
left: 50%;
|
|
6
|
+
transform: translateX(-66%);
|
|
7
|
+
bottom: 10px;
|
|
8
|
+
|
|
9
|
+
height: 50px;
|
|
10
|
+
border-radius: 24px;
|
|
11
|
+
|
|
12
|
+
background-color: #fff;
|
|
13
|
+
color: colors.$textColor;
|
|
14
|
+
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: row;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: flex-start;
|
|
19
|
+
|
|
20
|
+
padding: 0 10px;
|
|
21
|
+
gap: 10px;
|
|
22
|
+
|
|
23
|
+
border: 1px solid rgba(colors.$textColor, 0.06);
|
|
24
|
+
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.rb-bottom-bar__button {
|
|
28
|
+
appearance: none;
|
|
29
|
+
border: none;
|
|
30
|
+
background: transparent;
|
|
31
|
+
padding: 8px;
|
|
32
|
+
/* lighter icon color */
|
|
33
|
+
color: colors.$mutedTextColor;
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
|
|
36
|
+
display: inline-flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.rb-bottom-bar__button.is-active {
|
|
42
|
+
color: colors.$accentColor;
|
|
43
|
+
background: rgba(colors.$accentColor, 0.08);
|
|
44
|
+
box-shadow: 0 0 18px rgba(colors.$accentColor, 0.28);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.rb-bottom-bar__button--preview.is-active {
|
|
48
|
+
// make preview cursor extra obvious
|
|
49
|
+
box-shadow:
|
|
50
|
+
0 0 0 3px rgba(colors.$accentColor, 0.18),
|
|
51
|
+
0 0 26px rgba(colors.$accentColor, 0.35);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.rb-bottom-bar__button:focus-visible {
|
|
55
|
+
outline: none;
|
|
56
|
+
box-shadow:
|
|
57
|
+
0 0 0 3px rgba(colors.$accentColor, 0.18),
|
|
58
|
+
0 0 18px rgba(colors.$accentColor, 0.22);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* border between each tool button */
|
|
62
|
+
.rb-bottom-bar__button + .rb-bottom-bar__button {
|
|
63
|
+
border-left: 1px solid rgba(colors.$textColor, 0.06);
|
|
64
|
+
padding-left: 14px;
|
|
65
|
+
margin-left: 4px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.rb-bottom-bar__button--rtl {
|
|
69
|
+
gap: 6px;
|
|
70
|
+
padding-right: 10px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.rb-bottom-bar__rtl-text {
|
|
74
|
+
font-size: 12px;
|
|
75
|
+
font-weight: 700;
|
|
76
|
+
letter-spacing: 0.3px;
|
|
77
|
+
color: colors.$textColor;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.rb-bottom-bar__spacer {
|
|
81
|
+
flex: 1 1 auto;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.rb-bottom-bar__langs {
|
|
85
|
+
display: inline-flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
gap: 0;
|
|
88
|
+
color: colors.$textColor;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.rb-bottom-bar__lang {
|
|
92
|
+
appearance: none;
|
|
93
|
+
border: none;
|
|
94
|
+
background: transparent;
|
|
95
|
+
padding: 6px 6px;
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
font-size: 12px;
|
|
98
|
+
font-weight: 700;
|
|
99
|
+
text-transform: lowercase;
|
|
100
|
+
color: inherit;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.rb-bottom-bar__lang.is-active {
|
|
104
|
+
color: colors.$accentColor;
|
|
105
|
+
text-shadow: 0 0 12px rgba(colors.$accentColor, 0.25);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* border between each language button */
|
|
109
|
+
.rb-bottom-bar__lang + .rb-bottom-bar__lang {
|
|
110
|
+
border-left: 1px solid rgba(colors.$textColor, 0.06);
|
|
111
|
+
margin-left: 8px;
|
|
112
|
+
padding-left: 14px;
|
|
113
|
+
}
|