@eclipse-lyra/core 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. package/dist/api/base-classes.d.ts +7 -0
  2. package/dist/api/base-classes.d.ts.map +1 -0
  3. package/dist/api/constants.d.ts +2 -0
  4. package/dist/api/constants.d.ts.map +1 -0
  5. package/dist/api/index.d.ts +6 -0
  6. package/dist/api/index.d.ts.map +1 -0
  7. package/dist/api/index.js +84 -0
  8. package/dist/api/index.js.map +1 -0
  9. package/dist/api/services.d.ts +28 -0
  10. package/dist/api/services.d.ts.map +1 -0
  11. package/dist/api/types.d.ts +11 -0
  12. package/dist/api/types.d.ts.map +1 -0
  13. package/dist/commands/editor.d.ts +1 -0
  14. package/dist/commands/editor.d.ts.map +1 -0
  15. package/dist/commands/files.d.ts +2 -0
  16. package/dist/commands/files.d.ts.map +1 -0
  17. package/dist/commands/global.d.ts +1 -0
  18. package/dist/commands/global.d.ts.map +1 -0
  19. package/dist/commands/index.d.ts +1 -0
  20. package/dist/commands/index.d.ts.map +1 -0
  21. package/dist/commands/open-view-as-editor.d.ts +2 -0
  22. package/dist/commands/open-view-as-editor.d.ts.map +1 -0
  23. package/dist/commands/version-info.d.ts +2 -0
  24. package/dist/commands/version-info.d.ts.map +1 -0
  25. package/dist/components/app-selector.d.ts +17 -0
  26. package/dist/components/app-selector.d.ts.map +1 -0
  27. package/dist/components/app-switcher.d.ts +13 -0
  28. package/dist/components/app-switcher.d.ts.map +1 -0
  29. package/dist/components/command.d.ts +31 -0
  30. package/dist/components/command.d.ts.map +1 -0
  31. package/dist/components/extensions.d.ts +32 -0
  32. package/dist/components/extensions.d.ts.map +1 -0
  33. package/dist/components/fastviews.d.ts +34 -0
  34. package/dist/components/fastviews.d.ts.map +1 -0
  35. package/dist/components/filebrowser.d.ts +45 -0
  36. package/dist/components/filebrowser.d.ts.map +1 -0
  37. package/dist/components/index.d.ts +1 -0
  38. package/dist/components/index.d.ts.map +1 -0
  39. package/dist/components/language-selector.d.ts +12 -0
  40. package/dist/components/language-selector.d.ts.map +1 -0
  41. package/dist/components/log-terminal.d.ts +36 -0
  42. package/dist/components/log-terminal.d.ts.map +1 -0
  43. package/dist/components/part-name.d.ts +12 -0
  44. package/dist/components/part-name.d.ts.map +1 -0
  45. package/dist/components/tasks.d.ts +13 -0
  46. package/dist/components/tasks.d.ts.map +1 -0
  47. package/dist/contributions/default-ui-contributions.d.ts +2 -0
  48. package/dist/contributions/default-ui-contributions.d.ts.map +1 -0
  49. package/dist/contributions/index.d.ts +1 -0
  50. package/dist/contributions/index.d.ts.map +1 -0
  51. package/dist/contributions/marketplace-catalog-contributions.d.ts +2 -0
  52. package/dist/contributions/marketplace-catalog-contributions.d.ts.map +1 -0
  53. package/dist/core/app-host-config.d.ts +7 -0
  54. package/dist/core/app-host-config.d.ts.map +1 -0
  55. package/dist/core/apploader.d.ts +214 -0
  56. package/dist/core/apploader.d.ts.map +1 -0
  57. package/dist/core/appstate.d.ts +12 -0
  58. package/dist/core/appstate.d.ts.map +1 -0
  59. package/dist/core/commandregistry.d.ts +79 -0
  60. package/dist/core/commandregistry.d.ts.map +1 -0
  61. package/dist/core/config.d.ts +15 -0
  62. package/dist/core/config.d.ts.map +1 -0
  63. package/dist/core/constants.d.ts +22 -0
  64. package/dist/core/constants.d.ts.map +1 -0
  65. package/dist/core/contributionregistry.d.ts +53 -0
  66. package/dist/core/contributionregistry.d.ts.map +1 -0
  67. package/dist/core/di.d.ts +18 -0
  68. package/dist/core/di.d.ts.map +1 -0
  69. package/dist/core/dialogservice.d.ts +33 -0
  70. package/dist/core/dialogservice.d.ts.map +1 -0
  71. package/dist/core/editorregistry.d.ts +87 -0
  72. package/dist/core/editorregistry.d.ts.map +1 -0
  73. package/dist/core/esmsh-service.d.ts +40 -0
  74. package/dist/core/esmsh-service.d.ts.map +1 -0
  75. package/dist/core/events.d.ts +7 -0
  76. package/dist/core/events.d.ts.map +1 -0
  77. package/dist/core/events.js +63 -0
  78. package/dist/core/events.js.map +1 -0
  79. package/dist/core/extensionregistry.d.ts +98 -0
  80. package/dist/core/extensionregistry.d.ts.map +1 -0
  81. package/dist/core/filesys/common.d.ts +122 -0
  82. package/dist/core/filesys/common.d.ts.map +1 -0
  83. package/dist/core/filesys/fs-access.d.ts +31 -0
  84. package/dist/core/filesys/fs-access.d.ts.map +1 -0
  85. package/dist/core/filesys/index.d.ts +5 -0
  86. package/dist/core/filesys/index.d.ts.map +1 -0
  87. package/dist/core/filesys/indexeddb.d.ts +41 -0
  88. package/dist/core/filesys/indexeddb.d.ts.map +1 -0
  89. package/dist/core/filesys/opfs.d.ts +14 -0
  90. package/dist/core/filesys/opfs.d.ts.map +1 -0
  91. package/dist/core/i18n.d.ts +50 -0
  92. package/dist/core/i18n.d.ts.map +1 -0
  93. package/dist/core/index.d.ts +1 -0
  94. package/dist/core/index.d.ts.map +1 -0
  95. package/dist/core/keybindings.d.ts +67 -0
  96. package/dist/core/keybindings.d.ts.map +1 -0
  97. package/dist/core/logger.d.ts +44 -0
  98. package/dist/core/logger.d.ts.map +1 -0
  99. package/dist/core/marketplaceregistry.d.ts +25 -0
  100. package/dist/core/marketplaceregistry.d.ts.map +1 -0
  101. package/dist/core/packageinfoservice.d.ts +16 -0
  102. package/dist/core/packageinfoservice.d.ts.map +1 -0
  103. package/dist/core/persistenceservice.d.ts +6 -0
  104. package/dist/core/persistenceservice.d.ts.map +1 -0
  105. package/dist/core/settingsservice.d.ts +54 -0
  106. package/dist/core/settingsservice.d.ts.map +1 -0
  107. package/dist/core/signals.d.ts +3 -0
  108. package/dist/core/signals.d.ts.map +1 -0
  109. package/dist/core/taskservice.d.ts +20 -0
  110. package/dist/core/taskservice.d.ts.map +1 -0
  111. package/dist/core/toast.d.ts +4 -0
  112. package/dist/core/toast.d.ts.map +1 -0
  113. package/dist/core/tree-utils.d.ts +16 -0
  114. package/dist/core/tree-utils.d.ts.map +1 -0
  115. package/dist/dialogs/confirm-dialog.d.ts +14 -0
  116. package/dist/dialogs/confirm-dialog.d.ts.map +1 -0
  117. package/dist/dialogs/index.d.ts +5 -0
  118. package/dist/dialogs/index.d.ts.map +1 -0
  119. package/dist/dialogs/info-dialog.d.ts +13 -0
  120. package/dist/dialogs/info-dialog.d.ts.map +1 -0
  121. package/dist/dialogs/navigable-info-dialog.d.ts +33 -0
  122. package/dist/dialogs/navigable-info-dialog.d.ts.map +1 -0
  123. package/dist/dialogs/prompt-dialog.d.ts +21 -0
  124. package/dist/dialogs/prompt-dialog.d.ts.map +1 -0
  125. package/dist/externals/lit.d.ts +21 -0
  126. package/dist/externals/lit.d.ts.map +1 -0
  127. package/dist/externals/lit.js +24 -0
  128. package/dist/externals/lit.js.map +1 -0
  129. package/dist/externals/third-party.d.ts +7 -0
  130. package/dist/externals/third-party.d.ts.map +1 -0
  131. package/dist/externals/third-party.js +7 -0
  132. package/dist/externals/third-party.js.map +1 -0
  133. package/dist/externals/webawesome.d.ts +1 -0
  134. package/dist/externals/webawesome.d.ts.map +1 -0
  135. package/dist/externals/webawesome.js +75 -0
  136. package/dist/externals/webawesome.js.map +1 -0
  137. package/dist/i18n/extensions.json.d.ts +42 -0
  138. package/dist/i18n/fastviews.json.d.ts +13 -0
  139. package/dist/i18n/filebrowser.json.d.ts +29 -0
  140. package/dist/i18n/index.d.ts +2 -0
  141. package/dist/i18n/index.d.ts.map +1 -0
  142. package/dist/i18n/logterminal.json.d.ts +45 -0
  143. package/dist/i18n/partname.json.d.ts +15 -0
  144. package/dist/i18n/tasks.json.d.ts +15 -0
  145. package/dist/i18n/workspace.json.d.ts +15 -0
  146. package/dist/icon-DN6fp0dg.js +487 -0
  147. package/dist/icon-DN6fp0dg.js.map +1 -0
  148. package/dist/index.d.ts +2 -0
  149. package/dist/index.d.ts.map +1 -0
  150. package/dist/index.js +84 -0
  151. package/dist/index.js.map +1 -0
  152. package/dist/layouts/standard-layout.d.ts +16 -0
  153. package/dist/layouts/standard-layout.d.ts.map +1 -0
  154. package/dist/nocontent-BhrN6yxJ.js +48 -0
  155. package/dist/nocontent-BhrN6yxJ.js.map +1 -0
  156. package/dist/parts/container.d.ts +4 -0
  157. package/dist/parts/container.d.ts.map +1 -0
  158. package/dist/parts/contextmenu.d.ts +50 -0
  159. package/dist/parts/contextmenu.d.ts.map +1 -0
  160. package/dist/parts/dialog-content.d.ts +9 -0
  161. package/dist/parts/dialog-content.d.ts.map +1 -0
  162. package/dist/parts/element.d.ts +36 -0
  163. package/dist/parts/element.d.ts.map +1 -0
  164. package/dist/parts/index.d.ts +1 -0
  165. package/dist/parts/index.d.ts.map +1 -0
  166. package/dist/parts/index.js +3 -0
  167. package/dist/parts/index.js.map +1 -0
  168. package/dist/parts/part.d.ts +96 -0
  169. package/dist/parts/part.d.ts.map +1 -0
  170. package/dist/parts/resizable-grid.d.ts +31 -0
  171. package/dist/parts/resizable-grid.d.ts.map +1 -0
  172. package/dist/parts/tabs.d.ts +75 -0
  173. package/dist/parts/tabs.d.ts.map +1 -0
  174. package/dist/parts/toolbar.d.ts +35 -0
  175. package/dist/parts/toolbar.d.ts.map +1 -0
  176. package/dist/resizable-grid-BRH3MyZK.js +3813 -0
  177. package/dist/resizable-grid-BRH3MyZK.js.map +1 -0
  178. package/dist/standard-layout-BSGa06lP.js +4907 -0
  179. package/dist/standard-layout-BSGa06lP.js.map +1 -0
  180. package/dist/widgets/icon.d.ts +10 -0
  181. package/dist/widgets/icon.d.ts.map +1 -0
  182. package/dist/widgets/index.d.ts +1 -0
  183. package/dist/widgets/index.d.ts.map +1 -0
  184. package/dist/widgets/index.js +3 -0
  185. package/dist/widgets/index.js.map +1 -0
  186. package/dist/widgets/nocontent.d.ts +13 -0
  187. package/dist/widgets/nocontent.d.ts.map +1 -0
  188. package/dist/widgets/widget.d.ts +25 -0
  189. package/dist/widgets/widget.d.ts.map +1 -0
  190. package/package.json +81 -0
  191. package/src/api/base-classes.ts +10 -0
  192. package/src/api/constants.ts +3 -0
  193. package/src/api/index.ts +31 -0
  194. package/src/api/services.ts +58 -0
  195. package/src/api/types.ts +46 -0
  196. package/src/commands/editor.ts +1 -0
  197. package/src/commands/files.ts +425 -0
  198. package/src/commands/global.ts +198 -0
  199. package/src/commands/index.ts +6 -0
  200. package/src/commands/open-view-as-editor.ts +28 -0
  201. package/src/commands/version-info.ts +214 -0
  202. package/src/components/app-selector.ts +233 -0
  203. package/src/components/app-switcher.ts +126 -0
  204. package/src/components/command.ts +236 -0
  205. package/src/components/extensions.ts +615 -0
  206. package/src/components/fastviews.ts +314 -0
  207. package/src/components/filebrowser.ts +518 -0
  208. package/src/components/index.ts +9 -0
  209. package/src/components/language-selector.ts +166 -0
  210. package/src/components/log-terminal.ts +337 -0
  211. package/src/components/part-name.ts +54 -0
  212. package/src/components/tasks.ts +275 -0
  213. package/src/contributions/default-ui-contributions.ts +44 -0
  214. package/src/contributions/index.ts +3 -0
  215. package/src/contributions/marketplace-catalog-contributions.ts +6 -0
  216. package/src/core/app-host-config.ts +23 -0
  217. package/src/core/apploader.ts +630 -0
  218. package/src/core/appstate.ts +15 -0
  219. package/src/core/commandregistry.ts +210 -0
  220. package/src/core/config.ts +29 -0
  221. package/src/core/constants.ts +29 -0
  222. package/src/core/contributionregistry.ts +81 -0
  223. package/src/core/di.ts +54 -0
  224. package/src/core/dialogservice.ts +266 -0
  225. package/src/core/editorregistry.ts +347 -0
  226. package/src/core/esmsh-service.ts +404 -0
  227. package/src/core/events.ts +68 -0
  228. package/src/core/extensionregistry.ts +399 -0
  229. package/src/core/filesys/common.ts +474 -0
  230. package/src/core/filesys/fs-access.ts +339 -0
  231. package/src/core/filesys/index.ts +5 -0
  232. package/src/core/filesys/indexeddb.ts +596 -0
  233. package/src/core/filesys/opfs.ts +95 -0
  234. package/src/core/i18n.ts +221 -0
  235. package/src/core/index.ts +51 -0
  236. package/src/core/keybindings.ts +274 -0
  237. package/src/core/logger.ts +187 -0
  238. package/src/core/marketplaceregistry.ts +197 -0
  239. package/src/core/packageinfoservice.ts +56 -0
  240. package/src/core/persistenceservice.ts +46 -0
  241. package/src/core/settingsservice.ts +191 -0
  242. package/src/core/signals.ts +18 -0
  243. package/src/core/taskservice.ts +72 -0
  244. package/src/core/toast.ts +21 -0
  245. package/src/core/tree-utils.ts +24 -0
  246. package/src/dialogs/confirm-dialog.ts +72 -0
  247. package/src/dialogs/index.ts +4 -0
  248. package/src/dialogs/info-dialog.ts +67 -0
  249. package/src/dialogs/navigable-info-dialog.ts +256 -0
  250. package/src/dialogs/prompt-dialog.ts +123 -0
  251. package/src/externals/lit.ts +36 -0
  252. package/src/externals/third-party.ts +10 -0
  253. package/src/externals/webawesome.ts +76 -0
  254. package/src/i18n/extensions.json +39 -0
  255. package/src/i18n/fastviews.json +10 -0
  256. package/src/i18n/filebrowser.json +27 -0
  257. package/src/i18n/index.ts +25 -0
  258. package/src/i18n/logterminal.json +42 -0
  259. package/src/i18n/partname.json +12 -0
  260. package/src/i18n/tasks.json +12 -0
  261. package/src/i18n/workspace.json +12 -0
  262. package/src/icons/icons.txt +3 -0
  263. package/src/icons/js.svg +6 -0
  264. package/src/icons/jupyter.svg +18 -0
  265. package/src/icons/python.svg +15 -0
  266. package/src/index.ts +3 -0
  267. package/src/layouts/standard-layout.ts +174 -0
  268. package/src/parts/container.ts +4 -0
  269. package/src/parts/contextmenu.ts +266 -0
  270. package/src/parts/dialog-content.ts +31 -0
  271. package/src/parts/element.ts +100 -0
  272. package/src/parts/index.ts +5 -0
  273. package/src/parts/part.ts +158 -0
  274. package/src/parts/resizable-grid.ts +366 -0
  275. package/src/parts/tabs.ts +581 -0
  276. package/src/parts/toolbar.ts +260 -0
  277. package/src/vite-env.d.ts +16 -0
  278. package/src/widgets/icon.ts +38 -0
  279. package/src/widgets/index.ts +2 -0
  280. package/src/widgets/nocontent.ts +40 -0
  281. package/src/widgets/widget.ts +92 -0
