@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
@@ -0,0 +1,196 @@
1
+ import { snapTo as e } from "./tick-utils.js";
2
+ import t from "./elements/point.js";
3
+ import n from "./elements/line.js";
4
+ import r from "./arrow.js";
5
+ import i from "./elements/ray.js";
6
+ import a from "./line.js";
7
+ import o from "./ticks.js";
8
+ import s from "./stacks.js";
9
+ import c from "../transitions/fade.js";
10
+ import l, { createElement as u } from "react";
11
+ import d from "prop-types";
12
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
13
+ import { scaleLinear as m } from "d3-scale";
14
+ import { pointer as h, select as g } from "d3-selection";
15
+ import { color as _ } from "@pie-lib/render-ui";
16
+ import { DndContext as v } from "@dnd-kit/core";
17
+ import { TransitionGroup as y } from "react-transition-group";
18
+ //#region src/delivery/number-line/graph/index.tsx
19
+ var b = (e, t, n, r) => {
20
+ if (e === void 0 || t === void 0 || n === void 0) throw Error("missing min/max/width");
21
+ return m().domain([e, t]).range([r, n - r]);
22
+ }, x = class extends l.Component {
23
+ static childContextTypes = {
24
+ xScale: d.func.isRequired,
25
+ snapValue: d.func.isRequired
26
+ };
27
+ static propTypes = {
28
+ domain: d.shape({
29
+ min: d.number.isRequired,
30
+ max: d.number.isRequired
31
+ }).isRequired,
32
+ ticks: d.shape({
33
+ minor: d.number,
34
+ major: d.number
35
+ }).isRequired,
36
+ fraction: d.bool,
37
+ width: d.number.isRequired,
38
+ height: d.number.isRequired,
39
+ onToggleElement: d.func.isRequired,
40
+ onMoveElement: d.func.isRequired,
41
+ onAddElement: d.func.isRequired,
42
+ debug: d.bool,
43
+ elements: d.array,
44
+ disabled: d.bool,
45
+ onDeselectElements: d.func,
46
+ arrows: d.shape({
47
+ left: d.bool,
48
+ right: d.bool
49
+ })
50
+ };
51
+ static defaultProps = { debug: !1 };
52
+ constructor(e) {
53
+ super(e), this.state = {};
54
+ }
55
+ xScaleFn() {
56
+ let { domain: e, width: t } = this.props, { max: n, min: r } = e || {}, i = 20;
57
+ return n && (i = n.toString().length * 4 + 15), b(r, n, t, i);
58
+ }
59
+ snapValueFn() {
60
+ let { domain: t, ticks: n } = this.props;
61
+ return e.bind(null, t.min, t.max, n.minor);
62
+ }
63
+ getChildContext() {
64
+ return {
65
+ xScale: this.xScaleFn(),
66
+ snapValue: this.snapValueFn()
67
+ };
68
+ }
69
+ onRectClick(e) {
70
+ let { elements: t, disabled: n } = this.props;
71
+ if (!n) if (t.some((e) => e.selected)) this.props.onDeselectElements();
72
+ else {
73
+ let t = h(e, this.rect), n = this.xScaleFn().invert(t[0]);
74
+ this.addElement(n);
75
+ }
76
+ }
77
+ componentDidMount() {
78
+ g(this.rect).on("click", this.onRectClick.bind(this));
79
+ }
80
+ addElement(e) {
81
+ let t = this.snapValueFn()(e);
82
+ this.props.onAddElement(t);
83
+ }
84
+ render() {
85
+ let { domain: e, width: l, ticks: d, height: m, onToggleElement: h, onMoveElement: g, disabled: b, fraction: x } = this.props, { arrows: S } = this.props;
86
+ S ||= {
87
+ left: !0,
88
+ right: !0
89
+ };
90
+ let { min: C, max: w } = e;
91
+ if (e.max <= e.min) return /* @__PURE__ */ p("div", { children: [
92
+ e.max,
93
+ " is less than or equal to ",
94
+ e.min
95
+ ] });
96
+ {
97
+ let T = m - 30, E = new s(e), D = this.props.elements.map((e, r) => {
98
+ let a = E.add(e);
99
+ if (a === -1) throw Error("stack index is -1, cant add element");
100
+ let o = {
101
+ key: r,
102
+ y: T - a * 25,
103
+ selected: e.selected && !b,
104
+ interval: d.minor,
105
+ disabled: b,
106
+ correct: e.correct
107
+ }, s = h.bind(null, r, e), c = g.bind(null, r, e);
108
+ if (e.type === "line") {
109
+ let t = {
110
+ left: e.leftPoint === "empty",
111
+ right: e.rightPoint === "empty"
112
+ };
113
+ return /* @__PURE__ */ u(n, {
114
+ ...o,
115
+ domain: {
116
+ min: C,
117
+ max: w
118
+ },
119
+ onMoveLine: c,
120
+ onToggleSelect: s,
121
+ position: e.position,
122
+ empty: t,
123
+ key: r
124
+ });
125
+ } else if (e.type === "point") {
126
+ let n = {
127
+ left: C - e.position,
128
+ right: w - e.position
129
+ };
130
+ return /* @__PURE__ */ u(t, {
131
+ ...o,
132
+ empty: e.pointType === "empty",
133
+ position: e.position,
134
+ bounds: n,
135
+ onClick: s,
136
+ onMove: c,
137
+ key: r
138
+ });
139
+ } else if (e.type === "ray") return /* @__PURE__ */ u(i, {
140
+ ...o,
141
+ domain: {
142
+ min: C,
143
+ max: w
144
+ },
145
+ direction: e.direction,
146
+ position: e.position,
147
+ onMove: c,
148
+ onToggleSelect: s,
149
+ width: l,
150
+ empty: e.pointType === "empty",
151
+ key: r
152
+ });
153
+ });
154
+ return /* @__PURE__ */ f(v, { children: /* @__PURE__ */ f("div", {
155
+ style: { display: "inline-block" },
156
+ children: /* @__PURE__ */ p("svg", {
157
+ width: l,
158
+ height: x ? m + 20 : m,
159
+ children: [
160
+ !1,
161
+ /* @__PURE__ */ f(a, {
162
+ y: T,
163
+ width: l
164
+ }),
165
+ S.left && /* @__PURE__ */ f(r, { y: T }),
166
+ S.right && /* @__PURE__ */ f(r, {
167
+ x: l,
168
+ y: T,
169
+ direction: "right"
170
+ }),
171
+ /* @__PURE__ */ f(o, {
172
+ y: T,
173
+ domain: e,
174
+ width: l,
175
+ ticks: d,
176
+ fraction: x
177
+ }),
178
+ /* @__PURE__ */ f("rect", {
179
+ ref: (e) => this.rect = e,
180
+ fill: _.primary(),
181
+ fillOpacity: "0.0",
182
+ width: l,
183
+ height: m
184
+ }),
185
+ /* @__PURE__ */ f(y, {
186
+ component: "g",
187
+ children: D.map((e, t) => /* @__PURE__ */ f(c, { children: e }, t))
188
+ })
189
+ ]
190
+ })
191
+ }) });
192
+ }
193
+ }
194
+ };
195
+ //#endregion
196
+ export { x as default };
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/number-line/src/number-line/graph/line.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare function Line({ y, width, classes }: {
12
+ y: any;
13
+ width: any;
14
+ classes: any;
15
+ }): React.JSX.Element;
16
+ export declare namespace Line {
17
+ var propTypes: {
18
+ y: PropTypes.Validator<number>;
19
+ width: PropTypes.Validator<number>;
20
+ classes: PropTypes.Validator<object>;
21
+ };
22
+ }
23
+ declare const _default: React.ComponentType<Pick<Omit<{
24
+ y: any;
25
+ width: any;
26
+ classes: any;
27
+ }, "classes"> & {
28
+ classes?: Partial<{
29
+ root: string;
30
+ }> | undefined;
31
+ innerRef?: React.RefObject<any> | ((instance: any) => void);
32
+ }, "classes" | "innerRef"> & Pick<PropTypes.InferProps<{
33
+ y: PropTypes.Validator<number>;
34
+ width: PropTypes.Validator<number>;
35
+ classes: PropTypes.Validator<object>;
36
+ }>, "y" | "width"> & Pick<Omit<{
37
+ y: any;
38
+ width: any;
39
+ classes: any;
40
+ }, "classes"> & {
41
+ classes?: Partial<{
42
+ root: string;
43
+ }> | undefined;
44
+ innerRef?: React.RefObject<any> | ((instance: any) => void);
45
+ }, "innerRef">>;
46
+ export default _default;
@@ -0,0 +1,27 @@
1
+ import "react";
2
+ import e from "prop-types";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ import { color as n } from "@pie-lib/render-ui";
5
+ import r from "react-jss";
6
+ //#region src/delivery/number-line/graph/line.tsx
7
+ var i = { root: {
8
+ strokeWidth: 2,
9
+ stroke: n.primary()
10
+ } };
11
+ function a({ y: e, width: n, classes: r }) {
12
+ return /* @__PURE__ */ t("line", {
13
+ x1: 0,
14
+ y1: e,
15
+ x2: n,
16
+ y2: e,
17
+ className: r.root
18
+ });
19
+ }
20
+ a.propTypes = {
21
+ y: e.number.isRequired,
22
+ width: e.number.isRequired,
23
+ classes: e.object.isRequired
24
+ };
25
+ var o = r(i)(a);
26
+ //#endregion
27
+ export { o as default };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/number-line/src/number-line/graph/stacks.js
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ export default function Stacks(domain: any): void;
10
+ export declare function Stack(domain: any): void;
@@ -0,0 +1,40 @@
1
+ //#region src/delivery/number-line/graph/stacks.ts
2
+ function e(e) {
3
+ let n = [new t(e)];
4
+ this.add = function(r) {
5
+ let i = n.find((e) => e.add(r));
6
+ return n.indexOf(i) === -1 && (i = new t(e), n.push(i), i.add(r)), n.indexOf(i);
7
+ };
8
+ }
9
+ function t(e) {
10
+ let t = [];
11
+ this.add = function(i) {
12
+ let a = r(i);
13
+ return a.left < e.min || a.right > e.max || t.some((e) => n(e, a)) ? !1 : (t.push(i), !0);
14
+ }, this.elements = function() {
15
+ return t;
16
+ };
17
+ let n = (e, t) => {
18
+ let n = r(e), i = t.left < n.left && t.right < n.left, a = t.left > n.right && t.right > n.right;
19
+ return !(i || a);
20
+ }, r = (t) => {
21
+ let { type: n, position: r } = t;
22
+ switch (n) {
23
+ case "point": return {
24
+ left: r,
25
+ right: r
26
+ };
27
+ case "line": return r;
28
+ case "ray": return t.direction === "positive" ? {
29
+ left: r,
30
+ right: e.max
31
+ } : {
32
+ left: e.min,
33
+ right: r
34
+ };
35
+ default: return null;
36
+ }
37
+ };
38
+ }
39
+ //#endregion
40
+ export { e as default };
@@ -0,0 +1,73 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/number-line/src/number-line/graph/tick-utils.js
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ export declare const decimalTickValues: number[];
10
+ export declare const fractionTickValues: string[];
11
+ export declare const labelMultiplier: {
12
+ 1: number[];
13
+ 2: number[];
14
+ 3: number[];
15
+ 4: number[];
16
+ 5: number[];
17
+ 6: number[];
18
+ 7: number[];
19
+ 8: number[];
20
+ 9: number[];
21
+ 10: number[];
22
+ 12: number[];
23
+ 15: number[];
24
+ 16: number[];
25
+ 20: number[];
26
+ 25: number[];
27
+ 32: number[];
28
+ 50: number[];
29
+ 64: number[];
30
+ 100: number[];
31
+ 1000: number[];
32
+ };
33
+ export declare const fractionRange: (start: any, end: any, interval: any) => any[];
34
+ export declare const zbrErrorMessage: (start: any, end: any) => string;
35
+ export declare const zeroBasedRange: (start: any, end: any, interval: any) => any[];
36
+ /**
37
+ * the lodash range was causing too much variance in the rounding errors
38
+ * such that it was hard to round the numbers.
39
+ * This is a more simplistic version but makes rounding work.
40
+ */
41
+ export declare const simpleRange: (start: any, end: any, interval: any) => any;
42
+ export declare const closeTo: (a: any, b: any, precision: any) => boolean;
43
+ export declare const getMinorLimits: (domain: any, width: any) => {
44
+ min: any;
45
+ max: any;
46
+ };
47
+ export declare const isMultiple: (multiple: any, src: any) => any;
48
+ /**
49
+ * Accepts a fraction object {n,d,s} or number.
50
+ * @param {*} v
51
+ * @return mathjs.fraction
52
+ */
53
+ export declare const fraction: (v: any) => any;
54
+ export declare const normalizeTicks: (domain: any, width: any, ticks: any, opts: any) => {
55
+ minor: any;
56
+ major: any;
57
+ };
58
+ /**
59
+ * Build ticks as an array of mathjs Fractions
60
+ */
61
+ export declare const buildTickDataAsFractions: (domain: any, width: any, ticks: any, opts: any) => any;
62
+ export declare const generateMinorValues: (minorLimits: any) => {
63
+ fraction: never[];
64
+ decimal: never[];
65
+ };
66
+ export declare const generateMajorValuesForMinor: (minor: any, domain: any, width: any) => {
67
+ decimal: never[];
68
+ fraction: never[];
69
+ };
70
+ export declare const buildTickData: (domain: any, width: any, ticks: any, opts: any) => any;
71
+ export declare const fractionSnapTo: (min: any, max: any, interval: any, value: any) => any;
72
+ export declare const snapTo: (min: any, max: any, interval: any, value: any) => any;
73
+ export declare const snapElements: (domain: any, ticks: any, elements: any) => any;
@@ -0,0 +1,297 @@
1
+ import { __exportAll as e } from "../../../_virtual/_rolldown/runtime.js";
2
+ import t from "../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js";
3
+ import n from "../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isNumber.js";
4
+ import r from "../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqWith.js";
5
+ import * as i from "mathjs";
6
+ //#region src/delivery/number-line/graph/tick-utils.ts
7
+ var a = /* @__PURE__ */ e({
8
+ buildTickData: () => w,
9
+ buildTickDataAsFractions: () => x,
10
+ closeTo: () => h,
11
+ decimalTickValues: () => o,
12
+ fraction: () => y,
13
+ fractionRange: () => l,
14
+ fractionSnapTo: () => T,
15
+ fractionTickValues: () => s,
16
+ generateMajorValuesForMinor: () => C,
17
+ generateMinorValues: () => S,
18
+ getMinorLimits: () => _,
19
+ isMultiple: () => v,
20
+ labelMultiplier: () => c,
21
+ normalizeTicks: () => b,
22
+ simpleRange: () => m,
23
+ snapElements: () => D,
24
+ snapTo: () => E,
25
+ zbrErrorMessage: () => u,
26
+ zeroBasedRange: () => d
27
+ }), o = [
28
+ .001,
29
+ .01,
30
+ .02,
31
+ .04,
32
+ .05,
33
+ .1,
34
+ .125,
35
+ .2,
36
+ .25,
37
+ .5
38
+ ], s = [
39
+ "1/1000",
40
+ "1/100",
41
+ "1/64",
42
+ "1/50",
43
+ "1/32",
44
+ "1/25",
45
+ "1/20",
46
+ "1/16",
47
+ "1/15",
48
+ "1/12",
49
+ "1/10",
50
+ "1/9",
51
+ "1/8",
52
+ "1/7",
53
+ "1/6",
54
+ "1/5",
55
+ "1/4",
56
+ "1/3",
57
+ "1/2"
58
+ ], c = {
59
+ 1: [
60
+ 1,
61
+ 2,
62
+ 3,
63
+ 4,
64
+ 5,
65
+ 6,
66
+ 7,
67
+ 8,
68
+ 9,
69
+ 10
70
+ ],
71
+ 2: [
72
+ 1,
73
+ 2,
74
+ 4,
75
+ 6,
76
+ 8,
77
+ 10
78
+ ],
79
+ 3: [
80
+ 1,
81
+ 3,
82
+ 6,
83
+ 9
84
+ ],
85
+ 4: [
86
+ 1,
87
+ 2,
88
+ 4,
89
+ 8
90
+ ],
91
+ 5: [
92
+ 1,
93
+ 5,
94
+ 10
95
+ ],
96
+ 6: [
97
+ 1,
98
+ 2,
99
+ 3,
100
+ 6
101
+ ],
102
+ 7: [1, 7],
103
+ 8: [
104
+ 1,
105
+ 2,
106
+ 4,
107
+ 8
108
+ ],
109
+ 9: [
110
+ 1,
111
+ 3,
112
+ 9
113
+ ],
114
+ 10: [
115
+ 1,
116
+ 2,
117
+ 5,
118
+ 10
119
+ ],
120
+ 12: [
121
+ 1,
122
+ 2,
123
+ 3,
124
+ 4,
125
+ 6
126
+ ],
127
+ 15: [
128
+ 1,
129
+ 3,
130
+ 5
131
+ ],
132
+ 16: [
133
+ 1,
134
+ 2,
135
+ 4,
136
+ 8
137
+ ],
138
+ 20: [
139
+ 1,
140
+ 2,
141
+ 4,
142
+ 5,
143
+ 10
144
+ ],
145
+ 25: [1, 5],
146
+ 32: [
147
+ 1,
148
+ 2,
149
+ 4,
150
+ 8
151
+ ],
152
+ 50: [
153
+ 1,
154
+ 2,
155
+ 5,
156
+ 10
157
+ ],
158
+ 64: [
159
+ 1,
160
+ 2,
161
+ 4,
162
+ 8
163
+ ],
164
+ 100: [
165
+ 1,
166
+ 2,
167
+ 4,
168
+ 5,
169
+ 10
170
+ ],
171
+ 1e3: [
172
+ 1,
173
+ 2,
174
+ 4,
175
+ 5,
176
+ 8,
177
+ 10
178
+ ]
179
+ }, l = (e, t, n) => {
180
+ let r = i.mod(i.abs(e), i.abs(n));
181
+ if (!i.equal(r, 0)) throw Error("start point must be divisible by interval");
182
+ if (i.equal(e, t)) return [];
183
+ let a = i.subtract(t, i.mod(t, i.abs(n))), o = i.larger(n, 0) ? "positive" : "negative";
184
+ if (o === "negative" && i.largerEq(t, e)) throw Error("start must be > than end when doing a negative decrement");
185
+ if (o === "positive" && i.smallerEq(t, e)) throw Error("start must be < end when doing increments");
186
+ let s;
187
+ s = o === "positive" ? i.smallerEq : i.equal(a, t) ? i.largerEq : i.larger;
188
+ let c = [], l = e;
189
+ for (; s(l, a);) c.push(l), l = i.add(l, n);
190
+ return c;
191
+ }, u = (e, t) => `Can only do a positive or negative range, but got: start: ${e} and end:${t}`, d = (e, t, n) => {
192
+ e = i.fraction(e), t = i.fraction(t), n = i.fraction(n);
193
+ let r = i.abs(i.subtract(t, e));
194
+ if (i.larger(r, i.abs(t))) throw Error(u(e, t));
195
+ let a = {
196
+ start: i.abs(e),
197
+ end: i.abs(t),
198
+ interval: i.abs(n),
199
+ multiplier: i.smaller(n, 0) ? -1 : 1
200
+ }, o = i.mod(a.start, a.interval), s = l(i.larger(o, 0) ? i.add(i.subtract(a.start, o), a.interval) : a.start, a.end, a.interval), c = a.multiplier === -1 ? s.map((e) => i.multiply(e, -1)) : s;
201
+ return i.smaller(n, 0) && c.reverse(), c;
202
+ }, f = (e, t) => (e = i.fraction(e), t = i.fraction(t), i.smaller(e, t) ? e : t), p = (e, t) => (e = i.fraction(e), t = i.fraction(t), i.larger(e, t) ? e : t), m = (e, t, n) => {
203
+ e = i.fraction(e), t = i.fraction(t), n = i.fraction(n);
204
+ let a = i.larger(t, 0) ? d(p(0, e), t, n) : [];
205
+ return r((i.smaller(e, 0) ? d(f(0, t), e, i.multiply(n, -1)) : []).concat(a), i.equal);
206
+ }, h = (e, t, n) => {
207
+ n ||= 2;
208
+ let r = 10 ** -n / 2;
209
+ return Math.abs(e - t) < r;
210
+ }, g = (e, t, n) => i.smaller(y(e), y(t)) ? t : i.larger(y(e), y(n)) ? n : e, _ = (e, t) => {
211
+ let n = e.max - e.min, r = i.number(i.multiply(10, i.divide(i.fraction(n), t)));
212
+ return {
213
+ min: r,
214
+ max: i.number(i.multiply(20, r))
215
+ };
216
+ }, v = (e, t) => {
217
+ let n = i.mod(e, t);
218
+ return i.equal(n, 0);
219
+ }, y = (e) => {
220
+ if (t(e)) return i.fraction(e.n * e.s, e.d);
221
+ if (n(e)) return i.fraction(e);
222
+ }, b = (e, t, n, r) => {
223
+ let a = r ? r.limit !== !1 : !0, o = _(e, t), s = a ? g(y(n.minor), o.min, o.max) : y(n.minor), c = a ? g(y(n.major), s, i.multiply(s, 20)) : y(n.major);
224
+ if (!v(c, s)) {
225
+ let e = i.divide(c, s), t = e <= 2 ? 2 : Math.round(e);
226
+ return {
227
+ minor: s,
228
+ major: i.multiply(s, t)
229
+ };
230
+ }
231
+ return {
232
+ major: c,
233
+ minor: s
234
+ };
235
+ }, x = (e, t, n, r) => (n = b(e, t, n, r), m(e.min, e.max, n.minor).filter((t) => i.smallerEq(t, i.fraction(e.max))).map((e) => {
236
+ let t = "minor", r = i.mod(e, n.major);
237
+ return h(i.number(r), 0) && (t = "major"), {
238
+ x: e,
239
+ type: t
240
+ };
241
+ })), S = (e) => {
242
+ let t = {
243
+ fraction: [],
244
+ decimal: []
245
+ };
246
+ return o.forEach((n) => {
247
+ n >= e.min && n <= e.max && t.decimal.push(n);
248
+ }), s.forEach((n) => {
249
+ let r = i.number(i.fraction(n));
250
+ r >= e.min && r <= e.max && t.fraction.push(n);
251
+ }), t;
252
+ }, C = (e, t, n) => {
253
+ let r = {
254
+ decimal: [],
255
+ fraction: []
256
+ }, a = i.fraction(i.number(i.number(e))), o = a.n, s = a.d;
257
+ if (o >= 1 && s === 1) for (let a = 1; a <= 10; a++) {
258
+ let s = i.number(i.multiply(o, a));
259
+ w(t, n, {
260
+ minor: e,
261
+ major: s
262
+ }, { fraction: void 0 }).filter((e) => e.type === "major").length > 1 && (r.fraction.push(s.toString()), r.decimal.push(s));
263
+ }
264
+ else for (let a in c[s]) {
265
+ let l = i.multiply(i.fraction(o, s), c[s][a]);
266
+ w(t, n, {
267
+ minor: e,
268
+ major: i.number(l)
269
+ }, { fraction: void 0 }).filter((e) => e.type === "major").length > 1 && (l.d === 1 ? r.fraction.push(l.n.toString()) : r.fraction.push(l.n + "/" + l.d), r.decimal.push(i.number(l)));
270
+ }
271
+ return r;
272
+ }, w = (e, t, n, r) => x(e, t, n, r).map((e) => r.fraction ? e : {
273
+ ...e,
274
+ x: i.number(e.x) || 0
275
+ }), T = (e, t, n, r) => {
276
+ r = p(f(r, t), e);
277
+ let a = r.mod(n), o, s = n.div(2);
278
+ if (i.largerEq(i.abs(a), s)) {
279
+ let e = n.sub(i.abs(a)), t = i.largerEq(r, 0) ? "add" : "sub";
280
+ o = r[t](e);
281
+ } else {
282
+ let e = i.largerEq(r, 0) ? "sub" : "add";
283
+ o = r[e](i.abs(a));
284
+ }
285
+ return o;
286
+ }, E = (e, t, n, r) => {
287
+ let a = T(i.fraction(e), i.fraction(t), i.fraction(n), i.fraction(r));
288
+ return i.number(a);
289
+ }, D = (e, t, n) => n.map((n) => {
290
+ let r = Number.isFinite(n.size) ? E(0, n.size, t.minor, n.size) : void 0, i = E(e.min, e.max, t.minor, n.domainPosition), a = {
291
+ ...n,
292
+ domainPosition: i
293
+ };
294
+ return Number.isFinite(r) && (a.size = r), a;
295
+ });
296
+ //#endregion
297
+ export { w as buildTickData, C as generateMajorValuesForMinor, S as generateMinorValues, _ as getMinorLimits, D as snapElements, E as snapTo, a as tick_utils_exports };