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: notion-client@7.0.1
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: 214bc903e882aba058807920bea7f577efef1608
Choose a head ref
  • 9 commits
  • 27 files changed
  • 2 contributors

Commits on Nov 2, 2024

  1. fixed pnpm dev

    rimonhanna committed Nov 2, 2024
    Copy the full SHA
    3e1bd96 View commit details

Commits on Nov 3, 2024

  1. Merge pull request #575 from Tekunda/master

    transitive-bullshit authored Nov 3, 2024
    Copy the full SHA
    8c1cada View commit details

Commits on Nov 7, 2024

  1. feat: move react-pdf to be optional dep

    transitive-bullshit committed Nov 7, 2024
    Copy the full SHA
    c78ead6 View commit details
  2. Merge pull request #579 from NotionX/fix/move-react-pdf-to-optional

    transitive-bullshit authored Nov 7, 2024
    Copy the full SHA
    4611def View commit details
  3. chore: changeset bump

    transitive-bullshit committed Nov 7, 2024
    Copy the full SHA
    6b5e0c4 View commit details
  4. 🗃

    transitive-bullshit committed Nov 7, 2024
    Copy the full SHA
    c4021b4 View commit details

Commits on Nov 8, 2024

  1. Copy the full SHA
    eb7dccc View commit details
  2. chore: changeset

    transitive-bullshit committed Nov 8, 2024
    Copy the full SHA
    03e40dc View commit details
  3. fix: full example

    transitive-bullshit committed Nov 8, 2024
    Copy the full SHA
    214bc90 View commit details
19 changes: 19 additions & 0 deletions examples/cra/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# notion-x-example-cra

## 7.1.0

### Minor Changes

- Move some utils into notion-utils

### Patch Changes

- Updated dependencies
- notion-types@7.1.0
- react-notion-x@7.2.0

## 7.0.2

### Patch Changes

- Updated dependencies
- react-notion-x@7.1.0

## 7.0.1

