@texonom/nreact 1.6.4 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/block.d.ts +1 -0
- package/build/block.d.ts.map +1 -1
- package/build/index.js +69 -69
- package/build/index.js.map +1 -1
- package/build/renderer.d.ts +1 -0
- package/build/renderer.d.ts.map +1 -1
- package/package.json +3 -3
package/build/block.d.ts
CHANGED
package/build/block.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../src/block.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AA4BzB,OAAO,KAAK,EACV,KAAK,IAAI,SAAS,EASnB,MAAM,iBAAiB,CAAA;AACxB,UAAU,UAAU;IAClB,KAAK,EAAE,SAAS,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IAEb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../src/block.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AA4BzB,OAAO,KAAK,EACV,KAAK,IAAI,SAAS,EASnB,MAAM,iBAAiB,CAAA;AACxB,UAAU,UAAU;IAClB,KAAK,EAAE,SAAS,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IAEb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE1B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B;AASD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAkoBtC,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -52,7 +52,7 @@ var ie = ({ block: e, className: t }) => {
|
|
|
52
52
|
className: "notion-google-drive-body-source-icon",
|
|
53
53
|
style: { backgroundImage: `url(${a.icon})` }
|
|
54
54
|
}), o && /* @__PURE__ */ N.createElement("div", { className: "notion-google-drive-body-source-domain" }, o)))));
|
|
55
|
-
},
|
|
55
|
+
}, V = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
56
56
|
var n = "Expected a function", r = NaN, i = /^\s+|\s+$/g, a = /^[-+]0x[0-9a-f]+$/i, o = /^0b[01]+$/i, s = /^0o[0-7]+$/i, c = parseInt, l = typeof global == "object" && global && global.Object === Object && global, u = typeof self == "object" && self && self.Object === Object && self, d = l || u || Function("return this")(), f = Object.prototype.toString, p = Math.max, m = Math.min, h = function() {
|
|
57
57
|
return d.Date.now();
|
|
58
58
|
};
|
|
@@ -131,8 +131,8 @@ var ie = ({ block: e, className: t }) => {
|
|
|
131
131
|
return n || s.test(e) ? c(e.slice(2), n ? 2 : 8) : a.test(e) ? r : +e;
|
|
132
132
|
}
|
|
133
133
|
t.exports = _;
|
|
134
|
-
})))(), 1),
|
|
135
|
-
let s = N.useMemo(() => (0,
|
|
134
|
+
})))(), 1), se = ({ toc: e, activeSection: t, setActiveSection: n, pageAside: r, hasToc: i, hasAside: a, className: o }) => {
|
|
135
|
+
let s = N.useMemo(() => (0, V.default)(() => {
|
|
136
136
|
let e = document.getElementsByClassName("notion-h"), r = null, i = t;
|
|
137
137
|
for (let t = 0; t < e.length; ++t) {
|
|
138
138
|
let n = e[t];
|
|
@@ -164,16 +164,16 @@ var ie = ({ block: e, className: t }) => {
|
|
|
164
164
|
}
|
|
165
165
|
}, e.text));
|
|
166
166
|
}))), r) : null;
|
|
167
|
-
},
|
|
167
|
+
}, ce = ({ block: e, level: t }) => {
|
|
168
168
|
var n;
|
|
169
169
|
if (!e) return process.env.NODE_ENV !== "production" && console.warn("missing sync pointer block", e.id), null;
|
|
170
170
|
let r = e, i = r == null || (n = r.format) == null || (n = n.transclusion_reference_pointer) == null ? void 0 : n.id;
|
|
171
|
-
return i ? /* @__PURE__ */ N.createElement(
|
|
171
|
+
return i ? /* @__PURE__ */ N.createElement(q, {
|
|
172
172
|
key: i,
|
|
173
173
|
level: t,
|
|
174
174
|
blockId: i
|
|
175
175
|
}) : null;
|
|
176
|
-
},
|
|
176
|
+
}, le = ({ block: e }) => {
|
|
177
177
|
var t, n;
|
|
178
178
|
let { onChangeBlock: r } = w(), i = N.useRef(null), a = L((t = (n = e.properties) == null ? void 0 : n.title) == null ? [] : t), o = N.useRef(null);
|
|
179
179
|
return N.useEffect(() => {
|
|
@@ -192,8 +192,8 @@ var ie = ({ block: e, className: t }) => {
|
|
|
192
192
|
n !== o.current && (o.current = n, r == null || r(e.id, n));
|
|
193
193
|
}
|
|
194
194
|
});
|
|
195
|
-
},
|
|
196
|
-
let { className: t } = e, n = v(e,
|
|
195
|
+
}, ue = ["className"], de = (e) => {
|
|
196
|
+
let { className: t } = e, n = v(e, ue);
|
|
197
197
|
return /* @__PURE__ */ N.createElement("svg", _(_({ className: t }, n), {}, {
|
|
198
198
|
viewBox: "0 0 16 16",
|
|
199
199
|
width: "16",
|
|
@@ -202,14 +202,14 @@ var ie = ({ block: e, className: t }) => {
|
|
|
202
202
|
fillRule: "evenodd",
|
|
203
203
|
d: "M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"
|
|
204
204
|
}));
|
|
205
|
-
}, H = {},
|
|
206
|
-
let t = w(), { components: n, fullPage: r, recordMap: i, mapPageUrl: a, mapImageUrl: s, showTableOfContents: l, minTableOfContentsItems: u, defaultPageIcon: d, defaultPageCover: f, defaultPageCoverPosition: p, editable: h } = t, [g, v] = N.useState(null), { block: y, children: x, level: S, className: C, bodyClassName: E, header: O, footer: ee, pageHeader: j, pageFooter: M, pageTitle: P, pageAside: z, pageCover: B, hideBlockId:
|
|
205
|
+
}, H = {}, fe = {}, U = (e) => {
|
|
206
|
+
let t = w(), { components: n, fullPage: r, recordMap: i, mapPageUrl: a, mapImageUrl: s, showTableOfContents: l, minTableOfContentsItems: u, defaultPageIcon: d, defaultPageCover: f, defaultPageCoverPosition: p, editable: h } = t, [g, v] = N.useState(null), { block: y, children: x, level: S, className: C, bodyClassName: E, header: O, footer: ee, pageHeader: j, pageFooter: M, pageTitle: P, pageAside: z, pageCover: B, pageBody: V, hideBlockId: ue, disableHeader: U } = e;
|
|
207
207
|
if (!y) return null;
|
|
208
208
|
if (S === 0 && y.type === "collection_view") {
|
|
209
209
|
let e = y;
|
|
210
210
|
e.type = "collection_view_page";
|
|
211
211
|
}
|
|
212
|
-
let W =
|
|
212
|
+
let W = ue ? "notion-block" : `notion-block-${R(y.id)}`, G = () => h && re(y) ? /* @__PURE__ */ N.createElement(le, { block: y }) : /* @__PURE__ */ N.createElement(m, {
|
|
213
213
|
value: y.properties.title,
|
|
214
214
|
block: y
|
|
215
215
|
});
|
|
@@ -220,10 +220,10 @@ var ie = ({ block: e, className: t }) => {
|
|
|
220
220
|
let { page_icon: e = d, page_cover: a = f, page_cover_position: c = p, page_full_width: h, page_small_text: _ } = y.format || {};
|
|
221
221
|
if (r) {
|
|
222
222
|
var K, q;
|
|
223
|
-
let r = y.type === "page" ? y.properties : { title: (K = i.collection[te(y, i)]) == null || (K = K.value) == null ? void 0 : K.name }, f = `center ${(1 - (c || .5)) * 100}%`, p =
|
|
224
|
-
p || (p =
|
|
223
|
+
let r = y.type === "page" ? y.properties : { title: (K = i.collection[te(y, i)]) == null || (K = K.value) == null ? void 0 : K.name }, f = `center ${(1 - (c || .5)) * 100}%`, p = fe[f];
|
|
224
|
+
p || (p = fe[f] = { objectPosition: f });
|
|
225
225
|
let b = (q = ne(y, i)) == null ? d : q, S = b && o(b), w = I(y, i), T = l && w.length >= u, D = (T || z) && !h, F = B || a;
|
|
226
|
-
return /* @__PURE__ */ N.createElement("div", { className: `notion notion-app ${W} ${C || ""}` }, /* @__PURE__ */ N.createElement("div", { className: "notion-viewport" }), /* @__PURE__ */ N.createElement("div", { className: "notion-frame" }, !
|
|
226
|
+
return /* @__PURE__ */ N.createElement("div", { className: `notion notion-app ${W} ${C || ""}` }, /* @__PURE__ */ N.createElement("div", { className: "notion-viewport" }), /* @__PURE__ */ N.createElement("div", { className: "notion-frame" }, !U && /* @__PURE__ */ N.createElement(n.Header, { block: y }), O, /* @__PURE__ */ N.createElement("div", { className: "notion-page-scroller" }, F && (B || /* @__PURE__ */ N.createElement("div", { className: "notion-page-cover-wrapper" }, /* @__PURE__ */ N.createElement(k, {
|
|
227
227
|
src: s(a, y),
|
|
228
228
|
alt: L(r == null ? void 0 : r.title),
|
|
229
229
|
priority: !0,
|
|
@@ -248,7 +248,7 @@ var ie = ({ block: e, className: t }) => {
|
|
|
248
248
|
ctx: t
|
|
249
249
|
}), y.type !== "collection_view_page" && /* @__PURE__ */ N.createElement("div", { className: `notion-page-content
|
|
250
250
|
${D && "notion-page-content-has-aside"}
|
|
251
|
-
${T && "notion-page-content-has-toc"}` }, /* @__PURE__ */ N.createElement("article", { className: "notion-page-content-inner" }, x), D && /* @__PURE__ */ N.createElement(
|
|
251
|
+
${T && "notion-page-content-has-toc"}` }, /* @__PURE__ */ N.createElement("article", { className: "notion-page-content-inner" }, V == null ? x : V), D && /* @__PURE__ */ N.createElement(se, {
|
|
252
252
|
toc: w,
|
|
253
253
|
activeSection: g,
|
|
254
254
|
setActiveSection: v,
|
|
@@ -266,7 +266,7 @@ var ie = ({ block: e, className: t }) => {
|
|
|
266
266
|
${E}` }, /* @__PURE__ */ N.createElement("div", { className: "notion-viewport" }), j, (y.type === "collection_view_page" || y.type === "page" && y.parent_table === "collection") && /* @__PURE__ */ N.createElement(n.Collection, {
|
|
267
267
|
block: y,
|
|
268
268
|
ctx: t
|
|
269
|
-
}), y.type !== "collection_view_page" && x, M);
|
|
269
|
+
}), y.type !== "collection_view_page" && (V == null ? x : V), M);
|
|
270
270
|
}
|
|
271
271
|
{
|
|
272
272
|
var J;
|
|
@@ -279,9 +279,9 @@ var ie = ({ block: e, className: t }) => {
|
|
|
279
279
|
case "header":
|
|
280
280
|
case "sub_header":
|
|
281
281
|
case "sub_sub_header": {
|
|
282
|
-
var
|
|
282
|
+
var pe, me, he;
|
|
283
283
|
if (!y.properties) return null;
|
|
284
|
-
let e = (
|
|
284
|
+
let e = (pe = y.format) == null ? void 0 : pe.block_color, t = R(y.id), n = L(y.properties.title) || `Notion Header ${t}`, r = H[y.id], a;
|
|
285
285
|
if (r === void 0) {
|
|
286
286
|
let e = F(y, i);
|
|
287
287
|
if (e) {
|
|
@@ -298,7 +298,7 @@ var ie = ({ block: e, className: t }) => {
|
|
|
298
298
|
${W}`, u = /* @__PURE__ */ N.createElement("span", null, /* @__PURE__ */ N.createElement("div", {
|
|
299
299
|
id: t,
|
|
300
300
|
className: "notion-header-anchor"
|
|
301
|
-
}), !((
|
|
301
|
+
}), !((me = y.format) != null && me.toggleable) && /* @__PURE__ */ N.createElement("a", {
|
|
302
302
|
className: "notion-hash-link",
|
|
303
303
|
href: `#${t}`,
|
|
304
304
|
title: n
|
|
@@ -312,24 +312,24 @@ var ie = ({ block: e, className: t }) => {
|
|
|
312
312
|
}, u) : /* @__PURE__ */ N.createElement("h4", {
|
|
313
313
|
className: l,
|
|
314
314
|
"data-id": t
|
|
315
|
-
}, u), (
|
|
315
|
+
}, u), (he = y.format) != null && he.toggleable ? /* @__PURE__ */ N.createElement("details", { className: `notion-toggle ${W}` }, /* @__PURE__ */ N.createElement("summary", null, d), /* @__PURE__ */ N.createElement("div", null, x)) : d;
|
|
316
316
|
}
|
|
317
317
|
case "divider": return /* @__PURE__ */ N.createElement("hr", { className: `notion-hr ${W}` });
|
|
318
318
|
case "text": {
|
|
319
|
-
var
|
|
320
|
-
if (!y.properties && !((
|
|
321
|
-
let e = (
|
|
322
|
-
return /* @__PURE__ */ N.createElement("div", { className: `notion-text ${e && `notion-${e}`} ${W}` }, ((
|
|
319
|
+
var ge, _e, ve;
|
|
320
|
+
if (!y.properties && !((ge = y.content) != null && ge.length)) return /* @__PURE__ */ N.createElement("div", { className: `notion-blank ${W}` }, "\xA0");
|
|
321
|
+
let e = (_e = y.format) == null ? void 0 : _e.block_color;
|
|
322
|
+
return /* @__PURE__ */ N.createElement("div", { className: `notion-text ${e && `notion-${e}`} ${W}` }, ((ve = y.properties) == null ? void 0 : ve.title) && G(), x && /* @__PURE__ */ N.createElement("div", { className: "notion-text-children" }, x));
|
|
323
323
|
}
|
|
324
324
|
case "bulleted_list":
|
|
325
325
|
case "numbered_list": {
|
|
326
|
-
var
|
|
326
|
+
var Y;
|
|
327
327
|
let e = (e, t) => y.type === "bulleted_list" ? /* @__PURE__ */ N.createElement("ul", { className: `notion-list notion-list-disc ${W}` }, e) : /* @__PURE__ */ N.createElement("ol", {
|
|
328
328
|
start: t,
|
|
329
329
|
className: `notion-list notion-list-numbered ${W}`
|
|
330
330
|
}, e), t = null;
|
|
331
331
|
t = y.content ? /* @__PURE__ */ N.createElement(N.Fragment, null, y.properties && /* @__PURE__ */ N.createElement("li", null, G()), e(x)) : y.properties ? /* @__PURE__ */ N.createElement("li", null, G()) : null;
|
|
332
|
-
let n = y.type !== ((
|
|
332
|
+
let n = y.type !== ((Y = i.block[y.parent_id]) == null || (Y = Y.value) == null ? void 0 : Y.type), r = c(y.id, i.block);
|
|
333
333
|
return n ? e(t, r) : t;
|
|
334
334
|
}
|
|
335
335
|
case "embed": return /* @__PURE__ */ N.createElement(n.Embed, {
|
|
@@ -350,10 +350,10 @@ var ie = ({ block: e, className: t }) => {
|
|
|
350
350
|
block: y
|
|
351
351
|
});
|
|
352
352
|
case "drive":
|
|
353
|
-
var
|
|
354
|
-
if (!((
|
|
355
|
-
var
|
|
356
|
-
if ((
|
|
353
|
+
var ye;
|
|
354
|
+
if (!((ye = y.format) != null && ye.drive_properties)) {
|
|
355
|
+
var be;
|
|
356
|
+
if ((be = y.format) != null && be.display_source) return /* @__PURE__ */ N.createElement(T, {
|
|
357
357
|
blockId: W,
|
|
358
358
|
block: y
|
|
359
359
|
});
|
|
@@ -378,17 +378,17 @@ var ie = ({ block: e, className: t }) => {
|
|
|
378
378
|
case "code": return /* @__PURE__ */ N.createElement(n.Code, { block: y });
|
|
379
379
|
case "column_list": return /* @__PURE__ */ N.createElement("div", { className: `notion-row ${W}` }, x);
|
|
380
380
|
case "column": {
|
|
381
|
-
var
|
|
382
|
-
let e = ((
|
|
381
|
+
var xe, Se, Ce;
|
|
382
|
+
let e = ((xe = y.format) == null ? void 0 : xe.column_ratio) || .5, t = (Se = i.block[y.parent_id]) == null ? void 0 : Se.value, n = { width: `calc((100% - (${((t == null || (Ce = t.content) == null ? void 0 : Ce.length) || Math.max(2, Math.ceil(1 / e))) - 1} * min(32px, 4vw))) * ${e})` };
|
|
383
383
|
return /* @__PURE__ */ N.createElement(N.Fragment, null, /* @__PURE__ */ N.createElement("div", {
|
|
384
384
|
className: `notion-column ${W}`,
|
|
385
385
|
style: n
|
|
386
386
|
}, x), /* @__PURE__ */ N.createElement("div", { className: "notion-spacer" }));
|
|
387
387
|
}
|
|
388
388
|
case "quote": {
|
|
389
|
-
var
|
|
389
|
+
var we;
|
|
390
390
|
if (!y.properties) return null;
|
|
391
|
-
let e = (
|
|
391
|
+
let e = (we = y.format) == null ? void 0 : we.block_color;
|
|
392
392
|
return /* @__PURE__ */ N.createElement("blockquote", { className: `notion-quote ${e && `notion-${e}`} ${W}` }, /* @__PURE__ */ N.createElement("div", null, /* @__PURE__ */ N.createElement(m, {
|
|
393
393
|
value: y.properties.title,
|
|
394
394
|
block: y
|
|
@@ -400,19 +400,19 @@ var ie = ({ block: e, className: t }) => {
|
|
|
400
400
|
ctx: t
|
|
401
401
|
});
|
|
402
402
|
case "callout":
|
|
403
|
-
var
|
|
403
|
+
var Te, Ee, De;
|
|
404
404
|
return n.Callout ? /* @__PURE__ */ N.createElement(n.Callout, {
|
|
405
405
|
block: y,
|
|
406
406
|
className: W
|
|
407
|
-
}) : /* @__PURE__ */ N.createElement("div", { className: `notion-callout ${((
|
|
408
|
-
value: (
|
|
407
|
+
}) : /* @__PURE__ */ N.createElement("div", { className: `notion-callout ${((Te = y.format) == null ? void 0 : Te.block_color) && `notion-${(Ee = y.format) == null ? void 0 : Ee.block_color}_co`} ${W}` }, /* @__PURE__ */ N.createElement(A, { block: y }), /* @__PURE__ */ N.createElement("div", { className: "notion-callout-text" }, /* @__PURE__ */ N.createElement(m, {
|
|
408
|
+
value: (De = y.properties) == null ? void 0 : De.title,
|
|
409
409
|
block: y
|
|
410
410
|
}), x));
|
|
411
411
|
case "bookmark": {
|
|
412
|
-
var
|
|
412
|
+
var Oe, ke, Ae, je, Me, Ne, Pe, Fe, Ie;
|
|
413
413
|
if (!y.properties) return null;
|
|
414
414
|
let e = y.properties.link;
|
|
415
|
-
if (!e || !((
|
|
415
|
+
if (!e || !((Oe = e[0]) != null && Oe[0])) return null;
|
|
416
416
|
let t = L(y.properties.title);
|
|
417
417
|
if (t || (t = L(e)), t && t.startsWith("http")) try {
|
|
418
418
|
t = new URL(t).hostname;
|
|
@@ -420,16 +420,16 @@ var ie = ({ block: e, className: t }) => {
|
|
|
420
420
|
return /* @__PURE__ */ N.createElement("div", { className: "notion-row" }, /* @__PURE__ */ N.createElement(n.Link, {
|
|
421
421
|
target: "_blank",
|
|
422
422
|
rel: "noopener noreferrer",
|
|
423
|
-
className: `notion-bookmark ${(
|
|
423
|
+
className: `notion-bookmark ${(ke = y.format) != null && ke.block_color ? `notion-${y.format.block_color}` : ""} ${W}`,
|
|
424
424
|
href: e[0][0]
|
|
425
425
|
}, /* @__PURE__ */ N.createElement("div", null, t && /* @__PURE__ */ N.createElement("div", { className: "notion-bookmark-title" }, /* @__PURE__ */ N.createElement(m, {
|
|
426
426
|
value: [[t]],
|
|
427
427
|
block: y
|
|
428
|
-
})), ((
|
|
429
|
-
value: (
|
|
428
|
+
})), ((Ae = y.properties) == null ? void 0 : Ae.description) && /* @__PURE__ */ N.createElement("div", { className: "notion-bookmark-description" }, /* @__PURE__ */ N.createElement(m, {
|
|
429
|
+
value: (je = y.properties) == null ? void 0 : je.description,
|
|
430
430
|
block: y
|
|
431
|
-
})), /* @__PURE__ */ N.createElement("div", { className: "notion-bookmark-link" }, ((
|
|
432
|
-
src: s((
|
|
431
|
+
})), /* @__PURE__ */ N.createElement("div", { className: "notion-bookmark-link" }, ((Me = y.format) == null ? void 0 : Me.bookmark_icon) && /* @__PURE__ */ N.createElement("div", { className: "notion-bookmark-link-icon" }, /* @__PURE__ */ N.createElement(k, {
|
|
432
|
+
src: s((Ne = y.format) == null ? void 0 : Ne.bookmark_icon, y),
|
|
433
433
|
alt: t,
|
|
434
434
|
onError: (e) => {
|
|
435
435
|
let t = e.currentTarget.closest(".notion-bookmark-link-icon");
|
|
@@ -438,9 +438,9 @@ var ie = ({ block: e, className: t }) => {
|
|
|
438
438
|
})), /* @__PURE__ */ N.createElement("div", { className: "notion-bookmark-link-text" }, /* @__PURE__ */ N.createElement(m, {
|
|
439
439
|
value: e,
|
|
440
440
|
block: y
|
|
441
|
-
})))), ((
|
|
442
|
-
src: s((
|
|
443
|
-
alt: L((
|
|
441
|
+
})))), ((Pe = y.format) == null ? void 0 : Pe.bookmark_cover) && /* @__PURE__ */ N.createElement("div", { className: "notion-bookmark-image" }, /* @__PURE__ */ N.createElement(k, {
|
|
442
|
+
src: s((Fe = y.format) == null ? void 0 : Fe.bookmark_cover, y).replace(/(\/\/i\.ytimg\.com\/.*?)maxresdefault/, "$1hqdefault"),
|
|
443
|
+
alt: L((Ie = y.properties) == null ? void 0 : Ie.title),
|
|
444
444
|
style: { objectFit: "cover" },
|
|
445
445
|
onError: (e) => {
|
|
446
446
|
let t = e.currentTarget.closest(".notion-bookmark-image");
|
|
@@ -449,16 +449,16 @@ var ie = ({ block: e, className: t }) => {
|
|
|
449
449
|
}))));
|
|
450
450
|
}
|
|
451
451
|
case "toggle":
|
|
452
|
-
var
|
|
452
|
+
var Le;
|
|
453
453
|
return /* @__PURE__ */ N.createElement("details", { className: `notion-toggle ${W}` }, /* @__PURE__ */ N.createElement("summary", null, /* @__PURE__ */ N.createElement(m, {
|
|
454
|
-
value: (
|
|
454
|
+
value: (Le = y.properties) == null ? void 0 : Le.title,
|
|
455
455
|
block: y
|
|
456
456
|
})), /* @__PURE__ */ N.createElement("div", null, x));
|
|
457
457
|
case "table_of_contents": {
|
|
458
|
-
var
|
|
458
|
+
var X;
|
|
459
459
|
let e = F(y, i);
|
|
460
460
|
if (!e) return null;
|
|
461
|
-
let t = I(e, i), n = (
|
|
461
|
+
let t = I(e, i), n = (X = y.format) == null ? void 0 : X.block_color;
|
|
462
462
|
return /* @__PURE__ */ N.createElement("div", { className: `notion-table-of-contents ${n && `notion-${n}`} ${W}` }, t.map((e) => /* @__PURE__ */ N.createElement("a", {
|
|
463
463
|
key: e.id,
|
|
464
464
|
href: `#${R(e.id)}`,
|
|
@@ -472,24 +472,24 @@ var ie = ({ block: e, className: t }) => {
|
|
|
472
472
|
}, e.text))));
|
|
473
473
|
}
|
|
474
474
|
case "to_do": {
|
|
475
|
-
var Z,
|
|
475
|
+
var Z, Re;
|
|
476
476
|
let e = ((Z = y.properties) == null || (Z = Z.checked) == null || (Z = Z[0]) == null ? void 0 : Z[0]) === "Yes";
|
|
477
477
|
return /* @__PURE__ */ N.createElement("div", { className: `notion-to-do ${W}` }, /* @__PURE__ */ N.createElement("div", { className: "notion-to-do-item" }, /* @__PURE__ */ N.createElement(n.Checkbox, {
|
|
478
478
|
blockId: W,
|
|
479
479
|
isChecked: e
|
|
480
480
|
}), /* @__PURE__ */ N.createElement("div", { className: `notion-to-do-body ${e && "notion-to-do-checked"}` }, /* @__PURE__ */ N.createElement(m, {
|
|
481
|
-
value: (
|
|
481
|
+
value: (Re = y.properties) == null ? void 0 : Re.title,
|
|
482
482
|
block: y
|
|
483
483
|
}))), /* @__PURE__ */ N.createElement("div", { className: "notion-to-do-children" }, x));
|
|
484
484
|
}
|
|
485
485
|
case "transclusion_container": return /* @__PURE__ */ N.createElement("div", { className: `notion-sync-block ${W}` }, x);
|
|
486
|
-
case "transclusion_reference": return /* @__PURE__ */ N.createElement(
|
|
486
|
+
case "transclusion_reference": return /* @__PURE__ */ N.createElement(ce, _({
|
|
487
487
|
block: y,
|
|
488
488
|
level: S + 1
|
|
489
489
|
}, e));
|
|
490
490
|
case "alias": {
|
|
491
|
-
var Q,
|
|
492
|
-
let e = y == null || (Q = y.format) == null || (Q = Q.alias_pointer) == null ? void 0 : Q.id, t = (
|
|
491
|
+
var Q, ze;
|
|
492
|
+
let e = y == null || (Q = y.format) == null || (Q = Q.alias_pointer) == null ? void 0 : Q.id, t = (ze = i.block[e]) == null ? void 0 : ze.value;
|
|
493
493
|
return t ? /* @__PURE__ */ N.createElement(n.PageLink, {
|
|
494
494
|
className: `notion-page-link ${e}}`,
|
|
495
495
|
href: a(e)
|
|
@@ -497,8 +497,8 @@ var ie = ({ block: e, className: t }) => {
|
|
|
497
497
|
}
|
|
498
498
|
case "table": return /* @__PURE__ */ N.createElement("table", { className: `notion-simple-table ${W}` }, /* @__PURE__ */ N.createElement("tbody", null, x));
|
|
499
499
|
case "table_row": {
|
|
500
|
-
var
|
|
501
|
-
let e = (
|
|
500
|
+
var Be, Ve, He, $;
|
|
501
|
+
let e = (Be = i.block[y.parent_id]) == null ? void 0 : Be.value, t = (Ve = e.format) == null ? void 0 : Ve.table_block_column_order, n = (He = e.format) == null ? void 0 : He.table_block_column_format, r = ($ = y.format) == null ? void 0 : $.block_color;
|
|
502
502
|
return !e || !t ? null : /* @__PURE__ */ N.createElement("tr", { className: `notion-simple-table-row ${r && `notion-${r}`} ${W}` }, t.map((e) => {
|
|
503
503
|
var t, r, i;
|
|
504
504
|
let a = n == null || (t = n[e]) == null ? void 0 : t.color;
|
|
@@ -518,7 +518,7 @@ var ie = ({ block: e, className: t }) => {
|
|
|
518
518
|
});
|
|
519
519
|
default: return process.env.NODE_ENV !== "production" && console.debug("Unsupported type " + y.type, JSON.stringify(y, null, 2)), /* @__PURE__ */ N.createElement("div", null);
|
|
520
520
|
}
|
|
521
|
-
},
|
|
521
|
+
}, W = [
|
|
522
522
|
"components",
|
|
523
523
|
"recordMap",
|
|
524
524
|
"mapPageUrl",
|
|
@@ -544,11 +544,11 @@ var ie = ({ block: e, className: t }) => {
|
|
|
544
544
|
"defaultPageCoverPosition",
|
|
545
545
|
"editable",
|
|
546
546
|
"onChangeBlock"
|
|
547
|
-
],
|
|
548
|
-
let { components: t, recordMap: n, mapPageUrl: r, mapImageUrl: i, searchNotion: a, isShowingSearch: o, onHideSearch: s, fullPage: c, rootPageId: l, rootDomain: d, rootSpaceId: f, darkMode: p, previewImages: m, forceCustomImages: h, showCollectionViewDropdown: g, linkTableTitleProperties: _, isLinkCollectionToUrlProperty: y, isImageZoomable: b = !0, showTableOfContents: x, minTableOfContentsItems: S, defaultPageIcon: C, defaultPageCover: w, defaultPageCoverPosition: T, editable: E, onChangeBlock: D } = e, O = v(e,
|
|
547
|
+
], G = ["level", "blockId"], K = (e) => {
|
|
548
|
+
let { components: t, recordMap: n, mapPageUrl: r, mapImageUrl: i, searchNotion: a, isShowingSearch: o, onHideSearch: s, fullPage: c, rootPageId: l, rootDomain: d, rootSpaceId: f, darkMode: p, previewImages: m, forceCustomImages: h, showCollectionViewDropdown: g, linkTableTitleProperties: _, isLinkCollectionToUrlProperty: y, isImageZoomable: b = !0, showTableOfContents: x, minTableOfContentsItems: S, defaultPageIcon: C, defaultPageCover: w, defaultPageCoverPosition: T, editable: E, onChangeBlock: D } = e, O = v(e, W), k = N.useMemo(() => typeof window < "u" && P({
|
|
549
549
|
background: "rgba(0, 0, 0, 0.8)",
|
|
550
550
|
minZoomScale: 2,
|
|
551
|
-
margin:
|
|
551
|
+
margin: J()
|
|
552
552
|
}), []);
|
|
553
553
|
return /* @__PURE__ */ N.createElement(u, {
|
|
554
554
|
components: t,
|
|
@@ -576,25 +576,25 @@ var ie = ({ block: e, className: t }) => {
|
|
|
576
576
|
editable: E,
|
|
577
577
|
onChangeBlock: D,
|
|
578
578
|
zoom: b ? k : null
|
|
579
|
-
}, /* @__PURE__ */ N.createElement(
|
|
580
|
-
},
|
|
579
|
+
}, /* @__PURE__ */ N.createElement(q, O));
|
|
580
|
+
}, q = (e) => {
|
|
581
581
|
var t, n;
|
|
582
|
-
let { level: r = 0, blockId: i } = e, a = v(e,
|
|
583
|
-
return c ? /* @__PURE__ */ N.createElement(
|
|
582
|
+
let { level: r = 0, blockId: i } = e, a = v(e, G), { recordMap: o } = w(), s = i || Object.keys(o.block)[0], c = (t = o.block[s]) == null ? void 0 : t.value;
|
|
583
|
+
return c ? /* @__PURE__ */ N.createElement(U, _({
|
|
584
584
|
key: s,
|
|
585
585
|
level: r,
|
|
586
586
|
block: c
|
|
587
|
-
}, a), c == null || (n = c.content) == null ? void 0 : n.map((e) => /* @__PURE__ */ N.createElement(
|
|
587
|
+
}, a), c == null || (n = c.content) == null ? void 0 : n.map((e) => /* @__PURE__ */ N.createElement(q, _({
|
|
588
588
|
key: e,
|
|
589
589
|
blockId: e,
|
|
590
590
|
level: r + 1
|
|
591
591
|
}, a)))) : (process.env.NODE_ENV !== "production" && console.warn("missing block", i), null);
|
|
592
592
|
};
|
|
593
|
-
function
|
|
593
|
+
function J() {
|
|
594
594
|
let e = window.innerWidth;
|
|
595
595
|
return e < 500 ? 8 : e < 800 ? 20 : e < 1280 ? 30 : e < 1600 ? 40 : e < 1920 ? 48 : 72;
|
|
596
596
|
}
|
|
597
597
|
//#endregion
|
|
598
|
-
export { x as Asset, T as AssetWrapper, ie as Audio,
|
|
598
|
+
export { x as Asset, T as AssetWrapper, ie as Audio, U as Block, f as Breadcrumbs, n as Checkbox, M as CollectionColumnTitle, D as EOI, ae as File, oe as GoogleDrive, l as GracefulImage, y as Header, C as LiteYouTubeEmbed, q as NotionBlockRenderer, g as NotionContextConsumer, u as NotionContextProvider, K as NotionRenderer, se as PageAside, A as PageIcon, d as PageIconImpl, b as PageTitle, h as PageTitleImpl, ee as PropertyIcon, E as Search, p as SearchDialog, ce as SyncPointerBlock, m as Text, S as dummyLink, s as formatDate, r as formatNotionDateTime, O as getHashFragmentValue, c as getListNumber, a as getYoutubeId, j as iconMap, i as isBrowser, o as isUrl, w as useNotionContext };
|
|
599
599
|
|
|
600
600
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["throttle","__toESM","Checkbox","formatNotionDateTime","isBrowser","getYoutubeId","isUrl","formatDate","getListNumber","GracefulImage","NotionContextProvider","PageIconImpl","Breadcrumbs","SearchDialog","Text","NotionContextConsumer","_objectSpread2","_objectWithoutProperties","Header","PageTitle","Asset","dummyLink","LiteYouTubeEmbed","useNotionContext","AssetWrapper","Search","EOI","getHashFragmentValue","LazyImage","PageIcon","PropertyIcon","iconMap","CollectionColumnTitle","React","mediumZoom","Audio","_block$properties","source","recordMap","block","className","_excluded$2","FileIcon","props","rest","File","_block$properties2","_block$properties3","components","GoogleDrive","_block$format","properties","domain","err","mapImageUrl","import_lodash_throttle","__commonJSMin","FUNC_ERROR_TEXT","NAN","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","freeGlobal","freeSelf","root","objectToString","nativeMax","nativeMin","now","debounce","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","func","toNumber","wait","isObject","options","invokeFunc","args","thisArg","time","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","throttle","\"leading\"","\"maxWait\"","\"trailing\"","type","value","isObjectLike","isSymbol","other","isBinary","PageAside","actionSectionScrollSpy","sections","prevBBox","currentSectionId","activeSection","i","section","bbox","prevHeight","offset","setActiveSection","hasToc","hasAside","toc","id","uuidToId","tocItem","pageAside","SyncPointerBlock","_syncPointerBlock$for","syncPointerBlock","referencePointerId","NotionBlockRenderer","EditableText","_block$properties$tit","ref","text","getTextContent","reported","node","next","event","onChangeBlock","_excluded$1","LinkIcon","tocIndentLevelCache","pageCoverStyleCache","Block","ctx","level","view_block","blockId","hideBlockId","renderTitle","editable","isEditableBlock","defaultPageIcon","defaultPageCover","defaultPageCoverPosition","fullPage","_recordMap$collection","_getBlockIcon","getBlockCollectionId","pageCoverObjectPosition","page_cover_position","pageCoverStyle","pageIcon","getBlockIcon","isPageIconUrl","getPageTableOfContents","showTableOfContents","minTableOfContentsItems","page_full_width","hasPageCover","pageCover","page_cover","disableHeader","header","page_icon","page_small_text","bodyClassName","pageHeader","pageTitle","children","pageFooter","footer","blockColor","mapPageUrl","_block$format2","_block$format3","_block$format4","title","indentLevel","indentLevelClass","page","getBlockParentPage","isH1","isH2","isH3","classNameStr","innerHeader","headerBlock","_block$content","_block$format5","_recordMap$block$bloc","wrapList","content","output","isTopLevel","start","_block$format6","_block$format7","_block$format8","_recordMap$block$bloc2","_parent$content","ratio","parent","style","_block$format9","_block$format10","_block$format11","_link$","_block$format12","_block$properties4","_block$format13","_block$format14","_block$format15","_block$format16","_block$properties5","link","_block$properties6","_block$format17","_block$properties7","_block$properties8","isChecked","_block$format18","_recordMap$block$bloc3","blockPointerId","linkedBlock","_recordMap$block$bloc4","_tableBlock$format","_tableBlock$format2","_block$format19","tableBlock","order","formatMap","backgroundColor","_formatMap$column","_formatMap$column2","_block$properties9","color","column","_excluded","_excluded2","NotionRenderer","_ref","zoom","getMediumZoomMargin","isImageZoomable","_recordMap$block$id","_ref2","contentBlockId","width","PageTitleImpl"],"sources":["../src/components/audio.tsx","../src/icons/file-icon.tsx","../src/components/file.tsx","../src/components/google-drive.tsx","../../../node_modules/.pnpm/lodash.throttle@4.1.1/node_modules/lodash.throttle/index.js","../src/components/page-aside.tsx","../src/components/sync-pointer-block.tsx","../src/components/editable-text.tsx","../src/icons/link-icon.tsx","../src/block.tsx","../src/renderer.tsx"],"sourcesContent":["import React from 'react'\n\nimport { AudioBlock } from '@texonom/ntypes'\n\nimport { useNotionContext } from '../context'\n\nexport const Audio: React.FC<{\n block: AudioBlock\n className?: string\n}> = ({ block, className }) => {\n const { recordMap } = useNotionContext()\n const source = recordMap.signed_urls[block.id] || block.properties?.source?.[0]?.[0]\n\n return (\n <div className={`notion-audio ${className || ''}`}>\n <audio controls preload='none' src={source} />\n </div>\n )\n}\n","import React from 'react'\n\nexport const FileIcon = props => {\n const { className, ...rest } = props\n return (\n <svg className={className} {...rest} viewBox='0 0 30 30'>\n <path d='M22,8v12c0,3.866-3.134,7-7,7s-7-3.134-7-7V8c0-2.762,2.238-5,5-5s5,2.238,5,5v12c0,1.657-1.343,3-3,3s-3-1.343-3-3V8h-2v12c0,2.762,2.238,5,5,5s5-2.238,5-5V8c0-3.866-3.134-7-7-7S6,4.134,6,8v12c0,4.971,4.029,9,9,9s9-4.029,9-9V8H22z'></path>\n </svg>\n )\n}\n","import React from 'react'\n\nimport { FileBlock } from '@texonom/ntypes'\n\nimport { useNotionContext } from '../context'\nimport { FileIcon } from '../icons/file-icon'\nimport { Text } from './text'\n\nexport const File: React.FC<{\n block: FileBlock\n className?: string\n}> = ({ block, className }) => {\n const { components, recordMap } = useNotionContext()\n const source = recordMap.signed_urls[block.id] || block.properties?.source?.[0]?.[0]\n\n return (\n <div className={`notion-file ${className || ''}`}>\n <components.Link className='notion-file-link' href={source} target='_blank' rel='noopener noreferrer'>\n <FileIcon className='notion-file-icon' />\n\n <div className='notion-file-info'>\n <div className='notion-file-title'>\n <Text value={block.properties?.title || [['File']]} block={block} />\n </div>\n\n {block.properties?.size && (\n <div className='notion-file-size'>\n <Text value={block.properties.size} block={block} />\n </div>\n )}\n </div>\n </components.Link>\n </div>\n )\n}\n","import React from 'react'\n\nimport { GoogleDriveBlock } from '@texonom/ntypes'\n\nimport { useNotionContext } from '../context'\nimport { GracefulImage } from './graceful-image'\n\nexport const GoogleDrive: React.FC<{\n block: GoogleDriveBlock\n className?: string\n}> = ({ block, className }) => {\n const { components, mapImageUrl } = useNotionContext()\n const properties = block.format?.drive_properties\n if (!properties) return null\n let domain\n\n try {\n const url = new URL(properties.url)\n domain = url.hostname\n } catch (err) {\n // ignore invalid urls for robustness\n }\n\n return (\n <div className={`notion-google-drive ${className || ''}`}>\n <components.Link className='notion-google-drive-link' href={properties.url} target='_blank' rel='noopener noreferrer'>\n <div className='notion-google-drive-preview'>\n <GracefulImage\n src={mapImageUrl(properties.thumbnail, block)}\n alt={properties.title || 'Google Drive Document'}\n loading='lazy'\n />\n </div>\n\n <div className='notion-google-drive-body'>\n {properties.title && <div className='notion-google-drive-body-title'>{properties.title}</div>}\n\n {/* TODO: re-add last modified time with alternative to timeago.js */}\n {/* {properties.modified_time && (\n <div className='notion-google-drive-body-modified-time'>\n Last modified{' '}\n {properties.user_name ? `by ${properties.user_name} ` : ''}\n {timeago(properties.modified_time)}\n </div>\n )} */}\n\n {properties.icon && domain && (\n <div className='notion-google-drive-body-source'>\n {properties.icon && (\n <div\n className='notion-google-drive-body-source-icon'\n style={{\n backgroundImage: `url(${properties.icon})`\n }}\n />\n )}\n\n {domain && <div className='notion-google-drive-body-source-domain'>{domain}</div>}\n </div>\n )}\n </div>\n </components.Link>\n </div>\n )\n}\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = throttle;\n","import React from 'react'\n\nimport throttle from 'lodash.throttle'\nimport { TableOfContentsEntry, uuidToId } from '@texonom/nutils'\n\nexport const PageAside: React.FC<{\n toc: Array<TableOfContentsEntry>\n activeSection: string | null\n setActiveSection: (activeSection: string | null) => unknown\n hasToc: boolean\n hasAside: boolean\n pageAside?: React.ReactNode\n className?: string\n}> = ({ toc, activeSection, setActiveSection, pageAside, hasToc, hasAside, className }) => {\n const throttleMs = 100\n const actionSectionScrollSpy = React.useMemo(\n () =>\n throttle(() => {\n const sections = document.getElementsByClassName('notion-h')\n\n let prevBBox: DOMRect = null\n let currentSectionId = activeSection\n\n for (let i = 0; i < sections.length; ++i) {\n const section = sections[i]\n if (!section || !(section instanceof Element)) continue\n\n if (!currentSectionId) currentSectionId = section.getAttribute('data-id')\n\n const bbox = section.getBoundingClientRect()\n const prevHeight = prevBBox ? bbox.top - prevBBox.bottom : 0\n const offset = Math.max(150, prevHeight / 4)\n\n // GetBoundingClientRect returns values relative to the viewport\n if (bbox.top - offset < 0) {\n currentSectionId = section.getAttribute('data-id')\n\n prevBBox = bbox\n continue\n }\n\n // No need to continue loop, if last element has been detected\n break\n }\n\n setActiveSection(currentSectionId)\n }, throttleMs),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n // explicitly not taking a dependency on activeSection\n setActiveSection\n ]\n )\n\n React.useEffect(() => {\n if (!hasToc) return\n\n window.addEventListener('scroll', actionSectionScrollSpy)\n\n actionSectionScrollSpy()\n\n return () => {\n window.removeEventListener('scroll', actionSectionScrollSpy)\n }\n }, [hasToc, actionSectionScrollSpy])\n\n if (!hasAside) return null\n\n return (\n <aside className={`notion-aside ${className || ''}`}>\n {hasToc && (\n <div className='notion-aside-table-of-contents'>\n <div className='notion-aside-table-of-contents-header'>Table of Contents</div>\n\n <nav className='notion-table-of-contents'>\n {toc.map(tocItem => {\n const id = uuidToId(tocItem.id)\n\n return (\n <a\n key={id}\n href={`#${id}`}\n className={`notion-table-of-contents-item\n notion-table-of-contents-item-indent-level-${tocItem.indentLevel}\n ${activeSection === id && 'notion-table-of-contents-active-item'}`}>\n <span\n className='notion-table-of-contents-item-body'\n style={{\n display: 'inline-block',\n marginLeft: tocItem.indentLevel * 16\n }}>\n {tocItem.text}\n </span>\n </a>\n )\n })}\n </nav>\n </div>\n )}\n\n {pageAside}\n </aside>\n )\n}\n","import React from 'react'\n\nimport { NotionBlockRenderer } from '../renderer'\n\nimport type { Block as BlockType, SyncPointerBlock as SyncPointerBlockType } from '@texonom/ntypes'\n\nexport const SyncPointerBlock: React.FC<{\n block: BlockType\n level: number\n}> = ({ block, level }) => {\n if (!block) {\n if (process.env.NODE_ENV !== 'production') console.warn('missing sync pointer block', block.id)\n\n return null\n }\n\n const syncPointerBlock = block as SyncPointerBlockType\n const referencePointerId = syncPointerBlock?.format?.transclusion_reference_pointer?.id\n\n if (!referencePointerId) return null\n\n return <NotionBlockRenderer key={referencePointerId} level={level} blockId={referencePointerId} />\n}\n","import React from 'react'\n\nimport { getTextContent } from '@texonom/nutils'\n\nimport { useNotionContext } from '../context'\n\nimport type { Block } from '@texonom/ntypes'\n\n/**\n * A text block the owner can edit in place.\n *\n * Rendered only in edit mode (`ctx.editable`) and only where nutils'\n * `isEditableBlock` allows, which is plain titles: the editor edits plain text,\n * so a formatted title stays read-only rather than lose what it does not show. The\n * public render path keeps using `<Text>`, so a page nobody edits is\n * byte-identical to before. The node is uncontrolled: React never reconciles\n * it, so the caret is never reset while someone is typing. On blur the plain\n * text is handed to `onChangeBlock`, which the host persists — this package\n * stays a renderer and never writes anything itself.\n */\nexport const EditableText: React.FC<{ block: Block }> = ({ block }) => {\n const { onChangeBlock } = useNotionContext()\n const ref = React.useRef<HTMLSpanElement>(null)\n const text = getTextContent(block.properties?.title ?? [])\n // The last value written into the node or reported to the host, not the value\n // at mount: an edit and a later undo back to the original are both changes.\n const reported = React.useRef<string | null>(null)\n\n React.useEffect(() => {\n // On mount, and again when the title moves under the editor — the host\n // dropped an edit — but never into a focused node, where it would reset the\n // caret mid-word. innerText, not textContent, so a soft line break survives\n // the round trip as `\\n` instead of collapsing the lines together.\n const node = ref.current\n if (!node || text === reported.current || node === document.activeElement) return\n node.innerText = text\n reported.current = text\n }, [text])\n\n return (\n <span\n ref={ref}\n className='notion-text-editable'\n role='textbox'\n aria-multiline='true'\n contentEditable\n suppressContentEditableWarning\n spellCheck\n onBlur={event => {\n // contentEditable leaves a trailing break behind after editing; it is\n // not content, and keeping it would report an edit nobody made.\n const next = event.currentTarget.innerText.replace(/\\n+$/, '')\n if (next === reported.current) return\n reported.current = next\n onChangeBlock?.(block.id, next)\n }}\n />\n )\n}\n","import React from 'react'\n\nexport const LinkIcon = props => {\n const { className, ...rest } = props\n return (\n <svg className={className} {...rest} viewBox='0 0 16 16' width='16' height='16'>\n <path\n fillRule='evenodd'\n d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'\n />\n </svg>\n )\n}\n","import React from 'react'\n\nimport {\n getBlockCollectionId,\n getBlockIcon,\n getBlockParentPage,\n getPageTableOfContents,\n getTextContent,\n isEditableBlock,\n uuidToId\n} from '@texonom/nutils'\n\nimport { AssetWrapper } from './components/asset-wrapper'\nimport { Audio } from './components/audio'\nimport { EOI } from './components/eoi'\nimport { File } from './components/file'\nimport { GoogleDrive } from './components/google-drive'\nimport { LazyImage } from './components/lazy-image'\nimport { PageAside } from './components/page-aside'\nimport { PageIcon } from './components/page-icon'\nimport { PageTitle } from './components/page-title'\nimport { SyncPointerBlock } from './components/sync-pointer-block'\nimport { Text } from './components/text'\nimport { EditableText } from './components/editable-text'\nimport { useNotionContext } from './context'\nimport { LinkIcon } from './icons/link-icon'\nimport { getListNumber, isUrl } from './utils'\n\nimport type {\n Block as BlockType,\n PageBlock,\n GoogleDriveBlock,\n AudioBlock,\n FileBlock,\n EquationBlock,\n CollectionViewPageBlock,\n CodeBlock,\n TableBlock\n} from '@texonom/ntypes'\ninterface BlockProps {\n block: BlockType\n level: number\n\n className?: string\n bodyClassName?: string\n\n header?: React.ReactNode\n footer?: React.ReactNode\n pageHeader?: React.ReactNode\n pageFooter?: React.ReactNode\n pageTitle?: React.ReactNode\n pageAside?: React.ReactNode\n pageCover?: React.ReactNode\n\n hideBlockId?: boolean\n disableHeader?: boolean\n\n children?: React.ReactNode\n}\n\n// TODO: use react state instead of a global for this\nconst tocIndentLevelCache: {\n [blockId: string]: number\n} = {}\n\nconst pageCoverStyleCache: Record<string, object> = {}\n\nexport const Block: React.FC<BlockProps> = props => {\n const ctx = useNotionContext()\n const {\n components,\n fullPage,\n recordMap,\n mapPageUrl,\n mapImageUrl,\n showTableOfContents,\n minTableOfContentsItems,\n defaultPageIcon,\n defaultPageCover,\n defaultPageCoverPosition,\n editable\n } = ctx\n\n const [activeSection, setActiveSection] = React.useState(null)\n\n const {\n block,\n children,\n level,\n className,\n bodyClassName,\n header,\n footer,\n pageHeader,\n pageFooter,\n pageTitle,\n pageAside,\n pageCover,\n hideBlockId,\n disableHeader\n } = props\n\n if (!block) return null\n\n // ugly hack to make viewing raw collection views work properly\n // e.g., 6d886ca87ab94c21a16e3b82b43a57fb\n if (level === 0 && block.type === 'collection_view') {\n const view_block = block as unknown as CollectionViewPageBlock\n view_block.type = 'collection_view_page'\n }\n\n const blockId = hideBlockId ? 'notion-block' : `notion-block-${uuidToId(block.id)}`\n\n // Edit mode swaps a plain title for an editable one. A formatted title keeps its\n // read-only render: the editor works in plain text, and saving it would drop\n // the bold, links and mentions it does not show.\n const renderTitle = () =>\n editable && isEditableBlock(block) ? (\n <EditableText block={block} />\n ) : (\n <Text value={block.properties.title} block={block} />\n )\n\n switch (block.type) {\n case 'collection_view_page':\n // fallthrough\n case 'page':\n if (level === 0) {\n const {\n page_icon = defaultPageIcon,\n page_cover = defaultPageCover,\n page_cover_position = defaultPageCoverPosition,\n page_full_width,\n page_small_text\n } = block.format || {}\n\n if (fullPage) {\n const properties =\n block.type === 'page'\n ? block.properties\n : {\n title: recordMap.collection[getBlockCollectionId(block, recordMap)]?.value?.name\n }\n\n const coverPosition = (1 - (page_cover_position || 0.5)) * 100\n const pageCoverObjectPosition = `center ${coverPosition}%`\n let pageCoverStyle = pageCoverStyleCache[pageCoverObjectPosition]\n if (!pageCoverStyle)\n pageCoverStyle = pageCoverStyleCache[pageCoverObjectPosition] = {\n objectPosition: pageCoverObjectPosition\n }\n\n const pageIcon = getBlockIcon(block, recordMap) ?? defaultPageIcon\n const isPageIconUrl = pageIcon && isUrl(pageIcon)\n\n const toc = getPageTableOfContents(block as PageBlock, recordMap)\n\n const hasToc = showTableOfContents && toc.length >= minTableOfContentsItems\n const hasAside = (hasToc || pageAside) && !page_full_width\n const hasPageCover = pageCover || page_cover\n\n return (\n <div className={`notion notion-app ${blockId} ${className || ''}`}>\n <div className='notion-viewport' />\n\n <div className='notion-frame'>\n {!disableHeader && <components.Header block={block} />}\n {header}\n\n <div className='notion-page-scroller'>\n {hasPageCover &&\n (pageCover ? (\n pageCover\n ) : (\n <div className='notion-page-cover-wrapper'>\n <LazyImage\n src={mapImageUrl(page_cover, block)}\n alt={getTextContent(properties?.title)}\n priority={true}\n className='notion-page-cover'\n style={pageCoverStyle}\n />\n </div>\n ))}\n\n <main\n className={`notion-page\n ${hasPageCover ? 'notion-page-has-cover' : 'notion-page-no-cover'}\n ${page_icon ? 'notion-page-has-icon' : 'notion-page-no-icon'}\n ${isPageIconUrl ? 'notion-page-has-image-icon' : 'notion-page-has-text-icon'}\n notion-full-page\n ${page_full_width && 'notion-full-width'}\n ${page_small_text && 'notion-small-text'}\n ${bodyClassName}`}>\n {page_icon && <PageIcon block={block} defaultIcon={defaultPageIcon} inline={false} />}\n\n {pageHeader}\n\n <h1 className='notion-title'>{pageTitle ?? <Text value={properties?.title} block={block} />}</h1>\n\n {(block.type === 'collection_view_page' ||\n (block.type === 'page' && block.parent_table === 'collection')) && (\n <components.Collection block={block} ctx={ctx} />\n )}\n\n {block.type !== 'collection_view_page' && (\n <div\n className={`notion-page-content\n ${hasAside && 'notion-page-content-has-aside'}\n ${hasToc && 'notion-page-content-has-toc'}`}>\n <article className='notion-page-content-inner'>{children}</article>\n\n {hasAside && (\n <PageAside\n toc={toc}\n activeSection={activeSection}\n setActiveSection={setActiveSection}\n hasToc={hasToc}\n hasAside={hasAside}\n pageAside={pageAside}\n />\n )}\n </div>\n )}\n\n {pageFooter}\n </main>\n\n {footer}\n </div>\n </div>\n </div>\n )\n } else {\n return (\n <main\n className={`notion\n notion-page\n ${page_full_width && 'notion-full-width'}\n ${page_small_text && 'notion-small-text'}\n ${blockId}\n ${className || ''}\n ${bodyClassName}`}>\n <div className='notion-viewport' />\n\n {pageHeader}\n\n {(block.type === 'collection_view_page' || (block.type === 'page' && block.parent_table === 'collection')) && (\n <components.Collection block={block} ctx={ctx} />\n )}\n\n {block.type !== 'collection_view_page' && children}\n\n {pageFooter}\n </main>\n )\n }\n } else {\n const blockColor = block.format?.block_color\n\n return (\n <components.PageLink\n className={`notion-page-link ${blockColor && `notion-${blockColor}`} ${blockId}`}\n href={mapPageUrl(block.id)}>\n <PageTitle block={block} />\n </components.PageLink>\n )\n }\n\n case 'header':\n // fallthrough\n case 'sub_header':\n // fallthrough\n case 'sub_sub_header': {\n if (!block.properties) return null\n\n const blockColor = block.format?.block_color\n const id = uuidToId(block.id)\n const title = getTextContent(block.properties.title) || `Notion Header ${id}`\n\n // we use a cache here because constructing the ToC is non-trivial\n let indentLevel = tocIndentLevelCache[block.id]\n let indentLevelClass: string\n\n if (indentLevel === undefined) {\n const page = getBlockParentPage(block, recordMap)\n\n if (page) {\n const toc = getPageTableOfContents(page, recordMap)\n const tocItem = toc.find(tocItem => tocItem.id === block.id)\n\n if (tocItem) {\n indentLevel = tocItem.indentLevel\n tocIndentLevelCache[block.id] = indentLevel\n }\n }\n }\n\n if (indentLevel !== undefined) indentLevelClass = `notion-h-indent-${indentLevel}`\n\n const isH1 = block.type === 'header'\n const isH2 = block.type === 'sub_header'\n const isH3 = block.type === 'sub_sub_header'\n\n const classNameStr = `${isH1 && 'notion-h notion-h1'}\n ${isH2 && 'notion-h notion-h2'}\n ${isH3 && 'notion-h notion-h3'}\n ${blockColor && `notion-${blockColor}`}\n ${indentLevelClass},\n ${blockId}`\n\n const innerHeader = (\n <span>\n <div id={id} className='notion-header-anchor' />\n {!block.format?.toggleable && (\n <a className='notion-hash-link' href={`#${id}`} title={title}>\n <LinkIcon />\n </a>\n )}\n\n <span className='notion-h-title'>{renderTitle()}</span>\n </span>\n )\n let headerBlock = null\n\n //page title takes the h1 so all header blocks are greater\n if (isH1)\n headerBlock = (\n <h2 className={classNameStr} data-id={id}>\n {innerHeader}\n </h2>\n )\n else if (isH2)\n headerBlock = (\n <h3 className={classNameStr} data-id={id}>\n {innerHeader}\n </h3>\n )\n else\n headerBlock = (\n <h4 className={classNameStr} data-id={id}>\n {innerHeader}\n </h4>\n )\n\n if (block.format?.toggleable)\n return (\n <details className={`notion-toggle ${blockId}`}>\n <summary>{headerBlock}</summary>\n <div>{children}</div>\n </details>\n )\n else return headerBlock\n }\n\n case 'divider':\n return <hr className={`notion-hr ${blockId}`} />\n\n case 'text': {\n if (!block.properties && !block.content?.length) return <div className={`notion-blank ${blockId}`}> </div>\n\n const blockColor = block.format?.block_color\n\n return (\n <div className={`notion-text ${blockColor && `notion-${blockColor}`} ${blockId}`}>\n {block.properties?.title && renderTitle()}\n\n {children && <div className='notion-text-children'>{children}</div>}\n </div>\n )\n }\n\n case 'bulleted_list':\n // fallthrough\n case 'numbered_list': {\n const wrapList = (content: React.ReactNode, start?: number) =>\n block.type === 'bulleted_list' ? (\n <ul className={`notion-list notion-list-disc ${blockId}`}>{content}</ul>\n ) : (\n <ol start={start} className={`notion-list notion-list-numbered ${blockId}`}>\n {content}\n </ol>\n )\n\n let output: React.JSX.Element | null = null\n\n if (block.content)\n output = (\n <>\n {block.properties && <li>{renderTitle()}</li>}\n {wrapList(children)}\n </>\n )\n else output = block.properties ? <li>{renderTitle()}</li> : null\n\n const isTopLevel = block.type !== recordMap.block[block.parent_id]?.value?.type\n const start = getListNumber(block.id, recordMap.block)\n\n return isTopLevel ? wrapList(output, start) : output\n }\n\n case 'embed':\n return <components.Embed blockId={blockId} block={block} />\n case 'tweet':\n // fallthrough\n case 'maps':\n // fallthrough\n case 'pdf':\n // fallthrough\n case 'figma':\n // fallthrough\n case 'typeform':\n // fallthrough\n case 'codepen':\n // fallthrough\n case 'excalidraw':\n // fallthrough\n case 'image':\n // fallthrough\n case 'gist':\n // fallthrough\n case 'video':\n return <AssetWrapper blockId={blockId} block={block} />\n\n case 'drive': {\n const properties = block.format?.drive_properties\n if (!properties)\n if (block.format?.display_source)\n //check if this drive actually needs to be embeded ex. google sheets.\n return <AssetWrapper blockId={blockId} block={block} />\n\n return <GoogleDrive block={block as GoogleDriveBlock} className={blockId} />\n }\n\n case 'audio':\n return <Audio block={block as AudioBlock} className={blockId} />\n\n case 'file':\n return <File block={block as FileBlock} className={blockId} />\n\n case 'equation':\n return <components.Equation block={block as EquationBlock} inline={false} className={blockId} />\n\n case 'code':\n return <components.Code block={block as CodeBlock} />\n\n case 'column_list':\n return <div className={`notion-row ${blockId}`}>{children}</div>\n\n case 'column': {\n // note: notion uses 46px\n const spacerWidth = `min(32px, 4vw)`\n const ratio = block.format?.column_ratio || 0.5\n const parent = recordMap.block[block.parent_id]?.value\n const columns = parent?.content?.length || Math.max(2, Math.ceil(1.0 / ratio))\n\n const width = `calc((100% - (${columns - 1} * ${spacerWidth})) * ${ratio})`\n const style = { width }\n\n return (\n <>\n <div className={`notion-column ${blockId}`} style={style}>\n {children}\n </div>\n\n <div className='notion-spacer' />\n </>\n )\n }\n\n case 'quote': {\n if (!block.properties) return null\n\n const blockColor = block.format?.block_color\n\n return (\n <blockquote className={`notion-quote ${blockColor && `notion-${blockColor}`} ${blockId}`}>\n <div>\n <Text value={block.properties.title} block={block} />\n </div>\n {children}\n </blockquote>\n )\n }\n\n case 'collection_view':\n return <components.Collection block={block} className={blockId} ctx={ctx} />\n\n case 'callout':\n if (components.Callout) return <components.Callout block={block} className={blockId} />\n else\n return (\n <div\n className={`notion-callout ${block.format?.block_color && `notion-${block.format?.block_color}_co`} ${blockId}`}>\n <PageIcon block={block} />\n\n <div className='notion-callout-text'>\n <Text value={block.properties?.title} block={block} />\n {children}\n </div>\n </div>\n )\n\n case 'bookmark': {\n if (!block.properties) return null\n\n const link = block.properties.link\n if (!link || !link[0]?.[0]) return null\n\n let title = getTextContent(block.properties.title)\n if (!title) title = getTextContent(link)\n\n if (title)\n if (title.startsWith('http'))\n try {\n const url = new URL(title)\n title = url.hostname\n } catch (err) {\n // ignore invalid links\n }\n\n return (\n <div className='notion-row'>\n <components.Link\n target='_blank'\n rel='noopener noreferrer'\n className={`notion-bookmark ${block.format?.block_color ? `notion-${block.format.block_color}` : ''} ${blockId}`}\n href={link[0][0]}>\n <div>\n {title && (\n <div className='notion-bookmark-title'>\n <Text value={[[title]]} block={block} />\n </div>\n )}\n\n {block.properties?.description && (\n <div className='notion-bookmark-description'>\n <Text value={block.properties?.description} block={block} />\n </div>\n )}\n\n <div className='notion-bookmark-link'>\n {block.format?.bookmark_icon && (\n <div className='notion-bookmark-link-icon'>\n <LazyImage\n src={mapImageUrl(block.format?.bookmark_icon, block)}\n alt={title}\n onError={e => {\n const parent = e.currentTarget.closest('.notion-bookmark-link-icon') as HTMLElement\n if (parent) parent.style.display = 'none'\n }}\n />\n </div>\n )}\n\n <div className='notion-bookmark-link-text'>\n <Text value={link} block={block} />\n </div>\n </div>\n </div>\n\n {block.format?.bookmark_cover && (\n <div className='notion-bookmark-image'>\n <LazyImage\n // YouTube stores `maxresdefault.jpg` covers that 404 for videos lacking a\n // max-res still (logging a console error and hiding the thumbnail). The\n // `hqdefault.jpg` variant always exists, so prefer it for ytimg covers.\n src={mapImageUrl(block.format?.bookmark_cover, block).replace(\n /(\\/\\/i\\.ytimg\\.com\\/.*?)maxresdefault/,\n '$1hqdefault'\n )}\n alt={getTextContent(block.properties?.title)}\n style={{\n objectFit: 'cover'\n }}\n onError={e => {\n const parent = e.currentTarget.closest('.notion-bookmark-image') as HTMLElement\n if (parent) parent.style.display = 'none'\n }}\n />\n </div>\n )}\n </components.Link>\n </div>\n )\n }\n\n case 'toggle':\n return (\n <details className={`notion-toggle ${blockId}`}>\n <summary>\n <Text value={block.properties?.title} block={block} />\n </summary>\n\n <div>{children}</div>\n </details>\n )\n\n case 'table_of_contents': {\n const page = getBlockParentPage(block, recordMap)\n if (!page) return null\n\n const toc = getPageTableOfContents(page, recordMap)\n const blockColor = block.format?.block_color\n\n return (\n <div className={`notion-table-of-contents ${blockColor && `notion-${blockColor}`} ${blockId}`}>\n {toc.map(tocItem => (\n <a key={tocItem.id} href={`#${uuidToId(tocItem.id)}`} className='notion-table-of-contents-item'>\n <span\n className='notion-table-of-contents-item-body'\n style={{\n display: 'inline-block',\n marginLeft: tocItem.indentLevel * 24\n }}>\n {tocItem.text}\n </span>\n </a>\n ))}\n </div>\n )\n }\n\n case 'to_do': {\n const isChecked = block.properties?.checked?.[0]?.[0] === 'Yes'\n\n return (\n <div className={`notion-to-do ${blockId}`}>\n <div className='notion-to-do-item'>\n <components.Checkbox blockId={blockId} isChecked={isChecked} />\n\n <div className={`notion-to-do-body ${isChecked && `notion-to-do-checked`}`}>\n <Text value={block.properties?.title} block={block} />\n </div>\n </div>\n\n <div className='notion-to-do-children'>{children}</div>\n </div>\n )\n }\n\n case 'transclusion_container':\n return <div className={`notion-sync-block ${blockId}`}>{children}</div>\n\n case 'transclusion_reference':\n return <SyncPointerBlock block={block} level={level + 1} {...props} />\n\n case 'alias': {\n const blockPointerId = block?.format?.alias_pointer?.id\n const linkedBlock = recordMap.block[blockPointerId]?.value\n if (!linkedBlock) {\n console.debug('\"alias\" missing block', blockPointerId)\n return null\n }\n\n return (\n <components.PageLink className={`notion-page-link ${blockPointerId}}`} href={mapPageUrl(blockPointerId)}>\n <PageTitle block={linkedBlock} />\n </components.PageLink>\n )\n }\n\n case 'table':\n return (\n <table className={`notion-simple-table ${blockId}`}>\n <tbody>{children}</tbody>\n </table>\n )\n\n case 'table_row': {\n const tableBlock = recordMap.block[block.parent_id]?.value as TableBlock\n const order = tableBlock.format?.table_block_column_order\n const formatMap = tableBlock.format?.table_block_column_format\n const backgroundColor = block.format?.block_color\n\n if (!tableBlock || !order) return null\n\n return (\n <tr className={`notion-simple-table-row ${backgroundColor && `notion-${backgroundColor}`} ${blockId}`}>\n {order.map(column => {\n const color = formatMap?.[column]?.color\n\n return (\n <td\n key={column}\n className={color ? `notion-${color}` : ''}\n style={{\n width: formatMap?.[column]?.width || 120\n }}>\n <div className='notion-simple-table-cell'>\n <Text value={block.properties?.[column] || [['ㅤ']]} block={block} />\n </div>\n </td>\n )\n })}\n </tr>\n )\n }\n\n case 'external_object_instance':\n return <EOI block={block} className={blockId} />\n\n default:\n if (process.env.NODE_ENV !== 'production')\n console.debug('Unsupported type ' + (block as BlockType).type, JSON.stringify(block, null, 2))\n\n return <div />\n }\n}\n","import React from 'react'\n\nimport mediumZoom from '@fisch0920/medium-zoom'\nimport type { ExtendedRecordMap } from '@texonom/ntypes'\n\nimport { Block } from './block'\nimport { NotionContextProvider, useNotionContext } from './context'\nimport { MapImageUrlFn, MapPageUrlFn, NotionComponents, SearchNotionFn } from './types'\n\nexport const NotionRenderer: React.FC<{\n recordMap: ExtendedRecordMap\n components?: Partial<NotionComponents>\n\n mapPageUrl?: MapPageUrlFn\n mapImageUrl?: MapImageUrlFn\n searchNotion?: SearchNotionFn\n isShowingSearch?: boolean\n onHideSearch?: () => void\n\n rootPageId?: string\n rootDomain?: string\n rootSpaceId?: string\n\n // set fullPage to false to render page content only\n // this will remove the header, cover image, and footer\n fullPage?: boolean\n\n darkMode?: boolean\n previewImages?: boolean\n forceCustomImages?: boolean\n showCollectionViewDropdown?: boolean\n linkTableTitleProperties?: boolean\n isLinkCollectionToUrlProperty?: boolean\n isImageZoomable?: boolean\n\n // Owner edit mode. Off by default; the host turns it on and persists onChangeBlock.\n editable?: boolean\n onChangeBlock?: (blockId: string, title: string) => void\n\n showTableOfContents?: boolean\n minTableOfContentsItems?: number\n\n defaultPageIcon?: string\n defaultPageCover?: string\n defaultPageCoverPosition?: number\n\n className?: string\n bodyClassName?: string\n\n header?: React.ReactNode\n footer?: React.ReactNode\n pageHeader?: React.ReactNode\n pageFooter?: React.ReactNode\n pageTitle?: React.ReactNode\n pageAside?: React.ReactNode\n pageCover?: React.ReactNode\n\n blockId?: string\n hideBlockId?: boolean\n disableHeader?: boolean\n}> = ({\n components,\n recordMap,\n mapPageUrl,\n mapImageUrl,\n searchNotion,\n isShowingSearch,\n onHideSearch,\n fullPage,\n rootPageId,\n rootDomain,\n rootSpaceId,\n darkMode,\n previewImages,\n forceCustomImages,\n showCollectionViewDropdown,\n linkTableTitleProperties,\n isLinkCollectionToUrlProperty,\n isImageZoomable = true,\n showTableOfContents,\n minTableOfContentsItems,\n defaultPageIcon,\n defaultPageCover,\n defaultPageCoverPosition,\n editable,\n onChangeBlock,\n ...rest\n}) => {\n const zoom = React.useMemo(\n () =>\n typeof window !== 'undefined' &&\n mediumZoom({\n background: 'rgba(0, 0, 0, 0.8)',\n minZoomScale: 2.0,\n margin: getMediumZoomMargin()\n }),\n []\n )\n\n return (\n <NotionContextProvider\n components={components}\n recordMap={recordMap}\n mapPageUrl={mapPageUrl}\n mapImageUrl={mapImageUrl}\n searchNotion={searchNotion}\n isShowingSearch={isShowingSearch}\n onHideSearch={onHideSearch}\n fullPage={fullPage}\n rootPageId={rootPageId}\n rootDomain={rootDomain}\n rootSpaceId={rootSpaceId}\n darkMode={darkMode}\n previewImages={previewImages}\n forceCustomImages={forceCustomImages}\n showCollectionViewDropdown={showCollectionViewDropdown}\n linkTableTitleProperties={linkTableTitleProperties}\n isLinkCollectionToUrlProperty={isLinkCollectionToUrlProperty}\n showTableOfContents={showTableOfContents}\n minTableOfContentsItems={minTableOfContentsItems}\n defaultPageIcon={defaultPageIcon}\n defaultPageCover={defaultPageCover}\n defaultPageCoverPosition={defaultPageCoverPosition}\n editable={editable}\n onChangeBlock={onChangeBlock}\n zoom={isImageZoomable ? zoom : null}>\n <NotionBlockRenderer {...rest} />\n </NotionContextProvider>\n )\n}\n\nexport const NotionBlockRenderer: React.FC<{\n className?: string\n bodyClassName?: string\n header?: React.ReactNode\n footer?: React.ReactNode\n disableHeader?: boolean\n\n blockId?: string\n hideBlockId?: boolean\n level?: number\n}> = ({ level = 0, blockId, ...props }) => {\n const { recordMap } = useNotionContext()\n const id = blockId || Object.keys(recordMap.block)[0]\n const block = recordMap.block[id]?.value\n\n if (!block) {\n if (process.env.NODE_ENV !== 'production') console.warn('missing block', blockId)\n\n return null\n }\n\n return (\n <Block key={id} level={level} block={block} {...props}>\n {block?.content?.map(contentBlockId => (\n <NotionBlockRenderer key={contentBlockId} blockId={contentBlockId} level={level + 1} {...props} />\n ))}\n </Block>\n )\n}\n\nfunction getMediumZoomMargin() {\n const width = window.innerWidth\n\n if (width < 500) return 8\n else if (width < 800) return 20\n else if (width < 1280) return 30\n else if (width < 1600) return 40\n else if (width < 1920) return 48\n else return 72\n}\n"],"ignoreList":[4],"mappings":";;;;;;;AAMA,IAAamC,MAGP,EAAE,UAAO,mBAAgB;;CAC7B,IAAM,EAAE,iBAAcZ,EAAiB,GACjCc,IAASC,EAAU,YAAYC,EAAM,SAAA,IAAOA,EAAM,eAAA,SAAA,IAAAH,EAAY,WAAA,SAAA,IAAAA,EAAS,OAAA,OAAA,K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gI,GAAY5N,IAAA1B,EAAAsP,GAAAP,CAAA,GACvB,EAAE,iBAAczO,EAAiB,GACjCwG,IAAK2B,KAAW,OAAO,KAAKpH,EAAU,KAAK,CAAC,CAAC,IAC7CC,KAAA,IAAQD,EAAU,MAAMyF,OAAA,OAAA,KAAA,IAAAuI,EAAK;CAQnC,OANK/N,IAOH,kBAAA,cAAC+G,GAAAtI,EAAA;EAAM,KAAK+G;EAAW;EAAc;CAAW,GAAApF,CAIzC,GAAAJ,KAAA,SAAA,IAHJA,EAAO,YAAA,OAAA,KAAA,IAAAsK,EAAS,KAAI,MACnB,kBAAA,cAACtE,GAAAvH,EAAA;EAAoB,KAAKwP;EAAgB,SAASA;EAAgB,OAAOhH,IAAQ;CAAO,GAAA7G,CAAQ,CAAA,CAClG,CACI,KAVP,QAAA,IAAA,aAA6B,gBAAc,QAAQ,KAAK,iBAAiB+G,CAAO,GAEzE;AAUX;AAEA,SAAS0G,IAAsB;CAC7B,IAAMK,IAAQ,OAAO;CAOhB,OALDA,IAAQ,MAAY,IACfA,IAAQ,MAAY,KACpBA,IAAQ,OAAa,KACrBA,IAAQ,OAAa,KACrBA,IAAQ,OAAa,KAClB;AACd"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["throttle","__toESM","Checkbox","formatNotionDateTime","isBrowser","getYoutubeId","isUrl","formatDate","getListNumber","GracefulImage","NotionContextProvider","PageIconImpl","Breadcrumbs","SearchDialog","Text","NotionContextConsumer","_objectSpread2","_objectWithoutProperties","Header","PageTitle","Asset","dummyLink","LiteYouTubeEmbed","useNotionContext","AssetWrapper","Search","EOI","getHashFragmentValue","LazyImage","PageIcon","PropertyIcon","iconMap","CollectionColumnTitle","React","mediumZoom","Audio","_block$properties","source","recordMap","block","className","_excluded$2","FileIcon","props","rest","File","_block$properties2","_block$properties3","components","GoogleDrive","_block$format","properties","domain","err","mapImageUrl","import_lodash_throttle","__commonJSMin","FUNC_ERROR_TEXT","NAN","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","freeGlobal","freeSelf","root","objectToString","nativeMax","nativeMin","now","debounce","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","func","toNumber","wait","isObject","options","invokeFunc","args","thisArg","time","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","throttle","\"leading\"","\"maxWait\"","\"trailing\"","type","value","isObjectLike","isSymbol","other","isBinary","PageAside","actionSectionScrollSpy","sections","prevBBox","currentSectionId","activeSection","i","section","bbox","prevHeight","offset","setActiveSection","hasToc","hasAside","toc","id","uuidToId","tocItem","pageAside","SyncPointerBlock","_syncPointerBlock$for","syncPointerBlock","referencePointerId","NotionBlockRenderer","EditableText","_block$properties$tit","ref","text","getTextContent","reported","node","next","event","onChangeBlock","_excluded$1","LinkIcon","tocIndentLevelCache","pageCoverStyleCache","Block","ctx","level","view_block","blockId","hideBlockId","renderTitle","editable","isEditableBlock","defaultPageIcon","defaultPageCover","defaultPageCoverPosition","fullPage","_recordMap$collection","_getBlockIcon","getBlockCollectionId","pageCoverObjectPosition","page_cover_position","pageCoverStyle","pageIcon","getBlockIcon","isPageIconUrl","getPageTableOfContents","showTableOfContents","minTableOfContentsItems","page_full_width","hasPageCover","pageCover","page_cover","disableHeader","header","page_icon","page_small_text","bodyClassName","pageHeader","pageTitle","pageBody","children","pageFooter","footer","blockColor","mapPageUrl","_block$format2","_block$format3","_block$format4","title","indentLevel","indentLevelClass","page","getBlockParentPage","isH1","isH2","isH3","classNameStr","innerHeader","headerBlock","_block$content","_block$format5","_recordMap$block$bloc","wrapList","content","output","isTopLevel","start","_block$format6","_block$format7","_block$format8","_recordMap$block$bloc2","_parent$content","ratio","parent","style","_block$format9","_block$format10","_block$format11","_link$","_block$format12","_block$properties4","_block$format13","_block$format14","_block$format15","_block$format16","_block$properties5","link","_block$properties6","_block$format17","_block$properties7","_block$properties8","isChecked","_block$format18","_recordMap$block$bloc3","blockPointerId","linkedBlock","_recordMap$block$bloc4","_tableBlock$format","_tableBlock$format2","_block$format19","tableBlock","order","formatMap","backgroundColor","_formatMap$column","_formatMap$column2","_block$properties9","color","column","_excluded","_excluded2","NotionRenderer","_ref","zoom","getMediumZoomMargin","isImageZoomable","_recordMap$block$id","_ref2","contentBlockId","width","PageTitleImpl"],"sources":["../src/components/audio.tsx","../src/icons/file-icon.tsx","../src/components/file.tsx","../src/components/google-drive.tsx","../../../node_modules/.pnpm/lodash.throttle@4.1.1/node_modules/lodash.throttle/index.js","../src/components/page-aside.tsx","../src/components/sync-pointer-block.tsx","../src/components/editable-text.tsx","../src/icons/link-icon.tsx","../src/block.tsx","../src/renderer.tsx"],"sourcesContent":["import React from 'react'\n\nimport { AudioBlock } from '@texonom/ntypes'\n\nimport { useNotionContext } from '../context'\n\nexport const Audio: React.FC<{\n block: AudioBlock\n className?: string\n}> = ({ block, className }) => {\n const { recordMap } = useNotionContext()\n const source = recordMap.signed_urls[block.id] || block.properties?.source?.[0]?.[0]\n\n return (\n <div className={`notion-audio ${className || ''}`}>\n <audio controls preload='none' src={source} />\n </div>\n )\n}\n","import React from 'react'\n\nexport const FileIcon = props => {\n const { className, ...rest } = props\n return (\n <svg className={className} {...rest} viewBox='0 0 30 30'>\n <path d='M22,8v12c0,3.866-3.134,7-7,7s-7-3.134-7-7V8c0-2.762,2.238-5,5-5s5,2.238,5,5v12c0,1.657-1.343,3-3,3s-3-1.343-3-3V8h-2v12c0,2.762,2.238,5,5,5s5-2.238,5-5V8c0-3.866-3.134-7-7-7S6,4.134,6,8v12c0,4.971,4.029,9,9,9s9-4.029,9-9V8H22z'></path>\n </svg>\n )\n}\n","import React from 'react'\n\nimport { FileBlock } from '@texonom/ntypes'\n\nimport { useNotionContext } from '../context'\nimport { FileIcon } from '../icons/file-icon'\nimport { Text } from './text'\n\nexport const File: React.FC<{\n block: FileBlock\n className?: string\n}> = ({ block, className }) => {\n const { components, recordMap } = useNotionContext()\n const source = recordMap.signed_urls[block.id] || block.properties?.source?.[0]?.[0]\n\n return (\n <div className={`notion-file ${className || ''}`}>\n <components.Link className='notion-file-link' href={source} target='_blank' rel='noopener noreferrer'>\n <FileIcon className='notion-file-icon' />\n\n <div className='notion-file-info'>\n <div className='notion-file-title'>\n <Text value={block.properties?.title || [['File']]} block={block} />\n </div>\n\n {block.properties?.size && (\n <div className='notion-file-size'>\n <Text value={block.properties.size} block={block} />\n </div>\n )}\n </div>\n </components.Link>\n </div>\n )\n}\n","import React from 'react'\n\nimport { GoogleDriveBlock } from '@texonom/ntypes'\n\nimport { useNotionContext } from '../context'\nimport { GracefulImage } from './graceful-image'\n\nexport const GoogleDrive: React.FC<{\n block: GoogleDriveBlock\n className?: string\n}> = ({ block, className }) => {\n const { components, mapImageUrl } = useNotionContext()\n const properties = block.format?.drive_properties\n if (!properties) return null\n let domain\n\n try {\n const url = new URL(properties.url)\n domain = url.hostname\n } catch (err) {\n // ignore invalid urls for robustness\n }\n\n return (\n <div className={`notion-google-drive ${className || ''}`}>\n <components.Link className='notion-google-drive-link' href={properties.url} target='_blank' rel='noopener noreferrer'>\n <div className='notion-google-drive-preview'>\n <GracefulImage\n src={mapImageUrl(properties.thumbnail, block)}\n alt={properties.title || 'Google Drive Document'}\n loading='lazy'\n />\n </div>\n\n <div className='notion-google-drive-body'>\n {properties.title && <div className='notion-google-drive-body-title'>{properties.title}</div>}\n\n {/* TODO: re-add last modified time with alternative to timeago.js */}\n {/* {properties.modified_time && (\n <div className='notion-google-drive-body-modified-time'>\n Last modified{' '}\n {properties.user_name ? `by ${properties.user_name} ` : ''}\n {timeago(properties.modified_time)}\n </div>\n )} */}\n\n {properties.icon && domain && (\n <div className='notion-google-drive-body-source'>\n {properties.icon && (\n <div\n className='notion-google-drive-body-source-icon'\n style={{\n backgroundImage: `url(${properties.icon})`\n }}\n />\n )}\n\n {domain && <div className='notion-google-drive-body-source-domain'>{domain}</div>}\n </div>\n )}\n </div>\n </components.Link>\n </div>\n )\n}\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = throttle;\n","import React from 'react'\n\nimport throttle from 'lodash.throttle'\nimport { TableOfContentsEntry, uuidToId } from '@texonom/nutils'\n\nexport const PageAside: React.FC<{\n toc: Array<TableOfContentsEntry>\n activeSection: string | null\n setActiveSection: (activeSection: string | null) => unknown\n hasToc: boolean\n hasAside: boolean\n pageAside?: React.ReactNode\n className?: string\n}> = ({ toc, activeSection, setActiveSection, pageAside, hasToc, hasAside, className }) => {\n const throttleMs = 100\n const actionSectionScrollSpy = React.useMemo(\n () =>\n throttle(() => {\n const sections = document.getElementsByClassName('notion-h')\n\n let prevBBox: DOMRect = null\n let currentSectionId = activeSection\n\n for (let i = 0; i < sections.length; ++i) {\n const section = sections[i]\n if (!section || !(section instanceof Element)) continue\n\n if (!currentSectionId) currentSectionId = section.getAttribute('data-id')\n\n const bbox = section.getBoundingClientRect()\n const prevHeight = prevBBox ? bbox.top - prevBBox.bottom : 0\n const offset = Math.max(150, prevHeight / 4)\n\n // GetBoundingClientRect returns values relative to the viewport\n if (bbox.top - offset < 0) {\n currentSectionId = section.getAttribute('data-id')\n\n prevBBox = bbox\n continue\n }\n\n // No need to continue loop, if last element has been detected\n break\n }\n\n setActiveSection(currentSectionId)\n }, throttleMs),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n // explicitly not taking a dependency on activeSection\n setActiveSection\n ]\n )\n\n React.useEffect(() => {\n if (!hasToc) return\n\n window.addEventListener('scroll', actionSectionScrollSpy)\n\n actionSectionScrollSpy()\n\n return () => {\n window.removeEventListener('scroll', actionSectionScrollSpy)\n }\n }, [hasToc, actionSectionScrollSpy])\n\n if (!hasAside) return null\n\n return (\n <aside className={`notion-aside ${className || ''}`}>\n {hasToc && (\n <div className='notion-aside-table-of-contents'>\n <div className='notion-aside-table-of-contents-header'>Table of Contents</div>\n\n <nav className='notion-table-of-contents'>\n {toc.map(tocItem => {\n const id = uuidToId(tocItem.id)\n\n return (\n <a\n key={id}\n href={`#${id}`}\n className={`notion-table-of-contents-item\n notion-table-of-contents-item-indent-level-${tocItem.indentLevel}\n ${activeSection === id && 'notion-table-of-contents-active-item'}`}>\n <span\n className='notion-table-of-contents-item-body'\n style={{\n display: 'inline-block',\n marginLeft: tocItem.indentLevel * 16\n }}>\n {tocItem.text}\n </span>\n </a>\n )\n })}\n </nav>\n </div>\n )}\n\n {pageAside}\n </aside>\n )\n}\n","import React from 'react'\n\nimport { NotionBlockRenderer } from '../renderer'\n\nimport type { Block as BlockType, SyncPointerBlock as SyncPointerBlockType } from '@texonom/ntypes'\n\nexport const SyncPointerBlock: React.FC<{\n block: BlockType\n level: number\n}> = ({ block, level }) => {\n if (!block) {\n if (process.env.NODE_ENV !== 'production') console.warn('missing sync pointer block', block.id)\n\n return null\n }\n\n const syncPointerBlock = block as SyncPointerBlockType\n const referencePointerId = syncPointerBlock?.format?.transclusion_reference_pointer?.id\n\n if (!referencePointerId) return null\n\n return <NotionBlockRenderer key={referencePointerId} level={level} blockId={referencePointerId} />\n}\n","import React from 'react'\n\nimport { getTextContent } from '@texonom/nutils'\n\nimport { useNotionContext } from '../context'\n\nimport type { Block } from '@texonom/ntypes'\n\n/**\n * A text block the owner can edit in place.\n *\n * Rendered only in edit mode (`ctx.editable`) and only where nutils'\n * `isEditableBlock` allows, which is plain titles: the editor edits plain text,\n * so a formatted title stays read-only rather than lose what it does not show. The\n * public render path keeps using `<Text>`, so a page nobody edits is\n * byte-identical to before. The node is uncontrolled: React never reconciles\n * it, so the caret is never reset while someone is typing. On blur the plain\n * text is handed to `onChangeBlock`, which the host persists — this package\n * stays a renderer and never writes anything itself.\n */\nexport const EditableText: React.FC<{ block: Block }> = ({ block }) => {\n const { onChangeBlock } = useNotionContext()\n const ref = React.useRef<HTMLSpanElement>(null)\n const text = getTextContent(block.properties?.title ?? [])\n // The last value written into the node or reported to the host, not the value\n // at mount: an edit and a later undo back to the original are both changes.\n const reported = React.useRef<string | null>(null)\n\n React.useEffect(() => {\n // On mount, and again when the title moves under the editor — the host\n // dropped an edit — but never into a focused node, where it would reset the\n // caret mid-word. innerText, not textContent, so a soft line break survives\n // the round trip as `\\n` instead of collapsing the lines together.\n const node = ref.current\n if (!node || text === reported.current || node === document.activeElement) return\n node.innerText = text\n reported.current = text\n }, [text])\n\n return (\n <span\n ref={ref}\n className='notion-text-editable'\n role='textbox'\n aria-multiline='true'\n contentEditable\n suppressContentEditableWarning\n spellCheck\n onBlur={event => {\n // contentEditable leaves a trailing break behind after editing; it is\n // not content, and keeping it would report an edit nobody made.\n const next = event.currentTarget.innerText.replace(/\\n+$/, '')\n if (next === reported.current) return\n reported.current = next\n onChangeBlock?.(block.id, next)\n }}\n />\n )\n}\n","import React from 'react'\n\nexport const LinkIcon = props => {\n const { className, ...rest } = props\n return (\n <svg className={className} {...rest} viewBox='0 0 16 16' width='16' height='16'>\n <path\n fillRule='evenodd'\n d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'\n />\n </svg>\n )\n}\n","import React from 'react'\n\nimport {\n getBlockCollectionId,\n getBlockIcon,\n getBlockParentPage,\n getPageTableOfContents,\n getTextContent,\n isEditableBlock,\n uuidToId\n} from '@texonom/nutils'\n\nimport { AssetWrapper } from './components/asset-wrapper'\nimport { Audio } from './components/audio'\nimport { EOI } from './components/eoi'\nimport { File } from './components/file'\nimport { GoogleDrive } from './components/google-drive'\nimport { LazyImage } from './components/lazy-image'\nimport { PageAside } from './components/page-aside'\nimport { PageIcon } from './components/page-icon'\nimport { PageTitle } from './components/page-title'\nimport { SyncPointerBlock } from './components/sync-pointer-block'\nimport { Text } from './components/text'\nimport { EditableText } from './components/editable-text'\nimport { useNotionContext } from './context'\nimport { LinkIcon } from './icons/link-icon'\nimport { getListNumber, isUrl } from './utils'\n\nimport type {\n Block as BlockType,\n PageBlock,\n GoogleDriveBlock,\n AudioBlock,\n FileBlock,\n EquationBlock,\n CollectionViewPageBlock,\n CodeBlock,\n TableBlock\n} from '@texonom/ntypes'\ninterface BlockProps {\n block: BlockType\n level: number\n\n className?: string\n bodyClassName?: string\n\n header?: React.ReactNode\n footer?: React.ReactNode\n pageHeader?: React.ReactNode\n pageFooter?: React.ReactNode\n pageTitle?: React.ReactNode\n pageAside?: React.ReactNode\n pageCover?: React.ReactNode\n pageBody?: React.ReactNode\n\n hideBlockId?: boolean\n disableHeader?: boolean\n\n children?: React.ReactNode\n}\n\n// TODO: use react state instead of a global for this\nconst tocIndentLevelCache: {\n [blockId: string]: number\n} = {}\n\nconst pageCoverStyleCache: Record<string, object> = {}\n\nexport const Block: React.FC<BlockProps> = props => {\n const ctx = useNotionContext()\n const {\n components,\n fullPage,\n recordMap,\n mapPageUrl,\n mapImageUrl,\n showTableOfContents,\n minTableOfContentsItems,\n defaultPageIcon,\n defaultPageCover,\n defaultPageCoverPosition,\n editable\n } = ctx\n\n const [activeSection, setActiveSection] = React.useState(null)\n\n const {\n block,\n children,\n level,\n className,\n bodyClassName,\n header,\n footer,\n pageHeader,\n pageFooter,\n pageTitle,\n pageAside,\n pageCover,\n pageBody,\n hideBlockId,\n disableHeader\n } = props\n\n if (!block) return null\n\n // ugly hack to make viewing raw collection views work properly\n // e.g., 6d886ca87ab94c21a16e3b82b43a57fb\n if (level === 0 && block.type === 'collection_view') {\n const view_block = block as unknown as CollectionViewPageBlock\n view_block.type = 'collection_view_page'\n }\n\n const blockId = hideBlockId ? 'notion-block' : `notion-block-${uuidToId(block.id)}`\n\n // Edit mode swaps a plain title for an editable one. A formatted title keeps its\n // read-only render: the editor works in plain text, and saving it would drop\n // the bold, links and mentions it does not show.\n const renderTitle = () =>\n editable && isEditableBlock(block) ? (\n <EditableText block={block} />\n ) : (\n <Text value={block.properties.title} block={block} />\n )\n\n switch (block.type) {\n case 'collection_view_page':\n // fallthrough\n case 'page':\n if (level === 0) {\n const {\n page_icon = defaultPageIcon,\n page_cover = defaultPageCover,\n page_cover_position = defaultPageCoverPosition,\n page_full_width,\n page_small_text\n } = block.format || {}\n\n if (fullPage) {\n const properties =\n block.type === 'page'\n ? block.properties\n : {\n title: recordMap.collection[getBlockCollectionId(block, recordMap)]?.value?.name\n }\n\n const coverPosition = (1 - (page_cover_position || 0.5)) * 100\n const pageCoverObjectPosition = `center ${coverPosition}%`\n let pageCoverStyle = pageCoverStyleCache[pageCoverObjectPosition]\n if (!pageCoverStyle)\n pageCoverStyle = pageCoverStyleCache[pageCoverObjectPosition] = {\n objectPosition: pageCoverObjectPosition\n }\n\n const pageIcon = getBlockIcon(block, recordMap) ?? defaultPageIcon\n const isPageIconUrl = pageIcon && isUrl(pageIcon)\n\n const toc = getPageTableOfContents(block as PageBlock, recordMap)\n\n const hasToc = showTableOfContents && toc.length >= minTableOfContentsItems\n const hasAside = (hasToc || pageAside) && !page_full_width\n const hasPageCover = pageCover || page_cover\n\n return (\n <div className={`notion notion-app ${blockId} ${className || ''}`}>\n <div className='notion-viewport' />\n\n <div className='notion-frame'>\n {!disableHeader && <components.Header block={block} />}\n {header}\n\n <div className='notion-page-scroller'>\n {hasPageCover &&\n (pageCover ? (\n pageCover\n ) : (\n <div className='notion-page-cover-wrapper'>\n <LazyImage\n src={mapImageUrl(page_cover, block)}\n alt={getTextContent(properties?.title)}\n priority={true}\n className='notion-page-cover'\n style={pageCoverStyle}\n />\n </div>\n ))}\n\n <main\n className={`notion-page\n ${hasPageCover ? 'notion-page-has-cover' : 'notion-page-no-cover'}\n ${page_icon ? 'notion-page-has-icon' : 'notion-page-no-icon'}\n ${isPageIconUrl ? 'notion-page-has-image-icon' : 'notion-page-has-text-icon'}\n notion-full-page\n ${page_full_width && 'notion-full-width'}\n ${page_small_text && 'notion-small-text'}\n ${bodyClassName}`}>\n {page_icon && <PageIcon block={block} defaultIcon={defaultPageIcon} inline={false} />}\n\n {pageHeader}\n\n <h1 className='notion-title'>{pageTitle ?? <Text value={properties?.title} block={block} />}</h1>\n\n {(block.type === 'collection_view_page' ||\n (block.type === 'page' && block.parent_table === 'collection')) && (\n <components.Collection block={block} ctx={ctx} />\n )}\n\n {block.type !== 'collection_view_page' && (\n <div\n className={`notion-page-content\n ${hasAside && 'notion-page-content-has-aside'}\n ${hasToc && 'notion-page-content-has-toc'}`}>\n <article className='notion-page-content-inner'>{pageBody ?? children}</article>\n\n {hasAside && (\n <PageAside\n toc={toc}\n activeSection={activeSection}\n setActiveSection={setActiveSection}\n hasToc={hasToc}\n hasAside={hasAside}\n pageAside={pageAside}\n />\n )}\n </div>\n )}\n\n {pageFooter}\n </main>\n\n {footer}\n </div>\n </div>\n </div>\n )\n } else {\n return (\n <main\n className={`notion\n notion-page\n ${page_full_width && 'notion-full-width'}\n ${page_small_text && 'notion-small-text'}\n ${blockId}\n ${className || ''}\n ${bodyClassName}`}>\n <div className='notion-viewport' />\n\n {pageHeader}\n\n {(block.type === 'collection_view_page' || (block.type === 'page' && block.parent_table === 'collection')) && (\n <components.Collection block={block} ctx={ctx} />\n )}\n\n {block.type !== 'collection_view_page' && (pageBody ?? children)}\n\n {pageFooter}\n </main>\n )\n }\n } else {\n const blockColor = block.format?.block_color\n\n return (\n <components.PageLink\n className={`notion-page-link ${blockColor && `notion-${blockColor}`} ${blockId}`}\n href={mapPageUrl(block.id)}>\n <PageTitle block={block} />\n </components.PageLink>\n )\n }\n\n case 'header':\n // fallthrough\n case 'sub_header':\n // fallthrough\n case 'sub_sub_header': {\n if (!block.properties) return null\n\n const blockColor = block.format?.block_color\n const id = uuidToId(block.id)\n const title = getTextContent(block.properties.title) || `Notion Header ${id}`\n\n // we use a cache here because constructing the ToC is non-trivial\n let indentLevel = tocIndentLevelCache[block.id]\n let indentLevelClass: string\n\n if (indentLevel === undefined) {\n const page = getBlockParentPage(block, recordMap)\n\n if (page) {\n const toc = getPageTableOfContents(page, recordMap)\n const tocItem = toc.find(tocItem => tocItem.id === block.id)\n\n if (tocItem) {\n indentLevel = tocItem.indentLevel\n tocIndentLevelCache[block.id] = indentLevel\n }\n }\n }\n\n if (indentLevel !== undefined) indentLevelClass = `notion-h-indent-${indentLevel}`\n\n const isH1 = block.type === 'header'\n const isH2 = block.type === 'sub_header'\n const isH3 = block.type === 'sub_sub_header'\n\n const classNameStr = `${isH1 && 'notion-h notion-h1'}\n ${isH2 && 'notion-h notion-h2'}\n ${isH3 && 'notion-h notion-h3'}\n ${blockColor && `notion-${blockColor}`}\n ${indentLevelClass},\n ${blockId}`\n\n const innerHeader = (\n <span>\n <div id={id} className='notion-header-anchor' />\n {!block.format?.toggleable && (\n <a className='notion-hash-link' href={`#${id}`} title={title}>\n <LinkIcon />\n </a>\n )}\n\n <span className='notion-h-title'>{renderTitle()}</span>\n </span>\n )\n let headerBlock = null\n\n //page title takes the h1 so all header blocks are greater\n if (isH1)\n headerBlock = (\n <h2 className={classNameStr} data-id={id}>\n {innerHeader}\n </h2>\n )\n else if (isH2)\n headerBlock = (\n <h3 className={classNameStr} data-id={id}>\n {innerHeader}\n </h3>\n )\n else\n headerBlock = (\n <h4 className={classNameStr} data-id={id}>\n {innerHeader}\n </h4>\n )\n\n if (block.format?.toggleable)\n return (\n <details className={`notion-toggle ${blockId}`}>\n <summary>{headerBlock}</summary>\n <div>{children}</div>\n </details>\n )\n else return headerBlock\n }\n\n case 'divider':\n return <hr className={`notion-hr ${blockId}`} />\n\n case 'text': {\n if (!block.properties && !block.content?.length) return <div className={`notion-blank ${blockId}`}> </div>\n\n const blockColor = block.format?.block_color\n\n return (\n <div className={`notion-text ${blockColor && `notion-${blockColor}`} ${blockId}`}>\n {block.properties?.title && renderTitle()}\n\n {children && <div className='notion-text-children'>{children}</div>}\n </div>\n )\n }\n\n case 'bulleted_list':\n // fallthrough\n case 'numbered_list': {\n const wrapList = (content: React.ReactNode, start?: number) =>\n block.type === 'bulleted_list' ? (\n <ul className={`notion-list notion-list-disc ${blockId}`}>{content}</ul>\n ) : (\n <ol start={start} className={`notion-list notion-list-numbered ${blockId}`}>\n {content}\n </ol>\n )\n\n let output: React.JSX.Element | null = null\n\n if (block.content)\n output = (\n <>\n {block.properties && <li>{renderTitle()}</li>}\n {wrapList(children)}\n </>\n )\n else output = block.properties ? <li>{renderTitle()}</li> : null\n\n const isTopLevel = block.type !== recordMap.block[block.parent_id]?.value?.type\n const start = getListNumber(block.id, recordMap.block)\n\n return isTopLevel ? wrapList(output, start) : output\n }\n\n case 'embed':\n return <components.Embed blockId={blockId} block={block} />\n case 'tweet':\n // fallthrough\n case 'maps':\n // fallthrough\n case 'pdf':\n // fallthrough\n case 'figma':\n // fallthrough\n case 'typeform':\n // fallthrough\n case 'codepen':\n // fallthrough\n case 'excalidraw':\n // fallthrough\n case 'image':\n // fallthrough\n case 'gist':\n // fallthrough\n case 'video':\n return <AssetWrapper blockId={blockId} block={block} />\n\n case 'drive': {\n const properties = block.format?.drive_properties\n if (!properties)\n if (block.format?.display_source)\n //check if this drive actually needs to be embeded ex. google sheets.\n return <AssetWrapper blockId={blockId} block={block} />\n\n return <GoogleDrive block={block as GoogleDriveBlock} className={blockId} />\n }\n\n case 'audio':\n return <Audio block={block as AudioBlock} className={blockId} />\n\n case 'file':\n return <File block={block as FileBlock} className={blockId} />\n\n case 'equation':\n return <components.Equation block={block as EquationBlock} inline={false} className={blockId} />\n\n case 'code':\n return <components.Code block={block as CodeBlock} />\n\n case 'column_list':\n return <div className={`notion-row ${blockId}`}>{children}</div>\n\n case 'column': {\n // note: notion uses 46px\n const spacerWidth = `min(32px, 4vw)`\n const ratio = block.format?.column_ratio || 0.5\n const parent = recordMap.block[block.parent_id]?.value\n const columns = parent?.content?.length || Math.max(2, Math.ceil(1.0 / ratio))\n\n const width = `calc((100% - (${columns - 1} * ${spacerWidth})) * ${ratio})`\n const style = { width }\n\n return (\n <>\n <div className={`notion-column ${blockId}`} style={style}>\n {children}\n </div>\n\n <div className='notion-spacer' />\n </>\n )\n }\n\n case 'quote': {\n if (!block.properties) return null\n\n const blockColor = block.format?.block_color\n\n return (\n <blockquote className={`notion-quote ${blockColor && `notion-${blockColor}`} ${blockId}`}>\n <div>\n <Text value={block.properties.title} block={block} />\n </div>\n {children}\n </blockquote>\n )\n }\n\n case 'collection_view':\n return <components.Collection block={block} className={blockId} ctx={ctx} />\n\n case 'callout':\n if (components.Callout) return <components.Callout block={block} className={blockId} />\n else\n return (\n <div\n className={`notion-callout ${block.format?.block_color && `notion-${block.format?.block_color}_co`} ${blockId}`}>\n <PageIcon block={block} />\n\n <div className='notion-callout-text'>\n <Text value={block.properties?.title} block={block} />\n {children}\n </div>\n </div>\n )\n\n case 'bookmark': {\n if (!block.properties) return null\n\n const link = block.properties.link\n if (!link || !link[0]?.[0]) return null\n\n let title = getTextContent(block.properties.title)\n if (!title) title = getTextContent(link)\n\n if (title)\n if (title.startsWith('http'))\n try {\n const url = new URL(title)\n title = url.hostname\n } catch (err) {\n // ignore invalid links\n }\n\n return (\n <div className='notion-row'>\n <components.Link\n target='_blank'\n rel='noopener noreferrer'\n className={`notion-bookmark ${block.format?.block_color ? `notion-${block.format.block_color}` : ''} ${blockId}`}\n href={link[0][0]}>\n <div>\n {title && (\n <div className='notion-bookmark-title'>\n <Text value={[[title]]} block={block} />\n </div>\n )}\n\n {block.properties?.description && (\n <div className='notion-bookmark-description'>\n <Text value={block.properties?.description} block={block} />\n </div>\n )}\n\n <div className='notion-bookmark-link'>\n {block.format?.bookmark_icon && (\n <div className='notion-bookmark-link-icon'>\n <LazyImage\n src={mapImageUrl(block.format?.bookmark_icon, block)}\n alt={title}\n onError={e => {\n const parent = e.currentTarget.closest('.notion-bookmark-link-icon') as HTMLElement\n if (parent) parent.style.display = 'none'\n }}\n />\n </div>\n )}\n\n <div className='notion-bookmark-link-text'>\n <Text value={link} block={block} />\n </div>\n </div>\n </div>\n\n {block.format?.bookmark_cover && (\n <div className='notion-bookmark-image'>\n <LazyImage\n // YouTube stores `maxresdefault.jpg` covers that 404 for videos lacking a\n // max-res still (logging a console error and hiding the thumbnail). The\n // `hqdefault.jpg` variant always exists, so prefer it for ytimg covers.\n src={mapImageUrl(block.format?.bookmark_cover, block).replace(\n /(\\/\\/i\\.ytimg\\.com\\/.*?)maxresdefault/,\n '$1hqdefault'\n )}\n alt={getTextContent(block.properties?.title)}\n style={{\n objectFit: 'cover'\n }}\n onError={e => {\n const parent = e.currentTarget.closest('.notion-bookmark-image') as HTMLElement\n if (parent) parent.style.display = 'none'\n }}\n />\n </div>\n )}\n </components.Link>\n </div>\n )\n }\n\n case 'toggle':\n return (\n <details className={`notion-toggle ${blockId}`}>\n <summary>\n <Text value={block.properties?.title} block={block} />\n </summary>\n\n <div>{children}</div>\n </details>\n )\n\n case 'table_of_contents': {\n const page = getBlockParentPage(block, recordMap)\n if (!page) return null\n\n const toc = getPageTableOfContents(page, recordMap)\n const blockColor = block.format?.block_color\n\n return (\n <div className={`notion-table-of-contents ${blockColor && `notion-${blockColor}`} ${blockId}`}>\n {toc.map(tocItem => (\n <a key={tocItem.id} href={`#${uuidToId(tocItem.id)}`} className='notion-table-of-contents-item'>\n <span\n className='notion-table-of-contents-item-body'\n style={{\n display: 'inline-block',\n marginLeft: tocItem.indentLevel * 24\n }}>\n {tocItem.text}\n </span>\n </a>\n ))}\n </div>\n )\n }\n\n case 'to_do': {\n const isChecked = block.properties?.checked?.[0]?.[0] === 'Yes'\n\n return (\n <div className={`notion-to-do ${blockId}`}>\n <div className='notion-to-do-item'>\n <components.Checkbox blockId={blockId} isChecked={isChecked} />\n\n <div className={`notion-to-do-body ${isChecked && `notion-to-do-checked`}`}>\n <Text value={block.properties?.title} block={block} />\n </div>\n </div>\n\n <div className='notion-to-do-children'>{children}</div>\n </div>\n )\n }\n\n case 'transclusion_container':\n return <div className={`notion-sync-block ${blockId}`}>{children}</div>\n\n case 'transclusion_reference':\n return <SyncPointerBlock block={block} level={level + 1} {...props} />\n\n case 'alias': {\n const blockPointerId = block?.format?.alias_pointer?.id\n const linkedBlock = recordMap.block[blockPointerId]?.value\n if (!linkedBlock) {\n console.debug('\"alias\" missing block', blockPointerId)\n return null\n }\n\n return (\n <components.PageLink className={`notion-page-link ${blockPointerId}}`} href={mapPageUrl(blockPointerId)}>\n <PageTitle block={linkedBlock} />\n </components.PageLink>\n )\n }\n\n case 'table':\n return (\n <table className={`notion-simple-table ${blockId}`}>\n <tbody>{children}</tbody>\n </table>\n )\n\n case 'table_row': {\n const tableBlock = recordMap.block[block.parent_id]?.value as TableBlock\n const order = tableBlock.format?.table_block_column_order\n const formatMap = tableBlock.format?.table_block_column_format\n const backgroundColor = block.format?.block_color\n\n if (!tableBlock || !order) return null\n\n return (\n <tr className={`notion-simple-table-row ${backgroundColor && `notion-${backgroundColor}`} ${blockId}`}>\n {order.map(column => {\n const color = formatMap?.[column]?.color\n\n return (\n <td\n key={column}\n className={color ? `notion-${color}` : ''}\n style={{\n width: formatMap?.[column]?.width || 120\n }}>\n <div className='notion-simple-table-cell'>\n <Text value={block.properties?.[column] || [['ㅤ']]} block={block} />\n </div>\n </td>\n )\n })}\n </tr>\n )\n }\n\n case 'external_object_instance':\n return <EOI block={block} className={blockId} />\n\n default:\n if (process.env.NODE_ENV !== 'production')\n console.debug('Unsupported type ' + (block as BlockType).type, JSON.stringify(block, null, 2))\n\n return <div />\n }\n}\n","import React from 'react'\n\nimport mediumZoom from '@fisch0920/medium-zoom'\nimport type { ExtendedRecordMap } from '@texonom/ntypes'\n\nimport { Block } from './block'\nimport { NotionContextProvider, useNotionContext } from './context'\nimport { MapImageUrlFn, MapPageUrlFn, NotionComponents, SearchNotionFn } from './types'\n\nexport const NotionRenderer: React.FC<{\n recordMap: ExtendedRecordMap\n components?: Partial<NotionComponents>\n\n mapPageUrl?: MapPageUrlFn\n mapImageUrl?: MapImageUrlFn\n searchNotion?: SearchNotionFn\n isShowingSearch?: boolean\n onHideSearch?: () => void\n\n rootPageId?: string\n rootDomain?: string\n rootSpaceId?: string\n\n // set fullPage to false to render page content only\n // this will remove the header, cover image, and footer\n fullPage?: boolean\n\n darkMode?: boolean\n previewImages?: boolean\n forceCustomImages?: boolean\n showCollectionViewDropdown?: boolean\n linkTableTitleProperties?: boolean\n isLinkCollectionToUrlProperty?: boolean\n isImageZoomable?: boolean\n\n // Owner edit mode. Off by default; the host turns it on and persists onChangeBlock.\n editable?: boolean\n onChangeBlock?: (blockId: string, title: string) => void\n\n showTableOfContents?: boolean\n minTableOfContentsItems?: number\n\n defaultPageIcon?: string\n defaultPageCover?: string\n defaultPageCoverPosition?: number\n\n className?: string\n bodyClassName?: string\n\n header?: React.ReactNode\n footer?: React.ReactNode\n pageHeader?: React.ReactNode\n pageFooter?: React.ReactNode\n pageTitle?: React.ReactNode\n pageAside?: React.ReactNode\n pageCover?: React.ReactNode\n // Drawn in place of the page's content blocks, under the same cover, title and\n // table of contents: how a host swaps the body for an editor.\n pageBody?: React.ReactNode\n\n blockId?: string\n hideBlockId?: boolean\n disableHeader?: boolean\n}> = ({\n components,\n recordMap,\n mapPageUrl,\n mapImageUrl,\n searchNotion,\n isShowingSearch,\n onHideSearch,\n fullPage,\n rootPageId,\n rootDomain,\n rootSpaceId,\n darkMode,\n previewImages,\n forceCustomImages,\n showCollectionViewDropdown,\n linkTableTitleProperties,\n isLinkCollectionToUrlProperty,\n isImageZoomable = true,\n showTableOfContents,\n minTableOfContentsItems,\n defaultPageIcon,\n defaultPageCover,\n defaultPageCoverPosition,\n editable,\n onChangeBlock,\n ...rest\n}) => {\n const zoom = React.useMemo(\n () =>\n typeof window !== 'undefined' &&\n mediumZoom({\n background: 'rgba(0, 0, 0, 0.8)',\n minZoomScale: 2.0,\n margin: getMediumZoomMargin()\n }),\n []\n )\n\n return (\n <NotionContextProvider\n components={components}\n recordMap={recordMap}\n mapPageUrl={mapPageUrl}\n mapImageUrl={mapImageUrl}\n searchNotion={searchNotion}\n isShowingSearch={isShowingSearch}\n onHideSearch={onHideSearch}\n fullPage={fullPage}\n rootPageId={rootPageId}\n rootDomain={rootDomain}\n rootSpaceId={rootSpaceId}\n darkMode={darkMode}\n previewImages={previewImages}\n forceCustomImages={forceCustomImages}\n showCollectionViewDropdown={showCollectionViewDropdown}\n linkTableTitleProperties={linkTableTitleProperties}\n isLinkCollectionToUrlProperty={isLinkCollectionToUrlProperty}\n showTableOfContents={showTableOfContents}\n minTableOfContentsItems={minTableOfContentsItems}\n defaultPageIcon={defaultPageIcon}\n defaultPageCover={defaultPageCover}\n defaultPageCoverPosition={defaultPageCoverPosition}\n editable={editable}\n onChangeBlock={onChangeBlock}\n zoom={isImageZoomable ? zoom : null}>\n <NotionBlockRenderer {...rest} />\n </NotionContextProvider>\n )\n}\n\nexport const NotionBlockRenderer: React.FC<{\n className?: string\n bodyClassName?: string\n header?: React.ReactNode\n footer?: React.ReactNode\n disableHeader?: boolean\n\n blockId?: string\n hideBlockId?: boolean\n level?: number\n}> = ({ level = 0, blockId, ...props }) => {\n const { recordMap } = useNotionContext()\n const id = blockId || Object.keys(recordMap.block)[0]\n const block = recordMap.block[id]?.value\n\n if (!block) {\n if (process.env.NODE_ENV !== 'production') console.warn('missing block', blockId)\n\n return null\n }\n\n return (\n <Block key={id} level={level} block={block} {...props}>\n {block?.content?.map(contentBlockId => (\n <NotionBlockRenderer key={contentBlockId} blockId={contentBlockId} level={level + 1} {...props} />\n ))}\n </Block>\n )\n}\n\nfunction getMediumZoomMargin() {\n const width = window.innerWidth\n\n if (width < 500) return 8\n else if (width < 800) return 20\n else if (width < 1280) return 30\n else if (width < 1600) return 40\n else if (width < 1920) return 48\n else return 72\n}\n"],"ignoreList":[4],"mappings":";;;;;;;AAMA,IAAamC,MAGP,EAAE,UAAO,mBAAgB;;CAC7B,IAAM,EAAE,iBAAcZ,EAAiB,GACjCc,IAASC,EAAU,YAAYC,EAAM,SAAA,IAAOA,EAAM,eAAA,SAAA,IAAAH,EAAY,WAAA,SAAA,IAAAA,EAAS,OAAA,OAAA,KAAA,IAAAA,EAAK;CAElF,OACE,kBAAA,cAAC,OAAD,EAAK,WAAW,gBAAgBI,KAAa,KAExC,GADH,kBAAA,cAAC,SAAD;EAAO,UAAA;EAAS,SAAQ;EAAO,KAAKH;CAAS,CAAA,CAC1C;AAET,GCfUI,IAAA,CAAA,WAAA,GADGC,KAAW,MAAS;CAC/B,IAAM,EAAE,iBAAAC,GAAcC,IAAA3B,EAAS0B,GAAAF,CAAA;CAC/B,OACE,kBAAA,cAAC,OAAAzB,EAAAA,EAAA,EAAe,aAAA,GAAe4B,CAAA,GAAA,CAAA,GAAA,EAAM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AM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAG3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE1B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAqEA,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAkBA,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@texonom/nreact",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Fast and accurate React renderer for Notion.",
|
|
6
6
|
"repository": {
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"@fisch0920/medium-zoom": "^1.0.7",
|
|
25
25
|
"@matejmazur/react-katex": "^3.1.3",
|
|
26
26
|
"katex": "^0.19.0",
|
|
27
|
-
"@texonom/ntypes": "^1.6.
|
|
28
|
-
"@texonom/nutils": "^1.6.
|
|
27
|
+
"@texonom/ntypes": "^1.6.5",
|
|
28
|
+
"@texonom/nutils": "^1.6.5",
|
|
29
29
|
"prismjs": "^1.30.0",
|
|
30
30
|
"react-fast-compare": "^3.2.2",
|
|
31
31
|
"react-hotkeys-hook": "^5.3.3",
|