Skip to content

Commit b00e8f6

Browse files
committed
Update to framer-plugin 3.1.0
1 parent 7c49a0d commit b00e8f6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

plugins/notion/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@notionhq/client": "^2.2.15",
1616
"@tanstack/react-query": "^5.29.2",
1717
"classnames": "^2.5.1",
18-
"framer-plugin": "^2.0.4",
18+
"framer-plugin": "^3.1.0",
1919
"react": "^18",
2020
"react-dom": "^18",
2121
"react-error-boundary": "^4.0.13",
@@ -35,6 +35,6 @@
3535
"tailwindcss": "^3.4.3",
3636
"typescript": "^5.3.3",
3737
"vite": "^6",
38-
"vite-plugin-framer": "^1.0.1"
38+
"vite-plugin-framer": "^1.0.7"
3939
}
4040
}

plugins/notion/src/notion.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
RichTextItemResponse,
1515
} from "@notionhq/client/build/src/api-endpoints"
1616
import { useMutation, useQuery } from "@tanstack/react-query"
17-
import { CollectionItemData, framer, ManagedCollection, ManagedCollectionField } from "framer-plugin"
17+
import { CollectionItemData, framer, ManagedCollection, ManagedCollectionField, FieldData } from "framer-plugin"
1818
import pLimit from "p-limit"
1919
import { blocksToHtml, richTextToHTML } from "./blocksToHTML"
2020
import { assert, assertNever, formatDate, isDefined, isString, slugify } from "./utils"
@@ -506,7 +506,7 @@ async function processItem(
506506
): Promise<CollectionItemData | null> {
507507
let slugValue: null | string = null
508508

509-
const fieldData: Record<string, unknown> = {}
509+
const fieldData: FieldData = {}
510510

511511
assert(isFullPage(item))
512512

@@ -539,12 +539,12 @@ async function processItem(
539539
})
540540
}
541541

542-
fieldData[field.id] = fieldValue
542+
fieldData[field.id] = { type: field.type, value: fieldValue }
543543
}
544544

545545
if (fieldsById.has(pageContentProperty.id) && item.id) {
546546
const contentHTML = await getPageBlocksAsRichText(item.id)
547-
fieldData[pageContentProperty.id] = contentHTML
547+
fieldData[pageContentProperty.id] = { type: "formattedText", value: contentHTML }
548548
}
549549

550550
if (!slugValue) {

0 commit comments

Comments
 (0)