slice-machine-ui 1.22.1 → 1.22.2-alpha.aa-dt-1825.1

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 (35) hide show
  1. package/README.md +1 -1
  2. package/next.config.mjs +22 -17
  3. package/out/404.html +1 -1
  4. package/out/_next/static/chunks/474-5a072e6fac61f703.js +14 -0
  5. package/out/_next/static/chunks/{482-ec07ddd6b8d3b7ae.js → 482-7e97f91961588a90.js} +1 -1
  6. package/out/_next/static/chunks/{840-45aefe7b4d84745c.js → 840-c010c2547340976b.js} +1 -1
  7. package/out/_next/static/chunks/904-9eb2a2038b2302b7.js +1 -0
  8. package/out/_next/static/chunks/{958-b69a03c1c151348e.js → 958-0a6a103fac00582b.js} +1 -1
  9. package/out/_next/static/chunks/pages/{_app-7351339f5421bf89.js → _app-dc715cb64b0d59fa.js} +12 -12
  10. package/out/_next/static/chunks/pages/{changelog-cfda9d30715b6e2a.js → changelog-508bad6822a039ff.js} +1 -1
  11. package/out/_next/static/chunks/pages/{changes-a3cdb6251b224e4b.js → changes-c413fb6aa4bf4eca.js} +1 -1
  12. package/out/_next/static/chunks/pages/{labs-dfad3c3553469739.js → labs-d4462a72635f9ac0.js} +1 -1
  13. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/{[variation]-c228a7c42e87eb27.js → [variation]-8ba4b47fe4cf636a.js} +1 -1
  14. package/out/_next/static/chunks/pages/{slices-dc4f17b54c9a3eb5.js → slices-ed1190d3d37a63fd.js} +1 -1
  15. package/out/_next/static/css/{7ef90ba762e84cee.css → 29d73729eff3b961.css} +1 -1
  16. package/out/_next/static/{Id0ZYIbBMSep0wMmUsCLZ → sshjt-PKBIPFmNV0IrfGC}/_buildManifest.js +1 -1
  17. package/out/changelog.html +1 -1
  18. package/out/changes.html +1 -1
  19. package/out/custom-types/[customTypeId].html +1 -1
  20. package/out/custom-types.html +1 -1
  21. package/out/index.html +1 -1
  22. package/out/labs.html +1 -1
  23. package/out/page-types/[pageTypeId].html +1 -1
  24. package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
  25. package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
  26. package/out/slices.html +1 -1
  27. package/package.json +7 -6
  28. package/src/components/PageLayout/PageLayout.css.ts +6 -12
  29. package/src/components/PageLayout/PageLayout.tsx +4 -4
  30. package/src/components/SideNav/SideNavEnvironmentSelector.tsx +36 -7
  31. package/src/features/customTypes/customTypesTable/CustomTypesTablePage.tsx +1 -1
  32. package/LICENSE +0 -202
  33. package/out/_next/static/chunks/474-9a64c602aba34ae5.js +0 -6
  34. package/out/_next/static/chunks/904-245c0d63cb4b9a11.js +0 -1
  35. /package/out/_next/static/{Id0ZYIbBMSep0wMmUsCLZ → sshjt-PKBIPFmNV0IrfGC}/_ssgManifest.js +0 -0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <p align="center">
2
2
  <a href="https://prismic.io/slice-machine">
3
- <img src="https://raw.githubusercontent.com/prismicio/slice-machine/master/.github/logo.svg" alt="Slice Machine logo" width="220" />
3
+ <img src="https://raw.githubusercontent.com/prismicio/slice-machine/main/.github/logo.svg" alt="Slice Machine logo" width="220" />
4
4
  </a>
5
5
  </p>
6
6
 
package/next.config.mjs CHANGED
@@ -1,30 +1,35 @@
1
- import * as fs from "node:fs";
2
- import * as path from "node:path";
3
- import * as url from "node:url";
4
1
  import { withSentryConfig } from "@sentry/nextjs";
5
2
  import { createVanillaExtractPlugin } from "@vanilla-extract/next-plugin";
6
3
  import semver from "semver";
7
4
 
8
- const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
5
+ import pkg from "./package.json" assert { type: "json" };
9
6
 
10
- /** @type {{ version: string }} */
11
- const pkg = JSON.parse(
12
- fs.readFileSync(path.resolve(__dirname, "package.json"), "utf8"),
13
- );
14
-
15
- /** @type string */
7
+ const parsedPkgVersion = semver.parse(pkg.version);
8
+ if (parsedPkgVersion === null) {
9
+ throw new Error(
10
+ `Package \`${pkg.name}\` has an invalid version \`${pkg.version}\` in its manifest.`,
11
+ );
12
+ }
16
13
 
17
- const RELEASE_NUMBER = pkg.version;
18
- const isStableVersion =
19
- /^\d+\.\d+\.\d+$/.test(RELEASE_NUMBER) && semver.lte("0.1.0", RELEASE_NUMBER);
14
+ let sentryEnvironment;
15
+ if (parsedPkgVersion.prerelease.length === 0) {
16
+ sentryEnvironment = process.env.NODE_ENV;
17
+ } else if (
18
+ parsedPkgVersion.prerelease[0] === "alpha" ||
19
+ parsedPkgVersion.prerelease[0] === "beta"
20
+ ) {
21
+ sentryEnvironment = parsedPkgVersion.prerelease[0];
22
+ } else {
23
+ throw new Error(
24
+ `Invalid package version: \`${pkg.name}@${parsedPkgVersion.version}\`. The first prerelease component \`${parsedPkgVersion.prerelease[0]}\` must be either \`alpha\` or \`beta\`.`,
25
+ );
26
+ }
20
27
 
21
28
  /** @type {import("next").NextConfig} */
22
29
  let nextConfig = {
23
30
  experimental: { newNextLinkBehavior: true },
24
31
  swcMinify: true,
25
- publicRuntimeConfig: {
26
- sentryEnvironment: isStableVersion ? process.env.NODE_ENV : "alpha",
27
- },
32
+ publicRuntimeConfig: { sentryEnvironment },
28
33
  };
29
34
 
30
35
  if (process.env.NODE_ENV !== "development") {
@@ -50,7 +55,7 @@ if (process.env.NODE_ENV !== "development") {
50
55
  // The Sentry webpack plugin always ignores some files when uploading sourcemaps
51
56
  // We actually need them (because of the static export?) to get the complete trace in Sentry
52
57
  ignore: [],
53
- release: RELEASE_NUMBER,
58
+ release: parsedPkgVersion.version,
54
59
 
55
60
  configFile: "sentry-next.properties",
56
61
  };
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-7351339f5421bf89.js" defer=""></script><script src="/_next/static/chunks/pages/_error-69b4f498bafdd188.js" defer=""></script><script src="/_next/static/Id0ZYIbBMSep0wMmUsCLZ/_buildManifest.js" defer=""></script><script src="/_next/static/Id0ZYIbBMSep0wMmUsCLZ/_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":"Id0ZYIbBMSep0wMmUsCLZ","runtimeConfig":{"sentryEnvironment":"production"},"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/29d73729eff3b961.css" as="style"/><link rel="stylesheet" href="/_next/static/css/29d73729eff3b961.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-dc715cb64b0d59fa.js" defer=""></script><script src="/_next/static/chunks/pages/_error-69b4f498bafdd188.js" defer=""></script><script src="/_next/static/sshjt-PKBIPFmNV0IrfGC/_buildManifest.js" defer=""></script><script src="/_next/static/sshjt-PKBIPFmNV0IrfGC/_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":"sshjt-PKBIPFmNV0IrfGC","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>