@pie-element/image-cloze-association 10.3.0 → 10.3.1-beta.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 CHANGED
@@ -3,84 +3,64 @@
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
- # [10.3.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.2.0...@pie-element/image-cloze-association@10.3.0) (2026-08-26)
6
+ ## [10.3.1-beta.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.4.0-beta.7...@pie-element/image-cloze-association@10.3.1-beta.2) (2026-08-26)
7
7
 
8
- ### Features
9
-
10
- - **image-cloze-association:** add additional keyboard navigation (Tab/Shift+Tab placement) PIE-802 and click-to-select/click-to-place functionality PIE-795 ([603e597](https://github.com/pie-framework/pie-elements/commit/603e5972c1de522b5578ade70fcf26be31cb5685))
11
-
12
- # [10.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.1.11...@pie-element/image-cloze-association@10.2.0) (2026-08-21)
13
-
14
- ### Bug Fixes
8
+ **Note:** Version bump only for package @pie-element/image-cloze-association
15
9
 
16
- - 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))
17
- - 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))
10
+ # [10.4.0-beta.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.4.0-beta.6...@pie-element/image-cloze-association@10.4.0-beta.7) (2026-08-20)
18
11
 
19
- ### Features
12
+ **Note:** Version bump only for package @pie-element/image-cloze-association
20
13
 
