@webority/tokens 0.99.0 → 0.100.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.
@@ -2,7 +2,7 @@
2
2
  "format": "webority-theme-tokens/2",
3
3
  "source": {
4
4
  "package": "@webority/tokens",
5
- "version": "0.99.0",
5
+ "version": "0.100.0",
6
6
  "brand": null,
7
7
  "platform": "phone",
8
8
  "width": null
@@ -2,7 +2,7 @@
2
2
  "format": "webority-theme-tokens/2",
3
3
  "source": {
4
4
  "package": "@webority/tokens",
5
- "version": "0.99.0",
5
+ "version": "0.100.0",
6
6
  "brand": null,
7
7
  "platform": "web",
8
8
  "width": 390
@@ -333,13 +333,6 @@
333
333
  "spread": -16,
334
334
  "color": "rgba(7, 20, 55, 0.28)",
335
335
  "elevation": 12
336
- },
337
- "overlay": {
338
- "x": 0,
339
- "y": 24,
340
- "blur": 60,
341
- "spread": -16,
342
- "color": "rgba(7, 20, 55, 0.28)"
343
336
  }
344
337
  },
345
338
  "components": {
@@ -2,7 +2,7 @@
2
2
  "format": "webority-theme-tokens/2",
3
3
  "source": {
4
4
  "package": "@webority/tokens",
5
- "version": "0.99.0",
5
+ "version": "0.100.0",
6
6
  "brand": null,
7
7
  "platform": "web",
8
8
  "width": 1440
@@ -333,13 +333,6 @@
333
333
  "spread": -16,
334
334
  "color": "rgba(7, 20, 55, 0.28)",
335
335
  "elevation": 12
336
- },
337
- "overlay": {
338
- "x": 0,
339
- "y": 24,
340
- "blur": 60,
341
- "spread": -16,
342
- "color": "rgba(7, 20, 55, 0.28)"
343
336
  }
344
337
  },
