@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.
- package/configure.js +2 -0
- package/controller.js +1 -0
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/author/arrows.d.ts +28 -0
- package/dist/author/arrows.js +69 -0
- package/dist/author/card-bar.d.ts +20 -0
- package/dist/author/card-bar.js +41 -0
- package/dist/author/defaults.d.ts +178 -0
- package/dist/author/defaults.js +144 -0
- package/dist/author/domain.d.ts +15 -0
- package/dist/author/domain.js +54 -0
- package/dist/author/index.d.ts +23 -0
- package/dist/author/index.js +89 -0
- package/dist/author/main.d.ts +44 -0
- package/dist/author/main.js +485 -0
- package/dist/author/number-text-field.d.ts +13 -0
- package/dist/author/number-text-field.js +13 -0
- package/dist/author/point-config.d.ts +25 -0
- package/dist/author/point-config.js +69 -0
- package/dist/author/size.d.ts +24 -0
- package/dist/author/size.js +48 -0
- package/dist/author/ticks.d.ts +22 -0
- package/dist/author/ticks.js +115 -0
- package/dist/author/utils.d.ts +9 -0
- package/dist/author/utils.js +4 -0
- package/dist/browser/_baseSet-ycZx94p7.js +8672 -0
- package/dist/browser/_baseSet-ycZx94p7.js.map +1 -0
- package/dist/browser/author/index.js +40436 -0
- package/dist/browser/author/index.js.map +1 -0
- package/dist/browser/controller/index.js +823 -0
- package/dist/browser/controller/index.js.map +1 -0
- package/dist/browser/delivery/index.js +2 -0
- package/dist/browser/delivery-Dh8QdqpO.js +17950 -0
- package/dist/browser/delivery-Dh8QdqpO.js.map +1 -0
- package/dist/browser/number-line.css +2 -0
- package/dist/browser/uniqWith-CKN50xMI.js +17886 -0
- package/dist/browser/uniqWith-CKN50xMI.js.map +1 -0
- package/dist/controller/defaults.d.ts +58 -0
- package/dist/controller/defaults.js +50 -0
- package/dist/controller/index.d.ts +33 -0
- package/dist/controller/index.js +170 -0
- package/dist/controller/tickUtils.d.ts +20 -0
- package/dist/controller/tickUtils.js +254 -0
- package/dist/controller/utils.d.ts +9 -0
- package/dist/controller/utils.js +68 -0
- package/dist/delivery/data-converter.d.ts +64 -0
- package/dist/delivery/data-converter.js +70 -0
- package/dist/delivery/draggable/index.d.ts +33 -0
- package/dist/delivery/draggable/index.js +39 -0
- package/dist/delivery/index.d.ts +35 -0
- package/dist/delivery/index.js +109 -0
- package/dist/delivery/number-line/colors.d.ts +11 -0
- package/dist/delivery/number-line/colors.js +5 -0
- package/dist/delivery/number-line/feedback.d.ts +19 -0
- package/dist/delivery/number-line/feedback.js +57 -0
- package/dist/delivery/number-line/graph/arrow.d.ts +30 -0
- package/dist/delivery/number-line/graph/arrow.js +27 -0
- package/dist/delivery/number-line/graph/elements/base.d.ts +16 -0
- package/dist/delivery/number-line/graph/elements/base.js +11 -0
- package/dist/delivery/number-line/graph/elements/builder.d.ts +33 -0
- package/dist/delivery/number-line/graph/elements/builder.js +30 -0
- package/dist/delivery/number-line/graph/elements/line.d.ts +51 -0
- package/dist/delivery/number-line/graph/elements/line.js +189 -0
- package/dist/delivery/number-line/graph/elements/point.d.ts +43 -0
- package/dist/delivery/number-line/graph/elements/point.js +127 -0
- package/dist/delivery/number-line/graph/elements/ray.d.ts +43 -0
- package/dist/delivery/number-line/graph/elements/ray.js +130 -0
- package/dist/delivery/number-line/graph/index.d.ts +59 -0
- package/dist/delivery/number-line/graph/index.js +196 -0
- package/dist/delivery/number-line/graph/line.d.ts +46 -0
- package/dist/delivery/number-line/graph/line.js +27 -0
- package/dist/delivery/number-line/graph/stacks.d.ts +10 -0
- package/dist/delivery/number-line/graph/stacks.js +40 -0
- package/dist/delivery/number-line/graph/tick-utils.d.ts +73 -0
- package/dist/delivery/number-line/graph/tick-utils.js +297 -0
- package/dist/delivery/number-line/graph/ticks.d.ts +46 -0
- package/dist/delivery/number-line/graph/ticks.js +115 -0
- package/dist/delivery/number-line/index.d.ts +35 -0
- package/dist/delivery/number-line/index.js +218 -0
- package/dist/delivery/number-line/point-chooser/button.d.ts +31 -0
- package/dist/delivery/number-line/point-chooser/button.js +36 -0
- package/dist/delivery/number-line/point-chooser/img.d.ts +10 -0
- package/dist/delivery/number-line/point-chooser/img.js +4 -0
- package/dist/delivery/number-line/point-chooser/index.d.ts +37 -0
- package/dist/delivery/number-line/point-chooser/index.js +154 -0
- package/dist/delivery/number-line/point-chooser/styles.d.ts +192 -0
- package/dist/delivery/number-line/transitions/fade.d.ts +34 -0
- package/dist/delivery/number-line/transitions/fade.js +75 -0
- package/dist/delivery/number-line/transitions/index.d.ts +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +201 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludesWith.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignMergeValue.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIndexOf.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js +26 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNaN.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMerge.js +19 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMergeDeep.js +31 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePickBy.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js +22 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUniq.js +27 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createAssigner.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createFind.js +19 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +32 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +18 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_safeGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_strictIndexOf.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/find.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/findIndex.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqualWith.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isNumber.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isPlainObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/merge.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/negate.js +17 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/noop.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/omitBy.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/pickBy.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toFinite.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toInteger.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +19 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toPlainObject.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqWith.js +7 -0
- package/package.json +78 -16
- package/CHANGELOG.json +0 -1247
- package/CHANGELOG.md +0 -2435
- package/LICENSE.md +0 -5
- package/README.md +0 -28
- package/configure/CHANGELOG.json +0 -827
- package/configure/CHANGELOG.md +0 -2082
- package/configure/lib/arrows.js +0 -89
- package/configure/lib/arrows.js.map +0 -1
- package/configure/lib/card-bar.js +0 -57
- package/configure/lib/card-bar.js.map +0 -1
- package/configure/lib/defaults.js +0 -177
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/domain.js +0 -87
- package/configure/lib/domain.js.map +0 -1
- package/configure/lib/index.js +0 -176
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/main.js +0 -815
- package/configure/lib/main.js.map +0 -1
- package/configure/lib/number-text-field.js +0 -26
- package/configure/lib/number-text-field.js.map +0 -1
- package/configure/lib/point-config.js +0 -84
- package/configure/lib/point-config.js.map +0 -1
- package/configure/lib/size.js +0 -66
- package/configure/lib/size.js.map +0 -1
- package/configure/lib/ticks.js +0 -234
- package/configure/lib/ticks.js.map +0 -1
- package/configure/lib/utils.js +0 -12
- package/configure/lib/utils.js.map +0 -1
- package/configure/package.json +0 -20
- package/controller/CHANGELOG.json +0 -332
- package/controller/CHANGELOG.md +0 -1360
- package/controller/lib/defaults.js +0 -56
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -430
- package/controller/lib/index.js.map +0 -1
- package/controller/lib/tickUtils.js +0 -294
- package/controller/lib/tickUtils.js.map +0 -1
- package/controller/lib/utils.js +0 -168
- package/controller/lib/utils.js.map +0 -1
- package/controller/package.json +0 -20
- package/demo.gif +0 -0
- package/docs/config-schema.json +0 -2532
- package/docs/config-schema.json.md +0 -1844
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -39
- package/docs/demo/index.html +0 -1
- package/docs/pie-schema.json +0 -2461
- package/docs/pie-schema.json.md +0 -1228
- package/docs/schemas/config.json +0 -256
- package/lib/data-converter.js +0 -96
- package/lib/data-converter.js.map +0 -1
- package/lib/draggable/index.js +0 -114
- package/lib/draggable/index.js.map +0 -1
- package/lib/index.js +0 -196
- package/lib/index.js.map +0 -1
- package/lib/number-line/colors.js +0 -11
- package/lib/number-line/colors.js.map +0 -1
- package/lib/number-line/feedback.js +0 -92
- package/lib/number-line/feedback.js.map +0 -1
- package/lib/number-line/graph/arrow.js +0 -44
- package/lib/number-line/graph/arrow.js.map +0 -1
- package/lib/number-line/graph/elements/base.js +0 -20
- package/lib/number-line/graph/elements/base.js.map +0 -1
- package/lib/number-line/graph/elements/builder.js +0 -37
- package/lib/number-line/graph/elements/builder.js.map +0 -1
- package/lib/number-line/graph/elements/line.js +0 -259
- package/lib/number-line/graph/elements/line.js.map +0 -1
- package/lib/number-line/graph/elements/point.js +0 -204
- package/lib/number-line/graph/elements/point.js.map +0 -1
- package/lib/number-line/graph/elements/ray.js +0 -190
- package/lib/number-line/graph/elements/ray.js.map +0 -1
- package/lib/number-line/graph/index.js +0 -262
- package/lib/number-line/graph/index.js.map +0 -1
- package/lib/number-line/graph/line.js +0 -38
- package/lib/number-line/graph/line.js.map +0 -1
- package/lib/number-line/graph/stacks.js +0 -78
- package/lib/number-line/graph/stacks.js.map +0 -1
- package/lib/number-line/graph/tick-utils.js +0 -347
- package/lib/number-line/graph/tick-utils.js.map +0 -1
- package/lib/number-line/graph/ticks.js +0 -188
- package/lib/number-line/graph/ticks.js.map +0 -1
- package/lib/number-line/index.js +0 -384
- package/lib/number-line/index.js.map +0 -1
- package/lib/number-line/point-chooser/button.js +0 -49
- package/lib/number-line/point-chooser/button.js.map +0 -1
- package/lib/number-line/point-chooser/img.js +0 -8
- package/lib/number-line/point-chooser/img.js.map +0 -1
- package/lib/number-line/point-chooser/index.js +0 -197
- package/lib/number-line/point-chooser/index.js.map +0 -1
- package/lib/number-line/point-chooser/styles.js +0 -77
- package/lib/number-line/point-chooser/styles.js.map +0 -1
- package/lib/number-line/transitions/fade.js +0 -88
- package/lib/number-line/transitions/fade.js.map +0 -1
- package/lib/number-line/transitions/index.js +0 -14
- package/lib/number-line/transitions/index.js.map +0 -1
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getMinorLimits = exports.generateMinorValues = exports.generateMajorValuesForMinor = void 0;
|
|
7
|
-
var math = _interopRequireWildcard(require("mathjs"));
|
|
8
|
-
var _lodashEs = require("lodash-es");
|
|
9
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
10
|
-
// All these functions are duplicated in src/number-line/graph/tick-utils
|
|
11
|
-
|
|
12
|
-
/*This will store the possible decimal tick values*/
|
|
13
|
-
const decimalTickValues = [0.001, 0.01, 0.02, 0.04, 0.05, 0.1, 0.125, 0.2, 0.25, 0.5];
|
|
14
|
-
|
|
15
|
-
/*This will store the possible fraction tick values*/
|
|
16
|
-
const fractionTickValues = ['1/1000', '1/100', '1/64', '1/50', '1/32', '1/25', '1/20', '1/16', '1/15', '1/12', '1/10', '1/9', '1/8', '1/7', '1/6', '1/5', '1/4', '1/3', '1/2'];
|
|
17
|
-
|
|
18
|
-
/*This const will store possible multiplier for label interval that needs to be multiplied
|
|
19
|
-
with tick interval with denominator represented with object key.*/
|
|
20
|
-
const labelMultiplier = {
|
|
21
|
-
1: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
|
|
22
|
-
2: [1, 2, 4, 6, 8, 10],
|
|
23
|
-
3: [1, 3, 6, 9],
|
|
24
|
-
4: [1, 2, 4, 8],
|
|
25
|
-
5: [1, 5, 10],
|
|
26
|
-
6: [1, 2, 3, 6],
|
|
27
|
-
7: [1, 7],
|
|
28
|
-
8: [1, 2, 4, 8],
|
|
29
|
-
9: [1, 3, 9],
|
|
30
|
-
10: [1, 2, 5, 10],
|
|
31
|
-
12: [1, 2, 3, 4, 6],
|
|
32
|
-
15: [1, 3, 5],
|
|
33
|
-
16: [1, 2, 4, 8],
|
|
34
|
-
20: [1, 2, 4, 5, 10],
|
|
35
|
-
25: [1, 5],
|
|
36
|
-
32: [1, 2, 4, 8],
|
|
37
|
-
50: [1, 2, 5, 10],
|
|
38
|
-
64: [1, 2, 4, 8],
|
|
39
|
-
100: [1, 2, 4, 5, 10],
|
|
40
|
-
1000: [1, 2, 4, 5, 8, 10]
|
|
41
|
-
};
|
|
42
|
-
const fractionRange = (start, end, interval) => {
|
|
43
|
-
const m = math.mod(math.abs(start), math.abs(interval));
|
|
44
|
-
if (!math.equal(m, 0)) {
|
|
45
|
-
throw new Error('start point must be divisible by interval');
|
|
46
|
-
}
|
|
47
|
-
if (math.equal(start, end)) {
|
|
48
|
-
return [];
|
|
49
|
-
}
|
|
50
|
-
const e = math.subtract(end, math.mod(end, math.abs(interval)));
|
|
51
|
-
const direction = math.larger(interval, 0) ? 'positive' : 'negative';
|
|
52
|
-
if (direction === 'negative' && math.largerEq(end, start)) {
|
|
53
|
-
throw new Error('start must be > than end when doing a negative decrement');
|
|
54
|
-
}
|
|
55
|
-
if (direction === 'positive' && math.smallerEq(end, start)) {
|
|
56
|
-
throw new Error('start must be < end when doing increments');
|
|
57
|
-
}
|
|
58
|
-
const compareFn = direction === 'positive' ? math.smallerEq : math.equal(e, end) ? math.largerEq : math.larger;
|
|
59
|
-
const out = [];
|
|
60
|
-
let next = start;
|
|
61
|
-
while (compareFn(next, e)) {
|
|
62
|
-
out.push(next);
|
|
63
|
-
next = math.add(next, interval);
|
|
64
|
-
}
|
|
65
|
-
return out;
|
|
66
|
-
};
|
|
67
|
-
const zbrErrorMessage = (start, end) => `Can only do a positive or negative range, but got: start: ${start} and end:${end}`;
|
|
68
|
-
const zeroBasedRange = (start, end, interval) => {
|
|
69
|
-
start = math.fraction(start);
|
|
70
|
-
end = math.fraction(end);
|
|
71
|
-
interval = math.fraction(interval);
|
|
72
|
-
const length = math.abs(math.subtract(end, start));
|
|
73
|
-
if (math.larger(length, math.abs(end))) {
|
|
74
|
-
throw new Error(zbrErrorMessage(start, end));
|
|
75
|
-
}
|
|
76
|
-
const a = {
|
|
77
|
-
start: math.abs(start),
|
|
78
|
-
end: math.abs(end),
|
|
79
|
-
interval: math.abs(interval),
|
|
80
|
-
multiplier: math.smaller(interval, 0) ? -1 : 1
|
|
81
|
-
};
|
|
82
|
-
const m = math.mod(a.start, a.interval);
|
|
83
|
-
const s = math.larger(m, 0) ? math.add(math.subtract(a.start, m), a.interval) : a.start;
|
|
84
|
-
const r = fractionRange(s, a.end, a.interval);
|
|
85
|
-
const out = a.multiplier === -1 ? r.map(v => math.multiply(v, -1)) : r;
|
|
86
|
-
if (math.smaller(interval, 0)) {
|
|
87
|
-
out.reverse();
|
|
88
|
-
}
|
|
89
|
-
return out;
|
|
90
|
-
};
|
|
91
|
-
const fmin = (a, b) => {
|
|
92
|
-
a = math.fraction(a);
|
|
93
|
-
b = math.fraction(b);
|
|
94
|
-
return math.smaller(a, b) ? a : b;
|
|
95
|
-
};
|
|
96
|
-
const fmax = (a, b) => {
|
|
97
|
-
a = math.fraction(a);
|
|
98
|
-
b = math.fraction(b);
|
|
99
|
-
return math.larger(a, b) ? a : b;
|
|
100
|
-
};
|
|
101
|
-
/**
|
|
102
|
-
* the lodash range was causing too much variance in the rounding errors
|
|
103
|
-
* such that it was hard to round the numbers.
|
|
104
|
-
* This is a more simplistic version but makes rounding work.
|
|
105
|
-
*/
|
|
106
|
-
const simpleRange = (start, end, interval) => {
|
|
107
|
-
start = math.fraction(start);
|
|
108
|
-
end = math.fraction(end);
|
|
109
|
-
interval = math.fraction(interval);
|
|
110
|
-
const positiveRange = math.larger(end, 0) ? zeroBasedRange(fmax(0, start), end, interval) : [];
|
|
111
|
-
const negativeRange = math.smaller(start, 0) ? zeroBasedRange(fmin(0, end), start, math.multiply(interval, -1)) : [];
|
|
112
|
-
let together = negativeRange.concat(positiveRange);
|
|
113
|
-
const out = (0, _lodashEs.uniqWith)(together, math.equal);
|
|
114
|
-
return out;
|
|
115
|
-
};
|
|
116
|
-
const closeTo = (a, b, precision) => {
|
|
117
|
-
precision = precision || 2;
|
|
118
|
-
const expectedDiff = Math.pow(10, -precision) / 2;
|
|
119
|
-
const receivedDiff = Math.abs(a - b);
|
|
120
|
-
return receivedDiff < expectedDiff;
|
|
121
|
-
};
|
|
122
|
-
const limit = (v, min, max) => {
|
|
123
|
-
if (math.smaller(fraction(v), fraction(min))) {
|
|
124
|
-
return min;
|
|
125
|
-
}
|
|
126
|
-
if (math.larger(fraction(v), fraction(max))) {
|
|
127
|
-
return max;
|
|
128
|
-
}
|
|
129
|
-
return v;
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
/*
|
|
133
|
-
* Function to get tick interval limits based on min, max and width entered by the user.
|
|
134
|
-
* @param domain object containing max and min value.
|
|
135
|
-
* @param width number represents width of number line.
|
|
136
|
-
* */
|
|
137
|
-
const getMinorLimits = (domain, width) => {
|
|
138
|
-
const end = domain.max - domain.min;
|
|
139
|
-
const min = math.number(math.multiply(10, math.divide(math.fraction(end), width)));
|
|
140
|
-
const max = math.number(math.multiply(20, min));
|
|
141
|
-
return {
|
|
142
|
-
min: min,
|
|
143
|
-
max: max
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
exports.getMinorLimits = getMinorLimits;
|
|
147
|
-
const isMultiple = (multiple, src) => {
|
|
148
|
-
const mod = math.mod(multiple, src);
|
|
149
|
-
return math.equal(mod, 0);
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Accepts a fraction object {n,d,s} or number.
|
|
154
|
-
* @param {*} v
|
|
155
|
-
* @return mathjs.fraction
|
|
156
|
-
*/
|
|
157
|
-
const fraction = v => {
|
|
158
|
-
if ((0, _lodashEs.isObject)(v)) {
|
|
159
|
-
return math.fraction(v.n * v.s, v.d);
|
|
160
|
-
} else if ((0, _lodashEs.isNumber)(v)) {
|
|
161
|
-
return math.fraction(v);
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
const normalizeTicks = (domain, width, ticks, opts) => {
|
|
165
|
-
const useLimit = opts ? opts.limit !== false : true;
|
|
166
|
-
const minorLimits = getMinorLimits(domain, width);
|
|
167
|
-
const minor = useLimit ? limit(fraction(ticks.minor), minorLimits.min, minorLimits.max) : fraction(ticks.minor);
|
|
168
|
-
const major = useLimit ? limit(fraction(ticks.major), minor, math.multiply(minor, 20)) : fraction(ticks.major);
|
|
169
|
-
const isMajorMultiple = isMultiple(major, minor);
|
|
170
|
-
if (!isMajorMultiple) {
|
|
171
|
-
const multiplier = math.divide(major, minor);
|
|
172
|
-
const multiplyBy = multiplier <= 2 ? 2 : Math.round(multiplier);
|
|
173
|
-
|
|
174
|
-
// major must be a multiple of minor
|
|
175
|
-
return {
|
|
176
|
-
minor,
|
|
177
|
-
major: math.multiply(minor, multiplyBy)
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
return {
|
|
181
|
-
major,
|
|
182
|
-
minor
|
|
183
|
-
};
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Build ticks as an array of mathjs Fractions
|
|
188
|
-
*/
|
|
189
|
-
const buildTickDataAsFractions = (domain, width, ticks, opts) => {
|
|
190
|
-
ticks = normalizeTicks(domain, width, ticks, opts);
|
|
191
|
-
const rng = simpleRange(domain.min, domain.max, ticks.minor);
|
|
192
|
-
const o = rng.filter(x => math.smallerEq(x, math.fraction(domain.max))).map(x => {
|
|
193
|
-
let type = 'minor';
|
|
194
|
-
const modulo = math.mod(x, ticks.major);
|
|
195
|
-
if (closeTo(math.number(modulo), 0)) {
|
|
196
|
-
type = 'major';
|
|
197
|
-
}
|
|
198
|
-
return {
|
|
199
|
-
x,
|
|
200
|
-
type
|
|
201
|
-
};
|
|
202
|
-
});
|
|
203
|
-
return o;
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
/*
|
|
207
|
-
* This function will generate tick interval values based on min and max limits of ticks.
|
|
208
|
-
* @param minorLimits object containing min and max values
|
|
209
|
-
* @return out object containing three arrays 1. fraction values, 2. decimal values,
|
|
210
|
-
* */
|
|
211
|
-
const generateMinorValues = minorLimits => {
|
|
212
|
-
let out = {
|
|
213
|
-
fraction: [],
|
|
214
|
-
decimal: []
|
|
215
|
-
};
|
|
216
|
-
decimalTickValues.forEach(value => {
|
|
217
|
-
if (value >= minorLimits.min && value <= minorLimits.max) {
|
|
218
|
-
out.decimal.push(value);
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
fractionTickValues.forEach(value => {
|
|
222
|
-
let decimalValue = math.number(math.fraction(value));
|
|
223
|
-
if (decimalValue >= minorLimits.min && decimalValue <= minorLimits.max) {
|
|
224
|
-
out.fraction.push(value);
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
return out;
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
/*
|
|
231
|
-
* This function will generate label interval values for provided tick interval value.
|
|
232
|
-
* @param minor number representing tick interval value.
|
|
233
|
-
* @param domain object containing min and max values.
|
|
234
|
-
* @param width number representing width of number line.
|
|
235
|
-
* @return out object containing three arrays 1. fraction values, 2. decimal values,
|
|
236
|
-
* */
|
|
237
|
-
exports.generateMinorValues = generateMinorValues;
|
|
238
|
-
const generateMajorValuesForMinor = (minor, domain, width) => {
|
|
239
|
-
let out = {
|
|
240
|
-
decimal: [],
|
|
241
|
-
fraction: []
|
|
242
|
-
};
|
|
243
|
-
let fraction = math.fraction(math.number(math.number(minor)));
|
|
244
|
-
let n = fraction.n;
|
|
245
|
-
let d = fraction.d;
|
|
246
|
-
if (n >= 1 && d === 1) {
|
|
247
|
-
for (let i = 1; i <= 10; i++) {
|
|
248
|
-
let num = math.number(math.multiply(n, i));
|
|
249
|
-
//Here we check if this major value can plot at least 2 points on number line.
|
|
250
|
-
let ticksData = {
|
|
251
|
-
minor: minor,
|
|
252
|
-
major: num
|
|
253
|
-
};
|
|
254
|
-
let output = buildTickData(domain, width, ticksData, {
|
|
255
|
-
fraction: undefined
|
|
256
|
-
});
|
|
257
|
-
if (output.filter(x => x.type === 'major').length > 1) {
|
|
258
|
-
out.fraction.push(num.toString());
|
|
259
|
-
out.decimal.push(num);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
} else {
|
|
263
|
-
for (const multiplierKey in labelMultiplier[d]) {
|
|
264
|
-
let num = math.multiply(math.fraction(n, d), labelMultiplier[d][multiplierKey]);
|
|
265
|
-
//Here we check if this major value can plot at least 2 points on number line.
|
|
266
|
-
let ticksData = {
|
|
267
|
-
minor: minor,
|
|
268
|
-
major: math.number(num)
|
|
269
|
-
};
|
|
270
|
-
let output = buildTickData(domain, width, ticksData, {
|
|
271
|
-
fraction: undefined
|
|
272
|
-
});
|
|
273
|
-
if (output.filter(x => x.type === 'major').length > 1) {
|
|
274
|
-
if (num.d !== 1) {
|
|
275
|
-
out.fraction.push(num.n + '/' + num.d);
|
|
276
|
-
} else {
|
|
277
|
-
out.fraction.push(num.n.toString());
|
|
278
|
-
}
|
|
279
|
-
out.decimal.push(math.number(num));
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
return out;
|
|
284
|
-
};
|
|
285
|
-
exports.generateMajorValuesForMinor = generateMajorValuesForMinor;
|
|
286
|
-
const buildTickData = (domain, width, ticks, opts) => {
|
|
287
|
-
const result = buildTickDataAsFractions(domain, width, ticks, opts);
|
|
288
|
-
const out = result.map(o => opts.fraction ? o : {
|
|
289
|
-
...o,
|
|
290
|
-
x: math.number(o.x) || 0
|
|
291
|
-
});
|
|
292
|
-
return out;
|
|
293
|
-
};
|
|
294
|
-
//# sourceMappingURL=tickUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tickUtils.js","names":["math","_interopRequireWildcard","require","_lodashEs","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","decimalTickValues","fractionTickValues","labelMultiplier","fractionRange","start","end","interval","m","mod","abs","equal","Error","subtract","direction","larger","largerEq","smallerEq","compareFn","out","next","push","add","zbrErrorMessage","zeroBasedRange","fraction","length","a","multiplier","smaller","s","map","v","multiply","reverse","fmin","b","fmax","simpleRange","positiveRange","negativeRange","together","concat","uniqWith","closeTo","precision","expectedDiff","Math","pow","receivedDiff","limit","min","max","getMinorLimits","domain","width","number","divide","exports","isMultiple","multiple","src","isObject","d","isNumber","normalizeTicks","ticks","opts","useLimit","minorLimits","minor","major","isMajorMultiple","multiplyBy","round","buildTickDataAsFractions","rng","filter","x","type","modulo","generateMinorValues","decimal","forEach","value","decimalValue","generateMajorValuesForMinor","num","ticksData","output","buildTickData","undefined","toString","multiplierKey","result"],"sources":["../src/tickUtils.js"],"sourcesContent":["import * as math from 'mathjs';\nimport { isNumber, isObject, uniqWith } from 'lodash-es';\n\n// All these functions are duplicated in src/number-line/graph/tick-utils\n\n/*This will store the possible decimal tick values*/\nconst decimalTickValues = [0.001, 0.01, 0.02, 0.04, 0.05, 0.1, 0.125, 0.2, 0.25, 0.5];\n\n/*This will store the possible fraction tick values*/\nconst fractionTickValues = [\n '1/1000',\n '1/100',\n '1/64',\n '1/50',\n '1/32',\n '1/25',\n '1/20',\n '1/16',\n '1/15',\n '1/12',\n '1/10',\n '1/9',\n '1/8',\n '1/7',\n '1/6',\n '1/5',\n '1/4',\n '1/3',\n '1/2',\n];\n\n/*This const will store possible multiplier for label interval that needs to be multiplied\nwith tick interval with denominator represented with object key.*/\nconst labelMultiplier = {\n 1: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],\n 2: [1, 2, 4, 6, 8, 10],\n 3: [1, 3, 6, 9],\n 4: [1, 2, 4, 8],\n 5: [1, 5, 10],\n 6: [1, 2, 3, 6],\n 7: [1, 7],\n 8: [1, 2, 4, 8],\n 9: [1, 3, 9],\n 10: [1, 2, 5, 10],\n 12: [1, 2, 3, 4, 6],\n 15: [1, 3, 5],\n 16: [1, 2, 4, 8],\n 20: [1, 2, 4, 5, 10],\n 25: [1, 5],\n 32: [1, 2, 4, 8],\n 50: [1, 2, 5, 10],\n 64: [1, 2, 4, 8],\n 100: [1, 2, 4, 5, 10],\n 1000: [1, 2, 4, 5, 8, 10],\n};\n\nconst fractionRange = (start, end, interval) => {\n const m = math.mod(math.abs(start), math.abs(interval));\n if (!math.equal(m, 0)) {\n throw new Error('start point must be divisible by interval');\n }\n\n if (math.equal(start, end)) {\n return [];\n }\n\n const e = math.subtract(end, math.mod(end, math.abs(interval)));\n\n const direction = math.larger(interval, 0) ? 'positive' : 'negative';\n\n if (direction === 'negative' && math.largerEq(end, start)) {\n throw new Error('start must be > than end when doing a negative decrement');\n }\n if (direction === 'positive' && math.smallerEq(end, start)) {\n throw new Error('start must be < end when doing increments');\n }\n const compareFn = direction === 'positive' ? math.smallerEq : math.equal(e, end) ? math.largerEq : math.larger;\n const out = [];\n\n let next = start;\n while (compareFn(next, e)) {\n out.push(next);\n next = math.add(next, interval);\n }\n return out;\n};\n\nconst zbrErrorMessage = (start, end) =>\n `Can only do a positive or negative range, but got: start: ${start} and end:${end}`;\n\nconst zeroBasedRange = (start, end, interval) => {\n start = math.fraction(start);\n end = math.fraction(end);\n interval = math.fraction(interval);\n\n const length = math.abs(math.subtract(end, start));\n\n if (math.larger(length, math.abs(end))) {\n throw new Error(zbrErrorMessage(start, end));\n }\n const a = {\n start: math.abs(start),\n end: math.abs(end),\n interval: math.abs(interval),\n multiplier: math.smaller(interval, 0) ? -1 : 1,\n };\n\n const m = math.mod(a.start, a.interval);\n const s = math.larger(m, 0) ? math.add(math.subtract(a.start, m), a.interval) : a.start;\n\n const r = fractionRange(s, a.end, a.interval);\n const out = a.multiplier === -1 ? r.map((v) => math.multiply(v, -1)) : r;\n\n if (math.smaller(interval, 0)) {\n out.reverse();\n }\n return out;\n};\n\nconst fmin = (a, b) => {\n a = math.fraction(a);\n b = math.fraction(b);\n return math.smaller(a, b) ? a : b;\n};\n\nconst fmax = (a, b) => {\n a = math.fraction(a);\n b = math.fraction(b);\n return math.larger(a, b) ? a : b;\n};\n/**\n * the lodash range was causing too much variance in the rounding errors\n * such that it was hard to round the numbers.\n * This is a more simplistic version but makes rounding work.\n */\nconst simpleRange = (start, end, interval) => {\n start = math.fraction(start);\n end = math.fraction(end);\n interval = math.fraction(interval);\n\n const positiveRange = math.larger(end, 0) ? zeroBasedRange(fmax(0, start), end, interval) : [];\n\n const negativeRange = math.smaller(start, 0) ? zeroBasedRange(fmin(0, end), start, math.multiply(interval, -1)) : [];\n let together = negativeRange.concat(positiveRange);\n\n const out = uniqWith(together, math.equal);\n return out;\n};\n\nconst closeTo = (a, b, precision) => {\n precision = precision || 2;\n const expectedDiff = Math.pow(10, -precision) / 2;\n const receivedDiff = Math.abs(a - b);\n return receivedDiff < expectedDiff;\n};\n\nconst limit = (v, min, max) => {\n if (math.smaller(fraction(v), fraction(min))) {\n return min;\n }\n\n if (math.larger(fraction(v), fraction(max))) {\n return max;\n }\n\n return v;\n};\n\n/*\n * Function to get tick interval limits based on min, max and width entered by the user.\n * @param domain object containing max and min value.\n * @param width number represents width of number line.\n * */\nexport const getMinorLimits = (domain, width) => {\n const end = domain.max - domain.min;\n const min = math.number(math.multiply(10, math.divide(math.fraction(end), width)));\n const max = math.number(math.multiply(20, min));\n return {\n min: min,\n max: max,\n };\n};\n\nconst isMultiple = (multiple, src) => {\n const mod = math.mod(multiple, src);\n return math.equal(mod, 0);\n};\n\n/**\n * Accepts a fraction object {n,d,s} or number.\n * @param {*} v\n * @return mathjs.fraction\n */\nconst fraction = (v) => {\n if (isObject(v)) {\n return math.fraction(v.n * v.s, v.d);\n } else if (isNumber(v)) {\n return math.fraction(v);\n }\n};\n\nconst normalizeTicks = (domain, width, ticks, opts) => {\n const useLimit = opts ? opts.limit !== false : true;\n const minorLimits = getMinorLimits(domain, width);\n\n const minor = useLimit ? limit(fraction(ticks.minor), minorLimits.min, minorLimits.max) : fraction(ticks.minor);\n const major = useLimit ? limit(fraction(ticks.major), minor, math.multiply(minor, 20)) : fraction(ticks.major);\n\n const isMajorMultiple = isMultiple(major, minor);\n\n if (!isMajorMultiple) {\n const multiplier = math.divide(major, minor);\n const multiplyBy = multiplier <= 2 ? 2 : Math.round(multiplier);\n\n // major must be a multiple of minor\n return { minor, major: math.multiply(minor, multiplyBy) };\n }\n\n return { major, minor };\n};\n\n/**\n * Build ticks as an array of mathjs Fractions\n */\nconst buildTickDataAsFractions = (domain, width, ticks, opts) => {\n ticks = normalizeTicks(domain, width, ticks, opts);\n const rng = simpleRange(domain.min, domain.max, ticks.minor);\n\n const o = rng\n .filter((x) => math.smallerEq(x, math.fraction(domain.max)))\n .map((x) => {\n let type = 'minor';\n const modulo = math.mod(x, ticks.major);\n\n if (closeTo(math.number(modulo), 0)) {\n type = 'major';\n }\n\n return { x, type };\n });\n\n return o;\n};\n\n/*\n * This function will generate tick interval values based on min and max limits of ticks.\n * @param minorLimits object containing min and max values\n * @return out object containing three arrays 1. fraction values, 2. decimal values,\n * */\nexport const generateMinorValues = (minorLimits) => {\n let out = { fraction: [], decimal: [] };\n decimalTickValues.forEach((value) => {\n if (value >= minorLimits.min && value <= minorLimits.max) {\n out.decimal.push(value);\n }\n });\n fractionTickValues.forEach((value) => {\n let decimalValue = math.number(math.fraction(value));\n if (decimalValue >= minorLimits.min && decimalValue <= minorLimits.max) {\n out.fraction.push(value);\n }\n });\n return out;\n};\n\n/*\n * This function will generate label interval values for provided tick interval value.\n * @param minor number representing tick interval value.\n * @param domain object containing min and max values.\n * @param width number representing width of number line.\n * @return out object containing three arrays 1. fraction values, 2. decimal values,\n * */\nexport const generateMajorValuesForMinor = (minor, domain, width) => {\n let out = { decimal: [], fraction: [] };\n let fraction = math.fraction(math.number(math.number(minor)));\n let n = fraction.n;\n let d = fraction.d;\n if (n >= 1 && d === 1) {\n for (let i = 1; i <= 10; i++) {\n let num = math.number(math.multiply(n, i));\n //Here we check if this major value can plot at least 2 points on number line.\n let ticksData = { minor: minor, major: num };\n let output = buildTickData(domain, width, ticksData, { fraction: undefined });\n if (output.filter((x) => x.type === 'major').length > 1) {\n out.fraction.push(num.toString());\n out.decimal.push(num);\n }\n }\n } else {\n for (const multiplierKey in labelMultiplier[d]) {\n let num = math.multiply(math.fraction(n, d), labelMultiplier[d][multiplierKey]);\n //Here we check if this major value can plot at least 2 points on number line.\n let ticksData = { minor: minor, major: math.number(num) };\n let output = buildTickData(domain, width, ticksData, { fraction: undefined });\n if (output.filter((x) => x.type === 'major').length > 1) {\n if (num.d !== 1) {\n out.fraction.push(num.n + '/' + num.d);\n } else {\n out.fraction.push(num.n.toString());\n }\n out.decimal.push(math.number(num));\n }\n }\n }\n return out;\n};\n\nconst buildTickData = (domain, width, ticks, opts) => {\n const result = buildTickDataAsFractions(domain, width, ticks, opts);\n\n const out = result.map((o) => (opts.fraction ? o : { ...o, x: math.number(o.x) || 0 }));\n\n return out;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAAyD,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAA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AG;AACZ,CAAC","ignoreList":[]}
|
package/controller/lib/utils.js
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.reloadTicksData = void 0;
|
|
7
|
-
var math = _interopRequireWildcard(require("mathjs"));
|
|
8
|
-
var _tickUtils = require("./tickUtils");
|
|
9
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
10
|
-
/*
|
|
11
|
-
* This function is duplicated in configure/main.js
|
|
12
|
-
* This function will update major value whenever minor value is changed or tick type is changed
|
|
13
|
-
* @param graph object containing domain, ticks and width value
|
|
14
|
-
* @return graph object with updated ticks values
|
|
15
|
-
* */
|
|
16
|
-
const updateMajorValue = graph => {
|
|
17
|
-
const {
|
|
18
|
-
domain,
|
|
19
|
-
ticks,
|
|
20
|
-
width
|
|
21
|
-
} = graph;
|
|
22
|
-
const majorValues = (0, _tickUtils.generateMajorValuesForMinor)(ticks.minor, domain, width);
|
|
23
|
-
if (majorValues.decimal.indexOf(ticks.major) === -1) {
|
|
24
|
-
let currIndex = 0;
|
|
25
|
-
if (ticks.tickIntervalType === 'Integer') {
|
|
26
|
-
currIndex = majorValues.decimal.length > 4 ? 4 : majorValues.decimal.length - 1;
|
|
27
|
-
} else {
|
|
28
|
-
currIndex = majorValues.decimal.length - 1;
|
|
29
|
-
}
|
|
30
|
-
ticks.major = majorValues.decimal[currIndex];
|
|
31
|
-
}
|
|
32
|
-
graph.fraction = ticks.tickIntervalType === 'Fraction' && ticks.major < 1;
|
|
33
|
-
return {
|
|
34
|
-
...graph,
|
|
35
|
-
ticks
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
/*
|
|
40
|
-
* This function is duplicated in configure/main.js
|
|
41
|
-
* This function will reload ticks data whenever graph object is changed and also sets required tick object
|
|
42
|
-
* for rendering Ticks Components.
|
|
43
|
-
* @param graph object containing domain, ticks and width value
|
|
44
|
-
* @return graph object with updated ticks values
|
|
45
|
-
* */
|
|
46
|
-
|
|
47
|
-
const reloadTicksData = graph => {
|
|
48
|
-
const {
|
|
49
|
-
domain,
|
|
50
|
-
ticks = {},
|
|
51
|
-
width
|
|
52
|
-
} = graph;
|
|
53
|
-
//Set tick interval type if not present for legacy number line models depending upon minor value
|
|
54
|
-
if (!ticks.tickIntervalType) {
|
|
55
|
-
if (ticks.minor > 0.5) {
|
|
56
|
-
ticks.tickIntervalType = 'Integer';
|
|
57
|
-
} else {
|
|
58
|
-
ticks.tickIntervalType = 'Decimal';
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
// This section will calculate minor and major values array and assign respective value
|
|
62
|
-
// to different tick types object
|
|
63
|
-
const minorLimits = (0, _tickUtils.getMinorLimits)(domain, width);
|
|
64
|
-
if (minorLimits.min >= 1) {
|
|
65
|
-
/*
|
|
66
|
-
* In this scenario only integer tick will be enabled
|
|
67
|
-
* */
|
|
68
|
-
ticks.tickIntervalType = 'Integer';
|
|
69
|
-
ticks.minor = ticks.minor < 1 ? math.number(math.ceil(minorLimits.min)) : ticks.minor >= math.number(math.ceil(minorLimits.min)) && ticks.minor <= math.number(math.floor(minorLimits.max)) ? ticks.minor : math.number(math.ceil(minorLimits.min));
|
|
70
|
-
ticks.integerTick = ticks.minor;
|
|
71
|
-
const minorValues = {
|
|
72
|
-
decimal: [],
|
|
73
|
-
fraction: []
|
|
74
|
-
};
|
|
75
|
-
ticks.fractionTick = '0';
|
|
76
|
-
ticks.decimalTick = 0;
|
|
77
|
-
} else if (minorLimits.min >= 0 && minorLimits.max < 1) {
|
|
78
|
-
/*
|
|
79
|
-
* In this scenario only decimal or fraction tick will be enabled
|
|
80
|
-
* */
|
|
81
|
-
if (ticks.tickIntervalType === 'Integer') {
|
|
82
|
-
ticks.tickIntervalType = 'Fraction';
|
|
83
|
-
}
|
|
84
|
-
const minorValues = (0, _tickUtils.generateMinorValues)(minorLimits);
|
|
85
|
-
let minValue = math.number(math.fraction(minorValues.fraction[0]));
|
|
86
|
-
let maxValue = math.number(math.fraction(minorValues.fraction[minorValues.fraction.length - 1]));
|
|
87
|
-
if (ticks.minor < minValue || ticks.minor > maxValue) {
|
|
88
|
-
switch (ticks.tickIntervalType) {
|
|
89
|
-
case 'Fraction':
|
|
90
|
-
ticks.minor = math.number(math.fraction(minorValues.fraction[minorValues.fraction.length - 1]));
|
|
91
|
-
ticks.fractionTick = minorValues.fraction[minorValues.fraction.length - 1];
|
|
92
|
-
ticks.decimalTick = minorValues.decimal[0];
|
|
93
|
-
break;
|
|
94
|
-
case 'Decimal':
|
|
95
|
-
case 'Integer':
|
|
96
|
-
ticks.minor = minorValues.decimal[minorValues.decimal.length - 1];
|
|
97
|
-
ticks.decimalTick = minorValues.decimal[minorValues.decimal.length - 1];
|
|
98
|
-
ticks.fractionTick = minorValues.fraction[0];
|
|
99
|
-
}
|
|
100
|
-
} else {
|
|
101
|
-
switch (ticks.tickIntervalType) {
|
|
102
|
-
case 'Fraction':
|
|
103
|
-
let fraction = math.fraction(math.number(ticks.minor));
|
|
104
|
-
ticks.fractionTick = fraction.n + '/' + fraction.d;
|
|
105
|
-
ticks.decimalTick = ticks.decimalTick ? ticks.decimalTick : minorValues.decimal[0];
|
|
106
|
-
break;
|
|
107
|
-
case 'Decimal':
|
|
108
|
-
case 'Integer':
|
|
109
|
-
ticks.decimalTick = ticks.minor;
|
|
110
|
-
ticks.fractionTick = ticks.fractionTick ? ticks.fractionTick : minorValues.fraction[0];
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
ticks.integerTick = 1;
|
|
114
|
-
} else if (minorLimits.min < 1 && minorLimits.max >= 1) {
|
|
115
|
-
/*
|
|
116
|
-
* In this scenario all integer, decimal or fraction tick will be enabled
|
|
117
|
-
* */
|
|
118
|
-
const minorValues = (0, _tickUtils.generateMinorValues)(minorLimits);
|
|
119
|
-
if (!(ticks.minor >= minorLimits.min && ticks.minor <= minorLimits.max)) {
|
|
120
|
-
if (minorLimits.min > 0.5) {
|
|
121
|
-
ticks.tickIntervalType = 'Integer';
|
|
122
|
-
}
|
|
123
|
-
switch (ticks.tickIntervalType) {
|
|
124
|
-
case 'Integer':
|
|
125
|
-
ticks.minor = math.number(math.ceil(minorLimits.min));
|
|
126
|
-
ticks.integerTick = ticks.minor;
|
|
127
|
-
ticks.decimalTick = minorLimits.min > 0.5 ? 0 : minorValues.decimal[0];
|
|
128
|
-
ticks.fractionTick = minorLimits.min > 0.5 ? '0' : minorValues.fraction[0];
|
|
129
|
-
break;
|
|
130
|
-
case 'Decimal':
|
|
131
|
-
ticks.minor = minorValues.decimal[0];
|
|
132
|
-
ticks.integerTick = 1;
|
|
133
|
-
ticks.decimalTick = ticks.minor;
|
|
134
|
-
ticks.fractionTick = minorValues.fraction[0];
|
|
135
|
-
break;
|
|
136
|
-
case 'Fraction':
|
|
137
|
-
ticks.minor = math.number(math.fraction(minorValues.fraction[0]));
|
|
138
|
-
ticks.integerTick = 1;
|
|
139
|
-
ticks.decimalTick = minorValues.decimal[0];
|
|
140
|
-
ticks.fractionTick = minorValues.fraction[0];
|
|
141
|
-
}
|
|
142
|
-
} else {
|
|
143
|
-
switch (ticks.tickIntervalType) {
|
|
144
|
-
case 'Integer':
|
|
145
|
-
ticks.integerTick = ticks.minor;
|
|
146
|
-
ticks.decimalTick = minorLimits.min > 0.5 ? 0 : minorValues.decimal[0];
|
|
147
|
-
ticks.fractionTick = minorLimits.min > 0.5 ? '0' : minorValues.fraction[0];
|
|
148
|
-
break;
|
|
149
|
-
case 'Decimal':
|
|
150
|
-
ticks.integerTick = 1;
|
|
151
|
-
ticks.decimalTick = ticks.minor;
|
|
152
|
-
ticks.fractionTick = minorValues.fraction[0];
|
|
153
|
-
break;
|
|
154
|
-
case 'Fraction':
|
|
155
|
-
ticks.integerTick = 1;
|
|
156
|
-
ticks.decimalTick = minorValues.decimal[0];
|
|
157
|
-
let fraction = math.fraction(math.number(ticks.minor));
|
|
158
|
-
ticks.fractionTick = fraction.n + '/' + fraction.d;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
return updateMajorValue({
|
|
163
|
-
...graph,
|
|
164
|
-
ticks
|
|
165
|
-
});
|
|
166
|
-
};
|
|
167
|
-
exports.reloadTicksData = reloadTicksData;
|
|
168
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["math","_interopRequireWildcard","require","_tickUtils","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","updateMajorValue","graph","domain","ticks","width","majorValues","generateMajorValuesForMinor","minor","decimal","indexOf","major","currIndex","tickIntervalType","length","fraction","reloadTicksData","minorLimits","getMinorLimits","min","number","ceil","floor","max","integerTick","minorValues","fractionTick","decimalTick","generateMinorValues","minValue","maxValue","d","exports"],"sources":["../src/utils.js"],"sourcesContent":["import * as math from 'mathjs';\nimport { generateMajorValuesForMinor, generateMinorValues, getMinorLimits } from './tickUtils';\n\n/*\n * This function is duplicated in configure/main.js\n * This function will update major value whenever minor value is changed or tick type is changed\n * @param graph object containing domain, ticks and width value\n * @return graph object with updated ticks values\n * */\nconst updateMajorValue = (graph) => {\n const { domain, ticks, width } = graph;\n const majorValues = generateMajorValuesForMinor(ticks.minor, domain, width);\n if (majorValues.decimal.indexOf(ticks.major) === -1) {\n let currIndex = 0;\n if (ticks.tickIntervalType === 'Integer') {\n currIndex = majorValues.decimal.length > 4 ? 4 : majorValues.decimal.length - 1;\n } else {\n currIndex = majorValues.decimal.length - 1;\n }\n ticks.major = majorValues.decimal[currIndex];\n }\n graph.fraction = ticks.tickIntervalType === 'Fraction' && ticks.major < 1;\n return { ...graph, ticks };\n};\n\n/*\n * This function is duplicated in configure/main.js\n * This function will reload ticks data whenever graph object is changed and also sets required tick object\n * for rendering Ticks Components.\n * @param graph object containing domain, ticks and width value\n * @return graph object with updated ticks values\n * */\n\nexport const reloadTicksData = (graph) => {\n const { domain, ticks = {}, width } = graph;\n //Set tick interval type if not present for legacy number line models depending upon minor value\n if (!ticks.tickIntervalType) {\n if (ticks.minor > 0.5) {\n ticks.tickIntervalType = 'Integer';\n } else {\n ticks.tickIntervalType = 'Decimal';\n }\n }\n // This section will calculate minor and major values array and assign respective value\n // to different tick types object\n const minorLimits = getMinorLimits(domain, width);\n if (minorLimits.min >= 1) {\n /*\n * In this scenario only integer tick will be enabled\n * */\n ticks.tickIntervalType = 'Integer';\n ticks.minor =\n ticks.minor < 1\n ? math.number(math.ceil(minorLimits.min))\n : ticks.minor >= math.number(math.ceil(minorLimits.min)) &&\n ticks.minor <= math.number(math.floor(minorLimits.max))\n ? ticks.minor\n : math.number(math.ceil(minorLimits.min));\n ticks.integerTick = ticks.minor;\n const minorValues = { decimal: [], fraction: [] };\n ticks.fractionTick = '0';\n ticks.decimalTick = 0;\n } else if (minorLimits.min >= 0 && minorLimits.max < 1) {\n /*\n * In this scenario only decimal or fraction tick will be enabled\n * */\n if (ticks.tickIntervalType === 'Integer') {\n ticks.tickIntervalType = 'Fraction';\n }\n const minorValues = generateMinorValues(minorLimits);\n let minValue = math.number(math.fraction(minorValues.fraction[0]));\n let maxValue = math.number(math.fraction(minorValues.fraction[minorValues.fraction.length - 1]));\n if (ticks.minor < minValue || ticks.minor > maxValue) {\n switch (ticks.tickIntervalType) {\n case 'Fraction':\n ticks.minor = math.number(math.fraction(minorValues.fraction[minorValues.fraction.length - 1]));\n ticks.fractionTick = minorValues.fraction[minorValues.fraction.length - 1];\n ticks.decimalTick = minorValues.decimal[0];\n break;\n case 'Decimal':\n case 'Integer':\n ticks.minor = minorValues.decimal[minorValues.decimal.length - 1];\n ticks.decimalTick = minorValues.decimal[minorValues.decimal.length - 1];\n ticks.fractionTick = minorValues.fraction[0];\n }\n } else {\n switch (ticks.tickIntervalType) {\n case 'Fraction':\n let fraction = math.fraction(math.number(ticks.minor));\n ticks.fractionTick = fraction.n + '/' + fraction.d;\n ticks.decimalTick = ticks.decimalTick ? ticks.decimalTick : minorValues.decimal[0];\n break;\n case 'Decimal':\n case 'Integer':\n ticks.decimalTick = ticks.minor;\n ticks.fractionTick = ticks.fractionTick ? ticks.fractionTick : minorValues.fraction[0];\n }\n }\n ticks.integerTick = 1;\n } else if (minorLimits.min < 1 && minorLimits.max >= 1) {\n /*\n * In this scenario all integer, decimal or fraction tick will be enabled\n * */\n const minorValues = generateMinorValues(minorLimits);\n if (!(ticks.minor >= minorLimits.min && ticks.minor <= minorLimits.max)) {\n if (minorLimits.min > 0.5) {\n ticks.tickIntervalType = 'Integer';\n }\n switch (ticks.tickIntervalType) {\n case 'Integer':\n ticks.minor = math.number(math.ceil(minorLimits.min));\n ticks.integerTick = ticks.minor;\n ticks.decimalTick = minorLimits.min > 0.5 ? 0 : minorValues.decimal[0];\n ticks.fractionTick = minorLimits.min > 0.5 ? '0' : minorValues.fraction[0];\n break;\n case 'Decimal':\n ticks.minor = minorValues.decimal[0];\n ticks.integerTick = 1;\n ticks.decimalTick = ticks.minor;\n ticks.fractionTick = minorValues.fraction[0];\n break;\n case 'Fraction':\n ticks.minor = math.number(math.fraction(minorValues.fraction[0]));\n ticks.integerTick = 1;\n ticks.decimalTick = minorValues.decimal[0];\n ticks.fractionTick = minorValues.fraction[0];\n }\n } else {\n switch (ticks.tickIntervalType) {\n case 'Integer':\n ticks.integerTick = ticks.minor;\n ticks.decimalTick = minorLimits.min > 0.5 ? 0 : minorValues.decimal[0];\n ticks.fractionTick = minorLimits.min > 0.5 ? '0' : minorValues.fraction[0];\n break;\n case 'Decimal':\n ticks.integerTick = 1;\n ticks.decimalTick = ticks.minor;\n ticks.fractionTick = minorValues.fraction[0];\n break;\n case 'Fraction':\n ticks.integerTick = 1;\n ticks.decimalTick = minorValues.decimal[0];\n let fraction = math.fraction(math.number(ticks.minor));\n ticks.fractionTick = fraction.n + '/' + fraction.d;\n }\n }\n }\n return updateMajorValue({ ...graph, ticks });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAA+F,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAA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AAW,CAACE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAGM,WAAW,CAACV,QAAQ,CAAC,CAAC,CAAC;UAC1E;QACF,KAAK,SAAS;UACZX,KAAK,CAACoB,WAAW,GAAG,CAAC;UACrBpB,KAAK,CAACuB,WAAW,GAAGvB,KAAK,CAACI,KAAK;UAC/BJ,KAAK,CAACsB,YAAY,GAAGD,WAAW,CAACV,QAAQ,CAAC,CAAC,CAAC;UAC5C;QACF,KAAK,UAAU;UACbX,KAAK,CAACoB,WAAW,GAAG,CAAC;UACrBpB,KAAK,CAACuB,WAAW,GAAGF,WAAW,CAAChB,OAAO,CAAC,CAAC,CAAC;UAC1C,IAAIM,QAAQ,GAAGrC,IAAI,CAACqC,QAAQ,CAACrC,IAAI,CAAC0C,MAAM,CAAChB,KAAK,CAACI,KAAK,CAAC,CAAC;UACtDJ,KAAK,CAACsB,YAAY,GAAGX,QAAQ,CAAC7B,CAAC,GAAG,GAAG,GAAG6B,QAAQ,CAACgB,CAAC;MACtD;IACF;EACF;EACA,OAAO9B,gBAAgB,CAAC;IAAE,GAAGC,KAAK;IAAEE;EAAM,CAAC,CAAC;AAC9C,CAAC;AAAC4B,OAAA,CAAAhB,eAAA,GAAAA,eAAA","ignoreList":[]}
|
package/controller/package.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@pie-element/number-line-controller",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "9.1.1",
|
|
5
|
-
"description": "Controller logic for @pie-ui/number-line",
|
|
6
|
-
"keywords": [
|
|
7
|
-
"pie",
|
|
8
|
-
"number-line"
|
|
9
|
-
],
|
|
10
|
-
"main": "lib/index.js",
|
|
11
|
-
"module": "src/index.js",
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@pie-lib/controller-utils": "2.0.2",
|
|
14
|
-
"@pie-lib/feedback": "2.0.2",
|
|
15
|
-
"lodash-es": "^4.17.23",
|
|
16
|
-
"mathjs": "^7.5.1"
|
|
17
|
-
},
|
|
18
|
-
"author": "",
|
|
19
|
-
"license": "ISC"
|
|
20
|
-
}
|
package/demo.gif
DELETED
|
Binary file
|