Skip to content

Commit 4d8b46a

Browse files
authored
Update roamjs-components to version 0.86.4 and adjust TypeScript dependencies in pnpm-lock.yaml. Refactor useRoamStore to utilize the updated API for page updates. (#701)
1 parent 3f0be24 commit 4d8b46a

3 files changed

Lines changed: 84 additions & 27 deletions

File tree

apps/roam/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"react-draggable": "4.4.5",
6969
"react-in-viewport": "1.0.0-alpha.20",
7070
"react-vertical-timeline-component": "3.5.2",
71-
"roamjs-components": "0.86.3",
71+
"roamjs-components": "0.86.4",
7272
"tldraw": "2.3.0",
7373
"use-sync-external-store": "1.5.0",
7474
"xregexp": "^5.0.0",

apps/roam/src/components/canvas/useRoamStore.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ export const useRoamStore = ({
223223
const newstateId = nanoid();
224224
localStateIds.current.push(newstateId);
225225
localStateIds.current.splice(0, localStateIds.current.length - 25);
226-
void window.roamAlphaAPI.updateBlock({
227-
block: {
226+
void window.roamAlphaAPI.data.page.update({
227+
page: {
228228
uid: pageUid,
229229
props: {
230230
...props,
@@ -278,8 +278,8 @@ export const useRoamStore = ({
278278
typeof props["roamjs-query-builder"] === "object"
279279
? (props["roamjs-query-builder"] as Record<string, unknown>)
280280
: {};
281-
void window.roamAlphaAPI.updateBlock({
282-
block: {
281+
void window.roamAlphaAPI.data.page.update({
282+
page: {
283283
uid: pageUid,
284284
props: {
285285
...props,

pnpm-lock.yaml

Lines changed: 79 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)