@pie-element/number-line 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/author/arrows.d.ts +29 -0
- package/dist/author/arrows.d.ts.map +1 -0
- package/dist/author/arrows.js +69 -0
- package/dist/author/card-bar.d.ts +21 -0
- package/dist/author/card-bar.d.ts.map +1 -0
- package/dist/author/card-bar.js +41 -0
- package/dist/author/defaults.d.ts +179 -0
- package/dist/author/defaults.d.ts.map +1 -0
- package/dist/author/defaults.js +144 -0
- package/dist/author/domain.d.ts +16 -0
- package/dist/author/domain.d.ts.map +1 -0
- package/dist/author/domain.js +53 -0
- package/dist/author/index.d.ts +24 -0
- package/dist/author/index.d.ts.map +1 -0
- package/dist/author/index.js +89 -0
- package/dist/author/main.d.ts +45 -0
- package/dist/author/main.d.ts.map +1 -0
- package/dist/author/main.js +482 -0
- package/dist/author/number-text-field.d.ts +14 -0
- package/dist/author/number-text-field.d.ts.map +1 -0
- package/dist/author/number-text-field.js +11 -0
- package/dist/author/point-config.d.ts +26 -0
- package/dist/author/point-config.d.ts.map +1 -0
- package/dist/author/point-config.js +69 -0
- package/dist/author/size.d.ts +25 -0
- package/dist/author/size.d.ts.map +1 -0
- package/dist/author/size.js +48 -0
- package/dist/author/ticks.d.ts +23 -0
- package/dist/author/ticks.d.ts.map +1 -0
- package/dist/author/ticks.js +115 -0
- package/dist/author/utils.d.ts +10 -0
- package/dist/author/utils.d.ts.map +1 -0
- package/dist/author/utils.js +4 -0
- package/dist/controller/defaults.d.ts +59 -0
- package/dist/controller/defaults.d.ts.map +1 -0
- package/dist/controller/defaults.js +50 -0
- package/dist/controller/index.d.ts +34 -0
- package/dist/controller/index.d.ts.map +1 -0
- package/dist/controller/index.js +170 -0
- package/dist/controller/tickUtils.d.ts +21 -0
- package/dist/controller/tickUtils.d.ts.map +1 -0
- package/dist/controller/tickUtils.js +254 -0
- package/dist/controller/utils.d.ts +10 -0
- package/dist/controller/utils.d.ts.map +1 -0
- package/dist/controller/utils.js +68 -0
- package/dist/delivery/data-converter.d.ts +65 -0
- package/dist/delivery/data-converter.d.ts.map +1 -0
- package/dist/delivery/data-converter.js +70 -0
- package/dist/delivery/draggable/index.d.ts +34 -0
- package/dist/delivery/draggable/index.d.ts.map +1 -0
- package/dist/delivery/draggable/index.js +39 -0
- package/dist/delivery/index.d.ts +36 -0
- package/dist/delivery/index.d.ts.map +1 -0
- package/dist/delivery/index.js +109 -0
- package/dist/delivery/number-line/colors.d.ts +12 -0
- package/dist/delivery/number-line/colors.d.ts.map +1 -0
- package/dist/delivery/number-line/colors.js +5 -0
- package/dist/delivery/number-line/feedback.d.ts +20 -0
- package/dist/delivery/number-line/feedback.d.ts.map +1 -0
- package/dist/delivery/number-line/feedback.js +57 -0
- package/dist/delivery/number-line/graph/arrow.d.ts +31 -0
- package/dist/delivery/number-line/graph/arrow.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/arrow.js +27 -0
- package/dist/delivery/number-line/graph/elements/base.d.ts +17 -0
- package/dist/delivery/number-line/graph/elements/base.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/elements/base.js +11 -0
- package/dist/delivery/number-line/graph/elements/builder.d.ts +34 -0
- package/dist/delivery/number-line/graph/elements/builder.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/elements/builder.js +30 -0
- package/dist/delivery/number-line/graph/elements/line.d.ts +52 -0
- package/dist/delivery/number-line/graph/elements/line.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/elements/line.js +189 -0
- package/dist/delivery/number-line/graph/elements/point.d.ts +44 -0
- package/dist/delivery/number-line/graph/elements/point.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/elements/point.js +127 -0
- package/dist/delivery/number-line/graph/elements/ray.d.ts +44 -0
- package/dist/delivery/number-line/graph/elements/ray.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/elements/ray.js +130 -0
- package/dist/delivery/number-line/graph/index.d.ts +60 -0
- package/dist/delivery/number-line/graph/index.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/index.js +196 -0
- package/dist/delivery/number-line/graph/line.d.ts +47 -0
- package/dist/delivery/number-line/graph/line.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/line.js +27 -0
- package/dist/delivery/number-line/graph/stacks.d.ts +11 -0
- package/dist/delivery/number-line/graph/stacks.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/stacks.js +40 -0
- package/dist/delivery/number-line/graph/tick-utils.d.ts +74 -0
- package/dist/delivery/number-line/graph/tick-utils.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/tick-utils.js +297 -0
- package/dist/delivery/number-line/graph/ticks.d.ts +47 -0
- package/dist/delivery/number-line/graph/ticks.d.ts.map +1 -0
- package/dist/delivery/number-line/graph/ticks.js +115 -0
- package/dist/delivery/number-line/index.d.ts +36 -0
- package/dist/delivery/number-line/index.d.ts.map +1 -0
- package/dist/delivery/number-line/index.js +218 -0
- package/dist/delivery/number-line/point-chooser/button.d.ts +32 -0
- package/dist/delivery/number-line/point-chooser/button.d.ts.map +1 -0
- package/dist/delivery/number-line/point-chooser/button.js +36 -0
- package/dist/delivery/number-line/point-chooser/img.d.ts +11 -0
- package/dist/delivery/number-line/point-chooser/img.d.ts.map +1 -0
- package/dist/delivery/number-line/point-chooser/img.js +4 -0
- package/dist/delivery/number-line/point-chooser/index.d.ts +38 -0
- package/dist/delivery/number-line/point-chooser/index.d.ts.map +1 -0
- package/dist/delivery/number-line/point-chooser/index.js +154 -0
- package/dist/delivery/number-line/point-chooser/styles.d.ts +193 -0
- package/dist/delivery/number-line/point-chooser/styles.d.ts.map +1 -0
- package/dist/delivery/number-line/transitions/fade.d.ts +35 -0
- package/dist/delivery/number-line/transitions/fade.d.ts.map +1 -0
- package/dist/delivery/number-line/transitions/fade.js +75 -0
- package/dist/delivery/number-line/transitions/index.d.ts +11 -0
- package/dist/delivery/number-line/transitions/index.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.iife.d.ts +9 -0
- package/dist/index.iife.d.ts.map +1 -0
- package/dist/index.iife.js +201 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Hash.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_SetCache.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Stack.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_apply.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayEach.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayIncludes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayIncludesWith.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arraySome.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assignMergeValue.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssign.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseClone.js +57 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseCreate.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseFindIndex.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseFor.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGet.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseHasIn.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIndexOf.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqual.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMap.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMatch.js +26 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNaN.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIteratee.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeys.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMatches.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMerge.js +19 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMergeDeep.js +31 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_basePickBy.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseProperty.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_basePropertyDeep.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseRest.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseSet.js +22 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseToString.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTrim.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseUniq.js +27 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_castPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneBuffer.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneDataView.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneRegExp.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneSymbol.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbols.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbolsIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createAssigner.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createBaseFor.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createFind.js +19 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalArrays.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalByTag.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalObjects.js +32 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getMatchData.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbolsIn.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getTag.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hasPath.js +18 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneByTag.js +33 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIterateeCall.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isKey.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isStrictComparable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_memoizeCapped.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overRest.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_safeGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setCacheAdd.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setCacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToString.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_shortOut.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_strictIndexOf.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stringToPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toKey.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_trimmedEndIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/cloneDeep.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/constant.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/find.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/findIndex.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/get.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/hasIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/identity.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLikeObject.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEmpty.js +21 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEqual.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEqualWith.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isNumber.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isPlainObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/memoize.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/merge.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/negate.js +17 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/noop.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/omitBy.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/pickBy.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/property.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toFinite.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toInteger.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toNumber.js +19 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toPlainObject.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/uniqWith.js +7 -0
- package/package.json +77 -0
- package/src/author/arrows.tsx +87 -0
- package/src/author/card-bar.tsx +70 -0
- package/src/author/defaults.ts +127 -0
- package/src/author/domain.tsx +79 -0
- package/src/author/index.ts +199 -0
- package/src/author/main.tsx +777 -0
- package/src/author/number-text-field.tsx +28 -0
- package/src/author/point-config.tsx +93 -0
- package/src/author/size.tsx +74 -0
- package/src/author/ticks.tsx +272 -0
- package/src/author/utils.ts +16 -0
- package/src/controller/defaults.ts +40 -0
- package/src/controller/index.ts +437 -0
- package/src/controller/tickUtils.ts +324 -0
- package/src/controller/utils.ts +159 -0
- package/src/delivery/data-converter.ts +88 -0
- package/src/delivery/draggable/index.ts +116 -0
- package/src/delivery/index.ts +225 -0
- package/src/delivery/number-line/colors.ts +15 -0
- package/src/delivery/number-line/feedback.tsx +85 -0
- package/src/delivery/number-line/graph/arrow.tsx +43 -0
- package/src/delivery/number-line/graph/elements/base.ts +20 -0
- package/src/delivery/number-line/graph/elements/builder.ts +37 -0
- package/src/delivery/number-line/graph/elements/line.tsx +259 -0
- package/src/delivery/number-line/graph/elements/point.tsx +219 -0
- package/src/delivery/number-line/graph/elements/ray.tsx +168 -0
- package/src/delivery/number-line/graph/index.tsx +258 -0
- package/src/delivery/number-line/graph/line.tsx +33 -0
- package/src/delivery/number-line/graph/stacks.ts +82 -0
- package/src/delivery/number-line/graph/tick-utils.ts +369 -0
- package/src/delivery/number-line/graph/ticks.tsx +189 -0
- package/src/delivery/number-line/index.tsx +385 -0
- package/src/delivery/number-line/point-chooser/button.tsx +54 -0
- package/src/delivery/number-line/point-chooser/img.ts +11 -0
- package/src/delivery/number-line/point-chooser/index.tsx +200 -0
- package/src/delivery/number-line/point-chooser/styles.ts +86 -0
- package/src/delivery/number-line/transitions/fade.tsx +100 -0
- package/src/delivery/number-line/transitions/index.ts +12 -0
- package/src/index.iife.ts +16 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { point_chooser_exports as e } from "../delivery/number-line/point-chooser/index.js";
|
|
2
|
+
import t from "react";
|
|
3
|
+
import { styled as n } from "@mui/material/styles";
|
|
4
|
+
import r from "prop-types";
|
|
5
|
+
import i from "@mui/material/Button";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
//#region src/author/point-config.tsx
|
|
8
|
+
var { Point: s } = e, c = n("div")(({ theme: e }) => ({
|
|
9
|
+
paddingTop: e.spacing(2.5),
|
|
10
|
+
"& > :first-child": { marginRight: e.spacing(1) }
|
|
11
|
+
})), l = class e extends t.Component {
|
|
12
|
+
static propTypes = {
|
|
13
|
+
onSelectionChange: r.func,
|
|
14
|
+
selection: r.object,
|
|
15
|
+
availableTools: r.array,
|
|
16
|
+
hideButtons: r.bool
|
|
17
|
+
};
|
|
18
|
+
constructor(e) {
|
|
19
|
+
super(e);
|
|
20
|
+
}
|
|
21
|
+
toggle(e) {
|
|
22
|
+
let t = { ...this.props.selection };
|
|
23
|
+
t[e] = !t[e], this._propsUpdate(t);
|
|
24
|
+
}
|
|
25
|
+
toggleAll(t) {
|
|
26
|
+
let n = [...e.types].reduce((e, n) => (e[n] = t, e), {});
|
|
27
|
+
this._propsUpdate(n);
|
|
28
|
+
}
|
|
29
|
+
_propsUpdate(e) {
|
|
30
|
+
this.props.onSelectionChange(e);
|
|
31
|
+
}
|
|
32
|
+
active(e) {
|
|
33
|
+
return this.props.selection[e] === !0;
|
|
34
|
+
}
|
|
35
|
+
render() {
|
|
36
|
+
let { availableTools: e, hideButtons: t = !1 } = this.props;
|
|
37
|
+
return /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("div", { children: (e || []).map((e) => /* @__PURE__ */ a(s, {
|
|
38
|
+
iconKey: e.toLowerCase(),
|
|
39
|
+
onClick: this.toggle.bind(this, e),
|
|
40
|
+
active: this.active(e)
|
|
41
|
+
}, e.toLowerCase())) }), /* @__PURE__ */ o(c, {
|
|
42
|
+
hidden: t,
|
|
43
|
+
children: [/* @__PURE__ */ a(i, {
|
|
44
|
+
variant: "outlined",
|
|
45
|
+
size: "small",
|
|
46
|
+
onClick: this.toggleAll.bind(this, !0),
|
|
47
|
+
children: "Select All"
|
|
48
|
+
}), /* @__PURE__ */ a(i, {
|
|
49
|
+
variant: "outlined",
|
|
50
|
+
size: "small",
|
|
51
|
+
onClick: this.toggleAll.bind(this, !1),
|
|
52
|
+
children: "None"
|
|
53
|
+
})]
|
|
54
|
+
})] });
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
l.types = [
|
|
58
|
+
"PF",
|
|
59
|
+
"LFF",
|
|
60
|
+
"LEF",
|
|
61
|
+
"LFE",
|
|
62
|
+
"LEE",
|
|
63
|
+
"RFN",
|
|
64
|
+
"RFP",
|
|
65
|
+
"REN",
|
|
66
|
+
"REP"
|
|
67
|
+
];
|
|
68
|
+
//#endregion
|
|
69
|
+
export { l as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/number-line/configure/src/size.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
|
+
declare const Size: {
|
|
12
|
+
(props: any): React.JSX.Element;
|
|
13
|
+
propTypes: {
|
|
14
|
+
size: PropTypes.Requireable<PropTypes.InferProps<{
|
|
15
|
+
width: PropTypes.Requireable<number>;
|
|
16
|
+
height: PropTypes.Requireable<number>;
|
|
17
|
+
}>>;
|
|
18
|
+
min: PropTypes.Requireable<number>;
|
|
19
|
+
max: PropTypes.Requireable<number>;
|
|
20
|
+
step: PropTypes.Requireable<number>;
|
|
21
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export default Size;
|
|
25
|
+
//# sourceMappingURL=size.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"size.d.ts","sourceRoot":"","sources":["../../src/author/size.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AA0BnC,QAAA,MAAM,IAAI;;;;;;;;;;;;CAuBT,CAAC;AAaF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { styled as e } from "@mui/material/styles";
|
|
3
|
+
import t from "prop-types";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
import { NumberTextFieldCustom as i } from "@pie-lib/config-ui";
|
|
6
|
+
//#region src/author/size.tsx
|
|
7
|
+
var a = e("div")({
|
|
8
|
+
display: "flex",
|
|
9
|
+
alignItems: "center",
|
|
10
|
+
gap: "10px"
|
|
11
|
+
}), o = e("div")({
|
|
12
|
+
display: "flex",
|
|
13
|
+
flexFlow: "column"
|
|
14
|
+
}), s = e("label")({
|
|
15
|
+
fontSize: "small",
|
|
16
|
+
color: "gray"
|
|
17
|
+
}), c = e(i)({ "& input": { cursor: "default" } }), l = (e) => {
|
|
18
|
+
let { size: t = { width: 500 }, min: i = 150, max: l = 800, step: u = 20, onChange: d } = e;
|
|
19
|
+
return /* @__PURE__ */ r(a, { children: [/* @__PURE__ */ r(o, { children: [/* @__PURE__ */ n("label", { children: "Width (px)" }), /* @__PURE__ */ r(s, { children: [
|
|
20
|
+
"Min ",
|
|
21
|
+
i,
|
|
22
|
+
", Max ",
|
|
23
|
+
l
|
|
24
|
+
] })] }), /* @__PURE__ */ n(c, {
|
|
25
|
+
value: t.width,
|
|
26
|
+
min: i,
|
|
27
|
+
max: l,
|
|
28
|
+
step: u,
|
|
29
|
+
onlyIntegersAllowed: !0,
|
|
30
|
+
onChange: (t, n) => d({
|
|
31
|
+
...e.size,
|
|
32
|
+
width: n
|
|
33
|
+
}),
|
|
34
|
+
variant: "outlined"
|
|
35
|
+
})] });
|
|
36
|
+
};
|
|
37
|
+
l.propTypes = {
|
|
38
|
+
size: t.shape({
|
|
39
|
+
width: t.number,
|
|
40
|
+
height: t.number
|
|
41
|
+
}),
|
|
42
|
+
min: t.number,
|
|
43
|
+
max: t.number,
|
|
44
|
+
step: t.number,
|
|
45
|
+
onChange: t.func.isRequired
|
|
46
|
+
};
|
|
47
|
+
//#endregion
|
|
48
|
+
export { l as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/number-line/configure/src/ticks.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export declare const TickIntervals: string[];
|
|
12
|
+
export declare const Ticks: {
|
|
13
|
+
(props: any): React.JSX.Element;
|
|
14
|
+
propTypes: {
|
|
15
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
16
|
+
ticks: PropTypes.Requireable<object>;
|
|
17
|
+
minorLimits: PropTypes.Requireable<object>;
|
|
18
|
+
minorValues: PropTypes.Requireable<object>;
|
|
19
|
+
majorValues: PropTypes.Requireable<object>;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default Ticks;
|
|
23
|
+
//# sourceMappingURL=ticks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ticks.d.ts","sourceRoot":"","sources":["../../src/author/ticks.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAsDnC,eAAO,MAAM,aAAa,UAAqC,CAAC;AAEhE,eAAO,MAAM,KAAK;;;;;;;;;CAmMjB,CAAC;AASF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { styled as e } from "@mui/material/styles";
|
|
3
|
+
import t from "prop-types";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
import * as i from "mathjs";
|
|
6
|
+
import { color as a } from "@pie-lib/render-ui";
|
|
7
|
+
import { NumberTextFieldCustom as o } from "@pie-lib/config-ui";
|
|
8
|
+
import s from "@mui/material/FormControlLabel";
|
|
9
|
+
import c from "@mui/material/RadioGroup";
|
|
10
|
+
import l from "@mui/material/Radio";
|
|
11
|
+
//#region src/author/ticks.tsx
|
|
12
|
+
var u = e("div")({ display: "flex" }), d = e("div")({
|
|
13
|
+
display: "flex",
|
|
14
|
+
flexFlow: "column",
|
|
15
|
+
gap: "10px",
|
|
16
|
+
width: "65%"
|
|
17
|
+
}), f = e("div")({
|
|
18
|
+
display: "flex",
|
|
19
|
+
flexFlow: "column",
|
|
20
|
+
gap: "10px"
|
|
21
|
+
}), p = e("tr")({
|
|
22
|
+
display: "flex",
|
|
23
|
+
alignItems: "center",
|
|
24
|
+
paddingTop: "5px",
|
|
25
|
+
paddingBottom: "5px"
|
|
26
|
+
}), m = e("table")({
|
|
27
|
+
tableLayout: "fixed",
|
|
28
|
+
width: "100%"
|
|
29
|
+
}), h = e("td")({ width: "35%" }), g = e(l)({ color: `${a.tertiary()} !important` }), _ = e(o)({ "& input": {
|
|
30
|
+
maxWidth: "145px",
|
|
31
|
+
cursor: "default"
|
|
32
|
+
} }), v = [
|
|
33
|
+
"Integer",
|
|
34
|
+
"Fraction",
|
|
35
|
+
"Decimal"
|
|
36
|
+
], y = (e) => {
|
|
37
|
+
let { ticks: t, onChange: a, minorLimits: o, minorValues: l, majorValues: y } = e, b = i.fraction(i.number(t.major)), x = b.d === 1 ? b.n.toString() : b.n + "/" + b.d, S = (e, n) => {
|
|
38
|
+
v.includes(n) && (n === "Integer" ? t.minor = t.integerTick : n === "Decimal" ? t.minor = t.decimalTick : n === "Fraction" && (t.minor = i.number(i.fraction(t.fractionTick))), t.tickIntervalType = n, a({ ticks: t }));
|
|
39
|
+
}, C = (e, n) => {
|
|
40
|
+
t.tickIntervalType === "Integer" && (t.integerTick = n, t.minor = n, a({ ticks: t }));
|
|
41
|
+
}, w = (e, n) => {
|
|
42
|
+
t.tickIntervalType === "Fraction" && (t.fractionTick = n, t.minor = i.number(i.fraction(n)), a({ ticks: t }));
|
|
43
|
+
}, T = (e, n) => {
|
|
44
|
+
t.tickIntervalType === "Decimal" && (t.decimalTick = n, t.minor = n, a({ ticks: t }));
|
|
45
|
+
}, E = (e, n) => {
|
|
46
|
+
t.tickIntervalType === "Fraction" && (t.major = i.number(i.fraction(n)), a({ ticks: t }));
|
|
47
|
+
}, D = (e, n) => {
|
|
48
|
+
(t.tickIntervalType === "Decimal" || t.tickIntervalType === "Integer") && (t.major = n, a({ ticks: t }));
|
|
49
|
+
};
|
|
50
|
+
return /* @__PURE__ */ r(u, { children: [/* @__PURE__ */ r(d, { children: [/* @__PURE__ */ n("label", { children: "Tick Interval" }), /* @__PURE__ */ n(c, {
|
|
51
|
+
"aria-label": "tick-interval-type",
|
|
52
|
+
name: "tickIntervalType",
|
|
53
|
+
value: t.tickIntervalType,
|
|
54
|
+
onChange: S,
|
|
55
|
+
children: /* @__PURE__ */ n(m, { children: /* @__PURE__ */ r("tbody", { children: [
|
|
56
|
+
/* @__PURE__ */ r(p, { children: [/* @__PURE__ */ n(h, { children: /* @__PURE__ */ n(s, {
|
|
57
|
+
value: "Integer",
|
|
58
|
+
control: /* @__PURE__ */ n(g, { checked: t.tickIntervalType === "Integer" }),
|
|
59
|
+
label: "Integer",
|
|
60
|
+
disabled: o.max < 1
|
|
61
|
+
}) }), /* @__PURE__ */ n("td", { children: /* @__PURE__ */ n(_, {
|
|
62
|
+
value: t.integerTick,
|
|
63
|
+
min: i.number(i.ceil(o.min)),
|
|
64
|
+
max: i.number(i.floor(o.max)),
|
|
65
|
+
step: 1,
|
|
66
|
+
onlyIntegersAllowed: !0,
|
|
67
|
+
onChange: C,
|
|
68
|
+
variant: "outlined",
|
|
69
|
+
type: "number",
|
|
70
|
+
disabled: t.tickIntervalType !== "Integer" || o.max < 1
|
|
71
|
+
}, t.tickIntervalType !== "Integer" || o.max < 1 ? "integerDisabled" : "integerEnabled") })] }),
|
|
72
|
+
/* @__PURE__ */ r(p, { children: [/* @__PURE__ */ n(h, { children: /* @__PURE__ */ n(s, {
|
|
73
|
+
value: "Fraction",
|
|
74
|
+
control: /* @__PURE__ */ n(g, { checked: t.tickIntervalType === "Fraction" }),
|
|
75
|
+
label: "Unit Fraction",
|
|
76
|
+
disabled: l.fraction.length === 0
|
|
77
|
+
}) }), /* @__PURE__ */ n("td", { children: /* @__PURE__ */ n(_, {
|
|
78
|
+
value: t.fractionTick,
|
|
79
|
+
customValues: l.fraction,
|
|
80
|
+
onChange: w,
|
|
81
|
+
variant: "outlined",
|
|
82
|
+
type: "text",
|
|
83
|
+
disabled: t.tickIntervalType !== "Fraction" || l.fraction.length === 0
|
|
84
|
+
}, t.tickIntervalType !== "Fraction" || l.fraction.length === 0 ? "fractionDisabled" : "fractionEnabled") })] }),
|
|
85
|
+
/* @__PURE__ */ r(p, { children: [/* @__PURE__ */ n(h, { children: /* @__PURE__ */ n(s, {
|
|
86
|
+
value: "Decimal",
|
|
87
|
+
control: /* @__PURE__ */ n(g, { checked: t.tickIntervalType === "Decimal" }),
|
|
88
|
+
label: "Decimal",
|
|
89
|
+
disabled: l.decimal.length === 0
|
|
90
|
+
}) }), /* @__PURE__ */ n("td", { children: /* @__PURE__ */ n(_, {
|
|
91
|
+
value: t.decimalTick,
|
|
92
|
+
customValues: l.decimal,
|
|
93
|
+
onChange: T,
|
|
94
|
+
variant: "outlined",
|
|
95
|
+
type: "number",
|
|
96
|
+
disabled: t.tickIntervalType !== "Decimal" || l.decimal.length === 0
|
|
97
|
+
}, t.tickIntervalType !== "Decimal" || l.decimal.length === 0 ? "decimalDisabled" : "decimalEnabled") })] })
|
|
98
|
+
] }) })
|
|
99
|
+
})] }), /* @__PURE__ */ r(f, { children: [/* @__PURE__ */ n("label", { children: "Label Interval" }), /* @__PURE__ */ n(_, {
|
|
100
|
+
value: t.tickIntervalType === "Fraction" ? x : t.major,
|
|
101
|
+
variant: "outlined",
|
|
102
|
+
customValues: t.tickIntervalType === "Fraction" ? y.fraction : y.decimal,
|
|
103
|
+
type: t.tickIntervalType === "Fraction" ? "text" : "number",
|
|
104
|
+
onChange: t.tickIntervalType === "Fraction" ? E : D
|
|
105
|
+
})] })] });
|
|
106
|
+
};
|
|
107
|
+
y.propTypes = {
|
|
108
|
+
onChange: t.func,
|
|
109
|
+
ticks: t.object,
|
|
110
|
+
minorLimits: t.object,
|
|
111
|
+
minorValues: t.object,
|
|
112
|
+
majorValues: t.object
|
|
113
|
+
};
|
|
114
|
+
//#endregion
|
|
115
|
+
export { y as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/number-line/configure/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 generateValidationMessage: () => string;
|
|
10
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/author/utils.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,eAAO,MAAM,yBAAyB,cAKrC,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/number-line/controller/src/defaults.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
|
+
declare const _default: {
|
|
10
|
+
correctResponse: never[];
|
|
11
|
+
feedback: {
|
|
12
|
+
correct: {
|
|
13
|
+
default: string;
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
incorrect: {
|
|
17
|
+
default: string;
|
|
18
|
+
type: string;
|
|
19
|
+
};
|
|
20
|
+
partial: {
|
|
21
|
+
default: string;
|
|
22
|
+
type: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
graph: {
|
|
26
|
+
arrows: {
|
|
27
|
+
left: boolean;
|
|
28
|
+
right: boolean;
|
|
29
|
+
};
|
|
30
|
+
availableTypes: {
|
|
31
|
+
PF: boolean;
|
|
32
|
+
};
|
|
33
|
+
domain: {
|
|
34
|
+
min: number;
|
|
35
|
+
max: number;
|
|
36
|
+
};
|
|
37
|
+
exhibitOnly: boolean;
|
|
38
|
+
initialElements: never[];
|
|
39
|
+
initialType: string;
|
|
40
|
+
maxNumberOfPoints: number;
|
|
41
|
+
ticks: {
|
|
42
|
+
minor: number;
|
|
43
|
+
major: number;
|
|
44
|
+
tickIntervalType: string;
|
|
45
|
+
};
|
|
46
|
+
title: string;
|
|
47
|
+
width: number;
|
|
48
|
+
};
|
|
49
|
+
prompt: string;
|
|
50
|
+
promptEnabled: boolean;
|
|
51
|
+
rationale: string;
|
|
52
|
+
rationaleEnabled: boolean;
|
|
53
|
+
teacherInstructions: string;
|
|
54
|
+
teacherInstructionsEnabled: boolean;
|
|
55
|
+
toolbarEditorPosition: string;
|
|
56
|
+
widthEnabled: boolean;
|
|
57
|
+
};
|
|
58
|
+
export default _default;
|
|
59
|
+
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/controller/defaults.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,wBA6BE"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
//#region src/controller/defaults.ts
|
|
2
|
+
var e = {
|
|
3
|
+
correctResponse: [],
|
|
4
|
+
feedback: {
|
|
5
|
+
correct: {
|
|
6
|
+
default: "Correct",
|
|
7
|
+
type: "none"
|
|
8
|
+
},
|
|
9
|
+
incorrect: {
|
|
10
|
+
default: "Incorrect",
|
|
11
|
+
type: "none"
|
|
12
|
+
},
|
|
13
|
+
partial: {
|
|
14
|
+
default: "Nearly",
|
|
15
|
+
type: "none"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
graph: {
|
|
19
|
+
arrows: {
|
|
20
|
+
left: !0,
|
|
21
|
+
right: !0
|
|
22
|
+
},
|
|
23
|
+
availableTypes: { PF: !0 },
|
|
24
|
+
domain: {
|
|
25
|
+
min: -1,
|
|
26
|
+
max: 1
|
|
27
|
+
},
|
|
28
|
+
exhibitOnly: !1,
|
|
29
|
+
initialElements: [],
|
|
30
|
+
initialType: "PF",
|
|
31
|
+
maxNumberOfPoints: 1,
|
|
32
|
+
ticks: {
|
|
33
|
+
minor: .125,
|
|
34
|
+
major: .5,
|
|
35
|
+
tickIntervalType: "Decimal"
|
|
36
|
+
},
|
|
37
|
+
title: "",
|
|
38
|
+
width: 500
|
|
39
|
+
},
|
|
40
|
+
prompt: "",
|
|
41
|
+
promptEnabled: !0,
|
|
42
|
+
rationale: "",
|
|
43
|
+
rationaleEnabled: !0,
|
|
44
|
+
teacherInstructions: "",
|
|
45
|
+
teacherInstructionsEnabled: !0,
|
|
46
|
+
toolbarEditorPosition: "bottom",
|
|
47
|
+
widthEnabled: !0
|
|
48
|
+
};
|
|
49
|
+
//#endregion
|
|
50
|
+
export { e as default };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/number-line/controller/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
|
+
/**
|
|
10
|
+
* Generates detailed trace log for scoring evaluation
|
|
11
|
+
* @param {Object} model - the question model
|
|
12
|
+
* @param {Object} session - the student session
|
|
13
|
+
* @param {Object} env - the environment
|
|
14
|
+
* @returns {Array} traceLog - array of trace messages
|
|
15
|
+
*/
|
|
16
|
+
export declare const getLogTrace: (model: any, session: any, env: any) => string[];
|
|
17
|
+
/**
|
|
18
|
+
*/
|
|
19
|
+
export declare function outcome(model: any, session: any, env: any): Promise<unknown>;
|
|
20
|
+
export declare function getScore(question: any, session: any): Promise<unknown>;
|
|
21
|
+
export declare const CLOSE_TO_PRECISION = 3;
|
|
22
|
+
export declare const closeTo: (a: any, b: any, precision: any) => boolean;
|
|
23
|
+
export declare const getCorrected: (answer: any, correctResponse: any) => any;
|
|
24
|
+
export declare const getCorrectness: (corrected: any) => "unknown" | "unanswered" | "correct" | "partial" | "incorrect";
|
|
25
|
+
/**
|
|
26
|
+
* A sample of a normalize function see:
|
|
27
|
+
* https://github.com/pie-framework/pie-elements/issues/21
|
|
28
|
+
*/
|
|
29
|
+
export declare function normalize(question: any): any;
|
|
30
|
+
export declare function createDefaultModel(model?: {}): Promise<unknown>;
|
|
31
|
+
export declare function model(question: any, session: any, env: any): Promise<any>;
|
|
32
|
+
export declare const createCorrectResponseSession: (question: any, env: any) => Promise<unknown>;
|
|
33
|
+
export declare const validate: (model?: {}, config?: {}) => {};
|
|
34
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/controller/index.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAkCH;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,UAAK,EAAE,YAAO,EAAE,QAAG,aA8E9C,CAAC;AAGF;GACG;AACH,wBAAgB,OAAO,CAAC,KAAK,KAAA,EAAE,OAAO,KAAA,EAAE,GAAG,KAAA,oBA+B1C;AAED,wBAAgB,QAAQ,CAAC,QAAQ,KAAA,EAAE,OAAO,KAAA,oBA6BzC;AAED,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,eAAO,MAAM,OAAO,GAAI,MAAC,EAAE,MAAC,EAAE,cAAS,YAMtC,CAAC;AAUF,eAAO,MAAM,YAAY,GAAI,WAAM,EAAE,oBAAe,QAkCnD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,cAAS,mEAwBvC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,SAAS,CAAC,QAAQ,KAAA,OAIjC;AAED,wBAAgB,kBAAkB,CAAC,KAAK,KAAK,oBAa5C;AA4BD,wBAAsB,KAAK,CAAC,QAAQ,KAAA,EAAE,OAAO,KAAA,EAAE,GAAG,KAAA,gBAiDjD;AAED,eAAO,MAAM,4BAA4B,GAAI,aAAQ,EAAE,QAAG,qBAazD,CAAC;AAQF,eAAO,MAAM,QAAQ,GAAI,UAAU,EAAE,WAAW,OAqC/C,CAAC"}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/cloneDeep.js";
|
|
2
|
+
import t from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/find.js";
|
|
3
|
+
import n from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEmpty.js";
|
|
4
|
+
import r from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEqualWith.js";
|
|
5
|
+
import i from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/merge.js";
|
|
6
|
+
import a from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/omitBy.js";
|
|
7
|
+
import o from "./defaults.js";
|
|
8
|
+
import { reloadTicksData as s } from "./utils.js";
|
|
9
|
+
import * as c from "mathjs";
|
|
10
|
+
import { getFeedbackForCorrectness as l } from "@pie-element/shared-feedback";
|
|
11
|
+
import { partialScoring as u } from "@pie-element/shared-controller-utils";
|
|
12
|
+
//#region src/controller/index.ts
|
|
13
|
+
var d = (e) => ({ score: { scaled: e } }), f = (e, t) => {
|
|
14
|
+
let { correct: n } = e, r = t.find((e) => e.numberOfCorrect === n.length);
|
|
15
|
+
return r ? 1 * (r.scorePercentage / 100) : 0;
|
|
16
|
+
}, p = (e) => (t, n) => t + (e.some((e) => y(e)(n)) ? 1 : 0), m = (t, n, r) => {
|
|
17
|
+
let i = [], a = n?.answer || [], o = t?.correctResponse || [];
|
|
18
|
+
if (!a.length) return ["Student did not interact with the number line."];
|
|
19
|
+
let { correct: s, incorrect: c, notInAnswer: l, noCorrectResponse: d } = b(a, e(o));
|
|
20
|
+
if (d) return ["No correct response is defined for this item."];
|
|
21
|
+
let f = s.length, p = c.length, m = l.length;
|
|
22
|
+
f > 0 && i.push(`${f} object(s) correctly placed.`), p > 0 && i.push(`${p} incorrect object(s) placed.`), m > 0 && i.push(`${m} expected object(s) were not placed.`);
|
|
23
|
+
let h = [...a];
|
|
24
|
+
[...o], s.forEach((e) => {
|
|
25
|
+
let t = h[e], n = t?.type || "object";
|
|
26
|
+
i.push(`${n.charAt(0).toUpperCase() + n.slice(1)} at position ${t.domainPosition} is correct.`);
|
|
27
|
+
}), c.forEach((e) => {
|
|
28
|
+
let t = h[e], n = t?.type || "object";
|
|
29
|
+
i.push(`${n.charAt(0).toUpperCase() + n.slice(1)} at position ${t.domainPosition} does not match the expected response.`);
|
|
30
|
+
}), l.forEach((e) => {
|
|
31
|
+
let t = e?.type || "object";
|
|
32
|
+
i.push(`Expected ${t} at position ${e.domainPosition} was not placed by the student.`);
|
|
33
|
+
});
|
|
34
|
+
let g = u.enabled(t, r);
|
|
35
|
+
g ? (i.push("Score calculated using partial scoring."), i.push("Partial scoring is based on the number of correct objects, with deductions for extras.")) : i.push("Score calculated using all-or-nothing scoring.");
|
|
36
|
+
let _ = o.length || 1, v = a.length > _ ? a.length - _ : 0;
|
|
37
|
+
v > 0 && i.push(`${v} extra object(s) beyond the required amount were placed and deducted.`);
|
|
38
|
+
let y = Math.max(0, (f - v) / _), x = g ? y : y === 1 ? 1 : 0;
|
|
39
|
+
return i.push(`Final score: ${x}.`), i;
|
|
40
|
+
};
|
|
41
|
+
function h(e, t, r) {
|
|
42
|
+
return new Promise((i) => {
|
|
43
|
+
if (!t || n(t)) i({
|
|
44
|
+
score: 0,
|
|
45
|
+
empty: !0,
|
|
46
|
+
logTrace: ["Student did not interact with the number line."]
|
|
47
|
+
});
|
|
48
|
+
else {
|
|
49
|
+
let n = u.enabled(e, r), a = (t.answer || []).reduce(p(e.correctResponse), 0), o = e.correctResponse.length, s = 0;
|
|
50
|
+
(t.answer || []).length > o && (s = (t.answer || []).length - o), o === 0 && (o = 1);
|
|
51
|
+
let c = a < 0 ? 0 : (a - s) / o;
|
|
52
|
+
c < 0 && (c = 0), i({
|
|
53
|
+
score: n ? c : c === 1 ? 1 : 0,
|
|
54
|
+
logTrace: m(e, t, r)
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function g(t, r) {
|
|
60
|
+
return new Promise((i) => {
|
|
61
|
+
if (!r || n(r)) i({ score: { scaled: 0 } });
|
|
62
|
+
else {
|
|
63
|
+
r.answer = r.answer || [];
|
|
64
|
+
let a = b(r.answer, e(t.correctResponse)), o = x(a);
|
|
65
|
+
if (o === "correct") i(d(1));
|
|
66
|
+
else if (o === "incorrect") i(d(0));
|
|
67
|
+
else if (o === "partial") {
|
|
68
|
+
let { allowPartialScoring: e, partialScoring: r } = t, o = (r || []).filter((e) => !n(e));
|
|
69
|
+
e && o.length > 0 ? i(d(f(a, o))) : i(d(0));
|
|
70
|
+
} else i({ score: { scaled: -1 } });
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
var _ = 3, v = (e, t, n) => {
|
|
75
|
+
n ||= 5;
|
|
76
|
+
let r = 10 ** -n / 2;
|
|
77
|
+
return Math.abs(e - t) <= r;
|
|
78
|
+
}, y = (e) => (t) => r(e, t, (e, t) => {
|
|
79
|
+
if (typeof e == "number" && typeof t == "number") return v(e, t, 3);
|
|
80
|
+
}), b = (e, r) => n(r) && e.length > 0 ? {
|
|
81
|
+
correct: [],
|
|
82
|
+
incorrect: [],
|
|
83
|
+
notInAnswer: [],
|
|
84
|
+
noCorrectResponse: !0
|
|
85
|
+
} : e.reduce((e, n, r) => {
|
|
86
|
+
let { correct: i, incorrect: a, notInAnswer: o } = e, s = t(o, y(n));
|
|
87
|
+
return s ? (i.push(r), o.splice(o.indexOf(s), 1)) : a.push(r), {
|
|
88
|
+
correct: i,
|
|
89
|
+
incorrect: a,
|
|
90
|
+
notInAnswer: o
|
|
91
|
+
};
|
|
92
|
+
}, {
|
|
93
|
+
correct: [],
|
|
94
|
+
incorrect: [],
|
|
95
|
+
notInAnswer: r
|
|
96
|
+
}), x = (e) => {
|
|
97
|
+
let { incorrect: t, correct: n, notInAnswer: r, noCorrectResponse: i } = e;
|
|
98
|
+
return i ? "unknown" : t.length === 0 && n.length === 0 ? "unanswered" : t.length === 0 && r.length === 0 ? "correct" : t.length > 0 || r.length > 0 ? n.length > 0 ? "partial" : "incorrect" : "unknown";
|
|
99
|
+
};
|
|
100
|
+
function S(e) {
|
|
101
|
+
let t = i(o.feedback, e.feedback);
|
|
102
|
+
return {
|
|
103
|
+
...o,
|
|
104
|
+
...e,
|
|
105
|
+
feedback: t
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function C(e = {}) {
|
|
109
|
+
return new Promise((t) => {
|
|
110
|
+
t(a({
|
|
111
|
+
...e,
|
|
112
|
+
graph: {
|
|
113
|
+
...o.graph,
|
|
114
|
+
...e.graph
|
|
115
|
+
},
|
|
116
|
+
colorContrast: "black_on_white"
|
|
117
|
+
}, (e) => !e));
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
var w = (e) => {
|
|
121
|
+
let { graph: { domain: t, labelStep: n, ticks: r = {} } = {} } = e, { minor: i, major: a } = r;
|
|
122
|
+
if (t && (t.min = Number((t.min || 0).toFixed(2)), t.max = Number((t.max || 0).toFixed(2))), n && typeof n == "string" && n.match(/^[1-9][0-9]*\/[1-9][0-9]*$/g)) {
|
|
123
|
+
e.graph.fraction = !0, r.tickIntervalType = "Fraction";
|
|
124
|
+
let t = c.evaluate(n);
|
|
125
|
+
t !== a && (r.major = t, r.minor = t / (a / i));
|
|
126
|
+
}
|
|
127
|
+
return e;
|
|
128
|
+
};
|
|
129
|
+
async function T(t, n, r) {
|
|
130
|
+
if (!t) throw Error("question is null");
|
|
131
|
+
let i = await S(t), o = s(w(i).graph);
|
|
132
|
+
if (o) {
|
|
133
|
+
let t = r.mode === "evaluate", s = e(i.correctResponse), c = t && b(n && n.answer || [], s), u = t && x(c), { exhibitOnly: d } = o, f = r.mode !== "gather" || d === !0, p = null;
|
|
134
|
+
r.role === "instructor" && (r.mode === "view" || t) && (p = i.teacherInstructions);
|
|
135
|
+
let m = t ? await l(u, i.feedback) : void 0;
|
|
136
|
+
return a({
|
|
137
|
+
prompt: i.prompt,
|
|
138
|
+
teacherInstructions: p,
|
|
139
|
+
graph: o,
|
|
140
|
+
disabled: f,
|
|
141
|
+
corrected: c,
|
|
142
|
+
correctResponse: t && ["unanswered", "correct"].indexOf(u) === -1 && i.correctResponse,
|
|
143
|
+
feedback: m && {
|
|
144
|
+
type: u,
|
|
145
|
+
message: m
|
|
146
|
+
},
|
|
147
|
+
colorContrast: r.accessibility && r.accessibility.colorContrast || "black_on_white",
|
|
148
|
+
language: i.language,
|
|
149
|
+
extraCSSRules: i.extraCSSRules
|
|
150
|
+
}, (e) => !e);
|
|
151
|
+
} else throw Error("graph is undefined");
|
|
152
|
+
}
|
|
153
|
+
var E = (e, t) => new Promise((n) => {
|
|
154
|
+
if (t.mode !== "evaluate" && t.role === "instructor") {
|
|
155
|
+
let { correctResponse: t } = e;
|
|
156
|
+
n({
|
|
157
|
+
answer: t,
|
|
158
|
+
id: "1"
|
|
159
|
+
});
|
|
160
|
+
} else n(null);
|
|
161
|
+
}), D = (e) => (e || "").replace(/(<(?!img|iframe|source)([^>]+)>)/gi, ""), O = (e = {}, t = {}) => {
|
|
162
|
+
let { graph: n, correctResponse: r } = e || {}, { maxMaxElements: i = 20, numberLineDimensions: { min: a = 200, max: o = 800 } = {} } = t || {}, { width: s, domain: c, maxNumberOfPoints: l } = n || {}, { min: u, max: d } = c || {}, f = {};
|
|
163
|
+
["teacherInstructions", "prompt"].forEach((n) => {
|
|
164
|
+
t[n]?.required && !D(e[n]) && (f[n] = "This field is required.");
|
|
165
|
+
}), (s < a || s > o) && (f.widthError = `Width should be a value between ${a} and ${o}.`);
|
|
166
|
+
let p = -1e5, m = 1e5;
|
|
167
|
+
return (u < p || u > m || d < p || d > m) && (f.domainError = `Min and max values must both be in the range [${p}, ${m}].`), u >= d && (f.maxError = "Max value must be greater than min value."), (l < 1 || l > i) && (f.pointsError = `Max number of elements should be between 1 and ${i}.`), r && r.length === 0 && (f.correctResponseError = "The correct answer should include at least one number line object."), f;
|
|
168
|
+
};
|
|
169
|
+
//#endregion
|
|
170
|
+
export { _ as CLOSE_TO_PRECISION, v as closeTo, E as createCorrectResponseSession, C as createDefaultModel, b as getCorrected, x as getCorrectness, m as getLogTrace, g as getScore, T as model, S as normalize, h as outcome, O as validate };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/number-line/controller/src/tickUtils.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 getMinorLimits: (domain: any, width: any) => {
|
|
10
|
+
min: any;
|
|
11
|
+
max: any;
|
|
12
|
+
};
|
|
13
|
+
export declare const generateMinorValues: (minorLimits: any) => {
|
|
14
|
+
fraction: never[];
|
|
15
|
+
decimal: never[];
|
|
16
|
+
};
|
|
17
|
+
export declare const generateMajorValuesForMinor: (minor: any, domain: any, width: any) => {
|
|
18
|
+
decimal: never[];
|
|
19
|
+
fraction: never[];
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=tickUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tickUtils.d.ts","sourceRoot":"","sources":["../../src/controller/tickUtils.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AA+KH,eAAO,MAAM,cAAc,GAAI,WAAM,EAAE,UAAK;;;CAQ3C,CAAC;AAoEF,eAAO,MAAM,mBAAmB,GAAI,gBAAW;;;CAc9C,CAAC;AASF,eAAO,MAAM,2BAA2B,GAAI,UAAK,EAAE,WAAM,EAAE,UAAK;;;CAiC/D,CAAC"}
|