slice-machine-ui 1.26.1-beta.11 → 1.26.1-beta.13

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.
Files changed (449) hide show
  1. package/out/404.html +1 -1
  2. package/out/_next/static/chunks/127-5f39b7de8178c2e4.js +1 -0
  3. package/out/_next/static/chunks/{183-ebd633fed7c74545.js → 183-6ad5c4eb28d4b155.js} +1 -1
  4. package/out/_next/static/chunks/453-4e2d00a3515202f4.js +1 -0
  5. package/out/_next/static/chunks/46-bd45510ac2a839b5.js +10 -0
  6. package/out/_next/static/chunks/614-af117b661cd3429a.js +1 -0
  7. package/out/_next/static/chunks/90-2d4bdae13d031364.js +1 -0
  8. package/out/_next/static/chunks/91-aa2369249805fb5a.js +1 -0
  9. package/out/_next/static/chunks/96-24fed6adc069e313.js +1 -0
  10. package/out/_next/static/chunks/pages/{_app-6177e3581af44083.js → _app-2e45ed74db68cb0a.js} +3 -3
  11. package/out/_next/static/chunks/pages/changelog-ac1004bdd31d17f8.js +1 -0
  12. package/out/_next/static/chunks/pages/changes-5c4bd80747884a8c.js +1 -0
  13. package/out/_next/static/chunks/pages/custom-types/[customTypeId]-5b08515fec5e6668.js +1 -0
  14. package/out/_next/static/chunks/pages/{custom-types-3c8e721ec6802127.js → custom-types-75e8eddec659f440.js} +1 -1
  15. package/out/_next/static/chunks/pages/index-16754a04037cf9c1.js +1 -0
  16. package/out/_next/static/chunks/pages/labs-d6f2feb6720ee64c.js +1 -0
  17. package/out/_next/static/chunks/pages/page-types/[pageTypeId]-41fc6d4f726fdfb9.js +1 -0
  18. package/out/_next/static/chunks/pages/settings-7ad1540dc0af794d.js +1 -0
  19. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-9941e7eeb9d4d084.js +1 -0
  20. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-8c8d4de562fca8ac.js +1 -0
  21. package/out/_next/static/chunks/pages/slices-801310de228fd05e.js +1 -0
  22. package/out/_next/static/css/17da9daaa8986410.css +1 -0
  23. package/out/_next/static/css/{27f2b9b9c9f65885.css → 663a1bac4ce890da.css} +1 -1
  24. package/out/_next/static/css/c36992b18975f9b9.css +1 -0
  25. package/out/_next/static/css/{243a4d347efcfd53.css → df904982b9637c1a.css} +1 -1
  26. package/out/_next/static/umd9mjV29cCbZplewdOPw/_buildManifest.js +1 -0
  27. package/out/changelog.html +1 -1
  28. package/out/changes.html +1 -1
  29. package/out/custom-types/[customTypeId].html +1 -1
  30. package/out/custom-types.html +1 -1
  31. package/out/index.html +1 -1
  32. package/out/labs.html +1 -1
  33. package/out/page-types/[pageTypeId].html +1 -1
  34. package/out/settings.html +1 -1
  35. package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
  36. package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
  37. package/out/slices.html +1 -1
  38. package/package.json +6 -6
  39. package/sentry.client.config.ts +2 -1
  40. package/src/ErrorBoundary.tsx +2 -1
  41. package/src/apiClient.ts +12 -7
  42. package/src/components/Card/Card.stories.tsx +4 -3
  43. package/src/components/CodeBlock/CodeBlock.tsx +6 -5
  44. package/src/components/Count/Count.tsx +2 -1
  45. package/src/components/HoverCard/HoverCard.tsx +3 -2
  46. package/src/components/SideNav/SideNav.stories.tsx +3 -2
  47. package/src/components/SideNav/SideNav.tsx +3 -2
  48. package/src/components/SideNav/SideNavEnvironmentSelector.tsx +3 -2
  49. package/src/components/Table/Table.test.tsx +4 -3
  50. package/src/domain/__tests__/customType.test.ts +0 -184
  51. package/src/domain/__tests__/group.test.ts +161 -0
  52. package/src/domain/__tests__/slice.test.ts +3 -2
  53. package/src/domain/customType.ts +0 -191
  54. package/src/domain/group.ts +89 -0
  55. package/src/domain/slice.ts +29 -12
  56. package/src/features/autoSave/AutoSaveStatusIndicator.tsx +2 -1
  57. package/src/features/changelog/useSliceMachineLatestNonBreakingVersion.ts +2 -1
  58. package/src/features/changelog/useSliceMachineReleaseNotes.ts +2 -1
  59. package/src/features/changelog/useSliceMachineVersions.ts +2 -1
  60. package/src/features/changes/BlankSlates/NoChangesBlankSlate.tsx +9 -8
  61. package/src/features/changes/PushChangesButton.tsx +5 -4
  62. package/src/features/changes/StatusBadge.tsx +3 -2
  63. package/src/features/customTypes/EditDropdown.tsx +4 -3
  64. package/src/features/customTypes/PageTypeOnboarding.tsx +4 -3
  65. package/src/features/customTypes/__tests__/CustomTypeBuilderPage.test.tsx +5 -4
  66. package/src/features/customTypes/__tests__/CustomTypesTablePage.test.tsx +5 -4
  67. package/src/features/customTypes/actions/convertCustomToPageType.ts +3 -2
  68. package/src/features/customTypes/actions/createCustomType.ts +4 -3
  69. package/src/features/customTypes/actions/deleteCustomType.ts +2 -1
  70. package/src/features/customTypes/actions/renameCustomType.ts +2 -1
  71. package/src/features/customTypes/customTypesBuilder/CustomTypeProvider.tsx +6 -5
  72. package/src/features/customTypes/customTypesBuilder/CustomTypesBuilderPage.tsx +21 -17
  73. package/src/features/customTypes/customTypesBuilder/PageSnippetDialog/PageSnippetDialog.tsx +7 -6
  74. package/src/features/customTypes/customTypesBuilder/SliceZoneBlankSlate.tsx +4 -3
  75. package/src/features/customTypes/customTypesBuilder/useCustomType.ts +2 -1
  76. package/src/features/customTypes/customTypesConfig.ts +3 -2
  77. package/src/features/customTypes/customTypesTable/CustomTypesTable.tsx +8 -7
  78. package/src/features/customTypes/customTypesTable/CustomTypesTablePage.tsx +12 -11
  79. package/src/features/customTypes/customTypesTable/useCustomTypes.ts +6 -5
  80. package/src/features/documentation/MarkdownRenderer/index.tsx +4 -3
  81. package/src/features/documentation/useDocumentation.ts +2 -1
  82. package/src/features/environments/actions/getActiveEnvironment.ts +2 -1
  83. package/src/features/environments/actions/getEnvironments.ts +1 -1
  84. package/src/features/environments/actions/setEnvironment.ts +3 -2
  85. package/src/features/inAppGuide/InAppGuideContext.tsx +2 -1
  86. package/src/features/inAppGuide/InAppGuideDialog.tsx +4 -3
  87. package/src/features/inAppGuide/inAppGuideContent.tsx +2 -1
  88. package/src/features/labs/labsList/LabsPage.tsx +7 -6
  89. package/src/features/labs/labsList/useLab.tsx +2 -1
  90. package/src/features/settings/SettingsPage.tsx +9 -8
  91. package/src/features/settings/git/ConnectGitRepository.tsx +11 -10
  92. package/src/features/settings/git/GitOwnerSelect.tsx +2 -1
  93. package/src/features/settings/git/GitProvider.ts +5 -4
  94. package/src/features/settings/git/GitProviderConnectButtons.tsx +2 -1
  95. package/src/features/settings/git/GitRepositoriesList.tsx +6 -5
  96. package/src/features/settings/git/GitRepositoriesSearch.tsx +7 -6
  97. package/src/features/settings/git/GitRepositoryConnectDialog.tsx +4 -3
  98. package/src/features/settings/git/useGitIntegrationExperiment.ts +1 -1
  99. package/src/features/settings/git/useGitOwners.ts +2 -1
  100. package/src/features/settings/git/useGitRepos.ts +2 -1
  101. package/src/features/settings/git/useLinkedGitRepos.ts +3 -2
  102. package/src/features/settings/git/useWriteAPIToken.ts +3 -2
  103. package/src/features/slices/actions/addSlicesToSliceZone.ts +3 -2
  104. package/src/features/slices/actions/createSlice.ts +5 -4
  105. package/src/features/slices/actions/deleteSlice.ts +2 -1
  106. package/src/features/slices/actions/renameSlice.ts +5 -4
  107. package/src/features/slices/actions/uploadSliceScreenshot.ts +3 -2
  108. package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewSliceDialog.tsx +5 -4
  109. package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewVariationDialog.tsx +2 -1
  110. package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.tsx +10 -9
  111. package/src/features/slices/convertLegacySlice/types.ts +2 -2
  112. package/src/features/slices/sliceBuilder/FloatingBackButton.tsx +9 -8
  113. package/src/features/slices/sliceBuilder/SliceBuilderProvider.tsx +7 -6
  114. package/src/features/slices/sliceBuilder/actions/deleteVariation.ts +7 -6
  115. package/src/features/slices/sliceBuilder/actions/renameVariation.ts +5 -4
  116. package/src/features/slices/sliceBuilder/useGroupsInSlicesExperiment.ts +1 -1
  117. package/src/features/slices/sliceCards/NonSharedSliceCard.tsx +5 -4
  118. package/src/features/slices/sliceCards/SharedSliceCard.tsx +9 -8
  119. package/src/features/slicesTemplates/actions/createSlicesTemplates.ts +3 -2
  120. package/src/features/slicesTemplates/useSlicesTemplates.ts +2 -1
  121. package/src/features/sync/AutoSyncProvider.tsx +10 -9
  122. package/src/features/sync/actions/pushChanges.ts +4 -3
  123. package/src/features/sync/actions/trackPushChangesSuccess.ts +3 -3
  124. package/src/features/sync/components/AutoSyncStatusIndicator.tsx +4 -3
  125. package/src/features/sync/fetchUnSyncChanges.ts +4 -4
  126. package/src/features/sync/getUnSyncChanges.ts +5 -5
  127. package/src/features/sync/useUnSyncChanges.ts +5 -4
  128. package/src/hooks/useAdapterName.ts +2 -1
  129. package/src/hooks/useAuthStatus.ts +3 -2
  130. package/src/hooks/useCurrentSlice.tsx +5 -4
  131. package/src/hooks/useEditorContent.ts +4 -3
  132. package/src/hooks/useExperimentVariant.ts +2 -1
  133. package/src/hooks/useIsEmptyProject.ts +2 -1
  134. package/src/hooks/useRepositoryInformation.ts +3 -2
  135. package/src/hooks/useSMTracker.ts +5 -4
  136. package/src/hooks/useScreenshotChangesModal.ts +4 -3
  137. package/src/hooks/useServerState.ts +4 -3
  138. package/src/hooks/useSliceMachineConfig.ts +2 -1
  139. package/src/hooks/useSliceMachineRunningVersion.ts +2 -1
  140. package/src/hooks/useUpdateAvailable.ts +2 -1
  141. package/{components → src/legacy/components}/App/index.tsx +9 -8
  142. package/{components → src/legacy/components}/AppLayout/index.tsx +8 -7
  143. package/{components → src/legacy/components}/Changelog/index.tsx +5 -4
  144. package/{components → src/legacy/components}/Changelog/navigation/index.tsx +5 -4
  145. package/{components → src/legacy/components}/Changelog/versionDetails/UpdateCommandBox.tsx +5 -4
  146. package/{components → src/legacy/components}/Changelog/versionDetails/index.tsx +2 -1
  147. package/{components → src/legacy/components}/ChangesEmptyState/AuthErrorPage.tsx +3 -2
  148. package/{components → src/legacy/components}/ChangesItems/ChangesItems.tsx +14 -13
  149. package/{components → src/legacy/components}/ChangesItems/DevCollaborationExperiment.tsx +3 -2
  150. package/{components → src/legacy/components}/CodeBlock/index.tsx +2 -1
  151. package/{components → src/legacy/components}/ConfigErrors/index.jsx +3 -2
  152. package/{components → src/legacy/components}/CustomTypeTable/changesPage.tsx +11 -10
  153. package/{components → src/legacy/components}/DeleteCTModal/index.tsx +7 -6
  154. package/{components → src/legacy/components}/DeleteDocumentsDrawer/AssociatedDocumentsCard.tsx +3 -2
  155. package/{components → src/legacy/components}/DeleteDocumentsDrawer/HardDeleteDocumentsDrawer.tsx +6 -5
  156. package/{components → src/legacy/components}/DeleteDocumentsDrawer/SoftDeleteDocumentsDrawer.tsx +6 -5
  157. package/{components → src/legacy/components}/DeleteSliceModal/index.tsx +7 -6
  158. package/{components → src/legacy/components}/DeleteVariationModal/index.tsx +6 -5
  159. package/{components → src/legacy/components}/EmptyState/index.tsx +2 -1
  160. package/{components → src/legacy/components}/FormFields/Input.tsx +2 -1
  161. package/{components → src/legacy/components}/Forms/CreateCustomTypeModal/CreateCustomTypeModal.tsx +17 -16
  162. package/{components → src/legacy/components}/Forms/CreateSliceModal/CreateSliceModal.tsx +8 -7
  163. package/{components → src/legacy/components}/Forms/RenameCustomTypeModal/RenameCustomTypeModal.tsx +7 -6
  164. package/{components → src/legacy/components}/Forms/RenameSliceModal/RenameSliceModal.tsx +7 -6
  165. package/src/legacy/components/Forms/RenameVariationModal/RenameVariationModal.module.css.d.ts +5 -0
  166. package/{components → src/legacy/components}/Forms/RenameVariationModal/RenameVariationModal.tsx +6 -5
  167. package/{components → src/legacy/components}/Forms/components/SelectRepeatable.tsx +2 -1
  168. package/{components → src/legacy/components}/Forms/formsValidator.ts +4 -3
  169. package/{components → src/legacy/components}/ListItem/Header.tsx +2 -1
  170. package/{components → src/legacy/components}/ListItem/index.tsx +3 -2
  171. package/{components → src/legacy/components}/LoginModal/index.tsx +20 -19
  172. package/{components → src/legacy/components}/ModalFormCard/index.tsx +3 -2
  173. package/{components → src/legacy/components}/Navigation/ChangesItem.tsx +12 -11
  174. package/{components → src/legacy/components}/Navigation/Environment.tsx +13 -12
  175. package/{components → src/legacy/components}/Navigation/RunningVersion.tsx +3 -2
  176. package/{components → src/legacy/components}/Navigation/UpdateBox.tsx +3 -2
  177. package/src/legacy/components/Navigation/VideoItem.module.css.d.ts +5 -0
  178. package/{components → src/legacy/components}/Navigation/VideoItem.tsx +15 -14
  179. package/src/legacy/components/Navigation/index.module.css.d.ts +5 -0
  180. package/{components → src/legacy/components}/Navigation/index.test.tsx +7 -9
  181. package/{components → src/legacy/components}/Navigation/index.tsx +21 -20
  182. package/{components → src/legacy/components}/ReviewModal/ReviewForm.tsx +10 -9
  183. package/{components → src/legacy/components}/ReviewModal/ReviewModal.tsx +7 -6
  184. package/{components → src/legacy/components}/ScreenshotChangesModal/VariationDropZone.tsx +6 -5
  185. package/{components → src/legacy/components}/ScreenshotChangesModal/index.tsx +11 -10
  186. package/{components → src/legacy/components}/ScreenshotChangesModal/useCustomScreenshot.tsx +2 -1
  187. package/{components → src/legacy/components}/ScreenshotPreviewModal/index.tsx +8 -7
  188. package/{components → src/legacy/components}/Simulator/components/FailedConnect/index.tsx +2 -1
  189. package/{components → src/legacy/components}/Simulator/components/Header/VariationsPopover/MenuList.tsx +2 -1
  190. package/{components → src/legacy/components}/Simulator/components/Header/VariationsPopover/index.tsx +2 -1
  191. package/{components → src/legacy/components}/Simulator/components/Header/index.tsx +7 -6
  192. package/{components → src/legacy/components}/Simulator/components/IframeRenderer/index.tsx +3 -2
  193. package/{components → src/legacy/components}/Simulator/components/Toolbar/ScreensizeInput/index.tsx +2 -1
  194. package/{components → src/legacy/components}/Simulator/components/Toolbar/index.tsx +3 -2
  195. package/{components → src/legacy/components}/Simulator/index.tsx +12 -11
  196. package/{components → src/legacy/components}/SliceMachineDrawer/index.tsx +2 -1
  197. package/{components → src/legacy/components}/Tooltip/TextWithTooltip.tsx +2 -1
  198. package/{components → src/legacy/components}/Tooltip/index.jsx +2 -1
  199. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/DeleteSliceZoneModal.tsx +4 -3
  200. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/List.tsx +11 -10
  201. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/SlicesTemplatesModal.tsx +10 -9
  202. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModal.tsx +3 -2
  203. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModalList.tsx +4 -3
  204. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/index.tsx +23 -19
  205. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/sliceTemplatesComingSoon.ts +1 -1
  206. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/create.tsx +2 -1
  207. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/delete.tsx +1 -1
  208. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/update.tsx +2 -1
  209. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabZone/index.tsx +29 -28
  210. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/index.tsx +7 -6
  211. package/{lib → src/legacy/lib}/builders/SliceBuilder/FieldZones/index.tsx +42 -49
  212. package/{lib → src/legacy/lib}/builders/SliceBuilder/Sidebar/AddVariationModal.tsx +4 -3
  213. package/{lib → src/legacy/lib}/builders/SliceBuilder/Sidebar/index.tsx +13 -12
  214. package/{lib → src/legacy/lib}/builders/SliceBuilder/SimulatorButton/index.tsx +15 -11
  215. package/{lib → src/legacy/lib}/builders/SliceBuilder/index.tsx +9 -8
  216. package/{lib → src/legacy/lib}/builders/common/EditModal/Field.jsx +2 -1
  217. package/{lib → src/legacy/lib}/builders/common/EditModal/index.jsx +12 -8
  218. package/{lib → src/legacy/lib}/builders/common/SelectFieldTypeModal/index.jsx +4 -3
  219. package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/ErrorTooltip.tsx +2 -1
  220. package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/Hints/CodeBlock.tsx +2 -1
  221. package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/Hints/index.tsx +2 -1
  222. package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/NewField.tsx +14 -10
  223. package/{lib → src/legacy/lib}/builders/common/Zone/Card/index.jsx +7 -3
  224. package/{lib → src/legacy/lib}/builders/common/Zone/index.jsx +7 -9
  225. package/{lib → src/legacy/lib}/builders/utils/index.ts +1 -1
  226. package/{lib → src/legacy/lib}/models/common/DeprecatedMockConfigMessage.tsx +2 -1
  227. package/{lib → src/legacy/lib}/models/common/ModelData.ts +3 -3
  228. package/{lib → src/legacy/lib}/models/common/ModelStatus/index.ts +2 -2
  229. package/{lib → src/legacy/lib}/models/common/Slice.ts +17 -3
  230. package/{lib → src/legacy/lib}/models/common/normalizers/customType.ts +2 -2
  231. package/{lib → src/legacy/lib}/models/common/normalizers/slices.ts +2 -2
  232. package/{lib → src/legacy/lib}/models/common/widgets/ContentRelationship/Form.tsx +6 -5
  233. package/{lib → src/legacy/lib}/models/common/widgets/ContentRelationship/index.ts +3 -2
  234. package/{lib → src/legacy/lib}/models/common/widgets/Group/Form.jsx +6 -5
  235. package/{lib → src/legacy/lib}/models/common/widgets/Group/ListItem/index.jsx +62 -67
  236. package/{lib → src/legacy/lib}/models/common/widgets/Group/index.ts +2 -1
  237. package/{lib → src/legacy/lib}/models/common/widgets/Image/Form.tsx +6 -5
  238. package/{lib → src/legacy/lib}/models/common/widgets/Image/components.tsx +5 -4
  239. package/{lib → src/legacy/lib}/models/common/widgets/Link/Form.jsx +5 -5
  240. package/{lib → src/legacy/lib}/models/common/widgets/LinkToMedia/Form.jsx +4 -4
  241. package/{lib → src/legacy/lib}/models/common/widgets/LinkToMedia/index.ts +2 -1
  242. package/{lib → src/legacy/lib}/models/common/widgets/Select/FormFields.jsx +6 -5
  243. package/{lib → src/legacy/lib}/models/common/widgets/StructuredText/Form.tsx +7 -6
  244. package/{lib → src/legacy/lib}/models/common/widgets/Widget.ts +2 -1
  245. package/src/legacy/lib/models/common/widgets/groupBuilderArray.ts +18 -0
  246. package/src/legacy/lib/models/common/widgets/sliceBuilderArray.ts +19 -0
  247. package/src/legacy/lib/models/common/widgets/withGroup.ts +2 -0
  248. package/{lib → src/legacy/lib}/models/server/ServerState.ts +2 -2
  249. package/{lib → src/legacy/lib}/utils/shared/customTypes.ts +1 -1
  250. package/src/modules/availableCustomTypes/index.ts +10 -9
  251. package/src/modules/availableCustomTypes/types.ts +2 -2
  252. package/src/modules/environment/index.ts +7 -6
  253. package/src/modules/environment/types.ts +1 -1
  254. package/src/modules/modal/index.ts +2 -1
  255. package/src/modules/slices/index.ts +12 -8
  256. package/src/modules/slices/selector.ts +1 -1
  257. package/src/modules/slices/types.ts +2 -2
  258. package/src/modules/useSliceMachineActions.ts +10 -6
  259. package/src/modules/userContext/index.ts +6 -5
  260. package/{pages → src/pages}/_app.tsx +22 -22
  261. package/{pages → src/pages}/changelog.tsx +2 -1
  262. package/{pages → src/pages}/changes.tsx +25 -21
  263. package/src/pages/custom-types/[customTypeId].tsx +1 -0
  264. package/{pages → src/pages}/custom-types.tsx +2 -1
  265. package/{pages → src/pages}/index.tsx +4 -3
  266. package/src/pages/labs.tsx +1 -0
  267. package/src/pages/page-types/[pageTypeId].tsx +1 -0
  268. package/src/pages/settings.tsx +1 -0
  269. package/{pages → src/pages}/slices/[lib]/[sliceName]/[variation]/index.tsx +4 -3
  270. package/{pages → src/pages}/slices/[lib]/[sliceName]/[variation]/simulator.tsx +3 -2
  271. package/{pages → src/pages}/slices.tsx +24 -23
  272. package/src/redux/reducer.ts +7 -6
  273. package/src/redux/store.ts +2 -1
  274. package/src/redux/type.ts +7 -6
  275. package/src/utils/getContentTypeForTracking.ts +21 -0
  276. package/test/__setup__.ts +10 -8
  277. package/test/__testutils__/createTestPlugin.ts +3 -2
  278. package/test/__testutils__/createTestProject.ts +5 -4
  279. package/test/__testutils__/index.tsx +6 -5
  280. package/test/__testutils__/mockAWSACLAPI.ts +1 -1
  281. package/test/__testutils__/mockCustomTypesAPI.ts +1 -1
  282. package/test/__testutils__/mockPrismicAuthAPI.ts +1 -1
  283. package/test/__testutils__/mockPrismicUserAPI.ts +2 -3
  284. package/test/__testutils__/readMSWFormData.ts +1 -1
  285. package/test/components/IframeRenderer.test.ts +3 -2
  286. package/test/lib/builders/EditModal.test.tsx +5 -3
  287. package/test/lib/builders/buildersUtils.test.ts +3 -3
  288. package/test/lib/consts.test.ts +6 -2
  289. package/test/lib/models/common/CustomType.test.ts +6 -2
  290. package/test/lib/models/common/ModelStatus.test.ts +6 -4
  291. package/test/lib/models/common/Slice.test.ts +3 -2
  292. package/test/lib/models/common/widgets/index.test.ts +8 -4
  293. package/test/lib/utils/index.test.ts +3 -2
  294. package/test/lib/utils/preferWroomBase.test.ts +3 -2
  295. package/test/lib/utils/shared/customTypes.test.ts +2 -1
  296. package/test/pages/slices.test.tsx +10 -10
  297. package/test/src/modules/__fixtures__/serverState.ts +1 -1
  298. package/test/src/modules/__fixtures__/sliceUtilsFactory.ts +3 -3
  299. package/test/src/modules/availableCustomTypes/index.test.ts +3 -3
  300. package/test/src/modules/environment.test.ts +3 -5
  301. package/test/src/modules/loading.test.ts +3 -3
  302. package/test/src/modules/modal.test.ts +5 -5
  303. package/test/src/modules/slices.test.ts +3 -2
  304. package/test/src/modules/userContext.test.ts +3 -3
  305. package/test/src/normalizers/customType.test.ts +16 -3
  306. package/test/src/utils/fieldNameCreator.test.ts +1 -1
  307. package/tsconfig.json +1 -6
  308. package/vite.config.ts +1 -7
  309. package/lib/models/common/widgets/sliceBuilderArray.ts +0 -31
  310. package/lib/models/common/widgets/withGroup.ts +0 -19
  311. package/out/_next/static/6WrgMw0SELcypoJCYNiKd/_buildManifest.js +0 -1
  312. package/out/_next/static/chunks/25-607d5cfe6492f4e8.js +0 -1
  313. package/out/_next/static/chunks/286-6ee80333008646b9.js +0 -1
  314. package/out/_next/static/chunks/318-c84322cba57be932.js +0 -1
  315. package/out/_next/static/chunks/382-8194eab141c7ea2f.js +0 -1
  316. package/out/_next/static/chunks/46-d22d7a121254e31d.js +0 -8
  317. package/out/_next/static/chunks/727-b53258380c1a11f1.js +0 -1
  318. package/out/_next/static/chunks/799-68887319f3169f78.js +0 -1
  319. package/out/_next/static/chunks/pages/changelog-2d061c06b2b82e28.js +0 -1
  320. package/out/_next/static/chunks/pages/changes-cde59d56dc849106.js +0 -1
  321. package/out/_next/static/chunks/pages/custom-types/[customTypeId]-89ccb93ce7409ad0.js +0 -1
  322. package/out/_next/static/chunks/pages/index-b5817351a77c6d40.js +0 -1
  323. package/out/_next/static/chunks/pages/labs-0fc7d01b8c9bfc2a.js +0 -1
  324. package/out/_next/static/chunks/pages/page-types/[pageTypeId]-dbf86fe3a94dc892.js +0 -1
  325. package/out/_next/static/chunks/pages/settings-897ad13a08f73048.js +0 -1
  326. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-ed3157875529f0f2.js +0 -1
  327. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-69cf4b12bb354f9f.js +0 -1
  328. package/out/_next/static/chunks/pages/slices-391f6c4b30af0759.js +0 -1
  329. package/out/_next/static/css/0e0d6c4ec6bf7373.css +0 -1
  330. package/out/_next/static/css/f8eb526e10bc2441.css +0 -1
  331. package/pages/custom-types/[customTypeId].tsx +0 -1
  332. package/pages/labs.tsx +0 -1
  333. package/pages/page-types/[pageTypeId].tsx +0 -1
  334. package/pages/settings.tsx +0 -1
  335. /package/out/_next/static/{6WrgMw0SELcypoJCYNiKd → umd9mjV29cCbZplewdOPw}/_ssgManifest.js +0 -0
  336. /package/{components → src/legacy/components}/AuthInstructions/index.jsx +0 -0
  337. /package/{components → src/legacy/components}/Button/index.tsx +0 -0
  338. /package/{components → src/legacy/components}/Card/CardBox.tsx +0 -0
  339. /package/{components → src/legacy/components}/Card/Default.jsx +0 -0
  340. /package/{components → src/legacy/components}/Card/Preview.jsx +0 -0
  341. /package/{components → src/legacy/components}/Card/WithTabs/components.jsx +0 -0
  342. /package/{components → src/legacy/components}/Card/WithTabs/index.jsx +0 -0
  343. /package/{components → src/legacy/components}/Card/index.tsx +0 -0
  344. /package/{components → src/legacy/components}/Changelog/navigation/VersionBadge.tsx +0 -0
  345. /package/{components → src/legacy/components}/Changelog/navigation/VersionTag.tsx +0 -0
  346. /package/{components → src/legacy/components}/Changelog/versionDetails/ReleaseNotesDetails.tsx +0 -0
  347. /package/{components → src/legacy/components}/Changelog/versionDetails/VersionKindLabel.tsx +0 -0
  348. /package/{components → src/legacy/components}/ChangesEmptyState/OfflinePage.tsx +0 -0
  349. /package/{components → src/legacy/components}/ChangesEmptyState/index.ts +0 -0
  350. /package/{components → src/legacy/components}/ChangesItems/ErrorBanner.tsx +0 -0
  351. /package/{components → src/legacy/components}/ChangesItems/index.ts +0 -0
  352. /package/{components → src/legacy/components}/ChangesSectionHeader/ChangesSectionHeader.tsx +0 -0
  353. /package/{components → src/legacy/components}/ChangesSectionHeader/index.ts +0 -0
  354. /package/{components → src/legacy/components}/DeleteDocumentsDrawer/index.tsx +0 -0
  355. /package/{components → src/legacy/components}/DropDownSelector/MenuList.tsx +0 -0
  356. /package/{components → src/legacy/components}/DropDownSelector/index.tsx +0 -0
  357. /package/{components → src/legacy/components}/Flex/index.tsx +0 -0
  358. /package/{components → src/legacy/components}/FormFields/Array.jsx +0 -0
  359. /package/{components → src/legacy/components}/FormFields/Checkbox.jsx +0 -0
  360. /package/{components → src/legacy/components}/FormFields/CheckboxControl.jsx +0 -0
  361. /package/{components → src/legacy/components}/FormFields/SelectDefaultValue.jsx +0 -0
  362. /package/{components → src/legacy/components}/FormFields/index.ts +0 -0
  363. /package/{components → src/legacy/components}/Forms/CreateCustomTypeModal/index.tsx +0 -0
  364. /package/{components → src/legacy/components}/Forms/CreateSliceModal/index.tsx +0 -0
  365. /package/{components → src/legacy/components}/Forms/RenameCustomTypeModal/index.ts +0 -0
  366. /package/{components → src/legacy/components}/Forms/RenameSliceModal/index.ts +0 -0
  367. /package/{components → src/legacy/components}/Forms/RenameVariationModal/RenameVariationModal.module.css +0 -0
  368. /package/{components → src/legacy/components}/Forms/RenameVariationModal/index.ts +0 -0
  369. /package/{components → src/legacy/components}/Forms/components/FlexCard.tsx +0 -0
  370. /package/{components → src/legacy/components}/Forms/components/InputBox.tsx +0 -0
  371. /package/{components → src/legacy/components}/Forms/formsTypes.ts +0 -0
  372. /package/{components → src/legacy/components}/FullPage/index.tsx +0 -0
  373. /package/{components → src/legacy/components}/Grid/index.tsx +0 -0
  374. /package/{components → src/legacy/components}/InputDeleteIcon/index.jsx +0 -0
  375. /package/{components → src/legacy/components}/ItemHeader/index.tsx +0 -0
  376. /package/{components → src/legacy/components}/Li/index.tsx +0 -0
  377. /package/{components → src/legacy/components}/ListItem/utils.js +0 -0
  378. /package/{components → src/legacy/components}/LoadingPage/index.tsx +0 -0
  379. /package/{components → src/legacy/components}/MissingLibraries/index.tsx +0 -0
  380. /package/{components → src/legacy/components}/Navigation/VideoItem.module.css +0 -0
  381. /package/{components → src/legacy/components}/Navigation/index.module.css +0 -0
  382. /package/{components → src/legacy/components}/ReactTooltipPortal/index.tsx +0 -0
  383. /package/{components → src/legacy/components}/ReviewModal/ReviewFormSelect.tsx +0 -0
  384. /package/{components → src/legacy/components}/ReviewModal/index.ts +0 -0
  385. /package/{components → src/legacy/components}/ScreenshotPreview/index.tsx +0 -0
  386. /package/{components → src/legacy/components}/Simulator/components/FullPage/index.tsx +0 -0
  387. /package/{components → src/legacy/components}/Simulator/components/Header/links.ts +0 -0
  388. /package/{components → src/legacy/components}/SliceMachineIconButton/index.tsx +0 -0
  389. /package/{components → src/legacy/components}/SliceMachineModal/index.tsx +0 -0
  390. /package/{components → src/legacy/components}/ToasterContainer/index.tsx +0 -0
  391. /package/{components → src/legacy/components}/Warnings/index.jsx +0 -0
  392. /package/{components → src/legacy/components}/WindowPortal/index.js +0 -0
  393. /package/{components → src/legacy/components}/YoutubeEmbed/index.tsx +0 -0
  394. /package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/InputBox.tsx +0 -0
  395. /package/{lib → src/legacy/lib}/builders/common/EditModal/Form.jsx +0 -0
  396. /package/{lib → src/legacy/lib}/builders/common/SelectFieldTypeModal/FieldTypeCard.jsx +0 -0
  397. /package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/EditItem.jsx +0 -0
  398. /package/{lib → src/legacy/lib}/builders/common/Zone/components/EmptyState/index.tsx +0 -0
  399. /package/{lib → src/legacy/lib}/consts.ts +0 -0
  400. /package/{lib → src/legacy/lib}/env/sentry.ts +0 -0
  401. /package/{lib → src/legacy/lib}/forms/defaults.ts +0 -0
  402. /package/{lib → src/legacy/lib}/forms/fields.ts +0 -0
  403. /package/{lib → src/legacy/lib}/forms/index.ts +0 -0
  404. /package/{lib → src/legacy/lib}/forms/types.ts +0 -0
  405. /package/{lib → src/legacy/lib}/hljs/svelte.ts +0 -0
  406. /package/{lib → src/legacy/lib}/models/common/Auth.ts +0 -0
  407. /package/{lib → src/legacy/lib}/models/common/ComponentUI.ts +0 -0
  408. /package/{lib → src/legacy/lib}/models/common/CustomType/index.ts +0 -0
  409. /package/{lib → src/legacy/lib}/models/common/CustomType/sliceZone.ts +0 -0
  410. /package/{lib → src/legacy/lib}/models/common/CustomType/tab.ts +0 -0
  411. /package/{lib → src/legacy/lib}/models/common/Environment.ts +0 -0
  412. /package/{lib → src/legacy/lib}/models/common/ErrorWithStatus.ts +0 -0
  413. /package/{lib → src/legacy/lib}/models/common/Fields.ts +0 -0
  414. /package/{lib → src/legacy/lib}/models/common/Group.ts +0 -0
  415. /package/{lib → src/legacy/lib}/models/common/Library.ts +0 -0
  416. /package/{lib → src/legacy/lib}/models/common/LibraryUI.ts +0 -0
  417. /package/{lib → src/legacy/lib}/models/common/Manifest.ts +0 -0
  418. /package/{lib → src/legacy/lib}/models/common/ModelStatus/compareCustomTypeModels.ts +0 -0
  419. /package/{lib → src/legacy/lib}/models/common/ModelStatus/compareSliceModels.ts +0 -0
  420. /package/{lib → src/legacy/lib}/models/common/PrismicData.ts +0 -0
  421. /package/{lib → src/legacy/lib}/models/common/PrismicFile.ts +0 -0
  422. /package/{lib → src/legacy/lib}/models/common/Screenshots.ts +0 -0
  423. /package/{lib → src/legacy/lib}/models/common/Simulator.ts +0 -0
  424. /package/{lib → src/legacy/lib}/models/common/Slices.ts +0 -0
  425. /package/{lib → src/legacy/lib}/models/common/UserProfile.ts +0 -0
  426. /package/{lib → src/legacy/lib}/models/common/Warning.ts +0 -0
  427. /package/{lib → src/legacy/lib}/models/common/widgets/Boolean/index.ts +0 -0
  428. /package/{lib → src/legacy/lib}/models/common/widgets/Color/index.ts +0 -0
  429. /package/{lib → src/legacy/lib}/models/common/widgets/Date/index.ts +0 -0
  430. /package/{lib → src/legacy/lib}/models/common/widgets/Embed/index.ts +0 -0
  431. /package/{lib → src/legacy/lib}/models/common/widgets/GeoPoint/index.ts +0 -0
  432. /package/{lib → src/legacy/lib}/models/common/widgets/Image/index.ts +0 -0
  433. /package/{lib → src/legacy/lib}/models/common/widgets/Link/index.ts +0 -0
  434. /package/{lib → src/legacy/lib}/models/common/widgets/Number/index.ts +0 -0
  435. /package/{lib → src/legacy/lib}/models/common/widgets/Select/index.ts +0 -0
  436. /package/{lib → src/legacy/lib}/models/common/widgets/StructuredText/index.ts +0 -0
  437. /package/{lib → src/legacy/lib}/models/common/widgets/StructuredText/options.tsx +0 -0
  438. /package/{lib → src/legacy/lib}/models/common/widgets/Text/index.ts +0 -0
  439. /package/{lib → src/legacy/lib}/models/common/widgets/Timestamp/index.ts +0 -0
  440. /package/{lib → src/legacy/lib}/models/common/widgets/UID/index.ts +0 -0
  441. /package/{lib → src/legacy/lib}/models/common/widgets/ctBuilderArray.ts +0 -0
  442. /package/{lib → src/legacy/lib}/models/common/widgets/index.ts +0 -0
  443. /package/{lib → src/legacy/lib}/prismic/endpoints.ts +0 -0
  444. /package/{lib → src/legacy/lib}/utils/index.ts +0 -0
  445. /package/{lib → src/legacy/lib}/utils/poll.ts +0 -0
  446. /package/{lib → src/legacy/lib}/utils/preferWroomBase.ts +0 -0
  447. /package/{lib → src/legacy/lib}/utils/repo.ts +0 -0
  448. /package/{lib → src/legacy/lib}/utils/str.ts +0 -0
  449. /package/{pages → src/pages}/api/embed.js +0 -0
