@pie-lib/math-toolbar 2.0.0-beta.3 → 2.0.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,218 @@
1
- import { HorizontalKeypad, mq } from '@pie-lib/math-input';
2
1
  import React from 'react';
3
2
  import debug from 'debug';
4
3
  import PropTypes from 'prop-types';
5
- import cx from 'classnames';
6
- import Button from '@material-ui/core/Button';
7
- import { withStyles } from '@material-ui/core/styles';
8
- const log = debug('@pie-lib:math-toolbar:editor-and-pad');
9
- import { color, InputContainer } from '@pie-lib/render-ui';
10
- import MenuItem from '@material-ui/core/MenuItem';
11
- import Select from '@material-ui/core/Select';
12
- import { updateSpans } from '@pie-lib/math-input';
4
+ import Button from '@mui/material/Button';
5
+ import { styled } from '@mui/material/styles';
6
+ import MenuItem from '@mui/material/MenuItem';
7
+ import Select from '@mui/material/Select';
13
8
  import isEqual from 'lodash/isEqual';
9
+ import FormControl from '@mui/material/FormControl';
10
+ import InputLabel from '@mui/material/InputLabel';
11
+
12
+ import { HorizontalKeypad, mq, updateSpans } from '@pie-lib/math-input';
13
+ import { color } from '@pie-lib/render-ui';
14
+ import { markFractionBaseSuperscripts } from './utils';
15
+
16
+ const { commonMqFontStyles, commonMqKeyboardStyles, longdivStyles, supsubStyles } = mq.CommonMqStyles;
17
+ const log = debug('@pie-lib:math-toolbar:editor-and-pad');
14
18
 
15
19
  const decimalRegex = /\.|,/g;
16
20
 
