@unicom-cloud/utils 0.1.50 → 0.1.52
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 +20 -0
- 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/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.d.ts +5 -4
- package/constant/ui.js +10 -9
- package/content-disposition/index.js +1 -1
- package/cookie/api.js +1 -1
- package/cookie/assign.js +1 -1
- package/cookie/converter.js +1 -1
- package/cookie/index.js +1 -1
- package/css/cssSupported.js +1 -1
- package/css/index.js +1 -1
- 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-align/LICENSE.md +20 -9
- package/dom-align/adjustForViewport.js +1 -1
- package/dom-align/align/align.js +1 -1
- package/dom-align/align/alignElement.js +1 -1
- package/dom-align/align/alignPoint.js +1 -1
- package/dom-align/getAlignOffset.js +1 -1
- package/dom-align/getElFuturePos.js +1 -1
- package/dom-align/getOffsetParent.js +1 -1
- package/dom-align/getRegion.js +1 -1
- package/dom-align/getVisibleRectForElement.js +1 -1
- package/dom-align/index.js +1 -1
- package/dom-align/isAncestorFixed.js +1 -1
- package/dom-align/propertyUtils.js +1 -1
- package/dom-align/utils.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 +1 -1
- 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.js +1 -1
- 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/fflate/index.js +1 -1
- package/fflate/src/index.js +1 -1
- package/fflate/src/worker.js +1 -1
- package/file/fileRead.js +1 -1
- package/file/fileToDataURL.js +1 -1
- package/file/img.js +1 -1
- package/file/index.js +1 -1
- package/file/saveAs.js +1 -1
- package/filesize/index.js +1 -1
- package/filesize/src/constants.js +1 -1
- package/filesize/src/filesize.js +1 -1
- package/filesize/src/helpers.js +1 -1
- 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 -1
- package/is/index.js +92 -92
- 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.d.ts +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.d.ts +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.d.ts +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.d.ts +1 -1
- package/is/lib/isStrongPassword.js +3 -3
- package/is/lib/isURL.d.ts +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 +1 -1
- 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.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.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 +1 -1
- 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 +1 -1
- 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.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.default.js +1 -1
- package/lodash/lodash.js +1 -1
- 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.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 +1 -1
- package/lodash/seq.js +1 -1
- 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.js +1 -1
- 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 +1 -1
- package/lodash/util.js +1 -1
- 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/mousetrap/index.js +1 -1
- package/mousetrap/plugins/bind-dictionary/index.js +1 -1
- package/mousetrap/plugins/global-bind/index.js +1 -1
- package/mousetrap/plugins/index.js +1 -1
- package/mousetrap/plugins/pause/index.js +1 -1
- package/mousetrap/plugins/record/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/index.js +1 -1
- package/pinyin/lib/common/constant.js +1 -1
- package/pinyin/lib/common/segmentit/AC.d.ts +1 -1
- package/pinyin/lib/common/segmentit/AC.js +6 -6
- package/pinyin/lib/common/segmentit/TrieNode.d.ts +3 -1
- package/pinyin/lib/common/segmentit/TrieNode.js +2 -2
- package/pinyin/lib/common/segmentit/index.js +1 -1
- package/pinyin/lib/common/segmentit/max-probability.js +1 -1
- package/pinyin/lib/common/segmentit/min-tokenization.js +1 -1
- package/pinyin/lib/common/segmentit/reverse-max-match.js +1 -1
- package/pinyin/lib/common/utils.js +1 -1
- package/pinyin/lib/core/convert/index.js +1 -1
- package/pinyin/lib/core/custom/index.d.ts +1 -1
- package/pinyin/lib/core/custom/index.js +9 -5
- package/pinyin/lib/core/dict/index.js +1 -1
- package/pinyin/lib/core/html/index.js +1 -1
- package/pinyin/lib/core/match/index.js +1 -1
- package/pinyin/lib/core/pinyin/handle.js +2 -2
- package/pinyin/lib/core/pinyin/index.js +1 -1
- package/pinyin/lib/core/pinyin/middlewares.js +1 -1
- package/pinyin/lib/core/polyphonic/index.js +47 -34
- package/pinyin/lib/core/segment/index.js +1 -1
- package/pinyin/lib/core/segment/middlewares.js +1 -1
- package/pinyin/lib/core/traditional/index.js +1 -1
- package/pinyin/lib/data/dict1.js +1 -1
- package/pinyin/lib/data/dict2.js +1 -1
- package/pinyin/lib/data/dict3.js +1 -1
- package/pinyin/lib/data/dict4.js +1 -1
- package/pinyin/lib/data/dict5.js +1 -1
- package/pinyin/lib/data/special.js +1 -1
- package/pinyin/lib/data/surname.js +1 -1
- package/pinyin/lib/index.js +1 -1
- package/query-string/index.js +1 -1
- 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/request/apiReplaceSegment.d.ts +14 -0
- package/request/apiReplaceSegment.js +22 -0
- package/request/index.d.ts +24 -0
- package/request/index.js +51 -0
- package/sanitize-url/index.js +1 -1
- package/screenfull/index.js +1 -1
- package/sleep/index.js +1 -1
- package/snapdom/index.browser.js +1 -1
- package/snapdom/index.js +1 -1
- package/snapdom/src/api/preCache.js +1 -1
- package/snapdom/src/api/snapdom.js +1 -1
- package/snapdom/src/core/cache.js +1 -1
- package/snapdom/src/core/capture.js +98 -97
- package/snapdom/src/core/clone.js +1 -1
- package/snapdom/src/core/context.js +1 -1
- package/snapdom/src/core/plugins.js +1 -1
- package/snapdom/src/core/prepare.js +1 -1
- package/snapdom/src/exporters/download.js +1 -1
- package/snapdom/src/exporters/toBlob.js +1 -1
- package/snapdom/src/exporters/toCanvas.js +62 -44
- package/snapdom/src/exporters/toImg.js +1 -1
- package/snapdom/src/index.browser.js +1 -1
- package/snapdom/src/index.js +1 -1
- package/snapdom/src/modules/CSSVar.js +1 -1
- package/snapdom/src/modules/background.js +1 -1
- package/snapdom/src/modules/changeCSS.js +1 -1
- package/snapdom/src/modules/counter.js +1 -1
- package/snapdom/src/modules/fonts.js +1 -1
- package/snapdom/src/modules/iconFonts.js +1 -1
- package/snapdom/src/modules/images.js +1 -1
- package/snapdom/src/modules/lineClamp.js +1 -1
- package/snapdom/src/modules/pictureResolver.js +1 -1
- package/snapdom/src/modules/pseudo.js +1 -1
- package/snapdom/src/modules/rasterize.js +1 -1
- package/snapdom/src/modules/snapFetch.js +1 -1
- package/snapdom/src/modules/styles.js +1 -1
- package/snapdom/src/modules/svgDefs.js +1 -1
- package/snapdom/src/utils/browser.js +1 -1
- package/snapdom/src/utils/capture.helpers.d.ts +25 -0
- package/snapdom/src/utils/capture.helpers.js +81 -26
- package/snapdom/src/utils/clone.helpers.js +1 -1
- package/snapdom/src/utils/css.js +12 -4
- package/snapdom/src/utils/debug.js +1 -1
- package/snapdom/src/utils/helpers.js +1 -1
- package/snapdom/src/utils/image.js +1 -1
- package/snapdom/src/utils/index.js +1 -1
- package/snapdom/src/utils/prepare.helpers.js +1 -1
- package/snapdom/src/utils/transforms.helpers.js +1 -1
- package/string/chars.js +1 -1
- package/string/index.js +1 -1
- package/tinycolor/conversion.js +1 -1
- package/tinycolor/css-color-names.js +1 -1
- package/tinycolor/format-input.js +1 -1
- package/tinycolor/from-ratio.js +1 -1
- package/tinycolor/index.js +1 -1
- package/tinycolor/interfaces.js +1 -1
- package/tinycolor/public_api.js +1 -1
- package/tinycolor/random.js +1 -1
- package/tinycolor/readability.js +1 -1
- package/tinycolor/to-ms-filter.js +1 -1
- package/tinycolor/umd_api.js +1 -1
- package/tinycolor/utils.js +1 -1
- package/tree/index.js +4 -4
- package/tree/searchTree.js +1 -1
- package/tween/easing.js +1 -1
- package/tween/index.js +1 -1
- package/tween/tween.js +1 -1
- package/ui-color/compareColorByRange.js +1 -1
- package/ui-color/index.js +1 -1
- package/url-toolkit/index.js +1 -1
- package/validate/index.d.ts +9 -9
- package/validate/index.js +12 -6
- package/validate/interface.d.ts +12 -12
- package/validate/interface.js +1 -1
- package/validate/locale/en-US.js +1 -1
- package/validate/locale/index.js +1 -1
- package/validate/locale/zh-CN.js +1 -1
- package/validate/rules/array.d.ts +4 -4
- package/validate/rules/array.js +1 -1
- package/validate/rules/base.d.ts +5 -5
- package/validate/rules/base.js +26 -22
- package/validate/rules/boolean.d.ts +4 -4
- package/validate/rules/boolean.js +1 -1
- package/validate/rules/custom.d.ts +5 -5
- package/validate/rules/custom.js +14 -10
- package/validate/rules/number.d.ts +6 -6
- package/validate/rules/number.js +1 -1
- package/validate/rules/object.d.ts +4 -4
- package/validate/rules/object.js +1 -1
- package/validate/rules/string.d.ts +6 -6
- package/validate/rules/string.js +1 -1
- package/validate/rules/type.d.ts +4 -4
- package/validate/rules/type.js +1 -1
- package/version/index.js +1 -1
- package/xlsx/crc32.js +1 -1
- package/xlsx/index.js +1 -1
- package/xlsx/xlsx.js +1 -1
|
@@ -1,17 +1,33 @@
|
|
|
1
|
-
/* 潘启宝 2026-06-
|
|
1
|
+
/* 潘启宝 2026-06-12 15:22:06 星期五 山东省济南市 */
|
|
2
2
|
import { isSafari as e } from "../utils/browser.js";
|
|
3
3
|
//#region utils/snapdom/src/exporters/toCanvas.js
|
|
4
|
-
|
|
4
|
+
var t = 16384, n = 16384 * 16384;
|
|
5
|
+
function r(e) {
|
|
6
|
+
if (!i(e)) return e;
|
|
7
|
+
try {
|
|
8
|
+
let r = a(e), i = r.match(/<svg\b[^>]*>/i);
|
|
9
|
+
if (!i) return e;
|
|
10
|
+
let s = i[0], c = parseFloat((s.match(/\bwidth="([\d.]+)/i) || [])[1]), l = parseFloat((s.match(/\bheight="([\d.]+)/i) || [])[1]);
|
|
11
|
+
if (!Number.isFinite(c) || !Number.isFinite(l) || c <= 0 || l <= 0) return e;
|
|
12
|
+
let u = Math.min(1, t / c, t / l, Math.sqrt(n / (c * l)));
|
|
13
|
+
if (u >= 1) return e;
|
|
14
|
+
let d = Math.max(1, Math.floor(c * u)), f = Math.max(1, Math.floor(l * u));
|
|
15
|
+
return console.warn(`[snapDOM] Capture ${Math.round(c)}×${Math.round(l)}px exceeds the browser image-decode limit (${t}px/side); downscaling to ${d}×${f}px. Lower \`scale\` or set \`width\`/\`height\` to control output size.`), o(r.replace(s, s.replace(/(\bwidth=")[\d.]+/i, `$1${d}`).replace(/(\bheight=")[\d.]+/i, `$1${f}`)));
|
|
16
|
+
} catch {
|
|
17
|
+
return e;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function i(e) {
|
|
5
21
|
return typeof e == "string" && /^data:image\/svg\+xml/i.test(e);
|
|
6
22
|
}
|
|
7
|
-
function
|
|
23
|
+
function a(e) {
|
|
8
24
|
let t = e.indexOf(",");
|
|
9
25
|
return t >= 0 ? decodeURIComponent(e.slice(t + 1)) : "";
|
|
10
26
|
}
|
|
11
|
-
function
|
|
27
|
+
function o(e) {
|
|
12
28
|
return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`;
|
|
13
29
|
}
|
|
14
|
-
function
|
|
30
|
+
function s(e) {
|
|
15
31
|
let t = [], n = "", r = 0;
|
|
16
32
|
for (let i = 0; i < e.length; i++) {
|
|
17
33
|
let a = e[i];
|
|
@@ -19,7 +35,7 @@ function i(e) {
|
|
|
19
35
|
}
|
|
20
36
|
return n.trim() && t.push(n), t.map((e) => e.trim()).filter(Boolean);
|
|
21
37
|
}
|
|
22
|
-
function
|
|
38
|
+
function c(e) {
|
|
23
39
|
let t = [], n = "", r = 0;
|
|
24
40
|
for (let i = 0; i < e.length; i++) {
|
|
25
41
|
let a = e[i];
|
|
@@ -34,64 +50,66 @@ function a(e) {
|
|
|
34
50
|
}
|
|
35
51
|
return i.join(" ");
|
|
36
52
|
}
|
|
37
|
-
function
|
|
38
|
-
let t =
|
|
53
|
+
function l(e) {
|
|
54
|
+
let t = s(e), n = null, r = null, i = null, a = [];
|
|
39
55
|
for (let e of t) {
|
|
40
56
|
let t = e.indexOf(":");
|
|
41
57
|
if (t < 0) continue;
|
|
42
|
-
let
|
|
43
|
-
|
|
58
|
+
let o = e.slice(0, t).trim().toLowerCase(), s = e.slice(t + 1).trim();
|
|
59
|
+
o === "box-shadow" ? i = s : o === "filter" ? n = s : o === "-webkit-filter" ? r = s : a.push([o, s]);
|
|
44
60
|
}
|
|
45
|
-
if (
|
|
46
|
-
let e =
|
|
61
|
+
if (i) {
|
|
62
|
+
let e = c(i);
|
|
47
63
|
e && (n = n ? `${n} ${e}` : e, r = r ? `${r} ${e}` : e);
|
|
48
64
|
}
|
|
49
|
-
let
|
|
50
|
-
return n &&
|
|
65
|
+
let o = [...a];
|
|
66
|
+
return n && o.push(["filter", n]), r && o.push(["-webkit-filter", r]), o.map(([e, t]) => `${e}:${t}`).join(";");
|
|
51
67
|
}
|
|
52
|
-
function
|
|
53
|
-
return e.replace(/([^{}]+)\{([^}]*)\}/g, (e, t, n) => `${t}{${
|
|
68
|
+
function u(e) {
|
|
69
|
+
return e.replace(/([^{}]+)\{([^}]*)\}/g, (e, t, n) => `${t}{${l(n)}}`);
|
|
54
70
|
}
|
|
55
|
-
function
|
|
56
|
-
return e = e.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi, (e, t) => e.replace(t,
|
|
71
|
+
function d(e) {
|
|
72
|
+
return e = e.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi, (e, t) => e.replace(t, u(t))), e = e.replace(/style=(['"])([\s\S]*?)\1/gi, (e, t, n) => `style=${t}${l(n)}${t}`), e;
|
|
57
73
|
}
|
|
58
|
-
function
|
|
59
|
-
if (!e() || !t
|
|
74
|
+
function f(t) {
|
|
75
|
+
if (!e() || !i(t)) return t;
|
|
60
76
|
try {
|
|
61
|
-
return
|
|
77
|
+
return o(d(a(t)));
|
|
62
78
|
} catch {
|
|
63
|
-
return
|
|
79
|
+
return t;
|
|
64
80
|
}
|
|
65
81
|
}
|
|
66
|
-
async function
|
|
67
|
-
let { width:
|
|
68
|
-
|
|
69
|
-
let
|
|
70
|
-
if (
|
|
71
|
-
|
|
82
|
+
async function p(i, a) {
|
|
83
|
+
let { width: o, height: s, scale: c = 1, dpr: l = 1, meta: u = {}, backgroundColor: d } = a;
|
|
84
|
+
i = f(i), i = r(i);
|
|
85
|
+
let p = new Image();
|
|
86
|
+
if (p.loading = "eager", p.decoding = "sync", p.crossOrigin = "anonymous", p.src = i, await p.decode(), e()) {
|
|
87
|
+
p.style.cssText = "position:fixed;left:-99999px;top:-99999px;pointer-events:none", document.body.appendChild(p);
|
|
72
88
|
try {
|
|
73
89
|
await new Promise((e) => requestAnimationFrame(() => requestAnimationFrame(e)));
|
|
74
90
|
} finally {
|
|
75
91
|
try {
|
|
76
|
-
|
|
92
|
+
p.remove();
|
|
77
93
|
} catch {}
|
|
78
94
|
}
|
|
79
95
|
}
|
|
80
|
-
let
|
|
81
|
-
if (
|
|
82
|
-
else if (
|
|
83
|
-
let e =
|
|
84
|
-
|
|
85
|
-
} else if (
|
|
86
|
-
let e =
|
|
87
|
-
|
|
88
|
-
} else
|
|
89
|
-
|
|
90
|
-
let y =
|
|
91
|
-
|
|
92
|
-
let
|
|
93
|
-
|
|
96
|
+
let m = p.naturalWidth, h = p.naturalHeight, g = Number.isFinite(u.w0) ? u.w0 : m, _ = Number.isFinite(u.h0) ? u.h0 : h, v, y, b = Number.isFinite(o), x = Number.isFinite(s);
|
|
97
|
+
if (b && x) v = Math.max(1, o), y = Math.max(1, s);
|
|
98
|
+
else if (b) {
|
|
99
|
+
let e = o / Math.max(1, g);
|
|
100
|
+
v = o, y = _ * e;
|
|
101
|
+
} else if (x) {
|
|
102
|
+
let e = s / Math.max(1, _);
|
|
103
|
+
y = s, v = g * e;
|
|
104
|
+
} else v = m, y = h;
|
|
105
|
+
v *= c, y *= c;
|
|
106
|
+
let S = v * l, C = y * l, w = Math.max(S / t, C / t, Math.sqrt(S * C / n));
|
|
107
|
+
w > 1 && (console.warn(`[snapDOM] Output ${Math.round(S)}×${Math.round(C)}px exceeds the browser canvas limit (${t}px/side); downscaling. Lower \`scale\`/\`dpr\` or set \`width\`/\`height\`.`), v /= w, y /= w);
|
|
108
|
+
let T = document.createElement("canvas");
|
|
109
|
+
T.width = v * l, T.height = y * l, T.style.width = `${v}px`, T.style.height = `${y}px`;
|
|
110
|
+
let E = T.getContext("2d");
|
|
111
|
+
return l !== 1 && E.scale(l, l), d && (E.save(), E.fillStyle = d, E.fillRect(0, 0, v, y), E.restore()), E.drawImage(p, 0, 0, v, y), T;
|
|
94
112
|
}
|
|
95
113
|
//#endregion
|
|
96
|
-
export {
|
|
114
|
+
export { p as toCanvas };
|
|
97
115
|
/* 独立思考,明辨是非 */
|
package/snapdom/src/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-06-
|
|
1
|
+
/* 潘启宝 2026-06-12 15:22:06 星期五 山东省济南市 */
|
|
2
2
|
//#region utils/snapdom/src/modules/pictureResolver.js
|
|
3
3
|
function e(e) {
|
|
4
4
|
return !!(!e || e.startsWith("data:") || e.startsWith("blob:") || /^data:image\/(gif|png|svg)/.test(e) && e.length < 200);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-06-
|
|
1
|
+
/* 潘启宝 2026-06-12 15:22:06 星期五 山东省济南市 */
|
|
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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-06-
|
|
1
|
+
/* 潘启宝 2026-06-12 15:22:06 星期五 山东省济南市 */
|
|
2
2
|
import { safeEncodeURI as e } from "../utils/helpers.js";
|
|
3
3
|
//#region utils/snapdom/src/modules/snapFetch.js
|
|
4
4
|
function t(e = "[snapDOM]", { ttlMs: t = 5 * 6e4, maxEntries: n = 12 } = {}) {
|
|
@@ -6,6 +6,22 @@
|
|
|
6
6
|
* @param {Object} [opts] - optional { debug } for verbose logging
|
|
7
7
|
*/
|
|
8
8
|
export function stripRootShadows(originalEl: Element, cloneRoot: HTMLElement, opts?: Object): void;
|
|
9
|
+
/**
|
|
10
|
+
* #426: When margins of in-flow children collapse *through* the captured root's
|
|
11
|
+
* top/bottom edge, that margin lands outside the root's border box — exactly the
|
|
12
|
+
* region `element.getBoundingClientRect()`/`offsetHeight` excludes. The clone,
|
|
13
|
+
* isolated inside an `all:initial` wrapper, no longer collapses those margins out,
|
|
14
|
+
* so the content is pushed in and the opposite edge is clipped.
|
|
15
|
+
*
|
|
16
|
+
* Mirror the browser: walk the collapse-through chain from each open edge and zero
|
|
17
|
+
* the leading/trailing margin on the CLONE so content sits flush, matching what the
|
|
18
|
+
* captured border box actually shows. Source tree drives the decision; clone tree is
|
|
19
|
+
* mutated in parallel (same ordering as deepClone).
|
|
20
|
+
*
|
|
21
|
+
* @param {Element} originalEl
|
|
22
|
+
* @param {HTMLElement} cloneRoot
|
|
23
|
+
*/
|
|
24
|
+
export function neutralizeRootMarginCollapse(originalEl: Element, cloneRoot: HTMLElement): void;
|
|
9
25
|
/** Remove all HTML comments (prevents invalid XML like "--") */
|
|
10
26
|
export function removeAllComments(root: any): void;
|
|
11
27
|
/**
|
|
@@ -14,6 +30,15 @@ export function removeAllComments(root: any): void;
|
|
|
14
30
|
* - Drop common framework directives (x-*, v-*, :*, on:*, bind:*, let:*, class:*)
|
|
15
31
|
*/
|
|
16
32
|
export function sanitizeAttributesForXHTML(root: any, opts?: {}): void;
|
|
33
|
+
/**
|
|
34
|
+
* #425: strip XML-1.0-invalid characters from every attribute value AND text node in the
|
|
35
|
+
* clone. clone.js already scrubs attributes during cloning, but values re-applied afterwards
|
|
36
|
+
* (e.g. `input.setAttribute('value', node.value)` for form fields — ExtJS hidden inputs use
|
|
37
|
+
* U+0003 as a delimiter) and text content were not covered. This runs once over the finished
|
|
38
|
+
* clone, right before serialization, so no invalid char can reach the SVG.
|
|
39
|
+
* @param {Element} root
|
|
40
|
+
*/
|
|
41
|
+
export function stripInvalidXMLChars(root: Element): void;
|
|
17
42
|
export function sanitizeCloneForXHTML(root: any, opts?: {}): void;
|
|
18
43
|
/**
|
|
19
44
|
* Post-clone "shrink pass": for parents that lost children due to excludeMode:"remove",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-06-
|
|
1
|
+
/* 潘启宝 2026-06-12 15:22:06 星期五 山东省济南市 */
|
|
2
2
|
import { debugWarn as e } from "./debug.js";
|
|
3
3
|
import "./index.js";
|
|
4
4
|
//#region utils/snapdom/src/utils/capture.helpers.js
|
|
@@ -28,11 +28,46 @@ function t(t, n, r = {}) {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
function n(e) {
|
|
31
|
+
let t = e.display || "";
|
|
32
|
+
if (t.includes("flex") || t.includes("grid") || t.startsWith("table") || t === "inline-block" || t === "flow-root" || e.position === "absolute" || e.position === "fixed" || e.float && e.float !== "none") return !0;
|
|
33
|
+
let n = e.overflowX || e.overflow || "visible", r = e.overflowY || e.overflow || "visible";
|
|
34
|
+
return !!(n !== "visible" || r !== "visible" || e.contain && /\b(layout|content|paint|strict)\b/.test(e.contain));
|
|
35
|
+
}
|
|
36
|
+
function r(e, t) {
|
|
37
|
+
let n = Array.from(e.childNodes), r = t === "top" ? n : n.reverse();
|
|
38
|
+
for (let e of r) {
|
|
39
|
+
if (e.nodeType === Node.TEXT_NODE) {
|
|
40
|
+
if (/\S/.test(e.textContent || "")) return null;
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
if (e.nodeType !== Node.ELEMENT_NODE) continue;
|
|
44
|
+
let t = getComputedStyle(e), n = String(t.display || "");
|
|
45
|
+
if (!(n === "none" || n === "contents") && !(t.position === "absolute" || t.position === "fixed")) return t.float && t.float !== "none" || n.startsWith("inline") ? null : e;
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
function i(e, t) {
|
|
50
|
+
if (!e || !t || !t.style) return;
|
|
51
|
+
let i = getComputedStyle(e);
|
|
52
|
+
if (!n(i)) for (let a of ["top", "bottom"]) {
|
|
53
|
+
let o = a === "top" ? "Top" : "Bottom";
|
|
54
|
+
if ((parseFloat(i[`border${o}Width`]) || 0) > 0 || (parseFloat(i[`padding${o}`]) || 0) > 0) continue;
|
|
55
|
+
let s = e, c = t;
|
|
56
|
+
for (; s && c;) {
|
|
57
|
+
let e = r(s, a);
|
|
58
|
+
if (!e) break;
|
|
59
|
+
let t = Array.from(s.children).indexOf(e), i = t >= 0 ? c.children[t] : null, l = getComputedStyle(e), u = parseFloat(l[`margin${o}`]) || 0;
|
|
60
|
+
if (i && i.style && u > 0 && (i.style[`margin${o}`] = "0px"), n(l) || (parseFloat(l[`border${o}Width`]) || 0) > 0 || (parseFloat(l[`padding${o}`]) || 0) > 0) break;
|
|
61
|
+
s = e, c = i;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function a(e) {
|
|
31
66
|
let t = document.createTreeWalker(e, NodeFilter.SHOW_COMMENT), n = [];
|
|
32
67
|
for (; t.nextNode();) n.push(t.currentNode);
|
|
33
68
|
for (let e of n) e.remove();
|
|
34
69
|
}
|
|
35
|
-
function
|
|
70
|
+
function o(e, t = {}) {
|
|
36
71
|
let { stripFrameworkDirectives: n = !0 } = t, r = new Set(["xml", "xlink"]), i = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT);
|
|
37
72
|
for (; i.nextNode();) {
|
|
38
73
|
let e = i.currentNode;
|
|
@@ -56,10 +91,30 @@ function r(e, t = {}) {
|
|
|
56
91
|
}
|
|
57
92
|
}
|
|
58
93
|
}
|
|
59
|
-
|
|
60
|
-
|
|
94
|
+
var s = /[\x00-\x08\x0B\x0C\x0E-\x1F]/g;
|
|
95
|
+
function c(e) {
|
|
96
|
+
if (!e) return;
|
|
97
|
+
let t = (e) => {
|
|
98
|
+
if (e.nodeType === Node.ELEMENT_NODE) {
|
|
99
|
+
if (e.attributes) for (let t of Array.from(e.attributes)) {
|
|
100
|
+
let n = t.value.replace(s, "");
|
|
101
|
+
if (n !== t.value) try {
|
|
102
|
+
e.setAttribute(t.name, n);
|
|
103
|
+
} catch {}
|
|
104
|
+
}
|
|
105
|
+
} else if (e.nodeType === Node.TEXT_NODE || e.nodeType === Node.CDATA_SECTION_NODE) {
|
|
106
|
+
let t = e.data.replace(s, "");
|
|
107
|
+
t !== e.data && (e.data = t);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
t(e);
|
|
111
|
+
let n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT), r;
|
|
112
|
+
for (; r = n.nextNode();) t(r);
|
|
113
|
+
}
|
|
114
|
+
function l(e, t = {}) {
|
|
115
|
+
e && (o(e, t), a(e), c(e));
|
|
61
116
|
}
|
|
62
|
-
function
|
|
117
|
+
function u(e) {
|
|
63
118
|
try {
|
|
64
119
|
let t = e.getAttribute?.("style") || "";
|
|
65
120
|
return /\b(height|width|block-size|inline-size)\s*:/.test(t);
|
|
@@ -67,35 +122,35 @@ function a(e) {
|
|
|
67
122
|
return !1;
|
|
68
123
|
}
|
|
69
124
|
}
|
|
70
|
-
function
|
|
125
|
+
function d(e) {
|
|
71
126
|
return e instanceof HTMLImageElement || e instanceof HTMLCanvasElement || e instanceof HTMLVideoElement || e instanceof HTMLIFrameElement || e instanceof SVGElement || e instanceof HTMLObjectElement || e instanceof HTMLEmbedElement;
|
|
72
127
|
}
|
|
73
|
-
function
|
|
74
|
-
if (!(e instanceof Element) ||
|
|
128
|
+
function f(e, t) {
|
|
129
|
+
if (!(e instanceof Element) || u(e) || d(e)) return !1;
|
|
75
130
|
let n = t.position;
|
|
76
131
|
if (n === "absolute" || n === "fixed" || n === "sticky") return !1;
|
|
77
132
|
let r = t.display || "";
|
|
78
133
|
return !(r.includes("flex") || r.includes("grid") || r.startsWith("table") || t.transform && t.transform !== "none");
|
|
79
134
|
}
|
|
80
|
-
function
|
|
135
|
+
function p(e, t, n = /* @__PURE__ */ new Map()) {
|
|
81
136
|
function r(e, t) {
|
|
82
137
|
if (!(e instanceof Element) || !(t instanceof Element)) return;
|
|
83
138
|
let i = e.childElementCount > t.childElementCount, a = n.get(e) || getComputedStyle(e);
|
|
84
|
-
if (n.has(e) || n.set(e, a), i &&
|
|
139
|
+
if (n.has(e) || n.set(e, a), i && f(e, a)) {
|
|
85
140
|
t.style.height || (t.style.height = "auto"), t.style.width || (t.style.width = "auto"), t.style.removeProperty("block-size"), t.style.removeProperty("inline-size"), t.style.minHeight || (t.style.minHeight = "0"), t.style.minWidth || (t.style.minWidth = "0"), t.style.maxHeight || (t.style.maxHeight = "none"), t.style.maxWidth || (t.style.maxWidth = "none");
|
|
86
141
|
let e = a.overflowY || a.overflowBlock || "visible", n = a.overflowX || a.overflowInline || "visible";
|
|
87
142
|
(e !== "visible" || n !== "visible") && (t.style.overflow = "visible");
|
|
88
143
|
}
|
|
89
|
-
let o = Array.from(e.children),
|
|
90
|
-
for (let e = 0; e < Math.min(o.length,
|
|
144
|
+
let o = Array.from(e.children), s = Array.from(t.children);
|
|
145
|
+
for (let e = 0; e < Math.min(o.length, s.length); e++) r(o[e], s[e]);
|
|
91
146
|
}
|
|
92
147
|
r(e, t);
|
|
93
148
|
}
|
|
94
|
-
function
|
|
149
|
+
function m(e) {
|
|
95
150
|
let t = getComputedStyle(e);
|
|
96
151
|
return !(t.display === "none" || t.position === "absolute" || t.position === "fixed");
|
|
97
152
|
}
|
|
98
|
-
function
|
|
153
|
+
function h(t, n) {
|
|
99
154
|
if (!(t instanceof Element)) return !1;
|
|
100
155
|
if (t.getAttribute("data-capture") === "exclude" && n?.excludeMode === "remove") return !0;
|
|
101
156
|
if (Array.isArray(n?.exclude)) for (let r of n.exclude) try {
|
|
@@ -105,35 +160,35 @@ function u(t, n) {
|
|
|
105
160
|
}
|
|
106
161
|
return !1;
|
|
107
162
|
}
|
|
108
|
-
function
|
|
163
|
+
function g(e, t) {
|
|
109
164
|
let n = getComputedStyle(e), r = e.getBoundingClientRect(), i = Infinity, a = -Infinity, o = !1, s = Array.from(e.children);
|
|
110
165
|
for (let e of s) {
|
|
111
|
-
if (
|
|
166
|
+
if (h(e, t) || !m(e)) continue;
|
|
112
167
|
let n = e.getBoundingClientRect(), s = n.top - r.top, c = n.bottom - r.top;
|
|
113
168
|
c <= s || (s < i && (i = s), c > a && (a = c), o = !0);
|
|
114
169
|
}
|
|
115
|
-
let c = o ? Math.max(0, a - i) : 0,
|
|
116
|
-
return
|
|
170
|
+
let c = o ? Math.max(0, a - i) : 0, l = parseFloat(n.borderTopWidth) || 0, u = parseFloat(n.borderBottomWidth) || 0, d = parseFloat(n.paddingTop) || 0, f = parseFloat(n.paddingBottom) || 0;
|
|
171
|
+
return l + u + d + f + c;
|
|
117
172
|
}
|
|
118
|
-
var
|
|
119
|
-
function
|
|
173
|
+
var _ = (e, t = 3) => Number.isFinite(e) ? Math.round(e * 10 ** t) / 10 ** t : e, v = /::-webkit-scrollbar(-[a-z]+)?\b/i;
|
|
174
|
+
function y(e, t = /* @__PURE__ */ new Set()) {
|
|
120
175
|
let n = "";
|
|
121
176
|
if (!e) return n;
|
|
122
177
|
for (let r = 0; r < e.length; r++) {
|
|
123
178
|
let i = e[r];
|
|
124
179
|
try {
|
|
125
180
|
if (i.type === CSSRule.IMPORT_RULE && i.styleSheet) {
|
|
126
|
-
n +=
|
|
181
|
+
n += y(i.styleSheet.cssRules, t);
|
|
127
182
|
continue;
|
|
128
183
|
}
|
|
129
184
|
if (i.type === CSSRule.MEDIA_RULE && i.cssRules) {
|
|
130
|
-
let e =
|
|
185
|
+
let e = y(i.cssRules, t);
|
|
131
186
|
e && (n += `@media ${i.conditionText}{${e}}`);
|
|
132
187
|
continue;
|
|
133
188
|
}
|
|
134
189
|
if (i.type === CSSRule.STYLE_RULE) {
|
|
135
190
|
let e = i.selectorText || "";
|
|
136
|
-
if (
|
|
191
|
+
if (v.test(e)) {
|
|
137
192
|
let e = i.cssText;
|
|
138
193
|
e && !t.has(e) && (t.add(e), n += e);
|
|
139
194
|
}
|
|
@@ -142,15 +197,15 @@ function m(e, t = /* @__PURE__ */ new Set()) {
|
|
|
142
197
|
}
|
|
143
198
|
return n;
|
|
144
199
|
}
|
|
145
|
-
function
|
|
200
|
+
function b(e) {
|
|
146
201
|
if (!e || !e.styleSheets) return "";
|
|
147
202
|
let t = /* @__PURE__ */ new Set(), n = "";
|
|
148
203
|
for (let r of Array.from(e.styleSheets)) try {
|
|
149
204
|
let e = r.cssRules;
|
|
150
|
-
e && (n +=
|
|
205
|
+
e && (n += y(e, t));
|
|
151
206
|
} catch {}
|
|
152
207
|
return n;
|
|
153
208
|
}
|
|
154
209
|
//#endregion
|
|
155
|
-
export {
|
|
210
|
+
export { b as collectScrollbarCSS, g as estimateKeptHeight, _ as limitDecimals, i as neutralizeRootMarginCollapse, l as sanitizeCloneForXHTML, p as shrinkAutoSizeBoxes, t as stripRootShadows };
|
|
156
211
|
/* 独立思考,明辨是非 */
|
package/snapdom/src/utils/css.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-06-
|
|
1
|
+
/* 潘启宝 2026-06-12 15:22:06 星期五 山东省济南市 */
|
|
2
2
|
import { cache as e } from "../core/cache.js";
|
|
3
3
|
//#region utils/snapdom/src/utils/css.js
|
|
4
4
|
var t = new Set([
|
|
@@ -77,7 +77,7 @@ function l(e) {
|
|
|
77
77
|
}
|
|
78
78
|
function u(e, t) {
|
|
79
79
|
if (t = String(t || "").toLowerCase(), n.has(t)) return "";
|
|
80
|
-
let r = [], i = a(t), o = (e.display || "").toLowerCase() === "inline"
|
|
80
|
+
let r = [], i = a(t), o = (e.display || "").toLowerCase() === "inline", s = new Set([
|
|
81
81
|
"span",
|
|
82
82
|
"small",
|
|
83
83
|
"em",
|
|
@@ -91,9 +91,17 @@ function u(e, t) {
|
|
|
91
91
|
"mark",
|
|
92
92
|
"sub",
|
|
93
93
|
"sup"
|
|
94
|
-
])
|
|
94
|
+
]), c = new Set([
|
|
95
|
+
"table",
|
|
96
|
+
"thead",
|
|
97
|
+
"tbody",
|
|
98
|
+
"tfoot",
|
|
99
|
+
"tr",
|
|
100
|
+
"td",
|
|
101
|
+
"th"
|
|
102
|
+
]), u = o || s.has(t) || c.has(t), d = (e) => e === "width" || e === "min-width" || e === "max-width" || e === "inline-size" || e === "min-inline-size" || e === "max-inline-size";
|
|
95
103
|
for (let [t, n] of Object.entries(e)) {
|
|
96
|
-
if (l(t) ||
|
|
104
|
+
if (l(t) || u && d(t)) continue;
|
|
97
105
|
let e = i[t];
|
|
98
106
|
n && n !== e && r.push(`${t}:${n}`);
|
|
99
107
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-06-
|
|
1
|
+
/* 潘启宝 2026-06-12 15:22:06 星期五 山东省济南市 */
|
|
2
2
|
import { cache as e } from "../core/cache.js";
|
|
3
3
|
import { extractURL as t, resolveURL as n, safeEncodeURI as r } from "./helpers.js";
|
|
4
4
|
import { snapFetch as i } from "../modules/snapFetch.js";
|
package/string/chars.js
CHANGED
package/string/index.js
CHANGED
package/tinycolor/conversion.js
CHANGED