345
338
  "components": {
package/dist/emit/web.js CHANGED
@@ -1,20 +1,20 @@
1
- import{BREAKPOINT_PX as e,breakpointRules as t,fluidLength as n}from"../model/length.js";import{cssVarOfPath as r}from"../names.js";var i={mode:`light`,platform:`web`,width:1440},a={mode:`dark`,platform:`web`,width:1440},o={mode:`light`,platform:`web`,width:390},s=/\{([a-z0-9-]+(?:\.[a-z0-9-]+)+)\}/g,c=/^\{([a-z0-9-]+(?:\.[a-z0-9-]+)+)\}$/,l=/^#[0-9a-f]{6}$/i,u=[[`--bs-body-color`,`text`],[`--bs-emphasis-color`,`text`],[`--bs-secondary-color`,`text-muted`],[`--bs-tertiary-color`,`text-subtle`],[`--bs-body-bg`,`bg`],[`--bs-border-color`,`border`],[`--bs-secondary-bg`,`surface`],[`--bs-tertiary-bg`,`bg-muted`]],d=[[`--bs-body-bg-rgb`,`bg`],[`--bs-body-color-rgb`,`text`],[`--bs-emphasis-color-rgb`,`text`],[`--bs-secondary-color-rgb`,`text-muted`],[`--bs-tertiary-color-rgb`,`text-subtle`],[`--bs-secondary-bg-rgb`,`surface`],[`--bs-tertiary-bg-rgb`,`bg-muted`],[`--bs-border-color-rgb`,`border`]],f=[[`$body-color`,`color.text-body`],[`$body-secondary-color`,`color.text-muted`],[`$body-tertiary-color`,`color.text-subtle`],[`$body-secondary-bg`,`color.bg-subtle`],[`$body-tertiary-bg`,`color.bg-muted`],[`$border-color`,`color.border`],[`$border-color-translucent`,`color.border`],[`$border-radius`,`radius.md`],[`$border-radius-sm`,`radius.sm`],[`$border-radius-lg`,`radius.lg`],[`$border-radius-pill`,`radius.pill`],[`$wui-shadow-overlay`,`shadow.popover`],[`$wui-shadow-overlay-lg`,`shadow.modal`],[`$link-color`,`color.link`],[`$line-height-base`,`leading.body`],[`$headings-line-height`,`leading.heading`],[`$display-line-height`,`leading.display`]],p=`:root[data-theme="dark"],
2
- :root[data-bs-theme="dark"]`,m=`[data-theme="dark"]:not(:root),
3
- [data-bs-theme="dark"]:not(:root)`,h=`:root[data-theme="auto"]`,g=`[data-theme="dark"]:not(:root) [data-theme="light"],
1
+ import{BREAKPOINT_PX as e,TOUCH_MEDIA as t,breakpointRules as n,fluidLength as r,touchValue as i}from"../model/length.js";import{cssVarOfPath as a}from"../names.js";var o={mode:`light`,platform:`web`,width:1440},s={mode:`dark`,platform:`web`,width:1440},c={mode:`light`,platform:`web`,width:390},l=/\{([a-z0-9-]+(?:\.[a-z0-9-]+)+)\}/g,u=/^\{([a-z0-9-]+(?:\.[a-z0-9-]+)+)\}$/,d=/^#[0-9a-f]{6}$/i,f=[[`--bs-body-color`,`text`],[`--bs-emphasis-color`,`text`],[`--bs-secondary-color`,`text-muted`],[`--bs-tertiary-color`,`text-subtle`],[`--bs-body-bg`,`bg`],[`--bs-border-color`,`border`],[`--bs-secondary-bg`,`surface`],[`--bs-tertiary-bg`,`bg-muted`]],p=[[`--bs-body-bg-rgb`,`bg`],[`--bs-body-color-rgb`,`text`],[`--bs-emphasis-color-rgb`,`text`],[`--bs-secondary-color-rgb`,`text-muted`],[`--bs-tertiary-color-rgb`,`text-subtle`],[`--bs-secondary-bg-rgb`,`surface`],[`--bs-tertiary-bg-rgb`,`bg-muted`],[`--bs-border-color-rgb`,`border`]],m=[[`$body-color`,`color.text-body`],[`$body-secondary-color`,`color.text-muted`],[`$body-tertiary-color`,`color.text-subtle`],[`$body-secondary-bg`,`color.bg-subtle`],[`$body-tertiary-bg`,`color.bg-muted`],[`$border-color`,`color.border`],[`$border-color-translucent`,null],[`$border-radius`,`radius.md`],[`$border-radius-sm`,`radius.sm`],[`$border-radius-lg`,`radius.lg`],[`$border-radius-pill`,`radius.pill`],[`$wui-shadow-overlay`,`shadow.popover`],[`$wui-shadow-overlay-lg`,`shadow.modal`],[`$link-color`,`color.link`],[`$line-height-base`,`leading.body`],[`$headings-line-height`,`leading.heading`],[`$display-line-height`,`leading.display`]],h={"$border-color-translucent":`rgba(13, 24, 43, 0.08)`},g=`:root[data-theme="dark"],
2
+ :root[data-bs-theme="dark"]`,_=`[data-theme="dark"]:not(:root),
3
+ [data-bs-theme="dark"]:not(:root)`,v=`:root[data-theme="auto"]`,y=`[data-theme="dark"]:not(:root) [data-theme="light"],
4
4
  [data-theme="dark"]:not(:root) [data-bs-theme="light"],
5
5
  [data-bs-theme="dark"]:not(:root) [data-theme="light"],
6
- [data-bs-theme="dark"]:not(:root) [data-bs-theme="light"]`,_=`// var() resolves where a name is declared, so the html copies keep the light values for a light box.`,v=`/* var() resolves where a name is declared, so the html copies keep the light values for a light box. */`,y=`// Zero specificity, so a component's own class on a themed section or inside it keeps its colour.`,b=`/* Zero specificity, so a component's own class on a themed section or inside it keeps its colour. */`;function x(e){return String(Number(e.toFixed(4)))}function S(e,t){if(typeof t==`string`)return t.replace(s,(e,t)=>`var(${r(t)})`);if(typeof t==`number`)return x(t);if(Array.isArray(t)){if(e.type===`cubicBezier`&&t.length===4&&t.every(e=>typeof e==`number`))return`cubic-bezier(${t.map(e=>x(e)).join(`, `)})`;if(e.type===`fontFamily`&&t.every(e=>typeof e==`string`))return t.map(e=>/\s/.test(e)?`"${e}"`:e).join(`, `)}else if(t&&typeof t==`object`){if(`unit`in t&&typeof t.value==`number`)return`${x(t.value)}${t.unit}`;if(`color`in t)return[t.offsetX,t.offsetY,t.blur,t.spread,t.color].map(t=>S(e,t)).join(` `)}throw Error(`emitWeb: ${e.path}: cannot write a ${e.type} value as CSS.`)}function C(e,t,n){return S(e.tokens.get(t),e.valueIn(t,n))}function w(e,t){if(t&&typeof t==`object`&&t.unit===`px`&&typeof t.value==`number`)return t.value;throw Error(`emitWeb: ${e}: a text size must be a px dimension.`)}function T(e,a){let s=e.tokens.get(a),c=r(a);if(s.group===`text`){if(t(s).length>0)throw Error(`emitWeb: ${a}: a text size cannot carry breakpoints.`);let r=w(a,e.valueIn(a,o)),l=w(a,e.valueIn(a,i)),u=s.extensions?.fluidUntil;if(r!==l&&u===void 0)throw Error(`emitWeb: ${a}: the 390 and 1440 sizes differ but no fluidUntil is recorded.`);return{path:a,name:c,root:n(r,l,u??1440),tiers:[]}}let l=t(s);return l.length>0?{path:a,name:c,root:C(e,a,o),tiers:l.map(e=>({tier:e.tier,text:S(s,e.value)}))}:{path:a,name:c,root:C(e,a,i),tiers:[]}}function E(e){let t=[];for(let n of e.tokens.keys())e.existsIn(n,i)&&t.push(T(e,n));return t}function D(e,n){let o=[];for(let[s,c]of e.tokens){if(!e.existsIn(s,a)||!e.existsIn(s,i)||t(c).length>0)continue;let l=C(e,s,a);if(c.group===`text`){if(l!==C(e,s,i))throw Error(`emitWeb: ${s}: a text size cannot change with the mode.`);continue}n(s,l)&&o.push({path:s,name:r(s),text:l})}return o}function O(e){let t=Number.parseInt(e.slice(1),16);return`${t>>16&255}, ${t>>8&255}, ${t&255}`}function k(e,t){let n=[];for(let[r,i]of d){let o=`color.${i}`,s=e.resolvedIn(o,a);if(!l.test(s))throw Error(`emitWeb: ${o}: a Bootstrap rgb triplet needs an opaque colour.`);t(o,s)&&n.push({name:r,text:O(s)})}return n}function A(e,t){let n=D(e,t?(e,n)=>!t.tokens.has(e)||!t.existsIn(e,a)||n!==C(t,e,a):(t,n)=>n!==C(e,t,i)),o=k(e,t?(e,n)=>n!==t.resolvedIn(e,a):()=>!0);if(t)return[...n,...o];let s=u.map(([e,t])=>({name:e,text:`var(${r(`color.${t}`)})`}));return[...n,...s,...o]}function j(e,t){return`${e} {\n${t.join(`
6
+ [data-bs-theme="dark"]:not(:root) [data-bs-theme="light"]`,b=`// var() resolves where a name is declared, so the html copies keep the light values for a light box.`,x=`/* var() resolves where a name is declared, so the html copies keep the light values for a light box. */`,S=`// Zero specificity, so a component's own class on a themed section or inside it keeps its colour.`,C=`/* Zero specificity, so a component's own class on a themed section or inside it keeps its colour. */`;function w(e){return String(Number(e.toFixed(4)))}function T(e,t){if(typeof t==`string`)return t.replace(l,(e,t)=>`var(${a(t)})`);if(typeof t==`number`)return w(t);if(Array.isArray(t)){if(e.type===`cubicBezier`&&t.length===4&&t.every(e=>typeof e==`number`))return`cubic-bezier(${t.map(e=>w(e)).join(`, `)})`;if(e.type===`fontFamily`&&t.every(e=>typeof e==`string`))return t.map(e=>/\s/.test(e)?`"${e}"`:e).join(`, `)}else if(t&&typeof t==`object`){if(`unit`in t&&typeof t.value==`number`)return`${w(t.value)}${t.unit}`;if(`color`in t)return[t.offsetX,t.offsetY,t.blur,t.spread,t.color].map(t=>T(e,t)).join(` `)}throw Error(`emitWeb: ${e.path}: cannot write a ${e.type} value as CSS.`)}function E(e,t,n){return T(e.tokens.get(t),e.valueIn(t,n))}function D(e,t){if(t&&typeof t==`object`&&t.unit===`px`&&typeof t.value==`number`)return t.value;throw Error(`emitWeb: ${e}: a text size must be a px dimension.`)}function O(e,t){let i=e.tokens.get(t),s=a(t);if(i.group===`text`){if(n(i).length>0)throw Error(`emitWeb: ${t}: a text size cannot carry breakpoints.`);let a=D(t,e.valueIn(t,c)),l=D(t,e.valueIn(t,o)),u=i.extensions?.fluidUntil;if(a!==l&&u===void 0)throw Error(`emitWeb: ${t}: the 390 and 1440 sizes differ but no fluidUntil is recorded.`);return{path:t,name:s,root:r(a,l,u??1440),tiers:[]}}let l=n(i);return l.length>0?{path:t,name:s,root:E(e,t,c),tiers:l.map(e=>({tier:e.tier,text:T(i,e.value)}))}:{path:t,name:s,root:E(e,t,o),tiers:[]}}function k(e){let t=[];for(let n of e.tokens.keys())e.existsIn(n,o)&&t.push(O(e,n));return t}function A(e,t){let r=[];for(let[i,c]of e.tokens){if(!e.existsIn(i,s)||!e.existsIn(i,o)||n(c).length>0)continue;let l=E(e,i,s);if(c.group===`text`){if(l!==E(e,i,o))throw Error(`emitWeb: ${i}: a text size cannot change with the mode.`);continue}t(i,l)&&r.push({path:i,name:a(i),text:l})}return r}function j(e){let t=Number.parseInt(e.slice(1),16);return`${t>>16&255}, ${t>>8&255}, ${t&255}`}function M(e,t){let n=[];for(let[r,i]of p){let a=`color.${i}`,o=e.resolvedIn(a,s);if(!d.test(o))throw Error(`emitWeb: ${a}: a Bootstrap rgb triplet needs an opaque colour.`);t(a,o)&&n.push({name:r,text:j(o)})}return n}function N(e,t){let n=A(e,t?(e,n)=>!t.tokens.has(e)||!t.existsIn(e,s)||n!==E(t,e,s):(t,n)=>n!==E(e,t,o)),r=M(e,t?(e,n)=>n!==t.resolvedIn(e,s):()=>!0);if(t)return[...n,...r];let i=f.map(([e,t])=>({name:e,text:`var(${a(`color.${t}`)})`}));return[...n,...i,...r]}function P(e,t){return`${e} {\n${t.join(`
7
7
  `).split(`
8
8
  `).map(e=>e===``?e:` ${e}`).join(`
9
- `)}\n}`}function M(e){return e.split(`,
9
+ `)}\n}`}function F(e){return e.split(`,
10
10
  `).map(e=>`:where(${e})`).join(`,
