@pie-element/multiple-choice 13.2.1 → 13.2.2-next.0

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 (266) hide show
  1. package/configure.js +2 -0
  2. package/controller.js +1 -0
  3. package/dist/author/defaults.d.ts +205 -0
  4. package/dist/author/defaults.js +151 -0
  5. package/dist/author/index.d.ts +26 -0
  6. package/dist/author/index.js +119 -0
  7. package/dist/author/main.d.ts +34 -0
  8. package/dist/author/main.js +287 -0
  9. package/dist/author/utils.d.ts +9 -0
  10. package/dist/author/utils.js +7 -0
  11. package/dist/browser/_Uint8Array-CUOjhemR.js +396 -0
  12. package/dist/browser/_Uint8Array-CUOjhemR.js.map +1 -0
  13. package/dist/browser/_baseClone-fFvdZAu5.js +245 -0
  14. package/dist/browser/_baseClone-fFvdZAu5.js.map +1 -0
  15. package/dist/browser/author/index.js +40187 -0
  16. package/dist/browser/author/index.js.map +1 -0
  17. package/dist/browser/controller/index.js +199 -0
  18. package/dist/browser/controller/index.js.map +1 -0
  19. package/dist/browser/debounce-PkR6OuzU.js +9669 -0
  20. package/dist/browser/debounce-PkR6OuzU.js.map +1 -0
  21. package/dist/browser/delivery/index.js +250 -0
  22. package/dist/browser/delivery/index.js.map +1 -0
  23. package/dist/browser/isEqual-CnAlrBXo.js +182 -0
  24. package/dist/browser/isEqual-CnAlrBXo.js.map +1 -0
  25. package/dist/browser/isObject-B-uKF3Sg.js +38 -0
  26. package/dist/browser/isObject-B-uKF3Sg.js.map +1 -0
  27. package/dist/browser/main-CmP4Uwst.js +2440 -0
  28. package/dist/browser/main-CmP4Uwst.js.map +1 -0
  29. package/dist/browser/multiple-choice.css +2 -0
  30. package/dist/browser/print/index.js +48 -0
  31. package/dist/browser/print/index.js.map +1 -0
  32. package/dist/controller/defaults.d.ts +35 -0
  33. package/dist/controller/defaults.js +29 -0
  34. package/dist/controller/index.d.ts +65 -0
  35. package/dist/controller/index.js +124 -0
  36. package/dist/controller/utils.d.ts +10 -0
  37. package/dist/controller/utils.js +8 -0
  38. package/dist/delivery/choice-input.d.ts +44 -0
  39. package/dist/delivery/choice-input.js +272 -0
  40. package/dist/delivery/choice.d.ts +20 -0
  41. package/dist/delivery/choice.js +105 -0
  42. package/dist/delivery/feedback-tick.d.ts +20 -0
  43. package/dist/delivery/feedback-tick.js +104 -0
  44. package/dist/delivery/index.d.ts +37 -0
  45. package/dist/delivery/index.js +214 -0
  46. package/dist/delivery/main.d.ts +31 -0
  47. package/dist/delivery/main.js +51 -0
  48. package/dist/delivery/multiple-choice.d.ts +61 -0
  49. package/dist/delivery/multiple-choice.js +244 -0
  50. package/dist/delivery/session-updater.d.ts +10 -0
  51. package/dist/delivery/session-updater.js +9 -0
  52. package/dist/index.d.ts +1 -0
  53. package/dist/index.iife.d.ts +8 -0
  54. package/dist/index.iife.js +148 -0
  55. package/dist/index.js +2 -0
  56. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
  57. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
  58. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
  59. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
  60. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
  61. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
  62. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
  63. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +11 -0
  64. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
  65. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
  66. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
  67. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
  68. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +12 -0
  69. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
  70. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
  71. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
  72. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
  73. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +7 -0
  74. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignMergeValue.js +8 -0
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +5 -0
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +8 -0
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMerge.js +19 -0
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMergeDeep.js +31 -0
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +9 -0
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +14 -0
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +8 -0
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +6 -0
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createAssigner.js +15 -0
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +12 -0
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +35 -0
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +35 -0
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +32 -0
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +12 -0
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +9 -0
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +13 -0
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_safeGet.js +6 -0
  163. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +7 -0
  164. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +6 -0
  165. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +9 -0
  166. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +6 -0
  167. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +14 -0
  168. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
  169. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
  170. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
  171. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
  172. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
  173. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
  174. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +8 -0
  175. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
  176. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +8 -0
  177. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js +50 -0
  178. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +16 -0
  179. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
  180. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +6 -0
  181. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
  182. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
  183. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
  184. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js +8 -0
  185. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
  186. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
  187. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +7 -0
  188. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
  189. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
  190. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
  191. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
  192. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
  193. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isPlainObject.js +14 -0
  194. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
  195. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
  196. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
  197. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
  198. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
  199. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/merge.js +8 -0
  200. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/now.js +7 -0
  201. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
  202. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
  203. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +19 -0
  204. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toPlainObject.js +8 -0
  205. package/dist/print/index.d.ts +15 -0
  206. package/dist/print/index.js +44 -0
  207. package/package.json +82 -25
  208. package/CHANGELOG.json +0 -1972
  209. package/CHANGELOG.md +0 -2720
  210. package/LICENSE.md +0 -5
  211. package/PRINT.md +0 -35
  212. package/README.md +0 -56
  213. package/choice.png +0 -0
  214. package/configure/CHANGELOG.json +0 -1387
  215. package/configure/CHANGELOG.md +0 -2068
  216. package/configure/lib/defaults.js +0 -203
  217. package/configure/lib/defaults.js.map +0 -1
  218. package/configure/lib/index.js +0 -202
  219. package/configure/lib/index.js.map +0 -1
  220. package/configure/lib/main.js +0 -484
  221. package/configure/lib/main.js.map +0 -1
  222. package/configure/lib/utils.js +0 -18
  223. package/configure/lib/utils.js.map +0 -1
  224. package/configure/package.json +0 -22
  225. package/controller/CHANGELOG.json +0 -527
  226. package/controller/CHANGELOG.md +0 -1405
  227. package/controller/lib/defaults.js +0 -33
  228. package/controller/lib/defaults.js.map +0 -1
  229. package/controller/lib/index.js +0 -288
  230. package/controller/lib/index.js.map +0 -1
  231. package/controller/lib/utils.js +0 -15
  232. package/controller/lib/utils.js.map +0 -1
  233. package/controller/package.json +0 -15
  234. package/docs/config-schema.json +0 -2993
  235. package/docs/config-schema.json.md +0 -2217
  236. package/docs/demo/config.js +0 -8
  237. package/docs/demo/generate.js +0 -61
  238. package/docs/demo/index.html +0 -1
  239. package/docs/demo/session.js +0 -7
  240. package/docs/pie-schema.json +0 -1332
  241. package/docs/pie-schema.json.md +0 -1015
  242. package/lib/choice-input.js +0 -374
  243. package/lib/choice-input.js.map +0 -1
  244. package/lib/choice.js +0 -192
  245. package/lib/choice.js.map +0 -1
  246. package/lib/feedback-tick.js +0 -134
  247. package/lib/feedback-tick.js.map +0 -1
  248. package/lib/index.js +0 -402
  249. package/lib/index.js.map +0 -1
  250. package/lib/main.js +0 -63
  251. package/lib/main.js.map +0 -1
  252. package/lib/multiple-choice.js +0 -397
  253. package/lib/multiple-choice.js.map +0 -1
  254. package/lib/print.js +0 -94
  255. package/lib/print.js.map +0 -1
  256. package/lib/session-updater.js +0 -37
  257. package/lib/session-updater.js.map +0 -1
  258. package/module/configure.js +0 -1
  259. package/module/controller.js +0 -3045
  260. package/module/demo.js +0 -86
  261. package/module/element.js +0 -1
  262. package/module/index.html +0 -21
  263. package/module/manifest.json +0 -14
  264. package/module/print-demo.js +0 -124
  265. package/module/print.html +0 -18
  266. package/module/print.js +0 -1
