@texonom/nreact 1.5.0 → 1.5.2

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.
@@ -0,0 +1,44 @@
1
+ var x = Object.defineProperty;
2
+ var r = Object.getOwnPropertySymbols;
3
+ var s = Object.prototype.hasOwnProperty, l = Object.prototype.propertyIsEnumerable;
4
+ var a = (o, t, e) => t in o ? x(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e, c = (o, t) => {
5
+ for (var e in t || (t = {}))
6
+ s.call(t, e) && a(o, e, t[e]);
7
+ if (r)
8
+ for (var e of r(t))
9
+ l.call(t, e) && a(o, e, t[e]);
10
+ return o;
11
+ };
12
+ var u = (o, t) => {
13
+ var e = {};
14
+ for (var n in o)
15
+ s.call(o, n) && t.indexOf(n) < 0 && (e[n] = o[n]);
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-CaHInqoM.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
@@ -0,0 +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"],"names":["katexSettings","Equation","_a","_b","block","math","inline","className","rest","__objRest","recordMap","useNotionContext","getBlockTitle","React","Katex","__spreadValues"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAMA,IAAgB;AAAA,EACpB,cAAc;AAAA,EACd,QAAQ;AACV,GAEaC,IAKR,CAACC,MAAwD;AAAxD,MAAAC,IAAAD,GAAE,SAAAE,GAAO,MAAAC,GAAM,QAAAC,IAAS,IAAO,WAAAC,MAA/BJ,GAA6CK,IAAAC,EAA7CN,GAA6C,CAA3C,SAAO,QAAM,UAAgB;AACnC,QAAM,EAAE,WAAAO,EAAA,IAAcC,EAAA;AAEtB,SADAN,IAAOA,KAAQO,EAAcR,GAAOM,CAAS,GACxCL,IAGH,gBAAAQ,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,UAAU;AAAA,MACV,WAAW,mBAAmBP,IAAS,2BAA2B,uBAAuB,IAAIC,KAAa,EAAE;AAAA,IAAA;AAAA,oCAC3GO,GAAAC,EAAA,EAAM,MAAAV,GAAY,UAAUL,KAAmBQ,EAAM;AAAA,EAAA,IAPxC;AAUpB;"}
@@ -0,0 +1,5 @@
1
+ import { default as d } from "react-modal";
2
+ export {
3
+ d as Modal
4
+ };
5
+ //# sourceMappingURL=modal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@texonom/nreact",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "type": "module",
5
5
  "description": "Fast and accurate React renderer for Notion.",
6
6
  "repository": "texonom/notion-node",
@@ -28,8 +28,8 @@
28
28
  "react-modal": "^3.16.3",
29
29
  "react-pdf": "^10.3.0",
30
30
  "react-use": "^17.6.0",
31
- "@texonom/nutils": "^1.5.0",
32
- "@texonom/ntypes": "^1.5.0"
31
+ "@texonom/nutils": "^1.5.2",
32
+ "@texonom/ntypes": "^1.5.1"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/lodash.throttle": "^4.1.9",