@pie-element/placement-ordering 14.1.1-next.0 → 14.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 (289) hide show
  1. package/CHANGELOG.json +1312 -0
  2. package/CHANGELOG.md +2428 -0
  3. package/LICENSE.md +5 -0
  4. package/README.md +57 -0
  5. package/configure/CHANGELOG.json +952 -0
  6. package/configure/CHANGELOG.md +2123 -0
  7. package/configure/lib/choice-editor.js +252 -0
  8. package/configure/lib/choice-editor.js.map +1 -0
  9. package/configure/lib/choice-tile.js +206 -0
  10. package/configure/lib/choice-tile.js.map +1 -0
  11. package/configure/lib/defaults.js +211 -0
  12. package/configure/lib/defaults.js.map +1 -0
  13. package/configure/lib/design.js +427 -0
  14. package/configure/lib/design.js.map +1 -0
  15. package/configure/lib/help.js +14 -0
  16. package/configure/lib/help.js.map +1 -0
  17. package/configure/lib/index.js +159 -0
  18. package/configure/lib/index.js.map +1 -0
  19. package/configure/lib/utils.js +108 -0
  20. package/configure/lib/utils.js.map +1 -0
  21. package/configure/package.json +26 -0
  22. package/controller/CHANGELOG.json +517 -0
  23. package/controller/CHANGELOG.md +1514 -0
  24. package/controller/lib/defaults.js +29 -0
  25. package/controller/lib/defaults.js.map +1 -0
  26. package/controller/lib/index.js +285 -0
  27. package/controller/lib/index.js.map +1 -0
  28. package/controller/lib/scoring.js +109 -0
  29. package/controller/lib/scoring.js.map +1 -0
  30. package/controller/package.json +15 -0
  31. package/docs/config-schema.json +2964 -0
  32. package/docs/config-schema.json.md +2190 -0
  33. package/docs/demo/config.js +8 -0
  34. package/docs/demo/generate.js +50 -0
  35. package/docs/demo/index.html +1 -0
  36. package/docs/demo/session.js +7 -0
  37. package/docs/pie-schema.json +1613 -0
  38. package/docs/pie-schema.json.md +973 -0
  39. package/icon.png +0 -0
  40. package/lib/index.js +124 -0
  41. package/lib/index.js.map +1 -0
  42. package/lib/main.js +32 -0
  43. package/lib/main.js.map +1 -0
  44. package/lib/ordering.js +165 -0
  45. package/lib/ordering.js.map +1 -0
  46. package/lib/placement-ordering.js +419 -0
  47. package/lib/placement-ordering.js.map +1 -0
  48. package/lib/tile.js +259 -0
  49. package/lib/tile.js.map +1 -0
  50. package/lib/tiler.js +165 -0
  51. package/lib/tiler.js.map +1 -0
  52. package/lib/utils.js +18 -0
  53. package/lib/utils.js.map +1 -0
  54. package/package.json +21 -61
  55. package/dist/author/choice-editor.d.ts +0 -39
  56. package/dist/author/choice-editor.js +0 -157
  57. package/dist/author/choice-tile.d.ts +0 -40
  58. package/dist/author/choice-tile.js +0 -132
  59. package/dist/author/defaults.d.ts +0 -213
  60. package/dist/author/defaults.js +0 -159
  61. package/dist/author/design.d.ts +0 -21
  62. package/dist/author/design.js +0 -274
  63. package/dist/author/help.d.ts +0 -11
  64. package/dist/author/index.d.ts +0 -45
  65. package/dist/author/index.js +0 -85
  66. package/dist/author/utils.d.ts +0 -15
  67. package/dist/author/utils.js +0 -62
  68. package/dist/controller/defaults.d.ts +0 -31
  69. package/dist/controller/defaults.js +0 -25
  70. package/dist/controller/index.d.ts +0 -29
  71. package/dist/controller/index.js +0 -128
  72. package/dist/controller/scoring.d.ts +0 -27
  73. package/dist/controller/scoring.js +0 -32
  74. package/dist/delivery/index.d.ts +0 -26
  75. package/dist/delivery/index.js +0 -70
  76. package/dist/delivery/main.d.ts +0 -19
  77. package/dist/delivery/main.js +0 -22
  78. package/dist/delivery/ordering.d.ts +0 -18
  79. package/dist/delivery/ordering.js +0 -96
  80. package/dist/delivery/placement-ordering.d.ts +0 -28
  81. package/dist/delivery/placement-ordering.js +0 -215
  82. package/dist/delivery/tile.d.ts +0 -28
  83. package/dist/delivery/tile.js +0 -165
  84. package/dist/delivery/tiler.d.ts +0 -42
  85. package/dist/delivery/tiler.js +0 -89
  86. package/dist/delivery/utils.d.ts +0 -9
  87. package/dist/delivery/utils.js +0 -8
  88. package/dist/index.d.ts +0 -1
  89. package/dist/index.iife.d.ts +0 -8
  90. package/dist/index.iife.js +0 -152
  91. package/dist/index.js +0 -2
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +0 -11
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +0 -12
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEvery.js +0 -7
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludes.js +0 -7
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludesWith.js +0 -7
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +0 -7
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayReduce.js +0 -8
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayShuffle.js +0 -8
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +0 -7
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseDifference.js +0 -23
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEach.js +0 -6
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEvery.js +0 -10
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js +0 -7
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFlatten.js +0 -13
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +0 -5
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseForOwn.js +0 -8
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +0 -10
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +0 -6
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIndexOf.js +0 -9
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +0 -8
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js +0 -26
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNaN.js +0 -6
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +0 -11
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMap.js +0 -11
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +0 -12
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +0 -8
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +0 -9
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRandom.js +0 -7
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseReduce.js +0 -8
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +0 -9
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +0 -14
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseShuffle.js +0 -8
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +0 -15
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUniq.js +0 -27
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseValues.js +0 -9
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +0 -6
  163. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +0 -10
  164. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  165. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
  166. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
  167. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
  168. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
  169. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  170. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
  171. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
  172. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
  173. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
  174. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
  175. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createAssigner.js +0 -15
  176. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseEach.js +0 -12
  177. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +0 -12
  178. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createSet.js +0 -9
  179. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
  180. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +0 -35
  181. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +0 -35
  182. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +0 -32
  183. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
  184. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
  185. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
  186. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
  187. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js +0 -16
  188. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
  189. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
  190. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
  191. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
  192. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
  193. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
  194. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
  195. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +0 -18
  196. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
  197. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
  198. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
  199. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
  200. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
  201. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
  202. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
  203. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
  204. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isFlattenable.js +0 -10
  205. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
  206. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +0 -12
  207. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +0 -11
  208. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
  209. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
  210. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
  211. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +0 -7
  212. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
  213. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
  214. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
  215. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
  216. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
  217. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
  218. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
  219. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
  220. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
  221. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
  222. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +0 -9
  223. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
  224. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +0 -11
  225. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
  226. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
  227. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
  228. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
  229. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
  230. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
  231. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +0 -13
  232. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
  233. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +0 -7
  234. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +0 -6
  235. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +0 -9
  236. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +0 -6
  237. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +0 -14
  238. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shuffleSelf.js +0 -12
  239. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
  240. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
  241. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
  242. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
  243. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
  244. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_strictIndexOf.js +0 -7
  245. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +0 -10
  246. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +0 -10
  247. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
  248. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/assign.js +0 -16
  249. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
  250. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/compact.js +0 -10
  251. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +0 -8
  252. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +0 -16
  253. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/difference.js +0 -10
  254. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/differenceWith.js +0 -12
  255. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
  256. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/every.js +0 -12
  257. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +0 -8
  258. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +0 -8
  259. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +0 -6
  260. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
  261. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
  262. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
  263. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js +0 -8
  264. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
  265. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
  266. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +0 -7
  267. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
  268. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
  269. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
  270. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
  271. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
  272. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
  273. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +0 -9
  274. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
  275. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
  276. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
  277. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/last.js +0 -7
  278. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js +0 -10
  279. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +0 -16
  280. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/noop.js +0 -4
  281. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +0 -10
  282. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js +0 -12
  283. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/shuffle.js +0 -9
  284. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
  285. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
  286. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +0 -7
  287. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniq.js +0 -7
  288. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqueId.js +0 -9
  289. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/values.js +0 -8
