@texonom/nreact 1.4.7 → 1.5.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.
- package/build/block.d.ts +20 -20
- package/build/components/asset-wrapper.d.ts +6 -6
- package/build/components/asset.d.ts +7 -7
- package/build/components/audio.d.ts +6 -6
- package/build/components/checkbox.d.ts +5 -5
- package/build/components/eoi.d.ts +7 -7
- package/build/components/file.d.ts +6 -6
- package/build/components/google-drive.d.ts +6 -6
- package/build/components/graceful-image.d.ts +3 -3
- package/build/components/header.d.ts +15 -15
- package/build/components/lazy-image.d.ts +13 -13
- package/build/components/lite-youtube-embed.d.ts +13 -13
- package/build/components/page-aside.d.ts +11 -11
- package/build/components/page-icon.d.ts +16 -16
- package/build/components/page-title.d.ts +12 -12
- package/build/components/search-dialog.d.ts +26 -26
- package/build/components/search-dialog.d.ts.map +1 -1
- package/build/components/sync-pointer-block.d.ts +6 -6
- package/build/components/text.d.ts +19 -19
- package/build/context.d.ts +64 -64
- package/build/context.d.ts.map +1 -1
- package/build/icons/check.d.ts +3 -3
- package/build/icons/chevron-down-icon.d.ts +2 -2
- package/build/icons/clear-icon.d.ts +2 -2
- package/build/icons/collection-view-board.d.ts +3 -3
- package/build/icons/collection-view-calendar.d.ts +3 -3
- package/build/icons/collection-view-gallery.d.ts +3 -3
- package/build/icons/collection-view-icon.d.ts +8 -8
- package/build/icons/collection-view-list.d.ts +3 -3
- package/build/icons/collection-view-table.d.ts +3 -3
- package/build/icons/copy.d.ts +3 -3
- package/build/icons/default-page-icon.d.ts +2 -2
- package/build/icons/empty-icon.d.ts +2 -2
- package/build/icons/file-icon.d.ts +2 -2
- package/build/icons/link-icon.d.ts +2 -2
- package/build/icons/loading-icon.d.ts +2 -2
- package/build/icons/property-icon.d.ts +44 -44
- package/build/icons/search-icon.d.ts +2 -2
- package/build/icons/type-checkbox.d.ts +3 -3
- package/build/icons/type-date.d.ts +3 -3
- package/build/icons/type-email.d.ts +3 -3
- package/build/icons/type-file.d.ts +3 -3
- package/build/icons/type-formula.d.ts +3 -3
- package/build/icons/type-github.d.ts +3 -3
- package/build/icons/type-multi-select.d.ts +3 -3
- package/build/icons/type-number.d.ts +3 -3
- package/build/icons/type-person-2.d.ts +3 -3
- package/build/icons/type-person.d.ts +3 -3
- package/build/icons/type-phone-number.d.ts +3 -3
- package/build/icons/type-relation.d.ts +3 -3
- package/build/icons/type-select.d.ts +3 -3
- package/build/icons/type-text.d.ts +3 -3
- package/build/icons/type-timestamp.d.ts +3 -3
- package/build/icons/type-title.d.ts +3 -3
- package/build/icons/type-url.d.ts +3 -3
- package/build/index.d.ts +24 -24
- package/build/index.js +1405 -675
- package/build/index.js.map +1 -0
- package/build/next.d.ts +1 -1
- package/build/renderer.d.ts +50 -50
- package/build/third-party/code.d.ts +7 -16
- package/build/third-party/collection-card.d.ts +3 -3
- package/build/third-party/collection-card.d.ts.map +1 -1
- package/build/third-party/collection-column-title.d.ts +5 -5
- package/build/third-party/collection-group.d.ts +3 -3
- package/build/third-party/collection-row.d.ts +7 -7
- package/build/third-party/collection-utils.d.ts +2 -2
- package/build/third-party/collection-view-board.d.ts +3 -3
- package/build/third-party/collection-view-gallery.d.ts +3 -3
- package/build/third-party/collection-view-list.d.ts +3 -3
- package/build/third-party/collection-view-table.d.ts +3 -3
- package/build/third-party/collection-view.d.ts +4 -4
- package/build/third-party/collection.d.ts +14 -14
- package/build/third-party/equation.d.ts +8 -8
- package/build/third-party/eval-formula.d.ts +20 -20
- package/build/third-party/modal.d.ts +2 -2
- package/build/third-party/pdf.d.ts +4 -4
- package/build/third-party/property.d.ts +21 -21
- package/build/types.d.ts +93 -93
- package/build/utils.d.ts +6 -6
- package/package.json +13 -13
- package/readme.md +59 -0
- package/LICENSE +0 -21
- package/README.md +0 -19
- package/build/.tsbuildinfo +0 -1
- package/build/chunk-2U7I3XVC.js +0 -157
- package/build/chunk-72RHNPWF.js +0 -1307
- package/build/chunk-C6BUIPAM.js +0 -83
- package/build/chunk-FCO7MUK6.js +0 -83
- package/build/chunk-H4QYS6CQ.js +0 -1185
- package/build/chunk-IMWLLIUB.js +0 -1182
- package/build/chunk-P7HX4BAT.js +0 -156
- package/build/chunk-VP33CFNB.js +0 -1358
- package/build/chunk-YMM43AZ3.js +0 -1207
- package/build/dev/chunk-64UJZ76E.js +0 -1308
- package/build/dev/chunk-64UJZ76E.js.map +0 -1
- package/build/dev/chunk-ABDRHJEI.js +0 -157
- package/build/dev/chunk-ABDRHJEI.js.map +0 -1
- package/build/dev/chunk-N6EDMIQD.js +0 -1359
- package/build/dev/chunk-N6EDMIQD.js.map +0 -1
- package/build/dev/chunk-OAIRL2FN.js +0 -84
- package/build/dev/chunk-OAIRL2FN.js.map +0 -1
- package/build/dev/chunk-P3V5A3W4.js +0 -1183
- package/build/dev/chunk-P3V5A3W4.js.map +0 -1
- package/build/dev/chunk-PM5CWL6O.js +0 -158
- package/build/dev/chunk-PM5CWL6O.js.map +0 -1
- package/build/dev/chunk-Q4G2SZRD.js +0 -84
- package/build/dev/chunk-Q4G2SZRD.js.map +0 -1
- package/build/dev/chunk-SEA7YL2O.js +0 -1308
- package/build/dev/chunk-SEA7YL2O.js.map +0 -1
- package/build/dev/chunk-SVHGWLRK.js +0 -1208
- package/build/dev/chunk-SVHGWLRK.js.map +0 -1
- package/build/dev/chunk-ZJAJPWJX.js +0 -1186
- package/build/dev/chunk-ZJAJPWJX.js.map +0 -1
- package/build/dev/index.js +0 -890
- package/build/dev/index.js.map +0 -1
- package/build/dev/third-party/code.js +0 -140
- package/build/dev/third-party/code.js.map +0 -1
- package/build/dev/third-party/collection.js +0 -4382
- package/build/dev/third-party/collection.js.map +0 -1
- package/build/dev/third-party/equation.js +0 -35
- package/build/dev/third-party/equation.js.map +0 -1
- package/build/dev/third-party/modal.js +0 -8
- package/build/dev/third-party/modal.js.map +0 -1
- package/build/dev/third-party/pdf.js +0 -21
- package/build/dev/third-party/pdf.js.map +0 -1
- package/build/third-party/code.js +0 -139
- package/build/third-party/collection.js +0 -4381
- package/build/third-party/equation.js +0 -34
- package/build/third-party/modal.js +0 -7
- package/build/third-party/pdf.js +0 -20
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useNotionContext
|
|
3
|
-
} from "../chunk-YMM43AZ3.js";
|
|
4
|
-
import {
|
|
5
|
-
__objRest,
|
|
6
|
-
__spreadValues
|
|
7
|
-
} from "../chunk-C6BUIPAM.js";
|
|
8
|
-
|
|
9
|
-
// src/third-party/equation.tsx
|
|
10
|
-
import React from "react";
|
|
11
|
-
import Katex from "@matejmazur/react-katex";
|
|
12
|
-
import { getBlockTitle } from "@texonom/nutils";
|
|
13
|
-
var katexSettings = {
|
|
14
|
-
throwOnError: false,
|
|
15
|
-
strict: false
|
|
16
|
-
};
|
|
17
|
-
var Equation = (_a) => {
|
|
18
|
-
var _b = _a, { block, math, inline = false, className } = _b, rest = __objRest(_b, ["block", "math", "inline", "className"]);
|
|
19
|
-
const { recordMap } = useNotionContext();
|
|
20
|
-
math = math || getBlockTitle(block, recordMap);
|
|
21
|
-
if (!math) return null;
|
|
22
|
-
return /* @__PURE__ */ React.createElement(
|
|
23
|
-
"span",
|
|
24
|
-
{
|
|
25
|
-
role: "button",
|
|
26
|
-
tabIndex: 0,
|
|
27
|
-
className: `notion-equation ${inline ? "notion-equation-inline" : "notion-equation-block"} ${className || ""}`
|
|
28
|
-
},
|
|
29
|
-
/* @__PURE__ */ React.createElement(Katex, __spreadValues({ math, settings: katexSettings }, rest))
|
|
30
|
-
);
|
|
31
|
-
};
|
|
32
|
-
export {
|
|
33
|
-
Equation
|
|
34
|
-
};
|
package/build/third-party/pdf.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__objRest,
|
|
3
|
-
__spreadValues
|
|
4
|
-
} from "../chunk-C6BUIPAM.js";
|
|
5
|
-
|
|
6
|
-
// src/third-party/pdf.tsx
|
|
7
|
-
import React from "react";
|
|
8
|
-
import { Document, Page, pdfjs } from "react-pdf";
|
|
9
|
-
pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/legacy/build/pdf.worker.min.js`;
|
|
10
|
-
var Pdf = (_a) => {
|
|
11
|
-
var _b = _a, { file } = _b, rest = __objRest(_b, ["file"]);
|
|
12
|
-
const [numPages, setNumPages] = React.useState(null);
|
|
13
|
-
function onDocumentLoadSuccess({ numPages: numPages2 }) {
|
|
14
|
-
setNumPages(numPages2);
|
|
15
|
-
}
|
|
16
|
-
return /* @__PURE__ */ React.createElement(Document, __spreadValues({ file, onLoadSuccess: onDocumentLoadSuccess }, rest), Array.from(new Array(numPages), (_, index) => /* @__PURE__ */ React.createElement(Page, { key: `page_${index + 1}`, pageNumber: index + 1 })));
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
Pdf
|
|
20
|
-
};
|