@pie-element/number-line 13.1.0-next.19 → 13.1.1-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 (367) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +11 -0
  2. package/dist/author/arrows.d.ts +28 -0
  3. package/dist/author/arrows.js +69 -0
  4. package/dist/author/card-bar.d.ts +20 -0
  5. package/dist/author/card-bar.js +41 -0
  6. package/dist/author/defaults.d.ts +178 -0
  7. package/dist/author/defaults.js +144 -0
  8. package/dist/author/domain.d.ts +15 -0
  9. package/dist/author/domain.js +54 -0
  10. package/dist/author/index.d.ts +23 -0
  11. package/dist/author/index.js +89 -0
  12. package/dist/author/main.d.ts +44 -0
  13. package/dist/author/main.js +485 -0
  14. package/dist/author/number-text-field.d.ts +13 -0
  15. package/dist/author/number-text-field.js +13 -0
  16. package/dist/author/point-config.d.ts +25 -0
  17. package/dist/author/point-config.js +69 -0
  18. package/dist/author/size.d.ts +24 -0
  19. package/dist/author/size.js +48 -0
  20. package/dist/author/ticks.d.ts +22 -0
  21. package/dist/author/ticks.js +115 -0
  22. package/dist/author/utils.d.ts +9 -0
  23. package/dist/author/utils.js +4 -0
  24. package/dist/controller/defaults.d.ts +58 -0
  25. package/dist/controller/defaults.js +50 -0
  26. package/dist/controller/index.d.ts +33 -0
  27. package/dist/controller/index.js +170 -0
  28. package/dist/controller/tickUtils.d.ts +20 -0
  29. package/dist/controller/tickUtils.js +254 -0
  30. package/dist/controller/utils.d.ts +9 -0
  31. package/dist/controller/utils.js +68 -0
  32. package/dist/delivery/data-converter.d.ts +64 -0
  33. package/dist/delivery/data-converter.js +70 -0
  34. package/dist/delivery/draggable/index.d.ts +33 -0
  35. package/dist/delivery/draggable/index.js +39 -0
  36. package/dist/delivery/index.d.ts +35 -0
  37. package/dist/delivery/index.js +109 -0
  38. package/dist/delivery/number-line/colors.d.ts +11 -0
  39. package/dist/delivery/number-line/colors.js +5 -0
  40. package/dist/delivery/number-line/feedback.d.ts +19 -0
  41. package/dist/delivery/number-line/feedback.js +57 -0
  42. package/dist/delivery/number-line/graph/arrow.d.ts +30 -0
  43. package/dist/delivery/number-line/graph/arrow.js +27 -0
  44. package/dist/delivery/number-line/graph/elements/base.d.ts +16 -0
  45. package/dist/delivery/number-line/graph/elements/base.js +11 -0
  46. package/dist/delivery/number-line/graph/elements/builder.d.ts +33 -0
  47. package/dist/delivery/number-line/graph/elements/builder.js +30 -0
  48. package/dist/delivery/number-line/graph/elements/line.d.ts +51 -0
  49. package/dist/delivery/number-line/graph/elements/line.js +189 -0
  50. package/dist/delivery/number-line/graph/elements/point.d.ts +43 -0
  51. package/dist/delivery/number-line/graph/elements/point.js +127 -0
  52. package/dist/delivery/number-line/graph/elements/ray.d.ts +43 -0
  53. package/dist/delivery/number-line/graph/elements/ray.js +130 -0
  54. package/dist/delivery/number-line/graph/index.d.ts +59 -0
  55. package/dist/delivery/number-line/graph/index.js +196 -0
  56. package/dist/delivery/number-line/graph/line.d.ts +46 -0
  57. package/dist/delivery/number-line/graph/line.js +27 -0
  58. package/dist/delivery/number-line/graph/stacks.d.ts +10 -0
  59. package/dist/delivery/number-line/graph/stacks.js +40 -0
  60. package/dist/delivery/number-line/graph/tick-utils.d.ts +73 -0
  61. package/dist/delivery/number-line/graph/tick-utils.js +297 -0
  62. package/dist/delivery/number-line/graph/ticks.d.ts +46 -0
  63. package/dist/delivery/number-line/graph/ticks.js +115 -0
  64. package/dist/delivery/number-line/index.d.ts +35 -0
  65. package/dist/delivery/number-line/index.js +218 -0
  66. package/dist/delivery/number-line/point-chooser/button.d.ts +31 -0
  67. package/dist/delivery/number-line/point-chooser/button.js +36 -0
  68. package/dist/delivery/number-line/point-chooser/img.d.ts +10 -0
  69. package/dist/delivery/number-line/point-chooser/img.js +4 -0
  70. package/dist/delivery/number-line/point-chooser/index.d.ts +37 -0
  71. package/dist/delivery/number-line/point-chooser/index.js +154 -0
  72. package/dist/delivery/number-line/point-chooser/styles.d.ts +192 -0
  73. package/dist/delivery/number-line/transitions/fade.d.ts +34 -0
  74. package/dist/delivery/number-line/transitions/fade.js +75 -0
  75. package/dist/delivery/number-line/transitions/index.d.ts +10 -0
  76. package/dist/index.d.ts +1 -0
  77. package/dist/index.iife.d.ts +8 -0
  78. package/dist/index.iife.js +201 -0
  79. package/dist/index.js +2 -0
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +11 -0
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +12 -0
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludes.js +7 -0
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludesWith.js +7 -0
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +7 -0
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +7 -0
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignMergeValue.js +8 -0
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js +7 -0
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +5 -0
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +10 -0
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +6 -0
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIndexOf.js +9 -0
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +8 -0
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js +26 -0
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNaN.js +6 -0
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +11 -0
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +12 -0
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMerge.js +19 -0
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMergeDeep.js +31 -0
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePickBy.js +13 -0
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +8 -0
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +9 -0
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +9 -0
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js +22 -0
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +14 -0
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +15 -0
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +8 -0
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUniq.js +27 -0
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +6 -0
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +10 -0
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createAssigner.js +15 -0
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +12 -0
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createFind.js +19 -0
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createSet.js +9 -0
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +35 -0
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +35 -0
  163. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +32 -0
  164. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
  165. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
  166. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
  167. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
  168. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js +16 -0
  169. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
  170. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
  171. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
  172. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
  173. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
  174. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
  175. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
  176. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +18 -0
  177. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
  178. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
  179. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
  180. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
  181. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
  182. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
  183. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
  184. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
  185. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
  186. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +12 -0
  187. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +11 -0
  188. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
  189. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
  190. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
  191. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +7 -0
  192. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
  193. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
  194. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
  195. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
  196. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
  197. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
  198. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  199. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
  200. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
  201. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
  202. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +9 -0
  203. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
  204. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +11 -0
  205. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
  206. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
  207. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
  208. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
  209. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
  210. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
  211. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +13 -0
  212. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
  213. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_safeGet.js +6 -0
  214. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +7 -0
  215. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +6 -0
  216. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +9 -0
  217. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +6 -0
  218. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +14 -0
  219. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
  220. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
  221. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
  222. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
  223. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
  224. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_strictIndexOf.js +7 -0
  225. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +10 -0
  226. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +10 -0
  227. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
  228. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +8 -0
  229. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
  230. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +8 -0
  231. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
  232. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/find.js +6 -0
  233. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/findIndex.js +13 -0
  234. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +8 -0
  235. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +8 -0
  236. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +6 -0
  237. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
  238. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
  239. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
  240. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js +8 -0
  241. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
  242. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
  243. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +7 -0
  244. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqualWith.js +9 -0
  245. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
  246. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
  247. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
  248. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isNumber.js +9 -0
  249. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
  250. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
  251. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isPlainObject.js +14 -0
  252. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
  253. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
  254. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
  255. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
  256. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
  257. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +16 -0
  258. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/merge.js +8 -0
  259. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/negate.js +17 -0
  260. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/noop.js +4 -0
  261. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/omitBy.js +9 -0
  262. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/pickBy.js +16 -0
  263. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +10 -0
  264. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
  265. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
  266. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toFinite.js +8 -0
  267. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toInteger.js +8 -0
  268. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +19 -0
  269. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toPlainObject.js +8 -0
  270. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +7 -0
  271. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqWith.js +7 -0
  272. package/package.json +59 -21
  273. package/CHANGELOG.json +0 -1247
  274. package/CHANGELOG.md +0 -2423
  275. package/LICENSE.md +0 -5
  276. package/README.md +0 -28
  277. package/configure/CHANGELOG.json +0 -827
  278. package/configure/CHANGELOG.md +0 -2070
  279. package/configure/lib/arrows.js +0 -89
  280. package/configure/lib/arrows.js.map +0 -1
  281. package/configure/lib/card-bar.js +0 -57
  282. package/configure/lib/card-bar.js.map +0 -1
  283. package/configure/lib/defaults.js +0 -177
  284. package/configure/lib/defaults.js.map +0 -1
  285. package/configure/lib/domain.js +0 -87
  286. package/configure/lib/domain.js.map +0 -1
  287. package/configure/lib/index.js +0 -176
  288. package/configure/lib/index.js.map +0 -1
  289. package/configure/lib/main.js +0 -815
  290. package/configure/lib/main.js.map +0 -1
  291. package/configure/lib/number-text-field.js +0 -26
  292. package/configure/lib/number-text-field.js.map +0 -1
  293. package/configure/lib/point-config.js +0 -84
  294. package/configure/lib/point-config.js.map +0 -1
  295. package/configure/lib/size.js +0 -66
  296. package/configure/lib/size.js.map +0 -1
  297. package/configure/lib/ticks.js +0 -234
  298. package/configure/lib/ticks.js.map +0 -1
  299. package/configure/lib/utils.js +0 -12
  300. package/configure/lib/utils.js.map +0 -1
  301. package/configure/package.json +0 -20
  302. package/controller/CHANGELOG.json +0 -332
  303. package/controller/CHANGELOG.md +0 -1349
  304. package/controller/lib/defaults.js +0 -56
  305. package/controller/lib/defaults.js.map +0 -1
  306. package/controller/lib/index.js +0 -430
  307. package/controller/lib/index.js.map +0 -1
  308. package/controller/lib/tickUtils.js +0 -294
  309. package/controller/lib/tickUtils.js.map +0 -1
  310. package/controller/lib/utils.js +0 -168
  311. package/controller/lib/utils.js.map +0 -1
  312. package/controller/package.json +0 -20
  313. package/demo.gif +0 -0
  314. package/docs/config-schema.json +0 -2532
  315. package/docs/config-schema.json.md +0 -1844
  316. package/docs/demo/config.js +0 -8
  317. package/docs/demo/generate.js +0 -39
  318. package/docs/demo/index.html +0 -1
  319. package/docs/pie-schema.json +0 -2461
  320. package/docs/pie-schema.json.md +0 -1228
  321. package/docs/schemas/config.json +0 -256
  322. package/lib/data-converter.js +0 -96
  323. package/lib/data-converter.js.map +0 -1
  324. package/lib/draggable/index.js +0 -114
  325. package/lib/draggable/index.js.map +0 -1
  326. package/lib/index.js +0 -196
  327. package/lib/index.js.map +0 -1
  328. package/lib/number-line/colors.js +0 -11
  329. package/lib/number-line/colors.js.map +0 -1
  330. package/lib/number-line/feedback.js +0 -92
  331. package/lib/number-line/feedback.js.map +0 -1
  332. package/lib/number-line/graph/arrow.js +0 -44
  333. package/lib/number-line/graph/arrow.js.map +0 -1
  334. package/lib/number-line/graph/elements/base.js +0 -20
  335. package/lib/number-line/graph/elements/base.js.map +0 -1
  336. package/lib/number-line/graph/elements/builder.js +0 -37
  337. package/lib/number-line/graph/elements/builder.js.map +0 -1
  338. package/lib/number-line/graph/elements/line.js +0 -259
  339. package/lib/number-line/graph/elements/line.js.map +0 -1
  340. package/lib/number-line/graph/elements/point.js +0 -204
  341. package/lib/number-line/graph/elements/point.js.map +0 -1
  342. package/lib/number-line/graph/elements/ray.js +0 -190
  343. package/lib/number-line/graph/elements/ray.js.map +0 -1
  344. package/lib/number-line/graph/index.js +0 -262
  345. package/lib/number-line/graph/index.js.map +0 -1
  346. package/lib/number-line/graph/line.js +0 -38
  347. package/lib/number-line/graph/line.js.map +0 -1
  348. package/lib/number-line/graph/stacks.js +0 -78
  349. package/lib/number-line/graph/stacks.js.map +0 -1
  350. package/lib/number-line/graph/tick-utils.js +0 -347
  351. package/lib/number-line/graph/tick-utils.js.map +0 -1
  352. package/lib/number-line/graph/ticks.js +0 -188
  353. package/lib/number-line/graph/ticks.js.map +0 -1
  354. package/lib/number-line/index.js +0 -384
  355. package/lib/number-line/index.js.map +0 -1
  356. package/lib/number-line/point-chooser/button.js +0 -49
  357. package/lib/number-line/point-chooser/button.js.map +0 -1
  358. package/lib/number-line/point-chooser/img.js +0 -8
  359. package/lib/number-line/point-chooser/img.js.map +0 -1
  360. package/lib/number-line/point-chooser/index.js +0 -197
  361. package/lib/number-line/point-chooser/index.js.map +0 -1
  362. package/lib/number-line/point-chooser/styles.js +0 -77
  363. package/lib/number-line/point-chooser/styles.js.map +0 -1
  364. package/lib/number-line/transitions/fade.js +0 -88
  365. package/lib/number-line/transitions/fade.js.map +0 -1
  366. package/lib/number-line/transitions/index.js +0 -14
  367. package/lib/number-line/transitions/index.js.map +0 -1
