@pie-element/drag-in-the-blank 10.1.2-next.0 → 10.1.2-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/author/choice.js +43 -42
- package/dist/author/choices.js +12 -9
- package/dist/author/index.d.ts +1 -0
- package/dist/author/index.js +25 -22
- package/dist/author/main.js +3 -3
- package/dist/author/markupUtils.js +2 -2
- package/dist/browser/author/index.js +23689 -21162
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js +72 -113
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +892 -724
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/dist-CqufoV2m.js +125 -0
- package/dist/browser/dist-CqufoV2m.js.map +1 -0
- package/dist/browser/{drag-provider-BaEBS72b.js → drag-provider-C--v2fW9.js} +3035 -3095
- package/dist/browser/drag-provider-C--v2fW9.js.map +1 -0
- package/dist/browser/rolldown-runtime-CWhphoD1.js +32 -0
- package/dist/controller/index.js +23 -23
- package/dist/controller/utils.d.ts +4 -1
- package/dist/controller/utils.js +1 -2
- package/dist/delivery/index.js +4 -4
- package/dist/delivery/main.js +1 -1
- package/dist/index.iife.js +35 -35
- package/dist/runtime-support.d.ts +12 -0
- package/dist/runtime-support.js +12 -0
- package/package.json +21 -18
- package/dist/browser/_baseForOwn-CAjtICjJ.js +0 -126
- package/dist/browser/_baseForOwn-CAjtICjJ.js.map +0 -1
- package/dist/browser/_baseProperty-CLk0ZDGh.js +0 -691
- package/dist/browser/_baseProperty-CLk0ZDGh.js.map +0 -1
- package/dist/browser/drag-provider-BaEBS72b.js.map +0 -1
- package/dist/browser/isEmpty-Dh0AI0qn.js +0 -256
- package/dist/browser/isEmpty-Dh0AI0qn.js.map +0 -1
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayReduce.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEach.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseForOwn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js +0 -26
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyOf.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseReduce.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseEach.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +0 -35
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +0 -35
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +0 -32
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_escapeHtmlChar.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +0 -18
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/escape.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +0 -7
package/dist/author/choice.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { choiceIsEmpty as e } from "./markupUtils.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import t from "
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import o from "@
|
|
8
|
-
import s from "@mui/icons-material/
|
|
3
|
+
import { color as t } from "@pie-lib/render-ui";
|
|
4
|
+
import n from "prop-types";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
import { styled as a } from "@mui/material/styles";
|
|
7
|
+
import { useDraggable as o } from "@dnd-kit/core";
|
|
8
|
+
import s from "@mui/icons-material/MoreVert";
|
|
9
|
+
import c from "@mui/icons-material/Delete";
|
|
9
10
|
//#region src/author/choice.tsx
|
|
10
|
-
var
|
|
11
|
+
var l = ({ style: e }) => /* @__PURE__ */ i("span", {
|
|
11
12
|
style: e,
|
|
12
|
-
children: [/* @__PURE__ */
|
|
13
|
+
children: [/* @__PURE__ */ r(s, { style: { margin: "0 -16px" } }), /* @__PURE__ */ r(s, {})]
|
|
13
14
|
});
|
|
14
|
-
|
|
15
|
-
var
|
|
15
|
+
l.propTypes = { style: n.object };
|
|
16
|
+
var u = a("div", { shouldForwardProp: (e) => !["error", "isDragging"].includes(e) })(({ theme: e, error: n }) => ({
|
|
16
17
|
display: "inline-flex",
|
|
17
18
|
minWidth: "178px",
|
|
18
19
|
minHeight: "36px",
|
|
@@ -23,66 +24,66 @@ var l = i("div", { shouldForwardProp: (e) => !["error", "isDragging"].includes(e
|
|
|
23
24
|
position: "relative",
|
|
24
25
|
padding: "8px 35px 8px 35px",
|
|
25
26
|
cursor: "grab",
|
|
26
|
-
border: `1px solid ${
|
|
27
|
+
border: `1px solid ${n ? "#f44336" : t.border()}`,
|
|
27
28
|
"& img": { display: "flex" },
|
|
28
29
|
"& p": { margin: 0 },
|
|
29
30
|
"& mjx-frac": { fontSize: "120% !important" }
|
|
30
|
-
})),
|
|
31
|
+
})), d = a(c)(({ theme: e }) => ({
|
|
31
32
|
position: "absolute",
|
|
32
33
|
top: "6px",
|
|
33
34
|
right: "0",
|
|
34
|
-
color:
|
|
35
|
+
color: t.text(),
|
|
35
36
|
zIndex: 2,
|
|
36
37
|
"&:hover": {
|
|
37
38
|
cursor: "pointer",
|
|
38
39
|
color: e.palette.common.black
|
|
39
40
|
}
|
|
40
|
-
})),
|
|
41
|
-
let { choice:
|
|
42
|
-
id: `choice-${
|
|
41
|
+
})), f = (n) => {
|
|
42
|
+
let { choice: a, onClick: s, onRemoveChoice: c, error: f, instanceId: p, disabled: m } = n, { attributes: h, listeners: g, setNodeRef: _, isDragging: v } = o({
|
|
43
|
+
id: `choice-${a.id}-${p || "default"}`,
|
|
43
44
|
data: {
|
|
44
45
|
type: "drag-in-the-blank-choice",
|
|
45
|
-
id:
|
|
46
|
-
value:
|
|
47
|
-
instanceId:
|
|
46
|
+
id: a.id,
|
|
47
|
+
value: a,
|
|
48
|
+
instanceId: p
|
|
48
49
|
},
|
|
49
|
-
disabled:
|
|
50
|
-
}),
|
|
51
|
-
if (e(
|
|
50
|
+
disabled: m || e(a)
|
|
51
|
+
}), y = (t) => {
|
|
52
|
+
if (e(a)) {
|
|
52
53
|
t.preventDefault(), alert("You need to define a value for an answer choice before it can be associated with a response area.");
|
|
53
54
|
return;
|
|
54
55
|
}
|
|
55
56
|
};
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
-
ref:
|
|
58
|
-
error:
|
|
59
|
-
isDragging:
|
|
60
|
-
onClick:
|
|
61
|
-
...m,
|
|
57
|
+
return /* @__PURE__ */ i(u, {
|
|
58
|
+
ref: _,
|
|
59
|
+
error: f,
|
|
60
|
+
isDragging: v,
|
|
61
|
+
onClick: s,
|
|
62
62
|
...h,
|
|
63
|
-
|
|
63
|
+
...g,
|
|
64
|
+
onDragStart: y,
|
|
64
65
|
children: [
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ r(l, { style: {
|
|
66
67
|
position: "absolute",
|
|
67
68
|
top: "6px",
|
|
68
69
|
left: "15px",
|
|
69
|
-
color:
|
|
70
|
+
color: t.borderGray(),
|
|
70
71
|
zIndex: 2
|
|
71
72
|
} }),
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
e.preventDefault(), e.stopPropagation(),
|
|
73
|
+
/* @__PURE__ */ r("span", { dangerouslySetInnerHTML: { __html: a.value } }),
|
|
74
|
+
/* @__PURE__ */ r(d, { onClick: (e) => {
|
|
75
|
+
e.preventDefault(), e.stopPropagation(), c(e);
|
|
75
76
|
} })
|
|
76
77
|
]
|
|
77
78
|
});
|
|
78
79
|
};
|
|
79
|
-
|
|
80
|
-
choice:
|
|
81
|
-
onClick:
|
|
82
|
-
onRemoveChoice:
|
|
83
|
-
error:
|
|
84
|
-
instanceId:
|
|
85
|
-
disabled:
|
|
80
|
+
f.propTypes = {
|
|
81
|
+
choice: n.object.isRequired,
|
|
82
|
+
onClick: n.func,
|
|
83
|
+
onRemoveChoice: n.func.isRequired,
|
|
84
|
+
error: n.bool,
|
|
85
|
+
instanceId: n.string,
|
|
86
|
+
disabled: n.bool
|
|
86
87
|
};
|
|
87
88
|
//#endregion
|
|
88
|
-
export {
|
|
89
|
+
export { f as BlankContent, f as default };
|
package/dist/author/choices.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { choiceIsEmpty as e } from "./markupUtils.js";
|
|
2
|
-
import t from "./choice.js";
|
|
2
|
+
import { BlankContent as t } from "./choice.js";
|
|
3
3
|
import n from "react";
|
|
4
4
|
import { renderMath as r } from "@pie-element/shared-math-rendering-mathjax";
|
|
5
5
|
import i from "prop-types";
|
|
@@ -76,13 +76,16 @@ var d = s("div")(({ theme: e }) => ({
|
|
|
76
76
|
}
|
|
77
77
|
i(l);
|
|
78
78
|
};
|
|
79
|
-
onChoiceDone = (t) => {
|
|
80
|
-
let { onChange:
|
|
81
|
-
if (!
|
|
82
|
-
|
|
79
|
+
onChoiceDone = (t, n) => {
|
|
80
|
+
let { onChange: r, model: i } = this.props, { choices: a } = i, o = (a || []).find((e) => e.id === t), s = n === void 0 ? o && o.value : n;
|
|
81
|
+
if (!o || !e({ value: s })) {
|
|
82
|
+
o && o.value !== s && r((a || []).map((e) => e.id === t ? {
|
|
83
|
+
...e,
|
|
84
|
+
value: s
|
|
85
|
+
} : e)), this.setState({ focusedEl: void 0 });
|
|
83
86
|
return;
|
|
84
87
|
}
|
|
85
|
-
|
|
88
|
+
r((a || []).filter((e) => e.id !== t)), this.setState({
|
|
86
89
|
focusedEl: void 0,
|
|
87
90
|
warning: {
|
|
88
91
|
open: !0,
|
|
@@ -135,8 +138,8 @@ var d = s("div")(({ theme: e }) => ({
|
|
|
135
138
|
onChange: (e) => {
|
|
136
139
|
this.preventDone || this.onChoiceChanged(n.value, e, n.id);
|
|
137
140
|
},
|
|
138
|
-
onDone: () => {
|
|
139
|
-
this.preventDone || this.onChoiceDone(n.id);
|
|
141
|
+
onDone: (e) => {
|
|
142
|
+
this.preventDone || this.onChoiceDone(n.id, e);
|
|
140
143
|
},
|
|
141
144
|
onBlur: (e) => {
|
|
142
145
|
let t = e.relatedTarget && e.relatedTarget.closest(".insert-character-dialog");
|
|
@@ -169,4 +172,4 @@ var d = s("div")(({ theme: e }) => ({
|
|
|
169
172
|
}
|
|
170
173
|
};
|
|
171
174
|
//#endregion
|
|
172
|
-
export { h as default };
|
|
175
|
+
export { h as Choices, h as default };
|
package/dist/author/index.d.ts
CHANGED
package/dist/author/index.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import {
|
|
3
|
-
import r from "./
|
|
4
|
-
import i from "
|
|
5
|
-
import a from "react";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { createSlateMarkup as e, processMarkup as t } from "./markupUtils.js";
|
|
2
|
+
import { Main as n } from "./main.js";
|
|
3
|
+
import r from "./defaults.js";
|
|
4
|
+
import i from "react";
|
|
5
|
+
import { createRoot as a } from "react-dom/client";
|
|
6
|
+
import { renderMath as o } from "@pie-element/shared-math-rendering-mathjax";
|
|
7
|
+
import { defaults as s } from "@pie-element/shared-lodash";
|
|
8
8
|
import { DeleteImageEvent as c, DeleteSoundEvent as l, InsertImageEvent as u, InsertSoundEvent as d, ModelUpdatedEvent as f } from "@pie-element/shared-configure-events";
|
|
9
9
|
import p from "debug";
|
|
10
10
|
//#region src/author/index.tsx
|
|
11
11
|
var m = p("multiple-choice:configure"), h = class p extends HTMLElement {
|
|
12
|
-
static prepareModel = (
|
|
13
|
-
let
|
|
14
|
-
...
|
|
15
|
-
...
|
|
16
|
-
}, a =
|
|
12
|
+
static prepareModel = (n = {}) => {
|
|
13
|
+
let i = {
|
|
14
|
+
...r.model,
|
|
15
|
+
...n
|
|
16
|
+
}, a = n.slateMarkup || e(i.markup, i.choices, i.correctResponse), o = t(a);
|
|
17
17
|
return {
|
|
18
|
-
...
|
|
18
|
+
...i,
|
|
19
19
|
slateMarkup: a,
|
|
20
20
|
markup: o.markup,
|
|
21
21
|
correctResponse: o.correctResponse
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
constructor() {
|
|
25
|
-
super(), this._root = null, this._model = p.prepareModel(), this._configuration =
|
|
25
|
+
super(), this._root = null, this._model = p.prepareModel(), this._configuration = r.configuration, this.onModelChanged = this.onModelChanged.bind(this), this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
26
26
|
}
|
|
27
27
|
set model(e) {
|
|
28
28
|
let t = {
|
|
29
29
|
...e,
|
|
30
|
-
markup: `<div>${e.markup ||
|
|
30
|
+
markup: `<div>${e.markup || r.model.markup}</div>`
|
|
31
31
|
};
|
|
32
32
|
this._model = p.prepareModel(t), this._render();
|
|
33
33
|
}
|
|
34
|
-
set configuration(
|
|
35
|
-
let
|
|
36
|
-
this._configuration =
|
|
34
|
+
set configuration(e) {
|
|
35
|
+
let t = s(e, r.configuration);
|
|
36
|
+
this._configuration = t, t?.language?.enabled ? t?.languageChoices?.options?.length && (this._model.language = t?.languageChoices.options[0].value) : t.language.settings && this._model.language ? (this._configuration.language.enabled = !0, (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) && (this._configuration.languageChoices.options = []), this._configuration.languageChoices.options.find((e) => e.value === this._model.language) || this._configuration.languageChoices.options.push({
|
|
37
37
|
value: this._model.language,
|
|
38
38
|
label: this._model.language
|
|
39
39
|
})) : delete this._model.language, this._render();
|
|
@@ -65,7 +65,7 @@ var m = p("multiple-choice:configure"), h = class p extends HTMLElement {
|
|
|
65
65
|
}
|
|
66
66
|
_render() {
|
|
67
67
|
m("_render");
|
|
68
|
-
let e =
|
|
68
|
+
let e = i.createElement(n, {
|
|
69
69
|
model: this._model,
|
|
70
70
|
configuration: this._configuration,
|
|
71
71
|
onModelChanged: this.onModelChanged,
|
|
@@ -80,12 +80,15 @@ var m = p("multiple-choice:configure"), h = class p extends HTMLElement {
|
|
|
80
80
|
delete: this.onDeleteSound.bind(this)
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
|
-
this._root ||=
|
|
84
|
-
|
|
83
|
+
this._root ||= a(this), this._root.render(e), setTimeout(() => {
|
|
84
|
+
o(this);
|
|
85
85
|
}, 0);
|
|
86
86
|
}
|
|
87
|
+
connectedCallback() {
|
|
88
|
+
this._render();
|
|
89
|
+
}
|
|
87
90
|
disconnectedCallback() {
|
|
88
|
-
this._root
|
|
91
|
+
this._root &&= (this._root.unmount(), null);
|
|
89
92
|
}
|
|
90
93
|
};
|
|
91
94
|
//#endregion
|
package/dist/author/main.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createSlateMarkup as e } from "./markupUtils.js";
|
|
2
|
-
import t from "./choice.js";
|
|
3
|
-
import n from "./choices.js";
|
|
2
|
+
import { BlankContent as t } from "./choice.js";
|
|
3
|
+
import { Choices as n } from "./choices.js";
|
|
4
4
|
import { generateValidationMessage as r } from "./utils.js";
|
|
5
5
|
import i from "react";
|
|
6
6
|
import { renderMath as a } from "@pie-element/shared-math-rendering-mathjax";
|
|
@@ -298,4 +298,4 @@ var y = v(s, "InputContainer") || v(S.InputContainer, "InputContainer"), b = o,
|
|
|
298
298
|
}
|
|
299
299
|
};
|
|
300
300
|
//#endregion
|
|
301
|
-
export { A as default };
|
|
301
|
+
export { A as Main, A as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "
|
|
1
|
+
import { escape as e } from "@pie-element/shared-lodash";
|
|
2
2
|
//#region src/author/markupUtils.tsx
|
|
3
3
|
var t = (e) => {
|
|
4
4
|
let t = document.createElement("div");
|
|
@@ -35,4 +35,4 @@ var t = (e) => {
|
|
|
35
35
|
return !1;
|
|
36
36
|
};
|
|
37
37
|
//#endregion
|
|
38
|
-
export { l as choiceIsEmpty, c as createSlateMarkup, o as processMarkup };
|
|
38
|
+
export { l as choiceIsEmpty, t as createElementFromHTML, c as createSlateMarkup, o as processMarkup, a as removeUnwantedCharacters };
|