@silo-code/sdk 0.21.0 → 0.22.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/editor-service.d.ts +135 -3
- package/dist/editor-service.d.ts.map +1 -1
- package/dist/event.d.ts +28 -0
- package/dist/event.d.ts.map +1 -0
- package/dist/event.js +2 -0
- package/dist/event.js.map +1 -0
- package/dist/file-service.d.ts +33 -2
- package/dist/file-service.d.ts.map +1 -1
- package/dist/index.d.ts +15 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/dist/network-service.d.ts +46 -2
- package/dist/network-service.d.ts.map +1 -1
- package/dist/path.d.ts +62 -0
- package/dist/path.d.ts.map +1 -0
- package/dist/path.js +150 -0
- package/dist/path.js.map +1 -0
- package/dist/process-service.d.ts +24 -4
- package/dist/process-service.d.ts.map +1 -1
- package/dist/processes-service.d.ts +1 -1
- package/dist/search-service.d.ts +11 -0
- package/dist/search-service.d.ts.map +1 -1
- package/dist/system-service.d.ts +2 -2
- package/dist/terminal-service.d.ts +37 -0
- package/dist/terminal-service.d.ts.map +1 -1
- package/dist/types.d.ts +12 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/workspace-service.d.ts +13 -0
- package/dist/workspace-service.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/editor-service.ts +141 -5
- package/src/event.ts +28 -0
- package/src/file-service.ts +33 -2
- package/src/index.ts +24 -5
- package/src/network-service.ts +51 -2
- package/src/path.test.ts +135 -0
- package/src/path.ts +188 -0
- package/src/process-service.ts +24 -4
- package/src/processes-service.ts +1 -1
- package/src/search-service.ts +11 -0
- package/src/system-service.ts +2 -2
- package/src/terminal-service.ts +40 -0
- package/src/types.ts +12 -5
- package/src/workspace-service.ts +13 -0
package/src/types.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The Silo extension API — types
|
|
2
|
+
* The Silo extension API — types-first contract plus a small set of blessed
|
|
3
|
+
* runtime helpers.
|
|
3
4
|
*
|
|
4
5
|
* Everything an extension author can see at compile time lives here (plus the
|
|
5
6
|
* service interfaces in the sibling `*-service` files, which this module
|
|
@@ -8,6 +9,12 @@
|
|
|
8
9
|
* never import the host. This is the VS Code (`vscode.d.ts`) / Obsidian
|
|
9
10
|
* (`obsidian-api`) model.
|
|
10
11
|
*
|
|
12
|
+
* **Runtime exports:** the SDK also ships a small set of blessed runtime
|
|
13
|
+
* helpers (`Tooltip`, `useFocusGroup`, `useServiceState`, `DND_MIME`,
|
|
14
|
+
* `PathDeniedError`, `NetworkError`) and peer-depends on React 19. Changes to
|
|
15
|
+
* these can be breaking even when the types are unchanged — treat them with
|
|
16
|
+
* the same care as the type surface.
|
|
17
|
+
*
|
|
11
18
|
* Start with {@link Extension} (the unit you export) and
|
|
12
19
|
* {@link ExtensionContext} (the `ctx` the host hands you).
|
|
13
20
|
*
|
|
@@ -207,10 +214,10 @@ export interface NewFileTemplate {
|
|
|
207
214
|
|
|
208
215
|
/**
|
|
209
216
|
* Declarative metadata about a file extension — the open-ended counterpart to
|
|
210
|
-
*
|
|
211
|
-
* surfaces (and, later, tab/explorer icons) can
|
|
212
|
-
* FileType does not register
|
|
213
|
-
* extension at dispatch time.
|
|
217
|
+
* {@link Editor} (which is purely a presenter/renderer). A single source of
|
|
218
|
+
* truth that "New File" surfaces (and, later, tab/explorer icons) can
|
|
219
|
+
* enumerate. Registering a FileType does not register an Editor; the two are
|
|
220
|
+
* matched independently by extension at dispatch time.
|
|
214
221
|
*
|
|
215
222
|
* @category Registration
|
|
216
223
|
* @public
|
package/src/workspace-service.ts
CHANGED
|
@@ -170,6 +170,12 @@ export interface WorkspaceService {
|
|
|
170
170
|
createFromFolderPicker(): Promise<Workspace | null>;
|
|
171
171
|
create(input: CreateWorkspaceInput): Workspace;
|
|
172
172
|
rename(id: string, name: string): void;
|
|
173
|
+
/**
|
|
174
|
+
* Move a workspace to a new position relative to a reference workspace.
|
|
175
|
+
* @param from - Id of the workspace being dragged / moved.
|
|
176
|
+
* @param to - Id of the reference workspace (the insertion anchor).
|
|
177
|
+
* @param position - Whether to place `from` before or after `to`.
|
|
178
|
+
*/
|
|
173
179
|
reorder(from: string, to: string, position: "before" | "after"): void;
|
|
174
180
|
/** Activate (and reopen if closed). */
|
|
175
181
|
activate(id: string): void;
|
|
@@ -263,6 +269,13 @@ export interface WorkspaceService {
|
|
|
263
269
|
*
|
|
264
270
|
* The Workspaces panel subscribes internally to re-render when providers
|
|
265
271
|
* are added or removed.
|
|
272
|
+
*
|
|
273
|
+
* **No `invalidateSection` by design.** Unlike status rows and badges, a
|
|
274
|
+
* section is a live React component that re-renders on its own internal or
|
|
275
|
+
* context-driven state changes — it is not a snapshot returned from a
|
|
276
|
+
* `provide()` call, so there is nothing for the host to re-query. If a
|
|
277
|
+
* section needs to trigger a full workspace-panel refresh (rare), it should
|
|
278
|
+
* update its own state directly.
|
|
266
279
|
*/
|
|
267
280
|
subscribeSection(listener: () => void): Disposable;
|
|
268
281
|
|