@texonom/nreact 1.6.5 → 1.6.7
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-saop46mm.js +1042 -0
- package/build/asset-wrapper-saop46mm.js.map +1 -0
- package/build/block.d.ts +0 -1
- package/build/block.d.ts.map +1 -1
- package/build/{collection-column-title-Bw3sXBSk.js → collection-column-title-B2x01rzc.js} +76 -59
- package/build/collection-column-title-B2x01rzc.js.map +1 -0
- package/build/components/editable-text.d.ts +34 -10
- package/build/components/editable-text.d.ts.map +1 -1
- package/build/context.d.ts +0 -2
- package/build/context.d.ts.map +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +409 -235
- package/build/index.js.map +1 -1
- package/build/objectSpread2-DfFXoz5f.js +101 -0
- package/build/renderer.d.ts +0 -2
- package/build/renderer.d.ts.map +1 -1
- package/build/third-party/code.js +41 -43
- package/build/third-party/code.js.map +1 -1
- package/build/third-party/collection.js +454 -421
- package/build/third-party/collection.js.map +1 -1
- package/build/third-party/equation.js +14 -12
- package/build/third-party/equation.js.map +1 -1
- package/build/third-party/modal.js +225 -219
- package/build/third-party/modal.js.map +1 -1
- package/package.json +3 -3
- package/src/styles.css +2 -12
- package/build/asset-wrapper-BjCXzGmC.js +0 -1056
- package/build/asset-wrapper-BjCXzGmC.js.map +0 -1
- package/build/collection-column-title-Bw3sXBSk.js.map +0 -1
- package/build/rolldown-runtime-CEFd7nDs.js +0 -30
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import r from "
|
|
3
|
-
import
|
|
4
|
-
import a from "@
|
|
1
|
+
import { n as e, t } from "../objectSpread2-DfFXoz5f.js";
|
|
2
|
+
import { k as n, s as r } from "../asset-wrapper-saop46mm.js";
|
|
3
|
+
import i from "react";
|
|
4
|
+
import { getBlockTitle as a } from "@texonom/nutils";
|
|
5
|
+
import o from "@matejmazur/react-katex";
|
|
5
6
|
//#region src/third-party/equation.tsx
|
|
6
|
-
|
|
7
|
+
e();
|
|
8
|
+
var s = [
|
|
7
9
|
"block",
|
|
8
10
|
"math",
|
|
9
11
|
"inline",
|
|
10
12
|
"className"
|
|
11
|
-
],
|
|
13
|
+
], c = {
|
|
12
14
|
throwOnError: !1,
|
|
13
15
|
strict: !1
|
|
14
|
-
},
|
|
15
|
-
let { block: l, math: u, inline: d = !1, className: f } =
|
|
16
|
-
return u = u ||
|
|
16
|
+
}, l = (e) => {
|
|
17
|
+
let { block: l, math: u, inline: d = !1, className: f } = e, p = n(e, s), { recordMap: m } = r();
|
|
18
|
+
return u = u || a(l, m), u ? /* @__PURE__ */ i.createElement("span", {
|
|
17
19
|
role: "button",
|
|
18
20
|
tabIndex: 0,
|
|
19
21
|
className: `notion-equation ${d ? "notion-equation-inline" : "notion-equation-block"} ${f || ""}`
|
|
20
|
-
}, /* @__PURE__ */
|
|
22
|
+
}, /* @__PURE__ */ i.createElement(o, t({
|
|
21
23
|
math: u,
|
|
22
|
-
settings:
|
|
24
|
+
settings: c
|
|
23
25
|
}, p))) : null;
|
|
24
26
|
};
|
|
25
27
|
//#endregion
|
|
26
|
-
export {
|
|
28
|
+
export { l as Equation };
|
|
27
29
|
|
|
28
30
|
//# sourceMappingURL=equation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equation.js","names":["
|
|
1
|
+
{"version":3,"file":"equation.js","names":["init_objectSpread2","_objectWithoutProperties","useNotionContext","React","Katex","_excluded","katexSettings","Equation","_ref","rest","math","getBlockTitle","block","recordMap","inline","className","_objectSpread2"],"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,GAAAY,EAAA;EAAY;EAAM,UAAUV;CAAmB,GAAAG,CAAO,CAAA,CACnD,IARU;AAUpB"}
|