@pie-element/number-line 13.1.1 → 13.1.2-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/configure.js +2 -0
  2. package/controller.js +1 -0
  3. package/dist/_virtual/_rolldown/runtime.js +11 -0
  4. package/dist/author/arrows.d.ts +28 -0
  5. package/dist/author/arrows.js +69 -0
  6. package/dist/author/card-bar.d.ts +20 -0
  7. package/dist/author/card-bar.js +41 -0
  8. package/dist/author/defaults.d.ts +178 -0
  9. package/dist/author/defaults.js +144 -0
  10. package/dist/author/domain.d.ts +15 -0
  11. package/dist/author/domain.js +54 -0
  12. package/dist/author/index.d.ts +23 -0
  13. package/dist/author/index.js +89 -0
  14. package/dist/author/main.d.ts +44 -0
  15. package/dist/author/main.js +485 -0
  16. package/dist/author/number-text-field.d.ts +13 -0
  17. package/dist/author/number-text-field.js +13 -0
  18. package/dist/author/point-config.d.ts +25 -0
  19. package/dist/author/point-config.js +69 -0
  20. package/dist/author/size.d.ts +24 -0
  21. package/dist/author/size.js +48 -0
  22. package/dist/author/ticks.d.ts +22 -0
  23. package/dist/author/ticks.js +115 -0
  24. package/dist/author/utils.d.ts +9 -0
  25. package/dist/author/utils.js +4 -0
  26. package/dist/browser/_baseSet-ycZx94p7.js +8672 -0
  27. package/dist/browser/_baseSet-ycZx94p7.js.map +1 -0
  28. package/dist/browser/author/index.js +40436 -0
  29. package/dist/browser/author/index.js.map +1 -0
  30. package/dist/browser/controller/index.js +823 -0
  31. package/dist/browser/controller/index.js.map +1 -0
  32. package/dist/browser/delivery/index.js +2 -0
  33. package/dist/browser/delivery-Dh8QdqpO.js +17950 -0
  34. package/dist/browser/delivery-Dh8QdqpO.js.map +1 -0
  35. package/dist/browser/number-line.css +2 -0
  36. package/dist/browser/uniqWith-CKN50xMI.js +17886 -0
  37. package/dist/browser/uniqWith-CKN50xMI.js.map +1 -0
  38. package/dist/controller/defaults.d.ts +58 -0
  39. package/dist/controller/defaults.js +50 -0
  40. package/dist/controller/index.d.ts +33 -0
  41. package/dist/controller/index.js +170 -0
  42. package/dist/controller/tickUtils.d.ts +20 -0
  43. package/dist/controller/tickUtils.js +254 -0
  44. package/dist/controller/utils.d.ts +9 -0
  45. package/dist/controller/utils.js +68 -0
  46. package/dist/delivery/data-converter.d.ts +64 -0
  47. package/dist/delivery/data-converter.js +70 -0
  48. package/dist/delivery/draggable/index.d.ts +33 -0
  49. package/dist/delivery/draggable/index.js +39 -0
  50. package/dist/delivery/index.d.ts +35 -0
  51. package/dist/delivery/index.js +109 -0
  52. package/dist/delivery/number-line/colors.d.ts +11 -0
  53. package/dist/delivery/number-line/colors.js +5 -0
  54. package/dist/delivery/number-line/feedback.d.ts +19 -0
  55. package/dist/delivery/number-line/feedback.js +57 -0
  56. package/dist/delivery/number-line/graph/arrow.d.ts +30 -0
  57. package/dist/delivery/number-line/graph/arrow.js +27 -0
  58. package/dist/delivery/number-line/graph/elements/base.d.ts +16 -0
  59. package/dist/delivery/number-line/graph/elements/base.js +11 -0
  60. package/dist/delivery/number-line/graph/elements/builder.d.ts +33 -0
  61. package/dist/delivery/number-line/graph/elements/builder.js +30 -0
  62. package/dist/delivery/number-line/graph/elements/line.d.ts +51 -0
  63. package/dist/delivery/number-line/graph/elements/line.js +189 -0
  64. package/dist/delivery/number-line/graph/elements/point.d.ts +43 -0
  65. package/dist/delivery/number-line/graph/elements/point.js +127 -0
  66. package/dist/delivery/number-line/graph/elements/ray.d.ts +43 -0
  67. package/dist/delivery/number-line/graph/elements/ray.js +130 -0
  68. package/dist/delivery/number-line/graph/index.d.ts +59 -0
  69. package/dist/delivery/number-line/graph/index.js +196 -0
  70. package/dist/delivery/number-line/graph/line.d.ts +46 -0
  71. package/dist/delivery/number-line/graph/line.js +27 -0
  72. package/dist/delivery/number-line/graph/stacks.d.ts +10 -0
  73. package/dist/delivery/number-line/graph/stacks.js +40 -0
  74. package/dist/delivery/number-line/graph/tick-utils.d.ts +73 -0
  75. package/dist/delivery/number-line/graph/tick-utils.js +297 -0
  76. package/dist/delivery/number-line/graph/ticks.d.ts +46 -0
  77. package/dist/delivery/number-line/graph/ticks.js +115 -0
  78. package/dist/delivery/number-line/index.d.ts +35 -0
  79. package/dist/delivery/number-line/index.js +218 -0
  80. package/dist/delivery/number-line/point-chooser/button.d.ts +31 -0
  81. package/dist/delivery/number-line/point-chooser/button.js +36 -0
  82. package/dist/delivery/number-line/point-chooser/img.d.ts +10 -0
  83. package/dist/delivery/number-line/point-chooser/img.js +4 -0
  84. package/dist/delivery/number-line/point-chooser/index.d.ts +37 -0
  85. package/dist/delivery/number-line/point-chooser/index.js +154 -0
  86. package/dist/delivery/number-line/point-chooser/styles.d.ts +192 -0
  87. package/dist/delivery/number-line/transitions/fade.d.ts +34 -0
  88. package/dist/delivery/number-line/transitions/fade.js +75 -0
  89. package/dist/delivery/number-line/transitions/index.d.ts +10 -0
  90. package/dist/index.d.ts +1 -0
  91. package/dist/index.iife.d.ts +8 -0
  92. package/dist/index.iife.js +201 -0
  93. package/dist/index.js +2 -0
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +11 -0
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +12 -0
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludes.js +7 -0
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludesWith.js +7 -0
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +7 -0
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +7 -0
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignMergeValue.js +8 -0
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js +7 -0
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +5 -0
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +10 -0
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +6 -0
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIndexOf.js +9 -0
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +8 -0
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js +26 -0
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNaN.js +6 -0
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +11 -0
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +12 -0
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMerge.js +19 -0
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMergeDeep.js +31 -0
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePickBy.js +13 -0
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +8 -0
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +9 -0
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +9 -0
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js +22 -0
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +14 -0
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +15 -0
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +8 -0
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUniq.js +27 -0
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +6 -0
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +10 -0
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
  163. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
  164. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  165. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
  166. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
  167. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
  168. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
  169. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
  170. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createAssigner.js +15 -0
  171. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +12 -0
  172. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createFind.js +19 -0
  173. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createSet.js +9 -0
  174. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
  175. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +35 -0
  176. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +35 -0
  177. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +32 -0
  178. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
  179. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
  180. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
  181. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
  182. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js +16 -0
  183. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
  184. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
  185. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
  186. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
  187. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
  188. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
  189. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
  190. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +18 -0
  191. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
  192. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
  193. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
  194. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
  195. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
  196. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
  197. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
  198. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
  199. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
  200. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +12 -0
  201. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +11 -0
  202. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
  203. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
  204. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
  205. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +7 -0
  206. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
  207. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
  208. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
  209. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
  210. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
  211. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
  212. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  213. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
  214. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
  215. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
  216. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +9 -0
  217. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
  218. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +11 -0
  219. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
  220. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
  221. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
  222. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
  223. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
  224. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
  225. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +13 -0
  226. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
  227. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_safeGet.js +6 -0
  228. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +7 -0
  229. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +6 -0
  230. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +9 -0
  231. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +6 -0
  232. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +14 -0
  233. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
  234. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
  235. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
  236. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
  237. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
  238. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_strictIndexOf.js +7 -0
  239. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +10 -0
  240. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +10 -0
  241. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
  242. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +8 -0
  243. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
  244. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +8 -0
  245. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
  246. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/find.js +6 -0
  247. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/findIndex.js +13 -0
  248. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +8 -0
  249. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +8 -0
  250. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +6 -0
  251. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
  252. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
  253. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
  254. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js +8 -0
  255. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
  256. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
  257. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +7 -0
  258. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqualWith.js +9 -0
  259. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
  260. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
  261. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
  262. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isNumber.js +9 -0
  263. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
  264. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
  265. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isPlainObject.js +14 -0
  266. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
  267. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
  268. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
  269. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
  270. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
  271. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +16 -0
  272. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/merge.js +8 -0
  273. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/negate.js +17 -0
  274. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/noop.js +4 -0
  275. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/omitBy.js +9 -0
  276. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/pickBy.js +16 -0
  277. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +10 -0
  278. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
  279. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
  280. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toFinite.js +8 -0
  281. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toInteger.js +8 -0
  282. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +19 -0
  283. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toPlainObject.js +8 -0
  284. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +7 -0
  285. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqWith.js +7 -0
  286. package/package.json +78 -16
  287. package/CHANGELOG.json +0 -1247
  288. package/CHANGELOG.md +0 -2435
  289. package/LICENSE.md +0 -5
  290. package/README.md +0 -28
  291. package/configure/CHANGELOG.json +0 -827
  292. package/configure/CHANGELOG.md +0 -2082
  293. package/configure/lib/arrows.js +0 -89
  294. package/configure/lib/arrows.js.map +0 -1
  295. package/configure/lib/card-bar.js +0 -57
  296. package/configure/lib/card-bar.js.map +0 -1
  297. package/configure/lib/defaults.js +0 -177
  298. package/configure/lib/defaults.js.map +0 -1
  299. package/configure/lib/domain.js +0 -87
  300. package/configure/lib/domain.js.map +0 -1
  301. package/configure/lib/index.js +0 -176
  302. package/configure/lib/index.js.map +0 -1
  303. package/configure/lib/main.js +0 -815
  304. package/configure/lib/main.js.map +0 -1
  305. package/configure/lib/number-text-field.js +0 -26
  306. package/configure/lib/number-text-field.js.map +0 -1
  307. package/configure/lib/point-config.js +0 -84
  308. package/configure/lib/point-config.js.map +0 -1
  309. package/configure/lib/size.js +0 -66
  310. package/configure/lib/size.js.map +0 -1
  311. package/configure/lib/ticks.js +0 -234
  312. package/configure/lib/ticks.js.map +0 -1
  313. package/configure/lib/utils.js +0 -12
  314. package/configure/lib/utils.js.map +0 -1
  315. package/configure/package.json +0 -20
  316. package/controller/CHANGELOG.json +0 -332
  317. package/controller/CHANGELOG.md +0 -1360
  318. package/controller/lib/defaults.js +0 -56
  319. package/controller/lib/defaults.js.map +0 -1
  320. package/controller/lib/index.js +0 -430
  321. package/controller/lib/index.js.map +0 -1
  322. package/controller/lib/tickUtils.js +0 -294
  323. package/controller/lib/tickUtils.js.map +0 -1
  324. package/controller/lib/utils.js +0 -168
  325. package/controller/lib/utils.js.map +0 -1
  326. package/controller/package.json +0 -20
  327. package/demo.gif +0 -0
  328. package/docs/config-schema.json +0 -2532
  329. package/docs/config-schema.json.md +0 -1844
  330. package/docs/demo/config.js +0 -8
  331. package/docs/demo/generate.js +0 -39
  332. package/docs/demo/index.html +0 -1
  333. package/docs/pie-schema.json +0 -2461
  334. package/docs/pie-schema.json.md +0 -1228
  335. package/docs/schemas/config.json +0 -256
  336. package/lib/data-converter.js +0 -96
  337. package/lib/data-converter.js.map +0 -1
  338. package/lib/draggable/index.js +0 -114
  339. package/lib/draggable/index.js.map +0 -1
  340. package/lib/index.js +0 -196
  341. package/lib/index.js.map +0 -1
  342. package/lib/number-line/colors.js +0 -11
  343. package/lib/number-line/colors.js.map +0 -1
  344. package/lib/number-line/feedback.js +0 -92
  345. package/lib/number-line/feedback.js.map +0 -1
  346. package/lib/number-line/graph/arrow.js +0 -44
  347. package/lib/number-line/graph/arrow.js.map +0 -1
  348. package/lib/number-line/graph/elements/base.js +0 -20
  349. package/lib/number-line/graph/elements/base.js.map +0 -1
  350. package/lib/number-line/graph/elements/builder.js +0 -37
  351. package/lib/number-line/graph/elements/builder.js.map +0 -1
  352. package/lib/number-line/graph/elements/line.js +0 -259
  353. package/lib/number-line/graph/elements/line.js.map +0 -1
  354. package/lib/number-line/graph/elements/point.js +0 -204
  355. package/lib/number-line/graph/elements/point.js.map +0 -1
  356. package/lib/number-line/graph/elements/ray.js +0 -190
  357. package/lib/number-line/graph/elements/ray.js.map +0 -1
  358. package/lib/number-line/graph/index.js +0 -262
  359. package/lib/number-line/graph/index.js.map +0 -1
  360. package/lib/number-line/graph/line.js +0 -38
  361. package/lib/number-line/graph/line.js.map +0 -1
  362. package/lib/number-line/graph/stacks.js +0 -78
  363. package/lib/number-line/graph/stacks.js.map +0 -1
  364. package/lib/number-line/graph/tick-utils.js +0 -347
  365. package/lib/number-line/graph/tick-utils.js.map +0 -1
  366. package/lib/number-line/graph/ticks.js +0 -188
  367. package/lib/number-line/graph/ticks.js.map +0 -1
  368. package/lib/number-line/index.js +0 -384
  369. package/lib/number-line/index.js.map +0 -1
  370. package/lib/number-line/point-chooser/button.js +0 -49
  371. package/lib/number-line/point-chooser/button.js.map +0 -1
  372. package/lib/number-line/point-chooser/img.js +0 -8
  373. package/lib/number-line/point-chooser/img.js.map +0 -1
  374. package/lib/number-line/point-chooser/index.js +0 -197
  375. package/lib/number-line/point-chooser/index.js.map +0 -1
  376. package/lib/number-line/point-chooser/styles.js +0 -77
  377. package/lib/number-line/point-chooser/styles.js.map +0 -1
  378. package/lib/number-line/transitions/fade.js +0 -88
  379. package/lib/number-line/transitions/fade.js.map +0 -1
  380. package/lib/number-line/transitions/index.js +0 -14
  381. package/lib/number-line/transitions/index.js.map +0 -1