11
- `)}function N(e){let t=[];for(let n=0;n<e.length;n+=6)t.push(e.slice(n,n+6).join(`, `));return[`$wui-dark-layer-names: (\n${t.map((e,n)=>` ${e}${n<t.length-1?`,`:``}`).join(`
12
- `)}\n);`,_,j(`html`,[`@each $name in $wui-dark-layer-names {`,` --wui-light-#{$name}: var(--#{$name});`,`}`]),j(g,[`@each $name in $wui-dark-layer-names {`,` --#{$name}: var(--wui-light-#{$name});`,`}`]),j(M(g),[`color-scheme: light;`,`color: var(--color-text);`])].join(`
11
+ `)}function I(e){let t=[];for(let n=0;n<e.length;n+=6)t.push(e.slice(n,n+6).join(`, `));return[`$wui-dark-layer-names: (\n${t.map((e,n)=>` ${e}${n<t.length-1?`,`:``}`).join(`
12
+ `)}\n);`,b,P(`html`,[`@each $name in $wui-dark-layer-names {`,` --wui-light-#{$name}: var(--#{$name});`,`}`]),P(y,[`@each $name in $wui-dark-layer-names {`,` --#{$name}: var(--wui-light-#{$name});`,`}`]),P(F(y),[`color-scheme: light;`,`color: var(--color-text);`])].join(`
13
13
 
14
- `)}function P(e){return[v,j(`html`,e.map(e=>`--wui-light-${e}: var(--${e});`)),j(g,e.map(e=>`--${e}: var(--wui-light-${e});`)),j(M(g),[`color-scheme: light;`,`color: var(--color-text);`])].join(`
14
+ `)}function L(e){return[x,P(`html`,e.map(e=>`--wui-light-${e}: var(--${e});`)),P(y,e.map(e=>`--${e}: var(--wui-light-${e});`)),P(F(y),[`color-scheme: light;`,`color: var(--color-text);`])].join(`
15
15
 
16
- `)}function F(e,t,n=!1){let{package:r,version:i,brand:a}=e.source,o=t?`Generated by ${r} ${i} for the ${a} brand. Do not edit; run webority brand.`:`Generated by ${r} ${i} from its token source. Do not edit; run webority brand --library.`;return n?`/* ${o} */`:`// ${o}`}function I(t,n){let r=E(t),i=new Map((n?E(n):[]).map(e=>[e.path,e])),a=[],o=r.filter(e=>i.get(e.path)?.root!==e.root).map(e=>`${e.name}: ${e.root};`);o.length>0&&a.push(j(`:root`,o));for(let[t,n]of Object.entries(e)){let e=[];for(let n of r)for(let r of n.tiers)r.tier===t&&i.get(n.path)?.tiers.find(e=>e.tier===t)?.text!==r.text&&e.push(`${n.name}: ${r.text};`);e.length>0&&a.push(j(`@media (min-width: ${n}px)`,[j(`:root`,e)]))}let s=A(t,n);if(s.length>0){let e=s.map(e=>`${e.name}: ${e.text};`),t=n?b:y;a.push(j(p,[...e,`color-scheme: dark;`]),j(m,e),`${t}\n${j(M(m),[`color-scheme: dark;`,`color: var(--color-text);`])}`);let r=s.map(e=>e.name.slice(2));if(n){let e=new Set(A(n,null).map(e=>e.name.slice(2))),t=r.filter(t=>!e.has(t));t.length>0&&a.push(P(t))}else a.push(N(r));a.push(j(`@media (prefers-color-scheme: dark)`,[j(h,[...e,`color-scheme: dark;`])]))}return`${[F(t,n!==null,n!==null),...a].join(`
16
+ `)}function R(e,t,n=!1){let{package:r,version:i,brand:a}=e.source,o=t?`Generated by ${r} ${i} for the ${a} brand. Do not edit; run webority brand.`:`Generated by ${r} ${i} from its token source. Do not edit; run webority brand --library.`;return n?`/* ${o} */`:`// ${o}`}function z(n,r){let a=k(n),o=new Map((r?k(r):[]).map(e=>[e.path,e])),s=[],c=a.filter(e=>o.get(e.path)?.root!==e.root).map(e=>`${e.name}: ${e.root};`);c.length>0&&s.push(P(`:root`,c));for(let[t,n]of Object.entries(e)){let e=[];for(let n of a)for(let r of n.tiers)r.tier===t&&o.get(n.path)?.tiers.find(e=>e.tier===t)?.text!==r.text&&e.push(`${n.name}: ${r.text};`);e.length>0&&s.push(P(`@media (min-width: ${n}px)`,[P(`:root`,e)]))}let l=[];for(let e of a){let t=n.tokens.get(e.path),a=i(t);if(a===null)continue;let o=T(t,a),s=r?.tokens.get(e.path),c=s?i(s):null;c!==null&&T(s,c)===o||l.push(`${e.name}: ${o};`)}l.length>0&&s.push(P(`@media ${t}`,[P(`:root`,l)]));let u=N(n,r);if(u.length>0){let e=u.map(e=>`${e.name}: ${e.text};`),t=r?C:S;s.push(P(g,[...e,`color-scheme: dark;`]),P(_,e),`${t}\n${P(F(_),[`color-scheme: dark;`,`color: var(--color-text);`])}`);let n=u.map(e=>e.name.slice(2));if(r){let e=new Set(N(r,null).map(e=>e.name.slice(2))),t=n.filter(t=>!e.has(t));t.length>0&&s.push(L(t))}else s.push(I(n));s.push(P(`@media (prefers-color-scheme: dark)`,[P(v,[...e,`color-scheme: dark;`])]))}return`${[R(n,r!==null,r!==null),...s].join(`
17
17
 
18
- `)}\n`}function L(e,t){let n=e.tokens.get(t);if(n.type===`color`)return e.resolvedIn(t,i);let r=e.valueIn(t,i),a=typeof r==`string`?c.exec(r):null;if(a)return L(e,a[1]);let o=S(n,r);if(o.includes(`var(`))throw Error(`emitWeb: ${t}: a Bootstrap variable needs a literal.`);return o}function R(e){let t=f.map(([t,n])=>`${t}: ${L(e,n)} !default;`);return`${[F(e,!1),...t].join(`
19
- `)}\n`}function z(e,t){let n=f.filter(([,n])=>L(e,n)!==L(t,n)).map(([t,n])=>`${t}: ${L(e,n)};`);return`${[F(e,!0),...n].join(`
20
- `)}\n`}function B(e,t){return t===void 0?{tokens:I(e,null),bootstrap:R(e)}:{css:I(e,t.library),variables:z(e,t.library)}}export{B as emitWeb};
18
+ `)}\n`}function B(e,t){let n=e.tokens.get(t);if(n.type===`color`)return e.resolvedIn(t,o);let r=e.valueIn(t,o),i=typeof r==`string`?u.exec(r):null;if(i)return B(e,i[1]);let a=T(n,r);if(a.includes(`var(`))throw Error(`emitWeb: ${t}: a Bootstrap variable needs a literal.`);return a}function V(e,t,n){return n===null?h[t]:B(e,n)}function H(e){let t=m.map(([t,n])=>`${t}: ${V(e,t,n)} !default;`);return`${[R(e,!1),...t].join(`
19
+ `)}\n`}function U(e,t){let n=m.filter(([n,r])=>V(e,n,r)!==V(t,n,r)).map(([t,n])=>`${t}: ${V(e,t,n)};`);return`${[R(e,!0),...n].join(`
20
+ `)}\n`}function W(e,t){return t===void 0?{tokens:z(e,null),bootstrap:H(e)}:{css:z(e,t.library),variables:U(e,t.library)}}export{W as emitWeb};
@@ -2,7 +2,7 @@
2
2
  "format": "webority-meanings/1",
