@texonom/nreact 1.2.11 → 1.3.0-rc.1

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 (48) hide show
  1. package/build/.tsbuildinfo +1 -1
  2. package/build/block.d.ts.map +1 -1
  3. package/build/chunk-3R4ITV3N.js +1358 -0
  4. package/build/chunk-HJGIONX2.js +1358 -0
  5. package/build/components/asset-wrapper.d.ts.map +1 -1
  6. package/build/components/audio.d.ts.map +1 -1
  7. package/build/components/eoi.d.ts.map +1 -1
  8. package/build/components/file.d.ts.map +1 -1
  9. package/build/components/google-drive.d.ts.map +1 -1
  10. package/build/components/header.d.ts.map +1 -1
  11. package/build/components/lite-youtube-embed.d.ts.map +1 -1
  12. package/build/components/page-aside.d.ts.map +1 -1
  13. package/build/components/page-title.d.ts.map +1 -1
  14. package/build/components/search-dialog.d.ts.map +1 -1
  15. package/build/dev/chunk-4XJBBVRZ.js +1359 -0
  16. package/build/dev/chunk-4XJBBVRZ.js.map +1 -0
  17. package/build/dev/chunk-7R2ZX3WF.js +1359 -0
  18. package/build/dev/chunk-7R2ZX3WF.js.map +1 -0
  19. package/build/dev/chunk-NVAEYUJK.js +1359 -0
  20. package/build/dev/chunk-NVAEYUJK.js.map +1 -0
  21. package/build/dev/index.js +54 -67
  22. package/build/dev/index.js.map +1 -1
  23. package/build/dev/third-party/code.js +2 -3
  24. package/build/dev/third-party/code.js.map +1 -1
  25. package/build/dev/third-party/collection.js +13 -16
  26. package/build/dev/third-party/collection.js.map +1 -1
  27. package/build/dev/third-party/equation.js +2 -3
  28. package/build/dev/third-party/equation.js.map +1 -1
  29. package/build/icons/clear-icon.d.ts.map +1 -1
  30. package/build/icons/loading-icon.d.ts.map +1 -1
  31. package/build/icons/search-icon.d.ts.map +1 -1
  32. package/build/index.js +54 -67
  33. package/build/third-party/code.d.ts.map +1 -1
  34. package/build/third-party/code.js +2 -3
  35. package/build/third-party/collection-card.d.ts.map +1 -1
  36. package/build/third-party/collection-row.d.ts.map +1 -1
  37. package/build/third-party/collection-view-board.d.ts.map +1 -1
  38. package/build/third-party/collection-view-gallery.d.ts.map +1 -1
  39. package/build/third-party/collection-view-table.d.ts.map +1 -1
  40. package/build/third-party/collection.d.ts.map +1 -1
  41. package/build/third-party/collection.js +13 -16
  42. package/build/third-party/equation.d.ts.map +1 -1
  43. package/build/third-party/equation.js +2 -3
  44. package/build/types.d.ts +46 -16
  45. package/build/types.d.ts.map +1 -1
  46. package/build/utils.d.ts +0 -1
  47. package/build/utils.d.ts.map +1 -1
  48. package/package.json +5 -5
