@tanstack/pacer-devtools 0.2.0 → 0.3.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/esm/core.d.ts +1 -1
- package/dist/esm/core.js +12 -2
- package/dist/esm/core.js.map +1 -1
- package/dist/esm/styles/tokens.js +8 -1
- package/dist/esm/styles/tokens.js.map +1 -1
- package/dist/esm/styles/use-styles.js +64 -53
- package/dist/esm/styles/use-styles.js.map +1 -1
- package/package.json +2 -2
- package/src/core.tsx +11 -2
- package/src/styles/use-styles.ts +64 -53
package/dist/esm/core.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ export interface PacerDevtoolsInit {
|
|
|
3
3
|
export declare class PacerDevtoolsCore {
|
|
4
4
|
#private;
|
|
5
5
|
constructor(_init?: PacerDevtoolsInit | undefined);
|
|
6
|
-
mount<T extends HTMLElement>(el: T): void;
|
|
6
|
+
mount<T extends HTMLElement>(el: T, theme: 'light' | 'dark'): void;
|
|
7
7
|
unmount(): void;
|
|
8
8
|
}
|
package/dist/esm/core.js
CHANGED
|
@@ -5,9 +5,10 @@ class PacerDevtoolsCore {
|
|
|
5
5
|
#isMounted = false;
|
|
6
6
|
#dispose;
|
|
7
7
|
#Component;
|
|
8
|
+
#ThemeProvider;
|
|
8
9
|
constructor(_init) {
|
|
9
10
|
}
|
|
10
|
-
mount(el) {
|
|
11
|
+
mount(el, theme) {
|
|
11
12
|
if (this.#isMounted) {
|
|
12
13
|
throw new Error("Devtools is already mounted");
|
|
13
14
|
}
|
|
@@ -15,12 +16,21 @@ class PacerDevtoolsCore {
|
|
|
15
16
|
const dispose = render(() => {
|
|
16
17
|
this.#Component = lazy(() => import("./PacerDevtools.js"));
|
|
17
18
|
const Devtools = this.#Component;
|
|
19
|
+
this.#ThemeProvider = lazy(() => import("@tanstack/devtools-ui").then((mod) => ({
|
|
20
|
+
default: mod.ThemeContextProvider
|
|
21
|
+
})));
|
|
22
|
+
const ThemeProvider = this.#ThemeProvider;
|
|
18
23
|
return createComponent(Portal, {
|
|
19
24
|
mount: mountTo,
|
|
20
25
|
get children() {
|
|
21
26
|
var _el$ = _tmpl$();
|
|
22
27
|
_el$.style.setProperty("height", "100%");
|
|
23
|
-
insert(_el$, createComponent(
|
|
28
|
+
insert(_el$, createComponent(ThemeProvider, {
|
|
29
|
+
theme,
|
|
30
|
+
get children() {
|
|
31
|
+
return createComponent(Devtools, {});
|
|
32
|
+
}
|
|
33
|
+
}));
|
|
24
34
|
return _el$;
|
|
25
35
|
}
|
|
26
36
|
});
|
package/dist/esm/core.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","sources":["../../src/core.tsx"],"sourcesContent":["import { lazy } from 'solid-js'\nimport { Portal, render } from 'solid-js/web'\n\nexport interface PacerDevtoolsInit {}\n\nexport class PacerDevtoolsCore {\n #isMounted = false\n #dispose?: () => void\n #Component: any\n\n constructor(_init?: PacerDevtoolsInit | undefined) {}\n\n mount<T extends HTMLElement>(el: T) {\n if (this.#isMounted) {\n throw new Error('Devtools is already mounted')\n }\n const mountTo = el\n const dispose = render(() => {\n this.#Component = lazy(() => import('./PacerDevtools'))\n const Devtools = this.#Component\n\n return (\n <Portal mount={mountTo}>\n <div style={{ height: '100%' }}>\n <Devtools />\n </div>\n </Portal>\n )\n }, mountTo)\n this.#isMounted = true\n this.#dispose = dispose\n }\n\n unmount() {\n if (!this.#isMounted) {\n throw new Error('Devtools is not mounted')\n }\n this.#dispose?.()\n this.#isMounted = false\n }\n}\n"],"names":["PacerDevtoolsCore","constructor","_init","mount","el","Error","mountTo","dispose","render","lazy","Devtools","_$createComponent","Portal","children","_el$","_tmpl$","style","setProperty","_$insert","unmount"],"mappings":";;;AAKO,MAAMA,kBAAkB;AAAA,EAC7B,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EAEAC,YAAYC,OAAuC;AAAA,EAAA;AAAA,EAEnDC,MAA6BC,
|
|
1
|
+
{"version":3,"file":"core.js","sources":["../../src/core.tsx"],"sourcesContent":["import { lazy } from 'solid-js'\nimport { Portal, render } from 'solid-js/web'\n\nexport interface PacerDevtoolsInit {}\n\nexport class PacerDevtoolsCore {\n #isMounted = false\n #dispose?: () => void\n #Component: any\n #ThemeProvider: any\n\n constructor(_init?: PacerDevtoolsInit | undefined) {}\n\n mount<T extends HTMLElement>(el: T, theme: 'light' | 'dark') {\n if (this.#isMounted) {\n throw new Error('Devtools is already mounted')\n }\n const mountTo = el\n const dispose = render(() => {\n this.#Component = lazy(() => import('./PacerDevtools'))\n const Devtools = this.#Component\n this.#ThemeProvider = lazy(() =>\n import('@tanstack/devtools-ui').then((mod) => ({\n default: mod.ThemeContextProvider,\n })),\n )\n const ThemeProvider = this.#ThemeProvider\n\n return (\n <Portal mount={mountTo}>\n <div style={{ height: '100%' }}>\n <ThemeProvider theme={theme}>\n <Devtools />\n </ThemeProvider>\n </div>\n </Portal>\n )\n }, mountTo)\n this.#isMounted = true\n this.#dispose = dispose\n }\n\n unmount() {\n if (!this.#isMounted) {\n throw new Error('Devtools is not mounted')\n }\n this.#dispose?.()\n this.#isMounted = false\n }\n}\n"],"names":["PacerDevtoolsCore","constructor","_init","mount","el","theme","Error","mountTo","dispose","render","lazy","Devtools","then","mod","default","ThemeContextProvider","ThemeProvider","_$createComponent","Portal","children","_el$","_tmpl$","style","setProperty","_$insert","unmount"],"mappings":";;;AAKO,MAAMA,kBAAkB;AAAA,EAC7B,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EAEAC,YAAYC,OAAuC;AAAA,EAAA;AAAA,EAEnDC,MAA6BC,IAAOC,OAAyB;AAC3D,QAAI,KAAK,YAAY;AACnB,YAAM,IAAIC,MAAM,6BAA6B;AAAA,IAAA;AAE/C,UAAMC,UAAUH;AAChB,UAAMI,UAAUC,OAAO,MAAM;AAC3B,WAAK,aAAaC,KAAK,MAAM,OAAO,oBAAiB,CAAC;AACtD,YAAMC,WAAW,KAAK;AACtB,WAAK,iBAAiBD,KAAK,MACzB,OAAO,uBAAuB,EAAEE,KAAMC,CAAAA,SAAS;AAAA,QAC7CC,SAASD,IAAIE;AAAAA,MAAAA,EACb,CACJ;AACA,YAAMC,gBAAgB,KAAK;AAE3B,aAAAC,gBACGC,QAAM;AAAA,QAACf,OAAOI;AAAAA,QAAO,IAAAY,WAAA;AAAA,cAAAC,OAAAC,OAAAA;AAAAD,eAAAE,MAAAC,YAAA,UAAA,MAAA;AAAAC,iBAAAJ,MAAAH,gBAEjBD,eAAa;AAAA,YAACX;AAAAA,YAAY,IAAAc,WAAA;AAAA,qBAAAF,gBACxBN,UAAQ,EAAA;AAAA,YAAA;AAAA,UAAA,CAAA,CAAA;AAAA,iBAAAS;AAAAA,QAAAA;AAAAA,MAAA,CAAA;AAAA,IAAA,GAKhBb,OAAO;AACV,SAAK,aAAa;AAClB,SAAK,WAAWC;AAAAA,EAAAA;AAAAA,EAGlBiB,UAAU;AACR,QAAI,CAAC,KAAK,YAAY;AACpB,YAAM,IAAInB,MAAM,yBAAyB;AAAA,IAAA;AAE3C,SAAK,WAAA;AACL,SAAK,aAAa;AAAA,EAAA;AAEtB;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const tokens = {
|
|
2
2
|
colors: {
|
|
3
3
|
black: "#000000",
|
|
4
|
+
white: "#ffffff",
|
|
4
5
|
darkGray: {
|
|
5
6
|
400: "#313749",
|
|
6
7
|
500: "#292e3d",
|
|
@@ -11,14 +12,20 @@ const tokens = {
|
|
|
11
12
|
gray: {
|
|
12
13
|
100: "#f2f4f7",
|
|
13
14
|
200: "#eaecf0",
|
|
15
|
+
300: "#d0d5dd",
|
|
14
16
|
400: "#98a2b3",
|
|
15
|
-
500: "#667085"
|
|
17
|
+
500: "#667085",
|
|
18
|
+
600: "#475467",
|
|
19
|
+
800: "#1d2939",
|
|
20
|
+
900: "#101828"
|
|
16
21
|
},
|
|
17
22
|
blue: {
|
|
23
|
+
100: "#D1E9FF",
|
|
18
24
|
300: "#84CAFF",
|
|
19
25
|
400: "#53B1FD",
|
|
20
26
|
500: "#2E90FA",
|
|
21
27
|
600: "#1570EF",
|
|
28
|
+
700: "#175CD3",
|
|
22
29
|
900: "#194185"
|
|
23
30
|
},
|
|
24
31
|
green: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sources":["../../../src/styles/tokens.ts"],"sourcesContent":["export const tokens = {\n colors: {\n inherit: 'inherit',\n current: 'currentColor',\n transparent: 'transparent',\n black: '#000000',\n white: '#ffffff',\n neutral: {\n 50: '#f9fafb',\n 100: '#f2f4f7',\n 200: '#eaecf0',\n 300: '#d0d5dd',\n 400: '#98a2b3',\n 500: '#667085',\n 600: '#475467',\n 700: '#344054',\n 800: '#1d2939',\n 900: '#101828',\n },\n darkGray: {\n 50: '#525c7a',\n 100: '#49536e',\n 200: '#414962',\n 300: '#394056',\n 400: '#313749',\n 500: '#292e3d',\n 600: '#212530',\n 700: '#191c24',\n 800: '#111318',\n 900: '#0b0d10',\n },\n gray: {\n 50: '#f9fafb',\n 100: '#f2f4f7',\n 200: '#eaecf0',\n 300: '#d0d5dd',\n 400: '#98a2b3',\n 500: '#667085',\n 600: '#475467',\n 700: '#344054',\n 800: '#1d2939',\n 900: '#101828',\n },\n blue: {\n 25: '#F5FAFF',\n 50: '#EFF8FF',\n 100: '#D1E9FF',\n 200: '#B2DDFF',\n 300: '#84CAFF',\n 400: '#53B1FD',\n 500: '#2E90FA',\n 600: '#1570EF',\n 700: '#175CD3',\n 800: '#1849A9',\n 900: '#194185',\n },\n green: {\n 25: '#F6FEF9',\n 50: '#ECFDF3',\n 100: '#D1FADF',\n 200: '#A6F4C5',\n 300: '#6CE9A6',\n 400: '#32D583',\n 500: '#12B76A',\n 600: '#039855',\n 700: '#027A48',\n 800: '#05603A',\n 900: '#054F31',\n },\n red: {\n 50: '#fef2f2',\n 100: '#fee2e2',\n 200: '#fecaca',\n 300: '#fca5a5',\n 400: '#f87171',\n 500: '#ef4444',\n 600: '#dc2626',\n 700: '#b91c1c',\n 800: '#991b1b',\n 900: '#7f1d1d',\n 950: '#450a0a',\n },\n yellow: {\n 25: '#FFFCF5',\n 50: '#FFFAEB',\n 100: '#FEF0C7',\n 200: '#FEDF89',\n 300: '#FEC84B',\n 400: '#FDB022',\n 500: '#F79009',\n 600: '#DC6803',\n 700: '#B54708',\n 800: '#93370D',\n 900: '#7A2E0E',\n },\n purple: {\n 25: '#FAFAFF',\n 50: '#F4F3FF',\n 100: '#EBE9FE',\n 200: '#D9D6FE',\n 300: '#BDB4FE',\n 400: '#9B8AFB',\n 500: '#7A5AF8',\n 600: '#6938EF',\n 700: '#5925DC',\n 800: '#4A1FB8',\n 900: '#3E1C96',\n },\n teal: {\n 25: '#F6FEFC',\n 50: '#F0FDF9',\n 100: '#CCFBEF',\n 200: '#99F6E0',\n 300: '#5FE9D0',\n 400: '#2ED3B7',\n 500: '#15B79E',\n 600: '#0E9384',\n 700: '#107569',\n 800: '#125D56',\n 900: '#134E48',\n },\n pink: {\n 25: '#fdf2f8',\n 50: '#fce7f3',\n 100: '#fbcfe8',\n 200: '#f9a8d4',\n 300: '#f472b6',\n 400: '#ec4899',\n 500: '#db2777',\n 600: '#be185d',\n 700: '#9d174d',\n 800: '#831843',\n 900: '#500724',\n },\n cyan: {\n 25: '#ecfeff',\n 50: '#cffafe',\n 100: '#a5f3fc',\n 200: '#67e8f9',\n 300: '#22d3ee',\n 400: '#06b6d4',\n 500: '#0891b2',\n 600: '#0e7490',\n 700: '#155e75',\n 800: '#164e63',\n 900: '#083344',\n },\n },\n alpha: {\n 100: 'ff',\n 90: 'e5',\n 80: 'cc',\n 70: 'b3',\n 60: '99',\n 50: '80',\n 40: '66',\n 30: '4d',\n 20: '33',\n 10: '1a',\n 0: '00',\n },\n font: {\n size: {\n '2xs': 'calc(var(--tsrd-font-size) * 0.625)',\n xs: 'calc(var(--tsrd-font-size) * 0.75)',\n sm: 'calc(var(--tsrd-font-size) * 0.875)',\n md: 'var(--tsrd-font-size)',\n lg: 'calc(var(--tsrd-font-size) * 1.125)',\n xl: 'calc(var(--tsrd-font-size) * 1.25)',\n '2xl': 'calc(var(--tsrd-font-size) * 1.5)',\n '3xl': 'calc(var(--tsrd-font-size) * 1.875)',\n '4xl': 'calc(var(--tsrd-font-size) * 2.25)',\n '5xl': 'calc(var(--tsrd-font-size) * 3)',\n '6xl': 'calc(var(--tsrd-font-size) * 3.75)',\n '7xl': 'calc(var(--tsrd-font-size) * 4.5)',\n '8xl': 'calc(var(--tsrd-font-size) * 6)',\n '9xl': 'calc(var(--tsrd-font-size) * 8)',\n },\n lineHeight: {\n '3xs': 'calc(var(--tsrd-font-size) * 0.75)',\n '2xs': 'calc(var(--tsrd-font-size) * 0.875)',\n xs: 'calc(var(--tsrd-font-size) * 1)',\n sm: 'calc(var(--tsrd-font-size) * 1.25)',\n md: 'calc(var(--tsrd-font-size) * 1.5)',\n lg: 'calc(var(--tsrd-font-size) * 1.75)',\n xl: 'calc(var(--tsrd-font-size) * 2)',\n '2xl': 'calc(var(--tsrd-font-size) * 2.25)',\n '3xl': 'calc(var(--tsrd-font-size) * 2.5)',\n '4xl': 'calc(var(--tsrd-font-size) * 2.75)',\n '5xl': 'calc(var(--tsrd-font-size) * 3)',\n '6xl': 'calc(var(--tsrd-font-size) * 3.25)',\n '7xl': 'calc(var(--tsrd-font-size) * 3.5)',\n '8xl': 'calc(var(--tsrd-font-size) * 3.75)',\n '9xl': 'calc(var(--tsrd-font-size) * 4)',\n },\n weight: {\n thin: '100',\n extralight: '200',\n light: '300',\n normal: '400',\n medium: '500',\n semibold: '600',\n bold: '700',\n extrabold: '800',\n black: '900',\n },\n fontFamily: {\n sans: 'ui-sans-serif, Inter, system-ui, sans-serif, sans-serif',\n mono: `ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace`,\n },\n },\n breakpoints: {\n xs: '320px',\n sm: '640px',\n md: '768px',\n lg: '1024px',\n xl: '1280px',\n '2xl': '1536px',\n },\n border: {\n radius: {\n none: '0px',\n xs: 'calc(var(--tsrd-font-size) * 0.125)',\n sm: 'calc(var(--tsrd-font-size) * 0.25)',\n md: 'calc(var(--tsrd-font-size) * 0.375)',\n lg: 'calc(var(--tsrd-font-size) * 0.5)',\n xl: 'calc(var(--tsrd-font-size) * 0.75)',\n '2xl': 'calc(var(--tsrd-font-size) * 1)',\n '3xl': 'calc(var(--tsrd-font-size) * 1.5)',\n full: '9999px',\n },\n },\n size: {\n 0: '0px',\n 0.25: 'calc(var(--tsrd-font-size) * 0.0625)',\n 0.5: 'calc(var(--tsrd-font-size) * 0.125)',\n 1: 'calc(var(--tsrd-font-size) * 0.25)',\n 1.5: 'calc(var(--tsrd-font-size) * 0.375)',\n 2: 'calc(var(--tsrd-font-size) * 0.5)',\n 2.5: 'calc(var(--tsrd-font-size) * 0.625)',\n 3: 'calc(var(--tsrd-font-size) * 0.75)',\n 3.5: 'calc(var(--tsrd-font-size) * 0.875)',\n 4: 'calc(var(--tsrd-font-size) * 1)',\n 4.5: 'calc(var(--tsrd-font-size) * 1.125)',\n 5: 'calc(var(--tsrd-font-size) * 1.25)',\n 5.5: 'calc(var(--tsrd-font-size) * 1.375)',\n 6: 'calc(var(--tsrd-font-size) * 1.5)',\n 6.5: 'calc(var(--tsrd-font-size) * 1.625)',\n 7: 'calc(var(--tsrd-font-size) * 1.75)',\n 8: 'calc(var(--tsrd-font-size) * 2)',\n 9: 'calc(var(--tsrd-font-size) * 2.25)',\n 10: 'calc(var(--tsrd-font-size) * 2.5)',\n 11: 'calc(var(--tsrd-font-size) * 2.75)',\n 12: 'calc(var(--tsrd-font-size) * 3)',\n 14: 'calc(var(--tsrd-font-size) * 3.5)',\n 16: 'calc(var(--tsrd-font-size) * 4)',\n 20: 'calc(var(--tsrd-font-size) * 5)',\n 24: 'calc(var(--tsrd-font-size) * 6)',\n 28: 'calc(var(--tsrd-font-size) * 7)',\n 32: 'calc(var(--tsrd-font-size) * 8)',\n 36: 'calc(var(--tsrd-font-size) * 9)',\n 40: 'calc(var(--tsrd-font-size) * 10)',\n 44: 'calc(var(--tsrd-font-size) * 11)',\n 48: 'calc(var(--tsrd-font-size) * 12)',\n 52: 'calc(var(--tsrd-font-size) * 13)',\n 56: 'calc(var(--tsrd-font-size) * 14)',\n 60: 'calc(var(--tsrd-font-size) * 15)',\n 64: 'calc(var(--tsrd-font-size) * 16)',\n 72: 'calc(var(--tsrd-font-size) * 18)',\n 80: 'calc(var(--tsrd-font-size) * 20)',\n 96: 'calc(var(--tsrd-font-size) * 24)',\n },\n shadow: {\n xs: (_: string = 'rgb(0 0 0 / 0.1)') =>\n `0 1px 2px 0 rgb(0 0 0 / 0.05)` as const,\n sm: (color: string = 'rgb(0 0 0 / 0.1)') =>\n `0 1px 3px 0 ${color}, 0 1px 2px -1px ${color}` as const,\n md: (color: string = 'rgb(0 0 0 / 0.1)') =>\n `0 4px 6px -1px ${color}, 0 2px 4px -2px ${color}` as const,\n lg: (color: string = 'rgb(0 0 0 / 0.1)') =>\n `0 10px 15px -3px ${color}, 0 4px 6px -4px ${color}` as const,\n xl: (color: string = 'rgb(0 0 0 / 0.1)') =>\n `0 20px 25px -5px ${color}, 0 8px 10px -6px ${color}` as const,\n '2xl': (color: string = 'rgb(0 0 0 / 0.25)') =>\n `0 25px 50px -12px ${color}` as const,\n inner: (color: string = 'rgb(0 0 0 / 0.05)') =>\n `inset 0 2px 4px 0 ${color}` as const,\n none: () => `none` as const,\n },\n zIndices: {\n hide: -1,\n auto: 'auto',\n base: 0,\n docked: 10,\n dropdown: 1000,\n sticky: 1100,\n banner: 1200,\n overlay: 1300,\n modal: 1400,\n popover: 1500,\n skipLink: 1600,\n toast: 1700,\n tooltip: 1800,\n },\n} as const\n"],"names":[],"mappings":"AAAO,MAAM,SAAS;AAAA,EACpB,QAAQ;AAAA,IAIN,OAAO;AAAA,IAcP,UAAU;AAAA,MAKR,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,M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oB,KAAK;AAAA,IAClD,IAAI,CAAC,QAAgB,uBACnB,oBAAoB,KAAK,oBAAoB,KAAK;AAAA,IACpD,IAAI,CAAC,QAAgB,uBACnB,oBAAoB,KAAK,qBAAqB,KAAK;AAAA,IACrD,OAAO,CAAC,QAAgB,wBACtB,qBAAqB,KAAK;AAAA,IAC5B,OAAO,CAAC,QAAgB,wBACtB,qBAAqB,KAAK;AAAA,IAC5B,MAAM,MAAM;AAAA,EAAA;AAiBhB;"}
|
|
1
|
+
{"version":3,"file":"tokens.js","sources":["../../../src/styles/tokens.ts"],"sourcesContent":["export const tokens = {\n colors: {\n inherit: 'inherit',\n current: 'currentColor',\n transparent: 'transparent',\n black: '#000000',\n white: '#ffffff',\n neutral: {\n 50: '#f9fafb',\n 100: '#f2f4f7',\n 200: '#eaecf0',\n 300: '#d0d5dd',\n 400: '#98a2b3',\n 500: '#667085',\n 600: '#475467',\n 700: '#344054',\n 800: '#1d2939',\n 900: '#101828',\n },\n darkGray: {\n 50: '#525c7a',\n 100: '#49536e',\n 200: '#414962',\n 300: '#394056',\n 400: '#313749',\n 500: '#292e3d',\n 600: '#212530',\n 700: '#191c24',\n 800: '#111318',\n 900: '#0b0d10',\n },\n gray: {\n 50: '#f9fafb',\n 100: '#f2f4f7',\n 200: '#eaecf0',\n 300: '#d0d5dd',\n 400: '#98a2b3',\n 500: '#667085',\n 600: '#475467',\n 700: '#344054',\n 800: '#1d2939',\n 900: '#101828',\n },\n blue: {\n 25: '#F5FAFF',\n 50: '#EFF8FF',\n 100: '#D1E9FF',\n 200: '#B2DDFF',\n 300: '#84CAFF',\n 400: '#53B1FD',\n 500: '#2E90FA',\n 600: '#1570EF',\n 700: '#175CD3',\n 800: '#1849A9',\n 900: '#194185',\n },\n green: {\n 25: '#F6FEF9',\n 50: '#ECFDF3',\n 100: '#D1FADF',\n 200: '#A6F4C5',\n 300: '#6CE9A6',\n 400: '#32D583',\n 500: '#12B76A',\n 600: '#039855',\n 700: '#027A48',\n 800: '#05603A',\n 900: '#054F31',\n },\n red: {\n 50: '#fef2f2',\n 100: '#fee2e2',\n 200: '#fecaca',\n 300: '#fca5a5',\n 400: '#f87171',\n 500: '#ef4444',\n 600: '#dc2626',\n 700: '#b91c1c',\n 800: '#991b1b',\n 900: '#7f1d1d',\n 950: '#450a0a',\n },\n yellow: {\n 25: '#FFFCF5',\n 50: '#FFFAEB',\n 100: '#FEF0C7',\n 200: '#FEDF89',\n 300: '#FEC84B',\n 400: '#FDB022',\n 500: '#F79009',\n 600: '#DC6803',\n 700: '#B54708',\n 800: '#93370D',\n 900: '#7A2E0E',\n },\n purple: {\n 25: '#FAFAFF',\n 50: '#F4F3FF',\n 100: '#EBE9FE',\n 200: '#D9D6FE',\n 300: '#BDB4FE',\n 400: '#9B8AFB',\n 500: '#7A5AF8',\n 600: '#6938EF',\n 700: '#5925DC',\n 800: '#4A1FB8',\n 900: '#3E1C96',\n },\n teal: {\n 25: '#F6FEFC',\n 50: '#F0FDF9',\n 100: '#CCFBEF',\n 200: '#99F6E0',\n 300: '#5FE9D0',\n 400: '#2ED3B7',\n 500: '#15B79E',\n 600: '#0E9384',\n 700: '#107569',\n 800: '#125D56',\n 900: '#134E48',\n },\n pink: {\n 25: '#fdf2f8',\n 50: '#fce7f3',\n 100: '#fbcfe8',\n 200: '#f9a8d4',\n 300: '#f472b6',\n 400: '#ec4899',\n 500: '#db2777',\n 600: '#be185d',\n 700: '#9d174d',\n 800: '#831843',\n 900: '#500724',\n },\n cyan: {\n 25: '#ecfeff',\n 50: '#cffafe',\n 100: '#a5f3fc',\n 200: '#67e8f9',\n 300: '#22d3ee',\n 400: '#06b6d4',\n 500: '#0891b2',\n 600: '#0e7490',\n 700: '#155e75',\n 800: '#164e63',\n 900: '#083344',\n },\n },\n alpha: {\n 100: 'ff',\n 90: 'e5',\n 80: 'cc',\n 70: 'b3',\n 60: '99',\n 50: '80',\n 40: '66',\n 30: '4d',\n 20: '33',\n 10: '1a',\n 0: '00',\n },\n font: {\n size: {\n '2xs': 'calc(var(--tsrd-font-size) * 0.625)',\n xs: 'calc(var(--tsrd-font-size) * 0.75)',\n sm: 'calc(var(--tsrd-font-size) * 0.875)',\n md: 'var(--tsrd-font-size)',\n lg: 'calc(var(--tsrd-font-size) * 1.125)',\n xl: 'calc(var(--tsrd-font-size) * 1.25)',\n '2xl': 'calc(var(--tsrd-font-size) * 1.5)',\n '3xl': 'calc(var(--tsrd-font-size) * 1.875)',\n '4xl': 'calc(var(--tsrd-font-size) * 2.25)',\n '5xl': 'calc(var(--tsrd-font-size) * 3)',\n '6xl': 'calc(var(--tsrd-font-size) * 3.75)',\n '7xl': 'calc(var(--tsrd-font-size) * 4.5)',\n '8xl': 'calc(var(--tsrd-font-size) * 6)',\n '9xl': 'calc(var(--tsrd-font-size) * 8)',\n },\n lineHeight: {\n '3xs': 'calc(var(--tsrd-font-size) * 0.75)',\n '2xs': 'calc(var(--tsrd-font-size) * 0.875)',\n xs: 'calc(var(--tsrd-font-size) * 1)',\n sm: 'calc(var(--tsrd-font-size) * 1.25)',\n md: 'calc(var(--tsrd-font-size) * 1.5)',\n lg: 'calc(var(--tsrd-font-size) * 1.75)',\n xl: 'calc(var(--tsrd-font-size) * 2)',\n '2xl': 'calc(var(--tsrd-font-size) * 2.25)',\n '3xl': 'calc(var(--tsrd-font-size) * 2.5)',\n '4xl': 'calc(var(--tsrd-font-size) * 2.75)',\n '5xl': 'calc(var(--tsrd-font-size) * 3)',\n '6xl': 'calc(var(--tsrd-font-size) * 3.25)',\n '7xl': 'calc(var(--tsrd-font-size) * 3.5)',\n '8xl': 'calc(var(--tsrd-font-size) * 3.75)',\n '9xl': 'calc(var(--tsrd-font-size) * 4)',\n },\n weight: {\n thin: '100',\n extralight: '200',\n light: '300',\n normal: '400',\n medium: '500',\n semibold: '600',\n bold: '700',\n extrabold: '800',\n black: '900',\n },\n fontFamily: {\n sans: 'ui-sans-serif, Inter, system-ui, sans-serif, sans-serif',\n mono: `ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace`,\n },\n },\n breakpoints: {\n xs: '320px',\n sm: '640px',\n md: '768px',\n lg: '1024px',\n xl: '1280px',\n '2xl': '1536px',\n },\n border: {\n radius: {\n none: '0px',\n xs: 'calc(var(--tsrd-font-size) * 0.125)',\n sm: 'calc(var(--tsrd-font-size) * 0.25)',\n md: 'calc(var(--tsrd-font-size) * 0.375)',\n lg: 'calc(var(--tsrd-font-size) * 0.5)',\n xl: 'calc(var(--tsrd-font-size) * 0.75)',\n '2xl': 'calc(var(--tsrd-font-size) * 1)',\n '3xl': 'calc(var(--tsrd-font-size) * 1.5)',\n full: '9999px',\n },\n },\n size: {\n 0: '0px',\n 0.25: 'calc(var(--tsrd-font-size) * 0.0625)',\n 0.5: 'calc(var(--tsrd-font-size) * 0.125)',\n 1: 'calc(var(--tsrd-font-size) * 0.25)',\n 1.5: 'calc(var(--tsrd-font-size) * 0.375)',\n 2: 'calc(var(--tsrd-font-size) * 0.5)',\n 2.5: 'calc(var(--tsrd-font-size) * 0.625)',\n 3: 'calc(var(--tsrd-font-size) * 0.75)',\n 3.5: 'calc(var(--tsrd-font-size) * 0.875)',\n 4: 'calc(var(--tsrd-font-size) * 1)',\n 4.5: 'calc(var(--tsrd-font-size) * 1.125)',\n 5: 'calc(var(--tsrd-font-size) * 1.25)',\n 5.5: 'calc(var(--tsrd-font-size) * 1.375)',\n 6: 'calc(var(--tsrd-font-size) * 1.5)',\n 6.5: 'calc(var(--tsrd-font-size) * 1.625)',\n 7: 'calc(var(--tsrd-font-size) * 1.75)',\n 8: 'calc(var(--tsrd-font-size) * 2)',\n 9: 'calc(var(--tsrd-font-size) * 2.25)',\n 10: 'calc(var(--tsrd-font-size) * 2.5)',\n 11: 'calc(var(--tsrd-font-size) * 2.75)',\n 12: 'calc(var(--tsrd-font-size) * 3)',\n 14: 'calc(var(--tsrd-font-size) * 3.5)',\n 16: 'calc(var(--tsrd-font-size) * 4)',\n 20: 'calc(var(--tsrd-font-size) * 5)',\n 24: 'calc(var(--tsrd-font-size) * 6)',\n 28: 'calc(var(--tsrd-font-size) * 7)',\n 32: 'calc(var(--tsrd-font-size) * 8)',\n 36: 'calc(var(--tsrd-font-size) * 9)',\n 40: 'calc(var(--tsrd-font-size) * 10)',\n 44: 'calc(var(--tsrd-font-size) * 11)',\n 48: 'calc(var(--tsrd-font-size) * 12)',\n 52: 'calc(var(--tsrd-font-size) * 13)',\n 56: 'calc(var(--tsrd-font-size) * 14)',\n 60: 'calc(var(--tsrd-font-size) * 15)',\n 64: 'calc(var(--tsrd-font-size) * 16)',\n 72: 'calc(var(--tsrd-font-size) * 18)',\n 80: 'calc(var(--tsrd-font-size) * 20)',\n 96: 'calc(var(--tsrd-font-size) * 24)',\n },\n shadow: {\n xs: (_: string = 'rgb(0 0 0 / 0.1)') =>\n `0 1px 2px 0 rgb(0 0 0 / 0.05)` as const,\n sm: (color: string = 'rgb(0 0 0 / 0.1)') =>\n `0 1px 3px 0 ${color}, 0 1px 2px -1px ${color}` as const,\n md: (color: string = 'rgb(0 0 0 / 0.1)') =>\n `0 4px 6px -1px ${color}, 0 2px 4px -2px ${color}` as const,\n lg: (color: string = 'rgb(0 0 0 / 0.1)') =>\n `0 10px 15px -3px ${color}, 0 4px 6px -4px ${color}` as const,\n xl: (color: string = 'rgb(0 0 0 / 0.1)') =>\n `0 20px 25px -5px ${color}, 0 8px 10px -6px ${color}` as const,\n '2xl': (color: string = 'rgb(0 0 0 / 0.25)') =>\n `0 25px 50px -12px ${color}` as const,\n inner: (color: string = 'rgb(0 0 0 / 0.05)') =>\n `inset 0 2px 4px 0 ${color}` as const,\n none: () => `none` as const,\n },\n zIndices: {\n hide: -1,\n auto: 'auto',\n base: 0,\n docked: 10,\n dropdown: 1000,\n sticky: 1100,\n banner: 1200,\n overlay: 1300,\n modal: 1400,\n popover: 1500,\n skipLink: 1600,\n toast: 1700,\n tooltip: 1800,\n },\n} as const\n"],"names":[],"mappings":"AAAO,MAAM,S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A,IAEH,GAAG;AAAA,IAEH,GAAG;AAAA,IAEH,GAAG;AAAA,EA6BL;AAAA,EACA,QAAQ;AAAA,IACN,IAAI,CAAC,IAAY,uBACf;AAAA,IACF,IAAI,CAAC,QAAgB,uBACnB,eAAe,KAAK,oBAAoB,KAAK;AAAA,IAC/C,IAAI,CAAC,QAAgB,uBACnB,kBAAkB,KAAK,oBAAoB,KAAK;AAAA,IAClD,IAAI,CAAC,QAAgB,uBACnB,oBAAoB,KAAK,oBAAoB,KAAK;AAAA,IACpD,IAAI,CAAC,QAAgB,uBACnB,oBAAoB,KAAK,qBAAqB,KAAK;AAAA,IACrD,OAAO,CAAC,QAAgB,wBACtB,qBAAqB,KAAK;AAAA,IAC5B,OAAO,CAAC,QAAgB,wBACtB,qBAAqB,KAAK;AAAA,IAC5B,MAAM,MAAM;AAAA,EAAA;AAiBhB;"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as goober from "goober";
|
|
2
|
-
import { createSignal } from "solid-js";
|
|
2
|
+
import { createSignal, createEffect } from "solid-js";
|
|
3
|
+
import { useTheme } from "@tanstack/devtools-ui";
|
|
3
4
|
import { tokens } from "./tokens.js";
|
|
4
|
-
const stylesFactory = () => {
|
|
5
|
+
const stylesFactory = (theme) => {
|
|
5
6
|
const { colors, font, size, alpha, border } = tokens;
|
|
6
7
|
const { fontFamily, size: fontSize } = font;
|
|
7
8
|
const css = goober.css;
|
|
9
|
+
const t = (light, dark) => theme === "light" ? light : dark;
|
|
8
10
|
return {
|
|
9
11
|
mainContainer: css`
|
|
10
12
|
display: flex;
|
|
@@ -17,7 +19,7 @@ const stylesFactory = () => {
|
|
|
17
19
|
`,
|
|
18
20
|
dragHandle: css`
|
|
19
21
|
width: 8px;
|
|
20
|
-
background: ${colors.darkGray[600]};
|
|
22
|
+
background: ${t(colors.gray[300], colors.darkGray[600])};
|
|
21
23
|
cursor: col-resize;
|
|
22
24
|
position: relative;
|
|
23
25
|
transition: all 0.2s ease;
|
|
@@ -27,12 +29,12 @@ const stylesFactory = () => {
|
|
|
27
29
|
border-radius: 2px;
|
|
28
30
|
|
|
29
31
|
&:hover {
|
|
30
|
-
background: ${colors.blue[500]};
|
|
32
|
+
background: ${t(colors.blue[600], colors.blue[500])};
|
|
31
33
|
margin: 0 ${size[1]};
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
&.dragging {
|
|
35
|
-
background: ${colors.blue[600]};
|
|
37
|
+
background: ${t(colors.blue[700], colors.blue[600])};
|
|
36
38
|
margin: 0 ${size[1]};
|
|
37
39
|
}
|
|
38
40
|
|
|
@@ -44,20 +46,20 @@ const stylesFactory = () => {
|
|
|
44
46
|
transform: translate(-50%, -50%);
|
|
45
47
|
width: 2px;
|
|
46
48
|
height: 20px;
|
|
47
|
-
background: ${colors.darkGray[400]};
|
|
49
|
+
background: ${t(colors.gray[400], colors.darkGray[400])};
|
|
48
50
|
border-radius: 1px;
|
|
49
51
|
pointer-events: none;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
&:hover::after,
|
|
53
55
|
&.dragging::after {
|
|
54
|
-
background: ${colors.blue[300]};
|
|
56
|
+
background: ${t(colors.blue[500], colors.blue[300])};
|
|
55
57
|
}
|
|
56
58
|
`,
|
|
57
59
|
leftPanel: css`
|
|
58
|
-
background: ${colors.darkGray[800]};
|
|
60
|
+
background: ${t(colors.gray[100], colors.darkGray[800])};
|
|
59
61
|
border-radius: ${border.radius.lg};
|
|
60
|
-
border: 1px solid ${colors.darkGray[700]};
|
|
62
|
+
border: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
|
|
61
63
|
display: flex;
|
|
62
64
|
flex-direction: column;
|
|
63
65
|
overflow: hidden;
|
|
@@ -65,9 +67,9 @@ const stylesFactory = () => {
|
|
|
65
67
|
flex-shrink: 0;
|
|
66
68
|
`,
|
|
67
69
|
rightPanel: css`
|
|
68
|
-
background: ${colors.darkGray[800]};
|
|
70
|
+
background: ${t(colors.gray[100], colors.darkGray[800])};
|
|
69
71
|
border-radius: ${border.radius.lg};
|
|
70
|
-
border: 1px solid ${colors.darkGray[700]};
|
|
72
|
+
border: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
|
|
71
73
|
display: flex;
|
|
72
74
|
flex-direction: column;
|
|
73
75
|
overflow: hidden;
|
|
@@ -77,10 +79,10 @@ const stylesFactory = () => {
|
|
|
77
79
|
panelHeader: css`
|
|
78
80
|
font-size: ${fontSize.md};
|
|
79
81
|
font-weight: ${font.weight.bold};
|
|
80
|
-
color: ${colors.blue[400]};
|
|
82
|
+
color: ${t(colors.blue[700], colors.blue[400])};
|
|
81
83
|
padding: ${size[2]};
|
|
82
|
-
border-bottom: 1px solid ${colors.darkGray[700]};
|
|
83
|
-
background: ${colors.darkGray[800]};
|
|
84
|
+
border-bottom: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
|
|
85
|
+
background: ${t(colors.gray[100], colors.darkGray[800])};
|
|
84
86
|
flex-shrink: 0;
|
|
85
87
|
`,
|
|
86
88
|
utilList: css`
|
|
@@ -95,12 +97,12 @@ const stylesFactory = () => {
|
|
|
95
97
|
utilGroupHeader: css`
|
|
96
98
|
font-size: ${fontSize.xs};
|
|
97
99
|
font-weight: ${font.weight.semibold};
|
|
98
|
-
color: ${colors.gray[400]};
|
|
100
|
+
color: ${t(colors.gray[600], colors.gray[400])};
|
|
99
101
|
text-transform: uppercase;
|
|
100
102
|
letter-spacing: 0.05em;
|
|
101
103
|
margin-bottom: ${size[1]};
|
|
102
104
|
padding: ${size[1]} ${size[2]};
|
|
103
|
-
background: ${colors.darkGray[700]};
|
|
105
|
+
background: ${t(colors.gray[200], colors.darkGray[700])};
|
|
104
106
|
border-radius: ${border.radius.md};
|
|
105
107
|
`,
|
|
106
108
|
utilRow: css`
|
|
@@ -109,26 +111,27 @@ const stylesFactory = () => {
|
|
|
109
111
|
align-items: center;
|
|
110
112
|
padding: ${size[2]};
|
|
111
113
|
margin-bottom: ${size[1]};
|
|
112
|
-
background: ${colors.darkGray[700]};
|
|
114
|
+
background: ${t(colors.gray[200], colors.darkGray[700])};
|
|
113
115
|
border-radius: ${border.radius.md};
|
|
114
116
|
cursor: pointer;
|
|
115
117
|
transition: all 0.2s ease;
|
|
116
118
|
border: 1px solid transparent;
|
|
117
119
|
|
|
118
120
|
&:hover {
|
|
119
|
-
background: ${colors.darkGray[600]};
|
|
120
|
-
border-color: ${colors.darkGray[500]};
|
|
121
|
+
background: ${t(colors.gray[300], colors.darkGray[600])};
|
|
122
|
+
border-color: ${t(colors.gray[400], colors.darkGray[500])};
|
|
121
123
|
}
|
|
122
124
|
`,
|
|
123
125
|
utilRowSelected: css`
|
|
124
|
-
background: ${colors.blue[900] + alpha[20]};
|
|
125
|
-
border-color: ${colors.blue[500]};
|
|
126
|
-
box-shadow: 0 0 0 1px
|
|
126
|
+
background: ${t(colors.blue[100], colors.blue[900] + alpha[20])};
|
|
127
|
+
border-color: ${t(colors.blue[600], colors.blue[500])};
|
|
128
|
+
box-shadow: 0 0 0 1px
|
|
129
|
+
${t(colors.blue[600] + alpha[30], colors.blue[500] + alpha[30])};
|
|
127
130
|
`,
|
|
128
131
|
utilKey: css`
|
|
129
132
|
font-family: ${fontFamily.mono};
|
|
130
133
|
font-size: ${fontSize.xs};
|
|
131
|
-
color: ${colors.gray[100]};
|
|
134
|
+
color: ${t(colors.gray[900], colors.gray[100])};
|
|
132
135
|
flex: 1;
|
|
133
136
|
overflow: hidden;
|
|
134
137
|
text-overflow: ellipsis;
|
|
@@ -136,11 +139,11 @@ const stylesFactory = () => {
|
|
|
136
139
|
`,
|
|
137
140
|
utilStatus: css`
|
|
138
141
|
font-size: ${fontSize.xs};
|
|
139
|
-
color: ${colors.gray[400]};
|
|
142
|
+
color: ${t(colors.gray[600], colors.gray[400])};
|
|
140
143
|
text-transform: uppercase;
|
|
141
144
|
letter-spacing: 0.05em;
|
|
142
145
|
padding: ${size[1]} ${size[1]};
|
|
143
|
-
background: ${colors.darkGray[600]};
|
|
146
|
+
background: ${t(colors.gray[300], colors.darkGray[600])};
|
|
144
147
|
border-radius: ${border.radius.sm};
|
|
145
148
|
margin-left: ${size[1]};
|
|
146
149
|
`,
|
|
@@ -153,25 +156,25 @@ const stylesFactory = () => {
|
|
|
153
156
|
stateHeader: css`
|
|
154
157
|
margin-bottom: ${size[2]};
|
|
155
158
|
padding-bottom: ${size[2]};
|
|
156
|
-
border-bottom: 1px solid ${colors.darkGray[700]};
|
|
159
|
+
border-bottom: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
|
|
157
160
|
`,
|
|
158
161
|
stateTitle: css`
|
|
159
162
|
font-size: ${fontSize.md};
|
|
160
163
|
font-weight: ${font.weight.bold};
|
|
161
|
-
color: ${colors.blue[400]};
|
|
164
|
+
color: ${t(colors.blue[700], colors.blue[400])};
|
|
162
165
|
margin-bottom: ${size[1]};
|
|
163
166
|
`,
|
|
164
167
|
stateKey: css`
|
|
165
168
|
font-family: ${fontFamily.mono};
|
|
166
169
|
font-size: ${fontSize.xs};
|
|
167
|
-
color: ${colors.gray[400]};
|
|
170
|
+
color: ${t(colors.gray[600], colors.gray[400])};
|
|
168
171
|
word-break: break-all;
|
|
169
172
|
`,
|
|
170
173
|
stateContent: css`
|
|
171
|
-
background: ${colors.darkGray[700]};
|
|
174
|
+
background: ${t(colors.gray[100], colors.darkGray[700])};
|
|
172
175
|
border-radius: ${border.radius.md};
|
|
173
176
|
padding: ${size[2]};
|
|
174
|
-
border: 1px solid ${colors.darkGray[600]};
|
|
177
|
+
border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};
|
|
175
178
|
`,
|
|
176
179
|
detailsGrid: css`
|
|
177
180
|
display: grid;
|
|
@@ -180,15 +183,15 @@ const stylesFactory = () => {
|
|
|
180
183
|
align-items: start;
|
|
181
184
|
`,
|
|
182
185
|
detailSection: css`
|
|
183
|
-
background: ${colors.darkGray[700]};
|
|
184
|
-
border: 1px solid ${colors.darkGray[600]};
|
|
186
|
+
background: ${t(colors.white, colors.darkGray[700])};
|
|
187
|
+
border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};
|
|
185
188
|
border-radius: ${border.radius.md};
|
|
186
189
|
padding: ${size[2]};
|
|
187
190
|
`,
|
|
188
191
|
detailSectionHeader: css`
|
|
189
192
|
font-size: ${fontSize.sm};
|
|
190
193
|
font-weight: ${font.weight.bold};
|
|
191
|
-
color: ${colors.gray[200]};
|
|
194
|
+
color: ${t(colors.gray[800], colors.gray[200])};
|
|
192
195
|
margin-bottom: ${size[1]};
|
|
193
196
|
text-transform: uppercase;
|
|
194
197
|
letter-spacing: 0.04em;
|
|
@@ -204,9 +207,9 @@ const stylesFactory = () => {
|
|
|
204
207
|
gap: ${size[1]};
|
|
205
208
|
padding: ${size[1]} ${size[2]};
|
|
206
209
|
border-radius: ${border.radius.md};
|
|
207
|
-
border: 1px solid ${colors.darkGray[500]};
|
|
208
|
-
background: ${colors.darkGray[600]};
|
|
209
|
-
color: ${colors.gray[100]};
|
|
210
|
+
border: 1px solid ${t(colors.gray[300], colors.darkGray[500])};
|
|
211
|
+
background: ${t(colors.gray[200], colors.darkGray[600])};
|
|
212
|
+
color: ${t(colors.gray[900], colors.gray[100])};
|
|
210
213
|
font-size: ${fontSize.xs};
|
|
211
214
|
cursor: pointer;
|
|
212
215
|
user-select: none;
|
|
@@ -214,15 +217,15 @@ const stylesFactory = () => {
|
|
|
214
217
|
background 0.15s,
|
|
215
218
|
border-color 0.15s;
|
|
216
219
|
&:hover {
|
|
217
|
-
background: ${colors.darkGray[500]};
|
|
218
|
-
border-color: ${colors.darkGray[400]};
|
|
220
|
+
background: ${t(colors.gray[300], colors.darkGray[500])};
|
|
221
|
+
border-color: ${t(colors.gray[400], colors.darkGray[400])};
|
|
219
222
|
}
|
|
220
223
|
&:disabled {
|
|
221
224
|
opacity: 0.5;
|
|
222
225
|
cursor: not-allowed;
|
|
223
226
|
&:hover {
|
|
224
|
-
background: ${colors.darkGray[600]};
|
|
225
|
-
border-color: ${colors.darkGray[500]};
|
|
227
|
+
background: ${t(colors.gray[200], colors.darkGray[600])};
|
|
228
|
+
border-color: ${t(colors.gray[300], colors.darkGray[500])};
|
|
226
229
|
}
|
|
227
230
|
}
|
|
228
231
|
`,
|
|
@@ -270,7 +273,7 @@ const stylesFactory = () => {
|
|
|
270
273
|
align-items: center;
|
|
271
274
|
`,
|
|
272
275
|
infoLabel: css`
|
|
273
|
-
color: ${colors.gray[400]};
|
|
276
|
+
color: ${t(colors.gray[600], colors.gray[400])};
|
|
274
277
|
font-size: ${fontSize.xs};
|
|
275
278
|
text-transform: uppercase;
|
|
276
279
|
letter-spacing: 0.05em;
|
|
@@ -278,7 +281,7 @@ const stylesFactory = () => {
|
|
|
278
281
|
infoValueMono: css`
|
|
279
282
|
font-family: ${fontFamily.mono};
|
|
280
283
|
font-size: ${fontSize.xs};
|
|
281
|
-
color: ${colors.gray[100]};
|
|
284
|
+
color: ${t(colors.gray[900], colors.gray[100])};
|
|
282
285
|
word-break: break-all;
|
|
283
286
|
`,
|
|
284
287
|
noSelection: css`
|
|
@@ -286,7 +289,7 @@ const stylesFactory = () => {
|
|
|
286
289
|
display: flex;
|
|
287
290
|
align-items: center;
|
|
288
291
|
justify-content: center;
|
|
289
|
-
color: ${colors.gray[500]};
|
|
292
|
+
color: ${t(colors.gray[500], colors.gray[500])};
|
|
290
293
|
font-style: italic;
|
|
291
294
|
text-align: center;
|
|
292
295
|
padding: ${size[4]};
|
|
@@ -298,12 +301,14 @@ const stylesFactory = () => {
|
|
|
298
301
|
gap: ${size[4]};
|
|
299
302
|
`,
|
|
300
303
|
section: css`
|
|
301
|
-
background: ${colors.darkGray[800]};
|
|
304
|
+
background: ${t(colors.gray[100], colors.darkGray[800])};
|
|
302
305
|
border-radius: ${border.radius.lg};
|
|
303
|
-
box-shadow: ${tokens.shadow.md(
|
|
306
|
+
box-shadow: ${tokens.shadow.md(
|
|
307
|
+
t(colors.gray[400] + alpha[80], colors.black + alpha[80])
|
|
308
|
+
)};
|
|
304
309
|
padding: ${size[4]};
|
|
305
310
|
margin-bottom: ${size[4]};
|
|
306
|
-
border: 1px solid ${colors.darkGray[700]};
|
|
311
|
+
border: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
|
|
307
312
|
min-width: 0;
|
|
308
313
|
max-width: 33%;
|
|
309
314
|
max-height: fit-content;
|
|
@@ -312,14 +317,14 @@ const stylesFactory = () => {
|
|
|
312
317
|
font-size: ${fontSize.lg};
|
|
313
318
|
font-weight: ${font.weight.bold};
|
|
314
319
|
margin-bottom: ${size[2]};
|
|
315
|
-
color: ${colors.blue[400]};
|
|
320
|
+
color: ${t(colors.blue[600], colors.blue[400])};
|
|
316
321
|
letter-spacing: 0.01em;
|
|
317
322
|
display: flex;
|
|
318
323
|
align-items: center;
|
|
319
324
|
gap: ${size[2]};
|
|
320
325
|
`,
|
|
321
326
|
sectionEmpty: css`
|
|
322
|
-
color: ${colors.gray[500]};
|
|
327
|
+
color: ${t(colors.gray[500], colors.gray[500])};
|
|
323
328
|
font-size: ${fontSize.sm};
|
|
324
329
|
font-style: italic;
|
|
325
330
|
margin: ${size[2]} 0;
|
|
@@ -328,14 +333,16 @@ const stylesFactory = () => {
|
|
|
328
333
|
display: flex;
|
|
329
334
|
flex-direction: column;
|
|
330
335
|
gap: ${size[2]};
|
|
336
|
+
background: ${t(colors.gray[200], colors.darkGray[700])};
|
|
337
|
+
border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};
|
|
331
338
|
`,
|
|
332
339
|
instanceCard: css`
|
|
333
|
-
background: ${colors.darkGray[700]};
|
|
340
|
+
background: ${t(colors.gray[200], colors.darkGray[700])};
|
|
334
341
|
border-radius: ${border.radius.md};
|
|
335
342
|
padding: ${size[3]};
|
|
336
|
-
border: 1px solid ${colors.darkGray[600]};
|
|
343
|
+
border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};
|
|
337
344
|
font-size: ${fontSize.sm};
|
|
338
|
-
color: ${colors.gray[100]};
|
|
345
|
+
color: ${t(colors.gray[900], colors.gray[100])};
|
|
339
346
|
font-family: ${fontFamily.mono};
|
|
340
347
|
overflow-x: auto;
|
|
341
348
|
transition:
|
|
@@ -345,8 +352,12 @@ const stylesFactory = () => {
|
|
|
345
352
|
};
|
|
346
353
|
};
|
|
347
354
|
function useStyles() {
|
|
348
|
-
const
|
|
349
|
-
|
|
355
|
+
const { theme } = useTheme();
|
|
356
|
+
const [styles, setStyles] = createSignal(stylesFactory(theme()));
|
|
357
|
+
createEffect(() => {
|
|
358
|
+
setStyles(stylesFactory(theme()));
|
|
359
|
+
});
|
|
360
|
+
return styles;
|
|
350
361
|
}
|
|
351
362
|
export {
|
|
352
363
|
useStyles
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-styles.js","sources":["../../../src/styles/use-styles.ts"],"sourcesContent":["import * as goober from 'goober'\nimport { createSignal } from 'solid-js'\nimport { tokens } from './tokens'\n\nconst stylesFactory = () => {\n const { colors, font, size, alpha, border } = tokens\n const { fontFamily, size: fontSize } = font\n const css = goober.css\n\n return {\n mainContainer: css`\n display: flex;\n flex: 1;\n min-height: 0;\n overflow: hidden;\n padding: ${size[2]};\n padding-top: 0;\n margin-top: ${size[2]};\n `,\n dragHandle: css`\n width: 8px;\n background: ${colors.darkGray[600]};\n cursor: col-resize;\n position: relative;\n transition: all 0.2s ease;\n user-select: none;\n pointer-events: all;\n margin: 0 ${size[1]};\n border-radius: 2px;\n\n &:hover {\n background: ${colors.blue[500]};\n margin: 0 ${size[1]};\n }\n\n &.dragging {\n background: ${colors.blue[600]};\n margin: 0 ${size[1]};\n }\n\n &::after {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 2px;\n height: 20px;\n background: ${colors.darkGray[400]};\n border-radius: 1px;\n pointer-events: none;\n }\n\n &:hover::after,\n &.dragging::after {\n background: ${colors.blue[300]};\n }\n `,\n leftPanel: css`\n background: ${colors.darkGray[800]};\n border-radius: ${border.radius.lg};\n border: 1px solid ${colors.darkGray[700]};\n display: flex;\n flex-direction: column;\n overflow: hidden;\n min-height: 0;\n flex-shrink: 0;\n `,\n rightPanel: css`\n background: ${colors.darkGray[800]};\n border-radius: ${border.radius.lg};\n border: 1px solid ${colors.darkGray[700]};\n display: flex;\n flex-direction: column;\n overflow: hidden;\n min-height: 0;\n flex: 1;\n `,\n panelHeader: css`\n font-size: ${fontSize.md};\n font-weight: ${font.weight.bold};\n color: ${colors.blue[400]};\n padding: ${size[2]};\n border-bottom: 1px solid ${colors.darkGray[700]};\n background: ${colors.darkGray[800]};\n flex-shrink: 0;\n `,\n utilList: css`\n flex: 1;\n overflow-y: auto;\n padding: ${size[1]};\n min-height: 0;\n `,\n utilGroup: css`\n margin-bottom: ${size[2]};\n `,\n utilGroupHeader: css`\n font-size: ${fontSize.xs};\n font-weight: ${font.weight.semibold};\n color: ${colors.gray[400]};\n text-transform: uppercase;\n letter-spacing: 0.05em;\n margin-bottom: ${size[1]};\n padding: ${size[1]} ${size[2]};\n background: ${colors.darkGray[700]};\n border-radius: ${border.radius.md};\n `,\n utilRow: css`\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: ${size[2]};\n margin-bottom: ${size[1]};\n background: ${colors.darkGray[700]};\n border-radius: ${border.radius.md};\n cursor: pointer;\n transition: all 0.2s ease;\n border: 1px solid transparent;\n\n &:hover {\n background: ${colors.darkGray[600]};\n border-color: ${colors.darkGray[500]};\n }\n `,\n utilRowSelected: css`\n background: ${colors.blue[900] + alpha[20]};\n border-color: ${colors.blue[500]};\n box-shadow: 0 0 0 1px ${colors.blue[500] + alpha[30]};\n `,\n utilKey: css`\n font-family: ${fontFamily.mono};\n font-size: ${fontSize.xs};\n color: ${colors.gray[100]};\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n `,\n utilStatus: css`\n font-size: ${fontSize.xs};\n color: ${colors.gray[400]};\n text-transform: uppercase;\n letter-spacing: 0.05em;\n padding: ${size[1]} ${size[1]};\n background: ${colors.darkGray[600]};\n border-radius: ${border.radius.sm};\n margin-left: ${size[1]};\n `,\n stateDetails: css`\n flex: 1;\n overflow-y: auto;\n padding: ${size[2]};\n min-height: 0;\n `,\n stateHeader: css`\n margin-bottom: ${size[2]};\n padding-bottom: ${size[2]};\n border-bottom: 1px solid ${colors.darkGray[700]};\n `,\n stateTitle: css`\n font-size: ${fontSize.md};\n font-weight: ${font.weight.bold};\n color: ${colors.blue[400]};\n margin-bottom: ${size[1]};\n `,\n stateKey: css`\n font-family: ${fontFamily.mono};\n font-size: ${fontSize.xs};\n color: ${colors.gray[400]};\n word-break: break-all;\n `,\n stateContent: css`\n background: ${colors.darkGray[700]};\n border-radius: ${border.radius.md};\n padding: ${size[2]};\n border: 1px solid ${colors.darkGray[600]};\n `,\n detailsGrid: css`\n display: grid;\n grid-template-columns: 1fr;\n gap: ${size[2]};\n align-items: start;\n `,\n detailSection: css`\n background: ${colors.darkGray[700]};\n border: 1px solid ${colors.darkGray[600]};\n border-radius: ${border.radius.md};\n padding: ${size[2]};\n `,\n detailSectionHeader: css`\n font-size: ${fontSize.sm};\n font-weight: ${font.weight.bold};\n color: ${colors.gray[200]};\n margin-bottom: ${size[1]};\n text-transform: uppercase;\n letter-spacing: 0.04em;\n `,\n actionsRow: css`\n display: flex;\n flex-wrap: wrap;\n gap: ${size[2]};\n `,\n actionButton: css`\n display: inline-flex;\n align-items: center;\n gap: ${size[1]};\n padding: ${size[1]} ${size[2]};\n border-radius: ${border.radius.md};\n border: 1px solid ${colors.darkGray[500]};\n background: ${colors.darkGray[600]};\n color: ${colors.gray[100]};\n font-size: ${fontSize.xs};\n cursor: pointer;\n user-select: none;\n transition:\n background 0.15s,\n border-color 0.15s;\n &:hover {\n background: ${colors.darkGray[500]};\n border-color: ${colors.darkGray[400]};\n }\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n &:hover {\n background: ${colors.darkGray[600]};\n border-color: ${colors.darkGray[500]};\n }\n }\n `,\n actionDotBlue: css`\n width: 6px;\n height: 6px;\n border-radius: 9999px;\n background: ${colors.blue[400]};\n `,\n actionDotGreen: css`\n width: 6px;\n height: 6px;\n border-radius: 9999px;\n background: ${colors.green[400]};\n `,\n actionDotRed: css`\n width: 6px;\n height: 6px;\n border-radius: 9999px;\n background: ${colors.red[400]};\n `,\n actionDotYellow: css`\n width: 6px;\n height: 6px;\n border-radius: 9999px;\n background: ${colors.yellow[400]};\n `,\n actionDotOrange: css`\n width: 6px;\n height: 6px;\n border-radius: 9999px;\n background: ${colors.pink[400]};\n `,\n actionDotPurple: css`\n width: 6px;\n height: 6px;\n border-radius: 9999px;\n background: ${colors.purple[400]};\n `,\n infoGrid: css`\n display: grid;\n grid-template-columns: auto 1fr;\n gap: ${size[1]};\n row-gap: ${size[1]};\n align-items: center;\n `,\n infoLabel: css`\n color: ${colors.gray[400]};\n font-size: ${fontSize.xs};\n text-transform: uppercase;\n letter-spacing: 0.05em;\n `,\n infoValueMono: css`\n font-family: ${fontFamily.mono};\n font-size: ${fontSize.xs};\n color: ${colors.gray[100]};\n word-break: break-all;\n `,\n noSelection: css`\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ${colors.gray[500]};\n font-style: italic;\n text-align: center;\n padding: ${size[4]};\n `,\n // Keep existing styles for backward compatibility\n sectionContainer: css`\n display: flex;\n flex-wrap: wrap;\n gap: ${size[4]};\n `,\n section: css`\n background: ${colors.darkGray[800]};\n border-radius: ${border.radius.lg};\n box-shadow: ${tokens.shadow.md(colors.black + alpha[80])};\n padding: ${size[4]};\n margin-bottom: ${size[4]};\n border: 1px solid ${colors.darkGray[700]};\n min-width: 0;\n max-width: 33%;\n max-height: fit-content;\n `,\n sectionHeader: css`\n font-size: ${fontSize.lg};\n font-weight: ${font.weight.bold};\n margin-bottom: ${size[2]};\n color: ${colors.blue[400]};\n letter-spacing: 0.01em;\n display: flex;\n align-items: center;\n gap: ${size[2]};\n `,\n sectionEmpty: css`\n color: ${colors.gray[500]};\n font-size: ${fontSize.sm};\n font-style: italic;\n margin: ${size[2]} 0;\n `,\n instanceList: css`\n display: flex;\n flex-direction: column;\n gap: ${size[2]};\n `,\n instanceCard: css`\n background: ${colors.darkGray[700]};\n border-radius: ${border.radius.md};\n padding: ${size[3]};\n border: 1px solid ${colors.darkGray[600]};\n font-size: ${fontSize.sm};\n color: ${colors.gray[100]};\n font-family: ${fontFamily.mono};\n overflow-x: auto;\n transition:\n box-shadow 0.3s,\n background 0.3s;\n `,\n }\n}\n\nexport function useStyles() {\n const [_styles] = createSignal(stylesFactory())\n return _styles\n}\n"],"names":[],"mappings":";;;AAIA,MAAM,gBAAgB,MAAM;AAC1B,QAAM,EAAE,QAAQ,MAAM,MAAM,OAAO,WAAW;AAC9C,QAAM,EAAE,YAAY,MAAM,SAAA,IAAa;AACvC,QAAM,MAAM,OAAO;AAEnB,SAAO;AAAA,IACL,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA,iBAKF,KAAK,CAAC,CAAC;AAAA;AAAA,oBAEJ,KAAK,CAAC,CAAC;AAAA;AAAA,IAEvB,YAAY;AAAA;AAAA,oBAEI,OAAO,SAAS,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAMtB,KAAK,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA,sBAIH,OAAO,KAAK,GAAG,CAAC;AAAA,oBAClB,KAAK,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA,sBAIL,OAAO,KAAK,GAAG,CAAC;AAAA,oBAClB,KAAK,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAWL,OAAO,SAAS,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAOpB,OAAO,KAAK,GAAG,CAAC;AAAA;AAAA;AAAA,IAGlC,WAAW;AAAA,oBACK,OAAO,SAAS,GAAG,CAAC;AAAA,uBACjB,OAAO,OAAO,EAAE;AAAA,0BACb,OAAO,SAAS,GAAG,CAAC;AAAA;AAAA;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AAA;AAAA,IAEhB,cAAc;AAAA,oBACE,OAAO,SAAS,GAAG,CAAC;AAAA,uBACjB,OAAO,OAAO,EAAE;AAAA,iBACtB,KAAK,CAAC,CAAC;AAAA,0BACE,OAAO,SAAS,GAAG,CAAC;AAAA,mBAC3B,SAAS,EAAE;AAAA,eACf,OAAO,KAAK,GAAG,CAAC;AAAA,qBACV,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAOpC;AAEO,SAAS,YAAY;AAC1B,QAAM,CAAC,OAAO,IAAI,aAAa,eAAe;AAC9C,SAAO;AACT;"}
|
|
1
|
+
{"version":3,"file":"use-styles.js","sources":["../../../src/styles/use-styles.ts"],"sourcesContent":["import * as goober from 'goober'\nimport { createEffect, createSignal } from 'solid-js'\nimport { useTheme } from '@tanstack/devtools-ui'\nimport { tokens } from './tokens'\n\nconst stylesFactory = (theme: 'light' | 'dark') => {\n const { colors, font, size, alpha, border } = tokens\n const { fontFamily, size: fontSize } = font\n const css = goober.css\n const t = (light: string, dark: string) => (theme === 'light' ? light : dark)\n\n return {\n mainContainer: css`\n display: flex;\n flex: 1;\n min-height: 0;\n overflow: hidden;\n padding: ${size[2]};\n padding-top: 0;\n margin-top: ${size[2]};\n `,\n dragHandle: css`\n width: 8px;\n background: ${t(colors.gray[300], colors.darkGray[600])};\n cursor: col-resize;\n position: relative;\n transition: all 0.2s ease;\n user-select: none;\n pointer-events: all;\n margin: 0 ${size[1]};\n border-radius: 2px;\n\n &:hover {\n background: ${t(colors.blue[600], colors.blue[500])};\n margin: 0 ${size[1]};\n }\n\n &.dragging {\n background: ${t(colors.blue[700], colors.blue[600])};\n margin: 0 ${size[1]};\n }\n\n &::after {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 2px;\n height: 20px;\n background: ${t(colors.gray[400], colors.darkGray[400])};\n border-radius: 1px;\n pointer-events: none;\n }\n\n &:hover::after,\n &.dragging::after {\n background: ${t(colors.blue[500], colors.blue[300])};\n }\n `,\n leftPanel: css`\n background: ${t(colors.gray[100], colors.darkGray[800])};\n border-radius: ${border.radius.lg};\n border: 1px solid ${t(colors.gray[200], colors.darkGray[700])};\n display: flex;\n flex-direction: column;\n overflow: hidden;\n min-height: 0;\n flex-shrink: 0;\n `,\n rightPanel: css`\n background: ${t(colors.gray[100], colors.darkGray[800])};\n border-radius: ${border.radius.lg};\n border: 1px solid ${t(colors.gray[200], colors.darkGray[700])};\n display: flex;\n flex-direction: column;\n overflow: hidden;\n min-height: 0;\n flex: 1;\n `,\n panelHeader: css`\n font-size: ${fontSize.md};\n font-weight: ${font.weight.bold};\n color: ${t(colors.blue[700], colors.blue[400])};\n padding: ${size[2]};\n border-bottom: 1px solid ${t(colors.gray[200], colors.darkGray[700])};\n background: ${t(colors.gray[100], colors.darkGray[800])};\n flex-shrink: 0;\n `,\n utilList: css`\n flex: 1;\n overflow-y: auto;\n padding: ${size[1]};\n min-height: 0;\n `,\n utilGroup: css`\n margin-bottom: ${size[2]};\n `,\n utilGroupHeader: css`\n font-size: ${fontSize.xs};\n font-weight: ${font.weight.semibold};\n color: ${t(colors.gray[600], colors.gray[400])};\n text-transform: uppercase;\n letter-spacing: 0.05em;\n margin-bottom: ${size[1]};\n padding: ${size[1]} ${size[2]};\n background: ${t(colors.gray[200], colors.darkGray[700])};\n border-radius: ${border.radius.md};\n `,\n utilRow: css`\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: ${size[2]};\n margin-bottom: ${size[1]};\n background: ${t(colors.gray[200], colors.darkGray[700])};\n border-radius: ${border.radius.md};\n cursor: pointer;\n transition: all 0.2s ease;\n border: 1px solid transparent;\n\n &:hover {\n background: ${t(colors.gray[300], colors.darkGray[600])};\n border-color: ${t(colors.gray[400], colors.darkGray[500])};\n }\n `,\n utilRowSelected: css`\n background: ${t(colors.blue[100], colors.blue[900] + alpha[20])};\n border-color: ${t(colors.blue[600], colors.blue[500])};\n box-shadow: 0 0 0 1px\n ${t(colors.blue[600] + alpha[30], colors.blue[500] + alpha[30])};\n `,\n utilKey: css`\n font-family: ${fontFamily.mono};\n font-size: ${fontSize.xs};\n color: ${t(colors.gray[900], colors.gray[100])};\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n `,\n utilStatus: css`\n font-size: ${fontSize.xs};\n color: ${t(colors.gray[600], colors.gray[400])};\n text-transform: uppercase;\n letter-spacing: 0.05em;\n padding: ${size[1]} ${size[1]};\n background: ${t(colors.gray[300], colors.darkGray[600])};\n border-radius: ${border.radius.sm};\n margin-left: ${size[1]};\n `,\n stateDetails: css`\n flex: 1;\n overflow-y: auto;\n padding: ${size[2]};\n min-height: 0;\n `,\n stateHeader: css`\n margin-bottom: ${size[2]};\n padding-bottom: ${size[2]};\n border-bottom: 1px solid ${t(colors.gray[200], colors.darkGray[700])};\n `,\n stateTitle: css`\n font-size: ${fontSize.md};\n font-weight: ${font.weight.bold};\n color: ${t(colors.blue[700], colors.blue[400])};\n margin-bottom: ${size[1]};\n `,\n stateKey: css`\n font-family: ${fontFamily.mono};\n font-size: ${fontSize.xs};\n color: ${t(colors.gray[600], colors.gray[400])};\n word-break: break-all;\n `,\n stateContent: css`\n background: ${t(colors.gray[100], colors.darkGray[700])};\n border-radius: ${border.radius.md};\n padding: ${size[2]};\n border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};\n `,\n detailsGrid: css`\n display: grid;\n grid-template-columns: 1fr;\n gap: ${size[2]};\n align-items: start;\n `,\n detailSection: css`\n background: ${t(colors.white, colors.darkGray[700])};\n border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};\n border-radius: ${border.radius.md};\n padding: ${size[2]};\n `,\n detailSectionHeader: css`\n font-size: ${fontSize.sm};\n font-weight: ${font.weight.bold};\n color: ${t(colors.gray[800], colors.gray[200])};\n margin-bottom: ${size[1]};\n text-transform: uppercase;\n letter-spacing: 0.04em;\n `,\n actionsRow: css`\n display: flex;\n flex-wrap: wrap;\n gap: ${size[2]};\n `,\n actionButton: css`\n display: inline-flex;\n align-items: center;\n gap: ${size[1]};\n padding: ${size[1]} ${size[2]};\n border-radius: ${border.radius.md};\n border: 1px solid ${t(colors.gray[300], colors.darkGray[500])};\n background: ${t(colors.gray[200], colors.darkGray[600])};\n color: ${t(colors.gray[900], colors.gray[100])};\n font-size: ${fontSize.xs};\n cursor: pointer;\n user-select: none;\n transition:\n background 0.15s,\n border-color 0.15s;\n &:hover {\n background: ${t(colors.gray[300], colors.darkGray[500])};\n border-color: ${t(colors.gray[400], colors.darkGray[400])};\n }\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n &:hover {\n background: ${t(colors.gray[200], colors.darkGray[600])};\n border-color: ${t(colors.gray[300], colors.darkGray[500])};\n }\n }\n `,\n actionDotBlue: css`\n width: 6px;\n height: 6px;\n border-radius: 9999px;\n background: ${colors.blue[400]};\n `,\n actionDotGreen: css`\n width: 6px;\n height: 6px;\n border-radius: 9999px;\n background: ${colors.green[400]};\n `,\n actionDotRed: css`\n width: 6px;\n height: 6px;\n border-radius: 9999px;\n background: ${colors.red[400]};\n `,\n actionDotYellow: css`\n width: 6px;\n height: 6px;\n border-radius: 9999px;\n background: ${colors.yellow[400]};\n `,\n actionDotOrange: css`\n width: 6px;\n height: 6px;\n border-radius: 9999px;\n background: ${colors.pink[400]};\n `,\n actionDotPurple: css`\n width: 6px;\n height: 6px;\n border-radius: 9999px;\n background: ${colors.purple[400]};\n `,\n infoGrid: css`\n display: grid;\n grid-template-columns: auto 1fr;\n gap: ${size[1]};\n row-gap: ${size[1]};\n align-items: center;\n `,\n infoLabel: css`\n color: ${t(colors.gray[600], colors.gray[400])};\n font-size: ${fontSize.xs};\n text-transform: uppercase;\n letter-spacing: 0.05em;\n `,\n infoValueMono: css`\n font-family: ${fontFamily.mono};\n font-size: ${fontSize.xs};\n color: ${t(colors.gray[900], colors.gray[100])};\n word-break: break-all;\n `,\n noSelection: css`\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ${t(colors.gray[500], colors.gray[500])};\n font-style: italic;\n text-align: center;\n padding: ${size[4]};\n `,\n // Keep existing styles for backward compatibility\n sectionContainer: css`\n display: flex;\n flex-wrap: wrap;\n gap: ${size[4]};\n `,\n section: css`\n background: ${t(colors.gray[100], colors.darkGray[800])};\n border-radius: ${border.radius.lg};\n box-shadow: ${tokens.shadow.md(\n t(colors.gray[400] + alpha[80], colors.black + alpha[80]),\n )};\n padding: ${size[4]};\n margin-bottom: ${size[4]};\n border: 1px solid ${t(colors.gray[200], colors.darkGray[700])};\n min-width: 0;\n max-width: 33%;\n max-height: fit-content;\n `,\n sectionHeader: css`\n font-size: ${fontSize.lg};\n font-weight: ${font.weight.bold};\n margin-bottom: ${size[2]};\n color: ${t(colors.blue[600], colors.blue[400])};\n letter-spacing: 0.01em;\n display: flex;\n align-items: center;\n gap: ${size[2]};\n `,\n sectionEmpty: css`\n color: ${t(colors.gray[500], colors.gray[500])};\n font-size: ${fontSize.sm};\n font-style: italic;\n margin: ${size[2]} 0;\n `,\n instanceList: css`\n display: flex;\n flex-direction: column;\n gap: ${size[2]};\n background: ${t(colors.gray[200], colors.darkGray[700])};\n border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};\n `,\n instanceCard: css`\n background: ${t(colors.gray[200], colors.darkGray[700])};\n border-radius: ${border.radius.md};\n padding: ${size[3]};\n border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};\n font-size: ${fontSize.sm};\n color: ${t(colors.gray[900], colors.gray[100])};\n font-family: ${fontFamily.mono};\n overflow-x: auto;\n transition:\n box-shadow 0.3s,\n background 0.3s;\n `,\n }\n}\n\nexport function useStyles() {\n const { theme } = useTheme()\n const [styles, setStyles] = createSignal(stylesFactory(theme()))\n createEffect(() => {\n setStyles(stylesFactory(theme()))\n })\n return styles\n}\n"],"names":[],"mappings":";;;;AAKA,MAAM,gBAAgB,CAAC,UAA4B;AACjD,QAAM,EAAE,QAAQ,MAAM,MAAM,OAAO,WAAW;AAC9C,QAAM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AAE;AAAA;AAAA,gBAEd,KAAK,CAAC,CAAC;AAAA;AAAA,IAEnB,cAAc;AAAA;AAAA;AAAA,aAGL,KAAK,CAAC,CAAC;AAAA,oBACA,EAAE,OAAO,KAAK,GAAG,GAAG,OAAO,SAAS,GAAG,CAAC,CAAC;AAAA,0BACnC,EAAE,OAAO,KAAK,GAAG,GAAG,OAAO,SAAS,GAAG,CAAC,CAAC;AAAA;AAAA,IAE/D,cAAc;AAAA,oBACE,EAAE,OAAO,KAAK,GAAG,GAAG,OAAO,SAAS,GAAG,CAAC,CAAC;AAAA,uBACtC,OAAO,OAAO,EAAE;AAAA,iBACtB,KAAK,CAAC,CAAC;AAAA,0BACE,EAAE,OAAO,KAAK,GAAG,GAAG,OAAO,SAAS,GAAG,CAAC,CAAC;AAAA,mBAChD,SAAS,EAAE;AAAA,eACf,EAAE,OAAO,KAAK,GAAG,GAAG,OAAO,KAAK,GAAG,CAAC,CAAC;AAAA,qBAC/B,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAOpC;AAEO,SAAS,YAAY;AAC1B,QAAM,EAAE,MAAA,IAAU,SAAA;AAClB,QAAM,CAAC,QAAQ,SAAS,IAAI,aAAa,cAAc,MAAA,CAAO,CAAC;AAC/D,eAAa,MAAM;AACjB,cAAU,cAAc,MAAA,CAAO,CAAC;AAAA,EAAA,CACjC;AACD,SAAO;AACT;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/pacer-devtools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Devtools for Pacer.",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@tanstack/pacer": ">=0.15.0"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@tanstack/devtools-ui": "^0.3.
|
|
55
|
+
"@tanstack/devtools-ui": "^0.3.4",
|
|
56
56
|
"@tanstack/solid-store": "^0.7.3",
|
|
57
57
|
"clsx": "^2.1.1",
|
|
58
58
|
"dayjs": "^1.11.13",
|
package/src/core.tsx
CHANGED
|
@@ -7,10 +7,11 @@ export class PacerDevtoolsCore {
|
|
|
7
7
|
#isMounted = false
|
|
8
8
|
#dispose?: () => void
|
|
9
9
|
#Component: any
|
|
10
|
+
#ThemeProvider: any
|
|
10
11
|
|
|
11
12
|
constructor(_init?: PacerDevtoolsInit | undefined) {}
|
|
12
13
|
|
|
13
|
-
mount<T extends HTMLElement>(el: T) {
|
|
14
|
+
mount<T extends HTMLElement>(el: T, theme: 'light' | 'dark') {
|
|
14
15
|
if (this.#isMounted) {
|
|
15
16
|
throw new Error('Devtools is already mounted')
|
|
16
17
|
}
|
|
@@ -18,11 +19,19 @@ export class PacerDevtoolsCore {
|
|
|
18
19
|
const dispose = render(() => {
|
|
19
20
|
this.#Component = lazy(() => import('./PacerDevtools'))
|
|
20
21
|
const Devtools = this.#Component
|
|
22
|
+
this.#ThemeProvider = lazy(() =>
|
|
23
|
+
import('@tanstack/devtools-ui').then((mod) => ({
|
|
24
|
+
default: mod.ThemeContextProvider,
|
|
25
|
+
})),
|
|
26
|
+
)
|
|
27
|
+
const ThemeProvider = this.#ThemeProvider
|
|
21
28
|
|
|
22
29
|
return (
|
|
23
30
|
<Portal mount={mountTo}>
|
|
24
31
|
<div style={{ height: '100%' }}>
|
|
25
|
-
<
|
|
32
|
+
<ThemeProvider theme={theme}>
|
|
33
|
+
<Devtools />
|
|
34
|
+
</ThemeProvider>
|
|
26
35
|
</div>
|
|
27
36
|
</Portal>
|
|
28
37
|
)
|
package/src/styles/use-styles.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as goober from 'goober'
|
|
2
|
-
import { createSignal } from 'solid-js'
|
|
2
|
+
import { createEffect, createSignal } from 'solid-js'
|
|
3
|
+
import { useTheme } from '@tanstack/devtools-ui'
|
|
3
4
|
import { tokens } from './tokens'
|
|
4
5
|
|
|
5
|
-
const stylesFactory = () => {
|
|
6
|
+
const stylesFactory = (theme: 'light' | 'dark') => {
|
|
6
7
|
const { colors, font, size, alpha, border } = tokens
|
|
7
8
|
const { fontFamily, size: fontSize } = font
|
|
8
9
|
const css = goober.css
|
|
10
|
+
const t = (light: string, dark: string) => (theme === 'light' ? light : dark)
|
|
9
11
|
|
|
10
12
|
return {
|
|
11
13
|
mainContainer: css`
|
|
@@ -19,7 +21,7 @@ const stylesFactory = () => {
|
|
|
19
21
|
`,
|
|
20
22
|
dragHandle: css`
|
|
21
23
|
width: 8px;
|
|
22
|
-
background: ${colors.darkGray[600]};
|
|
24
|
+
background: ${t(colors.gray[300], colors.darkGray[600])};
|
|
23
25
|
cursor: col-resize;
|
|
24
26
|
position: relative;
|
|
25
27
|
transition: all 0.2s ease;
|
|
@@ -29,12 +31,12 @@ const stylesFactory = () => {
|
|
|
29
31
|
border-radius: 2px;
|
|
30
32
|
|
|
31
33
|
&:hover {
|
|
32
|
-
background: ${colors.blue[500]};
|
|
34
|
+
background: ${t(colors.blue[600], colors.blue[500])};
|
|
33
35
|
margin: 0 ${size[1]};
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
&.dragging {
|
|
37
|
-
background: ${colors.blue[600]};
|
|
39
|
+
background: ${t(colors.blue[700], colors.blue[600])};
|
|
38
40
|
margin: 0 ${size[1]};
|
|
39
41
|
}
|
|
40
42
|
|
|
@@ -46,20 +48,20 @@ const stylesFactory = () => {
|
|
|
46
48
|
transform: translate(-50%, -50%);
|
|
47
49
|
width: 2px;
|
|
48
50
|
height: 20px;
|
|
49
|
-
background: ${colors.darkGray[400]};
|
|
51
|
+
background: ${t(colors.gray[400], colors.darkGray[400])};
|
|
50
52
|
border-radius: 1px;
|
|
51
53
|
pointer-events: none;
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
&:hover::after,
|
|
55
57
|
&.dragging::after {
|
|
56
|
-
background: ${colors.blue[300]};
|
|
58
|
+
background: ${t(colors.blue[500], colors.blue[300])};
|
|
57
59
|
}
|
|
58
60
|
`,
|
|
59
61
|
leftPanel: css`
|
|
60
|
-
background: ${colors.darkGray[800]};
|
|
62
|
+
background: ${t(colors.gray[100], colors.darkGray[800])};
|
|
61
63
|
border-radius: ${border.radius.lg};
|
|
62
|
-
border: 1px solid ${colors.darkGray[700]};
|
|
64
|
+
border: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
|
|
63
65
|
display: flex;
|
|
64
66
|
flex-direction: column;
|
|
65
67
|
overflow: hidden;
|
|
@@ -67,9 +69,9 @@ const stylesFactory = () => {
|
|
|
67
69
|
flex-shrink: 0;
|
|
68
70
|
`,
|
|
69
71
|
rightPanel: css`
|
|
70
|
-
background: ${colors.darkGray[800]};
|
|
72
|
+
background: ${t(colors.gray[100], colors.darkGray[800])};
|
|
71
73
|
border-radius: ${border.radius.lg};
|
|
72
|
-
border: 1px solid ${colors.darkGray[700]};
|
|
74
|
+
border: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
|
|
73
75
|
display: flex;
|
|
74
76
|
flex-direction: column;
|
|
75
77
|
overflow: hidden;
|
|
@@ -79,10 +81,10 @@ const stylesFactory = () => {
|
|
|
79
81
|
panelHeader: css`
|
|
80
82
|
font-size: ${fontSize.md};
|
|
81
83
|
font-weight: ${font.weight.bold};
|
|
82
|
-
color: ${colors.blue[400]};
|
|
84
|
+
color: ${t(colors.blue[700], colors.blue[400])};
|
|
83
85
|
padding: ${size[2]};
|
|
84
|
-
border-bottom: 1px solid ${colors.darkGray[700]};
|
|
85
|
-
background: ${colors.darkGray[800]};
|
|
86
|
+
border-bottom: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
|
|
87
|
+
background: ${t(colors.gray[100], colors.darkGray[800])};
|
|
86
88
|
flex-shrink: 0;
|
|
87
89
|
`,
|
|
88
90
|
utilList: css`
|
|
@@ -97,12 +99,12 @@ const stylesFactory = () => {
|
|
|
97
99
|
utilGroupHeader: css`
|
|
98
100
|
font-size: ${fontSize.xs};
|
|
99
101
|
font-weight: ${font.weight.semibold};
|
|
100
|
-
color: ${colors.gray[400]};
|
|
102
|
+
color: ${t(colors.gray[600], colors.gray[400])};
|
|
101
103
|
text-transform: uppercase;
|
|
102
104
|
letter-spacing: 0.05em;
|
|
103
105
|
margin-bottom: ${size[1]};
|
|
104
106
|
padding: ${size[1]} ${size[2]};
|
|
105
|
-
background: ${colors.darkGray[700]};
|
|
107
|
+
background: ${t(colors.gray[200], colors.darkGray[700])};
|
|
106
108
|
border-radius: ${border.radius.md};
|
|
107
109
|
`,
|
|
108
110
|
utilRow: css`
|
|
@@ -111,26 +113,27 @@ const stylesFactory = () => {
|
|
|
111
113
|
align-items: center;
|
|
112
114
|
padding: ${size[2]};
|
|
113
115
|
margin-bottom: ${size[1]};
|
|
114
|
-
background: ${colors.darkGray[700]};
|
|
116
|
+
background: ${t(colors.gray[200], colors.darkGray[700])};
|
|
115
117
|
border-radius: ${border.radius.md};
|
|
116
118
|
cursor: pointer;
|
|
117
119
|
transition: all 0.2s ease;
|
|
118
120
|
border: 1px solid transparent;
|
|
119
121
|
|
|
120
122
|
&:hover {
|
|
121
|
-
background: ${colors.darkGray[600]};
|
|
122
|
-
border-color: ${colors.darkGray[500]};
|
|
123
|
+
background: ${t(colors.gray[300], colors.darkGray[600])};
|
|
124
|
+
border-color: ${t(colors.gray[400], colors.darkGray[500])};
|
|
123
125
|
}
|
|
124
126
|
`,
|
|
125
127
|
utilRowSelected: css`
|
|
126
|
-
background: ${colors.blue[900] + alpha[20]};
|
|
127
|
-
border-color: ${colors.blue[500]};
|
|
128
|
-
box-shadow: 0 0 0 1px
|
|
128
|
+
background: ${t(colors.blue[100], colors.blue[900] + alpha[20])};
|
|
129
|
+
border-color: ${t(colors.blue[600], colors.blue[500])};
|
|
130
|
+
box-shadow: 0 0 0 1px
|
|
131
|
+
${t(colors.blue[600] + alpha[30], colors.blue[500] + alpha[30])};
|
|
129
132
|
`,
|
|
130
133
|
utilKey: css`
|
|
131
134
|
font-family: ${fontFamily.mono};
|
|
132
135
|
font-size: ${fontSize.xs};
|
|
133
|
-
color: ${colors.gray[100]};
|
|
136
|
+
color: ${t(colors.gray[900], colors.gray[100])};
|
|
134
137
|
flex: 1;
|
|
135
138
|
overflow: hidden;
|
|
136
139
|
text-overflow: ellipsis;
|
|
@@ -138,11 +141,11 @@ const stylesFactory = () => {
|
|
|
138
141
|
`,
|
|
139
142
|
utilStatus: css`
|
|
140
143
|
font-size: ${fontSize.xs};
|
|
141
|
-
color: ${colors.gray[400]};
|
|
144
|
+
color: ${t(colors.gray[600], colors.gray[400])};
|
|
142
145
|
text-transform: uppercase;
|
|
143
146
|
letter-spacing: 0.05em;
|
|
144
147
|
padding: ${size[1]} ${size[1]};
|
|
145
|
-
background: ${colors.darkGray[600]};
|
|
148
|
+
background: ${t(colors.gray[300], colors.darkGray[600])};
|
|
146
149
|
border-radius: ${border.radius.sm};
|
|
147
150
|
margin-left: ${size[1]};
|
|
148
151
|
`,
|
|
@@ -155,25 +158,25 @@ const stylesFactory = () => {
|
|
|
155
158
|
stateHeader: css`
|
|
156
159
|
margin-bottom: ${size[2]};
|
|
157
160
|
padding-bottom: ${size[2]};
|
|
158
|
-
border-bottom: 1px solid ${colors.darkGray[700]};
|
|
161
|
+
border-bottom: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
|
|
159
162
|
`,
|
|
160
163
|
stateTitle: css`
|
|
161
164
|
font-size: ${fontSize.md};
|
|
162
165
|
font-weight: ${font.weight.bold};
|
|
163
|
-
color: ${colors.blue[400]};
|
|
166
|
+
color: ${t(colors.blue[700], colors.blue[400])};
|
|
164
167
|
margin-bottom: ${size[1]};
|
|
165
168
|
`,
|
|
166
169
|
stateKey: css`
|
|
167
170
|
font-family: ${fontFamily.mono};
|
|
168
171
|
font-size: ${fontSize.xs};
|
|
169
|
-
color: ${colors.gray[400]};
|
|
172
|
+
color: ${t(colors.gray[600], colors.gray[400])};
|
|
170
173
|
word-break: break-all;
|
|
171
174
|
`,
|
|
172
175
|
stateContent: css`
|
|
173
|
-
background: ${colors.darkGray[700]};
|
|
176
|
+
background: ${t(colors.gray[100], colors.darkGray[700])};
|
|
174
177
|
border-radius: ${border.radius.md};
|
|
175
178
|
padding: ${size[2]};
|
|
176
|
-
border: 1px solid ${colors.darkGray[600]};
|
|
179
|
+
border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};
|
|
177
180
|
`,
|
|
178
181
|
detailsGrid: css`
|
|
179
182
|
display: grid;
|
|
@@ -182,15 +185,15 @@ const stylesFactory = () => {
|
|
|
182
185
|
align-items: start;
|
|
183
186
|
`,
|
|
184
187
|
detailSection: css`
|
|
185
|
-
background: ${colors.darkGray[700]};
|
|
186
|
-
border: 1px solid ${colors.darkGray[600]};
|
|
188
|
+
background: ${t(colors.white, colors.darkGray[700])};
|
|
189
|
+
border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};
|
|
187
190
|
border-radius: ${border.radius.md};
|
|
188
191
|
padding: ${size[2]};
|
|
189
192
|
`,
|
|
190
193
|
detailSectionHeader: css`
|
|
191
194
|
font-size: ${fontSize.sm};
|
|
192
195
|
font-weight: ${font.weight.bold};
|
|
193
|
-
color: ${colors.gray[200]};
|
|
196
|
+
color: ${t(colors.gray[800], colors.gray[200])};
|
|
194
197
|
margin-bottom: ${size[1]};
|
|
195
198
|
text-transform: uppercase;
|
|
196
199
|
letter-spacing: 0.04em;
|
|
@@ -206,9 +209,9 @@ const stylesFactory = () => {
|
|
|
206
209
|
gap: ${size[1]};
|
|
207
210
|
padding: ${size[1]} ${size[2]};
|
|
208
211
|
border-radius: ${border.radius.md};
|
|
209
|
-
border: 1px solid ${colors.darkGray[500]};
|
|
210
|
-
background: ${colors.darkGray[600]};
|
|
211
|
-
color: ${colors.gray[100]};
|
|
212
|
+
border: 1px solid ${t(colors.gray[300], colors.darkGray[500])};
|
|
213
|
+
background: ${t(colors.gray[200], colors.darkGray[600])};
|
|
214
|
+
color: ${t(colors.gray[900], colors.gray[100])};
|
|
212
215
|
font-size: ${fontSize.xs};
|
|
213
216
|
cursor: pointer;
|
|
214
217
|
user-select: none;
|
|
@@ -216,15 +219,15 @@ const stylesFactory = () => {
|
|
|
216
219
|
background 0.15s,
|
|
217
220
|
border-color 0.15s;
|
|
218
221
|
&:hover {
|
|
219
|
-
background: ${colors.darkGray[500]};
|
|
220
|
-
border-color: ${colors.darkGray[400]};
|
|
222
|
+
background: ${t(colors.gray[300], colors.darkGray[500])};
|
|
223
|
+
border-color: ${t(colors.gray[400], colors.darkGray[400])};
|
|
221
224
|
}
|
|
222
225
|
&:disabled {
|
|
223
226
|
opacity: 0.5;
|
|
224
227
|
cursor: not-allowed;
|
|
225
228
|
&:hover {
|
|
226
|
-
background: ${colors.darkGray[600]};
|
|
227
|
-
border-color: ${colors.darkGray[500]};
|
|
229
|
+
background: ${t(colors.gray[200], colors.darkGray[600])};
|
|
230
|
+
border-color: ${t(colors.gray[300], colors.darkGray[500])};
|
|
228
231
|
}
|
|
229
232
|
}
|
|
230
233
|
`,
|
|
@@ -272,7 +275,7 @@ const stylesFactory = () => {
|
|
|
272
275
|
align-items: center;
|
|
273
276
|
`,
|
|
274
277
|
infoLabel: css`
|
|
275
|
-
color: ${colors.gray[400]};
|
|
278
|
+
color: ${t(colors.gray[600], colors.gray[400])};
|
|
276
279
|
font-size: ${fontSize.xs};
|
|
277
280
|
text-transform: uppercase;
|
|
278
281
|
letter-spacing: 0.05em;
|
|
@@ -280,7 +283,7 @@ const stylesFactory = () => {
|
|
|
280
283
|
infoValueMono: css`
|
|
281
284
|
font-family: ${fontFamily.mono};
|
|
282
285
|
font-size: ${fontSize.xs};
|
|
283
|
-
color: ${colors.gray[100]};
|
|
286
|
+
color: ${t(colors.gray[900], colors.gray[100])};
|
|
284
287
|
word-break: break-all;
|
|
285
288
|
`,
|
|
286
289
|
noSelection: css`
|
|
@@ -288,7 +291,7 @@ const stylesFactory = () => {
|
|
|
288
291
|
display: flex;
|
|
289
292
|
align-items: center;
|
|
290
293
|
justify-content: center;
|
|
291
|
-
color: ${colors.gray[500]};
|
|
294
|
+
color: ${t(colors.gray[500], colors.gray[500])};
|
|
292
295
|
font-style: italic;
|
|
293
296
|
text-align: center;
|
|
294
297
|
padding: ${size[4]};
|
|
@@ -300,12 +303,14 @@ const stylesFactory = () => {
|
|
|
300
303
|
gap: ${size[4]};
|
|
301
304
|
`,
|
|
302
305
|
section: css`
|
|
303
|
-
background: ${colors.darkGray[800]};
|
|
306
|
+
background: ${t(colors.gray[100], colors.darkGray[800])};
|
|
304
307
|
border-radius: ${border.radius.lg};
|
|
305
|
-
box-shadow: ${tokens.shadow.md(
|
|
308
|
+
box-shadow: ${tokens.shadow.md(
|
|
309
|
+
t(colors.gray[400] + alpha[80], colors.black + alpha[80]),
|
|
310
|
+
)};
|
|
306
311
|
padding: ${size[4]};
|
|
307
312
|
margin-bottom: ${size[4]};
|
|
308
|
-
border: 1px solid ${colors.darkGray[700]};
|
|
313
|
+
border: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
|
|
309
314
|
min-width: 0;
|
|
310
315
|
max-width: 33%;
|
|
311
316
|
max-height: fit-content;
|
|
@@ -314,14 +319,14 @@ const stylesFactory = () => {
|
|
|
314
319
|
font-size: ${fontSize.lg};
|
|
315
320
|
font-weight: ${font.weight.bold};
|
|
316
321
|
margin-bottom: ${size[2]};
|
|
317
|
-
color: ${colors.blue[400]};
|
|
322
|
+
color: ${t(colors.blue[600], colors.blue[400])};
|
|
318
323
|
letter-spacing: 0.01em;
|
|
319
324
|
display: flex;
|
|
320
325
|
align-items: center;
|
|
321
326
|
gap: ${size[2]};
|
|
322
327
|
`,
|
|
323
328
|
sectionEmpty: css`
|
|
324
|
-
color: ${colors.gray[500]};
|
|
329
|
+
color: ${t(colors.gray[500], colors.gray[500])};
|
|
325
330
|
font-size: ${fontSize.sm};
|
|
326
331
|
font-style: italic;
|
|
327
332
|
margin: ${size[2]} 0;
|
|
@@ -330,14 +335,16 @@ const stylesFactory = () => {
|
|
|
330
335
|
display: flex;
|
|
331
336
|
flex-direction: column;
|
|
332
337
|
gap: ${size[2]};
|
|
338
|
+
background: ${t(colors.gray[200], colors.darkGray[700])};
|
|
339
|
+
border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};
|
|
333
340
|
`,
|
|
334
341
|
instanceCard: css`
|
|
335
|
-
background: ${colors.darkGray[700]};
|
|
342
|
+
background: ${t(colors.gray[200], colors.darkGray[700])};
|
|
336
343
|
border-radius: ${border.radius.md};
|
|
337
344
|
padding: ${size[3]};
|
|
338
|
-
border: 1px solid ${colors.darkGray[600]};
|
|
345
|
+
border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};
|
|
339
346
|
font-size: ${fontSize.sm};
|
|
340
|
-
color: ${colors.gray[100]};
|
|
347
|
+
color: ${t(colors.gray[900], colors.gray[100])};
|
|
341
348
|
font-family: ${fontFamily.mono};
|
|
342
349
|
overflow-x: auto;
|
|
343
350
|
transition:
|
|
@@ -348,6 +355,10 @@ const stylesFactory = () => {
|
|
|
348
355
|
}
|
|
349
356
|
|
|
350
357
|
export function useStyles() {
|
|
351
|
-
const
|
|
352
|
-
|
|
358
|
+
const { theme } = useTheme()
|
|
359
|
+
const [styles, setStyles] = createSignal(stylesFactory(theme()))
|
|
360
|
+
createEffect(() => {
|
|
361
|
+
setStyles(stylesFactory(theme()))
|
|
362
|
+
})
|
|
363
|
+
return styles
|
|
353
364
|
}
|