@pie-element/placement-ordering 14.1.2-next.0 → 14.1.2-next.10

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 (239) hide show
  1. package/dist/author/choice-editor.js +16 -17
  2. package/dist/author/choice-tile.js +3 -2
  3. package/dist/author/design.js +50 -51
  4. package/dist/author/index.d.ts +1 -0
  5. package/dist/author/index.js +25 -22
  6. package/dist/author/utils.js +1 -1
  7. package/dist/browser/author/index.js +23612 -21053
  8. package/dist/browser/author/index.js.map +1 -1
  9. package/dist/browser/browser-Bd36Xf5z.js +376 -0
  10. package/dist/browser/browser-Bd36Xf5z.js.map +1 -0
  11. package/dist/browser/controller/index.js +87 -164
  12. package/dist/browser/controller/index.js.map +1 -1
  13. package/dist/browser/delivery/index.js +476 -336
  14. package/dist/browser/delivery/index.js.map +1 -1
  15. package/dist/browser/{dist-BTHiIs74.js → dist-DiGNNRzu.js} +354 -538
  16. package/dist/browser/dist-DiGNNRzu.js.map +1 -0
  17. package/dist/browser/{drag-provider-DaPxkh4j.js → drag-provider-B5wazJHM.js} +3284 -3615
  18. package/dist/browser/drag-provider-B5wazJHM.js.map +1 -0
  19. package/dist/controller/index.js +44 -49
  20. package/dist/controller/scoring.js +2 -4
  21. package/dist/delivery/index.js +12 -12
  22. package/dist/delivery/keyboard-coordinates.d.ts +47 -0
  23. package/dist/delivery/keyboard-coordinates.js +51 -0
  24. package/dist/delivery/main.js +1 -1
  25. package/dist/delivery/ordering.js +4 -6
  26. package/dist/delivery/placement-ordering.d.ts +11 -0
  27. package/dist/delivery/placement-ordering.js +175 -105
  28. package/dist/delivery/tile.d.ts +3 -0
  29. package/dist/delivery/tile.js +66 -57
  30. package/dist/delivery/tiler.d.ts +6 -0
  31. package/dist/delivery/tiler.js +6 -3
  32. package/dist/index.iife.js +35 -35
  33. package/dist/runtime-support.d.ts +12 -0
  34. package/dist/runtime-support.js +12 -0
  35. package/package.json +22 -18
  36. package/dist/browser/browser-CvJkn_Ec.js +0 -1019
  37. package/dist/browser/browser-CvJkn_Ec.js.map +0 -1
  38. package/dist/browser/dist-BTHiIs74.js.map +0 -1
  39. package/dist/browser/drag-provider-DaPxkh4j.js.map +0 -1
  40. package/dist/browser/last-D7N4Qfx4.js +0 -9
  41. package/dist/browser/last-D7N4Qfx4.js.map +0 -1
  42. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
  43. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
  44. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
  45. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
  46. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
  47. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
  48. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
  49. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +0 -11
  50. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
  51. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
  52. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
  53. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
  54. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +0 -12
  55. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
  56. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEvery.js +0 -7
  57. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
  58. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludes.js +0 -7
  59. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludesWith.js +0 -7
  60. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
  61. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +0 -7
  62. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
  63. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayReduce.js +0 -8
  64. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayShuffle.js +0 -8
  65. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +0 -7
  66. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
  67. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
  68. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
  69. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
  70. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
  71. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
  72. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
  73. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseDifference.js +0 -23
  74. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEach.js +0 -6
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEvery.js +0 -10
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js +0 -7
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFlatten.js +0 -13
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +0 -5
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseForOwn.js +0 -8
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +0 -10
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +0 -6
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIndexOf.js +0 -9
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +0 -8
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js +0 -26
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNaN.js +0 -6
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +0 -11
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMap.js +0 -11
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +0 -12
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +0 -8
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +0 -9
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRandom.js +0 -7
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseReduce.js +0 -8
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +0 -9
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +0 -14
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseShuffle.js +0 -8
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +0 -15
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUniq.js +0 -27
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseValues.js +0 -9
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +0 -6
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +0 -10
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createAssigner.js +0 -15
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseEach.js +0 -12
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +0 -12
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createSet.js +0 -9
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +0 -35
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +0 -35
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +0 -32
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js +0 -16
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +0 -18
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isFlattenable.js +0 -10
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +0 -12
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +0 -11
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +0 -7
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
  163. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
  164. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
  165. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
  166. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
  167. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
  168. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
  169. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
  170. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
  171. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
  172. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +0 -9
  173. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
  174. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +0 -11
  175. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
  176. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
  177. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
  178. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
  179. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
  180. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
  181. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +0 -13
  182. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
  183. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +0 -7
  184. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +0 -6
  185. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +0 -9
  186. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +0 -6
  187. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +0 -14
  188. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shuffleSelf.js +0 -12
  189. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
  190. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
  191. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
  192. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
  193. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
  194. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_strictIndexOf.js +0 -7
  195. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +0 -10
  196. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +0 -10
  197. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
  198. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/assign.js +0 -16
  199. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
  200. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/compact.js +0 -10
  201. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +0 -8
  202. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +0 -16
  203. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/difference.js +0 -10
  204. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/differenceWith.js +0 -12
  205. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
  206. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/every.js +0 -12
  207. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +0 -8
  208. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +0 -8
  209. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +0 -6
  210. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
  211. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
  212. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
  213. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js +0 -8
  214. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
  215. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
  216. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +0 -7
  217. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
  218. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
  219. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
  220. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
  221. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
  222. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
  223. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +0 -9
  224. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
  225. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
  226. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
  227. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/last.js +0 -7
  228. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js +0 -10
  229. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +0 -16
  230. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/noop.js +0 -4
  231. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +0 -10
  232. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js +0 -12
  233. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/shuffle.js +0 -9
  234. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
  235. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
  236. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +0 -7
  237. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniq.js +0 -7
  238. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqueId.js +0 -9
  239. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/values.js +0 -8
