slice-machine-ui 2.17.3-beta.8 → 2.18.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 (91) hide show
  1. package/out/404.html +1 -1
  2. package/out/_next/static/by9lqJyIeSCZtBP_fLO45/_buildManifest.js +1 -0
  3. package/out/_next/static/chunks/04ad993f.d7f986af0f739cc9.js +28 -0
  4. package/out/_next/static/chunks/{248-6f20227ad4764216.js → 248-bdbfde18c5a04eae.js} +1 -1
  5. package/out/_next/static/chunks/{34-6c3125e6f01c62c7.js → 34-8d9d9b2944824750.js} +1 -1
  6. package/out/_next/static/chunks/489-6edb99e269996dd1.js +1 -0
  7. package/out/_next/static/chunks/50-586dc7ab5e584e76.js +1 -0
  8. package/out/_next/static/chunks/630-bb6e3db525588f16.js +1 -0
  9. package/out/_next/static/chunks/{647-7b9b5aa9468f9e4b.js → 647-4379a741c8d85d9e.js} +1 -1
  10. package/out/_next/static/chunks/907-445266211c48b1a5.js +1 -0
  11. package/out/_next/static/chunks/pages/{_app-87bfdef015dea569.js → _app-76c43bdc0320687e.js} +220 -222
  12. package/out/_next/static/chunks/pages/{changelog-98836c22c6a40c5d.js → changelog-21b960abba5abf71.js} +1 -1
  13. package/out/_next/static/chunks/pages/changes-bdfa50eadb1e5a42.js +1 -0
  14. package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-4024560ca59ad2be.js → [customTypeId]-7102c23f96cd1768.js} +1 -1
  15. package/out/_next/static/chunks/pages/{labs-ad7f36c6f544c1a8.js → labs-d79597003a1ff74e.js} +1 -1
  16. package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-0d2416da0958eb40.js → [pageTypeId]-d4bc920a5efffa0a.js} +1 -1
  17. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-b127d948a17968d3.js +1 -0
  18. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-98f85d5fb8d5c704.js +1 -0
  19. package/out/_next/static/chunks/pages/slices-046e5e978ffc3a42.js +1 -0
  20. package/out/_next/static/chunks/webpack-e0c07a2fe4908d81.js +1 -0
  21. package/out/_next/static/css/303dad78be1eb854.css +1 -0
  22. package/out/changelog.html +1 -1
  23. package/out/changes.html +1 -1
  24. package/out/custom-types/[customTypeId].html +1 -1
  25. package/out/custom-types.html +1 -1
  26. package/out/index.html +1 -1
  27. package/out/labs.html +1 -1
  28. package/out/page-types/[pageTypeId].html +1 -1
  29. package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
  30. package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
  31. package/out/slices.html +1 -1
  32. package/package.json +7 -8
  33. package/src/apiClient.ts +1 -1
  34. package/src/domain/fields.ts +7 -7
  35. package/src/features/auth/LogoutButton.tsx +37 -0
  36. package/src/features/builder/AddFieldDropdown.tsx +2 -2
  37. package/src/features/customTypes/customTypesBuilder/CreateSliceFromImageModal/CreateSliceFromImageModal.tsx +8 -21
  38. package/src/features/customTypes/customTypesBuilder/SliceZoneBlankSlate.tsx +4 -12
  39. package/src/features/customTypes/customTypesBuilder/sliceCreationOptions.tsx +5 -11
  40. package/src/features/environments/actions/getActiveEnvironment.ts +2 -8
  41. package/src/features/environments/useActiveEnvironment.ts +8 -1
  42. package/src/features/environments/useEnvironments.ts +8 -1
  43. package/src/features/navigation/Navigation.tsx +1 -7
  44. package/src/legacy/components/ChangesItems/ChangesItems.tsx +1 -8
  45. package/src/legacy/components/Forms/CreateSliceModal/CreateSliceModal.tsx +3 -8
  46. package/src/legacy/components/ListItem/Header.tsx +18 -12
  47. package/src/legacy/components/ListItem/index.tsx +1 -0
  48. package/src/legacy/components/LoginModal/index.tsx +11 -3
  49. package/src/legacy/components/Navigation/SideNavEnvironmentSelector/SideNavEnvironmentSelector.tsx +3 -0
  50. package/src/legacy/components/Simulator/components/FailedConnect/index.tsx +51 -56
  51. package/src/legacy/components/ToasterContainer/index.tsx +3 -14
  52. package/src/legacy/lib/builders/CustomTypeBuilder/SliceZone/SlicesTemplatesModal.tsx +1 -4
  53. package/src/legacy/lib/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModal.tsx +1 -5
  54. package/src/legacy/lib/builders/CustomTypeBuilder/SliceZone/index.tsx +4 -16
  55. package/src/legacy/lib/builders/SliceBuilder/index.tsx +1 -6
  56. package/src/legacy/lib/builders/common/EditModal/index.jsx +3 -10
  57. package/src/legacy/lib/builders/common/Zone/components/ZoneEmptyState/ZoneEmptyState.tsx +5 -10
  58. package/src/legacy/lib/models/common/widgets/Boolean/index.ts +3 -0
  59. package/src/legacy/lib/models/common/widgets/Color/index.ts +3 -0
  60. package/src/legacy/lib/models/common/widgets/ContentRelationship/index.ts +3 -0
  61. package/src/legacy/lib/models/common/widgets/Date/index.ts +3 -0
  62. package/src/legacy/lib/models/common/widgets/Embed/index.ts +3 -0
  63. package/src/legacy/lib/models/common/widgets/GeoPoint/index.ts +3 -0
  64. package/src/legacy/lib/models/common/widgets/Group/createGroupWidget.ts +2 -0
  65. package/src/legacy/lib/models/common/widgets/Image/index.ts +3 -0
  66. package/src/legacy/lib/models/common/widgets/Link/index.ts +3 -0
  67. package/src/legacy/lib/models/common/widgets/LinkToMedia/index.ts +2 -0
  68. package/src/legacy/lib/models/common/widgets/Number/index.ts +3 -0
  69. package/src/legacy/lib/models/common/widgets/Select/index.ts +3 -0
  70. package/src/legacy/lib/models/common/widgets/StructuredText/index.ts +3 -0
  71. package/src/legacy/lib/models/common/widgets/Table/index.ts +3 -0
  72. package/src/legacy/lib/models/common/widgets/Text/index.ts +3 -0
  73. package/src/legacy/lib/models/common/widgets/Timestamp/index.ts +3 -0
  74. package/src/legacy/lib/models/common/widgets/UID/index.ts +3 -0
  75. package/src/legacy/lib/models/common/widgets/Widget.ts +1 -0
  76. package/src/pages/slices.tsx +10 -38
  77. package/out/_next/static/KBrx-cAqXdE6ViRC7yyKz/_buildManifest.js +0 -1
  78. package/out/_next/static/chunks/33641354.3864aefb6106ae71.js +0 -28
  79. package/out/_next/static/chunks/44-a2056f993381ad0f.js +0 -1
  80. package/out/_next/static/chunks/489-6578dbeec3dcdace.js +0 -1
  81. package/out/_next/static/chunks/630-29c729ad2a291ef6.js +0 -1
  82. package/out/_next/static/chunks/907-590c914f55547b96.js +0 -1
  83. package/out/_next/static/chunks/pages/changes-db800bf4a08faa31.js +0 -1
  84. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-5008e29008aa04f4.js +0 -1
  85. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-0bc862dd7bd99611.js +0 -1
  86. package/out/_next/static/chunks/pages/slices-4b229ae47d0a37e2.js +0 -1
  87. package/out/_next/static/chunks/webpack-b3522fdebabf510a.js +0 -1
  88. package/out/_next/static/css/cc9b10286400c2b9.css +0 -1
  89. package/src/features/builder/useSectionsNamingExperiment.ts +0 -15
  90. package/src/utils/textConversion.ts +0 -11
  91. /package/out/_next/static/{KBrx-cAqXdE6ViRC7yyKz → by9lqJyIeSCZtBP_fLO45}/_ssgManifest.js +0 -0