@@ -1,7 +1,6 @@
1
1
  import {
2
- cs,
3
2
  useNotionContext
4
- } from "../chunk-VHTSGS2P.js";
3
+ } from "../chunk-NVAEYUJK.js";
5
4
  import {
6
5
  __objRest,
7
6
  __spreadValues
@@ -26,7 +25,7 @@ var Equation = (_a) => {
26
25
  {
27
26
  role: "button",
28
27
  tabIndex: 0,
29
- className: cs("notion-equation", inline ? "notion-equation-inline" : "notion-equation-block", className)
28
+ className: `notion-equation ${inline ? "notion-equation-inline" : "notion-equation-block"} ${className || ""}`
30
29
  },
31
30
  /* @__PURE__ */ React.createElement(Katex, __spreadValues({ math, settings: katexSettings }, rest))
32
31
  );
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/third-party/equation.tsx"],"sourcesContent":["import React from 'react'\n\nimport Katex from '@matejmazur/react-katex'\nimport { EquationBlock } from '@texonom/ntypes'\nimport { getBlockTitle } from '@texonom/nutils'\n\nimport { useNotionContext } from '../context'\nimport { cs } from '../utils'\n\nconst katexSettings = {\n throwOnError: false,\n strict: false\n}\n\nexport const Equation: React.FC<{\n block: EquationBlock\n math?: string\n inline?: boolean\n className?: string\n}> = ({ block, math, inline = false, className, ...rest }) => {\n const { recordMap } = useNotionContext()\n math = math || getBlockTitle(block, recordMap)\n if (!math) return null\n\n return (\n <span\n role='button'\n tabIndex={0}\n className={cs('notion-equation', inline ? 'notion-equation-inline' : 'notion-equation-block', className)}>\n <Katex math={math} settings={katexSettings} {...rest} />\n </span>\n )\n}\n"],"mappings":";;;;;;;;;;AAAA,OAAO,WAAW;AAElB,OAAO,WAAW;AAElB,SAAS,qBAAqB;AAK9B,IAAM,gBAAgB;AAAA,EACpB,cAAc;AAAA,EACd,QAAQ;AACV;AAEO,IAAM,WAKR,CAAC,OAAwD;AAAxD,eAAE,SAAO,MAAM,SAAS,OAAO,UAnBrC,IAmBM,IAA6C,iBAA7C,IAA6C,CAA3C,SAAO,QAAM,UAAgB;AACnC,QAAM,EAAE,UAAU,IAAI,iBAAiB;AACvC,SAAO,QAAQ,cAAc,OAAO,SAAS;AAC7C,MAAI,CAAC;AAAM,WAAO;AAElB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,UAAU;AAAA,MACV,WAAW,GAAG,mBAAmB,SAAS,2BAA2B,yBAAyB,SAAS;AAAA;AAAA,IACvG,oCAAC,wBAAM,MAAY,UAAU,iBAAmB,KAAM;AAAA,EACxD;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../../src/third-party/equation.tsx"],"sourcesContent":["import React from 'react'\n\nimport Katex from '@matejmazur/react-katex'\nimport { EquationBlock } from '@texonom/ntypes'\nimport { getBlockTitle } from '@texonom/nutils'\n\nimport { useNotionContext } from '../context'\n\nconst katexSettings = {\n throwOnError: false,\n strict: false\n}\n\nexport const Equation: React.FC<{\n block: EquationBlock\n math?: string\n inline?: boolean\n className?: string\n}> = ({ block, math, inline = false, className, ...rest }) => {\n const { recordMap } = useNotionContext()\n math = math || getBlockTitle(block, recordMap)\n if (!math) return null\n\n return (\n <span\n role='button'\n tabIndex={0}\n className={`notion-equation ${inline ? 'notion-equation-inline' : 'notion-equation-block'} ${className || ''}`}>\n <Katex math={math} settings={katexSettings} {...rest} />\n </span>\n )\n}\n"],"mappings":";;;;;;;;;AAAA,OAAO,WAAW;AAElB,OAAO,WAAW;AAElB,SAAS,qBAAqB;AAI9B,IAAM,gBAAgB;AAAA,EACpB,cAAc;AAAA,EACd,QAAQ;AACV;AAEO,IAAM,WAKR,CAAC,OAAwD;AAAxD,eAAE,SAAO,MAAM,SAAS,OAAO,UAlBrC,IAkBM,IAA6C,iBAA7C,IAA6C,CAA3C,SAAO,QAAM,UAAgB;AACnC,QAAM,EAAE,UAAU,IAAI,iBAAiB;AACvC,SAAO,QAAQ,cAAc,OAAO,SAAS;AAC7C,MAAI,CAAC;AAAM,WAAO;AAElB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,UAAU;AAAA,MACV,WAAW,mBAAmB,SAAS,2BAA2B,2BAA2B,aAAa;AAAA;AAAA,IAC1G,oCAAC,wBAAM,MAAY,UAAU,iBAAmB,KAAM;AAAA,EACxD;AAEJ;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"clear-icon.d.ts","sourceRoot":"","sources":["../../src/icons/clear-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,eAAO,MAAM,SAAS,mCAOrB,CAAA"}
1
+ {"version":3,"file":"clear-icon.d.ts","sourceRoot":"","sources":["../../src/icons/clear-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,eAAO,MAAM,SAAS,mCAOrB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"loading-icon.d.ts","sourceRoot":"","sources":["../../src/icons/loading-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,eAAO,MAAM,WAAW,mCAsBvB,CAAA"}
1
+ {"version":3,"file":"loading-icon.d.ts","sourceRoot":"","sources":["../../src/icons/loading-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,eAAO,MAAM,WAAW,mCAsBvB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"search-icon.d.ts","sourceRoot":"","sources":["../../src/icons/search-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,eAAO,MAAM,UAAU,mCAOtB,CAAA"}
1
+ {"version":3,"file":"search-icon.d.ts","sourceRoot":"","sources":["../../src/icons/search-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,eAAO,MAAM,UAAU,mCAOtB,CAAA"}
package/build/index.js CHANGED
@@ -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,7 +32,7 @@ import {
33
32
  isUrl,
34
33
  require_lodash,
35
34
  useNotionContext
36
- } from "./chunk-26XPY26R.js";
35
+ } from "./chunk-HJGIONX2.js";
37
36
  import {
38
37
  __objRest,
39
38
  __spreadProps,
@@ -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,
@@ -1 +1 @@
1
- {"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../src/third-party/code.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAG3C,OAAO,uCAAuC,CAAA;AAC9C,OAAO,4CAA4C,CAAA;AACnD,OAAO,qCAAqC,CAAA;AAC5C,OAAO,4CAA4C,CAAA;AACnD,OAAO,2CAA2C,CAAA;AAClD,OAAO,sCAAsC,CAAA;AAC7C,OAAO,qCAAqC,CAAA;AAC5C,OAAO,qCAAqC,CAAA;AAC5C,OAAO,4CAA4C,CAAA;AAOnD,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;IAC1B,KAAK,EAAE,SAAS,CAAA;IAChB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CA+DA,CAAA"}
1
+ {"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../src/third-party/code.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAG3C,OAAO,uCAAuC,CAAA;AAC9C,OAAO,4CAA4C,CAAA;AACnD,OAAO,qCAAqC,CAAA;AAC5C,OAAO,4CAA4C,CAAA;AACnD,OAAO,2CAA2C,CAAA;AAClD,OAAO,sCAAsC,CAAA;AAC7C,OAAO,qCAAqC,CAAA;AAC5C,OAAO,qCAAqC,CAAA;AAC5C,OAAO,4CAA4C,CAAA;AAMnD,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;IAC1B,KAAK,EAAE,SAAS,CAAA;IAChB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CA+DA,CAAA"}
@@ -1,8 +1,7 @@
1
1
  import {
2
2
  Text,
3
- cs,
4
3
  useNotionContext
5
- } from "../chunk-26XPY26R.js";
4
+ } from "../chunk-HJGIONX2.js";
6
5
  import {
7
6
  __async,
8
7
  __commonJS,
@@ -129,7 +128,7 @@ var Code = ({ block, defaultLanguage = "typescript", className }) => {
129
128
  }, 1200);
130
129
  }, [content, copyTimeout]);
131
130
  const copyButton = /* @__PURE__ */ React2.createElement("div", { className: "notion-code-copy-button", onClick: onClickCopyToClipboard }, /* @__PURE__ */ React2.createElement(copy_default, null));
132
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("pre", { className: cs("notion-code", className) }, /* @__PURE__ */ React2.createElement("div", { className: "notion-code-copy" }, copyButton, isCopied && /* @__PURE__ */ React2.createElement("div", { className: "notion-code-copy-tooltip" }, /* @__PURE__ */ React2.createElement("div", null, isCopied ? "Copied" : "Copy"))), /* @__PURE__ */ React2.createElement("code", { className: `language-${language}`, ref: codeRef }, content)), caption && /* @__PURE__ */ React2.createElement("figcaption", { className: "notion-asset-caption" }, /* @__PURE__ */ React2.createElement(Text, { value: caption, block })));
131
+ return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("pre", { className: `notion-code ${className || ""}` }, /* @__PURE__ */ React2.createElement("div", { className: "notion-code-copy" }, copyButton, isCopied && /* @__PURE__ */ React2.createElement("div", { className: "notion-code-copy-tooltip" }, /* @__PURE__ */ React2.createElement("div", null, isCopied ? "Copied" : "Copy"))), /* @__PURE__ */ React2.createElement("code", { className: `language-${language}`, ref: codeRef }, content)), caption && /* @__PURE__ */ React2.createElement("figcaption", { className: "notion-asset-caption" }, /* @__PURE__ */ React2.createElement(Text, { value: caption, block })));
133
132
  };
