From 3867212148300c838fd7c3a331fd26bea4f46992 Mon Sep 17 00:00:00 2001 From: Michael Gartner Date: Sun, 8 Mar 2026 17:52:45 -0600 Subject: [PATCH 1/2] Update type definitions in `index.ts` to include missing commas for improved TypeScript compliance and add new React component types for `Block`, `Page`, `Search`, and `BlockString`. --- src/types/index.ts | 52 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 9 deletions(-) diff --git a/src/types/index.ts b/src/types/index.ts index 873f57e..d7f3a0d 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -29,7 +29,7 @@ export type Registry = { type: keyof WindowEventMap; listener: ( this: Window, - ev: WindowEventMap[keyof WindowEventMap] + ev: WindowEventMap[keyof WindowEventMap], ) => void; } | { @@ -37,7 +37,7 @@ export type Registry = { type: keyof DocumentEventMap; listener: ( this: Document, - ev: DocumentEventMap[keyof DocumentEventMap] + ev: DocumentEventMap[keyof DocumentEventMap], ) => void; } | { @@ -45,7 +45,7 @@ export type Registry = { type: keyof HTMLElementEventMap | `roamjs:${string}`; listener: ( this: HTMLElement, - ev: HTMLElementEventMap[keyof HTMLElementEventMap] + ev: HTMLElementEventMap[keyof HTMLElementEventMap], ) => void; } )[]; @@ -71,7 +71,7 @@ declare global { identifiers: (M: unknown) => unknown; initialEnvironment: { values: unknown; functions: unknown }; repl: ( - fmt: (M: unknown) => unknown + fmt: (M: unknown) => unknown, ) => (env: { values: unknown; functions: unknown; @@ -84,7 +84,7 @@ declare global { q: (query: string, ...params: unknown[]) => unknown[][]; pull: ( selector: string, - id: number | string | [string, string] + id: number | string | [string, string], ) => PullBlock; createBlock: WriteAction; updateBlock: WriteAction; @@ -119,11 +119,11 @@ declare global { q: (query: string, ...params: unknown[]) => Promise; pull: ( selector: string, - id: number | string | [string, string] + id: number | string | [string, string], ) => Promise; pull_many: ( pattern: string, - eids: string[][] + eids: string[][], ) => Promise; fast: { q: (query: string, ...params: unknown[]) => Promise; @@ -139,14 +139,14 @@ declare global { }; pull: ( selector: string, - id: number | string | [string, string] + id: number | string | [string, string], ) => PullBlock; pull_many: (pattern: string, eids: string[][]) => PullBlock[]; q: (query: string, ...params: unknown[]) => unknown[][]; removePullWatch: ( pullPattern: string, entityId: string, - callback?: (before: PullBlock, after: PullBlock) => void + callback?: (before: PullBlock, after: PullBlock) => void, ) => boolean; redo: () => void; undo: () => void; @@ -277,6 +277,39 @@ declare global { }) => Promise; unmountNode: (args: { el: HTMLElement }) => Promise; }; + react: { + Block: (props: { + uid: string; + open?: boolean; + zoomPath?: boolean; + zoomStartAfterUid?: string; + }) => JSX.Element; + Page: (props: + | { + uid: string; + title?: never; + hideMentions?: boolean; + } + | { + uid?: never; + title: string; + hideMentions?: boolean; + }) => JSX.Element; + Search: (props: { + searchQueryStr: string; + closed?: boolean; + groupByPage?: boolean; + hidePaths?: boolean; + onConfigChange?: (config: { + closed?: boolean; + groupByPage?: boolean; + hidePaths?: boolean; + }) => void; + }) => JSX.Element; + BlockString: (props: { + string: string; + }) => JSX.Element; + }; graphView: { addCallback: (props: { label: string; @@ -370,3 +403,4 @@ declare global { }; } } + From 3ff4f6353bfb4b4f5b9ff9ee879b01b26cce23c9 Mon Sep 17 00:00:00 2001 From: Michael Gartner Date: Sun, 8 Mar 2026 17:53:02 -0600 Subject: [PATCH 2/2] 0.87.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3ffef0c..7864ca7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "roamjs-components", - "version": "0.86.7", + "version": "0.87.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "roamjs-components", - "version": "0.86.7", + "version": "0.87.0", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index c0c4414..771ecdd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "roamjs-components", "description": "Expansive toolset, utilities, & components for developing RoamJS extensions.", - "version": "0.86.7", + "version": "0.87.0", "main": "index.js", "types": "index.d.ts", "scripts": {