@qodalis/vue-cli 2.0.0-beta.10 → 2.0.0-beta.11

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/index.mjs CHANGED
@@ -256,38 +256,97 @@ var CliPanel = defineComponent3({
256
256
  type: Function,
257
257
  default: void 0
258
258
  },
259
+ collapsed: { type: Boolean, default: void 0 },
260
+ hidden: { type: Boolean, default: void 0 },
261
+ maximized: { type: Boolean, default: void 0 },
262
+ activeTabId: { type: Number, default: void 0 },
263
+ position: { type: String, default: void 0 },
264
+ height: { type: Number, default: void 0 },
265
+ width: { type: Number, default: void 0 },
259
266
  style: {
260
267
  type: Object,
261
268
  default: void 0
262
269
  },
263
270
  class: { type: String, default: void 0 }
264
271
  },
265
- setup(props) {
272
+ emits: [
273
+ "update:collapsed",
274
+ "update:hidden",
275
+ "update:maximized",
276
+ "update:activeTabId",
277
+ "update:position",
278
+ "update:height",
279
+ "update:width",
280
+ "close",
281
+ "tab-added",
282
+ "tab-closed",
283
+ "pane-split",
284
+ "pane-closed"
285
+ ],
286
+ setup(props, { expose, emit }) {
266
287
  const config = inject2(CliConfigKey, null);
267
288
  const mergedOptions = computed(() => props.options ?? config?.options);
268
289
  const mergedModules = computed(() => props.modules ?? config?.modules);
269
290
  const mergedProcessors = computed(() => props.processors ?? config?.processors);
270
291
  const mergedServices = computed(() => props.services ?? config?.services);
271
292
  const visible = ref2(true);
272
- const collapsed = ref2(mergedOptions.value?.isCollapsed ?? true);
273
- const maximized = ref2(false);
274
- const panelHeight = ref2(600);
275
- const panelWidth = ref2(400);
293
+ const internalCollapsed = ref2(mergedOptions.value?.isCollapsed ?? true);
294
+ const internalMaximized = ref2(false);
295
+ const internalHeight = ref2(600);
296
+ const internalWidth = ref2(400);
276
297
  const prevHeight = ref2(600);
277
298
  const prevWidth = ref2(400);
278
299
  const initialized = ref2(false);
279
- const hidden = ref2(props.options?.isHidden ?? false);
300
+ const internalHidden = ref2(props.options?.isHidden ?? false);
280
301
  let preHideCollapsed = true;
281
- const position = ref2(loadPanelPosition() ?? mergedOptions.value?.position ?? "bottom");
302
+ const internalActiveTabId = ref2(0);
303
+ const internalPosition = ref2(
304
+ loadPanelPosition() ?? mergedOptions.value?.position ?? "bottom"
305
+ );
306
+ const resolvedCollapsed = computed(() => props.collapsed !== void 0 ? props.collapsed : internalCollapsed.value);
307
+ const resolvedHidden = computed(() => props.hidden !== void 0 ? props.hidden : internalHidden.value);
308
+ const resolvedMaximized = computed(() => props.maximized !== void 0 ? props.maximized : internalMaximized.value);
309
+ const resolvedActiveTabId = computed(() => props.activeTabId !== void 0 ? props.activeTabId : internalActiveTabId.value);
310
+ const resolvedHeight = computed(() => props.height !== void 0 ? props.height : internalHeight.value);
311
+ const resolvedWidth = computed(() => props.width !== void 0 ? props.width : internalWidth.value);
312
+ const resolvedPosition = computed(() => props.position !== void 0 ? props.position : internalPosition.value);
313
+ function updateCollapsed(value) {
314
+ internalCollapsed.value = value;
315
+ emit("update:collapsed", value);
316
+ }
317
+ function updateHidden(value) {
318
+ internalHidden.value = value;
319
+ emit("update:hidden", value);
320
+ }
321
+ function updateMaximized(value) {
322
+ internalMaximized.value = value;
323
+ emit("update:maximized", value);
324
+ }
325
+ function updateActiveTabId(value) {
326
+ internalActiveTabId.value = value;
327
+ emit("update:activeTabId", value);
328
+ }
329
+ function updateHeight(value) {
330
+ internalHeight.value = value;
331
+ emit("update:height", value);
332
+ }
333
+ function updateWidth(value) {
334
+ internalWidth.value = value;
335
+ emit("update:width", value);
336
+ }
337
+ function updatePosition(value) {
338
+ internalPosition.value = value;
339
+ savePanelPosition(value);
340
+ emit("update:position", value);
341
+ }
282
342
  const closable = computed(() => mergedOptions.value?.closable ?? true);
283
343
  const resizable = computed(() => mergedOptions.value?.resizable ?? true);
284
- const isHorizontal = computed(() => position.value === "left" || position.value === "right");
344
+ const isHorizontal = computed(() => resolvedPosition.value === "left" || resolvedPosition.value === "right");
285
345
  const hideable = computed(() => mergedOptions.value?.hideable ?? true);
286
346
  const hideAlignment = computed(() => mergedOptions.value?.hideAlignment ?? "center");
287
347
  const syncTheme = computed(() => mergedOptions.value?.syncTheme ?? false);
288
348
  const themeStyles = ref2({});
289
349
  const tabs = ref2([]);
290
- const activeTabId = ref2(0);
291
350
  const activePaneId = ref2(0);
292
351
  let nextTabId = 1;
293
352
  let nextPaneId = 1;
@@ -308,19 +367,19 @@ var CliPanel = defineComponent3({
308
367
  };
309
368
  const panelResizing = ref2(false);
310
369
  let panelResizeState = { startY: 0, startHeight: 0, startX: 0, startWidth: 0 };
311
- function addTab() {
312
- const paneId = nextPaneId++;
370
+ function addTab(title) {
313
371
  const tabId = nextTabId++;
314
- const pane = { id: paneId, widthPercent: 100 };
315
- const tab = {
372
+ const paneId = nextPaneId++;
373
+ tabs.value = [...tabs.value, {
316
374
  id: tabId,
317
- title: `Terminal ${tabId}`,
375
+ title: title ?? `Terminal ${tabId}`,
318
376
  isEditing: false,
319
- panes: [pane]
320
- };
321
- tabs.value.push(tab);
322
- activeTabId.value = tabId;
377
+ panes: [{ id: paneId, widthPercent: 100 }]
378
+ }];
379
+ updateActiveTabId(tabId);
323
380
  activePaneId.value = paneId;
381
+ emit("tab-added", { tabId });
382
+ return tabId;
324
383
  }
325
384
  let themeObserver;
326
385
  function syncThemeFromEngine() {
@@ -348,8 +407,9 @@ var CliPanel = defineComponent3({
348
407
  document.removeEventListener("click", closePositionDropdown);
349
408
  });
350
409
  function toggle() {
351
- collapsed.value = !collapsed.value;
352
- if (!collapsed.value && !initialized.value) {
410
+ const newVal = !resolvedCollapsed.value;
411
+ updateCollapsed(newVal);
412
+ if (!newVal && !initialized.value) {
353
413
  initialized.value = true;
354
414
  addTab();
355
415
  setupThemeSync();
@@ -359,58 +419,61 @@ var CliPanel = defineComponent3({
359
419
  const idx = tabs.value.findIndex((t) => t.id === id);
360
420
  if (idx === -1) return;
361
421
  tabs.value.splice(idx, 1);
422
+ emit("tab-closed", { tabId: id });
362
423
  if (tabs.value.length === 0) {
363
424
  initialized.value = false;
364
- collapsed.value = true;
425
+ updateCollapsed(true);
365
426
  return;
366
427
  }
367
- if (activeTabId.value === id) {
428
+ if (resolvedActiveTabId.value === id) {
368
429
  const newIdx = Math.min(idx, tabs.value.length - 1);
369
430
  selectTab(tabs.value[newIdx].id);
370
431
  }
371
432
  }
372
433
  function selectTab(id) {
373
- activeTabId.value = id;
434
+ updateActiveTabId(id);
374
435
  const tab = tabs.value.find((t) => t.id === id);
375
436
  if (tab && tab.panes.length > 0) {
376
437
  activePaneId.value = tab.panes[0].id;
377
438
  }
378
439
  }
379
- function splitRight(tabId) {
380
- const tab = tabs.value.find(
381
- (t) => t.id === (tabId ?? activeTabId.value)
382
- );
383
- if (!tab) return;
384
- const idx = tab.panes.findIndex((p) => p.id === activePaneId.value);
385
- const insertIdx = idx === -1 ? tab.panes.length : idx + 1;
386
- const newPaneId = nextPaneId++;
387
- tab.panes.splice(insertIdx, 0, { id: newPaneId, widthPercent: 0 });
388
- const evenWidth = 100 / tab.panes.length;
389
- tab.panes.forEach((p) => {
390
- p.widthPercent = evenWidth;
440
+ function splitPane(tabId) {
441
+ const targetTabId = tabId ?? resolvedActiveTabId.value;
442
+ const paneId = nextPaneId++;
443
+ tabs.value = tabs.value.map((t) => {
444
+ if (t.id !== targetTabId) return t;
445
+ const newPanes = [...t.panes, { id: paneId, widthPercent: 0 }];
446
+ normalizePanes(newPanes);
447
+ return { ...t, panes: newPanes };
391
448
  });
392
- normalizePanes(tab.panes);
393
- activePaneId.value = newPaneId;
449
+ activePaneId.value = paneId;
450
+ emit("pane-split", { paneId, tabId: targetTabId });
451
+ return paneId;
394
452
  }
395
- function closePane(tabId, paneId) {
396
- const tab = tabs.value.find((t) => t.id === tabId);
397
- if (!tab) return;
398
- if (tab.panes.length <= 1) {
399
- closeTab(tabId);
453
+ function closePane(paneId) {
454
+ for (const tab of tabs.value) {
455
+ const idx = tab.panes.findIndex((p) => p.id === paneId);
456
+ if (idx === -1) continue;
457
+ if (tab.panes.length <= 1) {
458
+ closeTab(tab.id);
459
+ return;
460
+ }
461
+ engineMap.get(paneId)?.destroy();
462
+ engineMap.delete(paneId);
463
+ const newPanes = tab.panes.filter((p) => p.id !== paneId);
464
+ normalizePanes(newPanes);
465
+ if (activePaneId.value === paneId) {
466
+ activePaneId.value = newPanes[Math.min(idx, newPanes.length - 1)].id;
467
+ }
468
+ emit("pane-closed", { paneId });
469
+ tabs.value = tabs.value.map(
470
+ (t) => t.id === tab.id ? { ...t, panes: newPanes } : t
471
+ );
400
472
  return;
401
473
  }
402
- const idx = tab.panes.findIndex((p) => p.id === paneId);
403
- if (idx === -1) return;
404
- tab.panes.splice(idx, 1);
405
- const total = tab.panes.reduce((s, p) => s + p.widthPercent, 0);
406
- if (total > 0)
407
- tab.panes.forEach((p) => {
408
- p.widthPercent = p.widthPercent / total * 100;
409
- });
410
- normalizePanes(tab.panes);
411
- if (activePaneId.value === paneId) {
412
- activePaneId.value = tab.panes[Math.min(idx, tab.panes.length - 1)].id;
413
- }
474
+ }
475
+ function renameTab(tabId, title) {
476
+ tabs.value = tabs.value.map((t) => t.id === tabId ? { ...t, title } : t);
414
477
  }
415
478
  function startRename(tabId) {
416
479
  tabs.value.forEach((t) => {
@@ -438,27 +501,27 @@ var CliPanel = defineComponent3({
438
501
  function onPanelResizeStart(e) {
439
502
  if (!resizable.value) return;
440
503
  e.preventDefault();
441
- if (collapsed.value) toggle();
504
+ if (resolvedCollapsed.value) toggle();
442
505
  panelResizing.value = true;
443
506
  panelResizeState = {
444
507
  startY: e.clientY,
445
- startHeight: panelHeight.value,
508
+ startHeight: resolvedHeight.value,
446
509
  startX: e.clientX,
447
- startWidth: panelWidth.value
510
+ startWidth: resolvedWidth.value
448
511
  };
449
512
  }
450
513
  function onPanelResizeMove(e) {
451
514
  if (!panelResizing.value) return;
452
515
  if (isHorizontal.value) {
453
- const deltaX = position.value === "left" ? e.clientX - panelResizeState.startX : panelResizeState.startX - e.clientX;
516
+ const deltaX = resolvedPosition.value === "left" ? e.clientX - panelResizeState.startX : panelResizeState.startX - e.clientX;
454
517
  let next = Math.max(100, panelResizeState.startWidth + deltaX);
455
518
  if (next > window.innerWidth) next = window.innerWidth;
456
- panelWidth.value = next;
519
+ updateWidth(next);
457
520
  } else {
458
- const deltaY = position.value === "top" ? e.clientY - panelResizeState.startY : panelResizeState.startY - e.clientY;
521
+ const deltaY = resolvedPosition.value === "top" ? e.clientY - panelResizeState.startY : panelResizeState.startY - e.clientY;
459
522
  let next = Math.max(100, panelResizeState.startHeight + deltaY);
460
523
  if (next > window.innerHeight) next = window.innerHeight;
461
- panelHeight.value = next;
524
+ updateHeight(next);
462
525
  }
463
526
  }
464
527
  function onPanelResizeEnd() {
@@ -524,34 +587,35 @@ var CliPanel = defineComponent3({
524
587
  document.removeEventListener("mouseup", onPaneResizeEnd);
525
588
  });
526
589
  function toggleMaximize() {
527
- if (!maximized.value) {
590
+ if (!resolvedMaximized.value) {
528
591
  if (isHorizontal.value) {
529
- prevWidth.value = panelWidth.value;
530
- panelWidth.value = window.innerWidth;
592
+ prevWidth.value = resolvedWidth.value;
593
+ updateWidth(window.innerWidth);
531
594
  } else {
532
- prevHeight.value = panelHeight.value;
533
- panelHeight.value = window.innerHeight;
595
+ prevHeight.value = resolvedHeight.value;
596
+ updateHeight(window.innerHeight);
534
597
  }
535
598
  } else {
536
599
  if (isHorizontal.value) {
537
- panelWidth.value = prevWidth.value;
600
+ updateWidth(prevWidth.value);
538
601
  } else {
539
- panelHeight.value = prevHeight.value;
602
+ updateHeight(prevHeight.value);
540
603
  }
541
604
  }
542
- maximized.value = !maximized.value;
605
+ updateMaximized(!resolvedMaximized.value);
543
606
  }
544
607
  function handleClose() {
545
608
  visible.value = false;
609
+ emit("close");
546
610
  props.onClose?.();
547
611
  }
548
612
  function handleHide() {
549
- preHideCollapsed = collapsed.value;
550
- hidden.value = true;
613
+ preHideCollapsed = resolvedCollapsed.value;
614
+ updateHidden(true);
551
615
  }
552
616
  function handleUnhide() {
553
- hidden.value = false;
554
- collapsed.value = preHideCollapsed;
617
+ updateHidden(false);
618
+ updateCollapsed(preHideCollapsed);
555
619
  }
556
620
  const positionDropdownOpen = ref2(false);
557
621
  function closePositionDropdown() {
@@ -563,21 +627,106 @@ var CliPanel = defineComponent3({
563
627
  }
564
628
  function selectPosition(pos) {
565
629
  positionDropdownOpen.value = false;
566
- position.value = pos;
567
- savePanelPosition(pos);
630
+ updatePosition(pos);
568
631
  }
632
+ function getEngine(paneId) {
633
+ const targetId = paneId ?? activePaneId.value;
634
+ return engineMap.get(targetId);
635
+ }
636
+ function getState() {
637
+ return {
638
+ collapsed: resolvedCollapsed.value,
639
+ hidden: resolvedHidden.value,
640
+ maximized: resolvedMaximized.value,
641
+ position: resolvedPosition.value,
642
+ height: resolvedHeight.value,
643
+ width: resolvedWidth.value,
644
+ activeTabId: resolvedActiveTabId.value,
645
+ activePaneId: activePaneId.value,
646
+ tabs: tabs.value.map((t) => ({
647
+ id: t.id,
648
+ title: t.title,
649
+ panes: t.panes.map((p) => ({ id: p.id, widthPercent: p.widthPercent }))
650
+ }))
651
+ };
652
+ }
653
+ expose({
654
+ open: () => {
655
+ if (!visible.value) {
656
+ visible.value = true;
657
+ }
658
+ if (resolvedHidden.value) {
659
+ updateHidden(false);
660
+ }
661
+ if (resolvedCollapsed.value) {
662
+ updateCollapsed(false);
663
+ if (!initialized.value) {
664
+ initialized.value = true;
665
+ addTab();
666
+ setupThemeSync();
667
+ }
668
+ }
669
+ },
670
+ collapse: () => {
671
+ if (!resolvedCollapsed.value) updateCollapsed(true);
672
+ },
673
+ toggleCollapse: () => {
674
+ if (resolvedCollapsed.value) {
675
+ updateCollapsed(false);
676
+ if (!initialized.value) {
677
+ initialized.value = true;
678
+ addTab();
679
+ setupThemeSync();
680
+ }
681
+ } else {
682
+ updateCollapsed(true);
683
+ }
684
+ },
685
+ hide: () => {
686
+ if (!resolvedHidden.value) updateHidden(true);
687
+ },
688
+ unhide: () => {
689
+ if (resolvedHidden.value) updateHidden(false);
690
+ },
691
+ toggleHide: () => {
692
+ updateHidden(!resolvedHidden.value);
693
+ },
694
+ close: handleClose,
695
+ maximize: () => {
696
+ if (!resolvedMaximized.value) updateMaximized(true);
697
+ },
698
+ restore: () => {
699
+ if (resolvedMaximized.value) updateMaximized(false);
700
+ },
701
+ toggleMaximize: () => {
702
+ updateMaximized(!resolvedMaximized.value);
703
+ },
704
+ resize: (dims) => {
705
+ if (dims.height !== void 0) updateHeight(dims.height);
706
+ if (dims.width !== void 0) updateWidth(dims.width);
707
+ },
708
+ setPosition: updatePosition,
709
+ addTab,
710
+ closeTab,
711
+ selectTab,
712
+ renameTab,
713
+ splitPane,
714
+ closePane,
715
+ getEngine,
716
+ getState
717
+ });
569
718
  return () => {
570
719
  if (!visible.value) return null;
571
720
  const wrapperClass = [
572
721
  "cli-panel-wrapper",
573
- collapsed.value && "collapsed",
574
- maximized.value && "maximized",
722
+ resolvedCollapsed.value && "collapsed",
723
+ resolvedMaximized.value && "maximized",
575
724
  panelResizing.value && "resizing",
576
725
  props.class
577
726
  ].filter(Boolean).join(" ");
578
727
  const wrapperStyle = {
579
- ...isHorizontal.value ? { width: `${panelWidth.value}px` } : { height: `${panelHeight.value}px` },
580
- ...hidden.value ? { display: "none" } : {},
728
+ ...isHorizontal.value ? { width: `${resolvedWidth.value}px` } : { height: `${resolvedHeight.value}px` },
729
+ ...resolvedHidden.value ? { display: "none" } : {},
581
730
  ...themeStyles.value,
582
731
  ...props.style
583
732
  };
@@ -606,13 +755,13 @@ var CliPanel = defineComponent3({
606
755
  class: "cli-panel-btn cli-panel-btn-position",
607
756
  title: "Move panel",
608
757
  onClick: togglePositionDropdown
609
- }, [positionIcon(position.value)]),
758
+ }, [positionIcon(resolvedPosition.value)]),
610
759
  positionDropdownOpen.value ? h2(
611
760
  "div",
612
761
  { class: "cli-panel-position-dropdown" },
613
762
  ["bottom", "top", "left", "right"].map(
614
763
  (pos) => h2("button", {
615
- class: ["cli-panel-position-dropdown-item", position.value === pos ? "active" : ""].filter(Boolean).join(" "),
764
+ class: ["cli-panel-position-dropdown-item", resolvedPosition.value === pos ? "active" : ""].filter(Boolean).join(" "),
616
765
  onClick: () => selectPosition(pos)
617
766
  }, [
618
767
  positionIcon(pos, 16),
@@ -630,20 +779,20 @@ var CliPanel = defineComponent3({
630
779
  "button",
631
780
  {
632
781
  class: "cli-panel-btn",
633
- title: maximized.value ? "Restore" : "Maximize",
634
- disabled: collapsed.value,
782
+ title: resolvedMaximized.value ? "Restore" : "Maximize",
783
+ disabled: resolvedCollapsed.value,
635
784
  onClick: toggleMaximize
636
785
  },
637
- [maximized.value ? restoreIcon() : maximizeIcon()]
786
+ [resolvedMaximized.value ? restoreIcon() : maximizeIcon()]
638
787
  ),
639
788
  h2(
640
789
  "button",
641
790
  {
642
791
  class: "cli-panel-btn",
643
- title: collapsed.value ? "Expand" : "Collapse",
792
+ title: resolvedCollapsed.value ? "Expand" : "Collapse",
644
793
  onClick: toggle
645
794
  },
646
- [collapseChevron(position.value, collapsed.value)]
795
+ [collapseChevron(resolvedPosition.value, resolvedCollapsed.value)]
647
796
  ),
648
797
  closable.value ? h2(
649
798
  "button",
@@ -657,7 +806,7 @@ var CliPanel = defineComponent3({
657
806
  ])
658
807
  ])
659
808
  ]);
660
- const contentEl = initialized.value ? h2("div", { class: "cli-panel-content", style: collapsed.value ? { display: "none" } : void 0 }, [
809
+ const contentEl = initialized.value ? h2("div", { class: "cli-panel-content", style: resolvedCollapsed.value ? { display: "none" } : void 0 }, [
661
810
  // Tab bar
662
811
  h2("div", { class: "cli-panel-tabs" }, [
663
812
  h2(
@@ -670,7 +819,7 @@ var CliPanel = defineComponent3({
670
819
  key: tab.id,
671
820
  class: [
672
821
  "cli-panel-tab",
673
- tab.id === activeTabId.value && "active"
822
+ tab.id === resolvedActiveTabId.value && "active"
674
823
  ].filter(Boolean).join(" "),
675
824
  onClick: () => selectTab(tab.id),
676
825
  onDblclick: () => startRename(tab.id),
@@ -754,7 +903,7 @@ var CliPanel = defineComponent3({
754
903
  key: tab.id,
755
904
  class: "cli-panel-instance",
756
905
  style: {
757
- display: tab.id === activeTabId.value ? void 0 : "none"
906
+ display: tab.id === resolvedActiveTabId.value ? void 0 : "none"
758
907
  }
759
908
  },
760
909
  [
@@ -794,7 +943,7 @@ var CliPanel = defineComponent3({
794
943
  {
795
944
  class: [
796
945
  "cli-panel-pane",
797
- pane.id === activePaneId.value && tab.id === activeTabId.value && "active-pane"
946
+ pane.id === activePaneId.value && tab.id === resolvedActiveTabId.value && "active-pane"
798
947
  ].filter(
799
948
  Boolean
800
949
  ).join(" "),
@@ -803,7 +952,7 @@ var CliPanel = defineComponent3({
803
952
  },
804
953
  onClick: () => {
805
954
  activePaneId.value = pane.id;
806
- activeTabId.value = tab.id;
955
+ updateActiveTabId(tab.id);
807
956
  }
808
957
  },
809
958
  [
@@ -815,7 +964,6 @@ var CliPanel = defineComponent3({
815
964
  onClick: (e) => {
816
965
  e.stopPropagation();
817
966
  closePane(
818
- tab.id,
819
967
  pane.id
820
968
  );
821
969
  }
@@ -891,7 +1039,7 @@ var CliPanel = defineComponent3({
891
1039
  { id: paneId, widthPercent: 100, snapshot }
892
1040
  ]
893
1041
  });
894
- activeTabId.value = tabId;
1042
+ updateActiveTabId(tabId);
895
1043
  activePaneId.value = paneId;
896
1044
  }
897
1045
  },
@@ -903,7 +1051,7 @@ var CliPanel = defineComponent3({
903
1051
  class: "cli-panel-context-menu-item",
904
1052
  onClick: () => {
905
1053
  closeContextMenu();
906
- splitRight(contextMenu.value.tabId);
1054
+ splitPane(contextMenu.value.tabId);
907
1055
  }
908
1056
  },
909
1057
  "Split Right"
@@ -933,7 +1081,7 @@ var CliPanel = defineComponent3({
933
1081
  tabs.value = tabs.value.filter(
934
1082
  (t) => t.id === id
935
1083
  );
936
- activeTabId.value = id;
1084
+ updateActiveTabId(id);
937
1085
  }
938
1086
  },
939
1087
  "Close Others"
@@ -968,16 +1116,16 @@ var CliPanel = defineComponent3({
968
1116
  closeContextMenu();
969
1117
  tabs.value = [];
970
1118
  initialized.value = false;
971
- collapsed.value = true;
1119
+ updateCollapsed(true);
972
1120
  }
973
1121
  },
974
1122
  "Close All"
975
1123
  )
976
1124
  ]
977
1125
  ) : null;
978
- const hideTabEl = hidden.value ? h2("button", {
1126
+ const hideTabEl = resolvedHidden.value ? h2("button", {
979
1127
  class: "cli-panel-hide-tab",
980
- "data-position": position.value,
1128
+ "data-position": resolvedPosition.value,
981
1129
  "data-hide-align": hideAlignment.value,
982
1130
  style: themeStyles.value,
983
1131
  title: "Show CLI",
@@ -988,7 +1136,7 @@ var CliPanel = defineComponent3({
988
1136
  h2("line", { x1: "12", y1: "19", x2: "20", y2: "19" })
989
1137
  ]),
990
1138
  h2("span", { class: "cli-panel-hide-tab-label" }, "CLI"),
991
- hideTabChevron(position.value)
1139
+ hideTabChevron(resolvedPosition.value)
992
1140
  ]) : null;
993
1141
  return h2("div", {}, [
994
1142
  hideTabEl,
@@ -997,7 +1145,7 @@ var CliPanel = defineComponent3({
997
1145
  {
998
1146
  class: wrapperClass,
999
1147
  style: wrapperStyle,
1000
- "data-position": position.value,
1148
+ "data-position": resolvedPosition.value,
1001
1149
  "data-resizable": String(resizable.value),
1002
1150
  "data-closable": String(closable.value),
1003
1151
  "data-hideable": String(hideable.value)