@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,58 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/number-line/controller/src/defaults.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
+ declare const _default: {
10
+ correctResponse: never[];
11
+ feedback: {
12
+ correct: {
13
+ default: string;
14
+ type: string;
15
+ };
16
+ incorrect: {
17
+ default: string;
18
+ type: string;
19
+ };
20
+ partial: {
21
+ default: string;
22
+ type: string;
23
+ };
24
+ };
25
+ graph: {
26
+ arrows: {
27
+ left: boolean;
28
+ right: boolean;
29
+ };
30
+ availableTypes: {
31
+ PF: boolean;
32
+ };
33
+ domain: {
34
+ min: number;
35
+ max: number;
36
+ };
37
+ exhibitOnly: boolean;
38
+ initialElements: never[];
39
+ initialType: string;
40
+ maxNumberOfPoints: number;
41
+ ticks: {
42
+ minor: number;
43
+ major: number;
44
+ tickIntervalType: string;
45
+ };
46
+ title: string;
47
+ width: number;
48
+ };
49
+ prompt: string;
50
+ promptEnabled: boolean;
51
+ rationale: string;
52
+ rationaleEnabled: boolean;
53
+ teacherInstructions: string;
54
+ teacherInstructionsEnabled: boolean;
55
+ toolbarEditorPosition: string;
56
+ widthEnabled: boolean;
57
+ };
58
+ export default _default;
@@ -0,0 +1,50 @@
1
+ //#region src/controller/defaults.ts
2
+ var e = {
3
+ correctResponse: [],
4
+ feedback: {
5
+ correct: {
6
+ default: "Correct",
7
+ type: "none"
8
+ },
9
+ incorrect: {
10
+ default: "Incorrect",
11
+ type: "none"
12
+ },
13
+ partial: {
14
+ default: "Nearly",
15
+ type: "none"
16
+ }
17
+ },
18
+ graph: {
19
+ arrows: {
20
+ left: !0,
21
+ right: !0
22
+ },
23
+ availableTypes: { PF: !0 },
24
+ domain: {
25
+ min: -1,
26
+ max: 1
27
+ },
28
+ exhibitOnly: !1,
29
+ initialElements: [],
30
+ initialType: "PF",
31
+ maxNumberOfPoints: 1,
32
+ ticks: {
33
+ minor: .125,
34
+ major: .5,
35
+ tickIntervalType: "Decimal"
36
+ },
37
+ title: "",
38
+ width: 500
39
+ },
40
+ prompt: "",
41
+ promptEnabled: !0,
42
+ rationale: "",
43
+ rationaleEnabled: !0,
44
+ teacherInstructions: "",
45
+ teacherInstructionsEnabled: !0,
46
+ toolbarEditorPosition: "bottom",
47
+ widthEnabled: !0
48
+ };
49
+ //#endregion
50
+ export { e as default };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/number-line/controller/src/index.js
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ /**
10
+ * Generates detailed trace log for scoring evaluation
11
+ * @param {Object} model - the question model
12
+ * @param {Object} session - the student session
13
+ * @param {Object} env - the environment
14
+ * @returns {Array} traceLog - array of trace messages
15
+ */
16
+ export declare const getLogTrace: (model: any, session: any, env: any) => string[];
17
+ /**
18
+ */
19
+ export declare function outcome(model: any, session: any, env: any): Promise<unknown>;
20
+ export declare function getScore(question: any, session: any): Promise<unknown>;
21
+ export declare const CLOSE_TO_PRECISION = 3;
22
+ export declare const closeTo: (a: any, b: any, precision: any) => boolean;
23
+ export declare const getCorrected: (answer: any, correctResponse: any) => any;
24
+ export declare const getCorrectness: (corrected: any) => "unknown" | "unanswered" | "correct" | "partial" | "incorrect";
25
+ /**
26
+ * A sample of a normalize function see:
27
+ * https://github.com/pie-framework/pie-elements/issues/21
28
+ */
29
+ export declare function normalize(question: any): any;
30
+ export declare function createDefaultModel(model?: {}): Promise<unknown>;
31
+ export declare function model(question: any, session: any, env: any): Promise<any>;
32
+ export declare const createCorrectResponseSession: (question: any, env: any) => Promise<unknown>;
33
+ export declare const validate: (model?: {}, config?: {}) => {};
@@ -0,0 +1,170 @@
1
+ import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js";
2
+ import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/find.js";
3
+ import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js";
4
+ import r from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqualWith.js";
5
+ import i from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/merge.js";
6
+ import a from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/omitBy.js";
7
+ import o from "./defaults.js";
8
+ import { reloadTicksData as s } from "./utils.js";
9
+ import * as c from "mathjs";
10
+ import { getFeedbackForCorrectness as l } from "@pie-element/shared-feedback";
11
+ import { partialScoring as u } from "@pie-element/shared-controller-utils";
12
+ //#region src/controller/index.ts
13
+ var d = (e) => ({ score: { scaled: e } }), f = (e, t) => {
14
+ let { correct: n } = e, r = t.find((e) => e.numberOfCorrect === n.length);
15
+ return r ? 1 * (r.scorePercentage / 100) : 0;
16
+ }, p = (e) => (t, n) => t + +!!e.some((e) => y(e)(n)), m = (t, n, r) => {
17
+ let i = [], a = n?.answer || [], o = t?.correctResponse || [];
18
+ if (!a.length) return ["Student did not interact with the number line."];
19
+ let { correct: s, incorrect: c, notInAnswer: l, noCorrectResponse: d } = b(a, e(o));
20
+ if (d) return ["No correct response is defined for this item."];
21
+ let f = s.length, p = c.length, m = l.length;
22
+ f > 0 && i.push(`${f} object(s) correctly placed.`), p > 0 && i.push(`${p} incorrect object(s) placed.`), m > 0 && i.push(`${m} expected object(s) were not placed.`);
23
+ let h = [...a];
24
+ [...o], s.forEach((e) => {
25
+ let t = h[e], n = t?.type || "object";
26
+ i.push(`${n.charAt(0).toUpperCase() + n.slice(1)} at position ${t.domainPosition} is correct.`);
27
+ }), c.forEach((e) => {
28
+ let t = h[e], n = t?.type || "object";
29
+ i.push(`${n.charAt(0).toUpperCase() + n.slice(1)} at position ${t.domainPosition} does not match the expected response.`);
30
+ }), l.forEach((e) => {
31
+ let t = e?.type || "object";
32
+ i.push(`Expected ${t} at position ${e.domainPosition} was not placed by the student.`);
33
+ });
34
+ let g = u.enabled(t, r);
35
+ g ? (i.push("Score calculated using partial scoring."), i.push("Partial scoring is based on the number of correct objects, with deductions for extras.")) : i.push("Score calculated using all-or-nothing scoring.");
36
+ let _ = o.length || 1, v = a.length > _ ? a.length - _ : 0;
37
+ v > 0 && i.push(`${v} extra object(s) beyond the required amount were placed and deducted.`);
38
+ let y = Math.max(0, (f - v) / _), x = g ? y : +(y === 1);
39
+ return i.push(`Final score: ${x}.`), i;
40
+ };
41
+ function h(e, t, r) {
42
+ return new Promise((i) => {
43
+ if (!t || n(t)) i({
44
+ score: 0,
45
+ empty: !0,
46
+ logTrace: ["Student did not interact with the number line."]
47
+ });
48
+ else {
49
+ let n = u.enabled(e, r), a = (t.answer || []).reduce(p(e.correctResponse), 0), o = e.correctResponse.length, s = 0;
50
+ (t.answer || []).length > o && (s = (t.answer || []).length - o), o === 0 && (o = 1);
51
+ let c = a < 0 ? 0 : (a - s) / o;
52
+ c < 0 && (c = 0), i({
53
+ score: n ? c : +(c === 1),
54
+ logTrace: m(e, t, r)
55
+ });
56
+ }
57
+ });
58
+ }
59
+ function g(t, r) {
60
+ return new Promise((i) => {
61
+ if (!r || n(r)) i({ score: { scaled: 0 } });
62
+ else {
63
+ r.answer = r.answer || [];
64
+ let a = b(r.answer, e(t.correctResponse)), o = x(a);
65
+ if (o === "correct") i(d(1));
66
+ else if (o === "incorrect") i(d(0));
67
+ else if (o === "partial") {
68
+ let { allowPartialScoring: e, partialScoring: r } = t, o = (r || []).filter((e) => !n(e));
69
+ e && o.length > 0 ? i(d(f(a, o))) : i(d(0));
70
+ } else i({ score: { scaled: -1 } });
71
+ }
72
+ });
73
+ }
74
+ var _ = 3, v = (e, t, n) => {
75
+ n ||= 5;
76
+ let r = 10 ** -n / 2;
77
+ return Math.abs(e - t) <= r;
78
+ }, y = (e) => (t) => r(e, t, (e, t) => {
79
+ if (typeof e == "number" && typeof t == "number") return v(e, t, 3);
80
+ }), b = (e, r) => n(r) && e.length > 0 ? {
81
+ correct: [],
82
+ incorrect: [],
83
+ notInAnswer: [],
84
+ noCorrectResponse: !0
85
+ } : e.reduce((e, n, r) => {
86
+ let { correct: i, incorrect: a, notInAnswer: o } = e, s = t(o, y(n));
87
+ return s ? (i.push(r), o.splice(o.indexOf(s), 1)) : a.push(r), {
88
+ correct: i,
89
+ incorrect: a,
90
+ notInAnswer: o
91
+ };
92
+ }, {
93
+ correct: [],
94
+ incorrect: [],
95
+ notInAnswer: r
96
+ }), x = (e) => {
97
+ let { incorrect: t, correct: n, notInAnswer: r, noCorrectResponse: i } = e;
98
+ return i ? "unknown" : t.length === 0 && n.length === 0 ? "unanswered" : t.length === 0 && r.length === 0 ? "correct" : t.length > 0 || r.length > 0 ? n.length > 0 ? "partial" : "incorrect" : "unknown";
99
+ };
100
+ function S(e) {
101
+ let t = i(o.feedback, e.feedback);
102
+ return {
103
+ ...o,
104
+ ...e,
105
+ feedback: t
106
+ };
107
+ }
108
+ function C(e = {}) {
109
+ return new Promise((t) => {
110
+ t(a({
111
+ ...e,
112
+ graph: {
113
+ ...o.graph,
114
+ ...e.graph
115
+ },
116
+ colorContrast: "black_on_white"
117
+ }, (e) => !e));
118
+ });
119
+ }
120
+ var w = (e) => {
121
+ let { graph: { domain: t, labelStep: n, ticks: r = {} } = {} } = e, { minor: i, major: a } = r;
122
+ if (t && (t.min = Number((t.min || 0).toFixed(2)), t.max = Number((t.max || 0).toFixed(2))), n && typeof n == "string" && n.match(/^[1-9][0-9]*\/[1-9][0-9]*$/g)) {
123
+ e.graph.fraction = !0, r.tickIntervalType = "Fraction";
124
+ let t = c.evaluate(n);
125
+ t !== a && (r.major = t, r.minor = t / (a / i));
126
+ }
127
+ return e;
128
+ };
129
+ async function T(t, n, r) {
130
+ if (!t) throw Error("question is null");
131
+ let i = await S(t), o = s(w(i).graph);
132
+ if (o) {
133
+ let t = r.mode === "evaluate", s = e(i.correctResponse), c = t && b(n && n.answer || [], s), u = t && x(c), { exhibitOnly: d } = o, f = r.mode !== "gather" || d === !0, p = null;
134
+ r.role === "instructor" && (r.mode === "view" || t) && (p = i.teacherInstructions);
135
+ let m = t ? await l(u, i.feedback) : void 0;
136
+ return a({
137
+ prompt: i.prompt,
138
+ teacherInstructions: p,
139
+ graph: o,
140
+ disabled: f,
141
+ corrected: c,
142
+ correctResponse: t && ["unanswered", "correct"].indexOf(u) === -1 && i.correctResponse,
143
+ feedback: m && {
144
+ type: u,
145
+ message: m
146
+ },
147
+ colorContrast: r.accessibility && r.accessibility.colorContrast || "black_on_white",
148
+ language: i.language,
149
+ extraCSSRules: i.extraCSSRules
150
+ }, (e) => !e);
151
+ } else throw Error("graph is undefined");
152
+ }
153
+ var E = (e, t) => new Promise((n) => {
154
+ if (t.mode !== "evaluate" && t.role === "instructor") {
155
+ let { correctResponse: t } = e;
156
+ n({
157
+ answer: t,
158
+ id: "1"
159
+ });
160
+ } else n(null);
161
+ }), D = (e) => (e || "").replace(/(<(?!img|iframe|source)([^>]+)>)/gi, ""), O = (e = {}, t = {}) => {
162
+ let { graph: n, correctResponse: r } = e || {}, { maxMaxElements: i = 20, numberLineDimensions: { min: a = 200, max: o = 800 } = {} } = t || {}, { width: s, domain: c, maxNumberOfPoints: l } = n || {}, { min: u, max: d } = c || {}, f = {};
163
+ ["teacherInstructions", "prompt"].forEach((n) => {
164
+ t[n]?.required && !D(e[n]) && (f[n] = "This field is required.");
165
+ }), (s < a || s > o) && (f.widthError = `Width should be a value between ${a} and ${o}.`);
166
+ let p = -1e5, m = 1e5;
167
+ return (u < p || u > m || d < p || d > m) && (f.domainError = `Min and max values must both be in the range [${p}, ${m}].`), u >= d && (f.maxError = "Max value must be greater than min value."), (l < 1 || l > i) && (f.pointsError = `Max number of elements should be between 1 and ${i}.`), r && r.length === 0 && (f.correctResponseError = "The correct answer should include at least one number line object."), f;
168
+ };
169
+ //#endregion
170
+ export { _ as CLOSE_TO_PRECISION, v as closeTo, E as createCorrectResponseSession, C as createDefaultModel, b as getCorrected, x as getCorrectness, m as getLogTrace, g as getScore, T as model, S as normalize, h as outcome, O as validate };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/number-line/controller/src/tickUtils.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 getMinorLimits: (domain: any, width: any) => {
10
+ min: any;
11
+ max: any;
12
+ };
13
+ export declare const generateMinorValues: (minorLimits: any) => {
14
+ fraction: never[];
15
+ decimal: never[];
16
+ };
17
+ export declare const generateMajorValuesForMinor: (minor: any, domain: any, width: any) => {
18
+ decimal: never[];
19
+ fraction: never[];
20
+ };
@@ -0,0 +1,254 @@
1
+ import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js";
2
+ import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isNumber.js";
3
+ import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqWith.js";
4
+ import * as r from "mathjs";
5
+ //#region src/controller/tickUtils.ts
6
+ var i = [
7
+ .001,
8
+ .01,
9
+ .02,
10
+ .04,
11
+ .05,
12
+ .1,
13
+ .125,
14
+ .2,
15
+ .25,
16
+ .5
17
+ ], a = [
18
+ "1/1000",
19
+ "1/100",
20
+ "1/64",
21
+ "1/50",
22
+ "1/32",
23
+ "1/25",
24
+ "1/20",
25
+ "1/16",
26
+ "1/15",
27
+ "1/12",
28
+ "1/10",
29
+ "1/9",
30
+ "1/8",
31
+ "1/7",
32
+ "1/6",
33
+ "1/5",
34
+ "1/4",
35
+ "1/3",
36
+ "1/2"
37
+ ], o = {
38
+ 1: [
39
+ 1,
40
+ 2,
41
+ 3,
42
+ 4,
43
+ 5,
44
+ 6,
45
+ 7,
46
+ 8,
47
+ 9,
48
+ 10
49
+ ],
50
+ 2: [
51
+ 1,
52
+ 2,
53
+ 4,
54
+ 6,
55
+ 8,
56
+ 10
57
+ ],
58
+ 3: [
59
+ 1,
60
+ 3,
61
+ 6,
62
+ 9
63
+ ],
64
+ 4: [
65
+ 1,
66
+ 2,
67
+ 4,
68
+ 8
69
+ ],
70
+ 5: [
71
+ 1,
72
+ 5,
73
+ 10
74
+ ],
75
+ 6: [
76
+ 1,
77
+ 2,
78
+ 3,
79
+ 6
80
+ ],
81
+ 7: [1, 7],
82
+ 8: [
83
+ 1,
84
+ 2,
85
+ 4,
86
+ 8
87
+ ],
88
+ 9: [
89
+ 1,
90
+ 3,
91
+ 9
92
+ ],
93
+ 10: [
94
+ 1,
95
+ 2,
96
+ 5,
97
+ 10
98
+ ],
99
+ 12: [
100
+ 1,
101
+ 2,
102
+ 3,
103
+ 4,
104
+ 6
105
+ ],
106
+ 15: [
107
+ 1,
108
+ 3,
109
+ 5
110
+ ],
111
+ 16: [
112
+ 1,
113
+ 2,
114
+ 4,
115
+ 8
116
+ ],
117
+ 20: [
118
+ 1,
119
+ 2,
120
+ 4,
121
+ 5,
122
+ 10
123
+ ],
124
+ 25: [1, 5],
125
+ 32: [
126
+ 1,
127
+ 2,
128
+ 4,
129
+ 8
130
+ ],
131
+ 50: [
132
+ 1,
133
+ 2,
134
+ 5,
135
+ 10
136
+ ],
137
+ 64: [
138
+ 1,
139
+ 2,
140
+ 4,
141
+ 8
142
+ ],
143
+ 100: [
144
+ 1,
145
+ 2,
146
+ 4,
147
+ 5,
148
+ 10
149
+ ],
150
+ 1e3: [
151
+ 1,
152
+ 2,
153
+ 4,
154
+ 5,
155
+ 8,
156
+ 10
157
+ ]
158
+ }, s = (e, t, n) => {
159
+ let i = r.mod(r.abs(e), r.abs(n));
160
+ if (!r.equal(i, 0)) throw Error("start point must be divisible by interval");
161
+ if (r.equal(e, t)) return [];
162
+ let a = r.subtract(t, r.mod(t, r.abs(n))), o = r.larger(n, 0) ? "positive" : "negative";
163
+ if (o === "negative" && r.largerEq(t, e)) throw Error("start must be > than end when doing a negative decrement");
164
+ if (o === "positive" && r.smallerEq(t, e)) throw Error("start must be < end when doing increments");
165
+ let s = o === "positive" ? r.smallerEq : r.equal(a, t) ? r.largerEq : r.larger, c = [], l = e;
166
+ for (; s(l, a);) c.push(l), l = r.add(l, n);
167
+ return c;
168
+ }, c = (e, t) => `Can only do a positive or negative range, but got: start: ${e} and end:${t}`, l = (e, t, n) => {
169
+ e = r.fraction(e), t = r.fraction(t), n = r.fraction(n);
170
+ let i = r.abs(r.subtract(t, e));
171
+ if (r.larger(i, r.abs(t))) throw Error(c(e, t));
172
+ let a = {
173
+ start: r.abs(e),
174
+ end: r.abs(t),
175
+ interval: r.abs(n),
176
+ multiplier: r.smaller(n, 0) ? -1 : 1
177
+ }, o = r.mod(a.start, a.interval), l = s(r.larger(o, 0) ? r.add(r.subtract(a.start, o), a.interval) : a.start, a.end, a.interval), u = a.multiplier === -1 ? l.map((e) => r.multiply(e, -1)) : l;
178
+ return r.smaller(n, 0) && u.reverse(), u;
179
+ }, u = (e, t) => (e = r.fraction(e), t = r.fraction(t), r.smaller(e, t) ? e : t), d = (e, t) => (e = r.fraction(e), t = r.fraction(t), r.larger(e, t) ? e : t), f = (e, t, i) => {
180
+ e = r.fraction(e), t = r.fraction(t), i = r.fraction(i);
181
+ let a = r.larger(t, 0) ? l(d(0, e), t, i) : [];
182
+ return n((r.smaller(e, 0) ? l(u(0, t), e, r.multiply(i, -1)) : []).concat(a), r.equal);
183
+ }, p = (e, t, n) => {
184
+ n ||= 2;
185
+ let r = 10 ** -n / 2;
186
+ return Math.abs(e - t) < r;
187
+ }, m = (e, t, n) => r.smaller(_(e), _(t)) ? t : r.larger(_(e), _(n)) ? n : e, h = (e, t) => {
188
+ let n = e.max - e.min, i = r.number(r.multiply(10, r.divide(r.fraction(n), t)));
189
+ return {
190
+ min: i,
191
+ max: r.number(r.multiply(20, i))
192
+ };
193
+ }, g = (e, t) => {
194
+ let n = r.mod(e, t);
195
+ return r.equal(n, 0);
196
+ }, _ = (n) => {
197
+ if (e(n)) return r.fraction(n.n * n.s, n.d);
198
+ if (t(n)) return r.fraction(n);
199
+ }, v = (e, t, n, i) => {
200
+ let a = i ? i.limit !== !1 : !0, o = h(e, t), s = a ? m(_(n.minor), o.min, o.max) : _(n.minor), c = a ? m(_(n.major), s, r.multiply(s, 20)) : _(n.major);
201
+ if (!g(c, s)) {
202
+ let e = r.divide(c, s), t = e <= 2 ? 2 : Math.round(e);
203
+ return {
204
+ minor: s,
205
+ major: r.multiply(s, t)
206
+ };
207
+ }
208
+ return {
209
+ major: c,
210
+ minor: s
211
+ };
212
+ }, y = (e, t, n, i) => (n = v(e, t, n, i), f(e.min, e.max, n.minor).filter((t) => r.smallerEq(t, r.fraction(e.max))).map((e) => {
213
+ let t = "minor", i = r.mod(e, n.major);
214
+ return p(r.number(i), 0) && (t = "major"), {
215
+ x: e,
216
+ type: t
217
+ };
218
+ })), b = (e) => {
219
+ let t = {
220
+ fraction: [],
221
+ decimal: []
222
+ };
223
+ return i.forEach((n) => {
224
+ n >= e.min && n <= e.max && t.decimal.push(n);
225
+ }), a.forEach((n) => {
226
+ let i = r.number(r.fraction(n));
227
+ i >= e.min && i <= e.max && t.fraction.push(n);
228
+ }), t;
229
+ }, x = (e, t, n) => {
230
+ let i = {
231
+ decimal: [],
232
+ fraction: []
233
+ }, a = r.fraction(r.number(r.number(e))), s = a.n, c = a.d;
234
+ if (s >= 1 && c === 1) for (let a = 1; a <= 10; a++) {
235
+ let o = r.number(r.multiply(s, a));
236
+ S(t, n, {
237
+ minor: e,
238
+ major: o
239
+ }, { fraction: void 0 }).filter((e) => e.type === "major").length > 1 && (i.fraction.push(o.toString()), i.decimal.push(o));
240
+ }
241
+ else for (let a in o[c]) {
242
+ let l = r.multiply(r.fraction(s, c), o[c][a]);
243
+ S(t, n, {
244
+ minor: e,
245
+ major: r.number(l)
246
+ }, { fraction: void 0 }).filter((e) => e.type === "major").length > 1 && (l.d === 1 ? i.fraction.push(l.n.toString()) : i.fraction.push(l.n + "/" + l.d), i.decimal.push(r.number(l)));
247
+ }
248
+ return i;
249
+ }, S = (e, t, n, i) => y(e, t, n, i).map((e) => i.fraction ? e : {
250
+ ...e,
251
+ x: r.number(e.x) || 0
252
+ });
253
+ //#endregion
254
+ export { x as generateMajorValuesForMinor, b as generateMinorValues, h as getMinorLimits };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/number-line/controller/src/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 reloadTicksData: (graph: any) => any;
@@ -0,0 +1,68 @@
1
+ import { generateMajorValuesForMinor as e, generateMinorValues as t, getMinorLimits as n } from "./tickUtils.js";
2
+ import * as r from "mathjs";
3
+ //#region src/controller/utils.ts
4
+ var i = (t) => {
5
+ let { domain: n, ticks: r, width: i } = t, a = e(r.minor, n, i);
6
+ if (a.decimal.indexOf(r.major) === -1) {
7
+ let e = 0;
8
+ e = r.tickIntervalType === "Integer" && a.decimal.length > 4 ? 4 : a.decimal.length - 1, r.major = a.decimal[e];
9
+ }
10
+ return t.fraction = r.tickIntervalType === "Fraction" && r.major < 1, {
11
+ ...t,
12
+ ticks: r
13
+ };
14
+ }, a = (e) => {
15
+ let { domain: a, ticks: o = {}, width: s } = e;
16
+ o.tickIntervalType || (o.minor > .5 ? o.tickIntervalType = "Integer" : o.tickIntervalType = "Decimal");
17
+ let c = n(a, s);
18
+ if (c.min >= 1) o.tickIntervalType = "Integer", o.minor = o.minor < 1 ? r.number(r.ceil(c.min)) : o.minor >= r.number(r.ceil(c.min)) && o.minor <= r.number(r.floor(c.max)) ? o.minor : r.number(r.ceil(c.min)), o.integerTick = o.minor, o.fractionTick = "0", o.decimalTick = 0;
19
+ else if (c.min >= 0 && c.max < 1) {
20
+ o.tickIntervalType === "Integer" && (o.tickIntervalType = "Fraction");
21
+ let e = t(c), n = r.number(r.fraction(e.fraction[0])), i = r.number(r.fraction(e.fraction[e.fraction.length - 1]));
22
+ if (o.minor < n || o.minor > i) switch (o.tickIntervalType) {
23
+ case "Fraction":
24
+ o.minor = r.number(r.fraction(e.fraction[e.fraction.length - 1])), o.fractionTick = e.fraction[e.fraction.length - 1], o.decimalTick = e.decimal[0];
25
+ break;
26
+ case "Decimal":
27
+ case "Integer": o.minor = e.decimal[e.decimal.length - 1], o.decimalTick = e.decimal[e.decimal.length - 1], o.fractionTick = e.fraction[0];
28
+ }
29
+ else switch (o.tickIntervalType) {
30
+ case "Fraction":
31
+ let t = r.fraction(r.number(o.minor));
32
+ o.fractionTick = t.n + "/" + t.d, o.decimalTick = o.decimalTick ? o.decimalTick : e.decimal[0];
33
+ break;
34
+ case "Decimal":
35
+ case "Integer": o.decimalTick = o.minor, o.fractionTick = o.fractionTick ? o.fractionTick : e.fraction[0];
36
+ }
37
+ o.integerTick = 1;
38
+ } else if (c.min < 1 && c.max >= 1) {
39
+ let e = t(c);
40
+ if (o.minor >= c.min && o.minor <= c.max) switch (o.tickIntervalType) {
41
+ case "Integer":
42
+ o.integerTick = o.minor, o.decimalTick = c.min > .5 ? 0 : e.decimal[0], o.fractionTick = c.min > .5 ? "0" : e.fraction[0];
43
+ break;
44
+ case "Decimal":
45
+ o.integerTick = 1, o.decimalTick = o.minor, o.fractionTick = e.fraction[0];
46
+ break;
47
+ case "Fraction":
48
+ o.integerTick = 1, o.decimalTick = e.decimal[0];
49
+ let t = r.fraction(r.number(o.minor));
50
+ o.fractionTick = t.n + "/" + t.d;
51
+ }
52
+ else switch (c.min > .5 && (o.tickIntervalType = "Integer"), o.tickIntervalType) {
53
+ case "Integer":
54
+ o.minor = r.number(r.ceil(c.min)), o.integerTick = o.minor, o.decimalTick = c.min > .5 ? 0 : e.decimal[0], o.fractionTick = c.min > .5 ? "0" : e.fraction[0];
55
+ break;
56
+ case "Decimal":
57
+ o.minor = e.decimal[0], o.integerTick = 1, o.decimalTick = o.minor, o.fractionTick = e.fraction[0];
58
+ break;
59
+ case "Fraction": o.minor = r.number(r.fraction(e.fraction[0])), o.integerTick = 1, o.decimalTick = e.decimal[0], o.fractionTick = e.fraction[0];
60
+ }
61
+ }
62
+ return i({
63
+ ...e,
64
+ ticks: o
65
+ });
66
+ };
67
+ //#endregion
68
+ export { a as reloadTicksData };