@texonom/nreact 1.2.11 → 1.3.0-beta.0

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 (64) 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 +55 -70
  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 +15 -18
  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 +55 -70
  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 +15 -18
  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/types.d.ts +34 -12
  61. package/build/types.d.ts.map +1 -1
  62. package/build/utils.d.ts +0 -1
  63. package/build/utils.d.ts.map +1 -1
  64. package/package.json +10 -10
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CollectionColumnTitle
3
- } from "../chunk-LB5ZQ7L5.js";
3
+ } from "../chunk-2U7I3XVC.js";
4
4
  import {
5
5
  Checkbox,
6
6
  GracefulImage,
@@ -9,18 +9,17 @@ 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-VP33CFNB.js";
17
16
  import {
18
17
  __commonJS,
19
18
  __objRest,
20
19
  __spreadProps,
21
20
  __spreadValues,
22
21
  __toESM
23
- } from "../chunk-723T62SD.js";
22
+ } from "../chunk-FCO7MUK6.js";
24
23
 
25
24
  // ../../node_modules/.pnpm/@babel+runtime@7.21.5/node_modules/@babel/runtime/helpers/interopRequireDefault.js
26
25
  var require_interopRequireDefault = __commonJS({
@@ -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,11 +1,10 @@
1
1
  import {
2
- cs,
3
2
  useNotionContext
4
- } from "../chunk-26XPY26R.js";
3
+ } from "../chunk-VP33CFNB.js";
5
4
  import {
6
5
  __objRest,
7
6
  __spreadValues
8
- } from "../chunk-723T62SD.js";
7
+ } from "../chunk-FCO7MUK6.js";
9
8
 
10
9
  // src/third-party/equation.tsx
11
10
  import React from "react";
@@ -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,4 +1,4 @@
1
- import "../chunk-723T62SD.js";
1
+ import "../chunk-FCO7MUK6.js";
2
2
 
3
3
  // src/third-party/modal.tsx
4
4
  import Modal from "react-modal";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __objRest,
3
3
  __spreadValues
4
- } from "../chunk-723T62SD.js";
4
+ } from "../chunk-FCO7MUK6.js";
5
5
 
6
6
  // src/third-party/pdf.tsx
7
7
  import React from "react";
package/build/types.d.ts CHANGED
@@ -1,22 +1,34 @@
1
1
  import React from 'react';
2
- import type { ExtendedRecordMap, Block, SearchParams, SearchResults, CollectionView, CollectionQueryResult, PageBlock, CollectionCardCover, CollectionCardCoverSize, CollectionCardCoverAspect, PropertyID, Collection } from '@texonom/ntypes';
2
+ import type { ExtendedRecordMap, Block, SearchParams, SearchResults, CollectionView, CollectionQueryResult, PageBlock, CollectionCardCover, CollectionCardCoverSize, CollectionCardCoverAspect, PropertyID, Collection, CodeBlock } from '@texonom/ntypes';
3
3
  export type MapPageUrlFn = (pageId: string, recordMap?: ExtendedRecordMap | undefined) => string;
4
4
  export type MapImageUrlFn = (url: string, block: Block) => string;
5
5
  export type SearchNotionFn = (params: SearchParams) => Promise<SearchResults>;
6
6
  export type ComponentOverrideFn = (props: any, defaultValueFn: () => React.ReactNode) => any;
