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.
Files changed (534) hide show
  1. package/.eslintrc.js +6 -1
  2. package/.storybook/preview.tsx +2 -1
  3. package/out/404.html +1 -1
  4. package/out/_next/static/QWi-WrYk9EtyMIs1RfQ3_/_buildManifest.js +1 -0
  5. package/out/_next/static/chunks/{183-ebd633fed7c74545.js → 183-6ad1d7303abecd2b.js} +1 -1
  6. package/out/_next/static/chunks/18539003-32a73014bab3a789.js +22 -0
  7. package/out/_next/static/chunks/188-2e42d5ebef697946.js +1 -0
  8. package/out/_next/static/chunks/569-2ae3e9666f3bf991.js +1 -0
  9. package/out/_next/static/chunks/614-5130fbdbcfab2d35.js +1 -0
  10. package/out/_next/static/chunks/661-78c8c89d258133b8.js +1 -0
  11. package/out/_next/static/chunks/756-b11a3060cdc2f2d3.js +10 -0
  12. package/out/_next/static/chunks/90-2d4bdae13d031364.js +1 -0
  13. package/out/_next/static/chunks/91-67c244a4a034c8de.js +1 -0
  14. package/out/_next/static/chunks/pages/_app-0fe871bb1059a05c.js +532 -0
  15. package/out/_next/static/chunks/pages/changelog-3f04a3d8747ae383.js +1 -0
  16. package/out/_next/static/chunks/pages/changes-ec62e7eb50d6f2be.js +1 -0
  17. package/out/_next/static/chunks/pages/custom-types/[customTypeId]-982ecf1d799b6bcf.js +1 -0
  18. package/out/_next/static/chunks/pages/{custom-types-3c8e721ec6802127.js → custom-types-900b40b54b74e6d6.js} +1 -1
  19. package/out/_next/static/chunks/pages/{index-cf93d16e9c63b6db.js → index-ccd2975faba412f6.js} +1 -1
  20. package/out/_next/static/chunks/pages/labs-830dde0b85d6dd01.js +1 -0
  21. package/out/_next/static/chunks/pages/page-types/[pageTypeId]-886fc28240831dae.js +1 -0
  22. package/out/_next/static/chunks/pages/settings-f61144a9387fd6f1.js +1 -0
  23. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-9bdb355306fca592.js +1 -0
  24. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-ad66e6c755798ce7.js +1 -0
  25. package/out/_next/static/chunks/pages/slices-d65be4ca817a766d.js +1 -0
  26. package/out/_next/static/css/037ba37d121d4afe.css +1 -0
  27. package/out/_next/static/css/22f264c93bd9d85f.css +1 -0
  28. package/out/_next/static/css/6279e95f6aff22d5.css +1 -0
  29. package/out/_next/static/css/824d6e761aed01d2.css +1 -0
  30. package/out/_next/static/css/e3ffbc7931a47375.css +1 -0
  31. package/out/_next/static/css/f01f60095c76c7fb.css +1 -0
  32. package/out/changelog.html +1 -1
  33. package/out/changes.html +1 -1
  34. package/out/custom-types/[customTypeId].html +1 -1
  35. package/out/custom-types.html +1 -1
  36. package/out/index.html +1 -1
  37. package/out/labs.html +1 -1
  38. package/out/page-types/[pageTypeId].html +1 -1
  39. package/out/settings.html +1 -1
  40. package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
  41. package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
  42. package/out/slices.html +1 -1
  43. package/package.json +10 -11
  44. package/sentry.client.config.ts +2 -1
  45. package/src/ErrorBoundary.tsx +1 -1
  46. package/src/apiClient.ts +13 -9
  47. package/src/components/BaseHoverCard/BaseHoverCard.module.css +18 -0
  48. package/src/components/BaseHoverCard/BaseHoverCard.module.css.d.ts +7 -0
  49. package/src/components/BaseHoverCard/BaseHoverCard.stories.tsx +1 -1
  50. package/src/components/BaseHoverCard/BaseHoverCard.test.tsx +1 -1
  51. package/src/components/BaseHoverCard/BaseHoverCard.tsx +2 -2
  52. package/src/components/BlankSlate/BlankSlate.module.css +74 -0
  53. package/src/components/BlankSlate/BlankSlate.module.css.d.ts +13 -0
  54. package/src/components/BlankSlate/BlankSlate.stories.tsx +1 -1
  55. package/src/components/BlankSlate/BlankSlate.tsx +1 -1
  56. package/src/components/BlankSlate/index.ts +1 -1
  57. package/src/components/Breadcrumb/Breadcrumb.tsx +1 -1
  58. package/src/components/Card/Card.module.css +202 -0
  59. package/src/components/Card/Card.module.css.d.ts +22 -0
  60. package/src/components/Card/Card.stories.tsx +3 -3
  61. package/src/components/Card/Card.tsx +8 -8
  62. package/src/components/CodeBlock/CodeBlock.module.css +46 -0
  63. package/src/components/CodeBlock/CodeBlock.module.css.d.ts +10 -0
  64. package/src/components/CodeBlock/CodeBlock.tsx +7 -7
  65. package/src/components/ContentTabs/ContentTabs.module.css +60 -0
  66. package/src/components/ContentTabs/ContentTabs.module.css.d.ts +12 -0
  67. package/src/components/ContentTabs/ContentTabs.tsx +2 -2
  68. package/src/components/Count/Count.tsx +1 -1
  69. package/src/components/Divider/Divider.module.css +23 -0
  70. package/src/components/Divider/Divider.module.css.d.ts +7 -0
  71. package/src/components/Divider/Divider.stories.tsx +3 -4
  72. package/src/components/Divider/Divider.tsx +5 -8
  73. package/src/components/HoverCard/HoverCard.module.css +79 -0
  74. package/src/components/HoverCard/HoverCard.module.css.d.ts +13 -0
  75. package/src/components/HoverCard/HoverCard.stories.tsx +3 -2
  76. package/src/components/HoverCard/HoverCard.test.tsx +2 -2
  77. package/src/components/HoverCard/HoverCard.tsx +3 -3
  78. package/src/components/HoverCard/index.ts +3 -3
  79. package/src/components/List/List.css.ts +4 -2
  80. package/src/components/PageLayout/PageLayout.module.css +1 -1
  81. package/src/components/SideNav/SideNav.module.css +1 -1
  82. package/src/components/SideNav/SideNav.stories.tsx +6 -6
  83. package/src/components/SideNav/SideNav.tsx +8 -8
  84. package/src/components/SideNav/SideNavEnvironmentSelector.tsx +10 -12
  85. package/src/components/Table/Table.stories.tsx +2 -2
  86. package/src/components/Table/Table.test.tsx +2 -2
  87. package/src/components/Table/Table.tsx +2 -2
  88. package/src/components/Table/index.ts +1 -1
  89. package/src/components/TextLink/TextLink.module.css +58 -0
  90. package/src/components/TextLink/TextLink.module.css.d.ts +11 -0
  91. package/src/components/TextLink/TextLink.stories.tsx +1 -1
  92. package/src/components/TextLink/TextLink.tsx +5 -5
  93. package/src/domain/__tests__/customType.test.ts +1 -186
  94. package/src/domain/__tests__/group.test.ts +161 -0
  95. package/src/domain/__tests__/slice.test.ts +3 -3
  96. package/src/domain/customType.ts +1 -193
  97. package/src/domain/group.ts +89 -0
  98. package/src/domain/slice.ts +28 -12
  99. package/src/features/autoSave/AutoSaveStatusIndicator.tsx +2 -2
  100. package/src/features/changelog/useSliceMachineLatestNonBreakingVersion.ts +1 -1
  101. package/src/features/changelog/useSliceMachineReleaseNotes.ts +1 -1
  102. package/src/features/changelog/useSliceMachineVersions.ts +2 -2
  103. package/src/features/changes/BlankSlates/NoChangesBlankSlate.tsx +11 -14
  104. package/src/features/changes/PushChangesButton.tsx +5 -5
  105. package/src/features/changes/StatusBadge.tsx +2 -2
  106. package/src/features/customTypes/EditDropdown.tsx +6 -9
  107. package/src/features/customTypes/PageTypeOnboarding.tsx +5 -5
  108. package/src/features/customTypes/__tests__/CustomTypeBuilderPage.test.tsx +11 -12
  109. package/src/features/customTypes/__tests__/CustomTypesTablePage.test.tsx +11 -10
  110. package/src/features/customTypes/actions/convertCustomToPageType.ts +4 -4
  111. package/src/features/customTypes/actions/createCustomType.ts +5 -5
  112. package/src/features/customTypes/actions/deleteCustomType.ts +3 -3
  113. package/src/features/customTypes/actions/renameCustomType.ts +3 -3
  114. package/src/features/customTypes/customTypesBuilder/CustomTypeProvider.tsx +8 -8
  115. package/src/features/customTypes/customTypesBuilder/CustomTypesBuilderPage.tsx +17 -12
  116. package/src/features/customTypes/customTypesBuilder/PageSnippetDialog/PageSnippetDialog.module.css +8 -0
  117. package/src/features/customTypes/customTypesBuilder/PageSnippetDialog/PageSnippetDialog.module.css.d.ts +5 -0
  118. package/src/features/customTypes/customTypesBuilder/PageSnippetDialog/PageSnippetDialog.tsx +8 -8
  119. package/src/features/customTypes/customTypesBuilder/SliceZoneBlankSlate.tsx +3 -3
  120. package/src/features/customTypes/customTypesBuilder/useCustomType.ts +1 -1
  121. package/src/features/customTypes/customTypesConfig.ts +2 -2
  122. package/src/features/customTypes/customTypesTable/CustomTypesTable.tsx +16 -16
  123. package/src/features/customTypes/customTypesTable/CustomTypesTablePage.tsx +9 -9
  124. package/src/features/customTypes/customTypesTable/useCustomTypes.ts +8 -8
  125. package/src/features/documentation/MarkdownRenderer/MarkdownRenderer.module.css +11 -0
  126. package/src/features/documentation/MarkdownRenderer/MarkdownRenderer.module.css.d.ts +6 -0
  127. package/src/features/documentation/MarkdownRenderer/index.tsx +6 -7
  128. package/src/features/documentation/useDocumentation.ts +1 -1
  129. package/src/features/environments/actions/getActiveEnvironment.ts +1 -1
  130. package/src/features/environments/actions/getEnvironments.ts +1 -1
  131. package/src/features/environments/actions/setEnvironment.ts +3 -3
  132. package/src/features/inAppGuide/InAppGuideContext.tsx +2 -2
  133. package/src/features/inAppGuide/InAppGuideDialog.tsx +4 -4
  134. package/src/features/inAppGuide/inAppGuideContent.tsx +4 -4
  135. package/src/features/labs/labsList/LabsList.tsx +2 -2
  136. package/src/features/labs/labsList/LabsListItem.tsx +1 -1
  137. package/src/features/labs/labsList/LabsPage.tsx +5 -5
  138. package/src/features/labs/labsList/useLab.tsx +1 -1
  139. package/src/features/settings/SettingsPage.tsx +4 -4
  140. package/src/features/settings/git/ConnectGitRepository.tsx +9 -9
  141. package/src/features/settings/git/GitOwnerSelect.tsx +1 -1
  142. package/src/features/settings/git/GitProvider.ts +4 -4
  143. package/src/features/settings/git/GitProviderConnectButtons.tsx +1 -1
  144. package/src/features/settings/git/GitRepositoriesList.tsx +5 -5
  145. package/src/features/settings/git/GitRepositoriesSearch.tsx +5 -5
  146. package/src/features/settings/git/GitRepositoryConnectDialog.tsx +5 -8
  147. package/src/features/settings/git/useGitIntegrationExperiment.ts +1 -1
  148. package/src/features/settings/git/useGitOwners.ts +1 -1
  149. package/src/features/settings/git/useGitRepos.ts +1 -1
  150. package/src/features/settings/git/useLinkedGitRepos.ts +2 -2
  151. package/src/features/settings/git/useWriteAPIToken.ts +2 -2
  152. package/src/features/slices/actions/addSlicesToSliceZone.ts +2 -2
  153. package/src/features/slices/actions/createSlice.ts +5 -5
  154. package/src/features/slices/actions/deleteSlice.ts +1 -1
  155. package/src/features/slices/actions/renameSlice.ts +4 -4
  156. package/src/features/slices/actions/uploadSliceScreenshot.ts +2 -2
  157. package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewSliceDialog.tsx +10 -10
  158. package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewVariationDialog.tsx +7 -7
  159. package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.module.css +14 -0
  160. package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.module.css.d.ts +6 -0
  161. package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.tsx +12 -12
  162. package/src/features/slices/convertLegacySlice/ConvertLegacySliceMergeWithIdenticalDialog.tsx +5 -8
  163. package/src/features/slices/convertLegacySlice/types.ts +2 -2
  164. package/src/features/slices/sliceBuilder/FloatingBackButton.tsx +6 -6
  165. package/src/features/slices/sliceBuilder/SliceBuilderProvider.tsx +9 -9
  166. package/src/features/slices/sliceBuilder/actions/deleteVariation.ts +4 -4
  167. package/src/features/slices/sliceBuilder/actions/renameVariation.ts +3 -3
  168. package/src/features/slices/sliceCards/NonSharedSliceCard.tsx +4 -4
  169. package/src/features/slices/sliceCards/SharedSliceCard.tsx +7 -7
  170. package/src/features/slicesTemplates/actions/createSlicesTemplates.ts +2 -2
  171. package/src/features/slicesTemplates/useSlicesTemplates.ts +2 -1
  172. package/src/features/sync/AutoSyncProvider.tsx +17 -17
  173. package/src/features/sync/actions/pushChanges.ts +4 -3
  174. package/src/features/sync/actions/trackPushChangesSuccess.ts +3 -3
  175. package/src/features/sync/components/AutoSyncStatusIndicator.module.css +1 -1
  176. package/src/features/sync/components/AutoSyncStatusIndicator.tsx +4 -4
  177. package/src/features/sync/fetchUnSyncChanges.ts +5 -5
  178. package/src/features/sync/getUnSyncChanges.ts +9 -9
  179. package/src/features/sync/useUnSyncChanges.ts +5 -5
  180. package/src/hooks/useActionQueue.tsx +5 -5
  181. package/src/hooks/useAdapterName.ts +1 -1
  182. package/src/hooks/useAuthStatus.ts +2 -2
  183. package/src/hooks/useCurrentSlice.tsx +4 -4
  184. package/src/hooks/useEditorContent.ts +5 -4
  185. package/src/hooks/useExperimentVariant.ts +2 -2
  186. package/src/hooks/useIsEmptyProject.ts +1 -1
  187. package/src/hooks/useRepositoryInformation.ts +2 -2
  188. package/src/hooks/useRouteChange.tsx +1 -1
  189. package/src/hooks/useSMTracker.ts +6 -6
  190. package/src/hooks/useScreenshotChangesModal.ts +5 -4
  191. package/src/hooks/useServerState.ts +4 -4
  192. package/src/hooks/useSliceMachineConfig.ts +2 -2
  193. package/src/hooks/useSliceMachineRunningVersion.ts +1 -1
  194. package/src/hooks/useThrottle.ts +1 -1
  195. package/src/hooks/useUpdateAvailable.ts +1 -1
  196. package/src/hooks/useWindowDimensions.ts +1 -1
  197. package/src/hooks/useWindowSize.ts +2 -1
  198. package/{components → src/legacy/components}/App/index.tsx +8 -8
  199. package/{components → src/legacy/components}/AppLayout/index.tsx +5 -6
  200. package/{components → src/legacy/components}/AuthInstructions/index.jsx +1 -1
  201. package/{components → src/legacy/components}/Button/index.tsx +1 -2
  202. package/{components → src/legacy/components}/Card/Default.jsx +2 -1
  203. package/{components → src/legacy/components}/Card/Preview.jsx +1 -1
  204. package/{components → src/legacy/components}/Card/WithTabs/index.jsx +4 -3
  205. package/{components → src/legacy/components}/Card/index.tsx +1 -0
  206. package/{components → src/legacy/components}/Changelog/index.tsx +8 -8
  207. package/{components → src/legacy/components}/Changelog/navigation/VersionBadge.tsx +2 -1
  208. package/{components → src/legacy/components}/Changelog/navigation/VersionTag.tsx +1 -0
  209. package/{components → src/legacy/components}/Changelog/navigation/index.tsx +6 -6
  210. package/{components → src/legacy/components}/Changelog/versionDetails/UpdateCommandBox.tsx +6 -6
  211. package/{components → src/legacy/components}/Changelog/versionDetails/VersionKindLabel.tsx +3 -4
  212. package/{components → src/legacy/components}/Changelog/versionDetails/index.tsx +5 -5
  213. package/{components → src/legacy/components}/ChangesEmptyState/AuthErrorPage.tsx +5 -5
  214. package/{components → src/legacy/components}/ChangesItems/ChangesItems.tsx +14 -14
  215. package/{components → src/legacy/components}/ChangesItems/DevCollaborationExperiment.tsx +3 -3
  216. package/{components → src/legacy/components}/CodeBlock/index.tsx +3 -3
  217. package/{components → src/legacy/components}/ConfigErrors/index.jsx +4 -3
  218. package/{components → src/legacy/components}/CustomTypeTable/changesPage.tsx +9 -8
  219. package/{components → src/legacy/components}/DeleteCTModal/index.tsx +9 -9
  220. package/{components → src/legacy/components}/DeleteDocumentsDrawer/AssociatedDocumentsCard.tsx +4 -4
  221. package/{components → src/legacy/components}/DeleteDocumentsDrawer/HardDeleteDocumentsDrawer.tsx +9 -9
  222. package/{components → src/legacy/components}/DeleteDocumentsDrawer/SoftDeleteDocumentsDrawer.tsx +9 -8
  223. package/{components → src/legacy/components}/DeleteSliceModal/index.tsx +6 -6
  224. package/{components → src/legacy/components}/DeleteVariationModal/index.tsx +6 -6
  225. package/{components → src/legacy/components}/DropDownSelector/index.tsx +2 -4
  226. package/{components → src/legacy/components}/EmptyState/index.tsx +3 -3
  227. package/{components → src/legacy/components}/FormFields/Array.jsx +2 -4
  228. package/{components → src/legacy/components}/FormFields/Checkbox.jsx +1 -1
  229. package/{components → src/legacy/components}/FormFields/CheckboxControl.jsx +1 -1
  230. package/{components → src/legacy/components}/FormFields/Input.tsx +3 -2
  231. package/{components → src/legacy/components}/FormFields/SelectDefaultValue.jsx +1 -1
  232. package/{components → src/legacy/components}/Forms/CreateCustomTypeModal/CreateCustomTypeModal.tsx +18 -18
  233. package/{components → src/legacy/components}/Forms/CreateSliceModal/CreateSliceModal.tsx +10 -10
  234. package/{components → src/legacy/components}/Forms/RenameCustomTypeModal/RenameCustomTypeModal.tsx +12 -12
  235. package/{components → src/legacy/components}/Forms/RenameSliceModal/RenameSliceModal.tsx +8 -8
  236. package/src/legacy/components/Forms/RenameVariationModal/RenameVariationModal.module.css +5 -0
  237. package/src/legacy/components/Forms/RenameVariationModal/RenameVariationModal.module.css.d.ts +5 -0
  238. package/{components → src/legacy/components}/Forms/RenameVariationModal/RenameVariationModal.tsx +7 -7
  239. package/{components → src/legacy/components}/Forms/components/InputBox.tsx +2 -2
  240. package/{components → src/legacy/components}/Forms/components/SelectRepeatable.tsx +4 -3
  241. package/{components → src/legacy/components}/Forms/formsValidator.ts +6 -4
  242. package/{components → src/legacy/components}/FullPage/index.tsx +1 -1
  243. package/{components → src/legacy/components}/ListItem/Header.tsx +3 -2
  244. package/{components → src/legacy/components}/ListItem/index.tsx +8 -10
  245. package/{components → src/legacy/components}/LoadingPage/index.tsx +1 -0
  246. package/{components → src/legacy/components}/LoginModal/index.tsx +22 -22
  247. package/{components → src/legacy/components}/ModalFormCard/index.tsx +7 -6
  248. package/{components → src/legacy/components}/Navigation/ChangesItem.tsx +18 -16
  249. package/{components → src/legacy/components}/Navigation/Environment.tsx +13 -13
  250. package/{components → src/legacy/components}/Navigation/RunningVersion.tsx +2 -2
  251. package/{components → src/legacy/components}/Navigation/UpdateBox.tsx +3 -3
  252. package/src/legacy/components/Navigation/VideoItem.module.css.d.ts +5 -0
  253. package/{components → src/legacy/components}/Navigation/VideoItem.tsx +14 -13
  254. package/src/legacy/components/Navigation/index.module.css +3 -0
  255. package/src/legacy/components/Navigation/index.module.css.d.ts +5 -0
  256. package/{components → src/legacy/components}/Navigation/index.test.tsx +12 -12
  257. package/{components → src/legacy/components}/Navigation/index.tsx +20 -21
  258. package/{components → src/legacy/components}/ReviewModal/ReviewForm.tsx +12 -12
  259. package/{components → src/legacy/components}/ReviewModal/ReviewModal.tsx +6 -6
  260. package/{components → src/legacy/components}/ScreenshotChangesModal/VariationDropZone.tsx +7 -7
  261. package/{components → src/legacy/components}/ScreenshotChangesModal/index.tsx +12 -15
  262. package/{components → src/legacy/components}/ScreenshotChangesModal/useCustomScreenshot.tsx +1 -1
  263. package/{components → src/legacy/components}/ScreenshotPreviewModal/index.tsx +8 -7
  264. package/{components → src/legacy/components}/Simulator/components/FailedConnect/index.tsx +3 -3
  265. package/{components → src/legacy/components}/Simulator/components/Header/VariationsPopover/MenuList.tsx +2 -1
  266. package/{components → src/legacy/components}/Simulator/components/Header/VariationsPopover/index.tsx +4 -5
  267. package/{components → src/legacy/components}/Simulator/components/Header/index.tsx +7 -7
  268. package/{components → src/legacy/components}/Simulator/components/IframeRenderer/index.tsx +3 -4
  269. package/{components → src/legacy/components}/Simulator/components/Toolbar/ScreensizeInput/index.tsx +2 -1
  270. package/{components → src/legacy/components}/Simulator/components/Toolbar/index.tsx +4 -5
  271. package/{components → src/legacy/components}/Simulator/index.tsx +25 -30
  272. package/{components → src/legacy/components}/SliceMachineDrawer/index.tsx +3 -2
  273. package/{components → src/legacy/components}/ToasterContainer/index.tsx +3 -5
  274. package/{components → src/legacy/components}/Tooltip/TextWithTooltip.tsx +2 -2
  275. package/{components → src/legacy/components}/Tooltip/index.jsx +2 -2
  276. package/{components → src/legacy/components}/Warnings/index.jsx +1 -1
  277. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/DeleteSliceZoneModal.tsx +4 -4
  278. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/List.tsx +8 -8
  279. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/SlicesTemplatesModal.tsx +11 -11
  280. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModal.tsx +3 -3
  281. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModalList.tsx +4 -3
  282. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/index.tsx +26 -23
  283. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/sliceTemplatesComingSoon.ts +1 -1
  284. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/InputBox.tsx +1 -1
  285. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/create.tsx +2 -1
  286. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/delete.tsx +2 -2
  287. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/update.tsx +3 -2
  288. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabZone/index.tsx +34 -32
  289. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/index.tsx +5 -5
  290. package/{lib → src/legacy/lib}/builders/SliceBuilder/FieldZones/index.tsx +43 -52
  291. package/{lib → src/legacy/lib}/builders/SliceBuilder/SimulatorButton/index.tsx +12 -11
  292. package/{lib/builders/SliceBuilder/Sidebar → src/legacy/lib/builders/SliceBuilder/VariationsList}/AddVariationModal.tsx +7 -7
  293. package/src/legacy/lib/builders/SliceBuilder/VariationsList/VariationsList.module.css +10 -0
  294. package/src/legacy/lib/builders/SliceBuilder/VariationsList/VariationsList.module.css.d.ts +5 -0
  295. package/src/legacy/lib/builders/SliceBuilder/VariationsList/index.tsx +253 -0
  296. package/{lib → src/legacy/lib}/builders/SliceBuilder/index.tsx +18 -13
  297. package/{lib → src/legacy/lib}/builders/common/EditModal/Field.jsx +3 -5
  298. package/{lib → src/legacy/lib}/builders/common/EditModal/Form.jsx +1 -1
  299. package/{lib → src/legacy/lib}/builders/common/EditModal/index.jsx +14 -16
  300. package/{lib → src/legacy/lib}/builders/common/SelectFieldTypeModal/index.jsx +3 -4
  301. package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/ErrorTooltip.tsx +2 -2
  302. package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/Hints/CodeBlock.tsx +4 -5
  303. package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/Hints/index.tsx +2 -1
  304. package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/NewField.tsx +16 -13
  305. package/{lib → src/legacy/lib}/builders/common/Zone/Card/index.jsx +15 -9
  306. package/src/legacy/lib/builders/common/Zone/components/ZoneEmptyState/ZoneEmptyState.module.css +12 -0
  307. package/src/legacy/lib/builders/common/Zone/components/ZoneEmptyState/ZoneEmptyState.module.css.d.ts +5 -0
  308. package/src/legacy/lib/builders/common/Zone/components/ZoneEmptyState/ZoneEmptyState.tsx +39 -0
  309. package/src/legacy/lib/builders/common/Zone/components/ZoneEmptyState/index.tsx +1 -0
  310. package/{lib → src/legacy/lib}/builders/common/Zone/index.jsx +37 -19
  311. package/{lib → src/legacy/lib}/builders/utils/index.ts +1 -1
  312. package/{lib → src/legacy/lib}/forms/fields.ts +1 -2
  313. package/{lib → src/legacy/lib}/forms/index.ts +1 -0
  314. package/{lib → src/legacy/lib}/models/common/CustomType/index.ts +5 -4
  315. package/{lib → src/legacy/lib}/models/common/CustomType/sliceZone.ts +2 -1
  316. package/{lib → src/legacy/lib}/models/common/DeprecatedMockConfigMessage.tsx +3 -2
  317. package/{lib → src/legacy/lib}/models/common/Environment.ts +2 -2
  318. package/{lib → src/legacy/lib}/models/common/Group.ts +3 -2
  319. package/{lib → src/legacy/lib}/models/common/Library.ts +2 -1
  320. package/{lib → src/legacy/lib}/models/common/LibraryUI.ts +1 -1
  321. package/{lib → src/legacy/lib}/models/common/ModelData.ts +3 -3
  322. package/{lib → src/legacy/lib}/models/common/ModelStatus/compareCustomTypeModels.ts +2 -1
  323. package/{lib → src/legacy/lib}/models/common/ModelStatus/compareSliceModels.ts +2 -1
  324. package/{lib → src/legacy/lib}/models/common/ModelStatus/index.ts +10 -9
  325. package/{lib → src/legacy/lib}/models/common/Slice.ts +19 -5
  326. package/{lib → src/legacy/lib}/models/common/normalizers/customType.ts +2 -2
  327. package/{lib → src/legacy/lib}/models/common/normalizers/slices.ts +3 -2
  328. package/{lib → src/legacy/lib}/models/common/widgets/Boolean/index.ts +5 -7
  329. package/{lib → src/legacy/lib}/models/common/widgets/Color/index.ts +2 -3
  330. package/{lib → src/legacy/lib}/models/common/widgets/ContentRelationship/Form.tsx +9 -10
  331. package/{lib → src/legacy/lib}/models/common/widgets/ContentRelationship/index.ts +7 -7
  332. package/{lib → src/legacy/lib}/models/common/widgets/GeoPoint/index.ts +2 -3
  333. package/{lib → src/legacy/lib}/models/common/widgets/Group/Form.jsx +6 -6
  334. package/{lib → src/legacy/lib}/models/common/widgets/Group/ListItem/index.jsx +63 -76
  335. package/{lib → src/legacy/lib}/models/common/widgets/Group/index.ts +6 -4
  336. package/{lib → src/legacy/lib}/models/common/widgets/Image/Form.tsx +9 -11
  337. package/{lib → src/legacy/lib}/models/common/widgets/Image/components.tsx +6 -5
  338. package/{lib → src/legacy/lib}/models/common/widgets/Image/index.ts +3 -5
  339. package/{lib → src/legacy/lib}/models/common/widgets/Link/Form.jsx +5 -7
  340. package/{lib → src/legacy/lib}/models/common/widgets/LinkToMedia/Form.jsx +4 -6
  341. package/{lib → src/legacy/lib}/models/common/widgets/LinkToMedia/index.ts +4 -4
  342. package/{lib → src/legacy/lib}/models/common/widgets/Select/FormFields.jsx +7 -7
  343. package/{lib → src/legacy/lib}/models/common/widgets/Select/index.ts +3 -6
  344. package/{lib → src/legacy/lib}/models/common/widgets/StructuredText/Form.tsx +12 -11
  345. package/{lib → src/legacy/lib}/models/common/widgets/StructuredText/index.ts +3 -6
  346. package/{lib → src/legacy/lib}/models/common/widgets/StructuredText/options.tsx +2 -2
  347. package/{lib → src/legacy/lib}/models/common/widgets/Timestamp/index.ts +4 -5
  348. package/{lib → src/legacy/lib}/models/common/widgets/UID/index.ts +4 -5
  349. package/{lib → src/legacy/lib}/models/common/widgets/Widget.ts +3 -1
  350. package/src/legacy/lib/models/common/widgets/groupBuilderArray.ts +18 -0
  351. package/src/legacy/lib/models/common/widgets/sliceBuilderArray.ts +19 -0
  352. package/src/legacy/lib/models/common/widgets/withGroup.ts +2 -0
  353. package/{lib → src/legacy/lib}/models/server/ServerState.ts +4 -3
  354. package/{lib → src/legacy/lib}/utils/index.ts +4 -5
  355. package/{lib → src/legacy/lib}/utils/shared/customTypes.ts +1 -1
  356. package/src/modules/availableCustomTypes/index.ts +15 -13
  357. package/src/modules/availableCustomTypes/types.ts +2 -2
  358. package/src/modules/environment/index.ts +10 -8
  359. package/src/modules/environment/types.ts +1 -1
  360. package/src/modules/loading/index.ts +3 -2
  361. package/src/modules/modal/index.ts +4 -2
  362. package/src/modules/slices/index.ts +13 -9
  363. package/src/modules/slices/selector.ts +1 -1
  364. package/src/modules/slices/types.ts +2 -2
  365. package/src/modules/useSliceMachineActions.ts +25 -20
  366. package/src/modules/userContext/index.ts +5 -3
  367. package/{pages → src/pages}/_app.tsx +23 -25
  368. package/{pages → src/pages}/changelog.tsx +1 -1
  369. package/{pages → src/pages}/changes.tsx +22 -19
  370. package/src/pages/custom-types/[customTypeId].tsx +1 -0
  371. package/{pages → src/pages}/custom-types.tsx +1 -1
  372. package/{pages → src/pages}/index.tsx +3 -3
  373. package/src/pages/labs.tsx +1 -0
  374. package/src/pages/page-types/[pageTypeId].tsx +1 -0
  375. package/src/pages/settings.tsx +1 -0
  376. package/{pages → src/pages}/slices/[lib]/[sliceName]/[variation]/index.tsx +3 -3
  377. package/{pages → src/pages}/slices/[lib]/[sliceName]/[variation]/simulator.tsx +2 -2
  378. package/{pages → src/pages}/slices.tsx +21 -21
  379. package/src/redux/reducer.ts +8 -7
  380. package/src/redux/store.ts +8 -6
  381. package/src/redux/type.ts +7 -6
  382. package/src/theme.ts +1 -2
  383. package/src/utils/getContentTypeForTracking.ts +21 -0
  384. package/test/__setup__.ts +10 -8
  385. package/test/__testutils__/createTestPlugin.ts +3 -2
  386. package/test/__testutils__/createTestProject.ts +5 -4
  387. package/test/__testutils__/index.tsx +6 -5
  388. package/test/__testutils__/mockAWSACLAPI.ts +1 -1
  389. package/test/__testutils__/mockCustomTypesAPI.ts +1 -1
  390. package/test/__testutils__/mockPrismicAuthAPI.ts +1 -1
  391. package/test/__testutils__/mockPrismicUserAPI.ts +2 -3
  392. package/test/__testutils__/readMSWFormData.ts +1 -1
  393. package/test/components/IframeRenderer.test.ts +3 -2
  394. package/test/lib/builders/EditModal.test.tsx +5 -3
  395. package/test/lib/builders/buildersUtils.test.ts +3 -3
  396. package/test/lib/consts.test.ts +6 -2
  397. package/test/lib/models/common/CustomType.test.ts +6 -2
  398. package/test/lib/models/common/ModelStatus.test.ts +6 -4
  399. package/test/lib/models/common/Slice.test.ts +3 -2
  400. package/test/lib/models/common/widgets/index.test.ts +8 -4
  401. package/test/lib/utils/index.test.ts +3 -2
  402. package/test/lib/utils/preferWroomBase.test.ts +3 -2
  403. package/test/lib/utils/shared/customTypes.test.ts +2 -1
  404. package/test/pages/slices.test.tsx +10 -10
  405. package/test/src/modules/__fixtures__/serverState.ts +3 -3
  406. package/test/src/modules/__fixtures__/sliceUtilsFactory.ts +3 -3
  407. package/test/src/modules/availableCustomTypes/index.test.ts +3 -3
  408. package/test/src/modules/environment.test.ts +3 -5
  409. package/test/src/modules/loading.test.ts +3 -3
  410. package/test/src/modules/modal.test.ts +5 -5
  411. package/test/src/modules/slices.test.ts +3 -2
  412. package/test/src/modules/userContext.test.ts +3 -3
  413. package/test/src/normalizers/customType.test.ts +16 -3
  414. package/test/src/utils/fieldNameCreator.test.ts +1 -1
  415. package/tsconfig.json +1 -6
  416. package/vite.config.ts +5 -10
  417. package/components/Forms/RenameVariationModal/RenameVariationModal.css.ts +0 -7
  418. package/components/Navigation/index.css.ts +0 -5
  419. package/lib/builders/SliceBuilder/Sidebar/index.tsx +0 -157
  420. package/lib/builders/common/Zone/components/EmptyState/index.tsx +0 -33
  421. package/lib/models/common/widgets/sliceBuilderArray.ts +0 -31
  422. package/lib/models/common/widgets/withGroup.ts +0 -20
  423. package/out/_next/static/DDGXqSbSEqwX8wX_VNauB/_buildManifest.js +0 -1
  424. package/out/_next/static/chunks/18539003-a5a5d48f20a7b261.js +0 -97
  425. package/out/_next/static/chunks/25-792af14760d9df34.js +0 -1
  426. package/out/_next/static/chunks/286-e0950c3083c672e8.js +0 -1
  427. package/out/_next/static/chunks/318-77a29f41c3a027e3.js +0 -1
  428. package/out/_next/static/chunks/46-d22d7a121254e31d.js +0 -8
  429. package/out/_next/static/chunks/727-7536690b0938f88f.js +0 -1
  430. package/out/_next/static/chunks/799-7b910b896ff60ebe.js +0 -1
  431. package/out/_next/static/chunks/904-cac58924044acc83.js +0 -1
  432. package/out/_next/static/chunks/pages/_app-07e1633e9adb1796.js +0 -436
  433. package/out/_next/static/chunks/pages/changelog-4cee9fbfd4fdfc70.js +0 -1
  434. package/out/_next/static/chunks/pages/changes-b1d7cb1c845848ee.js +0 -1
  435. package/out/_next/static/chunks/pages/custom-types/[customTypeId]-d1a4a07e6b600fa6.js +0 -1
  436. package/out/_next/static/chunks/pages/labs-566a982a3e954547.js +0 -1
  437. package/out/_next/static/chunks/pages/page-types/[pageTypeId]-a724ff12ef322020.js +0 -1
  438. package/out/_next/static/chunks/pages/settings-6c2777758905c784.js +0 -1
  439. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-01d67e97cb901e46.js +0 -1
  440. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-a32fd588b27e92d7.js +0 -1
  441. package/out/_next/static/chunks/pages/slices-a633527fee62b6cd.js +0 -1
  442. package/out/_next/static/css/72465cc1225f28a2.css +0 -1
  443. package/out/_next/static/css/82840c077aa9a9d5.css +0 -1
  444. package/out/_next/static/css/838fd8bb5a7c32b0.css +0 -1
  445. package/out/_next/static/css/b22c0750c14cc089.css +0 -1
  446. package/out/_next/static/css/be1f49e49a5aa7eb.css +0 -1
  447. package/out/_next/static/css/f8eb526e10bc2441.css +0 -1
  448. package/pages/custom-types/[customTypeId].tsx +0 -1
  449. package/pages/labs.tsx +0 -1
  450. package/pages/page-types/[pageTypeId].tsx +0 -1
  451. package/pages/settings.tsx +0 -1
  452. package/src/components/BaseHoverCard/BaseHoverCard.css.ts +0 -25
  453. package/src/components/BlankSlate/BlankSlate.css.ts +0 -96
  454. package/src/components/Card/Card.css.ts +0 -188
  455. package/src/components/CodeBlock/CodeBlock.css.ts +0 -37
  456. package/src/components/ContentTabs/ContentTabs.css.ts +0 -49
  457. package/src/components/Divider/Divider.css.ts +0 -31
  458. package/src/components/HoverCard/HoverCard.css.ts +0 -105
  459. package/src/components/TextLink/TextLink.css.ts +0 -65
  460. package/src/features/customTypes/customTypesBuilder/PageSnippetDialog/PageSnippetDialog.css.ts +0 -12
  461. package/src/features/documentation/MarkdownRenderer/MarkdownRenderer.css.ts +0 -13
  462. package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.css.ts +0 -15
  463. package/src/features/slices/sliceBuilder/useGroupsInSlicesExperiment.ts +0 -8
  464. package/out/_next/static/{DDGXqSbSEqwX8wX_VNauB → QWi-WrYk9EtyMIs1RfQ3_}/_ssgManifest.js +0 -0
  465. package/{components → src/legacy/components}/Card/CardBox.tsx +0 -0
  466. package/{components → src/legacy/components}/Card/WithTabs/components.jsx +1 -1
  467. package/{components → src/legacy/components}/Changelog/versionDetails/ReleaseNotesDetails.tsx +1 -1
  468. package/{components → src/legacy/components}/ChangesEmptyState/OfflinePage.tsx +1 -1
  469. package/{components → src/legacy/components}/ChangesEmptyState/index.ts +1 -1
  470. package/{components → src/legacy/components}/ChangesItems/ErrorBanner.tsx +1 -1
  471. package/{components → src/legacy/components}/ChangesItems/index.ts +0 -0
  472. package/{components → src/legacy/components}/ChangesSectionHeader/ChangesSectionHeader.tsx +0 -0
  473. package/{components → src/legacy/components}/ChangesSectionHeader/index.ts +0 -0
  474. package/{components → src/legacy/components}/DeleteDocumentsDrawer/index.tsx +1 -1
  475. package/{components → src/legacy/components}/DropDownSelector/MenuList.tsx +0 -0
  476. package/{components → src/legacy/components}/Flex/index.tsx +0 -0
  477. package/{components → src/legacy/components}/FormFields/index.ts +0 -0
  478. package/{components → src/legacy/components}/Forms/CreateCustomTypeModal/index.tsx +0 -0
  479. package/{components → src/legacy/components}/Forms/CreateSliceModal/index.tsx +0 -0
  480. package/{components → src/legacy/components}/Forms/RenameCustomTypeModal/index.ts +0 -0
  481. package/{components → src/legacy/components}/Forms/RenameSliceModal/index.ts +0 -0
  482. package/{components → src/legacy/components}/Forms/RenameVariationModal/index.ts +0 -0
  483. package/{components → src/legacy/components}/Forms/components/FlexCard.tsx +0 -0
  484. package/{components → src/legacy/components}/Forms/formsTypes.ts +0 -0
  485. package/{components → src/legacy/components}/Grid/index.tsx +0 -0
  486. package/{components → src/legacy/components}/InputDeleteIcon/index.jsx +1 -1
  487. package/{components → src/legacy/components}/ItemHeader/index.tsx +1 -1
  488. package/{components → src/legacy/components}/Li/index.tsx +0 -0
  489. package/{components → src/legacy/components}/ListItem/utils.js +0 -0
  490. package/{components → src/legacy/components}/MissingLibraries/index.tsx +0 -0
  491. package/{components → src/legacy/components}/Navigation/VideoItem.module.css +0 -0
  492. package/{components → src/legacy/components}/ReactTooltipPortal/index.tsx +0 -0
  493. package/{components → src/legacy/components}/ReviewModal/ReviewFormSelect.tsx +1 -1
  494. package/{components → src/legacy/components}/ReviewModal/index.ts +0 -0
  495. package/{components → src/legacy/components}/ScreenshotPreview/index.tsx +1 -1
  496. package/{components → src/legacy/components}/Simulator/components/FullPage/index.tsx +0 -0
  497. package/{components → src/legacy/components}/Simulator/components/Header/links.ts +0 -0
  498. package/{components → src/legacy/components}/SliceMachineIconButton/index.tsx +1 -1
  499. package/{components → src/legacy/components}/SliceMachineModal/index.tsx +1 -1
  500. package/{components → src/legacy/components}/WindowPortal/index.js +0 -0
  501. package/{components → src/legacy/components}/YoutubeEmbed/index.tsx +0 -0
  502. package/{lib → src/legacy/lib}/builders/common/SelectFieldTypeModal/FieldTypeCard.jsx +0 -0
  503. package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/EditItem.jsx +0 -0
  504. package/{lib → src/legacy/lib}/consts.ts +0 -0
  505. package/{lib → src/legacy/lib}/env/sentry.ts +0 -0
  506. package/{lib → src/legacy/lib}/forms/defaults.ts +1 -1
  507. package/{lib → src/legacy/lib}/forms/types.ts +0 -0
  508. package/{lib → src/legacy/lib}/hljs/svelte.ts +0 -0
  509. package/{lib → src/legacy/lib}/models/common/Auth.ts +0 -0
  510. package/{lib → src/legacy/lib}/models/common/ComponentUI.ts +1 -1
  511. package/{lib → src/legacy/lib}/models/common/CustomType/tab.ts +4 -4
  512. package/{lib → src/legacy/lib}/models/common/ErrorWithStatus.ts +0 -0
  513. package/{lib → src/legacy/lib}/models/common/Fields.ts +1 -1
  514. package/{lib → src/legacy/lib}/models/common/Manifest.ts +0 -0
  515. package/{lib → src/legacy/lib}/models/common/PrismicData.ts +0 -0
  516. package/{lib → src/legacy/lib}/models/common/PrismicFile.ts +0 -0
  517. package/{lib → src/legacy/lib}/models/common/Screenshots.ts +0 -0
  518. package/{lib → src/legacy/lib}/models/common/Simulator.ts +0 -0
  519. package/{lib → src/legacy/lib}/models/common/Slices.ts +2 -2
  520. package/{lib → src/legacy/lib}/models/common/UserProfile.ts +0 -0
  521. package/{lib → src/legacy/lib}/models/common/Warning.ts +0 -0
  522. package/{lib → src/legacy/lib}/models/common/widgets/Date/index.ts +2 -2
  523. package/{lib → src/legacy/lib}/models/common/widgets/Embed/index.ts +2 -2
  524. package/{lib → src/legacy/lib}/models/common/widgets/Link/index.ts +3 -3
  525. package/{lib → src/legacy/lib}/models/common/widgets/Number/index.ts +2 -2
  526. package/{lib → src/legacy/lib}/models/common/widgets/Text/index.ts +5 -5
  527. package/{lib → src/legacy/lib}/models/common/widgets/ctBuilderArray.ts +0 -0
  528. package/{lib → src/legacy/lib}/models/common/widgets/index.ts +1 -1
  529. /package/{lib → src/legacy/lib}/prismic/endpoints.ts +0 -0
  530. /package/{lib → src/legacy/lib}/utils/poll.ts +0 -0
  531. /package/{lib → src/legacy/lib}/utils/preferWroomBase.ts +0 -0
  532. /package/{lib → src/legacy/lib}/utils/repo.ts +0 -0
  533. /package/{lib → src/legacy/lib}/utils/str.ts +0 -0
  534. /package/{pages → src/pages}/api/embed.js +0 -0
