inferred-types 0.53.3 → 0.53.5
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/modules/constants/dist/index.cjs +395 -187
- package/modules/constants/dist/index.cjs.map +1 -1
- package/modules/constants/dist/index.js +186 -3
- package/modules/constants/dist/index.js.map +1 -1
- package/modules/inferred-types/dist/index.cjs +1553 -654
- package/modules/inferred-types/dist/index.cjs.map +1 -1
- package/modules/inferred-types/dist/index.d.ts +26 -9
- package/modules/inferred-types/dist/index.js +902 -30
- package/modules/inferred-types/dist/index.js.map +1 -1
- package/modules/runtime/dist/index.cjs +1157 -453
- package/modules/runtime/dist/index.cjs.map +1 -1
- package/modules/runtime/dist/index.d.ts +20 -5
- package/modules/runtime/dist/index.js +705 -28
- package/modules/runtime/dist/index.js.map +1 -1
- package/modules/types/dist/index.cjs +57 -18
- package/modules/types/dist/index.cjs.map +1 -1
- package/modules/types/dist/index.d.ts +6 -4
- package/modules/types/dist/index.js +17 -3
- package/modules/types/dist/index.js.map +1 -1
- package/package.json +2 -6
- package/modules/constants/dist/index.d.mts +0 -4084
- package/modules/inferred-types/dist/index.d.mts +0 -36181
- package/modules/runtime/dist/index.d.mts +0 -14387
- package/modules/types/dist/index.d.mts +0 -17712
|
@@ -6649,8 +6649,8 @@ type CssPseudoClass = CssDisplayStatePseudoClasses | CssFunctionalPseudoClass |
|
|
|
6649
6649
|
*/
|
|
6650
6650
|
type CssPseudoClassDefn<T extends CssPseudoClass = CssPseudoClass> = `${T}(${string})`;
|
|
6651
6651
|
|
|
6652
|
-
type CssIdSelector = `#${
|
|
6653
|
-
type CssClassSelector = `.${
|
|
6652
|
+
type CssIdSelector = `#${AlphaChar}${string}`;
|
|
6653
|
+
type CssClassSelector = `.${AlphaChar}${string}`;
|
|
6654
6654
|
/**
|
|
6655
6655
|
* A CSS Tag Selector.
|
|
6656
6656
|
*
|
|
@@ -9961,7 +9961,9 @@ type TypeDefinition = NarrowableScalar | ShapeCallback;
|
|
|
9961
9961
|
* Note: when dictionary objects are found the _values_ will be
|
|
9962
9962
|
* interrogated for ShapeCallback's.
|
|
9963
9963
|
*/
|
|
9964
|
-
type FromDefn$1<T, TElse = Constant$1<"not-set">> = T extends
|
|
9964
|
+
type FromDefn$1<T, TElse = Constant$1<"not-set">> = T extends DefineObject ? {
|
|
9965
|
+
[K in keyof T]: T[K] extends SimpleToken ? SimpleType<T[K]> : T[K] extends ShapeCallback ? HandleDoneFn<T[K]> : never;
|
|
9966
|
+
} : T extends readonly unknown[] ? IterateOverDefinitions<T, TElse> : ToType$1<T, TElse>;
|
|
9965
9967
|
|
|
9966
9968
|
type WideTokenNames = "string" | "number" | "boolean" | "null" | "undefined" | "never" | "unknown" | "string[]" | "number[]" | "boolean[]" | "unknown[]";
|
|
9967
9969
|
type ConvertWideTokenNames<T extends WideTokenNames> = T extends "string" ? string : T extends "number" ? number : T extends "boolean" ? boolean : T extends "null" ? null : T extends "undefined" ? undefined : T extends "never" ? never : T extends "unknown" ? unknown : T extends "string[]" ? string[] : T extends "number[]" ? number[] : T extends "boolean[]" ? boolean[] : T extends "unknown[]" ? unknown[] : never;
|
|
@@ -10090,7 +10092,7 @@ type RevAcc<TInput extends readonly unknown[], TResults extends readonly unknown
|
|
|
10090
10092
|
First<TInput>,
|
|
10091
10093
|
...TResults
|
|
10092
10094
|
]>;
|
|
10093
|
-
type Reverse<T extends readonly unknown[]
|
|
10095
|
+
type Reverse<T> = T extends readonly unknown[] ? RevAcc<T> : never;
|
|
10094
10096
|
|
|
10095
10097
|
type _Pop<TVal extends Tuple> = TVal extends [...(infer Rest), unknown] ? Rest : never;
|
|
10096
10098
|
/**
|
|
@@ -11285,6 +11287,10 @@ declare function createCssKeyframe<TName extends string, TKeyframes extends CssK
|
|
|
11285
11287
|
css: `@keyframes ${TName} ${FrameToCSS<HandleDoneFn<ReturnType<TKeyframes>>, {}>}`;
|
|
11286
11288
|
};
|
|
11287
11289
|
|
|
11290
|
+
declare function defineCss<T extends CssDefinition>(defn: T): {
|
|
11291
|
+
defn: T;
|
|
11292
|
+
} & (<S extends string>(selector?: S) => string);
|
|
11293
|
+
|
|
11288
11294
|
/**
|
|
11289
11295
|
* **asDate**`(input)`
|
|
11290
11296
|
*
|
|
@@ -11345,6 +11351,15 @@ declare function getYesterday(): Iso8601Date<"explicit">;
|
|
|
11345
11351
|
*/
|
|
11346
11352
|
declare function isLeapYear(val: NumberLike | Record<string, any> | Date | number): boolean;
|
|
11347
11353
|
|
|
11354
|
+
/**
|
|
11355
|
+
* Takes an object definition where the values are either
|
|
11356
|
+
* `SimpleToken` representations of a type or a `ShapeCallback`.
|
|
11357
|
+
*
|
|
11358
|
+
* In both cases the runtime type is left unchanged but the
|
|
11359
|
+
* type is converted to represent the designed object shape.
|
|
11360
|
+
*/
|
|
11361
|
+
declare function defineObject<T extends DefineObject>(defn: T): FromDefn$1<T>;
|
|
11362
|
+
|
|
11348
11363
|
/**
|
|
11349
11364
|
* **entries**
|
|
11350
11365
|
*
|
|
@@ -14384,4 +14399,4 @@ declare function isYouTubeVideosInPlaylist<T>(val: T): val is T & YouTubeVideosI
|
|
|
14384
14399
|
*/
|
|
14385
14400
|
declare function asVueRef<T extends Narrowable>(value: T): VueRef<T>;
|
|
14386
14401
|
|
|
14387
|
-
export { type AsClassSelector, type AsList, type BoxValue, type BoxedFnParams, type CssKeyframeCallback, type CssSelectorOptions, type CsvFormat, type EndingWithTypeGuard, type EqualTo, type Finder, type GetEachOptions, type GetOptions, type Joiner, type KeyframeApi, ShapeApiImplementation, type SingletonClosure, type StartingWithTypeGuard, type StripSurroundConfigured, type SurroundWith, type TypeOfTypeGuard, type Unbox, type UndefinedArrayIsUnknown, type UnionClosure, type UrlMeta, type YouTubeMeta, addFnToProps, addPropsToFn, and, asApi, asArray, asChars, asDate, asEscapeFunction, asIsoDate, asOptionalParamFunction, asPhoneFormat, asRecord, asString, asStringLiteral, asType, asTypeToken, asVueRef, box, boxDictionaryValues, capitalize, choices, createConverter, createCssKeyframe, createCssSelector, createErrorCondition, createFifoQueue, createFnWithProps, createLifoQueue, createTypeToken, cssColor, csv, defineObj, defineTuple, endsWith, ensureLeading, ensureSurround, ensureTrailing, entries, errCondition, filter, find, fnMeta, get, getDaysBetween, getEach, getPhoneCountryCode, getTailwindModifiers, getToday, getTomorrow, getUrlPath, getUrlPort, getUrlProtocol, getUrlQueryParams, getUrlSource, getWeekNumber, getYesterday, getYouTubePageType, handleDoneFn, hasDefaultValue, hasIndexOf, hasKeys, hasUrlPort, hasUrlQueryParameter, hasWhiteSpace, idLiteral, idTypeGuard, identity, ifArray, ifArrayPartial, ifBoolean, ifChar, ifContainer, ifDefined, ifFalse, ifFunction, ifHasKey, ifLength, ifLowercaseChar, ifNotNull, ifNull, ifNumber, ifObject, ifSameType, ifScalar, ifString, ifTrue, ifUndefined, ifUppercaseChar, indexOf, intersect, intersection, ip6GroupExpansion, ip6Prefix, isAccelerationMetric, isAccelerationUom, isAlpha, isAmazonUrl, isApi, isApiSurface, isAppleUrl, isAreaMetric, isAreaUom, isArray, isArrayToken, isAtomicToken, isAustralianNewsUrl, isBelgiumNewsUrl, isBestBuyUrl, isBitbucketUrl, isBoolean, isBooleanLike, isBox, isCanadianNewsUrl, isChineseNewsUrl, isCodeCommitUrl, isConstant, isContainer, isContainerToken, isCostCoUrl, isCountryAbbrev, isCountryCode2, isCountryCode3, isCountryName, isCssAspectRatio, isCurrentMetric, isCurrentUom, isCvsUrl, isDanishNewsUrl, isDate, isDefineObject, isDefined, isDellUrl, isDistanceMetric, isDistanceUom, isDomainName, isDoneFn, isDutchNewsUrl, isEbayUrl, isEmail, isEnergyMetric, isEnergyUom, isEqual, isErrorCondition, isEscapeFunction, isEtsyUrl, isFalse, isFalsy, isFnToken, isFnWithParams, isFrenchNewsUrl, isFrequencyMetric, isFrequencyUom, isFunction, isGeneratorToken, isGermanNewsUrl, isGithubIssueUrl, isGithubIssuesListUrl, isGithubOrgUrl, isGithubProjectUrl, isGithubProjectsListUrl, isGithubReleaseTagUrl, isGithubReleasesListUrl, isGithubRepoReleaseTagUrl, isGithubRepoReleasesUrl, isGithubRepoUrl, isGithubUrl, isHexadecimal, isHmUrl, isHomeDepotUrl, isHtmlElement, isIkeaUrl, isIndexable, isIndianNewsUrl, isInlineSvg, isIp4Address, isIp6Address, isIpAddress, isIso3166Alpha2, isIso3166Alpha3, isIso3166CountryCode, isIso3166CountryName, isIsoDate, isIsoDateTime, isIsoExplicitDate, isIsoExplicitTime, isIsoImplicitDate, isIsoImplicitTime, isIsoTime, isIsoYear, isItalianNewsUrl, isJapaneseNewsUrl, isKrogersUrl, isLeapYear, isLength, isLikeRegExp, isLowesUrl, isLuminosityMetric, isLuminosityUom, isLuxonDateTime, isMacysUrl, isMapToken, isMassMetric, isMassUom, isMetric, isMexicanNewsUrl, isMoment, isNever, isNewsUrl, isNikeUrl, isNorwegianNewsUrl, isNotNull, isNothing, isNull, isNumber, isNumberLike, isNumericArray, isNumericString, isObject, isObjectToken, isOptionalParamFunction, isPhoneNumber, isPowerMetric, isPowerUom, isPressureMetric, isPressureUom, isReadonlyArray, isRecordToken, isRef, isRegExp, isRepoSource, isRepoUrl, isResistance, isResistanceUom, isRetailUrl, isSameTypeOf, isScalar, isSemanticVersion, isSet, isSetToken, isShape, isShapeCallback, isSimpleContainerToken, isSimpleContainerTokenTuple, isSimpleScalarToken, isSimpleScalarTokenTuple, isSimpleToken, isSimpleTokenTuple, isSingletonToken, isSocialMediaProfileUrl, isSocialMediaUrl, isSouthKoreanNewsUrl, isSpanishNewsUrl, isSpecificConstant, isSpeedMetric, isSpeedUom, isString, isStringArray, isSwissNewsUrl, isSymbol, isTailwindColor, isTailwindColorClass, isTailwindColorName, isTailwindColorTarget, isTailwindColorWithLuminosity, isTailwindColorWithLuminosityAndOpacity, isTailwindModifier, isTargetUrl, isTemperatureMetric, isTemperatureUom, isThenable, isThisMonth, isThisWeek, isThisYear, isTimeMetric, isTimeUom, isToday, isTomorrow, isTrimable, isTrue, isTruthy, isTuple, isTupleToken, isTurkishNewsUrl, isTypeOf, isTypeToken, isTypeTuple, isUkNewsUrl, isUndefined, isUnionSetToken, isUnionToken, isUnset, isUom, isUri, isUrl, isUrlPath, isUrlSource, isUsNewsUrl, isUsStateAbbreviation, isUsStateName, isVoltageMetric, isVoltageUom, isVolumeMetric, isVolumeUom, isWalgreensUrl, isWalmartUrl, isWayfairUrl, isWeakMapToken, isWholeFoodsUrl, isYesterday, isYouTubeCreatorUrl, isYouTubeFeedHistoryUrl, isYouTubeFeedUrl, isYouTubePlaylistUrl, isYouTubePlaylistsUrl, isYouTubeShareUrl, isYouTubeSubscriptionsUrl, isYouTubeTrendingUrl, isYouTubeUrl, isYouTubeVideoUrl, isYouTubeVideosInPlaylist, isZaraUrl, isZipCode, isZipCode5, isZipPlus4, joinWith, jsonValue, jsonValues, keysOf, kindLiteral, last, list, literal, logicalReturns, lookupCountryAlpha2, lookupCountryAlpha3, lookupCountryCode, lookupCountryName, lowercase, mergeObjects, mergeScalars, mergeTuples, nameLiteral, narrow, never, omit, optional, optionalOrNull, or, orNull, pathJoin, pluralize, removePhoneCountryCode, removeTailwindModifiers, removeUrlProtocol, result, retain, retainAfter, retainAfterInclusive, retainChars, retainUntil, retainUntilInclusive, retainWhile, reverse, rightWhitespace, shape, sharedKeys, shift, simpleContainerToken, simpleContainerTokenToTypeToken, simpleContainerType, simpleScalarToken, simpleScalarTokenToTypeToken, simpleScalarType, simpleToken, simpleType, simpleUnionTokenToTypeToken, slice, split, startsWith, stripAfter, stripBefore, stripChars, stripLeading, stripParenthesis, stripSurround, stripTrailing, stripUntil, stripWhile, surround, takeNumericCharacters, takeProp, toCamelCase, toKebabCase, toNumber, toNumericArray, toPascalCase, toSnakeCase, toString, toUppercase, trim, trimEnd, trimLeft, trimRight, trimStart, truncate, tuple, twColor, unbox, uncapitalize, union, unionize, unique, uniqueKeys, uppercase, urlMeta, valuesOf, widen, withDefaults, withKeys, withoutKeys, withoutValue, wrapFn, youtubeEmbed, youtubeMeta };
|
|
14402
|
+
export { type AsClassSelector, type AsList, type BoxValue, type BoxedFnParams, type CssKeyframeCallback, type CssSelectorOptions, type CsvFormat, type EndingWithTypeGuard, type EqualTo, type Finder, type GetEachOptions, type GetOptions, type Joiner, type KeyframeApi, ShapeApiImplementation, type SingletonClosure, type StartingWithTypeGuard, type StripSurroundConfigured, type SurroundWith, type TypeOfTypeGuard, type Unbox, type UndefinedArrayIsUnknown, type UnionClosure, type UrlMeta, type YouTubeMeta, addFnToProps, addPropsToFn, and, asApi, asArray, asChars, asDate, asEscapeFunction, asIsoDate, asOptionalParamFunction, asPhoneFormat, asRecord, asString, asStringLiteral, asType, asTypeToken, asVueRef, box, boxDictionaryValues, capitalize, choices, createConverter, createCssKeyframe, createCssSelector, createErrorCondition, createFifoQueue, createFnWithProps, createLifoQueue, createTypeToken, cssColor, csv, defineCss, defineObj, defineObject, defineTuple, endsWith, ensureLeading, ensureSurround, ensureTrailing, entries, errCondition, filter, find, fnMeta, get, getDaysBetween, getEach, getPhoneCountryCode, getTailwindModifiers, getToday, getTomorrow, getUrlPath, getUrlPort, getUrlProtocol, getUrlQueryParams, getUrlSource, getWeekNumber, getYesterday, getYouTubePageType, handleDoneFn, hasDefaultValue, hasIndexOf, hasKeys, hasUrlPort, hasUrlQueryParameter, hasWhiteSpace, idLiteral, idTypeGuard, identity, ifArray, ifArrayPartial, ifBoolean, ifChar, ifContainer, ifDefined, ifFalse, ifFunction, ifHasKey, ifLength, ifLowercaseChar, ifNotNull, ifNull, ifNumber, ifObject, ifSameType, ifScalar, ifString, ifTrue, ifUndefined, ifUppercaseChar, indexOf, intersect, intersection, ip6GroupExpansion, ip6Prefix, isAccelerationMetric, isAccelerationUom, isAlpha, isAmazonUrl, isApi, isApiSurface, isAppleUrl, isAreaMetric, isAreaUom, isArray, isArrayToken, isAtomicToken, isAustralianNewsUrl, isBelgiumNewsUrl, isBestBuyUrl, isBitbucketUrl, isBoolean, isBooleanLike, isBox, isCanadianNewsUrl, isChineseNewsUrl, isCodeCommitUrl, isConstant, isContainer, isContainerToken, isCostCoUrl, isCountryAbbrev, isCountryCode2, isCountryCode3, isCountryName, isCssAspectRatio, isCurrentMetric, isCurrentUom, isCvsUrl, isDanishNewsUrl, isDate, isDefineObject, isDefined, isDellUrl, isDistanceMetric, isDistanceUom, isDomainName, isDoneFn, isDutchNewsUrl, isEbayUrl, isEmail, isEnergyMetric, isEnergyUom, isEqual, isErrorCondition, isEscapeFunction, isEtsyUrl, isFalse, isFalsy, isFnToken, isFnWithParams, isFrenchNewsUrl, isFrequencyMetric, isFrequencyUom, isFunction, isGeneratorToken, isGermanNewsUrl, isGithubIssueUrl, isGithubIssuesListUrl, isGithubOrgUrl, isGithubProjectUrl, isGithubProjectsListUrl, isGithubReleaseTagUrl, isGithubReleasesListUrl, isGithubRepoReleaseTagUrl, isGithubRepoReleasesUrl, isGithubRepoUrl, isGithubUrl, isHexadecimal, isHmUrl, isHomeDepotUrl, isHtmlElement, isIkeaUrl, isIndexable, isIndianNewsUrl, isInlineSvg, isIp4Address, isIp6Address, isIpAddress, isIso3166Alpha2, isIso3166Alpha3, isIso3166CountryCode, isIso3166CountryName, isIsoDate, isIsoDateTime, isIsoExplicitDate, isIsoExplicitTime, isIsoImplicitDate, isIsoImplicitTime, isIsoTime, isIsoYear, isItalianNewsUrl, isJapaneseNewsUrl, isKrogersUrl, isLeapYear, isLength, isLikeRegExp, isLowesUrl, isLuminosityMetric, isLuminosityUom, isLuxonDateTime, isMacysUrl, isMapToken, isMassMetric, isMassUom, isMetric, isMexicanNewsUrl, isMoment, isNever, isNewsUrl, isNikeUrl, isNorwegianNewsUrl, isNotNull, isNothing, isNull, isNumber, isNumberLike, isNumericArray, isNumericString, isObject, isObjectToken, isOptionalParamFunction, isPhoneNumber, isPowerMetric, isPowerUom, isPressureMetric, isPressureUom, isReadonlyArray, isRecordToken, isRef, isRegExp, isRepoSource, isRepoUrl, isResistance, isResistanceUom, isRetailUrl, isSameTypeOf, isScalar, isSemanticVersion, isSet, isSetToken, isShape, isShapeCallback, isSimpleContainerToken, isSimpleContainerTokenTuple, isSimpleScalarToken, isSimpleScalarTokenTuple, isSimpleToken, isSimpleTokenTuple, isSingletonToken, isSocialMediaProfileUrl, isSocialMediaUrl, isSouthKoreanNewsUrl, isSpanishNewsUrl, isSpecificConstant, isSpeedMetric, isSpeedUom, isString, isStringArray, isSwissNewsUrl, isSymbol, isTailwindColor, isTailwindColorClass, isTailwindColorName, isTailwindColorTarget, isTailwindColorWithLuminosity, isTailwindColorWithLuminosityAndOpacity, isTailwindModifier, isTargetUrl, isTemperatureMetric, isTemperatureUom, isThenable, isThisMonth, isThisWeek, isThisYear, isTimeMetric, isTimeUom, isToday, isTomorrow, isTrimable, isTrue, isTruthy, isTuple, isTupleToken, isTurkishNewsUrl, isTypeOf, isTypeToken, isTypeTuple, isUkNewsUrl, isUndefined, isUnionSetToken, isUnionToken, isUnset, isUom, isUri, isUrl, isUrlPath, isUrlSource, isUsNewsUrl, isUsStateAbbreviation, isUsStateName, isVoltageMetric, isVoltageUom, isVolumeMetric, isVolumeUom, isWalgreensUrl, isWalmartUrl, isWayfairUrl, isWeakMapToken, isWholeFoodsUrl, isYesterday, isYouTubeCreatorUrl, isYouTubeFeedHistoryUrl, isYouTubeFeedUrl, isYouTubePlaylistUrl, isYouTubePlaylistsUrl, isYouTubeShareUrl, isYouTubeSubscriptionsUrl, isYouTubeTrendingUrl, isYouTubeUrl, isYouTubeVideoUrl, isYouTubeVideosInPlaylist, isZaraUrl, isZipCode, isZipCode5, isZipPlus4, joinWith, jsonValue, jsonValues, keysOf, kindLiteral, last, list, literal, logicalReturns, lookupCountryAlpha2, lookupCountryAlpha3, lookupCountryCode, lookupCountryName, lowercase, mergeObjects, mergeScalars, mergeTuples, nameLiteral, narrow, never, omit, optional, optionalOrNull, or, orNull, pathJoin, pluralize, removePhoneCountryCode, removeTailwindModifiers, removeUrlProtocol, result, retain, retainAfter, retainAfterInclusive, retainChars, retainUntil, retainUntilInclusive, retainWhile, reverse, rightWhitespace, shape, sharedKeys, shift, simpleContainerToken, simpleContainerTokenToTypeToken, simpleContainerType, simpleScalarToken, simpleScalarTokenToTypeToken, simpleScalarType, simpleToken, simpleType, simpleUnionTokenToTypeToken, slice, split, startsWith, stripAfter, stripBefore, stripChars, stripLeading, stripParenthesis, stripSurround, stripTrailing, stripUntil, stripWhile, surround, takeNumericCharacters, takeProp, toCamelCase, toKebabCase, toNumber, toNumericArray, toPascalCase, toSnakeCase, toString, toUppercase, trim, trimEnd, trimLeft, trimRight, trimStart, truncate, tuple, twColor, unbox, uncapitalize, union, unionize, unique, uniqueKeys, uppercase, urlMeta, valuesOf, widen, withDefaults, withKeys, withoutKeys, withoutValue, wrapFn, youtubeEmbed, youtubeMeta };
|