@phoundry/phials-plugin-sdk 1.0.0 → 1.0.1
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.
|
@@ -257,6 +257,14 @@ interface Command {
|
|
|
257
257
|
*/
|
|
258
258
|
children?: Command[];
|
|
259
259
|
|
|
260
|
+
/**
|
|
261
|
+
* Optional custom items for menu surfaces that present this command as a
|
|
262
|
+
* submenu. Semantic children remain available to the Command Bar.
|
|
263
|
+
*/
|
|
264
|
+
submenuItems?: (
|
|
265
|
+
ctx: CommandContext,
|
|
266
|
+
) => import("phoundry-ui").MenuItem[];
|
|
267
|
+
|
|
260
268
|
// ─── Custom Rendering ─────────────────────────────────────────────────────
|
|
261
269
|
|
|
262
270
|
/**
|
|
@@ -37,7 +37,7 @@ interface EventSubscription {
|
|
|
37
37
|
*/
|
|
38
38
|
type EventHandler<T = unknown> = (payload: T) => void | Promise<void>;
|
|
39
39
|
|
|
40
|
-
/** Details column layout live-sync payload
|
|
40
|
+
/** Details column layout live-sync payload. */
|
|
41
41
|
interface ColumnLayoutChangedPayload {
|
|
42
42
|
browsedPath: string;
|
|
43
43
|
savedViewsCount: number;
|
package/package.json
CHANGED
|
@@ -151,6 +151,12 @@ interface PreviewDestinationCapabilities {
|
|
|
151
151
|
embed?: boolean;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
+
/** Intrinsic content dimensions reported by a thumbnail provider. */
|
|
155
|
+
interface ThumbnailIntrinsicDimensions {
|
|
156
|
+
width: number;
|
|
157
|
+
height: number;
|
|
158
|
+
}
|
|
159
|
+
|
|
154
160
|
/**
|
|
155
161
|
* Props passed to thumbnail components
|
|
156
162
|
*/
|
|
@@ -160,6 +166,10 @@ interface ThumbnailProviderProps {
|
|
|
160
166
|
size: number;
|
|
161
167
|
generatedSize?: number;
|
|
162
168
|
quality?: number;
|
|
169
|
+
/** Report meaningful rendered dimensions to hosts that support ratio-aware layouts. */
|
|
170
|
+
onIntrinsicDimensions?: (
|
|
171
|
+
dimensions: ThumbnailIntrinsicDimensions,
|
|
172
|
+
) => void;
|
|
163
173
|
}
|
|
164
174
|
|
|
165
175
|
/**
|
|
@@ -492,7 +502,7 @@ interface FileBrowserViewProvider {
|
|
|
492
502
|
|
|
493
503
|
/**
|
|
494
504
|
* Default item size when a folder has no per-folder override (`itemSize` null).
|
|
495
|
-
* Details family uses row-height ticks; thumbnails / gallery use grid ticks;
|
|
505
|
+
* Details family uses row-height ticks; thumbnails / Masonry / gallery use grid ticks;
|
|
496
506
|
* Boards uses its column-width ticks.
|
|
497
507
|
*/
|
|
498
508
|
defaultItemSizePreset?: ViewItemSizePreset;
|
|
@@ -44,7 +44,7 @@ type PluginPathOutcome =
|
|
|
44
44
|
readonly path: string;
|
|
45
45
|
readonly status: "failed";
|
|
46
46
|
readonly failure: PluginFileFailure;
|
|
47
|
-
|
|
47
|
+
};
|
|
48
48
|
|
|
49
49
|
interface PluginDirectoryReadResult {
|
|
50
50
|
readonly entries: readonly FileEntry[];
|
|
@@ -61,7 +61,7 @@ type PluginBinaryWriteResult =
|
|
|
61
61
|
| {
|
|
62
62
|
readonly status: "conflict";
|
|
63
63
|
readonly actualRevision: string | null;
|
|
64
|
-
|
|
64
|
+
};
|
|
65
65
|
|
|
66
66
|
interface FolderSummary {
|
|
67
67
|
readonly path: string;
|
|
@@ -105,6 +105,7 @@ type WorkspaceFolderPropertyType =
|
|
|
105
105
|
| "text"
|
|
106
106
|
| "number"
|
|
107
107
|
| "date"
|
|
108
|
+
| "calendar"
|
|
108
109
|
| "boolean"
|
|
109
110
|
| "select"
|
|
110
111
|
| "multi-select"
|
|
@@ -117,6 +118,18 @@ type WorkspaceFolderPropertyType =
|
|
|
117
118
|
|
|
118
119
|
type WorkspaceFolderPropertyValue = JsonValue;
|
|
119
120
|
|
|
121
|
+
type WorkspaceFolderCalendarValue =
|
|
122
|
+
| {
|
|
123
|
+
readonly kind: "date";
|
|
124
|
+
readonly start: string;
|
|
125
|
+
readonly end?: string;
|
|
126
|
+
}
|
|
127
|
+
| {
|
|
128
|
+
readonly kind: "datetime";
|
|
129
|
+
readonly start: string;
|
|
130
|
+
readonly end?: string;
|
|
131
|
+
};
|
|
132
|
+
|
|
120
133
|
interface WorkspaceFolderPropertyOption {
|
|
121
134
|
readonly id: string;
|
|
122
135
|
readonly name: string;
|
|
@@ -159,9 +172,7 @@ interface WorkspaceFolderPropertyWrite {
|
|
|
159
172
|
|
|
160
173
|
interface WorkspaceFoldersAPI {
|
|
161
174
|
isWorkspaceFolder(path: string): Promise<boolean>;
|
|
162
|
-
getSchema(
|
|
163
|
-
workspaceFolderIdOrPath: string,
|
|
164
|
-
): Promise<WorkspaceFolderSchema>;
|
|
175
|
+
getSchema(workspaceFolderIdOrPath: string): Promise<WorkspaceFolderSchema>;
|
|
165
176
|
getPropertyValue(
|
|
166
177
|
file: WorkspaceFolderFileRef,
|
|
167
178
|
propertyId: string,
|
|
@@ -176,9 +187,22 @@ interface WorkspaceFoldersAPI {
|
|
|
176
187
|
values: readonly WorkspaceFolderPropertyWrite[],
|
|
177
188
|
): Promise<void>;
|
|
178
189
|
getTags(file: WorkspaceFolderFileRef): Promise<readonly string[]>;
|
|
179
|
-
setTags(
|
|
190
|
+
setTags(
|
|
191
|
+
file: WorkspaceFolderFileRef,
|
|
192
|
+
tags: readonly string[],
|
|
193
|
+
): Promise<void>;
|
|
180
194
|
getRating(file: WorkspaceFolderFileRef): Promise<number | null>;
|
|
181
|
-
setRating(
|
|
195
|
+
setRating(
|
|
196
|
+
file: WorkspaceFolderFileRef,
|
|
197
|
+
rating: number | null,
|
|
198
|
+
): Promise<void>;
|
|
199
|
+
getCalendar(
|
|
200
|
+
file: WorkspaceFolderFileRef,
|
|
201
|
+
): Promise<WorkspaceFolderCalendarValue | null>;
|
|
202
|
+
setCalendar(
|
|
203
|
+
file: WorkspaceFolderFileRef,
|
|
204
|
+
value: WorkspaceFolderCalendarValue | null,
|
|
205
|
+
): Promise<void>;
|
|
182
206
|
listKnown(): Promise<readonly KnownWorkspaceFolder[]>;
|
|
183
207
|
openPage(
|
|
184
208
|
file: WorkspaceFolderFileRef,
|
|
@@ -205,11 +229,7 @@ type PluginDatabaseValue = JsonPrimitive | Uint8Array;
|
|
|
205
229
|
interface PluginDatabaseSchemaOperations {
|
|
206
230
|
createTable(table: PluginTableDefinition): Promise<void>;
|
|
207
231
|
addColumn(table: string, column: PluginColumnDefinition): Promise<void>;
|
|
208
|
-
renameColumn(
|
|
209
|
-
table: string,
|
|
210
|
-
from: string,
|
|
211
|
-
to: string,
|
|
212
|
-
): Promise<void>;
|
|
232
|
+
renameColumn(table: string, from: string, to: string): Promise<void>;
|
|
213
233
|
dropColumn(table: string, column: string): Promise<void>;
|
|
214
234
|
createIndex(table: string, index: PluginIndexDefinition): Promise<void>;
|
|
215
235
|
dropIndex(table: string, index: string): Promise<void>;
|