@zzish/math-rich-input 0.1.54 → 0.1.56
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 +71 -5
- package/dist/math-rich-input.css +1 -1
- package/dist/standalone.js +1 -1
- package/package.json +4 -2
- package/src/MathRichInput.css +24 -5
- package/src/MathRichInput.jsx +87 -5
- package/src/standalone.js +56 -17
package/dist/index.js
CHANGED
|
@@ -22010,6 +22010,7 @@ var EMPTY_INLINE_FORMATTING_REG_EXP = /<(B|STRONG|I|EM|U|SUB|SUP)>(?:\s| |\
|
|
|
22010
22010
|
// const LATEX_MARKER_END = "</annotation>"
|
|
22011
22011
|
|
|
22012
22012
|
var MAX_HISTORY_LENGTH = 100;
|
|
22013
|
+
var CONTROLLED_VALUE_ECHO_TIMEOUT_MS = 50;
|
|
22013
22014
|
var DEFAULT_OPTIONS = {
|
|
22014
22015
|
useExpertMode: false,
|
|
22015
22016
|
selectedTab: null
|
|
@@ -22197,6 +22198,18 @@ var MathRichInput = /*#__PURE__*/function (_React$Component) {
|
|
|
22197
22198
|
isExpertMode: isExpertMode,
|
|
22198
22199
|
selectedTab: selectedTab
|
|
22199
22200
|
});
|
|
22201
|
+
if (applyOptions.skipControlledRender === true) {
|
|
22202
|
+
var pendingNativeValue = value;
|
|
22203
|
+
// Give a scheduled controlled echo one short render window. If the host
|
|
22204
|
+
// never echoes the value, release the gate rather than preserving a
|
|
22205
|
+
// rejected native edit indefinitely.
|
|
22206
|
+
setTimeout(function () {
|
|
22207
|
+
if (_this2.skipNextControlledValueRender === true && _this2.skipNextControlledValue === pendingNativeValue) {
|
|
22208
|
+
_this2.skipNextControlledValueRender = false;
|
|
22209
|
+
_this2.skipNextControlledValue = null;
|
|
22210
|
+
}
|
|
22211
|
+
}, CONTROLLED_VALUE_ECHO_TIMEOUT_MS);
|
|
22212
|
+
}
|
|
22200
22213
|
debugMathRichInput("applyChangesToComponent:after-onChange", {
|
|
22201
22214
|
afterComponentUpdateData: _this2.afterComponentUpdateData,
|
|
22202
22215
|
selection: getSelectionSnapshot(_this2.editableDiv)
|
|
@@ -24685,7 +24698,8 @@ var MathRichInput = /*#__PURE__*/function (_React$Component) {
|
|
|
24685
24698
|
value: function getEditableHtmlForRender(html) {
|
|
24686
24699
|
var currentRawText = this.editableDiv ? this.getCurrentRawTextForProps(this.props) : null;
|
|
24687
24700
|
var liveEditableHtml = this.editableDiv ? this.editableDiv.innerHTML : null;
|
|
24688
|
-
var
|
|
24701
|
+
var pendingNativeInputMatchesLiveDom = this.skipNextControlledValueRender === true && currentRawText === this.skipNextControlledValue;
|
|
24702
|
+
var canPreserveNativeDom = this.state.hasFocus === true && this.editableDiv !== null && this.editableDiv !== undefined && (this.afterComponentUpdateData === null || this.afterComponentUpdateData === undefined) && this.lastRenderedEditableHtml !== null && (currentRawText === this.props.value || pendingNativeInputMatchesLiveDom);
|
|
24689
24703
|
var preserveRangeParams = canPreserveNativeDom ? this.getRangeParamsPreservingInlinePlaceholder() : null;
|
|
24690
24704
|
debugMathRichInput("render:editable-html", {
|
|
24691
24705
|
canPreserveNativeDom: canPreserveNativeDom,
|
|
@@ -24696,6 +24710,7 @@ var MathRichInput = /*#__PURE__*/function (_React$Component) {
|
|
|
24696
24710
|
liveEditableHtml: liveEditableHtml,
|
|
24697
24711
|
lastRenderedEditableHtml: this.lastRenderedEditableHtml,
|
|
24698
24712
|
currentRawText: currentRawText,
|
|
24713
|
+
pendingNativeInputMatchesLiveDom: pendingNativeInputMatchesLiveDom,
|
|
24699
24714
|
preserveRangeParams: preserveRangeParams,
|
|
24700
24715
|
afterComponentUpdateData: this.afterComponentUpdateData,
|
|
24701
24716
|
hasFocus: this.state.hasFocus,
|
|
@@ -25043,18 +25058,29 @@ var MathRichInput = /*#__PURE__*/function (_React$Component) {
|
|
|
25043
25058
|
key: "shouldComponentUpdate",
|
|
25044
25059
|
value: function shouldComponentUpdate(nextProps, nextState) {
|
|
25045
25060
|
if (this.skipNextControlledValueRender === true) {
|
|
25046
|
-
var
|
|
25061
|
+
var controlledValueArrived = nextProps.value === this.skipNextControlledValue;
|
|
25062
|
+
var canSkip = controlledValueArrived && nextState === this.state;
|
|
25047
25063
|
debugMathRichInput("shouldComponentUpdate:native-input-gate", {
|
|
25048
25064
|
canSkip: canSkip,
|
|
25049
25065
|
nextValue: nextProps.value,
|
|
25050
25066
|
skipNextControlledValue: this.skipNextControlledValue,
|
|
25067
|
+
controlledValueArrived: controlledValueArrived,
|
|
25051
25068
|
currentPropsValue: this.props.value,
|
|
25052
25069
|
stateChanged: nextState !== this.state,
|
|
25053
25070
|
innerHTML: this.editableDiv ? this.editableDiv.innerHTML : null,
|
|
25054
25071
|
selection: getSelectionSnapshot(this.editableDiv)
|
|
25055
25072
|
});
|
|
25056
|
-
|
|
25057
|
-
|
|
25073
|
+
|
|
25074
|
+
// A controlled host may commit an unrelated render before it echoes the
|
|
25075
|
+
// value from this native input event. Keep the gate armed through that
|
|
25076
|
+
// stale render so getEditableHtmlForRender can preserve the browser DOM
|
|
25077
|
+
// and its selection. The time-bounded fallback armed by
|
|
25078
|
+
// applyChangesToComponent keeps a host that rejects the value from
|
|
25079
|
+
// leaving the gate armed indefinitely.
|
|
25080
|
+
if (controlledValueArrived) {
|
|
25081
|
+
this.skipNextControlledValueRender = false;
|
|
25082
|
+
this.skipNextControlledValue = null;
|
|
25083
|
+
}
|
|
25058
25084
|
if (canSkip) return false;
|
|
25059
25085
|
}
|
|
25060
25086
|
if (this.shouldSkipRedundantFocusedRender(nextProps, nextState)) {
|
|
@@ -25068,6 +25094,26 @@ var MathRichInput = /*#__PURE__*/function (_React$Component) {
|
|
|
25068
25094
|
return true;
|
|
25069
25095
|
}
|
|
25070
25096
|
|
|
25097
|
+
/**
|
|
25098
|
+
* Whether the field holds nothing a teacher would call content.
|
|
25099
|
+
*
|
|
25100
|
+
* NOT `:empty`, which is what the stylesheet asked and why the placeholder has never once been seen.
|
|
25101
|
+
* An empty field here is not an empty element: the value renders as a paragraph carrying a single
|
|
25102
|
+
* zero-width space, so the element always has a child and the CSS rule never matched. The hint was
|
|
25103
|
+
* written, translated, passed down through every field — and drawn nowhere.
|
|
25104
|
+
*
|
|
25105
|
+
* Markup is stripped rather than counted: `<p>` and `<br>` are the shape of emptiness, not content.
|
|
25106
|
+
* Maths and images are content even though stripping tags would leave nothing behind, so they are
|
|
25107
|
+
* asked about directly.
|
|
25108
|
+
*/
|
|
25109
|
+
}, {
|
|
25110
|
+
key: "isVisuallyEmpty",
|
|
25111
|
+
value: function isVisuallyEmpty() {
|
|
25112
|
+
var value = this.props.value || "";
|
|
25113
|
+
if (/<(math|img)\b/i.test(value)) return false;
|
|
25114
|
+
return value.replace(/<[^>]*>/g, "").split(SMALL_SPACE).join("").trim().length === 0;
|
|
25115
|
+
}
|
|
25116
|
+
|
|
25071
25117
|
/**
|
|
25072
25118
|
* The browser's own reading of an HTML string.
|
|
25073
25119
|
*
|
|
@@ -25261,7 +25307,27 @@ var MathRichInput = /*#__PURE__*/function (_React$Component) {
|
|
|
25261
25307
|
className: useClassName
|
|
25262
25308
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
25263
25309
|
className: "MathRichInput-scrollview"
|
|
25264
|
-
}, this.
|
|
25310
|
+
}, this.props.placeholder && this.isVisuallyEmpty() && !this.state.hasFocus &&
|
|
25311
|
+
/*#__PURE__*/
|
|
25312
|
+
/*
|
|
25313
|
+
* CARRIED BY ITS OWN ANCHOR, a box of no size at the start of the row.
|
|
25314
|
+
*
|
|
25315
|
+
* An absolutely positioned element hangs off the nearest positioned ancestor, and which one
|
|
25316
|
+
* that is belongs to whoever is embedding the field: a host may take the positioning off
|
|
25317
|
+
* this component's own boxes to anchor something else of its own — the toolbar, say — and
|
|
25318
|
+
* the hint then measures from the host's outer card instead of the field, landing on top of
|
|
25319
|
+
* whatever the host has put to the left of it.
|
|
25320
|
+
*
|
|
25321
|
+
* A wrapper of its own settles it. Zero-sized, so it displaces nothing, and positioned, so
|
|
25322
|
+
* it is what the hint measures from — which puts the words where the first character goes,
|
|
25323
|
+
* whatever the host has done around it.
|
|
25324
|
+
*/
|
|
25325
|
+
React__default["default"].createElement("div", {
|
|
25326
|
+
className: "MathRichInput-hintlayer"
|
|
25327
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
25328
|
+
className: "MathRichInput-hint",
|
|
25329
|
+
"aria-hidden": "true"
|
|
25330
|
+
}, this.props.placeholder)), this.state.hasFocus && /*#__PURE__*/React__default["default"].createElement(Toolbar, {
|
|
25265
25331
|
className: "Toolbar",
|
|
25266
25332
|
enableMath: this.enableMath(),
|
|
25267
25333
|
enableFontStyling: this.enableFontStyling(),
|
package/dist/math-rich-input.css
CHANGED
|
@@ -1 +1 @@
|
|
|
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}
|
|
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;position:relative;width:100%}.MathRichInput-hintlayer{flex:0 0 auto;height:0;position:relative;width:0}.MathRichInput-hint{color:#acb6c0;font-size:15px;left:10px;pointer-events:none;position:absolute;top:10px;user-select:none;white-space:nowrap}.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}
|