@@ -1,8 +1,9 @@
1
- import { InputType } from "@lib/forms/fields";
2
1
  import { Field, FieldMetaProps } from "formik";
3
2
  import React from "react";
4
3
  import { Box, Input, Label, Text, ThemeUIStyleObject } from "theme-ui";
5
4
 
5
+ import { InputType } from "@/legacy/lib/forms/fields";
6
+
6
7
  export enum InputFieldStyles {
7
8
  ERROR,
8
9
  DISABLED,
@@ -1,26 +1,27 @@
1
- import ModalFormCard from "@components/ModalFormCard";
2
- import { API_ID_REGEX } from "@lib/consts";
3
- import { slugify } from "@lib/utils/str";
4
1
  import type { CustomTypeFormat } from "@slicemachine/manager";
5
- import { getFormat } from "@src/domain/customType";
2
+ import { FormikErrors } from "formik";
3
+ import { useRouter } from "next/router";
4
+ import { SetStateAction, useState } from "react";
5
+ import { useSelector } from "react-redux";
6
+ import { Box } from "theme-ui";
7
+
8
+ import { getFormat } from "@/domain/customType";
6
9
  import {
7
10
  createCustomType,
8
11
  CustomTypeOrigin,
9
- } from "@src/features/customTypes/actions/createCustomType";
10
- import { CUSTOM_TYPES_CONFIG } from "@src/features/customTypes/customTypesConfig";
11
- import { CUSTOM_TYPES_MESSAGES } from "@src/features/customTypes/customTypesMessages";
12
- import { useAutoSync } from "@src/features/sync/AutoSyncProvider";
12
+ } from "@/features/customTypes/actions/createCustomType";
13
+ import { CUSTOM_TYPES_CONFIG } from "@/features/customTypes/customTypesConfig";
14
+ import { CUSTOM_TYPES_MESSAGES } from "@/features/customTypes/customTypesMessages";
15
+ import { useAutoSync } from "@/features/sync/AutoSyncProvider";
16
+ import ModalFormCard from "@/legacy/components/ModalFormCard";
17
+ import { API_ID_REGEX } from "@/legacy/lib/consts";
18
+ import { slugify } from "@/legacy/lib/utils/str";
13
19
  import {
14
20
  selectAllCustomTypeIds,
15
21
  selectAllCustomTypeLabels,
16
- } from "@src/modules/availableCustomTypes";
17
- import useSliceMachineActions from "@src/modules/useSliceMachineActions";
18
- import { SliceMachineStoreType } from "@src/redux/type";
19
- import { FormikErrors } from "formik";
20
- import { useRouter } from "next/router";
21
- import { SetStateAction, useState } from "react";
22
- import { useSelector } from "react-redux";
23
- import { Box } from "theme-ui";
22
+ } from "@/modules/availableCustomTypes";
23
+ import useSliceMachineActions from "@/modules/useSliceMachineActions";
24
+ import { SliceMachineStoreType } from "@/redux/type";
24
25
 
