@outl/plugin-sdk 0.12.0-beta.163 → 0.12.0-beta.165
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/package.json +1 -1
- package/src/index.ts +9 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outl/plugin-sdk",
|
|
3
|
-
"version": "0.12.0-beta.
|
|
3
|
+
"version": "0.12.0-beta.165",
|
|
4
4
|
"description": "TypeScript SDK for authoring outl plugins. Types-only contract — the host implementation is injected by the outl runtime (Boa/Rust) at load time.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://outl.app/docs/query#plugin-sdk-api-outlquery",
|
package/src/index.ts
CHANGED
|
@@ -35,8 +35,14 @@ export type BlockId = string;
|
|
|
35
35
|
*/
|
|
36
36
|
export type PageSlug = string;
|
|
37
37
|
|
|
38
|
-
/**
|
|
39
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Task state of a block, when it has one.
|
|
40
|
+
*
|
|
41
|
+
* Mirrors `outl_actions::TodoState`. A plugin that only branches on
|
|
42
|
+
* `"TODO"` and `"DONE"` silently drops every started block, so treat
|
|
43
|
+
* a state you don't handle as "not finished" rather than "not a task".
|
|
44
|
+
*/
|
|
45
|
+
export type TodoState = "TODO" | "DOING" | "DONE";
|
|
40
46
|
|
|
41
47
|
/**
|
|
42
48
|
* A single materialized block, as the host hands it to a plugin.
|
|
@@ -193,7 +199,7 @@ export interface BlocksApi {
|
|
|
193
199
|
createAfter(after: BlockId, text: string): Promise<void>;
|
|
194
200
|
/** Move a block to a new page (`{ toPage }`) or under another block (`{ toParent }`). */
|
|
195
201
|
move(id: BlockId, target: MoveTarget): Promise<void>;
|
|
196
|
-
/** Cycle a block's
|
|
202
|
+
/** Cycle a block's task state (None → TODO → DOING → DONE → None). */
|
|
197
203
|
toggleTodo(id: BlockId): Promise<void>;
|
|
198
204
|
/** Delete a block (moved to trash; the op stays in the log). */
|
|
199
205
|
delete(id: BlockId): Promise<void>;
|