roamjs-components 0.75.1 → 0.76.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/components/ExtensionApiContext.d.ts +8 -0
- package/components/TokenDialog.d.ts +1 -1
- package/package.json +3 -4
- package/scripts/index.js +1 -2
- package/scripts/index.js.map +1 -1
- package/types/index.d.ts +8 -2
- package/types/native.d.ts +15 -0
- package/util/env.js +1 -1
- package/util/env.js.map +1 -1
|
@@ -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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "roamjs-components",
|
|
3
3
|
"description": "Expansive toolset, utilities, & components for developing RoamJS extensions.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.76.1",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
"tslib": "2.2.0"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
+
"@samepage/scripts": "^0.56.7",
|
|
50
|
+
"@testing-library/react": "^12.1.5",
|
|
49
51
|
"aws-sdk-plus": "^0.5.3",
|
|
50
52
|
"color": "^4.0.1",
|
|
51
53
|
"date-fns": "^2.27.0",
|
|
@@ -53,13 +55,10 @@
|
|
|
53
55
|
"fuzzy": "^0.1.3",
|
|
54
56
|
"hast-util-to-html": "^7.1.3",
|
|
55
57
|
"refractor": "^3.3.1",
|
|
56
|
-
"roamjs-scripts": "^0.26.23",
|
|
57
58
|
"xregexp": "^5.0.1"
|
|
58
59
|
},
|
|
59
60
|
"devDependencies": {
|
|
60
61
|
"@esbuild-plugins/node-modules-polyfill": "^0.1.4",
|
|
61
|
-
"@testing-library/react": "^11.2.7",
|
|
62
|
-
"@testing-library/user-event": "^13.1.9",
|
|
63
62
|
"@types/aws-lambda": "^8.10.89",
|
|
64
63
|
"@types/color": "^3.0.2",
|
|
65
64
|
"@types/mime-types": "^2.1.1",
|
package/scripts/index.js
CHANGED
|
@@ -23,6 +23,5 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
__setModuleDefault(result, mod);
|
|
24
24
|
return result;
|
|
25
25
|
};
|
|
26
|
-
|
|
27
|
-
Promise.resolve().then(() => __importStar(require("roamjs-scripts")));
|
|
26
|
+
Promise.resolve().then(() => __importStar(require("@samepage/scripts/cli")));
|
|
28
27
|
//# sourceMappingURL=index.js.map
|
package/scripts/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scripts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scripts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAO,uBAAuB,IAAE"}
|
package/types/index.d.ts
CHANGED
|
@@ -122,10 +122,10 @@ declare global {
|
|
|
122
122
|
addCommand: (action: {
|
|
123
123
|
label: string;
|
|
124
124
|
callback: () => void;
|
|
125
|
-
}) => void
|
|
125
|
+
}) => Promise<void>;
|
|
126
126
|
removeCommand: (action: {
|
|
127
127
|
label: string;
|
|
128
|
-
}) => void
|
|
128
|
+
}) => Promise<void>;
|
|
129
129
|
};
|
|
130
130
|
blockContextMenu: {
|
|
131
131
|
addCommand: (action: {
|
|
@@ -151,6 +151,12 @@ declare global {
|
|
|
151
151
|
renderBlock: (args: {
|
|
152
152
|
uid: string;
|
|
153
153
|
el: HTMLElement;
|
|
154
|
+
zoomPath?: boolean;
|
|
155
|
+
}) => null;
|
|
156
|
+
renderPage: (args: {
|
|
157
|
+
uid: string;
|
|
158
|
+
el: HTMLElement;
|
|
159
|
+
hideMentions?: boolean;
|
|
154
160
|
}) => null;
|
|
155
161
|
};
|
|
156
162
|
mainWindow: {
|
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;
|
package/util/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Some developers may use roamjs-components without
|
|
2
|
+
// Some developers may use roamjs-components without RoamJS scripting, in which case
|
|
3
3
|
// envs wont be interpolated. best way to deal with that afaik is to try to get the value
|
|
4
4
|
// catch defaulting to a known value
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
package/util/env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/util/env.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/util/env.ts"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,yFAAyF;AACzF,oCAAoC;;;AAEpC,wFAAwF;AACxF,0BAA0B;AAEnB,MAAM,UAAU,GAAG,CAAC,YAAY,GAAG,YAAY,EAAE,EAAE;IACxD,IAAI;QACF,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,YAAY,CAAC;KAC7C;IAAC,WAAM;QACN,OAAO,YAAY,CAAC;KACrB;AACH,CAAC,CAAC;AANW,QAAA,UAAU,cAMrB;AAEK,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,IAAI;QACF,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,IAAA,kBAAU,EAAC,EAAE,CAAC,CAAC;KAC5E;IAAC,WAAM;QACN,OAAO,IAAA,kBAAU,EAAC,EAAE,CAAC,CAAC;KACvB;AACH,CAAC,CAAC;AANW,QAAA,mBAAmB,uBAM9B;AAEK,MAAM,YAAY,GAAG,GAAG,EAAE;IAC/B,MA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