@ms-cloudpack/overlay 0.4.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.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,22 @@
2
2
  "name": "@ms-cloudpack/overlay",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 05 Oct 2022 19:39:05 GMT",
5
+ "date": "Tue, 11 Oct 2022 08:16:31 GMT",
6
+ "tag": "@ms-cloudpack/overlay_v0.5.0",
7
+ "version": "0.5.0",
8
+ "comments": {
9
+ "minor": [
10
+ {
11
+ "author": "dake.3601@gmail.com",
12
+ "package": "@ms-cloudpack/overlay",
13
+ "commit": "90e5f71f8a0171b6e22e957ab38db1b1c736f6e2",
14
+ "comment": "Implemented an Error Status that pops up when an unsupported path is found."
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Wed, 05 Oct 2022 19:39:20 GMT",
6
21
  "tag": "@ms-cloudpack/overlay_v0.4.0",
7
22
  "version": "0.4.0",
8
23
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,20 @@
1
1
  # Change Log - @ms-cloudpack/overlay
2
2
 
3
- This log was last generated on Wed, 05 Oct 2022 19:39:05 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 11 Oct 2022 08:16:31 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.5.0
8
+
9
+ Tue, 11 Oct 2022 08:16:31 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - Implemented an Error Status that pops up when an unsupported path is found. (dake.3601@gmail.com)
14
+
7
15
  ## 0.4.0
8
16
 
9
- Wed, 05 Oct 2022 19:39:05 GMT
17
+ Wed, 05 Oct 2022 19:39:20 GMT
10
18
 
11
19
  ### Minor changes
12
20
 
package/dist/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/index.tsx
2
- import React10 from "react";
2
+ import React13 from "react";
3
3
  import ReactDOM from "react-dom";
4
4
 
5
5
  // src/components/CloudpackProvider/CloudpackProvider.tsx
@@ -128,7 +128,7 @@ function CloudpackProvider({ children }) {
128
128
  var useCloudpack = () => useContext(CloudpackContext);
129
129
 
130
130
  // src/components/StatusOverlay/StatusOverlay.tsx
131
- import React8, { useCallback, useState as useState5, useRef as useRef3 } from "react";
131
+ import React11, { useCallback, useState as useState6, useRef as useRef3 } from "react";
132
132
 
133
133
  // src/components/StatusBadge/StatusBadge.tsx
134
134
  import React2, { useRef } from "react";
@@ -406,110 +406,7 @@ function getStatsString(status) {
406
406
  }
407
407
 
408
408
  // src/components/StatusDialog/StatusDialog.tsx
409
- import { default as React7, useRef as useRef2 } from "react";
410
-
411
- // src/components/StatusDialog/StatusDialog.module.css
412
- var compiledModule2 = `.LpVwawaxeg-StatusDialogmodulecssoverlay {
413
- background: rgba(0, 0, 0, 0.1);
414
- border: 1px solid black;
415
- position: fixed;
416
- top: 0;
417
- left: 0;
418
- right: 0;
419
- bottom: 0;
420
- display: flex;
421
- align-items: center;
422
- justify-content: center;
423
- z-index: 999;
424
- }
425
-
426
- @keyframes fade-in {
427
- 0% {
428
- opacity: 0;
429
- }
430
- 100% {
431
- opacity: 1;
432
- }
433
- }
434
-
435
- .LpVwawaxeg-StatusDialogmodulecsscommands {
436
- display: flex;
437
- flex-direction: row;
438
- gap: 8px;
439
- align-items: center;
440
- flex-shrink: 0;
441
- height: 40px;
442
- padding: 0 20px;
443
- }
444
-
445
- .LpVwawaxeg-StatusDialogmodulecssdialog {
446
- animation: fade-in 0.1s ease-in-out;
447
- width: 80vw;
448
- align-self: stretch;
449
- margin: 20px 0;
450
- background: white;
451
- color: #000;
452
- box-sizing: border-box;
453
- display: flex;
454
- flex-direction: column;
455
- border-top: 4px solid rgb(0, 120, 212);
456
- border-radius: 3px;
457
- box-shadow: rgb(0 0 0 / 22%) 0px 25.6px 57.6px 0px, rgb(0 0 0 / 18%) 0px 4.8px 14.4px 0px;
458
- position: relative;
459
- outline: transparent solid 3px;
460
- }
461
-
462
- .LpVwawaxeg-StatusDialogmodulecsstitleArea {
463
- display: flex;
464
- flex-direction: row;
465
- align-items: center;
466
- padding: 8px 8px 8px 20px;
467
- gap: 8px;
468
- }
469
-
470
- .LpVwawaxeg-StatusDialogmodulecsscloseButton {
471
- display: flex;
472
- align-items: center;
473
- justify-content: center;
474
- width: 32px;
475
- height: 32px;
476
- margin: 0;
477
- padding: 0;
478
- background: transparent;
479
- border: none;
480
- border-radius: 4px;
481
- }
482
-
483
- .LpVwawaxeg-StatusDialogmodulecsscloseButton:hover {
484
- background: rgba(0, 0, 0, 0.1);
485
- }
486
-
487
- .LpVwawaxeg-StatusDialogmodulecsscloseButton:active {
488
- background: rgba(0, 0, 0, 0.2);
489
- }
490
-
491
- .LpVwawaxeg-StatusDialogmodulecsstitle {
492
- flex-grow: 1;
493
- font-size: 20px;
494
- font-weight: 600;
495
- color: rgb(0, 120, 212);
496
- cursor: move;
497
- }
498
- `;
499
- var s2 = document.createElement("style");
500
- s2.setAttribute("data-sourceFile", "src/components/StatusDialog/StatusDialog.module.css");
501
- s2.appendChild(document.createTextNode(compiledModule2));
502
- document.head.appendChild(s2);
503
- var closeButton = "LpVwawaxeg-StatusDialogmodulecsscloseButton";
504
- var commands = "LpVwawaxeg-StatusDialogmodulecsscommands";
505
- var dialog = "LpVwawaxeg-StatusDialogmodulecssdialog";
506
- var overlay = "LpVwawaxeg-StatusDialogmodulecssoverlay";
507
- var title = "LpVwawaxeg-StatusDialogmodulecsstitle";
508
- var titleArea = "LpVwawaxeg-StatusDialogmodulecsstitleArea";
509
- var StatusDialog_module_default = { closeButton, commands, dialog, overlay, title, titleArea };
510
-
511
- // src/images/dismiss-16-filled.inline.svg
512
- var dismiss_16_filled_inline_default = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIuMzk3MDUgMi41NTM3OUwyLjQ2OTY3IDIuNDY5NjdDMi43MzU5NCAyLjIwMzQgMy4xNTI2IDIuMTc5MiAzLjQ0NjIxIDIuMzk3MDVMMy41MzAzMyAyLjQ2OTY3TDggNi45MzlMMTIuNDY5NyAyLjQ2OTY3QzEyLjc2MjYgMi4xNzY3OCAxMy4yMzc0IDIuMTc2NzggMTMuNTMwMyAyLjQ2OTY3QzEzLjgyMzIgMi43NjI1NiAxMy44MjMyIDMuMjM3NDQgMTMuNTMwMyAzLjUzMDMzTDkuMDYxIDhMMTMuNTMwMyAxMi40Njk3QzEzLjc5NjYgMTIuNzM1OSAxMy44MjA4IDEzLjE1MjYgMTMuNjAyOSAxMy40NDYyTDEzLjUzMDMgMTMuNTMwM0MxMy4yNjQxIDEzLjc5NjYgMTIuODQ3NCAxMy44MjA4IDEyLjU1MzggMTMuNjAyOUwxMi40Njk3IDEzLjUzMDNMOCA5LjA2MUwzLjUzMDMzIDEzLjUzMDNDMy4yMzc0NCAxMy44MjMyIDIuNzYyNTYgMTMuODIzMiAyLjQ2OTY3IDEzLjUzMDNDMi4xNzY3OCAxMy4yMzc0IDIuMTc2NzggMTIuNzYyNiAyLjQ2OTY3IDEyLjQ2OTdMNi45MzkgOEwyLjQ2OTY3IDMuNTMwMzNDMi4yMDM0IDMuMjY0MDYgMi4xNzkyIDIuODQ3NCAyLjM5NzA1IDIuNTUzNzlMMi40Njk2NyAyLjQ2OTY3TDIuMzk3MDUgMi41NTM3OVoiIGZpbGw9IiMyMTIxMjEiLz4KPC9zdmc+Cg==";
409
+ import React8 from "react";
513
410
 
514
411
  // src/components/StatusDialog/TaskList.tsx
515
412
  import React5 from "react";
@@ -521,7 +418,7 @@ import React4 from "react";
521
418
  import React3 from "react";
522
419
 
523
420
  // src/components/StatusDialog/TaskResultItem.module.css
524
- var compiledModule3 = `.mGnoEIJOyo-TaskResultItemmodulecssroot {
421
+ var compiledModule2 = `.mGnoEIJOyo-TaskResultItemmodulecssroot {
525
422
  display: flex;
526
423
  background: #f5f5f5;
527
424
  }
@@ -582,18 +479,18 @@ var compiledModule3 = `.mGnoEIJOyo-TaskResultItemmodulecssroot {
582
479
  color: #333;
583
480
  }
584
481
  `;
585
- var s3 = document.createElement("style");
586
- s3.setAttribute("data-sourceFile", "src/components/StatusDialog/TaskResultItem.module.css");
587
- s3.appendChild(document.createTextNode(compiledModule3));
588
- document.head.appendChild(s3);
482
+ var s2 = document.createElement("style");
483
+ s2.setAttribute("data-sourceFile", "src/components/StatusDialog/TaskResultItem.module.css");
484
+ s2.appendChild(document.createTextNode(compiledModule2));
485
+ document.head.appendChild(s2);
589
486
  var actionArea = "mGnoEIJOyo-TaskResultItemmodulecssactionArea";
590
487
  var content = "mGnoEIJOyo-TaskResultItemmodulecsscontent";
591
488
  var file = "mGnoEIJOyo-TaskResultItemmodulecssfile";
592
489
  var root = "mGnoEIJOyo-TaskResultItemmodulecssroot";
593
490
  var statusBar = "mGnoEIJOyo-TaskResultItemmodulecssstatusBar";
594
491
  var text = "mGnoEIJOyo-TaskResultItemmodulecsstext";
595
- var titleArea2 = "mGnoEIJOyo-TaskResultItemmodulecsstitleArea";
596
- var TaskResultItem_module_default = { actionArea, content, file, root, statusBar, text, titleArea: titleArea2 };
492
+ var titleArea = "mGnoEIJOyo-TaskResultItemmodulecsstitleArea";
493
+ var TaskResultItem_module_default = { actionArea, content, file, root, statusBar, text, titleArea };
597
494
 
598
495
  // src/components/StatusDialog/TaskResultItem.tsx
599
496
  function TaskResultItem({ item, projectPath, index }) {
@@ -630,7 +527,7 @@ function TaskResultItem({ item, projectPath, index }) {
630
527
  }
631
528
 
632
529
  // src/components/StatusDialog/TaskStatus.module.css
633
- var compiledModule4 = `.vweafQQjU-TaskStatusmodulecssroot {
530
+ var compiledModule3 = `.vweafQQjU-TaskStatusmodulecssroot {
634
531
  border: 1px solid #ccc;
635
532
  border-radius: 3px;
636
533
  box-shadow: 0 0 12px -6px rgba(0, 0, 0, 0.25);
@@ -730,7 +627,6 @@ var compiledModule4 = `.vweafQQjU-TaskStatusmodulecssroot {
730
627
  flex-direction: column;
731
628
  font-size: 14px;
732
629
  color: #333;
733
- text-transform: capitalize;
734
630
  }
735
631
 
736
632
  .vweafQQjU-TaskStatusmodulecsslinkButton {
@@ -755,10 +651,10 @@ var compiledModule4 = `.vweafQQjU-TaskStatusmodulecssroot {
755
651
  text-decoration: underline;
756
652
  }
757
653
  `;
758
- var s4 = document.createElement("style");
759
- s4.setAttribute("data-sourceFile", "src/components/StatusDialog/TaskStatus.module.css");
760
- s4.appendChild(document.createTextNode(compiledModule4));
761
- document.head.appendChild(s4);
654
+ var s3 = document.createElement("style");
655
+ s3.setAttribute("data-sourceFile", "src/components/StatusDialog/TaskStatus.module.css");
656
+ s3.appendChild(document.createTextNode(compiledModule3));
657
+ document.head.appendChild(s3);
762
658
  var collapsed = "vweafQQjU-TaskStatusmodulecsscollapsed";
763
659
  var content2 = "vweafQQjU-TaskStatusmodulecsscontent";
764
660
  var error2 = "vweafQQjU-TaskStatusmodulecsserror";
@@ -772,10 +668,10 @@ var resultItems = "vweafQQjU-TaskStatusmodulecssresultItems";
772
668
  var root2 = "vweafQQjU-TaskStatusmodulecssroot";
773
669
  var subTitle = "vweafQQjU-TaskStatusmodulecsssubTitle";
774
670
  var success2 = "vweafQQjU-TaskStatusmodulecsssuccess";
775
- var title2 = "vweafQQjU-TaskStatusmodulecsstitle";
671
+ var title = "vweafQQjU-TaskStatusmodulecsstitle";
776
672
  var value2 = "vweafQQjU-TaskStatusmodulecssvalue";
777
673
  var warning2 = "vweafQQjU-TaskStatusmodulecsswarning";
778
- var TaskStatus_module_default = { collapsed, content: content2, error: error2, expandButton, expandIcon, farArea, header, linkButton, name, resultItems, root: root2, subTitle, success: success2, title: title2, value: value2, warning: warning2 };
674
+ var TaskStatus_module_default = { collapsed, content: content2, error: error2, expandButton, expandIcon, farArea, header, linkButton, name, resultItems, root: root2, subTitle, success: success2, title, value: value2, warning: warning2 };
779
675
 
780
676
  // src/components/StatusDialog/TaskStatus.tsx
781
677
  import { default as cx2 } from "classnames";
@@ -902,7 +798,7 @@ var useStatusDetails = () => {
902
798
  };
903
799
 
904
800
  // src/components/StatusDialog/TaskList.module.css
905
- var compiledModule5 = `.lTlVbGXBQHs-TaskListmodulecssroot {
801
+ var compiledModule4 = `.lTlVbGXBQHs-TaskListmodulecssroot {
906
802
  flex-grow: 1;
907
803
  overflow: auto;
908
804
  border-top: 1px solid #ccc;
@@ -913,10 +809,10 @@ var compiledModule5 = `.lTlVbGXBQHs-TaskListmodulecssroot {
913
809
  gap: 8px;
914
810
  }
915
811
  `;
916
- var s5 = document.createElement("style");
917
- s5.setAttribute("data-sourceFile", "src/components/StatusDialog/TaskList.module.css");
918
- s5.appendChild(document.createTextNode(compiledModule5));
919
- document.head.appendChild(s5);
812
+ var s4 = document.createElement("style");
813
+ s4.setAttribute("data-sourceFile", "src/components/StatusDialog/TaskList.module.css");
814
+ s4.appendChild(document.createTextNode(compiledModule4));
815
+ document.head.appendChild(s4);
920
816
  var root3 = "lTlVbGXBQHs-TaskListmodulecssroot";
921
817
  var TaskList_module_default = { root: root3 };
922
818
 
@@ -949,7 +845,7 @@ function sortTasks(a, b) {
949
845
  import React6 from "react";
950
846
 
951
847
  // src/components/Button/Button.module.css
952
- var compiledModule6 = `.CCnBgacfaMc-ButtonmodulecssstandardButton {
848
+ var compiledModule5 = `.CCnBgacfaMc-ButtonmodulecssstandardButton {
953
849
  outline: transparent;
954
850
  position: relative;
955
851
  font-family: inherit;
@@ -1013,10 +909,10 @@ var compiledModule6 = `.CCnBgacfaMc-ButtonmodulecssstandardButton {
1013
909
  color: rgb(255, 255, 255);
1014
910
  }
1015
911
  `;
1016
- var s6 = document.createElement("style");
1017
- s6.setAttribute("data-sourceFile", "src/components/Button/Button.module.css");
1018
- s6.appendChild(document.createTextNode(compiledModule6));
1019
- document.head.appendChild(s6);
912
+ var s5 = document.createElement("style");
913
+ s5.setAttribute("data-sourceFile", "src/components/Button/Button.module.css");
914
+ s5.appendChild(document.createTextNode(compiledModule5));
915
+ document.head.appendChild(s5);
1020
916
  var primaryButton = "CCnBgacfaMc-ButtonmodulecssprimaryButton";
1021
917
  var standardButton = "CCnBgacfaMc-ButtonmodulecssstandardButton";
1022
918
  var Button_module_default = { primaryButton, standardButton };
@@ -1032,47 +928,255 @@ function Button(props) {
1032
928
  });
1033
929
  }
1034
930
 
1035
- // src/components/StatusDialog/StatusDialog.tsx
1036
- function StatusDialogUnmemoized({ onClose }) {
931
+ // src/components/Dialog/Dialog.tsx
932
+ import { default as React7, useRef as useRef2 } from "react";
933
+
934
+ // src/components/Dialog/Dialog.module.css
935
+ var compiledModule6 = `.ggUoTSSSfk-Dialogmodulecssoverlay {
936
+ background: rgba(0, 0, 0, 0.1);
937
+ border: 1px solid black;
938
+ position: fixed;
939
+ top: 0;
940
+ left: 0;
941
+ right: 0;
942
+ bottom: 0;
943
+ display: flex;
944
+ align-items: center;
945
+ justify-content: center;
946
+ z-index: 999;
947
+ }
948
+
949
+ @keyframes fade-in {
950
+ 0% {
951
+ opacity: 0;
952
+ }
953
+ 100% {
954
+ opacity: 1;
955
+ }
956
+ }
957
+
958
+ .ggUoTSSSfk-Dialogmodulecsscommands {
959
+ display: flex;
960
+ flex-direction: row;
961
+ gap: 8px;
962
+ align-items: center;
963
+ flex-shrink: 0;
964
+ height: 40px;
965
+ padding: 0 20px;
966
+ }
967
+
968
+ .ggUoTSSSfk-Dialogmodulecssdialog {
969
+ animation: fade-in 0.1s ease-in-out;
970
+ width: 80vw;
971
+ align-self: stretch;
972
+ margin: 20px 0;
973
+ background: white;
974
+ color: #000;
975
+ box-sizing: border-box;
976
+ display: flex;
977
+ flex-direction: column;
978
+ border-top: 4px solid rgb(0, 120, 212);
979
+ border-radius: 3px;
980
+ box-shadow: rgb(0 0 0 / 22%) 0px 25.6px 57.6px 0px, rgb(0 0 0 / 18%) 0px 4.8px 14.4px 0px;
981
+ position: relative;
982
+ outline: transparent solid 3px;
983
+ }
984
+
985
+ .ggUoTSSSfk-DialogmodulecsstitleArea {
986
+ display: flex;
987
+ flex-direction: row;
988
+ align-items: center;
989
+ padding: 8px 8px 8px 20px;
990
+ gap: 8px;
991
+ }
992
+
993
+ .ggUoTSSSfk-DialogmodulecsscloseButton {
994
+ display: flex;
995
+ align-items: center;
996
+ justify-content: center;
997
+ width: 32px;
998
+ height: 32px;
999
+ margin: 0;
1000
+ padding: 0;
1001
+ background: transparent;
1002
+ border: none;
1003
+ border-radius: 4px;
1004
+ }
1005
+
1006
+ .ggUoTSSSfk-DialogmodulecsscloseButton:hover {
1007
+ background: rgba(0, 0, 0, 0.1);
1008
+ }
1009
+
1010
+ .ggUoTSSSfk-DialogmodulecsscloseButton:active {
1011
+ background: rgba(0, 0, 0, 0.2);
1012
+ }
1013
+
1014
+ .ggUoTSSSfk-Dialogmodulecsstitle {
1015
+ flex-grow: 1;
1016
+ font-size: 20px;
1017
+ font-weight: 600;
1018
+ color: rgb(0, 120, 212);
1019
+ }
1020
+ `;
1021
+ var s6 = document.createElement("style");
1022
+ s6.setAttribute("data-sourceFile", "src/components/Dialog/Dialog.module.css");
1023
+ s6.appendChild(document.createTextNode(compiledModule6));
1024
+ document.head.appendChild(s6);
1025
+ var closeButton = "ggUoTSSSfk-DialogmodulecsscloseButton";
1026
+ var commands = "ggUoTSSSfk-Dialogmodulecsscommands";
1027
+ var dialog = "ggUoTSSSfk-Dialogmodulecssdialog";
1028
+ var overlay = "ggUoTSSSfk-Dialogmodulecssoverlay";
1029
+ var title2 = "ggUoTSSSfk-Dialogmodulecsstitle";
1030
+ var titleArea2 = "ggUoTSSSfk-DialogmodulecsstitleArea";
1031
+ var Dialog_module_default = { closeButton, commands, dialog, overlay, title: title2, titleArea: titleArea2 };
1032
+
1033
+ // src/images/dismiss-16-filled.inline.svg
1034
+ var dismiss_16_filled_inline_default = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIuMzk3MDUgMi41NTM3OUwyLjQ2OTY3IDIuNDY5NjdDMi43MzU5NCAyLjIwMzQgMy4xNTI2IDIuMTc5MiAzLjQ0NjIxIDIuMzk3MDVMMy41MzAzMyAyLjQ2OTY3TDggNi45MzlMMTIuNDY5NyAyLjQ2OTY3QzEyLjc2MjYgMi4xNzY3OCAxMy4yMzc0IDIuMTc2NzggMTMuNTMwMyAyLjQ2OTY3QzEzLjgyMzIgMi43NjI1NiAxMy44MjMyIDMuMjM3NDQgMTMuNTMwMyAzLjUzMDMzTDkuMDYxIDhMMTMuNTMwMyAxMi40Njk3QzEzLjc5NjYgMTIuNzM1OSAxMy44MjA4IDEzLjE1MjYgMTMuNjAyOSAxMy40NDYyTDEzLjUzMDMgMTMuNTMwM0MxMy4yNjQxIDEzLjc5NjYgMTIuODQ3NCAxMy44MjA4IDEyLjU1MzggMTMuNjAyOUwxMi40Njk3IDEzLjUzMDNMOCA5LjA2MUwzLjUzMDMzIDEzLjUzMDNDMy4yMzc0NCAxMy44MjMyIDIuNzYyNTYgMTMuODIzMiAyLjQ2OTY3IDEzLjUzMDNDMi4xNzY3OCAxMy4yMzc0IDIuMTc2NzggMTIuNzYyNiAyLjQ2OTY3IDEyLjQ2OTdMNi45MzkgOEwyLjQ2OTY3IDMuNTMwMzNDMi4yMDM0IDMuMjY0MDYgMi4xNzkyIDIuODQ3NCAyLjM5NzA1IDIuNTUzNzlMMi40Njk2NyAyLjQ2OTY3TDIuMzk3MDUgMi41NTM3OVoiIGZpbGw9IiMyMTIxMjEiLz4KPC9zdmc+Cg==";
1035
+
1036
+ // src/components/Dialog/Dialog.tsx
1037
+ function Dialog({ title: title3, style, draggable, onClose, commands: commands2, children }) {
1037
1038
  const draggableRef = useRef2(null);
1038
1039
  const draggableTargetRef = useRef2(null);
1039
- const cloudpack = useCloudpack();
1040
- useDraggable(draggableRef, draggableTargetRef);
1041
- const restartTasks = () => {
1042
- cloudpack.restartTasks();
1043
- };
1040
+ const colorAccent = style === "error" ? "rgb(164, 38, 44)" : void 0;
1041
+ const cursorDraggable = draggable ? "move" : void 0;
1042
+ useDraggable(draggable ? draggableRef : void 0, draggable ? draggableTargetRef : void 0);
1044
1043
  return /* @__PURE__ */ React7.createElement("div", {
1045
- className: StatusDialog_module_default.overlay
1044
+ className: Dialog_module_default.overlay
1046
1045
  }, /* @__PURE__ */ React7.createElement("div", {
1047
1046
  ref: draggableRef,
1048
- className: StatusDialog_module_default.dialog
1047
+ className: Dialog_module_default.dialog,
1048
+ style: { borderTopColor: colorAccent }
1049
1049
  }, /* @__PURE__ */ React7.createElement("div", {
1050
- className: StatusDialog_module_default.titleArea
1050
+ className: Dialog_module_default.titleArea
1051
1051
  }, /* @__PURE__ */ React7.createElement("div", {
1052
1052
  ref: draggableTargetRef,
1053
- className: StatusDialog_module_default.title
1054
- }, "Task results"), /* @__PURE__ */ React7.createElement("button", {
1055
- className: StatusDialog_module_default.closeButton,
1053
+ className: Dialog_module_default.title,
1054
+ style: { color: colorAccent, cursor: cursorDraggable }
1055
+ }, title3), !!onClose && /* @__PURE__ */ React7.createElement("button", {
1056
+ className: Dialog_module_default.closeButton,
1056
1057
  onClick: onClose
1057
1058
  }, /* @__PURE__ */ React7.createElement("img", {
1058
1059
  src: dismiss_16_filled_inline_default,
1059
1060
  alt: ""
1060
- }))), /* @__PURE__ */ React7.createElement("div", {
1061
- className: StatusDialog_module_default.commands
1062
- }, /* @__PURE__ */ React7.createElement(Button, {
1063
- primary: true,
1064
- onClick: restartTasks
1065
- }, "Restart all tasks")), /* @__PURE__ */ React7.createElement(TaskList, null)));
1061
+ }))), !!commands2 && /* @__PURE__ */ React7.createElement("div", {
1062
+ className: Dialog_module_default.commands
1063
+ }, commands2), children));
1064
+ }
1065
+
1066
+ // src/components/StatusDialog/StatusDialog.tsx
1067
+ function StatusDialog({ onClose }) {
1068
+ const cloudpack = useCloudpack();
1069
+ const restartTasks = () => {
1070
+ cloudpack.restartTasks();
1071
+ };
1072
+ return /* @__PURE__ */ React8.createElement(Dialog, {
1073
+ title: "Task results",
1074
+ draggable: true,
1075
+ onClose,
1076
+ commands: /* @__PURE__ */ React8.createElement(Button, {
1077
+ primary: true,
1078
+ onClick: restartTasks
1079
+ }, "Restart all tasks")
1080
+ }, /* @__PURE__ */ React8.createElement(TaskList, null));
1081
+ }
1082
+
1083
+ // src/components/ErrorDialog/ErrorDialog.tsx
1084
+ import { default as React10 } from "react";
1085
+
1086
+ // src/components/ErrorDialog/PathError.tsx
1087
+ import React9 from "react";
1088
+ import { default as cx3 } from "classnames";
1089
+ function PathError(props) {
1090
+ const [showContent, setshowContent] = React9.useState(false);
1091
+ const { packageName, path } = props;
1092
+ return /* @__PURE__ */ React9.createElement("div", {
1093
+ className: TaskStatus_module_default.root
1094
+ }, /* @__PURE__ */ React9.createElement("div", {
1095
+ className: cx3(TaskStatus_module_default.header, TaskStatus_module_default.error)
1096
+ }, /* @__PURE__ */ React9.createElement("button", {
1097
+ className: TaskStatus_module_default.expandButton,
1098
+ onClick: () => setshowContent(!showContent)
1099
+ }, /* @__PURE__ */ React9.createElement("img", {
1100
+ className: cx3(TaskStatus_module_default.expandIcon, !showContent && TaskStatus_module_default.collapsed),
1101
+ src: chevrondown_20_inline_default,
1102
+ alt: ""
1103
+ })), /* @__PURE__ */ React9.createElement("img", {
1104
+ className: TaskStatus_module_default.errorIcon,
1105
+ src: error_24_inline_default,
1106
+ alt: ""
1107
+ }), /* @__PURE__ */ React9.createElement("div", {
1108
+ className: TaskStatus_module_default.title
1109
+ }, `${packageName}/${path}`)), showContent && /* @__PURE__ */ React9.createElement("div", {
1110
+ className: TaskStatus_module_default.content
1111
+ }, /* @__PURE__ */ React9.createElement("div", {
1112
+ className: TaskStatus_module_default.title
1113
+ }, "Details"), /* @__PURE__ */ React9.createElement("div", {
1114
+ className: TaskStatus_module_default.nameValueArea
1115
+ }, /* @__PURE__ */ React9.createElement("div", {
1116
+ className: TaskStatus_module_default.name
1117
+ }, "Problem"), /* @__PURE__ */ React9.createElement("div", {
1118
+ className: TaskStatus_module_default.value
1119
+ }, `A deep import "${packageName}" was imported, but was unrecognized as an exported entry path.`)), /* @__PURE__ */ React9.createElement("div", {
1120
+ className: TaskStatus_module_default.nameValueArea
1121
+ }, /* @__PURE__ */ React9.createElement("div", {
1122
+ className: TaskStatus_module_default.name
1123
+ }, "Solution"), /* @__PURE__ */ React9.createElement("div", {
1124
+ className: TaskStatus_module_default.value
1125
+ }, `Remove the path from the import in your source. (Import from "${packageName}" rather than "${packageName}/${path}")`))));
1066
1126
  }
1067
- var StatusDialog = React7.memo(StatusDialogUnmemoized, (prev, next) => {
1068
- return prev.onClose === next.onClose;
1069
- });
1127
+
1128
+ // src/components/ErrorDialog/ErrorDialog.tsx
1129
+ function ErrorDialog({ unsupported }) {
1130
+ const cloudpack = useCloudpack();
1131
+ const reload = () => {
1132
+ cloudpack.restartTasks();
1133
+ };
1134
+ return /* @__PURE__ */ React10.createElement(Dialog, {
1135
+ title: "Found unsupported paths in your project",
1136
+ style: "error",
1137
+ commands: /* @__PURE__ */ React10.createElement(Button, {
1138
+ primary: true,
1139
+ onClick: reload
1140
+ }, "Reload")
1141
+ }, /* @__PURE__ */ React10.createElement("div", {
1142
+ className: TaskList_module_default.root
1143
+ }, unsupported.map((data, index) => /* @__PURE__ */ React10.createElement(PathError, {
1144
+ ...data,
1145
+ key: index
1146
+ }))));
1147
+ }
1148
+
1149
+ // src/components/ErrorDialog/useErrorEvents.ts
1150
+ import { useEffect as useEffect4, useState as useState5 } from "react";
1151
+ var useErrorEvents = () => {
1152
+ const [events, setEvents] = useState5({ unsupported: [] });
1153
+ useEffect4(() => {
1154
+ const handleError = (event) => {
1155
+ const regex = /[Mm]odule specifier,? ['"](.*?)\/(.*?)['"]/;
1156
+ const match = event.message.match(regex);
1157
+ if (match && match.length === 3) {
1158
+ setEvents((prevEvents) => ({
1159
+ ...prevEvents,
1160
+ unsupported: [...prevEvents.unsupported, { packageName: match[1], path: match[2] }]
1161
+ }));
1162
+ }
1163
+ };
1164
+ window.uncaughtErrors = window.uncaughtErrors || { errors: [], unregister: () => void 0 };
1165
+ window.uncaughtErrors.unregister();
1166
+ window.addEventListener("error", handleError);
1167
+ for (const error3 of window.uncaughtErrors.errors) {
1168
+ handleError(error3);
1169
+ }
1170
+ }, []);
1171
+ return events;
1172
+ };
1070
1173
 
1071
1174
  // src/components/StatusOverlay/StatusOverlay.tsx
1072
1175
  function StatusOverlay() {
1073
- const [isExpanded, setIsExpanded] = useState5(false);
1176
+ const [isExpanded, setIsExpanded] = useState6(false);
1074
1177
  const status = useStatus();
1075
1178
  const internal = useRef3();
1179
+ const { unsupported } = useErrorEvents();
1076
1180
  if (isExpanded === false && internal.current?.status !== "idle" && status.status === "idle" && internal.current?.totalErrors != status.totalErrors) {
1077
1181
  setIsExpanded(true);
1078
1182
  }
@@ -1081,15 +1185,17 @@ function StatusOverlay() {
1081
1185
  console.log(`Toggling minimized state to ${!isExpanded}`);
1082
1186
  setIsExpanded(!isExpanded);
1083
1187
  }, [isExpanded, setIsExpanded]);
1084
- return /* @__PURE__ */ React8.createElement("div", null, !isExpanded && /* @__PURE__ */ React8.createElement(StatusBadge, {
1188
+ return /* @__PURE__ */ React11.createElement("div", null, !!unsupported.length && /* @__PURE__ */ React11.createElement(ErrorDialog, {
1189
+ unsupported
1190
+ }), !unsupported.length && !isExpanded && /* @__PURE__ */ React11.createElement(StatusBadge, {
1085
1191
  onExpand: toggleMinimized
1086
- }), isExpanded && /* @__PURE__ */ React8.createElement(StatusDialog, {
1192
+ }), !unsupported.length && isExpanded && /* @__PURE__ */ React11.createElement(StatusDialog, {
1087
1193
  onClose: toggleMinimized
1088
1194
  }));
1089
1195
  }
1090
1196
 
1091
1197
  // src/components/ThemeProvider/ThemeProvider.tsx
1092
- import React9 from "react";
1198
+ import React12 from "react";
1093
1199
 
1094
1200
  // src/components/ThemeProvider/ThemeProvider.module.css
1095
1201
  var compiledModule7 = `.xwrpHYTQE-ThemeProvidermodulecssroot {
@@ -1106,7 +1212,7 @@ var ThemeProvider_module_default = { root: root4 };
1106
1212
 
1107
1213
  // src/components/ThemeProvider/ThemeProvider.tsx
1108
1214
  function ThemeProvider({ children }) {
1109
- return /* @__PURE__ */ React9.createElement("div", {
1215
+ return /* @__PURE__ */ React12.createElement("div", {
1110
1216
  className: ThemeProvider_module_default.root
1111
1217
  }, children);
1112
1218
  }
@@ -1114,7 +1220,7 @@ function ThemeProvider({ children }) {
1114
1220
  // src/index.tsx
1115
1221
  var rootDiv = document.createElement("div");
1116
1222
  ReactDOM.render(
1117
- /* @__PURE__ */ React10.createElement(ThemeProvider, null, /* @__PURE__ */ React10.createElement(CloudpackProvider, null, /* @__PURE__ */ React10.createElement(StatusOverlay, null))),
1223
+ /* @__PURE__ */ React13.createElement(ThemeProvider, null, /* @__PURE__ */ React13.createElement(CloudpackProvider, null, /* @__PURE__ */ React13.createElement(StatusOverlay, null))),
1118
1224
  rootDiv
1119
1225
  );
1120
1226
  document.body.appendChild(rootDiv);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "type": "buildStatus",
3
- "buildId": "55e0c497-aac9-4534-84c2-2af0c3328d62",
3
+ "buildId": "cc1a4d0c-a726-4192-853d-c99634d24523",
4
4
  "buildStatus": "complete",
5
5
  "internalError": null,
6
6
  "warnings": [],
@@ -8,5 +8,5 @@
8
8
  "outputFilePaths": [
9
9
  "/home/runner/work/cloudpack/cloudpack/packages/overlay/dist/lib/index.js"
10
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/StatusDialog.module.css\": {\n \"bytes\": 2579,\n \"imports\": []\n },\n \"src/images/dismiss-16-filled.inline.svg\": {\n \"bytes\": 718,\n \"imports\": []\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\": 3953,\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/StatusDialog/StatusDialog.tsx\": {\n \"bytes\": 1489,\n \"imports\": [\n {\n \"path\": \"src/components/StatusDialog/StatusDialog.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 \"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 },\n \"src/components/StatusOverlay/StatusOverlay.tsx\": {\n \"bytes\": 1145,\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 },\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\": 883\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\": 1466\n },\n \"src/components/StatusDialog/StatusDialog.module.css\": {\n \"bytesInOutput\": 2376\n },\n \"src/images/dismiss-16-filled.inline.svg\": {\n \"bytesInOutput\": 1029\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\": 1894\n },\n \"src/components/StatusDialog/TaskStatus.module.css\": {\n \"bytesInOutput\": 3690\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/ThemeProvider/ThemeProvider.tsx\": {\n \"bytesInOutput\": 189\n },\n \"src/components/ThemeProvider/ThemeProvider.module.css\": {\n \"bytesInOutput\": 561\n }\n },\n \"bytes\": 40081\n }\n }\n}\n"
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"
12
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,UAAU,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAe;IAC1F,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,kBAAkB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IACxC,MAAM,WAAW,GAAG,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC;IACvE,MAAM,eAAe,GAAG,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IAEvD,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAE/F,OAAO,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO;QAC5B,6BAAK,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE;YACtF,6BAAK,SAAS,EAAE,MAAM,CAAC,SAAS;gBAC9B,6BACE,GAAG,EAAE,kBAAkB,EACvB,SAAS,EAAE,MAAM,CAAC,KAAK,EACvB,KAAK,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,IAErD,KAAK,CACF;gBACL,CAAC,CAAC,OAAO,IAAI,CACZ,gCAAQ,SAAS,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,EAAE,OAAO;oBACrD,6BAAK,GAAG,EAAE,SAAS,EAAE,GAAG,EAAC,EAAE,GAAG,CACvB,CACV,CACG;YACL,CAAC,CAAC,QAAQ,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,QAAQ,IAAG,QAAQ,CAAO;YAC/D,QAAQ,CACL,CACF,CACP,CAAC;AACJ,CAAC"}
@@ -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;YAC9C,6BAAK,SAAS,EAAE,MAAM,CAAC,SAAS;gBAC9B,6BAAK,GAAG,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,CAAC,KAAK,mBAE/C;gBACN,gCAAQ,SAAS,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,EAAE,OAAO;oBACrD,6BAAK,GAAG,EAAE,SAAS,EAAE,GAAG,EAAC,EAAE,GAAG,CACvB,CACL;YACN,6BAAK,SAAS,EAAE,MAAM,CAAC,QAAQ;gBAC7B,oBAAC,MAAM,IAAC,OAAO,QAAC,OAAO,EAAE,YAAY,wBAE5B,CACL;YACN,oBAAC,QAAQ,OAAG,CACR,CACF,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,sBAAsB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;IAC5E,OAAO,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,OAAO,CAAC;AACvC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"StatusDialog.js","sourceRoot":"","sources":["../../../src/components/StatusDialog/StatusDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAM7C,MAAM,UAAU,YAAY,CAAC,EAAE,OAAO,EAAqB;IACzD,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IAEjC,MAAM,YAAY,GAAG,GAAG,EAAE;QACxB,SAAS,CAAC,YAAY,EAAE,CAAC;IAC3B,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,MAAM,IACL,KAAK,EAAC,cAAc,EACpB,SAAS,QACT,OAAO,EAAE,OAAO,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,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAwB,MAAM,mCAAmC,CAAC;AAEpF,MAAM,UAAU,aAAa;IAC3B,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IAC7D,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,QAAQ,GAAG,MAAM,EAA+B,CAAC;IAEvD,yDAAyD;IACzD,4CAA4C;IAC5C,IACE,UAAU,KAAK,KAAK;QACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM;QACnC,MAAM,CAAC,MAAM,KAAK,MAAM;QACxB,QAAQ,CAAC,OAAO,EAAE,WAAW,IAAI,MAAM,CAAC,WAAW,EACnD;QACA,aAAa,CAAC,IAAI,CAAC,CAAC;KACrB;IACD,QAAQ,CAAC,OAAO,GAAG,MAAM,CAAC;IAE1B,MAAM,eAAe,GAAG,WAAW,CAAC,GAAG,EAAE;QACvC,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,UAAU,EAAE,CAAC,CAAC;QAC1D,aAAa,CAAC,CAAC,UAAU,CAAC,CAAC;IAC7B,CAAC,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC;IAEhC,OAAO,CACL;QACG,CAAC,UAAU,IAAI,oBAAC,WAAW,IAAC,QAAQ,EAAE,eAAe,GAAI;QACzD,UAAU,IAAI,oBAAC,YAAY,IAAC,OAAO,EAAE,eAAe,GAAI,CACrD,CACP,CAAC;AACJ,CAAC"}
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,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAwB,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAElE,MAAM,UAAU,aAAa;IAC3B,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IAC7D,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,QAAQ,GAAG,MAAM,EAA+B,CAAC;IACvD,MAAM,EAAE,WAAW,EAAE,GAAG,cAAc,EAAE,CAAC;IAEzC,yDAAyD;IACzD,4CAA4C;IAC5C,IACE,UAAU,KAAK,KAAK;QACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM;QACnC,MAAM,CAAC,MAAM,KAAK,MAAM;QACxB,QAAQ,CAAC,OAAO,EAAE,WAAW,IAAI,MAAM,CAAC,WAAW,EACnD;QACA,aAAa,CAAC,IAAI,CAAC,CAAC;KACrB;IACD,QAAQ,CAAC,OAAO,GAAG,MAAM,CAAC;IAE1B,MAAM,eAAe,GAAG,WAAW,CAAC,GAAG,EAAE;QACvC,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,UAAU,EAAE,CAAC,CAAC;QAC1D,aAAa,CAAC,CAAC,UAAU,CAAC,CAAC;IAC7B,CAAC,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC;IAEhC,OAAO,CACL;QACG,CAAC,CAAC,WAAW,CAAC,MAAM,IAAI,oBAAC,WAAW,IAAC,WAAW,EAAE,WAAW,GAAI;QACjE,CAAC,WAAW,CAAC,MAAM,IAAI,CAAC,UAAU,IAAI,oBAAC,WAAW,IAAC,QAAQ,EAAE,eAAe,GAAI;QAChF,CAAC,WAAW,CAAC,MAAM,IAAI,UAAU,IAAI,oBAAC,YAAY,IAAC,OAAO,EAAE,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.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "The Cloudpack overlay ux.",
5
5
  "license": "MIT",
6
6
  "types": "./lib/index.d.ts",