Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NotionX/react-notion-x
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 621e966049fd755079e6f1a62cae825e9fbeeddd
Choose a base ref
...
head repository: NotionX/react-notion-x
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v6.15.8
Choose a head ref
  • 10 commits
  • 12 files changed
  • 3 contributors

Commits on Sep 5, 2022

  1. Copy the full SHA
    570155d View commit details

Commits on Oct 17, 2022

  1. 🐠

    transitive-bullshit committed Oct 17, 2022
    2
    Copy the full SHA
    16d1870 View commit details

Commits on Nov 13, 2022

  1. 2
    Copy the full SHA
    ed82e58 View commit details
  2. 🎧

    transitive-bullshit committed Nov 13, 2022
    Copy the full SHA
    436591c View commit details
  3. chore: prettier

    transitive-bullshit committed Nov 13, 2022
    1
    Copy the full SHA
    9f22b45 View commit details
  4. v6.15.7

    transitive-bullshit committed Nov 13, 2022
    2
    Copy the full SHA
    3aef81f View commit details

Commits on Feb 4, 2023

  1. Copy the full SHA
    aaa2402 View commit details
  2. Copy the full SHA
    130d0c3 View commit details
  3. Merge pull request #430 from NotionX/fix-new-image-src-error

    Hot fix -  new image src with file.notion.so not working
    normdoow authored Feb 4, 2023
    2
    Copy the full SHA
    c8b4422 View commit details
  4. v6.15.8

    normdoow committed Feb 4, 2023
    2
    Copy the full SHA
    d531d12 View commit details
