@pie-element/explicit-constructed-response 11.1.1-next.0 → 11.1.1-next.101

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/CHANGELOG.json +1102 -0
  2. package/CHANGELOG.md +2183 -0
  3. package/LICENSE.md +5 -0
  4. package/README.md +1 -0
  5. package/configure/CHANGELOG.json +652 -0
  6. package/configure/CHANGELOG.md +1924 -0
  7. package/configure/lib/alternateResponses.js +199 -0
  8. package/configure/lib/alternateResponses.js.map +1 -0
  9. package/configure/lib/alternateSection.js +329 -0
  10. package/configure/lib/alternateSection.js.map +1 -0
  11. package/configure/lib/defaults.js +184 -0
  12. package/configure/lib/defaults.js.map +1 -0
  13. package/configure/lib/ecr-toolbar.js +181 -0
  14. package/configure/lib/ecr-toolbar.js.map +1 -0
  15. package/configure/lib/index.js +165 -0
  16. package/configure/lib/index.js.map +1 -0
  17. package/configure/lib/main.js +501 -0
  18. package/configure/lib/main.js.map +1 -0
  19. package/configure/lib/markupUtils.js +70 -0
  20. package/configure/lib/markupUtils.js.map +1 -0
  21. package/configure/lib/utils.js +15 -0
  22. package/configure/lib/utils.js.map +1 -0
  23. package/configure/package.json +22 -0
  24. package/controller/CHANGELOG.json +517 -0
  25. package/controller/CHANGELOG.md +1340 -0
  26. package/controller/lib/defaults.js +23 -0
  27. package/controller/lib/defaults.js.map +1 -0
  28. package/controller/lib/index.js +368 -0
  29. package/controller/lib/index.js.map +1 -0
  30. package/controller/package.json +18 -0
  31. package/docs/config-schema.json +2629 -0
  32. package/docs/config-schema.json.md +1941 -0
  33. package/docs/demo/config.js +8 -0
  34. package/docs/demo/generate.js +20 -0
  35. package/docs/demo/index.html +1 -0
  36. package/docs/demo/session.js +10 -0
  37. package/docs/pie-schema.json +1130 -0
  38. package/docs/pie-schema.json.md +814 -0
  39. package/lib/index.js +92 -0
  40. package/lib/index.js.map +1 -0
  41. package/lib/main.js +205 -0
  42. package/lib/main.js.map +1 -0
  43. package/lib/print.js +71 -0
  44. package/lib/print.js.map +1 -0
  45. package/module/configure.js +1 -0
  46. package/module/controller.js +6534 -0
  47. package/module/demo.js +45 -0
  48. package/module/element.js +1 -0
  49. package/module/index.html +21 -0
  50. package/module/manifest.json +18 -0
  51. package/module/print-demo.js +83 -0
  52. package/module/print.html +18 -0
  53. package/module/print.js +1 -0
  54. package/package.json +23 -60
  55. package/dist/_virtual/_rolldown/runtime.js +0 -4
  56. package/dist/author/alternateResponses.d.ts +0 -34
  57. package/dist/author/alternateResponses.js +0 -116
  58. package/dist/author/alternateSection.d.ts +0 -58
  59. package/dist/author/alternateSection.js +0 -215
  60. package/dist/author/defaults.d.ts +0 -186
  61. package/dist/author/defaults.js +0 -128
  62. package/dist/author/ecr-toolbar.d.ts +0 -41
  63. package/dist/author/ecr-toolbar.js +0 -100
  64. package/dist/author/index.d.ts +0 -42
  65. package/dist/author/index.js +0 -97
  66. package/dist/author/main.d.ts +0 -38
  67. package/dist/author/main.js +0 -294
  68. package/dist/author/markupUtils.d.ts +0 -14
  69. package/dist/author/markupUtils.js +0 -13
  70. package/dist/author/utils.d.ts +0 -9
  71. package/dist/author/utils.js +0 -7
  72. package/dist/controller/defaults.d.ts +0 -25
  73. package/dist/controller/defaults.js +0 -19
  74. package/dist/controller/index.d.ts +0 -64
  75. package/dist/controller/index.js +0 -142
  76. package/dist/delivery/index.d.ts +0 -20
  77. package/dist/delivery/index.js +0 -66
  78. package/dist/delivery/main.d.ts +0 -48
  79. package/dist/delivery/main.js +0 -117
  80. package/dist/explicit-constructed-response.css +0 -2
  81. package/dist/index.d.ts +0 -1
  82. package/dist/index.iife.d.ts +0 -8
  83. package/dist/index.iife.js +0 -394
  84. package/dist/index.js +0 -2
  85. package/dist/node_modules/.bun/he@1.2.0/node_modules/he/he.js +0 -3993
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +0 -11
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +0 -12
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +0 -7
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayReduce.js +0 -8
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +0 -7
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEach.js +0 -6
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseExtremum.js +0 -11
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js +0 -7
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFlatten.js +0 -13
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +0 -5
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseForOwn.js +0 -8
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +0 -10
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGt.js +0 -6
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +0 -6
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +0 -8
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js +0 -26
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +0 -11
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMap.js +0 -11
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +0 -12
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePick.js +0 -10
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePickBy.js +0 -13
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +0 -8
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +0 -9
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyOf.js +0 -8
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseReduce.js +0 -8
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +0 -9
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js +0 -22
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +0 -14
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +0 -15
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +0 -8
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +0 -6
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +0 -10
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
  163. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
  164. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseEach.js +0 -12
  165. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +0 -12
  166. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createFind.js +0 -19
  167. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
  168. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +0 -35
  169. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +0 -35
  170. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +0 -32
  171. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_escapeHtmlChar.js +0 -11
  172. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_flatRest.js +0 -9
  173. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
  174. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
  175. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
  176. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
  177. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js +0 -16
  178. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
  179. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
  180. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
  181. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
  182. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
  183. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
  184. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
  185. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +0 -18
  186. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
  187. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
  188. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
  189. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
  190. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
  191. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
  192. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
  193. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
  194. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isFlattenable.js +0 -10
  195. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
  196. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +0 -12
  197. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +0 -11
  198. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
  199. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
  200. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
  201. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +0 -7
  202. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
  203. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
  204. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
  205. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
  206. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
  207. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
  208. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
  209. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
  210. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
  211. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
  212. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +0 -9
  213. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
  214. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +0 -11
  215. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
  216. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
  217. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
  218. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
  219. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
  220. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
  221. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +0 -13
  222. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
  223. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +0 -7
  224. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +0 -6
  225. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +0 -9
  226. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +0 -6
  227. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +0 -14
  228. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
  229. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
  230. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
  231. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
  232. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
  233. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +0 -10
  234. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +0 -10
  235. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
  236. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +0 -8
  237. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
  238. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +0 -8
  239. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js +0 -50
  240. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +0 -16
  241. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
  242. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/escape.js +0 -9
  243. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/find.js +0 -6
  244. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/findIndex.js +0 -13
  245. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/flatten.js +0 -7
  246. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +0 -8
  247. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +0 -8
  248. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +0 -6
  249. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
  250. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
  251. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
  252. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
  253. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
  254. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +0 -7
  255. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
  256. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
  257. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
  258. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
  259. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
  260. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
  261. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +0 -9
  262. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
  263. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
  264. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
  265. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js +0 -10
  266. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/max.js +0 -9
  267. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +0 -16
  268. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/now.js +0 -7
  269. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/pick.js +0 -8
  270. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +0 -10
  271. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js +0 -12
  272. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
  273. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
  274. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/throttle.js +0 -15
  275. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toFinite.js +0 -8
  276. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toInteger.js +0 -8
  277. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +0 -19
  278. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +0 -7
  279. package/dist/print/index.d.ts +0 -15
  280. package/dist/print/index.js +0 -40
