@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,130 @@
|
|
|
1
|
+
import e from "../../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isNumber.js";
|
|
2
|
+
import t from "./point.js";
|
|
3
|
+
import { basePropTypes as n } from "./base.js";
|
|
4
|
+
import { correct as r, incorrect as i, selected as a } from "../../colors.js";
|
|
5
|
+
import o from "../arrow.js";
|
|
6
|
+
import s from "react";
|
|
7
|
+
import { styled as c } from "@mui/material/styles";
|
|
8
|
+
import l from "prop-types";
|
|
9
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
10
|
+
import { color as f } from "@pie-lib/render-ui";
|
|
11
|
+
//#region src/delivery/number-line/graph/elements/ray.tsx
|
|
12
|
+
var p = c("g")(({ $selected: e, $correct: t }) => ({
|
|
13
|
+
"& line": {
|
|
14
|
+
cursor: "pointer",
|
|
15
|
+
strokeWidth: "5px",
|
|
16
|
+
stroke: f.primary()
|
|
17
|
+
},
|
|
18
|
+
"& line, & .arrow": { transition: "stroke 150ms linear, fill 150ms linear" },
|
|
19
|
+
...e && {
|
|
20
|
+
"& line": { stroke: a },
|
|
21
|
+
"& .arrow": {
|
|
22
|
+
fill: a,
|
|
23
|
+
strokeWidth: "1px",
|
|
24
|
+
stroke: a
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
...t === !0 && {
|
|
28
|
+
"& line": { stroke: r },
|
|
29
|
+
"& .arrow": {
|
|
30
|
+
fill: r,
|
|
31
|
+
strokeWidth: "1px",
|
|
32
|
+
stroke: r
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
...t === !1 && {
|
|
36
|
+
"& line": { stroke: i },
|
|
37
|
+
"& .arrow": {
|
|
38
|
+
fill: i,
|
|
39
|
+
strokeWidth: "1px",
|
|
40
|
+
stroke: i
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
})), m = c(o)(({ $correct: e, $selected: t }) => ({
|
|
44
|
+
fill: f.primary(),
|
|
45
|
+
...e === !0 && {
|
|
46
|
+
fill: r,
|
|
47
|
+
"--arrow-color": r
|
|
48
|
+
},
|
|
49
|
+
...e === !1 && {
|
|
50
|
+
fill: i,
|
|
51
|
+
"--arrow-color": i
|
|
52
|
+
},
|
|
53
|
+
...t && {
|
|
54
|
+
fill: a,
|
|
55
|
+
"--arrow-color": a
|
|
56
|
+
}
|
|
57
|
+
})), h = class extends s.Component {
|
|
58
|
+
static propTypes = {
|
|
59
|
+
...n(),
|
|
60
|
+
width: l.number.isRequired,
|
|
61
|
+
selected: l.bool,
|
|
62
|
+
disabled: l.bool,
|
|
63
|
+
empty: l.bool,
|
|
64
|
+
direction: l.oneOf(["positive", "negative"]),
|
|
65
|
+
y: l.number,
|
|
66
|
+
position: l.number.isRequired,
|
|
67
|
+
onMove: l.func.isRequired,
|
|
68
|
+
onToggleSelect: l.func.isRequired
|
|
69
|
+
};
|
|
70
|
+
static defaultProps = {
|
|
71
|
+
selected: !1,
|
|
72
|
+
direction: "positive",
|
|
73
|
+
y: 0,
|
|
74
|
+
disabled: !1
|
|
75
|
+
};
|
|
76
|
+
static contextTypes = {
|
|
77
|
+
xScale: l.func.isRequired,
|
|
78
|
+
snapValue: l.func.isRequired
|
|
79
|
+
};
|
|
80
|
+
constructor(e) {
|
|
81
|
+
super(e), this.state = { dragPosition: null };
|
|
82
|
+
}
|
|
83
|
+
drag(e) {
|
|
84
|
+
let { domain: t } = this.props;
|
|
85
|
+
e >= t.min && e <= t.max && this.setState({ dragPosition: e });
|
|
86
|
+
}
|
|
87
|
+
stopDrag() {
|
|
88
|
+
this.setState({ dragPosition: null });
|
|
89
|
+
}
|
|
90
|
+
render() {
|
|
91
|
+
let { interval: n, empty: r, position: i, direction: a, domain: o, y: s, selected: c, disabled: l, width: f, correct: h } = this.props, { xScale: g } = this.context, _ = this.drag.bind(this), v = this.stopDrag.bind(this), y = e(this.state.dragPosition) ? this.state.dragPosition : i, b = a === "positive", x = b ? y : o.min, S = b ? o.max : y, C = b ? g(x) : 8, w = b ? f - 8 : g(S), T = b ? f : 0, E = b ? "right" : "left";
|
|
92
|
+
return /* @__PURE__ */ d(p, {
|
|
93
|
+
$selected: c,
|
|
94
|
+
$correct: h,
|
|
95
|
+
transform: `translate(0, ${s})`,
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ u("line", {
|
|
98
|
+
onClick: l ? () => {} : this.props.onToggleSelect,
|
|
99
|
+
className: "line-handle",
|
|
100
|
+
x1: C,
|
|
101
|
+
x2: w
|
|
102
|
+
}),
|
|
103
|
+
/* @__PURE__ */ u(t, {
|
|
104
|
+
disabled: l,
|
|
105
|
+
correct: h,
|
|
106
|
+
selected: c,
|
|
107
|
+
empty: r,
|
|
108
|
+
interval: n,
|
|
109
|
+
bounds: {
|
|
110
|
+
left: o.min - i,
|
|
111
|
+
right: o.max - i
|
|
112
|
+
},
|
|
113
|
+
position: i,
|
|
114
|
+
onDrag: _,
|
|
115
|
+
onDragStop: v,
|
|
116
|
+
onMove: this.props.onMove,
|
|
117
|
+
onClick: this.props.onToggleSelect
|
|
118
|
+
}),
|
|
119
|
+
/* @__PURE__ */ u(m, {
|
|
120
|
+
x: T,
|
|
121
|
+
$correct: h,
|
|
122
|
+
$selected: c,
|
|
123
|
+
direction: E
|
|
124
|
+
})
|
|
125
|
+
]
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
//#endregion
|
|
130
|
+
export { h as default };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/number-line/src/number-line/graph/index.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export declare class NumberLineGraph extends React.Component {
|
|
12
|
+
static childContextTypes: {
|
|
13
|
+
xScale: PropTypes.Validator<(...args: any[]) => any>;
|
|
14
|
+
snapValue: PropTypes.Validator<(...args: any[]) => any>;
|
|
15
|
+
};
|
|
16
|
+
static propTypes: {
|
|
17
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
18
|
+
min: PropTypes.Validator<number>;
|
|
19
|
+
max: PropTypes.Validator<number>;
|
|
20
|
+
}>>>;
|
|
21
|
+
ticks: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
22
|
+
minor: PropTypes.Requireable<number>;
|
|
23
|
+
major: PropTypes.Requireable<number>;
|
|
24
|
+
}>>>;
|
|
25
|
+
fraction: PropTypes.Requireable<boolean>;
|
|
26
|
+
width: PropTypes.Validator<number>;
|
|
27
|
+
height: PropTypes.Validator<number>;
|
|
28
|
+
onToggleElement: PropTypes.Validator<(...args: any[]) => any>;
|
|
29
|
+
onMoveElement: PropTypes.Validator<(...args: any[]) => any>;
|
|
30
|
+
onAddElement: PropTypes.Validator<(...args: any[]) => any>;
|
|
31
|
+
debug: PropTypes.Requireable<boolean>;
|
|
32
|
+
elements: PropTypes.Requireable<any[]>;
|
|
33
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
34
|
+
onDeselectElements: PropTypes.Requireable<(...args: any[]) => any>;
|
|
35
|
+
arrows: PropTypes.Requireable<PropTypes.InferProps<{
|
|
36
|
+
left: PropTypes.Requireable<boolean>;
|
|
37
|
+
right: PropTypes.Requireable<boolean>;
|
|
38
|
+
}>>;
|
|
39
|
+
};
|
|
40
|
+
static defaultProps: {
|
|
41
|
+
debug: boolean;
|
|
42
|
+
};
|
|
43
|
+
constructor(props: any);
|
|
44
|
+
xScaleFn(): any;
|
|
45
|
+
snapValueFn(): (value: any) => any;
|
|
46
|
+
getChildContext(): {
|
|
47
|
+
xScale: any;
|
|
48
|
+
snapValue: (value: any) => any;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Note: we use d3 click + pointer to give us domain values directly.
|
|
52
|
+
* Saves us having to calculate them ourselves from a MouseEvent.
|
|
53
|
+
*/
|
|
54
|
+
onRectClick(event: any): void;
|
|
55
|
+
componentDidMount(): void;
|
|
56
|
+
addElement(x: any): void;
|
|
57
|
+
render(): React.JSX.Element;
|
|
58
|
+
}
|
|
59
|
+
export default NumberLineGraph;
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { snapTo as e } from "./tick-utils.js";
|
|
2
|
+
import t from "./elements/point.js";
|
|
3
|
+
import n from "./elements/line.js";
|
|
4
|
+
import r from "./arrow.js";
|
|
5
|
+
import i from "./elements/ray.js";
|
|
6
|
+
import a from "./line.js";
|
|
7
|
+
import o from "./ticks.js";
|
|
8
|
+
import s from "./stacks.js";
|
|
9
|
+
import c from "../transitions/fade.js";
|
|
10
|
+
import l, { createElement as u } from "react";
|
|
11
|
+
import d from "prop-types";
|
|
12
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
13
|
+
import { scaleLinear as m } from "d3-scale";
|
|
14
|
+
import { pointer as h, select as g } from "d3-selection";
|
|
15
|
+
import { color as _ } from "@pie-lib/render-ui";
|
|
16
|
+
import { DndContext as v } from "@dnd-kit/core";
|
|
17
|
+
import { TransitionGroup as y } from "react-transition-group";
|
|
18
|
+
//#region src/delivery/number-line/graph/index.tsx
|
|
19
|
+
var b = (e, t, n, r) => {
|
|
20
|
+
if (e === void 0 || t === void 0 || n === void 0) throw Error("missing min/max/width");
|
|
21
|
+
return m().domain([e, t]).range([r, n - r]);
|
|
22
|
+
}, x = class extends l.Component {
|
|
23
|
+
static childContextTypes = {
|
|
24
|
+
xScale: d.func.isRequired,
|
|
25
|
+
snapValue: d.func.isRequired
|
|
26
|
+
};
|
|
27
|
+
static propTypes = {
|
|
28
|
+
domain: d.shape({
|
|
29
|
+
min: d.number.isRequired,
|
|
30
|
+
max: d.number.isRequired
|
|
31
|
+
}).isRequired,
|
|
32
|
+
ticks: d.shape({
|
|
33
|
+
minor: d.number,
|
|
34
|
+
major: d.number
|
|
35
|
+
}).isRequired,
|
|
36
|
+
fraction: d.bool,
|
|
37
|
+
width: d.number.isRequired,
|
|
38
|
+
height: d.number.isRequired,
|
|
39
|
+
onToggleElement: d.func.isRequired,
|
|
40
|
+
onMoveElement: d.func.isRequired,
|
|
41
|
+
onAddElement: d.func.isRequired,
|
|
42
|
+
debug: d.bool,
|
|
43
|
+
elements: d.array,
|
|
44
|
+
disabled: d.bool,
|
|
45
|
+
onDeselectElements: d.func,
|
|
46
|
+
arrows: d.shape({
|
|
47
|
+
left: d.bool,
|
|
48
|
+
right: d.bool
|
|
49
|
+
})
|
|
50
|
+
};
|
|
51
|
+
static defaultProps = { debug: !1 };
|
|
52
|
+
constructor(e) {
|
|
53
|
+
super(e), this.state = {};
|
|
54
|
+
}
|
|
55
|
+
xScaleFn() {
|
|
56
|
+
let { domain: e, width: t } = this.props, { max: n, min: r } = e || {}, i = 20;
|
|
57
|
+
return n && (i = n.toString().length * 4 + 15), b(r, n, t, i);
|
|
58
|
+
}
|
|
59
|
+
snapValueFn() {
|
|
60
|
+
let { domain: t, ticks: n } = this.props;
|
|
61
|
+
return e.bind(null, t.min, t.max, n.minor);
|
|
62
|
+
}
|
|
63
|
+
getChildContext() {
|
|
64
|
+
return {
|
|
65
|
+
xScale: this.xScaleFn(),
|
|
66
|
+
snapValue: this.snapValueFn()
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
onRectClick(e) {
|
|
70
|
+
let { elements: t, disabled: n } = this.props;
|
|
71
|
+
if (!n) if (t.some((e) => e.selected)) this.props.onDeselectElements();
|
|
72
|
+
else {
|
|
73
|
+
let t = h(e, this.rect), n = this.xScaleFn().invert(t[0]);
|
|
74
|
+
this.addElement(n);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
componentDidMount() {
|
|
78
|
+
g(this.rect).on("click", this.onRectClick.bind(this));
|
|
79
|
+
}
|
|
80
|
+
addElement(e) {
|
|
81
|
+
let t = this.snapValueFn()(e);
|
|
82
|
+
this.props.onAddElement(t);
|
|
83
|
+
}
|
|
84
|
+
render() {
|
|
85
|
+
let { domain: e, width: l, ticks: d, height: m, onToggleElement: h, onMoveElement: g, disabled: b, fraction: x } = this.props, { arrows: S } = this.props;
|
|
86
|
+
S ||= {
|
|
87
|
+
left: !0,
|
|
88
|
+
right: !0
|
|
89
|
+
};
|
|
90
|
+
let { min: C, max: w } = e;
|
|
91
|
+
if (e.max <= e.min) return /* @__PURE__ */ p("div", { children: [
|
|
92
|
+
e.max,
|
|
93
|
+
" is less than or equal to ",
|
|
94
|
+
e.min
|
|
95
|
+
] });
|
|
96
|
+
{
|
|
97
|
+
let T = m - 30, E = new s(e), D = this.props.elements.map((e, r) => {
|
|
98
|
+
let a = E.add(e);
|
|
99
|
+
if (a === -1) throw Error("stack index is -1, cant add element");
|
|
100
|
+
let o = {
|
|
101
|
+
key: r,
|
|
102
|
+
y: T - a * 25,
|
|
103
|
+
selected: e.selected && !b,
|
|
104
|
+
interval: d.minor,
|
|
105
|
+
disabled: b,
|
|
106
|
+
correct: e.correct
|
|
107
|
+
}, s = h.bind(null, r, e), c = g.bind(null, r, e);
|
|
108
|
+
if (e.type === "line") {
|
|
109
|
+
let t = {
|
|
110
|
+
left: e.leftPoint === "empty",
|
|
111
|
+
right: e.rightPoint === "empty"
|
|
112
|
+
};
|
|
113
|
+
return /* @__PURE__ */ u(n, {
|
|
114
|
+
...o,
|
|
115
|
+
domain: {
|
|
116
|
+
min: C,
|
|
117
|
+
max: w
|
|
118
|
+
},
|
|
119
|
+
onMoveLine: c,
|
|
120
|
+
onToggleSelect: s,
|
|
121
|
+
position: e.position,
|
|
122
|
+
empty: t,
|
|
123
|
+
key: r
|
|
124
|
+
});
|
|
125
|
+
} else if (e.type === "point") {
|
|
126
|
+
let n = {
|
|
127
|
+
left: C - e.position,
|
|
128
|
+
right: w - e.position
|
|
129
|
+
};
|
|
130
|
+
return /* @__PURE__ */ u(t, {
|
|
131
|
+
...o,
|
|
132
|
+
empty: e.pointType === "empty",
|
|
133
|
+
position: e.position,
|
|
134
|
+
bounds: n,
|
|
135
|
+
onClick: s,
|
|
136
|
+
onMove: c,
|
|
137
|
+
key: r
|
|
138
|
+
});
|
|
139
|
+
} else if (e.type === "ray") return /* @__PURE__ */ u(i, {
|
|
140
|
+
...o,
|
|
141
|
+
domain: {
|
|
142
|
+
min: C,
|
|
143
|
+
max: w
|
|
144
|
+
},
|
|
145
|
+
direction: e.direction,
|
|
146
|
+
position: e.position,
|
|
147
|
+
onMove: c,
|
|
148
|
+
onToggleSelect: s,
|
|
149
|
+
width: l,
|
|
150
|
+
empty: e.pointType === "empty",
|
|
151
|
+
key: r
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
return /* @__PURE__ */ f(v, { children: /* @__PURE__ */ f("div", {
|
|
155
|
+
style: { display: "inline-block" },
|
|
156
|
+
children: /* @__PURE__ */ p("svg", {
|
|
157
|
+
width: l,
|
|
158
|
+
height: x ? m + 20 : m,
|
|
159
|
+
children: [
|
|
160
|
+
!1,
|
|
161
|
+
/* @__PURE__ */ f(a, {
|
|
162
|
+
y: T,
|
|
163
|
+
width: l
|
|
164
|
+
}),
|
|
165
|
+
S.left && /* @__PURE__ */ f(r, { y: T }),
|
|
166
|
+
S.right && /* @__PURE__ */ f(r, {
|
|
167
|
+
x: l,
|
|
168
|
+
y: T,
|
|
169
|
+
direction: "right"
|
|
170
|
+
}),
|
|
171
|
+
/* @__PURE__ */ f(o, {
|
|
172
|
+
y: T,
|
|
173
|
+
domain: e,
|
|
174
|
+
width: l,
|
|
175
|
+
ticks: d,
|
|
176
|
+
fraction: x
|
|
177
|
+
}),
|
|
178
|
+
/* @__PURE__ */ f("rect", {
|
|
179
|
+
ref: (e) => this.rect = e,
|
|
180
|
+
fill: _.primary(),
|
|
181
|
+
fillOpacity: "0.0",
|
|
182
|
+
width: l,
|
|
183
|
+
height: m
|
|
184
|
+
}),
|
|
185
|
+
/* @__PURE__ */ f(y, {
|
|
186
|
+
component: "g",
|
|
187
|
+
children: D.map((e, t) => /* @__PURE__ */ f(c, { children: e }, t))
|
|
188
|
+
})
|
|
189
|
+
]
|
|
190
|
+
})
|
|
191
|
+
}) });
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
//#endregion
|
|
196
|
+
export { x as default };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/number-line/src/number-line/graph/line.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export declare function Line({ y, width, classes }: {
|
|
12
|
+
y: any;
|
|
13
|
+
width: any;
|
|
14
|
+
classes: any;
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
export declare namespace Line {
|
|
17
|
+
var propTypes: {
|
|
18
|
+
y: PropTypes.Validator<number>;
|
|
19
|
+
width: PropTypes.Validator<number>;
|
|
20
|
+
classes: PropTypes.Validator<object>;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
declare const _default: React.ComponentType<Pick<Omit<{
|
|
24
|
+
y: any;
|
|
25
|
+
width: any;
|
|
26
|
+
classes: any;
|
|
27
|
+
}, "classes"> & {
|
|
28
|
+
classes?: Partial<{
|
|
29
|
+
root: string;
|
|
30
|
+
}> | undefined;
|
|
31
|
+
innerRef?: React.RefObject<any> | ((instance: any) => void);
|
|
32
|
+
}, "classes" | "innerRef"> & Pick<PropTypes.InferProps<{
|
|
33
|
+
y: PropTypes.Validator<number>;
|
|
34
|
+
width: PropTypes.Validator<number>;
|
|
35
|
+
classes: PropTypes.Validator<object>;
|
|
36
|
+
}>, "y" | "width"> & Pick<Omit<{
|
|
37
|
+
y: any;
|
|
38
|
+
width: any;
|
|
39
|
+
classes: any;
|
|
40
|
+
}, "classes"> & {
|
|
41
|
+
classes?: Partial<{
|
|
42
|
+
root: string;
|
|
43
|
+
}> | undefined;
|
|
44
|
+
innerRef?: React.RefObject<any> | ((instance: any) => void);
|
|
45
|
+
}, "innerRef">>;
|
|
46
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import e from "prop-types";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import { color as n } from "@pie-lib/render-ui";
|
|
5
|
+
import r from "react-jss";
|
|
6
|
+
//#region src/delivery/number-line/graph/line.tsx
|
|
7
|
+
var i = { root: {
|
|
8
|
+
strokeWidth: 2,
|
|
9
|
+
stroke: n.primary()
|
|
10
|
+
} };
|
|
11
|
+
function a({ y: e, width: n, classes: r }) {
|
|
12
|
+
return /* @__PURE__ */ t("line", {
|
|
13
|
+
x1: 0,
|
|
14
|
+
y1: e,
|
|
15
|
+
x2: n,
|
|
16
|
+
y2: e,
|
|
17
|
+
className: r.root
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
a.propTypes = {
|
|
21
|
+
y: e.number.isRequired,
|
|
22
|
+
width: e.number.isRequired,
|
|
23
|
+
classes: e.object.isRequired
|
|
24
|
+
};
|
|
25
|
+
var o = r(i)(a);
|
|
26
|
+
//#endregion
|
|
27
|
+
export { o as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/number-line/src/number-line/graph/stacks.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 default function Stacks(domain: any): void;
|
|
10
|
+
export declare function Stack(domain: any): void;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//#region src/delivery/number-line/graph/stacks.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
let n = [new t(e)];
|
|
4
|
+
this.add = function(r) {
|
|
5
|
+
let i = n.find((e) => e.add(r));
|
|
6
|
+
return n.indexOf(i) === -1 && (i = new t(e), n.push(i), i.add(r)), n.indexOf(i);
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function t(e) {
|
|
10
|
+
let t = [];
|
|
11
|
+
this.add = function(i) {
|
|
12
|
+
let a = r(i);
|
|
13
|
+
return a.left < e.min || a.right > e.max || t.some((e) => n(e, a)) ? !1 : (t.push(i), !0);
|
|
14
|
+
}, this.elements = function() {
|
|
15
|
+
return t;
|
|
16
|
+
};
|
|
17
|
+
let n = (e, t) => {
|
|
18
|
+
let n = r(e), i = t.left < n.left && t.right < n.left, a = t.left > n.right && t.right > n.right;
|
|
19
|
+
return !(i || a);
|
|
20
|
+
}, r = (t) => {
|
|
21
|
+
let { type: n, position: r } = t;
|
|
22
|
+
switch (n) {
|
|
23
|
+
case "point": return {
|
|
24
|
+
left: r,
|
|
25
|
+
right: r
|
|
26
|
+
};
|
|
27
|
+
case "line": return r;
|
|
28
|
+
case "ray": return t.direction === "positive" ? {
|
|
29
|
+
left: r,
|
|
30
|
+
right: e.max
|
|
31
|
+
} : {
|
|
32
|
+
left: e.min,
|
|
33
|
+
right: r
|
|
34
|
+
};
|
|
35
|
+
default: return null;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { e as default };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/number-line/src/number-line/graph/tick-utils.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
export declare const decimalTickValues: number[];
|
|
10
|
+
export declare const fractionTickValues: string[];
|
|
11
|
+
export declare const labelMultiplier: {
|
|
12
|
+
1: number[];
|
|
13
|
+
2: number[];
|
|
14
|
+
3: number[];
|
|
15
|
+
4: number[];
|
|
16
|
+
5: number[];
|
|
17
|
+
6: number[];
|
|
18
|
+
7: number[];
|
|
19
|
+
8: number[];
|
|
20
|
+
9: number[];
|
|
21
|
+
10: number[];
|
|
22
|
+
12: number[];
|
|
23
|
+
15: number[];
|
|
24
|
+
16: number[];
|
|
25
|
+
20: number[];
|
|
26
|
+
25: number[];
|
|
27
|
+
32: number[];
|
|
28
|
+
50: number[];
|
|
29
|
+
64: number[];
|
|
30
|
+
100: number[];
|
|
31
|
+
1000: number[];
|
|
32
|
+
};
|
|
33
|
+
export declare const fractionRange: (start: any, end: any, interval: any) => any[];
|
|
34
|
+
export declare const zbrErrorMessage: (start: any, end: any) => string;
|
|
35
|
+
export declare const zeroBasedRange: (start: any, end: any, interval: any) => any[];
|
|
36
|
+
/**
|
|
37
|
+
* the lodash range was causing too much variance in the rounding errors
|
|
38
|
+
* such that it was hard to round the numbers.
|
|
39
|
+
* This is a more simplistic version but makes rounding work.
|
|
40
|
+
*/
|
|
41
|
+
export declare const simpleRange: (start: any, end: any, interval: any) => any;
|
|
42
|
+
export declare const closeTo: (a: any, b: any, precision: any) => boolean;
|
|
43
|
+
export declare const getMinorLimits: (domain: any, width: any) => {
|
|
44
|
+
min: any;
|
|
45
|
+
max: any;
|
|
46
|
+
};
|
|
47
|
+
export declare const isMultiple: (multiple: any, src: any) => any;
|
|
48
|
+
/**
|
|
49
|
+
* Accepts a fraction object {n,d,s} or number.
|
|
50
|
+
* @param {*} v
|
|
51
|
+
* @return mathjs.fraction
|
|
52
|
+
*/
|
|
53
|
+
export declare const fraction: (v: any) => any;
|
|
54
|
+
export declare const normalizeTicks: (domain: any, width: any, ticks: any, opts: any) => {
|
|
55
|
+
minor: any;
|
|
56
|
+
major: any;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Build ticks as an array of mathjs Fractions
|
|
60
|
+
*/
|
|
61
|
+
export declare const buildTickDataAsFractions: (domain: any, width: any, ticks: any, opts: any) => any;
|
|
62
|
+
export declare const generateMinorValues: (minorLimits: any) => {
|
|
63
|
+
fraction: never[];
|
|
64
|
+
decimal: never[];
|
|
65
|
+
};
|
|
66
|
+
export declare const generateMajorValuesForMinor: (minor: any, domain: any, width: any) => {
|
|
67
|
+
decimal: never[];
|
|
68
|
+
fraction: never[];
|
|
69
|
+
};
|
|
70
|
+
export declare const buildTickData: (domain: any, width: any, ticks: any, opts: any) => any;
|
|
71
|
+
export declare const fractionSnapTo: (min: any, max: any, interval: any, value: any) => any;
|
|
72
|
+
export declare const snapTo: (min: any, max: any, interval: any, value: any) => any;
|
|
73
|
+
export declare const snapElements: (domain: any, ticks: any, elements: any) => any;
|