25
26
  import { InputBox } from "../components/InputBox";
26
27
  import { SelectRepeatable } from "../components/SelectRepeatable";
@@ -1,15 +1,16 @@
1
- import ModalFormCard from "@components/ModalFormCard";
2
- import { LibraryUI } from "@lib/models/common/LibraryUI";
3
- import { SliceSM } from "@lib/models/common/Slice";
4
1
  import { SharedSlice } from "@prismicio/types-internal/lib/customtypes";
5
- import { getState } from "@src/apiClient";
6
- import { createSlice } from "@src/features/slices/actions/createSlice";
7
- import { useAutoSync } from "@src/features/sync/AutoSyncProvider";
8
- import useSliceMachineActions from "@src/modules/useSliceMachineActions";
9
2
  import { FC, useState } from "react";
10
3
  import Select from "react-select";
11
4
  import { Box, Label } from "theme-ui";
12
5
 
6
+ import { getState } from "@/apiClient";
7
+ import { createSlice } from "@/features/slices/actions/createSlice";
8
+ import { useAutoSync } from "@/features/sync/AutoSyncProvider";
9
+ import ModalFormCard from "@/legacy/components/ModalFormCard";
10
+ import { LibraryUI } from "@/legacy/lib/models/common/LibraryUI";
11
+ import { SliceSM } from "@/legacy/lib/models/common/Slice";
12
+ import useSliceMachineActions from "@/modules/useSliceMachineActions";
13
+
13
14
  import { InputBox } from "../components/InputBox";
