slice-machine-ui 1.26.1-beta.8 → 2.0.0
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/.eslintrc.js +6 -1
- package/.storybook/preview.tsx +2 -1
- package/out/404.html +1 -1
- package/out/_next/static/QWi-WrYk9EtyMIs1RfQ3_/_buildManifest.js +1 -0
- package/out/_next/static/chunks/{183-ebd633fed7c74545.js → 183-6ad1d7303abecd2b.js} +1 -1
- package/out/_next/static/chunks/18539003-32a73014bab3a789.js +22 -0
- package/out/_next/static/chunks/188-2e42d5ebef697946.js +1 -0
- package/out/_next/static/chunks/569-2ae3e9666f3bf991.js +1 -0
- package/out/_next/static/chunks/614-5130fbdbcfab2d35.js +1 -0
- package/out/_next/static/chunks/661-78c8c89d258133b8.js +1 -0
- package/out/_next/static/chunks/756-b11a3060cdc2f2d3.js +10 -0
- package/out/_next/static/chunks/90-2d4bdae13d031364.js +1 -0
- package/out/_next/static/chunks/91-67c244a4a034c8de.js +1 -0
- package/out/_next/static/chunks/pages/_app-0fe871bb1059a05c.js +532 -0
- package/out/_next/static/chunks/pages/changelog-3f04a3d8747ae383.js +1 -0
- package/out/_next/static/chunks/pages/changes-ec62e7eb50d6f2be.js +1 -0
- package/out/_next/static/chunks/pages/custom-types/[customTypeId]-982ecf1d799b6bcf.js +1 -0
- package/out/_next/static/chunks/pages/{custom-types-3c8e721ec6802127.js → custom-types-900b40b54b74e6d6.js} +1 -1
- package/out/_next/static/chunks/pages/{index-cf93d16e9c63b6db.js → index-ccd2975faba412f6.js} +1 -1
- package/out/_next/static/chunks/pages/labs-830dde0b85d6dd01.js +1 -0
- package/out/_next/static/chunks/pages/page-types/[pageTypeId]-886fc28240831dae.js +1 -0
- package/out/_next/static/chunks/pages/settings-f61144a9387fd6f1.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-9bdb355306fca592.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-ad66e6c755798ce7.js +1 -0
- package/out/_next/static/chunks/pages/slices-d65be4ca817a766d.js +1 -0
- package/out/_next/static/css/037ba37d121d4afe.css +1 -0
- package/out/_next/static/css/22f264c93bd9d85f.css +1 -0
- package/out/_next/static/css/6279e95f6aff22d5.css +1 -0
- package/out/_next/static/css/824d6e761aed01d2.css +1 -0
- package/out/_next/static/css/e3ffbc7931a47375.css +1 -0
- package/out/_next/static/css/f01f60095c76c7fb.css +1 -0
- package/out/changelog.html +1 -1
- package/out/changes.html +1 -1
- package/out/custom-types/[customTypeId].html +1 -1
- package/out/custom-types.html +1 -1
- package/out/index.html +1 -1
- package/out/labs.html +1 -1
- package/out/page-types/[pageTypeId].html +1 -1
- package/out/settings.html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
- package/out/slices.html +1 -1
- package/package.json +10 -11
- package/sentry.client.config.ts +2 -1
- package/src/ErrorBoundary.tsx +1 -1
- package/src/apiClient.ts +13 -9
- package/src/components/BaseHoverCard/BaseHoverCard.module.css +18 -0
- package/src/components/BaseHoverCard/BaseHoverCard.module.css.d.ts +7 -0
- package/src/components/BaseHoverCard/BaseHoverCard.stories.tsx +1 -1
- package/src/components/BaseHoverCard/BaseHoverCard.test.tsx +1 -1
- package/src/components/BaseHoverCard/BaseHoverCard.tsx +2 -2
- package/src/components/BlankSlate/BlankSlate.module.css +74 -0
- package/src/components/BlankSlate/BlankSlate.module.css.d.ts +13 -0
- package/src/components/BlankSlate/BlankSlate.stories.tsx +1 -1
- package/src/components/BlankSlate/BlankSlate.tsx +1 -1
- package/src/components/BlankSlate/index.ts +1 -1
- package/src/components/Breadcrumb/Breadcrumb.tsx +1 -1
- package/src/components/Card/Card.module.css +202 -0
- package/src/components/Card/Card.module.css.d.ts +22 -0
- package/src/components/Card/Card.stories.tsx +3 -3
- package/src/components/Card/Card.tsx +8 -8
- package/src/components/CodeBlock/CodeBlock.module.css +46 -0
- package/src/components/CodeBlock/CodeBlock.module.css.d.ts +10 -0
- package/src/components/CodeBlock/CodeBlock.tsx +7 -7
- package/src/components/ContentTabs/ContentTabs.module.css +60 -0
- package/src/components/ContentTabs/ContentTabs.module.css.d.ts +12 -0
- package/src/components/ContentTabs/ContentTabs.tsx +2 -2
- package/src/components/Count/Count.tsx +1 -1
- package/src/components/Divider/Divider.module.css +23 -0
- package/src/components/Divider/Divider.module.css.d.ts +7 -0
- package/src/components/Divider/Divider.stories.tsx +3 -4
- package/src/components/Divider/Divider.tsx +5 -8
- package/src/components/HoverCard/HoverCard.module.css +79 -0
- package/src/components/HoverCard/HoverCard.module.css.d.ts +13 -0
- package/src/components/HoverCard/HoverCard.stories.tsx +3 -2
- package/src/components/HoverCard/HoverCard.test.tsx +2 -2
- package/src/components/HoverCard/HoverCard.tsx +3 -3
- package/src/components/HoverCard/index.ts +3 -3
- package/src/components/List/List.css.ts +4 -2
- package/src/components/PageLayout/PageLayout.module.css +1 -1
- package/src/components/SideNav/SideNav.module.css +1 -1
- package/src/components/SideNav/SideNav.stories.tsx +6 -6
- package/src/components/SideNav/SideNav.tsx +8 -8
- package/src/components/SideNav/SideNavEnvironmentSelector.tsx +10 -12
- package/src/components/Table/Table.stories.tsx +2 -2
- package/src/components/Table/Table.test.tsx +2 -2
- package/src/components/Table/Table.tsx +2 -2
- package/src/components/Table/index.ts +1 -1
- package/src/components/TextLink/TextLink.module.css +58 -0
- package/src/components/TextLink/TextLink.module.css.d.ts +11 -0
- package/src/components/TextLink/TextLink.stories.tsx +1 -1
- package/src/components/TextLink/TextLink.tsx +5 -5
- package/src/domain/__tests__/customType.test.ts +1 -186
- package/src/domain/__tests__/group.test.ts +161 -0
- package/src/domain/__tests__/slice.test.ts +3 -3
- package/src/domain/customType.ts +1 -193
- package/src/domain/group.ts +89 -0
- package/src/domain/slice.ts +28 -12
- package/src/features/autoSave/AutoSaveStatusIndicator.tsx +2 -2
- package/src/features/changelog/useSliceMachineLatestNonBreakingVersion.ts +1 -1
- package/src/features/changelog/useSliceMachineReleaseNotes.ts +1 -1
- package/src/features/changelog/useSliceMachineVersions.ts +2 -2
- package/src/features/changes/BlankSlates/NoChangesBlankSlate.tsx +11 -14
- package/src/features/changes/PushChangesButton.tsx +5 -5
- package/src/features/changes/StatusBadge.tsx +2 -2
- package/src/features/customTypes/EditDropdown.tsx +6 -9
- package/src/features/customTypes/PageTypeOnboarding.tsx +5 -5
- package/src/features/customTypes/__tests__/CustomTypeBuilderPage.test.tsx +11 -12
- package/src/features/customTypes/__tests__/CustomTypesTablePage.test.tsx +11 -10
- package/src/features/customTypes/actions/convertCustomToPageType.ts +4 -4
- package/src/features/customTypes/actions/createCustomType.ts +5 -5
- package/src/features/customTypes/actions/deleteCustomType.ts +3 -3
- package/src/features/customTypes/actions/renameCustomType.ts +3 -3
- package/src/features/customTypes/customTypesBuilder/CustomTypeProvider.tsx +8 -8
- package/src/features/customTypes/customTypesBuilder/CustomTypesBuilderPage.tsx +17 -12
- package/src/features/customTypes/customTypesBuilder/PageSnippetDialog/PageSnippetDialog.module.css +8 -0
- package/src/features/customTypes/customTypesBuilder/PageSnippetDialog/PageSnippetDialog.module.css.d.ts +5 -0
- package/src/features/customTypes/customTypesBuilder/PageSnippetDialog/PageSnippetDialog.tsx +8 -8
- package/src/features/customTypes/customTypesBuilder/SliceZoneBlankSlate.tsx +3 -3
- package/src/features/customTypes/customTypesBuilder/useCustomType.ts +1 -1
- package/src/features/customTypes/customTypesConfig.ts +2 -2
- package/src/features/customTypes/customTypesTable/CustomTypesTable.tsx +16 -16
- package/src/features/customTypes/customTypesTable/CustomTypesTablePage.tsx +9 -9
- package/src/features/customTypes/customTypesTable/useCustomTypes.ts +8 -8
- package/src/features/documentation/MarkdownRenderer/MarkdownRenderer.module.css +11 -0
- package/src/features/documentation/MarkdownRenderer/MarkdownRenderer.module.css.d.ts +6 -0
- package/src/features/documentation/MarkdownRenderer/index.tsx +6 -7
- package/src/features/documentation/useDocumentation.ts +1 -1
- package/src/features/environments/actions/getActiveEnvironment.ts +1 -1
- package/src/features/environments/actions/getEnvironments.ts +1 -1
- package/src/features/environments/actions/setEnvironment.ts +3 -3
- package/src/features/inAppGuide/InAppGuideContext.tsx +2 -2
- package/src/features/inAppGuide/InAppGuideDialog.tsx +4 -4
- package/src/features/inAppGuide/inAppGuideContent.tsx +4 -4
- package/src/features/labs/labsList/LabsList.tsx +2 -2
- package/src/features/labs/labsList/LabsListItem.tsx +1 -1
- package/src/features/labs/labsList/LabsPage.tsx +5 -5
- package/src/features/labs/labsList/useLab.tsx +1 -1
- package/src/features/settings/SettingsPage.tsx +4 -4
- package/src/features/settings/git/ConnectGitRepository.tsx +9 -9
- package/src/features/settings/git/GitOwnerSelect.tsx +1 -1
- package/src/features/settings/git/GitProvider.ts +4 -4
- package/src/features/settings/git/GitProviderConnectButtons.tsx +1 -1
- package/src/features/settings/git/GitRepositoriesList.tsx +5 -5
- package/src/features/settings/git/GitRepositoriesSearch.tsx +5 -5
- package/src/features/settings/git/GitRepositoryConnectDialog.tsx +5 -8
- package/src/features/settings/git/useGitIntegrationExperiment.ts +1 -1
- package/src/features/settings/git/useGitOwners.ts +1 -1
- package/src/features/settings/git/useGitRepos.ts +1 -1
- package/src/features/settings/git/useLinkedGitRepos.ts +2 -2
- package/src/features/settings/git/useWriteAPIToken.ts +2 -2
- package/src/features/slices/actions/addSlicesToSliceZone.ts +2 -2
- package/src/features/slices/actions/createSlice.ts +5 -5
- package/src/features/slices/actions/deleteSlice.ts +1 -1
- package/src/features/slices/actions/renameSlice.ts +4 -4
- package/src/features/slices/actions/uploadSliceScreenshot.ts +2 -2
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewSliceDialog.tsx +10 -10
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewVariationDialog.tsx +7 -7
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.module.css +14 -0
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.module.css.d.ts +6 -0
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.tsx +12 -12
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceMergeWithIdenticalDialog.tsx +5 -8
- package/src/features/slices/convertLegacySlice/types.ts +2 -2
- package/src/features/slices/sliceBuilder/FloatingBackButton.tsx +6 -6
- package/src/features/slices/sliceBuilder/SliceBuilderProvider.tsx +9 -9
- package/src/features/slices/sliceBuilder/actions/deleteVariation.ts +4 -4
- package/src/features/slices/sliceBuilder/actions/renameVariation.ts +3 -3
- package/src/features/slices/sliceCards/NonSharedSliceCard.tsx +4 -4
- package/src/features/slices/sliceCards/SharedSliceCard.tsx +7 -7
- package/src/features/slicesTemplates/actions/createSlicesTemplates.ts +2 -2
- package/src/features/slicesTemplates/useSlicesTemplates.ts +2 -1
- package/src/features/sync/AutoSyncProvider.tsx +17 -17
- package/src/features/sync/actions/pushChanges.ts +4 -3
- package/src/features/sync/actions/trackPushChangesSuccess.ts +3 -3
- package/src/features/sync/components/AutoSyncStatusIndicator.module.css +1 -1
- package/src/features/sync/components/AutoSyncStatusIndicator.tsx +4 -4
- package/src/features/sync/fetchUnSyncChanges.ts +5 -5
- package/src/features/sync/getUnSyncChanges.ts +9 -9
- package/src/features/sync/useUnSyncChanges.ts +5 -5
- package/src/hooks/useActionQueue.tsx +5 -5
- package/src/hooks/useAdapterName.ts +1 -1
- package/src/hooks/useAuthStatus.ts +2 -2
- package/src/hooks/useCurrentSlice.tsx +4 -4
- package/src/hooks/useEditorContent.ts +5 -4
- package/src/hooks/useExperimentVariant.ts +2 -2
- package/src/hooks/useIsEmptyProject.ts +1 -1
- package/src/hooks/useRepositoryInformation.ts +2 -2
- package/src/hooks/useRouteChange.tsx +1 -1
- package/src/hooks/useSMTracker.ts +6 -6
- package/src/hooks/useScreenshotChangesModal.ts +5 -4
- package/src/hooks/useServerState.ts +4 -4
- package/src/hooks/useSliceMachineConfig.ts +2 -2
- package/src/hooks/useSliceMachineRunningVersion.ts +1 -1
- package/src/hooks/useThrottle.ts +1 -1
- package/src/hooks/useUpdateAvailable.ts +1 -1
- package/src/hooks/useWindowDimensions.ts +1 -1
- package/src/hooks/useWindowSize.ts +2 -1
- package/{components → src/legacy/components}/App/index.tsx +8 -8
- package/{components → src/legacy/components}/AppLayout/index.tsx +5 -6
- package/{components → src/legacy/components}/AuthInstructions/index.jsx +1 -1
- package/{components → src/legacy/components}/Button/index.tsx +1 -2
- package/{components → src/legacy/components}/Card/Default.jsx +2 -1
- package/{components → src/legacy/components}/Card/Preview.jsx +1 -1
- package/{components → src/legacy/components}/Card/WithTabs/index.jsx +4 -3
- package/{components → src/legacy/components}/Card/index.tsx +1 -0
- package/{components → src/legacy/components}/Changelog/index.tsx +8 -8
- package/{components → src/legacy/components}/Changelog/navigation/VersionBadge.tsx +2 -1
- package/{components → src/legacy/components}/Changelog/navigation/VersionTag.tsx +1 -0
- package/{components → src/legacy/components}/Changelog/navigation/index.tsx +6 -6
- package/{components → src/legacy/components}/Changelog/versionDetails/UpdateCommandBox.tsx +6 -6
- package/{components → src/legacy/components}/Changelog/versionDetails/VersionKindLabel.tsx +3 -4
- package/{components → src/legacy/components}/Changelog/versionDetails/index.tsx +5 -5
- package/{components → src/legacy/components}/ChangesEmptyState/AuthErrorPage.tsx +5 -5
- package/{components → src/legacy/components}/ChangesItems/ChangesItems.tsx +14 -14
- package/{components → src/legacy/components}/ChangesItems/DevCollaborationExperiment.tsx +3 -3
- package/{components → src/legacy/components}/CodeBlock/index.tsx +3 -3
- package/{components → src/legacy/components}/ConfigErrors/index.jsx +4 -3
- package/{components → src/legacy/components}/CustomTypeTable/changesPage.tsx +9 -8
- package/{components → src/legacy/components}/DeleteCTModal/index.tsx +9 -9
- package/{components → src/legacy/components}/DeleteDocumentsDrawer/AssociatedDocumentsCard.tsx +4 -4
- package/{components → src/legacy/components}/DeleteDocumentsDrawer/HardDeleteDocumentsDrawer.tsx +9 -9
- package/{components → src/legacy/components}/DeleteDocumentsDrawer/SoftDeleteDocumentsDrawer.tsx +9 -8
- package/{components → src/legacy/components}/DeleteSliceModal/index.tsx +6 -6
- package/{components → src/legacy/components}/DeleteVariationModal/index.tsx +6 -6
- package/{components → src/legacy/components}/DropDownSelector/index.tsx +2 -4
- package/{components → src/legacy/components}/EmptyState/index.tsx +3 -3
- package/{components → src/legacy/components}/FormFields/Array.jsx +2 -4
- package/{components → src/legacy/components}/FormFields/Checkbox.jsx +1 -1
- package/{components → src/legacy/components}/FormFields/CheckboxControl.jsx +1 -1
- package/{components → src/legacy/components}/FormFields/Input.tsx +3 -2
- package/{components → src/legacy/components}/FormFields/SelectDefaultValue.jsx +1 -1
- package/{components → src/legacy/components}/Forms/CreateCustomTypeModal/CreateCustomTypeModal.tsx +18 -18
- package/{components → src/legacy/components}/Forms/CreateSliceModal/CreateSliceModal.tsx +10 -10
- package/{components → src/legacy/components}/Forms/RenameCustomTypeModal/RenameCustomTypeModal.tsx +12 -12
- package/{components → src/legacy/components}/Forms/RenameSliceModal/RenameSliceModal.tsx +8 -8
- package/src/legacy/components/Forms/RenameVariationModal/RenameVariationModal.module.css +5 -0
- package/src/legacy/components/Forms/RenameVariationModal/RenameVariationModal.module.css.d.ts +5 -0
- package/{components → src/legacy/components}/Forms/RenameVariationModal/RenameVariationModal.tsx +7 -7
- package/{components → src/legacy/components}/Forms/components/InputBox.tsx +2 -2
- package/{components → src/legacy/components}/Forms/components/SelectRepeatable.tsx +4 -3
- package/{components → src/legacy/components}/Forms/formsValidator.ts +6 -4
- package/{components → src/legacy/components}/FullPage/index.tsx +1 -1
- package/{components → src/legacy/components}/ListItem/Header.tsx +3 -2
- package/{components → src/legacy/components}/ListItem/index.tsx +8 -10
- package/{components → src/legacy/components}/LoadingPage/index.tsx +1 -0
- package/{components → src/legacy/components}/LoginModal/index.tsx +22 -22
- package/{components → src/legacy/components}/ModalFormCard/index.tsx +7 -6
- package/{components → src/legacy/components}/Navigation/ChangesItem.tsx +18 -16
- package/{components → src/legacy/components}/Navigation/Environment.tsx +13 -13
- package/{components → src/legacy/components}/Navigation/RunningVersion.tsx +2 -2
- package/{components → src/legacy/components}/Navigation/UpdateBox.tsx +3 -3
- package/src/legacy/components/Navigation/VideoItem.module.css.d.ts +5 -0
- package/{components → src/legacy/components}/Navigation/VideoItem.tsx +14 -13
- package/src/legacy/components/Navigation/index.module.css +3 -0
- package/src/legacy/components/Navigation/index.module.css.d.ts +5 -0
- package/{components → src/legacy/components}/Navigation/index.test.tsx +12 -12
- package/{components → src/legacy/components}/Navigation/index.tsx +20 -21
- package/{components → src/legacy/components}/ReviewModal/ReviewForm.tsx +12 -12
- package/{components → src/legacy/components}/ReviewModal/ReviewModal.tsx +6 -6
- package/{components → src/legacy/components}/ScreenshotChangesModal/VariationDropZone.tsx +7 -7
- package/{components → src/legacy/components}/ScreenshotChangesModal/index.tsx +12 -15
- package/{components → src/legacy/components}/ScreenshotChangesModal/useCustomScreenshot.tsx +1 -1
- package/{components → src/legacy/components}/ScreenshotPreviewModal/index.tsx +8 -7
- package/{components → src/legacy/components}/Simulator/components/FailedConnect/index.tsx +3 -3
- package/{components → src/legacy/components}/Simulator/components/Header/VariationsPopover/MenuList.tsx +2 -1
- package/{components → src/legacy/components}/Simulator/components/Header/VariationsPopover/index.tsx +4 -5
- package/{components → src/legacy/components}/Simulator/components/Header/index.tsx +7 -7
- package/{components → src/legacy/components}/Simulator/components/IframeRenderer/index.tsx +3 -4
- package/{components → src/legacy/components}/Simulator/components/Toolbar/ScreensizeInput/index.tsx +2 -1
- package/{components → src/legacy/components}/Simulator/components/Toolbar/index.tsx +4 -5
- package/{components → src/legacy/components}/Simulator/index.tsx +25 -30
- package/{components → src/legacy/components}/SliceMachineDrawer/index.tsx +3 -2
- package/{components → src/legacy/components}/ToasterContainer/index.tsx +3 -5
- package/{components → src/legacy/components}/Tooltip/TextWithTooltip.tsx +2 -2
- package/{components → src/legacy/components}/Tooltip/index.jsx +2 -2
- package/{components → src/legacy/components}/Warnings/index.jsx +1 -1
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/DeleteSliceZoneModal.tsx +4 -4
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/List.tsx +8 -8
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/SlicesTemplatesModal.tsx +11 -11
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModal.tsx +3 -3
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModalList.tsx +4 -3
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/index.tsx +26 -23
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/sliceTemplatesComingSoon.ts +1 -1
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/InputBox.tsx +1 -1
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/create.tsx +2 -1
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/delete.tsx +2 -2
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/update.tsx +3 -2
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabZone/index.tsx +34 -32
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/index.tsx +5 -5
- package/{lib → src/legacy/lib}/builders/SliceBuilder/FieldZones/index.tsx +43 -52
- package/{lib → src/legacy/lib}/builders/SliceBuilder/SimulatorButton/index.tsx +12 -11
- package/{lib/builders/SliceBuilder/Sidebar → src/legacy/lib/builders/SliceBuilder/VariationsList}/AddVariationModal.tsx +7 -7
- package/src/legacy/lib/builders/SliceBuilder/VariationsList/VariationsList.module.css +10 -0
- package/src/legacy/lib/builders/SliceBuilder/VariationsList/VariationsList.module.css.d.ts +5 -0
- package/src/legacy/lib/builders/SliceBuilder/VariationsList/index.tsx +253 -0
- package/{lib → src/legacy/lib}/builders/SliceBuilder/index.tsx +18 -13
- package/{lib → src/legacy/lib}/builders/common/EditModal/Field.jsx +3 -5
- package/{lib → src/legacy/lib}/builders/common/EditModal/Form.jsx +1 -1
- package/{lib → src/legacy/lib}/builders/common/EditModal/index.jsx +14 -16
- package/{lib → src/legacy/lib}/builders/common/SelectFieldTypeModal/index.jsx +3 -4
- package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/ErrorTooltip.tsx +2 -2
- package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/Hints/CodeBlock.tsx +4 -5
- package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/Hints/index.tsx +2 -1
- package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/NewField.tsx +16 -13
- package/{lib → src/legacy/lib}/builders/common/Zone/Card/index.jsx +15 -9
- package/src/legacy/lib/builders/common/Zone/components/ZoneEmptyState/ZoneEmptyState.module.css +12 -0
- package/src/legacy/lib/builders/common/Zone/components/ZoneEmptyState/ZoneEmptyState.module.css.d.ts +5 -0
- package/src/legacy/lib/builders/common/Zone/components/ZoneEmptyState/ZoneEmptyState.tsx +39 -0
- package/src/legacy/lib/builders/common/Zone/components/ZoneEmptyState/index.tsx +1 -0
- package/{lib → src/legacy/lib}/builders/common/Zone/index.jsx +37 -19
- package/{lib → src/legacy/lib}/builders/utils/index.ts +1 -1
- package/{lib → src/legacy/lib}/forms/fields.ts +1 -2
- package/{lib → src/legacy/lib}/forms/index.ts +1 -0
- package/{lib → src/legacy/lib}/models/common/CustomType/index.ts +5 -4
- package/{lib → src/legacy/lib}/models/common/CustomType/sliceZone.ts +2 -1
- package/{lib → src/legacy/lib}/models/common/DeprecatedMockConfigMessage.tsx +3 -2
- package/{lib → src/legacy/lib}/models/common/Environment.ts +2 -2
- package/{lib → src/legacy/lib}/models/common/Group.ts +3 -2
- package/{lib → src/legacy/lib}/models/common/Library.ts +2 -1
- package/{lib → src/legacy/lib}/models/common/LibraryUI.ts +1 -1
- package/{lib → src/legacy/lib}/models/common/ModelData.ts +3 -3
- package/{lib → src/legacy/lib}/models/common/ModelStatus/compareCustomTypeModels.ts +2 -1
- package/{lib → src/legacy/lib}/models/common/ModelStatus/compareSliceModels.ts +2 -1
- package/{lib → src/legacy/lib}/models/common/ModelStatus/index.ts +10 -9
- package/{lib → src/legacy/lib}/models/common/Slice.ts +19 -5
- package/{lib → src/legacy/lib}/models/common/normalizers/customType.ts +2 -2
- package/{lib → src/legacy/lib}/models/common/normalizers/slices.ts +3 -2
- package/{lib → src/legacy/lib}/models/common/widgets/Boolean/index.ts +5 -7
- package/{lib → src/legacy/lib}/models/common/widgets/Color/index.ts +2 -3
- package/{lib → src/legacy/lib}/models/common/widgets/ContentRelationship/Form.tsx +9 -10
- package/{lib → src/legacy/lib}/models/common/widgets/ContentRelationship/index.ts +7 -7
- package/{lib → src/legacy/lib}/models/common/widgets/GeoPoint/index.ts +2 -3
- package/{lib → src/legacy/lib}/models/common/widgets/Group/Form.jsx +6 -6
- package/{lib → src/legacy/lib}/models/common/widgets/Group/ListItem/index.jsx +63 -76
- package/{lib → src/legacy/lib}/models/common/widgets/Group/index.ts +6 -4
- package/{lib → src/legacy/lib}/models/common/widgets/Image/Form.tsx +9 -11
- package/{lib → src/legacy/lib}/models/common/widgets/Image/components.tsx +6 -5
- package/{lib → src/legacy/lib}/models/common/widgets/Image/index.ts +3 -5
- package/{lib → src/legacy/lib}/models/common/widgets/Link/Form.jsx +5 -7
- package/{lib → src/legacy/lib}/models/common/widgets/LinkToMedia/Form.jsx +4 -6
- package/{lib → src/legacy/lib}/models/common/widgets/LinkToMedia/index.ts +4 -4
- package/{lib → src/legacy/lib}/models/common/widgets/Select/FormFields.jsx +7 -7
- package/{lib → src/legacy/lib}/models/common/widgets/Select/index.ts +3 -6
- package/{lib → src/legacy/lib}/models/common/widgets/StructuredText/Form.tsx +12 -11
- package/{lib → src/legacy/lib}/models/common/widgets/StructuredText/index.ts +3 -6
- package/{lib → src/legacy/lib}/models/common/widgets/StructuredText/options.tsx +2 -2
- package/{lib → src/legacy/lib}/models/common/widgets/Timestamp/index.ts +4 -5
- package/{lib → src/legacy/lib}/models/common/widgets/UID/index.ts +4 -5
- package/{lib → src/legacy/lib}/models/common/widgets/Widget.ts +3 -1
- package/src/legacy/lib/models/common/widgets/groupBuilderArray.ts +18 -0
- package/src/legacy/lib/models/common/widgets/sliceBuilderArray.ts +19 -0
- package/src/legacy/lib/models/common/widgets/withGroup.ts +2 -0
- package/{lib → src/legacy/lib}/models/server/ServerState.ts +4 -3
- package/{lib → src/legacy/lib}/utils/index.ts +4 -5
- package/{lib → src/legacy/lib}/utils/shared/customTypes.ts +1 -1
- package/src/modules/availableCustomTypes/index.ts +15 -13
- package/src/modules/availableCustomTypes/types.ts +2 -2
- package/src/modules/environment/index.ts +10 -8
- package/src/modules/environment/types.ts +1 -1
- package/src/modules/loading/index.ts +3 -2
- package/src/modules/modal/index.ts +4 -2
- package/src/modules/slices/index.ts +13 -9
- package/src/modules/slices/selector.ts +1 -1
- package/src/modules/slices/types.ts +2 -2
- package/src/modules/useSliceMachineActions.ts +25 -20
- package/src/modules/userContext/index.ts +5 -3
- package/{pages → src/pages}/_app.tsx +23 -25
- package/{pages → src/pages}/changelog.tsx +1 -1
- package/{pages → src/pages}/changes.tsx +22 -19
- package/src/pages/custom-types/[customTypeId].tsx +1 -0
- package/{pages → src/pages}/custom-types.tsx +1 -1
- package/{pages → src/pages}/index.tsx +3 -3
- package/src/pages/labs.tsx +1 -0
- package/src/pages/page-types/[pageTypeId].tsx +1 -0
- package/src/pages/settings.tsx +1 -0
- package/{pages → src/pages}/slices/[lib]/[sliceName]/[variation]/index.tsx +3 -3
- package/{pages → src/pages}/slices/[lib]/[sliceName]/[variation]/simulator.tsx +2 -2
- package/{pages → src/pages}/slices.tsx +21 -21
- package/src/redux/reducer.ts +8 -7
- package/src/redux/store.ts +8 -6
- package/src/redux/type.ts +7 -6
- package/src/theme.ts +1 -2
- package/src/utils/getContentTypeForTracking.ts +21 -0
- package/test/__setup__.ts +10 -8
- package/test/__testutils__/createTestPlugin.ts +3 -2
- package/test/__testutils__/createTestProject.ts +5 -4
- package/test/__testutils__/index.tsx +6 -5
- package/test/__testutils__/mockAWSACLAPI.ts +1 -1
- package/test/__testutils__/mockCustomTypesAPI.ts +1 -1
- package/test/__testutils__/mockPrismicAuthAPI.ts +1 -1
- package/test/__testutils__/mockPrismicUserAPI.ts +2 -3
- package/test/__testutils__/readMSWFormData.ts +1 -1
- package/test/components/IframeRenderer.test.ts +3 -2
- package/test/lib/builders/EditModal.test.tsx +5 -3
- package/test/lib/builders/buildersUtils.test.ts +3 -3
- package/test/lib/consts.test.ts +6 -2
- package/test/lib/models/common/CustomType.test.ts +6 -2
- package/test/lib/models/common/ModelStatus.test.ts +6 -4
- package/test/lib/models/common/Slice.test.ts +3 -2
- package/test/lib/models/common/widgets/index.test.ts +8 -4
- package/test/lib/utils/index.test.ts +3 -2
- package/test/lib/utils/preferWroomBase.test.ts +3 -2
- package/test/lib/utils/shared/customTypes.test.ts +2 -1
- package/test/pages/slices.test.tsx +10 -10
- package/test/src/modules/__fixtures__/serverState.ts +3 -3
- package/test/src/modules/__fixtures__/sliceUtilsFactory.ts +3 -3
- package/test/src/modules/availableCustomTypes/index.test.ts +3 -3
- package/test/src/modules/environment.test.ts +3 -5
- package/test/src/modules/loading.test.ts +3 -3
- package/test/src/modules/modal.test.ts +5 -5
- package/test/src/modules/slices.test.ts +3 -2
- package/test/src/modules/userContext.test.ts +3 -3
- package/test/src/normalizers/customType.test.ts +16 -3
- package/test/src/utils/fieldNameCreator.test.ts +1 -1
- package/tsconfig.json +1 -6
- package/vite.config.ts +5 -10
- package/components/Forms/RenameVariationModal/RenameVariationModal.css.ts +0 -7
- package/components/Navigation/index.css.ts +0 -5
- package/lib/builders/SliceBuilder/Sidebar/index.tsx +0 -157
- package/lib/builders/common/Zone/components/EmptyState/index.tsx +0 -33
- package/lib/models/common/widgets/sliceBuilderArray.ts +0 -31
- package/lib/models/common/widgets/withGroup.ts +0 -20
- package/out/_next/static/DDGXqSbSEqwX8wX_VNauB/_buildManifest.js +0 -1
- package/out/_next/static/chunks/18539003-a5a5d48f20a7b261.js +0 -97
- package/out/_next/static/chunks/25-792af14760d9df34.js +0 -1
- package/out/_next/static/chunks/286-e0950c3083c672e8.js +0 -1
- package/out/_next/static/chunks/318-77a29f41c3a027e3.js +0 -1
- package/out/_next/static/chunks/46-d22d7a121254e31d.js +0 -8
- package/out/_next/static/chunks/727-7536690b0938f88f.js +0 -1
- package/out/_next/static/chunks/799-7b910b896ff60ebe.js +0 -1
- package/out/_next/static/chunks/904-cac58924044acc83.js +0 -1
- package/out/_next/static/chunks/pages/_app-07e1633e9adb1796.js +0 -436
- package/out/_next/static/chunks/pages/changelog-4cee9fbfd4fdfc70.js +0 -1
- package/out/_next/static/chunks/pages/changes-b1d7cb1c845848ee.js +0 -1
- package/out/_next/static/chunks/pages/custom-types/[customTypeId]-d1a4a07e6b600fa6.js +0 -1
- package/out/_next/static/chunks/pages/labs-566a982a3e954547.js +0 -1
- package/out/_next/static/chunks/pages/page-types/[pageTypeId]-a724ff12ef322020.js +0 -1
- package/out/_next/static/chunks/pages/settings-6c2777758905c784.js +0 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-01d67e97cb901e46.js +0 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-a32fd588b27e92d7.js +0 -1
- package/out/_next/static/chunks/pages/slices-a633527fee62b6cd.js +0 -1
- package/out/_next/static/css/72465cc1225f28a2.css +0 -1
- package/out/_next/static/css/82840c077aa9a9d5.css +0 -1
- package/out/_next/static/css/838fd8bb5a7c32b0.css +0 -1
- package/out/_next/static/css/b22c0750c14cc089.css +0 -1
- package/out/_next/static/css/be1f49e49a5aa7eb.css +0 -1
- package/out/_next/static/css/f8eb526e10bc2441.css +0 -1
- package/pages/custom-types/[customTypeId].tsx +0 -1
- package/pages/labs.tsx +0 -1
- package/pages/page-types/[pageTypeId].tsx +0 -1
- package/pages/settings.tsx +0 -1
- package/src/components/BaseHoverCard/BaseHoverCard.css.ts +0 -25
- package/src/components/BlankSlate/BlankSlate.css.ts +0 -96
- package/src/components/Card/Card.css.ts +0 -188
- package/src/components/CodeBlock/CodeBlock.css.ts +0 -37
- package/src/components/ContentTabs/ContentTabs.css.ts +0 -49
- package/src/components/Divider/Divider.css.ts +0 -31
- package/src/components/HoverCard/HoverCard.css.ts +0 -105
- package/src/components/TextLink/TextLink.css.ts +0 -65
- package/src/features/customTypes/customTypesBuilder/PageSnippetDialog/PageSnippetDialog.css.ts +0 -12
- package/src/features/documentation/MarkdownRenderer/MarkdownRenderer.css.ts +0 -13
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.css.ts +0 -15
- package/src/features/slices/sliceBuilder/useGroupsInSlicesExperiment.ts +0 -8
- package/out/_next/static/{DDGXqSbSEqwX8wX_VNauB → QWi-WrYk9EtyMIs1RfQ3_}/_ssgManifest.js +0 -0
- package/{components → src/legacy/components}/Card/CardBox.tsx +0 -0
- package/{components → src/legacy/components}/Card/WithTabs/components.jsx +1 -1
- package/{components → src/legacy/components}/Changelog/versionDetails/ReleaseNotesDetails.tsx +1 -1
- package/{components → src/legacy/components}/ChangesEmptyState/OfflinePage.tsx +1 -1
- package/{components → src/legacy/components}/ChangesEmptyState/index.ts +1 -1
- package/{components → src/legacy/components}/ChangesItems/ErrorBanner.tsx +1 -1
- package/{components → src/legacy/components}/ChangesItems/index.ts +0 -0
- package/{components → src/legacy/components}/ChangesSectionHeader/ChangesSectionHeader.tsx +0 -0
- package/{components → src/legacy/components}/ChangesSectionHeader/index.ts +0 -0
- package/{components → src/legacy/components}/DeleteDocumentsDrawer/index.tsx +1 -1
- package/{components → src/legacy/components}/DropDownSelector/MenuList.tsx +0 -0
- package/{components → src/legacy/components}/Flex/index.tsx +0 -0
- package/{components → src/legacy/components}/FormFields/index.ts +0 -0
- package/{components → src/legacy/components}/Forms/CreateCustomTypeModal/index.tsx +0 -0
- package/{components → src/legacy/components}/Forms/CreateSliceModal/index.tsx +0 -0
- package/{components → src/legacy/components}/Forms/RenameCustomTypeModal/index.ts +0 -0
- package/{components → src/legacy/components}/Forms/RenameSliceModal/index.ts +0 -0
- package/{components → src/legacy/components}/Forms/RenameVariationModal/index.ts +0 -0
- package/{components → src/legacy/components}/Forms/components/FlexCard.tsx +0 -0
- package/{components → src/legacy/components}/Forms/formsTypes.ts +0 -0
- package/{components → src/legacy/components}/Grid/index.tsx +0 -0
- package/{components → src/legacy/components}/InputDeleteIcon/index.jsx +1 -1
- package/{components → src/legacy/components}/ItemHeader/index.tsx +1 -1
- package/{components → src/legacy/components}/Li/index.tsx +0 -0
- package/{components → src/legacy/components}/ListItem/utils.js +0 -0
- package/{components → src/legacy/components}/MissingLibraries/index.tsx +0 -0
- package/{components → src/legacy/components}/Navigation/VideoItem.module.css +0 -0
- package/{components → src/legacy/components}/ReactTooltipPortal/index.tsx +0 -0
- package/{components → src/legacy/components}/ReviewModal/ReviewFormSelect.tsx +1 -1
- package/{components → src/legacy/components}/ReviewModal/index.ts +0 -0
- package/{components → src/legacy/components}/ScreenshotPreview/index.tsx +1 -1
- package/{components → src/legacy/components}/Simulator/components/FullPage/index.tsx +0 -0
- package/{components → src/legacy/components}/Simulator/components/Header/links.ts +0 -0
- package/{components → src/legacy/components}/SliceMachineIconButton/index.tsx +1 -1
- package/{components → src/legacy/components}/SliceMachineModal/index.tsx +1 -1
- package/{components → src/legacy/components}/WindowPortal/index.js +0 -0
- package/{components → src/legacy/components}/YoutubeEmbed/index.tsx +0 -0
- package/{lib → src/legacy/lib}/builders/common/SelectFieldTypeModal/FieldTypeCard.jsx +0 -0
- package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/EditItem.jsx +0 -0
- package/{lib → src/legacy/lib}/consts.ts +0 -0
- package/{lib → src/legacy/lib}/env/sentry.ts +0 -0
- package/{lib → src/legacy/lib}/forms/defaults.ts +1 -1
- package/{lib → src/legacy/lib}/forms/types.ts +0 -0
- package/{lib → src/legacy/lib}/hljs/svelte.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/Auth.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/ComponentUI.ts +1 -1
- package/{lib → src/legacy/lib}/models/common/CustomType/tab.ts +4 -4
- package/{lib → src/legacy/lib}/models/common/ErrorWithStatus.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/Fields.ts +1 -1
- package/{lib → src/legacy/lib}/models/common/Manifest.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/PrismicData.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/PrismicFile.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/Screenshots.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/Simulator.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/Slices.ts +2 -2
- package/{lib → src/legacy/lib}/models/common/UserProfile.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/Warning.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/widgets/Date/index.ts +2 -2
- package/{lib → src/legacy/lib}/models/common/widgets/Embed/index.ts +2 -2
- package/{lib → src/legacy/lib}/models/common/widgets/Link/index.ts +3 -3
- package/{lib → src/legacy/lib}/models/common/widgets/Number/index.ts +2 -2
- package/{lib → src/legacy/lib}/models/common/widgets/Text/index.ts +5 -5
- package/{lib → src/legacy/lib}/models/common/widgets/ctBuilderArray.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/widgets/index.ts +1 -1
- /package/{lib → src/legacy/lib}/prismic/endpoints.ts +0 -0
- /package/{lib → src/legacy/lib}/utils/poll.ts +0 -0
- /package/{lib → src/legacy/lib}/utils/preferWroomBase.ts +0 -0
- /package/{lib → src/legacy/lib}/utils/repo.ts +0 -0
- /package/{lib → src/legacy/lib}/utils/str.ts +0 -0
- /package/{pages → src/pages}/api/embed.js +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import Modal from "react-modal";
|
|
2
1
|
import React from "react";
|
|
2
|
+
import Modal from "react-modal";
|
|
3
|
+
import { useSelector } from "react-redux";
|
|
4
|
+
import { toast } from "react-toastify";
|
|
3
5
|
import {
|
|
4
6
|
Button,
|
|
5
7
|
Card,
|
|
@@ -10,28 +12,26 @@ import {
|
|
|
10
12
|
Spinner,
|
|
11
13
|
Text,
|
|
12
14
|
} from "theme-ui";
|
|
13
|
-
import { toast } from "react-toastify";
|
|
14
|
-
import { useSelector } from "react-redux";
|
|
15
15
|
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import { AuthStatus } from "
|
|
33
|
-
import
|
|
34
|
-
import {
|
|
16
|
+
import { checkAuthStatus, getState, startAuth } from "@/apiClient";
|
|
17
|
+
import { getActiveEnvironment } from "@/features/environments/actions/getActiveEnvironment";
|
|
18
|
+
import { useAutoSync } from "@/features/sync/AutoSyncProvider";
|
|
19
|
+
import { getUnSyncedChanges } from "@/features/sync/getUnSyncChanges";
|
|
20
|
+
import SliceMachineModal from "@/legacy/components/SliceMachineModal";
|
|
21
|
+
import { CheckAuthStatusResponse } from "@/legacy/lib/models/common/Auth";
|
|
22
|
+
import { normalizeFrontendCustomTypes } from "@/legacy/lib/models/common/normalizers/customType";
|
|
23
|
+
import { normalizeFrontendSlices } from "@/legacy/lib/models/common/normalizers/slices";
|
|
24
|
+
import { buildEndpoints } from "@/legacy/lib/prismic/endpoints";
|
|
25
|
+
import { startPolling } from "@/legacy/lib/utils/poll";
|
|
26
|
+
import preferWroomBase from "@/legacy/lib/utils/preferWroomBase";
|
|
27
|
+
import { getEnvironment } from "@/modules/environment";
|
|
28
|
+
import { isLoading } from "@/modules/loading";
|
|
29
|
+
import { LoadingKeysEnum } from "@/modules/loading/types";
|
|
30
|
+
import { isModalOpen } from "@/modules/modal";
|
|
31
|
+
import { ModalKeysEnum } from "@/modules/modal/types";
|
|
32
|
+
import { AuthStatus } from "@/modules/userContext/types";
|
|
33
|
+
import useSliceMachineActions from "@/modules/useSliceMachineActions";
|
|
34
|
+
import { SliceMachineStoreType } from "@/redux/type";
|
|
35
35
|
|
|
36
36
|
interface ValidAuthStatus extends CheckAuthStatusResponse {
|
|
37
37
|
status: "ok";
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import Modal from "react-modal";
|
|
2
|
-
import SliceMachineModal from "@components/SliceMachineModal";
|
|
3
1
|
import {
|
|
4
|
-
Formik,
|
|
5
2
|
Form,
|
|
3
|
+
Formik,
|
|
6
4
|
FormikErrors,
|
|
5
|
+
FormikProps,
|
|
7
6
|
FormikTouched,
|
|
8
7
|
FormikValues,
|
|
9
|
-
FormikProps,
|
|
10
8
|
} from "formik";
|
|
11
9
|
import type {
|
|
12
10
|
ComponentPropsWithoutRef,
|
|
13
11
|
ReactNode,
|
|
14
12
|
SetStateAction,
|
|
15
13
|
} from "react";
|
|
16
|
-
import
|
|
14
|
+
import Modal from "react-modal";
|
|
15
|
+
import { Button as ThemeButton, Close, Flex, Heading } from "theme-ui";
|
|
16
|
+
|
|
17
|
+
import { Button } from "@/legacy/components/Button";
|
|
18
|
+
import SliceMachineModal from "@/legacy/components/SliceMachineModal";
|
|
17
19
|
|
|
18
|
-
import { Button } from "@components/Button";
|
|
19
20
|
import Card from "../Card";
|
|
20
21
|
|
|
21
22
|
type ModalCardProps<T extends FormikValues> = {
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { type FC } from "react";
|
|
2
|
-
import { useRouter } from "next/router";
|
|
3
|
-
import { useMediaQuery } from "@prismicio/editor-support/React";
|
|
4
1
|
import {
|
|
5
2
|
Box,
|
|
6
3
|
Button,
|
|
7
4
|
IconButton,
|
|
8
5
|
Text,
|
|
9
6
|
Tooltip,
|
|
10
|
-
|
|
7
|
+
useMediaQuery,
|
|
11
8
|
} from "@prismicio/editor-ui";
|
|
9
|
+
import { useRouter } from "next/router";
|
|
10
|
+
import { type FC } from "react";
|
|
12
11
|
|
|
13
12
|
import {
|
|
14
13
|
HoverCard,
|
|
@@ -16,22 +15,22 @@ import {
|
|
|
16
15
|
HoverCardDescription,
|
|
17
16
|
HoverCardMedia,
|
|
18
17
|
HoverCardTitle,
|
|
19
|
-
} from "
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import
|
|
18
|
+
} from "@/components/HoverCard";
|
|
19
|
+
import { useAutoSync } from "@/features/sync/AutoSyncProvider";
|
|
20
|
+
import { AutoSyncStatusIndicator } from "@/features/sync/components/AutoSyncStatusIndicator";
|
|
21
|
+
import { useUnSyncChanges } from "@/features/sync/useUnSyncChanges";
|
|
22
|
+
import { useAuthStatus } from "@/hooks/useAuthStatus";
|
|
23
|
+
import { useNetwork } from "@/hooks/useNetwork";
|
|
24
|
+
import { ChangesIcon } from "@/icons/ChangesIcon";
|
|
25
|
+
import { AuthStatus } from "@/modules/userContext/types";
|
|
26
|
+
import useSliceMachineActions from "@/modules/useSliceMachineActions";
|
|
28
27
|
|
|
29
28
|
export const ChangesItem: FC = () => {
|
|
30
29
|
const { setSeenChangesToolTip } = useSliceMachineActions();
|
|
31
30
|
const open = useOpenChangesHoverCard();
|
|
32
31
|
const router = useRouter();
|
|
33
32
|
const { autoSyncStatus } = useAutoSync();
|
|
34
|
-
const
|
|
33
|
+
const collapsed = useMediaQuery({ max: "medium" });
|
|
35
34
|
|
|
36
35
|
const onClose = () => {
|
|
37
36
|
setSeenChangesToolTip();
|
|
@@ -46,12 +45,15 @@ export const ChangesItem: FC = () => {
|
|
|
46
45
|
side="right"
|
|
47
46
|
sideOffset={24}
|
|
48
47
|
trigger={
|
|
49
|
-
<Box
|
|
48
|
+
<Box
|
|
49
|
+
alignItems={collapsed ? "center" : undefined}
|
|
50
|
+
flexDirection="column"
|
|
51
|
+
>
|
|
50
52
|
{autoSyncStatus === "failed" ||
|
|
51
53
|
autoSyncStatus === "synced" ||
|
|
52
54
|
autoSyncStatus === "syncing" ? (
|
|
53
55
|
<AutoSyncStatusIndicator autoSyncStatus={autoSyncStatus} />
|
|
54
|
-
) :
|
|
56
|
+
) : collapsed ? (
|
|
55
57
|
<Tooltip content="Review changes" side="right">
|
|
56
58
|
<Box position="relative">
|
|
57
59
|
{/*
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
1
|
import {
|
|
3
2
|
Environment as EnvironmentType,
|
|
4
3
|
isUnauthenticatedError,
|
|
5
4
|
isUnauthorizedError,
|
|
6
5
|
} from "@slicemachine/manager/client";
|
|
6
|
+
import { useState } from "react";
|
|
7
7
|
|
|
8
|
-
import { getState, telemetry } from "
|
|
9
|
-
import {
|
|
10
|
-
import { setEnvironment } from "
|
|
11
|
-
import { useActiveEnvironment } from "
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { normalizeFrontendCustomTypes } from "
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
8
|
+
import { getState, telemetry } from "@/apiClient";
|
|
9
|
+
import { SideNavEnvironmentSelector } from "@/components/SideNav";
|
|
10
|
+
import { setEnvironment } from "@/features/environments/actions/setEnvironment";
|
|
11
|
+
import { useActiveEnvironment } from "@/features/environments/useActiveEnvironment";
|
|
12
|
+
import { useEnvironments } from "@/features/environments/useEnvironments";
|
|
13
|
+
import { useAutoSync } from "@/features/sync/AutoSyncProvider";
|
|
14
|
+
import { getUnSyncedChanges } from "@/features/sync/getUnSyncChanges";
|
|
15
|
+
import { useAuthStatus } from "@/hooks/useAuthStatus";
|
|
16
|
+
import { useNetwork } from "@/hooks/useNetwork";
|
|
17
|
+
import { normalizeFrontendCustomTypes } from "@/legacy/lib/models/common/normalizers/customType";
|
|
18
|
+
import { normalizeFrontendSlices } from "@/legacy/lib/models/common/normalizers/slices";
|
|
19
|
+
import useSliceMachineActions from "@/modules/useSliceMachineActions";
|
|
20
20
|
|
|
21
21
|
export function Environment() {
|
|
22
22
|
const { environments, error: useEnvironmentsError } = useEnvironments();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
2
|
|
|
3
|
-
import { RightElement } from "
|
|
4
|
-
import { useSliceMachineRunningVersion } from "
|
|
3
|
+
import { RightElement } from "@/components/SideNav";
|
|
4
|
+
import { useSliceMachineRunningVersion } from "@/hooks/useSliceMachineRunningVersion";
|
|
5
5
|
|
|
6
6
|
export const RunningVersion: FC = () => {
|
|
7
7
|
const sliceMachineRunningVersion = useSliceMachineRunningVersion();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
1
|
import Link from "next/link";
|
|
2
|
+
import { FC } from "react";
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { UpdateInfo } from "@/components/SideNav";
|
|
5
|
+
import { useUpdateAvailable } from "@/hooks/useUpdateAvailable";
|
|
6
6
|
|
|
7
7
|
export const UpdateBox: FC = () => {
|
|
8
8
|
const { sliceMachineUpdateAvailable, adapterUpdateAvailable } =
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
type FC,
|
|
3
|
-
useCallback,
|
|
4
|
-
useRef,
|
|
5
|
-
RefCallback,
|
|
6
|
-
ReactNode,
|
|
7
3
|
forwardRef,
|
|
8
4
|
PropsWithChildren,
|
|
5
|
+
ReactNode,
|
|
6
|
+
RefCallback,
|
|
7
|
+
useCallback,
|
|
8
|
+
useRef,
|
|
9
9
|
} from "react";
|
|
10
10
|
import { useSelector } from "react-redux";
|
|
11
11
|
import ReactTooltip from "react-tooltip";
|
|
12
12
|
import { Close, Flex, Paragraph } from "theme-ui";
|
|
13
|
-
|
|
14
|
-
import { telemetry } from "
|
|
15
|
-
import { SideNavLink, SideNavListItem } from "@src/components/SideNav";
|
|
16
|
-
import { PlayCircleIcon } from "@src/icons/PlayCircleIcon";
|
|
13
|
+
|
|
14
|
+
import { telemetry } from "@/apiClient";
|
|
17
15
|
import {
|
|
18
16
|
HoverCard,
|
|
19
|
-
HoverCardDescription,
|
|
20
17
|
HoverCardCloseButton,
|
|
18
|
+
HoverCardDescription,
|
|
21
19
|
HoverCardMedia,
|
|
22
20
|
HoverCardTitle,
|
|
23
|
-
} from "
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
21
|
+
} from "@/components/HoverCard";
|
|
22
|
+
import { SideNavLink, SideNavListItem } from "@/components/SideNav";
|
|
23
|
+
import { useMarketingContent } from "@/hooks/useMarketingContent";
|
|
24
|
+
import { PlayCircleIcon } from "@/icons/PlayCircleIcon";
|
|
25
|
+
import { ReactTooltipPortal } from "@/legacy/components/ReactTooltipPortal";
|
|
26
|
+
import { getUserReview } from "@/modules/userContext";
|
|
27
|
+
import { SliceMachineStoreType } from "@/redux/type";
|
|
27
28
|
|
|
28
29
|
import style from "./VideoItem.module.css";
|
|
29
30
|
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
// @vitest-environment jsdom
|
|
2
|
-
import {
|
|
2
|
+
import { cache } from "@prismicio/editor-support/Suspense";
|
|
3
|
+
import { createSliceMachineManager } from "@slicemachine/manager";
|
|
4
|
+
import { createSliceMachineManagerMSWHandler } from "@slicemachine/manager/test";
|
|
3
5
|
import Router from "next/router";
|
|
4
6
|
import { act } from "react-dom/test-utils";
|
|
5
|
-
import {
|
|
6
|
-
import { createSliceMachineManager } from "@slicemachine/manager";
|
|
7
|
+
import { describe, expect, test, vi } from "vitest";
|
|
7
8
|
|
|
8
|
-
import { FrontEndEnvironment } from "@lib/models/common/Environment";
|
|
9
|
-
import { UserContextStoreType } from "@src/modules/userContext/types";
|
|
10
|
-
import { AuthStatus } from "@src/modules/userContext/types";
|
|
11
|
-
import { createTestPlugin } from "test/__testutils__/createTestPlugin";
|
|
12
|
-
import { createTestProject } from "test/__testutils__/createTestProject";
|
|
13
9
|
import {
|
|
14
10
|
render,
|
|
15
|
-
within,
|
|
16
|
-
screen,
|
|
17
11
|
type RenderReturnType,
|
|
12
|
+
screen,
|
|
18
13
|
waitFor,
|
|
19
|
-
|
|
14
|
+
within,
|
|
15
|
+
} from "@/../test/__testutils__";
|
|
16
|
+
import { createTestPlugin } from "@/../test/__testutils__/createTestPlugin";
|
|
17
|
+
import { createTestProject } from "@/../test/__testutils__/createTestProject";
|
|
18
|
+
import { FrontEndEnvironment } from "@/legacy/lib/models/common/Environment";
|
|
19
|
+
import { AuthStatus, UserContextStoreType } from "@/modules/userContext/types";
|
|
20
|
+
|
|
20
21
|
import SideNavigation from "./index";
|
|
21
|
-
import { cache } from "@prismicio/editor-support/Suspense";
|
|
22
22
|
|
|
23
23
|
const mockRouter = vi.mocked(Router);
|
|
24
24
|
|
|
@@ -1,39 +1,38 @@
|
|
|
1
1
|
import { Box } from "@prismicio/editor-ui";
|
|
2
|
-
import { Suspense, type FC } from "react";
|
|
3
2
|
import Link from "next/link";
|
|
4
3
|
import { useRouter } from "next/router";
|
|
4
|
+
import { type FC, Suspense } from "react";
|
|
5
5
|
import { useSelector } from "react-redux";
|
|
6
6
|
|
|
7
|
-
import { telemetry } from "
|
|
8
|
-
import
|
|
9
|
-
import { LightningIcon } from "@src/icons/Lightning";
|
|
10
|
-
import { MathPlusIcon } from "@src/icons/MathPlusIcon";
|
|
11
|
-
import { SettingsIcon } from "@src/icons/SettingsIcon";
|
|
12
|
-
import { CUSTOM_TYPES_CONFIG } from "@src/features/customTypes/customTypesConfig";
|
|
7
|
+
import { telemetry } from "@/apiClient";
|
|
8
|
+
import { Divider } from "@/components/Divider";
|
|
13
9
|
import {
|
|
10
|
+
SideNav,
|
|
14
11
|
SideNavLink,
|
|
15
|
-
SideNavListItem,
|
|
16
12
|
SideNavList,
|
|
17
|
-
|
|
13
|
+
SideNavListItem,
|
|
18
14
|
SideNavRepository,
|
|
19
|
-
} from "
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
15
|
+
} from "@/components/SideNav/SideNav";
|
|
16
|
+
import { ErrorBoundary } from "@/ErrorBoundary";
|
|
17
|
+
import { CUSTOM_TYPES_CONFIG } from "@/features/customTypes/customTypesConfig";
|
|
18
|
+
import { CUSTOM_TYPES_MESSAGES } from "@/features/customTypes/customTypesMessages";
|
|
19
|
+
import { useGitIntegrationExperiment } from "@/features/settings/git/useGitIntegrationExperiment";
|
|
20
|
+
import { useRepositoryInformation } from "@/hooks/useRepositoryInformation";
|
|
21
|
+
import { FolderIcon } from "@/icons/FolderIcon";
|
|
22
|
+
import { LightningIcon } from "@/icons/Lightning";
|
|
23
|
+
import { MathPlusIcon } from "@/icons/MathPlusIcon";
|
|
24
|
+
import { SettingsIcon } from "@/icons/SettingsIcon";
|
|
25
|
+
import VideoItem from "@/legacy/components/Navigation/VideoItem";
|
|
26
|
+
import { userHasSeenTutorialsToolTip } from "@/modules/userContext";
|
|
27
|
+
import useSliceMachineActions from "@/modules/useSliceMachineActions";
|
|
28
|
+
import { SliceMachineStoreType } from "@/redux/type";
|
|
29
29
|
|
|
30
30
|
import { ChangesItem } from "./ChangesItem";
|
|
31
31
|
import { Environment } from "./Environment";
|
|
32
|
+
import styles from "./index.module.css";
|
|
32
33
|
import { RunningVersion } from "./RunningVersion";
|
|
33
34
|
import { UpdateBox } from "./UpdateBox";
|
|
34
35
|
|
|
35
|
-
import * as styles from "./index.css";
|
|
36
|
-
|
|
37
36
|
const Navigation: FC = () => {
|
|
38
37
|
const { hasSeenTutorialsToolTip } = useSelector(
|
|
39
38
|
(store: SliceMachineStoreType) => ({
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
1
|
import { Field, Form, Formik } from "formik";
|
|
2
|
+
import { FC } from "react";
|
|
3
|
+
import Modal from "react-modal";
|
|
4
|
+
import { useSelector } from "react-redux";
|
|
3
5
|
import {
|
|
4
6
|
Box,
|
|
5
7
|
Button,
|
|
@@ -10,18 +12,16 @@ import {
|
|
|
10
12
|
Text,
|
|
11
13
|
Textarea,
|
|
12
14
|
} from "theme-ui";
|
|
13
|
-
import Modal from "react-modal";
|
|
14
|
-
import { useSelector } from "react-redux";
|
|
15
15
|
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import
|
|
24
|
-
import {
|
|
16
|
+
import { telemetry } from "@/apiClient";
|
|
17
|
+
import SliceMachineModal from "@/legacy/components/SliceMachineModal";
|
|
18
|
+
import { isLoading } from "@/modules/loading";
|
|
19
|
+
import { LoadingKeysEnum } from "@/modules/loading/types";
|
|
20
|
+
import { isModalOpen } from "@/modules/modal";
|
|
21
|
+
import { ModalKeysEnum } from "@/modules/modal/types";
|
|
22
|
+
import { UserReviewType } from "@/modules/userContext/types";
|
|
23
|
+
import useSliceMachineActions from "@/modules/useSliceMachineActions";
|
|
24
|
+
import { SliceMachineStoreType } from "@/redux/type";
|
|
25
25
|
|
|
26
26
|
import { ReviewFormSelect } from "./ReviewFormSelect";
|
|
27
27
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
2
|
import { useSelector } from "react-redux";
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { selectAllCustomTypes } from "
|
|
7
|
-
import { getLibraries } from "
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { useInAppGuide } from "@/features/inAppGuide/InAppGuideContext";
|
|
5
|
+
import { hasLocal } from "@/legacy/lib/models/common/ModelData";
|
|
6
|
+
import { selectAllCustomTypes } from "@/modules/availableCustomTypes";
|
|
7
|
+
import { getLibraries } from "@/modules/slices";
|
|
8
|
+
import { getLastSyncChange, getUserReview } from "@/modules/userContext";
|
|
9
|
+
import { SliceMachineStoreType } from "@/redux/type";
|
|
10
10
|
|
|
11
11
|
import { ReviewForm } from "./ReviewForm";
|
|
12
12
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
|
-
import { Flex, Text, Spinner } from "theme-ui";
|
|
3
2
|
import { useHotkeys } from "react-hotkeys-hook";
|
|
4
|
-
import { toast } from "react-toastify";
|
|
5
3
|
import { AiOutlineCloudUpload } from "react-icons/ai";
|
|
4
|
+
import { toast } from "react-toastify";
|
|
5
|
+
import { Flex, Spinner, Text } from "theme-ui";
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import { ComponentUI } from "
|
|
11
|
-
import
|
|
7
|
+
import { uploadSliceScreenshot } from "@/features/slices/actions/uploadSliceScreenshot";
|
|
8
|
+
import { ScreenshotPreview } from "@/legacy/components/ScreenshotPreview";
|
|
9
|
+
import { acceptedImagesTypes } from "@/legacy/lib/consts";
|
|
10
|
+
import { ComponentUI } from "@/legacy/lib/models/common/ComponentUI";
|
|
11
|
+
import useSliceMachineActions from "@/modules/useSliceMachineActions";
|
|
12
12
|
|
|
13
13
|
import useCustomScreenshot from "./useCustomScreenshot";
|
|
14
14
|
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
|
-
import { useSelector } from "react-redux";
|
|
3
|
-
import { Flex, Heading, Close, Box, Text } from "theme-ui";
|
|
4
|
-
|
|
5
|
-
import Card from "@components/Card";
|
|
6
2
|
import { AiOutlinePicture } from "react-icons/ai";
|
|
7
3
|
import { RiErrorWarningLine } from "react-icons/ri";
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
import { isModalOpen } from "@src/modules/modal";
|
|
4
|
+
import { useSelector } from "react-redux";
|
|
5
|
+
import { Box, Close, Flex, Heading, Text } from "theme-ui";
|
|
11
6
|
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import
|
|
7
|
+
import { Kbd } from "@/components/Kbd";
|
|
8
|
+
import { FigmaIcon } from "@/icons/FigmaIcon";
|
|
9
|
+
import Card from "@/legacy/components/Card";
|
|
10
|
+
import SliceMachineModal from "@/legacy/components/SliceMachineModal";
|
|
11
|
+
import { ComponentUI } from "@/legacy/lib/models/common/ComponentUI";
|
|
12
|
+
import { isModalOpen } from "@/modules/modal";
|
|
13
|
+
import { ModalKeysEnum } from "@/modules/modal/types";
|
|
14
|
+
import useSliceMachineActions from "@/modules/useSliceMachineActions";
|
|
15
|
+
import { SliceMachineStoreType } from "@/redux/type";
|
|
16
|
+
import { getOS, OS } from "@/utils/os";
|
|
16
17
|
|
|
17
18
|
import VariationDropZone from "./VariationDropZone";
|
|
18
19
|
|
|
19
|
-
import { FigmaIcon } from "@src/icons/FigmaIcon";
|
|
20
|
-
import { getOS, OS } from "@src/utils/os";
|
|
21
|
-
import { Kbd } from "@src/components/Kbd";
|
|
22
|
-
|
|
23
20
|
export type SliceVariationSelector = { sliceID: string; variationID: string };
|
|
24
21
|
|
|
25
22
|
const FigmaTip = () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useRef } from "react";
|
|
2
2
|
import { Label } from "theme-ui";
|
|
3
3
|
|
|
4
|
-
import { acceptedImagesTypes } from "
|
|
4
|
+
import { acceptedImagesTypes } from "@/legacy/lib/consts";
|
|
5
5
|
|
|
6
6
|
type HandleFileProp = {
|
|
7
7
|
inputFile: React.RefObject<HTMLInputElement>;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import SliceMachineModal from "@components/SliceMachineModal";
|
|
2
1
|
import { useSelector } from "react-redux";
|
|
3
|
-
import { SliceMachineStoreType } from "@src/redux/type";
|
|
4
|
-
import { isModalOpen } from "@src/modules/modal";
|
|
5
|
-
import { ModalKeysEnum } from "@src/modules/modal/types";
|
|
6
|
-
import useSliceMachineActions from "@src/modules/useSliceMachineActions";
|
|
7
2
|
import { Button, Close, Flex, Heading } from "theme-ui";
|
|
8
|
-
|
|
9
|
-
import
|
|
3
|
+
|
|
4
|
+
import Card from "@/legacy/components/Card";
|
|
5
|
+
import { ScreenshotPreview } from "@/legacy/components/ScreenshotPreview";
|
|
6
|
+
import SliceMachineModal from "@/legacy/components/SliceMachineModal";
|
|
7
|
+
import { isModalOpen } from "@/modules/modal";
|
|
8
|
+
import { ModalKeysEnum } from "@/modules/modal/types";
|
|
9
|
+
import useSliceMachineActions from "@/modules/useSliceMachineActions";
|
|
10
|
+
import { SliceMachineStoreType } from "@/redux/type";
|
|
10
11
|
|
|
11
12
|
type ScreenshotModalProps = {
|
|
12
13
|
sliceName: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { IoMdRefresh } from "react-icons/io";
|
|
1
2
|
import { Image, Link, Text } from "theme-ui";
|
|
2
|
-
import FullPage from "../FullPage";
|
|
3
3
|
|
|
4
|
-
import { Button } from "
|
|
4
|
+
import { Button } from "@/legacy/components/Button";
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import FullPage from "../FullPage";
|
|
7
7
|
|
|
8
8
|
const FailedConnect = ({ onRetrigger }: { onRetrigger: () => void }) => (
|
|
9
9
|
<FullPage>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { VariationSM } from "@lib/models/common/Slice";
|
|
2
1
|
import React from "react";
|
|
3
2
|
import { Box, Flex, Text } from "theme-ui";
|
|
4
3
|
|
|
4
|
+
import { VariationSM } from "@/legacy/lib/models/common/Slice";
|
|
5
|
+
|
|
5
6
|
const MenuList: React.FunctionComponent<{
|
|
6
7
|
defaultValue: VariationSM;
|
|
7
8
|
variations: ReadonlyArray<VariationSM>;
|
package/{components → src/legacy/components}/Simulator/components/Header/VariationsPopover/index.tsx
RENAMED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
|
2
|
+
import { RiArrowDropDownFill, RiArrowDropUpFill } from "react-icons/ri";
|
|
2
3
|
import { Popover } from "react-tiny-popover";
|
|
4
|
+
import { Box, Button, ThemeUICSSObject, ThemeUIStyleObject } from "theme-ui";
|
|
3
5
|
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import { Button, Box, ThemeUICSSObject, ThemeUIStyleObject } from "theme-ui";
|
|
6
|
+
import { VariationSM } from "@/legacy/lib/models/common/Slice";
|
|
7
7
|
|
|
8
|
-
import
|
|
9
|
-
import { VariationSM } from "@lib/models/common/Slice";
|
|
8
|
+
import MenuList from "./MenuList";
|
|
10
9
|
|
|
11
10
|
const VarationsPopover: React.FunctionComponent<{
|
|
12
11
|
buttonSx?: ThemeUICSSObject;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import router from "next/router";
|
|
2
|
-
import {
|
|
2
|
+
import { Flex, Label, Switch, Text } from "theme-ui";
|
|
3
3
|
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import * as Links from "
|
|
7
|
-
import
|
|
8
|
-
import { ComponentUI } from "
|
|
9
|
-
import { VariationSM } from "
|
|
4
|
+
import SliceMachineLogo from "@/icons/SliceMachineLogo";
|
|
5
|
+
import { Button } from "@/legacy/components/Button";
|
|
6
|
+
import * as Links from "@/legacy/components/Simulator/components/Header/links";
|
|
7
|
+
import VariationsPopover from "@/legacy/components/Simulator/components/Header/VariationsPopover";
|
|
8
|
+
import { ComponentUI } from "@/legacy/lib/models/common/ComponentUI";
|
|
9
|
+
import { VariationSM } from "@/legacy/lib/models/common/Slice";
|
|
10
10
|
|
|
11
11
|
const redirect = (
|
|
12
12
|
model: ComponentUI,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import { SimulatorClient } from "@prismicio/simulator";
|
|
1
2
|
import { RefCallback, useCallback, useEffect, useRef, useState } from "react";
|
|
2
|
-
|
|
3
3
|
import { Flex } from "theme-ui";
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { ScreenDimensions } from "@lib/models/common/Screenshots";
|
|
5
|
+
import { useElementSize } from "@/hooks/useElementSize";
|
|
6
|
+
import { ScreenDimensions } from "@/legacy/lib/models/common/Screenshots";
|
|
8
7
|
|
|
9
8
|
function useSimulatorClient(): readonly [
|
|
10
9
|
SimulatorClient | undefined,
|