@texonom/nreact 1.2.10 → 1.2.12

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.
Files changed (65) hide show
  1. package/build/.tsbuildinfo +1 -1
  2. package/build/block.d.ts.map +1 -1
  3. package/build/chunk-2U7I3XVC.js +157 -0
  4. package/build/chunk-3R4ITV3N.js +1358 -0
  5. package/build/chunk-FCO7MUK6.js +83 -0
  6. package/build/chunk-HJGIONX2.js +1358 -0
  7. package/build/chunk-VP33CFNB.js +1358 -0
  8. package/build/components/asset-wrapper.d.ts.map +1 -1
  9. package/build/components/audio.d.ts.map +1 -1
  10. package/build/components/eoi.d.ts.map +1 -1
  11. package/build/components/file.d.ts.map +1 -1
  12. package/build/components/google-drive.d.ts.map +1 -1
  13. package/build/components/header.d.ts.map +1 -1
  14. package/build/components/lite-youtube-embed.d.ts.map +1 -1
  15. package/build/components/page-aside.d.ts.map +1 -1
  16. package/build/components/page-title.d.ts.map +1 -1
  17. package/build/components/search-dialog.d.ts.map +1 -1
  18. package/build/dev/chunk-4XJBBVRZ.js +1359 -0
  19. package/build/dev/chunk-4XJBBVRZ.js.map +1 -0
  20. package/build/dev/chunk-7R2ZX3WF.js +1359 -0
  21. package/build/dev/chunk-7R2ZX3WF.js.map +1 -0
  22. package/build/dev/chunk-N6EDMIQD.js +1359 -0
  23. package/build/dev/chunk-N6EDMIQD.js.map +1 -0
  24. package/build/dev/chunk-NVAEYUJK.js +1359 -0
  25. package/build/dev/chunk-NVAEYUJK.js.map +1 -0
  26. package/build/dev/chunk-PM5CWL6O.js +158 -0
  27. package/build/dev/chunk-PM5CWL6O.js.map +1 -0
  28. package/build/dev/chunk-Q4G2SZRD.js +84 -0
  29. package/build/dev/chunk-Q4G2SZRD.js.map +1 -0
  30. package/build/dev/chunk-QN4Z7A2J.js +1359 -0
  31. package/build/dev/chunk-QN4Z7A2J.js.map +1 -0
  32. package/build/dev/index.js +56 -69
  33. package/build/dev/index.js.map +1 -1
  34. package/build/dev/third-party/code.js +3 -4
  35. package/build/dev/third-party/code.js.map +1 -1
  36. package/build/dev/third-party/collection.js +16 -19
  37. package/build/dev/third-party/collection.js.map +1 -1
  38. package/build/dev/third-party/equation.js +3 -4
  39. package/build/dev/third-party/equation.js.map +1 -1
  40. package/build/dev/third-party/modal.js +1 -1
  41. package/build/dev/third-party/pdf.js +1 -1
  42. package/build/dev/third-party/pdf.js.map +1 -1
  43. package/build/icons/clear-icon.d.ts.map +1 -1
  44. package/build/icons/loading-icon.d.ts.map +1 -1
  45. package/build/icons/search-icon.d.ts.map +1 -1
  46. package/build/index.js +56 -69
  47. package/build/third-party/code.d.ts.map +1 -1
  48. package/build/third-party/code.js +3 -4
  49. package/build/third-party/collection-card.d.ts.map +1 -1
  50. package/build/third-party/collection-row.d.ts.map +1 -1
  51. package/build/third-party/collection-view-board.d.ts.map +1 -1
  52. package/build/third-party/collection-view-gallery.d.ts.map +1 -1
  53. package/build/third-party/collection-view-table.d.ts.map +1 -1
  54. package/build/third-party/collection.d.ts.map +1 -1
  55. package/build/third-party/collection.js +16 -19
  56. package/build/third-party/equation.d.ts.map +1 -1
  57. package/build/third-party/equation.js +3 -4
  58. package/build/third-party/modal.js +1 -1
  59. package/build/third-party/pdf.js +1 -1
  60. package/build/third-party/property.d.ts.map +1 -1
  61. package/build/types.d.ts +34 -12
  62. package/build/types.d.ts.map +1 -1
  63. package/build/utils.d.ts +0 -1
  64. package/build/utils.d.ts.map +1 -1
  65. package/package.json +10 -10
