slice-machine-ui 1.22.2-beta.1 → 1.22.2-beta.10

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 (68) hide show
  1. package/components/AppLayout/index.tsx +8 -4
  2. package/components/Navigation/ChangesListItem.tsx +1 -1
  3. package/components/Navigation/Environment.tsx +8 -7
  4. package/lib/builders/CustomTypeBuilder/SliceZone/index.tsx +1 -1
  5. package/lib/builders/SliceBuilder/Sidebar/index.tsx +1 -1
  6. package/lib/builders/SliceBuilder/SimulatorButton/index.tsx +2 -2
  7. package/lib/builders/common/Zone/components/EmptyState/index.tsx +1 -1
  8. package/lib/builders/common/Zone/index.jsx +1 -1
  9. package/out/404.html +1 -1
  10. package/out/_next/static/bgAW-O9SejtbtaQ7v0wB1/_buildManifest.js +1 -0
  11. package/out/_next/static/chunks/18539003-4460ccbfe3109578.js +97 -0
  12. package/out/_next/static/chunks/482-34cee2a2071c235f.js +1 -0
  13. package/out/_next/static/chunks/{505-fa47e200ac3a012d.js → 505-3f1cf09a086dcba8.js} +1 -1
  14. package/out/_next/static/chunks/550-c80fd46fb64d1eef.js +1 -0
  15. package/out/_next/static/chunks/{840-45aefe7b4d84745c.js → 840-163f8a1040e6820d.js} +1 -1
  16. package/out/_next/static/chunks/904-519dbf0f7e8c6243.js +1 -0
  17. package/out/_next/static/chunks/{958-0a6a103fac00582b.js → 958-8aca174b80cb0c35.js} +1 -1
  18. package/out/_next/static/chunks/pages/_app-36b2c828e330d9c7.js +458 -0
  19. package/out/_next/static/chunks/pages/{changelog-cfda9d30715b6e2a.js → changelog-4d0f2f1222e403fe.js} +1 -1
  20. package/out/_next/static/chunks/pages/{changes-a3cdb6251b224e4b.js → changes-52c9d917808d1461.js} +1 -1
  21. package/out/_next/static/chunks/pages/{labs-dfad3c3553469739.js → labs-526bb7d60a1b90f4.js} +1 -1
  22. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-ef11594ce026b650.js +1 -0
  23. package/out/_next/static/chunks/pages/{slices-dc4f17b54c9a3eb5.js → slices-884a936a9a062a65.js} +1 -1
  24. package/out/_next/static/css/{7ef90ba762e84cee.css → 1bbf650dfd37ce69.css} +1 -1
  25. package/out/changelog.html +1 -1
  26. package/out/changes.html +1 -1
  27. package/out/custom-types/[customTypeId].html +1 -1
  28. package/out/custom-types.html +1 -1
  29. package/out/index.html +1 -1
  30. package/out/labs.html +1 -1
  31. package/out/page-types/[pageTypeId].html +1 -1
  32. package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
  33. package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
  34. package/out/slices.html +1 -1
  35. package/package.json +7 -6
  36. package/src/components/BlankSlate/BlankSlate.css.ts +4 -1
  37. package/src/components/BlankSlate/BlankSlate.tsx +2 -7
  38. package/src/components/Card/Card.stories.tsx +3 -3
  39. package/src/components/HoverCard/HoverCard.css.ts +0 -9
  40. package/src/components/HoverCard/HoverCard.stories.tsx +3 -3
  41. package/src/components/HoverCard/HoverCard.tsx +1 -1
  42. package/src/components/List/List.stories.tsx +2 -2
  43. package/src/components/PageLayout/PageLayout.css.ts +6 -12
  44. package/src/components/PageLayout/PageLayout.tsx +6 -6
  45. package/src/components/SideNav/SideNavEnvironmentSelector.tsx +36 -7
  46. package/src/components/Window/Window.tsx +1 -1
  47. package/src/features/customTypes/EditDropdown.tsx +7 -5
  48. package/src/features/customTypes/customTypesBuilder/PageSnippetDialog/PageSnippetDialog.tsx +2 -2
  49. package/src/features/environments/actions/getActiveEnvironment.ts +34 -0
  50. package/src/features/environments/actions/getEnvironments.ts +5 -2
  51. package/src/features/environments/actions/setEnvironment.ts +2 -2
  52. package/src/features/environments/useActiveEnvironment.ts +2 -33
  53. package/src/features/inAppGuide/InAppGuideDialog.tsx +1 -7
  54. package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewSliceDialog.tsx +1 -1
  55. package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewVariationDialog.tsx +1 -1
  56. package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.tsx +1 -1
  57. package/src/features/slices/convertLegacySlice/ConvertLegacySliceMergeWithIdenticalDialog.tsx +1 -1
  58. package/src/features/slices/sliceBuilder/FloatingBackButton.tsx +1 -1
  59. package/src/features/slices/sliceCards/SharedSliceCard.tsx +2 -2
  60. package/out/_next/static/ALrNHXPZGeRwEXHdmh5-C/_buildManifest.js +0 -1
  61. package/out/_next/static/chunks/18539003-9f66499125869c64.js +0 -97
  62. package/out/_next/static/chunks/482-7e97f91961588a90.js +0 -1
  63. package/out/_next/static/chunks/550-8557ad3750e1e581.js +0 -1
  64. package/out/_next/static/chunks/904-e7c8c1ba265177fb.js +0 -1
  65. package/out/_next/static/chunks/pages/_app-cae1327f33c96711.js +0 -447
  66. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-c228a7c42e87eb27.js +0 -1
  67. package/src/features/environments/actions/getActiveEnvironmentDomain.ts +0 -11
  68. /package/out/_next/static/{ALrNHXPZGeRwEXHdmh5-C → bgAW-O9SejtbtaQ7v0wB1}/_ssgManifest.js +0 -0
