slice-machine-ui 1.20.1-dev-next-release.2 → 1.20.1-dev-next-release.3

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 (55) hide show
  1. package/components/Navigation/index.tsx +13 -17
  2. package/components/ReviewModal/ReviewForm.tsx +2 -2
  3. package/components/ReviewModal/ReviewModal.tsx +7 -0
  4. package/out/404.html +1 -1
  5. package/out/_next/static/BIxidu02_xbgjO9EV7tg4/_buildManifest.js +1 -0
  6. package/out/_next/static/chunks/{18539003-371d86ea83e7293b.js → 18539003-5d8b6a04053638af.js} +2 -2
  7. package/out/_next/static/chunks/{482-39cef3a713901788.js → 482-30c0f114c7213fa3.js} +1 -1
  8. package/out/_next/static/chunks/{125-f0e2eb84ee39757a.js → 505-fa47e200ac3a012d.js} +1 -1
  9. package/out/_next/static/chunks/{550-e72c08c598051224.js → 550-abf97d3008006056.js} +1 -1
  10. package/out/_next/static/chunks/{80-821a0b5d4ad61185.js → 80-72d903b2a0bd5dc3.js} +1 -1
  11. package/out/_next/static/chunks/{840-884e41a48b92e5d3.js → 840-8cec2bbd104111f2.js} +1 -1
  12. package/out/_next/static/chunks/{904-69cc3c4be2bff626.js → 904-cb627b6d7b8068f9.js} +1 -1
  13. package/out/_next/static/chunks/958-8f814daf5896ff97.js +1 -0
  14. package/out/_next/static/chunks/pages/{_app-29fdd91c10c9d0b3.js → _app-2d01c2c528624eaf.js} +44 -44
  15. package/out/_next/static/chunks/pages/{changes-e388be4457a43c3a.js → changes-494c71511b2e8989.js} +1 -1
  16. package/out/_next/static/chunks/pages/index-d8e3a2c0d712904f.js +1 -0
  17. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/{simulator-79a62d775e64898c.js → simulator-7b17cb59d0db03b5.js} +1 -1
  18. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/{[variation]-481c9b569db5ca0e.js → [variation]-763cc8c12e977b4a.js} +1 -1
  19. package/out/_next/static/css/31841735992dea23.css +1 -0
  20. package/out/_next/static/css/58a89606d9ca9093.css +1 -0
  21. package/out/_next/static/css/5d18ccf403d4649a.css +1 -0
  22. package/out/_next/static/css/{51597cd1f01c4889.css → 78250665d395ea50.css} +1 -1
  23. package/out/_next/static/css/{16b41648cd1de03b.css → b0be58d878c0fac3.css} +1 -1
  24. package/out/_next/static/css/e48f99beffa085f5.css +1 -0
  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 -7
  36. package/pages/_app.tsx +35 -28
  37. package/src/components/Counter/Counter.css.ts +26 -0
  38. package/src/components/Counter/Counter.stories.tsx +17 -0
  39. package/src/components/Counter/Counter.tsx +16 -0
  40. package/src/components/Counter/index.ts +1 -0
  41. package/src/features/inAppGuide/InAppGuideContext.tsx +47 -0
  42. package/src/features/inAppGuide/InAppGuideDialog.tsx +97 -0
  43. package/src/features/inAppGuide/inAppGuideContent.tsx +65 -0
  44. package/src/hooks/usePersistedState.ts +34 -0
  45. package/src/hooks/useRepositoryInformation.ts +24 -0
  46. package/src/icons/FlowerBackgroundIcon.tsx +17 -0
  47. package/src/icons/HelpIcon.tsx +19 -0
  48. package/out/_next/static/4sJdks5802_WcTjcqeA7c/_buildManifest.js +0 -1
  49. package/out/_next/static/chunks/958-c90d60818f1c468a.js +0 -1
  50. package/out/_next/static/chunks/pages/index-941b44c74dd339e4.js +0 -1
  51. package/out/_next/static/css/3e88bd24e38f18d0.css +0 -1
  52. package/out/_next/static/css/412af4286eb0b283.css +0 -1
  53. package/out/_next/static/css/6e4843007ff41825.css +0 -1
  54. package/out/_next/static/css/867d8d7ab4a75762.css +0 -1
  55. /package/out/_next/static/{4sJdks5802_WcTjcqeA7c → BIxidu02_xbgjO9EV7tg4}/_ssgManifest.js +0 -0
