slice-machine-ui 1.19.2-dev-next-release.2 → 1.19.2-dev-next-release.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Simulator/components/IframeRenderer/index.tsx +0 -3
- package/components/Simulator/components/Toolbar/index.tsx +0 -42
- package/components/Simulator/index.tsx +0 -2
- package/lib/models/common/Screenshots.ts +1 -10
- package/out/404.html +1 -1
- package/out/_next/static/chunks/585-f3dca093db4b3792.js +10 -0
- package/out/_next/static/chunks/{80-4cd4c6f95d162ef7.js → 80-c513d12da6156fb7.js} +1 -1
- package/out/_next/static/chunks/{904-b2d5235c13e62ee8.js → 904-cfe9632d3f82e990.js} +1 -1
- package/out/_next/static/chunks/pages/{_app-ec1f14f2d3ddb69d.js → _app-37aead075684fb8d.js} +3 -3
- package/out/_next/static/chunks/pages/{changes-768c9cb6fef169d1.js → changes-cacc63c37e28fbbd.js} +1 -1
- package/out/_next/static/chunks/pages/{labs-395232bcec99d42a.js → labs-083545e0987b7886.js} +1 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-5e441f8b049cf91b.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/{[variation]-4dfda949290eb037.js → [variation]-3d4698bb55b09014.js} +1 -1
- package/out/_next/static/sVN8SG2Rfq9IshnbTCNsD/_buildManifest.js +1 -0
- 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 +4 -4
- package/src/apiClient.ts +1 -40
- package/src/modules/loading/types.ts +0 -1
- package/src/modules/screenshots/actions.ts +4 -25
- package/src/modules/screenshots/sagas.ts +1 -63
- package/src/modules/selectedSlice/actions.ts +1 -5
- package/src/modules/selectedSlice/reducer.ts +1 -5
- package/src/modules/slices/index.ts +1 -6
- package/src/modules/toaster/index.tsx +6 -22
- package/src/modules/useSliceMachineActions.ts +2 -25
- package/components/ScreenshotToaster/index.tsx +0 -53
- package/out/_next/static/DcicAqW9Z1wJ8X-Tue3N3/_buildManifest.js +0 -1
- package/out/_next/static/chunks/746-2ca4784811bde7c1.js +0 -8
- package/out/_next/static/chunks/770-c75d8245a822c5d9.js +0 -3
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/screenshot-76d40513025fd76d.js +0 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-39efc79412072ae1.js +0 -1
- package/out/slices/[lib]/[sliceName]/[variation]/screenshot.html +0 -1
- package/pages/slices/[lib]/[sliceName]/[variation]/screenshot.tsx +0 -61
- package/test/src/modules/screenshots/__fixtures__/mocks.json +0 -41
- package/test/src/modules/screenshots/__fixtures__/model.json +0 -35
- package/test/src/modules/screenshots/__testutils__/getSelectedSliceDummyData.ts +0 -29
- package/test/src/modules/screenshots/sagas.test.ts +0 -82
- /package/out/_next/static/{DcicAqW9Z1wJ8X-Tue3N3 → sVN8SG2Rfq9IshnbTCNsD}/_ssgManifest.js +0 -0
|
@@ -125,7 +125,6 @@ const IframeRenderer: React.FunctionComponent<IframeRendererProps> = ({
|
|
|
125
125
|
{/* eslint-disable-next-line @typescript-eslint/strict-boolean-expressions */}
|
|
126
126
|
{simulatorUrl ? (
|
|
127
127
|
<iframe
|
|
128
|
-
id="__iframe-renderer"
|
|
129
128
|
ref={iframeRef}
|
|
130
129
|
src={simulatorUrl}
|
|
131
130
|
style={{
|
|
@@ -141,8 +140,6 @@ const IframeRenderer: React.FunctionComponent<IframeRendererProps> = ({
|
|
|
141
140
|
}}
|
|
142
141
|
/>
|
|
143
142
|
) : null}
|
|
144
|
-
{/* eslint-disable-next-line @typescript-eslint/strict-boolean-expressions */}
|
|
145
|
-
{client?.connected ? <div id="__iframe-ready" /> : null}
|
|
146
143
|
</Flex>
|
|
147
144
|
);
|
|
148
145
|
};
|
|
@@ -11,20 +11,14 @@ import {
|
|
|
11
11
|
} from "./ScreensizeInput";
|
|
12
12
|
|
|
13
13
|
import { ScreenDimensions } from "@lib/models/common/Screenshots";
|
|
14
|
-
import { ComponentUI } from "@lib/models/common/ComponentUI";
|
|
15
|
-
import { VariationSM } from "@lib/models/common/Slice";
|
|
16
14
|
|
|
17
15
|
type ToolbarProps = {
|
|
18
|
-
slice: ComponentUI;
|
|
19
|
-
variation: VariationSM;
|
|
20
16
|
handleScreenSizeChange: (screenDimensions: ScreenDimensions) => void;
|
|
21
17
|
screenDimensions: ScreenDimensions;
|
|
22
18
|
actionsDisabled: boolean;
|
|
23
19
|
};
|
|
24
20
|
|
|
25
21
|
export const Toolbar: React.FC<ToolbarProps> = ({
|
|
26
|
-
slice: _slice,
|
|
27
|
-
variation: _variation,
|
|
28
22
|
handleScreenSizeChange,
|
|
29
23
|
screenDimensions,
|
|
30
24
|
actionsDisabled,
|
|
@@ -57,30 +51,6 @@ export const Toolbar: React.FC<ToolbarProps> = ({
|
|
|
57
51
|
handleScreenSizeChange(newScreenDimensions);
|
|
58
52
|
};
|
|
59
53
|
|
|
60
|
-
// TODO(DT-1534): Uncomment to enable Puppeteer screenshots or delete if we decide to remove Puppeteer
|
|
61
|
-
// const { generateSliceScreenshot } = useSliceMachineActions();
|
|
62
|
-
//
|
|
63
|
-
// const onTakingSliceScreenshot = () => {
|
|
64
|
-
// generateSliceScreenshot(
|
|
65
|
-
// variation.id,
|
|
66
|
-
// slice,
|
|
67
|
-
// {
|
|
68
|
-
// width: screenDimensions.width,
|
|
69
|
-
// height: screenDimensions.height,
|
|
70
|
-
// },
|
|
71
|
-
// "fromSimulator"
|
|
72
|
-
// );
|
|
73
|
-
// };
|
|
74
|
-
//
|
|
75
|
-
// const { isSavingScreenshot } = useSelector(
|
|
76
|
-
// (store: SliceMachineStoreType) => ({
|
|
77
|
-
// isSavingScreenshot: isLoading(
|
|
78
|
-
// store,
|
|
79
|
-
// LoadingKeysEnum.GENERATE_SLICE_SCREENSHOT
|
|
80
|
-
// ),
|
|
81
|
-
// })
|
|
82
|
-
// );
|
|
83
|
-
|
|
84
54
|
return (
|
|
85
55
|
<Flex
|
|
86
56
|
sx={{
|
|
@@ -129,18 +99,6 @@ export const Toolbar: React.FC<ToolbarProps> = ({
|
|
|
129
99
|
sx={{ ml: 2 }}
|
|
130
100
|
/>
|
|
131
101
|
</Flex>
|
|
132
|
-
{/*
|
|
133
|
-
// TODO(DT-1534): Uncomment to enable Puppeteer screenshots or delete if we decide to remove Puppeteer
|
|
134
|
-
<Button
|
|
135
|
-
onClick={onTakingSliceScreenshot}
|
|
136
|
-
label="Take a screenshot"
|
|
137
|
-
isLoading={isSavingScreenshot}
|
|
138
|
-
Icon={AiFillCamera}
|
|
139
|
-
iconSize={20}
|
|
140
|
-
iconFill="#6F6E77"
|
|
141
|
-
variant="secondaryMedium"
|
|
142
|
-
disabled={actionsDisabled}
|
|
143
|
-
/> */}
|
|
144
102
|
</Flex>
|
|
145
103
|
);
|
|
146
104
|
};
|
|
@@ -262,8 +262,6 @@ const Simulator: ComponentWithSliceProps = ({ slice, variation }) => {
|
|
|
262
262
|
}}
|
|
263
263
|
>
|
|
264
264
|
<Toolbar
|
|
265
|
-
slice={slice}
|
|
266
|
-
variation={variation}
|
|
267
265
|
handleScreenSizeChange={setScreenDimensions}
|
|
268
266
|
screenDimensions={screenDimensions}
|
|
269
267
|
actionsDisabled={currentState !== UiState.SUCCESS}
|
|
@@ -4,12 +4,6 @@ export interface ScreenDimensions {
|
|
|
4
4
|
width: number;
|
|
5
5
|
height: number;
|
|
6
6
|
}
|
|
7
|
-
export interface ScreenshotRequest {
|
|
8
|
-
libraryName: string;
|
|
9
|
-
sliceId: string;
|
|
10
|
-
variationId: string;
|
|
11
|
-
screenDimensions: ScreenDimensions;
|
|
12
|
-
}
|
|
13
7
|
export interface CustomScreenshotRequest {
|
|
14
8
|
libraryName: string;
|
|
15
9
|
sliceId: string;
|
|
@@ -41,7 +35,4 @@ export interface CustomScreenshotRequest {
|
|
|
41
35
|
variationId: string;
|
|
42
36
|
}
|
|
43
37
|
|
|
44
|
-
export type ScreenshotGenerationMethod =
|
|
45
|
-
| "fromSimulator"
|
|
46
|
-
| "upload"
|
|
47
|
-
| "dragAndDrop";
|
|
38
|
+
export type ScreenshotGenerationMethod = "upload" | "dragAndDrop";
|
package/out/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>Slice Machine</title><meta name="next-head-count" content="3"/><link rel="preload" href="/_next/static/css/66b3836ab88b0c5c.css" as="style"/><link rel="stylesheet" href="/_next/static/css/66b3836ab88b0c5c.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>Slice Machine</title><meta name="next-head-count" content="3"/><link rel="preload" href="/_next/static/css/66b3836ab88b0c5c.css" as="style"/><link rel="stylesheet" href="/_next/static/css/66b3836ab88b0c5c.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-37aead075684fb8d.js" defer=""></script><script src="/_next/static/chunks/pages/_error-69b4f498bafdd188.js" defer=""></script><script src="/_next/static/sVN8SG2Rfq9IshnbTCNsD/_buildManifest.js" defer=""></script><script src="/_next/static/sVN8SG2Rfq9IshnbTCNsD/_ssgManifest.js" defer=""></script></head><body><div id="__next"><style data-emotion="css-global 413pep">html{--theme-ui-colors-text:#25252D;--theme-ui-colors-textClear:#6F6E77;--theme-ui-colors-grayLight:#E8E8ED;--theme-ui-colors-hoverBackground:#f2f2f2;--theme-ui-colors-background:#FFF;--theme-ui-colors-backgroundClear:#FFF;--theme-ui-colors-primary:#5D40F7;--theme-ui-colors-purpleLight:#F6F1FC;--theme-ui-colors-purpleLight01:#6548FF1A;--theme-ui-colors-purple12:#F1EEFE;--theme-ui-colors-purpleStrong:#5842C3;--theme-ui-colors-whiteButtonText:#1A1523;--theme-ui-colors-codeBlockBackground:#32275F;--theme-ui-colors-failedConnectText:#86848D;--theme-ui-colors-changesWarning-background:#FFECC7;--theme-ui-colors-changesWarning-color:#5C0C17;--theme-ui-colors-greyIcon:#6F6E77;--theme-ui-colors-greyIconDisabled:#C9D0D8;--theme-ui-colors-missingScreenshotBanner-color:#5C0C17;--theme-ui-colors-missingScreenshotBanner-bg:#FFECC7;--theme-ui-colors-badge-new-bg:#DBEDDB;--theme-ui-colors-badge-new-color:#05644D;--theme-ui-colors-badge-modified-bg:#FFECC7;--theme-ui-colors-badge-modified-color:#5C0C17;--theme-ui-colors-badge-synced-bg:purple12;--theme-ui-colors-badge-synced-color:#5842C3;--theme-ui-colors-badge-deleted-bg:rgba(203, 36, 49, 0.1);--theme-ui-colors-badge-unknown-bg:#F3F5F7;--theme-ui-colors-badge-unknown-color:#9AA4AF;--theme-ui-colors-codeBlockBorder:#545454;--theme-ui-colors-secondary:#F9FAFB;--theme-ui-colors-danger:#CB2431;--theme-ui-colors-highlight:hsl(10, 40%, 90%);--theme-ui-colors-purple:#5B3DF5;--theme-ui-colors-purple08:#5842C3;--theme-ui-colors-muted:#F9F9FB;--theme-ui-colors-icons:#8091A5;--theme-ui-colors-gray:#F8F9FA;--theme-ui-colors-grey01:#F3F5F7;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-grey03:#F4F2F4;--theme-ui-colors-grey04:#9AA4AF;--theme-ui-colors-grey05:#667587;--theme-ui-colors-grey07:#F9F8F9;--theme-ui-colors-grey10:#86848D;--theme-ui-colors-grey12:#1A1523;--theme-ui-colors-greyTransparent:rgba(37, 37, 45, 0.4);--theme-ui-colors-borders:#E4E2E4;--theme-ui-colors-bordersFocused:#6E56CF;--theme-ui-colors-deep:#0E2150;--theme-ui-colors-deep1:#A0ADE7;--theme-ui-colors-lightGreen:#EBF8F1;--theme-ui-colors-lightOrange:#FDF4EC;--theme-ui-colors-darkOrange:#C17C10;--theme-ui-colors-error:#E55737;--theme-ui-colors-success:#3AB97A;--theme-ui-colors-headSection:#fff;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-warning02:#ED811C;--theme-ui-colors-sidebar:#F1F1F4;--theme-ui-colors-link:#6E56CF;--theme-ui-colors-choggleBox:#5163BA;--theme-ui-colors-darkBorder:#DCDBDD;--theme-ui-colors-code-border:#DFE1E5;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;color:var(--theme-ui-colors-text);background-color:var(--theme-ui-colors-background);}html.theme-ui-light,.theme-ui-light html{--theme-ui-colors-text:#25252D;--theme-ui-colors-textClear:#6F6E77;--theme-ui-colors-grayLight:#E8E8ED;--theme-ui-colors-hoverBackground:#f2f2f2;--theme-ui-colors-background:#FFF;--theme-ui-colors-backgroundClear:#FFF;--theme-ui-colors-primary:#5D40F7;--theme-ui-colors-purpleLight:#F6F1FC;--theme-ui-colors-purpleLight01:#6548FF1A;--theme-ui-colors-purple12:#F1EEFE;--theme-ui-colors-purpleStrong:#5842C3;--theme-ui-colors-whiteButtonText:#1A1523;--theme-ui-colors-codeBlockBackground:#32275F;--theme-ui-colors-failedConnectText:#86848D;--theme-ui-colors-changesWarning-background:#FFECC7;--theme-ui-colors-changesWarning-color:#5C0C17;--theme-ui-colors-greyIcon:#6F6E77;--theme-ui-colors-greyIconDisabled:#C9D0D8;--theme-ui-colors-missingScreenshotBanner-color:#5C0C17;--theme-ui-colors-missingScreenshotBanner-bg:#FFECC7;--theme-ui-colors-badge-new-bg:#DBEDDB;--theme-ui-colors-badge-new-color:#05644D;--theme-ui-colors-badge-modified-bg:#FFECC7;--theme-ui-colors-badge-modified-color:#5C0C17;--theme-ui-colors-badge-synced-bg:purple12;--theme-ui-colors-badge-synced-color:#5842C3;--theme-ui-colors-badge-deleted-bg:rgba(203, 36, 49, 0.1);--theme-ui-colors-badge-unknown-bg:#F3F5F7;--theme-ui-colors-badge-unknown-color:#9AA4AF;--theme-ui-colors-codeBlockBorder:#545454;--theme-ui-colors-secondary:#F9FAFB;--theme-ui-colors-danger:#CB2431;--theme-ui-colors-highlight:hsl(10, 40%, 90%);--theme-ui-colors-purple:#5B3DF5;--theme-ui-colors-purple08:#5842C3;--theme-ui-colors-muted:#F9F9FB;--theme-ui-colors-icons:#8091A5;--theme-ui-colors-gray:#F8F9FA;--theme-ui-colors-grey01:#F3F5F7;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-grey03:#F4F2F4;--theme-ui-colors-grey04:#9AA4AF;--theme-ui-colors-grey05:#667587;--theme-ui-colors-grey07:#F9F8F9;--theme-ui-colors-grey10:#86848D;--theme-ui-colors-grey12:#1A1523;--theme-ui-colors-greyTransparent:rgba(37, 37, 45, 0.4);--theme-ui-colors-borders:#E4E2E4;--theme-ui-colors-bordersFocused:#6E56CF;--theme-ui-colors-deep:#0E2150;--theme-ui-colors-deep1:#A0ADE7;--theme-ui-colors-lightGreen:#EBF8F1;--theme-ui-colors-lightOrange:#FDF4EC;--theme-ui-colors-darkOrange:#C17C10;--theme-ui-colors-error:#E55737;--theme-ui-colors-success:#3AB97A;--theme-ui-colors-headSection:#fff;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-warning02:#ED811C;--theme-ui-colors-sidebar:#F1F1F4;--theme-ui-colors-link:#6E56CF;--theme-ui-colors-choggleBox:#5163BA;--theme-ui-colors-darkBorder:#DCDBDD;--theme-ui-colors-code-border:#DFE1E5;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;}html.theme-ui-dark,.theme-ui-dark html{--theme-ui-colors-text:#fff;--theme-ui-colors-textClear:#6E707B;--theme-ui-colors-hoverBackground:#202020;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-background:#202022;--theme-ui-colors-backgroundClear:#28282C;--theme-ui-colors-primary:#4E54D7;--theme-ui-colors-secondary:#28282C;--theme-ui-colors-icons:#5D5D71;--theme-ui-colors-gray:#1D1D1F;--theme-ui-colors-borders:#3A3A46;--theme-ui-colors-deep:#28282C;--theme-ui-colors-headSection:#28282C;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-sidebar:#28282C;--theme-ui-colors-code-border:#5D5D6F;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;--theme-ui-colors-link:#A9A9C6;--theme-ui-colors-choggleBox:#fff;}</style><style data-emotion="css-global h19pgh">*{box-sizing:border-box;}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;line-height:1.5;font-weight:400;}body{margin:0;}</style><style data-emotion="css yvak7d">.css-yvak7d{box-sizing:border-box;margin:0;min-width:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:calc(100vh - 57px);width:100vw;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}</style><div class="css-yvak7d"><style data-emotion="css uqm8ih">.css-uqm8ih{box-sizing:border-box;margin:0;min-width:0;color:var(--theme-ui-colors-primary);overflow:visible;}</style><svg stroke-width="4" viewBox="0 0 32 32" width="48" height="48" fill="none" stroke="currentColor" role="img" id="spinner" class="css-uqm8ih"><title>Loading</title><circle stroke-width="4" r="12" cx="16" cy="16" fill="none" opacity="0.125"></circle><circle stroke-width="4" r="12" cx="16" cy="16" fill="none" stroke-dasharray="20 110"><animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0 16 16" to="360 16 16" dur="750ms" repeatCount="indefinite"></animateTransform></circle></svg></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"sVN8SG2Rfq9IshnbTCNsD","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"isFallback":false,"gip":true,"appGip":true,"scriptLoader":[]}</script></body></html>
|