@@ -43,12 +43,16 @@ const PageLayoutWithActiveEnvironment: FC<PropsWithChildren> = ({
43
43
  }) => {
44
44
  const { activeEnvironment } = useActiveEnvironment();
45
45
 
46
- const maybeBorderColor = activeEnvironment
46
+ const borderTopColor = activeEnvironment
47
47
  ? environmentTopBorderColorMap[activeEnvironment.kind]
48
- : undefined;
48
+ : "purple";
49
49
 
50
50
  return (
51
- <PageLayout borderTopColor={maybeBorderColor} {...otherProps}>
51
+ <PageLayout
52
+ borderTopColor={borderTopColor}
53
+ data-cy={`app-layout-top-border-color-${borderTopColor}`}
54
+ {...otherProps}
55
+ >
52
56
  {children}
53
57
  </PageLayout>
54
58
  );
@@ -79,7 +83,7 @@ export const AppLayoutBackButton: FC<AppLayoutBackButtonProps> = ({
79
83
  void router.push(url);
80
84
  }}
81
85
  startIcon="arrowBack"
82
- variant="secondary"
86
+ color="grey"
83
87
  />
84
88
  );
85
89
  };
@@ -58,7 +58,7 @@ export const ChangesListItem: FC = () => {
58
58
  When you click Save, your changes are saved locally. Then, you can push
59
59
  your models to Prismic from the Changes page.
60
60
  </HoverCardDescription>
61
- <HoverCardCloseButton>Got It</HoverCardCloseButton>
61
+ <HoverCardCloseButton>Got it</HoverCardCloseButton>
62
62
  </HoverCard>
63
63
  );
64
64
  };
@@ -1,4 +1,8 @@
1
- import { Environment as EnvironmentType } from "@slicemachine/manager/client";
1
+ import {
2
+ Environment as EnvironmentType,
3
+ isUnauthenticatedError,
4
+ isUnauthorizedError,
5
+ } from "@slicemachine/manager/client";
2
6
 
3
7
  import { telemetry } from "@src/apiClient";
4
8
  import { useEnvironments } from "@src/features/environments/useEnvironments";
@@ -43,16 +47,13 @@ export function Environment() {
43
47
  }
44
48
 
