@finsweet/webflow-apps-utils 1.0.1
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 +45 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/router/Link.svelte +166 -0
- package/dist/router/Link.svelte.d.ts +26 -0
- package/dist/router/README.md +397 -0
- package/dist/router/Route.svelte +82 -0
- package/dist/router/Route.svelte.d.ts +24 -0
- package/dist/router/Router.svelte +71 -0
- package/dist/router/Router.svelte.d.ts +20 -0
- package/dist/router/hooks.svelte.d.ts +77 -0
- package/dist/router/hooks.svelte.js +148 -0
- package/dist/router/index.svelte.d.ts +107 -0
- package/dist/router/index.svelte.js +400 -0
- package/dist/stores/breakpoints.d.ts +10 -0
- package/dist/stores/breakpoints.js +2 -0
- package/dist/stores/componentInjectErrors.d.ts +1 -0
- package/dist/stores/componentInjectErrors.js +2 -0
- package/dist/stores/forms.d.ts +110 -0
- package/dist/stores/forms.js +307 -0
- package/dist/stores/globalStore.d.ts +10 -0
- package/dist/stores/globalStore.js +10 -0
- package/dist/stores/index.d.ts +7 -0
- package/dist/stores/index.js +7 -0
- package/dist/stores/router.d.ts +4 -0
- package/dist/stores/router.js +5 -0
- package/dist/stores/showConfirmActionModal.d.ts +1 -0
- package/dist/stores/showConfirmActionModal.js +2 -0
- package/dist/stores/siteInfo.d.ts +13 -0
- package/dist/stores/siteInfo.js +2 -0
- package/dist/types/auth.d.ts +40 -0
- package/dist/types/auth.js +1 -0
- package/dist/types/customCode.d.ts +16 -0
- package/dist/types/customCode.js +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.js +5 -0
- package/dist/types/license.d.ts +5 -0
- package/dist/types/license.js +1 -0
- package/dist/types/webflow.d.ts +125 -0
- package/dist/types/webflow.js +1 -0
- package/dist/types/window.d.ts +14 -0
- package/dist/types/window.js +1 -0
- package/dist/ui/components/ButtonGroup.svelte +106 -0
- package/dist/ui/components/ButtonGroup.svelte.d.ts +28 -0
- package/dist/ui/components/Checkbox.svelte +94 -0
- package/dist/ui/components/Checkbox.svelte.d.ts +36 -0
- package/dist/ui/components/Copy.svelte +329 -0
- package/dist/ui/components/Copy.svelte.d.ts +35 -0
- package/dist/ui/components/CustomModal.svelte +192 -0
- package/dist/ui/components/CustomModal.svelte.d.ts +45 -0
- package/dist/ui/components/DisableInEditMode.svelte +66 -0
- package/dist/ui/components/DisableInEditMode.svelte.d.ts +33 -0
- package/dist/ui/components/Divider.svelte +31 -0
- package/dist/ui/components/Divider.svelte.d.ts +31 -0
- package/dist/ui/components/Header.svelte +30 -0
- package/dist/ui/components/Header.svelte.d.ts +20 -0
- package/dist/ui/components/Iframe.svelte +89 -0
- package/dist/ui/components/Iframe.svelte.d.ts +40 -0
- package/dist/ui/components/ImageUpload.svelte +213 -0
- package/dist/ui/components/ImageUpload.svelte.d.ts +42 -0
- package/dist/ui/components/InjectComponent.svelte +297 -0
- package/dist/ui/components/InjectComponent.svelte.d.ts +27 -0
- package/dist/ui/components/Loader.svelte +68 -0
- package/dist/ui/components/Loader.svelte.d.ts +24 -0
- package/dist/ui/components/LoadingScreen.svelte +71 -0
- package/dist/ui/components/LoadingScreen.svelte.d.ts +26 -0
- package/dist/ui/components/Modal.svelte +139 -0
- package/dist/ui/components/Modal.svelte.d.ts +42 -0
- package/dist/ui/components/Navbar.svelte +132 -0
- package/dist/ui/components/Navbar.svelte.d.ts +29 -0
- package/dist/ui/components/NoSettingsNeeded.svelte +31 -0
- package/dist/ui/components/NoSettingsNeeded.svelte.d.ts +18 -0
- package/dist/ui/components/Notification.svelte +193 -0
- package/dist/ui/components/Notification.svelte.d.ts +64 -0
- package/dist/ui/components/PlusMinusButton.svelte +91 -0
- package/dist/ui/components/PlusMinusButton.svelte.d.ts +22 -0
- package/dist/ui/components/PreviewBar.svelte +40 -0
- package/dist/ui/components/PreviewBar.svelte.d.ts +20 -0
- package/dist/ui/components/ScrollableContent.svelte +18 -0
- package/dist/ui/components/ScrollableContent.svelte.d.ts +31 -0
- package/dist/ui/components/Section.svelte +97 -0
- package/dist/ui/components/Section.svelte.d.ts +50 -0
- package/dist/ui/components/SelectBodyOrDivBlock.svelte +26 -0
- package/dist/ui/components/SelectBodyOrDivBlock.svelte.d.ts +26 -0
- package/dist/ui/components/Spacer.svelte +9 -0
- package/dist/ui/components/Spacer.svelte.d.ts +22 -0
- package/dist/ui/components/SpinnerPlusMinus.svelte +75 -0
- package/dist/ui/components/SpinnerPlusMinus.svelte.d.ts +23 -0
- package/dist/ui/components/SpinnerUpDown.svelte +194 -0
- package/dist/ui/components/SpinnerUpDown.svelte.d.ts +31 -0
- package/dist/ui/components/Tabs.svelte +71 -0
- package/dist/ui/components/Tabs.svelte.d.ts +26 -0
- package/dist/ui/components/ToggleItem.svelte +29 -0
- package/dist/ui/components/ToggleItem.svelte.d.ts +28 -0
- package/dist/ui/components/ToggleList.svelte +57 -0
- package/dist/ui/components/ToggleList.svelte.d.ts +39 -0
- package/dist/ui/components/breakpoints/BreakpointItem.svelte +84 -0
- package/dist/ui/components/breakpoints/BreakpointItem.svelte.d.ts +37 -0
- package/dist/ui/components/breakpoints/breakpointOptions.d.ts +12 -0
- package/dist/ui/components/breakpoints/breakpointOptions.js +38 -0
- package/dist/ui/components/breakpoints/index.d.ts +3 -0
- package/dist/ui/components/breakpoints/index.js +3 -0
- package/dist/ui/components/button/Button.stories.svelte +275 -0
- package/dist/ui/components/button/Button.stories.svelte.d.ts +27 -0
- package/dist/ui/components/button/Button.svelte +389 -0
- package/dist/ui/components/button/Button.svelte.d.ts +84 -0
- package/dist/ui/components/button/index.d.ts +2 -0
- package/dist/ui/components/button/index.js +1 -0
- package/dist/ui/components/button/types.d.ts +23 -0
- package/dist/ui/components/button/types.js +1 -0
- package/dist/ui/components/buttons/FooterButton.svelte +277 -0
- package/dist/ui/components/buttons/FooterButton.svelte.d.ts +10 -0
- package/dist/ui/components/buttons/index.d.ts +5 -0
- package/dist/ui/components/buttons/index.js +5 -0
- package/dist/ui/components/buttons/types.d.ts +28 -0
- package/dist/ui/components/buttons/types.js +1 -0
- package/dist/ui/components/clickable/Clickable.stories.svelte +213 -0
- package/dist/ui/components/clickable/Clickable.stories.svelte.d.ts +27 -0
- package/dist/ui/components/clickable/Clickable.svelte +93 -0
- package/dist/ui/components/clickable/Clickable.svelte.d.ts +4 -0
- package/dist/ui/components/clickable/index.d.ts +2 -0
- package/dist/ui/components/clickable/index.js +1 -0
- package/dist/ui/components/clickable/types.d.ts +17 -0
- package/dist/ui/components/clickable/types.js +1 -0
- package/dist/ui/components/index.d.ts +46 -0
- package/dist/ui/components/index.js +46 -0
- package/dist/ui/components/input/Input.stories.d.ts +109 -0
- package/dist/ui/components/input/Input.stories.js +337 -0
- package/dist/ui/components/input/Input.svelte +422 -0
- package/dist/ui/components/input/Input.svelte.d.ts +4 -0
- package/dist/ui/components/input/index.d.ts +2 -0
- package/dist/ui/components/input/index.js +1 -0
- package/dist/ui/components/input/types.d.ts +109 -0
- package/dist/ui/components/input/types.js +1 -0
- package/dist/ui/components/layout/ExampleLayout.svelte +538 -0
- package/dist/ui/components/layout/ExampleLayout.svelte.d.ts +3 -0
- package/dist/ui/components/layout/Layout.stories.svelte +24 -0
- package/dist/ui/components/layout/Layout.stories.svelte.d.ts +18 -0
- package/dist/ui/components/layout/Layout.svelte +551 -0
- package/dist/ui/components/layout/Layout.svelte.d.ts +30 -0
- package/dist/ui/components/layout/common/EditModeMessage.svelte +59 -0
- package/dist/ui/components/layout/common/EditModeMessage.svelte.d.ts +3 -0
- package/dist/ui/components/layout/common/index.d.ts +1 -0
- package/dist/ui/components/layout/common/index.js +1 -0
- package/dist/ui/components/layout/index.d.ts +3 -0
- package/dist/ui/components/layout/index.js +2 -0
- package/dist/ui/components/layout/types.d.ts +59 -0
- package/dist/ui/components/layout/types.js +1 -0
- package/dist/ui/components/select/Select.stories.d.ts +94 -0
- package/dist/ui/components/select/Select.stories.js +396 -0
- package/dist/ui/components/select/Select.svelte +705 -0
- package/dist/ui/components/select/Select.svelte.d.ts +11 -0
- package/dist/ui/components/select/index.d.ts +2 -0
- package/dist/ui/components/select/index.js +1 -0
- package/dist/ui/components/select/types.d.ts +94 -0
- package/dist/ui/components/select/types.js +1 -0
- package/dist/ui/components/switch/Switch.stories.d.ts +58 -0
- package/dist/ui/components/switch/Switch.stories.js +198 -0
- package/dist/ui/components/switch/Switch.svelte +220 -0
- package/dist/ui/components/switch/Switch.svelte.d.ts +4 -0
- package/dist/ui/components/switch/index.d.ts +2 -0
- package/dist/ui/components/switch/index.js +1 -0
- package/dist/ui/components/switch/types.d.ts +47 -0
- package/dist/ui/components/switch/types.js +1 -0
- package/dist/ui/components/text/README.md +73 -0
- package/dist/ui/components/text/Text.stories.svelte +203 -0
- package/dist/ui/components/text/Text.stories.svelte.d.ts +27 -0
- package/dist/ui/components/text/Text.svelte +778 -0
- package/dist/ui/components/text/Text.svelte.d.ts +8 -0
- package/dist/ui/components/text/index.d.ts +3 -0
- package/dist/ui/components/text/index.js +2 -0
- package/dist/ui/components/text/types.d.ts +46 -0
- package/dist/ui/components/text/types.js +1 -0
- package/dist/ui/components/tooltip/Tooltip.stories.svelte +128 -0
- package/dist/ui/components/tooltip/Tooltip.stories.svelte.d.ts +27 -0
- package/dist/ui/components/tooltip/Tooltip.svelte +463 -0
- package/dist/ui/components/tooltip/Tooltip.svelte.d.ts +7 -0
- package/dist/ui/components/tooltip/index.d.ts +2 -0
- package/dist/ui/components/tooltip/index.js +1 -0
- package/dist/ui/components/tooltip/types.d.ts +114 -0
- package/dist/ui/components/tooltip/types.js +1 -0
- package/dist/ui/icons/AccordionDownArrow.svelte +8 -0
- package/dist/ui/icons/AccordionDownArrow.svelte.d.ts +26 -0
- package/dist/ui/icons/AccordionUpArrow.svelte +8 -0
- package/dist/ui/icons/AccordionUpArrow.svelte.d.ts +26 -0
- package/dist/ui/icons/AccountIcon.svelte +14 -0
- package/dist/ui/icons/AccountIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/ArrowIcon.svelte +6 -0
- package/dist/ui/icons/ArrowIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/BackIcon.svelte +8 -0
- package/dist/ui/icons/BackIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/BodyIcon.svelte +8 -0
- package/dist/ui/icons/BodyIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/BookmarkIcon.svelte +13 -0
- package/dist/ui/icons/BookmarkIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/BoxAddIcon.svelte +8 -0
- package/dist/ui/icons/BoxAddIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/BrushIcon.svelte +10 -0
- package/dist/ui/icons/BrushIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/BuilderEditIcon.svelte +12 -0
- package/dist/ui/icons/BuilderEditIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/BuilderIcon.svelte +14 -0
- package/dist/ui/icons/BuilderIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CMSIcon.svelte +8 -0
- package/dist/ui/icons/CMSIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CheckCircleIcon.svelte +8 -0
- package/dist/ui/icons/CheckCircleIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CheckCircleOutlinedIcon.svelte +15 -0
- package/dist/ui/icons/CheckCircleOutlinedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CheckIcon.svelte +9 -0
- package/dist/ui/icons/CheckIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CheckboxCheckedIcon.svelte +15 -0
- package/dist/ui/icons/CheckboxCheckedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/ChevronIcon.svelte +8 -0
- package/dist/ui/icons/ChevronIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/ChevronRightIcon.svelte +8 -0
- package/dist/ui/icons/ChevronRightIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CircleIcon.svelte +3 -0
- package/dist/ui/icons/CircleIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CloseCircleIcon.svelte +6 -0
- package/dist/ui/icons/CloseCircleIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CloseIcon.svelte +8 -0
- package/dist/ui/icons/CloseIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CodeIcon.svelte +8 -0
- package/dist/ui/icons/CodeIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/ComponentsIcon.svelte +7 -0
- package/dist/ui/icons/ComponentsIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CookieIcon.svelte +15 -0
- package/dist/ui/icons/CookieIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CopyIcon.svelte +19 -0
- package/dist/ui/icons/CopyIcon.svelte.d.ts +20 -0
- package/dist/ui/icons/CrossIcon.svelte +4 -0
- package/dist/ui/icons/CrossIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/DOMElement.svelte +19 -0
- package/dist/ui/icons/DOMElement.svelte.d.ts +28 -0
- package/dist/ui/icons/DeleteIcon.svelte +8 -0
- package/dist/ui/icons/DeleteIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/DeleteOutlinedIcon.svelte +8 -0
- package/dist/ui/icons/DeleteOutlinedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/Desktop.svelte +19 -0
- package/dist/ui/icons/Desktop.svelte.d.ts +21 -0
- package/dist/ui/icons/DesktopWithStar.svelte +21 -0
- package/dist/ui/icons/DesktopWithStar.svelte.d.ts +21 -0
- package/dist/ui/icons/DivBlock.svelte +14 -0
- package/dist/ui/icons/DivBlock.svelte.d.ts +28 -0
- package/dist/ui/icons/EditIcon.svelte +15 -0
- package/dist/ui/icons/EditIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/ExpertIcon.svelte +16 -0
- package/dist/ui/icons/ExpertIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/EyeCancelIcon.svelte +12 -0
- package/dist/ui/icons/EyeCancelIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/EyeIcon.svelte +12 -0
- package/dist/ui/icons/EyeIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/FavouriteIcon.svelte +6 -0
- package/dist/ui/icons/FavouriteIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/FileUploadIcon.svelte +18 -0
- package/dist/ui/icons/FileUploadIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/FilterIcon.svelte +8 -0
- package/dist/ui/icons/FilterIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/FinsweetLibraryIcon.svelte +21 -0
- package/dist/ui/icons/FinsweetLibraryIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/FinsweetLogoIcon.svelte +20 -0
- package/dist/ui/icons/FinsweetLogoIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/FolderIcon.svelte +6 -0
- package/dist/ui/icons/FolderIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/FolderOutlinedIcon.svelte +8 -0
- package/dist/ui/icons/FolderOutlinedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/FolderPlusIcon.svelte +10 -0
- package/dist/ui/icons/FolderPlusIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/FreeComponentIcon.svelte +8 -0
- package/dist/ui/icons/FreeComponentIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/GlobeIcon.svelte +14 -0
- package/dist/ui/icons/GlobeIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/HandPointUpIcon.svelte +9 -0
- package/dist/ui/icons/HandPointUpIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/HeartIcon.svelte +8 -0
- package/dist/ui/icons/HeartIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/HeartIconOutlined.svelte +8 -0
- package/dist/ui/icons/HeartIconOutlined.svelte.d.ts +26 -0
- package/dist/ui/icons/HelpAltIcon.svelte +23 -0
- package/dist/ui/icons/HelpAltIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/HelpIcon.svelte +16 -0
- package/dist/ui/icons/HelpIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/HomeIcon.svelte +8 -0
- package/dist/ui/icons/HomeIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/InfoIcon.svelte +14 -0
- package/dist/ui/icons/InfoIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/ListIcon.svelte +18 -0
- package/dist/ui/icons/ListIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/LockIcon.svelte +13 -0
- package/dist/ui/icons/LockIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/MessageIcon.svelte +10 -0
- package/dist/ui/icons/MessageIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/MobileLandscape.svelte +20 -0
- package/dist/ui/icons/MobileLandscape.svelte.d.ts +21 -0
- package/dist/ui/icons/MobilePortrait.svelte +20 -0
- package/dist/ui/icons/MobilePortrait.svelte.d.ts +21 -0
- package/dist/ui/icons/NavigatorIcon.svelte +8 -0
- package/dist/ui/icons/NavigatorIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/OpenBookIcon.svelte +8 -0
- package/dist/ui/icons/OpenBookIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PageDraftIcon.svelte +8 -0
- package/dist/ui/icons/PageDraftIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PageIcon.svelte +9 -0
- package/dist/ui/icons/PageIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PageLockedIcon.svelte +8 -0
- package/dist/ui/icons/PageLockedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PageOutlinedIcon.svelte +8 -0
- package/dist/ui/icons/PageOutlinedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PageSectionIcon.svelte +10 -0
- package/dist/ui/icons/PageSectionIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/Pencil.svelte +12 -0
- package/dist/ui/icons/Pencil.svelte.d.ts +20 -0
- package/dist/ui/icons/PencilOutlinedIcon.svelte +15 -0
- package/dist/ui/icons/PencilOutlinedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PinIcon.svelte +8 -0
- package/dist/ui/icons/PinIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PlayIcon.svelte +8 -0
- package/dist/ui/icons/PlayIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PlusIcon.svelte +8 -0
- package/dist/ui/icons/PlusIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PreviewEyeIcon.svelte +12 -0
- package/dist/ui/icons/PreviewEyeIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/ProfileIcon.svelte +12 -0
- package/dist/ui/icons/ProfileIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PublishCancelIcon.svelte +8 -0
- package/dist/ui/icons/PublishCancelIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PublishIcon.svelte +12 -0
- package/dist/ui/icons/PublishIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/RefreshIcon.svelte +10 -0
- package/dist/ui/icons/RefreshIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/RepairIcon.svelte +10 -0
- package/dist/ui/icons/RepairIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/SaveIcon.svelte +14 -0
- package/dist/ui/icons/SaveIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/SearchIcon.svelte +8 -0
- package/dist/ui/icons/SearchIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/SelectIcon.svelte +7 -0
- package/dist/ui/icons/SelectIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/SettingsIcon.svelte +8 -0
- package/dist/ui/icons/SettingsIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/SidebarToggleIcon.svelte +28 -0
- package/dist/ui/icons/SidebarToggleIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/SliderAppIcon.svelte +14 -0
- package/dist/ui/icons/SliderAppIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/SquareCheckIcon.svelte +3 -0
- package/dist/ui/icons/SquareCheckIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/StarIcon.svelte +6 -0
- package/dist/ui/icons/StarIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/StarOutlinedIcon.svelte +6 -0
- package/dist/ui/icons/StarOutlinedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/StaticContentIcon.svelte +8 -0
- package/dist/ui/icons/StaticContentIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/SubtractIcon.svelte +9 -0
- package/dist/ui/icons/SubtractIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/TabNewIcon.svelte +6 -0
- package/dist/ui/icons/TabNewIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/TableAppIcon.svelte +19 -0
- package/dist/ui/icons/TableAppIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/Tablet.svelte +20 -0
- package/dist/ui/icons/Tablet.svelte.d.ts +21 -0
- package/dist/ui/icons/TabletPreview.svelte +20 -0
- package/dist/ui/icons/TabletPreview.svelte.d.ts +21 -0
- package/dist/ui/icons/TabsIcon.svelte +17 -0
- package/dist/ui/icons/TabsIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/ThreeDotsIcon.svelte +14 -0
- package/dist/ui/icons/ThreeDotsIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/TimesIcon.svelte +4 -0
- package/dist/ui/icons/TimesIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/ToolTipInfoCircleIcon.svelte +11 -0
- package/dist/ui/icons/ToolTipInfoCircleIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/TooltipInfoCircleFilled.svelte +13 -0
- package/dist/ui/icons/TooltipInfoCircleFilled.svelte.d.ts +26 -0
- package/dist/ui/icons/TooltipInfoSquaredIcon.svelte +16 -0
- package/dist/ui/icons/TooltipInfoSquaredIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/TriangleDownIcon.svelte +7 -0
- package/dist/ui/icons/TriangleDownIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/TriangleDownIconToggle.svelte +21 -0
- package/dist/ui/icons/TriangleDownIconToggle.svelte.d.ts +20 -0
- package/dist/ui/icons/UndoIcon.svelte +6 -0
- package/dist/ui/icons/UndoIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/UploadFileIcon.svelte +10 -0
- package/dist/ui/icons/UploadFileIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/WarningCircleIcon.svelte +7 -0
- package/dist/ui/icons/WarningCircleIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/WarningCircleOutlineIcon.svelte +14 -0
- package/dist/ui/icons/WarningCircleOutlineIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/WarningTriangleIcon.svelte +6 -0
- package/dist/ui/icons/WarningTriangleIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/WarningTriangleOutlineIcon.svelte +14 -0
- package/dist/ui/icons/WarningTriangleOutlineIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/WebflowComponentIcon.svelte +14 -0
- package/dist/ui/icons/WebflowComponentIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/WebflowComponentOutlinedIcon.svelte +10 -0
- package/dist/ui/icons/WebflowComponentOutlinedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/WebflowInsightsIcon.svelte +6 -0
- package/dist/ui/icons/WebflowInsightsIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/WizedLogoIcon.svelte +39 -0
- package/dist/ui/icons/WizedLogoIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/XL.svelte +19 -0
- package/dist/ui/icons/XL.svelte.d.ts +21 -0
- package/dist/ui/icons/XXL.svelte +19 -0
- package/dist/ui/icons/XXL.svelte.d.ts +21 -0
- package/dist/ui/icons/XXXL.svelte +19 -0
- package/dist/ui/icons/XXXL.svelte.d.ts +21 -0
- package/dist/ui/icons/apps/FsConsentIcon.svelte +22 -0
- package/dist/ui/icons/apps/FsConsentIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/FsCursorIcon.svelte +12 -0
- package/dist/ui/icons/apps/FsCursorIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/FsExampleIcon.svelte +10 -0
- package/dist/ui/icons/apps/FsExampleIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/FsInstagramFeedIcon.svelte +27 -0
- package/dist/ui/icons/apps/FsInstagramFeedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/FsMarqueeIcon.svelte +13 -0
- package/dist/ui/icons/apps/FsMarqueeIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/FsNumberCountIcon.svelte +46 -0
- package/dist/ui/icons/apps/FsNumberCountIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/FsSliderIcon.svelte +13 -0
- package/dist/ui/icons/apps/FsSliderIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/FsTablesIcon.svelte +19 -0
- package/dist/ui/icons/apps/FsTablesIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/FsTabsIcon.svelte +24 -0
- package/dist/ui/icons/apps/FsTabsIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/FsTooltipIcon.svelte +12 -0
- package/dist/ui/icons/apps/FsTooltipIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/FsYouTubeFeedIcon.svelte +43 -0
- package/dist/ui/icons/apps/FsYouTubeFeedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/index.d.ts +15 -0
- package/dist/ui/icons/apps/index.js +15 -0
- package/dist/ui/icons/index.d.ts +120 -0
- package/dist/ui/icons/index.js +120 -0
- package/dist/ui/index.css +494 -0
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.js +2 -0
- package/dist/utils/api/checkIfAppModeIsDesign.d.ts +5 -0
- package/dist/utils/api/checkIfAppModeIsDesign.js +20 -0
- package/dist/utils/api/clipboard/handlePaste.d.ts +46 -0
- package/dist/utils/api/clipboard/handlePaste.js +53 -0
- package/dist/utils/api/clipboard/index.d.ts +1 -0
- package/dist/utils/api/clipboard/index.js +1 -0
- package/dist/utils/api/copyPaste/index.d.ts +18 -0
- package/dist/utils/api/copyPaste/index.js +1 -0
- package/dist/utils/api/getAllAssets.d.ts +12 -0
- package/dist/utils/api/getAllAssets.js +21 -0
- package/dist/utils/api/getFinsweetComponentsEnvironment.d.ts +9 -0
- package/dist/utils/api/getFinsweetComponentsEnvironment.js +70 -0
- package/dist/utils/api/index.d.ts +6 -0
- package/dist/utils/api/index.js +6 -0
- package/dist/utils/api/insertWithXSCP.d.ts +5 -0
- package/dist/utils/api/insertWithXSCP.js +13 -0
- package/dist/utils/auth/crossWindowLogin.d.ts +2 -0
- package/dist/utils/auth/crossWindowLogin.js +49 -0
- package/dist/utils/auth/index.d.ts +61 -0
- package/dist/utils/auth/index.js +196 -0
- package/dist/utils/browser-storage/index.d.ts +2 -0
- package/dist/utils/browser-storage/index.js +2 -0
- package/dist/utils/browser-storage/localStorage.d.ts +24 -0
- package/dist/utils/browser-storage/localStorage.js +56 -0
- package/dist/utils/browser-storage/sessionStorage.d.ts +24 -0
- package/dist/utils/browser-storage/sessionStorage.js +56 -0
- package/dist/utils/constants.d.ts +61 -0
- package/dist/utils/constants.js +73 -0
- package/dist/utils/custom-code/api.d.ts +17 -0
- package/dist/utils/custom-code/api.js +41 -0
- package/dist/utils/custom-code/index.d.ts +1 -0
- package/dist/utils/custom-code/index.js +1 -0
- package/dist/utils/helpers/cleanupTooltipMessage.d.ts +5 -0
- package/dist/utils/helpers/cleanupTooltipMessage.js +25 -0
- package/dist/utils/helpers/goto.d.ts +7 -0
- package/dist/utils/helpers/goto.js +35 -0
- package/dist/utils/helpers/index.d.ts +5 -0
- package/dist/utils/helpers/index.js +5 -0
- package/dist/utils/helpers/noop.d.ts +4 -0
- package/dist/utils/helpers/noop.js +7 -0
- package/dist/utils/helpers/numbers.d.ts +27 -0
- package/dist/utils/helpers/numbers.js +61 -0
- package/dist/utils/helpers/objectsToModuleExports.d.ts +9 -0
- package/dist/utils/helpers/objectsToModuleExports.js +13 -0
- package/dist/utils/helpers/trimText.d.ts +15 -0
- package/dist/utils/helpers/trimText.js +33 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/logger/index.d.ts +19 -0
- package/dist/utils/logger/index.js +41 -0
- package/dist/utils/webflow-canvas/attributes/getAllWebflowElementAttributes.d.ts +6 -0
- package/dist/utils/webflow-canvas/attributes/getAllWebflowElementAttributes.js +19 -0
- package/dist/utils/webflow-canvas/attributes/getInstanceNamesFromObject.d.ts +8 -0
- package/dist/utils/webflow-canvas/attributes/getInstanceNamesFromObject.js +21 -0
- package/dist/utils/webflow-canvas/attributes/getWebflowElementAttribute.d.ts +7 -0
- package/dist/utils/webflow-canvas/attributes/getWebflowElementAttribute.js +25 -0
- package/dist/utils/webflow-canvas/attributes/getWebflowElementTextContent.d.ts +6 -0
- package/dist/utils/webflow-canvas/attributes/getWebflowElementTextContent.js +26 -0
- package/dist/utils/webflow-canvas/attributes/index.d.ts +7 -0
- package/dist/utils/webflow-canvas/attributes/index.js +7 -0
- package/dist/utils/webflow-canvas/attributes/removeWebflowElementAttribute.d.ts +7 -0
- package/dist/utils/webflow-canvas/attributes/removeWebflowElementAttribute.js +37 -0
- package/dist/utils/webflow-canvas/attributes/setStyles.d.ts +10 -0
- package/dist/utils/webflow-canvas/attributes/setStyles.js +36 -0
- package/dist/utils/webflow-canvas/attributes/setWebflowElementAttribute.d.ts +11 -0
- package/dist/utils/webflow-canvas/attributes/setWebflowElementAttribute.js +61 -0
- package/dist/utils/webflow-canvas/findInstanceElement.d.ts +32 -0
- package/dist/utils/webflow-canvas/findInstanceElement.js +144 -0
- package/dist/utils/webflow-canvas/getAllPages.d.ts +29 -0
- package/dist/utils/webflow-canvas/getAllPages.js +93 -0
- package/dist/utils/webflow-canvas/getSiteStagingUrl.d.ts +7 -0
- package/dist/utils/webflow-canvas/getSiteStagingUrl.js +14 -0
- package/dist/utils/webflow-canvas/index.d.ts +3 -0
- package/dist/utils/webflow-canvas/index.js +3 -0
- package/package.json +107 -0
|
@@ -0,0 +1,551 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
+
|
|
5
|
+
import { globalStore } from '../../../stores';
|
|
6
|
+
import {
|
|
7
|
+
CheckCircleOutlinedIcon,
|
|
8
|
+
WarningCircleIcon,
|
|
9
|
+
WarningCircleOutlineIcon
|
|
10
|
+
} from '../../icons';
|
|
11
|
+
|
|
12
|
+
import { Tooltip } from '../tooltip';
|
|
13
|
+
import { EditModeMessage } from './common';
|
|
14
|
+
import type { LayoutFooter, LayoutTab } from './types';
|
|
15
|
+
|
|
16
|
+
interface LayoutProps extends HTMLAttributes<HTMLDivElement> {
|
|
17
|
+
activeTab: string;
|
|
18
|
+
tabs: LayoutTab[];
|
|
19
|
+
switchTab: (tab: string) => void;
|
|
20
|
+
footer?: LayoutFooter;
|
|
21
|
+
formKey: string;
|
|
22
|
+
editMode?: boolean;
|
|
23
|
+
showFooter?: boolean;
|
|
24
|
+
showSidebar?: boolean;
|
|
25
|
+
showTabs?: boolean;
|
|
26
|
+
showPreviewBar?: boolean;
|
|
27
|
+
sidebarWidth?: string;
|
|
28
|
+
containerMode?: boolean;
|
|
29
|
+
footerSize?: 'normal' | 'large';
|
|
30
|
+
notifications?: Array<{
|
|
31
|
+
path: string;
|
|
32
|
+
success: boolean;
|
|
33
|
+
message: string;
|
|
34
|
+
showNotification: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
sidebar?: Snippet;
|
|
37
|
+
main?: Snippet;
|
|
38
|
+
previewBar?: Snippet;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
let {
|
|
42
|
+
activeTab,
|
|
43
|
+
tabs,
|
|
44
|
+
switchTab,
|
|
45
|
+
footer = { buttons: [] },
|
|
46
|
+
formKey,
|
|
47
|
+
editMode = false,
|
|
48
|
+
showFooter = true,
|
|
49
|
+
showSidebar = true,
|
|
50
|
+
showTabs = true,
|
|
51
|
+
showPreviewBar = true,
|
|
52
|
+
sidebarWidth = '274px',
|
|
53
|
+
containerMode = false,
|
|
54
|
+
footerSize = 'normal',
|
|
55
|
+
notifications = [],
|
|
56
|
+
sidebar,
|
|
57
|
+
main,
|
|
58
|
+
previewBar,
|
|
59
|
+
class: className = '',
|
|
60
|
+
...restProps
|
|
61
|
+
}: LayoutProps = $props();
|
|
62
|
+
|
|
63
|
+
// Derived states
|
|
64
|
+
let hasFooterButtons = $derived(footer?.buttons && footer.buttons.length > 0);
|
|
65
|
+
let containerStyles = $derived(
|
|
66
|
+
containerMode ? 'height: 100%; width: 100%;' : 'height: 100vh; width: 100vw;'
|
|
67
|
+
);
|
|
68
|
+
let footerHeight = $derived(footerSize === 'large' ? '50px' : '40px');
|
|
69
|
+
|
|
70
|
+
// Grid template areas based on visibility
|
|
71
|
+
let gridTemplateAreas = $derived(() => {
|
|
72
|
+
const areas = [];
|
|
73
|
+
|
|
74
|
+
// Handle navbar row - navbar can exist independently and spans correctly
|
|
75
|
+
if (showTabs) {
|
|
76
|
+
if (showSidebar && showPreviewBar) {
|
|
77
|
+
areas.push('"navbar preview-bar"');
|
|
78
|
+
} else if (showSidebar) {
|
|
79
|
+
areas.push('"navbar navbar"');
|
|
80
|
+
} else {
|
|
81
|
+
areas.push('"navbar"');
|
|
82
|
+
}
|
|
83
|
+
} else if (showPreviewBar && showSidebar) {
|
|
84
|
+
// If tabs are hidden but preview bar is shown with sidebar
|
|
85
|
+
areas.push('"preview-bar preview-bar"');
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Handle main content row
|
|
89
|
+
if (showSidebar) {
|
|
90
|
+
areas.push('"sidebar main"');
|
|
91
|
+
} else {
|
|
92
|
+
areas.push('"main"');
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Handle footer row
|
|
96
|
+
if (showFooter && hasFooterButtons) {
|
|
97
|
+
if (showSidebar) {
|
|
98
|
+
areas.push('"sidebar footer"');
|
|
99
|
+
} else {
|
|
100
|
+
areas.push('"footer"');
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return areas.join(' ');
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
// Grid template columns
|
|
108
|
+
let gridTemplateColumns = $derived(showSidebar ? `${sidebarWidth} 1fr` : '1fr');
|
|
109
|
+
|
|
110
|
+
// Grid template rows
|
|
111
|
+
let gridTemplateRows = $derived(() => {
|
|
112
|
+
const rows = [];
|
|
113
|
+
|
|
114
|
+
// Add row for navbar/preview-bar if either is shown
|
|
115
|
+
if (showTabs || (showPreviewBar && showSidebar)) {
|
|
116
|
+
rows.push('40px');
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
rows.push('1fr'); // main content area takes remaining space
|
|
120
|
+
|
|
121
|
+
if (showFooter && hasFooterButtons) {
|
|
122
|
+
rows.push(footerHeight);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return rows.join(' ');
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
// Get notification for a specific tab
|
|
129
|
+
function getNotification(tabPath: string) {
|
|
130
|
+
return notifications.find((n) => n.path === tabPath);
|
|
131
|
+
}
|
|
132
|
+
</script>
|
|
133
|
+
|
|
134
|
+
<div
|
|
135
|
+
class="layout-grid {className}"
|
|
136
|
+
style="{containerStyles} --grid-template-areas: {gridTemplateAreas()}; --grid-template-columns: {gridTemplateColumns}; --grid-template-rows: {gridTemplateRows()};"
|
|
137
|
+
{...restProps}
|
|
138
|
+
>
|
|
139
|
+
<!-- Navbar/Tab Switcher -->
|
|
140
|
+
{#if showTabs}
|
|
141
|
+
<div class="navbar" data-area="navbar">
|
|
142
|
+
{#each tabs as tab (tab.path)}
|
|
143
|
+
{@const Icon = tab.icon}
|
|
144
|
+
{@const notification = getNotification(tab.path)}
|
|
145
|
+
<button
|
|
146
|
+
class="tab"
|
|
147
|
+
class:isActive={activeTab === tab.path}
|
|
148
|
+
class:warning={notification && !notification?.success}
|
|
149
|
+
class:success={notification && notification?.success}
|
|
150
|
+
onclick={() => switchTab(tab.path)}
|
|
151
|
+
>
|
|
152
|
+
<Icon />
|
|
153
|
+
<span
|
|
154
|
+
class="tab-text"
|
|
155
|
+
style="color: {activeTab !== tab.path ? 'var(--text2)' : 'var(--actionPrimaryText)'}"
|
|
156
|
+
>
|
|
157
|
+
{tab.name}
|
|
158
|
+
</span>
|
|
159
|
+
|
|
160
|
+
{#if notification?.showNotification}
|
|
161
|
+
{#if notification?.success}
|
|
162
|
+
<span class="notification-pill success">
|
|
163
|
+
<CheckCircleOutlinedIcon />
|
|
164
|
+
</span>
|
|
165
|
+
{:else}
|
|
166
|
+
<Tooltip
|
|
167
|
+
message={notification?.message}
|
|
168
|
+
placement="right"
|
|
169
|
+
offsetVal={8}
|
|
170
|
+
position="fixed"
|
|
171
|
+
width="max-content"
|
|
172
|
+
>
|
|
173
|
+
{#snippet target()}
|
|
174
|
+
<div class="notification-pill warning-tooltip">
|
|
175
|
+
<WarningCircleOutlineIcon />
|
|
176
|
+
</div>
|
|
177
|
+
{/snippet}
|
|
178
|
+
</Tooltip>
|
|
179
|
+
{/if}
|
|
180
|
+
{/if}
|
|
181
|
+
</button>
|
|
182
|
+
{/each}
|
|
183
|
+
</div>
|
|
184
|
+
{/if}
|
|
185
|
+
|
|
186
|
+
<!-- Preview Bar -->
|
|
187
|
+
{#if showPreviewBar && showSidebar}
|
|
188
|
+
<div class="preview-bar" data-area="preview-bar">
|
|
189
|
+
{#if previewBar}
|
|
190
|
+
{@render previewBar()}
|
|
191
|
+
{:else}
|
|
192
|
+
<div class="preview-bar-content">
|
|
193
|
+
<span>Preview: {activeTab} tab content</span>
|
|
194
|
+
</div>
|
|
195
|
+
{/if}
|
|
196
|
+
</div>
|
|
197
|
+
{/if}
|
|
198
|
+
|
|
199
|
+
<!-- Sidebar -->
|
|
200
|
+
{#if showSidebar}
|
|
201
|
+
<div class="sidebar" data-area="sidebar" data-simplebar="">
|
|
202
|
+
{#if sidebar}
|
|
203
|
+
{@render sidebar()}
|
|
204
|
+
{:else}
|
|
205
|
+
<div class="sidebar-content">
|
|
206
|
+
<div class="sidebar-placeholder">
|
|
207
|
+
<h3>Sidebar Content</h3>
|
|
208
|
+
<p>Tab: {activeTab}</p>
|
|
209
|
+
<p>This is placeholder content for the sidebar area.</p>
|
|
210
|
+
</div>
|
|
211
|
+
</div>
|
|
212
|
+
{/if}
|
|
213
|
+
</div>
|
|
214
|
+
{/if}
|
|
215
|
+
|
|
216
|
+
<!-- Main Content -->
|
|
217
|
+
<div class="main-content" data-area="main">
|
|
218
|
+
{#if main}
|
|
219
|
+
<div class="main-content-container">
|
|
220
|
+
{#if $globalStore.editMode || $globalStore.repairMode}
|
|
221
|
+
<EditModeMessage />
|
|
222
|
+
{/if}
|
|
223
|
+
{@render main()}
|
|
224
|
+
</div>
|
|
225
|
+
{:else}
|
|
226
|
+
<div class="main-placeholder">
|
|
227
|
+
<h2>Main Content Area</h2>
|
|
228
|
+
<p>Active Tab: <strong>{activeTab}</strong></p>
|
|
229
|
+
<p>This is placeholder content for the main content area.</p>
|
|
230
|
+
<div class="placeholder-details">
|
|
231
|
+
<h3>Layout State:</h3>
|
|
232
|
+
<ul>
|
|
233
|
+
<li>Show Sidebar: {showSidebar}</li>
|
|
234
|
+
<li>Show Tabs: {showTabs}</li>
|
|
235
|
+
<li>Show Preview Bar: {showPreviewBar}</li>
|
|
236
|
+
<li>Show Footer: {showFooter}</li>
|
|
237
|
+
<li>Edit Mode: {editMode}</li>
|
|
238
|
+
</ul>
|
|
239
|
+
</div>
|
|
240
|
+
</div>
|
|
241
|
+
{/if}
|
|
242
|
+
</div>
|
|
243
|
+
|
|
244
|
+
<!-- Footer -->
|
|
245
|
+
{#if showFooter && hasFooterButtons}
|
|
246
|
+
<div class="footer" data-area="footer">
|
|
247
|
+
{#each footer.buttons as button (button.text)}
|
|
248
|
+
<button
|
|
249
|
+
class="footer-button footer-button--{button.variant}"
|
|
250
|
+
disabled={editMode}
|
|
251
|
+
onclick={button.onClick}
|
|
252
|
+
>
|
|
253
|
+
{#if button.icon}
|
|
254
|
+
{@const Icon = button.icon}
|
|
255
|
+
<Icon />
|
|
256
|
+
{/if}
|
|
257
|
+
{button.text}
|
|
258
|
+
</button>
|
|
259
|
+
{/each}
|
|
260
|
+
</div>
|
|
261
|
+
{/if}
|
|
262
|
+
</div>
|
|
263
|
+
|
|
264
|
+
<style>
|
|
265
|
+
.layout-grid {
|
|
266
|
+
display: grid;
|
|
267
|
+
grid-template-areas: var(--grid-template-areas);
|
|
268
|
+
grid-template-columns: var(--grid-template-columns);
|
|
269
|
+
grid-template-rows: var(--grid-template-rows);
|
|
270
|
+
overflow: hidden;
|
|
271
|
+
height: 100%;
|
|
272
|
+
width: 100%;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/* Navbar/Tab Switcher */
|
|
276
|
+
.navbar {
|
|
277
|
+
grid-area: navbar;
|
|
278
|
+
display: flex;
|
|
279
|
+
align-items: center;
|
|
280
|
+
gap: 12px;
|
|
281
|
+
padding: 0 var(--spacing-12, 12px);
|
|
282
|
+
background: var(--background1, #1e1e1e);
|
|
283
|
+
border-bottom: 1px solid var(--border1, rgba(255, 255, 255, 0.13));
|
|
284
|
+
position: relative;
|
|
285
|
+
z-index: 50;
|
|
286
|
+
height: 40px;
|
|
287
|
+
overflow: visible;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/* Add right border to navbar when sidebar is visible to align with sidebar border */
|
|
291
|
+
.layout-grid:has(.sidebar) .navbar {
|
|
292
|
+
border-right: 1px solid var(--border1, rgba(255, 255, 255, 0.13));
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.tab {
|
|
296
|
+
all: unset;
|
|
297
|
+
position: relative;
|
|
298
|
+
height: 40px;
|
|
299
|
+
display: flex;
|
|
300
|
+
flex-direction: row;
|
|
301
|
+
align-items: center;
|
|
302
|
+
gap: 8px;
|
|
303
|
+
cursor: pointer;
|
|
304
|
+
justify-content: start;
|
|
305
|
+
color: var(--text2);
|
|
306
|
+
overflow: visible;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.tab.isActive {
|
|
310
|
+
color: var(--actionPrimaryText);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.tab-text {
|
|
314
|
+
color: inherit;
|
|
315
|
+
font-family: Inter;
|
|
316
|
+
font-size: 11.5px;
|
|
317
|
+
font-style: normal;
|
|
318
|
+
font-weight: 400;
|
|
319
|
+
line-height: 16px;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.tab::after {
|
|
323
|
+
content: '';
|
|
324
|
+
position: absolute;
|
|
325
|
+
bottom: 0px;
|
|
326
|
+
left: 0;
|
|
327
|
+
right: 0;
|
|
328
|
+
height: 1px;
|
|
329
|
+
background-color: var(--yellowBorder);
|
|
330
|
+
opacity: 0;
|
|
331
|
+
transition: opacity 0.2s ease-in-out;
|
|
332
|
+
z-index: 100;
|
|
333
|
+
pointer-events: none;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.tab.warning::after {
|
|
337
|
+
background-color: var(--yellowBorder);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.tab.success::after {
|
|
341
|
+
background-color: var(--greenBorder);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.tab:hover::after {
|
|
345
|
+
opacity: 1;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.tab.isActive::after {
|
|
349
|
+
opacity: 1;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.notification-pill {
|
|
353
|
+
display: flex;
|
|
354
|
+
align-items: center;
|
|
355
|
+
justify-content: center;
|
|
356
|
+
color: var(--yellow-yellow-text, #ffc700);
|
|
357
|
+
width: 16px;
|
|
358
|
+
height: 16px;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.notification-pill.success {
|
|
362
|
+
color: var(--greenBorder);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.notification-pill.warning-tooltip {
|
|
366
|
+
cursor: help;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.notification-pill.warning-tooltip:hover {
|
|
370
|
+
opacity: 0.8;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/* Preview Bar */
|
|
374
|
+
.preview-bar {
|
|
375
|
+
grid-area: preview-bar;
|
|
376
|
+
display: flex;
|
|
377
|
+
align-items: center;
|
|
378
|
+
gap: 12px;
|
|
379
|
+
padding: 0 var(--spacing-12, 12px);
|
|
380
|
+
background: var(--background1, #1e1e1e);
|
|
381
|
+
border-bottom: 1px solid var(--border1, rgba(255, 255, 255, 0.13));
|
|
382
|
+
position: relative;
|
|
383
|
+
z-index: 9;
|
|
384
|
+
height: 40px;
|
|
385
|
+
overflow: hidden;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.preview-bar-content span {
|
|
389
|
+
color: var(--actionPrimaryText);
|
|
390
|
+
font-family: Inter;
|
|
391
|
+
font-size: 11.5px;
|
|
392
|
+
font-style: normal;
|
|
393
|
+
font-weight: 500;
|
|
394
|
+
line-height: 16px;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/* Sidebar */
|
|
398
|
+
.sidebar {
|
|
399
|
+
grid-area: sidebar;
|
|
400
|
+
background: var(--background1, #1e1e1e);
|
|
401
|
+
border-right: 1px solid var(--border1, rgba(255, 255, 255, 0.13));
|
|
402
|
+
overflow-y: auto;
|
|
403
|
+
overflow-x: hidden;
|
|
404
|
+
position: relative;
|
|
405
|
+
z-index: 2;
|
|
406
|
+
height: 100%;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.sidebar-content {
|
|
410
|
+
height: 100%;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.sidebar-placeholder {
|
|
414
|
+
padding: var(--spacing-16, 16px);
|
|
415
|
+
color: var(--text1);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.sidebar-placeholder h3 {
|
|
419
|
+
margin: 0 0 var(--spacing-12, 12px) 0;
|
|
420
|
+
font-size: 14px;
|
|
421
|
+
font-weight: 600;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.sidebar-placeholder p {
|
|
425
|
+
margin: 0 0 var(--spacing-8, 8px) 0;
|
|
426
|
+
font-size: 12px;
|
|
427
|
+
color: var(--text2);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/* Main Content */
|
|
431
|
+
.main-content {
|
|
432
|
+
grid-area: main;
|
|
433
|
+
background: var(--background1, #1e1e1e);
|
|
434
|
+
overflow-y: auto;
|
|
435
|
+
overflow-x: hidden;
|
|
436
|
+
position: relative;
|
|
437
|
+
z-index: 1;
|
|
438
|
+
height: 100%;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.main-content-container {
|
|
442
|
+
flex-grow: 1;
|
|
443
|
+
display: flex;
|
|
444
|
+
flex-direction: column;
|
|
445
|
+
align-items: flex-start;
|
|
446
|
+
align-self: stretch;
|
|
447
|
+
padding: var(--Spacing-24, 24px);
|
|
448
|
+
gap: var(--Spacing-16, 16px);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.main-placeholder {
|
|
452
|
+
padding: var(--spacing-24, 24px);
|
|
453
|
+
color: var(--text1);
|
|
454
|
+
height: 100%;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.main-placeholder h2 {
|
|
458
|
+
margin: 0 0 var(--spacing-16, 16px) 0;
|
|
459
|
+
font-size: 18px;
|
|
460
|
+
font-weight: 600;
|
|
461
|
+
color: var(--actionPrimaryText);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.main-placeholder p {
|
|
465
|
+
margin: 0 0 var(--spacing-12, 12px) 0;
|
|
466
|
+
font-size: 14px;
|
|
467
|
+
color: var(--text1);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.placeholder-details {
|
|
471
|
+
margin-top: var(--spacing-24, 24px);
|
|
472
|
+
padding: var(--spacing-16, 16px);
|
|
473
|
+
background: var(--background2, #2a2a2a);
|
|
474
|
+
border-radius: 6px;
|
|
475
|
+
border: 1px solid var(--border1, rgba(255, 255, 255, 0.13));
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.placeholder-details h3 {
|
|
479
|
+
margin: 0 0 var(--spacing-12, 12px) 0;
|
|
480
|
+
font-size: 14px;
|
|
481
|
+
font-weight: 500;
|
|
482
|
+
color: var(--text1);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
.placeholder-details ul {
|
|
486
|
+
margin: 0;
|
|
487
|
+
padding-left: var(--spacing-16, 16px);
|
|
488
|
+
color: var(--text2);
|
|
489
|
+
font-size: 12px;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
.placeholder-details li {
|
|
493
|
+
margin-bottom: var(--spacing-4, 4px);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/* Footer */
|
|
497
|
+
.footer {
|
|
498
|
+
grid-area: footer;
|
|
499
|
+
display: flex;
|
|
500
|
+
flex-direction: row;
|
|
501
|
+
justify-content: flex-end;
|
|
502
|
+
align-items: center;
|
|
503
|
+
gap: var(--spacing-8, 8px);
|
|
504
|
+
padding: var(--spacing-8, 8px) var(--spacing-12, 12px);
|
|
505
|
+
background: var(--background1, #1e1e1e);
|
|
506
|
+
border-top: 1px solid var(--border1, rgba(255, 255, 255, 0.13));
|
|
507
|
+
position: relative;
|
|
508
|
+
z-index: 99;
|
|
509
|
+
height: 100%;
|
|
510
|
+
overflow: hidden;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.footer-button {
|
|
514
|
+
display: flex;
|
|
515
|
+
padding: 4px 8px;
|
|
516
|
+
justify-content: center;
|
|
517
|
+
align-items: center;
|
|
518
|
+
gap: 2px;
|
|
519
|
+
border-radius: 4px;
|
|
520
|
+
border: 1px solid var(--border-border-1, #363636);
|
|
521
|
+
background: var(--background2);
|
|
522
|
+
color: var(--text1);
|
|
523
|
+
text-align: center;
|
|
524
|
+
font-family: Inter;
|
|
525
|
+
font-size: 11px;
|
|
526
|
+
font-style: normal;
|
|
527
|
+
font-weight: 400;
|
|
528
|
+
line-height: 16px;
|
|
529
|
+
cursor: pointer;
|
|
530
|
+
transition: all 0.2s ease-in-out;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
.footer-button--primary {
|
|
534
|
+
background: var(--action-action-primary-background-hover, #1280ee);
|
|
535
|
+
color: var(--actionPrimaryText);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
.footer-button--secondary {
|
|
539
|
+
background: var(--background2);
|
|
540
|
+
color: var(--text1);
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.footer-button:hover:not(:disabled) {
|
|
544
|
+
opacity: 0.8;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.footer-button:disabled {
|
|
548
|
+
opacity: 0.5;
|
|
549
|
+
cursor: not-allowed;
|
|
550
|
+
}
|
|
551
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import type { LayoutFooter, LayoutTab } from './types';
|
|
4
|
+
interface LayoutProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
activeTab: string;
|
|
6
|
+
tabs: LayoutTab[];
|
|
7
|
+
switchTab: (tab: string) => void;
|
|
8
|
+
footer?: LayoutFooter;
|
|
9
|
+
formKey: string;
|
|
10
|
+
editMode?: boolean;
|
|
11
|
+
showFooter?: boolean;
|
|
12
|
+
showSidebar?: boolean;
|
|
13
|
+
showTabs?: boolean;
|
|
14
|
+
showPreviewBar?: boolean;
|
|
15
|
+
sidebarWidth?: string;
|
|
16
|
+
containerMode?: boolean;
|
|
17
|
+
footerSize?: 'normal' | 'large';
|
|
18
|
+
notifications?: Array<{
|
|
19
|
+
path: string;
|
|
20
|
+
success: boolean;
|
|
21
|
+
message: string;
|
|
22
|
+
showNotification: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
sidebar?: Snippet;
|
|
25
|
+
main?: Snippet;
|
|
26
|
+
previewBar?: Snippet;
|
|
27
|
+
}
|
|
28
|
+
declare const Layout: import("svelte").Component<LayoutProps, {}, "">;
|
|
29
|
+
type Layout = ReturnType<typeof Layout>;
|
|
30
|
+
export default Layout;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { globalStore } from '../../../../stores';
|
|
3
|
+
import { Pencil, WarningTriangleOutlineIcon } from '../../../icons';
|
|
4
|
+
import { BRAND } from '../../../../utils';
|
|
5
|
+
|
|
6
|
+
import Notification from '../../Notification.svelte';
|
|
7
|
+
|
|
8
|
+
const isEditMode = $derived($globalStore.editMode);
|
|
9
|
+
const isRepairMode = $derived($globalStore.repairMode);
|
|
10
|
+
const title = $derived($globalStore.title);
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
{#if isEditMode && !isRepairMode}
|
|
14
|
+
<div class="edit-mode">
|
|
15
|
+
<Notification
|
|
16
|
+
type="warning"
|
|
17
|
+
title="You are in edit mode for {title} {BRAND.COMPONENT}."
|
|
18
|
+
message={`Make your edits and click on the "Update ${title}" button. You can review and confirm all changes before we proceed with the updates.`}
|
|
19
|
+
richtextMessage
|
|
20
|
+
defaultIcon={Pencil}
|
|
21
|
+
closeIcon={false}
|
|
22
|
+
/>
|
|
23
|
+
</div>
|
|
24
|
+
{/if}
|
|
25
|
+
|
|
26
|
+
{#if isRepairMode}
|
|
27
|
+
<div class="edit-mode">
|
|
28
|
+
<Notification
|
|
29
|
+
type="warning"
|
|
30
|
+
title="Component instance not found"
|
|
31
|
+
message="We have detected {BRAND.COMPONENT} as valid, but we couldn't find the associated configurations. This may be a {BRAND.COMPONENT} from another project. Click the 'Repair' button to fix it."
|
|
32
|
+
defaultIcon={WarningTriangleOutlineIcon}
|
|
33
|
+
closeIcon={false}
|
|
34
|
+
/>
|
|
35
|
+
</div>
|
|
36
|
+
{/if}
|
|
37
|
+
|
|
38
|
+
<style>
|
|
39
|
+
.edit-mode {
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
align-self: stretch;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
gap: 8px;
|
|
45
|
+
}
|
|
46
|
+
.edit-mode :global(.wrapper .content) {
|
|
47
|
+
flex-direction: row;
|
|
48
|
+
}
|
|
49
|
+
.edit-mode :global(.wrapper .content:has(.message .labels)) {
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
}
|
|
52
|
+
.edit-mode :global(.wrapper) {
|
|
53
|
+
align-items: start;
|
|
54
|
+
width: 100%;
|
|
55
|
+
}
|
|
56
|
+
.edit-mode :global(.wrapper svg:first-of-type) {
|
|
57
|
+
height: 15px;
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as EditModeMessage } from './EditModeMessage.svelte';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as EditModeMessage } from './EditModeMessage.svelte';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { Component, Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
export interface LayoutTab {
|
|
4
|
+
path: string;
|
|
5
|
+
name: string;
|
|
6
|
+
icon: Component;
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
hidden?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface LayoutFooter {
|
|
11
|
+
buttons: Array<{
|
|
12
|
+
id: string;
|
|
13
|
+
text: string;
|
|
14
|
+
variant: 'primary' | 'secondary';
|
|
15
|
+
icon?: Component;
|
|
16
|
+
onClick?: () => void;
|
|
17
|
+
}>;
|
|
18
|
+
}
|
|
19
|
+
export interface LayoutNotification {
|
|
20
|
+
path: string;
|
|
21
|
+
success: boolean;
|
|
22
|
+
message: string;
|
|
23
|
+
showNotification: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface LayoutProps extends HTMLAttributes<HTMLDivElement> {
|
|
26
|
+
activeTab: string;
|
|
27
|
+
switchTab: (tab: string) => void;
|
|
28
|
+
tabs: LayoutTab[];
|
|
29
|
+
main?: Snippet;
|
|
30
|
+
sidebar?: Snippet;
|
|
31
|
+
previewBar?: Snippet;
|
|
32
|
+
footer?: LayoutFooter;
|
|
33
|
+
formKey: string;
|
|
34
|
+
editMode?: boolean;
|
|
35
|
+
showFooter?: boolean;
|
|
36
|
+
showSidebar?: boolean;
|
|
37
|
+
showTabs?: boolean;
|
|
38
|
+
showPreviewBar?: boolean;
|
|
39
|
+
sidebarWidth?: string;
|
|
40
|
+
componentName?: string;
|
|
41
|
+
instanceName?: string;
|
|
42
|
+
containerMode?: boolean;
|
|
43
|
+
footerSize?: 'normal' | 'large';
|
|
44
|
+
notifications?: LayoutNotification[];
|
|
45
|
+
}
|
|
46
|
+
export interface LayoutRoute {
|
|
47
|
+
path: string;
|
|
48
|
+
name: string;
|
|
49
|
+
icon: Component;
|
|
50
|
+
hidden?: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface LayoutEvents {
|
|
53
|
+
tabSwitch: {
|
|
54
|
+
detail: string;
|
|
55
|
+
};
|
|
56
|
+
sidebarToggle: {
|
|
57
|
+
detail: boolean;
|
|
58
|
+
};
|
|
59
|
+
}
|