3
3
  "source": {
4
4
  "package": "@webority/tokens",
5
- "version": "0.99.0"
5
+ "version": "0.100.0"
6
6
  },
7
7
  "color": {
8
8
  "bg": {
@@ -1 +1 @@
1
- var e={md:768,lg:992,xl:1200};function t(e){return String(Number(e.toFixed(4)))}function n(e,n,r=1440){let i=e,a=n,o=r;if(!(o>390&&o<=1440))throw Error(`fluidUntil ${o} must be above 390 and at most 1440.`);if(i===a)return`${t(a/16)}rem`;let s=(a-i)/(o-390),c=`${t((i-s*390)/16)}rem ${s<0?`-`:`+`} ${t(Math.abs(s)*100)}vw`;return`clamp(${t(Math.min(i,a)/16)}rem, ${c}, ${t(Math.max(i,a)/16)}rem)`}function r(t){let n=t.extensions?.breakpoints;if(!n)return[];for(let t of Object.keys(n))if(!Object.hasOwn(e,t))throw Error(`breakpoint "${t}" is not a tier; use md, lg or xl.`);return Object.keys(e).filter(e=>Object.hasOwn(n,e)).map(t=>({tier:t,px:e[t],value:n[t]}))}export{e as BREAKPOINT_PX,r as breakpointRules,n as fluidLength};
1
+ var e={md:768,lg:992,xl:1200},t=`(max-width: 575.98px), (pointer: coarse)`;function n(e){return e.extensions?.touch??null}function r(e){return String(Number(e.toFixed(4)))}function i(e,t,n=1440){let i=e,a=t,o=n;if(!(o>390&&o<=1440))throw Error(`fluidUntil ${o} must be above 390 and at most 1440.`);if(i===a)return`${r(a/16)}rem`;let s=(a-i)/(o-390),c=`${r((i-s*390)/16)}rem ${s<0?`-`:`+`} ${r(Math.abs(s)*100)}vw`;return`clamp(${r(Math.min(i,a)/16)}rem, ${c}, ${r(Math.max(i,a)/16)}rem)`}function a(t){let n=t.extensions?.breakpoints;if(!n)return[];for(let t of Object.keys(n))if(!Object.hasOwn(e,t))throw Error(`breakpoint "${t}" is not a tier; use md, lg or xl.`);return Object.keys(e).filter(e=>Object.hasOwn(n,e)).map(t=>({tier:t,px:e[t],value:n[t]}))}export{e as BREAKPOINT_PX,t as TOUCH_MEDIA,a as breakpointRules,i as fluidLength,n as touchValue};
@@ -472,34 +472,6 @@
472
472
  }
473
473
  },
