@eclipse-lyra/core 0.7.14 → 0.7.16
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/api/index.js +17 -13
- package/dist/api/services.d.ts +1 -0
- package/dist/api/services.d.ts.map +1 -1
- package/dist/{config-C8viItpG.js → config-CTHJsmbF.js} +16 -6
- package/dist/config-CTHJsmbF.js.map +1 -0
- package/dist/core/apploader.d.ts +6 -0
- package/dist/core/apploader.d.ts.map +1 -1
- package/dist/core/contribution-mapping.d.ts +68 -0
- package/dist/core/contribution-mapping.d.ts.map +1 -0
- package/dist/core/contributionregistry.d.ts +12 -0
- package/dist/core/contributionregistry.d.ts.map +1 -1
- package/dist/core/ui-ids.d.ts +11 -0
- package/dist/core/ui-ids.d.ts.map +1 -0
- package/dist/{icon-DN6fp0dg.js → icon-C3H7IMWU.js} +135 -14
- package/dist/icon-C3H7IMWU.js.map +1 -0
- package/dist/index.js +17 -13
- package/dist/{nocontent-BhrN6yxJ.js → nocontent-TgnGDnXO.js} +2 -2
- package/dist/{nocontent-BhrN6yxJ.js.map → nocontent-TgnGDnXO.js.map} +1 -1
- package/dist/parts/index.js +1 -1
- package/dist/{resizable-grid-CIgUY5TR.js → resizable-grid-B6j8J49V.js} +13 -2
- package/dist/resizable-grid-B6j8J49V.js.map +1 -0
- package/dist/widgets/index.js +2 -2
- package/package.json +1 -1
- package/src/api/services.ts +6 -0
- package/src/contributions/default-ui-contributions.ts +14 -2
- package/src/core/apploader.ts +28 -7
- package/src/core/contribution-mapping.ts +142 -0
- package/src/core/contributionregistry.ts +44 -8
- package/src/core/ui-ids.ts +14 -0
- package/dist/config-C8viItpG.js.map +0 -1
- package/dist/icon-DN6fp0dg.js.map +0 -1
- package/dist/resizable-grid-CIgUY5TR.js.map +0 -1
package/dist/core/apploader.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Extension } from './extensionregistry';
|
|
2
2
|
import { Contribution, LayoutContribution } from './contributionregistry';
|
|
3
|
+
import { ContributionNameRemap } from './contribution-mapping';
|
|
3
4
|
/** Layout reference: layout id string, or id + props to parameterize the layout (e.g. show-bottom-panel). */
|
|
4
5
|
export type LayoutDescriptor = string | {
|
|
5
6
|
id: string;
|
|
@@ -107,6 +108,11 @@ export interface AppDefinition {
|
|
|
107
108
|
dependencies?: Record<string, string>;
|
|
108
109
|
/** Marketplace catalog URLs for this app. Registered when the app is registered. */
|
|
109
110
|
marketplaceCatalogUrls?: string[];
|
|
111
|
+
/**
|
|
112
|
+
* Optional contribution remaps for this application.
|
|
113
|
+
* Allows apps to declaratively remap contributions to different targets.
|
|
114
|
+
*/
|
|
115
|
+
remaps?: ContributionNameRemap[];
|
|
110
116
|
}
|
|
111
117
|
/**
|
|
112
118
|
* Options for registering an application with the apploader.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apploader.d.ts","sourceRoot":"","sources":["../../src/core/apploader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,
|
|
1
|
+
{"version":3,"file":"apploader.d.ts","sourceRoot":"","sources":["../../src/core/apploader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,EAAqB,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAwB,YAAY,EAAE,kBAAkB,EAAgC,MAAM,wBAAwB,CAAC;AAI9H,OAAO,EAAqC,KAAK,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAMvG,6GAA6G;AAC7G,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAA;CAAE,CAAC;AA0DjG;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC7B,wDAAwD;IACxD,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC;IAEpB,0CAA0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;;;OAMG;IACG,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAuBzD;;;;;;OAMG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAoE5B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAQ5B;;;;OAIG;IACG,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA6FtE;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAiB9B;;;;;OAKG;IACH,SAAS,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI;IAuDvC;;OAEG;IACH,aAAa,IAAI,aAAa,GAAG,SAAS;IAI1C;;OAEG;IACH,iBAAiB,IAAI,aAAa,EAAE;IAIpC;;OAEG;IACG,iBAAiB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAStD;;OAEG;IACG,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAcrD,oBAAoB,IAAI,kBAAkB,EAAE;IAI5C,kBAAkB,IAAI,MAAM;IAItB,oBAAoB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IASnD,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAmB3D;;;;;;;;;OASG;YACW,eAAe;CAiEhC;AAED,eAAO,MAAM,gBAAgB,kBAAyB,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Contribution } from './contributionregistry';
|
|
2
|
+
export interface ContributionNameRemap {
|
|
3
|
+
/**
|
|
4
|
+
* Globally unique, namespaced contribution name
|
|
5
|
+
* (e.g. "view.filebrowser", "toolbar.filebrowser.rename").
|
|
6
|
+
*/
|
|
7
|
+
name: string;
|
|
8
|
+
/**
|
|
9
|
+
* Effective target slots for this contribution.
|
|
10
|
+
* If empty, the original target is used.
|
|
11
|
+
*/
|
|
12
|
+
targets: string[];
|
|
13
|
+
}
|
|
14
|
+
interface NameRemapState {
|
|
15
|
+
appTargets: string[] | undefined;
|
|
16
|
+
globalTargets: string[] | undefined;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Registry responsible for resolving effective contribution targets.
|
|
20
|
+
*
|
|
21
|
+
* It supports:
|
|
22
|
+
* - Global (framework-level) remaps.
|
|
23
|
+
* - App-level remaps coming from AppDefinition.
|
|
24
|
+
* - Multiple targets per contribution.
|
|
25
|
+
*
|
|
26
|
+
* Resolution precedence:
|
|
27
|
+
* app-level remap > global remap > original target
|
|
28
|
+
*/
|
|
29
|
+
declare class ContributionTargetMappingRegistry {
|
|
30
|
+
private globalNameRemaps;
|
|
31
|
+
private appNameRemaps;
|
|
32
|
+
setGlobalNameRemap(name: string, targets: string[]): void;
|
|
33
|
+
/** Clears all remaps. For testing only. */
|
|
34
|
+
resetForTesting(): void;
|
|
35
|
+
applyAppNameRemaps(remaps: ContributionNameRemap[] | undefined | null): void;
|
|
36
|
+
/**
|
|
37
|
+
* Returns the effective target slots for a contribution given its original target.
|
|
38
|
+
*
|
|
39
|
+
* Semantics:
|
|
40
|
+
* - When a remap exists with a non-empty targets array, those targets are used.
|
|
41
|
+
* - When a remap exists with an empty targets array, the contribution is disabled (no targets).
|
|
42
|
+
* - When no remap exists, the original target is used.
|
|
43
|
+
*/
|
|
44
|
+
getEffectiveTargets(originalTarget: string, contribution: Contribution): string[];
|
|
45
|
+
/**
|
|
46
|
+
* Returns current mapping state for debugging and tooling.
|
|
47
|
+
*/
|
|
48
|
+
listNameRemaps(): Record<string, NameRemapState>;
|
|
49
|
+
private normalizeTargets;
|
|
50
|
+
}
|
|
51
|
+
export declare const contributionTargetMappingRegistry: ContributionTargetMappingRegistry;
|
|
52
|
+
/**
|
|
53
|
+
* Public helper to override contribution targets programmatically.
|
|
54
|
+
* This sets a global remap that applies across all apps.
|
|
55
|
+
*/
|
|
56
|
+
export declare function overrideContributionTargets(name: string, targets: string | string[]): void;
|
|
57
|
+
/**
|
|
58
|
+
* Apply config-driven name remaps from a simple object.
|
|
59
|
+
* Intended for hosts that want to load JSON/YAML mapping files.
|
|
60
|
+
*/
|
|
61
|
+
export declare function applyConfigNameRemaps(config: Record<string, string | string[]>): void;
|
|
62
|
+
/**
|
|
63
|
+
* Convenience helper for debugging: returns current remap state
|
|
64
|
+
* for all known contribution names.
|
|
65
|
+
*/
|
|
66
|
+
export declare function listContributionNameRemaps(): Record<string, NameRemapState>;
|
|
67
|
+
export {};
|
|
68
|
+
//# sourceMappingURL=contribution-mapping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contribution-mapping.d.ts","sourceRoot":"","sources":["../../src/core/contribution-mapping.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,WAAW,qBAAqB;IAClC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,UAAU,cAAc;IACpB,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACjC,aAAa,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACvC;AAED;;;;;;;;;;GAUG;AACH,cAAM,iCAAiC;IACnC,OAAO,CAAC,gBAAgB,CAA+B;IACvD,OAAO,CAAC,aAAa,CAA+B;IAEpD,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;IAIzD,2CAA2C;IAC3C,eAAe,IAAI,IAAI;IAKvB,kBAAkB,CAAC,MAAM,EAAE,qBAAqB,EAAE,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI;IAQ5E;;;;;;;OAOG;IACH,mBAAmB,CAAC,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,GAAG,MAAM,EAAE;IAmBjF;;OAEG;IACH,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC;IAehD,OAAO,CAAC,gBAAgB;CAU3B;AAED,eAAO,MAAM,iCAAiC,mCAA0C,CAAC;AAGzF;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAG1F;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,IAAI,CAKrF;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAE3E"}
|
|
@@ -6,6 +6,8 @@ export interface ContributionChangeEvent {
|
|
|
6
6
|
contributions: Contribution[];
|
|
7
7
|
}
|
|
8
8
|
export interface Contribution {
|
|
9
|
+
/** Optional globally unique, namespaced contribution name (e.g. "view.filebrowser"). */
|
|
10
|
+
name?: string;
|
|
9
11
|
target?: string;
|
|
10
12
|
label: string;
|
|
11
13
|
icon?: string;
|
|
@@ -49,7 +51,17 @@ export interface LayoutContribution extends Contribution {
|
|
|
49
51
|
declare class ContributionRegistry {
|
|
50
52
|
private contributions;
|
|
51
53
|
registerContribution<T extends Contribution>(target: string, contribution: T): void;
|
|
54
|
+
/**
|
|
55
|
+
* Returns all contributions whose *effective* targets include the given slot.
|
|
56
|
+
*
|
|
57
|
+
* Note: This currently scans all registered contributions and resolves
|
|
58
|
+
* remaps on each call (O(N) in number of contributions). This is acceptable
|
|
59
|
+
* for typical Lyra apps (dozens/hundreds of contributions and few slots),
|
|
60
|
+
* but if contribution counts grow significantly we may want to introduce a
|
|
61
|
+
* cached index of effective targets per slot to keep lookups O(1).
|
|
62
|
+
*/
|
|
52
63
|
getContributions<T extends Contribution>(target: string): T[];
|
|
64
|
+
private getOrCreateSlot;
|
|
53
65
|
}
|
|
54
66
|
export declare const contributionRegistry: ContributionRegistry;
|
|
55
67
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contributionregistry.d.ts","sourceRoot":"","sources":["../../src/core/contributionregistry.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"contributionregistry.d.ts","sourceRoot":"","sources":["../../src/core/contributionregistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAKrC,eAAO,MAAM,4BAA4B,qDAAqD,CAAA;AAE9F,MAAM,WAAW,uBAAuB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,YAAY,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,YAAY;IACzB,wFAAwF;IACxF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,MAAM,OAAO,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;CACzD;AAED,MAAM,WAAW,gBAAiB,SAAQ,YAAY;IAClD,SAAS,EAAE,MAAM,GAAG,CAAC,MAAM,cAAc,CAAC,CAAA;CAC7C;AAED,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sGAAsG;IACtG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0GAA0G;IAC1G,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,cAAc,CAAC;CAC9C;AAED,MAAM,WAAW,gBAAiB,SAAQ,YAAY;IAClD,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACpD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,GAAG;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,CAAC,MAAM,cAAc,CAAC,CAAC;IAClG,MAAM,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC;AAED,cAAM,oBAAoB;IACtB,OAAO,CAAC,aAAa,CAA0C;IAE/D,oBAAoB,CAAC,CAAC,SAAS,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;IAmB5E;;;;;;;;OAQG;IACH,gBAAgB,CAAC,CAAC,SAAS,YAAY,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,EAAE;IAiB7D,OAAO,CAAC,eAAe;CAM1B;AAED,eAAO,MAAM,oBAAoB,sBAA6B,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const VIEW_FILEBROWSER = "view.filebrowser";
|
|
2
|
+
export declare const VIEW_LOG_TERMINAL = "view.logTerminal";
|
|
3
|
+
export declare const TOOLBAR_INFO = "toolbar.info";
|
|
4
|
+
export declare const TOOLBAR_FAST_VIEWS = "toolbar.fastViews";
|
|
5
|
+
export declare const TOOLBAR_LANGUAGE_SELECTOR = "toolbar.languageSelector";
|
|
6
|
+
export declare const TOOLBAR_APP_SWITCHER = "toolbar.appSwitcher";
|
|
7
|
+
export declare const TOOLBAR_FILEBROWSER_RENAME = "toolbar.filebrowser.rename";
|
|
8
|
+
export declare const TOOLBAR_FILEBROWSER_DELETE = "toolbar.filebrowser.delete";
|
|
9
|
+
export declare const CTXMENU_FILEBROWSER_RENAME = "contextmenu.filebrowser.rename";
|
|
10
|
+
export declare const CTXMENU_FILEBROWSER_DELETE = "contextmenu.filebrowser.delete";
|
|
11
|
+
//# sourceMappingURL=ui-ids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-ids.d.ts","sourceRoot":"","sources":["../../src/core/ui-ids.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,iBAAiB,qBAAqB,CAAC;AAEpD,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AACtD,eAAO,MAAM,yBAAyB,6BAA6B,CAAC;AACpE,eAAO,MAAM,oBAAoB,wBAAwB,CAAC;AAE1D,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AACvE,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AAEvE,eAAO,MAAM,0BAA0B,mCAAmC,CAAC;AAC3E,eAAO,MAAM,0BAA0B,mCAAmC,CAAC"}
|
|
@@ -168,13 +168,99 @@ function setLogLevel(level) {
|
|
|
168
168
|
}
|
|
169
169
|
const defaultLogger = createLogger("System");
|
|
170
170
|
rootContext.put("logger", defaultLogger);
|
|
171
|
+
class ContributionTargetMappingRegistry {
|
|
172
|
+
constructor() {
|
|
173
|
+
this.globalNameRemaps = /* @__PURE__ */ new Map();
|
|
174
|
+
this.appNameRemaps = /* @__PURE__ */ new Map();
|
|
175
|
+
}
|
|
176
|
+
setGlobalNameRemap(name, targets) {
|
|
177
|
+
this.globalNameRemaps.set(name, this.normalizeTargets(targets));
|
|
178
|
+
}
|
|
179
|
+
/** Clears all remaps. For testing only. */
|
|
180
|
+
resetForTesting() {
|
|
181
|
+
this.globalNameRemaps.clear();
|
|
182
|
+
this.appNameRemaps.clear();
|
|
183
|
+
}
|
|
184
|
+
applyAppNameRemaps(remaps) {
|
|
185
|
+
this.appNameRemaps.clear();
|
|
186
|
+
if (!remaps) return;
|
|
187
|
+
for (const remap of remaps) {
|
|
188
|
+
this.appNameRemaps.set(remap.name, this.normalizeTargets(remap.targets));
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Returns the effective target slots for a contribution given its original target.
|
|
193
|
+
*
|
|
194
|
+
* Semantics:
|
|
195
|
+
* - When a remap exists with a non-empty targets array, those targets are used.
|
|
196
|
+
* - When a remap exists with an empty targets array, the contribution is disabled (no targets).
|
|
197
|
+
* - When no remap exists, the original target is used.
|
|
198
|
+
*/
|
|
199
|
+
getEffectiveTargets(originalTarget, contribution) {
|
|
200
|
+
const name = contribution.name;
|
|
201
|
+
if (!name) {
|
|
202
|
+
return [originalTarget];
|
|
203
|
+
}
|
|
204
|
+
const appTargets = this.appNameRemaps.get(name);
|
|
205
|
+
if (appTargets) {
|
|
206
|
+
return appTargets.length > 0 ? appTargets : [];
|
|
207
|
+
}
|
|
208
|
+
const globalTargets = this.globalNameRemaps.get(name);
|
|
209
|
+
if (globalTargets) {
|
|
210
|
+
return globalTargets.length > 0 ? globalTargets : [];
|
|
211
|
+
}
|
|
212
|
+
return [originalTarget];
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Returns current mapping state for debugging and tooling.
|
|
216
|
+
*/
|
|
217
|
+
listNameRemaps() {
|
|
218
|
+
const result = {};
|
|
219
|
+
const allNames = /* @__PURE__ */ new Set([
|
|
220
|
+
...this.globalNameRemaps.keys(),
|
|
221
|
+
...this.appNameRemaps.keys()
|
|
222
|
+
]);
|
|
223
|
+
for (const name of allNames) {
|
|
224
|
+
result[name] = {
|
|
225
|
+
appTargets: this.appNameRemaps.get(name),
|
|
226
|
+
globalTargets: this.globalNameRemaps.get(name)
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
return result;
|
|
230
|
+
}
|
|
231
|
+
normalizeTargets(targets) {
|
|
232
|
+
const seen = /* @__PURE__ */ new Set();
|
|
233
|
+
const result = [];
|
|
234
|
+
for (const t of targets) {
|
|
235
|
+
if (!t || seen.has(t)) continue;
|
|
236
|
+
seen.add(t);
|
|
237
|
+
result.push(t);
|
|
238
|
+
}
|
|
239
|
+
return result;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
const contributionTargetMappingRegistry = new ContributionTargetMappingRegistry();
|
|
243
|
+
rootContext.put("contributionTargetMappingRegistry", contributionTargetMappingRegistry);
|
|
244
|
+
function overrideContributionTargets(name, targets) {
|
|
245
|
+
const normalized = Array.isArray(targets) ? targets : [targets];
|
|
246
|
+
contributionTargetMappingRegistry.setGlobalNameRemap(name, normalized);
|
|
247
|
+
}
|
|
248
|
+
function applyConfigNameRemaps(config) {
|
|
249
|
+
for (const [name, targets] of Object.entries(config)) {
|
|
250
|
+
const normalized = Array.isArray(targets) ? targets : [targets];
|
|
251
|
+
contributionTargetMappingRegistry.setGlobalNameRemap(name, normalized);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
function listContributionNameRemaps() {
|
|
255
|
+
return contributionTargetMappingRegistry.listNameRemaps();
|
|
256
|
+
}
|
|
171
257
|
const TOPIC_CONTRIBUTEIONS_CHANGED = "events/contributionregistry/contributionsChanged";
|
|
172
258
|
class ContributionRegistry {
|
|
173
259
|
constructor() {
|
|
174
260
|
this.contributions = /* @__PURE__ */ new Map();
|
|
175
261
|
}
|
|
176
262
|
registerContribution(target, contribution) {
|
|
177
|
-
const targetSlot = this.
|
|
263
|
+
const targetSlot = this.getOrCreateSlot(target);
|
|
178
264
|
if ("command" in contribution) {
|
|
179
265
|
const cmd = contribution;
|
|
180
266
|
if (cmd.disabled instanceof Function) {
|
|
@@ -183,8 +269,39 @@ class ContributionRegistry {
|
|
|
183
269
|
}
|
|
184
270
|
targetSlot.push(contribution);
|
|
185
271
|
publish(TOPIC_CONTRIBUTEIONS_CHANGED, { target, contributions: targetSlot });
|
|
272
|
+
const effectiveTargets = contributionTargetMappingRegistry.getEffectiveTargets(target, contribution);
|
|
273
|
+
for (const effectiveTarget of effectiveTargets) {
|
|
274
|
+
if (effectiveTarget === target) continue;
|
|
275
|
+
const contributionsForSlot = this.getContributions(effectiveTarget);
|
|
276
|
+
publish(TOPIC_CONTRIBUTEIONS_CHANGED, { target: effectiveTarget, contributions: contributionsForSlot });
|
|
277
|
+
}
|
|
186
278
|
}
|
|
279
|
+
/**
|
|
280
|
+
* Returns all contributions whose *effective* targets include the given slot.
|
|
281
|
+
*
|
|
282
|
+
* Note: This currently scans all registered contributions and resolves
|
|
283
|
+
* remaps on each call (O(N) in number of contributions). This is acceptable
|
|
284
|
+
* for typical Lyra apps (dozens/hundreds of contributions and few slots),
|
|
285
|
+
* but if contribution counts grow significantly we may want to introduce a
|
|
286
|
+
* cached index of effective targets per slot to keep lookups O(1).
|
|
287
|
+
*/
|
|
187
288
|
getContributions(target) {
|
|
289
|
+
const results = [];
|
|
290
|
+
for (const [originalTarget, list] of this.contributions.entries()) {
|
|
291
|
+
const typedList = list;
|
|
292
|
+
for (const contribution of typedList) {
|
|
293
|
+
const effectiveTargets = contributionTargetMappingRegistry.getEffectiveTargets(originalTarget, contribution);
|
|
294
|
+
if (effectiveTargets.includes(target)) {
|
|
295
|
+
results.push(contribution);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
if (results.length === 0) {
|
|
300
|
+
this.getOrCreateSlot(target);
|
|
301
|
+
}
|
|
302
|
+
return results;
|
|
303
|
+
}
|
|
304
|
+
getOrCreateSlot(target) {
|
|
188
305
|
if (!this.contributions.has(target)) {
|
|
189
306
|
this.contributions.set(target, []);
|
|
190
307
|
}
|
|
@@ -467,21 +584,25 @@ export {
|
|
|
467
584
|
activePartSignal as d,
|
|
468
585
|
activeSelectionSignal as e,
|
|
469
586
|
activeTasksSignal as f,
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
587
|
+
applyConfigNameRemaps as g,
|
|
588
|
+
commandRegistry as h,
|
|
589
|
+
contributionRegistry as i,
|
|
590
|
+
contributionTargetMappingRegistry as j,
|
|
591
|
+
createLogger as k,
|
|
592
|
+
listContributionNameRemaps as l,
|
|
593
|
+
defaultLogger as m,
|
|
594
|
+
perspectiveSwitchedSignal as n,
|
|
595
|
+
overrideContributionTargets as o,
|
|
479
596
|
partDirtySignal as p,
|
|
480
|
-
|
|
597
|
+
rootContext as q,
|
|
481
598
|
registerAll as r,
|
|
482
599
|
setLogLevel as s,
|
|
483
600
|
toastError as t,
|
|
484
|
-
|
|
485
|
-
|
|
601
|
+
toastInfo as u,
|
|
602
|
+
toastWarning as v,
|
|
603
|
+
uiContext as w,
|
|
604
|
+
watchSignal as x,
|
|
605
|
+
registerLogHandler as y,
|
|
606
|
+
unregisterLogHandler as z
|
|
486
607
|
};
|
|
487
|
-
//# sourceMappingURL=icon-
|
|
608
|
+
//# sourceMappingURL=icon-C3H7IMWU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-C3H7IMWU.js","sources":["../src/core/di.ts","../src/core/toast.ts","../src/core/logger.ts","../src/core/contribution-mapping.ts","../src/core/contributionregistry.ts","../src/core/appstate.ts","../src/core/commandregistry.ts","../src/core/signals.ts","../src/widgets/widget.ts","../src/widgets/icon.ts"],"sourcesContent":["export class DependencyContext {\n private variables: any;\n private proxy: any;\n private children: DependencyContext[] = [];\n private parent?: DependencyContext;\n\n constructor(variables: any) {\n this.variables = variables\n // @ts-ignore\n this.proxy = new Proxy(variables, this)\n }\n\n get(target: any, prop: string): any {\n return target[prop] || this.parent?.getProxy()[prop];\n }\n\n set(target: any, prop: string, value: any) {\n target[prop] = value;\n }\n\n put(prop: string, value: any) {\n this.variables[prop] = value;\n }\n\n public getProxy() {\n return this.proxy;\n }\n\n public createChild(variables: any = {}): DependencyContext {\n const child = new DependencyContext(variables)\n child.parent = this\n this.children.push(child)\n return child\n }\n\n getChildren() {\n return this.children;\n }\n\n getParent() {\n return this.parent;\n }\n\n destroy() {\n const index = this.parent?.children.indexOf(this)\n if (index !== undefined && index >= 0) {\n this.parent?.children.splice(index, 1)\n }\n this.parent = undefined\n }\n}\n\nexport const rootContext = new DependencyContext({});\nexport const uiContext = rootContext.createChild({});","import Toastify from 'toastify-js';\nimport 'toastify-js/src/toastify.css';\n\nconst DURATION = 4000;\nconst BASE = { duration: DURATION, gravity: 'bottom' as const, position: 'right' as const, close: true };\n\nconst show = (msg: string, style: { background: string; color: string }) => {\n Toastify({ ...BASE, text: msg, style }).showToast();\n};\n\nexport const toastInfo = (msg: string) => {\n show(msg, { background: 'var(--wa-color-brand-50)', color: 'var(--wa-color-brand-on)' });\n};\n\nexport const toastError = (msg: string) => {\n show(msg, { background: 'var(--wa-color-danger-50)', color: 'var(--wa-color-danger-on)' });\n};\n\nexport const toastWarning = (msg: string) => {\n show(msg, { background: 'var(--wa-color-warning-50)', color: 'var(--wa-color-warning-on)' });\n};\n","import { rootContext } from './di';\n\nexport type LogLevel = 'info' | 'warning' | 'error' | 'debug';\n\nconst LogLevelPriority: Record<LogLevel, number> = {\n 'debug': 0,\n 'info': 1,\n 'warning': 2,\n 'error': 3,\n};\n\n// Global log level filter\nlet globalLogLevel: LogLevel = 'debug';\n\n// Store original console methods before any interception\nconst originalConsole = {\n log: console.log.bind(console),\n info: console.info.bind(console),\n warn: console.warn.bind(console),\n error: console.error.bind(console),\n debug: console.debug.bind(console)\n};\n\n// Log handler type\ntype LogHandler = (source: string, message: string, level: LogLevel) => void;\n\n// Registered log handler (set by UI components like log-terminal)\nlet logHandler: LogHandler | null = null;\n\n// Message buffer for logs that occur before handler is registered\nconst messageBuffer: Array<{source: string, message: string, level: LogLevel}> = [];\n\n// Format console arguments\nfunction formatArg(arg: any): string {\n if (arg === null) return 'null';\n if (arg === undefined) return 'undefined';\n if (typeof arg === 'string') return arg;\n if (typeof arg === 'number' || typeof arg === 'boolean') return String(arg);\n if (arg instanceof Error) return `${arg.name}: ${arg.message}`;\n \n try {\n return JSON.stringify(arg);\n } catch {\n return String(arg);\n }\n}\n\n/**\n * Global logger utility for logging messages\n */\nexport class Logger {\n constructor(private source: string) {}\n\n info(message: string) {\n this.log(message, 'info');\n }\n\n warning(message: string) {\n this.log(message, 'warning');\n }\n\n warn(message: string) {\n this.log(message, 'warning');\n }\n\n error(message: string) {\n this.log(message, 'error');\n }\n\n debug(message: string) {\n this.log(message, 'debug');\n }\n\n private log(message: string, level: LogLevel) {\n dispatch(this.source, message, level);\n }\n}\n\n/**\n * Check if a log level should be displayed based on current filter\n */\nfunction shouldLog(level: LogLevel): boolean {\n return LogLevelPriority[level] >= LogLevelPriority[globalLogLevel];\n}\n\n/**\n * Dispatch a log message to the registered handler (or buffer it if no handler registered)\n */\nfunction dispatch(source: string, message: string, level: LogLevel) {\n if (!shouldLog(level)) {\n return;\n }\n\n if (logHandler) {\n logHandler(source, message, level);\n } else {\n // Buffer the message until handler is registered\n messageBuffer.push({ source, message, level });\n // Also log to console as fallback\n originalConsole[level === 'error' ? 'error' : level === 'warning' ? 'warn' : level === 'debug' ? 'debug' : 'log'](\n `[${source}] ${message}`\n );\n }\n}\n\n/**\n * Initialize console interception globally\n * Note: This is called automatically when the logger module is imported\n */\nexport function initializeConsoleInterception() {\n console.log = function(...args: any[]) {\n originalConsole.log.apply(console, args);\n dispatch('Console', args.map(a => formatArg(a)).join(' '), 'info');\n };\n \n console.info = function(...args: any[]) {\n originalConsole.info.apply(console, args);\n dispatch('Console', args.map(a => formatArg(a)).join(' '), 'info');\n };\n \n console.warn = function(...args: any[]) {\n originalConsole.warn.apply(console, args);\n dispatch('Console', args.map(a => formatArg(a)).join(' '), 'warning');\n };\n \n console.error = function(...args: any[]) {\n originalConsole.error.apply(console, args);\n dispatch('Console', args.map(a => formatArg(a)).join(' '), 'error');\n };\n \n console.debug = function(...args: any[]) {\n originalConsole.debug.apply(console, args);\n dispatch('Console', args.map(a => formatArg(a)).join(' '), 'debug');\n };\n}\n\n// Auto-initialize console interception when this module is imported\ninitializeConsoleInterception();\n\n/**\n * Register a handler to receive log messages\n * Also flushes any buffered messages to the new handler\n */\nexport function registerLogHandler(handler: LogHandler) {\n logHandler = handler;\n \n // Flush buffered messages\n while (messageBuffer.length > 0) {\n const msg = messageBuffer.shift();\n if (msg) {\n handler(msg.source, msg.message, msg.level);\n }\n }\n}\n\n/**\n * Unregister the current log handler\n */\nexport function unregisterLogHandler() {\n logHandler = null;\n}\n\n/**\n * Create a logger instance for a specific source\n */\nexport function createLogger(source: string): Logger {\n return new Logger(source);\n}\n\n/**\n * Set the global log level filter\n */\nexport function setLogLevel(level: LogLevel) {\n globalLogLevel = level;\n}\n\n/**\n * Default logger instance for backward compatibility\n * This provides a simple logger similar to the old logging.ts\n */\nconst defaultLogger = createLogger('System');\n\n// Register default logger in DI container for backward compatibility\nrootContext.put('logger', defaultLogger);\n\nexport default defaultLogger;\n\n","import { rootContext } from \"./di\";\nimport type { Contribution } from \"./contributionregistry\";\n\nexport interface ContributionNameRemap {\n /**\n * Globally unique, namespaced contribution name\n * (e.g. \"view.filebrowser\", \"toolbar.filebrowser.rename\").\n */\n name: string;\n /**\n * Effective target slots for this contribution.\n * If empty, the original target is used.\n */\n targets: string[];\n}\n\ninterface NameRemapState {\n appTargets: string[] | undefined;\n globalTargets: string[] | undefined;\n}\n\n/**\n * Registry responsible for resolving effective contribution targets.\n *\n * It supports:\n * - Global (framework-level) remaps.\n * - App-level remaps coming from AppDefinition.\n * - Multiple targets per contribution.\n *\n * Resolution precedence:\n * app-level remap > global remap > original target\n */\nclass ContributionTargetMappingRegistry {\n private globalNameRemaps = new Map<string, string[]>();\n private appNameRemaps = new Map<string, string[]>();\n\n setGlobalNameRemap(name: string, targets: string[]): void {\n this.globalNameRemaps.set(name, this.normalizeTargets(targets));\n }\n\n /** Clears all remaps. For testing only. */\n resetForTesting(): void {\n this.globalNameRemaps.clear();\n this.appNameRemaps.clear();\n }\n\n applyAppNameRemaps(remaps: ContributionNameRemap[] | undefined | null): void {\n this.appNameRemaps.clear();\n if (!remaps) return;\n for (const remap of remaps) {\n this.appNameRemaps.set(remap.name, this.normalizeTargets(remap.targets));\n }\n }\n\n /**\n * Returns the effective target slots for a contribution given its original target.\n *\n * Semantics:\n * - When a remap exists with a non-empty targets array, those targets are used.\n * - When a remap exists with an empty targets array, the contribution is disabled (no targets).\n * - When no remap exists, the original target is used.\n */\n getEffectiveTargets(originalTarget: string, contribution: Contribution): string[] {\n const name = (contribution as any).name as string | undefined;\n if (!name) {\n return [originalTarget];\n }\n\n const appTargets = this.appNameRemaps.get(name);\n if (appTargets) {\n return appTargets.length > 0 ? appTargets : [];\n }\n\n const globalTargets = this.globalNameRemaps.get(name);\n if (globalTargets) {\n return globalTargets.length > 0 ? globalTargets : [];\n }\n\n return [originalTarget];\n }\n\n /**\n * Returns current mapping state for debugging and tooling.\n */\n listNameRemaps(): Record<string, NameRemapState> {\n const result: Record<string, NameRemapState> = {};\n const allNames = new Set<string>([\n ...this.globalNameRemaps.keys(),\n ...this.appNameRemaps.keys()\n ]);\n for (const name of allNames) {\n result[name] = {\n appTargets: this.appNameRemaps.get(name),\n globalTargets: this.globalNameRemaps.get(name)\n };\n }\n return result;\n }\n\n private normalizeTargets(targets: string[]): string[] {\n const seen = new Set<string>();\n const result: string[] = [];\n for (const t of targets) {\n if (!t || seen.has(t)) continue;\n seen.add(t);\n result.push(t);\n }\n return result;\n }\n}\n\nexport const contributionTargetMappingRegistry = new ContributionTargetMappingRegistry();\nrootContext.put(\"contributionTargetMappingRegistry\", contributionTargetMappingRegistry);\n\n/**\n * Public helper to override contribution targets programmatically.\n * This sets a global remap that applies across all apps.\n */\nexport function overrideContributionTargets(name: string, targets: string | string[]): void {\n const normalized = Array.isArray(targets) ? targets : [targets];\n contributionTargetMappingRegistry.setGlobalNameRemap(name, normalized);\n}\n\n/**\n * Apply config-driven name remaps from a simple object.\n * Intended for hosts that want to load JSON/YAML mapping files.\n */\nexport function applyConfigNameRemaps(config: Record<string, string | string[]>): void {\n for (const [name, targets] of Object.entries(config)) {\n const normalized = Array.isArray(targets) ? targets : [targets];\n contributionTargetMappingRegistry.setGlobalNameRemap(name, normalized);\n }\n}\n\n/**\n * Convenience helper for debugging: returns current remap state\n * for all known contribution names.\n */\nexport function listContributionNameRemaps(): Record<string, NameRemapState> {\n return contributionTargetMappingRegistry.listNameRemaps();\n}\n\n","import { Signal } from \"@lit-labs/signals\";\nimport { TemplateResult } from \"lit\";\nimport { publish } from \"./events\";\nimport { rootContext } from \"./di\";\nimport { contributionTargetMappingRegistry } from \"./contribution-mapping\";\n\nexport const TOPIC_CONTRIBUTEIONS_CHANGED = \"events/contributionregistry/contributionsChanged\"\n\nexport interface ContributionChangeEvent {\n target: string;\n contributions: Contribution[];\n}\n\nexport interface Contribution {\n /** Optional globally unique, namespaced contribution name (e.g. \"view.filebrowser\"). */\n name?: string;\n target?: string;\n label: string;\n icon?: string;\n slot?: string;\n}\n\nexport interface CommandContribution extends Contribution {\n command: string;\n params?: Record<string, any>;\n showLabel?: boolean;\n disabled?: (() => boolean) | Signal.Computed<boolean>;\n}\n\nexport interface HTMLContribution extends Contribution {\n component: string | (() => TemplateResult)\n}\n\nexport interface TabContribution extends Contribution {\n name: string;\n editorId?: string;\n closable?: boolean;\n noOverflow?: boolean;\n /** When true or omitted, a lyra-toolbar is rendered for this tab; when false, no toolbar is shown. */\n toolbar?: boolean;\n /** When true or omitted, a contextmenu is rendered for this tab; when false, no context menu is shown. */\n contextMenu?: boolean;\n component?: (id: string) => TemplateResult;\n}\n\nexport interface IconContribution extends Contribution {\n mappings: Record<string, string>;\n priority?: number;\n}\n\nexport interface LayoutContribution extends Contribution {\n id: string;\n name: string;\n /** Optional icon name (e.g. Font Awesome) for the layout switcher. */\n icon?: string;\n component: string | { tag: string; attributes?: Record<string, string> } | (() => TemplateResult);\n onShow?: () => void | Promise<void>;\n}\n\nclass ContributionRegistry {\n private contributions: Map<string, Contribution[]> = new Map();\n\n registerContribution<T extends Contribution>(target: string, contribution: T) {\n const targetSlot = this.getOrCreateSlot(target);\n if (\"command\" in contribution) {\n const cmd = contribution as unknown as CommandContribution\n if (cmd.disabled instanceof Function) {\n cmd.disabled = new Signal.Computed<boolean>(cmd.disabled)\n }\n }\n targetSlot.push(contribution);\n publish(TOPIC_CONTRIBUTEIONS_CHANGED, { target, contributions: targetSlot } as ContributionChangeEvent);\n\n const effectiveTargets = contributionTargetMappingRegistry.getEffectiveTargets(target, contribution);\n for (const effectiveTarget of effectiveTargets) {\n if (effectiveTarget === target) continue;\n const contributionsForSlot = this.getContributions(effectiveTarget);\n publish(TOPIC_CONTRIBUTEIONS_CHANGED, { target: effectiveTarget, contributions: contributionsForSlot } as ContributionChangeEvent);\n }\n }\n\n /**\n * Returns all contributions whose *effective* targets include the given slot.\n *\n * Note: This currently scans all registered contributions and resolves\n * remaps on each call (O(N) in number of contributions). This is acceptable\n * for typical Lyra apps (dozens/hundreds of contributions and few slots),\n * but if contribution counts grow significantly we may want to introduce a\n * cached index of effective targets per slot to keep lookups O(1).\n */\n getContributions<T extends Contribution>(target: string): T[] {\n const results: T[] = [];\n for (const [originalTarget, list] of this.contributions.entries()) {\n const typedList = list as T[];\n for (const contribution of typedList) {\n const effectiveTargets = contributionTargetMappingRegistry.getEffectiveTargets(originalTarget, contribution);\n if (effectiveTargets.includes(target)) {\n results.push(contribution);\n }\n }\n }\n if (results.length === 0) {\n this.getOrCreateSlot(target);\n }\n return results;\n }\n\n private getOrCreateSlot(target: string): Contribution[] {\n if (!this.contributions.has(target)) {\n this.contributions.set(target, []);\n }\n return this.contributions.get(target)!;\n }\n}\n\nexport const contributionRegistry = new ContributionRegistry()\nrootContext.put(\"contributionRegistry\", contributionRegistry)","import { signal } from '@lit-labs/signals';\nimport { LyraPart } from \"../parts/part\";\n\nexport const EMPTY_SIGNALPORT = {} as any\n\nexport const activePartSignal = signal<LyraPart>(null as unknown as LyraPart)\nexport const activeEditorSignal = signal<LyraPart>(null as unknown as LyraPart)\n\nexport const partDirtySignal = signal<LyraPart>(null as unknown as LyraPart)\n\nexport const activeTasksSignal = signal<number>(0)\n\nexport const activeSelectionSignal = signal<any>(undefined)\n\nexport const perspectiveSwitchedSignal = signal<{name: string, timestamp: number}>({name: '', timestamp: 0})","import logger from \"./logger\";\nimport { publish } from \"./events\";\nimport { CommandContribution, Contribution, contributionRegistry } from \"./contributionregistry\";\nimport { rootContext } from \"./di\";\nimport { activePartSignal, activeEditorSignal } from \"./appstate\";\n\nexport const TOPIC_COMMAND_REGISTERED = \"events/commandregistry/commandRegistered\";\n\nexport interface Parameter {\n name: string;\n description: string;\n type?: string;\n required: boolean;\n allowedValues?: string[];\n}\n\nexport interface Variable {\n name: string;\n description: string;\n type?: string;\n}\n\nexport interface LLMOptions {\n prompt?: string;\n model?: string;\n}\n\nexport class Command {\n id: string;\n name: string;\n description: string;\n icon?: string;\n keyBinding?: string;\n parameters?: Parameter[];\n output?: Variable[];\n llm?: LLMOptions;\n\n constructor(id: string, name: string, description: string, parameters?: Parameter[], output?: Variable[]) {\n this.id = id;\n this.name = name;\n this.description = description;\n this.parameters = parameters || [];\n this.output = output || [];\n }\n}\n\nexport interface ExecutionContext {\n [key: string]: any;\n\n params?: ExecuteParams;\n activePart?: any;\n activeEditor?: any;\n}\n\nexport interface ExecuteParams {\n [key: string]: any;\n}\n\nexport interface Handler {\n canExecute?: (context: ExecutionContext) => boolean;\n execute: (context: ExecutionContext) => any;\n ranking?: number; // Higher ranking = higher priority (default: 0)\n}\n\nexport interface Commands {\n [commandId: string]: Command\n}\n\nexport class CommandStack {\n //private stack: any[] = []\n\n public async execute(commandId: any, context: ExecutionContext) {\n return commandRegistry.execute(commandId, context);\n }\n\n public async undo() {\n // TODO undo last command on stack\n }\n\n public async redo() {\n // TODO redo last command on stack\n }\n}\n\nexport class CommandRegistry {\n private commands: Commands = {};\n private handlers: Map<string, Handler[]> = new Map();\n\n registerHandler(commandId: string, handler: Handler) {\n if (!this.handlers.has(commandId)) {\n this.handlers.set(commandId, []);\n }\n const handlerList = this.handlers.get(commandId) as Handler[];\n handlerList.push(handler);\n // Sort by ranking (higher ranking first), default ranking is 0\n handlerList.sort((a, b) => (b.ranking ?? 0) - (a.ranking ?? 0));\n }\n\n getHandler(commandId: string): Handler[] | undefined {\n return this.handlers.get(commandId)\n }\n\n /**\n * Creates an ExecutionContext with the current application state\n * \n * @param params Optional command parameters\n * @returns ExecutionContext with captured application state\n */\n createExecutionContext(params?: ExecuteParams): ExecutionContext {\n const context: ExecutionContext = {\n params: params || {},\n activePart: activePartSignal.get(),\n activeEditor: activeEditorSignal.get()\n };\n\n return context;\n }\n\n execute(commandId: string, context: ExecutionContext = {}) {\n const handlers = this.getHandler(commandId);\n\n if (!handlers) {\n logger.debug(`[CommandRegistry] No handlers registered for command: ${commandId}`);\n throw new Error(`No handlers registered for command: ${commandId}`);\n }\n\n const command = this.getCommand(commandId);\n const paramsStr = context.params ? ` params: ${JSON.stringify(context.params)}` : '';\n logger.debug(`[CommandRegistry] Executing command: ${commandId}${command ? ` (${command.name})` : ''}${paramsStr}`);\n\n // Handlers are already sorted by ranking, so iterate in order\n for (const handler of handlers) {\n if (handler.canExecute === undefined || handler.canExecute(context)) {\n try {\n const result: any | Promise<any> = handler.execute(context);\n logger.debug(`[CommandRegistry] Command executed successfully: ${commandId} (result: ${result})`);\n return result;\n } catch (error) {\n const errorMsg = error instanceof Error ? error.message : String(error);\n logger.error(`[CommandRegistry] Command execution failed: ${commandId} - ${errorMsg}`);\n throw error;\n }\n }\n }\n logger.error(`[CommandRegistry] No handler found to execute command: ${commandId}`);\n }\n\n createAndRegisterCommand(id: string, name: string, description: string, parameters: Parameter[], handler?: Handler) {\n const command = new Command(id, name, description, parameters);\n this.registerCommand(command)\n if (handler) {\n this.registerHandler(id, handler)\n }\n }\n\n registerCommand(command: Command): void {\n this.commands[command.id] = command;\n logger.debug(`Command registered: ${command.id}`);\n publish(TOPIC_COMMAND_REGISTERED, command);\n }\n\n hasCommand(commandId: string): boolean {\n return commandId in this.commands\n }\n\n listCommands(context?: ExecutionContext): Commands {\n if (context) {\n // filter by commands which have at least one executable handler\n return Object.values(this.commands).filter(command => {\n const handlers = commandRegistry.getHandler(command.id) || []\n return handlers.some(handler => handler.canExecute === undefined || handler.canExecute(context))\n }).reduce((acc: any, command) => {\n acc[command.id] = command\n return acc\n }, {})\n }\n return this.commands\n }\n\n getCommand(commandId: string): Command {\n return <Command>this.commands[commandId]\n }\n\n registerAll(options: RegisterOptions) {\n const commandId = options.command.id\n this.registerCommand(options.command)\n if (options.handler) {\n this.registerHandler(commandId, options.handler)\n }\n if (options.contribution && options.contribution.target) {\n contributionRegistry.registerContribution(options.contribution.target, {\n command: commandId,\n ...options.contribution\n } as CommandContribution)\n }\n }\n}\n\nexport const commandRegistry = new CommandRegistry();\nrootContext.put(\"commandRegistry\", commandRegistry);\n\nexport interface RegisterOptions {\n command: Command,\n handler?: Handler,\n contribution?: Contribution & Partial<Pick<CommandContribution, 'disabled'>>\n}\n\nexport const registerAll = (options: RegisterOptions) => {\n commandRegistry.registerAll(options);\n}","import {Signal} from \"@lit-labs/signals\";\n\nexport const watchSignal = (signal: Signal.State<any> | Signal.Computed<any>, callback: (value: any) => void): (() => void) => {\n const watcher = new Signal.subtle.Watcher(async () => {\n try {\n await 0;\n callback(signal.get());\n } finally {\n watcher.watch(signal);\n }\n });\n watcher.watch(signal);\n signal.get();\n \n return () => {\n watcher.unwatch(signal);\n };\n}\n","import {LitElement, PropertyValues} from \"lit\";\nimport {subscribe as event_subscribe, unsubscribe as event_unsubscribe, type SubscriptionToken} from \"../core/events\";\nimport {toastError, toastInfo} from \"../core/toast\";\nimport {commandRegistry, ExecuteParams} from \"../core/commandregistry\";\nimport {Signal, SignalWatcher} from \"@lit-labs/signals\";\nimport {watchSignal} from \"../core/signals\";\n\nObject.defineProperty(LitElement.prototype, \"model\", {\n enumerable: true,\n configurable: true,\n writable: true\n});\n\nconst LyraWidgetBase = SignalWatcher(LitElement) as unknown as typeof LitElement;\n\nexport abstract class LyraWidget extends LyraWidgetBase {\n private signalCleanups = new Set<() => void>();\n private eventSubscriptions = new Set<SubscriptionToken>();\n\n connectedCallback() {\n super.connectedCallback();\n this.doBeforeUI()\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.eventSubscriptions.forEach(token => event_unsubscribe(token));\n this.eventSubscriptions.clear();\n this.signalCleanups.forEach(cleanup => cleanup());\n this.signalCleanups.clear();\n }\n\n protected subscribe(topic: string, callback: Function): void {\n const token = event_subscribe(topic, callback.bind(this));\n this.eventSubscriptions.add(token);\n }\n\n protected showInfo(msg: string) {\n toastInfo(msg)\n }\n\n protected showError(msg: string) {\n toastError(msg)\n }\n\n protected nobubble(wrap: (event: Event) => void) {\n return (event: Event) => {\n event.stopPropagation();\n wrap.bind(this)(event);\n };\n }\n\n protected command(command: string, state: {} = {}) {\n return () => {\n this.executeCommand(command, state)\n };\n }\n\n protected executeCommand(command: string, params: ExecuteParams) {\n const execContext = commandRegistry.createExecutionContext(params);\n commandRegistry.execute(command, execContext);\n }\n\n protected watch(signal: Signal.State<any> | Signal.Computed<any>, callback: (value: any) => void): void {\n const cleanup = watchSignal(signal as Signal.State<any>, callback.bind(this));\n this.signalCleanups.add(cleanup);\n }\n\n protected firstUpdated(_changedProperties: PropertyValues) {\n super.firstUpdated(_changedProperties);\n this.doInitUI()\n }\n\n protected updateIdle() {\n requestIdleCallback(() => this.requestUpdate())\n }\n\n public updateLater() {\n requestAnimationFrame(() => this.requestUpdate())\n }\n\n protected doBeforeUI() {\n }\n\n protected doInitUI() {\n }\n\n withRefresh(callback: () => void) {\n callback()\n this.updateLater()\n }\n}\n","import {customElement, property} from 'lit/decorators.js'\nimport {html, nothing, css} from 'lit';\n\nimport {LyraWidget} from \"./widget\";\n\n@customElement('lyra-icon')\nexport class LyraIcon extends LyraWidget {\n\n @property()\n name?: string;\n\n @property()\n family?: string = \"regular\";\n\n @property()\n variant?: string;\n\n @property()\n label?: string;\n\n render() {\n if (!this.name) {\n return \"\"\n }\n const parts = this.name.trim().split(/ +/)\n const iconName = parts.pop()\n const library = parts.pop()\n return html`\n <wa-icon library=\"${library || nothing}\" variant=\"${this.variant || nothing}\"\n family=\"${this.family || nothing}\" name=${iconName} label=\"${this.label || this.name || nothing}\"></wa-icon>`\n }\n\n static styles = css`\n :host {\n display: contents;\n }\n `\n}\n"],"names":["logger","signal","event_unsubscribe","event_subscribe"],"mappings":";;;;;;AAAO,MAAM,kBAAkB;AAAA,EAM3B,YAAY,WAAgB;AAH5B,SAAQ,WAAgC,CAAA;AAIpC,SAAK,YAAY;AAEjB,SAAK,QAAQ,IAAI,MAAM,WAAW,IAAI;AAAA,EAC1C;AAAA,EAEA,IAAI,QAAa,MAAmB;AAChC,WAAO,OAAO,IAAI,KAAK,KAAK,QAAQ,SAAA,EAAW,IAAI;AAAA,EACvD;AAAA,EAEA,IAAI,QAAa,MAAc,OAAY;AACvC,WAAO,IAAI,IAAI;AAAA,EACnB;AAAA,EAEA,IAAI,MAAc,OAAY;AAC1B,SAAK,UAAU,IAAI,IAAI;AAAA,EAC3B;AAAA,EAEO,WAAW;AACd,WAAO,KAAK;AAAA,EAChB;AAAA,EAEO,YAAY,YAAiB,IAAuB;AACvD,UAAM,QAAQ,IAAI,kBAAkB,SAAS;AAC7C,UAAM,SAAS;AACf,SAAK,SAAS,KAAK,KAAK;AACxB,WAAO;AAAA,EACX;AAAA,EAEA,cAAc;AACV,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,YAAY;AACR,WAAO,KAA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GACb,QAAA;"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C, D, F, a, b, L, S, c, T, d, W, e, f, g, i, h, t, w } from "./config-
|
|
2
|
-
import { C as C2, E, H, L as L2, a as a2, b as b2, c as c2, M, P, S as S2, d as d2, e as e2, f as f2, g as g2, T as T2, h as h2, i as i2, j, k, l, m, n, o, p, q, r, s, t as t2, u, v, w as w2 } from "./resizable-grid-
|
|
3
|
-
import { C as C3, a as a3, E as E2, L as L3, T as T3, b as b3, c as c3, d as d3, e as e3, f as f3, g as g3, h as h3, i as i3, j as j2, p as p2,
|
|
1
|
+
import { C, D, F, a, b, L, S, c, T, d, W, e, f, g, i, h, t, w } from "./config-CTHJsmbF.js";
|
|
2
|
+
import { C as C2, E, H, L as L2, a as a2, b as b2, c as c2, M, P, S as S2, d as d2, e as e2, f as f2, g as g2, T as T2, h as h2, i as i2, j, k, l, m, n, o, p, q, r, s, t as t2, u, v, w as w2 } from "./resizable-grid-B6j8J49V.js";
|
|
3
|
+
import { C as C3, a as a3, E as E2, L as L3, T as T3, b as b3, c as c3, d as d3, e as e3, f as f3, g as g3, h as h3, i as i3, j as j2, k as k2, l as l2, m as m2, o as o2, p as p2, n as n2, r as r2, q as q2, s as s2, t as t3, u as u2, v as v2, w as w3, x } from "./icon-C3H7IMWU.js";
|
|
4
4
|
import { publish, subscribe, unsubscribe } from "./core/events.js";
|
|
5
5
|
export {
|
|
6
6
|
C2 as COMMAND_SAVE,
|
|
@@ -47,11 +47,13 @@ export {
|
|
|
47
47
|
f3 as activeTasksSignal,
|
|
48
48
|
n as appLoaderService,
|
|
49
49
|
o as appSettings,
|
|
50
|
-
g3 as
|
|
50
|
+
g3 as applyConfigNameRemaps,
|
|
51
|
+
h3 as commandRegistry,
|
|
51
52
|
e as configureFramework,
|
|
52
53
|
p as confirmDialog,
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
i3 as contributionRegistry,
|
|
55
|
+
j2 as contributionTargetMappingRegistry,
|
|
56
|
+
k2 as createLogger,
|
|
55
57
|
f as editorRegistry,
|
|
56
58
|
q as esmShService,
|
|
57
59
|
r as extensionRegistry,
|
|
@@ -59,25 +61,27 @@ export {
|
|
|
59
61
|
i as i18n,
|
|
60
62
|
h as i18nLazy,
|
|
61
63
|
s as infoDialog,
|
|
62
|
-
|
|
64
|
+
l2 as listContributionNameRemaps,
|
|
65
|
+
m2 as logger,
|
|
63
66
|
t2 as navigableInfoDialog,
|
|
67
|
+
o2 as overrideContributionTargets,
|
|
64
68
|
p2 as partDirtySignal,
|
|
65
69
|
u as persistenceService,
|
|
66
|
-
|
|
70
|
+
n2 as perspectiveSwitchedSignal,
|
|
67
71
|
v as promptDialog,
|
|
68
72
|
publish,
|
|
69
73
|
r2 as registerAll,
|
|
70
|
-
|
|
74
|
+
q2 as rootContext,
|
|
71
75
|
s2 as setLogLevel,
|
|
72
76
|
subscribe,
|
|
73
77
|
w2 as taskService,
|
|
74
78
|
t3 as toastError,
|
|
75
|
-
|
|
76
|
-
|
|
79
|
+
u2 as toastInfo,
|
|
80
|
+
v2 as toastWarning,
|
|
77
81
|
t as treeNodeComparator,
|
|
78
|
-
|
|
82
|
+
w3 as uiContext,
|
|
79
83
|
unsubscribe,
|
|
80
|
-
|
|
84
|
+
x as watchSignal,
|
|
81
85
|
w as workspaceService
|
|
82
86
|
};
|
|
83
87
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css, html } from "lit";
|
|
2
2
|
import { property, customElement } from "lit/decorators.js";
|
|
3
|
-
import { L as LyraWidget } from "./icon-
|
|
3
|
+
import { L as LyraWidget } from "./icon-C3H7IMWU.js";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -45,4 +45,4 @@ __decorateClass([
|
|
|
45
45
|
LyraNoContent = __decorateClass([
|
|
46
46
|
customElement("lyra-no-content")
|
|
47
47
|
], LyraNoContent);
|
|
48
|
-
//# sourceMappingURL=nocontent-
|
|
48
|
+
//# sourceMappingURL=nocontent-TgnGDnXO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nocontent-
|
|
1
|
+
{"version":3,"file":"nocontent-TgnGDnXO.js","sources":["../src/widgets/nocontent.ts"],"sourcesContent":["import {css, html} from 'lit'\nimport {customElement, property} from 'lit/decorators.js'\n\nimport {LyraWidget} from \"./widget\";\n\n@customElement('lyra-no-content')\nexport class LyraNoContent extends LyraWidget {\n\n @property()\n private message: string = \"No content.\";\n\n @property()\n private icon: string = \"info-circle\";\n\n render() {\n return html`\n <h3>\n <wa-icon name=${this.icon} label=\"${this.message}\"></wa-icon>\n ${this.message}\n </h3>\n `\n }\n\n static styles = css`\n :host {\n display: flex;\n margin: 10px;\n }\n\n * {\n flex: 1;\n }\n `\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lyra-no-content': LyraNoContent\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAMO,IAAM,gBAAN,cAA4B,WAAW;AAAA,EAAvC,cAAA;AAAA,UAAA,GAAA,SAAA;AAGH,SAAQ,UAAkB;AAG1B,SAAQ,OAAe;AAAA,EAAA;AAAA,EAEvB,SAAS;AACL,WAAO;AAAA;AAAA,gCAEiB,KAAK,IAAI,WAAW,KAAK,OAAO;AAAA,kBAC9C,KAAK,OAAO;AAAA;AAAA;AAAA,EAG1B;AAYJ;AA3Ba,cAiBF,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAdR,gBAAA;AAAA,EADP,SAAA;AAAS,GAFD,cAGD,WAAA,WAAA,CAAA;AAGA,gBAAA;AAAA,EADP,SAAA;AAAS,GALD,cAMD,WAAA,QAAA,CAAA;AANC,gBAAN,gBAAA;AAAA,EADN,cAAc,iBAAiB;AAAA,GACnB,aAAA;"}
|
package/dist/parts/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css, html, render, nothing } from "lit";
|
|
2
2
|
import { property, state, customElement } from "lit/decorators.js";
|
|
3
3
|
import { styleMap } from "lit/directives/style-map.js";
|
|
4
|
-
import {
|
|
4
|
+
import { q as rootContext, f as activeTasksSignal, k as createLogger, m as defaultLogger, t as toastError, w as uiContext, u as toastInfo, T as TOPIC_COMMAND_REGISTERED, h as commandRegistry, L as LyraWidget, b as TOPIC_CONTRIBUTEIONS_CHANGED, i as contributionRegistry, p as partDirtySignal, d as activePartSignal, j as contributionTargetMappingRegistry } from "./icon-C3H7IMWU.js";
|
|
5
5
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
6
6
|
import { publish, subscribe } from "./core/events.js";
|
|
7
7
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
@@ -1881,6 +1881,17 @@ const _AppLoaderService = class _AppLoaderService {
|
|
|
1881
1881
|
});
|
|
1882
1882
|
}
|
|
1883
1883
|
}
|
|
1884
|
+
contributionTargetMappingRegistry.applyAppNameRemaps(app.remaps);
|
|
1885
|
+
if (app.remaps?.length) {
|
|
1886
|
+
const remappedTargets = /* @__PURE__ */ new Set();
|
|
1887
|
+
for (const r of app.remaps) {
|
|
1888
|
+
for (const t of r.targets) remappedTargets.add(t);
|
|
1889
|
+
}
|
|
1890
|
+
for (const target of remappedTargets) {
|
|
1891
|
+
const contributions = contributionRegistry.getContributions(target);
|
|
1892
|
+
publish(TOPIC_CONTRIBUTEIONS_CHANGED, { target, contributions });
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1884
1895
|
if (app.contributions) {
|
|
1885
1896
|
logger.info("Registering app contributions...");
|
|
1886
1897
|
if (app.contributions.ui) {
|
|
@@ -4055,4 +4066,4 @@ export {
|
|
|
4055
4066
|
TOPIC_EXTENSIONS_CHANGED as x,
|
|
4056
4067
|
constants as y
|
|
4057
4068
|
};
|
|
4058
|
-
//# sourceMappingURL=resizable-grid-
|
|
4069
|
+
//# sourceMappingURL=resizable-grid-B6j8J49V.js.map
|