21
- - bump libs PIE-856, PIE-681, PIE-927 ([cb26d7a](https://github.com/pie-framework/pie-elements/commit/cb26d7afa6c99522533c321d5ff8ce3148a66e9e))
14
+ # [10.4.0-beta.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.4.0-beta.5...@pie-element/image-cloze-association@10.4.0-beta.6) (2026-08-14)
22
15
 
23
- ## [10.1.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.1.10...@pie-element/image-cloze-association@10.1.11) (2026-08-19)
16
+ **Note:** Version bump only for package @pie-element/image-cloze-association
24
17
 
25
- ### Bug Fixes
18
+ # [10.4.0-beta.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.4.0-beta.4...@pie-element/image-cloze-association@10.4.0-beta.5) (2026-08-11)
26
19
 
27
- - bump libs and shared modules PIE-681, PIE-708 ([08af8b5](https://github.com/pie-framework/pie-elements/commit/08af8b5802aecc8ee5454a1b6d60277d7ec94204))
20
+ **Note:** Version bump only for package @pie-element/image-cloze-association
28
21
 
29
- ## [10.1.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.1.8...@pie-element/image-cloze-association@10.1.10) (2026-08-13)
22
+ # [10.4.0-beta.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.4.0-beta.3...@pie-element/image-cloze-association@10.4.0-beta.4) (2026-08-11)
30
23
 
31
24
  **Note:** Version bump only for package @pie-element/image-cloze-association
32
25
 
33
- ## [10.1.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.1.7...@pie-element/image-cloze-association@10.1.9) (2026-08-11)
26
+ # [10.4.0-beta.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.4.0-beta.2...@pie-element/image-cloze-association@10.4.0-beta.3) (2026-08-11)
34
27
 
35
28
  **Note:** Version bump only for package @pie-element/image-cloze-association
36
29
 
37
- ## [10.1.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.1.7...@pie-element/image-cloze-association@10.1.8) (2026-07-31)
30
+ # [10.4.0-beta.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.4.0-beta.1...@pie-element/image-cloze-association@10.4.0-beta.2) (2026-08-11)
38
31
 
39
32
  **Note:** Version bump only for package @pie-element/image-cloze-association
40
33
 
41
- ## [10.1.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.1.6...@pie-element/image-cloze-association@10.1.7) (2026-07-08)
34
+ # [10.4.0-beta.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.4.0-beta.0...@pie-element/image-cloze-association@10.4.0-beta.1) (2026-08-07)
42
35
 
43
- ### Bug Fixes
44
-
45
- - bump libs & shared modules PIE-706, PIE-702, PIE-679, PIE-698 ([5b1a8c4](https://github.com/pie-framework/pie-elements/commit/5b1a8c4c3eba2126fc43d78fd0187e7cd11d5424))
36
+ **Note:** Version bump only for package @pie-element/image-cloze-association
46
37
 
47
- ## [10.1.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.1.5...@pie-element/image-cloze-association@10.1.6) (2026-07-02)
38
+ # [10.4.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.3.0-beta.0...@pie-element/image-cloze-association@10.4.0-beta.0) (2026-08-07)
48
39
 
49
- ### Bug Fixes
40
+ **Note:** Version bump only for package @pie-element/image-cloze-association
50
41
 
51
- - 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))
52
- - sync libs versions ([48b5be9](https://github.com/pie-framework/pie-elements/commit/48b5be9559eb5b5235ca05f51c5f0161032a7041))
42
+ # [10.3.0-beta.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.3.0-beta.0...@pie-element/image-cloze-association@10.3.0-beta.1) (2026-08-07)
53
43
 
54
- ## [10.1.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.1.4...@pie-element/image-cloze-association@10.1.5) (2026-06-22)
44
+ **Note:** Version bump only for package @pie-element/image-cloze-association
55
45
 
56
- ### Bug Fixes
46
+ # [10.3.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.2.0-beta.0...@pie-element/image-cloze-association@10.3.0-beta.0) (2026-08-07)
57
47
 
58
- - 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))
59
- - handle webcomponent lifecycle on every element that misses it PIE-703 ([9d5923f](https://github.com/pie-framework/pie-elements/commit/9d5923f973f0471e1e8f69ad4309cfc63d980d93))
48
+ **Note:** Version bump only for package @pie-element/image-cloze-association
60
49
 
61
- ## [10.1.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.1.3...@pie-element/image-cloze-association@10.1.4) (2026-06-17)
50
+ # [10.2.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.1.0...@pie-element/image-cloze-association@10.2.0-beta.0) (2026-08-07)
62
51
 
63
52
  ### Bug Fixes
64
53
 
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))
65
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))
66
-
67
- ## [10.1.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.1.2...@pie-element/image-cloze-association@10.1.3) (2026-06-12)
68
-
69
- ### Bug Fixes
70
-
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))
71
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))
72
-
73
- ## [10.1.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.1.1...@pie-element/image-cloze-association@10.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
60
  - dedupe @tiptap/\* and react-transition-group PIE-624 ([87f07f3](https://github.com/pie-framework/pie-elements/commit/87f07f31c38b0fe876f87229c48adc566c369bb9))
61
+ - handle webcomponent lifecycle on every element that misses it PIE-703 ([9d5923f](https://github.com/pie-framework/pie-elements/commit/9d5923f973f0471e1e8f69ad4309cfc63d980d93))
79
62
  - **image-cloze-association:** preserve response areas position PIE-430 ([ae083d6](https://github.com/pie-framework/pie-elements/commit/ae083d660a56b050939deaab488ecf281ad14437))
80
-
81
- ## [10.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.1.0...@pie-element/image-cloze-association@10.1.1) (2026-05-21)
82
-
83
- **Note:** Version bump only for package @pie-element/image-cloze-association
63
+ - sync libs versions ([48b5be9](https://github.com/pie-framework/pie-elements/commit/48b5be9559eb5b5235ca05f51c5f0161032a7041))
84
64
 
85
65
  # [10.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.1.0-next.1...@pie-element/image-cloze-association@10.1.0) (2026-05-21)
86
66
 
@@ -3,75 +3,62 @@
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
- ## [9.2.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.2.0...@pie-element/image-cloze-association-configure@9.2.1) (2026-08-26)
6
+ # [9.4.0-beta.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.7...@pie-element/image-cloze-association-configure@9.4.0-beta.8) (2026-08-26)
7
7
 
8
8
  **Note:** Version bump only for package @pie-element/image-cloze-association-configure
9
9
 
10
- # [9.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.1.11...@pie-element/image-cloze-association-configure@9.2.0) (2026-08-21)
10
+ # [9.4.0-beta.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.6...@pie-element/image-cloze-association-configure@9.4.0-beta.7) (2026-08-20)
11
11
 
12
- ### Features
12
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
13
13
 
14
- - bump libs PIE-856, PIE-681, PIE-927 ([cb26d7a](https://github.com/pie-framework/pie-elements/commit/cb26d7afa6c99522533c321d5ff8ce3148a66e9e))
14
+ # [9.4.0-beta.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.5...@pie-element/image-cloze-association-configure@9.4.0-beta.6) (2026-08-14)
15
15
 
16
- ## [9.1.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.1.10...@pie-element/image-cloze-association-configure@9.1.11) (2026-08-19)
16
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
17
17
 
18
- ### Bug Fixes
18
+ # [9.4.0-beta.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.4...@pie-element/image-cloze-association-configure@9.4.0-beta.5) (2026-08-11)
19
19
 
20
- - bump libs and shared modules PIE-681, PIE-708 ([08af8b5](https://github.com/pie-framework/pie-elements/commit/08af8b5802aecc8ee5454a1b6d60277d7ec94204))
20
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
21
21
 
22
- ## [9.1.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.1.8...@pie-element/image-cloze-association-configure@9.1.10) (2026-08-13)
22
+ # [9.4.0-beta.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.3...@pie-element/image-cloze-association-configure@9.4.0-beta.4) (2026-08-11)
23
23
 
24
24
  **Note:** Version bump only for package @pie-element/image-cloze-association-configure
25
25
 
26
- ## [9.1.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.1.7...@pie-element/image-cloze-association-configure@9.1.9) (2026-08-11)
26
+ # [9.4.0-beta.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.2...@pie-element/image-cloze-association-configure@9.4.0-beta.3) (2026-08-11)
27
27
 
28
28
  **Note:** Version bump only for package @pie-element/image-cloze-association-configure
29
29
 
30
- ## [9.1.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.1.7...@pie-element/image-cloze-association-configure@9.1.8) (2026-07-31)
30
+ # [9.4.0-beta.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.1...@pie-element/image-cloze-association-configure@9.4.0-beta.2) (2026-08-11)
31
31
 
32
32
  **Note:** Version bump only for package @pie-element/image-cloze-association-configure
33
33
 
34
- ## [9.1.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.1.6...@pie-element/image-cloze-association-configure@9.1.7) (2026-07-08)
34
+ # [9.4.0-beta.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.0...@pie-element/image-cloze-association-configure@9.4.0-beta.1) (2026-08-07)
35
35
 
36
- ### Bug Fixes
37
-
38
- - bump libs & shared modules PIE-706, PIE-702, PIE-679, PIE-698 ([5b1a8c4](https://github.com/pie-framework/pie-elements/commit/5b1a8c4c3eba2126fc43d78fd0187e7cd11d5424))
36
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
39
37
 
40
- ## [9.1.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.1.5...@pie-element/image-cloze-association-configure@9.1.6) (2026-07-02)
38
+ # [9.4.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.3.0-beta.0...@pie-element/image-cloze-association-configure@9.4.0-beta.0) (2026-08-07)
41
39
 
42
- ### Bug Fixes
40
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
43
41
 
44
- - 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))
45
- - sync libs versions ([48b5be9](https://github.com/pie-framework/pie-elements/commit/48b5be9559eb5b5235ca05f51c5f0161032a7041))
42
+ # [9.3.0-beta.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.3.0-beta.0...@pie-element/image-cloze-association-configure@9.3.0-beta.1) (2026-08-07)
46
43
 
47
- ## [9.1.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.1.4...@pie-element/image-cloze-association-configure@9.1.5) (2026-06-22)
44
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
48
45
 
49
- ### Bug Fixes
46
+ # [9.3.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.2.0-beta.0...@pie-element/image-cloze-association-configure@9.3.0-beta.0) (2026-08-07)
50
47
 
51
- - 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))
52
- - handle webcomponent lifecycle on every element that misses it PIE-703 ([9d5923f](https://github.com/pie-framework/pie-elements/commit/9d5923f973f0471e1e8f69ad4309cfc63d980d93))
48
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
53
49
 
54
- ## [9.1.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.1.3...@pie-element/image-cloze-association-configure@9.1.4) (2026-06-17)
50
+ # [9.2.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.1.0...@pie-element/image-cloze-association-configure@9.2.0-beta.0) (2026-08-07)
55
51
 
56
52
  ### Bug Fixes
57
53
 
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))
58
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))
59
-
60
- ## [9.1.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.1.2...@pie-element/image-cloze-association-configure@9.1.3) (2026-06-12)
61
-
62
- ### Bug Fixes
63
-
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))
64
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))
65
-
66
- ## [9.1.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.1.1...@pie-element/image-cloze-association-configure@9.1.2) (2026-06-04)
67
-
68
- ### Bug Fixes
69
-
70
- - bump shared modules and libs PIE-600, PIE-602 ([ce99f6a](https://github.com/pie-framework/pie-elements/commit/ce99f6af50cb855b666a6df9340f9f5445fde4c4))
71
-
72
- ## [9.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.1.0...@pie-element/image-cloze-association-configure@9.1.1) (2026-05-21)
73
-
74
- **Note:** Version bump only for package @pie-element/image-cloze-association-configure
60
+ - handle webcomponent lifecycle on every element that misses it PIE-703 ([9d5923f](https://github.com/pie-framework/pie-elements/commit/9d5923f973f0471e1e8f69ad4309cfc63d980d93))
61
+ - sync libs versions ([48b5be9](https://github.com/pie-framework/pie-elements/commit/48b5be9559eb5b5235ca05f51c5f0161032a7041))
75
62
 
76
63
  # [9.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.1.0-next.1...@pie-element/image-cloze-association-configure@9.1.0) (2026-05-21)
77
64
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/image-cloze-association-configure",
3
3
  "private": true,
4
- "version": "9.2.1",
4
+ "version": "9.4.0-beta.8",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
@@ -12,8 +12,8 @@
12
12
  "@mui/icons-material": "^7.3.4",
13
13
  "@mui/material": "^7.3.4",
14
14
  "@pie-framework/pie-configure-events": "^1.3.0",
15
- "@pie-lib/config-ui": "13.0.17",
16
- "@pie-lib/editable-html-tip-tap": "2.1.15",
15
+ "@pie-lib/config-ui": "13.1.0-beta.6",
16
+ "@pie-lib/editable-html-tip-tap": "2.2.0-beta.6",
17
17
  "debug": "^4.1.1",
18
18
  "prop-types": "^15.8.1",
19
19
  "react": "18.3.1",
@@ -3,24 +3,56 @@
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
- ## [8.1.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.1.2...@pie-element/image-cloze-association-controller@8.1.4) (2026-08-13)
6
+ # [8.4.0-beta.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.7...@pie-element/image-cloze-association-controller@8.4.0-beta.8) (2026-08-26)
7
7
 
8
8
  **Note:** Version bump only for package @pie-element/image-cloze-association-controller
9
9
 
10
- ## [8.1.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.1.2...@pie-element/image-cloze-association-controller@8.1.3) (2026-08-11)
10
+ # [8.4.0-beta.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.6...@pie-element/image-cloze-association-controller@8.4.0-beta.7) (2026-08-20)
11
11
 
12
12
  **Note:** Version bump only for package @pie-element/image-cloze-association-controller
13
13
 
14
- ## [8.1.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.1.1...@pie-element/image-cloze-association-controller@8.1.2) (2026-07-02)
14
+ # [8.4.0-beta.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.5...@pie-element/image-cloze-association-controller@8.4.0-beta.6) (2026-08-14)
15
15
 
16
- ### Bug Fixes
16
+ **Note:** Version bump only for package @pie-element/image-cloze-association-controller
17
17
 
18
- - 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))
18
+ # [8.4.0-beta.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.4...@pie-element/image-cloze-association-controller@8.4.0-beta.5) (2026-08-11)
19
+
20
+ **Note:** Version bump only for package @pie-element/image-cloze-association-controller
21
+
22
+ # [8.4.0-beta.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.3...@pie-element/image-cloze-association-controller@8.4.0-beta.4) (2026-08-11)
23
+
24
+ **Note:** Version bump only for package @pie-element/image-cloze-association-controller
25
+
26
+ # [8.4.0-beta.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.2...@pie-element/image-cloze-association-controller@8.4.0-beta.3) (2026-08-11)
27
+
28
+ **Note:** Version bump only for package @pie-element/image-cloze-association-controller
29
+
30
+ # [8.4.0-beta.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.1...@pie-element/image-cloze-association-controller@8.4.0-beta.2) (2026-08-11)
31
+
32
+ **Note:** Version bump only for package @pie-element/image-cloze-association-controller
19
33
 
20
- ## [8.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.1.0...@pie-element/image-cloze-association-controller@8.1.1) (2026-05-21)
34
+ # [8.4.0-beta.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.0...@pie-element/image-cloze-association-controller@8.4.0-beta.1) (2026-08-07)
21
35
 
22
36
  **Note:** Version bump only for package @pie-element/image-cloze-association-controller
23
37
 
38
+ # [8.4.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.3.0-beta.0...@pie-element/image-cloze-association-controller@8.4.0-beta.0) (2026-08-07)
39
+
40
+ **Note:** Version bump only for package @pie-element/image-cloze-association-controller
41
+
42
+ # [8.3.0-beta.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.3.0-beta.0...@pie-element/image-cloze-association-controller@8.3.0-beta.1) (2026-08-07)
43
+
44
+ **Note:** Version bump only for package @pie-element/image-cloze-association-controller
45
+
46
+ # [8.3.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.2.0-beta.0...@pie-element/image-cloze-association-controller@8.3.0-beta.0) (2026-08-07)
47
+
48
+ **Note:** Version bump only for package @pie-element/image-cloze-association-controller
49
+
50
+ # [8.2.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.1.0...@pie-element/image-cloze-association-controller@8.2.0-beta.0) (2026-08-07)
51
+
52
+ ### Bug Fixes
53
+
54
+ - 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))
55
+
24
56
  # [8.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.1.0-next.1...@pie-element/image-cloze-association-controller@8.1.0) (2026-05-21)
25
57
 
26
58
  ### Bug Fixes
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/image-cloze-association-controller",
3
3
  "private": true,
4
- "version": "8.1.4",
4
+ "version": "8.4.0-beta.8",
5
5
  "description": "",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -37,10 +37,7 @@ class ImageContainer extends _react.Component {
37
37
  answerChoiceTransparency,
38
38
  responseContainerPadding,
39
39
  imageDropTargetPadding,
40
- maxResponsePerZone,
41
- selectedResponse,
42
- onSelectClick,
43
- onPlacementClick
40
+ maxResponsePerZone
44
41
  } = this.props;
45
42
  return /*#__PURE__*/_react.default.createElement(BaseContainer, null, /*#__PURE__*/_react.default.createElement("img", {
46
43
  src: src,
@@ -72,10 +69,7 @@ class ImageContainer extends _react.Component {
72
69
  answerChoiceTransparency: answerChoiceTransparency,
73
70
  responseContainerPadding: responseContainerPadding,
74
71
  imageDropTargetPadding: imageDropTargetPadding,
75
- maxResponsePerZone: maxResponsePerZone,
76
- selectedResponse: selectedResponse,
77
- onSelectClick: onSelectClick,
78
- onPlacementClick: onPlacementClick
72
+ maxResponsePerZone: maxResponsePerZone
79
73
  });
80
74
  }));
81
75
  }
@@ -94,10 +88,7 @@ ImageContainer.propTypes = {
94
88
  responseAreaFill: _propTypes.default.string,
95
89
  responseContainerPadding: _propTypes.default.string,
96
90
  imageDropTargetPadding: _propTypes.default.string,
97
- maxResponsePerZone: _propTypes.default.number,
98
- selectedResponse: _propTypes.default.object,
99
- onSelectClick: _propTypes.default.func,
100
- onPlacementClick: _propTypes.default.func
91
+ maxResponsePerZone: _propTypes.default.number
101
92
  };
102
93
  var _default = exports.default = ImageContainer;
103
94
  //# sourceMappingURL=image-container.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"image-container.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_styles","_imageDropTarget","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","BaseContainer","styled","theme","margin","spacing","position","width","ImageContainer","Component","render","answers","canDrag","draggingElement","image","height","src","onAnswerSelect","onDragAnswerBegin","onDragAnswerEnd","responseContainers","showDashedBorder","responseAreaFill","answerChoiceTransparency","responseContainerPadding","imageDropTargetPadding","maxResponsePerZone","selectedResponse","onSelectClick","onPlacementClick","props","createElement","map","rHeight","replace","rWidth","rLeft","x","rTop","y","answersParsed","filter","a","containerIndex","index","containerStyle","left","top","key","id","onDrop","item","propTypes","PropTypes","array","isRequired","bool","shape","object","func","string","number","_default","exports"],"sources":["../src/image-container.jsx"],"sourcesContent":["import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\n\nimport ImageDropTarget from './image-drop-target';\n\nconst BaseContainer = styled('div')(({ theme }) => ({\n margin: theme.spacing(2),\n position: 'relative',\n width: 'fit-content',\n}));\n\nclass ImageContainer extends Component {\n render() {\n const {\n answers,\n canDrag,\n draggingElement,\n image: { height, src, width } = {},\n onAnswerSelect,\n onDragAnswerBegin,\n onDragAnswerEnd,\n responseContainers,\n showDashedBorder,\n responseAreaFill,\n answerChoiceTransparency,\n responseContainerPadding,\n imageDropTargetPadding,\n maxResponsePerZone,\n selectedResponse,\n onSelectClick,\n onPlacementClick,\n } = this.props;\n\n return (\n <BaseContainer>\n <img src={src} height={height} width={width} />\n\n {(responseContainers || []).map((r, i) => {\n const rHeight = (r.height.replace('%', '') / 100) * height;\n const rWidth = (r.width.replace('%', '') / 100) * width;\n const rLeft = (r.x / 100) * width;\n const rTop = (r.y / 100) * height;\n const answersParsed = answers.filter((a) => a.containerIndex === r.index);\n\n return (\n <ImageDropTarget\n answers={answersParsed}\n canDrag={canDrag}\n containerStyle={{\n height: rHeight,\n width: rWidth,\n left: rLeft,\n top: rTop,\n }}\n key={r.id + i}\n draggingElement={draggingElement}\n index={r.index}\n onDrop={(item) => onAnswerSelect(item, r.index)}\n onDragAnswerBegin={onDragAnswerBegin}\n onDragAnswerEnd={onDragAnswerEnd}\n showDashedBorder={showDashedBorder}\n responseAreaFill={responseAreaFill}\n answerChoiceTransparency={answerChoiceTransparency}\n responseContainerPadding={responseContainerPadding}\n imageDropTargetPadding={imageDropTargetPadding}\n maxResponsePerZone={maxResponsePerZone}\n selectedResponse={selectedResponse}\n onSelectClick={onSelectClick}\n onPlacementClick={onPlacementClick}\n />\n );\n })}\n </BaseContainer>\n );\n }\n}\n\nImageContainer.propTypes = {\n answers: PropTypes.array.isRequired,\n canDrag: PropTypes.bool.isRequired,\n draggingElement: PropTypes.shape({}).isRequired,\n image: PropTypes.object.isRequired,\n onAnswerSelect: PropTypes.func.isRequired,\n onDragAnswerBegin: PropTypes.func.isRequired,\n onDragAnswerEnd: PropTypes.func.isRequired,\n responseContainers: PropTypes.array.isRequired,\n showDashedBorder: PropTypes.bool,\n answerChoiceTransparency: PropTypes.bool,\n responseAreaFill: PropTypes.string,\n responseContainerPadding: PropTypes.string,\n imageDropTargetPadding: PropTypes.string,\n maxResponsePerZone: PropTypes.number,\n selectedResponse: PropTypes.object,\n onSelectClick: PropTypes.func,\n onPlacementClick: PropTypes.func,\n};\n\nexport default ImageContainer;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAEA,IAAAI,gBAAA,GAAAF,sBAAA,CAAAF,OAAA;AAAkD,SAAAD,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,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,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAA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0C,kBAAS,CAACC,KAAK,CAACC,UAAU;EACnC3C,OAAO,EAAEyC,kBAAS,CAACG,IAAI,CAACD,UAAU;EAClC1C,eAAe,EAAEwC,kBAAS,CAACI,KAAK,CAAC,CAAC,CAAC,CAAC,CAACF,UAAU;EAC/CzC,KAAK,EAAEuC,kBAAS,CAACK,MAAM,CAACH,UAAU;EAClCtC,cAAc,EAAEoC,kBAAS,CAACM,IAAI,CAACJ,UAAU;EACzCrC,iBAAiB,EAAEmC,kBAAS,CAACM,IAAI,CAACJ,UAAU;EAC5CpC,eAAe,EAAEkC,kBAAS,CAACM,IAAI,CAACJ,UAAU;EAC1CnC,kBAAkB,EAAEiC,kBAAS,CAACC,KAAK,CAACC,UAAU;EAC9ClC,gBAAgB,EAAEgC,kBAAS,CAACG,IAAI;EAChCjC,wBAAwB,EAAE8B,kBAAS,CAACG,IAAI;EACxClC,gBAAgB,EAAE+B,kBAAS,CAACO,MAAM;EAClCpC,wBAAwB,EAAE6B,kBAAS,CAACO,MAAM;EAC1CnC,sBAAsB,EAAE4B,kBAAS,CAACO,MAAM;EACxClC,kBAAkB,EAAE2B,kBAAS,CAACQ,MAAM;EACpClC,gBAAgB,EAAE0B,kBAAS,CAACK,MAAM;EAClC9B,aAAa,EAAEyB,kBAAS,CAACM,IAAI;EAC7B9B,gBAAgB,EAAEwB,kBAAS,CAACM;AAC9B,CAAC;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAvE,OAAA,GAEagB,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"image-container.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_styles","_imageDropTarget","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","BaseContainer","styled","theme","margin","spacing","position","width","ImageContainer","Component","render","answers","canDrag","draggingElement","image","height","src","onAnswerSelect","onDragAnswerBegin","onDragAnswerEnd","responseContainers","showDashedBorder","responseAreaFill","answerChoiceTransparency","responseContainerPadding","imageDropTargetPadding","maxResponsePerZone","props","createElement","map","rHeight","replace","rWidth","rLeft","x","rTop","y","answersParsed","filter","a","containerIndex","index","containerStyle","left","top","key","id","onDrop","item","propTypes","PropTypes","array","isRequired","bool","shape","object","func","string","number","_default","exports"],"sources":["../src/image-container.jsx"],"sourcesContent":["import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\n\nimport ImageDropTarget from './image-drop-target';\n\nconst BaseContainer = styled('div')(({ theme }) => ({\n margin: theme.spacing(2),\n position: 'relative',\n width: 'fit-content',\n}));\n\nclass ImageContainer extends Component {\n render() {\n const {\n answers,\n canDrag,\n draggingElement,\n image: { height, src, width } = {},\n onAnswerSelect,\n onDragAnswerBegin,\n onDragAnswerEnd,\n responseContainers,\n showDashedBorder,\n responseAreaFill,\n answerChoiceTransparency,\n responseContainerPadding,\n imageDropTargetPadding,\n maxResponsePerZone,\n } = this.props;\n\n return (\n <BaseContainer>\n <img src={src} height={height} width={width} />\n\n {(responseContainers || []).map((r, i) => {\n const rHeight = (r.height.replace('%', '') / 100) * height;\n const rWidth = (r.width.replace('%', '') / 100) * width;\n const rLeft = (r.x / 100) * width;\n const rTop = (r.y / 100) * height;\n const answersParsed = answers.filter((a) => a.containerIndex === r.index);\n\n return (\n <ImageDropTarget\n answers={answersParsed}\n canDrag={canDrag}\n containerStyle={{\n height: rHeight,\n width: rWidth,\n left: rLeft,\n top: rTop,\n }}\n key={r.id + i}\n draggingElement={draggingElement}\n index={r.index}\n onDrop={(item) => onAnswerSelect(item, r.index)}\n onDragAnswerBegin={onDragAnswerBegin}\n onDragAnswerEnd={onDragAnswerEnd}\n showDashedBorder={showDashedBorder}\n responseAreaFill={responseAreaFill}\n answerChoiceTransparency={answerChoiceTransparency}\n responseContainerPadding={responseContainerPadding}\n imageDropTargetPadding={imageDropTargetPadding}\n maxResponsePerZone={maxResponsePerZone}\n />\n );\n })}\n </BaseContainer>\n );\n }\n}\n\nImageContainer.propTypes = {\n answers: PropTypes.array.isRequired,\n canDrag: PropTypes.bool.isRequired,\n draggingElement: PropTypes.shape({}).isRequired,\n image: PropTypes.object.isRequired,\n onAnswerSelect: PropTypes.func.isRequired,\n onDragAnswerBegin: PropTypes.func.isRequired,\n onDragAnswerEnd: PropTypes.func.isRequired,\n responseContainers: PropTypes.array.isRequired,\n showDashedBorder: PropTypes.bool,\n answerChoiceTransparency: PropTypes.bool,\n responseAreaFill: PropTypes.string,\n responseContainerPadding: PropTypes.string,\n imageDropTargetPadding: PropTypes.string,\n maxResponsePerZone: PropTypes.number,\n};\n\nexport default ImageContainer;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAEA,IAAAI,gBAAA,GAAAF,sBAAA,CAAAF,OAAA;AAAkD,SAAAD,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,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,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAA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Ac,CAACyC,SAAS,GAAG;EACzBtC,OAAO,EAAEuC,kBAAS,CAACC,KAAK,CAACC,UAAU;EACnCxC,OAAO,EAAEsC,kBAAS,CAACG,IAAI,CAACD,UAAU;EAClCvC,eAAe,EAAEqC,kBAAS,CAACI,KAAK,CAAC,CAAC,CAAC,CAAC,CAACF,UAAU;EAC/CtC,KAAK,EAAEoC,kBAAS,CAACK,MAAM,CAACH,UAAU;EAClCnC,cAAc,EAAEiC,kBAAS,CAACM,IAAI,CAACJ,UAAU;EACzClC,iBAAiB,EAAEgC,kBAAS,CAACM,IAAI,CAACJ,UAAU;EAC5CjC,eAAe,EAAE+B,kBAAS,CAACM,IAAI,CAACJ,UAAU;EAC1ChC,kBAAkB,EAAE8B,kBAAS,CAACC,KAAK,CAACC,UAAU;EAC9C/B,gBAAgB,EAAE6B,kBAAS,CAACG,IAAI;EAChC9B,wBAAwB,EAAE2B,kBAAS,CAACG,IAAI;EACxC/B,gBAAgB,EAAE4B,kBAAS,CAACO,MAAM;EAClCjC,wBAAwB,EAAE0B,kBAAS,CAACO,MAAM;EAC1ChC,sBAAsB,EAAEyB,kBAAS,CAACO,MAAM;EACxC/B,kBAAkB,EAAEwB,kBAAS,CAACQ;AAChC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAApE,OAAA,GAEagB,cAAc","ignoreList":[]}
@@ -46,12 +46,8 @@ const ImageDropTarget = ({
46
46
  answerChoiceTransparency,
47
47
  maxResponsePerZone,
48
48
  onDrop,
49
- index,
50
- selectedResponse,
51
- onSelectClick,
52
- onPlacementClick
49
+ index
53
50
  }) => {
54
- const [isHovered, setIsHovered] = (0, _react.useState)(false);
55
51
  const [shouldHaveSmallPadding, setShouldHaveSmallPadding] = (0, _react.useState)(false);
56
52
  const dropContainerRef = (0, _react.useRef)(null);
57
53
  const dropContainerResponsesHeightRef = (0, _react.useRef)(null);
@@ -79,10 +75,8 @@ const ImageDropTarget = ({
79
75
  };
80
76
  }, []);
81
77
  const isDraggingElement = !!draggingElement.id;
82
- const hasSelection = !!selectedResponse;
83
- const showsHoverEffect = isOver || hasSelection && isHovered && canDrag;
84
78
  const containerClasses = (0, _classnames.default)({
85
- 'is-over': showsHoverEffect,
79
+ 'is-over': isOver,
86
80
  dashed: showDashedBorder && !isDraggingElement,
87
81
  active: isDraggingElement
88
82
  });
@@ -91,29 +85,7 @@ const ImageDropTarget = ({
91
85
  ...containerStyle,
92
86
  ...(responseAreaFill && !isDraggingElement && {
93
87
  backgroundColor: responseAreaFill
94
- }),
95
- cursor: hasSelection && canDrag ? 'pointer' : undefined
96
- };
97
- const handleContainerClick = () => {
98
- if (!canDrag) return;
99
- if (selectedResponse) {
100
- onPlacementClick?.(index);
101
- }
102
-
103
- // Empty background clicked with nothing selected: nothing to place.
104
- };
105
-
106
- // Only a native Tab stop when there's nothing else in this container to carry
107
- // tabbability — once it holds an answer, that answer's own tile (rendered by
108
- // PossibleResponse, via dnd-kit's `useDraggable`) is already independently tabbable,
109
- // and adding a second stop for the same visual container would add an extra stop to
110
- // the existing Tab order (match-list's equivalent)
111
- const isNativeTabStop = answers.length === 0 && canDrag;
112
- const handleContainerKeyDown = e => {
113
- if (e.code === 'Space' || e.code === 'Enter') {
114
- e.preventDefault();
115
- handleContainerClick();
116
- }
88
+ })
117
89
  };
118
90
  return /*#__PURE__*/_react.default.createElement(ResponseContainer, {
119
91
  ref: ref => {
@@ -121,13 +93,7 @@ const ImageDropTarget = ({
121
93
  setNodeRef(ref);
122
94
  },
123
95
  className: containerClasses,
124
- style: updatedContainerStyle,
125
- role: isNativeTabStop ? 'button' : undefined,
126
- tabIndex: isNativeTabStop ? 0 : -1,
127
- onClick: handleContainerClick,
128
- onKeyDown: isNativeTabStop ? handleContainerKeyDown : undefined,
129
- onMouseEnter: () => setIsHovered(true),
130
- onMouseLeave: () => setIsHovered(false)
96
+ style: updatedContainerStyle
131
97
  }, answers.length ? /*#__PURE__*/_react.default.createElement(AnswersContainer, {
132
98
  ref: ref => {
133
99
  dropContainerResponsesHeightRef.current = ref?.getBoundingClientRect().height;
@@ -141,10 +107,7 @@ const ImageDropTarget = ({
141
107
  answerChoiceTransparency: answerChoiceTransparency,
142
108
  containerStyle: {
143
109
  padding: imageDropTargetPadding ? imageDropTargetPadding : shouldHaveSmallPadding ? '2px' : '6px 10px'
144
- },
145
- selectedResponse: selectedResponse,
146
- onSelectClick: onSelectClick,
147
- onPlacementClick: onPlacementClick
110
+ }
148
111
  }))) : null);
149
112
  };
150
113
  ImageDropTarget.propTypes = {
@@ -161,10 +124,7 @@ ImageDropTarget.propTypes = {
161
124
  answerChoiceTransparency: _propTypes.default.bool,
162
125
  responseContainerPadding: _propTypes.default.string,
163
126
  imageDropTargetPadding: _propTypes.default.string,
164
- maxResponsePerZone: _propTypes.default.number,
165
- selectedResponse: _propTypes.default.object,
166
- onSelectClick: _propTypes.default.func,
167
- onPlacementClick: _propTypes.default.func
127
+ maxResponsePerZone: _propTypes.default.number
168
128
  };
169
129
  var _default = exports.default = ImageDropTarget;
170
130
  //# sourceMappingURL=image-drop-target.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"image-drop-target.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_core","_styles","_renderUi","_classnames","_possibleResponse","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AnswersContainer","styled","display","flexWrap","ResponseContainer","position","boxSizing","border","color","text","backgroundColor","ImageDropTarget","answers","canDrag","containerStyle","draggingElement","onDragAnswerBegin","onDragAnswerEnd","showDashedBorder","responseAreaFill","responseContainerPadding","imageDropTargetPadding","answerChoiceTransparency","maxResponsePerZone","onDrop","index","selectedResponse","onSelectClick","onPlacementClick","isHovered","setIsHovered","useState","shouldHaveSmallPadding","setShouldHaveSmallPadding","dropContainerRef","useRef","dropContainerResponsesHeightRef","setNodeRef","isOver","useDroppable","id","data","containerIndex","useEffect","container","current","handleTouchStart","preventDefault","addEventListener","passive","removeEventListener","isDraggingElement","hasSelection","showsHoverEffect","containerClasses","cx","dashed","active","updatedContainerStyle","padding","cursor","undefined","handleContainerClick","isNativeTabStop","length","handleContainerKeyDown","code","createElement","ref","className","style","role","tabIndex","onClick","onKeyDown","onMouseEnter","onMouseLeave","getBoundingClientRect","height","map","answer","key","onDragBegin","onDragEnd","propTypes","PropTypes","object","array","bool","isRequired","func","string","number","_default","exports"],"sources":["../src/image-drop-target.jsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { useDroppable } from '@dnd-kit/core';\nimport { styled } from '@mui/material/styles';\nimport { color } from '@pie-lib/render-ui';\nimport cx from 'classnames';\n\nimport PossibleResponse from './possible-response';\n\nconst AnswersContainer = styled('div')(() => ({\n display: 'flex',\n flexWrap: 'wrap',\n}));\n\nconst ResponseContainer = styled('div')(() => ({\n position: 'absolute',\n boxSizing: 'border-box',\n '&.active': {\n border: `2px solid ${color.text()}`,\n backgroundColor: 'rgba(230, 242, 252, .8)',\n },\n '&.dashed': {\n border: `2px dashed ${color.text()}`,\n },\n '&.is-over': {\n border: '1px solid rgb(158, 158, 158)',\n backgroundColor: 'rgb(224, 224, 224)',\n },\n}));\n\nconst ImageDropTarget = ({\n answers,\n canDrag,\n containerStyle,\n draggingElement,\n onDragAnswerBegin,\n onDragAnswerEnd,\n showDashedBorder,\n responseAreaFill,\n responseContainerPadding = '10px',\n imageDropTargetPadding,\n answerChoiceTransparency,\n maxResponsePerZone,\n onDrop,\n index,\n selectedResponse,\n onSelectClick,\n onPlacementClick,\n}) => {\n const [isHovered, setIsHovered] = useState(false);\n const [shouldHaveSmallPadding, setShouldHaveSmallPadding] = useState(false);\n const dropContainerRef = useRef(null);\n const dropContainerResponsesHeightRef = useRef(null);\n\n const { setNodeRef, isOver } = useDroppable({\n id: `response-container-${index}`,\n data: {\n containerIndex: index,\n onDrop,\n },\n });\n\n useEffect(() => {\n const container = dropContainerRef.current;\n\n if (!container) return;\n\n const handleTouchStart = (e) => {\n e.preventDefault();\n };\n\n container.addEventListener('touchstart', handleTouchStart, { passive: false });\n\n return () => {\n container.removeEventListener('touchstart', handleTouchStart);\n };\n }, []);\n\n const isDraggingElement = !!draggingElement.id;\n const hasSelection = !!selectedResponse;\n const showsHoverEffect = isOver || (hasSelection && isHovered && canDrag);\n\n const containerClasses = cx({\n 'is-over': showsHoverEffect,\n dashed: showDashedBorder && !isDraggingElement,\n active: isDraggingElement,\n });\n\n const updatedContainerStyle = {\n padding: maxResponsePerZone === 1 ? '0' : responseContainerPadding,\n ...containerStyle,\n ...(responseAreaFill && !isDraggingElement && { backgroundColor: responseAreaFill }),\n cursor: hasSelection && canDrag ? 'pointer' : undefined,\n };\n\n const handleContainerClick = () => {\n if (!canDrag) return;\n\n if (selectedResponse) {\n onPlacementClick?.(index);\n }\n\n // Empty background clicked with nothing selected: nothing to place.\n };\n\n // Only a native Tab stop when there's nothing else in this container to carry\n // tabbability — once it holds an answer, that answer's own tile (rendered by\n // PossibleResponse, via dnd-kit's `useDraggable`) is already independently tabbable,\n // and adding a second stop for the same visual container would add an extra stop to\n // the existing Tab order (match-list's equivalent)\n const isNativeTabStop = answers.length === 0 && canDrag;\n\n const handleContainerKeyDown = (e) => {\n if (e.code === 'Space' || e.code === 'Enter') {\n e.preventDefault();\n handleContainerClick();\n }\n };\n\n return (\n <ResponseContainer\n ref={(ref) => {\n dropContainerRef.current = ref;\n setNodeRef(ref);\n }}\n className={containerClasses}\n style={updatedContainerStyle}\n role={isNativeTabStop ? 'button' : undefined}\n tabIndex={isNativeTabStop ? 0 : -1}\n onClick={handleContainerClick}\n onKeyDown={isNativeTabStop ? handleContainerKeyDown : undefined}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n >\n {answers.length ? (\n <AnswersContainer\n ref={(ref) => {\n dropContainerResponsesHeightRef.current = ref?.getBoundingClientRect().height;\n }}\n >\n {answers.map((answer) => (\n <PossibleResponse\n key={answer.id}\n data={answer}\n canDrag={canDrag}\n onDragBegin={() => onDragAnswerBegin(answer)}\n onDragEnd={onDragAnswerEnd}\n answerChoiceTransparency={answerChoiceTransparency}\n containerStyle={{\n padding: imageDropTargetPadding ? imageDropTargetPadding : shouldHaveSmallPadding ? '2px' : '6px 10px',\n }}\n selectedResponse={selectedResponse}\n onSelectClick={onSelectClick}\n onPlacementClick={onPlacementClick}\n />\n ))}\n </AnswersContainer>\n ) : null}\n </ResponseContainer>\n );\n};\n\nImageDropTarget.propTypes = {\n answer: PropTypes.object,\n answers: PropTypes.array,\n canDrag: PropTypes.bool.isRequired,\n containerStyle: PropTypes.object.isRequired,\n draggingElement: PropTypes.object.isRequired,\n onDragAnswerBegin: PropTypes.func.isRequired,\n onDragAnswerEnd: PropTypes.func.isRequired,\n onDrop: PropTypes.func.isRequired,\n showDashedBorder: PropTypes.bool,\n responseAreaFill: PropTypes.string,\n answerChoiceTransparency: PropTypes.bool,\n responseContainerPadding: PropTypes.string,\n imageDropTargetPadding: PropTypes.string,\n maxResponsePerZone: PropTypes.number,\n selectedResponse: PropTypes.object,\n onSelectClick: PropTypes.func,\n onPlacementClick: PropTypes.func,\n};\n\nexport default ImageDropTarget;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAEA,IAAAO,iBAAA,GAAAL,sBAAA,CAAAF,OAAA;AAAmD,SAAAD,wBAAAS,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,CAAAS,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,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AAEA;EAAiB,CACpC,CACF,CACe,CAAC,GACjB,IACa,CAAC;AAExB,CAAC;AAEDjB,eAAe,CAACyE,SAAS,GAAG;EAC1BJ,MAAM,EAAEK,kBAAS,CAACC,MAAM;EACxB1E,OAAO,EAAEyE,kBAAS,CAACE,KAAK;EACxB1E,OAAO,EAAEwE,kBAAS,CAACG,IAAI,CAACC,UAAU;EAClC3E,cAAc,EAAEuE,kBAAS,CAACC,MAAM,CAACG,UAAU;EAC3C1E,eAAe,EAAEsE,kBAAS,CAACC,MAAM,CAACG,UAAU;EAC5CzE,iBAAiB,EAAEqE,kBAAS,CAACK,IAAI,CAACD,UAAU;EAC5CxE,eAAe,EAAEoE,kBAAS,CAACK,IAAI,CAACD,UAAU;EAC1CjE,MAAM,EAAE6D,kBAAS,CAACK,IAAI,CAACD,UAAU;EACjCvE,gBAAgB,EAAEmE,kBAAS,CAACG,IAAI;EAChCrE,gBAAgB,EAAEkE,kBAAS,CAACM,MAAM;EAClCrE,wBAAwB,EAAE+D,kBAAS,CAACG,IAAI;EACxCpE,wBAAwB,EAAEiE,kBAAS,CAACM,MAAM;EAC1CtE,sBAAsB,EAAEgE,kBAAS,CAACM,MAAM;EACxCpE,kBAAkB,EAAE8D,kBAAS,CAACO,MAAM;EACpClE,gBAAgB,EAAE2D,kBAAS,CAACC,MAAM;EAClC3D,aAAa,EAAE0D,kBAAS,CAACK,IAAI;EAC7B9D,gBAAgB,EAAEyD,kBAAS,CAACK;AAC9B,CAAC;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAvG,OAAA,GAEaoB,eAAe","ignoreList":[]}
1
+ {"version":3,"file":"image-drop-target.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_core","_styles","_renderUi","_classnames","_possibleResponse","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AnswersContainer","styled","display","flexWrap","ResponseContainer","position","boxSizing","border","color","text","backgroundColor","ImageDropTarget","answers","canDrag","containerStyle","draggingElement","onDragAnswerBegin","onDragAnswerEnd","showDashedBorder","responseAreaFill","responseContainerPadding","imageDropTargetPadding","answerChoiceTransparency","maxResponsePerZone","onDrop","index","shouldHaveSmallPadding","setShouldHaveSmallPadding","useState","dropContainerRef","useRef","dropContainerResponsesHeightRef","setNodeRef","isOver","useDroppable","id","data","containerIndex","useEffect","container","current","handleTouchStart","preventDefault","addEventListener","passive","removeEventListener","isDraggingElement","containerClasses","cx","dashed","active","updatedContainerStyle","padding","createElement","ref","className","style","length","getBoundingClientRect","height","map","answer","key","onDragBegin","onDragEnd","propTypes","PropTypes","object","array","bool","isRequired","func","string","number","_default","exports"],"sources":["../src/image-drop-target.jsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { useDroppable } from '@dnd-kit/core';\nimport { styled } from '@mui/material/styles';\nimport { color } from '@pie-lib/render-ui';\nimport cx from 'classnames';\n\nimport PossibleResponse from './possible-response';\n\nconst AnswersContainer = styled('div')(() => ({\n display: 'flex',\n flexWrap: 'wrap',\n}));\n\nconst ResponseContainer = styled('div')(() => ({\n position: 'absolute',\n boxSizing: 'border-box',\n '&.active': {\n border: `2px solid ${color.text()}`,\n backgroundColor: 'rgba(230, 242, 252, .8)',\n },\n '&.dashed': {\n border: `2px dashed ${color.text()}`,\n },\n '&.is-over': {\n border: '1px solid rgb(158, 158, 158)',\n backgroundColor: 'rgb(224, 224, 224)',\n },\n}));\n\nconst ImageDropTarget = ({\n answers,\n canDrag,\n containerStyle,\n draggingElement,\n onDragAnswerBegin,\n onDragAnswerEnd,\n showDashedBorder,\n responseAreaFill,\n responseContainerPadding = '10px',\n imageDropTargetPadding,\n answerChoiceTransparency,\n maxResponsePerZone,\n onDrop,\n index,\n}) => {\n const [shouldHaveSmallPadding, setShouldHaveSmallPadding] = useState(false);\n const dropContainerRef = useRef(null);\n const dropContainerResponsesHeightRef = useRef(null);\n\n const { setNodeRef, isOver } = useDroppable({\n id: `response-container-${index}`,\n data: {\n containerIndex: index,\n onDrop,\n },\n });\n\n useEffect(() => {\n const container = dropContainerRef.current;\n\n if (!container) return;\n\n const handleTouchStart = (e) => {\n e.preventDefault();\n };\n\n container.addEventListener('touchstart', handleTouchStart, { passive: false });\n\n return () => {\n container.removeEventListener('touchstart', handleTouchStart);\n };\n }, []);\n\n const isDraggingElement = !!draggingElement.id;\n\n const containerClasses = cx({\n 'is-over': isOver,\n dashed: showDashedBorder && !isDraggingElement,\n active: isDraggingElement,\n });\n\n const updatedContainerStyle = {\n padding: maxResponsePerZone === 1 ? '0' : responseContainerPadding,\n ...containerStyle,\n ...(responseAreaFill && !isDraggingElement && { backgroundColor: responseAreaFill }),\n };\n\n return (\n <ResponseContainer\n ref={(ref) => {\n dropContainerRef.current = ref;\n setNodeRef(ref);\n }}\n className={containerClasses}\n style={updatedContainerStyle}\n >\n {answers.length ? (\n <AnswersContainer\n ref={(ref) => {\n dropContainerResponsesHeightRef.current = ref?.getBoundingClientRect().height;\n }}\n >\n {answers.map((answer) => (\n <PossibleResponse\n key={answer.id}\n data={answer}\n canDrag={canDrag}\n onDragBegin={() => onDragAnswerBegin(answer)}\n onDragEnd={onDragAnswerEnd}\n answerChoiceTransparency={answerChoiceTransparency}\n containerStyle={{\n padding: imageDropTargetPadding ? imageDropTargetPadding : shouldHaveSmallPadding ? '2px' : '6px 10px',\n }}\n />\n ))}\n </AnswersContainer>\n ) : null}\n </ResponseContainer>\n );\n};\n\nImageDropTarget.propTypes = {\n answer: PropTypes.object,\n answers: PropTypes.array,\n canDrag: PropTypes.bool.isRequired,\n containerStyle: PropTypes.object.isRequired,\n draggingElement: PropTypes.object.isRequired,\n onDragAnswerBegin: PropTypes.func.isRequired,\n onDragAnswerEnd: PropTypes.func.isRequired,\n onDrop: PropTypes.func.isRequired,\n showDashedBorder: PropTypes.bool,\n responseAreaFill: PropTypes.string,\n answerChoiceTransparency: PropTypes.bool,\n responseContainerPadding: P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IAAI;EACxCjD,wBAAwB,EAAE8C,kBAAS,CAACM,MAAM;EAC1CnD,sBAAsB,EAAE6C,kBAAS,CAACM,MAAM;EACxCjD,kBAAkB,EAAE2C,kBAAS,CAACO;AAChC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAApF,OAAA,GAEaoB,eAAe","ignoreList":[]}
package/lib/index.js CHANGED
@@ -37,7 +37,7 @@ class ImageClozeAssociation extends HTMLElement {
37
37
  if (autoplayAudioEnabled && completeAudioEnabled && !this.audioComplete) {
38
38
  if (elementContext) {
39
39
  const audio = elementContext.querySelector('audio');
40
- const isInsidePrompt = audio && audio.closest('.preview-prompt');
40
+ const isInsidePrompt = audio && audio.closest('#preview-prompt');
41
41
 
42
42
  // only require audio completion if audio exists and is inside the prompt
43
43
  if (audio && isInsidePrompt) {
@@ -129,7 +129,7 @@ class ImageClozeAssociation extends HTMLElement {
129
129
  mutationsList.forEach(mutation => {
130
130
  if (mutation.type === 'childList') {
131
131
  const audio = this.querySelector('audio');
132
- const isInsidePrompt = audio && audio.closest('.preview-prompt');
132
+ const isInsidePrompt = audio && audio.closest('#preview-prompt');
133
133
  if (!this._model) return;
134
134
  if (!this._model.autoplayAudioEnabled) return;
135
135
  if (audio && !isInsidePrompt) return;