21
+ const MathToolbarContainer = styled('div')(({ theme }) => ({
22
+ zIndex: 9,
23
+ position: 'relative',
24
+ textAlign: 'center',
25
+ width: 'auto',
26
+ '& > .mq-math-mode': {
27
+ border: 'solid 1px lightgrey',
28
+ },
29
+ '& > .mq-focused': {
30
+ outline: 'none',
31
+ boxShadow: 'none',
32
+ border: `dotted 1px ${theme.palette.primary.main}`,
33
+ borderRadius: '0px',
34
+ },
35
+ '& .mq-overarrow-inner': {
36
+ border: 'none !important',
37
+ paddingTop: '0 !important',
38
+ },
39
+ '& .mq-overarrow-inner-right': {
40
+ display: 'none !important',
41
+ },
42
+ '& .mq-overarrow-inner-left': {
43
+ display: 'none !important',
44
+ },
45
+ '& .mq-longdiv-inner': {
46
+ borderTop: '1px solid !important',
47
+ paddingTop: '1.5px !important',
48
+ },
49
+ '& .mq-overarrow.mq-arrow-both': {
50
+ top: '7.8px',
51
+ marginTop: '0px',
52
+ minWidth: '1.23em',
53
+ },
54
+ '& .mq-parallelogram': {
55
+ lineHeight: 0.85,
56
+ },
57
+ }));
58
+
59
+ const InputAndTypeContainer = styled('div')(({ theme, hide }) => ({
60
+ display: hide ? 'none' : 'flex',
61
+ alignItems: 'center',
62
+ '& .mq-editable-field .mq-cursor': {
63
+ top: '-4px',
64
+ },
65
+ '& .mq-math-mode .mq-selection, .mq-editable-field .mq-selection': {
66
+ paddingTop: '18px',
67
+ },
68
+ '& .mq-math-mode .mq-overarrow': {
69
+ fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important',
70
+ },
71
+ '& .mq-math-mode .mq-overline .mq-overline-inner': {
72
+ paddingTop: '0.4em !important',
73
+ },
74
+ '& .mq-overarrow.mq-arrow-both': {
75
+ minWidth: '1.23em',
76
+ '& *': {
77
+ lineHeight: '1 !important',
78
+ },
79
+ '&:before': {
80
+ top: '-0.45em',
81
+ left: '-1px',
82
+ },
83
+ '&:after': {
84
+ position: 'absolute !important',
85
+ top: '0px !important',
86
+ right: '-2px',
87
+ },
88
+ '&.mq-empty:after': {
89
+ top: '-0.45em',
90
+ },
91
+ },
92
+ '& .mq-overarrow.mq-arrow-right': {
93
+ '&:before': {
94
+ top: '-0.4em',
95
+ right: '-1px',
96
+ },
97
+ },
98
+ '& *': {
99
+ ...commonMqFontStyles,
100
+ ...supsubStyles,
101
+ ...longdivStyles,
102
+ '& .mq-math-mode .mq-sqrt-prefix': {
103
+ verticalAlign: 'baseline !important',
104
+ top: '1px !important',
105
+ left: '-0.1em !important',
106
+ },
107
+ '& .mq-math-mode .mq-overarc ': {
108
+ paddingTop: '0.45em !important',
109
+ },
110
+ '& .mq-math-mode .mq-empty': {
111
+ padding: '9px 1px !important',
112
+ },
113
+ '& .mq-math-mode .mq-root-block': {
114
+ paddingTop: '10px',
115
+ },
116
+ '& .mq-scaled .mq-sqrt-prefix': {
117
+ top: '0 !important',
118
+ },
119
+ '& .mq-math-mode .mq-longdiv .mq-longdiv-inner': {
120
+ marginLeft: '4px !important',
121
+ paddingTop: '6px !important',
122
+ paddingLeft: '6px !important',
123
+ },
124
+ '& .mq-math-mode .mq-paren': {
125
+ verticalAlign: 'top !important',
126
+ padding: '1px 0.1em !important',
127
+ },
128
+ '& .mq-math-mode .mq-sqrt-stem': {
129
+ borderTop: '0.07em solid',
130
+ marginLeft: '-1.5px',
131
+ marginTop: '-2px !important',
132
+ paddingTop: '5px !important',
133
+ },
134
+ '& .mq-math-mode .mq-denominator': {
135
+ marginTop: '-5px !important',
136
+ padding: '0.5em 0.1em 0.1em !important',
137
+ },
138
+ '& .mq-math-mode .mq-numerator, .mq-math-mode .mq-over': {
139
+ padding: '0 0.1em !important',
140
+ paddingBottom: '0 !important',
141
+ marginBottom: '-2px',
142
+ },
143
+ },
144
+ '& span[data-prime="true"]': {
145
+ fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important',
146
+ },
147
+ }));
148
+
149
+ const StyledFormControl = styled(FormControl)({
150
+ flex: 'initial',
151
+ width: '25%',
152
+ minWidth: '100px',
153
+ marginLeft: '15px',
154
+ marginTop: '5px',
155
+ marginBottom: '5px',
156
+ marginRight: '5px',
157
+ '& label': {
158
+ fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important',
159
+ },
160
+ '& div': {
161
+ fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important',
162
+ },
163
+ });
164
+
165
+ const StyledInputLabel = styled(InputLabel)(() => ({
166
+ backgroundColor: 'transparent',
167
+ }));
168
+
169
+ const InputContainerDiv = styled('div')(({ theme, error }) => ({
170
+ minWidth: '500px',
171
+ maxWidth: '900px',
172
+ minHeight: '30px',
173
+ width: '100%',
174
+ display: 'flex',
175
+ marginTop: theme.spacing(1),
176
+ marginBottom: theme.spacing(1),
177
+ ...(error && {
178
+ border: '2px solid red',
179
+ }),
180
+ '& .mq-sqrt-prefix .mq-scaled': {
181
+ verticalAlign: 'middle !important',
182
+ },
183
+ }));
184
+
185
+ const MathEditor = styled(mq.Input)(({ controlledKeypadMode }) => ({
186
+ maxWidth: controlledKeypadMode ? '400px' : '500px',
187
+ color: color.text(),
188
+ backgroundColor: color.background(),
189
+ padding: '2px',
190
+ }));
191
+
192
+ const AddAnswerBlockButton = styled(Button)({
193
+ position: 'absolute',
194
+ right: '12px',
195
+ border: '1px solid lightgrey',
196
+ color: color.text(),
197
+ });
198
+
199
+ const StyledHr = styled('hr')(({ theme }) => ({
200
+ padding: 0,
201
+ margin: 0,
202
+ height: '1px',
203
+ border: 'none',
204
+ borderBottom: `solid 1px ${theme.palette.primary.main}`,
205
+ }));
206
+
207
+ const KeyboardContainer = styled(HorizontalKeypad)(({ mode }) => ({
208
+ ...commonMqKeyboardStyles,
209
+ ...(mode === 'language' && {
210
+ '& *': {
211
+ fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important',
212
+ },
213
+ }),
214
+ }));
215
+
17
216
  const toNodeData = (data) => {
18
217
  if (!data) {
19
218
  return;
@@ -48,12 +247,12 @@ export class EditorAndPad extends React.Component {
48
247
  layoutForKeyPad: PropTypes.object,
49
248
  maxResponseAreas: PropTypes.number,
50
249
  additionalKeys: PropTypes.array,
51
- latex: PropTypes.string,
250
+ latex: PropTypes.string.isRequired,
52
251
  onAnswerBlockAdd: PropTypes.func,
53
252
  onFocus: PropTypes.func,
54
253
  onBlur: PropTypes.func,
55
254
  onChange: PropTypes.func.isRequired,
56
- classes: PropTypes.object,
255
+ setKeypadInteraction: PropTypes.func,
57
256
  };
58
257
 
59
258
  constructor(props) {
@@ -124,6 +323,7 @@ export class EditorAndPad extends React.Component {
124
323
  const { onChange, noDecimal } = this.props;
125
324
 
126
325
  updateSpans();
326
+ markFractionBaseSuperscripts();
127
327
 
128
328
  this.updateDisable(true);
129
329
 
@@ -206,13 +406,13 @@ export class EditorAndPad extends React.Component {
206
406
  controlledKeypad,
207
407
  controlledKeypadMode,
208
408
  showKeypad,
409
+ setKeypadInteraction,
209
410
  noDecimal,
210
411
  hideInput,
211
412
  layoutForKeyPad,
212
413
  latex,
213
414
  onFocus,
214
415
  onBlur,
215
- classes,
216
416
  error,
217
417
  } = this.props;
218
418
  const shouldShowKeypad = !controlledKeypad || (controlledKeypad && showKeypad);
@@ -221,11 +421,20 @@ export class EditorAndPad extends React.Component {
221
421
  log('[render]', latex);
222
422
 
223
423
  return (
224
- <div className={cx(classes.mathToolbar, classNames.mathToolbar)}>
225
- <div className={cx(classes.inputAndTypeContainer, { [classes.hide]: hideInput })}>
424
+ <MathToolbarContainer className={classNames.mathToolbar}>
425
+ <InputAndTypeContainer hide={hideInput}>
226
426
  {controlledKeypadMode && (
227
- <InputContainer label="Equation Editor" className={classes.selectContainer}>
228
- <Select className={classes.select} onChange={this.onEditorTypeChange} value={this.state.equationEditor}>
427
+ <StyledFormControl variant={'standard'}>
428
+ <StyledInputLabel id="equation-editor-label">{'Equation Editor'}</StyledInputLabel>
429
+ <Select
430
+ labelId="equation-editor-label"
431
+ id="equation-editor-select"
432
+ name="equationEditor"
433
+ label={'Equation Editor'}
434
+ onChange={this.onEditorTypeChange}
435
+ value={this.state.equationEditor}
436
+ MenuProps={{ transitionDuration: { enter: 225, exit: 195 } }}
437
+ >
229
438
  <MenuItem value="non-negative-integers">Numeric - Non-Negative Integers</MenuItem>
230
439
  <MenuItem value="integers">Numeric - Integers</MenuItem>
231
440
  <MenuItem value="decimals">Numeric - Decimals</MenuItem>
@@ -239,10 +448,10 @@ export class EditorAndPad extends React.Component {
239
448
  <MenuItem value={'statistics'}>Statistics</MenuItem>
240
449
  <MenuItem value={'item-authoring'}>Item Authoring</MenuItem>
241
450
  </Select>
242
- </InputContainer>
451
+ </StyledFormControl>
243
452
  )}
244
- <div className={cx(classes.inputContainer, error ? classes.error : '')}>
245
- <mq.Input
453
+ <InputContainerDiv error={error}>
454
+ <MathEditor
246
455
  onFocus={() => {
247
456
  onFocus && onFocus();
248
457
  this.updateDisable(false);
@@ -251,348 +460,39 @@ export class EditorAndPad extends React.Component {
251
460
  this.updateDisable(false);
252
461
  onBlur && onBlur(event);
253
462
  }}
254
- className={cx(classes.mathEditor, classNames.editor, !controlledKeypadMode ? classes.longMathEditor : '')}
255
- innerRef={(r) => (this.input = r)}
463
+ className={(classNames && classNames.editor) || ''}
464
+ controlledKeypadMode={controlledKeypadMode}
465
+ ref={(r) => (this.input = r)}
256
466
  latex={latex}
257
467
  onChange={this.onEditorChange}
258
468
  />
259
- </div>
260
- </div>
469
+ </InputContainerDiv>
470
+ </InputAndTypeContainer>
261
471
  {allowAnswerBlock && (
262
- <Button
263
- className={classes.addAnswerBlockButton}
472
+ <AddAnswerBlockButton
264
473
  type="primary"
265
474
  style={{ bottom: shouldShowKeypad ? '320px' : '20px' }}
266
475
  onClick={this.onAnswerBlockClick}
267
476
  disabled={addDisabled}
268
477
  >
269
478
  + Response Area
270
- </Button>
479
+ </AddAnswerBlockButton>
271
480
  )}
272
- <hr className={classes.hr} />
481
+ <StyledHr />
273
482
  {shouldShowKeypad && (
274
- <HorizontalKeypad
275
- className={cx(classes[keypadMode], classes.keyboard)}
483
+ <KeyboardContainer
484
+ mode={controlledKeypadMode ? this.state.equationEditor : keypadMode}
485
+ controlledKeypadMode={controlledKeypadMode}
276
486
  layoutForKeyPad={layoutForKeyPad}
277
487
  additionalKeys={additionalKeys}
278
- mode={controlledKeypadMode ? this.state.equationEditor : keypadMode}
279
488
  onClick={this.onClick}
280
489
  noDecimal={noDecimal}
490
+ setKeypadInteraction={setKeypadInteraction}
281
491
  />
282
492
  )}
283
- </div>
493
+ </MathToolbarContainer>
284
494
  );
285
495
  }
286
496
  }
287
497
 
288
- const styles = (theme) => ({
289
- inputAndTypeContainer: {
290
- display: 'flex',
291
- alignItems: 'center',
292
- '& .mq-editable-field .mq-cursor': {
293
- top: '-4px',
294
- },
295
- '& .mq-math-mode .mq-selection, .mq-editable-field .mq-selection': {
296
- paddingTop: '18px',
297
- },
298
- '& .mq-math-mode .mq-overarrow': {
299
- fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important',
300
- },
301
- '& .mq-math-mode .mq-overline .mq-overline-inner': {
302
- paddingTop: '0.4em !important',
303
- },
304
- '& .mq-overarrow.mq-arrow-both': {
305
- minWidth: '1.23em',
306
- '& *': {
307
- lineHeight: '1 !important',
308
- },
309
- '&:before': {
310
- top: '-0.45em',
311
- left: '-1px',
312
- },
313
- '&:after': {
314
- position: 'absolute',
315
- top: '0px !important',
316
- right: '-2px',
317
- },
318
- '&.mq-empty:after': {
319
- top: '-0.45em',
320
- },
321
- },
322
- '& .mq-overarrow.mq-arrow-right': {
323
- '&:before': {
324
- top: '-0.4em',
325
- right: '-1px',
326
- },
327
- },
328
- '& *': {
329
- fontFamily: 'MJXZERO, MJXTEX !important',
330
-
331
- '& .mq-math-mode > span > var': {
332
- fontFamily: 'MJXZERO, MJXTEX-I !important',
333
- },
334
- '& .mq-math-mode span var': {
335
- fontFamily: 'MJXZERO, MJXTEX-I !important',
336
- },
337
- '& .mq-math-mode .mq-nonSymbola': {
338
- fontFamily: 'MJXZERO, MJXTEX-I !important',
339
- },
340
- '& .mq-math-mode > span > var.mq-operator-name': {
341
- fontFamily: 'MJXZERO, MJXTEX !important',
342
- },
343
-
344
- '& .mq-math-mode .mq-sqrt-prefix': {
345
- verticalAlign: 'baseline !important',
346
- top: '1px !important',
347
- left: '-0.1em !important',
348
- },
349
-
350
- '& .mq-math-mode .mq-overarc ': {
351
- paddingTop: '0.45em !important',
352
- },
353
-
354
- '& .mq-math-mode sup.mq-nthroot': {
355
- fontSize: '70% !important',
356
- verticalAlign: '0.5em !important',
357
- paddingRight: '0.15em',
358
- },
359
-
360
- '& .mq-math-mode .mq-empty': {
361
- padding: '9px 1px !important',
362
- },
363
-
364
- '& .mq-math-mode .mq-root-block': {
365
- paddingTop: '10px',
366
- },
367
-
368
- '& .mq-scaled .mq-sqrt-prefix': {
369
- top: '0 !important',
370
- },
371
-
372
- '& .mq-longdiv-inner': {
373
- marginTop: '-1px',
374
- marginLeft: '5px !important;',
375
-
376
- '& > .mq-empty': {
377
- padding: '0 !important',
378
- marginLeft: '0px !important',
379
- marginTop: '2px',
380
- },
381
- },
382
-
383
- '& .mq-math-mode .mq-longdiv': {
384
- display: 'inline-flex !important',
385
- },
386
-
387
- '& .mq-math-mode .mq-longdiv .mq-longdiv-inner': {
388
- marginLeft: '4px !important',
389
- paddingTop: '6px !important',
390
- paddingLeft: '6px !important',
391
- },
392
-
393
- '& .mq-math-mode .mq-supsub': {
394
- fontSize: '70.7% !important',
395
- },
396
-
397
- '& .mq-math-mode .mq-paren': {
398
- verticalAlign: 'top !important',
399
- padding: '1px 0.1em !important',
400
- },
401
-
402
- '& .mq-math-mode .mq-sqrt-stem': {
403
- borderTop: '0.07em solid',
404
- marginLeft: '-1.5px',
405
- marginTop: '-2px !important',
406
- paddingTop: '5px !important',
407
- },
408
-
409
- '& .mq-supsub ': {
410
- fontSize: '70.7%',
411
- },
412
-
413
- '& .mq-math-mode .mq-supsub.mq-sup-only': {
414
- verticalAlign: '-0.1em !important',
415
-
416
- '& .mq-sup': {
417
- marginBottom: '0px !important',
418
- },
419
- },
420
-
421
- '& .mq-math-mode .mq-denominator': {
422
- marginTop: '-5px !important',
423
- padding: '0.5em 0.1em 0.1em !important',
424
- },
425
-
426
- '& .mq-math-mode .mq-numerator, .mq-math-mode .mq-over': {
427
- padding: '0 0.1em !important',
428
- paddingBottom: '0 !important',
429
- marginBottom: '-2px',
430
- },
431
-
432
- '-webkit-font-smoothing': 'antialiased !important',
433
- },
434
- },
435
- hide: {
436
- display: 'none',
437
- },
438
- selectContainer: {
439
- flex: 'initial',
440
- width: '25%',
441
- minWidth: '100px',
442
- marginLeft: '15px',
443
- marginTop: '5px',
444
- marginBottom: '5px',
445
- marginRight: '5px',
446
-
447
- '& label': {
448
- fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important',
449
- },
450
-
451
- '& div': {
452
- fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important',
453
- },
454
- },
455
- mathEditor: {
456
- maxWidth: '400px',
457
- color: color.text(),
458
- backgroundColor: color.background(),
459
- padding: '2px',
460
- },
461
- longMathEditor: {
462
- maxWidth: '500px',
463
- },
464
- addAnswerBlockButton: {
465
- position: 'absolute',
466
- right: '12px',
467
- border: '1px solid lightgrey',
468
- },
469
- hr: {
470
- padding: 0,
471
- margin: 0,
472
- height: '1px',
473
- border: 'none',
474
- borderBottom: `solid 1px ${theme.palette.primary.main}`,
475
- },
476
- mathToolbar: {
477
- zIndex: 9,
478
- position: 'relative',
479
- textAlign: 'center',
480
- width: 'auto',
481
- '& > .mq-math-mode': {
482
- border: 'solid 1px lightgrey',
483
- },
484
- '& > .mq-focused': {
485
- outline: 'none',
486
- boxShadow: 'none',
487
- border: `dotted 1px ${theme.palette.primary.main}`,
488
- borderRadius: '0px',
489
- },
490
- '& .mq-overarrow-inner': {
491
- border: 'none !important',
492
- paddingTop: '0 !important',
493
- },
494
- '& .mq-overarrow-inner-right': {
495
- display: 'none !important',
496
- },
497
- '& .mq-overarrow-inner-left': {
498
- display: 'none !important',
499
- },
500
- '& .mq-longdiv-inner': {
501
- borderTop: '1px solid !important',
502
- paddingTop: '1.5px !important',
503
- },
504
- '& .mq-overarrow.mq-arrow-both': {
505
- top: '7.8px',
506
- marginTop: '0px',
507
- minWidth: '1.23em',
508
- },
509
- '& .mq-parallelogram': {
510
- lineHeight: 0.85,
511
- },
512
- },
513
- inputContainer: {
514
- minWidth: '500px',
515
- maxWidth: '900px',
516
- minHeight: '30px',
517
- width: '100%',
518
- display: 'flex',
519
- marginTop: theme.spacing.unit,
520
- marginBottom: theme.spacing.unit,
521
-
522
- '& .mq-sqrt-prefix .mq-scaled': {
523
- verticalAlign: 'middle !important',
524
- },
525
- },
526
- error: {
527
- border: '2px solid red',
528
- },
529
- keyboard: {
530
- '& *': {
531
- fontFamily: 'MJXZERO, MJXTEX !important',
532
-
533
- '& .mq-math-mode > span > var': {
534
- fontFamily: 'MJXZERO, MJXTEX-I !important',
535
- },
536
- '& .mq-math-mode span var': {
537
- fontFamily: 'MJXZERO, MJXTEX-I !important',
538
- },
539
- '& .mq-math-mode .mq-nonSymbola': {
540
- fontFamily: 'MJXZERO, MJXTEX-I !important',
541
- },
542
- '& .mq-math-mode > span > var.mq-operator-name': {
543
- fontFamily: 'MJXZERO, MJXTEX !important',
544
- },
545
-
546
- '& .mq-math-mode .mq-sqrt-prefix': {
547
- top: '0 !important',
548
- },
549
-
550
- '& .mq-math-mode .mq-empty': {
551
- padding: '9px 1px !important',
552
- },
553
-
554
- '& .mq-longdiv-inner': {
555
- marginTop: '-1px',
556
- marginLeft: '5px !important;',
557
-
558
- '& > .mq-empty': {
559
- padding: '0 !important',
560
- marginLeft: '0px !important',
561
- marginTop: '2px',
562
- },
563
- },
564
-
565
- '& .mq-math-mode .mq-longdiv': {
566
- display: 'inline-flex !important',
567
- },
568
-
569
- '& .mq-math-mode .mq-supsub': {
570
- fontSize: '70.7% !important',
571
- },
572
-
573
- '& .mq-math-mode .mq-sqrt-stem': {
574
- marginTop: '-5px',
575
- paddingTop: '4px',
576
- },
577
-
578
- '& .mq-math-mode .mq-paren': {
579
- verticalAlign: 'middle !important',
580
- },
581
-
582
- '& .mq-math-mode .mq-overarrow .mq-overarrow-inner .mq-empty': {
583
- padding: '0 !important',
584
- },
585
-
586
- '& .mq-math-mode .mq-overline .mq-overline-inner .mq-empty ': {
587
- padding: '0 !important',
588
- },
589
- },
590
- },
591
- language: {
592
- '& *': {
593
- fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important',
594
- },
595
- },
596
- });
597
-
598
- export default withStyles(styles)(EditorAndPad);
498
+ export default EditorAndPad;