14
15
  import { validateSliceModalValues } from "../formsValidator";
15
16
 
@@ -1,16 +1,17 @@
1
1
  import { CustomType } from "@prismicio/types-internal/lib/customtypes";
2
2
  import { CustomTypeFormat } from "@slicemachine/manager";
3
- import { renameCustomType } from "@src/features/customTypes/actions/renameCustomType";
4
- import { CUSTOM_TYPES_MESSAGES } from "@src/features/customTypes/customTypesMessages";
5
- import { useAutoSync } from "@src/features/sync/AutoSyncProvider";
6
- import { selectAllCustomTypeLabels } from "@src/modules/availableCustomTypes";
7
- import useSliceMachineActions from "@src/modules/useSliceMachineActions";
8
- import { SliceMachineStoreType } from "@src/redux/type";
9
3
  import { FormikErrors } from "formik";
10
4
  import { useState } from "react";
11
5
  import { useSelector } from "react-redux";
12
6
  import { Box } from "theme-ui";
13
7
 
8
+ import { renameCustomType } from "@/features/customTypes/actions/renameCustomType";
9
+ import { CUSTOM_TYPES_MESSAGES } from "@/features/customTypes/customTypesMessages";
10
+ import { useAutoSync } from "@/features/sync/AutoSyncProvider";
11
+ import { selectAllCustomTypeLabels } from "@/modules/availableCustomTypes";
12
+ import useSliceMachineActions from "@/modules/useSliceMachineActions";
13
+ import { SliceMachineStoreType } from "@/redux/type";
14
+
14
15
  import ModalFormCard from "../../ModalFormCard";
