@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.
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/author/arrows.d.ts +29 -0
- package/dist/author/arrows.d.ts.map +1 -0
- package/dist/author/arrows.js +69 -0
- package/dist/author/card-bar.d.ts +21 -0
- package/dist/author/card-bar.d.ts.map +1 -0
- package/dist/author/card-bar.js +41 -0
- package/dist/author/defaults.d.ts +179 -0
- package/dist/author/defaults.d.ts.map +1 -0
- package/dist/author/defaults.js +144 -0
- package/dist/author/domain.d.ts +16 -0
- package/dist/author/domain.d.ts.map +1 -0
- package/dist/author/domain.js +53 -0
- package/dist/author/index.d.ts +24 -0
- package/dist/author/index.d.ts.map +1 -0
- package/dist/author/index.js +89 -0
- package/dist/author/main.d.ts +45 -0
- package/dist/author/main.d.ts.map +1 -0
- package/dist/author/main.js +482 -0
- package/dist/author/number-text-field.d.ts +14 -0
- package/dist/author/number-text-field.d.ts.map +1 -0
- package/dist/author/number-text-field.js +11 -0
- package/dist/author/point-config.d.ts +26 -0
- package/dist/author/point-config.d.ts.map +1 -0
- package/dist/author/point-config.js +69 -0
- package/dist/author/size.d.ts +25 -0
- package/dist/author/size.d.ts.map +1 -0
- package/dist/author/size.js +48 -0
- package/dist/author/ticks.d.ts +23 -0
- package/dist/author/ticks.d.ts.map +1 -0
- package/dist/author/ticks.js +115 -0
- package/dist/author/utils.d.ts +10 -0
- package/dist/author/utils.d.ts.map +1 -0
- package/dist/author/utils.js +4 -0
- package/dist/controller/defaults.d.ts +59 -0
- package/dist/controller/defaults.d.ts.map +1 -0
- package/dist/controller/defaults.js +50 -0
- package/dist/controller/index.d.ts +34 -0
- package/dist/controller/index.d.ts.map +1 -0
- package/dist/controller/index.js +170 -0
- package/dist/controller/tickUtils.d.ts +21 -0
- package/dist/controller/tickUtils.d.ts.map +1 -0
- package/dist/controller/tickUtils.js +254 -0
- package/dist/controller/utils.d.ts +10 -0
- package/dist/controller/utils.d.ts.map +1 -0
- package/dist/controller/utils.js +68 -0
- package/dist/delivery/data-converter.d.ts +65 -0
- package/dist/delivery/data-converter.d.ts.map +1 -0
- package/dist/delivery/data-converter.js +70 -0
- package/dist/delivery/draggable/index.d.ts +34 -0
- package/dist/delivery/draggable/index.d.ts.map +1 -0
- package/dist/delivery/draggable/index.js +39 -0
- package/dist/delivery/index.d.ts +36 -0
- package/dist/delivery/index.d.ts.map +1 -0
- package/dist/delivery/index.js +109 -0
- package/dist/delivery/number-line/colors.d.ts +12 -0
- package/dist/delivery/number-line/colors.d.ts.map +1 -0
- package/dist/delivery/number-line/colors.js +5 -0
- package/dist/delivery/number-line/feedback.d.ts +20 -0
- package/dist/delivery/number-line/feedback.d.ts.map +1 -0
- package/dist/delivery/number-line/feedback.js +57 -0
- package/dist/delivery/number-line/graph/arrow.d.ts +31 -0
- package/dist/delivery/number-line/graph/arrow.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/arrow.js +27 -0
- package/dist/delivery/number-line/graph/elements/base.d.ts +17 -0
- package/dist/delivery/number-line/graph/elements/base.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/elements/base.js +11 -0
- package/dist/delivery/number-line/graph/elements/builder.d.ts +34 -0
- package/dist/delivery/number-line/graph/elements/builder.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/elements/builder.js +30 -0
- package/dist/delivery/number-line/graph/elements/line.d.ts +52 -0
- package/dist/delivery/number-line/graph/elements/line.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/elements/line.js +189 -0
- package/dist/delivery/number-line/graph/elements/point.d.ts +44 -0
- package/dist/delivery/number-line/graph/elements/point.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/elements/point.js +127 -0
- package/dist/delivery/number-line/graph/elements/ray.d.ts +44 -0
- package/dist/delivery/number-line/graph/elements/ray.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/elements/ray.js +130 -0
- package/dist/delivery/number-line/graph/index.d.ts +60 -0
- package/dist/delivery/number-line/graph/index.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/index.js +196 -0
- package/dist/delivery/number-line/graph/line.d.ts +47 -0
- package/dist/delivery/number-line/graph/line.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/line.js +27 -0
- package/dist/delivery/number-line/graph/stacks.d.ts +11 -0
- package/dist/delivery/number-line/graph/stacks.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/stacks.js +40 -0
- package/dist/delivery/number-line/graph/tick-utils.d.ts +74 -0
- package/dist/delivery/number-line/graph/tick-utils.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/tick-utils.js +297 -0
- package/dist/delivery/number-line/graph/ticks.d.ts +47 -0
- package/dist/delivery/number-line/graph/ticks.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/ticks.js +115 -0
- package/dist/delivery/number-line/index.d.ts +36 -0
- package/dist/delivery/number-line/index.d.ts.map +1 -0
- package/dist/delivery/number-line/index.js +218 -0
- package/dist/delivery/number-line/point-chooser/button.d.ts +32 -0
- package/dist/delivery/number-line/point-chooser/button.d.ts.map +1 -0
- package/dist/delivery/number-line/point-chooser/button.js +36 -0
- package/dist/delivery/number-line/point-chooser/img.d.ts +11 -0
- package/dist/delivery/number-line/point-chooser/img.d.ts.map +1 -0
- package/dist/delivery/number-line/point-chooser/img.js +4 -0
- package/dist/delivery/number-line/point-chooser/index.d.ts +38 -0
- package/dist/delivery/number-line/point-chooser/index.d.ts.map +1 -0
- package/dist/delivery/number-line/point-chooser/index.js +154 -0
- package/dist/delivery/number-line/point-chooser/styles.d.ts +193 -0
- package/dist/delivery/number-line/point-chooser/styles.d.ts.map +1 -0
- package/dist/delivery/number-line/transitions/fade.d.ts +35 -0
- package/dist/delivery/number-line/transitions/fade.d.ts.map +1 -0
- package/dist/delivery/number-line/transitions/fade.js +75 -0
- package/dist/delivery/number-line/transitions/index.d.ts +11 -0
- package/dist/delivery/number-line/transitions/index.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.iife.d.ts +9 -0
- package/dist/index.iife.d.ts.map +1 -0
- package/dist/index.iife.js +201 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Hash.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_SetCache.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Stack.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_apply.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayEach.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayIncludes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayIncludesWith.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arraySome.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assignMergeValue.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssign.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseClone.js +57 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseCreate.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseFindIndex.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseFor.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGet.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseHasIn.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIndexOf.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqual.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMap.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMatch.js +26 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNaN.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIteratee.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeys.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMatches.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMerge.js +19 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMergeDeep.js +31 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_basePickBy.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseProperty.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_basePropertyDeep.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseRest.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseSet.js +22 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseToString.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTrim.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseUniq.js +27 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_castPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneBuffer.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneDataView.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneRegExp.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneSymbol.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbols.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbolsIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createAssigner.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createBaseFor.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createFind.js +19 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalArrays.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalByTag.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalObjects.js +32 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getMatchData.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbolsIn.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getTag.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hasPath.js +18 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneByTag.js +33 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIterateeCall.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isKey.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isStrictComparable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_memoizeCapped.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overRest.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_safeGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setCacheAdd.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setCacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToString.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_shortOut.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_strictIndexOf.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stringToPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toKey.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_trimmedEndIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/cloneDeep.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/constant.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/find.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/findIndex.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/get.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/hasIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/identity.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLikeObject.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEmpty.js +21 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEqual.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEqualWith.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isNumber.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isPlainObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/memoize.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/merge.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/negate.js +17 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/noop.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/omitBy.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/pickBy.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/property.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toFinite.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toInteger.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toNumber.js +19 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toPlainObject.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/uniqWith.js +7 -0
- package/package.json +77 -0
- package/src/author/arrows.tsx +87 -0
- package/src/author/card-bar.tsx +70 -0
- package/src/author/defaults.ts +127 -0
- package/src/author/domain.tsx +79 -0
- package/src/author/index.ts +199 -0
- package/src/author/main.tsx +777 -0
- package/src/author/number-text-field.tsx +28 -0
- package/src/author/point-config.tsx +93 -0
- package/src/author/size.tsx +74 -0
- package/src/author/ticks.tsx +272 -0
- package/src/author/utils.ts +16 -0
- package/src/controller/defaults.ts +40 -0
- package/src/controller/index.ts +437 -0
- package/src/controller/tickUtils.ts +324 -0
- package/src/controller/utils.ts +159 -0
- package/src/delivery/data-converter.ts +88 -0
- package/src/delivery/draggable/index.ts +116 -0
- package/src/delivery/index.ts +225 -0
- package/src/delivery/number-line/colors.ts +15 -0
- package/src/delivery/number-line/feedback.tsx +85 -0
- package/src/delivery/number-line/graph/arrow.tsx +43 -0
- package/src/delivery/number-line/graph/elements/base.ts +20 -0
- package/src/delivery/number-line/graph/elements/builder.ts +37 -0
- package/src/delivery/number-line/graph/elements/line.tsx +259 -0
- package/src/delivery/number-line/graph/elements/point.tsx +219 -0
- package/src/delivery/number-line/graph/elements/ray.tsx +168 -0
- package/src/delivery/number-line/graph/index.tsx +258 -0
- package/src/delivery/number-line/graph/line.tsx +33 -0
- package/src/delivery/number-line/graph/stacks.ts +82 -0
- package/src/delivery/number-line/graph/tick-utils.ts +369 -0
- package/src/delivery/number-line/graph/ticks.tsx +189 -0
- package/src/delivery/number-line/index.tsx +385 -0
- package/src/delivery/number-line/point-chooser/button.tsx +54 -0
- package/src/delivery/number-line/point-chooser/img.ts +11 -0
- package/src/delivery/number-line/point-chooser/index.tsx +200 -0
- package/src/delivery/number-line/point-chooser/styles.ts +86 -0
- package/src/delivery/number-line/transitions/fade.tsx +100 -0
- package/src/delivery/number-line/transitions/index.ts +12 -0
- package/src/index.iife.ts +16 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//#region src/delivery/number-line/graph/stacks.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
let n = [new t(e)];
|
|
4
|
+
this.add = function(r) {
|
|
5
|
+
let i = n.find((e) => e.add(r));
|
|
6
|
+
return n.indexOf(i) === -1 && (i = new t(e), n.push(i), i.add(r)), n.indexOf(i);
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function t(e) {
|
|
10
|
+
let t = [];
|
|
11
|
+
this.add = function(i) {
|
|
12
|
+
let a = r(i);
|
|
13
|
+
return a.left < e.min || a.right > e.max || t.some((e) => n(e, a)) ? !1 : (t.push(i), !0);
|
|
14
|
+
}, this.elements = function() {
|
|
15
|
+
return t;
|
|
16
|
+
};
|
|
17
|
+
let n = (e, t) => {
|
|
18
|
+
let n = r(e), i = t.left < n.left && t.right < n.left, a = t.left > n.right && t.right > n.right;
|
|
19
|
+
return !(i || a);
|
|
20
|
+
}, r = (t) => {
|
|
21
|
+
let { type: n, position: r } = t;
|
|
22
|
+
switch (n) {
|
|
23
|
+
case "point": return {
|
|
24
|
+
left: r,
|
|
25
|
+
right: r
|
|
26
|
+
};
|
|
27
|
+
case "line": return r;
|
|
28
|
+
case "ray": return t.direction === "positive" ? {
|
|
29
|
+
left: r,
|
|
30
|
+
right: e.max
|
|
31
|
+
} : {
|
|
32
|
+
left: e.min,
|
|
33
|
+
right: r
|
|
34
|
+
};
|
|
35
|
+
default: return null;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { e as default };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/number-line/src/number-line/graph/tick-utils.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
export declare const decimalTickValues: number[];
|
|
10
|
+
export declare const fractionTickValues: string[];
|
|
11
|
+
export declare const labelMultiplier: {
|
|
12
|
+
1: number[];
|
|
13
|
+
2: number[];
|
|
14
|
+
3: number[];
|
|
15
|
+
4: number[];
|
|
16
|
+
5: number[];
|
|
17
|
+
6: number[];
|
|
18
|
+
7: number[];
|
|
19
|
+
8: number[];
|
|
20
|
+
9: number[];
|
|
21
|
+
10: number[];
|
|
22
|
+
12: number[];
|
|
23
|
+
15: number[];
|
|
24
|
+
16: number[];
|
|
25
|
+
20: number[];
|
|
26
|
+
25: number[];
|
|
27
|
+
32: number[];
|
|
28
|
+
50: number[];
|
|
29
|
+
64: number[];
|
|
30
|
+
100: number[];
|
|
31
|
+
1000: number[];
|
|
32
|
+
};
|
|
33
|
+
export declare const fractionRange: (start: any, end: any, interval: any) => any[];
|
|
34
|
+
export declare const zbrErrorMessage: (start: any, end: any) => string;
|
|
35
|
+
export declare const zeroBasedRange: (start: any, end: any, interval: any) => any[];
|
|
36
|
+
/**
|
|
37
|
+
* the lodash range was causing too much variance in the rounding errors
|
|
38
|
+
* such that it was hard to round the numbers.
|
|
39
|
+
* This is a more simplistic version but makes rounding work.
|
|
40
|
+
*/
|
|
41
|
+
export declare const simpleRange: (start: any, end: any, interval: any) => any;
|
|
42
|
+
export declare const closeTo: (a: any, b: any, precision: any) => boolean;
|
|
43
|
+
export declare const getMinorLimits: (domain: any, width: any) => {
|
|
44
|
+
min: any;
|
|
45
|
+
max: any;
|
|
46
|
+
};
|
|
47
|
+
export declare const isMultiple: (multiple: any, src: any) => any;
|
|
48
|
+
/**
|
|
49
|
+
* Accepts a fraction object {n,d,s} or number.
|
|
50
|
+
* @param {*} v
|
|
51
|
+
* @return mathjs.fraction
|
|
52
|
+
*/
|
|
53
|
+
export declare const fraction: (v: any) => any;
|
|
54
|
+
export declare const normalizeTicks: (domain: any, width: any, ticks: any, opts: any) => {
|
|
55
|
+
minor: any;
|
|
56
|
+
major: any;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Build ticks as an array of mathjs Fractions
|
|
60
|
+
*/
|
|
61
|
+
export declare const buildTickDataAsFractions: (domain: any, width: any, ticks: any, opts: any) => any;
|
|
62
|
+
export declare const generateMinorValues: (minorLimits: any) => {
|
|
63
|
+
fraction: never[];
|
|
64
|
+
decimal: never[];
|
|
65
|
+
};
|
|
66
|
+
export declare const generateMajorValuesForMinor: (minor: any, domain: any, width: any) => {
|
|
67
|
+
decimal: never[];
|
|
68
|
+
fraction: never[];
|
|
69
|
+
};
|
|
70
|
+
export declare const buildTickData: (domain: any, width: any, ticks: any, opts: any) => any;
|
|
71
|
+
export declare const fractionSnapTo: (min: any, max: any, interval: any, value: any) => any;
|
|
72
|
+
export declare const snapTo: (min: any, max: any, interval: any, value: any) => any;
|
|
73
|
+
export declare const snapElements: (domain: any, ticks: any, elements: any) => any;
|
|
74
|
+
//# sourceMappingURL=tick-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tick-utils.d.ts","sourceRoot":"","sources":["../../../../src/delivery/number-line/graph/tick-utils.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAQH,eAAO,MAAM,iBAAiB,UAA8D,CAAC;AAG7F,eAAO,MAAM,kBAAkB,UAoB9B,CAAC;AAIF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;CAqB3B,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,UAAK,EAAE,QAAG,EAAE,aAAQ,UAsCjD,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,UAAK,EAAE,QAAG,WAC2C,CAAC;AAEtF,eAAO,MAAM,cAAc,GAAI,UAAK,EAAE,QAAG,EAAE,aAAQ,UA2BlD,CAAC;AAaF;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,UAAK,EAAE,QAAG,EAAE,aAAQ,QAY/C,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,MAAC,EAAE,MAAC,EAAE,cAAS,YAKtC,CAAC;AAmBF,eAAO,MAAM,cAAc,GAAI,WAAM,EAAE,UAAK;;;CAQ3C,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,aAAQ,EAAE,QAAG,QAGvC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GAAI,MAAC,QAMzB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,WAAM,EAAE,UAAK,EAAE,UAAK,EAAE,SAAI;;;CAkBxD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,WAAM,EAAE,UAAK,EAAE,UAAK,EAAE,SAAI,QAkBlE,CAAC;AAOF,eAAO,MAAM,mBAAmB,GAAI,gBAAW;;;CAc9C,CAAC;AASF,eAAO,MAAM,2BAA2B,GAAI,UAAK,EAAE,WAAM,EAAE,UAAK;;;CAiC/D,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,WAAM,EAAE,UAAK,EAAE,UAAK,EAAE,SAAI,QAMvD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,QAAG,EAAE,QAAG,EAAE,aAAQ,EAAE,UAAK,QAevD,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,QAAG,EAAE,QAAG,EAAE,aAAQ,EAAE,UAAK,QAG/C,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,WAAM,EAAE,UAAK,EAAE,aAAQ,QAYnD,CAAC"}
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import { __exportAll as e } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import t from "../../../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObject.js";
|
|
3
|
+
import n from "../../../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isNumber.js";
|
|
4
|
+
import r from "../../../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/uniqWith.js";
|
|
5
|
+
import * as i from "mathjs";
|
|
6
|
+
//#region src/delivery/number-line/graph/tick-utils.ts
|
|
7
|
+
var a = /* @__PURE__ */ e({
|
|
8
|
+
buildTickData: () => w,
|
|
9
|
+
buildTickDataAsFractions: () => x,
|
|
10
|
+
closeTo: () => h,
|
|
11
|
+
decimalTickValues: () => o,
|
|
12
|
+
fraction: () => y,
|
|
13
|
+
fractionRange: () => l,
|
|
14
|
+
fractionSnapTo: () => T,
|
|
15
|
+
fractionTickValues: () => s,
|
|
16
|
+
generateMajorValuesForMinor: () => C,
|
|
17
|
+
generateMinorValues: () => S,
|
|
18
|
+
getMinorLimits: () => _,
|
|
19
|
+
isMultiple: () => v,
|
|
20
|
+
labelMultiplier: () => c,
|
|
21
|
+
normalizeTicks: () => b,
|
|
22
|
+
simpleRange: () => m,
|
|
23
|
+
snapElements: () => D,
|
|
24
|
+
snapTo: () => E,
|
|
25
|
+
zbrErrorMessage: () => u,
|
|
26
|
+
zeroBasedRange: () => d
|
|
27
|
+
}), o = [
|
|
28
|
+
.001,
|
|
29
|
+
.01,
|
|
30
|
+
.02,
|
|
31
|
+
.04,
|
|
32
|
+
.05,
|
|
33
|
+
.1,
|
|
34
|
+
.125,
|
|
35
|
+
.2,
|
|
36
|
+
.25,
|
|
37
|
+
.5
|
|
38
|
+
], s = [
|
|
39
|
+
"1/1000",
|
|
40
|
+
"1/100",
|
|
41
|
+
"1/64",
|
|
42
|
+
"1/50",
|
|
43
|
+
"1/32",
|
|
44
|
+
"1/25",
|
|
45
|
+
"1/20",
|
|
46
|
+
"1/16",
|
|
47
|
+
"1/15",
|
|
48
|
+
"1/12",
|
|
49
|
+
"1/10",
|
|
50
|
+
"1/9",
|
|
51
|
+
"1/8",
|
|
52
|
+
"1/7",
|
|
53
|
+
"1/6",
|
|
54
|
+
"1/5",
|
|
55
|
+
"1/4",
|
|
56
|
+
"1/3",
|
|
57
|
+
"1/2"
|
|
58
|
+
], c = {
|
|
59
|
+
1: [
|
|
60
|
+
1,
|
|
61
|
+
2,
|
|
62
|
+
3,
|
|
63
|
+
4,
|
|
64
|
+
5,
|
|
65
|
+
6,
|
|
66
|
+
7,
|
|
67
|
+
8,
|
|
68
|
+
9,
|
|
69
|
+
10
|
|
70
|
+
],
|
|
71
|
+
2: [
|
|
72
|
+
1,
|
|
73
|
+
2,
|
|
74
|
+
4,
|
|
75
|
+
6,
|
|
76
|
+
8,
|
|
77
|
+
10
|
|
78
|
+
],
|
|
79
|
+
3: [
|
|
80
|
+
1,
|
|
81
|
+
3,
|
|
82
|
+
6,
|
|
83
|
+
9
|
|
84
|
+
],
|
|
85
|
+
4: [
|
|
86
|
+
1,
|
|
87
|
+
2,
|
|
88
|
+
4,
|
|
89
|
+
8
|
|
90
|
+
],
|
|
91
|
+
5: [
|
|
92
|
+
1,
|
|
93
|
+
5,
|
|
94
|
+
10
|
|
95
|
+
],
|
|
96
|
+
6: [
|
|
97
|
+
1,
|
|
98
|
+
2,
|
|
99
|
+
3,
|
|
100
|
+
6
|
|
101
|
+
],
|
|
102
|
+
7: [1, 7],
|
|
103
|
+
8: [
|
|
104
|
+
1,
|
|
105
|
+
2,
|
|
106
|
+
4,
|
|
107
|
+
8
|
|
108
|
+
],
|
|
109
|
+
9: [
|
|
110
|
+
1,
|
|
111
|
+
3,
|
|
112
|
+
9
|
|
113
|
+
],
|
|
114
|
+
10: [
|
|
115
|
+
1,
|
|
116
|
+
2,
|
|
117
|
+
5,
|
|
118
|
+
10
|
|
119
|
+
],
|
|
120
|
+
12: [
|
|
121
|
+
1,
|
|
122
|
+
2,
|
|
123
|
+
3,
|
|
124
|
+
4,
|
|
125
|
+
6
|
|
126
|
+
],
|
|
127
|
+
15: [
|
|
128
|
+
1,
|
|
129
|
+
3,
|
|
130
|
+
5
|
|
131
|
+
],
|
|
132
|
+
16: [
|
|
133
|
+
1,
|
|
134
|
+
2,
|
|
135
|
+
4,
|
|
136
|
+
8
|
|
137
|
+
],
|
|
138
|
+
20: [
|
|
139
|
+
1,
|
|
140
|
+
2,
|
|
141
|
+
4,
|
|
142
|
+
5,
|
|
143
|
+
10
|
|
144
|
+
],
|
|
145
|
+
25: [1, 5],
|
|
146
|
+
32: [
|
|
147
|
+
1,
|
|
148
|
+
2,
|
|
149
|
+
4,
|
|
150
|
+
8
|
|
151
|
+
],
|
|
152
|
+
50: [
|
|
153
|
+
1,
|
|
154
|
+
2,
|
|
155
|
+
5,
|
|
156
|
+
10
|
|
157
|
+
],
|
|
158
|
+
64: [
|
|
159
|
+
1,
|
|
160
|
+
2,
|
|
161
|
+
4,
|
|
162
|
+
8
|
|
163
|
+
],
|
|
164
|
+
100: [
|
|
165
|
+
1,
|
|
166
|
+
2,
|
|
167
|
+
4,
|
|
168
|
+
5,
|
|
169
|
+
10
|
|
170
|
+
],
|
|
171
|
+
1e3: [
|
|
172
|
+
1,
|
|
173
|
+
2,
|
|
174
|
+
4,
|
|
175
|
+
5,
|
|
176
|
+
8,
|
|
177
|
+
10
|
|
178
|
+
]
|
|
179
|
+
}, l = (e, t, n) => {
|
|
180
|
+
let r = i.mod(i.abs(e), i.abs(n));
|
|
181
|
+
if (!i.equal(r, 0)) throw Error("start point must be divisible by interval");
|
|
182
|
+
if (i.equal(e, t)) return [];
|
|
183
|
+
let a = i.subtract(t, i.mod(t, i.abs(n))), o = i.larger(n, 0) ? "positive" : "negative";
|
|
184
|
+
if (o === "negative" && i.largerEq(t, e)) throw Error("start must be > than end when doing a negative decrement");
|
|
185
|
+
if (o === "positive" && i.smallerEq(t, e)) throw Error("start must be < end when doing increments");
|
|
186
|
+
let s;
|
|
187
|
+
s = o === "positive" ? i.smallerEq : i.equal(a, t) ? i.largerEq : i.larger;
|
|
188
|
+
let c = [], l = e;
|
|
189
|
+
for (; s(l, a);) c.push(l), l = i.add(l, n);
|
|
190
|
+
return c;
|
|
191
|
+
}, u = (e, t) => `Can only do a positive or negative range, but got: start: ${e} and end:${t}`, d = (e, t, n) => {
|
|
192
|
+
e = i.fraction(e), t = i.fraction(t), n = i.fraction(n);
|
|
193
|
+
let r = i.abs(i.subtract(t, e));
|
|
194
|
+
if (i.larger(r, i.abs(t))) throw Error(u(e, t));
|
|
195
|
+
let a = {
|
|
196
|
+
start: i.abs(e),
|
|
197
|
+
end: i.abs(t),
|
|
198
|
+
interval: i.abs(n),
|
|
199
|
+
multiplier: i.smaller(n, 0) ? -1 : 1
|
|
200
|
+
}, o = i.mod(a.start, a.interval), s = l(i.larger(o, 0) ? i.add(i.subtract(a.start, o), a.interval) : a.start, a.end, a.interval), c = a.multiplier === -1 ? s.map((e) => i.multiply(e, -1)) : s;
|
|
201
|
+
return i.smaller(n, 0) && c.reverse(), c;
|
|
202
|
+
}, f = (e, t) => (e = i.fraction(e), t = i.fraction(t), i.smaller(e, t) ? e : t), p = (e, t) => (e = i.fraction(e), t = i.fraction(t), i.larger(e, t) ? e : t), m = (e, t, n) => {
|
|
203
|
+
e = i.fraction(e), t = i.fraction(t), n = i.fraction(n);
|
|
204
|
+
let a = i.larger(t, 0) ? d(p(0, e), t, n) : [];
|
|
205
|
+
return r((i.smaller(e, 0) ? d(f(0, t), e, i.multiply(n, -1)) : []).concat(a), i.equal);
|
|
206
|
+
}, h = (e, t, n) => {
|
|
207
|
+
n ||= 2;
|
|
208
|
+
let r = 10 ** -n / 2;
|
|
209
|
+
return Math.abs(e - t) < r;
|
|
210
|
+
}, g = (e, t, n) => i.smaller(y(e), y(t)) ? t : i.larger(y(e), y(n)) ? n : e, _ = (e, t) => {
|
|
211
|
+
let n = e.max - e.min, r = i.number(i.multiply(10, i.divide(i.fraction(n), t)));
|
|
212
|
+
return {
|
|
213
|
+
min: r,
|
|
214
|
+
max: i.number(i.multiply(20, r))
|
|
215
|
+
};
|
|
216
|
+
}, v = (e, t) => {
|
|
217
|
+
let n = i.mod(e, t);
|
|
218
|
+
return i.equal(n, 0);
|
|
219
|
+
}, y = (e) => {
|
|
220
|
+
if (t(e)) return i.fraction(e.n * e.s, e.d);
|
|
221
|
+
if (n(e)) return i.fraction(e);
|
|
222
|
+
}, b = (e, t, n, r) => {
|
|
223
|
+
let a = r ? r.limit !== !1 : !0, o = _(e, t), s = a ? g(y(n.minor), o.min, o.max) : y(n.minor), c = a ? g(y(n.major), s, i.multiply(s, 20)) : y(n.major);
|
|
224
|
+
if (!v(c, s)) {
|
|
225
|
+
let e = i.divide(c, s), t = e <= 2 ? 2 : Math.round(e);
|
|
226
|
+
return {
|
|
227
|
+
minor: s,
|
|
228
|
+
major: i.multiply(s, t)
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
return {
|
|
232
|
+
major: c,
|
|
233
|
+
minor: s
|
|
234
|
+
};
|
|
235
|
+
}, x = (e, t, n, r) => (n = b(e, t, n, r), m(e.min, e.max, n.minor).filter((t) => i.smallerEq(t, i.fraction(e.max))).map((e) => {
|
|
236
|
+
let t = "minor", r = i.mod(e, n.major);
|
|
237
|
+
return h(i.number(r), 0) && (t = "major"), {
|
|
238
|
+
x: e,
|
|
239
|
+
type: t
|
|
240
|
+
};
|
|
241
|
+
})), S = (e) => {
|
|
242
|
+
let t = {
|
|
243
|
+
fraction: [],
|
|
244
|
+
decimal: []
|
|
245
|
+
};
|
|
246
|
+
return o.forEach((n) => {
|
|
247
|
+
n >= e.min && n <= e.max && t.decimal.push(n);
|
|
248
|
+
}), s.forEach((n) => {
|
|
249
|
+
let r = i.number(i.fraction(n));
|
|
250
|
+
r >= e.min && r <= e.max && t.fraction.push(n);
|
|
251
|
+
}), t;
|
|
252
|
+
}, C = (e, t, n) => {
|
|
253
|
+
let r = {
|
|
254
|
+
decimal: [],
|
|
255
|
+
fraction: []
|
|
256
|
+
}, a = i.fraction(i.number(i.number(e))), o = a.n, s = a.d;
|
|
257
|
+
if (o >= 1 && s === 1) for (let a = 1; a <= 10; a++) {
|
|
258
|
+
let s = i.number(i.multiply(o, a));
|
|
259
|
+
w(t, n, {
|
|
260
|
+
minor: e,
|
|
261
|
+
major: s
|
|
262
|
+
}, { fraction: void 0 }).filter((e) => e.type === "major").length > 1 && (r.fraction.push(s.toString()), r.decimal.push(s));
|
|
263
|
+
}
|
|
264
|
+
else for (let a in c[s]) {
|
|
265
|
+
let l = i.multiply(i.fraction(o, s), c[s][a]);
|
|
266
|
+
w(t, n, {
|
|
267
|
+
minor: e,
|
|
268
|
+
major: i.number(l)
|
|
269
|
+
}, { fraction: void 0 }).filter((e) => e.type === "major").length > 1 && (l.d === 1 ? r.fraction.push(l.n.toString()) : r.fraction.push(l.n + "/" + l.d), r.decimal.push(i.number(l)));
|
|
270
|
+
}
|
|
271
|
+
return r;
|
|
272
|
+
}, w = (e, t, n, r) => x(e, t, n, r).map((e) => r.fraction ? e : {
|
|
273
|
+
...e,
|
|
274
|
+
x: i.number(e.x) || 0
|
|
275
|
+
}), T = (e, t, n, r) => {
|
|
276
|
+
r = p(f(r, t), e);
|
|
277
|
+
let a = r.mod(n), o, s = n.div(2);
|
|
278
|
+
if (i.largerEq(i.abs(a), s)) {
|
|
279
|
+
let e = n.sub(i.abs(a)), t = i.largerEq(r, 0) ? "add" : "sub";
|
|
280
|
+
o = r[t](e);
|
|
281
|
+
} else {
|
|
282
|
+
let e = i.largerEq(r, 0) ? "sub" : "add";
|
|
283
|
+
o = r[e](i.abs(a));
|
|
284
|
+
}
|
|
285
|
+
return o;
|
|
286
|
+
}, E = (e, t, n, r) => {
|
|
287
|
+
let a = T(i.fraction(e), i.fraction(t), i.fraction(n), i.fraction(r));
|
|
288
|
+
return i.number(a);
|
|
289
|
+
}, D = (e, t, n) => n.map((n) => {
|
|
290
|
+
let r = Number.isFinite(n.size) ? E(0, n.size, t.minor, n.size) : void 0, i = E(e.min, e.max, t.minor, n.domainPosition), a = {
|
|
291
|
+
...n,
|
|
292
|
+
domainPosition: i
|
|
293
|
+
};
|
|
294
|
+
return Number.isFinite(r) && (a.size = r), a;
|
|
295
|
+
});
|
|
296
|
+
//#endregion
|
|
297
|
+
export { w as buildTickData, C as generateMajorValuesForMinor, S as generateMinorValues, _ as getMinorLimits, D as snapElements, E as snapTo, a as tick_utils_exports };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/number-line/src/number-line/graph/ticks.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export declare const TickValidator: PropTypes.Validator<NonNullable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>>;
|
|
12
|
+
export declare class Tick extends React.Component {
|
|
13
|
+
static propTypes: {
|
|
14
|
+
y: PropTypes.Validator<number>;
|
|
15
|
+
x: PropTypes.Validator<number>;
|
|
16
|
+
major: PropTypes.Requireable<boolean>;
|
|
17
|
+
fraction: PropTypes.Requireable<boolean>;
|
|
18
|
+
xScale: PropTypes.Requireable<(...args: any[]) => any>;
|
|
19
|
+
type: PropTypes.Requireable<string>;
|
|
20
|
+
};
|
|
21
|
+
static defaultProps: {
|
|
22
|
+
major: boolean;
|
|
23
|
+
};
|
|
24
|
+
constructor(props: any);
|
|
25
|
+
updateTextBox(): void;
|
|
26
|
+
componentDidMount(): void;
|
|
27
|
+
componentWillUnmount(): void;
|
|
28
|
+
render(): React.JSX.Element;
|
|
29
|
+
}
|
|
30
|
+
export declare class Ticks extends React.Component {
|
|
31
|
+
static contextTypes: {
|
|
32
|
+
xScale: PropTypes.Validator<(...args: any[]) => any>;
|
|
33
|
+
};
|
|
34
|
+
static propTypes: {
|
|
35
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
36
|
+
min: PropTypes.Validator<number>;
|
|
37
|
+
max: PropTypes.Validator<number>;
|
|
38
|
+
}>>>;
|
|
39
|
+
fraction: PropTypes.Requireable<boolean>;
|
|
40
|
+
width: PropTypes.Requireable<number>;
|
|
41
|
+
ticks: PropTypes.Validator<NonNullable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>>;
|
|
42
|
+
y: PropTypes.Validator<number>;
|
|
43
|
+
};
|
|
44
|
+
render(): React.JSX.Element;
|
|
45
|
+
}
|
|
46
|
+
export default Ticks;
|
|
47
|
+
//# sourceMappingURL=ticks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ticks.d.ts","sourceRoot":"","sources":["../../../../src/delivery/number-line/graph/ticks.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAenC,eAAO,MAAM,aAAa,sFAcb,CAAC;AAEd,qBAAa,IAAK,SAAQ,KAAK,CAAC,SAAS;IACvC,MAAM,CAAC,SAAS;;;;;;;MAOd;IAEF,MAAM,CAAC,YAAY;;MAEjB;gBAEU,KAAK,KAAA;IAcjB,aAAa;IAQb,iBAAiB;IAWjB,oBAAoB;IAMpB,MAAM;CAkDP;AAED,qBAAa,KAAM,SAAQ,KAAK,CAAC,SAAS;IACxC,MAAM,CAAC,YAAY;;MAEjB;IAEF,MAAM,CAAC,SAAS;;;;;;;;;MASd;IAEF,MAAM;CAuBP;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { buildTickData as e } from "./tick-utils.js";
|
|
2
|
+
import t from "react";
|
|
3
|
+
import { styled as n } from "@mui/material/styles";
|
|
4
|
+
import r from "prop-types";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
import { color as o } from "@pie-lib/render-ui";
|
|
7
|
+
//#region src/delivery/number-line/graph/ticks.tsx
|
|
8
|
+
var s = n("text")({
|
|
9
|
+
userSelect: "none",
|
|
10
|
+
textAlign: "center",
|
|
11
|
+
fill: o.primary()
|
|
12
|
+
}), c = n("line")({ stroke: o.primary() }), l = r.shape({
|
|
13
|
+
major: (e, t) => {},
|
|
14
|
+
minor: (e, t, n) => {
|
|
15
|
+
if (e[t] <= 0) return /* @__PURE__ */ Error(`Invalid prop ${t} must be > 0. ${n}`);
|
|
16
|
+
}
|
|
17
|
+
}).isRequired, u = class extends t.Component {
|
|
18
|
+
static propTypes = {
|
|
19
|
+
y: r.number.isRequired,
|
|
20
|
+
x: r.number.isRequired,
|
|
21
|
+
major: r.bool,
|
|
22
|
+
fraction: r.bool,
|
|
23
|
+
xScale: r.func,
|
|
24
|
+
type: r.string
|
|
25
|
+
};
|
|
26
|
+
static defaultProps = { major: !1 };
|
|
27
|
+
constructor(e) {
|
|
28
|
+
super(e), this.wasRendered = !1, this.state = { textBox: {
|
|
29
|
+
width: 0,
|
|
30
|
+
height: 0,
|
|
31
|
+
x: 0,
|
|
32
|
+
y: 0
|
|
33
|
+
} }, this.resizeObserver = null;
|
|
34
|
+
}
|
|
35
|
+
updateTextBox() {
|
|
36
|
+
if (this.text) {
|
|
37
|
+
let { width: e, height: t, x: n, y: r } = this.text.getBBox();
|
|
38
|
+
this.text.setAttribute("x", e / 2 * -1), this.setState({ textBox: {
|
|
39
|
+
width: e,
|
|
40
|
+
height: t,
|
|
41
|
+
x: n,
|
|
42
|
+
y: r
|
|
43
|
+
} });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
componentDidMount() {
|
|
47
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
48
|
+
this.updateTextBox();
|
|
49
|
+
}), this.text && this.resizeObserver.observe(this.text);
|
|
50
|
+
}
|
|
51
|
+
componentWillUnmount() {
|
|
52
|
+
this.resizeObserver && this.resizeObserver.disconnect();
|
|
53
|
+
}
|
|
54
|
+
render() {
|
|
55
|
+
let { x: e, y: n, type: r, xScale: o, fraction: l } = this.props, u = l && e.n !== e.d && e.n !== 0 && e.d !== 1, d = r === "major", f = d ? 20 : 10, { width: p = 0, height: m = 0, x: h = 0, y: g = 0 } = this.state.textBox, _ = l ? u ? /* @__PURE__ */ a(t.Fragment, { children: [/* @__PURE__ */ i("tspan", {
|
|
56
|
+
x: "0",
|
|
57
|
+
dy: "0.71em",
|
|
58
|
+
children: e.n * e.s
|
|
59
|
+
}), /* @__PURE__ */ i("tspan", {
|
|
60
|
+
x: "0",
|
|
61
|
+
dy: "1.11em",
|
|
62
|
+
children: e.d
|
|
63
|
+
})] }) : e.n * e.s : Number(e.toFixed(3));
|
|
64
|
+
return /* @__PURE__ */ a("g", {
|
|
65
|
+
opacity: "1",
|
|
66
|
+
transform: `translate(${o(e)}, ${n})`,
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ i(c, {
|
|
69
|
+
y1: f / 2 * -1,
|
|
70
|
+
y2: f / 2,
|
|
71
|
+
x1: "0.5",
|
|
72
|
+
x2: "0.5"
|
|
73
|
+
}),
|
|
74
|
+
u && /* @__PURE__ */ i(c, {
|
|
75
|
+
x1: h,
|
|
76
|
+
x2: h + p,
|
|
77
|
+
y1: g + m / 2,
|
|
78
|
+
y2: g + m / 2
|
|
79
|
+
}),
|
|
80
|
+
d && /* @__PURE__ */ i(s, {
|
|
81
|
+
ref: (e) => this.text = e,
|
|
82
|
+
y: "14",
|
|
83
|
+
width: "10",
|
|
84
|
+
dy: "0.71em",
|
|
85
|
+
textAnchor: u && "middle",
|
|
86
|
+
children: _
|
|
87
|
+
})
|
|
88
|
+
]
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}, d = class extends t.Component {
|
|
92
|
+
static contextTypes = { xScale: r.func.isRequired };
|
|
93
|
+
static propTypes = {
|
|
94
|
+
domain: r.shape({
|
|
95
|
+
min: r.number.isRequired,
|
|
96
|
+
max: r.number.isRequired
|
|
97
|
+
}).isRequired,
|
|
98
|
+
fraction: r.bool,
|
|
99
|
+
width: r.number,
|
|
100
|
+
ticks: l,
|
|
101
|
+
y: r.number.isRequired
|
|
102
|
+
};
|
|
103
|
+
render() {
|
|
104
|
+
let { domain: t, width: n, ticks: r, y: a, fraction: o } = this.props, { xScale: s } = this.context;
|
|
105
|
+
return /* @__PURE__ */ i("g", { children: e(t, n, r, { fraction: o }).map(({ x: e, type: t }) => /* @__PURE__ */ i(u, {
|
|
106
|
+
fraction: o,
|
|
107
|
+
x: e,
|
|
108
|
+
y: a,
|
|
109
|
+
type: t,
|
|
110
|
+
xScale: s
|
|
111
|
+
}, `${e}-${t}-${o}`)) });
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
//#endregion
|
|
115
|
+
export { d as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/number-line/src/number-line/index.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import Graph from './graph/index.js';
|
|
11
|
+
import PropTypes from 'prop-types';
|
|
12
|
+
export { Graph };
|
|
13
|
+
export declare class NumberLine extends React.Component {
|
|
14
|
+
static propTypes: {
|
|
15
|
+
onMoveElement: PropTypes.Validator<(...args: any[]) => any>;
|
|
16
|
+
onDeleteElements: PropTypes.Validator<(...args: any[]) => any>;
|
|
17
|
+
onAddElement: PropTypes.Validator<(...args: any[]) => any>;
|
|
18
|
+
onUndoElement: PropTypes.Validator<(...args: any[]) => any>;
|
|
19
|
+
onClearElements: PropTypes.Validator<(...args: any[]) => any>;
|
|
20
|
+
model: PropTypes.Validator<object>;
|
|
21
|
+
answer: PropTypes.Requireable<any[]>;
|
|
22
|
+
};
|
|
23
|
+
constructor(props: any, context: any);
|
|
24
|
+
toggleElement(index: any): void;
|
|
25
|
+
elementTypeSelected(t: any): void;
|
|
26
|
+
addElement(x: any): void;
|
|
27
|
+
hasMaxNoOfPoints(): any;
|
|
28
|
+
UNSAFE_componentWillReceiveProps(nextProps: any): void;
|
|
29
|
+
deselectElements(): void;
|
|
30
|
+
getSize(type: any, min: any, max: any, defaultValue: any): any;
|
|
31
|
+
undo(): void;
|
|
32
|
+
clearAll(): void;
|
|
33
|
+
render(): React.JSX.Element;
|
|
34
|
+
}
|
|
35
|
+
export default NumberLine;
|
|
36
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/delivery/number-line/index.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAsC1B,OAAO,KAAK,MAAM,kBAAkB,CAAC;AACrC,OAAO,SAAS,MAAM,YAAY,CAAC;AAMnC,OAAO,EAAE,KAAK,EAAE,CAAC;AAwDjB,qBAAa,UAAW,SAAQ,KAAK,CAAC,SAAS;IAC7C,MAAM,CAAC,SAAS;;;;;;;;MAQd;gBAEU,KAAK,KAAA,EAAE,OAAO,KAAA;IAa1B,aAAa,CAAC,KAAK,KAAA;IAUnB,mBAAmB,CAAC,CAAC,KAAA;IAIrB,UAAU,CAAC,CAAC,KAAA;IAiCZ,gBAAgB;IAWhB,gCAAgC,CAAC,SAAS,KAAA;IAQ1C,gBAAgB;IAIhB,OAAO,CAAC,IAAI,KAAA,EAAE,GAAG,KAAA,EAAE,GAAG,KAAA,EAAE,YAAY,KAAA;IAYpC,IAAI;IASJ,QAAQ;IAOR,MAAM;CAqJP;AAED,eAAe,UAAU,CAAC"}
|