@pstdio/workbench 0.44.0 → 0.45.0-nightly.20261021030241

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.
@@ -1,4 +1,4 @@
1
- import { Fn as KanbanRendererContribution, _r as KanbanRendererRow, er as AttributeDescriptor, ir as AttributesSource, or as BoardColumnConfig, xr as ResourceContextAction } from "./index-8x-QT7wg.js";
1
+ import { $n as AttributeDescriptor, Pn as KanbanRendererContribution, ar as BoardColumnConfig, br as ResourceContextAction, gr as KanbanRendererRow, rr as AttributesSource } from "./index-CEjUGkgB.js";
2
2
  import { ComponentType, ReactNode } from "react";
3
3
  //#region src/react/renderers/kanban/kanban-presentation.d.ts
4
4
  type ReactColumnIcon = ComponentType<{
@@ -0,0 +1,145 @@
1
+ import { b as e, sn as t, vt as n, y as r } from "./workbench-renderers-Ku0_knjs.js";
2
+ import { resourceKey as i } from "@pstdio/sdk/extensions";
3
+ //#region ../pstdio-api-contracts/src/extension-kernel/source-position.ts
4
+ var a = (e) => {
5
+ if (!e || typeof e != "object" || Array.isArray(e)) return !1;
6
+ let t = e, n = (e) => typeof e == "number" && Number.isSafeInteger(e) && e > 0;
7
+ if (!n(t.line)) return !1;
8
+ for (let e of [
9
+ "column",
10
+ "endLine",
11
+ "endColumn"
12
+ ]) if (t[e] !== void 0 && !n(t[e])) return !1;
13
+ return !(t.endColumn !== void 0 && t.endLine === void 0 || t.endLine !== void 0 && (t.endLine < t.line || t.endLine === t.line && (t.endColumn ?? 1) < (t.column ?? 1)));
14
+ }, o = "navigation.root", s = (e = "content") => e === "content" ? o : `navigation.${e}`, c = (e) => `${e.kind}:${e.extensionId}:${e.id}`, l = (e, t) => c(e) === c(t), u = (e) => (t, n) => {
15
+ let r = t.sourceExtensionId === e.extensionId;
16
+ if (r !== (n.sourceExtensionId === e.extensionId)) return r ? -1 : 1;
17
+ if (!r) {
18
+ let e = t.sourceExtensionId.localeCompare(n.sourceExtensionId);
19
+ if (e !== 0) return e;
20
+ }
21
+ return t.declarationIndex - n.declarationIndex || t.id.localeCompare(n.id);
22
+ }, d = (e, t) => e ? `${e}:${t}` : t, f = (e, t) => ({
23
+ ...t,
24
+ resource: e.resolveResource ? e.resolveResource(t.resource) : t.resource
25
+ }), p = (e, t) => {
26
+ let n = e.findIndex((e) => e.id === t.id);
27
+ if (n < 0) {
28
+ e.push(t);
29
+ return;
30
+ }
31
+ let r = e[n];
32
+ e[n] = {
33
+ ...r,
34
+ nodes: [...r.nodes, ...t.nodes]
35
+ };
36
+ }, m = (a = {}) => {
37
+ let o = /* @__PURE__ */ new Map(), m = {}, h = /* @__PURE__ */ new Set(), g = () => {
38
+ for (let e of h) e();
39
+ }, _ = (e, t) => [...o.values()].filter((n) => l(n.owner, e) && (n.slot ?? "content") === t).sort(u(e)), v = (t, n, r, i) => {
40
+ let a = {
41
+ ...t,
42
+ id: d(n.idScope, t.id),
43
+ moveScope: r,
44
+ canHide: t.canHide ?? n.owner.kind === "mode",
45
+ canReorder: t.canReorder ?? n.owner.kind === "mode",
46
+ children: t.children?.map((e) => v(e, n, r, i))
47
+ };
48
+ return e(a, {
49
+ contribution: n,
50
+ node: t,
51
+ resource: i,
52
+ registryToken: m
53
+ }), a;
54
+ }, y = (e, t, n, r) => ({
55
+ ...e,
56
+ id: t.sourceExtensionId !== n.extensionId && !e.label ? s(t.slot) : d(t.idScope, e.id),
57
+ moveScope: c(n),
58
+ canHide: e.canHide ?? !0,
59
+ canReorder: e.canReorder ?? !0,
60
+ nodes: e.nodes.map((e) => v(e, t, c(n), r))
61
+ }), b = (e, t, n) => {
62
+ let r = f(e, n);
63
+ return ((e.viewId ? a.getViewStructure?.(e.viewId, r) : e.getStructure?.(r)) ?? []).map((n) => y(n, e, t, r.resource));
64
+ }, x = (e) => {
65
+ let t = [];
66
+ for (let n of e.flat()) p(t, n);
67
+ return t;
68
+ };
69
+ return {
70
+ registerContribution(e) {
71
+ if (o.has(e.id)) throw Error(`Navigation tree contribution already registered: ${e.id}`);
72
+ if (!e.viewId && !e.getSections) throw Error(`Navigation tree contribution must declare a viewId or getSections: ${e.id}`);
73
+ o.set(e.id, e);
74
+ let n = e.viewId ? a.subscribeViewRefresh?.(e.viewId, g) : void 0;
75
+ return g(), t(() => {
76
+ o.get(e.id) === e && (n?.dispose(), o.delete(e.id), g());
77
+ });
78
+ },
79
+ resolveOwner(e, t, n) {
80
+ return [...o.values()].find((r) => r.owner.kind === e && r.owner.id === t && (!n || (r.slot ?? "content") === n))?.owner;
81
+ },
82
+ getReadKey(e, t = {}) {
83
+ return JSON.stringify([
84
+ "header",
85
+ "content",
86
+ "footer"
87
+ ].flatMap((n) => _(e, n).map((e) => [e.id, i(f(e, t).resource)])));
88
+ },
89
+ getStructure(e, t = "content", n = {}) {
90
+ return x(_(e, t).map((t) => b(t, e, n)));
91
+ },
92
+ async getSections(e, t = "content", r = {}) {
93
+ let i = _(e, t), o = i.map((t) => b(t, e, r)), s = () => x(o);
94
+ return await n(i.map((t, n) => async (i) => {
95
+ let c = f(t, {
96
+ ...r,
97
+ signal: i
98
+ }), l = (a) => {
99
+ i.throwIfAborted(), o[n] = a.map((n) => y(n, t, e, c.resource)), r.onProgress?.(s());
100
+ }, u = {
101
+ ...c,
102
+ onProgress: l
103
+ };
104
+ l((t.viewId ? await a.getViewSections?.(t.viewId, u) : await t.getSections?.(u)) ?? []);
105
+ }), r.signal), s();
106
+ },
107
+ async getChildren(e, t = {}) {
108
+ t.signal?.throwIfAborted();
109
+ let n = r(e, m);
110
+ if (!n) return e.children ?? [];
111
+ let i = e.moveScope ?? c(n.contribution.owner), o = {
112
+ ...t,
113
+ resource: n.resource
114
+ }, s = n.contribution.viewId ? await a.getViewChildren?.(n.contribution.viewId, n.node, o) : await n.contribution.getChildren?.(n.node, o);
115
+ return s ? s.map((e) => v(e, n.contribution, i, n.resource)) : e.children ?? [];
116
+ },
117
+ async moveNode(e, t, n = {}) {
118
+ let i = r(e, m), o = t ? r(t, m) : void 0;
119
+ i?.contribution.viewId && i.node.canDrag && (!t || o && i.contribution === o.contribution && o.node.canDrop) && await a.moveViewNode?.(i.contribution.viewId, i.node, o?.node, {
120
+ ...n,
121
+ resource: i.resource
122
+ });
123
+ },
124
+ getDefaultExpandedSectionIds(e, t) {
125
+ return (t ? [t] : [
126
+ "header",
127
+ "content",
128
+ "footer"
129
+ ]).flatMap((t) => _(e, t).flatMap((e) => (e.defaultExpandedSectionIds ?? (e.viewId ? a.getViewDefaultExpandedSectionIds?.(e.viewId) : void 0) ?? []).map((t) => d(e.idScope, t))));
130
+ },
131
+ onDidChange(e) {
132
+ return h.add(e), t(() => h.delete(e));
133
+ },
134
+ listActions() {
135
+ return [...o.values()].flatMap((e) => (e.listActions?.() ?? []).map((t) => ({
136
+ ...t,
137
+ ownerId: e.sourceExtensionId
138
+ })));
139
+ }
140
+ };
141
+ };
142
+ //#endregion
143
+ export { s as n, a as r, m as t };
144
+
145
+ //# sourceMappingURL=navigation-tree-registry-BsMNSEyZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation-tree-registry-BsMNSEyZ.js","names":["FileSourcePosition","isFileSourcePosition","value","Array","isArray","position","positive","number","Number","isSafeInteger","line","key","const","undefined","endColumn","endLine","column","isFileSourcePosition","resourceKey","createDisposable","Disposable","TreeNode","TreeViewSection","ResourceRef","settleReadBatch","NavigationTarget","getNavigationTreeNodeSource","setNavigationTreeNodeSource","DeclaredNavigationAction","label","action","category","NavigationTreeSlot","NavigationTreeOwner","kind","id","extensionId","NavigationTreeContext","resource","signal","AbortSignal","onProgress","sections","NavigationTreeMoveContext","position","NavigationTreeContribution","idScope","owner","sourceExtensionId","declarationIndex","slot","viewId","defaultExpandedSectionIds","resolveResource","getStructure","context","getSections","Promise","getChildren","node","listActions","CreateNavigationTreeRegistryInput","subscribeViewRefresh","listener","getViewDefaultExpandedSectionIds","getViewSections","getViewStructure","getViewChildren","moveViewNode","source","target","NavigationTreeRegistry","ownerId","registerContribution","contribution","resolveOwner","getReadKey","moveNode","getDefaultExpandedSectionIds","onDidChange","navigationRootSectionId","navigationSlotRootSectionId","ownersEqual","left","right","contributionOrder","leftOwn","rightOwn","extensionOrder","localeCompare","scopedId","scope","readContext","mergeSection","section","index","findIndex","candidate","push","current","nodes","createNavigationTreeRegistry","input","contributions","Map","registryToken","listeners","Set","emit","matching","values","filter","sort","projectNode","moveScope","projected","canHide","canReorder","children","map","child","projectSection","structureOf","query","structure","mergeSections","groups","flat","has","Error","set","refreshSubscription","undefined","get","dispose","delete","find","JSON","stringify","const","flatMap","selected","available","snapshot","publish","throwIfAborted","sourceNode","targetNode","canDrag","canDrop","selectedSlot","slots","add","setNavigationTreeNodeSource","createDisposable","settleReadBatch","getNavigationTreeNodeSource","isFileSourcePosition$1","value","position","positive","number","key","navigationRootSectionId","navigationSlotRootSectionId","slot","ownerId","owner","ownersEqual","left","right","contributionOrder","leftOwn","extensionOrder","scopedId","scope","id","readContext","context","contribution","mergeSection","index","sections","candidate","section","current","createNavigationTreeRegistry","contributions","registryToken","listeners","emit","listener","matching","projectNode","projected","node","child","moveScope","resource","projectSection","structureOf","query","input","mergeSections","groups","refreshSubscription","kind","resourceKey","selected","available","snapshot","publish","signal","source","children","sourceNode","target","targetNode","selectedSlot","action"],"sources":["../../pstdio-api-contracts/src/extension-kernel/source-position.ts","../src/core/registries/navigation/navigation-tree-registry.ts"],"sourcesContent":["import type { FileSourcePosition } from \"./types/pages\";\n\nexport const isFileSourcePosition = (value: unknown): value is FileSourcePosition => {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return false;\n const position = value as FileSourcePosition;\n const positive = (number: unknown) => typeof number === \"number\" && Number.isSafeInteger(number) && number > 0;\n if (!positive(position.line)) return false;\n for (const key of [\"column\", \"endLine\", \"endColumn\"] as const) {\n if (position[key] !== undefined && !positive(position[key])) return false;\n }\n if (position.endColumn !== undefined && position.endLine === undefined) return false;\n if (position.endLine !== undefined) {\n if (position.endLine < position.line) return false;\n if (position.endLine === position.line && (position.endColumn ?? 1) < (position.column ?? 1)) return false;\n }\n return true;\n};\n","import { resourceKey } from \"@pstdio/sdk/extensions\";\nimport { createDisposable, type Disposable } from \"../../shared/disposable\";\nimport type { TreeNode, TreeViewSection } from \"../renderers/tree-renderer-registry\";\nimport type { ResourceRef } from \"../resources/resource-registry\";\nimport { settleReadBatch } from \"../views/settle-read-batch\";\nimport type { NavigationTarget } from \"./navigation-registry\";\nimport { getNavigationTreeNodeSource, setNavigationTreeNodeSource } from \"./navigation-tree-node-source\";\n\nexport interface DeclaredNavigationAction {\n label: string;\n action: NavigationTarget;\n category?: string;\n}\n\nexport type NavigationTreeSlot = \"header\" | \"content\" | \"footer\";\n\nexport interface NavigationTreeOwner {\n kind: \"mode\" | \"page\";\n id: string;\n extensionId: string;\n}\n\nexport interface NavigationTreeContext {\n resource?: ResourceRef;\n signal?: AbortSignal;\n onProgress?(sections: TreeViewSection[]): void;\n}\n\nexport interface NavigationTreeMoveContext extends NavigationTreeContext {\n position?: \"before\" | \"after\" | \"inside\";\n}\n\nexport interface NavigationTreeContribution {\n id: string;\n /** Prefix projected section and node ids when they come from an independent tree renderer. */\n idScope?: string;\n owner: NavigationTreeOwner;\n sourceExtensionId: string;\n declarationIndex: number;\n slot?: NavigationTreeSlot;\n viewId?: string;\n defaultExpandedSectionIds?: string[];\n /** Resolve the data resource independently of the selected navigation item. */\n resolveResource?(resource: ResourceRef | undefined): ResourceRef | undefined;\n getStructure?(context: NavigationTreeContext): TreeViewSection[];\n getSections?(context: NavigationTreeContext): Promise<TreeViewSection[]> | TreeViewSection[];\n getChildren?(node: TreeNode, context: NavigationTreeContext): Promise<TreeNode[]> | TreeNode[];\n /** Authored actions for discovery, independent of tree data and visibility context. */\n listActions?(): DeclaredNavigationAction[];\n}\n\nexport interface CreateNavigationTreeRegistryInput {\n subscribeViewRefresh?(viewId: string, listener: () => void): Disposable;\n getViewDefaultExpandedSectionIds?(viewId: string): readonly string[] | undefined;\n getViewSections?(viewId: string, context: NavigationTreeContext): Promise<TreeViewSection[]> | TreeViewSection[];\n getViewStructure?(viewId: string, context: NavigationTreeContext): TreeViewSection[];\n getViewChildren?(viewId: string, node: TreeNode, context: NavigationTreeContext): Promise<TreeNode[]> | TreeNode[];\n moveViewNode?(\n viewId: string,\n source: TreeNode,\n target: TreeNode | undefined,\n context: NavigationTreeMoveContext,\n ): Promise<void> | void;\n}\n\nexport interface NavigationTreeRegistry {\n listActions(): (DeclaredNavigationAction & { ownerId: string })[];\n registerContribution(contribution: NavigationTreeContribution): Disposable;\n resolveOwner(\n kind: NavigationTreeOwner[\"kind\"],\n id: string,\n slot?: NavigationTreeSlot,\n ): NavigationTreeOwner | undefined;\n getReadKey(owner: NavigationTreeOwner, context?: NavigationTreeContext): string;\n getStructure(\n owner: NavigationTreeOwner,\n slot?: NavigationTreeSlot,\n context?: NavigationTreeContext,\n ): TreeViewSection[];\n getSections(\n owner: NavigationTreeOwner,\n slot?: NavigationTreeSlot,\n context?: NavigationTreeContext,\n ): Promise<TreeViewSection[]>;\n getChildren(node: TreeNode, context?: NavigationTreeContext): Promise<TreeNode[]>;\n moveNode(source: TreeNode, target: TreeNode | undefined, context?: NavigationTreeMoveContext): Promise<void>;\n getDefaultExpandedSectionIds(owner: NavigationTreeOwner, slot?: NavigationTreeSlot): string[];\n onDidChange(listener: () => void): Disposable;\n}\n\n// The owner's top-level section. Extensions add ungrouped entries here and use a labeled section for a named group.\nexport const navigationRootSectionId = \"navigation.root\";\n// Each slot keeps its own root, so pinned header and footer rows never share a section id with the body.\nexport const navigationSlotRootSectionId = (slot: NavigationTreeSlot = \"content\") =>\n slot === \"content\" ? navigationRootSectionId : `navigation.${slot}`;\n\nconst ownerId = (owner: NavigationTreeOwner) => `${owner.kind}:${owner.extensionId}:${owner.id}`;\n\nconst ownersEqual = (left: NavigationTreeOwner, right: NavigationTreeOwner) => ownerId(left) === ownerId(right);\n\nconst contributionOrder =\n (owner: NavigationTreeOwner) => (left: NavigationTreeContribution, right: NavigationTreeContribution) => {\n const leftOwn = left.sourceExtensionId === owner.extensionId;\n const rightOwn = right.sourceExtensionId === owner.extensionId;\n if (leftOwn !== rightOwn) return leftOwn ? -1 : 1;\n if (!leftOwn) {\n const extensionOrder = left.sourceExtensionId.localeCompare(right.sourceExtensionId);\n if (extensionOrder !== 0) return extensionOrder;\n }\n return left.declarationIndex - right.declarationIndex || left.id.localeCompare(right.id);\n };\n\nconst scopedId = (scope: string | undefined, id: string) => (scope ? `${scope}:${id}` : id);\n\nconst readContext = (contribution: NavigationTreeContribution, context: NavigationTreeContext) => ({\n ...context,\n resource: contribution.resolveResource ? contribution.resolveResource(context.resource) : context.resource,\n});\n\nconst mergeSection = (sections: TreeViewSection[], section: TreeViewSection) => {\n const index = sections.findIndex((candidate) => candidate.id === section.id);\n if (index < 0) {\n sections.push(section);\n return;\n }\n const current = sections[index]!;\n sections[index] = { ...current, nodes: [...current.nodes, ...section.nodes] };\n};\n\nexport const createNavigationTreeRegistry = (input: CreateNavigationTreeRegistryInput = {}): NavigationTreeRegistry => {\n const contributions = new Map<string, NavigationTreeContribution>();\n const registryToken = {};\n const listeners = new Set<() => void>();\n const emit = () => {\n for (const listener of listeners) listener();\n };\n\n const matching = (owner: NavigationTreeOwner, slot: NavigationTreeSlot) =>\n [...contributions.values()]\n .filter((contribution) => ownersEqual(contribution.owner, owner) && (contribution.slot ?? \"content\") === slot)\n .sort(contributionOrder(owner));\n\n const projectNode = (\n node: TreeNode,\n contribution: NavigationTreeContribution,\n moveScope: string,\n resource?: ResourceRef,\n ): TreeNode => {\n const projected: TreeNode = {\n ...node,\n id: scopedId(contribution.idScope, node.id),\n moveScope,\n // Mode rows are navigation links users may hide and arrange; page-owned level rows are data such as notes\n // or sessions, which keep the order their owner gives them unless a row opts in.\n canHide: node.canHide ?? contribution.owner.kind === \"mode\",\n canReorder: node.canReorder ?? contribution.owner.kind === \"mode\",\n children: node.children?.map((child) => projectNode(child, contribution, moveScope, resource)),\n };\n setNavigationTreeNodeSource(projected, { contribution, node, resource, registryToken });\n return projected;\n };\n\n const projectSection = (\n section: TreeViewSection,\n contribution: NavigationTreeContribution,\n owner: NavigationTreeOwner,\n resource?: ResourceRef,\n ): TreeViewSection => ({\n ...section,\n id:\n contribution.sourceExtensionId !== owner.extensionId && !section.label\n ? navigationSlotRootSectionId(contribution.slot)\n : scopedId(contribution.idScope, section.id),\n moveScope: ownerId(owner),\n canHide: section.canHide ?? true,\n canReorder: section.canReorder ?? true,\n nodes: section.nodes.map((node) => projectNode(node, contribution, ownerId(owner), resource)),\n });\n\n const structureOf = (\n contribution: NavigationTreeContribution,\n owner: NavigationTreeOwner,\n context: NavigationTreeContext,\n ) => {\n const query = readContext(contribution, context);\n const structure = contribution.viewId\n ? input.getViewStructure?.(contribution.viewId, query)\n : contribution.getStructure?.(query);\n return (structure ?? []).map((section) => projectSection(section, contribution, owner, query.resource));\n };\n\n const mergeSections = (groups: TreeViewSection[][]) => {\n const sections: TreeViewSection[] = [];\n for (const section of groups.flat()) mergeSection(sections, section);\n return sections;\n };\n\n return {\n registerContribution(contribution) {\n if (contributions.has(contribution.id)) {\n throw new Error(`Navigation tree contribution already registered: ${contribution.id}`);\n }\n if (!contribution.viewId && !contribution.getSections) {\n throw new Error(`Navigation tree contribution must declare a viewId or getSections: ${contribution.id}`);\n }\n contributions.set(contribution.id, contribution);\n const refreshSubscription = contribution.viewId\n ? input.subscribeViewRefresh?.(contribution.viewId, emit)\n : undefined;\n emit();\n return createDisposable(() => {\n if (contributions.get(contribution.id) !== contribution) return;\n refreshSubscription?.dispose();\n contributions.delete(contribution.id);\n emit();\n });\n },\n\n resolveOwner(kind, id, slot) {\n return [...contributions.values()].find(\n (contribution) =>\n contribution.owner.kind === kind &&\n contribution.owner.id === id &&\n (!slot || (contribution.slot ?? \"content\") === slot),\n )?.owner;\n },\n\n getReadKey(owner, context = {}) {\n return JSON.stringify(\n ([\"header\", \"content\", \"footer\"] as const).flatMap((slot) =>\n matching(owner, slot).map((contribution) => [\n contribution.id,\n resourceKey(readContext(contribution, context).resource),\n ]),\n ),\n );\n },\n\n getStructure(owner, slot = \"content\", context = {}) {\n return mergeSections(matching(owner, slot).map((contribution) => structureOf(contribution, owner, context)));\n },\n\n async getSections(owner, slot = \"content\", context = {}) {\n const selected = matching(owner, slot);\n // Each contribution shows its declared structure until its own read replaces it.\n const available = selected.map((contribution) => structureOf(contribution, owner, context));\n const snapshot = () => mergeSections(available);\n await settleReadBatch(\n selected.map((contribution, index) => async (signal) => {\n const query = readContext(contribution, { ...context, signal });\n const publish = (sections: TreeViewSection[]) => {\n signal.throwIfAborted();\n available[index] = sections.map((section) => projectSection(section, contribution, owner, query.resource));\n context.onProgress?.(snapshot());\n };\n const source = { ...query, onProgress: publish };\n const sections = contribution.viewId\n ? await input.getViewSections?.(contribution.viewId, source)\n : await contribution.getSections?.(source);\n publish(sections ?? []);\n }),\n context.signal,\n );\n return snapshot();\n },\n\n async getChildren(node, context = {}) {\n context.signal?.throwIfAborted();\n const source = getNavigationTreeNodeSource(node, registryToken);\n if (!source) return node.children ?? [];\n const moveScope = node.moveScope ?? ownerId(source.contribution.owner);\n const query = { ...context, resource: source.resource };\n const children = source.contribution.viewId\n ? await input.getViewChildren?.(source.contribution.viewId, source.node, query)\n : await source.contribution.getChildren?.(source.node, query);\n if (!children) return node.children ?? [];\n return children.map((child) => projectNode(child, source.contribution, moveScope, source.resource));\n },\n\n async moveNode(sourceNode, targetNode, context = {}) {\n const source = getNavigationTreeNodeSource(sourceNode, registryToken);\n const target = targetNode ? getNavigationTreeNodeSource(targetNode, registryToken) : undefined;\n if (!source?.contribution.viewId || !source.node.canDrag) return;\n if (targetNode && (!target || source.contribution !== target.contribution || !target.node.canDrop)) return;\n await input.moveViewNode?.(source.contribution.viewId, source.node, target?.node, {\n ...context,\n resource: source.resource,\n });\n },\n\n getDefaultExpandedSectionIds(owner, selectedSlot) {\n const slots: readonly NavigationTreeSlot[] = selectedSlot ? [selectedSlot] : [\"header\", \"content\", \"footer\"];\n return slots.flatMap((slot) =>\n matching(owner, slot).flatMap((contribution) =>\n (\n contribution.defaultExpandedSectionIds ??\n (contribution.viewId ? input.getViewDefaultExpandedSectionIds?.(contribution.viewId) : undefined) ??\n []\n ).map((id) => scopedId(contribution.idScope, id)),\n ),\n );\n },\n\n onDidChange(listener) {\n listeners.add(listener);\n return createDisposable(() => listeners.delete(listener));\n },\n listActions() {\n return [...contributions.values()].flatMap((contribution) =>\n (contribution.listActions?.() ?? []).map((action) => ({\n ...action,\n ownerId: contribution.sourceExtensionId,\n })),\n );\n },\n };\n};\n"],"mappings":";;;AAEA,IAAaC,KAAwBC,MAAgD;CACnF,IAAI,CAACA,KAAS,OAAOA,KAAU,YAAYC,MAAMC,QAAQF,CAAK,GAAG,OAAO;CACxE,IAAMG,IAAWH,GACXI,KAAYC,MAAoB,OAAOA,KAAW,YAAYC,OAAOC,cAAcF,CAAM,KAAKA,IAAS;CAC7G,IAAI,CAACD,EAASD,EAASK,IAAI,GAAG,OAAO;CACrC,KAAK,IAAMC,KAAO;EAAC;EAAU;EAAW;CAAW,GACjD,IAAIN,EAASM,OAASE,KAAAA,KAAa,CAACP,EAASD,EAASM,EAAI,GAAG,OAAO;CAOtE,OAJA,EADIN,EAASS,cAAcD,KAAAA,KAAaR,EAASU,YAAYF,KAAAA,KACzDR,EAASU,YAAYF,KAAAA,MACnBR,EAASU,UAAUV,EAASK,QAC5BL,EAASU,YAAYV,EAASK,SAASL,EAASS,aAAa,MAAMT,EAASW,UAAU;AAG9F,GC2EagE,IAA0B,mBAE1BC,KAA+B/B,IAA2B,cACrEA,MAAS,YAAY8B,IAA0B,cAAc9B,KAEzDsB,KAAWzB,MAA+B,GAAGA,EAAMb,KAAI,GAAIa,EAAMX,YAAW,GAAIW,EAAMZ,MAEtF+C,KAAeC,GAA2BC,MAA+BZ,EAAQW,CAAI,MAAMX,EAAQY,CAAK,GAExGC,KACHtC,OAAgCoC,GAAkCC,MAAsC;CACvG,IAAME,IAAUH,EAAKnC,sBAAsBD,E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