@unicom-cloud/utils 0.1.39 → 0.1.40
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/.virtual/_rolldown/runtime.js +1 -1
- package/.vite/manifest.json +559 -587
- package/array/index.js +1 -1
- package/assert/index.js +1 -1
- package/case-name/index.js +1 -1
- package/class-name/index.js +1 -1
- package/clipboard-copy/index.js +1 -1
- package/constant/address.js +1 -1
- package/constant/chineseCharacters.js +1 -1
- package/constant/constellations.js +1 -1
- package/constant/domain.js +1 -1
- package/constant/identity.js +1 -1
- package/constant/index.js +1 -1
- package/constant/isMobile.js +1 -1
- package/constant/keyboardCode.js +1 -1
- package/constant/licensePlate.js +1 -1
- package/constant/name.js +1 -1
- package/constant/platform.js +1 -1
- package/constant/protocol.js +1 -1
- package/constant/string.js +1 -1
- package/constant/ui.js +1 -1
- package/content-disposition/index.js +1 -1
- package/cookie/{src/api.js → api.js} +2 -2
- package/cookie/{src/assign.js → assign.js} +2 -2
- package/cookie/{src/converter.js → converter.js} +2 -2
- package/cookie/index.d.ts +1 -1
- package/cookie/index.js +2 -2
- package/date/convertTime.js +1 -1
- package/date/convertToDuration.js +1 -1
- package/date/index.js +1 -1
- package/decimal/decimal.js +1 -1
- package/decimal/index.js +1 -1
- package/dom-helpers/activeElement.js +1 -1
- package/dom-helpers/addClass.js +1 -1
- package/dom-helpers/addEventListener.js +1 -1
- package/dom-helpers/animate.js +1 -1
- package/dom-helpers/animationFrame.js +1 -1
- package/dom-helpers/attribute.js +1 -1
- package/dom-helpers/camelize.js +1 -1
- package/dom-helpers/camelizeStyle.js +1 -1
- package/dom-helpers/canUseDOM.js +1 -1
- package/dom-helpers/childElements.js +1 -1
- package/dom-helpers/childNodes.js +1 -1
- package/dom-helpers/clear.js +1 -1
- package/dom-helpers/closest.js +1 -1
- package/dom-helpers/collectElements.js +1 -1
- package/dom-helpers/collectSiblings.js +1 -1
- package/dom-helpers/contains.js +1 -1
- package/dom-helpers/css.js +1 -1
- package/dom-helpers/filterEventHandler.js +1 -1
- package/dom-helpers/getComputedStyle.js +1 -1
- package/dom-helpers/getElementCoordinates.js +1 -1
- package/dom-helpers/getScrollAccessor.js +1 -1
- package/dom-helpers/hasClass.js +1 -1
- package/dom-helpers/height.js +1 -1
- package/dom-helpers/hyphenate.js +1 -1
- package/dom-helpers/hyphenateStyle.js +1 -1
- package/dom-helpers/index.js +1 -1
- package/dom-helpers/insertAfter.js +1 -1
- package/dom-helpers/isDocument.js +1 -1
- package/dom-helpers/isInput.js +1 -1
- package/dom-helpers/isTransform.js +1 -1
- package/dom-helpers/isVisible.js +1 -1
- package/dom-helpers/isWindow.js +1 -1
- package/dom-helpers/listen.js +1 -1
- package/dom-helpers/matches.js +1 -1
- package/dom-helpers/nextUntil.js +1 -1
- package/dom-helpers/offset.js +1 -1
- package/dom-helpers/offsetParent.js +1 -1
- package/dom-helpers/ownerDocument.js +1 -1
- package/dom-helpers/ownerWindow.js +1 -1
- package/dom-helpers/parents.js +1 -1
- package/dom-helpers/position.js +1 -1
- package/dom-helpers/prepend.js +1 -1
- package/dom-helpers/querySelectorAll.js +1 -1
- package/dom-helpers/reflow.js +2 -2
- package/dom-helpers/remove.js +1 -1
- package/dom-helpers/removeClass.js +1 -1
- package/dom-helpers/removeEventListener.js +1 -1
- package/dom-helpers/scrollLeft.js +1 -1
- package/dom-helpers/scrollParent.js +1 -1
- package/dom-helpers/scrollTo.js +1 -1
- package/dom-helpers/scrollTop.js +1 -1
- package/dom-helpers/scrollbarSize.js +1 -1
- package/dom-helpers/siblings.js +1 -1
- package/dom-helpers/text.js +1 -1
- package/dom-helpers/toggleClass.js +1 -1
- package/dom-helpers/transitionEnd.js +1 -1
- package/dom-helpers/triggerEvent.js +1 -1
- package/dom-helpers/types.js +1 -1
- package/dom-helpers/width.js +1 -1
- package/emitter/index.d.ts +75 -2
- package/emitter/index.js +68 -3
- package/emoji/emoji.js +1 -1
- package/emoji/emojis.js +1 -1
- package/emoji/index.js +1 -1
- package/escape/index.js +1 -1
- package/file/fileRead.js +1 -1
- package/file/fileToDataURL.js +1 -1
- package/file/index.js +1 -1
- package/file/saveAs.js +1 -1
- package/filesize/LICENSE +26 -0
- package/filesize/constants.js +101 -0
- package/filesize/{src/filesize.d.ts → filesize.d.ts} +8 -7
- package/filesize/filesize.js +50 -0
- package/filesize/{src/helpers.d.ts → helpers.d.ts} +7 -4
- package/filesize/helpers.js +70 -0
- package/filesize/index.d.ts +2 -0
- package/filesize/index.js +4 -0
- package/function/index.js +1 -1
- package/idb/async-iterators.js +1 -1
- package/idb/database-extras.js +1 -1
- package/idb/entry.js +1 -1
- package/idb/index-.js +1 -1
- package/idb/index.js +1 -1
- package/idb/util.js +1 -1
- package/idb/wrap-idb-value.js +1 -1
- package/index.js +1 -1
- package/invariant/index.js +1 -2
- package/is/index.d.ts +1 -0
- package/is/index.js +14 -14
- package/is/lib/isAscii.js +1 -1
- package/is/lib/isBase64.js +1 -1
- package/is/lib/isChinese.js +1 -1
- package/is/lib/isDataURI.js +1 -1
- package/is/lib/isEmail.js +1 -1
- package/is/lib/isFQDN.js +1 -1
- package/is/lib/isFullWidth.js +1 -1
- package/is/lib/isHSL.js +1 -1
- package/is/lib/isHalfWidth.js +1 -1
- package/is/lib/isHash.js +1 -1
- package/is/lib/isHexColor.js +1 -1
- package/is/lib/isIMEI.js +1 -1
- package/is/lib/isIP.js +1 -1
- package/is/lib/isIPRange.js +1 -1
- package/is/lib/isIdentityCard.js +1 -1
- package/is/lib/isJWT.js +1 -1
- package/is/lib/isMACAddress.js +1 -1
- package/is/lib/isMD5.js +1 -1
- package/is/lib/isMimeType.js +1 -1
- package/is/lib/isMobilePhone.js +1 -1
- package/is/lib/isPort.js +1 -1
- package/is/lib/isRgbColor.js +1 -1
- package/is/lib/isSemVer.js +1 -1
- package/is/lib/isSlug.js +1 -1
- package/is/lib/isStrongPassword.js +1 -1
- package/is/lib/isURL.js +1 -1
- package/is/lib/isUUID.js +1 -1
- package/is/lib/isVariableWidth.js +1 -1
- package/lodash/_DataView.js +1 -1
- package/lodash/_Hash.js +1 -1
- package/lodash/_LazyWrapper.js +1 -1
- package/lodash/_ListCache.js +1 -1
- package/lodash/_LodashWrapper.js +1 -1
- package/lodash/_Map.js +1 -1
- package/lodash/_MapCache.js +1 -1
- package/lodash/_Promise.js +1 -1
- package/lodash/_Set.js +1 -1
- package/lodash/_SetCache.js +1 -1
- package/lodash/_Stack.js +1 -1
- package/lodash/_Symbol.js +1 -1
- package/lodash/_Uint8Array.js +1 -1
- package/lodash/_WeakMap.js +1 -1
- package/lodash/_addMapEntry.js +1 -1
- package/lodash/_addSetEntry.js +1 -1
- package/lodash/_apply.js +1 -1
- package/lodash/_arrayAggregator.js +1 -1
- package/lodash/_arrayEach.js +1 -1
- package/lodash/_arrayEachRight.js +1 -1
- package/lodash/_arrayEvery.js +1 -1
- package/lodash/_arrayFilter.js +1 -1
- package/lodash/_arrayIncludes.js +1 -1
- package/lodash/_arrayIncludesWith.js +1 -1
- package/lodash/_arrayLikeKeys.js +1 -1
- package/lodash/_arrayMap.js +1 -1
- package/lodash/_arrayPush.js +1 -1
- package/lodash/_arrayReduce.js +1 -1
- package/lodash/_arrayReduceRight.js +1 -1
- package/lodash/_arraySample.js +1 -1
- package/lodash/_arraySampleSize.js +1 -1
- package/lodash/_arrayShuffle.js +1 -1
- package/lodash/_arraySome.js +1 -1
- package/lodash/_asciiSize.js +1 -1
- package/lodash/_asciiToArray.js +1 -1
- package/lodash/_asciiWords.js +1 -1
- package/lodash/_assignMergeValue.js +1 -1
- package/lodash/_assignValue.js +1 -1
- package/lodash/_assocIndexOf.js +1 -1
- package/lodash/_baseAggregator.js +1 -1
- package/lodash/_baseAssign.js +1 -1
- package/lodash/_baseAssignIn.js +1 -1
- package/lodash/_baseAssignValue.js +1 -1
- package/lodash/_baseAt.js +1 -1
- package/lodash/_baseClamp.js +1 -1
- package/lodash/_baseClone.js +1 -1
- package/lodash/_baseConforms.js +1 -1
- package/lodash/_baseConformsTo.js +1 -1
- package/lodash/_baseCreate.js +1 -1
- package/lodash/_baseDelay.js +1 -1
- package/lodash/_baseDifference.js +1 -1
- package/lodash/_baseEach.js +1 -1
- package/lodash/_baseEachRight.js +1 -1
- package/lodash/_baseEvery.js +1 -1
- package/lodash/_baseExtremum.js +1 -1
- package/lodash/_baseFill.js +1 -1
- package/lodash/_baseFilter.js +1 -1
- package/lodash/_baseFindIndex.js +1 -1
- package/lodash/_baseFindKey.js +1 -1
- package/lodash/_baseFlatten.js +1 -1
- package/lodash/_baseFor.js +1 -1
- package/lodash/_baseForOwn.js +1 -1
- package/lodash/_baseForOwnRight.js +1 -1
- package/lodash/_baseForRight.js +1 -1
- package/lodash/_baseFunctions.js +1 -1
- package/lodash/_baseGet.js +1 -1
- package/lodash/_baseGetAllKeys.js +1 -1
- package/lodash/_baseGetTag.js +1 -1
- package/lodash/_baseGt.js +1 -1
- package/lodash/_baseHas.js +1 -1
- package/lodash/_baseHasIn.js +1 -1
- package/lodash/_baseInRange.js +1 -1
- package/lodash/_baseIndexOf.js +1 -1
- package/lodash/_baseIndexOfWith.js +1 -1
- package/lodash/_baseIntersection.js +1 -1
- package/lodash/_baseInverter.js +1 -1
- package/lodash/_baseInvoke.js +1 -1
- package/lodash/_baseIsArguments.js +1 -1
- package/lodash/_baseIsArrayBuffer.js +1 -1
- package/lodash/_baseIsDate.js +1 -1
- package/lodash/_baseIsEqual.js +1 -1
- package/lodash/_baseIsEqualDeep.js +1 -1
- package/lodash/_baseIsMap.js +1 -1
- package/lodash/_baseIsMatch.js +1 -1
- package/lodash/_baseIsNaN.js +1 -1
- package/lodash/_baseIsNative.js +1 -1
- package/lodash/_baseIsRegExp.js +1 -1
- package/lodash/_baseIsSet.js +1 -1
- package/lodash/_baseIsTypedArray.js +1 -1
- package/lodash/_baseIteratee.js +1 -1
- package/lodash/_baseKeys.js +1 -1
- package/lodash/_baseKeysIn.js +1 -1
- package/lodash/_baseLodash.js +1 -1
- package/lodash/_baseLt.js +1 -1
- package/lodash/_baseMap.js +1 -1
- package/lodash/_baseMatches.js +1 -1
- package/lodash/_baseMatchesProperty.js +1 -1
- package/lodash/_baseMean.js +1 -1
- package/lodash/_baseMerge.js +1 -1
- package/lodash/_baseMergeDeep.js +1 -1
- package/lodash/_baseNth.js +1 -1
- package/lodash/_baseOrderBy.js +1 -1
- package/lodash/_basePick.js +1 -1
- package/lodash/_basePickBy.js +1 -1
- package/lodash/_baseProperty.js +1 -1
- package/lodash/_basePropertyDeep.js +1 -1
- package/lodash/_basePropertyOf.js +1 -1
- package/lodash/_basePullAll.js +1 -1
- package/lodash/_basePullAt.js +1 -1
- package/lodash/_baseRandom.js +1 -1
- package/lodash/_baseRange.js +1 -1
- package/lodash/_baseReduce.js +1 -1
- package/lodash/_baseRepeat.js +1 -1
- package/lodash/_baseRest.js +1 -1
- package/lodash/_baseSample.js +1 -1
- package/lodash/_baseSampleSize.js +1 -1
- package/lodash/_baseSet.js +1 -1
- package/lodash/_baseSetData.js +1 -1
- package/lodash/_baseSetToString.js +1 -1
- package/lodash/_baseShuffle.js +1 -1
- package/lodash/_baseSlice.js +1 -1
- package/lodash/_baseSome.js +1 -1
- package/lodash/_baseSortBy.js +1 -1
- package/lodash/_baseSortedIndex.js +1 -1
- package/lodash/_baseSortedIndexBy.js +1 -1
- package/lodash/_baseSortedUniq.js +1 -1
- package/lodash/_baseSum.js +1 -1
- package/lodash/_baseTimes.js +1 -1
- package/lodash/_baseToNumber.js +1 -1
- package/lodash/_baseToPairs.js +1 -1
- package/lodash/_baseToString.js +1 -1
- package/lodash/_baseTrim.js +1 -1
- package/lodash/_baseUnary.js +1 -1
- package/lodash/_baseUniq.js +1 -1
- package/lodash/_baseUnset.js +6 -12
- package/lodash/_baseUpdate.js +1 -1
- package/lodash/_baseValues.js +1 -1
- package/lodash/_baseWhile.js +1 -1
- package/lodash/_baseWrapperValue.js +1 -1
- package/lodash/_baseXor.js +1 -1
- package/lodash/_baseZipObject.js +1 -1
- package/lodash/_cacheHas.js +1 -1
- package/lodash/_castArrayLikeObject.js +1 -1
- package/lodash/_castFunction.js +1 -1
- package/lodash/_castPath.js +1 -1
- package/lodash/_castRest.js +1 -1
- package/lodash/_castSlice.js +1 -1
- package/lodash/_charsEndIndex.js +1 -1
- package/lodash/_charsStartIndex.js +1 -1
- package/lodash/_cloneArrayBuffer.js +1 -1
- package/lodash/_cloneBuffer.js +1 -1
- package/lodash/_cloneDataView.js +1 -1
- package/lodash/_cloneMap.js +1 -1
- package/lodash/_cloneRegExp.js +1 -1
- package/lodash/_cloneSet.js +1 -1
- package/lodash/_cloneSymbol.js +1 -1
- package/lodash/_cloneTypedArray.js +1 -1
- package/lodash/_compareAscending.js +1 -1
- package/lodash/_compareMultiple.js +1 -1
- package/lodash/_composeArgs.js +1 -1
- package/lodash/_composeArgsRight.js +1 -1
- package/lodash/_copyArray.js +1 -1
- package/lodash/_copyObject.js +1 -1
- package/lodash/_copySymbols.js +1 -1
- package/lodash/_copySymbolsIn.js +1 -1
- package/lodash/_coreJsData.js +1 -1
- package/lodash/_countHolders.js +1 -1
- package/lodash/_createAggregator.js +1 -1
- package/lodash/_createAssigner.js +1 -1
- package/lodash/_createBaseEach.js +1 -1
- package/lodash/_createBaseFor.js +1 -1
- package/lodash/_createBind.js +1 -1
- package/lodash/_createCaseFirst.js +1 -1
- package/lodash/_createCompounder.js +1 -1
- package/lodash/_createCtor.js +1 -1
- package/lodash/_createCurry.js +1 -1
- package/lodash/_createFind.js +1 -1
- package/lodash/_createFlow.js +1 -1
- package/lodash/_createHybrid.js +1 -1
- package/lodash/_createInverter.js +1 -1
- package/lodash/_createMathOperation.js +1 -1
- package/lodash/_createOver.js +1 -1
- package/lodash/_createPadding.js +1 -1
- package/lodash/_createPartial.js +1 -1
- package/lodash/_createRange.js +1 -1
- package/lodash/_createRecurry.js +1 -1
- package/lodash/_createRelationalOperation.js +1 -1
- package/lodash/_createRound.js +1 -1
- package/lodash/_createSet.js +1 -1
- package/lodash/_createToPairs.js +1 -1
- package/lodash/_createWrap.js +1 -1
- package/lodash/_customDefaultsAssignIn.js +1 -1
- package/lodash/_customDefaultsMerge.js +1 -1
- package/lodash/_customOmitClone.js +1 -1
- package/lodash/_deburrLetter.js +1 -1
- package/lodash/_defineProperty.js +1 -1
- package/lodash/_equalArrays.js +1 -1
- package/lodash/_equalByTag.js +1 -1
- package/lodash/_equalObjects.js +1 -1
- package/lodash/_escapeHtmlChar.js +1 -1
- package/lodash/_escapeStringChar.js +1 -1
- package/lodash/_flatRest.js +1 -1
- package/lodash/_freeGlobal.js +1 -1
- package/lodash/_getAllKeys.js +1 -1
- package/lodash/_getAllKeysIn.js +1 -1
- package/lodash/_getData.js +1 -1
- package/lodash/_getFuncName.js +1 -1
- package/lodash/_getHolder.js +1 -1
- package/lodash/_getMapData.js +1 -1
- package/lodash/_getMatchData.js +1 -1
- package/lodash/_getNative.js +1 -1
- package/lodash/_getPrototype.js +1 -1
- package/lodash/_getRawTag.js +1 -1
- package/lodash/_getSymbols.js +1 -1
- package/lodash/_getSymbolsIn.js +1 -1
- package/lodash/_getTag.js +1 -1
- package/lodash/_getValue.js +1 -1
- package/lodash/_getView.js +1 -1
- package/lodash/_getWrapDetails.js +1 -1
- package/lodash/_hasPath.js +1 -1
- package/lodash/_hasUnicode.js +1 -1
- package/lodash/_hasUnicodeWord.js +1 -1
- package/lodash/_hashClear.js +1 -1
- package/lodash/_hashDelete.js +1 -1
- package/lodash/_hashGet.js +1 -1
- package/lodash/_hashHas.js +1 -1
- package/lodash/_hashSet.js +1 -1
- package/lodash/_initCloneArray.js +1 -1
- package/lodash/_initCloneByTag.js +1 -1
- package/lodash/_initCloneObject.js +1 -1
- package/lodash/_insertWrapDetails.js +1 -1
- package/lodash/_isFlattenable.js +1 -1
- package/lodash/_isIndex.js +1 -1
- package/lodash/_isIterateeCall.js +1 -1
- package/lodash/_isKey.js +1 -1
- package/lodash/_isKeyable.js +1 -1
- package/lodash/_isLaziable.js +1 -1
- package/lodash/_isMaskable.js +1 -1
- package/lodash/_isMasked.js +1 -1
- package/lodash/_isPrototype.js +1 -1
- package/lodash/_isStrictComparable.js +1 -1
- package/lodash/_iteratorToArray.js +1 -1
- package/lodash/_lazyClone.js +1 -1
- package/lodash/_lazyReverse.js +1 -1
- package/lodash/_lazyValue.js +1 -1
- package/lodash/_listCacheClear.js +1 -1
- package/lodash/_listCacheDelete.js +1 -1
- package/lodash/_listCacheGet.js +1 -1
- package/lodash/_listCacheHas.js +1 -1
- package/lodash/_listCacheSet.js +1 -1
- package/lodash/_mapCacheClear.js +1 -1
- package/lodash/_mapCacheDelete.js +1 -1
- package/lodash/_mapCacheGet.js +1 -1
- package/lodash/_mapCacheHas.js +1 -1
- package/lodash/_mapCacheSet.js +1 -1
- package/lodash/_mapToArray.js +1 -1
- package/lodash/_matchesStrictComparable.js +1 -1
- package/lodash/_memoizeCapped.js +1 -1
- package/lodash/_mergeData.js +1 -1
- package/lodash/_metaMap.js +1 -1
- package/lodash/_nativeCreate.js +1 -1
- package/lodash/_nativeKeys.js +1 -1
- package/lodash/_nativeKeysIn.js +1 -1
- package/lodash/_nodeUtil.js +1 -1
- package/lodash/_objectToString.js +1 -1
- package/lodash/_overArg.js +1 -1
- package/lodash/_overRest.js +1 -1
- package/lodash/_parent.js +1 -1
- package/lodash/_reEscape.js +1 -1
- package/lodash/_reEvaluate.js +1 -1
- package/lodash/_reInterpolate.js +1 -1
- package/lodash/_realNames.js +1 -1
- package/lodash/_reorder.js +1 -1
- package/lodash/_replaceHolders.js +1 -1
- package/lodash/_root.js +1 -1
- package/lodash/_safeGet.js +1 -1
- package/lodash/_setCacheAdd.js +1 -1
- package/lodash/_setCacheHas.d.ts +2 -2
- package/lodash/_setCacheHas.js +1 -1
- package/lodash/_setData.js +1 -1
- package/lodash/_setToArray.js +1 -1
- package/lodash/_setToPairs.js +1 -1
- package/lodash/_setToString.js +1 -1
- package/lodash/_setWrapToString.js +1 -1
- package/lodash/_shortOut.js +1 -1
- package/lodash/_shuffleSelf.js +1 -1
- package/lodash/_stackClear.js +1 -1
- package/lodash/_stackDelete.js +1 -1
- package/lodash/_stackGet.js +1 -1
- package/lodash/_stackHas.js +1 -1
- package/lodash/_stackSet.js +1 -1
- package/lodash/_strictIndexOf.js +1 -1
- package/lodash/_strictLastIndexOf.js +1 -1
- package/lodash/_stringSize.js +1 -1
- package/lodash/_stringToArray.js +1 -1
- package/lodash/_stringToPath.js +1 -1
- package/lodash/_toKey.js +1 -1
- package/lodash/_toSource.js +1 -1
- package/lodash/_trimmedEndIndex.js +1 -1
- package/lodash/_unescapeHtmlChar.js +1 -1
- package/lodash/_unicodeSize.js +1 -1
- package/lodash/_unicodeToArray.js +1 -1
- package/lodash/_unicodeWords.js +1 -1
- package/lodash/_updateWrapDetails.js +1 -1
- package/lodash/_wrapperClone.js +1 -1
- package/lodash/add.js +1 -1
- package/lodash/after.js +1 -1
- package/lodash/array.default.js +1 -1
- package/lodash/array.js +1 -1
- package/lodash/ary.js +1 -1
- package/lodash/assign.js +1 -1
- package/lodash/assignIn.js +1 -1
- package/lodash/assignInWith.js +1 -1
- package/lodash/assignWith.js +1 -1
- package/lodash/at.js +1 -1
- package/lodash/attempt.js +1 -1
- package/lodash/before.js +1 -1
- package/lodash/bind.js +1 -1
- package/lodash/bindAll.js +1 -1
- package/lodash/bindKey.js +1 -1
- package/lodash/camelCase.js +1 -1
- package/lodash/capitalize.js +1 -1
- package/lodash/castArray.js +1 -1
- package/lodash/ceil.js +1 -1
- package/lodash/chain.js +1 -1
- package/lodash/chunk.js +1 -1
- package/lodash/clamp.js +1 -1
- package/lodash/clone.js +1 -1
- package/lodash/cloneDeep.js +1 -1
- package/lodash/cloneDeepWith.js +1 -1
- package/lodash/cloneWith.js +1 -1
- package/lodash/collection.default.js +1 -1
- package/lodash/collection.js +1 -1
- package/lodash/commit.js +1 -1
- package/lodash/compact.d.ts +1 -1
- package/lodash/compact.js +1 -1
- package/lodash/concat.js +1 -1
- package/lodash/cond.js +1 -1
- package/lodash/conforms.js +1 -1
- package/lodash/conformsTo.js +1 -1
- package/lodash/constant.js +1 -1
- package/lodash/countBy.js +1 -1
- package/lodash/create.js +1 -1
- package/lodash/curry.js +1 -1
- package/lodash/curryRight.js +1 -1
- package/lodash/date.default.js +1 -1
- package/lodash/date.js +1 -1
- package/lodash/debounce.js +1 -1
- package/lodash/deburr.js +1 -1
- package/lodash/defaultTo.js +1 -1
- package/lodash/defaults.js +1 -1
- package/lodash/defaultsDeep.js +1 -1
- package/lodash/defer.js +1 -1
- package/lodash/delay.js +1 -1
- package/lodash/difference.js +1 -1
- package/lodash/differenceBy.js +1 -1
- package/lodash/differenceWith.js +1 -1
- package/lodash/divide.js +1 -1
- package/lodash/drop.js +1 -1
- package/lodash/dropRight.js +1 -1
- package/lodash/dropRightWhile.js +1 -1
- package/lodash/dropWhile.js +1 -1
- package/lodash/each.js +1 -1
- package/lodash/eachRight.js +1 -1
- package/lodash/endsWith.js +1 -1
- package/lodash/entries.js +1 -1
- package/lodash/entriesIn.js +1 -1
- package/lodash/eq.js +1 -1
- package/lodash/escape.js +1 -1
- package/lodash/escapeRegExp.js +1 -1
- package/lodash/every.js +1 -1
- package/lodash/extend.js +1 -1
- package/lodash/extendWith.js +1 -1
- package/lodash/fill.js +1 -1
- package/lodash/filter.js +1 -1
- package/lodash/find.js +1 -1
- package/lodash/findIndex.js +1 -1
- package/lodash/findKey.js +1 -1
- package/lodash/findLast.js +1 -1
- package/lodash/findLastIndex.js +1 -1
- package/lodash/findLastKey.js +1 -1
- package/lodash/first.js +1 -1
- package/lodash/flatMap.js +1 -1
- package/lodash/flatMapDeep.js +1 -1
- package/lodash/flatMapDepth.js +1 -1
- package/lodash/flatten.js +1 -1
- package/lodash/flattenDeep.js +1 -1
- package/lodash/flattenDepth.js +1 -1
- package/lodash/flip.js +1 -1
- package/lodash/floor.js +1 -1
- package/lodash/flow.js +1 -1
- package/lodash/flowRight.js +1 -1
- package/lodash/forEach.js +1 -1
- package/lodash/forEachRight.js +1 -1
- package/lodash/forIn.js +1 -1
- package/lodash/forInRight.js +1 -1
- package/lodash/forOwn.js +1 -1
- package/lodash/forOwnRight.js +1 -1
- package/lodash/fromPairs.js +8 -7
- package/lodash/function.default.js +1 -1
- package/lodash/function.js +1 -1
- package/lodash/functions.js +1 -1
- package/lodash/functionsIn.js +1 -1
- package/lodash/get.js +1 -1
- package/lodash/groupBy.js +1 -1
- package/lodash/gt.js +1 -1
- package/lodash/gte.js +1 -1
- package/lodash/has.js +1 -1
- package/lodash/hasIn.js +1 -1
- package/lodash/head.js +1 -1
- package/lodash/identity.js +1 -1
- package/lodash/inRange.js +1 -1
- package/lodash/includes.js +1 -1
- package/lodash/index.js +78 -78
- package/lodash/indexOf.js +1 -1
- package/lodash/initial.js +1 -1
- package/lodash/intersection.js +1 -1
- package/lodash/intersectionBy.js +1 -1
- package/lodash/intersectionWith.js +1 -1
- package/lodash/invert.js +1 -1
- package/lodash/invertBy.js +1 -1
- package/lodash/invoke.js +1 -1
- package/lodash/invokeMap.js +1 -1
- package/lodash/isArguments.js +1 -1
- package/lodash/isArray.js +1 -1
- package/lodash/isArrayBuffer.js +1 -1
- package/lodash/isArrayLike.js +1 -1
- package/lodash/isArrayLikeObject.js +1 -1
- package/lodash/isBoolean.js +1 -1
- package/lodash/isBuffer.js +1 -1
- package/lodash/isDate.js +1 -1
- package/lodash/isElement.js +1 -1
- package/lodash/isEmpty.js +1 -1
- package/lodash/isEqual.js +1 -1
- package/lodash/isEqualWith.js +1 -1
- package/lodash/isError.js +1 -1
- package/lodash/isFinite.js +1 -1
- package/lodash/isFunction.js +1 -1
- package/lodash/isInteger.js +1 -1
- package/lodash/isLength.js +1 -1
- package/lodash/isMap.js +1 -1
- package/lodash/isMatch.js +1 -1
- package/lodash/isMatchWith.js +1 -1
- package/lodash/isNaN.js +1 -1
- package/lodash/isNative.js +1 -1
- package/lodash/isNil.js +1 -1
- package/lodash/isNull.js +1 -1
- package/lodash/isNumber.js +1 -1
- package/lodash/isObject.js +1 -1
- package/lodash/isObjectLike.js +1 -1
- package/lodash/isPlainObject.js +1 -1
- package/lodash/isPromise.d.ts +1 -1
- package/lodash/isPromise.js +1 -1
- package/lodash/isRegExp.js +1 -1
- package/lodash/isSafeInteger.js +1 -1
- package/lodash/isSet.js +1 -1
- package/lodash/isString.js +1 -1
- package/lodash/isSymbol.js +1 -1
- package/lodash/isTypedArray.js +1 -1
- package/lodash/isUndefined.js +1 -1
- package/lodash/isWeakMap.js +1 -1
- package/lodash/isWeakSet.js +1 -1
- package/lodash/iteratee.js +1 -1
- package/lodash/join.js +1 -1
- package/lodash/kebabCase.js +1 -1
- package/lodash/keyBy.js +1 -1
- package/lodash/keys.js +1 -1
- package/lodash/keysIn.js +1 -1
- package/lodash/lang.default.js +1 -1
- package/lodash/lang.js +1 -1
- package/lodash/last.js +1 -1
- package/lodash/lastIndexOf.js +1 -1
- package/lodash/lodash.d.ts +5 -5
- package/lodash/lodash.default.js +11 -11
- package/lodash/lodash.js +79 -79
- package/lodash/lowerCase.js +1 -1
- package/lodash/lowerFirst.js +1 -1
- package/lodash/lt.js +1 -1
- package/lodash/lte.js +1 -1
- package/lodash/map.js +1 -1
- package/lodash/mapKeys.js +1 -1
- package/lodash/mapValues.js +1 -1
- package/lodash/matches.js +1 -1
- package/lodash/matchesProperty.js +1 -1
- package/lodash/math.default.js +1 -1
- package/lodash/math.js +1 -1
- package/lodash/max.js +1 -1
- package/lodash/maxBy.js +1 -1
- package/lodash/mean.js +1 -1
- package/lodash/meanBy.js +1 -1
- package/lodash/memoize.js +1 -1
- package/lodash/merge.js +1 -1
- package/lodash/mergeWith.js +1 -1
- package/lodash/method.js +1 -1
- package/lodash/methodOf.js +1 -1
- package/lodash/min.js +1 -1
- package/lodash/minBy.js +1 -1
- package/lodash/mixin.js +1 -1
- package/lodash/multiply.js +1 -1
- package/lodash/negate.js +1 -1
- package/lodash/next.js +1 -1
- package/lodash/noop.js +1 -1
- package/lodash/now.js +1 -1
- package/lodash/nth.js +1 -1
- package/lodash/nthArg.js +1 -1
- package/lodash/number.default.js +1 -1
- package/lodash/number.js +1 -1
- package/lodash/object.default.js +1 -1
- package/lodash/object.js +1 -1
- package/lodash/omit.js +1 -1
- package/lodash/omitBy.js +1 -1
- package/lodash/once.js +1 -1
- package/lodash/orderBy.js +1 -1
- package/lodash/over.js +1 -1
- package/lodash/overArgs.js +1 -1
- package/lodash/overEvery.js +1 -1
- package/lodash/overSome.js +1 -1
- package/lodash/pad.js +1 -1
- package/lodash/padEnd.js +1 -1
- package/lodash/padStart.js +1 -1
- package/lodash/parseInt.js +1 -1
- package/lodash/partial.js +1 -1
- package/lodash/partialRight.js +1 -1
- package/lodash/partition.js +1 -1
- package/lodash/pick.js +1 -1
- package/lodash/pickBy.js +1 -1
- package/lodash/plant.js +1 -1
- package/lodash/property.js +1 -1
- package/lodash/propertyOf.js +1 -1
- package/lodash/pull.js +1 -1
- package/lodash/pullAll.js +1 -1
- package/lodash/pullAllBy.js +1 -1
- package/lodash/pullAllWith.js +1 -1
- package/lodash/pullAt.js +1 -1
- package/lodash/random.d.ts +9 -0
- package/lodash/random.js +1 -1
- package/lodash/range.js +1 -1
- package/lodash/rangeRight.js +1 -1
- package/lodash/rearg.js +1 -1
- package/lodash/reduce.js +1 -1
- package/lodash/reduceRight.js +1 -1
- package/lodash/reject.js +1 -1
- package/lodash/remove.js +1 -1
- package/lodash/repeat.js +1 -1
- package/lodash/replace.js +1 -1
- package/lodash/rest.js +1 -1
- package/lodash/result.js +1 -1
- package/lodash/reverse.js +1 -1
- package/lodash/round.js +1 -1
- package/lodash/sample.js +1 -1
- package/lodash/sampleSize.js +1 -1
- package/lodash/seq.default.js +21 -21
- package/lodash/seq.js +11 -11
- package/lodash/set.js +1 -1
- package/lodash/setWith.js +1 -1
- package/lodash/shuffle.js +1 -1
- package/lodash/size.js +1 -1
- package/lodash/slice.js +1 -1
- package/lodash/snakeCase.js +1 -1
- package/lodash/some.js +1 -1
- package/lodash/sortBy.js +1 -1
- package/lodash/sortedIndex.js +1 -1
- package/lodash/sortedIndexBy.js +1 -1
- package/lodash/sortedIndexOf.js +1 -1
- package/lodash/sortedLastIndex.js +1 -1
- package/lodash/sortedLastIndexBy.js +1 -1
- package/lodash/sortedLastIndexOf.js +1 -1
- package/lodash/sortedUniq.js +1 -1
- package/lodash/sortedUniqBy.js +1 -1
- package/lodash/split.js +1 -1
- package/lodash/spread.js +1 -1
- package/lodash/startCase.js +1 -1
- package/lodash/startsWith.js +1 -1
- package/lodash/string.default.js +1 -1
- package/lodash/string.js +1 -1
- package/lodash/stubArray.js +1 -1
- package/lodash/stubFalse.js +1 -1
- package/lodash/stubObject.js +1 -1
- package/lodash/stubString.js +1 -1
- package/lodash/stubTrue.js +1 -1
- package/lodash/subtract.js +1 -1
- package/lodash/sum.js +1 -1
- package/lodash/sumBy.js +1 -1
- package/lodash/tail.js +1 -1
- package/lodash/take.js +1 -1
- package/lodash/takeRight.js +1 -1
- package/lodash/takeRightWhile.js +1 -1
- package/lodash/takeWhile.js +1 -1
- package/lodash/tap.js +1 -1
- package/lodash/template.d.ts +4 -0
- package/lodash/template.js +34 -29
- package/lodash/templateSettings.d.ts +4 -0
- package/lodash/templateSettings.js +1 -1
- package/lodash/throttle.js +1 -1
- package/lodash/thru.js +1 -1
- package/lodash/times.js +1 -1
- package/lodash/toArray.js +1 -1
- package/lodash/toFinite.js +1 -1
- package/lodash/toInteger.js +1 -1
- package/lodash/toIterator.js +1 -1
- package/lodash/toJSON.js +1 -1
- package/lodash/toLength.js +1 -1
- package/lodash/toLower.js +1 -1
- package/lodash/toNumber.js +1 -1
- package/lodash/toPairs.js +1 -1
- package/lodash/toPairsIn.js +1 -1
- package/lodash/toPath.js +1 -1
- package/lodash/toPlainObject.js +1 -1
- package/lodash/toSafeInteger.js +1 -1
- package/lodash/toString.js +1 -1
- package/lodash/toUpper.js +1 -1
- package/lodash/transform.js +1 -1
- package/lodash/trim.js +1 -1
- package/lodash/trimEnd.js +1 -1
- package/lodash/trimStart.js +1 -1
- package/lodash/truncate.js +1 -1
- package/lodash/unary.js +1 -1
- package/lodash/unescape.js +1 -1
- package/lodash/union.js +1 -1
- package/lodash/unionBy.js +1 -1
- package/lodash/unionWith.js +1 -1
- package/lodash/uniq.js +1 -1
- package/lodash/uniqBy.js +1 -1
- package/lodash/uniqWith.js +1 -1
- package/lodash/uniqueId.js +1 -1
- package/lodash/unset.js +1 -1
- package/lodash/unzip.js +1 -1
- package/lodash/unzipWith.js +1 -1
- package/lodash/update.js +1 -1
- package/lodash/updateWith.js +1 -1
- package/lodash/upperCase.js +1 -1
- package/lodash/upperFirst.js +1 -1
- package/lodash/util.default.js +11 -11
- package/lodash/util.js +7 -7
- package/lodash/value.js +1 -1
- package/lodash/valueOf.js +1 -1
- package/lodash/values.js +1 -1
- package/lodash/valuesIn.js +1 -1
- package/lodash/without.js +1 -1
- package/lodash/words.js +1 -1
- package/lodash/wrap.js +1 -1
- package/lodash/wrapperAt.js +1 -1
- package/lodash/wrapperChain.js +1 -1
- package/lodash/wrapperLodash.js +1 -1
- package/lodash/wrapperReverse.js +1 -1
- package/lodash/wrapperValue.js +1 -1
- package/lodash/xor.js +1 -1
- package/lodash/xorBy.js +1 -1
- package/lodash/xorWith.js +1 -1
- package/lodash/zip.js +1 -1
- package/lodash/zipObject.js +1 -1
- package/lodash/zipObjectDeep.js +1 -1
- package/lodash/zipWith.js +1 -1
- package/math/index.js +1 -1
- package/md5/index.js +1 -1
- package/mock/MockWebSocket.js +1 -1
- package/mock/MockXMLHttpRequest.js +1 -1
- package/mock/index.js +1 -1
- package/normalize-wheel/ExecutionEnvironment.js +1 -1
- package/normalize-wheel/UserAgent_DEPRECATED.js +1 -1
- package/normalize-wheel/index.js +1 -1
- package/normalize-wheel/isEventSupported.js +1 -1
- package/number-to-chinese/index.js +1 -1
- package/nzh/cn.js +1 -1
- package/nzh/hk.js +1 -1
- package/nzh/index.js +1 -1
- package/nzh/nzh.js +1 -1
- package/nzh/src/autoGet.js +1 -1
- package/nzh/src/index.js +1 -1
- package/nzh/src/langs/cn_b.js +1 -1
- package/nzh/src/langs/cn_s.js +1 -1
- package/nzh/src/langs/hk_b.js +1 -1
- package/nzh/src/langs/hk_s.js +1 -1
- package/nzh/src/utils.js +1 -1
- package/object/index.js +1 -1
- package/package.json +1 -1
- package/pinyin/{src/core.js → core.js} +2 -2
- package/pinyin/index.js +2 -3
- package/pinyin/simplified.d.ts +4 -1
- package/pinyin/simplified.js +7 -3
- package/pinyin/{src/simplified_dict.js → simplified_dict.js} +4 -2
- package/pinyin/traditional.d.ts +4 -1
- package/pinyin/traditional.js +7 -3
- package/pinyin/{src/traditional_dict.js → traditional_dict.js} +4 -2
- package/query-string/base.d.ts +7 -7
- package/query-string/base.js +2 -2
- package/query-string/index.d.ts +1 -1
- package/query-string/index.js +2 -2
- package/query-string/splitOnFirst.js +2 -2
- package/random/address.js +1 -1
- package/random/constellation.js +1 -1
- package/random/image.js +1 -1
- package/random/index.js +1 -1
- package/random/licensePlate.js +1 -1
- package/random/name.js +1 -1
- package/random/number.js +1 -1
- package/random/text.js +1 -1
- package/random/time.js +1 -1
- package/random/web.js +1 -1
- package/sanitize-url/index.js +1 -1
- package/screenfull/index.js +1 -1
- package/sleep/index.js +1 -1
- package/snapdom/{src/api → api}/preCache.js +2 -2
- package/snapdom/{src/api → api}/snapdom.js +2 -2
- package/snapdom/{src/core → core}/cache.d.ts +1 -0
- package/snapdom/{src/core → core}/cache.js +3 -2
- package/snapdom/core/capture.js +171 -0
- package/snapdom/{src/core → core}/clone.js +76 -6
- package/snapdom/{src/core → core}/context.js +2 -2
- package/snapdom/{src/core → core}/plugins.js +2 -2
- package/snapdom/{src/core → core}/prepare.js +44 -30
- package/snapdom/exporters/download.js +53 -0
- package/snapdom/{src/exporters → exporters}/toBlob.js +2 -2
- package/snapdom/{src/exporters → exporters}/toCanvas.js +2 -2
- package/snapdom/{src/exporters → exporters}/toImg.js +2 -2
- package/snapdom/index.browser.js +7 -0
- package/snapdom/index.d.ts +2 -1
- package/snapdom/index.js +3 -4
- package/snapdom/{src/modules → modules}/CSSVar.js +15 -9
- package/snapdom/{src/modules → modules}/background.js +3 -3
- package/snapdom/{src/modules → modules}/changeCSS.js +2 -2
- package/snapdom/{src/modules → modules}/counter.js +26 -7
- package/snapdom/{src/modules → modules}/fonts.js +101 -92
- package/snapdom/{src/modules → modules}/iconFonts.js +2 -2
- package/snapdom/{src/modules → modules}/images.js +2 -2
- package/snapdom/{src/modules → modules}/lineClamp.js +2 -2
- package/snapdom/{src/modules → modules}/pseudo.js +4 -4
- package/snapdom/{src/modules → modules}/rasterize.js +2 -2
- package/snapdom/{src/modules → modules}/snapFetch.js +2 -2
- package/snapdom/{src/modules → modules}/styles.js +50 -41
- package/snapdom/{src/modules → modules}/svgDefs.js +2 -2
- package/snapdom/{src/utils → utils}/browser.js +2 -2
- package/snapdom/{src/utils → utils}/capture.helpers.js +2 -2
- package/snapdom/{src/utils → utils}/clone.helpers.js +21 -17
- package/snapdom/{src/utils → utils}/css.js +4 -3
- package/snapdom/{src/utils → utils}/debug.js +2 -2
- package/snapdom/{src/utils → utils}/helpers.js +2 -2
- package/snapdom/{src/utils → utils}/image.js +2 -2
- package/snapdom/{src/utils → utils}/index.js +1 -1
- package/snapdom/utils/prepare.helpers.d.ts +18 -0
- package/snapdom/utils/prepare.helpers.js +35 -0
- package/snapdom/{src/utils → utils}/transforms.helpers.js +44 -22
- package/string/chars.js +1 -1
- package/string/index.js +1 -1
- package/tinycolor/{src/conversion.js → conversion.js} +2 -2
- package/tinycolor/{src/css-color-names.js → css-color-names.js} +2 -2
- package/tinycolor/{src/format-input.js → format-input.js} +2 -2
- package/tinycolor/{src/from-ratio.js → from-ratio.js} +3 -3
- package/tinycolor/index.d.ts +216 -2
- package/tinycolor/index.js +271 -12
- package/tinycolor/interfaces.js +2 -0
- package/tinycolor/public_api.js +12 -0
- package/tinycolor/{src/random.js → random.js} +3 -3
- package/tinycolor/{src/readability.js → readability.js} +2 -2
- package/tinycolor/{src/to-ms-filter.js → to-ms-filter.js} +2 -2
- package/tinycolor/umd_api.js +25 -0
- package/tinycolor/{src/utils.js → utils.js} +2 -2
- package/tree/index.d.ts +7 -7
- package/tree/index.js +3 -3
- package/tree/{search/index.js → searchTree.js} +3 -3
- package/tween/{src/easing.js → easing.js} +4 -4
- package/tween/index.d.ts +4 -1
- package/tween/index.js +7 -5
- package/tween/{src/tween.js → tween.js} +3 -3
- package/ui-color/compareColorByRange.d.ts +1 -1
- package/ui-color/compareColorByRange.js +2 -2
- package/ui-color/index.d.ts +145 -195
- package/ui-color/index.js +57 -52
- package/url-toolkit/index.d.ts +18 -2
- package/url-toolkit/index.js +61 -3
- package/validate/index.d.ts +37 -3
- package/validate/index.js +79 -12
- package/validate/interface.js +2 -0
- package/validate/{src/locale → locale}/en-US.js +2 -2
- package/validate/{src/locale → locale}/index.js +2 -2
- package/validate/{src/locale → locale}/zh-CN.js +2 -2
- package/validate/{src/rules → rules}/array.js +3 -3
- package/validate/{src/rules → rules}/base.js +3 -3
- package/validate/{src/rules → rules}/boolean.js +3 -3
- package/validate/{src/rules → rules}/custom.js +2 -2
- package/validate/{src/rules → rules}/number.js +3 -3
- package/validate/{src/rules → rules}/object.js +3 -3
- package/validate/{src/rules → rules}/string.js +3 -3
- package/validate/{src/rules → rules}/type.js +15 -15
- package/version/index.js +1 -1
- package/xlsx/crc32.js +1 -1
- package/xlsx/index.js +1 -1
- package/xlsx/xlsx.js +1 -1
- package/canvas-roundrect-polyfill/LICENSE +0 -21
- package/canvas-roundrect-polyfill/index.d.ts +0 -0
- package/canvas-roundrect-polyfill/index.js +0 -78
- package/emitter/src/index.d.ts +0 -75
- package/emitter/src/index.js +0 -69
- package/filesize/benchmarks/basic-performance.d.ts +0 -1
- package/filesize/benchmarks/index.d.ts +0 -2
- package/filesize/benchmarks/options-benchmark.d.ts +0 -1
- package/filesize/benchmarks/partial-benchmark.d.ts +0 -1
- package/filesize/benchmarks/stress-test.d.ts +0 -1
- package/pinyin/src/simplified.d.ts +0 -4
- package/pinyin/src/simplified.js +0 -8
- package/pinyin/src/traditional.d.ts +0 -4
- package/pinyin/src/traditional.js +0 -8
- package/promise-pool/LICENSE +0 -19
- package/promise-pool/index.js +0 -89
- package/snapdom/src/core/capture.js +0 -162
- package/snapdom/src/exporters/download.js +0 -47
- package/snapdom/src/index.d.ts +0 -2
- package/snapdom/src/index.js +0 -4
- package/snapdom/src/utils/prepare.helpers.d.ts +0 -9
- package/snapdom/src/utils/prepare.helpers.js +0 -9
- package/tinycolor/src/index.d.ts +0 -214
- package/tinycolor/src/index.js +0 -267
- package/tinycolor/src/public_api.js +0 -11
- package/tween/src/index.d.ts +0 -3
- package/tween/src/index.js +0 -4
- package/url-toolkit/src/url-toolkit.d.ts +0 -18
- package/url-toolkit/src/url-toolkit.js +0 -62
- package/validate/src/index.d.ts +0 -37
- package/validate/src/index.js +0 -80
- /package/cookie/{src/api.d.mts → api.d.ts} +0 -0
- /package/cookie/{src/assign.d.mts → assign.d.ts} +0 -0
- /package/cookie/{src/converter.d.mts → converter.d.ts} +0 -0
- /package/filesize/{src/constants.d.ts → constants.d.ts} +0 -0
- /package/pinyin/{src/core.d.ts → core.d.ts} +0 -0
- /package/pinyin/{src/simplified_dict.d.ts → simplified_dict.d.ts} +0 -0
- /package/pinyin/{src/traditional_dict.d.ts → traditional_dict.d.ts} +0 -0
- /package/snapdom/{src/api → api}/preCache.d.ts +0 -0
- /package/snapdom/{src/api → api}/snapdom.d.ts +0 -0
- /package/snapdom/{src/core → core}/capture.d.ts +0 -0
- /package/snapdom/{src/core → core}/clone.d.ts +0 -0
- /package/snapdom/{src/core → core}/context.d.ts +0 -0
- /package/snapdom/{src/core → core}/exporters.d.ts +0 -0
- /package/snapdom/{src/core → core}/plugins.d.ts +0 -0
- /package/snapdom/{src/core → core}/prepare.d.ts +0 -0
- /package/snapdom/{src/exporters → exporters}/download.d.ts +0 -0
- /package/snapdom/{src/exporters → exporters}/toBlob.d.ts +0 -0
- /package/snapdom/{src/exporters → exporters}/toCanvas.d.ts +0 -0
- /package/snapdom/{src/exporters → exporters}/toImg.d.ts +0 -0
- /package/snapdom/{src/exporters → exporters}/toJpg.d.ts +0 -0
- /package/snapdom/{src/exporters → exporters}/toPng.d.ts +0 -0
- /package/snapdom/{src/exporters → exporters}/toSvg.d.ts +0 -0
- /package/snapdom/{src/exporters → exporters}/toWebp.d.ts +0 -0
- /package/snapdom/{src/index.browser.d.ts → index.browser.d.ts} +0 -0
- /package/snapdom/{src/modules → modules}/CSSVar.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/background.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/changeCSS.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/counter.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/fonts.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/iconFonts.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/images.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/lineClamp.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/pseudo.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/rasterize.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/snapFetch.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/styles.d.ts +0 -0
- /package/snapdom/{src/modules → modules}/svgDefs.d.ts +0 -0
- /package/snapdom/{src/utils → utils}/browser.d.ts +0 -0
- /package/snapdom/{src/utils → utils}/capture.helpers.d.ts +0 -0
- /package/snapdom/{src/utils → utils}/clone.helpers.d.ts +0 -0
- /package/snapdom/{src/utils → utils}/css.d.ts +0 -0
- /package/snapdom/{src/utils → utils}/debug.d.ts +0 -0
- /package/snapdom/{src/utils → utils}/helpers.d.ts +0 -0
- /package/snapdom/{src/utils → utils}/image.d.ts +0 -0
- /package/snapdom/{src/utils → utils}/index.d.ts +0 -0
- /package/snapdom/{src/utils → utils}/transforms.helpers.d.ts +0 -0
- /package/tinycolor/{src/conversion.d.ts → conversion.d.ts} +0 -0
- /package/tinycolor/{src/css-color-names.d.ts → css-color-names.d.ts} +0 -0
- /package/tinycolor/{src/format-input.d.ts → format-input.d.ts} +0 -0
- /package/tinycolor/{src/from-ratio.d.ts → from-ratio.d.ts} +0 -0
- /package/tinycolor/{src/interfaces.d.ts → interfaces.d.ts} +0 -0
- /package/tinycolor/{src/public_api.d.ts → public_api.d.ts} +0 -0
- /package/tinycolor/{src/random.d.ts → random.d.ts} +0 -0
- /package/tinycolor/{src/readability.d.ts → readability.d.ts} +0 -0
- /package/tinycolor/{src/to-ms-filter.d.ts → to-ms-filter.d.ts} +0 -0
- /package/tinycolor/{src/umd_api.d.ts → umd_api.d.ts} +0 -0
- /package/tinycolor/{src/utils.d.ts → utils.d.ts} +0 -0
- /package/tree/{search/index.d.ts → searchTree.d.ts} +0 -0
- /package/tween/{src/easing.d.ts → easing.d.ts} +0 -0
- /package/tween/{src/tween.d.ts → tween.d.ts} +0 -0
- /package/validate/{src/interface.d.ts → interface.d.ts} +0 -0
- /package/validate/{src/locale → locale}/en-US.d.ts +0 -0
- /package/validate/{src/locale → locale}/index.d.ts +0 -0
- /package/validate/{src/locale → locale}/zh-CN.d.ts +0 -0
- /package/validate/{src/rules → rules}/array.d.ts +0 -0
- /package/validate/{src/rules → rules}/base.d.ts +0 -0
- /package/validate/{src/rules → rules}/boolean.d.ts +0 -0
- /package/validate/{src/rules → rules}/custom.d.ts +0 -0
- /package/validate/{src/rules → rules}/number.d.ts +0 -0
- /package/validate/{src/rules → rules}/object.d.ts +0 -0
- /package/validate/{src/rules → rules}/string.d.ts +0 -0
- /package/validate/{src/rules → rules}/type.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* 潘启宝 2026-03
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
2
|
import { cache as e } from "../core/cache.js";
|
|
3
|
-
//#region utils/snapdom/
|
|
3
|
+
//#region utils/snapdom/modules/counter.js
|
|
4
4
|
function t(e) {
|
|
5
5
|
return /\bcounter\s*\(|\bcounters\s*\(/.test(e || "");
|
|
6
6
|
}
|
|
@@ -33,13 +33,16 @@ function i(e, t = !0) {
|
|
|
33
33
|
}
|
|
34
34
|
function a(e, t) {
|
|
35
35
|
switch ((t || "decimal").toLowerCase()) {
|
|
36
|
-
case "decimal": return String(
|
|
37
|
-
case "decimal-leading-zero":
|
|
36
|
+
case "decimal": return String(e);
|
|
37
|
+
case "decimal-leading-zero": {
|
|
38
|
+
let t = Math.abs(e);
|
|
39
|
+
return (e < 0 ? "-" : "") + (t < 10 ? "0" : "") + String(t);
|
|
40
|
+
}
|
|
38
41
|
case "lower-alpha": return r(e, !1);
|
|
39
42
|
case "upper-alpha": return r(e, !0);
|
|
40
43
|
case "lower-roman": return i(e, !1);
|
|
41
44
|
case "upper-roman": return i(e, !0);
|
|
42
|
-
default: return String(
|
|
45
|
+
default: return String(e);
|
|
43
46
|
}
|
|
44
47
|
}
|
|
45
48
|
function o(t) {
|
|
@@ -71,9 +74,19 @@ function o(t) {
|
|
|
71
74
|
}
|
|
72
75
|
let a;
|
|
73
76
|
try {
|
|
74
|
-
a = n.style?.
|
|
77
|
+
a = n.style?.counterSet || getComputedStyle(n).counterSet;
|
|
75
78
|
} catch {}
|
|
76
79
|
if (a && a !== "none") for (let e of a.split(",")) {
|
|
80
|
+
let t = e.trim().split(/\s+/), n = t[0], i = Number.isFinite(Number(t[1])) ? Number(t[1]) : 0;
|
|
81
|
+
if (!n) continue;
|
|
82
|
+
let a = r.get(n) || [];
|
|
83
|
+
a.length === 0 && a.push(0), a[a.length - 1] = i, r.set(n, a);
|
|
84
|
+
}
|
|
85
|
+
let l;
|
|
86
|
+
try {
|
|
87
|
+
l = n.style?.counterIncrement || getComputedStyle(n).counterIncrement;
|
|
88
|
+
} catch {}
|
|
89
|
+
if (l && l !== "none") for (let e of l.split(",")) {
|
|
77
90
|
let t = e.trim().split(/\s+/), n = t[0], i = Number.isFinite(Number(t[1])) ? Number(t[1]) : 1;
|
|
78
91
|
if (!n) continue;
|
|
79
92
|
let a = r.get(n) || [];
|
|
@@ -96,7 +109,13 @@ function o(t) {
|
|
|
96
109
|
i.set(e, r);
|
|
97
110
|
let a = r;
|
|
98
111
|
for (let t of e.children) a = u(t, r, a);
|
|
99
|
-
|
|
112
|
+
let o = /* @__PURE__ */ new Map();
|
|
113
|
+
for (let [e, t] of n) {
|
|
114
|
+
let n = t.length, r = a.get(e);
|
|
115
|
+
o.set(e, r && r.length ? r.slice(0, n) : t.slice());
|
|
116
|
+
}
|
|
117
|
+
for (let [e, n] of a) !o.has(e) && n.length && !t.has(e) && o.set(e, n.slice(0, 1));
|
|
118
|
+
return o;
|
|
100
119
|
}, d = /* @__PURE__ */ new Map();
|
|
101
120
|
u(a, d, d);
|
|
102
121
|
function f() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* 潘启宝 2026-03
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
2
|
import { cache as e } from "../core/cache.js";
|
|
3
3
|
import { extractURL as t } from "../utils/helpers.js";
|
|
4
4
|
import { snapFetch as n } from "./snapFetch.js";
|
|
5
5
|
import { isIconFont as r } from "./iconFonts.js";
|
|
6
|
-
//#region utils/snapdom/
|
|
6
|
+
//#region utils/snapdom/modules/fonts.js
|
|
7
7
|
async function i(e, t, n, r = 32, i = "#000") {
|
|
8
8
|
t = t.replace(/^['"]+|['"]+$/g, "");
|
|
9
9
|
let a = window.devicePixelRatio || 1;
|
|
@@ -51,40 +51,49 @@ function s(e) {
|
|
|
51
51
|
return "";
|
|
52
52
|
}
|
|
53
53
|
function c(e) {
|
|
54
|
+
if (!e) return [];
|
|
55
|
+
let t = [];
|
|
56
|
+
for (let n of e.split(",")) {
|
|
57
|
+
let e = n.trim().replace(/^['"]+|['"]+$/g, "");
|
|
58
|
+
e && (a.has(e.toLowerCase()) || t.push(e));
|
|
59
|
+
}
|
|
60
|
+
return t;
|
|
61
|
+
}
|
|
62
|
+
function l(e) {
|
|
54
63
|
let t = String(e ?? "400").trim().toLowerCase();
|
|
55
64
|
if (t === "normal") return 400;
|
|
56
65
|
if (t === "bold") return 700;
|
|
57
66
|
let n = parseInt(t, 10);
|
|
58
67
|
return Number.isFinite(n) ? Math.min(900, Math.max(100, n)) : 400;
|
|
59
68
|
}
|
|
60
|
-
function
|
|
69
|
+
function u(e) {
|
|
61
70
|
let t = String(e ?? "normal").trim().toLowerCase();
|
|
62
71
|
return t.startsWith("italic") ? "italic" : t.startsWith("oblique") ? "oblique" : "normal";
|
|
63
72
|
}
|
|
64
|
-
function
|
|
73
|
+
function d(e) {
|
|
65
74
|
let t = String(e ?? "100%").match(/(\d+(?:\.\d+)?)\s*%/);
|
|
66
75
|
return t ? Math.max(50, Math.min(200, parseFloat(t[1]))) : 100;
|
|
67
76
|
}
|
|
68
|
-
function
|
|
77
|
+
function f(e) {
|
|
69
78
|
let t = String(e || "400").trim(), n = t.match(/^(\d{2,3})\s+(\d{2,3})$/);
|
|
70
79
|
if (n) {
|
|
71
|
-
let e =
|
|
80
|
+
let e = l(n[1]), t = l(n[2]);
|
|
72
81
|
return {
|
|
73
82
|
min: Math.min(e, t),
|
|
74
83
|
max: Math.max(e, t)
|
|
75
84
|
};
|
|
76
85
|
}
|
|
77
|
-
let r =
|
|
86
|
+
let r = l(t);
|
|
78
87
|
return {
|
|
79
88
|
min: r,
|
|
80
89
|
max: r
|
|
81
90
|
};
|
|
82
91
|
}
|
|
83
|
-
function
|
|
92
|
+
function p(e) {
|
|
84
93
|
let t = String(e || "normal").trim().toLowerCase();
|
|
85
94
|
return t === "italic" ? { kind: "italic" } : t.startsWith("oblique") ? { kind: "oblique" } : { kind: "normal" };
|
|
86
95
|
}
|
|
87
|
-
function
|
|
96
|
+
function m(e) {
|
|
88
97
|
let t = String(e || "100%").trim(), n = t.match(/(\d+(?:\.\d+)?)\s*%\s+(\d+(?:\.\d+)?)\s*%/);
|
|
89
98
|
if (n) {
|
|
90
99
|
let e = parseFloat(n[1]), t = parseFloat(n[2]);
|
|
@@ -99,10 +108,10 @@ function p(e) {
|
|
|
99
108
|
max: i
|
|
100
109
|
};
|
|
101
110
|
}
|
|
102
|
-
function
|
|
111
|
+
function h(e) {
|
|
103
112
|
return !e || typeof e != "string" ? "" : e.replace(/\s+(variable|vf|v[0-9]+)$/i, "").trim().toLowerCase().replace(/\s+/g, "-");
|
|
104
113
|
}
|
|
105
|
-
function
|
|
114
|
+
function g(e, t, n = []) {
|
|
106
115
|
if (!e) return !1;
|
|
107
116
|
try {
|
|
108
117
|
let r = new URL(e, location.href);
|
|
@@ -123,7 +132,7 @@ function h(e, t, n = []) {
|
|
|
123
132
|
let a = (r.pathname + r.search).toLowerCase();
|
|
124
133
|
if (/\bfont(s)?\b/.test(a) || /\.woff2?(\b|$)/.test(a) || o.some((e) => a.includes(e))) return !0;
|
|
125
134
|
for (let e of t) {
|
|
126
|
-
let t = e.toLowerCase().replace(/\s+/g, "+"), n = e.toLowerCase().replace(/\s+/g, "-"), r =
|
|
135
|
+
let t = e.toLowerCase().replace(/\s+/g, "+"), n = e.toLowerCase().replace(/\s+/g, "-"), r = h(e);
|
|
127
136
|
if (a.includes(t) || a.includes(n) || r && a.includes(r)) return !0;
|
|
128
137
|
}
|
|
129
138
|
return !1;
|
|
@@ -131,7 +140,7 @@ function h(e, t, n = []) {
|
|
|
131
140
|
return !1;
|
|
132
141
|
}
|
|
133
142
|
}
|
|
134
|
-
function
|
|
143
|
+
function _(e) {
|
|
135
144
|
let t = /* @__PURE__ */ new Set();
|
|
136
145
|
for (let n of e || []) {
|
|
137
146
|
let e = String(n).split("__")[0]?.trim();
|
|
@@ -139,7 +148,7 @@ function g(e) {
|
|
|
139
148
|
}
|
|
140
149
|
return t;
|
|
141
150
|
}
|
|
142
|
-
function
|
|
151
|
+
function v(e, t) {
|
|
143
152
|
return e && e.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/g, (e, n, r) => {
|
|
144
153
|
let i = (r || "").trim();
|
|
145
154
|
if (!i || /^data:|^blob:|^https?:|^file:|^about:/i.test(i)) return e;
|
|
@@ -150,8 +159,8 @@ function _(e, t) {
|
|
|
150
159
|
return `url("${a}")`;
|
|
151
160
|
});
|
|
152
161
|
}
|
|
153
|
-
var
|
|
154
|
-
async function
|
|
162
|
+
var y = /@import\s+(?:url\(\s*(['"]?)([^)"']+)\1\s*\)|(['"])([^"']+)\3)([^;]*);/g, b = 4;
|
|
163
|
+
async function x(e, t, r) {
|
|
155
164
|
if (!e) return e;
|
|
156
165
|
let i = /* @__PURE__ */ new Set();
|
|
157
166
|
function a(e, t) {
|
|
@@ -162,10 +171,10 @@ async function b(e, t, r) {
|
|
|
162
171
|
}
|
|
163
172
|
}
|
|
164
173
|
async function o(e, t, s = 0) {
|
|
165
|
-
if (s >
|
|
174
|
+
if (s > b) return console.warn(`[snapDOM] @import depth exceeded (${b}) at ${t}`), e;
|
|
166
175
|
let c = "", l = 0, u;
|
|
167
|
-
for (; u =
|
|
168
|
-
c += e.slice(l, u.index), l =
|
|
176
|
+
for (; u = y.exec(e);) {
|
|
177
|
+
c += e.slice(l, u.index), l = y.lastIndex;
|
|
169
178
|
let d = a((u[2] || u[4] || "").trim(), t);
|
|
170
179
|
if (i.has(d)) {
|
|
171
180
|
console.warn(`[snapDOM] Skipping circular @import: ${d}`);
|
|
@@ -181,15 +190,15 @@ async function b(e, t, r) {
|
|
|
181
190
|
});
|
|
182
191
|
e.ok && typeof e.data == "string" && (f = e.data);
|
|
183
192
|
} catch {}
|
|
184
|
-
f ? (f =
|
|
193
|
+
f ? (f = v(f, d), f = await o(f, d, s + 1), c += `\n/* inlined: ${d} */\n${f}\n`) : c += u[0];
|
|
185
194
|
}
|
|
186
195
|
return c += e.slice(l), c;
|
|
187
196
|
}
|
|
188
|
-
let s =
|
|
197
|
+
let s = v(e, t || location.href);
|
|
189
198
|
return s = await o(s, t || location.href, 0), s;
|
|
190
199
|
}
|
|
191
|
-
var
|
|
192
|
-
function
|
|
200
|
+
var S = /url\((["']?)([^"')]+)\1\)/g, C = /@font-face[^{}]*\{[^}]*\}/g;
|
|
201
|
+
function w(e) {
|
|
193
202
|
if (!e) return [];
|
|
194
203
|
let t = [], n = e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
195
204
|
for (let e of n) {
|
|
@@ -206,15 +215,15 @@ function C(e) {
|
|
|
206
215
|
}
|
|
207
216
|
return t;
|
|
208
217
|
}
|
|
209
|
-
function
|
|
218
|
+
function T(e, t) {
|
|
210
219
|
if (!t.length || !e || e.size === 0) return !0;
|
|
211
220
|
for (let n of e) for (let [e, r] of t) if (n >= e && n <= r) return !0;
|
|
212
221
|
return !1;
|
|
213
222
|
}
|
|
214
|
-
function
|
|
223
|
+
function E(e, t) {
|
|
215
224
|
let n = [];
|
|
216
225
|
if (!e) return n;
|
|
217
|
-
for (let r of e.matchAll(
|
|
226
|
+
for (let r of e.matchAll(S)) {
|
|
218
227
|
let e = (r[2] || "").trim();
|
|
219
228
|
if (!(!e || e.startsWith("data:"))) {
|
|
220
229
|
if (!/^https?:/i.test(e)) try {
|
|
@@ -225,9 +234,9 @@ function T(e, t) {
|
|
|
225
234
|
}
|
|
226
235
|
return n;
|
|
227
236
|
}
|
|
228
|
-
async function
|
|
237
|
+
async function D(i, a, o = "") {
|
|
229
238
|
let s = i;
|
|
230
|
-
for (let c of i.matchAll(
|
|
239
|
+
for (let c of i.matchAll(S)) {
|
|
231
240
|
let i = t(c[0]);
|
|
232
241
|
if (!i) continue;
|
|
233
242
|
let l = i;
|
|
@@ -256,12 +265,12 @@ async function E(i, a, o = "") {
|
|
|
256
265
|
}
|
|
257
266
|
return s;
|
|
258
267
|
}
|
|
259
|
-
function
|
|
268
|
+
function O(e) {
|
|
260
269
|
if (!e.length) return null;
|
|
261
270
|
let t = (t, n) => e.some(([e, r]) => !(r < t || e > n)), n = t(0, 255) || t(305, 305), r = t(256, 591) || t(7680, 7935), i = t(880, 1023), a = t(1024, 1279);
|
|
262
271
|
return t(7840, 7929) || t(258, 259) || t(416, 417) || t(431, 432) ? "vietnamese" : a ? "cyrillic" : i ? "greek" : r ? "latin-ext" : n ? "latin" : null;
|
|
263
272
|
}
|
|
264
|
-
function
|
|
273
|
+
function k(e = {}) {
|
|
265
274
|
let t = new Set((e.families || []).map((e) => String(e).toLowerCase())), n = new Set((e.domains || []).map((e) => String(e).toLowerCase())), r = new Set((e.subsets || []).map((e) => String(e).toLowerCase()));
|
|
266
275
|
return (e, i) => {
|
|
267
276
|
if (t.size && t.has(e.family.toLowerCase())) return !0;
|
|
@@ -269,17 +278,17 @@ function O(e = {}) {
|
|
|
269
278
|
if (n.has(new URL(t).host.toLowerCase())) return !0;
|
|
270
279
|
} catch {}
|
|
271
280
|
if (r.size) {
|
|
272
|
-
let e =
|
|
281
|
+
let e = O(i);
|
|
273
282
|
if (e && r.has(e)) return !0;
|
|
274
283
|
}
|
|
275
284
|
return !1;
|
|
276
285
|
};
|
|
277
286
|
}
|
|
278
|
-
function
|
|
287
|
+
function A(e) {
|
|
279
288
|
if (!e) return e;
|
|
280
289
|
let t = /@font-face[^{}]*\{[^}]*\}/gi, n = /* @__PURE__ */ new Set(), r = [];
|
|
281
290
|
for (let i of e.match(t) || []) {
|
|
282
|
-
let e = s(i.match(/font-family:\s*([^;]+);/i)?.[1] || ""), t = (i.match(/font-weight:\s*([^;]+);/i)?.[1] || "400").trim(), a = (i.match(/font-style:\s*([^;]+);/i)?.[1] || "normal").trim(), o = (i.match(/font-stretch:\s*([^;]+);/i)?.[1] || "100%").trim(), c = (i.match(/unicode-range:\s*([^;]+);/i)?.[1] || "").trim(), l = (i.match(/src\s*:\s*([^;}]+)[;}]/i)?.[1] || "").trim(), u =
|
|
291
|
+
let e = s(i.match(/font-family:\s*([^;]+);/i)?.[1] || ""), t = (i.match(/font-weight:\s*([^;]+);/i)?.[1] || "400").trim(), a = (i.match(/font-style:\s*([^;]+);/i)?.[1] || "normal").trim(), o = (i.match(/font-stretch:\s*([^;]+);/i)?.[1] || "100%").trim(), c = (i.match(/unicode-range:\s*([^;]+);/i)?.[1] || "").trim(), l = (i.match(/src\s*:\s*([^;}]+)[;}]/i)?.[1] || "").trim(), u = E(l, location.href), d = u.length ? u.map((e) => String(e).toLowerCase()).sort().join("|") : l.toLowerCase(), f = [
|
|
283
292
|
String(e || "").toLowerCase(),
|
|
284
293
|
t,
|
|
285
294
|
a,
|
|
@@ -293,14 +302,14 @@ function k(e) {
|
|
|
293
302
|
let i = 0;
|
|
294
303
|
return e.replace(t, () => r[i++] || "");
|
|
295
304
|
}
|
|
296
|
-
function
|
|
305
|
+
function j(e, t, n, r, i) {
|
|
297
306
|
return `fonts-embed-css::req=${Array.from(e || []).sort().join("|")}::ex=${t ? JSON.stringify({
|
|
298
307
|
families: (t.families || []).map((e) => String(e).toLowerCase()).sort(),
|
|
299
308
|
domains: (t.domains || []).map((e) => String(e).toLowerCase()).sort(),
|
|
300
309
|
subsets: (t.subsets || []).map((e) => String(e).toLowerCase()).sort()
|
|
301
310
|
}) : ""}::lf=${(n || []).map((e) => `${(e.family || "").toLowerCase()}::${e.weight || "normal"}::${e.style || "normal"}::${e.src || ""}`).sort().join("|")}::px=${r || ""}::fd=${(i || []).map((e) => String(e).toLowerCase()).sort().join("|")}`;
|
|
302
311
|
}
|
|
303
|
-
async function
|
|
312
|
+
async function M(e, t, n, i) {
|
|
304
313
|
let a;
|
|
305
314
|
try {
|
|
306
315
|
a = e.cssRules || [];
|
|
@@ -317,8 +326,8 @@ async function j(e, t, n, i) {
|
|
|
317
326
|
for (let e of a) {
|
|
318
327
|
if (e.type === CSSRule.IMPORT_RULE && e.styleSheet) {
|
|
319
328
|
let r = e.href ? o(e.href, t) : t;
|
|
320
|
-
if (i.depth >=
|
|
321
|
-
console.warn(`[snapDOM] CSSOM import depth exceeded (${
|
|
329
|
+
if (i.depth >= b) {
|
|
330
|
+
console.warn(`[snapDOM] CSSOM import depth exceeded (${b}) at ${r}`);
|
|
322
331
|
continue;
|
|
323
332
|
}
|
|
324
333
|
if (r && i.visitedSheets.has(r)) {
|
|
@@ -330,7 +339,7 @@ async function j(e, t, n, i) {
|
|
|
330
339
|
...i,
|
|
331
340
|
depth: (i.depth || 0) + 1
|
|
332
341
|
};
|
|
333
|
-
await
|
|
342
|
+
await M(e.styleSheet, r, n, a);
|
|
334
343
|
continue;
|
|
335
344
|
}
|
|
336
345
|
if (e.type === CSSRule.FONT_FACE_RULE) {
|
|
@@ -338,8 +347,8 @@ async function j(e, t, n, i) {
|
|
|
338
347
|
if (!a || r(a)) continue;
|
|
339
348
|
let o = (e.style.getPropertyValue("font-weight") || "400").trim(), c = (e.style.getPropertyValue("font-style") || "normal").trim(), l = (e.style.getPropertyValue("font-stretch") || "100%").trim(), u = (e.style.getPropertyValue("src") || "").trim(), d = (e.style.getPropertyValue("unicode-range") || "").trim();
|
|
340
349
|
if (!i.faceMatchesRequired(a, c, o, l)) continue;
|
|
341
|
-
let f =
|
|
342
|
-
if (!
|
|
350
|
+
let f = w(d);
|
|
351
|
+
if (!T(i.usedCodepoints, f)) continue;
|
|
343
352
|
let p = {
|
|
344
353
|
family: a,
|
|
345
354
|
weightSpec: o,
|
|
@@ -347,32 +356,32 @@ async function j(e, t, n, i) {
|
|
|
347
356
|
stretchSpec: l,
|
|
348
357
|
unicodeRange: d,
|
|
349
358
|
srcRaw: u,
|
|
350
|
-
srcUrls:
|
|
359
|
+
srcUrls: E(u, t || location.href),
|
|
351
360
|
href: t || location.href
|
|
352
361
|
};
|
|
353
362
|
if (i.simpleExcluder && i.simpleExcluder(p, f)) continue;
|
|
354
|
-
/url\(/i.test(u) ? await n(`@font-face{font-family:${a};src:${await
|
|
363
|
+
/url\(/i.test(u) ? await n(`@font-face{font-family:${a};src:${await D(u, t || location.href, i.useProxy)};font-style:${c};font-weight:${o};font-stretch:${l};${d ? `unicode-range:${d};` : ""}}`) : await n(`@font-face{font-family:${a};src:${u};font-style:${c};font-weight:${o};font-stretch:${l};${d ? `unicode-range:${d};` : ""}}`);
|
|
355
364
|
}
|
|
356
365
|
}
|
|
357
366
|
}
|
|
358
|
-
async function
|
|
367
|
+
async function N({ required: t, usedCodepoints: i, exclude: a = void 0, localFonts: o = [], useProxy: c = "", fontStylesheetDomains: l = [] } = {}) {
|
|
359
368
|
t instanceof Set || (t = /* @__PURE__ */ new Set()), i instanceof Set || (i = /* @__PURE__ */ new Set());
|
|
360
|
-
let
|
|
369
|
+
let d = /* @__PURE__ */ new Map();
|
|
361
370
|
for (let e of t) {
|
|
362
371
|
let [t, n, r, i] = String(e).split("__");
|
|
363
372
|
if (!t) continue;
|
|
364
|
-
let a =
|
|
373
|
+
let a = d.get(t) || [];
|
|
365
374
|
a.push({
|
|
366
375
|
w: parseInt(n, 10),
|
|
367
376
|
s: r,
|
|
368
377
|
st: parseInt(i, 10)
|
|
369
|
-
}),
|
|
378
|
+
}), d.set(t, a);
|
|
370
379
|
}
|
|
371
|
-
function
|
|
372
|
-
if (!
|
|
373
|
-
let i =
|
|
380
|
+
function h(e, t, n, r) {
|
|
381
|
+
if (!d.has(e)) return !1;
|
|
382
|
+
let i = d.get(e), a = f(n), o = p(t), s = m(r), c = a.min !== a.max, l = a.min, h = (e) => o.kind === "normal" && e === "normal" || o.kind !== "normal" && (e === "italic" || e === "oblique"), g = !1;
|
|
374
383
|
for (let e of i) {
|
|
375
|
-
let t = c ? e.w >= a.min && e.w <= a.max : e.w ===
|
|
384
|
+
let t = c ? e.w >= a.min && e.w <= a.max : e.w === l, n = h(u(e.s)), r = e.st >= s.min && e.st <= s.max;
|
|
376
385
|
if (t && n && r) {
|
|
377
386
|
g = !0;
|
|
378
387
|
break;
|
|
@@ -380,26 +389,26 @@ async function M({ required: t, usedCodepoints: i, exclude: a = void 0, localFon
|
|
|
380
389
|
}
|
|
381
390
|
if (g) return !0;
|
|
382
391
|
if (!c) for (let e of i) {
|
|
383
|
-
let t = h(
|
|
384
|
-
if (Math.abs(
|
|
392
|
+
let t = h(u(e.s)), n = e.st >= s.min && e.st <= s.max;
|
|
393
|
+
if (Math.abs(l - e.w) <= 300 && t && n) return !0;
|
|
385
394
|
}
|
|
386
|
-
if (!c && o.kind === "normal" && i.some((e) =>
|
|
387
|
-
let t = Math.abs(
|
|
395
|
+
if (!c && o.kind === "normal" && i.some((e) => u(e.s) !== "normal")) for (let e of i) {
|
|
396
|
+
let t = Math.abs(l - e.w) <= 300, n = e.st >= s.min && e.st <= s.max;
|
|
388
397
|
if (t && n) return !0;
|
|
389
398
|
}
|
|
390
399
|
return !1;
|
|
391
400
|
}
|
|
392
|
-
let
|
|
393
|
-
if (e.resource?.has(
|
|
394
|
-
let
|
|
401
|
+
let v = k(a), b = j(t, a, o, c, l);
|
|
402
|
+
if (e.resource?.has(b)) return e.resource.get(b);
|
|
403
|
+
let S = _(t), O = [], N = y;
|
|
395
404
|
for (let e of document.querySelectorAll("style")) {
|
|
396
405
|
let t = e.textContent || "";
|
|
397
406
|
for (let e of t.matchAll(N)) {
|
|
398
407
|
let t = (e[2] || e[4] || "").trim();
|
|
399
|
-
!t || r(t) || document.querySelector(`link[rel="stylesheet"][href="${t}"]`) ||
|
|
408
|
+
!t || r(t) || document.querySelector(`link[rel="stylesheet"][href="${t}"]`) || O.push(t);
|
|
400
409
|
}
|
|
401
410
|
}
|
|
402
|
-
|
|
411
|
+
O.length && await Promise.all(O.map((e) => new Promise((t) => {
|
|
403
412
|
if (document.querySelector(`link[rel="stylesheet"][href="${e}"]`)) return t(null);
|
|
404
413
|
let n = document.createElement("link");
|
|
405
414
|
n.rel = "stylesheet", n.href = e, n.setAttribute("data-snapdom", "injected-import"), n.onload = () => t(n), n.onerror = () => t(null), document.head.appendChild(n);
|
|
@@ -412,8 +421,8 @@ async function M({ required: t, usedCodepoints: i, exclude: a = void 0, localFon
|
|
|
412
421
|
o = new URL(e.href, location.href).origin === location.origin;
|
|
413
422
|
} catch {}
|
|
414
423
|
if (!o) {
|
|
415
|
-
let t = Array.isArray(
|
|
416
|
-
if (!
|
|
424
|
+
let t = Array.isArray(l) ? l : [];
|
|
425
|
+
if (!g(e.href, S, t)) continue;
|
|
417
426
|
}
|
|
418
427
|
if (o) {
|
|
419
428
|
let n = Array.from(document.styleSheets).find((t) => t.href === e.href);
|
|
@@ -429,45 +438,45 @@ async function M({ required: t, usedCodepoints: i, exclude: a = void 0, localFon
|
|
|
429
438
|
});
|
|
430
439
|
if (i?.ok && typeof i.data == "string" && (t = i.data), r(e.href)) continue;
|
|
431
440
|
}
|
|
432
|
-
t = await
|
|
433
|
-
let
|
|
434
|
-
for (let n of t.match(
|
|
441
|
+
t = await x(t, e.href, c);
|
|
442
|
+
let u = "";
|
|
443
|
+
for (let n of t.match(C) || []) {
|
|
435
444
|
let t = s((n.match(/font-family:\s*([^;]+);/i)?.[1] || "").trim());
|
|
436
445
|
if (!t || r(t)) continue;
|
|
437
|
-
let o = (n.match(/font-weight:\s*([^;]+);/i)?.[1] || "400").trim(),
|
|
438
|
-
if (!
|
|
439
|
-
let
|
|
440
|
-
if (!
|
|
441
|
-
let
|
|
446
|
+
let o = (n.match(/font-weight:\s*([^;]+);/i)?.[1] || "400").trim(), l = (n.match(/font-style:\s*([^;]+);/i)?.[1] || "normal").trim(), d = (n.match(/font-stretch:\s*([^;]+);/i)?.[1] || "100%").trim(), f = (n.match(/unicode-range:\s*([^;]+);/i)?.[1] || "").trim(), p = (n.match(/src\s*:\s*([^;}]+)[;}]/i)?.[1] || "").trim(), m = E(p, e.href);
|
|
447
|
+
if (!h(t, l, o, d)) continue;
|
|
448
|
+
let g = w(f);
|
|
449
|
+
if (!T(i, g)) continue;
|
|
450
|
+
let _ = {
|
|
442
451
|
family: t,
|
|
443
452
|
weightSpec: o,
|
|
444
|
-
styleSpec:
|
|
453
|
+
styleSpec: l,
|
|
445
454
|
stretchSpec: d,
|
|
446
455
|
unicodeRange: f,
|
|
447
456
|
srcRaw: p,
|
|
448
457
|
srcUrls: m,
|
|
449
458
|
href: e.href
|
|
450
459
|
};
|
|
451
|
-
if (a &&
|
|
452
|
-
let
|
|
453
|
-
|
|
460
|
+
if (a && v(_, g)) continue;
|
|
461
|
+
let y = /url\(/i.test(p) ? await D(n, e.href, c) : n;
|
|
462
|
+
u += y;
|
|
454
463
|
}
|
|
455
|
-
|
|
464
|
+
u.trim() && (P += u);
|
|
456
465
|
} catch {
|
|
457
466
|
console.warn("[snapDOM] Failed to process stylesheet:", e.href);
|
|
458
467
|
}
|
|
459
468
|
let I = {
|
|
460
|
-
requiredIndex:
|
|
469
|
+
requiredIndex: d,
|
|
461
470
|
usedCodepoints: i,
|
|
462
|
-
faceMatchesRequired:
|
|
463
|
-
simpleExcluder: a ?
|
|
471
|
+
faceMatchesRequired: h,
|
|
472
|
+
simpleExcluder: a ? k(a) : null,
|
|
464
473
|
useProxy: c,
|
|
465
474
|
visitedSheets: /* @__PURE__ */ new Set(),
|
|
466
475
|
depth: 0
|
|
467
476
|
};
|
|
468
477
|
for (let e of document.styleSheets) if (!(e.href && F.some((t) => t.href === e.href))) try {
|
|
469
478
|
let t = e.href || location.origin + "/";
|
|
470
|
-
t && I.visitedSheets.add(t), await
|
|
479
|
+
t && I.visitedSheets.add(t), await M(e, t, async (e) => {
|
|
471
480
|
P += e;
|
|
472
481
|
}, I);
|
|
473
482
|
} catch {}
|
|
@@ -475,7 +484,7 @@ async function M({ required: t, usedCodepoints: i, exclude: a = void 0, localFon
|
|
|
475
484
|
for (let t of document.fonts || []) {
|
|
476
485
|
if (!t || !t.family || t.status !== "loaded" || !t._snapdomSrc) continue;
|
|
477
486
|
let i = String(t.family).replace(/^['"]+|['"]+$/g, "");
|
|
478
|
-
if (r(i) || !
|
|
487
|
+
if (r(i) || !d.has(i) || a?.families && a.families.some((e) => String(e).toLowerCase() === i.toLowerCase())) continue;
|
|
479
488
|
let o = t._snapdomSrc;
|
|
480
489
|
if (!String(o).startsWith("data:")) {
|
|
481
490
|
if (e.resource?.has(t._snapdomSrc)) o = e.resource.get(t._snapdomSrc), e.font?.add(t._snapdomSrc);
|
|
@@ -498,33 +507,33 @@ async function M({ required: t, usedCodepoints: i, exclude: a = void 0, localFon
|
|
|
498
507
|
for (let t of o) {
|
|
499
508
|
if (!t || typeof t != "object") continue;
|
|
500
509
|
let i = String(t.family || "").replace(/^['"]+|['"]+$/g, "");
|
|
501
|
-
if (!i || r(i) || !
|
|
502
|
-
let o = t.weight == null ? "normal" : String(t.weight), s = t.style == null ? "normal" : String(t.style), l = t.stretchPct == null ? "100%" : `${t.stretchPct}%`, u = String(t.src || ""),
|
|
503
|
-
if (!
|
|
504
|
-
if (e.resource?.has(u))
|
|
510
|
+
if (!i || r(i) || !d.has(i) || a?.families && a.families.some((e) => String(e).toLowerCase() === i.toLowerCase())) continue;
|
|
511
|
+
let o = t.weight == null ? "normal" : String(t.weight), s = t.style == null ? "normal" : String(t.style), l = t.stretchPct == null ? "100%" : `${t.stretchPct}%`, u = String(t.src || ""), f = u;
|
|
512
|
+
if (!f.startsWith("data:")) {
|
|
513
|
+
if (e.resource?.has(u)) f = e.resource.get(u), e.font?.add(u);
|
|
505
514
|
else if (!e.font?.has(u)) try {
|
|
506
515
|
let t = await n(u, {
|
|
507
516
|
as: "dataURL",
|
|
508
517
|
useProxy: c,
|
|
509
518
|
silent: !0
|
|
510
519
|
});
|
|
511
|
-
if (t.ok && typeof t.data == "string")
|
|
520
|
+
if (t.ok && typeof t.data == "string") f = t.data, e.resource?.set(u, f), e.font?.add(u);
|
|
512
521
|
else continue;
|
|
513
522
|
} catch {
|
|
514
523
|
console.warn("[snapDOM] Failed to fetch localFonts src:", u);
|
|
515
524
|
continue;
|
|
516
525
|
}
|
|
517
526
|
}
|
|
518
|
-
P += `@font-face{font-family:'${i}';src:url(${
|
|
527
|
+
P += `@font-face{font-family:'${i}';src:url(${f});font-style:${s};font-weight:${o};font-stretch:${l};}`;
|
|
519
528
|
}
|
|
520
|
-
return P && (P =
|
|
529
|
+
return P && (P = A(P), e.resource?.set(b, P)), P;
|
|
521
530
|
}
|
|
522
|
-
function
|
|
531
|
+
function P(e) {
|
|
523
532
|
let t = /* @__PURE__ */ new Set();
|
|
524
533
|
if (!e) return t;
|
|
525
534
|
let n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, null), r = (e) => {
|
|
526
|
-
let n =
|
|
527
|
-
n
|
|
535
|
+
let n = c(e.fontFamily);
|
|
536
|
+
if (n.length) for (let r of n) t.add(((e, t, n) => `${r}__${l(e)}__${u(t)}__${d(n)}`)(e.fontWeight, e.fontStyle, e.fontStretch));
|
|
528
537
|
};
|
|
529
538
|
r(getComputedStyle(e));
|
|
530
539
|
let i = getComputedStyle(e, "::before");
|
|
@@ -540,7 +549,7 @@ function N(e) {
|
|
|
540
549
|
}
|
|
541
550
|
return t;
|
|
542
551
|
}
|
|
543
|
-
function
|
|
552
|
+
function F(e) {
|
|
544
553
|
let t = /* @__PURE__ */ new Set(), n = (e) => {
|
|
545
554
|
if (e) for (let n of e) t.add(n.codePointAt(0));
|
|
546
555
|
}, r = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT, null);
|
|
@@ -563,7 +572,7 @@ function P(e) {
|
|
|
563
572
|
}
|
|
564
573
|
return t;
|
|
565
574
|
}
|
|
566
|
-
async function
|
|
575
|
+
async function I(e, t = 2) {
|
|
567
576
|
try {
|
|
568
577
|
await document.fonts.ready;
|
|
569
578
|
} catch {}
|
|
@@ -581,5 +590,5 @@ async function F(e, t = 2) {
|
|
|
581
590
|
for (let e = 0; e < Math.max(1, t); e++) r(), await new Promise((e) => requestAnimationFrame(() => requestAnimationFrame(e)));
|
|
582
591
|
}
|
|
583
592
|
//#endregion
|
|
584
|
-
export {
|
|
593
|
+
export { F as collectUsedCodepoints, P as collectUsedFontVariants, N as embedCustomFonts, I as ensureFontsReady, i as iconToImage };
|
|
585
594
|
/* 独立思考,明辨是非 */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* 潘启宝 2026-03
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
2
|
import { snapFetch as e } from "./snapFetch.js";
|
|
3
|
-
//#region utils/snapdom/
|
|
3
|
+
//#region utils/snapdom/modules/images.js
|
|
4
4
|
var t = "http://www.w3.org/1999/xlink";
|
|
5
5
|
function n(e) {
|
|
6
6
|
return e.getAttribute("href") || e.getAttribute("xlink:href") || (typeof e.getAttributeNS == "function" ? e.getAttributeNS(t, "href") : null);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-03
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
2
|
import { cache as e } from "../core/cache.js";
|
|
3
3
|
import { getStyle as t, getStyleKey as n, snapshotComputedStyle as r, splitBackgroundImage as i } from "../utils/css.js";
|
|
4
4
|
import { debugWarn as a } from "../utils/debug.js";
|
|
@@ -9,8 +9,8 @@ import "../utils/index.js";
|
|
|
9
9
|
import { isIconFont as u } from "./iconFonts.js";
|
|
10
10
|
import { iconToImage as d } from "./fonts.js";
|
|
11
11
|
import { buildCounterContext as f, hasCounters as p, resolveCountersInContent as m } from "./counter.js";
|
|
12
|
-
//#region utils/snapdom/
|
|
13
|
-
var h = /* @__PURE__ */ new WeakMap(), g =
|
|
12
|
+
//#region utils/snapdom/modules/pseudo.js
|
|
13
|
+
var h = /* @__PURE__ */ new WeakMap(), g = 1e3;
|
|
14
14
|
function _(e, t) {
|
|
15
15
|
let n = y(e);
|
|
16
16
|
return t ? (t.__pseudoPreflightFp !== n && (t.__pseudoPreflight = x(e), t.__pseudoPreflightFp = n), !!t.__pseudoPreflight) : x(e);
|
|
@@ -213,7 +213,7 @@ async function k(p, m, h, g) {
|
|
|
213
213
|
if (!a || a.content === "none" && a.backgroundImage === "none" && a.backgroundColor === "transparent" && (a.borderStyle === "none" || parseFloat(a.borderWidth) === 0) && (!a.transform || a.transform === "none") && a.display === "inline") continue;
|
|
214
214
|
if (e === "::first-letter") {
|
|
215
215
|
let e = t(p);
|
|
216
|
-
if (!(a.color !== e.color || a.fontSize !== e.fontSize || a.fontWeight !== e.fontWeight)) continue;
|
|
216
|
+
if (!(a.color !== e.color || a.fontSize !== e.fontSize || a.fontWeight !== e.fontWeight || a.fontFamily !== e.fontFamily || a.fontStyle !== e.fontStyle || a.textTransform !== e.textTransform || a.float !== e.float || a.paddingTop !== e.paddingTop || a.paddingRight !== e.paddingRight || a.paddingBottom !== e.paddingBottom || a.paddingLeft !== e.paddingLeft || a.marginTop !== e.marginTop || a.marginRight !== e.marginRight || a.marginBottom !== e.marginBottom || a.marginLeft !== e.marginLeft)) continue;
|
|
217
217
|
let i = Array.from(m.childNodes).find((e) => e.nodeType === Node.TEXT_NODE && e.textContent?.trim().length > 0);
|
|
218
218
|
if (!i) continue;
|
|
219
219
|
let o = i.textContent, s = o.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['’])?)/u)?.[0], c = o.slice(s?.length || 0);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* 潘启宝 2026-03
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
2
|
import { toCanvas as e } from "../exporters/toCanvas.js";
|
|
3
|
-
//#region utils/snapdom/
|
|
3
|
+
//#region utils/snapdom/modules/rasterize.js
|
|
4
4
|
async function t(t, n) {
|
|
5
5
|
let r = await e(t, n), i = new Image();
|
|
6
6
|
return i.src = r.toDataURL(`image/${n.format}`, n.quality), await i.decode(), i.style.width = `${r.width / n.dpr}px`, i.style.height = `${r.height / n.dpr}px`, i;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* 潘启宝 2026-03
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
2
|
import { safeEncodeURI as e } from "../utils/helpers.js";
|
|
3
|
-
//#region utils/snapdom/
|
|
3
|
+
//#region utils/snapdom/modules/snapFetch.js
|
|
4
4
|
function t(e = "[snapDOM]", { ttlMs: t = 5 * 6e4, maxEntries: n = 12 } = {}) {
|
|
5
5
|
let r = /* @__PURE__ */ new Map(), i = 0;
|
|
6
6
|
function a(a, o, s) {
|