@pie-element/extended-text-entry 6.5.4-next.472 → 6.5.4-next.483

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/lib/main.js CHANGED
@@ -39,8 +39,6 @@ var _renderUi = require("@pie-lib/render-ui");
39
39
 
40
40
  var _mathRendering = require("@pie-lib/math-rendering");
41
41
 
42
- var _classnames = _interopRequireDefault(require("classnames"));
43
-
44
42
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
45
43
 
46
44
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
@@ -112,11 +110,9 @@ var Main = /*#__PURE__*/function (_React$Component) {
112
110
  var maxHeight = '40vh';
113
111
  log('[render] disabled? ', disabled);
114
112
 
115
- var teacherInstructionsDiv = /*#__PURE__*/_react["default"].createElement("div", {
116
- className: "teacher-instructions",
117
- dangerouslySetInnerHTML: {
118
- __html: teacherInstructions
119
- }
113
+ var teacherInstructionsDiv = /*#__PURE__*/_react["default"].createElement(_renderUi.PreviewPrompt, {
114
+ defaultClassName: "teacher-instructions",
115
+ prompt: teacherInstructions
120
116
  });
121
117
 
122
118
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -131,11 +127,11 @@ var Main = /*#__PURE__*/function (_React$Component) {
131
127
  },
132
128
  className: classes.collapsible
133
129
  }, teacherInstructionsDiv) : teacherInstructionsDiv, /*#__PURE__*/_react["default"].createElement("br", null)), model.prompt && /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
