@pie-element/explicit-constructed-response 11.1.0-next.19 → 11.1.1-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.js +4 -0
- package/dist/author/alternateResponses.d.ts +34 -0
- package/dist/author/alternateResponses.js +116 -0
- package/dist/author/alternateSection.d.ts +58 -0
- package/dist/author/alternateSection.js +215 -0
- package/dist/author/defaults.d.ts +186 -0
- package/dist/author/defaults.js +128 -0
- package/dist/author/ecr-toolbar.d.ts +41 -0
- package/dist/author/ecr-toolbar.js +100 -0
- package/dist/author/index.d.ts +42 -0
- package/dist/author/index.js +94 -0
- package/dist/author/main.d.ts +38 -0
- package/dist/author/main.js +323 -0
- package/dist/author/markupUtils.d.ts +14 -0
- package/dist/author/markupUtils.js +13 -0
- package/dist/author/utils.d.ts +9 -0
- package/dist/author/utils.js +7 -0
- package/dist/controller/defaults.d.ts +25 -0
- package/dist/controller/defaults.js +19 -0
- package/dist/controller/index.d.ts +64 -0
- package/dist/controller/index.js +142 -0
- package/dist/delivery/index.d.ts +20 -0
- package/dist/delivery/index.js +66 -0
- package/dist/delivery/main.d.ts +48 -0
- package/dist/delivery/main.js +117 -0
- package/dist/explicit-constructed-response.css +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +364 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/he@1.2.0/node_modules/he/he.js +3993 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_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/_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/_baseEach.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseExtremum.js +11 -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/_baseGt.js +6 -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/_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/_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/_basePick.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePickBy.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyOf.js +8 -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/_baseSet.js +22 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_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/_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/_createFind.js +19 -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/_escapeHtmlChar.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_flatRest.js +9 -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/_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/_stringToPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js +50 -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/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/escape.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/find.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/findIndex.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/flatten.js +7 -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/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/map.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/max.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/now.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/pick.js +8 -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/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/throttle.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toFinite.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toInteger.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +19 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +7 -0
- package/dist/print/index.d.ts +15 -0
- package/dist/print/index.js +40 -0
- package/package.json +57 -20
- package/CHANGELOG.json +0 -1102
- package/CHANGELOG.md +0 -2175
- package/LICENSE.md +0 -5
- package/README.md +0 -1
- package/configure/CHANGELOG.json +0 -652
- package/configure/CHANGELOG.md +0 -1917
- package/configure/lib/alternateResponses.js +0 -199
- package/configure/lib/alternateResponses.js.map +0 -1
- package/configure/lib/alternateSection.js +0 -329
- package/configure/lib/alternateSection.js.map +0 -1
- package/configure/lib/defaults.js +0 -184
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/ecr-toolbar.js +0 -181
- package/configure/lib/ecr-toolbar.js.map +0 -1
- package/configure/lib/index.js +0 -161
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/main.js +0 -514
- package/configure/lib/main.js.map +0 -1
- package/configure/lib/markupUtils.js +0 -70
- package/configure/lib/markupUtils.js.map +0 -1
- package/configure/lib/utils.js +0 -15
- package/configure/lib/utils.js.map +0 -1
- package/configure/package.json +0 -22
- package/controller/CHANGELOG.json +0 -517
- package/controller/CHANGELOG.md +0 -1333
- package/controller/lib/defaults.js +0 -23
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -368
- package/controller/lib/index.js.map +0 -1
- package/controller/package.json +0 -18
- package/docs/config-schema.json +0 -2629
- package/docs/config-schema.json.md +0 -1941
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -20
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -10
- package/docs/pie-schema.json +0 -1130
- package/docs/pie-schema.json.md +0 -814
- package/lib/index.js +0 -91
- package/lib/index.js.map +0 -1
- package/lib/main.js +0 -205
- package/lib/main.js.map +0 -1
- package/lib/print.js +0 -71
- package/lib/print.js.map +0 -1
- package/module/configure.js +0 -1
- package/module/controller.js +0 -6534
- package/module/demo.js +0 -45
- package/module/element.js +0 -1
- package/module/index.html +0 -21
- package/module/manifest.json +0 -18
- package/module/print-demo.js +0 -83
- package/module/print.html +0 -18
- package/module/print.js +0 -1
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js";
|
|
2
|
+
import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js";
|
|
3
|
+
import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/pick.js";
|
|
4
|
+
import r from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/throttle.js";
|
|
5
|
+
import { decodeHTML as i, getAdjustedLength as a } from "./markupUtils.js";
|
|
6
|
+
import o from "./ecr-toolbar.js";
|
|
7
|
+
import s from "./alternateResponses.js";
|
|
8
|
+
import { generateValidationMessage as c } from "./utils.js";
|
|
9
|
+
import l from "react";
|
|
10
|
+
import u from "prop-types";
|
|
11
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
12
|
+
import { styled as p } from "@mui/material/styles";
|
|
13
|
+
import m, { ALL_PLUGINS as h } from "@pie-lib/editable-html-tip-tap";
|
|
14
|
+
import { InputContainer as g, layout as ee, settings as _ } from "@pie-lib/config-ui";
|
|
15
|
+
import v from "@mui/material/Typography";
|
|
16
|
+
import y from "@mui/icons-material/Info";
|
|
17
|
+
import b from "@mui/material/Tooltip";
|
|
18
|
+
//#region src/author/main.tsx
|
|
19
|
+
var { toggle: x, Panel: te, dropdown: ne } = _, S = p(g)(({ theme: e }) => ({
|
|
20
|
+
width: "100%",
|
|
21
|
+
paddingTop: e.spacing(1),
|
|
22
|
+
marginTop: e.spacing(2),
|
|
23
|
+
marginBottom: e.spacing(2)
|
|
24
|
+
})), C = p(m)(({ theme: e }) => ({
|
|
25
|
+
minHeight: "100px",
|
|
26
|
+
paddingTop: e.spacing(1),
|
|
27
|
+
width: "100%",
|
|
28
|
+
"& [data-slate-editor=\"true\"]": { minHeight: "100px" }
|
|
29
|
+
})), re = p(v)(({ theme: e }) => ({ fontSize: e.typography.fontSize + 2 })), ie = p(b)(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
|
|
30
|
+
fontSize: e.typography.fontSize - 2,
|
|
31
|
+
whiteSpace: "pre",
|
|
32
|
+
maxWidth: "500px"
|
|
33
|
+
} })), w = p("div")(({ theme: e }) => ({
|
|
34
|
+
fontSize: e.typography.fontSize - 2,
|
|
35
|
+
color: e.palette.error.main,
|
|
36
|
+
paddingTop: e.spacing(1)
|
|
37
|
+
})), T = p("div")({
|
|
38
|
+
display: "flex",
|
|
39
|
+
alignItems: "center"
|
|
40
|
+
}), E = p(v)(({ theme: e }) => ({
|
|
41
|
+
fontSize: e.typography.fontSize + 2,
|
|
42
|
+
marginTop: e.spacing(3),
|
|
43
|
+
marginBottom: e.spacing(1)
|
|
44
|
+
})), D = (e) => {
|
|
45
|
+
let t = document.createElement("div");
|
|
46
|
+
return t.innerHTML = e.trim(), t;
|
|
47
|
+
}, O = class extends l.Component {
|
|
48
|
+
static propTypes = {
|
|
49
|
+
configuration: u.object.isRequired,
|
|
50
|
+
model: u.object.isRequired,
|
|
51
|
+
disableSidePanel: u.bool,
|
|
52
|
+
onModelChanged: u.func.isRequired,
|
|
53
|
+
onConfigurationChanged: u.func.isRequired,
|
|
54
|
+
imageSupport: u.shape({
|
|
55
|
+
add: u.func.isRequired,
|
|
56
|
+
delete: u.func.isRequired
|
|
57
|
+
}),
|
|
58
|
+
uploadSoundSupport: u.object
|
|
59
|
+
};
|
|
60
|
+
state = {};
|
|
61
|
+
componentDidMount() {
|
|
62
|
+
let { model: { slateMarkup: e, choices: t, maxLengthPerChoice: n = [] }, onModelChanged: r } = this.props, o = !n.length;
|
|
63
|
+
this.setState({ markup: e }), Object.values(t).forEach((e, t) => {
|
|
64
|
+
let r = e.map((e) => i(e.label || "").length), s = Math.max(...r);
|
|
65
|
+
(o || !n[t] || n[t] < s || n[t] > s + 10) && (n[t] = a(s));
|
|
66
|
+
}), r({
|
|
67
|
+
...this.props.model,
|
|
68
|
+
maxLengthPerChoice: n
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
onModelChange = (e) => {
|
|
72
|
+
this.props.onModelChanged({
|
|
73
|
+
...this.props.model,
|
|
74
|
+
...e
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
onPromptChanged = (e) => {
|
|
78
|
+
this.props.onModelChanged({
|
|
79
|
+
...this.props.model,
|
|
80
|
+
prompt: e
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
onRationaleChanged = (e) => {
|
|
84
|
+
this.props.onModelChanged({
|
|
85
|
+
...this.props.model,
|
|
86
|
+
rationale: e
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
onTeacherInstructionsChanged = (e) => {
|
|
90
|
+
let { model: t, onModelChanged: n } = this.props;
|
|
91
|
+
n({
|
|
92
|
+
...t,
|
|
93
|
+
teacherInstructions: e
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
onMarkupChanged = (e) => {
|
|
97
|
+
this.props.onModelChanged({
|
|
98
|
+
...this.props.model,
|
|
99
|
+
slateMarkup: e
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
onResponsesChanged = (e) => {
|
|
103
|
+
this.props.onModelChanged({
|
|
104
|
+
...this.props.model,
|
|
105
|
+
choices: e
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
onLengthChanged = (e) => {
|
|
109
|
+
let { model: t, onModelChanged: n } = this.props;
|
|
110
|
+
n({
|
|
111
|
+
...t,
|
|
112
|
+
maxLengthPerChoice: e
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
onChangeResponse = (e, t) => {
|
|
116
|
+
let { model: n, onModelChanged: r } = this.props, { choices: o } = n, { maxLengthPerChoice: s } = n, c = i(t || "").length;
|
|
117
|
+
if (!o[e] || !o[e].length) {
|
|
118
|
+
o[e] = [{
|
|
119
|
+
label: t || "",
|
|
120
|
+
value: "0"
|
|
121
|
+
}];
|
|
122
|
+
let n = e > s.length ? e - s.length : 0;
|
|
123
|
+
s = [...s, ...Array(n).fill(1)], s.splice(e, 0, a(c));
|
|
124
|
+
} else o[e][0].label = t || "", s && (s[e] < c || s[e] > c + 10) && (s[e] = a(c));
|
|
125
|
+
r({
|
|
126
|
+
...n,
|
|
127
|
+
choices: o,
|
|
128
|
+
maxLengthPerChoice: s
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
onChange = (t) => {
|
|
132
|
+
let { model: { choices: n, maxLengthPerChoice: r }, onModelChanged: i } = this.props, a = D(t), o = a.querySelectorAll("[data-type=\"explicit_constructed_response\"]"), s = {}, c = [];
|
|
133
|
+
o.forEach((t, i) => {
|
|
134
|
+
let a = e(n[t.dataset.index]);
|
|
135
|
+
a && (a[0] = {
|
|
136
|
+
label: t.dataset.value || "",
|
|
137
|
+
value: "0"
|
|
138
|
+
}, c[i] = r[t.dataset.index]), s[i] = a, t.dataset.index = i;
|
|
139
|
+
}), this.setState({ cachedChoices: void 0 }, () => i({
|
|
140
|
+
...this.props.model,
|
|
141
|
+
choices: s,
|
|
142
|
+
slateMarkup: a.innerHTML,
|
|
143
|
+
maxLengthPerChoice: c
|
|
144
|
+
}));
|
|
145
|
+
};
|
|
146
|
+
onHandleAreaChange = r((t) => {
|
|
147
|
+
let { model: { choices: r }, onModelChanged: i } = this.props, { cachedChoices: a } = this.state;
|
|
148
|
+
if (!t) return;
|
|
149
|
+
let o = r ? e(r) : {}, s = a ? e(a) : {};
|
|
150
|
+
t.forEach((e) => {
|
|
151
|
+
let t = e.index;
|
|
152
|
+
!o[t] && s[t] ? (Object.assign(o, n(s, t)), Object.prototype.hasOwnProperty.call(s, t) && delete s[t]) : (Object.assign(s, n(o, t)), Object.prototype.hasOwnProperty.call(o, t) && delete o[t]);
|
|
153
|
+
}), this.setState({ cachedChoices: s }, () => i({
|
|
154
|
+
...this.props.model,
|
|
155
|
+
choices: o
|
|
156
|
+
}));
|
|
157
|
+
}, 500, {
|
|
158
|
+
trailing: !1,
|
|
159
|
+
leading: !0
|
|
160
|
+
});
|
|
161
|
+
render() {
|
|
162
|
+
let { model: e, configuration: n, onConfigurationChanged: r, imageSupport: i, uploadSoundSupport: a } = this.props, { baseInputConfiguration: l = {}, contentDimensions: u = {}, maxImageWidth: p = {}, maxImageHeight: g = {}, maxLengthPerChoice: _ = {}, maxResponseAreas: v, partialScoring: b = {}, playerSpellCheck: D = {}, prompt: O = {}, rationale: k = {}, template: ae = {}, settingsPanelDisabled: oe, spellCheck: A = {}, editSource: j = {}, teacherInstructions: M = {}, withRubric: N = {}, mathMlOptions: P = {}, language: F = {}, languageChoices: I = {}, spanishButton: L = {}, responseAreaInputConfiguration: R = {} } = n || {}, { errors: z, extraCSSRules: B, maxLengthPerChoiceEnabled: V, promptEnabled: H, rationaleEnabled: U, spellCheckEnabled: W, teacherInstructionsEnabled: se, toolbarEditorPosition: ce } = e || {}, { choices: G = {}, prompt: K, rationale: q, responseAreas: J, teacherInstructions: Y } = z || {}, le = c(n), X = p && p.prompt, Z = g && g.prompt, Q = { position: ce === "top" ? "top" : "bottom" }, ue = {
|
|
163
|
+
partialScoring: b.settings && x(b.label),
|
|
164
|
+
maxLengthPerChoiceEnabled: _.settings && x(_.label),
|
|
165
|
+
"language.enabled": F.settings && x(F.label, !0),
|
|
166
|
+
language: F.settings && F.enabled && ne(I.label, I.options),
|
|
167
|
+
"responseAreaInputConfiguration.inputConfiguration.characters.disabled": L.settings && x(L.label, !0)
|
|
168
|
+
}, de = {
|
|
169
|
+
teacherInstructionsEnabled: M.settings && x(M.label),
|
|
170
|
+
rationaleEnabled: k.settings && x(k.label),
|
|
171
|
+
promptEnabled: O.settings && x(O.label),
|
|
172
|
+
spellCheckEnabled: A.settings && x(A.label),
|
|
173
|
+
playerSpellCheckEnabled: D.settings && x(D.label),
|
|
174
|
+
rubricEnabled: N?.settings && x(N?.label),
|
|
175
|
+
"editSource.enabled": j?.settings && x(j.label, !0)
|
|
176
|
+
}, $ = (e = {}) => ({
|
|
177
|
+
...l,
|
|
178
|
+
...e
|
|
179
|
+
});
|
|
180
|
+
return /* @__PURE__ */ f(ee.ConfigLayout, {
|
|
181
|
+
extraCSSRules: B,
|
|
182
|
+
dimensions: u,
|
|
183
|
+
hideSettings: oe,
|
|
184
|
+
settings: /* @__PURE__ */ d(te, {
|
|
185
|
+
model: e,
|
|
186
|
+
configuration: n,
|
|
187
|
+
onChangeModel: (e) => this.onModelChange(e),
|
|
188
|
+
onChangeConfiguration: (e) => r(e, !0),
|
|
189
|
+
groups: {
|
|
190
|
+
Settings: ue,
|
|
191
|
+
Properties: de
|
|
192
|
+
}
|
|
193
|
+
}),
|
|
194
|
+
children: [
|
|
195
|
+
se && /* @__PURE__ */ f(S, {
|
|
196
|
+
label: M.label,
|
|
197
|
+
children: [/* @__PURE__ */ d(m, {
|
|
198
|
+
className: "prompt",
|
|
199
|
+
markup: e.teacherInstructions || "",
|
|
200
|
+
onChange: this.onTeacherInstructionsChanged,
|
|
201
|
+
imageSupport: i,
|
|
202
|
+
nonEmpty: !1,
|
|
203
|
+
error: Y,
|
|
204
|
+
toolbarOpts: Q,
|
|
205
|
+
pluginProps: $(M?.inputConfiguration),
|
|
206
|
+
spellCheck: W,
|
|
207
|
+
maxImageWidth: p && p.teacherInstructions || X,
|
|
208
|
+
maxImageHeight: g && g.teacherInstructions || Z,
|
|
209
|
+
uploadSoundSupport: a,
|
|
210
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
211
|
+
mathMlOptions: P,
|
|
212
|
+
autoWidthToolbar: !0
|
|
213
|
+
}), Y && /* @__PURE__ */ d(w, { children: Y })]
|
|
214
|
+
}),
|
|
215
|
+
H && /* @__PURE__ */ f(S, {
|
|
216
|
+
label: O.label,
|
|
217
|
+
children: [/* @__PURE__ */ d(m, {
|
|
218
|
+
className: "prompt",
|
|
219
|
+
markup: e.prompt,
|
|
220
|
+
onChange: this.onPromptChanged,
|
|
221
|
+
imageSupport: i,
|
|
222
|
+
nonEmpty: !1,
|
|
223
|
+
disableUnderline: !0,
|
|
224
|
+
error: K,
|
|
225
|
+
toolbarOpts: Q,
|
|
226
|
+
pluginProps: $(O?.inputConfiguration),
|
|
227
|
+
spellCheck: W,
|
|
228
|
+
maxImageWidth: X,
|
|
229
|
+
maxImageHeight: Z,
|
|
230
|
+
uploadSoundSupport: a,
|
|
231
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
232
|
+
mathMlOptions: P,
|
|
233
|
+
autoWidthToolbar: !0
|
|
234
|
+
}), K && /* @__PURE__ */ d(w, { children: K })]
|
|
235
|
+
}),
|
|
236
|
+
/* @__PURE__ */ f(T, { children: [/* @__PURE__ */ d(re, {
|
|
237
|
+
component: "div",
|
|
238
|
+
children: "Define Template, Choices, and Correct Responses"
|
|
239
|
+
}), /* @__PURE__ */ d(ie, {
|
|
240
|
+
disableFocusListener: !0,
|
|
241
|
+
disableTouchListener: !0,
|
|
242
|
+
placement: "right",
|
|
243
|
+
title: le,
|
|
244
|
+
children: /* @__PURE__ */ d(y, {
|
|
245
|
+
fontSize: "small",
|
|
246
|
+
color: "primary",
|
|
247
|
+
style: { marginLeft: "8px" }
|
|
248
|
+
})
|
|
249
|
+
})] }),
|
|
250
|
+
/* @__PURE__ */ d(C, {
|
|
251
|
+
activePlugins: h,
|
|
252
|
+
toolbarOpts: { position: "top" },
|
|
253
|
+
spellCheck: W,
|
|
254
|
+
pluginProps: $(ae?.inputConfiguration),
|
|
255
|
+
responseAreaProps: {
|
|
256
|
+
type: "explicit-constructed-response",
|
|
257
|
+
options: { duplicates: !0 },
|
|
258
|
+
maxResponseAreas: v,
|
|
259
|
+
respAreaToolbar: (e, t, n) => {
|
|
260
|
+
let [r, i] = e, { model: a } = this.props, s = (a.choices[r.attrs.index] || [])[0];
|
|
261
|
+
return () => /* @__PURE__ */ d(o, {
|
|
262
|
+
onChangeResponse: (e) => this.onChangeResponse(r.attrs.index, e),
|
|
263
|
+
node: r,
|
|
264
|
+
pos: i,
|
|
265
|
+
editor: t,
|
|
266
|
+
onToolbarDone: n,
|
|
267
|
+
correctChoice: s,
|
|
268
|
+
maxLengthPerChoiceEnabled: V,
|
|
269
|
+
pluginProps: $(R?.inputConfiguration)
|
|
270
|
+
});
|
|
271
|
+
},
|
|
272
|
+
error: () => G,
|
|
273
|
+
onHandleAreaChange: this.onHandleAreaChange
|
|
274
|
+
},
|
|
275
|
+
markup: e.slateMarkup,
|
|
276
|
+
onChange: this.onChange,
|
|
277
|
+
imageSupport: i,
|
|
278
|
+
disableImageAlignmentButtons: !0,
|
|
279
|
+
onBlur: this.onBlur,
|
|
280
|
+
disabled: !1,
|
|
281
|
+
highlightShape: !1,
|
|
282
|
+
error: J,
|
|
283
|
+
uploadSoundSupport: a,
|
|
284
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
285
|
+
mathMlOptions: P,
|
|
286
|
+
autoWidthToolbar: !0
|
|
287
|
+
}),
|
|
288
|
+
J && /* @__PURE__ */ d(w, { children: J }),
|
|
289
|
+
!t(e.choices) && /* @__PURE__ */ d(E, { children: `Define Alternates ${V ? "and Character Limits" : ""}` }),
|
|
290
|
+
/* @__PURE__ */ d(s, {
|
|
291
|
+
model: e,
|
|
292
|
+
onChange: this.onResponsesChanged,
|
|
293
|
+
onLengthChange: this.onLengthChanged,
|
|
294
|
+
maxLengthPerChoiceEnabled: V,
|
|
295
|
+
spellCheck: W,
|
|
296
|
+
choicesErrors: G,
|
|
297
|
+
pluginProps: $(R?.inputConfiguration)
|
|
298
|
+
}),
|
|
299
|
+
U && /* @__PURE__ */ f(S, {
|
|
300
|
+
label: k.label,
|
|
301
|
+
children: [/* @__PURE__ */ d(m, {
|
|
302
|
+
className: "prompt",
|
|
303
|
+
markup: e.rationale || "",
|
|
304
|
+
onChange: this.onRationaleChanged,
|
|
305
|
+
imageSupport: i,
|
|
306
|
+
error: q,
|
|
307
|
+
toolbarOpts: Q,
|
|
308
|
+
pluginProps: $(k?.inputConfiguration),
|
|
309
|
+
spellCheck: W,
|
|
310
|
+
maxImageWidth: p && p.rationale || X,
|
|
311
|
+
maxImageHeight: g && g.rationale || Z,
|
|
312
|
+
uploadSoundSupport: a,
|
|
313
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
314
|
+
mathMlOptions: P,
|
|
315
|
+
autoWidthToolbar: !0
|
|
316
|
+
}), q && /* @__PURE__ */ d(w, { children: q })]
|
|
317
|
+
})
|
|
318
|
+
]
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
//#endregion
|
|
323
|
+
export { O as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/explicit-constructed-response/configure/src/markupUtils.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 removeUnwantedCharacters: (markup: any) => any;
|
|
10
|
+
export declare const processMarkup: (markup: any) => string;
|
|
11
|
+
export declare const createSlateMarkup: (markup: any, choices: any) => any;
|
|
12
|
+
export declare const getAdjustedLength: (length: any) => any;
|
|
13
|
+
export declare const stripHtmlTags: (markup: any) => string;
|
|
14
|
+
export declare const decodeHTML: (html: any) => string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/escape.js";
|
|
2
|
+
//#region src/author/markupUtils.tsx
|
|
3
|
+
var t = "imes|riangle|an|heta|herefore", n = "throot|parallel|cong|approx|eq|e|sim", r = RegExp(`(\\t(?!${t}))|(\\n(?!${n}))|(\\\\t(?!${t}))|(\\\\n(?!${n}))`, "g"), i = (e) => e.replace(r, "").replace(/\\"/g, "\"").replace(/\\\//g, "/"), a = (e = "") => {
|
|
4
|
+
let t = document.createElement("div");
|
|
5
|
+
return t.innerHTML = e.trim(), t;
|
|
6
|
+
}, o = (e) => {
|
|
7
|
+
let t = a(i(e || "") || ""), n = 0;
|
|
8
|
+
return t.querySelectorAll("[data-type=\"explicit_constructed_response\"]").forEach((e) => {
|
|
9
|
+
e.replaceWith(`{{${n++}}}`);
|
|
10
|
+
}), t.innerHTML;
|
|
11
|
+
}, s = /\{\{(\d+)\}\}/g, c = (t, n) => t ? i(t).replace(s, (t, r) => `<span data-type="explicit_constructed_response" data-index="${r}" data-value="${e(n[r][0].label || "")}"></span>`) : "", l = (e) => e <= 2 ? e + 2 : e <= 4 ? e + 3 : e <= 6 ? e + 4 : e + 5, u = (e) => typeof e == "string" ? e.replace(/<\/?[^>]+(>|$)/g, "") : "", d = (e) => new DOMParser().parseFromString(e, "text/html").body.textContent || "";
|
|
12
|
+
//#endregion
|
|
13
|
+
export { c as createSlateMarkup, d as decodeHTML, l as getAdjustedLength, o as processMarkup, u as stripHtmlTags };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/explicit-constructed-response/configure/src/utils.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
export declare const generateValidationMessage: (config: any) => string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/author/utils.ts
|
|
2
|
+
var e = (e) => {
|
|
3
|
+
let { maxResponseAreas: t } = e;
|
|
4
|
+
return "Validation requirements:" + ("\nCorrect answers should not be blank.\nEach answer defined for a response area should be unique.\nThere should be at least 1 " + (t ? `and at most ${t} ` : "") + "response area" + (t ? "s" : "") + " defined.");
|
|
5
|
+
};
|
|
6
|
+
//#endregion
|
|
7
|
+
export { e as generateValidationMessage };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/explicit-constructed-response/controller/src/defaults.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
declare const _default: {
|
|
10
|
+
choices: {};
|
|
11
|
+
displayType: string;
|
|
12
|
+
markup: string;
|
|
13
|
+
maxLengthPerChoiceEnabled: boolean;
|
|
14
|
+
playerSpellCheckEnabled: boolean;
|
|
15
|
+
prompt: string;
|
|
16
|
+
promptEnabled: boolean;
|
|
17
|
+
rationale: string;
|
|
18
|
+
rationaleEnabled: boolean;
|
|
19
|
+
spellCheckEnabled: boolean;
|
|
20
|
+
studentInstructionsEnabled: boolean;
|
|
21
|
+
teacherInstructions: string;
|
|
22
|
+
teacherInstructionsEnabled: boolean;
|
|
23
|
+
toolbarEditorPosition: string;
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/controller/defaults.ts
|
|
2
|
+
var e = {
|
|
3
|
+
choices: {},
|
|
4
|
+
displayType: "block",
|
|
5
|
+
markup: "",
|
|
6
|
+
maxLengthPerChoiceEnabled: !0,
|
|
7
|
+
playerSpellCheckEnabled: !0,
|
|
8
|
+
prompt: "",
|
|
9
|
+
promptEnabled: !0,
|
|
10
|
+
rationale: "",
|
|
11
|
+
rationaleEnabled: !0,
|
|
12
|
+
spellCheckEnabled: !0,
|
|
13
|
+
studentInstructionsEnabled: !0,
|
|
14
|
+
teacherInstructions: "",
|
|
15
|
+
teacherInstructionsEnabled: !0,
|
|
16
|
+
toolbarEditorPosition: "bottom"
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { e as default };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/explicit-constructed-response/controller/src/index.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
export declare const prepareChoice: (mode: any, defaultFeedback: any) => (choice: any) => {
|
|
10
|
+
label: any;
|
|
11
|
+
value: any;
|
|
12
|
+
};
|
|
13
|
+
export declare const normalize: (question: any) => any;
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @param {*} question
|
|
17
|
+
* @param {*} session
|
|
18
|
+
* @param {*} env
|
|
19
|
+
*/
|
|
20
|
+
export declare function model(question: any, session: any, env: any): Promise<{
|
|
21
|
+
choices: any;
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
displayType: any;
|
|
24
|
+
mode: any;
|
|
25
|
+
role: any;
|
|
26
|
+
feedback: any;
|
|
27
|
+
language: any;
|
|
28
|
+
markup: any;
|
|
29
|
+
maxLengthPerChoice: any;
|
|
30
|
+
maxLengthPerChoiceEnabled: any;
|
|
31
|
+
note: any;
|
|
32
|
+
playerSpellCheckEnabled: any;
|
|
33
|
+
prompt: any;
|
|
34
|
+
rationale: string;
|
|
35
|
+
responseCorrect: boolean | undefined;
|
|
36
|
+
showNote: boolean;
|
|
37
|
+
teacherInstructions: string;
|
|
38
|
+
responseAreaInputConfiguration: any;
|
|
39
|
+
extraCSSRules: any;
|
|
40
|
+
}>;
|
|
41
|
+
export declare const prepareVal: (html: any) => any;
|
|
42
|
+
export declare const getScore: (config: any, session: any) => number;
|
|
43
|
+
/**
|
|
44
|
+
* Generates detailed trace log for scoring evaluation
|
|
45
|
+
* @param {Object} model - the question model
|
|
46
|
+
* @param {Object} session - the student session
|
|
47
|
+
* @param {Object} env - the environment
|
|
48
|
+
* @returns {Array} traceLog - array of trace messages
|
|
49
|
+
*/
|
|
50
|
+
export declare const getLogTrace: (model: any, session: any, env: any) => string[];
|
|
51
|
+
/**
|
|
52
|
+
* The score is partial by default for checkbox mode, allOrNothing for radio mode.
|
|
53
|
+
* To disable partial scoring for checkbox mode you either set model.partialScoring = false or env.partialScoring =
|
|
54
|
+
* false. the value in `env` will override the value in `model`.
|
|
55
|
+
* @param {Object} model - the main model
|
|
56
|
+
* @param {boolean} model.partialScoring - is partial scoring enabled (if undefined set to to true)
|
|
57
|
+
* @param {*} session
|
|
58
|
+
* @param {Object} env
|
|
59
|
+
* @param {boolean} env.partialScoring - is partial scoring enabled (if undefined default to true) This overrides
|
|
60
|
+
* `model.partialScoring`.
|
|
61
|
+
*/
|
|
62
|
+
export declare function outcome(model: any, session: any, env?: {}): Promise<unknown>;
|
|
63
|
+
export declare const createCorrectResponseSession: (question: any, env: any) => Promise<unknown>;
|
|
64
|
+
export declare const validate: (model?: {}, config?: {}) => {};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/find.js";
|
|
2
|
+
import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js";
|
|
3
|
+
import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js";
|
|
4
|
+
import r from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js";
|
|
5
|
+
import { require_he as i } from "../node_modules/.bun/he@1.2.0/node_modules/he/he.js";
|
|
6
|
+
import a from "./defaults.js";
|
|
7
|
+
import o from "@pie-lib/translator";
|
|
8
|
+
import s from "debug";
|
|
9
|
+
import { partialScoring as c } from "@pie-element/shared-controller-utils";
|
|
10
|
+
//#region src/controller/index.ts
|
|
11
|
+
var l = i(), { translator: u } = o, d = s("explicit-constructed-response:controller"), f = (e, t) => (n) => {
|
|
12
|
+
let r = {
|
|
13
|
+
label: n.label,
|
|
14
|
+
value: n.value
|
|
15
|
+
};
|
|
16
|
+
if (e === "evaluate") {
|
|
17
|
+
r.correct = !0;
|
|
18
|
+
let e = n.feedback && n.feedback.type || "none";
|
|
19
|
+
e === "default" ? r.feedback = t.correct : e === "custom" && (r.feedback = n.feedback.value);
|
|
20
|
+
}
|
|
21
|
+
return r;
|
|
22
|
+
}, p = (e) => e ? "correct" : "incorrect", m = (e) => Math.abs(e) === Infinity ? 2 : e <= 2 ? e + 2 : e <= 4 ? e + 3 : e <= 6 ? e + 4 : e + 5, h = (e) => e ? e.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, "\"").replace(/'|'/g, "'").replace(/&/g, "&") : "", g = (e) => ({
|
|
23
|
+
...a,
|
|
24
|
+
...e
|
|
25
|
+
});
|
|
26
|
+
async function _(i, o, s) {
|
|
27
|
+
i.choices && Object.keys(i.choices).forEach((e) => {
|
|
28
|
+
i.choices[e] = (i.choices[e] || []).map((e, t) => e.value ? e : (d("Choice does not contain \"value\" property, which is required.", e), {
|
|
29
|
+
value: `${t}`,
|
|
30
|
+
...e
|
|
31
|
+
}));
|
|
32
|
+
});
|
|
33
|
+
let c = g(i), l = Object.assign({
|
|
34
|
+
correct: "Correct",
|
|
35
|
+
incorrect: "Incorrect"
|
|
36
|
+
}, c.defaultFeedback), _ = f(s.mode, l), b = r(c.choices, (e, n, r) => (e[r] = t(n, _), e), {}), { value: x = {} } = o || {}, S = s.mode === "evaluate" ? r(c.choices, (t, r, i) => {
|
|
37
|
+
let a = x && x[i];
|
|
38
|
+
return t[i] = p(!n(a) && e(r, (e) => v(e.label) === v(a))), t;
|
|
39
|
+
}, {}) : {}, C = Object.values(b).some((e) => e?.length > 1), w = c.note || u.t("common:commonCorrectAnswerWithAlternates", { lng: c.language }), { maxLengthPerChoice: T = [], maxLengthPerChoiceEnabled: E } = c, D = !T.length;
|
|
40
|
+
Object.values(b).forEach((e, t) => {
|
|
41
|
+
let n = (e || []).map((e) => h(e.label || "").length), r = Math.max(...n);
|
|
42
|
+
(D || !T[t] || T[t] < r || T[t] > r + 10) && (T[t] = m(r));
|
|
43
|
+
});
|
|
44
|
+
let O = {
|
|
45
|
+
choices: b,
|
|
46
|
+
disabled: s.mode !== "gather",
|
|
47
|
+
displayType: c.displayType,
|
|
48
|
+
mode: s.mode,
|
|
49
|
+
role: s.role,
|
|
50
|
+
feedback: S,
|
|
51
|
+
language: c.language,
|
|
52
|
+
markup: c.markup,
|
|
53
|
+
maxLengthPerChoice: T,
|
|
54
|
+
maxLengthPerChoiceEnabled: E,
|
|
55
|
+
note: w,
|
|
56
|
+
playerSpellCheckEnabled: c.playerSpellCheckEnabled,
|
|
57
|
+
prompt: c.promptEnabled ? c.prompt : a.prompt,
|
|
58
|
+
rationale: a.rationale,
|
|
59
|
+
responseCorrect: s.mode === "evaluate" ? y(c, o) === 1 : void 0,
|
|
60
|
+
showNote: C,
|
|
61
|
+
teacherInstructions: a.teacherInstructions,
|
|
62
|
+
responseAreaInputConfiguration: c.responseAreaInputConfiguration,
|
|
63
|
+
extraCSSRules: c.extraCSSRules
|
|
64
|
+
};
|
|
65
|
+
return s.role === "instructor" && (s.mode === "view" || s.mode === "evaluate") && (O.rationale = c.rationaleEnabled ? c.rationale : a.rationale, O.teacherInstructions = c.teacherInstructionsEnabled ? c.teacherInstructions : a.teacherInstructions), O;
|
|
66
|
+
}
|
|
67
|
+
var v = (e) => w(C(e).trim()), y = (t, i) => {
|
|
68
|
+
let { value: a } = i || {};
|
|
69
|
+
if (!i || n(i) || !a) return 0;
|
|
70
|
+
let o = t.markup && t.markup.match(/\{\{(.+?)\}\}/g), s = o ? o.length : 0, c = r(t.choices, (t, r, i) => {
|
|
71
|
+
let o = a && a[i];
|
|
72
|
+
return n(o) || !e(r, (e) => v(e.label) === v(o)) ? t : t + 1;
|
|
73
|
+
}, 0), l = s ? (c / s).toFixed(2) : 0;
|
|
74
|
+
return parseFloat(l);
|
|
75
|
+
}, b = (e, t, r) => {
|
|
76
|
+
let i = [], { value: a } = t || {}, { choices: o, markup: s } = e || {}, l = s ? s.match(/\{\{(.+?)\}\}/g) : [], u = l ? l.length : 0;
|
|
77
|
+
if (i.push(`${u} response area(s) defined in this question.`), a && Object.keys(a).length > 0) {
|
|
78
|
+
let e = Object.entries(a).filter(([e, t]) => t && t.trim()).length;
|
|
79
|
+
i.push(`Student filled ${e} out of ${u} response area(s).`), Object.keys(o || {}).forEach((e) => {
|
|
80
|
+
let t = a && a[e] || "", r = o[e] || [], s = !n(t.trim()) && r.some((e) => v(e.label) === v(t));
|
|
81
|
+
t.trim() ? i.push(`Response area ${parseInt(e) + 1}: ${s ? "CORRECT" : "INCORRECT"}.`) : i.push(`Response area ${parseInt(e) + 1}: left empty.`);
|
|
82
|
+
});
|
|
83
|
+
} else i.push("Student did not fill any response areas.");
|
|
84
|
+
if (Object.values(o || {}).some((e) => e.length > 1) && i.push("Alternate answers are accepted for some response areas."), c.enabled(e, r)) {
|
|
85
|
+
if (i.push("Score calculated using partial scoring."), i.push("Student receives credit for each correctly filled response area."), a && Object.keys(a).length > 0) {
|
|
86
|
+
let e = 0;
|
|
87
|
+
Object.keys(o || {}).forEach((t) => {
|
|
88
|
+
let r = a && a[t] || "", i = o[t] || [];
|
|
89
|
+
!n(r.trim()) && i.some((e) => v(e.label) === v(r)) && e++;
|
|
90
|
+
}), i.push(`Partial scoring: ${e} correct out of ${u} response areas.`);
|
|
91
|
+
}
|
|
92
|
+
} else i.push("Score calculated using all-or-nothing scoring."), i.push("Student must fill all response areas correctly to receive full credit.");
|
|
93
|
+
let d = y(e, t);
|
|
94
|
+
return i.push(`Score: ${d}.`), i;
|
|
95
|
+
};
|
|
96
|
+
function x(e, t, r = {}) {
|
|
97
|
+
return new Promise((i) => {
|
|
98
|
+
if (!t || n(t)) i({
|
|
99
|
+
score: 0,
|
|
100
|
+
empty: !0,
|
|
101
|
+
traceLog: ["Student did not fill any response areas. Score: 0."]
|
|
102
|
+
});
|
|
103
|
+
else {
|
|
104
|
+
let n = b(e, t, r), a = c.enabled(e, r), o = y(e, t);
|
|
105
|
+
i({
|
|
106
|
+
score: a ? o : +(o === 1),
|
|
107
|
+
empty: !1,
|
|
108
|
+
traceLog: n
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
var S = (e, t) => new Promise((n) => {
|
|
114
|
+
if (t.mode !== "evaluate" && t.role === "instructor") {
|
|
115
|
+
let { choices: t } = e, r = {};
|
|
116
|
+
Object.keys(t).forEach((e, n) => {
|
|
117
|
+
r[n] = t[e][0].label;
|
|
118
|
+
}), n({
|
|
119
|
+
id: "1",
|
|
120
|
+
value: r
|
|
121
|
+
});
|
|
122
|
+
} else n(null);
|
|
123
|
+
}), C = (e) => typeof e == "string" ? typeof e.replaceAll == "function" ? e.replaceAll(/<[^>]*>/g, "") : e.replace(/<[^>]*>/g, "") : "", w = (e) => (0, l.decode)(e), T = (e) => (e || "").replace(/(<(?!img|iframe|source)([^>]+)>)/gi, ""), E = (e = {}, t = {}) => {
|
|
124
|
+
let { choices: r, markup: i } = e, { maxResponseAreas: a } = t, o = {}, s = {};
|
|
125
|
+
[
|
|
126
|
+
"teacherInstructions",
|
|
127
|
+
"prompt",
|
|
128
|
+
"rationale"
|
|
129
|
+
].forEach((n) => {
|
|
130
|
+
t[n]?.required && !T(e[n]) && (s[n] = "This field is required.");
|
|
131
|
+
}), Object.entries(r || {}).forEach(([e, t]) => {
|
|
132
|
+
let r = [...t || []].reverse(), i = {};
|
|
133
|
+
r.forEach((e, t) => {
|
|
134
|
+
let { value: n, label: a } = e;
|
|
135
|
+
a === "" || a === "<div></div>" ? i[n] = "Content should not be empty." : r.slice(t + 1).some((e) => e.label === a) && (i[n] = "Content should be unique.");
|
|
136
|
+
}), n(i) || (o[e] = i);
|
|
137
|
+
});
|
|
138
|
+
let c = (i.match(/\{\{(\d+)\}\}/g) || []).length;
|
|
139
|
+
return c > a ? s.responseAreas = `No more than ${a} response areas should be defined.` : c < 1 && (s.responseAreas = "There should be at least 1 response area defined."), n(o) || (s.choices = o), s;
|
|
140
|
+
};
|
|
141
|
+
//#endregion
|
|
142
|
+
export { S as createCorrectResponseSession, b as getLogTrace, y as getScore, _ as model, g as normalize, x as outcome, f as prepareChoice, v as prepareVal, E as validate };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/explicit-constructed-response/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 InlineDropdown extends HTMLElement {
|
|
10
|
+
constructor();
|
|
11
|
+
setLangAttribute(): void;
|
|
12
|
+
set model(m: any);
|
|
13
|
+
set session(s: any);
|
|
14
|
+
get session(): any;
|
|
15
|
+
_render: any;
|
|
16
|
+
dispatchChangedEvent: any;
|
|
17
|
+
changeSession: any;
|
|
18
|
+
connectedCallback(): void;
|
|
19
|
+
disconnectedCallback(): void;
|
|
20
|
+
}
|