@eclipse-lyra/core 0.7.6 → 0.7.7

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.
Files changed (60) hide show
  1. package/dist/api/index.js +28 -29
  2. package/dist/api/services.d.ts +0 -4
  3. package/dist/api/services.d.ts.map +1 -1
  4. package/dist/api/types.d.ts +1 -1
  5. package/dist/api/types.d.ts.map +1 -1
  6. package/dist/components/fastviews.d.ts +1 -1
  7. package/dist/components/index.d.ts.map +1 -1
  8. package/dist/components/{app-switcher.d.ts → layout-switcher.d.ts} +5 -4
  9. package/dist/components/layout-switcher.d.ts.map +1 -0
  10. package/dist/{standard-layout-Efok-voU.js → config-BiRvaEoO.js} +243 -454
  11. package/dist/config-BiRvaEoO.js.map +1 -0
  12. package/dist/contributions/default-layout-contributions.d.ts +1 -0
  13. package/dist/contributions/default-layout-contributions.d.ts.map +1 -0
  14. package/dist/contributions/index.d.ts.map +1 -1
  15. package/dist/core/apploader.d.ts +40 -30
  16. package/dist/core/apploader.d.ts.map +1 -1
  17. package/dist/core/constants.d.ts +1 -0
  18. package/dist/core/constants.d.ts.map +1 -1
  19. package/dist/core/contributionregistry.d.ts +9 -0
  20. package/dist/core/contributionregistry.d.ts.map +1 -1
  21. package/dist/core/index.d.ts.map +1 -1
  22. package/dist/icon-DN6fp0dg.js.map +1 -1
  23. package/dist/index.js +28 -29
  24. package/dist/parts/contextmenu.d.ts +1 -1
  25. package/dist/parts/index.js +1 -1
  26. package/dist/parts/resizable-grid.d.ts +1 -1
  27. package/dist/{resizable-grid-BP9wOk_x.js → resizable-grid-oWYRVx30.js} +315 -94
  28. package/dist/resizable-grid-oWYRVx30.js.map +1 -0
  29. package/dist/vite-plugin-resolve-deps.d.ts +18 -0
  30. package/dist/vite-plugin-resolve-deps.d.ts.map +1 -0
  31. package/dist/widgets/icon.d.ts +1 -1
  32. package/package.json +8 -1
  33. package/src/api/services.ts +0 -4
  34. package/src/api/types.ts +1 -0
  35. package/src/commands/version-info.ts +24 -10
  36. package/src/components/index.ts +1 -1
  37. package/src/components/layout-switcher.ts +83 -0
  38. package/src/contributions/default-layout-contributions.ts +10 -0
  39. package/src/contributions/default-ui-contributions.ts +1 -1
  40. package/src/contributions/index.ts +1 -0
  41. package/src/contributions/marketplace-catalog-contributions.ts +1 -1
  42. package/src/core/apploader.ts +182 -99
  43. package/src/core/constants.ts +1 -0
  44. package/src/core/contributionregistry.ts +7 -0
  45. package/src/core/index.ts +0 -1
  46. package/src/vite-env.d.ts +9 -0
  47. package/src/vite-plugin-resolve-deps.ts +112 -0
  48. package/dist/components/app-selector.d.ts +0 -17
  49. package/dist/components/app-selector.d.ts.map +0 -1
  50. package/dist/components/app-switcher.d.ts.map +0 -1
  51. package/dist/core/app-host-config.d.ts +0 -7
  52. package/dist/core/app-host-config.d.ts.map +0 -1
  53. package/dist/core/packageinfoservice.d.ts +0 -16
  54. package/dist/core/packageinfoservice.d.ts.map +0 -1
  55. package/dist/resizable-grid-BP9wOk_x.js.map +0 -1
  56. package/dist/standard-layout-Efok-voU.js.map +0 -1
  57. package/src/components/app-selector.ts +0 -233
  58. package/src/components/app-switcher.ts +0 -126
  59. package/src/core/app-host-config.ts +0 -23
  60. package/src/core/packageinfoservice.ts +0 -56
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=default-layout-contributions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-layout-contributions.d.ts","sourceRoot":"","sources":["../../src/contributions/default-layout-contributions.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contributions/index.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAC;AACpC,OAAO,qCAAqC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contributions/index.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAC;AACpC,OAAO,gCAAgC,CAAC;AACxC,OAAO,qCAAqC,CAAC"}
@@ -1,6 +1,5 @@
1
- import { TemplateResult } from 'lit';
2
1
  import { Extension } from './extensionregistry';