### Major Changes
2 changes: 1 addition & 1 deletion examples/cra/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "notion-x-example-cra",
"version": "7.0.1",
"version": "7.1.0",
"private": true,
"scripts": {
"dev": "DISABLE_ESLINT_PLUGIN=true GENERATE_SOURCEMAP=false react-scripts start",
22 changes: 22 additions & 0 deletions examples/full/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# notion-x-example-full

## 7.1.0

### Minor Changes

- Move some utils into notion-utils

### Patch Changes

- Updated dependencies
- notion-client@7.1.0
- notion-compat@7.1.0
- notion-types@7.1.0
- notion-utils@7.1.0
- react-notion-x@7.2.0

## 7.0.2

### Patch Changes

- Updated dependencies
- react-notion-x@7.1.0

## 7.0.1

### Major Changes
3 changes: 1 addition & 2 deletions examples/full/components/NotionPage.tsx
Original file line number Diff line number Diff line change
@@ -100,7 +100,6 @@ export function NotionPage({
}

const title = getPageTitle(recordMap)
console.log(title, recordMap)

// useful for debugging from the dev console
if (typeof window !== 'undefined') {
@@ -152,7 +151,7 @@ export function NotionPage({
previewImages={previewImagesEnabled}
components={{
// NOTE (transitive-bullshit 3/12/2023): I'm disabling next/image for this repo for now because the amount of traffic started costing me hundreds of dollars a month in Vercel image optimization costs. I'll probably re-enable it in the future if I can find a better solution.
// nextImage: Image,
// nextLegacyImage: Image,
nextLink: Link,
Code,
Collection,
4 changes: 2 additions & 2 deletions examples/full/lib/preview-images.ts
Original file line number Diff line number Diff line change
@@ -5,10 +5,10 @@ import {
type PreviewImage,
type PreviewImageMap
} from 'notion-types'
import { getPageImageUrls } from 'notion-utils'
import { defaultMapImageUrl, getPageImageUrls } from 'notion-utils'
import pMap from 'p-map'
import pMemoize from 'p-memoize'
import { defaultMapImageUrl } from 'react-notion-x'
import {} from 'react-notion-x'

// NOTE: this is just an example of how to pre-compute preview images.
// Depending on how many images you're working with, this can potentially be
2 changes: 1 addition & 1 deletion examples/full/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "notion-x-example-full",
"version": "7.0.1",
"version": "7.1.0",
"private": true,
"type": "module",
"scripts": {
3 changes: 1 addition & 2 deletions examples/full/pages/[pageId].tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { type ExtendedRecordMap } from 'notion-types'
import { getAllPagesInSpace } from 'notion-utils'
import { defaultMapPageUrl } from 'react-notion-x'
import { defaultMapPageUrl, getAllPagesInSpace } from 'notion-utils'

import { NotionPage } from '../components/NotionPage'
import {
21 changes: 21 additions & 0 deletions examples/minimal/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# notion-x-example-minimal

## 7.1.0

### Minor Changes

- Move some utils into notion-utils

### Patch Changes

- Updated dependencies
- notion-client@7.1.0
- notion-types@7.1.0
- notion-utils@7.1.0
- react-notion-x@7.2.0

## 7.0.2

### Patch Changes

- Updated dependencies
- react-notion-x@7.1.0

## 7.0.1

### Major Changes
1 change: 0 additions & 1 deletion examples/minimal/components/NotionPage.tsx
Original file line number Diff line number Diff line change
@@ -15,7 +15,6 @@ export function NotionPage({
}

const title = getPageTitle(recordMap)
console.log(title, recordMap)

return (
<>
2 changes: 1 addition & 1 deletion examples/minimal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "notion-x-example-minimal",
"version": "7.0.1",
"version": "7.1.0",
"private": true,
"type": "module",
"scripts": {
12 changes: 12 additions & 0 deletions packages/notion-client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# notion-client

## 7.1.0

### Minor Changes

- Move some utils into notion-utils

### Patch Changes

- Updated dependencies
- notion-types@7.1.0
- notion-utils@7.1.0

## 7.0.1

### Major Changes
3 changes: 2 additions & 1 deletion packages/notion-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "notion-client",
"version": "7.0.1",
"version": "7.1.0",
"type": "module",
"description": "Robust TypeScript client for the unofficial Notion API.",
"repository": "NotionX/react-notion-x",
@@ -18,6 +18,7 @@
},
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"watch": "tsup --watch --silent --onSuccess 'echo build successful'",
"clean": "del build",
"test": "run-s test:*",
12 changes: 12 additions & 0 deletions packages/notion-compat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# notion-compat

## 7.1.0

### Minor Changes

- Move some utils into notion-utils

### Patch Changes

- Updated dependencies
- notion-types@7.1.0
- notion-utils@7.1.0

## 7.0.1

### Major Changes
3 changes: 2 additions & 1 deletion packages/notion-compat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "notion-compat",
"version": "7.0.1",
"version": "7.1.0",
"type": "module",
"description": "Compatibility layer between the official Notion API and unofficial private API.",
"repository": "NotionX/react-notion-x",
@@ -18,6 +18,7 @@
},
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"watch": "tsup --watch --silent --onSuccess 'echo build successful'",
"clean": "del build",
"test": "run-s test:*",
6 changes: 6 additions & 0 deletions packages/notion-types/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# notion-types

## 7.1.0

### Minor Changes

- Move some utils into notion-utils

## 7.0.1

### Major Changes
3 changes: 2 additions & 1 deletion packages/notion-types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "notion-types",
"version": "7.0.1",
"version": "7.1.0",
"type": "module",
"description": "TypeScript types for core Notion data structures.",
"repository": "NotionX/react-notion-x",
@@ -18,6 +18,7 @@
},
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"watch": "tsup --watch --silent --onSuccess 'echo build successful'",
"clean": "del build",
"test": "run-s test:*",
11 changes: 11 additions & 0 deletions packages/notion-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# notion-utils

## 7.1.0

### Minor Changes

- Move some utils into notion-utils

### Patch Changes

- Updated dependencies
- notion-types@7.1.0

## 7.0.1

### Major Changes
3 changes: 2 additions & 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": "7.0.1",
"version": "7.1.0",
"type": "module",
"description": "Useful utilities for working with Notion data. Isomorphic.",
"repository": "NotionX/react-notion-x",
@@ -24,6 +24,7 @@
},
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"watch": "tsup --watch --silent --onSuccess 'echo build successful'",
"clean": "del build",
"test": "run-s test:*",
2 changes: 2 additions & 0 deletions packages/notion-utils/src/index.ts
Original file line number Diff line number Diff line change
@@ -17,6 +17,8 @@ export * from './get-page-title'
export * from './get-text-content'
export * from './id-to-uuid'
export * from './is-url'
export * from './map-image-url'
export * from './map-page-url'
export * from './merge-record-maps'
export * from './normalize-title'
export * from './normalize-url'
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions packages/react-notion-x/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# react-notion-x

## 7.2.0

### Minor Changes

- Move some utils into notion-utils

### Patch Changes

- Updated dependencies
- notion-types@7.1.0
- notion-utils@7.1.0

## 7.1.0

### Minor Changes

- Move react-pdf to be optional

## 7.0.1

### Major Changes
12 changes: 8 additions & 4 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": "7.0.1",
"version": "7.2.0",
"type": "module",
"description": "Fast and accurate React renderer for Notion.",
"repository": "NotionX/react-notion-x",
@@ -47,6 +47,7 @@
},
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"watch": "tsup --watch --silent --onSuccess 'echo build successful'",
"clean": "del build",
"test": "run-s test:*",
@@ -64,8 +65,7 @@
"react-hotkeys-hook": "^4.5.1",
"react-image": "^4.0.3",
"react-lazy-images": "^1.1.0",
"react-modal": "^3.14.3",
"react-pdf": "^9.1.1"
"react-modal": "^3.14.3"
},
"devDependencies": {
"@types/lodash.throttle": "^4.1.6",
@@ -75,10 +75,14 @@
"clipboard-copy": "^4.0.1",
"date-fns": "^4.1.0",
"format-number": "^3.0.0",
"lodash.throttle": "^4.1.1"
"lodash.throttle": "^4.1.1",
"react-pdf": "^9.1.1"
},
"peerDependencies": {
"react": ">=18",
"react-dom": ">=18"
},
"optionalDependencies": {
"react-pdf": "^9.1.1"
}
}
2 changes: 1 addition & 1 deletion packages/react-notion-x/src/context.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { type ExtendedRecordMap } from 'notion-types'
import { defaultMapImageUrl, defaultMapPageUrl } from 'notion-utils'
import * as React from 'react'

import { AssetWrapper } from './components/asset-wrapper'
@@ -11,7 +12,6 @@ import {
type NotionComponents,
type SearchNotionFn
} from './types'
import { defaultMapImageUrl, defaultMapPageUrl } from './utils'

export interface NotionContext {
recordMap: ExtendedRecordMap
2 changes: 0 additions & 2 deletions packages/react-notion-x/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { type BlockMap } from 'notion-types'

export * from './map-image-url'
export * from './map-page-url'
export { formatDate, formatNotionDateTime, isUrl } from 'notion-utils'

export const cs = (...classes: Array<string | undefined | false>) =>
3 changes: 2 additions & 1 deletion packages/react-notion-x/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -17,5 +17,6 @@ export default defineConfig({
shims: false,
dts: true,
minify: false,
sourcemap: true
sourcemap: true,
external: ['react-pdf']
})
Loading