@@ -0,0 +1,202 @@
1
+ .flex {
2
+ all: unset;
3
+ display: flex;
4
+ }
5
+
6
+ .grid {
7
+ all: unset;
8
+ display: grid;
9
+ }
10
+
11
+ .column {
12
+ composes: flex;
13
+ flex-direction: column;
14
+ }
15
+
16
+ .root {
17
+ composes: column;
18
+ position: relative;
19
+ box-sizing: border-box;
20
+ border-color: var(--grey6);
21
+ border-radius: 6px;
22
+ border-style: solid;
23
+ border-width: 1px;
24
+ overflow-x: hidden;
25
+ }
26
+
27
+ .size-small {
28
+ height: 240px;
29
+ }
30
+
31
+ .size-medium {
32
+ height: 320px;
33
+ }
34
+
35
+ .solid {
36
+ background-color: var(--grey3);
37
+
38
+ &[data-state="checked"] {
39
+ border-color: var(--purple10);
40
+ }
41
+ }
42
+
43
+ .outlined {
44
+ background-color: var(--grey2);
45
+
46
+ &[data-state="checked"] {
47
+ border-color: var(--purple8);
48
+ }
49
+ }
50
+
51
+ .interactive {
52
+ &:focus-visible {
53
+ box-shadow: var(--box-shadow-purple-focus);
54
+ }
55
+
56
+ &[data-disabled] {
57
+ opacity: 0.5;
58
+ }
59
+
60
+ &:not([data-disabled]) {
61
+ cursor: pointer;
62
+ }
63
+
64
+ &.solid {
65
+ &:focus-visible {
66
+ background-color: var(--grey5);
67
+ border-color: var(--purple10);
68
+ }
69
+ }
70
+
71
+ &.outlined {
72
+ &:active {
73
+ background-color: var(--grey4);
74
+ border-color: var(--purple9);
75
+ }
76
+
77
+ &:focus-visible {
78
+ background-color: var(--grey1);
79
+ border-color: var(--purple8);
80
+ }
81
+
82
+ &:hover {
83
+ background-color: var(--grey4);
84
+ }
85
+ }
86
+ }
87
+
88
+ .media {
89
+ composes: column;
90
+ flex-basis: 0;
91
+ flex-grow: 1;
92
+ min-height: 0;
93
+ position: relative;
94
+ order: 0;
95
+ }
96
+ .solid > .media {
97
+ padding: 32px;
98
+ }
99
+ .outlined > .media {
100
+ background-color: var(--light-grey3);
101
+ margin-inline: 16px;
102
+ margin-top: 16px;
103
+ padding: 16px;
104
+ }
105
+
106
+ .mediaComponent-div {
107
+ composes: grid;
108
+ flex-grow: 1;
109
+ }
110
+
111
+ .mediaComponent-img {
112
+ height: 100%;
113
+ object-fit: contain;
114
+
115
+ &:not([src]) {
116
+ visibility: hidden;
117
+ }
118
+ }
119
+
120
+ .mediaOverlay {
121
+ composes: grid;
122
+ inset: 0;
123
+ position: absolute;
124
+ visibility: hidden;
125
+
126
+ &::before {
127
+ background-color: var(--light-grey12);
128
+ content: "";
129
+ inset: 0;
130
+ opacity: 0.1;
131
+ position: absolute;
132
+ }
133
+ }
134
+ .interactive:focus-visible .mediaOverlay,
135
+ .interactive:not([data-disabled]) .mediaOverlay:has(:focus-visible),
136
+ .interactive:not([data-disabled]) .media:hover > .mediaOverlay {
137
+ visibility: visible;
138
+ }
139
+
140
+ .nonMedia {
141
+ composes: flex;
142
+ align-items: center;
143
+ box-sizing: border-box;
144
+ flex-direction: row;
145
+ }
146
+ .solid > .nonMedia {
147
+ background-color: var(--light-grey1);
148
+
149
+ &:not(:first-child) {
150
+ border-top-color: var(--light-grey6);
151
+ border-top-style: solid;
152
+ border-top-width: inherit;
153
+ }
154
+ }
155
+
156
+ .actions {
157
+ composes: nonMedia;
158
+ height: 48px;
159
+ justify-content: space-between;
160
+ order: 1;
161
+ }
162
+ .solid > .actions {
163
+ padding-left: 12px;
164
+ padding-right: 8px;
165
+ }
166
+ .outlined > .actions {
167
+ padding-inline: 16px;
168
+ }
169
+
170
+ .footer {
171
+ composes: nonMedia;
172
+ gap: 8px;
173
+ height: 60px;
174
+ order: 2;
175
+ }
176
+ .solid > .footer {
177
+ padding-inline: 12px;
178
+ }
179
+ .outlined > .footer {
180
+ padding-inline: 16px;
181
+ }
182
+
183
+ .footerTexts {
184
+ composes: column;
185
+ flex-basis: 0;
186
+ flex-grow: 1;
187
+ min-width: 0px;
188
+ /* Offset `title` and `subtitle` so that they are centered vertically despite
189
+ having different line heights. */
190
+ margin-bottom: 4px;
191
+ }
192
+
193
+ .status {
194
+ composes: column;
195
+ height: 24px;
196
+ inset-inline: 0;
197
+ justify-content: center;
198
+ padding-inline: 8px;
199
+ position: absolute;
200
+ background-color: var(--purple4);
201
+ color: var(--purple11);
202
+ }
@@ -0,0 +1,22 @@
1
+ declare const styles: {
2
+ readonly "actions": string;
3
+ readonly "column": string;
4
+ readonly "flex": string;
5
+ readonly "footer": string;
6
+ readonly "footerTexts": string;
7
+ readonly "grid": string;
8
+ readonly "interactive": string;
9
+ readonly "media": string;
10
+ readonly "mediaComponent-div": string;
11
+ readonly "mediaComponent-img": string;
12
+ readonly "mediaOverlay": string;
13
+ readonly "nonMedia": string;
14
+ readonly "outlined": string;
15
+ readonly "root": string;
16
+ readonly "size-medium": string;
17
+ readonly "size-small": string;
18
+ readonly "solid": string;
19
+ readonly "status": string;
20
+ };
21
+ export = styles;
22
+
@@ -9,9 +9,9 @@ import {
9
9
  } from "@prismicio/editor-ui";