3
- import { Contribution } from './contributionregistry';
2
+ import { Contribution, LayoutContribution } from './contributionregistry';
4
3
  /**
5
4
  * Application contributions interface.
6
5
  * Declaratively defines all contributions for an application.
@@ -48,14 +47,14 @@ export interface RenderDescriptor {
48
47
  * Applications implement this interface to integrate with the framework.
49
48
  */
50
49
  export interface AppDefinition {
51
- /** Unique application identifier */
52
- id: string;
53
- /** Human-readable application name */
54
- name: string;
55
- /** Application version */
56
- version: string;
57
- /** Optional application description */
50
+ /** Application name (from package.json). Unique key; set by hostConfig resolution when omitted. */
51
+ name?: string;
52
+ /** Application version. Set by hostConfig resolution from package.json when omitted. */
53
+ version?: string;
54
+ /** Application description. Set by hostConfig resolution from package.json when omitted. */
58
55
  description?: string;
56
+ /** Optional URL path segment for routing (e.g. "geospace"). When absent, name is used for lookup. */
57
+ path?: string;
59
58
  /**
60
59
  * Custom application metadata (optional).
61
60
  * Apps can define any custom metadata here for their own use.
@@ -87,28 +86,26 @@ export interface AppDefinition {
87
86
  */
88
87
  releaseHistory?: ReleaseHistory | (() => ReleaseHistory | Promise<ReleaseHistory>);
89
88
  /**
90
- * Root component to render. Can be:
91
- * - A tag name string (e.g. "lyra-standard-layout") for a single custom element with no attributes.
92
- * - A descriptor { tag, attributes? } for a single custom element with optional attributes.
93
- * - A function returning a Lit TemplateResult for custom templates (requires lit in the app).
94
- * If not provided, defaults to lyra-standard-layout.
89
+ * Id of a layout registered to the system.layouts contribution slot.
90
+ * The app root is always the chosen layout's component. Defaults to 'standard' when omitted.
95
91
  */
96
- component?: string | RenderDescriptor | (() => TemplateResult);
92
+ layoutId?: string;
97
93
  /**
98
94
  * Optional cleanup function.
99
95
  * Called when the app is being unloaded, before extensions are disabled.
100
96
  */
101
97
  dispose?: () => void | Promise<void>;
98
+ /** Resolved dependency versions (e.g. from build plugin). Shown in About / version info. */
99
+ dependencies?: Record<string, string>;
100
+ /** Marketplace catalog URLs for this app. Registered when the app is registered. */
101
+ marketplaceCatalogUrls?: string[];
102
102
  }
103
103
  /**
104
104
  * Options for registering an application with the apploader.
105
105
  */
106
106
  export interface RegisterAppOptions {
107
- /**
108
- * Default app ID to load if no app URL parameter is provided.
109
- * If not specified, the first registered app will be loaded.
110
- */
111
- defaultAppId?: string;
107
+ /** Default app name to load if no app URL parameter is provided. If not specified, the first registered app is loaded. */
108
+ defaultAppName?: string;
112
109
  /**
113
110
  * Whether to automatically start the apploader after registration.
114
111
  * If true, the apploader will start immediately after the app is registered.
@@ -120,6 +117,10 @@ export interface RegisterAppOptions {
120
117
  * Defaults to document.body.
121
118
  */
122
119
  container?: HTMLElement;
120
+ /**
121
+ * When true, fill name, version, description, dependencies, marketplaceCatalogUrls from __RESOLVED_PACKAGE_INFO__ only when not already set on the app.
122
+ */
123
+ hostConfig?: boolean;
123
124
  }
