artifactuse 0.2.0 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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;
@@ -40,6 +40,9 @@ export function createArtifactuseStores(config?: {
40
40
  isPanelOpen: boolean;
41
41
  viewMode: string;
42
42
  isFullscreen: boolean;
43
+ openTabs: any[];
44
+ tabViewModes: {};
45
+ forceEmptyView: boolean;
43
46
  };
44
47
  subscribe: (callback: any) => () => void;
45
48
  addArtifact: (artifact: any) => void;
@@ -55,6 +58,11 @@ export function createArtifactuseStores(config?: {
55
58
  setPanelOpen: (isOpen: any) => void;
56
59
  setViewMode: (mode: any) => void;
57
60
  setFullscreen: (isFullscreen: any) => void;
61
+ setForceEmptyView: (value: any) => void;
62
+ openTab: (artifactId: any) => void;
63
+ closeTab: (artifactId: any) => void;
64
+ closeOtherTabs: (keepArtifactId: any) => void;
65
+ closeAllTabs: () => void;
58
66
  clear: () => void;
59
67
  batch: (updateFn: any) => void;
60
68
  };
@@ -64,6 +72,9 @@ export function createArtifactuseStores(config?: {
64
72
  isPanelOpen: boolean;
65
73
  viewMode: string;
66
74
  isFullscreen: boolean;
75
+ openTabs: any[];
76
+ tabViewModes: {};
77
+ forceEmptyView: boolean;
67
78
  };
68
79
  subscribe: (callback: any) => () => void;
69
80
  processMessage: (content: any, messageId: any, overrides?: {}) => {
@@ -101,12 +112,16 @@ export function createArtifactuseStores(config?: {
101
112
  createdAt: string;
102
113
  };
103
114
  updateFile: (artifactOrId: any, code: any, options?: {}) => any;
115
+ openPanel: () => void;
104
116
  closePanel: () => void;
105
117
  togglePanel: () => void;
106
118
  toggleFullscreen: () => void;
107
119
  setViewMode: (mode: any) => void;
108
120
  getPanelUrl: (artifact: any, options?: {}) => any;
109
121
  sendToPanel: (action: any, data: any) => void;
122
+ closeTab: (artifactId: any) => void;
123
+ closeOtherTabs: (artifactId: any) => void;
124
+ closeAllTabs: () => void;
110
125
  hasPanel: (artifact: any) => any;
111
126
  registerPanel: (typesOrLang: string | string[], panel: string | object) => void;
112
127
  unregisterPanel: (typesOrLang: string | string[]) => void;
@@ -216,6 +231,7 @@ export function createArtifactuseStores(config?: {
216
231
  createdAt: string;
217
232
  };
218
233
  updateFile: (artifactOrId: any, code: any, options?: {}) => any;
234
+ openPanel: () => void;
219
235
  closePanel: () => void;
220
236
  togglePanel: () => void;
221
237
  toggleFullscreen: () => void;
@@ -226,6 +242,9 @@ export function createArtifactuseStores(config?: {
226
242
  registerPanel: (type: any, panel: any) => void;
227
243
  unregisterPanel: (type: any) => void;
228
244
  getPanelTypes: () => any;
245
+ closeTab: (artifactId: any) => void;
246
+ closeOtherTabs: (artifactId: any) => void;
247
+ closeAllTabs: () => void;
229
248
  on: (event: any, callback: any) => () => void;
230
249
  off: (event: any, callback: any) => void;
231
250
  clearArtifacts: () => void;
@@ -258,6 +277,9 @@ export function setArtifactuseContext(config?: {}): {
258
277
  isPanelOpen: boolean;
259
278
  viewMode: string;
260
279
  isFullscreen: boolean;
280
+ openTabs: any[];
281
+ tabViewModes: {};
282
+ forceEmptyView: boolean;
261
283
  };
262
284
  subscribe: (callback: any) => () => void;
263
285
  addArtifact: (artifact: any) => void;
@@ -273,6 +295,11 @@ export function setArtifactuseContext(config?: {}): {
273
295
  setPanelOpen: (isOpen: any) => void;
274
296
  setViewMode: (mode: any) => void;
275
297
  setFullscreen: (isFullscreen: any) => void;
298
+ setForceEmptyView: (value: any) => void;
299
+ openTab: (artifactId: any) => void;
300
+ closeTab: (artifactId: any) => void;
301
+ closeOtherTabs: (keepArtifactId: any) => void;
302
+ closeAllTabs: () => void;
276
303
  clear: () => void;
277
304
  batch: (updateFn: any) => void;
278
305
  };
@@ -282,6 +309,9 @@ export function setArtifactuseContext(config?: {}): {
282
309
  isPanelOpen: boolean;
283
310
  viewMode: string;
284
311
  isFullscreen: boolean;
312
+ openTabs: any[];
313
+ tabViewModes: {};
314
+ forceEmptyView: boolean;
285
315
  };
286
316
  subscribe: (callback: any) => () => void;
287
317
  processMessage: (content: any, messageId: any, overrides?: {}) => {
@@ -319,12 +349,16 @@ export function setArtifactuseContext(config?: {}): {
319
349
  createdAt: string;
320
350
  };
321
351
  updateFile: (artifactOrId: any, code: any, options?: {}) => any;
352
+ openPanel: () => void;
322
353
  closePanel: () => void;
323
354
  togglePanel: () => void;
324
355
  toggleFullscreen: () => void;
325
356
  setViewMode: (mode: any) => void;
326
357
  getPanelUrl: (artifact: any, options?: {}) => any;
327
358
  sendToPanel: (action: any, data: any) => void;
359
+ closeTab: (artifactId: any) => void;
360
+ closeOtherTabs: (artifactId: any) => void;
361
+ closeAllTabs: () => void;
328
362
  hasPanel: (artifact: any) => any;
329
363
  registerPanel: (typesOrLang: string | string[], panel: string | object) => void;
330
364
  unregisterPanel: (typesOrLang: string | string[]) => void;
@@ -434,6 +468,7 @@ export function setArtifactuseContext(config?: {}): {
434
468
  createdAt: string;
435
469
  };
436
470
  updateFile: (artifactOrId: any, code: any, options?: {}) => any;
471
+ openPanel: () => void;
437
472
  closePanel: () => void;
438
473
  togglePanel: () => void;
439
474
  toggleFullscreen: () => void;
@@ -444,6 +479,9 @@ export function setArtifactuseContext(config?: {}): {
444
479
  registerPanel: (type: any, panel: any) => void;
445
480
  unregisterPanel: (type: any) => void;
446
481
  getPanelTypes: () => any;
482
+ closeTab: (artifactId: any) => void;
483
+ closeOtherTabs: (artifactId: any) => void;
484
+ closeAllTabs: () => void;
447
485
  on: (event: any, callback: any) => () => void;
448
486
  off: (event: any, callback: any) => void;
449
487
  clearArtifacts: () => void;
@@ -469,6 +507,9 @@ export function useArtifactuse(config?: {}): {
469
507
  isPanelOpen: boolean;
470
508
  viewMode: string;
471
509
  isFullscreen: boolean;
510
+ openTabs: any[];
511
+ tabViewModes: {};
512
+ forceEmptyView: boolean;
472
513
  };
473
514
  subscribe: (callback: any) => () => void;
474
515
  addArtifact: (artifact: any) => void;
@@ -484,6 +525,11 @@ export function useArtifactuse(config?: {}): {
484
525
  setPanelOpen: (isOpen: any) => void;
485
526
  setViewMode: (mode: any) => void;
486
527
  setFullscreen: (isFullscreen: any) => void;
528
+ setForceEmptyView: (value: any) => void;
529
+ openTab: (artifactId: any) => void;
530
+ closeTab: (artifactId: any) => void;
531
+ closeOtherTabs: (keepArtifactId: any) => void;
532
+ closeAllTabs: () => void;
487
533
  clear: () => void;
488
534
  batch: (updateFn: any) => void;
489
535
  };
@@ -493,6 +539,9 @@ export function useArtifactuse(config?: {}): {
493
539
  isPanelOpen: boolean;
494
540
  viewMode: string;
495
541
  isFullscreen: boolean;
542
+ openTabs: any[];
543
+ tabViewModes: {};
544
+ forceEmptyView: boolean;
496
545
  };
497
546
  subscribe: (callback: any) => () => void;
498
547
  processMessage: (content: any, messageId: any, overrides?: {}) => {
@@ -530,12 +579,16 @@ export function useArtifactuse(config?: {}): {
530
579
  createdAt: string;
531
580
  };
532
581
  updateFile: (artifactOrId: any, code: any, options?: {}) => any;
582
+ openPanel: () => void;
533
583
  closePanel: () => void;
534
584
  togglePanel: () => void;
535
585
  toggleFullscreen: () => void;
536
586
  setViewMode: (mode: any) => void;
537
587
  getPanelUrl: (artifact: any, options?: {}) => any;
538
588
  sendToPanel: (action: any, data: any) => void;
589
+ closeTab: (artifactId: any) => void;
590
+ closeOtherTabs: (artifactId: any) => void;
591
+ closeAllTabs: () => void;
539
592
  hasPanel: (artifact: any) => any;
540
593
  registerPanel: (typesOrLang: string | string[], panel: string | object) => void;
541
594
  unregisterPanel: (typesOrLang: string | string[]) => void;
@@ -645,6 +698,7 @@ export function useArtifactuse(config?: {}): {
645
698
  createdAt: string;
646
699
  };
647
700
  updateFile: (artifactOrId: any, code: any, options?: {}) => any;
701
+ openPanel: () => void;
648
702
  closePanel: () => void;
649
703
  togglePanel: () => void;
650
704
  toggleFullscreen: () => void;
@@ -655,6 +709,9 @@ export function useArtifactuse(config?: {}): {
655
709
  registerPanel: (type: any, panel: any) => void;
656
710
  unregisterPanel: (type: any) => void;
657
711
  getPanelTypes: () => any;
712
+ closeTab: (artifactId: any) => void;
713
+ closeOtherTabs: (artifactId: any) => void;
714
+ closeAllTabs: () => void;
658
715
  on: (event: any, callback: any) => () => void;
659
716
  off: (event: any, callback: any) => void;
660
717
  clearArtifacts: () => void;