@pie-element/image-cloze-association 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/author/defaults.d.ts +89 -0
- package/dist/author/defaults.d.ts.map +1 -0
- package/dist/author/defaults.js +58 -0
- package/dist/author/index.d.ts +35 -0
- package/dist/author/index.d.ts.map +1 -0
- package/dist/author/index.js +71 -0
- package/dist/author/root.d.ts +15 -0
- package/dist/author/root.d.ts.map +1 -0
- package/dist/author/root.js +80 -0
- package/dist/controller/defaults.d.ts +17 -0
- package/dist/controller/defaults.d.ts.map +1 -0
- package/dist/controller/defaults.js +10 -0
- package/dist/controller/index.d.ts +24 -0
- package/dist/controller/index.d.ts.map +1 -0
- package/dist/controller/index.js +124 -0
- package/dist/controller/utils.d.ts +15 -0
- package/dist/controller/utils.d.ts.map +1 -0
- package/dist/controller/utils.js +36 -0
- package/dist/delivery/constants.d.ts +15 -0
- package/dist/delivery/constants.d.ts.map +1 -0
- package/dist/delivery/evaluation-icon.d.ts +29 -0
- package/dist/delivery/evaluation-icon.d.ts.map +1 -0
- package/dist/delivery/evaluation-icon.js +38 -0
- package/dist/delivery/image-container.d.ts +14 -0
- package/dist/delivery/image-container.d.ts.map +1 -0
- package/dist/delivery/image-container.js +61 -0
- package/dist/delivery/image-drop-target.d.ts +46 -0
- package/dist/delivery/image-drop-target.d.ts.map +1 -0
- package/dist/delivery/image-drop-target.js +90 -0
- package/dist/delivery/index.d.ts +21 -0
- package/dist/delivery/index.d.ts.map +1 -0
- package/dist/delivery/index.js +110 -0
- package/dist/delivery/interactive-section.d.ts +16 -0
- package/dist/delivery/interactive-section.d.ts.map +1 -0
- package/dist/delivery/interactive-section.js +72 -0
- package/dist/delivery/possible-response.d.ts +35 -0
- package/dist/delivery/possible-response.d.ts.map +1 -0
- package/dist/delivery/possible-response.js +100 -0
- package/dist/delivery/possible-responses.d.ts +32 -0
- package/dist/delivery/possible-responses.d.ts.map +1 -0
- package/dist/delivery/possible-responses.js +41 -0
- package/dist/delivery/root.d.ts +22 -0
- package/dist/delivery/root.d.ts.map +1 -0
- package/dist/delivery/root.js +279 -0
- package/dist/delivery/static-html-span.d.ts +15 -0
- package/dist/delivery/static-html-span.d.ts.map +1 -0
- package/dist/delivery/static-html-span.js +22 -0
- package/dist/delivery/utils-correctness.d.ts +11 -0
- package/dist/delivery/utils-correctness.d.ts.map +1 -0
- package/dist/delivery/utils-correctness.js +43 -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 +160 -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/_arrayAggregator.js +10 -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/_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/_arrayShuffle.js +8 -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/_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/_baseAggregator.js +9 -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/_baseEach.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseFlatten.js +13 -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/_baseForOwn.js +8 -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/_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/_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/_baseMap.js +11 -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/_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/_baseRandom.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseShuffle.js +8 -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/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseValues.js +9 -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/_createAggregator.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createBaseEach.js +12 -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/_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/_isFlattenable.js +10 -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/_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/_root.js +5 -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/_shuffleSelf.js +12 -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/_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/cloneDeep.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/flatMap.js +8 -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/groupBy.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/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/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/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/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/map.js +10 -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/property.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/shuffle.js +9 -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/toString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/values.js +8 -0
- package/package.json +75 -0
- package/src/author/defaults.ts +69 -0
- package/src/author/index.ts +124 -0
- package/src/author/root.tsx +126 -0
- package/src/controller/defaults.ts +17 -0
- package/src/controller/index.ts +332 -0
- package/src/controller/utils.ts +82 -0
- package/src/delivery/constants.ts +15 -0
- package/src/delivery/evaluation-icon.tsx +64 -0
- package/src/delivery/image-container.tsx +100 -0
- package/src/delivery/image-drop-target.tsx +150 -0
- package/src/delivery/index.ts +283 -0
- package/src/delivery/interactive-section.tsx +104 -0
- package/src/delivery/possible-response.tsx +162 -0
- package/src/delivery/possible-responses.tsx +62 -0
- package/src/delivery/root.tsx +530 -0
- package/src/delivery/static-html-span.tsx +40 -0
- package/src/delivery/utils-correctness.ts +105 -0
- package/src/index.iife.ts +16 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { color as e } from "@pie-lib/render-ui";
|
|
3
|
+
import t from "prop-types";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { styled as r } from "@mui/material/styles";
|
|
6
|
+
import i from "@mui/icons-material/Check";
|
|
7
|
+
import a from "@mui/icons-material/Close";
|
|
8
|
+
//#region src/delivery/evaluation-icon.tsx
|
|
9
|
+
var o = r("svg")(() => ({
|
|
10
|
+
"&.correctEmpty": { color: e.correct() },
|
|
11
|
+
"&.correctFilled": {
|
|
12
|
+
color: e.background(),
|
|
13
|
+
backgroundColor: e.correct()
|
|
14
|
+
},
|
|
15
|
+
"&.incorrectEmpty": { color: e.incorrect() },
|
|
16
|
+
"&.incorrectFilled": {
|
|
17
|
+
color: e.background(),
|
|
18
|
+
backgroundColor: e.incorrect()
|
|
19
|
+
}
|
|
20
|
+
})), s = (e, t) => `${e ? "correct" : "incorrect"}${t ? "Filled" : "Empty"}`, c = ({ containerStyle: e, isCorrect: t, filled: r }) => {
|
|
21
|
+
let c = t ? i : a, l = t !== void 0, u = l ? s(t, r) : "";
|
|
22
|
+
return l ? /* @__PURE__ */ n(c, {
|
|
23
|
+
component: o,
|
|
24
|
+
className: u,
|
|
25
|
+
style: e
|
|
26
|
+
}) : null;
|
|
27
|
+
};
|
|
28
|
+
c.propTypes = {
|
|
29
|
+
containerStyle: t.object,
|
|
30
|
+
filled: t.bool,
|
|
31
|
+
isCorrect: t.oneOfType([t.bool, t.number])
|
|
32
|
+
}, c.defaultProps = {
|
|
33
|
+
containerStyle: {},
|
|
34
|
+
filled: !1,
|
|
35
|
+
isCorrect: void 0
|
|
36
|
+
};
|
|
37
|
+
//#endregion
|
|
38
|
+
export { c as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/image-cloze-association/src/image-container.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, { Component } from 'react';
|
|
10
|
+
declare class ImageContainer extends Component {
|
|
11
|
+
render(): React.JSX.Element;
|
|
12
|
+
}
|
|
13
|
+
export default ImageContainer;
|
|
14
|
+
//# sourceMappingURL=image-container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-container.d.ts","sourceRoot":"","sources":["../../src/delivery/image-container.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYzC,cAAM,cAAe,SAAQ,SAAS;IACpC,MAAM;CAyDP;AAmBD,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import e from "./image-drop-target.js";
|
|
2
|
+
import { Component as t } from "react";
|
|
3
|
+
import n from "prop-types";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { styled as a } from "@mui/material/styles";
|
|
6
|
+
//#region src/delivery/image-container.tsx
|
|
7
|
+
var o = a("div")(({ theme: e }) => ({
|
|
8
|
+
margin: e.spacing(2),
|
|
9
|
+
position: "relative",
|
|
10
|
+
width: "fit-content"
|
|
11
|
+
})), s = class extends t {
|
|
12
|
+
render() {
|
|
13
|
+
let { answers: t, canDrag: n, draggingElement: a, image: { height: s, src: c, width: l } = {}, onAnswerSelect: u, onDragAnswerBegin: d, onDragAnswerEnd: f, responseContainers: p, showDashedBorder: m, responseAreaFill: h, answerChoiceTransparency: g, responseContainerPadding: _, imageDropTargetPadding: v, maxResponsePerZone: y } = this.props;
|
|
14
|
+
return /* @__PURE__ */ i(o, { children: [/* @__PURE__ */ r("img", {
|
|
15
|
+
src: c,
|
|
16
|
+
height: s,
|
|
17
|
+
width: l
|
|
18
|
+
}), (p || []).map((i, o) => {
|
|
19
|
+
let c = i.height.replace("%", "") / 100 * s, p = i.width.replace("%", "") / 100 * l, b = i.x / 100 * l, x = i.y / 100 * s;
|
|
20
|
+
return /* @__PURE__ */ r(e, {
|
|
21
|
+
answers: t.filter((e) => e.containerIndex === i.index),
|
|
22
|
+
canDrag: n,
|
|
23
|
+
containerStyle: {
|
|
24
|
+
height: c,
|
|
25
|
+
width: p,
|
|
26
|
+
left: b,
|
|
27
|
+
top: x
|
|
28
|
+
},
|
|
29
|
+
draggingElement: a,
|
|
30
|
+
index: i.index,
|
|
31
|
+
onDrop: (e) => u(e, i.index),
|
|
32
|
+
onDragAnswerBegin: d,
|
|
33
|
+
onDragAnswerEnd: f,
|
|
34
|
+
showDashedBorder: m,
|
|
35
|
+
responseAreaFill: h,
|
|
36
|
+
answerChoiceTransparency: g,
|
|
37
|
+
responseContainerPadding: _,
|
|
38
|
+
imageDropTargetPadding: v,
|
|
39
|
+
maxResponsePerZone: y
|
|
40
|
+
}, i.id + o);
|
|
41
|
+
})] });
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
s.propTypes = {
|
|
45
|
+
answers: n.array.isRequired,
|
|
46
|
+
canDrag: n.bool.isRequired,
|
|
47
|
+
draggingElement: n.shape({}).isRequired,
|
|
48
|
+
image: n.object.isRequired,
|
|
49
|
+
onAnswerSelect: n.func.isRequired,
|
|
50
|
+
onDragAnswerBegin: n.func.isRequired,
|
|
51
|
+
onDragAnswerEnd: n.func.isRequired,
|
|
52
|
+
responseContainers: n.array.isRequired,
|
|
53
|
+
showDashedBorder: n.bool,
|
|
54
|
+
answerChoiceTransparency: n.bool,
|
|
55
|
+
responseAreaFill: n.string,
|
|
56
|
+
responseContainerPadding: n.string,
|
|
57
|
+
imageDropTargetPadding: n.string,
|
|
58
|
+
maxResponsePerZone: n.number
|
|
59
|
+
};
|
|
60
|
+
//#endregion
|
|
61
|
+
export { s as default };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/image-cloze-association/src/image-drop-target.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 ImageDropTarget: {
|
|
12
|
+
({ answers, canDrag, containerStyle, draggingElement, onDragAnswerBegin, onDragAnswerEnd, showDashedBorder, responseAreaFill, responseContainerPadding, imageDropTargetPadding, answerChoiceTransparency, maxResponsePerZone, onDrop, index, }: {
|
|
13
|
+
answers: any;
|
|
14
|
+
canDrag: any;
|
|
15
|
+
containerStyle: any;
|
|
16
|
+
draggingElement: any;
|
|
17
|
+
onDragAnswerBegin: any;
|
|
18
|
+
onDragAnswerEnd: any;
|
|
19
|
+
showDashedBorder: any;
|
|
20
|
+
responseAreaFill: any;
|
|
21
|
+
responseContainerPadding?: string | undefined;
|
|
22
|
+
imageDropTargetPadding: any;
|
|
23
|
+
answerChoiceTransparency: any;
|
|
24
|
+
maxResponsePerZone: any;
|
|
25
|
+
onDrop: any;
|
|
26
|
+
index: any;
|
|
27
|
+
}): React.JSX.Element;
|
|
28
|
+
propTypes: {
|
|
29
|
+
answer: PropTypes.Requireable<object>;
|
|
30
|
+
answers: PropTypes.Requireable<any[]>;
|
|
31
|
+
canDrag: PropTypes.Validator<boolean>;
|
|
32
|
+
containerStyle: PropTypes.Validator<object>;
|
|
33
|
+
draggingElement: PropTypes.Validator<object>;
|
|
34
|
+
onDragAnswerBegin: PropTypes.Validator<(...args: any[]) => any>;
|
|
35
|
+
onDragAnswerEnd: PropTypes.Validator<(...args: any[]) => any>;
|
|
36
|
+
onDrop: PropTypes.Validator<(...args: any[]) => any>;
|
|
37
|
+
showDashedBorder: PropTypes.Requireable<boolean>;
|
|
38
|
+
responseAreaFill: PropTypes.Requireable<string>;
|
|
39
|
+
answerChoiceTransparency: PropTypes.Requireable<boolean>;
|
|
40
|
+
responseContainerPadding: PropTypes.Requireable<string>;
|
|
41
|
+
imageDropTargetPadding: PropTypes.Requireable<string>;
|
|
42
|
+
maxResponsePerZone: PropTypes.Requireable<number>;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export default ImageDropTarget;
|
|
46
|
+
//# sourceMappingURL=image-drop-target.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-drop-target.d.ts","sourceRoot":"","sources":["../../src/delivery/image-drop-target.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,SAAS,MAAM,YAAY,CAAC;AA6BnC,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0FpB,CAAC;AAmBF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import e from "./possible-response.js";
|
|
2
|
+
import { useEffect as t, useRef as n, useState as r } from "react";
|
|
3
|
+
import { color as i } from "@pie-lib/render-ui";
|
|
4
|
+
import a from "prop-types";
|
|
5
|
+
import { useDroppable as o } from "@dnd-kit/core";
|
|
6
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
7
|
+
import { styled as c } from "@mui/material/styles";
|
|
8
|
+
import l from "classnames";
|
|
9
|
+
//#region src/delivery/image-drop-target.tsx
|
|
10
|
+
var u = c("div")(() => ({
|
|
11
|
+
display: "flex",
|
|
12
|
+
flexWrap: "wrap"
|
|
13
|
+
})), d = c("div")(() => ({
|
|
14
|
+
position: "absolute",
|
|
15
|
+
boxSizing: "border-box",
|
|
16
|
+
"&.active": {
|
|
17
|
+
border: `2px solid ${i.text()}`,
|
|
18
|
+
backgroundColor: "rgba(230, 242, 252, .8)"
|
|
19
|
+
},
|
|
20
|
+
"&.dashed": { border: `2px dashed ${i.text()}` },
|
|
21
|
+
"&.is-over": {
|
|
22
|
+
border: "1px solid rgb(158, 158, 158)",
|
|
23
|
+
backgroundColor: "rgb(224, 224, 224)"
|
|
24
|
+
}
|
|
25
|
+
})), f = ({ answers: i, canDrag: a, containerStyle: c, draggingElement: f, onDragAnswerBegin: p, onDragAnswerEnd: m, showDashedBorder: h, responseAreaFill: g, responseContainerPadding: _ = "10px", imageDropTargetPadding: v, answerChoiceTransparency: y, maxResponsePerZone: b, onDrop: x, index: S }) => {
|
|
26
|
+
let [C, w] = r(!1), T = n(null), E = n(null), { setNodeRef: D, isOver: O } = o({
|
|
27
|
+
id: `response-container-${S}`,
|
|
28
|
+
data: {
|
|
29
|
+
containerIndex: S,
|
|
30
|
+
onDrop: x
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
t(() => {
|
|
34
|
+
let e = T.current;
|
|
35
|
+
if (!e) return;
|
|
36
|
+
let t = (e) => {
|
|
37
|
+
e.preventDefault();
|
|
38
|
+
};
|
|
39
|
+
return e.addEventListener("touchstart", t, { passive: !1 }), () => {
|
|
40
|
+
e.removeEventListener("touchstart", t);
|
|
41
|
+
};
|
|
42
|
+
}, []);
|
|
43
|
+
let k = !!f.id;
|
|
44
|
+
return /* @__PURE__ */ s(d, {
|
|
45
|
+
ref: (e) => {
|
|
46
|
+
T.current = e, D(e);
|
|
47
|
+
},
|
|
48
|
+
className: l({
|
|
49
|
+
"is-over": O,
|
|
50
|
+
dashed: h && !k,
|
|
51
|
+
active: k
|
|
52
|
+
}),
|
|
53
|
+
style: {
|
|
54
|
+
padding: b === 1 ? "0" : _,
|
|
55
|
+
...c,
|
|
56
|
+
...g && !k && { backgroundColor: g }
|
|
57
|
+
},
|
|
58
|
+
children: i.length ? /* @__PURE__ */ s(u, {
|
|
59
|
+
ref: (e) => {
|
|
60
|
+
E.current = e?.getBoundingClientRect().height;
|
|
61
|
+
},
|
|
62
|
+
children: i.map((t) => /* @__PURE__ */ s(e, {
|
|
63
|
+
data: t,
|
|
64
|
+
canDrag: a,
|
|
65
|
+
onDragBegin: () => p(t),
|
|
66
|
+
onDragEnd: m,
|
|
67
|
+
answerChoiceTransparency: y,
|
|
68
|
+
containerStyle: { padding: v || (C ? "2px" : "6px 10px") }
|
|
69
|
+
}, t.id))
|
|
70
|
+
}) : null
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
f.propTypes = {
|
|
74
|
+
answer: a.object,
|
|
75
|
+
answers: a.array,
|
|
76
|
+
canDrag: a.bool.isRequired,
|
|
77
|
+
containerStyle: a.object.isRequired,
|
|
78
|
+
draggingElement: a.object.isRequired,
|
|
79
|
+
onDragAnswerBegin: a.func.isRequired,
|
|
80
|
+
onDragAnswerEnd: a.func.isRequired,
|
|
81
|
+
onDrop: a.func.isRequired,
|
|
82
|
+
showDashedBorder: a.bool,
|
|
83
|
+
responseAreaFill: a.string,
|
|
84
|
+
answerChoiceTransparency: a.bool,
|
|
85
|
+
responseContainerPadding: a.string,
|
|
86
|
+
imageDropTargetPadding: a.string,
|
|
87
|
+
maxResponsePerZone: a.number
|
|
88
|
+
};
|
|
89
|
+
//#endregion
|
|
90
|
+
export { f as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/image-cloze-association/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
|
+
export default class ImageClozeAssociation extends HTMLElement {
|
|
10
|
+
constructor();
|
|
11
|
+
set model(m: any);
|
|
12
|
+
isComplete(): any;
|
|
13
|
+
set session(s: any);
|
|
14
|
+
get session(): any;
|
|
15
|
+
updateAnswer(data: any): void;
|
|
16
|
+
_createAudioInfoToast(): HTMLDivElement;
|
|
17
|
+
connectedCallback(): void;
|
|
18
|
+
disconnectedCallback(): void;
|
|
19
|
+
_render(): void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/delivery/index.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAsCH,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAW;;IAM5D,IAAI,KAAK,CAAC,CAAC,KAAA,EAKV;IAED,UAAU;IAkEV,IAAI,OAAO,CAAC,CAAC,KAAA,EAOZ;IAED,IAAI,OAAO,QAEV;IAED,YAAY,CAAC,IAAI,KAAA;IASjB,qBAAqB;IA2BrB,iBAAiB;IA6EjB,oBAAoB;IAcpB,OAAO;CAiBR"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import e from "./root.js";
|
|
2
|
+
import t from "react";
|
|
3
|
+
import { createRoot as n } from "react-dom/client";
|
|
4
|
+
import { renderMath as r } from "@pie-element/shared-math-rendering-mathjax";
|
|
5
|
+
import * as i from "@pie-lib/render-ui";
|
|
6
|
+
import { EnableAudioAutoplayImage as a } from "@pie-lib/render-ui";
|
|
7
|
+
import { ModelSetEvent as o, SessionChangedEvent as s } from "@pie-element/shared-player-events";
|
|
8
|
+
//#region src/delivery/index.ts
|
|
9
|
+
function c(e) {
|
|
10
|
+
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
11
|
+
}
|
|
12
|
+
function l(e, t) {
|
|
13
|
+
return !e || c(e) ? e : c(e.default) ? e.default : t && c(e[t]) ? e[t] : t && c(e[t]?.default) ? e[t].default : e;
|
|
14
|
+
}
|
|
15
|
+
var u = l(a, "EnableAudioAutoplayImage") || l(p.EnableAudioAutoplayImage, "EnableAudioAutoplayImage"), d = i, f = d.default, p = f && typeof f == "object" ? f : d, m = class extends HTMLElement {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(), this._root = null;
|
|
18
|
+
}
|
|
19
|
+
set model(e) {
|
|
20
|
+
this._model = e, this.dispatchEvent(new o(this.tagName.toLowerCase(), this.isComplete(), !!this._model)), this._render();
|
|
21
|
+
}
|
|
22
|
+
isComplete() {
|
|
23
|
+
let { autoplayAudioEnabled: e, completeAudioEnabled: t, completeResponses: n, duplicateResponses: r, hasUnplacedChoices: i, maxResponsePerZone: a, responseAreasToBeFilled: o } = this._model || {}, s = this;
|
|
24
|
+
if (e && t && !this.audioComplete && s) {
|
|
25
|
+
let e = s.querySelector("audio"), t = e && e.closest("#preview-prompt");
|
|
26
|
+
if (e && t) return !1;
|
|
27
|
+
}
|
|
28
|
+
if (!this._session || !this._session.answers) return !1;
|
|
29
|
+
let { answers: c } = this._session;
|
|
30
|
+
if (!Array.isArray(c)) return !1;
|
|
31
|
+
let l = [...new Map(c.map((e) => [e.containerIndex, e])).values()].length >= o;
|
|
32
|
+
if (a > 1) {
|
|
33
|
+
if (r || i) return l;
|
|
34
|
+
let e = c.map((e) => e.value);
|
|
35
|
+
return n.some((t) => t.every((t) => e.includes(t)));
|
|
36
|
+
}
|
|
37
|
+
return l;
|
|
38
|
+
}
|
|
39
|
+
set session(e) {
|
|
40
|
+
e && !e.answers && (e.answers = []), this._session = e, this._render();
|
|
41
|
+
}
|
|
42
|
+
get session() {
|
|
43
|
+
return this._session;
|
|
44
|
+
}
|
|
45
|
+
updateAnswer(e) {
|
|
46
|
+
this._session.answers = e, this._session.selector = "Mouse", this.dispatchEvent(new s(this.tagName.toLowerCase(), this.isComplete())), this._render();
|
|
47
|
+
}
|
|
48
|
+
_createAudioInfoToast() {
|
|
49
|
+
let e = document.createElement("div");
|
|
50
|
+
e.id = "play-audio-info", Object.assign(e.style, {
|
|
51
|
+
position: "absolute",
|
|
52
|
+
top: 0,
|
|
53
|
+
width: "100%",
|
|
54
|
+
height: "100%",
|
|
55
|
+
display: "flex",
|
|
56
|
+
justifyContent: "center",
|
|
57
|
+
alignItems: "center",
|
|
58
|
+
background: "white",
|
|
59
|
+
zIndex: "1000",
|
|
60
|
+
cursor: "pointer"
|
|
61
|
+
});
|
|
62
|
+
let t = document.createElement("img");
|
|
63
|
+
return t.src = u, t.alt = "Click anywhere to enable audio autoplay", t.width = 500, t.height = 300, e.appendChild(t), e;
|
|
64
|
+
}
|
|
65
|
+
connectedCallback() {
|
|
66
|
+
this._render(), new MutationObserver((e, t) => {
|
|
67
|
+
e.forEach((e) => {
|
|
68
|
+
if (e.type === "childList") {
|
|
69
|
+
let e = this.querySelector("audio"), n = e && e.closest("#preview-prompt");
|
|
70
|
+
if (!this._model || !this._model.autoplayAudioEnabled || e && !n || !e) return;
|
|
71
|
+
let r = this._createAudioInfoToast(), i = this.querySelector("#main-container"), a = () => {
|
|
72
|
+
this.querySelector("#play-audio-info") && (e.play(), i.removeChild(r)), document.removeEventListener("click", a);
|
|
73
|
+
};
|
|
74
|
+
setTimeout(() => {
|
|
75
|
+
e.paused && !this.querySelector("#play-audio-info") ? (i.appendChild(r), document.addEventListener("click", a)) : document.removeEventListener("click", a);
|
|
76
|
+
}, 500);
|
|
77
|
+
let o = () => {
|
|
78
|
+
let t = this.querySelector("#play-audio-info");
|
|
79
|
+
t && i.removeChild(t), e.removeEventListener("playing", o);
|
|
80
|
+
};
|
|
81
|
+
e.addEventListener("playing", o);
|
|
82
|
+
let c = () => {
|
|
83
|
+
this.audioComplete = !0, this.dispatchEvent(new s(this.tagName.toLowerCase(), this.isComplete())), e.removeEventListener("ended", c);
|
|
84
|
+
};
|
|
85
|
+
e.addEventListener("ended", c), this._audio = e, this._handlePlaying = o, this._handleEnded = c, this._enableAudio = a, t.disconnect();
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}).observe(this, {
|
|
89
|
+
childList: !0,
|
|
90
|
+
subtree: !0
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
disconnectedCallback() {
|
|
94
|
+
document.removeEventListener("click", this._enableAudio), this._audio &&= (this._audio.removeEventListener("playing", this._handlePlaying), this._audio.removeEventListener("ended", this._handleEnded), null), this._root && this._root.unmount();
|
|
95
|
+
}
|
|
96
|
+
_render() {
|
|
97
|
+
if (this._model && this._session) {
|
|
98
|
+
let i = t.createElement(e, {
|
|
99
|
+
model: this._model,
|
|
100
|
+
session: this._session,
|
|
101
|
+
updateAnswer: this.updateAnswer.bind(this)
|
|
102
|
+
});
|
|
103
|
+
this._root ||= n(this), this._root.render(i), queueMicrotask(() => {
|
|
104
|
+
r(this);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
//#endregion
|
|
110
|
+
export { m as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/image-cloze-association/src/interactive-section.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
|
+
declare class InteractiveSection extends React.Component {
|
|
11
|
+
getClassname(): string;
|
|
12
|
+
getPositionDirection(choicePosition: any): string;
|
|
13
|
+
render(): React.JSX.Element;
|
|
14
|
+
}
|
|
15
|
+
export default InteractiveSection;
|
|
16
|
+
//# sourceMappingURL=interactive-section.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interactive-section.d.ts","sourceRoot":"","sources":["../../src/delivery/interactive-section.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAsB1B,cAAM,kBAAmB,SAAQ,KAAK,CAAC,SAAS;IAC9C,YAAY;IAkBZ,oBAAoB,CAAC,cAAc,KAAA;IAsBnC,MAAM;CAkBP;AAYD,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import e from "./evaluation-icon.js";
|
|
2
|
+
import t from "react";
|
|
3
|
+
import { color as n } from "@pie-lib/render-ui";
|
|
4
|
+
import r from "prop-types";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
import { styled as o } from "@mui/material/styles";
|
|
7
|
+
//#region src/delivery/interactive-section.tsx
|
|
8
|
+
var s = o("div")(({ theme: e }) => ({
|
|
9
|
+
marginTop: e.spacing(2),
|
|
10
|
+
display: "flex",
|
|
11
|
+
width: "fit-content",
|
|
12
|
+
"&.default": { border: `1px solid ${n.disabled()}` },
|
|
13
|
+
"&.correct": { border: `2px solid ${n.correct()}` },
|
|
14
|
+
"&.incorrect": { border: `2px solid ${n.incorrect()}` }
|
|
15
|
+
})), c = class extends t.Component {
|
|
16
|
+
getClassname() {
|
|
17
|
+
let { responseCorrect: e } = this.props, t;
|
|
18
|
+
switch (e) {
|
|
19
|
+
case void 0:
|
|
20
|
+
t = "default";
|
|
21
|
+
break;
|
|
22
|
+
case !0:
|
|
23
|
+
t = "correct";
|
|
24
|
+
break;
|
|
25
|
+
default:
|
|
26
|
+
t = "incorrect";
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
return t;
|
|
30
|
+
}
|
|
31
|
+
getPositionDirection(e) {
|
|
32
|
+
let t;
|
|
33
|
+
switch (e) {
|
|
34
|
+
case "left":
|
|
35
|
+
t = "row-reverse";
|
|
36
|
+
break;
|
|
37
|
+
case "right":
|
|
38
|
+
t = "row";
|
|
39
|
+
break;
|
|
40
|
+
case "top":
|
|
41
|
+
t = "column-reverse";
|
|
42
|
+
break;
|
|
43
|
+
default:
|
|
44
|
+
t = "column";
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
return t;
|
|
48
|
+
}
|
|
49
|
+
render() {
|
|
50
|
+
let { children: t, responseCorrect: n, uiStyle: r } = this.props, o = this.getClassname(), { possibilityListPosition: c = "bottom" } = r || {};
|
|
51
|
+
return /* @__PURE__ */ a(s, {
|
|
52
|
+
className: o,
|
|
53
|
+
style: { flexDirection: this.getPositionDirection(c) },
|
|
54
|
+
children: [/* @__PURE__ */ i(e, {
|
|
55
|
+
containerStyle: {
|
|
56
|
+
display: "flex",
|
|
57
|
+
margin: "0 auto",
|
|
58
|
+
marginTop: -14
|
|
59
|
+
},
|
|
60
|
+
filled: !0,
|
|
61
|
+
isCorrect: n
|
|
62
|
+
}), t]
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
c.propTypes = {
|
|
67
|
+
children: r.oneOfType([r.element, r.array]).isRequired,
|
|
68
|
+
responseCorrect: r.oneOfType([r.bool, r.number]),
|
|
69
|
+
uiStyle: r.object
|
|
70
|
+
}, c.defaultProps = { responseCorrect: void 0 };
|
|
71
|
+
//#endregion
|
|
72
|
+
export { c as default };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/image-cloze-association/src/possible-response.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 PossibleResponse: {
|
|
12
|
+
({ canDrag, containerStyle, data, onDragBegin, answerChoiceTransparency, isOverlay }: {
|
|
13
|
+
canDrag: any;
|
|
14
|
+
containerStyle: any;
|
|
15
|
+
data: any;
|
|
16
|
+
onDragBegin: any;
|
|
17
|
+
answerChoiceTransparency: any;
|
|
18
|
+
isOverlay: any;
|
|
19
|
+
}): React.JSX.Element;
|
|
20
|
+
propTypes: {
|
|
21
|
+
canDrag: PropTypes.Validator<boolean>;
|
|
22
|
+
containerStyle: PropTypes.Requireable<object>;
|
|
23
|
+
data: PropTypes.Validator<object>;
|
|
24
|
+
onDragBegin: PropTypes.Validator<(...args: any[]) => any>;
|
|
25
|
+
answerChoiceTransparency: PropTypes.Requireable<boolean>;
|
|
26
|
+
isOverlay: PropTypes.Requireable<boolean>;
|
|
27
|
+
};
|
|
28
|
+
defaultProps: {
|
|
29
|
+
containerStyle: {};
|
|
30
|
+
answerChoiceTransparency: boolean;
|
|
31
|
+
isOverlay: boolean;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export default PossibleResponse;
|
|
35
|
+
//# sourceMappingURL=possible-response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"possible-response.d.ts","sourceRoot":"","sources":["../../src/delivery/possible-response.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,SAAS,MAAM,YAAY,CAAC;AAmDnC,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;CAkFrB,CAAC;AAiBF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import e from "./evaluation-icon.js";
|
|
2
|
+
import t from "./static-html-span.js";
|
|
3
|
+
import { useEffect as n, useRef as r } from "react";
|
|
4
|
+
import { color as i } from "@pie-lib/render-ui";
|
|
5
|
+
import a from "prop-types";
|
|
6
|
+
import { useDraggable as o } from "@dnd-kit/core";
|
|
7
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
import { styled as l } from "@mui/material/styles";
|
|
9
|
+
import u from "classnames";
|
|
10
|
+
//#region src/delivery/possible-response.tsx
|
|
11
|
+
var d = l("div")(() => ({
|
|
12
|
+
position: "relative",
|
|
13
|
+
backgroundColor: i.white(),
|
|
14
|
+
border: `1px solid ${i.borderDark()}`,
|
|
15
|
+
display: "flex",
|
|
16
|
+
alignItems: "center",
|
|
17
|
+
justifyContent: "center",
|
|
18
|
+
minHeight: "28px",
|
|
19
|
+
width: "fit-content",
|
|
20
|
+
"& span img": { pointerEvents: "none" },
|
|
21
|
+
"&.textAnswerChoiceStyle": {
|
|
22
|
+
padding: "0 10px",
|
|
23
|
+
margin: "4px 6px !important"
|
|
24
|
+
},
|
|
25
|
+
"&.answerChoiceTransparency": {
|
|
26
|
+
border: "none",
|
|
27
|
+
backgroundColor: `${i.transparent()}`,
|
|
28
|
+
"&:hover": { border: `1px solid ${i.borderDark()}` }
|
|
29
|
+
},
|
|
30
|
+
"&.baseCorrect": { border: `2px solid ${i.correct()} !important` },
|
|
31
|
+
"&.baseIncorrect": { border: `2px solid ${i.incorrect()} !important` }
|
|
32
|
+
})), f = l(t)(() => ({
|
|
33
|
+
cursor: "grab",
|
|
34
|
+
backgroundColor: i.background(),
|
|
35
|
+
"&.hiddenSpan": { visibility: "hidden" }
|
|
36
|
+
})), p = ({ canDrag: t, containerStyle: i, data: a, onDragBegin: l, answerChoiceTransparency: p, isOverlay: m }) => {
|
|
37
|
+
let h = r(null), g = r(null), { setNodeRef: _, attributes: v, listeners: y, isDragging: b } = o({
|
|
38
|
+
id: `possible-response-${a.id}`,
|
|
39
|
+
data: {
|
|
40
|
+
id: a.id,
|
|
41
|
+
value: a.value,
|
|
42
|
+
containerIndex: a.containerIndex
|
|
43
|
+
},
|
|
44
|
+
disabled: !t
|
|
45
|
+
}), x = () => {
|
|
46
|
+
clearTimeout(g.current);
|
|
47
|
+
}, S = () => {
|
|
48
|
+
clearTimeout(g.current);
|
|
49
|
+
}, C = (e) => {
|
|
50
|
+
e.preventDefault(), g.current = setTimeout(() => {
|
|
51
|
+
t && h.current && l(a);
|
|
52
|
+
}, 500);
|
|
53
|
+
};
|
|
54
|
+
n(() => {
|
|
55
|
+
let e = h.current;
|
|
56
|
+
if (e) return e.addEventListener("touchstart", C, { passive: !1 }), e.addEventListener("touchend", x), e.addEventListener("touchmove", S, { passive: !1 }), () => {
|
|
57
|
+
e.removeEventListener("touchstart", C), e.removeEventListener("touchend", x), e.removeEventListener("touchmove", S);
|
|
58
|
+
};
|
|
59
|
+
}, [t, a]);
|
|
60
|
+
let { isCorrect: w } = a || {}, T = {
|
|
61
|
+
fontSize: 14,
|
|
62
|
+
position: "absolute",
|
|
63
|
+
bottom: "3px",
|
|
64
|
+
right: "3px"
|
|
65
|
+
}, E = w === !0 ? "baseCorrect" : w === !1 ? "baseIncorrect" : void 0, D = /<img[^>]+src="([^">]+)"/.test(a.value), O = u({
|
|
66
|
+
answerChoiceTransparency: p && !b,
|
|
67
|
+
[E]: !!E,
|
|
68
|
+
textAnswerChoiceStyle: !D && !m
|
|
69
|
+
}), k = u({ hiddenSpan: a.hidden });
|
|
70
|
+
return /* @__PURE__ */ c(d, {
|
|
71
|
+
className: O,
|
|
72
|
+
style: i,
|
|
73
|
+
ref: (e) => {
|
|
74
|
+
h.current = e, _(e);
|
|
75
|
+
},
|
|
76
|
+
...y,
|
|
77
|
+
...v,
|
|
78
|
+
children: [/* @__PURE__ */ s(f, {
|
|
79
|
+
html: a.value,
|
|
80
|
+
className: k
|
|
81
|
+
}), /* @__PURE__ */ s(e, {
|
|
82
|
+
isCorrect: a.isCorrect,
|
|
83
|
+
containerStyle: T
|
|
84
|
+
})]
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
p.propTypes = {
|
|
88
|
+
canDrag: a.bool.isRequired,
|
|
89
|
+
containerStyle: a.object,
|
|
90
|
+
data: a.object.isRequired,
|
|
91
|
+
onDragBegin: a.func.isRequired,
|
|
92
|
+
answerChoiceTransparency: a.bool,
|
|
93
|
+
isOverlay: a.bool
|
|
94
|
+
}, p.defaultProps = {
|
|
95
|
+
containerStyle: {},
|
|
96
|
+
answerChoiceTransparency: !1,
|
|
97
|
+
isOverlay: !1
|
|
98
|
+
};
|
|
99
|
+
//#endregion
|
|
100
|
+
export { p as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/image-cloze-association/src/possible-responses.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 PossibleResponses: {
|
|
12
|
+
({ canDrag, data, onDragBegin, answerChoiceTransparency, customStyle, isVertical, minHeight, }: {
|
|
13
|
+
canDrag: any;
|
|
14
|
+
data: any;
|
|
15
|
+
onDragBegin: any;
|
|
16
|
+
answerChoiceTransparency: any;
|
|
17
|
+
customStyle: any;
|
|
18
|
+
isVertical: any;
|
|
19
|
+
minHeight: any;
|
|
20
|
+
}): React.JSX.Element;
|
|
21
|
+
propTypes: {
|
|
22
|
+
canDrag: PropTypes.Validator<boolean>;
|
|
23
|
+
data: PropTypes.Validator<any[]>;
|
|
24
|
+
onDragBegin: PropTypes.Validator<(...args: any[]) => any>;
|
|
25
|
+
answerChoiceTransparency: PropTypes.Requireable<boolean>;
|
|
26
|
+
customStyle: PropTypes.Requireable<object>;
|
|
27
|
+
isVertical: PropTypes.Requireable<boolean>;
|
|
28
|
+
minHeight: PropTypes.Requireable<number>;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export default PossibleResponses;
|
|
32
|
+
//# sourceMappingURL=possible-responses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"possible-responses.d.ts","sourceRoot":"","sources":["../../src/delivery/possible-responses.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAenC,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;CAuBtB,CAAC;AAYF,eAAe,iBAAiB,CAAC"}
|