@posthog/quill-tokens 0.3.0-beta.1 → 0.3.0-beta.9
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/color-system.css +9 -7
- package/dist/color-system.scoped.css +9 -6
- package/dist/index.cjs +14 -14
- package/dist/index.js +74 -62
- package/dist/src/border-radius.d.ts.map +1 -0
- package/dist/{colors.d.ts → src/colors.d.ts} +5 -2
- package/dist/src/colors.d.ts.map +1 -0
- package/dist/src/css.d.ts.map +1 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/shadow.d.ts.map +1 -0
- package/dist/src/spacing.d.ts.map +1 -0
- package/dist/src/typography.d.ts.map +1 -0
- package/dist/tailwind-lib.css +2 -1
- package/dist/tailwind-lib.scoped.css +2 -1
- package/dist/tailwind.css +2 -1
- package/dist/tailwind.scoped.css +2 -1
- package/package.json +1 -1
- package/src/colors.ts +21 -5
- package/dist/border-radius.d.ts.map +0 -1
- package/dist/colors.d.ts.map +0 -1
- package/dist/css.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/shadow.d.ts.map +0 -1
- package/dist/spacing.d.ts.map +0 -1
- package/dist/typography.d.ts.map +0 -1
- /package/dist/{border-radius.d.ts → src/border-radius.d.ts} +0 -0
- /package/dist/{css.d.ts → src/css.d.ts} +0 -0
- /package/dist/{index.d.ts → src/index.d.ts} +0 -0
- /package/dist/{shadow.d.ts → src/shadow.d.ts} +0 -0
- /package/dist/{spacing.d.ts → src/spacing.d.ts} +0 -0
- /package/dist/{typography.d.ts → src/typography.d.ts} +0 -0
package/dist/color-system.css
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
color-scheme: light;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
:is(.dark, [theme="dark"]) {
|
|
7
|
+
:is(.dark, [theme="dark"], [data-theme="dark"]) {
|
|
8
8
|
color-scheme: dark;
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
--ring: oklch(0.446 0.03 257);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
:is(.dark, [theme="dark"]) {
|
|
38
|
+
:is(.dark, [theme="dark"], [data-theme="dark"]) {
|
|
39
39
|
--foreground: oklch(0.967 0.003 265);
|
|
40
40
|
--card-foreground: var(--foreground);
|
|
41
41
|
--muted-foreground: oklch(0.709 0 0);
|
|
@@ -57,9 +57,10 @@
|
|
|
57
57
|
* This enables local overrides like [--theme-hue:200] on a container.
|
|
58
58
|
*/
|
|
59
59
|
* {
|
|
60
|
-
--background: oklch(0.
|
|
60
|
+
--background: oklch(0.966 calc(var(--theme-tint) * 0.79) var(--theme-hue));
|
|
61
61
|
--card: oklch(0.995 calc(var(--theme-tint) * 0.3) var(--theme-hue));
|
|
62
|
-
--muted: oklch(0.
|
|
62
|
+
--muted: oklch(0.953 calc(var(--theme-tint) * 1.28) var(--theme-hue));
|
|
63
|
+
--chrome: oklch(0.923 calc(var(--theme-tint) * 1.67) var(--theme-hue));
|
|
63
64
|
--primary: var(--primary-light);
|
|
64
65
|
--border: oklch(0.9 calc(var(--theme-tint) * 0.8) var(--theme-hue));
|
|
65
66
|
--input: oklch(0.81 calc(var(--theme-tint) * 0.5) var(--theme-hue));
|
|
@@ -68,10 +69,11 @@
|
|
|
68
69
|
--fill-hover: color-mix(in oklab, var(--foreground) 4%, transparent);
|
|
69
70
|
}
|
|
70
71
|
|
|
71
|
-
:is(:is(.dark, [theme="dark"]), :is(.dark, [theme="dark"]) *) {
|
|
72
|
-
--background: oklch(0.
|
|
72
|
+
:is(:is(.dark, [theme="dark"], [data-theme="dark"]), :is(.dark, [theme="dark"], [data-theme="dark"]) *) {
|
|
73
|
+
--background: oklch(0.187 calc(var(--theme-tint) * 1.1) var(--theme-dark-hue));
|
|
73
74
|
--card: oklch(0.2 calc(var(--theme-tint) * 1.2) var(--theme-dark-hue));
|
|
74
|
-
--muted: oklch(0.
|
|
75
|
+
--muted: oklch(0.209 calc(var(--theme-tint) * 1.33) var(--theme-dark-hue));
|
|
76
|
+
--chrome: oklch(0.187 calc(var(--theme-tint) * 1.1) var(--theme-dark-hue));
|
|
75
77
|
--primary: var(--primary-dark);
|
|
76
78
|
--border: oklch(0.27 calc(var(--theme-tint) * 1.2) var(--theme-dark-hue));
|
|
77
79
|
--input: oklch(0.3 calc(var(--theme-tint) * 1.5) var(--theme-dark-hue));
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
color-scheme: light;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
:is(:is(.dark, [theme="dark"]) [data-quill], [data-quill]:is(.dark, [theme="dark"])) {
|
|
17
|
+
:is(:is(.dark, [theme="dark"], [data-theme="dark"]) [data-quill], [data-quill]:is(.dark, [theme="dark"], [data-theme="dark"])) {
|
|
18
18
|
color-scheme: dark;
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -38,9 +38,10 @@
|
|
|
38
38
|
--info: oklch(0.882 0.059 254.128);
|
|
39
39
|
--info-foreground: oklch(0.49 0.02 254);
|
|
40
40
|
--ring: oklch(0.446 0.03 257);
|
|
41
|
-
--background: oklch(0.
|
|
41
|
+
--background: oklch(0.966 calc(var(--theme-tint) * 0.79) var(--theme-hue));
|
|
42
42
|
--card: oklch(0.995 calc(var(--theme-tint) * 0.3) var(--theme-hue));
|
|
43
|
-
--muted: oklch(0.
|
|
43
|
+
--muted: oklch(0.953 calc(var(--theme-tint) * 1.28) var(--theme-hue));
|
|
44
|
+
--chrome: oklch(0.923 calc(var(--theme-tint) * 1.67) var(--theme-hue));
|
|
44
45
|
--primary: var(--primary-light);
|
|
45
46
|
--border: oklch(0.9 calc(var(--theme-tint) * 0.8) var(--theme-hue));
|
|
46
47
|
--input: oklch(0.81 calc(var(--theme-tint) * 0.5) var(--theme-hue));
|
|
@@ -57,6 +58,7 @@
|
|
|
57
58
|
--color-card-foreground: var(--card-foreground);
|
|
58
59
|
--color-muted: var(--muted);
|
|
59
60
|
--color-muted-foreground: var(--muted-foreground);
|
|
61
|
+
--color-chrome: var(--chrome);
|
|
60
62
|
--color-primary: var(--primary);
|
|
61
63
|
--color-primary-foreground: var(--primary-foreground);
|
|
62
64
|
--color-destructive: var(--destructive);
|
|
@@ -75,7 +77,7 @@
|
|
|
75
77
|
--color-fill-hover: var(--fill-hover);
|
|
76
78
|
}
|
|
77
79
|
|
|
78
|
-
:is(:is(.dark, [theme="dark"]) [data-quill], [data-quill]:is(.dark, [theme="dark"]), :is(.dark, [theme="dark"]) [data-quill] *, [data-quill]:is(.dark, [theme="dark"]) *) {
|
|
80
|
+
:is(:is(.dark, [theme="dark"], [data-theme="dark"]) [data-quill], [data-quill]:is(.dark, [theme="dark"], [data-theme="dark"]), :is(.dark, [theme="dark"], [data-theme="dark"]) [data-quill] *, [data-quill]:is(.dark, [theme="dark"], [data-theme="dark"]) *) {
|
|
79
81
|
--foreground: oklch(0.967 0.003 265);
|
|
80
82
|
--card-foreground: var(--foreground);
|
|
81
83
|
--muted-foreground: oklch(0.709 0 0);
|
|
@@ -89,9 +91,10 @@
|
|
|
89
91
|
--info: oklch(0.4242 0.1982 265.5 / 40%);
|
|
90
92
|
--info-foreground: oklch(0.882 0.059 254.128);
|
|
91
93
|
--ring: oklch(0.709 0 0);
|
|
92
|
-
--background: oklch(0.
|
|
94
|
+
--background: oklch(0.187 calc(var(--theme-tint) * 1.1) var(--theme-dark-hue));
|
|
93
95
|
--card: oklch(0.2 calc(var(--theme-tint) * 1.2) var(--theme-dark-hue));
|
|
94
|
-
--muted: oklch(0.
|
|
96
|
+
--muted: oklch(0.209 calc(var(--theme-tint) * 1.33) var(--theme-dark-hue));
|
|
97
|
+
--chrome: oklch(0.187 calc(var(--theme-tint) * 1.1) var(--theme-dark-hue));
|
|
95
98
|
--primary: var(--primary-dark);
|
|
96
99
|
--border: oklch(0.27 calc(var(--theme-tint) * 1.2) var(--theme-dark-hue));
|
|
97
100
|
--input: oklch(0.3 calc(var(--theme-tint) * 1.5) var(--theme-dark-hue));
|
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function v(r,s,o=" "){return Object.entries(r).map(([t,d])=>`${o}--${s}-${t}: ${d};`).join(`
|
|
2
|
-
`)}function
|
|
2
|
+
`)}function h(r,s=" "){return Object.entries(r).map(([o,t])=>`${s}--${o}: ${t};`).join(`
|
|
3
3
|
`)}function S(r){return/\s/.test(r)?`"${r}"`:r}function y(r){return r.map(S).join(", ")}const $={sm:"0 2px 0 color-mix(in oklab, var(--border), transparent 10%)",md:"0 3px 0 color-mix(in oklab, var(--border), transparent 10%)",lg:"0 6px 0 color-mix(in oklab, var(--border), transparent 10%)",line:"0 -1px 0px 0px color-mix(in oklab, var(--border), transparent 10%)"};function F(){return v($,"shadow")}const f=.25,E=`${f}rem`,A=16;function H(r){return`${f*r}rem`}function R(r){return f*r*A}function D(){return` --spacing: ${E};`}const I=16;function i(r){return`${r/I}rem`}const w={xxs:[i(10),{lineHeight:i(12)}],xs:[i(12),{lineHeight:i(16)}],sm:[i(14),{lineHeight:i(20)}],base:[i(16),{lineHeight:i(24)}],lg:[i(18),{lineHeight:i(28)}],xl:[i(20),{lineHeight:i(28)}],"2xl":[i(24),{lineHeight:i(32)}]},T={sans:["-apple-system","BlinkMacSystemFont","Inter","Segoe UI","Roboto","Helvetica Neue","sans-serif"],mono:["JetBrains Mono","Fira Code","monospace"]};function M(){return Object.entries(w).map(([r,[s,{lineHeight:o}]])=>` --text-${r}: ${s};
|
|
4
4
|
--text-${r}--line-height: ${o};`).join(`
|
|
5
5
|
`)}function N(){return Object.entries(T).map(([r,s])=>` --font-${r}: ${y(s)};`).join(`
|
|
6
|
-
`)}const C={hue:90,darkHue:264,tint:.006,primaryLight:"oklch(0.65 0.21 37.41)",primaryDark:"oklch(0.83 0.16 84.71)"};function
|
|
7
|
-
`),e=n=>{const m={},k={};for(const[g,b]of Object.entries(
|
|
6
|
+
`)}const C={hue:90,darkHue:264,tint:.006,primaryLight:"oklch(0.65 0.21 37.41)",primaryDark:"oklch(0.83 0.16 84.71)"};function u(r,s,o,t){const d=o==="light"?"var(--theme-hue)":"var(--theme-dark-hue)",e=s===1?"var(--theme-tint)":s===0?"0":`calc(var(--theme-tint) * ${s})`;return`oklch(${r} ${e} ${d})`}function a(r,s,o,t){return t!==void 0?`oklch(${r} ${s} ${o} / ${t*100}%)`:`oklch(${r} ${s} ${o})`}function V(){return{background:[u(.966,.79,"light"),u(.187,1.1,"dark"),"bg-background"],foreground:[a(.13,.028,262),a(.967,.003,265),"text-foreground"],card:[u(.995,.3,"light"),u(.2,1.2,"dark"),"bg-card"],"card-foreground":["var(--foreground)","var(--foreground)","text-card-foreground"],muted:[u(.953,1.28,"light"),u(.209,1.33,"dark"),"bg-muted"],"muted-foreground":[a(.446,.03,257),a(.709,0,0),"text-muted-foreground"],chrome:[u(.923,1.67,"light"),u(.187,1.1,"dark"),"bg-chrome"],primary:["var(--primary-light)","var(--primary-dark)","bg-primary"],"primary-foreground":[a(1,0,0),a(.13,.028,262),"text-primary-foreground"],destructive:[a(.92,.03,32.22),a(.24,.03,2.79),"bg-destructive"],"destructive-foreground":[a(.59,.2,23.61),a(.6316,.1927,24.53),"text-destructive-foreground"],success:[a(.94,.06,154.03),a(.27,.04,157.6),"bg-success"],"success-foreground":[a(.448,.119,151.328),a(.925,.084,155.995),"text-success-foreground"],warning:[a(.93,.04,74.41),a(.29,.03,75),"bg-warning"],"warning-foreground":[a(.476,.114,61.907),a(.77,.14,99.29),"text-warning-foreground"],info:[a(.882,.059,254.128),a(.4242,.1982,265.5,.4),"bg-info"],"info-foreground":[a(.49,.02,254),a(.882,.059,254.128),"text-info-foreground"],border:[u(.9,.8,"light"),u(.27,1.2,"dark"),"border-border"],input:[u(.81,.5,"light"),u(.3,1.5,"dark"),"border-input"],ring:[a(.446,.03,257),a(.709,0,0),"border-ring"],"fill-expanded":["color-mix(in oklab, var(--foreground) 6%, transparent)","color-mix(in oklab, var(--foreground) 14%, transparent)","bg-fill-expanded"],"fill-selected":["color-mix(in oklab, var(--foreground) 6%, transparent)","color-mix(in oklab, var(--foreground) 10%, transparent)","bg-fill-selected"],"fill-hover":["color-mix(in oklab, var(--foreground) 4%, transparent)","color-mix(in oklab, var(--foreground) 7%, transparent)","bg-fill-hover"]}}const p=V();function q(r){const s=r==="light"?0:1;return Object.fromEntries(Object.entries(p).map(([o,t])=>[o,t[s]]))}const O=new Set(["background","card","muted","chrome","primary","border","input","fill-hover","fill-expanded","fill-selected"]);function B(r){const s=["var(--theme-hue)","var(--theme-dark-hue)","var(--theme-tint)","var(--primary-light)","var(--primary-dark)"];for(const[o,[t,d]]of Object.entries(r))if(s.some(l=>t.includes(l)||d.includes(l))&&!O.has(o))throw new Error(`[@posthog/quill-tokens] Token "${o}" references a theme variable but is missing from THEME_DERIVED_TOKENS. Add it to the set in colors.ts or local [--theme-hue:X] overrides will silently fail for this token.`)}B(p);function _(r){const o=r===void 0?[".dark",'[theme="dark"]','[data-theme="dark"]']:typeof r=="string"?[r]:r;return o.length===1?o[0]:`:is(${o.join(", ")})`}function P(r=C,s={}){const{scope:o}=s,t=_(s.darkSelector),d=(n=" ")=>[`${n}--radius: 0.58rem;`,`${n}--theme-hue: ${r.hue};`,`${n}--theme-dark-hue: ${r.darkHue};`,`${n}--theme-tint: ${r.tint};`,`${n}--primary-light: ${r.primaryLight};`,`${n}--primary-dark: ${r.primaryDark};`].join(`
|
|
7
|
+
`),e=n=>{const m={},k={};for(const[g,b]of Object.entries(p))O.has(g)?k[g]=b[n]:m[g]=b[n];return{staticVars:m,dynamicVars:k}},l=e(0),c=e(1);if(o){const n=`:is(${o}, ${o} *)`,m=`:is(${t} ${o}, ${o}${t}, ${t} ${o} *, ${o}${t} *)`;return`/* Auto-generated by @posthog/quill-tokens — do not edit manually */
|
|
8
8
|
|
|
9
9
|
/*
|
|
10
10
|
* Scoped output — all token vars are gated behind \`${o}\` so they
|
|
@@ -26,8 +26,8 @@ ${o} {
|
|
|
26
26
|
|
|
27
27
|
${n} {
|
|
28
28
|
${d()}
|
|
29
|
-
${
|
|
30
|
-
${
|
|
29
|
+
${h(l.staticVars)}
|
|
30
|
+
${h(l.dynamicVars)}
|
|
31
31
|
|
|
32
32
|
/* Override Tailwind --color-* theme tokens within scope so utilities
|
|
33
33
|
* like bg-card, text-foreground, border-border resolve to quill's
|
|
@@ -36,8 +36,8 @@ ${j()}
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
${m} {
|
|
39
|
-
${
|
|
40
|
-
${
|
|
39
|
+
${h(c.staticVars)}
|
|
40
|
+
${h(c.dynamicVars)}
|
|
41
41
|
}
|
|
42
42
|
`}return`/* Auto-generated by @posthog/quill-tokens — do not edit manually */
|
|
43
43
|
|
|
@@ -56,11 +56,11 @@ ${d()}
|
|
|
56
56
|
|
|
57
57
|
/* Static colors (no theme-var references, safe on :root) */
|
|
58
58
|
:root {
|
|
59
|
-
${
|
|
59
|
+
${h(l.staticVars)}
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
${t} {
|
|
63
|
-
${
|
|
63
|
+
${h(c.staticVars)}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/*
|
|
@@ -69,12 +69,12 @@ ${p(l.staticVars)}
|
|
|
69
69
|
* This enables local overrides like [--theme-hue:200] on a container.
|
|
70
70
|
*/
|
|
71
71
|
* {
|
|
72
|
-
${
|
|
72
|
+
${h(l.dynamicVars)}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
:is(${t}, ${t} *) {
|
|
76
|
-
${
|
|
76
|
+
${h(c.dynamicVars)}
|
|
77
77
|
}
|
|
78
|
-
`}function j(){return Object.keys(
|
|
79
|
-
`)}const x=[["--radius-xs","calc(var(--radius) - 7px)"],["--radius-sm","calc(var(--radius) - 5px)"],["--radius-md","calc(var(--radius) - 2px)"],["--radius-lg","var(--radius)"],["--radius-xl","calc(var(--radius) + 4px)"],["--radius-2xl","calc(var(--radius) + 8px)"],["--radius-3xl","calc(var(--radius) + 12px)"],["--radius-4xl","calc(var(--radius) + 16px)"]];function z(r={}){const{includeBaseLayer:s=!1,scope:o}=r,t=_(r.darkSelector),e=["/* Auto-generated by @posthog/quill-tokens — do not edit manually */","",`@custom-variant dark (${`&:is(${t}, ${t} *)`});`];e.push(""),e.push("@theme inline {"),e.push(" --animate-skeleton: skeleton 2s -1s infinite linear;"),e.push(" --animate-pulse-glow: pulse-glow 2s -1s infinite linear;"),e.push(" --animate-horizontal-shake: horizontal-shake 0.3s ease-out;"),e.push(" --animate-radar: radar 2s ease-out infinite;"),e.push(""),e.push(" /* --- Colors --- */"),e.push(j()),e.push(""),e.push(" /* --- Spacing --- */"),e.push(D()),e.push(""),e.push(" /* --- Font sizes --- */"),e.push(M()),e.push(""),e.push(" /* --- Font families --- */"),e.push(N()),e.push(""),e.push(" /* --- Shadows --- */"),e.push(F()),e.push(""),e.push(" /* --- Radius (derived from --radius base) --- */");for(const[
|
|
80
|
-
`)}const X={none:"0px",sm:"4px",md:"6px",lg:"8px",xl:"12px",full:"9999px"};exports.DEFAULT_THEME=C;exports.SPACING_BASE=E;exports.SPACING_BASE_REM=f;exports.borderRadius=X;exports.buildSemanticColors=V;exports.cssVars=v;exports.cssVarsFlat=
|
|
78
|
+
`}function j(){return Object.keys(p).map(r=>` --color-${r}: var(--${r});`).join(`
|
|
79
|
+
`)}const x=[["--radius-xs","calc(var(--radius) - 7px)"],["--radius-sm","calc(var(--radius) - 5px)"],["--radius-md","calc(var(--radius) - 2px)"],["--radius-lg","var(--radius)"],["--radius-xl","calc(var(--radius) + 4px)"],["--radius-2xl","calc(var(--radius) + 8px)"],["--radius-3xl","calc(var(--radius) + 12px)"],["--radius-4xl","calc(var(--radius) + 16px)"]];function z(r={}){const{includeBaseLayer:s=!1,scope:o}=r,t=_(r.darkSelector),e=["/* Auto-generated by @posthog/quill-tokens — do not edit manually */","",`@custom-variant dark (${`&:is(${t}, ${t} *)`});`];e.push(""),e.push("@theme inline {"),e.push(" --animate-skeleton: skeleton 2s -1s infinite linear;"),e.push(" --animate-pulse-glow: pulse-glow 2s -1s infinite linear;"),e.push(" --animate-horizontal-shake: horizontal-shake 0.3s ease-out;"),e.push(" --animate-radar: radar 2s ease-out infinite;"),e.push(""),e.push(" /* --- Colors --- */"),e.push(j()),e.push(""),e.push(" /* --- Spacing --- */"),e.push(D()),e.push(""),e.push(" /* --- Font sizes --- */"),e.push(M()),e.push(""),e.push(" /* --- Font families --- */"),e.push(N()),e.push(""),e.push(" /* --- Shadows --- */"),e.push(F()),e.push(""),e.push(" /* --- Radius (derived from --radius base) --- */");for(const[c,n]of x)e.push(` ${c}: ${n};`);e.push(""),e.push(" @keyframes skeleton {"),e.push(" to {"),e.push(" background-position: -200% 0;"),e.push(" }"),e.push(" }"),e.push(""),e.push(" @keyframes pulse-glow {"),e.push(" 0%, 100% { box-shadow: 0 0 2px 1px var(--pulse-glow-color, var(--color-primary)) }"),e.push(" 50% { box-shadow: 0 0 6px 2px var(--pulse-glow-color, var(--color-primary)) }"),e.push(" }"),e.push(""),e.push(" @keyframes horizontal-shake {"),e.push(" 0% { transform: translateX(0); }"),e.push(" 25% { transform: translateX(5px); }"),e.push(" 50% { transform: translateX(-5px); }"),e.push(" 75% { transform: translateX(2px); }"),e.push(" 100% { transform: translateX(0); }"),e.push(" }"),e.push(""),e.push(" @keyframes radar {"),e.push(" 0% { transform: scale(1); opacity: 0.5; }"),e.push(" 100% { transform: scale(1.5); opacity: 0; }"),e.push(" }"),e.push("}"),e.push("");const l=o??":root";e.push(`${l} {`);for(const[c,n]of x)e.push(` ${c}: ${n};`);for(const[c,n]of Object.entries($))e.push(` --shadow-${c}: ${n};`);return e.push("}"),s&&(e.push(""),e.push("@layer base {"),o?(e.push(` ${o}, ${o} * {`),e.push(" @apply border-border outline-ring/50;"),e.push(" }")):(e.push(" * {"),e.push(" @apply border-border outline-ring/50;"),e.push(" }"),e.push(" body {"),e.push(" @apply bg-background text-foreground;"),e.push(" }")),e.push("}")),e.push(""),e.join(`
|
|
80
|
+
`)}const X={none:"0px",sm:"4px",md:"6px",lg:"8px",xl:"12px",full:"9999px"};exports.DEFAULT_THEME=C;exports.SPACING_BASE=E;exports.SPACING_BASE_REM=f;exports.borderRadius=X;exports.buildSemanticColors=V;exports.cssVars=v;exports.cssVarsFlat=h;exports.fontFamily=T;exports.fontFamilyValue=y;exports.fontSize=w;exports.generateColorSystemCSS=P;exports.generateStylesCSS=z;exports.quoteFontName=S;exports.resolveTheme=q;exports.semanticColors=p;exports.shadow=$;exports.spacing=H;exports.spacingPx=R;
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
function w(r, s, o = " ") {
|
|
2
|
-
return Object.entries(r).map(([t,
|
|
2
|
+
return Object.entries(r).map(([t, h]) => `${o}--${s}-${t}: ${h};`).join(`
|
|
3
3
|
`);
|
|
4
4
|
}
|
|
5
|
-
function
|
|
5
|
+
function d(r, s = " ") {
|
|
6
6
|
return Object.entries(r).map(([o, t]) => `${s}--${o}: ${t};`).join(`
|
|
7
7
|
`);
|
|
8
8
|
}
|
|
@@ -70,48 +70,59 @@ const R = {
|
|
|
70
70
|
primaryLight: "oklch(0.65 0.21 37.41)",
|
|
71
71
|
primaryDark: "oklch(0.83 0.16 84.71)"
|
|
72
72
|
};
|
|
73
|
-
function
|
|
74
|
-
const
|
|
75
|
-
return `oklch(${r} ${e} ${
|
|
73
|
+
function u(r, s, o, t) {
|
|
74
|
+
const h = o === "light" ? "var(--theme-hue)" : "var(--theme-dark-hue)", e = s === 1 ? "var(--theme-tint)" : s === 0 ? "0" : `calc(var(--theme-tint) * ${s})`;
|
|
75
|
+
return `oklch(${r} ${e} ${h})`;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function a(r, s, o, t) {
|
|
78
78
|
return t !== void 0 ? `oklch(${r} ${s} ${o} / ${t * 100}%)` : `oklch(${r} ${s} ${o})`;
|
|
79
79
|
}
|
|
80
80
|
function I() {
|
|
81
81
|
return {
|
|
82
82
|
// ── Surfaces (theme-derived) ──────────────────
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
// Matched to PostHog app's --color-bg-primary so quill panels blend
|
|
84
|
+
// with the surrounding app: light hsl(75 14% 95%), dark hsl(240 8% 8%),
|
|
85
|
+
// converted to OKLCH. Dark equals `muted` — PostHog uses one token for
|
|
86
|
+
// both; surfaces separate via `card` / borders, not background tone.
|
|
87
|
+
background: [u(0.966, 0.79, "light"), u(0.187, 1.1, "dark"), "bg-background"],
|
|
88
|
+
foreground: [a(0.13, 0.028, 262), a(0.967, 3e-3, 265), "text-foreground"],
|
|
89
|
+
card: [u(0.995, 0.3, "light"), u(0.2, 1.2, "dark"), "bg-card"],
|
|
86
90
|
// Aliases `foreground` — kept for shadcn API compatibility. Drop once
|
|
87
91
|
// primitives migrate to plain `text-foreground`.
|
|
88
92
|
"card-foreground": ["var(--foreground)", "var(--foreground)", "text-card-foreground"],
|
|
89
|
-
|
|
90
|
-
|
|
93
|
+
// Matched to PostHog app's --color-bg-surface-secondary (subdued cards,
|
|
94
|
+
// list rows): light hsl(70 16% 93%), dark hsl(240 8% 10%), in OKLCH.
|
|
95
|
+
muted: [u(0.953, 1.28, "light"), u(0.209, 1.33, "dark"), "bg-muted"],
|
|
96
|
+
"muted-foreground": [a(0.446, 0.03, 257), a(0.709, 0, 0), "text-muted-foreground"],
|
|
97
|
+
// Chrome — UI furniture surface (toolbars, menubars, nav). Matched to
|
|
98
|
+
// PostHog app's --color-bg-surface-tertiary: light hsl(77 13% 89%),
|
|
99
|
+
// dark hsl(240 8% 8%), in OKLCH. Hue stays theme-derived; chroma is
|
|
100
|
+
// near-zero so the hue offset is imperceptible.
|
|
101
|
+
chrome: [u(0.923, 1.67, "light"), u(0.187, 1.1, "dark"), "bg-chrome"],
|
|
91
102
|
// ── Brand (driven by --primary-light / --primary-dark) ─
|
|
92
103
|
primary: ["var(--primary-light)", "var(--primary-dark)", "bg-primary"],
|
|
93
|
-
"primary-foreground": [
|
|
104
|
+
"primary-foreground": [a(1, 0, 0), a(0.13, 0.028, 262), "text-primary-foreground"],
|
|
94
105
|
// ── Status (independent of theme hue) ─────────
|
|
95
|
-
destructive: [
|
|
106
|
+
destructive: [a(0.92, 0.03, 32.22), a(0.24, 0.03, 2.79), "bg-destructive"],
|
|
96
107
|
"destructive-foreground": [
|
|
97
|
-
|
|
98
|
-
|
|
108
|
+
a(0.59, 0.2, 23.61),
|
|
109
|
+
a(0.6316, 0.1927, 24.53),
|
|
99
110
|
"text-destructive-foreground"
|
|
100
111
|
],
|
|
101
|
-
success: [
|
|
112
|
+
success: [a(0.94, 0.06, 154.03), a(0.27, 0.04, 157.6), "bg-success"],
|
|
102
113
|
"success-foreground": [
|
|
103
|
-
|
|
104
|
-
|
|
114
|
+
a(0.448, 0.119, 151.328),
|
|
115
|
+
a(0.925, 0.084, 155.995),
|
|
105
116
|
"text-success-foreground"
|
|
106
117
|
],
|
|
107
|
-
warning: [
|
|
108
|
-
"warning-foreground": [
|
|
109
|
-
info: [
|
|
110
|
-
"info-foreground": [
|
|
118
|
+
warning: [a(0.93, 0.04, 74.41), a(0.29, 0.03, 75), "bg-warning"],
|
|
119
|
+
"warning-foreground": [a(0.476, 0.114, 61.907), a(0.77, 0.14, 99.29), "text-warning-foreground"],
|
|
120
|
+
info: [a(0.882, 0.059, 254.128), a(0.4242, 0.1982, 265.5, 0.4), "bg-info"],
|
|
121
|
+
"info-foreground": [a(0.49, 0.02, 254), a(0.882, 0.059, 254.128), "text-info-foreground"],
|
|
111
122
|
// ── Borders & rings (theme-derived) ───────────
|
|
112
|
-
border: [
|
|
113
|
-
input: [
|
|
114
|
-
ring: [
|
|
123
|
+
border: [u(0.9, 0.8, "light"), u(0.27, 1.2, "dark"), "border-border"],
|
|
124
|
+
input: [u(0.81, 0.5, "light"), u(0.3, 1.5, "dark"), "border-input"],
|
|
125
|
+
ring: [a(0.446, 0.03, 257), a(0.709, 0, 0), "border-ring"],
|
|
115
126
|
// ── Interactive fills for default button / interactive elements ───────────
|
|
116
127
|
// Relative overlays on `--foreground` so hover/selected/expanded keep
|
|
117
128
|
// the same contrast against any surface (background, muted, card, etc.).
|
|
@@ -143,6 +154,7 @@ const v = /* @__PURE__ */ new Set([
|
|
|
143
154
|
"background",
|
|
144
155
|
"card",
|
|
145
156
|
"muted",
|
|
157
|
+
"chrome",
|
|
146
158
|
"primary",
|
|
147
159
|
"border",
|
|
148
160
|
"input",
|
|
@@ -160,34 +172,34 @@ function q(r) {
|
|
|
160
172
|
"var(--primary-light)",
|
|
161
173
|
"var(--primary-dark)"
|
|
162
174
|
];
|
|
163
|
-
for (const [o, [t,
|
|
164
|
-
if (s.some((
|
|
175
|
+
for (const [o, [t, h]] of Object.entries(r))
|
|
176
|
+
if (s.some((l) => t.includes(l) || h.includes(l)) && !v.has(o))
|
|
165
177
|
throw new Error(
|
|
166
178
|
`[@posthog/quill-tokens] Token "${o}" references a theme variable but is missing from THEME_DERIVED_TOKENS. Add it to the set in colors.ts or local [--theme-hue:X] overrides will silently fail for this token.`
|
|
167
179
|
);
|
|
168
180
|
}
|
|
169
181
|
q(m);
|
|
170
182
|
function y(r) {
|
|
171
|
-
const o = r === void 0 ? [".dark", '[theme="dark"]'] : typeof r == "string" ? [r] : r;
|
|
183
|
+
const o = r === void 0 ? [".dark", '[theme="dark"]', '[data-theme="dark"]'] : typeof r == "string" ? [r] : r;
|
|
172
184
|
return o.length === 1 ? o[0] : `:is(${o.join(", ")})`;
|
|
173
185
|
}
|
|
174
186
|
function X(r = R, s = {}) {
|
|
175
|
-
const { scope: o } = s, t = y(s.darkSelector),
|
|
176
|
-
`${
|
|
177
|
-
`${
|
|
178
|
-
`${
|
|
179
|
-
`${
|
|
180
|
-
`${
|
|
181
|
-
`${
|
|
187
|
+
const { scope: o } = s, t = y(s.darkSelector), h = (n = " ") => [
|
|
188
|
+
`${n}--radius: 0.58rem;`,
|
|
189
|
+
`${n}--theme-hue: ${r.hue};`,
|
|
190
|
+
`${n}--theme-dark-hue: ${r.darkHue};`,
|
|
191
|
+
`${n}--theme-tint: ${r.tint};`,
|
|
192
|
+
`${n}--primary-light: ${r.primaryLight};`,
|
|
193
|
+
`${n}--primary-dark: ${r.primaryDark};`
|
|
182
194
|
].join(`
|
|
183
|
-
`), e = (
|
|
184
|
-
const
|
|
195
|
+
`), e = (n) => {
|
|
196
|
+
const p = {}, $ = {};
|
|
185
197
|
for (const [f, k] of Object.entries(m))
|
|
186
|
-
v.has(f) ? $[f] = k[
|
|
187
|
-
return { staticVars:
|
|
188
|
-
},
|
|
198
|
+
v.has(f) ? $[f] = k[n] : p[f] = k[n];
|
|
199
|
+
return { staticVars: p, dynamicVars: $ };
|
|
200
|
+
}, l = e(0), c = e(1);
|
|
189
201
|
if (o) {
|
|
190
|
-
const
|
|
202
|
+
const n = `:is(${o}, ${o} *)`, p = `:is(${t} ${o}, ${o}${t}, ${t} ${o} *, ${o}${t} *)`;
|
|
191
203
|
return `/* Auto-generated by @posthog/quill-tokens — do not edit manually */
|
|
192
204
|
|
|
193
205
|
/*
|
|
@@ -208,10 +220,10 @@ ${o} {
|
|
|
208
220
|
color-scheme: dark;
|
|
209
221
|
}
|
|
210
222
|
|
|
211
|
-
${
|
|
212
|
-
${
|
|
213
|
-
${
|
|
214
|
-
${
|
|
223
|
+
${n} {
|
|
224
|
+
${h()}
|
|
225
|
+
${d(l.staticVars)}
|
|
226
|
+
${d(l.dynamicVars)}
|
|
215
227
|
|
|
216
228
|
/* Override Tailwind --color-* theme tokens within scope so utilities
|
|
217
229
|
* like bg-card, text-foreground, border-border resolve to quill's
|
|
@@ -219,9 +231,9 @@ ${h(u.dynamicVars)}
|
|
|
219
231
|
${S()}
|
|
220
232
|
}
|
|
221
233
|
|
|
222
|
-
${
|
|
223
|
-
${
|
|
224
|
-
${
|
|
234
|
+
${p} {
|
|
235
|
+
${d(c.staticVars)}
|
|
236
|
+
${d(c.dynamicVars)}
|
|
225
237
|
}
|
|
226
238
|
`;
|
|
227
239
|
}
|
|
@@ -237,16 +249,16 @@ ${t} {
|
|
|
237
249
|
|
|
238
250
|
/* Theme knobs — override these to shift the palette */
|
|
239
251
|
:root {
|
|
240
|
-
${
|
|
252
|
+
${h()}
|
|
241
253
|
}
|
|
242
254
|
|
|
243
255
|
/* Static colors (no theme-var references, safe on :root) */
|
|
244
256
|
:root {
|
|
245
|
-
${
|
|
257
|
+
${d(l.staticVars)}
|
|
246
258
|
}
|
|
247
259
|
|
|
248
260
|
${t} {
|
|
249
|
-
${
|
|
261
|
+
${d(c.staticVars)}
|
|
250
262
|
}
|
|
251
263
|
|
|
252
264
|
/*
|
|
@@ -255,11 +267,11 @@ ${h(l.staticVars)}
|
|
|
255
267
|
* This enables local overrides like [--theme-hue:200] on a container.
|
|
256
268
|
*/
|
|
257
269
|
* {
|
|
258
|
-
${
|
|
270
|
+
${d(l.dynamicVars)}
|
|
259
271
|
}
|
|
260
272
|
|
|
261
273
|
:is(${t}, ${t} *) {
|
|
262
|
-
${
|
|
274
|
+
${d(c.dynamicVars)}
|
|
263
275
|
}
|
|
264
276
|
`;
|
|
265
277
|
}
|
|
@@ -284,15 +296,15 @@ function z(r = {}) {
|
|
|
284
296
|
`@custom-variant dark (${`&:is(${t}, ${t} *)`});`
|
|
285
297
|
];
|
|
286
298
|
e.push(""), e.push("@theme inline {"), e.push(" --animate-skeleton: skeleton 2s -1s infinite linear;"), e.push(" --animate-pulse-glow: pulse-glow 2s -1s infinite linear;"), e.push(" --animate-horizontal-shake: horizontal-shake 0.3s ease-out;"), e.push(" --animate-radar: radar 2s ease-out infinite;"), e.push(""), e.push(" /* --- Colors --- */"), e.push(S()), e.push(""), e.push(" /* --- Spacing --- */"), e.push(C()), e.push(""), e.push(" /* --- Font sizes --- */"), e.push(H()), e.push(""), e.push(" /* --- Font families --- */"), e.push(D()), e.push(""), e.push(" /* --- Shadows --- */"), e.push(V()), e.push(""), e.push(" /* --- Radius (derived from --radius base) --- */");
|
|
287
|
-
for (const [
|
|
288
|
-
e.push(` ${
|
|
299
|
+
for (const [c, n] of b)
|
|
300
|
+
e.push(` ${c}: ${n};`);
|
|
289
301
|
e.push(""), e.push(" @keyframes skeleton {"), e.push(" to {"), e.push(" background-position: -200% 0;"), e.push(" }"), e.push(" }"), e.push(""), e.push(" @keyframes pulse-glow {"), e.push(" 0%, 100% { box-shadow: 0 0 2px 1px var(--pulse-glow-color, var(--color-primary)) }"), e.push(" 50% { box-shadow: 0 0 6px 2px var(--pulse-glow-color, var(--color-primary)) }"), e.push(" }"), e.push(""), e.push(" @keyframes horizontal-shake {"), e.push(" 0% { transform: translateX(0); }"), e.push(" 25% { transform: translateX(5px); }"), e.push(" 50% { transform: translateX(-5px); }"), e.push(" 75% { transform: translateX(2px); }"), e.push(" 100% { transform: translateX(0); }"), e.push(" }"), e.push(""), e.push(" @keyframes radar {"), e.push(" 0% { transform: scale(1); opacity: 0.5; }"), e.push(" 100% { transform: scale(1.5); opacity: 0; }"), e.push(" }"), e.push("}"), e.push("");
|
|
290
|
-
const
|
|
291
|
-
e.push(`${
|
|
292
|
-
for (const [
|
|
293
|
-
e.push(` ${
|
|
294
|
-
for (const [
|
|
295
|
-
e.push(` --shadow-${
|
|
302
|
+
const l = o ?? ":root";
|
|
303
|
+
e.push(`${l} {`);
|
|
304
|
+
for (const [c, n] of b)
|
|
305
|
+
e.push(` ${c}: ${n};`);
|
|
306
|
+
for (const [c, n] of Object.entries(x))
|
|
307
|
+
e.push(` --shadow-${c}: ${n};`);
|
|
296
308
|
return e.push("}"), s && (e.push(""), e.push("@layer base {"), o ? (e.push(` ${o}, ${o} * {`), e.push(" @apply border-border outline-ring/50;"), e.push(" }")) : (e.push(" * {"), e.push(" @apply border-border outline-ring/50;"), e.push(" }"), e.push(" body {"), e.push(" @apply bg-background text-foreground;"), e.push(" }")), e.push("}")), e.push(""), e.join(`
|
|
297
309
|
`);
|
|
298
310
|
}
|
|
@@ -311,7 +323,7 @@ export {
|
|
|
311
323
|
L as borderRadius,
|
|
312
324
|
I as buildSemanticColors,
|
|
313
325
|
w as cssVars,
|
|
314
|
-
|
|
326
|
+
d as cssVarsFlat,
|
|
315
327
|
A as fontFamily,
|
|
316
328
|
T as fontFamilyValue,
|
|
317
329
|
F as fontSize,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"border-radius.d.ts","sourceRoot":"","sources":["../../src/border-radius.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,YAAY;;;;;;;CAOf,CAAA;AAEV,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAA"}
|
|
@@ -58,8 +58,11 @@ export interface StylesConfig {
|
|
|
58
58
|
* array — when multiple are given they are combined with `:is()`
|
|
59
59
|
* so any of them activates dark mode.
|
|
60
60
|
*
|
|
61
|
-
* Default: `['.dark', '[theme="dark"]']
|
|
62
|
-
*
|
|
61
|
+
* Default: `['.dark', '[theme="dark"]', '[data-theme="dark"]']`. The
|
|
62
|
+
* three flavours cover Tailwind's `.dark` class convention, the bare
|
|
63
|
+
* `theme="dark"` attribute, and the `data-theme="dark"` attribute used
|
|
64
|
+
* by libraries that follow the HTML `data-*` convention (notably
|
|
65
|
+
* `@modelcontextprotocol/ext-apps` SDK's `applyDocumentTheme()`).
|
|
63
66
|
*/
|
|
64
67
|
darkSelector?: string | string[];
|
|
65
68
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/colors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AASH,MAAM,WAAW,WAAW;IACxB,sDAAsD;IACtD,GAAG,EAAE,MAAM,CAAA;IACX,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAA;IACf,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAA;IACZ;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAA;IACpB,0DAA0D;IAC1D,WAAW,EAAE,MAAM,CAAA;CACtB;AAED,0EAA0E;AAC1E,eAAO,MAAM,aAAa,EAAE,WAM3B,CAAA;AAID,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAA;AACrC,MAAM,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,CAAA;AA8BtF;;;;;;GAMG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CA6EhE;AAED,eAAO,MAAM,cAAc,4BAAwB,CAAA;AAInD,MAAM,WAAW,YAAY;IACzB,kDAAkD;IAClD,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;;;;;;;OAUG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CACnC;AAID,gCAAgC;AAChC,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAG3E;AAkED,gEAAgE;AAChE,wBAAgB,sBAAsB,CAClC,KAAK,GAAE,WAA2B,EAClC,IAAI,GAAE,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,cAAc,CAAM,GACxD,MAAM,CAqHR;AAuCD,wBAAgB,iBAAiB,CAAC,MAAM,GAAE,YAAiB,GAAG,MAAM,CAkGnE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../src/css.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,mEAAmE;AACnE,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAO,GAAG,MAAM,CAI7F;AAED,0DAA0D;AAC1D,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,SAAO,GAAG,MAAM,CAIjF;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,gDAAgD;AAChD,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAEhE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACH,cAAc,EACd,mBAAmB,EACnB,YAAY,EACZ,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,GAChB,MAAM,UAAU,CAAA;AACjB,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAGvF,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAG9E,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACnD,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAGxD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAGnD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,YAAY,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAGtC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,OAAO,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shadow.d.ts","sourceRoot":"","sources":["../../src/shadow.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,eAAO,MAAM,MAAM;;;;;CAKT,CAAA;AAEV,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAA;AAElC,2DAA2D;AAC3D,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../../src/spacing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,wEAAwE;AACxE,eAAO,MAAM,gBAAgB,OAAO,CAAA;AAEpC,gDAAgD;AAChD,eAAO,MAAM,YAAY,YAA2B,CAAA;AAKpD;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/typography.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;CAQX,CAAA;AAEV,eAAO,MAAM,UAAU;;;CAGb,CAAA;AAEV,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAA;AACtC,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAA;AAE1C,oFAAoF;AACpF,wBAAgB,mBAAmB,IAAI,MAAM,CAI5C;AAED,8DAA8D;AAC9D,wBAAgB,qBAAqB,IAAI,MAAM,CAI9C"}
|
package/dist/tailwind-lib.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Auto-generated by @posthog/quill-tokens — do not edit manually */
|
|
2
2
|
|
|
3
|
-
@custom-variant dark (&:is(:is(.dark, [theme="dark"]), :is(.dark, [theme="dark"]) *));
|
|
3
|
+
@custom-variant dark (&:is(:is(.dark, [theme="dark"], [data-theme="dark"]), :is(.dark, [theme="dark"], [data-theme="dark"]) *));
|
|
4
4
|
|
|
5
5
|
@theme inline {
|
|
6
6
|
--animate-skeleton: skeleton 2s -1s infinite linear;
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
--color-card-foreground: var(--card-foreground);
|
|
16
16
|
--color-muted: var(--muted);
|
|
17
17
|
--color-muted-foreground: var(--muted-foreground);
|
|
18
|
+
--color-chrome: var(--chrome);
|
|
18
19
|
--color-primary: var(--primary);
|
|
19
20
|
--color-primary-foreground: var(--primary-foreground);
|
|
20
21
|
--color-destructive: var(--destructive);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Auto-generated by @posthog/quill-tokens — do not edit manually */
|
|
2
2
|
|
|
3
|
-
@custom-variant dark (&:is(:is(.dark, [theme="dark"]), :is(.dark, [theme="dark"]) *));
|
|
3
|
+
@custom-variant dark (&:is(:is(.dark, [theme="dark"], [data-theme="dark"]), :is(.dark, [theme="dark"], [data-theme="dark"]) *));
|
|
4
4
|
|
|
5
5
|
@theme inline {
|
|
6
6
|
--animate-skeleton: skeleton 2s -1s infinite linear;
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
--color-card-foreground: var(--card-foreground);
|
|
16
16
|
--color-muted: var(--muted);
|
|
17
17
|
--color-muted-foreground: var(--muted-foreground);
|
|
18
|
+
--color-chrome: var(--chrome);
|
|
18
19
|
--color-primary: var(--primary);
|
|
19
20
|
--color-primary-foreground: var(--primary-foreground);
|
|
20
21
|
--color-destructive: var(--destructive);
|
package/dist/tailwind.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Auto-generated by @posthog/quill-tokens — do not edit manually */
|
|
2
2
|
|
|
3
|
-
@custom-variant dark (&:is(:is(.dark, [theme="dark"]), :is(.dark, [theme="dark"]) *));
|
|
3
|
+
@custom-variant dark (&:is(:is(.dark, [theme="dark"], [data-theme="dark"]), :is(.dark, [theme="dark"], [data-theme="dark"]) *));
|
|
4
4
|
|
|
5
5
|
@theme inline {
|
|
6
6
|
--animate-skeleton: skeleton 2s -1s infinite linear;
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
--color-card-foreground: var(--card-foreground);
|
|
16
16
|
--color-muted: var(--muted);
|
|
17
17
|
--color-muted-foreground: var(--muted-foreground);
|
|
18
|
+
--color-chrome: var(--chrome);
|
|
18
19
|
--color-primary: var(--primary);
|
|
19
20
|
--color-primary-foreground: var(--primary-foreground);
|
|
20
21
|
--color-destructive: var(--destructive);
|
package/dist/tailwind.scoped.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Auto-generated by @posthog/quill-tokens — do not edit manually */
|
|
2
2
|
|
|
3
|
-
@custom-variant dark (&:is(:is(.dark, [theme="dark"]), :is(.dark, [theme="dark"]) *));
|
|
3
|
+
@custom-variant dark (&:is(:is(.dark, [theme="dark"], [data-theme="dark"]), :is(.dark, [theme="dark"], [data-theme="dark"]) *));
|
|
4
4
|
|
|
5
5
|
@theme inline {
|
|
6
6
|
--animate-skeleton: skeleton 2s -1s infinite linear;
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
--color-card-foreground: var(--card-foreground);
|
|
16
16
|
--color-muted: var(--muted);
|
|
17
17
|
--color-muted-foreground: var(--muted-foreground);
|
|
18
|
+
--color-chrome: var(--chrome);
|
|
18
19
|
--color-primary: var(--primary);
|
|
19
20
|
--color-primary-foreground: var(--primary-foreground);
|
|
20
21
|
--color-destructive: var(--destructive);
|
package/package.json
CHANGED
package/src/colors.ts
CHANGED
|
@@ -87,7 +87,11 @@ function oklch(l: number, c: number, h: number, alpha?: number): string {
|
|
|
87
87
|
export function buildSemanticColors(): Record<string, ColorTuple> {
|
|
88
88
|
return {
|
|
89
89
|
// ── Surfaces (theme-derived) ──────────────────
|
|
90
|
-
|
|
90
|
+
// Matched to PostHog app's --color-bg-primary so quill panels blend
|
|
91
|
+
// with the surrounding app: light hsl(75 14% 95%), dark hsl(240 8% 8%),
|
|
92
|
+
// converted to OKLCH. Dark equals `muted` — PostHog uses one token for
|
|
93
|
+
// both; surfaces separate via `card` / borders, not background tone.
|
|
94
|
+
background: [surface(0.966, 0.79, 'light'), surface(0.187, 1.1, 'dark'), 'bg-background'],
|
|
91
95
|
foreground: [oklch(0.13, 0.028, 262), oklch(0.967, 0.003, 265), 'text-foreground'],
|
|
92
96
|
|
|
93
97
|
card: [surface(0.995, 0.3, 'light'), surface(0.2, 1.2, 'dark'), 'bg-card'],
|
|
@@ -95,9 +99,17 @@ export function buildSemanticColors(): Record<string, ColorTuple> {
|
|
|
95
99
|
// primitives migrate to plain `text-foreground`.
|
|
96
100
|
'card-foreground': ['var(--foreground)', 'var(--foreground)', 'text-card-foreground'],
|
|
97
101
|
|
|
98
|
-
|
|
102
|
+
// Matched to PostHog app's --color-bg-surface-secondary (subdued cards,
|
|
103
|
+
// list rows): light hsl(70 16% 93%), dark hsl(240 8% 10%), in OKLCH.
|
|
104
|
+
muted: [surface(0.953, 1.28, 'light'), surface(0.209, 1.33, 'dark'), 'bg-muted'],
|
|
99
105
|
'muted-foreground': [oklch(0.446, 0.03, 257), oklch(0.709, 0, 0), 'text-muted-foreground'],
|
|
100
106
|
|
|
107
|
+
// Chrome — UI furniture surface (toolbars, menubars, nav). Matched to
|
|
108
|
+
// PostHog app's --color-bg-surface-tertiary: light hsl(77 13% 89%),
|
|
109
|
+
// dark hsl(240 8% 8%), in OKLCH. Hue stays theme-derived; chroma is
|
|
110
|
+
// near-zero so the hue offset is imperceptible.
|
|
111
|
+
chrome: [surface(0.923, 1.67, 'light'), surface(0.187, 1.1, 'dark'), 'bg-chrome'],
|
|
112
|
+
|
|
101
113
|
// ── Brand (driven by --primary-light / --primary-dark) ─
|
|
102
114
|
primary: ['var(--primary-light)', 'var(--primary-dark)', 'bg-primary'],
|
|
103
115
|
'primary-foreground': [oklch(1, 0, 0), oklch(0.13, 0.028, 262), 'text-primary-foreground'],
|
|
@@ -174,8 +186,11 @@ export interface StylesConfig {
|
|
|
174
186
|
* array — when multiple are given they are combined with `:is()`
|
|
175
187
|
* so any of them activates dark mode.
|
|
176
188
|
*
|
|
177
|
-
* Default: `['.dark', '[theme="dark"]']
|
|
178
|
-
*
|
|
189
|
+
* Default: `['.dark', '[theme="dark"]', '[data-theme="dark"]']`. The
|
|
190
|
+
* three flavours cover Tailwind's `.dark` class convention, the bare
|
|
191
|
+
* `theme="dark"` attribute, and the `data-theme="dark"` attribute used
|
|
192
|
+
* by libraries that follow the HTML `data-*` convention (notably
|
|
193
|
+
* `@modelcontextprotocol/ext-apps` SDK's `applyDocumentTheme()`).
|
|
179
194
|
*/
|
|
180
195
|
darkSelector?: string | string[]
|
|
181
196
|
}
|
|
@@ -202,6 +217,7 @@ const THEME_DERIVED_TOKENS: ReadonlySet<string> = new Set([
|
|
|
202
217
|
'background',
|
|
203
218
|
'card',
|
|
204
219
|
'muted',
|
|
220
|
+
'chrome',
|
|
205
221
|
'primary',
|
|
206
222
|
'border',
|
|
207
223
|
'input',
|
|
@@ -246,7 +262,7 @@ assertThemeDerivedSyncedWithColors(semanticColors)
|
|
|
246
262
|
|
|
247
263
|
/** Normalize darkSelector option into a single CSS selector string. */
|
|
248
264
|
function resolveDarkSelector(raw?: string | string[]): string {
|
|
249
|
-
const defaults = ['.dark', '[theme="dark"]']
|
|
265
|
+
const defaults = ['.dark', '[theme="dark"]', '[data-theme="dark"]']
|
|
250
266
|
const selectors = raw === undefined ? defaults : typeof raw === 'string' ? [raw] : raw
|
|
251
267
|
return selectors.length === 1 ? selectors[0] : `:is(${selectors.join(', ')})`
|
|
252
268
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"border-radius.d.ts","sourceRoot":"","sources":["../src/border-radius.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,YAAY;;;;;;;CAOf,CAAA;AAEV,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAA"}
|
package/dist/colors.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../src/colors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AASH,MAAM,WAAW,WAAW;IACxB,sDAAsD;IACtD,GAAG,EAAE,MAAM,CAAA;IACX,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAA;IACf,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAA;IACZ;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAA;IACpB,0DAA0D;IAC1D,WAAW,EAAE,MAAM,CAAA;CACtB;AAED,0EAA0E;AAC1E,eAAO,MAAM,aAAa,EAAE,WAM3B,CAAA;AAID,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAA;AACrC,MAAM,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,CAAA;AA8BtF;;;;;;GAMG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAiEhE;AAED,eAAO,MAAM,cAAc,4BAAwB,CAAA;AAInD,MAAM,WAAW,YAAY;IACzB,kDAAkD;IAClD,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CACnC;AAID,gCAAgC;AAChC,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAG3E;AAiED,gEAAgE;AAChE,wBAAgB,sBAAsB,CAClC,KAAK,GAAE,WAA2B,EAClC,IAAI,GAAE,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,cAAc,CAAM,GACxD,MAAM,CAqHR;AAuCD,wBAAgB,iBAAiB,CAAC,MAAM,GAAE,YAAiB,GAAG,MAAM,CAkGnE"}
|
package/dist/css.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../src/css.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,mEAAmE;AACnE,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAO,GAAG,MAAM,CAI7F;AAED,0DAA0D;AAC1D,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,SAAO,GAAG,MAAM,CAIjF;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,gDAAgD;AAChD,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAEhE"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACH,cAAc,EACd,mBAAmB,EACnB,YAAY,EACZ,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,GAChB,MAAM,UAAU,CAAA;AACjB,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAGvF,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAG9E,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACnD,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAGxD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAGnD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,YAAY,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAGtC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,OAAO,CAAA"}
|
package/dist/shadow.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shadow.d.ts","sourceRoot":"","sources":["../src/shadow.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,eAAO,MAAM,MAAM;;;;;CAKT,CAAA;AAEV,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAA;AAElC,2DAA2D;AAC3D,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C"}
|
package/dist/spacing.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../src/spacing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,wEAAwE;AACxE,eAAO,MAAM,gBAAgB,OAAO,CAAA;AAEpC,gDAAgD;AAChD,eAAO,MAAM,YAAY,YAA2B,CAAA;AAKpD;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C"}
|
package/dist/typography.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../src/typography.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;CAQX,CAAA;AAEV,eAAO,MAAM,UAAU;;;CAGb,CAAA;AAEV,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAA;AACtC,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAA;AAE1C,oFAAoF;AACpF,wBAAgB,mBAAmB,IAAI,MAAM,CAI5C;AAED,8DAA8D;AAC9D,wBAAgB,qBAAqB,IAAI,MAAM,CAI9C"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|