@@ -1,7 +1,6 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js";
2
- import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/shuffle.js";
3
- import n from "./choice-tile.js";
4
- import r from "react";
1
+ import { ChoiceTile as e } from "./choice-tile.js";
2
+ import t from "react";
3
+ import { isEqual as n, shuffle as r } from "@pie-element/shared-lodash";
5
4
  import i from "debug";
6
5
  import a from "prop-types";
7
6
  import { styled as o } from "@mui/material/styles";
@@ -48,7 +47,7 @@ var b = o("div")({
48
47
  fontSize: e.typography.fontSize - 2,
49
48
  color: e.palette.error.main,
50
49
  paddingTop: e.spacing(1)
51
- })), T = class extends r.Component {
50
+ })), T = class extends t.Component {
52
51
  static propTypes = {
53
52
  correctResponse: a.array.isRequired,
54
53
  choices: a.array.isRequired,
@@ -69,8 +68,8 @@ var b = o("div")({
69
68
  spellCheck: a.bool
70
69
  };
71
70
  state = { warning: { open: !1 } };
72
- constructor(n) {
73
- super(n), this.onChoiceChange = (e) => {
71
+ constructor(e) {
72
+ super(e), this.onChoiceChange = (e) => {
74
73
  let { choices: t, onChange: n, correctResponse: r } = this.props, i = t.findIndex((t) => t.id === e.id);
75
74
  t.splice(i, 1, {
76
75
  ...t[i],
@@ -99,14 +98,14 @@ var b = o("div")({
99
98
  n(e.concat([i]), t.concat([a]));
100
99
  }
101
100
  }, this.shuffleChoices = () => {
102
- let { onChange: n, choices: r, correctResponse: i, placementArea: a } = this.props, o = t(r);
103
- !a && e(o.map((e) => e.id), i.map((e) => e.id)) ? n(t(o), i) : n(o, i);
101
+ let { onChange: e, choices: t, correctResponse: i, placementArea: a } = this.props, o = r(t);
102
+ !a && n(o.map((e) => e.id), i.map((e) => e.id)) ? e(r(o), i) : e(o, i);
104
103
  };
105
104
  }
106
105
  render() {
107
- let { correctResponse: e, choices: t, imageSupport: r, toolbarOpts: i, pluginProps: a, singularChoiceLabel: o, pluralChoiceLabel: s, choicesLabel: c, spellCheck: f, maxImageWidth: p, maxImageHeight: m, errors: h, mathMlOptions: g = {}, ordering: _ } = this.props, { warning: v } = this.state, { choicesErrors: y, orderError: T } = h || {}, E = {
106
+ let { correctResponse: t, choices: n, imageSupport: r, toolbarOpts: i, pluginProps: a, singularChoiceLabel: o, pluralChoiceLabel: s, choicesLabel: c, spellCheck: f, maxImageWidth: p, maxImageHeight: m, errors: h, mathMlOptions: g = {}, ordering: _ } = this.props, { warning: v } = this.state, { choicesErrors: y, orderError: T } = h || {}, E = {
108
107
  gridTemplateColumns: "repeat(2, 1fr)",
109
- gridTemplateRows: `repeat(${t.length}, 1fr)`
108
+ gridTemplateRows: `repeat(${n.length}, auto)`
110
109
  };
111
110
  return /* @__PURE__ */ u("div", { children: [
112
111
  /* @__PURE__ */ u(S, {
@@ -115,22 +114,22 @@ var b = o("div")({
115
114
  }),
116
115
  /* @__PURE__ */ l(S, {
117
116
  style: E,
118
- children: _.tiles.map((e, o) => /* @__PURE__ */ l(n, {
119
- choice: e,
117
+ children: _.tiles.map((t, o) => /* @__PURE__ */ l(e, {
118
+ choice: t,
120
119
  index: o,
121
120
  imageSupport: r,
122
- onDelete: this.onDelete.bind(this, e),
121
+ onDelete: this.onDelete.bind(this, t),
123
122
  onChoiceChange: this.onChoiceChange,
124
123
  toolbarOpts: i,
125
124
  pluginProps: a,
126
- choices: t,
125
+ choices: n,
127
126
  choicesLabel: c,
128
127
  spellCheck: f,
129
128
  maxImageWidth: p,
130
129
  maxImageHeight: m,
131
- error: y?.[e.id] || T && " " || null,
130
+ error: y?.[t.id] || T && " " || null,
132
131
  mathMlOptions: g
133
- }, `${e.type}-${e.id}`))
132
+ }, `${t.type}-${t.id}`))
134
133
  }),
135
134
  T && /* @__PURE__ */ l(w, { children: T }),
136
135
  /* @__PURE__ */ u(b, { children: [/* @__PURE__ */ l(x, {
@@ -70,7 +70,8 @@ var m = n("div")(({ theme: e }) => ({
70
70
  children: [/* @__PURE__ */ s("div", {
71
71
  style: {
72
72
  width: "100%",
73
- display: "flex"
73
+ display: "flex",
74
+ alignItems: "center"
74
75
  },
75
76
  children: [
76
77
  /* @__PURE__ */ o(u, { children: /* @__PURE__ */ o(_, {}) }),
@@ -129,4 +130,4 @@ x.propTypes = {
129
130
  mathMlOptions: t.object
130
131
  };
131
132
  //#endregion
132
- export { x as default };
133
+ export { x as ChoiceTile, x as default };
@@ -1,8 +1,7 @@
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";
1
+ import e from "./choice-editor.js";
2
+ import { buildTiles as t, generateValidationMessage as n, normalizeIndex as r, updateResponseOrChoices as i } from "./utils.js";
3
+ import a from "react";
4
+ import { cloneDeep as o, isEmpty as s } from "@pie-element/shared-lodash";
6
5
  import c from "debug";
7
6
  import l from "prop-types";
8
7
  import { styled as u } from "@mui/material/styles";
@@ -40,47 +39,47 @@ var x = c("@pie-element:placement-ordering:design"), { Panel: ie, toggle: S, rad
40
39
  fontSize: e.typography.fontSize - 2,
41
40
  color: e.palette.error.main,
42
41
  paddingTop: e.spacing(1)
43
- })), w = class extends s.Component {
42
+ })), w = class extends a.Component {
44
43
  static propTypes = { uploadSoundSupport: l.object };
45
44
  static defaultProps = {};
46
- constructor(t) {
47
- super(t), this.applyUpdate = (t) => {
48
- let { model: n, onModelChanged: r } = this.props;
49
- r(t(e(n)));
45
+ constructor(e) {
46
+ super(e), this.applyUpdate = (e) => {
47
+ let { model: t, onModelChanged: n } = this.props;
48
+ n(e(o(t)));
50
49
  }, this.changeHandler = (e, t) => (n) => {
51
50
  x("[changeHandler] value: ", n);
52
51
  let r = t ? m(n, t) : n;
53
52
  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);
53
+ }, 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 = (e, t) => {
54
+ let { model: n, onModelChanged: r } = this.props, i = o(n);
55
+ i.choices = e, i.correctResponse = t, r(i);
57
56
  };
58
57
  }
59
58
  componentDidMount() {
60
- let { model: t, onModelChanged: n } = this.props || {}, { feedback: r } = t || {}, i = e(t);
61
- r || (i.feedbackEnabled = !1, n(i));
59
+ let { model: e, onModelChanged: t } = this.props || {}, { feedback: n } = e || {}, r = o(e);
60
+ n || (r.feedbackEnabled = !1, t(r));
62
61
  }
63
62
  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 = {
63
+ let { active: n, over: a } = e;
64
+ if (!a || !n) return;
65
+ let o = a.data.current, s = n.data.current, c = t.tiles.find((e) => e.id === s.id && e.type === s.type), l = o, u = {
67
66
  ...c,
68
- index: a(c, t)
67
+ index: r(c, t)
69
68
  }, d = {
70
69
  ...l,
71
- index: a(l, t)
72
- }, { response: f, choices: p } = o(t.response, t.choices, u, d);
70
+ index: r(l, t)
71
+ }, { response: f, choices: p } = i(t.response, t.choices, u, d);
73
72
  this.onChoiceEditorChange(p, f);
74
73
  };
75
74
  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 = {
75
+ let { model: r, imageSupport: i, uploadSoundSupport: a, onModelChanged: o, 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 } = r || {}, { prompt: H, rationale: U, teacherInstructions: W } = z || {}, G = {
76
+ choices: r.choices,
77
+ response: !V || s(V) ? Array(r.choices.length) : V,
78
+ tiles: t(r.choices, V)
79
+ }, be = n(), { singularLabel: K = "", pluralLabel: q = "" } = h?.label && se(h.label) || {}, J = x && x.prompt, Y = w && w.prompt, X = x && r.placementArea ? x.choicesWithPlacementArea : x.choicesWithoutPlacementArea || J, Z = w && w.choices || Y, Q = { position: ye === "top" ? "top" : "bottom" }, xe = {
81
80
  choiceLabelEnabled: m.settings && S(m.label),
82
81
  placementArea: y.settings && S(y.label),
83
- numberedGuides: T.settings && e.placementArea && S(T.label),
82
+ numberedGuides: T.settings && r.placementArea && S(T.label),
84
83
  orientation: E.settings && ae(E.label, ["vertical", "horizontal"]),
85
84
  removeTilesAfterPlacing: k.settings && S(k.label),
86
85
  partialScoring: D.settings && S(D.label),
@@ -106,9 +105,9 @@ var x = c("@pie-element:placement-ordering:design"), { Panel: ie, toggle: S, rad
106
105
  dimensions: g,
107
106
  hideSettings: fe,
108
107
  settings: /* @__PURE__ */ d(ie, {
109
- model: e,
108
+ model: r,
110
109
  configuration: c,
111
- onChangeModel: (e) => s(e),
110
+ onChangeModel: (e) => o(e),
112
111
  onChangeConfiguration: (e) => l(e, !0),
113
112
  groups: {
114
113
  Settings: xe,
@@ -120,9 +119,9 @@ var x = c("@pie-element:placement-ordering:design"), { Panel: ie, toggle: S, rad
120
119
  label: P.label,
121
120
  children: [/* @__PURE__ */ d(b, {
122
121
  className: "prompt",
123
- markup: e.teacherInstructions || "",
122
+ markup: r.teacherInstructions || "",
124
123
  onChange: this.onTeacherInstructionsChange,
125
- imageSupport: a,
124
+ imageSupport: i,
126
125
  nonEmpty: !1,
127
126
  error: W,
128
127
  toolbarOpts: Q,
@@ -130,7 +129,7 @@ var x = c("@pie-element:placement-ordering:design"), { Panel: ie, toggle: S, rad
130
129
  spellCheck: B,
131
130
  maxImageWidth: x && x.teacherInstructions || J,
132
131
  maxImageHeight: w && w.teacherInstructions || Y,
133
- uploadSoundSupport: o,
132
+ uploadSoundSupport: a,
134
133
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
135
134
  mathMlOptions: I
136
135
  }), W && /* @__PURE__ */ d("div", {
@@ -142,16 +141,16 @@ var x = c("@pie-element:placement-ordering:design"), { Panel: ie, toggle: S, rad
142
141
  label: v && v.label,
143
142
  children: [/* @__PURE__ */ d(b, {
144
143
  className: "prompt",
145
- markup: e.prompt,
144
+ markup: r.prompt,
146
145
  onChange: this.onPromptChange,
147
- imageSupport: a,
146
+ imageSupport: i,
148
147
  error: H,
149
148
  toolbarOpts: Q,
150
149
  pluginProps: $(v?.inputConfiguration),
151
150
  spellCheck: B,
152
151
  maxImageWidth: x && x.prompt,
153
152
  maxImageHeight: w && w.prompt,
154
- uploadSoundSupport: o,
153
+ uploadSoundSupport: a,
155
154
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
156
155
  mathMlOptions: I
157
156
  }), H && /* @__PURE__ */ d("div", {
@@ -182,44 +181,44 @@ var x = c("@pie-element:placement-ordering:design"), { Panel: ie, toggle: S, rad
182
181
  /* @__PURE__ */ f(ce, { children: [pe && /* @__PURE__ */ d(C, {
183
182
  label: m && m.label && `${K} label`,
184
183
  children: /* @__PURE__ */ d(b, {
185
- ...e.placementArea && { autoWidthToolbar: !0 },
184
+ ...r.placementArea && { autoWidthToolbar: !0 },
186
185
  className: "prompt",
187
- markup: e.choiceLabel,
186
+ markup: r.choiceLabel,
188
187
  onChange: this.onChoiceAreaLabelChange,
189
188
  toolbarOpts: Q,
190
189
  pluginProps: $(m?.inputConfiguration),
191
190
  spellCheck: B,
192
191
  maxImageWidth: X,
193
192
  maxImageHeight: Z,
194
- uploadSoundSupport: o,
193
+ uploadSoundSupport: a,
195
194
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
196
195
  mathMlOptions: I
197
196
  })
198
- }), N.settings && e.placementArea && /* @__PURE__ */ d(C, {
197
+ }), N.settings && r.placementArea && /* @__PURE__ */ d(C, {
199
198
  label: N && N.label && N.label,
200
199
  children: /* @__PURE__ */ d(b, {
201
200
  autoWidthToolbar: !0,
202
201
  className: "prompt",
203
- markup: e.targetLabel,
202
+ markup: r.targetLabel,
204
203
  onChange: this.onAnswerAreaLabelChange,
205
204
  toolbarOpts: Q,
206
205
  spellCheck: B,
207
206
  maxImageWidth: x && x.choicesWithPlacementArea || J,
208
207
  maxImageHeight: Z,
209
- uploadSoundSupport: o,
208
+ uploadSoundSupport: a,
210
209
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
211
210
  mathMlOptions: I
212
211
  })
213
212
  })] }),
214
- h.settings && /* @__PURE__ */ d(n, {
213
+ h.settings && /* @__PURE__ */ d(e, {
215
214
  correctResponse: V,
216
- choices: e.choices,
215
+ choices: r.choices,
217
216
  onChange: this.onChoiceEditorChange,
218
- imageSupport: a,
217
+ imageSupport: i,
219
218
  toolbarOpts: Q,
220
219
  pluginProps: $(h?.inputConfiguration),
221
220
  choicesLabel: h.label,
222
- placementArea: e.placementArea,
221
+ placementArea: r.placementArea,
223
222
  singularChoiceLabel: K,
224
223
  pluralChoiceLabel: q,
225
224
  spellCheck: B,
@@ -235,24 +234,24 @@ var x = c("@pie-element:placement-ordering:design"), { Panel: ie, toggle: S, rad
235
234
  label: O.label,
236
235
  children: [/* @__PURE__ */ d(b, {
237
236
  className: "prompt",
238
- markup: e.rationale || "",
237
+ markup: r.rationale || "",
239
238
  onChange: this.onRationaleChange,
240
- imageSupport: a,
239
+ imageSupport: i,
241
240
  error: U,
242
241
  toolbarOpts: Q,
243
242
  pluginProps: $(O?.inputConfiguration),
244
243
  spellCheck: B,
245
244
  maxImageWidth: x && x.rationale || J,
246
245
  maxImageHeight: w && w.rationale || Y,
247
- uploadSoundSupport: o,
246
+ uploadSoundSupport: a,
248
247
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
249
248
  mathMlOptions: I
250
249
  }), U && /* @__PURE__ */ d(de, { children: U })]
251
250
  }),
252
251
  he && /* @__PURE__ */ d(ne, {
253
- feedback: e.feedback,
252
+ feedback: r.feedback,
254
253
  onChange: this.onFeedbackChange,
255
- imageSupport: a,
254
+ imageSupport: i,
256
255
  toolbarOpts: Q
257
256
  })
258
257
  ]
@@ -271,4 +270,4 @@ w.defaultProps = {
271
270
  imageSupport: l.object
272
271
  };
273
272
  //#endregion
274
- export { w as default };
273
+ export { w as Design, w as default };
@@ -41,5 +41,6 @@ export default class PlacementOrdering extends HTMLElement {
41
41
  insertSound(handler: any): void;
42
42
  onDeleteSound(src: any, done: any): void;
43
43
  _rerender(): void;
44
+ connectedCallback(): void;
44
45
  disconnectedCallback(): void;
45
46
  }
@@ -1,32 +1,32 @@
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";
1
+ import { Design as e } from "./design.js";
2
+ import t from "./defaults.js";
3
+ import n from "react";
4
+ import { createRoot as r } from "react-dom/client";
5
+ import { defaults as i } from "@pie-element/shared-lodash";
6
6
  import { DeleteImageEvent as a, DeleteSoundEvent as o, InsertImageEvent as s, InsertSoundEvent as c, ModelUpdatedEvent as l } from "@pie-element/shared-configure-events";
7
7
  //#region src/author/index.ts
8
- var u = (t, r) => ({
9
- configuration: e(t, n.configuration),
10
- model: r
8
+ var u = (e, n) => ({
9
+ configuration: i(e, t.configuration),
10
+ model: n
11
11
  }), d = (e) => e && e.map((e) => e.weight === void 0 ? {
12
12
  id: e.id || e,
13
13
  weight: 0
14
14
  } : {
15
15
  id: e.id,
16
16
  weight: e.weight
17
- }), f = class e extends HTMLElement {
17
+ }), f = class i extends HTMLElement {
18
18
  static createDefaultModel = (e = {}) => {
19
- let t = d(e.correctResponse) || ((e) => e && e.map((e) => ({
19
+ let n = d(e.correctResponse) || ((e) => e && e.map((e) => ({
20
20
  id: e.id,
21
21
  weight: 0
22
22
  })))(e.choices), r = {
23
- ...n.model,
23
+ ...t.model,
24
24
  ...e
25
25
  };
26
- return t && (r.correctResponse = t), r;
26
+ return n && (r.correctResponse = n), r;
27
27
  };
28
28
  constructor() {
29
- super(), this._root = null, this._model = e.createDefaultModel(), this._configuration = n.configuration, this.onModelChanged = (e, t) => {
29
+ super(), this._root = null, this._model = i.createDefaultModel(), this._configuration = t.configuration, this.onModelChanged = (e, t) => {
30
30
  this._model = e, this._rerender(), this.dispatchUpdate(t);
31
31
  }, this.onConfigurationChanged = (e) => {
32
32
  this._configuration = u(e).configuration, this.onModelChanged(this._model), this._rerender();
@@ -39,15 +39,15 @@ var u = (t, r) => ({
39
39
  dispatchUpdate(e) {
40
40
  this.dispatchEvent(new l(this._model, e));
41
41
  }
42
- set model(t) {
43
- this._model = e.createDefaultModel(t), this._rerender();
42
+ set model(e) {
43
+ this._model = i.createDefaultModel(e), this._rerender();
44
44
  }
45
45
  set configuration(e) {
46
- let t = u(e, this._model);
47
- this.onModelChanged(t.model);
46
+ let n = u(e, this._model);
47
+ this.onModelChanged(n.model);
48
48
  let r = {
49
- ...n.configuration,
50
- ...t.configuration
49
+ ...t.configuration,
50
+ ...n.configuration
51
51
  };
52
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
53
  value: this._model.language,
@@ -61,7 +61,7 @@ var u = (t, r) => ({
61
61
  this.dispatchEvent(new o(e, t));
62
62
  }
63
63
  _rerender() {
64
- let e = r.createElement(t, {
64
+ let t = n.createElement(e, {
65
65
  model: this._model,
66
66
  configuration: this._configuration,
67
67
  onModelChanged: this.onModelChanged,
@@ -75,10 +75,13 @@ var u = (t, r) => ({
75
75
  delete: this.onDeleteSound.bind(this)
76
76
  }
77
77
  });
78
- this._root ||= i(this), this._root.render(e);
78
+ this._root ||= r(this), this._root.render(t);
79
+ }
80
+ connectedCallback() {
81
+ this._rerender();
79
82
  }
80
83
  disconnectedCallback() {
81
- this._root && this._root.unmount();
84
+ this._root &&= (this._root.unmount(), null);
82
85
  }
83
86
  };
84
87
  //#endregion
@@ -1,4 +1,4 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js";
1
+ import { cloneDeep as e } from "@pie-element/shared-lodash";
2
2
  //#region src/author/utils.ts
3
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
4
  function n(e, t) {