@pie-element/explicit-constructed-response 11.1.0-next.28 → 11.1.1-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 (280) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +4 -0
  2. package/dist/author/alternateResponses.d.ts +34 -0
  3. package/dist/author/alternateResponses.js +116 -0
  4. package/dist/author/alternateSection.d.ts +58 -0
  5. package/dist/author/alternateSection.js +215 -0
  6. package/dist/author/defaults.d.ts +186 -0
  7. package/dist/author/defaults.js +128 -0
  8. package/dist/author/ecr-toolbar.d.ts +41 -0
  9. package/dist/author/ecr-toolbar.js +100 -0
  10. package/dist/author/index.d.ts +42 -0
  11. package/dist/author/index.js +97 -0
  12. package/dist/author/main.d.ts +38 -0
  13. package/dist/author/main.js +294 -0
  14. package/dist/author/markupUtils.d.ts +14 -0
  15. package/dist/author/markupUtils.js +13 -0
  16. package/dist/author/utils.d.ts +9 -0
  17. package/dist/author/utils.js +7 -0
  18. package/dist/controller/defaults.d.ts +25 -0
  19. package/dist/controller/defaults.js +19 -0
  20. package/dist/controller/index.d.ts +64 -0
  21. package/dist/controller/index.js +142 -0
  22. package/dist/delivery/index.d.ts +20 -0
  23. package/dist/delivery/index.js +66 -0
  24. package/dist/delivery/main.d.ts +48 -0
  25. package/dist/delivery/main.js +117 -0
  26. package/dist/explicit-constructed-response.css +2 -0
  27. package/dist/index.d.ts +1 -0
  28. package/dist/index.iife.d.ts +8 -0
  29. package/dist/index.iife.js +394 -0
  30. package/dist/index.js +2 -0
  31. package/dist/node_modules/.bun/he@1.2.0/node_modules/he/he.js +3993 -0
  32. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
  33. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
  34. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
  35. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
  36. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
  37. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
  38. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
  39. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +11 -0
  40. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
  41. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
  42. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
  43. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
  44. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +12 -0
  45. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
  46. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
  47. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
  48. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +7 -0
  49. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
  50. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayReduce.js +8 -0
  51. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +7 -0
  52. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
  53. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
  54. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
  55. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
  56. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
  57. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
  58. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
  59. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEach.js +6 -0
  60. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseExtremum.js +11 -0
  61. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js +7 -0
  62. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFlatten.js +13 -0
  63. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +5 -0
  64. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseForOwn.js +8 -0
  65. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +10 -0
  66. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
  67. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
  68. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGt.js +6 -0
  69. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +6 -0
  70. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
  71. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +8 -0
  72. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
  73. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
  74. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js +26 -0
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +11 -0
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMap.js +11 -0
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +12 -0
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePick.js +10 -0
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePickBy.js +13 -0
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +8 -0
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +9 -0
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyOf.js +8 -0
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseReduce.js +8 -0
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +9 -0
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js +22 -0
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +14 -0
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +15 -0
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +8 -0
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +6 -0
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +10 -0
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseEach.js +12 -0
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +12 -0
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createFind.js +19 -0
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +35 -0
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +35 -0
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +32 -0
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_escapeHtmlChar.js +11 -0
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_flatRest.js +9 -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/_getMatchData.js +16 -0
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +18 -0
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isFlattenable.js +10 -0
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +12 -0
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +11 -0
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +7 -0
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +9 -0
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +11 -0
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
  163. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
  164. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
  165. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
  166. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
  167. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +13 -0
  168. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
  169. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +7 -0
  170. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +6 -0
  171. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +9 -0
  172. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +6 -0
  173. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +14 -0
  174. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
  175. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
  176. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
  177. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
  178. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
  179. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +10 -0
  180. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +10 -0
  181. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
  182. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +8 -0
  183. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
  184. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +8 -0
  185. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js +50 -0
  186. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +16 -0
  187. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
  188. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/escape.js +9 -0
  189. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/find.js +6 -0
  190. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/findIndex.js +13 -0
  191. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/flatten.js +7 -0
  192. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +8 -0
  193. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +8 -0
  194. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +6 -0
  195. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
  196. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
  197. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
  198. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
  199. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
  200. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +7 -0
  201. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
  202. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
  203. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
  204. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
  205. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
  206. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
  207. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
  208. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
  209. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
  210. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
  211. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js +10 -0
  212. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/max.js +9 -0
  213. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +16 -0
  214. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/now.js +7 -0
  215. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/pick.js +8 -0
  216. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +10 -0
  217. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js +12 -0
  218. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
  219. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
  220. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/throttle.js +15 -0
  221. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toFinite.js +8 -0
  222. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toInteger.js +8 -0
  223. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +19 -0
  224. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +7 -0
  225. package/dist/print/index.d.ts +15 -0
  226. package/dist/print/index.js +40 -0
  227. package/package.json +62 -25
  228. package/CHANGELOG.json +0 -1102
  229. package/CHANGELOG.md +0 -2175
  230. package/LICENSE.md +0 -5
  231. package/README.md +0 -1
  232. package/configure/CHANGELOG.json +0 -652
  233. package/configure/CHANGELOG.md +0 -1917
  234. package/configure/lib/alternateResponses.js +0 -199
  235. package/configure/lib/alternateResponses.js.map +0 -1
  236. package/configure/lib/alternateSection.js +0 -329
  237. package/configure/lib/alternateSection.js.map +0 -1
  238. package/configure/lib/defaults.js +0 -184
  239. package/configure/lib/defaults.js.map +0 -1
  240. package/configure/lib/ecr-toolbar.js +0 -181
  241. package/configure/lib/ecr-toolbar.js.map +0 -1
  242. package/configure/lib/index.js +0 -161
  243. package/configure/lib/index.js.map +0 -1
  244. package/configure/lib/main.js +0 -514
  245. package/configure/lib/main.js.map +0 -1
  246. package/configure/lib/markupUtils.js +0 -70
  247. package/configure/lib/markupUtils.js.map +0 -1
  248. package/configure/lib/utils.js +0 -15
  249. package/configure/lib/utils.js.map +0 -1
  250. package/configure/package.json +0 -22
  251. package/controller/CHANGELOG.json +0 -517
  252. package/controller/CHANGELOG.md +0 -1333
  253. package/controller/lib/defaults.js +0 -23
  254. package/controller/lib/defaults.js.map +0 -1
  255. package/controller/lib/index.js +0 -368
  256. package/controller/lib/index.js.map +0 -1
  257. package/controller/package.json +0 -18
  258. package/docs/config-schema.json +0 -2629
  259. package/docs/config-schema.json.md +0 -1941
  260. package/docs/demo/config.js +0 -8
  261. package/docs/demo/generate.js +0 -20
  262. package/docs/demo/index.html +0 -1
  263. package/docs/demo/session.js +0 -10
  264. package/docs/pie-schema.json +0 -1130
  265. package/docs/pie-schema.json.md +0 -814
  266. package/lib/index.js +0 -91
  267. package/lib/index.js.map +0 -1
  268. package/lib/main.js +0 -205
  269. package/lib/main.js.map +0 -1
  270. package/lib/print.js +0 -71
  271. package/lib/print.js.map +0 -1
  272. package/module/configure.js +0 -1
  273. package/module/controller.js +0 -6534
  274. package/module/demo.js +0 -45
  275. package/module/element.js +0 -1
  276. package/module/index.html +0 -21
  277. package/module/manifest.json +0 -18
  278. package/module/print-demo.js +0 -83
  279. package/module/print.html +0 -18
  280. package/module/print.js +0 -1
