@a11y-ui/core
Advanced tools
Comparing version 1.0.1-rc.66 to 1.0.1-rc.67
@@ -1,138 +0,1 @@ | ||
declare namespace Common { | ||
type PrefixedKey<Prefix extends string, Key extends string> = `${Prefix}-${Key}`; | ||
} | ||
declare namespace Element { | ||
type Validators<R, O> = { | ||
readonly [Property in keyof R as `validate${Capitalize<string & Property>}`]: (newValue?: R[Property], oldValue?: R[Property]) => void; | ||
} & { | ||
readonly [Property in keyof O as `validate${Capitalize<string & Property>}`]: (newValue?: O[Property], oldValue?: O[Property]) => void; | ||
}; | ||
type Mapper<R, O> = { | ||
readonly [Property in keyof R as `map${Capitalize<string & Property>}`]?: (newValue?: R[Property]) => R[Property]; | ||
} & { | ||
readonly [Property in keyof O as `map${Capitalize<string & Property>}`]?: (newValue?: O[Property]) => O[Property]; | ||
}; | ||
type Watchers<R, O> = Validators<R, O> & Mapper<R, O>; | ||
type Props<P> = { | ||
[Property in keyof P as `_${string & Property}`]?: P[Property]; | ||
}; | ||
type Members<R, O> = { | ||
[Property in keyof R as `_${string & Property}`]: R[Property]; | ||
} & { | ||
[Property in keyof O as `_${string & Property}`]?: O[Property]; | ||
}; | ||
type StateHooks = 'afterPatch' | 'beforePatch'; | ||
type StateHooksCallback = (value: unknown, state: Record<string, unknown>, component: Component, key: string) => void; | ||
type NextStateHooksCallback = (nextValue: unknown, nextState: Map<string, unknown>, component: Component, key: string) => void; | ||
interface Component { | ||
componentWillLoad?: () => void; | ||
hydrated?: boolean; | ||
nextHooks?: Map<string, Map<StateHooks, StateHooksCallback | NextStateHooksCallback>>; | ||
nextState?: Map<string, unknown>; | ||
state: Record<string, unknown>; | ||
timeout?: number; | ||
} | ||
type ComponentApi<RequiredProps, OptionalProps, RequiredState, OptionalState> = Component & Members<RequiredProps, OptionalProps> & Watchers<RequiredProps, OptionalProps> & { | ||
readonly state: Members<RequiredState, OptionalState>; | ||
}; | ||
type Stringified<T> = T | string; | ||
} | ||
declare namespace Locale { | ||
type ISO_639_1 = 'ab' | 'aa' | 'af' | 'ak' | 'sq' | 'am' | 'ar' | 'an' | 'hy' | 'as' | 'av' | 'ae' | 'ay' | 'az' | 'bm' | 'ba' | 'eu' | 'be' | 'bn' | 'bh' | 'bi' | 'nb' | 'bs' | 'br' | 'bg' | 'my' | 'es' | 'ca' | 'km' | 'ch' | 'ce' | 'ny' | 'ny' | 'zh' | 'za' | 'cu' | 'cu' | 'cv' | 'kw' | 'co' | 'cr' | 'hr' | 'cs' | 'da' | 'dv' | 'dv' | 'nl' | 'dz' | 'en' | 'eo' | 'et' | 'ee' | 'fo' | 'fj' | 'fi' | 'nl' | 'fr' | 'ff' | 'gd' | 'gl' | 'lg' | 'ka' | 'de' | 'ki' | 'el' | 'kl' | 'gn' | 'gu' | 'ht' | 'ht' | 'ha' | 'he' | 'hz' | 'hi' | 'ho' | 'hu' | 'is' | 'io' | 'ig' | 'id' | 'ia' | 'ie' | 'iu' | 'ik' | 'ga' | 'it' | 'ja' | 'jv' | 'kl' | 'kn' | 'kr' | 'ks' | 'kk' | 'ki' | 'rw' | 'ky' | 'kv' | 'kg' | 'ko' | 'kj' | 'ku' | 'kj' | 'ky' | 'lo' | 'la' | 'lv' | 'lb' | 'li' | 'li' | 'li' | 'ln' | 'lt' | 'lu' | 'lb' | 'mk' | 'mg' | 'ms' | 'ml' | 'dv' | 'mt' | 'gv' | 'mi' | 'mr' | 'mh' | 'ro' | 'ro' | 'mn' | 'na' | 'nv' | 'nv' | 'nd' | 'nr' | 'ng' | 'ne' | 'nd' | 'se' | 'no' | 'nb' | 'nn' | 'ii' | 'ny' | 'nn' | 'ie' | 'oc' | 'oj' | 'cu' | 'cu' | 'cu' | 'or' | 'om' | 'os' | 'os' | 'pi' | 'pa' | 'ps' | 'fa' | 'pl' | 'pt' | 'pa' | 'ps' | 'qu' | 'ro' | 'rm' | 'rn' | 'ru' | 'sm' | 'sg' | 'sa' | 'sc' | 'gd' | 'sr' | 'sn' | 'ii' | 'sd' | 'si' | 'si' | 'sk' | 'sl' | 'so' | 'st' | 'nr' | 'es' | 'su' | 'sw' | 'ss' | 'sv' | 'tl' | 'ty' | 'tg' | 'ta' | 'tt' | 'te' | 'th' | 'bo' | 'ti' | 'to' | 'ts' | 'tn' | 'tr' | 'tk' | 'tw' | 'ug' | 'uk' | 'ur' | 'ug' | 'uz' | 'ca' | 've' | 'vi' | 'vo' | 'wa' | 'cy' | 'fy' | 'wo' | 'xh' | 'yi' | 'yo' | 'za' | 'zu'; | ||
type ISO_639_2 = 'abk' | 'ace' | 'ach' | 'ada' | 'ady' | 'ady' | 'aar' | 'afh' | 'afr' | 'afa' | 'ain' | 'aka' | 'akk' | 'alb/sqi' | 'gsw' | 'ale' | 'alg' | 'gsw' | 'tut' | 'amh' | 'anp' | 'apa' | 'ara' | 'arg' | 'arp' | 'arw' | 'arm/hye' | 'rup' | 'art' | 'rup' | 'asm' | 'ast' | 'ast' | 'ath' | 'aus' | 'map' | 'ava' | 'ave' | 'awa' | 'aym' | 'aze' | 'ast' | 'ban' | 'bat' | 'bal' | 'bam' | 'bai' | 'bad' | 'bnt' | 'bas' | 'bak' | 'baq/eus' | 'btk' | 'bej' | 'bej' | 'bel' | 'bem' | 'ben' | 'ber' | 'bho' | 'bih' | 'bik' | 'byn' | 'bin' | 'bis' | 'byn' | 'zbl' | 'zbl' | 'zbl' | 'nob' | 'bos' | 'bra' | 'bre' | 'bug' | 'bul' | 'bua' | 'bur/mya' | 'cad' | 'spa' | 'cat' | 'cau' | 'ceb' | 'cel' | 'cai' | 'khm' | 'chg' | 'cmc' | 'cha' | 'che' | 'chr' | 'nya' | 'chy' | 'chb' | 'nya' | 'chi/zho' | 'chn' | 'chp' | 'cho' | 'zha' | 'chu' | 'chu' | 'chk' | 'chv' | 'nwc' | 'nwc' | 'syc' | 'rar' | 'cop' | 'cor' | 'cos' | 'cre' | 'mus' | 'crp' | 'cpe' | 'cpf' | 'cpp' | 'crh' | 'crh' | 'hrv' | 'cus' | 'cze/ces' | 'dak' | 'dan' | 'dar' | 'del' | 'chp' | 'div' | 'zza' | 'zza' | 'din' | 'div' | 'doi' | 'dgr' | 'dra' | 'dua' | 'dut/nld' | 'dum' | 'dyu' | 'dzo' | 'frs' | 'bin' | 'efi' | 'egy' | 'eka' | 'elx' | 'eng' | 'enm' | 'ang' | 'myv' | 'epo' | 'est' | 'ewe' | 'ewo' | 'fan' | 'fat' | 'fao' | 'fij' | 'fil' | 'fin' | 'fiu' | 'dut/nld' | 'fon' | 'fre/fra' | 'frm' | 'fro' | 'fur' | 'ful' | 'gaa' | 'gla' | 'car' | 'glg' | 'lug' | 'gay' | 'gba' | 'gez' | 'geo/kat' | 'ger/deu' | 'nds' | 'gmh' | 'goh' | 'gem' | 'kik' | 'gil' | 'gon' | 'gor' | 'got' | 'grb' | 'grc' | 'gre/ell' | 'kal' | 'grn' | 'guj' | 'gwi' | 'hai' | 'hat' | 'hat' | 'hau' | 'haw' | 'heb' | 'her' | 'hil' | 'him' | 'hin' | 'hmo' | 'hit' | 'hmn' | 'hun' | 'hup' | 'iba' | 'ice/isl' | 'ido' | 'ibo' | 'ijo' | 'ilo' | 'arc' | 'smn' | 'inc' | 'ine' | 'ind' | 'inh' | 'ina' | 'ile' | 'iku' | 'ipk' | 'ira' | 'gle' | 'mga' | 'sga' | 'iro' | 'ita' | 'jpn' | 'jav' | 'kac' | 'jrb' | 'jpr' | 'kbd' | 'kab' | 'kac' | 'kal' | 'xal' | 'kam' | 'kan' | 'kau' | 'pam' | 'kaa' | 'krc' | 'krl' | 'kar' | 'kas' | 'csb' | 'kaw' | 'kaz' | 'kha' | 'khi' | 'kho' | 'kik' | 'kmb' | 'kin' | 'zza' | 'kir' | 'zza' | 'tlh' | 'kom' | 'kon' | 'kok' | 'kor' | 'kos' | 'kpe' | 'kro' | 'kua' | 'kum' | 'kur' | 'kru' | 'kut' | 'kua' | 'kir' | 'lad' | 'lah' | 'lam' | 'day' | 'lao' | 'lat' | 'lav' | 'ast' | 'ltz' | 'lez' | 'lim' | 'lim' | 'lim' | 'lin' | 'lit' | 'jbo' | 'nds' | 'nds' | 'dsb' | 'loz' | 'lub' | 'lua' | 'lui' | 'smj' | 'lun' | 'luo' | 'lus' | 'ltz' | 'rup' | 'mac/mkd' | 'mad' | 'mag' | 'mai' | 'mak' | 'mlg' | 'may/msa' | 'mal' | 'div' | 'mlt' | 'mnc' | 'mdr' | 'man' | 'mni' | 'mno' | 'glv' | 'mao/mri' | 'arn' | 'arn' | 'mar' | 'chm' | 'mah' | 'mwr' | 'mas' | 'myn' | 'men' | 'mic' | 'mic' | 'min' | 'mwl' | 'moh' | 'mdf' | 'rum/ron' | 'rum/ron' | 'mkh' | 'hmn' | 'lol' | 'mon' | 'cnr' | 'mos' | 'mul' | 'mun' | 'nqo' | 'nah' | 'nau' | 'nav' | 'nav' | 'nde' | 'nbl' | 'ndo' | 'nap' | 'new' | 'nep' | 'new' | 'nia' | 'nic' | 'ssa' | 'niu' | 'zxx' | 'nog' | 'non' | 'nai' | 'nde' | 'frr' | 'sme' | 'nso' | 'nor' | 'nob' | 'nno' | 'zxx' | 'nub' | 'iii' | 'nym' | 'nya' | 'nyn' | 'nno' | 'nyo' | 'nzi' | 'ile' | 'oci' | 'pro' | 'arc' | 'xal' | 'oji' | 'chu' | 'chu' | 'nwc' | 'chu' | 'ori' | 'orm' | 'osa' | 'oss' | 'oss' | 'oto' | 'pal' | 'pau' | 'pli' | 'pam' | 'pag' | 'pan' | 'pap' | 'paa' | 'pus' | 'nso' | 'per/fas' | 'peo' | 'phi' | 'phn' | 'fil' | 'pon' | 'pol' | 'por' | 'pra' | 'pro' | 'pan' | 'pus' | 'que' | 'raj' | 'rap' | 'rar' | 'qaa-qtz' | 'roa' | 'rum/ron' | 'roh' | 'rom' | 'run' | 'rus' | 'kho' | 'sal' | 'sam' | 'smi' | 'smo' | 'sad' | 'sag' | 'san' | 'sat' | 'srd' | 'sas' | 'nds' | 'sco' | 'gla' | 'sel' | 'sem' | 'nso' | 'srp' | 'srr' | 'shn' | 'sna' | 'iii' | 'scn' | 'sid' | 'sgn' | 'bla' | 'snd' | 'sin' | 'sin' | 'sit' | 'sio' | 'sms' | 'den' | 'sla' | 'slo/slk' | 'slv' | 'sog' | 'som' | 'son' | 'snk' | 'wen' | 'nso' | 'sot' | 'sai' | 'nbl' | 'alt' | 'sma' | 'spa' | 'srn' | 'zgh' | 'suk' | 'sux' | 'sun' | 'sus' | 'swa' | 'ssw' | 'swe' | 'gsw' | 'syr' | 'tgl' | 'tah' | 'tai' | 'tgk' | 'tmh' | 'tam' | 'tat' | 'tel' | 'ter' | 'tet' | 'tha' | 'tib/bod' | 'tig' | 'tir' | 'tem' | 'tiv' | 'tlh' | 'tli' | 'tpi' | 'tkl' | 'tog' | 'ton' | 'tsi' | 'tso' | 'tsn' | 'tum' | 'tup' | 'tur' | 'ota' | 'tuk' | 'tvl' | 'tyv' | 'twi' | 'udm' | 'uga' | 'uig' | 'ukr' | 'umb' | 'mis' | 'und' | 'hsb' | 'urd' | 'uig' | 'uzb' | 'vai' | 'cat' | 'ven' | 'vie' | 'vol' | 'vot' | 'wak' | 'wln' | 'war' | 'was' | 'wel/cym' | 'fry' | 'him' | 'wal' | 'wal' | 'wol' | 'xho' | 'sah' | 'yao' | 'yap' | 'yid' | 'yor' | 'ypk' | 'znd' | 'zap' | 'zza' | 'zza' | 'zen' | 'zha' | 'zul' | 'zun'; | ||
} | ||
declare namespace I18n { | ||
export { Locale }; | ||
export type Props<Prefix extends string, Key extends string> = Lowercase<Common.PrefixedKey<Prefix, Key>>; | ||
export type Map<Prefix extends string, Key extends string> = { | ||
[K in Props<Prefix, Key>]?: string; | ||
}; | ||
export type Patch<Name extends Locale.ISO_639_1, Prefix extends string, Key extends string> = (name: Name, map: Map<Prefix, Key>) => Name; | ||
export type RegisterPatch<Name extends Locale.ISO_639_1, Prefix extends string, Key extends string> = (patch: Patch<Name, Prefix, Key>) => Name; | ||
export type Register<Name extends Locale.ISO_639_1, Prefix extends string, Key extends string> = (name: Name, map: Map<Prefix, Key>) => RegisterPatch<Name, Prefix, Key>; | ||
} | ||
declare namespace Theming { | ||
type Props<Prefix extends string, Key extends string> = Uppercase<Common.PrefixedKey<Prefix, Key> | 'GLOBAL' | 'PROPERTIES'>; | ||
type Map<Prefix extends string, Key extends string> = { | ||
[K in Props<Prefix, Key>]?: string; | ||
}; | ||
type Patch<Name extends string, Prefix extends string, Key extends string> = (name: Name, map: Map<Prefix, Key>) => Name; | ||
type RegisterPatch<Name extends string, Prefix extends string, Key extends string> = (patch: Patch<Name, Prefix, Key>) => Name; | ||
type Register<Name extends string, Prefix extends string, Key extends string> = (name: Name, map: Map<Prefix, Key>) => RegisterPatch<Name, Prefix, Key>; | ||
} | ||
declare const STORE: Record<string, unknown>; | ||
type ThemeName = string | null; | ||
type Required<T> = { | ||
[P in keyof T]-?: T[P]; | ||
}; | ||
type LoaderCallback = () => Promise<void>; | ||
type ThemeEncroachCss = { | ||
mode: 'after' | 'before'; | ||
}; | ||
type OptionalThemeDetails = { | ||
cache?: boolean; | ||
encroachCss?: ThemeEncroachCss | false; | ||
loglevel?: 'debug' | 'info' | 'warn' | 'error' | 'silent'; | ||
name?: ThemeName; | ||
}; | ||
type ThemeDetails = Required<OptionalThemeDetails>; | ||
type RegisterThemeOptions = OptionalThemeDetails & { | ||
detect?: 'auto' | 'fixed'; | ||
}; | ||
type RegisterTranslationOptions = { | ||
name?: Generic.I18n.Locale.ISO_639_1; | ||
}; | ||
type RegisterOptions = { | ||
theme?: RegisterThemeOptions; | ||
translations?: Generic.I18n.RegisterPatch<Generic.I18n.Locale.ISO_639_1, string, string> | Generic.I18n.RegisterPatch<Generic.I18n.Locale.ISO_639_1, string, string>[] | Set<Generic.I18n.RegisterPatch<Generic.I18n.Locale.ISO_639_1, string, string>>; | ||
translation?: RegisterTranslationOptions; | ||
}; | ||
declare const patchThemeTag: (themeName: string, tagName: Generic.Theming.Props<string, string>, css: string) => void; | ||
declare const patchTheme: (name: string, map: Generic.Theming.Map<string, string>) => string; | ||
declare const getThemeDetails: (element: HTMLElement | ParentNode | null) => ThemeDetails; | ||
declare const getTheme: (element: HTMLElement | ParentNode | null) => string | null; | ||
declare const register: (themes: Generic.Theming.RegisterPatch<string, string, string> | Generic.Theming.RegisterPatch<string, string, string>[] | Set<Generic.Theming.RegisterPatch<string, string, string>>, loaders: LoaderCallback | LoaderCallback[] | Set<LoaderCallback>, options?: RegisterOptions) => Promise<void[]>; | ||
type RobustStoreSetItemOptions = { | ||
enumerable?: boolean; | ||
immutable?: boolean; | ||
}; | ||
declare class RobustStore { | ||
private static options; | ||
private static instances; | ||
private readonly store; | ||
private constructor(); | ||
static getInstance(identifier: string, object: Record<string, unknown>): RobustStore; | ||
private createStore; | ||
private recursiveSetItem; | ||
setItem(key: string, value: unknown, options?: RobustStoreSetItemOptions): RobustStore; | ||
getItem(key: string | string[]): unknown; | ||
} | ||
declare const setThemeStyle: (elm: HTMLElement, themeDetails: ThemeDetails) => void; | ||
declare namespace Generic { | ||
export type { Common, Element, I18n, Theming }; | ||
} | ||
interface Library<Prefix extends string, Key extends string, Tag extends string> { | ||
readonly Prefix: Prefix; | ||
readonly Key: Key; | ||
readonly Tag: Tag; | ||
} | ||
declare class Theme<Prefix extends string, Key extends string, Tag extends string> implements Library<Prefix, Key, Tag> { | ||
readonly Prefix: Prefix; | ||
readonly Key: Key; | ||
readonly Tag: Tag; | ||
readonly createTheme: Generic.Theming.Register<string, Prefix, Tag>; | ||
readonly createTranslation: Generic.I18n.Register<I18n.Locale.ISO_639_1, Prefix, Key>; | ||
constructor(prefix: Prefix, keyEnum: unknown, tagEnum: unknown); | ||
} | ||
export { Generic, LoaderCallback, RegisterOptions, RobustStore, STORE, Theme, ThemeDetails, getTheme, getThemeDetails, patchTheme, patchThemeTag, register, setThemeStyle }; | ||
export * from 'adopted-style-sheets'; |
{ | ||
"name": "@a11y-ui/core", | ||
"version": "1.0.1-rc.66", | ||
"version": "1.0.1-rc.67", | ||
"license": "EUPL-1.2", | ||
@@ -19,25 +19,14 @@ "description": "Contains the generic types and utils to provide an overall web component architecture.", | ||
"scripts": { | ||
"build": "unbuild && node scripts/minify.cjs", | ||
"build": "unbuild", | ||
"prepack": "npm run build" | ||
}, | ||
"dependencies": { | ||
"loglevel": "1.8.1" | ||
"adopted-style-sheets": "1.0.0-rc.0" | ||
}, | ||
"devDependencies": { | ||
"@types/clean-css": "4.2.6", | ||
"@types/mocha": "10.0.1", | ||
"@types/node": "18.15.3", | ||
"@typescript-eslint/eslint-plugin": "5.55.0", | ||
"@typescript-eslint/parser": "5.55.0", | ||
"chai": "4.3.7", | ||
"esbuild": "0.17.12", | ||
"esbuild-register": "3.4.2", | ||
"eslint": "8.36.0", | ||
"jsdom": "21.1.1", | ||
"jsdom-global": "3.0.2", | ||
"mocha": "10.2.0", | ||
"mock-local-storage": "1.1.23", | ||
"nyc": "15.1.0", | ||
"prettier": "2.8.4", | ||
"terser": "5.16.6", | ||
"typescript": "5.0.2", | ||
@@ -44,0 +33,0 @@ "unbuild": "1.1.2" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
7
2
15472
7
+ Addedadopted-style-sheets@1.0.0-rc.0(transitive)
- Removedloglevel@1.8.1