@pie-element/drawing-response 12.1.0-next.28 → 12.1.1-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/author/button.d.ts +29 -0
- package/dist/author/button.js +25 -0
- package/dist/author/defaults.d.ts +118 -0
- package/dist/author/defaults.js +86 -0
- package/dist/author/image-container.d.ts +42 -0
- package/dist/author/image-container.js +183 -0
- package/dist/author/index.d.ts +37 -0
- package/dist/author/index.js +79 -0
- package/dist/author/root.d.ts +17 -0
- package/dist/author/root.js +142 -0
- package/dist/controller/defaults.d.ts +24 -0
- package/dist/controller/defaults.js +18 -0
- package/dist/controller/index.d.ts +13 -0
- package/dist/controller/index.js +46 -0
- package/dist/delivery/drawing-response/button.d.ts +31 -0
- package/dist/delivery/drawing-response/button.js +36 -0
- package/dist/delivery/drawing-response/constants.d.ts +16 -0
- package/dist/delivery/drawing-response/constants.js +40 -0
- package/dist/delivery/drawing-response/container.d.ts +32 -0
- package/dist/delivery/drawing-response/container.js +212 -0
- package/dist/delivery/drawing-response/drawable-circle.d.ts +18 -0
- package/dist/delivery/drawing-response/drawable-circle.js +51 -0
- package/dist/delivery/drawing-response/drawable-eraser.d.ts +17 -0
- package/dist/delivery/drawing-response/drawable-eraser.js +52 -0
- package/dist/delivery/drawing-response/drawable-free-path.d.ts +18 -0
- package/dist/delivery/drawing-response/drawable-free-path.js +52 -0
- package/dist/delivery/drawing-response/drawable-helper.d.ts +17 -0
- package/dist/delivery/drawing-response/drawable-helper.js +12 -0
- package/dist/delivery/drawing-response/drawable-image.d.ts +24 -0
- package/dist/delivery/drawing-response/drawable-image.js +28 -0
- package/dist/delivery/drawing-response/drawable-line.d.ts +18 -0
- package/dist/delivery/drawing-response/drawable-line.js +53 -0
- package/dist/delivery/drawing-response/drawable-main.d.ts +25 -0
- package/dist/delivery/drawing-response/drawable-main.js +212 -0
- package/dist/delivery/drawing-response/drawable-palette.d.ts +14 -0
- package/dist/delivery/drawing-response/drawable-palette.js +89 -0
- package/dist/delivery/drawing-response/drawable-rectangle.d.ts +18 -0
- package/dist/delivery/drawing-response/drawable-rectangle.js +49 -0
- package/dist/delivery/drawing-response/drawable-text.d.ts +30 -0
- package/dist/delivery/drawing-response/drawable-text.js +189 -0
- package/dist/delivery/drawing-response/drawable-transformer.d.ts +16 -0
- package/dist/delivery/drawing-response/drawable-transformer.js +35 -0
- package/dist/delivery/drawing-response/factory.d.ts +11 -0
- package/dist/delivery/drawing-response/factory.js +19 -0
- package/dist/delivery/drawing-response/icon.d.ts +19 -0
- package/dist/delivery/drawing-response/icon.js +52 -0
- package/dist/delivery/drawing-response/index.d.ts +18 -0
- package/dist/delivery/drawing-response/index.js +70 -0
- package/dist/delivery/index.d.ts +19 -0
- package/dist/delivery/index.js +47 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +165 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_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/_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/_baseFlatten.js +13 -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/_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/_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/_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/_baseSetToString.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSlice.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnset.js +19 -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/_customOmitClone.js +7 -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/_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/_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/_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/_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/_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/_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/_parent.js +8 -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/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/eq.js +6 -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/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/isPlainObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/last.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/omit.js +21 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +7 -0
- package/package.json +56 -20
- package/CHANGELOG.json +0 -547
- package/CHANGELOG.md +0 -1948
- package/LICENSE.md +0 -5
- package/README.md +0 -1
- package/configure/CHANGELOG.json +0 -367
- package/configure/CHANGELOG.md +0 -1749
- package/configure/lib/button.js +0 -37
- package/configure/lib/button.js.map +0 -1
- package/configure/lib/defaults.js +0 -116
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/image-container.js +0 -307
- package/configure/lib/image-container.js.map +0 -1
- package/configure/lib/index.js +0 -147
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/root.js +0 -219
- package/configure/lib/root.js.map +0 -1
- package/configure/package.json +0 -24
- package/configure/src/__tests__/image-container.test.jsx +0 -231
- package/configure/src/__tests__/index.test.js +0 -72
- package/configure/src/__tests__/root.test.jsx +0 -110
- package/configure/src/button.jsx +0 -33
- package/configure/src/defaults.js +0 -80
- package/configure/src/image-container.jsx +0 -316
- package/configure/src/index.js +0 -167
- package/configure/src/root.jsx +0 -198
- package/controller/CHANGELOG.json +0 -52
- package/controller/CHANGELOG.md +0 -253
- package/controller/lib/defaults.js +0 -22
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -84
- package/controller/lib/index.js.map +0 -1
- package/controller/package.json +0 -16
- package/controller/src/__tests__/index.test.js +0 -172
- package/controller/src/defaults.js +0 -12
- package/controller/src/index.js +0 -71
- package/docs/config-schema.json +0 -1766
- package/docs/config-schema.json.md +0 -1313
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -14
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -37
- package/docs/pie-schema.json +0 -823
- package/docs/pie-schema.json.md +0 -606
- package/lib/drawing-response/button.js +0 -49
- package/lib/drawing-response/button.js.map +0 -1
- package/lib/drawing-response/constants.js +0 -43
- package/lib/drawing-response/constants.js.map +0 -1
- package/lib/drawing-response/container.js +0 -327
- package/lib/drawing-response/container.js.map +0 -1
- package/lib/drawing-response/drawable-circle.js +0 -80
- package/lib/drawing-response/drawable-circle.js.map +0 -1
- package/lib/drawing-response/drawable-eraser.js +0 -64
- package/lib/drawing-response/drawable-eraser.js.map +0 -1
- package/lib/drawing-response/drawable-free-path.js +0 -71
- package/lib/drawing-response/drawable-free-path.js.map +0 -1
- package/lib/drawing-response/drawable-helper.js +0 -34
- package/lib/drawing-response/drawable-helper.js.map +0 -1
- package/lib/drawing-response/drawable-image.js +0 -41
- package/lib/drawing-response/drawable-image.js.map +0 -1
- package/lib/drawing-response/drawable-line.js +0 -75
- package/lib/drawing-response/drawable-line.js.map +0 -1
- package/lib/drawing-response/drawable-main.js +0 -345
- package/lib/drawing-response/drawable-main.js.map +0 -1
- package/lib/drawing-response/drawable-palette.js +0 -140
- package/lib/drawing-response/drawable-palette.js.map +0 -1
- package/lib/drawing-response/drawable-rectangle.js +0 -80
- package/lib/drawing-response/drawable-rectangle.js.map +0 -1
- package/lib/drawing-response/drawable-text.js +0 -295
- package/lib/drawing-response/drawable-text.js.map +0 -1
- package/lib/drawing-response/drawable-transformer.js +0 -52
- package/lib/drawing-response/drawable-transformer.js.map +0 -1
- package/lib/drawing-response/factory.js +0 -22
- package/lib/drawing-response/factory.js.map +0 -1
- package/lib/drawing-response/icon.js +0 -55
- package/lib/drawing-response/icon.js.map +0 -1
- package/lib/drawing-response/index.js +0 -91
- package/lib/drawing-response/index.js.map +0 -1
- package/lib/index.js +0 -68
- package/lib/index.js.map +0 -1
- package/src/__tests__/drawing-index-test.jsx +0 -103
- package/src/drawing-response/__tests__/container.test.jsx +0 -82
- package/src/drawing-response/__tests__/drawable-helper.test.jsx +0 -24
- package/src/drawing-response/__tests__/drawing-main.test.jsx +0 -855
- package/src/drawing-response/__tests__/factory.test.js +0 -13
- package/src/drawing-response/button.jsx +0 -45
- package/src/drawing-response/constants.js +0 -44
- package/src/drawing-response/container.jsx +0 -301
- package/src/drawing-response/drawable-circle.jsx +0 -74
- package/src/drawing-response/drawable-eraser.jsx +0 -53
- package/src/drawing-response/drawable-free-path.jsx +0 -59
- package/src/drawing-response/drawable-helper.jsx +0 -21
- package/src/drawing-response/drawable-image.jsx +0 -36
- package/src/drawing-response/drawable-line.jsx +0 -62
- package/src/drawing-response/drawable-main.jsx +0 -333
- package/src/drawing-response/drawable-palette.jsx +0 -99
- package/src/drawing-response/drawable-rectangle.jsx +0 -69
- package/src/drawing-response/drawable-text.jsx +0 -318
- package/src/drawing-response/drawable-transformer.jsx +0 -52
- package/src/drawing-response/factory.js +0 -17
- package/src/drawing-response/icon.jsx +0 -52
- package/src/drawing-response/index.jsx +0 -92
- package/src/index.js +0 -72
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { model, outcome } from '../index';
|
|
2
|
-
|
|
3
|
-
describe('controller', () => {
|
|
4
|
-
let result, question, session, env;
|
|
5
|
-
|
|
6
|
-
beforeEach(() => {
|
|
7
|
-
question = {
|
|
8
|
-
prompt: 'This is the question prompt',
|
|
9
|
-
promptEnabled: true,
|
|
10
|
-
imageUrl: '',
|
|
11
|
-
imageDimensions: {
|
|
12
|
-
height: 0,
|
|
13
|
-
width: 0,
|
|
14
|
-
},
|
|
15
|
-
teacherInstructions: 'Teacher Instructions',
|
|
16
|
-
backgroundImageEnabled: true,
|
|
17
|
-
};
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
describe('outcome', () => {
|
|
21
|
-
it('returns score of 0', async () => {
|
|
22
|
-
const result = await outcome(question);
|
|
23
|
-
expect(result.score).toEqual(0);
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
describe('model', () => {
|
|
28
|
-
describe('mode: gather', () => {
|
|
29
|
-
beforeEach(async () => {
|
|
30
|
-
session = {};
|
|
31
|
-
env = { mode: 'gather' };
|
|
32
|
-
result = await model(question, session, env);
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
it('returns mode', () => {
|
|
36
|
-
expect(result.mode).toEqual('gather');
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
it('returns prompt', () => {
|
|
40
|
-
expect(result.prompt).toEqual('This is the question prompt');
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
it('returns imageDimensions', () => {
|
|
44
|
-
expect(result.imageDimensions).toEqual({ height: 0, width: 0 });
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
it('does not return responseCorrect', () => {
|
|
48
|
-
expect(result.responseCorrect).toBe(undefined);
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
it('gather mode promptEnabled: true', async () => {
|
|
52
|
-
result = await model(question, {}, { mode: 'gather' });
|
|
53
|
-
|
|
54
|
-
expect(result).toEqual({
|
|
55
|
-
disabled: false,
|
|
56
|
-
mode: 'gather',
|
|
57
|
-
imageUrl: question.imageUrl,
|
|
58
|
-
imageDimensions: question.imageDimensions,
|
|
59
|
-
prompt: question.prompt,
|
|
60
|
-
teacherInstructions: null,
|
|
61
|
-
backgroundImageEnabled: question.backgroundImageEnabled,
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
it('gather mode promptEnabled: false', async () => {
|
|
66
|
-
result = await model({ ...question, promptEnabled: false }, {}, { mode: 'gather' });
|
|
67
|
-
|
|
68
|
-
expect(result).toEqual({
|
|
69
|
-
disabled: false,
|
|
70
|
-
mode: 'gather',
|
|
71
|
-
imageUrl: question.imageUrl,
|
|
72
|
-
imageDimensions: question.imageDimensions,
|
|
73
|
-
prompt: null,
|
|
74
|
-
teacherInstructions: null,
|
|
75
|
-
backgroundImageEnabled: question.backgroundImageEnabled,
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
it('view mode, student role', async () => {
|
|
80
|
-
result = await model(question, {}, { mode: 'view' });
|
|
81
|
-
|
|
82
|
-
expect(result).toEqual({
|
|
83
|
-
disabled: true,
|
|
84
|
-
mode: 'view',
|
|
85
|
-
imageUrl: question.imageUrl,
|
|
86
|
-
imageDimensions: question.imageDimensions,
|
|
87
|
-
prompt: question.prompt,
|
|
88
|
-
teacherInstructions: null,
|
|
89
|
-
backgroundImageEnabled: question.backgroundImageEnabled,
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
it('view mode, instructor role and teacherInstructions enabled', async () => {
|
|
94
|
-
result = await model(question, {}, { mode: 'view', role: 'instructor' });
|
|
95
|
-
|
|
96
|
-
expect(result).toEqual({
|
|
97
|
-
disabled: true,
|
|
98
|
-
mode: 'view',
|
|
99
|
-
imageUrl: question.imageUrl,
|
|
100
|
-
imageDimensions: question.imageDimensions,
|
|
101
|
-
prompt: question.prompt,
|
|
102
|
-
teacherInstructions: question.teacherInstructions,
|
|
103
|
-
backgroundImageEnabled: question.backgroundImageEnabled,
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
it('evaluate mode, instructor role and teacherInstructions disabled', async () => {
|
|
108
|
-
result = await model(
|
|
109
|
-
{ ...question, teacherInstructionsEnabled: false },
|
|
110
|
-
{},
|
|
111
|
-
{ mode: 'evaluate', role: 'instructor' },
|
|
112
|
-
);
|
|
113
|
-
|
|
114
|
-
expect(result).toEqual({
|
|
115
|
-
disabled: true,
|
|
116
|
-
mode: 'evaluate',
|
|
117
|
-
imageUrl: question.imageUrl,
|
|
118
|
-
imageDimensions: question.imageDimensions,
|
|
119
|
-
prompt: question.prompt,
|
|
120
|
-
teacherInstructions: null,
|
|
121
|
-
backgroundImageEnabled: question.backgroundImageEnabled,
|
|
122
|
-
});
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
it('evaluate mode, student role', async () => {
|
|
126
|
-
result = await model(question, {}, { mode: 'evaluate' });
|
|
127
|
-
|
|
128
|
-
expect(result).toEqual({
|
|
129
|
-
disabled: true,
|
|
130
|
-
mode: 'evaluate',
|
|
131
|
-
imageUrl: question.imageUrl,
|
|
132
|
-
imageDimensions: question.imageDimensions,
|
|
133
|
-
prompt: question.prompt,
|
|
134
|
-
teacherInstructions: null,
|
|
135
|
-
backgroundImageEnabled: question.backgroundImageEnabled,
|
|
136
|
-
});
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
it('evaluate mode, instructor role and teacherInstructions enabled', async () => {
|
|
140
|
-
result = await model(question, {}, { mode: 'evaluate', role: 'instructor' });
|
|
141
|
-
|
|
142
|
-
expect(result).toEqual({
|
|
143
|
-
disabled: true,
|
|
144
|
-
mode: 'evaluate',
|
|
145
|
-
imageUrl: question.imageUrl,
|
|
146
|
-
imageDimensions: question.imageDimensions,
|
|
147
|
-
prompt: question.prompt,
|
|
148
|
-
teacherInstructions: question.teacherInstructions,
|
|
149
|
-
backgroundImageEnabled: question.backgroundImageEnabled,
|
|
150
|
-
});
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
it('view mode, instructor role and teacherInstructions disabled', async () => {
|
|
154
|
-
result = await model(
|
|
155
|
-
{ ...question, teacherInstructionsEnabled: false },
|
|
156
|
-
{},
|
|
157
|
-
{ mode: 'view', role: 'instructor' },
|
|
158
|
-
);
|
|
159
|
-
|
|
160
|
-
expect(result).toEqual({
|
|
161
|
-
disabled: true,
|
|
162
|
-
mode: 'view',
|
|
163
|
-
imageUrl: question.imageUrl,
|
|
164
|
-
imageDimensions: question.imageDimensions,
|
|
165
|
-
prompt: question.prompt,
|
|
166
|
-
teacherInstructions: null,
|
|
167
|
-
backgroundImageEnabled: question.backgroundImageEnabled,
|
|
168
|
-
});
|
|
169
|
-
});
|
|
170
|
-
});
|
|
171
|
-
});
|
|
172
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
backgroundImageEnabled: true,
|
|
3
|
-
imageDimensions: { height: 0, width: 0 },
|
|
4
|
-
imageUrl: '',
|
|
5
|
-
prompt: '',
|
|
6
|
-
promptEnabled: true,
|
|
7
|
-
spellCheckEnabled: true,
|
|
8
|
-
studentInstructionsEnabled: true,
|
|
9
|
-
teacherInstructions: '',
|
|
10
|
-
teacherInstructionsEnabled: true,
|
|
11
|
-
toolbarEditorPosition: 'bottom',
|
|
12
|
-
};
|
package/controller/src/index.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import debug from 'debug';
|
|
2
|
-
import defaults from './defaults';
|
|
3
|
-
|
|
4
|
-
const log = debug('pie-elements:drawing-response:controller');
|
|
5
|
-
|
|
6
|
-
export const normalize = (question) => ({ ...defaults, ...question });
|
|
7
|
-
|
|
8
|
-
export function model(question, session, env) {
|
|
9
|
-
const normalizedQuestion = normalize(question);
|
|
10
|
-
const { extraCSSRules, imageUrl, imageDimensions, prompt, promptEnabled, backgroundImageEnabled, language } = normalizedQuestion;
|
|
11
|
-
|
|
12
|
-
return new Promise((resolve) => {
|
|
13
|
-
const out = {
|
|
14
|
-
disabled: env.mode !== 'gather',
|
|
15
|
-
mode: env.mode,
|
|
16
|
-
imageDimensions,
|
|
17
|
-
imageUrl,
|
|
18
|
-
prompt: promptEnabled ? prompt : null,
|
|
19
|
-
backgroundImageEnabled,
|
|
20
|
-
language,
|
|
21
|
-
extraCSSRules,
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {
|
|
25
|
-
out.teacherInstructions = normalizedQuestion.teacherInstructionsEnabled
|
|
26
|
-
? normalizedQuestion.teacherInstructions
|
|
27
|
-
: null;
|
|
28
|
-
} else {
|
|
29
|
-
out.teacherInstructions = null;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
resolve(out);
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export const createDefaultModel = (model = {}) =>
|
|
37
|
-
new Promise((resolve) => {
|
|
38
|
-
resolve({
|
|
39
|
-
...defaults,
|
|
40
|
-
...model,
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
export function outcome(/*config, session*/) {
|
|
45
|
-
return new Promise((resolve) => {
|
|
46
|
-
log('outcome...');
|
|
47
|
-
resolve({
|
|
48
|
-
score: 0,
|
|
49
|
-
completed: 'n/a',
|
|
50
|
-
note: 'Requires manual scoring',
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// remove all html tags
|
|
56
|
-
const getInnerText = (html) => (html || '').replaceAll(/<[^>]*>/g, '');
|
|
57
|
-
|
|
58
|
-
// remove all html tags except img, iframe and source tag for audio
|
|
59
|
-
const getContent = (html) => (html || '').replace(/(<(?!img|iframe|source)([^>]+)>)/gi, '');
|
|
60
|
-
|
|
61
|
-
export const validate = (model = {}, config = {}) => {
|
|
62
|
-
const errors = {};
|
|
63
|
-
|
|
64
|
-
['teacherInstructions', 'prompt'].forEach((field) => {
|
|
65
|
-
if (config[field]?.required && !getContent(model[field])) {
|
|
66
|
-
errors[field] = 'This field is required.';
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
return errors;
|
|
71
|
-
};
|