134
- className: (0, _classnames["default"])(classes.prompt, 'prompt'),
135
- dangerouslySetInnerHTML: {
136
- __html: model.prompt
137
- }
138
- }), /*#__PURE__*/_react["default"].createElement(_editableHtml["default"], {
130
+ className: classes.prompt
131
+ }, /*#__PURE__*/_react["default"].createElement(_renderUi.PreviewPrompt, {
132
+ defaultClassName: "prompt",
133
+ prompt: model.prompt
134
+ })), /*#__PURE__*/_react["default"].createElement(_editableHtml["default"], {
139
135
  onChange: this.changeSession,
140
136
  markup: value || '',
141
137
  width: width && width.toString(),
package/lib/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/main.jsx"],"names":["log","style","theme","main","backgroundColor","color","background","text","prompt","width","marginBottom","spacing","unit","fontSize","Main","props","onChange","containerRef","model","classes","session","dimensions","disabled","feedback","teacherInstructions","mathInput","animationsDisabled","value","height","maxHeight","teacherInstructionsDiv","__html","ref","hidden","visible","collapsible","changeSession","toString","math","customKeys","keypadMode","equationEditor","controlledKeypadMode","video","audio","React","Component","PropTypes","func","isRequired","object","shape","string"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,6BAAN,CAAZ;;AAEA,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAAAC,KAAK;AAAA,SAAK;AACtBC,IAAAA,IAAI,EAAE;AACJC,MAAAA,eAAe,EAAEC,gBAAMC,UAAN,EADb;AAEJD,MAAAA,KAAK,EAAEA,gBAAME,IAAN;AAFH,KADgB;AAKtBC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,MADD;AAENJ,MAAAA,KAAK,EAAEA,gBAAME,IAAN,EAFD;AAGNG,MAAAA,YAAY,EAAER,KAAK,CAACS,OAAN,CAAcC,IAAd,GAAqB,CAH7B;AAINC,MAAAA,QAAQ,EAAE;AAJJ;AALc,GAAL;AAAA,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tB;AAAgC,QAAA,QAAQ,EAAEA;AAA1C,QAFF,CAnDJ,CADF;AA2DD;;;EA1FuBsB,kBAAMC,S;;;iCAAnBhC,I,eACQ;AACjBE,EAAAA,QAAQ,EAAE+B,sBAAUC,IAAV,CAAeC,UADR;AAEjB/B,EAAAA,KAAK,EAAE6B,sBAAUG,MAFA;AAGjB/B,EAAAA,OAAO,EAAE4B,sBAAUG,MAAV,CAAiBD,UAHT;AAIjB7B,EAAAA,OAAO,EAAE2B,sBAAUI,KAAV,CAAgB;AACvBxB,IAAAA,KAAK,EAAEoB,sBAAUK;AADM,GAAhB,EAENH;AANc,C;;eA4FN,wBAAWhD,KAAX,EAAkBa,IAAlB,C","sourcesContent":["import React from 'react';\nimport EditableHTML from '@pie-lib/editable-html';\nimport PropTypes from 'prop-types';\nimport Typography from '@material-ui/core/Typography';\nimport { withStyles } from '@material-ui/core/styles';\nimport debug from 'debug';\nimport debounce from 'lodash/debounce';\nimport { color, Feedback, Collapsible } from '@pie-lib/render-ui';\nimport { renderMath } from '@pie-lib/math-rendering';\nimport classNames from 'classnames';\n\nconst log = debug('@pie-ui:extended-text-entry');\n\nconst style = theme => ({\n main: {\n backgroundColor: color.background(),\n color: color.text()\n },\n prompt: {\n width: '100%',\n color: color.text(),\n marginBottom: theme.spacing.unit * 2,\n fontSize: 'inherit'\n }\n});\n\nexport class Main extends React.Component {\n static propTypes = {\n onChange: PropTypes.func.isRequired,\n model: PropTypes.object,\n classes: PropTypes.object.isRequired,\n session: PropTypes.shape({\n value: PropTypes.string\n }).isRequired\n };\n\n componentDidUpdate() {\n if (this.containerRef) {\n renderMath(this.containerRef);\n }\n }\n\n changeSession = debounce(this.props.onChange, 1500);\n\n render() {\n const { model, classes, session } = this.props;\n const { dimensions, disabled, feedback, teacherInstructions, mathInput, animationsDisabled } = model;\n const { value } = session;\n const { width, height } = dimensions || {};\n const maxHeight = '40vh';\n log('[render] disabled? ', disabled);\n\n const teacherInstructionsDiv = <div\n className=\"teacher-instructions\"\n dangerouslySetInnerHTML={{ __html: teacherInstructions }}\n />;\n\n return (\n <div\n className={classes.main}\n ref={ref => {\n this.containerRef = ref;\n }}\n >\n {\n teacherInstructions && (\n <div>\n {!animationsDisabled ? (\n <Collapsible\n labels={{hidden: 'Show Teacher Instructions', visible: 'Hide Teacher Instructions'}}\n className={classes.collapsible}\n >\n {teacherInstructionsDiv}\n </Collapsible>\n ) : teacherInstructionsDiv }\n <br/>\n </div>\n )\n }\n {model.prompt && (\n <Typography\n className={classNames(classes.prompt, 'prompt')}\n dangerouslySetInnerHTML={{ __html: model.prompt }}\n />\n )}\n <EditableHTML\n onChange={this.changeSession}\n markup={value || ''}\n width={width && width.toString()}\n minHeight={height && height.toString()}\n maxHeight={maxHeight}\n disabled={disabled}\n highlightShape={true}\n pluginProps={{\n math: {\n disabled: !mathInput,\n customKeys: this.props.model.customKeys,\n keypadMode: this.props.model.equationEditor,\n controlledKeypadMode: false\n },\n video: {\n disabled: true\n },\n audio: {\n disabled: true\n }\n }}\n />\n {feedback && (\n <div>\n <br />\n <Feedback correctness=\"correct\" feedback={feedback}/>\n </div>\n )}\n </div>\n );\n }\n}\n\nexport default withStyles(style)(Main);\n"],"file":"main.js"}
1
+ {"version":3,"sources":["../src/main.jsx"],"names":["log","style","theme","main","backgroundColor","color","background","text","prompt","width","marginBottom","spacing","unit","fontSize","Main","props","onChange","containerRef","model","classes","session","dimensions","disabled","feedback","teacherInstructions","mathInput","animationsDisabled","value","height","maxHeight","teacherInstructionsDiv","ref","hidden","visible","collapsible","changeSession","toString","math","customKeys","keypadMode","equationEditor","controlledKeypadMode","video","audio","React","Component","PropTypes","func","isRequired","object","shape","string"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,6BAAN,CAAZ;;AAEA,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAAAC,KAAK;AAAA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B;AAGJC,YAAAA,UAAU,EAAE,KAAKxB,KAAL,CAAWG,KAAX,CAAiBsB,cAHzB;AAIJC,YAAAA,oBAAoB,EAAE;AAJlB,WADK;AAOXC,UAAAA,KAAK,EAAE;AACLpB,YAAAA,QAAQ,EAAE;AADL,WAPI;AAUVqB,UAAAA,KAAK,EAAE;AACNrB,YAAAA,QAAQ,EAAE;AADJ;AAVG;AARf,QA5BF,EAmDGC,QAAQ,iBACP,0DACE,2CADF,eAEE,gCAAC,kBAAD;AAAU,QAAA,WAAW,EAAC,SAAtB;AAAgC,QAAA,QAAQ,EAAEA;AAA1C,QAFF,CApDJ,CADF;AA4DD;;;EAxFuBqB,kBAAMC,S;;;iCAAnB/B,I,eACQ;AACjBE,EAAAA,QAAQ,EAAE8B,sBAAUC,IAAV,CAAeC,UADR;AAEjB9B,EAAAA,KAAK,EAAE4B,sBAAUG,MAFA;AAGjB9B,EAAAA,OAAO,EAAE2B,sBAAUG,MAAV,CAAiBD,UAHT;AAIjB5B,EAAAA,OAAO,EAAE0B,sBAAUI,KAAV,CAAgB;AACvBvB,IAAAA,KAAK,EAAEmB,sBAAUK;AADM,GAAhB,EAENH;AANc,C;;eA0FN,wBAAW/C,KAAX,EAAkBa,IAAlB,C","sourcesContent":["import React from 'react';\nimport EditableHTML from '@pie-lib/editable-html';\nimport PropTypes from 'prop-types';\nimport Typography from '@material-ui/core/Typography';\nimport { withStyles } from '@material-ui/core/styles';\nimport debug from 'debug';\nimport debounce from 'lodash/debounce';\nimport {color, Feedback, Collapsible, PreviewPrompt} from '@pie-lib/render-ui';\nimport { renderMath } from '@pie-lib/math-rendering';\n\nconst log = debug('@pie-ui:extended-text-entry');\n\nconst style = theme => ({\n main: {\n backgroundColor: color.background(),\n color: color.text()\n },\n prompt: {\n width: '100%',\n color: color.text(),\n marginBottom: theme.spacing.unit * 2,\n fontSize: 'inherit'\n }\n});\n\nexport class Main extends React.Component {\n static propTypes = {\n onChange: PropTypes.func.isRequired,\n model: PropTypes.object,\n classes: PropTypes.object.isRequired,\n session: PropTypes.shape({\n value: PropTypes.string\n }).isRequired\n };\n\n componentDidUpdate() {\n if (this.containerRef) {\n renderMath(this.containerRef);\n }\n }\n\n changeSession = debounce(this.props.onChange, 1500);\n\n render() {\n const { model, classes, session } = this.props;\n const { dimensions, disabled, feedback, teacherInstructions, mathInput, animationsDisabled } = model;\n const { value } = session;\n const { width, height } = dimensions || {};\n const maxHeight = '40vh';\n log('[render] disabled? ', disabled);\n\n const teacherInstructionsDiv = <PreviewPrompt defaultClassName=\"teacher-instructions\" prompt={teacherInstructions} />;\n\n return (\n <div\n className={classes.main}\n ref={ref => {\n this.containerRef = ref;\n }}\n >\n {\n teacherInstructions && (\n <div>\n {!animationsDisabled ? (\n <Collapsible\n labels={{hidden: 'Show Teacher Instructions', visible: 'Hide Teacher Instructions'}}\n className={classes.collapsible}\n >\n {teacherInstructionsDiv}\n </Collapsible>\n ) : teacherInstructionsDiv }\n <br/>\n </div>\n )\n }\n {model.prompt && (\n <Typography\n className={classes.prompt}\n >\n <PreviewPrompt defaultClassName=\"prompt\" prompt={model.prompt} />\n </Typography>\n )}\n <EditableHTML\n onChange={this.changeSession}\n markup={value || ''}\n width={width && width.toString()}\n minHeight={height && height.toString()}\n maxHeight={maxHeight}\n disabled={disabled}\n highlightShape={true}\n pluginProps={{\n math: {\n disabled: !mathInput,\n customKeys: this.props.model.customKeys,\n keypadMode: this.props.model.equationEditor,\n controlledKeypadMode: false\n },\n video: {\n disabled: true\n },\n audio: {\n disabled: true\n }\n }}\n />\n {feedback && (\n <div>\n <br />\n <Feedback correctness=\"correct\" feedback={feedback}/>\n </div>\n )}\n </div>\n );\n }\n}\n\nexport default withStyles(style)(Main);\n"],"file":"main.js"}
package/module/element.js CHANGED
@@ -1,4 +1,4 @@
1
- import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_debug, _dll_lodash, _dll_pie_lib__render_ui, _dll_classnames, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.2.14/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_debug, _dll_lodash, _dll_pie_lib__render_ui, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.2.14/module/index.js";
2
2
  import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.0.15/module/index.js";
3
3
  import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.17/module/index.js";
4
4
  const React$1 = _dll_react;
@@ -10,7 +10,7 @@ const {debounce: debounce} = _dll_lodash;
10
10
  const {color: color} = _dll_pie_lib__render_ui;
11
11
  const {Feedback: Feedback} = _dll_pie_lib__render_ui;
12
12
  const {Collapsible: Collapsible} = _dll_pie_lib__render_ui;
13
- const classNames = _dll_classnames;
13
+ const {PreviewPrompt: PreviewPrompt} = _dll_pie_lib__render_ui;
14
14
  const EditableHTML = _dll_pie_lib__editable_html;
15
15
  const {renderMath: renderMath} = _dll_pie_lib__math_rendering;
16
16
  const _jsxFileName = "/home/circleci/repo/packages/extended-text-entry/src/main.jsx";
@@ -57,15 +57,13 @@ class Main extends React$1.Component {
57
57
  const {width, height} = dimensions || ({});
58
58
  const maxHeight = '40vh';
59
59
  log$1('[render] disabled? ', disabled);
60
- const teacherInstructionsDiv = React$1.createElement('div', {
61
- className: "teacher-instructions",
62
- dangerouslySetInnerHTML: {
63
- __html: teacherInstructions
64
- },
60
+ const teacherInstructionsDiv = React$1.createElement(PreviewPrompt, {
61
+ defaultClassName: "teacher-instructions",
62
+ prompt: teacherInstructions,
65
63
  __self: this,
66
64
  __source: {
67
65
  fileName: _jsxFileName,
68
- lineNumber: 53
66
+ lineNumber: 52
69
67
  }
70
68
  });
71
69
  return React$1.createElement('div', {
@@ -76,13 +74,13 @@ class Main extends React$1.Component {
76
74
  __self: this,
77
75
  __source: {
78
76
  fileName: _jsxFileName,
79
- lineNumber: 59
77
+ lineNumber: 55
80
78
  }
81
79
  }, teacherInstructions && React$1.createElement('div', {
82
80
  __self: this,
83
81
  __source: {
84
82
  fileName: _jsxFileName,
85
- lineNumber: 67
83
+ lineNumber: 63
86
84
  }
87
85
  }, !animationsDisabled ? React$1.createElement(Collapsible, {
88
86
  labels: {
@@ -93,25 +91,30 @@ class Main extends React$1.Component {
93
91
  __self: this,
94
92
  __source: {
95
93
  fileName: _jsxFileName,
96
- lineNumber: 69
94
+ lineNumber: 65
97
95
  }
98
96
  }, teacherInstructionsDiv) : teacherInstructionsDiv, React$1.createElement('br', {
99
97
  __self: this,
100
98
  __source: {
101
99
  fileName: _jsxFileName,
102
- lineNumber: 76
100
+ lineNumber: 72
103
101
  }
104
102
  })), model.prompt && React$1.createElement(Typography, {
105
- className: classNames(classes.prompt, 'prompt'),
106
- dangerouslySetInnerHTML: {
107
- __html: model.prompt
108
- },
103
+ className: classes.prompt,
104
+ __self: this,
105
+ __source: {
106
+ fileName: _jsxFileName,
107
+ lineNumber: 77
108
+ }
109
+ }, React$1.createElement(PreviewPrompt, {
110
+ defaultClassName: "prompt",
111
+ prompt: model.prompt,
109
112
  __self: this,
110
113
  __source: {
111
114
  fileName: _jsxFileName,
112
- lineNumber: 81
115
+ lineNumber: 80
113
116
  }
114
- }), React$1.createElement(EditableHTML, {
117
+ })), React$1.createElement(EditableHTML, {
115
118
  onChange: this.changeSession,
116
119
  markup: value || '',
117
120
  width: width && width.toString(),
@@ -136,19 +139,19 @@ class Main extends React$1.Component {
136
139
  __self: this,
137
140
  __source: {
138
141
  fileName: _jsxFileName,
139
- lineNumber: 86
142
+ lineNumber: 83
140
143
  }
141
144
  }), feedback && React$1.createElement('div', {
142
145
  __self: this,
143
146
  __source: {
144
147
  fileName: _jsxFileName,
145
- lineNumber: 110
148
+ lineNumber: 107
146
149
  }
147
150
  }, React$1.createElement('br', {
148
151
  __self: this,
149
152
  __source: {
150
153
  fileName: _jsxFileName,
151
- lineNumber: 111
154
+ lineNumber: 108
152
155
  }
153
156
  }), React$1.createElement(Feedback, {
154
157
  correctness: "correct",
@@ -156,7 +159,7 @@ class Main extends React$1.Component {
156
159
  __self: this,
157
160
  __source: {
158
161
  fileName: _jsxFileName,
159
- lineNumber: 112
162
+ lineNumber: 109
160
163
  }
161
164
  })));
162
165
  }
package/module/print.js CHANGED
@@ -1,4 +1,4 @@
1
- import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_debug, _dll_lodash, _dll_pie_lib__render_ui, _dll_classnames, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.2.14/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_debug, _dll_lodash, _dll_pie_lib__render_ui, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.2.14/module/index.js";
2
2
  import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.17/module/index.js";
3
3
  import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.0.15/module/index.js";
4
4
  const React$1 = _dll_react;
@@ -10,7 +10,7 @@ const {debounce: debounce$1} = _dll_lodash;
10
10
  const {color: color} = _dll_pie_lib__render_ui;
11
11
  const {Feedback: Feedback} = _dll_pie_lib__render_ui;
12
12
  const {Collapsible: Collapsible} = _dll_pie_lib__render_ui;
13
- const classNames = _dll_classnames;
13
+ const {PreviewPrompt: PreviewPrompt} = _dll_pie_lib__render_ui;
14
14
  const EditableHTML = _dll_pie_lib__editable_html;
15
15
  const {renderMath: renderMath$1} = _dll_pie_lib__math_rendering;
16
16
  const _jsxFileName = "/home/circleci/repo/packages/extended-text-entry/src/main.jsx";
@@ -57,15 +57,13 @@ class Main extends React$1.Component {
57
57
  const {width, height} = dimensions || ({});
58
58
  const maxHeight = '40vh';
59
59
  log$1('[render] disabled? ', disabled);
60
- const teacherInstructionsDiv = React$1.createElement('div', {
61
- className: "teacher-instructions",
62
- dangerouslySetInnerHTML: {
63
- __html: teacherInstructions
64
- },
60
+ const teacherInstructionsDiv = React$1.createElement(PreviewPrompt, {
61
+ defaultClassName: "teacher-instructions",
62
+ prompt: teacherInstructions,
65
63
  __self: this,
66
64
  __source: {
67
65
  fileName: _jsxFileName,
68
- lineNumber: 53
66
+ lineNumber: 52
69
67
  }
70
68
  });
71
69
  return React$1.createElement('div', {
@@ -76,13 +74,13 @@ class Main extends React$1.Component {
76
74
  __self: this,
77
75
  __source: {
78
76
  fileName: _jsxFileName,
79
- lineNumber: 59
77
+ lineNumber: 55
80
78
  }
81
79
  }, teacherInstructions && React$1.createElement('div', {
82
80
  __self: this,
83
81
  __source: {
84
82
  fileName: _jsxFileName,
85
- lineNumber: 67
83
+ lineNumber: 63
86
84
  }
87
85
  }, !animationsDisabled ? React$1.createElement(Collapsible, {
88
86
  labels: {
@@ -93,25 +91,30 @@ class Main extends React$1.Component {
93
91
  __self: this,
94
92
  __source: {
95
93
  fileName: _jsxFileName,
96
- lineNumber: 69
94
+ lineNumber: 65
97
95
  }
98
96
  }, teacherInstructionsDiv) : teacherInstructionsDiv, React$1.createElement('br', {
99
97
  __self: this,
100
98
  __source: {
101
99
  fileName: _jsxFileName,
102
- lineNumber: 76
100
+ lineNumber: 72
103
101
  }
104
102
  })), model.prompt && React$1.createElement(Typography, {
105
- className: classNames(classes.prompt, 'prompt'),
106
- dangerouslySetInnerHTML: {
107
- __html: model.prompt
108
- },
103
+ className: classes.prompt,
104
+ __self: this,
105
+ __source: {
106
+ fileName: _jsxFileName,
107
+ lineNumber: 77
108
+ }
109
+ }, React$1.createElement(PreviewPrompt, {
110
+ defaultClassName: "prompt",
111
+ prompt: model.prompt,
109
112
  __self: this,
110
113
  __source: {
111
114
  fileName: _jsxFileName,
112
- lineNumber: 81
115
+ lineNumber: 80
113
116
  }
114
- }), React$1.createElement(EditableHTML, {
117
+ })), React$1.createElement(EditableHTML, {
115
118
  onChange: this.changeSession,
116
119
  markup: value || '',
117
120
  width: width && width.toString(),
@@ -136,19 +139,19 @@ class Main extends React$1.Component {
136
139
  __self: this,
137
140
  __source: {
138
141
  fileName: _jsxFileName,
139
- lineNumber: 86
142
+ lineNumber: 83
140
143
  }
141
144
  }), feedback && React$1.createElement('div', {
142
145
  __self: this,
143
146
  __source: {
144
147
  fileName: _jsxFileName,
145
- lineNumber: 110
148
+ lineNumber: 107
146
149
  }
147
150
  }, React$1.createElement('br', {
148
151
  __self: this,
149
152
  __source: {
150
153
  fileName: _jsxFileName,
151
- lineNumber: 111
154
+ lineNumber: 108
152
155
  }
153
156
  }), React$1.createElement(Feedback, {
154
157
  correctness: "correct",
@@ -156,7 +159,7 @@ class Main extends React$1.Component {
156
159
  __self: this,
157
160
  __source: {
158
161
  fileName: _jsxFileName,
159
- lineNumber: 112
162
+ lineNumber: 109
160
163
  }
161
164
  })));
162
165
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/extended-text-entry",
3
- "version": "6.5.4-next.472+0267c570e",
3
+ "version": "6.5.4-next.483+bbb1ff031",
4
4
  "description": "",
5
5
  "repository": "pie-framework/pie-elements",
6
6
  "publishConfig": {
@@ -22,7 +22,7 @@
22
22
  "react": "^16.8.1",
23
23
  "react-dom": "^16.8.1"
24
24
  },
25
- "gitHead": "0267c570e6c2ea2885ac00ed1e4ba6f8eab9ceb4",
25
+ "gitHead": "bbb1ff031db7ab593635e64ef2201486360283d8",
26
26
  "scripts": {
27
27
  "postpublish": "../../scripts/postpublish"
28
28
  },