@@ -2,7 +2,7 @@ import {
2
2
  CollectionColumnTitle,
3
3
  PropertyIcon,
4
4
  iconMap
5
- } from "./chunk-CWNFRR32.js";
5
+ } from "./chunk-PM5CWL6O.js";
6
6
  import {
7
7
  Asset,
8
8
  AssetWrapper,
@@ -22,7 +22,6 @@ import {
22
22
  Search,
23
23
  SearchDialog,
24
24
  Text,
25
- cs,
26
25
  dummyLink,
27
26
  formatDate,
28
27
  formatNotionDateTime,
@@ -33,13 +32,13 @@ import {
33
32
  isUrl,
34
33
  require_lodash,
35
34
  useNotionContext
36
- } from "./chunk-VHTSGS2P.js";
35
+ } from "./chunk-N6EDMIQD.js";
37
36
  import {
38
37
  __objRest,
39
38
  __spreadProps,
40
39
  __spreadValues,
41
40
  __toESM
42
- } from "./chunk-JX5CEG3A.js";
41
+ } from "./chunk-Q4G2SZRD.js";
43
42
 
44
43
  // src/renderer.tsx
45
44
  import React9 from "react";
@@ -62,7 +61,7 @@ var Audio = ({ block, className }) => {
62
61
  var _a, _b, _c;
63
62
  const { recordMap } = useNotionContext();
64
63
  const source = recordMap.signed_urls[block.id] || ((_c = (_b = (_a = block.properties) == null ? void 0 : _a.source) == null ? void 0 : _b[0]) == null ? void 0 : _c[0]);
65
- return /* @__PURE__ */ React.createElement("div", { className: cs("notion-audio", className) }, /* @__PURE__ */ React.createElement("audio", { controls: true, preload: "none", src: source }));
64
+ return /* @__PURE__ */ React.createElement("div", { className: `notion-audio ${className || ""}` }, /* @__PURE__ */ React.createElement("audio", { controls: true, preload: "none", src: source }));
66
65
  };
67
66
 
68
67
  // src/components/file.tsx
@@ -80,7 +79,7 @@ var File = ({ block, className }) => {
80
79
  var _a, _b, _c, _d, _e;
81
80
  const { components, recordMap } = useNotionContext();
82
81
  const source = recordMap.signed_urls[block.id] || ((_c = (_b = (_a = block.properties) == null ? void 0 : _a.source) == null ? void 0 : _b[0]) == null ? void 0 : _c[0]);
83
- return /* @__PURE__ */ React3.createElement("div", { className: cs("notion-file", className) }, /* @__PURE__ */ React3.createElement(components.Link, { className: "notion-file-link", href: source, target: "_blank", rel: "noopener noreferrer" }, /* @__PURE__ */ React3.createElement(FileIcon, { className: "notion-file-icon" }), /* @__PURE__ */ React3.createElement("div", { className: "notion-file-info" }, /* @__PURE__ */ React3.createElement("div", { className: "notion-file-title" }, /* @__PURE__ */ React3.createElement(Text, { value: ((_d = block.properties) == null ? void 0 : _d.title) || [["File"]], block })), ((_e = block.properties) == null ? void 0 : _e.size) && /* @__PURE__ */ React3.createElement("div", { className: "notion-file-size" }, /* @__PURE__ */ React3.createElement(Text, { value: block.properties.size, block })))));
82
+ return /* @__PURE__ */ React3.createElement("div", { className: `notion-file ${className || ""}` }, /* @__PURE__ */ React3.createElement(components.Link, { className: "notion-file-link", href: source, target: "_blank", rel: "noopener noreferrer" }, /* @__PURE__ */ React3.createElement(FileIcon, { className: "notion-file-icon" }), /* @__PURE__ */ React3.createElement("div", { className: "notion-file-info" }, /* @__PURE__ */ React3.createElement("div", { className: "notion-file-title" }, /* @__PURE__ */ React3.createElement(Text, { value: ((_d = block.properties) == null ? void 0 : _d.title) || [["File"]], block })), ((_e = block.properties) == null ? void 0 : _e.size) && /* @__PURE__ */ React3.createElement("div", { className: "notion-file-size" }, /* @__PURE__ */ React3.createElement(Text, { value: block.properties.size, block })))));
84
83
  };