134
133
  export {
135
134
  Code
@@ -1 +1 @@
1
- {"version":3,"file":"collection-card.d.ts","sourceRoot":"","sources":["../../src/third-party/collection-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAI9C,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkKxD,CAAA"}
1
+ {"version":3,"file":"collection-card.d.ts","sourceRoot":"","sources":["../../src/third-party/collection-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAG9C,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkKxD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"collection-row.d.ts","sourceRoot":"","sources":["../../src/third-party/collection-row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAO3C,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IACnC,KAAK,EAAE,SAAS,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CA2DA,CAAA"}
1
+ {"version":3,"file":"collection-row.d.ts","sourceRoot":"","sources":["../../src/third-party/collection-row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAM3C,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IACnC,KAAK,EAAE,SAAS,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CA2DA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"collection-view-board.d.ts","sourceRoot":"","sources":["../../src/third-party/collection-view-board.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAO9C,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA0B7D,CAAA"}
1
+ {"version":3,"file":"collection-view-board.d.ts","sourceRoot":"","sources":["../../src/third-party/collection-view-board.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAM9C,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA0B7D,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"collection-view-gallery.d.ts","sourceRoot":"","sources":["../../src/third-party/collection-view-gallery.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAQ9C,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkB/D,CAAA"}
1
+ {"version":3,"file":"collection-view-gallery.d.ts","sourceRoot":"","sources":["../../src/third-party/collection-view-gallery.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAO9C,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkB/D,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"collection-view-table.d.ts","sourceRoot":"","sources":["../../src/third-party/collection-view-table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAS9C,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAgC7D,CAAA"}
1
+ {"version":3,"file":"collection-view-table.d.ts","sourceRoot":"","sources":["../../src/third-party/collection-view-table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAQ9C,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAgC7D,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../src/third-party/collection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,EAAE,aAAa,EAA2C,MAAM,YAAY,CAAA;AAKnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAE7C,OAAO,KAAK,EACV,SAAS,EACT,mBAAmB,EACnB,uBAAuB,EAExB,MAAM,iBAAiB,CAAA;AAIxB,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC;IAChC,KAAK,EAAE,mBAAmB,GAAG,uBAAuB,GAAG,SAAS,CAAA;IAChE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,GAAG,EAAE,aAAa,CAAA;CACnB,CAwCA,CAAA;AAED,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC;IAClC,KAAK,EAAE,mBAAmB,GAAG,uBAAuB,CAAA;IACpD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAsHA,CAAA;AA6CD,OAAO,EAAE,gBAAgB,IAAI,QAAQ,EAAE,CAAA"}
1
+ {"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../src/third-party/collection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,EAAE,aAAa,EAA2C,MAAM,YAAY,CAAA;AAInF,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAE7C,OAAO,KAAK,EACV,SAAS,EACT,mBAAmB,EACnB,uBAAuB,EAExB,MAAM,iBAAiB,CAAA;AAIxB,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC;IAChC,KAAK,EAAE,mBAAmB,GAAG,uBAAuB,GAAG,SAAS,CAAA;IAChE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,GAAG,EAAE,aAAa,CAAA;CACnB,CAwCA,CAAA;AAED,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC;IAClC,KAAK,EAAE,mBAAmB,GAAG,uBAAuB,CAAA;IACpD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAsHA,CAAA;AA2CD,OAAO,EAAE,gBAAgB,IAAI,QAAQ,EAAE,CAAA"}
@@ -9,11 +9,10 @@ import {
9
9
  PageIcon,
10
10
  PageTitle,
11
11
  Text,
12
- cs,
13
12
  dummyLink,
14
13
  formatDate,
15
14
  useNotionContext
16
- } from "../chunk-26XPY26R.js";
15
+ } from "../chunk-HJGIONX2.js";
17
16
  import {
18
17
  __commonJS,
19
18
  __objRest,
@@ -3486,7 +3485,7 @@ var PropertyImpl = (props) => {
3486
3485
  const renderTitleValue = React6.useMemo(
3487
3486
  () => function FormulaTitle() {
3488
3487
  if (block && linkToTitlePage)
3489
- return /* @__PURE__ */ React6.createElement(components.PageLink, { className: cs("notion-page-link"), href: mapPageUrl(block.id) }, /* @__PURE__ */ React6.createElement(PageTitle, { block }));
3488
+ return /* @__PURE__ */ React6.createElement(components.PageLink, { className: "notion-page-link", href: mapPageUrl(block.id) }, /* @__PURE__ */ React6.createElement(PageTitle, { block }));
3490
3489
  else
3491
3490
  return /* @__PURE__ */ React6.createElement(Text, { value: data, block });
3492
3491
  },
@@ -3641,7 +3640,7 @@ var PropertyImpl = (props) => {
3641
3640
  option,
3642
3641
  color
3643
3642
  }),
3644
- () => /* @__PURE__ */ React6.createElement("div", { key: index, className: cs(`notion-property-${schema.type}-item`, color && `notion-item-${color}`) }, value)
3643
+ () => /* @__PURE__ */ React6.createElement("div", { key: index, className: `notion-property-${schema.type}-item ${color && `notion-item-${color}`}` }, value)
3645
3644
  );
3646
3645
  });
3647
3646
  break;
@@ -3722,7 +3721,7 @@ var CollectionRow = ({ block, pageHeader = false, className }) => {
3722
3721
  } else {
3723
3722
  propertyIds.sort((a, b) => schemas[a].name.localeCompare(schemas[b].name));
3724
3723
  }
3725
- return /* @__PURE__ */ React7.createElement("div", { className: cs("notion-collection-row", className) }, /* @__PURE__ */ React7.createElement("div", { className: "notion-collection-row-body" }, propertyIds.map((propertyId) => {
3724
+ return /* @__PURE__ */ React7.createElement("div", { className: `notion-collection-row ${className || ""}` }, /* @__PURE__ */ React7.createElement("div", { className: "notion-collection-row-body" }, propertyIds.map((propertyId) => {
3726
3725
  var _a2;
3727
3726
  const schema = schemas[propertyId];
3728
3727
  return /* @__PURE__ */ React7.createElement("div", { className: "notion-collection-row-property", key: propertyId }, /* @__PURE__ */ React7.createElement(CollectionColumnTitle, { schema }), /* @__PURE__ */ React7.createElement("div", { className: "notion-collection-row-value" }, /* @__PURE__ */ React7.createElement(
@@ -3878,14 +3877,14 @@ var CollectionCard = (_a) => {
3878
3877
  isLinkCollectionToUrlProperty && url ? /* @__PURE__ */ React9.createElement(
3879
3878
  components.Link,
3880
3879
  __spreadValues({
3881
- className: cs("notion-collection-card", `notion-collection-card-size-${coverSize}`, className),
3880
+ className: `notion-collection-card ${`notion-collection-card-size-${coverSize}`} ${className || ""}`,
3882
3881
  href: url
3883
3882
  }, rest),
3884
3883
  innerCard
3885
3884
  ) : /* @__PURE__ */ React9.createElement(
3886
3885
  components.PageLink,
3887
3886
  __spreadValues({
3888
- className: cs("notion-collection-card", `notion-collection-card-size-${coverSize}`, className),
3887
+ className: `notion-collection-card ${`notion-collection-card-size-${coverSize}`} ${className || ""}`,
3889
3888
  href: mapPageUrl(block.id)
3890
3889
  }, rest),
3891
3890
  innerCard
@@ -3997,7 +3996,7 @@ function Board({ collectionView, collectionData, collection, padding }) {
3997
3996
  }),
3998
3997
  [padding]
3999
3998
  );
4000
- return /* @__PURE__ */ React11.createElement("div", { className: "notion-board" }, /* @__PURE__ */ React11.createElement("div", { className: cs("notion-board-view", `notion-board-view-size-${board_cover_size}`), style: boardStyle }, /* @__PURE__ */ React11.createElement("div", { className: "notion-board-header" }, /* @__PURE__ */ React11.createElement("div", { className: "notion-board-header-inner" }, boardGroups.map((p, index) => {
3999
+ return /* @__PURE__ */ React11.createElement("div", { className: "notion-board" }, /* @__PURE__ */ React11.createElement("div", { className: `notion-board-view ${`notion-board-view-size-${board_cover_size}`}`, style: boardStyle }, /* @__PURE__ */ React11.createElement("div", { className: "notion-board-header" }, /* @__PURE__ */ React11.createElement("div", { className: "notion-board-header-inner" }, boardGroups.map((p, index) => {
4001
4000
  var _a2, _b2, _c;
4002
4001
  if (!((_a2 = collectionData.board_columns) == null ? void 0 : _a2.results))
4003
4002
  return null;
@@ -4059,7 +4058,7 @@ function Gallery({ blockIds, collectionView, collection }) {
4059
4058
  gallery_cover_size = "medium",
4060
4059
  gallery_cover_aspect = "cover"
4061
4060
  } = collectionView.format || {};
4062
- return /* @__PURE__ */ React12.createElement("div", { className: "notion-gallery" }, /* @__PURE__ */ React12.createElement("div", { className: "notion-gallery-view" }, /* @__PURE__ */ React12.createElement("div", { className: cs("notion-gallery-grid", `notion-gallery-grid-size-${gallery_cover_size}`) }, blockIds == null ? void 0 : blockIds.map((blockId) => {
4061
+ return /* @__PURE__ */ React12.createElement("div", { className: "notion-gallery" }, /* @__PURE__ */ React12.createElement("div", { className: "notion-gallery-view" }, /* @__PURE__ */ React12.createElement("div", { className: `notion-gallery-grid ${`notion-gallery-grid-size-${gallery_cover_size}`}` }, blockIds == null ? void 0 : blockIds.map((blockId) => {
4063
4062
  var _a, _b;
4064
4063
  const block = (_a = recordMap.block[blockId]) == null ? void 0 : _a.value;
4065
4064
  if (!block)
@@ -4197,7 +4196,7 @@ function Table({ blockIds = [], collection, collectionView, width, padding }) {
4197
4196
  "div",
4198
4197
  {
4199
4198
  key: p.property,
4200
- className: cs("notion-table-cell", `notion-table-cell-${schema.type}`),
4199
+ className: `notion-table-cell ${`notion-table-cell-${schema.type}`}`,
4201
4200
  style
4202
4201
  },
4203
4202
  /* @__PURE__ */ React14.createElement(
@@ -4319,7 +4318,7 @@ var CollectionViewBlock = ({ block, className }) => {
4319
4318
  block.format = __spreadProps(__spreadValues({}, block.format), {
4320
4319
  page_icon: collection.icon
4321
4320
  });
4322
- return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement("div", null, /* @__PURE__ */ React16.createElement("div", null, viewIds.length > 1 && showCollectionViewDropdown && /* @__PURE__ */ React16.createElement(CollectionViewTabs, { collectionViewId, viewIds, onChangeView })), showTitle && /* @__PURE__ */ React16.createElement("div", { className: "notion-collection-header" }, /* @__PURE__ */ React16.createElement("div", { className: "notion-collection-header-title" }, /* @__PURE__ */ React16.createElement(PageIcon, { block, className: "notion-page-title-icon", hideDefaultIcon: true }), title))), /* @__PURE__ */ React16.createElement("div", { className: cs("notion-collection", className) }, /* @__PURE__ */ React16.createElement(
4321
+ return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement("div", null, /* @__PURE__ */ React16.createElement("div", null, viewIds.length > 1 && showCollectionViewDropdown && /* @__PURE__ */ React16.createElement(CollectionViewTabs, { collectionViewId, viewIds, onChangeView })), showTitle && /* @__PURE__ */ React16.createElement("div", { className: "notion-collection-header" }, /* @__PURE__ */ React16.createElement("div", { className: "notion-collection-header-title" }, /* @__PURE__ */ React16.createElement(PageIcon, { block, className: "notion-page-title-icon", hideDefaultIcon: true }), title))), /* @__PURE__ */ React16.createElement("div", { className: `notion-collection ${className || ""}` }, /* @__PURE__ */ React16.createElement(
4323
4322
  CollectionView,
4324
4323
  {
4325
4324
  collection,
@@ -4339,10 +4338,8 @@ var CollectionViewTabs = ({ collectionViewId, viewIds, onChangeView }) => {
4339
4338
  {
4340
4339
  onClick: () => onChangeView(viewId),
4341
4340
  key: viewId,
4342
- className: cs(
4343
- "notion-collection-view-tabs-content-item",
4344
- collectionViewId === viewId && "notion-collection-view-tabs-content-item-active"
4345
- )
4341
+ className: `notion-collection-view-tabs-content-item
4342
+ ${collectionViewId === viewId && "notion-collection-view-tabs-content-item-active"}`
4346
4343
  },
4347
4344
  /* @__PURE__ */ React16.createElement(CollectionViewColumnDesc, { collectionView: (_a = recordMap.collection_view[viewId]) == null ? void 0 : _a.value })
4348
4345
  );
@@ -4352,7 +4349,7 @@ var CollectionViewColumnDesc = (_a) => {
4352
4349
  var _b = _a, { collectionView, className, children } = _b, rest = __objRest(_b, ["collectionView", "className", "children"]);
4353
4350
  const { type } = collectionView;
4354
4351
  const name = collectionView.name || `${type[0].toUpperCase()}${type.slice(1)} view`;
4355
- return /* @__PURE__ */ React16.createElement("div", __spreadValues({ className: cs("notion-collection-view-type", className) }, rest), /* @__PURE__ */ React16.createElement(CollectionViewIcon, { className: "notion-collection-view-type-icon", type }), /* @__PURE__ */ React16.createElement("span", { className: "notion-collection-view-type-title" }, name), children);
4352
+ return /* @__PURE__ */ React16.createElement("div", __spreadValues({ className: `notion-collection-view-type ${className || ""}` }, rest), /* @__PURE__ */ React16.createElement(CollectionViewIcon, { className: "notion-collection-view-type-icon", type }), /* @__PURE__ */ React16.createElement("span", { className: "notion-collection-view-type-title" }, name), children);
4356
4353
  };
4357
4354
  export {
4358
4355
  Collection,
@@ -1 +1 @@
1
- {"version":3,"file":"equation.d.ts","sourceRoot":"","sources":["../../src/third-party/equation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAW/C,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC;IAC9B,KAAK,EAAE,aAAa,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAaA,CAAA"}
1
+ {"version":3,"file":"equation.d.ts","sourceRoot":"","sources":["../../src/third-party/equation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAU/C,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC;IAC9B,KAAK,EAAE,aAAa,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAaA,CAAA"}
@@ -1,7 +1,6 @@
1
1
  import {
2
- cs,
3
2
  useNotionContext
4
- } from "../chunk-26XPY26R.js";
3
+ } from "../chunk-HJGIONX2.js";
5
4
  import {
6
5
  __objRest,
7
6
  __spreadValues
@@ -26,7 +25,7 @@ var Equation = (_a) => {
26
25
  {
27
26
  role: "button",
28
27
  tabIndex: 0,
29
- className: cs("notion-equation", inline ? "notion-equation-inline" : "notion-equation-block", className)
28
+ className: `notion-equation ${inline ? "notion-equation-inline" : "notion-equation-block"} ${className || ""}`
30
29
  },
31
30
  /* @__PURE__ */ React.createElement(Katex, __spreadValues({ math, settings: katexSettings }, rest))
32
31
  );