@pie-lib/mask-markup 3.0.12 → 3.1.0-beta

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.
Files changed (33) hide show
  1. package/CHANGELOG.md +0 -48
  2. package/lib/__tests__/drag-in-the-blank.test.js +129 -0
  3. package/lib/__tests__/drag-in-the-blank.test.js.map +1 -0
  4. package/lib/__tests__/index.test.js +39 -0
  5. package/lib/__tests__/index.test.js.map +1 -0
  6. package/lib/__tests__/mask.test.js +344 -0
  7. package/lib/__tests__/mask.test.js.map +1 -0
  8. package/lib/__tests__/serialization.test.js +44 -0
  9. package/lib/__tests__/serialization.test.js.map +1 -0
  10. package/lib/__tests__/utils.js +14 -0
  11. package/lib/__tests__/utils.js.map +1 -0
  12. package/lib/__tests__/with-mask.test.js +110 -0
  13. package/lib/__tests__/with-mask.test.js.map +1 -0
  14. package/lib/choices/__tests__/index.test.js +139 -0
  15. package/lib/choices/__tests__/index.test.js.map +1 -0
  16. package/lib/choices/choice.js +3 -0
  17. package/lib/choices/choice.js.map +1 -1
  18. package/lib/components/__tests__/blank.test.js +293 -0
  19. package/lib/components/__tests__/blank.test.js.map +1 -0
  20. package/lib/components/__tests__/correct-input.test.js +132 -0
  21. package/lib/components/__tests__/correct-input.test.js.map +1 -0
  22. package/lib/components/__tests__/dropdown.test.js +202 -0
  23. package/lib/components/__tests__/dropdown.test.js.map +1 -0
  24. package/lib/components/__tests__/input.test.js +129 -0
  25. package/lib/components/__tests__/input.test.js.map +1 -0
  26. package/lib/components/blank.js +14 -3
  27. package/lib/components/blank.js.map +1 -1
  28. package/package.json +6 -6
  29. package/src/choices/__tests__/index.test.js +34 -0
  30. package/src/choices/choice.jsx +5 -2
  31. package/src/components/__tests__/blank.test.js +33 -0
  32. package/src/components/blank.jsx +20 -4
  33. package/LICENSE.md +0 -5
