roamjs-components 0.73.0 → 0.73.3

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.
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { OnloadArgs } from "../types";
3
- export declare const useExtensionApi: () => {
3
+ export declare const useExtensionAPI: () => {
4
4
  settings: {
5
5
  get: (k: string) => unknown;
6
6
  getAll: () => Record<string, unknown>;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useVersion = exports.useExtensionApi = void 0;
3
+ exports.useVersion = exports.useExtensionAPI = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
6
  const ExtensionApiContext = react_1.default.createContext(undefined);
7
- const useExtensionApi = () => { var _a; return (_a = (0, react_1.useContext)(ExtensionApiContext)) === null || _a === void 0 ? void 0 : _a.extensionAPI; };
8
- exports.useExtensionApi = useExtensionApi;
7
+ const useExtensionAPI = () => { var _a; return (_a = (0, react_1.useContext)(ExtensionApiContext)) === null || _a === void 0 ? void 0 : _a.extensionAPI; };
8
+ exports.useExtensionAPI = useExtensionAPI;
9
9
  const useVersion = () => { var _a; return (_a = (0, react_1.useContext)(ExtensionApiContext)) === null || _a === void 0 ? void 0 : _a.extension.version; };
10
10
  exports.useVersion = useVersion;
11
11
  const ExtensionApiContextProvider = (_a) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "roamjs-components",
3
3
  "description": "Description for roamjs-components",
4
- "version": "0.73.0",
4
+ "version": "0.73.3",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
7
7
  "scripts": {
package/types/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AddPullWatch, PullBlock, SidebarAction, SidebarWindow, SidebarWindowInput, WriteAction } from "./native";
2
- import { RegisterSelection, ParseQuery, FireQuery, ConditionToDatalog, RegisterDatalogTranslator, ResultsViewComponent, QueryEditorComponent, ExportDialogComponent, QueryPageComponent } from "./query-builder";
2
+ import { RegisterSelection, ParseQuery, FireQuery, ConditionToDatalog, RegisterDatalogTranslator, ResultsViewComponent, QueryEditorComponent, ExportDialogComponent, QueryPageComponent, RunQuery, ListActiveQueries } from "./query-builder";
3
3
  import { SamePageApi } from "./samepage";
4
4
  import { RegisterCommand, UnregisterCommand } from "./smartblocks";
5
5
  import type marked from "marked";
@@ -195,6 +195,8 @@ declare global {
195
195
  key: string;
196
196
  }) => void;
197
197
  registerSelection: RegisterSelection;
198
+ runQuery: RunQuery;
199
+ listActiveQueries: ListActiveQueries;
198
200
  };
199
201
  versioning?: {
200
202
  switch: (args: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/types/index.ts"],"names":[],"mappings":";;;AAwBA,mDAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/types/index.ts"],"names":[],"mappings":";;;AA0BA,mDAAyB"}
@@ -31,10 +31,6 @@ export declare type Selection = {
31
31
  label: string;
32
32
  uid: string;
33
33
  };
34
- export declare type Result = {
35
- text: string;
36
- uid: string;
37
- } & Record<string, string | number | Date>;
38
34
  export declare type ExportTypes = {
39
35
  name: string;
40
36
  callback: (args: {
@@ -118,4 +114,12 @@ export declare type RegisterDatalogTranslator = (args: {
118
114
  placeholder?: string;
119
115
  isVariable?: true;
120
116
  }) => void;
117
+ export declare type Result = {
118
+ text: string;
119
+ uid: string;
120
+ } & Record<`${string}-uid`, string> & Record<string, string | number | Date>;
121
+ export declare type RunQuery = (parentUid: string) => Promise<Result[]>;
122
+ export declare type ListActiveQueries = () => {
123
+ uid: string;
124
+ }[];
121
125
  export {};