@@ -1,21 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/placement-ordering/configure/src/design.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 Design extends React.Component {
12
- static propTypes: {
13
- uploadSoundSupport: PropTypes.Requireable<object>;
14
- };
15
- static defaultProps: {};
16
- constructor(props: any);
17
- componentDidMount(): void;
18
- onDragEnd: any;
19
- render(): React.JSX.Element;
20
- }
21
- export default Design;
@@ -1,274 +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 "./choice-editor.js";
4
- import { buildTiles as r, generateValidationMessage as i, normalizeIndex as a, updateResponseOrChoices as o } from "./utils.js";
5
- import s from "react";
6
- import c from "debug";
7
- import l from "prop-types";
8
- import { styled as u } from "@mui/material/styles";
9
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
10
- import { DragProvider as p } from "@pie-lib/drag";
11
- import { get as m, set as h } from "nested-property";
12
- import g from "pluralize";
13
- import ee from "@mui/icons-material/Info";
14
- import te from "@mui/material/Tooltip";
15
- import { FeedbackConfig as ne, FormSection as _, InputContainer as v, layout as re, settings as y } from "@pie-lib/config-ui";
16
- import b from "@pie-lib/editable-html-tip-tap";
17
- //#region src/author/design.tsx
18
- var x = c("@pie-element:placement-ordering:design"), { Panel: ie, toggle: S, radio: ae, dropdown: oe } = y, se = (e) => g.isPlural(e) ? {
19
- singularLabel: g.singular(e),
20
- pluralLabel: e
21
- } : {
22
- singularLabel: e,
23
- pluralLabel: g(e)
24
- }, C = u(v)(({ theme: e }) => ({
25
- width: "100%",
26
- paddingTop: e.spacing(2),
27
- marginBottom: e.spacing(2)
28
- })), ce = u("div")({
29
- display: "grid",
30
- gridAutoFlow: "column",
31
- gridAutoColumns: "1fr",
32
- gridGap: "8px"
33
- }), le = u(_)(({ theme: e }) => ({
34
- marginTop: 0,
35
- marginBottom: e.spacing(2.5)
36
- })), ue = u("div")({
37
- display: "inline-flex",
38
- position: "absolute"
39
- }), de = u("div")(({ theme: e }) => ({
40
- fontSize: e.typography.fontSize - 2,
41
- color: e.palette.error.main,
42
- paddingTop: e.spacing(1)
43
- })), w = class extends s.Component {
44
- static propTypes = { uploadSoundSupport: l.object };
45
- static defaultProps = {};
46
- constructor(t) {
47
- super(t), this.applyUpdate = (t) => {
48
- let { model: n, onModelChanged: r } = this.props;
49
- r(t(e(n)));
50
- }, this.changeHandler = (e, t) => (n) => {
51
- x("[changeHandler] value: ", n);
52
- let r = t ? m(n, t) : n;
53
- this.applyUpdate((t) => (h(t, e, r), t));
54
- }, this.onPromptChange = this.changeHandler("prompt"), this.onTeacherInstructionsChange = this.changeHandler("teacherInstructions"), this.onRationaleChange = this.changeHandler("rationale"), this.onChoiceAreaLabelChange = this.changeHandler("choiceLabel", "target.value"), this.onAnswerAreaLabelChange = this.changeHandler("targetLabel", "target.value"), this.onFeedbackChange = this.changeHandler("feedback"), this.onChoiceEditorChange = (t, n) => {
55
- let { model: r, onModelChanged: i } = this.props, a = e(r);
56
- a.choices = t, a.correctResponse = n, i(a);
57
- };
58
- }
59
- componentDidMount() {
60
- let { model: t, onModelChanged: n } = this.props || {}, { feedback: r } = t || {}, i = e(t);
61
- r || (i.feedbackEnabled = !1, n(i));
62
- }
63
- onDragEnd = (e, t) => {
64
- let { active: n, over: r } = e;
65
- if (!r || !n) return;
66
- let i = r.data.current, s = n.data.current, c = t.tiles.find((e) => e.id === s.id && e.type === s.type), l = i, u = {
67
- ...c,
68
- index: a(c, t)
69
- }, d = {
70
- ...l,
71
- index: a(l, t)
72
- }, { response: f, choices: p } = o(t.response, t.choices, u, d);
73
- this.onChoiceEditorChange(p, f);
74
- };
75
- render() {
76
- let { model: e, imageSupport: a, uploadSoundSupport: o, onModelChanged: s, configuration: c, onConfigurationChanged: l } = this.props, { baseInputConfiguration: u = {}, choiceLabel: m = {}, choices: h = {}, contentDimensions: g = {}, feedback: _ = {}, prompt: v = {}, placementArea: y = {}, maxImageWidth: x = {}, maxImageHeight: w = {}, numberedGuides: T = {}, orientation: E = {}, partialScoring: D = {}, rationale: O = {}, removeTilesAfterPlacing: k = {}, settingsPanelDisabled: fe, studentInstructions: A = {}, spellCheck: j = {}, scoringType: M = {}, targetLabel: N = {}, teacherInstructions: P = {}, withRubric: F = {}, mathMlOptions: I = {}, language: L = {}, languageChoices: R = {} } = c || {}, { choiceLabelEnabled: pe, errors: z, extraCSSRules: me, feedbackEnabled: he, promptEnabled: ge, rationaleEnabled: _e, spellCheckEnabled: B, teacherInstructionsEnabled: ve, toolbarEditorPosition: ye, correctResponse: V } = e || {}, { prompt: H, rationale: U, teacherInstructions: W } = z || {}, G = {
77
- choices: e.choices,
78
- response: !V || t(V) ? Array(e.choices.length) : V,
79
- tiles: r(e.choices, V)
80
- }, be = i(), { singularLabel: K = "", pluralLabel: q = "" } = h?.label && se(h.label) || {}, J = x && x.prompt, Y = w && w.prompt, X = x && e.placementArea ? x.choicesWithPlacementArea : x.choicesWithoutPlacementArea || J, Z = w && w.choices || Y, Q = { position: ye === "top" ? "top" : "bottom" }, xe = {
81
- choiceLabelEnabled: m.settings && S(m.label),
82
- placementArea: y.settings && S(y.label),
83
- numberedGuides: T.settings && e.placementArea && S(T.label),
84
- orientation: E.settings && ae(E.label, ["vertical", "horizontal"]),
85
- removeTilesAfterPlacing: k.settings && S(k.label),
86
- partialScoring: D.settings && S(D.label),
87
- feedbackEnabled: _.settings && S(_.label),
88
- "language.enabled": L.settings && S(L.label, !0),
89
- language: L.settings && L.enabled && oe(R.label, R.options)
90
- }, Se = {
91
- teacherInstructionsEnabled: P.settings && S(P.label),
92
- studentInstructionsEnabled: A.settings && S(A.label),
93
- rationaleEnabled: O.settings && S(O.label),
94
- promptEnabled: v.settings && S(v.label),
95
- spellCheckEnabled: j.settings && S(j.label),
96
- scoringType: M.settings && ae(M.label, ["auto", "rubric"]),
97
- rubricEnabled: F?.settings && S(F?.label)
98
- }, $ = (e = {}) => ({
99
- ...u,
100
- ...e
101
- });
102
- return /* @__PURE__ */ d(p, {
103
- onDragEnd: (e) => this.onDragEnd(e, G),
104
- children: /* @__PURE__ */ f(re.ConfigLayout, {
105
- extraCSSRules: me,
106
- dimensions: g,
107
- hideSettings: fe,
108
- settings: /* @__PURE__ */ d(ie, {
109
- model: e,
110
- configuration: c,
111
- onChangeModel: (e) => s(e),
112
- onChangeConfiguration: (e) => l(e, !0),
113
- groups: {
114
- Settings: xe,
115
- Properties: Se
116
- }
117
- }),
118
- children: [
119
- ve && /* @__PURE__ */ f(C, {
120
- label: P.label,
121
- children: [/* @__PURE__ */ d(b, {
122
- className: "prompt",
123
- markup: e.teacherInstructions || "",
124
- onChange: this.onTeacherInstructionsChange,
125
- imageSupport: a,
126
- nonEmpty: !1,
127
- error: W,
128
- toolbarOpts: Q,
129
- pluginProps: $(P?.inputConfiguration),
130
- spellCheck: B,
131
- maxImageWidth: x && x.teacherInstructions || J,
132
- maxImageHeight: w && w.teacherInstructions || Y,
133
- uploadSoundSupport: o,
134
- languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
135
- mathMlOptions: I
136
- }), W && /* @__PURE__ */ d("div", {
137
- className: "errorText",
138
- children: W
139
- })]
140
- }),
141
- ge && /* @__PURE__ */ f(C, {
142
- label: v && v.label,
143
- children: [/* @__PURE__ */ d(b, {
144
- className: "prompt",
145
- markup: e.prompt,
146
- onChange: this.onPromptChange,
147
- imageSupport: a,
148
- error: H,
149
- toolbarOpts: Q,
150
- pluginProps: $(v?.inputConfiguration),
151
- spellCheck: B,
152
- maxImageWidth: x && x.prompt,
153
- maxImageHeight: w && w.prompt,
154
- uploadSoundSupport: o,
155
- languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
156
- mathMlOptions: I
157
- }), H && /* @__PURE__ */ d("div", {
158
- className: "errorText",
159
- children: H
160
- })]
161
- }),
162
- /* @__PURE__ */ f(le, {
163
- label: `Define ${q}`,
164
- labelExtraStyle: { display: "inline-flex" },
165
- children: [
166
- /* @__PURE__ */ d(ue, { children: /* @__PURE__ */ d(te, {
167
- slotProps: { tooltip: { sx: {
168
- fontSize: 14,
169
- whiteSpace: "pre",
170
- maxWidth: "500px"
171
- } } },
172
- disableFocusListener: !0,
173
- disableTouchListener: !0,
174
- placement: "right",
175
- title: be,
176
- children: /* @__PURE__ */ d(ee, {
177
- fontSize: "small",
178
- color: "primary",
179
- style: { marginLeft: "8px" }
180
- })
181
- }) }),
182
- /* @__PURE__ */ f(ce, { children: [pe && /* @__PURE__ */ d(C, {
183
- label: m && m.label && `${K} label`,
184
- children: /* @__PURE__ */ d(b, {
185
- ...e.placementArea && { autoWidthToolbar: !0 },
186
- className: "prompt",
187
- markup: e.choiceLabel,
188
- onChange: this.onChoiceAreaLabelChange,
189
- toolbarOpts: Q,
190
- pluginProps: $(m?.inputConfiguration),
191
- spellCheck: B,
192
- maxImageWidth: X,
193
- maxImageHeight: Z,
194
- uploadSoundSupport: o,
195
- languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
196
- mathMlOptions: I
197
- })
198
- }), N.settings && e.placementArea && /* @__PURE__ */ d(C, {
199
- label: N && N.label && N.label,
200
- children: /* @__PURE__ */ d(b, {
201
- autoWidthToolbar: !0,
202
- className: "prompt",
203
- markup: e.targetLabel,
204
- onChange: this.onAnswerAreaLabelChange,
205
- toolbarOpts: Q,
206
- spellCheck: B,
207
- maxImageWidth: x && x.choicesWithPlacementArea || J,
208
- maxImageHeight: Z,
209
- uploadSoundSupport: o,
210
- languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
211
- mathMlOptions: I
212
- })
213
- })] }),
214
- h.settings && /* @__PURE__ */ d(n, {
215
- correctResponse: V,
216
- choices: e.choices,
217
- onChange: this.onChoiceEditorChange,
218
- imageSupport: a,
219
- toolbarOpts: Q,
220
- pluginProps: $(h?.inputConfiguration),
221
- choicesLabel: h.label,
222
- placementArea: e.placementArea,
223
- singularChoiceLabel: K,
224
- pluralChoiceLabel: q,
225
- spellCheck: B,
226
- maxImageWidth: X,
227
- maxImageHeight: Z,
228
- errors: z || {},
229
- mathMlOptions: I,
230
- ordering: G
231
- })
232
- ]
233
- }),
234
- _e && /* @__PURE__ */ f(C, {
235
- label: O.label,
236
- children: [/* @__PURE__ */ d(b, {
237
- className: "prompt",
238
- markup: e.rationale || "",
239
- onChange: this.onRationaleChange,
240
- imageSupport: a,
241
- error: U,
242
- toolbarOpts: Q,
243
- pluginProps: $(O?.inputConfiguration),
244
- spellCheck: B,
245
- maxImageWidth: x && x.rationale || J,
246
- maxImageHeight: w && w.rationale || Y,
247
- uploadSoundSupport: o,
248
- languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
249
- mathMlOptions: I
250
- }), U && /* @__PURE__ */ d(de, { children: U })]
251
- }),
252
- he && /* @__PURE__ */ d(ne, {
253
- feedback: e.feedback,
254
- onChange: this.onFeedbackChange,
255
- imageSupport: a,
256
- toolbarOpts: Q
257
- })
258
- ]
259
- })
260
- });
261
- }
262
- };
263
- w.defaultProps = {
264
- onModelChanged: () => {},
265
- onConfigurationChanged: () => {}
266
- }, w.propTypes = {
267
- model: l.object.isRequired,
268
- configuration: l.object.isRequired,
269
- onModelChanged: l.func,
270
- onConfigurationChanged: l.func,
271
- imageSupport: l.object
272
- };
273
- //#endregion
274
- export { w as default };
@@ -1,11 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/placement-ordering/configure/src/help.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
- declare const Comp: () => React.JSX.Element;
11
- export default Comp;
@@ -1,45 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/placement-ordering/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 declare const addWeightToCorrectResponse: (correctResponse: any) => any;
10
- /**
11
- * assuming that the correct response will be set via ui, not via config,
12
- * correctResponse (if not set) will be initialized with choices default order
13
- */
14
- export default class PlacementOrdering extends HTMLElement {
15
- static createDefaultModel: (model?: {}) => {
16
- choiceLabel: string;
17
- choiceLabelEnabled: boolean;
18
- choices: never[];
19
- correctResponse: never[];
20
- feedbackEnabled: boolean;
21
- numberedGuides: boolean;
22
- orientation: string;
23
- partialScoring: boolean;
24
- placementArea: boolean;
25
- prompt: string;
26
- promptEnabled: boolean;
27
- rationale: string;
28
- rationaleEnabled: boolean;
29
- removeTilesAfterPlacing: boolean;
30
- scoringType: string;
31
- studentInstructionsEnabled: boolean;
32
- targetLabel: string;
33
- teacherInstructions: string;
34
- teacherInstructionsEnabled: boolean;
35
- toolbarEditorPosition: string;
36
- };
37
- constructor();
38
- dispatchUpdate(reset: any): void;
39
- set model(s: any);
40
- set configuration(c: any);
41
- insertSound(handler: any): void;
42
- onDeleteSound(src: any, done: any): void;
43
- _rerender(): void;
44
- disconnectedCallback(): void;
45
- }
@@ -1,85 +0,0 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js";
2
- import t from "./design.js";
3
- import n from "./defaults.js";
4
- import r from "react";
5
- import { createRoot as i } from "react-dom/client";
6
- import { DeleteImageEvent as a, DeleteSoundEvent as o, InsertImageEvent as s, InsertSoundEvent as c, ModelUpdatedEvent as l } from "@pie-element/shared-configure-events";
7
- //#region src/author/index.ts
8
- var u = (t, r) => ({
9
- configuration: e(t, n.configuration),
10
- model: r
11
- }), d = (e) => e && e.map((e) => e.weight === void 0 ? {
12
- id: e.id || e,
13
- weight: 0
14
- } : {
15
- id: e.id,
16
- weight: e.weight
17
- }), f = class e extends HTMLElement {
18
- static createDefaultModel = (e = {}) => {
19
- let t = d(e.correctResponse) || ((e) => e && e.map((e) => ({
20
- id: e.id,
21
- weight: 0
22
- })))(e.choices), r = {
23
- ...n.model,
24
- ...e
25
- };
26
- return t && (r.correctResponse = t), r;
27
- };
28
- constructor() {
29
- super(), this._root = null, this._model = e.createDefaultModel(), this._configuration = n.configuration, this.onModelChanged = (e, t) => {
30
- this._model = e, this._rerender(), this.dispatchUpdate(t);
31
- }, this.onConfigurationChanged = (e) => {
32
- this._configuration = u(e).configuration, this.onModelChanged(this._model), this._rerender();
33
- }, this.insertImage = (e) => {
34
- this.dispatchEvent(new s(e));
35
- }, this.deleteImage = (e, t) => {
36
- this.dispatchEvent(new a(e, t));
37
- };
38
- }
39
- dispatchUpdate(e) {
40
- this.dispatchEvent(new l(this._model, e));
41
- }
42
- set model(t) {
43
- this._model = e.createDefaultModel(t), this._rerender();
44
- }
45
- set configuration(e) {
46
- let t = u(e, this._model);
47
- this.onModelChanged(t.model);
48
- let r = {
49
- ...n.configuration,
50
- ...t.configuration
51
- };
52
- this._configuration = r, r?.language?.enabled ? r?.languageChoices?.options?.length && (this._model.language = r?.languageChoices.options[0].value) : r.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({
53
- value: this._model.language,
54
- label: this._model.language
55
- })) : delete this._model.language, this._rerender();
56
- }
57
- insertSound(e) {
58
- this.dispatchEvent(new c(e));
59
- }
60
- onDeleteSound(e, t) {
61
- this.dispatchEvent(new o(e, t));
62
- }
63
- _rerender() {
64
- let e = r.createElement(t, {
65
- model: this._model,
66
- configuration: this._configuration,
67
- onModelChanged: this.onModelChanged,
68
- onConfigurationChanged: this.onConfigurationChanged,
69
- imageSupport: {
70
- add: this.insertImage,
71
- delete: this.deleteImage
72
- },
73
- uploadSoundSupport: {
74
- add: this.insertSound.bind(this),
75
- delete: this.onDeleteSound.bind(this)
76
- }
77
- });
78
- this._root ||= i(this), this._root.render(e);
79
- }
80
- disconnectedCallback() {
81
- this._root && this._root.unmount();
82
- }
83
- };
84
- //#endregion
85
- export { d as addWeightToCorrectResponse, f as default };
@@ -1,15 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/placement-ordering/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: () => string;
10
- export declare function normalizeIndex(tile: any, ordering: any): any;
11
- export declare function updateResponseOrChoices(response: any, choices: any, from: any, to: any): {
12
- response: any;
13
- choices: any;
14
- };
15
- export declare function buildTiles(choices: any, response: any): any;
@@ -1,62 +0,0 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js";
2
- //#region src/author/utils.ts
3
- var t = () => "Validation requirements:\nThere should be at least 3 tokens.\nThe tokens should not be empty and should be unique.\nThe correct ordering should not be identical to the initial ordering.";
4
- function n(e, t) {
5
- return e.type === "target" ? t.response.findIndex((t) => t.id === e.id) : e.type === "choice" ? t.choices.findIndex((t) => t.id === e.id) : -1;
6
- }
7
- function r(t, n, r, i) {
8
- let { type: a, index: o } = r, { type: s, index: c } = i;
9
- if (a === "target" && s === "target") {
10
- let { movedItem: r, remainingItems: i } = (e(t) || []).reduce((e, t, n) => (n === o ? e.movedItem = t : e.remainingItems.push(t), e), {
11
- movedItem: null,
12
- remainingItems: []
13
- });
14
- return {
15
- response: [
16
- ...i.slice(0, c),
17
- r,
18
- ...i.slice(c)
19
- ],
20
- choices: n
21
- };
22
- }
23
- if (a === "choice" && s === "choice") {
24
- let { movedItem: a, remainingItems: o, toIndex: s } = (e(n) || []).reduce((e, t, n) => (t.id === r.id ? e.movedItem = t : e.remainingItems.push(t), t.id === i.id && (e.toIndex = n), e), {
25
- movedItem: null,
26
- remainingItems: [],
27
- toIndex: null
28
- });
29
- return {
30
- response: t,
31
- choices: [
32
- ...o.slice(0, s),
33
- a,
34
- ...o.slice(s)
35
- ]
36
- };
37
- }
38
- return {
39
- response: t,
40
- choices: n
41
- };
42
- }
43
- function i(e, t) {
44
- let n = t.map((t, n) => {
45
- let r = t && t.id;
46
- return {
47
- type: "target",
48
- ...e.find((e) => r != null && e.id === r),
49
- draggable: !0,
50
- index: n,
51
- editable: !1
52
- };
53
- });
54
- return e.map((e) => Object.assign({}, e, {
55
- type: "choice",
56
- droppable: !1,
57
- draggable: !0,
58
- editable: !0
59
- })).concat(n);
60
- }
61
- //#endregion
62
- export { i as buildTiles, t as generateValidationMessage, n as normalizeIndex, r as updateResponseOrChoices };
@@ -1,31 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/placement-ordering/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
- choiceLabel: string;
11
- choiceLabelEnabled: boolean;
12
- choices: never[];
13
- correctResponse: never[];
14
- feedbackEnabled: boolean;
15
- numberedGuides: boolean;
16
- orientation: string;
17
- partialScoring: boolean;
18
- placementArea: boolean;
19
- prompt: string;
20
- promptEnabled: boolean;
21
- rationale: string;
22
- rationaleEnabled: boolean;
23
- removeTilesAfterPlacing: boolean;
24
- scoringType: string;
25
- studentInstructionsEnabled: boolean;
26
- targetLabel: string;
27
- teacherInstructions: string;
28
- teacherInstructionsEnabled: boolean;
29
- toolbarEditorPosition: string;
30
- };
31
- export default _default;
@@ -1,25 +0,0 @@
1
- //#region src/controller/defaults.ts
2
- var e = {
3
- choiceLabel: "",
4
- choiceLabelEnabled: !0,
5
- choices: [],
6
- correctResponse: [],
7
- feedbackEnabled: !1,
8
- numberedGuides: !1,
9
- orientation: "vertical",
10
- partialScoring: !0,
11
- placementArea: !1,
12
- prompt: "",
13
- promptEnabled: !0,
14
- rationale: "",
15
- rationaleEnabled: !0,
16
- removeTilesAfterPlacing: !0,
17
- scoringType: "auto",
18
- studentInstructionsEnabled: !0,
19
- targetLabel: "",
20
- teacherInstructions: "",
21
- teacherInstructionsEnabled: !0,
22
- toolbarEditorPosition: "bottom"
23
- };
24
- //#endregion
25
- export { e as default };
@@ -1,29 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/placement-ordering/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 questionError: () => Error;
10
- /**
11
- * Generates detailed trace log for placement-ordering scoring evaluation
12
- * @param {Object} question - the question model
13
- * @param {Object} session - the student session
14
- * @param {Object} env - the environment
15
- * @returns {Array<string>} traceLog
16
- */
17
- export declare const getLogTrace: (question: any, session: any, env: any) => string[];
18
- export declare function outcome(question: any, session: any, env: any): Promise<unknown>;
19
- export declare function createDefaultModel(model?: {}): Promise<unknown>;
20
- export declare const normalize: (question: any) => any;
21
- /**
22
- *
23
- * @param {*} question
24
- * @param {*} session
25
- * @param {*} env
26
- */
27
- export declare function model(question: any, session: any, env: any): Promise<{}>;
28
- export declare const createCorrectResponseSession: (question: any, env: any) => Promise<unknown>;
29
- export declare const validate: (model?: {}, config?: {}) => {};