15
16
  import { InputBox } from "../components/InputBox";
16
17
 
@@ -1,12 +1,13 @@
1
- import { ComponentUI } from "@lib/models/common/ComponentUI";
2
- import { renameSlice } from "@src/features/slices/actions/renameSlice";
3
- import { useAutoSync } from "@src/features/sync/AutoSyncProvider";
4
- import { getLibraries, getRemoteSlices } from "@src/modules/slices";
5
- import useSliceMachineActions from "@src/modules/useSliceMachineActions";
6
- import { SliceMachineStoreType } from "@src/redux/type";
7
1
  import { useSelector } from "react-redux";
8
2
  import { Box } from "theme-ui";
9
3
 
4
+ import { renameSlice } from "@/features/slices/actions/renameSlice";
5
+ import { useAutoSync } from "@/features/sync/AutoSyncProvider";
6
+ import { ComponentUI } from "@/legacy/lib/models/common/ComponentUI";
7
+ import { getLibraries, getRemoteSlices } from "@/modules/slices";
8
+ import useSliceMachineActions from "@/modules/useSliceMachineActions";
9
+ import { SliceMachineStoreType } from "@/redux/type";
10
+
10
11
  import ModalFormCard from "../../ModalFormCard";
11
12
  import { InputBox } from "../components/InputBox";
