mindoodb-app-sdk 0.0.49 → 0.0.53
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 +185 -1
- package/TESTING.md +58 -0
- package/dist/{chunk-TPYDERAK.js → chunk-6NTVTL6G.js} +151 -3
- package/dist/index.d.ts +138 -3
- package/dist/index.js +414 -18
- package/dist/testing/index.d.ts +107 -2
- package/dist/testing/index.js +620 -135
- package/dist/{types-C-eyC839.d.ts → types-CsKw_niD.d.ts} +250 -5
- package/package.json +3 -3
|
@@ -94,11 +94,56 @@ interface MindooDBAppDefinition {
|
|
|
94
94
|
/** `logicalDatabaseId` the app should open first. */
|
|
95
95
|
defaultLaunchDatabaseId?: string;
|
|
96
96
|
databases?: MindooDBAppDefinitionDatabase[];
|
|
97
|
+
/**
|
|
98
|
+
* What a person sees before installing: the app's landing page when its URL is
|
|
99
|
+
* opened directly, and Haven's setup wizard when it arrives through a shared link.
|
|
100
|
+
* Display-only; nothing in here affects what the app is granted.
|
|
101
|
+
*/
|
|
102
|
+
listing?: MindooDBAppDefinitionListing;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Text in one language, or a map from locale (`de`, `fr`, …) to text. A map must carry
|
|
106
|
+
* `en`, the fallback for every locale it does not name.
|
|
107
|
+
*/
|
|
108
|
+
type MindooDBAppLocalizedText = string | ({
|
|
109
|
+
en: string;
|
|
110
|
+
} & Record<string, string>);
|
|
111
|
+
interface MindooDBAppDefinitionScreenshot {
|
|
112
|
+
/** Image path relative to the app origin, or an absolute `https:` URL. */
|
|
113
|
+
file: string;
|
|
114
|
+
caption?: MindooDBAppLocalizedText;
|
|
115
|
+
}
|
|
116
|
+
interface MindooDBAppDefinitionListing {
|
|
117
|
+
/** One or two sentences: what the app is for. */
|
|
118
|
+
summary?: MindooDBAppLocalizedText;
|
|
119
|
+
/** Longer plain text. Blank lines separate paragraphs; no markup is rendered. */
|
|
120
|
+
description?: MindooDBAppLocalizedText;
|
|
121
|
+
/** Square icon, path relative to the app origin or an absolute `https:` URL. */
|
|
122
|
+
icon?: string;
|
|
123
|
+
screenshots?: MindooDBAppDefinitionScreenshot[];
|
|
124
|
+
/** Who publishes the app. Shown next to the app's origin, never instead of it. */
|
|
125
|
+
publisher?: {
|
|
126
|
+
name: string;
|
|
127
|
+
url?: string;
|
|
128
|
+
};
|
|
97
129
|
}
|
|
130
|
+
declare const MINDOODB_APP_LISTING_SUMMARY_MAX = 300;
|
|
131
|
+
declare const MINDOODB_APP_LISTING_DESCRIPTION_MAX = 4000;
|
|
132
|
+
declare const MINDOODB_APP_LISTING_MAX_SCREENSHOTS = 8;
|
|
98
133
|
interface MindooDBAppDefinitionValidation {
|
|
99
134
|
definition: MindooDBAppDefinition | null;
|
|
100
135
|
errors: string[];
|
|
101
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* Picks the text for `locale` out of a localized value: the exact locale, then its
|
|
139
|
+
* language (`de` for `de-CH`), then `en`.
|
|
140
|
+
*/
|
|
141
|
+
declare function resolveMindooDBAppLocalizedText(text: MindooDBAppLocalizedText | undefined, locale: string): string;
|
|
142
|
+
/**
|
|
143
|
+
* Resolves a listing asset (icon, screenshot) against the app origin. Returns `null`
|
|
144
|
+
* for anything that would leave `https:` or the origin's own scheme.
|
|
145
|
+
*/
|
|
146
|
+
declare function resolveMindooDBAppListingAssetUrl(path: string, originUrl: string): string | null;
|
|
102
147
|
/**
|
|
103
148
|
* Structural validation of a `haven-app.json` payload. Returns the normalized
|
|
104
149
|
* definition, or `null` plus every problem found so a publisher can fix them in one
|
|
@@ -738,6 +783,42 @@ interface MindooDBAppRichTextSnapshot {
|
|
|
738
783
|
heads?: string[];
|
|
739
784
|
spans: MindooDBAppRichTextSpan[];
|
|
740
785
|
}
|
|
786
|
+
/**
|
|
787
|
+
* Where a text cursor should be created: a character index (clamped to the
|
|
788
|
+
* text length), or the start/end of the text.
|
|
789
|
+
*/
|
|
790
|
+
type MindooDBAppTextCursorPosition = number | "start" | "end";
|
|
791
|
+
/** Options for `documents.getTextCursors()` and `documents.resolveTextCursors()`. */
|
|
792
|
+
interface MindooDBAppTextCursorOptions {
|
|
793
|
+
/**
|
|
794
|
+
* Address the text as it was at these heads (e.g. the `heads` of the
|
|
795
|
+
* document version your editor rendered) instead of the current version.
|
|
796
|
+
*/
|
|
797
|
+
heads?: string[];
|
|
798
|
+
/**
|
|
799
|
+
* Only for `getTextCursors()`: where a cursor goes when the character it
|
|
800
|
+
* points at is deleted. `"after"` (default) or `"before"`.
|
|
801
|
+
*/
|
|
802
|
+
move?: "before" | "after";
|
|
803
|
+
/** Read a historical revision from `documents.listHistory()` instead. */
|
|
804
|
+
revisionId?: MindooDBAppDocumentRevisionId;
|
|
805
|
+
}
|
|
806
|
+
/** Result of `documents.getTextCursors()`. */
|
|
807
|
+
interface MindooDBAppTextCursorsResult {
|
|
808
|
+
path: Array<string | number>;
|
|
809
|
+
/** Heads of the document version the positions were read against. */
|
|
810
|
+
heads: string[];
|
|
811
|
+
/** One opaque cursor string per requested position, in request order. */
|
|
812
|
+
cursors: string[];
|
|
813
|
+
}
|
|
814
|
+
/** Result of `documents.resolveTextCursors()`. */
|
|
815
|
+
interface MindooDBAppTextCursorPositionsResult {
|
|
816
|
+
path: Array<string | number>;
|
|
817
|
+
/** Heads of the document version the cursors were resolved against. */
|
|
818
|
+
heads: string[];
|
|
819
|
+
/** One character index per requested cursor, in request order. */
|
|
820
|
+
positions: number[];
|
|
821
|
+
}
|
|
741
822
|
interface MindooDBAppRichTextGetOptions {
|
|
742
823
|
/** Stable revision id previously obtained from `documents.listHistory()`. */
|
|
743
824
|
revisionId?: MindooDBAppDocumentRevisionId;
|
|
@@ -785,6 +866,10 @@ interface MindooDBAppAutomergePatchResult {
|
|
|
785
866
|
* Creates the field if it does not exist, or replaces the existing value.
|
|
786
867
|
* `path` addresses a property using object keys and list indices, for example
|
|
787
868
|
* `["workbook", "worksheetsById", "ws-1", "title"]`.
|
|
869
|
+
*
|
|
870
|
+
* Strings become collaborative text. Use `MindooDBAppValue.atomic()`,
|
|
871
|
+
* `.counter()` or `.timestamp()` for values that need another type; they may
|
|
872
|
+
* also be nested inside objects and arrays.
|
|
788
873
|
*/
|
|
789
874
|
interface MindooDBAppJsonSetPatch {
|
|
790
875
|
path: Array<string | number>;
|
|
@@ -848,6 +933,22 @@ interface MindooDBAppJsonTextUnmarkPatch {
|
|
|
848
933
|
length: number;
|
|
849
934
|
names: string[];
|
|
850
935
|
}
|
|
936
|
+
/**
|
|
937
|
+
* Adds `delta` (negative to decrement) to the counter at `path`.
|
|
938
|
+
*
|
|
939
|
+
* Increments made concurrently on different devices are summed when they
|
|
940
|
+
* merge, so two users who each add 1 end at +2 instead of one overwriting the
|
|
941
|
+
* other, which is what a `set` of a plain number would do. A missing field is
|
|
942
|
+
* initialized as a counter holding `delta`; create shared counters up front
|
|
943
|
+
* with `MindooDBAppValue.counter()` instead, because two devices that create
|
|
944
|
+
* the same counter concurrently keep only one creation. Incrementing a field
|
|
945
|
+
* that holds a plain number (not a counter) is rejected by the host. `delta` must be a
|
|
946
|
+
* safe integer.
|
|
947
|
+
*/
|
|
948
|
+
interface MindooDBAppJsonCounterIncrementPatch {
|
|
949
|
+
path: Array<string | number>;
|
|
950
|
+
delta: number;
|
|
951
|
+
}
|
|
851
952
|
interface MindooDBAppJsonPatch {
|
|
852
953
|
/**
|
|
853
954
|
* Automerge heads of the document snapshot this JSON patch was authored
|
|
@@ -862,6 +963,8 @@ interface MindooDBAppJsonPatch {
|
|
|
862
963
|
textSplice?: MindooDBAppJsonTextSplicePatch[];
|
|
863
964
|
textMark?: MindooDBAppJsonTextMarkPatch[];
|
|
864
965
|
textUnmark?: MindooDBAppJsonTextUnmarkPatch[];
|
|
966
|
+
/** Increment collaborative counters. Applied last. */
|
|
967
|
+
counterIncrement?: MindooDBAppJsonCounterIncrementPatch[];
|
|
865
968
|
}
|
|
866
969
|
/**
|
|
867
970
|
* Sparse patch payload used when updating an existing document.
|
|
@@ -1079,7 +1182,7 @@ interface MindooDBAppBridgeBeforeCloseAck {
|
|
|
1079
1182
|
closeId: string;
|
|
1080
1183
|
}
|
|
1081
1184
|
/** A Haven-owned keyboard chord the iframe should recognise. */
|
|
1082
|
-
type MindooDBAppHostShortcutAction = "open-workspace" | "toggle-app-drawer";
|
|
1185
|
+
type MindooDBAppHostShortcutAction = "open-workspace" | "toggle-app-drawer" | "toggle-workspace-maximize";
|
|
1083
1186
|
/** One host shortcut, matched against {@link KeyboardEvent.code} plus modifiers. */
|
|
1084
1187
|
interface MindooDBAppHostShortcutBinding {
|
|
1085
1188
|
action: MindooDBAppHostShortcutAction;
|
|
@@ -1101,8 +1204,38 @@ interface MindooDBAppBridgeShortcutInvokedMessage {
|
|
|
1101
1204
|
kind: "shortcut-invoked";
|
|
1102
1205
|
action: MindooDBAppHostShortcutAction;
|
|
1103
1206
|
}
|
|
1207
|
+
/** App → host: the user pressed inside this app, so Haven should focus its tile. */
|
|
1208
|
+
interface MindooDBAppBridgeWorkspaceFocusRequestedMessage {
|
|
1209
|
+
protocol: "mindoodb-app-bridge";
|
|
1210
|
+
kind: "workspace-focus-requested";
|
|
1211
|
+
}
|
|
1212
|
+
/** Host → app: whether this launch is the surface the user is looking at. */
|
|
1213
|
+
interface MindooDBAppBridgeHostFocusChangedMessage {
|
|
1214
|
+
protocol: "mindoodb-app-bridge";
|
|
1215
|
+
kind: "host-focus-changed";
|
|
1216
|
+
focused: boolean;
|
|
1217
|
+
}
|
|
1218
|
+
/** Severity of a notice Haven shows for an app. */
|
|
1219
|
+
type MindooDBAppNotificationSeverity = "info" | "warning" | "error";
|
|
1220
|
+
/** One notice the app asks Haven to show. The headline is the app's registration label. */
|
|
1221
|
+
interface MindooDBAppNotifyInput {
|
|
1222
|
+
/** When set, Haven updates that notice instead of adding another row. */
|
|
1223
|
+
id?: string;
|
|
1224
|
+
severity: MindooDBAppNotificationSeverity;
|
|
1225
|
+
text: string;
|
|
1226
|
+
/**
|
|
1227
|
+
* How long the notice stays up, in milliseconds. Omit it and the notice stays
|
|
1228
|
+
* until the user dismisses it or clicks it. Haven clamps a provided value to
|
|
1229
|
+
* a short range so a progress step cannot pin itself on screen.
|
|
1230
|
+
*/
|
|
1231
|
+
durationMs?: number;
|
|
1232
|
+
}
|
|
1233
|
+
/** The id Haven stored for this notice. Pass it again to update the same row. */
|
|
1234
|
+
interface MindooDBAppNotifyResult {
|
|
1235
|
+
id: string;
|
|
1236
|
+
}
|
|
1104
1237
|
/** Any message that can travel across the dedicated bridge MessagePort. */
|
|
1105
|
-
type MindooDBAppBridgePortMessage = MindooDBAppBridgeRpcMessage | MindooDBAppBridgeStreamMessage | MindooDBAppBridgeThemeChangedMessage | MindooDBAppBridgeViewportChangedMessage | MindooDBAppBridgeUiPreferencesChangedMessage | MindooDBAppBridgeLocaleChangedMessage | MindooDBAppBridgeQueryResultMessage | MindooDBAppBridgeViewChangedMessage | MindooDBAppBridgeBeforeCloseMessage | MindooDBAppBridgeBeforeCloseAck | MindooDBAppBridgeShortcutsChangedMessage | MindooDBAppBridgeShortcutInvokedMessage | MindooDBAppBridgeDragOverMessage | MindooDBAppBridgeDragLeaveMessage | MindooDBAppBridgeDragDropMessage;
|
|
1238
|
+
type MindooDBAppBridgePortMessage = MindooDBAppBridgeRpcMessage | MindooDBAppBridgeStreamMessage | MindooDBAppBridgeThemeChangedMessage | MindooDBAppBridgeViewportChangedMessage | MindooDBAppBridgeUiPreferencesChangedMessage | MindooDBAppBridgeLocaleChangedMessage | MindooDBAppBridgeQueryResultMessage | MindooDBAppBridgeViewChangedMessage | MindooDBAppBridgeBeforeCloseMessage | MindooDBAppBridgeBeforeCloseAck | MindooDBAppBridgeShortcutsChangedMessage | MindooDBAppBridgeShortcutInvokedMessage | MindooDBAppBridgeWorkspaceFocusRequestedMessage | MindooDBAppBridgeHostFocusChangedMessage | MindooDBAppBridgeDragOverMessage | MindooDBAppBridgeDragLeaveMessage | MindooDBAppBridgeDragDropMessage;
|
|
1106
1239
|
/** Placement hint for a host-rendered overlay menu. */
|
|
1107
1240
|
type MindooDBAppMenuPlacement = "auto" | "bottom-start" | "bottom-end" | "top-start" | "top-end" | "right-start" | "left-start";
|
|
1108
1241
|
/** Semantic hint allowing Haven to tune menu behavior or styling. */
|
|
@@ -1414,6 +1547,36 @@ interface MindooDBAppFulltextSetup {
|
|
|
1414
1547
|
/** Per-field cap (approximate bytes) for extracted text. */
|
|
1415
1548
|
maxFieldBytes?: number;
|
|
1416
1549
|
}
|
|
1550
|
+
/**
|
|
1551
|
+
* Document summary buffer configuration of a database, stored in the synced
|
|
1552
|
+
* `dbsetup` document (`summarySetup` field) — the app-SDK mirror of
|
|
1553
|
+
* MindooDB's `SummaryConfig`. It decides which document fields
|
|
1554
|
+
* {@link MindooDBAppDocumentApi.query} and summary-backed views can read
|
|
1555
|
+
* without materializing documents. Read/write it via
|
|
1556
|
+
* {@link MindooDBAppDatabase.getSummarySetup} /
|
|
1557
|
+
* {@link MindooDBAppDatabase.setSummarySetup}.
|
|
1558
|
+
*/
|
|
1559
|
+
interface MindooDBAppSummarySetup {
|
|
1560
|
+
/**
|
|
1561
|
+
* Copy every non-underscore top-level field whose value is a scalar or an
|
|
1562
|
+
* array of scalars (up to {@link maxValueBytes}). Default: `true`.
|
|
1563
|
+
*/
|
|
1564
|
+
autoInclude?: boolean;
|
|
1565
|
+
/** Size cap (approximate, JSON length) for auto-included values. Default: `1024`. */
|
|
1566
|
+
maxValueBytes?: number;
|
|
1567
|
+
/**
|
|
1568
|
+
* Dot-separated paths to include explicitly. Unlike auto-include these may
|
|
1569
|
+
* be nested or non-scalar (e.g. an array of objects) and bypass the size
|
|
1570
|
+
* cap.
|
|
1571
|
+
*/
|
|
1572
|
+
include?: string[];
|
|
1573
|
+
/** Dot-separated paths to exclude; wins over auto-include and `include`. */
|
|
1574
|
+
exclude?: string[];
|
|
1575
|
+
/** Store a slim `_attachments` projection. Default: `true`. */
|
|
1576
|
+
includeAttachments?: boolean;
|
|
1577
|
+
/** Store a slim `_encryptFor` projection. Default: `true`. */
|
|
1578
|
+
includeRecipients?: boolean;
|
|
1579
|
+
}
|
|
1417
1580
|
/**
|
|
1418
1581
|
* Attachment text extraction configuration of a database, stored in the
|
|
1419
1582
|
* synced `dbsetup` document (`extractionSetup` field) — the app-SDK
|
|
@@ -1670,6 +1833,26 @@ interface MindooDBAppDocumentApi {
|
|
|
1670
1833
|
* writing back via `update({ richText: [...] })`.
|
|
1671
1834
|
*/
|
|
1672
1835
|
getRichText(docId: string, path: Array<string | number>, options?: MindooDBAppRichTextGetOptions): Promise<MindooDBAppRichTextSnapshot>;
|
|
1836
|
+
/**
|
|
1837
|
+
* Create stable cursors for character positions in the text field at
|
|
1838
|
+
* `path`. A cursor identifies a character rather than an index, so it keeps
|
|
1839
|
+
* pointing at the same spot while other users insert or delete text before
|
|
1840
|
+
* it. A cursor names the character at its index: anchor a range on its first
|
|
1841
|
+
* and last character and add 1 to the resolved end. Store cursors in the
|
|
1842
|
+
* document (preferably as `MindooDBAppValue.atomic()`)
|
|
1843
|
+
* to anchor comments, highlights or bookmarks, and turn them back into
|
|
1844
|
+
* indexes with {@link resolveTextCursors}. The field must be collaborative
|
|
1845
|
+
* text (a string written with `set`/text patches, or rich text).
|
|
1846
|
+
* Requires the `read` capability.
|
|
1847
|
+
*/
|
|
1848
|
+
getTextCursors(docId: string, path: Array<string | number>, positions: MindooDBAppTextCursorPosition[], options?: MindooDBAppTextCursorOptions): Promise<MindooDBAppTextCursorsResult>;
|
|
1849
|
+
/**
|
|
1850
|
+
* Resolve cursors from {@link getTextCursors} to current character indexes
|
|
1851
|
+
* (or, with `options.heads` / `options.revisionId`, to indexes in that
|
|
1852
|
+
* version). A cursor whose character was deleted resolves to where the
|
|
1853
|
+
* character used to be. Requires the `read` capability.
|
|
1854
|
+
*/
|
|
1855
|
+
resolveTextCursors(docId: string, path: Array<string | number>, cursors: string[], options?: Omit<MindooDBAppTextCursorOptions, "move">): Promise<MindooDBAppTextCursorPositionsResult>;
|
|
1673
1856
|
/**
|
|
1674
1857
|
* Export the full internal Automerge document as binary.
|
|
1675
1858
|
*
|
|
@@ -1681,11 +1864,23 @@ interface MindooDBAppDocumentApi {
|
|
|
1681
1864
|
/**
|
|
1682
1865
|
* Merge raw Automerge change bytes into the canonical document on Haven.
|
|
1683
1866
|
*
|
|
1684
|
-
* **Discouraged** — prefer `documents.update` patch operations. Escape hatch
|
|
1685
|
-
* for apps that host a local Automerge replica when JSON patches are insufficient.
|
|
1686
1867
|
* Include `replicaHeads` to receive incremental `changesSince` in the response.
|
|
1868
|
+
* Word chunk journals use {@link applyAutomergeChangesBatch} so one save can
|
|
1869
|
+
* write several small documents. Prefer `documents.update` when a JSON patch
|
|
1870
|
+
* already expresses the edit.
|
|
1687
1871
|
*/
|
|
1688
1872
|
applyAutomergeChanges(docId: string, patch: MindooDBAppAutomergeChangesPatch): Promise<MindooDBAppAutomergePatchResult>;
|
|
1873
|
+
/**
|
|
1874
|
+
* Merge Automerge change bytes for several documents in one call.
|
|
1875
|
+
*
|
|
1876
|
+
* Supported path for Word chunk journals: each chunk is its own document,
|
|
1877
|
+
* and a save sends only the chunks that changed. Hosts without this method
|
|
1878
|
+
* are served by sequential {@link applyAutomergeChanges} calls.
|
|
1879
|
+
*/
|
|
1880
|
+
applyAutomergeChangesBatch(items: Array<{
|
|
1881
|
+
docId: string;
|
|
1882
|
+
patch: MindooDBAppAutomergeChangesPatch;
|
|
1883
|
+
}>): Promise<MindooDBAppAutomergePatchResult[]>;
|
|
1689
1884
|
/**
|
|
1690
1885
|
* Create a new document from `input.set` (or return the existing one
|
|
1691
1886
|
* when a caller-provided `input.id` already exists — idempotent create,
|
|
@@ -2405,6 +2600,28 @@ interface MindooDBAppDatabase {
|
|
|
2405
2600
|
* {@link setFulltextSetup}.
|
|
2406
2601
|
*/
|
|
2407
2602
|
setExtractionSetup(config: MindooDBAppExtractionSetup | null): Promise<void>;
|
|
2603
|
+
/**
|
|
2604
|
+
* Read the database's document summary buffer configuration from the
|
|
2605
|
+
* synced `dbsetup` document. Resolves to `null` when it has never been
|
|
2606
|
+
* configured (the host then uses the default auto-include config).
|
|
2607
|
+
* Requires the `read` capability.
|
|
2608
|
+
*/
|
|
2609
|
+
getSummarySetup(): Promise<MindooDBAppSummarySetup | null>;
|
|
2610
|
+
/**
|
|
2611
|
+
* Write the database's document summary buffer configuration (persisted
|
|
2612
|
+
* in the synced `dbsetup` document, so it applies on every replica). A
|
|
2613
|
+
* change triggers a resumable background re-extraction; documents are
|
|
2614
|
+
* never rewritten, and queries report `coverage: "rebuilding"` until it
|
|
2615
|
+
* finishes. Pass `null` to fall back to the default auto-include config.
|
|
2616
|
+
*
|
|
2617
|
+
* Typical use: `include` nested fields a list UI needs (e.g. an array of
|
|
2618
|
+
* objects), so `documents.query` can return them instead of the app
|
|
2619
|
+
* calling `documents.get` per document.
|
|
2620
|
+
*
|
|
2621
|
+
* Requires the `update` capability; idempotent like
|
|
2622
|
+
* {@link setFulltextSetup}.
|
|
2623
|
+
*/
|
|
2624
|
+
setSummarySetup(config: MindooDBAppSummarySetup | null): Promise<void>;
|
|
2408
2625
|
}
|
|
2409
2626
|
/** Request to open a host-owned encrypted channel to a tenant-joined service. */
|
|
2410
2627
|
interface MindooDBAppSealedChannelOpenInput {
|
|
@@ -2632,6 +2849,34 @@ interface MindooDBAppSession {
|
|
|
2632
2849
|
* still lose whatever was buffered.
|
|
2633
2850
|
*/
|
|
2634
2851
|
onBeforeClose(listener: () => void | Promise<void>): () => void;
|
|
2852
|
+
/**
|
|
2853
|
+
* Ask Haven to treat this launch as the focused surface.
|
|
2854
|
+
*
|
|
2855
|
+
* A click inside the iframe already does this. Call it when the app should
|
|
2856
|
+
* take focus without a click, for example after the user picks this app
|
|
2857
|
+
* from an in-app list.
|
|
2858
|
+
*/
|
|
2859
|
+
requestHostFocus(): Promise<void>;
|
|
2860
|
+
/**
|
|
2861
|
+
* True only when this launch is the surface the user is looking at: the
|
|
2862
|
+
* focused tile on the active workspace page, or this launch open as a
|
|
2863
|
+
* standalone runner. A background tile, another page, or another app is
|
|
2864
|
+
* false. Use this before `notify()` so a long task stays quiet while the
|
|
2865
|
+
* user is already looking at the app.
|
|
2866
|
+
*/
|
|
2867
|
+
hasHostFocus(): Promise<boolean>;
|
|
2868
|
+
/**
|
|
2869
|
+
* Fires when {@link hasHostFocus} would change, so a long task can decide
|
|
2870
|
+
* whether to notify without polling. Returns an unsubscribe function.
|
|
2871
|
+
*/
|
|
2872
|
+
onHostFocusChange(listener: (focused: boolean) => void): () => void;
|
|
2873
|
+
/**
|
|
2874
|
+
* Ask Haven to show a notice. The headline is the app name Haven already
|
|
2875
|
+
* knows; `text` is the body. Pass the same `id` to update that notice in
|
|
2876
|
+
* place. Omit `id` to add a new notice. A notice from this launch cannot
|
|
2877
|
+
* replace one from another launch.
|
|
2878
|
+
*/
|
|
2879
|
+
notify(input: MindooDBAppNotifyInput): Promise<MindooDBAppNotifyResult>;
|
|
2635
2880
|
/**
|
|
2636
2881
|
* Tear down the session: close the bridge port and release all host-side
|
|
2637
2882
|
* resources of this launch (navigators, live queries, streams). The
|
|
@@ -2650,4 +2895,4 @@ interface MindooDBAppBridge {
|
|
|
2650
2895
|
connect(options?: MindooDBAppBridgeConnectOptions): Promise<MindooDBAppSession>;
|
|
2651
2896
|
}
|
|
2652
2897
|
|
|
2653
|
-
export { type
|
|
2898
|
+
export { type MindooDBAppBridgeRpcRequest as $, type MindooDBAppAttachmentApi as A, type MindooDBAppAttachmentChunk as B, type MindooDBAppAttachmentInfo as C, type MindooDBAppAttachmentPreviewOptions as D, type MindooDBAppAttachmentPreviewSession as E, type MindooDBAppAutomergeChangesPatch as F, type MindooDBAppAutomergeChangesSince as G, type MindooDBAppAutomergeGetOptions as H, type MindooDBAppAutomergePatchResult as I, type MindooDBAppAutomergeSnapshot as J, type MindooDBAppBridgeBeforeCloseAck as K, type MindooDBAppBridgeBeforeCloseMessage as L, type MindooDBAppAttachmentPreviewMode as M, type MindooDBAppBridgeConnectMessage as N, type MindooDBAppBridgeConnectOptions as O, type MindooDBAppBridgeConnectedMessage as P, type MindooDBAppBridgeDragDropMessage as Q, type MindooDBAppBridgeDragLeaveMessage as R, type MindooDBAppBridgeDragOverMessage as S, type MindooDBAppBridgeErrorPayload as T, type MindooDBAppBridgeHandshakeErrorMessage as U, type MindooDBAppBridgeHostFocusChangedMessage as V, type MindooDBAppBridgeLocaleChangedMessage as W, type MindooDBAppBridgePortMessage as X, type MindooDBAppBridgeQueryResultMessage as Y, type MindooDBAppBridgeRpcError as Z, type MindooDBAppBridgeRpcMessage as _, type MindooDBAppDragBindSourceOptions as a, type MindooDBAppEntryProvenance as a$, type MindooDBAppBridgeRpcSuccess as a0, type MindooDBAppBridgeShortcutInvokedMessage as a1, type MindooDBAppBridgeShortcutsChangedMessage as a2, type MindooDBAppBridgeStreamAbortRequest as a3, type MindooDBAppBridgeStreamAck as a4, type MindooDBAppBridgeStreamCloseRequest as a5, type MindooDBAppBridgeStreamError as a6, type MindooDBAppBridgeStreamMessage as a7, type MindooDBAppBridgeStreamOpenResult as a8, type MindooDBAppBridgeStreamReadRequest as a9, type MindooDBAppDefinitionDatabase as aA, type MindooDBAppDefinitionListing as aB, type MindooDBAppDefinitionPermission as aC, type MindooDBAppDefinitionRegistrationPermission as aD, type MindooDBAppDefinitionScreenshot as aE, type MindooDBAppDefinitionValidation as aF, type MindooDBAppDirectoryApi as aG, type MindooDBAppDirectoryEntry as aH, type MindooDBAppDocumentApi as aI, type MindooDBAppDocumentHeadCursorResult as aJ, type MindooDBAppDocumentHistoryEntry as aK, type MindooDBAppDocumentListQuery as aL, type MindooDBAppDocumentListResult as aM, type MindooDBAppDocumentQuery as aN, type MindooDBAppDocumentRevisionId as aO, type MindooDBAppDocumentScanPreset as aP, type MindooDBAppDocumentSummary as aQ, type MindooDBAppDragApi as aR, type MindooDBAppDragCancelReason as aS, type MindooDBAppDragDropEvent as aT, type MindooDBAppDragEffect as aU, type MindooDBAppDragHoverResult as aV, type MindooDBAppDragOffer as aW, type MindooDBAppDragOverEvent as aX, type MindooDBAppDragPointer as aY, type MindooDBAppDragProfile as aZ, type MindooDBAppEntryAttachmentRef as a_, type MindooDBAppBridgeStreamWriteRequest as aa, type MindooDBAppBridgeThemeChangedMessage as ab, type MindooDBAppBridgeUiPreferencesChangedMessage as ac, type MindooDBAppBridgeViewChangedMessage as ad, type MindooDBAppBridgeViewportChangedMessage as ae, type MindooDBAppBridgeWorkspaceFocusRequestedMessage as af, type MindooDBAppCapability as ag, type MindooDBAppConfiguredViewCategorizationStyle as ah, type MindooDBAppConfiguredViewColumn as ai, type MindooDBAppConfiguredViewColumnRole as aj, type MindooDBAppConfiguredViewExpressionMode as ak, type MindooDBAppConfiguredViewFieldExpression as al, type MindooDBAppConfiguredViewFilterDefinition as am, type MindooDBAppConfiguredViewFilterMode as an, type MindooDBAppConfiguredViewFilterRule as ao, type MindooDBAppConfiguredViewFormulaExpression as ap, type MindooDBAppConfiguredViewFormulaFilterDefinition as aq, type MindooDBAppConfiguredViewPreviewMode as ar, type MindooDBAppConfiguredViewRuleFilterDefinition as as, type MindooDBAppConfiguredViewRuleMatchMode as at, type MindooDBAppConfiguredViewRuleOperator as au, type MindooDBAppConfiguredViewValueExpression as av, type MindooDBAppCreateKeyInfo as aw, type MindooDBAppCreateViewInput as ax, type MindooDBAppCreateViewNavigatorInput as ay, type MindooDBAppDatabaseInfo as az, type MindooDBAppDragStartInput as b, type MindooDBAppRichTextSpliceStep as b$, type MindooDBAppExtractDocumentTextInput as b0, type MindooDBAppExtractDocumentTextResult as b1, type MindooDBAppExtractTextFormat as b2, type MindooDBAppExtractionSetup as b3, type MindooDBAppFulltextSetup as b4, type MindooDBAppHistoricalDocument as b5, type MindooDBAppHistoryQuery as b6, type MindooDBAppHostTheme as b7, type MindooDBAppIdentityApi as b8, type MindooDBAppInaccessibleDocument as b9, type MindooDBAppMenuSeparatorItem as bA, type MindooDBAppNotificationSeverity as bB, type MindooDBAppNotifyInput as bC, type MindooDBAppNotifyResult as bD, type MindooDBAppProposeAppInput as bE, type MindooDBAppProposeAppResult as bF, type MindooDBAppQueryCoverage as bG, type MindooDBAppQueryInclude as bH, type MindooDBAppQueryIncludeCardinality as bI, type MindooDBAppQueryIncludeSlots as bJ, type MindooDBAppQueryResult as bK, type MindooDBAppQueryRow as bL, type MindooDBAppQuerySortKey as bM, type MindooDBAppQueryTextClause as bN, type MindooDBAppReadableAttachmentStream as bO, type MindooDBAppRecipientOptions as bP, type MindooDBAppResolvedViewDefinition as bQ, type MindooDBAppResolvedViewSource as bR, type MindooDBAppRevisionPhase as bS, type MindooDBAppRevisionVerification as bT, type MindooDBAppRichTextBlockSpan as bU, type MindooDBAppRichTextGetOptions as bV, type MindooDBAppRichTextImmutableString as bW, type MindooDBAppRichTextMarkRange as bX, type MindooDBAppRichTextMaterializeValue as bY, type MindooDBAppRichTextPatch as bZ, type MindooDBAppRichTextScalar as b_, type MindooDBAppInaccessibleDocumentListQuery as ba, type MindooDBAppInaccessibleDocumentListResult as bb, type MindooDBAppJsonCounterIncrementPatch as bc, type MindooDBAppJsonListDeletePatch as bd, type MindooDBAppJsonListInsertPatch as be, type MindooDBAppJsonPatch as bf, type MindooDBAppJsonSetPatch as bg, type MindooDBAppJsonTextMarkPatch as bh, type MindooDBAppJsonTextSplicePatch as bi, type MindooDBAppJsonTextUnmarkPatch as bj, type MindooDBAppJsonUnsetPatch as bk, type MindooDBAppLaunchContext as bl, type MindooDBAppLiveQuerySubscription as bm, type MindooDBAppLocalizedText as bn, type MindooDBAppMenuAnchor as bo, type MindooDBAppMenuApi as bp, type MindooDBAppMenuCommandItem as bq, type MindooDBAppMenuDismissReason as br, type MindooDBAppMenuDismissedResult as bs, type MindooDBAppMenuItem as bt, type MindooDBAppMenuKind as bu, type MindooDBAppMenuPlacement as bv, type MindooDBAppMenuPointAnchor as bw, type MindooDBAppMenuRect as bx, type MindooDBAppMenuRectAnchor as by, type MindooDBAppMenuSelectionResult as bz, type MindooDBAppDragStartResult as c, type MindooDBAppRichTextStep as c0, type MindooDBAppRichTextStepPatch as c1, type MindooDBAppRichTextTextSpan as c2, type MindooDBAppRuntime as c3, type MindooDBAppScanAttachmentOptions as c4, type MindooDBAppScanAttachmentResult as c5, type MindooDBAppScopedDocId as c6, type MindooDBAppScopedDocumentSummary as c7, type MindooDBAppSealIntent as c8, type MindooDBAppSealedChannelOpenInput as c9, type MindooDBAppViewEntry as cA, type MindooDBAppViewEntryKind as cB, type MindooDBAppViewNavigator as cC, type MindooDBAppViewNavigatorExpansionState as cD, type MindooDBAppViewNavigatorOpenOptions as cE, type MindooDBAppViewNavigatorPageOptions as cF, type MindooDBAppViewNavigatorPageResult as cG, type MindooDBAppViewNavigatorRangeQuery as cH, type MindooDBAppViewNavigatorSelectionState as cI, type MindooDBAppViewUpdateStats as cJ, type MindooDBAppViewport as cK, type MindooDBAppWellKnownDragType as cL, type MindooDBAppWritableAttachmentStream as cM, resolveMindooDBAppDefinitionUrl as cN, resolveMindooDBAppListingAssetUrl as cO, resolveMindooDBAppLocalizedText as cP, validateMindooDBAppDefinition as cQ, type MindooDBAppSealedChannelOpenResult as ca, type MindooDBAppSealedChannelRequestInput as cb, type MindooDBAppSession as cc, type MindooDBAppShowMenuInput as cd, type MindooDBAppShowMenuResult as ce, type MindooDBAppSignPreview as cf, type MindooDBAppSignPreviewScope as cg, type MindooDBAppSignStatementInput as ch, type MindooDBAppSignStatementResult as ci, type MindooDBAppStorageApi as cj, type MindooDBAppSummarySetup as ck, type MindooDBAppTextCursorOptions as cl, type MindooDBAppTextCursorPosition as cm, type MindooDBAppTextCursorPositionsResult as cn, type MindooDBAppTextCursorsResult as co, type MindooDBAppTextEdit as cp, type MindooDBAppTextPatch as cq, type MindooDBAppThemeMode as cr, type MindooDBAppTimestampApi as cs, type MindooDBAppTimestampInput as ct, type MindooDBAppTimestampProvider as cu, type MindooDBAppTimestampResult as cv, type MindooDBAppUiPreferences as cw, type MindooDBAppUpdateDocumentInput as cx, type MindooDBAppViewCursorDocumentListResult as cy, type MindooDBAppViewCursorResult as cz, type MindooDBAppDragPreview as d, type MindooDBAppBridge as e, type MindooDBAppHostShortcutBinding as f, type MindooDBAppHostShortcutAction as g, type MindooDBAppHostingMode as h, type MindooDBAppDefinition as i, type MindooDBAppDatabase as j, type MindooDBAppDocument as k, type MindooDBAppRichTextSpan as l, type MindooDBAppRichTextSnapshot as m, type MindooDBAppCreateDocumentInput as n, MINDOODB_APP_DEFINITION_FILE_NAME as o, MINDOODB_APP_DEFINITION_FORMAT as p, MINDOODB_APP_DEFINITION_PERMISSIONS as q, MINDOODB_APP_DEFINITION_REGISTRATION_PERMISSIONS as r, MINDOODB_APP_DEFINITION_VERSION as s, MINDOODB_APP_LISTING_DESCRIPTION_MAX as t, MINDOODB_APP_LISTING_MAX_SCREENSHOTS as u, MINDOODB_APP_LISTING_SUMMARY_MAX as v, MINDOODB_APP_SEAL_SIGNING_DOMAIN as w, MINDOODB_APP_WELL_KNOWN_DRAG_TYPES as x, type MindooDBAppAccessDecision as y, type MindooDBAppAccessTier as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mindoodb-app-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.53",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=22.13.0"
|
|
6
6
|
},
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@automerge/automerge": "^3.3.2",
|
|
48
|
-
"mindoodb": ">=0.0.
|
|
48
|
+
"mindoodb": ">=0.0.69"
|
|
49
49
|
},
|
|
50
50
|
"peerDependenciesMeta": {
|
|
51
51
|
"@automerge/automerge": {
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@automerge/automerge": "^3.3.2",
|
|
60
|
-
"mindoodb": "^0.0.
|
|
60
|
+
"mindoodb": "^0.0.69",
|
|
61
61
|
"@types/node": "25.5.0",
|
|
62
62
|
"jsdom": "^29.0.1",
|
|
63
63
|
"tsup": "^8.5.1",
|