@zzish/math-rich-input 0.1.50 → 0.1.51
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/dist/index.js +171 -33
- package/dist/math-rich-input.css +1 -1
- package/dist/standalone.js +1 -1
- package/package.json +1 -1
- package/src/EquationEditor.css +168 -160
- package/src/EquationEditorModal.css +143 -105
- package/src/EquationEditorModal.jsx +165 -24
- package/src/MathRichInput.jsx +1 -0
- package/src/SymbolButton.css +1 -0
- package/src/standalone.js +6 -0
package/dist/index.js
CHANGED
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
+
var ReactDOM = require('react-dom');
|
|
6
7
|
|
|
7
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
9
|
|
|
9
10
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
11
|
+
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
10
12
|
|
|
11
13
|
function _callSuper(t, o, e) {
|
|
12
14
|
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
@@ -19311,31 +19313,50 @@ var EquationEditorModal = /*#__PURE__*/function (_React$Component) {
|
|
|
19311
19313
|
console.log("🔍 Focusing equation editor...");
|
|
19312
19314
|
if (_this.equationEditor) {
|
|
19313
19315
|
console.log("🔍 EquationEditor ref found");
|
|
19314
|
-
|
|
19315
|
-
|
|
19316
|
-
|
|
19317
|
-
|
|
19318
|
-
|
|
19319
|
-
|
|
19320
|
-
|
|
19321
|
-
|
|
19322
|
-
|
|
19323
|
-
|
|
19324
|
-
|
|
19325
|
-
|
|
19326
|
-
|
|
19327
|
-
|
|
19328
|
-
|
|
19316
|
+
|
|
19317
|
+
// Prevent scroll jumping during focus
|
|
19318
|
+
var currentScrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
|
19319
|
+
try {
|
|
19320
|
+
if (_this.state.useExpertMode) {
|
|
19321
|
+
// Focus textarea in expert mode
|
|
19322
|
+
console.log("🔍 Expert mode - focusing latexInput");
|
|
19323
|
+
if (_this.equationEditor.latexInput) {
|
|
19324
|
+
// Use preventScroll option if available
|
|
19325
|
+
_this.equationEditor.latexInput.focus({
|
|
19326
|
+
preventScroll: true
|
|
19327
|
+
});
|
|
19328
|
+
console.log("✅ LatexInput focused");
|
|
19329
|
+
} else {
|
|
19330
|
+
console.log("❌ LatexInput not found");
|
|
19331
|
+
}
|
|
19329
19332
|
} else {
|
|
19330
|
-
|
|
19333
|
+
// Focus MathQuill in normal mode
|
|
19334
|
+
console.log("🔍 Normal mode - focusing mathQuill");
|
|
19335
|
+
if (_this.equationEditor.mathQuill) {
|
|
19336
|
+
_this.equationEditor.mathQuill.focus();
|
|
19337
|
+
console.log("✅ MathQuill focused");
|
|
19338
|
+
} else {
|
|
19339
|
+
console.log("❌ MathQuill not found");
|
|
19340
|
+
}
|
|
19331
19341
|
}
|
|
19342
|
+
} catch (error) {
|
|
19343
|
+
console.warn("🔍 Focus failed:", error);
|
|
19332
19344
|
}
|
|
19345
|
+
|
|
19346
|
+
// Ensure scroll position hasn't changed
|
|
19347
|
+
setTimeout(function () {
|
|
19348
|
+
var newScrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
|
19349
|
+
if (newScrollTop !== currentScrollTop) {
|
|
19350
|
+
window.scrollTo(0, currentScrollTop);
|
|
19351
|
+
}
|
|
19352
|
+
}, 10);
|
|
19333
19353
|
} else {
|
|
19334
19354
|
console.log("❌ EquationEditor ref not found");
|
|
19335
19355
|
}
|
|
19336
19356
|
});
|
|
19337
19357
|
_this.state = {
|
|
19338
|
-
useExpertMode: GLOBAL_lastSelectedExpertMode
|
|
19358
|
+
useExpertMode: GLOBAL_lastSelectedExpertMode,
|
|
19359
|
+
animationReady: false
|
|
19339
19360
|
};
|
|
19340
19361
|
_this.handleCloseCallback = props.handleClose;
|
|
19341
19362
|
_this.handleInsertCallback = props.handleInsert;
|
|
@@ -19346,20 +19367,117 @@ var EquationEditorModal = /*#__PURE__*/function (_React$Component) {
|
|
|
19346
19367
|
key: "componentDidMount",
|
|
19347
19368
|
value: function componentDidMount() {
|
|
19348
19369
|
var _this2 = this;
|
|
19349
|
-
//
|
|
19350
|
-
|
|
19351
|
-
|
|
19352
|
-
|
|
19353
|
-
|
|
19370
|
+
// Store current scroll position to prevent jumping
|
|
19371
|
+
this.originalScrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
|
19372
|
+
|
|
19373
|
+
// Create portal container if it doesn't exist
|
|
19374
|
+
this.ensurePortalContainer();
|
|
19375
|
+
|
|
19376
|
+
// Lock body scroll to prevent jumping in transform containers
|
|
19377
|
+
this.lockBodyScroll();
|
|
19378
|
+
|
|
19379
|
+
// Enable animation after portal is ready (ensures smooth slide-in)
|
|
19380
|
+
// Need multiple RAF frames for proper CSS animation timing
|
|
19381
|
+
requestAnimationFrame(function () {
|
|
19382
|
+
requestAnimationFrame(function () {
|
|
19383
|
+
_this2.setState({
|
|
19384
|
+
animationReady: true
|
|
19385
|
+
}, function () {
|
|
19386
|
+
// Auto-focus after animation completes (0.3s CSS animation + buffer)
|
|
19387
|
+
setTimeout(function () {
|
|
19388
|
+
_this2.focusEquationEditor();
|
|
19389
|
+
}, 400); // Wait for animation to complete
|
|
19390
|
+
});
|
|
19391
|
+
});
|
|
19392
|
+
});
|
|
19393
|
+
}
|
|
19394
|
+
}, {
|
|
19395
|
+
key: "componentWillUnmount",
|
|
19396
|
+
value: function componentWillUnmount() {
|
|
19397
|
+
var _this3 = this;
|
|
19398
|
+
// Hide portal immediately to prevent flash
|
|
19399
|
+
if (this.portalContainer) {
|
|
19400
|
+
this.portalContainer.style.visibility = "hidden";
|
|
19401
|
+
}
|
|
19402
|
+
|
|
19403
|
+
// Unlock body scroll and restore original scroll position
|
|
19404
|
+
this.unlockBodyScroll();
|
|
19405
|
+
|
|
19406
|
+
// Clean up portal container after a small delay
|
|
19407
|
+
if (this.createdPortalContainer && this.portalContainer) {
|
|
19408
|
+
setTimeout(function () {
|
|
19409
|
+
if (_this3.portalContainer && _this3.portalContainer.parentNode) {
|
|
19410
|
+
document.body.removeChild(_this3.portalContainer);
|
|
19411
|
+
}
|
|
19412
|
+
}, 100);
|
|
19413
|
+
}
|
|
19414
|
+
}
|
|
19415
|
+
}, {
|
|
19416
|
+
key: "lockBodyScroll",
|
|
19417
|
+
value: function lockBodyScroll() {
|
|
19418
|
+
// Store original overflow styles and scroll position
|
|
19419
|
+
this.originalBodyOverflow = document.body.style.overflow;
|
|
19420
|
+
this.originalDocumentOverflow = document.documentElement.style.overflow;
|
|
19421
|
+
this.originalBodyPosition = document.body.style.position;
|
|
19422
|
+
this.originalBodyTop = document.body.style.top;
|
|
19423
|
+
this.originalBodyWidth = document.body.style.width;
|
|
19424
|
+
|
|
19425
|
+
// Get current scroll position
|
|
19426
|
+
var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
|
19427
|
+
|
|
19428
|
+
// Apply position: fixed to prevent scrolling while preserving position
|
|
19429
|
+
document.body.style.position = "fixed";
|
|
19430
|
+
document.body.style.top = "-".concat(scrollTop, "px");
|
|
19431
|
+
document.body.style.width = "100%";
|
|
19432
|
+
document.body.style.overflow = "hidden";
|
|
19433
|
+
}
|
|
19434
|
+
}, {
|
|
19435
|
+
key: "unlockBodyScroll",
|
|
19436
|
+
value: function unlockBodyScroll() {
|
|
19437
|
+
// Get the scroll position from the fixed top value
|
|
19438
|
+
var scrollTop = Math.abs(parseInt(document.body.style.top) || 0);
|
|
19439
|
+
|
|
19440
|
+
// Restore original styles
|
|
19441
|
+
document.body.style.position = this.originalBodyPosition || "";
|
|
19442
|
+
document.body.style.top = this.originalBodyTop || "";
|
|
19443
|
+
document.body.style.width = this.originalBodyWidth || "";
|
|
19444
|
+
document.body.style.overflow = this.originalBodyOverflow || "";
|
|
19445
|
+
document.documentElement.style.overflow = this.originalDocumentOverflow || "";
|
|
19446
|
+
|
|
19447
|
+
// Restore scroll position smoothly
|
|
19448
|
+
if (scrollTop > 0) {
|
|
19449
|
+
window.scrollTo(0, scrollTop);
|
|
19450
|
+
}
|
|
19451
|
+
}
|
|
19452
|
+
}, {
|
|
19453
|
+
key: "ensurePortalContainer",
|
|
19454
|
+
value: function ensurePortalContainer() {
|
|
19455
|
+
// Look for existing portal container
|
|
19456
|
+
this.portalContainer = document.getElementById("math-rich-input-modal-portal");
|
|
19457
|
+
if (!this.portalContainer) {
|
|
19458
|
+
// Create new portal container
|
|
19459
|
+
this.portalContainer = document.createElement("div");
|
|
19460
|
+
this.portalContainer.id = "math-rich-input-modal-portal";
|
|
19461
|
+
// Portal container should not interfere with content positioning
|
|
19462
|
+
// Start invisible until animation is ready
|
|
19463
|
+
this.portalContainer.style.cssText = "position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 999990; visibility: hidden;";
|
|
19464
|
+
document.body.appendChild(this.portalContainer);
|
|
19465
|
+
this.createdPortalContainer = true;
|
|
19466
|
+
}
|
|
19354
19467
|
}
|
|
19355
19468
|
}, {
|
|
19356
19469
|
key: "componentDidUpdate",
|
|
19357
19470
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
19358
|
-
var
|
|
19471
|
+
var _this4 = this;
|
|
19472
|
+
// Show portal container when animation is ready
|
|
19473
|
+
if (!prevState.animationReady && this.state.animationReady && this.portalContainer) {
|
|
19474
|
+
this.portalContainer.style.visibility = "visible";
|
|
19475
|
+
}
|
|
19476
|
+
|
|
19359
19477
|
// Re-focus when expert mode changes
|
|
19360
19478
|
if (prevState.useExpertMode !== this.state.useExpertMode) {
|
|
19361
19479
|
setTimeout(function () {
|
|
19362
|
-
|
|
19480
|
+
_this4.focusEquationEditor();
|
|
19363
19481
|
}, 100);
|
|
19364
19482
|
}
|
|
19365
19483
|
}
|
|
@@ -19379,16 +19497,27 @@ var EquationEditorModal = /*#__PURE__*/function (_React$Component) {
|
|
|
19379
19497
|
}, {
|
|
19380
19498
|
key: "render",
|
|
19381
19499
|
value: function render() {
|
|
19382
|
-
var
|
|
19500
|
+
var _this5 = this;
|
|
19383
19501
|
var useClass = "EquationEditorModal";
|
|
19384
19502
|
if (this.isMobile()) useClass = "EquationEditorModal-mobile";
|
|
19385
|
-
|
|
19386
|
-
|
|
19387
|
-
|
|
19503
|
+
|
|
19504
|
+
// Add support for disabling animations (useful for Svelte transitions)
|
|
19505
|
+
if (this.props.disableAnimation) {
|
|
19506
|
+
useClass += " no-animation";
|
|
19507
|
+
}
|
|
19508
|
+
var modalContent = /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
19509
|
+
className: "EquationEditorModal-background".concat(this.props.disableAnimation ? " no-animation" : ""),
|
|
19510
|
+
onClick: this.handleClose,
|
|
19511
|
+
style: {
|
|
19512
|
+
pointerEvents: "auto"
|
|
19513
|
+
}
|
|
19388
19514
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
19389
19515
|
className: useClass,
|
|
19390
19516
|
ref: function ref(r) {
|
|
19391
|
-
return
|
|
19517
|
+
return _this5.modalDiv = r;
|
|
19518
|
+
},
|
|
19519
|
+
style: {
|
|
19520
|
+
pointerEvents: "auto"
|
|
19392
19521
|
}
|
|
19393
19522
|
}, !this.isMobile() && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
19394
19523
|
className: "title"
|
|
@@ -19399,23 +19528,31 @@ var EquationEditorModal = /*#__PURE__*/function (_React$Component) {
|
|
|
19399
19528
|
}, /*#__PURE__*/React__default["default"].createElement("input", {
|
|
19400
19529
|
type: "checkbox",
|
|
19401
19530
|
ref: function ref(r) {
|
|
19402
|
-
return
|
|
19531
|
+
return _this5.expertModeSwitch = r;
|
|
19403
19532
|
},
|
|
19404
19533
|
onChange: function onChange(e) {
|
|
19405
|
-
return
|
|
19534
|
+
return _this5.handleExpertModeSwitchChange(e);
|
|
19406
19535
|
},
|
|
19407
19536
|
checked: this.state.useExpertMode
|
|
19408
19537
|
}), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
19409
19538
|
className: "slider round"
|
|
19410
19539
|
})))), /*#__PURE__*/React__default["default"].createElement(EquationEditor, {
|
|
19411
19540
|
ref: function ref(r) {
|
|
19412
|
-
return
|
|
19541
|
+
return _this5.equationEditor = r;
|
|
19413
19542
|
},
|
|
19414
19543
|
latex: this.props.latex,
|
|
19415
19544
|
useExpertMode: this.state.useExpertMode,
|
|
19416
19545
|
handleInsert: this.handleInsert,
|
|
19417
19546
|
handleCancel: this.handleClose
|
|
19418
19547
|
})));
|
|
19548
|
+
|
|
19549
|
+
// Use portal to render modal outside of parent container stacking context
|
|
19550
|
+
if (this.portalContainer && this.state.animationReady) {
|
|
19551
|
+
return /*#__PURE__*/ReactDOM__default["default"].createPortal(modalContent, this.portalContainer);
|
|
19552
|
+
}
|
|
19553
|
+
|
|
19554
|
+
// Show nothing until portal and animation are ready (prevents flash)
|
|
19555
|
+
return null;
|
|
19419
19556
|
}
|
|
19420
19557
|
}]);
|
|
19421
19558
|
}(React__default["default"].Component);
|
|
@@ -24173,7 +24310,8 @@ var MathRichInput = /*#__PURE__*/function (_React$Component) {
|
|
|
24173
24310
|
},
|
|
24174
24311
|
handleClose: this.handleEquationEditorClose,
|
|
24175
24312
|
handleInsert: this.handleEquationEditorInsert,
|
|
24176
|
-
latex: this.state.equationEditorLatex
|
|
24313
|
+
latex: this.state.equationEditorLatex,
|
|
24314
|
+
disableAnimation: this.props.disableAnimation
|
|
24177
24315
|
}));
|
|
24178
24316
|
}
|
|
24179
24317
|
}]);
|
package/dist/math-rich-input.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.SymbolButton{background:#e0e0e0;border:0;border-radius:5px;color:#202020;display:inline-block;font-size:14px;font-weight:700;height:36px;margin:3px 3px auto;overflow:hidden;padding:1px;text-align:center;width:36px}.SymbolButton:hover{animation:grow 2s;animation-fill-mode:forwards;box-shadow:1px 1px 3px grey;color:#000;cursor:pointer;filter:saturate(2)}.SymbolButton:active{background:grey;color:#fff;cursor:pointer;transform:scale(1.3)}.SymbolButton-fadeIn{height:100px;opacity:1;transition:width .5s,height .5s,opacity .5s .5s;width:100px}.highlight-0{background:#ebc9eb}.highlight-operators{background:#f8e8d8}.highlight-angles{background:#cceded}.highlight-greeklower{background:#f8e8d8}.highlight-greekupper{background:#cceded}.highlight-misc{background:#f8e8d8}.highlight-sets{background:#cceded}.highlight-chemistry{background:#f8e8d8}.highlight-elements{background:#cceded}.highlight-physics2{background:#f8e8d8}.highlight-physics3{background:#cceded}.highlight-expert,.highlight-matrices{background:#f4d6f5}.EquationEditor{height:auto;text-align:center}.EquationEditor .editableAndCursorButtonsWrapper{align-items:center;display:flex;justify-content:center}.EquationEditor .editableWrapper{overflow:auto;width:100%}.EquationEditor .cursorButton{background:#fff;border:1px solid #663676;border-radius:5px;color:#663676;font-size:14px;font-weight:700;height:40px;margin-left:15px;margin-right:15px;margin-top:10px;min-width:40px;padding:0;text-align:center;width:auto}.EquationEditor .centerBox{display:inline-block;text-align:center}.EquationEditor .editable{border:1px solid #b0b0b0;border-radius:5px;color:#404040;font-size:20px;margin-bottom:5px;margin-top:6px;min-height:26px;min-width:150px;padding:7px 10px;text-align:left}.EquationEditor .editable-placeholder{color:grey;font-size:15px;min-height:26px;min-width:150px;position:absolute;transform:translate(-12px,-36px);z-index:-1}.EquationEditor .editable:focus-within{border:1px solid #663676!important;border-radius:5px;box-shadow:0 0 0 #fff}.latexInputAreaWrapper{width:auto}.EquationEditor .katexRenderedInput{border:0 solid #b0b0b0;border-radius:5px;color:#404040;font-size:16px;margin:5px 15px;min-height:30px;padding:7px 10px 4px;text-align:left;width:90%}.EquationEditor .latexInput{background-color:#fff;border:1px solid #b0b0b0;border-radius:5px;box-shadow:0 0 0 #fff;color:#007000;font-size:16px;height:88px;margin-top:10px;padding:7px 10px 5px;text-align:left;width:90%}.EquationEditor .latexInput:focus{border:1px solid #663676!important;outline:0}.EquationEditor .insertButton{background:#663676;border:0;border-radius:5px;color:#fff;font-size:14px;height:36px;margin:5px;padding:0 30px;text-align:left}.EquationEditor .cancelButton{background:#fff;border:1px solid #663676;border-radius:5px;color:#663676;font-size:14px;height:36px;margin-bottom:10px;margin-left:5px;margin-right:5px;padding:0 30px;text-align:left}.EquationEditor .insertButton:hover{background:#461656;color:#fff;cursor:pointer}.EquationEditor .recentSymbols-recentText-active{color:#404040;font-size:14px;font-weight:700;margin-right:10px}.EquationEditor .recentSymbols-recentText-not-active{color:grey;font-size:14px;font-weight:700;margin-bottom:10px;margin-top:10px}.EquationEditor .tabBar{background:#fff;border:0;margin:5px;padding:10px 10px 5px 20px;text-align:left}@media (max-width:500px){.EquationEditor .tabBar{padding:5px 0}}.EquationEditor .tab{border:0;border-bottom:6px solid #d0d0d0;color:#404040;font-size:14px;font-weight:700;height:30px;margin:5px;padding:5px 10px;text-align:left}.EquationEditor .tab:hover{cursor:pointer}.EquationEditor .tab-selected{border:0;border-bottom:6px solid #663676;color:#404040;font-size:14px;font-weight:700;height:30px;margin:5px;padding:5px 10px;text-align:left}.EquationEditor .recentSymbolsButtonArea{display:flex;justify-content:flex-start;margin:5px 5px 5px 15px;padding:2px;width:486px}.EquationEditor .symbolButtonAreasOuterContainer{overflow-x:auto}.EquationEditor .symbolButtonAreasInnerContainer{display:flex;width:2330px}.EquationEditor .symbolButtonArea{grid-gap:1.5px;display:grid;grid-auto-rows:minmax(min-content,max-content);grid-template-columns:repeat(auto-fill,minmax(36px,1fr));margin:0;padding:12px}.EquationEditor .symbolButtonArea-1{width:66px}.EquationEditor .symbolButtonArea-2{width:108px}.EquationEditor .symbolButtonArea-3{width:150px}.EquationEditor .symbolButtonArea-4{width:192px}.EquationEditor .symbolButtonArea-5{width:234px}.EquationEditor .symbolButtonArea-6{width:276px}.EquationEditorModal-background{animation:shade .3s;animation-fill-mode:forwards;background:#000;height:100%;left:0;position:fixed;top:0;width:100%;z-index:99}@keyframes shade{00%{opacity:0}to{opacity:.6}}.EquationEditorModal{animation:rise .3s;animation-fill-mode:forwards;background:#fff;border:1px solid grey;border-radius:10px;box-shadow:0 2px 5px 1px #a0a0a0;left:50%;max-width:500px;position:fixed;top:50%;width:98%;z-index:100}@keyframes rise{00%{opacity:0;transform:translate(-50%,100%)}to{opacity:1;transform:translate(-50%,-50%)}}.EquationEditorModal-mobile{background:#fff;border:1px solid grey;border-radius:10px;box-shadow:0 2px 5px 1px #a0a0a0;left:50%;max-width:500px;position:fixed;top:0;transform:translate(-50%,1px);width:99%;z-index:100}.EquationEditorModal .title,.EquationEditorModal-mobile .title{background:#e0e0e0;border:0;border-radius:5px 5px 0 0;color:#404040;display:flex;font-size:14px;justify-content:space-between;margin:0;padding:15px;text-align:left}.EquationEditorModal-mobile .title{height:30px}.expertModeSwitch{align-items:center;display:flex;flex-direction:row}.EquationEditorModal .expertModeSwitch .switch{margin-left:10px}.EquationEditorModal .switch{display:inline-block;height:22px;margin-bottom:0;padding:0;position:relative;width:35px}.EquationEditorModal .switch input{height:0;opacity:0;width:0}.EquationEditorModal .slider{background-color:#ccc;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;-webkit-transition:.4s;transition:.4s}.EquationEditorModal .slider:before{background-color:#fff;bottom:4px;content:"";height:14px;left:4px;position:absolute;-webkit-transition:.4s;transition:.4s;width:14px}.EquationEditorModal input:checked+.slider{background-color:#663676}.EquationEditorModal input:focus+.slider{box-shadow:0 0 1px #2196f3}.EquationEditorModal input:checked+.slider:before{-webkit-transform:translateX(13px);-ms-transform:translateX(13px);transform:translateX(13px)}.EquationEditorModal .slider.round{border-radius:18px}.EquationEditorModal .slider.round:before{border-radius:50%}.AccentBar{padding:8px;width:360px}.AccentBar,.AccentBar-compact{animation:fadeIn1 .4s;animation-fill-mode:forwards;background-color:#fff;border:1px solid #d0d0d0;border-radius:5px;box-shadow:1px 1px 5px #a0a0a0;color:#000;position:absolute;z-index:1}.AccentBar-compact{display:flex;padding:5px}.AccentBar-outerContainer{border-radius:5px;overflow-y:scroll}.AccentBar-innerContainer{height:350px}.AccentBar .symbols-grid{grid-gap:3px;display:grid;grid-auto-rows:minmax(min-content,max-content);grid-template-columns:repeat(auto-fill,minmax(36px,1fr))}.AccentBar .insert-grid{padding:5px}.AccentBar .type-a-letter{color:#a0a0a0;font-family:sans-serif;font-size:14px;font-weight:700;grid-column:1/-1;height:36px;padding-left:20px;padding-top:12px}.AccentBar-button{background:#f4f4f4;border:0;border-radius:5px;font-family:sans-serif;font-size:17px;height:36px;padding:1px;width:40px}.AB-compact{background:#fff;margin:0}.AB-narrow{width:36px}.AccentBar-button:hover{animation:grow 2s;animation-fill-mode:forwards;background:#663676;box-shadow:1px 1px 3px grey;color:#fff;cursor:pointer}@keyframes grow{00%{box-shadow:0 0 0 grey;transform:scale(1)}10%{box-shadow:1px 1px 3px grey;transform:scale(1.3)}90%{box-shadow:1px 1px 3px grey;transform:scale(1.3)}to{box-shadow:1px 1px 3px grey;transform:scale(1.8)}}.AccentBar-button:active{background:grey;color:#fff;cursor:pointer}.AccentBar .tabBar{background:#fff;border:0;padding:10px 0;text-align:left}.AccentBar .tab{border:0;border-bottom:4px solid #d0d0d0;color:#404040;font-size:14px;font-weight:700;height:30px;margin:2px;padding:2px 5px;text-align:left}.AccentBar .tab:hover{cursor:pointer}.AccentBar .tab-selected{border:0;border-bottom:4px solid #663676;color:#404040;font-size:14px;font-weight:700;height:30px;margin:2px;padding:2px 5px;text-align:left}.AccentBar .section-label{color:#663676;font-size:13px;font-weight:700;grid-column:1/-1;margin-bottom:4px;margin-left:8px;margin-top:8px}.AccentBar .replace-section{min-height:70px}.AccentBar .tabArea{animation:fadeIn1 .4s;animation-fill-mode:forwards}.Toolbar{animation:fadeIn1 .5s;animation-fill-mode:forwards;background-color:#fff;border:1px solid #d0d0d0;border-radius:5px;box-shadow:1px 1px 5px #a0a0a0;color:#000;display:flex;height:42px;position:absolute;z-index:10}@keyframes fadeIn1{0%{opacity:0}to{opacity:1}}.Toolbar-button{background-color:#fff;border:0;border-radius:5px;font-family:sans-serif;font-size:16px;height:36px;margin:2px;padding:1px;width:40px}.Toolbar-button:hover{background:#663676;color:#fff;cursor:pointer}.Toolbar-button:active{background:grey;color:#fff;cursor:pointer}.TB-narrow{width:30px}.TB-wide{width:46px}.TB-selected{animation:TB-fadeIn .2s;animation-fill-mode:forwards;background:#d0d0d0;color:#000;cursor:pointer}.TB-selected:hover{background:#663676;color:#fff;cursor:pointer}@keyframes TB-fadeIn{00%{background:#fff}to{background:#d0d0d0}}.Toolbar-button .tooltiptext{background-color:#222;border-radius:6px;color:#fff;font-size:12px;font-weight:400;left:50px;padding:4px 10px;position:absolute;text-align:center;top:-90%;visibility:hidden;width:100px;z-index:11}.Toolbar-button:hover .tooltiptext{animation:fadeIn2 .8s;animation-fill-mode:forwards;visibility:visible}@keyframes fadeIn2{00%{opacity:0}70%{opacity:0}to{opacity:.9;visibility:visible}}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.MathRichInput-Container{border-radius:5px;width:100%}.MathRichInput-scrollview{border-radius:5px;display:flex;position:relative}.MathRichInput p{margin:0;padding:0}.MathRichInput{background-color:#fff;border-radius:5px;font-size:18px;overflow-x:scroll;overflow:overlay;padding:10px;width:100%}.MathRichInput:empty:before{color:#acb6c0;content:attr(data-placeholder);font-size:15px}.MathRichInput:empty:focus:before{content:""}.MathRichInput:focus{outline:0}.MathRichInput .katex{border:0}.MathRichInput .base{background-color:#f0f0f0;border:1px dotted #d0d0d0;border-radius:5px;margin:0 2px;padding:2px}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.MathRichInput .katex-error{background-color:#f0f0f0;border:1px dotted #ff8080;border-radius:5px;margin:0 2px;padding:2px}.MathRichInput-Container :focus-within{background-color:#fff;outline:0}.MathRichInput-Container.dark :focus-within{background:none;border:none;outline:0}.MathRichInput-Container.dark .MathRichInput{background:none;border:none;color:#fff}.MathRichInput-Container.dark .MathRichInput .base,.MathRichInput-Container.dark .MathRichInput .katex{background:none}.MathRichInput-Container.dark .MathRichInput:focus{background:none;border:none}.MathRichInput-Container.question-edit-input .MathRichInput{border-radius:12px;font-size:32px;font-weight:400}.MathRichInput-Container.question-edit-input .MathRichInput:focus{background:hsla(0,0%,100%,.1);border:none}.MathRichInput-Container.answer-edit-input .MathRichInput{font-size:16px;font-weight:400}.MathRichInput-Container.explanation-input .MathRichInput,.MathRichInput-Container.hint-input .MathRichInput{color:#322e33;font-size:16px;font-weight:400}.MathRichInput-Container.explanation-input .MathRichInput .base,.MathRichInput-Container.hint-input .MathRichInput .base{border:1px dotted #322e33}
|
|
1
|
+
.SymbolButton{background:#e0e0e0;border:0;border-radius:5px;color:#202020;cursor:pointer;display:inline-block;font-size:14px;font-weight:700;height:36px;margin:3px 3px auto;overflow:hidden;padding:1px;text-align:center;width:36px}.SymbolButton:hover{animation:grow 2s;animation-fill-mode:forwards;box-shadow:1px 1px 3px grey;color:#000;cursor:pointer;filter:saturate(2)}.SymbolButton:active{background:grey;color:#fff;cursor:pointer;transform:scale(1.3)}.SymbolButton-fadeIn{height:100px;opacity:1;transition:width .5s,height .5s,opacity .5s .5s;width:100px}.highlight-0{background:#ebc9eb}.highlight-operators{background:#f8e8d8}.highlight-angles{background:#cceded}.highlight-greeklower{background:#f8e8d8}.highlight-greekupper{background:#cceded}.highlight-misc{background:#f8e8d8}.highlight-sets{background:#cceded}.highlight-chemistry{background:#f8e8d8}.highlight-elements{background:#cceded}.highlight-physics2{background:#f8e8d8}.highlight-physics3{background:#cceded}.highlight-expert,.highlight-matrices{background:#f4d6f5}.EquationEditor{cursor:default;height:auto;text-align:center}.EquationEditor .editableAndCursorButtonsWrapper{align-items:center;display:flex;justify-content:center}.EquationEditor .editableWrapper{overflow:auto;width:100%}.EquationEditor .cursorButton{background:#fff;border:1px solid #663676;border-radius:5px;color:#663676;font-size:14px;font-weight:700;height:40px;margin-left:15px;margin-right:15px;margin-top:10px;min-width:40px;padding:0;text-align:center;width:auto}.EquationEditor .centerBox{display:inline-block;text-align:center}.EquationEditor .editable{border:1px solid #b0b0b0;border-radius:5px;color:#404040;cursor:text;font-size:20px;margin-bottom:5px;margin-top:6px;min-height:26px;min-width:150px;padding:7px 10px;text-align:left}.EquationEditor .editable-placeholder{color:grey;font-size:15px;min-height:26px;min-width:150px;position:absolute;transform:translate(-12px,-36px);z-index:-1}.EquationEditor .editable:focus-within{border:1px solid #663676!important;border-radius:5px;box-shadow:0 0 0 #fff}.latexInputAreaWrapper{width:auto}.EquationEditor .katexRenderedInput{border:0 solid #b0b0b0;border-radius:5px;color:#404040;font-size:16px;margin:5px 15px;min-height:30px;padding:7px 10px 4px;text-align:left;width:90%}.EquationEditor .latexInput{background-color:#fff;border:1px solid #b0b0b0;border-radius:5px;box-shadow:0 0 0 #fff;color:#007000;cursor:text;font-size:16px;height:88px;margin-top:10px;padding:7px 10px 5px;text-align:left;width:90%}.EquationEditor .latexInput:focus{border:1px solid #663676!important;outline:0}.EquationEditor .insertButton{background:#663676;border:0;border-radius:5px;color:#fff;margin:5px}.EquationEditor .cancelButton,.EquationEditor .insertButton{cursor:pointer;font-size:14px;height:36px;padding:0 30px;text-align:left}.EquationEditor .cancelButton{background:#fff;border:1px solid #663676;border-radius:5px;color:#663676;margin-bottom:10px;margin-left:5px;margin-right:5px}.EquationEditor .insertButton:hover{background:#461656;color:#fff;cursor:pointer}.EquationEditor .recentSymbols-recentText-active{color:#404040;font-size:14px;font-weight:700;margin-right:10px}.EquationEditor .recentSymbols-recentText-not-active{color:grey;font-size:14px;font-weight:700;margin-bottom:10px;margin-top:10px}.EquationEditor .tabBar{background:#fff;border:0;cursor:default;margin:5px;padding:10px 10px 5px 20px;text-align:left}@media (max-width:500px){.EquationEditor .tabBar{padding:5px 0}}.EquationEditor .tab{border:0;border-bottom:6px solid #d0d0d0;color:#404040;font-size:14px;font-weight:700;height:30px;margin:5px;padding:5px 10px;text-align:left}.EquationEditor .tab:hover{cursor:pointer}.EquationEditor .tab-selected{border:0;border-bottom:6px solid #663676;color:#404040;font-size:14px;font-weight:700;height:30px;margin:5px;padding:5px 10px;text-align:left}.EquationEditor .recentSymbolsButtonArea{cursor:default;display:flex;justify-content:flex-start;margin:5px 5px 5px 15px;padding:2px;width:486px}.EquationEditor .symbolButtonAreasOuterContainer{overflow-x:auto}.EquationEditor .symbolButtonAreasInnerContainer{display:flex;width:2330px}.EquationEditor .symbolButtonArea{grid-gap:1.5px;cursor:default;display:grid;grid-auto-rows:minmax(min-content,max-content);grid-template-columns:repeat(auto-fill,minmax(36px,1fr));margin:0;padding:12px}.EquationEditor .symbolButtonArea-1{width:66px}.EquationEditor .symbolButtonArea-2{width:108px}.EquationEditor .symbolButtonArea-3{width:150px}.EquationEditor .symbolButtonArea-4{width:192px}.EquationEditor .symbolButtonArea-5{width:234px}.EquationEditor .symbolButtonArea-6{width:276px}.EquationEditorModal-background{animation:shade .3s cubic-bezier(.2,0,.38,.9);animation-fill-mode:forwards;background:#000;height:100%;left:0;opacity:0;position:fixed;top:0;width:100%;z-index:999998}@keyframes shade{00%{opacity:0}to{opacity:.6}}.EquationEditorModal{animation:rise .3s cubic-bezier(.2,0,.38,.9);animation-fill-mode:forwards;background:#fff;border:1px solid grey;border-radius:10px;box-shadow:0 2px 5px 1px #a0a0a0;left:50%;max-width:500px;opacity:0;position:fixed;top:50%;transform:translate(-50%,100%);width:98%;z-index:999999}@keyframes rise{00%{opacity:0;transform:translate(-50%,100%)}to{opacity:1;transform:translate(-50%,-50%)}}.EquationEditorModal.no-animation{animation:none!important;opacity:1!important;transform:translate(-50%,-50%)!important}.EquationEditorModal-mobile.no-animation{animation:none!important;opacity:1!important;transform:translate(-50%,1px)!important}.EquationEditorModal-background.no-animation{animation:none!important;opacity:.6!important}.EquationEditorModal-mobile{animation:riseFromTop .3s cubic-bezier(.2,0,.38,.9);animation-fill-mode:forwards;background:#fff;border:1px solid grey;border-radius:10px;box-shadow:0 2px 5px 1px #a0a0a0;left:50%;max-width:500px;opacity:0;position:fixed;top:0;transform:translate(-50%,-100%);width:99%;z-index:999999}@keyframes riseFromTop{00%{opacity:0;transform:translate(-50%,-100%)}to{opacity:1;transform:translate(-50%,1px)}}.EquationEditorModal .title,.EquationEditorModal-mobile .title{background:#e0e0e0;border:0;border-radius:5px 5px 0 0;color:#404040;display:flex;font-size:14px;justify-content:space-between;margin:0;padding:15px;text-align:left}.EquationEditorModal-mobile .title{height:30px}.expertModeSwitch{align-items:center;display:flex;flex-direction:row}.EquationEditorModal .expertModeSwitch .switch{margin-left:10px}.EquationEditorModal .switch{display:inline-block;height:22px;margin-bottom:0;padding:0;position:relative;width:35px}.EquationEditorModal .switch input{height:0;opacity:0;width:0}.EquationEditorModal .slider{background-color:#ccc;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;-webkit-transition:.4s;transition:.4s}.EquationEditorModal .slider:before{background-color:#fff;bottom:4px;content:"";height:14px;left:4px;position:absolute;-webkit-transition:.4s;transition:.4s;width:14px}.EquationEditorModal input:checked+.slider{background-color:#663676}.EquationEditorModal input:focus+.slider{box-shadow:0 0 1px #2196f3}.EquationEditorModal input:checked+.slider:before{-webkit-transform:translateX(13px);-ms-transform:translateX(13px);transform:translateX(13px)}.EquationEditorModal .slider.round{border-radius:18px}.EquationEditorModal .slider.round:before{border-radius:50%}.AccentBar{padding:8px;width:360px}.AccentBar,.AccentBar-compact{animation:fadeIn1 .4s;animation-fill-mode:forwards;background-color:#fff;border:1px solid #d0d0d0;border-radius:5px;box-shadow:1px 1px 5px #a0a0a0;color:#000;position:absolute;z-index:1}.AccentBar-compact{display:flex;padding:5px}.AccentBar-outerContainer{border-radius:5px;overflow-y:scroll}.AccentBar-innerContainer{height:350px}.AccentBar .symbols-grid{grid-gap:3px;display:grid;grid-auto-rows:minmax(min-content,max-content);grid-template-columns:repeat(auto-fill,minmax(36px,1fr))}.AccentBar .insert-grid{padding:5px}.AccentBar .type-a-letter{color:#a0a0a0;font-family:sans-serif;font-size:14px;font-weight:700;grid-column:1/-1;height:36px;padding-left:20px;padding-top:12px}.AccentBar-button{background:#f4f4f4;border:0;border-radius:5px;font-family:sans-serif;font-size:17px;height:36px;padding:1px;width:40px}.AB-compact{background:#fff;margin:0}.AB-narrow{width:36px}.AccentBar-button:hover{animation:grow 2s;animation-fill-mode:forwards;background:#663676;box-shadow:1px 1px 3px grey;color:#fff;cursor:pointer}@keyframes grow{00%{box-shadow:0 0 0 grey;transform:scale(1)}10%{box-shadow:1px 1px 3px grey;transform:scale(1.3)}90%{box-shadow:1px 1px 3px grey;transform:scale(1.3)}to{box-shadow:1px 1px 3px grey;transform:scale(1.8)}}.AccentBar-button:active{background:grey;color:#fff;cursor:pointer}.AccentBar .tabBar{background:#fff;border:0;padding:10px 0;text-align:left}.AccentBar .tab{border:0;border-bottom:4px solid #d0d0d0;color:#404040;font-size:14px;font-weight:700;height:30px;margin:2px;padding:2px 5px;text-align:left}.AccentBar .tab:hover{cursor:pointer}.AccentBar .tab-selected{border:0;border-bottom:4px solid #663676;color:#404040;font-size:14px;font-weight:700;height:30px;margin:2px;padding:2px 5px;text-align:left}.AccentBar .section-label{color:#663676;font-size:13px;font-weight:700;grid-column:1/-1;margin-bottom:4px;margin-left:8px;margin-top:8px}.AccentBar .replace-section{min-height:70px}.AccentBar .tabArea{animation:fadeIn1 .4s;animation-fill-mode:forwards}.Toolbar{animation:fadeIn1 .5s;animation-fill-mode:forwards;background-color:#fff;border:1px solid #d0d0d0;border-radius:5px;box-shadow:1px 1px 5px #a0a0a0;color:#000;display:flex;height:42px;position:absolute;z-index:10}@keyframes fadeIn1{0%{opacity:0}to{opacity:1}}.Toolbar-button{background-color:#fff;border:0;border-radius:5px;font-family:sans-serif;font-size:16px;height:36px;margin:2px;padding:1px;width:40px}.Toolbar-button:hover{background:#663676;color:#fff;cursor:pointer}.Toolbar-button:active{background:grey;color:#fff;cursor:pointer}.TB-narrow{width:30px}.TB-wide{width:46px}.TB-selected{animation:TB-fadeIn .2s;animation-fill-mode:forwards;background:#d0d0d0;color:#000;cursor:pointer}.TB-selected:hover{background:#663676;color:#fff;cursor:pointer}@keyframes TB-fadeIn{00%{background:#fff}to{background:#d0d0d0}}.Toolbar-button .tooltiptext{background-color:#222;border-radius:6px;color:#fff;font-size:12px;font-weight:400;left:50px;padding:4px 10px;position:absolute;text-align:center;top:-90%;visibility:hidden;width:100px;z-index:11}.Toolbar-button:hover .tooltiptext{animation:fadeIn2 .8s;animation-fill-mode:forwards;visibility:visible}@keyframes fadeIn2{00%{opacity:0}70%{opacity:0}to{opacity:.9;visibility:visible}}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.MathRichInput-Container{border-radius:5px;width:100%}.MathRichInput-scrollview{border-radius:5px;display:flex;position:relative}.MathRichInput p{margin:0;padding:0}.MathRichInput{background-color:#fff;border-radius:5px;font-size:18px;overflow-x:scroll;overflow:overlay;padding:10px;width:100%}.MathRichInput:empty:before{color:#acb6c0;content:attr(data-placeholder);font-size:15px}.MathRichInput:empty:focus:before{content:""}.MathRichInput:focus{outline:0}.MathRichInput .katex{border:0}.MathRichInput .base{background-color:#f0f0f0;border:1px dotted #d0d0d0;border-radius:5px;margin:0 2px;padding:2px}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.MathRichInput .katex-error{background-color:#f0f0f0;border:1px dotted #ff8080;border-radius:5px;margin:0 2px;padding:2px}.MathRichInput-Container :focus-within{background-color:#fff;outline:0}.MathRichInput-Container.dark :focus-within{background:none;border:none;outline:0}.MathRichInput-Container.dark .MathRichInput{background:none;border:none;color:#fff}.MathRichInput-Container.dark .MathRichInput .base,.MathRichInput-Container.dark .MathRichInput .katex{background:none}.MathRichInput-Container.dark .MathRichInput:focus{background:none;border:none}.MathRichInput-Container.question-edit-input .MathRichInput{border-radius:12px;font-size:32px;font-weight:400}.MathRichInput-Container.question-edit-input .MathRichInput:focus{background:hsla(0,0%,100%,.1);border:none}.MathRichInput-Container.answer-edit-input .MathRichInput{font-size:16px;font-weight:400}.MathRichInput-Container.explanation-input .MathRichInput,.MathRichInput-Container.hint-input .MathRichInput{color:#322e33;font-size:16px;font-weight:400}.MathRichInput-Container.explanation-input .MathRichInput .base,.MathRichInput-Container.hint-input .MathRichInput .base{border:1px dotted #322e33}
|