@@ -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 };
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/number-line/src/number-line/graph/ticks.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 const TickValidator: PropTypes.Validator<NonNullable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>>;
12
+ export declare class Tick extends React.Component {
13
+ static propTypes: {
14
+ y: PropTypes.Validator<number>;
15
+ x: PropTypes.Validator<number>;
16
+ major: PropTypes.Requireable<boolean>;
17
+ fraction: PropTypes.Requireable<boolean>;
18
+ xScale: PropTypes.Requireable<(...args: any[]) => any>;
19
+ type: PropTypes.Requireable<string>;
20
+ };
21
+ static defaultProps: {
22
+ major: boolean;
23
+ };
24
+ constructor(props: any);
25
+ updateTextBox(): void;
26
+ componentDidMount(): void;
27
+ componentWillUnmount(): void;
28
+ render(): React.JSX.Element;
29
+ }
30
+ export declare class Ticks extends React.Component {
31
+ static contextTypes: {
32
+ xScale: PropTypes.Validator<(...args: any[]) => any>;
33
+ };
34
+ static propTypes: {
35
+ domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
36
+ min: PropTypes.Validator<number>;
37
+ max: PropTypes.Validator<number>;
38
+ }>>>;
39
+ fraction: PropTypes.Requireable<boolean>;
40
+ width: PropTypes.Requireable<number>;
41
+ ticks: PropTypes.Validator<NonNullable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>>;
42
+ y: PropTypes.Validator<number>;
43
+ };
44
+ render(): React.JSX.Element;
45
+ }
46
+ export default Ticks;
@@ -0,0 +1,115 @@
1
+ import { buildTickData as e } from "./tick-utils.js";
2
+ import t from "react";
3
+ import { styled as n } from "@mui/material/styles";
4
+ import r from "prop-types";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ import { color as o } from "@pie-lib/render-ui";
7
+ //#region src/delivery/number-line/graph/ticks.tsx
8
+ var s = n("text")({
9
+ userSelect: "none",
10
+ textAlign: "center",
11
+ fill: o.primary()
12
+ }), c = n("line")({ stroke: o.primary() }), l = r.shape({
13
+ major: (e, t) => {},
14
+ minor: (e, t, n) => {
15
+ if (e[t] <= 0) return /* @__PURE__ */ Error(`Invalid prop ${t} must be > 0. ${n}`);
16
+ }
17
+ }).isRequired, u = class extends t.Component {
18
+ static propTypes = {
19
+ y: r.number.isRequired,
20
+ x: r.number.isRequired,
21
+ major: r.bool,
22
+ fraction: r.bool,
23
+ xScale: r.func,
24
+ type: r.string
25
+ };
26
+ static defaultProps = { major: !1 };
27
+ constructor(e) {
28
+ super(e), this.wasRendered = !1, this.state = { textBox: {
29
+ width: 0,
30
+ height: 0,
31
+ x: 0,
32
+ y: 0
33
+ } }, this.resizeObserver = null;
34
+ }
35
+ updateTextBox() {
36
+ if (this.text) {
37
+ let { width: e, height: t, x: n, y: r } = this.text.getBBox();
38
+ this.text.setAttribute("x", e / 2 * -1), this.setState({ textBox: {
39
+ width: e,
40
+ height: t,
41
+ x: n,
42
+ y: r
43
+ } });
44
+ }
45
+ }
46
+ componentDidMount() {
47
+ this.resizeObserver = new ResizeObserver(() => {
48
+ this.updateTextBox();
49
+ }), this.text && this.resizeObserver.observe(this.text);
50
+ }
51
+ componentWillUnmount() {
52
+ this.resizeObserver && this.resizeObserver.disconnect();
53
+ }
54
+ render() {
55
+ let { x: e, y: n, type: r, xScale: o, fraction: l } = this.props, u = l && e.n !== e.d && e.n !== 0 && e.d !== 1, d = r === "major", f = d ? 20 : 10, { width: p = 0, height: m = 0, x: h = 0, y: g = 0 } = this.state.textBox, _ = l ? u ? /* @__PURE__ */ a(t.Fragment, { children: [/* @__PURE__ */ i("tspan", {
56
+ x: "0",
57
+ dy: "0.71em",
58
+ children: e.n * e.s
59
+ }), /* @__PURE__ */ i("tspan", {
60
+ x: "0",
61
+ dy: "1.11em",
62
+ children: e.d
63
+ })] }) : e.n * e.s : Number(e.toFixed(3));
64
+ return /* @__PURE__ */ a("g", {
65
+ opacity: "1",
66
+ transform: `translate(${o(e)}, ${n})`,
67
+ children: [
68
+ /* @__PURE__ */ i(c, {
69
+ y1: f / 2 * -1,
70
+ y2: f / 2,
71
+ x1: "0.5",
72
+ x2: "0.5"
73
+ }),
74
+ u && /* @__PURE__ */ i(c, {
75
+ x1: h,
76
+ x2: h + p,
77
+ y1: g + m / 2,
78
+ y2: g + m / 2
79
+ }),
80
+ d && /* @__PURE__ */ i(s, {
81
+ ref: (e) => this.text = e,
82
+ y: "14",
83
+ width: "10",
84
+ dy: "0.71em",
85
+ textAnchor: u && "middle",
86
+ children: _
87
+ })
88
+ ]
89
+ });
90
+ }
91
+ }, d = class extends t.Component {
92
+ static contextTypes = { xScale: r.func.isRequired };
93
+ static propTypes = {
94
+ domain: r.shape({
95
+ min: r.number.isRequired,
96
+ max: r.number.isRequired
97
+ }).isRequired,
98
+ fraction: r.bool,
99
+ width: r.number,
100
+ ticks: l,
101
+ y: r.number.isRequired
102
+ };
103
+ render() {
104
+ let { domain: t, width: n, ticks: r, y: a, fraction: o } = this.props, { xScale: s } = this.context;
105
+ return /* @__PURE__ */ i("g", { children: e(t, n, r, { fraction: o }).map(({ x: e, type: t }) => /* @__PURE__ */ i(u, {
106
+ fraction: o,
107
+ x: e,
108
+ y: a,
109
+ type: t,
110
+ xScale: s
111
+ }, `${e}-${t}-${o}`)) });
112
+ }
113
+ };
114
+ //#endregion
115
+ export { d as default };
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/number-line/src/number-line/index.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 Graph from './graph/index.js';
11
+ import PropTypes from 'prop-types';
12
+ export { Graph };
13
+ export declare class NumberLine extends React.Component {
14
+ static propTypes: {
15
+ onMoveElement: PropTypes.Validator<(...args: any[]) => any>;
16
+ onDeleteElements: PropTypes.Validator<(...args: any[]) => any>;
17
+ onAddElement: PropTypes.Validator<(...args: any[]) => any>;
18
+ onUndoElement: PropTypes.Validator<(...args: any[]) => any>;
19
+ onClearElements: PropTypes.Validator<(...args: any[]) => any>;
20
+ model: PropTypes.Validator<object>;
21
+ answer: PropTypes.Requireable<any[]>;
22
+ };
23
+ constructor(props: any, context: any);
24
+ toggleElement(index: any): void;
25
+ elementTypeSelected(t: any): void;
26
+ addElement(x: any): void;
27
+ hasMaxNoOfPoints(): any;
28
+ UNSAFE_componentWillReceiveProps(nextProps: any): void;
29
+ deselectElements(): void;
30
+ getSize(type: any, min: any, max: any, defaultValue: any): any;
31
+ undo(): void;
32
+ clearAll(): void;
33
+ render(): React.JSX.Element;
34
+ }
35
+ export default NumberLine;
@@ -0,0 +1,218 @@
1
+ import e from "./point-chooser/index.js";
2
+ import t from "../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js";
3
+ import n from "../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js";
4
+ import r from "../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js";
5
+ import i from "../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isNumber.js";
6
+ import a from "./graph/index.js";
7
+ import o from "./feedback.js";
8
+ import { buildElementModel as s } from "./graph/elements/builder.js";
9
+ import c from "react";
10
+ import { styled as l } from "@mui/material/styles";
11
+ import u from "prop-types";
12
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
13
+ import p from "@pie-lib/translator";
14
+ import * as m from "@pie-lib/render-ui";
15
+ import { Collapsible as h, PreviewPrompt as g, UiLayout as _, color as v, hasMedia as y, hasText as ee } from "@pie-lib/render-ui";
16
+ import b from "@pie-lib/correct-answer-toggle";
17
+ //#region src/delivery/number-line/index.tsx
18
+ function x(e) {
19
+ return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
20
+ }
21
+ function S(e, t) {
22
+ return !e || x(e) ? e : x(e.default) ? e.default : t && x(e[t]) ? e[t] : t && x(e[t]?.default) ? e[t].default : e;
23
+ }
24
+ var C = S(_, "UiLayout") || S(O.UiLayout, "UiLayout"), w = S(g, "PreviewPrompt") || S(O.PreviewPrompt, "PreviewPrompt"), T = S(h, "Collapsible") || S(O.Collapsible, "Collapsible"), E = m, D = E.default, O = D && typeof D == "object" ? D : E, { translator: k } = p, A = l(C)(({ $colorContrast: e }) => ({
25
+ color: v.text(),
26
+ backgroundColor: v.background(),
27
+ ...e === "black_on_rose" && { backgroundColor: "mistyrose" },
28
+ ...e === "white_on_black" && {
29
+ backgroundColor: "black",
30
+ "--correct-answer-toggle-label-color": "white",
31
+ "--tick-color": "white",
32
+ "--line-stroke": "white",
33
+ "--arrow-color": "white",
34
+ "--point-stroke": "white",
35
+ "--point-fill": "black"
36
+ }
37
+ })), j = l("div")(({ $colorContrast: e }) => ({
38
+ boxSizing: "unset",
39
+ color: v.text(),
40
+ backgroundColor: v.background(),
41
+ ...e === "black_on_rose" && { backgroundColor: "mistyrose" },
42
+ ...e === "white_on_black" && {
43
+ backgroundColor: "black",
44
+ "--correct-answer-toggle-label-color": "white",
45
+ "--tick-color": "white",
46
+ "--line-stroke": "white",
47
+ "--arrow-color": "white",
48
+ "--point-stroke": "white",
49
+ "--point-fill": "black"
50
+ }
51
+ })), M = l("div")({
52
+ textAlign: "center",
53
+ pointerEvents: "none",
54
+ userSelect: "none"
55
+ }), N = l("div")({ marginBottom: "16px" }), P = l("div")({
56
+ verticalAlign: "middle",
57
+ marginBottom: "16px"
58
+ }), F = l(T)(({ theme: e }) => ({ paddingBottom: e.spacing(2) })), I = class extends c.Component {
59
+ static propTypes = {
60
+ onMoveElement: u.func.isRequired,
61
+ onDeleteElements: u.func.isRequired,
62
+ onAddElement: u.func.isRequired,
63
+ onUndoElement: u.func.isRequired,
64
+ onClearElements: u.func.isRequired,
65
+ model: u.object.isRequired,
66
+ answer: u.array
67
+ };
68
+ constructor(t, n) {
69
+ super(t, n);
70
+ let r = t.model.graph ? t.model.graph.initialType : null;
71
+ r = r ? r.toLowerCase() : e.DEFAULT_TYPE, this.state = {
72
+ selectedElements: [],
73
+ elementType: r,
74
+ answers: t.answer
75
+ };
76
+ }
77
+ toggleElement(e) {
78
+ let t = [];
79
+ t = this.state.selectedElements.indexOf(e) === -1 ? this.state.selectedElements.concat([e]) : this.state.selectedElements.filter((t) => t !== e), this.setState({ selectedElements: t });
80
+ }
81
+ elementTypeSelected(e) {
82
+ this.setState({ elementType: e });
83
+ }
84
+ addElement(e) {
85
+ if (this.hasMaxNoOfPoints()) {
86
+ this.setState({ showMaxPointsWarning: !0 }), setTimeout(() => {
87
+ this.setState({ showMaxPointsWarning: !1 });
88
+ }, 2e3);
89
+ return;
90
+ }
91
+ let { ticks: t, domain: n, availableTypes: i } = this.props.model.graph;
92
+ if (i && !i[this.state.elementType.toUpperCase()]) return;
93
+ let a = s(e, this.state.elementType, n, t.minor);
94
+ if (a) {
95
+ let { answers: e } = this.state;
96
+ e.some((e) => r(e, a)) || (e.push(a), this.setState({ answers: e }), this.props.onAddElement(a));
97
+ }
98
+ }
99
+ hasMaxNoOfPoints() {
100
+ let { answer: e, model: { graph: { maxNumberOfPoints: t } } } = this.props;
101
+ return i(t) && t > 0 && (e || []).length >= t;
102
+ }
103
+ UNSAFE_componentWillReceiveProps(e) {
104
+ let { answer: t } = e;
105
+ r(this.state.answers, t) || this.setState({
106
+ showCorrectAnswer: !1,
107
+ answers: t
108
+ });
109
+ }
110
+ deselectElements() {
111
+ this.setState({ selectedElements: [] });
112
+ }
113
+ getSize(e, t, n, r) {
114
+ let { model: { graph: i } } = this.props;
115
+ return i && i[e] ? Math.max(t, Math.min(n, i[e])) : r;
116
+ }
117
+ undo() {
118
+ let { answers: e } = this.state, { onUndoElement: t } = this.props;
119
+ e.pop(), this.setState({ answers: e }), t();
120
+ }
121
+ clearAll() {
122
+ let { onClearElements: e } = this.props;
123
+ this.setState({ answers: [] }), e();
124
+ }
125
+ render() {
126
+ let { model: r, onDeleteElements: i, onMoveElement: s, minWidth: c = 400, maxWidth: l = 1600, maxHeight: u } = this.props, { showCorrectAnswer: p, answers: m, selectedElements: h, showMaxPointsWarning: g, elementType: _ } = this.state, { corrected: v = {
127
+ correct: [],
128
+ incorrect: []
129
+ }, disabled: x, extraCSSRules: S, graph: C, correctResponse: T, prompt: E, emptyAnswer: D, feedback: O, colorContrast: I, language: L, teacherInstructions: R } = r, z = this.addElement.bind(this), B = !x && h && h.length > 0, { ticks: V, domain: H, arrows: U, maxNumberOfPoints: W, height: G = 100, availableTypes: K, title: q, fraction: J } = C, Y = this.getSize("width", c, l, 600), X = R && (ee(R) || y(R)), Z = {
130
+ disabled: x,
131
+ domain: H,
132
+ ticks: V,
133
+ width: Y,
134
+ height: (G > u ? u : G) || 100,
135
+ arrows: U,
136
+ fraction: J
137
+ }, Q = p && T ? (T || []).map((e) => (e.correct = !0, e)) : (m || []).map((e, t) => {
138
+ let r = n(e);
139
+ return r.selected = h.indexOf(t) !== -1, v.correct.includes(t) ? r.correct = !0 : v.incorrect.includes(t) ? r.correct = !1 : r.correct = void 0, r;
140
+ }), te = () => W == 1 ? k.t("numberLine.addElementLimit_one", {
141
+ lng: L,
142
+ count: 1
143
+ }) : k.t("numberLine.addElementLimit_other", {
144
+ lng: L,
145
+ count: W
146
+ }), ne = () => {
147
+ i(h), m = m.filter((e, t) => !h.some((e) => e === t)), this.setState({
148
+ selectedElements: [],
149
+ answers: m
150
+ });
151
+ }, re = () => {
152
+ if (K) return Object.keys(K).filter((e) => K[e]).map((e) => e.toLowerCase());
153
+ }, ie = (e) => {
154
+ this.setState({ showCorrectAnswer: e });
155
+ }, $ = Z.width - 20;
156
+ return /* @__PURE__ */ f(A, {
157
+ extraCSSRules: S,
158
+ $colorContrast: I,
159
+ children: [
160
+ X && /* @__PURE__ */ d(F, {
161
+ labels: {
162
+ hidden: "Show Teacher Instructions",
163
+ visible: "Hide Teacher Instructions"
164
+ },
165
+ children: /* @__PURE__ */ d(w, { prompt: R })
166
+ }),
167
+ E && /* @__PURE__ */ d(P, { children: /* @__PURE__ */ d(w, { prompt: E }) }),
168
+ /* @__PURE__ */ f(j, {
169
+ $colorContrast: I,
170
+ style: { width: Y },
171
+ children: [
172
+ /* @__PURE__ */ d(N, {
173
+ style: { width: $ },
174
+ children: /* @__PURE__ */ d(b, {
175
+ show: t(T) && T.length && !D,
176
+ toggled: p,
177
+ onToggle: ie,
178
+ initialValue: !1,
179
+ language: L
180
+ })
181
+ }),
182
+ !x && /* @__PURE__ */ d(e, {
183
+ elementType: _,
184
+ showDeleteButton: B,
185
+ onDeleteClick: ne,
186
+ onElementType: this.elementTypeSelected.bind(this),
187
+ onClearElements: this.clearAll.bind(this),
188
+ onUndoElement: this.undo.bind(this),
189
+ icons: re(),
190
+ language: L
191
+ }),
192
+ /* @__PURE__ */ d(a, {
193
+ ...Z,
194
+ elements: Q,
195
+ onAddElement: z,
196
+ onMoveElement: s,
197
+ onToggleElement: this.toggleElement.bind(this),
198
+ onDeselectElements: this.deselectElements.bind(this),
199
+ debug: !1
200
+ }),
201
+ q && /* @__PURE__ */ d(M, { dangerouslySetInnerHTML: { __html: q } }),
202
+ g && /* @__PURE__ */ d(o, {
203
+ type: "info",
204
+ width: $,
205
+ message: te()
206
+ }),
207
+ O && !p && /* @__PURE__ */ d(o, {
208
+ ...O,
209
+ width: $
210
+ })
211
+ ]
212
+ })
213
+ ]
214
+ });
215
+ }
216
+ };
217
+ //#endregion
218
+ export { I as default };