@@ -0,0 +1,202 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
6
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
7
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
8
+ var React = _interopRequireWildcard(require("react"));
9
+ var _react2 = require("@testing-library/react");
10
+ var _userEvent = _interopRequireDefault(require("@testing-library/user-event"));
11
+ var _utils = require("../../__tests__/utils");
12
+ var _dropdown = _interopRequireDefault(require("../dropdown"));
13
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
14
+ describe('Dropdown', function () {
15
+ var onChange = jest.fn();
16
+ var defaultProps = {
17
+ onChange: onChange,
18
+ id: '1',
19
+ correct: false,
20
+ disabled: false,
21
+ value: 'Jumped',
22
+ choices: [(0, _utils.choice)('Jumped'), (0, _utils.choice)('Laughed'), (0, _utils.choice)('Smiled')]
23
+ };
24
+ beforeEach(function () {
25
+ onChange.mockClear();
26
+ });
27
+ describe('rendering', function () {
28
+ it('renders dropdown with default props', function () {
29
+ (0, _react2.render)(/*#__PURE__*/React.createElement(_dropdown["default"], defaultProps));
30
+ var button = _react2.screen.getByRole('combobox');
31
+ expect(button).toBeInTheDocument();
32
+ // Button displays the selected value
33
+ expect(button).toHaveTextContent('Jumped');
34
+ });
35
+ it('renders with all choices as options when opened', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
36
+ var user, button, options;
37
+ return _regenerator["default"].wrap(function (_context) {
38
+ while (1) switch (_context.prev = _context.next) {
39
+ case 0:
40
+ user = _userEvent["default"].setup();
41
+ (0, _react2.render)(/*#__PURE__*/React.createElement(_dropdown["default"], defaultProps));
42
+ button = _react2.screen.getByRole('combobox');
43
+ _context.next = 1;
44
+ return user.click(button);
45
+ case 1:
46
+ // Options should now be visible - find them by role
47
+ options = _react2.screen.getAllByRole('option');
48
+ expect(options).toHaveLength(3);
49
+ // Verify the text content of options using specific elements
50
+ expect(options[0]).toHaveTextContent('Jumped');
51
+ expect(options[1]).toHaveTextContent('Laughed');
52
+ expect(options[2]).toHaveTextContent('Smiled');
53
+ case 2:
54
+ case "end":
55
+ return _context.stop();
56
+ }
57
+ }, _callee);
58
+ })));
59
+ it('focuses the selected option when the menu opens', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
60
+ var user, button;
61
+ return _regenerator["default"].wrap(function (_context2) {
62
+ while (1) switch (_context2.prev = _context2.next) {
63
+ case 0:
64
+ user = _userEvent["default"].setup();
65
+ (0, _react2.render)(/*#__PURE__*/React.createElement(_dropdown["default"], defaultProps));
66
+ button = _react2.screen.getByRole('combobox');
67
+ _context2.next = 1;
68
+ return user.click(button);
69
+ case 1:
70
+ _context2.next = 2;
71
+ return (0, _react2.waitFor)(function () {
72
+ expect(document.getElementById('dropdown-option-1-0')).toHaveFocus();
73
+ });
74
+ case 2:
75
+ expect(button).toHaveAttribute('aria-activedescendant', 'dropdown-option-1-0');
76
+ case 3:
77
+ case "end":
78
+ return _context2.stop();
79
+ }
80
+ }, _callee2);
81
+ })));
82
+ it('focuses a non-first selected option when the menu opens', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3() {
83
+ var user, button;
84
+ return _regenerator["default"].wrap(function (_context3) {
85
+ while (1) switch (_context3.prev = _context3.next) {
86
+ case 0:
87
+ user = _userEvent["default"].setup();
88
+ (0, _react2.render)(/*#__PURE__*/React.createElement(_dropdown["default"], (0, _extends2["default"])({}, defaultProps, {
89
+ value: "Laughed"
90
+ })));
91
+ button = _react2.screen.getByRole('combobox');
92
+ _context3.next = 1;
93
+ return user.click(button);
94
+ case 1:
95
+ _context3.next = 2;
96
+ return (0, _react2.waitFor)(function () {
97
+ expect(document.getElementById('dropdown-option-1-1')).toHaveFocus();
98
+ });
99
+ case 2:
100
+ expect(button).toHaveAttribute('aria-activedescendant', 'dropdown-option-1-1');
101
+ case 3:
102
+ case "end":
103
+ return _context3.stop();
104
+ }
105
+ }, _callee3);
106
+ })));
107
+ it('does not highlight an option when no value is selected', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4() {
108
+ var user, button;
109
+ return _regenerator["default"].wrap(function (_context4) {
110
+ while (1) switch (_context4.prev = _context4.next) {
111
+ case 0:
112
+ user = _userEvent["default"].setup();
113
+ (0, _react2.render)(/*#__PURE__*/React.createElement(_dropdown["default"], (0, _extends2["default"])({}, defaultProps, {
114
+ value: undefined
115
+ })));
116
+ button = _react2.screen.getByRole('combobox');
117
+ _context4.next = 1;
118
+ return user.click(button);
119
+ case 1:
120
+ expect(button).not.toHaveAttribute('aria-activedescendant');
121
+ case 2:
122
+ case "end":
123
+ return _context4.stop();
124
+ }
125
+ }, _callee4);
126
+ })));
127
+ it('renders as disabled when disabled prop is true', function () {
128
+ (0, _react2.render)(/*#__PURE__*/React.createElement(_dropdown["default"], (0, _extends2["default"])({}, defaultProps, {
129
+ disabled: true
130
+ })));
131
+ var button = _react2.screen.getByRole('combobox');
132
+ expect(button).toBeDisabled();
133
+ });
134
+ it('shows correct state when correct is true', function () {
135
+ var _render = (0, _react2.render)(/*#__PURE__*/React.createElement(_dropdown["default"], (0, _extends2["default"])({}, defaultProps, {
136
+ correct: true
137
+ }))),
138
+ container = _render.container;
139
+ var button = _react2.screen.getByRole('combobox');
140
+ expect(button).toBeInTheDocument();
141
+ });
142
+ });
143
+ describe('user interactions', function () {
144
+ it('calls onChange when user selects a different option', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5() {
145
+ var user, button, options, laughedOption;
146
+ return _regenerator["default"].wrap(function (_context5) {
147
+ while (1) switch (_context5.prev = _context5.next) {
148
+ case 0:
149
+ user = _userEvent["default"].setup();
150
+ (0, _react2.render)(/*#__PURE__*/React.createElement(_dropdown["default"], defaultProps));
151
+
152
+ // Click button to open menu
153
+ button = _react2.screen.getByRole('combobox');
154
+ _context5.next = 1;
155
+ return user.click(button);
156
+ case 1:
157
+ // Find the option by getting all options and selecting the one with "Laughed" text
158
+ options = _react2.screen.getAllByRole('option');
159
+ laughedOption = options.find(function (opt) {
160
+ return opt.textContent.includes('Laughed');
161
+ });
162
+ _context5.next = 2;
163
+ return user.click(laughedOption);
164
+ case 2:
165
+ expect(onChange).toHaveBeenCalledWith('1', 'Laughed');
166
+ case 3:
167
+ case "end":
168
+ return _context5.stop();
169
+ }
170
+ }, _callee5);
171
+ })));
172
+ it('calls onChange with correct value', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6() {
173
+ var user, button, options, smiledOption;
174
+ return _regenerator["default"].wrap(function (_context6) {
175
+ while (1) switch (_context6.prev = _context6.next) {
176
+ case 0:
177
+ user = _userEvent["default"].setup();
178
+ (0, _react2.render)(/*#__PURE__*/React.createElement(_dropdown["default"], defaultProps));
179
+
180
+ // Click button to open menu
181
+ button = _react2.screen.getByRole('combobox');
182
+ _context6.next = 1;
183
+ return user.click(button);
184
+ case 1:
185
+ // Find the option by getting all options and selecting the one with "Smiled" text
186
+ options = _react2.screen.getAllByRole('option');
187
+ smiledOption = options.find(function (opt) {
188
+ return opt.textContent.includes('Smiled');
189
+ });
190
+ _context6.next = 2;
191
+ return user.click(smiledOption);
192
+ case 2:
193
+ expect(onChange).toHaveBeenCalledWith('1', 'Smiled');
194
+ case 3:
195
+ case "end":
196
+ return _context6.stop();
197
+ }
198
+ }, _callee6);
199
+ })));
200
+ });
201
+ });
202
+ //# sourceMappingURL=dropdown.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown.test.js","names":["React","_interopRequireWildcard","require","_react2","_userEvent","_interopRequireDefault","_utils","_dropdown","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","_typeof","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","describe","onChange","jest","fn","defaultProps","id","correct","disabled","value","choices","choice","beforeEach","mockClear","it","render","createElement","button","screen","getByRole","expect","toBeInTheDocument","toHaveTextContent","_asyncToGenerator2","_regenerator","mark","_callee","user","options","wrap","_context","prev","next","userEvent","setup","click","getAllByRole","toHaveLength","stop","_callee2","_context2","waitFor","document","getElementById","toHaveFocus","toHaveAttribute","_callee3","_context3","_extends2","_callee4","_context4","undefined","not","toBeDisabled","_render","container","_callee5","laughedOption","_context5","find","opt","textContent","includes","toHaveBeenCalledWith","_callee6","smiledOption","_context6"],"sources":["../../../src/components/__tests__/dropdown.test.js"],"sourcesContent":["import * as React from 'react';\nimport { render, screen, waitFor } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\nimport { choice } from '../../__tests__/utils';\nimport Dropdown from '../dropdown';\n\ndescribe('Dropdown', () => {\n const onChange = jest.fn();\n const defaultProps = {\n onChange,\n id: '1',\n correct: false,\n disabled: false,\n value: 'Jumped',\n choices: [choice('Jumped'), choice('Laughed'), choice('Smiled')],\n };\n\n beforeEach(() => {\n onChange.mockClear();\n });\n\n describe('rendering', () => {\n it('renders dropdown with default props', () => {\n render(<Dropdown {...defaultProps} />);\n const button = screen.getByRole('combobox');\n expect(button).toBeInTheDocument();\n // Button displays the selected value\n expect(button).toHaveTextContent('Jumped');\n });\n\n it('renders with all choices as options when opened', async () => {\n const user = userEvent.setup();\n render(<Dropdown {...defaultProps} />);\n\n const button = screen.getByRole('combobox');\n await user.click(button);\n\n // Options should now be visible - find them by role\n const options = screen.getAllByRole('option');\n expect(options).toHaveLength(3);\n // Verify the text content of options using specific elements\n expect(options[0]).toHaveTextContent('Jumped');\n expect(options[1]).toHaveTextContent('Laughed');\n expect(options[2]).toHaveTextContent('Smiled');\n });\n\n it('focuses the selected option when the menu opens', async () => {\n const user = userEvent.setup();\n render(<Dropdown {...defaultProps} />);\n\n const button = screen.getByRole('combobox');\n await user.click(button);\n\n await waitFor(() => {\n expect(document.getElementById('dropdown-option-1-0')).toHaveFocus();\n });\n expect(button).toHaveAttribute('aria-activedescendant', 'dropdown-option-1-0');\n });\n\n it('focuses a non-first selected option when the menu opens', async () => {\n const user = userEvent.setup();\n render(<Dropdown {...defaultProps} value=\"Laughed\" />);\n\n const button = screen.getByRole('combobox');\n await user.click(button);\n\n await waitFor(() => {\n expect(document.getElementById('dropdown-option-1-1')).toHaveFocus();\n });\n expect(button).toHaveAttribute('aria-activedescendant', 'dropdown-option-1-1');\n });\n\n it('does not highlight an option when no value is selected', async () => {\n const user = userEvent.setup();\n render(<Dropdown {...defaultProps} value={undefined} />);\n\n const button = screen.getByRole('combobox');\n await user.click(button);\n\n expect(button).not.toHaveAttribute('aria-activedescendant');\n });\n\n it('renders as disabled when disabled prop is true', () => {\n render(<Dropdown {...defaultProps} disabled={true} />);\n const button = screen.getByRole('combobox');\n expect(button).toBeDisabled();\n });\n\n it('shows correct state when correct is true', () => {\n const { container } = render(<Dropdown {...defaultProps} correct={true} />);\n const button = screen.getByRole('combobox');\n expect(button).toBeInTheDocument();\n });\n });\n\n describe('user interactions', () => {\n it('calls onChange when user selects a different option', async () => {\n const user = userEvent.setup();\n render(<Dropdown {...defaultProps} />);\n\n // Click button to open menu\n const button = screen.getByRole('combobox');\n await user.click(button);\n\n // Find the option by getting all options and selecting the one with \"Laughed\" text\n const options = screen.getAllByRole('option');\n const laughedOption = options.find((opt) => opt.textContent.includes('Laughed'));\n await user.click(laughedOption);\n\n expect(onChange).toHaveBeenCalledWith('1', 'Laughed');\n });\n\n it('calls onChange with correct value', async () => {\n const user = userEvent.setup();\n render(<Dropdown {...defaultProps} />);\n\n // Click button to open menu\n const button = screen.getByRole('combobox');\n await user.click(button);\n\n // Find the option by getting all options and selecting the one with \"Smiled\" text\n const options = screen.getAllByRole('option');\n const smiledOption = options.find((opt) => opt.textContent.includes('Smiled'));\n await user.click(smiledOption);\n\n expect(onChange).toHaveBeenCalledWith('1', 'Smiled');\n });\n });\n});\n"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAF,sBAAA,CAAAH,OAAA;AAAmC,SAAAD,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,wBAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,mBAAAT,CAAA,iBAAAA,CAAA,gBAAAU,OAAA,CAAAV,CAAA,0BAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,cAAAM,EAAA,IAAAd,CAAA,gBAAAc,EAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,EAAA,OAAAP,CAAA,IAAAD,CAAA,GAAAW,MAAA,CAAAC,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B,QAAQ,CAAC,CAAC6D,oBAAoB,CAAC,GAAG,EAAE,QAAQ,CAAC;UAAC;UAAA;YAAA,OAAAG,SAAA,CAAA5B,IAAA;QAAA;MAAA,GAAA0B,QAAA;IAAA,CACtD,GAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
6
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
7
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
8
+ var React = _interopRequireWildcard(require("react"));
9
+ var _react2 = require("@testing-library/react");
10
+ var _userEvent = _interopRequireDefault(require("@testing-library/user-event"));
11
+ var _input = _interopRequireDefault(require("../input"));
12
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
13
+ // Mock CorrectInput to simplify testing
14
+ jest.mock('../correct-input', function () {
15
+ return function CorrectInput(_ref) {
16
+ var value = _ref.value,
17
+ onChange = _ref.onChange,
18
+ disabled = _ref.disabled,
19
+ correct = _ref.correct,
20
+ variant = _ref.variant;
21
+ return /*#__PURE__*/React.createElement("input", {
22
+ "data-testid": "correct-input",
23
+ value: value || '',
24
+ onChange: onChange,
25
+ disabled: disabled,
26
+ "data-correct": correct,
27
+ "data-variant": variant
28
+ });
29
+ };
30
+ });
31
+ describe('Input', function () {
32
+ var onChange = jest.fn();
33
+ var defaultProps = {
34
+ disabled: false,
35
+ correct: false,
36
+ value: 'Cow',
37
+ id: '1',
38
+ onChange: onChange
39
+ };
40
+ beforeEach(function () {
41
+ onChange.mockClear();
42
+ });
43
+ describe('rendering', function () {
44
+ it('renders with default props', function () {
45
+ (0, _react2.render)(/*#__PURE__*/React.createElement(_input["default"], defaultProps));
46
+ var input = _react2.screen.getByTestId('correct-input');
47
+ expect(input).toBeInTheDocument();
48
+ expect(input).toHaveValue('Cow');
49
+ expect(input).not.toBeDisabled();
50
+ expect(input).toHaveAttribute('data-correct', 'false');
51
+ });
52
+ it('renders as disabled when disabled prop is true', function () {
53
+ (0, _react2.render)(/*#__PURE__*/React.createElement(_input["default"], (0, _extends2["default"])({}, defaultProps, {
54
+ disabled: true
55
+ })));
56
+ var input = _react2.screen.getByTestId('correct-input');
57
+ expect(input).toBeDisabled();
58
+ });
59
+ it('renders with correct state', function () {
60
+ (0, _react2.render)(/*#__PURE__*/React.createElement(_input["default"], (0, _extends2["default"])({}, defaultProps, {
61
+ correct: true
62
+ })));
63
+ var input = _react2.screen.getByTestId('correct-input');
64
+ expect(input).toHaveAttribute('data-correct', 'true');
65
+ });
66
+ it('shows correct answer when showCorrectAnswer is true', function () {
67
+ (0, _react2.render)(/*#__PURE__*/React.createElement(_input["default"], (0, _extends2["default"])({}, defaultProps, {
68
+ showCorrectAnswer: true
69
+ })));
70
+ var input = _react2.screen.getByTestId('correct-input');
71
+ expect(input).toHaveAttribute('data-correct', 'true');
72
+ });
73
+ });
74
+ describe('user interactions', function () {
75
+ it('calls onChange with id and value when user types', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
76
+ var user, input;
77
+ return _regenerator["default"].wrap(function (_context) {
78
+ while (1) switch (_context.prev = _context.next) {
79
+ case 0:
80
+ user = _userEvent["default"].setup();
81
+ (0, _react2.render)(/*#__PURE__*/React.createElement(_input["default"], (0, _extends2["default"])({}, defaultProps, {
82
+ value: ""
83
+ })));
84
+ input = _react2.screen.getByTestId('correct-input');
85
+ _context.next = 1;
86
+ return user.type(input, '20');
87
+ case 1:
88
+ // userEvent.type types character by character, so onChange is called for each character
89
+ expect(onChange).toHaveBeenCalled();
90
+ expect(onChange).toHaveBeenCalledTimes(2);
91
+ // Check the last call has both characters
92
+ expect(onChange).toHaveBeenLastCalledWith('1', '0');
93
+ case 2:
94
+ case "end":
95
+ return _context.stop();
96
+ }
97
+ }, _callee);
98
+ })));
99
+ it('calls onChange with updated value', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
100
+ var user, input;
101
+ return _regenerator["default"].wrap(function (_context2) {
102
+ while (1) switch (_context2.prev = _context2.next) {
103
+ case 0:
104
+ user = _userEvent["default"].setup();
105
+ (0, _react2.render)(/*#__PURE__*/React.createElement(_input["default"], defaultProps));
106
+ input = _react2.screen.getByTestId('correct-input');
107
+ _context2.next = 1;
108
+ return user.clear(input);
109
+ case 1:
110
+ _context2.next = 2;
111
+ return user.type(input, 'New Value');
112
+ case 2:
113
+ // userEvent.type types character by character
114
+ // After clear, we start with empty string, and each character is typed
115
+ // The last call should have the full accumulated value up to the last character
116
+ expect(onChange).toHaveBeenCalled();
117
+ // With clear + "New Value", onChange is called for clearing ("") and each typed character
118
+ // The value accumulated in the input element after typing will be "CowNew Value"
119
+ // because the component starts with value="Cow" and we clear then type
120
+ expect(onChange.mock.calls.length).toBeGreaterThan(0);
121
+ case 3:
122
+ case "end":
123
+ return _context2.stop();
124
+ }
125
+ }, _callee2);
126
+ })));
127
+ });
128
+ });
129
+ //# sourceMappingURL=input.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.test.js","names":["React","_interopRequireWildcard","require","_react2","_userEvent","_interopRequireDefault","_input","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","_typeof","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","jest","mock","CorrectInput","_ref","value","onChange","disabled","correct","variant","createElement","describe","fn","defaultProps","id","beforeEach","mockClear","it","render","input","screen","getByTestId","expect","toBeInTheDocument","toHaveValue","not","toBeDisabled","toHaveAttribute","_extends2","showCorrectAnswer","_asyncToGenerator2","_regenerator","mark","_callee","user","wrap","_context","prev","next","userEvent","setup","type","toHaveBeenCalled","toHaveBeenCalledTimes","toHaveBeenLastCalledWith","stop","_callee2","_context2","clear","calls","length","toBeGreaterThan"],"sources":["../../../src/components/__tests__/input.test.js"],"sourcesContent":["import * as React from 'react';\nimport { render, screen } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\nimport Input from '../input';\n\n// Mock CorrectInput to simplify testing\njest.mock('../correct-input', () => {\n return function CorrectInput({ value, onChange, disabled, correct, variant }) {\n return (\n <input\n data-testid=\"correct-input\"\n value={value || ''}\n onChange={onChange}\n disabled={disabled}\n data-correct={correct}\n data-variant={variant}\n />\n );\n };\n});\n\ndescribe('Input', () => {\n const onChange = jest.fn();\n const defaultProps = {\n disabled: false,\n correct: false,\n value: 'Cow',\n id: '1',\n onChange,\n };\n\n beforeEach(() => {\n onChange.mockClear();\n });\n\n describe('rendering', () => {\n it('renders with default props', () => {\n render(<Input {...defaultProps} />);\n const input = screen.getByTestId('correct-input');\n\n expect(input).toBeInTheDocument();\n expect(input).toHaveValue('Cow');\n expect(input).not.toBeDisabled();\n expect(input).toHaveAttribute('data-correct', 'false');\n });\n\n it('renders as disabled when disabled prop is true', () => {\n render(<Input {...defaultProps} disabled={true} />);\n const input = screen.getByTestId('correct-input');\n\n expect(input).toBeDisabled();\n });\n\n it('renders with correct state', () => {\n render(<Input {...defaultProps} correct={true} />);\n const input = screen.getByTestId('correct-input');\n\n expect(input).toHaveAttribute('data-correct', 'true');\n });\n\n it('shows correct answer when showCorrectAnswer is true', () => {\n render(<Input {...defaultProps} showCorrectAnswer={true} />);\n const input = screen.getByTestId('correct-input');\n\n expect(input).toHaveAttribute('data-correct', 'true');\n });\n });\n\n describe('user interactions', () => {\n it('calls onChange with id and value when user types', async () => {\n const user = userEvent.setup();\n render(<Input {...defaultProps} value=\"\" />);\n\n const input = screen.getByTestId('correct-input');\n await user.type(input, '20');\n\n // userEvent.type types character by character, so onChange is called for each character\n expect(onChange).toHaveBeenCalled();\n expect(onChange).toHaveBeenCalledTimes(2);\n // Check the last call has both characters\n expect(onChange).toHaveBeenLastCalledWith('1', '0');\n });\n\n it('calls onChange with updated value', async () => {\n const user = userEvent.setup();\n render(<Input {...defaultProps} />);\n\n const input = screen.getByTestId('correct-input');\n await user.clear(input);\n await user.type(input, 'New Value');\n\n // userEvent.type types character by character\n // After clear, we start with empty string, and each character is typed\n // The last call should have the full accumulated value up to the last character\n expect(onChange).toHaveBeenCalled();\n // With clear + \"New Value\", onChange is called for clearing (\"\") and each typed character\n // The value accumulated in the input element after typing will be \"CowNew Value\"\n // because the component starts with value=\"Cow\" and we clear then type\n expect(onChange.mock.calls.length).toBeGreaterThan(0);\n });\n });\n});\n"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,MAAA,GAAAD,sBAAA,CAAAH,OAAA;AAA6B,SAAAD,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,wBAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,mBAAAT,CAAA,iBAAAA,CAAA,gBAAAU,OAAA,CAAAV,CAAA,0BAAAA,CAAA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,9 @@ var StyledChipLabel = (0, _styles.styled)('span')(function () {
91
91
  '& mjx-frac': {
92
92
  fontSize: '120% !important'
93
93
  },
