slice-machine-ui 2.20.2 → 2.20.3-beta.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.
- package/out/404.html +1 -1
- package/out/_next/static/{5BiUxr-32t6FE8rq80fSD → DXrd-otrKGzC39KN_Y7a2}/_buildManifest.js +1 -1
- package/out/_next/static/chunks/633-f3f030e76fa70a4d.js +1 -0
- package/out/_next/static/chunks/pages/{_app-a183c4ef3e1eb8a9.js → _app-fb7168af0646d15b.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/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/features/customTypes/customTypesBuilder/CreateSliceFromImageModal/CreateSliceFromImageModal.tsx +25 -9
- package/out/_next/static/chunks/633-152bf078e5366a0c.js +0 -1
- /package/out/_next/static/{5BiUxr-32t6FE8rq80fSD → DXrd-otrKGzC39KN_Y7a2}/_ssgManifest.js +0 -0
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/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.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/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-fb7168af0646d15b.js" defer=""></script><script src="/_next/static/chunks/59b4e022-ef680789f7cc9b11.js" defer=""></script><script src="/_next/static/chunks/183-4ea255b867ff171b.js" defer=""></script><script src="/_next/static/chunks/870-a72b74312773efea.js" defer=""></script><script src="/_next/static/chunks/pages/changelog-8514e0696e90a1b2.js" defer=""></script><script src="/_next/static/DXrd-otrKGzC39KN_Y7a2/_buildManifest.js" defer=""></script><script src="/_next/static/DXrd-otrKGzC39KN_Y7a2/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changelog","query":{},"buildId":"DXrd-otrKGzC39KN_Y7a2","runtimeConfig":{"sentryEnvironment":"beta"},"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/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/d98ebc475f8423a3.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d98ebc475f8423a3.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.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/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/d98ebc475f8423a3.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d98ebc475f8423a3.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-fb7168af0646d15b.js" defer=""></script><script src="/_next/static/chunks/59b4e022-ef680789f7cc9b11.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/66-d9d3bcb5d041cb6d.js" defer=""></script><script src="/_next/static/chunks/125-00b909bdbab2ca15.js" defer=""></script><script src="/_next/static/chunks/882-48d61b2fabee28d8.js" defer=""></script><script src="/_next/static/chunks/593-7ffd1197c3405ef8.js" defer=""></script><script src="/_next/static/chunks/pages/changes-e66094f57453cf9c.js" defer=""></script><script src="/_next/static/DXrd-otrKGzC39KN_Y7a2/_buildManifest.js" defer=""></script><script src="/_next/static/DXrd-otrKGzC39KN_Y7a2/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changes","query":{},"buildId":"DXrd-otrKGzC39KN_Y7a2","runtimeConfig":{"sentryEnvironment":"beta"},"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/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/56f2a6684a524374.css" as="style"/><link rel="stylesheet" href="/_next/static/css/56f2a6684a524374.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.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/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/56f2a6684a524374.css" as="style"/><link rel="stylesheet" href="/_next/static/css/56f2a6684a524374.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-fb7168af0646d15b.js" defer=""></script><script src="/_next/static/chunks/59b4e022-ef680789f7cc9b11.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/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/66-d9d3bcb5d041cb6d.js" defer=""></script><script src="/_next/static/chunks/183-4ea255b867ff171b.js" defer=""></script><script src="/_next/static/chunks/344-b64f09e670634ed1.js" defer=""></script><script src="/_next/static/chunks/256-07f768a2b19b0a0e.js" defer=""></script><script src="/_next/static/chunks/422-c9192a1dbdd2ae0e.js" defer=""></script><script src="/_next/static/chunks/882-48d61b2fabee28d8.js" defer=""></script><script src="/_next/static/chunks/647-aa094286bc248d52.js" defer=""></script><script src="/_next/static/chunks/630-2bf927bca082a191.js" defer=""></script><script src="/_next/static/chunks/633-f3f030e76fa70a4d.js" defer=""></script><script src="/_next/static/chunks/489-32281540712d98bb.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types/%5BcustomTypeId%5D-6d613b67e6967ae5.js" defer=""></script><script src="/_next/static/DXrd-otrKGzC39KN_Y7a2/_buildManifest.js" defer=""></script><script src="/_next/static/DXrd-otrKGzC39KN_Y7a2/_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":"DXrd-otrKGzC39KN_Y7a2","runtimeConfig":{"sentryEnvironment":"beta"},"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/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.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-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.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/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.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-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-fb7168af0646d15b.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/647-aa094286bc248d52.js" defer=""></script><script src="/_next/static/chunks/248-84a5987f0499b074.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types-5acd56959b60346f.js" defer=""></script><script src="/_next/static/DXrd-otrKGzC39KN_Y7a2/_buildManifest.js" defer=""></script><script src="/_next/static/DXrd-otrKGzC39KN_Y7a2/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/custom-types","query":{},"buildId":"DXrd-otrKGzC39KN_Y7a2","runtimeConfig":{"sentryEnvironment":"beta"},"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/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.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-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.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/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.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-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-fb7168af0646d15b.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/647-aa094286bc248d52.js" defer=""></script><script src="/_next/static/chunks/248-84a5987f0499b074.js" defer=""></script><script src="/_next/static/chunks/pages/index-0d8cb369de720a35.js" defer=""></script><script src="/_next/static/DXrd-otrKGzC39KN_Y7a2/_buildManifest.js" defer=""></script><script src="/_next/static/DXrd-otrKGzC39KN_Y7a2/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"DXrd-otrKGzC39KN_Y7a2","runtimeConfig":{"sentryEnvironment":"beta"},"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/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.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/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-fb7168af0646d15b.js" defer=""></script><script src="/_next/static/chunks/pages/labs-56fd818a63553497.js" defer=""></script><script src="/_next/static/DXrd-otrKGzC39KN_Y7a2/_buildManifest.js" defer=""></script><script src="/_next/static/DXrd-otrKGzC39KN_Y7a2/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/labs","query":{},"buildId":"DXrd-otrKGzC39KN_Y7a2","runtimeConfig":{"sentryEnvironment":"beta"},"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/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/56f2a6684a524374.css" as="style"/><link rel="stylesheet" href="/_next/static/css/56f2a6684a524374.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.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/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/56f2a6684a524374.css" as="style"/><link rel="stylesheet" href="/_next/static/css/56f2a6684a524374.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-fb7168af0646d15b.js" defer=""></script><script src="/_next/static/chunks/59b4e022-ef680789f7cc9b11.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/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/66-d9d3bcb5d041cb6d.js" defer=""></script><script src="/_next/static/chunks/183-4ea255b867ff171b.js" defer=""></script><script src="/_next/static/chunks/344-b64f09e670634ed1.js" defer=""></script><script src="/_next/static/chunks/256-07f768a2b19b0a0e.js" defer=""></script><script src="/_next/static/chunks/422-c9192a1dbdd2ae0e.js" defer=""></script><script src="/_next/static/chunks/882-48d61b2fabee28d8.js" defer=""></script><script src="/_next/static/chunks/647-aa094286bc248d52.js" defer=""></script><script src="/_next/static/chunks/630-2bf927bca082a191.js" defer=""></script><script src="/_next/static/chunks/633-f3f030e76fa70a4d.js" defer=""></script><script src="/_next/static/chunks/489-32281540712d98bb.js" defer=""></script><script src="/_next/static/chunks/pages/page-types/%5BpageTypeId%5D-40207b66190e3fcd.js" defer=""></script><script src="/_next/static/DXrd-otrKGzC39KN_Y7a2/_buildManifest.js" defer=""></script><script src="/_next/static/DXrd-otrKGzC39KN_Y7a2/_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":"DXrd-otrKGzC39KN_Y7a2","runtimeConfig":{"sentryEnvironment":"beta"},"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/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.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/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-fb7168af0646d15b.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/429-aab52070cad2884b.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D/simulator-faeb6d2f77d97096.js" defer=""></script><script src="/_next/static/DXrd-otrKGzC39KN_Y7a2/_buildManifest.js" defer=""></script><script src="/_next/static/DXrd-otrKGzC39KN_Y7a2/_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":"DXrd-otrKGzC39KN_Y7a2","runtimeConfig":{"sentryEnvironment":"beta"},"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/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/e8e03c0d4003d1eb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/e8e03c0d4003d1eb.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.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/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/e8e03c0d4003d1eb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/e8e03c0d4003d1eb.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-fb7168af0646d15b.js" defer=""></script><script src="/_next/static/chunks/59b4e022-ef680789f7cc9b11.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/52d4c156-89c6ec6efca0a0bb.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/66-d9d3bcb5d041cb6d.js" defer=""></script><script src="/_next/static/chunks/183-4ea255b867ff171b.js" defer=""></script><script src="/_next/static/chunks/344-b64f09e670634ed1.js" defer=""></script><script src="/_next/static/chunks/256-07f768a2b19b0a0e.js" defer=""></script><script src="/_next/static/chunks/444-d39213143f782fec.js" defer=""></script><script src="/_next/static/chunks/484-3e011e79c41f0342.js" defer=""></script><script src="/_next/static/chunks/882-48d61b2fabee28d8.js" defer=""></script><script src="/_next/static/chunks/630-2bf927bca082a191.js" defer=""></script><script src="/_next/static/chunks/593-7ffd1197c3405ef8.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D-22ffa2561ac66557.js" defer=""></script><script src="/_next/static/DXrd-otrKGzC39KN_Y7a2/_buildManifest.js" defer=""></script><script src="/_next/static/DXrd-otrKGzC39KN_Y7a2/_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":"DXrd-otrKGzC39KN_Y7a2","runtimeConfig":{"sentryEnvironment":"beta"},"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/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/efa5152b7c0f35c0.css" as="style"/><link rel="stylesheet" href="/_next/static/css/efa5152b7c0f35c0.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.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/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/efa5152b7c0f35c0.css" as="style"/><link rel="stylesheet" href="/_next/static/css/efa5152b7c0f35c0.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-fb7168af0646d15b.js" defer=""></script><script src="/_next/static/chunks/59b4e022-ef680789f7cc9b11.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/52d4c156-89c6ec6efca0a0bb.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/66-d9d3bcb5d041cb6d.js" defer=""></script><script src="/_next/static/chunks/344-b64f09e670634ed1.js" defer=""></script><script src="/_next/static/chunks/444-d39213143f782fec.js" defer=""></script><script src="/_next/static/chunks/882-48d61b2fabee28d8.js" defer=""></script><script src="/_next/static/chunks/633-f3f030e76fa70a4d.js" defer=""></script><script src="/_next/static/chunks/593-7ffd1197c3405ef8.js" defer=""></script><script src="/_next/static/chunks/pages/slices-ec56b94b35794675.js" defer=""></script><script src="/_next/static/DXrd-otrKGzC39KN_Y7a2/_buildManifest.js" defer=""></script><script src="/_next/static/DXrd-otrKGzC39KN_Y7a2/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices","query":{},"buildId":"DXrd-otrKGzC39KN_Y7a2","runtimeConfig":{"sentryEnvironment":"beta"},"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.20.
|
|
3
|
+
"version": "2.20.3-beta.1",
|
|
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.26.
|
|
39
|
-
"start-slicemachine": "0.12.
|
|
38
|
+
"@slicemachine/manager": "0.26.3-beta.1",
|
|
39
|
+
"start-slicemachine": "0.12.68-beta.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@emotion/react": "11.11.1",
|
|
@@ -133,5 +133,6 @@
|
|
|
133
133
|
"vitest": "0.32.0",
|
|
134
134
|
"yup": "0.32.11",
|
|
135
135
|
"zod": "3.23.8"
|
|
136
|
-
}
|
|
136
|
+
},
|
|
137
|
+
"stableVersion": "2.20.2"
|
|
137
138
|
}
|
|
@@ -80,7 +80,7 @@ export function CreateSliceFromImageModal(
|
|
|
80
80
|
["meta+v", "ctrl+v"],
|
|
81
81
|
(event) => {
|
|
82
82
|
event.preventDefault();
|
|
83
|
-
void onPaste();
|
|
83
|
+
void onPaste({ isShortcut: true });
|
|
84
84
|
},
|
|
85
85
|
{ enabled: open && isFigmaEnabled },
|
|
86
86
|
);
|
|
@@ -205,6 +205,8 @@ export function CreateSliceFromImageModal(
|
|
|
205
205
|
});
|
|
206
206
|
|
|
207
207
|
try {
|
|
208
|
+
void telemetry.track({ event: "slice-generation:started", source });
|
|
209
|
+
|
|
208
210
|
const inferResult = await managerClient.customTypes.inferSlice({
|
|
209
211
|
source,
|
|
210
212
|
libraryID,
|
|
@@ -268,6 +270,8 @@ export function CreateSliceFromImageModal(
|
|
|
268
270
|
: { mode: "ai", langSmithUrl: inferResult.langSmithUrl }),
|
|
269
271
|
});
|
|
270
272
|
|
|
273
|
+
void telemetry.track({ event: "slice-generation:ended", error: false });
|
|
274
|
+
|
|
271
275
|
addAiFeedback({
|
|
272
276
|
type: "model",
|
|
273
277
|
library: libraryID,
|
|
@@ -292,6 +296,8 @@ export function CreateSliceFromImageModal(
|
|
|
292
296
|
},
|
|
293
297
|
}),
|
|
294
298
|
});
|
|
299
|
+
|
|
300
|
+
void telemetry.track({ event: "slice-generation:ended", error: true });
|
|
295
301
|
}
|
|
296
302
|
};
|
|
297
303
|
|
|
@@ -370,7 +376,9 @@ export function CreateSliceFromImageModal(
|
|
|
370
376
|
}
|
|
371
377
|
};
|
|
372
378
|
|
|
373
|
-
const onPaste = async () => {
|
|
379
|
+
const onPaste = async (args?: { isShortcut?: boolean }) => {
|
|
380
|
+
const { isShortcut = false } = args ?? {};
|
|
381
|
+
|
|
374
382
|
if (
|
|
375
383
|
!open ||
|
|
376
384
|
!isFigmaEnabled ||
|
|
@@ -483,6 +491,11 @@ export function CreateSliceFromImageModal(
|
|
|
483
491
|
// Start uploading the new image
|
|
484
492
|
void uploadImage({ index: newIndex, image, source: "figma" });
|
|
485
493
|
|
|
494
|
+
void telemetry.track({
|
|
495
|
+
event: "slice-generation:pasted-from-figma",
|
|
496
|
+
source: isShortcut ? "shortcut" : "button",
|
|
497
|
+
});
|
|
498
|
+
|
|
486
499
|
toast.success(`Pasted ${imageName}${success ? " from Figma" : ""}`);
|
|
487
500
|
} catch (error) {
|
|
488
501
|
console.error("Failed to paste from clipboard:", error);
|
|
@@ -562,12 +575,15 @@ export function CreateSliceFromImageModal(
|
|
|
562
575
|
<Button
|
|
563
576
|
endIcon="arrowForward"
|
|
564
577
|
color="indigo"
|
|
565
|
-
onClick={() =>
|
|
578
|
+
onClick={() => {
|
|
566
579
|
window.open(
|
|
567
580
|
"https://www.figma.com/community/plugin/1567955296461153730/figma-to-slice",
|
|
568
581
|
"_blank",
|
|
569
|
-
)
|
|
570
|
-
|
|
582
|
+
);
|
|
583
|
+
void telemetry.track({
|
|
584
|
+
event: "slice-generation:plugin-installation-clicked",
|
|
585
|
+
});
|
|
586
|
+
}}
|
|
571
587
|
sx={{ marginRight: 8 }}
|
|
572
588
|
invisible
|
|
573
589
|
>
|
|
@@ -582,14 +598,14 @@ export function CreateSliceFromImageModal(
|
|
|
582
598
|
overlay={
|
|
583
599
|
<UploadBlankSlate
|
|
584
600
|
onFilesSelected={onImagesSelected}
|
|
585
|
-
onPaste={
|
|
601
|
+
onPaste={onPaste}
|
|
586
602
|
droppingFiles
|
|
587
603
|
/>
|
|
588
604
|
}
|
|
589
605
|
>
|
|
590
606
|
<UploadBlankSlate
|
|
591
607
|
onFilesSelected={onImagesSelected}
|
|
592
|
-
onPaste={
|
|
608
|
+
onPaste={onPaste}
|
|
593
609
|
/>
|
|
594
610
|
</FileDropZone>
|
|
595
611
|
</Box>
|
|
@@ -723,7 +739,7 @@ export function CreateSliceFromImageModal(
|
|
|
723
739
|
function UploadBlankSlate(props: {
|
|
724
740
|
droppingFiles?: boolean;
|
|
725
741
|
onFilesSelected: (files: File[]) => void;
|
|
726
|
-
onPaste: () => void
|
|
742
|
+
onPaste: () => void | Promise<void>;
|
|
727
743
|
}) {
|
|
728
744
|
const { droppingFiles = false, onFilesSelected, onPaste } = props;
|
|
729
745
|
const isFigmaEnabled = useIsFigmaEnabled();
|
|
@@ -777,7 +793,7 @@ function UploadBlankSlate(props: {
|
|
|
777
793
|
size="small"
|
|
778
794
|
renderStartIcon={() => <FigmaIcon height={16} />}
|
|
779
795
|
color="grey"
|
|
780
|
-
onClick={onPaste}
|
|
796
|
+
onClick={() => void onPaste()}
|
|
781
797
|
>
|
|
782
798
|
Paste from Figma
|
|
783
799
|
</Button>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[633],{21446:function(e,a,t){t.d(a,{S:function(){return C}});var i=t(52322),r=t(74217),n=t(11699),l=t(5632),s=t(2784),o=t(76473),c=t(88932),d=t(30195),u=t(94160),m=t(34166),g=t(98250),p=t(68968),h=t(96317);let f=(0,s.forwardRef)((e,a)=>{let{width:t,height:r}=e;return void 0===t&&void 0===r&&(t=10,r=16),(0,i.jsxs)("svg",{ref:a,viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",height:r,width:t,children:[(0,i.jsx)("path",{d:"M5 7.83323C5 6.45253 6.11928 5.33325 7.49997 5.33325C8.8807 5.33325 10 6.45255 10 7.83328V8.16656C10 9.54728 8.8807 10.6666 7.49997 10.6666C6.11928 10.6666 5 9.54731 5 8.16661V7.83323Z",fill:"#1ABCFE"}),(0,i.jsx)("path",{d:"M0 13.3334C0 11.8607 1.19391 10.6667 2.66667 10.6667H5V13.5001C5 14.8808 3.88071 16.0001 2.5 16.0001C1.11929 16.0001 0 14.8808 0 13.5001L0 13.3334Z",fill:"#0ACF83"}),(0,i.jsx)("path",{d:"M5 0V5.33333H7.33333C8.80609 5.33333 10 4.13943 10 2.66667C10 1.19391 8.80609 0 7.33333 0L5 0Z",fill:"#FF7262"}),(0,i.jsx)("path",{d:"M0 2.66659C0 4.13934 1.19391 5.33325 2.66667 5.33325L5 5.33325L5 -8.15392e-05L2.66667 -8.15392e-05C1.19391 -8.15392e-05 0 1.19383 0 2.66659Z",fill:"#F24E1E"}),(0,i.jsx)("path",{d:"M0 8.00008C0 9.47284 1.19391 10.6667 2.66667 10.6667H5L5 5.33341L2.66667 5.33341C1.19391 5.33341 0 6.52732 0 8.00008Z",fill:"#A259FF"})]})});var x=t(80148),y=t(54597),j=t(62434),b=t(56141);function w(e){let a;let{slice:t}=e,r="uploading"===t.status||"generating"===t.status,l="uploadError"===t.status||"generateError"===t.status||"cancelled"===t.status,s="pending"===t.status||"generateError"===t.status||"generating"===t.status||"success"===t.status||"cancelled"===t.status;return l?a=(0,i.jsx)(n.E,{startIcon:"refresh",color:"grey",onClick:t.onRetry,children:"Retry"}):"figma"===t.source&&(a=(0,i.jsx)(n.c3,{content:"Pasted from Figma",children:(0,i.jsx)(b.S,{})})),(0,i.jsxs)(j.Zb,{disabled:r,children:[s?(0,i.jsx)(j.ZB,{src:t.thumbnailUrl}):(0,i.jsx)(j.ZB,{component:"div"}),(0,i.jsx)(j.eW,{loading:r,startIcon:function(e){switch(e){case"uploadError":case"generateError":case"cancelled":return"close";case"pending":return"image";case"success":return"check";default:return}}(t.status),title:"success"===t.status?t.model.name:"figma"===t.source?t.image.name.split(".")[0]:t.image.name,subtitle:function(e){switch(e.status){case"uploading":return"Uploading...";case"pending":var a;return(a=e.image.size)<1024?"".concat(a," B"):a<1048576?"".concat((a/1024).toFixed(1)," kB"):"".concat((a/1048576).toFixed(1)," MB");case"uploadError":return"Unable to upload image";case"generating":return"Generating...";case"generateError":return"Something went wrong";case"cancelled":return"Cancelled";case"success":return"Generated"}}(t),error:l,action:a})]})}let v=d.z.object({__type:d.z.literal("figma-to-prismic/clipboard-data"),name:d.z.string(),image:d.z.string().startsWith("data:image/")});function C(e){let{open:a,location:t,onSuccess:d,onClose:h}=e,j=(0,l.useRouter)(),[b,C]=(0,s.useState)([]),[L,A]=(0,s.useState)(!1),[E,D]=(0,s.useState)(!1),{syncChanges:U}=(0,p.g)(),{createSliceSuccess:z}=(0,y.Z)(),{completeStep:N}=(0,g.k)(),B=function(e){let{open:a}=e,t=(0,s.useRef)([]);return(0,s.useEffect)(()=>{a&&(t.current=[],x.managerClient.slices.readAllSlices().then(e=>{t.current=e.models.map(e=>{let{model:a}=e;return a})}).catch(()=>null))},[a]),t}({open:a}),R=k(),{libraryID:P,isLoading:M}=function(){let[e,a]=(0,s.useState)();return(0,s.useEffect)(()=>{x.managerClient.project.getSliceMachineConfig().then(e=>{var t;let i=null==e?void 0:null===(t=e.libraries)||void 0===t?void 0:t[0];if(void 0===i)throw Error("No library found in the config.");a(i)}).catch(()=>{throw Error("Could not get library ID from the config.")})},[]),{libraryID:e,isLoading:void 0===e}}(),Z=(0,r.R9)(q),G=(0,s.useRef)(crypto.randomUUID());(0,o.y1)(["meta+v","ctrl+v"],e=>{e.preventDefault(),X()},{enabled:a&&R}),(0,s.useEffect)(()=>{if(!b.some(e=>"generating"===e.status))return;let e=e=>{Z();let a="Your current generating slices will be cancelled.";return e.returnValue=a,a};return j.events.on("routeChangeStart",Z),window.addEventListener("beforeunload",e),()=>{j.events.off("routeChangeStart",Z),window.removeEventListener("beforeunload",e)}},[b,j.events,Z]);let T=e=>{let{index:a,slice:t}=e;C(e=>e.map((e,i)=>i===a?t(e):e))},_=e=>{if(W)return;if(e.length>10){c.Am.error("You can only upload ".concat(10," images at a time."));return}let a=b.length;C(a=>[...a,...e.map(e=>({source:"upload",status:"uploading",image:e}))]),e.forEach((e,t)=>{V({index:a+t,image:e,source:"upload"})})},V=async e=>{let{index:a,image:t,source:i}=e,r=G.current;T({index:a,slice:e=>({...e,status:"uploading",image:t,source:i})});try{let e=await F({image:t});if(r!==G.current)return;T({index:a,slice:a=>({...a,status:"pending",thumbnailUrl:e})})}catch(e){if(r!==G.current)return;T({index:a,slice:e=>({...e,status:"uploadError",onRetry:()=>void V({index:a,image:t,source:i})})})}},O=async e=>{if(void 0===P)return;let{index:a,imageUrl:i,source:r}=e,n=G.current,l=crypto.randomUUID();T({index:a,slice:e=>({...e,status:"generating",thumbnailUrl:i,requestId:l})});try{let e=await x.managerClient.customTypes.inferSlice({source:r,libraryID:P,imageUrl:i,requestId:l});if(n!==G.current)return;let s=function(e){let{existingSlices:a,newSlices:t,slice:i}=e,r=new Set,n=new Set;for(let{id:e,name:t}of a)r.add(e),n.add(t.toLowerCase());for(let e of t)"success"===e.status&&(r.add(e.model.id),n.add(e.model.name.toLowerCase()));let l=i.id,s=2;for(;r.has(l);)l="".concat(i.id,"_").concat(s),s++;let o=i.name;for(s=2;n.has(o.toLowerCase());)o="".concat(i.name).concat(s),s++;return{...i,id:l,name:o}}({existingSlices:B.current,newSlices:b,slice:e.slice});if(C(t=>t.map((t,r)=>r!==a?t:{...t,status:"success",thumbnailUrl:i,model:s,langSmithUrl:e.langSmithUrl})),"upload"===r){n=G.current;let e=b[a],{errors:t}=await x.managerClient.slices.createSlice({libraryID:P,model:s});if(t.length)throw Error("Failed to create slice ".concat(s.id,"."));if(await x.managerClient.slices.updateSliceScreenshot({libraryID:P,sliceID:s.id,variationID:s.variations[0].id,data:e.image}),n!==G.current)return}N("createSlice"),u.Xe.track({event:"slice:created",id:s.id,name:s.name,library:P,location:t,..."figma"===r?{mode:"figma-to-slice"}:{mode:"ai",langSmithUrl:e.langSmithUrl}}),(0,m.nZ)({type:"model",library:P,sliceId:s.id,variationId:s.variations[0].id,langSmithUrl:e.langSmithUrl})}catch(e){if(n!==G.current)return;T({index:a,slice:t=>({...t,status:e instanceof Error&&"AbortError"===e.name?"cancelled":"generateError",thumbnailUrl:i,onRetry:()=>{O({index:a,imageUrl:i,source:r})}})})}},H=b.reduce((e,a)=>("generating"===a.status?e.generating++:"uploading"===a.status?e.uploading++:"pending"===a.status?e.pending++:"success"===a.status&&e.completed++,e.loading=e.generating+e.uploading,e.generate=e.loading+e.pending,e),{generating:0,uploading:0,pending:0,completed:0,loading:0,generate:0}),W=H.generating>0||H.completed>0,Y=()=>{H.loading>0||(h(),G.current=crypto.randomUUID(),setTimeout(()=>C([]),250))},J=async()=>{if(void 0!==P)try{A(!0);let e=await (0,u.y0)();z(e.libraries),U(),d({slices:b.flatMap(e=>"success"===e.status?e.model:[]),library:P}),Y()}finally{A(!1)}},X=async()=>{var e;if(!(!a||!R||b.some(e=>"figma"===e.source)||b.some(e=>"uploading"===e.status||"generating"===e.status))){if("function"!=typeof(null===(e=navigator.clipboard)||void 0===e?void 0:e.read)){c.Am.error("Clipboard paste is not supported in this browser.");return}try{let e=await navigator.clipboard.read();if(0===e.length){c.Am.error("No data found in clipboard.");return}let a="pasted-image.png",t=null,i=!1;for(let a of e){let e=a.types.find(e=>e.startsWith("image/"));if(void 0!==e){t=await a.getType(e);break}}for(let r of e)if(r.types.includes("text/plain"))try{let e=await r.getType("text/plain"),n=await e.text(),l=v.safeParse(JSON.parse(n));if(l.success){i=!0;let e=l.data;if(a="".concat(e.name,".png"),!t){let a=await fetch(e.image);t=await a.blob()}}else console.warn("Clipboard data validation failed:",l.error)}catch(e){console.warn("Failed to parse JSON from clipboard:",e)}if(!t){i?c.Am.error("Could not extract Figma data from clipboard. Please try copying again using the Prismic Figma plugin."):c.Am.error("No Figma data found in clipboard. Make sure you've copied a design using the Prismic Figma plugin.");return}let r=b.length;if(r>=10){c.Am.error("You can only upload ".concat(10," images at a time."));return}let n=new File([t],a,{type:t.type});C(e=>[...e,{source:"figma",status:"uploading",image:n}]),V({index:r,image:n,source:"figma"}),c.Am.success("Pasted ".concat(a).concat(i?" from Figma":""))}catch(e){console.error("Failed to paste from clipboard:",e),c.Am.error("Failed to paste from clipboard. Please check browser permissions and try again.")}}};function q(){let e=b.flatMap(e=>"generating"===e.status?[e.requestId]:[]);0!==e.length&&e.forEach(e=>{x.managerClient.customTypes.cancelInferSlice({requestId:e})})}return(0,i.jsxs)(n.ae,{open:a,onOpenChange:e=>!e&&Y(),children:[(0,i.jsx)(n.al,{title:"Generate slices with AI"}),(0,i.jsxs)(n.aj,{gap:0,children:[(0,i.jsx)(n.ak,{hidden:!0,children:"Upload images to generate slices with AI"}),M?(0,i.jsx)(n.D,{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",children:(0,i.jsx)(n.bg,{color:"purple9"})}):(0,i.jsxs)(i.Fragment,{children:[0===b.length?(0,i.jsxs)(n.D,{padding:16,height:"100%",gap:16,display:"flex",flexDirection:"column",children:[R&&(0,i.jsxs)(n.D,{display:"flex",gap:16,alignItems:"center",backgroundColor:"grey2",padding:16,borderRadius:12,children:[(0,i.jsxs)(n.D,{display:"flex",gap:8,alignItems:"center",flexGrow:1,children:[(0,i.jsx)(n.D,{width:48,height:48,backgroundColor:"grey12",borderRadius:"100%",display:"flex",alignItems:"center",justifyContent:"center",children:(0,i.jsx)(f,{height:25})}),(0,i.jsxs)(n.D,{display:"flex",flexDirection:"column",flexGrow:1,children:[(0,i.jsx)(n.bL,{variant:"bold",children:"Want to work faster?"}),(0,i.jsx)(n.bL,{variant:"small",color:"grey11",children:"Copy frames from Figma with the Slice Machine plugin and paste them here."})]})]}),(0,i.jsx)(n.E,{endIcon:"arrowForward",color:"indigo",onClick:()=>window.open("https://www.figma.com/community/plugin/1567955296461153730/figma-to-slice","_blank"),sx:{marginRight:8},invisible:!0,children:"Install plugin"})]}),(0,i.jsx)(n.aF,{onFilesSelected:_,assetType:"image",maxFiles:10,overlay:(0,i.jsx)(S,{onFilesSelected:_,onPaste:()=>void X(),droppingFiles:!0}),children:(0,i.jsx)(S,{onFilesSelected:_,onPaste:()=>void X()})})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.D,{display:"flex",alignItems:"center",justifyContent:"space-between",padding:16,children:[(0,i.jsx)(n.bL,{variant:"h3",children:"Design"}),(0,i.jsx)(n.aG,{size:"medium",color:"grey",onFilesSelected:_,startIcon:"attachFile",disabled:W,children:"Add images"})]}),(0,i.jsx)(n.bn,{stableScrollbar:!1,children:(0,i.jsx)(n.D,{display:"grid",gridTemplateColumns:"1fr 1fr",gap:16,padding:16,children:b.map((e,a)=>(0,i.jsx)(w,{slice:e},"slice-".concat(a)))})})]}),(0,i.jsxs)(n.ah,{children:[H.generating>0?(0,i.jsx)(n.ai,{onClick:()=>D(!0),size:"medium",sx:{marginRight:8},invisible:!0,children:"Cancel"}):(0,i.jsx)(n.ai,{onClick:()=>Y(),size:"medium",sx:{marginRight:8},invisible:!0,children:"Close"}),0===H.completed||H.loading>0?(0,i.jsxs)(n.af,{color:"purple",startIcon:"autoFixHigh",onClick:()=>{void 0!==P&&b.forEach((e,a)=>{"pending"===e.status&&O({index:a,imageUrl:e.thumbnailUrl,source:e.source})})},disabled:W||H.loading>0||0===H.pending,loading:H.loading>0,size:"medium",children:["Generate ",H.generate>0?"(".concat(H.generate,") "):"",1===H.generate?"Slice":"Slices"]}):(0,i.jsx)(n.af,{color:"purple",onClick:()=>void J(),loading:L,size:"medium",children:I(t,H.completed)})]})]})]}),(0,i.jsxs)(n.ae,{size:"small",open:E,onOpenChange:D,children:[(0,i.jsx)(n.al,{title:"Cancel generation"}),(0,i.jsxs)(n.aj,{children:[(0,i.jsx)(n.ak,{children:(0,i.jsx)(n.D,{display:"flex",flexDirection:"column",padding:{inline:16},children:(0,i.jsx)(n.bL,{variant:"bold",children:"Are you sure you want to cancel the generation for all slices?"})})}),(0,i.jsxs)(n.ah,{children:[(0,i.jsx)(n.ai,{onClick:()=>D(!1),size:"small",children:"Keep generating"}),(0,i.jsx)(n.af,{color:"tomato",onClick:()=>{D(!1),q()},size:"small",children:"Confirm"})]})]})]})]})}function S(e){let{droppingFiles:a=!1,onFilesSelected:t,onPaste:r}=e,l=k();return(0,i.jsx)(n.D,{justifyContent:"center",flexDirection:"column",height:"100%",backgroundColor:a?"purple2":"grey2",border:!0,borderStyle:"dashed",borderColor:a?"purple9":"grey6",borderRadius:12,flexGrow:1,children:(0,i.jsx)(n.s,{children:(0,i.jsxs)(n.D,{display:"flex",flexDirection:"column",gap:16,alignItems:"center",children:[(0,i.jsx)(n.x,{lineColor:"purple11",backgroundColor:"purple5",name:"cloudUpload",size:"large"}),(0,i.jsx)(n.D,{display:"flex",flexDirection:"column",gap:4,alignItems:"center",children:l?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.bL,{children:"Generate slices from your designs"}),(0,i.jsx)(n.bL,{variant:"small",color:"grey11",children:"Upload your design images or paste them directly from Figma."})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.bL,{children:"Upload your design images."}),(0,i.jsx)(n.bL,{variant:"small",color:"grey11",children:"Once uploaded, you can generate slices automatically using AI."})]})}),(0,i.jsx)(n.D,{display:"flex",alignItems:"center",gap:16,children:l?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.E,{size:"small",renderStartIcon:()=>(0,i.jsx)(f,{height:16}),color:"grey",onClick:r,children:"Paste from Figma"}),(0,i.jsx)(n.aG,{size:"small",onFilesSelected:t,color:"purple",invisible:!0,children:"Add images"})]}):(0,i.jsx)(n.aG,{startIcon:"attachFile",onFilesSelected:t,color:"grey",children:"Add images"})})]})})})}async function F(e){let{image:a}=e,t=[await x.managerClient.project.getResolvedRepositoryName(),"shared-slices","prismic-inferred-slices",crypto.randomUUID()].join("/");await x.managerClient.screenshots.initS3ACL();let{url:i}=await x.managerClient.screenshots.uploadScreenshot({keyPrefix:t,data:a});return i}let I=(e,a)=>{switch(e){case"custom_type":return"Add to type (".concat(a,")");case"page_type":return"Add to page (".concat(a,")");case"slices":return"Done"}};function k(){let e=(0,h.L)("llm-proxy-access");return(null==e?void 0:e.value)==="on"}},27213:function(e,a,t){t.d(a,{F:function(){return n}});var i=t(52322),r=t(11699);let n=e=>{let{menuType:a}=e;return{fromImage:{BackgroundIcon:(0,i.jsx)(r.B,{name:"autoFixHigh",size:"ActionList"===a?"small":"extraSmall",iconSize:"ActionList"===a?"medium":"small",color:"purple",variant:"solid",radius:6}),title:"Generate from image",description:"Build a slice based on your design image."},fromScratch:{BackgroundIcon:(0,i.jsx)(r.B,{name:"add",size:"ActionList"===a?"small":"extraSmall",iconSize:"ActionList"===a?"medium":"small",color:"white",variant:"solid",radius:6}),title:"Start from scratch",description:"Build a custom slice your way."},fromTemplate:{BackgroundIcon:(0,i.jsx)(r.B,{name:"contentCopy",size:"ActionList"===a?"small":"extraSmall",iconSize:"ActionList"===a?"medium":"small",color:"white",variant:"solid",radius:6}),title:"Use a template",description:"Choose from ready-made examples."},fromExisting:{BackgroundIcon:(0,i.jsx)(r.B,{name:"folder",size:"ActionList"===a?"small":"extraSmall",iconSize:"ActionList"===a?"medium":"small",color:"white",variant:"solid",radius:6}),title:"Reuse an existing slice",description:"Select from your created slices."}}}},6256:function(e,a,t){t.d(a,{c:function(){return j}});var i=t(52322),r=t(2784),n=t(36131),l=t(75289),s=t(94160),o=t(98250),c=t(88932),d=t(63908),u=t(358),m=t(80148);async function g(e){let{sliceName:a,libraryName:t,location:i,onSuccess:r}=e;try{let e=(0,d.fo)(a),{errors:n}=await m.managerClient.slices.createSlice({libraryID:t,model:e});if(n.length>0)throw n;s.Xe.track({event:"slice:created",id:(0,u.MP)(a),name:a,library:t,location:i,mode:"manual"}),await r(e)}catch(t){let e="An unexpected error happened while creating slice ".concat(a,".");console.error(e,t),c.Am.error(e)}}var p=t(68968),h=t(59532),f=t(54597),x=t(46999),y=t(63019);let j=e=>{let{onClose:a,onSuccess:t,localLibraries:c,location:d,remoteSlices:u}=e,{createSliceSuccess:m}=(0,f.Z)(),[j,b]=(0,r.useState)(!1),{syncChanges:w}=(0,p.g)(),{completeStep:v}=(0,o.k)(),C=async e=>{let a=e.sliceName,i=e.from;b(!0),await g({sliceName:a,libraryName:i,location:d,onSuccess:async e=>{m((await (0,s.y0)()).libraries),t(e,i),w(),v("createSlice")}})};return(0,i.jsx)(h.Z,{testId:"create-slice-modal",isOpen:!0,widthInPx:"530px",isLoading:j,formId:"create-new-slice",close:a,buttonLabel:"Create",onSubmit:e=>{C(e)},initialValues:{sliceName:"",from:c[0].name},validate:e=>(0,y.h)(e,c,u),content:{title:"Create a new slice"},children:e=>{let{touched:a,values:t,setFieldValue:r,errors:s}=e;return(0,i.jsxs)(l.xu,{children:[(0,i.jsx)(x.W,{name:"sliceName",label:"Slice name",placeholder:"Pascalised slice API ID (e.g. TextBlock)",error:a.sliceName?s.sliceName:void 0,testId:"slice-name-input"}),(0,i.jsx)(l.__,{htmlFor:"from",sx:{mb:2},children:"Target Library"}),(0,i.jsx)(n.ZP,{name:"from",options:c.map(e=>({value:e.name,label:e.name})),onChange:e=>e?void r("from",e.value):null,defaultValue:{value:t.from,label:t.from},styles:{option:e=>({...e,color:"#161618"})},theme:e=>({...e,colors:{...e.colors,primary:"#E9E8EA"}}),menuPortalTarget:document.body})]})}})}},63019:function(e,a,t){t.d(a,{h:function(){return o}});var i=t(96009),r=t.n(i),n=t(74600),l=t.n(n),s=t(7974);function o(e,a,t){let{sliceName:i}=e;return i?s.lS.includes(i.toLowerCase())?{sliceName:'Name "'.concat(i,'" is reserved for Slice Machine use.')}:s.xo.exec(i)?l()(r()(i)).replace(/\s/gm,"")!==i.trim()?{sliceName:"Value has to be PascalCased."}:i.match(/^\d/)?{sliceName:"Value cannot start with a number."}:[...a.flatMap(e=>e.components.map(e=>e.model.name)),...t.map(e=>e.name)].includes(i)?{sliceName:"Slice name is already taken."}:void 0:{sliceName:"No special characters allowed."}:{sliceName:"Cannot be empty"}}},21151:function(e,a,t){var i=t(52322),r=t(75289);a.Z=function(e){let{elems:a,renderElem:t,defineElementKey:n,gridTemplateMinPx:l="320px",gridGap:s="16px",sx:o}=e;return(0,i.jsx)(r.xu,{as:"section",sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(".concat(l,", 1fr))"),gridGap:s,pt:2,...o},children:a.map((e,a)=>e?(0,i.jsx)("span",{children:t(e,a)},"".concat(n(e),"-").concat(a+1)):null)})}}}]);
|
|
File without changes
|