@kitionstage/sdk 0.0.0-stage → 0.5.2-stage.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.
- package/README.md +69 -2
- package/dist/LICENSE +177 -0
- package/dist/THIRD_PARTY_NOTICES +28 -0
- package/dist/lib/assets/kitEngine.worker-9haDiVHZ.js +13220 -0
- package/dist/lib/chunks/batch-BWpAyHvP.js +789 -0
- package/dist/lib/chunks/canonical-BIWfVCL-.js +87 -0
- package/dist/lib/chunks/envelope-D6MGY-ZN.js +61 -0
- package/dist/lib/chunks/replica-D8w3I4sn.js +2472 -0
- package/dist/lib/chunks/runtime-BVJHE1Pg.js +997 -0
- package/dist/lib/chunks/session-BqXC9a1-.js +281 -0
- package/dist/lib/chunks/toolIds-BCeSGHpV.js +821 -0
- package/dist/lib/chunks/workspaceTree-Destqupf.js +23 -0
- package/dist/lib/convergence/index.js +1035 -0
- package/dist/lib/convergence/node.js +8 -0
- package/dist/lib/embed-server/callbacks.js +37 -0
- package/dist/lib/embed-server/cli.js +19 -0
- package/dist/lib/embed-server/index.js +272 -0
- package/dist/lib/extensions/index.js +439 -0
- package/dist/lib/extensions/panel.html +208 -0
- package/dist/lib/extensions/runtime.js +198 -0
- package/dist/lib/extensions/sandbox.html +35 -0
- package/dist/lib/kdm/index.js +437 -0
- package/dist/lib/kit-dev-host/checkUiIds.mjs +44 -0
- package/dist/lib/kit-dev-host/index.js +308 -0
- package/dist/lib/kit-dev-host/lineRow.mjs +47 -0
- package/dist/lib/kit-dev-host/modeSmoke.mjs +178 -0
- package/dist/lib/kit-editor/index.js +6489 -0
- package/dist/lib/kit-editor/styles.css +807 -0
- package/dist/lib/kit-editor/workspaceTree.js +1 -0
- package/dist/lib/kit-engine/index.js +7 -0
- package/dist/lib/kit-host/index.js +530 -0
- package/dist/lib/kit-ui-protocol/index.js +336 -0
- package/dist/lib/node-only/embed-server-callbacks.js +2 -0
- package/dist/lib/node-only/embed-server.js +2 -0
- package/dist/lib/sync/index.js +1008 -0
- package/dist/lib/sync/openToken.js +201 -0
- package/dist/lib/sync/replicaVersions.js +51 -0
- package/dist/standalone/chunks/batch-CAGYk6m4.js +789 -0
- package/dist/standalone/chunks/client-B9xkOcvf.js +772 -0
- package/dist/standalone/chunks/collab-B5TbpTyO.js +1022 -0
- package/dist/standalone/chunks/comment-Ds9t8xSE.js +94 -0
- package/dist/standalone/chunks/comments-uVDS8Wxp.js +41 -0
- package/dist/standalone/chunks/document-CuIGSDsY.js +324 -0
- package/dist/standalone/chunks/envelope-GX4Cynkx.js +7612 -0
- package/dist/standalone/chunks/index-BEgEEnhU.js +287 -0
- package/dist/standalone/chunks/index-Blc_B6iX.js +1967 -0
- package/dist/standalone/chunks/kits-Cp51mDlw.js +9 -0
- package/dist/standalone/chunks/replica-Di2iCPiD.js +3281 -0
- package/dist/standalone/chunks/replicaVersions-C3rJxnk9.js +50 -0
- package/dist/standalone/chunks/touched-T9jKJjxn.js +78 -0
- package/dist/standalone/index.js +12 -0
- package/dist/standalone/script/index.js +339 -0
- package/dist/standalone/script/kits/board.js +5 -0
- package/dist/standalone/script/kits/cad.js +5 -0
- package/dist/standalone/script/kits/design.js +5 -0
- package/dist/standalone/script/kits/doc.js +5 -0
- package/dist/standalone/script/kits/film.js +5 -0
- package/dist/standalone/script/kits/html.js +5 -0
- package/dist/standalone/script/kits/index.js +38 -0
- package/dist/standalone/script/kits/layout.js +5 -0
- package/dist/standalone/script/kits/motion.js +5 -0
- package/dist/standalone/script/kits/note.js +5 -0
- package/dist/standalone/script/kits/pdf.js +5 -0
- package/dist/standalone/script/kits/photo.js +5 -0
- package/dist/standalone/script/kits/scene.js +5 -0
- package/dist/standalone/script/kits/sheet.js +5 -0
- package/dist/standalone/script/kits/slide.js +5 -0
- package/dist/standalone/script/kits/table.js +5 -0
- package/dist/standalone/script/kits/vector.js +5 -0
- package/dist/standalone/script/node.js +401 -0
- package/dist/standalone/script/proxy.js +254 -0
- package/dist/types/convergence/src/adapter.d.ts +131 -0
- package/dist/types/convergence/src/engine.d.ts +66 -0
- package/dist/types/convergence/src/index.d.ts +21 -0
- package/dist/types/convergence/src/net.d.ts +52 -0
- package/dist/types/convergence/src/node.d.ts +6 -0
- package/dist/types/convergence/src/report.d.ts +56 -0
- package/dist/types/convergence/src/rng.d.ts +12 -0
- package/dist/types/convergence/src/scenarios.d.ts +15 -0
- package/dist/types/convergence/src/state.d.ts +67 -0
- package/dist/types/embed/src/agent.d.ts +88 -0
- package/dist/types/embed/src/blobs.d.ts +2 -0
- package/dist/types/embed/src/collab.d.ts +250 -0
- package/dist/types/embed/src/comments.d.ts +30 -0
- package/dist/types/embed/src/errors.d.ts +24 -0
- package/dist/types/embed/src/handlers.d.ts +92 -0
- package/dist/types/embed/src/index.d.ts +20 -0
- package/dist/types/embed/src/mount.d.ts +39 -0
- package/dist/types/embed/src/replicaStore.d.ts +3 -0
- package/dist/types/embed/src/rooms.d.ts +40 -0
- package/dist/types/embed/src/schemas.d.ts +7 -0
- package/dist/types/embed/src/syncClients.d.ts +28 -0
- package/dist/types/embed/src/theme.d.ts +7 -0
- package/dist/types/embed/src/types.d.ts +596 -0
- package/dist/types/embed/src/ui.d.ts +33 -0
- package/dist/types/embed/src/version.d.ts +2 -0
- package/dist/types/embed-server/src/callbacks.d.ts +30 -0
- package/dist/types/embed-server/src/cli.d.ts +1 -0
- package/dist/types/embed-server/src/index.d.ts +19 -0
- package/dist/types/embed-server/src/page.d.ts +15 -0
- package/dist/types/embed-server/src/server.d.ts +39 -0
- package/dist/types/embed-server/src/session.d.ts +22 -0
- package/dist/types/extensions/src/gate.d.ts +17 -0
- package/dist/types/extensions/src/generated/runtime.d.ts +8 -0
- package/dist/types/extensions/src/host.d.ts +135 -0
- package/dist/types/extensions/src/index.d.ts +13 -0
- package/dist/types/extensions/src/manifest.d.ts +82 -0
- package/dist/types/extensions/src/protocol.d.ts +159 -0
- package/dist/types/extensions/src/rpc.d.ts +52 -0
- package/dist/types/extensions/src/runtime/document.d.ts +40 -0
- package/dist/types/extensions/src/runtime/index.d.ts +10 -0
- package/dist/types/extensions/src/runtime/panel.d.ts +19 -0
- package/dist/types/extensions/src/runtime/runtime.d.ts +54 -0
- package/dist/types/extensions/src/runtime/worker.d.ts +1 -0
- package/dist/types/extensions/src/sandbox.d.ts +41 -0
- package/dist/types/kdm/src/args.d.ts +12 -0
- package/dist/types/kdm/src/batch.d.ts +118 -0
- package/dist/types/kdm/src/canonical.d.ts +25 -0
- package/dist/types/kdm/src/comment.d.ts +114 -0
- package/dist/types/kdm/src/diff.d.ts +125 -0
- package/dist/types/kdm/src/envelope.d.ts +27 -0
- package/dist/types/kdm/src/errors.d.ts +28 -0
- package/dist/types/kdm/src/footprint.d.ts +21 -0
- package/dist/types/kdm/src/ids.d.ts +57 -0
- package/dist/types/kdm/src/index.d.ts +18 -0
- package/dist/types/kdm/src/marks.d.ts +32 -0
- package/dist/types/kdm/src/op.d.ts +124 -0
- package/dist/types/kdm/src/origin.d.ts +41 -0
- package/dist/types/kdm/src/overlay.d.ts +92 -0
- package/dist/types/kdm/src/projection.d.ts +29 -0
- package/dist/types/kdm/src/read.d.ts +90 -0
- package/dist/types/kdm/src/replica.d.ts +403 -0
- package/dist/types/kdm/src/schema.d.ts +185 -0
- package/dist/types/kdm/src/testing.d.ts +28 -0
- package/dist/types/kdm/src/toolIds.d.ts +61 -0
- package/dist/types/kdm/src/touched.d.ts +24 -0
- package/dist/types/kdm/src/tx.d.ts +215 -0
- package/dist/types/kdm/src/value.d.ts +23 -0
- package/dist/types/kit-dev-host/src/checkNoPaths.d.ts +19 -0
- package/dist/types/kit-dev-host/src/checkUiIds.d.mts +2 -0
- package/dist/types/kit-dev-host/src/index.d.ts +179 -0
- package/dist/types/kit-dev-host/src/lineRow.d.mts +14 -0
- package/dist/types/kit-dev-host/src/memoryFiles.d.ts +15 -0
- package/dist/types/kit-dev-host/src/modeSmoke.d.mts +8 -0
- package/dist/types/kit-editor/src/CommandDialog.d.ts +22 -0
- package/dist/types/kit-editor/src/CommentsPanel.d.ts +45 -0
- package/dist/types/kit-editor/src/CustomizeDialog.d.ts +32 -0
- package/dist/types/kit-editor/src/HostButtons.d.ts +11 -0
- package/dist/types/kit-editor/src/RenderFailure.d.ts +7 -0
- package/dist/types/kit-editor/src/TextSink.d.ts +6 -0
- package/dist/types/kit-editor/src/brand.d.ts +2 -0
- package/dist/types/kit-editor/src/catalogMenus.d.ts +27 -0
- package/dist/types/kit-editor/src/chart.d.ts +138 -0
- package/dist/types/kit-editor/src/conflicts.d.ts +12 -0
- package/dist/types/kit-editor/src/drawing.d.ts +83 -0
- package/dist/types/kit-editor/src/editor.d.ts +544 -0
- package/dist/types/kit-editor/src/engine/KitCanvas.d.ts +70 -0
- package/dist/types/kit-editor/src/engine/backdrop.d.ts +32 -0
- package/dist/types/kit-editor/src/engine/createKitFile.d.ts +12 -0
- package/dist/types/kit-editor/src/engine/decorations.d.ts +14 -0
- package/dist/types/kit-editor/src/engine/engineOverlays.d.ts +197 -0
- package/dist/types/kit-editor/src/engine/engineTools.d.ts +116 -0
- package/dist/types/kit-editor/src/engine/kitDraft.d.ts +70 -0
- package/dist/types/kit-editor/src/engine/kitEngine.d.ts +390 -0
- package/dist/types/kit-editor/src/engine/kitEngine.worker.d.ts +30 -0
- package/dist/types/kit-editor/src/engine/kitHost.d.ts +41 -0
- package/dist/types/kit-editor/src/engine/kitModel.d.ts +32 -0
- package/dist/types/kit-editor/src/engine/kitModelRunner.d.ts +99 -0
- package/dist/types/kit-editor/src/engine/kitModule.d.ts +185 -0
- package/dist/types/kit-editor/src/engine/kitShortcuts.d.ts +32 -0
- package/dist/types/kit-editor/src/engine/kitTools.d.ts +79 -0
- package/dist/types/kit-editor/src/engine/lazyFonts.d.ts +34 -0
- package/dist/types/kit-editor/src/engine/lentFiles.d.ts +29 -0
- package/dist/types/kit-editor/src/engine/rasterViewport.d.ts +178 -0
- package/dist/types/kit-editor/src/engine/readOnly.d.ts +78 -0
- package/dist/types/kit-editor/src/engine/refusal.d.ts +39 -0
- package/dist/types/kit-editor/src/engine/replica.d.ts +23 -0
- package/dist/types/kit-editor/src/engine/useKitDocument.d.ts +154 -0
- package/dist/types/kit-editor/src/engine/workerRelay.d.ts +62 -0
- package/dist/types/kit-editor/src/files.d.ts +74 -0
- package/dist/types/kit-editor/src/frame/EditorFrame.d.ts +74 -0
- package/dist/types/kit-editor/src/frame/FocusBar.d.ts +10 -0
- package/dist/types/kit-editor/src/frame/MenuNodes.d.ts +20 -0
- package/dist/types/kit-editor/src/frame/MenuRibbon.d.ts +8 -0
- package/dist/types/kit-editor/src/frame/ModeButton.d.ts +7 -0
- package/dist/types/kit-editor/src/frame/menus.d.ts +64 -0
- package/dist/types/kit-editor/src/frame/modes.d.ts +51 -0
- package/dist/types/kit-editor/src/frame/useFrameLayout.d.ts +34 -0
- package/dist/types/kit-editor/src/host.d.ts +127 -0
- package/dist/types/kit-editor/src/index.d.ts +85 -0
- package/dist/types/kit-editor/src/ink.d.ts +26 -0
- package/dist/types/kit-editor/src/lease.d.ts +53 -0
- package/dist/types/kit-editor/src/oneInFlight.d.ts +7 -0
- package/dist/types/kit-editor/src/phrases.d.ts +25 -0
- package/dist/types/kit-editor/src/presence.d.ts +79 -0
- package/dist/types/kit-editor/src/strings.d.ts +6 -0
- package/dist/types/kit-editor/src/toolIcons.d.ts +32 -0
- package/dist/types/kit-editor/src/uiCatalog.d.ts +59 -0
- package/dist/types/kit-editor/src/uiConfig.d.ts +53 -0
- package/dist/types/kit-editor/src/uiContext.d.ts +65 -0
- package/dist/types/kit-editor/src/uiStore.d.ts +20 -0
- package/dist/types/kit-editor/src/useCommentAnchors.d.ts +29 -0
- package/dist/types/kit-editor/src/useKitSession.d.ts +115 -0
- package/dist/types/kit-editor/src/workspaceTree.d.ts +5 -0
- package/dist/types/kit-engine/src/contract.d.ts +154 -0
- package/dist/types/kit-engine/src/index.d.ts +2 -0
- package/dist/types/kit-engine/src/session.d.ts +133 -0
- package/dist/types/kit-host/src/files.d.ts +163 -0
- package/dist/types/kit-host/src/index.d.ts +315 -0
- package/dist/types/kit-ui-protocol/src/index.d.ts +1145 -0
- package/dist/types/loro-crdt.d.ts +9 -0
- package/dist/types/script/kits/board.d.ts +534 -0
- package/dist/types/script/kits/cad.d.ts +2937 -0
- package/dist/types/script/kits/design.d.ts +3213 -0
- package/dist/types/script/kits/doc.d.ts +2575 -0
- package/dist/types/script/kits/film.d.ts +4067 -0
- package/dist/types/script/kits/html.d.ts +38 -0
- package/dist/types/script/kits/index.d.ts +20 -0
- package/dist/types/script/kits/layout.d.ts +3483 -0
- package/dist/types/script/kits/motion.d.ts +4826 -0
- package/dist/types/script/kits/note.d.ts +631 -0
- package/dist/types/script/kits/pdf.d.ts +829 -0
- package/dist/types/script/kits/photo.d.ts +7574 -0
- package/dist/types/script/kits/scene.d.ts +2962 -0
- package/dist/types/script/kits/sheet.d.ts +2419 -0
- package/dist/types/script/kits/slide.d.ts +1894 -0
- package/dist/types/script/kits/table.d.ts +654 -0
- package/dist/types/script/kits/vector.d.ts +5167 -0
- package/dist/types/script/src/agentRelay.d.ts +48 -0
- package/dist/types/script/src/capabilities.d.ts +21 -0
- package/dist/types/script/src/document.d.ts +87 -0
- package/dist/types/script/src/drafts.d.ts +141 -0
- package/dist/types/script/src/exchange.d.ts +30 -0
- package/dist/types/script/src/headless.d.ts +190 -0
- package/dist/types/script/src/index.d.ts +15 -0
- package/dist/types/script/src/kitModel.d.ts +17 -0
- package/dist/types/script/src/kits.d.ts +8 -0
- package/dist/types/script/src/node.d.ts +42 -0
- package/dist/types/script/src/port.d.ts +89 -0
- package/dist/types/script/src/proxy.d.ts +132 -0
- package/dist/types/script/src/room.d.ts +162 -0
- package/dist/types/script/src/sources.d.ts +73 -0
- package/dist/types/sync/src/backoff.d.ts +9 -0
- package/dist/types/sync/src/blobSection.d.ts +23 -0
- package/dist/types/sync/src/capabilities.d.ts +20 -0
- package/dist/types/sync/src/client.d.ts +253 -0
- package/dist/types/sync/src/framing.d.ts +35 -0
- package/dist/types/sync/src/hash.d.ts +2 -0
- package/dist/types/sync/src/index.d.ts +19 -0
- package/dist/types/sync/src/leases.d.ts +82 -0
- package/dist/types/sync/src/openToken.d.ts +104 -0
- package/dist/types/sync/src/protocol.d.ts +484 -0
- package/dist/types/sync/src/relay.d.ts +52 -0
- package/dist/types/sync/src/replicaVersions.d.ts +17 -0
- package/dist/types/sync/src/saveMachine.d.ts +83 -0
- package/dist/types/sync/src/saveRun.d.ts +52 -0
- package/dist/types/sync/src/transport.d.ts +19 -0
- package/package.json +229 -4
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** The Loro (loro-crdt) types these declarations name, without Loro's own declarations. */
|
|
2
|
+
export declare class LoroDoc {}
|
|
3
|
+
export declare class LoroMap {}
|
|
4
|
+
export declare class LoroMovableList {}
|
|
5
|
+
export declare class LoroText {}
|
|
6
|
+
export declare class LoroTree {}
|
|
7
|
+
export declare class LoroTreeNode {}
|
|
8
|
+
export type TreeID = `${number}@${number}`
|
|
9
|
+
export declare class VersionVector {}
|
|
@@ -0,0 +1,534 @@
|
|
|
1
|
+
import type { CommandMap, ModelDocument, ModelList, ModelObject, ModelText, RequestContext } from '../src/index.js';
|
|
2
|
+
import { type KitDescriptor } from '../src/kits.js';
|
|
3
|
+
type Json = null | boolean | number | string | Json[] | {
|
|
4
|
+
[key: string]: Json;
|
|
5
|
+
};
|
|
6
|
+
type BlobRef = {
|
|
7
|
+
hash: string;
|
|
8
|
+
mime: string;
|
|
9
|
+
size: number;
|
|
10
|
+
};
|
|
11
|
+
/** kit.board: registered with @kition/script when this module loads. */
|
|
12
|
+
export declare const boardKit: KitDescriptor;
|
|
13
|
+
/** The fields a new `Board` takes (`list.add(fields)`). */
|
|
14
|
+
export type BoardFields = {
|
|
15
|
+
title: string;
|
|
16
|
+
size?: Json | null;
|
|
17
|
+
};
|
|
18
|
+
/** A `Board` of kit.board. */
|
|
19
|
+
export interface Board extends ModelObject {
|
|
20
|
+
title: string;
|
|
21
|
+
size: Json | null;
|
|
22
|
+
readonly pages: ModelList<Page, PageFields>;
|
|
23
|
+
}
|
|
24
|
+
/** The fields a new `Page` takes (`list.add(fields)`). */
|
|
25
|
+
export type PageFields = {
|
|
26
|
+
name: string;
|
|
27
|
+
};
|
|
28
|
+
/** A `Page` of kit.board. */
|
|
29
|
+
export interface Page extends ModelObject {
|
|
30
|
+
name: string;
|
|
31
|
+
readonly elements: ModelList<Element, ElementFields>;
|
|
32
|
+
}
|
|
33
|
+
/** The fields a new `Element` takes (`list.add(fields)`). */
|
|
34
|
+
export type ElementFields = {
|
|
35
|
+
position?: Json | null;
|
|
36
|
+
size?: Json | null;
|
|
37
|
+
rotation?: number | null;
|
|
38
|
+
locked?: boolean | null;
|
|
39
|
+
parent?: string | ModelObject | null;
|
|
40
|
+
key?: string | null;
|
|
41
|
+
shapeType?: string | null;
|
|
42
|
+
shapeStyle?: string | null;
|
|
43
|
+
strokeColor?: string | null;
|
|
44
|
+
fillColor?: string | null;
|
|
45
|
+
fillStyle?: string | null;
|
|
46
|
+
dashStyle?: string | null;
|
|
47
|
+
strokeSize?: string | null;
|
|
48
|
+
opacity?: number | null;
|
|
49
|
+
roundness?: number | null;
|
|
50
|
+
textFormat?: "plain" | "markdown" | null;
|
|
51
|
+
fontSize?: number | null;
|
|
52
|
+
fontFamily?: "sans" | "serif" | "mono" | null;
|
|
53
|
+
textAlign?: "left" | "center" | "right" | null;
|
|
54
|
+
points?: Json | null;
|
|
55
|
+
start?: Json | null;
|
|
56
|
+
end?: Json | null;
|
|
57
|
+
waypoints?: Json | null;
|
|
58
|
+
labelPosition?: number | null;
|
|
59
|
+
connectorType?: string | null;
|
|
60
|
+
startArrowhead?: string | null;
|
|
61
|
+
endArrowhead?: string | null;
|
|
62
|
+
connectorRole?: string | null;
|
|
63
|
+
mindMapBranchAxis?: string | null;
|
|
64
|
+
mindMapBranchSide?: string | null;
|
|
65
|
+
mindMapDirection?: string | null;
|
|
66
|
+
mindMapCollapsed?: boolean | null;
|
|
67
|
+
image?: BlobRef | null;
|
|
68
|
+
alt?: string | null;
|
|
69
|
+
card?: Json | null;
|
|
70
|
+
sourceRefIds?: Json | null;
|
|
71
|
+
};
|
|
72
|
+
/** A `Element` of kit.board. */
|
|
73
|
+
export interface Element extends ModelObject {
|
|
74
|
+
/** Read-only: the kit keeps it as it is. */
|
|
75
|
+
readonly kind: "shape" | "text" | "stroke" | "connector" | "image" | "card" | "frame" | "group";
|
|
76
|
+
position: Json | null;
|
|
77
|
+
size: Json | null;
|
|
78
|
+
rotation: number | null;
|
|
79
|
+
locked: boolean | null;
|
|
80
|
+
/** The id of a `Element`. */
|
|
81
|
+
get parent(): string | null;
|
|
82
|
+
set parent(value: Element | string | null);
|
|
83
|
+
key: string | null;
|
|
84
|
+
shapeType: string | null;
|
|
85
|
+
shapeStyle: string | null;
|
|
86
|
+
strokeColor: string | null;
|
|
87
|
+
fillColor: string | null;
|
|
88
|
+
fillStyle: string | null;
|
|
89
|
+
dashStyle: string | null;
|
|
90
|
+
strokeSize: string | null;
|
|
91
|
+
opacity: number | null;
|
|
92
|
+
roundness: number | null;
|
|
93
|
+
get text(): ModelText;
|
|
94
|
+
set text(value: string);
|
|
95
|
+
textFormat: "plain" | "markdown" | null;
|
|
96
|
+
fontSize: number | null;
|
|
97
|
+
fontFamily: "sans" | "serif" | "mono" | null;
|
|
98
|
+
textAlign: "left" | "center" | "right" | null;
|
|
99
|
+
points: Json | null;
|
|
100
|
+
start: Json | null;
|
|
101
|
+
end: Json | null;
|
|
102
|
+
waypoints: Json | null;
|
|
103
|
+
labelPosition: number | null;
|
|
104
|
+
connectorType: string | null;
|
|
105
|
+
startArrowhead: string | null;
|
|
106
|
+
endArrowhead: string | null;
|
|
107
|
+
connectorRole: string | null;
|
|
108
|
+
mindMapBranchAxis: string | null;
|
|
109
|
+
mindMapBranchSide: string | null;
|
|
110
|
+
mindMapDirection: string | null;
|
|
111
|
+
mindMapCollapsed: boolean | null;
|
|
112
|
+
image: BlobRef | null;
|
|
113
|
+
alt: string | null;
|
|
114
|
+
card: Json | null;
|
|
115
|
+
sourceRefIds: Json | null;
|
|
116
|
+
}
|
|
117
|
+
/** The fields a new `CommentThread` takes (`list.add(fields)`). */
|
|
118
|
+
export type CommentThreadFields = {
|
|
119
|
+
anchor: Json;
|
|
120
|
+
resolved?: boolean | null;
|
|
121
|
+
};
|
|
122
|
+
/** A `CommentThread` of kit.board. */
|
|
123
|
+
export interface CommentThread extends ModelObject {
|
|
124
|
+
anchor: Json;
|
|
125
|
+
resolved: boolean | null;
|
|
126
|
+
readonly comments: ModelList<Comment, CommentFields>;
|
|
127
|
+
}
|
|
128
|
+
/** The fields a new `Comment` takes (`list.add(fields)`). */
|
|
129
|
+
export type CommentFields = {
|
|
130
|
+
author: string;
|
|
131
|
+
name?: string | null;
|
|
132
|
+
created: string;
|
|
133
|
+
};
|
|
134
|
+
/** A `Comment` of kit.board. */
|
|
135
|
+
export interface Comment extends ModelObject {
|
|
136
|
+
author: string;
|
|
137
|
+
name: string | null;
|
|
138
|
+
get body(): ModelText;
|
|
139
|
+
set body(value: string);
|
|
140
|
+
created: string;
|
|
141
|
+
}
|
|
142
|
+
/** Every command of kit.board, by id, with its parameters. */
|
|
143
|
+
export interface BoardCommands extends CommandMap {
|
|
144
|
+
/** Undo. Takes back the last step of one scope: the person's or the agent's (by default the caller's own), leaving the other scope's later steps in place. Changes the document. */
|
|
145
|
+
"edit.undo": {
|
|
146
|
+
scope?: "person" | "agent";
|
|
147
|
+
};
|
|
148
|
+
/** Redo. Puts back the last undone step of one scope (by default the caller's own); a new edit in that scope clears what can be redone. Changes the document. */
|
|
149
|
+
"edit.redo": {
|
|
150
|
+
scope?: "person" | "agent";
|
|
151
|
+
};
|
|
152
|
+
/** Duplicate. Copies the elements (with what is inside frames and groups) on the same page, offset by 24 units unless offset says otherwise; answers the copies' ids. Acts on `ids`. Changes the document. */
|
|
153
|
+
"element.duplicate": {
|
|
154
|
+
ids: Array<string>; /** [dx, dy] of the copies (24, 24 by default) */
|
|
155
|
+
offset?: Json;
|
|
156
|
+
};
|
|
157
|
+
/** Delete. Removes the elements and everything inside frames and groups among them; connectors attached to them lose that end's binding. Acts on `ids`. Changes the document. */
|
|
158
|
+
"element.delete": {
|
|
159
|
+
ids: Array<string>;
|
|
160
|
+
};
|
|
161
|
+
/** Copy. Reads the elements into a board clipboard payload without changing the board; pass the payload to element.paste to place copies on any page. Acts on `ids`. */
|
|
162
|
+
"clipboard.copy": {
|
|
163
|
+
ids: Array<string>;
|
|
164
|
+
};
|
|
165
|
+
/** Paste. Places copies of a clipboard.copy payload on a page, at `at` or offset from the originals; answers the new elements' ids. Reads the part. Changes the document. */
|
|
166
|
+
"element.paste": {
|
|
167
|
+
at?: Json; /** The page's id; the shown page when absent */
|
|
168
|
+
page?: string; /** A clipboard.copy payload (application/x-kition-board+json) */
|
|
169
|
+
payload: {
|
|
170
|
+
elements?: Array<{
|
|
171
|
+
end?: {
|
|
172
|
+
binding?: {
|
|
173
|
+
target?: string;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
ref?: string;
|
|
177
|
+
start?: {
|
|
178
|
+
binding?: {
|
|
179
|
+
target?: string;
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
}>;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
/** Create elements. Makes one or more elements (shapes, text, sticky notes, strokes, frames, connectors, cards) on a page in one step; use it to build content, element.update to change existing elements. Reads the part. Changes the document. */
|
|
186
|
+
"element.create": {
|
|
187
|
+
elements: Array<{
|
|
188
|
+
connectorType?: "straight" | "elbow" | "curved";
|
|
189
|
+
dashStyle?: "solid" | "dashed" | "dotted";
|
|
190
|
+
endArrowhead?: "none" | "arrow" | "dot";
|
|
191
|
+
fillColor?: string;
|
|
192
|
+
fillStyle?: "none" | "solid" | "semi" | "pattern";
|
|
193
|
+
fontFamily?: "sans" | "serif" | "mono";
|
|
194
|
+
fontSize?: number;
|
|
195
|
+
key?: string;
|
|
196
|
+
kind: "shape" | "text" | "frame" | "stroke";
|
|
197
|
+
opacity?: number;
|
|
198
|
+
parent?: string;
|
|
199
|
+
points?: Array<Array<number>>;
|
|
200
|
+
position?: Json;
|
|
201
|
+
rotation?: number;
|
|
202
|
+
roundness?: number;
|
|
203
|
+
shapeStyle?: "default" | "sticky" | "mind-node" | "flow-node" | "image-placeholder";
|
|
204
|
+
shapeType?: "rectangle" | "ellipse" | "triangle" | "diamond" | "hexagon" | "pill" | "parallelogram" | "star" | "cloud" | "heart" | "x-box" | "check-box" | "check" | "arrow-left" | "arrow-right" | "arrow-up" | "arrow-down" | "line";
|
|
205
|
+
size?: Json;
|
|
206
|
+
startArrowhead?: "none" | "arrow" | "dot";
|
|
207
|
+
strokeColor?: string;
|
|
208
|
+
strokeSize?: "s" | "m" | "l" | "xl";
|
|
209
|
+
text?: string;
|
|
210
|
+
textAlign?: "left" | "center" | "right";
|
|
211
|
+
textFormat?: "plain" | "markdown";
|
|
212
|
+
}>; /** The page's id; the shown page when absent */
|
|
213
|
+
page?: string;
|
|
214
|
+
};
|
|
215
|
+
/** Update an element. Sets fields of one existing element (position, size, rotation, parent, shape type and style, text placement, mind-map fields); null clears an optional field. Acts on `id`. Changes the document. */
|
|
216
|
+
"element.update": {
|
|
217
|
+
id: string; /** Fields to set: position [x, y], size [w, h], rotation, parent, key, points, shapeType, shapeStyle, style fields, labelPosition, mind-map fields; null clears an optional field */
|
|
218
|
+
set: {
|
|
219
|
+
connectorType?: Json;
|
|
220
|
+
dashStyle?: Json;
|
|
221
|
+
endArrowhead?: Json;
|
|
222
|
+
fillColor?: Json;
|
|
223
|
+
fillStyle?: Json;
|
|
224
|
+
fontFamily?: Json;
|
|
225
|
+
fontSize?: Json;
|
|
226
|
+
labelPosition?: Json;
|
|
227
|
+
opacity?: Json;
|
|
228
|
+
parent?: Json;
|
|
229
|
+
points?: Json;
|
|
230
|
+
position?: Json;
|
|
231
|
+
rotation?: Json;
|
|
232
|
+
roundness?: Json;
|
|
233
|
+
size?: Json;
|
|
234
|
+
startArrowhead?: Json;
|
|
235
|
+
strokeColor?: Json;
|
|
236
|
+
strokeSize?: Json;
|
|
237
|
+
textAlign?: Json;
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
/** Move. Moves the elements by delta or so the selection's top-left lands at `to`; with reparent each element joins the frame its centre lands in. Acts on `ids`. Changes the document. */
|
|
241
|
+
"element.move": {
|
|
242
|
+
delta?: Json; /** The elements; what is inside them moves along */
|
|
243
|
+
ids: Array<string>; /** Each moved element takes the frame its centre lands in (and leaves a frame it is moved out of) */
|
|
244
|
+
reparent?: boolean; /** [x, y] for the selection's top-left corner (instead of delta) */
|
|
245
|
+
to?: Json;
|
|
246
|
+
};
|
|
247
|
+
/** Resize. Gives one element, or several scaled together, a new box [x0, y0, x1, y1] in board units. Acts on `id`. Changes the document. */
|
|
248
|
+
"element.resize": {
|
|
249
|
+
box: Array<number>; /** The element (or ids) */
|
|
250
|
+
id?: string; /** Elements to scale together (instead of id) */
|
|
251
|
+
ids?: Array<string>;
|
|
252
|
+
};
|
|
253
|
+
/** Rotate. Rotates the elements by degrees clockwise, each about its own centre or all about the selection's centre. Acts on `ids`. Changes the document. */
|
|
254
|
+
"element.rotate": {
|
|
255
|
+
about?: "each" | "selection"; /** Degrees, clockwise */
|
|
256
|
+
degrees: number; /** The elements */
|
|
257
|
+
ids: Array<string>;
|
|
258
|
+
};
|
|
259
|
+
/** Style. Sets style fields (colours, fill, stroke, dash, font, size, alignment, opacity, roundness) on the elements; each element takes only the fields its kind uses. Acts on `ids`. Changes the document. */
|
|
260
|
+
"element.style": {
|
|
261
|
+
ids: Array<string>;
|
|
262
|
+
style: {
|
|
263
|
+
connectorType?: "straight" | "elbow" | "curved";
|
|
264
|
+
dashStyle?: "solid" | "dashed" | "dotted";
|
|
265
|
+
endArrowhead?: "none" | "arrow" | "dot";
|
|
266
|
+
fillColor?: string;
|
|
267
|
+
fillStyle?: "none" | "solid" | "semi" | "pattern";
|
|
268
|
+
fontFamily?: "sans" | "serif" | "mono";
|
|
269
|
+
fontSize?: number;
|
|
270
|
+
opacity?: number;
|
|
271
|
+
roundness?: number;
|
|
272
|
+
startArrowhead?: "none" | "arrow" | "dot";
|
|
273
|
+
strokeColor?: string;
|
|
274
|
+
strokeSize?: "s" | "m" | "l" | "xl";
|
|
275
|
+
textAlign?: "left" | "center" | "right";
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
/** Read style. Reads the style fields the elements use, or a new element's defaults for a kind, without changing anything; null marks a field the elements differ on. Also answers the colour palette. Acts on `ids`. */
|
|
279
|
+
"element.getStyle": {
|
|
280
|
+
ids?: Array<string>; /** A new element's kind, for its defaults (instead of ids) */
|
|
281
|
+
kind?: "shape" | "text" | "stroke" | "connector" | "image" | "card" | "frame"; /** The new shape's role */
|
|
282
|
+
shapeStyle?: "default" | "sticky" | "mind-node" | "flow-node" | "image-placeholder";
|
|
283
|
+
};
|
|
284
|
+
/** Edit text. Replaces the whole text of a shape, text element, connector label, card caption or frame title. Acts on `id`. Changes the document. */
|
|
285
|
+
"element.setText": {
|
|
286
|
+
id: string; /** The whole new text */
|
|
287
|
+
text: string;
|
|
288
|
+
};
|
|
289
|
+
/** Format text. Applies or removes bold, italic or a link on a character range of one element's text. Acts on `id`. Changes the document. */
|
|
290
|
+
"text.mark": {
|
|
291
|
+
id: string; /** The mark */
|
|
292
|
+
mark: "bold" | "italic" | "link"; /** [start, end) in characters */
|
|
293
|
+
range: Array<number>; /** How range counts: characters (default) or UTF-16 code units */
|
|
294
|
+
units?: "scalar" | "utf16"; /** true (bold, italic), { href } (link), or null to remove */
|
|
295
|
+
value?: Json;
|
|
296
|
+
};
|
|
297
|
+
/** Frame. Makes a frame with a box and title and moves the named elements into it; frames group content and export as one area. Reads the part. Changes the document. */
|
|
298
|
+
"frame.create": {
|
|
299
|
+
box: Array<number>; /** Elements to put in the frame */
|
|
300
|
+
children?: Array<string>; /** The page's id; the shown page when absent */
|
|
301
|
+
page?: string; /** The frame's title */
|
|
302
|
+
title?: string;
|
|
303
|
+
};
|
|
304
|
+
/** Draw a stroke. Draws a freehand stroke through at least two points, with optional ink colour, weight and opacity. Reads the part. Changes the document. */
|
|
305
|
+
"stroke.create": {
|
|
306
|
+
page?: string; /** The stroke's points, at least two */
|
|
307
|
+
points: Array<Array<number>>;
|
|
308
|
+
style?: {
|
|
309
|
+
dashStyle?: "solid" | "dashed" | "dotted";
|
|
310
|
+
opacity?: number;
|
|
311
|
+
strokeColor?: string;
|
|
312
|
+
strokeSize?: "s" | "m" | "l" | "xl";
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
/** Connector. Draws a connector between two ends, each attached to an element or at a free point, with route type, arrowheads, label and bends; answers its id. Reads the part. Changes the document. */
|
|
316
|
+
"connector.create": {
|
|
317
|
+
endArrowhead?: "none" | "arrow" | "dot"; /** The start: { element, anchor? } to attach to an element (anchor [0..1, 0..1] on its box, the nearest edge when absent), or { point: [x, y] } */
|
|
318
|
+
from: {
|
|
319
|
+
anchor?: Json;
|
|
320
|
+
element?: string;
|
|
321
|
+
point?: Json;
|
|
322
|
+
}; /** An authoring id, unique on the page */
|
|
323
|
+
key?: string; /** The label */
|
|
324
|
+
label?: string; /** The page's id; the shown page when absent */
|
|
325
|
+
page?: string; /** Arrowhead at the start (none by default) */
|
|
326
|
+
startArrowhead?: "none" | "arrow" | "dot"; /** The connector's style */
|
|
327
|
+
style?: {
|
|
328
|
+
connectorType?: "straight" | "elbow" | "curved";
|
|
329
|
+
dashStyle?: "solid" | "dashed" | "dotted";
|
|
330
|
+
endArrowhead?: "none" | "arrow" | "dot";
|
|
331
|
+
opacity?: number;
|
|
332
|
+
startArrowhead?: "none" | "arrow" | "dot";
|
|
333
|
+
strokeColor?: string;
|
|
334
|
+
strokeSize?: "s" | "m" | "l" | "xl";
|
|
335
|
+
}; /** The end: { element, anchor? } to attach to an element (anchor [0..1, 0..1] on its box, the nearest edge when absent), or { point: [x, y] } */
|
|
336
|
+
to: {
|
|
337
|
+
anchor?: Json;
|
|
338
|
+
element?: string;
|
|
339
|
+
point?: Json;
|
|
340
|
+
}; /** The route */
|
|
341
|
+
type?: "straight" | "elbow" | "curved"; /** Bends in path order */
|
|
342
|
+
waypoints?: Array<Array<number>>;
|
|
343
|
+
};
|
|
344
|
+
/** Template. Inserts a ready structure (mind map, flowchart, roadmap, kanban, retrospective, storyboard) centred at `at` or right of the content. Reads the part. Changes the document. */
|
|
345
|
+
"template.insert": {
|
|
346
|
+
at?: Json; /** The page's id; the shown page when absent */
|
|
347
|
+
page?: string; /** The starting structure */
|
|
348
|
+
template: "mindmap" | "flowchart" | "roadmap" | "kanban" | "retrospective" | "storyboard";
|
|
349
|
+
};
|
|
350
|
+
/** Card. Places a card that links to a workspace file (note, table, board or any file) or a web address; the card shows the target's title and opens it. Reads the part. Changes the document. */
|
|
351
|
+
"card.create": {
|
|
352
|
+
caption?: string; /** A workspace file, relative to the board's folder or rooted with / */
|
|
353
|
+
file?: Json; /** The card's kind (from the file's extension when absent) */
|
|
354
|
+
kind?: "note" | "table" | "board" | "file" | "link"; /** The page's id; the shown page when absent */
|
|
355
|
+
page?: string; /** [x, y]; right of the content when absent */
|
|
356
|
+
position?: Json; /** [w, h]; 320 ? 200 by default */
|
|
357
|
+
size?: Json; /** A link card's title */
|
|
358
|
+
title?: string; /** An http, https or mailto address (instead of file) */
|
|
359
|
+
url?: string; /** Where in the target: { heading: [...] }, { blockId }, { page } */
|
|
360
|
+
view?: {
|
|
361
|
+
[key: string]: Json;
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
/** Picture. Places a picture from a workspace file or base64 bytes (PNG, JPEG, GIF, WebP, SVG); the picture is stored in the board. Reads the part. Changes the document. */
|
|
365
|
+
"image.insert": {
|
|
366
|
+
alt?: string; /** The picture's bytes as base64 (instead of file) */
|
|
367
|
+
data?: string; /** A workspace picture (PNG, JPEG, GIF, WebP, SVG), read once into the board */
|
|
368
|
+
file?: Json; /** The picture's type, checked against its bytes */
|
|
369
|
+
mime?: string; /** The page's id; the shown page when absent */
|
|
370
|
+
page?: string; /** [x, y]; right of the content when absent */
|
|
371
|
+
position?: Json; /** [w, h]; from the picture, at most 800 wide, when absent */
|
|
372
|
+
size?: Json;
|
|
373
|
+
};
|
|
374
|
+
/** Attach connector end. Moves one end of an existing connector onto an element (at an anchor on its box) or to a free point. Acts on `id`. Changes the document. */
|
|
375
|
+
"connector.bind": {
|
|
376
|
+
id: string; /** Which end */
|
|
377
|
+
terminal: "start" | "end"; /** Where the end goes: { element, anchor? } to attach to an element (anchor [0..1, 0..1] on its box, the nearest edge when absent), or { point: [x, y] } */
|
|
378
|
+
to: {
|
|
379
|
+
anchor?: Json;
|
|
380
|
+
element?: string;
|
|
381
|
+
point?: Json;
|
|
382
|
+
};
|
|
383
|
+
};
|
|
384
|
+
/** Connector label. Sets or removes a connector's label and where along the route it sits (0 to 1). Acts on `id`. Changes the document. */
|
|
385
|
+
"connector.setLabel": {
|
|
386
|
+
id: string; /** Where along the route, 0 to 1 (0.5 by default) */
|
|
387
|
+
position?: number; /** The label; empty removes it */
|
|
388
|
+
text: string;
|
|
389
|
+
};
|
|
390
|
+
/** Connector bends. Replaces a connector's bend points; an empty list returns it to an automatic route. Acts on `id`. Changes the document. */
|
|
391
|
+
"connector.setWaypoints": {
|
|
392
|
+
id: string; /** Bends in path order; empty for an automatic route */
|
|
393
|
+
waypoints: Array<Array<number>>;
|
|
394
|
+
};
|
|
395
|
+
/** Change card target. Points an existing card at another workspace file or web address, keeping its place and size. Acts on `id`. Changes the document. */
|
|
396
|
+
"card.setTarget": {
|
|
397
|
+
file?: Json; /** The card */
|
|
398
|
+
id: string; /** The card's kind (from the file's extension when absent) */
|
|
399
|
+
kind?: "note" | "table" | "board" | "file" | "link"; /** A link card's title */
|
|
400
|
+
title?: string; /** An http, https or mailto address (instead of file) */
|
|
401
|
+
url?: string; /** Where in the target: { heading: [...] }, { blockId }, { page } */
|
|
402
|
+
view?: {
|
|
403
|
+
[key: string]: Json;
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
/** Alternative text. Sets or removes a picture's alternative text, read by screen readers and exports. Acts on `id`. Changes the document. */
|
|
407
|
+
"image.setAlt": {
|
|
408
|
+
alt: string; /** The picture */
|
|
409
|
+
id: string;
|
|
410
|
+
};
|
|
411
|
+
/** Fit frame to content. Resizes a frame to wrap its content with padding (32 units by default). Acts on `id`. Changes the document. */
|
|
412
|
+
"frame.fit": {
|
|
413
|
+
id: string; /** Space around the content (32 by default) */
|
|
414
|
+
padding?: number;
|
|
415
|
+
};
|
|
416
|
+
/** Group. Groups the elements so they move, resize and select together; answers the group's id. Acts on `ids`. Changes the document. */
|
|
417
|
+
"element.group": {
|
|
418
|
+
ids: Array<string>;
|
|
419
|
+
};
|
|
420
|
+
/** Ungroup. Dissolves the groups, leaving their elements in place and in the same order. Acts on `groupIds`. Changes the document. */
|
|
421
|
+
"element.ungroup": {
|
|
422
|
+
groupIds: Array<string>;
|
|
423
|
+
};
|
|
424
|
+
/** Order. Moves the elements to the front, one step forward, one step backward or to the back of the stacking order. Acts on `ids`. Changes the document. */
|
|
425
|
+
"element.reorder": {
|
|
426
|
+
ids: Array<string>; /** Where in the stacking order */
|
|
427
|
+
placement: "front" | "forward" | "backward" | "back";
|
|
428
|
+
};
|
|
429
|
+
/** Lock. Locks or unlocks the elements; locked elements cannot be selected, moved or edited by the person until unlocked. Acts on `ids`. Changes the document. */
|
|
430
|
+
"element.lock": {
|
|
431
|
+
ids: Array<string>;
|
|
432
|
+
locked: boolean;
|
|
433
|
+
};
|
|
434
|
+
/** Align. Lines up the elements' left, centre, right, top, middle or bottom edges. Acts on `ids`. Changes the document. */
|
|
435
|
+
"layout.align": {
|
|
436
|
+
edge: "left" | "center" | "right" | "top" | "middle" | "bottom"; /** The elements */
|
|
437
|
+
ids: Array<string>;
|
|
438
|
+
};
|
|
439
|
+
/** Distribute. Spaces three or more elements evenly between the outermost ones, horizontally or vertically. Acts on `ids`. Changes the document. */
|
|
440
|
+
"layout.distribute": {
|
|
441
|
+
axis: "horizontal" | "vertical"; /** Three or more elements */
|
|
442
|
+
ids: Array<string>;
|
|
443
|
+
};
|
|
444
|
+
/** Stack. Places the elements one after another in a row or column with a fixed gap (24 by default). Acts on `ids`. Changes the document. */
|
|
445
|
+
"layout.stack": {
|
|
446
|
+
axis: "horizontal" | "vertical"; /** Space between (24 by default) */
|
|
447
|
+
gap?: number; /** The elements */
|
|
448
|
+
ids: Array<string>;
|
|
449
|
+
};
|
|
450
|
+
/** Lay out mind map. Re-lays out the whole mind map that a node belongs to, keeping the root in place. Acts on `root`. Changes the document. */
|
|
451
|
+
"layout.mindmap": {
|
|
452
|
+
root: string;
|
|
453
|
+
};
|
|
454
|
+
/** Add branch. Adds a branch node under a mind-map node (on a chosen side for two-way maps) and lays the map out again. Acts on `node`. Changes the document. */
|
|
455
|
+
"mindmap.addChild": {
|
|
456
|
+
node: string; /** Which side of the root, for a map that grows both ways */
|
|
457
|
+
side?: "left" | "right"; /** The new node's text */
|
|
458
|
+
text?: string;
|
|
459
|
+
};
|
|
460
|
+
/** Add sibling. Adds a node next to a non-root mind-map node, under the same parent. Acts on `node`. Changes the document. */
|
|
461
|
+
"mindmap.addSibling": {
|
|
462
|
+
node: string; /** The new node's text */
|
|
463
|
+
text?: string;
|
|
464
|
+
};
|
|
465
|
+
/** Collapse branch. Hides or shows the branches below a mind-map node (toggles when collapsed is absent). Acts on `node`. Changes the document. */
|
|
466
|
+
"mindmap.collapse": {
|
|
467
|
+
collapsed?: boolean; /** A node with branches, not the root */
|
|
468
|
+
node: string;
|
|
469
|
+
};
|
|
470
|
+
/** Mind map direction. Sets which way the mind map grows (right, left, both ways, down) and lays it out again. Acts on `node`. Changes the document. */
|
|
471
|
+
"mindmap.setDirection": {
|
|
472
|
+
direction: "both" | "right" | "left" | "down"; /** Any node of the mind map */
|
|
473
|
+
node: string;
|
|
474
|
+
};
|
|
475
|
+
/** New page. Adds a new page with a name (Page N by default) at a position (last by default); answers its id. Changes the document. */
|
|
476
|
+
"page.create": {
|
|
477
|
+
activate?: boolean; /** Position among the pages (last by default); at most the current page count */
|
|
478
|
+
at?: number; /** The name (Page N by default) */
|
|
479
|
+
name?: string;
|
|
480
|
+
};
|
|
481
|
+
/** Rename page. Gives a page a new name; its id and elements stay the same. Changes the document. */
|
|
482
|
+
"page.rename": {
|
|
483
|
+
name: string; /** The page */
|
|
484
|
+
page: string;
|
|
485
|
+
};
|
|
486
|
+
/** Duplicate page. Copies a page with all its elements, under a new name; answers the copy's id. Changes the document. */
|
|
487
|
+
"page.duplicate": {
|
|
488
|
+
name?: string; /** The page */
|
|
489
|
+
page: string;
|
|
490
|
+
};
|
|
491
|
+
/** Delete page. Deletes a page and its elements; the board's last page cannot be deleted. Changes the document. */
|
|
492
|
+
"page.delete": {
|
|
493
|
+
page: string;
|
|
494
|
+
};
|
|
495
|
+
/** Move page. Moves a page to a new position among the pages, or one step earlier or later. Changes the document. */
|
|
496
|
+
"page.move": {
|
|
497
|
+
page: string; /** One step (instead of to) */
|
|
498
|
+
placement?: "previous" | "next"; /** The new position, less than the current page count */
|
|
499
|
+
to?: number;
|
|
500
|
+
};
|
|
501
|
+
/** Show page. Shows a page in the editor; this is view state, not an undo step, and the document does not change. */
|
|
502
|
+
"page.activate": {
|
|
503
|
+
page: string;
|
|
504
|
+
};
|
|
505
|
+
/** Export. Draws the shown page (or `page`, or one frame) as PNG, SVG or PDF and answers the file as base64 without changing the board. Reads the part. */
|
|
506
|
+
"file.export": {
|
|
507
|
+
background?: boolean; /** A PNG too large at its scale is drawn at the largest scale that fits instead of refused */
|
|
508
|
+
fit?: boolean; /** The file to write */
|
|
509
|
+
format: "png" | "svg" | "pdf"; /** One frame and what is in it, instead of the whole page */
|
|
510
|
+
frame?: string; /** The page's id; the shown page when absent */
|
|
511
|
+
page?: string; /** PNG pixels per board unit, 0.1 to 8 (2 by default) */
|
|
512
|
+
scale?: number;
|
|
513
|
+
};
|
|
514
|
+
/** Preview a view. Draws one view of the board as a PNG (a page, a frame, an element or an area, by id) for looking at it, without changing the board or the page the editor shows; the same call answers the same picture. */
|
|
515
|
+
"file.render": {
|
|
516
|
+
maxSize?: number; /** Pixels per board unit, more than 0 and at most 4 (1 by default) */
|
|
517
|
+
scale?: number; /** The view to draw; without it the first page's document area. At most one of frame, objectId and area */
|
|
518
|
+
target?: {
|
|
519
|
+
area?: Array<number>;
|
|
520
|
+
frame?: string;
|
|
521
|
+
objectId?: string;
|
|
522
|
+
page?: Json;
|
|
523
|
+
};
|
|
524
|
+
};
|
|
525
|
+
/** Retarget links. Re-points every card that links to a moved or renamed workspace file or folder at its new path. Changes the document. */
|
|
526
|
+
"links.retarget": {
|
|
527
|
+
from: string; /** The workspace path they link to instead; a folder's cards keep the rest of their path */
|
|
528
|
+
to: string;
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
/** A Board file opened with `openDocument<Board, BoardCommands>`. */
|
|
532
|
+
export type BoardDocument = ModelDocument<Board, BoardCommands>;
|
|
533
|
+
export type BoardContext = RequestContext<Board, BoardCommands>;
|
|
534
|
+
export {};
|