10
10
  import type { Meta, StoryObj } from "@storybook/react";
11
11
 
12
- import { AddPhotoAlternateIcon } from "@src/icons/AddPhotoAlternateIcon";
13
- import { ArrowDropDownIcon } from "@src/icons/ArrowDropDownIcon";
14
- import { SyncAltIcon } from "@src/icons/SyncAltIcon";
12
+ import { AddPhotoAlternateIcon } from "@/icons/AddPhotoAlternateIcon";
13
+ import { ArrowDropDownIcon } from "@/icons/ArrowDropDownIcon";
14
+ import { SyncAltIcon } from "@/icons/SyncAltIcon";
15
15
 
16
16
  import { Card, CardActions, CardFooter, CardMedia, CardStatus } from "./Card";
17
17
 
@@ -1,8 +1,10 @@
1
+ import type { UrlObject } from "node:url";
2
+
1
3
  import { findFocusableAncestor } from "@prismicio/editor-support/DOM";
2
4
  import { Text } from "@prismicio/editor-ui";
3
5
  import { clsx } from "clsx";
4
- import type { UrlObject } from "node:url";
5
6
  import {
7
+ createElement,
6
8
  type CSSProperties,
7
9
  type FC,
8
10
  type HTMLAttributes,
@@ -10,17 +12,16 @@ import {
10
12
  type MouseEvent,
11
13
  type PropsWithChildren,
12
14
  type ReactNode,
13
- createElement,
14
15
  } from "react";
15
16
 
16
- import * as styles from "./Card.css";
17
+ import styles from "./Card.module.css";
17
18
 
18
19
  type CardProps = PropsWithChildren<
19
20
  {
20
21
  checked?: boolean;
21
- size?: keyof typeof styles.size;
22
+ size?: "small" | "medium";
22
23
  style?: CSSProperties;
23
- variant?: keyof typeof styles.variant;
24
+ variant?: "solid" | "outlined";
24
25
  } & (
25
26
  | // Props for rendering a non-interactive `div` element.
26
27
  NarrowedCardProps<{ interactive?: false }>
@@ -76,9 +77,8 @@ export const Card: FC<CardProps> = (props) => {
76
77
  } = props;
77
78
  const elementProps = {
78
79
  ...otherProps,
79
- className: clsx(styles.root, styles.size[size], styles.variant[variant], {
80
+ className: clsx(styles.root, styles[`size-${size}`], styles[variant], {
80
81
  [styles.interactive]: props.interactive,
81
- [styles.interactiveVariant[variant]]: props.interactive,
82
82
  }),
83
83
  "data-state": checked === true ? "checked" : undefined,
84
84
  };
@@ -129,7 +129,7 @@ export const CardMedia: FC<CardMediaProps> = ({
129
129
  <div className={styles.media}>
130
130
  {createElement(component, {
131
131
  ...otherProps,
132
- className: clsx(styles.mediaComponent[component], className),
132
+ className: clsx(styles[`mediaComponent-${component}`], className),
133
133
  })}
134
134
  {Boolean(overlay) ? (
135
135
  <div className={styles.mediaOverlay}>{overlay}</div>
@@ -0,0 +1,46 @@
1
+ .block {
2
+ all: unset;
3
+ box-sizing: border-box;
4
+ font-family: var(--font-family-body);
5
+ }
6
+
7
+ .blockWithDisplayRevert {
8
+ composes: block;
9
+ display: revert;
10
+ }
11
+
12
+ .root {
13
+ composes: blockWithDisplayRevert;
14
+ border-width: 1px;
15
+ border-radius: 6px;
16
+ border-style: solid;
17
+ border-color: var(--grey6);
18
+ }
19
+
20
+ .header {
21
+ composes: block;
22
+ display: flex;
23
+ align-items: center;
24
+ justify-content: space-between;
25
+ border-top-right-radius: 4px;
26
+ border-top-left-radius: 4px;
27
+ border-bottom-style: solid;
28
+ border-bottom-width: 1px;
29
+ background-color: var(--grey2);
30
+ border-bottom-color: var(--grey6);
31
+ padding-block: 4px;
32
+ padding-right: 4px;
33
+ }
34
+
35
+ .fileInfo {
36
+ composes: block;
37
+ display: flex;
38
+ justify-content: space-between;
39
+ align-items: center;
40
+ }
41
+
42
+ .fileName {
43
+ composes: blockWithDisplayRevert;
44
+ font-size: calc(14rem / 16);
45
+ line-height: calc(32rem / 16);
46
+ }
@@ -0,0 +1,10 @@
1
+ declare const styles: {
2
+ readonly "block": string;
3
+ readonly "blockWithDisplayRevert": string;
4
+ readonly "fileInfo": string;
5
+ readonly "fileName": string;
6
+ readonly "header": string;
7
+ readonly "root": string;
8
+ };
9
+ export = styles;
10
+
@@ -1,17 +1,17 @@
1
1
  import { IconButton, Text } from "@prismicio/editor-ui";
2
2
  import { type ReactNode, useEffect, useState } from "react";
3
3
  import { PrismLight as SyntaxHighlighter } from "react-syntax-highlighter";
4
- import tsx from "react-syntax-highlighter/dist/cjs/languages/prism/tsx";
5
4
  import markup from "react-syntax-highlighter/dist/cjs/languages/prism/markup";
5
+ import tsx from "react-syntax-highlighter/dist/cjs/languages/prism/tsx";
6
6
  import { prism } from "react-syntax-highlighter/dist/cjs/styles/prism";
7
7
 
8
- import { CodeIcon } from "@src/icons/CodeIcon";
9
- import { JavaScript } from "@src/icons/JavaScript";
10
- import { TypeScript } from "@src/icons/TypeScript";
11
- import { Vue } from "@src/icons/Vue";
12
- import { Svelte } from "@src/icons/Svelte";
8
+ import { CodeIcon } from "@/icons/CodeIcon";
9
+ import { JavaScript } from "@/icons/JavaScript";
10
+ import { Svelte } from "@/icons/Svelte";
11
+ import { TypeScript } from "@/icons/TypeScript";
12
+ import { Vue } from "@/icons/Vue";
13
13
 
14
- import * as styles from "./CodeBlock.css";
14
+ import styles from "./CodeBlock.module.css";
15
15
 
16
16
  SyntaxHighlighter.registerLanguage("tsx", tsx);
17
17
  SyntaxHighlighter.registerLanguage("markup", markup);
@@ -0,0 +1,60 @@
1
+ .flex {
2
+ all: unset;
3
+ display: flex;
4
+ }
5
+
6
+ .column {
7
+ composes: flex;
8
+ flex-direction: column;
9
+ }
10
+
11
+ .root {
12
+ composes: column;
13
+ background-color: var(--grey1);
14
+ min-height: 0;
15
+ }
16
+
17
+ .list {
18
+ composes: flex;
19
+ border-bottom: 1px solid var(--grey5);
20
+ padding-inline: 16px;
21
+ }
22
+
23
+ .trigger {
24
+ composes: column;
25
+ color: var(--grey11);
26
+ cursor: pointer;
27
+ padding-block: 8px;
28
+
29
+ &:not(:last-child) {
30
+ margin-right: 16px;
31
+ }
32
+
33
+ &[data-state="active"] {
34
+ /* stylelint-disable declaration-property-value-allowed-list -- very specific box shadow for this component */
35
+ box-shadow:
36
+ inset 0 -1px 0 0 currentColor,
37
+ 0 1px 0 0 currentColor;
38
+ /* stylelint-end declaration-property-value-allowed-list */
39
+ color: var(--purple9);
40
+ }
41
+ }
42
+
43
+ .triggerText {
44
+ line-height: 32px;
45
+ }
46
+
47
+ .content {
48
+ composes: column;
49
+ min-height: 0;
50
+ outline: none;
51
+ flex: 1;
52
+
53
+ &[data-state="inactive"] {
54
+ display: none;
55
+ }
56
+ }
57
+
58
+ .scrollArea {
59
+ padding: 16px;
60
+ }
@@ -0,0 +1,12 @@
1
+ declare const styles: {
2
+ readonly "column": string;
3
+ readonly "content": string;
4
+ readonly "flex": string;
5
+ readonly "list": string;
6
+ readonly "root": string;
7
+ readonly "scrollArea": string;
8
+ readonly "trigger": string;
9
+ readonly "triggerText": string;
10
+ };
11
+ export = styles;
12
+
@@ -1,8 +1,8 @@
1
+ import { ScrollArea, Text } from "@prismicio/editor-ui";
1
2
  import * as Tabs from "@radix-ui/react-tabs";
2
3
  import type { CSSProperties, FC, ReactNode } from "react";
3
- import { ScrollArea, Text } from "@prismicio/editor-ui";
4
4
 
5
- import * as styles from "./ContentTabs.css";
5
+ import styles from "./ContentTabs.module.css";
6
6
 
7
7
  type ContentTabsProps = {
8
8
  style?: CSSProperties;
@@ -1,6 +1,6 @@
1
1
  import { FC, PropsWithChildren } from "react";
2
2
 
3
- import { FlowerBackgroundIcon } from "@src/icons/FlowerBackgroundIcon";
3
+ import { FlowerBackgroundIcon } from "@/icons/FlowerBackgroundIcon";
4
4
 
5
5
  import styles from "./Count.module.css";
6
6
 
@@ -0,0 +1,23 @@
1
+ .base {
2
+ width: 100%;
3
+ border-style: none;
4
+ margin: 0px;
5
+ }
6
+
7
+ .variant-dashed {
8
+ composes: base;
9
+ border-color: currentColor;
10
+ border-top-style: dashed;
11
+ border-width: 1px;
12
+ }
13
+
14
+ .variant-edgeFaded {
15
+ composes: base;
16
+ height: 1px;
17
+ background-image: linear-gradient(
18
+ to right,
19
+ color-mix(in srgb, currentColor, transparent 100%),
20
+ currentColor,
21
+ color-mix(in srgb, currentColor, transparent 100%)
22
+ );
23
+ }
@@ -0,0 +1,7 @@
1
+ declare const styles: {
2
+ readonly "base": string;
3
+ readonly "variant-dashed": string;
4
+ readonly "variant-edgeFaded": string;
5
+ };
6
+ export = styles;
7
+
@@ -1,8 +1,7 @@
1
+ import { theme } from "@prismicio/editor-ui";
1
2
  import type { Meta, StoryObj } from "@storybook/react";
2
- import { colors } from "@prismicio/editor-ui";
3
3
 
4
4
  import { Divider } from "./Divider";
5
- import { variants } from "./Divider.css";
6
5
 
7
6
  type Story = StoryObj<typeof meta>;
8
7
 
@@ -11,11 +10,11 @@ const meta = {
11
10
  argTypes: {
12
11
  variant: {
13
12
  control: { type: "select" },
14
- options: Object.keys(variants),
13
+ options: ["dashed", "edgeFaded"],
15
14
  },
16
15
  color: {
17
16
  control: { type: "select" },
18
- options: Object.keys(colors),
17
+ options: Object.keys(theme.color),
19
18
  },
20
19
  },
21
20
  } satisfies Meta<typeof Divider>;
@@ -1,11 +1,11 @@
1
- import { colors, sprinkles } from "@prismicio/editor-ui";
1
+ import { theme } from "@prismicio/editor-ui";
2
2
  import { clsx } from "clsx";
3
3
  import type { FC } from "react";
4
4
 
5
- import * as styles from "./Divider.css";
5
+ import styles from "./Divider.module.css";
6
6
 
7
7
  type DividerProps = {
8
- color?: keyof typeof colors;
8
+ color?: keyof typeof theme.color;
9
9
  variant?: "dashed" | "edgeFaded";
10
10
  className?: string;
11
11
  };
@@ -15,11 +15,8 @@ export const Divider: FC<DividerProps> = (props) => {
15
15
 
16
16
  return (
17
17
  <hr
18
- className={clsx(
19
- styles.variants[variant],
20
- sprinkles({ color: colors[color] }),
21
- className,
22
- )}
18
+ className={clsx(styles[`variant-${variant}`], className)}
19
+ style={{ color: theme.color[color] }}
23
20
  />
24
21
  );
25
22
  };
@@ -0,0 +1,79 @@
1
+ .block {
2
+ all: unset;
3
+ box-sizing: border-box;
4
+ font-family: var(--font-family-body);
5
+ }
6
+
7
+ .blockWithDisplayRevert {
8
+ composes: block;
9
+ display: revert;
10
+ }
11
+
12
+ .root {
13
+ composes: blockWithDisplayRevert;
14
+ width: 288px;
15
+ }
16
+
17
+ .title {
18
+ composes: block;
19
+ align-items: center;
20
+ border-bottom-style: solid;
21
+ border-color: var(--grey6);
22
+ border-width: 1px;
23
+ color: var(--grey12);
24
+ display: flex;
25
+ justify-content: space-between;
26
+ margin-bottom: 16px;
27
+ padding-bottom: 4px;
28
+ padding-left: 16px;
29
+ padding-right: 6px;
30
+ padding-top: 4px;
31
+ font-size: 12px;
32
+ font-weight: 500;
33
+ line-height: 16px;
34
+ }
35
+
36
+ .titleCloseIcon {
37
+ composes: block;
38
+ color: var(--grey11);
39
+ display: flex;
40
+ padding: 4px;
41
+
42
+ &:hover {
43
+ cursor: pointer;
44
+ }
45
+ }
46
+
47
+ .mediaContainer {
48
+ composes: block;
49
+ display: flex;
50
+ margin-bottom: 8px;
51
+ padding-inline: 16px;
52
+ }
53
+
54
+ .media {
55
+ composes: blockWithDisplayRevert;
56
+ border-color: var(--grey6);
57
+ border-radius: 6px;
58
+ border-style: solid;
59
+ border-width: 1px;
60
+ overflow: hidden;
61
+ width: 100%;
62
+ height: 146px;
63
+ }
64
+
65
+ .description {
66
+ composes: blockWithDisplayRevert;
67
+ color: var(--grey11);
68
+ margin-bottom: 16px;
69
+ padding-inline: 16px;
70
+ font-size: 12px;
71
+ font-weight: 400;
72
+ line-height: 20px;
73
+ }
74
+
75
+ .closeButtonContainer {
76
+ composes: blockWithDisplayRevert;
77
+ padding-bottom: 16px;
78
+ padding-inline: 16px;
79
+ }
@@ -0,0 +1,13 @@
1
+ declare const styles: {
2
+ readonly "block": string;
3
+ readonly "blockWithDisplayRevert": string;
4
+ readonly "closeButtonContainer": string;
5
+ readonly "description": string;
6
+ readonly "media": string;
7
+ readonly "mediaContainer": string;
8
+ readonly "root": string;
9
+ readonly "title": string;
10
+ readonly "titleCloseIcon": string;
11
+ };
12
+ export = styles;
13
+
@@ -1,12 +1,13 @@
1
+ import { Button } from "@prismicio/editor-ui";
1
2
  import type { Meta, StoryObj } from "@storybook/react";
3
+
2
4
  import {
3
5
  HoverCard,
4
- HoverCardDescription,
5
6
  HoverCardCloseButton,
7
+ HoverCardDescription,
6
8
  HoverCardMedia,
7
9
  HoverCardTitle,
8
10
  } from "./HoverCard";
9
- import { Button } from "@prismicio/editor-ui";
10
11
 
11
12
  const meta = {
12
13
  component: HoverCard,
@@ -1,8 +1,8 @@
1
1
  // @vitest-environment jsdom
2
2
  import React from "react";
3
- import { describe, test, expect, vi } from "vitest";
3
+ import { describe, expect, test, vi } from "vitest";
4
4
 
5
- import { screen, render, waitFor } from "../../../test/__testutils__";
5
+ import { render, screen, waitFor } from "../../../test/__testutils__";
6
6
  import { HoverCard, HoverCardCloseButton } from ".";
7
7
 
8
8
  vi.mock("next/router", () => import("next-router-mock"));
@@ -13,11 +13,11 @@ import {
13
13
  type VideoHTMLAttributes,
14
14
  } from "react";
15
15
 
16
- import { useDelayedAction } from "@src/hooks/useDelayedAction";
17
- import { CloseIcon } from "@src/icons/CloseIcon";
16
+ import { useDelayedAction } from "@/hooks/useDelayedAction";
17
+ import { CloseIcon } from "@/icons/CloseIcon";
18
18
 
19
19
  import { BaseHoverCard, type BaseHoverCardProps } from "../BaseHoverCard";
20
- import * as styles from "./HoverCard.css";
20
+ import styles from "./HoverCard.module.css";
21
21
 
22
22
  type HoverCardProps = PropsWithChildren<{
23
23
  align?: BaseHoverCardProps["align"];