@@ -1,256 +0,0 @@
1
- {
2
- "title": "Number Line Question Schema",
3
- "type": "object",
4
- "definitions": {
5
- "feedbackType": {
6
- "type": "string",
7
- "enum": [
8
- "default",
9
- "custom"
10
- ]
11
- },
12
- "pointType": {
13
- "type": "string",
14
- "enum": [
15
- "full",
16
- "empty"
17
- ],
18
- "description": "Describes whether the point is filled-in or empty."
19
- },
20
- "domainPosition": {
21
- "type": "number",
22
- "description": "The position within the domain."
23
- },
24
- "point": {
25
- "type": "object",
26
- "properties": {
27
- "type": {
28
- "type": "string",
29
- "enum": [
30
- "point"
31
- ]
32
- },
33
- "pointType": {
34
- "$ref": "#/definitions/pointType"
35
- },
36
- "domainPosition": {
37
- "$ref": "#/definitions/domainPosition"
38
- }
39
- },
40
- "required": [
41
- "type",
42
- "domainPosition",
43
- "pointType"
44
- ]
45
- },
46
- "ray": {
47
- "type": "object",
48
- "properties": {
49
- "type": "string",
50
- "type": {
51
- "enum": [
52
- "ray"
53
- ]
54
- },
55
- "pointType": {
56
- "$ref": "#/definitions/pointType"
57
- },
58
- "domainPosition": {
59
- "$ref": "#/definitions/domainPosition"
60
- },
61
- "direction": {
62
- "type": "string",
63
- "enum": [
64
- "positive",
65
- "negative"
66
- ]
67
- }
68
- },
69
- "required": [
70
- "type",
71
- "pointType",
72
- "direction",
73
- "domainPosition"
74
- ]
75
- },
76
- "line": {
77
- "type": "object",
78
- "properties": {
79
- "leftPoint": {
80
- "$ref": "#/definitions/pointType"
81
- },
82
- "rightPoint": {
83
- "$ref": "#/definitions/pointType"
84
- },
85
- "domainPosition": {
86
- "$ref": "#/definitions/domainPosition"
87
- },
88
- "size": {
89
- "type": "number"
90
- }
91
- },
92
- "required": [
93
- "leftPoint",
94
- "rightPoint",
95
- "size",
96
- "domainPosition"
97
- ]
98
- }
99
- },
100
- "properties": {
101
- "correctResponse": {
102
- "type": "array",
103
- "description": "Describes the correct response of points, rays, lines to be displayed on the number line.",
104
- "items": {
105
- "oneOf": [
106
- {
107
- "$ref": "#/definitions/ray"
108
- },
109
- {
110
- "$ref": "#/definitions/line"
111
- },
112
- {
113
- "$ref": "#/definitions/point"
114
- }
115
- ]
116
- }
117
- },
118
- "feedback": {
119
- "type": "object",
120
- "properties": {
121
- "correctFeedbackType": {
122
- "$ref": "#/definitions/feedbackType"
123
- },
124
- "partialFeedbackType": {
125
- "$ref": "#/definitions/feedbackType"
126
- },
127
- "incorrectFeedbackType": {
128
- "$ref": "#/definitions/feedbackType"
129
- },
130
- "correctFeedback": {
131
- "type": "string",
132
- "description": "Feedback to render if custom is the feedbackType"
133
- },
134
- "partialFeedback": {
135
- "type": "string",
136
- "description": "Feedback to render if custom is the feedbackType"
137
- },
138
- "incorrectFeedback": {
139
- "type": "string",
140
- "description": "Feedback to render if custom is the feedbackType"
141
- }
142
- }
143
- },
144
- "allowPartialScoring": {
145
- "type": "boolean",
146
- "description": "allow partial scoring"
147
- },
148
- "partialScoring": {
149
- "type": "array",
150
- "description": "An array of rules describing what percentage to give for the number of correct responses",
151
- "items": {
152
- "type": "object",
153
- "properties": {
154
- "numberOfCorrect": {
155
- "type": "number"
156
- },
157
- "scorePercentage": {
158
- "type": "number"
159
- }
160
- },
161
- "required": [
162
- "numberOfCorrect",
163
- "scorePercentage"
164
- ]
165
- }
166
- },
167
- "model": {
168
- "type": "object",
169
- "properties": {
170
- "config": {
171
- "type": "object",
172
- "description": "An object describing the various configuration properties of the component.",
173
- "properties": {
174
- "width": {
175
- "type": "number",
176
- "description": "The width of the component",
177
- "minimum": 400,
178
- "maximum": 1600
179
- },
180
- "height": {
181
- "type": "number",
182
- "description": "The height of the component",
183
- "minimum": 300,
184
- "maximum": 800
185
- },
186
- "domain": {
187
- "type": "array",
188
- "description": "A two-number array representing the minimum and maximum values to be displayed on the number line.",
189
- "minItems": 2,
190
- "maxItems": 2
191
- },
192
- "initialType": {
193
- "type": "string",
194
- "description": "The initial type of point, line, or ray to be set by the component.",
195
- "enum": [
196
- "PF",
197
- "LEE",
198
- "LEF",
199
- "LFE",
200
- "LFF",
201
- "REP",
202
- "REN",
203
- "RFP",
204
- "RFN"
205
- ]
206
- },
207
- "snapPerTick": {
208
- "type": "number",
209
- "description": "The number of positions that are clickable between two ticks."
210
- },
211
- "exhibitOnly": {
212
- "type": "boolean",
213
- "description": "If true, the interacting with the component is disabled."
214
- },
215
- "maxNumberOfPoints": {
216
- "type": "number",
217
- "description": "The number of points which may be added to the component by the user."
218
- },
219
- "tickFrequency": {
220
- "type": "number",
221
- "description": "The total number of major ticks on the number line."
222
- },
223
- "availableTypes": {
224
- "type": "object",
225
- "description": "An object mapping point, ray, and line types to boolean values which specify whether or not the types are available for use in the component."
226
- },
227
- "initialElements": {
228
- "type": "array",
229
- "description": "Describes the elements that are to be initially displayed on the number line.",
230
- "items": {
231
- "oneOf": [
232
- {
233
- "$ref": "#/definitions/ray"
234
- },
235
- {
236
- "$ref": "#/definitions/line"
237
- },
238
- {
239
- "$ref": "#/definitions/point"
240
- }
241
- ]
242
- }
243
- }
244
- }
245
- }
246
- },
247
- "required": [
248
- "config"
249
- ]
250
- }
251
- },
252
- "required": [
253
- "correctResponse",
254
- "model"
255
- ]
256
- }
@@ -1,96 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.toSessionFormat = exports.toGraphFormat = exports.switchPosition = exports.switchGraphLine = exports.lineIsSwitched = void 0;
7
- const lineIsSwitched = line => {
8
- let {
9
- position
10
- } = line;
11
- return position.left > position.right;
12
- };
13
- exports.lineIsSwitched = lineIsSwitched;
14
- const switchGraphLine = line => {
15
- let {
16
- position
17
- } = line;
18
- if (position.left < position.right) {
19
- return line;
20
- }
21
- let {
22
- leftPoint: newRightPoint,
23
- rightPoint: newLeftPoint
24
- } = line;
25
- return {
26
- leftPoint: newLeftPoint,
27
- rightPoint: newRightPoint,
28
- position: switchPosition(position),
29
- type: 'line'
30
- };
31
- };
32
- exports.switchGraphLine = switchGraphLine;
33
- const switchPosition = p => {
34
- let {
35
- left: newRight,
36
- right: newLeft
37
- } = p;
38
- return {
39
- left: newLeft,
40
- right: newRight
41
- };
42
- };
43
- exports.switchPosition = switchPosition;
44
- const toSessionFormat = gf => {
45
- if (gf.type === 'point') {
46
- return {
47
- type: 'point',
48
- pointType: gf.pointType,
49
- domainPosition: gf.position
50
- };
51
- } else if (gf.type === 'line') {
52
- return {
53
- type: 'line',
54
- size: gf.position.right - gf.position.left,
55
- domainPosition: gf.position.left,
56
- leftPoint: gf.leftPoint,
57
- rightPoint: gf.rightPoint
58
- };
59
- } else if (gf.type === 'ray') {
60
- return {
61
- type: 'ray',
62
- domainPosition: gf.position,
63
- pointType: gf.pointType,
64
- direction: gf.direction
65
- };
66
- }
67
- };
68
- exports.toSessionFormat = toSessionFormat;
69
- const toGraphFormat = sf => {
70
- if (sf.type === 'point') {
71
- return {
72
- type: 'point',
73
- pointType: sf.pointType,
74
- position: sf.domainPosition
75
- };
76
- } else if (sf.type === 'line') {
77
- return {
78
- type: 'line',
79
- position: {
80
- left: sf.domainPosition,
81
- right: sf.domainPosition + sf.size
82
- },
83
- leftPoint: sf.leftPoint,
84
- rightPoint: sf.rightPoint
85
- };
86
- } else if (sf.type === 'ray') {
87
- return {
88
- type: 'ray',
89
- position: sf.domainPosition,
90
- pointType: sf.pointType,
91
- direction: sf.direction
92
- };
93
- }
94
- };
95
- exports.toGraphFormat = toGraphFormat;
96
- //# sourceMappingURL=data-converter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"data-converter.js","names":["lineIsSwitched","line","position","left","right","exports","switchGraphLine","leftPoint","newRightPoint","rightPoint","newLeftPoint","switchPosition","type","p","newRight","newLeft","toSessionFormat","gf","pointType","domainPosition","size","direction","toGraphFormat","sf"],"sources":["../src/data-converter.js"],"sourcesContent":["export const lineIsSwitched = (line) => {\n let { position } = line;\n return position.left > position.right;\n};\n\nexport const switchGraphLine = (line) => {\n let { position } = line;\n\n if (position.left < position.right) {\n return line;\n }\n\n let { leftPoint: newRightPoint, rightPoint: newLeftPoint } = line;\n\n return {\n leftPoint: newLeftPoint,\n rightPoint: newRightPoint,\n position: switchPosition(position),\n type: 'line',\n };\n};\n\nexport const switchPosition = (p) => {\n let { left: newRight, right: newLeft } = p;\n return { left: newLeft, right: newRight };\n};\n\nexport const toSessionFormat = (gf) => {\n if (gf.type === 'point') {\n return {\n type: 'point',\n pointType: gf.pointType,\n domainPosition: gf.position,\n };\n } else if (gf.type === 'line') {\n return {\n type: 'line',\n size: gf.position.right - gf.position.left,\n domainPosition: gf.position.left,\n leftPoint: gf.leftPoint,\n rightPoint: gf.rightPoint,\n };\n } else if (gf.type === 'ray') {\n return {\n type: 'ray',\n domainPosition: gf.position,\n pointType: gf.pointType,\n direction: gf.direction,\n };\n }\n};\n\nexport const toGraphFormat = (sf) => {\n if (sf.type === 'point') {\n return {\n type: 'point',\n pointType: sf.pointType,\n position: sf.domainPosition,\n };\n } else if (sf.type === 'line') {\n return {\n type: 'line',\n position: {\n left: sf.domainPosition,\n right: sf.domainPosition + sf.size,\n },\n leftPoint: sf.leftPoint,\n rightPoint: sf.rightPoint,\n };\n } else if (sf.type === 'ray') {\n return {\n type: 'ray',\n position: sf.domainPosition,\n pointType: sf.pointType,\n direction: sf.direction,\n };\n }\n};\n"],"mappings":"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","ignoreList":[]}
@@ -1,114 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.Draggable = Draggable;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _core = require("@dnd-kit/core");
10
- // Draggable.jsx
11
-
12
- /**
13
- * Shared dnd-kit wrapper for Line + Point.
14
- *
15
- * Props:
16
- * - id: string (unique)
17
- * - disabled: boolean
18
- * - grid: [stepX] (like grid={[is]})
19
- * - bounds: { left: number, right: number } in px (like scaledLineBounds)
20
- * - onMouseDown: (event) => void
21
- * - onDragStart?: () => void
22
- * - onDragMove?: (deltaX: number) => void // snapped + clamped
23
- * - onDragEnd?: (deltaX: number) => void // snapped + clamped
24
- * - children: ({ setNodeRef, attributes, listeners, translateX, isDragging, onMouseDown }) => ReactNode
25
- */
26
- function Draggable({
27
- id,
28
- disabled,
29
- grid,
30
- bounds,
31
- onMouseDown,
32
- onDragStart,
33
- onDragMove,
34
- onDragEnd,
35
- children
36
- }) {
37
- const {
38
- attributes,
39
- listeners,
40
- setNodeRef,
41
- transform
42
- } = (0, _core.useDraggable)({
43
- id,
44
- disabled
45
- });
46
- const step = grid && grid[0] ? grid[0] : null;
47
-
48
- // current transform.x from dnd-kit
49
- let rawX = transform?.x ?? 0;
50
-
51
- // grid snapping (grid={[step]})
52
- if (step) {
53
- rawX = Math.round(rawX / step) * step;
54
- }
55
-
56
- // clamp to bounds in px
57
- if (bounds) {
58
- if (typeof bounds.left === 'number') {
59
- rawX = Math.max(bounds.left, rawX);
60
- }
61
- if (typeof bounds.right === 'number') {
62
- rawX = Math.min(bounds.right, rawX);
63
- }
64
- }
65
- const translateX = rawX;
66
- const isDragging = !!transform;
67
-
68
- // helpers to apply same snap+clamp to deltaX before callbacks
69
- const snapClampDeltaX = deltaX => {
70
- let x = deltaX;
71
- if (step) {
72
- x = Math.round(x / step) * step;
73
- }
74
- if (bounds) {
75
- if (typeof bounds.left === 'number') {
76
- x = Math.max(bounds.left, x);
77
- }
78
- if (typeof bounds.right === 'number') {
79
- x = Math.min(bounds.right, x);
80
- }
81
- }
82
- return x;
83
- };
84
- (0, _core.useDndMonitor)({
85
- onDragStart(event) {
86
- if (event.active.id !== id || disabled) return;
87
- onDragStart?.();
88
- },
89
- onDragMove(event) {
90
- if (event.active.id !== id || disabled) return;
91
- const deltaX = event.delta.x || 0;
92
- onDragMove?.(snapClampDeltaX(deltaX));
93
- },
94
- onDragEnd(event) {
95
- if (event.active.id !== id || disabled) return;
96
- const deltaX = event.delta.x || 0;
97
- onDragEnd?.(snapClampDeltaX(deltaX));
98
- }
99
- });
100
- const handleMouseDown = e => {
101
- // same as before: prevent text selection
102
- e.nativeEvent.preventDefault();
103
- onMouseDown?.(e);
104
- };
105
- return children({
106
- setNodeRef,
107
- attributes,
108
- listeners,
109
- translateX,
110
- isDragging,
111
- onMouseDown: handleMouseDown
112
- });
113
- }
114
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_core","Draggable","id","disabled","grid","bounds","onMouseDown","onDragStart","onDragMove","onDragEnd","children","attributes","listeners","setNodeRef","transform","useDraggable","step","rawX","x","Math","round","left","max","right","min","translateX","isDragging","snapClampDeltaX","deltaX","useDndMonitor","event","active","delta","handleMouseDown","e","nativeEvent","preventDefault"],"sources":["../../src/draggable/index.js"],"sourcesContent":["// Draggable.jsx\nimport React from 'react';\nimport { useDraggable, useDndMonitor } from '@dnd-kit/core';\n\n/**\n * Shared dnd-kit wrapper for Line + Point.\n *\n * Props:\n * - id: string (unique)\n * - disabled: boolean\n * - grid: [stepX] (like grid={[is]})\n * - bounds: { left: number, right: number } in px (like scaledLineBounds)\n * - onMouseDown: (event) => void\n * - onDragStart?: () => void\n * - onDragMove?: (deltaX: number) => void // snapped + clamped\n * - onDragEnd?: (deltaX: number) => void // snapped + clamped\n * - children: ({ setNodeRef, attributes, listeners, translateX, isDragging, onMouseDown }) => ReactNode\n */\nexport function Draggable({\n id,\n disabled,\n grid,\n bounds,\n onMouseDown,\n onDragStart,\n onDragMove,\n onDragEnd,\n children,\n}) {\n const { attributes, listeners, setNodeRef, transform } = useDraggable({\n id,\n disabled,\n });\n\n const step = grid && grid[0] ? grid[0] : null;\n\n // current transform.x from dnd-kit\n let rawX = transform?.x ?? 0;\n\n // grid snapping (grid={[step]})\n if (step) {\n rawX = Math.round(rawX / step) * step;\n }\n\n // clamp to bounds in px\n if (bounds) {\n if (typeof bounds.left === 'number') {\n rawX = Math.max(bounds.left, rawX);\n }\n if (typeof bounds.right === 'number') {\n rawX = Math.min(bounds.right, rawX);\n }\n }\n\n const translateX = rawX;\n const isDragging = !!transform;\n\n // helpers to apply same snap+clamp to deltaX before callbacks\n const snapClampDeltaX = (deltaX) => {\n let x = deltaX;\n if (step) {\n x = Math.round(x / step) * step;\n }\n if (bounds) {\n if (typeof bounds.left === 'number') {\n x = Math.max(bounds.left, x);\n }\n if (typeof bounds.right === 'number') {\n x = Math.min(bounds.right, x);\n }\n }\n return x;\n };\n\n useDndMonitor({\n onDragStart(event) {\n if (event.active.id !== id || disabled) return;\n onDragStart?.();\n },\n onDragMove(event) {\n if (event.active.id !== id || disabled) return;\n const deltaX = event.delta.x || 0;\n onDragMove?.(snapClampDeltaX(deltaX));\n },\n onDragEnd(event) {\n if (event.active.id !== id || disabled) return;\n const deltaX = event.delta.x || 0;\n onDragEnd?.(snapClampDeltaX(deltaX));\n },\n });\n\n const handleMouseDown = (e) => {\n // same as before: prevent text selection\n e.nativeEvent.preventDefault();\n onMouseDown?.(e);\n };\n\n return children({\n setNodeRef,\n attributes,\n listeners,\n translateX,\n isDragging,\n onMouseDown: handleMouseDown,\n });\n}\n"],"mappings":";;;;;;;AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAFA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,SAASA,CAAC;EACxBC,EAAE;EACFC,QAAQ;EACRC,IAAI;EACJC,MAAM;EACNC,WAAW;EACXC,WAAW;EACXC,UAAU;EACVC,SAAS;EACTC;AACF,CAAC,EAAE;EACD,MAAM;IAAEC,UAAU;IAAEC,SAAS;IAAEC,UAAU;IAAEC;EAAU,CAAC,GAAG,IAAAC,kBAAY,EAAC;IACpEb,EAAE;IACFC;EACF,CAAC,CAAC;EAEF,MAAMa,IAAI,GAAGZ,IAAI,IAAIA,IAAI,CAAC,CAAC,CAAC,GAAGA,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI;;EAE7C;EACA,IAAIa,IAAI,GAAGH,SAAS,EAAEI,CAAC,IAAI,CAAC;;EAE5B;EACA,IAAIF,IAAI,EAAE;IACRC,IAAI,GAAGE,IAAI,CAACC,KAAK,CAACH,IAAI,GAAGD,IAAI,CAAC,GAAGA,IAAI;EACvC;;EAEA;EACA,IAAIX,MAAM,EAAE;IACV,IAAI,OAAOA,MAAM,CAACgB,IAAI,KAAK,QAAQ,EAAE;MACnCJ,IAAI,GAAGE,IAAI,CAACG,GAAG,CAACjB,MAAM,CAACgB,IAAI,EAAEJ,IAAI,CAAC;IACpC;IACA,IAAI,OAAOZ,MAAM,CAACkB,KAAK,KAAK,QAAQ,EAAE;MACpCN,IAAI,GAAGE,IAAI,CAACK,GAAG,CAACnB,MAAM,CAACkB,KAAK,EAAEN,IAAI,CAAC;IACrC;EACF;EAEA,MAAMQ,UAAU,GAAGR,IAAI;EACvB,MAAMS,UAAU,GAAG,CAAC,CAACZ,SAAS;;EAE9B;EACA,MAAMa,eAAe,GAAIC,MAAM,IAAK;IAClC,IAAIV,CAAC,GAAGU,MAAM;IACd,IAAIZ,IAAI,EAAE;MACRE,CAAC,GAAGC,IAAI,CAACC,KAAK,CAACF,CAAC,GAAGF,IAAI,CAAC,GAAGA,IAAI;IACjC;IACA,IAAIX,MAAM,EAAE;MACV,IAAI,OAAOA,MAAM,CAACgB,IAAI,KAAK,QAAQ,EAAE;QACnCH,CAAC,GAAGC,IAAI,CAACG,GAAG,CAACjB,MAAM,CAACgB,IAAI,EAAEH,CAAC,CAAC;MAC9B;MACA,IAAI,OAAOb,MAAM,CAACkB,KAAK,KAAK,QAAQ,EAAE;QACpCL,CAAC,GAAGC,IAAI,CAACK,GAAG,CAACnB,MAAM,CAACkB,KAAK,EAAEL,CAAC,CAAC;MAC/B;IACF;IACA,OAAOA,CAAC;EACV,CAAC;EAED,IAAAW,mBAAa,EAAC;IACZtB,WAAWA,CAACuB,KAAK,EAAE;MACjB,IAAIA,KAAK,CAACC,MAAM,CAAC7B,EAAE,KAAKA,EAAE,IAAIC,QAAQ,EAAE;MACxCI,WAAW,GAAG,CAAC;IACjB,CAAC;IACDC,UAAUA,CAACsB,KAAK,EAAE;MAChB,IAAIA,KAAK,CAACC,MAAM,CAAC7B,EAAE,KAAKA,EAAE,IAAIC,QAAQ,EAAE;MACxC,MAAMyB,MAAM,GAAGE,KAAK,CAACE,KAAK,CAACd,CAAC,IAAI,CAAC;MACjCV,UAAU,GAAGmB,eAAe,CAACC,MAAM,CAAC,CAAC;IACvC,CAAC;IACDnB,SAASA,CAACqB,KAAK,EAAE;MACf,IAAIA,KAAK,CAACC,MAAM,CAAC7B,EAAE,KAAKA,EAAE,IAAIC,QAAQ,EAAE;MACxC,MAAMyB,MAAM,GAAGE,KAAK,CAACE,KAAK,CAACd,CAAC,IAAI,CAAC;MACjCT,SAAS,GAAGkB,eAAe,CAACC,MAAM,CAAC,CAAC;IACtC;EACF,CAAC,CAAC;EAEF,MAAMK,eAAe,GAAIC,CAAC,IAAK;IAC7B;IACAA,CAAC,CAACC,WAAW,CAACC,cAAc,CAAC,CAAC;IAC9B9B,WAAW,GAAG4B,CAAC,CAAC;EAClB,CAAC;EAED,OAAOxB,QAAQ,CAAC;IACdG,UAAU;IACVF,UAAU;IACVC,SAAS;IACTa,UAAU;IACVC,UAAU;IACVpB,WAAW,EAAE2B;EACf,CAAC,CAAC;AACJ","ignoreList":[]}
package/lib/index.js DELETED
@@ -1,196 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- Object.defineProperty(exports, "Graph", {
8
- enumerable: true,
9
- get: function () {
10
- return _graph.default;
11
- }
12
- });
13
- Object.defineProperty(exports, "NumberLineComponent", {
14
- enumerable: true,
15
- get: function () {
16
- return _numberLine.default;
17
- }
18
- });
19
- exports.tickUtils = exports.pointChooser = exports.default = exports.dataConverter = void 0;
20
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
21
- var _dataConverter = _interopRequireWildcard(require("./data-converter"));
22
- var dataConverter = _dataConverter;
23
- exports.dataConverter = _dataConverter;
24
- var pointChooser = _interopRequireWildcard(require("./number-line/point-chooser"));
25
- exports.pointChooser = pointChooser;
26
- var tickUtils = _interopRequireWildcard(require("./number-line/graph/tick-utils"));
27
- exports.tickUtils = tickUtils;
28
- var _graph = _interopRequireDefault(require("./number-line/graph"));
29
- var _numberLine = _interopRequireDefault(require("./number-line"));
30
- var _react = _interopRequireDefault(require("react"));
31
- var _client = require("react-dom/client");
32
- var _lodashEs = require("lodash-es");
33
- var _mathRendering = require("@pie-lib/math-rendering");
34
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
35
- //Expose some additional modules for configuration
36
-
37
- class NumberLine extends HTMLElement {
38
- constructor() {
39
- super();
40
- (0, _defineProperty2.default)(this, "_scheduleMathRender", () => {
41
- if (this._mathRenderPending) return;
42
- this._mathRenderPending = true;
43
- requestAnimationFrame(() => {
44
- if (this._mathObserver) {
45
- this._mathObserver.disconnect();
46
- }
47
- (0, _mathRendering.renderMath)(this);
48
- this._mathRenderPending = false;
49
- setTimeout(() => {
50
- if (this._mathObserver) {
51
- this._mathObserver.observe(this, {
52
- childList: true,
53
- subtree: true,
54
- characterData: false
55
- });
56
- }
57
- }, 50);
58
- });
59
- });
60
- this._root = null;
61
- this._mathObserver = null;
62
- this._mathRenderPending = false;
63
- }
64
- _initMathObserver() {
65
- if (this._mathObserver) return;
66
- this._mathObserver = new MutationObserver(() => {
67
- this._scheduleMathRender();
68
- });
69
- this._mathObserver.observe(this, {
70
- childList: true,
71
- subtree: true,
72
- characterData: false
73
- });
74
- }
75
- _disconnectMathObserver() {
76
- if (this._mathObserver) {
77
- this._mathObserver.disconnect();
78
- this._mathObserver = null;
79
- }
80
- }
81
- set model(m) {
82
- this._model = m;
83
- this._applyInitialElements();
84
- this._render();
85
- this.dispatch('model-set');
86
- }
87
- set session(s) {
88
- this._session = s;
89
- this._applyInitialElements();
90
- this._render();
91
- }
92
- get session() {
93
- return this._session;
94
- }
95
- connectedCallback() {
96
- this._initMathObserver();
97
- this._render();
98
- }
99
- isComplete() {
100
- return this._session ? (this._session.answer || []).length > 0 : false;
101
- }
102
- dispatch(type) {
103
- this.dispatchEvent(new CustomEvent(type, {
104
- bubbles: true,
105
- detail: {
106
- complete: this.isComplete()
107
- }
108
- }));
109
- }
110
- dispatchSessionChanged() {
111
- this.dispatch('session-changed');
112
- }
113
- addElement(data) {
114
- if (!this._session) {
115
- return;
116
- }
117
- this._session.answer = this._session.answer || [];
118
- this._session.answer.push((0, _dataConverter.toSessionFormat)(data));
119
- this.dispatchSessionChanged();
120
- this._render();
121
- }
122
- moveElement(index, el, position) {
123
- let answer = this._session.answer[index];
124
- if (!answer) {
125
- throw new Error('cant find element at index: ', index);
126
- }
127
- if (el.type === 'line' && position.left === position.right) {
128
- this._render();
129
- return;
130
- }
131
-
132
- //set the new position
133
- el.position = position;
134
- let update = el.type === 'line' && (0, _dataConverter.lineIsSwitched)(el) ? (0, _dataConverter.switchGraphLine)(el) : el;
135
- this._session.answer.splice(index, 1, (0, _dataConverter.toSessionFormat)(update));
136
- this.dispatchSessionChanged();
137
- this._render();
138
- }
139
- deleteElements(indices) {
140
- this._session.answer = this._session.answer.filter((v, index) => {
141
- return !indices.some(d => d === index);
142
- });
143
- this.dispatchSessionChanged();
144
- this._render();
145
- }
146
- undoElement() {
147
- this._session.answer.pop();
148
- this.dispatchSessionChanged();
149
- this._render();
150
- }
151
- clearElements() {
152
- this._session.answer = [];
153
- this.dispatchSessionChanged();
154
- this._render();
155
- }
156
- _applyInitialElements() {
157
- if (this._model && this._model.graph && this._model.graph.initialElements && this._session && (!this._session.answer || !this._session.answer.length)) {
158
- this._session.answer = (0, _lodashEs.cloneDeep)(this._model.graph.initialElements);
159
- }
160
- }
161
- _render() {
162
- if (this._model && this._session) {
163
- if (!this._session.answer) {
164
- this._applyInitialElements();
165
- }
166
- let answer = (this._session.answer || []).map(_dataConverter.toGraphFormat);
167
- let model = (0, _lodashEs.cloneDeep)(this._model);
168
- model.correctResponse = model.correctResponse && model.correctResponse.map(_dataConverter.toGraphFormat);
169
- let props = {
170
- model,
171
- answer,
172
- onAddElement: this.addElement.bind(this),
173
- onMoveElement: this.moveElement.bind(this),
174
- onDeleteElements: this.deleteElements.bind(this),
175
- onUndoElement: this.undoElement.bind(this),
176
- onClearElements: this.clearElements.bind(this)
177
- };
178
- let el = /*#__PURE__*/_react.default.createElement(_numberLine.default, props);
179
- if (!this._root) {
180
- this._root = (0, _client.createRoot)(this);
181
- }
182
- this._root.render(el);
183
-
184
- // schedule math rendering via observer pipeline (for initial render as well)
185
- this._scheduleMathRender();
186
- }
187
- }
188
- disconnectedCallback() {
189
- this._disconnectMathObserver();
190
- if (this._root) {
191
- this._root.unmount();
192
- }
193
- }
194
- }
195
- exports.default = NumberLine;
196
- //# sourceMappingURL=index.js.map