artifactuse 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/index.d.ts +11 -0
- package/dist/core/state.d.ts +6 -0
- package/dist/{index-llShix6s.js → index-INYOxlcg.js} +1134 -910
- package/dist/index.js +1 -1
- package/dist/react/index.js +408 -389
- package/dist/styles/components/panel.css +106 -0
- package/dist/svelte/index.d.ts +42 -0
- package/dist/svelte/index.js +1915 -1875
- package/dist/vue/index.d.ts +32 -0
- package/dist/vue/index.js +1258 -1191
- package/dist/vue2/composables.d.ts +32 -0
- package/dist/vue2/index.js +535 -57
- package/package.json +1 -1
|
@@ -772,6 +772,112 @@
|
|
|
772
772
|
background: rgba(var(--artifactuse-success), 0.1);
|
|
773
773
|
}
|
|
774
774
|
|
|
775
|
+
/* File tabs (multi-tab mode) */
|
|
776
|
+
.artifactuse-panel__file-tabs {
|
|
777
|
+
display: flex;
|
|
778
|
+
border-bottom: 1px solid rgba(var(--artifactuse-border), 1);
|
|
779
|
+
background: rgba(var(--artifactuse-bg-secondary), 1);
|
|
780
|
+
overflow: hidden;
|
|
781
|
+
flex-shrink: 0;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
.artifactuse-panel__file-tabs-scroll {
|
|
785
|
+
display: flex;
|
|
786
|
+
overflow-x: auto;
|
|
787
|
+
scrollbar-width: none;
|
|
788
|
+
-ms-overflow-style: none;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
.artifactuse-panel__file-tabs-scroll::-webkit-scrollbar {
|
|
792
|
+
display: none;
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
.artifactuse-panel__file-tab {
|
|
796
|
+
display: flex;
|
|
797
|
+
align-items: center;
|
|
798
|
+
gap: 6px;
|
|
799
|
+
padding: 6px 8px 6px 12px;
|
|
800
|
+
border: none;
|
|
801
|
+
border-right: 1px solid rgba(var(--artifactuse-border), 0.5);
|
|
802
|
+
background: transparent;
|
|
803
|
+
color: rgba(var(--artifactuse-text-secondary), 1);
|
|
804
|
+
font-size: 12px;
|
|
805
|
+
cursor: pointer;
|
|
806
|
+
white-space: nowrap;
|
|
807
|
+
min-width: auto;
|
|
808
|
+
max-width: 160px;
|
|
809
|
+
transition: background 0.15s, color 0.15s;
|
|
810
|
+
position: relative;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
.artifactuse-panel__file-tab:hover {
|
|
814
|
+
background: rgba(var(--artifactuse-bg-tertiary), 1);
|
|
815
|
+
color: rgba(var(--artifactuse-text), 1);
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
.artifactuse-panel__file-tab--active {
|
|
819
|
+
background: rgba(var(--artifactuse-bg), 1);
|
|
820
|
+
color: rgba(var(--artifactuse-text), 1);
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
.artifactuse-panel__file-tab--active::after {
|
|
824
|
+
content: '';
|
|
825
|
+
position: absolute;
|
|
826
|
+
bottom: 0;
|
|
827
|
+
left: 0;
|
|
828
|
+
right: 0;
|
|
829
|
+
height: 2px;
|
|
830
|
+
background: rgba(var(--artifactuse-primary), 1);
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
.artifactuse-panel__file-tab-icon {
|
|
834
|
+
flex-shrink: 0;
|
|
835
|
+
width: 14px;
|
|
836
|
+
height: 14px;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
.artifactuse-panel__file-tab-icon svg {
|
|
840
|
+
width: 14px;
|
|
841
|
+
height: 14px;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
.artifactuse-panel__file-tab-title {
|
|
845
|
+
overflow: hidden;
|
|
846
|
+
text-overflow: ellipsis;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
.artifactuse-panel__file-tab-close {
|
|
850
|
+
flex-shrink: 0;
|
|
851
|
+
display: flex;
|
|
852
|
+
align-items: center;
|
|
853
|
+
justify-content: center;
|
|
854
|
+
width: 16px;
|
|
855
|
+
height: 16px;
|
|
856
|
+
border: none;
|
|
857
|
+
background: transparent;
|
|
858
|
+
color: rgba(var(--artifactuse-text-muted), 1);
|
|
859
|
+
border-radius: 3px;
|
|
860
|
+
cursor: pointer;
|
|
861
|
+
padding: 0;
|
|
862
|
+
opacity: 0;
|
|
863
|
+
transition: opacity 0.15s, background 0.15s;
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
.artifactuse-panel__file-tab:hover .artifactuse-panel__file-tab-close,
|
|
867
|
+
.artifactuse-panel__file-tab--active .artifactuse-panel__file-tab-close {
|
|
868
|
+
opacity: 1;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
.artifactuse-panel__file-tab-close:hover {
|
|
872
|
+
background: rgba(var(--artifactuse-border), 1);
|
|
873
|
+
color: rgba(var(--artifactuse-text), 1);
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
.artifactuse-panel__file-tab-close svg {
|
|
877
|
+
width: 12px;
|
|
878
|
+
height: 12px;
|
|
879
|
+
}
|
|
880
|
+
|
|
775
881
|
/* Navigation */
|
|
776
882
|
.artifactuse-panel__nav {
|
|
777
883
|
position: relative;
|
package/dist/svelte/index.d.ts
CHANGED
|
@@ -40,6 +40,8 @@ export function createArtifactuseStores(config?: {
|
|
|
40
40
|
isPanelOpen: boolean;
|
|
41
41
|
viewMode: string;
|
|
42
42
|
isFullscreen: boolean;
|
|
43
|
+
openTabs: any[];
|
|
44
|
+
tabViewModes: {};
|
|
43
45
|
};
|
|
44
46
|
subscribe: (callback: any) => () => void;
|
|
45
47
|
addArtifact: (artifact: any) => void;
|
|
@@ -55,6 +57,10 @@ export function createArtifactuseStores(config?: {
|
|
|
55
57
|
setPanelOpen: (isOpen: any) => void;
|
|
56
58
|
setViewMode: (mode: any) => void;
|
|
57
59
|
setFullscreen: (isFullscreen: any) => void;
|
|
60
|
+
openTab: (artifactId: any) => void;
|
|
61
|
+
closeTab: (artifactId: any) => void;
|
|
62
|
+
closeOtherTabs: (keepArtifactId: any) => void;
|
|
63
|
+
closeAllTabs: () => void;
|
|
58
64
|
clear: () => void;
|
|
59
65
|
batch: (updateFn: any) => void;
|
|
60
66
|
};
|
|
@@ -64,6 +70,8 @@ export function createArtifactuseStores(config?: {
|
|
|
64
70
|
isPanelOpen: boolean;
|
|
65
71
|
viewMode: string;
|
|
66
72
|
isFullscreen: boolean;
|
|
73
|
+
openTabs: any[];
|
|
74
|
+
tabViewModes: {};
|
|
67
75
|
};
|
|
68
76
|
subscribe: (callback: any) => () => void;
|
|
69
77
|
processMessage: (content: any, messageId: any, overrides?: {}) => {
|
|
@@ -107,6 +115,9 @@ export function createArtifactuseStores(config?: {
|
|
|
107
115
|
setViewMode: (mode: any) => void;
|
|
108
116
|
getPanelUrl: (artifact: any, options?: {}) => any;
|
|
109
117
|
sendToPanel: (action: any, data: any) => void;
|
|
118
|
+
closeTab: (artifactId: any) => void;
|
|
119
|
+
closeOtherTabs: (artifactId: any) => void;
|
|
120
|
+
closeAllTabs: () => void;
|
|
110
121
|
hasPanel: (artifact: any) => any;
|
|
111
122
|
registerPanel: (typesOrLang: string | string[], panel: string | object) => void;
|
|
112
123
|
unregisterPanel: (typesOrLang: string | string[]) => void;
|
|
@@ -226,6 +237,9 @@ export function createArtifactuseStores(config?: {
|
|
|
226
237
|
registerPanel: (type: any, panel: any) => void;
|
|
227
238
|
unregisterPanel: (type: any) => void;
|
|
228
239
|
getPanelTypes: () => any;
|
|
240
|
+
closeTab: (artifactId: any) => void;
|
|
241
|
+
closeOtherTabs: (artifactId: any) => void;
|
|
242
|
+
closeAllTabs: () => void;
|
|
229
243
|
on: (event: any, callback: any) => () => void;
|
|
230
244
|
off: (event: any, callback: any) => void;
|
|
231
245
|
clearArtifacts: () => void;
|
|
@@ -258,6 +272,8 @@ export function setArtifactuseContext(config?: {}): {
|
|
|
258
272
|
isPanelOpen: boolean;
|
|
259
273
|
viewMode: string;
|
|
260
274
|
isFullscreen: boolean;
|
|
275
|
+
openTabs: any[];
|
|
276
|
+
tabViewModes: {};
|
|
261
277
|
};
|
|
262
278
|
subscribe: (callback: any) => () => void;
|
|
263
279
|
addArtifact: (artifact: any) => void;
|
|
@@ -273,6 +289,10 @@ export function setArtifactuseContext(config?: {}): {
|
|
|
273
289
|
setPanelOpen: (isOpen: any) => void;
|
|
274
290
|
setViewMode: (mode: any) => void;
|
|
275
291
|
setFullscreen: (isFullscreen: any) => void;
|
|
292
|
+
openTab: (artifactId: any) => void;
|
|
293
|
+
closeTab: (artifactId: any) => void;
|
|
294
|
+
closeOtherTabs: (keepArtifactId: any) => void;
|
|
295
|
+
closeAllTabs: () => void;
|
|
276
296
|
clear: () => void;
|
|
277
297
|
batch: (updateFn: any) => void;
|
|
278
298
|
};
|
|
@@ -282,6 +302,8 @@ export function setArtifactuseContext(config?: {}): {
|
|
|
282
302
|
isPanelOpen: boolean;
|
|
283
303
|
viewMode: string;
|
|
284
304
|
isFullscreen: boolean;
|
|
305
|
+
openTabs: any[];
|
|
306
|
+
tabViewModes: {};
|
|
285
307
|
};
|
|
286
308
|
subscribe: (callback: any) => () => void;
|
|
287
309
|
processMessage: (content: any, messageId: any, overrides?: {}) => {
|
|
@@ -325,6 +347,9 @@ export function setArtifactuseContext(config?: {}): {
|
|
|
325
347
|
setViewMode: (mode: any) => void;
|
|
326
348
|
getPanelUrl: (artifact: any, options?: {}) => any;
|
|
327
349
|
sendToPanel: (action: any, data: any) => void;
|
|
350
|
+
closeTab: (artifactId: any) => void;
|
|
351
|
+
closeOtherTabs: (artifactId: any) => void;
|
|
352
|
+
closeAllTabs: () => void;
|
|
328
353
|
hasPanel: (artifact: any) => any;
|
|
329
354
|
registerPanel: (typesOrLang: string | string[], panel: string | object) => void;
|
|
330
355
|
unregisterPanel: (typesOrLang: string | string[]) => void;
|
|
@@ -444,6 +469,9 @@ export function setArtifactuseContext(config?: {}): {
|
|
|
444
469
|
registerPanel: (type: any, panel: any) => void;
|
|
445
470
|
unregisterPanel: (type: any) => void;
|
|
446
471
|
getPanelTypes: () => any;
|
|
472
|
+
closeTab: (artifactId: any) => void;
|
|
473
|
+
closeOtherTabs: (artifactId: any) => void;
|
|
474
|
+
closeAllTabs: () => void;
|
|
447
475
|
on: (event: any, callback: any) => () => void;
|
|
448
476
|
off: (event: any, callback: any) => void;
|
|
449
477
|
clearArtifacts: () => void;
|
|
@@ -469,6 +497,8 @@ export function useArtifactuse(config?: {}): {
|
|
|
469
497
|
isPanelOpen: boolean;
|
|
470
498
|
viewMode: string;
|
|
471
499
|
isFullscreen: boolean;
|
|
500
|
+
openTabs: any[];
|
|
501
|
+
tabViewModes: {};
|
|
472
502
|
};
|
|
473
503
|
subscribe: (callback: any) => () => void;
|
|
474
504
|
addArtifact: (artifact: any) => void;
|
|
@@ -484,6 +514,10 @@ export function useArtifactuse(config?: {}): {
|
|
|
484
514
|
setPanelOpen: (isOpen: any) => void;
|
|
485
515
|
setViewMode: (mode: any) => void;
|
|
486
516
|
setFullscreen: (isFullscreen: any) => void;
|
|
517
|
+
openTab: (artifactId: any) => void;
|
|
518
|
+
closeTab: (artifactId: any) => void;
|
|
519
|
+
closeOtherTabs: (keepArtifactId: any) => void;
|
|
520
|
+
closeAllTabs: () => void;
|
|
487
521
|
clear: () => void;
|
|
488
522
|
batch: (updateFn: any) => void;
|
|
489
523
|
};
|
|
@@ -493,6 +527,8 @@ export function useArtifactuse(config?: {}): {
|
|
|
493
527
|
isPanelOpen: boolean;
|
|
494
528
|
viewMode: string;
|
|
495
529
|
isFullscreen: boolean;
|
|
530
|
+
openTabs: any[];
|
|
531
|
+
tabViewModes: {};
|
|
496
532
|
};
|
|
497
533
|
subscribe: (callback: any) => () => void;
|
|
498
534
|
processMessage: (content: any, messageId: any, overrides?: {}) => {
|
|
@@ -536,6 +572,9 @@ export function useArtifactuse(config?: {}): {
|
|
|
536
572
|
setViewMode: (mode: any) => void;
|
|
537
573
|
getPanelUrl: (artifact: any, options?: {}) => any;
|
|
538
574
|
sendToPanel: (action: any, data: any) => void;
|
|
575
|
+
closeTab: (artifactId: any) => void;
|
|
576
|
+
closeOtherTabs: (artifactId: any) => void;
|
|
577
|
+
closeAllTabs: () => void;
|
|
539
578
|
hasPanel: (artifact: any) => any;
|
|
540
579
|
registerPanel: (typesOrLang: string | string[], panel: string | object) => void;
|
|
541
580
|
unregisterPanel: (typesOrLang: string | string[]) => void;
|
|
@@ -655,6 +694,9 @@ export function useArtifactuse(config?: {}): {
|
|
|
655
694
|
registerPanel: (type: any, panel: any) => void;
|
|
656
695
|
unregisterPanel: (type: any) => void;
|
|
657
696
|
getPanelTypes: () => any;
|
|
697
|
+
closeTab: (artifactId: any) => void;
|
|
698
|
+
closeOtherTabs: (artifactId: any) => void;
|
|
699
|
+
closeAllTabs: () => void;
|
|
658
700
|
on: (event: any, callback: any) => () => void;
|
|
659
701
|
off: (event: any, callback: any) => void;
|
|
660
702
|
clearArtifacts: () => void;
|