@adminforth/rich-editor 1.0.17 → 1.0.18
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/ChangeLog.md +6 -0
- package/custom/node_modules/.package-lock.json +66 -0
- package/custom/node_modules/eventemitter3/LICENSE +21 -0
- package/custom/node_modules/eventemitter3/README.md +94 -0
- package/custom/node_modules/eventemitter3/dist/eventemitter3.esm.js +347 -0
- package/custom/node_modules/eventemitter3/dist/eventemitter3.esm.min.js +1 -0
- package/custom/node_modules/eventemitter3/dist/eventemitter3.esm.min.js.map +1 -0
- package/custom/node_modules/eventemitter3/dist/eventemitter3.umd.js +355 -0
- package/custom/node_modules/eventemitter3/dist/eventemitter3.umd.min.js +1 -0
- package/custom/node_modules/eventemitter3/dist/eventemitter3.umd.min.js.map +1 -0
- package/custom/node_modules/eventemitter3/index.d.ts +135 -0
- package/custom/node_modules/eventemitter3/index.js +336 -0
- package/custom/node_modules/eventemitter3/index.mjs +4 -0
- package/custom/node_modules/eventemitter3/package.json +67 -0
- package/custom/node_modules/fast-diff/LICENSE +201 -0
- package/custom/node_modules/fast-diff/README.md +24 -0
- package/custom/node_modules/fast-diff/diff.d.ts +21 -0
- package/custom/node_modules/fast-diff/diff.js +1138 -0
- package/custom/node_modules/fast-diff/package.json +30 -0
- package/custom/node_modules/lodash-es/LICENSE +47 -0
- package/custom/node_modules/lodash-es/README.md +10 -0
- package/custom/node_modules/lodash-es/_DataView.js +7 -0
- package/custom/node_modules/lodash-es/_Hash.js +32 -0
- package/custom/node_modules/lodash-es/_LazyWrapper.js +28 -0
- package/custom/node_modules/lodash-es/_ListCache.js +32 -0
- package/custom/node_modules/lodash-es/_LodashWrapper.js +22 -0
- package/custom/node_modules/lodash-es/_Map.js +7 -0
- package/custom/node_modules/lodash-es/_MapCache.js +32 -0
- package/custom/node_modules/lodash-es/_Promise.js +7 -0
- package/custom/node_modules/lodash-es/_Set.js +7 -0
- package/custom/node_modules/lodash-es/_SetCache.js +27 -0
- package/custom/node_modules/lodash-es/_Stack.js +27 -0
- package/custom/node_modules/lodash-es/_Symbol.js +6 -0
- package/custom/node_modules/lodash-es/_Uint8Array.js +6 -0
- package/custom/node_modules/lodash-es/_WeakMap.js +7 -0
- package/custom/node_modules/lodash-es/_addMapEntry.js +15 -0
- package/custom/node_modules/lodash-es/_addSetEntry.js +15 -0
- package/custom/node_modules/lodash-es/_apply.js +21 -0
- package/custom/node_modules/lodash-es/_arrayAggregator.js +22 -0
- package/custom/node_modules/lodash-es/_arrayEach.js +22 -0
- package/custom/node_modules/lodash-es/_arrayEachRight.js +21 -0
- package/custom/node_modules/lodash-es/_arrayEvery.js +23 -0
- package/custom/node_modules/lodash-es/_arrayFilter.js +25 -0
- package/custom/node_modules/lodash-es/_arrayIncludes.js +17 -0
- package/custom/node_modules/lodash-es/_arrayIncludesWith.js +22 -0
- package/custom/node_modules/lodash-es/_arrayLikeKeys.js +49 -0
- package/custom/node_modules/lodash-es/_arrayMap.js +21 -0
- package/custom/node_modules/lodash-es/_arrayPush.js +20 -0
- package/custom/node_modules/lodash-es/_arrayReduce.js +26 -0
- package/custom/node_modules/lodash-es/_arrayReduceRight.js +24 -0
- package/custom/node_modules/lodash-es/_arraySample.js +15 -0
- package/custom/node_modules/lodash-es/_arraySampleSize.js +17 -0
- package/custom/node_modules/lodash-es/_arrayShuffle.js +15 -0
- package/custom/node_modules/lodash-es/_arraySome.js +23 -0
- package/custom/node_modules/lodash-es/_asciiSize.js +12 -0
- package/custom/node_modules/lodash-es/_asciiToArray.js +12 -0
- package/custom/node_modules/lodash-es/_asciiWords.js +15 -0
- package/custom/node_modules/lodash-es/_assignMergeValue.js +20 -0
- package/custom/node_modules/lodash-es/_assignValue.js +28 -0
- package/custom/node_modules/lodash-es/_assocIndexOf.js +21 -0
- package/custom/node_modules/lodash-es/_baseAggregator.js +21 -0
- package/custom/node_modules/lodash-es/_baseAssign.js +17 -0
- package/custom/node_modules/lodash-es/_baseAssignIn.js +17 -0
- package/custom/node_modules/lodash-es/_baseAssignValue.js +25 -0
- package/custom/node_modules/lodash-es/_baseAt.js +23 -0
- package/custom/node_modules/lodash-es/_baseClamp.js +22 -0
- package/custom/node_modules/lodash-es/_baseClone.js +166 -0
- package/custom/node_modules/lodash-es/_baseConforms.js +18 -0
- package/custom/node_modules/lodash-es/_baseConformsTo.js +27 -0
- package/custom/node_modules/lodash-es/_baseCreate.js +30 -0
- package/custom/node_modules/lodash-es/_baseDelay.js +21 -0
- package/custom/node_modules/lodash-es/_baseDifference.js +67 -0
- package/custom/node_modules/lodash-es/_baseEach.js +14 -0
- package/custom/node_modules/lodash-es/_baseEachRight.js +14 -0
- package/custom/node_modules/lodash-es/_baseEvery.js +21 -0
- package/custom/node_modules/lodash-es/_baseExtremum.js +32 -0
- package/custom/node_modules/lodash-es/_baseFill.js +32 -0
- package/custom/node_modules/lodash-es/_baseFilter.js +21 -0
- package/custom/node_modules/lodash-es/_baseFindIndex.js +24 -0
- package/custom/node_modules/lodash-es/_baseFindKey.js +23 -0
- package/custom/node_modules/lodash-es/_baseFlatten.js +38 -0
- package/custom/node_modules/lodash-es/_baseFor.js +16 -0
- package/custom/node_modules/lodash-es/_baseForOwn.js +16 -0
- package/custom/node_modules/lodash-es/_baseForOwnRight.js +16 -0
- package/custom/node_modules/lodash-es/_baseForRight.js +15 -0
- package/custom/node_modules/lodash-es/_baseFunctions.js +19 -0
- package/custom/node_modules/lodash-es/_baseGet.js +24 -0
- package/custom/node_modules/lodash-es/_baseGetAllKeys.js +20 -0
- package/custom/node_modules/lodash-es/_baseGetTag.js +28 -0
- package/custom/node_modules/lodash-es/_baseGt.js +14 -0
- package/custom/node_modules/lodash-es/_baseHas.js +19 -0
- package/custom/node_modules/lodash-es/_baseHasIn.js +13 -0
- package/custom/node_modules/lodash-es/_baseInRange.js +18 -0
- package/custom/node_modules/lodash-es/_baseIndexOf.js +20 -0
- package/custom/node_modules/lodash-es/_baseIndexOfWith.js +23 -0
- package/custom/node_modules/lodash-es/_baseIntersection.js +74 -0
- package/custom/node_modules/lodash-es/_baseInverter.js +21 -0
- package/custom/node_modules/lodash-es/_baseInvoke.js +24 -0
- package/custom/node_modules/lodash-es/_baseIsArguments.js +18 -0
- package/custom/node_modules/lodash-es/_baseIsArrayBuffer.js +17 -0
- package/custom/node_modules/lodash-es/_baseIsDate.js +18 -0
- package/custom/node_modules/lodash-es/_baseIsEqual.js +28 -0
- package/custom/node_modules/lodash-es/_baseIsEqualDeep.js +83 -0
- package/custom/node_modules/lodash-es/_baseIsMap.js +18 -0
- package/custom/node_modules/lodash-es/_baseIsMatch.js +62 -0
- package/custom/node_modules/lodash-es/_baseIsNaN.js +12 -0
- package/custom/node_modules/lodash-es/_baseIsNative.js +47 -0
- package/custom/node_modules/lodash-es/_baseIsRegExp.js +18 -0
- package/custom/node_modules/lodash-es/_baseIsSet.js +18 -0
- package/custom/node_modules/lodash-es/_baseIsTypedArray.js +60 -0
- package/custom/node_modules/lodash-es/_baseIteratee.js +31 -0
- package/custom/node_modules/lodash-es/_baseKeys.js +30 -0
- package/custom/node_modules/lodash-es/_baseKeysIn.js +33 -0
- package/custom/node_modules/lodash-es/_baseLodash.js +10 -0
- package/custom/node_modules/lodash-es/_baseLt.js +14 -0
- package/custom/node_modules/lodash-es/_baseMap.js +22 -0
- package/custom/node_modules/lodash-es/_baseMatches.js +22 -0
- package/custom/node_modules/lodash-es/_baseMatchesProperty.js +33 -0
- package/custom/node_modules/lodash-es/_baseMean.js +20 -0
- package/custom/node_modules/lodash-es/_baseMerge.js +42 -0
- package/custom/node_modules/lodash-es/_baseMergeDeep.js +94 -0
- package/custom/node_modules/lodash-es/_baseNth.js +20 -0
- package/custom/node_modules/lodash-es/_baseOrderBy.js +49 -0
- package/custom/node_modules/lodash-es/_basePick.js +19 -0
- package/custom/node_modules/lodash-es/_basePickBy.js +30 -0
- package/custom/node_modules/lodash-es/_baseProperty.js +14 -0
- package/custom/node_modules/lodash-es/_basePropertyDeep.js +16 -0
- package/custom/node_modules/lodash-es/_basePropertyOf.js +14 -0
- package/custom/node_modules/lodash-es/_basePullAll.js +51 -0
- package/custom/node_modules/lodash-es/_basePullAt.js +37 -0
- package/custom/node_modules/lodash-es/_baseRandom.js +18 -0
- package/custom/node_modules/lodash-es/_baseRange.js +28 -0
- package/custom/node_modules/lodash-es/_baseReduce.js +23 -0
- package/custom/node_modules/lodash-es/_baseRepeat.js +35 -0
- package/custom/node_modules/lodash-es/_baseRest.js +17 -0
- package/custom/node_modules/lodash-es/_baseSample.js +15 -0
- package/custom/node_modules/lodash-es/_baseSampleSize.js +18 -0
- package/custom/node_modules/lodash-es/_baseSet.js +51 -0
- package/custom/node_modules/lodash-es/_baseSetData.js +17 -0
- package/custom/node_modules/lodash-es/_baseSetToString.js +22 -0
- package/custom/node_modules/lodash-es/_baseShuffle.js +15 -0
- package/custom/node_modules/lodash-es/_baseSlice.js +31 -0
- package/custom/node_modules/lodash-es/_baseSome.js +22 -0
- package/custom/node_modules/lodash-es/_baseSortBy.js +21 -0
- package/custom/node_modules/lodash-es/_baseSortedIndex.js +42 -0
- package/custom/node_modules/lodash-es/_baseSortedIndexBy.js +67 -0
- package/custom/node_modules/lodash-es/_baseSortedUniq.js +30 -0
- package/custom/node_modules/lodash-es/_baseSum.js +24 -0
- package/custom/node_modules/lodash-es/_baseTimes.js +20 -0
- package/custom/node_modules/lodash-es/_baseToNumber.js +24 -0
- package/custom/node_modules/lodash-es/_baseToPairs.js +18 -0
- package/custom/node_modules/lodash-es/_baseToString.js +37 -0
- package/custom/node_modules/lodash-es/_baseTrim.js +19 -0
- package/custom/node_modules/lodash-es/_baseUnary.js +14 -0
- package/custom/node_modules/lodash-es/_baseUniq.js +72 -0
- package/custom/node_modules/lodash-es/_baseUnset.js +20 -0
- package/custom/node_modules/lodash-es/_baseUpdate.js +18 -0
- package/custom/node_modules/lodash-es/_baseValues.js +19 -0
- package/custom/node_modules/lodash-es/_baseWhile.js +26 -0
- package/custom/node_modules/lodash-es/_baseWrapperValue.js +25 -0
- package/custom/node_modules/lodash-es/_baseXor.js +36 -0
- package/custom/node_modules/lodash-es/_baseZipObject.js +23 -0
- package/custom/node_modules/lodash-es/_cacheHas.js +13 -0
- package/custom/node_modules/lodash-es/_castArrayLikeObject.js +14 -0
- package/custom/node_modules/lodash-es/_castFunction.js +14 -0
- package/custom/node_modules/lodash-es/_castPath.js +21 -0
- package/custom/node_modules/lodash-es/_castRest.js +14 -0
- package/custom/node_modules/lodash-es/_castSlice.js +18 -0
- package/custom/node_modules/lodash-es/_charsEndIndex.js +19 -0
- package/custom/node_modules/lodash-es/_charsStartIndex.js +20 -0
- package/custom/node_modules/lodash-es/_cloneArrayBuffer.js +16 -0
- package/custom/node_modules/lodash-es/_cloneBuffer.js +35 -0
- package/custom/node_modules/lodash-es/_cloneDataView.js +16 -0
- package/custom/node_modules/lodash-es/_cloneMap.js +22 -0
- package/custom/node_modules/lodash-es/_cloneRegExp.js +17 -0
- package/custom/node_modules/lodash-es/_cloneSet.js +22 -0
- package/custom/node_modules/lodash-es/_cloneSymbol.js +18 -0
- package/custom/node_modules/lodash-es/_cloneTypedArray.js +16 -0
- package/custom/node_modules/lodash-es/_compareAscending.js +41 -0
- package/custom/node_modules/lodash-es/_compareMultiple.js +44 -0
- package/custom/node_modules/lodash-es/_composeArgs.js +39 -0
- package/custom/node_modules/lodash-es/_composeArgsRight.js +41 -0
- package/custom/node_modules/lodash-es/_copyArray.js +20 -0
- package/custom/node_modules/lodash-es/_copyObject.js +40 -0
- package/custom/node_modules/lodash-es/_copySymbols.js +16 -0
- package/custom/node_modules/lodash-es/_copySymbolsIn.js +16 -0
- package/custom/node_modules/lodash-es/_coreJsData.js +6 -0
- package/custom/node_modules/lodash-es/_countHolders.js +21 -0
- package/custom/node_modules/lodash-es/_createAggregator.js +23 -0
- package/custom/node_modules/lodash-es/_createAssigner.js +37 -0
- package/custom/node_modules/lodash-es/_createBaseEach.js +32 -0
- package/custom/node_modules/lodash-es/_createBaseFor.js +25 -0
- package/custom/node_modules/lodash-es/_createBind.js +28 -0
- package/custom/node_modules/lodash-es/_createCaseFirst.js +33 -0
- package/custom/node_modules/lodash-es/_createCompounder.js +24 -0
- package/custom/node_modules/lodash-es/_createCtor.js +37 -0
- package/custom/node_modules/lodash-es/_createCurry.js +46 -0
- package/custom/node_modules/lodash-es/_createFind.js +25 -0
- package/custom/node_modules/lodash-es/_createFlow.js +78 -0
- package/custom/node_modules/lodash-es/_createHybrid.js +92 -0
- package/custom/node_modules/lodash-es/_createInverter.js +17 -0
- package/custom/node_modules/lodash-es/_createMathOperation.js +38 -0
- package/custom/node_modules/lodash-es/_createOver.js +27 -0
- package/custom/node_modules/lodash-es/_createPadding.js +33 -0
- package/custom/node_modules/lodash-es/_createPartial.js +43 -0
- package/custom/node_modules/lodash-es/_createRange.js +30 -0
- package/custom/node_modules/lodash-es/_createRecurry.js +56 -0
- package/custom/node_modules/lodash-es/_createRelationalOperation.js +20 -0
- package/custom/node_modules/lodash-es/_createRound.js +35 -0
- package/custom/node_modules/lodash-es/_createSet.js +19 -0
- package/custom/node_modules/lodash-es/_createToPairs.js +30 -0
- package/custom/node_modules/lodash-es/_createWrap.js +106 -0
- package/custom/node_modules/lodash-es/_customDefaultsAssignIn.js +29 -0
- package/custom/node_modules/lodash-es/_customDefaultsMerge.js +28 -0
- package/custom/node_modules/lodash-es/_customOmitClone.js +16 -0
- package/custom/node_modules/lodash-es/_deburrLetter.js +71 -0
- package/custom/node_modules/lodash-es/_defineProperty.js +11 -0
- package/custom/node_modules/lodash-es/_equalArrays.js +84 -0
- package/custom/node_modules/lodash-es/_equalByTag.js +112 -0
- package/custom/node_modules/lodash-es/_equalObjects.js +90 -0
- package/custom/node_modules/lodash-es/_escapeHtmlChar.js +21 -0
- package/custom/node_modules/lodash-es/_escapeStringChar.js +22 -0
- package/custom/node_modules/lodash-es/_flatRest.js +16 -0
- package/custom/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/custom/node_modules/lodash-es/_getAllKeys.js +16 -0
- package/custom/node_modules/lodash-es/_getAllKeysIn.js +17 -0
- package/custom/node_modules/lodash-es/_getData.js +15 -0
- package/custom/node_modules/lodash-es/_getFuncName.js +31 -0
- package/custom/node_modules/lodash-es/_getHolder.js +13 -0
- package/custom/node_modules/lodash-es/_getMapData.js +18 -0
- package/custom/node_modules/lodash-es/_getMatchData.js +24 -0
- package/custom/node_modules/lodash-es/_getNative.js +17 -0
- package/custom/node_modules/lodash-es/_getPrototype.js +6 -0
- package/custom/node_modules/lodash-es/_getRawTag.js +46 -0
- package/custom/node_modules/lodash-es/_getSymbols.js +30 -0
- package/custom/node_modules/lodash-es/_getSymbolsIn.js +25 -0
- package/custom/node_modules/lodash-es/_getTag.js +58 -0
- package/custom/node_modules/lodash-es/_getValue.js +13 -0
- package/custom/node_modules/lodash-es/_getView.js +33 -0
- package/custom/node_modules/lodash-es/_getWrapDetails.js +17 -0
- package/custom/node_modules/lodash-es/_hasPath.js +39 -0
- package/custom/node_modules/lodash-es/_hasUnicode.js +26 -0
- package/custom/node_modules/lodash-es/_hasUnicodeWord.js +15 -0
- package/custom/node_modules/lodash-es/_hashClear.js +15 -0
- package/custom/node_modules/lodash-es/_hashDelete.js +17 -0
- package/custom/node_modules/lodash-es/_hashGet.js +30 -0
- package/custom/node_modules/lodash-es/_hashHas.js +23 -0
- package/custom/node_modules/lodash-es/_hashSet.js +23 -0
- package/custom/node_modules/lodash-es/_initCloneArray.js +26 -0
- package/custom/node_modules/lodash-es/_initCloneByTag.js +77 -0
- package/custom/node_modules/lodash-es/_initCloneObject.js +18 -0
- package/custom/node_modules/lodash-es/_insertWrapDetails.js +23 -0
- package/custom/node_modules/lodash-es/_isFlattenable.js +20 -0
- package/custom/node_modules/lodash-es/_isIndex.js +25 -0
- package/custom/node_modules/lodash-es/_isIterateeCall.js +30 -0
- package/custom/node_modules/lodash-es/_isKey.js +29 -0
- package/custom/node_modules/lodash-es/_isKeyable.js +15 -0
- package/custom/node_modules/lodash-es/_isLaziable.js +28 -0
- package/custom/node_modules/lodash-es/_isMaskable.js +14 -0
- package/custom/node_modules/lodash-es/_isMasked.js +20 -0
- package/custom/node_modules/lodash-es/_isPrototype.js +18 -0
- package/custom/node_modules/lodash-es/_isStrictComparable.js +15 -0
- package/custom/node_modules/lodash-es/_iteratorToArray.js +18 -0
- package/custom/node_modules/lodash-es/_lazyClone.js +23 -0
- package/custom/node_modules/lodash-es/_lazyReverse.js +23 -0
- package/custom/node_modules/lodash-es/_lazyValue.js +69 -0
- package/custom/node_modules/lodash-es/_listCacheClear.js +13 -0
- package/custom/node_modules/lodash-es/_listCacheDelete.js +35 -0
- package/custom/node_modules/lodash-es/_listCacheGet.js +19 -0
- package/custom/node_modules/lodash-es/_listCacheHas.js +16 -0
- package/custom/node_modules/lodash-es/_listCacheSet.js +26 -0
- package/custom/node_modules/lodash-es/_mapCacheClear.js +21 -0
- package/custom/node_modules/lodash-es/_mapCacheDelete.js +18 -0
- package/custom/node_modules/lodash-es/_mapCacheGet.js +16 -0
- package/custom/node_modules/lodash-es/_mapCacheHas.js +16 -0
- package/custom/node_modules/lodash-es/_mapCacheSet.js +22 -0
- package/custom/node_modules/lodash-es/_mapToArray.js +18 -0
- package/custom/node_modules/lodash-es/_matchesStrictComparable.js +20 -0
- package/custom/node_modules/lodash-es/_memoizeCapped.js +26 -0
- package/custom/node_modules/lodash-es/_mergeData.js +90 -0
- package/custom/node_modules/lodash-es/_metaMap.js +6 -0
- package/custom/node_modules/lodash-es/_nativeCreate.js +6 -0
- package/custom/node_modules/lodash-es/_nativeKeys.js +6 -0
- package/custom/node_modules/lodash-es/_nativeKeysIn.js +20 -0
- package/custom/node_modules/lodash-es/_nodeUtil.js +30 -0
- package/custom/node_modules/lodash-es/_objectToString.js +22 -0
- package/custom/node_modules/lodash-es/_overArg.js +15 -0
- package/custom/node_modules/lodash-es/_overRest.js +36 -0
- package/custom/node_modules/lodash-es/_parent.js +16 -0
- package/custom/node_modules/lodash-es/_reEscape.js +4 -0
- package/custom/node_modules/lodash-es/_reEvaluate.js +4 -0
- package/custom/node_modules/lodash-es/_reInterpolate.js +4 -0
- package/custom/node_modules/lodash-es/_realNames.js +4 -0
- package/custom/node_modules/lodash-es/_reorder.js +29 -0
- package/custom/node_modules/lodash-es/_replaceHolders.js +29 -0
- package/custom/node_modules/lodash-es/_root.js +9 -0
- package/custom/node_modules/lodash-es/_safeGet.js +21 -0
- package/custom/node_modules/lodash-es/_setCacheAdd.js +19 -0
- package/custom/node_modules/lodash-es/_setCacheHas.js +14 -0
- package/custom/node_modules/lodash-es/_setData.js +20 -0
- package/custom/node_modules/lodash-es/_setToArray.js +18 -0
- package/custom/node_modules/lodash-es/_setToPairs.js +18 -0
- package/custom/node_modules/lodash-es/_setToString.js +14 -0
- package/custom/node_modules/lodash-es/_setWrapToString.js +21 -0
- package/custom/node_modules/lodash-es/_shortOut.js +37 -0
- package/custom/node_modules/lodash-es/_shuffleSelf.js +28 -0
- package/custom/node_modules/lodash-es/_stackClear.js +15 -0
- package/custom/node_modules/lodash-es/_stackDelete.js +18 -0
- package/custom/node_modules/lodash-es/_stackGet.js +14 -0
- package/custom/node_modules/lodash-es/_stackHas.js +14 -0
- package/custom/node_modules/lodash-es/_stackSet.js +34 -0
- package/custom/node_modules/lodash-es/_strictIndexOf.js +23 -0
- package/custom/node_modules/lodash-es/_strictLastIndexOf.js +21 -0
- package/custom/node_modules/lodash-es/_stringSize.js +18 -0
- package/custom/node_modules/lodash-es/_stringToArray.js +18 -0
- package/custom/node_modules/lodash-es/_stringToPath.js +27 -0
- package/custom/node_modules/lodash-es/_toKey.js +21 -0
- package/custom/node_modules/lodash-es/_toSource.js +26 -0
- package/custom/node_modules/lodash-es/_trimmedEndIndex.js +19 -0
- package/custom/node_modules/lodash-es/_unescapeHtmlChar.js +21 -0
- package/custom/node_modules/lodash-es/_unicodeSize.js +44 -0
- package/custom/node_modules/lodash-es/_unicodeToArray.js +40 -0
- package/custom/node_modules/lodash-es/_unicodeWords.js +69 -0
- package/custom/node_modules/lodash-es/_updateWrapDetails.js +46 -0
- package/custom/node_modules/lodash-es/_wrapperClone.js +23 -0
- package/custom/node_modules/lodash-es/add.js +22 -0
- package/custom/node_modules/lodash-es/after.js +42 -0
- package/custom/node_modules/lodash-es/array.default.js +81 -0
- package/custom/node_modules/lodash-es/array.js +66 -0
- package/custom/node_modules/lodash-es/ary.js +29 -0
- package/custom/node_modules/lodash-es/assign.js +58 -0
- package/custom/node_modules/lodash-es/assignIn.js +40 -0
- package/custom/node_modules/lodash-es/assignInWith.js +38 -0
- package/custom/node_modules/lodash-es/assignWith.js +37 -0
- package/custom/node_modules/lodash-es/at.js +23 -0
- package/custom/node_modules/lodash-es/attempt.js +35 -0
- package/custom/node_modules/lodash-es/before.js +40 -0
- package/custom/node_modules/lodash-es/bind.js +57 -0
- package/custom/node_modules/lodash-es/bindAll.js +41 -0
- package/custom/node_modules/lodash-es/bindKey.js +68 -0
- package/custom/node_modules/lodash-es/camelCase.js +29 -0
- package/custom/node_modules/lodash-es/capitalize.js +23 -0
- package/custom/node_modules/lodash-es/castArray.js +44 -0
- package/custom/node_modules/lodash-es/ceil.js +26 -0
- package/custom/node_modules/lodash-es/chain.js +38 -0
- package/custom/node_modules/lodash-es/chunk.js +50 -0
- package/custom/node_modules/lodash-es/clamp.js +39 -0
- package/custom/node_modules/lodash-es/clone.js +36 -0
- package/custom/node_modules/lodash-es/cloneDeep.js +29 -0
- package/custom/node_modules/lodash-es/cloneDeepWith.js +40 -0
- package/custom/node_modules/lodash-es/cloneWith.js +42 -0
- package/custom/node_modules/lodash-es/collection.default.js +37 -0
- package/custom/node_modules/lodash-es/collection.js +29 -0
- package/custom/node_modules/lodash-es/commit.js +33 -0
- package/custom/node_modules/lodash-es/compact.js +31 -0
- package/custom/node_modules/lodash-es/concat.js +43 -0
- package/custom/node_modules/lodash-es/cond.js +60 -0
- package/custom/node_modules/lodash-es/conforms.js +35 -0
- package/custom/node_modules/lodash-es/conformsTo.js +32 -0
- package/custom/node_modules/lodash-es/constant.js +26 -0
- package/custom/node_modules/lodash-es/countBy.js +40 -0
- package/custom/node_modules/lodash-es/create.js +43 -0
- package/custom/node_modules/lodash-es/curry.js +57 -0
- package/custom/node_modules/lodash-es/curryRight.js +54 -0
- package/custom/node_modules/lodash-es/date.default.js +5 -0
- package/custom/node_modules/lodash-es/date.js +2 -0
- package/custom/node_modules/lodash-es/debounce.js +191 -0
- package/custom/node_modules/lodash-es/deburr.js +45 -0
- package/custom/node_modules/lodash-es/defaultTo.js +25 -0
- package/custom/node_modules/lodash-es/defaults.js +64 -0
- package/custom/node_modules/lodash-es/defaultsDeep.js +30 -0
- package/custom/node_modules/lodash-es/defer.js +26 -0
- package/custom/node_modules/lodash-es/delay.js +28 -0
- package/custom/node_modules/lodash-es/difference.js +33 -0
- package/custom/node_modules/lodash-es/differenceBy.js +44 -0
- package/custom/node_modules/lodash-es/differenceWith.js +40 -0
- package/custom/node_modules/lodash-es/divide.js +22 -0
- package/custom/node_modules/lodash-es/drop.js +38 -0
- package/custom/node_modules/lodash-es/dropRight.js +39 -0
- package/custom/node_modules/lodash-es/dropRightWhile.js +45 -0
- package/custom/node_modules/lodash-es/dropWhile.js +45 -0
- package/custom/node_modules/lodash-es/each.js +1 -0
- package/custom/node_modules/lodash-es/eachRight.js +1 -0
- package/custom/node_modules/lodash-es/endsWith.js +43 -0
- package/custom/node_modules/lodash-es/entries.js +1 -0
- package/custom/node_modules/lodash-es/entriesIn.js +1 -0
- package/custom/node_modules/lodash-es/eq.js +37 -0
- package/custom/node_modules/lodash-es/escape.js +43 -0
- package/custom/node_modules/lodash-es/escapeRegExp.js +32 -0
- package/custom/node_modules/lodash-es/every.js +56 -0
- package/custom/node_modules/lodash-es/extend.js +1 -0
- package/custom/node_modules/lodash-es/extendWith.js +1 -0
- package/custom/node_modules/lodash-es/fill.js +45 -0
- package/custom/node_modules/lodash-es/filter.js +52 -0
- package/custom/node_modules/lodash-es/find.js +42 -0
- package/custom/node_modules/lodash-es/findIndex.js +55 -0
- package/custom/node_modules/lodash-es/findKey.js +44 -0
- package/custom/node_modules/lodash-es/findLast.js +25 -0
- package/custom/node_modules/lodash-es/findLastIndex.js +59 -0
- package/custom/node_modules/lodash-es/findLastKey.js +44 -0
- package/custom/node_modules/lodash-es/first.js +1 -0
- package/custom/node_modules/lodash-es/flake.lock +40 -0
- package/custom/node_modules/lodash-es/flake.nix +20 -0
- package/custom/node_modules/lodash-es/flatMap.js +29 -0
- package/custom/node_modules/lodash-es/flatMapDeep.js +31 -0
- package/custom/node_modules/lodash-es/flatMapDepth.js +31 -0
- package/custom/node_modules/lodash-es/flatten.js +22 -0
- package/custom/node_modules/lodash-es/flattenDeep.js +25 -0
- package/custom/node_modules/lodash-es/flattenDepth.js +33 -0
- package/custom/node_modules/lodash-es/flip.js +28 -0
- package/custom/node_modules/lodash-es/floor.js +26 -0
- package/custom/node_modules/lodash-es/flow.js +27 -0
- package/custom/node_modules/lodash-es/flowRight.js +26 -0
- package/custom/node_modules/lodash-es/forEach.js +41 -0
- package/custom/node_modules/lodash-es/forEachRight.js +31 -0
- package/custom/node_modules/lodash-es/forIn.js +39 -0
- package/custom/node_modules/lodash-es/forInRight.js +37 -0
- package/custom/node_modules/lodash-es/forOwn.js +36 -0
- package/custom/node_modules/lodash-es/forOwnRight.js +34 -0
- package/custom/node_modules/lodash-es/fromPairs.js +28 -0
- package/custom/node_modules/lodash-es/function.default.js +31 -0
- package/custom/node_modules/lodash-es/function.js +24 -0
- package/custom/node_modules/lodash-es/functions.js +31 -0
- package/custom/node_modules/lodash-es/functionsIn.js +31 -0
- package/custom/node_modules/lodash-es/get.js +33 -0
- package/custom/node_modules/lodash-es/groupBy.js +41 -0
- package/custom/node_modules/lodash-es/gt.js +29 -0
- package/custom/node_modules/lodash-es/gte.js +30 -0
- package/custom/node_modules/lodash-es/has.js +35 -0
- package/custom/node_modules/lodash-es/hasIn.js +34 -0
- package/custom/node_modules/lodash-es/head.js +23 -0
- package/custom/node_modules/lodash-es/identity.js +21 -0
- package/custom/node_modules/lodash-es/inRange.js +55 -0
- package/custom/node_modules/lodash-es/includes.js +53 -0
- package/custom/node_modules/lodash-es/indexOf.js +42 -0
- package/custom/node_modules/lodash-es/initial.js +22 -0
- package/custom/node_modules/lodash-es/intersection.js +30 -0
- package/custom/node_modules/lodash-es/intersectionBy.js +45 -0
- package/custom/node_modules/lodash-es/intersectionWith.js +41 -0
- package/custom/node_modules/lodash-es/invert.js +42 -0
- package/custom/node_modules/lodash-es/invertBy.js +56 -0
- package/custom/node_modules/lodash-es/invoke.js +24 -0
- package/custom/node_modules/lodash-es/invokeMap.js +41 -0
- package/custom/node_modules/lodash-es/isArguments.js +36 -0
- package/custom/node_modules/lodash-es/isArray.js +26 -0
- package/custom/node_modules/lodash-es/isArrayBuffer.js +27 -0
- package/custom/node_modules/lodash-es/isArrayLike.js +33 -0
- package/custom/node_modules/lodash-es/isArrayLikeObject.js +33 -0
- package/custom/node_modules/lodash-es/isBoolean.js +29 -0
- package/custom/node_modules/lodash-es/isBuffer.js +38 -0
- package/custom/node_modules/lodash-es/isDate.js +27 -0
- package/custom/node_modules/lodash-es/isElement.js +25 -0
- package/custom/node_modules/lodash-es/isEmpty.js +77 -0
- package/custom/node_modules/lodash-es/isEqual.js +35 -0
- package/custom/node_modules/lodash-es/isEqualWith.js +41 -0
- package/custom/node_modules/lodash-es/isError.js +36 -0
- package/custom/node_modules/lodash-es/isFinite.js +36 -0
- package/custom/node_modules/lodash-es/isFunction.js +37 -0
- package/custom/node_modules/lodash-es/isInteger.js +33 -0
- package/custom/node_modules/lodash-es/isLength.js +35 -0
- package/custom/node_modules/lodash-es/isMap.js +27 -0
- package/custom/node_modules/lodash-es/isMatch.js +36 -0
- package/custom/node_modules/lodash-es/isMatchWith.js +41 -0
- package/custom/node_modules/lodash-es/isNaN.js +38 -0
- package/custom/node_modules/lodash-es/isNative.js +40 -0
- package/custom/node_modules/lodash-es/isNil.js +25 -0
- package/custom/node_modules/lodash-es/isNull.js +22 -0
- package/custom/node_modules/lodash-es/isNumber.js +38 -0
- package/custom/node_modules/lodash-es/isObject.js +31 -0
- package/custom/node_modules/lodash-es/isObjectLike.js +29 -0
- package/custom/node_modules/lodash-es/isPlainObject.js +62 -0
- package/custom/node_modules/lodash-es/isRegExp.js +27 -0
- package/custom/node_modules/lodash-es/isSafeInteger.js +37 -0
- package/custom/node_modules/lodash-es/isSet.js +27 -0
- package/custom/node_modules/lodash-es/isString.js +30 -0
- package/custom/node_modules/lodash-es/isSymbol.js +29 -0
- package/custom/node_modules/lodash-es/isTypedArray.js +27 -0
- package/custom/node_modules/lodash-es/isUndefined.js +22 -0
- package/custom/node_modules/lodash-es/isWeakMap.js +28 -0
- package/custom/node_modules/lodash-es/isWeakSet.js +28 -0
- package/custom/node_modules/lodash-es/iteratee.js +53 -0
- package/custom/node_modules/lodash-es/join.js +26 -0
- package/custom/node_modules/lodash-es/kebabCase.js +28 -0
- package/custom/node_modules/lodash-es/keyBy.js +36 -0
- package/custom/node_modules/lodash-es/keys.js +37 -0
- package/custom/node_modules/lodash-es/keysIn.js +32 -0
- package/custom/node_modules/lodash-es/lang.default.js +71 -0
- package/custom/node_modules/lodash-es/lang.js +57 -0
- package/custom/node_modules/lodash-es/last.js +20 -0
- package/custom/node_modules/lodash-es/lastIndexOf.js +46 -0
- package/custom/node_modules/lodash-es/lodash.default.js +643 -0
- package/custom/node_modules/lodash-es/lodash.js +331 -0
- package/custom/node_modules/lodash-es/lowerCase.js +27 -0
- package/custom/node_modules/lodash-es/lowerFirst.js +22 -0
- package/custom/node_modules/lodash-es/lt.js +29 -0
- package/custom/node_modules/lodash-es/lte.js +30 -0
- package/custom/node_modules/lodash-es/map.js +53 -0
- package/custom/node_modules/lodash-es/mapKeys.js +36 -0
- package/custom/node_modules/lodash-es/mapValues.js +43 -0
- package/custom/node_modules/lodash-es/matches.js +46 -0
- package/custom/node_modules/lodash-es/matchesProperty.js +44 -0
- package/custom/node_modules/lodash-es/math.default.js +21 -0
- package/custom/node_modules/lodash-es/math.js +16 -0
- package/custom/node_modules/lodash-es/max.js +29 -0
- package/custom/node_modules/lodash-es/maxBy.js +34 -0
- package/custom/node_modules/lodash-es/mean.js +22 -0
- package/custom/node_modules/lodash-es/meanBy.js +31 -0
- package/custom/node_modules/lodash-es/memoize.js +73 -0
- package/custom/node_modules/lodash-es/merge.js +39 -0
- package/custom/node_modules/lodash-es/mergeWith.js +39 -0
- package/custom/node_modules/lodash-es/method.js +34 -0
- package/custom/node_modules/lodash-es/methodOf.js +33 -0
- package/custom/node_modules/lodash-es/min.js +29 -0
- package/custom/node_modules/lodash-es/minBy.js +34 -0
- package/custom/node_modules/lodash-es/mixin.js +74 -0
- package/custom/node_modules/lodash-es/multiply.js +22 -0
- package/custom/node_modules/lodash-es/negate.js +40 -0
- package/custom/node_modules/lodash-es/next.js +35 -0
- package/custom/node_modules/lodash-es/noop.js +17 -0
- package/custom/node_modules/lodash-es/now.js +23 -0
- package/custom/node_modules/lodash-es/nth.js +29 -0
- package/custom/node_modules/lodash-es/nthArg.js +32 -0
- package/custom/node_modules/lodash-es/number.default.js +7 -0
- package/custom/node_modules/lodash-es/number.js +4 -0
- package/custom/node_modules/lodash-es/object.default.js +60 -0
- package/custom/node_modules/lodash-es/object.js +48 -0
- package/custom/node_modules/lodash-es/omit.js +57 -0
- package/custom/node_modules/lodash-es/omitBy.js +29 -0
- package/custom/node_modules/lodash-es/once.js +25 -0
- package/custom/node_modules/lodash-es/orderBy.js +47 -0
- package/custom/node_modules/lodash-es/over.js +24 -0
- package/custom/node_modules/lodash-es/overArgs.js +61 -0
- package/custom/node_modules/lodash-es/overEvery.js +34 -0
- package/custom/node_modules/lodash-es/overSome.js +37 -0
- package/custom/node_modules/lodash-es/package.json +21 -0
- package/custom/node_modules/lodash-es/pad.js +49 -0
- package/custom/node_modules/lodash-es/padEnd.js +39 -0
- package/custom/node_modules/lodash-es/padStart.js +39 -0
- package/custom/node_modules/lodash-es/parseInt.js +43 -0
- package/custom/node_modules/lodash-es/partial.js +50 -0
- package/custom/node_modules/lodash-es/partialRight.js +49 -0
- package/custom/node_modules/lodash-es/partition.js +43 -0
- package/custom/node_modules/lodash-es/pick.js +25 -0
- package/custom/node_modules/lodash-es/pickBy.js +37 -0
- package/custom/node_modules/lodash-es/plant.js +48 -0
- package/custom/node_modules/lodash-es/property.js +32 -0
- package/custom/node_modules/lodash-es/propertyOf.js +30 -0
- package/custom/node_modules/lodash-es/pull.js +29 -0
- package/custom/node_modules/lodash-es/pullAll.js +29 -0
- package/custom/node_modules/lodash-es/pullAllBy.js +33 -0
- package/custom/node_modules/lodash-es/pullAllWith.js +32 -0
- package/custom/node_modules/lodash-es/pullAt.js +43 -0
- package/custom/node_modules/lodash-es/random.js +82 -0
- package/custom/node_modules/lodash-es/range.js +46 -0
- package/custom/node_modules/lodash-es/rangeRight.js +41 -0
- package/custom/node_modules/lodash-es/rearg.js +33 -0
- package/custom/node_modules/lodash-es/reduce.js +51 -0
- package/custom/node_modules/lodash-es/reduceRight.js +36 -0
- package/custom/node_modules/lodash-es/reject.js +46 -0
- package/custom/node_modules/lodash-es/release.md +48 -0
- package/custom/node_modules/lodash-es/remove.js +53 -0
- package/custom/node_modules/lodash-es/repeat.js +37 -0
- package/custom/node_modules/lodash-es/replace.js +29 -0
- package/custom/node_modules/lodash-es/rest.js +40 -0
- package/custom/node_modules/lodash-es/result.js +56 -0
- package/custom/node_modules/lodash-es/reverse.js +34 -0
- package/custom/node_modules/lodash-es/round.js +26 -0
- package/custom/node_modules/lodash-es/sample.js +24 -0
- package/custom/node_modules/lodash-es/sampleSize.js +37 -0
- package/custom/node_modules/lodash-es/seq.default.js +20 -0
- package/custom/node_modules/lodash-es/seq.js +15 -0
- package/custom/node_modules/lodash-es/set.js +35 -0
- package/custom/node_modules/lodash-es/setWith.js +32 -0
- package/custom/node_modules/lodash-es/shuffle.js +25 -0
- package/custom/node_modules/lodash-es/size.js +46 -0
- package/custom/node_modules/lodash-es/slice.js +37 -0
- package/custom/node_modules/lodash-es/snakeCase.js +28 -0
- package/custom/node_modules/lodash-es/some.js +51 -0
- package/custom/node_modules/lodash-es/sortBy.js +48 -0
- package/custom/node_modules/lodash-es/sortedIndex.js +24 -0
- package/custom/node_modules/lodash-es/sortedIndexBy.js +33 -0
- package/custom/node_modules/lodash-es/sortedIndexOf.js +31 -0
- package/custom/node_modules/lodash-es/sortedLastIndex.js +25 -0
- package/custom/node_modules/lodash-es/sortedLastIndexBy.js +33 -0
- package/custom/node_modules/lodash-es/sortedLastIndexOf.js +31 -0
- package/custom/node_modules/lodash-es/sortedUniq.js +24 -0
- package/custom/node_modules/lodash-es/sortedUniqBy.js +26 -0
- package/custom/node_modules/lodash-es/split.js +52 -0
- package/custom/node_modules/lodash-es/spread.js +63 -0
- package/custom/node_modules/lodash-es/startCase.js +29 -0
- package/custom/node_modules/lodash-es/startsWith.js +39 -0
- package/custom/node_modules/lodash-es/string.default.js +41 -0
- package/custom/node_modules/lodash-es/string.js +32 -0
- package/custom/node_modules/lodash-es/stubArray.js +23 -0
- package/custom/node_modules/lodash-es/stubFalse.js +18 -0
- package/custom/node_modules/lodash-es/stubObject.js +23 -0
- package/custom/node_modules/lodash-es/stubString.js +18 -0
- package/custom/node_modules/lodash-es/stubTrue.js +18 -0
- package/custom/node_modules/lodash-es/subtract.js +22 -0
- package/custom/node_modules/lodash-es/sum.js +24 -0
- package/custom/node_modules/lodash-es/sumBy.js +33 -0
- package/custom/node_modules/lodash-es/tail.js +22 -0
- package/custom/node_modules/lodash-es/take.js +37 -0
- package/custom/node_modules/lodash-es/takeRight.js +39 -0
- package/custom/node_modules/lodash-es/takeRightWhile.js +45 -0
- package/custom/node_modules/lodash-es/takeWhile.js +45 -0
- package/custom/node_modules/lodash-es/tap.js +29 -0
- package/custom/node_modules/lodash-es/template.js +272 -0
- package/custom/node_modules/lodash-es/templateSettings.js +67 -0
- package/custom/node_modules/lodash-es/throttle.js +69 -0
- package/custom/node_modules/lodash-es/thru.js +28 -0
- package/custom/node_modules/lodash-es/times.js +51 -0
- package/custom/node_modules/lodash-es/toArray.js +58 -0
- package/custom/node_modules/lodash-es/toFinite.js +42 -0
- package/custom/node_modules/lodash-es/toInteger.js +36 -0
- package/custom/node_modules/lodash-es/toIterator.js +23 -0
- package/custom/node_modules/lodash-es/toJSON.js +1 -0
- package/custom/node_modules/lodash-es/toLength.js +38 -0
- package/custom/node_modules/lodash-es/toLower.js +28 -0
- package/custom/node_modules/lodash-es/toNumber.js +64 -0
- package/custom/node_modules/lodash-es/toPairs.js +30 -0
- package/custom/node_modules/lodash-es/toPairsIn.js +30 -0
- package/custom/node_modules/lodash-es/toPath.js +33 -0
- package/custom/node_modules/lodash-es/toPlainObject.js +32 -0
- package/custom/node_modules/lodash-es/toSafeInteger.js +37 -0
- package/custom/node_modules/lodash-es/toString.js +28 -0
- package/custom/node_modules/lodash-es/toUpper.js +28 -0
- package/custom/node_modules/lodash-es/transform.js +65 -0
- package/custom/node_modules/lodash-es/trim.js +47 -0
- package/custom/node_modules/lodash-es/trimEnd.js +41 -0
- package/custom/node_modules/lodash-es/trimStart.js +43 -0
- package/custom/node_modules/lodash-es/truncate.js +111 -0
- package/custom/node_modules/lodash-es/unary.js +22 -0
- package/custom/node_modules/lodash-es/unescape.js +34 -0
- package/custom/node_modules/lodash-es/union.js +26 -0
- package/custom/node_modules/lodash-es/unionBy.js +39 -0
- package/custom/node_modules/lodash-es/unionWith.js +34 -0
- package/custom/node_modules/lodash-es/uniq.js +25 -0
- package/custom/node_modules/lodash-es/uniqBy.js +31 -0
- package/custom/node_modules/lodash-es/uniqWith.js +28 -0
- package/custom/node_modules/lodash-es/uniqueId.js +28 -0
- package/custom/node_modules/lodash-es/unset.js +34 -0
- package/custom/node_modules/lodash-es/unzip.js +45 -0
- package/custom/node_modules/lodash-es/unzipWith.js +39 -0
- package/custom/node_modules/lodash-es/update.js +35 -0
- package/custom/node_modules/lodash-es/updateWith.js +33 -0
- package/custom/node_modules/lodash-es/upperCase.js +27 -0
- package/custom/node_modules/lodash-es/upperFirst.js +22 -0
- package/custom/node_modules/lodash-es/util.default.js +42 -0
- package/custom/node_modules/lodash-es/util.js +33 -0
- package/custom/node_modules/lodash-es/value.js +1 -0
- package/custom/node_modules/lodash-es/valueOf.js +1 -0
- package/custom/node_modules/lodash-es/values.js +34 -0
- package/custom/node_modules/lodash-es/valuesIn.js +32 -0
- package/custom/node_modules/lodash-es/without.js +31 -0
- package/custom/node_modules/lodash-es/words.js +35 -0
- package/custom/node_modules/lodash-es/wrap.js +30 -0
- package/custom/node_modules/lodash-es/wrapperAt.js +48 -0
- package/custom/node_modules/lodash-es/wrapperChain.js +34 -0
- package/custom/node_modules/lodash-es/wrapperLodash.js +147 -0
- package/custom/node_modules/lodash-es/wrapperReverse.js +44 -0
- package/custom/node_modules/lodash-es/wrapperValue.js +21 -0
- package/custom/node_modules/lodash-es/xor.js +28 -0
- package/custom/node_modules/lodash-es/xorBy.js +39 -0
- package/custom/node_modules/lodash-es/xorWith.js +34 -0
- package/custom/node_modules/lodash-es/zip.js +22 -0
- package/custom/node_modules/lodash-es/zipObject.js +24 -0
- package/custom/node_modules/lodash-es/zipObjectDeep.js +23 -0
- package/custom/node_modules/lodash-es/zipWith.js +32 -0
- package/custom/node_modules/lodash.clonedeep/LICENSE +47 -0
- package/custom/node_modules/lodash.clonedeep/README.md +18 -0
- package/custom/node_modules/lodash.clonedeep/index.js +1748 -0
- package/custom/node_modules/lodash.clonedeep/package.json +17 -0
- package/custom/node_modules/lodash.isequal/LICENSE +47 -0
- package/custom/node_modules/lodash.isequal/README.md +18 -0
- package/custom/node_modules/lodash.isequal/index.js +1848 -0
- package/custom/node_modules/lodash.isequal/package.json +16 -0
- package/custom/node_modules/parchment/LICENSE +30 -0
- package/custom/node_modules/parchment/README.md +271 -0
- package/custom/node_modules/parchment/dist/parchment.d.ts +453 -0
- package/custom/node_modules/parchment/dist/parchment.js +847 -0
- package/custom/node_modules/parchment/dist/parchment.js.map +1 -0
- package/custom/node_modules/parchment/dist/parchment.umd.cjs +2 -0
- package/custom/node_modules/parchment/dist/parchment.umd.cjs.map +1 -0
- package/custom/node_modules/parchment/package.json +53 -0
- package/custom/node_modules/parchment/src/attributor/attributor.ts +62 -0
- package/custom/node_modules/parchment/src/attributor/class.ts +43 -0
- package/custom/node_modules/parchment/src/attributor/store.ts +79 -0
- package/custom/node_modules/parchment/src/attributor/style.ts +44 -0
- package/custom/node_modules/parchment/src/blot/abstract/blot.ts +128 -0
- package/custom/node_modules/parchment/src/blot/abstract/container.ts +48 -0
- package/custom/node_modules/parchment/src/blot/abstract/leaf.ts +57 -0
- package/custom/node_modules/parchment/src/blot/abstract/parent.ts +400 -0
- package/custom/node_modules/parchment/src/blot/abstract/shadow.ts +188 -0
- package/custom/node_modules/parchment/src/blot/block.ts +123 -0
- package/custom/node_modules/parchment/src/blot/embed.ts +34 -0
- package/custom/node_modules/parchment/src/blot/inline.ts +159 -0
- package/custom/node_modules/parchment/src/blot/scroll.ts +216 -0
- package/custom/node_modules/parchment/src/blot/text.ts +100 -0
- package/custom/node_modules/parchment/src/collection/linked-list.ts +201 -0
- package/custom/node_modules/parchment/src/collection/linked-node.ts +8 -0
- package/custom/node_modules/parchment/src/error.ts +12 -0
- package/custom/node_modules/parchment/src/parchment.ts +48 -0
- package/custom/node_modules/parchment/src/registry.ts +155 -0
- package/custom/node_modules/parchment/src/scope.ts +18 -0
- package/custom/node_modules/parchment/tsconfig.json +16 -0
- package/custom/node_modules/quill/LICENSE +31 -0
- package/custom/node_modules/quill/README.md +104 -0
- package/custom/node_modules/quill/assets/base.styl +309 -0
- package/custom/node_modules/quill/assets/bubble/toolbar.styl +14 -0
- package/custom/node_modules/quill/assets/bubble/tooltip.styl +49 -0
- package/custom/node_modules/quill/assets/bubble.styl +45 -0
- package/custom/node_modules/quill/assets/core.styl +215 -0
- package/custom/node_modules/quill/assets/favicon.png +0 -0
- package/custom/node_modules/quill/assets/icons/align-center.svg +5 -0
- package/custom/node_modules/quill/assets/icons/align-justify.svg +5 -0
- package/custom/node_modules/quill/assets/icons/align-left.svg +5 -0
- package/custom/node_modules/quill/assets/icons/align-right.svg +5 -0
- package/custom/node_modules/quill/assets/icons/attachment.svg +3 -0
- package/custom/node_modules/quill/assets/icons/audio.svg +5 -0
- package/custom/node_modules/quill/assets/icons/authorship.svg +5 -0
- package/custom/node_modules/quill/assets/icons/background.svg +52 -0
- package/custom/node_modules/quill/assets/icons/blockquote.svg +6 -0
- package/custom/node_modules/quill/assets/icons/bold.svg +4 -0
- package/custom/node_modules/quill/assets/icons/clean.svg +7 -0
- package/custom/node_modules/quill/assets/icons/code.svg +5 -0
- package/custom/node_modules/quill/assets/icons/color.svg +5 -0
- package/custom/node_modules/quill/assets/icons/comment.svg +3 -0
- package/custom/node_modules/quill/assets/icons/direction-ltr.svg +7 -0
- package/custom/node_modules/quill/assets/icons/direction-rtl.svg +7 -0
- package/custom/node_modules/quill/assets/icons/dropdown.svg +4 -0
- package/custom/node_modules/quill/assets/icons/embed.svg +3 -0
- package/custom/node_modules/quill/assets/icons/emoji.svg +6 -0
- package/custom/node_modules/quill/assets/icons/float-center.svg +5 -0
- package/custom/node_modules/quill/assets/icons/float-full.svg +5 -0
- package/custom/node_modules/quill/assets/icons/float-left.svg +7 -0
- package/custom/node_modules/quill/assets/icons/float-right.svg +7 -0
- package/custom/node_modules/quill/assets/icons/font.svg +5 -0
- package/custom/node_modules/quill/assets/icons/formula.svg +5 -0
- package/custom/node_modules/quill/assets/icons/hashtag.svg +6 -0
- package/custom/node_modules/quill/assets/icons/header-2.svg +3 -0
- package/custom/node_modules/quill/assets/icons/header-3.svg +3 -0
- package/custom/node_modules/quill/assets/icons/header-4.svg +3 -0
- package/custom/node_modules/quill/assets/icons/header-5.svg +3 -0
- package/custom/node_modules/quill/assets/icons/header-6.svg +3 -0
- package/custom/node_modules/quill/assets/icons/header.svg +3 -0
- package/custom/node_modules/quill/assets/icons/horizontal-rule.svg +4 -0
- package/custom/node_modules/quill/assets/icons/image.svg +5 -0
- package/custom/node_modules/quill/assets/icons/indent.svg +6 -0
- package/custom/node_modules/quill/assets/icons/italic.svg +5 -0
- package/custom/node_modules/quill/assets/icons/link.svg +5 -0
- package/custom/node_modules/quill/assets/icons/list-bullet.svg +8 -0
- package/custom/node_modules/quill/assets/icons/list-check.svg +8 -0
- package/custom/node_modules/quill/assets/icons/list-ordered.svg +9 -0
- package/custom/node_modules/quill/assets/icons/map.svg +5 -0
- package/custom/node_modules/quill/assets/icons/mention.svg +4 -0
- package/custom/node_modules/quill/assets/icons/more.svg +3 -0
- package/custom/node_modules/quill/assets/icons/outdent.svg +6 -0
- package/custom/node_modules/quill/assets/icons/redo.svg +4 -0
- package/custom/node_modules/quill/assets/icons/size-decrease.svg +5 -0
- package/custom/node_modules/quill/assets/icons/size-increase.svg +6 -0
- package/custom/node_modules/quill/assets/icons/size.svg +6 -0
- package/custom/node_modules/quill/assets/icons/spacing.svg +9 -0
- package/custom/node_modules/quill/assets/icons/speech.svg +6 -0
- package/custom/node_modules/quill/assets/icons/strike.svg +5 -0
- package/custom/node_modules/quill/assets/icons/subscript.svg +4 -0
- package/custom/node_modules/quill/assets/icons/superscript.svg +4 -0
- package/custom/node_modules/quill/assets/icons/table-border-all.svg +5 -0
- package/custom/node_modules/quill/assets/icons/table-border-bottom.svg +28 -0
- package/custom/node_modules/quill/assets/icons/table-border-left.svg +28 -0
- package/custom/node_modules/quill/assets/icons/table-border-none.svg +25 -0
- package/custom/node_modules/quill/assets/icons/table-border-outside.svg +35 -0
- package/custom/node_modules/quill/assets/icons/table-border-right.svg +28 -0
- package/custom/node_modules/quill/assets/icons/table-border-top.svg +28 -0
- package/custom/node_modules/quill/assets/icons/table-delete-cells.svg +13 -0
- package/custom/node_modules/quill/assets/icons/table-delete-columns.svg +8 -0
- package/custom/node_modules/quill/assets/icons/table-delete-rows.svg +9 -0
- package/custom/node_modules/quill/assets/icons/table-insert-cells.svg +13 -0
- package/custom/node_modules/quill/assets/icons/table-insert-columns.svg +8 -0
- package/custom/node_modules/quill/assets/icons/table-insert-rows.svg +9 -0
- package/custom/node_modules/quill/assets/icons/table-merge-cells.svg +4 -0
- package/custom/node_modules/quill/assets/icons/table-unmerge-cells.svg +7 -0
- package/custom/node_modules/quill/assets/icons/table.svg +11 -0
- package/custom/node_modules/quill/assets/icons/underline.svg +4 -0
- package/custom/node_modules/quill/assets/icons/undo.svg +4 -0
- package/custom/node_modules/quill/assets/icons/video.svg +14 -0
- package/custom/node_modules/quill/assets/snow/toolbar.styl +26 -0
- package/custom/node_modules/quill/assets/snow/tooltip.styl +53 -0
- package/custom/node_modules/quill/assets/snow.styl +18 -0
- package/custom/node_modules/quill/blots/block.d.ts +34 -0
- package/custom/node_modules/quill/blots/block.js +182 -0
- package/custom/node_modules/quill/blots/block.js.map +1 -0
- package/custom/node_modules/quill/blots/break.d.ts +8 -0
- package/custom/node_modules/quill/blots/break.js +21 -0
- package/custom/node_modules/quill/blots/break.js.map +1 -0
- package/custom/node_modules/quill/blots/container.d.ts +4 -0
- package/custom/node_modules/quill/blots/container.js +4 -0
- package/custom/node_modules/quill/blots/container.js.map +1 -0
- package/custom/node_modules/quill/blots/cursor.d.ts +26 -0
- package/custom/node_modules/quill/blots/cursor.js +170 -0
- package/custom/node_modules/quill/blots/cursor.js.map +1 -0
- package/custom/node_modules/quill/blots/embed.d.ts +18 -0
- package/custom/node_modules/quill/blots/embed.js +72 -0
- package/custom/node_modules/quill/blots/embed.js.map +1 -0
- package/custom/node_modules/quill/blots/inline.d.ts +12 -0
- package/custom/node_modules/quill/blots/inline.js +48 -0
- package/custom/node_modules/quill/blots/inline.js.map +1 -0
- package/custom/node_modules/quill/blots/scroll.d.ts +49 -0
- package/custom/node_modules/quill/blots/scroll.js +349 -0
- package/custom/node_modules/quill/blots/scroll.js.map +1 -0
- package/custom/node_modules/quill/blots/text.d.ts +5 -0
- package/custom/node_modules/quill/blots/text.js +17 -0
- package/custom/node_modules/quill/blots/text.js.map +1 -0
- package/custom/node_modules/quill/core/composition.d.ts +12 -0
- package/custom/node_modules/quill/core/composition.js +44 -0
- package/custom/node_modules/quill/core/composition.js.map +1 -0
- package/custom/node_modules/quill/core/editor.d.ts +28 -0
- package/custom/node_modules/quill/core/editor.js +403 -0
- package/custom/node_modules/quill/core/editor.js.map +1 -0
- package/custom/node_modules/quill/core/emitter.d.ts +33 -0
- package/custom/node_modules/quill/core/emitter.js +78 -0
- package/custom/node_modules/quill/core/emitter.js.map +1 -0
- package/custom/node_modules/quill/core/instances.d.ts +3 -0
- package/custom/node_modules/quill/core/instances.js +2 -0
- package/custom/node_modules/quill/core/instances.js.map +1 -0
- package/custom/node_modules/quill/core/logger.d.ts +7 -0
- package/custom/node_modules/quill/core/logger.js +24 -0
- package/custom/node_modules/quill/core/logger.js.map +1 -0
- package/custom/node_modules/quill/core/module.d.ts +8 -0
- package/custom/node_modules/quill/core/module.js +10 -0
- package/custom/node_modules/quill/core/module.js.map +1 -0
- package/custom/node_modules/quill/core/quill.d.ts +218 -0
- package/custom/node_modules/quill/core/quill.js +628 -0
- package/custom/node_modules/quill/core/quill.js.map +1 -0
- package/custom/node_modules/quill/core/selection.d.ts +74 -0
- package/custom/node_modules/quill/core/selection.js +374 -0
- package/custom/node_modules/quill/core/selection.js.map +1 -0
- package/custom/node_modules/quill/core/theme.d.ts +32 -0
- package/custom/node_modules/quill/core/theme.js +28 -0
- package/custom/node_modules/quill/core/theme.js.map +1 -0
- package/custom/node_modules/quill/core/utils/createRegistryWithFormats.d.ts +5 -0
- package/custom/node_modules/quill/core/utils/createRegistryWithFormats.js +29 -0
- package/custom/node_modules/quill/core/utils/createRegistryWithFormats.js.map +1 -0
- package/custom/node_modules/quill/core/utils/scrollRectIntoView.d.ts +8 -0
- package/custom/node_modules/quill/core/utils/scrollRectIntoView.js +75 -0
- package/custom/node_modules/quill/core/utils/scrollRectIntoView.js.map +1 -0
- package/custom/node_modules/quill/core.d.ts +7 -0
- package/custom/node_modules/quill/core.js +37 -0
- package/custom/node_modules/quill/core.js.map +1 -0
- package/custom/node_modules/quill/dist/quill.bubble.css +10 -0
- package/custom/node_modules/quill/dist/quill.bubble.css.map +1 -0
- package/custom/node_modules/quill/dist/quill.core.css +10 -0
- package/custom/node_modules/quill/dist/quill.core.css.map +1 -0
- package/custom/node_modules/quill/dist/quill.core.js +3 -0
- package/custom/node_modules/quill/dist/quill.core.js.LICENSE.txt +7 -0
- package/custom/node_modules/quill/dist/quill.core.js.map +1 -0
- package/custom/node_modules/quill/dist/quill.js +3 -0
- package/custom/node_modules/quill/dist/quill.js.LICENSE.txt +7 -0
- package/custom/node_modules/quill/dist/quill.js.map +1 -0
- package/custom/node_modules/quill/dist/quill.snow.css +10 -0
- package/custom/node_modules/quill/dist/quill.snow.css.map +1 -0
- package/custom/node_modules/quill/formats/align.d.ts +5 -0
- package/custom/node_modules/quill/formats/align.js +10 -0
- package/custom/node_modules/quill/formats/align.js.map +1 -0
- package/custom/node_modules/quill/formats/background.d.ts +5 -0
- package/custom/node_modules/quill/formats/background.js +10 -0
- package/custom/node_modules/quill/formats/background.js.map +1 -0
- package/custom/node_modules/quill/formats/blockquote.d.ts +6 -0
- package/custom/node_modules/quill/formats/blockquote.js +7 -0
- package/custom/node_modules/quill/formats/blockquote.js.map +1 -0
- package/custom/node_modules/quill/formats/bold.d.ts +11 -0
- package/custom/node_modules/quill/formats/bold.js +19 -0
- package/custom/node_modules/quill/formats/bold.js.map +1 -0
- package/custom/node_modules/quill/formats/code.d.ts +15 -0
- package/custom/node_modules/quill/formats/code.js +44 -0
- package/custom/node_modules/quill/formats/code.js.map +1 -0
- package/custom/node_modules/quill/formats/color.d.ts +7 -0
- package/custom/node_modules/quill/formats/color.js +18 -0
- package/custom/node_modules/quill/formats/color.js.map +1 -0
- package/custom/node_modules/quill/formats/direction.d.ts +5 -0
- package/custom/node_modules/quill/formats/direction.js +10 -0
- package/custom/node_modules/quill/formats/direction.js.map +1 -0
- package/custom/node_modules/quill/formats/font.d.ts +7 -0
- package/custom/node_modules/quill/formats/font.js +14 -0
- package/custom/node_modules/quill/formats/font.js.map +1 -0
- package/custom/node_modules/quill/formats/formula.d.ts +10 -0
- package/custom/node_modules/quill/formats/formula.js +33 -0
- package/custom/node_modules/quill/formats/formula.js.map +1 -0
- package/custom/node_modules/quill/formats/header.d.ts +7 -0
- package/custom/node_modules/quill/formats/header.js +10 -0
- package/custom/node_modules/quill/formats/header.js.map +1 -0
- package/custom/node_modules/quill/formats/image.d.ts +13 -0
- package/custom/node_modules/quill/formats/image.js +44 -0
- package/custom/node_modules/quill/formats/image.js.map +1 -0
- package/custom/node_modules/quill/formats/indent.d.ts +8 -0
- package/custom/node_modules/quill/formats/indent.js +30 -0
- package/custom/node_modules/quill/formats/indent.js.map +1 -0
- package/custom/node_modules/quill/formats/italic.d.ts +6 -0
- package/custom/node_modules/quill/formats/italic.js +7 -0
- package/custom/node_modules/quill/formats/italic.js.map +1 -0
- package/custom/node_modules/quill/formats/link.d.ts +13 -0
- package/custom/node_modules/quill/formats/link.js +36 -0
- package/custom/node_modules/quill/formats/link.js.map +1 -0
- package/custom/node_modules/quill/formats/list.d.ts +13 -0
- package/custom/node_modules/quill/formats/list.js +50 -0
- package/custom/node_modules/quill/formats/list.js.map +1 -0
- package/custom/node_modules/quill/formats/script.d.ts +8 -0
- package/custom/node_modules/quill/formats/script.js +21 -0
- package/custom/node_modules/quill/formats/script.js.map +1 -0
- package/custom/node_modules/quill/formats/size.d.ts +4 -0
- package/custom/node_modules/quill/formats/size.js +11 -0
- package/custom/node_modules/quill/formats/size.js.map +1 -0
- package/custom/node_modules/quill/formats/strike.d.ts +6 -0
- package/custom/node_modules/quill/formats/strike.js +7 -0
- package/custom/node_modules/quill/formats/strike.js.map +1 -0
- package/custom/node_modules/quill/formats/table.d.ts +45 -0
- package/custom/node_modules/quill/formats/table.js +176 -0
- package/custom/node_modules/quill/formats/table.js.map +1 -0
- package/custom/node_modules/quill/formats/underline.d.ts +6 -0
- package/custom/node_modules/quill/formats/underline.js +7 -0
- package/custom/node_modules/quill/formats/underline.js.map +1 -0
- package/custom/node_modules/quill/formats/video.d.ts +14 -0
- package/custom/node_modules/quill/formats/video.js +48 -0
- package/custom/node_modules/quill/formats/video.js.map +1 -0
- package/custom/node_modules/quill/modules/clipboard.d.ts +43 -0
- package/custom/node_modules/quill/modules/clipboard.js +475 -0
- package/custom/node_modules/quill/modules/clipboard.js.map +1 -0
- package/custom/node_modules/quill/modules/history.d.ts +36 -0
- package/custom/node_modules/quill/modules/history.js +178 -0
- package/custom/node_modules/quill/modules/history.js.map +1 -0
- package/custom/node_modules/quill/modules/input.d.ts +10 -0
- package/custom/node_modules/quill/modules/input.js +83 -0
- package/custom/node_modules/quill/modules/input.js.map +1 -0
- package/custom/node_modules/quill/modules/keyboard.d.ts +58 -0
- package/custom/node_modules/quill/modules/keyboard.js +713 -0
- package/custom/node_modules/quill/modules/keyboard.js.map +1 -0
- package/custom/node_modules/quill/modules/normalizeExternalHTML/index.d.ts +2 -0
- package/custom/node_modules/quill/modules/normalizeExternalHTML/index.js +12 -0
- package/custom/node_modules/quill/modules/normalizeExternalHTML/index.js.map +1 -0
- package/custom/node_modules/quill/modules/normalizeExternalHTML/normalizers/googleDocs.d.ts +1 -0
- package/custom/node_modules/quill/modules/normalizeExternalHTML/normalizers/googleDocs.js +24 -0
- package/custom/node_modules/quill/modules/normalizeExternalHTML/normalizers/googleDocs.js.map +1 -0
- package/custom/node_modules/quill/modules/normalizeExternalHTML/normalizers/msWord.d.ts +1 -0
- package/custom/node_modules/quill/modules/normalizeExternalHTML/normalizers/msWord.js +87 -0
- package/custom/node_modules/quill/modules/normalizeExternalHTML/normalizers/msWord.js.map +1 -0
- package/custom/node_modules/quill/modules/syntax.d.ts +50 -0
- package/custom/node_modules/quill/modules/syntax.js +332 -0
- package/custom/node_modules/quill/modules/syntax.js.map +1 -0
- package/custom/node_modules/quill/modules/table.d.ts +20 -0
- package/custom/node_modules/quill/modules/table.js +125 -0
- package/custom/node_modules/quill/modules/table.js.map +1 -0
- package/custom/node_modules/quill/modules/tableEmbed.d.ts +27 -0
- package/custom/node_modules/quill/modules/tableEmbed.js +209 -0
- package/custom/node_modules/quill/modules/tableEmbed.js.map +1 -0
- package/custom/node_modules/quill/modules/toolbar.d.ts +24 -0
- package/custom/node_modules/quill/modules/toolbar.js +265 -0
- package/custom/node_modules/quill/modules/toolbar.js.map +1 -0
- package/custom/node_modules/quill/modules/uiNode.d.ts +19 -0
- package/custom/node_modules/quill/modules/uiNode.js +95 -0
- package/custom/node_modules/quill/modules/uiNode.js.map +1 -0
- package/custom/node_modules/quill/modules/uploader.d.ts +15 -0
- package/custom/node_modules/quill/modules/uploader.js +69 -0
- package/custom/node_modules/quill/modules/uploader.js.map +1 -0
- package/custom/node_modules/quill/package.json +100 -0
- package/custom/node_modules/quill/quill.d.ts +6 -0
- package/custom/node_modules/quill/quill.js +83 -0
- package/custom/node_modules/quill/quill.js.map +1 -0
- package/custom/node_modules/quill/themes/base.d.ts +35 -0
- package/custom/node_modules/quill/themes/base.js +257 -0
- package/custom/node_modules/quill/themes/base.js.map +1 -0
- package/custom/node_modules/quill/themes/bubble.d.ts +18 -0
- package/custom/node_modules/quill/themes/bubble.js +114 -0
- package/custom/node_modules/quill/themes/bubble.js.map +1 -0
- package/custom/node_modules/quill/themes/snow.d.ts +9 -0
- package/custom/node_modules/quill/themes/snow.js +122 -0
- package/custom/node_modules/quill/themes/snow.js.map +1 -0
- package/custom/node_modules/quill/types.d.js +2 -0
- package/custom/node_modules/quill/types.d.js.map +1 -0
- package/custom/node_modules/quill/ui/color-picker.d.ts +7 -0
- package/custom/node_modules/quill/ui/color-picker.js +30 -0
- package/custom/node_modules/quill/ui/color-picker.js.map +1 -0
- package/custom/node_modules/quill/ui/icon-picker.d.ts +7 -0
- package/custom/node_modules/quill/ui/icon-picker.js +22 -0
- package/custom/node_modules/quill/ui/icon-picker.js.map +1 -0
- package/custom/node_modules/quill/ui/icons.d.ts +49 -0
- package/custom/node_modules/quill/ui/icons.js +82 -0
- package/custom/node_modules/quill/ui/icons.js.map +1 -0
- package/custom/node_modules/quill/ui/picker.d.ts +16 -0
- package/custom/node_modules/quill/ui/picker.js +171 -0
- package/custom/node_modules/quill/ui/picker.js.map +1 -0
- package/custom/node_modules/quill/ui/tooltip.d.ts +12 -0
- package/custom/node_modules/quill/ui/tooltip.js +56 -0
- package/custom/node_modules/quill/ui/tooltip.js.map +1 -0
- package/custom/node_modules/quill-delta/LICENSE +14 -0
- package/custom/node_modules/quill-delta/README.md +672 -0
- package/custom/node_modules/quill-delta/dist/AttributeMap.d.ts +10 -0
- package/custom/node_modules/quill-delta/dist/AttributeMap.js +86 -0
- package/custom/node_modules/quill-delta/dist/AttributeMap.js.map +1 -0
- package/custom/node_modules/quill-delta/dist/Delta.d.ts +45 -0
- package/custom/node_modules/quill-delta/dist/Delta.js +478 -0
- package/custom/node_modules/quill-delta/dist/Delta.js.map +1 -0
- package/custom/node_modules/quill-delta/dist/Op.d.ts +11 -0
- package/custom/node_modules/quill-delta/dist/Op.js +22 -0
- package/custom/node_modules/quill-delta/dist/Op.js.map +1 -0
- package/custom/node_modules/quill-delta/dist/OpIterator.d.ts +13 -0
- package/custom/node_modules/quill-delta/dist/OpIterator.js +106 -0
- package/custom/node_modules/quill-delta/dist/OpIterator.js.map +1 -0
- package/custom/node_modules/quill-delta/package.json +77 -0
- package/custom/node_modules/quill-delta/src/AttributeMap.ts +101 -0
- package/custom/node_modules/quill-delta/src/Delta.ts +573 -0
- package/custom/node_modules/quill-delta/src/Op.ts +26 -0
- package/custom/node_modules/quill-delta/src/OpIterator.ts +106 -0
- package/custom/node_modules/quill-delta/tsconfig.json +15 -0
- package/custom/quillEditor.vue +2 -2
- package/dist/custom/quillEditor.vue +2 -2
- package/dist/index.js +7 -3
- package/index.ts +8 -5
- package/package.json +1 -1
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { AttributorStore, BlockBlot, EmbedBlot, LeafBlot, Scope } from 'parchment';
|
|
2
|
+
import Delta from 'quill-delta';
|
|
3
|
+
import Break from './break.js';
|
|
4
|
+
import Inline from './inline.js';
|
|
5
|
+
import TextBlot from './text.js';
|
|
6
|
+
const NEWLINE_LENGTH = 1;
|
|
7
|
+
class Block extends BlockBlot {
|
|
8
|
+
cache = {};
|
|
9
|
+
delta() {
|
|
10
|
+
if (this.cache.delta == null) {
|
|
11
|
+
this.cache.delta = blockDelta(this);
|
|
12
|
+
}
|
|
13
|
+
return this.cache.delta;
|
|
14
|
+
}
|
|
15
|
+
deleteAt(index, length) {
|
|
16
|
+
super.deleteAt(index, length);
|
|
17
|
+
this.cache = {};
|
|
18
|
+
}
|
|
19
|
+
formatAt(index, length, name, value) {
|
|
20
|
+
if (length <= 0) return;
|
|
21
|
+
if (this.scroll.query(name, Scope.BLOCK)) {
|
|
22
|
+
if (index + length === this.length()) {
|
|
23
|
+
this.format(name, value);
|
|
24
|
+
}
|
|
25
|
+
} else {
|
|
26
|
+
super.formatAt(index, Math.min(length, this.length() - index - 1), name, value);
|
|
27
|
+
}
|
|
28
|
+
this.cache = {};
|
|
29
|
+
}
|
|
30
|
+
insertAt(index, value, def) {
|
|
31
|
+
if (def != null) {
|
|
32
|
+
super.insertAt(index, value, def);
|
|
33
|
+
this.cache = {};
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (value.length === 0) return;
|
|
37
|
+
const lines = value.split('\n');
|
|
38
|
+
const text = lines.shift();
|
|
39
|
+
if (text.length > 0) {
|
|
40
|
+
if (index < this.length() - 1 || this.children.tail == null) {
|
|
41
|
+
super.insertAt(Math.min(index, this.length() - 1), text);
|
|
42
|
+
} else {
|
|
43
|
+
this.children.tail.insertAt(this.children.tail.length(), text);
|
|
44
|
+
}
|
|
45
|
+
this.cache = {};
|
|
46
|
+
}
|
|
47
|
+
// TODO: Fix this next time the file is edited.
|
|
48
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
49
|
+
let block = this;
|
|
50
|
+
lines.reduce((lineIndex, line) => {
|
|
51
|
+
// @ts-expect-error Fix me later
|
|
52
|
+
block = block.split(lineIndex, true);
|
|
53
|
+
block.insertAt(0, line);
|
|
54
|
+
return line.length;
|
|
55
|
+
}, index + text.length);
|
|
56
|
+
}
|
|
57
|
+
insertBefore(blot, ref) {
|
|
58
|
+
const {
|
|
59
|
+
head
|
|
60
|
+
} = this.children;
|
|
61
|
+
super.insertBefore(blot, ref);
|
|
62
|
+
if (head instanceof Break) {
|
|
63
|
+
head.remove();
|
|
64
|
+
}
|
|
65
|
+
this.cache = {};
|
|
66
|
+
}
|
|
67
|
+
length() {
|
|
68
|
+
if (this.cache.length == null) {
|
|
69
|
+
this.cache.length = super.length() + NEWLINE_LENGTH;
|
|
70
|
+
}
|
|
71
|
+
return this.cache.length;
|
|
72
|
+
}
|
|
73
|
+
moveChildren(target, ref) {
|
|
74
|
+
super.moveChildren(target, ref);
|
|
75
|
+
this.cache = {};
|
|
76
|
+
}
|
|
77
|
+
optimize(context) {
|
|
78
|
+
super.optimize(context);
|
|
79
|
+
this.cache = {};
|
|
80
|
+
}
|
|
81
|
+
path(index) {
|
|
82
|
+
return super.path(index, true);
|
|
83
|
+
}
|
|
84
|
+
removeChild(child) {
|
|
85
|
+
super.removeChild(child);
|
|
86
|
+
this.cache = {};
|
|
87
|
+
}
|
|
88
|
+
split(index) {
|
|
89
|
+
let force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
90
|
+
if (force && (index === 0 || index >= this.length() - NEWLINE_LENGTH)) {
|
|
91
|
+
const clone = this.clone();
|
|
92
|
+
if (index === 0) {
|
|
93
|
+
this.parent.insertBefore(clone, this);
|
|
94
|
+
return this;
|
|
95
|
+
}
|
|
96
|
+
this.parent.insertBefore(clone, this.next);
|
|
97
|
+
return clone;
|
|
98
|
+
}
|
|
99
|
+
const next = super.split(index, force);
|
|
100
|
+
this.cache = {};
|
|
101
|
+
return next;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
Block.blotName = 'block';
|
|
105
|
+
Block.tagName = 'P';
|
|
106
|
+
Block.defaultChild = Break;
|
|
107
|
+
Block.allowedChildren = [Break, Inline, EmbedBlot, TextBlot];
|
|
108
|
+
class BlockEmbed extends EmbedBlot {
|
|
109
|
+
attach() {
|
|
110
|
+
super.attach();
|
|
111
|
+
this.attributes = new AttributorStore(this.domNode);
|
|
112
|
+
}
|
|
113
|
+
delta() {
|
|
114
|
+
return new Delta().insert(this.value(), {
|
|
115
|
+
...this.formats(),
|
|
116
|
+
...this.attributes.values()
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
format(name, value) {
|
|
120
|
+
const attribute = this.scroll.query(name, Scope.BLOCK_ATTRIBUTE);
|
|
121
|
+
if (attribute != null) {
|
|
122
|
+
// @ts-expect-error TODO: Scroll#query() should return Attributor when scope is attribute
|
|
123
|
+
this.attributes.attribute(attribute, value);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
formatAt(index, length, name, value) {
|
|
127
|
+
this.format(name, value);
|
|
128
|
+
}
|
|
129
|
+
insertAt(index, value, def) {
|
|
130
|
+
if (def != null) {
|
|
131
|
+
super.insertAt(index, value, def);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
const lines = value.split('\n');
|
|
135
|
+
const text = lines.pop();
|
|
136
|
+
const blocks = lines.map(line => {
|
|
137
|
+
const block = this.scroll.create(Block.blotName);
|
|
138
|
+
block.insertAt(0, line);
|
|
139
|
+
return block;
|
|
140
|
+
});
|
|
141
|
+
const ref = this.split(index);
|
|
142
|
+
blocks.forEach(block => {
|
|
143
|
+
this.parent.insertBefore(block, ref);
|
|
144
|
+
});
|
|
145
|
+
if (text) {
|
|
146
|
+
this.parent.insertBefore(this.scroll.create('text', text), ref);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
BlockEmbed.scope = Scope.BLOCK_BLOT;
|
|
151
|
+
// It is important for cursor behavior BlockEmbeds use tags that are block level elements
|
|
152
|
+
|
|
153
|
+
function blockDelta(blot) {
|
|
154
|
+
let filter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
155
|
+
return blot.descendants(LeafBlot).reduce((delta, leaf) => {
|
|
156
|
+
if (leaf.length() === 0) {
|
|
157
|
+
return delta;
|
|
158
|
+
}
|
|
159
|
+
return delta.insert(leaf.value(), bubbleFormats(leaf, {}, filter));
|
|
160
|
+
}, new Delta()).insert('\n', bubbleFormats(blot));
|
|
161
|
+
}
|
|
162
|
+
function bubbleFormats(blot) {
|
|
163
|
+
let formats = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
164
|
+
let filter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
165
|
+
if (blot == null) return formats;
|
|
166
|
+
if ('formats' in blot && typeof blot.formats === 'function') {
|
|
167
|
+
formats = {
|
|
168
|
+
...formats,
|
|
169
|
+
...blot.formats()
|
|
170
|
+
};
|
|
171
|
+
if (filter) {
|
|
172
|
+
// exclude syntax highlighting from deltas and getFormat()
|
|
173
|
+
delete formats['code-token'];
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
if (blot.parent == null || blot.parent.statics.blotName === 'scroll' || blot.parent.statics.scope !== blot.statics.scope) {
|
|
177
|
+
return formats;
|
|
178
|
+
}
|
|
179
|
+
return bubbleFormats(blot.parent, formats, filter);
|
|
180
|
+
}
|
|
181
|
+
export { blockDelta, bubbleFormats, BlockEmbed, Block as default };
|
|
182
|
+
//# sourceMappingURL=block.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block.js","names":["AttributorStore","BlockBlot","EmbedBlot","LeafBlot","Scope","Delta","Break","Inline","TextBlot","NEWLINE_LENGTH","Block","cache","delta","blockDelta","deleteAt","index","length","formatAt","name","value","scroll","query","BLOCK","format","Math","min","insertAt","def","lines","split","text","shift","children","tail","block","reduce","lineIndex","line","insertBefore","blot","ref","head","remove","moveChildren","target","optimize","context","path","removeChild","child","force","arguments","undefined","clone","parent","next","blotName","tagName","defaultChild","allowedChildren","BlockEmbed","attach","attributes","domNode","insert","formats","values","attribute","BLOCK_ATTRIBUTE","pop","blocks","map","create","forEach","scope","BLOCK_BLOT","filter","descendants","leaf","bubbleFormats","statics","default"],"sources":["../../src/blots/block.ts"],"sourcesContent":["import {\n AttributorStore,\n BlockBlot,\n EmbedBlot,\n LeafBlot,\n Scope,\n} from 'parchment';\nimport type { Blot, Parent } from 'parchment';\nimport Delta from 'quill-delta';\nimport Break from './break.js';\nimport Inline from './inline.js';\nimport TextBlot from './text.js';\n\nconst NEWLINE_LENGTH = 1;\n\nclass Block extends BlockBlot {\n cache: { delta?: Delta | null; length?: number } = {};\n\n delta(): Delta {\n if (this.cache.delta == null) {\n this.cache.delta = blockDelta(this);\n }\n return this.cache.delta;\n }\n\n deleteAt(index: number, length: number) {\n super.deleteAt(index, length);\n this.cache = {};\n }\n\n formatAt(index: number, length: number, name: string, value: unknown) {\n if (length <= 0) return;\n if (this.scroll.query(name, Scope.BLOCK)) {\n if (index + length === this.length()) {\n this.format(name, value);\n }\n } else {\n super.formatAt(\n index,\n Math.min(length, this.length() - index - 1),\n name,\n value,\n );\n }\n this.cache = {};\n }\n\n insertAt(index: number, value: string, def?: unknown) {\n if (def != null) {\n super.insertAt(index, value, def);\n this.cache = {};\n return;\n }\n if (value.length === 0) return;\n const lines = value.split('\\n');\n const text = lines.shift() as string;\n if (text.length > 0) {\n if (index < this.length() - 1 || this.children.tail == null) {\n super.insertAt(Math.min(index, this.length() - 1), text);\n } else {\n this.children.tail.insertAt(this.children.tail.length(), text);\n }\n this.cache = {};\n }\n // TODO: Fix this next time the file is edited.\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let block: Blot | this = this;\n lines.reduce((lineIndex, line) => {\n // @ts-expect-error Fix me later\n block = block.split(lineIndex, true);\n block.insertAt(0, line);\n return line.length;\n }, index + text.length);\n }\n\n insertBefore(blot: Blot, ref?: Blot | null) {\n const { head } = this.children;\n super.insertBefore(blot, ref);\n if (head instanceof Break) {\n head.remove();\n }\n this.cache = {};\n }\n\n length() {\n if (this.cache.length == null) {\n this.cache.length = super.length() + NEWLINE_LENGTH;\n }\n return this.cache.length;\n }\n\n moveChildren(target: Parent, ref?: Blot | null) {\n super.moveChildren(target, ref);\n this.cache = {};\n }\n\n optimize(context: { [key: string]: any }) {\n super.optimize(context);\n this.cache = {};\n }\n\n path(index: number) {\n return super.path(index, true);\n }\n\n removeChild(child: Blot) {\n super.removeChild(child);\n this.cache = {};\n }\n\n split(index: number, force: boolean | undefined = false): Blot | null {\n if (force && (index === 0 || index >= this.length() - NEWLINE_LENGTH)) {\n const clone = this.clone();\n if (index === 0) {\n this.parent.insertBefore(clone, this);\n return this;\n }\n this.parent.insertBefore(clone, this.next);\n return clone;\n }\n const next = super.split(index, force);\n this.cache = {};\n return next;\n }\n}\nBlock.blotName = 'block';\nBlock.tagName = 'P';\nBlock.defaultChild = Break;\nBlock.allowedChildren = [Break, Inline, EmbedBlot, TextBlot];\n\nclass BlockEmbed extends EmbedBlot {\n attributes: AttributorStore;\n domNode: HTMLElement;\n\n attach() {\n super.attach();\n this.attributes = new AttributorStore(this.domNode);\n }\n\n delta() {\n return new Delta().insert(this.value(), {\n ...this.formats(),\n ...this.attributes.values(),\n });\n }\n\n format(name: string, value: unknown) {\n const attribute = this.scroll.query(name, Scope.BLOCK_ATTRIBUTE);\n if (attribute != null) {\n // @ts-expect-error TODO: Scroll#query() should return Attributor when scope is attribute\n this.attributes.attribute(attribute, value);\n }\n }\n\n formatAt(index: number, length: number, name: string, value: unknown) {\n this.format(name, value);\n }\n\n insertAt(index: number, value: string, def?: unknown) {\n if (def != null) {\n super.insertAt(index, value, def);\n return;\n }\n const lines = value.split('\\n');\n const text = lines.pop();\n const blocks = lines.map((line) => {\n const block = this.scroll.create(Block.blotName);\n block.insertAt(0, line);\n return block;\n });\n const ref = this.split(index);\n blocks.forEach((block) => {\n this.parent.insertBefore(block, ref);\n });\n if (text) {\n this.parent.insertBefore(this.scroll.create('text', text), ref);\n }\n }\n}\nBlockEmbed.scope = Scope.BLOCK_BLOT;\n// It is important for cursor behavior BlockEmbeds use tags that are block level elements\n\nfunction blockDelta(blot: BlockBlot, filter = true) {\n return blot\n .descendants(LeafBlot)\n .reduce((delta, leaf) => {\n if (leaf.length() === 0) {\n return delta;\n }\n return delta.insert(leaf.value(), bubbleFormats(leaf, {}, filter));\n }, new Delta())\n .insert('\\n', bubbleFormats(blot));\n}\n\nfunction bubbleFormats(\n blot: Blot | null,\n formats: Record<string, unknown> = {},\n filter = true,\n): Record<string, unknown> {\n if (blot == null) return formats;\n if ('formats' in blot && typeof blot.formats === 'function') {\n formats = {\n ...formats,\n ...blot.formats(),\n };\n if (filter) {\n // exclude syntax highlighting from deltas and getFormat()\n delete formats['code-token'];\n }\n }\n if (\n blot.parent == null ||\n blot.parent.statics.blotName === 'scroll' ||\n blot.parent.statics.scope !== blot.statics.scope\n ) {\n return formats;\n }\n return bubbleFormats(blot.parent, formats, filter);\n}\n\nexport { blockDelta, bubbleFormats, BlockEmbed, Block as default };\n"],"mappings":"AAAA,SACEA,eAAe,EACfC,SAAS,EACTC,SAAS,EACTC,QAAQ,EACRC,KAAK,QACA,WAAW;AAElB,OAAOC,KAAK,MAAM,aAAa;AAC/B,OAAOC,KAAK,MAAM,YAAY;AAC9B,OAAOC,MAAM,MAAM,aAAa;AAChC,OAAOC,QAAQ,MAAM,WAAW;AAEhC,MAAMC,cAAc,GAAG,CAAC;AAExB,MAAMC,KAAK,SAAST,SAAS,CAAC;EAC5BU,KAAK,GAA8C,CAAC,CAAC;EAErDC,KAAKA,CAAA,EAAU;IACb,IAAI,IAAI,CAACD,KAAK,CAACC,KAAK,IAAI,IAAI,EAAE;MAC5B,IAAI,CAACD,KAAK,CAACC,KAAK,GAAGC,UAAU,CAAC,IAAI,CAAC;IACrC;IACA,OAAO,IAAI,CAACF,KAAK,CAACC,KAAK;EACzB;EAEAE,QAAQA,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
+
return undefined;
|
|
5
|
+
}
|
|
6
|
+
optimize() {
|
|
7
|
+
if (this.prev || this.next) {
|
|
8
|
+
this.remove();
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
length() {
|
|
12
|
+
return 0;
|
|
13
|
+
}
|
|
14
|
+
value() {
|
|
15
|
+
return '';
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
Break.blotName = 'break';
|
|
19
|
+
Break.tagName = 'BR';
|
|
20
|
+
export default Break;
|
|
21
|
+
//# sourceMappingURL=break.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"break.js","names":["EmbedBlot","Break","value","undefined","optimize","prev","next","remove","length","blotName","tagName"],"sources":["../../src/blots/break.ts"],"sourcesContent":["import { EmbedBlot } from 'parchment';\n\nclass Break extends EmbedBlot {\n static value() {\n return undefined;\n }\n\n optimize() {\n if (this.prev || this.next) {\n this.remove();\n }\n }\n\n length() {\n return 0;\n }\n\n value() {\n return '';\n }\n}\nBreak.blotName = 'break';\nBreak.tagName = 'BR';\n\nexport default Break;\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,WAAW;AAErC,MAAMC,KAAK,SAASD,SAAS,CAAC;EAC5B,OAAOE,KAAKA,CAAA,EAAG;IACb,OAAOC,SAAS;EAClB;EAEAC,QAAQA,CAAA,EAAG;IACT,IAAI,IAAI,CAACC,IAAI,IAAI,IAAI,CAACC,IAAI,EAAE;MAC1B,IAAI,CAACC,MAAM,CAAC,CAAC;IACf;EACF;EAEAC,MAAMA,CAAA,EAAG;IACP,OAAO,CAAC;EACV;EAEAN,KAAKA,CAAA,EAAG;IACN,OAAO,EAAE;EACX;AACF;AACAD,KAAK,CAACQ,QAAQ,GAAG,OAAO;AACxBR,KAAK,CAACS,OAAO,GAAG,IAAI;AAEpB,eAAeT,KAAK","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container.js","names":["ContainerBlot","Container"],"sources":["../../src/blots/container.ts"],"sourcesContent":["import { ContainerBlot } from 'parchment';\n\nclass Container extends ContainerBlot {}\n\nexport default Container;\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,WAAW;AAEzC,MAAMC,SAAS,SAASD,aAAa,CAAC;AAEtC,eAAeC,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EmbedBlot } from 'parchment';
|
|
2
|
+
import type { ScrollBlot } from 'parchment';
|
|
3
|
+
import type Selection from '../core/selection.js';
|
|
4
|
+
import type { EmbedContextRange } from './embed.js';
|
|
5
|
+
declare class Cursor extends EmbedBlot {
|
|
6
|
+
static blotName: string;
|
|
7
|
+
static className: string;
|
|
8
|
+
static tagName: string;
|
|
9
|
+
static CONTENTS: string;
|
|
10
|
+
static value(): undefined;
|
|
11
|
+
selection: Selection;
|
|
12
|
+
textNode: Text;
|
|
13
|
+
savedLength: number;
|
|
14
|
+
constructor(scroll: ScrollBlot, domNode: HTMLElement, selection: Selection);
|
|
15
|
+
detach(): void;
|
|
16
|
+
format(name: string, value: unknown): void;
|
|
17
|
+
index(node: Node, offset: number): number;
|
|
18
|
+
length(): number;
|
|
19
|
+
position(): [Text, number];
|
|
20
|
+
remove(): void;
|
|
21
|
+
restore(): EmbedContextRange | null;
|
|
22
|
+
update(mutations: MutationRecord[], context: Record<string, unknown>): void;
|
|
23
|
+
optimize(context?: unknown): void;
|
|
24
|
+
value(): string;
|
|
25
|
+
}
|
|
26
|
+
export default Cursor;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { EmbedBlot, Scope } from 'parchment';
|
|
2
|
+
import TextBlot from './text.js';
|
|
3
|
+
class Cursor extends EmbedBlot {
|
|
4
|
+
static blotName = 'cursor';
|
|
5
|
+
static className = 'ql-cursor';
|
|
6
|
+
static tagName = 'span';
|
|
7
|
+
static CONTENTS = '\uFEFF'; // Zero width no break space
|
|
8
|
+
|
|
9
|
+
static value() {
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
constructor(scroll, domNode, selection) {
|
|
13
|
+
super(scroll, domNode);
|
|
14
|
+
this.selection = selection;
|
|
15
|
+
this.textNode = document.createTextNode(Cursor.CONTENTS);
|
|
16
|
+
this.domNode.appendChild(this.textNode);
|
|
17
|
+
this.savedLength = 0;
|
|
18
|
+
}
|
|
19
|
+
detach() {
|
|
20
|
+
// super.detach() will also clear domNode.__blot
|
|
21
|
+
if (this.parent != null) this.parent.removeChild(this);
|
|
22
|
+
}
|
|
23
|
+
format(name, value) {
|
|
24
|
+
if (this.savedLength !== 0) {
|
|
25
|
+
super.format(name, value);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
// TODO: Fix this next time the file is edited.
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
30
|
+
let target = this;
|
|
31
|
+
let index = 0;
|
|
32
|
+
while (target != null && target.statics.scope !== Scope.BLOCK_BLOT) {
|
|
33
|
+
index += target.offset(target.parent);
|
|
34
|
+
target = target.parent;
|
|
35
|
+
}
|
|
36
|
+
if (target != null) {
|
|
37
|
+
this.savedLength = Cursor.CONTENTS.length;
|
|
38
|
+
// @ts-expect-error TODO: allow empty context in Parchment
|
|
39
|
+
target.optimize();
|
|
40
|
+
target.formatAt(index, Cursor.CONTENTS.length, name, value);
|
|
41
|
+
this.savedLength = 0;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
index(node, offset) {
|
|
45
|
+
if (node === this.textNode) return 0;
|
|
46
|
+
return super.index(node, offset);
|
|
47
|
+
}
|
|
48
|
+
length() {
|
|
49
|
+
return this.savedLength;
|
|
50
|
+
}
|
|
51
|
+
position() {
|
|
52
|
+
return [this.textNode, this.textNode.data.length];
|
|
53
|
+
}
|
|
54
|
+
remove() {
|
|
55
|
+
super.remove();
|
|
56
|
+
// @ts-expect-error Fix me later
|
|
57
|
+
this.parent = null;
|
|
58
|
+
}
|
|
59
|
+
restore() {
|
|
60
|
+
if (this.selection.composing || this.parent == null) return null;
|
|
61
|
+
const range = this.selection.getNativeRange();
|
|
62
|
+
// Browser may push down styles/nodes inside the cursor blot.
|
|
63
|
+
// https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#push-down-values
|
|
64
|
+
while (this.domNode.lastChild != null && this.domNode.lastChild !== this.textNode) {
|
|
65
|
+
// @ts-expect-error Fix me later
|
|
66
|
+
this.domNode.parentNode.insertBefore(this.domNode.lastChild, this.domNode);
|
|
67
|
+
}
|
|
68
|
+
const prevTextBlot = this.prev instanceof TextBlot ? this.prev : null;
|
|
69
|
+
const prevTextLength = prevTextBlot ? prevTextBlot.length() : 0;
|
|
70
|
+
const nextTextBlot = this.next instanceof TextBlot ? this.next : null;
|
|
71
|
+
// @ts-expect-error TODO: make TextBlot.text public
|
|
72
|
+
const nextText = nextTextBlot ? nextTextBlot.text : '';
|
|
73
|
+
const {
|
|
74
|
+
textNode
|
|
75
|
+
} = this;
|
|
76
|
+
// take text from inside this blot and reset it
|
|
77
|
+
const newText = textNode.data.split(Cursor.CONTENTS).join('');
|
|
78
|
+
textNode.data = Cursor.CONTENTS;
|
|
79
|
+
|
|
80
|
+
// proactively merge TextBlots around cursor so that optimization
|
|
81
|
+
// doesn't lose the cursor. the reason we are here in cursor.restore
|
|
82
|
+
// could be that the user clicked in prevTextBlot or nextTextBlot, or
|
|
83
|
+
// the user typed something.
|
|
84
|
+
let mergedTextBlot;
|
|
85
|
+
if (prevTextBlot) {
|
|
86
|
+
mergedTextBlot = prevTextBlot;
|
|
87
|
+
if (newText || nextTextBlot) {
|
|
88
|
+
prevTextBlot.insertAt(prevTextBlot.length(), newText + nextText);
|
|
89
|
+
if (nextTextBlot) {
|
|
90
|
+
nextTextBlot.remove();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
} else if (nextTextBlot) {
|
|
94
|
+
mergedTextBlot = nextTextBlot;
|
|
95
|
+
nextTextBlot.insertAt(0, newText);
|
|
96
|
+
} else {
|
|
97
|
+
const newTextNode = document.createTextNode(newText);
|
|
98
|
+
mergedTextBlot = this.scroll.create(newTextNode);
|
|
99
|
+
this.parent.insertBefore(mergedTextBlot, this);
|
|
100
|
+
}
|
|
101
|
+
this.remove();
|
|
102
|
+
if (range) {
|
|
103
|
+
// calculate selection to restore
|
|
104
|
+
const remapOffset = (node, offset) => {
|
|
105
|
+
if (prevTextBlot && node === prevTextBlot.domNode) {
|
|
106
|
+
return offset;
|
|
107
|
+
}
|
|
108
|
+
if (node === textNode) {
|
|
109
|
+
return prevTextLength + offset - 1;
|
|
110
|
+
}
|
|
111
|
+
if (nextTextBlot && node === nextTextBlot.domNode) {
|
|
112
|
+
return prevTextLength + newText.length + offset;
|
|
113
|
+
}
|
|
114
|
+
return null;
|
|
115
|
+
};
|
|
116
|
+
const start = remapOffset(range.start.node, range.start.offset);
|
|
117
|
+
const end = remapOffset(range.end.node, range.end.offset);
|
|
118
|
+
if (start !== null && end !== null) {
|
|
119
|
+
return {
|
|
120
|
+
startNode: mergedTextBlot.domNode,
|
|
121
|
+
startOffset: start,
|
|
122
|
+
endNode: mergedTextBlot.domNode,
|
|
123
|
+
endOffset: end
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
update(mutations, context) {
|
|
130
|
+
if (mutations.some(mutation => {
|
|
131
|
+
return mutation.type === 'characterData' && mutation.target === this.textNode;
|
|
132
|
+
})) {
|
|
133
|
+
const range = this.restore();
|
|
134
|
+
if (range) context.range = range;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Avoid .ql-cursor being a descendant of `<a/>`.
|
|
139
|
+
// The reason is Safari pushes down `<a/>` on text insertion.
|
|
140
|
+
// That will cause DOM nodes not sync with the model.
|
|
141
|
+
//
|
|
142
|
+
// For example ({I} is the caret), given the markup:
|
|
143
|
+
// <a><span class="ql-cursor">\uFEFF{I}</span></a>
|
|
144
|
+
// When typing a char "x", `<a/>` will be pushed down inside the `<span>` first:
|
|
145
|
+
// <span class="ql-cursor"><a>\uFEFF{I}</a></span>
|
|
146
|
+
// And then "x" will be inserted after `<a/>`:
|
|
147
|
+
// <span class="ql-cursor"><a>\uFEFF</a>d{I}</span>
|
|
148
|
+
optimize(context) {
|
|
149
|
+
// @ts-expect-error Fix me later
|
|
150
|
+
super.optimize(context);
|
|
151
|
+
let {
|
|
152
|
+
parent
|
|
153
|
+
} = this;
|
|
154
|
+
while (parent) {
|
|
155
|
+
if (parent.domNode.tagName === 'A') {
|
|
156
|
+
this.savedLength = Cursor.CONTENTS.length;
|
|
157
|
+
// @ts-expect-error TODO: make isolate generic
|
|
158
|
+
parent.isolate(this.offset(parent), this.length()).unwrap();
|
|
159
|
+
this.savedLength = 0;
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
parent = parent.parent;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
value() {
|
|
166
|
+
return '';
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
export default Cursor;
|
|
170
|
+
//# sourceMappingURL=cursor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.js","names":["EmbedBlot","Scope","TextBlot","Cursor","blotName","className","tagName","CONTENTS","value","undefined","constructor","scroll","domNode","selection","textNode","document","createTextNode","appendChild","savedLength","detach","parent","removeChild","format","name","target","index","statics","scope","BLOCK_BLOT","offset","length","optimize","formatAt","node","position","data","remove","restore","composing","range","getNativeRange","lastChild","parentNode","insertBefore","prevTextBlot","prev","prevTextLength","nextTextBlot","next","nextText","text","newText","split","join","mergedTextBlot","insertAt","newTextNode","create","remapOffset","start","end","startNode","startOffset","endNode","endOffset","update","mutations","context","some","mutation","type","isolate","unwrap"],"sources":["../../src/blots/cursor.ts"],"sourcesContent":["import { EmbedBlot, Scope } from 'parchment';\nimport type { Parent, ScrollBlot } from 'parchment';\nimport type Selection from '../core/selection.js';\nimport TextBlot from './text.js';\nimport type { EmbedContextRange } from './embed.js';\n\nclass Cursor extends EmbedBlot {\n static blotName = 'cursor';\n static className = 'ql-cursor';\n static tagName = 'span';\n static CONTENTS = '\\uFEFF'; // Zero width no break space\n\n static value() {\n return undefined;\n }\n\n selection: Selection;\n textNode: Text;\n savedLength: number;\n\n constructor(scroll: ScrollBlot, domNode: HTMLElement, selection: Selection) {\n super(scroll, domNode);\n this.selection = selection;\n this.textNode = document.createTextNode(Cursor.CONTENTS);\n this.domNode.appendChild(this.textNode);\n this.savedLength = 0;\n }\n\n detach() {\n // super.detach() will also clear domNode.__blot\n if (this.parent != null) this.parent.removeChild(this);\n }\n\n format(name: string, value: unknown) {\n if (this.savedLength !== 0) {\n super.format(name, value);\n return;\n }\n // TODO: Fix this next time the file is edited.\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let target: Parent | this = this;\n let index = 0;\n while (target != null && target.statics.scope !== Scope.BLOCK_BLOT) {\n index += target.offset(target.parent);\n target = target.parent;\n }\n if (target != null) {\n this.savedLength = Cursor.CONTENTS.length;\n // @ts-expect-error TODO: allow empty context in Parchment\n target.optimize();\n target.formatAt(index, Cursor.CONTENTS.length, name, value);\n this.savedLength = 0;\n }\n }\n\n index(node: Node, offset: number) {\n if (node === this.textNode) return 0;\n return super.index(node, offset);\n }\n\n length() {\n return this.savedLength;\n }\n\n position(): [Text, number] {\n return [this.textNode, this.textNode.data.length];\n }\n\n remove() {\n super.remove();\n // @ts-expect-error Fix me later\n this.parent = null;\n }\n\n restore(): EmbedContextRange | null {\n if (this.selection.composing || this.parent == null) return null;\n const range = this.selection.getNativeRange();\n // Browser may push down styles/nodes inside the cursor blot.\n // https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#push-down-values\n while (\n this.domNode.lastChild != null &&\n this.domNode.lastChild !== this.textNode\n ) {\n // @ts-expect-error Fix me later\n this.domNode.parentNode.insertBefore(\n this.domNode.lastChild,\n this.domNode,\n );\n }\n\n const prevTextBlot = this.prev instanceof TextBlot ? this.prev : null;\n const prevTextLength = prevTextBlot ? prevTextBlot.length() : 0;\n const nextTextBlot = this.next instanceof TextBlot ? this.next : null;\n // @ts-expect-error TODO: make TextBlot.text public\n const nextText = nextTextBlot ? nextTextBlot.text : '';\n const { textNode } = this;\n // take text from inside this blot and reset it\n const newText = textNode.data.split(Cursor.CONTENTS).join('');\n textNode.data = Cursor.CONTENTS;\n\n // proactively merge TextBlots around cursor so that optimization\n // doesn't lose the cursor. the reason we are here in cursor.restore\n // could be that the user clicked in prevTextBlot or nextTextBlot, or\n // the user typed something.\n let mergedTextBlot;\n if (prevTextBlot) {\n mergedTextBlot = prevTextBlot;\n if (newText || nextTextBlot) {\n prevTextBlot.insertAt(prevTextBlot.length(), newText + nextText);\n if (nextTextBlot) {\n nextTextBlot.remove();\n }\n }\n } else if (nextTextBlot) {\n mergedTextBlot = nextTextBlot;\n nextTextBlot.insertAt(0, newText);\n } else {\n const newTextNode = document.createTextNode(newText);\n mergedTextBlot = this.scroll.create(newTextNode);\n this.parent.insertBefore(mergedTextBlot, this);\n }\n\n this.remove();\n if (range) {\n // calculate selection to restore\n const remapOffset = (node: Node, offset: number) => {\n if (prevTextBlot && node === prevTextBlot.domNode) {\n return offset;\n }\n if (node === textNode) {\n return prevTextLength + offset - 1;\n }\n if (nextTextBlot && node === nextTextBlot.domNode) {\n return prevTextLength + newText.length + offset;\n }\n return null;\n };\n\n const start = remapOffset(range.start.node, range.start.offset);\n const end = remapOffset(range.end.node, range.end.offset);\n if (start !== null && end !== null) {\n return {\n startNode: mergedTextBlot.domNode,\n startOffset: start,\n endNode: mergedTextBlot.domNode,\n endOffset: end,\n };\n }\n }\n return null;\n }\n\n update(mutations: MutationRecord[], context: Record<string, unknown>) {\n if (\n mutations.some((mutation) => {\n return (\n mutation.type === 'characterData' && mutation.target === this.textNode\n );\n })\n ) {\n const range = this.restore();\n if (range) context.range = range;\n }\n }\n\n // Avoid .ql-cursor being a descendant of `<a/>`.\n // The reason is Safari pushes down `<a/>` on text insertion.\n // That will cause DOM nodes not sync with the model.\n //\n // For example ({I} is the caret), given the markup:\n // <a><span class=\"ql-cursor\">\\uFEFF{I}</span></a>\n // When typing a char \"x\", `<a/>` will be pushed down inside the `<span>` first:\n // <span class=\"ql-cursor\"><a>\\uFEFF{I}</a></span>\n // And then \"x\" will be inserted after `<a/>`:\n // <span class=\"ql-cursor\"><a>\\uFEFF</a>d{I}</span>\n optimize(context?: unknown) {\n // @ts-expect-error Fix me later\n super.optimize(context);\n\n let { parent } = this;\n while (parent) {\n if (parent.domNode.tagName === 'A') {\n this.savedLength = Cursor.CONTENTS.length;\n // @ts-expect-error TODO: make isolate generic\n parent.isolate(this.offset(parent), this.length()).unwrap();\n this.savedLength = 0;\n break;\n }\n parent = parent.parent;\n }\n }\n\n value() {\n return '';\n }\n}\n\nexport default Cursor;\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,KAAK,QAAQ,WAAW;AAG5C,OAAOC,QAAQ,MAAM,WAAW;AAGhC,MAAMC,MAAM,SAASH,SAAS,CAAC;EAC7B,OAAOI,QAAQ,GAAG,QAAQ;EAC1B,OAAOC,SAAS,GAAG,WAAW;EAC9B,OAAOC,OAAO,GAAG,MAAM;EACvB,OAAOC,QAAQ,GAAG,QAAQ,CAAC,CAAC;;EAE5B,OAAOC,KAAKA,CAAA,EAAG;IACb,OAAOC,SAAS;EAClB;EAMAC,WAAWA,CAACC,MAAkB,EAAEC,OAAoB,EAAEC,SAAoB,EAAE;IAC1E,KAAK,CAACF,MAAM,EAAEC,OAAO,CAAC;IACtB,IAAI,CAACC,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACC,QAAQ,GAAGC,QAAQ,CAACC,cAAc,CAACb,MAAM,CAACI,QAAQ,CAAC;IACxD,IAAI,CAACK,OAAO,CAACK,WAAW,CAAC,IAAI,CAACH,QAAQ,CAAC;IACvC,IAAI,CAACI,WAAW,GAAG,CAAC;EACtB;EAEAC,MAAMA,CAAA,EAAG;IACP;IACA,IAAI,IAAI,CAACC,MAAM,IAAI,IAAI,EAAE,IAA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AO,EAAE;EACX;AACF;AAEA,eAAeL,MAAM","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ScrollBlot } from 'parchment';
|
|
2
|
+
import { EmbedBlot } from 'parchment';
|
|
3
|
+
export interface EmbedContextRange {
|
|
4
|
+
startNode: Node | Text;
|
|
5
|
+
startOffset: number;
|
|
6
|
+
endNode?: Node | Text;
|
|
7
|
+
endOffset?: number;
|
|
8
|
+
}
|
|
9
|
+
declare class Embed extends EmbedBlot {
|
|
10
|
+
contentNode: HTMLSpanElement;
|
|
11
|
+
leftGuard: Text;
|
|
12
|
+
rightGuard: Text;
|
|
13
|
+
constructor(scroll: ScrollBlot, node: Node);
|
|
14
|
+
index(node: Node, offset: number): number;
|
|
15
|
+
restore(node: Text): EmbedContextRange | null;
|
|
16
|
+
update(mutations: MutationRecord[], context: Record<string, unknown>): void;
|
|
17
|
+
}
|
|
18
|
+
export default Embed;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { EmbedBlot } from 'parchment';
|
|
2
|
+
import TextBlot from './text.js';
|
|
3
|
+
const GUARD_TEXT = '\uFEFF';
|
|
4
|
+
class Embed extends EmbedBlot {
|
|
5
|
+
constructor(scroll, node) {
|
|
6
|
+
super(scroll, node);
|
|
7
|
+
this.contentNode = document.createElement('span');
|
|
8
|
+
this.contentNode.setAttribute('contenteditable', 'false');
|
|
9
|
+
Array.from(this.domNode.childNodes).forEach(childNode => {
|
|
10
|
+
this.contentNode.appendChild(childNode);
|
|
11
|
+
});
|
|
12
|
+
this.leftGuard = document.createTextNode(GUARD_TEXT);
|
|
13
|
+
this.rightGuard = document.createTextNode(GUARD_TEXT);
|
|
14
|
+
this.domNode.appendChild(this.leftGuard);
|
|
15
|
+
this.domNode.appendChild(this.contentNode);
|
|
16
|
+
this.domNode.appendChild(this.rightGuard);
|
|
17
|
+
}
|
|
18
|
+
index(node, offset) {
|
|
19
|
+
if (node === this.leftGuard) return 0;
|
|
20
|
+
if (node === this.rightGuard) return 1;
|
|
21
|
+
return super.index(node, offset);
|
|
22
|
+
}
|
|
23
|
+
restore(node) {
|
|
24
|
+
let range = null;
|
|
25
|
+
let textNode;
|
|
26
|
+
const text = node.data.split(GUARD_TEXT).join('');
|
|
27
|
+
if (node === this.leftGuard) {
|
|
28
|
+
if (this.prev instanceof TextBlot) {
|
|
29
|
+
const prevLength = this.prev.length();
|
|
30
|
+
this.prev.insertAt(prevLength, text);
|
|
31
|
+
range = {
|
|
32
|
+
startNode: this.prev.domNode,
|
|
33
|
+
startOffset: prevLength + text.length
|
|
34
|
+
};
|
|
35
|
+
} else {
|
|
36
|
+
textNode = document.createTextNode(text);
|
|
37
|
+
this.parent.insertBefore(this.scroll.create(textNode), this);
|
|
38
|
+
range = {
|
|
39
|
+
startNode: textNode,
|
|
40
|
+
startOffset: text.length
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
} else if (node === this.rightGuard) {
|
|
44
|
+
if (this.next instanceof TextBlot) {
|
|
45
|
+
this.next.insertAt(0, text);
|
|
46
|
+
range = {
|
|
47
|
+
startNode: this.next.domNode,
|
|
48
|
+
startOffset: text.length
|
|
49
|
+
};
|
|
50
|
+
} else {
|
|
51
|
+
textNode = document.createTextNode(text);
|
|
52
|
+
this.parent.insertBefore(this.scroll.create(textNode), this.next);
|
|
53
|
+
range = {
|
|
54
|
+
startNode: textNode,
|
|
55
|
+
startOffset: text.length
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
node.data = GUARD_TEXT;
|
|
60
|
+
return range;
|
|
61
|
+
}
|
|
62
|
+
update(mutations, context) {
|
|
63
|
+
mutations.forEach(mutation => {
|
|
64
|
+
if (mutation.type === 'characterData' && (mutation.target === this.leftGuard || mutation.target === this.rightGuard)) {
|
|
65
|
+
const range = this.restore(mutation.target);
|
|
66
|
+
if (range) context.range = range;
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
export default Embed;
|
|
72
|
+
//# sourceMappingURL=embed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embed.js","names":["EmbedBlot","TextBlot","GUARD_TEXT","Embed","constructor","scroll","node","contentNode","document","createElement","setAttribute","Array","from","domNode","childNodes","forEach","childNode","appendChild","leftGuard","createTextNode","rightGuard","index","offset","restore","range","textNode","text","data","split","join","prev","prevLength","length","insertAt","startNode","startOffset","parent","insertBefore","create","next","update","mutations","context","mutation","type","target"],"sources":["../../src/blots/embed.ts"],"sourcesContent":["import type { ScrollBlot } from 'parchment';\nimport { EmbedBlot } from 'parchment';\nimport TextBlot from './text.js';\n\nconst GUARD_TEXT = '\\uFEFF';\n\nexport interface EmbedContextRange {\n startNode: Node | Text;\n startOffset: number;\n endNode?: Node | Text;\n endOffset?: number;\n}\n\nclass Embed extends EmbedBlot {\n contentNode: HTMLSpanElement;\n leftGuard: Text;\n rightGuard: Text;\n\n constructor(scroll: ScrollBlot, node: Node) {\n super(scroll, node);\n this.contentNode = document.createElement('span');\n this.contentNode.setAttribute('contenteditable', 'false');\n Array.from(this.domNode.childNodes).forEach((childNode) => {\n this.contentNode.appendChild(childNode);\n });\n this.leftGuard = document.createTextNode(GUARD_TEXT);\n this.rightGuard = document.createTextNode(GUARD_TEXT);\n this.domNode.appendChild(this.leftGuard);\n this.domNode.appendChild(this.contentNode);\n this.domNode.appendChild(this.rightGuard);\n }\n\n index(node: Node, offset: number) {\n if (node === this.leftGuard) return 0;\n if (node === this.rightGuard) return 1;\n return super.index(node, offset);\n }\n\n restore(node: Text): EmbedContextRange | null {\n let range: EmbedContextRange | null = null;\n let textNode: Text;\n const text = node.data.split(GUARD_TEXT).join('');\n if (node === this.leftGuard) {\n if (this.prev instanceof TextBlot) {\n const prevLength = this.prev.length();\n this.prev.insertAt(prevLength, text);\n range = {\n startNode: this.prev.domNode,\n startOffset: prevLength + text.length,\n };\n } else {\n textNode = document.createTextNode(text);\n this.parent.insertBefore(this.scroll.create(textNode), this);\n range = {\n startNode: textNode,\n startOffset: text.length,\n };\n }\n } else if (node === this.rightGuard) {\n if (this.next instanceof TextBlot) {\n this.next.insertAt(0, text);\n range = {\n startNode: this.next.domNode,\n startOffset: text.length,\n };\n } else {\n textNode = document.createTextNode(text);\n this.parent.insertBefore(this.scroll.create(textNode), this.next);\n range = {\n startNode: textNode,\n startOffset: text.length,\n };\n }\n }\n node.data = GUARD_TEXT;\n return range;\n }\n\n update(mutations: MutationRecord[], context: Record<string, unknown>) {\n mutations.forEach((mutation) => {\n if (\n mutation.type === 'characterData' &&\n (mutation.target === this.leftGuard ||\n mutation.target === this.rightGuard)\n ) {\n const range = this.restore(mutation.target as Text);\n if (range) context.range = range;\n }\n });\n }\n}\n\nexport default Embed;\n"],"mappings":"AACA,SAASA,SAAS,QAAQ,WAAW;AACrC,OAAOC,QAAQ,MAAM,WAAW;AAEhC,MAAMC,UAAU,GAAG,QAAQ;AAS3B,MAAMC,KAAK,SAASH,SAAS,CAAC;EAK5BI,WAAWA,CAACC,MAAkB,EAAEC,IAAU,EAAE;IAC1C,KAAK,CAACD,MAAM,EAAEC,IAAI,CAAC;IACnB,IAAI,CAACC,WAAW,GAAGC,QAAQ,CAACC,aAAa,CAAC,MAAM,CAAC;IACjD,IAAI,CAACF,WAAW,CAACG,YAAY,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACzDC,KAAK,CAACC,IAAI,CAAC,IAAI,CAACC,OAAO,CAACC,UAAU,CAAC,CAACC,OAAO,CAAEC,SAAS,IAAK;MACzD,IAAI,CAACT,WAAW,CAACU,WAAW,CAACD,SAAS,CAAC;IACzC,CAAC,CAAC;IACF,IAAI,CAACE,SAAS,GAAGV,QAAQ,CAACW,cAAc,CAACjB,UAAU,CAAC;IACpD,IAAI,CAACkB,UAAU,GAAGZ,QAAQ,CAACW,cAAc,CAACjB,UAAU,CAAC;IACrD,IAAI,CAACW,OAAO,CAACI,WAAW,CAAC,IAAI,CAACC,SAAS,CAAC;IACxC,I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F,CAAC,MAAM,IAAI1B,IAAI,KAAK,IAAI,CAACc,UAAU,EAAE;MACnC,IAAI,IAAI,CAACmB,IAAI,YAAYtC,QAAQ,EAAE;QACjC,IAAI,CAACsC,IAAI,CAACN,QAAQ,CAAC,CAAC,EAAEP,IAAI,CAAC;QAC3BF,KAAK,GAAG;UACNU,SAAS,EAAE,IAAI,CAACK,IAAI,CAAC1B,OAAO;UAC5BsB,WAAW,EAAET,IAAI,CAACM;QACpB,CAAC;MACH,CAAC,MAAM;QACLP,QAAQ,GAAGjB,QAAQ,CAACW,cAAc,CAACO,IAAI,CAAC;QACxC,IAAI,CAACU,MAAM,CAACC,YAAY,CAAC,IAAI,CAAChC,MAAM,CAACiC,MAAM,CAACb,QAAQ,CAAC,EAAE,IAAI,CAACc,IAAI,CAAC;QACjEf,KAAK,GAAG;UACNU,SAAS,EAAET,QAAQ;UACnBU,WAAW,EAAET,IAAI,CAACM;QACpB,CAAC;MACH;IACF;IACA1B,IAAI,CAACqB,IAAI,GAAGzB,UAAU;IACtB,OAAOsB,KAAK;EACd;EAEAgB,MAAMA,CAACC,SAA2B,EAAEC,OAAgC,EAAE;IACpED,SAAS,CAAC1B,OAAO,CAAE4B,QAAQ,IAAK;MAC9B,IACEA,QAAQ,CAACC,IAAI,KAAK,eAAe,KAChCD,QAAQ,CAACE,MAAM,KAAK,IAAI,CAAC3B,SAAS,IACjCyB,QAAQ,CAACE,MAAM,KAAK,IAAI,CAACzB,UAAU,CAAC,EACtC;QACA,MAAMI,KAAK,GAAG,IAAI,CAACD,OAAO,CAACoB,QAAQ,CAACE,MAAc,CAAC;QACnD,IAAIrB,KAAK,EAAEkB,OAAO,CAAClB,KAAK,GAAGA,KAAK;MAClC;IACF,CAAC,CAAC;EACJ;AACF;AAEA,eAAerB,KAAK","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InlineBlot } from 'parchment';
|
|
2
|
+
import type { BlotConstructor } from 'parchment';
|
|
3
|
+
declare class Inline extends InlineBlot {
|
|
4
|
+
static allowedChildren: BlotConstructor[];
|
|
5
|
+
static order: string[];
|
|
6
|
+
static compare(self: string, other: string): number;
|
|
7
|
+
formatAt(index: number, length: number, name: string, value: unknown): void;
|
|
8
|
+
optimize(context: {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}): void;
|
|
11
|
+
}
|
|
12
|
+
export default Inline;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { EmbedBlot, InlineBlot, Scope } from 'parchment';
|
|
2
|
+
import Break from './break.js';
|
|
3
|
+
import Text from './text.js';
|
|
4
|
+
class Inline extends InlineBlot {
|
|
5
|
+
static allowedChildren = [Inline, Break, EmbedBlot, Text];
|
|
6
|
+
// Lower index means deeper in the DOM tree, since not found (-1) is for embeds
|
|
7
|
+
static order = ['cursor', 'inline',
|
|
8
|
+
// Must be lower
|
|
9
|
+
'link',
|
|
10
|
+
// Chrome wants <a> to be lower
|
|
11
|
+
'underline', 'strike', 'italic', 'bold', 'script', 'code' // Must be higher
|
|
12
|
+
];
|
|
13
|
+
static compare(self, other) {
|
|
14
|
+
const selfIndex = Inline.order.indexOf(self);
|
|
15
|
+
const otherIndex = Inline.order.indexOf(other);
|
|
16
|
+
if (selfIndex >= 0 || otherIndex >= 0) {
|
|
17
|
+
return selfIndex - otherIndex;
|
|
18
|
+
}
|
|
19
|
+
if (self === other) {
|
|
20
|
+
return 0;
|
|
21
|
+
}
|
|
22
|
+
if (self < other) {
|
|
23
|
+
return -1;
|
|
24
|
+
}
|
|
25
|
+
return 1;
|
|
26
|
+
}
|
|
27
|
+
formatAt(index, length, name, value) {
|
|
28
|
+
if (Inline.compare(this.statics.blotName, name) < 0 && this.scroll.query(name, Scope.BLOT)) {
|
|
29
|
+
const blot = this.isolate(index, length);
|
|
30
|
+
if (value) {
|
|
31
|
+
blot.wrap(name, value);
|
|
32
|
+
}
|
|
33
|
+
} else {
|
|
34
|
+
super.formatAt(index, length, name, value);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
optimize(context) {
|
|
38
|
+
super.optimize(context);
|
|
39
|
+
if (this.parent instanceof Inline && Inline.compare(this.statics.blotName, this.parent.statics.blotName) > 0) {
|
|
40
|
+
const parent = this.parent.isolate(this.offset(), this.length());
|
|
41
|
+
// @ts-expect-error TODO: make isolate generic
|
|
42
|
+
this.moveChildren(parent);
|
|
43
|
+
parent.wrap(this);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export default Inline;
|
|
48
|
+
//# sourceMappingURL=inline.js.map
|