7
7
  export interface NotionComponents {
8
- Image: any;
9
- Link: any;
10
- PageLink: any;
8
+ Image: React.ComponentType<{
9
+ [prop: string]: unknown;
10
+ }>;
11
+ Link: React.ComponentType<{
12
+ [prop: string]: unknown;
13
+ }>;
14
+ PageLink: React.ComponentType<{
15
+ [prop: string]: unknown;
16
+ }>;
11
17
  Checkbox: React.FC<{
12
18
  isChecked: boolean;
13
19
  blockId: string;
14
20
  }>;
15
- Code: any;
21
+ Code: React.ComponentType<{
22
+ block: CodeBlock;
23
+ }>;
16
24
  Equation: any;
17
- Callout?: any;
25
+ Callout?: React.ComponentType<{
26
+ [prop: string]: unknown;
27
+ }>;
18
28
  Collection: any;
19
- Property?: any;
29
+ Property?: React.ComponentType<{
30
+ [prop: string]: unknown;
31
+ }>;
20
32
  propertyTextValue: ComponentOverrideFn;
21
33
  propertySelectValue: ComponentOverrideFn;
22
34
  propertyRelationValue: ComponentOverrideFn;
@@ -32,11 +44,21 @@ export interface NotionComponents {
32
44
  propertyLastEditedTimeValue: ComponentOverrideFn;
33
45
  propertyCreatedTimeValue: ComponentOverrideFn;
34
46
  propertyDateValue: ComponentOverrideFn;
35
- Pdf: any;
36
- Tweet: any;
37
- Modal: any;
38
- Embed: any;
39
- Header: any;
47
+ Pdf: React.ComponentType<{
48
+ [prop: string]: unknown;
49
+ }>;
50
+ Tweet: React.ComponentType<{
51
+ [prop: string]: unknown;
52
+ }>;
53
+ Modal: React.ComponentType<{
54
+ [prop: string]: unknown;
55
+ }>;
56
+ Embed: React.ComponentType<{
57
+ [prop: string]: unknown;
58
+ }>;
59
+ Header: React.ComponentType<{
60
+ [prop: string]: unknown;
61
+ }>;
40
62
  nextImage?: any;
41
63
  nextLink?: any;
42
64
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,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A;CAClB"}
package/build/utils.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { BlockMap } from '@texonom/ntypes';
2
2
  export { isUrl, formatDate, formatNotionDateTime } from '@texonom/nutils';
3
- export declare const cs: (...classes: Array<string | undefined | false>) => string;
4
3
  export declare const getListNumber: (blockId: string, blockMap: BlockMap) => number;
5
4
  export declare const getHashFragmentValue: (url: string) => string;
6
5
  export declare const isBrowser: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE1C,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAEzE,eAAO,MAAM,EAAE,eAAgB,MAAM,MAAM,GAAG,SAAS,GAAG,KAAK,CAAC,WAAuC,CAAA;AA8BvG,eAAO,MAAM,aAAa,YAAa,MAAM,+BAO5C,CAAA;AAED,eAAO,MAAM,oBAAoB,QAAS,MAAM,WAE/C,CAAA;AAED,eAAO,MAAM,SAAS,SAAgC,CAAA;AAUtD,eAAO,MAAM,YAAY,QAAS,MAAM,KAAG,MAAM,GAAG,IAcnD,CAAA"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE1C,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AA8BzE,eAAO,MAAM,aAAa,YAAa,MAAM,+BAO5C,CAAA;AAED,eAAO,MAAM,oBAAoB,QAAS,MAAM,WAE/C,CAAA;AAED,eAAO,MAAM,SAAS,SAAgC,CAAA;AAUtD,eAAO,MAAM,YAAY,QAAS,MAAM,KAAG,MAAM,GAAG,IAcnD,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@texonom/nreact",
3
- "version": "1.2.11",
3
+ "version": "1.3.0-beta.0",
4
4
  "type": "module",
5
5
  "description": "Fast and accurate React renderer for Notion.",
6
6
  "repository": "texonom/notion-node",
@@ -15,7 +15,7 @@
15
15
  "src/styles.css"
16
16
  ],
17
17
  "engines": {
18
- "node": ">=v12.22.12"
18
+ "node": ">=20.11.0"
19
19
  },
20
20
  "dependencies": {
21
21
  "@fisch0920/medium-zoom": "^1.0.7",
@@ -23,18 +23,18 @@
23
23
  "katex": "^0.16.9",
24
24
  "prismjs": "^1.29.0",
25
25
  "react-fast-compare": "^3.2.2",
26
- "react-hotkeys-hook": "^4.4.1",
26
+ "react-hotkeys-hook": "^4.4.4",
27
27
  "react-image": "^4.1.0",
28
28
  "react-modal": "^3.16.1",
29
- "react-pdf": "^7.5.1",
30
- "react-use": "^17.4.0",
31
- "@texonom/ntypes": "^1.2.11",
32
- "@texonom/nutils": "^1.2.11"
29
+ "react-pdf": "^7.7.0",
30
+ "react-use": "^17.4.3",
31
+ "@texonom/ntypes": "^1.3.0-beta.0",
32
+ "@texonom/nutils": "^1.3.0-beta.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@types/lodash.throttle": "^4.1.8",
36
- "@types/node": "^16.18.59",
37
- "@types/react": "^18.2.31",
35
+ "@types/lodash.throttle": "^4.1.9",
36
+ "@types/node": "^20.11.5",
37
+ "@types/react": "^18.2.48",
38
38
  "clipboard-copy": "^4.0.1",
39
39
  "date-fns": "^2.30.0",
40
40
  "format-number": "^3.0.0",