@pie-element/number-line 13.1.2-next.0 → 13.1.2-next.10
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/author/arrows.js +1 -1
- package/dist/author/domain.js +1 -1
- package/dist/author/index.d.ts +1 -0
- package/dist/author/index.js +23 -20
- package/dist/author/main.js +126 -126
- package/dist/author/ticks.js +1 -1
- package/dist/browser/author/index.js +23400 -20730
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js +167 -421
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +2 -2
- package/dist/browser/{delivery-Dh8QdqpO.js → delivery-RCwd5oLH.js} +4486 -4571
- package/dist/browser/delivery-RCwd5oLH.js.map +1 -0
- package/dist/browser/dist-clbS3pcd.js +18442 -0
- package/dist/browser/dist-clbS3pcd.js.map +1 -0
- package/dist/browser/impureFunctionsAny.generated-DOBSXSdK.js +9787 -0
- package/dist/browser/impureFunctionsAny.generated-DOBSXSdK.js.map +1 -0
- package/dist/controller/index.d.ts +15 -1
- package/dist/controller/index.js +60 -65
- package/dist/controller/tickUtils.d.ts +3 -2
- package/dist/controller/tickUtils.js +64 -66
- package/dist/delivery/data-converter.js +1 -1
- package/dist/delivery/index.js +10 -10
- package/dist/delivery/number-line/graph/arrow.js +1 -1
- package/dist/delivery/number-line/graph/elements/line.js +57 -58
- package/dist/delivery/number-line/graph/elements/point.js +5 -4
- package/dist/delivery/number-line/graph/elements/ray.js +55 -55
- package/dist/delivery/number-line/graph/index.d.ts +2 -2
- package/dist/delivery/number-line/graph/index.js +6 -6
- package/dist/delivery/number-line/graph/line.js +1 -1
- package/dist/delivery/number-line/graph/stacks.js +1 -1
- package/dist/delivery/number-line/graph/tick-utils.d.ts +16 -9
- package/dist/delivery/number-line/graph/tick-utils.js +74 -76
- package/dist/delivery/number-line/graph/ticks.js +15 -15
- package/dist/delivery/number-line/index.d.ts +1 -1
- package/dist/delivery/number-line/index.js +57 -60
- package/dist/delivery/number-line/point-chooser/index.js +1 -1
- package/dist/index.iife.js +57 -61
- package/dist/runtime-support.d.ts +12 -0
- package/dist/runtime-support.js +12 -0
- package/package.json +23 -20
- package/dist/browser/_baseSet-ycZx94p7.js +0 -8672
- package/dist/browser/_baseSet-ycZx94p7.js.map +0 -1
- package/dist/browser/delivery-Dh8QdqpO.js.map +0 -1
- package/dist/browser/uniqWith-CKN50xMI.js +0 -17886
- package/dist/browser/uniqWith-CKN50xMI.js.map +0 -1
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludes.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludesWith.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignMergeValue.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIndexOf.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js +0 -26
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNaN.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMerge.js +0 -19
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMergeDeep.js +0 -31
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePickBy.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js +0 -22
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUniq.js +0 -27
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createAssigner.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createFind.js +0 -19
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +0 -35
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +0 -35
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +0 -32
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +0 -18
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_safeGet.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_strictIndexOf.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/find.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/findIndex.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqualWith.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isNumber.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isPlainObject.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/merge.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/negate.js +0 -17
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/noop.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/omitBy.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/pickBy.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toFinite.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toInteger.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +0 -19
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toPlainObject.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqWith.js +0 -7
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { __exportAll as e } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import t from "
|
|
3
|
-
import n from "
|
|
4
|
-
import r from "../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqWith.js";
|
|
5
|
-
import * as i from "mathjs";
|
|
2
|
+
import * as t from "mathjs";
|
|
3
|
+
import { isNumber as n, isObject as r, uniqWith as i } from "@pie-element/shared-lodash";
|
|
6
4
|
//#region src/delivery/number-line/graph/tick-utils.ts
|
|
7
5
|
var a = /* @__PURE__ */ e({
|
|
8
6
|
buildTickData: () => w,
|
|
@@ -176,116 +174,116 @@ var a = /* @__PURE__ */ e({
|
|
|
176
174
|
8,
|
|
177
175
|
10
|
|
178
176
|
]
|
|
179
|
-
}, l = (e,
|
|
180
|
-
let
|
|
181
|
-
if (!
|
|
182
|
-
if (
|
|
183
|
-
let a =
|
|
184
|
-
if (o === "negative" &&
|
|
185
|
-
if (o === "positive" &&
|
|
177
|
+
}, l = (e, n, r) => {
|
|
178
|
+
let i = t.mod(t.abs(e), t.abs(r));
|
|
179
|
+
if (!t.equal(i, 0)) throw Error("start point must be divisible by interval");
|
|
180
|
+
if (t.equal(e, n)) return [];
|
|
181
|
+
let a = t.subtract(n, t.mod(n, t.abs(r))), o = t.larger(r, 0) ? "positive" : "negative";
|
|
182
|
+
if (o === "negative" && t.largerEq(n, e)) throw Error("start must be > than end when doing a negative decrement");
|
|
183
|
+
if (o === "positive" && t.smallerEq(n, e)) throw Error("start must be < end when doing increments");
|
|
186
184
|
let s;
|
|
187
|
-
s = o === "positive" ?
|
|
185
|
+
s = o === "positive" ? t.smallerEq : t.equal(a, n) ? t.largerEq : t.larger;
|
|
188
186
|
let c = [], l = e;
|
|
189
|
-
for (; s(l, a);) c.push(l), l =
|
|
187
|
+
for (; s(l, a);) c.push(l), l = t.add(l, r);
|
|
190
188
|
return c;
|
|
191
|
-
}, u = (e, t) => `Can only do a positive or negative range, but got: start: ${e} and end:${t}`, d = (e,
|
|
192
|
-
e =
|
|
193
|
-
let
|
|
194
|
-
if (
|
|
189
|
+
}, u = (e, t) => `Can only do a positive or negative range, but got: start: ${e} and end:${t}`, d = (e, n, r) => {
|
|
190
|
+
e = t.fraction(e), n = t.fraction(n), r = t.fraction(r);
|
|
191
|
+
let i = t.abs(t.subtract(n, e));
|
|
192
|
+
if (t.larger(i, t.abs(n))) throw Error(u(e, n));
|
|
195
193
|
let a = {
|
|
196
|
-
start:
|
|
197
|
-
end:
|
|
198
|
-
interval:
|
|
199
|
-
multiplier:
|
|
200
|
-
}, o =
|
|
201
|
-
return
|
|
202
|
-
}, f = (e,
|
|
203
|
-
e =
|
|
204
|
-
let a =
|
|
205
|
-
return
|
|
194
|
+
start: t.abs(e),
|
|
195
|
+
end: t.abs(n),
|
|
196
|
+
interval: t.abs(r),
|
|
197
|
+
multiplier: t.smaller(r, 0) ? -1 : 1
|
|
198
|
+
}, o = t.mod(a.start, a.interval), s = l(t.larger(o, 0) ? t.add(t.subtract(a.start, o), a.interval) : a.start, a.end, a.interval), c = a.multiplier === -1 ? s.map((e) => t.multiply(e, -1)) : s;
|
|
199
|
+
return t.smaller(r, 0) && c.reverse(), c;
|
|
200
|
+
}, f = (e, n) => (e = t.fraction(e), n = t.fraction(n), t.smaller(e, n) ? e : n), p = (e, n) => (e = t.fraction(e), n = t.fraction(n), t.larger(e, n) ? e : n), m = (e, n, r) => {
|
|
201
|
+
e = t.fraction(e), n = t.fraction(n), r = t.fraction(r);
|
|
202
|
+
let a = t.larger(n, 0) ? d(p(0, e), n, r) : [];
|
|
203
|
+
return i((t.smaller(e, 0) ? d(f(0, n), e, t.multiply(r, -1)) : []).concat(a), t.equal);
|
|
206
204
|
}, h = (e, t, n) => {
|
|
207
205
|
n ||= 2;
|
|
208
206
|
let r = 10 ** -n / 2;
|
|
209
207
|
return Math.abs(e - t) < r;
|
|
210
|
-
}, g = (e,
|
|
211
|
-
let
|
|
208
|
+
}, g = (e, n, r) => t.smaller(y(e), y(n)) ? n : t.larger(y(e), y(r)) ? r : e, _ = (e, n) => {
|
|
209
|
+
let r = e.max - e.min, i = t.number(t.multiply(10, t.divide(t.fraction(r), n)));
|
|
212
210
|
return {
|
|
213
|
-
min:
|
|
214
|
-
max:
|
|
211
|
+
min: i,
|
|
212
|
+
max: t.number(t.multiply(20, i))
|
|
215
213
|
};
|
|
216
|
-
}, v = (e,
|
|
217
|
-
let
|
|
218
|
-
return
|
|
214
|
+
}, v = (e, n) => {
|
|
215
|
+
let r = t.mod(e, n);
|
|
216
|
+
return t.equal(r, 0);
|
|
219
217
|
}, y = (e) => {
|
|
220
|
-
if (
|
|
221
|
-
if (n(e)) return
|
|
222
|
-
}, b = (e,
|
|
223
|
-
let a =
|
|
218
|
+
if (r(e)) return t.fraction(e.n * e.s, e.d);
|
|
219
|
+
if (n(e)) return t.fraction(e);
|
|
220
|
+
}, b = (e, n, r, i) => {
|
|
221
|
+
let a = !i || i.limit !== !1, o = _(e, n), s = a ? g(y(r.minor), o.min, o.max) : y(r.minor), c = a ? g(y(r.major), s, t.multiply(s, 20)) : y(r.major);
|
|
224
222
|
if (!v(c, s)) {
|
|
225
|
-
let e =
|
|
223
|
+
let e = t.divide(c, s), n = e <= 2 ? 2 : Math.round(e);
|
|
226
224
|
return {
|
|
227
225
|
minor: s,
|
|
228
|
-
major:
|
|
226
|
+
major: t.multiply(s, n)
|
|
229
227
|
};
|
|
230
228
|
}
|
|
231
229
|
return {
|
|
232
230
|
major: c,
|
|
233
231
|
minor: s
|
|
234
232
|
};
|
|
235
|
-
}, x = (e,
|
|
236
|
-
let
|
|
237
|
-
return h(
|
|
233
|
+
}, x = (e, n, r, i) => (r = b(e, n, r, i), m(e.min, e.max, r.minor).filter((n) => t.smallerEq(n, t.fraction(e.max))).map((e) => {
|
|
234
|
+
let n = "minor", i = t.mod(e, r.major);
|
|
235
|
+
return h(t.number(i), 0) && (n = "major"), {
|
|
238
236
|
x: e,
|
|
239
|
-
type:
|
|
237
|
+
type: n
|
|
240
238
|
};
|
|
241
239
|
})), S = (e) => {
|
|
242
|
-
let
|
|
240
|
+
let n = {
|
|
243
241
|
fraction: [],
|
|
244
242
|
decimal: []
|
|
245
243
|
};
|
|
246
|
-
return o.forEach((
|
|
247
|
-
|
|
248
|
-
}), s.forEach((
|
|
249
|
-
let
|
|
250
|
-
|
|
251
|
-
}),
|
|
252
|
-
}, C = (e,
|
|
253
|
-
let
|
|
244
|
+
return o.forEach((t) => {
|
|
245
|
+
t >= e.min && t <= e.max && n.decimal.push(t);
|
|
246
|
+
}), s.forEach((r) => {
|
|
247
|
+
let i = t.number(t.fraction(r));
|
|
248
|
+
i >= e.min && i <= e.max && n.fraction.push(r);
|
|
249
|
+
}), n;
|
|
250
|
+
}, C = (e, n, r) => {
|
|
251
|
+
let i = {
|
|
254
252
|
decimal: [],
|
|
255
253
|
fraction: []
|
|
256
|
-
}, a =
|
|
254
|
+
}, a = t.fraction(t.number(t.number(e))), o = Number(a.n), s = Number(a.d);
|
|
257
255
|
if (o >= 1 && s === 1) for (let a = 1; a <= 10; a++) {
|
|
258
|
-
let s =
|
|
259
|
-
w(
|
|
256
|
+
let s = t.number(t.multiply(o, a));
|
|
257
|
+
w(n, r, {
|
|
260
258
|
minor: e,
|
|
261
259
|
major: s
|
|
262
|
-
}, { fraction: void 0 }).filter((e) => e.type === "major").length > 1 && (
|
|
260
|
+
}, { fraction: void 0 }).filter((e) => e.type === "major").length > 1 && (i.fraction.push(s.toString()), i.decimal.push(s));
|
|
263
261
|
}
|
|
264
262
|
else for (let a in c[s]) {
|
|
265
|
-
let l =
|
|
266
|
-
w(
|
|
263
|
+
let l = t.multiply(t.fraction(o, s), c[s][a]);
|
|
264
|
+
w(n, r, {
|
|
267
265
|
minor: e,
|
|
268
|
-
major:
|
|
269
|
-
}, { fraction: void 0 }).filter((e) => e.type === "major").length > 1 && (l.d === 1 ?
|
|
266
|
+
major: t.number(l)
|
|
267
|
+
}, { fraction: void 0 }).filter((e) => e.type === "major").length > 1 && (Number(l.d) === 1 ? i.fraction.push(Number(l.n).toString()) : i.fraction.push(Number(l.n) + "/" + Number(l.d)), i.decimal.push(t.number(l)));
|
|
270
268
|
}
|
|
271
|
-
return
|
|
272
|
-
}, w = (e,
|
|
269
|
+
return i;
|
|
270
|
+
}, w = (e, n, r, i) => x(e, n, r, i).map((e) => i.fraction ? e : {
|
|
273
271
|
...e,
|
|
274
|
-
x:
|
|
275
|
-
}), T = (e,
|
|
276
|
-
|
|
277
|
-
let a =
|
|
278
|
-
if (
|
|
279
|
-
let e =
|
|
280
|
-
o =
|
|
272
|
+
x: t.number(e.x) || 0
|
|
273
|
+
}), T = (e, n, r, i) => {
|
|
274
|
+
i = p(f(i, n), e);
|
|
275
|
+
let a = i.mod(r), o, s = r.div(2);
|
|
276
|
+
if (t.largerEq(t.abs(a), s)) {
|
|
277
|
+
let e = r.sub(t.abs(a)), n = t.largerEq(i, 0) ? "add" : "sub";
|
|
278
|
+
o = i[n](e);
|
|
281
279
|
} else {
|
|
282
|
-
let e =
|
|
283
|
-
o =
|
|
280
|
+
let e = t.largerEq(i, 0) ? "sub" : "add";
|
|
281
|
+
o = i[e](t.abs(a));
|
|
284
282
|
}
|
|
285
283
|
return o;
|
|
286
|
-
}, E = (e,
|
|
287
|
-
let a = T(
|
|
288
|
-
return
|
|
284
|
+
}, E = (e, n, r, i) => {
|
|
285
|
+
let a = T(t.fraction(e), t.fraction(n), t.fraction(r), t.fraction(i));
|
|
286
|
+
return t.number(a);
|
|
289
287
|
}, D = (e, t, n) => n.map((n) => {
|
|
290
288
|
let r = Number.isFinite(n.size) ? E(0, n.size, t.minor, n.size) : void 0, i = E(e.min, e.max, t.minor, n.domainPosition), a = {
|
|
291
289
|
...n,
|
|
@@ -294,4 +292,4 @@ var a = /* @__PURE__ */ e({
|
|
|
294
292
|
return Number.isFinite(r) && (a.size = r), a;
|
|
295
293
|
});
|
|
296
294
|
//#endregion
|
|
297
|
-
export { w as buildTickData, C as generateMajorValuesForMinor, S as generateMinorValues, _ as getMinorLimits, D as snapElements, E as snapTo, a as tick_utils_exports };
|
|
295
|
+
export { w as buildTickData, x as buildTickDataAsFractions, h as closeTo, o as decimalTickValues, y as fraction, l as fractionRange, T as fractionSnapTo, s as fractionTickValues, C as generateMajorValuesForMinor, S as generateMinorValues, _ as getMinorLimits, v as isMultiple, c as labelMultiplier, b as normalizeTicks, m as simpleRange, D as snapElements, E as snapTo, a as tick_utils_exports, u as zbrErrorMessage, d as zeroBasedRange };
|
|
@@ -52,38 +52,38 @@ var s = n("text")({
|
|
|
52
52
|
this.resizeObserver && this.resizeObserver.disconnect();
|
|
53
53
|
}
|
|
54
54
|
render() {
|
|
55
|
-
let { x: e, y: n, type: r, xScale: o, fraction: l } = this.props, u = l
|
|
55
|
+
let { x: e, y: n, type: r, xScale: o, fraction: l } = this.props, u = l ? Number(e.n) : e.n, d = l ? Number(e.d) : e.d, f = l ? Number(e.s) : e.s, p = l && u !== d && u !== 0 && d !== 1, m = r === "major", h = m ? 20 : 10, { width: g = 0, height: _ = 0, x: v = 0, y = 0 } = this.state.textBox, b = l ? p ? /* @__PURE__ */ a(t.Fragment, { children: [/* @__PURE__ */ i("tspan", {
|
|
56
56
|
x: "0",
|
|
57
57
|
dy: "0.71em",
|
|
58
|
-
children:
|
|
58
|
+
children: u * f
|
|
59
59
|
}), /* @__PURE__ */ i("tspan", {
|
|
60
60
|
x: "0",
|
|
61
61
|
dy: "1.11em",
|
|
62
|
-
children:
|
|
63
|
-
})] }) :
|
|
62
|
+
children: d
|
|
63
|
+
})] }) : u * f : Number(e.toFixed(3));
|
|
64
64
|
return /* @__PURE__ */ a("g", {
|
|
65
65
|
opacity: "1",
|
|
66
66
|
transform: `translate(${o(e)}, ${n})`,
|
|
67
67
|
children: [
|
|
68
68
|
/* @__PURE__ */ i(c, {
|
|
69
|
-
y1:
|
|
70
|
-
y2:
|
|
69
|
+
y1: h / 2 * -1,
|
|
70
|
+
y2: h / 2,
|
|
71
71
|
x1: "0.5",
|
|
72
72
|
x2: "0.5"
|
|
73
73
|
}),
|
|
74
|
-
|
|
75
|
-
x1:
|
|
76
|
-
x2:
|
|
77
|
-
y1:
|
|
78
|
-
y2:
|
|
74
|
+
p && /* @__PURE__ */ i(c, {
|
|
75
|
+
x1: v,
|
|
76
|
+
x2: v + g,
|
|
77
|
+
y1: y + _ / 2,
|
|
78
|
+
y2: y + _ / 2
|
|
79
79
|
}),
|
|
80
|
-
|
|
80
|
+
m && /* @__PURE__ */ i(s, {
|
|
81
81
|
ref: (e) => this.text = e,
|
|
82
82
|
y: "14",
|
|
83
83
|
width: "10",
|
|
84
84
|
dy: "0.71em",
|
|
85
|
-
textAnchor:
|
|
86
|
-
children:
|
|
85
|
+
textAnchor: p && "middle",
|
|
86
|
+
children: b
|
|
87
87
|
})
|
|
88
88
|
]
|
|
89
89
|
});
|
|
@@ -112,4 +112,4 @@ var s = n("text")({
|
|
|
112
112
|
}
|
|
113
113
|
};
|
|
114
114
|
//#endregion
|
|
115
|
-
export { d as default };
|
|
115
|
+
export { u as Tick, l as TickValidator, d as Ticks, d as default };
|
|
@@ -24,7 +24,7 @@ export declare class NumberLine extends React.Component {
|
|
|
24
24
|
toggleElement(index: any): void;
|
|
25
25
|
elementTypeSelected(t: any): void;
|
|
26
26
|
addElement(x: any): void;
|
|
27
|
-
hasMaxNoOfPoints():
|
|
27
|
+
hasMaxNoOfPoints(): boolean;
|
|
28
28
|
UNSAFE_componentWillReceiveProps(nextProps: any): void;
|
|
29
29
|
deselectElements(): void;
|
|
30
30
|
getSize(type: any, min: any, max: any, defaultValue: any): any;
|
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
import e from "./point-chooser/index.js";
|
|
2
|
-
import t from "
|
|
3
|
-
import n from "
|
|
4
|
-
import r from "
|
|
5
|
-
import i from "
|
|
6
|
-
import a from "
|
|
7
|
-
import o from "
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import u from "prop-types";
|
|
12
|
-
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
13
|
-
import p from "@pie-lib/translator";
|
|
1
|
+
import { PointChooser as e } from "./point-chooser/index.js";
|
|
2
|
+
import { NumberLineGraph as t } from "./graph/index.js";
|
|
3
|
+
import n from "./feedback.js";
|
|
4
|
+
import { buildElementModel as r } from "./graph/elements/builder.js";
|
|
5
|
+
import i from "react";
|
|
6
|
+
import { styled as a } from "@mui/material/styles";
|
|
7
|
+
import o from "prop-types";
|
|
8
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
|
+
import l from "@pie-lib/translator";
|
|
10
|
+
import { cloneDeep as u, isArray as d, isEqual as f, isNumber as p } from "@pie-element/shared-lodash";
|
|
14
11
|
import * as m from "@pie-lib/render-ui";
|
|
15
|
-
import { Collapsible as h, PreviewPrompt as g, UiLayout as _, color as v, hasMedia as y, hasText as
|
|
16
|
-
import
|
|
12
|
+
import { Collapsible as h, PreviewPrompt as g, UiLayout as _, color as v, hasMedia as y, hasText as b } from "@pie-lib/render-ui";
|
|
13
|
+
import x from "@pie-lib/correct-answer-toggle";
|
|
17
14
|
//#region src/delivery/number-line/index.tsx
|
|
18
|
-
function
|
|
15
|
+
function S(e) {
|
|
19
16
|
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
20
17
|
}
|
|
21
|
-
function
|
|
22
|
-
return !e ||
|
|
18
|
+
function C(e, t) {
|
|
19
|
+
return !e || S(e) ? e : S(e.default) ? e.default : t && S(e[t]) ? e[t] : t && S(e[t]?.default) ? e[t].default : e;
|
|
23
20
|
}
|
|
24
|
-
var
|
|
21
|
+
var w = C(_, "UiLayout") || C(k.UiLayout, "UiLayout"), T = C(g, "PreviewPrompt") || C(k.PreviewPrompt, "PreviewPrompt"), E = C(h, "Collapsible") || C(k.Collapsible, "Collapsible"), D = m, O = D.default, k = O && typeof O == "object" ? O : D, { translator: A } = l, j = a(w)(({ $colorContrast: e }) => ({
|
|
25
22
|
color: v.text(),
|
|
26
23
|
backgroundColor: v.background(),
|
|
27
24
|
...e === "black_on_rose" && { backgroundColor: "mistyrose" },
|
|
@@ -34,7 +31,7 @@ var C = S(_, "UiLayout") || S(O.UiLayout, "UiLayout"), w = S(g, "PreviewPrompt")
|
|
|
34
31
|
"--point-stroke": "white",
|
|
35
32
|
"--point-fill": "black"
|
|
36
33
|
}
|
|
37
|
-
})),
|
|
34
|
+
})), M = a("div")(({ $colorContrast: e }) => ({
|
|
38
35
|
boxSizing: "unset",
|
|
39
36
|
color: v.text(),
|
|
40
37
|
backgroundColor: v.background(),
|
|
@@ -48,22 +45,22 @@ var C = S(_, "UiLayout") || S(O.UiLayout, "UiLayout"), w = S(g, "PreviewPrompt")
|
|
|
48
45
|
"--point-stroke": "white",
|
|
49
46
|
"--point-fill": "black"
|
|
50
47
|
}
|
|
51
|
-
})),
|
|
48
|
+
})), N = a("div")({
|
|
52
49
|
textAlign: "center",
|
|
53
50
|
pointerEvents: "none",
|
|
54
51
|
userSelect: "none"
|
|
55
|
-
}),
|
|
52
|
+
}), P = a("div")({ marginBottom: "16px" }), F = a("div")({
|
|
56
53
|
verticalAlign: "middle",
|
|
57
54
|
marginBottom: "16px"
|
|
58
|
-
}),
|
|
55
|
+
}), ee = a(E)(({ theme: e }) => ({ paddingBottom: e.spacing(2) })), I = class extends i.Component {
|
|
59
56
|
static propTypes = {
|
|
60
|
-
onMoveElement:
|
|
61
|
-
onDeleteElements:
|
|
62
|
-
onAddElement:
|
|
63
|
-
onUndoElement:
|
|
64
|
-
onClearElements:
|
|
65
|
-
model:
|
|
66
|
-
answer:
|
|
57
|
+
onMoveElement: o.func.isRequired,
|
|
58
|
+
onDeleteElements: o.func.isRequired,
|
|
59
|
+
onAddElement: o.func.isRequired,
|
|
60
|
+
onUndoElement: o.func.isRequired,
|
|
61
|
+
onClearElements: o.func.isRequired,
|
|
62
|
+
model: o.object.isRequired,
|
|
63
|
+
answer: o.array
|
|
67
64
|
};
|
|
68
65
|
constructor(t, n) {
|
|
69
66
|
super(t, n);
|
|
@@ -90,19 +87,19 @@ var C = S(_, "UiLayout") || S(O.UiLayout, "UiLayout"), w = S(g, "PreviewPrompt")
|
|
|
90
87
|
}
|
|
91
88
|
let { ticks: t, domain: n, availableTypes: i } = this.props.model.graph;
|
|
92
89
|
if (i && !i[this.state.elementType.toUpperCase()]) return;
|
|
93
|
-
let a =
|
|
90
|
+
let a = r(e, this.state.elementType, n, t.minor);
|
|
94
91
|
if (a) {
|
|
95
92
|
let { answers: e } = this.state;
|
|
96
|
-
e.some((e) =>
|
|
93
|
+
e.some((e) => f(e, a)) || (e.push(a), this.setState({ answers: e }), this.props.onAddElement(a));
|
|
97
94
|
}
|
|
98
95
|
}
|
|
99
96
|
hasMaxNoOfPoints() {
|
|
100
97
|
let { answer: e, model: { graph: { maxNumberOfPoints: t } } } = this.props;
|
|
101
|
-
return
|
|
98
|
+
return p(t) && t > 0 && (e || []).length >= t;
|
|
102
99
|
}
|
|
103
100
|
UNSAFE_componentWillReceiveProps(e) {
|
|
104
101
|
let { answer: t } = e;
|
|
105
|
-
|
|
102
|
+
f(this.state.answers, t) || this.setState({
|
|
106
103
|
showCorrectAnswer: !1,
|
|
107
104
|
answers: t
|
|
108
105
|
});
|
|
@@ -123,24 +120,24 @@ var C = S(_, "UiLayout") || S(O.UiLayout, "UiLayout"), w = S(g, "PreviewPrompt")
|
|
|
123
120
|
this.setState({ answers: [] }), e();
|
|
124
121
|
}
|
|
125
122
|
render() {
|
|
126
|
-
let { model: r, onDeleteElements: i, onMoveElement:
|
|
123
|
+
let { model: r, onDeleteElements: i, onMoveElement: a, minWidth: o = 400, maxWidth: l = 1600, maxHeight: f } = this.props, { showCorrectAnswer: p, answers: m, selectedElements: h, showMaxPointsWarning: g, elementType: _ } = this.state, { corrected: v = {
|
|
127
124
|
correct: [],
|
|
128
125
|
incorrect: []
|
|
129
|
-
}, disabled:
|
|
130
|
-
disabled:
|
|
126
|
+
}, disabled: S, extraCSSRules: C, graph: w, correctResponse: E, prompt: D, emptyAnswer: O, feedback: k, colorContrast: I, language: L, teacherInstructions: R } = r, z = this.addElement.bind(this), B = !S && h && h.length > 0, { ticks: V, domain: H, arrows: U, maxNumberOfPoints: W, height: G = 100, availableTypes: K, title: q, fraction: J } = w, Y = this.getSize("width", o, l, 600), X = R && (b(R) || y(R)), Z = {
|
|
127
|
+
disabled: S,
|
|
131
128
|
domain: H,
|
|
132
129
|
ticks: V,
|
|
133
130
|
width: Y,
|
|
134
|
-
height: (G >
|
|
131
|
+
height: (G > f ? f : G) || 100,
|
|
135
132
|
arrows: U,
|
|
136
133
|
fraction: J
|
|
137
|
-
}, Q = p &&
|
|
138
|
-
let
|
|
139
|
-
return
|
|
140
|
-
}), te = () => W == 1 ?
|
|
134
|
+
}, Q = p && E ? (E || []).map((e) => (e.correct = !0, e)) : (m || []).map((e, t) => {
|
|
135
|
+
let n = u(e);
|
|
136
|
+
return n.selected = h.indexOf(t) !== -1, v.correct.includes(t) ? n.correct = !0 : v.incorrect.includes(t) ? n.correct = !1 : n.correct = void 0, n;
|
|
137
|
+
}), te = () => W == 1 ? A.t("numberLine.addElementLimit_one", {
|
|
141
138
|
lng: L,
|
|
142
139
|
count: 1
|
|
143
|
-
}) :
|
|
140
|
+
}) : A.t("numberLine.addElementLimit_other", {
|
|
144
141
|
lng: L,
|
|
145
142
|
count: W
|
|
146
143
|
}), ne = () => {
|
|
@@ -153,33 +150,33 @@ var C = S(_, "UiLayout") || S(O.UiLayout, "UiLayout"), w = S(g, "PreviewPrompt")
|
|
|
153
150
|
}, ie = (e) => {
|
|
154
151
|
this.setState({ showCorrectAnswer: e });
|
|
155
152
|
}, $ = Z.width - 20;
|
|
156
|
-
return /* @__PURE__ */
|
|
157
|
-
extraCSSRules:
|
|
153
|
+
return /* @__PURE__ */ c(j, {
|
|
154
|
+
extraCSSRules: C,
|
|
158
155
|
$colorContrast: I,
|
|
159
156
|
children: [
|
|
160
|
-
X && /* @__PURE__ */
|
|
157
|
+
X && /* @__PURE__ */ s(ee, {
|
|
161
158
|
labels: {
|
|
162
159
|
hidden: "Show Teacher Instructions",
|
|
163
160
|
visible: "Hide Teacher Instructions"
|
|
164
161
|
},
|
|
165
|
-
children: /* @__PURE__ */
|
|
162
|
+
children: /* @__PURE__ */ s(T, { prompt: R })
|
|
166
163
|
}),
|
|
167
|
-
|
|
168
|
-
/* @__PURE__ */
|
|
164
|
+
D && /* @__PURE__ */ s(F, { children: /* @__PURE__ */ s(T, { prompt: D }) }),
|
|
165
|
+
/* @__PURE__ */ c(M, {
|
|
169
166
|
$colorContrast: I,
|
|
170
167
|
style: { width: Y },
|
|
171
168
|
children: [
|
|
172
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ s(P, {
|
|
173
170
|
style: { width: $ },
|
|
174
|
-
children: /* @__PURE__ */
|
|
175
|
-
show:
|
|
171
|
+
children: /* @__PURE__ */ s(x, {
|
|
172
|
+
show: d(E) && E.length && !O,
|
|
176
173
|
toggled: p,
|
|
177
174
|
onToggle: ie,
|
|
178
175
|
initialValue: !1,
|
|
179
176
|
language: L
|
|
180
177
|
})
|
|
181
178
|
}),
|
|
182
|
-
!
|
|
179
|
+
!S && /* @__PURE__ */ s(e, {
|
|
183
180
|
elementType: _,
|
|
184
181
|
showDeleteButton: B,
|
|
185
182
|
onDeleteClick: ne,
|
|
@@ -189,23 +186,23 @@ var C = S(_, "UiLayout") || S(O.UiLayout, "UiLayout"), w = S(g, "PreviewPrompt")
|
|
|
189
186
|
icons: re(),
|
|
190
187
|
language: L
|
|
191
188
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ s(t, {
|
|
193
190
|
...Z,
|
|
194
191
|
elements: Q,
|
|
195
192
|
onAddElement: z,
|
|
196
|
-
onMoveElement:
|
|
193
|
+
onMoveElement: a,
|
|
197
194
|
onToggleElement: this.toggleElement.bind(this),
|
|
198
195
|
onDeselectElements: this.deselectElements.bind(this),
|
|
199
196
|
debug: !1
|
|
200
197
|
}),
|
|
201
|
-
q && /* @__PURE__ */
|
|
202
|
-
g && /* @__PURE__ */
|
|
198
|
+
q && /* @__PURE__ */ s(N, { dangerouslySetInnerHTML: { __html: q } }),
|
|
199
|
+
g && /* @__PURE__ */ s(n, {
|
|
203
200
|
type: "info",
|
|
204
201
|
width: $,
|
|
205
202
|
message: te()
|
|
206
203
|
}),
|
|
207
|
-
|
|
208
|
-
...
|
|
204
|
+
k && !p && /* @__PURE__ */ s(n, {
|
|
205
|
+
...k,
|
|
209
206
|
width: $
|
|
210
207
|
})
|
|
211
208
|
]
|
|
@@ -215,4 +212,4 @@ var C = S(_, "UiLayout") || S(O.UiLayout, "UiLayout"), w = S(g, "PreviewPrompt")
|
|
|
215
212
|
}
|
|
216
213
|
};
|
|
217
214
|
//#endregion
|
|
218
|
-
export { I as default };
|
|
215
|
+
export { t as Graph, I as NumberLine, I as default };
|