Skip to content

Commit e9629b6

Browse files
📯
1 parent 34956d3 commit e9629b6

File tree

17 files changed

+96
-176
lines changed

17 files changed

+96
-176
lines changed

examples/full/next.config.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
// eslint-disable-next-line @typescript-eslint/no-var-requires
2-
const withBundleAnalyzer = require('@next/bundle-analyzer')({
3-
enabled: process.env.ANALYZE === 'true'
4-
})
5-
6-
module.exports = withBundleAnalyzer({
1+
export default {
72
staticPageGenerationTimeout: 300,
83
images: {
94
domains: [
@@ -15,4 +10,4 @@ module.exports = withBundleAnalyzer({
1510
],
1611
formats: ['image/avif', 'image/webp']
1712
}
18-
})
13+
}

examples/full/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
"dev": "next dev",
88
"build": "next build",
99
"start": "next start",
10-
"analyze": "cross-env ANALYZE=true next build",
11-
"analyze:server": "cross-env BUNDLE_ANALYZE=server next build",
12-
"analyze:browser": "cross-env BUNDLE_ANALYZE=browser next build",
1310
"deploy": "vercel deploy",
1411
"test": "run-s test:*",
1512
"test:lint": "eslint ."
@@ -32,7 +29,6 @@
3229
"react-tweet-embed": "^2.0.0"
3330
},
3431
"devDependencies": {
35-
"@next/bundle-analyzer": "^15.0.2",
3632
"cross-env": "^7.0.3"
3733
}
3834
}

examples/full/turbo.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": ["//"],
3+
"tasks": {
4+
"build": {
5+
"outputs": [".next/**", "!.next/cache/**"]
6+
}
7+
}
8+
}

examples/minimal/next.config.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
// eslint-disable-next-line @typescript-eslint/no-var-requires
2-
const withBundleAnalyzer = require('@next/bundle-analyzer')({
3-
enabled: process.env.ANALYZE === 'true'
4-
})
5-
6-
module.exports = withBundleAnalyzer({
1+
export default {
72
staticPageGenerationTimeout: 300,
83
images: {
94
domains: [
@@ -14,4 +9,4 @@ module.exports = withBundleAnalyzer({
149
],
1510
formats: ['image/avif', 'image/webp']
1611
}
17-
})
12+
}

examples/minimal/turbo.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": ["//"],
3+
"tasks": {
4+
"build": {
5+
"outputs": [".next/**", "!.next/cache/**"]
6+
}
7+
}
8+
}

packages/notion-types/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"repository": "NotionX/react-notion-x",
77
"author": "Travis Fischer <[email protected]>",
88
"license": "MIT",
9+
"main": "./build/index.js",
10+
"module": "./build/index.js",
911
"types": "./build/index.d.ts",
1012
"sideEffects": false,
1113
"files": [

packages/react-notion-x/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
"dependencies": {
2828
"@fisch0920/medium-zoom": "^1.0.7",
2929
"@matejmazur/react-katex": "^3.1.3",
30-
"katex": "^0.15.6",
30+
"katex": "^0.16.11",
3131
"notion-types": "workspace:*",
3232
"notion-utils": "workspace:*",
3333
"prismjs": "^1.27.0",
3434
"react-fast-compare": "^3.2.0",
35-
"react-hotkeys-hook": "^3.4.7",
35+
"react-hotkeys-hook": "^4.5.1",
3636
"react-image": "^4.0.3",
3737
"react-lazy-images": "^1.1.0",
3838
"react-modal": "^3.14.3",
@@ -45,7 +45,7 @@
4545
"@types/react": "^18.3.12",
4646
"@types/react-modal": "^3.16.3",
4747
"clipboard-copy": "^4.0.1",
48-
"date-fns": "^2.28.0",
48+
"date-fns": "^2.30.0",
4949
"format-number": "^3.0.0",
5050
"lodash.throttle": "^4.1.1"
5151
},

packages/react-notion-x/src/components/asset-wrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export const AssetWrapper: React.FC<{
6262
target={
6363
captionHostname &&
6464
captionHostname !== rootDomain &&
65-
!caption.startsWith('/')
65+
!caption?.startsWith('/')
6666
? 'blank_'
6767
: null
6868
}

packages/react-notion-x/src/components/asset.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export const Asset: React.FC<{
135135
const src = source
136136
if (!src) return null
137137

138-
const id = src.split('?')[0]?.split('/').pop()
138+
const id = src.split('?')?.[0]?.split('/').pop()
139139
if (!id) return null
140140

141141
content = (

packages/react-notion-x/src/components/eoi.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ export const EOI: React.FC<{
1818
return null
1919
}
2020

21-
const title = attributes.find((attr) => attr.id === 'title')?.values[0]
22-
let owner = attributes.find((attr) => attr.id === 'owner')?.values[0]
23-
const lastUpdatedAt = attributes.find((attr) => attr.id === 'updated_at')
21+
const title = attributes.find((attr: any) => attr.id === 'title')?.values[0]
22+
let owner = attributes.find((attr: any) => attr.id === 'owner')?.values[0]
23+
const lastUpdatedAt = attributes.find((attr: any) => attr.id === 'updated_at')
2424
?.values[0]
2525
const lastUpdated = lastUpdatedAt ? formatNotionDateTime(lastUpdatedAt) : null
2626
let externalImage: React.ReactNode

0 commit comments

Comments
 (0)