474
474
  "$description": "Shadow of a panel anchored to a page edge, such as a drawer or the consent banner."
475
- },
476
- "overlay": {
477
- "$type": "shadow",
478
- "$value": {
479
- "color": "rgba(7, 20, 55, 0.28)",
480
- "offsetX": {
481
- "value": 0,
482
- "unit": "px"
483
- },
484
- "offsetY": {
485
- "value": 24,
486
- "unit": "px"
487
- },
488
- "blur": {
489
- "value": 60,
490
- "unit": "px"
491
- },
492
- "spread": {
493
- "value": -16,
494
- "unit": "px"
495
- }
496
- },
497
- "$description": "Shadow of the top-most layer, such as an item being dragged.",
498
- "$extensions": {
499
- "com.webority": {
500
- "platforms": ["web"]
501
- }
502
- }
503
475
  }
504
476
  },
505
477
  "motion": {
@@ -677,7 +649,11 @@
677
649
  "$description": "Default height of a button, field, select or tab; larger on phones.",
678
650
  "$extensions": {
679
651
  "com.webority": {
680
- "platforms": ["web"]
652
+ "platforms": ["web"],
653
+ "touch": {
654
+ "value": 44,
655
+ "unit": "px"
656
+ }
681
657
  }
682
658
  }
683
659
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/tokens",
3
- "version": "0.99.0",
3
+ "version": "0.100.0",
4
4
  "description": "The Webority design tokens in one W3C Design Tokens source (palette, scale, meaning and component tiers, with light and dark, web and phone, and 390 and 1440 widths), and the webority command that brands a product, upgrades it between releases and checks it against the token source.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",
@@ -46,6 +46,10 @@
46
46
  "exclusiveMinimum": 390,
47
47
  "maximum": 1440
48
48
  },
49
+ "touch": {
50
+ "description": "The value a token takes under the touch media query, for phones and coarse pointers.",
51
+ "anyOf": [{ "$ref": "#/$defs/reference" }, { "type": "object", "required": ["value", "unit"] }]
52
+ },
49
53
  "breakpoints": {
50
54
  "description": "Per breakpoint, the token a responsive step takes from that width up.",
51
55
  "type": "object",