mathbox-react 0.2.0-rc1 → 0.2.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.
|
@@ -9,7 +9,7 @@ var MathboxAPIContext = (0, react_1.createContext)(null);
|
|
|
9
9
|
var useMathbox = function () {
|
|
10
10
|
var selection = (0, react_1.useContext)(MathboxAPIContext);
|
|
11
11
|
if (!selection) {
|
|
12
|
-
throw new Error(
|
|
12
|
+
throw new Error("useMathbox must be used within Mathbox or ContainedMathbox");
|
|
13
13
|
}
|
|
14
14
|
return selection;
|
|
15
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MathboxAPIContext.js","sourceRoot":"","sources":["../../../src/components/MathboxAPIContext.ts"],"names":[],"mappings":";;;AAAA,+BAAiD;AAGjD,IAAM,iBAAiB,GAAG,IAAA,qBAAa,EAAoC,IAAI,CAAC,CAAA;AAEhF;;GAEG;AACH,IAAM,UAAU,GAAG;IACjB,IAAM,SAAS,GAAG,IAAA,kBAAU,EAAC,iBAAiB,CAAC,CAAA;IAC/C,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,IAAI,KAAK,
|
|
1
|
+
{"version":3,"file":"MathboxAPIContext.js","sourceRoot":"","sources":["../../../src/components/MathboxAPIContext.ts"],"names":[],"mappings":";;;AAAA,+BAAiD;AAGjD,IAAM,iBAAiB,GAAG,IAAA,qBAAa,EAAoC,IAAI,CAAC,CAAA;AAEhF;;GAEG;AACH,IAAM,UAAU,GAAG;IACjB,IAAM,SAAS,GAAG,IAAA,kBAAU,EAAC,iBAAiB,CAAC,CAAA;IAC/C,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,IAAI,KAAK,CACb,4DAA4D,CAC7D,CAAA;KACF;IACD,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA;AAIQ,gCAAU;AAFnB,qBAAe,iBAAiB,CAAA"}
|
|
@@ -6,7 +6,7 @@ var MathboxAPIContext = createContext(null);
|
|
|
6
6
|
var useMathbox = function () {
|
|
7
7
|
var selection = useContext(MathboxAPIContext);
|
|
8
8
|
if (!selection) {
|
|
9
|
-
throw new Error(
|
|
9
|
+
throw new Error("useMathbox must be used within Mathbox or ContainedMathbox");
|
|
10
10
|
}
|
|
11
11
|
return selection;
|
|
12
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MathboxAPIContext.js","sourceRoot":"","sources":["../../../src/components/MathboxAPIContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGjD,IAAM,iBAAiB,GAAG,aAAa,CAAoC,IAAI,CAAC,CAAA;AAEhF;;GAEG;AACH,IAAM,UAAU,GAAG;IACjB,IAAM,SAAS,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAC/C,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,IAAI,KAAK,
|
|
1
|
+
{"version":3,"file":"MathboxAPIContext.js","sourceRoot":"","sources":["../../../src/components/MathboxAPIContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGjD,IAAM,iBAAiB,GAAG,aAAa,CAAoC,IAAI,CAAC,CAAA;AAEhF;;GAEG;AACH,IAAM,UAAU,GAAG;IACjB,IAAM,SAAS,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAC/C,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,IAAI,KAAK,CACb,4DAA4D,CAC7D,CAAA;KACF;IACD,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA;AAED,eAAe,iBAAiB,CAAA;AAEhC,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mathbox-react",
|
|
3
|
-
"version": "0.2.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "React wrapper for Mathbox",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": {
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
"@testing-library/react": "13.4.0",
|
|
50
50
|
"@types/jest": "27.5.2",
|
|
51
51
|
"@types/lodash": "4.14.191",
|
|
52
|
-
"@types/react": "18.0.
|
|
53
|
-
"@types/three": "0.148.
|
|
52
|
+
"@types/react": "18.0.27",
|
|
53
|
+
"@types/three": "0.148.1",
|
|
54
54
|
"babel-jest": "27.5.1",
|
|
55
55
|
"babel-loader": "9.1.2",
|
|
56
56
|
"eslint": "^8.32.0",
|
|
57
57
|
"jest": "27.5.1",
|
|
58
|
-
"mathbox": "2.3.1
|
|
58
|
+
"mathbox": "2.3.1",
|
|
59
59
|
"react": "18.2.0",
|
|
60
60
|
"react-dom": "18.2.0",
|
|
61
61
|
"three": "0.148.0",
|
|
@@ -63,12 +63,11 @@
|
|
|
63
63
|
"typescript": "^4.9.4"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"mathbox": "^2.3.1
|
|
66
|
+
"mathbox": "^2.3.1",
|
|
67
67
|
"react": "^17.0.2 || ^18.0.0",
|
|
68
68
|
"three": ">=0.118.0"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"lodash": "^4.17.21"
|
|
72
|
-
"threestrap-react": "workspace:^"
|
|
71
|
+
"lodash": "^4.17.21"
|
|
73
72
|
}
|
|
74
73
|
}
|