vue3-math-editor 0.2.5 → 0.2.6
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/style.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.math-field[data-v-afb31880]{--mf-accent:var(--me-accent,#2563eb);--mf-units:var(--me-units,#60a5fa);font-size:var(--me-line-font-size,1.05rem);cursor:text;border-radius:6px;outline:none;align-items:center;min-height:2.6rem;padding:.45rem .7rem;display:flex;position:relative;overflow-x:auto}.math-field.focused[data-v-afb31880]{box-shadow:0 0 0 2px color-mix(in srgb, var(--mf-accent) 35%, transparent)}.math-content[data-v-afb31880]{z-index:1;min-width:0;position:relative}.selection[data-v-afb31880]{z-index:0;pointer-events:none;background:#94a3b84d;border-radius:3px;position:absolute}.row-tint[data-v-afb31880]{z-index:0;background:color-mix(in srgb, var(--mf-accent) 7%, transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--mf-accent) 18%, transparent);pointer-events:none;border-radius:3px;position:absolute}.math-field.focused .selection[data-v-afb31880]{background:color-mix(in srgb, var(--mf-accent) 20%, transparent)}.mark[data-v-afb31880]{--mark-color:var(--me-danger,#dc2626);z-index:0;pointer-events:none;background:color-mix(in srgb, var(--mark-color) 8%, transparent);border-radius:2px;position:absolute}.mark[data-v-afb31880]:after{--wave:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='3'%3E%3Cpath d='M0 2.5 L1.5 0.5 L3 2.5 L4.5 0.5 L6 2.5' fill='none' stroke='black' stroke-width='1'/%3E%3C/svg%3E");content:"";background:var(--mark-color);-webkit-mask:var(--wave) repeat-x left bottom / 6px 3px;-webkit-mask:var(--wave) repeat-x left bottom / 6px 3px;mask:var(--wave) repeat-x left bottom / 6px 3px;position:absolute;inset:0}.mark-units[data-v-afb31880]{--mark-color:var(--me-warn,#d97706);background:color-mix(in srgb, var(--mark-color) 10%, transparent)}.math-field[data-v-afb31880] .me-units{color:var(--mf-units)}.math-field[data-v-afb31880] .me-ph.me-units-ph{border:1px dashed var(--mf-units);color:var(--mf-units);border-radius:3px;padding:0 .15em}.math-field.focused[data-v-afb31880] .me-units-ph.me-ph-active{color:color-mix(in srgb, var(--mf-units) 75%, var(--mf-accent));background:color-mix(in srgb, var(--mf-units) 12%, transparent)}.math-field[data-v-afb31880] .me-units-flag{width:0;height:0;display:inline-block;position:relative}.math-field[data-v-afb31880] .me-units-flag:after{content:"";border-top:.22em solid var(--mf-units);border-left:.22em solid #0000;position:absolute;bottom:.52em;right:-.05em}.fixed-origin[data-v-afb31880]{visibility:hidden;pointer-events:none;width:0;height:0;position:fixed;top:0;left:0}.mark-tip[data-v-afb31880]{z-index:10;background:var(--me-tip-bg,#1e293b);width:max-content;max-width:24rem;color:var(--me-tip-text,#f8fafc);white-space:normal;pointer-events:none;border-radius:.35rem;padding:.25rem .5rem;font-size:.75rem;line-height:1.3;position:fixed}.caret[data-v-afb31880]{z-index:2;background:var(--mf-accent);pointer-events:none;width:2px;margin-left:-1px;animation:1.1s step-end infinite math-field-blink-afb31880;position:absolute}.math-field[data-v-afb31880] .katex-display{text-align:left;margin:0}.math-field[data-v-afb31880] .katex-display>.katex{text-align:left}.math-field[data-v-afb31880] .me-ph{color:color-mix(in srgb, var(--me-muted,#64748b) 70%, transparent)}.math-field.focused[data-v-afb31880] .me-ph-active{color:var(--mf-accent);background:color-mix(in srgb, var(--mf-accent) 12%, transparent);border-radius:2px}@keyframes math-field-blink-afb31880{50%{opacity:0}}.me-workbench[data-v-99af4c22]{container-type:inline-size}.editor-grid[data-v-99af4c22],.gallery[data-v-99af4c22],.command-list[data-v-99af4c22]{--me-accent:var(--math-editor-accent,#2563eb);--me-surface:var(--p-content-background,#fff);--me-subtle:var(--p-content-hover-background,#f1f5f9);--me-border:var(--p-content-border-color,#e2e8f0);--me-border-strong:var(--p-form-field-border-color,#cbd5e1);--me-text:var(--p-text-color,#0f172a);--me-muted:var(--p-text-muted-color,#64748b);--me-warn:var(--math-editor-warn,#d97706);--me-caution:var(--math-editor-warn,#ea580c);--me-danger:var(--math-editor-danger,#dc2626);--me-units:var(--math-editor-units,#60a5fa);--me-tip-bg:#1e293b;--me-tip-text:#f8fafc;--me-code-bg:#0f172a;--me-code-text:#e2e8f0}.editor-grid[data-v-99af4c22]{outline:none;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);grid-template-areas:"editor outputs";align-items:start;gap:1rem;display:grid}.editor-grid.has-side[data-v-99af4c22]{grid-template-rows:auto 1fr;grid-template-areas:"editor side""outputs side"}.editor-grid.no-outputs[data-v-99af4c22]{grid-template-columns:minmax(0,1fr);grid-template-areas:"editor"}.editor-grid.no-outputs.has-side[data-v-99af4c22]{grid-template:"editor side"/minmax(0,1.35fr) minmax(0,1fr)}.editor-panel[data-v-99af4c22]{border:1px solid var(--me-border);background:var(--me-surface);min-width:0;color:var(--me-text);border-radius:.75rem;grid-area:editor;padding:0 1rem .85rem}.output-card[data-v-99af4c22]{grid-area:outputs;min-width:0}.side-column[data-v-99af4c22]{top:var(--me-side-top,calc(var(--me-toolbar-top,0px) + 1rem));grid-area:side;align-self:start;min-width:0;position:sticky}.toolbar[data-v-99af4c22]{top:var(--me-toolbar-top,0);z-index:2;border-top:1px solid #0000;border-bottom:1px solid var(--me-border);background:var(--me-surface);background-clip:padding-box;border-radius:calc(.75rem - 1px) calc(.75rem - 1px) 0 0;flex-wrap:wrap;align-items:center;gap:.35rem .75rem;margin:-1px -1rem .6rem;padding:.5rem 1rem;display:flex;position:sticky}.toolbar.stuck[data-v-99af4c22]{border-top-color:var(--me-border);border-radius:0}.toolbar-group[data-v-99af4c22]{flex-wrap:wrap;align-items:center;gap:.25rem;display:flex}.toolbar-tools[data-v-99af4c22]{flex-wrap:nowrap;flex:1 1 0;min-width:4.5rem;position:relative}.tool-button.overflowed[data-v-99af4c22]{visibility:hidden;pointer-events:none;position:absolute}.toolbar-lines[data-v-99af4c22] .p-button{width:2rem;height:2rem;padding:0}.redo-button[data-v-99af4c22] .p-button-icon{transform:scaleX(-1)}.tool-button[data-v-99af4c22]{border:1px solid var(--me-border-strong);background:var(--me-surface);min-width:2rem;height:2rem;color:var(--me-text);cursor:pointer;border-radius:.45rem;justify-content:center;align-items:center;padding:0 .35rem;font-size:.72rem;transition:border-color .12s,background .12s,box-shadow .12s;display:inline-flex}.tool-button[data-v-99af4c22]:disabled{opacity:.45;cursor:default}.tool-chevron[data-v-99af4c22]{color:var(--me-muted);margin-left:.2rem;font-size:.55rem}.tool-button[data-v-99af4c22]:hover:not(:disabled){border-color:var(--me-accent);background:color-mix(in srgb, var(--me-accent) 8%, var(--me-surface))}.tool-button[data-v-99af4c22]:active{box-shadow:inset 0 1px 3px #0f172a26}.gallery[data-v-99af4c22]{flex-direction:column;gap:.5rem;max-width:22rem;display:flex}.gallery-label[data-v-99af4c22]{color:var(--me-muted);margin-bottom:.25rem;font-size:.72rem}.gallery-items[data-v-99af4c22]{flex-wrap:wrap;gap:.25rem;display:flex}.gallery .tool-button[data-v-99af4c22]{min-width:2.4rem;font-size:.8rem}.equations-stack[data-v-99af4c22]{flex-direction:column;gap:.6rem;display:flex}.equation-row[data-v-99af4c22]{border:1px solid var(--me-border);background:var(--me-surface);color:var(--me-text);border-radius:.65rem;align-items:stretch;gap:.5rem;transition:border-color .12s,box-shadow .12s;display:flex;position:relative}.equation-row.active[data-v-99af4c22]{border-color:var(--me-accent);box-shadow:0 0 0 3px color-mix(in srgb, var(--me-accent) 12%, transparent)}.equation-row.has-error[data-v-99af4c22]{border-color:var(--me-danger)}.equation-row.has-units-issue[data-v-99af4c22]{border-color:var(--me-warn)}.equation-row.active.has-error[data-v-99af4c22]{box-shadow:0 0 0 3px color-mix(in srgb, var(--me-danger) 14%, transparent)}.equation-row.active.has-units-issue[data-v-99af4c22]{box-shadow:0 0 0 3px color-mix(in srgb, var(--me-warn) 16%, transparent)}.equation-label[data-v-99af4c22]{min-width:2.1rem;color:var(--me-muted);font-variant-numeric:tabular-nums;border-right:1px solid var(--me-border);-webkit-user-select:none;user-select:none;border-radius:calc(.65rem - 1px) 0 0 calc(.65rem - 1px);flex-direction:column;justify-content:center;align-items:center;gap:.1rem;padding:0 .35rem;font-size:.75rem;display:flex}.equation-label[draggable=true][data-v-99af4c22]{cursor:grab}.equation-label[draggable=true][data-v-99af4c22]:hover{background:var(--me-subtle)}.line-problem[data-v-99af4c22]{color:var(--me-danger);font-size:.7rem}.line-problem.pi-exclamation-triangle[data-v-99af4c22]{color:var(--me-warn)}.equation-row.line-selected[data-v-99af4c22]{background:color-mix(in srgb, var(--me-accent) 6%, var(--me-surface))}.equation-row.line-selected .equation-label[data-v-99af4c22]{background:color-mix(in srgb, var(--me-accent) 16%, var(--me-surface));color:var(--me-accent)}.equation-row.dragging[data-v-99af4c22]{opacity:.5}.equation-row.drop-before[data-v-99af4c22]:before,.equation-row.drop-after[data-v-99af4c22]:after{content:"";background:var(--me-accent);pointer-events:none;border-radius:1px;height:2px;position:absolute;left:0;right:0}.equation-row.drop-before[data-v-99af4c22]:before{top:calc(-.3rem - 2px)}.equation-row.drop-after[data-v-99af4c22]:after{bottom:calc(-.3rem - 2px)}.equation-field[data-v-99af4c22]{flex:1;min-width:0}.equation-field.focused[data-v-99af4c22]{box-shadow:none}.status-bar[data-v-99af4c22]{white-space:nowrap;border-radius:.45rem;align-items:center;gap:.5rem;height:1.75rem;margin-top:.5rem;padding:0 .6rem;font-size:.8rem;display:flex;overflow:hidden}.status-text[data-v-99af4c22]{text-overflow:ellipsis;min-width:0;overflow:hidden}.status-more[data-v-99af4c22]{opacity:.75;flex:none}.status-error[data-v-99af4c22],.status-units[data-v-99af4c22]{cursor:pointer}.status-error[data-v-99af4c22]{background:color-mix(in srgb, var(--me-danger) 12%, var(--me-surface));color:color-mix(in srgb, var(--me-danger) 55%, var(--me-text))}.status-units[data-v-99af4c22]{background:color-mix(in srgb, var(--me-caution) 14%, var(--me-surface));color:color-mix(in srgb, var(--me-caution) 55%, var(--me-text))}.status-info[data-v-99af4c22]{background:color-mix(in srgb, var(--me-accent) 8%, var(--me-surface));color:color-mix(in srgb, var(--me-accent) 45%, var(--me-text))}.command-list[data-v-99af4c22]{z-index:1300;border:1px solid var(--me-border);background:var(--me-surface);width:max-content;min-width:17.5rem;max-width:20rem;color:var(--me-text);border-radius:.55rem;flex-direction:column;gap:.35rem;padding:.4rem;font-size:.8rem;display:flex;position:fixed;box-shadow:0 6px 24px #0f172a24}.command-list .command-chip[data-v-99af4c22]{align-self:flex-start}.command-options[data-v-99af4c22]{grid-template-columns:minmax(2.4rem,max-content) max-content minmax(0,1fr);column-gap:.5rem;margin:0;padding:0;list-style:none;display:grid}.command-option[data-v-99af4c22]{grid-column:1/-1;grid-template-columns:subgrid;cursor:pointer;border-radius:.35rem;align-items:center;min-height:1.9rem;padding:.1rem .4rem;display:grid}.command-option[data-v-99af4c22]:hover{background:var(--me-subtle)}.command-option.highlighted[data-v-99af4c22]{background:color-mix(in srgb, var(--me-accent) 12%, var(--me-surface))}.command-preview[data-v-99af4c22]{text-align:center;font-size:.85rem}.command-name[data-v-99af4c22]{white-space:nowrap;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,Liberation Mono,monospace}.command-title[data-v-99af4c22]{color:var(--me-muted);justify-self:end;font-size:.72rem}.command-hint[data-v-99af4c22]{border-top:1px solid var(--me-border);color:var(--me-muted);white-space:nowrap;margin:0;padding:.3rem .4rem 0;font-size:.7rem}.command-hint kbd[data-v-99af4c22]{border:1px solid var(--me-border-strong);background:var(--me-subtle);border-radius:.25rem;padding:0 .25rem;font-family:inherit;font-size:.65rem}.command-chip[data-v-99af4c22]{background:var(--me-code-bg);height:1.6rem;color:var(--me-code-text);border-radius:.45rem;align-items:center;padding:0 .6rem;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,Liberation Mono,monospace;font-size:.9rem;display:inline-flex}.command-slash[data-v-99af4c22]{color:var(--me-units)}.command-caret[data-v-99af4c22]{background:var(--me-code-text);width:2px;height:1em;margin-left:2px;animation:1s step-end infinite chip-blink-99af4c22}@keyframes chip-blink-99af4c22{50%{opacity:0}}.focus-meta[data-v-99af4c22]{color:var(--me-muted);margin:.75rem 0 0;font-size:.8rem}.output-actions[data-v-99af4c22]{justify-content:flex-end;margin-bottom:.25rem;display:flex}.tab-tag[data-v-99af4c22]{margin-left:.4rem;padding:.05rem .35rem;font-size:.7rem}.key-help[data-v-99af4c22]{margin-top:.75rem}.key-help summary[data-v-99af4c22]{cursor:pointer;width:fit-content;color:var(--me-muted);font-size:.85rem}.key-hint[data-v-99af4c22]{color:var(--me-muted);margin:.5rem 0 0;font-size:.8rem;line-height:1.5}.key-hint kbd[data-v-99af4c22]{border:1px solid var(--me-border-strong);background:var(--me-subtle);border-bottom-width:2px;border-radius:.3rem;margin:0 .08rem;padding:0 .3rem;font-family:inherit;font-size:.72rem;display:inline-block}.key-hint code[data-v-99af4c22]{background:var(--me-subtle);border-radius:.25rem;padding:.05rem .3rem}.output-card pre[data-v-99af4c22]{background:var(--me-code-bg);max-height:28rem;color:var(--me-code-text);border-radius:.55rem;margin:0;padding:.85rem;font-size:.83rem;line-height:1.35;overflow:auto}@container (width<=900px){.editor-grid[data-v-99af4c22],.editor-grid.has-side[data-v-99af4c22],.editor-grid.no-outputs.has-side[data-v-99af4c22]{grid-template-rows:none;grid-template-columns:minmax(0,1fr);grid-template-areas:"editor""side""outputs"}.side-column[data-v-99af4c22]{position:static}}.units-form[data-v-effe158e]{background:#f8fbff;border:1px solid #bfdbfe;border-radius:.5rem;margin-top:.5rem;padding:.6rem}.form-name[data-v-effe158e]{color:#334155;align-items:center;gap:.5rem;font-size:.85rem;display:flex}.form-name input[data-v-effe158e]{flex:1}input[data-v-effe158e],select[data-v-effe158e]{font:inherit;background:#fff;border:1px solid #cbd5e1;border-radius:.3rem;min-width:0;padding:.2rem .35rem;font-size:.85rem}input[data-v-effe158e]:focus,select[data-v-effe158e]:focus{outline-offset:0;border-color:#60a5fa;outline:2px solid #93c5fd}.form-parts[data-v-effe158e]{border-collapse:collapse;width:100%;margin-top:.5rem}.form-parts th[data-v-effe158e]{color:#64748b;text-align:left;padding:0 .25rem .15rem 0;font-size:.72rem;font-weight:600}.form-parts td[data-v-effe158e]{padding:.1rem .25rem .1rem 0}.form-parts td input[data-v-effe158e],.form-parts td select[data-v-effe158e]{width:100%}.form-parts .number[data-v-effe158e]{width:4.5rem}.form-problems[data-v-effe158e]{color:#b91c1c;margin:.4rem 0 0;padding-left:1.1rem;font-size:.82rem}.form-actions[data-v-effe158e]{align-items:center;gap:.25rem;margin-top:.4rem;display:flex}.spacer[data-v-effe158e]{flex:1}.visually-hidden[data-v-effe158e]{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.units-title[data-v-ada663af]{justify-content:space-between;align-items:center;gap:.75rem;display:flex}.units-section+.units-section[data-v-ada663af]{margin-top:1.25rem}.section-head[data-v-ada663af]{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.5rem;display:flex}.section-head h3[data-v-ada663af]{color:#0f172a;margin:0;font-size:.95rem;font-weight:600}.section-actions[data-v-ada663af]{align-items:center;gap:.25rem;display:flex}.hint[data-v-ada663af]{color:#64748b;margin:.4rem 0 0;font-size:.875rem}.files[data-v-ada663af]{gap:.5rem;margin:.5rem 0 0;padding:0;list-style:none;display:grid}.files>li[data-v-ada663af]{background:#fff;border:1px solid #e2e8f0;border-radius:.5rem;padding:.4rem .6rem}.file-head[data-v-ada663af]{align-items:center;gap:.5rem;display:flex}.file-name[data-v-ada663af]{color:#0f172a;overflow-wrap:anywhere;font-weight:600}.file-count[data-v-ada663af]{color:#64748b;flex:1;font-size:.8rem}.units-names[data-v-ada663af]{flex-wrap:wrap;gap:.25rem;margin-top:.25rem;display:flex}.units-names code[data-v-ada663af]{color:#334155;background:#f1f5f9;border-radius:.25rem;padding:.05rem .35rem;font-size:.78rem}.problems[data-v-ada663af]{color:#92400e;margin:.4rem 0 .1rem;padding-left:1.1rem;font-size:.82rem}.new-units[data-v-ada663af]{gap:.25rem;margin:.5rem 0 0;padding:0;list-style:none;display:grid}.new-units-row[data-v-ada663af]{align-items:center;gap:.4rem;display:flex}.new-units-name[data-v-ada663af]{color:#1d4ed8;background:#eff6ff;border-radius:.25rem;padding:.05rem .35rem;font-size:.85rem}.new-units-definition[data-v-ada663af]{color:#334155;overflow-wrap:anywhere;flex:1;font-size:.85rem}.missing-count[data-v-ada663af]{color:#b45309;font-size:.82rem}.variables[data-v-ada663af]{border-collapse:collapse;width:100%;margin-top:.5rem}.variables th[data-v-ada663af],.variables td[data-v-ada663af]{text-align:left;vertical-align:middle;padding:.2rem .5rem .2rem 0}.variables th[data-v-ada663af]{width:1%;padding-right:1rem}.variables td[data-v-ada663af]:nth-child(2){width:16rem}.variable-name[data-v-ada663af]{white-space:nowrap;color:#0f172a;font-family:KaTeX_Math,Times New Roman,serif;font-size:1.05rem;font-style:italic;font-weight:400}.units-input[data-v-ada663af]{width:100%;min-width:8rem;max-width:16rem;font:inherit;background:#fff;border:1px solid #cbd5e1;border-radius:.375rem;padding:.25rem .45rem;font-size:.9rem}.units-input[data-v-ada663af]:focus{outline-offset:0;border-color:#60a5fa;outline:2px solid #93c5fd}.state-missing .units-input[data-v-ada663af],.state-unknown .units-input[data-v-ada663af]{background:#fffbeb;border-color:#f59e0b}.variable-state[data-v-ada663af]{white-space:nowrap;color:#b45309;font-size:.8rem}.unused .variable-name[data-v-ada663af],.unused .variable-state[data-v-ada663af]{color:#94a3b8}
|
|
1
|
+
.math-field[data-v-afb31880]{--mf-accent:var(--me-accent,#2563eb);--mf-units:var(--me-units,#60a5fa);font-size:var(--me-line-font-size,1.05rem);cursor:text;border-radius:6px;outline:none;align-items:center;min-height:2.6rem;padding:.45rem .7rem;display:flex;position:relative;overflow-x:auto}.math-field.focused[data-v-afb31880]{box-shadow:0 0 0 2px color-mix(in srgb, var(--mf-accent) 35%, transparent)}.math-content[data-v-afb31880]{z-index:1;min-width:0;position:relative}.selection[data-v-afb31880]{z-index:0;pointer-events:none;background:#94a3b84d;border-radius:3px;position:absolute}.row-tint[data-v-afb31880]{z-index:0;background:color-mix(in srgb, var(--mf-accent) 7%, transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--mf-accent) 18%, transparent);pointer-events:none;border-radius:3px;position:absolute}.math-field.focused .selection[data-v-afb31880]{background:color-mix(in srgb, var(--mf-accent) 20%, transparent)}.mark[data-v-afb31880]{--mark-color:var(--me-danger,#dc2626);z-index:0;pointer-events:none;background:color-mix(in srgb, var(--mark-color) 8%, transparent);border-radius:2px;position:absolute}.mark[data-v-afb31880]:after{--wave:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='3'%3E%3Cpath d='M0 2.5 L1.5 0.5 L3 2.5 L4.5 0.5 L6 2.5' fill='none' stroke='black' stroke-width='1'/%3E%3C/svg%3E");content:"";background:var(--mark-color);-webkit-mask:var(--wave) repeat-x left bottom / 6px 3px;-webkit-mask:var(--wave) repeat-x left bottom / 6px 3px;mask:var(--wave) repeat-x left bottom / 6px 3px;position:absolute;inset:0}.mark-units[data-v-afb31880]{--mark-color:var(--me-warn,#d97706);background:color-mix(in srgb, var(--mark-color) 10%, transparent)}.math-field[data-v-afb31880] .me-units{color:var(--mf-units)}.math-field[data-v-afb31880] .me-ph.me-units-ph{border:1px dashed var(--mf-units);color:var(--mf-units);border-radius:3px;padding:0 .15em}.math-field.focused[data-v-afb31880] .me-units-ph.me-ph-active{color:color-mix(in srgb, var(--mf-units) 75%, var(--mf-accent));background:color-mix(in srgb, var(--mf-units) 12%, transparent)}.math-field[data-v-afb31880] .me-units-flag{width:0;height:0;display:inline-block;position:relative}.math-field[data-v-afb31880] .me-units-flag:after{content:"";border-top:.22em solid var(--mf-units);border-left:.22em solid #0000;position:absolute;bottom:.52em;right:-.05em}.fixed-origin[data-v-afb31880]{visibility:hidden;pointer-events:none;width:0;height:0;position:fixed;top:0;left:0}.mark-tip[data-v-afb31880]{z-index:10;background:var(--me-tip-bg,#1e293b);width:max-content;max-width:24rem;color:var(--me-tip-text,#f8fafc);white-space:normal;pointer-events:none;border-radius:.35rem;padding:.25rem .5rem;font-size:.75rem;line-height:1.3;position:fixed}.caret[data-v-afb31880]{z-index:2;background:var(--mf-accent);pointer-events:none;width:2px;margin-left:-1px;animation:1.1s step-end infinite math-field-blink-afb31880;position:absolute}.math-field[data-v-afb31880] .katex-display{text-align:left;margin:0}.math-field[data-v-afb31880] .katex-display>.katex{text-align:left}.math-field[data-v-afb31880] .me-ph{color:color-mix(in srgb, var(--me-muted,#64748b) 70%, transparent)}.math-field.focused[data-v-afb31880] .me-ph-active{color:var(--mf-accent);background:color-mix(in srgb, var(--mf-accent) 12%, transparent);border-radius:2px}@keyframes math-field-blink-afb31880{50%{opacity:0}}.me-workbench[data-v-1c2a07cd]{container-type:inline-size}.editor-grid[data-v-1c2a07cd],.gallery[data-v-1c2a07cd],.command-list[data-v-1c2a07cd]{--me-accent:var(--math-editor-accent,#2563eb);--me-surface:var(--p-content-background,#fff);--me-subtle:var(--p-content-hover-background,#f1f5f9);--me-border:var(--p-content-border-color,#e2e8f0);--me-border-strong:var(--p-form-field-border-color,#cbd5e1);--me-text:var(--p-text-color,#0f172a);--me-muted:var(--p-text-muted-color,#64748b);--me-warn:var(--math-editor-warn,#d97706);--me-caution:var(--math-editor-warn,#ea580c);--me-danger:var(--math-editor-danger,#dc2626);--me-units:var(--math-editor-units,#60a5fa);--me-tip-bg:#1e293b;--me-tip-text:#f8fafc;--me-code-bg:#0f172a;--me-code-text:#e2e8f0}.editor-grid[data-v-1c2a07cd]{outline:none;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);grid-template-areas:"editor outputs";align-items:start;gap:1rem;display:grid}.editor-grid.has-side[data-v-1c2a07cd]{grid-template-rows:auto 1fr;grid-template-areas:"editor side""outputs side"}.editor-grid.no-outputs[data-v-1c2a07cd]{grid-template-columns:minmax(0,1fr);grid-template-areas:"editor"}.editor-grid.no-outputs.has-side[data-v-1c2a07cd]{grid-template:"editor side"/minmax(0,1.35fr) minmax(0,1fr)}.editor-panel[data-v-1c2a07cd]{border:1px solid var(--me-border);background:var(--me-surface);min-width:0;color:var(--me-text);border-radius:.75rem;grid-area:editor;padding:0 1rem .85rem}.output-card[data-v-1c2a07cd]{grid-area:outputs;min-width:0}.side-column[data-v-1c2a07cd]{top:var(--me-side-top,calc(var(--me-toolbar-top,0px) + 1rem));grid-area:side;align-self:start;min-width:0;position:sticky}.toolbar[data-v-1c2a07cd]{top:var(--me-toolbar-top,0);z-index:2;border-top:1px solid #0000;border-bottom:1px solid var(--me-border);background:var(--me-surface);background-clip:padding-box;border-radius:calc(.75rem - 1px) calc(.75rem - 1px) 0 0;flex-wrap:wrap;align-items:center;gap:.35rem .75rem;margin:-1px -1rem .6rem;padding:.5rem 1rem;display:flex;position:sticky}.toolbar.stuck[data-v-1c2a07cd]{border-top-color:var(--me-border);border-radius:0}.toolbar-group[data-v-1c2a07cd]{flex-wrap:wrap;align-items:center;gap:.25rem;display:flex}.toolbar-tools[data-v-1c2a07cd]{flex-wrap:nowrap;flex:1 1 0;min-width:4.5rem;position:relative}.tool-button.overflowed[data-v-1c2a07cd]{visibility:hidden;pointer-events:none;position:absolute}.toolbar-lines[data-v-1c2a07cd] .p-button{width:2rem;height:2rem;padding:0}.redo-button[data-v-1c2a07cd] .p-button-icon{transform:scaleX(-1)}.tool-button[data-v-1c2a07cd]{border:1px solid var(--me-border-strong);background:var(--me-surface);min-width:2rem;height:2rem;color:var(--me-text);cursor:pointer;border-radius:.45rem;justify-content:center;align-items:center;padding:0 .35rem;font-size:.72rem;transition:border-color .12s,background .12s,box-shadow .12s;display:inline-flex}.tool-button[data-v-1c2a07cd]:disabled{opacity:.45;cursor:default}.tool-chevron[data-v-1c2a07cd]{color:var(--me-muted);margin-left:.2rem;font-size:.55rem}.tool-button[data-v-1c2a07cd]:hover:not(:disabled){border-color:var(--me-accent);background:color-mix(in srgb, var(--me-accent) 8%, var(--me-surface))}.tool-button[data-v-1c2a07cd]:active{box-shadow:inset 0 1px 3px #0f172a26}.gallery[data-v-1c2a07cd]{flex-direction:column;gap:.5rem;max-width:22rem;display:flex}.gallery-label[data-v-1c2a07cd]{color:var(--me-muted);margin-bottom:.25rem;font-size:.72rem}.gallery-items[data-v-1c2a07cd]{flex-wrap:wrap;gap:.25rem;display:flex}.gallery .tool-button[data-v-1c2a07cd]{min-width:2.4rem;font-size:.8rem}.equations-stack[data-v-1c2a07cd]{flex-direction:column;gap:.6rem;display:flex}.equation-row[data-v-1c2a07cd]{border:1px solid var(--me-border);background:var(--me-surface);color:var(--me-text);border-radius:.65rem;align-items:stretch;gap:.5rem;transition:border-color .12s,box-shadow .12s;display:flex;position:relative}.equation-row.active[data-v-1c2a07cd]{border-color:var(--me-accent);box-shadow:0 0 0 3px color-mix(in srgb, var(--me-accent) 12%, transparent)}.equation-row.has-error[data-v-1c2a07cd]{border-color:var(--me-danger)}.equation-row.has-units-issue[data-v-1c2a07cd]{border-color:var(--me-warn)}.equation-row.active.has-error[data-v-1c2a07cd]{box-shadow:0 0 0 3px color-mix(in srgb, var(--me-danger) 14%, transparent)}.equation-row.active.has-units-issue[data-v-1c2a07cd]{box-shadow:0 0 0 3px color-mix(in srgb, var(--me-warn) 16%, transparent)}.equation-label[data-v-1c2a07cd]{min-width:2.1rem;color:var(--me-muted);font-variant-numeric:tabular-nums;border-right:1px solid var(--me-border);-webkit-user-select:none;user-select:none;border-radius:calc(.65rem - 1px) 0 0 calc(.65rem - 1px);flex-direction:column;justify-content:center;align-items:center;gap:.1rem;padding:0 .35rem;font-size:.75rem;display:flex}.equation-label[draggable=true][data-v-1c2a07cd]{cursor:grab}.equation-label[draggable=true][data-v-1c2a07cd]:hover{background:var(--me-subtle)}.line-problem[data-v-1c2a07cd]{color:var(--me-danger);font-size:.7rem}.line-problem.pi-exclamation-triangle[data-v-1c2a07cd]{color:var(--me-warn)}.equation-row.line-selected[data-v-1c2a07cd]{background:color-mix(in srgb, var(--me-accent) 6%, var(--me-surface))}.equation-row.line-selected .equation-label[data-v-1c2a07cd]{background:color-mix(in srgb, var(--me-accent) 16%, var(--me-surface));color:var(--me-accent)}.equation-row.dragging[data-v-1c2a07cd]{opacity:.5}.equation-row.drop-before[data-v-1c2a07cd]:before,.equation-row.drop-after[data-v-1c2a07cd]:after{content:"";background:var(--me-accent);pointer-events:none;border-radius:1px;height:2px;position:absolute;left:0;right:0}.equation-row.drop-before[data-v-1c2a07cd]:before{top:calc(-.3rem - 2px)}.equation-row.drop-after[data-v-1c2a07cd]:after{bottom:calc(-.3rem - 2px)}.equation-field[data-v-1c2a07cd]{flex:1;min-width:0}.equation-field.focused[data-v-1c2a07cd]{box-shadow:none}.status-bar[data-v-1c2a07cd]{white-space:nowrap;border-radius:.45rem;align-items:center;gap:.5rem;height:1.75rem;margin-top:.5rem;padding:0 .6rem;font-size:.8rem;display:flex;overflow:hidden}.status-text[data-v-1c2a07cd]{text-overflow:ellipsis;min-width:0;overflow:hidden}.status-more[data-v-1c2a07cd]{opacity:.75;flex:none}.status-error[data-v-1c2a07cd],.status-units[data-v-1c2a07cd]{cursor:pointer}.status-error[data-v-1c2a07cd]{background:color-mix(in srgb, var(--me-danger) 12%, var(--me-surface));color:color-mix(in srgb, var(--me-danger) 55%, var(--me-text))}.status-units[data-v-1c2a07cd]{background:color-mix(in srgb, var(--me-caution) 14%, var(--me-surface));color:color-mix(in srgb, var(--me-caution) 55%, var(--me-text))}.status-info[data-v-1c2a07cd]{background:color-mix(in srgb, var(--me-accent) 8%, var(--me-surface));color:color-mix(in srgb, var(--me-accent) 45%, var(--me-text))}.command-list[data-v-1c2a07cd]{z-index:1300;border:1px solid var(--me-border);background:var(--me-surface);width:max-content;min-width:17.5rem;max-width:20rem;color:var(--me-text);border-radius:.55rem;flex-direction:column;gap:.35rem;padding:.4rem;font-size:.8rem;display:flex;position:fixed;box-shadow:0 6px 24px #0f172a24}.command-list .command-chip[data-v-1c2a07cd]{align-self:flex-start}.command-options[data-v-1c2a07cd]{grid-template-columns:minmax(2.4rem,max-content) max-content minmax(0,1fr);column-gap:.5rem;margin:0;padding:0;list-style:none;display:grid}.command-option[data-v-1c2a07cd]{grid-column:1/-1;grid-template-columns:subgrid;cursor:pointer;border-radius:.35rem;align-items:center;min-height:1.9rem;padding:.1rem .4rem;display:grid}.command-option[data-v-1c2a07cd]:hover{background:var(--me-subtle)}.command-option.highlighted[data-v-1c2a07cd]{background:color-mix(in srgb, var(--me-accent) 12%, var(--me-surface))}.command-preview[data-v-1c2a07cd]{text-align:center;font-size:.85rem}.command-name[data-v-1c2a07cd]{white-space:nowrap;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,Liberation Mono,monospace}.command-title[data-v-1c2a07cd]{color:var(--me-muted);justify-self:end;font-size:.72rem}.command-hint[data-v-1c2a07cd]{border-top:1px solid var(--me-border);color:var(--me-muted);white-space:nowrap;margin:0;padding:.3rem .4rem 0;font-size:.7rem}.command-hint kbd[data-v-1c2a07cd]{border:1px solid var(--me-border-strong);background:var(--me-subtle);border-radius:.25rem;padding:0 .25rem;font-family:inherit;font-size:.65rem}.command-chip[data-v-1c2a07cd]{background:var(--me-code-bg);height:1.6rem;color:var(--me-code-text);border-radius:.45rem;align-items:center;padding:0 .6rem;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,Liberation Mono,monospace;font-size:.9rem;display:inline-flex}.command-slash[data-v-1c2a07cd]{color:var(--me-units)}.command-caret[data-v-1c2a07cd]{background:var(--me-code-text);width:2px;height:1em;margin-left:2px;animation:1s step-end infinite chip-blink-1c2a07cd}@keyframes chip-blink-1c2a07cd{50%{opacity:0}}.focus-meta[data-v-1c2a07cd]{color:var(--me-muted);margin:.75rem 0 0;font-size:.8rem}.output-actions[data-v-1c2a07cd]{justify-content:flex-end;margin-bottom:.25rem;display:flex}.tab-tag[data-v-1c2a07cd]{margin-left:.4rem;padding:.05rem .35rem;font-size:.7rem}.key-help[data-v-1c2a07cd]{margin-top:.75rem}.key-help summary[data-v-1c2a07cd]{cursor:pointer;width:fit-content;color:var(--me-muted);font-size:.85rem}.key-hint[data-v-1c2a07cd]{color:var(--me-muted);margin:.5rem 0 0;font-size:.8rem;line-height:1.5}.key-hint kbd[data-v-1c2a07cd]{border:1px solid var(--me-border-strong);background:var(--me-subtle);border-bottom-width:2px;border-radius:.3rem;margin:0 .08rem;padding:0 .3rem;font-family:inherit;font-size:.72rem;display:inline-block}.key-hint code[data-v-1c2a07cd]{background:var(--me-subtle);border-radius:.25rem;padding:.05rem .3rem}.output-card pre[data-v-1c2a07cd]{background:var(--me-code-bg);max-height:28rem;color:var(--me-code-text);border-radius:.55rem;margin:0;padding:.85rem;font-size:.83rem;line-height:1.35;overflow:auto}@container (width<=900px){.editor-grid[data-v-1c2a07cd],.editor-grid.has-side[data-v-1c2a07cd],.editor-grid.no-outputs.has-side[data-v-1c2a07cd]{grid-template-rows:none;grid-template-columns:minmax(0,1fr);grid-template-areas:"editor""side""outputs"}.side-column[data-v-1c2a07cd]{position:static}}.units-form[data-v-effe158e]{background:#f8fbff;border:1px solid #bfdbfe;border-radius:.5rem;margin-top:.5rem;padding:.6rem}.form-name[data-v-effe158e]{color:#334155;align-items:center;gap:.5rem;font-size:.85rem;display:flex}.form-name input[data-v-effe158e]{flex:1}input[data-v-effe158e],select[data-v-effe158e]{font:inherit;background:#fff;border:1px solid #cbd5e1;border-radius:.3rem;min-width:0;padding:.2rem .35rem;font-size:.85rem}input[data-v-effe158e]:focus,select[data-v-effe158e]:focus{outline-offset:0;border-color:#60a5fa;outline:2px solid #93c5fd}.form-parts[data-v-effe158e]{border-collapse:collapse;width:100%;margin-top:.5rem}.form-parts th[data-v-effe158e]{color:#64748b;text-align:left;padding:0 .25rem .15rem 0;font-size:.72rem;font-weight:600}.form-parts td[data-v-effe158e]{padding:.1rem .25rem .1rem 0}.form-parts td input[data-v-effe158e],.form-parts td select[data-v-effe158e]{width:100%}.form-parts .number[data-v-effe158e]{width:4.5rem}.form-problems[data-v-effe158e]{color:#b91c1c;margin:.4rem 0 0;padding-left:1.1rem;font-size:.82rem}.form-actions[data-v-effe158e]{align-items:center;gap:.25rem;margin-top:.4rem;display:flex}.spacer[data-v-effe158e]{flex:1}.visually-hidden[data-v-effe158e]{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.units-title[data-v-ada663af]{justify-content:space-between;align-items:center;gap:.75rem;display:flex}.units-section+.units-section[data-v-ada663af]{margin-top:1.25rem}.section-head[data-v-ada663af]{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.5rem;display:flex}.section-head h3[data-v-ada663af]{color:#0f172a;margin:0;font-size:.95rem;font-weight:600}.section-actions[data-v-ada663af]{align-items:center;gap:.25rem;display:flex}.hint[data-v-ada663af]{color:#64748b;margin:.4rem 0 0;font-size:.875rem}.files[data-v-ada663af]{gap:.5rem;margin:.5rem 0 0;padding:0;list-style:none;display:grid}.files>li[data-v-ada663af]{background:#fff;border:1px solid #e2e8f0;border-radius:.5rem;padding:.4rem .6rem}.file-head[data-v-ada663af]{align-items:center;gap:.5rem;display:flex}.file-name[data-v-ada663af]{color:#0f172a;overflow-wrap:anywhere;font-weight:600}.file-count[data-v-ada663af]{color:#64748b;flex:1;font-size:.8rem}.units-names[data-v-ada663af]{flex-wrap:wrap;gap:.25rem;margin-top:.25rem;display:flex}.units-names code[data-v-ada663af]{color:#334155;background:#f1f5f9;border-radius:.25rem;padding:.05rem .35rem;font-size:.78rem}.problems[data-v-ada663af]{color:#92400e;margin:.4rem 0 .1rem;padding-left:1.1rem;font-size:.82rem}.new-units[data-v-ada663af]{gap:.25rem;margin:.5rem 0 0;padding:0;list-style:none;display:grid}.new-units-row[data-v-ada663af]{align-items:center;gap:.4rem;display:flex}.new-units-name[data-v-ada663af]{color:#1d4ed8;background:#eff6ff;border-radius:.25rem;padding:.05rem .35rem;font-size:.85rem}.new-units-definition[data-v-ada663af]{color:#334155;overflow-wrap:anywhere;flex:1;font-size:.85rem}.missing-count[data-v-ada663af]{color:#b45309;font-size:.82rem}.variables[data-v-ada663af]{border-collapse:collapse;width:100%;margin-top:.5rem}.variables th[data-v-ada663af],.variables td[data-v-ada663af]{text-align:left;vertical-align:middle;padding:.2rem .5rem .2rem 0}.variables th[data-v-ada663af]{width:1%;padding-right:1rem}.variables td[data-v-ada663af]:nth-child(2){width:16rem}.variable-name[data-v-ada663af]{white-space:nowrap;color:#0f172a;font-family:KaTeX_Math,Times New Roman,serif;font-size:1.05rem;font-style:italic;font-weight:400}.units-input[data-v-ada663af]{width:100%;min-width:8rem;max-width:16rem;font:inherit;background:#fff;border:1px solid #cbd5e1;border-radius:.375rem;padding:.25rem .45rem;font-size:.9rem}.units-input[data-v-ada663af]:focus{outline-offset:0;border-color:#60a5fa;outline:2px solid #93c5fd}.state-missing .units-input[data-v-ada663af],.state-unknown .units-input[data-v-ada663af]{background:#fffbeb;border-color:#f59e0b}.variable-state[data-v-ada663af]{white-space:nowrap;color:#b45309;font-size:.8rem}.unused .variable-name[data-v-ada663af],.unused .variable-state[data-v-ada663af]{color:#94a3b8}
|
|
2
2
|
/*$vite$:1*/
|
|
@@ -7,6 +7,7 @@ type __VLS_Props = {
|
|
|
7
7
|
greekNames?: boolean;
|
|
8
8
|
typesetNames?: boolean;
|
|
9
9
|
outputs?: boolean;
|
|
10
|
+
copy?: boolean;
|
|
10
11
|
history?: boolean;
|
|
11
12
|
validate?: 'input' | 'commit';
|
|
12
13
|
readonly?: boolean;
|
|
@@ -29,6 +30,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
|
29
30
|
"onEquations-change"?: ((lines: EquationLine[], info: EquationsChangeInfo) => any) | undefined;
|
|
30
31
|
"onLine-commit"?: ((line: EquationLine, info: LineCommitInfo) => any) | undefined;
|
|
31
32
|
}>, {
|
|
33
|
+
copy: boolean;
|
|
32
34
|
autofocus: boolean;
|
|
33
35
|
readonly: boolean;
|
|
34
36
|
history: boolean;
|
package/dist/vue3-math-editor.js
CHANGED
|
@@ -4467,6 +4467,10 @@ var ka = [
|
|
|
4467
4467
|
type: Boolean,
|
|
4468
4468
|
default: !0
|
|
4469
4469
|
},
|
|
4470
|
+
copy: {
|
|
4471
|
+
type: Boolean,
|
|
4472
|
+
default: void 0
|
|
4473
|
+
},
|
|
4470
4474
|
history: {
|
|
4471
4475
|
type: Boolean,
|
|
4472
4476
|
default: !0
|
|
@@ -4552,7 +4556,7 @@ var ka = [
|
|
|
4552
4556
|
cursor: Zn(e),
|
|
4553
4557
|
anchor: null
|
|
4554
4558
|
}, !0));
|
|
4555
|
-
C.value = n.length ? n : [xr()], O.value = C.value.map(() => T()), j.value = 0, ct(), A.value = new Map(O.value.flatMap((e, n) => t[n]?.length ? [[e, t[n]]] : [])), k.value = new Map(
|
|
4559
|
+
C.value = n.length ? n : [xr()], O.value = C.value.map(() => T()), j.value = 0, ct(), A.value = new Map(O.value.flatMap((e, n) => t[n]?.length ? [[e, t[n]]] : [])), k.value = new Map(en.value.map((e) => [e.id, e.mathml]));
|
|
4556
4560
|
}
|
|
4557
4561
|
let Pe = v(null);
|
|
4558
4562
|
function Fe(e, t) {
|
|
@@ -4561,14 +4565,14 @@ var ka = [
|
|
|
4561
4565
|
if (n === 1) Ae(e, Br(t.equations[0])(C.value[e]), bi), t.problems.length && A.value.set(O.value[e], t.problems);
|
|
4562
4566
|
else if (n > 1) {
|
|
4563
4567
|
Ce(e), Ne(t.equations, t.lineProblems);
|
|
4564
|
-
for (let e of
|
|
4568
|
+
for (let e of en.value) x("line-commit", e, { reason: "paste" });
|
|
4565
4569
|
F();
|
|
4566
4570
|
}
|
|
4567
4571
|
Pe.value = n > 1 ? `Imported ${n} equations from Content MathML, replacing the lines there were.` : n === 0 ? t.problems[0] ?? "Nothing was imported." : null;
|
|
4568
4572
|
}
|
|
4569
4573
|
function z(e) {
|
|
4570
4574
|
let t = Ai(e);
|
|
4571
|
-
return t ? (
|
|
4575
|
+
return t ? (nn = "load", Ne(t.equations, t.lineProblems), M.value = null, Pe.value = null, I.clear(), xe.value++, t) : {
|
|
4572
4576
|
equations: [],
|
|
4573
4577
|
problems: ["The MathML isn't well-formed XML, so nothing was loaded"],
|
|
4574
4578
|
lineProblems: []
|
|
@@ -4582,7 +4586,7 @@ var ka = [
|
|
|
4582
4586
|
function Be() {
|
|
4583
4587
|
if (ze = 0, !Ie.value || !Le.value) return;
|
|
4584
4588
|
let e = Le.value.getBoundingClientRect().top - Ie.value.getBoundingClientRect().top;
|
|
4585
|
-
Re.value = e > .5, M.value !== null &&
|
|
4589
|
+
Re.value = e > .5, M.value !== null && xt();
|
|
4586
4590
|
}
|
|
4587
4591
|
function Ve() {
|
|
4588
4592
|
ze ||= requestAnimationFrame(Be);
|
|
@@ -4591,13 +4595,13 @@ var ka = [
|
|
|
4591
4595
|
if (g.autofocus && F(), document.addEventListener("scroll", Ve, {
|
|
4592
4596
|
capture: !0,
|
|
4593
4597
|
passive: !0
|
|
4594
|
-
}), window.addEventListener("resize", Ve, { passive: !0 }), Be(), typeof ResizeObserver < "u" &&
|
|
4595
|
-
|
|
4596
|
-
for (let e of
|
|
4598
|
+
}), window.addEventListener("resize", Ve, { passive: !0 }), Be(), typeof ResizeObserver < "u" && At.value) {
|
|
4599
|
+
Nt = new ResizeObserver(Pt), Nt.observe(At.value);
|
|
4600
|
+
for (let e of At.value.children) Nt.observe(e);
|
|
4597
4601
|
}
|
|
4598
|
-
|
|
4602
|
+
Pt();
|
|
4599
4603
|
}), ee(() => {
|
|
4600
|
-
document.removeEventListener("scroll", Ve, { capture: !0 }), window.removeEventListener("resize", Ve), ze && cancelAnimationFrame(ze),
|
|
4604
|
+
document.removeEventListener("scroll", Ve, { capture: !0 }), window.removeEventListener("resize", Ve), ze && cancelAnimationFrame(ze), Nt?.disconnect();
|
|
4601
4605
|
});
|
|
4602
4606
|
function He(e) {
|
|
4603
4607
|
if (g.readonly) return;
|
|
@@ -4626,7 +4630,7 @@ var ka = [
|
|
|
4626
4630
|
t && (Ke.value?.contains(t) || t.closest("[data-me-popover]")) || (M.value = null, B(j.value, "blur"));
|
|
4627
4631
|
}
|
|
4628
4632
|
function B(e, t) {
|
|
4629
|
-
let n =
|
|
4633
|
+
let n = en.value[e];
|
|
4630
4634
|
n && (k.value.get(n.id) ?? "") !== n.mathml && (k.value.set(n.id, n.mathml), x("line-commit", n, { reason: t }));
|
|
4631
4635
|
}
|
|
4632
4636
|
function Je() {
|
|
@@ -4694,9 +4698,9 @@ var ka = [
|
|
|
4694
4698
|
function ct() {
|
|
4695
4699
|
it.value.size && (it.value = /* @__PURE__ */ new Set());
|
|
4696
4700
|
}
|
|
4697
|
-
let lt = (e) => e.shiftKey || e.metaKey || e.ctrlKey;
|
|
4698
|
-
function
|
|
4699
|
-
if (!
|
|
4701
|
+
let lt = n(() => g.copy ?? g.outputs), ut = (e) => e.shiftKey || e.metaKey || e.ctrlKey;
|
|
4702
|
+
function dt(e, t) {
|
|
4703
|
+
if (!lt.value || !ut(t)) return;
|
|
4700
4704
|
t.preventDefault();
|
|
4701
4705
|
let n = O.value;
|
|
4702
4706
|
if (t.shiftKey) {
|
|
@@ -4707,33 +4711,33 @@ var ka = [
|
|
|
4707
4711
|
let r = new Set(it.value.size ? it.value : [n[j.value]]);
|
|
4708
4712
|
r.has(n[e]) ? r.delete(n[e]) : r.add(n[e]), it.value = r;
|
|
4709
4713
|
}
|
|
4710
|
-
function
|
|
4711
|
-
e.target?.closest?.("[data-role=\"line-handle\"]") &&
|
|
4714
|
+
function ft(e) {
|
|
4715
|
+
e.target?.closest?.("[data-role=\"line-handle\"]") && ut(e) || ct();
|
|
4712
4716
|
}
|
|
4713
|
-
let
|
|
4714
|
-
function
|
|
4717
|
+
let pt = n(() => [Ye.value && `Drag to reorder (${ke}+↑/↓)`, lt.value && `Shift+click or ${Oe}+click to select lines to copy`].filter(Boolean).join(" · ") || void 0);
|
|
4718
|
+
function mt() {
|
|
4715
4719
|
let e = (M.value ?? "").trim();
|
|
4716
4720
|
M.value = null, e && He(hi(e));
|
|
4717
4721
|
}
|
|
4718
|
-
let
|
|
4722
|
+
let ht = n(() => M.value === null ? [] : yi(M.value)), _t = v(-1);
|
|
4719
4723
|
ce(M, (e) => {
|
|
4720
|
-
|
|
4724
|
+
_t.value = e && ht.value.length ? 0 : -1, e !== null && p(xt);
|
|
4721
4725
|
});
|
|
4722
|
-
function
|
|
4723
|
-
let t =
|
|
4724
|
-
if (!t) return
|
|
4726
|
+
function vt(e) {
|
|
4727
|
+
let t = ht.value[e];
|
|
4728
|
+
if (!t) return mt();
|
|
4725
4729
|
M.value = null, He(hi(t.name));
|
|
4726
4730
|
}
|
|
4727
|
-
function
|
|
4728
|
-
let t =
|
|
4729
|
-
t && (
|
|
4731
|
+
function yt(e) {
|
|
4732
|
+
let t = ht.value.length;
|
|
4733
|
+
t && (_t.value = (_t.value + e + t) % t);
|
|
4730
4734
|
}
|
|
4731
|
-
let
|
|
4732
|
-
function
|
|
4735
|
+
let bt = v({});
|
|
4736
|
+
function xt() {
|
|
4733
4737
|
let e = ye.value[j.value]?.caretRect();
|
|
4734
4738
|
if (!e) return;
|
|
4735
4739
|
let t = Math.max(8, Math.min(e.left - 8, window.innerWidth - 336));
|
|
4736
|
-
|
|
4740
|
+
bt.value = e.bottom < window.innerHeight * .6 ? {
|
|
4737
4741
|
left: `${t}px`,
|
|
4738
4742
|
top: `${e.bottom + 6}px`
|
|
4739
4743
|
} : {
|
|
@@ -4741,20 +4745,20 @@ var ka = [
|
|
|
4741
4745
|
bottom: `${window.innerHeight - e.top + 6}px`
|
|
4742
4746
|
};
|
|
4743
4747
|
}
|
|
4744
|
-
function
|
|
4748
|
+
function St(e) {
|
|
4745
4749
|
if (/^[a-zA-Z0-9]$/.test(e.key)) M.value += e.key;
|
|
4746
4750
|
else if (e.key === "Backspace") M.value = M.value ? M.value.slice(0, -1) : null;
|
|
4747
|
-
else if (e.key === "ArrowDown" || e.key === "ArrowUp")
|
|
4748
|
-
else if (e.key === "Enter" || e.key === "Tab") _t
|
|
4749
|
-
else if (e.key === " " || e.key === "(")
|
|
4751
|
+
else if (e.key === "ArrowDown" || e.key === "ArrowUp") yt(e.key === "ArrowDown" ? 1 : -1);
|
|
4752
|
+
else if (e.key === "Enter" || e.key === "Tab") vt(_t.value);
|
|
4753
|
+
else if (e.key === " " || e.key === "(") mt();
|
|
4750
4754
|
else if (e.key === "Escape") M.value = null;
|
|
4751
4755
|
else return;
|
|
4752
4756
|
e.preventDefault(), e.stopPropagation();
|
|
4753
4757
|
}
|
|
4754
|
-
function
|
|
4758
|
+
function Ct(e) {
|
|
4755
4759
|
if (!e.target?.closest?.("[data-role=\"side\"]")) {
|
|
4756
4760
|
if (M.value !== null) {
|
|
4757
|
-
|
|
4761
|
+
St(e);
|
|
4758
4762
|
return;
|
|
4759
4763
|
}
|
|
4760
4764
|
if (e.key === "Escape" && ot.value) {
|
|
@@ -4772,7 +4776,7 @@ var ka = [
|
|
|
4772
4776
|
e.key === "\\" && !e.altKey && !g.readonly && (e.preventDefault(), e.stopPropagation(), M.value = "");
|
|
4773
4777
|
}
|
|
4774
4778
|
}
|
|
4775
|
-
function
|
|
4779
|
+
function wt(e) {
|
|
4776
4780
|
if (!e.defaultPrevented) {
|
|
4777
4781
|
if (e.altKey && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
|
|
4778
4782
|
e.preventDefault(), Xe(j.value, j.value + (e.key === "ArrowUp" ? -1 : 1));
|
|
@@ -4794,36 +4798,36 @@ var ka = [
|
|
|
4794
4798
|
}
|
|
4795
4799
|
}
|
|
4796
4800
|
}
|
|
4797
|
-
let
|
|
4798
|
-
function
|
|
4801
|
+
let Tt = v(null), Et = v(null);
|
|
4802
|
+
function Dt(e, t) {
|
|
4799
4803
|
if (e.command) {
|
|
4800
4804
|
He(e.command);
|
|
4801
4805
|
return;
|
|
4802
4806
|
}
|
|
4803
|
-
|
|
4804
|
-
}
|
|
4805
|
-
function Dt(e) {
|
|
4806
|
-
wt.value?.hide(), He(e);
|
|
4807
|
+
Et.value?.id !== e.id && Tt.value?.hide(), Et.value = e, p(() => Tt.value?.toggle(t));
|
|
4807
4808
|
}
|
|
4808
4809
|
function Ot(e) {
|
|
4810
|
+
Tt.value?.hide(), He(e);
|
|
4811
|
+
}
|
|
4812
|
+
function kt(e) {
|
|
4809
4813
|
return le.renderToString(e, {
|
|
4810
4814
|
throwOnError: !1,
|
|
4811
4815
|
strict: "ignore"
|
|
4812
4816
|
});
|
|
4813
4817
|
}
|
|
4814
|
-
let
|
|
4815
|
-
function
|
|
4816
|
-
let e =
|
|
4818
|
+
let At = v(null), jt = v(null), Mt = v(ja.length), Nt = null;
|
|
4819
|
+
function Pt() {
|
|
4820
|
+
let e = At.value, t = jt.value;
|
|
4817
4821
|
if (!e || !t) return;
|
|
4818
4822
|
let n = (e) => e.getBoundingClientRect().width, r = n(e) + .5, i = parseFloat(getComputedStyle(e).columnGap) || 0, a = [...e.querySelectorAll("[data-tool]")].map(n), o = (e, o) => {
|
|
4819
4823
|
let s = [...a.slice(0, e), ...o ? [n(t)] : []];
|
|
4820
4824
|
return s.reduce((e, t) => e + t, 0) + i * Math.max(0, s.length - 1) <= r;
|
|
4821
4825
|
}, s = a.length;
|
|
4822
4826
|
if (!o(s, !1)) for (s--; s > 0 && !o(s, !0);) s--;
|
|
4823
|
-
|
|
4827
|
+
Mt.value = s;
|
|
4824
4828
|
}
|
|
4825
|
-
let
|
|
4826
|
-
let e = ja.slice(
|
|
4829
|
+
let Ft = n(() => {
|
|
4830
|
+
let e = ja.slice(Mt.value);
|
|
4827
4831
|
if (!e.length) return null;
|
|
4828
4832
|
let t = [];
|
|
4829
4833
|
for (let n of e) if (n.command) {
|
|
@@ -4843,50 +4847,50 @@ var ka = [
|
|
|
4843
4847
|
latex: "",
|
|
4844
4848
|
sections: t
|
|
4845
4849
|
};
|
|
4846
|
-
}),
|
|
4847
|
-
function
|
|
4850
|
+
}), It = /* @__PURE__ */ new WeakMap();
|
|
4851
|
+
function H(e) {
|
|
4848
4852
|
if (e.length === 0) return null;
|
|
4849
|
-
let t =
|
|
4850
|
-
return t || (t = ea(e),
|
|
4853
|
+
let t = It.get(e);
|
|
4854
|
+
return t || (t = ea(e), It.set(e, t)), t;
|
|
4851
4855
|
}
|
|
4852
|
-
let
|
|
4853
|
-
function
|
|
4854
|
-
let n =
|
|
4856
|
+
let Lt = n(() => C.value.map((e) => H(e.root))), Rt = n(() => Lt.value[j.value] ?? null);
|
|
4857
|
+
function zt(e, t) {
|
|
4858
|
+
let n = Lt.value[t]?.ast;
|
|
4855
4859
|
return !g.cellml || !n || n.type === "Equal" ? null : {
|
|
4856
4860
|
message: yo,
|
|
4857
4861
|
atomIds: e.map((e) => e.id),
|
|
4858
4862
|
incomplete: !0
|
|
4859
4863
|
};
|
|
4860
4864
|
}
|
|
4861
|
-
let
|
|
4865
|
+
let Bt = $i(() => g.issues), Vt = $i(() => g.variableUnits ?? null), Ht = n(() => {
|
|
4862
4866
|
let e = /* @__PURE__ */ new Map();
|
|
4863
|
-
for (let t of
|
|
4867
|
+
for (let t of Bt.value) e.set(t.lineId, [...e.get(t.lineId) ?? [], t]);
|
|
4864
4868
|
return e;
|
|
4865
|
-
}),
|
|
4866
|
-
let n = e.root, r =
|
|
4869
|
+
}), Ut = n(() => (Ht.value, Vt.value, g.cellml, /* @__PURE__ */ new WeakMap())), Wt = n(() => C.value.map((e, t) => {
|
|
4870
|
+
let n = e.root, r = Ut.value.get(n);
|
|
4867
4871
|
if (!r) {
|
|
4868
|
-
let e =
|
|
4869
|
-
...
|
|
4872
|
+
let e = zt(n, t), i = [
|
|
4873
|
+
...Lt.value[t]?.diagnostics ?? [],
|
|
4870
4874
|
...e ? [e] : [],
|
|
4871
|
-
...Ea(n,
|
|
4872
|
-
], a = Da(n,
|
|
4875
|
+
...Ea(n, Ht.value.get(O.value[t]) ?? [])
|
|
4876
|
+
], a = Da(n, Vt.value);
|
|
4873
4877
|
r = {
|
|
4874
4878
|
all: [...i, ...a],
|
|
4875
4879
|
complete: [...i.filter((e) => !e.incomplete), ...a],
|
|
4876
4880
|
hints: a
|
|
4877
|
-
},
|
|
4881
|
+
}, Ut.value.set(n, r);
|
|
4878
4882
|
}
|
|
4879
4883
|
return r;
|
|
4880
4884
|
}));
|
|
4881
|
-
function
|
|
4885
|
+
function Gt(e) {
|
|
4882
4886
|
if (g.validate === "commit") {
|
|
4883
|
-
let t =
|
|
4887
|
+
let t = en.value[e];
|
|
4884
4888
|
return (k.value.get(t.id) ?? "") === t.mathml ? "all" : "hints";
|
|
4885
4889
|
}
|
|
4886
4890
|
return e === j.value ? "complete" : "all";
|
|
4887
4891
|
}
|
|
4888
|
-
let
|
|
4889
|
-
let n = [...(
|
|
4892
|
+
let Kt = n(() => Wt.value.map((e, t) => e[Gt(t)])), qt = n(() => Kt.value.map((e, t) => {
|
|
4893
|
+
let n = [...(Gt(t) === "hints" ? [] : A.value.get(O.value[t]) ?? []).map((e) => ({
|
|
4890
4894
|
line: t,
|
|
4891
4895
|
message: e,
|
|
4892
4896
|
kind: "error"
|
|
@@ -4896,11 +4900,11 @@ var ka = [
|
|
|
4896
4900
|
kind: Gi(e) === "units" ? "units" : "error"
|
|
4897
4901
|
}))];
|
|
4898
4902
|
return n.filter((e, t) => n.findIndex((t) => t.message === e.message) === t);
|
|
4899
|
-
})),
|
|
4900
|
-
let t =
|
|
4903
|
+
})), Jt = (e) => {
|
|
4904
|
+
let t = qt.value[e];
|
|
4901
4905
|
return t.length ? t.some((e) => e.kind === "error") ? "has-error" : "has-units-issue" : null;
|
|
4902
|
-
},
|
|
4903
|
-
let e =
|
|
4906
|
+
}, Yt = n(() => {
|
|
4907
|
+
let e = qt.value.flat(), t = qt.value[j.value][0] ?? e[0];
|
|
4904
4908
|
return t ? {
|
|
4905
4909
|
kind: t.kind,
|
|
4906
4910
|
text: `Line ${t.line + 1}: ${t.message}`,
|
|
@@ -4910,30 +4914,30 @@ var ka = [
|
|
|
4910
4914
|
kind: "info",
|
|
4911
4915
|
text: Pe.value
|
|
4912
4916
|
} : null;
|
|
4913
|
-
}),
|
|
4914
|
-
function
|
|
4915
|
-
let e =
|
|
4917
|
+
}), Xt = n(() => qt.value.flat().map((e) => `Line ${e.line + 1}: ${e.message}`).join("\n")), Zt = (e) => qt.value[e].map((e) => e.message).join("\n");
|
|
4918
|
+
function Qt() {
|
|
4919
|
+
let e = Yt.value?.line;
|
|
4916
4920
|
e !== void 0 && We(e);
|
|
4917
4921
|
}
|
|
4918
|
-
let
|
|
4919
|
-
let n = O.value[t], r =
|
|
4922
|
+
let $t = n(() => (A.value.size, g.cellml, /* @__PURE__ */ new WeakMap())), en = n(() => C.value.map((e, t) => {
|
|
4923
|
+
let n = O.value[t], r = $t.value.get(e.root);
|
|
4920
4924
|
if (!r || r.id !== n) {
|
|
4921
|
-
let i = (A.value.get(n)?.length ?? 0) + +!!
|
|
4922
|
-
r = Ca(n, e.root,
|
|
4925
|
+
let i = (A.value.get(n)?.length ?? 0) + +!!zt(e.root, t);
|
|
4926
|
+
r = Ca(n, e.root, Lt.value[t], i), $t.value.set(e.root, r);
|
|
4923
4927
|
}
|
|
4924
4928
|
return r;
|
|
4925
|
-
})),
|
|
4926
|
-
ce(
|
|
4927
|
-
let t =
|
|
4928
|
-
|
|
4929
|
+
})), tn = "", nn = "load";
|
|
4930
|
+
ce(en, (e) => {
|
|
4931
|
+
let t = nn;
|
|
4932
|
+
nn = "edit";
|
|
4929
4933
|
let n = JSON.stringify(e);
|
|
4930
|
-
n !==
|
|
4934
|
+
n !== tn && (tn = n, x("equations-change", e, { source: t }));
|
|
4931
4935
|
}, { immediate: !0 });
|
|
4932
|
-
let
|
|
4936
|
+
let rn = n(() => Rt.value?.ast ?? null), an = n(() => rn.value ? _a(N().root, "latex", ae.value) : ""), on = n(() => rn.value ? da(rn.value) : ""), sn = n(() => rn.value ? ba(N().root, ae.value) : ""), cn = n(() => $n(N().cursor)), ln = n(() => {
|
|
4933
4937
|
let e = G(N());
|
|
4934
4938
|
return e ? fr(e) : null;
|
|
4935
|
-
}),
|
|
4936
|
-
function
|
|
4939
|
+
}), un = v(!1), dn = v("mathml");
|
|
4940
|
+
function fn(e) {
|
|
4937
4941
|
let t = document.createElement("textarea");
|
|
4938
4942
|
t.value = e, t.setAttribute("readonly", "true"), t.style.position = "fixed", t.style.opacity = "0", document.body.appendChild(t), t.select();
|
|
4939
4943
|
try {
|
|
@@ -4944,45 +4948,45 @@ var ka = [
|
|
|
4944
4948
|
document.body.removeChild(t);
|
|
4945
4949
|
}
|
|
4946
4950
|
}
|
|
4947
|
-
async function
|
|
4951
|
+
async function pn(e) {
|
|
4948
4952
|
try {
|
|
4949
4953
|
if (navigator.clipboard?.writeText) {
|
|
4950
4954
|
await navigator.clipboard.writeText(e);
|
|
4951
4955
|
return;
|
|
4952
4956
|
}
|
|
4953
4957
|
} catch {}
|
|
4954
|
-
|
|
4958
|
+
fn(e);
|
|
4955
4959
|
}
|
|
4956
|
-
async function
|
|
4957
|
-
if (
|
|
4958
|
-
|
|
4960
|
+
async function U() {
|
|
4961
|
+
if (on.value) {
|
|
4962
|
+
un.value = !0;
|
|
4959
4963
|
try {
|
|
4960
|
-
await
|
|
4964
|
+
await pn(on.value);
|
|
4961
4965
|
} finally {
|
|
4962
4966
|
window.setTimeout(() => {
|
|
4963
|
-
|
|
4967
|
+
un.value = !1;
|
|
4964
4968
|
}, 1200);
|
|
4965
4969
|
}
|
|
4966
4970
|
}
|
|
4967
4971
|
}
|
|
4968
|
-
let
|
|
4969
|
-
if (
|
|
4972
|
+
let mn = v(null), hn = v(null), gn, _n = n(() => G(N()) !== null), vn = n(() => ot.value ? at.value.some((e) => C.value[e].root.length > 0) : N().root.length > 0), yn = n(() => {
|
|
4973
|
+
if (hn.value) return `Copied ${hn.value}`;
|
|
4970
4974
|
let e = at.value.length;
|
|
4971
|
-
return e > 1 ? `Copy ${e} lines as` : e === 1 ? `Copy line ${at.value[0] + 1} as` :
|
|
4975
|
+
return e > 1 ? `Copy ${e} lines as` : e === 1 ? `Copy line ${at.value[0] + 1} as` : _n.value ? "Copy selection as" : "Copy as";
|
|
4972
4976
|
});
|
|
4973
|
-
async function
|
|
4977
|
+
async function W(e, t) {
|
|
4974
4978
|
let n = ot.value ? at.value.map((e) => C.value[e].root) : [G(N()) ? dr(N()) : N().root];
|
|
4975
|
-
n.some((e) => e.length > 0) && (await
|
|
4979
|
+
n.some((e) => e.length > 0) && (await pn(va(n, e, ae.value)), hn.value = t, window.clearTimeout(gn), gn = window.setTimeout(() => hn.value = null, 1500)), F();
|
|
4976
4980
|
}
|
|
4977
|
-
let
|
|
4981
|
+
let bn = n(() => ma.map(({ format: e, label: t }) => {
|
|
4978
4982
|
let n = e === "mathml" && g.cellml ? `${t} (CellML)` : t;
|
|
4979
4983
|
return {
|
|
4980
4984
|
label: n,
|
|
4981
|
-
command: () =>
|
|
4985
|
+
command: () => W(e, n)
|
|
4982
4986
|
};
|
|
4983
4987
|
}));
|
|
4984
|
-
function
|
|
4985
|
-
|
|
4988
|
+
function xn(e) {
|
|
4989
|
+
mn.value?.toggle(e);
|
|
4986
4990
|
}
|
|
4987
4991
|
return (n, d) => (_(), a("div", Ma, [o("section", {
|
|
4988
4992
|
class: m(["editor-grid", {
|
|
@@ -4990,7 +4994,7 @@ var ka = [
|
|
|
4990
4994
|
"no-outputs": !u.outputs,
|
|
4991
4995
|
readonly: u.readonly
|
|
4992
4996
|
}]),
|
|
4993
|
-
onKeydownCapture:
|
|
4997
|
+
onKeydownCapture: Ct
|
|
4994
4998
|
}, [
|
|
4995
4999
|
o("div", {
|
|
4996
5000
|
ref_key: "panelEl",
|
|
@@ -5006,14 +5010,14 @@ var ka = [
|
|
|
5006
5010
|
}, [
|
|
5007
5011
|
o("div", {
|
|
5008
5012
|
ref_key: "toolsEl",
|
|
5009
|
-
ref:
|
|
5013
|
+
ref: At,
|
|
5010
5014
|
class: "toolbar-group toolbar-tools"
|
|
5011
5015
|
}, [(_(!0), a(e, null, y(S(ja), (e, t) => (_(), a("button", {
|
|
5012
5016
|
key: e.id,
|
|
5013
5017
|
type: "button",
|
|
5014
5018
|
class: m(["tool-button", {
|
|
5015
5019
|
"has-gallery": !!e.sections,
|
|
5016
|
-
overflowed: t >=
|
|
5020
|
+
overflowed: t >= Mt.value
|
|
5017
5021
|
}]),
|
|
5018
5022
|
title: e.title,
|
|
5019
5023
|
"data-role": `toolbar-${e.id}`,
|
|
@@ -5021,19 +5025,19 @@ var ka = [
|
|
|
5021
5025
|
"aria-haspopup": e.sections ? "true" : void 0,
|
|
5022
5026
|
disabled: u.readonly,
|
|
5023
5027
|
onMousedown: d[0] ||= E(() => {}, ["prevent"]),
|
|
5024
|
-
onClick: (t) =>
|
|
5025
|
-
}, [o("span", { innerHTML:
|
|
5028
|
+
onClick: (t) => Dt(e, t)
|
|
5029
|
+
}, [o("span", { innerHTML: kt(e.latex) }, null, 8, Pa), e.sections ? (_(), a("i", Fa)) : i("", !0)], 42, Na))), 128)), o("button", {
|
|
5026
5030
|
ref_key: "moreEl",
|
|
5027
|
-
ref:
|
|
5031
|
+
ref: jt,
|
|
5028
5032
|
type: "button",
|
|
5029
|
-
class: m(["tool-button has-gallery", { overflowed: !
|
|
5033
|
+
class: m(["tool-button has-gallery", { overflowed: !Ft.value }]),
|
|
5030
5034
|
title: "More tools",
|
|
5031
5035
|
"aria-label": "More tools",
|
|
5032
5036
|
"aria-haspopup": "true",
|
|
5033
5037
|
"data-role": "toolbar-more",
|
|
5034
5038
|
disabled: u.readonly,
|
|
5035
5039
|
onMousedown: d[1] ||= E(() => {}, ["prevent"]),
|
|
5036
|
-
onClick: d[2] ||= (e) =>
|
|
5040
|
+
onClick: d[2] ||= (e) => Ft.value && Dt(Ft.value, e)
|
|
5037
5041
|
}, [...d[13] ||= [o("i", {
|
|
5038
5042
|
class: "pi pi-ellipsis-h",
|
|
5039
5043
|
"aria-hidden": "true"
|
|
@@ -5090,34 +5094,34 @@ var ka = [
|
|
|
5090
5094
|
onClick: Te
|
|
5091
5095
|
}, null, 8, ["title", "disabled"])) : i("", !0)
|
|
5092
5096
|
]),
|
|
5093
|
-
|
|
5097
|
+
lt.value ? (_(), a("div", Ra, [l(S(D), {
|
|
5094
5098
|
icon: "pi pi-copy",
|
|
5095
|
-
label:
|
|
5099
|
+
label: yn.value,
|
|
5096
5100
|
size: "small",
|
|
5097
5101
|
text: "",
|
|
5098
5102
|
title: "Copy the selection, the whole equation, or the lines selected (Shift+click their numbers), as LaTeX, MathJSON or Content MathML",
|
|
5099
5103
|
"aria-haspopup": "true",
|
|
5100
5104
|
"aria-controls": "copy-as-menu",
|
|
5101
5105
|
"data-role": "copy-as",
|
|
5102
|
-
disabled: !
|
|
5106
|
+
disabled: !vn.value,
|
|
5103
5107
|
onMousedown: d[8] ||= E(() => {}, ["prevent"]),
|
|
5104
|
-
onClick:
|
|
5108
|
+
onClick: xn
|
|
5105
5109
|
}, null, 8, ["label", "disabled"]), l(S(de), {
|
|
5106
5110
|
id: "copy-as-menu",
|
|
5107
5111
|
ref_key: "copyMenu",
|
|
5108
|
-
ref:
|
|
5109
|
-
model:
|
|
5112
|
+
ref: mn,
|
|
5113
|
+
model: bn.value,
|
|
5110
5114
|
popup: !0
|
|
5111
5115
|
}, null, 8, ["model"])])) : i("", !0)
|
|
5112
5116
|
], 2),
|
|
5113
5117
|
l(S(fe), {
|
|
5114
5118
|
ref_key: "gallery",
|
|
5115
|
-
ref:
|
|
5119
|
+
ref: Tt,
|
|
5116
5120
|
"data-me-popover": "",
|
|
5117
5121
|
"data-role": "gallery",
|
|
5118
5122
|
class: "me-gallery"
|
|
5119
5123
|
}, {
|
|
5120
|
-
default: w(() => [
|
|
5124
|
+
default: w(() => [Et.value ? (_(), a("div", za, [(_(!0), a(e, null, y(Et.value.sections, (t, n) => (_(), a("div", {
|
|
5121
5125
|
key: n,
|
|
5122
5126
|
class: "gallery-section"
|
|
5123
5127
|
}, [t.label ? (_(), a("div", Ba, b(t.label), 1)) : i("", !0), o("div", Va, [(_(!0), a(e, null, y(t.items, (e) => (_(), a("button", {
|
|
@@ -5126,8 +5130,8 @@ var ka = [
|
|
|
5126
5130
|
class: "tool-button",
|
|
5127
5131
|
title: e.title,
|
|
5128
5132
|
onMousedown: d[9] ||= E(() => {}, ["prevent"]),
|
|
5129
|
-
onClick: (t) =>
|
|
5130
|
-
}, [o("span", { innerHTML:
|
|
5133
|
+
onClick: (t) => Ot(e.command)
|
|
5134
|
+
}, [o("span", { innerHTML: kt(e.latex) }, null, 8, Ua)], 40, Ha))), 128))])]))), 128))])) : i("", !0)]),
|
|
5131
5135
|
_: 1
|
|
5132
5136
|
}, 512),
|
|
5133
5137
|
(_(), r(t, { to: "body" }, [M.value === null ? i("", !0) : (_(), a("div", {
|
|
@@ -5135,7 +5139,7 @@ var ka = [
|
|
|
5135
5139
|
class: "command-list",
|
|
5136
5140
|
"data-me-popover": "",
|
|
5137
5141
|
"data-role": "command-list",
|
|
5138
|
-
style: h(
|
|
5142
|
+
style: h(bt.value),
|
|
5139
5143
|
onMousedown: d[10] ||= E(() => {}, ["prevent"])
|
|
5140
5144
|
}, [
|
|
5141
5145
|
o("span", Wa, [
|
|
@@ -5143,23 +5147,23 @@ var ka = [
|
|
|
5143
5147
|
c(b(M.value), 1),
|
|
5144
5148
|
d[15] ||= o("span", { class: "command-caret" }, null, -1)
|
|
5145
5149
|
]),
|
|
5146
|
-
|
|
5150
|
+
ht.value.length ? (_(), a("ul", Ga, [(_(!0), a(e, null, y(ht.value, (e, t) => (_(), a("li", {
|
|
5147
5151
|
key: e.name,
|
|
5148
|
-
class: m(["command-option", { highlighted: t ===
|
|
5152
|
+
class: m(["command-option", { highlighted: t === _t.value }]),
|
|
5149
5153
|
role: "option",
|
|
5150
|
-
"aria-selected": t ===
|
|
5154
|
+
"aria-selected": t === _t.value,
|
|
5151
5155
|
"data-command": e.name,
|
|
5152
|
-
onClick: (e) =>
|
|
5156
|
+
onClick: (e) => vt(t)
|
|
5153
5157
|
}, [
|
|
5154
5158
|
o("span", {
|
|
5155
5159
|
class: "command-preview",
|
|
5156
|
-
innerHTML:
|
|
5160
|
+
innerHTML: kt(e.latex)
|
|
5157
5161
|
}, null, 8, qa),
|
|
5158
5162
|
o("span", Ja, "\\" + b(e.name), 1),
|
|
5159
5163
|
o("span", Ya, b(e.title), 1)
|
|
5160
5164
|
], 10, Ka))), 128))])) : i("", !0),
|
|
5161
5165
|
o("p", Xa, [
|
|
5162
|
-
|
|
5166
|
+
ht.value.length ? (_(), a(e, { key: 0 }, [
|
|
5163
5167
|
d[16] ||= o("kbd", null, "↑", -1),
|
|
5164
5168
|
d[17] ||= o("kbd", null, "↓", -1),
|
|
5165
5169
|
d[18] ||= c(" choose · ", -1),
|
|
@@ -5176,8 +5180,8 @@ var ka = [
|
|
|
5176
5180
|
ref_key: "stackEl",
|
|
5177
5181
|
ref: Ke,
|
|
5178
5182
|
class: "equations-stack",
|
|
5179
|
-
onMousedown:
|
|
5180
|
-
onKeydown:
|
|
5183
|
+
onMousedown: ft,
|
|
5184
|
+
onKeydown: wt,
|
|
5181
5185
|
onFocusout: qe
|
|
5182
5186
|
}, [(_(!0), a(e, null, y(C.value, (e, t) => (_(), a("div", {
|
|
5183
5187
|
key: O.value[t],
|
|
@@ -5187,7 +5191,7 @@ var ka = [
|
|
|
5187
5191
|
dragging: t === V.value,
|
|
5188
5192
|
"line-selected": st(t)
|
|
5189
5193
|
},
|
|
5190
|
-
|
|
5194
|
+
Jt(t),
|
|
5191
5195
|
rt(t)
|
|
5192
5196
|
]]),
|
|
5193
5197
|
"data-line": t,
|
|
@@ -5200,18 +5204,18 @@ var ka = [
|
|
|
5200
5204
|
class: "equation-label",
|
|
5201
5205
|
"data-role": "line-handle",
|
|
5202
5206
|
draggable: Ye.value ? "true" : void 0,
|
|
5203
|
-
title:
|
|
5204
|
-
onMousedown: (e) =>
|
|
5207
|
+
title: pt.value,
|
|
5208
|
+
onMousedown: (e) => dt(t, e),
|
|
5205
5209
|
onDragstart: (e) => $e(t, e),
|
|
5206
5210
|
onDragend: nt
|
|
5207
|
-
}, [o("span", $a, b(t + 1), 1),
|
|
5211
|
+
}, [o("span", $a, b(t + 1), 1), Jt(t) ? (_(), a("i", {
|
|
5208
5212
|
key: 0,
|
|
5209
|
-
class: m(["pi line-problem",
|
|
5213
|
+
class: m(["pi line-problem", Jt(t) === "has-error" ? "pi-exclamation-circle" : "pi-exclamation-triangle"]),
|
|
5210
5214
|
role: "img",
|
|
5211
|
-
"aria-label":
|
|
5212
|
-
title:
|
|
5215
|
+
"aria-label": Zt(t),
|
|
5216
|
+
title: Zt(t),
|
|
5213
5217
|
"data-role": "line-problem",
|
|
5214
|
-
"data-kind":
|
|
5218
|
+
"data-kind": Jt(t) === "has-error" ? "error" : "units"
|
|
5215
5219
|
}, null, 10, eo)) : i("", !0)], 40, Qa), l(Qi, {
|
|
5216
5220
|
ref_for: !0,
|
|
5217
5221
|
ref: (e) => ye.value[t] = e,
|
|
@@ -5222,7 +5226,7 @@ var ka = [
|
|
|
5222
5226
|
active: t === j.value,
|
|
5223
5227
|
readonly: u.readonly,
|
|
5224
5228
|
autofocus: u.autofocus && t === j.value ? !0 : void 0,
|
|
5225
|
-
marks:
|
|
5229
|
+
marks: Kt.value[t],
|
|
5226
5230
|
"greek-names": u.greekNames,
|
|
5227
5231
|
"typeset-names": u.typesetNames,
|
|
5228
5232
|
onNavigate: (e) => Me(t, e),
|
|
@@ -5242,30 +5246,30 @@ var ka = [
|
|
|
5242
5246
|
"onEdit",
|
|
5243
5247
|
"onImport"
|
|
5244
5248
|
])], 42, Za))), 128))], 544),
|
|
5245
|
-
o("div", to, [
|
|
5249
|
+
o("div", to, [Yt.value ? (_(), a("div", {
|
|
5246
5250
|
key: 0,
|
|
5247
|
-
class: m(["status-bar", `status-${
|
|
5251
|
+
class: m(["status-bar", `status-${Yt.value.kind}`]),
|
|
5248
5252
|
"data-role": "status",
|
|
5249
|
-
"data-kind":
|
|
5250
|
-
title:
|
|
5253
|
+
"data-kind": Yt.value.kind,
|
|
5254
|
+
title: Xt.value || void 0,
|
|
5251
5255
|
onMousedown: d[11] ||= E(() => {}, ["prevent"]),
|
|
5252
|
-
onClick:
|
|
5253
|
-
}, [o("span", ro, b(
|
|
5256
|
+
onClick: Qt
|
|
5257
|
+
}, [o("span", ro, b(Yt.value.text), 1), Yt.value.more ? (_(), a("span", io, "+" + b(Yt.value.more) + " more", 1)) : i("", !0)], 42, no)) : i("", !0)]),
|
|
5254
5258
|
u.debug ? (_(), a("p", ao, [
|
|
5255
5259
|
d[26] ||= c(" Cursor: ", -1),
|
|
5256
|
-
o("span", oo, b(
|
|
5257
|
-
|
|
5260
|
+
o("span", oo, b(cn.value), 1),
|
|
5261
|
+
ln.value ? (_(), a(e, { key: 0 }, [d[25] ||= c(" · Selection: ", -1), o("span", so, b(ln.value), 1)], 64)) : i("", !0)
|
|
5258
5262
|
])) : i("", !0),
|
|
5259
5263
|
o("details", co, [
|
|
5260
5264
|
d[62] ||= o("summary", null, "Keys and typing", -1),
|
|
5261
5265
|
o("p", lo, [
|
|
5262
|
-
d[31] ||= s("<kbd data-v-
|
|
5266
|
+
d[31] ||= s("<kbd data-v-1c2a07cd>←</kbd><kbd data-v-1c2a07cd>→</kbd> move through every position · <kbd data-v-1c2a07cd>↑</kbd><kbd data-v-1c2a07cd>↓</kbd> numerator/denominator, else previous/next line · <kbd data-v-1c2a07cd>Home</kbd><kbd data-v-1c2a07cd>End</kbd> start/end · <kbd data-v-1c2a07cd>Tab</kbd> next empty slot · <kbd data-v-1c2a07cd>Space</kbd> step out of a fraction, exponent or bracket · <kbd data-v-1c2a07cd>Enter</kbd> new line (in a piecewise: new piece; <kbd data-v-1c2a07cd>Backspace</kbd> in an empty piece removes it; <code data-v-1c2a07cd>\\otherwise</code> adds one) · ", 19),
|
|
5263
5267
|
o("kbd", null, b(S(ke)), 1),
|
|
5264
5268
|
d[32] ||= c("+", -1),
|
|
5265
5269
|
d[33] ||= o("kbd", null, "↑", -1),
|
|
5266
5270
|
d[34] ||= o("kbd", null, "↓", -1),
|
|
5267
5271
|
d[35] ||= c(" move the line up/down, or drag it by its number", -1),
|
|
5268
|
-
|
|
5272
|
+
lt.value ? (_(), a(e, { key: 0 }, [
|
|
5269
5273
|
d[27] ||= c(" · ", -1),
|
|
5270
5274
|
d[28] ||= o("kbd", null, "Shift", -1),
|
|
5271
5275
|
d[29] ||= c("+click or ", -1),
|
|
@@ -5286,7 +5290,7 @@ var ka = [
|
|
|
5286
5290
|
d[45] ||= o("kbd", null, "End", -1),
|
|
5287
5291
|
d[46] ||= c(", ", -1),
|
|
5288
5292
|
o("kbd", null, b(S(Oe)), 1),
|
|
5289
|
-
d[47] ||= s("+<kbd data-v-
|
|
5293
|
+
d[47] ||= s("+<kbd data-v-1c2a07cd>A</kbd> or by dragging · <code data-v-1c2a07cd>/</code>, <code data-v-1c2a07cd>^</code>, <code data-v-1c2a07cd>(</code>, <code data-v-1c2a07cd>|</code>, <code data-v-1c2a07cd>\\sqrt</code>, <code data-v-1c2a07cd>\\sin</code>, … or a toolbar button then wraps the selection · typing replaces it · <kbd data-v-1c2a07cd>Esc</kbd> clears it · ", 17),
|
|
5290
5294
|
o("kbd", null, b(S(Oe)), 1),
|
|
5291
5295
|
d[48] ||= c("+", -1),
|
|
5292
5296
|
d[49] ||= o("kbd", null, "C", -1),
|
|
@@ -5298,7 +5302,7 @@ var ka = [
|
|
|
5298
5302
|
d[55] ||= o("code", null, "(x+1)/2", -1),
|
|
5299
5303
|
d[56] ||= c(") ", -1)
|
|
5300
5304
|
]),
|
|
5301
|
-
o("p", fo, [d[61] ||= s(" Type letters, numbers and <code data-v-
|
|
5305
|
+
o("p", fo, [d[61] ||= s(" Type letters, numbers and <code data-v-1c2a07cd>+ − * = ,</code> where the caret is · conditions: <code data-v-1c2a07cd>< > <= >= !=</code>, <code data-v-1c2a07cd>&</code> (∧), <code data-v-1c2a07cd>!</code> (¬), <code data-v-1c2a07cd>\\or</code> (∨) · <code data-v-1c2a07cd>/</code> makes a fraction of what's before the caret · <code data-v-1c2a07cd>^</code> exponent · <code data-v-1c2a07cd>( )</code> and <code data-v-1c2a07cd>| |</code> brackets · <code data-v-1c2a07cd>0.25{mV}</code> a number's units · letters, digits and <code data-v-1c2a07cd>_</code> with no operator between them are one name (<code data-v-1c2a07cd>Vm_init</code>); multiply names with <code data-v-1c2a07cd>*</code> (<code data-v-1c2a07cd>a*b</code>) · a name spelling a function (<code data-v-1c2a07cd>sin</code>, <code data-v-1c2a07cd>cosh</code>, …) is that function · <code data-v-1c2a07cd>\\</code> commands (<code data-v-1c2a07cd>\\frac \\sqrt \\root \\abs \\dd \\cases \\sin \\pi \\e \\inf \\alpha</code> …) · <kbd data-v-1c2a07cd>Backspace</kbd>/<kbd data-v-1c2a07cd>Delete</kbd> delete", 41), g.history ? (_(), a(e, { key: 0 }, [
|
|
5302
5306
|
d[57] ||= c(" · ", -1),
|
|
5303
5307
|
o("kbd", null, b(S(Oe)), 1),
|
|
5304
5308
|
d[58] ||= c("+", -1),
|
|
@@ -5314,8 +5318,8 @@ var ka = [
|
|
|
5314
5318
|
"data-role": "outputs"
|
|
5315
5319
|
}, {
|
|
5316
5320
|
content: w(() => [l(S(_e), {
|
|
5317
|
-
value:
|
|
5318
|
-
"onUpdate:value": d[12] ||= (e) =>
|
|
5321
|
+
value: dn.value,
|
|
5322
|
+
"onUpdate:value": d[12] ||= (e) => dn.value = e
|
|
5319
5323
|
}, {
|
|
5320
5324
|
default: w(() => [l(S(me), null, {
|
|
5321
5325
|
default: w(() => [
|
|
@@ -5358,26 +5362,26 @@ var ka = [
|
|
|
5358
5362
|
}), l(S(ge), null, {
|
|
5359
5363
|
default: w(() => [
|
|
5360
5364
|
l(S(he), { value: "mathml" }, {
|
|
5361
|
-
default: w(() => [o("pre", mo, b(
|
|
5365
|
+
default: w(() => [o("pre", mo, b(sn.value), 1)]),
|
|
5362
5366
|
_: 1
|
|
5363
5367
|
}),
|
|
5364
5368
|
l(S(he), { value: "mathjson" }, {
|
|
5365
5369
|
default: w(() => [o("div", ho, [l(S(D), {
|
|
5366
5370
|
icon: "pi pi-copy",
|
|
5367
|
-
label:
|
|
5371
|
+
label: un.value ? "Copied" : "Copy MathJSON",
|
|
5368
5372
|
size: "small",
|
|
5369
5373
|
text: "",
|
|
5370
|
-
disabled: !
|
|
5371
|
-
onClick:
|
|
5372
|
-
}, null, 8, ["label", "disabled"])]), o("pre", go, b(
|
|
5374
|
+
disabled: !on.value,
|
|
5375
|
+
onClick: U
|
|
5376
|
+
}, null, 8, ["label", "disabled"])]), o("pre", go, b(on.value), 1)]),
|
|
5373
5377
|
_: 1
|
|
5374
5378
|
}),
|
|
5375
5379
|
l(S(he), { value: "latex" }, {
|
|
5376
|
-
default: w(() => [o("pre", _o, b(
|
|
5380
|
+
default: w(() => [o("pre", _o, b(an.value), 1)]),
|
|
5377
5381
|
_: 1
|
|
5378
5382
|
}),
|
|
5379
5383
|
l(S(he), { value: "ast" }, {
|
|
5380
|
-
default: w(() => [o("pre", vo, b(
|
|
5384
|
+
default: w(() => [o("pre", vo, b(rn.value ? JSON.stringify(rn.value, null, 2) : ""), 1)]),
|
|
5381
5385
|
_: 1
|
|
5382
5386
|
})
|
|
5383
5387
|
]),
|
|
@@ -5389,7 +5393,7 @@ var ka = [
|
|
|
5389
5393
|
})) : i("", !0)
|
|
5390
5394
|
], 34)]));
|
|
5391
5395
|
}
|
|
5392
|
-
}), [["__scopeId", "data-v-
|
|
5396
|
+
}), [["__scopeId", "data-v-1c2a07cd"]]), xo = "new units", So = [
|
|
5393
5397
|
"yotta",
|
|
5394
5398
|
"zetta",
|
|
5395
5399
|
"exa",
|
package/package.json
CHANGED