roamjs-components 0.75.0 → 0.76.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.
|
@@ -17,6 +17,14 @@ export declare const useExtensionAPI: () => {
|
|
|
17
17
|
};
|
|
18
18
|
set: (k: string, v: unknown) => Promise<void>;
|
|
19
19
|
};
|
|
20
|
+
ui?: {
|
|
21
|
+
commandPalette: {
|
|
22
|
+
addCommand: (c: import("../types").AddCommandOptions) => Promise<void>;
|
|
23
|
+
removeCommand: (c: {
|
|
24
|
+
label: string;
|
|
25
|
+
}) => Promise<void>;
|
|
26
|
+
};
|
|
27
|
+
} | undefined;
|
|
20
28
|
} | undefined;
|
|
21
29
|
export declare const useVersion: () => string | undefined;
|
|
22
30
|
declare const ExtensionApiContextProvider: React.FC<React.PropsWithChildren<OnloadArgs>>;
|
|
@@ -6,6 +6,6 @@ declare const TokenDialog: ({ onClose, onEnter }: {
|
|
|
6
6
|
onClose: () => void;
|
|
7
7
|
} & Props) => JSX.Element;
|
|
8
8
|
export declare const render: (props: Props) => (() => void) | undefined;
|
|
9
|
-
export declare const addTokenDialogCommand: (props?: Props) => void
|
|
9
|
+
export declare const addTokenDialogCommand: (props?: Props) => Promise<void>;
|
|
10
10
|
export declare const checkRoamJSTokenWarning: () => Promise<string>;
|
|
11
11
|
export default TokenDialog;
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { RegisterCommand, UnregisterCommand } from "./smartblocks";
|
|
|
4
4
|
import type marked from "marked";
|
|
5
5
|
import type Markdown from "marked-react";
|
|
6
6
|
import type JSZip from "jszip";
|
|
7
|
+
import type cytoscape from "cytoscape";
|
|
7
8
|
export * from "./native";
|
|
8
9
|
export declare type Registry = {
|
|
9
10
|
elements: HTMLElement[];
|
|
@@ -33,6 +34,25 @@ declare global {
|
|
|
33
34
|
JSZip: () => Promise<typeof JSZip>;
|
|
34
35
|
Marked: () => Promise<typeof marked>;
|
|
35
36
|
MarkedReact: () => Promise<typeof Markdown>;
|
|
37
|
+
Cytoscape: () => Promise<typeof cytoscape>;
|
|
38
|
+
Insect: () => Promise<{
|
|
39
|
+
commands: string[];
|
|
40
|
+
fmtConsole: (M: unknown) => unknown;
|
|
41
|
+
fmtJqueryTerminal: (M: unknown) => unknown;
|
|
42
|
+
fmtPlain: (M: unknown) => unknown;
|
|
43
|
+
functions: (M: unknown) => unknown;
|
|
44
|
+
identifiers: (M: unknown) => unknown;
|
|
45
|
+
initialEnvironment: {
|
|
46
|
+
values: unknown;
|
|
47
|
+
functions: unknown;
|
|
48
|
+
};
|
|
49
|
+
repl: (fmt: (M: unknown) => unknown) => (env: {
|
|
50
|
+
values: unknown;
|
|
51
|
+
functions: unknown;
|
|
52
|
+
}) => (s: string) => {
|
|
53
|
+
msg: string;
|
|
54
|
+
};
|
|
55
|
+
}>;
|
|
36
56
|
};
|
|
37
57
|
roamAlphaAPI: {
|
|
38
58
|
q: (query: string, ...params: unknown[]) => unknown[][];
|
|
@@ -102,10 +122,10 @@ declare global {
|
|
|
102
122
|
addCommand: (action: {
|
|
103
123
|
label: string;
|
|
104
124
|
callback: () => void;
|
|
105
|
-
}) => void
|
|
125
|
+
}) => Promise<void>;
|
|
106
126
|
removeCommand: (action: {
|
|
107
127
|
label: string;
|
|
108
|
-
}) => void
|
|
128
|
+
}) => Promise<void>;
|
|
109
129
|
};
|
|
110
130
|
blockContextMenu: {
|
|
111
131
|
addCommand: (action: {
|
|
@@ -131,6 +151,12 @@ declare global {
|
|
|
131
151
|
renderBlock: (args: {
|
|
132
152
|
uid: string;
|
|
133
153
|
el: HTMLElement;
|
|
154
|
+
zoomPath?: boolean;
|
|
155
|
+
}) => null;
|
|
156
|
+
renderPage: (args: {
|
|
157
|
+
uid: string;
|
|
158
|
+
el: HTMLElement;
|
|
159
|
+
hideMentions?: boolean;
|
|
134
160
|
}) => null;
|
|
135
161
|
};
|
|
136
162
|
mainWindow: {
|
package/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;AA0BA,mDAAyB"}
|
package/types/native.d.ts
CHANGED
|
@@ -352,6 +352,15 @@ declare type PanelConfig = {
|
|
|
352
352
|
action: Action;
|
|
353
353
|
}[];
|
|
354
354
|
};
|
|
355
|
+
export declare type AddCommandOptions = {
|
|
356
|
+
label: string;
|
|
357
|
+
callback: () => void;
|
|
358
|
+
disableHotkey?: boolean;
|
|
359
|
+
defaultHotkey?: string | string[];
|
|
360
|
+
};
|
|
361
|
+
declare type RemoveCommandOptions = {
|
|
362
|
+
label: string;
|
|
363
|
+
};
|
|
355
364
|
export declare type OnloadArgs = {
|
|
356
365
|
extensionAPI: {
|
|
357
366
|
settings: {
|
|
@@ -362,6 +371,12 @@ export declare type OnloadArgs = {
|
|
|
362
371
|
};
|
|
363
372
|
set: (k: string, v: unknown) => Promise<void>;
|
|
364
373
|
};
|
|
374
|
+
ui?: {
|
|
375
|
+
commandPalette: {
|
|
376
|
+
addCommand: (c: AddCommandOptions) => Promise<void>;
|
|
377
|
+
removeCommand: (c: RemoveCommandOptions) => Promise<void>;
|
|
378
|
+
};
|
|
379
|
+
};
|
|
365
380
|
};
|
|
366
381
|
extension: {
|
|
367
382
|
version: string;
|