6 changes: 3 additions & 3 deletions examples/cra/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "notion-x-example-cra",
"version": "6.15.4",
"version": "6.15.8",
"private": true,
"scripts": {
"dev": "GENERATE_SOURCEMAP=false react-scripts start",
@@ -12,10 +12,10 @@
"@types/node": "^16.11.26",
"@types/react": "^17.0.43",
"@types/react-dom": "^17.0.14",
"notion-types": "^6.15.4",
"notion-types": "^6.15.6",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-notion-x": "^6.15.4",
"react-notion-x": "^6.15.8",
"react-scripts": "5.0.0",
"typescript": "^4.6.3"
},
10 changes: 5 additions & 5 deletions examples/full/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "notion-x-example-full",
"version": "6.15.5",
"version": "6.15.8",
"private": true,
"type": "commonjs",
"scripts": {
@@ -18,14 +18,14 @@
"got": "^12.0.2",
"lqip-modern": "^1.2.0",
"next": "^12.1.0",
"notion-client": "^6.15.5",
"notion-compat": "^6.15.5",
"notion-utils": "^6.15.4",
"notion-client": "^6.15.6",
"notion-compat": "^6.15.6",
"notion-utils": "^6.15.6",
"p-map": "^5.3.0",
"p-memoize": "^6.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-notion-x": "^6.15.4",
"react-notion-x": "^6.15.8",
"react-tweet-embed": "^2.0.0"
},
"devDependencies": {
8 changes: 4 additions & 4 deletions examples/minimal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "notion-x-example-minimal",
"version": "6.15.5",
"version": "6.15.8",
"private": true,
"type": "commonjs",
"scripts": {
@@ -11,11 +11,11 @@
},
"dependencies": {
"next": "^12.1.0",
"notion-client": "^6.15.5",
"notion-utils": "^6.15.4",
"notion-client": "^6.15.6",
"notion-utils": "^6.15.6",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-notion-x": "^6.15.4"
"react-notion-x": "^6.15.8"
},
"devDependencies": {
"@types/node": "^16.11.2",
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "6.15.5",
"version": "6.15.8",
"npmClient": "yarn",
"useWorkspaces": true,
"packages": [
4 changes: 2 additions & 2 deletions packages/notion-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "notion-client",
"version": "6.15.5",
"version": "6.15.8",
"type": "module",
"description": "Robust TypeScript client for the unofficial Notion API.",
"repository": "NotionX/react-notion-x",
@@ -24,7 +24,7 @@
"dependencies": {
"got": "^11.8.1",
"notion-types": "^6.15.4",
"notion-utils": "^6.15.4",
"notion-utils": "^6.15.8",
"p-map": "^5.3.0"
},
"ava": {
6 changes: 3 additions & 3 deletions packages/notion-compat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "notion-compat",
"version": "6.15.5",
"version": "6.15.8",
"type": "module",
"description": "Compatibility layer between the official Notion API and unofficial private API.",
"repository": "NotionX/react-notion-x",
@@ -23,12 +23,12 @@
},
"dependencies": {
"notion-types": "^6.15.4",
"notion-utils": "^6.15.4",
"notion-utils": "^6.15.8",
"p-queue": "^7.2.0"
},
"devDependencies": {
"@notionhq/client": "^1.0.4",
"notion-client": "^6.15.5"
"notion-client": "^6.15.8"
},
"peerDependencies": {
"@notionhq/client": "^1.0.4"
2 changes: 1 addition & 1 deletion packages/notion-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "notion-utils",
"version": "6.15.4",
"version": "6.15.8",
"type": "module",
"description": "Useful utilities for working with Notion data. Isomorphic.",
"repository": "NotionX/react-notion-x",
5 changes: 4 additions & 1 deletion packages/notion-utils/src/get-page-image-urls.ts
Original file line number Diff line number Diff line change
@@ -23,7 +23,10 @@ export const getPageImageUrls = (
if (block) {
if (block.type === 'image') {
const signedUrl = recordMap.signed_urls?.[block.id]
const source = signedUrl || block.properties?.source?.[0]?.[0]
let source = signedUrl || block.properties?.source?.[0]?.[0]
if (source.includes('file.notion.so')) {
source = block.properties?.source?.[0]?.[0]
}

if (source) {
images.push({
4 changes: 2 additions & 2 deletions packages/react-notion-x/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-notion-x",
"version": "6.15.4",
"version": "6.15.8",
"type": "module",
"description": "Fast and accurate React renderer for Notion.",
"repository": "NotionX/react-notion-x",
@@ -26,7 +26,7 @@
"@matejmazur/react-katex": "^3.1.3",
"katex": "^0.15.3",
"notion-types": "^6.15.4",
"notion-utils": "^6.15.4",
"notion-utils": "^6.15.8",
"prismjs": "^1.27.0",
"react-fast-compare": "^3.2.0",
"react-hotkeys-hook": "^3.0.3",
7 changes: 5 additions & 2 deletions packages/react-notion-x/src/components/asset.tsx
Original file line number Diff line number Diff line change
@@ -124,7 +124,7 @@ export const Asset: React.FC<{
}
}

const source =
let source =
recordMap.signed_urls?.[block.id] || block.properties?.source?.[0]?.[0]
let content = null

@@ -258,7 +258,10 @@ export const Asset: React.FC<{
}
} else if (block.type === 'image') {
// console.log('image', block)

//kind of a hack for now. New file.notion.so images aren't signed correctly
if (source.includes('file.notion.so')) {
source = block.properties?.source?.[0]?.[0]
}
const src = mapImageUrl(source, block as Block)
const caption = getTextContent(block.properties?.caption)
const alt = caption || 'notion image'
5 changes: 3 additions & 2 deletions packages/react-notion-x/src/third-party/property.tsx
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ import * as React from 'react'
import * as types from 'notion-types'
import format from 'date-fns/format/index.js'
import formatNumber from 'format-number'
import { FormulaResult } from 'notion-types'

import { Checkbox } from '../components/checkbox'
import { GracefulImage } from '../components/graceful-image'
@@ -77,10 +78,10 @@ export const PropertyImpl: React.FC<IPropertyProps> = (props) => {
const renderFormulaValue = React.useMemo(
() =>
function FormulaProperty() {
let content: string
let content: FormulaResult | null

try {
let content = evalFormula(schema.formula, {
content = evalFormula(schema.formula, {
schema: collection?.schema,
properties: block?.properties
})
54 changes: 54 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -9602,6 +9602,41 @@ normalize-url@^7.0.3:
resolved "https://registry.npmjs.org/normalize-url/-/normalize-url-7.0.3.tgz"
integrity sha512-RiCOdwdPnzvwcBFJE4iI1ss3dMVRIrEzFpn8ftje6iBfzBInqlnRrNhxcLwBEKjPPXQKzm1Ptlxtaiv9wdcj5w==

notion-client@^6.15.6:
version "6.15.6"
resolved "https://registry.yarnpkg.com/notion-client/-/notion-client-6.15.6.tgz#3dfd0cbd8d2256bdbc93b5549d9cb86e3c33ced3"
integrity sha512-/ze9bHNhi09IvSo+loAelGVf2VsrnPaXoGtea/VUQq0adTvgcQhC1u37BwaK5G8bS/crVC277+KWlgdJOBIxeQ==
dependencies:
got "^11.8.1"
notion-types "^6.15.6"
notion-utils "^6.15.6"
p-map "^5.3.0"

notion-compat@^6.15.6:
version "6.15.6"
resolved "https://registry.yarnpkg.com/notion-compat/-/notion-compat-6.15.6.tgz#5cf110407a95db45330dd49488d74b76a3506fba"
integrity sha512-M5jzca7JiinoTY7xIiLkfsbX6mpK/YiZlHnFUE3WlLxiQRItpgTTMp3BiH3Sq6L2lc28OSUT+y0u2QrFius2Ng==
dependencies:
notion-types "^6.15.6"
notion-utils "^6.15.6"
p-queue "^7.2.0"

notion-types@^6.15.6:
version "6.15.6"
resolved "https://registry.yarnpkg.com/notion-types/-/notion-types-6.15.6.tgz#eabbb28e1c514f421f0ffbf06ecdecd90e8ec8e3"
integrity sha512-JgLWDN4oHg/1sNdHDCeKUfdPl1AYsjOTnYkq+Zn7vITPykxbhw7nIxbAJ7owWUTro1cYTPh+GVmdX0mPiZGujg==

notion-utils@^6.15.6:
version "6.15.6"
resolved "https://registry.yarnpkg.com/notion-utils/-/notion-utils-6.15.6.tgz#d172faa2c29d62eac71b4e17ed01336d5e372d02"
integrity sha512-Ys7lQ5KWmrk9ZmpFquomQcVRdQqmZMRAl0aFhoqirVgeyKtq/i5IZoHCw8jCY8732WlaEAUnBid56nN33N2fRQ==
dependencies:
is-url-superb "^6.1.0"
mem "^9.0.2"
normalize-url "^7.0.3"
notion-types "^6.15.6"
p-queue "^7.2.0"

npm-bundled@^1.1.1:
version "1.1.2"
resolved "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz"
@@ -11241,6 +11276,25 @@ react-modal@^3.14.3:
react-lifecycles-compat "^3.0.0"
warning "^4.0.3"

react-notion-x@^6.15.6:
version "6.15.6"
resolved "https://registry.yarnpkg.com/react-notion-x/-/react-notion-x-6.15.6.tgz#af42e836dce9f5d3ece97f2796c09608c49347de"
integrity sha512-s8FVh8bs2vb32VLvPq21V0rjeWtF+U6Fudaxfx9yA6vVvQ5kgF9RRyc7eNlKpLPfq/HMEqLE52hZW+ecQ15PZQ==
dependencies:
"@fisch0920/medium-zoom" "^1.0.7"
"@matejmazur/react-katex" "^3.1.3"
katex "^0.15.3"
notion-types "^6.15.6"
notion-utils "^6.15.6"
prismjs "^1.27.0"
react-fast-compare "^3.2.0"
react-hotkeys-hook "^3.0.3"
react-image "^4.0.3"
react-lazy-images "^1.1.0"
react-modal "^3.14.3"
react-pdf "^5.7.1"
react-use "^17.3.1"

react-pdf@^5.7.1:
version "5.7.1"
resolved "https://registry.npmjs.org/react-pdf/-/react-pdf-5.7.1.tgz"