94
+ '& mjx-mn:has(~ mjx-mfrac), mjx-mfrac ~ mjx-mn': {
95
+ fontSize: '120% !important'
96
+ },
94
97
  '&.over': {
95
98
  whiteSpace: 'nowrap',
96
99
  overflow: 'hidden'
@@ -144,11 +147,19 @@ function BlankContent(_ref2) {
144
147
  }
145
148
  };
146
149
  var getMeasureNode = function getMeasureNode() {
147
- if (!spanRef.current) return null;
150
+ if (!spanRef.current) {
151
+ return null;
152
+ }
148
153
  var mjx = spanRef.current.querySelector('mjx-container');
149
- if (mjx && spanRef.current.parentElement) return spanRef.current.parentElement;
154
+ if (mjx && spanRef.current.parentElement) {
155
+ return spanRef.current.parentElement;
156
+ }
150
157
  var img = spanRef.current.querySelector('img');
151
- if (img) return img;
158
+ if (img) {
159
+ // If there's text alongside the image, measure the full span to capture both dimensions
160
+ var hasTextContent = spanRef.current.textContent.trim().length > 0;
161
+ return hasTextContent ? spanRef.current : img;
162
+ }
152
163
  return spanRef.current;
153
164
  };
154
165
  var updateDimensions = function updateDimensions() {
@@ -1 +1 @@
1
- {"version":3,"file":"blank.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_mathRendering","_debug","_core","_utilities","_styles","_Chip","_classnames","_renderUi","_colors","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","_typeof","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","log","debug","StyledContent","styled","_ref","dragged","over","border","concat","color","primary","minWidth","touchAction","overflow","whiteSpace","opacity","StyledChip","Chip","backgroundColor","background","text","fontSize","maxWidth","position","borderRadius","grey","correct","incorrect","StyledChipLabel","pointerEvents","display","padding","marginTop","marginBottom","left","top","transform","BlankContent","_ref2","_dragItem$choice","_frozenRef$current","_frozenRef$current2","disabled","choice","isOver","isDragging","dragItem","emptyResponseAreaWidth","emptyResponseAreaHeight","rootRef","useRef","spanRef","frozenRef","measuringRef","_useState","useState","height","width","_useState2","_slicedToArray2","dimensions","setDimensions","handleImageLoad","updateDimensions","handleElements","_spanRef$current","imageElement","current","querySelector","onload","setTimeout","getMeasureNode","mjx","parentElement","img","style","offsetHeight","measureNode","node","rect","getBoundingClientRect","offsetWidth","Math","max","scrollHeight","PADDING","BORDER_WIDTH","ADDITIONAL_SPACE","widthWithPadding","heightWithPadding","responseAreaWidth","parseFloat","responseAreaHeight","adjustedWidth","adjustedHeight","prevState","nextWidth","nextHeight","getRootDimensions","isNaN","rootStyle","minHeight","useEffect","IntersectionObserver","undefined","io","entries","some","isIntersecting","threshold","observe","disconnect","renderMath","value","draggedLabel","label","createElement","clickable","ref","component","Fragment","draggable","className","classnames","hidden","dangerouslySetInnerHTML","__html","parentOver","variant","defaultProps","propTypes","id","PropTypes","oneOfType","string","number","bool","duplicates","object","onChange","func","instanceId","DragDropBlank","_ref3","_dragItem$data","_useDraggable","useDraggable","data","fromChoice","type","dragAttributes","attributes","dragListeners","listeners","setDragNodeRef","setNodeRef","_useDroppable","useDroppable","accepts","setDropNodeRef","active","CSS","Translate","toString","_extends2","_default","exports"],"sources":["../../src/components/blank.jsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { renderMath } from '@pie-lib/math-rendering';\nimport debug from 'debug';\nimport { useDraggable, useDroppable } from '@dnd-kit/core';\nimport { CSS } from '@dnd-kit/utilities';\nimport { styled } from '@mui/material/styles';\nimport Chip from '@mui/material/Chip';\nimport classnames from 'classnames';\nimport { color } from '@pie-lib/render-ui';\nimport { grey } from '@mui/material/colors';\n\nconst log = debug('pie-lib:mask-markup:blank');\n\nconst StyledContent = styled('span')(({ dragged, over }) => ({\n border: `solid 0px ${color.primary()}`,\n minWidth: '200px',\n touchAction: 'none',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n opacity: 1,\n ...(over && {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n }),\n ...(dragged && {\n opacity: 0.5,\n }),\n}));\n\nconst StyledChip = styled(Chip)(() => ({\n backgroundColor: color.background(),\n border: `2px dashed ${color.text()}`,\n touchAction: 'none',\n color: color.text(),\n fontSize: 'inherit',\n maxWidth: '374px',\n position: 'relative',\n borderRadius: '3px',\n '&.over': {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n },\n '&.parentOver': {\n border: `1px solid ${grey[500]}`,\n backgroundColor: `${grey[300]}`,\n },\n '&.correct': {\n border: `solid 1px ${color.correct()}`,\n },\n '&.incorrect': {\n border: `solid 1px ${color.incorrect()}`,\n },\n '&.Mui-disabled': {\n opacity: 1,\n },\n}));\n\nconst StyledChipLabel = styled('span')(() => ({\n whiteSpace: 'normal',\n // Added for touch devices, for image content.\n // This will prevent the context menu from appearing and not allowing other interactions with the image.\n // If interactions with the image in the token will be requested we should handle only the context Menu.\n pointerEvents: 'none',\n '& img': {\n display: 'block',\n padding: '2px 0',\n },\n // Remove default <p> margins to ensure consistent spacing across all wrapped content (p, span, div, math)\n // Padding for top and bottom will instead be controlled by the container for consistent layout\n // Ensures consistent behavior with pie-api-browser, where marginTop is already removed by a Bootstrap stylesheet\n '& p': {\n marginTop: '0',\n marginBottom: '0',\n },\n '& mjx-frac': {\n fontSize: '120% !important',\n },\n '&.over': {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n },\n '&.hidden': {\n color: 'transparent',\n opacity: 0,\n },\n '&.dragged': {\n position: 'absolute',\n left: 16,\n maxWidth: '60px',\n top: '50%',\n transform: 'translateY(-50%)',\n },\n}));\n\nfunction BlankContent({\n disabled,\n choice,\n isOver,\n isDragging,\n dragItem,\n correct,\n emptyResponseAreaWidth,\n emptyResponseAreaHeight,\n}) {\n const rootRef = useRef(null);\n const spanRef = useRef(null);\n const frozenRef = useRef(null); // to use during dragging to prevent flickering\n const measuringRef = useRef(false); // guard against ResizeObserver feedback loops\n const [dimensions, setDimensions] = useState({ height: 0, width: 0 });\n\n const handleImageLoad = () => {\n updateDimensions();\n };\n\n const handleElements = () => {\n const imageElement = spanRef.current?.querySelector('img');\n if (imageElement) {\n imageElement.onload = handleImageLoad;\n } else {\n setTimeout(() => {\n updateDimensions();\n }, 300);\n }\n };\n\n const getMeasureNode = () => {\n if (!spanRef.current) return null;\n const mjx = spanRef.current.querySelector('mjx-container');\n if (mjx && spanRef.current.parentElement) return spanRef.current.parentElement;\n const img = spanRef.current.querySelector('img');\n if (img) return img;\n return spanRef.current;\n };\n\n const updateDimensions = () => {\n if (spanRef.current && rootRef.current && !measuringRef.current) {\n measuringRef.current = true;\n // Temporarily set rootRef width to 'auto' for natural measurement\n rootRef.current.style.width = 'auto';\n rootRef.current.style.height = 'auto';\n rootRef.current.offsetHeight;\n\n const measureNode = getMeasureNode();\n const node = measureNode || spanRef.current;\n const rect = node.getBoundingClientRect();\n const width = node.offsetWidth || rect.width || 0;\n const height = Math.max(\n node.offsetHeight || 0,\n rect.height || 0,\n node.scrollHeight || 0,\n spanRef.current.scrollHeight || 0,\n );\n\n const PADDING = 12;\n const BORDER_WIDTH = 2;\n const ADDITIONAL_SPACE = 1;\n // padding and border on each side\n const widthWithPadding = width + 2 * PADDING + 2 * BORDER_WIDTH + ADDITIONAL_SPACE;\n // padding and border on top and bottom\n const heightWithPadding = height + 2 * PADDING + 2 * BORDER_WIDTH + ADDITIONAL_SPACE;\n\n const responseAreaWidth = parseFloat(emptyResponseAreaWidth) || 0;\n const responseAreaHeight = parseFloat(emptyResponseAreaHeight) || 0;\n\n const adjustedWidth = widthWithPadding <= responseAreaWidth ? responseAreaWidth : widthWithPadding;\n const adjustedHeight = heightWithPadding <= responseAreaHeight ? responseAreaHeight : heightWithPadding;\n\n\n setDimensions((prevState) => ({\n width: adjustedWidth > responseAreaWidth ? adjustedWidth : prevState.width,\n height: adjustedHeight > responseAreaHeight ? adjustedHeight : prevState.height,\n }));\n\n const nextWidth = `${adjustedWidth}px`;\n const nextHeight = `${adjustedHeight}px`;\n if (rootRef.current.style.width !== nextWidth) {\n rootRef.current.style.width = nextWidth;\n }\n if (rootRef.current.style.height !== nextHeight) {\n rootRef.current.style.height = nextHeight;\n }\n measuringRef.current = false;\n }\n };\n\n const getRootDimensions = () => {\n // Handle potential non-numeric values\n const responseAreaWidth = !isNaN(parseFloat(emptyResponseAreaWidth)) ? parseFloat(emptyResponseAreaWidth) : 0;\n const responseAreaHeight = !isNaN(parseFloat(emptyResponseAreaHeight)) ? parseFloat(emptyResponseAreaHeight) : 0;\n\n const rootStyle = {\n height: dimensions.height || responseAreaHeight,\n width: dimensions.width || responseAreaWidth,\n };\n\n // add minWidth, minHeight if width and height are not defined\n return {\n ...rootStyle,\n ...(responseAreaWidth ? {} : { minWidth: 90 }),\n ...(responseAreaHeight ? {} : { minHeight: 32 }),\n };\n };\n\n useEffect(() => {\n handleElements();\n }, []);\n\n // Re-measure when the element first becomes visible — covers the tabbed-view case\n // where the initial measurement happened while the tab was hidden (size 0).\n useEffect(() => {\n if (typeof IntersectionObserver === 'undefined' || !rootRef.current) return undefined;\n const io = new IntersectionObserver(\n (entries) => {\n if (entries.some((e) => e.isIntersecting)) updateDimensions();\n },\n { threshold: 0 },\n );\n io.observe(rootRef.current);\n return () => io.disconnect();\n }, []);\n\n // Render math for the placeholder/preview when dragging over\n useEffect(() => {\n if (rootRef.current) {\n renderMath(rootRef.current);\n }\n }, [correct, isOver, dragItem?.choice?.value]);\n\n useEffect(() => {\n if (!choice) {\n setDimensions({ height: 0, width: 0 });\n return;\n }\n handleElements();\n }, [choice?.value]);\n\n useEffect(() => {\n if (!isOver && !isDragging) {\n frozenRef.current = {\n width: rootRef.current.offsetWidth,\n height: rootRef.current.offsetHeight,\n };\n }\n }, [choice, isOver, isDragging]);\n\n const draggedLabel = dragItem && isOver && dragItem.choice && dragItem.choice.value;\n const label = choice && choice.value;\n const style =\n isOver || isDragging\n ? {\n width: frozenRef.current?.width,\n height: frozenRef.current?.height,\n }\n : getRootDimensions();\n\n return (\n <StyledChip\n clickable={false}\n disabled={disabled}\n ref={rootRef}\n component=\"span\"\n label={\n <React.Fragment>\n <StyledChipLabel\n ref={spanRef}\n draggable={true}\n className={classnames({\n over: isOver,\n hidden: draggedLabel,\n })}\n dangerouslySetInnerHTML={{ __html: label || '' }}\n />\n {draggedLabel && (\n <StyledChipLabel\n draggable={true}\n className={classnames({\n over: isOver,\n dragged: true,\n })}\n dangerouslySetInnerHTML={{ __html: draggedLabel || '' }}\n />\n )}\n </React.Fragment>\n }\n className={classnames({\n over: isOver,\n parentOver: isOver,\n correct: correct !== undefined && correct,\n incorrect: correct !== undefined && !correct,\n })}\n variant={disabled ? 'outlined' : undefined}\n style={style}\n />\n );\n}\n\nBlankContent.defaultProps = {\n emptyResponseAreaWidth: 0,\n emptyResponseAreaHeight: 0,\n};\n\nBlankContent.propTypes = {\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n disabled: PropTypes.bool,\n duplicates: PropTypes.bool,\n choice: PropTypes.object,\n isOver: PropTypes.bool,\n dragItem: PropTypes.object,\n correct: PropTypes.bool,\n onChange: PropTypes.func,\n emptyResponseAreaWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n emptyResponseAreaHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n instanceId: PropTypes.string,\n};\n\n// New functional component using @dnd-kit hooks\nfunction DragDropBlank({\n id,\n disabled,\n duplicates,\n choice,\n correct,\n onChange,\n emptyResponseAreaWidth,\n emptyResponseAreaHeight,\n instanceId,\n}) {\n // Setup draggable functionality\n const {\n attributes: dragAttributes,\n listeners: dragListeners,\n setNodeRef: setDragNodeRef,\n transform,\n isDragging,\n } = useDraggable({\n id: `mask-blank-drag-${id}`,\n disabled: disabled || !choice,\n data: {\n id: id,\n choice: choice,\n instanceId: instanceId,\n fromChoice: false, // This is from a blank, not from choices\n type: 'MaskBlank',\n },\n });\n\n // Setup droppable functionality\n const {\n setNodeRef: setDropNodeRef,\n isOver,\n active: dragItem,\n } = useDroppable({\n id: `mask-blank-drop-${id}`,\n data: {\n id: id,\n accepts: ['MaskBlank'],\n instanceId: instanceId,\n },\n });\n\n // Combine refs for both drag and drop\n const setNodeRef = (node) => {\n setDragNodeRef(node);\n setDropNodeRef(node);\n };\n\n const style = {\n transform: CSS.Translate.toString(transform),\n };\n\n return (\n <StyledContent\n ref={setNodeRef}\n style={style}\n dragged={isDragging}\n over={isOver}\n {...dragAttributes}\n {...dragListeners}\n >\n <BlankContent\n id={id}\n disabled={disabled}\n duplicates={duplicates}\n choice={choice}\n isOver={isOver}\n dragItem={dragItem?.data?.current}\n correct={correct}\n onChange={onChange}\n emptyResponseAreaWidth={emptyResponseAreaWidth}\n emptyResponseAreaHeight={emptyResponseAreaHeight}\n instanceId={instanceId}\n />\n </StyledContent>\n );\n}\n\nDragDropBlank.defaultProps = {\n emptyResponseAreaWidth: 0,\n emptyResponseAreaHeight: 0,\n};\n\nDragDropBlank.propTypes = {\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n disabled: PropTypes.bool,\n duplicates: PropTypes.bool,\n choice: PropTypes.object,\n correct: PropTypes.bool,\n onChange: PropTypes.func,\n emptyResponseAreaWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n emptyResponseAreaHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n instanceId: PropTypes.string,\n};\n\nexport default DragDropBlank;\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAA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AAEA,MAAO;IACfE,QAAQ,EAAEA,QAAQ,aAARA,QAAQ,gBAAAkG,cAAA,GAARlG,QAAQ,CAAEqG,IAAI,cAAAH,cAAA,uBAAdA,cAAA,CAAgB7E,OAAQ;IAClCzC,OAAO,EAAEA,OAAQ;IACjBiH,QAAQ,EAAEA,QAAS;IACnB5F,sBAAsB,EAAEA,sBAAuB;IAC/CC,uBAAuB,EAAEA,uBAAwB;IACjD6F,UAAU,EAAEA;EAAW,CACxB,CACY,CAAC;AAEpB;AAEAC,aAAa,CAACb,YAAY,GAAG;EAC3BlF,sBAAsB,EAAE,CAAC;EACzBC,uBAAuB,EAAE;AAC3B,CAAC;AAED8F,aAAa,CAACZ,SAAS,GAAG;EACxBC,EAAE,EAAEC,qBAAS,CAACC,SAAS,CAAC,CAACD,qBAAS,CAACE,MAAM,EAAEF,qBAAS,CAACG,MAAM,CAAC,CAAC;EAC7D7F,QAAQ,EAAE0F,qBAAS,CAACI,IAAI;EACxBC,UAAU,EAAEL,qBAAS,CAACI,IAAI;EAC1B7F,MAAM,EAAEyF,qBAAS,CAACM,MAAM;EACxBhH,OAAO,EAAE0G,qBAAS,CAACI,IAAI;EACvBG,QAAQ,EAAEP,qBAAS,CAACQ,IAAI;EACxB7F,sBAAsB,EAAEqF,qBAAS,CAACC,SAAS,CAAC,CAACD,qBAAS,CAACE,MAAM,EAAEF,qBAAS,CAACG,MAAM,CAAC,CAAC;EACjFvF,uBAAuB,EAAEoF,qBAAS,CAACC,SAAS,CAAC,CAACD,qBAAS,CAACE,MAAM,EAAEF,qBAAS,CAACG,MAAM,CAAC,CAAC;EAClFM,UAAU,EAAET,qBAAS,CAACE;AACxB,CAAC;AAAC,IAAA+B,QAAA,GAAAC,OAAA,cAEaxB,aAAa","ignoreList":[]}
1
+ {"version":3,"file":"blank.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_mathRendering","_debug","_core","_utilities","_styles","_Chip","_classnames","_renderUi","_colors","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","_typeof","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","log","debug","StyledContent","styled","_ref","dragged","over","border","concat","color","primary","minWidth","touchAction","overflow","whiteSpace","opacity","StyledChip","Chip","backgroundColor","background","text","fontSize","maxWidth","position","borderRadius","grey","correct","incorrect","StyledChipLabel","pointerEvents","display","padding","marginTop","marginBottom","left","top","transform","BlankContent","_ref2","_dragItem$choice","_frozenRef$current","_frozenRef$current2","disabled","choice","isOver","isDragging","dragItem","emptyResponseAreaWidth","emptyResponseAreaHeight","rootRef","useRef","spanRef","frozenRef","measuringRef","_useState","useState","height","width","_useState2","_slicedToArray2","dimensions","setDimensions","handleImageLoad","updateDimensions","handleElements","_spanRef$current","imageElement","current","querySelector","onload","setTimeout","getMeasureNode","mjx","parentElement","img","hasTextContent","textContent","trim","style","offsetHeight","measureNode","node","rect","getBoundingClientRect","offsetWidth","Math","max","scrollHeight","PADDING","BORDER_WIDTH","ADDITIONAL_SPACE","widthWithPadding","heightWithPadding","responseAreaWidth","parseFloat","responseAreaHeight","adjustedWidth","adjustedHeight","prevState","nextWidth","nextHeight","getRootDimensions","isNaN","rootStyle","minHeight","useEffect","IntersectionObserver","undefined","io","entries","some","isIntersecting","threshold","observe","disconnect","renderMath","value","draggedLabel","label","createElement","clickable","ref","component","Fragment","draggable","className","classnames","hidden","dangerouslySetInnerHTML","__html","parentOver","variant","defaultProps","propTypes","id","PropTypes","oneOfType","string","number","bool","duplicates","object","onChange","func","instanceId","DragDropBlank","_ref3","_dragItem$data","_useDraggable","useDraggable","data","fromChoice","type","dragAttributes","attributes","dragListeners","listeners","setDragNodeRef","setNodeRef","_useDroppable","useDroppable","accepts","setDropNodeRef","active","CSS","Translate","toString","_extends2","_default","exports"],"sources":["../../src/components/blank.jsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { renderMath } from '@pie-lib/math-rendering';\nimport debug from 'debug';\nimport { useDraggable, useDroppable } from '@dnd-kit/core';\nimport { CSS } from '@dnd-kit/utilities';\nimport { styled } from '@mui/material/styles';\nimport Chip from '@mui/material/Chip';\nimport classnames from 'classnames';\nimport { color } from '@pie-lib/render-ui';\nimport { grey } from '@mui/material/colors';\n\nconst log = debug('pie-lib:mask-markup:blank');\n\nconst StyledContent = styled('span')(({ dragged, over }) => ({\n border: `solid 0px ${color.primary()}`,\n minWidth: '200px',\n touchAction: 'none',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n opacity: 1,\n ...(over && {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n }),\n ...(dragged && {\n opacity: 0.5,\n }),\n}));\n\nconst StyledChip = styled(Chip)(() => ({\n backgroundColor: color.background(),\n border: `2px dashed ${color.text()}`,\n touchAction: 'none',\n color: color.text(),\n fontSize: 'inherit',\n maxWidth: '374px',\n position: 'relative',\n borderRadius: '3px',\n '&.over': {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n },\n '&.parentOver': {\n border: `1px solid ${grey[500]}`,\n backgroundColor: `${grey[300]}`,\n },\n '&.correct': {\n border: `solid 1px ${color.correct()}`,\n },\n '&.incorrect': {\n border: `solid 1px ${color.incorrect()}`,\n },\n '&.Mui-disabled': {\n opacity: 1,\n },\n}));\n\nconst StyledChipLabel = styled('span')(() => ({\n whiteSpace: 'normal',\n // Added for touch devices, for image content.\n // This will prevent the context menu from appearing and not allowing other interactions with the image.\n // If interactions with the image in the token will be requested we should handle only the context Menu.\n pointerEvents: 'none',\n '& img': {\n display: 'block',\n padding: '2px 0',\n },\n // Remove default <p> margins to ensure consistent spacing across all wrapped content (p, span, div, math)\n // Padding for top and bottom will instead be controlled by the container for consistent layout\n // Ensures consistent behavior with pie-api-browser, where marginTop is already removed by a Bootstrap stylesheet\n '& p': {\n marginTop: '0',\n marginBottom: '0',\n },\n '& mjx-frac': {\n fontSize: '120% !important',\n },\n '& mjx-mn:has(~ mjx-mfrac), mjx-mfrac ~ mjx-mn': {\n fontSize: '120% !important',\n },\n '&.over': {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n },\n '&.hidden': {\n color: 'transparent',\n opacity: 0,\n },\n '&.dragged': {\n position: 'absolute',\n left: 16,\n maxWidth: '60px',\n top: '50%',\n transform: 'translateY(-50%)',\n },\n}));\n\nfunction BlankContent({\n disabled,\n choice,\n isOver,\n isDragging,\n dragItem,\n correct,\n emptyResponseAreaWidth,\n emptyResponseAreaHeight,\n}) {\n const rootRef = useRef(null);\n const spanRef = useRef(null);\n const frozenRef = useRef(null); // to use during dragging to prevent flickering\n const measuringRef = useRef(false); // guard against ResizeObserver feedback loops\n const [dimensions, setDimensions] = useState({ height: 0, width: 0 });\n\n const handleImageLoad = () => {\n updateDimensions();\n };\n\n const handleElements = () => {\n const imageElement = spanRef.current?.querySelector('img');\n if (imageElement) {\n imageElement.onload = handleImageLoad;\n } else {\n setTimeout(() => {\n updateDimensions();\n }, 300);\n }\n };\n\n const getMeasureNode = () => {\n if (!spanRef.current) {\n return null;\n }\n\n const mjx = spanRef.current.querySelector('mjx-container');\n\n if (mjx && spanRef.current.parentElement) {\n return spanRef.current.parentElement;\n }\n\n const img = spanRef.current.querySelector('img');\n\n if (img) {\n // If there's text alongside the image, measure the full span to capture both dimensions\n const hasTextContent = spanRef.current.textContent.trim().length > 0;\n\n return hasTextContent ? spanRef.current : img;\n }\n\n return spanRef.current;\n };\n\n const updateDimensions = () => {\n if (spanRef.current && rootRef.current && !measuringRef.current) {\n measuringRef.current = true;\n // Temporarily set rootRef width to 'auto' for natural measurement\n rootRef.current.style.width = 'auto';\n rootRef.current.style.height = 'auto';\n rootRef.current.offsetHeight;\n\n const measureNode = getMeasureNode();\n const node = measureNode || spanRef.current;\n const rect = node.getBoundingClientRect();\n const width = node.offsetWidth || rect.width || 0;\n const height = Math.max(\n node.offsetHeight || 0,\n rect.height || 0,\n node.scrollHeight || 0,\n spanRef.current.scrollHeight || 0,\n );\n\n const PADDING = 12;\n const BORDER_WIDTH = 2;\n const ADDITIONAL_SPACE = 1;\n // padding and border on each side\n const widthWithPadding = width + 2 * PADDING + 2 * BORDER_WIDTH + ADDITIONAL_SPACE;\n // padding and border on top and bottom\n const heightWithPadding = height + 2 * PADDING + 2 * BORDER_WIDTH + ADDITIONAL_SPACE;\n\n const responseAreaWidth = parseFloat(emptyResponseAreaWidth) || 0;\n const responseAreaHeight = parseFloat(emptyResponseAreaHeight) || 0;\n\n const adjustedWidth = widthWithPadding <= responseAreaWidth ? responseAreaWidth : widthWithPadding;\n const adjustedHeight = heightWithPadding <= responseAreaHeight ? responseAreaHeight : heightWithPadding;\n\n setDimensions((prevState) => ({\n width: adjustedWidth > responseAreaWidth ? adjustedWidth : prevState.width,\n height: adjustedHeight > responseAreaHeight ? adjustedHeight : prevState.height,\n }));\n\n const nextWidth = `${adjustedWidth}px`;\n const nextHeight = `${adjustedHeight}px`;\n if (rootRef.current.style.width !== nextWidth) {\n rootRef.current.style.width = nextWidth;\n }\n if (rootRef.current.style.height !== nextHeight) {\n rootRef.current.style.height = nextHeight;\n }\n measuringRef.current = false;\n }\n };\n\n const getRootDimensions = () => {\n // Handle potential non-numeric values\n const responseAreaWidth = !isNaN(parseFloat(emptyResponseAreaWidth)) ? parseFloat(emptyResponseAreaWidth) : 0;\n const responseAreaHeight = !isNaN(parseFloat(emptyResponseAreaHeight)) ? parseFloat(emptyResponseAreaHeight) : 0;\n\n const rootStyle = {\n height: dimensions.height || responseAreaHeight,\n width: dimensions.width || responseAreaWidth,\n };\n\n // add minWidth, minHeight if width and height are not defined\n return {\n ...rootStyle,\n ...(responseAreaWidth ? {} : { minWidth: 90 }),\n ...(responseAreaHeight ? {} : { minHeight: 32 }),\n };\n };\n\n useEffect(() => {\n handleElements();\n }, []);\n\n // Re-measure when the element first becomes visible — covers the tabbed-view case\n // where the initial measurement happened while the tab was hidden (size 0).\n useEffect(() => {\n if (typeof IntersectionObserver === 'undefined' || !rootRef.current) return undefined;\n const io = new IntersectionObserver(\n (entries) => {\n if (entries.some((e) => e.isIntersecting)) updateDimensions();\n },\n { threshold: 0 },\n );\n io.observe(rootRef.current);\n return () => io.disconnect();\n }, []);\n\n // Render math for the placeholder/preview when dragging over\n useEffect(() => {\n if (rootRef.current) {\n renderMath(rootRef.current);\n }\n }, [correct, isOver, dragItem?.choice?.value]);\n\n useEffect(() => {\n if (!choice) {\n setDimensions({ height: 0, width: 0 });\n return;\n }\n handleElements();\n }, [choice?.value]);\n\n useEffect(() => {\n if (!isOver && !isDragging) {\n frozenRef.current = {\n width: rootRef.current.offsetWidth,\n height: rootRef.current.offsetHeight,\n };\n }\n }, [choice, isOver, isDragging]);\n\n const draggedLabel = dragItem && isOver && dragItem.choice && dragItem.choice.value;\n const label = choice && choice.value;\n const style =\n isOver || isDragging\n ? {\n width: frozenRef.current?.width,\n height: frozenRef.current?.height,\n }\n : getRootDimensions();\n\n return (\n <StyledChip\n clickable={false}\n disabled={disabled}\n ref={rootRef}\n component=\"span\"\n label={\n <React.Fragment>\n <StyledChipLabel\n ref={spanRef}\n draggable={true}\n className={classnames({\n over: isOver,\n hidden: draggedLabel,\n })}\n dangerouslySetInnerHTML={{ __html: label || '' }}\n />\n {draggedLabel && (\n <StyledChipLabel\n draggable={true}\n className={classnames({\n over: isOver,\n dragged: true,\n })}\n dangerouslySetInnerHTML={{ __html: draggedLabel || '' }}\n />\n )}\n </React.Fragment>\n }\n className={classnames({\n over: isOver,\n parentOver: isOver,\n correct: correct !== undefined && correct,\n incorrect: correct !== undefined && !correct,\n })}\n variant={disabled ? 'outlined' : undefined}\n style={style}\n />\n );\n}\n\nBlankContent.defaultProps = {\n emptyResponseAreaWidth: 0,\n emptyResponseAreaHeight: 0,\n};\n\nBlankContent.propTypes = {\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n disabled: PropTypes.bool,\n duplicates: PropTypes.bool,\n choice: PropTypes.object,\n isOver: PropTypes.bool,\n dragItem: PropTypes.object,\n correct: PropTypes.bool,\n onChange: PropTypes.func,\n emptyResponseAreaWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n emptyResponseAreaHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n instanceId: PropTypes.string,\n};\n\n// New functional component using @dnd-kit hooks\nfunction DragDropBlank({\n id,\n disabled,\n duplicates,\n choice,\n correct,\n onChange,\n emptyResponseAreaWidth,\n emptyResponseAreaHeight,\n instanceId,\n}) {\n // Setup draggable functionality\n const {\n attributes: dragAttributes,\n listeners: dragListeners,\n setNodeRef: setDragNodeRef,\n transform,\n isDragging,\n } = useDraggable({\n id: `mask-blank-drag-${id}`,\n disabled: disabled || !choice,\n data: {\n id: id,\n choice: choice,\n instanceId: instanceId,\n fromChoice: false, // This is from a blank, not from choices\n type: 'MaskBlank',\n },\n });\n\n // Setup droppable functionality\n const {\n setNodeRef: setDropNodeRef,\n isOver,\n active: dragItem,\n } = useDroppable({\n id: `mask-blank-drop-${id}`,\n data: {\n id: id,\n accepts: ['MaskBlank'],\n instanceId: instanceId,\n },\n });\n\n // Combine refs for both drag and drop\n const setNodeRef = (node) => {\n setDragNodeRef(node);\n setDropNodeRef(node);\n };\n\n const style = {\n transform: CSS.Translate.toString(transform),\n };\n\n return (\n <StyledContent\n ref={setNodeRef}\n style={style}\n dragged={isDragging}\n over={isOver}\n {...dragAttributes}\n {...dragListeners}\n >\n <BlankContent\n id={id}\n disabled={disabled}\n duplicates={duplicates}\n choice={choice}\n isOver={isOver}\n dragItem={dragItem?.data?.current}\n correct={correct}\n onChange={onChange}\n emptyResponseAreaWidth={emptyResponseAreaWidth}\n emptyResponseAreaHeight={emptyResponseAreaHeight}\n instanceId={instanceId}\n />\n </StyledContent>\n );\n}\n\nDragDropBlank.defaultProps = {\n emptyResponseAreaWidth: 0,\n emptyResponseAreaHeight: 0,\n};\n\nDragDropBlank.propTypes = {\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n disabled: PropTypes.bool,\n duplicates: PropTypes.bool,\n choice: PropTypes.object,\n correct: PropTypes.bool,\n onChange: PropTypes.func,\n emptyResponseAreaWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n emptyResponseAreaHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n instanceId: PropTypes.string,\n};\n\nexport default DragDropBlank;\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,WAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AACA,IAAAW,OAAA,GAAAX,OAAA;AAA4C,SAAAD,wBAAAa,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAf,uBAAA,YAAAA,wBAAAa,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,mBAAAT,CAAA,iBAAAA,CAAA,gBAAAU,OAAA,CAAAV,CAAA,0BAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,C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Aa,CAACZ,SAAS,GAAG;EACxBC,EAAE,EAAEC,qBAAS,CAACC,SAAS,CAAC,CAACD,qBAAS,CAACE,MAAM,EAAEF,qBAAS,CAACG,MAAM,CAAC,CAAC;EAC7DhG,QAAQ,EAAE6F,qBAAS,CAACI,IAAI;EACxBC,UAAU,EAAEL,qBAAS,CAACI,IAAI;EAC1BhG,MAAM,EAAE4F,qBAAS,CAACM,MAAM;EACxBnH,OAAO,EAAE6G,qBAAS,CAACI,IAAI;EACvBG,QAAQ,EAAEP,qBAAS,CAACQ,IAAI;EACxBhG,sBAAsB,EAAEwF,qBAAS,CAACC,SAAS,CAAC,CAACD,qBAAS,CAACE,MAAM,EAAEF,qBAAS,CAACG,MAAM,CAAC,CAAC;EACjF1F,uBAAuB,EAAEuF,qBAAS,CAACC,SAAS,CAAC,CAACD,qBAAS,CAACE,MAAM,EAAEF,qBAAS,CAACG,MAAM,CAAC,CAAC;EAClFM,UAAU,EAAET,qBAAS,CAACE;AACxB,CAAC;AAAC,IAAA+B,QAAA,GAAAC,OAAA,cAEaxB,aAAa","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-lib/mask-markup",
3
- "version": "3.0.12",
3
+ "version": "3.1.0-beta",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "src/index.js",
@@ -13,10 +13,10 @@
13
13
  "@emotion/styled": "^11.14.1",
14
14
  "@mui/icons-material": "^7.3.4",
15
15
  "@mui/material": "^7.3.4",
16
- "@pie-lib/drag": "^4.0.6",
17
- "@pie-lib/editable-html-tip-tap": "^2.1.10",
18
- "@pie-lib/math-rendering": "^5.1.0",
19
- "@pie-lib/render-ui": "^6.1.3",
16
+ "@pie-lib/drag": "^4.0.2",
17
+ "@pie-lib/editable-html-tip-tap": "^2.2.0-beta",
18
+ "@pie-lib/math-rendering": "^5.0.2",
19
+ "@pie-lib/render-ui": "^6.1.0",
20
20
  "classnames": "^2.2.6",
21
21
  "debug": "^4.1.1",
22
22
  "lodash-es": "^4.17.23",
@@ -28,5 +28,5 @@
28
28
  "keywords": [],
29
29
  "author": "",
30
30
  "license": "ISC",
31
- "gitHead": "71d88b032a54ee9ffca51add8c0341a9e1ef780f"
31
+ "gitHead": "433bcb776c2975739e7417f133d31cd996164116"
32
32
  }