@pie-element/extended-text-entry 15.2.2-beta.2 → 15.2.2
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/CHANGELOG.md +53 -25
- package/configure/CHANGELOG.md +44 -25
- package/configure/package.json +3 -3
- package/controller/CHANGELOG.md +6 -36
- package/controller/lib/index.js +3 -1
- package/controller/lib/index.js.map +1 -1
- package/controller/package.json +1 -1
- package/docs/demo/PIE-927-math-repro.md +170 -0
- package/lib/annotation/annotation-menu.js +17 -14
- package/lib/annotation/annotation-menu.js.map +1 -1
- package/lib/annotation/freeform-editor.js +11 -12
- package/lib/annotation/freeform-editor.js.map +1 -1
- package/module/configure.js +1 -0
- package/module/controller.js +141 -0
- package/module/demo.js +38 -0
- package/module/element.js +1 -0
- package/module/index.html +21 -0
- package/module/manifest.json +18 -0
- package/module/print-demo.js +76 -0
- package/module/print.html +18 -0
- package/module/print.js +1 -0
- package/package.json +5 -5
- package/configure/lib/__tests__/main.test.js +0 -123
- package/controller/lib/__tests__/index.test.js +0 -350
- package/docs/demo/pie.manifest.json +0 -11
- package/lib/__tests__/index.test.js +0 -37
- package/lib/annotation/__tests__/annotation-editor.test.js +0 -326
- package/lib/annotation/__tests__/freeform-editor.test.js +0 -136
package/CHANGELOG.md
CHANGED
|
@@ -3,64 +3,92 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [15.2.2
|
|
6
|
+
## [15.2.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@15.2.1...@pie-element/extended-text-entry@15.2.2) (2026-09-04)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- bump libs PIE-978, PIE-980 ([96489ba](https://github.com/pie-framework/pie-elements/commit/96489ba3c220604f21c3ce4500d79f4389266e9e))
|
|
11
|
+
- **extended-text-entry:** honor the player spellcheck setting PIE-978 ([b0a3312](https://github.com/pie-framework/pie-elements/commit/b0a331236f963464a67834e97d8587cd7f23beaa))
|
|
12
|
+
- **extended-text-entry:** read the spellcheck flag strictly PIE-978 ([61507a7](https://github.com/pie-framework/pie-elements/commit/61507a7506734fb62e5f0ccf74bf3e57902a07db))
|
|
9
13
|
|
|
10
|
-
|
|
14
|
+
## [15.2.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@15.2.0...@pie-element/extended-text-entry@15.2.1) (2026-08-26)
|
|
11
15
|
|
|
12
16
|
**Note:** Version bump only for package @pie-element/extended-text-entry
|
|
13
17
|
|
|
14
|
-
# [15.
|
|
18
|
+
# [15.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@15.1.11...@pie-element/extended-text-entry@15.2.0) (2026-08-21)
|
|
15
19
|
|
|
16
|
-
|
|
20
|
+
### Bug Fixes
|
|
17
21
|
|
|
18
|
-
|
|
22
|
+
- move [@pie-lib](https://github.com/pie-lib) deps back to latest, off next prereleases PIE-927 ([a53e012](https://github.com/pie-framework/pie-elements/commit/a53e0127eb4ac95ece54e1e2bd669ae4974f4251))
|
|
23
|
+
- read the prompt container by class, not by the id pie-lib removed PIE-927 ([aaaf6c2](https://github.com/pie-framework/pie-elements/commit/aaaf6c2f189de3b39f9de85969aeb2e50376c548))
|
|
24
|
+
- restore demo setup PIE-927 ([c1bf7f3](https://github.com/pie-framework/pie-elements/commit/c1bf7f323f5895cef8ca0d3af9dc76f20805c3da))
|
|
25
|
+
- **theming:** move the grey palette reads onto --pie-\* tokens PIE-856 ([d7d005b](https://github.com/pie-framework/pie-elements/commit/d7d005bf081843335b4b0377852f2ecd075cb62d)), closes [#000000](https://github.com/pie-framework/pie-elements/issues/000000) [#E0E1E6](https://github.com/pie-framework/pie-elements/issues/E0E1E6) [#646464](https://github.com/pie-framework/pie-elements/issues/646464) [#616161](https://github.com/pie-framework/pie-elements/issues/616161) [#E0E1E6](https://github.com/pie-framework/pie-elements/issues/E0E1E6) [#C0C3](https://github.com/pie-framework/pie-elements/issues/C0C3)
|
|
19
26
|
|
|
20
|
-
|
|
27
|
+
### Features
|
|
21
28
|
|
|
22
|
-
|
|
29
|
+
- bump libs PIE-856, PIE-681, PIE-927 ([cb26d7a](https://github.com/pie-framework/pie-elements/commit/cb26d7afa6c99522533c321d5ff8ce3148a66e9e))
|
|
23
30
|
|
|
24
|
-
|
|
31
|
+
## [15.1.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@15.1.10...@pie-element/extended-text-entry@15.1.11) (2026-08-19)
|
|
25
32
|
|
|
26
|
-
|
|
33
|
+
### Bug Fixes
|
|
27
34
|
|
|
28
|
-
|
|
35
|
+
- bump libs and shared modules PIE-681, PIE-708 ([08af8b5](https://github.com/pie-framework/pie-elements/commit/08af8b5802aecc8ee5454a1b6d60277d7ec94204))
|
|
29
36
|
|
|
30
|
-
|
|
37
|
+
## [15.1.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@15.1.8...@pie-element/extended-text-entry@15.1.10) (2026-08-13)
|
|
31
38
|
|
|
32
39
|
**Note:** Version bump only for package @pie-element/extended-text-entry
|
|
33
40
|
|
|
34
|
-
|
|
41
|
+
## [15.1.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@15.1.7...@pie-element/extended-text-entry@15.1.9) (2026-08-11)
|
|
35
42
|
|
|
36
43
|
**Note:** Version bump only for package @pie-element/extended-text-entry
|
|
37
44
|
|
|
38
|
-
|
|
45
|
+
## [15.1.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@15.1.7...@pie-element/extended-text-entry@15.1.8) (2026-07-31)
|
|
39
46
|
|
|
40
47
|
**Note:** Version bump only for package @pie-element/extended-text-entry
|
|
41
48
|
|
|
42
|
-
|
|
49
|
+
## [15.1.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@15.1.6...@pie-element/extended-text-entry@15.1.7) (2026-07-08)
|
|
43
50
|
|
|
44
|
-
|
|
51
|
+
### Bug Fixes
|
|
45
52
|
|
|
46
|
-
|
|
53
|
+
- bump libs & shared modules PIE-706, PIE-702, PIE-679, PIE-698 ([5b1a8c4](https://github.com/pie-framework/pie-elements/commit/5b1a8c4c3eba2126fc43d78fd0187e7cd11d5424))
|
|
47
54
|
|
|
48
|
-
|
|
55
|
+
## [15.1.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@15.1.5...@pie-element/extended-text-entry@15.1.6) (2026-07-02)
|
|
49
56
|
|
|
50
|
-
|
|
57
|
+
### Bug Fixes
|
|
58
|
+
|
|
59
|
+
- bump shared modules and libs PIE-695, PIE-697, PIE-699, PIE-680, PIE-714, PIE-665, PIE-656 ([4b76ae7](https://github.com/pie-framework/pie-elements/commit/4b76ae75d1c5ea6d55f7c6fb53f299dfcbda2b1f))
|
|
60
|
+
- sync libs versions ([48b5be9](https://github.com/pie-framework/pie-elements/commit/48b5be9559eb5b5235ca05f51c5f0161032a7041))
|
|
61
|
+
|
|
62
|
+
## [15.1.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@15.1.4...@pie-element/extended-text-entry@15.1.5) (2026-06-22)
|
|
51
63
|
|
|
52
64
|
### Bug Fixes
|
|
53
65
|
|
|
54
|
-
- bump libs & shared modules PIE-706, PIE-702, PIE-679, PIE-698 ([5b1a8c4](https://github.com/pie-framework/pie-elements/commit/5b1a8c4c3eba2126fc43d78fd0187e7cd11d5424))
|
|
55
|
-
- bump shared modules and libs PIE-600, PIE-602 ([ce99f6a](https://github.com/pie-framework/pie-elements/commit/ce99f6af50cb855b666a6df9340f9f5445fde4c4))
|
|
56
|
-
- bump shared modules and libs PIE-661 PIE-664 PIE-683 PIE-666 PIE-656 PIE-657 PIE-658 PIE-659 PIE-670 ([ebd6be4](https://github.com/pie-framework/pie-elements/commit/ebd6be4fd48fca41ad4c4908f606b25334731aed))
|
|
57
66
|
- bump shared modules and libs PIE-674, PIE-662, PIE-705, PIE-674, PIE-963 ([78a3f64](https://github.com/pie-framework/pie-elements/commit/78a3f64652c9581c61bd4159f3210fc1e32d8bcf))
|
|
58
|
-
- bump shared modules and libs PIE-695, PIE-697, PIE-699, PIE-680, PIE-714, PIE-665, PIE-656 ([4b76ae7](https://github.com/pie-framework/pie-elements/commit/4b76ae75d1c5ea6d55f7c6fb53f299dfcbda2b1f))
|
|
59
|
-
- bump shared modules and libsPIE-603, PIE-604, PIE-663, PIE-662, PIE-678 ([e61c7a7](https://github.com/pie-framework/pie-elements/commit/e61c7a7d23744586337dfbb17a18ebfc656c202f))
|
|
60
67
|
- **extended-text-entry:** ensure StyledPrompt is displayed as a block element PIE-692 ([a230a25](https://github.com/pie-framework/pie-elements/commit/a230a253451996a15fb24adfc53f43c5e7550fa5))
|
|
61
68
|
- **extended-text-entry:** re-render elements on reconnect PIE-672 ([9b241e8](https://github.com/pie-framework/pie-elements/commit/9b241e850263da72de72692265d244dbb023e3a1))
|
|
62
69
|
- if allowMultiplePlacements default should be false PIE-682 ([b7447f4](https://github.com/pie-framework/pie-elements/commit/b7447f4d97e9d7cc2415f54a17ffe13ed15d1ebb))
|
|
63
|
-
|
|
70
|
+
|
|
71
|
+
## [15.1.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@15.1.3...@pie-element/extended-text-entry@15.1.4) (2026-06-17)
|
|
72
|
+
|
|
73
|
+
### Bug Fixes
|
|
74
|
+
|
|
75
|
+
- bump shared modules and libs PIE-661 PIE-664 PIE-683 PIE-666 PIE-656 PIE-657 PIE-658 PIE-659 PIE-670 ([ebd6be4](https://github.com/pie-framework/pie-elements/commit/ebd6be4fd48fca41ad4c4908f606b25334731aed))
|
|
76
|
+
|
|
77
|
+
## [15.1.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@15.1.2...@pie-element/extended-text-entry@15.1.3) (2026-06-12)
|
|
78
|
+
|
|
79
|
+
### Bug Fixes
|
|
80
|
+
|
|
81
|
+
- bump shared modules and libsPIE-603, PIE-604, PIE-663, PIE-662, PIE-678 ([e61c7a7](https://github.com/pie-framework/pie-elements/commit/e61c7a7d23744586337dfbb17a18ebfc656c202f))
|
|
82
|
+
|
|
83
|
+
## [15.1.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@15.1.1...@pie-element/extended-text-entry@15.1.2) (2026-06-04)
|
|
84
|
+
|
|
85
|
+
### Bug Fixes
|
|
86
|
+
|
|
87
|
+
- bump shared modules and libs PIE-600, PIE-602 ([ce99f6a](https://github.com/pie-framework/pie-elements/commit/ce99f6af50cb855b666a6df9340f9f5445fde4c4))
|
|
88
|
+
|
|
89
|
+
## [15.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@15.1.0...@pie-element/extended-text-entry@15.1.1) (2026-05-21)
|
|
90
|
+
|
|
91
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry
|
|
64
92
|
|
|
65
93
|
# [15.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@15.1.0-next.1...@pie-element/extended-text-entry@15.1.0) (2026-05-21)
|
|
66
94
|
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,63 +3,82 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
## [13.2.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@13.2.1...@pie-element/extended-text-entry-configure@13.2.2) (2026-09-04)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- bump libs PIE-978, PIE-980 ([96489ba](https://github.com/pie-framework/pie-elements/commit/96489ba3c220604f21c3ce4500d79f4389266e9e))
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
## [13.2.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@13.2.0...@pie-element/extended-text-entry-configure@13.2.1) (2026-08-26)
|
|
11
13
|
|
|
12
14
|
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
13
15
|
|
|
14
|
-
# [13.
|
|
16
|
+
# [13.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@13.1.11...@pie-element/extended-text-entry-configure@13.2.0) (2026-08-21)
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
### Features
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
- bump libs PIE-856, PIE-681, PIE-927 ([cb26d7a](https://github.com/pie-framework/pie-elements/commit/cb26d7afa6c99522533c321d5ff8ce3148a66e9e))
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
## [13.1.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@13.1.10...@pie-element/extended-text-entry-configure@13.1.11) (2026-08-19)
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
### Bug Fixes
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
- bump libs and shared modules PIE-681, PIE-708 ([08af8b5](https://github.com/pie-framework/pie-elements/commit/08af8b5802aecc8ee5454a1b6d60277d7ec94204))
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
## [13.1.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@13.1.8...@pie-element/extended-text-entry-configure@13.1.10) (2026-08-13)
|
|
27
29
|
|
|
28
30
|
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
29
31
|
|
|
30
|
-
|
|
32
|
+
## [13.1.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@13.1.7...@pie-element/extended-text-entry-configure@13.1.9) (2026-08-11)
|
|
31
33
|
|
|
32
34
|
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
## [13.1.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@13.1.7...@pie-element/extended-text-entry-configure@13.1.8) (2026-07-31)
|
|
35
37
|
|
|
36
38
|
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
37
39
|
|
|
38
|
-
|
|
40
|
+
## [13.1.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@13.1.6...@pie-element/extended-text-entry-configure@13.1.7) (2026-07-08)
|
|
39
41
|
|
|
40
|
-
|
|
42
|
+
### Bug Fixes
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
- bump libs & shared modules PIE-706, PIE-702, PIE-679, PIE-698 ([5b1a8c4](https://github.com/pie-framework/pie-elements/commit/5b1a8c4c3eba2126fc43d78fd0187e7cd11d5424))
|
|
43
45
|
|
|
44
|
-
|
|
46
|
+
## [13.1.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@13.1.5...@pie-element/extended-text-entry-configure@13.1.6) (2026-07-02)
|
|
45
47
|
|
|
46
|
-
|
|
48
|
+
### Bug Fixes
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
- bump shared modules and libs PIE-695, PIE-697, PIE-699, PIE-680, PIE-714, PIE-665, PIE-656 ([4b76ae7](https://github.com/pie-framework/pie-elements/commit/4b76ae75d1c5ea6d55f7c6fb53f299dfcbda2b1f))
|
|
51
|
+
- sync libs versions ([48b5be9](https://github.com/pie-framework/pie-elements/commit/48b5be9559eb5b5235ca05f51c5f0161032a7041))
|
|
49
52
|
|
|
50
|
-
|
|
53
|
+
## [13.1.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@13.1.4...@pie-element/extended-text-entry-configure@13.1.5) (2026-06-22)
|
|
51
54
|
|
|
52
55
|
### Bug Fixes
|
|
53
56
|
|
|
54
|
-
- bump libs & shared modules PIE-706, PIE-702, PIE-679, PIE-698 ([5b1a8c4](https://github.com/pie-framework/pie-elements/commit/5b1a8c4c3eba2126fc43d78fd0187e7cd11d5424))
|
|
55
|
-
- bump shared modules and libs PIE-600, PIE-602 ([ce99f6a](https://github.com/pie-framework/pie-elements/commit/ce99f6af50cb855b666a6df9340f9f5445fde4c4))
|
|
56
|
-
- bump shared modules and libs PIE-661 PIE-664 PIE-683 PIE-666 PIE-656 PIE-657 PIE-658 PIE-659 PIE-670 ([ebd6be4](https://github.com/pie-framework/pie-elements/commit/ebd6be4fd48fca41ad4c4908f606b25334731aed))
|
|
57
57
|
- bump shared modules and libs PIE-674, PIE-662, PIE-705, PIE-674, PIE-963 ([78a3f64](https://github.com/pie-framework/pie-elements/commit/78a3f64652c9581c61bd4159f3210fc1e32d8bcf))
|
|
58
|
-
- bump shared modules and libs PIE-695, PIE-697, PIE-699, PIE-680, PIE-714, PIE-665, PIE-656 ([4b76ae7](https://github.com/pie-framework/pie-elements/commit/4b76ae75d1c5ea6d55f7c6fb53f299dfcbda2b1f))
|
|
59
|
-
- bump shared modules and libsPIE-603, PIE-604, PIE-663, PIE-662, PIE-678 ([e61c7a7](https://github.com/pie-framework/pie-elements/commit/e61c7a7d23744586337dfbb17a18ebfc656c202f))
|
|
60
58
|
- **extended-text-entry:** re-render elements on reconnect PIE-672 ([9b241e8](https://github.com/pie-framework/pie-elements/commit/9b241e850263da72de72692265d244dbb023e3a1))
|
|
61
59
|
- if allowMultiplePlacements default should be false PIE-682 ([b7447f4](https://github.com/pie-framework/pie-elements/commit/b7447f4d97e9d7cc2415f54a17ffe13ed15d1ebb))
|
|
62
|
-
|
|
60
|
+
|
|
61
|
+
## [13.1.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@13.1.3...@pie-element/extended-text-entry-configure@13.1.4) (2026-06-17)
|
|
62
|
+
|
|
63
|
+
### Bug Fixes
|
|
64
|
+
|
|
65
|
+
- bump shared modules and libs PIE-661 PIE-664 PIE-683 PIE-666 PIE-656 PIE-657 PIE-658 PIE-659 PIE-670 ([ebd6be4](https://github.com/pie-framework/pie-elements/commit/ebd6be4fd48fca41ad4c4908f606b25334731aed))
|
|
66
|
+
|
|
67
|
+
## [13.1.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@13.1.2...@pie-element/extended-text-entry-configure@13.1.3) (2026-06-12)
|
|
68
|
+
|
|
69
|
+
### Bug Fixes
|
|
70
|
+
|
|
71
|
+
- bump shared modules and libsPIE-603, PIE-604, PIE-663, PIE-662, PIE-678 ([e61c7a7](https://github.com/pie-framework/pie-elements/commit/e61c7a7d23744586337dfbb17a18ebfc656c202f))
|
|
72
|
+
|
|
73
|
+
## [13.1.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@13.1.1...@pie-element/extended-text-entry-configure@13.1.2) (2026-06-04)
|
|
74
|
+
|
|
75
|
+
### Bug Fixes
|
|
76
|
+
|
|
77
|
+
- bump shared modules and libs PIE-600, PIE-602 ([ce99f6a](https://github.com/pie-framework/pie-elements/commit/ce99f6af50cb855b666a6df9340f9f5445fde4c4))
|
|
78
|
+
|
|
79
|
+
## [13.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@13.1.0...@pie-element/extended-text-entry-configure@13.1.1) (2026-05-21)
|
|
80
|
+
|
|
81
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
63
82
|
|
|
64
83
|
# [13.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@13.1.0-next.1...@pie-element/extended-text-entry-configure@13.1.0) (2026-05-21)
|
|
65
84
|
|
package/configure/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/extended-text-entry-configure",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "13.
|
|
4
|
+
"version": "13.2.2",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "src/index.js",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"@mui/icons-material": "^7.3.4",
|
|
14
14
|
"@mui/material": "^7.3.4",
|
|
15
15
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
16
|
-
"@pie-lib/config-ui": "13.
|
|
17
|
-
"@pie-lib/editable-html-tip-tap": "2.
|
|
16
|
+
"@pie-lib/config-ui": "13.0.19",
|
|
17
|
+
"@pie-lib/editable-html-tip-tap": "2.1.17",
|
|
18
18
|
"lodash-es": "^4.17.23",
|
|
19
19
|
"prop-types": "^15.8.1",
|
|
20
20
|
"react": "18.3.1",
|
package/controller/CHANGELOG.md
CHANGED
|
@@ -3,51 +3,21 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
## [9.1.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@9.1.3...@pie-element/extended-text-entry-controller@9.1.4) (2026-09-04)
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
# [9.4.0-beta.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@9.4.0-beta.6...@pie-element/extended-text-entry-controller@9.4.0-beta.7) (2026-08-20)
|
|
11
|
-
|
|
12
|
-
**Note:** Version bump only for package @pie-element/extended-text-entry-controller
|
|
13
|
-
|
|
14
|
-
# [9.4.0-beta.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@9.4.0-beta.5...@pie-element/extended-text-entry-controller@9.4.0-beta.6) (2026-08-14)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @pie-element/extended-text-entry-controller
|
|
17
|
-
|
|
18
|
-
# [9.4.0-beta.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@9.4.0-beta.4...@pie-element/extended-text-entry-controller@9.4.0-beta.5) (2026-08-11)
|
|
19
|
-
|
|
20
|
-
**Note:** Version bump only for package @pie-element/extended-text-entry-controller
|
|
21
|
-
|
|
22
|
-
# [9.4.0-beta.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@9.4.0-beta.3...@pie-element/extended-text-entry-controller@9.4.0-beta.4) (2026-08-11)
|
|
23
|
-
|
|
24
|
-
**Note:** Version bump only for package @pie-element/extended-text-entry-controller
|
|
25
|
-
|
|
26
|
-
# [9.4.0-beta.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@9.4.0-beta.2...@pie-element/extended-text-entry-controller@9.4.0-beta.3) (2026-08-11)
|
|
27
|
-
|
|
28
|
-
**Note:** Version bump only for package @pie-element/extended-text-entry-controller
|
|
29
|
-
|
|
30
|
-
# [9.4.0-beta.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@9.4.0-beta.1...@pie-element/extended-text-entry-controller@9.4.0-beta.2) (2026-08-11)
|
|
31
|
-
|
|
32
|
-
**Note:** Version bump only for package @pie-element/extended-text-entry-controller
|
|
33
|
-
|
|
34
|
-
# [9.4.0-beta.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@9.4.0-beta.0...@pie-element/extended-text-entry-controller@9.4.0-beta.1) (2026-08-07)
|
|
35
|
-
|
|
36
|
-
**Note:** Version bump only for package @pie-element/extended-text-entry-controller
|
|
37
|
-
|
|
38
|
-
# [9.4.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@9.3.0-beta.0...@pie-element/extended-text-entry-controller@9.4.0-beta.0) (2026-08-07)
|
|
8
|
+
### Bug Fixes
|
|
39
9
|
|
|
40
|
-
**
|
|
10
|
+
- **extended-text-entry:** read the spellcheck flag strictly PIE-978 ([61507a7](https://github.com/pie-framework/pie-elements/commit/61507a7506734fb62e5f0ccf74bf3e57902a07db))
|
|
41
11
|
|
|
42
|
-
|
|
12
|
+
## [9.1.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@9.1.1...@pie-element/extended-text-entry-controller@9.1.3) (2026-08-13)
|
|
43
13
|
|
|
44
14
|
**Note:** Version bump only for package @pie-element/extended-text-entry-controller
|
|
45
15
|
|
|
46
|
-
|
|
16
|
+
## [9.1.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@9.1.1...@pie-element/extended-text-entry-controller@9.1.2) (2026-08-11)
|
|
47
17
|
|
|
48
18
|
**Note:** Version bump only for package @pie-element/extended-text-entry-controller
|
|
49
19
|
|
|
50
|
-
|
|
20
|
+
## [9.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@9.1.0...@pie-element/extended-text-entry-controller@9.1.1) (2026-05-21)
|
|
51
21
|
|
|
52
22
|
**Note:** Version bump only for package @pie-element/extended-text-entry-controller
|
|
53
23
|
|
package/controller/lib/index.js
CHANGED
|
@@ -66,7 +66,9 @@ async function model(question, session, env) {
|
|
|
66
66
|
spanishInput: normalizedQuestion.spanishInput,
|
|
67
67
|
specialInput: normalizedQuestion.specialInput,
|
|
68
68
|
equationEditor,
|
|
69
|
-
|
|
69
|
+
// Spellcheck is off unless the author explicitly opted in: normalize's defaults cover a
|
|
70
|
+
// missing key, but a key present as undefined/null overwrites them. See PIE-978.
|
|
71
|
+
spellCheckEnabled: normalizedQuestion.playerSpellCheckDisabled === false,
|
|
70
72
|
playersToolbarPosition: normalizedQuestion.playersToolbarPosition || 'bottom',
|
|
71
73
|
annotatorMode,
|
|
72
74
|
disabledAnnotator: normalizedQuestion.annotationsEnabled ? env.role !== 'instructor' : true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_debug","_interopRequireDefault","require","_feedback","_defaults","log","debug","createDefaultModel","model","defaults","normalize","question","exports","session","env","normalizedQuestion","fb","mode","feedbackEnabled","getFeedback","feedback","Promise","resolve","undefined","teacherInstructions","role","teacherInstructionsEnabled","equationEditor","annotatorMode","annotationsEnabled","then","prompt","promptEnabled","dimensions","customKeys","id","disabled","language","mathInput","spanishInput","specialInput","spellCheckEnabled","playerSpellCheckDisabled","playersToolbarPosition","disabledAnnotator","predefinedAnnotations","extraCSSRules","outcome","score","completed","note","getInnerText","html","replaceAll","getContent","replace","validate","config","errors","forEach","field","required"],"sources":["../src/index.js"],"sourcesContent":["import debug from 'debug';\nimport { getFeedback } from '@pie-lib/feedback';\nimport defaults from './defaults';\n\nconst log = debug('@pie-element:extended-text-entry:controller');\n\nexport async function createDefaultModel(model = {}) {\n log('[createDefaultModel]', model);\n\n return { ...defaults, ...model };\n}\n\nexport const normalize = (question) => ({ ...defaults, ...question });\n\nexport async function model(question, session, env) {\n log('[question]', question);\n const normalizedQuestion = normalize(question);\n\n const fb =\n env.mode === 'evaluate' && normalizedQuestion.feedbackEnabled\n ? getFeedback(normalizedQuestion.feedback, 'Your answer has been submitted')\n : Promise.resolve(undefined);\n\n let teacherInstructions = null;\n if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {\n teacherInstructions = normalizedQuestion.teacherInstructionsEnabled ? normalizedQuestion.teacherInstructions : null;\n } else {\n teacherInstructions = null;\n }\n\n let equationEditor = normalizedQuestion.equationEditor || 'miscellaneous';\n\n switch (normalizedQuestion.equationEditor) {\n case 'Grade 1 - 2':\n equationEditor = 1;\n break;\n case 'Grade 3 - 5':\n equationEditor = 3;\n break;\n case 'Grade 6 - 7':\n equationEditor = 6;\n break;\n case 'Grade 8 - HS':\n equationEditor = 8;\n break;\n default:\n break;\n }\n\n const annotatorMode = normalizedQuestion.annotationsEnabled && (env.role === 'instructor' || env.mode === 'evaluate');\n\n return fb.then((feedback) => ({\n prompt: normalizedQuestion.promptEnabled ? normalizedQuestion.prompt : null,\n dimensions: normalizedQuestion.dimensions,\n customKeys: normalizedQuestion.customKeys || [],\n id: normalizedQuestion.id,\n disabled: env.mode !== 'gather',\n feedback,\n teacherInstructions,\n language: normalizedQuestion.language,\n mathInput: normalizedQuestion.mathInput,\n spanishInput: normalizedQuestion.spanishInput,\n specialInput: normalizedQuestion.specialInput,\n equationEditor,\n spellCheckEnabled:
|
|
1
|
+
{"version":3,"file":"index.js","names":["_debug","_interopRequireDefault","require","_feedback","_defaults","log","debug","createDefaultModel","model","defaults","normalize","question","exports","session","env","normalizedQuestion","fb","mode","feedbackEnabled","getFeedback","feedback","Promise","resolve","undefined","teacherInstructions","role","teacherInstructionsEnabled","equationEditor","annotatorMode","annotationsEnabled","then","prompt","promptEnabled","dimensions","customKeys","id","disabled","language","mathInput","spanishInput","specialInput","spellCheckEnabled","playerSpellCheckDisabled","playersToolbarPosition","disabledAnnotator","predefinedAnnotations","extraCSSRules","outcome","score","completed","note","getInnerText","html","replaceAll","getContent","replace","validate","config","errors","forEach","field","required"],"sources":["../src/index.js"],"sourcesContent":["import debug from 'debug';\nimport { getFeedback } from '@pie-lib/feedback';\nimport defaults from './defaults';\n\nconst log = debug('@pie-element:extended-text-entry:controller');\n\nexport async function createDefaultModel(model = {}) {\n log('[createDefaultModel]', model);\n\n return { ...defaults, ...model };\n}\n\nexport const normalize = (question) => ({ ...defaults, ...question });\n\nexport async function model(question, session, env) {\n log('[question]', question);\n const normalizedQuestion = normalize(question);\n\n const fb =\n env.mode === 'evaluate' && normalizedQuestion.feedbackEnabled\n ? getFeedback(normalizedQuestion.feedback, 'Your answer has been submitted')\n : Promise.resolve(undefined);\n\n let teacherInstructions = null;\n if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {\n teacherInstructions = normalizedQuestion.teacherInstructionsEnabled ? normalizedQuestion.teacherInstructions : null;\n } else {\n teacherInstructions = null;\n }\n\n let equationEditor = normalizedQuestion.equationEditor || 'miscellaneous';\n\n switch (normalizedQuestion.equationEditor) {\n case 'Grade 1 - 2':\n equationEditor = 1;\n break;\n case 'Grade 3 - 5':\n equationEditor = 3;\n break;\n case 'Grade 6 - 7':\n equationEditor = 6;\n break;\n case 'Grade 8 - HS':\n equationEditor = 8;\n break;\n default:\n break;\n }\n\n const annotatorMode = normalizedQuestion.annotationsEnabled && (env.role === 'instructor' || env.mode === 'evaluate');\n\n return fb.then((feedback) => ({\n prompt: normalizedQuestion.promptEnabled ? normalizedQuestion.prompt : null,\n dimensions: normalizedQuestion.dimensions,\n customKeys: normalizedQuestion.customKeys || [],\n id: normalizedQuestion.id,\n disabled: env.mode !== 'gather',\n feedback,\n teacherInstructions,\n language: normalizedQuestion.language,\n mathInput: normalizedQuestion.mathInput,\n spanishInput: normalizedQuestion.spanishInput,\n specialInput: normalizedQuestion.specialInput,\n equationEditor,\n // Spellcheck is off unless the author explicitly opted in: normalize's defaults cover a\n // missing key, but a key present as undefined/null overwrites them. See PIE-978.\n spellCheckEnabled: normalizedQuestion.playerSpellCheckDisabled === false,\n playersToolbarPosition: normalizedQuestion.playersToolbarPosition || 'bottom',\n annotatorMode,\n disabledAnnotator: normalizedQuestion.annotationsEnabled ? env.role !== 'instructor' : true,\n predefinedAnnotations: normalizedQuestion.annotationsEnabled ? normalizedQuestion.predefinedAnnotations : [],\n extraCSSRules: normalizedQuestion.extraCSSRules,\n }));\n}\n\nexport async function outcome(/*question, session, env*/) {\n return {\n score: 0,\n completed: 'n/a',\n note: 'Requires manual scoring',\n };\n}\n\n// remove all html tags\nconst getInnerText = (html) => (html || '').replaceAll(/<[^>]*>/g, '');\n\n// remove all html tags except img, iframe and source tag for audio\nconst getContent = (html) => (html || '').replace(/(<(?!img|iframe|source)([^>]+)>)/gi, '');\n\nexport const validate = (model = {}, config = {}) => {\n const errors = {};\n\n ['teacherInstructions', 'prompt'].forEach((field) => {\n if (config[field]?.required && !getContent(model[field])) {\n errors[field] = 'This field is required.';\n }\n });\n\n return errors;\n};\n"],"mappings":"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","ignoreList":[]}
|
package/controller/package.json
CHANGED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# PIE-927 — math prompt repro harness (archived)
|
|
2
|
+
|
|
3
|
+
Reported as **DNAFORM-2099**: `extended-text-entry` prompts showed their raw latex source
|
|
4
|
+
(`P\left(x\right)=-2x^{3}...`) instead of typeset math.
|
|
5
|
+
|
|
6
|
+
This file archives the throwaway demo harness built to reproduce it. The demo itself was reverted to
|
|
7
|
+
its plain single-item form once the fix landed — everything needed to rebuild the harness is below.
|
|
8
|
+
|
|
9
|
+
## Cause and fix
|
|
10
|
+
|
|
11
|
+
The prompt container was located by a **shared DOM id**. With several items of the same element on
|
|
12
|
+
one page, every item resolved that id to the *first* match, so an item would request math
|
|
13
|
+
typesetting against another item's node — leaving its own prompt untypeset.
|
|
14
|
+
|
|
15
|
+
Fixed in two halves:
|
|
16
|
+
|
|
17
|
+
| Repo | Change |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| `pie-lib` | `fix(render-ui)!: scope PreviewPrompt to its own node instead of a shared id` — breaking, shipped in `@pie-lib/render-ui@7.0.0` |
|
|
20
|
+
| `pie-elements` | `fix: read the prompt container by class, not by the id pie-lib removed` |
|
|
21
|
+
|
|
22
|
+
## Why the harness needed several items
|
|
23
|
+
|
|
24
|
+
**A single item on a page typesets fine.** The id collision cannot happen with one item, so a
|
|
25
|
+
one-item demo shows nothing. Any future repro must mount **more than one** item of the same element.
|
|
26
|
+
|
|
27
|
+
The harness mounted 5 items × 6 expressions = **30 tagged prompt expressions**, each prefixed with a
|
|
28
|
+
unique tag (`[3.E2]`) so a mis-rendered one could be named exactly. Two extra tags per item —
|
|
29
|
+
`[n.T1]` in teacher instructions, `[n.F1]` in feedback — need `role=instructor` (with `mode=view` or
|
|
30
|
+
`evaluate`) and `mode=evaluate` respectively to appear at all.
|
|
31
|
+
|
|
32
|
+
## Expression shapes covered
|
|
33
|
+
|
|
34
|
+
The two forms below both appeared in the reported items and both must render. `E1`'s wrapper holds no
|
|
35
|
+
delimiters and braces its exponents; `E2`'s holds the delimiters and leaves exponents unbraced.
|
|
36
|
+
|
|
37
|
+
| Tag | Shape |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| `E1` | wrapper without delimiters, braced exponents — `P\left(x\right)=-2x^{3}-4x^{2}+18x+36` |
|
|
40
|
+
| `E2` | wrapper with delimiters, unbraced exponents — `P\left(x\right)=-2x^3-4x^2+18x+36` |
|
|
41
|
+
| `E3` | fraction and radical — `x=\frac{-b\pm\sqrt{b^{2}-4ac}}{2a}` |
|
|
42
|
+
| `E4` | radical, no delimiters — `\sqrt[3]{27x^{6}}=3x^{2}` |
|
|
43
|
+
| `E5` | series with limits — `\sum_{n=1}^{\infty}\frac{1}{n^{2}}=\frac{\pi^{2}}{6}` |
|
|
44
|
+
| `E6` | MathML pasted raw, no `data-latex` wrapper (exercises the other code path) |
|
|
45
|
+
| `T1` | teacher instructions (needs `role=instructor`) |
|
|
46
|
+
| `F1` | feedback (needs `mode=evaluate`) |
|
|
47
|
+
|
|
48
|
+
Two wrapper builders drove `E1`–`E5`:
|
|
49
|
+
|
|
50
|
+
```js
|
|
51
|
+
// no delimiters inside the wrapper: renderMath() adds them itself, via fixMathElements()
|
|
52
|
+
const bare = (latex) => `<span data-latex="" data-raw="${latex}">${latex}</span>`;
|
|
53
|
+
|
|
54
|
+
// already delimited - the form that shipped in the item that failed to render
|
|
55
|
+
const delimited = (latex) => `<span data-latex="" data-raw="${latex}">\\(${latex}\\)</span>`;
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Rebuilding it
|
|
59
|
+
|
|
60
|
+
Run with `yarn pie-install` / the usual demo flow from `packages/extended-text-entry`. Restore these
|
|
61
|
+
four files, then remember that `ITEM_COUNT` drives `config.js` and `session.js` **but not**
|
|
62
|
+
`index.html`, which hardcodes its elements — raising the count means adding matching markup there.
|
|
63
|
+
|
|
64
|
+
### `generate.js`
|
|
65
|
+
|
|
66
|
+
```js
|
|
67
|
+
const LATEX = {
|
|
68
|
+
polyBraced: 'P\\left(x\\right)=-2x^{3}-4x^{2}+18x+36',
|
|
69
|
+
polyPlain: 'P\\left(x\\right)=-2x^3-4x^2+18x+36',
|
|
70
|
+
quadratic: 'x=\\frac{-b\\pm\\sqrt{b^{2}-4ac}}{2a}',
|
|
71
|
+
radical: '\\sqrt[3]{27x^{6}}=3x^{2}',
|
|
72
|
+
series: '\\sum_{n=1}^{\\infty}\\frac{1}{n^{2}}=\\frac{\\pi^{2}}{6}',
|
|
73
|
+
inequality: '-3\\le x\\le 2',
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const MATHML =
|
|
77
|
+
'<math xmlns="http://www.w3.org/1998/Math/MathML">' +
|
|
78
|
+
'<mfrac><mrow><mn>3</mn><mi>x</mi></mrow><mn>4</mn></mfrac></math>';
|
|
79
|
+
|
|
80
|
+
const bare = (latex) => `<span data-latex="" data-raw="${latex}">${latex}</span>`;
|
|
81
|
+
const delimited = (latex) => `<span data-latex="" data-raw="${latex}">\\(${latex}\\)</span>`;
|
|
82
|
+
const tag = (label) => `<strong style="color:#b00020;font-family:ui-monospace,Menlo,monospace">[${label}]</strong>`;
|
|
83
|
+
const line = (label, note, markup) => `<div>${tag(label)} ${note}: ${markup}</div>`;
|
|
84
|
+
|
|
85
|
+
const prompt = (item) =>
|
|
86
|
+
[
|
|
87
|
+
`<p>Item ${item}. Every expression below must show as typeset math — ` +
|
|
88
|
+
'if any shows its raw latex source instead, report it by its tag.</p>',
|
|
89
|
+
line(`${item}.E1`, 'wrapper without delimiters, braced exponents', bare(LATEX.polyBraced)),
|
|
90
|
+
line(`${item}.E2`, 'wrapper with delimiters, unbraced exponents', delimited(LATEX.polyPlain)),
|
|
91
|
+
line(`${item}.E3`, 'fraction and radical', delimited(LATEX.quadratic)),
|
|
92
|
+
line(`${item}.E4`, 'radical, no delimiters', bare(LATEX.radical)),
|
|
93
|
+
line(`${item}.E5`, 'series with limits', delimited(LATEX.series)),
|
|
94
|
+
line(`${item}.E6`, 'mathml, no data-latex wrapper', MATHML),
|
|
95
|
+
].join('');
|
|
96
|
+
|
|
97
|
+
exports.model = (id, element) => ({
|
|
98
|
+
id,
|
|
99
|
+
element,
|
|
100
|
+
customKeys: ['\\square'],
|
|
101
|
+
feedback: {
|
|
102
|
+
type: 'custom',
|
|
103
|
+
default: 'this is default feedback',
|
|
104
|
+
custom: line(`${id}.F1`, 'feedback', delimited(LATEX.inequality)),
|
|
105
|
+
},
|
|
106
|
+
feedbackEnabled: true,
|
|
107
|
+
prompt: prompt(id),
|
|
108
|
+
promptEnabled: true,
|
|
109
|
+
teacherInstructions: line(`${id}.T1`, 'teacher instructions', delimited(LATEX.polyPlain)),
|
|
110
|
+
teacherInstructionsEnabled: true,
|
|
111
|
+
mathInput: true,
|
|
112
|
+
playersToolbarPosition: 'bottom',
|
|
113
|
+
toolbarEditorPosition: 'bottom',
|
|
114
|
+
spellCheckEnabled: true,
|
|
115
|
+
rubricEnabled: false,
|
|
116
|
+
annotationsEnabled: false,
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
exports.ITEM_COUNT = 5;
|
|
120
|
+
exports.PROMPT_EXPRESSIONS_PER_ITEM = 6;
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### `config.js`
|
|
124
|
+
|
|
125
|
+
```js
|
|
126
|
+
const { model, ITEM_COUNT } = require('./generate');
|
|
127
|
+
|
|
128
|
+
const ids = Array.from({ length: ITEM_COUNT }, (_, i) => `${i + 1}`);
|
|
129
|
+
|
|
130
|
+
module.exports = {
|
|
131
|
+
elements: {
|
|
132
|
+
'extended-text-entry': '../..',
|
|
133
|
+
},
|
|
134
|
+
models: ids.map((id) => model(id, 'extended-text-entry')),
|
|
135
|
+
};
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### `session.js`
|
|
139
|
+
|
|
140
|
+
One session per model — the player needs a session whose `id` matches each model's `id`, so this must
|
|
141
|
+
stay the same length as `config.js`.
|
|
142
|
+
|
|
143
|
+
```js
|
|
144
|
+
const { ITEM_COUNT } = require('./generate');
|
|
145
|
+
|
|
146
|
+
module.exports = Array.from({ length: ITEM_COUNT }, (_, i) => ({
|
|
147
|
+
id: `${i + 1}`,
|
|
148
|
+
element: 'extended-text-entry',
|
|
149
|
+
}));
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### `index.html`
|
|
153
|
+
|
|
154
|
+
Five `<extended-text-entry>` elements with `pie-id="1"`…`"5"`, each wrapped in a labelled box:
|
|
155
|
+
|
|
156
|
+
```html
|
|
157
|
+
<div class="body">
|
|
158
|
+
<div class="math-demo-item">
|
|
159
|
+
<h5>item 1 — 1.E1–1.E6</h5>
|
|
160
|
+
<extended-text-entry pie-id="1"></extended-text-entry>
|
|
161
|
+
</div>
|
|
162
|
+
<!-- repeat for pie-id 2..5 -->
|
|
163
|
+
</div>
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## Regression check
|
|
167
|
+
|
|
168
|
+
Nothing here is covered by the Jest suite — it needs a real browser to observe typesetting. Rebuild
|
|
169
|
+
this harness and eyeball all 30 tags after any change to prompt rendering or to the math-rendering
|
|
170
|
+
libs (`@pie-lib/render-ui`, `@pie-lib/math-rendering`, `@pie-lib/math-rendering-accessible`).
|