@pie-element/number-line 13.1.0-next.28 → 13.1.1-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/author/arrows.d.ts +28 -0
- package/dist/author/arrows.js +69 -0
- package/dist/author/card-bar.d.ts +20 -0
- package/dist/author/card-bar.js +41 -0
- package/dist/author/defaults.d.ts +178 -0
- package/dist/author/defaults.js +144 -0
- package/dist/author/domain.d.ts +15 -0
- package/dist/author/domain.js +54 -0
- package/dist/author/index.d.ts +23 -0
- package/dist/author/index.js +89 -0
- package/dist/author/main.d.ts +44 -0
- package/dist/author/main.js +485 -0
- package/dist/author/number-text-field.d.ts +13 -0
- package/dist/author/number-text-field.js +13 -0
- package/dist/author/point-config.d.ts +25 -0
- package/dist/author/point-config.js +69 -0
- package/dist/author/size.d.ts +24 -0
- package/dist/author/size.js +48 -0
- package/dist/author/ticks.d.ts +22 -0
- package/dist/author/ticks.js +115 -0
- package/dist/author/utils.d.ts +9 -0
- package/dist/author/utils.js +4 -0
- package/dist/controller/defaults.d.ts +58 -0
- package/dist/controller/defaults.js +50 -0
- package/dist/controller/index.d.ts +33 -0
- package/dist/controller/index.js +170 -0
- package/dist/controller/tickUtils.d.ts +20 -0
- package/dist/controller/tickUtils.js +254 -0
- package/dist/controller/utils.d.ts +9 -0
- package/dist/controller/utils.js +68 -0
- package/dist/delivery/data-converter.d.ts +64 -0
- package/dist/delivery/data-converter.js +70 -0
- package/dist/delivery/draggable/index.d.ts +33 -0
- package/dist/delivery/draggable/index.js +39 -0
- package/dist/delivery/index.d.ts +35 -0
- package/dist/delivery/index.js +109 -0
- package/dist/delivery/number-line/colors.d.ts +11 -0
- package/dist/delivery/number-line/colors.js +5 -0
- package/dist/delivery/number-line/feedback.d.ts +19 -0
- package/dist/delivery/number-line/feedback.js +57 -0
- package/dist/delivery/number-line/graph/arrow.d.ts +30 -0
- package/dist/delivery/number-line/graph/arrow.js +27 -0
- package/dist/delivery/number-line/graph/elements/base.d.ts +16 -0
- package/dist/delivery/number-line/graph/elements/base.js +11 -0
- package/dist/delivery/number-line/graph/elements/builder.d.ts +33 -0
- package/dist/delivery/number-line/graph/elements/builder.js +30 -0
- package/dist/delivery/number-line/graph/elements/line.d.ts +51 -0
- package/dist/delivery/number-line/graph/elements/line.js +189 -0
- package/dist/delivery/number-line/graph/elements/point.d.ts +43 -0
- package/dist/delivery/number-line/graph/elements/point.js +127 -0
- package/dist/delivery/number-line/graph/elements/ray.d.ts +43 -0
- package/dist/delivery/number-line/graph/elements/ray.js +130 -0
- package/dist/delivery/number-line/graph/index.d.ts +59 -0
- package/dist/delivery/number-line/graph/index.js +196 -0
- package/dist/delivery/number-line/graph/line.d.ts +46 -0
- package/dist/delivery/number-line/graph/line.js +27 -0
- package/dist/delivery/number-line/graph/stacks.d.ts +10 -0
- package/dist/delivery/number-line/graph/stacks.js +40 -0
- package/dist/delivery/number-line/graph/tick-utils.d.ts +73 -0
- package/dist/delivery/number-line/graph/tick-utils.js +297 -0
- package/dist/delivery/number-line/graph/ticks.d.ts +46 -0
- package/dist/delivery/number-line/graph/ticks.js +115 -0
- package/dist/delivery/number-line/index.d.ts +35 -0
- package/dist/delivery/number-line/index.js +218 -0
- package/dist/delivery/number-line/point-chooser/button.d.ts +31 -0
- package/dist/delivery/number-line/point-chooser/button.js +36 -0
- package/dist/delivery/number-line/point-chooser/img.d.ts +10 -0
- package/dist/delivery/number-line/point-chooser/img.js +4 -0
- package/dist/delivery/number-line/point-chooser/index.d.ts +37 -0
- package/dist/delivery/number-line/point-chooser/index.js +154 -0
- package/dist/delivery/number-line/point-chooser/styles.d.ts +192 -0
- package/dist/delivery/number-line/transitions/fade.d.ts +34 -0
- package/dist/delivery/number-line/transitions/fade.js +75 -0
- package/dist/delivery/number-line/transitions/index.d.ts +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +201 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludesWith.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignMergeValue.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIndexOf.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js +26 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNaN.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMerge.js +19 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMergeDeep.js +31 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePickBy.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js +22 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUniq.js +27 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createAssigner.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createFind.js +19 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +32 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +18 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_safeGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_strictIndexOf.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/find.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/findIndex.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqualWith.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isNumber.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isPlainObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/merge.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/negate.js +17 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/noop.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/omitBy.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/pickBy.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toFinite.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toInteger.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +19 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toPlainObject.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqWith.js +7 -0
- package/package.json +59 -21
- package/CHANGELOG.json +0 -1247
- package/CHANGELOG.md +0 -2423
- package/LICENSE.md +0 -5
- package/README.md +0 -28
- package/configure/CHANGELOG.json +0 -827
- package/configure/CHANGELOG.md +0 -2070
- package/configure/lib/arrows.js +0 -89
- package/configure/lib/arrows.js.map +0 -1
- package/configure/lib/card-bar.js +0 -57
- package/configure/lib/card-bar.js.map +0 -1
- package/configure/lib/defaults.js +0 -177
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/domain.js +0 -87
- package/configure/lib/domain.js.map +0 -1
- package/configure/lib/index.js +0 -176
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/main.js +0 -815
- package/configure/lib/main.js.map +0 -1
- package/configure/lib/number-text-field.js +0 -26
- package/configure/lib/number-text-field.js.map +0 -1
- package/configure/lib/point-config.js +0 -84
- package/configure/lib/point-config.js.map +0 -1
- package/configure/lib/size.js +0 -66
- package/configure/lib/size.js.map +0 -1
- package/configure/lib/ticks.js +0 -234
- package/configure/lib/ticks.js.map +0 -1
- package/configure/lib/utils.js +0 -12
- package/configure/lib/utils.js.map +0 -1
- package/configure/package.json +0 -20
- package/controller/CHANGELOG.json +0 -332
- package/controller/CHANGELOG.md +0 -1349
- package/controller/lib/defaults.js +0 -56
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -430
- package/controller/lib/index.js.map +0 -1
- package/controller/lib/tickUtils.js +0 -294
- package/controller/lib/tickUtils.js.map +0 -1
- package/controller/lib/utils.js +0 -168
- package/controller/lib/utils.js.map +0 -1
- package/controller/package.json +0 -20
- package/demo.gif +0 -0
- package/docs/config-schema.json +0 -2532
- package/docs/config-schema.json.md +0 -1844
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -39
- package/docs/demo/index.html +0 -1
- package/docs/pie-schema.json +0 -2461
- package/docs/pie-schema.json.md +0 -1228
- package/docs/schemas/config.json +0 -256
- package/lib/data-converter.js +0 -96
- package/lib/data-converter.js.map +0 -1
- package/lib/draggable/index.js +0 -114
- package/lib/draggable/index.js.map +0 -1
- package/lib/index.js +0 -196
- package/lib/index.js.map +0 -1
- package/lib/number-line/colors.js +0 -11
- package/lib/number-line/colors.js.map +0 -1
- package/lib/number-line/feedback.js +0 -92
- package/lib/number-line/feedback.js.map +0 -1
- package/lib/number-line/graph/arrow.js +0 -44
- package/lib/number-line/graph/arrow.js.map +0 -1
- package/lib/number-line/graph/elements/base.js +0 -20
- package/lib/number-line/graph/elements/base.js.map +0 -1
- package/lib/number-line/graph/elements/builder.js +0 -37
- package/lib/number-line/graph/elements/builder.js.map +0 -1
- package/lib/number-line/graph/elements/line.js +0 -259
- package/lib/number-line/graph/elements/line.js.map +0 -1
- package/lib/number-line/graph/elements/point.js +0 -204
- package/lib/number-line/graph/elements/point.js.map +0 -1
- package/lib/number-line/graph/elements/ray.js +0 -190
- package/lib/number-line/graph/elements/ray.js.map +0 -1
- package/lib/number-line/graph/index.js +0 -262
- package/lib/number-line/graph/index.js.map +0 -1
- package/lib/number-line/graph/line.js +0 -38
- package/lib/number-line/graph/line.js.map +0 -1
- package/lib/number-line/graph/stacks.js +0 -78
- package/lib/number-line/graph/stacks.js.map +0 -1
- package/lib/number-line/graph/tick-utils.js +0 -347
- package/lib/number-line/graph/tick-utils.js.map +0 -1
- package/lib/number-line/graph/ticks.js +0 -188
- package/lib/number-line/graph/ticks.js.map +0 -1
- package/lib/number-line/index.js +0 -384
- package/lib/number-line/index.js.map +0 -1
- package/lib/number-line/point-chooser/button.js +0 -49
- package/lib/number-line/point-chooser/button.js.map +0 -1
- package/lib/number-line/point-chooser/img.js +0 -8
- package/lib/number-line/point-chooser/img.js.map +0 -1
- package/lib/number-line/point-chooser/index.js +0 -197
- package/lib/number-line/point-chooser/index.js.map +0 -1
- package/lib/number-line/point-chooser/styles.js +0 -77
- package/lib/number-line/point-chooser/styles.js.map +0 -1
- package/lib/number-line/transitions/fade.js +0 -88
- package/lib/number-line/transitions/fade.js.map +0 -1
- package/lib/number-line/transitions/index.js +0 -14
- package/lib/number-line/transitions/index.js.map +0 -1
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js";
|
|
2
|
+
import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isNumber.js";
|
|
3
|
+
import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqWith.js";
|
|
4
|
+
import * as r from "mathjs";
|
|
5
|
+
//#region src/controller/tickUtils.ts
|
|
6
|
+
var i = [
|
|
7
|
+
.001,
|
|
8
|
+
.01,
|
|
9
|
+
.02,
|
|
10
|
+
.04,
|
|
11
|
+
.05,
|
|
12
|
+
.1,
|
|
13
|
+
.125,
|
|
14
|
+
.2,
|
|
15
|
+
.25,
|
|
16
|
+
.5
|
|
17
|
+
], a = [
|
|
18
|
+
"1/1000",
|
|
19
|
+
"1/100",
|
|
20
|
+
"1/64",
|
|
21
|
+
"1/50",
|
|
22
|
+
"1/32",
|
|
23
|
+
"1/25",
|
|
24
|
+
"1/20",
|
|
25
|
+
"1/16",
|
|
26
|
+
"1/15",
|
|
27
|
+
"1/12",
|
|
28
|
+
"1/10",
|
|
29
|
+
"1/9",
|
|
30
|
+
"1/8",
|
|
31
|
+
"1/7",
|
|
32
|
+
"1/6",
|
|
33
|
+
"1/5",
|
|
34
|
+
"1/4",
|
|
35
|
+
"1/3",
|
|
36
|
+
"1/2"
|
|
37
|
+
], o = {
|
|
38
|
+
1: [
|
|
39
|
+
1,
|
|
40
|
+
2,
|
|
41
|
+
3,
|
|
42
|
+
4,
|
|
43
|
+
5,
|
|
44
|
+
6,
|
|
45
|
+
7,
|
|
46
|
+
8,
|
|
47
|
+
9,
|
|
48
|
+
10
|
|
49
|
+
],
|
|
50
|
+
2: [
|
|
51
|
+
1,
|
|
52
|
+
2,
|
|
53
|
+
4,
|
|
54
|
+
6,
|
|
55
|
+
8,
|
|
56
|
+
10
|
|
57
|
+
],
|
|
58
|
+
3: [
|
|
59
|
+
1,
|
|
60
|
+
3,
|
|
61
|
+
6,
|
|
62
|
+
9
|
|
63
|
+
],
|
|
64
|
+
4: [
|
|
65
|
+
1,
|
|
66
|
+
2,
|
|
67
|
+
4,
|
|
68
|
+
8
|
|
69
|
+
],
|
|
70
|
+
5: [
|
|
71
|
+
1,
|
|
72
|
+
5,
|
|
73
|
+
10
|
|
74
|
+
],
|
|
75
|
+
6: [
|
|
76
|
+
1,
|
|
77
|
+
2,
|
|
78
|
+
3,
|
|
79
|
+
6
|
|
80
|
+
],
|
|
81
|
+
7: [1, 7],
|
|
82
|
+
8: [
|
|
83
|
+
1,
|
|
84
|
+
2,
|
|
85
|
+
4,
|
|
86
|
+
8
|
|
87
|
+
],
|
|
88
|
+
9: [
|
|
89
|
+
1,
|
|
90
|
+
3,
|
|
91
|
+
9
|
|
92
|
+
],
|
|
93
|
+
10: [
|
|
94
|
+
1,
|
|
95
|
+
2,
|
|
96
|
+
5,
|
|
97
|
+
10
|
|
98
|
+
],
|
|
99
|
+
12: [
|
|
100
|
+
1,
|
|
101
|
+
2,
|
|
102
|
+
3,
|
|
103
|
+
4,
|
|
104
|
+
6
|
|
105
|
+
],
|
|
106
|
+
15: [
|
|
107
|
+
1,
|
|
108
|
+
3,
|
|
109
|
+
5
|
|
110
|
+
],
|
|
111
|
+
16: [
|
|
112
|
+
1,
|
|
113
|
+
2,
|
|
114
|
+
4,
|
|
115
|
+
8
|
|
116
|
+
],
|
|
117
|
+
20: [
|
|
118
|
+
1,
|
|
119
|
+
2,
|
|
120
|
+
4,
|
|
121
|
+
5,
|
|
122
|
+
10
|
|
123
|
+
],
|
|
124
|
+
25: [1, 5],
|
|
125
|
+
32: [
|
|
126
|
+
1,
|
|
127
|
+
2,
|
|
128
|
+
4,
|
|
129
|
+
8
|
|
130
|
+
],
|
|
131
|
+
50: [
|
|
132
|
+
1,
|
|
133
|
+
2,
|
|
134
|
+
5,
|
|
135
|
+
10
|
|
136
|
+
],
|
|
137
|
+
64: [
|
|
138
|
+
1,
|
|
139
|
+
2,
|
|
140
|
+
4,
|
|
141
|
+
8
|
|
142
|
+
],
|
|
143
|
+
100: [
|
|
144
|
+
1,
|
|
145
|
+
2,
|
|
146
|
+
4,
|
|
147
|
+
5,
|
|
148
|
+
10
|
|
149
|
+
],
|
|
150
|
+
1e3: [
|
|
151
|
+
1,
|
|
152
|
+
2,
|
|
153
|
+
4,
|
|
154
|
+
5,
|
|
155
|
+
8,
|
|
156
|
+
10
|
|
157
|
+
]
|
|
158
|
+
}, s = (e, t, n) => {
|
|
159
|
+
let i = r.mod(r.abs(e), r.abs(n));
|
|
160
|
+
if (!r.equal(i, 0)) throw Error("start point must be divisible by interval");
|
|
161
|
+
if (r.equal(e, t)) return [];
|
|
162
|
+
let a = r.subtract(t, r.mod(t, r.abs(n))), o = r.larger(n, 0) ? "positive" : "negative";
|
|
163
|
+
if (o === "negative" && r.largerEq(t, e)) throw Error("start must be > than end when doing a negative decrement");
|
|
164
|
+
if (o === "positive" && r.smallerEq(t, e)) throw Error("start must be < end when doing increments");
|
|
165
|
+
let s = o === "positive" ? r.smallerEq : r.equal(a, t) ? r.largerEq : r.larger, c = [], l = e;
|
|
166
|
+
for (; s(l, a);) c.push(l), l = r.add(l, n);
|
|
167
|
+
return c;
|
|
168
|
+
}, c = (e, t) => `Can only do a positive or negative range, but got: start: ${e} and end:${t}`, l = (e, t, n) => {
|
|
169
|
+
e = r.fraction(e), t = r.fraction(t), n = r.fraction(n);
|
|
170
|
+
let i = r.abs(r.subtract(t, e));
|
|
171
|
+
if (r.larger(i, r.abs(t))) throw Error(c(e, t));
|
|
172
|
+
let a = {
|
|
173
|
+
start: r.abs(e),
|
|
174
|
+
end: r.abs(t),
|
|
175
|
+
interval: r.abs(n),
|
|
176
|
+
multiplier: r.smaller(n, 0) ? -1 : 1
|
|
177
|
+
}, o = r.mod(a.start, a.interval), l = s(r.larger(o, 0) ? r.add(r.subtract(a.start, o), a.interval) : a.start, a.end, a.interval), u = a.multiplier === -1 ? l.map((e) => r.multiply(e, -1)) : l;
|
|
178
|
+
return r.smaller(n, 0) && u.reverse(), u;
|
|
179
|
+
}, u = (e, t) => (e = r.fraction(e), t = r.fraction(t), r.smaller(e, t) ? e : t), d = (e, t) => (e = r.fraction(e), t = r.fraction(t), r.larger(e, t) ? e : t), f = (e, t, i) => {
|
|
180
|
+
e = r.fraction(e), t = r.fraction(t), i = r.fraction(i);
|
|
181
|
+
let a = r.larger(t, 0) ? l(d(0, e), t, i) : [];
|
|
182
|
+
return n((r.smaller(e, 0) ? l(u(0, t), e, r.multiply(i, -1)) : []).concat(a), r.equal);
|
|
183
|
+
}, p = (e, t, n) => {
|
|
184
|
+
n ||= 2;
|
|
185
|
+
let r = 10 ** -n / 2;
|
|
186
|
+
return Math.abs(e - t) < r;
|
|
187
|
+
}, m = (e, t, n) => r.smaller(_(e), _(t)) ? t : r.larger(_(e), _(n)) ? n : e, h = (e, t) => {
|
|
188
|
+
let n = e.max - e.min, i = r.number(r.multiply(10, r.divide(r.fraction(n), t)));
|
|
189
|
+
return {
|
|
190
|
+
min: i,
|
|
191
|
+
max: r.number(r.multiply(20, i))
|
|
192
|
+
};
|
|
193
|
+
}, g = (e, t) => {
|
|
194
|
+
let n = r.mod(e, t);
|
|
195
|
+
return r.equal(n, 0);
|
|
196
|
+
}, _ = (n) => {
|
|
197
|
+
if (e(n)) return r.fraction(n.n * n.s, n.d);
|
|
198
|
+
if (t(n)) return r.fraction(n);
|
|
199
|
+
}, v = (e, t, n, i) => {
|
|
200
|
+
let a = i ? i.limit !== !1 : !0, o = h(e, t), s = a ? m(_(n.minor), o.min, o.max) : _(n.minor), c = a ? m(_(n.major), s, r.multiply(s, 20)) : _(n.major);
|
|
201
|
+
if (!g(c, s)) {
|
|
202
|
+
let e = r.divide(c, s), t = e <= 2 ? 2 : Math.round(e);
|
|
203
|
+
return {
|
|
204
|
+
minor: s,
|
|
205
|
+
major: r.multiply(s, t)
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
return {
|
|
209
|
+
major: c,
|
|
210
|
+
minor: s
|
|
211
|
+
};
|
|
212
|
+
}, y = (e, t, n, i) => (n = v(e, t, n, i), f(e.min, e.max, n.minor).filter((t) => r.smallerEq(t, r.fraction(e.max))).map((e) => {
|
|
213
|
+
let t = "minor", i = r.mod(e, n.major);
|
|
214
|
+
return p(r.number(i), 0) && (t = "major"), {
|
|
215
|
+
x: e,
|
|
216
|
+
type: t
|
|
217
|
+
};
|
|
218
|
+
})), b = (e) => {
|
|
219
|
+
let t = {
|
|
220
|
+
fraction: [],
|
|
221
|
+
decimal: []
|
|
222
|
+
};
|
|
223
|
+
return i.forEach((n) => {
|
|
224
|
+
n >= e.min && n <= e.max && t.decimal.push(n);
|
|
225
|
+
}), a.forEach((n) => {
|
|
226
|
+
let i = r.number(r.fraction(n));
|
|
227
|
+
i >= e.min && i <= e.max && t.fraction.push(n);
|
|
228
|
+
}), t;
|
|
229
|
+
}, x = (e, t, n) => {
|
|
230
|
+
let i = {
|
|
231
|
+
decimal: [],
|
|
232
|
+
fraction: []
|
|
233
|
+
}, a = r.fraction(r.number(r.number(e))), s = a.n, c = a.d;
|
|
234
|
+
if (s >= 1 && c === 1) for (let a = 1; a <= 10; a++) {
|
|
235
|
+
let o = r.number(r.multiply(s, a));
|
|
236
|
+
S(t, n, {
|
|
237
|
+
minor: e,
|
|
238
|
+
major: o
|
|
239
|
+
}, { fraction: void 0 }).filter((e) => e.type === "major").length > 1 && (i.fraction.push(o.toString()), i.decimal.push(o));
|
|
240
|
+
}
|
|
241
|
+
else for (let a in o[c]) {
|
|
242
|
+
let l = r.multiply(r.fraction(s, c), o[c][a]);
|
|
243
|
+
S(t, n, {
|
|
244
|
+
minor: e,
|
|
245
|
+
major: r.number(l)
|
|
246
|
+
}, { fraction: void 0 }).filter((e) => e.type === "major").length > 1 && (l.d === 1 ? i.fraction.push(l.n.toString()) : i.fraction.push(l.n + "/" + l.d), i.decimal.push(r.number(l)));
|
|
247
|
+
}
|
|
248
|
+
return i;
|
|
249
|
+
}, S = (e, t, n, i) => y(e, t, n, i).map((e) => i.fraction ? e : {
|
|
250
|
+
...e,
|
|
251
|
+
x: r.number(e.x) || 0
|
|
252
|
+
});
|
|
253
|
+
//#endregion
|
|
254
|
+
export { x as generateMajorValuesForMinor, b as generateMinorValues, h as getMinorLimits };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/number-line/controller/src/utils.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
export declare const reloadTicksData: (graph: any) => any;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { generateMajorValuesForMinor as e, generateMinorValues as t, getMinorLimits as n } from "./tickUtils.js";
|
|
2
|
+
import * as r from "mathjs";
|
|
3
|
+
//#region src/controller/utils.ts
|
|
4
|
+
var i = (t) => {
|
|
5
|
+
let { domain: n, ticks: r, width: i } = t, a = e(r.minor, n, i);
|
|
6
|
+
if (a.decimal.indexOf(r.major) === -1) {
|
|
7
|
+
let e = 0;
|
|
8
|
+
e = r.tickIntervalType === "Integer" && a.decimal.length > 4 ? 4 : a.decimal.length - 1, r.major = a.decimal[e];
|
|
9
|
+
}
|
|
10
|
+
return t.fraction = r.tickIntervalType === "Fraction" && r.major < 1, {
|
|
11
|
+
...t,
|
|
12
|
+
ticks: r
|
|
13
|
+
};
|
|
14
|
+
}, a = (e) => {
|
|
15
|
+
let { domain: a, ticks: o = {}, width: s } = e;
|
|
16
|
+
o.tickIntervalType || (o.minor > .5 ? o.tickIntervalType = "Integer" : o.tickIntervalType = "Decimal");
|
|
17
|
+
let c = n(a, s);
|
|
18
|
+
if (c.min >= 1) o.tickIntervalType = "Integer", o.minor = o.minor < 1 ? r.number(r.ceil(c.min)) : o.minor >= r.number(r.ceil(c.min)) && o.minor <= r.number(r.floor(c.max)) ? o.minor : r.number(r.ceil(c.min)), o.integerTick = o.minor, o.fractionTick = "0", o.decimalTick = 0;
|
|
19
|
+
else if (c.min >= 0 && c.max < 1) {
|
|
20
|
+
o.tickIntervalType === "Integer" && (o.tickIntervalType = "Fraction");
|
|
21
|
+
let e = t(c), n = r.number(r.fraction(e.fraction[0])), i = r.number(r.fraction(e.fraction[e.fraction.length - 1]));
|
|
22
|
+
if (o.minor < n || o.minor > i) switch (o.tickIntervalType) {
|
|
23
|
+
case "Fraction":
|
|
24
|
+
o.minor = r.number(r.fraction(e.fraction[e.fraction.length - 1])), o.fractionTick = e.fraction[e.fraction.length - 1], o.decimalTick = e.decimal[0];
|
|
25
|
+
break;
|
|
26
|
+
case "Decimal":
|
|
27
|
+
case "Integer": o.minor = e.decimal[e.decimal.length - 1], o.decimalTick = e.decimal[e.decimal.length - 1], o.fractionTick = e.fraction[0];
|
|
28
|
+
}
|
|
29
|
+
else switch (o.tickIntervalType) {
|
|
30
|
+
case "Fraction":
|
|
31
|
+
let t = r.fraction(r.number(o.minor));
|
|
32
|
+
o.fractionTick = t.n + "/" + t.d, o.decimalTick = o.decimalTick ? o.decimalTick : e.decimal[0];
|
|
33
|
+
break;
|
|
34
|
+
case "Decimal":
|
|
35
|
+
case "Integer": o.decimalTick = o.minor, o.fractionTick = o.fractionTick ? o.fractionTick : e.fraction[0];
|
|
36
|
+
}
|
|
37
|
+
o.integerTick = 1;
|
|
38
|
+
} else if (c.min < 1 && c.max >= 1) {
|
|
39
|
+
let e = t(c);
|
|
40
|
+
if (o.minor >= c.min && o.minor <= c.max) switch (o.tickIntervalType) {
|
|
41
|
+
case "Integer":
|
|
42
|
+
o.integerTick = o.minor, o.decimalTick = c.min > .5 ? 0 : e.decimal[0], o.fractionTick = c.min > .5 ? "0" : e.fraction[0];
|
|
43
|
+
break;
|
|
44
|
+
case "Decimal":
|
|
45
|
+
o.integerTick = 1, o.decimalTick = o.minor, o.fractionTick = e.fraction[0];
|
|
46
|
+
break;
|
|
47
|
+
case "Fraction":
|
|
48
|
+
o.integerTick = 1, o.decimalTick = e.decimal[0];
|
|
49
|
+
let t = r.fraction(r.number(o.minor));
|
|
50
|
+
o.fractionTick = t.n + "/" + t.d;
|
|
51
|
+
}
|
|
52
|
+
else switch (c.min > .5 && (o.tickIntervalType = "Integer"), o.tickIntervalType) {
|
|
53
|
+
case "Integer":
|
|
54
|
+
o.minor = r.number(r.ceil(c.min)), o.integerTick = o.minor, o.decimalTick = c.min > .5 ? 0 : e.decimal[0], o.fractionTick = c.min > .5 ? "0" : e.fraction[0];
|
|
55
|
+
break;
|
|
56
|
+
case "Decimal":
|
|
57
|
+
o.minor = e.decimal[0], o.integerTick = 1, o.decimalTick = o.minor, o.fractionTick = e.fraction[0];
|
|
58
|
+
break;
|
|
59
|
+
case "Fraction": o.minor = r.number(r.fraction(e.fraction[0])), o.integerTick = 1, o.decimalTick = e.decimal[0], o.fractionTick = e.fraction[0];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return i({
|
|
63
|
+
...e,
|
|
64
|
+
ticks: o
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
export { a as reloadTicksData };
|
|
@@ -0,0 +1,64 @@
|
|
|
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;
|
|
@@ -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,33 @@
|
|
|
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;
|
|
@@ -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,35 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { data_converter_exports as e, lineIsSwitched as t, switchGraphLine as n, toGraphFormat as r, toSessionFormat as i } from "./data-converter.js";
|
|
2
|
+
import { point_chooser_exports as a } from "./number-line/point-chooser/index.js";
|
|
3
|
+
import o from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js";
|
|
4
|
+
import { tick_utils_exports as s } from "./number-line/graph/tick-utils.js";
|
|
5
|
+
import c from "./number-line/graph/index.js";
|
|
6
|
+
import l from "./number-line/index.js";
|
|
7
|
+
import u from "react";
|
|
8
|
+
import { createRoot as d } from "react-dom/client";
|
|
9
|
+
import { renderMath as f } from "@pie-element/shared-math-rendering-mathjax";
|
|
10
|
+
//#region src/delivery/index.ts
|
|
11
|
+
var p = class extends HTMLElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(), this._root = null, this._mathObserver = null, this._mathRenderPending = !1;
|
|
14
|
+
}
|
|
15
|
+
_scheduleMathRender = () => {
|
|
16
|
+
this._mathRenderPending || (this._mathRenderPending = !0, requestAnimationFrame(() => {
|
|
17
|
+
this._mathObserver && this._mathObserver.disconnect(), f(this), this._mathRenderPending = !1, setTimeout(() => {
|
|
18
|
+
this._mathObserver && this._mathObserver.observe(this, {
|
|
19
|
+
childList: !0,
|
|
20
|
+
subtree: !0,
|
|
21
|
+
characterData: !1
|
|
22
|
+
});
|
|
23
|
+
}, 50);
|
|
24
|
+
}));
|
|
25
|
+
};
|
|
26
|
+
_initMathObserver() {
|
|
27
|
+
this._mathObserver || (this._mathObserver = new MutationObserver(() => {
|
|
28
|
+
this._scheduleMathRender();
|
|
29
|
+
}), this._mathObserver.observe(this, {
|
|
30
|
+
childList: !0,
|
|
31
|
+
subtree: !0,
|
|
32
|
+
characterData: !1
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
_disconnectMathObserver() {
|
|
36
|
+
this._mathObserver &&= (this._mathObserver.disconnect(), null);
|
|
37
|
+
}
|
|
38
|
+
set model(e) {
|
|
39
|
+
this._model = e, this._applyInitialElements(), this._render(), this.dispatch("model-set");
|
|
40
|
+
}
|
|
41
|
+
set session(e) {
|
|
42
|
+
this._session = e, this._applyInitialElements(), this._render();
|
|
43
|
+
}
|
|
44
|
+
get session() {
|
|
45
|
+
return this._session;
|
|
46
|
+
}
|
|
47
|
+
connectedCallback() {
|
|
48
|
+
this._initMathObserver(), this._render();
|
|
49
|
+
}
|
|
50
|
+
isComplete() {
|
|
51
|
+
return this._session ? (this._session.answer || []).length > 0 : !1;
|
|
52
|
+
}
|
|
53
|
+
dispatch(e) {
|
|
54
|
+
this.dispatchEvent(new CustomEvent(e, {
|
|
55
|
+
bubbles: !0,
|
|
56
|
+
detail: { complete: this.isComplete() }
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
dispatchSessionChanged() {
|
|
60
|
+
this.dispatch("session-changed");
|
|
61
|
+
}
|
|
62
|
+
addElement(e) {
|
|
63
|
+
this._session && (this._session.answer = this._session.answer || [], this._session.answer.push(i(e)), this.dispatchSessionChanged(), this._render());
|
|
64
|
+
}
|
|
65
|
+
moveElement(e, r, a) {
|
|
66
|
+
if (!this._session.answer[e]) throw Error("cant find element at index: ", e);
|
|
67
|
+
if (r.type === "line" && a.left === a.right) {
|
|
68
|
+
this._render();
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
r.position = a;
|
|
72
|
+
let o = r.type === "line" && t(r) ? n(r) : r;
|
|
73
|
+
this._session.answer.splice(e, 1, i(o)), this.dispatchSessionChanged(), this._render();
|
|
74
|
+
}
|
|
75
|
+
deleteElements(e) {
|
|
76
|
+
this._session.answer = this._session.answer.filter((t, n) => !e.some((e) => e === n)), this.dispatchSessionChanged(), this._render();
|
|
77
|
+
}
|
|
78
|
+
undoElement() {
|
|
79
|
+
this._session.answer.pop(), this.dispatchSessionChanged(), this._render();
|
|
80
|
+
}
|
|
81
|
+
clearElements() {
|
|
82
|
+
this._session.answer = [], this.dispatchSessionChanged(), this._render();
|
|
83
|
+
}
|
|
84
|
+
_applyInitialElements() {
|
|
85
|
+
this._model && this._model.graph && this._model.graph.initialElements && this._session && (!this._session.answer || !this._session.answer.length) && (this._session.answer = o(this._model.graph.initialElements));
|
|
86
|
+
}
|
|
87
|
+
_render() {
|
|
88
|
+
if (this._model && this._session) {
|
|
89
|
+
this._session.answer || this._applyInitialElements();
|
|
90
|
+
let e = (this._session.answer || []).map(r), t = o(this._model);
|
|
91
|
+
t.correctResponse = t.correctResponse && t.correctResponse.map(r);
|
|
92
|
+
let n = {
|
|
93
|
+
model: t,
|
|
94
|
+
answer: e,
|
|
95
|
+
onAddElement: this.addElement.bind(this),
|
|
96
|
+
onMoveElement: this.moveElement.bind(this),
|
|
97
|
+
onDeleteElements: this.deleteElements.bind(this),
|
|
98
|
+
onUndoElement: this.undoElement.bind(this),
|
|
99
|
+
onClearElements: this.clearElements.bind(this)
|
|
100
|
+
}, i = u.createElement(l, n);
|
|
101
|
+
this._root ||= d(this), this._root.render(i), this._scheduleMathRender();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
disconnectedCallback() {
|
|
105
|
+
this._disconnectMathObserver(), this._root && this._root.unmount();
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
//#endregion
|
|
109
|
+
export { c as Graph, l as NumberLineComponent, e as dataConverter, p as default, a as pointChooser, s as tickUtils };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/number-line/src/number-line/colors.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 selected: any;
|
|
10
|
+
export declare const correct: any;
|
|
11
|
+
export declare const incorrect: any;
|