@modusoperandi/licit 1.0.8 → 1.0.10
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/DocNodeSpec.js +0 -2
- package/DocNodeSpec.js.flow +0 -2
- package/EditorCommands.js +0 -2
- package/EditorCommands.js.flow +0 -2
- package/EditorNodes.js +1 -3
- package/EditorNodes.js.flow +0 -3
- package/bom.xml +789 -608
- package/package.json +2 -4
- package/styles.css +1 -6
- package/ui/DocLayoutEditor.js +0 -10
- package/ui/DocLayoutEditor.js.flow +0 -12
- package/ui/Editor.js +2 -3
- package/ui/Editor.js.flow +1 -3
- package/ui/EditorToolbarConfig.js +1 -3
- package/ui/EditorToolbarConfig.js.flow +0 -2
- package/ui/czi-editor.css +0 -12
- package/MathEditCommand.js +0 -114
- package/MathEditCommand.js.flow +0 -119
- package/MathNodeSpec.js +0 -49
- package/MathNodeSpec.js.flow +0 -46
- package/ui/MathEditor.js +0 -86
- package/ui/MathEditor.js.flow +0 -70
- package/ui/MathInlineEditor.js +0 -121
- package/ui/MathInlineEditor.js.flow +0 -100
- package/ui/MathNodeView.js +0 -215
- package/ui/MathNodeView.js.flow +0 -175
- package/ui/mathquill-editor/MathQuillEditor.js +0 -183
- package/ui/mathquill-editor/MathQuillEditor.js.flow +0 -157
- package/ui/mathquill-editor/MathQuillEditorSymbols.js +0 -416
- package/ui/mathquill-editor/MathQuillEditorSymbols.js.flow +0 -483
- package/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +0 -67
- package/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js.flow +0 -49
- package/ui/mathquill-editor/czi-mathquill-editor-symbols-panel.css +0 -39
- package/ui/mathquill-editor/czi-mathquill-editor.css +0 -50
- package/ui/mathquill-editor/mathquill-import-kludge.js +0 -13
- package/ui/mathquill-editor/mathquill-import-kludge.js.flow +0 -15
- package/ui/renderLaTeXAsHTML.js +0 -51
- package/ui/renderLaTeXAsHTML.js.flow +0 -42
|
@@ -1,483 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
export type MathQuillEditorSymbol = {
|
|
4
|
-
label: string,
|
|
5
|
-
latex: string,
|
|
6
|
-
description: string,
|
|
7
|
-
cmd: string,
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export type SymbolDefination = {
|
|
11
|
-
// The label shown at the command button.
|
|
12
|
-
label: string,
|
|
13
|
-
// The latex to use
|
|
14
|
-
latex: string,
|
|
15
|
-
// The mathquill command to perform.
|
|
16
|
-
// http://docs.mathquill.com/en/latest/Api_Methods/#writelatex_string
|
|
17
|
-
// "write": Write the given LaTeX at the current cursor position. If the
|
|
18
|
-
// cursor does not have focus, writes to last position the cursor occupied
|
|
19
|
-
// in the editable field.
|
|
20
|
-
// "cmd": Enter a LaTeX command at the current cursor position or with the
|
|
21
|
-
// current selection. If the cursor does not have focus, it writes it to
|
|
22
|
-
// last position the cursor occupied in the editable field.
|
|
23
|
-
cmd: 'cmd' | 'write',
|
|
24
|
-
// the description of the command.
|
|
25
|
-
description: string,
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
// It's hard to find a full list of latex symbols that we could use.
|
|
29
|
-
// Here's are some references that might be helpful.
|
|
30
|
-
// https://github.com/mathquill/mathquill/blob/23a0e88c80c79514ffc30ead490bd880306bce2a/src/commands/math/basicSymbols.js
|
|
31
|
-
// http://math.chapman.edu/~jipsen/mathquill/test/MathQuillsymbolsMathJax.html
|
|
32
|
-
// https://inspera.atlassian.net/wiki/spaces/KB/pages/62062830/MathQuill+symbols
|
|
33
|
-
// https://www.rapidtables.com/math/symbols/Basic_Math_Symbols.html
|
|
34
|
-
// https://www.math.uci.edu/~xiangwen/pdf/LaTeX-Math-Symbols.pdf
|
|
35
|
-
|
|
36
|
-
export const ABSOLUTE = {
|
|
37
|
-
label: '|x|',
|
|
38
|
-
latex: '|',
|
|
39
|
-
description: 'Absolute Value',
|
|
40
|
-
cmd: 'cmd',
|
|
41
|
-
};
|
|
42
|
-
export const ANGLE = {
|
|
43
|
-
label: '\\angle',
|
|
44
|
-
latex: '\\angle',
|
|
45
|
-
description: 'Angle',
|
|
46
|
-
cmd: 'write',
|
|
47
|
-
};
|
|
48
|
-
export const APPROX = {
|
|
49
|
-
label: '\\approx',
|
|
50
|
-
latex: '\\approx',
|
|
51
|
-
description: 'Approximation',
|
|
52
|
-
cmd: 'cmd',
|
|
53
|
-
};
|
|
54
|
-
export const ARCCOS = {
|
|
55
|
-
label: '\\arccos',
|
|
56
|
-
latex: '\\arccos',
|
|
57
|
-
description: 'Arc Cos',
|
|
58
|
-
cmd: 'write',
|
|
59
|
-
};
|
|
60
|
-
export const ARCSIN = {
|
|
61
|
-
label: '\\arcsin',
|
|
62
|
-
latex: '\\arcsin',
|
|
63
|
-
description: 'Arc Sin',
|
|
64
|
-
cmd: 'write',
|
|
65
|
-
};
|
|
66
|
-
export const ARCTAN = {
|
|
67
|
-
label: '\\arctan',
|
|
68
|
-
latex: '\\arctan',
|
|
69
|
-
description: 'Arc Tan',
|
|
70
|
-
cmd: 'write',
|
|
71
|
-
};
|
|
72
|
-
export const ARROWLL = {
|
|
73
|
-
label: '\\Longleftarrow',
|
|
74
|
-
latex: '\\Longleftarrow',
|
|
75
|
-
description: 'Long Left Arrow',
|
|
76
|
-
cmd: 'write',
|
|
77
|
-
};
|
|
78
|
-
export const ARROWRL = {
|
|
79
|
-
label: '\\Longrightarrow',
|
|
80
|
-
latex: '\\Longrightarrow',
|
|
81
|
-
description: 'Long Right Arrow',
|
|
82
|
-
cmd: 'write',
|
|
83
|
-
};
|
|
84
|
-
export const ARROWLLR = {
|
|
85
|
-
label: '\\Longleftrightarrow',
|
|
86
|
-
latex: '\\Longleftrightarrow',
|
|
87
|
-
description: 'Long Left Right Arrow',
|
|
88
|
-
cmd: 'write',
|
|
89
|
-
};
|
|
90
|
-
export const BRACKETS = {
|
|
91
|
-
label: '[x]',
|
|
92
|
-
latex: '[',
|
|
93
|
-
description: 'Brackets',
|
|
94
|
-
cmd: 'cmd',
|
|
95
|
-
};
|
|
96
|
-
export const CENT = {
|
|
97
|
-
label: '¢',
|
|
98
|
-
latex: '¢',
|
|
99
|
-
description: 'Cent',
|
|
100
|
-
cmd: 'write',
|
|
101
|
-
};
|
|
102
|
-
export const COS = {
|
|
103
|
-
label: '\\cos',
|
|
104
|
-
latex: '\\cos',
|
|
105
|
-
description: 'Cos',
|
|
106
|
-
cmd: 'write',
|
|
107
|
-
};
|
|
108
|
-
export const CONG = {
|
|
109
|
-
label: '\\cong',
|
|
110
|
-
latex: '\\cong',
|
|
111
|
-
description: 'Congruent To',
|
|
112
|
-
cmd: 'write',
|
|
113
|
-
};
|
|
114
|
-
export const CTIMES = {
|
|
115
|
-
label: '\\otimes',
|
|
116
|
-
latex: '\\otimes',
|
|
117
|
-
description: 'Tensor Product',
|
|
118
|
-
cmd: 'write',
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export const DEGREES = {
|
|
122
|
-
label: '\\deg',
|
|
123
|
-
latex: '\\deg',
|
|
124
|
-
description: 'Degrees',
|
|
125
|
-
cmd: 'write',
|
|
126
|
-
};
|
|
127
|
-
export const DIVIDE = {
|
|
128
|
-
label: '\u00F7',
|
|
129
|
-
latex: '\\divide',
|
|
130
|
-
description: 'Division',
|
|
131
|
-
cmd: 'cmd',
|
|
132
|
-
};
|
|
133
|
-
export const DOLLAR = {
|
|
134
|
-
label: '$',
|
|
135
|
-
latex: '$',
|
|
136
|
-
description: 'Dollar',
|
|
137
|
-
cmd: 'write',
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
export const DOTM = {
|
|
141
|
-
label: '\\cdot',
|
|
142
|
-
latex: '\\cdot',
|
|
143
|
-
description: 'Dot for Multiplication',
|
|
144
|
-
cmd: 'write',
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
export const EQUAL = {
|
|
148
|
-
label: '=',
|
|
149
|
-
latex: '=',
|
|
150
|
-
description: 'Equal',
|
|
151
|
-
cmd: 'cmd',
|
|
152
|
-
};
|
|
153
|
-
export const FRAC = {
|
|
154
|
-
label: '\\frac {x}{y}',
|
|
155
|
-
latex: '\\frac',
|
|
156
|
-
description: 'Fraction',
|
|
157
|
-
cmd: 'cmd',
|
|
158
|
-
};
|
|
159
|
-
export const GT = {
|
|
160
|
-
label: '>',
|
|
161
|
-
latex: '>',
|
|
162
|
-
description: 'Greater Than',
|
|
163
|
-
cmd: 'cmd',
|
|
164
|
-
};
|
|
165
|
-
export const GTE = {
|
|
166
|
-
label: '\\ge',
|
|
167
|
-
latex: '\\ge',
|
|
168
|
-
description: 'Greater Than or Equal To',
|
|
169
|
-
cmd: 'cmd',
|
|
170
|
-
};
|
|
171
|
-
export const IMAGINARY = {
|
|
172
|
-
label: 'i',
|
|
173
|
-
latex: 'i',
|
|
174
|
-
description: 'Imaginary Number',
|
|
175
|
-
cmd: 'write',
|
|
176
|
-
};
|
|
177
|
-
export const INFINITY = {
|
|
178
|
-
label: '\\infty',
|
|
179
|
-
latex: '\\infty',
|
|
180
|
-
description: 'Infinity',
|
|
181
|
-
cmd: 'write',
|
|
182
|
-
};
|
|
183
|
-
export const INT = {
|
|
184
|
-
label: '\\int',
|
|
185
|
-
latex: '\\int',
|
|
186
|
-
description: 'Integral',
|
|
187
|
-
cmd: 'cmd',
|
|
188
|
-
};
|
|
189
|
-
export const INTERSECT = {
|
|
190
|
-
label: '\\cap',
|
|
191
|
-
latex: '\\cap',
|
|
192
|
-
description: 'Intersection',
|
|
193
|
-
cmd: 'write',
|
|
194
|
-
};
|
|
195
|
-
export const INTXY = {
|
|
196
|
-
label: '\\int_{x}^{y}',
|
|
197
|
-
latex: '\\int_{x}^{y}',
|
|
198
|
-
description: 'Integral',
|
|
199
|
-
cmd: 'write',
|
|
200
|
-
};
|
|
201
|
-
export const LOG_E = {
|
|
202
|
-
label: '\\log',
|
|
203
|
-
latex: '\\log',
|
|
204
|
-
description: 'Log',
|
|
205
|
-
cmd: 'cmd',
|
|
206
|
-
};
|
|
207
|
-
export const LT = {
|
|
208
|
-
label: '<',
|
|
209
|
-
latex: '<',
|
|
210
|
-
description: 'Less Than',
|
|
211
|
-
cmd: 'cmd',
|
|
212
|
-
};
|
|
213
|
-
export const LTE = {
|
|
214
|
-
label: '\\le',
|
|
215
|
-
latex: 'le',
|
|
216
|
-
description: 'Less Than or Equal To',
|
|
217
|
-
cmd: 'cmd',
|
|
218
|
-
};
|
|
219
|
-
export const MINUS = {
|
|
220
|
-
label: '-',
|
|
221
|
-
latex: '-',
|
|
222
|
-
description: 'Subtraction',
|
|
223
|
-
cmd: 'cmd',
|
|
224
|
-
};
|
|
225
|
-
|
|
226
|
-
export const NEQ = {
|
|
227
|
-
label: '\\neq',
|
|
228
|
-
latex: '\\neq',
|
|
229
|
-
description: 'Not Equal',
|
|
230
|
-
cmd: 'write',
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
export const OVERLINE = {
|
|
234
|
-
label: '\\overline\u3000',
|
|
235
|
-
latex: '\\overline',
|
|
236
|
-
description: 'Overline',
|
|
237
|
-
cmd: 'cmd',
|
|
238
|
-
};
|
|
239
|
-
export const PARENS = {
|
|
240
|
-
label: '(x)',
|
|
241
|
-
latex: '(',
|
|
242
|
-
description: 'Parentheses',
|
|
243
|
-
cmd: 'cmd',
|
|
244
|
-
};
|
|
245
|
-
export const PERP = {
|
|
246
|
-
label: '\\perp',
|
|
247
|
-
latex: '\\perp',
|
|
248
|
-
description: 'Perpendicular Lines',
|
|
249
|
-
cmd: 'write',
|
|
250
|
-
};
|
|
251
|
-
export const PHI = {
|
|
252
|
-
label: '\\phi',
|
|
253
|
-
latex: '\\phi',
|
|
254
|
-
description: 'Phi',
|
|
255
|
-
cmd: 'write',
|
|
256
|
-
};
|
|
257
|
-
export const PI = {
|
|
258
|
-
label: '\\pi',
|
|
259
|
-
latex: '\\pi',
|
|
260
|
-
description: 'Pi',
|
|
261
|
-
cmd: 'write',
|
|
262
|
-
};
|
|
263
|
-
export const PLUS = {
|
|
264
|
-
label: '+',
|
|
265
|
-
latex: '+',
|
|
266
|
-
description: 'Addition',
|
|
267
|
-
cmd: 'cmd',
|
|
268
|
-
};
|
|
269
|
-
export const PM = {
|
|
270
|
-
label: '\\pm',
|
|
271
|
-
latex: '\\pm',
|
|
272
|
-
description: 'Plus-Minus',
|
|
273
|
-
cmd: 'cmd',
|
|
274
|
-
};
|
|
275
|
-
export const POWER = {
|
|
276
|
-
label: 'x^{y}',
|
|
277
|
-
latex: '^',
|
|
278
|
-
description: 'Power',
|
|
279
|
-
cmd: 'cmd',
|
|
280
|
-
};
|
|
281
|
-
export const SIMEQ = {
|
|
282
|
-
label: '\\simeq',
|
|
283
|
-
latex: '\\simeq',
|
|
284
|
-
description: 'Approximately Equal',
|
|
285
|
-
cmd: 'write',
|
|
286
|
-
};
|
|
287
|
-
export const SIM = {
|
|
288
|
-
label: '\\sim',
|
|
289
|
-
latex: '\\sim',
|
|
290
|
-
description: 'Similarity',
|
|
291
|
-
cmd: 'write',
|
|
292
|
-
};
|
|
293
|
-
export const SIN = {
|
|
294
|
-
label: '\\sin',
|
|
295
|
-
latex: '\\sin',
|
|
296
|
-
description: 'Sin',
|
|
297
|
-
cmd: 'write',
|
|
298
|
-
};
|
|
299
|
-
export const SMALLE = {
|
|
300
|
-
label: '\u212F',
|
|
301
|
-
latex: '\u212F',
|
|
302
|
-
description: 'Script Small E',
|
|
303
|
-
cmd: 'write',
|
|
304
|
-
};
|
|
305
|
-
export const SQR = {
|
|
306
|
-
label: 'x^{2}',
|
|
307
|
-
latex: '^{2}',
|
|
308
|
-
description: 'Square',
|
|
309
|
-
cmd: 'write',
|
|
310
|
-
};
|
|
311
|
-
export const SQRT2 = {
|
|
312
|
-
label: '\\sqrt[x]{y}',
|
|
313
|
-
latex: '\\sqrt[x]{y}',
|
|
314
|
-
description: 'Square Root Alt',
|
|
315
|
-
cmd: 'write',
|
|
316
|
-
};
|
|
317
|
-
export const SQRT = {
|
|
318
|
-
label: '\\sqrt x',
|
|
319
|
-
latex: '\\sqrt',
|
|
320
|
-
description: 'Square Root',
|
|
321
|
-
cmd: 'cmd',
|
|
322
|
-
};
|
|
323
|
-
export const SUBSCRIPT = {
|
|
324
|
-
label: 'x_{2}',
|
|
325
|
-
latex: '_{2}',
|
|
326
|
-
description: 'Subscript',
|
|
327
|
-
cmd: 'write',
|
|
328
|
-
};
|
|
329
|
-
export const SUBSET = {
|
|
330
|
-
label: '\\sub',
|
|
331
|
-
latex: '\\sub',
|
|
332
|
-
description: 'Subset',
|
|
333
|
-
cmd: 'write',
|
|
334
|
-
};
|
|
335
|
-
export const SUBSETEQ = {
|
|
336
|
-
label: '\\sube',
|
|
337
|
-
latex: '\\sube',
|
|
338
|
-
description: 'Subset or Equal',
|
|
339
|
-
cmd: 'write',
|
|
340
|
-
};
|
|
341
|
-
export const SUM = {
|
|
342
|
-
label: '\\sum',
|
|
343
|
-
latex: '\\sum',
|
|
344
|
-
description: 'Summation',
|
|
345
|
-
cmd: 'cmd',
|
|
346
|
-
};
|
|
347
|
-
export const SUPERSET = {
|
|
348
|
-
label: '\\supset',
|
|
349
|
-
latex: '\\supset',
|
|
350
|
-
description: 'Superset',
|
|
351
|
-
cmd: 'write',
|
|
352
|
-
};
|
|
353
|
-
export const SUPERSETEQ = {
|
|
354
|
-
label: '\\supe',
|
|
355
|
-
latex: '\\supe',
|
|
356
|
-
description: 'Superset or Equal',
|
|
357
|
-
cmd: 'write',
|
|
358
|
-
};
|
|
359
|
-
export const TAN = {
|
|
360
|
-
label: '\\tan',
|
|
361
|
-
latex: '\\tan',
|
|
362
|
-
description: 'Tan',
|
|
363
|
-
cmd: 'write',
|
|
364
|
-
};
|
|
365
|
-
export const THETA = {
|
|
366
|
-
label: '\\theta',
|
|
367
|
-
latex: '\\theta',
|
|
368
|
-
description: 'Theta',
|
|
369
|
-
cmd: 'write',
|
|
370
|
-
};
|
|
371
|
-
export const TIMES = {
|
|
372
|
-
label: '\\times',
|
|
373
|
-
latex: '\\times',
|
|
374
|
-
description: 'Multiplication',
|
|
375
|
-
cmd: 'cmd',
|
|
376
|
-
};
|
|
377
|
-
export const TRIANGLE = {
|
|
378
|
-
label: '\\bigtriangleup',
|
|
379
|
-
latex: '\\bigtriangleup',
|
|
380
|
-
description: 'Triangle',
|
|
381
|
-
cmd: 'write',
|
|
382
|
-
};
|
|
383
|
-
export const UNDERLINE = {
|
|
384
|
-
label: '\\underline\u3000',
|
|
385
|
-
latex: '\\underline',
|
|
386
|
-
description: 'Underline',
|
|
387
|
-
cmd: 'cmd',
|
|
388
|
-
};
|
|
389
|
-
export const UNION = {
|
|
390
|
-
label: '\\cup',
|
|
391
|
-
latex: '\\cup',
|
|
392
|
-
description: 'Union',
|
|
393
|
-
cmd: 'write',
|
|
394
|
-
};
|
|
395
|
-
export const VDASH = {
|
|
396
|
-
label: '\\vdash',
|
|
397
|
-
latex: '\\vdash',
|
|
398
|
-
description: 'Vertical and Dash Line',
|
|
399
|
-
cmd: 'write',
|
|
400
|
-
};
|
|
401
|
-
export const VERT = {
|
|
402
|
-
label: '\\vert',
|
|
403
|
-
latex: '\\vert',
|
|
404
|
-
description: 'Vertical Line',
|
|
405
|
-
cmd: 'write',
|
|
406
|
-
};
|
|
407
|
-
export const OPERATORS = {
|
|
408
|
-
title: 'Operators',
|
|
409
|
-
symbols: [
|
|
410
|
-
PLUS,
|
|
411
|
-
MINUS,
|
|
412
|
-
TIMES,
|
|
413
|
-
DOTM,
|
|
414
|
-
DIVIDE,
|
|
415
|
-
EQUAL,
|
|
416
|
-
APPROX,
|
|
417
|
-
SIM,
|
|
418
|
-
SIMEQ,
|
|
419
|
-
CONG,
|
|
420
|
-
NEQ,
|
|
421
|
-
PM,
|
|
422
|
-
LT,
|
|
423
|
-
GT,
|
|
424
|
-
LTE,
|
|
425
|
-
GTE,
|
|
426
|
-
UNION,
|
|
427
|
-
INTERSECT,
|
|
428
|
-
SUBSET,
|
|
429
|
-
SUBSETEQ,
|
|
430
|
-
SUPERSET,
|
|
431
|
-
SUPERSETEQ,
|
|
432
|
-
VERT,
|
|
433
|
-
CTIMES,
|
|
434
|
-
],
|
|
435
|
-
};
|
|
436
|
-
|
|
437
|
-
export const STRUCTURE = {
|
|
438
|
-
title: 'Structure',
|
|
439
|
-
symbols: [
|
|
440
|
-
SUM,
|
|
441
|
-
FRAC,
|
|
442
|
-
PARENS,
|
|
443
|
-
BRACKETS,
|
|
444
|
-
SQR,
|
|
445
|
-
SUBSCRIPT,
|
|
446
|
-
ABSOLUTE,
|
|
447
|
-
INTXY,
|
|
448
|
-
OVERLINE,
|
|
449
|
-
UNDERLINE,
|
|
450
|
-
POWER,
|
|
451
|
-
INT,
|
|
452
|
-
SQRT,
|
|
453
|
-
SQRT2,
|
|
454
|
-
LOG_E,
|
|
455
|
-
],
|
|
456
|
-
};
|
|
457
|
-
|
|
458
|
-
export const SYMBOLS = {
|
|
459
|
-
title: 'Symbols',
|
|
460
|
-
symbols: [
|
|
461
|
-
SMALLE,
|
|
462
|
-
ANGLE,
|
|
463
|
-
PI,
|
|
464
|
-
IMAGINARY,
|
|
465
|
-
DEGREES,
|
|
466
|
-
THETA,
|
|
467
|
-
PHI,
|
|
468
|
-
TRIANGLE,
|
|
469
|
-
INFINITY,
|
|
470
|
-
DOLLAR,
|
|
471
|
-
CENT,
|
|
472
|
-
VDASH,
|
|
473
|
-
PERP,
|
|
474
|
-
ARROWLL,
|
|
475
|
-
ARROWRL,
|
|
476
|
-
ARROWLLR,
|
|
477
|
-
],
|
|
478
|
-
};
|
|
479
|
-
|
|
480
|
-
export const TRIG = {
|
|
481
|
-
title: 'Trigonometry',
|
|
482
|
-
symbols: [SIN, COS, TAN, ARCSIN, ARCCOS, ARCTAN],
|
|
483
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
3
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
4
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
5
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
6
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
7
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
8
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
10
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
11
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
12
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
|
-
import renderLaTeXAsHTML from '../renderLaTeXAsHTML.js';
|
|
16
|
-
import { CustomButton } from '@modusoperandi/licit-ui-commands';
|
|
17
|
-
import * as React from 'react';
|
|
18
|
-
var MathQuillEditorSymbolsPanel = /*#__PURE__*/function (_React$PureComponent) {
|
|
19
|
-
function MathQuillEditorSymbolsPanel() {
|
|
20
|
-
var _this;
|
|
21
|
-
_classCallCheck(this, MathQuillEditorSymbolsPanel);
|
|
22
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23
|
-
args[_key] = arguments[_key];
|
|
24
|
-
}
|
|
25
|
-
_this = _callSuper(this, MathQuillEditorSymbolsPanel, [].concat(args));
|
|
26
|
-
_defineProperty(_this, "props", void 0);
|
|
27
|
-
_defineProperty(_this, "_renderButton", function (symbol) {
|
|
28
|
-
var label = symbol.label,
|
|
29
|
-
latex = symbol.latex,
|
|
30
|
-
description = symbol.description;
|
|
31
|
-
var html = renderLaTeXAsHTML(label);
|
|
32
|
-
var icon = /*#__PURE__*/React.createElement("span", {
|
|
33
|
-
dangerouslySetInnerHTML: {
|
|
34
|
-
__html: html
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
return /*#__PURE__*/React.createElement(CustomButton, {
|
|
38
|
-
className: "czi-mathquill-editor-symbols-panel-button",
|
|
39
|
-
icon: icon,
|
|
40
|
-
key: label + latex,
|
|
41
|
-
onClick: _this.props.onSelect,
|
|
42
|
-
title: description,
|
|
43
|
-
value: symbol
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
return _this;
|
|
47
|
-
}
|
|
48
|
-
_inherits(MathQuillEditorSymbolsPanel, _React$PureComponent);
|
|
49
|
-
return _createClass(MathQuillEditorSymbolsPanel, [{
|
|
50
|
-
key: "render",
|
|
51
|
-
value: function render() {
|
|
52
|
-
var _this$props$symbols = this.props.symbols,
|
|
53
|
-
title = _this$props$symbols.title,
|
|
54
|
-
symbols = _this$props$symbols.symbols;
|
|
55
|
-
var buttons = symbols.map(this._renderButton);
|
|
56
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
57
|
-
className: "czi-mathquill-editor-symbols-panel"
|
|
58
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
59
|
-
className: "czi-mathquill-editor-symbols-panel-title"
|
|
60
|
-
}, title), /*#__PURE__*/React.createElement("div", {
|
|
61
|
-
className: "czi-mathquill-editor-symbols-panel-body"
|
|
62
|
-
}, buttons));
|
|
63
|
-
}
|
|
64
|
-
}]);
|
|
65
|
-
}(React.PureComponent);
|
|
66
|
-
export default MathQuillEditorSymbolsPanel;
|
|
67
|
-
import { bpfrpt_proptype_MathQuillEditorSymbol } from "./MathQuillEditorSymbols.js";
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
import renderLaTeXAsHTML from '../renderLaTeXAsHTML.js';
|
|
4
|
-
import { CustomButton } from '@modusoperandi/licit-ui-commands';
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
|
|
7
|
-
import type {
|
|
8
|
-
MathQuillEditorSymbol
|
|
9
|
-
} from './MathQuillEditorSymbols.js';
|
|
10
|
-
|
|
11
|
-
class MathQuillEditorSymbolsPanel extends React.PureComponent<any, any> {
|
|
12
|
-
props: {
|
|
13
|
-
onSelect: (symbol: MathQuillEditorSymbol) => void,
|
|
14
|
-
symbols: {
|
|
15
|
-
title: string,
|
|
16
|
-
symbols: Array<MathQuillEditorSymbol>,
|
|
17
|
-
},
|
|
18
|
-
title: string,
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
render(): React.Element<any> {
|
|
22
|
-
const { title, symbols } = this.props.symbols;
|
|
23
|
-
const buttons = symbols.map(this._renderButton);
|
|
24
|
-
return (
|
|
25
|
-
<div className="czi-mathquill-editor-symbols-panel">
|
|
26
|
-
<div className="czi-mathquill-editor-symbols-panel-title">{title}</div>
|
|
27
|
-
<div className="czi-mathquill-editor-symbols-panel-body">{buttons}</div>
|
|
28
|
-
</div>
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
_renderButton = (symbol: MathQuillEditorSymbol): React.Element<any> => {
|
|
33
|
-
const { label, latex, description } = symbol;
|
|
34
|
-
const html = renderLaTeXAsHTML(label);
|
|
35
|
-
const icon = <span dangerouslySetInnerHTML={{ __html: html }} />;
|
|
36
|
-
return (
|
|
37
|
-
<CustomButton
|
|
38
|
-
className="czi-mathquill-editor-symbols-panel-button"
|
|
39
|
-
icon={icon}
|
|
40
|
-
key={label + latex}
|
|
41
|
-
onClick={this.props.onSelect}
|
|
42
|
-
title={description}
|
|
43
|
-
value={symbol}
|
|
44
|
-
/>
|
|
45
|
-
);
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export default MathQuillEditorSymbolsPanel;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
.czi-mathquill-editor-symbols-panel {
|
|
2
|
-
margin: 0 0 10px;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.czi-mathquill-editor-symbols-panel-title {
|
|
6
|
-
background: #fafafa;
|
|
7
|
-
box-shadow: 0 1px 0.3px rgba(0, 0, 0, 0.15);
|
|
8
|
-
color: var(--czi-color-grey-200);
|
|
9
|
-
font-weight: bold;
|
|
10
|
-
padding: 10px;
|
|
11
|
-
position: sticky;
|
|
12
|
-
top: 0;
|
|
13
|
-
z-index: 2;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.czi-mathquill-editor-symbols-panel-body {
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: row;
|
|
19
|
-
flex-wrap: wrap;
|
|
20
|
-
overflow: auto;
|
|
21
|
-
padding: 10px;
|
|
22
|
-
position: relative;
|
|
23
|
-
z-index: 1;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.czi-custom-button.czi-mathquill-editor-symbols-panel-button {
|
|
27
|
-
background: #fff;
|
|
28
|
-
border: solid 1px #ccc;
|
|
29
|
-
font-size: 13px;
|
|
30
|
-
margin: 0 4px 4px 0;
|
|
31
|
-
min-width: 36px;
|
|
32
|
-
padding: 6px;
|
|
33
|
-
text-align: center;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.czi-custom-button.czi-mathquill-editor-symbols-panel-button:hover {
|
|
37
|
-
background-color: #f0f0f0;
|
|
38
|
-
border-color: #555;
|
|
39
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
@import '../czi-vars.css';
|
|
2
|
-
|
|
3
|
-
.czi-mathquill-editor {
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: row;
|
|
6
|
-
margin: 0 0 20px 0;
|
|
7
|
-
width: 700px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.czi-mathquill-editor-main {
|
|
11
|
-
padding: 0 10px 0 0;
|
|
12
|
-
width: 400px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.czi-mathquill-editor-side {
|
|
16
|
-
background: #f0f0f0;
|
|
17
|
-
border: var(--czi-border-grey);
|
|
18
|
-
box-sizing: border-box;
|
|
19
|
-
flex: 1;
|
|
20
|
-
height: 400px;
|
|
21
|
-
overflow: auto;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.czi-mathquill-editor-element {
|
|
25
|
-
border: var(--czi-border-grey);
|
|
26
|
-
box-sizing: border-box;
|
|
27
|
-
display: block;
|
|
28
|
-
font-size: 24px;
|
|
29
|
-
height: 400px;
|
|
30
|
-
min-height: 29px;
|
|
31
|
-
overflow: auto;
|
|
32
|
-
padding: 8px;
|
|
33
|
-
position: relative;
|
|
34
|
-
width: 100%;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.czi-mathquill-editor.empty .czi-mathquill-editor-element::before {
|
|
38
|
-
color: var(--czi-placeholder-text-color);
|
|
39
|
-
content: 'Type Something...';
|
|
40
|
-
font-family: var(--czi-content-font-family);
|
|
41
|
-
font-size: var(--czi-content-font-size);
|
|
42
|
-
left: 8px;
|
|
43
|
-
line-height: var(--czi-content-line-height);
|
|
44
|
-
position: absolute;
|
|
45
|
-
top: 8px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.czi-mathquill-editor.empty .czi-mathquill-editor-element.mq-focused::before {
|
|
49
|
-
display: none;
|
|
50
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// Moved these files here because exports-loader is only valid when built
|
|
2
|
-
// using webpack, but this project is being built using babel.
|
|
3
|
-
|
|
4
|
-
// The MathQuill IIFE explicitly looks for jQuery at window.jQuery.
|
|
5
|
-
// This means that
|
|
6
|
-
// A) window must exist (browser env only)
|
|
7
|
-
// B) jQuery is being loaded via <script src=".../jquery">
|
|
8
|
-
//
|
|
9
|
-
import jquery from 'jquery';
|
|
10
|
-
window.jQuery = window.jQuery || jquery;
|
|
11
|
-
import mathquill from 'node-mathquill/build/mathquill.js';
|
|
12
|
-
window.MathQuill = window.MathQuill || mathquill;
|
|
13
|
-
export var MathQuill = window.MathQuill || mathquill;
|