@ms-cloudpack/overlay 0.3.0 → 0.5.0

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.
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "absWorkingDir": "/home/runner/work/cloudpack/cloudpack/packages/overlay",
3
- "outbase": ".",
4
- "outdir": "/home/runner/work/cloudpack/cloudpack/packages/overlay/dist",
5
- "entryPoints": {},
3
+ "outbase": "lib",
4
+ "outdir": "/home/runner/work/cloudpack/cloudpack/packages/overlay/dist/lib",
5
+ "entryPoints": {
6
+ "index": "./src/index.tsx"
7
+ },
6
8
  "external": [
7
9
  "@ms-cloudpack/data-bus",
8
10
  "react",
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "type": "buildStatus",
3
- "buildId": "c9bcd198-08f7-4777-b19a-948a194a02e0",
3
+ "buildId": "cc1a4d0c-a726-4192-853d-c99634d24523",
4
4
  "buildStatus": "complete",
5
5
  "internalError": null,
6
6
  "warnings": [],
7
7
  "errors": [],
8
- "outputFilePaths": [],
9
- "metafile": "{\n \"inputs\": {\n },\n \"outputs\": {\n }\n}\n"
8
+ "outputFilePaths": [
9
+ "/home/runner/work/cloudpack/cloudpack/packages/overlay/dist/lib/index.js"
10
+ ],
11
+ "metafile": "{\n \"inputs\": {\n \"src/components/CloudpackProvider/getCookies.ts\": {\n \"bytes\": 452,\n \"imports\": []\n },\n \"src/components/CloudpackProvider/createCloudpackClient.ts\": {\n \"bytes\": 3807,\n \"imports\": [\n {\n \"path\": \"src/components/CloudpackProvider/getCookies.ts\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/CloudpackProvider/CloudpackProvider.tsx\": {\n \"bytes\": 552,\n \"imports\": [\n {\n \"path\": \"src/components/CloudpackProvider/createCloudpackClient.ts\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/hooks/useDraggable.ts\": {\n \"bytes\": 2050,\n \"imports\": []\n },\n \"src/components/StatusBadge/StatusBadge.module.css\": {\n \"bytes\": 3405,\n \"imports\": []\n },\n \"src/components/CloudpackProvider/useStatus.ts\": {\n \"bytes\": 866,\n \"imports\": [\n {\n \"path\": \"src/components/CloudpackProvider/CloudpackProvider.tsx\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/images/open-16-filled.inline.svg\": {\n \"bytes\": 852,\n \"imports\": []\n },\n \"src/components/StatusBadge/StatusBadge.tsx\": {\n \"bytes\": 2867,\n \"imports\": [\n {\n \"path\": \"src/hooks/useDraggable.ts\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/StatusBadge/StatusBadge.module.css\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/CloudpackProvider/useStatus.ts\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/images/open-16-filled.inline.svg\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/StatusDialog/TaskResultItem.module.css\": {\n \"bytes\": 2067,\n \"imports\": []\n },\n \"src/components/StatusDialog/TaskResultItem.tsx\": {\n \"bytes\": 1433,\n \"imports\": [\n {\n \"path\": \"src/components/CloudpackProvider/CloudpackProvider.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/StatusDialog/TaskResultItem.module.css\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/StatusDialog/TaskStatus.module.css\": {\n \"bytes\": 3922,\n \"imports\": []\n },\n \"src/images/error-24.inline.svg\": {\n \"bytes\": 1024,\n \"imports\": []\n },\n \"src/images/success-24.inline.svg\": {\n \"bytes\": 562,\n \"imports\": []\n },\n \"src/images/chevrondown-20.inline.svg\": {\n \"bytes\": 450,\n \"imports\": []\n },\n \"src/components/StatusDialog/TaskStatus.tsx\": {\n \"bytes\": 4225,\n \"imports\": [\n {\n \"path\": \"src/components/StatusDialog/TaskResultItem.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/StatusDialog/TaskStatus.module.css\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/images/error-24.inline.svg\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/images/success-24.inline.svg\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/images/chevrondown-20.inline.svg\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/CloudpackProvider/CloudpackProvider.tsx\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/CloudpackProvider/useStatusDetails.ts\": {\n \"bytes\": 844,\n \"imports\": [\n {\n \"path\": \"src/components/CloudpackProvider/CloudpackProvider.tsx\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/StatusDialog/TaskList.module.css\": {\n \"bytes\": 615,\n \"imports\": []\n },\n \"src/components/StatusDialog/TaskList.tsx\": {\n \"bytes\": 1015,\n \"imports\": [\n {\n \"path\": \"src/components/StatusDialog/TaskStatus.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/CloudpackProvider/useStatusDetails.ts\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/StatusDialog/TaskList.module.css\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/Button/Button.module.css\": {\n \"bytes\": 2080,\n \"imports\": []\n },\n \"src/components/Button/Button.tsx\": {\n \"bytes\": 360,\n \"imports\": [\n {\n \"path\": \"src/components/Button/Button.module.css\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/Dialog/Dialog.module.css\": {\n \"bytes\": 2454,\n \"imports\": []\n },\n \"src/images/dismiss-16-filled.inline.svg\": {\n \"bytes\": 718,\n \"imports\": []\n },\n \"src/components/Dialog/Dialog.tsx\": {\n \"bytes\": 1525,\n \"imports\": [\n {\n \"path\": \"src/components/Dialog/Dialog.module.css\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/hooks/useDraggable.ts\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/images/dismiss-16-filled.inline.svg\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/StatusDialog/StatusDialog.tsx\": {\n \"bytes\": 721,\n \"imports\": [\n {\n \"path\": \"src/components/StatusDialog/TaskList.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/CloudpackProvider/CloudpackProvider.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/Button/Button.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/Dialog/Dialog.tsx\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/ErrorDialog/PathError.tsx\": {\n \"bytes\": 1750,\n \"imports\": [\n {\n \"path\": \"src/components/StatusDialog/TaskStatus.module.css\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/images/error-24.inline.svg\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/images/chevrondown-20.inline.svg\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/ErrorDialog/ErrorDialog.tsx\": {\n \"bytes\": 996,\n \"imports\": [\n {\n \"path\": \"src/components/Button/Button.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/CloudpackProvider/CloudpackProvider.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/ErrorDialog/PathError.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/StatusDialog/TaskList.module.css\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/Dialog/Dialog.tsx\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/ErrorDialog/useErrorEvents.ts\": {\n \"bytes\": 1265,\n \"imports\": []\n },\n \"src/components/StatusOverlay/StatusOverlay.tsx\": {\n \"bytes\": 1437,\n \"imports\": [\n {\n \"path\": \"src/components/StatusBadge/StatusBadge.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/StatusDialog/StatusDialog.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/CloudpackProvider/useStatus.ts\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/ErrorDialog/ErrorDialog.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/ErrorDialog/useErrorEvents.ts\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/ThemeProvider/ThemeProvider.module.css\": {\n \"bytes\": 630,\n \"imports\": []\n },\n \"src/components/ThemeProvider/ThemeProvider.tsx\": {\n \"bytes\": 210,\n \"imports\": [\n {\n \"path\": \"src/components/ThemeProvider/ThemeProvider.module.css\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/index.tsx\": {\n \"bytes\": 532,\n \"imports\": [\n {\n \"path\": \"src/components/CloudpackProvider/CloudpackProvider.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/StatusOverlay/StatusOverlay.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/ThemeProvider/ThemeProvider.tsx\",\n \"kind\": \"import-statement\"\n }\n ]\n }\n },\n \"outputs\": {\n \"dist/lib/index.js\": {\n \"imports\": [],\n \"exports\": [],\n \"entryPoint\": \"src/index.tsx\",\n \"inputs\": {\n \"src/index.tsx\": {\n \"bytesInOutput\": 360\n },\n \"src/components/CloudpackProvider/CloudpackProvider.tsx\": {\n \"bytesInOutput\": 372\n },\n \"src/components/CloudpackProvider/getCookies.ts\": {\n \"bytesInOutput\": 317\n },\n \"src/components/CloudpackProvider/createCloudpackClient.ts\": {\n \"bytesInOutput\": 2507\n },\n \"src/components/StatusOverlay/StatusOverlay.tsx\": {\n \"bytesInOutput\": 1076\n },\n \"src/components/StatusBadge/StatusBadge.tsx\": {\n \"bytesInOutput\": 3035\n },\n \"src/hooks/useDraggable.ts\": {\n \"bytesInOutput\": 1937\n },\n \"src/components/StatusBadge/StatusBadge.module.css\": {\n \"bytesInOutput\": 3118\n },\n \"src/components/CloudpackProvider/useStatus.ts\": {\n \"bytesInOutput\": 448\n },\n \"src/images/open-16-filled.inline.svg\": {\n \"bytesInOutput\": 1202\n },\n \"src/components/StatusDialog/StatusDialog.tsx\": {\n \"bytesInOutput\": 484\n },\n \"src/components/StatusDialog/TaskList.tsx\": {\n \"bytesInOutput\": 750\n },\n \"src/components/StatusDialog/TaskStatus.tsx\": {\n \"bytesInOutput\": 4697\n },\n \"src/components/StatusDialog/TaskResultItem.tsx\": {\n \"bytesInOutput\": 1421\n },\n \"src/components/StatusDialog/TaskResultItem.module.css\": {\n \"bytesInOutput\": 1881\n },\n \"src/components/StatusDialog/TaskStatus.module.css\": {\n \"bytesInOutput\": 3651\n },\n \"src/images/error-24.inline.svg\": {\n \"bytesInOutput\": 1428\n },\n \"src/images/success-24.inline.svg\": {\n \"bytesInOutput\": 814\n },\n \"src/images/chevrondown-20.inline.svg\": {\n \"bytesInOutput\": 666\n },\n \"src/components/CloudpackProvider/useStatusDetails.ts\": {\n \"bytesInOutput\": 299\n },\n \"src/components/StatusDialog/TaskList.module.css\": {\n \"bytesInOutput\": 541\n },\n \"src/components/Button/Button.tsx\": {\n \"bytesInOutput\": 312\n },\n \"src/components/Button/Button.module.css\": {\n \"bytesInOutput\": 1942\n },\n \"src/components/Dialog/Dialog.tsx\": {\n \"bytesInOutput\": 1399\n },\n \"src/components/Dialog/Dialog.module.css\": {\n \"bytesInOutput\": 2280\n },\n \"src/images/dismiss-16-filled.inline.svg\": {\n \"bytesInOutput\": 1029\n },\n \"src/components/ErrorDialog/ErrorDialog.tsx\": {\n \"bytesInOutput\": 657\n },\n \"src/components/ErrorDialog/PathError.tsx\": {\n \"bytesInOutput\": 2171\n },\n \"src/components/ErrorDialog/useErrorEvents.ts\": {\n \"bytesInOutput\": 866\n },\n \"src/components/ThemeProvider/ThemeProvider.tsx\": {\n \"bytesInOutput\": 191\n },\n \"src/components/ThemeProvider/ThemeProvider.module.css\": {\n \"bytesInOutput\": 561\n }\n },\n \"bytes\": 44489\n }\n }\n}\n"
10
12
  }
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ export interface DialogProps {
3
+ title: string;
4
+ style?: 'default' | 'error';
5
+ draggable?: boolean;
6
+ onClose?: () => void;
7
+ commands?: React.ReactNode;
8
+ children: React.ReactNode;
9
+ }
10
+ export declare function Dialog({ title, style, draggable, onClose, commands, children }: DialogProps): JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { default as React, useRef } from 'react';
2
+ import styles from './Dialog.module.css';
3
+ import { useDraggable } from '../../hooks/useDraggable.js';
4
+ import CloseIcon from '../../images/dismiss-16-filled.inline.svg';
5
+ export function Dialog({ title, style, draggable, onClose, commands, children }) {
6
+ const draggableRef = useRef(null);
7
+ const draggableTargetRef = useRef(null);
8
+ const colorAccent = style === 'error' ? 'rgb(164, 38, 44)' : undefined;
9
+ const cursorDraggable = draggable ? 'move' : undefined;
10
+ useDraggable(draggable ? draggableRef : undefined, draggable ? draggableTargetRef : undefined);
11
+ return (React.createElement("div", { className: styles.overlay },
12
+ React.createElement("div", { ref: draggableRef, className: styles.dialog, style: { borderTopColor: colorAccent } },
13
+ React.createElement("div", { className: styles.titleArea },
14
+ React.createElement("div", { ref: draggableTargetRef, className: styles.title, style: { color: colorAccent, cursor: cursorDraggable } }, title),
15
+ !!onClose && (React.createElement("button", { className: styles.closeButton, onClick: onClose },
16
+ React.createElement("img", { src: CloseIcon, alt: "" })))),
17
+ !!commands && React.createElement("div", { className: styles.commands }, commands),
18
+ children)));
19
+ }
20
+ //# sourceMappingURL=Dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,MAAM,MAAM,qBAAqB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,SAAS,MAAM,2CAA2C,CAAC;AAWlE,MAAM,UAA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0,0 +1,5 @@
1
+ import type { UnsupportedErrorEvent } from './useErrorEvents.js';
2
+ export interface ErrorDialogProps {
3
+ unsupported: UnsupportedErrorEvent[];
4
+ }
5
+ export declare function ErrorDialog({ unsupported }: ErrorDialogProps): JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ import { Button } from '../Button/Button.js';
3
+ import { useCloudpack } from '../CloudpackProvider/CloudpackProvider.js';
4
+ import { PathError } from './PathError.js';
5
+ import styles from '../StatusDialog/TaskList.module.css';
6
+ import { Dialog } from '../Dialog/Dialog.js';
7
+ export function ErrorDialog({ unsupported }) {
8
+ const cloudpack = useCloudpack();
9
+ const reload = () => {
10
+ cloudpack.restartTasks();
11
+ };
12
+ return (React.createElement(Dialog, { title: "Found unsupported paths in your project", style: "error", commands: React.createElement(Button, { primary: true, onClick: reload }, "Reload") },
13
+ React.createElement("div", { className: styles.root }, unsupported.map((data, index) => (React.createElement(PathError, { ...data, key: index }))))));
14
+ }
15
+ //# sourceMappingURL=ErrorDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorDialog.js","sourceRoot":"","sources":["../../../src/components/ErrorDialog/ErrorDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,MAAM,MAAM,qCAAqC,CAAC;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAM7C,MAAM,UAAU,WAAW,CAAC,EAAE,WAAW,EAAoB;IAC3D,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IAEjC,MAAM,MAAM,GAAG,GAAG,EAAE;QAClB,SAAS,CAAC,YAAY,EAAE,CAAC;IAC3B,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,MAAM,IACL,KAAK,EAAC,yCAAyC,EAC/C,KAAK,EAAC,OAAO,EACb,QAAQ,EACN,oBAAC,MAAM,IAAC,OAAO,QAAC,OAAO,EAAE,MAAM,aAEtB;QAGX,6BAAK,SAAS,EAAE,MAAM,CAAC,IAAI,IACxB,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAChC,oBAAC,SAAS,OAAK,IAAI,EAAE,GAAG,EAAE,KAAK,GAAI,CACpC,CAAC,CACE,CACC,CACV,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { UnsupportedErrorEvent } from './useErrorEvents.js';
2
+ export declare function PathError(props: UnsupportedErrorEvent): JSX.Element;
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import styles from '../StatusDialog/TaskStatus.module.css';
3
+ import ErrorIcon from '../../images/error-24.inline.svg';
4
+ import { default as cx } from 'classnames';
5
+ import ChevronDownIcon from '../../images/chevrondown-20.inline.svg';
6
+ export function PathError(props) {
7
+ const [showContent, setshowContent] = React.useState(false);
8
+ const { packageName, path } = props;
9
+ return (React.createElement("div", { className: styles.root },
10
+ React.createElement("div", { className: cx(styles.header, styles.error) },
11
+ React.createElement("button", { className: styles.expandButton, onClick: () => setshowContent(!showContent) },
12
+ React.createElement("img", { className: cx(styles.expandIcon, !showContent && styles.collapsed), src: ChevronDownIcon, alt: "" })),
13
+ React.createElement("img", { className: styles.errorIcon, src: ErrorIcon, alt: "" }),
14
+ React.createElement("div", { className: styles.title }, `${packageName}/${path}`)),
15
+ showContent && (React.createElement("div", { className: styles.content },
16
+ React.createElement("div", { className: styles.title }, "Details"),
17
+ React.createElement("div", { className: styles.nameValueArea },
18
+ React.createElement("div", { className: styles.name }, "Problem"),
19
+ React.createElement("div", { className: styles.value }, `A deep import "${packageName}" was imported, but was unrecognized as an exported entry path.`)),
20
+ React.createElement("div", { className: styles.nameValueArea },
21
+ React.createElement("div", { className: styles.name }, "Solution"),
22
+ React.createElement("div", { className: styles.value }, `Remove the path from the import in your source. (Import from "${packageName}" rather than "${packageName}/${path}")`))))));
23
+ }
24
+ //# sourceMappingURL=PathError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PathError.js","sourceRoot":"","sources":["../../../src/components/ErrorDialog/PathError.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,uCAAuC,CAAC;AAC3D,OAAO,SAAS,MAAM,kCAAkC,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,eAAe,MAAM,wCAAwC,CAAC;AAGrE,MAAM,UAAU,SAAS,CAAC,KAA4B;IACpD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAU,KAAK,CAAC,CAAC;IACrE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAEpC,OAAO,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,IAAI;QACzB,6BAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC;YAC7C,gCAAQ,SAAS,EAAE,MAAM,CAAC,YAAY,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,CAAC,WAAW,CAAC;gBACjF,6BAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,WAAW,IAAI,MAAM,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,EAAC,EAAE,GAAG,CACjG;YACT,6BAAK,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAC,EAAE,GAAG;YAC3D,6BAAK,SAAS,EAAE,MAAM,CAAC,KAAK,IAAG,GAAG,WAAW,IAAI,IAAI,EAAE,CAAO,CAC1D;QACL,WAAW,IAAI,CACd,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO;YAC5B,6BAAK,SAAS,EAAE,MAAM,CAAC,KAAK,cAAe;YAE3C,6BAAK,SAAS,EAAE,MAAM,CAAC,aAAa;gBAClC,6BAAK,SAAS,EAAE,MAAM,CAAC,IAAI,cAAe;gBAC1C,6BAAK,SAAS,EAAE,MAAM,CAAC,KAAK,IACzB,kBAAkB,WAAW,iEAAiE,CAC3F,CACF;YACN,6BAAK,SAAS,EAAE,MAAM,CAAC,aAAa;gBAClC,6BAAK,SAAS,EAAE,MAAM,CAAC,IAAI,eAAgB;gBAC3C,6BAAK,SAAS,EAAE,MAAM,CAAC,KAAK,IACzB,iEAAiE,WAAW,kBAAkB,WAAW,IAAI,IAAI,IAAI,CAClH,CACF,CACF,CACP,CACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,15 @@
1
+ declare global {
2
+ interface Window {
3
+ uncaughtErrors: {
4
+ errors: ErrorEvent[];
5
+ unregister: () => void;
6
+ };
7
+ }
8
+ }
9
+ export declare type UnsupportedErrorEvent = {
10
+ packageName: string;
11
+ path: string;
12
+ };
13
+ export declare const useErrorEvents: () => {
14
+ unsupported: UnsupportedErrorEvent[];
15
+ };
@@ -0,0 +1,27 @@
1
+ import { useEffect, useState } from 'react';
2
+ export const useErrorEvents = () => {
3
+ const [events, setEvents] = useState({ unsupported: [] });
4
+ useEffect(() => {
5
+ // Append unsupported paths to the list.
6
+ const handleError = (event) => {
7
+ const regex = /[Mm]odule specifier,? ['"](.*?)\/(.*?)['"]/;
8
+ const match = event.message.match(regex);
9
+ if (match && match.length === 3) {
10
+ setEvents((prevEvents) => ({
11
+ ...prevEvents,
12
+ unsupported: [...prevEvents.unsupported, { packageName: match[1], path: match[2] }],
13
+ }));
14
+ }
15
+ };
16
+ window.uncaughtErrors = window.uncaughtErrors || { errors: [], unregister: () => undefined };
17
+ window.uncaughtErrors.unregister();
18
+ window.addEventListener('error', handleError);
19
+ // Handle errors caught before rendering.
20
+ for (const error of window.uncaughtErrors.errors) {
21
+ handleError(error);
22
+ }
23
+ // No dependencies. This effect should only run once.
24
+ }, []);
25
+ return events;
26
+ };
27
+ //# sourceMappingURL=useErrorEvents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useErrorEvents.js","sourceRoot":"","sources":["../../../src/components/ErrorDialog/useErrorEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAa5C,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAA2C,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IAEpG,SAAS,CAAC,GAAG,EAAE;QACb,wCAAwC;QACxC,MAAM,WAAW,GAAG,CAAC,KAAiB,EAAE,EAAE;YACxC,MAAM,KAAK,GAAG,4CAA4C,CAAC;YAC3D,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACzC,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC/B,SAAS,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;oBACzB,GAAG,UAAU;oBACb,WAAW,EAAE,CAAC,GAAG,UAAU,CAAC,WAAW,EAAE,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;iBACpF,CAAC,CAAC,CAAC;aACL;QACH,CAAC,CAAC;QAEF,MAAM,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,CAAC;QAC7F,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC;QACnC,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QAE9C,yCAAyC;QACzC,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE;YAChD,WAAW,CAAC,KAAK,CAAC,CAAC;SACpB;QAED,qDAAqD;IACvD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
@@ -1,7 +1,4 @@
1
- import { default as React } from 'react';
2
1
  export interface StatusDialogProps {
3
2
  onClose: () => void;
4
3
  }
5
- declare function StatusDialogUnmemoized({ onClose }: StatusDialogProps): JSX.Element;
6
- export declare const StatusDialog: React.MemoExoticComponent<typeof StatusDialogUnmemoized>;
7
- export {};
4
+ export declare function StatusDialog({ onClose }: StatusDialogProps): JSX.Element;
@@ -1,29 +1,14 @@
1
- import { default as React, useRef } from 'react';
2
- import styles from './StatusDialog.module.css';
3
- import { useDraggable } from '../../hooks/useDraggable.js';
4
- import CloseIcon from '../../images/dismiss-16-filled.inline.svg';
1
+ import React from 'react';
5
2
  import { TaskList } from './TaskList.js';
6
3
  import { useCloudpack } from '../CloudpackProvider/CloudpackProvider.js';
7
4
  import { Button } from '../Button/Button.js';
8
- function StatusDialogUnmemoized({ onClose }) {
9
- const draggableRef = useRef(null);
10
- const draggableTargetRef = useRef(null);
5
+ import { Dialog } from '../Dialog/Dialog.js';
6
+ export function StatusDialog({ onClose }) {
11
7
  const cloudpack = useCloudpack();
12
- useDraggable(draggableRef, draggableTargetRef);
13
8
  const restartTasks = () => {
14
9
  cloudpack.restartTasks();
15
10
  };
16
- return (React.createElement("div", { className: styles.overlay },
17
- React.createElement("div", { ref: draggableRef, className: styles.dialog },
18
- React.createElement("div", { className: styles.titleArea },
19
- React.createElement("div", { ref: draggableTargetRef, className: styles.title }, "Task results"),
20
- React.createElement("button", { className: styles.closeButton, onClick: onClose },
21
- React.createElement("img", { src: CloseIcon, alt: "" }))),
22
- React.createElement("div", { className: styles.commands },
23
- React.createElement(Button, { primary: true, onClick: restartTasks }, "Restart all tasks")),
24
- React.createElement(TaskList, null))));
11
+ return (React.createElement(Dialog, { title: "Task results", draggable: true, onClose: onClose, commands: React.createElement(Button, { primary: true, onClick: restartTasks }, "Restart all tasks") },
12
+ React.createElement(TaskList, null)));
25
13
  }
26
- export const StatusDialog = React.memo(StatusDialogUnmemoized, (prev, next) => {
27
- return prev.onClose === next.onClose;
28
- });
29
14
  //# sourceMappingURL=StatusDialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StatusDialog.js","sourceRoot":"","sources":["../../../src/components/StatusDialog/StatusDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,SAAS,MAAM,2CAA2C,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAM7C,SAAS,sBAAsB,CAAC,EAAE,OAAO,EAAqB;IAC5D,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,kBAAkB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IACxC,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IAEjC,YAAY,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAAC;IAE/C,MAAM,YAAY,GAAG,GAAG,EAAE;QACxB,SAAS,CAAC,YAAY,EAAE,CAAC;IAC3B,CAAC,CAAC;IAEF,OAAO,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO;QAC5B,6BAAK,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM;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AAO,EAChB,QAAQ,EACN,oBAAC,MAAM,IAAC,OAAO,QAAC,OAAO,EAAE,YAAY,wBAE5B;QAGX,oBAAC,QAAQ,OAAG,CACL,CACV,CAAC;AACJ,CAAC"}
@@ -2,10 +2,13 @@ import React, { useCallback, useState, useRef } from 'react';
2
2
  import { StatusBadge } from '../StatusBadge/StatusBadge.js';
3
3
  import { StatusDialog } from '../StatusDialog/StatusDialog.js';
4
4
  import { useStatus } from '../CloudpackProvider/useStatus.js';
5
+ import { ErrorDialog } from '../ErrorDialog/ErrorDialog.js';
6
+ import { useErrorEvents } from '../ErrorDialog/useErrorEvents.js';
5
7
  export function StatusOverlay() {
6
8
  const [isExpanded, setIsExpanded] = useState(false);
7
9
  const status = useStatus();
8
10
  const internal = useRef();
11
+ const { unsupported } = useErrorEvents();
9
12
  // If we haven't set a specific state and we become idle,
10
13
  // pop open the details if there are errors.
11
14
  if (isExpanded === false &&
@@ -20,7 +23,8 @@ export function StatusOverlay() {
20
23
  setIsExpanded(!isExpanded);
21
24
  }, [isExpanded, setIsExpanded]);
22
25
  return (React.createElement("div", null,
23
- !isExpanded && React.createElement(StatusBadge, { onExpand: toggleMinimized }),
24
- isExpanded && React.createElement(StatusDialog, { onClose: toggleMinimized })));
26
+ !!unsupported.length && React.createElement(ErrorDialog, { unsupported: unsupported }),
27
+ !unsupported.length && !isExpanded && React.createElement(StatusBadge, { onExpand: toggleMinimized }),
28
+ !unsupported.length && isExpanded && React.createElement(StatusDialog, { onClose: toggleMinimized })));
25
29
  }
26
30
  //# sourceMappingURL=StatusOverlay.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StatusOverlay.js","sourceRoot":"","sources":["../../../src/components/StatusOverlay/StatusOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,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,eAAe,GAAI,CAC5E,CACP,CAAC;AACJ,CAAC"}
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.31.2"
8
+ "packageVersion": "7.32.0"
9
9
  }
10
10
  ]
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/overlay",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "The Cloudpack overlay ux.",
5
5
  "license": "MIT",
6
6
  "types": "./lib/index.d.ts",
@@ -8,7 +8,7 @@
8
8
  "exports": {
9
9
  ".": {
10
10
  "types": "./lib/index.d.ts",
11
- "browser": "./dist/lib/index.js",
11
+ "browser-esm": "./dist/lib/index.js",
12
12
  "import": "./lib/index.js"
13
13
  }
14
14
  },