12
13
  import { SliceModalValues } from "../formsTypes";
@@ -0,0 +1,5 @@
1
+ declare const styles: {
2
+ readonly "label": string;
3
+ };
4
+ export = styles;
5
+
@@ -1,5 +1,3 @@
1
- import type { ComponentUI } from "@lib/models/common/ComponentUI";
2
- import type { VariationSM } from "@lib/models/common/Slice";
3
1
  import {
4
2
  Box,
5
3
  Dialog,
@@ -9,12 +7,15 @@ import {
9
7
  FormInput,
10
8
  Text,
11
9
  } from "@prismicio/editor-ui";
12
- import { renameVariation } from "@src/features/slices/sliceBuilder/actions/renameVariation";
13
- import { useSliceState } from "@src/features/slices/sliceBuilder/SliceBuilderProvider";
14
- import useSliceMachineActions from "@src/modules/useSliceMachineActions";
15
10
  import { Formik } from "formik";
16
11
  import { type FC, useState } from "react";
17
12
 
13
+ import { renameVariation } from "@/features/slices/sliceBuilder/actions/renameVariation";
14
+ import { useSliceState } from "@/features/slices/sliceBuilder/SliceBuilderProvider";
15
+ import type { ComponentUI } from "@/legacy/lib/models/common/ComponentUI";
16
+ import type { VariationSM } from "@/legacy/lib/models/common/Slice";
17
+ import useSliceMachineActions from "@/modules/useSliceMachineActions";
18
+
18
19
  import styles from "./RenameVariationModal.module.css";
19
20
 
20
21
  type RenameVariationModalProps = {
@@ -1,9 +1,10 @@
1
1
  import { CustomTypeFormat } from "@slicemachine/manager";
2
- import { CUSTOM_TYPES_MESSAGES } from "@src/features/customTypes/customTypesMessages";
3
2
  import { useField } from "formik";
4
3
  import React, { FC } from "react";
5
4
  import { Box, Radio } from "theme-ui";
6
5
 
6
+ import { CUSTOM_TYPES_MESSAGES } from "@/features/customTypes/customTypesMessages";
7
+
7
8
  import { FlexCard } from "./FlexCard";
8
9
 
9
10
  type SelectRepeatableProps = {
@@ -1,9 +1,10 @@
1
- import { API_ID_REGEX, RESERVED_SLICE_NAME } from "@lib/consts";
2
- import { LibraryUI } from "@lib/models/common/LibraryUI";
3
- import { SliceSM } from "@lib/models/common/Slice";
4
1
  import camelCase from "lodash/camelCase";
5
2
  import startCase from "lodash/startCase";
6
3
 
4
+ import { API_ID_REGEX, RESERVED_SLICE_NAME } from "@/legacy/lib/consts";
5
+ import { LibraryUI } from "@/legacy/lib/models/common/LibraryUI";
6
+ import { SliceSM } from "@/legacy/lib/models/common/Slice";
7
+
7
8
  import { SliceModalValues } from "./formsTypes";
8
9
 
9
10
  type SliceModalValuesValidity =
@@ -1,8 +1,9 @@
1
- import { TextWithTooltip } from "@components/Tooltip/TextWithTooltip";
2
1
  import * as CSS from "csstype";
3
2
  import { IconType } from "react-icons";
4
3
  import { Flex, Text, Theme } from "theme-ui";
5
4
 
5
+ import { TextWithTooltip } from "@/legacy/components/Tooltip/TextWithTooltip";
6
+
6
7
  interface ItemHeaderProps {
7
8
  text: string;
8
9
  sliceFieldName: string | undefined;
@@ -1,5 +1,3 @@
1
- import { TabField } from "@lib/models/common/CustomType";
2
- import { Widget } from "@lib/models/common/widgets/Widget";
3
1
  import { Menu, MenuButton, MenuItem, MenuList } from "@reach/menu-button";
4
2
  import React, { Fragment } from "react";
5
3
  import { Draggable } from "react-beautiful-dnd";
@@ -9,6 +7,9 @@ import { FaBars } from "react-icons/fa";
9
7
  import { Box, Flex, useThemeUI } from "theme-ui";
10
8
  import { AnyObjectSchema } from "yup";
11
9
 
10
+ import { TabField } from "@/legacy/lib/models/common/CustomType";
11
+ import { Widget } from "@/legacy/lib/models/common/widgets/Widget";
12
+
12
13
  import Li from "../Li";
13
14
  import SliceMachineIconButton from "../SliceMachineIconButton";
14
15
  import ItemHeader from "./Header";
@@ -1,22 +1,3 @@
1
- import SliceMachineModal from "@components/SliceMachineModal";
2
- import { normalizeFrontendCustomTypes } from "@lib/models/common/normalizers/customType";
3
- import { normalizeFrontendSlices } from "@lib/models/common/normalizers/slices";
4
- import { buildEndpoints } from "@lib/prismic/endpoints";
5
- import { startPolling } from "@lib/utils/poll";
6
- import preferWroomBase from "@lib/utils/preferWroomBase";
7
- import { CheckAuthStatusResponse } from "@models/common/Auth";
8
- import { checkAuthStatus, getState, startAuth } from "@src/apiClient";
9
- import { getActiveEnvironment } from "@src/features/environments/actions/getActiveEnvironment";
10
- import { useAutoSync } from "@src/features/sync/AutoSyncProvider";
11
- import { getUnSyncedChanges } from "@src/features/sync/getUnSyncChanges";
12
- import { getEnvironment } from "@src/modules/environment";
13
- import { isLoading } from "@src/modules/loading";
14
- import { LoadingKeysEnum } from "@src/modules/loading/types";
15
- import { isModalOpen } from "@src/modules/modal";
16
- import { ModalKeysEnum } from "@src/modules/modal/types";
17
- import { AuthStatus } from "@src/modules/userContext/types";
18
- import useSliceMachineActions from "@src/modules/useSliceMachineActions";
19
- import { SliceMachineStoreType } from "@src/redux/type";
20
1
  import React from "react";
21
2
  import Modal from "react-modal";
22
3
  import { useSelector } from "react-redux";
@@ -32,6 +13,26 @@ import {
32
13
  Text,
33
14
  } from "theme-ui";
34
15
 
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
  interface ValidAuthStatus extends CheckAuthStatusResponse {
36
37
  status: "ok";
37
38
  shortId: string;
@@ -1,5 +1,3 @@
1
- import { Button } from "@components/Button";
2
- import SliceMachineModal from "@components/SliceMachineModal";
3
1
  import {
4
2
  Form,
5
3
  Formik,
@@ -16,6 +14,9 @@ import type {
16
14
  import Modal from "react-modal";
17
15
  import { Button as ThemeButton, Close, Flex, Heading } from "theme-ui";
18
16
 
17
+ import { Button } from "@/legacy/components/Button";
18
+ import SliceMachineModal from "@/legacy/components/SliceMachineModal";
19
+
19
20
  import Card from "../Card";
20
21
 
21
22
  type ModalCardProps<T extends FormikValues> = {
@@ -7,23 +7,24 @@ import {
7
7
  Text,
8
8
  Tooltip,
9
9
  } from "@prismicio/editor-ui";
10
+ import { useRouter } from "next/router";
11
+ import { type FC } from "react";
12
+
10
13
  import {
11
14
  HoverCard,
12
15
  HoverCardCloseButton,
13
16
  HoverCardDescription,
14
17
  HoverCardMedia,
15
18
  HoverCardTitle,
16
- } from "@src/components/HoverCard";
17
- import { useAutoSync } from "@src/features/sync/AutoSyncProvider";
18
- import { AutoSyncStatusIndicator } from "@src/features/sync/components/AutoSyncStatusIndicator";
19
- import { useUnSyncChanges } from "@src/features/sync/useUnSyncChanges";
20
- import { useAuthStatus } from "@src/hooks/useAuthStatus";
21
- import { useNetwork } from "@src/hooks/useNetwork";
22
- import { ChangesIcon } from "@src/icons/ChangesIcon";
23
- import { AuthStatus } from "@src/modules/userContext/types";
24
- import useSliceMachineActions from "@src/modules/useSliceMachineActions";
25
- import { useRouter } from "next/router";
26
- import { type FC } from "react";
19
+ } from "@/components/HoverCard";
20
+ import { useAutoSync } from "@/features/sync/AutoSyncProvider";
21
+ import { AutoSyncStatusIndicator } from "@/features/sync/components/AutoSyncStatusIndicator";
22
+ import { useUnSyncChanges } from "@/features/sync/useUnSyncChanges";
23
+ import { useAuthStatus } from "@/hooks/useAuthStatus";
24
+ import { useNetwork } from "@/hooks/useNetwork";
25
+ import { ChangesIcon } from "@/icons/ChangesIcon";
26
+ import { AuthStatus } from "@/modules/userContext/types";
27
+ import useSliceMachineActions from "@/modules/useSliceMachineActions";
27
28
 
28
29
  export const ChangesItem: FC = () => {
29
30
  const { setSeenChangesToolTip } = useSliceMachineActions();
@@ -1,22 +1,23 @@
1
- import { normalizeFrontendCustomTypes } from "@lib/models/common/normalizers/customType";
2
- import { normalizeFrontendSlices } from "@lib/models/common/normalizers/slices";
3
1
  import {
4
2
  Environment as EnvironmentType,
5
3
  isUnauthenticatedError,
6
4
  isUnauthorizedError,
7
5
  } from "@slicemachine/manager/client";
8
- import { getState, telemetry } from "@src/apiClient";
9
- import { SideNavEnvironmentSelector } from "@src/components/SideNav";
10
- import { setEnvironment } from "@src/features/environments/actions/setEnvironment";
11
- import { useActiveEnvironment } from "@src/features/environments/useActiveEnvironment";
12
- import { useEnvironments } from "@src/features/environments/useEnvironments";
13
- import { useAutoSync } from "@src/features/sync/AutoSyncProvider";
14
- import { getUnSyncedChanges } from "@src/features/sync/getUnSyncChanges";
15
- import { useAuthStatus } from "@src/hooks/useAuthStatus";
16
- import { useNetwork } from "@src/hooks/useNetwork";
17
- import useSliceMachineActions from "@src/modules/useSliceMachineActions";
18
6
  import { useState } from "react";
19
7
 
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
  export function Environment() {
21
22
  const { environments, error: useEnvironmentsError } = useEnvironments();
22
23
  const { activeEnvironment } = useActiveEnvironment();
@@ -1,7 +1,8 @@
1
- import { RightElement } from "@src/components/SideNav";
2
- import { useSliceMachineRunningVersion } from "@src/hooks/useSliceMachineRunningVersion";
3
1
  import { FC } from "react";
4
2
 
3
+ import { RightElement } from "@/components/SideNav";
4
+ import { useSliceMachineRunningVersion } from "@/hooks/useSliceMachineRunningVersion";
5
+
5
6
  export const RunningVersion: FC = () => {
6
7
  const sliceMachineRunningVersion = useSliceMachineRunningVersion();
7
8
 
@@ -1,8 +1,9 @@
1
- import { UpdateInfo } from "@src/components/SideNav";
2
- import { useUpdateAvailable } from "@src/hooks/useUpdateAvailable";
3
1
  import Link from "next/link";
4
2
  import { FC } from "react";
5
3
 
4
+ import { UpdateInfo } from "@/components/SideNav";
5
+ import { useUpdateAvailable } from "@/hooks/useUpdateAvailable";
6
+
6
7
  export const UpdateBox: FC = () => {
7
8
  const { sliceMachineUpdateAvailable, adapterUpdateAvailable } =
8
9
  useUpdateAvailable();
@@ -0,0 +1,5 @@
1
+ declare const styles: {
2
+ readonly "videoTutorialsContainer": string;
3
+ };
4
+ export = styles;
5
+
@@ -1,17 +1,3 @@
1
- import { ReactTooltipPortal } from "@components/ReactTooltipPortal";
2
- import { telemetry } from "@src/apiClient";
3
- import {
4
- HoverCard,
5
- HoverCardCloseButton,
6
- HoverCardDescription,
7
- HoverCardMedia,
8
- HoverCardTitle,
9
- } from "@src/components/HoverCard";
10
- import { SideNavLink, SideNavListItem } from "@src/components/SideNav";
11
- import { useMarketingContent } from "@src/hooks/useMarketingContent";
12
- import { PlayCircleIcon } from "@src/icons/PlayCircleIcon";
13
- import { getUserReview } from "@src/modules/userContext";
14
- import { SliceMachineStoreType } from "@src/redux/type";
15
1
  import {
16
2
  type FC,
17
3
  forwardRef,
@@ -25,6 +11,21 @@ import { useSelector } from "react-redux";
25
11
  import ReactTooltip from "react-tooltip";
26
12
  import { Close, Flex, Paragraph } from "theme-ui";
27
13
 
14
+ import { telemetry } from "@/apiClient";
15
+ import {
16
+ HoverCard,
17
+ HoverCardCloseButton,
18
+ HoverCardDescription,
19
+ HoverCardMedia,
20
+ HoverCardTitle,
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";
28
+
28
29
  import style from "./VideoItem.module.css";
29
30
 
30
31
  type VideoItemProps = {
@@ -0,0 +1,5 @@
1
+ declare const styles: {
2
+ readonly "environmentDivider": string;
3
+ };
4
+ export = styles;
5
+
@@ -1,24 +1,22 @@
1
1
  // @vitest-environment jsdom
2
- import { FrontEndEnvironment } from "@lib/models/common/Environment";
3
2
  import { cache } from "@prismicio/editor-support/Suspense";
4
3
  import { createSliceMachineManager } from "@slicemachine/manager";
5
4
  import { createSliceMachineManagerMSWHandler } from "@slicemachine/manager/test";
6
- import {
7
- AuthStatus,
8
- UserContextStoreType,
9
- } from "@src/modules/userContext/types";
10
5
  import Router from "next/router";
11
6
  import { act } from "react-dom/test-utils";
7
+ import { describe, expect, test, vi } from "vitest";
8
+
12
9
  import {
13
10
  render,
14
11
  type RenderReturnType,
15
12
  screen,
16
13
  waitFor,
17
14
  within,
18
- } from "test/__testutils__";
19
- import { createTestPlugin } from "test/__testutils__/createTestPlugin";
20
- import { createTestProject } from "test/__testutils__/createTestProject";
21
- import { describe, expect, test, vi } from "vitest";
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";
22
20
 
23
21
  import SideNavigation from "./index";
24
22
 
@@ -1,30 +1,31 @@
1
- import VideoItem from "@components/Navigation/VideoItem";
2
1
  import { Box } from "@prismicio/editor-ui";
3
- import { telemetry } from "@src/apiClient";
4
- import { Divider } from "@src/components/Divider";
2
+ import Link from "next/link";
3
+ import { useRouter } from "next/router";
4
+ import { type FC, Suspense } from "react";
5
+ import { useSelector } from "react-redux";
6
+
7
+ import { telemetry } from "@/apiClient";
8
+ import { Divider } from "@/components/Divider";
5
9
  import {
6
10
  SideNav,
7
11
  SideNavLink,
8
12
  SideNavList,
9
13
  SideNavListItem,
10
14
  SideNavRepository,
11
- } from "@src/components/SideNav/SideNav";
12
- import { ErrorBoundary } from "@src/ErrorBoundary";
13
- import { CUSTOM_TYPES_CONFIG } from "@src/features/customTypes/customTypesConfig";
14
- import { CUSTOM_TYPES_MESSAGES } from "@src/features/customTypes/customTypesMessages";
15
- import { useGitIntegrationExperiment } from "@src/features/settings/git/useGitIntegrationExperiment";
16
- import { useRepositoryInformation } from "@src/hooks/useRepositoryInformation";
17
- import { FolderIcon } from "@src/icons/FolderIcon";
18
- import { LightningIcon } from "@src/icons/Lightning";
19
- import { MathPlusIcon } from "@src/icons/MathPlusIcon";
20
- import { SettingsIcon } from "@src/icons/SettingsIcon";
21
- import { userHasSeenTutorialsToolTip } from "@src/modules/userContext";
22
- import useSliceMachineActions from "@src/modules/useSliceMachineActions";
23
- import { SliceMachineStoreType } from "@src/redux/type";
24
- import Link from "next/link";
25
- import { useRouter } from "next/router";
26
- import { type FC, Suspense } from "react";
27
- import { useSelector } from "react-redux";
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";
28
29
 
29
30
  import { ChangesItem } from "./ChangesItem";
30
31
  import { Environment } from "./Environment";
@@ -1,12 +1,3 @@
1
- import SliceMachineModal from "@components/SliceMachineModal";
2
- import { telemetry } from "@src/apiClient";
3
- import { isLoading } from "@src/modules/loading";
4
- import { LoadingKeysEnum } from "@src/modules/loading/types";
5
- import { isModalOpen } from "@src/modules/modal";
6
- import { ModalKeysEnum } from "@src/modules/modal/types";
7
- import { UserReviewType } from "@src/modules/userContext/types";
8
- import useSliceMachineActions from "@src/modules/useSliceMachineActions";
9
- import { SliceMachineStoreType } from "@src/redux/type";
10
1
  import { Field, Form, Formik } from "formik";
11
2
  import { FC } from "react";
12
3
  import Modal from "react-modal";
@@ -22,6 +13,16 @@ import {
22
13
  Textarea,
23
14
  } from "theme-ui";
24
15
 
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
  import { ReviewFormSelect } from "./ReviewFormSelect";
26
27
 
27
28
  Modal.setAppElement("#__next");
@@ -1,12 +1,13 @@
1
- import { hasLocal } from "@lib/models/common/ModelData";
2
- import { useInAppGuide } from "@src/features/inAppGuide/InAppGuideContext";
3
- import { selectAllCustomTypes } from "@src/modules/availableCustomTypes";
4
- import { getLibraries } from "@src/modules/slices";
5
- import { getLastSyncChange, getUserReview } from "@src/modules/userContext";
6
- import { SliceMachineStoreType } from "@src/redux/type";
7
1
  import { FC } from "react";
8
2
  import { useSelector } from "react-redux";
9
3
 
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
  import { ReviewForm } from "./ReviewForm";
11
12
 
12
13
  export const ReviewModal: FC = () => {
@@ -1,14 +1,15 @@
1
- import { ScreenshotPreview } from "@components/ScreenshotPreview";
2
- import { acceptedImagesTypes } from "@lib/consts";
3
- import { ComponentUI } from "@lib/models/common/ComponentUI";
4
- import { uploadSliceScreenshot } from "@src/features/slices/actions/uploadSliceScreenshot";
5
- import useSliceMachineActions from "@src/modules/useSliceMachineActions";
6
1
  import { useState } from "react";
7
2
  import { useHotkeys } from "react-hotkeys-hook";
8
3
  import { AiOutlineCloudUpload } from "react-icons/ai";
9
4
  import { toast } from "react-toastify";
10
5
  import { Flex, Spinner, Text } from "theme-ui";
11
6
 
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
  import useCustomScreenshot from "./useCustomScreenshot";
13
14
 
14
15
  interface DropZoneProps {
@@ -1,19 +1,20 @@
1
- import Card from "@components/Card";
2
- import SliceMachineModal from "@components/SliceMachineModal";
3
- import { ComponentUI } from "@lib/models/common/ComponentUI";
4
- import { Kbd } from "@src/components/Kbd";
5
- import { FigmaIcon } from "@src/icons/FigmaIcon";
6
- import { isModalOpen } from "@src/modules/modal";
7
- import { ModalKeysEnum } from "@src/modules/modal/types";
8
- import useSliceMachineActions from "@src/modules/useSliceMachineActions";
9
- import { SliceMachineStoreType } from "@src/redux/type";
10
- import { getOS, OS } from "@src/utils/os";
11
1
  import { useEffect, useState } from "react";
12
2
  import { AiOutlinePicture } from "react-icons/ai";
13
3
  import { RiErrorWarningLine } from "react-icons/ri";
14
4
  import { useSelector } from "react-redux";
15
5
  import { Box, Close, Flex, Heading, Text } from "theme-ui";
16
6
 
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";
17
+
17
18
  import VariationDropZone from "./VariationDropZone";
18
19
 
19
20
  export type SliceVariationSelector = { sliceID: string; variationID: string };