@pie-element/hotspot 11.0.5-esm.1 → 11.1.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (879) hide show
  1. package/CHANGELOG.md +1087 -2392
  2. package/configure/CHANGELOG.md +898 -2090
  3. package/configure/lib/DeleteWidget.js +30 -43
  4. package/configure/lib/DeleteWidget.js.map +1 -1
  5. package/configure/lib/button.js +26 -45
  6. package/configure/lib/button.js.map +1 -1
  7. package/configure/lib/buttons/circle.js +20 -27
  8. package/configure/lib/buttons/circle.js.map +1 -1
  9. package/configure/lib/buttons/polygon.js +26 -33
  10. package/configure/lib/buttons/polygon.js.map +1 -1
  11. package/configure/lib/buttons/rectangle.js +26 -33
  12. package/configure/lib/buttons/rectangle.js.map +1 -1
  13. package/configure/lib/defaults.js +5 -3
  14. package/configure/lib/defaults.js.map +1 -1
  15. package/configure/lib/hotspot-circle.js +136 -200
  16. package/configure/lib/hotspot-circle.js.map +1 -1
  17. package/configure/lib/hotspot-container.js +250 -355
  18. package/configure/lib/hotspot-container.js.map +1 -1
  19. package/configure/lib/hotspot-drawable.js +361 -473
  20. package/configure/lib/hotspot-drawable.js.map +1 -1
  21. package/configure/lib/hotspot-palette.js +92 -139
  22. package/configure/lib/hotspot-palette.js.map +1 -1
  23. package/configure/lib/hotspot-polygon.js +212 -318
  24. package/configure/lib/hotspot-polygon.js.map +1 -1
  25. package/configure/lib/hotspot-rectangle.js +132 -195
  26. package/configure/lib/hotspot-rectangle.js.map +1 -1
  27. package/configure/lib/icons.js +3 -7
  28. package/configure/lib/icons.js.map +1 -1
  29. package/configure/lib/image-konva.js +46 -86
  30. package/configure/lib/image-konva.js.map +1 -1
  31. package/configure/lib/index.js +162 -222
  32. package/configure/lib/index.js.map +1 -1
  33. package/configure/lib/root.js +302 -394
  34. package/configure/lib/root.js.map +1 -1
  35. package/configure/lib/shapes/circle.js +69 -101
  36. package/configure/lib/shapes/circle.js.map +1 -1
  37. package/configure/lib/shapes/index.js +4 -12
  38. package/configure/lib/shapes/index.js.map +1 -1
  39. package/configure/lib/shapes/polygon.js +64 -96
  40. package/configure/lib/shapes/polygon.js.map +1 -1
  41. package/configure/lib/shapes/rectagle.js +69 -101
  42. package/configure/lib/shapes/rectagle.js.map +1 -1
  43. package/configure/lib/shapes/utils.js +2 -8
  44. package/configure/lib/shapes/utils.js.map +1 -1
  45. package/configure/lib/upload-control.js +25 -52
  46. package/configure/lib/upload-control.js.map +1 -1
  47. package/configure/lib/utils.js +85 -139
  48. package/configure/lib/utils.js.map +1 -1
  49. package/configure/package.json +13 -12
  50. package/configure/src/__tests__/DeleteWidget.test.jsx +366 -0
  51. package/configure/src/__tests__/button.test.jsx +198 -0
  52. package/configure/src/__tests__/hotspot-circle.test.jsx +259 -0
  53. package/configure/src/__tests__/hotspot-container.test.js +50 -19
  54. package/configure/src/__tests__/hotspot-drawable.test.js +55 -34
  55. package/configure/src/__tests__/hotspot-palette.test.jsx +71 -0
  56. package/configure/src/__tests__/image-konva.test.jsx +226 -0
  57. package/configure/src/__tests__/index.test.js +167 -5
  58. package/configure/src/__tests__/root.test.js +89 -63
  59. package/configure/src/button.jsx +12 -20
  60. package/configure/src/defaults.js +1 -0
  61. package/configure/src/hotspot-circle.jsx +8 -19
  62. package/configure/src/hotspot-container.jsx +82 -98
  63. package/configure/src/hotspot-drawable.jsx +44 -46
  64. package/configure/src/hotspot-palette.jsx +45 -37
  65. package/configure/src/hotspot-polygon.jsx +3 -20
  66. package/configure/src/hotspot-rectangle.jsx +7 -19
  67. package/configure/src/icons.js +4 -2
  68. package/configure/src/index.js +12 -2
  69. package/configure/src/root.jsx +86 -80
  70. package/configure/src/upload-control.jsx +6 -16
  71. package/configure/src/utils.js +1 -1
  72. package/controller/CHANGELOG.md +574 -1431
  73. package/controller/lib/defaults.js +2 -3
  74. package/controller/lib/defaults.js.map +1 -1
  75. package/controller/lib/index.js +238 -208
  76. package/controller/lib/index.js.map +1 -1
  77. package/controller/lib/utils.js +15 -37
  78. package/controller/lib/utils.js.map +1 -1
  79. package/controller/package.json +3 -3
  80. package/controller/src/__tests__/index.test.js +4 -3
  81. package/controller/src/index.js +107 -5
  82. package/controller/src/utils.js +1 -2
  83. package/lib/hotspot/circle.js +109 -169
  84. package/lib/hotspot/circle.js.map +1 -1
  85. package/lib/hotspot/container.js +174 -260
  86. package/lib/hotspot/container.js.map +1 -1
  87. package/lib/hotspot/icons.js +4 -9
  88. package/lib/hotspot/icons.js.map +1 -1
  89. package/lib/hotspot/image-konva-tooltip.js +65 -112
  90. package/lib/hotspot/image-konva-tooltip.js.map +1 -1
  91. package/lib/hotspot/index.js +135 -198
  92. package/lib/hotspot/index.js.map +1 -1
  93. package/lib/hotspot/polygon.js +150 -215
  94. package/lib/hotspot/polygon.js.map +1 -1
  95. package/lib/hotspot/rectangle.js +128 -186
  96. package/lib/hotspot/rectangle.js.map +1 -1
  97. package/lib/index.js +187 -256
  98. package/lib/index.js.map +1 -1
  99. package/lib/session-updater.js +12 -18
  100. package/lib/session-updater.js.map +1 -1
  101. package/package.json +17 -31
  102. package/src/__tests__/container.test.jsx +27 -175
  103. package/src/__tests__/index.test.js +70 -30
  104. package/src/hotspot/__tests__/circle.test.jsx +464 -0
  105. package/src/hotspot/__tests__/container.test.jsx +546 -0
  106. package/src/hotspot/__tests__/image-konva-tooltip.test.jsx +510 -0
  107. package/src/hotspot/__tests__/polygon.test.jsx +502 -0
  108. package/src/hotspot/__tests__/rectangle.test.jsx +418 -0
  109. package/src/hotspot/circle.jsx +1 -13
  110. package/src/hotspot/container.jsx +35 -50
  111. package/src/hotspot/icons.js +6 -5
  112. package/src/hotspot/index.jsx +16 -28
  113. package/src/hotspot/polygon.jsx +3 -13
  114. package/src/hotspot/rectangle.jsx +4 -15
  115. package/src/index.js +21 -12
  116. package/configure/node_modules/@pie-lib/config-ui/CHANGELOG.json +0 -32
  117. package/configure/node_modules/@pie-lib/config-ui/CHANGELOG.md +0 -2198
  118. package/configure/node_modules/@pie-lib/config-ui/NEXT.CHANGELOG.json +0 -1
  119. package/configure/node_modules/@pie-lib/config-ui/esm/index.js +0 -3808
  120. package/configure/node_modules/@pie-lib/config-ui/esm/index.js.map +0 -1
  121. package/configure/node_modules/@pie-lib/config-ui/lib/alert-dialog.js +0 -75
  122. package/configure/node_modules/@pie-lib/config-ui/lib/alert-dialog.js.map +0 -1
  123. package/configure/node_modules/@pie-lib/config-ui/lib/checkbox.js +0 -99
  124. package/configure/node_modules/@pie-lib/config-ui/lib/checkbox.js.map +0 -1
  125. package/configure/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js +0 -164
  126. package/configure/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js.map +0 -1
  127. package/configure/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js +0 -445
  128. package/configure/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js.map +0 -1
  129. package/configure/node_modules/@pie-lib/config-ui/lib/choice-utils.js +0 -54
  130. package/configure/node_modules/@pie-lib/config-ui/lib/choice-utils.js.map +0 -1
  131. package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js +0 -195
  132. package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js.map +0 -1
  133. package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js +0 -75
  134. package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js.map +0 -1
  135. package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js +0 -189
  136. package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js.map +0 -1
  137. package/configure/node_modules/@pie-lib/config-ui/lib/form-section.js +0 -46
  138. package/configure/node_modules/@pie-lib/config-ui/lib/form-section.js.map +0 -1
  139. package/configure/node_modules/@pie-lib/config-ui/lib/help.js +0 -147
  140. package/configure/node_modules/@pie-lib/config-ui/lib/help.js.map +0 -1
  141. package/configure/node_modules/@pie-lib/config-ui/lib/index.js +0 -216
  142. package/configure/node_modules/@pie-lib/config-ui/lib/index.js.map +0 -1
  143. package/configure/node_modules/@pie-lib/config-ui/lib/input.js +0 -139
  144. package/configure/node_modules/@pie-lib/config-ui/lib/input.js.map +0 -1
  145. package/configure/node_modules/@pie-lib/config-ui/lib/inputs.js +0 -139
  146. package/configure/node_modules/@pie-lib/config-ui/lib/inputs.js.map +0 -1
  147. package/configure/node_modules/@pie-lib/config-ui/lib/langs.js +0 -179
  148. package/configure/node_modules/@pie-lib/config-ui/lib/langs.js.map +0 -1
  149. package/configure/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js +0 -143
  150. package/configure/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js.map +0 -1
  151. package/configure/node_modules/@pie-lib/config-ui/lib/layout/index.js +0 -24
  152. package/configure/node_modules/@pie-lib/config-ui/lib/layout/index.js.map +0 -1
  153. package/configure/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js +0 -191
  154. package/configure/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js.map +0 -1
  155. package/configure/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js +0 -86
  156. package/configure/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js.map +0 -1
  157. package/configure/node_modules/@pie-lib/config-ui/lib/mui-box/index.js +0 -79
  158. package/configure/node_modules/@pie-lib/config-ui/lib/mui-box/index.js.map +0 -1
  159. package/configure/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js +0 -458
  160. package/configure/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js.map +0 -1
  161. package/configure/node_modules/@pie-lib/config-ui/lib/number-text-field.js +0 -267
  162. package/configure/node_modules/@pie-lib/config-ui/lib/number-text-field.js.map +0 -1
  163. package/configure/node_modules/@pie-lib/config-ui/lib/radio-with-label.js +0 -49
  164. package/configure/node_modules/@pie-lib/config-ui/lib/radio-with-label.js.map +0 -1
  165. package/configure/node_modules/@pie-lib/config-ui/lib/settings/display-size.js +0 -77
  166. package/configure/node_modules/@pie-lib/config-ui/lib/settings/display-size.js.map +0 -1
  167. package/configure/node_modules/@pie-lib/config-ui/lib/settings/index.js +0 -143
  168. package/configure/node_modules/@pie-lib/config-ui/lib/settings/index.js.map +0 -1
  169. package/configure/node_modules/@pie-lib/config-ui/lib/settings/panel.js +0 -463
  170. package/configure/node_modules/@pie-lib/config-ui/lib/settings/panel.js.map +0 -1
  171. package/configure/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js +0 -53
  172. package/configure/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js.map +0 -1
  173. package/configure/node_modules/@pie-lib/config-ui/lib/settings/toggle.js +0 -74
  174. package/configure/node_modules/@pie-lib/config-ui/lib/settings/toggle.js.map +0 -1
  175. package/configure/node_modules/@pie-lib/config-ui/lib/tabs/index.js +0 -110
  176. package/configure/node_modules/@pie-lib/config-ui/lib/tabs/index.js.map +0 -1
  177. package/configure/node_modules/@pie-lib/config-ui/lib/tags-input/index.js +0 -198
  178. package/configure/node_modules/@pie-lib/config-ui/lib/tags-input/index.js.map +0 -1
  179. package/configure/node_modules/@pie-lib/config-ui/lib/two-choice.js +0 -180
  180. package/configure/node_modules/@pie-lib/config-ui/lib/two-choice.js.map +0 -1
  181. package/configure/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js +0 -84
  182. package/configure/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js.map +0 -1
  183. package/configure/node_modules/@pie-lib/config-ui/node_modules/debug/LICENSE +0 -20
  184. package/configure/node_modules/@pie-lib/config-ui/node_modules/debug/README.md +0 -481
  185. package/configure/node_modules/@pie-lib/config-ui/node_modules/debug/package.json +0 -59
  186. package/configure/node_modules/@pie-lib/config-ui/node_modules/debug/src/browser.js +0 -269
  187. package/configure/node_modules/@pie-lib/config-ui/node_modules/debug/src/common.js +0 -274
  188. package/configure/node_modules/@pie-lib/config-ui/node_modules/debug/src/index.js +0 -10
  189. package/configure/node_modules/@pie-lib/config-ui/node_modules/debug/src/node.js +0 -263
  190. package/configure/node_modules/@pie-lib/config-ui/node_modules/ms/index.js +0 -162
  191. package/configure/node_modules/@pie-lib/config-ui/node_modules/ms/license.md +0 -21
  192. package/configure/node_modules/@pie-lib/config-ui/node_modules/ms/package.json +0 -37
  193. package/configure/node_modules/@pie-lib/config-ui/node_modules/ms/readme.md +0 -60
  194. package/configure/node_modules/@pie-lib/config-ui/package.json +0 -40
  195. package/configure/node_modules/@pie-lib/config-ui/src/__tests__/__snapshots__/langs.test.jsx.snap +0 -32
  196. package/configure/node_modules/@pie-lib/config-ui/src/__tests__/__snapshots__/settings-panel.test.js.snap +0 -115
  197. package/configure/node_modules/@pie-lib/config-ui/src/__tests__/__snapshots__/two-choice.test.js.snap +0 -171
  198. package/configure/node_modules/@pie-lib/config-ui/src/__tests__/choice-utils.test.js +0 -12
  199. package/configure/node_modules/@pie-lib/config-ui/src/__tests__/langs.test.jsx +0 -37
  200. package/configure/node_modules/@pie-lib/config-ui/src/__tests__/number-text-field.test.jsx +0 -148
  201. package/configure/node_modules/@pie-lib/config-ui/src/__tests__/settings-panel.test.js +0 -204
  202. package/configure/node_modules/@pie-lib/config-ui/src/__tests__/two-choice.test.js +0 -24
  203. package/configure/node_modules/@pie-lib/config-ui/src/alert-dialog.jsx +0 -56
  204. package/configure/node_modules/@pie-lib/config-ui/src/checkbox.jsx +0 -73
  205. package/configure/node_modules/@pie-lib/config-ui/src/choice-configuration/__tests__/__snapshots__/feedback-menu.test.jsx.snap +0 -51
  206. package/configure/node_modules/@pie-lib/config-ui/src/choice-configuration/__tests__/__snapshots__/index.test.jsx.snap +0 -519
  207. package/configure/node_modules/@pie-lib/config-ui/src/choice-configuration/__tests__/feedback-menu.test.jsx +0 -10
  208. package/configure/node_modules/@pie-lib/config-ui/src/choice-configuration/__tests__/index.test.jsx +0 -92
  209. package/configure/node_modules/@pie-lib/config-ui/src/choice-configuration/feedback-menu.jsx +0 -90
  210. package/configure/node_modules/@pie-lib/config-ui/src/choice-configuration/index.jsx +0 -365
  211. package/configure/node_modules/@pie-lib/config-ui/src/choice-utils.js +0 -30
  212. package/configure/node_modules/@pie-lib/config-ui/src/feedback-config/__tests__/__snapshots__/feedback-config.test.jsx.snap +0 -27
  213. package/configure/node_modules/@pie-lib/config-ui/src/feedback-config/__tests__/__snapshots__/feedback-selector.test.jsx.snap +0 -38
  214. package/configure/node_modules/@pie-lib/config-ui/src/feedback-config/__tests__/feedback-config.test.jsx +0 -71
  215. package/configure/node_modules/@pie-lib/config-ui/src/feedback-config/__tests__/feedback-selector.test.jsx +0 -60
  216. package/configure/node_modules/@pie-lib/config-ui/src/feedback-config/feedback-selector.jsx +0 -122
  217. package/configure/node_modules/@pie-lib/config-ui/src/feedback-config/group.jsx +0 -52
  218. package/configure/node_modules/@pie-lib/config-ui/src/feedback-config/index.jsx +0 -112
  219. package/configure/node_modules/@pie-lib/config-ui/src/form-section.jsx +0 -23
  220. package/configure/node_modules/@pie-lib/config-ui/src/help.jsx +0 -87
  221. package/configure/node_modules/@pie-lib/config-ui/src/index.js +0 -55
  222. package/configure/node_modules/@pie-lib/config-ui/src/input.jsx +0 -72
  223. package/configure/node_modules/@pie-lib/config-ui/src/inputs.jsx +0 -98
  224. package/configure/node_modules/@pie-lib/config-ui/src/langs.jsx +0 -111
  225. package/configure/node_modules/@pie-lib/config-ui/src/layout/__tests__/__snapshots__/config.layout.test.jsx.snap +0 -59
  226. package/configure/node_modules/@pie-lib/config-ui/src/layout/__tests__/config.layout.test.jsx +0 -42
  227. package/configure/node_modules/@pie-lib/config-ui/src/layout/__tests__/layout-content.test.jsx +0 -3
  228. package/configure/node_modules/@pie-lib/config-ui/src/layout/config-layout.jsx +0 -75
  229. package/configure/node_modules/@pie-lib/config-ui/src/layout/index.js +0 -4
  230. package/configure/node_modules/@pie-lib/config-ui/src/layout/layout-contents.jsx +0 -118
  231. package/configure/node_modules/@pie-lib/config-ui/src/layout/settings-box.jsx +0 -35
  232. package/configure/node_modules/@pie-lib/config-ui/src/mui-box/index.jsx +0 -64
  233. package/configure/node_modules/@pie-lib/config-ui/src/number-text-field-custom.jsx +0 -337
  234. package/configure/node_modules/@pie-lib/config-ui/src/number-text-field.jsx +0 -202
  235. package/configure/node_modules/@pie-lib/config-ui/src/radio-with-label.jsx +0 -22
  236. package/configure/node_modules/@pie-lib/config-ui/src/settings/display-size.jsx +0 -52
  237. package/configure/node_modules/@pie-lib/config-ui/src/settings/index.js +0 -83
  238. package/configure/node_modules/@pie-lib/config-ui/src/settings/panel.jsx +0 -328
  239. package/configure/node_modules/@pie-lib/config-ui/src/settings/settings-radio-label.jsx +0 -24
  240. package/configure/node_modules/@pie-lib/config-ui/src/settings/toggle.jsx +0 -49
  241. package/configure/node_modules/@pie-lib/config-ui/src/tabs/index.jsx +0 -47
  242. package/configure/node_modules/@pie-lib/config-ui/src/tags-input/__tests__/__snapshots__/index.test.jsx.snap +0 -170
  243. package/configure/node_modules/@pie-lib/config-ui/src/tags-input/__tests__/index.test.jsx +0 -62
  244. package/configure/node_modules/@pie-lib/config-ui/src/tags-input/index.jsx +0 -119
  245. package/configure/node_modules/@pie-lib/config-ui/src/two-choice.jsx +0 -94
  246. package/configure/node_modules/@pie-lib/config-ui/src/with-stateful-model.jsx +0 -36
  247. package/configure/node_modules/@pie-lib/drag/CHANGELOG.json +0 -1
  248. package/configure/node_modules/@pie-lib/drag/CHANGELOG.md +0 -709
  249. package/configure/node_modules/@pie-lib/drag/NEXT.CHANGELOG.json +0 -1
  250. package/configure/node_modules/@pie-lib/drag/esm/index.js +0 -525
  251. package/configure/node_modules/@pie-lib/drag/esm/index.js.map +0 -1
  252. package/configure/node_modules/@pie-lib/drag/lib/choice.js +0 -129
  253. package/configure/node_modules/@pie-lib/drag/lib/choice.js.map +0 -1
  254. package/configure/node_modules/@pie-lib/drag/lib/drag-in-the-blank-dp.js +0 -35
  255. package/configure/node_modules/@pie-lib/drag/lib/drag-in-the-blank-dp.js.map +0 -1
  256. package/configure/node_modules/@pie-lib/drag/lib/drag-type.js +0 -15
  257. package/configure/node_modules/@pie-lib/drag/lib/drag-type.js.map +0 -1
  258. package/configure/node_modules/@pie-lib/drag/lib/droppable-placeholder.js +0 -82
  259. package/configure/node_modules/@pie-lib/drag/lib/droppable-placeholder.js.map +0 -1
  260. package/configure/node_modules/@pie-lib/drag/lib/ica-dp.js +0 -37
  261. package/configure/node_modules/@pie-lib/drag/lib/ica-dp.js.map +0 -1
  262. package/configure/node_modules/@pie-lib/drag/lib/index.js +0 -89
  263. package/configure/node_modules/@pie-lib/drag/lib/index.js.map +0 -1
  264. package/configure/node_modules/@pie-lib/drag/lib/match-list-dp.js +0 -37
  265. package/configure/node_modules/@pie-lib/drag/lib/match-list-dp.js.map +0 -1
  266. package/configure/node_modules/@pie-lib/drag/lib/placeholder.js +0 -153
  267. package/configure/node_modules/@pie-lib/drag/lib/placeholder.js.map +0 -1
  268. package/configure/node_modules/@pie-lib/drag/lib/preview-component.js +0 -194
  269. package/configure/node_modules/@pie-lib/drag/lib/preview-component.js.map +0 -1
  270. package/configure/node_modules/@pie-lib/drag/lib/swap.js +0 -25
  271. package/configure/node_modules/@pie-lib/drag/lib/swap.js.map +0 -1
  272. package/configure/node_modules/@pie-lib/drag/lib/uid-context.js +0 -40
  273. package/configure/node_modules/@pie-lib/drag/lib/uid-context.js.map +0 -1
  274. package/configure/node_modules/@pie-lib/drag/lib/with-drag-context.js +0 -59
  275. package/configure/node_modules/@pie-lib/drag/lib/with-drag-context.js.map +0 -1
  276. package/configure/node_modules/@pie-lib/drag/package.json +0 -34
  277. package/configure/node_modules/@pie-lib/drag/src/__tests__/__snapshots__/placeholder.test.jsx.snap +0 -68
  278. package/configure/node_modules/@pie-lib/drag/src/__tests__/placeholder.test.jsx +0 -48
  279. package/configure/node_modules/@pie-lib/drag/src/__tests__/uid-context.test.jsx +0 -21
  280. package/configure/node_modules/@pie-lib/drag/src/choice.jsx +0 -76
  281. package/configure/node_modules/@pie-lib/drag/src/drag-in-the-blank-dp.jsx +0 -19
  282. package/configure/node_modules/@pie-lib/drag/src/drag-type.js +0 -7
  283. package/configure/node_modules/@pie-lib/drag/src/droppable-placeholder.jsx +0 -38
  284. package/configure/node_modules/@pie-lib/drag/src/ica-dp.jsx +0 -23
  285. package/configure/node_modules/@pie-lib/drag/src/index.js +0 -23
  286. package/configure/node_modules/@pie-lib/drag/src/match-list-dp.jsx +0 -23
  287. package/configure/node_modules/@pie-lib/drag/src/placeholder.jsx +0 -145
  288. package/configure/node_modules/@pie-lib/drag/src/preview-component.jsx +0 -153
  289. package/configure/node_modules/@pie-lib/drag/src/swap.js +0 -14
  290. package/configure/node_modules/@pie-lib/drag/src/uid-context.js +0 -13
  291. package/configure/node_modules/@pie-lib/drag/src/with-drag-context.js +0 -32
  292. package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.json +0 -32
  293. package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.md +0 -2224
  294. package/configure/node_modules/@pie-lib/editable-html/NEXT.CHANGELOG.json +0 -1
  295. package/configure/node_modules/@pie-lib/editable-html/esm/index.js +0 -9998
  296. package/configure/node_modules/@pie-lib/editable-html/esm/index.js.map +0 -1
  297. package/configure/node_modules/@pie-lib/editable-html/lib/block-tags.js +0 -25
  298. package/configure/node_modules/@pie-lib/editable-html/lib/block-tags.js.map +0 -1
  299. package/configure/node_modules/@pie-lib/editable-html/lib/constants.js +0 -16
  300. package/configure/node_modules/@pie-lib/editable-html/lib/constants.js.map +0 -1
  301. package/configure/node_modules/@pie-lib/editable-html/lib/editor.js +0 -1356
  302. package/configure/node_modules/@pie-lib/editable-html/lib/editor.js.map +0 -1
  303. package/configure/node_modules/@pie-lib/editable-html/lib/index.js +0 -269
  304. package/configure/node_modules/@pie-lib/editable-html/lib/index.js.map +0 -1
  305. package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js +0 -16
  306. package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js.map +0 -1
  307. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/custom-popper.js +0 -73
  308. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/custom-popper.js.map +0 -1
  309. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/index.js +0 -305
  310. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/index.js.map +0 -1
  311. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/utils.js +0 -381
  312. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/utils.js.map +0 -1
  313. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/css/icons/index.js +0 -37
  314. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/css/icons/index.js.map +0 -1
  315. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/css/index.js +0 -397
  316. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/css/index.js.map +0 -1
  317. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/customPlugin/index.js +0 -114
  318. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/customPlugin/index.js.map +0 -1
  319. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/html/icons/index.js +0 -38
  320. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/html/icons/index.js.map +0 -1
  321. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/html/index.js +0 -80
  322. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/html/index.js.map +0 -1
  323. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/alt-dialog.js +0 -129
  324. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/alt-dialog.js.map +0 -1
  325. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js +0 -419
  326. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js.map +0 -1
  327. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js +0 -177
  328. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js.map +0 -1
  329. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js +0 -263
  330. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js.map +0 -1
  331. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js +0 -161
  332. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js.map +0 -1
  333. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js +0 -402
  334. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js.map +0 -1
  335. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js +0 -334
  336. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js.map +0 -1
  337. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js +0 -454
  338. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js.map +0 -1
  339. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js +0 -387
  340. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js.map +0 -1
  341. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js +0 -709
  342. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js.map +0 -1
  343. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js +0 -101
  344. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js.map +0 -1
  345. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js +0 -93
  346. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js.map +0 -1
  347. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/rendering/index.js +0 -46
  348. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/rendering/index.js.map +0 -1
  349. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js +0 -289
  350. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js.map +0 -1
  351. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js +0 -97
  352. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js.map +0 -1
  353. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js +0 -57
  354. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js.map +0 -1
  355. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js +0 -95
  356. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js.map +0 -1
  357. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js +0 -341
  358. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js.map +0 -1
  359. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js +0 -75
  360. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js.map +0 -1
  361. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/math-templated/index.js +0 -130
  362. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/math-templated/index.js.map +0 -1
  363. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js +0 -125
  364. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js.map +0 -1
  365. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/CustomTablePlugin.js +0 -133
  366. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/CustomTablePlugin.js.map +0 -1
  367. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js +0 -69
  368. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js.map +0 -1
  369. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js +0 -483
  370. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js.map +0 -1
  371. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js +0 -187
  372. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js.map +0 -1
  373. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/textAlign/icons/index.js +0 -226
  374. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/textAlign/icons/index.js.map +0 -1
  375. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/textAlign/index.js +0 -34
  376. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/textAlign/index.js.map +0 -1
  377. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js +0 -229
  378. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js.map +0 -1
  379. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js +0 -53
  380. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js.map +0 -1
  381. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js +0 -286
  382. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js.map +0 -1
  383. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js +0 -34
  384. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js.map +0 -1
  385. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js +0 -194
  386. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js.map +0 -1
  387. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js +0 -376
  388. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js.map +0 -1
  389. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js +0 -62
  390. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js.map +0 -1
  391. package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js +0 -677
  392. package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js.map +0 -1
  393. package/configure/node_modules/@pie-lib/editable-html/lib/shared/alert-dialog.js +0 -75
  394. package/configure/node_modules/@pie-lib/editable-html/lib/theme.js +0 -9
  395. package/configure/node_modules/@pie-lib/editable-html/lib/theme.js.map +0 -1
  396. package/configure/node_modules/@pie-lib/editable-html/node_modules/debug/LICENSE +0 -20
  397. package/configure/node_modules/@pie-lib/editable-html/node_modules/debug/README.md +0 -481
  398. package/configure/node_modules/@pie-lib/editable-html/node_modules/debug/package.json +0 -59
  399. package/configure/node_modules/@pie-lib/editable-html/node_modules/debug/src/browser.js +0 -269
  400. package/configure/node_modules/@pie-lib/editable-html/node_modules/debug/src/common.js +0 -274
  401. package/configure/node_modules/@pie-lib/editable-html/node_modules/debug/src/index.js +0 -10
  402. package/configure/node_modules/@pie-lib/editable-html/node_modules/debug/src/node.js +0 -263
  403. package/configure/node_modules/@pie-lib/editable-html/node_modules/ms/index.js +0 -162
  404. package/configure/node_modules/@pie-lib/editable-html/node_modules/ms/license.md +0 -21
  405. package/configure/node_modules/@pie-lib/editable-html/node_modules/ms/package.json +0 -37
  406. package/configure/node_modules/@pie-lib/editable-html/node_modules/ms/readme.md +0 -60
  407. package/configure/node_modules/@pie-lib/editable-html/package.json +0 -60
  408. package/configure/node_modules/@pie-lib/editable-html/src/__tests__/editor.test.jsx +0 -363
  409. package/configure/node_modules/@pie-lib/editable-html/src/__tests__/serialization.test.js +0 -291
  410. package/configure/node_modules/@pie-lib/editable-html/src/__tests__/utils.js +0 -36
  411. package/configure/node_modules/@pie-lib/editable-html/src/block-tags.js +0 -17
  412. package/configure/node_modules/@pie-lib/editable-html/src/constants.js +0 -7
  413. package/configure/node_modules/@pie-lib/editable-html/src/editor.jsx +0 -1197
  414. package/configure/node_modules/@pie-lib/editable-html/src/index.jsx +0 -162
  415. package/configure/node_modules/@pie-lib/editable-html/src/parse-html.js +0 -8
  416. package/configure/node_modules/@pie-lib/editable-html/src/plugins/README.md +0 -27
  417. package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/custom-popper.js +0 -48
  418. package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/index.jsx +0 -284
  419. package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/utils.js +0 -447
  420. package/configure/node_modules/@pie-lib/editable-html/src/plugins/css/icons/index.jsx +0 -17
  421. package/configure/node_modules/@pie-lib/editable-html/src/plugins/css/index.jsx +0 -346
  422. package/configure/node_modules/@pie-lib/editable-html/src/plugins/customPlugin/index.jsx +0 -85
  423. package/configure/node_modules/@pie-lib/editable-html/src/plugins/html/icons/index.jsx +0 -19
  424. package/configure/node_modules/@pie-lib/editable-html/src/plugins/html/index.jsx +0 -72
  425. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/__tests__/__snapshots__/component.test.jsx.snap +0 -51
  426. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/__tests__/__snapshots__/image-toolbar-logic.test.jsx.snap +0 -27
  427. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/__tests__/__snapshots__/image-toolbar.test.jsx.snap +0 -44
  428. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/__tests__/component.test.jsx +0 -41
  429. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/__tests__/image-toolbar-logic.test.jsx +0 -42
  430. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/__tests__/image-toolbar.test.jsx +0 -11
  431. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/__tests__/index.test.js +0 -95
  432. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/__tests__/insert-image-handler.test.js +0 -113
  433. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/__tests__/mock-change.js +0 -15
  434. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/alt-dialog.jsx +0 -82
  435. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/component.jsx +0 -343
  436. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/image-toolbar.jsx +0 -100
  437. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/index.jsx +0 -227
  438. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/insert-image-handler.js +0 -117
  439. package/configure/node_modules/@pie-lib/editable-html/src/plugins/index.jsx +0 -360
  440. package/configure/node_modules/@pie-lib/editable-html/src/plugins/list/__tests__/index.test.js +0 -54
  441. package/configure/node_modules/@pie-lib/editable-html/src/plugins/list/index.jsx +0 -305
  442. package/configure/node_modules/@pie-lib/editable-html/src/plugins/math/__tests__/__snapshots__/index.test.jsx.snap +0 -48
  443. package/configure/node_modules/@pie-lib/editable-html/src/plugins/math/__tests__/index.test.jsx +0 -245
  444. package/configure/node_modules/@pie-lib/editable-html/src/plugins/math/index.jsx +0 -379
  445. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/__tests__/index.test.js +0 -75
  446. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/index.jsx +0 -325
  447. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-dialog.js +0 -624
  448. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-toolbar.jsx +0 -56
  449. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-wrapper.jsx +0 -43
  450. package/configure/node_modules/@pie-lib/editable-html/src/plugins/rendering/index.js +0 -31
  451. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/choice.jsx +0 -215
  452. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/index.jsx +0 -76
  453. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/explicit-constructed-response/index.jsx +0 -48
  454. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/icons/index.jsx +0 -71
  455. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/index.jsx +0 -299
  456. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/inline-dropdown/index.jsx +0 -70
  457. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/math-templated/index.jsx +0 -104
  458. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/utils.jsx +0 -90
  459. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/CustomTablePlugin.js +0 -113
  460. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/__tests__/__snapshots__/table-toolbar.test.jsx.snap +0 -44
  461. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/__tests__/index.test.jsx +0 -401
  462. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/__tests__/table-toolbar.test.jsx +0 -42
  463. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/icons/index.jsx +0 -53
  464. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/index.jsx +0 -427
  465. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/table-toolbar.jsx +0 -136
  466. package/configure/node_modules/@pie-lib/editable-html/src/plugins/textAlign/icons/index.jsx +0 -139
  467. package/configure/node_modules/@pie-lib/editable-html/src/plugins/textAlign/index.jsx +0 -23
  468. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/__tests__/__snapshots__/default-toolbar.test.jsx.snap +0 -923
  469. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/__tests__/__snapshots__/editor-and-toolbar.test.jsx.snap +0 -20
  470. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/__tests__/__snapshots__/toolbar-buttons.test.jsx.snap +0 -36
  471. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/__tests__/__snapshots__/toolbar.test.jsx.snap +0 -46
  472. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/__tests__/default-toolbar.test.jsx +0 -94
  473. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/__tests__/editor-and-toolbar.test.jsx +0 -37
  474. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/__tests__/toolbar-buttons.test.jsx +0 -51
  475. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/__tests__/toolbar.test.jsx +0 -106
  476. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/default-toolbar.jsx +0 -206
  477. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/done-button.jsx +0 -38
  478. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/editor-and-toolbar.jsx +0 -257
  479. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/index.jsx +0 -23
  480. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar-buttons.jsx +0 -138
  481. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar.jsx +0 -338
  482. package/configure/node_modules/@pie-lib/editable-html/src/plugins/utils.js +0 -31
  483. package/configure/node_modules/@pie-lib/editable-html/src/serialization.jsx +0 -621
  484. package/configure/node_modules/@pie-lib/editable-html/src/theme.js +0 -1
  485. package/configure/node_modules/@pie-lib/icons/CHANGELOG.json +0 -1
  486. package/configure/node_modules/@pie-lib/icons/CHANGELOG.md +0 -539
  487. package/configure/node_modules/@pie-lib/icons/NEXT.CHANGELOG.json +0 -1
  488. package/configure/node_modules/@pie-lib/icons/esm/index.js +0 -1153
  489. package/configure/node_modules/@pie-lib/icons/esm/index.js.map +0 -1
  490. package/configure/node_modules/@pie-lib/icons/lib/correct-icon.js +0 -89
  491. package/configure/node_modules/@pie-lib/icons/lib/correct-icon.js.map +0 -1
  492. package/configure/node_modules/@pie-lib/icons/lib/correct-response-icon.js +0 -153
  493. package/configure/node_modules/@pie-lib/icons/lib/correct-response-icon.js.map +0 -1
  494. package/configure/node_modules/@pie-lib/icons/lib/icon-base.js +0 -206
  495. package/configure/node_modules/@pie-lib/icons/lib/icon-base.js.map +0 -1
  496. package/configure/node_modules/@pie-lib/icons/lib/icon-root.js +0 -130
  497. package/configure/node_modules/@pie-lib/icons/lib/icon-root.js.map +0 -1
  498. package/configure/node_modules/@pie-lib/icons/lib/incorrect-icon.js +0 -92
  499. package/configure/node_modules/@pie-lib/icons/lib/incorrect-icon.js.map +0 -1
  500. package/configure/node_modules/@pie-lib/icons/lib/index.js +0 -72
  501. package/configure/node_modules/@pie-lib/icons/lib/index.js.map +0 -1
  502. package/configure/node_modules/@pie-lib/icons/lib/instructions-icon.js +0 -229
  503. package/configure/node_modules/@pie-lib/icons/lib/instructions-icon.js.map +0 -1
  504. package/configure/node_modules/@pie-lib/icons/lib/learn-more-icon.js +0 -145
  505. package/configure/node_modules/@pie-lib/icons/lib/learn-more-icon.js.map +0 -1
  506. package/configure/node_modules/@pie-lib/icons/lib/nothing-submitted-icon.js +0 -183
  507. package/configure/node_modules/@pie-lib/icons/lib/nothing-submitted-icon.js.map +0 -1
  508. package/configure/node_modules/@pie-lib/icons/lib/partially-correct-icon.js +0 -82
  509. package/configure/node_modules/@pie-lib/icons/lib/partially-correct-icon.js.map +0 -1
  510. package/configure/node_modules/@pie-lib/icons/lib/show-rationale-icon.js +0 -206
  511. package/configure/node_modules/@pie-lib/icons/lib/show-rationale-icon.js.map +0 -1
  512. package/configure/node_modules/@pie-lib/icons/lib/sized.js +0 -41
  513. package/configure/node_modules/@pie-lib/icons/lib/sized.js.map +0 -1
  514. package/configure/node_modules/@pie-lib/icons/package.json +0 -35
  515. package/configure/node_modules/@pie-lib/icons/src/__tests__/index.test.js +0 -3
  516. package/configure/node_modules/@pie-lib/icons/src/correct-icon.jsx +0 -64
  517. package/configure/node_modules/@pie-lib/icons/src/correct-response-icon.jsx +0 -121
  518. package/configure/node_modules/@pie-lib/icons/src/icon-base.jsx +0 -158
  519. package/configure/node_modules/@pie-lib/icons/src/icon-root.jsx +0 -76
  520. package/configure/node_modules/@pie-lib/icons/src/incorrect-icon.jsx +0 -61
  521. package/configure/node_modules/@pie-lib/icons/src/index.js +0 -19
  522. package/configure/node_modules/@pie-lib/icons/src/instructions-icon.jsx +0 -189
  523. package/configure/node_modules/@pie-lib/icons/src/learn-more-icon.jsx +0 -107
  524. package/configure/node_modules/@pie-lib/icons/src/nothing-submitted-icon.jsx +0 -130
  525. package/configure/node_modules/@pie-lib/icons/src/partially-correct-icon.jsx +0 -49
  526. package/configure/node_modules/@pie-lib/icons/src/show-rationale-icon.jsx +0 -152
  527. package/configure/node_modules/@pie-lib/icons/src/sized.jsx +0 -25
  528. package/configure/node_modules/@pie-lib/math-input/CHANGELOG.json +0 -17
  529. package/configure/node_modules/@pie-lib/math-input/CHANGELOG.md +0 -1077
  530. package/configure/node_modules/@pie-lib/math-input/NEXT.CHANGELOG.json +0 -1
  531. package/configure/node_modules/@pie-lib/math-input/esm/index.js +0 -2134
  532. package/configure/node_modules/@pie-lib/math-input/esm/index.js.map +0 -1
  533. package/configure/node_modules/@pie-lib/math-input/lib/horizontal-keypad.js +0 -124
  534. package/configure/node_modules/@pie-lib/math-input/lib/horizontal-keypad.js.map +0 -1
  535. package/configure/node_modules/@pie-lib/math-input/lib/index.js +0 -76
  536. package/configure/node_modules/@pie-lib/math-input/lib/index.js.map +0 -1
  537. package/configure/node_modules/@pie-lib/math-input/lib/keypad/index.js +0 -512
  538. package/configure/node_modules/@pie-lib/math-input/lib/keypad/index.js.map +0 -1
  539. package/configure/node_modules/@pie-lib/math-input/lib/keypad/keys-layout.js +0 -34
  540. package/configure/node_modules/@pie-lib/math-input/lib/keypad/keys-layout.js.map +0 -1
  541. package/configure/node_modules/@pie-lib/math-input/lib/keys/basic-operators.js +0 -41
  542. package/configure/node_modules/@pie-lib/math-input/lib/keys/basic-operators.js.map +0 -1
  543. package/configure/node_modules/@pie-lib/math-input/lib/keys/chars.js +0 -17
  544. package/configure/node_modules/@pie-lib/math-input/lib/keys/chars.js.map +0 -1
  545. package/configure/node_modules/@pie-lib/math-input/lib/keys/comparison.js +0 -49
  546. package/configure/node_modules/@pie-lib/math-input/lib/keys/comparison.js.map +0 -1
  547. package/configure/node_modules/@pie-lib/math-input/lib/keys/constants.js +0 -43
  548. package/configure/node_modules/@pie-lib/math-input/lib/keys/constants.js.map +0 -1
  549. package/configure/node_modules/@pie-lib/math-input/lib/keys/digits.js +0 -53
  550. package/configure/node_modules/@pie-lib/math-input/lib/keys/digits.js.map +0 -1
  551. package/configure/node_modules/@pie-lib/math-input/lib/keys/edit.js +0 -17
  552. package/configure/node_modules/@pie-lib/math-input/lib/keys/edit.js.map +0 -1
  553. package/configure/node_modules/@pie-lib/math-input/lib/keys/exponent.js +0 -36
  554. package/configure/node_modules/@pie-lib/math-input/lib/keys/exponent.js.map +0 -1
  555. package/configure/node_modules/@pie-lib/math-input/lib/keys/fractions.js +0 -34
  556. package/configure/node_modules/@pie-lib/math-input/lib/keys/fractions.js.map +0 -1
  557. package/configure/node_modules/@pie-lib/math-input/lib/keys/geometry.js +0 -169
  558. package/configure/node_modules/@pie-lib/math-input/lib/keys/geometry.js.map +0 -1
  559. package/configure/node_modules/@pie-lib/math-input/lib/keys/grades.js +0 -295
  560. package/configure/node_modules/@pie-lib/math-input/lib/keys/grades.js.map +0 -1
  561. package/configure/node_modules/@pie-lib/math-input/lib/keys/index.js +0 -54
  562. package/configure/node_modules/@pie-lib/math-input/lib/keys/index.js.map +0 -1
  563. package/configure/node_modules/@pie-lib/math-input/lib/keys/log.js +0 -32
  564. package/configure/node_modules/@pie-lib/math-input/lib/keys/log.js.map +0 -1
  565. package/configure/node_modules/@pie-lib/math-input/lib/keys/logic.js +0 -23
  566. package/configure/node_modules/@pie-lib/math-input/lib/keys/logic.js.map +0 -1
  567. package/configure/node_modules/@pie-lib/math-input/lib/keys/matrices.js +0 -23
  568. package/configure/node_modules/@pie-lib/math-input/lib/keys/matrices.js.map +0 -1
  569. package/configure/node_modules/@pie-lib/math-input/lib/keys/misc.js +0 -74
  570. package/configure/node_modules/@pie-lib/math-input/lib/keys/misc.js.map +0 -1
  571. package/configure/node_modules/@pie-lib/math-input/lib/keys/navigation.js +0 -25
  572. package/configure/node_modules/@pie-lib/math-input/lib/keys/navigation.js.map +0 -1
  573. package/configure/node_modules/@pie-lib/math-input/lib/keys/operators.js +0 -18
  574. package/configure/node_modules/@pie-lib/math-input/lib/keys/operators.js.map +0 -1
  575. package/configure/node_modules/@pie-lib/math-input/lib/keys/statistics.js +0 -47
  576. package/configure/node_modules/@pie-lib/math-input/lib/keys/statistics.js.map +0 -1
  577. package/configure/node_modules/@pie-lib/math-input/lib/keys/sub-sup.js +0 -23
  578. package/configure/node_modules/@pie-lib/math-input/lib/keys/sub-sup.js.map +0 -1
  579. package/configure/node_modules/@pie-lib/math-input/lib/keys/trigonometry.js +0 -53
  580. package/configure/node_modules/@pie-lib/math-input/lib/keys/trigonometry.js.map +0 -1
  581. package/configure/node_modules/@pie-lib/math-input/lib/keys/utils.js +0 -120
  582. package/configure/node_modules/@pie-lib/math-input/lib/keys/utils.js.map +0 -1
  583. package/configure/node_modules/@pie-lib/math-input/lib/keys/vars.js +0 -29
  584. package/configure/node_modules/@pie-lib/math-input/lib/keys/vars.js.map +0 -1
  585. package/configure/node_modules/@pie-lib/math-input/lib/math-input.js +0 -192
  586. package/configure/node_modules/@pie-lib/math-input/lib/math-input.js.map +0 -1
  587. package/configure/node_modules/@pie-lib/math-input/lib/mq/common-mq-styles.js +0 -110
  588. package/configure/node_modules/@pie-lib/math-input/lib/mq/common-mq-styles.js.map +0 -1
  589. package/configure/node_modules/@pie-lib/math-input/lib/mq/custom-elements.js +0 -23
  590. package/configure/node_modules/@pie-lib/math-input/lib/mq/custom-elements.js.map +0 -1
  591. package/configure/node_modules/@pie-lib/math-input/lib/mq/index.js +0 -32
  592. package/configure/node_modules/@pie-lib/math-input/lib/mq/index.js.map +0 -1
  593. package/configure/node_modules/@pie-lib/math-input/lib/mq/input.js +0 -247
  594. package/configure/node_modules/@pie-lib/math-input/lib/mq/input.js.map +0 -1
  595. package/configure/node_modules/@pie-lib/math-input/lib/mq/static.js +0 -356
  596. package/configure/node_modules/@pie-lib/math-input/lib/mq/static.js.map +0 -1
  597. package/configure/node_modules/@pie-lib/math-input/lib/shared/constants.js +0 -16
  598. package/configure/node_modules/@pie-lib/math-input/lib/updateSpans.js +0 -23
  599. package/configure/node_modules/@pie-lib/math-input/lib/updateSpans.js.map +0 -1
  600. package/configure/node_modules/@pie-lib/math-input/node_modules/debug/LICENSE +0 -20
  601. package/configure/node_modules/@pie-lib/math-input/node_modules/debug/README.md +0 -481
  602. package/configure/node_modules/@pie-lib/math-input/node_modules/debug/package.json +0 -59
  603. package/configure/node_modules/@pie-lib/math-input/node_modules/debug/src/browser.js +0 -269
  604. package/configure/node_modules/@pie-lib/math-input/node_modules/debug/src/common.js +0 -274
  605. package/configure/node_modules/@pie-lib/math-input/node_modules/debug/src/index.js +0 -10
  606. package/configure/node_modules/@pie-lib/math-input/node_modules/debug/src/node.js +0 -263
  607. package/configure/node_modules/@pie-lib/math-input/node_modules/ms/index.js +0 -162
  608. package/configure/node_modules/@pie-lib/math-input/node_modules/ms/license.md +0 -21
  609. package/configure/node_modules/@pie-lib/math-input/node_modules/ms/package.json +0 -37
  610. package/configure/node_modules/@pie-lib/math-input/node_modules/ms/readme.md +0 -60
  611. package/configure/node_modules/@pie-lib/math-input/package.json +0 -35
  612. package/configure/node_modules/@pie-lib/math-input/src/__tests__/__snapshots__/math-input-test.jsx.snap +0 -152
  613. package/configure/node_modules/@pie-lib/math-input/src/__tests__/math-input-test.jsx +0 -85
  614. package/configure/node_modules/@pie-lib/math-input/src/horizontal-keypad.jsx +0 -69
  615. package/configure/node_modules/@pie-lib/math-input/src/index.jsx +0 -18
  616. package/configure/node_modules/@pie-lib/math-input/src/keypad/__tests__/__snapshots__/index.test.jsx.snap +0 -193
  617. package/configure/node_modules/@pie-lib/math-input/src/keypad/__tests__/index.test.jsx +0 -24
  618. package/configure/node_modules/@pie-lib/math-input/src/keypad/__tests__/keys-layout.test.js +0 -15
  619. package/configure/node_modules/@pie-lib/math-input/src/keypad/index.jsx +0 -450
  620. package/configure/node_modules/@pie-lib/math-input/src/keypad/keys-layout.js +0 -17
  621. package/configure/node_modules/@pie-lib/math-input/src/keys/__tests__/utils.test.js +0 -57
  622. package/configure/node_modules/@pie-lib/math-input/src/keys/basic-operators.js +0 -32
  623. package/configure/node_modules/@pie-lib/math-input/src/keys/chars.js +0 -5
  624. package/configure/node_modules/@pie-lib/math-input/src/keys/comparison.js +0 -28
  625. package/configure/node_modules/@pie-lib/math-input/src/keys/constants.js +0 -35
  626. package/configure/node_modules/@pie-lib/math-input/src/keys/digits.js +0 -40
  627. package/configure/node_modules/@pie-lib/math-input/src/keys/edit.js +0 -3
  628. package/configure/node_modules/@pie-lib/math-input/src/keys/exponent.js +0 -28
  629. package/configure/node_modules/@pie-lib/math-input/src/keys/fractions.js +0 -26
  630. package/configure/node_modules/@pie-lib/math-input/src/keys/geometry.js +0 -144
  631. package/configure/node_modules/@pie-lib/math-input/src/keys/grades.js +0 -367
  632. package/configure/node_modules/@pie-lib/math-input/src/keys/index.js +0 -21
  633. package/configure/node_modules/@pie-lib/math-input/src/keys/log.js +0 -22
  634. package/configure/node_modules/@pie-lib/math-input/src/keys/logic.js +0 -15
  635. package/configure/node_modules/@pie-lib/math-input/src/keys/matrices.js +0 -15
  636. package/configure/node_modules/@pie-lib/math-input/src/keys/misc.js +0 -65
  637. package/configure/node_modules/@pie-lib/math-input/src/keys/navigation.js +0 -8
  638. package/configure/node_modules/@pie-lib/math-input/src/keys/operators.js +0 -10
  639. package/configure/node_modules/@pie-lib/math-input/src/keys/statistics.js +0 -38
  640. package/configure/node_modules/@pie-lib/math-input/src/keys/sub-sup.js +0 -15
  641. package/configure/node_modules/@pie-lib/math-input/src/keys/trigonometry.js +0 -15
  642. package/configure/node_modules/@pie-lib/math-input/src/keys/utils.js +0 -71
  643. package/configure/node_modules/@pie-lib/math-input/src/keys/vars.js +0 -19
  644. package/configure/node_modules/@pie-lib/math-input/src/math-input.jsx +0 -128
  645. package/configure/node_modules/@pie-lib/math-input/src/mq/__tests__/__snapshots__/input.test.jsx.snap +0 -9
  646. package/configure/node_modules/@pie-lib/math-input/src/mq/__tests__/input.test.jsx +0 -92
  647. package/configure/node_modules/@pie-lib/math-input/src/mq/__tests__/static.test.jsx +0 -57
  648. package/configure/node_modules/@pie-lib/math-input/src/mq/common-mq-styles.js +0 -105
  649. package/configure/node_modules/@pie-lib/math-input/src/mq/custom-elements.js +0 -11
  650. package/configure/node_modules/@pie-lib/math-input/src/mq/index.js +0 -5
  651. package/configure/node_modules/@pie-lib/math-input/src/mq/input.jsx +0 -176
  652. package/configure/node_modules/@pie-lib/math-input/src/mq/static.jsx +0 -285
  653. package/configure/node_modules/@pie-lib/math-input/src/updateSpans.js +0 -15
  654. package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.json +0 -1
  655. package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.md +0 -775
  656. package/configure/node_modules/@pie-lib/math-rendering/NEXT.CHANGELOG.json +0 -1
  657. package/configure/node_modules/@pie-lib/math-rendering/esm/index.js +0 -690
  658. package/configure/node_modules/@pie-lib/math-rendering/esm/index.js.map +0 -1
  659. package/configure/node_modules/@pie-lib/math-rendering/lib/index.js +0 -38
  660. package/configure/node_modules/@pie-lib/math-rendering/lib/index.js.map +0 -1
  661. package/configure/node_modules/@pie-lib/math-rendering/lib/mml-to-latex.js +0 -15
  662. package/configure/node_modules/@pie-lib/math-rendering/lib/mml-to-latex.js.map +0 -1
  663. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +0 -296
  664. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +0 -1
  665. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +0 -23
  666. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +0 -1
  667. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +0 -109
  668. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +0 -1
  669. package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js +0 -95
  670. package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +0 -1
  671. package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js +0 -438
  672. package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +0 -1
  673. package/configure/node_modules/@pie-lib/math-rendering/node_modules/debug/LICENSE +0 -20
  674. package/configure/node_modules/@pie-lib/math-rendering/node_modules/debug/README.md +0 -481
  675. package/configure/node_modules/@pie-lib/math-rendering/node_modules/debug/package.json +0 -59
  676. package/configure/node_modules/@pie-lib/math-rendering/node_modules/debug/src/browser.js +0 -269
  677. package/configure/node_modules/@pie-lib/math-rendering/node_modules/debug/src/common.js +0 -274
  678. package/configure/node_modules/@pie-lib/math-rendering/node_modules/debug/src/index.js +0 -10
  679. package/configure/node_modules/@pie-lib/math-rendering/node_modules/debug/src/node.js +0 -263
  680. package/configure/node_modules/@pie-lib/math-rendering/node_modules/ms/index.js +0 -162
  681. package/configure/node_modules/@pie-lib/math-rendering/node_modules/ms/license.md +0 -21
  682. package/configure/node_modules/@pie-lib/math-rendering/node_modules/ms/package.json +0 -37
  683. package/configure/node_modules/@pie-lib/math-rendering/node_modules/ms/readme.md +0 -60
  684. package/configure/node_modules/@pie-lib/math-rendering/package.json +0 -28
  685. package/configure/node_modules/@pie-lib/math-rendering/src/__tests__/mml-to-latex.test.js +0 -14
  686. package/configure/node_modules/@pie-lib/math-rendering/src/__tests__/normalization.test.js +0 -50
  687. package/configure/node_modules/@pie-lib/math-rendering/src/__tests__/render-math.test.js +0 -155
  688. package/configure/node_modules/@pie-lib/math-rendering/src/index.js +0 -5
  689. package/configure/node_modules/@pie-lib/math-rendering/src/mml-to-latex.js +0 -2
  690. package/configure/node_modules/@pie-lib/math-rendering/src/mstack/__tests__/__snapshots__/chtml.test.js.snap +0 -9
  691. package/configure/node_modules/@pie-lib/math-rendering/src/mstack/__tests__/chtml.test.js +0 -104
  692. package/configure/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +0 -220
  693. package/configure/node_modules/@pie-lib/math-rendering/src/mstack/index.js +0 -13
  694. package/configure/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +0 -24
  695. package/configure/node_modules/@pie-lib/math-rendering/src/normalization.js +0 -69
  696. package/configure/node_modules/@pie-lib/math-rendering/src/render-math.js +0 -387
  697. package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.json +0 -17
  698. package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.md +0 -940
  699. package/configure/node_modules/@pie-lib/math-toolbar/NEXT.CHANGELOG.json +0 -1
  700. package/configure/node_modules/@pie-lib/math-toolbar/esm/index.js +0 -1410
  701. package/configure/node_modules/@pie-lib/math-toolbar/esm/index.js.map +0 -1
  702. package/configure/node_modules/@pie-lib/math-toolbar/lib/done-button.js +0 -68
  703. package/configure/node_modules/@pie-lib/math-toolbar/lib/done-button.js.map +0 -1
  704. package/configure/node_modules/@pie-lib/math-toolbar/lib/editor-and-pad.js +0 -575
  705. package/configure/node_modules/@pie-lib/math-toolbar/lib/editor-and-pad.js.map +0 -1
  706. package/configure/node_modules/@pie-lib/math-toolbar/lib/index.js +0 -287
  707. package/configure/node_modules/@pie-lib/math-toolbar/lib/index.js.map +0 -1
  708. package/configure/node_modules/@pie-lib/math-toolbar/lib/math-preview.js +0 -240
  709. package/configure/node_modules/@pie-lib/math-toolbar/lib/math-preview.js.map +0 -1
  710. package/configure/node_modules/@pie-lib/math-toolbar/lib/utils.js +0 -21
  711. package/configure/node_modules/@pie-lib/math-toolbar/lib/utils.js.map +0 -1
  712. package/configure/node_modules/@pie-lib/math-toolbar/node_modules/debug/LICENSE +0 -20
  713. package/configure/node_modules/@pie-lib/math-toolbar/node_modules/debug/README.md +0 -481
  714. package/configure/node_modules/@pie-lib/math-toolbar/node_modules/debug/package.json +0 -59
  715. package/configure/node_modules/@pie-lib/math-toolbar/node_modules/debug/src/browser.js +0 -269
  716. package/configure/node_modules/@pie-lib/math-toolbar/node_modules/debug/src/common.js +0 -274
  717. package/configure/node_modules/@pie-lib/math-toolbar/node_modules/debug/src/index.js +0 -10
  718. package/configure/node_modules/@pie-lib/math-toolbar/node_modules/debug/src/node.js +0 -263
  719. package/configure/node_modules/@pie-lib/math-toolbar/node_modules/ms/index.js +0 -162
  720. package/configure/node_modules/@pie-lib/math-toolbar/node_modules/ms/license.md +0 -21
  721. package/configure/node_modules/@pie-lib/math-toolbar/node_modules/ms/package.json +0 -37
  722. package/configure/node_modules/@pie-lib/math-toolbar/node_modules/ms/readme.md +0 -60
  723. package/configure/node_modules/@pie-lib/math-toolbar/package.json +0 -46
  724. package/configure/node_modules/@pie-lib/math-toolbar/src/__tests__/__snapshots__/editor-and-pad.test.js.snap +0 -31
  725. package/configure/node_modules/@pie-lib/math-toolbar/src/__tests__/__snapshots__/index.test.js.snap +0 -30
  726. package/configure/node_modules/@pie-lib/math-toolbar/src/__tests__/__snapshots__/math-preview.test.js.snap +0 -23
  727. package/configure/node_modules/@pie-lib/math-toolbar/src/__tests__/editor-and-pad.test.js +0 -25
  728. package/configure/node_modules/@pie-lib/math-toolbar/src/__tests__/index.test.js +0 -28
  729. package/configure/node_modules/@pie-lib/math-toolbar/src/__tests__/math-preview.test.js +0 -31
  730. package/configure/node_modules/@pie-lib/math-toolbar/src/done-button.jsx +0 -47
  731. package/configure/node_modules/@pie-lib/math-toolbar/src/editor-and-pad.jsx +0 -499
  732. package/configure/node_modules/@pie-lib/math-toolbar/src/index.jsx +0 -224
  733. package/configure/node_modules/@pie-lib/math-toolbar/src/math-preview.jsx +0 -179
  734. package/configure/node_modules/@pie-lib/math-toolbar/src/utils.js +0 -11
  735. package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.json +0 -1
  736. package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.md +0 -1026
  737. package/configure/node_modules/@pie-lib/render-ui/NEXT.CHANGELOG.json +0 -1
  738. package/configure/node_modules/@pie-lib/render-ui/esm/index.js +0 -1616
  739. package/configure/node_modules/@pie-lib/render-ui/esm/index.js.map +0 -1
  740. package/configure/node_modules/@pie-lib/render-ui/lib/append-css-rules.js +0 -88
  741. package/configure/node_modules/@pie-lib/render-ui/lib/append-css-rules.js.map +0 -1
  742. package/configure/node_modules/@pie-lib/render-ui/lib/assets/enableAudioAutoplayImage.js +0 -9
  743. package/configure/node_modules/@pie-lib/render-ui/lib/assets/enableAudioAutoplayImage.js.map +0 -1
  744. package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +0 -135
  745. package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +0 -1
  746. package/configure/node_modules/@pie-lib/render-ui/lib/color.js +0 -344
  747. package/configure/node_modules/@pie-lib/render-ui/lib/color.js.map +0 -1
  748. package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js +0 -150
  749. package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js.map +0 -1
  750. package/configure/node_modules/@pie-lib/render-ui/lib/has-media.js +0 -27
  751. package/configure/node_modules/@pie-lib/render-ui/lib/has-media.js.map +0 -1
  752. package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js +0 -28
  753. package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js.map +0 -1
  754. package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js +0 -74
  755. package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +0 -1
  756. package/configure/node_modules/@pie-lib/render-ui/lib/index.js +0 -136
  757. package/configure/node_modules/@pie-lib/render-ui/lib/index.js.map +0 -1
  758. package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js +0 -60
  759. package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js.map +0 -1
  760. package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js +0 -145
  761. package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +0 -1
  762. package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +0 -321
  763. package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +0 -1
  764. package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js +0 -28
  765. package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js.map +0 -1
  766. package/configure/node_modules/@pie-lib/render-ui/lib/readable.js +0 -28
  767. package/configure/node_modules/@pie-lib/render-ui/lib/readable.js.map +0 -1
  768. package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js +0 -151
  769. package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +0 -1
  770. package/configure/node_modules/@pie-lib/render-ui/lib/ui-layout.js +0 -122
  771. package/configure/node_modules/@pie-lib/render-ui/lib/ui-layout.js.map +0 -1
  772. package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +0 -181
  773. package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +0 -1
  774. package/configure/node_modules/@pie-lib/render-ui/node_modules/debug/LICENSE +0 -20
  775. package/configure/node_modules/@pie-lib/render-ui/node_modules/debug/README.md +0 -481
  776. package/configure/node_modules/@pie-lib/render-ui/node_modules/debug/package.json +0 -59
  777. package/configure/node_modules/@pie-lib/render-ui/node_modules/debug/src/browser.js +0 -269
  778. package/configure/node_modules/@pie-lib/render-ui/node_modules/debug/src/common.js +0 -274
  779. package/configure/node_modules/@pie-lib/render-ui/node_modules/debug/src/index.js +0 -10
  780. package/configure/node_modules/@pie-lib/render-ui/node_modules/debug/src/node.js +0 -263
  781. package/configure/node_modules/@pie-lib/render-ui/node_modules/ms/index.js +0 -162
  782. package/configure/node_modules/@pie-lib/render-ui/node_modules/ms/license.md +0 -21
  783. package/configure/node_modules/@pie-lib/render-ui/node_modules/ms/package.json +0 -37
  784. package/configure/node_modules/@pie-lib/render-ui/node_modules/ms/readme.md +0 -60
  785. package/configure/node_modules/@pie-lib/render-ui/package.json +0 -40
  786. package/configure/node_modules/@pie-lib/render-ui/src/__tests__/__snapshots__/html-and-math.test.js.snap +0 -11
  787. package/configure/node_modules/@pie-lib/render-ui/src/__tests__/__snapshots__/preview-prompt.test.jsx.snap +0 -37
  788. package/configure/node_modules/@pie-lib/render-ui/src/__tests__/__snapshots__/purpose.test.jsx.snap +0 -42
  789. package/configure/node_modules/@pie-lib/render-ui/src/__tests__/__snapshots__/readable.test.jsx.snap +0 -64
  790. package/configure/node_modules/@pie-lib/render-ui/src/__tests__/__snapshots__/response-indicators.test.jsx.snap +0 -27
  791. package/configure/node_modules/@pie-lib/render-ui/src/__tests__/color.test.js +0 -12
  792. package/configure/node_modules/@pie-lib/render-ui/src/__tests__/has-media.test.js +0 -20
  793. package/configure/node_modules/@pie-lib/render-ui/src/__tests__/has-text.test.js +0 -21
  794. package/configure/node_modules/@pie-lib/render-ui/src/__tests__/html-and-math.test.js +0 -24
  795. package/configure/node_modules/@pie-lib/render-ui/src/__tests__/preview-prompt.test.jsx +0 -56
  796. package/configure/node_modules/@pie-lib/render-ui/src/__tests__/purpose.test.jsx +0 -47
  797. package/configure/node_modules/@pie-lib/render-ui/src/__tests__/readable.test.jsx +0 -64
  798. package/configure/node_modules/@pie-lib/render-ui/src/__tests__/response-indicators.test.jsx +0 -16
  799. package/configure/node_modules/@pie-lib/render-ui/src/__tests__/ui-layout.test.jsx +0 -34
  800. package/configure/node_modules/@pie-lib/render-ui/src/__tests__/withUndoReset.test.jsx +0 -254
  801. package/configure/node_modules/@pie-lib/render-ui/src/append-css-rules.js +0 -51
  802. package/configure/node_modules/@pie-lib/render-ui/src/assets/enableAudioAutoplayImage.js +0 -1
  803. package/configure/node_modules/@pie-lib/render-ui/src/collapsible/__tests__/__snapshots__/index.test.jsx.snap +0 -18
  804. package/configure/node_modules/@pie-lib/render-ui/src/collapsible/__tests__/index.test.jsx +0 -13
  805. package/configure/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +0 -64
  806. package/configure/node_modules/@pie-lib/render-ui/src/color.js +0 -121
  807. package/configure/node_modules/@pie-lib/render-ui/src/feedback.jsx +0 -99
  808. package/configure/node_modules/@pie-lib/render-ui/src/has-media.js +0 -16
  809. package/configure/node_modules/@pie-lib/render-ui/src/has-text.js +0 -18
  810. package/configure/node_modules/@pie-lib/render-ui/src/html-and-math.js +0 -21
  811. package/configure/node_modules/@pie-lib/render-ui/src/index.js +0 -35
  812. package/configure/node_modules/@pie-lib/render-ui/src/input-container.jsx +0 -41
  813. package/configure/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +0 -95
  814. package/configure/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +0 -254
  815. package/configure/node_modules/@pie-lib/render-ui/src/purpose.jsx +0 -17
  816. package/configure/node_modules/@pie-lib/render-ui/src/readable.jsx +0 -19
  817. package/configure/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +0 -89
  818. package/configure/node_modules/@pie-lib/render-ui/src/ui-layout.jsx +0 -66
  819. package/configure/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +0 -116
  820. package/configure/node_modules/@pie-lib/test-utils/CHANGELOG.json +0 -1
  821. package/configure/node_modules/@pie-lib/test-utils/CHANGELOG.md +0 -410
  822. package/configure/node_modules/@pie-lib/test-utils/NEXT.CHANGELOG.json +0 -1
  823. package/configure/node_modules/@pie-lib/test-utils/esm/index.js +0 -39
  824. package/configure/node_modules/@pie-lib/test-utils/esm/index.js.map +0 -1
  825. package/configure/node_modules/@pie-lib/test-utils/lib/index.js +0 -40
  826. package/configure/node_modules/@pie-lib/test-utils/lib/index.js.map +0 -1
  827. package/configure/node_modules/@pie-lib/test-utils/package.json +0 -25
  828. package/configure/node_modules/@pie-lib/test-utils/src/__tests__/index.test.js +0 -45
  829. package/configure/node_modules/@pie-lib/test-utils/src/index.js +0 -18
  830. package/configure/node_modules/debug/CHANGELOG.md +0 -395
  831. package/configure/node_modules/debug/LICENSE +0 -19
  832. package/configure/node_modules/debug/README.md +0 -437
  833. package/configure/node_modules/debug/node.js +0 -1
  834. package/configure/node_modules/debug/package.json +0 -51
  835. package/configure/node_modules/debug/src/browser.js +0 -180
  836. package/configure/node_modules/debug/src/common.js +0 -249
  837. package/configure/node_modules/debug/src/index.js +0 -12
  838. package/configure/node_modules/debug/src/node.js +0 -177
  839. package/configure/node_modules/slate-dev-environment/Readme.md +0 -1
  840. package/configure/node_modules/slate-dev-environment/dist/slate-dev-environment.js +0 -287
  841. package/configure/node_modules/slate-dev-environment/dist/slate-dev-environment.min.js +0 -1
  842. package/configure/node_modules/slate-dev-environment/lib/slate-dev-environment.es.js +0 -264
  843. package/configure/node_modules/slate-dev-environment/lib/slate-dev-environment.es.js.map +0 -1
  844. package/configure/node_modules/slate-dev-environment/lib/slate-dev-environment.js +0 -282
  845. package/configure/node_modules/slate-dev-environment/lib/slate-dev-environment.js.map +0 -1
  846. package/configure/node_modules/slate-dev-environment/package.json +0 -21
  847. package/configure/src/__tests__/DeleteWidget.test.js +0 -64
  848. package/configure/src/__tests__/__snapshots__/hotspot-container.test.js.snap +0 -192
  849. package/configure/src/__tests__/__snapshots__/hotspot-drawable.test.js.snap +0 -562
  850. package/configure/src/__tests__/__snapshots__/root.test.js.snap +0 -469
  851. package/controller/node_modules/@pie-lib/controller-utils/CHANGELOG.json +0 -1
  852. package/controller/node_modules/@pie-lib/controller-utils/CHANGELOG.md +0 -410
  853. package/controller/node_modules/@pie-lib/controller-utils/NEXT.CHANGELOG.json +0 -1
  854. package/controller/node_modules/@pie-lib/controller-utils/esm/index.js +0 -129
  855. package/controller/node_modules/@pie-lib/controller-utils/esm/index.js.map +0 -1
  856. package/controller/node_modules/@pie-lib/controller-utils/lib/index.js +0 -31
  857. package/controller/node_modules/@pie-lib/controller-utils/lib/index.js.map +0 -1
  858. package/controller/node_modules/@pie-lib/controller-utils/lib/partial-scoring.js +0 -29
  859. package/controller/node_modules/@pie-lib/controller-utils/lib/partial-scoring.js.map +0 -1
  860. package/controller/node_modules/@pie-lib/controller-utils/lib/persistence.js +0 -140
  861. package/controller/node_modules/@pie-lib/controller-utils/lib/persistence.js.map +0 -1
  862. package/controller/node_modules/@pie-lib/controller-utils/package.json +0 -25
  863. package/controller/node_modules/@pie-lib/controller-utils/src/__tests__/partial-scoring.test.js +0 -25
  864. package/controller/node_modules/@pie-lib/controller-utils/src/__tests__/persistence.test.js +0 -151
  865. package/controller/node_modules/@pie-lib/controller-utils/src/index.js +0 -4
  866. package/controller/node_modules/@pie-lib/controller-utils/src/partial-scoring.js +0 -19
  867. package/controller/node_modules/@pie-lib/controller-utils/src/persistence.js +0 -103
  868. package/esm/configure.js +0 -31136
  869. package/esm/configure.js.map +0 -1
  870. package/esm/controller.js +0 -344
  871. package/esm/controller.js.map +0 -1
  872. package/esm/element.js +0 -28985
  873. package/esm/element.js.map +0 -1
  874. package/src/__tests__/__snapshots__/container.test.jsx.snap +0 -264
  875. package/src/__tests__/__snapshots__/index.test.js.snap +0 -81
  876. package/src/__tests__/__snapshots__/polygon.test.jsx.snap +0 -192
  877. package/src/__tests__/__snapshots__/rectangle.test.jsx.snap +0 -127
  878. package/src/__tests__/polygon.test.jsx +0 -230
  879. package/src/__tests__/rectangle.test.jsx +0 -232