@@ -0,0 +1,105 @@
1
+ import e from "./choice-input.js";
2
+ import t from "react";
3
+ import n from "prop-types";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ import { styled as i } from "@mui/material/styles";
6
+ import a from "@mui/material/Box";
7
+ //#region src/delivery/choice.tsx
8
+ var o = i(a, { shouldForwardProp: (e) => e !== "noBorder" && e !== "horizontalLayout" })(({ theme: e, noBorder: t, horizontalLayout: n }) => ({
9
+ paddingTop: e.spacing(2.5),
10
+ paddingBottom: `calc(${e.spacing(1)} + 2px)`,
11
+ paddingLeft: `calc(${e.spacing(1)} + 2px)`,
12
+ paddingRight: `calc(${e.spacing(1)} + 2px)`,
13
+ borderBottom: t ? "none" : `1px solid ${e.palette.grey[300]}`,
14
+ ...n && {
15
+ paddingRight: e.spacing(2.5),
16
+ "& label": { marginRight: e.spacing(1) }
17
+ }
18
+ })), s = class extends t.Component {
19
+ static propTypes = {};
20
+ state = { isHovered: !1 };
21
+ handleMouseEnter = () => {
22
+ let { disabled: e, checked: t } = this.props;
23
+ !e && !t && this.setState({ isHovered: !0 });
24
+ };
25
+ handleMouseLeave = () => {
26
+ this.setState({ isHovered: !1 });
27
+ };
28
+ onChange = (e) => {
29
+ let { disabled: t, onChoiceChanged: n } = this.props;
30
+ t || n(e);
31
+ };
32
+ render() {
33
+ let { choice: t, index: n, choicesLength: i, showCorrect: a, isEvaluateMode: s, choiceMode: c, disabled: l, checked: u, correctness: d, displayKey: f, choicesLayout: p, gridColumns: m, isSelectionButtonBelow: h, selectedAnswerBackgroundColor: g, selectedAnswerStrokeColor: _, selectedAnswerStrokeWidth: v, hoverAnswerBackgroundColor: y, hoverAnswerStrokeColor: b, hoverAnswerStrokeWidth: x, tagName: S } = this.props, { isHovered: C } = this.state, w = "choice" + (n === i - 1 ? " last" : ""), T = !s || a ? "" : t.feedback, E = {
34
+ ...t,
35
+ checked: u,
36
+ choiceMode: c,
37
+ disabled: l,
38
+ feedback: T,
39
+ correctness: d,
40
+ displayKey: f,
41
+ index: n,
42
+ choicesLayout: p,
43
+ gridColumns: m,
44
+ onChange: this.onChange,
45
+ isEvaluateMode: s,
46
+ isSelectionButtonBelow: h,
47
+ selectedAnswerStrokeColor: _,
48
+ selectedAnswerStrokeWidth: v,
49
+ tagName: S
50
+ }, D = (e) => {
51
+ if (!e) return "2px";
52
+ let t = String(e).trim();
53
+ return /^\d+(\.\d+)?$/.test(t) ? `${t}px` : t;
54
+ }, O = _ && _ !== "initial", k = b && b !== "initial", A = "transparent", j = "2px", M = "initial";
55
+ (O || k) && (u && O ? (A = _, j = v) : C && !l && k && (A = b, j = x)), u && g && g !== "initial" ? M = g : C && !l && y && y !== "initial" && (M = y);
56
+ let N = O || k, P = N ? {
57
+ border: `${D(j)} solid ${A}`,
58
+ borderRadius: "8px"
59
+ } : {}, F = n === i - 1 || p !== "vertical" || N, I = p === "horizontal";
60
+ return /* @__PURE__ */ r("div", {
61
+ className: w,
62
+ style: {
63
+ backgroundColor: M === "initial" ? "initial" : M,
64
+ ...P
65
+ },
66
+ onMouseEnter: this.handleMouseEnter,
67
+ onMouseLeave: this.handleMouseLeave,
68
+ children: /* @__PURE__ */ r(o, {
69
+ component: "div",
70
+ noBorder: F,
71
+ horizontalLayout: I,
72
+ children: /* @__PURE__ */ r(e, { ...E })
73
+ })
74
+ }, n);
75
+ }
76
+ };
77
+ s.propTypes = {
78
+ choiceMode: n.oneOf(["radio", "checkbox"]),
79
+ choice: n.object,
80
+ disabled: n.bool.isRequired,
81
+ onChoiceChanged: n.func,
82
+ index: n.number,
83
+ choicesLength: n.number,
84
+ showCorrect: n.bool,
85
+ isEvaluateMode: n.bool,
86
+ checked: n.bool,
87
+ correctness: n.string,
88
+ displayKey: n.string,
89
+ choicesLayout: n.oneOf([
90
+ "vertical",
91
+ "grid",
92
+ "horizontal"
93
+ ]),
94
+ gridColumns: n.string,
95
+ selectedAnswerBackgroundColor: n.string,
96
+ selectedAnswerStrokeColor: n.string,
97
+ selectedAnswerStrokeWidth: n.string,
98
+ hoverAnswerBackgroundColor: n.string,
99
+ hoverAnswerStrokeColor: n.string,
100
+ hoverAnswerStrokeWidth: n.string,
101
+ tagName: n.string,
102
+ isSelectionButtonBelow: n.bool
103
+ };
104
+ //#endregion
105
+ export { s as default };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/multiple-choice/src/feedback-tick.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ declare class FeedbackTick extends React.Component {
12
+ static propTypes: {
13
+ correctness: PropTypes.Requireable<string>;
14
+ };
15
+ constructor(props: any);
16
+ getIncorrectIcon: () => React.JSX.Element;
17
+ getCorrectIcon: () => React.JSX.Element;
18
+ render(): React.JSX.Element;
19
+ }
20
+ export default FeedbackTick;
@@ -0,0 +1,104 @@
1
+ import e from "react";
2
+ import t from "prop-types";
3
+ import { color as n } from "@pie-lib/render-ui";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import { styled as a } from "@mui/material/styles";
6
+ import o from "@mui/material/Box";
7
+ import { CSSTransition as s, TransitionGroup as c } from "react-transition-group";
8
+ //#region src/delivery/feedback-tick.tsx
9
+ var l = a(o)({
10
+ width: "33px",
11
+ height: "33px",
12
+ "& svg": {
13
+ position: "absolute",
14
+ display: "inline-block",
15
+ width: "33px",
16
+ height: "33px",
17
+ verticalAlign: "middle",
18
+ "& hide": { display: "none" }
19
+ }
20
+ }), u = a("svg")({
21
+ "& .incorrect-fill": { fill: `var(--feedback-incorrect-bg-color, ${n.incorrect()})` },
22
+ "& .correct-fill": { fill: `var(--feedback-correct-bg-color, ${n.correct()})` }
23
+ }), d = a("div")({
24
+ position: "relative",
25
+ "&.feedback-tick-enter": {
26
+ opacity: "0",
27
+ left: "-50px"
28
+ },
29
+ "&.feedback-tick-enter-active": {
30
+ opacity: "1",
31
+ left: "0px",
32
+ transition: "left 500ms ease-in 200ms, opacity 500ms linear 200ms"
33
+ },
34
+ "&.feedback-tick-exit": {
35
+ opacity: "1",
36
+ left: "0px"
37
+ },
38
+ "&.feedback-tick-exit-active": {
39
+ opacity: "0",
40
+ left: "-50px",
41
+ transition: "left 300ms ease-in, opacity 300ms"
42
+ }
43
+ }), f = class extends e.Component {
44
+ static propTypes = { correctness: t.string };
45
+ constructor(t) {
46
+ super(t), this.nodeRef = e.createRef();
47
+ }
48
+ getIncorrectIcon = () => /* @__PURE__ */ r(u, {
49
+ preserveAspectRatio: "xMinYMin meet",
50
+ x: "0px",
51
+ y: "0px",
52
+ viewBox: "0 0 44 40",
53
+ style: { enableBackground: "new 0 0 44 40" },
54
+ children: /* @__PURE__ */ i("g", { children: [/* @__PURE__ */ r("rect", {
55
+ x: "11",
56
+ y: "17.3",
57
+ transform: "matrix(0.7071 -0.7071 0.7071 0.7071 -7.852 19.2507)",
58
+ className: "incorrect-fill",
59
+ width: "16.6",
60
+ height: "3.7"
61
+ }), /* @__PURE__ */ r("rect", {
62
+ x: "17.4",
63
+ y: "10.7",
64
+ transform: "matrix(0.7071 -0.7071 0.7071 0.7071 -7.8175 19.209)",
65
+ className: "incorrect-fill",
66
+ width: "3.7",
67
+ height: "16.6"
68
+ })] })
69
+ }, "1");
70
+ getCorrectIcon = () => /* @__PURE__ */ r(u, {
71
+ preserveAspectRatio: "xMinYMin meet",
72
+ version: "1.1",
73
+ x: "0px",
74
+ y: "0px",
75
+ viewBox: "0 0 44 40",
76
+ style: { enableBackground: "new 0 0 44 40" },
77
+ children: /* @__PURE__ */ r("polygon", {
78
+ className: "correct-fill",
79
+ points: "19.1,28.6 11.8,22.3 14.4,19.2 17.9,22.1 23.9,11.4 27.5,13.4"
80
+ })
81
+ }, "2");
82
+ render() {
83
+ let { correctness: e } = this.props, t = e === "incorrect" ? this.getIncorrectIcon() : e === "correct" ? this.getCorrectIcon() : null;
84
+ return /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(c, { children: e && /* @__PURE__ */ r(s, {
85
+ nodeRef: this.nodeRef,
86
+ classNames: {
87
+ enter: "feedback-tick-enter",
88
+ enterActive: "feedback-tick-enter-active",
89
+ exit: "feedback-tick-exit",
90
+ exitActive: "feedback-tick-exit-active"
91
+ },
92
+ timeout: {
93
+ enter: 700,
94
+ exit: 300
95
+ },
96
+ children: /* @__PURE__ */ r(d, {
97
+ ref: this.nodeRef,
98
+ children: t
99
+ })
100
+ }) }) });
101
+ }
102
+ };
103
+ //#endregion
104
+ export { f as default };
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/multiple-choice/src/index.js
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ export declare const isComplete: (session: any, model: any, audioComplete: any, elementContext: any) => boolean;
10
+ export default class MultipleChoice extends HTMLElement {
11
+ constructor();
12
+ _scheduleMathRender: any;
13
+ _initMathObserver(): void;
14
+ _disconnectMathObserver(): void;
15
+ onShowCorrectToggle(): void;
16
+ setLangAttribute(): void;
17
+ set model(s: any);
18
+ get session(): any;
19
+ get options(): any;
20
+ set options(o: any);
21
+ set baseHeadingLevel(level: any);
22
+ set includeSrHeading(value: any);
23
+ set session(s: any);
24
+ _onChange(data: any): void;
25
+ _createAudioInfoToast(): HTMLDivElement;
26
+ connectedCallback(): void;
27
+ enableKeyboardEvents(): void;
28
+ _initPlayerObserver(): void;
29
+ _disconnectPlayerObserver(): void;
30
+ disconnectedCallback(): void;
31
+ /**
32
+ * Handles global keyboard events for selecting or toggling multiple-choice answers.
33
+ * Maps keys (1-9, 0, a-j, A-J) to choices and updates the session state accordingly.
34
+ * Ensures valid key presses toggle or select the appropriate choice based on the model.
35
+ */
36
+ handleKeyDown(event: any): void;
37
+ }
@@ -0,0 +1,214 @@
1
+ import e from "./main.js";
2
+ import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js";
3
+ import { updateSessionMetadata as n, updateSessionValue as r } from "./session-updater.js";
4
+ import i from "react";
5
+ import * as a from "@pie-lib/render-ui";
6
+ import { EnableAudioAutoplayImage as o } from "@pie-lib/render-ui";
7
+ import { createRoot as s } from "react-dom/client";
8
+ import c from "debug";
9
+ import { ModelSetEvent as l, SessionChangedEvent as u } from "@pie-element/shared-player-events";
10
+ import { renderMath as d } from "@pie-element/shared-math-rendering-mathjax";
11
+ //#region src/delivery/index.ts
12
+ function f(e) {
13
+ return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
14
+ }
15
+ function p(e, t) {
16
+ return !e || f(e) ? e : f(e.default) ? e.default : t && f(e[t]) ? e[t] : t && f(e[t]?.default) ? e[t].default : e;
17
+ }
18
+ var m = p(o, "EnableAudioAutoplayImage") || p(_.EnableAudioAutoplayImage, "EnableAudioAutoplayImage"), h = a, g = h.default, _ = g && typeof g == "object" ? g : h, v = c("pie-ui:multiple-choice"), y = (e, t, n, r) => {
19
+ let { autoplayAudioEnabled: i, completeAudioEnabled: a } = t || {};
20
+ if (i && a && !n && r) {
21
+ let e = r.querySelector("audio"), t = e && e.closest("#preview-prompt");
22
+ if (e && t) return !1;
23
+ }
24
+ if (!e || !e.value) return !1;
25
+ let { choiceMode: o, minSelections: s = 1, maxSelections: c } = t || {}, l = e.value.length || 0;
26
+ return o === "radio" ? !!l : !(l < s || l > c);
27
+ };
28
+ function b(e) {
29
+ let t = e.closest("pie-player") || e.closest("pie-item-player");
30
+ if (!t) return {
31
+ baseHeadingLevel: void 0,
32
+ includeSrHeading: !0
33
+ };
34
+ let n = (e, n, r) => {
35
+ let i = t[e];
36
+ return i ??= t.getAttribute(n) ?? t.getAttribute(r), i;
37
+ }, r = n("baseHeadingLevel", "base-heading-level", "baseheadinglevel"), i = parseInt(r, 10), a = Number.isFinite(i) && i >= 1 && i <= 6 ? i : void 0, o = n("includeSrHeading", "include-sr-heading", "includesrheading");
38
+ return {
39
+ baseHeadingLevel: a,
40
+ includeSrHeading: o == null ? !0 : o !== !1 && o !== "false"
41
+ };
42
+ }
43
+ function x(e) {
44
+ let t = b(e);
45
+ return {
46
+ baseHeadingLevel: e._baseHeadingLevel === void 0 ? t.baseHeadingLevel : e._baseHeadingLevel,
47
+ includeSrHeading: e._includeSrHeading === void 0 ? t.includeSrHeading : e._includeSrHeading
48
+ };
49
+ }
50
+ var S = class extends HTMLElement {
51
+ constructor() {
52
+ super(), this._model = null, this._session = null, this._options = null, this.audioComplete = !1, this._boundHandleKeyDown = this.handleKeyDown.bind(this), this._keyboardEventsEnabled = !1, this._audioInitialized = !1, this._root = null, this._mathObserver = null, this._mathRenderPending = !1, this._rerender = t(() => {
53
+ if (this._model && this._session) {
54
+ var t = i.createElement(e, {
55
+ model: this._model,
56
+ session: this._session,
57
+ options: this._options,
58
+ onChoiceChanged: this._onChange.bind(this),
59
+ onShowCorrectToggle: this.onShowCorrectToggle.bind(this),
60
+ ...x(this)
61
+ });
62
+ this.setAttribute("aria-label", this._model.choiceMode === "radio" ? "Multiple Choice Question" : "Multiple Correct Answer Question"), this.setAttribute("role", "region"), this.setLangAttribute(), this._initMathObserver(), this._root ||= s(this), this._root.render(t), this._model.keyboardEventsEnabled === !0 && !this._keyboardEventsEnabled && this.enableKeyboardEvents();
63
+ } else v("skip");
64
+ }, 50, {
65
+ leading: !1,
66
+ trailing: !0
67
+ }), this._dispatchResponseChanged = t(() => {
68
+ this.dispatchEvent(new u(this.tagName.toLowerCase(), y(this._session, this._model, this.audioComplete, this)));
69
+ }), this._dispatchModelSet = t(() => {
70
+ this.dispatchEvent(new l(this.tagName.toLowerCase(), y(this._session, this._model, this.audioComplete, this), this._model !== void 0));
71
+ }, 50, {
72
+ leading: !1,
73
+ trailing: !0
74
+ });
75
+ }
76
+ _scheduleMathRender = () => {
77
+ this._mathRenderPending || (this._mathRenderPending = !0, requestAnimationFrame(() => {
78
+ this._mathObserver && this._mathObserver.disconnect(), v("render complete - render math"), d(this), this._mathRenderPending = !1, setTimeout(() => {
79
+ this._mathObserver && this._mathObserver.observe(this, {
80
+ childList: !0,
81
+ subtree: !0
82
+ });
83
+ }, 50);
84
+ }));
85
+ };
86
+ _initMathObserver() {
87
+ this._mathObserver || (this._mathObserver = new MutationObserver(this._scheduleMathRender), this._mathObserver.observe(this, {
88
+ childList: !0,
89
+ subtree: !0
90
+ }));
91
+ }
92
+ _disconnectMathObserver() {
93
+ this._mathObserver &&= (this._mathObserver.disconnect(), null);
94
+ }
95
+ onShowCorrectToggle() {
96
+ d(this);
97
+ }
98
+ setLangAttribute() {
99
+ let e = this._model && typeof this._model.language ? this._model.language : "", t = e ? e.slice(0, 2) : "en";
100
+ this.setAttribute("lang", t);
101
+ }
102
+ set model(e) {
103
+ this._model = e, this._rerender(), this._audioInitialized = !1, this._dispatchModelSet();
104
+ }
105
+ get session() {
106
+ return this._session;
107
+ }
108
+ get options() {
109
+ return this._options;
110
+ }
111
+ set options(e) {
112
+ this._options = e, this._rerender();
113
+ }
114
+ set baseHeadingLevel(e) {
115
+ this._baseHeadingLevel = e, this._rerender();
116
+ }
117
+ set includeSrHeading(e) {
118
+ this._includeSrHeading = e, this._rerender();
119
+ }
120
+ set session(e) {
121
+ this._session = e, this._rerender(), this._dispatchResponseChanged();
122
+ }
123
+ _onChange(e) {
124
+ r(this._session, this._model.choiceMode, e), this._dispatchResponseChanged(), this._rerender();
125
+ }
126
+ _createAudioInfoToast() {
127
+ let e = document.createElement("div");
128
+ e.id = "play-audio-info", Object.assign(e.style, {
129
+ position: "absolute",
130
+ top: 0,
131
+ width: "100%",
132
+ height: "100%",
133
+ display: "flex",
134
+ justifyContent: "center",
135
+ alignItems: "center",
136
+ background: "white",
137
+ zIndex: "1000",
138
+ cursor: "pointer"
139
+ });
140
+ let t = document.createElement("img");
141
+ return t.src = m, t.alt = "Click anywhere to enable audio autoplay", t.width = 500, t.height = 300, e.appendChild(t), e;
142
+ }
143
+ connectedCallback() {
144
+ this._initMathObserver(), this._initPlayerObserver(), this._rerender(), new MutationObserver((e, t) => {
145
+ e.forEach((e) => {
146
+ if (e.type === "childList") {
147
+ if (this._audioInitialized) return;
148
+ let e = this.querySelector("audio"), r = e && e.closest("#preview-prompt");
149
+ if (!this._model || !this._model.autoplayAudioEnabled || e && !r || !e) return;
150
+ let i = this._createAudioInfoToast(), a = this.querySelector("#main-container"), o = () => {
151
+ this.querySelector("#play-audio-info") && (e.play(), a.removeChild(i)), document.removeEventListener("click", o);
152
+ };
153
+ setTimeout(() => {
154
+ e.paused && !this.querySelector("#play-audio-info") ? (a.appendChild(i), document.addEventListener("click", o)) : document.removeEventListener("click", o);
155
+ }, 500);
156
+ let s = () => {
157
+ n(this._session, { audioStartTime: (/* @__PURE__ */ new Date()).getTime() });
158
+ let t = this.querySelector("#play-audio-info");
159
+ t && a.removeChild(t), e.removeEventListener("playing", s);
160
+ };
161
+ e.addEventListener("playing", s);
162
+ let c = () => {
163
+ n(this._session, { audioEndTime: (/* @__PURE__ */ new Date()).getTime() }), this.audioComplete = !0, this._dispatchResponseChanged(), e.removeEventListener("ended", c);
164
+ };
165
+ e.addEventListener("ended", c), this._audio = e, this._handlePlaying = s, this._handleEnded = c, this._enableAudio = o, this._audioInitialized = !0, t.disconnect();
166
+ }
167
+ });
168
+ }).observe(this, {
169
+ childList: !0,
170
+ subtree: !0
171
+ });
172
+ }
173
+ enableKeyboardEvents() {
174
+ this._keyboardEventsEnabled ||= (window.addEventListener("keydown", this._boundHandleKeyDown), !0);
175
+ }
176
+ _initPlayerObserver() {
177
+ let e = this.closest("pie-player") || this.closest("pie-item-player");
178
+ e && (this._playerObserver = new MutationObserver(() => {
179
+ this._rerender();
180
+ }), this._playerObserver.observe(e, {
181
+ attributes: !0,
182
+ attributeFilter: [
183
+ "base-heading-level",
184
+ "baseheadinglevel",
185
+ "include-sr-heading",
186
+ "includesrheading"
187
+ ]
188
+ }));
189
+ }
190
+ _disconnectPlayerObserver() {
191
+ this._playerObserver &&= (this._playerObserver.disconnect(), null);
192
+ }
193
+ disconnectedCallback() {
194
+ this._disconnectMathObserver(), this._disconnectPlayerObserver(), this._keyboardEventsEnabled &&= (window.removeEventListener("keydown", this._boundHandleKeyDown), !1), document.removeEventListener("click", this._enableAudio), this._audio &&= (this._audio.removeEventListener("playing", this._handlePlaying), this._audio.removeEventListener("ended", this._handleEnded), null), this._root && this._root.unmount();
195
+ }
196
+ handleKeyDown(e) {
197
+ if (!this._model || !this._session) return;
198
+ let { mode: t } = this._model;
199
+ if (t !== "gather") return;
200
+ let n = ((e) => {
201
+ let t = e >= "1" && e <= "9" ? e - "1" : e === "0" ? 9 : -1, n = /^[a-jA-J]$/.test(e) ? e.toLowerCase().charCodeAt(0) - 97 : -1;
202
+ return t >= 0 ? t : n;
203
+ })(e.key);
204
+ if (n === void 0 || n <= -1 || n >= this._model.choices?.length) return;
205
+ let r = this._session.value || [], i = this._model.choices[n].value, a = {
206
+ value: i,
207
+ selected: !r.includes(i),
208
+ selector: "Keyboard"
209
+ };
210
+ this._onChange(a);
211
+ }
212
+ };
213
+ //#endregion
214
+ export { S as default, y as isComplete };
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/multiple-choice/src/main.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ declare class Main extends React.Component {
12
+ static propTypes: {
13
+ model: PropTypes.Requireable<object>;
14
+ session: PropTypes.Requireable<object>;
15
+ options: PropTypes.Requireable<object>;
16
+ onChoiceChanged: PropTypes.Requireable<(...args: any[]) => any>;
17
+ onShowCorrectToggle: PropTypes.Requireable<(...args: any[]) => any>;
18
+ extraCSSRules: PropTypes.Requireable<PropTypes.InferProps<{
19
+ names: PropTypes.Requireable<(string | null | undefined)[]>;
20
+ rules: PropTypes.Requireable<string>;
21
+ }>>;
22
+ baseHeadingLevel: PropTypes.Requireable<number>;
23
+ includeSrHeading: PropTypes.Requireable<boolean>;
24
+ };
25
+ static defaultProps: {
26
+ model: {};
27
+ session: {};
28
+ };
29
+ render(): React.JSX.Element;
30
+ }
31
+ export default Main;
@@ -0,0 +1,51 @@
1
+ import e from "./multiple-choice.js";
2
+ import t from "react";
3
+ import n from "prop-types";
4
+ import * as r from "@pie-lib/render-ui";
5
+ import { PreviewLayout as i } from "@pie-lib/render-ui";
6
+ import { jsx as a } from "react/jsx-runtime";
7
+ //#region src/delivery/main.tsx
8
+ function o(e) {
9
+ return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
10
+ }
11
+ function s(e, t) {
12
+ return !e || o(e) ? e : o(e.default) ? e.default : t && o(e[t]) ? e[t] : t && o(e[t]?.default) ? e[t].default : e;
13
+ }
14
+ var c = s(i, "PreviewLayout") || s(d.PreviewLayout, "PreviewLayout"), l = r, u = l.default, d = u && typeof u == "object" ? u : l, f = class extends t.Component {
15
+ static propTypes = {
16
+ model: n.object,
17
+ session: n.object,
18
+ options: n.object,
19
+ onChoiceChanged: n.func,
20
+ onShowCorrectToggle: n.func,
21
+ extraCSSRules: n.shape({
22
+ names: n.arrayOf(n.string),
23
+ rules: n.string
24
+ }),
25
+ baseHeadingLevel: n.number,
26
+ includeSrHeading: n.bool
27
+ };
28
+ static defaultProps = {
29
+ model: {},
30
+ session: {}
31
+ };
32
+ render() {
33
+ let { model: t, onChoiceChanged: n, session: r, onShowCorrectToggle: i, options: o, baseHeadingLevel: s, includeSrHeading: l } = this.props, { extraCSSRules: u, fontSizeFactor: d } = t;
34
+ return /* @__PURE__ */ a(c, {
35
+ extraCSSRules: u,
36
+ fontSizeFactor: d,
37
+ classes: {},
38
+ children: /* @__PURE__ */ a(e, {
39
+ ...t,
40
+ options: o,
41
+ session: r,
42
+ onChoiceChanged: n,
43
+ onShowCorrectToggle: i,
44
+ baseHeadingLevel: s,
45
+ includeSrHeading: l
46
+ })
47
+ });
48
+ }
49
+ };
50
+ //#endregion
51
+ export { f as default };
@@ -0,0 +1,61 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/multiple-choice/src/multiple-choice.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare class MultipleChoice extends React.Component {
12
+ static propTypes: {
13
+ className: PropTypes.Requireable<string>;
14
+ mode: PropTypes.Requireable<string>;
15
+ choiceMode: PropTypes.Requireable<string>;
16
+ keyMode: PropTypes.Requireable<string>;
17
+ choices: PropTypes.Requireable<any[]>;
18
+ partLabel: PropTypes.Requireable<string>;
19
+ prompt: PropTypes.Requireable<string>;
20
+ teacherInstructions: PropTypes.Requireable<string>;
21
+ session: PropTypes.Requireable<object>;
22
+ disabled: PropTypes.Requireable<boolean>;
23
+ onChoiceChanged: PropTypes.Requireable<(...args: any[]) => any>;
24
+ responseCorrect: PropTypes.Requireable<boolean>;
25
+ correctResponse: PropTypes.Requireable<any[]>;
26
+ choicesLayout: PropTypes.Requireable<string>;
27
+ gridColumns: PropTypes.Requireable<string>;
28
+ alwaysShowCorrect: PropTypes.Requireable<boolean>;
29
+ animationsDisabled: PropTypes.Requireable<boolean>;
30
+ language: PropTypes.Requireable<string>;
31
+ selectedAnswerBackgroundColor: PropTypes.Requireable<string>;
32
+ selectedAnswerStrokeColor: PropTypes.Requireable<string>;
33
+ selectedAnswerStrokeWidth: PropTypes.Requireable<string>;
34
+ hoverAnswerBackgroundColor: PropTypes.Requireable<string>;
35
+ hoverAnswerStrokeColor: PropTypes.Requireable<string>;
36
+ hoverAnswerStrokeWidth: PropTypes.Requireable<string>;
37
+ onShowCorrectToggle: PropTypes.Requireable<(...args: any[]) => any>;
38
+ isSelectionButtonBelow: PropTypes.Requireable<boolean>;
39
+ minSelections: PropTypes.Requireable<number>;
40
+ maxSelections: PropTypes.Requireable<number>;
41
+ autoplayAudioEnabled: PropTypes.Requireable<boolean>;
42
+ customAudioButton: {
43
+ playImage: PropTypes.Requireable<string>;
44
+ pauseImage: PropTypes.Requireable<string>;
45
+ };
46
+ options: PropTypes.Requireable<object>;
47
+ baseHeadingLevel: PropTypes.Requireable<number>;
48
+ includeSrHeading: PropTypes.Requireable<boolean>;
49
+ };
50
+ constructor(props: any);
51
+ isSelected(value: any): any;
52
+ handleChange: any;
53
+ onToggle: any;
54
+ UNSAFE_componentWillReceiveProps(nextProps: any): void;
55
+ indexToSymbol(index: any): string;
56
+ getCorrectness: any;
57
+ getChecked(choice: any): any;
58
+ renderHeading(): React.JSX.Element | null;
59
+ render(): React.JSX.Element;
60
+ }
61
+ export default MultipleChoice;