45
49
  if (
46
- typeof useEnvironmentsError === "object" &&
47
- useEnvironmentsError !== null &&
48
- "name" in useEnvironmentsError &&
49
- (useEnvironmentsError.name === "UnauthenticatedError" ||
50
- useEnvironmentsError.name === "UnauthorizedError")
50
+ isUnauthenticatedError(useEnvironmentsError) ||
51
+ isUnauthorizedError(useEnvironmentsError)
51
52
  ) {
52
53
  return (
53
54
  <SideNavEnvironmentSelector
54
55
  variant={
55
- useEnvironmentsError.name === "UnauthenticatedError"
56
+ isUnauthenticatedError(useEnvironmentsError)
56
57
  ? "unauthenticated"
57
58
  : "unauthorized"
58
59
  }
@@ -213,7 +213,7 @@ const SliceZone: React.FC<SliceZoneProps> = ({
213
213
  sliceZone ? (
214
214
  <DropdownMenu>
215
215
  <DropdownMenuTrigger>
216
- <Button variant="secondary" startIcon="add">
216
+ <Button color="grey" startIcon="add">
217
217
  Add slices
218
218
  </Button>
219
219
  </DropdownMenuTrigger>
@@ -94,7 +94,7 @@ export const Sidebar: FC<SidebarProps> = (props) => {
94
94
  // Set `position` to `relative` to position `Button` on top of
95
95
  // `Gradient`.
96
96
  sx={{ position: "relative" }}
97
- variant="secondary"
97
+ color="grey"
98
98
  >
99
99
  Add a new variation
100
100
  </Button>
@@ -65,7 +65,7 @@ const SimulatorOnboardingTooltip: React.FC<
65
65
  Minimize context-switching by previewing your Slice components in the
66
66
  simulator.
67
67
  </HoverCardDescription>
68
- <HoverCardCloseButton>Got It</HoverCardCloseButton>
68
+ <HoverCardCloseButton>Got it</HoverCardCloseButton>
69
69
  </HoverCard>
70
70
  );
71
71
  };
@@ -155,7 +155,7 @@ const SimulatorButton: React.FC<{
155
155
  width={tokens.size[24]}
156
156
  />
157
157
  )}
158
- variant="secondary"
158
+ color="grey"
159
159
  >
160
160
  Simulate
161
161
  </Button>
@@ -18,7 +18,7 @@ const ZoneEmptyState = ({
18
18
  </Box>
19
19
  <Box sx={{ display: "flex", justifyContent: "center", marginTop: 16 }}>
20
20
  <Button
21
- variant="secondary"
21
+ color="grey"
22
22
  // eslint-disable-next-line @typescript-eslint/no-unsafe-return
23
23
  onClick={() => onEnterSelectMode()}
24
24
  data-cy={`add-${zoneName}-field`}
@@ -93,7 +93,7 @@ const Zone = ({
93
93
  }-field`}
94
94
  onClick={enterSelectMode}
95
95
  startIcon="add"
96
- variant="secondary"
96
+ grey="grey"
97
97
  >
98
98
  Add a new field
99
99
  </Button>
package/out/404.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/7ef90ba762e84cee.css" as="style"/><link rel="stylesheet" href="/_next/static/css/7ef90ba762e84cee.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-cae1327f33c96711.js" defer=""></script><script src="/_next/static/chunks/pages/_error-69b4f498bafdd188.js" defer=""></script><script src="/_next/static/ALrNHXPZGeRwEXHdmh5-C/_buildManifest.js" defer=""></script><script src="/_next/static/ALrNHXPZGeRwEXHdmh5-C/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"ALrNHXPZGeRwEXHdmh5-C","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/1bbf650dfd37ce69.css" as="style"/><link rel="stylesheet" href="/_next/static/css/1bbf650dfd37ce69.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-36b2c828e330d9c7.js" defer=""></script><script src="/_next/static/chunks/pages/_error-69b4f498bafdd188.js" defer=""></script><script src="/_next/static/bgAW-O9SejtbtaQ7v0wB1/_buildManifest.js" defer=""></script><script src="/_next/static/bgAW-O9SejtbtaQ7v0wB1/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"bgAW-O9SejtbtaQ7v0wB1","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
@@ -0,0 +1 @@
1
+ self.__BUILD_MANIFEST=function(s,c,a,e,t,i,b,n,u,l){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[c,i,b,"static/chunks/pages/index-d8e3a2c0d712904f.js"],"/_error":["static/chunks/pages/_error-69b4f498bafdd188.js"],"/changelog":["static/chunks/870-0c7a8a9622de78b7.js","static/chunks/pages/changelog-4d0f2f1222e403fe.js"],"/changes":[a,"static/chunks/8eec4907-b712959d9f984b68.js","static/chunks/918-38d08f1e885b222d.js",s,e,"static/css/7d650bca12dc4061.css","static/chunks/pages/changes-52c9d917808d1461.js"],"/custom-types":[c,i,b,"static/chunks/pages/custom-types-2f5664d9492b13fb.js"],"/custom-types/[customTypeId]":[n,s,c,t,u,l,"static/chunks/pages/custom-types/[customTypeId]-3a37eb3373bb8823.js"],"/labs":["static/chunks/pages/labs-526bb7d60a1b90f4.js"],"/page-types/[pageTypeId]":[n,s,c,t,u,l,"static/chunks/pages/page-types/[pageTypeId]-733f3890c0466a05.js"],"/slices":[a,s,e,"static/css/cb33580e45d01b59.css","static/chunks/pages/slices-884a936a9a062a65.js"],"/slices/[lib]/[sliceName]/[variation]":[a,s,e,t,"static/css/77abb01eee0e43a7.css","static/chunks/pages/slices/[lib]/[sliceName]/[variation]-ef11594ce026b650.js"],"/slices/[lib]/[sliceName]/[variation]/simulator":[a,"static/chunks/72585f70-28b4d7d5384b3703.js","static/chunks/18539003-4460ccbfe3109578.js","static/chunks/505-3f1cf09a086dcba8.js","static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-7b17cb59d0db03b5.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/958-8aca174b80cb0c35.js","static/chunks/550-c80fd46fb64d1eef.js","static/chunks/c8eae200-966ce352f7b5d2b9.js","static/chunks/80-7b8a97d0122ff74a.js","static/chunks/482-34cee2a2071c235f.js","static/chunks/840-163f8a1040e6820d.js","static/css/be1f49e49a5aa7eb.css","static/chunks/474-5a072e6fac61f703.js","static/chunks/904-519dbf0f7e8c6243.js","static/css/5da5d3cd7a87c3cf.css"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();