@pstdio/sdk 0.15.0 → 0.16.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.
- package/dist/api/extensions.d.ts +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +276 -161
- package/dist/extensions/index.d.ts +1 -1
- package/dist/extensions/index.js +29 -26
- package/dist/extensions/params.d.ts +3 -1
- package/dist/resources/index.js +276 -161
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type { CreateNotificationInput, ListNotificationsQuery, ListNotificationsResponse, Notification, NotificationAction, NotificationActionResult, NotificationActorType, NotificationKind, NotificationOrigin, NotificationPriority, NotificationStatus, UpdateNotificationInput, } from "pstdio-api-contracts";
|
|
2
2
|
export type * from "pstdio-api-contracts/extension-kernel";
|
|
3
3
|
export type { CommitPayload, ConflictPayload, MergePayload, RebasePayload, SessionLifecyclePayload, WorkspaceProvisionPayload, WorkspaceType, WorktreeRemovedPayload, } from "pstdio-api-contracts/extension-kernel";
|
|
4
|
-
export { ALWAYS_AVAILABLE_WEBVIEW_CAPABILITIES, EXTENSION_API_VERSION, getWorkbenchTargetDefinition, gitEvents, isLocalizedString, type Localizable, type LocalizedString, l10n, packageAsset, projectEvents, projectSlots, sessionEvents, sessionSlots, WEBVIEW_DECLARABLE_CAPABILITIES, WEBVIEW_HOST_CAPABILITIES, WEBVIEW_HOST_CAPABILITY_VERSION, type WorkbenchAttachmentTarget, type WorkbenchContributionKind, type WorkbenchLayoutTarget, type WorkbenchMenuTarget, type WorkbenchModeLayoutTarget, type WorkbenchSettingsScope, type WorkbenchSettingsTarget, type WorkbenchTargetDefinition, type WorkbenchTargetGranularity, type WorkbenchTreeTarget, type WorkbenchViewTarget, workbenchMenuTargets, workbenchModeLayoutTargets, workbenchSettingsScopes, workbenchSettingsTargets, workbenchTargets, workbenchTreeTargets, workbenchViewTargets, workspaceEvents, workspaceSlots, worktreeEvents, } from "pstdio-api-contracts/extension-kernel";
|
|
4
|
+
export { ALWAYS_AVAILABLE_WEBVIEW_CAPABILITIES, EXTENSION_API_VERSION, getWorkbenchModeLayoutTargetPanel, getWorkbenchTargetDefinition, gitEvents, isLocalizedString, type Localizable, type LocalizedString, l10n, packageAsset, projectEvents, projectSlots, sessionEvents, sessionSlots, WEBVIEW_DECLARABLE_CAPABILITIES, WEBVIEW_HOST_CAPABILITIES, WEBVIEW_HOST_CAPABILITY_VERSION, type WorkbenchAttachmentTarget, type WorkbenchContributionKind, type WorkbenchLayoutTarget, type WorkbenchMenuTarget, type WorkbenchModeLayoutTarget, type WorkbenchModePanel, type WorkbenchSettingsScope, type WorkbenchSettingsTarget, type WorkbenchTargetDefinition, type WorkbenchTargetGranularity, type WorkbenchTreeTarget, type WorkbenchViewTarget, workbenchMenuTargets, workbenchModeLayoutTargets, workbenchModePanels, workbenchSettingsScopes, workbenchSettingsTargets, workbenchTargets, workbenchTreeTargets, workbenchViewTargets, workspaceEvents, workspaceSlots, worktreeEvents, } from "pstdio-api-contracts/extension-kernel";
|
|
5
5
|
export { type CommandResponse, unwrapCommandOutcome } from "./command-outcome";
|
|
6
6
|
export { defineCommand, defineHook, defineMiddleware } from "./define-command";
|
|
7
7
|
export { defineExtension } from "./define-extension";
|
package/dist/extensions/index.js
CHANGED
|
@@ -28,7 +28,7 @@ var defineSlot = (id, options) => ({
|
|
|
28
28
|
|
|
29
29
|
// ../pstdio-api-contracts/src/extension-kernel/kernel-slots.ts
|
|
30
30
|
var projectSlots = {
|
|
31
|
-
|
|
31
|
+
sidenav: defineSlot("project.sidenav", { kind: "panel" }),
|
|
32
32
|
headerPrimary: defineSlot("project.headerPrimary", { kind: "menu" }),
|
|
33
33
|
headerOverflow: defineSlot("project.headerOverflow", { kind: "menu" }),
|
|
34
34
|
settingsPanels: defineSlot("project.settingsPanels", { kind: "settings" })
|
|
@@ -41,7 +41,7 @@ var sessionSlots = {
|
|
|
41
41
|
var workspaceSlots = {
|
|
42
42
|
headerPrimary: defineSlot("workspace.headerPrimary", { kind: "menu" }),
|
|
43
43
|
headerOverflow: defineSlot("workspace.headerOverflow", { kind: "menu" }),
|
|
44
|
-
|
|
44
|
+
sidenav: defineSlot("workspace.sidenav", { kind: "panel" })
|
|
45
45
|
};
|
|
46
46
|
var projectEvents = {
|
|
47
47
|
opened: eventRef("project.opened")
|
|
@@ -116,6 +116,20 @@ var workbenchTreeTargets = [
|
|
|
116
116
|
"workbench.main.left.tree",
|
|
117
117
|
"workbench.main.right.tree"
|
|
118
118
|
];
|
|
119
|
+
var workbenchRegions = [
|
|
120
|
+
"nav",
|
|
121
|
+
"activity",
|
|
122
|
+
"sidenav-header",
|
|
123
|
+
"sidenav",
|
|
124
|
+
"main-header",
|
|
125
|
+
"main",
|
|
126
|
+
"secondary-header",
|
|
127
|
+
"secondary",
|
|
128
|
+
"side-header",
|
|
129
|
+
"side",
|
|
130
|
+
"status",
|
|
131
|
+
"overlay"
|
|
132
|
+
];
|
|
119
133
|
var workbenchViewTargets = [
|
|
120
134
|
"workbench.main",
|
|
121
135
|
"workbench.main.left",
|
|
@@ -124,6 +138,7 @@ var workbenchViewTargets = [
|
|
|
124
138
|
];
|
|
125
139
|
var workbenchSettingsTargets = ["workbench.settings"];
|
|
126
140
|
var workbenchSettingsScopes = ["project", "global"];
|
|
141
|
+
var workbenchModePanels = ["main", "secondary", "side"];
|
|
127
142
|
var workbenchModeLayoutTargets = [
|
|
128
143
|
"workbench.left",
|
|
129
144
|
"workbench.main.left",
|
|
@@ -131,6 +146,14 @@ var workbenchModeLayoutTargets = [
|
|
|
131
146
|
"workbench.main.right",
|
|
132
147
|
"workbench.secondary"
|
|
133
148
|
];
|
|
149
|
+
var workbenchModeLayoutTargetPanels = {
|
|
150
|
+
"workbench.left": undefined,
|
|
151
|
+
"workbench.main.left": "main",
|
|
152
|
+
"workbench.main": "main",
|
|
153
|
+
"workbench.main.right": "main",
|
|
154
|
+
"workbench.secondary": "secondary"
|
|
155
|
+
};
|
|
156
|
+
var getWorkbenchModeLayoutTargetPanel = (target) => workbenchModeLayoutTargetPanels[target];
|
|
134
157
|
var workbenchTargets = [
|
|
135
158
|
{
|
|
136
159
|
id: "workbench.nav.actions",
|
|
@@ -162,30 +185,6 @@ var workbenchTargets = [
|
|
|
162
185
|
granularity: "areaTree",
|
|
163
186
|
rationale: "Tree entries for the active tree renderer mounted in the main-right area."
|
|
164
187
|
},
|
|
165
|
-
{
|
|
166
|
-
id: "workbench.main",
|
|
167
|
-
allowedKinds: ["view"],
|
|
168
|
-
granularity: "area",
|
|
169
|
-
rationale: "Direct extension view placement in the main area."
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
id: "workbench.main.left",
|
|
173
|
-
allowedKinds: ["view"],
|
|
174
|
-
granularity: "area",
|
|
175
|
-
rationale: "Direct extension view placement in the main-left area."
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
id: "workbench.main.right",
|
|
179
|
-
allowedKinds: ["view"],
|
|
180
|
-
granularity: "area",
|
|
181
|
-
rationale: "Direct extension view placement in the main-right area."
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
id: "workbench.secondary",
|
|
185
|
-
allowedKinds: ["view"],
|
|
186
|
-
granularity: "area",
|
|
187
|
-
rationale: "Direct extension view placement in the secondary area."
|
|
188
|
-
},
|
|
189
188
|
{
|
|
190
189
|
id: "workbench.settings",
|
|
191
190
|
allowedKinds: ["settings"],
|
|
@@ -276,6 +275,8 @@ var defineExtensionView = (definition) => ({
|
|
|
276
275
|
var params = {
|
|
277
276
|
text: (options) => ({ type: "text", ...options }),
|
|
278
277
|
longText: (options) => ({ type: "longtext", ...options }),
|
|
278
|
+
markdown: (options) => ({ type: "markdown", ...options }),
|
|
279
|
+
files: (options) => ({ type: "files", ...options }),
|
|
279
280
|
number: (options) => ({ type: "number", ...options }),
|
|
280
281
|
boolean: (options) => ({ type: "boolean", ...options }),
|
|
281
282
|
select: (options) => ({ type: "select", ...options }),
|
|
@@ -398,6 +399,7 @@ export {
|
|
|
398
399
|
workbenchTargets,
|
|
399
400
|
workbenchSettingsTargets,
|
|
400
401
|
workbenchSettingsScopes,
|
|
402
|
+
workbenchModePanels,
|
|
401
403
|
workbenchModeLayoutTargets,
|
|
402
404
|
workbenchMenuTargets,
|
|
403
405
|
unwrapCommandOutcome,
|
|
@@ -412,6 +414,7 @@ export {
|
|
|
412
414
|
isLocalizedString,
|
|
413
415
|
gitEvents,
|
|
414
416
|
getWorkbenchTargetDefinition,
|
|
417
|
+
getWorkbenchModeLayoutTargetPanel,
|
|
415
418
|
eventRef,
|
|
416
419
|
defineMiddleware,
|
|
417
420
|
defineHook,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BooleanParam, HarnessParam, JsonParam, ListParam, LongTextParam, MultiSelectParam, NumberParam, RepoParam, ResourceParam, SelectParam, TemplateParam, TextParam } from "pstdio-api-contracts/extension-kernel";
|
|
1
|
+
import type { BooleanParam, FilesParam, HarnessParam, JsonParam, ListParam, LongTextParam, MarkdownParam, MultiSelectParam, NumberParam, RepoParam, ResourceParam, SelectParam, TemplateParam, TextParam } from "pstdio-api-contracts/extension-kernel";
|
|
2
2
|
type RequiredOf<TOptions> = TOptions extends {
|
|
3
3
|
required: infer TRequired extends boolean;
|
|
4
4
|
} ? TRequired : undefined;
|
|
@@ -18,6 +18,8 @@ type ParamOptions<TParam extends {
|
|
|
18
18
|
export declare const params: {
|
|
19
19
|
text: <const TOptions extends ParamOptions<TextParam> | undefined = undefined>(options?: TOptions) => TextParam<RequiredOf<TOptions>>;
|
|
20
20
|
longText: <const TOptions extends ParamOptions<LongTextParam> | undefined = undefined>(options?: TOptions) => LongTextParam<RequiredOf<TOptions>>;
|
|
21
|
+
markdown: <const TOptions extends ParamOptions<MarkdownParam> | undefined = undefined>(options?: TOptions) => MarkdownParam<RequiredOf<TOptions>>;
|
|
22
|
+
files: <const TOptions extends ParamOptions<FilesParam> | undefined = undefined>(options?: TOptions) => FilesParam<RequiredOf<TOptions>>;
|
|
21
23
|
number: <const TOptions extends ParamOptions<NumberParam> | undefined = undefined>(options?: TOptions) => NumberParam<RequiredOf<TOptions>>;
|
|
22
24
|
boolean: <const TOptions extends ParamOptions<BooleanParam> | undefined = undefined>(options?: TOptions) => BooleanParam<RequiredOf<TOptions>>;
|
|
23
25
|
select: <const TOptions extends ParamOptions<SelectParam>>(options: TOptions) => SelectParam<RequiredOf<TOptions>>;
|