@ui0/util 0.0.0-stage → 0.0.1
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/dist/index.d.ts +771 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2164 -0
- package/dist/index.js.map +1 -0
- package/package.json +33 -4
- package/README.md +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/array/array.ts","../src/object/objectPickKeys.ts","../src/object/objectOmitKeys.ts","../src/primitives.ts","../src/object/isObject.ts","../src/object/objectMerge.ts","../src/string/string.ts","../src/vue/findFrameworkInstance.ts","../src/vue/mergeCssModulesStyles.ts","../src/number/number.ts","../src/css/parseCssTime.ts","../src/css/toUnits.ts","../src/css/tryToUnits.ts","../src/css/objectToCss.ts","../src/css/parseUnits.ts","../src/console.ts","../src/hash.ts","../src/color/hexToRgb.ts","../src/color/parseRgbString.ts","../src/color/namedColors.ts","../src/color/isLiteralColor.ts","../src/color/toRgb.ts","../src/color/rgbToHsl.ts","../src/color/hslToRgb.ts","../src/color/withLightnessHsl.ts","../src/color/lightnessOfHsl.ts","../src/color/srgbToLinear.ts","../src/color/linearToSrgb.ts","../src/color/linearRgbToOklab.ts","../src/color/oklabToLinearRgb.ts","../src/color/rgbToOklch.ts","../src/color/oklchToRgb.ts","../src/color/withLightnessOklch.ts","../src/color/lightnessOfOklch.ts","../src/color/spaces.ts","../src/color/lighten.ts","../src/color/darken.ts","../src/color/blend.ts","../src/props/castAnyPropToBoolean.ts","../src/props/namesToClassNames.ts","../src/props/propValueToClass.ts","../src/props/propValueToClasses.ts","../src/props/propsToCssModuleClass.ts","../src/props/propsToCssModuleClassNext.ts","../src/browser-check.ts","../src/container/record-container.ts","../src/dom/getClientHeight.ts","../src/dom/getClientWidth.ts"],"sourcesContent":["/**\n * Omit values from arr based on values list and return new array with this values\n * @param {T[]} arr\n * @param {T[]} omitted\n * @return {T[]}\n */\nexport function arrayOmit<T, U extends T>(\n arr: readonly T[] | null | undefined,\n omitted?: U[] | null\n): OmitValues<T, U>[] {\n const _omitted = omitted || []\n const copy = arr ? [...arr] : []\n const out = copy || []\n\n _omitted.forEach((o) => {\n const pos = copy.indexOf(o)\n if (pos > -1) copy.splice(pos, 1)\n })\n\n return out as OmitValues<T, U>[]\n}\ntype OmitValues<T, U> = T extends U ? never : T\n\n/**\n * Omit values from arr based on values list\n * Mutable version of arrayOmit\n * @param {T[]} arr\n * @param {T[]} omitted\n\n */\nexport function arrayOmitArray<T>(arr: readonly T[] = [], omitted: T[]): void {\n const _omitted = omitted || []\n const copy = [...arr]\n _omitted.forEach((o) => {\n const pos = copy.indexOf(o)\n if (pos > -1) copy.splice(pos, 1)\n })\n}\n\n/**\n * Make this array items unique\n * [1,2,3,3,2,5] => [1,2,3,5]\n * @param {T[]} arr\n * @return {T[]}\n */\nexport function toUnique<T>(arr: T[]) {\n const out = new Set(arr)\n return [...out]\n}\n\n/**\n * Return the last element of an array.\n *\n * @param arr - the array to read\n * @returns the last item, or `undefined` for an empty array\n */\nexport function getLastItemFromArray<T = unknown>(arr: T[]) {\n return arr[arr.length - 1]\n}\n\n/**\n * Pick element with offset from item's position in arr\n * Next item - +1\n * Prev item - -1\n * returns same item if not found\n * @param {T[]} arr\n * @param {T} item\n * @param {number} offset\n * @return {T}\n */\nexport function arrayPickFromItemOffset<T>(\n arr: T[],\n item: T,\n offset: number\n): T {\n if (arr.length < 2) return item\n if (offset < 0 && arr[0] === item) return item\n if (offset > 0 && arr[arr.length - offset] === item) return item\n\n for (let i = 1; i < arr.length; i++) {\n if (arr[i] === item) {\n return arr[i + offset]\n }\n }\n return item\n}\n\n/**\n * Pick the element `offset` positions after `item`.\n *\n * Thin wrapper over {@link arrayPickFromItemOffset} with a positive offset;\n * out-of-range offsets and unknown items return `item` itself.\n *\n * @param arr - the array to walk\n * @param item - the anchor element\n * @param offset - how many positions to move forward, defaults to `1`\n * @returns the neighbor element, or `item`\n */\nexport function arrayPickNext<T>(arr: T[], item: T, offset: number = 1) {\n return arrayPickFromItemOffset(arr, item, offset)\n}\n\n/**\n * Pick the element `offset` positions before `item`.\n *\n * Thin wrapper over {@link arrayPickFromItemOffset} with a negative offset;\n * out-of-range offsets and unknown items return `item` itself.\n *\n * @param arr - the array to walk\n * @param item - the anchor element\n * @param offset - how many positions to move back, defaults to `1`\n * @returns the neighbor element, or `item`\n */\nexport function arrayPickPrev<T>(arr: T[], item: T, offset: number = 1) {\n return arrayPickFromItemOffset(arr, item, -offset)\n}\n\n/**\n * get item from array when iterating over length\n * getItemByOverflowIndex([0,1,2,3], 8) // => 1 ([0,1,2,3], 6) => 3\n *\n * @param {T[]} arr\n * @param {number} index\n * @param offset takes inc/dec by offset value,\n * @default 1\n * @return {T}\n */\nexport function getItemByOverflowIndex<T = unknown>(\n arr: T[],\n index: number,\n offset: number = 1\n) {\n // console.log('getItemByOverflowIndex arr', arr)\n if (index > arr.length - offset) return arr[index % arr.length]\n // if (value < 0) return arr[( arr.length-value) % arr.length]\n return arr[Math.abs(index)]\n}\n\n/**\n * Coerce every element of an array to a number.\n *\n * Nullish entries become `0`; non-numeric strings coerce to `NaN`.\n *\n * @param arr - the source array\n * @returns a parallel array of numbers\n */\nexport function arrayToNumberArray(arr: Array<any>): Array<number> {\n return arr.reduce(\n (prev, next) => [...prev, +(next ?? 0)],\n [] as Array<number>\n )\n}\n\n/**\n * Compare two arrays item by item, recursing into nested arrays.\n *\n * @param a - the first array\n * @param b - the second array\n * @returns `true` when the lengths match and every pair is `===` (nested\n * arrays compared recursively)\n */\nexport function arrayIsEqual<T>(a: T[], b: T[]): boolean {\n if (a === b) return true\n if (a.length !== b.length) return false\n\n return a.every((item, index) => {\n const other = b[index]\n return Array.isArray(item) && Array.isArray(other)\n ? arrayIsEqual(item, other)\n : item === other\n })\n}\n\n/**\n * insert `items` to array at specific `index`\n * delete `deleteCount` items from `index`\n * @param arr\n * @param index\n * @param items\n * @param deleteCount\n */\nexport function arrayInsertAtIndex<T>(\n arr: T[],\n index: number,\n items: T[],\n deleteCount: number = 0\n): void {\n const safeIndex = Math.max(0, Math.min(index, arr.length))\n arr.splice(safeIndex, deleteCount, ...items)\n}\n\n/**\n * Type guard: value is an array.\n *\n * @param value - the value to check\n * @returns `true` when `value` is an array\n */\nexport function isArray<T>(value: unknown): value is T[] {\n return Array.isArray(value)\n}\n","/**\n * Pick keys from object to new object with key-value\n *\n * @param {T} obj\n * @param keys\n * @example objectPickKeys({key1: true, key2: 0, key3: 'str'}, 'key2', 'key3') // {key2: 0, key3: 'str'}\n * @return {{[P in keyof T]?: any}}\n */\nexport function objectPickKeys<\n T extends Record<string, any>,\n P extends keyof T\n>(obj: T, ...keys: P[]): Pick<T, P> {\n return keys.reduce(\n (acc, key) => {\n if (obj.hasOwnProperty(key)) {\n acc[key] = obj[key]\n }\n return acc\n },\n {} as { [K in P]: T[K] }\n )\n}\n","/**\n * Opposite to objectPickKeys\n * Return new object without selected keys\n * @param {T} obj\n * @param {P} args\n * @example objectOmitKeys({key1: true, key2: 0, key3: 'str'}, 'key2', 'key3') // {key1: true}\n * @return {{[P in keyof T]?: any}}\n */\nexport function objectOmitKeys<\n T extends Record<string | symbol | number, any>,\n P extends keyof T\n>(obj: T, ...args: P[]): Omit<T, P> {\n const out: T = Object.assign({}, obj)\n args.forEach((arg) => {\n delete out[arg]\n })\n return out\n}\n","/**\n * Replace `undefined` with `false`, keeping any other value as-is.\n *\n * @param x - the value to guard\n * @returns `x`, or `false` when `x` is `undefined`\n */\nexport function notUndefined(x: unknown) {\n return x !== undefined ? x : false\n}\n\n/**\n * Type guard: value is a function (anything callable).\n *\n * @param fn - the value to check\n * @returns `true` when `fn` is callable\n */\nexport const isFunction = (fn: unknown): fn is Function =>\n typeof fn === 'function'\n\n/**\n * Type guard: value is a symbol.\n *\n * @param s - the value to check\n * @returns `true` when `s` is a symbol\n */\nexport const isSymbol = (s: unknown): s is symbol => typeof s === 'symbol'\n","/**\n * Type guard: value is an object (not `null`, not an array).\n *\n * @param v - the value to check\n * @returns `true` for non-null, non-array objects\n */\nexport function isObject(v: any): v is Record<string, any> {\n return typeof v === 'object' && v !== null && !Array.isArray(v)\n}\n","import { isFunction } from '../primitives'\nimport { isObject } from './isObject'\n\n/**\n * Objects customizable deep merging\n * @param {Record<string, any>} to\n * @param {Record<string, any>} from\n * @param {{replaceNonObjectIfObject: boolean}} options\n * @return {Record<string, any>}\n */\nexport function objectMerge<T, Y>(\n to: T,\n from: Y,\n options: {\n replaceNonObjectIfObject?: boolean\n /**\n * Merge all functions into single function\n * @default false\n */\n mergeFunctions?: boolean\n overwrite?: boolean\n } = {}\n): T & Y {\n const result: any = { ...to }\n const {\n overwrite = true,\n replaceNonObjectIfObject = false,\n mergeFunctions = false\n } = options\n\n if (!isObject(to) || !isObject(from)) {\n return overwrite ? { ...result, ...from } : result\n }\n\n for (const key in from) {\n if (key in to) {\n if (mergeFunctions && isFunction(from[key])) {\n result[key] = isFunction(to[key])\n ? (...arg: any) => {\n to[key](...arg)\n return from[key](...arg)\n }\n : overwrite\n ? from[key]\n : to[key]\n } else if (isObject(from[key]) && isObject(to[key])) {\n result[key] = objectMerge(to[key], from[key], options)\n } else if (replaceNonObjectIfObject && isObject(from[key])) {\n result[key] = from[key]\n } else {\n result[key] = overwrite ? from[key] : to[key]\n }\n } else {\n result[key] = from[key]\n }\n }\n\n return result as T & Y\n}\n","const hyphenateExpr = /\\B([A-Z])/g\n\n/**\n * Convert CaseWordAAA to 'case-word-a-a-a'\n * @param {string} str\n * @return {string}\n */\nexport function hyphenate(str: string): string {\n return str.replace(hyphenateExpr, '-$1').toLowerCase()\n}\n\n/**\n * Converts `is-name` to 'isName'\n * @param s\n */\nexport function toCamelCase(s = '') {\n return s.replace(/-./g, (x) => x[1].toUpperCase())\n}\n\n/**\n * Converts string to kebab-case (including spaces).\n * @example\n * toKebabCase('Hello World') => 'hello-world'\n * toKebabCase('camelCase') => 'camel-case'\n */\nexport function toKebabCase(str: string): string {\n return str\n .replace(/([a-z])([A-Z])/g, '$1-$2')\n .replace(/[\\s_]+/g, '-')\n .toLowerCase()\n .replace(/^-+|-+$/g, '')\n}\n\n/**\n * Convert a kebab-case string to PascalCase (`'is-name'` → `'IsName'`).\n *\n * @param s - the kebab-case input\n * @returns the PascalCase string\n */\nexport function toPascalCase(s: string = ''): string {\n const r = s.replace(/-./g, (x) => x[1].toUpperCase())\n return r ? r[0].toUpperCase() + r.substring(1) : r\n}\n\n/**\n * Kebab-case a string, collapsing uppercase runs as whole words.\n *\n * Unlike {@link toKebabCase} (which only splits on lower→upper edges),\n * consecutive capitals collapse together: `'FOOBar'` → `'foo-bar'`,\n * `'XMLHttpRequest'` → `'xml-http-request'`.\n *\n * @param str - the string to kebab-case\n * @returns the kebab-cased string\n */\nexport function kebabize(str: string) {\n return str.replace(\n /[A-Z]+(?![a-z])|[A-Z]/g,\n (s, ofs) => (ofs ? '-' : '') + s.toLowerCase()\n )\n}\n\n/**\n * Remove vowels form word\n * @param {string} str\n * @example removeVowels('hello world') // hll wrld\n * @return {string}\n */\nexport function removeVowels(str: string) {\n return str.replace(/[aoeyui]/g, '')\n}\n\n/**\n * returns filename from a path\n * @param {string} name\n * @example extractFileName('/some/path/to/file.txt') // file.txt\n * @return {string | undefined}\n */\nexport function extractFileName(name: string) {\n return name.split(/(\\\\|\\/)/g).pop()\n}\n\n/**\n * Return the directory part of a path — everything before the file name.\n *\n * @param file - the path to split\n * @returns the trailing-slash directory, or `''` when the path has none\n */\nexport function extractFileDir(file: string) {\n return file.replace(extractFileName(file) || '', '')\n}\n\n/**\n * process pack/icon?value=123 to {params: {value: 123}, res: ['pack', 'icon']}\n * @param query\n */\nexport function parseQueryString(query: string): {\n params: Record<string, boolean | string | number | string[]>\n res: string[]\n} {\n if (!query) {\n return {\n params: {},\n res: ['']\n }\n }\n const paramsOut: Record<string, boolean | string | string[] | number> = {}\n const [res, params] = query.split('?')\n const resources = res.split('/').toReversed()\n\n if (params) {\n const paramsArray = params.split('&')\n paramsArray.forEach((item) => {\n const [param, value] = item.split('=')\n paramsOut[param] = value\n\n if (value === undefined) {\n paramsOut[param] = true\n } else if (value.indexOf(',') > 1) {\n paramsOut[param] = value.split(',')\n }\n\n if (value === 'false') {\n paramsOut[param] = false\n } else if (!isNaN(+value)) {\n paramsOut[param] = +value\n }\n })\n }\n return {\n params: paramsOut,\n res: resources\n }\n}\n\n/**\n * convert 'some content here' to 'sch'\n * @param {string} str\n * @return {string}\n */\nexport function stringToFirstLetters(str: string) {\n return str\n .split(' ')\n .reduce((x, i) => (x ? x + ((i.length && i[0]) || '') : i[0]), '')\n}\n\n/**\n * Generate random string (a-z 0-9) with specific len\n *\n * @param {number} len 6 by default\n * @default 6\n * @return {string}\n */\nexport function genRandomString(len: number = 6) {\n let out = ''\n while (out.length < len) {\n out += Math.random().toString(36).replace('0.', '')\n }\n return out.substring(0, len)\n}\n\n/**\n * Typed String.split() wrapper\n * @param input\n * @param separator\n */\nexport function splitString<U extends string, Y extends string = ','>(\n input: `${U}${'' | `${Y}${U}`}` | U[],\n separator: RegExp | string\n): U[] {\n if (Array.isArray(input)) {\n return input\n }\n return input.split(separator).map((item) => item.trim()) as U[]\n}\n\n/**\n * typeof guard\n */\nexport function isString(v?: unknown): v is string {\n return typeof v === 'string'\n}\n","import type { Ui0Core } from '@ui0/types'\nimport type { App, AppContext } from 'vue'\n\n/**\n * retrieve instance of a any framework plugin from vue instance if exists\n * @param app\n * @param name\n */\nexport function findFrameworkInstance<T = Ui0Core>(app: App | AppContext, name: string): T | undefined {\n if (name in app.config.globalProperties) {\n const instance = app.config.globalProperties[name] as Ui0Core | undefined\n if (instance) return instance as T\n }\n return undefined\n}\n","import type { CSSModuleClassList } from '@ui0/types'\n\n/**\n * Merge two CSS-module class maps, the second winning on key conflicts.\n *\n * Mirrors how a component's own local `$style` overrides the class map\n * shipped by a contract.\n *\n * @param $from - the base map (e.g. the contract's shipped classes)\n * @param $to - the overriding map (e.g. the component's local `$style`)\n * @returns the merged class map\n */\nexport function mergeCssModulesStyles(\n $from: CSSModuleClassList = {},\n $to: CSSModuleClassList = {}\n) {\n return { ...$from, ...$to }\n}\n","import type { Numberish } from '@ui0/types'\n\n/**\n * Floor the mantissa of a number's scientific notation after shifting its\n * exponent by `-exp`, then shift the exponent back.\n *\n * Operates on the printed `toString()` digits rather than on decimal\n * places: `decimalAdjust(0, 2.7)` → `2`, `decimalAdjust(2, 123.456)` →\n * `100`. A non-integer `exp` or a non-numeric `value` yields `NaN`.\n *\n * @param exp - the decimal exponent shift (integer)\n * @param value - the number to adjust\n * @returns the adjusted number\n */\nexport function decimalAdjust(exp: number, value: number) {\n value = Number(value)\n if (exp % 1 !== 0 || Number.isNaN(value)) return NaN\n else if (exp === 0) return Math.floor(value)\n const [magnitude, exponent = 0] = value.toString().split('e')\n const adjustedValue = Math.floor(+`${magnitude}e${+exponent - exp}`)\n const [newMagnitude, newExponent = 0] = adjustedValue.toString().split('e')\n return Number(`${newMagnitude}e${+newExponent + exp}`)\n}\n\n/**\n * Extract the exponent of a number's scientific-notation form.\n *\n * `123.456` → `2` (`1.23456e+2`), `0.00123` → `-3` (`1.23e-3`).\n *\n * @param num - the number to inspect\n * @returns the decimal exponent as a signed number\n */\nexport function exponentialToNumber(num: number) {\n const x = (+num).toExponential()\n const minus = x.split('e-')\n const plus = x.split('e+')\n if (minus[1] !== undefined) return -minus[1]\n if (plus[1] !== undefined) return +plus[1]\n return 0\n}\n\n/**\n * Tell floats from integers.\n *\n * @param n - the number to check\n * @returns `true` when `n` has a non-zero fractional part\n */\nexport function isFloat(n: number) {\n return n % 1 !== 0\n}\n\n/**\n * Count the digits after the decimal point.\n *\n * @param int - the (float) number to inspect\n * @returns the number of fractional digits; `0` for integers\n */\nexport function getFloatDigitsCount(int: number) {\n if (int % 1 !== 0) return int.toString().split('.')[1].length\n return 0\n}\n\n/**\n * Type guard: value is a number or a string coercible to one.\n *\n * Coercion follows `+v` — numeric strings pass, non-numeric ones don't.\n *\n * @param v - the value to check\n * @returns `true` when `v` is a string/number and `+v` is not `NaN`\n */\nexport function isNumberish(v?: Numberish): v is number {\n return (typeof v === 'string' || typeof v === 'number') && !Number.isNaN(+v)\n}\n\n/**\n * Strict numeric-validity check: real, finite, non-`NaN` numbers — and\n * numeric strings that aren't blank.\n *\n * @param val - the value to check\n * @returns `true` only for genuine numeric values\n */\nexport function isValidNumber(val: unknown) {\n return (\n (typeof val === 'number' && val - val === 0) ||\n (typeof val === 'string' && Number.isFinite(+val) && val.trim() !== '')\n )\n}\n\n/**\n * Coerce a number-ish value with `+val`.\n *\n * @param val - the value to coerce; `undefined` falls back to `def`\n * @param def - the default for `undefined`, defaults to `0`\n * @returns the coerced number, `def` for `undefined`, or `NaN` when `val`\n * coerces to `NaN` (no validation is applied)\n */\nexport function numberCast(val: number | string | undefined, def: number = 0) {\n return +(val ?? def)\n}\n\n/**\n * Clamp a number into the inclusive `[min, max]` range.\n *\n * @param value - the number to clamp\n * @param min - the lower bound\n * @param max - the upper bound\n * @returns the bounded value\n */\nexport function clamp(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), max)\n}\n","/**\n * Parse a CSS time literal into milliseconds.\n *\n * Accepts the two CSS time units: `<number>s` and `<number>ms`. Anything\n * that doesn't match the `value + unit` shape — unitless numbers, other\n * units, arbitrary strings — returns `0`, mirroring an unset duration.\n *\n * @param cssTime - a CSS time literal, e.g. `'300ms'`, `'2.5s'`\n * @returns the time in milliseconds (`'2.5s'` → `2500`), or `0` when invalid\n */\nexport function parseCssTime(cssTime: string) {\n const match = cssTime.match(/^([\\d.]+)(s|ms)$/)\n if (!match) return 0\n\n const value = parseFloat(match[1])\n const unit = match[2]\n\n return unit === 's' ? value * 1000 : value\n}\n","import type { CSSUnit, MaybeUnits } from '@ui0/types'\n\n/**\n * Append a CSS unit to a unitless value.\n *\n * Numbers and numeric strings get `units` appended (`20` → `'20px'`,\n * `'2.5'` → `'2.5px'`). Anything else — strings that already carry a unit\n * or a keyword (`'20em'`, `'auto'`), `undefined` — returns an empty string;\n * use {@link tryToUnits} when the original value should survive.\n *\n * @param val - a number or a numeric string\n * @param units - the unit to append, defaults to `'px'`\n * @returns the value with the unit attached, or `''` when `val` is not\n * unitless-numeric\n */\nexport function toUnits(val: MaybeUnits, units: CSSUnit = 'px'): string {\n if (typeof val === 'number') return val + units\n else if (typeof val === 'string') {\n if (val === +val + '') return val + units\n }\n return ''\n}\n","import type { CSSUnit, MaybeUnits } from '@ui0/types'\n\nimport { isNumberish } from '../number'\nimport { toUnits } from './toUnits'\n\n/**\n * Like {@link toUnits}, but passes non-numeric values through untouched.\n *\n * Numberish input gets the unit appended (`20` → `'20px'`); strings that\n * already read as CSS (`'20em'`, `'auto'`) are returned as-is; `undefined`\n * collapses to `'0'` so an omitted value never leaks into a style\n * declaration.\n *\n * @param val - a number, a numeric string, or any other CSS value\n * @param units - the unit for numberish input, defaults to `'px'`\n * @returns the unit-bearing value, the original string, or `'0'`\n */\nexport function tryToUnits(val: MaybeUnits, units: CSSUnit = 'px'): string {\n return isNumberish(val) ? toUnits(val, units) : (val ?? '0')\n}\n","import type { StyleList } from '@ui0/types'\n\n/**\n * Serialize a style object into an inline CSS declaration string.\n *\n * camelCase keys are kebab-cased (`zIndex` → `z-index`, an initial capital\n * becomes a vendor prefix: `WebkitBackdropFilter` → `-webkit-backdrop-filter`),\n * each pair becomes `key:value;` and pairs are concatenated without\n * separators — the result targets a single `style` attribute or a css-in-js\n * template, not pretty printing.\n *\n * @param obj - the style object (`StyleList` / any plain record)\n * @returns the declaration string, e.g. `'width:20px;z-index:2;'`\n */\nexport function objectToCss(obj: StyleList) {\n return Object.entries(obj)\n .map(\n ([k, v]) => `${k.replace(/[A-Z]/g, (m) => '-' + m.toLowerCase())}:${v};`\n )\n .join('')\n}\n","import type { CSSUnit } from '@ui0/types'\n\n/**\n * convert 123px to {value: 123, units: 'px'}\n * @param {string} str\n * @return {{units: string, value: number}}\n */\nexport function parseUnits(str: string = ''): {\n value: number\n units: CSSUnit\n calc: string\n} {\n const result = /-?\\d*\\.?\\d+/.exec(str)\n if (result && result[0]) {\n const value = +result[0]\n const units = str.replace(result[0], '') as CSSUnit\n return {\n value,\n units,\n calc: value + units\n }\n } else {\n return {\n value: 0,\n units: 'px',\n calc: ''\n }\n }\n}\n","/**\n * Build the error a composable throws when it is called outside of a\n * component's setup or lifecycle hooks.\n *\n * @param funcName - the composable's name for the message\n * @returns the ready `Error` instance\n */\nexport function newErrorForSetupCall(funcName: string) {\n return new Error(\n `${funcName} must be called from the setup or lifecycle hook methods.`\n )\n}\n\n/**\n * Build a core-prefixed framework error (`[core]: <msg>`).\n *\n * @param msg - the error detail\n * @returns the ready `Error` instance\n */\nexport function newFrameworkError(msg: string) {\n return new Error(`[core]: ${msg}`)\n}\n\n/**\n * Build the error thrown when an app is requested by a name nothing\n * registered under.\n *\n * @param data - the missing app's name\n * @returns the ready `Error` instance\n */\nexport function newErrorAppNotFound(data: string) {\n return new Error(`App ${data} not found.`)\n}\n\n/**\n * Build the error thrown when an app name is registered twice.\n *\n * @param data - the duplicated app's name\n * @returns the ready `Error` instance\n */\nexport function newErrorAppExists(data: string) {\n return new Error(\n `App ${data} already exists. Please, provide unique name for each app.`\n )\n}\n\n/**\n * Build the error `useApp` throws when no app context is active.\n *\n * @returns the ready `Error` instance\n */\nexport function newErrorUseAppCall() {\n return new Error(`useApp must be called inside any app.\n use data in <app data></app>`)\n}\n","// Deterministic SHA-256 (FIPS 180-4) in pure JS - runs in the browser and in\n// Node alike, so generated class-name hashes can be computed at runtime on\n// either side. Sync, byte-oriented, no dependencies.\nconst K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1,\n 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786,\n 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,\n 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b,\n 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a,\n 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]\n\nfunction rotr(x: number, n: number): number {\n return (x >>> n) | (x << (32 - n))\n}\n\n/**\n * SHA-256 of a string as a lowercase hex digest.\n *\n * Pure JS implementation (FIPS 180-4) — runs identically in the browser\n * and in Node, so generated class-name hashes can be computed at runtime\n * on either side without `node:crypto`.\n *\n * @param message - the string to hash (UTF-8 encoded)\n * @returns the 64-character hex digest\n */\nexport function sha256hex(message: string): string {\n const bytes = new TextEncoder().encode(message)\n const bitLen = bytes.length * 8\n\n const padded = new Uint8Array((((bytes.length + 8) >> 6) + 1) << 6)\n padded.set(bytes)\n padded[bytes.length] = 0x80\n const view = new DataView(padded.buffer)\n view.setUint32(padded.length - 8, Math.floor(bitLen / 0x100000000))\n view.setUint32(padded.length - 4, bitLen >>> 0)\n\n let h0 = 0x6a09e667,\n h1 = 0xbb67ae85,\n h2 = 0x3c6ef372,\n h3 = 0xa54ff53a\n let h4 = 0x510e527f,\n h5 = 0x9b05688c,\n h6 = 0x1f83d9ab,\n h7 = 0x5be0cd19\n\n const w = new Uint32Array(64)\n for (let block = 0; block < padded.length; block += 64) {\n for (let t = 0; t < 16; t++) {\n w[t] = view.getUint32(block + t * 4)\n }\n for (let t = 16; t < 64; t++) {\n const s0 = rotr(w[t - 15], 7) ^ rotr(w[t - 15], 18) ^ (w[t - 15] >>> 3)\n const s1 = rotr(w[t - 2], 17) ^ rotr(w[t - 2], 19) ^ (w[t - 2] >>> 10)\n w[t] = (w[t - 16] + s0 + w[t - 7] + s1) | 0\n }\n let a = h0,\n b = h1,\n c = h2,\n d = h3,\n e = h4,\n f = h5,\n g = h6,\n h = h7\n for (let t = 0; t < 64; t++) {\n const S1 = rotr(e, 6) ^ rotr(e, 11) ^ rotr(e, 25)\n const ch = (e & f) ^ (~e & g)\n const t1 = (h + S1 + ch + K[t] + w[t]) | 0\n const S0 = rotr(a, 2) ^ rotr(a, 13) ^ rotr(a, 22)\n const maj = (a & b) ^ (a & c) ^ (b & c)\n const t2 = (S0 + maj) | 0\n h = g\n g = f\n f = e\n e = (d + t1) | 0\n d = c\n c = b\n b = a\n a = (t1 + t2) | 0\n }\n h0 = (h0 + a) | 0\n h1 = (h1 + b) | 0\n h2 = (h2 + c) | 0\n h3 = (h3 + d) | 0\n h4 = (h4 + e) | 0\n h5 = (h5 + f) | 0\n h6 = (h6 + g) | 0\n h7 = (h7 + h) | 0\n }\n\n return [h0, h1, h2, h3, h4, h5, h6, h7]\n .map((x) => (x >>> 0).toString(16).padStart(8, '0'))\n .join('')\n}\n","import type { RgbTuple } from '@ui0/types'\n\n/**\n * Parse a CSS hex color into an sRGB triple.\n *\n * Accepts the long (`#rrggbb`) and short (`#rgb`) forms, with or without\n * the leading `#`.\n *\n * @param hex - the hex literal, e.g. `'#16e3c5'`, `'f00'`\n * @returns `[r, g, b]` with integer channels 0-255\n */\nexport function hexToRgb(hex: string): RgbTuple {\n hex = hex.replace('#', '')\n if (hex.length === 3)\n hex = hex\n .split('')\n .map((c) => c + c)\n .join('')\n const num = parseInt(hex, 16)\n return [(num >> 16) & 255, (num >> 8) & 255, num & 255]\n}\n","import type { RgbTuple } from '@ui0/types'\n\n/**\n * Extract the RGB channels from an `rgb()` / `rgba()` string.\n *\n * Handles the legacy comma syntax (`rgb(1, 2, 3)`) and the modern space\n * syntax with alpha (`rgb(1 2 3 / .5)`); the alpha component is dropped.\n *\n * @param s - the CSS color function string\n * @returns `[r, g, b]` as parsed (fractional for decimals/percentages)\n */\nexport function parseRgbString(s: string): RgbTuple {\n const m = s.match(/rgba?\\(([^)]+)\\)/)!\n const parts = m[1]\n .replace(/\\//g, ' ')\n .split(/[\\s,]+/)\n .filter(Boolean)\n .map((x) => parseFloat(x))\n return [parts[0], parts[1], parts[2]]\n}\n","import type { RgbTuple } from '@ui0/types'\n\n/**\n * The CSS named colors (CSS Color Module Level 4) as sRGB triples,\n * keyed by lowercase name.\n */\nexport const NAMED_COLORS: Record<string, RgbTuple> = {\n aliceblue: [240, 248, 255],\n antiquewhite: [250, 235, 215],\n aqua: [0, 255, 255],\n aquamarine: [127, 255, 212],\n azure: [240, 255, 255],\n beige: [245, 245, 220],\n bisque: [255, 228, 196],\n black: [0, 0, 0],\n blanchedalmond: [255, 235, 205],\n blue: [0, 0, 255],\n blueviolet: [138, 43, 226],\n brown: [165, 42, 42],\n burlywood: [222, 184, 135],\n cadetblue: [95, 158, 160],\n chartreuse: [127, 255, 0],\n chocolate: [210, 105, 30],\n coral: [255, 127, 80],\n cornflowerblue: [100, 149, 237],\n cornsilk: [255, 248, 220],\n crimson: [220, 20, 60],\n cyan: [0, 255, 255],\n darkblue: [0, 0, 139],\n darkcyan: [0, 139, 139],\n darkgoldenrod: [184, 134, 11],\n darkgray: [169, 169, 169],\n darkgreen: [0, 100, 0],\n darkgrey: [169, 169, 169],\n darkkhaki: [189, 183, 107],\n darkmagenta: [139, 0, 139],\n darkolivegreen: [85, 107, 47],\n darkorange: [255, 140, 0],\n darkorchid: [153, 50, 204],\n darkred: [139, 0, 0],\n darksalmon: [233, 150, 122],\n darkseagreen: [143, 188, 143],\n darkslateblue: [72, 61, 139],\n darkslategray: [47, 79, 79],\n darkslategrey: [47, 79, 79],\n darkturquoise: [0, 206, 209],\n darkviolet: [148, 0, 211],\n deeppink: [255, 20, 147],\n deepskyblue: [0, 191, 255],\n dimgray: [105, 105, 105],\n dimgrey: [105, 105, 105],\n dodgerblue: [30, 144, 255],\n firebrick: [178, 34, 34],\n floralwhite: [255, 250, 240],\n forestgreen: [34, 139, 34],\n fuchsia: [255, 0, 255],\n gainsboro: [220, 220, 220],\n ghostwhite: [248, 248, 255],\n gold: [255, 215, 0],\n goldenrod: [218, 165, 32],\n gray: [128, 128, 128],\n green: [0, 128, 0],\n greenyellow: [173, 255, 47],\n grey: [128, 128, 128],\n honeydew: [240, 255, 240],\n hotpink: [255, 105, 180],\n indianred: [205, 92, 92],\n indigo: [75, 0, 130],\n ivory: [255, 255, 240],\n khaki: [240, 230, 140],\n lavender: [230, 230, 250],\n lavenderblush: [255, 240, 245],\n lawngreen: [124, 252, 0],\n lemonchiffon: [255, 250, 205],\n lightblue: [173, 216, 230],\n lightcoral: [240, 128, 128],\n lightcyan: [224, 255, 255],\n lightgoldenrodyellow: [250, 250, 210],\n lightgray: [211, 211, 211],\n lightgreen: [144, 238, 144],\n lightgrey: [211, 211, 211],\n lightpink: [255, 182, 193],\n lightsalmon: [255, 160, 122],\n lightseagreen: [32, 178, 170],\n lightskyblue: [135, 206, 250],\n lightslategray: [119, 136, 153],\n lightslategrey: [119, 136, 153],\n lightsteelblue: [176, 196, 222],\n lightyellow: [255, 255, 224],\n lime: [0, 255, 0],\n limegreen: [50, 205, 50],\n linen: [250, 240, 230],\n magenta: [255, 0, 255],\n maroon: [128, 0, 0],\n mediumaquamarine: [102, 205, 170],\n mediumblue: [0, 0, 205],\n mediumorchid: [186, 85, 211],\n mediumpurple: [147, 112, 219],\n mediumseagreen: [60, 179, 113],\n mediumslateblue: [123, 104, 238],\n mediumspringgreen: [0, 250, 154],\n mediumturquoise: [72, 209, 204],\n mediumvioletred: [199, 21, 133],\n midnightblue: [25, 25, 112],\n mintcream: [245, 255, 250],\n mistyrose: [255, 228, 225],\n moccasin: [255, 228, 181],\n navajowhite: [255, 222, 173],\n navy: [0, 0, 128],\n oldlace: [253, 245, 230],\n olive: [128, 128, 0],\n olivedrab: [107, 142, 35],\n orange: [255, 165, 0],\n orangered: [255, 69, 0],\n orchid: [218, 112, 214],\n palegoldenrod: [238, 232, 170],\n palegreen: [152, 251, 152],\n paleturquoise: [175, 238, 238],\n palevioletred: [219, 112, 147],\n papayawhip: [255, 239, 213],\n peachpuff: [255, 218, 185],\n peru: [205, 133, 63],\n pink: [255, 192, 203],\n plum: [221, 160, 221],\n powderblue: [176, 224, 230],\n purple: [128, 0, 128],\n rebeccapurple: [102, 51, 153],\n red: [255, 0, 0],\n rosybrown: [188, 143, 143],\n royalblue: [65, 105, 225],\n saddlebrown: [139, 69, 19],\n salmon: [250, 128, 114],\n sandybrown: [244, 164, 96],\n seagreen: [46, 139, 87],\n seashell: [255, 245, 238],\n sienna: [160, 82, 45],\n silver: [192, 192, 192],\n skyblue: [135, 206, 235],\n slateblue: [106, 90, 205],\n slategray: [112, 128, 144],\n slategrey: [112, 128, 144],\n snow: [255, 250, 250],\n springgreen: [0, 255, 127],\n steelblue: [70, 130, 180],\n tan: [210, 180, 140],\n teal: [0, 128, 128],\n thistle: [216, 191, 216],\n tomato: [255, 99, 71],\n turquoise: [64, 224, 208],\n violet: [238, 130, 238],\n wheat: [245, 222, 179],\n white: [255, 255, 255],\n whitesmoke: [245, 245, 245],\n yellow: [255, 255, 0],\n yellowgreen: [154, 205, 50]\n}\n","import { NAMED_COLORS } from './namedColors'\n\n/**\n * Tell literal CSS colors from palette references.\n *\n * Literal means the string is a color by itself: `#hex`, `rgb(...)` /\n * `rgba(...)`, or a CSS named color (case-insensitive) — as opposed to\n * theme references like `'brand-l2'`.\n *\n * @param s - the color string to classify\n * @returns `true` when `s` is directly usable as a CSS color value\n */\nexport function isLiteralColor(s: string): boolean {\n return (\n s.startsWith('#') || s.startsWith('rgb') || s.toLowerCase() in NAMED_COLORS\n )\n}\n","import type { RgbTuple } from '@ui0/types'\n\nimport { hexToRgb } from './hexToRgb'\nimport { isLiteralColor } from './isLiteralColor'\nimport { NAMED_COLORS } from './namedColors'\nimport { parseRgbString } from './parseRgbString'\n\n/**\n * Resolve any literal CSS color string to an sRGB triple.\n *\n * Dispatches on the format: `#hex` → {@link hexToRgb}, `rgb(...)` →\n * {@link parseRgbString}, anything else is looked up among the CSS named\n * colors (case-insensitive). Theme references are rejected.\n *\n * @param color - a literal color string\n * @returns the sRGB triple\n * @throws when `color` is not a literal color (e.g. a palette reference)\n */\nexport function toRgb(color: string): RgbTuple {\n if (!isLiteralColor(color)) {\n throw new Error('unknown literal color format: ' + color)\n }\n if (color.startsWith('#')) return hexToRgb(color)\n if (color.startsWith('rgb')) return parseRgbString(color)\n return NAMED_COLORS[color.toLowerCase()]\n}\n","import type { RgbTuple } from '@ui0/types'\n\n/**\n * Convert an sRGB triple to HSL.\n *\n * @param rgb - the color (channels 0-255)\n * @returns `[hue 0-360, saturation 0-100, lightness 0-100]` (fractional)\n */\nexport function rgbToHsl([r, g, b]: RgbTuple): [number, number, number] {\n r /= 255\n g /= 255\n b /= 255\n const max = Math.max(r, g, b),\n min = Math.min(r, g, b)\n let h = 0,\n s: number\n const l = (max + min) / 2\n if (max === min) {\n h = s = 0\n } else {\n const d = max - min\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min)\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0)\n break\n case g:\n h = (b - r) / d + 2\n break\n case b:\n h = (r - g) / d + 4\n break\n }\n h /= 6\n }\n return [h * 360, s * 100, l * 100]\n}\n","import type { RgbTuple } from '@ui0/types'\n\n/**\n * Convert an HSL triple to a fractional sRGB triple.\n *\n * @param hsl - `[hue 0-360, saturation 0-100, lightness 0-100]`\n * @returns fractional sRGB channels (0-255, not rounded)\n */\nexport function hslToRgb([h, s, l]: [number, number, number]): RgbTuple {\n h /= 360\n s /= 100\n l /= 100\n let r: number, g: number, b: number\n if (s === 0) {\n r = g = b = l\n } else {\n const hue2rgb = (p: number, q: number, t: number) => {\n if (t < 0) t += 1\n if (t > 1) t -= 1\n if (t < 1 / 6) return p + (q - p) * 6 * t\n if (t < 1 / 2) return q\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6\n return p\n }\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s\n const p = 2 * l - q\n r = hue2rgb(p, q, h + 1 / 3)\n g = hue2rgb(p, q, h)\n b = hue2rgb(p, q, h - 1 / 3)\n }\n return [r * 255, g * 255, b * 255]\n}\n","import type { RgbTuple } from '@ui0/types'\n\nimport { hslToRgb } from './hslToRgb'\nimport { rgbToHsl } from './rgbToHsl'\n\n/**\n * Rebuild a color with a new HSL lightness, keeping hue and saturation.\n *\n * @param rgb - the source color (sRGB triple)\n * @param l - the target lightness, percent 0-100\n * @returns the recolored sRGB triple (fractional channels)\n */\nexport function withLightnessHsl(rgb: RgbTuple, l: number): RgbTuple {\n const [h, s] = rgbToHsl(rgb)\n return hslToRgb([h, s, l])\n}\n","import type { RgbTuple } from '@ui0/types'\n\nimport { rgbToHsl } from './rgbToHsl'\n\n/**\n * Read the HSL lightness (percent, 0-100) of an sRGB color.\n *\n * @param rgb - the color to measure (sRGB triple)\n * @returns the lightness percentage (fractional)\n */\nexport function lightnessOfHsl(rgb: RgbTuple): number {\n return rgbToHsl(rgb)[2]\n}\n","/**\n * Decode one gamma-encoded sRGB channel to linear light.\n *\n * @param v - the sRGB channel, 0-255\n * @returns the linear-light value (0-1)\n */\nexport function srgbToLinear(v: number): number {\n v /= 255\n return v <= 0.04045 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4\n}\n","/**\n * Gamma-encode one linear-light channel to sRGB.\n *\n * @param v - the linear channel, nominally 0-1\n * @returns the sRGB channel, 0-255, clamped to the gamut\n */\nexport function linearToSrgb(v: number): number {\n const s = v <= 0.0031308 ? v * 12.92 : 1.055 * v ** (1 / 2.4) - 0.055\n return Math.min(255, Math.max(0, s * 255))\n}\n","import type { RgbTuple } from '@ui0/types'\n\n/**\n * Convert a linear-light sRGB triple to OKLab.\n *\n * Björn Ottosson's LMS-based transform; the input must be linear (run\n * {@link srgbToLinear} over gamma-encoded channels first).\n *\n * @param rgb - linear sRGB channels (0-1)\n * @returns `[L, a, b]` OKLab coordinates\n */\nexport function linearRgbToOklab([r, g, b]: RgbTuple): [\n number,\n number,\n number\n] {\n const l = 0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b\n const m = 0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b\n const s = 0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b\n const l_ = Math.cbrt(l),\n m_ = Math.cbrt(m),\n s_ = Math.cbrt(s)\n return [\n 0.2104542553 * l_ + 0.793617785 * m_ - 0.0040720468 * s_,\n 1.9779984951 * l_ - 2.428592205 * m_ + 0.4505937099 * s_,\n 0.0259040371 * l_ + 0.7827717662 * m_ - 0.808675766 * s_\n ]\n}\n","import type { RgbTuple } from '@ui0/types'\n\n/**\n * Convert OKLab coordinates back to a linear-light sRGB triple.\n *\n * Inverse of {@link linearRgbToOklab}; run {@link linearToSrgb} over the\n * result to get gamma-encoded channels.\n *\n * @param L - OKLab lightness\n * @param a - green-red opponent channel\n * @param b - blue-yellow opponent channel\n * @returns linear sRGB channels (0-1)\n */\nexport function oklabToLinearRgb([L, a, b]: [\n number,\n number,\n number\n]): RgbTuple {\n const l_ = L + 0.3963377774 * a + 0.2158037573 * b\n const m_ = L - 0.1055613458 * a - 0.0638541728 * b\n const s_ = L - 0.0894841775 * a - 1.291485548 * b\n const l = l_ ** 3,\n m = m_ ** 3,\n s = s_ ** 3\n return [\n +4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s,\n -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,\n -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s\n ]\n}\n","import type { RgbTuple } from '@ui0/types'\n\nimport { linearRgbToOklab } from './linearRgbToOklab'\nimport { srgbToLinear } from './srgbToLinear'\n\n/**\n * Convert an sRGB triple to OKLCH (via linear sRGB + OKLab).\n *\n * @param rgb - the color (channels 0-255)\n * @returns `[L 0-100, C, H degrees]` (fractional)\n */\nexport function rgbToOklch(rgb: RgbTuple): [number, number, number] {\n const [L, a, b] = linearRgbToOklab(rgb.map(srgbToLinear) as RgbTuple)\n return [L * 100, Math.sqrt(a * a + b * b), Math.atan2(b, a) * (180 / Math.PI)]\n}\n","import type { RgbTuple } from '@ui0/types'\n\nimport { linearToSrgb } from './linearToSrgb'\nimport { oklabToLinearRgb } from './oklabToLinearRgb'\n\n/**\n * Convert OKLCH coordinates to a gamma-encoded sRGB triple.\n *\n * @param L100 - lightness in percent (0-100)\n * @param C - chroma\n * @param H - hue in degrees\n * @returns the sRGB triple (channels 0-255, fractional)\n */\nexport function oklchToRgb([L100, C, H]: [number, number, number]): RgbTuple {\n const hRad = H * (Math.PI / 180)\n const lab: [number, number, number] = [\n L100 / 100,\n C * Math.cos(hRad),\n C * Math.sin(hRad)\n ]\n return oklabToLinearRgb(lab).map(linearToSrgb) as RgbTuple\n}\n","import type { RgbTuple } from '@ui0/types'\n\nimport { oklchToRgb } from './oklchToRgb'\nimport { rgbToOklch } from './rgbToOklch'\n\n/**\n * Rebuild a color with a new OKLCH lightness, keeping chroma and hue.\n *\n * @param rgb - the source color (sRGB triple)\n * @param l - the target lightness, percent 0-100\n * @returns the recolored sRGB triple (fractional channels)\n */\nexport function withLightnessOklch(rgb: RgbTuple, l: number): RgbTuple {\n const [, C, H] = rgbToOklch(rgb)\n return oklchToRgb([l, C, H])\n}\n","import type { RgbTuple } from '@ui0/types'\n\nimport { rgbToOklch } from './rgbToOklch'\n\n/**\n * Read the OKLCH lightness (percent, 0-100) of an sRGB color.\n *\n * @param rgb - the color to measure (sRGB triple)\n * @returns the OKLCH L dimension (fractional)\n */\nexport function lightnessOfOklch(rgb: RgbTuple): number {\n return rgbToOklch(rgb)[0]\n}\n","import type { RgbTuple } from '@ui0/types'\n\nimport { lightnessOfHsl } from './lightnessOfHsl'\nimport { lightnessOfOklch } from './lightnessOfOklch'\nimport type { ColorSpace } from './types'\nimport { withLightnessHsl } from './withLightnessHsl'\nimport { withLightnessOklch } from './withLightnessOklch'\n\n/**\n * The color spaces the ramp math (`lighten` / `darken`) can run in.\n *\n * `oklch` is perceptually uniform — a ramp looks evenly spaced regardless\n * of hue; `hsl` is the legacy (cheaper) path.\n */\nexport const SPACES: Record<\n ColorSpace,\n {\n lightnessOf: (rgb: RgbTuple) => number\n withLightness: (rgb: RgbTuple, l: number) => RgbTuple\n }\n> = {\n hsl: { lightnessOf: lightnessOfHsl, withLightness: withLightnessHsl },\n oklch: { lightnessOf: lightnessOfOklch, withLightness: withLightnessOklch }\n}\n","import type { RgbTuple } from '@ui0/types'\n\nimport { SPACES } from './spaces'\nimport type { ColorSpace } from './types'\n\n/**\n * Lighten a color by `step` steps of a `steps`-step ramp.\n *\n * Scales the color's lightness up toward 100 percent proportionally\n * (`l -> l + (100 - l) * (step / steps)`) in the given color space;\n * `oklch` keeps ramps perceptually even, `hsl` is the legacy path.\n *\n * @param rgb - the color to lighten (sRGB triple)\n * @param step - how many steps up the ramp (1-based)\n * @param steps - the total number of ramp steps\n * @param space - the color space the lightness math runs in\n * @returns the lightened color (fractional channels)\n */\nexport function lighten(\n rgb: RgbTuple,\n step: number,\n steps: number,\n space: ColorSpace = 'hsl'\n): RgbTuple {\n const { lightnessOf, withLightness } = SPACES[space]\n const l0 = lightnessOf(rgb)\n return withLightness(rgb, l0 + (100 - l0) * (step / steps))\n}\n","import type { RgbTuple } from '@ui0/types'\n\nimport { SPACES } from './spaces'\nimport type { ColorSpace } from './types'\n\n/**\n * Darken a color by `step` steps of a `steps`-step ramp.\n *\n * Scales the color's lightness down proportionally\n * (`l -> l * (1 - step / steps)`) in the given color space; `oklch` keeps\n * ramps perceptually even, `hsl` is the legacy path.\n *\n * @param rgb - the color to darken (sRGB triple)\n * @param step - how many steps down the ramp (1-based)\n * @param steps - the total number of ramp steps\n * @param space - the color space the lightness math runs in\n * @returns the darkened color (fractional channels)\n */\nexport function darken(\n rgb: RgbTuple,\n step: number,\n steps: number,\n space: ColorSpace = 'hsl'\n): RgbTuple {\n const { lightnessOf, withLightness } = SPACES[space]\n const l0 = lightnessOf(rgb)\n return withLightness(rgb, l0 * (1 - step / steps))\n}\n","import type { RgbTuple } from '@ui0/types'\n\n/**\n * Mix two sRGB colors by a depth percentage.\n *\n * Linear interpolation per channel: `depthPercent` of 0 returns `rgb1`\n * untouched, 100 returns `rgb2`; the channels stay fractional (not\n * rounded).\n *\n * @param rgb1 - the base color (sRGB triple, channels 0-255)\n * @param rgb2 - the color blended in\n * @param depthPercent - blend weight of `rgb2`, 0-100\n * @returns the mixed color as a fractional sRGB triple\n */\nexport function blend(\n rgb1: RgbTuple,\n rgb2: RgbTuple,\n depthPercent: number\n): RgbTuple {\n const t = depthPercent / 100\n return [0, 1, 2].map((i) => rgb1[i] * (1 - t) + rgb2[i] * t) as RgbTuple\n}\n","/**\n * Coerces an arbitrary prop value to a boolean the way presence-classes\n * expect it: an empty string means \"present\" (`true`), an empty array means\n * \"absent\" (`false`), anything else falls through to the default truthiness\n * rules.\n * @param value - the prop value\n * @returns the boolean presence of the value\n */\nexport function castAnyPropToBoolean(value: any): boolean {\n if (typeof value === 'string' && value === '') return true\n if (typeof value === 'object' && value instanceof Array && !value.length) return false\n return !!value\n}\n","/**\n * Builds a `{ [className]: true }` record from a list of state names,\n * keeping only the names whose prop value is \"on\" (defined, not `false`\n * and not a function).\n * @param names - space-separated string, list, or map of state names\n * @param props - the props to test each name against\n * @param className - prefix joined with `_` to each name; empty = bare name\n * @param debug - log the inputs before computing\n * @returns record of `className_name -> true` for the active names\n */\nexport function namesToClassNames(\n names: string | string[],\n props: Record<string, any> = {},\n className: string = 'state',\n debug = false\n) {\n debug && console.log('names to classname', names, props, className)\n const out: any = {}\n let list: string[] = []\n if (typeof names === 'object') list = names instanceof Array ? names : Object.keys(names || [])\n else list = names.split(' ')\n\n list.forEach((item) => {\n const cn = className ? `${className}_${item}` : item\n if (props[item] !== undefined && props[item] !== false && typeof props[item] !== 'function') {\n out[cn] = true\n }\n })\n\n return out\n}\n","import type { Indexed } from '@ui0/types'\n\n/**\n * Converts a prop value to a class via a value -> class alias record: the\n * alias may be a single class name or a list of class names.\n * @param propValue - the prop's value token\n * @param values - record of value token -> class alias (string or string[])\n * @returns `{ className: true }` for the aliased class(es), `{}` when the\n * value has no alias or the alias is neither a string nor a list\n */\nexport function propValueToClass<Prop extends string>(propValue: Prop, values: Indexed): Indexed {\n if (!values[propValue]) return {}\n if (typeof values[propValue] === 'string') return { [values[propValue]]: true }\n if (typeof values[propValue] === 'object' && values[propValue] instanceof Array) {\n return values[propValue].reduce(\n (acc: any, cur: any) => ({\n ...acc,\n [cur]: true\n }),\n {}\n )\n }\n\n return {}\n}\n","import type { Indexed } from '@ui0/types'\n\n/**\n * Converts a prop value to class names via a value -> class alias record:\n * the alias may be a single class name or a list of class names.\n * @param propValue - the prop's value token\n * @param values - record of value token -> class alias (string or string[])\n * @returns the aliased class name list, `[]` when the value has no alias or\n * the alias is neither a string nor a list\n */\nexport function propValueToClasses<Prop extends string>(propValue: Prop, values: Indexed): string[] {\n if (!values[propValue]) return []\n if (typeof values[propValue] === 'string') return [values[propValue]]\n if (typeof values[propValue] === 'object' && values[propValue] instanceof Array) {\n return values[propValue]\n }\n return []\n}\n","import type { CSSModuleClassList, Indexed } from '@ui0/types'\n\nimport { castAnyPropToBoolean } from './castAnyPropToBoolean'\nimport { propValueToClass } from './propValueToClass'\nimport type { PropClassImpl } from './types'\n\n/**\n * Converts prop names and values to css-module classes, returned as a\n * `{ [className]: boolean }` record (a `false` entry means the prop is off\n * but the class slot is still reported).\n *\n * A picked entry is either a bare prop name - the prop's own class is keyed\n * by the css module and the value's tokens add their own module classes - or\n * a `[propName, modifiers]` tuple that maps the value's tokens onto modifier\n * classes via {@link propValueToClass}.\n * @param props - the instance props\n * @param picked - the props to map (bare names or `[name, modifiers]` tuples)\n * @param cssModule - the css-module class map\n * @returns record of class name -> on/off flag\n */\nexport function propsToCssModuleClass<Props extends Indexed, PropName extends PropClassImpl<Props>>(\n props: Props,\n picked: PropName[],\n cssModule: CSSModuleClassList\n) {\n let out: Indexed<boolean> = {}\n\n function getRootClassBoolean(field: string) {\n let out = undefined\n\n if (props[field] !== undefined) {\n out = castAnyPropToBoolean(props[field])\n }\n return out\n }\n\n picked.forEach((pickedProp) => {\n if (typeof pickedProp === 'string') {\n const cn = cssModule[pickedProp]\n const value: string | number | string[] | undefined | boolean = props[pickedProp]\n\n if (value !== undefined && cn) {\n if (typeof value === 'boolean') out[cn] = value\n if (\n typeof value === 'string' ||\n typeof value === 'number' ||\n (typeof value === 'object' && value instanceof Array)\n ) {\n out[cn] = true\n let arr: string[] = []\n if (typeof value === 'string' || typeof value === 'number') arr = value.toString().split(' ')\n if (value instanceof Array) arr = value\n arr.forEach((val: string) => {\n // adds shared class named same as prop.\n /// e.g. if `round` props presents as valued string like `round=\"top-left bottom right\"`,\n /// it adds to output '.round' class, and '.tl' and '.br' classes too\n const modifierName = cssModule[val]\n if (modifierName) out[modifierName] = true\n })\n }\n }\n }\n if (typeof pickedProp === 'object' && pickedProp instanceof Array && pickedProp.length === 2) {\n const _pickedProp = pickedProp[0] as string\n const _pickedPropValue = pickedProp[1]\n const _pickedPropClassName = cssModule[_pickedProp]\n const value = getRootClassBoolean(_pickedProp)\n\n if (\n typeof props[_pickedProp] === 'string' ||\n typeof props[_pickedProp] === 'number' ||\n typeof props[_pickedProp] === 'boolean' ||\n (typeof props[_pickedProp] === 'object' && props[_pickedProp] instanceof Array)\n ) {\n let classValues: string[] = []\n if (props[_pickedProp] instanceof Array && props[_pickedProp].length) classValues = props[_pickedProp]\n if (typeof props[_pickedProp] === 'string' || typeof props[_pickedProp] === 'number') {\n classValues = String(props[_pickedProp]).split(' ')\n }\n if ((typeof props[_pickedProp] === 'boolean' && props[_pickedProp]) || props[_pickedProp] === '') {\n classValues = ['true']\n }\n\n let outClassValues = {}\n classValues.forEach((val) => {\n if (val !== undefined && val.trim()) {\n outClassValues = {\n ...outClassValues,\n ...propValueToClass(val, _pickedPropValue)\n }\n }\n })\n out = { ...out, ...outClassValues }\n }\n if (_pickedPropClassName) {\n out = {\n ...out,\n [_pickedPropClassName]: value || false\n }\n }\n }\n })\n return out\n}\n","import type { CSSModuleClassList, Indexed } from '@ui0/types'\n\nimport { castAnyPropToBoolean } from './castAnyPropToBoolean'\nimport { propValueToClasses } from './propValueToClasses'\nimport type { PropClassImpl } from './types'\n\n/**\n * Converts prop names and values to a flat list of css-module classes -\n * the array form of {@link propsToCssModuleClass}: same mapping rules, but\n * only the \"on\" classes are collected (no `false` entries) and an extra\n * class can be prepended via `options.extraClass`.\n * @param props - the instance props\n * @param picked - the props to map (bare names or `[name, modifiers]` tuples)\n * @param cssModule - the css-module class map\n * @param options - `extraClass` is prepended to the result when given\n * @returns the resolved class name list\n */\nexport function propsToCssModuleClassNext<Props extends Indexed, PropName extends PropClassImpl<Props>>(\n props: Props,\n picked: PropName[],\n cssModule: CSSModuleClassList,\n options?: { extraClass?: string }\n) {\n let out: string[] = []\n const { extraClass = undefined } = options || {}\n\n if (extraClass) out.push(extraClass)\n\n function getRootClassBoolean(field: string) {\n let out = undefined\n\n if (props[field] !== undefined) {\n out = castAnyPropToBoolean(props[field])\n }\n return out\n }\n\n picked.forEach((pickedProp) => {\n if (typeof pickedProp === 'string') {\n const cn = cssModule[pickedProp]\n const value: string | number | string[] | undefined | boolean = props[pickedProp]\n\n if (value !== undefined && cn) {\n if (typeof value === 'boolean' && value) out.push(cn)\n if (\n typeof value === 'string' ||\n typeof value === 'number' ||\n (typeof value === 'object' && value instanceof Array)\n ) {\n out.push(cn)\n let arr: string[] = []\n if (typeof value === 'string' || typeof value === 'number') arr = value.toString().split(' ')\n if (value instanceof Array) arr = value\n arr.forEach((val: string) => {\n // adds shared class named same as prop.\n /// e.g. if `round` props presents as valued string like `round=\"top-left bottom right\"`,\n /// it adds to output '.round' class, and '.tl' and '.br' classes too\n const modifierName = cssModule[val]\n if (modifierName) out.push(modifierName)\n })\n }\n }\n }\n if (typeof pickedProp === 'object' && pickedProp instanceof Array && pickedProp.length === 2) {\n const _pickedProp = pickedProp[0] as string\n const _pickedPropValue = pickedProp[1]\n const _pickedPropClassName = cssModule[_pickedProp]\n\n const value = getRootClassBoolean(_pickedProp)\n\n if (\n typeof props[_pickedProp] === 'string' ||\n typeof props[_pickedProp] === 'number' ||\n typeof props[_pickedProp] === 'boolean' ||\n (typeof props[_pickedProp] === 'object' && props[_pickedProp] instanceof Array)\n ) {\n let classValues: string[] = []\n\n if (props[_pickedProp] instanceof Array && props[_pickedProp].length) classValues = props[_pickedProp]\n if (typeof props[_pickedProp] === 'string' || typeof props[_pickedProp] === 'number') {\n classValues = String(props[_pickedProp]).split(' ')\n }\n if ((typeof props[_pickedProp] === 'boolean' && props[_pickedProp]) || props[_pickedProp] === '') {\n classValues = ['true']\n }\n\n let outClassValues: string[] = []\n classValues.forEach((val) => {\n if (val !== undefined && val.trim()) {\n outClassValues = [...outClassValues, ...propValueToClasses(val, _pickedPropValue)]\n }\n })\n out = [...out, ...outClassValues]\n }\n if (_pickedPropClassName && !!value) out.push(_pickedPropClassName)\n }\n })\n return out\n}\n","export const isBrowser = typeof window !== 'undefined'\n\nexport function safetyWindow() {\n return window && typeof window !== 'undefined' ? window : {}\n}\nexport function safetyDocument() {\n return typeof document !== 'undefined' ? document : {}\n}\n\nexport default { isBrowser }\n","/** Stores items under monotonically increasing numeric IDs. */\nimport type { RecordContainerImpl, StackOptions } from './record-container.types'\nexport class RecordContainer<T> implements RecordContainerImpl<T> {\n private readonly records: {\n [index: number]: T\n }\n private counter: number = 0\n private options: StackOptions<T>\n\n constructor(options: StackOptions<T> = {}) {\n this.records = {}\n this.options = options\n }\n\n /** Returns the item with the highest remaining ID, or undefined when empty. */\n get last() {\n let lastId = -1\n for (const key in this.records) {\n if (Object.hasOwn(this.records, key)) lastId = Math.max(lastId, Number(key))\n }\n if (lastId === -1) return undefined\n return this.records[lastId]\n }\n\n /** Returns a shallow snapshot; item objects retain their original references. */\n get raw() {\n return { ...this.records }\n }\n\n get items() {\n return Object.values(this.records)\n }\n\n get length() {\n return Object.keys(this.records).length\n }\n\n clear() {\n for (const i in this.records) delete this.records[i]\n }\n\n /** Validates and transforms an item before allocating its ID; returns -1 on rejection. */\n add(item: T) {\n if (this.options.onBeforeChange) {\n if (!this.options.onBeforeChange(item)) return -1\n }\n const value = this.options.onChange ? this.options.onChange(item) : item\n const id = this.counter++\n this.records[id] = value\n return id\n }\n\n remove(id: number) {\n delete this.records[id]\n }\n\n getItemById(id: number) {\n return this.records[id]\n }\n}\n","import { isBrowser } from '../browser-check'\n\nexport function getClientHeight() {\n if (isBrowser) return window.innerHeight\n else return 0\n}\n","import { isBrowser } from '../browser-check'\n\nexport function getClientWidth() {\n if (isBrowser) return window.innerWidth\n else return 0\n //\n // return IN_BROWSER && !ssr\n // ? window.innerWidth\n // : (typeof ssr === 'object' && ssr.clientWidth) || 0\n}\n"],"mappings":";;;;;;;AAMA,SAAgB,UACd,KACA,SACoB;CACpB,MAAM,WAAW,WAAW,CAAC;CAC7B,MAAM,OAAO,MAAM,CAAC,GAAG,GAAG,IAAI,CAAC;CAC/B,MAAM,MAAM,QAAQ,CAAC;CAErB,SAAS,SAAS,MAAM;EACtB,MAAM,MAAM,KAAK,QAAQ,CAAC;EAC1B,IAAI,MAAM,IAAI,KAAK,OAAO,KAAK,CAAC;CAClC,CAAC;CAED,OAAO;AACT;;;;;;;;AAUA,SAAgB,eAAkB,MAAoB,CAAC,GAAG,SAAoB;CAC5E,MAAM,WAAW,WAAW,CAAC;CAC7B,MAAM,OAAO,CAAC,GAAG,GAAG;CACpB,SAAS,SAAS,MAAM;EACtB,MAAM,MAAM,KAAK,QAAQ,CAAC;EAC1B,IAAI,MAAM,IAAI,KAAK,OAAO,KAAK,CAAC;CAClC,CAAC;AACH;;;;;;;AAQ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AgB,iBAAiB;CAC/B,IAAI,WAAW,OAAO,OAAO;MACxB,OAAO;AAKd"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui0/util",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "ui0 utils",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "modelair",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"type": "module",
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"module": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"util:build": "tsdown",
|
|
25
|
+
"util:dev": "tsdown --watch",
|
|
26
|
+
"util:typecheck": "tsc -p tsconfig.json --noEmit",
|
|
27
|
+
"util:test": "vitest run"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@ui0/types": "workspace:*"
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"vue": "^3.5.45"
|
|
34
|
+
}
|
|
35
|
+
}
|
package/README.md
DELETED