@pie-element/placement-ordering 14.1.1 → 14.1.2-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configure.js +2 -0
- package/controller.js +1 -0
- package/dist/author/choice-editor.d.ts +39 -0
- package/dist/author/choice-editor.js +157 -0
- package/dist/author/choice-tile.d.ts +40 -0
- package/dist/author/choice-tile.js +132 -0
- package/dist/author/defaults.d.ts +213 -0
- package/dist/author/defaults.js +159 -0
- package/dist/author/design.d.ts +21 -0
- package/dist/author/design.js +274 -0
- package/dist/author/help.d.ts +11 -0
- package/dist/author/index.d.ts +45 -0
- package/dist/author/index.js +85 -0
- package/dist/author/utils.d.ts +15 -0
- package/dist/author/utils.js +62 -0
- package/dist/browser/author/index.js +40986 -0
- package/dist/browser/author/index.js.map +1 -0
- package/dist/browser/browser-CvJkn_Ec.js +1019 -0
- package/dist/browser/browser-CvJkn_Ec.js.map +1 -0
- package/dist/browser/controller/index.js +319 -0
- package/dist/browser/controller/index.js.map +1 -0
- package/dist/browser/delivery/index.js +1032 -0
- package/dist/browser/delivery/index.js.map +1 -0
- package/dist/browser/dist-BTHiIs74.js +1610 -0
- package/dist/browser/dist-BTHiIs74.js.map +1 -0
- package/dist/browser/drag-provider-DaPxkh4j.js +10833 -0
- package/dist/browser/drag-provider-DaPxkh4j.js.map +1 -0
- package/dist/browser/last-D7N4Qfx4.js +9 -0
- package/dist/browser/last-D7N4Qfx4.js.map +1 -0
- package/dist/browser/placement-ordering.css +2 -0
- package/dist/controller/defaults.d.ts +31 -0
- package/dist/controller/defaults.js +25 -0
- package/dist/controller/index.d.ts +29 -0
- package/dist/controller/index.js +128 -0
- package/dist/controller/scoring.d.ts +27 -0
- package/dist/controller/scoring.js +32 -0
- package/dist/delivery/index.d.ts +26 -0
- package/dist/delivery/index.js +70 -0
- package/dist/delivery/main.d.ts +19 -0
- package/dist/delivery/main.js +22 -0
- package/dist/delivery/ordering.d.ts +18 -0
- package/dist/delivery/ordering.js +96 -0
- package/dist/delivery/placement-ordering.d.ts +28 -0
- package/dist/delivery/placement-ordering.js +215 -0
- package/dist/delivery/tile.d.ts +28 -0
- package/dist/delivery/tile.js +165 -0
- package/dist/delivery/tiler.d.ts +42 -0
- package/dist/delivery/tiler.js +89 -0
- package/dist/delivery/utils.d.ts +9 -0
- package/dist/delivery/utils.js +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +152 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEvery.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludesWith.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayReduce.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayShuffle.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseDifference.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEach.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEvery.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFlatten.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseForOwn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIndexOf.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js +26 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNaN.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMap.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRandom.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseReduce.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseShuffle.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUniq.js +27 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseValues.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createAssigner.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseEach.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +32 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +18 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isFlattenable.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shuffleSelf.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_strictIndexOf.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/assign.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/compact.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/difference.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/differenceWith.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/every.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/last.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/noop.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/shuffle.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniq.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqueId.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/values.js +8 -0
- package/package.json +81 -17
- package/CHANGELOG.json +0 -1312
- package/CHANGELOG.md +0 -2432
- package/LICENSE.md +0 -5
- package/README.md +0 -57
- package/configure/CHANGELOG.json +0 -952
- package/configure/CHANGELOG.md +0 -2127
- package/configure/lib/choice-editor.js +0 -252
- package/configure/lib/choice-editor.js.map +0 -1
- package/configure/lib/choice-tile.js +0 -205
- package/configure/lib/choice-tile.js.map +0 -1
- package/configure/lib/defaults.js +0 -211
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/design.js +0 -427
- package/configure/lib/design.js.map +0 -1
- package/configure/lib/help.js +0 -14
- package/configure/lib/help.js.map +0 -1
- package/configure/lib/index.js +0 -155
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/utils.js +0 -108
- package/configure/lib/utils.js.map +0 -1
- package/configure/package.json +0 -26
- package/controller/CHANGELOG.json +0 -517
- package/controller/CHANGELOG.md +0 -1518
- package/controller/lib/defaults.js +0 -29
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -285
- package/controller/lib/index.js.map +0 -1
- package/controller/lib/scoring.js +0 -109
- package/controller/lib/scoring.js.map +0 -1
- package/controller/package.json +0 -15
- package/docs/config-schema.json +0 -2964
- package/docs/config-schema.json.md +0 -2190
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -50
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -7
- package/docs/pie-schema.json +0 -1613
- package/docs/pie-schema.json.md +0 -973
- package/icon.png +0 -0
- package/lib/index.js +0 -122
- package/lib/index.js.map +0 -1
- package/lib/main.js +0 -32
- package/lib/main.js.map +0 -1
- package/lib/ordering.js +0 -165
- package/lib/ordering.js.map +0 -1
- package/lib/placement-ordering.js +0 -419
- package/lib/placement-ordering.js.map +0 -1
- package/lib/tile.js +0 -259
- package/lib/tile.js.map +0 -1
- package/lib/tiler.js +0 -165
- package/lib/tiler.js.map +0 -1
- package/lib/utils.js +0 -18
- package/lib/utils.js.map +0 -1
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/difference.js";
|
|
2
|
+
import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js";
|
|
3
|
+
import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqueId.js";
|
|
4
|
+
import { HorizontalTiler as r, VerticalTiler as i } from "./tiler.js";
|
|
5
|
+
import { buildState as a, reducer as o } from "./ordering.js";
|
|
6
|
+
import { haveSameValuesButDifferentOrder as s } from "./utils.js";
|
|
7
|
+
import c from "react";
|
|
8
|
+
import l from "debug";
|
|
9
|
+
import { renderMath as u } from "@pie-element/shared-math-rendering-mathjax";
|
|
10
|
+
import d from "prop-types";
|
|
11
|
+
import f from "react-dom";
|
|
12
|
+
import { styled as p } from "@mui/material/styles";
|
|
13
|
+
import { closestCenter as m } from "@dnd-kit/core";
|
|
14
|
+
import * as h from "@pie-lib/render-ui";
|
|
15
|
+
import { Collapsible as g, Feedback as _, PreviewPrompt as v, UiLayout as y, color as b, hasMedia as x, hasText as S } from "@pie-lib/render-ui";
|
|
16
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
17
|
+
import T from "@pie-lib/translator";
|
|
18
|
+
import E from "@pie-lib/correct-answer-toggle";
|
|
19
|
+
import { DragProvider as D } from "@pie-lib/drag";
|
|
20
|
+
//#region src/delivery/placement-ordering.tsx
|
|
21
|
+
function O(e) {
|
|
22
|
+
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
23
|
+
}
|
|
24
|
+
function k(e, t) {
|
|
25
|
+
return !e || O(e) ? e : O(e.default) ? e.default : t && O(e[t]) ? e[t] : t && O(e[t]?.default) ? e[t].default : e;
|
|
26
|
+
}
|
|
27
|
+
var A = k(y, "UiLayout") || k(I.UiLayout, "UiLayout"), j = k(v, "PreviewPrompt") || k(I.PreviewPrompt, "PreviewPrompt"), M = k(_, "Feedback") || k(I.Feedback, "Feedback"), N = k(g, "Collapsible") || k(I.Collapsible, "Collapsible"), P = h, F = P.default, I = F && typeof F == "object" ? F : P, { translator: L } = T, R = l("pie-elements:placement-ordering"), z = p("div")({
|
|
28
|
+
color: b.text(),
|
|
29
|
+
backgroundColor: b.background(),
|
|
30
|
+
display: "flex",
|
|
31
|
+
flexDirection: "column",
|
|
32
|
+
alignItems: "center",
|
|
33
|
+
boxSizing: "border-box"
|
|
34
|
+
}), B = p("div")(({ theme: e }) => ({ paddingBottom: e.spacing(1) })), V = p("div")(({ theme: e }) => ({ paddingBottom: e.spacing(2) })), H = p(E)(({ theme: e }) => ({ paddingBottom: e.spacing(1) })), U = p(N)(({ theme: e }) => ({
|
|
35
|
+
marginBottom: e.spacing(2),
|
|
36
|
+
alignSelf: "flex-start"
|
|
37
|
+
})), W = (e) => {
|
|
38
|
+
let { tiler: t, ordering: n, onDropChoice: r, onRemoveChoice: i, ...a } = e;
|
|
39
|
+
return /* @__PURE__ */ C(t, {
|
|
40
|
+
...a,
|
|
41
|
+
tiles: n.tiles,
|
|
42
|
+
onDropChoice: (e, t) => r(e, t, n),
|
|
43
|
+
onRemoveChoice: (e) => i(e, n)
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
W.propTypes = {
|
|
47
|
+
tiler: d.func,
|
|
48
|
+
ordering: d.any,
|
|
49
|
+
onDropChoice: d.func,
|
|
50
|
+
onRemoveChoice: d.func
|
|
51
|
+
};
|
|
52
|
+
var G = class extends c.Component {
|
|
53
|
+
static propTypes = {
|
|
54
|
+
onSessionChange: d.func.isRequired,
|
|
55
|
+
model: d.object.isRequired,
|
|
56
|
+
session: d.oneOfType([d.array.isRequired, d.object.isRequired])
|
|
57
|
+
};
|
|
58
|
+
constructor(e) {
|
|
59
|
+
super(e), this.instanceId = n();
|
|
60
|
+
let { value: t, needsReset: r } = this.validateSession(e);
|
|
61
|
+
this.state = { showingCorrect: !1 };
|
|
62
|
+
let { model: i } = e || {}, { env: a } = i || {}, { mode: o } = a || {};
|
|
63
|
+
r && o === "gather" && this.props.onSessionChange({
|
|
64
|
+
...e.session,
|
|
65
|
+
value: t
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
toggleCorrect = (e) => this.setState({ showingCorrect: e });
|
|
69
|
+
componentDidUpdate() {
|
|
70
|
+
u(f.findDOMNode(this));
|
|
71
|
+
}
|
|
72
|
+
validateSession = ({ model: n, session: r }, i = !1) => {
|
|
73
|
+
let { config: a, choices: o } = n || {}, { includeTargets: s } = a || {}, c = o.map((e) => e.id), { value: l } = r || {}, u;
|
|
74
|
+
if (s) l && l.length !== c.length && (u = !0, l = l.length < c.length ? l.concat(Array(c.length - l.length)) : l.filter((e) => c.includes(e)));
|
|
75
|
+
else {
|
|
76
|
+
if (!l || !l.length || i) l = c;
|
|
77
|
+
else {
|
|
78
|
+
let t = e(c, l), n = e(l, c);
|
|
79
|
+
(t.length || n.length) && (l = c);
|
|
80
|
+
}
|
|
81
|
+
u = !t(r.value, l);
|
|
82
|
+
}
|
|
83
|
+
return u && console.warn("This session is not valid anymore. It will be reset."), {
|
|
84
|
+
value: l,
|
|
85
|
+
needsReset: u
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
UNSAFE_componentWillReceiveProps(e) {
|
|
89
|
+
let { model: t = {} } = e || {}, { model: n = {} } = this.props || {}, { correctResponse: r, config: i, choices: a = [], env: o } = t, { includeTargets: c } = i || {}, l = {}, u = n.language && n.language !== t.language, d = n.note && n.note === L.t("common:commonCorrectAnswerWithAlternates", { lng: n.language });
|
|
90
|
+
u && d && (n.note = L.t("common:commonCorrectAnswerWithAlternates", { lng: t.language })), r || (l.showingCorrect = !1);
|
|
91
|
+
let f = s(a, n.choices), { value: p, needsReset: m } = this.validateSession(e, f), h = {
|
|
92
|
+
...e.session,
|
|
93
|
+
value: p
|
|
94
|
+
}, g = n.config?.includeTargets !== c;
|
|
95
|
+
c && g && (m = !0, delete h.value), this.setState(l, () => {
|
|
96
|
+
let { mode: e } = o || {};
|
|
97
|
+
m && e === "gather" && this.props.onSessionChange(h);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
onDropChoice = (e, t, n) => {
|
|
101
|
+
let { onSessionChange: r, session: i } = this.props, a = n.tiles.find((e) => e.id === t.id && e.type === t.type && e.index === t.index), s = e;
|
|
102
|
+
R("[onDropChoice] ", a, s);
|
|
103
|
+
let c = o({
|
|
104
|
+
type: "move",
|
|
105
|
+
from: a,
|
|
106
|
+
to: s
|
|
107
|
+
}, n);
|
|
108
|
+
r(Object.assign({}, i, { value: c.response }));
|
|
109
|
+
};
|
|
110
|
+
onRemoveChoice = (e, t) => {
|
|
111
|
+
let { onSessionChange: n, session: r } = this.props;
|
|
112
|
+
R("[onRemoveChoice]", e);
|
|
113
|
+
let i = o({
|
|
114
|
+
type: "remove",
|
|
115
|
+
target: e
|
|
116
|
+
}, t);
|
|
117
|
+
n(Object.assign({}, r, { value: i.response }));
|
|
118
|
+
};
|
|
119
|
+
createOrdering = () => {
|
|
120
|
+
let { model: e, session: t } = this.props, { showingCorrect: n } = this.state, { includeTargets: r } = e.config || {
|
|
121
|
+
orientation: "vertical",
|
|
122
|
+
includeTargets: !0
|
|
123
|
+
};
|
|
124
|
+
return n ? a(e.choices, e.correctResponse, e.correctResponse.map((e) => ({
|
|
125
|
+
id: e,
|
|
126
|
+
outcome: "correct"
|
|
127
|
+
})), {
|
|
128
|
+
includeTargets: r,
|
|
129
|
+
allowSameChoiceInTargets: e.config.allowSameChoiceInTargets
|
|
130
|
+
}) : a(e.choices, t.value, e.outcomes, {
|
|
131
|
+
includeTargets: r,
|
|
132
|
+
allowSameChoiceInTargets: e.config.allowSameChoiceInTargets
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
onDragEnd = (e) => {
|
|
136
|
+
let { over: t, active: n } = e, r = this.createOrdering();
|
|
137
|
+
if (t && n) {
|
|
138
|
+
let e = n.data.current, i = t.data.current;
|
|
139
|
+
if (e && i && i.type === "target") {
|
|
140
|
+
this.onDropChoice(i, e, r);
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
e && i && this.onDropChoice(i, e, r);
|
|
144
|
+
} else if (!t && n) {
|
|
145
|
+
let e = n.data.current;
|
|
146
|
+
e && e.type === "target" && this.onRemoveChoice(e, r);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
render() {
|
|
150
|
+
let { model: e } = this.props, { correctResponse: t, correctness: n, extraCSSRules: a, prompt: o, rationale: s, feedback: c, config: l, note: u, showNote: d, env: f, disabled: p, teacherInstructions: h, language: g } = e, _ = t && t.length > 0, { showingCorrect: v } = this.state, y = l || {
|
|
151
|
+
orientation: "vertical",
|
|
152
|
+
includeTargets: !0
|
|
153
|
+
}, { orientation: T, includeTargets: E } = y, O = T === "vertical", k = this.createOrdering(), { mode: N, role: P } = f || {}, F = O ? i : r, I = (v || N === "view" && P === "instructor") && d && u, L = s && (S(s) || x(s)), R = h && (S(h) || x(h)), G = {
|
|
154
|
+
color: b.text(),
|
|
155
|
+
backgroundColor: b.background(),
|
|
156
|
+
display: "flex",
|
|
157
|
+
flexDirection: "column",
|
|
158
|
+
alignItems: "center",
|
|
159
|
+
boxSizing: "border-box"
|
|
160
|
+
};
|
|
161
|
+
return /* @__PURE__ */ C(D, {
|
|
162
|
+
onDragStart: () => {},
|
|
163
|
+
onDragEnd: this.onDragEnd,
|
|
164
|
+
collisionDetection: m,
|
|
165
|
+
children: /* @__PURE__ */ C(z, { children: /* @__PURE__ */ w(A, {
|
|
166
|
+
extraCSSRules: a,
|
|
167
|
+
style: G,
|
|
168
|
+
children: [
|
|
169
|
+
R && /* @__PURE__ */ C(U, {
|
|
170
|
+
labels: {
|
|
171
|
+
hidden: "Show Teacher Instructions",
|
|
172
|
+
visible: "Hide Teacher Instructions"
|
|
173
|
+
},
|
|
174
|
+
className: "collapsible",
|
|
175
|
+
children: /* @__PURE__ */ C(j, { prompt: h })
|
|
176
|
+
}),
|
|
177
|
+
/* @__PURE__ */ C(B, { children: /* @__PURE__ */ C(j, { prompt: o }) }),
|
|
178
|
+
/* @__PURE__ */ C(H, {
|
|
179
|
+
show: _,
|
|
180
|
+
toggled: v,
|
|
181
|
+
onToggle: this.toggleCorrect,
|
|
182
|
+
language: g
|
|
183
|
+
}),
|
|
184
|
+
/* @__PURE__ */ C(W, {
|
|
185
|
+
instanceId: this.instanceId,
|
|
186
|
+
choiceLabel: y.choiceLabel,
|
|
187
|
+
targetLabel: y.targetLabel,
|
|
188
|
+
ordering: k,
|
|
189
|
+
tiler: F,
|
|
190
|
+
disabled: p,
|
|
191
|
+
addGuide: y.showOrdering,
|
|
192
|
+
tileSize: y.tileSize,
|
|
193
|
+
includeTargets: E,
|
|
194
|
+
choiceLabelEnabled: e.config && e.config.choiceLabelEnabled
|
|
195
|
+
}),
|
|
196
|
+
I && /* @__PURE__ */ C(V, { dangerouslySetInnerHTML: { __html: u } }),
|
|
197
|
+
L && /* @__PURE__ */ C(U, {
|
|
198
|
+
labels: {
|
|
199
|
+
hidden: "Show Rationale",
|
|
200
|
+
visible: "Hide Rationale"
|
|
201
|
+
},
|
|
202
|
+
className: "collapsible",
|
|
203
|
+
children: /* @__PURE__ */ C(j, { prompt: s })
|
|
204
|
+
}),
|
|
205
|
+
!v && /* @__PURE__ */ C(M, {
|
|
206
|
+
correctness: n,
|
|
207
|
+
feedback: c
|
|
208
|
+
})
|
|
209
|
+
]
|
|
210
|
+
}) })
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
//#endregion
|
|
215
|
+
export { G as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/placement-ordering/src/tile.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 Tile: {
|
|
12
|
+
(props: any): React.JSX.Element;
|
|
13
|
+
propTypes: {
|
|
14
|
+
id: PropTypes.Requireable<any>;
|
|
15
|
+
label: PropTypes.Requireable<string>;
|
|
16
|
+
isOver: PropTypes.Requireable<boolean>;
|
|
17
|
+
type: PropTypes.Requireable<string>;
|
|
18
|
+
empty: PropTypes.Requireable<boolean>;
|
|
19
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
20
|
+
outcome: PropTypes.Requireable<string>;
|
|
21
|
+
index: PropTypes.Requireable<number>;
|
|
22
|
+
guideIndex: PropTypes.Requireable<number>;
|
|
23
|
+
instanceId: PropTypes.Requireable<any>;
|
|
24
|
+
draggable: PropTypes.Requireable<boolean>;
|
|
25
|
+
tileIndex: PropTypes.Requireable<number>;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export default Tile;
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
import t from "debug";
|
|
3
|
+
import n from "prop-types";
|
|
4
|
+
import { styled as r } from "@mui/material/styles";
|
|
5
|
+
import { useDraggable as i, useDroppable as a } from "@dnd-kit/core";
|
|
6
|
+
import { color as o } from "@pie-lib/render-ui";
|
|
7
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
8
|
+
import { PlaceHolder as c } from "@pie-lib/drag";
|
|
9
|
+
//#region src/delivery/tile.tsx
|
|
10
|
+
var l = t("pie-elements:placement-ordering:tile"), u = r("div")(({ theme: e }) => ({
|
|
11
|
+
width: "100%",
|
|
12
|
+
fontSize: e.typography.fontSize + 4,
|
|
13
|
+
textAlign: "center",
|
|
14
|
+
color: `rgba(${e.palette.common.black}, 0.6)`
|
|
15
|
+
})), d = ({ type: e, index: t, isOver: n, disabled: r }) => /* @__PURE__ */ s(c, {
|
|
16
|
+
type: e,
|
|
17
|
+
isOver: n,
|
|
18
|
+
disabled: r,
|
|
19
|
+
children: e === "target" && t !== void 0 && /* @__PURE__ */ s(u, { children: t })
|
|
20
|
+
});
|
|
21
|
+
d.propTypes = {
|
|
22
|
+
type: n.string,
|
|
23
|
+
index: n.number,
|
|
24
|
+
isOver: n.bool,
|
|
25
|
+
disabled: n.bool
|
|
26
|
+
};
|
|
27
|
+
var f = r("div")(({ theme: e, isDragging: t, isOver: n, disabled: r, outcome: i, label: a, type: s }) => ({
|
|
28
|
+
cursor: r ? "not-allowed" : "grab",
|
|
29
|
+
width: "100%",
|
|
30
|
+
height: "100%",
|
|
31
|
+
padding: "10px",
|
|
32
|
+
boxSizing: "border-box",
|
|
33
|
+
overflow: "hidden",
|
|
34
|
+
border: s === "choice" || s === "target" ? `1px solid ${e.palette.grey[400]}` : "1px solid transparent",
|
|
35
|
+
backgroundColor: s === "choice" || s === "target" ? o.background() : "transparent",
|
|
36
|
+
transition: s === "choice" || s === "target" ? "background-color 150ms ease, border-color 150ms ease, opacity 150ms ease" : "none",
|
|
37
|
+
pointerEvents: "none",
|
|
38
|
+
userSelect: "none",
|
|
39
|
+
...(s === "choice" || s === "target") && { "&:hover": {
|
|
40
|
+
backgroundColor: r ? o.background() : o.secondary(),
|
|
41
|
+
borderColor: r ? e.palette.grey[400] : e.palette.primary.main,
|
|
42
|
+
transform: r ? "none" : "scale(1.02)"
|
|
43
|
+
} },
|
|
44
|
+
...(s === "choice" || s === "target") && n && !r && {
|
|
45
|
+
opacity: .4,
|
|
46
|
+
backgroundColor: o.primaryLight(),
|
|
47
|
+
borderColor: e.palette.primary.main,
|
|
48
|
+
borderStyle: "dashed",
|
|
49
|
+
transform: "scale(1.05)"
|
|
50
|
+
},
|
|
51
|
+
...(s === "choice" || s === "target") && t && !r && {
|
|
52
|
+
opacity: .6,
|
|
53
|
+
backgroundColor: o.secondaryLight(),
|
|
54
|
+
transform: "scale(1.05) rotate(2deg)",
|
|
55
|
+
boxShadow: "0 8px 16px rgba(0,0,0,0.2)",
|
|
56
|
+
cursor: "grabbing"
|
|
57
|
+
},
|
|
58
|
+
...(s === "choice" || s === "target") && r && {
|
|
59
|
+
cursor: "not-allowed",
|
|
60
|
+
"&:hover": {
|
|
61
|
+
backgroundColor: o.background(),
|
|
62
|
+
transform: "none"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
...(s === "choice" || s === "target") && i === "incorrect" && { border: `1px solid ${o.incorrect()}` },
|
|
66
|
+
...(s === "choice" || s === "target") && i === "correct" && { border: `1px solid ${o.correct()}` },
|
|
67
|
+
...!a && {
|
|
68
|
+
border: "none",
|
|
69
|
+
"&:hover": { backgroundColor: "unset" }
|
|
70
|
+
}
|
|
71
|
+
})), p = (e) => {
|
|
72
|
+
let { type: t, isDragging: n, empty: r, isOver: i, label: a, disabled: o, outcome: c, guideIndex: l } = e;
|
|
73
|
+
return r ? /* @__PURE__ */ s(d, {
|
|
74
|
+
type: t,
|
|
75
|
+
index: l,
|
|
76
|
+
isOver: i,
|
|
77
|
+
disabled: o
|
|
78
|
+
}) : /* @__PURE__ */ s(f, {
|
|
79
|
+
type: t,
|
|
80
|
+
isDragging: n,
|
|
81
|
+
isOver: i,
|
|
82
|
+
disabled: o,
|
|
83
|
+
outcome: c,
|
|
84
|
+
label: a,
|
|
85
|
+
dangerouslySetInnerHTML: { __html: a }
|
|
86
|
+
});
|
|
87
|
+
}, m = (t) => {
|
|
88
|
+
let { label: n, type: r, id: o, empty: c, disabled: u, outcome: d, index: f, guideIndex: m, instanceId: h, draggable: g, tileIndex: _ } = t, v = `tile-${r}-${o ?? "empty"}-${_}-${h}`, y = `drop-${r}-${o ?? "empty"}-${_}-${h}`, { attributes: b, listeners: x, setNodeRef: S, transform: C, isDragging: w } = i({
|
|
89
|
+
id: v,
|
|
90
|
+
data: {
|
|
91
|
+
id: o,
|
|
92
|
+
type: r,
|
|
93
|
+
instanceId: h,
|
|
94
|
+
value: n,
|
|
95
|
+
index: f
|
|
96
|
+
},
|
|
97
|
+
disabled: !g || u
|
|
98
|
+
}), { setNodeRef: T, isOver: E } = a({
|
|
99
|
+
id: y,
|
|
100
|
+
data: {
|
|
101
|
+
id: o,
|
|
102
|
+
type: r,
|
|
103
|
+
instanceId: h,
|
|
104
|
+
value: n,
|
|
105
|
+
index: f
|
|
106
|
+
},
|
|
107
|
+
disabled: w
|
|
108
|
+
}), D = e.useRef(null);
|
|
109
|
+
return e.useEffect(() => {
|
|
110
|
+
let e = D.current, t = (e) => {
|
|
111
|
+
e.preventDefault();
|
|
112
|
+
};
|
|
113
|
+
return e && e.addEventListener("touchstart", t, { passive: !1 }), () => {
|
|
114
|
+
e && e.removeEventListener("touchstart", t);
|
|
115
|
+
};
|
|
116
|
+
}, []), l("[render], props: ", t), /* @__PURE__ */ s("div", {
|
|
117
|
+
ref: (e) => {
|
|
118
|
+
D.current = e, S(e), T(e);
|
|
119
|
+
},
|
|
120
|
+
style: {
|
|
121
|
+
transform: C ? `translate3d(${C.x}px, ${C.y}px, 0)` : void 0,
|
|
122
|
+
boxSizing: "border-box",
|
|
123
|
+
overflow: "visible",
|
|
124
|
+
padding: 0,
|
|
125
|
+
margin: 0,
|
|
126
|
+
textAlign: "center",
|
|
127
|
+
pointerEvents: "auto",
|
|
128
|
+
cursor: u ? "not-allowed" : w ? "grabbing" : "grab",
|
|
129
|
+
zIndex: w ? 1e3 : "auto",
|
|
130
|
+
willChange: w ? "transform" : "auto"
|
|
131
|
+
},
|
|
132
|
+
...g && !u ? {
|
|
133
|
+
...x,
|
|
134
|
+
...b
|
|
135
|
+
} : {},
|
|
136
|
+
children: /* @__PURE__ */ s(p, {
|
|
137
|
+
label: n,
|
|
138
|
+
id: o,
|
|
139
|
+
empty: c,
|
|
140
|
+
index: f,
|
|
141
|
+
guideIndex: m,
|
|
142
|
+
isOver: E,
|
|
143
|
+
isDragging: w,
|
|
144
|
+
disabled: u,
|
|
145
|
+
outcome: d,
|
|
146
|
+
type: r
|
|
147
|
+
})
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
m.propTypes = {
|
|
151
|
+
id: n.any,
|
|
152
|
+
label: n.string,
|
|
153
|
+
isOver: n.bool,
|
|
154
|
+
type: n.string,
|
|
155
|
+
empty: n.bool,
|
|
156
|
+
disabled: n.bool,
|
|
157
|
+
outcome: n.string,
|
|
158
|
+
index: n.number,
|
|
159
|
+
guideIndex: n.number,
|
|
160
|
+
instanceId: n.any,
|
|
161
|
+
draggable: n.bool,
|
|
162
|
+
tileIndex: n.number
|
|
163
|
+
};
|
|
164
|
+
//#endregion
|
|
165
|
+
export { m as default };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/placement-ordering/src/tiler.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 PropTypes from 'prop-types';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
export declare class HorizontalTiler extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
choiceLabel: PropTypes.Requireable<string>;
|
|
14
|
+
targetLabel: PropTypes.Requireable<string>;
|
|
15
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
16
|
+
tiles: PropTypes.Validator<any[]>;
|
|
17
|
+
tileSize: PropTypes.Requireable<string>;
|
|
18
|
+
addGuide: PropTypes.Requireable<boolean>;
|
|
19
|
+
};
|
|
20
|
+
static defaultProps: {
|
|
21
|
+
tileSize: string;
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
addGuide: boolean;
|
|
24
|
+
};
|
|
25
|
+
render(): React.JSX.Element;
|
|
26
|
+
}
|
|
27
|
+
export declare class VerticalTiler extends React.Component {
|
|
28
|
+
static propTypes: {
|
|
29
|
+
choiceLabel: PropTypes.Requireable<string>;
|
|
30
|
+
targetLabel: PropTypes.Requireable<string>;
|
|
31
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
32
|
+
tiles: PropTypes.Validator<any[]>;
|
|
33
|
+
tileSize: PropTypes.Requireable<string>;
|
|
34
|
+
addGuide: PropTypes.Requireable<boolean>;
|
|
35
|
+
};
|
|
36
|
+
static defaultProps: {
|
|
37
|
+
tileSize: string;
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
addGuide: boolean;
|
|
40
|
+
};
|
|
41
|
+
render(): React.JSX.Element;
|
|
42
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import e from "./tile.js";
|
|
2
|
+
import t, { createElement as n } from "react";
|
|
3
|
+
import r from "prop-types";
|
|
4
|
+
import { styled as i } from "@mui/material/styles";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
//#region src/delivery/tiler.tsx
|
|
7
|
+
var s = {
|
|
8
|
+
choiceLabel: r.string,
|
|
9
|
+
targetLabel: r.string,
|
|
10
|
+
disabled: r.bool,
|
|
11
|
+
tiles: r.array.isRequired,
|
|
12
|
+
tileSize: r.string,
|
|
13
|
+
addGuide: r.bool
|
|
14
|
+
}, c = {
|
|
15
|
+
tileSize: "1fr",
|
|
16
|
+
disabled: !1,
|
|
17
|
+
addGuide: !1
|
|
18
|
+
}, l = (t) => {
|
|
19
|
+
let r = (r, i) => (r.instanceId = t.instanceId, r.disabled = t.disabled, r.guideIndex = t.addGuide ? r.index + 1 : void 0, r.tileIndex = i, t.includeTargets || r.type === "choice" ? /* @__PURE__ */ n(e, {
|
|
20
|
+
...r,
|
|
21
|
+
key: i
|
|
22
|
+
}) : /* @__PURE__ */ n(e, {
|
|
23
|
+
...r,
|
|
24
|
+
label: "",
|
|
25
|
+
key: i
|
|
26
|
+
}));
|
|
27
|
+
return r.propTypes = { ...s }, r;
|
|
28
|
+
}, u = i("div")(({ theme: e, includeTargets: t }) => ({
|
|
29
|
+
display: "grid",
|
|
30
|
+
paddingBottom: e.spacing(2),
|
|
31
|
+
...t && { gridGap: "10px" }
|
|
32
|
+
})), d = i("div")({ textAlign: "center" }), f = i("div")({
|
|
33
|
+
textAlign: "center",
|
|
34
|
+
gridRow: "3/4"
|
|
35
|
+
}), p = i("div")(({ includeTargets: e }) => ({
|
|
36
|
+
gridAutoFlow: "column",
|
|
37
|
+
display: "grid",
|
|
38
|
+
...e && { gridGap: "10px" }
|
|
39
|
+
})), m = i("div")({
|
|
40
|
+
gridColumn: "1/2",
|
|
41
|
+
textAlign: "center"
|
|
42
|
+
}), h = i("div")({
|
|
43
|
+
gridColumn: "2/3",
|
|
44
|
+
textAlign: "center"
|
|
45
|
+
}), g = class extends t.Component {
|
|
46
|
+
static propTypes = { ...s };
|
|
47
|
+
static defaultProps = { ...c };
|
|
48
|
+
render() {
|
|
49
|
+
let { includeTargets: e, choiceLabelEnabled: t, choiceLabel: n, targetLabel: r, tiles: i, tileSize: s } = this.props, c = e ? `auto ${s} auto ${s}` : `auto ${s} auto`, p = e ? i.length / 2 : i.length, m = {
|
|
50
|
+
gridTemplateColumns: e ? `repeat(${p}, ${s})` : `auto repeat(${Math.floor(p / 2) - 1}, ${s} 10px) ${s} auto`,
|
|
51
|
+
gridTemplateRows: c
|
|
52
|
+
}, h = { gridColumn: `1/${p + 1}` };
|
|
53
|
+
return /* @__PURE__ */ o(u, {
|
|
54
|
+
includeTargets: e,
|
|
55
|
+
style: m,
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ a(d, {
|
|
58
|
+
style: h,
|
|
59
|
+
dangerouslySetInnerHTML: { __html: t ? n : "" }
|
|
60
|
+
}),
|
|
61
|
+
e && /* @__PURE__ */ a(f, {
|
|
62
|
+
style: h,
|
|
63
|
+
dangerouslySetInnerHTML: { __html: r }
|
|
64
|
+
}),
|
|
65
|
+
i.map(l(this.props))
|
|
66
|
+
]
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}, _ = class extends t.Component {
|
|
70
|
+
static propTypes = { ...s };
|
|
71
|
+
static defaultProps = { ...c };
|
|
72
|
+
render() {
|
|
73
|
+
let { includeTargets: e, choiceLabelEnabled: t, choiceLabel: n, targetLabel: r, tiles: i, tileSize: s } = this.props, c = e ? 2 : 1, u = e ? i.length / 2 : i.length;
|
|
74
|
+
return /* @__PURE__ */ o(p, {
|
|
75
|
+
includeTargets: e,
|
|
76
|
+
style: {
|
|
77
|
+
gridTemplateColumns: `repeat(${c}, ${s})`,
|
|
78
|
+
gridTemplateRows: e ? `auto repeat(${u}, ${s})` : `auto auto repeat(${Math.floor(u / 2) - 1}, ${s} 10px) ${s} auto`
|
|
79
|
+
},
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ a(m, { dangerouslySetInnerHTML: { __html: t ? n : "" } }),
|
|
82
|
+
e && /* @__PURE__ */ a(h, { dangerouslySetInnerHTML: { __html: r } }),
|
|
83
|
+
i.map(l(this.props))
|
|
84
|
+
]
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
//#endregion
|
|
89
|
+
export { g as HorizontalTiler, _ as VerticalTiler };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/placement-ordering/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 haveSameValuesButDifferentOrder: (arr1: any, arr2: any) => any;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region src/delivery/utils.ts
|
|
2
|
+
var e = (e, t) => {
|
|
3
|
+
if (!Array.isArray(e) || !Array.isArray(t) || e.length !== t.length) return !1;
|
|
4
|
+
let n = (e) => e.map((e) => JSON.stringify(e)).sort(), r = n(e), i = n(t), a = r.every((e, t) => e === i[t]), o = e.every((e, n) => JSON.stringify(e) === JSON.stringify(t[n]));
|
|
5
|
+
return a && !o;
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { e as haveSameValuesButDifferentOrder };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './delivery/index.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IIFE entry point for placement-ordering element
|
|
3
|
+
* This file is only used for IIFE builds and includes auto-registration
|
|
4
|
+
*
|
|
5
|
+
* @sync-generated - Auto-generated during sync from pie-elements
|
|
6
|
+
*/
|
|
7
|
+
import Element from './index.js';
|
|
8
|
+
export default Element;
|