@@ -24,37 +24,33 @@ import { FolderIcon } from "@src/icons/FolderIcon";
24
24
  import { userHasSeenTutorialsToolTip } from "@src/modules/userContext";
25
25
  import { SliceMachineStoreType } from "@src/redux/type";
26
26
  import useSliceMachineActions from "@src/modules/useSliceMachineActions";
27
- import {
28
- getApiEndpoint,
29
- getChangelog,
30
- getRepoName,
31
- } from "@src/modules/environment";
27
+ import { getChangelog } from "@src/modules/environment";
32
28
  import { CUSTOM_TYPES_MESSAGES } from "@src/features/customTypes/customTypesMessages";
29
+ import { useRepositoryInformation } from "@src/hooks/useRepositoryInformation";
30
+
33
31
  import { ChangesListItem } from "./ChangesListItem";
34
32
 
35
33
  const Navigation: FC = () => {
36
- const { changelog, repoName, apiEndpoint, hasSeenTutorialsToolTip } =
37
- useSelector((store: SliceMachineStoreType) => ({
34
+ const { changelog, hasSeenTutorialsToolTip } = useSelector(
35
+ (store: SliceMachineStoreType) => ({
38
36
  changelog: getChangelog(store),
39
- repoName: getRepoName(store),
40
- apiEndpoint: getApiEndpoint(store),
41
37
  hasSeenTutorialsToolTip: userHasSeenTutorialsToolTip(store),
42
- }));
38
+ }),
39
+ );
43
40
  const router = useRouter();
44
- const repoDomain = new URL(apiEndpoint).hostname.replace(".cdn", "");
45
- const repoAddress = apiEndpoint.replace(".cdn.", ".").replace("/api/v2", "");
46
-
47
41
  const { setUpdatesViewed, setSeenTutorialsToolTip } =
48
42
  useSliceMachineActions();
43
+ const { repositoryName, repositoryDomain, repositoryUrl } =
44
+ useRepositoryInformation();
49
45
 
50
46
  return (
51
47
  <SideNav>
52
48
  <SideNavLogo />
53
49
 
54
50
  <SideNavRepository
55
- repositoryName={repoName}
56
- repositoryDomain={repoDomain}
57
- href={repoAddress}
51
+ repositoryName={repositoryName}
52
+ repositoryDomain={repositoryDomain}
53
+ href={repositoryUrl}
58
54
  />
59
55
 
60
56
  <SideNavList>
@@ -127,7 +123,7 @@ const Navigation: FC = () => {
127
123
  <SideNavList position="bottom">
128
124
  <SideNavLink
129
125
  title="Invite team"
130
- href={`${repoAddress}/settings/users`}
126
+ href={`${repositoryUrl}/settings/users`}
131
127
  Icon={(props) => <MathPlusIcon {...props} />}
132
128
  onClick={() => {
133
129
  void telemetry.track({
@@ -83,8 +83,8 @@ export const ReviewForm: FC<ReviewFormProps> = (props) => {
83
83
  overlay: {
84
84
  top: "initial",
85
85
  left: "initial",
86
- right: 32,
87
- bottom: 32,
86
+ right: 16,
87
+ bottom: 16,
88
88
  position: "absolute",
89
89
  height: "fit-content",
90
90
  width: "fit-content",
@@ -6,10 +6,12 @@ import { getLastSyncChange, getUserReview } from "@src/modules/userContext";
6
6
  import { selectAllCustomTypes } from "@src/modules/availableCustomTypes";
7
7
  import { getLibraries } from "@src/modules/slices";
8
8
  import { hasLocal } from "@lib/models/common/ModelData";
9
+ import { useInAppGuide } from "@src/features/inAppGuide/InAppGuideContext";
9
10
 
10
11
  import { ReviewForm } from "./ReviewForm";
11
12
 
12
13
  export const ReviewModal: FC = () => {
14
+ const { isInAppGuideOpen } = useInAppGuide();
13
15
  const { userReview, customTypes, libraries, lastSyncChange } = useSelector(
14
16
  (store: SliceMachineStoreType) => ({
15
17
  userReview: getUserReview(store),
@@ -19,6 +21,11 @@ export const ReviewModal: FC = () => {
19
21
  }),
20
22
  );
21
23
 
24
+ // Opt out directly if the in-app guide is open
25
+ if (isInAppGuideOpen) {
26
+ return null;
27
+ }
28
+
22
29
  const sliceCount =
23
30
  // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
24
31
  libraries && libraries.length
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/412af4286eb0b283.css" as="style"/><link rel="stylesheet" href="/_next/static/css/412af4286eb0b283.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-29fdd91c10c9d0b3.js" defer=""></script><script src="/_next/static/chunks/pages/_error-69b4f498bafdd188.js" defer=""></script><script src="/_next/static/4sJdks5802_WcTjcqeA7c/_buildManifest.js" defer=""></script><script src="/_next/static/4sJdks5802_WcTjcqeA7c/_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":"4sJdks5802_WcTjcqeA7c","runtimeConfig":{"sentryEnvironment":"alpha"},"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/e48f99beffa085f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/e48f99beffa085f5.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-2d01c2c528624eaf.js" defer=""></script><script src="/_next/static/chunks/pages/_error-69b4f498bafdd188.js" defer=""></script><script src="/_next/static/BIxidu02_xbgjO9EV7tg4/_buildManifest.js" defer=""></script><script src="/_next/static/BIxidu02_xbgjO9EV7tg4/_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":"BIxidu02_xbgjO9EV7tg4","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
@@ -0,0 +1 @@
1
+ self.__BUILD_MANIFEST=function(s,c,e,a,t,i,b,f,n,u){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-fa36b9995c26e1d7.js"],"/changes":[e,"static/chunks/8eec4907-b712959d9f984b68.js","static/chunks/918-38d08f1e885b222d.js",s,a,"static/css/78250665d395ea50.css","static/chunks/pages/changes-494c71511b2e8989.js"],"/custom-types":[c,i,b,"static/chunks/pages/custom-types-2f5664d9492b13fb.js"],"/custom-types/[customTypeId]":[f,s,c,t,n,u,"static/chunks/pages/custom-types/[customTypeId]-3a37eb3373bb8823.js"],"/labs":["static/chunks/pages/labs-ebce03a4e7a95a4e.js"],"/page-types/[pageTypeId]":[f,s,c,t,n,u,"static/chunks/pages/page-types/[pageTypeId]-733f3890c0466a05.js"],"/slices":[e,s,a,"static/css/58a89606d9ca9093.css","static/chunks/pages/slices-22db04643850c1d8.js"],"/slices/[lib]/[sliceName]/[variation]":[e,s,a,t,"static/css/31841735992dea23.css","static/chunks/pages/slices/[lib]/[sliceName]/[variation]-763cc8c12e977b4a.js"],"/slices/[lib]/[sliceName]/[variation]/simulator":[e,"static/chunks/72585f70-28b4d7d5384b3703.js","static/chunks/18539003-5d8b6a04053638af.js","static/chunks/505-fa47e200ac3a012d.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-8f814daf5896ff97.js","static/chunks/550-abf97d3008006056.js","static/chunks/c8eae200-966ce352f7b5d2b9.js","static/chunks/80-72d903b2a0bd5dc3.js","static/chunks/482-30c0f114c7213fa3.js","static/chunks/840-8cec2bbd104111f2.js","static/css/b0be58d878c0fac3.css","static/chunks/474-2393e400314474be.js","static/chunks/904-cb627b6d7b8068f9.js","static/css/5d18ccf403d4649a.css"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();