@webority/tokens 0.149.0 → 0.152.0
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/brand.d.ts +39 -25
- package/dist/brand.js +2 -2
- package/dist/build.d.ts +41 -0
- package/dist/build.js +5 -5
- package/dist/canvas/webority-phone.json +12 -12
- package/dist/canvas/webority-web-390.json +35 -3
- package/dist/canvas/webority-web.json +35 -3
- package/dist/check.d.ts +37 -0
- package/dist/check.js +3 -3
- package/dist/cli.d.ts +15 -96
- package/dist/cli.js +1 -1
- package/dist/emit/canvas.d.ts +8 -0
- package/dist/emit/canvas.js +1 -1
- package/dist/emit/email.d.ts +32 -0
- package/dist/emit/email.js +2 -2
- package/dist/emit/meanings.d.ts +3 -0
- package/dist/emit/phone.d.ts +26 -0
- package/dist/emit/phone.js +3 -3
- package/dist/emit/web.d.ts +18 -0
- package/dist/emit/web.js +14 -14
- package/dist/guards.d.ts +3 -0
- package/dist/guards.js +1 -0
- package/dist/index.d.ts +7 -7
- package/dist/meanings.json +97 -1
- package/dist/model/colour.d.ts +8 -0
- package/dist/model/colour.js +1 -1
- package/dist/model/contrast.d.ts +26 -0
- package/dist/model/contrast.js +1 -1
- package/dist/model/index.d.ts +52 -0
- package/dist/model/length.d.ts +21 -0
- package/dist/model/length.js +1 -1
- package/dist/model/load.d.ts +32 -0
- package/dist/model/load.js +1 -1
- package/dist/model/references.d.ts +3 -0
- package/dist/model/references.js +1 -1
- package/dist/model/resolve.d.ts +4 -0
- package/dist/model/resolve.js +2 -2
- package/dist/names.d.ts +1 -11
- package/dist/names.js +1 -1
- package/dist/outputs.d.ts +51 -102
- package/dist/present.d.ts +1 -0
- package/dist/present.js +1 -0
- package/dist/ramp.d.ts +8 -0
- package/dist/ramp.js +1 -1
- package/dist/source/meaning.tokens.json +144 -0
- package/dist/source/palette.tokens.json +9 -9
- package/dist/source/scale.tokens.json +39 -2
- package/dist/upgrade/classes.d.ts +13 -0
- package/dist/upgrade/classes.js +2 -2
- package/dist/upgrade/components.d.ts +19 -0
- package/dist/upgrade/components.js +3 -3
- package/dist/upgrade/css.d.ts +28 -0
- package/dist/upgrade/css.js +2 -2
- package/dist/upgrade/index.d.ts +64 -0
- package/dist/upgrade/index.js +2 -2
- package/dist/upgrade/razorAttributes.d.ts +19 -0
- package/dist/upgrade/razorAttributes.js +2 -2
- package/dist/upgrade/razorTags.d.ts +19 -0
- package/dist/upgrade/razorTags.js +2 -2
- package/dist/upgrade/razorValueSplits.d.ts +19 -0
- package/dist/upgrade/razorValueSplits.js +2 -2
- package/dist/upgrade/source.d.ts +19 -0
- package/dist/upgrade/source.js +3 -3
- package/dist/upgrade/tagScan.d.ts +7 -0
- package/dist/upgrade/tagScan.js +1 -1
- package/dist/upgrade/themeReads.d.ts +55 -0
- package/dist/upgrade/themeReads.js +2 -2
- package/dist/upgrade/valueSplits.d.ts +23 -0
- package/dist/upgrade/valueSplits.js +3 -3
- package/dist/upgrade/wrapperValues.d.ts +71 -0
- package/dist/upgrade/wrapperValues.js +1 -1
- package/dist/webority.d.ts +1 -0
- package/package.json +8 -3
- package/renames/0.130.0.json +15 -0
- package/renames/0.152.0.json +30 -0
- package/renames/renames.d.ts +1 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { BrandInput } from "./load.ts";
|
|
2
|
+
export type Mode = "light" | "dark";
|
|
3
|
+
export type Platform = "web" | "phone";
|
|
4
|
+
export interface Context {
|
|
5
|
+
mode: Mode;
|
|
6
|
+
platform: Platform;
|
|
7
|
+
width: number | null;
|
|
8
|
+
}
|
|
9
|
+
export interface Token {
|
|
10
|
+
/** dotted path, such as "color.text-muted" */
|
|
11
|
+
path: string;
|
|
12
|
+
/** first segment */
|
|
13
|
+
group: string;
|
|
14
|
+
/** the rest joined with hyphens */
|
|
15
|
+
name: string;
|
|
16
|
+
/** $type, inherited from the group when the token has none */
|
|
17
|
+
type: string;
|
|
18
|
+
description: string | null;
|
|
19
|
+
/** null when the token has no mark */
|
|
20
|
+
platforms: Platform[] | null;
|
|
21
|
+
internal: boolean;
|
|
22
|
+
/** true only for a token a brand file declares that the library does not */
|
|
23
|
+
brandOwn: boolean;
|
|
24
|
+
/** the com.webority object, empty when absent */
|
|
25
|
+
extensions: Record<string, unknown>;
|
|
26
|
+
}
|
|
27
|
+
export interface Model {
|
|
28
|
+
/** every path declared by the base set (and the brand file) */
|
|
29
|
+
tokens: Map<string, Token>;
|
|
30
|
+
/** light and dark x web at 1440 and 390, and light and dark x phone */
|
|
31
|
+
contexts: Context[];
|
|
32
|
+
existsIn: (path: string, context: Context) => boolean;
|
|
33
|
+
/** $value after overrides, references kept */
|
|
34
|
+
valueIn: (path: string, context: Context) => unknown;
|
|
35
|
+
/** references followed, color-mix computed */
|
|
36
|
+
resolvedIn: (path: string, context: Context) => unknown;
|
|
37
|
+
/** the first "{a.b}" the value names, as "a.b"; emitters never parse value strings */
|
|
38
|
+
referenceIn: (path: string, context: Context) => string | undefined;
|
|
39
|
+
source: {
|
|
40
|
+
package: string;
|
|
41
|
+
version: string;
|
|
42
|
+
brand: string | null;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Loads, validates and indexes the source. Throws one Error listing every refusal.
|
|
47
|
+
* With a brand, the layer's base overrides every mode and its dark overrides the dark context only.
|
|
48
|
+
*/
|
|
49
|
+
export declare function loadModel(options?: {
|
|
50
|
+
resolverPath?: string;
|
|
51
|
+
brand?: BrandInput;
|
|
52
|
+
}): Promise<Model>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Token } from "./index.ts";
|
|
2
|
+
type Tier = "md" | "lg" | "xl";
|
|
3
|
+
export declare const BREAKPOINT_PX: Readonly<Record<Tier, number>>;
|
|
4
|
+
export declare const TOUCH_MEDIA: string;
|
|
5
|
+
/**
|
|
6
|
+
* @returns the touch value, or null when the token has none
|
|
7
|
+
*/
|
|
8
|
+
export declare function touchValue(token: Pick<Token, "extensions">): unknown;
|
|
9
|
+
/**
|
|
10
|
+
* Returns a rem length, or a clamp() that scales linearly from `at390Px` at 390px to `at1440Px` at `fluidUntilPx`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function fluidLength(at390Px: number, at1440Px: number, fluidUntilPx?: number): string;
|
|
13
|
+
/**
|
|
14
|
+
* @returns each tier the token sets, in md, lg, xl order
|
|
15
|
+
*/
|
|
16
|
+
export declare function breakpointRules(token: Pick<Token, "extensions">): {
|
|
17
|
+
tier: string;
|
|
18
|
+
px: number;
|
|
19
|
+
value: string;
|
|
20
|
+
}[];
|
|
21
|
+
export {};
|
package/dist/model/length.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
import{isRecord as e}from"../guards.js";var t={md:768,lg:992,xl:1200},n=`(max-width: 575.98px), (pointer: coarse)`,r=e=>Object.hasOwn(t,e);function i(e){return e.extensions?.touch??null}function a(e){return String(Number(e.toFixed(4)))}function o(e,t,n=1440){let r=e,i=t,o=n;if(!(o>390&&o<=1440))throw Error(`fluidUntil ${o} must be above 390 and at most 1440.`);if(r===i)return`${a(i/16)}rem`;let s=(i-r)/(o-390),c=`${a((r-s*390)/16)}rem ${s<0?`-`:`+`} ${a(Math.abs(s)*100)}vw`;return`clamp(${a(Math.min(r,i)/16)}rem, ${c}, ${a(Math.max(r,i)/16)}rem)`}function s(n){let i=n.extensions?.breakpoints;if(i==null)return[];if(!e(i))throw Error(`breakpoints must be an object of md, lg or xl values.`);for(let e of Object.keys(i))if(!Object.hasOwn(t,e))throw Error(`breakpoint "${e}" is not a tier; use md, lg or xl.`);return Object.keys(t).filter(r).filter(e=>Object.hasOwn(i,e)).map(e=>{let n=i[e];if(typeof n!=`string`)throw Error(`breakpoint "${e}" must be a length string.`);return{tier:e,px:t[e],value:n}})}export{t as BREAKPOINT_PX,n as TOUCH_MEDIA,s as breakpointRules,o as fluidLength,i as touchValue};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { BrandLayer } from "../brand.ts";
|
|
2
|
+
import type { Token } from "./index.ts";
|
|
3
|
+
export type BrandInput = Omit<BrandLayer, "email"> & {
|
|
4
|
+
email?: BrandLayer["email"];
|
|
5
|
+
};
|
|
6
|
+
export interface Entry {
|
|
7
|
+
value: unknown;
|
|
8
|
+
file: string;
|
|
9
|
+
}
|
|
10
|
+
export type Layer = Map<string, Entry>;
|
|
11
|
+
export interface Sources {
|
|
12
|
+
tokens: Map<string, Token>;
|
|
13
|
+
layers: {
|
|
14
|
+
base: Layer;
|
|
15
|
+
dark: Layer;
|
|
16
|
+
phone: Layer;
|
|
17
|
+
width390: Layer;
|
|
18
|
+
brandBase: Layer;
|
|
19
|
+
brandDark: Layer;
|
|
20
|
+
brandPhoneLight: Layer;
|
|
21
|
+
brandPhoneDark: Layer;
|
|
22
|
+
};
|
|
23
|
+
cssNames: Map<string, string>;
|
|
24
|
+
source: {
|
|
25
|
+
package: string;
|
|
26
|
+
version: string;
|
|
27
|
+
brand: string | null;
|
|
28
|
+
};
|
|
29
|
+
refusals: string[];
|
|
30
|
+
}
|
|
31
|
+
export declare function line(file: string, path: string, rule: string, fix: string): string;
|
|
32
|
+
export declare function readSources(resolverPath: string, brand: BrandInput | undefined): Promise<Sources>;
|
package/dist/model/load.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__toESM as e}from"../_virtual/_rolldown/runtime.js";import{require__2020 as t}from"../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/2020.js";import{STEPS as
|
|
1
|
+
import{__toESM as e}from"../_virtual/_rolldown/runtime.js";import{require__2020 as t}from"../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/2020.js";import{messageOf as n}from"../guards.js";import{STEPS as r,cssVarOfPath as i}from"../names.js";import{present as a}from"../present.js";import{readFile as o}from"node:fs/promises";import{basename as s,dirname as c,resolve as l}from"node:path";var u=e(t(),1),d=new URL(`../../package.json`,import.meta.url),f=new URL(`../../schema/webority-tokens.schema.json`,import.meta.url),p=`Declare each token in one source file.`;function m(e,t,n,r){return`${e}: ${t}: ${n}. ${r}`}function h(e,t){e.includes(t)||e.push(t)}function g(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function _(e){return g(e)&&typeof e.$ref==`string`}function v(e){return Array.isArray(e)&&e.every(e=>e===`web`||e===`phone`)}var y=e=>Object.hasOwn(r,e);function b(e){let t=e.$extensions;if(!g(t))return{};let n=t[`com.webority`];return g(n)?n:{}}function x(e){let t=[],n=(e,r,i)=>{for(let[a,o]of Object.entries(e)){if(a.startsWith(`$`)||!g(o))continue;let e=[...r,a],s=typeof o.$type==`string`?o.$type:i.type,c={...i.extensions,...b(o)};`$value`in o?t.push({path:e.join(`.`),token:o,type:s,extensions:c}):n(o,e,{type:s,extensions:c})}};return n(e,[],{type:void 0,extensions:{}}),t}function S(e,t){let[n,...r]=e.path.split(`.`),i=e.extensions;return{path:e.path,group:a(n,`the token group`),name:r.join(`-`),type:t,description:typeof e.token.$description==`string`?e.token.$description:null,platforms:v(i.platforms)?i.platforms:null,internal:i.internal===!0,brandOwn:!1,extensions:i}}function C(e,t,n,a){let{path:o,group:s,name:c}=e,l;try{l=i(o)}catch{h(n,m(t,o,`its group ${s} has no CSS prefix`,`Add the group to PREFIX in names.ts.`))}if(y(s)&&!r[s].includes(c)&&h(n,m(t,o,`"${c}" is not a step of ${s}`,`Use one of: ${r[s].join(`, `)}.`)),l!==void 0){let e=a.get(l);e===void 0?a.set(l,o):e!==o&&h(n,m(t,o,`its CSS name ${l} is also the name of ${e}`,`Rename one of the two tokens.`))}}function w(e,t,n,r){let i={...e.extensions};return(i.platforms!==void 0||i.internal!==void 0)&&(h(r,m(t,e.path,`changes the platforms or internal mark`,`Set marks in the base set only.`)),delete i.platforms,delete i.internal),Object.assign(n.extensions,i),{value:e.token.$value,file:t}}function T(e,t,n){h(e,m(t,n,`overrides a token the base set does not declare`,`Declare ${n} in the base set first.`))}function E(e,t,n){let r=new Map;for(let{ref:i,data:a}of e)if(a)for(let e of x(a)){let a=t.get(e.path);a?r.set(e.path,w(e,i,a,n)):T(n,i,e.path)}return r}async function D(e,t){let r=s(e),i=[],v=c(e),y;try{y=JSON.parse(await o(e,`utf8`))}catch(e){throw Error(m(r,`(file)`,`cannot be read as JSON (${n(e)})`,`Restore the file or correct its path.`))}if(!Array.isArray(y.sets)||y.sets.length===0||!y.sets.every(e=>g(e)&&Array.isArray(e.sources)&&e.sources.every(_)))throw Error(m(r,`sets`,`must be a non-empty array of { sources: [{ "$ref": string }] }`,`Match the resolver of the library source.`));if(!Array.isArray(y.modifiers))throw Error(m(r,`modifiers`,`must be an array`,`Match the resolver of the library source.`));let b=y.sets,D=y.modifiers,O=[[`mode`,[`light`,`dark`]],[`platform`,[`web`,`phone`]],[`width`,[`1440`,`390`]]];if(D.length!==O.length)throw Error(m(r,`modifiers`,`must hold the mode, platform and width modifiers, in that order`,`Match the resolver of the library source.`));let ee=e=>Array.isArray(e)&&e.length===0;O.forEach(([e,t],n)=>{let i=D[n],o=g(i)&&g(i.contexts)?i.contexts:void 0,s=o===void 0?``:Object.keys(o).sort().join(`,`);if(!(g(i)&&o!==void 0&&i.name===e&&s===[...t].sort().join(`,`)&&t.every(e=>{let t=o[e];return Array.isArray(t)&&t.every(_)})&&ee(o[a(t[0],`the default context of the ${e} modifier`)])))throw Error(m(r,`modifiers.${e}`,`is not the ${e} modifier with the contexts ${t.join(`, `)} and an empty list for ${t[0]}`,`Match the resolver of the library source, whose default context lists no file.`))});let k=(e,t)=>a(D.find(t=>t.name===e),`the ${e} modifier`).contexts[t],A=b.flatMap(e=>e.sources.map(e=>e.$ref)),j=k(`mode`,`dark`).map(e=>e.$ref),M=k(`platform`,`phone`).map(e=>e.$ref),N=k(`width`,`390`).map(e=>e.$ref),P=JSON.parse(await o(f,`utf8`)),F=new u.default({allErrors:!0,strict:!1});F.addSchema(P);let I=F.compile(P),L=F.getSchema(`${P.$id}#/$defs/sourceMeaning`);if(!L)throw Error(`webority-tokens: the schema has no sourceMeaning definition.`);let R=new Map,z=async e=>{let t=l(v,e);if(R.has(t))return a(R.get(t),`the cached file ${t}`);let r;try{r=JSON.parse(await o(t,`utf8`))}catch(r){return h(i,m(e,`(file)`,`cannot be read as JSON (${n(r)})`,`Restore the file or correct its $ref in the resolver.`)),R.set(t,null),null}let c=[];I(r)||c.push(...I.errors??[]),s(t)===`meaning.tokens.json`&&!L(r)&&c.push(...L.errors??[]);for(let t of c){if(t.keyword===`if`)continue;let n=t.instancePath.slice(1).split(`/`).filter(e=>e!==``),r=n.length===0?`(file)`:n.map(e=>e.replace(/~1/g,`/`).replace(/~0/g,`~`)).join(`.`),a=t.params?.additionalProperty??t.params?.propertyName,o=a===void 0?String(t.message):`${String(t.message)} "${a}"`;h(i,m(e,r,o,`Correct it against schema/webority-tokens.schema.json.`))}return R.set(t,r),r},B=async e=>Promise.all(e.map(async e=>({ref:e,data:await z(e)}))),V=await B(A),H=await B(j),U=await B(M),W=await B(N),G=new Map,K=new Map,q=new Map;for(let{ref:e,data:t}of V)if(t)for(let n of x(t)){if(G.has(n.path)){h(i,m(e,n.path,`is already declared in ${a(q.get(n.path),`the base entry at ${n.path}`).file}`,p));continue}if(n.type===void 0||n.type===``){h(i,m(e,n.path,`has no $type`,`Add $type to the token or to its group.`));continue}let t=S(n,n.type);C(t,e,i,K),G.set(n.path,t),q.set(n.path,{value:n.token.$value,file:e})}let J=E(H,G,i),te=E(U,G,i),ne=E(W,G,i),Y=new Map,X=new Map,Z=new Map,Q=new Map;if(t){let e=`brand ${t.name}`;for(let n of x(t.base)){let t=G.get(n.path);if(t){Y.set(n.path,w(n,e,t,i));continue}if(n.type===void 0||n.type===``){h(i,m(e,n.path,`has no $type`,`Add $type to the token or to its group.`));continue}let r=S(n,n.type);C(r,e,i,K),r.brandOwn=!0,G.set(n.path,r),Y.set(n.path,{value:n.token.$value,file:e})}for(let n of x(t.dark)){let t=G.get(n.path);t?X.set(n.path,w(n,e,t,i)):T(i,e,n.path)}let n=[[t.phone?.light,Z],[t.phone?.dark,Q]];for(let[t,r]of n)if(g(t))for(let n of x(t)){let t=G.get(n.path);t?r.set(n.path,w(n,e,t,i)):T(i,e,n.path)}}let $=JSON.parse(await o(d,`utf8`)),re={package:$.name,version:$.version,brand:t?.name??null};return{tokens:G,layers:{base:q,dark:J,phone:te,width390:ne,brandBase:Y,brandDark:X,brandPhoneLight:Z,brandPhoneDark:Q},cssNames:K,source:re,refusals:i}}export{m as line,D as readSources};
|
package/dist/model/references.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{isRecord as e}from"../guards.js";import{present as t}from"../present.js";function n(r){return typeof r==`string`?[...r.matchAll(/\{([a-z0-9-]+(?:\.[a-z0-9-]+)+)\}/g)].map(e=>t(e[1],`the match's group name`)):Array.isArray(r)?r.flatMap(n):e(r)?Object.values(r).flatMap(n):[]}function r(n,i){if(typeof n==`string`){let e=/^\{([a-z0-9-]+(?:\.[a-z0-9-]+)+)\}$/.exec(n);return e?i(t(e[1],`the whole match's group name`),!0):n.replace(/\{([a-z0-9-]+(?:\.[a-z0-9-]+)+)\}/g,(e,t)=>String(i(t,!1)))}return Array.isArray(n)?n.map(e=>r(e,i)):e(n)?Object.fromEntries(Object.entries(n).map(([e,t])=>[e,r(t,i)])):n}function i(e){let t=[],n=new Set,r=new Set,i=[],a=new Set,o=s=>{i.push(s),a.add(s);for(let c of e.get(s)??[])if(e.has(c)){if(a.has(c)){let e=[...i.slice(i.indexOf(c)),c],r=[...new Set(e)].sort().join(`,`);n.has(r)||(n.add(r),t.push(e))}else r.has(c)||o(c)}i.pop(),a.delete(s),r.add(s)};for(let t of e.keys())r.has(t)||o(t);return t}export{i as findCycles,r as mapReferences,n as referencesIn};
|
package/dist/model/resolve.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`));return{tokens:
|
|
1
|
+
import{messageOf as e}from"../guards.js";import{cssVarOfPath as t}from"../names.js";import{present as n}from"../present.js";import{resolveColour as r}from"./colour.js";import{line as i}from"./load.js";import{findCycles as a,mapReferences as o,referencesIn as s}from"./references.js";function c(){return[{mode:`light`,platform:`web`,width:1440},{mode:`dark`,platform:`web`,width:1440},{mode:`light`,platform:`web`,width:390},{mode:`dark`,platform:`web`,width:390},{mode:`light`,platform:`phone`,width:null},{mode:`dark`,platform:`phone`,width:null}]}function l(e){return`${e.mode}|${e.platform}|${e.width}`}function u(e,t,n){if(typeof e==`string`)return e;if(typeof e==`number`)return String(e);if(typeof e==`object`&&e&&`value`in e&&`unit`in e)return`${e.value}${e.unit}`;throw Error(`model: ${t} cannot sit inside the text of ${n}`)}function d({tokens:d,layers:f,cssNames:p,source:m,refusals:h}){let g=c(),_=e=>{let t=g.find(t=>t.mode===e.mode&&t.platform===e.platform&&t.width===e.width);if(!t)throw Error(`model: ${JSON.stringify(e)} is not one of the model's contexts`);return t},v=e=>{let t=[f.base];return e.mode===`dark`&&t.push(f.dark),e.platform===`phone`&&t.push(f.phone),e.platform===`web`&&e.width===390&&t.push(f.width390),t.push(f.brandBase),e.mode===`dark`&&t.push(f.brandDark),e.platform===`phone`&&t.push(e.mode===`dark`?f.brandPhoneDark:f.brandPhoneLight),t},y=new Set([f.brandBase,f.brandDark,f.brandPhoneLight,f.brandPhoneDark]),b=(e,t,r)=>r.platform===`phone`&&y.has(e)&&t.startsWith(`font.`)&&!n(d.get(t),`the token at ${t}`).extensions.faces,x=(e,t)=>{let n=v(t).reverse();for(let r of n){if(b(r,e,t)||r===f.brandBase&&t.mode===`dark`&&f.dark.has(e))continue;let n=r.get(e);if(n)return n}},S=(e,t)=>n(x(e,t),`the entry for ${e}`),C=(e,t)=>{let n=d.get(e);return n?n.platforms===null||n.platforms.includes(t.platform):!1},w=(e,t)=>{if(!C(e,t))throw Error(`model: ${e} does not exist on ${t.platform}`)},T=new Map,E=(e,i)=>{let a=`${l(i)}|${e}`;if(T.has(a))return T.get(a);w(e,i);let s=n(d.get(e),`the token at ${e}`),{value:c}=S(e,i),f;if(s.type===`color`){if(typeof c!=`string`)throw Error(`model: ${e} is a colour with a value that is not text`);if(s.extensions.derive)throw Error(`model: ${e} uses derive, which is removed; set the colour itself`);let n=String(o(c,e=>`var(${t(e)})`));f=r(n,e=>D(e,i))}else f=o(c,(t,n)=>{let r=E(t,i);return n?r:u(r,t,e)});return T.set(a,f),f},D=(e,t)=>{let r=p.get(e);if(r===void 0||!C(r,t))return;if(n(d.get(r),`the token at ${r}`).type===`color`){let e=E(r,t);return typeof e==`string`?e:void 0}let{value:i}=S(r,t);return typeof i==`string`?i:void 0},O=()=>{for(let e of Object.values(f))for(let[t,n]of e)for(let e of s(n.value))if(!d.has(e)){let r=i(n.file,t,`references ${e}, which no token declares`,`Declare ${e} or correct the name.`);h.includes(r)||h.push(r)}},k=()=>{for(let e of g){let t=new Map;for(let n of d.keys())C(n,e)&&t.set(n,s(S(n,e).value));for(let r of a(t)){let t=n(r[0],`the first token of the cycle`),a=i(S(t,e).file,t,`reference cycle ${r.join(` -> `)}`,`Point one of these tokens at a value instead.`);h.includes(a)||h.push(a)}}},A=()=>{for(let e of g)for(let t of d.keys()){if(!C(t,e))continue;let{file:n,value:r}=S(t,e);for(let a of s(r))if(d.has(a)&&!C(a,e)){let r=i(n,t,`references ${a}, which does not exist on ${e.platform}`,`Mark ${t} for the platform that has ${a}, or give ${t} a ${e.platform} override.`);h.includes(r)||h.push(r)}}},j=()=>{for(let t of g)for(let n of d.keys())if(C(n,t))try{E(n,t)}catch(r){let a=i(S(n,t).file,n,e(r).replace(/\.$/,``),`Correct the value or the tokens it references.`);h.includes(a)||h.push(a)}},M=h.length;O();let N=h.length>M;if(N||k(),N||A(),h.length===0&&j(),h.length>0)throw Error(h.join(`
|
|
2
|
+
`));return{tokens:d,contexts:c(),existsIn:(e,t)=>C(e,_(t)),valueIn:(e,t)=>{let n=_(t);return w(e,n),structuredClone(S(e,n).value)},resolvedIn:(e,t)=>{let n=_(t);return structuredClone(E(e,n))},referenceIn:(e,t)=>{let n=_(t);return w(e,n),s(S(e,n).value)[0]},source:m}}export{c as buildContexts,d as buildModel};
|
package/dist/names.d.ts
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const STEPS: {
|
|
3
|
-
readonly space: readonly string[];
|
|
4
|
-
readonly radius: readonly string[];
|
|
5
|
-
readonly text: readonly string[];
|
|
6
|
-
readonly weight: readonly string[];
|
|
7
|
-
readonly "letter-spacing": readonly string[];
|
|
8
|
-
readonly leading: readonly string[];
|
|
9
|
-
};
|
|
10
|
-
|
|
1
|
+
export declare const STEPS: Readonly<Record<"space" | "radius" | "text" | "weight" | "letter-spacing" | "leading", readonly string[]>>;
|
|
11
2
|
export declare function cssVar(group: string, name: string): string;
|
|
12
|
-
|
|
13
3
|
export declare function cssVarOfPath(path: string): string;
|
package/dist/names.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
import{present as e}from"./present.js";var t={palette:`--wui-`,color:`--color-`,effect:`--wui-`,space:`--wui-space-`,radius:`--wui-radius-`,text:`--wui-fs-`,weight:`--wui-fw-`,leading:`--wui-lh-`,"letter-spacing":`--wui-letter-spacing-`,font:`--wui-font-`,shadow:`--wui-shadow-`,motion:`--wui-`,section:`--wui-section-`,size:`--wui-`,z:`--wui-z-`,component:`--wui-`},n={space:[`none`,`xxs`,`xs`,`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`,`4xl`],radius:[`none`,`sm`,`md`,`lg`,`xl`,`pill`],text:[`xs`,`sm`,`base`,`lg`,`xl`,`2xl`,`3xl`,`4xl`,`5xl`,`6xl`,`7xl`,`8xl`],weight:[`normal`,`medium`,`semibold`,`bold`],"letter-spacing":[`tight`,`normal`,`wide`],leading:[`heading`,`body`,`display`,`prose`,`lead`]};function r(e,n){let r=t[e];if(r===void 0)throw Error(`webority-tokens: ${e} is not a token group; add it to PREFIX in names.ts.`);return`${r}${n}`}function i(t){let[n,...i]=t.split(`.`);return r(e(n,`the token group`),i.join(`-`))}export{n as STEPS,r as cssVar,i as cssVarOfPath};
|
package/dist/outputs.d.ts
CHANGED
|
@@ -1,30 +1,41 @@
|
|
|
1
1
|
export type Mode = "light" | "dark";
|
|
2
2
|
export type Platform = "web" | "phone";
|
|
3
|
-
|
|
4
3
|
export interface ThemeTokensV2 {
|
|
5
4
|
format: "webority-theme-tokens/2";
|
|
6
|
-
source: {
|
|
5
|
+
source: {
|
|
6
|
+
package: string;
|
|
7
|
+
version: string;
|
|
8
|
+
brand: string | null;
|
|
9
|
+
platform: Platform;
|
|
10
|
+
width: number | null;
|
|
11
|
+
};
|
|
7
12
|
modes: Mode[];
|
|
8
13
|
colors: Record<Mode, Record<string, string>>;
|
|
9
14
|
space: Record<string, number>;
|
|
10
15
|
radius: Record<string, number>;
|
|
11
|
-
text: Record<string, {
|
|
16
|
+
text: Record<string, {
|
|
17
|
+
size: number;
|
|
18
|
+
}>;
|
|
12
19
|
/** `leading` holds the line height of each text role (heading, body, display), unitless. */
|
|
13
|
-
typography: {
|
|
20
|
+
typography: {
|
|
21
|
+
fontWeight: Record<string, number>;
|
|
22
|
+
leading: Record<string, number>;
|
|
23
|
+
};
|
|
14
24
|
/** The description of each colour a brand adds, by name; absent when the brand adds none. */
|
|
15
25
|
colorMeanings?: Record<string, string>;
|
|
16
|
-
fonts: Record<string, {
|
|
26
|
+
fonts: Record<string, {
|
|
27
|
+
family: string;
|
|
28
|
+
fallback: string;
|
|
29
|
+
}>;
|
|
17
30
|
/** A role the theme declares as no shadow is null; a role the platform lacks is absent. */
|
|
18
31
|
shadow: Record<string, CanvasShadow | null>;
|
|
19
32
|
components: Record<string, CanvasComponent>;
|
|
20
33
|
}
|
|
21
|
-
|
|
22
34
|
/** A component's values: `base` applies at every size, and a `sizes` entry wins over `base` for the same prop. */
|
|
23
35
|
export interface CanvasComponent {
|
|
24
36
|
base: Record<string, string>;
|
|
25
37
|
sizes: Record<string, Record<string, string>>;
|
|
26
38
|
}
|
|
27
|
-
|
|
28
39
|
/** Lengths in px at scale 1. `color` is the resolved colour with its opacity in the alpha. */
|
|
29
40
|
export interface CanvasShadow {
|
|
30
41
|
x: number;
|
|
@@ -35,113 +46,51 @@ export interface CanvasShadow {
|
|
|
35
46
|
/** Phone only: the Android elevation, when the token sets one. */
|
|
36
47
|
elevation?: number;
|
|
37
48
|
}
|
|
38
|
-
|
|
39
49
|
export interface MeaningRegistry {
|
|
40
50
|
format: "webority-meanings/1";
|
|
41
|
-
source: {
|
|
42
|
-
|
|
51
|
+
source: {
|
|
52
|
+
package: string;
|
|
53
|
+
version: string;
|
|
54
|
+
};
|
|
55
|
+
color: Record<string, {
|
|
56
|
+
description: string;
|
|
57
|
+
platforms: Platform[];
|
|
58
|
+
}>;
|
|
43
59
|
}
|
|
44
|
-
|
|
45
|
-
export type
|
|
46
|
-
|
|
47
|
-
| "canvas"
|
|
48
|
-
| "card"
|
|
49
|
-
| "panel"
|
|
50
|
-
| "panel-alt"
|
|
51
|
-
| "surface"
|
|
52
|
-
| "line"
|
|
53
|
-
| "line-strong"
|
|
54
|
-
| "accent-tint-line"
|
|
55
|
-
| "heading"
|
|
56
|
-
| "strong"
|
|
57
|
-
| "text"
|
|
58
|
-
| "secondary"
|
|
59
|
-
| "muted"
|
|
60
|
-
| "accent"
|
|
61
|
-
| "on-accent"
|
|
62
|
-
| "link"
|
|
63
|
-
| "success"
|
|
64
|
-
| "warning"
|
|
65
|
-
| "danger"
|
|
66
|
-
| "accent-tint"
|
|
67
|
-
| "success-tint"
|
|
68
|
-
| "warning-tint"
|
|
69
|
-
| "danger-tint"
|
|
70
|
-
| "figure-panel";
|
|
71
|
-
|
|
72
|
-
export type EmailTypeRoleKey =
|
|
73
|
-
| "h1"
|
|
74
|
-
| "eyebrow"
|
|
75
|
-
| "lede"
|
|
76
|
-
| "body"
|
|
77
|
-
| "detail-value"
|
|
78
|
-
| "quote"
|
|
79
|
-
| "body-large"
|
|
80
|
-
| "title"
|
|
81
|
-
| "item"
|
|
82
|
-
| "label"
|
|
83
|
-
| "note"
|
|
84
|
-
| "note-small"
|
|
85
|
-
| "figure"
|
|
86
|
-
| "figure-hero"
|
|
87
|
-
| "figure-sub"
|
|
88
|
-
| "range"
|
|
89
|
-
| "sign"
|
|
90
|
-
| "foot"
|
|
91
|
-
| "num"
|
|
92
|
-
| "code-otp"
|
|
93
|
-
| "code-id"
|
|
94
|
-
| "button";
|
|
95
|
-
|
|
96
|
-
export type EmailSpaceKey =
|
|
97
|
-
| "section"
|
|
98
|
-
| "section-phone"
|
|
99
|
-
| "tight"
|
|
100
|
-
| "item"
|
|
101
|
-
| "heading-after"
|
|
102
|
-
| "eyebrow-after"
|
|
103
|
-
| "title-after"
|
|
104
|
-
| "callout-lead-after"
|
|
105
|
-
| "paragraph-gap"
|
|
106
|
-
| "sign-gap"
|
|
107
|
-
| "sign-gap-phone"
|
|
108
|
-
| "step-gap"
|
|
109
|
-
| "step-gutter"
|
|
110
|
-
| "step-gutter-phone"
|
|
111
|
-
| "step-number-space"
|
|
112
|
-
| "step-number-space-phone"
|
|
113
|
-
| "column-top"
|
|
114
|
-
| "column-gap"
|
|
115
|
-
| "row-padding"
|
|
116
|
-
| "panel-padding"
|
|
117
|
-
| "panel-padding-wide"
|
|
118
|
-
| "hero-padding"
|
|
119
|
-
| "hero-padding-wide"
|
|
120
|
-
| "columns-padding"
|
|
121
|
-
| "columns-padding-wide"
|
|
122
|
-
| "details-padding"
|
|
123
|
-
| "details-padding-wide"
|
|
124
|
-
| "signature-gap";
|
|
125
|
-
|
|
60
|
+
export type EmailColorRoleKey = "page" | "canvas" | "card" | "panel" | "panel-alt" | "surface" | "line" | "line-strong" | "accent-tint-line" | "heading" | "strong" | "text" | "secondary" | "muted" | "accent" | "on-accent" | "link" | "success" | "warning" | "danger" | "accent-tint" | "success-tint" | "warning-tint" | "danger-tint" | "figure-panel";
|
|
61
|
+
export type EmailTypeRoleKey = "h1" | "eyebrow" | "lede" | "body" | "detail-value" | "quote" | "body-large" | "title" | "item" | "label" | "note" | "note-small" | "figure" | "figure-hero" | "figure-sub" | "range" | "sign" | "foot" | "num" | "code-otp" | "code-id" | "button";
|
|
62
|
+
export type EmailSpaceKey = "section" | "section-phone" | "tight" | "item" | "heading-after" | "eyebrow-after" | "title-after" | "callout-lead-after" | "paragraph-gap" | "sign-gap" | "sign-gap-phone" | "step-gap" | "step-gutter" | "step-gutter-phone" | "step-number-space" | "step-number-space-phone" | "column-top" | "column-gap" | "row-padding" | "panel-padding" | "panel-padding-wide" | "hero-padding" | "hero-padding-wide" | "columns-padding" | "columns-padding-wide" | "details-padding" | "details-padding-wide" | "signature-gap";
|
|
126
63
|
export type EmailShapeKey = "panel-radius" | "tint-radius" | "code-radius" | "details-radius";
|
|
127
|
-
|
|
128
64
|
export interface EmailThemeTokensV1 {
|
|
129
65
|
format: "webority-email-theme/1";
|
|
130
|
-
source: {
|
|
66
|
+
source: {
|
|
67
|
+
package: string;
|
|
68
|
+
version: string;
|
|
69
|
+
brand: string | null;
|
|
70
|
+
};
|
|
131
71
|
/** "#RRGGBB" in both modes. */
|
|
132
72
|
colors: Record<EmailColorRoleKey, Record<Mode, string>>;
|
|
133
73
|
/** CSS font-family lists; a name with spaces is in single quotes. */
|
|
134
|
-
fonts: {
|
|
74
|
+
fonts: {
|
|
75
|
+
body: string;
|
|
76
|
+
display: string;
|
|
77
|
+
mono: string;
|
|
78
|
+
};
|
|
135
79
|
/** Whole pixels: size and line height at 1440, phone values at 390, and an optional narrow-phone pair a brand sets. */
|
|
136
|
-
type: Record<
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
80
|
+
type: Record<EmailTypeRoleKey, {
|
|
81
|
+
size: number;
|
|
82
|
+
lineHeight: number;
|
|
83
|
+
phoneSize: number;
|
|
84
|
+
phoneLineHeight: number;
|
|
85
|
+
narrowSize?: number;
|
|
86
|
+
narrowLineHeight?: number;
|
|
87
|
+
}>;
|
|
140
88
|
/** Px at 1440; a padding entry is a CSS shorthand of px values, such as "24px 16px". */
|
|
141
89
|
space: Record<EmailSpaceKey, number | string>;
|
|
142
90
|
/** Px at 1440. */
|
|
143
91
|
shape: Record<EmailShapeKey, number>;
|
|
144
|
-
button: {
|
|
92
|
+
button: {
|
|
93
|
+
radius: number;
|
|
94
|
+
padding: string;
|
|
95
|
+
};
|
|
145
96
|
}
|
|
146
|
-
|
|
147
|
-
export declare function cssVar(group: string, name: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function present<T>(value: T | undefined, what: string): T;
|
package/dist/present.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t){if(e===void 0)throw Error(`webority-tokens: ${t} is missing.`);return e}export{e as present};
|
package/dist/ramp.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** The primary ramp steps a brand file may leave out: palette step names without the group prefix. */
|
|
2
|
+
export declare const RAMP_STEPS: readonly ["primary-hover", "primary-pressed", "primary-50", "primary-30", "primary-20", "primary-15", "primary-10", "primary-5"];
|
|
3
|
+
export type RampStep = (typeof RAMP_STEPS)[number];
|
|
4
|
+
/**
|
|
5
|
+
* @param hex "#RRGGBB" in any case.
|
|
6
|
+
* @returns every step as upper case "#RRGGBB", keys in RAMP_STEPS order.
|
|
7
|
+
*/
|
|
8
|
+
export declare function deriveRamp(hex: string): Record<RampStep, string>;
|
package/dist/ramp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
import{present as e}from"./present.js";var t=Object.freeze([`primary-hover`,`primary-pressed`,`primary-50`,`primary-30`,`primary-20`,`primary-15`,`primary-10`,`primary-5`]),n=Object.freeze({"primary-50":.5,"primary-30":.3,"primary-20":.2,"primary-15":.15,"primary-10":.1,"primary-5":.05}),r=.05,i=/^#([0-9a-f]{6})$/i;function a(t){let a=typeof t==`string`?i.exec(t):null;if(!a)throw Error(`deriveRamp: ${t} is not #RRGGBB.`);let u=parseInt(e(a[1],`the hex digits`),16),d=[u>>16&255,u>>8&255,u&255],[f,p,m]=c(d),h=e=>s(d.map(t=>Math.round(t*e+255*(1-e))));return{"primary-hover":l(f,p,o(m+r)),"primary-pressed":l(f,p,o(m-r)),"primary-50":h(n[`primary-50`]),"primary-30":h(n[`primary-30`]),"primary-20":h(n[`primary-20`]),"primary-15":h(n[`primary-15`]),"primary-10":h(n[`primary-10`]),"primary-5":h(n[`primary-5`])}}function o(e){return Math.min(1,Math.max(0,e))}function s(e){return`#`+e.map(e=>e.toString(16).padStart(2,`0`)).join(``).toUpperCase()}function c([e,t,n]){let r=e/255,i=t/255,a=n/255,o=Math.max(r,i,a),s=Math.min(r,i,a),c=(o+s)/2;if(o===s)return[0,0,c];let l=o-s,u=c>.5?l/(2-o-s):l/(o+s),d;return d=o===r?(i-a)/l+(i<a?6:0):o===i?(a-r)/l+2:(r-i)/l+4,[d*60,u,c]}function l(e,t,n){if(t===0)return s([n,n,n].map(e=>Math.round(e*255)));let r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=e/360;return s([a+1/3,a,a-1/3].map(e=>Math.round(u(i,r,e)*255)))}function u(e,t,n){let r=n;return r<0&&(r+=1),r>1&&--r,r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}export{t as RAMP_STEPS,a as deriveRamp};
|
|
@@ -1075,6 +1075,150 @@
|
|
|
1075
1075
|
"platforms": ["phone"]
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
|
+
},
|
|
1079
|
+
"shell-bg": {
|
|
1080
|
+
"$value": "#1f2d5c",
|
|
1081
|
+
"$description": "Dark navigation shell background, the sidebar behind the nav items and the workspace switcher.",
|
|
1082
|
+
"$extensions": {
|
|
1083
|
+
"com.webority": {
|
|
1084
|
+
"platforms": ["web"]
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
},
|
|
1088
|
+
"shell-bg-deep": {
|
|
1089
|
+
"$value": "#141e42",
|
|
1090
|
+
"$description": "Deepest shell tone, the ink on an accent mark or an avatar in the shell.",
|
|
1091
|
+
"$extensions": {
|
|
1092
|
+
"com.webority": {
|
|
1093
|
+
"platforms": ["web"]
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
},
|
|
1097
|
+
"shell-bg-raised": {
|
|
1098
|
+
"$value": "#2c3f7a",
|
|
1099
|
+
"$description": "Raised shell band, the fill of the active page row inside an open group.",
|
|
1100
|
+
"$extensions": {
|
|
1101
|
+
"com.webority": {
|
|
1102
|
+
"platforms": ["web"]
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
},
|
|
1106
|
+
"shell-text": {
|
|
1107
|
+
"$value": "#c9d1e6",
|
|
1108
|
+
"$description": "Body text and nav item labels on the dark shell.",
|
|
1109
|
+
"$extensions": {
|
|
1110
|
+
"com.webority": {
|
|
1111
|
+
"platforms": ["web"]
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
},
|
|
1115
|
+
"shell-text-strong": {
|
|
1116
|
+
"$value": "#FFFFFF",
|
|
1117
|
+
"$description": "Emphasis text on the dark shell: the brand name, hovered and open rows, the switcher label.",
|
|
1118
|
+
"$extensions": {
|
|
1119
|
+
"com.webority": {
|
|
1120
|
+
"platforms": ["web"]
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
},
|
|
1124
|
+
"shell-text-muted": {
|
|
1125
|
+
"$value": "#8792b4",
|
|
1126
|
+
"$description": "Quiet text on the dark shell: group labels, nav icons, carets and the sidebar toggle.",
|
|
1127
|
+
"$extensions": {
|
|
1128
|
+
"com.webority": {
|
|
1129
|
+
"platforms": ["web"]
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
},
|
|
1133
|
+
"shell-accent": {
|
|
1134
|
+
"$value": "#f4a261",
|
|
1135
|
+
"$description": "Warm accent on the dark shell that marks where the user is: the active icon, the open group's guide line, the focus outline and the avatar.",
|
|
1136
|
+
"$extensions": {
|
|
1137
|
+
"com.webority": {
|
|
1138
|
+
"platforms": ["web"]
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
},
|
|
1142
|
+
"shell-accent-ring": {
|
|
1143
|
+
"$value": "color-mix(in srgb, #f4a261 25%, transparent)",
|
|
1144
|
+
"$description": "Translucent accent halo on the dark shell, for a selection or focus ring.",
|
|
1145
|
+
"$extensions": {
|
|
1146
|
+
"com.webority": {
|
|
1147
|
+
"platforms": ["web"]
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
},
|
|
1151
|
+
"shell-hover": {
|
|
1152
|
+
"$value": "color-mix(in srgb, #FFFFFF 7%, transparent)",
|
|
1153
|
+
"$description": "Hover fill for a nav row or the sidebar toggle on the dark shell.",
|
|
1154
|
+
"$extensions": {
|
|
1155
|
+
"com.webority": {
|
|
1156
|
+
"platforms": ["web"]
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
},
|
|
1160
|
+
"shell-active": {
|
|
1161
|
+
"$value": "color-mix(in srgb, #FFFFFF 12%, transparent)",
|
|
1162
|
+
"$description": "Fill of the active nav row on the dark shell.",
|
|
1163
|
+
"$extensions": {
|
|
1164
|
+
"com.webority": {
|
|
1165
|
+
"platforms": ["web"]
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
},
|
|
1169
|
+
"shell-rule": {
|
|
1170
|
+
"$value": "color-mix(in srgb, #FFFFFF 10%, transparent)",
|
|
1171
|
+
"$description": "Hairline divider between shell groups and under the shell brand.",
|
|
1172
|
+
"$extensions": {
|
|
1173
|
+
"com.webority": {
|
|
1174
|
+
"platforms": ["web"]
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
},
|
|
1178
|
+
"shell-fill-subtle": {
|
|
1179
|
+
"$value": "color-mix(in srgb, #FFFFFF 8%, transparent)",
|
|
1180
|
+
"$description": "Faint translucent fill on the dark shell, for the open group band and the workspace switcher pill.",
|
|
1181
|
+
"$extensions": {
|
|
1182
|
+
"com.webority": {
|
|
1183
|
+
"platforms": ["web"]
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
},
|
|
1187
|
+
"shell-fill": {
|
|
1188
|
+
"$value": "color-mix(in srgb, #FFFFFF 12%, transparent)",
|
|
1189
|
+
"$description": "Translucent fill for a badge and a focused or open switcher on the dark shell.",
|
|
1190
|
+
"$extensions": {
|
|
1191
|
+
"com.webority": {
|
|
1192
|
+
"platforms": ["web"]
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
},
|
|
1196
|
+
"shell-fill-strong": {
|
|
1197
|
+
"$value": "color-mix(in srgb, #FFFFFF 18%, transparent)",
|
|
1198
|
+
"$description": "Strongest translucent fill on the dark shell, for a control that is held.",
|
|
1199
|
+
"$extensions": {
|
|
1200
|
+
"com.webority": {
|
|
1201
|
+
"platforms": ["web"]
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
},
|
|
1205
|
+
"shell-border": {
|
|
1206
|
+
"$value": "color-mix(in srgb, #FFFFFF 22%, transparent)",
|
|
1207
|
+
"$description": "Border of a control on the dark shell, shown on hover.",
|
|
1208
|
+
"$extensions": {
|
|
1209
|
+
"com.webority": {
|
|
1210
|
+
"platforms": ["web"]
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
},
|
|
1214
|
+
"shell-border-strong": {
|
|
1215
|
+
"$value": "color-mix(in srgb, #FFFFFF 40%, transparent)",
|
|
1216
|
+
"$description": "Border of a focused or open control on the dark shell.",
|
|
1217
|
+
"$extensions": {
|
|
1218
|
+
"com.webority": {
|
|
1219
|
+
"platforms": ["web"]
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1078
1222
|
}
|
|
1079
1223
|
},
|
|
1080
1224
|
"effect": {
|