@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,254 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObject.js";
|
|
2
|
+
import t from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isNumber.js";
|
|
3
|
+
import n from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/uniqWith.js";
|
|
4
|
+
import * as r from "mathjs";
|
|
5
|
+
//#region src/controller/tickUtils.ts
|
|
6
|
+
var i = [
|
|
7
|
+
.001,
|
|
8
|
+
.01,
|
|
9
|
+
.02,
|
|
10
|
+
.04,
|
|
11
|
+
.05,
|
|
12
|
+
.1,
|
|
13
|
+
.125,
|
|
14
|
+
.2,
|
|
15
|
+
.25,
|
|
16
|
+
.5
|
|
17
|
+
], a = [
|
|
18
|
+
"1/1000",
|
|
19
|
+
"1/100",
|
|
20
|
+
"1/64",
|
|
21
|
+
"1/50",
|
|
22
|
+
"1/32",
|
|
23
|
+
"1/25",
|
|
24
|
+
"1/20",
|
|
25
|
+
"1/16",
|
|
26
|
+
"1/15",
|
|
27
|
+
"1/12",
|
|
28
|
+
"1/10",
|
|
29
|
+
"1/9",
|
|
30
|
+
"1/8",
|
|
31
|
+
"1/7",
|
|
32
|
+
"1/6",
|
|
33
|
+
"1/5",
|
|
34
|
+
"1/4",
|
|
35
|
+
"1/3",
|
|
36
|
+
"1/2"
|
|
37
|
+
], o = {
|
|
38
|
+
1: [
|
|
39
|
+
1,
|
|
40
|
+
2,
|
|
41
|
+
3,
|
|
42
|
+
4,
|
|
43
|
+
5,
|
|
44
|
+
6,
|
|
45
|
+
7,
|
|
46
|
+
8,
|
|
47
|
+
9,
|
|
48
|
+
10
|
|
49
|
+
],
|
|
50
|
+
2: [
|
|
51
|
+
1,
|
|
52
|
+
2,
|
|
53
|
+
4,
|
|
54
|
+
6,
|
|
55
|
+
8,
|
|
56
|
+
10
|
|
57
|
+
],
|
|
58
|
+
3: [
|
|
59
|
+
1,
|
|
60
|
+
3,
|
|
61
|
+
6,
|
|
62
|
+
9
|
|
63
|
+
],
|
|
64
|
+
4: [
|
|
65
|
+
1,
|
|
66
|
+
2,
|
|
67
|
+
4,
|
|
68
|
+
8
|
|
69
|
+
],
|
|
70
|
+
5: [
|
|
71
|
+
1,
|
|
72
|
+
5,
|
|
73
|
+
10
|
|
74
|
+
],
|
|
75
|
+
6: [
|
|
76
|
+
1,
|
|
77
|
+
2,
|
|
78
|
+
3,
|
|
79
|
+
6
|
|
80
|
+
],
|
|
81
|
+
7: [1, 7],
|
|
82
|
+
8: [
|
|
83
|
+
1,
|
|
84
|
+
2,
|
|
85
|
+
4,
|
|
86
|
+
8
|
|
87
|
+
],
|
|
88
|
+
9: [
|
|
89
|
+
1,
|
|
90
|
+
3,
|
|
91
|
+
9
|
|
92
|
+
],
|
|
93
|
+
10: [
|
|
94
|
+
1,
|
|
95
|
+
2,
|
|
96
|
+
5,
|
|
97
|
+
10
|
|
98
|
+
],
|
|
99
|
+
12: [
|
|
100
|
+
1,
|
|
101
|
+
2,
|
|
102
|
+
3,
|
|
103
|
+
4,
|
|
104
|
+
6
|
|
105
|
+
],
|
|
106
|
+
15: [
|
|
107
|
+
1,
|
|
108
|
+
3,
|
|
109
|
+
5
|
|
110
|
+
],
|
|
111
|
+
16: [
|
|
112
|
+
1,
|
|
113
|
+
2,
|
|
114
|
+
4,
|
|
115
|
+
8
|
|
116
|
+
],
|
|
117
|
+
20: [
|
|
118
|
+
1,
|
|
119
|
+
2,
|
|
120
|
+
4,
|
|
121
|
+
5,
|
|
122
|
+
10
|
|
123
|
+
],
|
|
124
|
+
25: [1, 5],
|
|
125
|
+
32: [
|
|
126
|
+
1,
|
|
127
|
+
2,
|
|
128
|
+
4,
|
|
129
|
+
8
|
|
130
|
+
],
|
|
131
|
+
50: [
|
|
132
|
+
1,
|
|
133
|
+
2,
|
|
134
|
+
5,
|
|
135
|
+
10
|
|
136
|
+
],
|
|
137
|
+
64: [
|
|
138
|
+
1,
|
|
139
|
+
2,
|
|
140
|
+
4,
|
|
141
|
+
8
|
|
142
|
+
],
|
|
143
|
+
100: [
|
|
144
|
+
1,
|
|
145
|
+
2,
|
|
146
|
+
4,
|
|
147
|
+
5,
|
|
148
|
+
10
|
|
149
|
+
],
|
|
150
|
+
1e3: [
|
|
151
|
+
1,
|
|
152
|
+
2,
|
|
153
|
+
4,
|
|
154
|
+
5,
|
|
155
|
+
8,
|
|
156
|
+
10
|
|
157
|
+
]
|
|
158
|
+
}, s = (e, t, n) => {
|
|
159
|
+
let i = r.mod(r.abs(e), r.abs(n));
|
|
160
|
+
if (!r.equal(i, 0)) throw Error("start point must be divisible by interval");
|
|
161
|
+
if (r.equal(e, t)) return [];
|
|
162
|
+
let a = r.subtract(t, r.mod(t, r.abs(n))), o = r.larger(n, 0) ? "positive" : "negative";
|
|
163
|
+
if (o === "negative" && r.largerEq(t, e)) throw Error("start must be > than end when doing a negative decrement");
|
|
164
|
+
if (o === "positive" && r.smallerEq(t, e)) throw Error("start must be < end when doing increments");
|
|
165
|
+
let s = o === "positive" ? r.smallerEq : r.equal(a, t) ? r.largerEq : r.larger, c = [], l = e;
|
|
166
|
+
for (; s(l, a);) c.push(l), l = r.add(l, n);
|
|
167
|
+
return c;
|
|
168
|
+
}, c = (e, t) => `Can only do a positive or negative range, but got: start: ${e} and end:${t}`, l = (e, t, n) => {
|
|
169
|
+
e = r.fraction(e), t = r.fraction(t), n = r.fraction(n);
|
|
170
|
+
let i = r.abs(r.subtract(t, e));
|
|
171
|
+
if (r.larger(i, r.abs(t))) throw Error(c(e, t));
|
|
172
|
+
let a = {
|
|
173
|
+
start: r.abs(e),
|
|
174
|
+
end: r.abs(t),
|
|
175
|
+
interval: r.abs(n),
|
|
176
|
+
multiplier: r.smaller(n, 0) ? -1 : 1
|
|
177
|
+
}, o = r.mod(a.start, a.interval), l = s(r.larger(o, 0) ? r.add(r.subtract(a.start, o), a.interval) : a.start, a.end, a.interval), u = a.multiplier === -1 ? l.map((e) => r.multiply(e, -1)) : l;
|
|
178
|
+
return r.smaller(n, 0) && u.reverse(), u;
|
|
179
|
+
}, u = (e, t) => (e = r.fraction(e), t = r.fraction(t), r.smaller(e, t) ? e : t), d = (e, t) => (e = r.fraction(e), t = r.fraction(t), r.larger(e, t) ? e : t), f = (e, t, i) => {
|
|
180
|
+
e = r.fraction(e), t = r.fraction(t), i = r.fraction(i);
|
|
181
|
+
let a = r.larger(t, 0) ? l(d(0, e), t, i) : [];
|
|
182
|
+
return n((r.smaller(e, 0) ? l(u(0, t), e, r.multiply(i, -1)) : []).concat(a), r.equal);
|
|
183
|
+
}, p = (e, t, n) => {
|
|
184
|
+
n ||= 2;
|
|
185
|
+
let r = 10 ** -n / 2;
|
|
186
|
+
return Math.abs(e - t) < r;
|
|
187
|
+
}, m = (e, t, n) => r.smaller(_(e), _(t)) ? t : r.larger(_(e), _(n)) ? n : e, h = (e, t) => {
|
|
188
|
+
let n = e.max - e.min, i = r.number(r.multiply(10, r.divide(r.fraction(n), t)));
|
|
189
|
+
return {
|
|
190
|
+
min: i,
|
|
191
|
+
max: r.number(r.multiply(20, i))
|
|
192
|
+
};
|
|
193
|
+
}, g = (e, t) => {
|
|
194
|
+
let n = r.mod(e, t);
|
|
195
|
+
return r.equal(n, 0);
|
|
196
|
+
}, _ = (n) => {
|
|
197
|
+
if (e(n)) return r.fraction(n.n * n.s, n.d);
|
|
198
|
+
if (t(n)) return r.fraction(n);
|
|
199
|
+
}, v = (e, t, n, i) => {
|
|
200
|
+
let a = i ? i.limit !== !1 : !0, o = h(e, t), s = a ? m(_(n.minor), o.min, o.max) : _(n.minor), c = a ? m(_(n.major), s, r.multiply(s, 20)) : _(n.major);
|
|
201
|
+
if (!g(c, s)) {
|
|
202
|
+
let e = r.divide(c, s), t = e <= 2 ? 2 : Math.round(e);
|
|
203
|
+
return {
|
|
204
|
+
minor: s,
|
|
205
|
+
major: r.multiply(s, t)
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
return {
|
|
209
|
+
major: c,
|
|
210
|
+
minor: s
|
|
211
|
+
};
|
|
212
|
+
}, y = (e, t, n, i) => (n = v(e, t, n, i), f(e.min, e.max, n.minor).filter((t) => r.smallerEq(t, r.fraction(e.max))).map((e) => {
|
|
213
|
+
let t = "minor", i = r.mod(e, n.major);
|
|
214
|
+
return p(r.number(i), 0) && (t = "major"), {
|
|
215
|
+
x: e,
|
|
216
|
+
type: t
|
|
217
|
+
};
|
|
218
|
+
})), b = (e) => {
|
|
219
|
+
let t = {
|
|
220
|
+
fraction: [],
|
|
221
|
+
decimal: []
|
|
222
|
+
};
|
|
223
|
+
return i.forEach((n) => {
|
|
224
|
+
n >= e.min && n <= e.max && t.decimal.push(n);
|
|
225
|
+
}), a.forEach((n) => {
|
|
226
|
+
let i = r.number(r.fraction(n));
|
|
227
|
+
i >= e.min && i <= e.max && t.fraction.push(n);
|
|
228
|
+
}), t;
|
|
229
|
+
}, x = (e, t, n) => {
|
|
230
|
+
let i = {
|
|
231
|
+
decimal: [],
|
|
232
|
+
fraction: []
|
|
233
|
+
}, a = r.fraction(r.number(r.number(e))), s = a.n, c = a.d;
|
|
234
|
+
if (s >= 1 && c === 1) for (let a = 1; a <= 10; a++) {
|
|
235
|
+
let o = r.number(r.multiply(s, a));
|
|
236
|
+
S(t, n, {
|
|
237
|
+
minor: e,
|
|
238
|
+
major: o
|
|
239
|
+
}, { fraction: void 0 }).filter((e) => e.type === "major").length > 1 && (i.fraction.push(o.toString()), i.decimal.push(o));
|
|
240
|
+
}
|
|
241
|
+
else for (let a in o[c]) {
|
|
242
|
+
let l = r.multiply(r.fraction(s, c), o[c][a]);
|
|
243
|
+
S(t, n, {
|
|
244
|
+
minor: e,
|
|
245
|
+
major: r.number(l)
|
|
246
|
+
}, { fraction: void 0 }).filter((e) => e.type === "major").length > 1 && (l.d === 1 ? i.fraction.push(l.n.toString()) : i.fraction.push(l.n + "/" + l.d), i.decimal.push(r.number(l)));
|
|
247
|
+
}
|
|
248
|
+
return i;
|
|
249
|
+
}, S = (e, t, n, i) => y(e, t, n, i).map((e) => i.fraction ? e : {
|
|
250
|
+
...e,
|
|
251
|
+
x: r.number(e.x) || 0
|
|
252
|
+
});
|
|
253
|
+
//#endregion
|
|
254
|
+
export { x as generateMajorValuesForMinor, b as generateMinorValues, h as getMinorLimits };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/number-line/controller/src/utils.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
export declare const reloadTicksData: (graph: any) => any;
|
|
10
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/controller/utils.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAmCH,eAAO,MAAM,eAAe,GAAI,UAAK,QAmHpC,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { generateMajorValuesForMinor as e, generateMinorValues as t, getMinorLimits as n } from "./tickUtils.js";
|
|
2
|
+
import * as r from "mathjs";
|
|
3
|
+
//#region src/controller/utils.ts
|
|
4
|
+
var i = (t) => {
|
|
5
|
+
let { domain: n, ticks: r, width: i } = t, a = e(r.minor, n, i);
|
|
6
|
+
if (a.decimal.indexOf(r.major) === -1) {
|
|
7
|
+
let e = 0;
|
|
8
|
+
e = r.tickIntervalType === "Integer" && a.decimal.length > 4 ? 4 : a.decimal.length - 1, r.major = a.decimal[e];
|
|
9
|
+
}
|
|
10
|
+
return t.fraction = r.tickIntervalType === "Fraction" && r.major < 1, {
|
|
11
|
+
...t,
|
|
12
|
+
ticks: r
|
|
13
|
+
};
|
|
14
|
+
}, a = (e) => {
|
|
15
|
+
let { domain: a, ticks: o = {}, width: s } = e;
|
|
16
|
+
o.tickIntervalType || (o.minor > .5 ? o.tickIntervalType = "Integer" : o.tickIntervalType = "Decimal");
|
|
17
|
+
let c = n(a, s);
|
|
18
|
+
if (c.min >= 1) o.tickIntervalType = "Integer", o.minor = o.minor < 1 ? r.number(r.ceil(c.min)) : o.minor >= r.number(r.ceil(c.min)) && o.minor <= r.number(r.floor(c.max)) ? o.minor : r.number(r.ceil(c.min)), o.integerTick = o.minor, o.fractionTick = "0", o.decimalTick = 0;
|
|
19
|
+
else if (c.min >= 0 && c.max < 1) {
|
|
20
|
+
o.tickIntervalType === "Integer" && (o.tickIntervalType = "Fraction");
|
|
21
|
+
let e = t(c), n = r.number(r.fraction(e.fraction[0])), i = r.number(r.fraction(e.fraction[e.fraction.length - 1]));
|
|
22
|
+
if (o.minor < n || o.minor > i) switch (o.tickIntervalType) {
|
|
23
|
+
case "Fraction":
|
|
24
|
+
o.minor = r.number(r.fraction(e.fraction[e.fraction.length - 1])), o.fractionTick = e.fraction[e.fraction.length - 1], o.decimalTick = e.decimal[0];
|
|
25
|
+
break;
|
|
26
|
+
case "Decimal":
|
|
27
|
+
case "Integer": o.minor = e.decimal[e.decimal.length - 1], o.decimalTick = e.decimal[e.decimal.length - 1], o.fractionTick = e.fraction[0];
|
|
28
|
+
}
|
|
29
|
+
else switch (o.tickIntervalType) {
|
|
30
|
+
case "Fraction":
|
|
31
|
+
let t = r.fraction(r.number(o.minor));
|
|
32
|
+
o.fractionTick = t.n + "/" + t.d, o.decimalTick = o.decimalTick ? o.decimalTick : e.decimal[0];
|
|
33
|
+
break;
|
|
34
|
+
case "Decimal":
|
|
35
|
+
case "Integer": o.decimalTick = o.minor, o.fractionTick = o.fractionTick ? o.fractionTick : e.fraction[0];
|
|
36
|
+
}
|
|
37
|
+
o.integerTick = 1;
|
|
38
|
+
} else if (c.min < 1 && c.max >= 1) {
|
|
39
|
+
let e = t(c);
|
|
40
|
+
if (o.minor >= c.min && o.minor <= c.max) switch (o.tickIntervalType) {
|
|
41
|
+
case "Integer":
|
|
42
|
+
o.integerTick = o.minor, o.decimalTick = c.min > .5 ? 0 : e.decimal[0], o.fractionTick = c.min > .5 ? "0" : e.fraction[0];
|
|
43
|
+
break;
|
|
44
|
+
case "Decimal":
|
|
45
|
+
o.integerTick = 1, o.decimalTick = o.minor, o.fractionTick = e.fraction[0];
|
|
46
|
+
break;
|
|
47
|
+
case "Fraction":
|
|
48
|
+
o.integerTick = 1, o.decimalTick = e.decimal[0];
|
|
49
|
+
let t = r.fraction(r.number(o.minor));
|
|
50
|
+
o.fractionTick = t.n + "/" + t.d;
|
|
51
|
+
}
|
|
52
|
+
else switch (c.min > .5 && (o.tickIntervalType = "Integer"), o.tickIntervalType) {
|
|
53
|
+
case "Integer":
|
|
54
|
+
o.minor = r.number(r.ceil(c.min)), o.integerTick = o.minor, o.decimalTick = c.min > .5 ? 0 : e.decimal[0], o.fractionTick = c.min > .5 ? "0" : e.fraction[0];
|
|
55
|
+
break;
|
|
56
|
+
case "Decimal":
|
|
57
|
+
o.minor = e.decimal[0], o.integerTick = 1, o.decimalTick = o.minor, o.fractionTick = e.fraction[0];
|
|
58
|
+
break;
|
|
59
|
+
case "Fraction": o.minor = r.number(r.fraction(e.fraction[0])), o.integerTick = 1, o.decimalTick = e.decimal[0], o.fractionTick = e.fraction[0];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return i({
|
|
63
|
+
...e,
|
|
64
|
+
ticks: o
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
export { a as reloadTicksData };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/number-line/src/data-converter.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 lineIsSwitched: (line: any) => boolean;
|
|
10
|
+
export declare const switchGraphLine: (line: any) => any;
|
|
11
|
+
export declare const switchPosition: (p: any) => {
|
|
12
|
+
left: any;
|
|
13
|
+
right: any;
|
|
14
|
+
};
|
|
15
|
+
export declare const toSessionFormat: (gf: any) => {
|
|
16
|
+
type: string;
|
|
17
|
+
pointType: any;
|
|
18
|
+
domainPosition: any;
|
|
19
|
+
size?: undefined;
|
|
20
|
+
leftPoint?: undefined;
|
|
21
|
+
rightPoint?: undefined;
|
|
22
|
+
direction?: undefined;
|
|
23
|
+
} | {
|
|
24
|
+
type: string;
|
|
25
|
+
size: number;
|
|
26
|
+
domainPosition: any;
|
|
27
|
+
leftPoint: any;
|
|
28
|
+
rightPoint: any;
|
|
29
|
+
pointType?: undefined;
|
|
30
|
+
direction?: undefined;
|
|
31
|
+
} | {
|
|
32
|
+
type: string;
|
|
33
|
+
domainPosition: any;
|
|
34
|
+
pointType: any;
|
|
35
|
+
direction: any;
|
|
36
|
+
size?: undefined;
|
|
37
|
+
leftPoint?: undefined;
|
|
38
|
+
rightPoint?: undefined;
|
|
39
|
+
} | undefined;
|
|
40
|
+
export declare const toGraphFormat: (sf: any) => {
|
|
41
|
+
type: string;
|
|
42
|
+
pointType: any;
|
|
43
|
+
position: any;
|
|
44
|
+
leftPoint?: undefined;
|
|
45
|
+
rightPoint?: undefined;
|
|
46
|
+
direction?: undefined;
|
|
47
|
+
} | {
|
|
48
|
+
type: string;
|
|
49
|
+
position: {
|
|
50
|
+
left: any;
|
|
51
|
+
right: any;
|
|
52
|
+
};
|
|
53
|
+
leftPoint: any;
|
|
54
|
+
rightPoint: any;
|
|
55
|
+
pointType?: undefined;
|
|
56
|
+
direction?: undefined;
|
|
57
|
+
} | {
|
|
58
|
+
type: string;
|
|
59
|
+
position: any;
|
|
60
|
+
pointType: any;
|
|
61
|
+
direction: any;
|
|
62
|
+
leftPoint?: undefined;
|
|
63
|
+
rightPoint?: undefined;
|
|
64
|
+
} | undefined;
|
|
65
|
+
//# sourceMappingURL=data-converter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-converter.d.ts","sourceRoot":"","sources":["../../src/delivery/data-converter.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,eAAO,MAAM,cAAc,GAAI,SAAI,YAGlC,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,SAAI,QAenC,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,MAAC;;;CAG/B,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,OAAE;;;;;;;;;;;;;;;;;;;;;;;;aAuBjC,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,OAAE;;;;;;;;;;;;;;;;;;;;;;;;aAyB/B,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region src/delivery/data-converter.ts
|
|
3
|
+
var t = /* @__PURE__ */ e({
|
|
4
|
+
lineIsSwitched: () => n,
|
|
5
|
+
switchGraphLine: () => r,
|
|
6
|
+
switchPosition: () => i,
|
|
7
|
+
toGraphFormat: () => o,
|
|
8
|
+
toSessionFormat: () => a
|
|
9
|
+
}), n = (e) => {
|
|
10
|
+
let { position: t } = e;
|
|
11
|
+
return t.left > t.right;
|
|
12
|
+
}, r = (e) => {
|
|
13
|
+
let { position: t } = e;
|
|
14
|
+
if (t.left < t.right) return e;
|
|
15
|
+
let { leftPoint: n, rightPoint: r } = e;
|
|
16
|
+
return {
|
|
17
|
+
leftPoint: r,
|
|
18
|
+
rightPoint: n,
|
|
19
|
+
position: i(t),
|
|
20
|
+
type: "line"
|
|
21
|
+
};
|
|
22
|
+
}, i = (e) => {
|
|
23
|
+
let { left: t, right: n } = e;
|
|
24
|
+
return {
|
|
25
|
+
left: n,
|
|
26
|
+
right: t
|
|
27
|
+
};
|
|
28
|
+
}, a = (e) => {
|
|
29
|
+
if (e.type === "point") return {
|
|
30
|
+
type: "point",
|
|
31
|
+
pointType: e.pointType,
|
|
32
|
+
domainPosition: e.position
|
|
33
|
+
};
|
|
34
|
+
if (e.type === "line") return {
|
|
35
|
+
type: "line",
|
|
36
|
+
size: e.position.right - e.position.left,
|
|
37
|
+
domainPosition: e.position.left,
|
|
38
|
+
leftPoint: e.leftPoint,
|
|
39
|
+
rightPoint: e.rightPoint
|
|
40
|
+
};
|
|
41
|
+
if (e.type === "ray") return {
|
|
42
|
+
type: "ray",
|
|
43
|
+
domainPosition: e.position,
|
|
44
|
+
pointType: e.pointType,
|
|
45
|
+
direction: e.direction
|
|
46
|
+
};
|
|
47
|
+
}, o = (e) => {
|
|
48
|
+
if (e.type === "point") return {
|
|
49
|
+
type: "point",
|
|
50
|
+
pointType: e.pointType,
|
|
51
|
+
position: e.domainPosition
|
|
52
|
+
};
|
|
53
|
+
if (e.type === "line") return {
|
|
54
|
+
type: "line",
|
|
55
|
+
position: {
|
|
56
|
+
left: e.domainPosition,
|
|
57
|
+
right: e.domainPosition + e.size
|
|
58
|
+
},
|
|
59
|
+
leftPoint: e.leftPoint,
|
|
60
|
+
rightPoint: e.rightPoint
|
|
61
|
+
};
|
|
62
|
+
if (e.type === "ray") return {
|
|
63
|
+
type: "ray",
|
|
64
|
+
position: e.domainPosition,
|
|
65
|
+
pointType: e.pointType,
|
|
66
|
+
direction: e.direction
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
//#endregion
|
|
70
|
+
export { t as data_converter_exports, n as lineIsSwitched, r as switchGraphLine, o as toGraphFormat, a as toSessionFormat };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/number-line/src/draggable/index.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Shared dnd-kit wrapper for Line + Point.
|
|
11
|
+
*
|
|
12
|
+
* Props:
|
|
13
|
+
* - id: string (unique)
|
|
14
|
+
* - disabled: boolean
|
|
15
|
+
* - grid: [stepX] (like grid={[is]})
|
|
16
|
+
* - bounds: { left: number, right: number } in px (like scaledLineBounds)
|
|
17
|
+
* - onMouseDown: (event) => void
|
|
18
|
+
* - onDragStart?: () => void
|
|
19
|
+
* - onDragMove?: (deltaX: number) => void // snapped + clamped
|
|
20
|
+
* - onDragEnd?: (deltaX: number) => void // snapped + clamped
|
|
21
|
+
* - children: ({ setNodeRef, attributes, listeners, translateX, isDragging, onMouseDown }) => ReactNode
|
|
22
|
+
*/
|
|
23
|
+
export declare function Draggable({ id, disabled, grid, bounds, onMouseDown, onDragStart, onDragMove, onDragEnd, children, }: {
|
|
24
|
+
id: any;
|
|
25
|
+
disabled: any;
|
|
26
|
+
grid: any;
|
|
27
|
+
bounds: any;
|
|
28
|
+
onMouseDown: any;
|
|
29
|
+
onDragStart: any;
|
|
30
|
+
onDragMove: any;
|
|
31
|
+
onDragEnd: any;
|
|
32
|
+
children: any;
|
|
33
|
+
}): any;
|
|
34
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/delivery/draggable/index.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAMH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,EACxB,EAAE,EACF,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,WAAW,EACX,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,GACT;;;;;;;;;;CAAA,OA6EA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { useDndMonitor as e, useDraggable as t } from "@dnd-kit/core";
|
|
2
|
+
//#region src/delivery/draggable/index.ts
|
|
3
|
+
function n({ id: n, disabled: r, grid: i, bounds: a, onMouseDown: o, onDragStart: s, onDragMove: c, onDragEnd: l, children: u }) {
|
|
4
|
+
let { attributes: d, listeners: f, setNodeRef: p, transform: m } = t({
|
|
5
|
+
id: n,
|
|
6
|
+
disabled: r
|
|
7
|
+
}), h = i && i[0] ? i[0] : null, g = m?.x ?? 0;
|
|
8
|
+
h && (g = Math.round(g / h) * h), a && (typeof a.left == "number" && (g = Math.max(a.left, g)), typeof a.right == "number" && (g = Math.min(a.right, g)));
|
|
9
|
+
let _ = g, v = !!m, y = (e) => {
|
|
10
|
+
let t = e;
|
|
11
|
+
return h && (t = Math.round(t / h) * h), a && (typeof a.left == "number" && (t = Math.max(a.left, t)), typeof a.right == "number" && (t = Math.min(a.right, t))), t;
|
|
12
|
+
};
|
|
13
|
+
return e({
|
|
14
|
+
onDragStart(e) {
|
|
15
|
+
e.active.id !== n || r || s?.();
|
|
16
|
+
},
|
|
17
|
+
onDragMove(e) {
|
|
18
|
+
if (e.active.id !== n || r) return;
|
|
19
|
+
let t = e.delta.x || 0;
|
|
20
|
+
c?.(y(t));
|
|
21
|
+
},
|
|
22
|
+
onDragEnd(e) {
|
|
23
|
+
if (e.active.id !== n || r) return;
|
|
24
|
+
let t = e.delta.x || 0;
|
|
25
|
+
l?.(y(t));
|
|
26
|
+
}
|
|
27
|
+
}), u({
|
|
28
|
+
setNodeRef: p,
|
|
29
|
+
attributes: d,
|
|
30
|
+
listeners: f,
|
|
31
|
+
translateX: _,
|
|
32
|
+
isDragging: v,
|
|
33
|
+
onMouseDown: (e) => {
|
|
34
|
+
e.nativeEvent.preventDefault(), o?.(e);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { n as Draggable };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/number-line/src/index.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import * as dataConverter from './data-converter.js';
|
|
10
|
+
import * as pointChooser from './number-line/point-chooser/index.js';
|
|
11
|
+
import * as tickUtils from './number-line/graph/tick-utils.js';
|
|
12
|
+
import Graph from './number-line/graph/index.js';
|
|
13
|
+
import NumberLineComponent from './number-line/index.js';
|
|
14
|
+
export { Graph, NumberLineComponent, tickUtils, dataConverter, pointChooser };
|
|
15
|
+
export default class NumberLine extends HTMLElement {
|
|
16
|
+
constructor();
|
|
17
|
+
_scheduleMathRender: any;
|
|
18
|
+
_initMathObserver(): void;
|
|
19
|
+
_disconnectMathObserver(): void;
|
|
20
|
+
set model(m: any);
|
|
21
|
+
set session(s: any);
|
|
22
|
+
get session(): any;
|
|
23
|
+
connectedCallback(): void;
|
|
24
|
+
isComplete(): boolean;
|
|
25
|
+
dispatch(type: any): void;
|
|
26
|
+
dispatchSessionChanged(): void;
|
|
27
|
+
addElement(data: any): void;
|
|
28
|
+
moveElement(index: any, el: any, position: any): void;
|
|
29
|
+
deleteElements(indices: any): void;
|
|
30
|
+
undoElement(): void;
|
|
31
|
+
clearElements(): void;
|
|
32
|
+
_applyInitialElements(): void;
|
|
33
|
+
_render(): void;
|
|
34
|
+
disconnectedCallback(): void;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/delivery/index.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,YAAY,MAAM,sCAAsC,CAAC;AACrE,OAAO,KAAK,SAAS,MAAM,mCAAmC,CAAC;AAI/D,OAAO,KAAK,MAAM,8BAA8B,CAAC;AACjD,OAAO,mBAAmB,MAAM,wBAAwB,CAAC;AAQzD,OAAO,EAAE,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC;AAC9E,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,WAAW;;IAQjD,mBAAmB,EAAE,GAAG,CAsBtB;IAEF,iBAAiB;IAcjB,uBAAuB;IAOvB,IAAI,KAAK,CAAC,CAAC,KAAA,EAKV;IAED,IAAI,OAAO,CAAC,CAAC,KAAA,EAIZ;IAED,IAAI,OAAO,QAEV;IAED,iBAAiB;IAKjB,UAAU;IAIV,QAAQ,CAAC,IAAI,KAAA;IAWb,sBAAsB;IAItB,UAAU,CAAC,IAAI,KAAA;IAWf,WAAW,CAAC,KAAK,KAAA,EAAE,EAAE,KAAA,EAAE,QAAQ,KAAA;IAuB/B,cAAc,CAAC,OAAO,KAAA;IAQtB,WAAW;IAMX,aAAa;IAMb,qBAAqB;IAYrB,OAAO;IAgCP,oBAAoB;CAMrB"}
|