@developer_tribe/react-builder 1.0.4 → 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/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/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 +4 -0
- package/dist/build-components/View/ViewProps.generated.d.ts +4 -0
- package/dist/build-components/index.d.ts +10 -1
- package/dist/build-components/patterns.generated.d.ts +4831 -661
- 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/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 +1 -1
- 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 +29 -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/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 +8 -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 +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/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/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 +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 +42 -4
- package/src/build-components/index.ts +55 -10
- package/src/build-components/patterns.generated.ts +4909 -706
- package/src/components/AttributesEditorPanel.tsx +3 -1
- 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 +4 -1
- package/src/components/Icon.generated.tsx +540 -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 +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/index.ts +6 -0
- package/src/pages/ProjectPage.tsx +72 -15
- package/src/pages/tabs/BuilderPanel.tsx +1 -1
- package/src/pages/tabs/SideTool.tsx +3 -10
- 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 +155 -41
- package/src/styles/base/_global.scss +49 -41
- package/src/styles/components/_attributes-editor.scss +40 -5
- package/src/styles/components/_editor-shell.scss +5 -11
- 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/_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 +438 -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/novaToJson.ts +21 -9
- package/src/utils/patterns.ts +62 -3
- package/src/utils/replaceLocalizationParams.ts +15 -0
package/src/AttributesEditor.tsx
CHANGED
|
@@ -20,6 +20,10 @@ import {
|
|
|
20
20
|
import { FieldInfoTooltip } from './attributes-editor/FieldInfoTooltip';
|
|
21
21
|
import type { ViewPropsGenerated } from './build-components/View/ViewProps.generated';
|
|
22
22
|
import useNode from './build-components/useNode';
|
|
23
|
+
import { MockableFeatureModal } from './modals';
|
|
24
|
+
import { Icon } from './components/Icon.generated';
|
|
25
|
+
import { IconPickerModal } from './modals/IconPickerModal';
|
|
26
|
+
import type { IconsType } from './types/Icons';
|
|
23
27
|
|
|
24
28
|
type AttributesEditorProps = {
|
|
25
29
|
node: Node;
|
|
@@ -132,6 +136,13 @@ export function AttributesEditor({
|
|
|
132
136
|
],
|
|
133
137
|
);
|
|
134
138
|
|
|
139
|
+
const patternForType = useMemo(
|
|
140
|
+
() => (data?.type ? getPatternByType(data.type) : undefined),
|
|
141
|
+
[data?.type],
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
const componentMeta = patternForType?.meta;
|
|
145
|
+
|
|
135
146
|
const entries = useMemo(
|
|
136
147
|
() =>
|
|
137
148
|
Object.entries(schema).filter(([, type]) =>
|
|
@@ -140,16 +151,33 @@ export function AttributesEditor({
|
|
|
140
151
|
[schema],
|
|
141
152
|
);
|
|
142
153
|
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
[
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
154
|
+
const visibleEntries = useMemo(() => {
|
|
155
|
+
if (!componentMeta?.hideAllAttributes) return entries;
|
|
156
|
+
return entries.filter(([name]) => {
|
|
157
|
+
const meta = attributeMeta?.[name];
|
|
158
|
+
return meta?.forceVisible === true || meta?.override === true;
|
|
159
|
+
});
|
|
160
|
+
}, [attributeMeta, componentMeta?.hideAllAttributes, entries]);
|
|
149
161
|
|
|
150
162
|
const componentTitle = componentMeta?.label ?? data?.type ?? 'Component';
|
|
151
163
|
const componentDescription = componentMeta?.description;
|
|
152
164
|
|
|
165
|
+
const mockableFeatureKeys = useMemo(() => {
|
|
166
|
+
const mockable = componentMeta?.mockableFeatures;
|
|
167
|
+
if (!mockable || typeof mockable !== 'object') return [];
|
|
168
|
+
return Object.entries(mockable)
|
|
169
|
+
.filter(([, enabled]) => enabled === true)
|
|
170
|
+
.map(([key]) => key)
|
|
171
|
+
.filter((key) => typeof key === 'string' && key.trim().length > 0)
|
|
172
|
+
.sort((a, b) => a.localeCompare(b));
|
|
173
|
+
}, [componentMeta?.mockableFeatures]);
|
|
174
|
+
|
|
175
|
+
const [activeMockableFeature, setActiveMockableFeature] = useState<
|
|
176
|
+
string | null
|
|
177
|
+
>(null);
|
|
178
|
+
|
|
179
|
+
const [activeIconField, setActiveIconField] = useState<string | null>(null);
|
|
180
|
+
|
|
153
181
|
const headerSection = (
|
|
154
182
|
<div className="attributes-editor__component-meta">
|
|
155
183
|
<p className="attributes-editor__component-title">{componentTitle}</p>
|
|
@@ -161,6 +189,31 @@ export function AttributesEditor({
|
|
|
161
189
|
</div>
|
|
162
190
|
);
|
|
163
191
|
|
|
192
|
+
const mockableSection =
|
|
193
|
+
mockableFeatureKeys.length > 0 ? (
|
|
194
|
+
<section className="attributes-editor__mockable">
|
|
195
|
+
<p className="attributes-editor__mockable-title">Mockable</p>
|
|
196
|
+
<table className="attributes-editor__mockable-table">
|
|
197
|
+
<tbody>
|
|
198
|
+
{mockableFeatureKeys.map((key) => (
|
|
199
|
+
<tr key={key} className="attributes-editor__mockable-row">
|
|
200
|
+
<td className="attributes-editor__mockable-name">{key}</td>
|
|
201
|
+
<td className="attributes-editor__mockable-action">
|
|
202
|
+
<button
|
|
203
|
+
type="button"
|
|
204
|
+
className="editor-button"
|
|
205
|
+
onClick={() => setActiveMockableFeature(key)}
|
|
206
|
+
>
|
|
207
|
+
{key}
|
|
208
|
+
</button>
|
|
209
|
+
</td>
|
|
210
|
+
</tr>
|
|
211
|
+
))}
|
|
212
|
+
</tbody>
|
|
213
|
+
</table>
|
|
214
|
+
</section>
|
|
215
|
+
) : null;
|
|
216
|
+
|
|
164
217
|
const { grouped, specialGroups } = useMemo(() => {
|
|
165
218
|
const groups: Record<TabId, SchemaEntry[]> = {
|
|
166
219
|
style: [],
|
|
@@ -176,7 +229,7 @@ export function AttributesEditor({
|
|
|
176
229
|
return order !== 0 ? order : a.name.localeCompare(b.name);
|
|
177
230
|
};
|
|
178
231
|
|
|
179
|
-
|
|
232
|
+
visibleEntries.forEach(([name, type]) => {
|
|
180
233
|
const meta = attributeMeta?.[name];
|
|
181
234
|
const specialCategory = meta?.specialCategory;
|
|
182
235
|
if (typeof specialCategory === 'string') {
|
|
@@ -209,7 +262,7 @@ export function AttributesEditor({
|
|
|
209
262
|
});
|
|
210
263
|
|
|
211
264
|
return { grouped: groups, specialGroups: specials };
|
|
212
|
-
}, [attributeMeta,
|
|
265
|
+
}, [attributeMeta, visibleEntries]);
|
|
213
266
|
|
|
214
267
|
const specialSectionsByTab = useMemo<Record<TabId, SpecialSection[]>>(() => {
|
|
215
268
|
const buckets: Record<TabId, SpecialSection[]> = {
|
|
@@ -263,6 +316,59 @@ export function AttributesEditor({
|
|
|
263
316
|
[baseData, onChange],
|
|
264
317
|
);
|
|
265
318
|
|
|
319
|
+
const renderIconTypeField = useCallback(
|
|
320
|
+
(name: string, currentValue: unknown) => {
|
|
321
|
+
const normalized =
|
|
322
|
+
typeof currentValue === 'string'
|
|
323
|
+
? (currentValue as IconsType)
|
|
324
|
+
: undefined;
|
|
325
|
+
return (
|
|
326
|
+
<>
|
|
327
|
+
<button
|
|
328
|
+
type="button"
|
|
329
|
+
onClick={() => setActiveIconField(name)}
|
|
330
|
+
style={{
|
|
331
|
+
width: '100%',
|
|
332
|
+
display: 'flex',
|
|
333
|
+
alignItems: 'center',
|
|
334
|
+
justifyContent: 'space-between',
|
|
335
|
+
gap: 8,
|
|
336
|
+
borderRadius: 6,
|
|
337
|
+
border: '1px solid #ddd',
|
|
338
|
+
padding: '8px 10px',
|
|
339
|
+
background: '#fff',
|
|
340
|
+
cursor: 'pointer',
|
|
341
|
+
}}
|
|
342
|
+
>
|
|
343
|
+
<span style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
|
|
344
|
+
{normalized ? <Icon iconType={normalized} size={18} /> : null}
|
|
345
|
+
<span style={{ fontWeight: 500 }}>
|
|
346
|
+
{normalized ?? 'Select icon'}
|
|
347
|
+
</span>
|
|
348
|
+
</span>
|
|
349
|
+
<span style={{ fontSize: 12, color: '#666' }}>Open</span>
|
|
350
|
+
</button>
|
|
351
|
+
|
|
352
|
+
{activeIconField === name ? (
|
|
353
|
+
<IconPickerModal
|
|
354
|
+
value={normalized}
|
|
355
|
+
onSelect={(iconName) => {
|
|
356
|
+
handleAttributeChange(name, iconName);
|
|
357
|
+
setActiveIconField(null);
|
|
358
|
+
}}
|
|
359
|
+
onClose={() => setActiveIconField(null)}
|
|
360
|
+
onClear={() => {
|
|
361
|
+
handleAttributeChange(name, undefined);
|
|
362
|
+
setActiveIconField(null);
|
|
363
|
+
}}
|
|
364
|
+
/>
|
|
365
|
+
) : null}
|
|
366
|
+
</>
|
|
367
|
+
);
|
|
368
|
+
},
|
|
369
|
+
[activeIconField, handleAttributeChange],
|
|
370
|
+
);
|
|
371
|
+
|
|
266
372
|
const handleChildrenChange = useCallback(
|
|
267
373
|
(val: string) => {
|
|
268
374
|
const next: NodeData<NodeDefaultAttribute> = {
|
|
@@ -282,6 +388,21 @@ export function AttributesEditor({
|
|
|
282
388
|
? meta.label
|
|
283
389
|
: key.charAt(0).toUpperCase() + key.slice(1);
|
|
284
390
|
const normalizedDescription = meta?.description;
|
|
391
|
+
const orderedEntries = [...sectionEntries].sort((a, b) => {
|
|
392
|
+
const preferredOrder = [
|
|
393
|
+
'width',
|
|
394
|
+
'height',
|
|
395
|
+
'minWidth',
|
|
396
|
+
'minHeight',
|
|
397
|
+
'maxWidth',
|
|
398
|
+
'maxHeight',
|
|
399
|
+
];
|
|
400
|
+
const aIndex = preferredOrder.indexOf(a.name);
|
|
401
|
+
const bIndex = preferredOrder.indexOf(b.name);
|
|
402
|
+
const aRank = aIndex === -1 ? Number.MAX_SAFE_INTEGER : aIndex;
|
|
403
|
+
const bRank = bIndex === -1 ? Number.MAX_SAFE_INTEGER : bIndex;
|
|
404
|
+
return aRank !== bRank ? aRank - bRank : a.name.localeCompare(b.name);
|
|
405
|
+
});
|
|
285
406
|
return (
|
|
286
407
|
<section key={key} className="special-category-section">
|
|
287
408
|
<div className="special-category-section__header">
|
|
@@ -295,7 +416,7 @@ export function AttributesEditor({
|
|
|
295
416
|
</p>
|
|
296
417
|
) : null}
|
|
297
418
|
<div className="attributes-editor__size-grid">
|
|
298
|
-
{
|
|
419
|
+
{orderedEntries.map(({ name, type }) => {
|
|
299
420
|
const label = attributeMeta?.[name]?.label ?? name;
|
|
300
421
|
const description = attributeMeta?.[name]?.description;
|
|
301
422
|
const preferredScale = toPreferredScale(
|
|
@@ -321,18 +442,22 @@ export function AttributesEditor({
|
|
|
321
442
|
{label}
|
|
322
443
|
</p>
|
|
323
444
|
) : null}
|
|
324
|
-
|
|
325
|
-
name
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
445
|
+
{type === 'iconType' ? (
|
|
446
|
+
renderIconTypeField(name, currentValue)
|
|
447
|
+
) : (
|
|
448
|
+
<Field
|
|
449
|
+
name={name}
|
|
450
|
+
type={type}
|
|
451
|
+
value={currentValue}
|
|
452
|
+
onChange={(val) => handleAttributeChange(name, val)}
|
|
453
|
+
componentType={data?.type}
|
|
454
|
+
projectColors={projectColorsForPicker}
|
|
455
|
+
layoutContext={layoutContext}
|
|
456
|
+
viewAttributes={viewAttributes}
|
|
457
|
+
label={isBoolean ? label : undefined}
|
|
458
|
+
preferredScale={preferredScale}
|
|
459
|
+
/>
|
|
460
|
+
)}
|
|
336
461
|
</div>
|
|
337
462
|
</FieldInfoTooltip>
|
|
338
463
|
);
|
|
@@ -364,6 +489,7 @@ export function AttributesEditor({
|
|
|
364
489
|
handleAttributeChange,
|
|
365
490
|
layoutContext,
|
|
366
491
|
projectColorsForPicker,
|
|
492
|
+
renderIconTypeField,
|
|
367
493
|
viewAttributes,
|
|
368
494
|
],
|
|
369
495
|
);
|
|
@@ -476,16 +602,23 @@ export function AttributesEditor({
|
|
|
476
602
|
</div>
|
|
477
603
|
);
|
|
478
604
|
|
|
479
|
-
if (
|
|
605
|
+
if (visibleEntries.length === 0) {
|
|
480
606
|
return (
|
|
481
607
|
<div className="attributes-editor">
|
|
482
608
|
{headerSection}
|
|
609
|
+
{mockableSection}
|
|
483
610
|
{tabsSection}
|
|
484
611
|
{childrenSection}
|
|
485
612
|
{activeSpecialSections.map(renderSpecialSection)}
|
|
486
613
|
<div className="attributes-editor__empty-state">
|
|
487
614
|
No editable attributes
|
|
488
615
|
</div>
|
|
616
|
+
{activeMockableFeature ? (
|
|
617
|
+
<MockableFeatureModal
|
|
618
|
+
featureKey={activeMockableFeature}
|
|
619
|
+
onClose={() => setActiveMockableFeature(null)}
|
|
620
|
+
/>
|
|
621
|
+
) : null}
|
|
489
622
|
</div>
|
|
490
623
|
);
|
|
491
624
|
}
|
|
@@ -493,6 +626,7 @@ export function AttributesEditor({
|
|
|
493
626
|
return (
|
|
494
627
|
<div className="attributes-editor">
|
|
495
628
|
{headerSection}
|
|
629
|
+
{mockableSection}
|
|
496
630
|
{tabsSection}
|
|
497
631
|
{childrenSection}
|
|
498
632
|
{activeSpecialSections.map(renderSpecialSection)}
|
|
@@ -516,22 +650,32 @@ export function AttributesEditor({
|
|
|
516
650
|
{!isBoolean ? (
|
|
517
651
|
<p className="attributes-editor__field-label">{label}</p>
|
|
518
652
|
) : null}
|
|
519
|
-
|
|
520
|
-
name
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
653
|
+
{type === 'iconType' ? (
|
|
654
|
+
renderIconTypeField(name, attributes?.[name])
|
|
655
|
+
) : (
|
|
656
|
+
<Field
|
|
657
|
+
name={name}
|
|
658
|
+
type={type}
|
|
659
|
+
value={attributes?.[name]}
|
|
660
|
+
onChange={(val) => handleAttributeChange(name, val)}
|
|
661
|
+
componentType={data?.type}
|
|
662
|
+
projectColors={projectColorsForPicker}
|
|
663
|
+
layoutContext={layoutContext}
|
|
664
|
+
viewAttributes={viewAttributes}
|
|
665
|
+
label={isBoolean ? label : undefined}
|
|
666
|
+
preferredScale={preferredScale}
|
|
667
|
+
/>
|
|
668
|
+
)}
|
|
531
669
|
</div>
|
|
532
670
|
</FieldInfoTooltip>
|
|
533
671
|
);
|
|
534
672
|
})}
|
|
673
|
+
{activeMockableFeature ? (
|
|
674
|
+
<MockableFeatureModal
|
|
675
|
+
featureKey={activeMockableFeature}
|
|
676
|
+
onClose={() => setActiveMockableFeature(null)}
|
|
677
|
+
/>
|
|
678
|
+
) : null}
|
|
535
679
|
</div>
|
|
536
680
|
);
|
|
537
681
|
}
|
package/src/DeviceMockFrame.tsx
CHANGED
|
@@ -43,50 +43,48 @@ export function DeviceMockFrame({ children, appName }: DeviceMockFrameProps) {
|
|
|
43
43
|
const navBarColor = isDark ? 'rgb(0, 0, 0)' : 'rgb(255, 255, 255)';
|
|
44
44
|
|
|
45
45
|
return (
|
|
46
|
-
<div
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
appConfig.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
appConfig.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
46
|
+
<div
|
|
47
|
+
className="stage"
|
|
48
|
+
style={{
|
|
49
|
+
width: device.width,
|
|
50
|
+
height: device.height,
|
|
51
|
+
minWidth: device.width,
|
|
52
|
+
maxWidth: device.width,
|
|
53
|
+
minHeight: device.height,
|
|
54
|
+
maxHeight: device.height,
|
|
55
|
+
overflow: 'hidden',
|
|
56
|
+
position: 'relative',
|
|
57
|
+
padding: 4,
|
|
58
|
+
direction: appConfig.isRtl ? 'rtl' : 'ltr',
|
|
59
|
+
backgroundColor:
|
|
60
|
+
appConfig.theme === 'dark'
|
|
61
|
+
? appConfig.screenStyle.dark.backgroundColor
|
|
62
|
+
: appConfig.screenStyle.light.backgroundColor,
|
|
63
|
+
color:
|
|
64
|
+
appConfig.theme === 'dark'
|
|
65
|
+
? appConfig.screenStyle.dark.color
|
|
66
|
+
: appConfig.screenStyle.light.color,
|
|
67
|
+
display: 'flex',
|
|
68
|
+
flexDirection: 'column',
|
|
69
|
+
borderRadius: device.radius ?? 0,
|
|
70
|
+
}}
|
|
71
|
+
>
|
|
72
|
+
<MockOSProvider
|
|
73
|
+
appName={appName}
|
|
74
|
+
statusBarHeight={statusBarHeight}
|
|
75
|
+
statusBarBackgroundColor={statusBarColor}
|
|
76
|
+
statusBarPlatform={device.platform}
|
|
77
|
+
statusBarIsDark={isDark}
|
|
78
|
+
navBarHeight={navBarHeight}
|
|
79
|
+
navBarBackgroundColor={navBarColor}
|
|
80
|
+
navBarPlatform={device.platform}
|
|
81
|
+
navBarNavigationBarType={device.navigationBarType}
|
|
82
|
+
navBarIsDark={isDark}
|
|
83
|
+
insetLeft={insetLeft}
|
|
84
|
+
insetRight={insetRight}
|
|
72
85
|
>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
statusBarHeight={statusBarHeight}
|
|
76
|
-
statusBarBackgroundColor={statusBarColor}
|
|
77
|
-
statusBarPlatform={device.platform}
|
|
78
|
-
statusBarIsDark={isDark}
|
|
79
|
-
navBarHeight={navBarHeight}
|
|
80
|
-
navBarBackgroundColor={navBarColor}
|
|
81
|
-
navBarPlatform={device.platform}
|
|
82
|
-
navBarNavigationBarType={device.navigationBarType}
|
|
83
|
-
navBarIsDark={isDark}
|
|
84
|
-
insetLeft={insetLeft}
|
|
85
|
-
insetRight={insetRight}
|
|
86
|
-
>
|
|
87
|
-
{children}
|
|
88
|
-
</MockOSProvider>
|
|
89
|
-
</div>
|
|
86
|
+
{children}
|
|
87
|
+
</MockOSProvider>
|
|
90
88
|
</div>
|
|
91
89
|
);
|
|
92
90
|
}
|
package/src/RenderPage.tsx
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { useEffect, useRef } from 'react';
|
|
2
2
|
import { DeviceMockFrame } from './DeviceMockFrame';
|
|
3
|
-
import { Node
|
|
3
|
+
import { Node } from './types/Node';
|
|
4
4
|
import { RenderNode } from './build-components';
|
|
5
5
|
import { useRenderStore } from './store';
|
|
6
6
|
import { useLogRender } from './utils/useLogRender';
|
|
7
|
+
import { findNodeByKeyNested } from './utils/findNodeByKeyNested';
|
|
7
8
|
export type ScreenStyle = {
|
|
8
9
|
light: { backgroundColor: string; color: string; seperatorColor?: string };
|
|
9
10
|
dark: { backgroundColor: string; color: string; seperatorColor?: string };
|
|
@@ -14,51 +15,16 @@ interface RenderPageProps {
|
|
|
14
15
|
onSelectNode?: (node: Node | null) => void;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
function findNodeByKeyNested(node: Node, key: string): Node | null {
|
|
18
|
-
if (node === null || node === undefined) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (typeof node === 'string') {
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (Array.isArray(node)) {
|
|
27
|
-
for (const child of node) {
|
|
28
|
-
const found = findNodeByKeyNested(child, key);
|
|
29
|
-
if (found) {
|
|
30
|
-
return found;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const recordData = node as NodeData;
|
|
37
|
-
if (recordData.key === key) {
|
|
38
|
-
return recordData;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (recordData.children) {
|
|
42
|
-
return findNodeByKeyNested(recordData.children as Node, key);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
18
|
export function RenderPage({ data, name, onSelectNode }: RenderPageProps) {
|
|
49
19
|
useLogRender('RenderPage');
|
|
50
|
-
const {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
setCurrent: s.setCurrent,
|
|
56
|
-
}),
|
|
57
|
-
);
|
|
20
|
+
const { previewMode, forceRender, setCurrent } = useRenderStore((s) => ({
|
|
21
|
+
previewMode: s.previewMode,
|
|
22
|
+
forceRender: s.forceRender,
|
|
23
|
+
setCurrent: s.setCurrent,
|
|
24
|
+
}));
|
|
58
25
|
const previewRootRef = useRef<HTMLDivElement | null>(null);
|
|
59
26
|
|
|
60
27
|
useEffect(() => {
|
|
61
|
-
console.log('previewMode!!!', previewMode);
|
|
62
28
|
if (!previewMode) {
|
|
63
29
|
return;
|
|
64
30
|
}
|
|
@@ -94,16 +60,9 @@ export function RenderPage({ data, name, onSelectNode }: RenderPageProps) {
|
|
|
94
60
|
};
|
|
95
61
|
}, [previewMode, data, onSelectNode, setCurrent, forceRender]); // forceRender: retrigger effect when we want to force a refresh (e.g. route change)
|
|
96
62
|
|
|
97
|
-
const screenPreviewHeight = 800;
|
|
98
|
-
// The calculation is correct for maintaining the aspect ratio of the target screen size.
|
|
99
|
-
// It scales the width proportionally to a fixed preview height.
|
|
100
|
-
// width = (previewHeight * targetWidth) / targetHeight
|
|
101
|
-
const height = screenPreviewHeight;
|
|
102
|
-
const width = (height * device.width) / device.height;
|
|
103
|
-
|
|
104
63
|
return (
|
|
105
64
|
<DeviceMockFrame appName={name}>
|
|
106
|
-
<div ref={previewRootRef}>
|
|
65
|
+
<div className="screen-preview" ref={previewRootRef}>
|
|
107
66
|
<RenderNode node={data} />
|
|
108
67
|
</div>
|
|
109
68
|
</DeviceMockFrame>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Embeded Paywall": {
|
|
3
|
+
"unlimited_access": true,
|
|
4
|
+
"trial_days": 7,
|
|
5
|
+
"headline": "Unlock everything"
|
|
6
|
+
},
|
|
7
|
+
"basic": {
|
|
8
|
+
"unlimited_access": true,
|
|
9
|
+
"trial_days": 7,
|
|
10
|
+
"headline": "Unlock everything"
|
|
11
|
+
},
|
|
12
|
+
"vpn": {
|
|
13
|
+
"secure_connection": true,
|
|
14
|
+
"no_logs": true,
|
|
15
|
+
"locations": 120,
|
|
16
|
+
"headline": "Private & fast VPN"
|
|
17
|
+
},
|
|
18
|
+
"pro": {
|
|
19
|
+
"remove_ads": true,
|
|
20
|
+
"priority_support": true,
|
|
21
|
+
"devices": 5,
|
|
22
|
+
"headline": "Go Pro"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" stroke="black" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M15.5 11.5H14.5L13 14.5L11 8.5L9.5 11.5H8.5M11.9932 5.13581C9.9938 2.7984 6.65975 2.16964 4.15469 4.31001C1.64964 6.45038 1.29697 10.029 3.2642 12.5604C4.75009 14.4724 8.97129 18.311 10.948 20.0749C11.3114 20.3991 11.4931 20.5613 11.7058 20.6251C11.8905 20.6805 12.0958 20.6805 12.2805 20.6251C12.4932 20.5613 12.6749 20.3991 13.0383 20.0749C15.015 18.311 19.2362 14.4724 20.7221 12.5604C22.6893 10.029 22.3797 6.42787 19.8316 4.31001C17.2835 2.19216 13.9925 2.7984 11.9932 5.13581Z" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" stroke="black" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M5.41667 10.5605H10V15.1367M1.75917 10.5605H1.75M6.3425 15.1367H6.33333M10.0092 18.7976H10M18.2592 10.5605H18.25M1.75 15.1367H3.125M13.2083 10.5605H15.0417M1.75 18.7976H6.33333M10 1.4082V6.8996M15.1333 18.7976H16.7833C17.2967 18.7976 17.5534 18.7976 17.7495 18.6979C17.922 18.6101 18.0622 18.4701 18.1501 18.2979C18.25 18.1021 18.25 17.8458 18.25 17.3333V15.6858C18.25 15.1733 18.25 14.917 18.1501 14.7212C18.0622 14.549 17.922 14.409 17.7495 14.3212C17.5534 14.2215 17.2967 14.2215 16.7833 14.2215H15.1333C14.62 14.2215 14.3633 14.2215 14.1672 14.3212C13.9947 14.409 13.8545 14.549 13.7666 14.7212C13.6667 14.917 13.6667 15.1733 13.6667 15.6858V17.3333C13.6667 17.8458 13.6667 18.1021 13.7666 18.2979C13.8545 18.4701 13.9947 18.6101 14.1672 18.6979C14.3633 18.7976 14.62 18.7976 15.1333 18.7976ZM15.1333 6.8996H16.7833C17.2967 6.8996 17.5534 6.8996 17.7495 6.79985C17.922 6.7121 18.0622 6.57209 18.1501 6.39988C18.25 6.2041 18.25 5.94781 18.25 5.43523V3.78781C18.25 3.27523 18.25 3.01894 18.1501 2.82316C18.0622 2.65095 17.922 2.51094 17.7495 2.42319C17.5534 2.32344 17.2967 2.32344 16.7833 2.32344H15.1333C14.62 2.32344 14.3633 2.32344 14.1672 2.42319C13.9947 2.51094 13.8545 2.65095 13.7666 2.82316C13.6667 3.01894 13.6667 3.27523 13.6667 3.78781V5.43523C13.6667 5.94781 13.6667 6.2041 13.7666 6.39988C13.8545 6.57209 13.9947 6.7121 14.1672 6.79985C14.3633 6.8996 14.62 6.8996 15.1333 6.8996ZM3.21667 6.8996H4.86667C5.38005 6.8996 5.63674 6.8996 5.83282 6.79985C6.00531 6.7121 6.14554 6.57209 6.23342 6.39988C6.33333 6.2041 6.33333 5.94781 6.33333 5.43523V3.78781C6.33333 3.27523 6.33333 3.01894 6.23342 2.82316C6.14554 2.65095 6.00531 2.51094 5.83282 2.42319C5.63674 2.32344 5.38005 2.32344 4.86667 2.32344H3.21667C2.70329 2.32344 2.44659 2.32344 2.25051 2.42319C2.07803 2.51094 1.93779 2.65095 1.84991 2.82316C1.75 3.01894 1.75 3.27523 1.75 3.78781V5.43523C1.75 5.94781 1.75 6.2041 1.84991 6.39988C1.93779 6.57209 2.07803 6.7121 2.25051 6.79985C2.44659 6.8996 2.70329 6.8996 3.21667 6.8996Z" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="black" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM12 7C12.5523 7 13 7.44772 13 8V13C13 13.5523 12.5523 14 12 14C11.4477 14 11 13.5523 11 13V8C11 7.44772 11.4477 7 12 7ZM13 16C13 15.4477 12.5523 15 12 15C11.4477 15 11 15.4477 11 16V16.0001C11 16.5524 11.4477 17.0001 12 17.0001C12.5523 17.0001 13 16.5524 13 16.0001V16Z" />
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="21" viewBox="0 0 24 21" stroke="black" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M11.9998 7.99999V12M11.9998 16H12.0098M10.6151 2.89171L2.39019 17.0983C1.93398 17.8863 1.70588 18.2803 1.73959 18.6037C1.769 18.8857 1.91677 19.142 2.14613 19.3088C2.40908 19.5 2.86435 19.5 3.77487 19.5H20.2246C21.1352 19.5 21.5904 19.5 21.8534 19.3088C22.0827 19.142 22.2305 18.8857 22.2599 18.6037C22.2936 18.2803 22.0655 17.8863 21.6093 17.0983L13.3844 2.89171C12.9299 2.10654 12.7026 1.71396 12.4061 1.58211C12.1474 1.4671 11.8521 1.4671 11.5935 1.58211C11.2969 1.71396 11.0696 2.10655 10.6151 2.89171Z" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" stroke="black" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M12 8C13.6569 8 15 6.65685 15 5C15 3.34315 13.6569 2 12 2C10.3431 2 9 3.34315 9 5C9 6.65685 10.3431 8 12 8ZM12 8V22M12 22C9.34784 22 6.8043 20.9464 4.92893 19.0711C3.05357 17.1957 2 14.6522 2 12H5M12 22C14.6522 22 17.1957 20.9464 19.0711 19.0711C20.9464 17.1957 22 14.6522 22 12H19" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" stroke="black" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M4 7.9966C3.83599 7.99236 3.7169 7.98287 3.60982 7.96157C2.81644 7.80376 2.19624 7.18356 2.03843 6.39018C2 6.19698 2 5.96466 2 5.5C2 5.03534 2 4.80302 2.03843 4.60982C2.19624 3.81644 2.81644 3.19624 3.60982 3.03843C3.80302 3 4.03534 3 4.5 3H19.5C19.9647 3 20.197 3 20.3902 3.03843C21.1836 3.19624 21.8038 3.81644 21.9616 4.60982C22 4.80302 22 5.03534 22 5.5C22 5.96466 22 6.19698 21.9616 6.39018C21.8038 7.18356 21.1836 7.80376 20.3902 7.96157C20.2831 7.98287 20.164 7.99236 20 7.9966M10 13H14M4 8H20V16.2C20 17.8802 20 18.7202 19.673 19.362C19.3854 19.9265 18.9265 20.3854 18.362 20.673C17.7202 21 16.8802 21 15.2 21H8.8C7.11984 21 6.27976 21 5.63803 20.673C5.07354 20.3854 4.6146 19.9265 4.32698 19.362C4 18.7202 4 17.8802 4 16.2V8Z" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M12.0253 15.6833C11.8669 15.6833 11.7086 15.625 11.5836 15.5C11.3419 15.2583 11.3419 14.8583 11.5836 14.6167L16.2003 9.99999L11.5836 5.38332C11.3419 5.14166 11.3419 4.74166 11.5836 4.49999C11.8253 4.25832 12.2253 4.25832 12.4669 4.49999L17.5253 9.55833C17.7669 9.79999 17.7669 10.2 17.5253 10.4417L12.4669 15.5C12.3419 15.625 12.1836 15.6833 12.0253 15.6833Z" fill="#EC9A39"/>
|
|
3
|
+
<path d="M16.9415 10.625H2.9165C2.57484 10.625 2.2915 10.3417 2.2915 10C2.2915 9.65833 2.57484 9.375 2.9165 9.375H16.9415C17.2832 9.375 17.5665 9.65833 17.5665 10C17.5665 10.3417 17.2832 10.625 16.9415 10.625Z" fill="#EC9A39"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="vuesax/outline/arrow-right">
|
|
3
|
+
<g id="arrow-right">
|
|
4
|
+
<path id="Vector" d="M8.90998 20.67C8.71998 20.67 8.52998 20.6 8.37998 20.45C8.08998 20.16 8.08998 19.68 8.37998 19.39L14.9 12.87C15.38 12.39 15.38 11.61 14.9 11.13L8.37998 4.61002C8.08998 4.32002 8.08998 3.84002 8.37998 3.55002C8.66998 3.26002 9.14998 3.26002 9.43998 3.55002L15.96 10.07C16.47 10.58 16.76 11.27 16.76 12C16.76 12.73 16.48 13.42 15.96 13.93L9.43998 20.45C9.28998 20.59 9.09998 20.67 8.90998 20.67Z" fill=""/>
|
|
5
|
+
</g>
|
|
6
|
+
</g>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" stroke="black" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M16 7.99999V13C16 13.7956 16.3161 14.5587 16.8787 15.1213C17.4413 15.6839 18.2044 16 19 16C19.7957 16 20.5587 15.6839 21.1213 15.1213C21.6839 14.5587 22 13.7956 22 13V12C21.9999 9.74302 21.2362 7.55247 19.8333 5.78452C18.4303 4.01658 16.4706 2.77521 14.2726 2.26229C12.0747 1.74936 9.76794 1.99503 7.72736 2.95936C5.68677 3.92368 4.03241 5.54995 3.03327 7.57371C2.03413 9.59748 1.74898 11.8997 2.22418 14.1061C2.69938 16.3125 3.90699 18.2932 5.65064 19.7263C7.39429 21.1593 9.57144 21.9603 11.8281 21.9991C14.0847 22.0379 16.2881 21.3122 18.08 19.94M16 12C16 14.2091 14.2092 16 12 16C9.79087 16 8.00001 14.2091 8.00001 12C8.00001 9.79085 9.79087 7.99999 12 7.99999C14.2092 7.99999 16 9.79085 16 12Z" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M17.8104 5.49V6.23L14.2704 4.18C12.9304 3.41 11.0604 3.41 9.73043 4.18L6.19043 6.24V5.49C6.19043 3.24 7.42043 2 9.67043 2H14.3304C16.5804 2 17.8104 3.24 17.8104 5.49Z" fill="#FFA54B"/>
|
|
3
|
+
<path d="M17.84 7.97023L17.7 7.90023L16.34 7.12023L13.52 5.49023C12.66 4.99023 11.34 4.99023 10.48 5.49023L7.66 7.11023L6.3 7.91023L6.12 8.00023C4.37 9.18023 4.25 9.40023 4.25 11.2902V15.8102C4.25 17.7002 4.37 17.9202 6.16 19.1302L10.48 21.6202C10.91 21.8802 11.45 21.9902 12 21.9902C12.54 21.9902 13.09 21.8702 13.52 21.6202L17.88 19.1002C19.64 17.9202 19.75 17.7102 19.75 15.8102V11.2902C19.75 9.40023 19.63 9.18023 17.84 7.97023ZM14.79 13.5002L14.18 14.2502C14.08 14.3602 14.01 14.5702 14.02 14.7202L14.08 15.6802C14.12 16.2702 13.7 16.5702 13.15 16.3602L12.26 16.0002C12.12 15.9502 11.89 15.9502 11.75 16.0002L10.86 16.3502C10.31 16.5702 9.89 16.2602 9.93 15.6702L9.99 14.7102C10 14.5602 9.93 14.3502 9.83 14.2402L9.21 13.5002C8.83 13.0502 9 12.5502 9.57 12.4002L10.5 12.1602C10.65 12.1202 10.82 11.9802 10.9 11.8602L11.42 11.0602C11.74 10.5602 12.25 10.5602 12.58 11.0602L13.1 11.8602C13.18 11.9902 13.36 12.1202 13.5 12.1602L14.43 12.4002C15 12.5502 15.17 13.0502 14.79 13.5002Z" fill="#FFA54B"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="#000" stroke="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M20.5 15.25C20.09 15.25 19.75 14.91 19.75 14.5C19.75 14.09 20.09 13.75 20.5 13.75C21.09 13.75 21.22 13.66 21.23 13.66C21.25 13.6 21.25 13.25 21.25 13V11C21.25 10.75 21.25 10.41 21.21 10.32C21.2 10.33 21.05 10.25 20.5 10.25C20.09 10.25 19.75 9.91 19.75 9.5C19.75 9.09 20.09 8.75 20.5 8.75C22.58 8.75 22.75 9.77 22.75 11V13C22.75 14.23 22.58 15.25 20.5 15.25Z" />
|
|
3
|
+
<path d="M10 16.75C9.83001 16.75 9.65001 16.69 9.51001 16.57C9.20001 16.3 9.16001 15.83 9.43001 15.51L11.51 13.08C11.54 12.99 11.51 12.91 11.49 12.87C11.46 12.82 11.4 12.75 11.27 12.75H8.97001C8.34001 12.75 7.77001 12.42 7.45001 11.88C7.13001 11.34 7.13001 10.68 7.45001 10.13L9.40001 7.55003C9.65001 7.22003 10.12 7.15003 10.45 7.40003C10.78 7.65003 10.85 8.12003 10.6 8.45003L8.71001 10.95C8.70001 10.98 8.74001 11.07 8.76001 11.12C8.79001 11.17 8.85001 11.24 8.98001 11.24H11.28C11.91 11.24 12.48 11.57 12.8 12.11C13.12 12.65 13.12 13.31 12.8 13.86C12.78 13.9 12.75 13.94 12.72 13.97L10.58 16.47C10.42 16.66 10.21 16.75 10 16.75Z" />
|
|
4
|
+
<path d="M7 19.75C2.59 19.75 1.25 18.41 1.25 14V10C1.25 5.59 2.59 4.25 7 4.25C7.41 4.25 7.75 4.59 7.75 5C7.75 5.41 7.41 5.75 7 5.75C3.43 5.75 2.75 6.43 2.75 10V14C2.75 17.57 3.43 18.25 7 18.25C7.41 18.25 7.75 18.59 7.75 19C7.75 19.41 7.41 19.75 7 19.75Z" />
|
|
5
|
+
<path d="M13 19.75C12.59 19.75 12.25 19.41 12.25 19C12.25 18.59 12.59 18.25 13 18.25C16.57 18.25 17.25 17.57 17.25 14V10C17.25 6.43 16.57 5.75 13 5.75C12.59 5.75 12.25 5.41 12.25 5C12.25 4.59 12.59 4.25 13 4.25C17.41 4.25 18.75 5.59 18.75 10V14C18.75 18.41 17.41 19.75 13 19.75Z" />
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="bell-01">
|
|
3
|
+
<path id="Icon" d="M9.35493 21C10.0601 21.6224 10.9863 22 12.0008 22C13.0152 22 13.9414 21.6224 14.6466 21M18.0008 8C18.0008 6.4087 17.3686 4.88258 16.2434 3.75736C15.1182 2.63214 13.5921 2 12.0008 2C10.4095 2 8.88333 2.63214 7.75811 3.75736C6.63289 4.88258 6.00075 6.4087 6.00075 8C6.00075 11.0902 5.22122 13.206 4.35042 14.6054C3.61588 15.7859 3.24861 16.3761 3.26208 16.5408C3.27699 16.7231 3.31561 16.7926 3.46253 16.9016C3.59521 17 4.19334 17 5.38961 17H18.6119C19.8082 17 20.4063 17 20.539 16.9016C20.6859 16.7926 20.7245 16.7231 20.7394 16.5408C20.7529 16.3761 20.3856 15.7859 19.6511 14.6054C18.7803 13.206 18.0008 11.0902 18.0008 8Z" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" stroke="#000" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path id="Icon" d="M13.9998 21H9.99977M17.9998 8C17.9998 6.4087 17.3676 4.88258 16.2424 3.75736C15.1172 2.63214 13.5911 2 11.9998 2C10.4085 2 8.88235 2.63214 7.75713 3.75736C6.63192 4.88258 5.99977 6.4087 5.99977 8C5.99977 11.0902 5.22024 13.206 4.34944 14.6054C3.6149 15.7859 3.24763 16.3761 3.2611 16.5408C3.27601 16.7231 3.31463 16.7926 3.46155 16.9016C3.59423 17 4.19237 17 5.38863 17H18.6109C19.8072 17 20.4053 17 20.538 16.9016C20.6849 16.7926 20.7235 16.7231 20.7384 16.5408C20.7519 16.3761 20.3846 15.7859 19.6501 14.6054C18.7793 13.206 17.9998 11.0902 17.9998 8Z" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
</svg>
|