@@ -0,0 +1,29 @@
1
+ declare const _default: {
2
+ "namespace": "filebrowser",
3
+ "en": {
4
+ "CONNECT_WORKSPACE": "Connect Workspace...",
5
+ "REFRESH_RESOURCE": "Refresh resource",
6
+ "CREATE_NEW": "Create new...",
7
+ "OPEN": "Open",
8
+ "FILE": "File",
9
+ "FOLDER": "Folder",
10
+ "FILE_EXISTS_OVERWRITE": "File \"{fileName}\" already exists. Do you want to overwrite it?",
11
+ "SELECT_WORKSPACE": "Select a workspace.",
12
+ "DROP_FILES_HERE": "\ud83d\udcc1 Drop files here",
13
+ "OPEN_WITH": "Open with..."
14
+ },
15
+ "de": {
16
+ "CONNECT_WORKSPACE": "Arbeitsbereich verbinden...",
17
+ "REFRESH_RESOURCE": "Ressource aktualisieren",
18
+ "CREATE_NEW": "Neu erstellen...",
19
+ "OPEN": "\u00d6ffnen",
20
+ "FILE": "Datei",
21
+ "FOLDER": "Ordner",
22
+ "FILE_EXISTS_OVERWRITE": "Die Datei \"{fileName}\" existiert bereits. M\u00f6chten Sie sie \u00fcberschreiben?",
23
+ "SELECT_WORKSPACE": "W\u00e4hlen Sie einen Arbeitsbereich aus.",
24
+ "DROP_FILES_HERE": "\ud83d\udcc1 Dateien hier ablegen",
25
+ "OPEN_WITH": "\u00d6ffnen mit..."
26
+ }
27
+ };
28
+
29
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,45 @@
1
+ declare const _default: {
2
+ "namespace": "logterminal",
3
+ "en": {
4
+ "ALL_LOGS": "All logs",
5
+ "ALL": "All",
6
+ "INFO_LOGS": "Info logs",
7
+ "INFO": "Info",
8
+ "WARNING_LOGS": "Warning logs",
9
+ "WARNINGS": "Warnings",
10
+ "ERROR_LOGS": "Error logs",
11
+ "ERRORS": "Errors",
12
+ "DEBUG_LOGS": "Debug logs",
13
+ "DEBUG": "Debug",
14
+ "AUTO_SCROLL_ENABLED": "Auto-scroll enabled",
15
+ "AUTO_SCROLL_DISABLED": "Auto-scroll disabled",
16
+ "AUTO_SCROLL": "Auto-scroll",
17
+ "MANUAL": "Manual",
18
+ "CLEAR_LOGS": "Clear logs",
19
+ "CLEAR": "Clear",
20
+ "NO_LOG_MESSAGES": "No log messages"
21
+ },
22
+ "de": {
23
+ "ALL_LOGS": "Alle Protokolle",
24
+ "ALL": "Alle",
25
+ "INFO_LOGS": "Info-Protokolle",
26
+ "INFO": "Info",
27
+ "WARNING_LOGS": "Warnungsprotokolle",
28
+ "WARNINGS": "Warnungen",
29
+ "ERROR_LOGS": "Fehlerprotokolle",
30
+ "ERRORS": "Fehler",
31
+ "DEBUG_LOGS": "Debug-Protokolle",
32
+ "DEBUG": "Debug",
33
+ "AUTO_SCROLL_ENABLED": "Automatisches Scrollen aktiviert",
34
+ "AUTO_SCROLL_DISABLED": "Automatisches Scrollen deaktiviert",
35
+ "AUTO_SCROLL": "Automatisches Scrollen",
36
+ "MANUAL": "Manuell",
37
+ "CLEAR_LOGS": "Protokolle löschen",
38
+ "CLEAR": "Löschen",
39
+ "NO_LOG_MESSAGES": "Keine Protokollnachrichten"
40
+ }
41
+ }
42
+
43
+ ;
44
+
45
+ export default _default;
@@ -0,0 +1,15 @@
1
+ declare const _default: {
2
+ "namespace": "partname",
3
+ "en": {
4
+ "NO_PART": "<no part>",
5
+ "ACTIVE_PART": "Active part"
6
+ },
7
+ "de": {
8
+ "NO_PART": "<kein Bereich>",
9
+ "ACTIVE_PART": "Aktiver Bereich"
10
+ }
11
+ }
12
+
13
+ ;
14
+
15
+ export default _default;
@@ -0,0 +1,15 @@
1
+ declare const _default: {
2
+ "namespace": "tasks",
3
+ "en": {
4
+ "ACTIVE_TASKS": "Active Tasks",
5
+ "ACTIVE_TASKS_TITLE": "Active tasks: {taskCount}. Click to view details."
6
+ },
7
+ "de": {
8
+ "ACTIVE_TASKS": "Aktive Aufgaben",
9
+ "ACTIVE_TASKS_TITLE": "Aktive Aufgaben: {taskCount}. Klicken Sie, um Details anzuzeigen."
10
+ }
11
+ }
12
+
13
+ ;
14
+
15
+ export default _default;
@@ -0,0 +1,15 @@
1
+ declare const _default: {
2
+ "namespace": "workspace",
3
+ "en": {
4
+ "NO_WORKSPACE": "<no workspace>",
5
+ "LOAD_WORKSPACE": "Load workspace"
6
+ },
7
+ "de": {
8
+ "NO_WORKSPACE": "<kein Arbeitsbereich>",
9
+ "LOAD_WORKSPACE": "Arbeitsbereich laden"
10
+ }
11
+ }
12
+
13
+ ;
14
+
15
+ export default _default;
@@ -0,0 +1,487 @@
1
+ import { property, customElement } from "lit/decorators.js";
2
+ import { LitElement, css, nothing, html } from "lit";
3
+ import { publish, unsubscribe, subscribe } from "./core/events.js";
4
+ import Toastify from "toastify-js";
5
+ import "toastify-js/src/toastify.css";
6
+ import { Signal, signal, SignalWatcher } from "@lit-labs/signals";
7
+ class DependencyContext {
8
+ constructor(variables) {
9
+ this.children = [];
10
+ this.variables = variables;
11
+ this.proxy = new Proxy(variables, this);
12
+ }
13
+ get(target, prop) {
14
+ return target[prop] || this.parent?.getProxy()[prop];
15
+ }
16
+ set(target, prop, value) {
17
+ target[prop] = value;
18
+ }
19
+ put(prop, value) {
20
+ this.variables[prop] = value;
21
+ }
22
+ getProxy() {
23
+ return this.proxy;
24
+ }
25
+ createChild(variables = {}) {
26
+ const child = new DependencyContext(variables);
27
+ child.parent = this;
28
+ this.children.push(child);
29
+ return child;
30
+ }
31
+ getChildren() {
32
+ return this.children;
33
+ }
34
+ getParent() {
35
+ return this.parent;
36
+ }
37
+ destroy() {
38
+ const index = this.parent?.children.indexOf(this);
39
+ if (index !== void 0 && index >= 0) {
40
+ this.parent?.children.splice(index, 1);
41
+ }
42
+ this.parent = void 0;
43
+ }
44
+ }
45
+ const rootContext = new DependencyContext({});
46
+ const uiContext = rootContext.createChild({});
47
+ const DURATION = 4e3;
48
+ const BASE = { duration: DURATION, gravity: "bottom", position: "right", close: true };
49
+ const show = (msg, style) => {
50
+ Toastify({ ...BASE, text: msg, style }).showToast();
51
+ };
52
+ const toastInfo = (msg) => {
53
+ show(msg, { background: "var(--wa-color-brand-50)", color: "var(--wa-color-brand-on)" });
54
+ };
55
+ const toastError = (msg) => {
56
+ show(msg, { background: "var(--wa-color-danger-50)", color: "var(--wa-color-danger-on)" });
57
+ };
58
+ const toastWarning = (msg) => {
59
+ show(msg, { background: "var(--wa-color-warning-50)", color: "var(--wa-color-warning-on)" });
60
+ };
61
+ const LogLevelPriority = {
62
+ "debug": 0,
63
+ "info": 1,
64
+ "warning": 2,
65
+ "error": 3
66
+ };
67
+ let globalLogLevel = "debug";
68
+ const originalConsole = {
69
+ log: console.log.bind(console),
70
+ info: console.info.bind(console),
71
+ warn: console.warn.bind(console),
72
+ error: console.error.bind(console),
73
+ debug: console.debug.bind(console)
74
+ };
75
+ let logHandler = null;
76
+ const messageBuffer = [];
77
+ function formatArg(arg) {
78
+ if (arg === null) return "null";
79
+ if (arg === void 0) return "undefined";
80
+ if (typeof arg === "string") return arg;
81
+ if (typeof arg === "number" || typeof arg === "boolean") return String(arg);
82
+ if (arg instanceof Error) return `${arg.name}: ${arg.message}`;
83
+ try {
84
+ return JSON.stringify(arg);
85
+ } catch {
86
+ return String(arg);
87
+ }
88
+ }
89
+ class Logger {
90
+ constructor(source) {
91
+ this.source = source;
92
+ }
93
+ info(message) {
94
+ this.log(message, "info");
95
+ }
96
+ warning(message) {
97
+ this.log(message, "warning");
98
+ }
99
+ warn(message) {
100
+ this.log(message, "warning");
101
+ }
102
+ error(message) {
103
+ this.log(message, "error");
104
+ }
105
+ debug(message) {
106
+ this.log(message, "debug");
107
+ }
108
+ log(message, level) {
109
+ dispatch(this.source, message, level);
110
+ }
111
+ }
112
+ function shouldLog(level) {
113
+ return LogLevelPriority[level] >= LogLevelPriority[globalLogLevel];
114
+ }
115
+ function dispatch(source, message, level) {
116
+ if (!shouldLog(level)) {
117
+ return;
118
+ }
119
+ if (logHandler) {
120
+ logHandler(source, message, level);
121
+ } else {
122
+ messageBuffer.push({ source, message, level });
123
+ originalConsole[level === "error" ? "error" : level === "warning" ? "warn" : level === "debug" ? "debug" : "log"](
124
+ `[${source}] ${message}`
125
+ );
126
+ }
127
+ }
128
+ function initializeConsoleInterception() {
129
+ console.log = function(...args) {
130
+ originalConsole.log.apply(console, args);
131
+ dispatch("Console", args.map((a) => formatArg(a)).join(" "), "info");
132
+ };
133
+ console.info = function(...args) {
134
+ originalConsole.info.apply(console, args);
135
+ dispatch("Console", args.map((a) => formatArg(a)).join(" "), "info");
136
+ };
137
+ console.warn = function(...args) {
138
+ originalConsole.warn.apply(console, args);
139
+ dispatch("Console", args.map((a) => formatArg(a)).join(" "), "warning");
140
+ };
141
+ console.error = function(...args) {
142
+ originalConsole.error.apply(console, args);
143
+ dispatch("Console", args.map((a) => formatArg(a)).join(" "), "error");
144
+ };
145
+ console.debug = function(...args) {
146
+ originalConsole.debug.apply(console, args);
147
+ dispatch("Console", args.map((a) => formatArg(a)).join(" "), "debug");
148
+ };
149
+ }
150
+ initializeConsoleInterception();
151
+ function registerLogHandler(handler) {
152
+ logHandler = handler;
153
+ while (messageBuffer.length > 0) {
154
+ const msg = messageBuffer.shift();
155
+ if (msg) {
156
+ handler(msg.source, msg.message, msg.level);
157
+ }
158
+ }
159
+ }
160
+ function unregisterLogHandler() {
161
+ logHandler = null;
162
+ }
163
+ function createLogger(source) {
164
+ return new Logger(source);
165
+ }
166
+ function setLogLevel(level) {
167
+ globalLogLevel = level;
168
+ }
169
+ const defaultLogger = createLogger("System");
170
+ rootContext.put("logger", defaultLogger);
171
+ const TOPIC_CONTRIBUTEIONS_CHANGED = "events/contributionregistry/contributionsChanged";
172
+ class ContributionRegistry {
173
+ constructor() {
174
+ this.contributions = /* @__PURE__ */ new Map();
175
+ }
176
+ registerContribution(target, contribution) {
177
+ const targetSlot = this.getContributions(target);
178
+ if ("command" in contribution) {
179
+ const cmd = contribution;
180
+ if (cmd.disabled instanceof Function) {
181
+ cmd.disabled = new Signal.Computed(cmd.disabled);
182
+ }
183
+ }
184
+ targetSlot.push(contribution);
185
+ publish(TOPIC_CONTRIBUTEIONS_CHANGED, { target, contributions: targetSlot });
186
+ }
187
+ getContributions(target) {
188
+ if (!this.contributions.has(target)) {
189
+ this.contributions.set(target, []);
190
+ }
191
+ return this.contributions.get(target);
192
+ }
193
+ }
194
+ const contributionRegistry = new ContributionRegistry();
195
+ rootContext.put("contributionRegistry", contributionRegistry);
196
+ const EMPTY_SIGNALPORT = {};
197
+ const activePartSignal = signal(null);
198
+ const activeEditorSignal = signal(null);
199
+ const partDirtySignal = signal(null);
200
+ const activeTasksSignal = signal(0);
201
+ const activeSelectionSignal = signal(void 0);
202
+ const perspectiveSwitchedSignal = signal({ name: "", timestamp: 0 });
203
+ const TOPIC_COMMAND_REGISTERED = "events/commandregistry/commandRegistered";
204
+ class Command {
205
+ constructor(id, name, description, parameters, output) {
206
+ this.id = id;
207
+ this.name = name;
208
+ this.description = description;
209
+ this.parameters = parameters || [];
210
+ this.output = output || [];
211
+ }
212
+ }
213
+ class CommandStack {
214
+ //private stack: any[] = []
215
+ async execute(commandId, context) {
216
+ return commandRegistry.execute(commandId, context);
217
+ }
218
+ async undo() {
219
+ }
220
+ async redo() {
221
+ }
222
+ }
223
+ class CommandRegistry {
224
+ constructor() {
225
+ this.commands = {};
226
+ this.handlers = /* @__PURE__ */ new Map();
227
+ }
228
+ registerHandler(commandId, handler) {
229
+ if (!this.handlers.has(commandId)) {
230
+ this.handlers.set(commandId, []);
231
+ }
232
+ const handlerList = this.handlers.get(commandId);
233
+ handlerList.push(handler);
234
+ handlerList.sort((a, b) => (b.ranking ?? 0) - (a.ranking ?? 0));
235
+ }
236
+ getHandler(commandId) {
237
+ return this.handlers.get(commandId);
238
+ }
239
+ /**
240
+ * Creates an ExecutionContext with the current application state
241
+ *
242
+ * @param params Optional command parameters
243
+ * @returns ExecutionContext with captured application state
244
+ */
245
+ createExecutionContext(params) {
246
+ const context = {
247
+ params: params || {},
248
+ activePart: activePartSignal.get(),
249
+ activeEditor: activeEditorSignal.get()
250
+ };
251
+ return context;
252
+ }
253
+ execute(commandId, context = {}) {
254
+ const handlers = this.getHandler(commandId);
255
+ if (!handlers) {
256
+ defaultLogger.debug(`[CommandRegistry] No handlers registered for command: ${commandId}`);
257
+ throw new Error(`No handlers registered for command: ${commandId}`);
258
+ }
259
+ const command = this.getCommand(commandId);
260
+ const paramsStr = context.params ? ` params: ${JSON.stringify(context.params)}` : "";
261
+ defaultLogger.debug(`[CommandRegistry] Executing command: ${commandId}${command ? ` (${command.name})` : ""}${paramsStr}`);
262
+ for (const handler of handlers) {
263
+ if (handler.canExecute === void 0 || handler.canExecute(context)) {
264
+ try {
265
+ const result = handler.execute(context);
266
+ defaultLogger.debug(`[CommandRegistry] Command executed successfully: ${commandId} (result: ${result})`);
267
+ return result;
268
+ } catch (error) {
269
+ const errorMsg = error instanceof Error ? error.message : String(error);
270
+ defaultLogger.error(`[CommandRegistry] Command execution failed: ${commandId} - ${errorMsg}`);
271
+ throw error;
272
+ }
273
+ }
274
+ }
275
+ defaultLogger.error(`[CommandRegistry] No handler found to execute command: ${commandId}`);
276
+ }
277
+ createAndRegisterCommand(id, name, description, parameters, handler) {
278
+ const command = new Command(id, name, description, parameters);
279
+ this.registerCommand(command);
280
+ if (handler) {
281
+ this.registerHandler(id, handler);
282
+ }
283
+ }
284
+ registerCommand(command) {
285
+ this.commands[command.id] = command;
286
+ defaultLogger.debug(`Command registered: ${command.id}`);
287
+ publish(TOPIC_COMMAND_REGISTERED, command);
288
+ }
289
+ hasCommand(commandId) {
290
+ return commandId in this.commands;
291
+ }
292
+ listCommands(context) {
293
+ if (context) {
294
+ return Object.values(this.commands).filter((command) => {
295
+ const handlers = commandRegistry.getHandler(command.id) || [];
296
+ return handlers.some((handler) => handler.canExecute === void 0 || handler.canExecute(context));
297
+ }).reduce((acc, command) => {
298
+ acc[command.id] = command;
299
+ return acc;
300
+ }, {});
301
+ }
302
+ return this.commands;
303
+ }
304
+ getCommand(commandId) {
305
+ return this.commands[commandId];
306
+ }
307
+ registerAll(options) {
308
+ const commandId = options.command.id;
309
+ this.registerCommand(options.command);
310
+ if (options.handler) {
311
+ this.registerHandler(commandId, options.handler);
312
+ }
313
+ if (options.contribution && options.contribution.target) {
314
+ contributionRegistry.registerContribution(options.contribution.target, {
315
+ command: commandId,
316
+ ...options.contribution
317
+ });
318
+ }
319
+ }
320
+ }
321
+ const commandRegistry = new CommandRegistry();
322
+ rootContext.put("commandRegistry", commandRegistry);
323
+ const registerAll = (options) => {
324
+ commandRegistry.registerAll(options);
325
+ };
326
+ const watchSignal = (signal2, callback) => {
327
+ const watcher = new Signal.subtle.Watcher(async () => {
328
+ try {
329
+ await 0;
330
+ callback(signal2.get());
331
+ } finally {
332
+ watcher.watch(signal2);
333
+ }
334
+ });
335
+ watcher.watch(signal2);
336
+ signal2.get();
337
+ return () => {
338
+ watcher.unwatch(signal2);
339
+ };
340
+ };
341
+ Object.defineProperty(LitElement.prototype, "model", {
342
+ enumerable: true,
343
+ configurable: true,
344
+ writable: true
345
+ });
346
+ const LyraWidgetBase = SignalWatcher(LitElement);
347
+ class LyraWidget extends LyraWidgetBase {
348
+ constructor() {
349
+ super(...arguments);
350
+ this.signalCleanups = /* @__PURE__ */ new Set();
351
+ this.eventSubscriptions = /* @__PURE__ */ new Set();
352
+ }
353
+ connectedCallback() {
354
+ super.connectedCallback();
355
+ this.doBeforeUI();
356
+ }
357
+ disconnectedCallback() {
358
+ super.disconnectedCallback();
359
+ this.eventSubscriptions.forEach((token) => unsubscribe(token));
360
+ this.eventSubscriptions.clear();
361
+ this.signalCleanups.forEach((cleanup) => cleanup());
362
+ this.signalCleanups.clear();
363
+ }
364
+ subscribe(topic, callback) {
365
+ const token = subscribe(topic, callback.bind(this));
366
+ this.eventSubscriptions.add(token);
367
+ }
368
+ showInfo(msg) {
369
+ toastInfo(msg);
370
+ }
371
+ showError(msg) {
372
+ toastError(msg);
373
+ }
374
+ nobubble(wrap) {
375
+ return (event) => {
376
+ event.stopPropagation();
377
+ wrap.bind(this)(event);
378
+ };
379
+ }
380
+ command(command, state = {}) {
381
+ return () => {
382
+ this.executeCommand(command, state);
383
+ };
384
+ }
385
+ executeCommand(command, params) {
386
+ const execContext = commandRegistry.createExecutionContext(params);
387
+ commandRegistry.execute(command, execContext);
388
+ }
389
+ watch(signal2, callback) {
390
+ const cleanup = watchSignal(signal2, callback.bind(this));
391
+ this.signalCleanups.add(cleanup);
392
+ }
393
+ firstUpdated(_changedProperties) {
394
+ super.firstUpdated(_changedProperties);
395
+ this.doInitUI();
396
+ }
397
+ updateIdle() {
398
+ requestIdleCallback(() => this.requestUpdate());
399
+ }
400
+ updateLater() {
401
+ requestAnimationFrame(() => this.requestUpdate());
402
+ }
403
+ doBeforeUI() {
404
+ }
405
+ doInitUI() {
406
+ }
407
+ withRefresh(callback) {
408
+ callback();
409
+ this.updateLater();
410
+ }
411
+ }
412
+ var __defProp = Object.defineProperty;
413
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
414
+ var __decorateClass = (decorators, target, key, kind) => {
415
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
416
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
417
+ if (decorator = decorators[i])
418
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
419
+ if (kind && result) __defProp(target, key, result);
420
+ return result;
421
+ };
422
+ let LyraIcon = class extends LyraWidget {
423
+ constructor() {
424
+ super(...arguments);
425
+ this.family = "regular";
426
+ }
427
+ render() {
428
+ if (!this.name) {
429
+ return "";
430
+ }
431
+ const parts = this.name.trim().split(/ +/);
432
+ const iconName = parts.pop();
433
+ const library = parts.pop();
434
+ return html`
435
+ <wa-icon library="${library || nothing}" variant="${this.variant || nothing}"
436
+ family="${this.family || nothing}" name=${iconName} label="${this.label || this.name || nothing}"></wa-icon>`;
437
+ }
438
+ };
439
+ LyraIcon.styles = css`
440
+ :host {
441
+ display: contents;
442
+ }
443
+ `;
444
+ __decorateClass([
445
+ property()
446
+ ], LyraIcon.prototype, "name", 2);
447
+ __decorateClass([
448
+ property()
449
+ ], LyraIcon.prototype, "family", 2);
450
+ __decorateClass([
451
+ property()
452
+ ], LyraIcon.prototype, "variant", 2);
453
+ __decorateClass([
454
+ property()
455
+ ], LyraIcon.prototype, "label", 2);
456
+ LyraIcon = __decorateClass([
457
+ customElement("lyra-icon")
458
+ ], LyraIcon);
459
+ export {
460
+ CommandRegistry as C,
461
+ EMPTY_SIGNALPORT as E,
462
+ LyraWidget as L,
463
+ TOPIC_COMMAND_REGISTERED as T,
464
+ CommandStack as a,
465
+ TOPIC_CONTRIBUTEIONS_CHANGED as b,
466
+ activeEditorSignal as c,
467
+ activePartSignal as d,
468
+ activeSelectionSignal as e,
469
+ activeTasksSignal as f,
470
+ commandRegistry as g,
471
+ contributionRegistry as h,
472
+ createLogger as i,
473
+ defaultLogger as j,
474
+ perspectiveSwitchedSignal as k,
475
+ rootContext as l,
476
+ toastInfo as m,
477
+ toastWarning as n,
478
+ registerLogHandler as o,
479
+ partDirtySignal as p,
480
+ unregisterLogHandler as q,
481
+ registerAll as r,
482
+ setLogLevel as s,
483
+ toastError as t,
484
+ uiContext as u,
485
+ watchSignal as w
486
+ };
487
+ //# sourceMappingURL=icon-DN6fp0dg.js.map