@pstdio/workbench 0.3.0 → 0.4.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.
@@ -113,7 +113,9 @@ export declare const buildWorkbenchExtensionMenuRegistrations: (input: {
113
113
  export declare const buildWorkbenchExtensionRouteEntries: (input: {
114
114
  metadata: WorkbenchExtensionMetadata | undefined;
115
115
  createResource: (resourceInput: WorkbenchExtensionRouteResourceInput) => ResourceRef;
116
- }) => any;
116
+ }) => {
117
+ resource: ResourceRef;
118
+ }[];
117
119
 
118
120
  /**
119
121
  * A data-driven list of items, each opening a contributor-supplied editor. The
@@ -435,6 +437,8 @@ declare interface DataTableRendererContribution {
435
437
  title: string;
436
438
  resourceKind?: string;
437
439
  columns?: DataTableRendererColumn[];
440
+ selectionMode?: "none" | "multiple";
441
+ selectionActions?: DataTableRendererSelectionAction[];
438
442
  rowActions?: DataTableRendererRowAction[];
439
443
  initialPageSize?: number;
440
444
  pageSizeOptions?: number[];
@@ -487,6 +491,14 @@ declare interface DataTableRendererRowAction {
487
491
  run(row: DataTableRendererRow): Promise<void> | void;
488
492
  }
489
493
 
494
+ declare interface DataTableRendererSelectionAction {
495
+ id: string;
496
+ label: string;
497
+ icon?: unknown;
498
+ destructive?: boolean;
499
+ run(rows: DataTableRendererRow[]): Promise<void> | void;
500
+ }
501
+
490
502
  declare interface DataTableRendererStoreState {
491
503
  renderers: Record<string, RegisteredDataTableRendererContribution>;
492
504
  }
@@ -506,7 +518,24 @@ declare interface Disposable_2 {
506
518
  dispose(): void;
507
519
  }
508
520
 
509
- export declare const emptyWorkbenchExtensionMetadata: WorkbenchExtensionMetadata;
521
+ export declare const emptyWorkbenchExtensionMetadata: {
522
+ commands: never[];
523
+ commandPaletteContributions: never[];
524
+ diagnostics: never[];
525
+ extensions: never[];
526
+ menuContributions: never[];
527
+ modes: never[];
528
+ navigation: never[];
529
+ routes: never[];
530
+ kanbanRenderers: never[];
531
+ dataTableRenderers: never[];
532
+ treeRenderers: never[];
533
+ fileRenderers: never[];
534
+ settingsPanels: never[];
535
+ settingsDefinitions: never[];
536
+ treeItems: never[];
537
+ panels: never[];
538
+ };
510
539
 
511
540
  declare interface EnumOption {
512
541
  value: string;
@@ -1,7 +1,7 @@
1
1
  import { jsxs as de, jsx as P } from "react/jsx-runtime";
2
- import { useRef as I, useState as He, useEffect as A, createElement as V } from "react";
2
+ import { useRef as I, useState as He, useEffect as A, createElement as T } from "react";
3
3
  import { host as Ve } from "rimless";
4
- import { W as F } from "./icon-B9XolQG8.js";
4
+ import { W as S } from "./icon-B9XolQG8.js";
5
5
  import { isLocalizedString as Fe, matchesResourceWhen as Le } from "@pstdio/sdk/extensions";
6
6
  import { w as Oe } from "./workbench-menu-paths-B_QJzcNU.js";
7
7
  const X = 1, Ne = ["commands.execute", "resource.open", "notification.show", "notification.action", "notification.resolve", "notification.dismiss", "preferences.get", "preferences.set", "extension.settings.all", "extension.settings.get", "extension.settings.set", "extension.settings.delete", "terminal.session", "files.upload", "files.list", "files.delete"], Ie = ["host.dispatchKeyboardEvent"], Ue = [...Ne, ...Ie], _e = new Set(Ue), ye = (e) => _e.has(e), qe = (e) => {
@@ -11,7 +11,7 @@ const X = 1, Ne = ["commands.execute", "resource.open", "notification.show", "no
11
11
  name: t ?? "",
12
12
  version: o
13
13
  };
14
- }, D = (e) => ({
14
+ }, V = (e) => ({
15
15
  capability: e,
16
16
  code: "unsupported_webview_capability",
17
17
  message: `Unsupported webview capability: ${e}`,
@@ -33,7 +33,7 @@ const X = 1, Ne = ["commands.execute", "resource.open", "notification.show", "no
33
33
  for (const n of e ?? []) {
34
34
  const s = qe(n);
35
35
  if (!ye(s.name)) {
36
- r.push(D(n));
36
+ r.push(V(n));
37
37
  continue;
38
38
  }
39
39
  if (s.version !== X) {
@@ -41,7 +41,7 @@ const X = 1, Ne = ["commands.execute", "resource.open", "notification.show", "no
41
41
  continue;
42
42
  }
43
43
  if (!t[s.name]) {
44
- r.push(D(n));
44
+ r.push(V(n));
45
45
  continue;
46
46
  }
47
47
  o.add(s.name);
@@ -61,7 +61,7 @@ const X = 1, Ne = ["commands.execute", "resource.open", "notification.show", "no
61
61
  diagnostics: r,
62
62
  async call(n) {
63
63
  if (!ye(n.method)) {
64
- const a = D(n.method);
64
+ const a = V(n.method);
65
65
  throw o(a), new Error(a.message);
66
66
  }
67
67
  if (!t.has(n.method)) {
@@ -70,7 +70,7 @@ const X = 1, Ne = ["commands.execute", "resource.open", "notification.show", "no
70
70
  }
71
71
  const s = e.capabilities[n.method];
72
72
  if (!s) {
73
- const a = D(n.method);
73
+ const a = V(n.method);
74
74
  throw o(a), new Error(a.message);
75
75
  }
76
76
  return await s(n.params);
@@ -160,15 +160,15 @@ const X = 1, Ne = ["commands.execute", "resource.open", "notification.show", "no
160
160
  onError: d,
161
161
  onDiagnostics: c,
162
162
  title: b
163
- } = e, i = I(null), l = I(null), u = I(!1), f = I(null), p = I(r), h = I(o), v = I(n), te = I(s), re = I(t.webview.capabilities), oe = I(a), M = I(d), ne = I(c), [se, $] = He(null);
164
- return p.current = r, h.current = o, v.current = n, te.current = s, re.current = t.webview.capabilities, oe.current = a, M.current = d, ne.current = c, A(() => {
163
+ } = e, i = I(null), l = I(null), u = I(!1), f = I(null), p = I(r), h = I(o), v = I(n), te = I(s), re = I(t.webview.capabilities), oe = I(a), B = I(d), ne = I(c), [se, D] = He(null);
164
+ return p.current = r, h.current = o, v.current = n, te.current = s, re.current = t.webview.capabilities, oe.current = a, B.current = d, ne.current = c, A(() => {
165
165
  const w = i.current;
166
166
  if (!w) return;
167
- const R = `${t.webview.runtimeUrl}
167
+ const C = `${t.webview.runtimeUrl}
168
168
  ${t.webview.moduleUrl}`;
169
- if (f.current === R) return;
170
- f.current = R, u.current = !1, l.current = null;
171
- const x = t.webview.styles, B = t.webview.moduleUrl, ie = (g) => {
169
+ if (f.current === C) return;
170
+ f.current = C, u.current = !1, l.current = null;
171
+ const x = t.webview.styles, H = t.webview.moduleUrl, ie = (g) => {
172
172
  g.length > 0 && ne.current?.(g);
173
173
  }, ae = () => Ye({
174
174
  capabilities: v.current ?? {},
@@ -180,28 +180,28 @@ ${t.webview.moduleUrl}`;
180
180
  ready: () => {
181
181
  },
182
182
  runtimeError: (g) => {
183
- $(g.message), M.current?.(g);
183
+ D(g.message), B.current?.(g);
184
184
  },
185
185
  call: async (g) => await ae().call(g)
186
186
  }, Be = Ve.connect(w, $e);
187
187
  return w.contentWindow?.location.replace(t.webview.runtimeUrl), Be.then(async (g) => {
188
- const C = g.remote;
189
- l.current = C, te.current?.bind((De) => C.hostEvent?.(De)), await C.init({
190
- moduleUrl: B,
188
+ const E = g.remote;
189
+ l.current = E, te.current?.bind((De) => E.hostEvent?.(De)), await E.init({
190
+ moduleUrl: H,
191
191
  styles: x,
192
192
  props: p.current,
193
193
  theme: _(h.current),
194
194
  themeVariables: U()
195
- }), u.current = !0, $(null), oe.current?.();
195
+ }), u.current = !0, D(null), oe.current?.();
196
196
  }).catch((g) => {
197
- const C = Je(g);
198
- $(C.message), M.current?.(C);
197
+ const E = Je(g);
198
+ D(E.message), B.current?.(E);
199
199
  }), () => {
200
200
  };
201
201
  }, [t.webview.runtimeUrl, t.webview.moduleUrl, t.webview.styles]), A(() => {
202
202
  const w = l.current;
203
203
  if (!(!w || !s))
204
- return s.bind((R) => w.hostEvent?.(R)), () => s.unbind();
204
+ return s.bind((C) => w.hostEvent?.(C)), () => s.unbind();
205
205
  }, [s]), A(() => {
206
206
  u.current && l.current?.propsUpdate({
207
207
  props: r
@@ -214,18 +214,18 @@ ${t.webview.moduleUrl}`;
214
214
  }, [o]), A(() => {
215
215
  if (typeof window > "u" || typeof MutationObserver > "u") return;
216
216
  let w = null;
217
- const R = () => {
217
+ const C = () => {
218
218
  w !== null && cancelAnimationFrame(w), w = requestAnimationFrame(() => {
219
219
  w = null, u.current && l.current?.themeUpdate({
220
220
  theme: _(h.current),
221
221
  variables: U()
222
222
  });
223
223
  });
224
- }, x = new MutationObserver(R), B = {
224
+ }, x = new MutationObserver(C), H = {
225
225
  attributeFilter: ["class", "data-color-mode", "data-theme", "style"],
226
226
  attributes: !0
227
227
  };
228
- return x.observe(document.documentElement, B), x.observe(document.body, B), () => {
228
+ return x.observe(document.documentElement, H), x.observe(document.body, H), () => {
229
229
  x.disconnect(), w !== null && cancelAnimationFrame(w);
230
230
  };
231
231
  }, []), /* @__PURE__ */ de("div", { style: et, children: [
@@ -247,7 +247,7 @@ ${t.webview.moduleUrl}`;
247
247
  },
248
248
  onError: () => {
249
249
  const w = `Failed to load extension runtime at ${t.webview.runtimeUrl}`;
250
- $(w), M.current?.({
250
+ D(w), B.current?.({
251
251
  message: w
252
252
  });
253
253
  }
@@ -403,7 +403,7 @@ ${t.webview.moduleUrl}`;
403
403
  console.warn(`[workbench.webview:${e}] ${r.code}/${r.capability}: ${r.message}`);
404
404
  }, ct = (e, t) => {
405
405
  console.error(`[workbench.webview:${e}] runtime error: ${t}`);
406
- }, T = "webview:bridge", lt = (e) => {
406
+ }, W = "webview:bridge", lt = (e) => {
407
407
  if (typeof e != "object" || e === null || Array.isArray(e)) return !1;
408
408
  const t = e;
409
409
  return typeof t.runtimeUrl == "string" && typeof t.moduleUrl == "string";
@@ -462,7 +462,7 @@ ${t.webview.moduleUrl}`;
462
462
  }, bt = (e = {}) => {
463
463
  const t = e.createHostCapabilities ?? ve, r = e.createProps ?? mt, o = e.createTheme ?? ke;
464
464
  return {
465
- id: T,
465
+ id: W,
466
466
  render: (n) => ut(n, t, r, o)
467
467
  };
468
468
  }, y = (e, t) => ({
@@ -514,7 +514,7 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
514
514
  id: e.id,
515
515
  label: e.label,
516
516
  metadata: e.metadata
517
- }), S = (e) => ({
517
+ }), j = (e) => ({
518
518
  id: e.id,
519
519
  kind: e.kind,
520
520
  context: {
@@ -596,19 +596,19 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
596
596
  moduleUrl: e.moduleUrl,
597
597
  styles: e.styles,
598
598
  capabilities: e.capabilities
599
- }), W = (e) => e ? {
599
+ }), K = (e) => e ? {
600
600
  resourceKinds: e.resourceKinds ? [...e.resourceKinds] : void 0
601
601
  } : void 0, yt = (e) => {
602
- const t = e.treeRendererId ?? e.fileRendererId ?? e.controlsRendererId ?? e.dataTableRendererId ?? (e.webview ? T : void 0);
602
+ const t = e.treeRendererId ?? e.fileRendererId ?? e.controlsRendererId ?? e.dataTableRendererId ?? (e.webview ? W : void 0);
603
603
  if (!t) throw new Error(`Panel Menu has no renderer: ${e.id}`);
604
604
  return t;
605
- }, j = (e) => e?.map((t) => ({
605
+ }, M = (e) => e?.map((t) => ({
606
606
  id: t.id,
607
607
  title: m(t.title, t.id),
608
608
  side: t.side,
609
609
  rendererId: yt(t),
610
610
  config: t.webview ? N(t.webview) : void 0
611
- })), K = (e) => e.workbench.layout.registerPanel(e.contribution), q = (e, t = "") => m(e, t), vt = (e) => !!e && typeof e == "object" && !Array.isArray(e), kt = (e, t, r) => {
611
+ })), $ = (e) => e.workbench.layout.registerPanel(e.contribution), q = (e, t = "") => m(e, t), vt = (e) => !!e && typeof e == "object" && !Array.isArray(e), kt = (e, t, r) => {
612
612
  const o = (n, s, a) => n ? k(e, n, {
613
613
  params: s,
614
614
  resource: a
@@ -651,7 +651,7 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
651
651
  });
652
652
  }, Rt = (e, t) => {
653
653
  if (t.controlsRendererId)
654
- return K({
654
+ return $({
655
655
  workbench: e.workbench,
656
656
  contribution: {
657
657
  id: t.id,
@@ -661,8 +661,8 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
661
661
  rendererId: t.controlsRendererId,
662
662
  singleton: !0,
663
663
  resourceKinds: t.resourceKind ? [t.resourceKind] : void 0,
664
- eligibleLocations: W(t.eligibleLocations),
665
- panelMenus: j(t.panelMenus)
664
+ eligibleLocations: K(t.eligibleLocations),
665
+ panelMenus: M(t.panelMenus)
666
666
  }
667
667
  });
668
668
  }, oo = (e, t, r, o = {}) => {
@@ -677,11 +677,11 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
677
677
  for (let s = n.length - 1; s >= 0; s -= 1) n[s]?.dispose();
678
678
  }
679
679
  };
680
- }, E = (e, t = "") => m(e, t), me = (e) => ({
680
+ }, R = (e, t = "") => m(e, t), me = (e) => ({
681
681
  ...e,
682
- label: E(e.label, e.id),
683
- description: e.description ? E(e.description) : void 0,
684
- icon: e.icon ? V(F, {
682
+ label: R(e.label, e.id),
683
+ description: e.description ? R(e.description) : void 0,
684
+ icon: e.icon ? T(S, {
685
685
  name: e.icon,
686
686
  size: 14
687
687
  }) : void 0
@@ -690,7 +690,7 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
690
690
  values: e.values,
691
691
  resource: e.resource ? O(e.resource) : void 0
692
692
  }), xt = (e, t) => {
693
- const r = S({
693
+ const r = j({
694
694
  id: t.id,
695
695
  kind: "dataTableRenderer",
696
696
  projectId: e.projectId,
@@ -707,13 +707,27 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
707
707
  });
708
708
  return e.workbench.renderers.registerDataTableRenderer({
709
709
  id: t.id,
710
- title: E(t.title, t.id),
710
+ title: R(t.title, t.id),
711
711
  resourceKind: t.resourceKind,
712
712
  columns: t.columns?.map(me),
713
713
  initialPageSize: t.initialPageSize,
714
714
  pageSizeOptions: t.pageSizeOptions,
715
- emptyTitle: t.emptyTitle ? E(t.emptyTitle) : void 0,
716
- emptyDescription: t.emptyDescription ? E(t.emptyDescription) : void 0,
715
+ selectionMode: t.selectionMode,
716
+ selectionActions: t.selectionActions?.map((n) => ({
717
+ id: n.id,
718
+ label: R(n.label, n.id),
719
+ icon: n.icon ? T(S, {
720
+ name: n.icon,
721
+ size: 16
722
+ }) : void 0,
723
+ destructive: n.destructive,
724
+ run: (s) => o(n.commandId, {
725
+ rowIds: s.map((a) => a.id)
726
+ }).then(() => {
727
+ })
728
+ })),
729
+ emptyTitle: t.emptyTitle ? R(t.emptyTitle) : void 0,
730
+ emptyDescription: t.emptyDescription ? R(t.emptyDescription) : void 0,
717
731
  executeQuery: async ({
718
732
  resource: n,
719
733
  modeId: s
@@ -738,8 +752,8 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
738
752
  },
739
753
  rowActions: t.rowActions?.map((n) => ({
740
754
  id: n.id,
741
- label: E(n.label, n.id),
742
- icon: n.icon ? V(F, {
755
+ label: R(n.label, n.id),
756
+ icon: n.icon ? T(S, {
743
757
  name: n.icon,
744
758
  size: 16
745
759
  }) : void 0,
@@ -752,7 +766,7 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
752
766
  });
753
767
  }, At = (e, t) => {
754
768
  if (t.dataTableRendererId)
755
- return K({
769
+ return $({
756
770
  workbench: e.workbench,
757
771
  contribution: {
758
772
  id: t.id,
@@ -762,8 +776,8 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
762
776
  rendererId: t.dataTableRendererId,
763
777
  singleton: !0,
764
778
  resourceKinds: t.resourceKind ? [t.resourceKind] : void 0,
765
- eligibleLocations: W(t.eligibleLocations),
766
- panelMenus: j(t.panelMenus)
779
+ eligibleLocations: K(t.eligibleLocations),
780
+ panelMenus: M(t.panelMenus)
767
781
  }
768
782
  });
769
783
  }, Pt = (e, t, r) => {
@@ -950,7 +964,7 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
950
964
  } : void 0
951
965
  }), Vt = (e, t) => {
952
966
  if (t.fileRendererId)
953
- return K({
967
+ return $({
954
968
  workbench: e.workbench,
955
969
  contribution: {
956
970
  id: t.id,
@@ -960,8 +974,8 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
960
974
  rendererId: t.fileRendererId,
961
975
  singleton: !0,
962
976
  resourceKinds: t.resourceKind ? [t.resourceKind] : void 0,
963
- eligibleLocations: W(t.eligibleLocations),
964
- panelMenus: j(t.panelMenus)
977
+ eligibleLocations: K(t.eligibleLocations),
978
+ panelMenus: M(t.panelMenus)
965
979
  }
966
980
  });
967
981
  }, Ft = (e) => {
@@ -1047,14 +1061,14 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
1047
1061
  }, Xt = (e, t) => Object.entries(e.createRow?.params ?? {}).flatMap(([r, o]) => {
1048
1062
  const n = Yt(r, o, t);
1049
1063
  return n ? [n] : [];
1050
- }), Jt = (e, t) => S({
1064
+ }), Jt = (e, t) => j({
1051
1065
  id: t.id,
1052
1066
  kind: "kanbanRenderer",
1053
1067
  projectId: e.projectId,
1054
1068
  context: {
1055
1069
  kanbanRendererId: t.id
1056
1070
  }
1057
- }), H = (e, t, r, o, n) => k(e, r, {
1071
+ }), F = (e, t, r, o, n) => k(e, r, {
1058
1072
  params: o,
1059
1073
  resource: n ?? e.workbench.getPrimaryResource(),
1060
1074
  slot: Jt(e, t),
@@ -1069,7 +1083,7 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
1069
1083
  icon: o.icon,
1070
1084
  params: n?.params
1071
1085
  }, {
1072
- execute: (s, a) => H(e, t, o.commandId, Pe(zt(s)), a?.resource)
1086
+ execute: (s, a) => F(e, t, o.commandId, Pe(zt(s)), a?.resource)
1073
1087
  });
1074
1088
  }), er = (e, t, r, o, n, s) => {
1075
1089
  const a = Te(t, r), d = e.workbench.commands.getCommand(a), c = {
@@ -1083,9 +1097,9 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
1083
1097
  args: c,
1084
1098
  context: b
1085
1099
  }), Promise.resolve()) : d ? e.workbench.commands.executeCommand(d.command.id, c, b).then(() => {
1086
- }) : H(e, t, r.commandId, c, n).then(() => {
1100
+ }) : F(e, t, r.commandId, c, n).then(() => {
1087
1101
  });
1088
- }, tr = (e) => (r) => V(F, {
1102
+ }, tr = (e) => (r) => T(S, {
1089
1103
  name: e ?? "MoreHorizontal",
1090
1104
  ...r
1091
1105
  }), rr = (e, t) => ({
@@ -1098,7 +1112,7 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
1098
1112
  label: t(r.label, r.id),
1099
1113
  icon: tr(r.icon)
1100
1114
  }))
1101
- }), or = (e) => e ? V(F, {
1115
+ }), or = (e) => e ? T(S, {
1102
1116
  name: e,
1103
1117
  size: 16
1104
1118
  }) : void 0, nr = (e, t) => {
@@ -1157,7 +1171,7 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
1157
1171
  });
1158
1172
  }, dr = (e, t, r = {}) => {
1159
1173
  const o = [], n = r.resolveLabel ?? ((i, l) => m(i, l)), s = r.decorateAttribute ?? ((i, l) => l), a = r.resolveRowResource ?? Ae, d = r.resolveRowActionResource ?? qt, c = r.onAfterMutation ?? (() => {
1160
- }), b = (i, l, u) => H(e, i, l, u).then((f) => (c(i), f));
1174
+ }), b = (i, l, u) => F(e, i, l, u).then((f) => (c(i), f));
1161
1175
  for (const i of t) {
1162
1176
  const l = Ot(i, i.attributes, n, s);
1163
1177
  let u;
@@ -1181,7 +1195,7 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
1181
1195
  getBoardColumnConfig: (p) => rr(u?.[p], n),
1182
1196
  onRowClick: sr(i, r, a),
1183
1197
  executeQuery: async (p) => {
1184
- const h = await H(e, i, i.queryCommandId, {
1198
+ const h = await F(e, i, i.queryCommandId, {
1185
1199
  settings: p.settings,
1186
1200
  filters: p.filters
1187
1201
  });
@@ -1254,7 +1268,7 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
1254
1268
  }) ?? [];
1255
1269
  }, br = (e, t) => {
1256
1270
  if (t.treeRendererId)
1257
- return K({
1271
+ return $({
1258
1272
  workbench: e.workbench,
1259
1273
  contribution: {
1260
1274
  id: t.id,
@@ -1264,8 +1278,8 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
1264
1278
  rendererId: t.treeRendererId,
1265
1279
  singleton: !0,
1266
1280
  resourceKinds: t.resourceKind ? [t.resourceKind] : void 0,
1267
- eligibleLocations: W(t.eligibleLocations),
1268
- panelMenus: j(t.panelMenus)
1281
+ eligibleLocations: K(t.eligibleLocations),
1282
+ panelMenus: M(t.panelMenus)
1269
1283
  }
1270
1284
  });
1271
1285
  }, G = (e) => {
@@ -1526,7 +1540,7 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
1526
1540
  ...s ? {
1527
1541
  resource: s
1528
1542
  } : {},
1529
- slot: S({
1543
+ slot: j({
1530
1544
  id: t.webviewId,
1531
1545
  kind: e.slotKind,
1532
1546
  projectId: e.projectId,
@@ -1566,7 +1580,7 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
1566
1580
  id: r.id,
1567
1581
  title: m(r.label, r.id),
1568
1582
  region: "main",
1569
- rendererId: T,
1583
+ rendererId: W,
1570
1584
  singleton: !0,
1571
1585
  config: N(r.webview)
1572
1586
  }));
@@ -1673,7 +1687,7 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
1673
1687
  });
1674
1688
  return Wr(r, e.createWebviewHostCapabilityOverrides);
1675
1689
  }, jr = (e, t) => {
1676
- e.workbench.renderers.getRenderer(T) || t.push(e.workbench.renderers.registerRenderer(bt({
1690
+ e.workbench.renderers.getRenderer(W) || t.push(e.workbench.renderers.registerRenderer(bt({
1677
1691
  createHostCapabilities: Ke(e, "panel"),
1678
1692
  createProps: e.createWebviewProps,
1679
1693
  createTheme: e.createWebviewTheme
@@ -1700,7 +1714,7 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
1700
1714
  ...ee(n) ?? {}
1701
1715
  },
1702
1716
  resource: Me(e, s),
1703
- slot: S({
1717
+ slot: j({
1704
1718
  id: o.contribution.slotId,
1705
1719
  kind: "menu",
1706
1720
  projectId: e.projectId,
@@ -1718,7 +1732,7 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
1718
1732
  ...ee(n) ?? {}
1719
1733
  },
1720
1734
  resource: Me(e, s),
1721
- slot: S({
1735
+ slot: j({
1722
1736
  id: "workbench.commandPalette",
1723
1737
  kind: "menu",
1724
1738
  projectId: e.projectId,
@@ -1728,18 +1742,18 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
1728
1742
  })
1729
1743
  }),
1730
1744
  isVisible: () => Le(o.contribution.when, e.workbench.getPrimaryResource()?.kind)
1731
- }), e.workbench.layout.registerMenuItem(Oe, o.menuItem)]), Br = (e) => e.metadata.panels.flatMap((t) => t.webview ? [K({
1745
+ }), e.workbench.layout.registerMenuItem(Oe, o.menuItem)]), Br = (e) => e.metadata.panels.flatMap((t) => t.webview ? [$({
1732
1746
  workbench: e.workbench,
1733
1747
  contribution: {
1734
1748
  id: t.id,
1735
1749
  title: m(t.title, t.id),
1736
1750
  region: t.region,
1737
1751
  closable: t.closable,
1738
- rendererId: T,
1752
+ rendererId: W,
1739
1753
  singleton: !0,
1740
1754
  resourceKinds: t.resourceKind ? [t.resourceKind] : void 0,
1741
- eligibleLocations: W(t.eligibleLocations),
1742
- panelMenus: j(t.panelMenus),
1755
+ eligibleLocations: K(t.eligibleLocations),
1756
+ panelMenus: M(t.panelMenus),
1743
1757
  config: {
1744
1758
  ...N(t.webview),
1745
1759
  ...t.region === "overlay" ? {
@@ -1895,7 +1909,7 @@ const ft = (e) => typeof e == "object" && e !== null && "$l10n" in e && typeof e
1895
1909
  e.renderers.refreshDataTableRenderer(o.id);
1896
1910
  };
1897
1911
  export {
1898
- T as BRIDGE_WEBVIEW_RENDERER_ID,
1912
+ W as BRIDGE_WEBVIEW_RENDERER_ID,
1899
1913
  $t as buildWorkbenchExtensionCommandPaletteRegistrations,
1900
1914
  Mt as buildWorkbenchExtensionMenuRegistrations,
1901
1915
  so as buildWorkbenchExtensionRouteEntries,
@@ -1911,7 +1925,7 @@ export {
1911
1925
  Pt as registerWorkbenchExtensionDataTableRenderers,
1912
1926
  Ft as registerWorkbenchExtensionFileRenderers,
1913
1927
  dr as registerWorkbenchExtensionKanbanRenderers,
1914
- K as registerWorkbenchExtensionPanel,
1928
+ $ as registerWorkbenchExtensionPanel,
1915
1929
  Ir as registerWorkbenchExtensionTreeRenderers,
1916
1930
  Ce as renderBridgeWebviewFrame,
1917
1931
  Gr as shouldRefreshWorkbenchExtensionDataTableRenderers,