85
84
 
86
85
  // src/components/google-drive.tsx
@@ -97,7 +96,7 @@ var GoogleDrive = ({ block, className }) => {
97
96
  domain = url.hostname;
98
97
  } catch (err) {
99
98
  }
100
- return /* @__PURE__ */ React4.createElement("div", { className: cs("notion-google-drive", className) }, /* @__PURE__ */ React4.createElement(components.Link, { className: "notion-google-drive-link", href: properties.url, target: "_blank", rel: "noopener noreferrer" }, /* @__PURE__ */ React4.createElement("div", { className: "notion-google-drive-preview" }, /* @__PURE__ */ React4.createElement(
99
+ return /* @__PURE__ */ React4.createElement("div", { className: `notion-google-drive ${className || ""}` }, /* @__PURE__ */ React4.createElement(components.Link, { className: "notion-google-drive-link", href: properties.url, target: "_blank", rel: "noopener noreferrer" }, /* @__PURE__ */ React4.createElement("div", { className: "notion-google-drive-preview" }, /* @__PURE__ */ React4.createElement(
101
100
  GracefulImage,
102
101
  {
103
102
  src: mapImageUrl(properties.thumbnail, block),
@@ -161,18 +160,16 @@ var PageAside = ({ toc, activeSection, setActiveSection, pageAside, hasToc, hasA
161
160
  }, [hasToc, actionSectionScrollSpy]);
162
161
  if (!hasAside)
163
162
  return null;
164
- return /* @__PURE__ */ React5.createElement("aside", { className: cs("notion-aside", className) }, hasToc && /* @__PURE__ */ React5.createElement("div", { className: "notion-aside-table-of-contents" }, /* @__PURE__ */ React5.createElement("div", { className: "notion-aside-table-of-contents-header" }, "Table of Contents"), /* @__PURE__ */ React5.createElement("nav", { className: "notion-table-of-contents" }, toc.map((tocItem) => {
163
+ return /* @__PURE__ */ React5.createElement("aside", { className: `notion-aside ${className || ""}` }, hasToc && /* @__PURE__ */ React5.createElement("div", { className: "notion-aside-table-of-contents" }, /* @__PURE__ */ React5.createElement("div", { className: "notion-aside-table-of-contents-header" }, "Table of Contents"), /* @__PURE__ */ React5.createElement("nav", { className: "notion-table-of-contents" }, toc.map((tocItem) => {
165
164
  const id = uuidToId(tocItem.id);
166
165
  return /* @__PURE__ */ React5.createElement(
167
166
  "a",
168
167
  {
169
168
  key: id,
170
169
  href: `#${id}`,
171
- className: cs(
172
- "notion-table-of-contents-item",
173
- `notion-table-of-contents-item-indent-level-${tocItem.indentLevel}`,
174
- activeSection === id && "notion-table-of-contents-active-item"
175
- )
170
+ className: `notion-table-of-contents-item
171
+ notion-table-of-contents-item-indent-level-${tocItem.indentLevel}
172
+ ${activeSection === id && "notion-table-of-contents-active-item"}`
176
173
  },
177
174
  /* @__PURE__ */ React5.createElement(
178
175
  "span",
@@ -257,8 +254,8 @@ var Block = (props) => {
257
254
  if (!block)
258
255
  return null;
259
256
  if (level === 0 && block.type === "collection_view") {
260
- ;
261
- block.type = "collection_view_page";
257
+ const view_block = block;
258
+ view_block.type = "collection_view_page";
262
259
  }
263
260
  const blockId = hideBlockId ? "notion-block" : `notion-block-${uuidToId2(block.id)}`;
264
261
  switch (block.type) {
@@ -289,7 +286,7 @@ var Block = (props) => {
289
286
  const hasToc = showTableOfContents && toc.length >= minTableOfContentsItems;
290
287
  const hasAside = (hasToc || pageAside) && !page_full_width;
291
288
  const hasPageCover = pageCover || page_cover;
292
- return /* @__PURE__ */ React8.createElement("div", { className: cs("notion", "notion-app", darkMode ? "dark" : "light", blockId, className) }, /* @__PURE__ */ React8.createElement("div", { className: "notion-viewport" }), /* @__PURE__ */ React8.createElement("div", { className: "notion-frame" }, !disableHeader && /* @__PURE__ */ React8.createElement(components.Header, { block }), header, /* @__PURE__ */ React8.createElement("div", { className: "notion-page-scroller" }, hasPageCover && (pageCover ? pageCover : /* @__PURE__ */ React8.createElement("div", { className: "notion-page-cover-wrapper" }, /* @__PURE__ */ React8.createElement(
289
+ return /* @__PURE__ */ React8.createElement("div", { className: `notion notion-app ${darkMode ? "dark" : "light"} ${blockId} ${className || ""}` }, /* @__PURE__ */ React8.createElement("div", { className: "notion-viewport" }), /* @__PURE__ */ React8.createElement("div", { className: "notion-frame" }, !disableHeader && /* @__PURE__ */ React8.createElement(components.Header, { block }), header, /* @__PURE__ */ React8.createElement("div", { className: "notion-page-scroller" }, hasPageCover && (pageCover ? pageCover : /* @__PURE__ */ React8.createElement("div", { className: "notion-page-cover-wrapper" }, /* @__PURE__ */ React8.createElement(
293
290
  LazyImage,
294
291
  {
295
292
  src: mapImageUrl(page_cover, block),
@@ -301,16 +298,14 @@ var Block = (props) => {
301
298
  ))), /* @__PURE__ */ React8.createElement(
302
299
  "main",
303
300
  {
304
- className: cs(
305
- "notion-page",
306
- hasPageCover ? "notion-page-has-cover" : "notion-page-no-cover",
307
- page_icon ? "notion-page-has-icon" : "notion-page-no-icon",
308
- isPageIconUrl ? "notion-page-has-image-icon" : "notion-page-has-text-icon",
309
- "notion-full-page",
310
- page_full_width && "notion-full-width",
311
- page_small_text && "notion-small-text",
312
- bodyClassName
313
- )
301
+ className: `notion-page
302
+ ${hasPageCover ? "notion-page-has-cover" : "notion-page-no-cover"}
303
+ ${page_icon ? "notion-page-has-icon" : "notion-page-no-icon"}
304
+ ${isPageIconUrl ? "notion-page-has-image-icon" : "notion-page-has-text-icon"}
305
+ notion-full-page
306
+ ${page_full_width && "notion-full-width"}
307
+ ${page_small_text && "notion-small-text"}
308
+ ${bodyClassName}`
314
309
  },
315
310
  page_icon && /* @__PURE__ */ React8.createElement(PageIcon, { block, defaultIcon: defaultPageIcon, inline: false }),
316
311
  pageHeader,
@@ -319,11 +314,9 @@ var Block = (props) => {
319
314
  block.type !== "collection_view_page" && /* @__PURE__ */ React8.createElement(
320
315
  "div",
321
316
  {
322
- className: cs(
323
- "notion-page-content",
324
- hasAside && "notion-page-content-has-aside",
325
- hasToc && "notion-page-content-has-toc"
326
- )
317
+ className: `notion-page-content
318
+ ${hasAside && "notion-page-content-has-aside"}
319
+ ${hasToc && "notion-page-content-has-toc"}`
327
320
  },
328
321
  /* @__PURE__ */ React8.createElement("article", { className: "notion-page-content-inner" }, children),
329
322
  hasAside && /* @__PURE__ */ React8.createElement(
@@ -344,16 +337,14 @@ var Block = (props) => {
344
337
  return /* @__PURE__ */ React8.createElement(
345
338
  "main",
346
339
  {
347
- className: cs(
348
- "notion",
349
- darkMode ? "dark" : "light",
350
- "notion-page",
351
- page_full_width && "notion-full-width",
352
- page_small_text && "notion-small-text",
353
- blockId,
354
- className,
355
- bodyClassName
356
- )
340
+ className: `notion
341
+ ${darkMode ? "dark" : "light"},
342
+ notion-page
343
+ ${page_full_width && "notion-full-width"}
344
+ ${page_small_text && "notion-small-text"}
345
+ ${blockId}
346
+ ${className || ""}
347
+ ${bodyClassName}`
357
348
  },
358
349
  /* @__PURE__ */ React8.createElement("div", { className: "notion-viewport" }),
359
350
  pageHeader,
@@ -367,7 +358,7 @@ var Block = (props) => {
367
358
  return /* @__PURE__ */ React8.createElement(
368
359
  components.PageLink,
369
360
  {
370
- className: cs("notion-page-link", blockColor && `notion-${blockColor}`, blockId),
361
+ className: `notion-page-link ${blockColor && `notion-${blockColor}`} ${blockId}`,
371
362
  href: mapPageUrl(block.id)
372
363
  },
373
364
  /* @__PURE__ */ React8.createElement(PageTitle, { block })
@@ -399,14 +390,12 @@ var Block = (props) => {
399
390
  const isH1 = block.type === "header";
400
391
  const isH2 = block.type === "sub_header";
401
392
  const isH3 = block.type === "sub_sub_header";
402
- const classNameStr = cs(
403
- isH1 && "notion-h notion-h1",
404
- isH2 && "notion-h notion-h2",
405
- isH3 && "notion-h notion-h3",
406
- blockColor && `notion-${blockColor}`,
407
- indentLevelClass,
408
- blockId
409
- );
393
+ const classNameStr = `${isH1 && "notion-h notion-h1"}
394
+ ${isH2 && "notion-h notion-h2"}
395
+ ${isH3 && "notion-h notion-h3"}
396
+ ${blockColor && `notion-${blockColor}`}
397
+ ${indentLevelClass},
398
+ ${blockId}`;
410
399
  const innerHeader = /* @__PURE__ */ React8.createElement("span", null, /* @__PURE__ */ React8.createElement("div", { id, className: "notion-header-anchor" }), !((_f = block.format) == null ? void 0 : _f.toggleable) && /* @__PURE__ */ React8.createElement("a", { className: "notion-hash-link", href: `#${id}`, title }, /* @__PURE__ */ React8.createElement(LinkIcon, null)), /* @__PURE__ */ React8.createElement("span", { className: "notion-h-title" }, /* @__PURE__ */ React8.createElement(Text, { value: block.properties.title, block })));
411
400
  let headerBlock = null;
412
401
  if (isH1)
@@ -416,21 +405,21 @@ var Block = (props) => {
416
405
  else
417
406
  headerBlock = /* @__PURE__ */ React8.createElement("h4", { className: classNameStr, "data-id": id }, innerHeader);
418
407
  if ((_g = block.format) == null ? void 0 : _g.toggleable)
419
- return /* @__PURE__ */ React8.createElement("details", { className: cs("notion-toggle", blockId) }, /* @__PURE__ */ React8.createElement("summary", null, headerBlock), /* @__PURE__ */ React8.createElement("div", null, children));
408
+ return /* @__PURE__ */ React8.createElement("details", { className: `notion-toggle ${blockId}` }, /* @__PURE__ */ React8.createElement("summary", null, headerBlock), /* @__PURE__ */ React8.createElement("div", null, children));
420
409
  else
421
410
  return headerBlock;
422
411
  }
423
412
  case "divider":
424
- return /* @__PURE__ */ React8.createElement("hr", { className: cs("notion-hr", blockId) });
413
+ return /* @__PURE__ */ React8.createElement("hr", { className: `notion-hr ${blockId}` });
425
414
  case "text": {
426
415
  if (!block.properties && !((_h = block.content) == null ? void 0 : _h.length))
427
- return /* @__PURE__ */ React8.createElement("div", { className: cs("notion-blank", blockId) }, "\xA0");
416
+ return /* @__PURE__ */ React8.createElement("div", { className: `notion-blank ${blockId}` }, "\xA0");
428
417
  const blockColor = (_i = block.format) == null ? void 0 : _i.block_color;
429
- return /* @__PURE__ */ React8.createElement("div", { className: cs("notion-text", blockColor && `notion-${blockColor}`, blockId) }, ((_j = block.properties) == null ? void 0 : _j.title) && /* @__PURE__ */ React8.createElement(Text, { value: block.properties.title, block }), children && /* @__PURE__ */ React8.createElement("div", { className: "notion-text-children" }, children));
418
+ return /* @__PURE__ */ React8.createElement("div", { className: `notion-text ${blockColor && `notion-${blockColor}`} ${blockId}` }, ((_j = block.properties) == null ? void 0 : _j.title) && /* @__PURE__ */ React8.createElement(Text, { value: block.properties.title, block }), children && /* @__PURE__ */ React8.createElement("div", { className: "notion-text-children" }, children));
430
419
  }
431
420
  case "bulleted_list":
432
421
  case "numbered_list": {
433
- const wrapList = (content, start2) => block.type === "bulleted_list" ? /* @__PURE__ */ React8.createElement("ul", { className: cs("notion-list", "notion-list-disc", blockId) }, content) : /* @__PURE__ */ React8.createElement("ol", { start: start2, className: cs("notion-list", "notion-list-numbered", blockId) }, content);
422
+ const wrapList = (content, start2) => block.type === "bulleted_list" ? /* @__PURE__ */ React8.createElement("ul", { className: `notion-list notion-list-disc ${blockId}` }, content) : /* @__PURE__ */ React8.createElement("ol", { start: start2, className: `notion-list notion-list-numbered ${blockId}` }, content);
434
423
  let output = null;
435
424
  if (block.content)
436
425
  output = /* @__PURE__ */ React8.createElement(React8.Fragment, null, block.properties && /* @__PURE__ */ React8.createElement("li", null, /* @__PURE__ */ React8.createElement(Text, { value: block.properties.title, block })), wrapList(children));
@@ -470,7 +459,7 @@ var Block = (props) => {
470
459
  case "code":
471
460
  return /* @__PURE__ */ React8.createElement(components.Code, { block });
472
461
  case "column_list":
473
- return /* @__PURE__ */ React8.createElement("div", { className: cs("notion-row", blockId) }, children);
462
+ return /* @__PURE__ */ React8.createElement("div", { className: `notion-row ${blockId}` }, children);
474
463
  case "column": {
475
464
  const spacerWidth = `min(32px, 4vw)`;
476
465
  const ratio = ((_o = block.format) == null ? void 0 : _o.column_ratio) || 0.5;
@@ -478,13 +467,13 @@ var Block = (props) => {
478
467
  const columns = ((_q = parent == null ? void 0 : parent.content) == null ? void 0 : _q.length) || Math.max(2, Math.ceil(1 / ratio));
479
468
  const width = `calc((100% - (${columns - 1} * ${spacerWidth})) * ${ratio})`;
480
469
  const style = { width };
481
- return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("div", { className: cs("notion-column", blockId), style }, children), /* @__PURE__ */ React8.createElement("div", { className: "notion-spacer" }));
470
+ return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("div", { className: `notion-column ${blockId}`, style }, children), /* @__PURE__ */ React8.createElement("div", { className: "notion-spacer" }));
482
471
  }
483
472
  case "quote": {
484
473
  if (!block.properties)
485
474
  return null;
486
475
  const blockColor = (_r = block.format) == null ? void 0 : _r.block_color;
487
- return /* @__PURE__ */ React8.createElement("blockquote", { className: cs("notion-quote", blockColor && `notion-${blockColor}`, blockId) }, /* @__PURE__ */ React8.createElement("div", null, /* @__PURE__ */ React8.createElement(Text, { value: block.properties.title, block })), children);
476
+ return /* @__PURE__ */ React8.createElement("blockquote", { className: `notion-quote ${blockColor && `notion-${blockColor}`} ${blockId}` }, /* @__PURE__ */ React8.createElement("div", null, /* @__PURE__ */ React8.createElement(Text, { value: block.properties.title, block })), children);
488
477
  }
489
478
  case "collection_view":
490
479
  return /* @__PURE__ */ React8.createElement(components.Collection, { block, className: blockId, ctx });
@@ -495,7 +484,7 @@ var Block = (props) => {
495
484
  return /* @__PURE__ */ React8.createElement(
496
485
  "div",
497
486
  {
498
- className: cs("notion-callout", ((_s = block.format) == null ? void 0 : _s.block_color) && `notion-${(_t = block.format) == null ? void 0 : _t.block_color}_co`, blockId)
487
+ className: `notion-callout ${((_s = block.format) == null ? void 0 : _s.block_color) && `notion-${(_t = block.format) == null ? void 0 : _t.block_color}_co`} ${blockId}`
499
488
  },
500
489
  /* @__PURE__ */ React8.createElement(PageIcon, { block }),
501
490
  /* @__PURE__ */ React8.createElement("div", { className: "notion-callout-text" }, /* @__PURE__ */ React8.createElement(Text, { value: (_u = block.properties) == null ? void 0 : _u.title, block }), children)
@@ -522,7 +511,7 @@ var Block = (props) => {
522
511
  {
523
512
  target: "_blank",
524
513
  rel: "noopener noreferrer",
525
- className: cs("notion-bookmark", ((_w = block.format) == null ? void 0 : _w.block_color) && `notion-${block.format.block_color}`, blockId),
514
+ className: `notion-bookmark ${((_w = block.format) == null ? void 0 : _w.block_color) && `notion-${block.format.block_color}`} ${blockId}`,
526
515
  href: link[0][0]
527
516
  },
528
517
  /* @__PURE__ */ React8.createElement("div", null, title && /* @__PURE__ */ React8.createElement("div", { className: "notion-bookmark-title" }, /* @__PURE__ */ React8.createElement(Text, { value: [[title]], block })), ((_x = block.properties) == null ? void 0 : _x.description) && /* @__PURE__ */ React8.createElement("div", { className: "notion-bookmark-description" }, /* @__PURE__ */ React8.createElement(Text, { value: (_y = block.properties) == null ? void 0 : _y.description, block })), /* @__PURE__ */ React8.createElement("div", { className: "notion-bookmark-link" }, ((_z = block.format) == null ? void 0 : _z.bookmark_icon) && /* @__PURE__ */ React8.createElement("div", { className: "notion-bookmark-link-icon" }, /* @__PURE__ */ React8.createElement(LazyImage, { src: mapImageUrl((_A = block.format) == null ? void 0 : _A.bookmark_icon, block), alt: title })), /* @__PURE__ */ React8.createElement("div", { className: "notion-bookmark-link-text" }, /* @__PURE__ */ React8.createElement(Text, { value: link, block })))),
@@ -539,14 +528,14 @@ var Block = (props) => {
539
528
  ));
540
529
  }
541
530
  case "toggle":
542
- return /* @__PURE__ */ React8.createElement("details", { className: cs("notion-toggle", blockId) }, /* @__PURE__ */ React8.createElement("summary", null, /* @__PURE__ */ React8.createElement(Text, { value: (_E = block.properties) == null ? void 0 : _E.title, block })), /* @__PURE__ */ React8.createElement("div", null, children));
531
+ return /* @__PURE__ */ React8.createElement("details", { className: `notion-toggle ${blockId}` }, /* @__PURE__ */ React8.createElement("summary", null, /* @__PURE__ */ React8.createElement(Text, { value: (_E = block.properties) == null ? void 0 : _E.title, block })), /* @__PURE__ */ React8.createElement("div", null, children));
543
532
  case "table_of_contents": {
544
533
  const page = getBlockParentPage(block, recordMap);
545
534
  if (!page)
546
535
  return null;
547
536
  const toc = getPageTableOfContents(page, recordMap);
548
537
  const blockColor = (_F = block.format) == null ? void 0 : _F.block_color;
549
- return /* @__PURE__ */ React8.createElement("div", { className: cs("notion-table-of-contents", blockColor && `notion-${blockColor}`, blockId) }, toc.map((tocItem) => /* @__PURE__ */ React8.createElement("a", { key: tocItem.id, href: `#${uuidToId2(tocItem.id)}`, className: "notion-table-of-contents-item" }, /* @__PURE__ */ React8.createElement(
538
+ return /* @__PURE__ */ React8.createElement("div", { className: `notion-table-of-contents ${blockColor && `notion-${blockColor}`} ${blockId}` }, toc.map((tocItem) => /* @__PURE__ */ React8.createElement("a", { key: tocItem.id, href: `#${uuidToId2(tocItem.id)}`, className: "notion-table-of-contents-item" }, /* @__PURE__ */ React8.createElement(
550
539
  "span",
551
540
  {
552
541
  className: "notion-table-of-contents-item-body",
@@ -560,10 +549,10 @@ var Block = (props) => {
560
549
  }
561
550
  case "to_do": {
562
551
  const isChecked = ((_I = (_H = (_G = block.properties) == null ? void 0 : _G.checked) == null ? void 0 : _H[0]) == null ? void 0 : _I[0]) === "Yes";
563
- return /* @__PURE__ */ React8.createElement("div", { className: cs("notion-to-do", blockId) }, /* @__PURE__ */ React8.createElement("div", { className: "notion-to-do-item" }, /* @__PURE__ */ React8.createElement(components.Checkbox, { blockId, isChecked }), /* @__PURE__ */ React8.createElement("div", { className: cs("notion-to-do-body", isChecked && `notion-to-do-checked`) }, /* @__PURE__ */ React8.createElement(Text, { value: (_J = block.properties) == null ? void 0 : _J.title, block }))), /* @__PURE__ */ React8.createElement("div", { className: "notion-to-do-children" }, children));
552
+ return /* @__PURE__ */ React8.createElement("div", { className: `notion-to-do ${blockId}` }, /* @__PURE__ */ React8.createElement("div", { className: "notion-to-do-item" }, /* @__PURE__ */ React8.createElement(components.Checkbox, { blockId, isChecked }), /* @__PURE__ */ React8.createElement("div", { className: `notion-to-do-body ${isChecked && `notion-to-do-checked`}` }, /* @__PURE__ */ React8.createElement(Text, { value: (_J = block.properties) == null ? void 0 : _J.title, block }))), /* @__PURE__ */ React8.createElement("div", { className: "notion-to-do-children" }, children));
564
553
  }
565
554
  case "transclusion_container":
566
- return /* @__PURE__ */ React8.createElement("div", { className: cs("notion-sync-block", blockId) }, children);
555
+ return /* @__PURE__ */ React8.createElement("div", { className: `notion-sync-block ${blockId}` }, children);
567
556
  case "transclusion_reference":
568
557
  return /* @__PURE__ */ React8.createElement(SyncPointerBlock, __spreadValues({ block, level: level + 1 }, props));
569
558
  case "alias": {
@@ -573,10 +562,10 @@ var Block = (props) => {
573
562
  console.debug('"alias" missing block', blockPointerId);
574
563
  return null;
575
564
  }
576
- return /* @__PURE__ */ React8.createElement(components.PageLink, { className: cs("notion-page-link", blockPointerId), href: mapPageUrl(blockPointerId) }, /* @__PURE__ */ React8.createElement(PageTitle, { block: linkedBlock }));
565
+ return /* @__PURE__ */ React8.createElement(components.PageLink, { className: `notion-page-link ${blockPointerId}}`, href: mapPageUrl(blockPointerId) }, /* @__PURE__ */ React8.createElement(PageTitle, { block: linkedBlock }));
577
566
  }
578
567
  case "table":
579
- return /* @__PURE__ */ React8.createElement("table", { className: cs("notion-simple-table", blockId) }, /* @__PURE__ */ React8.createElement("tbody", null, children));
568
+ return /* @__PURE__ */ React8.createElement("table", { className: `notion-simple-table ${blockId}` }, /* @__PURE__ */ React8.createElement("tbody", null, children));
580
569
  case "table_row": {
581
570
  const tableBlock = (_N = recordMap.block[block.parent_id]) == null ? void 0 : _N.value;
582
571
  const order = (_O = tableBlock.format) == null ? void 0 : _O.table_block_column_order;
@@ -584,7 +573,7 @@ var Block = (props) => {
584
573
  const backgroundColor = (_Q = block.format) == null ? void 0 : _Q.block_color;
585
574
  if (!tableBlock || !order)
586
575
  return null;
587
- return /* @__PURE__ */ React8.createElement("tr", { className: cs("notion-simple-table-row", backgroundColor && `notion-${backgroundColor}`, blockId) }, order.map((column) => {
576
+ return /* @__PURE__ */ React8.createElement("tr", { className: `notion-simple-table-row ${backgroundColor && `notion-${backgroundColor}`} ${blockId}` }, order.map((column) => {
588
577
  var _a2, _b2, _c2;
589
578
  const color = (_a2 = formatMap == null ? void 0 : formatMap[column]) == null ? void 0 : _a2.color;
590
579
  return /* @__PURE__ */ React8.createElement(
@@ -607,7 +596,6 @@ var Block = (props) => {
607
596
  console.debug("Unsupported type " + block.type, JSON.stringify(block, null, 2));
608
597
  return /* @__PURE__ */ React8.createElement("div", null);
609
598
  }
610
- return null;
611
599
  };
612
600
 
613
601
  // src/renderer.tsx
@@ -752,7 +740,6 @@ export {
752
740
  SearchDialog,
753
741
  SyncPointerBlock,
754
742
  Text,
755
- cs,
756
743
  dummyLink,
757
744
  formatDate,
758
745
  formatNotionDateTime,