@pie-element/number-line 0.1.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 (352) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +11 -0
  2. package/dist/author/arrows.d.ts +29 -0
  3. package/dist/author/arrows.d.ts.map +1 -0
  4. package/dist/author/arrows.js +69 -0
  5. package/dist/author/card-bar.d.ts +21 -0
  6. package/dist/author/card-bar.d.ts.map +1 -0
  7. package/dist/author/card-bar.js +41 -0
  8. package/dist/author/defaults.d.ts +179 -0
  9. package/dist/author/defaults.d.ts.map +1 -0
  10. package/dist/author/defaults.js +144 -0
  11. package/dist/author/domain.d.ts +16 -0
  12. package/dist/author/domain.d.ts.map +1 -0
  13. package/dist/author/domain.js +53 -0
  14. package/dist/author/index.d.ts +24 -0
  15. package/dist/author/index.d.ts.map +1 -0
  16. package/dist/author/index.js +89 -0
  17. package/dist/author/main.d.ts +45 -0
  18. package/dist/author/main.d.ts.map +1 -0
  19. package/dist/author/main.js +482 -0
  20. package/dist/author/number-text-field.d.ts +14 -0
  21. package/dist/author/number-text-field.d.ts.map +1 -0
  22. package/dist/author/number-text-field.js +11 -0
  23. package/dist/author/point-config.d.ts +26 -0
  24. package/dist/author/point-config.d.ts.map +1 -0
  25. package/dist/author/point-config.js +69 -0
  26. package/dist/author/size.d.ts +25 -0
  27. package/dist/author/size.d.ts.map +1 -0
  28. package/dist/author/size.js +48 -0
  29. package/dist/author/ticks.d.ts +23 -0
  30. package/dist/author/ticks.d.ts.map +1 -0
  31. package/dist/author/ticks.js +115 -0
  32. package/dist/author/utils.d.ts +10 -0
  33. package/dist/author/utils.d.ts.map +1 -0
  34. package/dist/author/utils.js +4 -0
  35. package/dist/controller/defaults.d.ts +59 -0
  36. package/dist/controller/defaults.d.ts.map +1 -0
  37. package/dist/controller/defaults.js +50 -0
  38. package/dist/controller/index.d.ts +34 -0
  39. package/dist/controller/index.d.ts.map +1 -0
  40. package/dist/controller/index.js +170 -0
  41. package/dist/controller/tickUtils.d.ts +21 -0
  42. package/dist/controller/tickUtils.d.ts.map +1 -0
  43. package/dist/controller/tickUtils.js +254 -0
  44. package/dist/controller/utils.d.ts +10 -0
  45. package/dist/controller/utils.d.ts.map +1 -0
  46. package/dist/controller/utils.js +68 -0
  47. package/dist/delivery/data-converter.d.ts +65 -0
  48. package/dist/delivery/data-converter.d.ts.map +1 -0
  49. package/dist/delivery/data-converter.js +70 -0
  50. package/dist/delivery/draggable/index.d.ts +34 -0
  51. package/dist/delivery/draggable/index.d.ts.map +1 -0
  52. package/dist/delivery/draggable/index.js +39 -0
  53. package/dist/delivery/index.d.ts +36 -0
  54. package/dist/delivery/index.d.ts.map +1 -0
  55. package/dist/delivery/index.js +109 -0
  56. package/dist/delivery/number-line/colors.d.ts +12 -0
  57. package/dist/delivery/number-line/colors.d.ts.map +1 -0
  58. package/dist/delivery/number-line/colors.js +5 -0
  59. package/dist/delivery/number-line/feedback.d.ts +20 -0
  60. package/dist/delivery/number-line/feedback.d.ts.map +1 -0
  61. package/dist/delivery/number-line/feedback.js +57 -0
  62. package/dist/delivery/number-line/graph/arrow.d.ts +31 -0
  63. package/dist/delivery/number-line/graph/arrow.d.ts.map +1 -0
  64. package/dist/delivery/number-line/graph/arrow.js +27 -0
  65. package/dist/delivery/number-line/graph/elements/base.d.ts +17 -0
  66. package/dist/delivery/number-line/graph/elements/base.d.ts.map +1 -0
  67. package/dist/delivery/number-line/graph/elements/base.js +11 -0
  68. package/dist/delivery/number-line/graph/elements/builder.d.ts +34 -0
  69. package/dist/delivery/number-line/graph/elements/builder.d.ts.map +1 -0
  70. package/dist/delivery/number-line/graph/elements/builder.js +30 -0
  71. package/dist/delivery/number-line/graph/elements/line.d.ts +52 -0
  72. package/dist/delivery/number-line/graph/elements/line.d.ts.map +1 -0
  73. package/dist/delivery/number-line/graph/elements/line.js +189 -0
  74. package/dist/delivery/number-line/graph/elements/point.d.ts +44 -0
  75. package/dist/delivery/number-line/graph/elements/point.d.ts.map +1 -0
  76. package/dist/delivery/number-line/graph/elements/point.js +127 -0
  77. package/dist/delivery/number-line/graph/elements/ray.d.ts +44 -0
  78. package/dist/delivery/number-line/graph/elements/ray.d.ts.map +1 -0
  79. package/dist/delivery/number-line/graph/elements/ray.js +130 -0
  80. package/dist/delivery/number-line/graph/index.d.ts +60 -0
  81. package/dist/delivery/number-line/graph/index.d.ts.map +1 -0
  82. package/dist/delivery/number-line/graph/index.js +196 -0
  83. package/dist/delivery/number-line/graph/line.d.ts +47 -0
  84. package/dist/delivery/number-line/graph/line.d.ts.map +1 -0
  85. package/dist/delivery/number-line/graph/line.js +27 -0
  86. package/dist/delivery/number-line/graph/stacks.d.ts +11 -0
  87. package/dist/delivery/number-line/graph/stacks.d.ts.map +1 -0
  88. package/dist/delivery/number-line/graph/stacks.js +40 -0
  89. package/dist/delivery/number-line/graph/tick-utils.d.ts +74 -0
  90. package/dist/delivery/number-line/graph/tick-utils.d.ts.map +1 -0
  91. package/dist/delivery/number-line/graph/tick-utils.js +297 -0
  92. package/dist/delivery/number-line/graph/ticks.d.ts +47 -0
  93. package/dist/delivery/number-line/graph/ticks.d.ts.map +1 -0
  94. package/dist/delivery/number-line/graph/ticks.js +115 -0
  95. package/dist/delivery/number-line/index.d.ts +36 -0
  96. package/dist/delivery/number-line/index.d.ts.map +1 -0
  97. package/dist/delivery/number-line/index.js +218 -0
  98. package/dist/delivery/number-line/point-chooser/button.d.ts +32 -0
  99. package/dist/delivery/number-line/point-chooser/button.d.ts.map +1 -0
  100. package/dist/delivery/number-line/point-chooser/button.js +36 -0
  101. package/dist/delivery/number-line/point-chooser/img.d.ts +11 -0
  102. package/dist/delivery/number-line/point-chooser/img.d.ts.map +1 -0
  103. package/dist/delivery/number-line/point-chooser/img.js +4 -0
  104. package/dist/delivery/number-line/point-chooser/index.d.ts +38 -0
  105. package/dist/delivery/number-line/point-chooser/index.d.ts.map +1 -0
  106. package/dist/delivery/number-line/point-chooser/index.js +154 -0
  107. package/dist/delivery/number-line/point-chooser/styles.d.ts +193 -0
  108. package/dist/delivery/number-line/point-chooser/styles.d.ts.map +1 -0
  109. package/dist/delivery/number-line/transitions/fade.d.ts +35 -0
  110. package/dist/delivery/number-line/transitions/fade.d.ts.map +1 -0
  111. package/dist/delivery/number-line/transitions/fade.js +75 -0
  112. package/dist/delivery/number-line/transitions/index.d.ts +11 -0
  113. package/dist/delivery/number-line/transitions/index.d.ts.map +1 -0
  114. package/dist/index.d.ts +2 -0
  115. package/dist/index.d.ts.map +1 -0
  116. package/dist/index.iife.d.ts +9 -0
  117. package/dist/index.iife.d.ts.map +1 -0
  118. package/dist/index.iife.js +201 -0
  119. package/dist/index.js +2 -0
  120. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_DataView.js +6 -0
  121. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Hash.js +16 -0
  122. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.js +16 -0
  123. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Map.js +6 -0
  124. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.js +16 -0
  125. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Promise.js +6 -0
  126. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Set.js +6 -0
  127. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_SetCache.js +11 -0
  128. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Stack.js +13 -0
  129. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js +5 -0
  130. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.js +5 -0
  131. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.js +6 -0
  132. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_apply.js +12 -0
  133. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayEach.js +7 -0
  134. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.js +10 -0
  135. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayIncludes.js +7 -0
  136. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayIncludesWith.js +7 -0
  137. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
  138. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayMap.js +7 -0
  139. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.js +7 -0
  140. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arraySome.js +7 -0
  141. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assignMergeValue.js +8 -0
  142. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assignValue.js +10 -0
  143. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.js +8 -0
  144. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssign.js +8 -0
  145. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignIn.js +8 -0
  146. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignValue.js +12 -0
  147. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseClone.js +57 -0
  148. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseCreate.js +14 -0
  149. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseFindIndex.js +7 -0
  150. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseFor.js +5 -0
  151. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGet.js +10 -0
  152. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
  153. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js +10 -0
  154. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseHasIn.js +6 -0
  155. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIndexOf.js +9 -0
  156. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js +9 -0
  157. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqual.js +8 -0
  158. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
  159. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMap.js +9 -0
  160. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMatch.js +26 -0
  161. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNaN.js +6 -0
  162. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js +11 -0
  163. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsSet.js +9 -0
  164. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
  165. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIteratee.js +11 -0
  166. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeys.js +12 -0
  167. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.js +13 -0
  168. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMatches.js +12 -0
  169. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
  170. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMerge.js +19 -0
  171. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMergeDeep.js +31 -0
  172. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_basePickBy.js +13 -0
  173. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseProperty.js +8 -0
  174. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_basePropertyDeep.js +9 -0
  175. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseRest.js +9 -0
  176. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseSet.js +22 -0
  177. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseSetToString.js +14 -0
  178. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js +7 -0
  179. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseToString.js +15 -0
  180. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTrim.js +8 -0
  181. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js +8 -0
  182. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseUniq.js +27 -0
  183. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cacheHas.js +6 -0
  184. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_castPath.js +10 -0
  185. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  186. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneBuffer.js +10 -0
  187. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneDataView.js +8 -0
  188. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneRegExp.js +8 -0
  189. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneSymbol.js +8 -0
  190. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  191. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyArray.js +8 -0
  192. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyObject.js +14 -0
  193. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbols.js +8 -0
  194. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbolsIn.js +8 -0
  195. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js +5 -0
  196. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createAssigner.js +15 -0
  197. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createBaseFor.js +12 -0
  198. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createFind.js +19 -0
  199. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createSet.js +9 -0
  200. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.js +10 -0
  201. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalArrays.js +35 -0
  202. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalByTag.js +35 -0
  203. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalObjects.js +32 -0
  204. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js +4 -0
  205. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeys.js +9 -0
  206. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeysIn.js +9 -0
  207. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.js +8 -0
  208. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getMatchData.js +16 -0
  209. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js +9 -0
  210. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getPrototype.js +5 -0
  211. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js +14 -0
  212. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.js +10 -0
  213. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbolsIn.js +11 -0
  214. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getTag.js +23 -0
  215. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js +6 -0
  216. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hasPath.js +18 -0
  217. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.js +7 -0
  218. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.js +7 -0
  219. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.js +13 -0
  220. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.js +9 -0
  221. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.js +9 -0
  222. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneArray.js +8 -0
  223. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneByTag.js +33 -0
  224. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneObject.js +9 -0
  225. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js +8 -0
  226. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIterateeCall.js +12 -0
  227. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isKey.js +11 -0
  228. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.js +7 -0
  229. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js +11 -0
  230. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js +8 -0
  231. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isStrictComparable.js +7 -0
  232. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.js +6 -0
  233. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.js +9 -0
  234. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.js +8 -0
  235. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.js +7 -0
  236. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.js +8 -0
  237. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.js +13 -0
  238. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  239. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.js +7 -0
  240. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.js +7 -0
  241. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.js +8 -0
  242. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapToArray.js +9 -0
  243. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
  244. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_memoizeCapped.js +11 -0
  245. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.js +5 -0
  246. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeys.js +5 -0
  247. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.js +8 -0
  248. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js +9 -0
  249. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js +7 -0
  250. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overArg.js +8 -0
  251. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overRest.js +13 -0
  252. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_root.js +5 -0
  253. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_safeGet.js +6 -0
  254. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setCacheAdd.js +7 -0
  255. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setCacheHas.js +6 -0
  256. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToArray.js +9 -0
  257. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToString.js +6 -0
  258. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_shortOut.js +14 -0
  259. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.js +7 -0
  260. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.js +7 -0
  261. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.js +6 -0
  262. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.js +6 -0
  263. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.js +16 -0
  264. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_strictIndexOf.js +7 -0
  265. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stringToPath.js +10 -0
  266. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toKey.js +10 -0
  267. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js +15 -0
  268. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_trimmedEndIndex.js +8 -0
  269. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/cloneDeep.js +8 -0
  270. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/constant.js +8 -0
  271. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/eq.js +6 -0
  272. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/find.js +6 -0
  273. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/findIndex.js +13 -0
  274. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/get.js +8 -0
  275. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/hasIn.js +8 -0
  276. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/identity.js +6 -0
  277. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js +10 -0
  278. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArray.js +4 -0
  279. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js +8 -0
  280. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLikeObject.js +8 -0
  281. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js +6 -0
  282. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEmpty.js +21 -0
  283. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEqual.js +7 -0
  284. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEqualWith.js +9 -0
  285. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js +11 -0
  286. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isLength.js +7 -0
  287. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isMap.js +7 -0
  288. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isNumber.js +9 -0
  289. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObject.js +7 -0
  290. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js +6 -0
  291. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isPlainObject.js +14 -0
  292. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSet.js +7 -0
  293. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSymbol.js +9 -0
  294. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js +7 -0
  295. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keys.js +9 -0
  296. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keysIn.js +9 -0
  297. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/memoize.js +16 -0
  298. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/merge.js +8 -0
  299. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/negate.js +17 -0
  300. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/noop.js +4 -0
  301. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/omitBy.js +9 -0
  302. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/pickBy.js +16 -0
  303. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/property.js +10 -0
  304. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubArray.js +6 -0
  305. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js +6 -0
  306. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toFinite.js +8 -0
  307. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toInteger.js +8 -0
  308. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toNumber.js +19 -0
  309. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toPlainObject.js +8 -0
  310. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toString.js +7 -0
  311. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/uniqWith.js +7 -0
  312. package/package.json +77 -0
  313. package/src/author/arrows.tsx +87 -0
  314. package/src/author/card-bar.tsx +70 -0
  315. package/src/author/defaults.ts +127 -0
  316. package/src/author/domain.tsx +79 -0
  317. package/src/author/index.ts +199 -0
  318. package/src/author/main.tsx +777 -0
  319. package/src/author/number-text-field.tsx +28 -0
  320. package/src/author/point-config.tsx +93 -0
  321. package/src/author/size.tsx +74 -0
  322. package/src/author/ticks.tsx +272 -0
  323. package/src/author/utils.ts +16 -0
  324. package/src/controller/defaults.ts +40 -0
  325. package/src/controller/index.ts +437 -0
  326. package/src/controller/tickUtils.ts +324 -0
  327. package/src/controller/utils.ts +159 -0
  328. package/src/delivery/data-converter.ts +88 -0
  329. package/src/delivery/draggable/index.ts +116 -0
  330. package/src/delivery/index.ts +225 -0
  331. package/src/delivery/number-line/colors.ts +15 -0
  332. package/src/delivery/number-line/feedback.tsx +85 -0
  333. package/src/delivery/number-line/graph/arrow.tsx +43 -0
  334. package/src/delivery/number-line/graph/elements/base.ts +20 -0
  335. package/src/delivery/number-line/graph/elements/builder.ts +37 -0
  336. package/src/delivery/number-line/graph/elements/line.tsx +259 -0
  337. package/src/delivery/number-line/graph/elements/point.tsx +219 -0
  338. package/src/delivery/number-line/graph/elements/ray.tsx +168 -0
  339. package/src/delivery/number-line/graph/index.tsx +258 -0
  340. package/src/delivery/number-line/graph/line.tsx +33 -0
  341. package/src/delivery/number-line/graph/stacks.ts +82 -0
  342. package/src/delivery/number-line/graph/tick-utils.ts +369 -0
  343. package/src/delivery/number-line/graph/ticks.tsx +189 -0
  344. package/src/delivery/number-line/index.tsx +385 -0
  345. package/src/delivery/number-line/point-chooser/button.tsx +54 -0
  346. package/src/delivery/number-line/point-chooser/img.ts +11 -0
  347. package/src/delivery/number-line/point-chooser/index.tsx +200 -0
  348. package/src/delivery/number-line/point-chooser/styles.ts +86 -0
  349. package/src/delivery/number-line/transitions/fade.tsx +100 -0
  350. package/src/delivery/number-line/transitions/index.ts +12 -0
  351. package/src/index.iife.ts +16 -0
  352. package/src/index.ts +1 -0