package/lib/index.js CHANGED
@@ -1,282 +1,213 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
- exports["default"] = void 0;
9
-
10
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
-
12
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
-
14
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
15
-
16
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
17
-
18
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
19
-
20
- var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
21
-
7
+ exports.default = void 0;
22
8
  var _react = _interopRequireDefault(require("react"));
23
-
24
- var _reactDom = _interopRequireDefault(require("react-dom"));
25
-
9
+ var _client = require("react-dom/client");
26
10
  var _mathRendering = require("@pie-lib/math-rendering");
27
-
28
11
  var _renderUi = require("@pie-lib/render-ui");
29
-
30
12
  var _piePlayerEvents = require("@pie-framework/pie-player-events");
31
-
32
13
  var _hotspot = _interopRequireDefault(require("./hotspot"));
33
-
34
14
  var _sessionUpdater = require("./session-updater");
35
-
36
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
37
-
38
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
39
-
40
- var Hotspot = /*#__PURE__*/function (_HTMLElement) {
41
- (0, _inherits2["default"])(Hotspot, _HTMLElement);
42
-
43
- var _super = _createSuper(Hotspot);
44
-
45
- function Hotspot() {
46
- var _this;
47
-
48
- (0, _classCallCheck2["default"])(this, Hotspot);
49
- _this = _super.call(this);
50
- _this._model = null;
51
- _this._session = null;
52
- _this._audioInitialized = false;
53
- _this.audioComplete = false;
54
- return _this;
15
+ class Hotspot extends HTMLElement {
16
+ constructor() {
17
+ super();
18
+ this._model = null;
19
+ this._session = null;
20
+ this._audioInitialized = false;
21
+ this.audioComplete = false;
22
+ this._root = null;
55
23
  }
56
-
57
- (0, _createClass2["default"])(Hotspot, [{
58
- key: "model",
59
- set: function set(m) {
60
- this._model = m;
61
- this.dispatchEvent(new _piePlayerEvents.ModelSetEvent(this.tagName.toLowerCase(), this.isComplete(), !!this._model));
62
- this._audioInitialized = false;
63
-
64
- this._render();
24
+ set model(m) {
25
+ this._model = m;
26
+ this.dispatchEvent(new _piePlayerEvents.ModelSetEvent(this.tagName.toLowerCase(), this.isComplete(), !!this._model));
27
+ this._audioInitialized = false;
28
+ this._render();
29
+ }
30
+ isComplete() {
31
+ if (!this._session || !this._session.answers) {
32
+ return false;
65
33
  }
66
- }, {
67
- key: "isComplete",
68
- value: function isComplete() {
69
- if (!this._session || !this._session.answers) {
70
- return false;
71
- }
72
-
73
- var _ref = this._model || {},
74
- autoplayAudioEnabled = _ref.autoplayAudioEnabled,
75
- completeAudioEnabled = _ref.completeAudioEnabled;
76
-
77
- var elementContext = this; // check audio completion if audio settings are enabled and audio actually exists
78
-
79
- if (autoplayAudioEnabled && completeAudioEnabled && !this.audioComplete) {
80
- if (elementContext) {
81
- var audio = elementContext.querySelector('audio');
82
- var isInsidePrompt = audio && audio.closest('#preview-prompt'); // only require audio completion if audio exists and is inside the prompt
83
-
84
- if (audio && isInsidePrompt) {
85
- return false;
86
- }
34
+ const {
35
+ autoplayAudioEnabled,
36
+ completeAudioEnabled
37
+ } = this._model || {};
38
+ const elementContext = this;
39
+
40
+ // check audio completion if audio settings are enabled and audio actually exists
41
+ if (autoplayAudioEnabled && completeAudioEnabled && !this.audioComplete) {
42
+ if (elementContext) {
43
+ const audio = elementContext.querySelector('audio');
44
+ const isInsidePrompt = audio && audio.closest('#preview-prompt');
45
+
46
+ // only require audio completion if audio exists and is inside the prompt
47
+ if (audio && isInsidePrompt) {
48
+ return false;
87
49
  }
88
50
  }
89
-
90
- if (!Array.isArray(this._session.answers)) {
91
- return false;
92
- }
93
-
94
- return this._session.answers.length > 0;
95
- }
96
- }, {
97
- key: "session",
98
- get: function get() {
99
- return this._session;
100
- },
101
- set: function set(s) {
102
- if (s && !s.answers) {
103
- s.answers = [];
104
- }
105
-
106
- this._session = s;
107
-
108
- this._render();
109
51
  }
110
- }, {
111
- key: "onSelectChoice",
112
- value: function onSelectChoice(data) {
113
- (0, _sessionUpdater.updateSessionValue)(this._session, this._model, data);
114
- this.dispatchEvent(new _piePlayerEvents.SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete()));
115
-
116
- this._render();
52
+ if (!Array.isArray(this._session.answers)) {
53
+ return false;
117
54
  }
118
- }, {
119
- key: "_createAudioInfoToast",
120
- value: function _createAudioInfoToast() {
121
- var info = document.createElement('div');
122
- info.id = 'play-audio-info';
123
- Object.assign(info.style, {
124
- position: 'absolute',
125
- top: 0,
126
- width: '100%',
127
- height: '100%',
128
- display: 'flex',
129
- justifyContent: 'center',
130
- alignItems: 'center',
131
- background: 'white',
132
- zIndex: '1000',
133
- cursor: 'pointer'
134
- });
135
- var img = document.createElement('img');
136
- img.src = _renderUi.EnableAudioAutoplayImage;
137
- img.alt = 'Click anywhere to enable audio autoplay';
138
- img.width = 500;
139
- img.height = 300;
140
- info.appendChild(img);
141
- return info;
55
+ return this._session.answers.length > 0;
56
+ }
57
+ set session(s) {
58
+ if (s && !s.answers) {
59
+ s.answers = [];
142
60
  }
143
- }, {
144
- key: "connectedCallback",
145
- value: function connectedCallback() {
146
- var _this2 = this;
147
-
148
- this._render(); // Observation: audio in Chrome will have the autoplay attribute,
149
- // while other browsers will not have the autoplay attribute and will need a user interaction to play the audio
150
- // This workaround fixes the issue of audio being cached and played on any user interaction in Safari and Firefox
151
-
152
-
153
- var observer = new MutationObserver(function (mutationsList, observer) {
154
- mutationsList.forEach(function (mutation) {
155
- if (mutation.type === 'childList') {
156
- if (_this2._audioInitialized) return;
157
-
158
- var audio = _this2.querySelector('audio');
159
-
160
- var isInsidePrompt = audio && audio.closest('#preview-prompt');
161
- if (!_this2._model) return;
162
- if (!_this2._model.autoplayAudioEnabled) return;
163
- if (audio && !isInsidePrompt) return;
164
- if (!audio) return;
165
-
166
- var info = _this2._createAudioInfoToast();
167
-
168
- var container = _this2.querySelector('#main-container');
169
-
170
- var enableAudio = function enableAudio() {
171
- if (_this2.querySelector('#play-audio-info')) {
172
- audio.play();
173
- container.removeChild(info);
174
- }
175
-
61
+ this._session = s;
62
+ this._render();
63
+ }
64
+ get session() {
65
+ return this._session;
66
+ }
67
+ onSelectChoice(data) {
68
+ (0, _sessionUpdater.updateSessionValue)(this._session, this._model, data);
69
+ this.dispatchEvent(new _piePlayerEvents.SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete()));
70
+ this._render();
71
+ }
72
+ _createAudioInfoToast() {
73
+ const info = document.createElement('div');
74
+ info.id = 'play-audio-info';
75
+ Object.assign(info.style, {
76
+ position: 'absolute',
77
+ top: 0,
78
+ width: '100%',
79
+ height: '100%',
80
+ display: 'flex',
81
+ justifyContent: 'center',
82
+ alignItems: 'center',
83
+ background: 'white',
84
+ zIndex: '1000',
85
+ cursor: 'pointer'
86
+ });
87
+ const img = document.createElement('img');
88
+ img.src = _renderUi.EnableAudioAutoplayImage;
89
+ img.alt = 'Click anywhere to enable audio autoplay';
90
+ img.width = 500;
91
+ img.height = 300;
92
+ info.appendChild(img);
93
+ return info;
94
+ }
95
+ connectedCallback() {
96
+ this._render();
97
+
98
+ // Observation: audio in Chrome will have the autoplay attribute,
99
+ // while other browsers will not have the autoplay attribute and will need a user interaction to play the audio
100
+ // This workaround fixes the issue of audio being cached and played on any user interaction in Safari and Firefox
101
+ const observer = new MutationObserver((mutationsList, observer) => {
102
+ mutationsList.forEach(mutation => {
103
+ if (mutation.type === 'childList') {
104
+ if (this._audioInitialized) return;
105
+ const audio = this.querySelector('audio');
106
+ const isInsidePrompt = audio && audio.closest('#preview-prompt');
107
+ if (!this._model) return;
108
+ if (!this._model.autoplayAudioEnabled) return;
109
+ if (audio && !isInsidePrompt) return;
110
+ if (!audio) return;
111
+ const info = this._createAudioInfoToast();
112
+ const container = this.querySelector('#main-container');
113
+ const enableAudio = () => {
114
+ if (this.querySelector('#play-audio-info')) {
115
+ audio.play();
116
+ container.removeChild(info);
117
+ }
118
+ document.removeEventListener('click', enableAudio);
119
+ };
120
+
121
+ // if the audio is paused, it means the user has not interacted with the page yet and the audio will not play
122
+ // FIX FOR SAFARI: play with a slight delay to check if autoplay was blocked
123
+ setTimeout(() => {
124
+ if (audio.paused && !this.querySelector('#play-audio-info')) {
125
+ // add info message as a toast to enable audio playback
126
+ container.appendChild(info);
127
+ document.addEventListener('click', enableAudio);
128
+ } else {
176
129
  document.removeEventListener('click', enableAudio);
177
- }; // if the audio is paused, it means the user has not interacted with the page yet and the audio will not play
178
- // FIX FOR SAFARI: play with a slight delay to check if autoplay was blocked
179
-
180
-
181
- setTimeout(function () {
182
- if (audio.paused && !_this2.querySelector('#play-audio-info')) {
183
- // add info message as a toast to enable audio playback
184
- container.appendChild(info);
185
- document.addEventListener('click', enableAudio);
186
- } else {
187
- document.removeEventListener('click', enableAudio);
188
- }
189
- }, 500); // we need to listen for the playing event to remove the toast in case the audio plays because of re-rendering
190
-
191
- var handlePlaying = function handlePlaying() {
192
- //timestamp when auto-played audio started playing
193
- (0, _sessionUpdater.updateSessionMetadata)(_this2._session, {
194
- audioStartTime: new Date().getTime()
195
- });
196
-
197
- var info = _this2.querySelector('#play-audio-info');
198
-
199
- if (info) {
200
- container.removeChild(info);
201
- }
202
-
203
- audio.removeEventListener('playing', handlePlaying);
204
- };
205
-
206
- audio.addEventListener('playing', handlePlaying); // we need to listen for the ended event to update the isComplete state
207
-
208
- var handleEnded = function handleEnded() {
209
- //timestamp when auto-played audio completed playing
210
- (0, _sessionUpdater.updateSessionMetadata)(_this2._session, {
211
- audioEndTime: new Date().getTime()
212
- });
213
- var _this2$_session = _this2._session,
214
- audioStartTime = _this2$_session.audioStartTime,
215
- audioEndTime = _this2$_session.audioEndTime,
216
- waitTime = _this2$_session.waitTime;
217
-
218
- if (!waitTime && audioStartTime && audioEndTime) {
219
- // waitTime is elapsed time the user waited for auto-played audio to finish
220
- _this2._session.waitTime = audioEndTime - audioStartTime;
221
- }
222
-
223
- _this2.audioComplete = true;
224
-
225
- _this2.dispatchEvent(new _piePlayerEvents.SessionChangedEvent(_this2.tagName.toLowerCase(), _this2.isComplete()));
226
-
227
- audio.removeEventListener('ended', handleEnded);
228
- };
229
-
230
- audio.addEventListener('ended', handleEnded); // store references to remove later
231
-
232
- _this2._audio = audio;
233
- _this2._handlePlaying = handlePlaying;
234
- _this2._handleEnded = handleEnded;
235
- _this2._enableAudio = enableAudio; // set to true to prevent multiple initializations
236
-
237
- _this2._audioInitialized = true;
238
- observer.disconnect();
239
- }
240
- });
130
+ }
131
+ }, 500);
132
+
133
+ // we need to listen for the playing event to remove the toast in case the audio plays because of re-rendering
134
+ const handlePlaying = () => {
135
+ //timestamp when auto-played audio started playing
136
+ (0, _sessionUpdater.updateSessionMetadata)(this._session, {
137
+ audioStartTime: new Date().getTime()
138
+ });
139
+ const info = this.querySelector('#play-audio-info');
140
+ if (info) {
141
+ container.removeChild(info);
142
+ }
143
+ audio.removeEventListener('playing', handlePlaying);
144
+ };
145
+ audio.addEventListener('playing', handlePlaying);
146
+
147
+ // we need to listen for the ended event to update the isComplete state
148
+ const handleEnded = () => {
149
+ //timestamp when auto-played audio completed playing
150
+ (0, _sessionUpdater.updateSessionMetadata)(this._session, {
151
+ audioEndTime: new Date().getTime()
152
+ });
153
+ let {
154
+ audioStartTime,
155
+ audioEndTime,
156
+ waitTime
157
+ } = this._session;
158
+ if (!waitTime && audioStartTime && audioEndTime) {
159
+ // waitTime is elapsed time the user waited for auto-played audio to finish
160
+ this._session.waitTime = audioEndTime - audioStartTime;
161
+ }
162
+ this.audioComplete = true;
163
+ this.dispatchEvent(new _piePlayerEvents.SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete()));
164
+ audio.removeEventListener('ended', handleEnded);
165
+ };
166
+ audio.addEventListener('ended', handleEnded);
167
+
168
+ // store references to remove later
169
+ this._audio = audio;
170
+ this._handlePlaying = handlePlaying;
171
+ this._handleEnded = handleEnded;
172
+ this._enableAudio = enableAudio;
173
+ // set to true to prevent multiple initializations
174
+ this._audioInitialized = true;
175
+ observer.disconnect();
176
+ }
241
177
  });
242
- observer.observe(this, {
243
- childList: true,
244
- subtree: true
178
+ });
179
+ observer.observe(this, {
180
+ childList: true,
181
+ subtree: true
182
+ });
183
+ }
184
+ _render() {
185
+ if (this._model && this._session) {
186
+ const el = /*#__PURE__*/_react.default.createElement(_hotspot.default, {
187
+ model: this._model,
188
+ session: this._session,
189
+ onSelectChoice: this.onSelectChoice.bind(this)
245
190
  });
246
- }
247
- }, {
248
- key: "disconnectedCallback",
249
- value: function disconnectedCallback() {
250
- document.removeEventListener('click', this._enableAudio);
251
-
252
- if (this._audio) {
253
- this._audio.removeEventListener('playing', this._handlePlaying);
254
-
255
- this._audio.removeEventListener('ended', this._handleEnded);
256
-
257
- this._audio = null;
191
+ if (!this._root) {
192
+ this._root = (0, _client.createRoot)(this);
258
193
  }
194
+ this._root.render(el);
195
+ queueMicrotask(() => {
196
+ (0, _mathRendering.renderMath)(this);
197
+ });
259
198
  }
260
- }, {
261
- key: "_render",
262
- value: function _render() {
263
- var _this3 = this;
264
-
265
- if (this._model && this._session) {
266
- var el = /*#__PURE__*/_react["default"].createElement(_hotspot["default"], {
267
- model: this._model,
268
- session: this._session,
269
- onSelectChoice: this.onSelectChoice.bind(this)
270
- });
271
-
272
- _reactDom["default"].render(el, this, function () {
273
- (0, _mathRendering.renderMath)(_this3);
274
- });
275
- }
199
+ }
200
+ disconnectedCallback() {
201
+ document.removeEventListener('click', this._enableAudio);
202
+ if (this._audio) {
203
+ this._audio.removeEventListener('playing', this._handlePlaying);
204
+ this._audio.removeEventListener('ended', this._handleEnded);
205
+ this._audio = null;
276
206
  }
277
- }]);
278
- return Hotspot;
279
- }( /*#__PURE__*/(0, _wrapNativeSuper2["default"])(HTMLElement));
280
-
281
- exports["default"] = Hotspot;
207
+ if (this._root) {
208
+ this._root.unmount();
209
+ }
210
+ }
211
+ }
212
+ exports.default = Hotspot;
282
213
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["Hotspot","_model","_session","_audioInitialized","audioComplete","m","dispatchEvent","ModelSetEvent","tagName","toLowerCase","isComplete","_render","answers","autoplayAudioEnabled","completeAudioEnabled","elementContext","audio","querySelector","isInsidePrompt","closest","Array","isArray","length","s","data","SessionChangedEvent","info","document","createElement","id","Object","assign","style","position","top","width","height","display","justifyContent","alignItems","background","zIndex","cursor","img","src","EnableAudioAutoplayImage","alt","appendChild","observer","MutationObserver","mutationsList","forEach","mutation","type","_createAudioInfoToast","container","enableAudio","play","removeChild","removeEventListener","setTimeout","paused","addEventListener","handlePlaying","audioStartTime","Date","getTime","handleEnded","audioEndTime","waitTime","_audio","_handlePlaying","_handleEnded","_enableAudio","disconnect","observe","childList","subtree","el","React","HotspotComponent","model","session","onSelectChoice","bind","ReactDOM","render","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;IAEqBA,O;;;;;AACnB,qBAAc;AAAA;;AAAA;AACZ;AACA,UAAKC,MAAL,GAAc,IAAd;AACA,UAAKC,QAAL,GAAgB,IAAhB;AACA,UAAKC,iBAAL,GAAyB,KAAzB;AACA,UAAKC,aAAL,GAAqB,KAArB;AALY;AAMb;;;;SAED,aAAUC,CAAV,EAAa;AACX,WAAKJ,MAAL,GAAcI,CAAd;AAEA,WAAKC,aAAL,CAAmB,IAAIC,8BAAJ,CAAkB,KAAKC,OAAL,CAAaC,WAAb,EAAlB,EAA8C,KAAKC,UAAL,EAA9C,EAAiE,CAAC,CAAC,KAAKT,MAAxE,CAAnB;AACA,WAAKE,iBAAL,GAAyB,KAAzB;;AACA,WAAKQ,OAAL;AACD;;;WAED,sBAAa;AACX,UAAI,CAAC,KAAKT,QAAN,IAAkB,CAAC,KAAKA,QAAL,CAAcU,OAArC,EAA8C;AAC5C,eAAO,KAAP;AACD;;AAED,iBAAuD,KAAKX,MAAL,IAAe,EAAtE;AAAA,UAAQY,oBAAR,QAAQA,oBAAR;AAAA,UAA8BC,oBAA9B,QAA8BA,oBAA9B;;AACA,UAAMC,cAAc,GAAG,IAAvB,CANW,CAQX;;AACA,UAAIF,oBAAoB,IAAIC,oBAAxB,IAAgD,CAAC,KAAKV,aAA1D,EAAyE;AACvE,YAAIW,cAAJ,EAAoB;AAClB,cAAMC,KAAK,GAAGD,cAAc,CAACE,aAAf,CA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lD,MAAAA,QAAQ,CAACgC,mBAAT,CAA6B,OAA7B,EAAsC,KAAKc,YAA3C;;AAEA,UAAI,KAAKH,MAAT,EAAiB;AACf,aAAKA,MAAL,CAAYX,mBAAZ,CAAgC,SAAhC,EAA2C,KAAKY,cAAhD;;AACA,aAAKD,MAAL,CAAYX,mBAAZ,CAAgC,OAAhC,EAAyC,KAAKa,YAA9C;;AACA,aAAKF,MAAL,GAAc,IAAd;AACD;AACF;;;WAED,mBAAU;AAAA;;AACR,UAAI,KAAKrE,MAAL,IAAe,KAAKC,QAAxB,EAAkC;AAChC,YAAM4E,EAAE,gBAAGC,kBAAMnD,aAAN,CAAoBoD,mBAApB,EAAsC;AAC/CC,UAAAA,KAAK,EAAE,KAAKhF,MADmC;AAE/CiF,UAAAA,OAAO,EAAE,KAAKhF,QAFiC;AAG/CiF,UAAAA,cAAc,EAAE,KAAKA,cAAL,CAAoBC,IAApB,CAAyB,IAAzB;AAH+B,SAAtC,CAAX;;AAMAC,6BAASC,MAAT,CAAgBR,EAAhB,EAAoB,IAApB,EAA0B,YAAM;AAC9B,yCAAW,MAAX;AACD,SAFD;AAGD;AACF;;;kDA9MkCS,W","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { renderMath } from '@pie-lib/math-rendering';\nimport { EnableAudioAutoplayImage } from '@pie-lib/render-ui';\nimport { SessionChangedEvent, ModelSetEvent } from '@pie-framework/pie-player-events';\n\nimport HotspotComponent from './hotspot';\nimport { updateSessionValue, updateSessionMetadata } from './session-updater';\n\nexport default class Hotspot extends HTMLElement {\n constructor() {\n super();\n this._model = null;\n this._session = null;\n this._audioInitialized = false;\n this.audioComplete = false;\n }\n\n set model(m) {\n this._model = m;\n\n this.dispatchEvent(new ModelSetEvent(this.tagName.toLowerCase(), this.isComplete(), !!this._model));\n this._audioInitialized = false;\n this._render();\n }\n\n isComplete() {\n if (!this._session || !this._session.answers) {\n return false;\n }\n\n const { autoplayAudioEnabled, completeAudioEnabled } = this._model || {};\n const elementContext = this;\n\n // check audio completion if audio settings are enabled and audio actually exists\n if (autoplayAudioEnabled && completeAudioEnabled && !this.audioComplete) {\n if (elementContext) {\n const audio = elementContext.querySelector('audio');\n const isInsidePrompt = audio && audio.closest('#preview-prompt');\n\n // only require audio completion if audio exists and is inside the prompt\n if (audio && isInsidePrompt) {\n return false;\n }\n }\n }\n\n if (!Array.isArray(this._session.answers)) {\n return false;\n }\n\n return this._session.answers.length > 0;\n }\n\n set session(s) {\n if (s && !s.answers) {\n s.answers = [];\n }\n\n this._session = s;\n this._render();\n }\n\n get session() {\n return this._session;\n }\n\n onSelectChoice(data) {\n updateSessionValue(this._session, this._model, data);\n\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete()));\n\n this._render();\n }\n\n _createAudioInfoToast() {\n const info = document.createElement('div');\n info.id = 'play-audio-info';\n\n Object.assign(info.style, {\n position: 'absolute',\n top: 0,\n width: '100%',\n height: '100%',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n background: 'white',\n zIndex: '1000',\n cursor: 'pointer',\n });\n\n const img = document.createElement('img');\n img.src = EnableAudioAutoplayImage;\n img.alt = 'Click anywhere to enable audio autoplay';\n img.width = 500;\n img.height = 300;\n\n info.appendChild(img);\n return info;\n }\n\n connectedCallback() {\n this._render();\n\n // Observation: audio in Chrome will have the autoplay attribute,\n // while other browsers will not have the autoplay attribute and will need a user interaction to play the audio\n // This workaround fixes the issue of audio being cached and played on any user interaction in Safari and Firefox\n const observer = new MutationObserver((mutationsList, observer) => {\n mutationsList.forEach((mutation) => {\n if (mutation.type === 'childList') {\n if (this._audioInitialized) return;\n const audio = this.querySelector('audio');\n const isInsidePrompt = audio && audio.closest('#preview-prompt');\n\n if (!this._model) return;\n if (!this._model.autoplayAudioEnabled) return;\n if (audio && !isInsidePrompt) return;\n if (!audio) return;\n\n const info = this._createAudioInfoToast();\n const container = this.querySelector('#main-container');\n const enableAudio = () => {\n if (this.querySelector('#play-audio-info')) {\n audio.play();\n container.removeChild(info);\n }\n\n document.removeEventListener('click', enableAudio);\n };\n\n // if the audio is paused, it means the user has not interacted with the page yet and the audio will not play\n // FIX FOR SAFARI: play with a slight delay to check if autoplay was blocked\n setTimeout(() => {\n if (audio.paused && !this.querySelector('#play-audio-info')) {\n // add info message as a toast to enable audio playback\n container.appendChild(info);\n document.addEventListener('click', enableAudio);\n } else {\n document.removeEventListener('click', enableAudio);\n }\n }, 500);\n\n // we need to listen for the playing event to remove the toast in case the audio plays because of re-rendering\n const handlePlaying = () => {\n //timestamp when auto-played audio started playing\n updateSessionMetadata(this._session, { audioStartTime: new Date().getTime() });\n\n const info = this.querySelector('#play-audio-info');\n if (info) {\n container.removeChild(info);\n }\n\n audio.removeEventListener('playing', handlePlaying);\n };\n\n audio.addEventListener('playing', handlePlaying);\n\n // we need to listen for the ended event to update the isComplete state\n const handleEnded = () => {\n //timestamp when auto-played audio completed playing\n updateSessionMetadata(this._session, { audioEndTime: new Date().getTime() });\n\n let { audioStartTime, audioEndTime, waitTime } = this._session;\n if (!waitTime && audioStartTime && audioEndTime) {\n // waitTime is elapsed time the user waited for auto-played audio to finish\n this._session.waitTime = audioEndTime - audioStartTime;\n }\n\n this.audioComplete = true;\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete()));\n\n audio.removeEventListener('ended', handleEnded);\n };\n\n audio.addEventListener('ended', handleEnded);\n\n // store references to remove later\n this._audio = audio;\n this._handlePlaying = handlePlaying;\n this._handleEnded = handleEnded;\n this._enableAudio = enableAudio;\n // set to true to prevent multiple initializations\n this._audioInitialized = true;\n\n observer.disconnect();\n }\n });\n });\n\n observer.observe(this, { childList: true, subtree: true });\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this._enableAudio);\n\n if (this._audio) {\n this._audio.removeEventListener('playing', this._handlePlaying);\n this._audio.removeEventListener('ended', this._handleEnded);\n this._audio = null;\n }\n }\n\n _render() {\n if (this._model && this._session) {\n const el = React.createElement(HotspotComponent, {\n model: this._model,\n session: this._session,\n onSelectChoice: this.onSelectChoice.bind(this),\n });\n\n ReactDOM.render(el, this, () => {\n renderMath(this);\n });\n }\n }\n}\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_client","_mathRendering","_renderUi","_piePlayerEvents","_hotspot","_sessionUpdater","Hotspot","HTMLElement","constructor","_model","_session","_audioInitialized","audioComplete","_root","model","m","dispatchEvent","ModelSetEvent","tagName","toLowerCase","isComplete","_render","answers","autoplayAudioEnabled","completeAudioEnabled","elementContext","audio","querySelector","isInsidePrompt","closest","Array","isArray","length","session","s","onSelectChoice","data","updateSessionValue","SessionChangedEvent","_createAudioInfoToast","info","document","createElement","id","Object","assign","style","position","top","width","height","display","justifyContent","alignItems","background","zIndex","cursor","img","src","EnableAudioAutoplayImage","alt","appendChild","connectedCallback","observer","MutationObserver","mutationsList","forEach","mutation","type","container","enableAudio","play","removeChild","removeEventListener","setTimeout","paused","addEventListener","handlePlaying","updateSessionMetadata","audioStartTime","Date","getTime","handleEnded","audioEndTime","waitTime","_audio","_handlePlaying","_handleEnded","_enableAudio","disconnect","observe","childList","subtree","el","React","HotspotComponent","bind","createRoot","render","queueMicrotask","renderMath","disconnectedCallback","unmount","exports","default"],"sources":["../src/index.js"],"sourcesContent":["import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { renderMath } from '@pie-lib/math-rendering';\nimport { EnableAudioAutoplayImage } from '@pie-lib/render-ui';\nimport { SessionChangedEvent, ModelSetEvent } from '@pie-framework/pie-player-events';\n\nimport HotspotComponent from './hotspot';\nimport { updateSessionValue, updateSessionMetadata } from './session-updater';\n\nexport default class Hotspot extends HTMLElement {\n constructor() {\n super();\n this._model = null;\n this._session = null;\n this._audioInitialized = false;\n this.audioComplete = false;\n this._root = null;\n }\n\n set model(m) {\n this._model = m;\n\n this.dispatchEvent(new ModelSetEvent(this.tagName.toLowerCase(), this.isComplete(), !!this._model));\n this._audioInitialized = false;\n this._render();\n }\n\n isComplete() {\n if (!this._session || !this._session.answers) {\n return false;\n }\n\n const { autoplayAudioEnabled, completeAudioEnabled } = this._model || {};\n const elementContext = this;\n\n // check audio completion if audio settings are enabled and audio actually exists\n if (autoplayAudioEnabled && completeAudioEnabled && !this.audioComplete) {\n if (elementContext) {\n const audio = elementContext.querySelector('audio');\n const isInsidePrompt = audio && audio.closest('#preview-prompt');\n\n // only require audio completion if audio exists and is inside the prompt\n if (audio && isInsidePrompt) {\n return false;\n }\n }\n }\n\n if (!Array.isArray(this._session.answers)) {\n return false;\n }\n\n return this._session.answers.length > 0;\n }\n\n set session(s) {\n if (s && !s.answers) {\n s.answers = [];\n }\n\n this._session = s;\n this._render();\n }\n\n get session() {\n return this._session;\n }\n\n onSelectChoice(data) {\n updateSessionValue(this._session, this._model, data);\n\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete()));\n\n this._render();\n }\n\n _createAudioInfoToast() {\n const info = document.createElement('div');\n info.id = 'play-audio-info';\n\n Object.assign(info.style, {\n position: 'absolute',\n top: 0,\n width: '100%',\n height: '100%',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n background: 'white',\n zIndex: '1000',\n cursor: 'pointer',\n });\n\n const img = document.createElement('img');\n img.src = EnableAudioAutoplayImage;\n img.alt = 'Click anywhere to enable audio autoplay';\n img.width = 500;\n img.height = 300;\n\n info.appendChild(img);\n return info;\n }\n\n connectedCallback() {\n this._render();\n\n // Observation: audio in Chrome will have the autoplay attribute,\n // while other browsers will not have the autoplay attribute and will need a user interaction to play the audio\n // This workaround fixes the issue of audio being cached and played on any user interaction in Safari and Firefox\n const observer = new MutationObserver((mutationsList, observer) => {\n mutationsList.forEach((mutation) => {\n if (mutation.type === 'childList') {\n if (this._audioInitialized) return;\n const audio = this.querySelector('audio');\n const isInsidePrompt = audio && audio.closest('#preview-prompt');\n\n if (!this._model) return;\n if (!this._model.autoplayAudioEnabled) return;\n if (audio && !isInsidePrompt) return;\n if (!audio) return;\n\n const info = this._createAudioInfoToast();\n const container = this.querySelector('#main-container');\n const enableAudio = () => {\n if (this.querySelector('#play-audio-info')) {\n audio.play();\n container.removeChild(info);\n }\n\n document.removeEventListener('click', enableAudio);\n };\n\n // if the audio is paused, it means the user has not interacted with the page yet and the audio will not play\n // FIX FOR SAFARI: play with a slight delay to check if autoplay was blocked\n setTimeout(() => {\n if (audio.paused && !this.querySelector('#play-audio-info')) {\n // add info message as a toast to enable audio playback\n container.appendChild(info);\n document.addEventListener('click', enableAudio);\n } else {\n document.removeEventListener('click', enableAudio);\n }\n }, 500);\n\n // we need to listen for the playing event to remove the toast in case the audio plays because of re-rendering\n const handlePlaying = () => {\n //timestamp when auto-played audio started playing\n updateSessionMetadata(this._session, { audioStartTime: new Date().getTime() });\n\n const info = this.querySelector('#play-audio-info');\n if (info) {\n container.removeChild(info);\n }\n\n audio.removeEventListener('playing', handlePlaying);\n };\n\n audio.addEventListener('playing', handlePlaying);\n\n // we need to listen for the ended event to update the isComplete state\n const handleEnded = () => {\n //timestamp when auto-played audio completed playing\n updateSessionMetadata(this._session, { audioEndTime: new Date().getTime() });\n\n let { audioStartTime, audioEndTime, waitTime } = this._session;\n if (!waitTime && audioStartTime && audioEndTime) {\n // waitTime is elapsed time the user waited for auto-played audio to finish\n this._session.waitTime = audioEndTime - audioStartTime;\n }\n\n this.audioComplete = true;\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete()));\n\n audio.removeEventListener('ended', handleEnded);\n };\n\n audio.addEventListener('ended', handleEnded);\n\n // store references to remove later\n this._audio = audio;\n this._handlePlaying = handlePlaying;\n this._handleEnded = handleEnded;\n this._enableAudio = enableAudio;\n // set to true to prevent multiple initializations\n this._audioInitialized = true;\n\n observer.disconnect();\n }\n });\n });\n\n observer.observe(this, { childList: true, subtree: true });\n }\n\n _render() {\n if (this._model && this._session) {\n const el = React.createElement(HotspotComponent, {\n model: this._model,\n session: this._session,\n onSelectChoice: this.onSelectChoice.bind(this),\n });\n\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(el);\n queueMicrotask(() => {\n renderMath(this);\n });\n }\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this._enableAudio);\n\n if (this._audio) {\n this._audio.removeEventListener('playing', this._handlePlaying);\n this._audio.removeEventListener('ended', this._handleEnded);\n this._audio = null;\n }\n\n if (this._root) {\n this._root.unmount();\n }\n }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AAEA,IAAAK,QAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AAEe,MAAMO,OAAO,SAASC,WAAW,CAAC;EAC/CC,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,CAAC;IACP,IAAI,CAACC,MAAM,GAAG,IAAI;IAClB,IAAI,CAACC,QAAQ,GAAG,IAAI;IACpB,IAAI,CAACC,iBAAiB,GAAG,KAAK;IAC9B,IAAI,CAACC,aAAa,GAAG,KAAK;IAC1B,IAAI,CAACC,KAAK,GAAG,IAAI;EACnB;EAEA,IAAIC,KAAKA,CAACC,CAAC,EAAE;IACX,IAAI,CAACN,MAAM,GAAGM,CAAC;IAEf,IAAI,CAACC,aAAa,CAAC,IAAIC,8BAAa,CAAC,IAAI,CAACC,OAAO,CAACC,WAAW,CAAC,CAAC,EAAE,IAAI,CAACC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAACX,MAAM,CAAC,CAAC;IACnG,IAAI,CAACE,iBAAiB,GAAG,KAAK;IAC9B,IAAI,CAACU,OAAO,CAAC,CAAC;EAChB;EAEAD,UAAUA,CAAA,EAAG;IACX,IAAI,CAAC,IAAI,CAACV,QAAQ,IAAI,CAAC,IAAI,CAACA,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ata = updateSessionMetadata;
7
7
  exports.updateSessionValue = updateSessionValue;
8
-
9
8
  function updateSessionValue(session, model, data) {
10
- var id = data.id,
11
- selected = data.selected;
12
-
13
- var _ref = model || {},
14
- multipleCorrect = _ref.multipleCorrect;
15
-
9
+ const {
10
+ id,
11
+ selected
12
+ } = data;
13
+ const {
14
+ multipleCorrect
15
+ } = model || {};
16
16
  session.answers = session.answers || [];
17
-
18
17
  if (!selected) {
19
- session.answers = session.answers.filter(function (answer) {
20
- return answer.id !== id;
21
- });
18
+ session.answers = session.answers.filter(answer => answer.id !== id);
22
19
  } else {
23
- var item = {
24
- id: id
20
+ const item = {
21
+ id
25
22
  };
26
-
27
23
  if (multipleCorrect) {
28
24
  session.answers.push(item);
29
25
  } else {
30
26
  session.answers = [item];
31
- } //update session metadata
32
-
27
+ }
33
28
 
29
+ //update session metadata
34
30
  session.selector = data.selector;
35
31
  }
36
32
  }
37
-
38
33
  function updateSessionMetadata(session, metadata) {
39
34
  session.audioStartTime = session.audioStartTime || metadata.audioStartTime; //timestamp when auto-played audio started playing
40
-
41
35
  session.audioEndTime = session.audioEndTime || metadata.audioEndTime; //timestamp when auto-played audio completed playing
42
36
 
43
37
  if (!session.waitTime && session.audioStartTime && session.audioEndTime) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/session-updater.js"],"names":["updateSessionValue","session","model","data","id","selected","multipleCorrect","answers","filter","answer","item","push","selector","updateSessionMetadata","metadata","audioStartTime","audioEndTime","waitTime"],"mappings":";;;;;;;;AAAO,SAASA,kBAAT,CAA4BC,OAA5B,EAAqCC,KAArC,EAA4CC,IAA5C,EAAkD;AACvD,MAAQC,EAAR,GAAyBD,IAAzB,CAAQC,EAAR;AAAA,MAAYC,QAAZ,GAAyBF,IAAzB,CAAYE,QAAZ;;AACA,aAA4BH,KAAK,IAAI,EAArC;AAAA,MAAQI,eAAR,QAAQA,eAAR;;AACAL,EAAAA,OAAO,CAACM,OAAR,GAAkBN,OAAO,CAACM,OAAR,IAAmB,EAArC;;AAEA,MAAI,CAACF,QAAL,EAAe;AACbJ,IAAAA,OAAO,CAACM,OAAR,GAAkBN,OAAO,CAACM,OAAR,CAAgBC,MAAhB,CAAuB,UAACC,MAAD;AAAA,aAAYA,MAAM,CAACL,EAAP,KAAcA,EAA1B;AAAA,KAAvB,CAAlB;AACD,GAFD,MAEO;AACL,QAAMM,IAAI,GAAG;AAAEN,MAAAA,EAAE,EAAFA;AAAF,KAAb;;AACA,QAAIE,eAAJ,EAAqB;AACnBL,MAAAA,OAAO,CAACM,OAAR,CAAgBI,IAAhB,CAAqBD,IAArB;AACD,KAFD,MAEO;AACLT,MAAAA,OAAO,CAACM,OAAR,GAAkB,CAACG,IAAD,CAAlB;AACD,KANI,CAQL;;;AACAT,IAAAA,OAAO,CAACW,QAAR,GAAmBT,IAAI,CAACS,QAAxB;AACD;AACF;;AAEM,SAASC,qBAAT,CAA+BZ,OAA/B,EAAwCa,QAAxC,EAAkD;AACvDb,EAAAA,OAAO,CAACc,cAAR,GAAyBd,OAAO,CAACc,cAAR,IAA0BD,QAAQ,CAACC,cAA5D,CADuD,CACqB;;AAC5Ed,EAAAA,OAAO,CAACe,YAAR,GAAuBf,OAAO,CAACe,YAAR,IAAwBF,QAAQ,CAACE,YAAxD,CAFuD,CAEe;;AAEtE,MAAI,CAACf,OAAO,CAACgB,QAAT,IAAqBhB,OAAO,CAACc,cAA7B,IAA+Cd,OAAO,CAACe,YAA3D,EAAyE;AACvE;AACAf,IAAAA,OAAO,CAACgB,QAAR,GAAmBhB,OAAO,CAACe,YAAR,GAAuBf,OAAO,CAACc,cAAlD;AACD;AACF","sourcesContent":["export function updateSessionValue(session, model, data) {\n const { id, selected } = data;\n const { multipleCorrect } = model || {};\n session.answers = session.answers || [];\n\n if (!selected) {\n session.answers = session.answers.filter((answer) => answer.id !== id);\n } else {\n const item = { id };\n if (multipleCorrect) {\n session.answers.push(item);\n } else {\n session.answers = [item];\n }\n\n //update session metadata\n session.selector = data.selector;\n }\n}\n\nexport function updateSessionMetadata(session, metadata) {\n session.audioStartTime = session.audioStartTime || metadata.audioStartTime; //timestamp when auto-played audio started playing\n session.audioEndTime = session.audioEndTime || metadata.audioEndTime; //timestamp when auto-played audio completed playing\n\n if (!session.waitTime && session.audioStartTime && session.audioEndTime) {\n // waitTime is elapsed time the user waited for auto-played audio to finish\n session.waitTime = session.audioEndTime - session.audioStartTime;\n }\n}\n"],"file":"session-updater.js"}
1
+ {"version":3,"file":"session-updater.js","names":["updateSessionValue","session","model","data","id","selected","multipleCorrect","answers","filter","answer","item","push","selector","updateSessionMetadata","metadata","audioStartTime","audioEndTime","waitTime"],"sources":["../src/session-updater.js"],"sourcesContent":["export function updateSessionValue(session, model, data) {\n const { id, selected } = data;\n const { multipleCorrect } = model || {};\n session.answers = session.answers || [];\n\n if (!selected) {\n session.answers = session.answers.filter((answer) => answer.id !== id);\n } else {\n const item = { id };\n if (multipleCorrect) {\n session.answers.push(item);\n } else {\n session.answers = [item];\n }\n\n //update session metadata\n session.selector = data.selector;\n }\n}\n\nexport function updateSessionMetadata(session, metadata) {\n session.audioStartTime = session.audioStartTime || metadata.audioStartTime; //timestamp when auto-played audio started playing\n session.audioEndTime = session.audioEndTime || metadata.audioEndTime; //timestamp when auto-played audio completed playing\n\n if (!session.waitTime && session.audioStartTime && session.audioEndTime) {\n // waitTime is elapsed time the user waited for auto-played audio to finish\n session.waitTime = session.audioEndTime - session.audioStartTime;\n }\n}\n"],"mappings":";;;;;;;AAAO,SAASA,kBAAkBA,CAACC,OAAO,EAAEC,KAAK,EAAEC,IAAI,EAAE;EACvD,MAAM;IAAEC,EAAE;IAAEC;EAAS,CAAC,GAAGF,IAAI;EAC7B,MAAM;IAAEG;EAAgB,CAAC,GAAGJ,KAAK,IAAI,CAAC,CAAC;EACvCD,OAAO,CAACM,OAAO,GAAGN,OAAO,CAACM,OAAO,IAAI,EAAE;EAEvC,IAAI,CAACF,QAAQ,EAAE;IACbJ,OAAO,CAACM,OAAO,GAAGN,OAAO,CAACM,OAAO,CAACC,MAAM,CAAEC,MAAM,IAAKA,MAAM,CAACL,EAAE,KAAKA,EAAE,CAAC;EACxE,CAAC,MAAM;IACL,MAAMM,IAAI,GAAG;MAAEN;IAAG,CAAC;IACnB,IAAIE,eAAe,EAAE;MACnBL,OAAO,CAACM,OAAO,CAACI,IAAI,CAACD,IAAI,CAAC;IAC5B,CAAC,MAAM;MACLT,OAAO,CAACM,OAAO,GAAG,CAACG,IAAI,CAAC;IAC1B;;IAEA;IACAT,OAAO,CAACW,QAAQ,GAAGT,IAAI,CAACS,QAAQ;EAClC;AACF;AAEO,SAASC,qBAAqBA,CAACZ,OAAO,EAAEa,QAAQ,EAAE;EACvDb,OAAO,CAACc,cAAc,GAAGd,OAAO,CAACc,cAAc,IAAID,QAAQ,CAACC,cAAc,CAAC,CAAC;EAC5Ed,OAAO,CAACe,YAAY,GAAGf,OAAO,CAACe,YAAY,IAAIF,QAAQ,CAACE,YAAY,CAAC,CAAC;;EAEtE,IAAI,CAACf,OAAO,CAACgB,QAAQ,IAAIhB,OAAO,CAACc,cAAc,IAAId,OAAO,CAACe,YAAY,EAAE;IACvE;IACAf,OAAO,CAACgB,QAAQ,GAAGhB,OAAO,CAACe,YAAY,GAAGf,OAAO,CAACc,cAAc;EAClE;AACF","ignoreList":[]}