124
125
  /**
125
126
  * App Loader Service
@@ -134,10 +135,12 @@ declare class AppLoaderService {
134
135
  private apps;
135
136
  private currentApp?;
136
137
  private started;
137
- private defaultAppId?;
138
+ private defaultAppName?;
138
139
  private container;
139
140
  private systemRequiredExtensions;
140
141
  private static readonly PREFERRED_APP_KEY;
142
+ private static readonly PREFERRED_LAYOUT_KEY;
143
+ private preferredLayoutId?;
141
144
  /**
142
145
  * Register an application with the framework.
143
146
  * Optionally starts the apploader automatically after registration.
@@ -158,25 +161,28 @@ declare class AppLoaderService {
158
161
  /**
159
162
  * Start the application loader.
160
163
  * Checks URL parameters for app=URL, loads that extension or app if found.
161
- * URL parameter has higher precedence than defaultAppId.
164
+ * URL parameter has higher precedence than defaultAppName.
162
165
  * Then loads the default app or first registered app.
163
166
  * This method is idempotent - calling it multiple times only starts once.
164
167
  */
165
168
  start(): Promise<void>;
169
+ /**
170
+ * Resolve a path/URL segment to an app name (map key). Matches app.path, app.name, or name ending with /segment.
171
+ */
172
+ private findAppNameBySegment;
166
173
  /**
167
174
  * Load and initialize an application.
168
- *
169
- * @param appId - Application identifier (must be already registered)
175
+ * @param appName - Application name (must be already registered)
170
176
  * @param container - Optional DOM element to render into (if provided, auto-renders after loading)
171
- * @returns Promise that resolves when app is initialized and rendered
172
177
  */
173
- loadApp(appId: string, container?: HTMLElement): Promise<void>;
178
+ loadApp(appName: string, container?: HTMLElement): Promise<void>;
174
179
  /**
175
180
  * Updates document title and favicon from app metadata
176
181
  */
177
182
  private updateDocumentMetadata;
178
183
  /**
179
184
  * Render the current application to the DOM.
185
+ * Resolves the layout by layoutId (default 'standard'), renders its component, then calls layout.onShow if defined.
180
186
  *
181
187
  * @param container - DOM element to render into
182
188
  */
