Skip to content

Commit 47fb259

Browse files
🐵
1 parent 26b0dbe commit 47fb259

File tree

11 files changed

+48
-31
lines changed

11 files changed

+48
-31
lines changed

examples/minimal/tsconfig.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
{
22
"compilerOptions": {
3-
"target": "es2016",
4-
"lib": ["dom", "esnext"],
5-
"allowJs": false,
3+
"target": "ES2017",
4+
"lib": ["dom", "dom.iterable", "esnext"],
5+
"allowJs": true,
66
"skipLibCheck": true,
77
"strict": false,
88
"forceConsistentCasingInFileNames": true,
9-
"experimentalDecorators": true,
109
"noEmit": true,
1110
"esModuleInterop": true,
1211
"module": "esnext",
13-
"moduleResolution": "node",
12+
"moduleResolution": "bundler",
1413
"resolveJsonModule": true,
1514
"isolatedModules": true,
1615
"jsx": "preserve",

packages/notion-client/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"scripts": {
2020
"build": "tsup",
2121
"watch": "tsup --watch --silent --onSuccess 'echo build successful'",
22+
"clean": "del build",
2223
"test": "run-s test:*",
2324
"test:lint": "eslint .",
2425
"test:typecheck": "tsc --noEmit",

packages/notion-compat/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"scripts": {
2020
"build": "tsup",
2121
"watch": "tsup --watch --silent --onSuccess 'echo build successful'",
22+
"clean": "del build",
2223
"test": "run-s test:*",
2324
"test:lint": "eslint .",
2425
"test:typecheck": "tsc --noEmit",

packages/notion-types/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"scripts": {
2020
"build": "tsup",
2121
"watch": "tsup --watch --silent --onSuccess 'echo build successful'",
22+
"clean": "del build",
2223
"test": "run-s test:*",
2324
"test:lint": "eslint .",
2425
"test:typecheck": "tsc --noEmit"

packages/notion-utils/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"scripts": {
2626
"build": "tsup",
2727
"watch": "tsup --watch --silent --onSuccess 'echo build successful'",
28+
"clean": "del build",
2829
"test": "run-s test:*",
2930
"test:lint": "eslint .",
3031
"test:typecheck": "tsc --noEmit",

packages/react-notion-x/package.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,34 @@
1010
"module": "./build/index.js",
1111
"types": "./build/index.d.ts",
1212
"sideEffects": false,
13+
"exports": {
14+
".": {
15+
"types": "./build/index.d.ts",
16+
"import": "./build/index.js"
17+
},
18+
"./build/third-party/code": {
19+
"types": "./build//third-party/code.d.ts",
20+
"import": "./build//third-party/code.js"
21+
},
22+
"./build/third-party/collection": {
23+
"types": "./build//third-party/collection.d.ts",
24+
"import": "./build//third-party/collection.js"
25+
},
26+
"./build/third-party/equation": {
27+
"types": "./build//third-party/equation.d.ts",
28+
"import": "./build//third-party/equation.js"
29+
},
30+
"./build/third-party/modal": {
31+
"types": "./build//third-party/modal.d.ts",
32+
"import": "./build//third-party/modal.js"
33+
},
34+
"./build/third-party/pdf": {
35+
"types": "./build//third-party/pdf.d.ts",
36+
"import": "./build//third-party/pdf.js"
37+
},
38+
"./styles.css": "./src/styles.css",
39+
"./src/styles.css": "./src/styles.css"
40+
},
1341
"files": [
1442
"build",
1543
"src/styles.css"
@@ -20,6 +48,7 @@
2048
"scripts": {
2149
"build": "tsup",
2250
"watch": "tsup --watch --silent --onSuccess 'echo build successful'",
51+
"clean": "del build",
2352
"test": "run-s test:*",
2453
"test:lint": "eslint .",
2554
"test:typecheck": "tsc --noEmit"

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ export function Text({
249249
const externalObjectInstance = recordMap.block[blockId]
250250
?.value as ExternalObjectInstance
251251

252+
console.log('eoi', blockId, externalObjectInstance)
252253
return <EOI block={externalObjectInstance} inline={true} />
253254
}
254255

packages/react-notion-x/src/context.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,6 @@ const defaultComponents: NotionComponents = {
144144
Embed: DefaultEmbed
145145
}
146146

147-
console.log('DefaultHeader', { DefaultHeader, Header, defaultComponents })
148-
149147
const defaultNotionContext: NotionContext = {
150148
recordMap: {
151149
block: {},

packages/react-notion-x/src/renderer.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ export function NotionBlockRenderer({
149149

150150
return null
151151
}
152-
console.log('NotionBlockRenderer', { id, block })
153152

154153
return (
155154
<Block key={id} level={level} block={block} {...props}>
Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { defineConfig, type Options } from 'tsup'
1+
import { defineConfig } from 'tsup'
22

3-
const baseConfig: Options = {
3+
export default defineConfig({
44
entry: [
55
'src/index.tsx',
66
'src/third-party/code.tsx',
@@ -14,22 +14,9 @@ const baseConfig: Options = {
1414
platform: 'browser',
1515
format: ['esm'],
1616
splitting: false,
17-
shims: false
18-
}
19-
20-
export default defineConfig([
21-
{
22-
...baseConfig,
23-
outDir: 'build/dev',
24-
minify: false,
25-
sourcemap: true,
26-
dts: true
27-
},
28-
{
29-
...baseConfig,
30-
outDir: 'build',
31-
minify: false,
32-
sourcemap: false,
33-
dts: true
34-
}
35-
])
17+
shims: false,
18+
dts: true,
19+
minify: false,
20+
sourcemap: true,
21+
external: ['react', 'react-dom']
22+
})

0 commit comments

Comments
 (0)