@@ -1,41 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/explicit-constructed-response/configure/src/ecr-toolbar.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 ECRToolbar extends React.Component {
12
- static propTypes: {
13
- correctChoice: PropTypes.Requireable<object>;
14
- node: PropTypes.Requireable<object>;
15
- pos: PropTypes.Requireable<number>;
16
- onDone: PropTypes.Requireable<(...args: any[]) => any>;
17
- onChangeResponse: PropTypes.Validator<(...args: any[]) => any>;
18
- onToolbarDone: PropTypes.Validator<(...args: any[]) => any>;
19
- value: PropTypes.Requireable<PropTypes.InferProps<{
20
- change: PropTypes.Validator<(...args: any[]) => any>;
21
- document: PropTypes.Requireable<PropTypes.InferProps<{
22
- getNextText: PropTypes.Validator<(...args: any[]) => any>;
23
- }>>;
24
- }>>;
25
- editor: PropTypes.Requireable<object>;
26
- maxLengthPerChoiceEnabled: PropTypes.Requireable<boolean>;
27
- pluginProps: PropTypes.Requireable<object>;
28
- spellCheck: PropTypes.Requireable<boolean>;
29
- };
30
- state: {
31
- markup: string;
32
- toolbarStyle: {};
33
- };
34
- componentDidMount(): void;
35
- onDone: any;
36
- onRespAreaChange: any;
37
- onKeyDown: any;
38
- onBlur: any;
39
- render(): React.JSX.Element;
40
- }
41
- export default ECRToolbar;
@@ -1,100 +0,0 @@
1
- import { stripHtmlTags as e } from "./markupUtils.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 "@pie-lib/editable-html-tip-tap";
7
- //#region src/author/ecr-toolbar.tsx
8
- var o = i(a)(({ theme: e }) => ({
9
- backgroundColor: e.palette.common.white,
10
- outline: "none",
11
- lineHeight: "15px"
12
- })), s = class extends t.Component {
13
- static propTypes = {
14
- correctChoice: n.object,
15
- node: n.object,
16
- pos: n.number,
17
- onDone: n.func,
18
- onChangeResponse: n.func.isRequired,
19
- onToolbarDone: n.func.isRequired,
20
- value: n.shape({
21
- change: n.func.isRequired,
22
- document: n.shape({ getNextText: n.func.isRequired })
23
- }),
24
- editor: n.object,
25
- maxLengthPerChoiceEnabled: n.bool,
26
- pluginProps: n.object,
27
- spellCheck: n.bool
28
- };
29
- state = {
30
- markup: "",
31
- toolbarStyle: {}
32
- };
33
- componentDidMount() {
34
- let { correctChoice: e, node: t, editor: n } = this.props, r = e || {}, i = n.view.nodeDOM(n.state.selection.from);
35
- if (i?.nodeType === 1) {
36
- let e = i.getBoundingClientRect(), t = i.closest(".tiptap").getBoundingClientRect();
37
- e.top - t.top, e.left - t.left, this.setState({
38
- markup: r.label,
39
- toolbarStyle: {
40
- position: "absolute",
41
- top: 0,
42
- left: 0,
43
- width: `${e.width - 4}px`
44
- }
45
- });
46
- }
47
- }
48
- onDone = (t) => {
49
- let { editor: n, node: r, onToolbarDone: i, onChangeResponse: a, pos: o } = this.props, s = e(t);
50
- this.setState({ markup: s });
51
- let { tr: c } = n.state, l = c.doc.nodeAt(o);
52
- if (!l || l.isText || !l.isAtom || !l.isInline) return !1;
53
- c.setNodeMarkup(o, void 0, {
54
- ...r.attrs,
55
- value: s
56
- }), n.view.dispatch(c), i(!0), a(s);
57
- };
58
- onRespAreaChange = (e) => {
59
- this.setState({ respAreaMarkup: e });
60
- };
61
- onKeyDown = (e) => e.key === "Enter";
62
- onBlur = () => {
63
- this.clickedInside &&= !1;
64
- };
65
- render() {
66
- let { maxLengthPerChoiceEnabled: e, pluginProps: t, spellCheck: n } = this.props, { markup: i, toolbarStyle: a } = this.state, s = e ? {} : { maxLength: 25 };
67
- return /* @__PURE__ */ r("div", {
68
- style: a,
69
- children: /* @__PURE__ */ r(o, {
70
- autoFocus: !0,
71
- disableUnderline: !0,
72
- onChange: (e) => {
73
- this.preventDone || this.onRespAreaChange(e);
74
- },
75
- onDone: (e) => {
76
- this.preventDone || this.onDone(e);
77
- },
78
- onBlur: (e) => {
79
- this.preventDone = e.relatedTarget && e.relatedTarget.closest(".insert-character-dialog"), this.onBlur(e);
80
- },
81
- onKeyDown: this.onKeyDown,
82
- markup: i || "",
83
- activePlugins: ["languageCharacters"],
84
- pluginProps: t,
85
- languageCharactersProps: [{ language: "spanish" }],
86
- minHeight: "15px",
87
- maxHeight: "15px",
88
- spellCheck: n,
89
- autoWidthToolbar: !0,
90
- toolbarOpts: {
91
- minWidth: "auto",
92
- isHidden: !!t?.characters?.disabled
93
- },
94
- ...s
95
- })
96
- });
97
- }
98
- };
99
- //#endregion
100
- export { s as default };
@@ -1,42 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/explicit-constructed-response/configure/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 ExplicitConstructedResponse extends HTMLElement {
10
- static prepareModel: (model?: {}) => {
11
- slateMarkup: any;
12
- markup: string;
13
- choices: {};
14
- displayType: string;
15
- maxLengthPerChoiceEnabled: boolean;
16
- playerSpellCheckEnabled: boolean;
17
- prompt: string;
18
- promptEnabled: boolean;
19
- rationale: string;
20
- rationaleEnabled: boolean;
21
- spellCheckEnabled: boolean;
22
- studentInstructionsEnabled: boolean;
23
- teacherInstructions: string;
24
- teacherInstructionsEnabled: boolean;
25
- toolbarEditorPosition: string;
26
- responseAreaInputConfiguration: {};
27
- };
28
- constructor();
29
- set model(s: any);
30
- set configuration(c: any);
31
- set disableSidePanel(s: any);
32
- dispatchModelUpdated(reset: any): void;
33
- onModelChanged: any;
34
- onConfigurationChanged: any;
35
- /** @param {done, progress, file} handler */
36
- insertImage(handler: any): void;
37
- onDeleteImage(src: any, done: any): void;
38
- insertSound(handler: any): void;
39
- onDeleteSound(src: any, done: any): void;
40
- _render(): void;
41
- disconnectedCallback(): void;
42
- }
@@ -1,97 +0,0 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js";
2
- import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js";
3
- import { createSlateMarkup as n, processMarkup as r } from "./markupUtils.js";
4
- import i from "./main.js";
5
- import a from "./defaults.js";
6
- import o from "react";
7
- import { createRoot as s } from "react-dom/client";
8
- import c from "debug";
9
- import { DeleteImageEvent as l, DeleteSoundEvent as u, InsertImageEvent as d, InsertSoundEvent as f, ModelUpdatedEvent as p } from "@pie-element/shared-configure-events";
10
- //#region src/author/index.ts
11
- var m = c("explicit-constructed-response:configure"), h = class c extends HTMLElement {
12
- static prepareModel = (t = {}) => {
13
- let i = {
14
- ...a.model,
15
- ...t
16
- }, o = i.slateMarkup || n(i.markup, i.choices), s = r(o);
17
- return i.choices && Object.keys(i.choices).forEach((t) => {
18
- e(i.choices[t]) && (i.choices[t] = (i.choices[t] || []).map((e, t) => e.value ? e : (m("Choice does not contain \"value\" property, which is required.", e), {
19
- value: `${t}`,
20
- ...e
21
- })));
22
- }), {
23
- ...i,
24
- slateMarkup: o,
25
- markup: s
26
- };
27
- };
28
- constructor() {
29
- super(), this._root = null, this._model = c.prepareModel(), this._configuration = a.configuration;
30
- }
31
- set model(e) {
32
- this._model = c.prepareModel(e), this._model.responseAreaInputConfiguration && (this._model.responseAreaInputConfiguration = this._configuration.responseAreaInputConfiguration?.inputConfiguration), this._render();
33
- }
34
- set configuration(e) {
35
- this._configuration = t(e, a.configuration), e.language?.enabled ? e.languageChoices?.options?.length && (this._model.language = e.languageChoices.options[0].value) : e.language.settings && this._model.language ? (this._configuration.language.enabled = !0, (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) && (this._configuration.languageChoices.options = []), this._configuration.languageChoices.options.find((e) => e.value === this._model.language) || this._configuration.languageChoices.options.push({
36
- value: this._model.language,
37
- label: this._model.language
38
- })) : delete this._model.language, this._render();
39
- }
40
- set disableSidePanel(e) {
41
- this._disableSidePanel = e, this._render();
42
- }
43
- dispatchModelUpdated(e) {
44
- let t = !!e;
45
- this.dispatchEvent(new p(this._model, t));
46
- }
47
- onModelChanged = (e, t) => {
48
- this._model = c.prepareModel({
49
- ...this._model,
50
- ...e
51
- }), this._render(), this.dispatchModelUpdated(t);
52
- };
53
- onConfigurationChanged = (e) => {
54
- this._configuration = e;
55
- let t = this._configuration?.responseAreaInputConfiguration?.inputConfiguration;
56
- this._model = {
57
- ...this._model,
58
- responseAreaInputConfiguration: t
59
- }, this.onModelChanged(this._model);
60
- };
61
- insertImage(e) {
62
- this.dispatchEvent(new d(e));
63
- }
64
- onDeleteImage(e, t) {
65
- this.dispatchEvent(new l(e, t));
66
- }
67
- insertSound(e) {
68
- this.dispatchEvent(new f(e));
69
- }
70
- onDeleteSound(e, t) {
71
- this.dispatchEvent(new u(e, t));
72
- }
73
- _render() {
74
- m("_render");
75
- let e = o.createElement(i, {
76
- model: this._model,
77
- configuration: this._configuration,
78
- onModelChanged: this.onModelChanged,
79
- onConfigurationChanged: this.onConfigurationChanged,
80
- disableSidePanel: this._disableSidePanel,
81
- imageSupport: {
82
- add: this.insertImage.bind(this),
83
- delete: this.onDeleteImage.bind(this)
84
- },
85
- uploadSoundSupport: {
86
- add: this.insertSound.bind(this),
87
- delete: this.onDeleteSound.bind(this)
88
- }
89
- });
90
- this._root ||= s(this), this._root.render(e);
91
- }
92
- disconnectedCallback() {
93
- this._root && this._root.unmount();
94
- }
95
- };
96
- //#endregion
97
- export { h as default };
@@ -1,38 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/explicit-constructed-response/configure/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
- export declare class Main extends React.Component {
12
- static propTypes: {
13
- configuration: PropTypes.Validator<object>;
14
- model: PropTypes.Validator<object>;
15
- disableSidePanel: PropTypes.Requireable<boolean>;
16
- onModelChanged: PropTypes.Validator<(...args: any[]) => any>;
17
- onConfigurationChanged: PropTypes.Validator<(...args: any[]) => any>;
18
- imageSupport: PropTypes.Requireable<PropTypes.InferProps<{
19
- add: PropTypes.Validator<(...args: any[]) => any>;
20
- delete: PropTypes.Validator<(...args: any[]) => any>;
21
- }>>;
22
- uploadSoundSupport: PropTypes.Requireable<object>;
23
- };
24
- state: {};
25
- componentDidMount(): void;
26
- onModelChange: any;
27
- onPromptChanged: any;
28
- onRationaleChanged: any;
29
- onTeacherInstructionsChanged: any;
30
- onMarkupChanged: any;
31
- onResponsesChanged: any;
32
- onLengthChanged: any;
33
- onChangeResponse: any;
34
- onChange: any;
35
- onHandleAreaChange: any;
36
- render(): React.JSX.Element;
37
- }
38
- export default Main;
@@ -1,294 +0,0 @@
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 };
@@ -1,14 +0,0 @@
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;
@@ -1,13 +0,0 @@
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 };
@@ -1,9 +0,0 @@
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;
@@ -1,7 +0,0 @@
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 };