@@ -0,0 +1,89 @@
1
+ import e from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/cloneDeep.js";
2
+ import { configuration as t, model as n } from "./defaults.js";
3
+ import r from "./main.js";
4
+ import i from "react";
5
+ import * as a from "mathjs";
6
+ import { createRoot as o } from "react-dom/client";
7
+ import { DeleteImageEvent as s, DeleteSoundEvent as c, InsertImageEvent as l, InsertSoundEvent as u, ModelUpdatedEvent as d } from "@pie-element/shared-configure-events";
8
+ //#region src/author/index.ts
9
+ var f = (e) => {
10
+ let { graph: { domain: t, labelStep: n, ticks: r = {} } = {} } = e, { minor: i, major: o } = r;
11
+ 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)) {
12
+ e.graph.fraction = !0, r.tickIntervalType = "Fraction";
13
+ let t = a.evaluate(n);
14
+ t !== o && (r.major = t, r.minor = t / (o / i));
15
+ }
16
+ return e;
17
+ }, p = class a extends HTMLElement {
18
+ static createDefaultModel = (e = {}) => {
19
+ let r = t, i = e.language || "";
20
+ return !i && r.language && r.language.enabled && r.languageChoices?.options?.length && (i = r.languageChoices.options[0].value), f({
21
+ ...n,
22
+ ...e,
23
+ language: i
24
+ });
25
+ };
26
+ constructor() {
27
+ super(), this._root = null, this._model = a.createDefaultModel(), this._configuration = t;
28
+ }
29
+ set model(t) {
30
+ this._model = a.createDefaultModel(t), this._modelCopy = e(this._model), this._rerender();
31
+ }
32
+ resetModelAfterConfigurationIsSet = () => {
33
+ let e = document.querySelectorAll("pie-author");
34
+ this.hasPlayerAsParent = Array.from(e).some((e) => e.contains(this)), this.hasPlayerAsParent && (this._modelCopy ? this._model = this._modelCopy : delete this._modelCopy);
35
+ };
36
+ set configuration(e) {
37
+ let n = {
38
+ ...t,
39
+ ...e
40
+ };
41
+ this._configuration = n, this.resetModelAfterConfigurationIsSet(), n?.language?.enabled ? n?.languageChoices?.options?.length && (this._model.language = n?.languageChoices.options[0].value) : n.language.settings && this._model.language ? (this._configuration.language.enabled = !0, (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) && (this._configuration.languageChoices.options = []), this._configuration.languageChoices.options.find((e) => e.value === this._model.language) || this._configuration.languageChoices.options.push({
42
+ value: this._model.language,
43
+ label: this._model.language
44
+ })) : delete this._model.language, this._rerender();
45
+ }
46
+ onChange = (e) => {
47
+ this._model = {
48
+ ...this._model,
49
+ ...e
50
+ }, this.dispatchEvent(new d(this._model)), this._rerender();
51
+ };
52
+ onConfigurationChanged = (e) => {
53
+ this._configuration = e, this._render();
54
+ };
55
+ insertImage(e) {
56
+ this.dispatchEvent(new l(e));
57
+ }
58
+ onDeleteImage(e, t) {
59
+ this.dispatchEvent(new s(e, t));
60
+ }
61
+ insertSound(e) {
62
+ this.dispatchEvent(new u(e));
63
+ }
64
+ onDeleteSound(e, t) {
65
+ this.dispatchEvent(new c(e, t));
66
+ }
67
+ _rerender() {
68
+ let e = i.createElement(r, {
69
+ model: this._model,
70
+ configuration: this._configuration,
71
+ onChange: this.onChange,
72
+ onConfigurationChanged: this.onConfigurationChanged,
73
+ imageSupport: {
74
+ add: this.insertImage.bind(this),
75
+ delete: this.onDeleteImage.bind(this)
76
+ },
77
+ uploadSoundSupport: {
78
+ add: this.insertSound.bind(this),
79
+ delete: this.onDeleteSound.bind(this)
80
+ }
81
+ });
82
+ this._root ||= o(this), this._root.render(e);
83
+ }
84
+ disconnectedCallback() {
85
+ this._root && this._root.unmount();
86
+ }
87
+ };
88
+ //#endregion
89
+ export { p as default };
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/number-line/configure/src/main.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 toPointType: (response: any) => string;
12
+ export declare class Main extends React.Component {
13
+ static propTypes: {
14
+ model: PropTypes.Validator<object>;
15
+ configuration: PropTypes.Validator<object>;
16
+ onConfigurationChanged: PropTypes.Validator<(...args: any[]) => any>;
17
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
18
+ imageSupport: PropTypes.Validator<object>;
19
+ uploadSoundSupport: PropTypes.Validator<object>;
20
+ };
21
+ constructor(props: any);
22
+ componentDidMount(): void;
23
+ graphChange: any;
24
+ changeSize: ({ width, height }: {
25
+ width: any;
26
+ height: any;
27
+ }) => any;
28
+ getAdjustedHeight: any;
29
+ changeMaxNoOfPoints: any;
30
+ changeGraphTitle: (title: any) => any;
31
+ changeTicks: any;
32
+ reloadTicksData: any;
33
+ updateMajorValue: any;
34
+ changeArrows: (arrows: any) => any;
35
+ setDefaults: any;
36
+ moveCorrectResponse: any;
37
+ availableTypesChange: any;
38
+ deleteCorrectResponse: any;
39
+ addCorrectResponse: any;
40
+ clearCorrectResponse: any;
41
+ undoCorrectResponse: any;
42
+ render(): React.JSX.Element;
43
+ }
44
+ export default Main;
45
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/author/main.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAgFnC,eAAO,MAAM,WAAW,GAAI,aAAQ,WAcnC,CAAC;AAEF,qBAAa,IAAK,SAAQ,KAAK,CAAC,SAAS;IACvC,MAAM,CAAC,SAAS;;;;;;;MAOd;gBAEU,KAAK,KAAA;IAqBjB,iBAAiB;IAUjB,WAAW,EAAE,GAAG,CAgCd;IAEF,UAAU,GAAI;;;KAAiB,SAAyC;IAExE,iBAAiB,EAAE,GAAG,CAWpB;IAEF,mBAAmB,EAAE,GAAG,CAmBtB;IAEF,gBAAgB,GAAI,UAAK,SAAiC;IAK1D,WAAW,EAAE,GAAG,CAUd;IASF,eAAe,EAAE,GAAG,CAmHlB;IAQF,gBAAgB,EAAE,GAAG,CAcnB;IAEF,YAAY,GAAI,WAAM,SAAkC;IAExD,WAAW,EAAE,GAAG,CAQd;IAEF,mBAAmB,EAAE,GAAG,CAStB;IAEF,oBAAoB,EAAE,GAAG,CAevB;IAEF,qBAAqB,EAAE,GAAG,CAKxB;IAEF,kBAAkB,EAAE,GAAG,CAMrB;IAEF,oBAAoB,EAAE,GAAG,CAIvB;IAEF,mBAAmB,EAAE,GAAG,CAKtB;IAEF,MAAM;CA+TP;AAED,eAAe,IAAI,CAAC"}
@@ -0,0 +1,482 @@
1
+ import { data_converter_exports as e } from "../delivery/data-converter.js";
2
+ import t from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/cloneDeep.js";
3
+ import { generateMajorValuesForMinor as n, generateMinorValues as r, getMinorLimits as i, snapElements as a } from "../delivery/number-line/graph/tick-utils.js";
4
+ import o from "../delivery/number-line/index.js";
5
+ import s from "./number-text-field.js";
6
+ import c from "./card-bar.js";
7
+ import ee from "./size.js";
8
+ import l from "./domain.js";
9
+ import te from "./arrows.js";
10
+ import ne from "./point-config.js";
11
+ import re from "./ticks.js";
12
+ import { model as u } from "./defaults.js";
13
+ import { generateValidationMessage as ie } from "./utils.js";
14
+ import d from "react";
15
+ import { styled as f } from "@mui/material/styles";
16
+ import p from "prop-types";
17
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
18
+ import * as g from "mathjs";
19
+ import { AlertDialog as _, FormSection as v, InputContainer as y, layout as ae, settings as b } from "@pie-lib/config-ui";
20
+ import x from "@pie-lib/editable-html-tip-tap";
21
+ import oe from "@mui/material/Tooltip";
22
+ import S from "@mui/material/Typography";
23
+ import se from "@mui/icons-material/Info";
24
+ //#region src/author/main.tsx
25
+ var C = (e) => ({
26
+ ...e,
27
+ feedback: void 0,
28
+ prompt: void 0,
29
+ teacherInstructions: void 0,
30
+ graph: {
31
+ ...e.graph,
32
+ title: void 0,
33
+ disabled: !0
34
+ },
35
+ correctResponse: void 0
36
+ }), { lineIsSwitched: w, switchGraphLine: T, toGraphFormat: ce, toSessionFormat: E } = e, { Panel: le, toggle: D } = b, O = {}, k = {}, A = {}, ue = f(s)({ width: "150px" }), de = f("div")(({ theme: e }) => ({
37
+ display: "flex",
38
+ flexWrap: "wrap",
39
+ "& > *": { paddingRight: e.spacing(2) }
40
+ })), fe = f("div")(({ theme: e }) => ({ margin: `${e.spacing(2.5)}px 0` })), j = f(y)(({ theme: e }) => ({
41
+ paddingTop: e.spacing(2),
42
+ marginBottom: e.spacing(2),
43
+ width: "100%"
44
+ })), pe = f(v)(({ theme: e }) => ({ marginBottom: e.spacing(4) })), M = f("div")(({ theme: e }) => ({
45
+ fontSize: e.typography.fontSize - 2,
46
+ color: e.palette.error.main,
47
+ paddingTop: e.spacing(1)
48
+ })), me = f("div")({
49
+ display: "flex",
50
+ alignItems: "center",
51
+ gap: "10px"
52
+ }), he = f(v)({
53
+ display: "flex",
54
+ alignItems: "center",
55
+ gap: "10px"
56
+ }), ge = f(S)(({ theme: e }) => ({ marginBottom: e.spacing(2.5) })), N = (e) => {
57
+ function t(e) {
58
+ return e.pointType ? e.direction ? `${e.pointType[0]}${e.direction[0]}` : e.pointType[0] : `${e.leftPoint[0]}${e.rightPoint[0]}`;
59
+ }
60
+ return `${e.type[0]}${t(e)}`.toUpperCase();
61
+ }, P = class extends d.Component {
62
+ static propTypes = {
63
+ model: p.object.isRequired,
64
+ configuration: p.object.isRequired,
65
+ onConfigurationChanged: p.func.isRequired,
66
+ onChange: p.func.isRequired,
67
+ imageSupport: p.object.isRequired,
68
+ uploadSoundSupport: p.object.isRequired
69
+ };
70
+ constructor(e) {
71
+ super(e);
72
+ let { model: { graph: { availableTypes: t, maxNumberOfPoints: n } } } = e, r = this.getAdjustedHeight(t, n);
73
+ this.state = {
74
+ dialog: {
75
+ open: !1,
76
+ text: ""
77
+ },
78
+ correctAnswerDialog: {
79
+ open: !1,
80
+ text: ""
81
+ }
82
+ }, this.graphChange({ height: r });
83
+ }
84
+ componentDidMount() {
85
+ let { configuration: e, model: t, onChange: n } = this.props, { title: r } = e || {}, { titleEnabled: i } = t || {}, a = i ?? r.enabled;
86
+ n && n({
87
+ ...t,
88
+ titleEnabled: a
89
+ });
90
+ }
91
+ graphChange = (e) => {
92
+ let { model: t, onChange: n } = this.props, r = {
93
+ ...t.graph,
94
+ ...e
95
+ }, i = [];
96
+ t.correctResponse.forEach((e, t) => {
97
+ (e.domainPosition < r.domain.min || e.domainPosition > r.domain.max || e.size && (e.domainPosition + e.size < r.domain.min || e.domainPosition + e.size > r.domain.max)) && i.push(t);
98
+ }), i.length > 0 && this.setState({ correctAnswerDialog: {
99
+ open: !0,
100
+ text: "This\nchange would make it impossible for students to plot one or more elements in the current\ncorrect answer. If you proceed, all such elements will be removed from the correct\nanswer.",
101
+ indices: i,
102
+ graph: t.graph
103
+ } }), r = this.reloadTicksData(r), n({ graph: r });
104
+ };
105
+ changeSize = ({ width: e, height: t }) => this.graphChange({
106
+ width: e,
107
+ height: t
108
+ });
109
+ getAdjustedHeight = (e, t) => {
110
+ let n = !0;
111
+ return Object.entries(e || {}).forEach(([e, t]) => {
112
+ if (e !== "PF" && t) {
113
+ n = !1;
114
+ return;
115
+ }
116
+ }), t && (t === 1 || n) ? 100 : 50 + (t || 20) * 25;
117
+ };
118
+ changeMaxNoOfPoints = (e, t) => {
119
+ if (t = Math.floor(t), this.props.model.correctResponse.length > t) {
120
+ this.setState({ dialog: {
121
+ open: !0,
122
+ text: "To use this value, you must first remove one or more elements from the correct answers."
123
+ } });
124
+ return;
125
+ }
126
+ let { model: { graph: { availableTypes: n } } } = this.props, r = this.getAdjustedHeight(n, t);
127
+ this.graphChange({
128
+ maxNumberOfPoints: t,
129
+ height: r
130
+ });
131
+ };
132
+ changeGraphTitle = (e) => this.graphChange({ title: e });
133
+ changeTicks = (e) => {
134
+ let { model: t, onChange: n } = this.props, { ticks: r } = e, i = a(t.graph.domain, r, t.correctResponse), o = t.graph.initialElements ? a(t.graph.domain, r, t.graph.initialElements) : [];
135
+ n({
136
+ graph: {
137
+ ...this.updateMajorValue({
138
+ ...t.graph,
139
+ ticks: r
140
+ }),
141
+ initialElements: o
142
+ },
143
+ correctResponse: i
144
+ });
145
+ };
146
+ reloadTicksData = (e) => {
147
+ let { domain: t, ticks: n, width: a } = e;
148
+ if (n.tickIntervalType || (n.minor > .5 ? n.tickIntervalType = "Integer" : n.tickIntervalType = "Decimal"), O = i(t, a), O.min >= 1) n.tickIntervalType = "Integer", n.minor = n.minor < 1 ? g.number(g.ceil(O.min)) : n.minor >= g.number(g.ceil(O.min)) && n.minor <= g.number(g.floor(O.max)) ? n.minor : g.number(g.ceil(O.min)), n.integerTick = n.minor, k = {
149
+ decimal: [],
150
+ fraction: []
151
+ }, n.fractionTick = "0", n.decimalTick = 0;
152
+ else if (O.min >= 0 && O.max < 1) {
153
+ n.tickIntervalType === "Integer" && (n.tickIntervalType = "Fraction"), k = r(O);
154
+ let e = g.number(g.fraction(k.fraction[0])), t = g.number(g.fraction(k.fraction[k.fraction.length - 1]));
155
+ if (n.minor < e || n.minor > t) switch (n.tickIntervalType) {
156
+ case "Fraction":
157
+ n.minor = g.number(g.fraction(k.fraction[k.fraction.length - 1])), n.fractionTick = k.fraction[k.fraction.length - 1], n.decimalTick = k.decimal[0];
158
+ break;
159
+ case "Decimal":
160
+ case "Integer": n.minor = k.decimal[k.decimal.length - 1], n.decimalTick = k.decimal[k.decimal.length - 1], n.fractionTick = k.fraction[0];
161
+ }
162
+ else switch (n.tickIntervalType) {
163
+ case "Fraction":
164
+ let e = g.fraction(g.number(n.minor));
165
+ n.fractionTick = e.n + "/" + e.d, n.decimalTick = n.decimalTick ? n.decimalTick : k.decimal[0];
166
+ break;
167
+ case "Decimal":
168
+ case "Integer": n.decimalTick = n.minor, n.fractionTick = n.fractionTick ? n.fractionTick : k.fraction[0];
169
+ }
170
+ n.integerTick = 1;
171
+ } else if (O.min < 1 && O.max >= 1) if (k = r(O), n.minor >= O.min && n.minor <= O.max) switch (n.tickIntervalType) {
172
+ case "Integer":
173
+ n.integerTick = n.minor, n.decimalTick = O.min > .5 ? 0 : k.decimal[0], n.fractionTick = O.min > .5 ? "0" : k.fraction[0];
174
+ break;
175
+ case "Decimal":
176
+ n.integerTick = 1, n.decimalTick = n.minor, n.fractionTick = k.fraction[0];
177
+ break;
178
+ case "Fraction":
179
+ n.integerTick = 1, n.decimalTick = k.decimal[0];
180
+ let e = g.fraction(g.number(n.minor));
181
+ n.fractionTick = e.n + "/" + e.d;
182
+ }
183
+ else switch (O.min > .5 && (n.tickIntervalType = "Integer"), n.tickIntervalType) {
184
+ case "Integer":
185
+ n.minor = g.number(g.ceil(O.min)), n.integerTick = n.minor, n.decimalTick = O.min > .5 ? 0 : k.decimal[0], n.fractionTick = O.min > .5 ? "0" : k.fraction[0];
186
+ break;
187
+ case "Decimal":
188
+ n.minor = k.decimal[0], n.integerTick = 1, n.decimalTick = n.minor, n.fractionTick = k.fraction[0];
189
+ break;
190
+ case "Fraction": n.minor = g.number(g.fraction(k.fraction[0])), n.integerTick = 1, n.decimalTick = k.decimal[0], n.fractionTick = k.fraction[0];
191
+ }
192
+ return this.updateMajorValue({
193
+ ...e,
194
+ ticks: n
195
+ });
196
+ };
197
+ updateMajorValue = (e) => {
198
+ let { domain: t, ticks: r, width: i } = e;
199
+ if (A = n(r.minor, t, i), A.decimal.indexOf(r.major) === -1) {
200
+ let e = 0;
201
+ e = r.tickIntervalType === "Integer" && A.decimal.length > 4 ? 4 : A.decimal.length - 1, r.major = A.decimal[e];
202
+ }
203
+ return e.fraction = r.tickIntervalType === "Fraction" && r.major < 1, {
204
+ ...e,
205
+ ticks: r
206
+ };
207
+ };
208
+ changeArrows = (e) => this.graphChange({ arrows: e });
209
+ setDefaults = () => {
210
+ let { graph: { availableTypes: e, maxNumberOfPoints: n } } = u, r = this.getAdjustedHeight(e, n), i = {
211
+ ...t(u.graph),
212
+ height: r
213
+ };
214
+ this.props.onChange({ graph: i });
215
+ };
216
+ moveCorrectResponse = (e, t, n) => {
217
+ t.position = n;
218
+ let { onChange: r, model: i } = this.props, a = E(t.type === "line" && w(t) ? T(t) : t), o = [...i.correctResponse];
219
+ o[e] = a, r({ correctResponse: o });
220
+ };
221
+ availableTypesChange = (e) => {
222
+ let { model: t, onChange: n } = this.props, { correctResponse: r, graph: { maxNumberOfPoints: i } } = t;
223
+ new Set(r.map(N)).forEach((t) => {
224
+ e[t] = !0;
225
+ });
226
+ let a = this.getAdjustedHeight(e, i);
227
+ n({ graph: {
228
+ ...t.graph,
229
+ availableTypes: e,
230
+ height: a
231
+ } });
232
+ };
233
+ deleteCorrectResponse = (e) => {
234
+ let { model: t, onChange: n } = this.props;
235
+ n({ correctResponse: t.correctResponse.filter((t, n) => !e.some((e) => e === n)) });
236
+ };
237
+ addCorrectResponse = (e) => {
238
+ let { model: t, onChange: n } = this.props, r = [...t.correctResponse];
239
+ r.push(E(e)), n({ correctResponse: r });
240
+ };
241
+ clearCorrectResponse = () => {
242
+ let { onChange: e } = this.props;
243
+ e({ correctResponse: [] });
244
+ };
245
+ undoCorrectResponse = () => {
246
+ let { model: e, onChange: t } = this.props, n = [...e.correctResponse];
247
+ n.pop(), t({ correctResponse: n });
248
+ };
249
+ render() {
250
+ let { model: e, onChange: n, configuration: r, onConfigurationChanged: i, uploadSoundSupport: a, imageSupport: s } = this.props, { baseInputConfiguration: u = {}, contentDimensions: f = {}, instruction: p = {}, teacherInstructions: g = {}, title: y = {}, prompt: b = {}, rationale: S = {}, spellCheck: w = {}, mathMlOptions: T = {}, numberLineDimensions: E = {}, maxMaxElements: N = 20, hidePointConfigButtons: P = !1, availableTools: F = ["PF"], settingsPanelDisabled: I = !1 } = r || {}, { errors: L = {}, extraCSSRules: _e, spellCheckEnabled: R, toolbarEditorPosition: z, teacherInstructionsEnabled: ve, titleEnabled: ye, promptEnabled: be, rationaleEnabled: xe } = e || {}, { graph: B } = e;
251
+ B = this.reloadTicksData(B);
252
+ let { dialog: V, correctAnswerDialog: H } = this.state, { correctResponseError: U, domainError: W, maxError: G, pointsError: K, prompt: q, rationale: J, teacherInstructions: Y, widthError: X } = L || {}, Se = ie(), Ce = t(e.correctResponse || []).map(ce), Z = t(e);
253
+ Z.disabled = !0;
254
+ let Q = { position: z === "top" ? "top" : "bottom" }, we = {
255
+ teacherInstructionsEnabled: g.settings && D(g.label),
256
+ titleEnabled: y.settings && D(y.label),
257
+ promptEnabled: b.settings && D(b.label),
258
+ rationaleEnabled: S.settings && D(S.label),
259
+ spellCheckEnabled: w.settings && D(w.label)
260
+ }, $ = (e = {}) => ({
261
+ ...u,
262
+ ...e
263
+ });
264
+ return /* @__PURE__ */ h(ae.ConfigLayout, {
265
+ extraCSSRules: _e,
266
+ dimensions: f,
267
+ hideSettings: I,
268
+ settings: /* @__PURE__ */ m(le, {
269
+ model: e,
270
+ configuration: r,
271
+ onChangeModel: n,
272
+ onChangeConfiguration: i,
273
+ groups: { Properties: we }
274
+ }),
275
+ children: [
276
+ /* @__PURE__ */ m(ge, {
277
+ component: "div",
278
+ type: "body1",
279
+ children: p.label
280
+ }),
281
+ ve && /* @__PURE__ */ h(j, {
282
+ label: g.label,
283
+ children: [/* @__PURE__ */ m(x, {
284
+ markup: e.teacherInstructions || "",
285
+ onChange: (e) => n({ teacherInstructions: e }),
286
+ nonEmpty: !1,
287
+ disableUnderline: !0,
288
+ error: Y,
289
+ toolbarOpts: Q,
290
+ pluginProps: $(g?.inputConfiguration),
291
+ spellCheck: R,
292
+ imageSupport: s,
293
+ uploadSoundSupport: a,
294
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
295
+ mathMlOptions: T
296
+ }), Y && /* @__PURE__ */ m(M, { children: Y })]
297
+ }),
298
+ be && /* @__PURE__ */ h(j, {
299
+ label: b.label,
300
+ children: [/* @__PURE__ */ m(x, {
301
+ markup: e.prompt || "",
302
+ onChange: (e) => n({ prompt: e }),
303
+ nonEmpty: !1,
304
+ disableUnderline: !0,
305
+ error: q,
306
+ toolbarOpts: Q,
307
+ pluginProps: $(b?.inputConfiguration),
308
+ spellCheck: R,
309
+ imageSupport: s,
310
+ uploadSoundSupport: a,
311
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
312
+ mathMlOptions: T
313
+ }), q && /* @__PURE__ */ m(M, { children: q })]
314
+ }),
315
+ /* @__PURE__ */ m(c, {
316
+ header: "Set Up Number Line",
317
+ info: /* @__PURE__ */ m(oe, {
318
+ disableFocusListener: !0,
319
+ disableTouchListener: !0,
320
+ placement: "right",
321
+ title: Se,
322
+ slotProps: { tooltip: { sx: (e) => ({
323
+ fontSize: e.typography.fontSize - 2,
324
+ whiteSpace: "pre",
325
+ maxWidth: "500px"
326
+ }) } },
327
+ children: /* @__PURE__ */ m(se, {
328
+ fontSize: "small",
329
+ color: "primary",
330
+ style: { marginLeft: "8px" }
331
+ })
332
+ }),
333
+ children: "Set up the number line by entering the domain and number of tick marks to display. Labels on the number line can be edited or removed by clicking on the label."
334
+ }),
335
+ /* @__PURE__ */ m(de, { children: /* @__PURE__ */ m(l, {
336
+ domain: B.domain,
337
+ errors: L,
338
+ onChange: (e) => this.graphChange({ domain: e })
339
+ }) }),
340
+ G && /* @__PURE__ */ m(M, { children: G }),
341
+ W && /* @__PURE__ */ m(M, { children: W }),
342
+ /* @__PURE__ */ m("div", { children: /* @__PURE__ */ m(v, { children: /* @__PURE__ */ m(re, {
343
+ ticks: B.ticks,
344
+ minorLimits: O,
345
+ minorValues: k,
346
+ majorValues: A,
347
+ onChange: this.changeTicks
348
+ }) }) }),
349
+ /* @__PURE__ */ h(me, { children: [
350
+ e.widthEnabled && /* @__PURE__ */ m(ee, {
351
+ size: B,
352
+ min: E.min,
353
+ max: E.max,
354
+ step: E.step,
355
+ onChange: this.changeSize
356
+ }),
357
+ /* @__PURE__ */ m("div", {}),
358
+ /* @__PURE__ */ m(te, {
359
+ arrows: B.arrows,
360
+ onChange: this.changeArrows
361
+ })
362
+ ] }),
363
+ X && /* @__PURE__ */ m(M, { children: X }),
364
+ /* @__PURE__ */ m(o, {
365
+ onMoveElement: () => {},
366
+ onDeleteElements: () => {},
367
+ onAddElement: () => {},
368
+ onClearElements: () => {},
369
+ onUndoElement: () => {},
370
+ minWidth: E.min,
371
+ maxWidth: E.max,
372
+ maxHeight: 70,
373
+ model: C(Z)
374
+ }),
375
+ ye && /* @__PURE__ */ m(pe, {
376
+ label: y?.label || "Title",
377
+ children: /* @__PURE__ */ m(x, {
378
+ markup: B.title || "",
379
+ onChange: this.changeGraphTitle,
380
+ toolbarOpts: Q,
381
+ activePlugins: [
382
+ "bold",
383
+ "html",
384
+ "italic",
385
+ "underline",
386
+ "strikethrough",
387
+ "image",
388
+ "math",
389
+ "languageCharacters",
390
+ "responseArea"
391
+ ],
392
+ pluginProps: $(y?.inputConfiguration),
393
+ spellCheck: R,
394
+ imageSupport: s,
395
+ uploadSoundSupport: a,
396
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
397
+ mathMlOptions: T
398
+ })
399
+ }),
400
+ !B.exhibitOnly && /* @__PURE__ */ h(d.Fragment, { children: [
401
+ /* @__PURE__ */ h(c, {
402
+ header: "Define Tool Set and Correct Response",
403
+ children: ["Select answer type and place it on the number line. Intersecting points, line segments and/or rays will appear above the number line. ", /* @__PURE__ */ m("i", { children: "Note: A maximum of 20 points, line segments or rays may be plotted." })]
404
+ }),
405
+ /* @__PURE__ */ m(c, {
406
+ header: "Available Tools",
407
+ mini: !0,
408
+ children: "Click on the input options to be displayed to the students. All inputs will display by default."
409
+ }),
410
+ /* @__PURE__ */ m(fe, { children: /* @__PURE__ */ m(ne, {
411
+ onSelectionChange: this.availableTypesChange,
412
+ selection: B.availableTypes,
413
+ availableTools: F,
414
+ hideButtons: P
415
+ }) }),
416
+ /* @__PURE__ */ h(he, { children: [
417
+ /* @__PURE__ */ m("label", { children: "Max No of Elements" }),
418
+ /* @__PURE__ */ m(ue, {
419
+ min: 1,
420
+ max: N,
421
+ onlyIntegersAllowed: !0,
422
+ value: B.maxNumberOfPoints,
423
+ onChange: this.changeMaxNoOfPoints
424
+ }),
425
+ K && /* @__PURE__ */ m(M, { children: K })
426
+ ] }),
427
+ /* @__PURE__ */ m("label", { children: "Correct Answer" }),
428
+ /* @__PURE__ */ m(o, {
429
+ onMoveElement: this.moveCorrectResponse,
430
+ onDeleteElements: this.deleteCorrectResponse,
431
+ onAddElement: this.addCorrectResponse,
432
+ onClearElements: this.clearCorrectResponse,
433
+ onUndoElement: this.undoCorrectResponse,
434
+ minWidth: E.min,
435
+ maxWidth: E.max,
436
+ answer: Ce,
437
+ model: C(e)
438
+ }),
439
+ U && /* @__PURE__ */ m(M, { children: U })
440
+ ] }),
441
+ /* @__PURE__ */ m(_, {
442
+ open: V.open,
443
+ title: "Warning",
444
+ text: V.text,
445
+ onConfirm: () => this.setState({ dialog: { open: !1 } })
446
+ }),
447
+ /* @__PURE__ */ m(_, {
448
+ open: H.open,
449
+ title: "Warning",
450
+ text: H.text,
451
+ onConfirm: () => {
452
+ let e = this.state.correctAnswerDialog.indices;
453
+ e && e.length > 0 && this.deleteCorrectResponse(e), this.setState({ correctAnswerDialog: { open: !1 } });
454
+ },
455
+ onClose: () => {
456
+ let e = this.state.correctAnswerDialog.graph;
457
+ n({ graph: e }), this.setState({ correctAnswerDialog: { open: !1 } });
458
+ },
459
+ onConfirmText: "OK",
460
+ onCloseText: "Cancel"
461
+ }),
462
+ xe && /* @__PURE__ */ h(j, {
463
+ label: S.label || "Rationale",
464
+ children: [/* @__PURE__ */ m(x, {
465
+ markup: e.rationale || "",
466
+ onChange: (e) => n({ rationale: e }),
467
+ error: J,
468
+ toolbarOpts: Q,
469
+ spellCheck: R,
470
+ pluginProps: $(S?.inputConfiguration),
471
+ imageSupport: s,
472
+ uploadSoundSupport: a,
473
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
474
+ mathMlOptions: T
475
+ }), J && /* @__PURE__ */ m(M, { children: J })]
476
+ })
477
+ ]
478
+ });
479
+ }
480
+ };
481
+ //#endregion
482
+ export { P as default };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/number-line/configure/src/number-text-field.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
+ declare const MiniField: any;
11
+ declare const NumberTextField: (props: any) => React.JSX.Element;
12
+ export { MiniField };
13
+ export default NumberTextField;
14
+ //# sourceMappingURL=number-text-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-text-field.d.ts","sourceRoot":"","sources":["../../src/author/number-text-field.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,QAAA,MAAM,SAAS,EAAE,GAEf,CAAC;AAEH,QAAA,MAAM,eAAe,GAAI,UAAK,sBAE7B,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,eAAe,eAAe,CAAC"}
@@ -0,0 +1,11 @@
1
+ import "react";
2
+ import { styled as e } from "@mui/material/styles";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ import { NumberTextField as n } from "@pie-lib/config-ui";
5
+ //#region src/author/number-text-field.tsx
6
+ var r = e(n)(({ theme: e }) => ({ marginLeft: e.spacing(1) })), i = e(n)({ maxWidth: "100px" }), a = (e) => /* @__PURE__ */ t(r, {
7
+ ...e,
8
+ variant: "outlined"
9
+ });
10
+ //#endregion
11
+ export { i as MiniField, a as default };
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/number-line/configure/src/point-config.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
+ declare class PointConfig extends React.Component {
12
+ static propTypes: {
13
+ onSelectionChange: PropTypes.Requireable<(...args: any[]) => any>;
14
+ selection: PropTypes.Requireable<object>;
15
+ availableTools: PropTypes.Requireable<any[]>;
16
+ hideButtons: PropTypes.Requireable<boolean>;
17
+ };
18
+ constructor(props: any);
19
+ toggle(point: any): void;
20
+ toggleAll(value: any): void;
21
+ _propsUpdate(selection: any): void;
22
+ active(point: any): boolean;
23
+ render(): React.JSX.Element;
24
+ }
25
+ export default PointConfig;
26
+ //# sourceMappingURL=point-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"point-config.d.ts","sourceRoot":"","sources":["../../src/author/point-config.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAUnC,cAAM,WAAY,SAAQ,KAAK,CAAC,SAAS;IACvC,MAAM,CAAC,SAAS;;;;;MAKd;gBACU,KAAK,KAAA;IAIjB,MAAM,CAAC,KAAK,KAAA;IAMZ,SAAS,CAAC,KAAK,KAAA;IAUf,YAAY,CAAC,SAAS,KAAA;IAItB,MAAM,CAAC,KAAK,KAAA;IAIZ,MAAM;CA6BP;AAID,eAAe,WAAW,CAAC"}