@eclipse-docks/core 0.7.95 → 0.7.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.js +2 -2
- package/dist/{api-BtDjEaYP.js → api-CRZ-pC4q.js} +7 -74
- package/dist/api-CRZ-pC4q.js.map +1 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/core/extensionregistry.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/parts/index.js +1 -1
- package/dist/{parts-BUQx-7Vd.js → parts-Bl4MkOUi.js} +13 -2
- package/dist/parts-Bl4MkOUi.js.map +1 -0
- package/package.json +1 -1
- package/src/commands/index.ts +0 -1
- package/src/contributions/default-ui-contributions.ts +6 -0
- package/src/core/extensionregistry.ts +12 -1
- package/src/parts/toolbar.ts +1 -1
- package/dist/api-BtDjEaYP.js.map +0 -1
- package/dist/commands/unzip.d.ts +0 -2
- package/dist/commands/unzip.d.ts.map +0 -1
- package/dist/parts-BUQx-7Vd.js.map +0 -1
- package/src/commands/unzip.ts +0 -98
package/dist/api/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as SYSTEM_LAYOUTS, C as HIDE_DOT_RESOURCE, D as SIDEBAR_MAIN, E as SIDEBAR_AUXILIARY, F as TOOLBAR_MAIN, I as TOOLBAR_MAIN_CENTER, L as TOOLBAR_MAIN_RIGHT, M as TOOLBAR_BOTTOM, N as TOOLBAR_BOTTOM_CENTER, O as SIDEBAR_MAIN_BOTTOM, P as TOOLBAR_BOTTOM_END, S as EDITOR_AREA_MAIN, T as PANEL_BOTTOM, _ as esmShService, a as filebrowserDialog, b as appSettings, c as infoDialog, f as dialogService, g as extensionRegistry, i as parseIconSpec, j as SYSTEM_VIEWS, k as SIDEBAR_MAIN_TOOLBAR, l as promptDialog, m as DocksElement, n as DocksContainer, o as navigableInfoDialog, p as DocksDialogContent, r as icon, s as confirmDialog, t as DocksPart, u as appLoaderService, v as taskService, w as MouseButton, x as COMMAND_SAVE, y as TOPIC_SETTINGS_CHANGED } from "../parts-
|
|
1
|
+
import { A as SYSTEM_LAYOUTS, C as HIDE_DOT_RESOURCE, D as SIDEBAR_MAIN, E as SIDEBAR_AUXILIARY, F as TOOLBAR_MAIN, I as TOOLBAR_MAIN_CENTER, L as TOOLBAR_MAIN_RIGHT, M as TOOLBAR_BOTTOM, N as TOOLBAR_BOTTOM_CENTER, O as SIDEBAR_MAIN_BOTTOM, P as TOOLBAR_BOTTOM_END, S as EDITOR_AREA_MAIN, T as PANEL_BOTTOM, _ as esmShService, a as filebrowserDialog, b as appSettings, c as infoDialog, f as dialogService, g as extensionRegistry, i as parseIconSpec, j as SYSTEM_VIEWS, k as SIDEBAR_MAIN_TOOLBAR, l as promptDialog, m as DocksElement, n as DocksContainer, o as navigableInfoDialog, p as DocksDialogContent, r as icon, s as confirmDialog, t as DocksPart, u as appLoaderService, v as taskService, w as MouseButton, x as COMMAND_SAVE, y as TOPIC_SETTINGS_CHANGED } from "../parts-Bl4MkOUi.js";
|
|
2
2
|
import { i as setLogLevel, n as defaultLogger, o as rootContext, s as uiContext, t as createLogger } from "../logger-DT0_NW3S.js";
|
|
3
3
|
import { C as toastWarning, S as toastInfo, _ as applyConfigNameRemaps, a as TOPIC_COMMAND_REGISTERED, b as overrideContributionTargets, c as EMPTY_SIGNALPORT, d as activeSelectionSignal, f as activeTasksSignal, g as contributionRegistry, h as TOPIC_CONTRIBUTEIONS_CHANGED, i as CommandStack, l as activeEditorSignal, m as perspectiveSwitchedSignal, n as watchSignal, o as commandRegistry, p as partDirtySignal, r as CommandRegistry, s as registerAll, t as DocksWidget, u as activePartSignal, v as contributionTargetMappingRegistry, x as toastError, y as listContributionNameRemaps } from "../widget-BgBerzhp.js";
|
|
4
4
|
import { n as subscribe, r as unsubscribe, t as publish } from "../events-B_ZxkU_G.js";
|
|
5
5
|
import { a as File, c as TOPIC_WORKSPACE_CHANGED, d as WorkspaceService, f as workspaceService, i as Directory, l as TOPIC_WORKSPACE_CONNECTED, o as FileContentType, p as persistenceService, r as CompositeDirectory, s as StringFile, t as FileSysDirHandleResource } from "../fs-access-D-fDaJ8V.js";
|
|
6
|
-
import { a as DocksStandardLayout, c as createLazyLabel, i as createJsRuntime, l as i18n, n as getFrameworkConfig, o as treeNodeComparator, r as runJavaScriptCode, s as editorRegistry, t as configureFramework } from "../api-
|
|
6
|
+
import { a as DocksStandardLayout, c as createLazyLabel, i as createJsRuntime, l as i18n, n as getFrameworkConfig, o as treeNodeComparator, r as runJavaScriptCode, s as editorRegistry, t as configureFramework } from "../api-CRZ-pC4q.js";
|
|
7
7
|
export { COMMAND_SAVE, CommandRegistry, CommandStack, CompositeDirectory, Directory, DocksContainer, DocksDialogContent, DocksElement, DocksPart, DocksStandardLayout, DocksWidget, EDITOR_AREA_MAIN, EMPTY_SIGNALPORT, File, FileContentType, FileSysDirHandleResource, HIDE_DOT_RESOURCE, MouseButton, PANEL_BOTTOM, SIDEBAR_AUXILIARY, SIDEBAR_MAIN, SIDEBAR_MAIN_BOTTOM, SIDEBAR_MAIN_TOOLBAR, SYSTEM_LAYOUTS, SYSTEM_VIEWS, StringFile, TOOLBAR_BOTTOM, TOOLBAR_BOTTOM_CENTER, TOOLBAR_BOTTOM_END, TOOLBAR_MAIN, TOOLBAR_MAIN_CENTER, TOOLBAR_MAIN_RIGHT, TOPIC_COMMAND_REGISTERED, TOPIC_CONTRIBUTEIONS_CHANGED, TOPIC_SETTINGS_CHANGED, TOPIC_WORKSPACE_CHANGED, TOPIC_WORKSPACE_CONNECTED, WorkspaceService, activeEditorSignal, activePartSignal, activeSelectionSignal, activeTasksSignal, appLoaderService, appSettings, applyConfigNameRemaps, commandRegistry, configureFramework, confirmDialog, contributionRegistry, contributionTargetMappingRegistry, createJsRuntime, createLazyLabel, createLogger, dialogService, editorRegistry, esmShService, extensionRegistry, filebrowserDialog, getFrameworkConfig, i18n, icon, infoDialog, listContributionNameRemaps, defaultLogger as logger, navigableInfoDialog, overrideContributionTargets, parseIconSpec, partDirtySignal, persistenceService, perspectiveSwitchedSignal, promptDialog, publish, registerAll, rootContext, runJavaScriptCode, setLogLevel, subscribe, taskService, toastError, toastInfo, toastWarning, treeNodeComparator, uiContext, unsubscribe, watchSignal, workspaceService };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as SYSTEM_LAYOUTS, D as SIDEBAR_MAIN, E as SIDEBAR_AUXILIARY, F as TOOLBAR_MAIN, I as TOOLBAR_MAIN_CENTER, L as TOOLBAR_MAIN_RIGHT, M as TOOLBAR_BOTTOM, N as TOOLBAR_BOTTOM_CENTER, O as SIDEBAR_MAIN_BOTTOM, P as TOOLBAR_BOTTOM_END, R as constants_exports, S as EDITOR_AREA_MAIN, T as PANEL_BOTTOM, _ as esmShService, a as filebrowserDialog, b as appSettings, d as deleteIndexedDbWorkspaceData, g as extensionRegistry, h as TOPIC_EXTENSIONS_CHANGED, l as promptDialog, m as DocksElement, n as DocksContainer, r as icon, s as confirmDialog, t as DocksPart, u as appLoaderService, v as taskService, y as TOPIC_SETTINGS_CHANGED } from "./parts-
|
|
1
|
+
import { A as SYSTEM_LAYOUTS, D as SIDEBAR_MAIN, E as SIDEBAR_AUXILIARY, F as TOOLBAR_MAIN, I as TOOLBAR_MAIN_CENTER, L as TOOLBAR_MAIN_RIGHT, M as TOOLBAR_BOTTOM, N as TOOLBAR_BOTTOM_CENTER, O as SIDEBAR_MAIN_BOTTOM, P as TOOLBAR_BOTTOM_END, R as constants_exports, S as EDITOR_AREA_MAIN, T as PANEL_BOTTOM, _ as esmShService, a as filebrowserDialog, b as appSettings, d as deleteIndexedDbWorkspaceData, g as extensionRegistry, h as TOPIC_EXTENSIONS_CHANGED, k as SIDEBAR_MAIN_TOOLBAR, l as promptDialog, m as DocksElement, n as DocksContainer, r as icon, s as confirmDialog, t as DocksPart, u as appLoaderService, v as taskService, y as TOPIC_SETTINGS_CHANGED } from "./parts-Bl4MkOUi.js";
|
|
2
2
|
import { a as unregisterLogHandler, o as rootContext, r as registerLogHandler, s as uiContext, t as createLogger } from "./logger-DT0_NW3S.js";
|
|
3
3
|
import { C as toastWarning, S as toastInfo, d as activeSelectionSignal, f as activeTasksSignal, g as contributionRegistry, h as TOPIC_CONTRIBUTEIONS_CHANGED, n as watchSignal, s as registerAll, t as DocksWidget, u as activePartSignal, x as toastError } from "./widget-BgBerzhp.js";
|
|
4
4
|
import { n as subscribe, t as publish } from "./events-B_ZxkU_G.js";
|
|
@@ -12,7 +12,6 @@ import { customElement, property, state } from "lit/decorators.js";
|
|
|
12
12
|
import _decorate from "@oxc-project/runtime/helpers/decorate";
|
|
13
13
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
14
14
|
import { when } from "lit/directives/when.js";
|
|
15
|
-
import JSZip from "jszip";
|
|
16
15
|
//#region src/core/i18n.ts
|
|
17
16
|
/**
|
|
18
17
|
* Why this custom i18n layer exists (instead of directly using @lit/localize):
|
|
@@ -2556,6 +2555,11 @@ contributionRegistry.registerContribution(TOOLBAR_MAIN_RIGHT, {
|
|
|
2556
2555
|
label: "App Switcher",
|
|
2557
2556
|
component: () => html`<docks-layout-switcher></docks-layout-switcher>`
|
|
2558
2557
|
});
|
|
2558
|
+
contributionRegistry.registerContribution(SIDEBAR_MAIN_TOOLBAR, {
|
|
2559
|
+
command: "open_extensions",
|
|
2560
|
+
icon: "docks extensions",
|
|
2561
|
+
label: "Extensions"
|
|
2562
|
+
});
|
|
2559
2563
|
//#endregion
|
|
2560
2564
|
//#region src/layouts/standard-layout.ts
|
|
2561
2565
|
var DocksStandardLayout = class DocksStandardLayout extends DocksContainer {
|
|
@@ -4131,77 +4135,6 @@ registerAll({
|
|
|
4131
4135
|
} }
|
|
4132
4136
|
});
|
|
4133
4137
|
//#endregion
|
|
4134
|
-
//#region src/commands/unzip.ts
|
|
4135
|
-
registerAll({
|
|
4136
|
-
command: {
|
|
4137
|
-
id: "unzip",
|
|
4138
|
-
name: "Unzip Archive",
|
|
4139
|
-
description: "Extract a zip archive from the workspace",
|
|
4140
|
-
parameters: [{
|
|
4141
|
-
name: "file",
|
|
4142
|
-
description: "the zip file to extract, if not provided, the current selection will be used",
|
|
4143
|
-
required: false
|
|
4144
|
-
}, {
|
|
4145
|
-
name: "target",
|
|
4146
|
-
description: "target folder to extract into, defaults to the zip filename without extension",
|
|
4147
|
-
required: false
|
|
4148
|
-
}]
|
|
4149
|
-
},
|
|
4150
|
-
handler: {
|
|
4151
|
-
canExecute: (context) => {
|
|
4152
|
-
let filePath = context.params?.file;
|
|
4153
|
-
if (!filePath) {
|
|
4154
|
-
const selectedItem = activeSelectionSignal.get();
|
|
4155
|
-
if (!selectedItem || !("path" in selectedItem)) return false;
|
|
4156
|
-
filePath = selectedItem.path;
|
|
4157
|
-
}
|
|
4158
|
-
return filePath.toLowerCase().endsWith(".zip");
|
|
4159
|
-
},
|
|
4160
|
-
execute: async (context) => {
|
|
4161
|
-
let filePath = context.params?.file;
|
|
4162
|
-
if (!filePath) filePath = activeSelectionSignal.get().path;
|
|
4163
|
-
const workspaceDir = await workspaceService.getWorkspace();
|
|
4164
|
-
if (!workspaceDir) {
|
|
4165
|
-
toastError("No workspace selected.");
|
|
4166
|
-
return;
|
|
4167
|
-
}
|
|
4168
|
-
await taskService.runAsync("Extracting archive", async (progress) => {
|
|
4169
|
-
try {
|
|
4170
|
-
const fileResource = await workspaceDir.getResource(filePath);
|
|
4171
|
-
if (!fileResource) {
|
|
4172
|
-
toastError("File not found: " + filePath);
|
|
4173
|
-
return;
|
|
4174
|
-
}
|
|
4175
|
-
let targetFolder = context.params?.target;
|
|
4176
|
-
if (!targetFolder) targetFolder = (filePath.split("/").pop() || "extracted").replace(/\.zip$/i, "") + "/";
|
|
4177
|
-
progress.message = "Loading archive...";
|
|
4178
|
-
progress.progress = 0;
|
|
4179
|
-
await workspaceDir.getResource(targetFolder, { create: true });
|
|
4180
|
-
const blob = await fileResource.getContents({ blob: true });
|
|
4181
|
-
const zip = await JSZip.loadAsync(blob);
|
|
4182
|
-
const totalFiles = Object.values(zip.files).filter((entry) => !entry.dir).length;
|
|
4183
|
-
let extractedCount = 0;
|
|
4184
|
-
progress.message = `Extracting to ${targetFolder.replace(/\/$/, "")}...`;
|
|
4185
|
-
for (const [relativePath, zipEntry] of Object.entries(zip.files)) {
|
|
4186
|
-
if (zipEntry.dir) continue;
|
|
4187
|
-
const entryBlob = await zipEntry.async("blob");
|
|
4188
|
-
const fullPath = `${targetFolder}${relativePath}`;
|
|
4189
|
-
await (await workspaceDir.getResource(fullPath, { create: true })).saveContents(entryBlob, { contentType: FileContentType.BINARY });
|
|
4190
|
-
extractedCount++;
|
|
4191
|
-
progress.progress = Math.round(extractedCount / totalFiles * 100);
|
|
4192
|
-
progress.message = `Extracting ${extractedCount}/${totalFiles} files...`;
|
|
4193
|
-
}
|
|
4194
|
-
progress.progress = 100;
|
|
4195
|
-
toastInfo(`Archive extracted to ${targetFolder.replace(/\/$/, "")}: ${extractedCount} file(s)`);
|
|
4196
|
-
} catch (err) {
|
|
4197
|
-
toastError("Failed to extract archive: " + err);
|
|
4198
|
-
throw err;
|
|
4199
|
-
}
|
|
4200
|
-
});
|
|
4201
|
-
}
|
|
4202
|
-
}
|
|
4203
|
-
});
|
|
4204
|
-
//#endregion
|
|
4205
4138
|
//#region src/commands/wc.ts
|
|
4206
4139
|
registerAll({
|
|
4207
4140
|
command: {
|
|
@@ -4390,4 +4323,4 @@ function getFrameworkConfig() {
|
|
|
4390
4323
|
//#endregion
|
|
4391
4324
|
export { DocksStandardLayout as a, createLazyLabel as c, createJsRuntime as i, i18n as l, getFrameworkConfig as n, treeNodeComparator as o, runJavaScriptCode as r, editorRegistry as s, configureFramework as t };
|
|
4392
4325
|
|
|
4393
|
-
//# sourceMappingURL=api-
|
|
4326
|
+
//# sourceMappingURL=api-CRZ-pC4q.js.map
|