slice-machine-ui 2.14.0 → 2.14.1-alpha.dani-ai.2
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.
- package/out/404.html +1 -1
- package/out/_next/static/{3wKQDz5yjF13ZwvuUxlXA → apJgddxpnkI0yi2abrB-k}/_buildManifest.js +1 -1
- package/out/_next/static/chunks/182-41d8530cc73708e9.js +1 -0
- package/out/_next/static/chunks/pages/{_app-15cb84f3c23396d4.js → _app-75c9635bbc8180cd.js} +2 -2
- package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-d064c8b72874c0ba.js → [customTypeId]-64aa3bd4c9fcf0e6.js} +1 -1
- package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-5bb8851689eb84cb.js → [pageTypeId]-3f474721052dae04.js} +1 -1
- package/out/changelog.html +1 -1
- package/out/changes.html +1 -1
- package/out/custom-types/[customTypeId].html +1 -1
- package/out/custom-types.html +1 -1
- package/out/index.html +1 -1
- package/out/labs.html +1 -1
- package/out/page-types/[pageTypeId].html +1 -1
- package/out/settings.html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
- package/out/slices.html +1 -1
- package/package.json +5 -4
- package/src/components/GenerateSliceWithAiModal/GenerateSliceWithAiModal.tsx +103 -0
- package/src/components/GenerateSliceWithAiModal/index.tsx +1 -0
- package/src/features/builder/useAiSliceGenerationExperiment.ts +8 -0
- package/src/features/customTypes/customTypesBuilder/SliceZoneBlankSlate.tsx +17 -4
- package/src/legacy/components/ReviewModal/ReviewForm.tsx +3 -10
- package/src/legacy/components/ReviewModal/ReviewModal.tsx +2 -16
- package/src/legacy/lib/builders/CustomTypeBuilder/SliceZone/index.tsx +29 -2
- package/src/modules/userContext/index.ts +0 -2
- package/src/modules/userContext/types.ts +0 -1
- package/test/src/modules/__fixtures__/serverState.ts +1 -0
- package/test/src/modules/userContext.test.ts +0 -4
- package/out/_next/static/chunks/150-e030a221a6bd2282.js +0 -1
- /package/out/_next/static/{3wKQDz5yjF13ZwvuUxlXA → apJgddxpnkI0yi2abrB-k}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[625],{95759:function(n,u,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/custom-types/[customTypeId]",function(){return t(12375)}])},12375:function(n,u,t){"use strict";t.r(u),t.d(u,{default:function(){return _.H}});var _=t(
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[625],{95759:function(n,u,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/custom-types/[customTypeId]",function(){return t(12375)}])},12375:function(n,u,t){"use strict";t.r(u),t.d(u,{default:function(){return _.H}});var _=t(24182)}},function(n){n.O(0,[898,917,525,461,139,183,50,434,479,772,372,574,182,888,774,179],function(){return n(n.s=95759)}),_N_E=n.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[936],{61367:function(n,u,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/page-types/[pageTypeId]",function(){return e(3244)}])},3244:function(n,u,e){"use strict";e.r(u),e.d(u,{default:function(){return t.H}});var t=e(
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[936],{61367:function(n,u,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/page-types/[pageTypeId]",function(){return e(3244)}])},3244:function(n,u,e){"use strict";e.r(u),e.d(u,{default:function(){return t.H}});var t=e(24182)}},function(n){n.O(0,[898,917,525,461,139,183,50,434,479,772,372,574,182,888,774,179],function(){return n(n.s=61367)}),_N_E=n.O()}]);
|
package/out/changelog.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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-75c9635bbc8180cd.js" defer=""></script><script src="/_next/static/chunks/59b4e022-8e544a511d670317.js" defer=""></script><script src="/_next/static/chunks/183-b1a9f55f45cb8d8e.js" defer=""></script><script src="/_next/static/chunks/870-a72b74312773efea.js" defer=""></script><script src="/_next/static/chunks/pages/changelog-fd749acf98af82da.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_buildManifest.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changelog","query":{},"buildId":"apJgddxpnkI0yi2abrB-k","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/changes.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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><link rel="preload" href="/_next/static/css/9d17b7d9f44c5c5d.css" as="style"/><link rel="stylesheet" href="/_next/static/css/9d17b7d9f44c5c5d.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><link rel="preload" href="/_next/static/css/9d17b7d9f44c5c5d.css" as="style"/><link rel="stylesheet" href="/_next/static/css/9d17b7d9f44c5c5d.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-75c9635bbc8180cd.js" defer=""></script><script src="/_next/static/chunks/59b4e022-8e544a511d670317.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/8eec4907-b712959d9f984b68.js" defer=""></script><script src="/_next/static/chunks/918-38ab72e6ee071fec.js" defer=""></script><script src="/_next/static/chunks/772-7401e6c6e7ca075e.js" defer=""></script><script src="/_next/static/chunks/639-424b570eee9a37fb.js" defer=""></script><script src="/_next/static/chunks/pages/changes-abdcde22a1d96331.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_buildManifest.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changes","query":{},"buildId":"apJgddxpnkI0yi2abrB-k","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><link rel="preload" href="/_next/static/css/850c81be38195a0f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/850c81be38195a0f.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><link rel="preload" href="/_next/static/css/850c81be38195a0f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/850c81be38195a0f.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-75c9635bbc8180cd.js" defer=""></script><script src="/_next/static/chunks/59b4e022-8e544a511d670317.js" defer=""></script><script src="/_next/static/chunks/f36c6662-1f3a854183168b10.js" defer=""></script><script src="/_next/static/chunks/4c744e84-480e426e4b1cfef3.js" defer=""></script><script src="/_next/static/chunks/065a3ddb-9a38ca0d60f0bf2f.js" defer=""></script><script src="/_next/static/chunks/1cc2734a-09fb3b997ad1eb70.js" defer=""></script><script src="/_next/static/chunks/183-b1a9f55f45cb8d8e.js" defer=""></script><script src="/_next/static/chunks/50-586dc7ab5e584e76.js" defer=""></script><script src="/_next/static/chunks/434-c7ad3ff97354e3b7.js" defer=""></script><script src="/_next/static/chunks/479-6205c85aa978fc0b.js" defer=""></script><script src="/_next/static/chunks/772-7401e6c6e7ca075e.js" defer=""></script><script src="/_next/static/chunks/372-718a5541f567e738.js" defer=""></script><script src="/_next/static/chunks/574-0c1b117bcea4181c.js" defer=""></script><script src="/_next/static/chunks/182-41d8530cc73708e9.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types/%5BcustomTypeId%5D-64aa3bd4c9fcf0e6.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_buildManifest.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/custom-types/[customTypeId]","query":{},"buildId":"apJgddxpnkI0yi2abrB-k","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/custom-types.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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><link rel="preload" href="/_next/static/css/4e475d945cf8a890.css" as="style"/><link rel="stylesheet" href="/_next/static/css/4e475d945cf8a890.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><link rel="preload" href="/_next/static/css/4e475d945cf8a890.css" as="style"/><link rel="stylesheet" href="/_next/static/css/4e475d945cf8a890.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-75c9635bbc8180cd.js" defer=""></script><script src="/_next/static/chunks/372-718a5541f567e738.js" defer=""></script><script src="/_next/static/chunks/764-14490100bc2b60a8.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types-ddc20cfdd8049c04.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_buildManifest.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/custom-types","query":{},"buildId":"apJgddxpnkI0yi2abrB-k","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/index.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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><link rel="preload" href="/_next/static/css/4e475d945cf8a890.css" as="style"/><link rel="stylesheet" href="/_next/static/css/4e475d945cf8a890.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><link rel="preload" href="/_next/static/css/4e475d945cf8a890.css" as="style"/><link rel="stylesheet" href="/_next/static/css/4e475d945cf8a890.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-75c9635bbc8180cd.js" defer=""></script><script src="/_next/static/chunks/372-718a5541f567e738.js" defer=""></script><script src="/_next/static/chunks/764-14490100bc2b60a8.js" defer=""></script><script src="/_next/static/chunks/pages/index-17f953c11b46cb20.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_buildManifest.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"apJgddxpnkI0yi2abrB-k","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/labs.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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-75c9635bbc8180cd.js" defer=""></script><script src="/_next/static/chunks/pages/labs-41db727cff0af1a9.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_buildManifest.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/labs","query":{},"buildId":"apJgddxpnkI0yi2abrB-k","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><link rel="preload" href="/_next/static/css/850c81be38195a0f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/850c81be38195a0f.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><link rel="preload" href="/_next/static/css/850c81be38195a0f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/850c81be38195a0f.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-75c9635bbc8180cd.js" defer=""></script><script src="/_next/static/chunks/59b4e022-8e544a511d670317.js" defer=""></script><script src="/_next/static/chunks/f36c6662-1f3a854183168b10.js" defer=""></script><script src="/_next/static/chunks/4c744e84-480e426e4b1cfef3.js" defer=""></script><script src="/_next/static/chunks/065a3ddb-9a38ca0d60f0bf2f.js" defer=""></script><script src="/_next/static/chunks/1cc2734a-09fb3b997ad1eb70.js" defer=""></script><script src="/_next/static/chunks/183-b1a9f55f45cb8d8e.js" defer=""></script><script src="/_next/static/chunks/50-586dc7ab5e584e76.js" defer=""></script><script src="/_next/static/chunks/434-c7ad3ff97354e3b7.js" defer=""></script><script src="/_next/static/chunks/479-6205c85aa978fc0b.js" defer=""></script><script src="/_next/static/chunks/772-7401e6c6e7ca075e.js" defer=""></script><script src="/_next/static/chunks/372-718a5541f567e738.js" defer=""></script><script src="/_next/static/chunks/574-0c1b117bcea4181c.js" defer=""></script><script src="/_next/static/chunks/182-41d8530cc73708e9.js" defer=""></script><script src="/_next/static/chunks/pages/page-types/%5BpageTypeId%5D-3f474721052dae04.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_buildManifest.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/page-types/[pageTypeId]","query":{},"buildId":"apJgddxpnkI0yi2abrB-k","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/settings.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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><link rel="preload" href="/_next/static/css/e5f781f20e24a5ea.css" as="style"/><link rel="stylesheet" href="/_next/static/css/e5f781f20e24a5ea.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><link rel="preload" href="/_next/static/css/e5f781f20e24a5ea.css" as="style"/><link rel="stylesheet" href="/_next/static/css/e5f781f20e24a5ea.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-75c9635bbc8180cd.js" defer=""></script><script src="/_next/static/chunks/pages/settings-4efa7c64dc4f2468.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_buildManifest.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/settings","query":{},"buildId":"apJgddxpnkI0yi2abrB-k","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-75c9635bbc8180cd.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/72585f70-28b4d7d5384b3703.js" defer=""></script><script src="/_next/static/chunks/157-c12435a018a2c5ce.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D/simulator-5b65c5cb79e1e66a.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_buildManifest.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices/[lib]/[sliceName]/[variation]/simulator","query":{},"buildId":"apJgddxpnkI0yi2abrB-k","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><link rel="preload" href="/_next/static/css/9740e73b8aa87666.css" as="style"/><link rel="stylesheet" href="/_next/static/css/9740e73b8aa87666.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><link rel="preload" href="/_next/static/css/9740e73b8aa87666.css" as="style"/><link rel="stylesheet" href="/_next/static/css/9740e73b8aa87666.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-75c9635bbc8180cd.js" defer=""></script><script src="/_next/static/chunks/59b4e022-8e544a511d670317.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/f36c6662-1f3a854183168b10.js" defer=""></script><script src="/_next/static/chunks/4c744e84-480e426e4b1cfef3.js" defer=""></script><script src="/_next/static/chunks/065a3ddb-9a38ca0d60f0bf2f.js" defer=""></script><script src="/_next/static/chunks/1cc2734a-09fb3b997ad1eb70.js" defer=""></script><script src="/_next/static/chunks/183-b1a9f55f45cb8d8e.js" defer=""></script><script src="/_next/static/chunks/50-586dc7ab5e584e76.js" defer=""></script><script src="/_next/static/chunks/434-c7ad3ff97354e3b7.js" defer=""></script><script src="/_next/static/chunks/772-7401e6c6e7ca075e.js" defer=""></script><script src="/_next/static/chunks/574-0c1b117bcea4181c.js" defer=""></script><script src="/_next/static/chunks/639-424b570eee9a37fb.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D-1628edd314d05be8.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_buildManifest.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices/[lib]/[sliceName]/[variation]","query":{},"buildId":"apJgddxpnkI0yi2abrB-k","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/slices.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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><link rel="preload" href="/_next/static/css/b5323377600915db.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b5323377600915db.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
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/db6286456bd40214.css" as="style"/><link rel="stylesheet" href="/_next/static/css/db6286456bd40214.css" data-n-g=""/><link rel="preload" href="/_next/static/css/b5323377600915db.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b5323377600915db.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-a31bc948075f7bde.js" defer=""></script><script src="/_next/static/chunks/main-8e15d66b38d840e9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-75c9635bbc8180cd.js" defer=""></script><script src="/_next/static/chunks/59b4e022-8e544a511d670317.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/50-586dc7ab5e584e76.js" defer=""></script><script src="/_next/static/chunks/772-7401e6c6e7ca075e.js" defer=""></script><script src="/_next/static/chunks/639-424b570eee9a37fb.js" defer=""></script><script src="/_next/static/chunks/pages/slices-f42c28ddc74a5b2b.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_buildManifest.js" defer=""></script><script src="/_next/static/apJgddxpnkI0yi2abrB-k/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices","query":{},"buildId":"apJgddxpnkI0yi2abrB-k","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slice-machine-ui",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.1-alpha.dani-ai.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "A visual builder for your Slice Models with all the tools you need to generate data models and mock CMS content locally.",
|
|
6
6
|
"repository": {
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"start-slicemachine": "./bin/start-slicemachine.cjs"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@slicemachine/manager": "0.24.
|
|
39
|
-
"start-slicemachine": "0.12.
|
|
38
|
+
"@slicemachine/manager": "0.24.8-alpha.dani-ai.3",
|
|
39
|
+
"start-slicemachine": "0.12.50-alpha.dani-ai.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@emotion/react": "11.11.1",
|
|
@@ -136,5 +136,6 @@
|
|
|
136
136
|
"vitest": "0.32.0",
|
|
137
137
|
"yup": "0.32.11",
|
|
138
138
|
"zod": "3.23.8"
|
|
139
|
-
}
|
|
139
|
+
},
|
|
140
|
+
"stableVersion": "2.14.0"
|
|
140
141
|
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BlankSlate,
|
|
3
|
+
BlankSlateActions,
|
|
4
|
+
BlankSlateDescription,
|
|
5
|
+
BlankSlateIcon,
|
|
6
|
+
BlankSlateTitle,
|
|
7
|
+
Box,
|
|
8
|
+
Dialog,
|
|
9
|
+
DialogActionButton,
|
|
10
|
+
DialogActions,
|
|
11
|
+
DialogCancelButton,
|
|
12
|
+
DialogContent,
|
|
13
|
+
DialogHeader,
|
|
14
|
+
FileDropZone,
|
|
15
|
+
FileUploadButton,
|
|
16
|
+
} from "@prismicio/editor-ui";
|
|
17
|
+
|
|
18
|
+
interface GenerateSliceWithAiModalProps {
|
|
19
|
+
open: boolean;
|
|
20
|
+
onClose: () => void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function GenerateSliceWithAiModal(props: GenerateSliceWithAiModalProps) {
|
|
24
|
+
const { open, onClose } = props;
|
|
25
|
+
|
|
26
|
+
const onImagesSelected = (images: File[]) => {
|
|
27
|
+
console.log(images);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<Dialog
|
|
32
|
+
open={open}
|
|
33
|
+
onOpenChange={(open) => {
|
|
34
|
+
if (!open) onClose();
|
|
35
|
+
}}
|
|
36
|
+
>
|
|
37
|
+
<DialogHeader title="Generate with AI" />
|
|
38
|
+
<DialogContent gap={0}>
|
|
39
|
+
<Box padding={16} height="100%">
|
|
40
|
+
<FileDropZone
|
|
41
|
+
onFilesSelected={onImagesSelected}
|
|
42
|
+
assetType="image"
|
|
43
|
+
overlay={
|
|
44
|
+
<UploadBlankSlate
|
|
45
|
+
onFilesSelected={onImagesSelected}
|
|
46
|
+
droppingFiles
|
|
47
|
+
/>
|
|
48
|
+
}
|
|
49
|
+
>
|
|
50
|
+
<UploadBlankSlate onFilesSelected={onImagesSelected} />
|
|
51
|
+
</FileDropZone>
|
|
52
|
+
</Box>
|
|
53
|
+
|
|
54
|
+
<DialogActions>
|
|
55
|
+
<DialogCancelButton />
|
|
56
|
+
<DialogActionButton disabled onClick={() => undefined}>
|
|
57
|
+
Add to page
|
|
58
|
+
</DialogActionButton>
|
|
59
|
+
</DialogActions>
|
|
60
|
+
</DialogContent>
|
|
61
|
+
</Dialog>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function UploadBlankSlate(props: {
|
|
66
|
+
droppingFiles?: boolean;
|
|
67
|
+
onFilesSelected: (files: File[]) => void;
|
|
68
|
+
}) {
|
|
69
|
+
const { droppingFiles = false, onFilesSelected } = props;
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<Box
|
|
73
|
+
justifyContent="center"
|
|
74
|
+
flexDirection="column"
|
|
75
|
+
height="100%"
|
|
76
|
+
backgroundColor={droppingFiles ? "purple2" : "grey2"}
|
|
77
|
+
border
|
|
78
|
+
borderStyle="dashed"
|
|
79
|
+
>
|
|
80
|
+
<BlankSlate>
|
|
81
|
+
<BlankSlateIcon
|
|
82
|
+
lineColor="purple11"
|
|
83
|
+
backgroundColor="purple5"
|
|
84
|
+
name="cloudUpload"
|
|
85
|
+
size="large"
|
|
86
|
+
/>
|
|
87
|
+
<BlankSlateTitle>Upload your design images.</BlankSlateTitle>
|
|
88
|
+
<BlankSlateDescription>
|
|
89
|
+
Once uploaded, you can generate slices automatically using AI.
|
|
90
|
+
</BlankSlateDescription>
|
|
91
|
+
<BlankSlateActions>
|
|
92
|
+
<FileUploadButton
|
|
93
|
+
startIcon="attachFile"
|
|
94
|
+
onFilesSelected={onFilesSelected}
|
|
95
|
+
color="grey"
|
|
96
|
+
>
|
|
97
|
+
Add images
|
|
98
|
+
</FileUploadButton>
|
|
99
|
+
</BlankSlateActions>
|
|
100
|
+
</BlankSlate>
|
|
101
|
+
</Box>
|
|
102
|
+
);
|
|
103
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GenerateSliceWithAiModal } from "./GenerateSliceWithAiModal";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useExperimentVariant } from "@/hooks/useExperimentVariant";
|
|
2
|
+
|
|
3
|
+
type useAiSliceGenerationExperimentReturnType = { eligible: boolean };
|
|
4
|
+
|
|
5
|
+
export function useAiSliceGenerationExperiment(): useAiSliceGenerationExperimentReturnType {
|
|
6
|
+
const variant = useExperimentVariant("slicemachine-ai-slice-generation");
|
|
7
|
+
return { eligible: variant?.value === "on" };
|
|
8
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionList, ActionListItem,
|
|
1
|
+
import { ActionList, ActionListItem, Box } from "@prismicio/editor-ui";
|
|
2
2
|
import { FC } from "react";
|
|
3
3
|
|
|
4
4
|
import {
|
|
@@ -8,11 +8,13 @@ import {
|
|
|
8
8
|
BlankSlateDescription,
|
|
9
9
|
BlankSlateTitle,
|
|
10
10
|
} from "@/components/BlankSlate";
|
|
11
|
+
import { useAiSliceGenerationExperiment } from "@/features/builder/useAiSliceGenerationExperiment";
|
|
11
12
|
import { SliceMachinePrinterIcon } from "@/icons/SliceMachinePrinterIcon";
|
|
12
13
|
|
|
13
14
|
export type SliceZoneBlankSlateProps = {
|
|
14
15
|
openUpdateSliceZoneModal: () => void;
|
|
15
16
|
openCreateSliceModal: () => void;
|
|
17
|
+
openGenerateSliceWithAiModal: () => void;
|
|
16
18
|
openSlicesTemplatesModal: () => void;
|
|
17
19
|
projectHasAvailableSlices: boolean;
|
|
18
20
|
isSlicesTemplatesSupported: boolean;
|
|
@@ -20,11 +22,14 @@ export type SliceZoneBlankSlateProps = {
|
|
|
20
22
|
|
|
21
23
|
export const SliceZoneBlankSlate: FC<SliceZoneBlankSlateProps> = ({
|
|
22
24
|
openCreateSliceModal,
|
|
25
|
+
openGenerateSliceWithAiModal,
|
|
23
26
|
openUpdateSliceZoneModal,
|
|
24
27
|
openSlicesTemplatesModal,
|
|
25
28
|
projectHasAvailableSlices,
|
|
26
29
|
isSlicesTemplatesSupported,
|
|
27
30
|
}) => {
|
|
31
|
+
const aiSliceGenerationExperiment = useAiSliceGenerationExperiment();
|
|
32
|
+
|
|
28
33
|
return (
|
|
29
34
|
<Box
|
|
30
35
|
flexGrow={1}
|
|
@@ -44,19 +49,27 @@ export const SliceZoneBlankSlate: FC<SliceZoneBlankSlateProps> = ({
|
|
|
44
49
|
</BlankSlateDescription>
|
|
45
50
|
<BlankSlateActions>
|
|
46
51
|
<ActionList>
|
|
52
|
+
{aiSliceGenerationExperiment.eligible && (
|
|
53
|
+
<ActionListItem
|
|
54
|
+
startIcon="autoFixHigh"
|
|
55
|
+
onClick={openGenerateSliceWithAiModal}
|
|
56
|
+
description="Let AI instantly create a Slice for you."
|
|
57
|
+
>
|
|
58
|
+
Generate with AI
|
|
59
|
+
</ActionListItem>
|
|
60
|
+
)}
|
|
47
61
|
<ActionListItem
|
|
48
62
|
startIcon="add"
|
|
49
63
|
onClick={openCreateSliceModal}
|
|
50
|
-
description="
|
|
64
|
+
description="Build a custom Slice your way."
|
|
51
65
|
>
|
|
52
|
-
|
|
66
|
+
Start from scratch
|
|
53
67
|
</ActionListItem>
|
|
54
68
|
{isSlicesTemplatesSupported ? (
|
|
55
69
|
<ActionListItem
|
|
56
70
|
startIcon="contentCopy"
|
|
57
71
|
onClick={openSlicesTemplatesModal}
|
|
58
72
|
description="Select from premade examples."
|
|
59
|
-
endAdornment={<Badge color="purple" title="New" />}
|
|
60
73
|
>
|
|
61
74
|
Use template
|
|
62
75
|
</ActionListItem>
|
|
@@ -19,7 +19,6 @@ import { isLoading } from "@/modules/loading";
|
|
|
19
19
|
import { LoadingKeysEnum } from "@/modules/loading/types";
|
|
20
20
|
import { isModalOpen } from "@/modules/modal";
|
|
21
21
|
import { ModalKeysEnum } from "@/modules/modal/types";
|
|
22
|
-
import { UserReviewType } from "@/modules/userContext/types";
|
|
23
22
|
import useSliceMachineActions from "@/modules/useSliceMachineActions";
|
|
24
23
|
import { SliceMachineStoreType } from "@/redux/type";
|
|
25
24
|
|
|
@@ -27,12 +26,9 @@ import { ReviewFormSelect } from "./ReviewFormSelect";
|
|
|
27
26
|
|
|
28
27
|
Modal.setAppElement("#__next");
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
reviewType: UserReviewType;
|
|
32
|
-
};
|
|
29
|
+
const reviewType = "onboarding";
|
|
33
30
|
|
|
34
|
-
export const ReviewForm: FC
|
|
35
|
-
const { reviewType } = props;
|
|
31
|
+
export const ReviewForm: FC = () => {
|
|
36
32
|
const { isReviewLoading, isLoginModalOpen } = useSelector(
|
|
37
33
|
(store: SliceMachineStoreType) => ({
|
|
38
34
|
isReviewLoading: isLoading(store, LoadingKeysEnum.REVIEW),
|
|
@@ -48,10 +44,7 @@ export const ReviewForm: FC<ReviewFormProps> = (props) => {
|
|
|
48
44
|
event: "review",
|
|
49
45
|
rating,
|
|
50
46
|
comment,
|
|
51
|
-
type:
|
|
52
|
-
reviewType === "advancedRepository"
|
|
53
|
-
? "advanced repository"
|
|
54
|
-
: "onboarding",
|
|
47
|
+
type: reviewType,
|
|
55
48
|
});
|
|
56
49
|
sendAReview(reviewType);
|
|
57
50
|
stopLoadingReview();
|
|
@@ -42,28 +42,14 @@ export const ReviewModal: FC = () => {
|
|
|
42
42
|
lastSyncChange && Date.now() - lastSyncChange >= 3600000,
|
|
43
43
|
);
|
|
44
44
|
|
|
45
|
-
const isAdvancedRepository =
|
|
46
|
-
sliceCount >= 6 &&
|
|
47
|
-
customTypes.length >= 6 &&
|
|
48
|
-
hasSliceWithinCustomType &&
|
|
49
|
-
hasPushedAnHourAgo;
|
|
50
|
-
|
|
51
|
-
if (!userReview.advancedRepository && isAdvancedRepository) {
|
|
52
|
-
return <ReviewForm reviewType="advancedRepository" />;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
45
|
const isOnboardingDone =
|
|
56
46
|
sliceCount >= 1 &&
|
|
57
47
|
customTypes.length >= 1 &&
|
|
58
48
|
hasSliceWithinCustomType &&
|
|
59
49
|
hasPushedAnHourAgo;
|
|
60
50
|
|
|
61
|
-
if (
|
|
62
|
-
|
|
63
|
-
!userReview.advancedRepository &&
|
|
64
|
-
isOnboardingDone
|
|
65
|
-
) {
|
|
66
|
-
return <ReviewForm reviewType="onboarding" />;
|
|
51
|
+
if (!userReview.onboarding && isOnboardingDone) {
|
|
52
|
+
return <ReviewForm />;
|
|
67
53
|
}
|
|
68
54
|
|
|
69
55
|
return null;
|
|
@@ -16,7 +16,9 @@ import { toast } from "react-toastify";
|
|
|
16
16
|
import { BaseStyles } from "theme-ui";
|
|
17
17
|
|
|
18
18
|
import { telemetry } from "@/apiClient";
|
|
19
|
+
import { GenerateSliceWithAiModal } from "@/components/GenerateSliceWithAiModal";
|
|
19
20
|
import { ListHeader } from "@/components/List";
|
|
21
|
+
import { useAiSliceGenerationExperiment } from "@/features/builder/useAiSliceGenerationExperiment";
|
|
20
22
|
import { useCustomTypeState } from "@/features/customTypes/customTypesBuilder/CustomTypeProvider";
|
|
21
23
|
import { SliceZoneBlankSlate } from "@/features/customTypes/customTypesBuilder/SliceZoneBlankSlate";
|
|
22
24
|
import { useOnboarding } from "@/features/onboarding/useOnboarding";
|
|
@@ -111,12 +113,15 @@ const SliceZone: React.FC<SliceZoneProps> = ({
|
|
|
111
113
|
sliceZone,
|
|
112
114
|
tabId,
|
|
113
115
|
}) => {
|
|
116
|
+
const aiSliceGenerationExperiment = useAiSliceGenerationExperiment();
|
|
114
117
|
const availableSlicesTemplates = useSlicesTemplates();
|
|
115
118
|
const [isSlicesTemplatesModalOpen, setIsSlicesTemplatesModalOpen] =
|
|
116
119
|
useState(false);
|
|
117
120
|
const [isUpdateSliceZoneModalOpen, setIsUpdateSliceZoneModalOpen] =
|
|
118
121
|
useState(false);
|
|
119
122
|
const [isCreateSliceModalOpen, setIsCreateSliceModalOpen] = useState(false);
|
|
123
|
+
const [isGenerateSliceWithAiModalOpen, setIsGenerateSliceWithAiModalOpen] =
|
|
124
|
+
useState(false);
|
|
120
125
|
const { remoteSlices, libraries } = useSelector(
|
|
121
126
|
(store: SliceMachineStoreType) => ({
|
|
122
127
|
remoteSlices: getRemoteSlices(store),
|
|
@@ -169,6 +174,10 @@ const SliceZone: React.FC<SliceZoneProps> = ({
|
|
|
169
174
|
setIsCreateSliceModalOpen(true);
|
|
170
175
|
};
|
|
171
176
|
|
|
177
|
+
const openGenerateSliceWithAiModal = () => {
|
|
178
|
+
setIsGenerateSliceWithAiModalOpen(true);
|
|
179
|
+
};
|
|
180
|
+
|
|
172
181
|
const openSlicesTemplatesModal = () => {
|
|
173
182
|
setIsSlicesTemplatesModalOpen(true);
|
|
174
183
|
|
|
@@ -187,6 +196,10 @@ const SliceZone: React.FC<SliceZoneProps> = ({
|
|
|
187
196
|
setIsCreateSliceModalOpen(false);
|
|
188
197
|
};
|
|
189
198
|
|
|
199
|
+
const closeGenerateSliceWithAiModal = () => {
|
|
200
|
+
setIsGenerateSliceWithAiModalOpen(false);
|
|
201
|
+
};
|
|
202
|
+
|
|
190
203
|
const closeSlicesTemplatesModal = () => {
|
|
191
204
|
setIsSlicesTemplatesModalOpen(false);
|
|
192
205
|
};
|
|
@@ -208,12 +221,21 @@ const SliceZone: React.FC<SliceZoneProps> = ({
|
|
|
208
221
|
</DropdownMenuTrigger>
|
|
209
222
|
|
|
210
223
|
<DropdownMenuContent align="end">
|
|
224
|
+
{aiSliceGenerationExperiment.eligible && (
|
|
225
|
+
<DropdownMenuItem
|
|
226
|
+
startIcon={<Icon name="autoFixHigh" size="large" />}
|
|
227
|
+
onSelect={openGenerateSliceWithAiModal}
|
|
228
|
+
description="Let AI instantly create a Slice for you."
|
|
229
|
+
>
|
|
230
|
+
Generate with AI
|
|
231
|
+
</DropdownMenuItem>
|
|
232
|
+
)}
|
|
211
233
|
<DropdownMenuItem
|
|
212
234
|
startIcon={<Icon name="add" size="large" />}
|
|
213
235
|
onSelect={openCreateSliceModal}
|
|
214
|
-
description="
|
|
236
|
+
description="Build a custom Slice your way."
|
|
215
237
|
>
|
|
216
|
-
|
|
238
|
+
Start from scratch
|
|
217
239
|
</DropdownMenuItem>
|
|
218
240
|
|
|
219
241
|
{availableSlicesTemplates.length > 0 ? (
|
|
@@ -282,6 +304,7 @@ const SliceZone: React.FC<SliceZoneProps> = ({
|
|
|
282
304
|
<SliceZoneBlankSlate
|
|
283
305
|
openUpdateSliceZoneModal={openUpdateSliceZoneModal}
|
|
284
306
|
openCreateSliceModal={openCreateSliceModal}
|
|
307
|
+
openGenerateSliceWithAiModal={openGenerateSliceWithAiModal}
|
|
285
308
|
openSlicesTemplatesModal={openSlicesTemplatesModal}
|
|
286
309
|
projectHasAvailableSlices={availableSlicesToAdd.length > 0}
|
|
287
310
|
isSlicesTemplatesSupported={availableSlicesTemplates.length > 0}
|
|
@@ -366,6 +389,10 @@ const SliceZone: React.FC<SliceZoneProps> = ({
|
|
|
366
389
|
onClose={closeCreateSliceModal}
|
|
367
390
|
/>
|
|
368
391
|
)}
|
|
392
|
+
<GenerateSliceWithAiModal
|
|
393
|
+
open={isGenerateSliceWithAiModalOpen}
|
|
394
|
+
onClose={closeGenerateSliceWithAiModal}
|
|
395
|
+
/>
|
|
369
396
|
</>
|
|
370
397
|
);
|
|
371
398
|
};
|
|
@@ -17,7 +17,6 @@ import { refreshStateCreator } from "../environment";
|
|
|
17
17
|
const initialState: UserContextStoreType = {
|
|
18
18
|
userReview: {
|
|
19
19
|
onboarding: false,
|
|
20
|
-
advancedRepository: false,
|
|
21
20
|
},
|
|
22
21
|
hasSeenSimulatorToolTip: false,
|
|
23
22
|
hasSeenChangesToolTip: false,
|
|
@@ -59,7 +58,6 @@ type userContextActions = ActionType<
|
|
|
59
58
|
export const getUserReview = (state: SliceMachineStoreType): UserReviewState =>
|
|
60
59
|
state.userContext.userReview ?? {
|
|
61
60
|
onboarding: state.userContext.hasSendAReview ?? false,
|
|
62
|
-
advancedRepository: false,
|
|
63
61
|
};
|
|
64
62
|
|
|
65
63
|
export const userHasSeenSimulatorToolTip = (
|
|
@@ -25,6 +25,7 @@ export const dummyServerState: Pick<
|
|
|
25
25
|
SliceMachineV1: "https://sm-api.prismic.io/v1/",
|
|
26
26
|
RepositoryService: "https://api.internal.prismic.io/repository/",
|
|
27
27
|
LocaleService: "https://api.internal.prismic.io/locale/",
|
|
28
|
+
CustomTypeService: "https://api.internal.prismic.io/custom-type/",
|
|
28
29
|
},
|
|
29
30
|
shortId: "shortId",
|
|
30
31
|
},
|