@@ -14,7 +14,6 @@ import { toast } from "react-toastify";
14
14
  import { BaseStyles, Flex, Link, Text } from "theme-ui";
15
15
 
16
16
  import { BreadcrumbItem } from "@/components/Breadcrumb";
17
- import { useSectionsNamingExperiment } from "@/features/builder/useSectionsNamingExperiment";
18
17
  import { CreateSliceFromImageModal } from "@/features/customTypes/customTypesBuilder/CreateSliceFromImageModal";
19
18
  import { getSliceCreationOptions } from "@/features/customTypes/customTypesBuilder/sliceCreationOptions";
20
19
  import { SharedSliceCard } from "@/features/slices/sliceCards/SharedSliceCard";
@@ -43,16 +42,13 @@ import { managerClient } from "@/managerClient";
43
42
  import { getLibraries, getRemoteSlices } from "@/modules/slices";
44
43
  import useSliceMachineActions from "@/modules/useSliceMachineActions";
45
44
  import { SliceMachineStoreType } from "@/redux/type";
46
- import { capitalizeFirstLetter, pluralize } from "@/utils/textConversion";
47
45
 
48
46
  const SlicesIndex: React.FunctionComponent = () => {
49
47
  const router = useRouter();
50
48
  const { modalPayload, onOpenModal } = useScreenshotChangesModal();
51
49
  const { openLoginModal } = useSliceMachineActions();
52
- const sectionsNamingExperiment = useSectionsNamingExperiment();
53
50
  const sliceCreationOptions = getSliceCreationOptions({
54
51
  menuType: "Dropdown",
55
- sectionsNamingExperiment,
56
52
  });
57
53
 
58
54
  const { sliceFilterFn, defaultVariationSelector } = modalPayload;
@@ -111,17 +107,12 @@ const SlicesIndex: React.FunctionComponent = () => {
111
107
  return (
112
108
  <>
113
109
  <Head>
114
- <title>
115
- {pluralize(capitalizeFirstLetter(sectionsNamingExperiment.value))} -
116
- Slice Machine
117
- </title>
110
+ <title>Slices - Slice Machine</title>
118
111
  </Head>
119
112
  <AppLayout>
120
113
  <AppLayoutHeader>
121
114
  <AppLayoutBreadcrumb>
122
- <BreadcrumbItem>
123
- {pluralize(capitalizeFirstLetter(sectionsNamingExperiment.value))}
124
- </BreadcrumbItem>
115
+ <BreadcrumbItem>Slices</BreadcrumbItem>
125
116
  </AppLayoutBreadcrumb>
126
117
  {localLibraries?.length !== 0 && sliceCount !== 0 ? (
127
118
  <DropdownMenu>
@@ -176,9 +167,7 @@ const SlicesIndex: React.FunctionComponent = () => {
176
167
  }}
177
168
  >
178
169
  <EmptyState
179
- title={`What are ${pluralize(
180
- sectionsNamingExperiment.value,
181
- )}?`}
170
+ title="What are slices?"
182
171
  onCreateNew={() => {
183
172
  setIsCreateSliceModalOpen(true);
184
173
  }}
@@ -186,19 +175,10 @@ const SlicesIndex: React.FunctionComponent = () => {
186
175
  videoPublicIdUrl={VIDEO_WHAT_ARE_SLICES}
187
176
  documentationComponent={
188
177
  <>
189
- {pluralize(
190
- capitalizeFirstLetter(
191
- sectionsNamingExperiment.value,
192
- ),
193
- )}{" "}
194
- are sections of your website. Prismic documents
195
- contain a dynamic "
196
- {capitalizeFirstLetter(
197
- sectionsNamingExperiment.value,
198
- )}{" "}
199
- Zone" that allows content creators to add, edit, and
200
- rearrange {pluralize(sectionsNamingExperiment.value)}{" "}
201
- to compose dynamic layouts for any page design.{" "}
178
+ Slices are sections of your website. Prismic documents
179
+ contain a dynamic "Slice Zone" that allows content
180
+ creators to add, edit, and rearrange slices to compose
181
+ dynamic layouts for any page design.{" "}
202
182
  <Link
203
183
  target={"_blank"}
204
184
  href={
@@ -245,11 +225,8 @@ const SlicesIndex: React.FunctionComponent = () => {
245
225
  }}
246
226
  >
247
227
  <Text>
248
- {sectionsNamingExperiment.eligible &&
249
- sortedLibraries.length === 1
250
- ? `Your ${pluralize(
251
- sectionsNamingExperiment.value,
252
- )}`
228
+ {sortedLibraries.length === 1
229
+ ? `Your slices`
253
230
  : name}
254
231
  </Text>
255
232
  </Flex>
@@ -317,7 +294,6 @@ const SlicesIndex: React.FunctionComponent = () => {
317
294
  void router.push(sliceLocation);
318
295
  toast.success(
319
296
  SliceToastMessage({
320
- sectionsNamingExperiment,
321
297
  path: `${libraryName}/${newSlice.name}/model.json`,
322
298
  }),
323
299
  );
@@ -353,11 +329,7 @@ const SlicesIndex: React.FunctionComponent = () => {
353
329
  onSuccess={({ library }) => {
354
330
  toast.success(
355
331
  <ToastMessageWithPath
356
- message={`${capitalizeFirstLetter(
357
- sectionsNamingExperiment.value,
358
- )}(s) added to ${
359
- sectionsNamingExperiment.value
360
- } zone and created at: `}
332
+ message="Slice(s) added to slice zone and created at: "
361
333
  path={library}
362
334
  />,
363
335
  );
@@ -1 +0,0 @@
1
- self.__BUILD_MANIFEST=function(s,c,a,e,t,i,b,n,d,f,u,h,l,k,j,p,g,o,r,m){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[s,e,p,g,"static/chunks/pages/index-0d8cb369de720a35.js"],"/_error":["static/chunks/pages/_error-fedd2c6ebd3d27b9.js"],"/changelog":[c,t,"static/chunks/870-a72b74312773efea.js","static/chunks/pages/changelog-98836c22c6a40c5d.js"],"/changes":[c,i,"static/chunks/8eec4907-b712959d9f984b68.js","static/chunks/918-fa4f2563cb5fd014.js",a,n,"static/css/d98ebc475f8423a3.css","static/chunks/pages/changes-db800bf4a08faa31.js"],"/custom-types":[s,e,p,g,"static/chunks/pages/custom-types-5acd56959b60346f.js"],"/custom-types/[customTypeId]":[c,d,f,u,h,s,t,b,l,o,a,e,k,j,r,m,"static/chunks/pages/custom-types/[customTypeId]-4024560ca59ad2be.js"],"/labs":["static/chunks/pages/labs-ad7f36c6f544c1a8.js"],"/page-types/[pageTypeId]":[c,d,f,u,h,s,t,b,l,o,a,e,k,j,r,m,"static/chunks/pages/page-types/[pageTypeId]-0d2416da0958eb40.js"],"/slices":[c,i,s,b,a,n,j,"static/css/efa5152b7c0f35c0.css","static/chunks/pages/slices-4b229ae47d0a37e2.js"],"/slices/[lib]/[sliceName]/[variation]":[c,i,d,f,u,h,s,t,b,l,a,k,n,"static/css/cdee5b195444f185.css","static/chunks/pages/slices/[lib]/[sliceName]/[variation]-0bc862dd7bd99611.js"],"/slices/[lib]/[sliceName]/[variation]/simulator":[i,"static/chunks/72585f70-28b4d7d5384b3703.js","static/chunks/157-54b8336d20b41933.js","static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-5008e29008aa04f4.js"],sortedPages:["/","/_app","/_error","/changelog","/changes","/custom-types","/custom-types/[customTypeId]","/labs","/page-types/[pageTypeId]","/slices","/slices/[lib]/[sliceName]/[variation]","/slices/[lib]/[sliceName]/[variation]/simulator"]}}("static/chunks/397-e6c340070a3bcb41.js","static/chunks/59b4e022-ef680789f7cc9b11.js","static/chunks/34-6c3125e6f01c62c7.js","static/chunks/647-7b9b5aa9468f9e4b.js","static/chunks/183-4ea255b867ff171b.js","static/chunks/c8eae200-966ce352f7b5d2b9.js","static/chunks/44-a2056f993381ad0f.js","static/chunks/658-8231c0b729e0124a.js","static/chunks/f36c6662-1f3a854183168b10.js","static/chunks/4c744e84-480e426e4b1cfef3.js","static/chunks/065a3ddb-9a38ca0d60f0bf2f.js","static/chunks/1cc2734a-09fb3b997ad1eb70.js","static/chunks/349-7118116b93278f73.js","static/chunks/630-29c729ad2a291ef6.js","static/chunks/907-590c914f55547b96.js","static/chunks/248-6f20227ad4764216.js","static/css/4e475d945cf8a890.css","static/chunks/385-b949173dfa03dd3e.js","static/chunks/489-6578dbeec3dcdace.js","static/css/56f2a6684a524374.css"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();