@@ -197,14 +203,18 @@ declare class AppLoaderService {
197
203
  * Set the preferred app ID and persist it to settings.
198
204
  */
199
205
  setPreferredAppId(appId: string): Promise<void>;
206
+ getRegisteredLayouts(): LayoutContribution[];
207
+ getCurrentLayoutId(): string;
208
+ getPreferredLayoutId(): Promise<string | undefined>;
209
+ setPreferredLayoutId(layoutId: string): Promise<void>;
200
210
  /**
201
211
  * Select which app to load based on priority:
202
212
  * 1. appId URL parameter (?appId=...)
203
- * 2. App ID from current page URL path (/geospace)
204
- * 3. App ID extracted from app URL parameter (?app=...)
213
+ * 2. App from current page URL path (/geospace)
214
+ * 3. App from app URL parameter (?app=...)
205
215
  * 4. App registered by extension
206
- * 5. Preferred app ID from settings
207
- * 6. Default app ID
216
+ * 5. Preferred app from settings
217
+ * 6. Default app
208
218
  * 7. First registered app
209
219
  */
210
220
  private selectAppToLoad;
@@ -1 +1 @@
1
- {"version":3,"file":"apploader.d.ts","sourceRoot":"","sources":["../../src/core/apploader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAS,cAAc,EAAO,MAAM,KAAK,CAAC;AAGjD,OAAO,EAAoB,SAAS,EAAC,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAuB,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAgD1E;;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AAK,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"}
@@ -5,6 +5,7 @@ export declare const TOOLBAR_BOTTOM = "app-toolbars-bottom";
5
5
  export declare const TOOLBAR_BOTTOM_CENTER = "app-toolbars-bottom-center";
6
6
  export declare const TOOLBAR_BOTTOM_END = "app-toolbars-bottom-end";
7
7
  export declare const SYSTEM_VIEWS = "system-views";
8
+ export declare const SYSTEM_LAYOUTS = "system.layouts";
8
9
  export declare const EDITOR_AREA_MAIN = "editor-area-main";
9
10
  export declare const SIDEBAR_MAIN = "sidebar-main";
10
11
  export declare const SIDEBAR_MAIN_BOTTOM = "sidebar-main-bottom";
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY,sBAAsB,CAAA;AAC/C,eAAO,MAAM,kBAAkB,4BAA4B,CAAA;AAC3D,eAAO,MAAM,mBAAmB,6BAA6B,CAAA;AAC7D,eAAO,MAAM,cAAc,wBAAwB,CAAA;AACnD,eAAO,MAAM,qBAAqB,+BAA+B,CAAA;AACjE,eAAO,MAAM,kBAAkB,4BAA4B,CAAA;AAE3D,eAAO,MAAM,YAAY,iBAAiB,CAAA;AAG1C,eAAO,MAAM,gBAAgB,qBAAqB,CAAA;AAClD,eAAO,MAAM,YAAY,iBAAiB,CAAA;AAC1C,eAAO,MAAM,mBAAmB,wBAAwB,CAAA;AACxD,eAAO,MAAM,iBAAiB,sBAAsB,CAAA;AACpD,eAAO,MAAM,YAAY,iBAAiB,CAAA;AAE1C,eAAO,MAAM,YAAY,iBAAiB,CAAA;AAE1C,eAAO,MAAM,iBAAiB,QAAQ,CAAA;AAGtC,oBAAY,WAAW;IACnB,IAAI,IAAI;IACR,MAAM,IAAI;IACV,KAAK,IAAI;IACT,IAAI,IAAI;IACR,OAAO,IAAI;CACd"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY,sBAAsB,CAAA;AAC/C,eAAO,MAAM,kBAAkB,4BAA4B,CAAA;AAC3D,eAAO,MAAM,mBAAmB,6BAA6B,CAAA;AAC7D,eAAO,MAAM,cAAc,wBAAwB,CAAA;AACnD,eAAO,MAAM,qBAAqB,+BAA+B,CAAA;AACjE,eAAO,MAAM,kBAAkB,4BAA4B,CAAA;AAE3D,eAAO,MAAM,YAAY,iBAAiB,CAAA;AAC1C,eAAO,MAAM,cAAc,mBAAmB,CAAA;AAG9C,eAAO,MAAM,gBAAgB,qBAAqB,CAAA;AAClD,eAAO,MAAM,YAAY,iBAAiB,CAAA;AAC1C,eAAO,MAAM,mBAAmB,wBAAwB,CAAA;AACxD,eAAO,MAAM,iBAAiB,sBAAsB,CAAA;AACpD,eAAO,MAAM,YAAY,iBAAiB,CAAA;AAE1C,eAAO,MAAM,YAAY,iBAAiB,CAAA;AAE1C,eAAO,MAAM,iBAAiB,QAAQ,CAAA;AAGtC,oBAAY,WAAW;IACnB,IAAI,IAAI;IACR,MAAM,IAAI;IACV,KAAK,IAAI;IACT,IAAI,IAAI;IACR,OAAO,IAAI;CACd"}
@@ -35,6 +35,15 @@ export interface IconContribution extends Contribution {
35
35
  mappings: Record<string, string>;
36
36
  priority?: number;
37
37
  }
38
+ export interface LayoutContribution extends Contribution {
39
+ id: string;
40
+ name: string;
41
+ component: string | {
42
+ tag: string;
43
+ attributes?: Record<string, string>;
44
+ } | (() => TemplateResult);
45
+ onShow?: () => void | Promise<void>;
46
+ }
38
47
  declare class ContributionRegistry {
39
48
  private contributions;
40
49
  registerContribution<T extends Contribution>(target: string, contribution: T): void;
@@ -1 +1 @@
1
- {"version":3,"file":"contributionregistry.d.ts","sourceRoot":"","sources":["../../src/core/contributionregistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAC,cAAc,EAAC,MAAM,KAAK,CAAC;AAInC,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,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;I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1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAcA,OAAO,UAAU,CAAC;AAClB,OAAO,sBAAsB,CAAC;AAC9B,OAAO,mBAAmB,CAAC;AAG3B,OAAO,wBAAwB,CAAC;AAChC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,eAAe,CAAC;AAGvB,OAAO,QAAQ,CAAC;AAChB,OAAO,iBAAiB,CAAC;AAGzB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,qBAAqB,CAAC;AAG7B,OAAO,eAAe,CAAC;AACvB,OAAO,iBAAiB,CAAC;AACzB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,WAAW,CAAC;AAGnB,OAAO,aAAa,CAAC;AACrB,OAAO,uBAAuB,CAAC;AAG/B,OAAO,SAAS,CAAC;AACjB,OAAO,YAAY,CAAC;AAGpB,OAAO,UAAU,CAAC;AAClB,OAAO,eAAe,CAAC;AACvB,OAAO,YAAY,CAAC;AACpB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAcA,OAAO,UAAU,CAAC;AAClB,OAAO,sBAAsB,CAAC;AAC9B,OAAO,mBAAmB,CAAC;AAG3B,OAAO,wBAAwB,CAAC;AAChC,OAAO,eAAe,CAAC;AAGvB,OAAO,QAAQ,CAAC;AAChB,OAAO,iBAAiB,CAAC;AAGzB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,qBAAqB,CAAC;AAG7B,OAAO,eAAe,CAAC;AACvB,OAAO,iBAAiB,CAAC;AACzB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,WAAW,CAAC;AAGnB,OAAO,aAAa,CAAC;AACrB,OAAO,uBAAuB,CAAC;AAG/B,OAAO,SAAS,CAAC;AACjB,OAAO,YAAY,CAAC;AAGpB,OAAO,UAAU,CAAC;AAClB,OAAO,eAAe,CAAC;AACvB,OAAO,YAAY,CAAC;AACpB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"icon-DN6fp0dg.js","sources":["../src/core/di.ts","../src/core/toast.ts","../src/core/logger.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 {Signal} from \"@lit-labs/signals\";\nimport {TemplateResult} from \"lit\";\nimport {publish} from \"./events\";\nimport {rootContext} from \"./di\";\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 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\nclass ContributionRegistry {\n private contributions: Map<string, Contribution[]> = new Map();\n\n registerContribution<T extends Contribution>(target: string, contribution: T) {\n const targetSlot = this.getContributions(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\n getContributions<T extends Contribution>(target: string): T[] {\n if (!this.contributions.has(target)) {\n this.contributions.set(target, [])\n }\n return this.contributions.get(target)! as T[]\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,KAAK;AAAA,EAChB;AAAA,EAEA,UAAU;AACN,UAAM,QAAQ,KAAK,QAAQ,SAAS,QAAQ,IAAI;AAChD,QAAI,UAAU,UAAa,SAAS,GAAG;AACnC,WAAK,QAAQ,SAAS,OAAO,OAAO,CAAC;AAAA,IACzC;AACA,SAAK,SAAS;AAAA,EA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IAAM,WAAN,cAAuB,WAAW;AAAA,EAAlC,cAAA;AAAA,UAAA,GAAA,SAAA;AAMH,SAAA,SAAkB;AAAA,EAAA;AAAA,EAQlB,SAAS;AACL,QAAI,CAAC,KAAK,MAAM;AACZ,aAAO;AAAA,IACX;AACA,UAAM,QAAQ,KAAK,KAAK,KAAA,EAAO,MAAM,IAAI;AACzC,UAAM,WAAW,MAAM,IAAA;AACvB,UAAM,UAAU,MAAM,IAAA;AACtB,WAAO;AAAA,gCACiB,WAAW,OAAO,cAAc,KAAK,WAAW,OAAO;AAAA,mCACpD,KAAK,UAAU,OAAO,UAAU,QAAQ,WAAW,KAAK,SAAS,KAAK,QAAQ,OAAO;AAAA,EACpH;AAOJ;AA/Ba,SA0BF,SAAS;AAAA;AAAA;AAAA;AAAA;AAvBhB,gBAAA;AAAA,EADC,SAAA;AAAS,GAFD,SAGT,WAAA,QAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAA;AAAS,GALD,SAMT,WAAA,UAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAA;AAAS,GARD,SAST,WAAA,WAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAA;AAAS,GAXD,SAYT,WAAA,SAAA,CAAA;AAZS,WAAN,gBAAA;AAAA,EADN,cAAc,WAAW;AAAA,GACb,QAAA;"}
1
+ {"version":3,"file":"icon-DN6fp0dg.js","sources":["../src/core/di.ts","../src/core/toast.ts","../src/core/logger.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 {Signal} from \"@lit-labs/signals\";\nimport {TemplateResult} from \"lit\";\nimport {publish} from \"./events\";\nimport {rootContext} from \"./di\";\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 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 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.getContributions(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\n getContributions<T extends Contribution>(target: string): T[] {\n if (!this.contributions.has(target)) {\n this.contributions.set(target, [])\n }\n return this.contributions.get(target)! as T[]\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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KAAK,SAAS,KAAK,QAAQ,OAAO;AAAA,EACpH;AAOJ;AA/Ba,SA0BF,SAAS;AAAA;AAAA;AAAA;AAAA;AAvBhB,gBAAA;AAAA,EADC,SAAA;AAAS,GAFD,SAGT,WAAA,QAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAA;AAAS,GALD,SAMT,WAAA,UAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAA;AAAS,GARD,SAST,WAAA,WAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAA;AAAS,GAXD,SAYT,WAAA,SAAA,CAAA;AAZS,WAAN,gBAAA;AAAA,EADN,cAAc,WAAW;AAAA,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, h, i, j, p, t, w } from "./standard-layout-Efok-voU.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, T as T2, g as g2, h as h2, i as i2, j as j2, k, l, m, n, o, p as p2, q, r, s, t as t2, u, v } from "./resizable-grid-BP9wOk_x.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 j3, p as p3, k as k2, r as r2, l as l2, s as s2, t as t3, m as m2, n as n2, u as u2, w as w2 } from "./icon-DN6fp0dg.js";
1
+ import { C, D, F, a, b, L, S, c, T, d, W, e, f, g, i, h, t, w } from "./config-BiRvaEoO.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-oWYRVx30.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, p as p2, k as k2, r as r2, l as l2, s as s2, t as t3, m as m2, n as n2, u as u2, w as w3 } from "./icon-DN6fp0dg.js";
4
4
  import { publish, subscribe, unsubscribe } from "./core/events.js";
5
5
  export {
6
6
  C2 as COMMAND_SAVE,
@@ -26,17 +26,18 @@ export {
26
26
  d2 as SIDEBAR_MAIN,
27
27
  e2 as SIDEBAR_MAIN_BOTTOM,
28
28
  S as SYSTEM_LANGUAGE_BUNDLES,
29
- f2 as SYSTEM_VIEWS,
29
+ f2 as SYSTEM_LAYOUTS,
30
+ g2 as SYSTEM_VIEWS,
30
31
  c as StringFile,
31
32
  T2 as TOOLBAR_BOTTOM,
32
- g2 as TOOLBAR_BOTTOM_CENTER,
33
- h2 as TOOLBAR_BOTTOM_END,
34
- i2 as TOOLBAR_MAIN,
35
- j2 as TOOLBAR_MAIN_CENTER,
36
- k as TOOLBAR_MAIN_RIGHT,
33
+ h2 as TOOLBAR_BOTTOM_CENTER,
34
+ i2 as TOOLBAR_BOTTOM_END,
35
+ j as TOOLBAR_MAIN,
36
+ k as TOOLBAR_MAIN_CENTER,
37
+ l as TOOLBAR_MAIN_RIGHT,
37
38
  T3 as TOPIC_COMMAND_REGISTERED,
38
39
  b3 as TOPIC_CONTRIBUTEIONS_CHANGED,
39
- l as TOPIC_SETTINGS_CHANGED,
40
+ m as TOPIC_SETTINGS_CHANGED,
40
41
  T as TOPIC_WORKSPACE_CHANGED,
41
42
  d as TOPIC_WORKSPACE_CONNECTED,
42
43
  W as WorkspaceService,
@@ -44,41 +45,39 @@ export {
44
45
  d3 as activePartSignal,
45
46
  e3 as activeSelectionSignal,
46
47
  f3 as activeTasksSignal,
47
- m as appLoaderService,
48
- n as appSettings,
49
- e as applyAppHostConfig,
48
+ n as appLoaderService,
49
+ o as appSettings,
50
50
  g3 as commandRegistry,
51
- f as configureFramework,
52
- o as confirmDialog,
51
+ e as configureFramework,
52
+ p as confirmDialog,
53
53
  h3 as contributionRegistry,
54
54
  i3 as createLogger,
55
- g as editorRegistry,
56
- p2 as esmShService,
57
- q as extensionRegistry,
58
- h as getFrameworkConfig,
55
+ f as editorRegistry,
56
+ q as esmShService,
57
+ r as extensionRegistry,
58
+ g as getFrameworkConfig,
59
59
  i as i18n,
60
- j as i18nLazy,
61
- r as infoDialog,
62
- j3 as logger,
63
- s as navigableInfoDialog,
64
- p as packageInfoService,
65
- p3 as partDirtySignal,
66
- t2 as persistenceService,
60
+ h as i18nLazy,
61
+ s as infoDialog,
62
+ j2 as logger,
63
+ t2 as navigableInfoDialog,
64
+ p2 as partDirtySignal,
65
+ u as persistenceService,
67
66
  k2 as perspectiveSwitchedSignal,
68
- u as promptDialog,
67
+ v as promptDialog,
69
68
  publish,
70
69
  r2 as registerAll,
71
70
  l2 as rootContext,
72
71
  s2 as setLogLevel,
73
72
  subscribe,
74
- v as taskService,
73
+ w2 as taskService,
75
74
  t3 as toastError,
76
75
  m2 as toastInfo,
77
76
  n2 as toastWarning,
78
77
  t as treeNodeComparator,
79
78
  u2 as uiContext,
80
79
  unsubscribe,
81
- w2 as watchSignal,
80
+ w3 as watchSignal,
82
81
  w as workspaceService
83
82
  };
84
83
  //# sourceMappingURL=index.js.map
@@ -39,7 +39,7 @@ export declare class LyraContextMenu extends LyraElement {
39
39
  }, mouseEvent?: MouseEvent): void;
40
40
  private onClose;
41
41
  private renderContribution;
42
- render(): import('lit-html').TemplateResult<1> | typeof nothing;
42
+ render(): typeof nothing | import('lit-html').TemplateResult<1>;
43
43
  static styles: import('lit').CSSResult;
44
44
  }
45
45
  declare global {
@@ -1,3 +1,3 @@
1
1
  import "../externals/webawesome.js";
2
- import "../resizable-grid-BP9wOk_x.js";
2
+ import "../resizable-grid-oWYRVx30.js";
3
3
  //# sourceMappingURL=index.js.map
@@ -19,7 +19,7 @@ export declare class LyraResizableGrid extends LyraElement {
19
19
  private startResize;
20
20
  private handleResize;
21
21
  private stopResize;
22
- render(): import('lit-html').TemplateResult<1> | typeof nothing;
22
+ render(): typeof nothing | import('lit-html').TemplateResult<1>;
23
23
  disconnectedCallback(): void;
24
24
  connectedCallback(): void;
25
25
  }