@@ -0,0 +1,294 @@
1
+ import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js";
2
+ import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js";
3
+ import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/pick.js";
4
+ import r from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/throttle.js";
5
+ import { decodeHTML as i, getAdjustedLength as a } from "./markupUtils.js";
6
+ import o from "./ecr-toolbar.js";
7
+ import s from "./alternateResponses.js";
8
+ import { generateValidationMessage as c } from "./utils.js";
9
+ import l from "react";
10
+ import u from "prop-types";
11
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
12
+ import { styled as p } from "@mui/material/styles";
13
+ import m, { ALL_PLUGINS as h } from "@pie-lib/editable-html-tip-tap";
14
+ import { InputContainer as g, layout as ee, settings as _ } from "@pie-lib/config-ui";
15
+ import v from "@mui/material/Typography";
16
+ import y from "@mui/icons-material/Info";
17
+ import b from "@mui/material/Tooltip";
18
+ //#region src/author/main.tsx
19
+ var { toggle: x, Panel: te, dropdown: ne } = _, S = p(g)(({ theme: e }) => ({
20
+ width: "100%",
21
+ paddingTop: e.spacing(1),
22
+ marginTop: e.spacing(2),
23
+ marginBottom: e.spacing(2)
24
+ })), C = p(m)(({ theme: e }) => ({
25
+ minHeight: "100px",
26
+ paddingTop: e.spacing(1),
27
+ width: "100%",
28
+ "& [data-slate-editor=\"true\"]": { minHeight: "100px" }
29
+ })), re = p(v)(({ theme: e }) => ({ fontSize: e.typography.fontSize + 2 })), ie = p(b)(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
30
+ fontSize: e.typography.fontSize - 2,
31
+ whiteSpace: "pre",
32
+ maxWidth: "500px"
33
+ } })), w = p("div")(({ theme: e }) => ({
34
+ fontSize: e.typography.fontSize - 2,
35
+ color: e.palette.error.main,
36
+ paddingTop: e.spacing(1)
37
+ })), T = p("div")({
38
+ display: "flex",
39
+ alignItems: "center"
40
+ }), E = p(v)(({ theme: e }) => ({
41
+ fontSize: e.typography.fontSize + 2,
42
+ marginTop: e.spacing(3),
43
+ marginBottom: e.spacing(1)
44
+ })), D = (e) => {
45
+ let t = document.createElement("div");
46
+ return t.innerHTML = e.trim(), t;
47
+ }, O = class extends l.Component {
48
+ static propTypes = {
49
+ configuration: u.object.isRequired,
50
+ model: u.object.isRequired,
51
+ disableSidePanel: u.bool,
52
+ onModelChanged: u.func.isRequired,
53
+ onConfigurationChanged: u.func.isRequired,
54
+ imageSupport: u.shape({
55
+ add: u.func.isRequired,
56
+ delete: u.func.isRequired
57
+ }),
58
+ uploadSoundSupport: u.object
59
+ };
60
+ state = {};
61
+ componentDidMount() {
62
+ let { model: { slateMarkup: e, choices: t, maxLengthPerChoice: n = [] }, onModelChanged: r } = this.props, o = !n.length;
63
+ this.setState({ markup: e }), Object.values(t).forEach((e, t) => {
64
+ let r = e.map((e) => i(e.label || "").length), s = Math.max(...r);
65
+ (o || !n[t] || n[t] < s || n[t] > s + 10) && (n[t] = a(s));
66
+ }), r({ maxLengthPerChoice: n });
67
+ }
68
+ onModelChange = (e) => {
69
+ this.props.onModelChanged({ ...e });
70
+ };
71
+ onPromptChanged = (e) => {
72
+ this.props.onModelChanged({ prompt: e });
73
+ };
74
+ onRationaleChanged = (e) => {
75
+ this.props.onModelChanged({ rationale: e });
76
+ };
77
+ onTeacherInstructionsChanged = (e) => {
78
+ let { onModelChanged: t } = this.props;
79
+ t({ teacherInstructions: e });
80
+ };
81
+ onMarkupChanged = (e) => {
82
+ this.props.onModelChanged({ slateMarkup: e });
83
+ };
84
+ onResponsesChanged = (e) => {
85
+ this.props.onModelChanged({ choices: e });
86
+ };
87
+ onLengthChanged = (e) => {
88
+ let { onModelChanged: t } = this.props;
89
+ t({ maxLengthPerChoice: e });
90
+ };
91
+ onChangeResponse = (e, t) => {
92
+ let { model: n, onModelChanged: r } = this.props, { choices: o } = n, { maxLengthPerChoice: s } = n, c = i(t || "").length;
93
+ if (!o[e] || !o[e].length) {
94
+ o[e] = [{
95
+ label: t || "",
96
+ value: "0"
97
+ }];
98
+ let n = e > s.length ? e - s.length : 0;
99
+ s = [...s, ...Array(n).fill(1)], s.splice(e, 0, a(c));
100
+ } else o[e][0].label = t || "", s && (s[e] < c || s[e] > c + 10) && (s[e] = a(c));
101
+ r({
102
+ choices: o,
103
+ maxLengthPerChoice: s
104
+ });
105
+ };
106
+ onChange = (t) => {
107
+ let { model: { choices: n, maxLengthPerChoice: r }, onModelChanged: i } = this.props, a = D(t), o = a.querySelectorAll("[data-type=\"explicit_constructed_response\"]"), s = {}, c = [];
108
+ o.forEach((t, i) => {
109
+ let a = e(n[t.dataset.index]);
110
+ a && (a[0] = {
111
+ label: t.dataset.value || "",
112
+ value: "0"
113
+ }, c[i] = r[t.dataset.index]), s[i] = a, t.dataset.index = i;
114
+ }), this.setState({ cachedChoices: void 0 }, () => i({
115
+ choices: s,
116
+ slateMarkup: a.innerHTML,
117
+ maxLengthPerChoice: c
118
+ }));
119
+ };
120
+ onHandleAreaChange = r((t) => {
121
+ let { model: { choices: r }, onModelChanged: i } = this.props, { cachedChoices: a } = this.state;
122
+ if (!t) return;
123
+ let o = r ? e(r) : {}, s = a ? e(a) : {};
124
+ t.forEach((e) => {
125
+ let t = e.index;
126
+ !o[t] && s[t] ? (Object.assign(o, n(s, t)), Object.prototype.hasOwnProperty.call(s, t) && delete s[t]) : (Object.assign(s, n(o, t)), Object.prototype.hasOwnProperty.call(o, t) && delete o[t]);
127
+ }), this.setState({ cachedChoices: s }, () => i({ choices: o }));
128
+ }, 500, {
129
+ trailing: !1,
130
+ leading: !0
131
+ });
132
+ render() {
133
+ let { model: e, configuration: n, onConfigurationChanged: r, imageSupport: i, uploadSoundSupport: a } = this.props, { baseInputConfiguration: l = {}, contentDimensions: u = {}, maxImageWidth: p = {}, maxImageHeight: g = {}, maxLengthPerChoice: _ = {}, maxResponseAreas: v, partialScoring: b = {}, playerSpellCheck: D = {}, prompt: O = {}, rationale: k = {}, template: ae = {}, settingsPanelDisabled: oe, spellCheck: A = {}, editSource: j = {}, teacherInstructions: M = {}, withRubric: N = {}, mathMlOptions: P = {}, language: F = {}, languageChoices: I = {}, spanishButton: L = {}, responseAreaInputConfiguration: R = {} } = n || {}, { errors: z, extraCSSRules: B, maxLengthPerChoiceEnabled: V, promptEnabled: H, rationaleEnabled: U, spellCheckEnabled: W, teacherInstructionsEnabled: se, toolbarEditorPosition: ce } = e || {}, { choices: G = {}, prompt: K, rationale: q, responseAreas: J, teacherInstructions: Y } = z || {}, le = c(n), X = p && p.prompt, Z = g && g.prompt, Q = { position: ce === "top" ? "top" : "bottom" }, ue = {
134
+ partialScoring: b.settings && x(b.label),
135
+ maxLengthPerChoiceEnabled: _.settings && x(_.label),
136
+ "language.enabled": F.settings && x(F.label, !0),
137
+ language: F.settings && F.enabled && ne(I.label, I.options),
138
+ "responseAreaInputConfiguration.inputConfiguration.characters.disabled": L.settings && x(L.label, !0)
139
+ }, de = {
140
+ teacherInstructionsEnabled: M.settings && x(M.label),
141
+ rationaleEnabled: k.settings && x(k.label),
142
+ promptEnabled: O.settings && x(O.label),
143
+ spellCheckEnabled: A.settings && x(A.label),
144
+ playerSpellCheckEnabled: D.settings && x(D.label),
145
+ rubricEnabled: N?.settings && x(N?.label),
146
+ "editSource.enabled": j?.settings && x(j.label, !0)
147
+ }, $ = (e = {}) => ({
148
+ ...l,
149
+ ...e
150
+ });
151
+ return /* @__PURE__ */ f(ee.ConfigLayout, {
152
+ extraCSSRules: B,
153
+ dimensions: u,
154
+ hideSettings: oe,
155
+ settings: /* @__PURE__ */ d(te, {
156
+ model: e,
157
+ configuration: n,
158
+ onChangeModel: (e) => this.onModelChange(e),
159
+ onChangeConfiguration: (e) => r(e, !0),
160
+ groups: {
161
+ Settings: ue,
162
+ Properties: de
163
+ }
164
+ }),
165
+ children: [
166
+ se && /* @__PURE__ */ f(S, {
167
+ label: M.label,
168
+ children: [/* @__PURE__ */ d(m, {
169
+ className: "prompt",
170
+ markup: e.teacherInstructions || "",
171
+ onChange: this.onTeacherInstructionsChanged,
172
+ imageSupport: i,
173
+ nonEmpty: !1,
174
+ error: Y,
175
+ toolbarOpts: Q,
176
+ pluginProps: $(M?.inputConfiguration),
177
+ spellCheck: W,
178
+ maxImageWidth: p && p.teacherInstructions || X,
179
+ maxImageHeight: g && g.teacherInstructions || Z,
180
+ uploadSoundSupport: a,
181
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
182
+ mathMlOptions: P,
183
+ autoWidthToolbar: !0
184
+ }), Y && /* @__PURE__ */ d(w, { children: Y })]
185
+ }),
186
+ H && /* @__PURE__ */ f(S, {
187
+ label: O.label,
188
+ children: [/* @__PURE__ */ d(m, {
189
+ className: "prompt",
190
+ markup: e.prompt,
191
+ onChange: this.onPromptChanged,
192
+ imageSupport: i,
193
+ nonEmpty: !1,
194
+ disableUnderline: !0,
195
+ error: K,
196
+ toolbarOpts: Q,
197
+ pluginProps: $(O?.inputConfiguration),
198
+ spellCheck: W,
199
+ maxImageWidth: X,
200
+ maxImageHeight: Z,
201
+ uploadSoundSupport: a,
202
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
203
+ mathMlOptions: P,
204
+ autoWidthToolbar: !0
205
+ }), K && /* @__PURE__ */ d(w, { children: K })]
206
+ }),
207
+ /* @__PURE__ */ f(T, { children: [/* @__PURE__ */ d(re, {
208
+ component: "div",
209
+ children: "Define Template, Choices, and Correct Responses"
210
+ }), /* @__PURE__ */ d(ie, {
211
+ disableFocusListener: !0,
212
+ disableTouchListener: !0,
213
+ placement: "right",
214
+ title: le,
215
+ children: /* @__PURE__ */ d(y, {
216
+ fontSize: "small",
217
+ color: "primary",
218
+ style: { marginLeft: "8px" }
219
+ })
220
+ })] }),
221
+ /* @__PURE__ */ d(C, {
222
+ activePlugins: h,
223
+ toolbarOpts: { position: "top" },
224
+ spellCheck: W,
225
+ pluginProps: $(ae?.inputConfiguration),
226
+ responseAreaProps: {
227
+ type: "explicit-constructed-response",
228
+ options: { duplicates: !0 },
229
+ maxResponseAreas: v,
230
+ respAreaToolbar: (e, t, n) => {
231
+ let [r, i] = e, { model: a } = this.props, s = (a.choices[r.attrs.index] || [])[0];
232
+ return () => /* @__PURE__ */ d(o, {
233
+ onChangeResponse: (e) => this.onChangeResponse(r.attrs.index, e),
234
+ node: r,
235
+ pos: i,
236
+ editor: t,
237
+ onToolbarDone: n,
238
+ correctChoice: s,
239
+ maxLengthPerChoiceEnabled: V,
240
+ pluginProps: $(R?.inputConfiguration)
241
+ });
242
+ },
243
+ error: () => G,
244
+ onHandleAreaChange: this.onHandleAreaChange
245
+ },
246
+ markup: e.slateMarkup,
247
+ onChange: this.onChange,
248
+ imageSupport: i,
249
+ disableImageAlignmentButtons: !0,
250
+ onBlur: this.onBlur,
251
+ disabled: !1,
252
+ highlightShape: !1,
253
+ error: J,
254
+ uploadSoundSupport: a,
255
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
256
+ mathMlOptions: P,
257
+ autoWidthToolbar: !0
258
+ }),
259
+ J && /* @__PURE__ */ d(w, { children: J }),
260
+ !t(e.choices) && /* @__PURE__ */ d(E, { children: `Define Alternates ${V ? "and Character Limits" : ""}` }),
261
+ /* @__PURE__ */ d(s, {
262
+ model: e,
263
+ onChange: this.onResponsesChanged,
264
+ onLengthChange: this.onLengthChanged,
265
+ maxLengthPerChoiceEnabled: V,
266
+ spellCheck: W,
267
+ choicesErrors: G,
268
+ pluginProps: $(R?.inputConfiguration)
269
+ }),
270
+ U && /* @__PURE__ */ f(S, {
271
+ label: k.label,
272
+ children: [/* @__PURE__ */ d(m, {
273
+ className: "prompt",
274
+ markup: e.rationale || "",
275
+ onChange: this.onRationaleChanged,
276
+ imageSupport: i,
277
+ error: q,
278
+ toolbarOpts: Q,
279
+ pluginProps: $(k?.inputConfiguration),
280
+ spellCheck: W,
281
+ maxImageWidth: p && p.rationale || X,
282
+ maxImageHeight: g && g.rationale || Z,
283
+ uploadSoundSupport: a,
284
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
285
+ mathMlOptions: P,
286
+ autoWidthToolbar: !0
287
+ }), q && /* @__PURE__ */ d(w, { children: q })]
288
+ })
289
+ ]
290
+ });
291
+ }
292
+ };
293
+ //#endregion
294
+ export { O as default };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/explicit-constructed-response/configure/src/markupUtils.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 removeUnwantedCharacters: (markup: any) => any;
10
+ export declare const processMarkup: (markup: any) => string;
11
+ export declare const createSlateMarkup: (markup: any, choices: any) => any;
12
+ export declare const getAdjustedLength: (length: any) => any;
13
+ export declare const stripHtmlTags: (markup: any) => string;
14
+ export declare const decodeHTML: (html: any) => string;
@@ -0,0 +1,13 @@
1
+ import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/escape.js";
2
+ //#region src/author/markupUtils.tsx
3
+ var t = "imes|riangle|an|heta|herefore", n = "throot|parallel|cong|approx|eq|e|sim", r = RegExp(`(\\t(?!${t}))|(\\n(?!${n}))|(\\\\t(?!${t}))|(\\\\n(?!${n}))`, "g"), i = (e) => e.replace(r, "").replace(/\\"/g, "\"").replace(/\\\//g, "/"), a = (e = "") => {
4
+ let t = document.createElement("div");
5
+ return t.innerHTML = e.trim(), t;
6
+ }, o = (e) => {
7
+ let t = a(i(e || "") || ""), n = 0;
8
+ return t.querySelectorAll("[data-type=\"explicit_constructed_response\"]").forEach((e) => {
9
+ e.replaceWith(`{{${n++}}}`);
10
+ }), t.innerHTML;
11
+ }, s = /\{\{(\d+)\}\}/g, c = (t, n) => t ? i(t).replace(s, (t, r) => `<span data-type="explicit_constructed_response" data-index="${r}" data-value="${e(n[r][0].label || "")}"></span>`) : "", l = (e) => e <= 2 ? e + 2 : e <= 4 ? e + 3 : e <= 6 ? e + 4 : e + 5, u = (e) => typeof e == "string" ? e.replace(/<\/?[^>]+(>|$)/g, "") : "", d = (e) => new DOMParser().parseFromString(e, "text/html").body.textContent || "";
12
+ //#endregion
13
+ export { c as createSlateMarkup, d as decodeHTML, l as getAdjustedLength, o as processMarkup, u as stripHtmlTags };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/explicit-constructed-response/configure/src/utils.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 generateValidationMessage: (config: any) => string;
@@ -0,0 +1,7 @@
1
+ //#region src/author/utils.ts
2
+ var e = (e) => {
3
+ let { maxResponseAreas: t } = e;
4
+ return "Validation requirements:" + ("\nCorrect answers should not be blank.\nEach answer defined for a response area should be unique.\nThere should be at least 1 " + (t ? `and at most ${t} ` : "") + "response area" + (t ? "s" : "") + " defined.");
5
+ };
6
+ //#endregion
7
+ export { e as generateValidationMessage };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/explicit-constructed-response/controller/src/defaults.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
+ declare const _default: {
10
+ choices: {};
11
+ displayType: string;
12
+ markup: string;
13
+ maxLengthPerChoiceEnabled: boolean;
14
+ playerSpellCheckEnabled: boolean;
15
+ prompt: string;
16
+ promptEnabled: boolean;
17
+ rationale: string;
18
+ rationaleEnabled: boolean;
19
+ spellCheckEnabled: boolean;
20
+ studentInstructionsEnabled: boolean;
21
+ teacherInstructions: string;
22
+ teacherInstructionsEnabled: boolean;
23
+ toolbarEditorPosition: string;
24
+ };
25
+ export default _default;
@@ -0,0 +1,19 @@
1
+ //#region src/controller/defaults.ts
2
+ var e = {
3
+ choices: {},
4
+ displayType: "block",
5
+ markup: "",
6
+ maxLengthPerChoiceEnabled: !0,
7
+ playerSpellCheckEnabled: !0,
8
+ prompt: "",
9
+ promptEnabled: !0,
10
+ rationale: "",
11
+ rationaleEnabled: !0,
12
+ spellCheckEnabled: !0,
13
+ studentInstructionsEnabled: !0,
14
+ teacherInstructions: "",
15
+ teacherInstructionsEnabled: !0,
16
+ toolbarEditorPosition: "bottom"
17
+ };
18
+ //#endregion
19
+ export { e as default };
@@ -0,0 +1,64 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/explicit-constructed-response/controller/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 prepareChoice: (mode: any, defaultFeedback: any) => (choice: any) => {
10
+ label: any;
11
+ value: any;
12
+ };
13
+ export declare const normalize: (question: any) => any;
14
+ /**
15
+ *
16
+ * @param {*} question
17
+ * @param {*} session
18
+ * @param {*} env
19
+ */
20
+ export declare function model(question: any, session: any, env: any): Promise<{
21
+ choices: any;
22
+ disabled: boolean;
23
+ displayType: any;
24
+ mode: any;
25
+ role: any;
26
+ feedback: any;
27
+ language: any;
28
+ markup: any;
29
+ maxLengthPerChoice: any;
30
+ maxLengthPerChoiceEnabled: any;
31
+ note: any;
32
+ playerSpellCheckEnabled: any;
33
+ prompt: any;
34
+ rationale: string;
35
+ responseCorrect: boolean | undefined;
36
+ showNote: boolean;
37
+ teacherInstructions: string;
38
+ responseAreaInputConfiguration: any;
39
+ extraCSSRules: any;
40
+ }>;
41
+ export declare const prepareVal: (html: any) => any;
42
+ export declare const getScore: (config: any, session: any) => number;
43
+ /**
44
+ * Generates detailed trace log for scoring evaluation
45
+ * @param {Object} model - the question model
46
+ * @param {Object} session - the student session
47
+ * @param {Object} env - the environment
48
+ * @returns {Array} traceLog - array of trace messages
49
+ */
50
+ export declare const getLogTrace: (model: any, session: any, env: any) => string[];
51
+ /**
52
+ * The score is partial by default for checkbox mode, allOrNothing for radio mode.
53
+ * To disable partial scoring for checkbox mode you either set model.partialScoring = false or env.partialScoring =
54
+ * false. the value in `env` will override the value in `model`.
55
+ * @param {Object} model - the main model
56
+ * @param {boolean} model.partialScoring - is partial scoring enabled (if undefined set to to true)
57
+ * @param {*} session
58
+ * @param {Object} env
59
+ * @param {boolean} env.partialScoring - is partial scoring enabled (if undefined default to true) This overrides
60
+ * `model.partialScoring`.
61
+ */
62
+ export declare function outcome(model: any, session: any, env?: {}): Promise<unknown>;
63
+ export declare const createCorrectResponseSession: (question: any, env: any) => Promise<unknown>;
64
+ export declare const validate: (model?: {}, config?: {}) => {};
@@ -0,0 +1,142 @@
1
+ import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/find.js";
2
+ import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js";
3
+ import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js";
4
+ import r from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js";
5
+ import { require_he as i } from "../node_modules/.bun/he@1.2.0/node_modules/he/he.js";
6
+ import a from "./defaults.js";
7
+ import o from "@pie-lib/translator";
8
+ import s from "debug";
9
+ import { partialScoring as c } from "@pie-element/shared-controller-utils";
10
+ //#region src/controller/index.ts
11
+ var l = i(), { translator: u } = o, d = s("explicit-constructed-response:controller"), f = (e, t) => (n) => {
12
+ let r = {
13
+ label: n.label,
14
+ value: n.value
15
+ };
16
+ if (e === "evaluate") {
17
+ r.correct = !0;
18
+ let e = n.feedback && n.feedback.type || "none";
19
+ e === "default" ? r.feedback = t.correct : e === "custom" && (r.feedback = n.feedback.value);
20
+ }
21
+ return r;
22
+ }, p = (e) => e ? "correct" : "incorrect", m = (e) => Math.abs(e) === Infinity ? 2 : e <= 2 ? e + 2 : e <= 4 ? e + 3 : e <= 6 ? e + 4 : e + 5, h = (e) => e ? e.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, "\"").replace(/&#x27;|&#39;/g, "'").replace(/&amp;/g, "&") : "", g = (e) => ({
23
+ ...a,
24
+ ...e
25
+ });
26
+ async function _(i, o, s) {
27
+ i.choices && Object.keys(i.choices).forEach((e) => {
28
+ i.choices[e] = (i.choices[e] || []).map((e, t) => e.value ? e : (d("Choice does not contain \"value\" property, which is required.", e), {
29
+ value: `${t}`,
30
+ ...e
31
+ }));
32
+ });
33
+ let c = g(i), l = Object.assign({
34
+ correct: "Correct",
35
+ incorrect: "Incorrect"
36
+ }, c.defaultFeedback), _ = f(s.mode, l), b = r(c.choices, (e, n, r) => (e[r] = t(n, _), e), {}), { value: x = {} } = o || {}, S = s.mode === "evaluate" ? r(c.choices, (t, r, i) => {
37
+ let a = x && x[i];
38
+ return t[i] = p(!n(a) && e(r, (e) => v(e.label) === v(a))), t;
39
+ }, {}) : {}, C = Object.values(b).some((e) => e?.length > 1), w = c.note || u.t("common:commonCorrectAnswerWithAlternates", { lng: c.language }), { maxLengthPerChoice: T = [], maxLengthPerChoiceEnabled: E } = c, D = !T.length;
40
+ Object.values(b).forEach((e, t) => {
41
+ let n = (e || []).map((e) => h(e.label || "").length), r = Math.max(...n);
42
+ (D || !T[t] || T[t] < r || T[t] > r + 10) && (T[t] = m(r));
43
+ });
44
+ let O = {
45
+ choices: b,
46
+ disabled: s.mode !== "gather",
47
+ displayType: c.displayType,
48
+ mode: s.mode,
49
+ role: s.role,
50
+ feedback: S,
51
+ language: c.language,
52
+ markup: c.markup,
53
+ maxLengthPerChoice: T,
54
+ maxLengthPerChoiceEnabled: E,
55
+ note: w,
56
+ playerSpellCheckEnabled: c.playerSpellCheckEnabled,
57
+ prompt: c.promptEnabled ? c.prompt : a.prompt,
58
+ rationale: a.rationale,
59
+ responseCorrect: s.mode === "evaluate" ? y(c, o) === 1 : void 0,
60
+ showNote: C,
61
+ teacherInstructions: a.teacherInstructions,
62
+ responseAreaInputConfiguration: c.responseAreaInputConfiguration,
63
+ extraCSSRules: c.extraCSSRules
64
+ };
65
+ return s.role === "instructor" && (s.mode === "view" || s.mode === "evaluate") && (O.rationale = c.rationaleEnabled ? c.rationale : a.rationale, O.teacherInstructions = c.teacherInstructionsEnabled ? c.teacherInstructions : a.teacherInstructions), O;
66
+ }
67
+ var v = (e) => w(C(e).trim()), y = (t, i) => {
68
+ let { value: a } = i || {};
69
+ if (!i || n(i) || !a) return 0;
70
+ let o = t.markup && t.markup.match(/\{\{(.+?)\}\}/g), s = o ? o.length : 0, c = r(t.choices, (t, r, i) => {
71
+ let o = a && a[i];
72
+ return n(o) || !e(r, (e) => v(e.label) === v(o)) ? t : t + 1;
73
+ }, 0), l = s ? (c / s).toFixed(2) : 0;
74
+ return parseFloat(l);
75
+ }, b = (e, t, r) => {
76
+ let i = [], { value: a } = t || {}, { choices: o, markup: s } = e || {}, l = s ? s.match(/\{\{(.+?)\}\}/g) : [], u = l ? l.length : 0;
77
+ if (i.push(`${u} response area(s) defined in this question.`), a && Object.keys(a).length > 0) {
78
+ let e = Object.entries(a).filter(([e, t]) => t && t.trim()).length;
79
+ i.push(`Student filled ${e} out of ${u} response area(s).`), Object.keys(o || {}).forEach((e) => {
80
+ let t = a && a[e] || "", r = o[e] || [], s = !n(t.trim()) && r.some((e) => v(e.label) === v(t));
81
+ t.trim() ? i.push(`Response area ${parseInt(e) + 1}: ${s ? "CORRECT" : "INCORRECT"}.`) : i.push(`Response area ${parseInt(e) + 1}: left empty.`);
82
+ });
83
+ } else i.push("Student did not fill any response areas.");
84
+ if (Object.values(o || {}).some((e) => e.length > 1) && i.push("Alternate answers are accepted for some response areas."), c.enabled(e, r)) {
85
+ if (i.push("Score calculated using partial scoring."), i.push("Student receives credit for each correctly filled response area."), a && Object.keys(a).length > 0) {
86
+ let e = 0;
87
+ Object.keys(o || {}).forEach((t) => {
88
+ let r = a && a[t] || "", i = o[t] || [];
89
+ !n(r.trim()) && i.some((e) => v(e.label) === v(r)) && e++;
90
+ }), i.push(`Partial scoring: ${e} correct out of ${u} response areas.`);
91
+ }
92
+ } else i.push("Score calculated using all-or-nothing scoring."), i.push("Student must fill all response areas correctly to receive full credit.");
93
+ let d = y(e, t);
94
+ return i.push(`Score: ${d}.`), i;
95
+ };
96
+ function x(e, t, r = {}) {
97
+ return new Promise((i) => {
98
+ if (!t || n(t)) i({
99
+ score: 0,
100
+ empty: !0,
101
+ traceLog: ["Student did not fill any response areas. Score: 0."]
102
+ });
103
+ else {
104
+ let n = b(e, t, r), a = c.enabled(e, r), o = y(e, t);
105
+ i({
106
+ score: a ? o : +(o === 1),
107
+ empty: !1,
108
+ traceLog: n
109
+ });
110
+ }
111
+ });
112
+ }
113
+ var S = (e, t) => new Promise((n) => {
114
+ if (t.mode !== "evaluate" && t.role === "instructor") {
115
+ let { choices: t } = e, r = {};
116
+ Object.keys(t).forEach((e, n) => {
117
+ r[n] = t[e][0].label;
118
+ }), n({
119
+ id: "1",
120
+ value: r
121
+ });
122
+ } else n(null);
123
+ }), C = (e) => typeof e == "string" ? typeof e.replaceAll == "function" ? e.replaceAll(/<[^>]*>/g, "") : e.replace(/<[^>]*>/g, "") : "", w = (e) => (0, l.decode)(e), T = (e) => (e || "").replace(/(<(?!img|iframe|source)([^>]+)>)/gi, ""), E = (e = {}, t = {}) => {
124
+ let { choices: r, markup: i } = e, { maxResponseAreas: a } = t, o = {}, s = {};
125
+ [
126
+ "teacherInstructions",
127
+ "prompt",
128
+ "rationale"
129
+ ].forEach((n) => {
130
+ t[n]?.required && !T(e[n]) && (s[n] = "This field is required.");
131
+ }), Object.entries(r || {}).forEach(([e, t]) => {
132
+ let r = [...t || []].reverse(), i = {};
133
+ r.forEach((e, t) => {
134
+ let { value: n, label: a } = e;
135
+ a === "" || a === "<div></div>" ? i[n] = "Content should not be empty." : r.slice(t + 1).some((e) => e.label === a) && (i[n] = "Content should be unique.");
136
+ }), n(i) || (o[e] = i);
137
+ });
138
+ let c = (i.match(/\{\{(\d+)\}\}/g) || []).length;
139
+ return c > a ? s.responseAreas = `No more than ${a} response areas should be defined.` : c < 1 && (s.responseAreas = "There should be at least 1 response area defined."), n(o) || (s.choices = o), s;
140
+ };
141
+ //#endregion
142
+ export { S as createCorrectResponseSession, b as getLogTrace, y as getScore, _ as model, g as normalize, x as outcome, f as prepareChoice, v as prepareVal, E as validate };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/explicit-constructed-response/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 default class InlineDropdown extends HTMLElement {
10
+ constructor();
11
+ setLangAttribute(): void;
12
+ set model(m: any);
13
+ set session(s: any);
14
+ get session(): any;
15
+ _render: any;
16
+ dispatchChangedEvent: any;
17
+ changeSession: any;
18
+ connectedCallback(): void;
19
+ disconnectedCallback(): void;
20
+ }