@texonom/nreact 1.6.2 → 1.6.4
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/asset-wrapper-BjCXzGmC.js +1056 -0
- package/build/asset-wrapper-BjCXzGmC.js.map +1 -0
- package/build/block.d.ts.map +1 -1
- package/build/collection-column-title-Bw3sXBSk.js +113 -0
- package/build/collection-column-title-Bw3sXBSk.js.map +1 -0
- package/build/components/editable-text.d.ts +18 -0
- package/build/components/editable-text.d.ts.map +1 -0
- package/build/components/editable-text.test.d.ts +2 -0
- package/build/components/editable-text.test.d.ts.map +1 -0
- package/build/context.d.ts +4 -0
- package/build/context.d.ts.map +1 -1
- package/build/index.js +596 -689
- package/build/index.js.map +1 -1
- package/build/renderer.d.ts +2 -0
- package/build/renderer.d.ts.map +1 -1
- package/build/rolldown-runtime-CEFd7nDs.js +30 -0
- package/build/third-party/code.js +559 -196
- package/build/third-party/code.js.map +1 -1
- package/build/third-party/collection.js +2690 -3432
- package/build/third-party/collection.js.map +1 -1
- package/build/third-party/equation.js +27 -43
- package/build/third-party/equation.js.map +1 -1
- package/build/third-party/modal.js +1355 -1615
- package/build/third-party/modal.js.map +1 -1
- package/license +21 -0
- package/package.json +16 -13
- package/src/styles.css +16 -0
- package/build/_commonjsHelpers-ByYUsBRP.js +0 -34
- package/build/_commonjsHelpers-ByYUsBRP.js.map +0 -1
- package/build/asset-wrapper-CVJvW06J.js +0 -984
- package/build/asset-wrapper-CVJvW06J.js.map +0 -1
- package/build/collection-column-title-l4hmVo49.js +0 -99
- package/build/collection-column-title-l4hmVo49.js.map +0 -1
|
@@ -1,44 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { j as e, k as t, s as n } from "../asset-wrapper-BjCXzGmC.js";
|
|
2
|
+
import r from "react";
|
|
3
|
+
import { getBlockTitle as i } from "@texonom/nutils";
|
|
4
|
+
import a from "@matejmazur/react-katex";
|
|
5
|
+
//#region src/third-party/equation.tsx
|
|
6
|
+
var o = [
|
|
7
|
+
"block",
|
|
8
|
+
"math",
|
|
9
|
+
"inline",
|
|
10
|
+
"className"
|
|
11
|
+
], s = {
|
|
12
|
+
throwOnError: !1,
|
|
13
|
+
strict: !1
|
|
14
|
+
}, c = (c) => {
|
|
15
|
+
let { block: l, math: u, inline: d = !1, className: f } = c, p = t(c, o), { recordMap: m } = n();
|
|
16
|
+
return u = u || i(l, m), u ? /* @__PURE__ */ r.createElement("span", {
|
|
17
|
+
role: "button",
|
|
18
|
+
tabIndex: 0,
|
|
19
|
+
className: `notion-equation ${d ? "notion-equation-inline" : "notion-equation-block"} ${f || ""}`
|
|
20
|
+
}, /* @__PURE__ */ r.createElement(a, e({
|
|
21
|
+
math: u,
|
|
22
|
+
settings: s
|
|
23
|
+
}, p))) : null;
|
|
11
24
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if (o != null && r)
|
|
17
|
-
for (var n of r(o))
|
|
18
|
-
t.indexOf(n) < 0 && l.call(o, n) && (e[n] = o[n]);
|
|
19
|
-
return e;
|
|
20
|
-
};
|
|
21
|
-
import f from "react";
|
|
22
|
-
import q from "@matejmazur/react-katex";
|
|
23
|
-
import { getBlockTitle as E } from "@texonom/nutils";
|
|
24
|
-
import { u as b } from "../asset-wrapper-CVJvW06J.js";
|
|
25
|
-
const g = {
|
|
26
|
-
throwOnError: !1,
|
|
27
|
-
strict: !1
|
|
28
|
-
}, C = (k) => {
|
|
29
|
-
var i = k, { block: o, math: t, inline: e = !1, className: n } = i, m = u(i, ["block", "math", "inline", "className"]);
|
|
30
|
-
const { recordMap: p } = b();
|
|
31
|
-
return t = t || E(o, p), t ? /* @__PURE__ */ f.createElement(
|
|
32
|
-
"span",
|
|
33
|
-
{
|
|
34
|
-
role: "button",
|
|
35
|
-
tabIndex: 0,
|
|
36
|
-
className: `notion-equation ${e ? "notion-equation-inline" : "notion-equation-block"} ${n || ""}`
|
|
37
|
-
},
|
|
38
|
-
/* @__PURE__ */ f.createElement(q, c({ math: t, settings: g }, m))
|
|
39
|
-
) : null;
|
|
40
|
-
};
|
|
41
|
-
export {
|
|
42
|
-
C as Equation
|
|
43
|
-
};
|
|
44
|
-
//# sourceMappingURL=equation.js.map
|
|
25
|
+
//#endregion
|
|
26
|
+
export { c as Equation };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=equation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equation.js","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"],"
|
|
1
|
+
{"version":3,"file":"equation.js","names":["_objectSpread2","_objectWithoutProperties","useNotionContext","React","Katex","_excluded","katexSettings","Equation","_ref","rest","math","getBlockTitle","block","recordMap","inline","className"],"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":";;;;;;CAkBQ;CAAO;CAAM;CAAgB;GAV/BM,IAAgB;CACpB,cAAc;CACd,QAAQ;AACV,GAEaC,KAKP,MAAwD;CAAxD,IAAA,EAAE,UAAO,SAAM,YAAS,IAAO,iBAAAC,GAAcC,IAAAR,EAAAO,GAAAH,CAAA,GAC3C,EAAE,iBAAcH,EAAiB;CAIvC,OAHA,IAAOQ,KAAQC,EAAcC,GAAOC,CAAS,GACxCH,IAGH,kBAAA,cAAC,QAAD;EACE,MAAK;EACL,UAAU;EACV,WAAW,mBAAmBI,IAAS,2BAA2B,wBAAwB,GAAGC,KAAa;CAEtG,GADJ,kBAAA,cAACX,GAAAJ,EAAA;EAAY;EAAM,UAAUM;CAAmB,GAAAG,CAAO,CAAA,CACnD,IARU;AAUpB"}
|