@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,44 +1,39 @@
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/every.js";
3
- import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js";
4
- import r from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js";
5
- import i from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js";
6
- import a from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js";
7
- import { flattenCorrect as o, getAllCorrectResponses as s, score as c } from "./scoring.js";
8
- import l from "./defaults.js";
1
+ import { flattenCorrect as e, getAllCorrectResponses as t, score as n } from "./scoring.js";
2
+ import r from "./defaults.js";
3
+ import { every as i, isArray as a, isEmpty as o, isEqual as s, map as c, reduce as l } from "@pie-element/shared-lodash";
9
4
  import u from "debug";
10
5
  import d from "@pie-lib/translator";
11
6
  import { getFeedbackForCorrectness as f } from "@pie-element/shared-feedback";
12
7
  import { partialScoring as p } from "@pie-element/shared-controller-utils";
13
8
  //#region src/controller/index.ts
14
- var m = u("@pie-element:placement-ordering:controller"), { translator: h } = d, g = () => /* @__PURE__ */ Error("Question is missing required array: correctResponse"), _ = (e, t, n) => {
15
- let r = [], a = t?.value || [];
9
+ var m = u("@pie-element:placement-ordering:controller"), { translator: h } = d, g = () => /* @__PURE__ */ Error("Question is missing required array: correctResponse"), _ = (e, r, i) => {
10
+ let a = [], o = r?.value || [];
16
11
  e?.correctResponse;
17
- let o = e?.placementArea === !0;
18
- if (!a.length) return o ? r.push("Student did not place any tiles in the target area.") : r.push("Student did not reorder any tiles."), r.push("Final score: 0."), r;
19
- let l = s(e), u = {
12
+ let c = e?.placementArea === !0;
13
+ if (!o.length) return c ? a.push("Student did not place any tiles in the target area.") : a.push("Student did not reorder any tiles."), a.push("Final score: 0."), a;
14
+ let l = t(e), u = {
20
15
  score: 0,
21
16
  response: []
22
17
  };
23
18
  l.forEach((e) => {
24
19
  let t = 0;
25
- a.forEach((n, r) => {
20
+ o.forEach((n, r) => {
26
21
  e[r] === n && t++;
27
22
  }), t > u.score && (u = {
28
23
  score: t,
29
24
  response: e
30
25
  });
31
26
  });
32
- let d = u.score, f = a.length - d;
33
- d > 0 && r.push(`${d} tile(s) placed in the correct order.`), f > 0 && r.push(`${f} tile(s) placed in an incorrect order.`), l.some((e) => i(e, a));
34
- let m = p.enabled(e, n || {});
35
- m ? (r.push("Score calculated using partial scoring."), r.push("Each tile placed in the correct position contributes to the score.")) : (r.push("Score calculated using all-or-nothing scoring."), o ? r.push("Student must place all tiles in the correct positions within the target area to receive full credit.") : r.push("Student must arrange all tiles in the correct order to receive full credit."));
36
- let h = c(e, t), g = m ? h : +(h === 1);
37
- return r.push(`Final score: ${g}.`), r;
27
+ let d = u.score, f = o.length - d;
28
+ d > 0 && a.push(`${d} tile(s) placed in the correct order.`), f > 0 && a.push(`${f} tile(s) placed in an incorrect order.`), l.some((e) => s(e, o));
29
+ let m = p.enabled(e, i || {});
30
+ m ? (a.push("Score calculated using partial scoring."), a.push("Each tile placed in the correct position contributes to the score.")) : (a.push("Score calculated using all-or-nothing scoring."), c ? a.push("Student must place all tiles in the correct positions within the target area to receive full credit.") : a.push("Student must arrange all tiles in the correct order to receive full credit."));
31
+ let h = n(e, r), g = m ? h : +(h === 1);
32
+ return a.push(`Final score: ${g}.`), a;
38
33
  };
39
- function v(e, t, n) {
34
+ function v(e, t, r) {
40
35
  return new Promise((i, a) => {
41
- if (!t || r(t)) {
36
+ if (!t || o(t)) {
42
37
  i({
43
38
  score: 0,
44
39
  empty: !0,
@@ -46,12 +41,12 @@ function v(e, t, n) {
46
41
  });
47
42
  return;
48
43
  }
49
- if (!e || !e.correctResponse || r(e.correctResponse)) a(g());
44
+ if (!e || !e.correctResponse || o(e.correctResponse)) a(g());
50
45
  else try {
51
- let r = c(e, t);
46
+ let a = n(e, t);
52
47
  i({
53
- score: p.enabled(e, n || {}) ? r : +(r === 1),
54
- logTrace: _(e, t, n)
48
+ score: p.enabled(e, r || {}) ? a : +(a === 1),
49
+ logTrace: _(e, t, r)
55
50
  });
56
51
  } catch (e) {
57
52
  a(e);
@@ -61,13 +56,13 @@ function v(e, t, n) {
61
56
  function y(e = {}) {
62
57
  return new Promise((t) => {
63
58
  t({
64
- ...l,
59
+ ...r,
65
60
  ...e
66
61
  });
67
62
  });
68
63
  }
69
64
  var b = (e) => ({
70
- ...l,
65
+ ...r,
71
66
  rationaleEnabled: !0,
72
67
  feedbackEnabled: !1,
73
68
  promptEnabled: !0,
@@ -75,9 +70,9 @@ var b = (e) => ({
75
70
  studentInstructionsEnabled: !0,
76
71
  ...e
77
72
  });
78
- async function x(r, l, u) {
73
+ async function x(r, o, u) {
79
74
  let d = b(r), g = {};
80
- if (r.alternateResponses && t(r.alternateResponses, e) && (m("Deprecated structure of alternateResponses is in use"), console.error("Deprecated structure of alternateResponses is in use")), g.env = u, g.extraCSSRules = d.extraCSSRules, g.outcomes = [], g.completeLength = (d.correctResponse || []).length, g.choices = (d.choices || []).filter((e) => e.label), g.note = d.note, g.showNote = d.alternateResponses && d.alternateResponses.length > 0, g.language = d.language, m("[model] removing tileSize for the moment."), g.prompt = d.promptEnabled ? d.prompt : null, g.config = {
75
+ if (r.alternateResponses && i(r.alternateResponses, a) && (m("Deprecated structure of alternateResponses is in use"), console.error("Deprecated structure of alternateResponses is in use")), g.env = u, g.extraCSSRules = d.extraCSSRules, g.outcomes = [], g.completeLength = (d.correctResponse || []).length, g.choices = (d.choices || []).filter((e) => e.label), g.note = d.note, g.showNote = d.alternateResponses && d.alternateResponses.length > 0, g.language = d.language, m("[model] removing tileSize for the moment."), g.prompt = d.promptEnabled ? d.prompt : null, g.config = {
81
76
  orientation: d.orientation || "vertical",
82
77
  includeTargets: d.placementArea,
83
78
  choiceLabelEnabled: d.choiceLabelEnabled,
@@ -86,43 +81,43 @@ async function x(r, l, u) {
86
81
  showOrdering: d.numberedGuides,
87
82
  allowSameChoiceInTargets: !d.removeTilesAfterPlacing
88
83
  }, g.disabled = u.mode !== "gather", g.note ||= h.t("common:commonCorrectAnswerWithAlternates", { lng: d.language }), u.role === "instructor" && (u.mode === "view" || u.mode === "evaluate") ? (g.rationale = d.rationaleEnabled ? d.rationale : null, g.teacherInstructions = d.teacherInstructionsEnabled ? d.teacherInstructions : null) : (g.rationale = null, g.teacherInstructions = null), u.mode === "evaluate") {
89
- let e = l && l.value || [], t = s(d), m = t.reduce((t, n) => {
90
- let r = a(e, (e, t, r) => e + (Array.isArray(n) && n[r] === t ? 1 : 0), 0);
91
- return r > t.score ? {
92
- arr: n,
93
- score: r
94
- } : t;
84
+ let i = o && o.value || [], a = t(d), m = a.reduce((e, t) => {
85
+ let n = l(i, (e, n, r) => e + (Array.isArray(t) && t[r] === n ? 1 : 0), 0);
86
+ return n > e.score ? {
87
+ arr: t,
88
+ score: n
89
+ } : e;
95
90
  }, {
96
91
  arr: [],
97
92
  score: 0
98
93
  });
99
- g.outcomes = n(e, (e, t) => ({
94
+ g.outcomes = c(i, (e, t) => ({
100
95
  id: e,
101
96
  outcome: m.arr[t] === e ? "correct" : "incorrect"
102
97
  }));
103
- let h = t.some((t) => i(t, e)), _ = c(r, l), v = _ === 1, y = !v && p.enabled(d, u || {}) && _ !== 0;
104
- return g.correctness = v ? "correct" : y ? "partial" : "incorrect", h || (g.correctResponse = o(d)), d.feedback || (d.feedbackEnabled = !1), g.feedback = d.feedbackEnabled ? await f(g.correctness, d.feedback) : void 0, g;
98
+ let h = a.some((e) => s(e, i)), _ = n(r, o), v = _ === 1, y = !v && p.enabled(d, u || {}) && _ !== 0;
99
+ return g.correctness = v ? "correct" : y ? "partial" : "incorrect", h || (g.correctResponse = e(d)), d.feedback || (d.feedbackEnabled = !1), g.feedback = d.feedbackEnabled ? await f(g.correctness, d.feedback) : void 0, g;
105
100
  } else return g;
106
101
  }
107
- var S = (e, t) => new Promise((n) => {
108
- t.mode !== "evaluate" && t.role === "instructor" ? n({
102
+ var S = (t, n) => new Promise((r) => {
103
+ n.mode !== "evaluate" && n.role === "instructor" ? r({
109
104
  id: "1",
110
- value: o(e)
111
- }) : n(null);
105
+ value: e(t)
106
+ }) : r(null);
112
107
  }), C = (e) => (e || "").replace(/(<(?!img|iframe|source)([^>]+)>)/gi, ""), w = (e = {}, t = {}) => {
113
- let { choices: n, correctResponse: a } = e, o = {};
108
+ let { choices: n, correctResponse: r } = e, i = {};
114
109
  [
115
110
  "teacherInstructions",
116
111
  "prompt",
117
112
  "rationale"
118
113
  ].forEach((n) => {
119
- t[n]?.required && !C(e[n]) && (o[n] = "This field is required.");
114
+ t[n]?.required && !C(e[n]) && (i[n] = "This field is required.");
120
115
  });
121
- let s = [...n || []].reverse(), c = {};
122
- return s.forEach((e, t) => {
116
+ let a = [...n || []].reverse(), c = {};
117
+ return a.forEach((e, t) => {
123
118
  let { id: n, label: r } = e;
124
- C(r) ? s.slice(t + 1).some((e) => e.label === r) && (c[n] = "Content should be unique.") : c[n] = "Content should not be empty.";
125
- }), i((n || []).map((e) => e.id), (a || []).map((e) => e.id || e)) && (o.orderError = "The correct ordering should not be identical to the initial ordering."), r(c) || (o.choicesErrors = c), o;
119
+ C(r) ? a.slice(t + 1).some((e) => e.label === r) && (c[n] = "Content should be unique.") : c[n] = "Content should not be empty.";
120
+ }), s((n || []).map((e) => e.id), (r || []).map((e) => e.id || e)) && (i.orderError = "The correct ordering should not be identical to the initial ordering."), o(c) || (i.choicesErrors = c), i;
126
121
  };
127
122
  //#endregion
128
123
  export { S as createCorrectResponseSession, y as createDefaultModel, _ as getLogTrace, x as model, b as normalize, v as outcome, g as questionError, w as validate };
@@ -1,6 +1,4 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/differenceWith.js";
2
- import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js";
3
- import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniq.js";
1
+ import { differenceWith as e, isEqual as t, uniq as n } from "@pie-element/shared-lodash";
4
2
  import r from "debug";
5
3
  import { combination as i } from "js-combinatorics";
6
4
  //#region src/controller/scoring.ts
@@ -29,4 +27,4 @@ var a = r("pie-elements:placement-ordering:controller"), o = (e) => /* @__PURE__
29
27
  }), a;
30
28
  };
31
29
  //#endregion
32
- export { c as flattenCorrect, l as getAllCorrectResponses, u as score };
30
+ export { c as flattenCorrect, l as getAllCorrectResponses, o as illegalArgumentError, s as pairwiseCombinationScore, u as score };
@@ -1,14 +1,14 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/compact.js";
2
- import t from "./main.js";
3
- import n from "react";
4
- import { createRoot as r } from "react-dom/client";
1
+ import e from "./main.js";
2
+ import t from "react";
3
+ import { createRoot as n } from "react-dom/client";
4
+ import { compact as r } from "@pie-element/shared-lodash";
5
5
  import i from "debug";
6
6
  import { renderMath as a } from "@pie-element/shared-math-rendering-mathjax";
7
7
  import { SessionChangedEvent as o } from "@pie-element/shared-player-events";
8
8
  //#region src/delivery/index.ts
9
- var s = i("pie-elements:placement-ordering"), c = ({ model: t, session: n }) => {
10
- let { config: r } = t, i = (n && e(n.value) || []).length === t.choices.length;
11
- return r.includeTargets || i;
9
+ var s = i("pie-elements:placement-ordering"), c = ({ model: e, session: t }) => {
10
+ let { config: n } = e, i = (t && r(t.value) || []).length === e.choices.length;
11
+ return n.includeTargets || i;
12
12
  }, l = class extends HTMLElement {
13
13
  constructor() {
14
14
  super(), this._root = null, this._mathObserver = null, this._mathRenderPending = !1;
@@ -32,7 +32,7 @@ var s = i("pie-elements:placement-ordering"), c = ({ model: t, session: n }) =>
32
32
  _disconnectMathObserver() {
33
33
  this._mathObserver &&= (this._mathObserver.disconnect(), null);
34
34
  }
35
- isComplete = (t) => t && e(t).length === this._model.completeLength;
35
+ isComplete = (e) => e && r(e).length === this._model.completeLength;
36
36
  sessionChange = (e) => {
37
37
  this._session.value = e.value, this.render(), this.dispatchEvent(new o(this.tagName.toLowerCase(), this._session && this.isComplete(this._session.value)));
38
38
  };
@@ -51,19 +51,19 @@ var s = i("pie-elements:placement-ordering"), c = ({ model: t, session: n }) =>
51
51
  render() {
52
52
  if (this._model && this._session) {
53
53
  s("[render] session: ", this._session.value), s("[render] model: ", this._model), this._initMathObserver();
54
- let e = n.createElement(t, {
54
+ let r = t.createElement(e, {
55
55
  model: this._model,
56
56
  session: this._session,
57
57
  onSessionChange: this.sessionChange
58
58
  });
59
- this._root ||= r(this), this._root.render(e);
59
+ this._root ||= n(this), this._root.render(r);
60
60
  }
61
61
  }
62
62
  connectedCallback() {
63
- this._initMathObserver();
63
+ this._initMathObserver(), this.render();
64
64
  }
65
65
  disconnectedCallback() {
66
- this._disconnectMathObserver(), this._root && this._root.unmount();
66
+ this._disconnectMathObserver(), this._root &&= (this._root.unmount(), null);
67
67
  }
68
68
  };
69
69
  //#endregion
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/placement-ordering/src/keyboard-coordinates.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
+ /**
10
+ * Custom keyboard coordinate getter for placement-ordering's Tab-based placement mode
11
+ * (enabled only when the item is configured with `placementArea` / `includeTargets`).
12
+ *
13
+ * Tab/Shift+Tab cycle the dragged choice through the target column's response areas
14
+ * in on-screen order (first target, then the rest in sequence), followed by exactly
15
+ * one source-column stop as a fixed last step before the cycle wraps back to the first
16
+ * target — so picking up a choice always starts the cycle at the first target,
17
+ * regardless of where that choice's own source-column slot happens to sit on screen.
18
+ *
19
+ * Arrow keys are delegated to dnd-kit's own `defaultKeyboardCoordinateGetter` so the
20
+ * pre-existing free-form arrow-key dragging behavior is left completely unchanged.
21
+ *
22
+ * Whichever slot a drag started from — a target the choice was already placed in, or
23
+ * (see below) the choice's own pool slot — stays reachable by Tab as a no-op "drop it
24
+ * back where it came from": tile.tsx disables a droppable for the whole duration of
25
+ * its own drag (a self-collision guard for pointer drags), which would otherwise make
26
+ * that exact slot unreachable; that guard is bypassed here specifically for the one
27
+ * droppable matching the active drag's own id. A target slot picked up this way stays
28
+ * in its normal position in the target sequence (it's just another target); nothing
29
+ * special is needed there beyond the bypass itself.
30
+ *
31
+ * The choices column isn't a place a student can choose to relocate an answer within —
32
+ * there's exactly one meaningful "source" stop for whichever choice is currently being
33
+ * dragged: its own fixed slot, whether that's the vacated gap left behind (if the
34
+ * choice is already placed in a target — landing back on it returns the choice to the
35
+ * pool, undoing the placement) or the very tile being dragged (if the choice is still
36
+ * sitting there, unplaced — landing back on it is a no-op that effectively cancels the
37
+ * pick-up; the same disabled-droppable bypass applies here too). Every *other*
38
+ * choice-column tile — filled or an empty gap — is excluded from the cycle:
39
+ * `ordering.ts`'s `updateResponse` has no `choice -> choice` case, so they'd be no-op
40
+ * drop targets anyway. Matching is by id (the vacated gap carries its original choice's
41
+ * id specifically so this comparison works), not by type alone.
42
+ */
43
+ export declare const closestDroppableKeyboardCoordinates: (event: any, { active, context, currentCoordinates }: {
44
+ active: any;
45
+ context: any;
46
+ currentCoordinates: any;
47
+ }) => any;
@@ -0,0 +1,51 @@
1
+ import { KeyboardCode as e, defaultKeyboardCoordinateGetter as t } from "@dnd-kit/core";
2
+ //#region src/delivery/keyboard-coordinates.ts
3
+ var n = (n, { active: i, context: a, currentCoordinates: o }) => {
4
+ let { code: s } = n, c = s === "Tab", l = s === e.Down || s === e.Up || s === e.Left || s === e.Right;
5
+ if (!c && !l) return;
6
+ if (l) return t(n, {
7
+ context: a,
8
+ currentCoordinates: o
9
+ });
10
+ n.preventDefault();
11
+ let { droppableRects: u, droppableContainers: d, collisionRect: f, draggableNodes: p, active: m } = a;
12
+ if (!u || u.size === 0) return o;
13
+ let h = {
14
+ x: (f?.width || 0) / 2,
15
+ y: (f?.height || 0) / 2
16
+ }, g = {
17
+ x: o.x + h.x,
18
+ y: o.y + h.y
19
+ }, _ = p?.get(i)?.data?.current?.id, v = m?.rect?.current?.initial, y = typeof i == "string" ? i.replace(/^tile-/, "drop-") : void 0, b = [], x;
20
+ for (let [e, t] of d) {
21
+ let n = t?.data?.current, r = e === y;
22
+ if (t?.disabled && !r) continue;
23
+ let i = n?.type === "choice" && n?.id === _;
24
+ if (n?.type === "choice" && !i) continue;
25
+ let a = (r ? v : null) || u.get(e);
26
+ if (!a) continue;
27
+ let o = {
28
+ x: a.left + a.width / 2,
29
+ y: a.top + a.height / 2
30
+ }, s = {
31
+ id: e,
32
+ dropPosition: {
33
+ x: a.left,
34
+ y: a.top + a.height / 2 - h.y
35
+ },
36
+ center: o
37
+ };
38
+ i ? x = s : b.push(s);
39
+ }
40
+ if (b.length === 0 && !x) return o;
41
+ let S = n.shiftKey;
42
+ b.sort((e, t) => Math.abs(e.center.y - t.center.y) > 10 ? e.center.y - t.center.y : e.center.x - t.center.x), x && b.push(x);
43
+ let C = 0, w = Infinity;
44
+ for (let e = 0; e < b.length; e++) {
45
+ let t = r(g, b[e].center);
46
+ t < w && (w = t, C = e);
47
+ }
48
+ return b[S ? (C - 1 + b.length) % b.length : (C + 1) % b.length].dropPosition;
49
+ }, r = (e, t) => Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
50
+ //#endregion
51
+ export { n as closestDroppableKeyboardCoordinates };
@@ -1,4 +1,4 @@
1
- import e from "./placement-ordering.js";
1
+ import { PlacementOrdering as e } from "./placement-ordering.js";
2
2
  import t from "react";
3
3
  import n from "prop-types";
4
4
  import { jsx as r } from "react/jsx-runtime";
@@ -1,7 +1,4 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/assign.js";
2
- import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js";
3
- import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js";
4
- import r from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js";
1
+ import { assign as e, cloneDeep as t, isEmpty as n, map as r } from "@pie-element/shared-lodash";
5
2
  import i from "debug";
6
3
  //#region src/delivery/ordering.ts
7
4
  var a = i("pie-elements:placement-ordering:ordering"), o = (e, t, n) => {
@@ -43,6 +40,7 @@ function u(e, t, n, r) {
43
40
  }
44
41
  return e.map((e) => t.indexOf(e.id) !== -1 && !r.allowSameChoiceInTargets ? {
45
42
  type: "choice",
43
+ id: e.id,
46
44
  empty: !0,
47
45
  droppable: !0,
48
46
  draggable: !1
@@ -65,7 +63,7 @@ function u(e, t, n, r) {
65
63
  }, []);
66
64
  }
67
65
  function d(t, i, a, o) {
68
- return o = e({ includeTargets: !0 }, o), a ||= [], i = !i || r(i) ? o.includeTargets ? Array(t.length) : n(t, (e) => e.id) : i, {
66
+ return o = e({ includeTargets: !0 }, o), a ||= [], i = !i || n(i) ? o.includeTargets ? Array(t.length) : r(t, (e) => e.id) : i, {
69
67
  choices: t,
70
68
  response: i,
71
69
  opts: o,
@@ -93,4 +91,4 @@ function f(e, t) {
93
91
  return t;
94
92
  }
95
93
  //#endregion
96
- export { d as buildState, f as reducer };
94
+ export { d as buildState, o as push, f as reducer, s as swap };
@@ -23,6 +23,17 @@ export declare class PlacementOrdering extends React.Component {
23
23
  onRemoveChoice: any;
24
24
  createOrdering: any;
25
25
  onDragEnd: any;
26
+ onDragStart: any;
27
+ onDragCancel: any;
28
+ isSameChoice: (a: any, b: any) => boolean;
29
+ selectChoice: any;
30
+ toggleChoiceSelection: any;
31
+ cancelSelection: any;
32
+ endAnyLiveKeyboardDrag: any;
33
+ placeSelectedChoice: any;
34
+ isClickSoonAfterDragEnd: () => boolean;
35
+ onChoiceClick: any;
36
+ onPlacementClick: any;
26
37
  render(): React.JSX.Element;
27
38
  }
28
39
  export default PlacementOrdering;