@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
package/tinycolor/index.d.ts
CHANGED
|
@@ -1,2 +1,216 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
import type { CMYK, HSL, HSLA, HSV, HSVA, Numberify, RGB, RGBA } from './interfaces.js';
|
|
2
|
+
export interface TinyColorOptions {
|
|
3
|
+
format: string;
|
|
4
|
+
gradientType: string;
|
|
5
|
+
}
|
|
6
|
+
export type ColorInput = string | number | RGB | RGBA | HSL | HSLA | HSV | HSVA | CMYK | TinyColor | unknown;
|
|
7
|
+
export type ColorFormats = 'rgb' | 'prgb' | 'hex' | 'hex3' | 'hex4' | 'hex6' | 'hex8' | 'name' | 'hsl' | 'hsv' | 'cmyk';
|
|
8
|
+
export * from './public_api';
|
|
9
|
+
export declare class TinyColor {
|
|
10
|
+
/** red */
|
|
11
|
+
r: number;
|
|
12
|
+
/** green */
|
|
13
|
+
g: number;
|
|
14
|
+
/** blue */
|
|
15
|
+
b: number;
|
|
16
|
+
/** alpha */
|
|
17
|
+
a: number;
|
|
18
|
+
/** the format used to create the tinycolor instance */
|
|
19
|
+
format: ColorFormats;
|
|
20
|
+
/** input passed into the constructer used to create the tinycolor instance */
|
|
21
|
+
originalInput: ColorInput;
|
|
22
|
+
/** the color was successfully parsed */
|
|
23
|
+
isValid: boolean;
|
|
24
|
+
gradientType?: string;
|
|
25
|
+
/** rounded alpha */
|
|
26
|
+
roundA: number;
|
|
27
|
+
constructor(color?: ColorInput, opts?: Partial<TinyColorOptions>);
|
|
28
|
+
get ok(): boolean;
|
|
29
|
+
isDark(): boolean;
|
|
30
|
+
isLight(): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Returns the perceived brightness of the color, from 0-255.
|
|
33
|
+
*/
|
|
34
|
+
getBrightness(): number;
|
|
35
|
+
/**
|
|
36
|
+
* Returns the perceived luminance of a color, from 0-1.
|
|
37
|
+
*/
|
|
38
|
+
getLuminance(): number;
|
|
39
|
+
/**
|
|
40
|
+
* Returns the alpha value of a color, from 0-1.
|
|
41
|
+
*/
|
|
42
|
+
getAlpha(): number;
|
|
43
|
+
/**
|
|
44
|
+
* Sets the alpha value on the current color.
|
|
45
|
+
*
|
|
46
|
+
* @param alpha - The new alpha value. The accepted range is 0-1.
|
|
47
|
+
*/
|
|
48
|
+
setAlpha(alpha?: string | number): this;
|
|
49
|
+
/**
|
|
50
|
+
* Returns whether the color is monochrome.
|
|
51
|
+
*/
|
|
52
|
+
isMonochrome(): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Returns the object as a HSVA object.
|
|
55
|
+
*/
|
|
56
|
+
toHsv(): Numberify<HSVA>;
|
|
57
|
+
toHsv_(): Numberify<HSVA>;
|
|
58
|
+
/**
|
|
59
|
+
* Returns the hsva values interpolated into a string with the following format:
|
|
60
|
+
* "hsva(xxx, xxx, xxx, xx)".
|
|
61
|
+
*/
|
|
62
|
+
toHsvString(): string;
|
|
63
|
+
/**
|
|
64
|
+
* Returns the object as a HSLA object.
|
|
65
|
+
*/
|
|
66
|
+
toHsl(): Numberify<HSLA>;
|
|
67
|
+
/**
|
|
68
|
+
* Returns the hsla values interpolated into a string with the following format:
|
|
69
|
+
* "hsla(xxx, xxx, xxx, xx)".
|
|
70
|
+
*/
|
|
71
|
+
toHslString(): string;
|
|
72
|
+
/**
|
|
73
|
+
* Returns the hex value of the color.
|
|
74
|
+
* @param allow3Char will shorten hex value to 3 char if possible
|
|
75
|
+
*/
|
|
76
|
+
toHex(allow3Char?: boolean): string;
|
|
77
|
+
/**
|
|
78
|
+
* Returns the hex value of the color -with a # prefixed.
|
|
79
|
+
* @param allow3Char will shorten hex value to 3 char if possible
|
|
80
|
+
*/
|
|
81
|
+
toHexString(allow3Char?: boolean): string;
|
|
82
|
+
/**
|
|
83
|
+
* Returns the hex 8 value of the color.
|
|
84
|
+
* @param allow4Char will shorten hex value to 4 char if possible
|
|
85
|
+
*/
|
|
86
|
+
toHex8(allow4Char?: boolean): string;
|
|
87
|
+
/**
|
|
88
|
+
* Returns the hex 8 value of the color -with a # prefixed.
|
|
89
|
+
* @param allow4Char will shorten hex value to 4 char if possible
|
|
90
|
+
*/
|
|
91
|
+
toHex8String(allow4Char?: boolean): string;
|
|
92
|
+
/**
|
|
93
|
+
* Returns the shorter hex value of the color depends on its alpha -with a # prefixed.
|
|
94
|
+
* @param allowShortChar will shorten hex value to 3 or 4 char if possible
|
|
95
|
+
*/
|
|
96
|
+
toHexShortString(allowShortChar?: boolean): string;
|
|
97
|
+
/**
|
|
98
|
+
* Returns the object as a RGBA object.
|
|
99
|
+
*/
|
|
100
|
+
toRgb(): Numberify<RGBA>;
|
|
101
|
+
toRgba(): Numberify<RGBA>;
|
|
102
|
+
toRgbArray(): number[];
|
|
103
|
+
toRgbArrayString(): string;
|
|
104
|
+
/**
|
|
105
|
+
* Returns the RGBA values interpolated into a string with the following format:
|
|
106
|
+
* "RGBA(xxx, xxx, xxx, xx)".
|
|
107
|
+
*/
|
|
108
|
+
toRgbString(): string;
|
|
109
|
+
toRgbaString(): string;
|
|
110
|
+
/**
|
|
111
|
+
* Returns the object as a RGBA object.
|
|
112
|
+
*/
|
|
113
|
+
toPercentageRgb(): RGBA;
|
|
114
|
+
/**
|
|
115
|
+
* Returns the RGBA relative values interpolated into a string
|
|
116
|
+
*/
|
|
117
|
+
toPercentageRgbString(): string;
|
|
118
|
+
toCmyk(): Numberify<CMYK>;
|
|
119
|
+
toCmykString(): string;
|
|
120
|
+
/**
|
|
121
|
+
* The 'real' name of the color -if there is one.
|
|
122
|
+
*/
|
|
123
|
+
toName(): string | false;
|
|
124
|
+
/**
|
|
125
|
+
* String representation of the color.
|
|
126
|
+
*
|
|
127
|
+
* @param format - The format to be used when displaying the string representation.
|
|
128
|
+
*/
|
|
129
|
+
toString<T extends 'name'>(format: T): boolean | string;
|
|
130
|
+
toString<T extends ColorFormats>(format?: T): string;
|
|
131
|
+
toNumber(): number;
|
|
132
|
+
clone(): TinyColor;
|
|
133
|
+
/**
|
|
134
|
+
* Lighten the color a given amount. Providing 100 will always return white.
|
|
135
|
+
* @param amount - valid between 1-100
|
|
136
|
+
*/
|
|
137
|
+
lighten(amount?: number): TinyColor;
|
|
138
|
+
/**
|
|
139
|
+
* Brighten the color a given amount, from 0 to 100.
|
|
140
|
+
* @param amount - valid between 1-100
|
|
141
|
+
*/
|
|
142
|
+
brighten(amount?: number): TinyColor;
|
|
143
|
+
/**
|
|
144
|
+
* Darken the color a given amount, from 0 to 100.
|
|
145
|
+
* Providing 100 will always return black.
|
|
146
|
+
* @param amount - valid between 1-100
|
|
147
|
+
*/
|
|
148
|
+
darken(amount?: number): TinyColor;
|
|
149
|
+
/**
|
|
150
|
+
* Mix the color with pure white, from 0 to 100.
|
|
151
|
+
* Providing 0 will do nothing, providing 100 will always return white.
|
|
152
|
+
* @param amount - valid between 1-100
|
|
153
|
+
*/
|
|
154
|
+
tint(amount?: number): TinyColor;
|
|
155
|
+
/**
|
|
156
|
+
* Mix the color with pure black, from 0 to 100.
|
|
157
|
+
* Providing 0 will do nothing, providing 100 will always return black.
|
|
158
|
+
* @param amount - valid between 1-100
|
|
159
|
+
*/
|
|
160
|
+
shade(amount?: number): TinyColor;
|
|
161
|
+
/**
|
|
162
|
+
* Desaturate the color a given amount, from 0 to 100.
|
|
163
|
+
* Providing 100 will is the same as calling greyscale
|
|
164
|
+
* @param amount - valid between 1-100
|
|
165
|
+
*/
|
|
166
|
+
desaturate(amount?: number): TinyColor;
|
|
167
|
+
/**
|
|
168
|
+
* Saturate the color a given amount, from 0 to 100.
|
|
169
|
+
* @param amount - valid between 1-100
|
|
170
|
+
*/
|
|
171
|
+
saturate(amount?: number): TinyColor;
|
|
172
|
+
/**
|
|
173
|
+
* Completely desaturates a color into greyscale.
|
|
174
|
+
* Same as calling `desaturate(100)`
|
|
175
|
+
*/
|
|
176
|
+
greyscale(): TinyColor;
|
|
177
|
+
/**
|
|
178
|
+
* Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
|
|
179
|
+
* Values outside of this range will be wrapped into this range.
|
|
180
|
+
*/
|
|
181
|
+
spin(amount: number): TinyColor;
|
|
182
|
+
/**
|
|
183
|
+
* Mix the current color a given amount with another color, from 0 to 100.
|
|
184
|
+
* 0 means no mixing (return current color).
|
|
185
|
+
*/
|
|
186
|
+
mix(color: ColorInput, amount?: number): TinyColor;
|
|
187
|
+
analogous(results?: number, slices?: number): TinyColor[];
|
|
188
|
+
/**
|
|
189
|
+
* taken from https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js
|
|
190
|
+
*/
|
|
191
|
+
complement(): TinyColor;
|
|
192
|
+
monochromatic(results?: number): TinyColor[];
|
|
193
|
+
splitcomplement(): TinyColor[];
|
|
194
|
+
/**
|
|
195
|
+
* Compute how the color would appear on a background
|
|
196
|
+
*/
|
|
197
|
+
onBackground(background: ColorInput): TinyColor;
|
|
198
|
+
/**
|
|
199
|
+
* Alias for `polyad(3)`
|
|
200
|
+
*/
|
|
201
|
+
triad(): TinyColor[];
|
|
202
|
+
/**
|
|
203
|
+
* Alias for `polyad(4)`
|
|
204
|
+
*/
|
|
205
|
+
tetrad(): TinyColor[];
|
|
206
|
+
/**
|
|
207
|
+
* Get polyad colors, like (for 1, 2, 3, 4, 5, 6, 7, 8, etc...)
|
|
208
|
+
* monad, dyad, triad, tetrad, pentad, hexad, heptad, octad, etc...
|
|
209
|
+
*/
|
|
210
|
+
polyad(n: number): TinyColor[];
|
|
211
|
+
/**
|
|
212
|
+
* compare color vs current color
|
|
213
|
+
*/
|
|
214
|
+
equals(color?: ColorInput): boolean;
|
|
215
|
+
}
|
|
216
|
+
export default TinyColor;
|
package/tinycolor/index.js
CHANGED
|
@@ -1,13 +1,272 @@
|
|
|
1
|
-
/* 潘启宝 2026-03
|
|
2
|
-
import { bound01 as e, boundAlpha as t, clamp01 as n, convertToPercentage as r, isOnePointZero as i, isPercentage as a, pad2 as o } from "./
|
|
3
|
-
import { cmykToRgb as s, convertDecimalToHex as c, convertHexToDecimal as l, hslToRgb as u, hsvToRgb as d, numberInputToObject as f, parseIntFromHex as p, rgbToCmyk as m, rgbToHex as h, rgbToHsl as g, rgbToHsv as _, rgbToRgb as v, rgbaToArgbHex as y, rgbaToHex as b } from "./
|
|
4
|
-
import { names as x } from "./
|
|
5
|
-
import { inputToRGB as S, isValidCSSUnit as C, stringInputToObject as w } from "./
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
|
+
import { bound01 as e, boundAlpha as t, clamp01 as n, convertToPercentage as r, isOnePointZero as i, isPercentage as a, pad2 as o } from "./utils.js";
|
|
3
|
+
import { cmykToRgb as s, convertDecimalToHex as c, convertHexToDecimal as l, hslToRgb as u, hsvToRgb as d, numberInputToObject as f, parseIntFromHex as p, rgbToCmyk as m, rgbToHex as h, rgbToHsl as g, rgbToHsv as _, rgbToRgb as v, rgbaToArgbHex as y, rgbaToHex as b } from "./conversion.js";
|
|
4
|
+
import { names as x } from "./css-color-names.js";
|
|
5
|
+
import { inputToRGB as S, isValidCSSUnit as C, stringInputToObject as w } from "./format-input.js";
|
|
6
|
+
import { bounds as T, random as E } from "./random.js";
|
|
7
|
+
import { isReadable as D, mostReadable as O, readability as k } from "./readability.js";
|
|
8
|
+
import { toMsFilter as A } from "./to-ms-filter.js";
|
|
9
|
+
import "./public_api.js";
|
|
10
|
+
import { fromRatio as j, legacyRandom as M } from "./from-ratio.js";
|
|
11
|
+
//#region utils/tinycolor/index.ts
|
|
12
|
+
var N = class r {
|
|
13
|
+
constructor(e = "", t = {}) {
|
|
14
|
+
if (e instanceof r) return e;
|
|
15
|
+
typeof e == "number" && (e = f(e)), this.originalInput = e;
|
|
16
|
+
let n = S(e);
|
|
17
|
+
this.originalInput = e, this.r = n.r, this.g = n.g, this.b = n.b, this.a = n.a, this.roundA = Math.round(100 * this.a) / 100, this.format = t.format ?? n.format, this.gradientType = t.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = n.ok;
|
|
18
|
+
}
|
|
19
|
+
get ok() {
|
|
20
|
+
return this.isValid;
|
|
21
|
+
}
|
|
22
|
+
isDark() {
|
|
23
|
+
return this.getBrightness() < 128;
|
|
24
|
+
}
|
|
25
|
+
isLight() {
|
|
26
|
+
return !this.isDark();
|
|
27
|
+
}
|
|
28
|
+
getBrightness() {
|
|
29
|
+
let e = this.toRgb();
|
|
30
|
+
return (e.r * 299 + e.g * 587 + e.b * 114) / 1e3;
|
|
31
|
+
}
|
|
32
|
+
getLuminance() {
|
|
33
|
+
let e = this.toRgb(), t, n, r, i = e.r / 255, a = e.g / 255, o = e.b / 255;
|
|
34
|
+
return t = i <= .03928 ? i / 12.92 : ((i + .055) / 1.055) ** 2.4, n = a <= .03928 ? a / 12.92 : ((a + .055) / 1.055) ** 2.4, r = o <= .03928 ? o / 12.92 : ((o + .055) / 1.055) ** 2.4, .2126 * t + .7152 * n + .0722 * r;
|
|
35
|
+
}
|
|
36
|
+
getAlpha() {
|
|
37
|
+
return this.a;
|
|
38
|
+
}
|
|
39
|
+
setAlpha(e) {
|
|
40
|
+
return this.a = t(e), this.roundA = Math.round(100 * this.a) / 100, this;
|
|
41
|
+
}
|
|
42
|
+
isMonochrome() {
|
|
43
|
+
let { s: e } = this.toHsl();
|
|
44
|
+
return e === 0;
|
|
45
|
+
}
|
|
46
|
+
toHsv() {
|
|
47
|
+
let e = _(this.r, this.g, this.b);
|
|
48
|
+
return {
|
|
49
|
+
h: e.h * 360,
|
|
50
|
+
s: e.s,
|
|
51
|
+
v: e.v,
|
|
52
|
+
a: this.a
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
toHsv_() {
|
|
56
|
+
let e = _(this.r, this.g, this.b);
|
|
57
|
+
return {
|
|
58
|
+
h: e.h,
|
|
59
|
+
s: e.s,
|
|
60
|
+
v: e.v,
|
|
61
|
+
a: this.a
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
toHsvString() {
|
|
65
|
+
let e = _(this.r, this.g, this.b), t = Math.round(e.h * 360), n = Math.round(e.s * 100), r = Math.round(e.v * 100);
|
|
66
|
+
return this.a === 1 ? `hsv(${t}, ${n}%, ${r}%)` : `hsva(${t}, ${n}%, ${r}%, ${this.roundA})`;
|
|
67
|
+
}
|
|
68
|
+
toHsl() {
|
|
69
|
+
let e = g(this.r, this.g, this.b);
|
|
70
|
+
return {
|
|
71
|
+
h: e.h * 360,
|
|
72
|
+
s: e.s,
|
|
73
|
+
l: e.l,
|
|
74
|
+
a: this.a
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
toHslString() {
|
|
78
|
+
let e = g(this.r, this.g, this.b), t = Math.round(e.h * 360), n = Math.round(e.s * 100), r = Math.round(e.l * 100);
|
|
79
|
+
return this.a === 1 ? `hsl(${t}, ${n}%, ${r}%)` : `hsla(${t}, ${n}%, ${r}%, ${this.roundA})`;
|
|
80
|
+
}
|
|
81
|
+
toHex(e = !1) {
|
|
82
|
+
return h(this.r, this.g, this.b, e);
|
|
83
|
+
}
|
|
84
|
+
toHexString(e = !1) {
|
|
85
|
+
return `#${this.toHex(e)}`;
|
|
86
|
+
}
|
|
87
|
+
toHex8(e = !1) {
|
|
88
|
+
return b(this.r, this.g, this.b, this.a, e);
|
|
89
|
+
}
|
|
90
|
+
toHex8String(e = !1) {
|
|
91
|
+
return `#${this.toHex8(e)}`;
|
|
92
|
+
}
|
|
93
|
+
toHexShortString(e = !1) {
|
|
94
|
+
return this.a === 1 ? this.toHexString(e) : this.toHex8String(e);
|
|
95
|
+
}
|
|
96
|
+
toRgb() {
|
|
97
|
+
return {
|
|
98
|
+
r: Math.round(this.r),
|
|
99
|
+
g: Math.round(this.g),
|
|
100
|
+
b: Math.round(this.b),
|
|
101
|
+
a: this.a
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
toRgba() {
|
|
105
|
+
return this.toRgb();
|
|
106
|
+
}
|
|
107
|
+
toRgbArray() {
|
|
108
|
+
let e = this.toRgb();
|
|
109
|
+
return [
|
|
110
|
+
e.r,
|
|
111
|
+
e.g,
|
|
112
|
+
e.b
|
|
113
|
+
];
|
|
114
|
+
}
|
|
115
|
+
toRgbArrayString() {
|
|
116
|
+
let e = this.toRgb();
|
|
117
|
+
return `${e.r},${e.g},${e.b}`;
|
|
118
|
+
}
|
|
119
|
+
toRgbString() {
|
|
120
|
+
let e = Math.round(this.r), t = Math.round(this.g), n = Math.round(this.b);
|
|
121
|
+
return this.a === 1 ? `rgb(${e}, ${t}, ${n})` : `rgba(${e}, ${t}, ${n}, ${this.roundA})`;
|
|
122
|
+
}
|
|
123
|
+
toRgbaString() {
|
|
124
|
+
return `rgba(${Math.round(this.r)}, ${Math.round(this.g)}, ${Math.round(this.b)}, ${this.roundA})`;
|
|
125
|
+
}
|
|
126
|
+
toPercentageRgb() {
|
|
127
|
+
let t = (t) => `${Math.round(e(t, 255) * 100)}%`;
|
|
128
|
+
return {
|
|
129
|
+
r: t(this.r),
|
|
130
|
+
g: t(this.g),
|
|
131
|
+
b: t(this.b),
|
|
132
|
+
a: this.a
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
toPercentageRgbString() {
|
|
136
|
+
let t = (t) => Math.round(e(t, 255) * 100);
|
|
137
|
+
return this.a === 1 ? `rgb(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%)` : `rgba(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%, ${this.roundA})`;
|
|
138
|
+
}
|
|
139
|
+
toCmyk() {
|
|
140
|
+
return { ...m(this.r, this.g, this.b) };
|
|
141
|
+
}
|
|
142
|
+
toCmykString() {
|
|
143
|
+
let { c: e, m: t, y: n, k: r } = m(this.r, this.g, this.b);
|
|
144
|
+
return `cmyk(${e}, ${t}, ${n}, ${r})`;
|
|
145
|
+
}
|
|
146
|
+
toName() {
|
|
147
|
+
if (this.a === 0) return "transparent";
|
|
148
|
+
if (this.a < 1) return !1;
|
|
149
|
+
let e = `#${h(this.r, this.g, this.b, !1)}`;
|
|
150
|
+
for (let [t, n] of Object.entries(x)) if (e === n) return t;
|
|
151
|
+
return !1;
|
|
152
|
+
}
|
|
153
|
+
toString(e) {
|
|
154
|
+
let t = !!e;
|
|
155
|
+
e ??= this.format;
|
|
156
|
+
let n = !1, r = this.a < 1 && this.a >= 0;
|
|
157
|
+
return !t && r && (e.startsWith("hex") || e === "name") ? e === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (e === "rgb" && (n = this.toRgbString()), e === "prgb" && (n = this.toPercentageRgbString()), (e === "hex" || e === "hex6") && (n = this.toHexString()), e === "hex3" && (n = this.toHexString(!0)), e === "hex4" && (n = this.toHex8String(!0)), e === "hex8" && (n = this.toHex8String()), e === "name" && (n = this.toName()), e === "hsl" && (n = this.toHslString()), e === "hsv" && (n = this.toHsvString()), e === "cmyk" && (n = this.toCmykString()), n || this.toHexString());
|
|
158
|
+
}
|
|
159
|
+
toNumber() {
|
|
160
|
+
return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
|
|
161
|
+
}
|
|
162
|
+
clone() {
|
|
163
|
+
return new r(this.toString());
|
|
164
|
+
}
|
|
165
|
+
lighten(e = 10) {
|
|
166
|
+
let t = this.toHsl();
|
|
167
|
+
return t.l += e / 100, t.l = n(t.l), new r(t);
|
|
168
|
+
}
|
|
169
|
+
brighten(e = 10) {
|
|
170
|
+
let t = this.toRgb();
|
|
171
|
+
return t.r = Math.max(0, Math.min(255, t.r - Math.round(255 * -(e / 100)))), t.g = Math.max(0, Math.min(255, t.g - Math.round(255 * -(e / 100)))), t.b = Math.max(0, Math.min(255, t.b - Math.round(255 * -(e / 100)))), new r(t);
|
|
172
|
+
}
|
|
173
|
+
darken(e = 10) {
|
|
174
|
+
let t = this.toHsl();
|
|
175
|
+
return t.l -= e / 100, t.l = n(t.l), new r(t);
|
|
176
|
+
}
|
|
177
|
+
tint(e = 10) {
|
|
178
|
+
return this.mix("white", e);
|
|
179
|
+
}
|
|
180
|
+
shade(e = 10) {
|
|
181
|
+
return this.mix("black", e);
|
|
182
|
+
}
|
|
183
|
+
desaturate(e = 10) {
|
|
184
|
+
let t = this.toHsl();
|
|
185
|
+
return t.s -= e / 100, t.s = n(t.s), new r(t);
|
|
186
|
+
}
|
|
187
|
+
saturate(e = 10) {
|
|
188
|
+
let t = this.toHsl();
|
|
189
|
+
return t.s += e / 100, t.s = n(t.s), new r(t);
|
|
190
|
+
}
|
|
191
|
+
greyscale() {
|
|
192
|
+
return this.desaturate(100);
|
|
193
|
+
}
|
|
194
|
+
spin(e) {
|
|
195
|
+
let t = this.toHsl(), n = (t.h + e) % 360;
|
|
196
|
+
return t.h = n < 0 ? 360 + n : n, new r(t);
|
|
197
|
+
}
|
|
198
|
+
mix(e, t = 50) {
|
|
199
|
+
let n = this.toRgb(), i = new r(e).toRgb(), a = t / 100;
|
|
200
|
+
return new r({
|
|
201
|
+
r: (i.r - n.r) * a + n.r,
|
|
202
|
+
g: (i.g - n.g) * a + n.g,
|
|
203
|
+
b: (i.b - n.b) * a + n.b,
|
|
204
|
+
a: (i.a - n.a) * a + n.a
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
analogous(e = 6, t = 30) {
|
|
208
|
+
let n = this.toHsl(), i = 360 / t, a = [this];
|
|
209
|
+
for (n.h = (n.h - (i * e >> 1) + 720) % 360; --e;) n.h = (n.h + i) % 360, a.push(new r(n));
|
|
210
|
+
return a;
|
|
211
|
+
}
|
|
212
|
+
complement() {
|
|
213
|
+
let e = this.toHsl();
|
|
214
|
+
return e.h = (e.h + 180) % 360, new r(e);
|
|
215
|
+
}
|
|
216
|
+
monochromatic(e = 6) {
|
|
217
|
+
let t = this.toHsv(), { h: n } = t, { s: i } = t, { v: a } = t, o = [], s = 1 / e;
|
|
218
|
+
for (; e--;) o.push(new r({
|
|
219
|
+
h: n,
|
|
220
|
+
s: i,
|
|
221
|
+
v: a
|
|
222
|
+
})), a = (a + s) % 1;
|
|
223
|
+
return o;
|
|
224
|
+
}
|
|
225
|
+
splitcomplement() {
|
|
226
|
+
let e = this.toHsl(), { h: t } = e;
|
|
227
|
+
return [
|
|
228
|
+
this,
|
|
229
|
+
new r({
|
|
230
|
+
h: (t + 72) % 360,
|
|
231
|
+
s: e.s,
|
|
232
|
+
l: e.l
|
|
233
|
+
}),
|
|
234
|
+
new r({
|
|
235
|
+
h: (t + 216) % 360,
|
|
236
|
+
s: e.s,
|
|
237
|
+
l: e.l
|
|
238
|
+
})
|
|
239
|
+
];
|
|
240
|
+
}
|
|
241
|
+
onBackground(e) {
|
|
242
|
+
let t = this.toRgb(), n = new r(e).toRgb(), i = t.a + n.a * (1 - t.a);
|
|
243
|
+
return new r({
|
|
244
|
+
r: (t.r * t.a + n.r * n.a * (1 - t.a)) / i,
|
|
245
|
+
g: (t.g * t.a + n.g * n.a * (1 - t.a)) / i,
|
|
246
|
+
b: (t.b * t.a + n.b * n.a * (1 - t.a)) / i,
|
|
247
|
+
a: i
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
triad() {
|
|
251
|
+
return this.polyad(3);
|
|
252
|
+
}
|
|
253
|
+
tetrad() {
|
|
254
|
+
return this.polyad(4);
|
|
255
|
+
}
|
|
256
|
+
polyad(e) {
|
|
257
|
+
let t = this.toHsl(), { h: n } = t, i = [this], a = 360 / e;
|
|
258
|
+
for (let o = 1; o < e; o++) i.push(new r({
|
|
259
|
+
h: (n + o * a) % 360,
|
|
260
|
+
s: t.s,
|
|
261
|
+
l: t.l
|
|
262
|
+
}));
|
|
263
|
+
return i;
|
|
264
|
+
}
|
|
265
|
+
equals(e) {
|
|
266
|
+
let t = new r(e);
|
|
267
|
+
return this.format === "cmyk" || t.format === "cmyk" ? this.toCmykString() === t.toCmykString() : this.toRgbString() === t.toRgbString();
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
//#endregion
|
|
271
|
+
export { N as TinyColor, N as default, e as bound01, t as boundAlpha, T as bounds, n as clamp01, s as cmykToRgb, c as convertDecimalToHex, l as convertHexToDecimal, r as convertToPercentage, j as fromRatio, u as hslToRgb, d as hsvToRgb, S as inputToRGB, i as isOnePointZero, a as isPercentage, D as isReadable, C as isValidCSSUnit, M as legacyRandom, O as mostReadable, x as names, f as numberInputToObject, o as pad2, p as parseIntFromHex, E as random, k as readability, m as rgbToCmyk, h as rgbToHex, g as rgbToHsl, _ as rgbToHsv, v as rgbToRgb, y as rgbaToArgbHex, b as rgbaToHex, w as stringInputToObject, A as toMsFilter };
|
|
13
272
|
/* 独立思考,明辨是非 */
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
|
+
import { bound01 as e, boundAlpha as t, clamp01 as n, convertToPercentage as r, isOnePointZero as i, isPercentage as a, pad2 as o } from "./utils.js";
|
|
3
|
+
import { cmykToRgb as s, convertDecimalToHex as c, convertHexToDecimal as l, hslToRgb as u, hsvToRgb as d, numberInputToObject as f, parseIntFromHex as p, rgbToCmyk as m, rgbToHex as h, rgbToHsl as g, rgbToHsv as _, rgbToRgb as v, rgbaToArgbHex as y, rgbaToHex as b } from "./conversion.js";
|
|
4
|
+
import { names as x } from "./css-color-names.js";
|
|
5
|
+
import { inputToRGB as S, isValidCSSUnit as C, stringInputToObject as w } from "./format-input.js";
|
|
6
|
+
import { bounds as T, random as E } from "./random.js";
|
|
7
|
+
import { isReadable as D, mostReadable as O, readability as k } from "./readability.js";
|
|
8
|
+
import { toMsFilter as A } from "./to-ms-filter.js";
|
|
9
|
+
import { TinyColor as j } from "./index.js";
|
|
10
|
+
import { fromRatio as M, legacyRandom as N } from "./from-ratio.js";
|
|
11
|
+
export { j as TinyColor, e as bound01, t as boundAlpha, T as bounds, n as clamp01, s as cmykToRgb, c as convertDecimalToHex, l as convertHexToDecimal, r as convertToPercentage, M as fromRatio, u as hslToRgb, d as hsvToRgb, S as inputToRGB, i as isOnePointZero, a as isPercentage, D as isReadable, C as isValidCSSUnit, N as legacyRandom, O as mostReadable, x as names, f as numberInputToObject, o as pad2, p as parseIntFromHex, E as random, k as readability, m as rgbToCmyk, h as rgbToHex, g as rgbToHsl, _ as rgbToHsv, v as rgbToRgb, y as rgbaToArgbHex, b as rgbaToHex, w as stringInputToObject, A as toMsFilter };
|
|
12
|
+
/* 独立思考,明辨是非 */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* 潘启宝 2026-03
|
|
2
|
-
import { isUndefined as e } from "
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
|
+
import { isUndefined as e } from "../is/index.js";
|
|
3
3
|
import { TinyColor as t } from "./index.js";
|
|
4
|
-
//#region utils/tinycolor/
|
|
4
|
+
//#region utils/tinycolor/random.ts
|
|
5
5
|
function n(o = {}) {
|
|
6
6
|
if (!e(o.count) && o.count !== null) {
|
|
7
7
|
let e = o.count, t = [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* 潘启宝 2026-03
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
2
|
import { TinyColor as e } from "./index.js";
|
|
3
|
-
//#region utils/tinycolor/
|
|
3
|
+
//#region utils/tinycolor/readability.ts
|
|
4
4
|
function t(t, n) {
|
|
5
5
|
let r = new e(t), i = new e(n);
|
|
6
6
|
return (Math.max(r.getLuminance(), i.getLuminance()) + .05) / (Math.min(r.getLuminance(), i.getLuminance()) + .05);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* 潘启宝 2026-03
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
2
|
import { rgbaToArgbHex as e } from "./conversion.js";
|
|
3
3
|
import { TinyColor as t } from "./index.js";
|
|
4
|
-
//#region utils/tinycolor/
|
|
4
|
+
//#region utils/tinycolor/to-ms-filter.ts
|
|
5
5
|
function n(n, r) {
|
|
6
6
|
let i = new t(n), a = `#${e(i.r, i.g, i.b, i.a)}`, o = a, s = i.gradientType ? "GradientType = 1, " : "";
|
|
7
7
|
if (r) {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
|
+
import { names as e } from "./css-color-names.js";
|
|
3
|
+
import { inputToRGB as t, isValidCSSUnit as n, stringInputToObject as r } from "./format-input.js";
|
|
4
|
+
import { random as i } from "./random.js";
|
|
5
|
+
import { mostReadable as a, readability as o } from "./readability.js";
|
|
6
|
+
import { toMsFilter as s } from "./to-ms-filter.js";
|
|
7
|
+
import { TinyColor as c } from "./index.js";
|
|
8
|
+
import { fromRatio as l, legacyRandom as u } from "./from-ratio.js";
|
|
9
|
+
//#region utils/tinycolor/umd_api.ts
|
|
10
|
+
var d = {
|
|
11
|
+
TinyColor: c,
|
|
12
|
+
readability: o,
|
|
13
|
+
mostReadable: a,
|
|
14
|
+
random: i,
|
|
15
|
+
names: e,
|
|
16
|
+
fromRatio: l,
|
|
17
|
+
legacyRandom: u,
|
|
18
|
+
toMsFilter: s,
|
|
19
|
+
inputToRGB: t,
|
|
20
|
+
stringInputToObject: r,
|
|
21
|
+
isValidCSSUnit: n
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { d as default };
|
|
25
|
+
/* 独立思考,明辨是非 */
|
package/tree/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import searchTree from './searchTree.ts';
|
|
2
|
+
declare function findNodeBy(root: any, key: any, value: any, childrenKey?: string): any;
|
|
3
|
+
declare function getItemBy(root: any, key: any, value: any, childrenKey?: string, strict?: boolean): any;
|
|
4
|
+
declare function getItemByID(root: any, value: any): any;
|
|
5
|
+
declare function getLabelFromDictionaryByValue(a: any, value: any, fallback?: boolean): any;
|
|
6
|
+
declare function getChildWithParentBy(root: any, key: any, value: any, childrenKey?: string): null | undefined;
|
|
7
|
+
export { findNodeBy, getChildWithParentBy, getItemBy, getItemByID, getLabelFromDictionaryByValue, searchTree, };
|
|
1
8
|
export default searchTree;
|
|
2
|
-
export function findNodeBy(root: any, key: any, value: any, childrenKey?: string): any;
|
|
3
|
-
export function getChildWithParentBy(root: any, key: any, value: any, childrenKey?: string): null | undefined;
|
|
4
|
-
export function getItemBy(root: any, key: any, value: any, childrenKey?: string, strict?: boolean): any;
|
|
5
|
-
export function getItemByID(root: any, value: any): any;
|
|
6
|
-
export function getLabelFromDictionaryByValue(a: any, value: any, fallback?: boolean): any;
|
|
7
|
-
import searchTree from './search';
|
|
8
|
-
export { searchTree };
|
package/tree/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* 潘启宝 2026-03
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
2
|
import { isArray as e, isObject as t, isUndefined as n } from "../is/index.js";
|
|
3
|
-
import r from "./
|
|
3
|
+
import r from "./searchTree.js";
|
|
4
4
|
import i from "lodash/castArray.js";
|
|
5
|
-
//#region utils/tree/index.
|
|
5
|
+
//#region utils/tree/index.ts
|
|
6
6
|
function a(n, r, i, o = "children") {
|
|
7
7
|
if (e(n) && (n = { [o]: n }), !(n && t(n))) return null;
|
|
8
8
|
if (r in n && n[r] === i) return n;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* 潘启宝 2026-03
|
|
2
|
-
import { isArray as e, isFunction as t, isNil as n, isNumber as r, isObjectLike as i, isRegExp as a, isString as o } from "
|
|
3
|
-
//#region utils/tree/
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
|
+
import { isArray as e, isFunction as t, isNil as n, isNumber as r, isObjectLike as i, isRegExp as a, isString as o } from "../is/index.js";
|
|
3
|
+
//#region utils/tree/searchTree.ts
|
|
4
4
|
function s(e, t, n, r) {
|
|
5
5
|
return t && e ? {
|
|
6
6
|
shouldExit: !0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* 潘启宝 2026-03
|
|
2
|
-
import { __exportAll as e } from "
|
|
3
|
-
//#region utils/tween/
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
|
+
import { __exportAll as e } from "../.virtual/_rolldown/runtime.js";
|
|
3
|
+
//#region utils/tween/easing.js
|
|
4
4
|
var t = /* @__PURE__ */ e({
|
|
5
5
|
bounceIn: () => S,
|
|
6
6
|
bounceInOut: () => C,
|
|
@@ -64,5 +64,5 @@ function C(e) {
|
|
|
64
64
|
return e < .5 ? S(e * 2) * .5 : x(e * 2 - 1) * .5 + .5;
|
|
65
65
|
}
|
|
66
66
|
//#endregion
|
|
67
|
-
export { t as easing_exports, a as linear };
|
|
67
|
+
export { S as bounceIn, C as bounceInOut, x as bounceOut, l as cubicIn, d as cubicInOut, u as cubicOut, n as easeInBy, i as easeInOutBy, r as easeOutBy, t as easing_exports, a as linear, o as quadIn, c as quadInOut, s as quadOut, f as quartIn, m as quartInOut, p as quartOut, h as quintIn, _ as quintInOut, g as quintOut, v as sineIn, b as sineInOut, y as sineOut };
|
|
68
68
|
/* 独立思考,明辨是非 */
|
package/tween/index.d.ts
CHANGED
package/tween/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
/* 潘启宝 2026-03
|
|
2
|
-
import { easing_exports as e } from "./
|
|
3
|
-
import t from "./
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/* 潘启宝 2026-04-03 14:06:50 星期五 */
|
|
2
|
+
import { easing_exports as e } from "./easing.js";
|
|
3
|
+
import t from "./tween.js";
|
|
4
|
+
//#region utils/tween/index.js
|
|
5
|
+
var n = t;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { t as Tween, n as default, e as easing };
|
|
6
8
|
/* 独立思考,明辨是非 */
|