@tanstack/devtools 0.0.0 → 0.1.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/README.md +41 -0
- package/dist/cjs/components/checkbox.cjs +55 -0
- package/dist/cjs/components/checkbox.cjs.map +1 -0
- package/dist/cjs/components/checkbox.d.cts +8 -0
- package/dist/cjs/components/content-panel.cjs +5 -1
- package/dist/cjs/components/content-panel.cjs.map +1 -1
- package/dist/cjs/components/input.cjs +57 -0
- package/dist/cjs/components/input.cjs.map +1 -0
- package/dist/cjs/components/input.d.cts +10 -0
- package/dist/cjs/components/logo.cjs.map +1 -1
- package/dist/cjs/components/main-panel.cjs +4 -1
- package/dist/cjs/components/main-panel.cjs.map +1 -1
- package/dist/cjs/components/select.cjs +59 -0
- package/dist/cjs/components/select.cjs.map +1 -0
- package/dist/cjs/components/select.d.cts +13 -0
- package/dist/cjs/components/tab-content.cjs +2 -4
- package/dist/cjs/components/tab-content.cjs.map +1 -1
- package/dist/cjs/components/tabs.cjs.map +1 -1
- package/dist/cjs/components/trigger.cjs +1 -1
- package/dist/cjs/components/trigger.cjs.map +1 -1
- package/dist/cjs/constants.cjs +7 -0
- package/dist/cjs/constants.cjs.map +1 -0
- package/dist/cjs/constants.d.cts +2 -0
- package/dist/cjs/context/devtools-context.cjs +16 -1
- package/dist/cjs/context/devtools-context.cjs.map +1 -1
- package/dist/cjs/context/devtools-context.d.cts +5 -5
- package/dist/cjs/context/devtools-store.cjs.map +1 -1
- package/dist/cjs/context/devtools-store.d.cts +3 -3
- package/dist/cjs/context/use-devtools-context.cjs +2 -2
- package/dist/cjs/context/use-devtools-context.cjs.map +1 -1
- package/dist/cjs/context/use-devtools-context.d.cts +4 -5
- package/dist/cjs/core.cjs +29 -43
- package/dist/cjs/core.cjs.map +1 -1
- package/dist/cjs/core.d.cts +7 -8
- package/dist/cjs/devtools.cjs +40 -29
- package/dist/cjs/devtools.cjs.map +1 -1
- package/dist/cjs/hooks/use-disable-tabbing.cjs.map +1 -1
- package/dist/cjs/index.cjs +4 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +4 -3
- package/dist/cjs/styles/tokens.cjs +7 -2
- package/dist/cjs/styles/tokens.cjs.map +1 -1
- package/dist/cjs/styles/use-styles.cjs +251 -11
- package/dist/cjs/styles/use-styles.cjs.map +1 -1
- package/dist/cjs/styles/use-styles.d.cts +29 -5
- package/dist/cjs/tabs/index.cjs.map +1 -1
- package/dist/cjs/tabs/plugins-tab.cjs +8 -12
- package/dist/cjs/tabs/plugins-tab.cjs.map +1 -1
- package/dist/cjs/tabs/settings-tab.cjs +172 -2
- package/dist/cjs/tabs/settings-tab.cjs.map +1 -1
- package/dist/cjs/utils/sanitize.cjs +2 -0
- package/dist/cjs/utils/sanitize.cjs.map +1 -1
- package/dist/cjs/utils/sanitize.d.cts +1 -0
- package/dist/cjs/utils/storage.cjs.map +1 -1
- package/dist/esm/components/checkbox.d.ts +8 -0
- package/dist/esm/components/checkbox.js +55 -0
- package/dist/esm/components/checkbox.js.map +1 -0
- package/dist/esm/components/content-panel.js +5 -1
- package/dist/esm/components/content-panel.js.map +1 -1
- package/dist/esm/components/input.d.ts +10 -0
- package/dist/esm/components/input.js +57 -0
- package/dist/esm/components/input.js.map +1 -0
- package/dist/esm/components/logo.js.map +1 -1
- package/dist/esm/components/main-panel.js +5 -2
- package/dist/esm/components/main-panel.js.map +1 -1
- package/dist/esm/components/select.d.ts +13 -0
- package/dist/esm/components/select.js +59 -0
- package/dist/esm/components/select.js.map +1 -0
- package/dist/esm/components/tab-content.js +2 -4
- package/dist/esm/components/tab-content.js.map +1 -1
- package/dist/esm/components/tabs.js.map +1 -1
- package/dist/esm/components/trigger.js +1 -1
- package/dist/esm/components/trigger.js.map +1 -1
- package/dist/esm/constants.d.ts +2 -0
- package/dist/esm/constants.js +7 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/esm/context/devtools-context.d.ts +5 -5
- package/dist/esm/context/devtools-context.js +16 -1
- package/dist/esm/context/devtools-context.js.map +1 -1
- package/dist/esm/context/devtools-store.d.ts +3 -3
- package/dist/esm/context/devtools-store.js.map +1 -1
- package/dist/esm/context/use-devtools-context.d.ts +4 -5
- package/dist/esm/context/use-devtools-context.js +2 -2
- package/dist/esm/context/use-devtools-context.js.map +1 -1
- package/dist/esm/core.d.ts +7 -8
- package/dist/esm/core.js +29 -43
- package/dist/esm/core.js.map +1 -1
- package/dist/esm/devtools.js +42 -31
- package/dist/esm/devtools.js.map +1 -1
- package/dist/esm/hooks/use-disable-tabbing.js.map +1 -1
- package/dist/esm/index.d.ts +4 -3
- package/dist/esm/index.js +5 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/styles/tokens.js +7 -2
- package/dist/esm/styles/tokens.js.map +1 -1
- package/dist/esm/styles/use-styles.d.ts +29 -5
- package/dist/esm/styles/use-styles.js +251 -11
- package/dist/esm/styles/use-styles.js.map +1 -1
- package/dist/esm/tabs/index.js.map +1 -1
- package/dist/esm/tabs/plugins-tab.js +9 -13
- package/dist/esm/tabs/plugins-tab.js.map +1 -1
- package/dist/esm/tabs/settings-tab.js +173 -3
- package/dist/esm/tabs/settings-tab.js.map +1 -1
- package/dist/esm/utils/sanitize.d.ts +1 -0
- package/dist/esm/utils/sanitize.js +3 -1
- package/dist/esm/utils/sanitize.js.map +1 -1
- package/dist/esm/utils/storage.js.map +1 -1
- package/package.json +7 -9
- package/src/components/checkbox.tsx +43 -0
- package/src/components/content-panel.tsx +3 -1
- package/src/components/input.tsx +42 -0
- package/src/components/main-panel.tsx +3 -2
- package/src/components/select.tsx +50 -0
- package/src/components/trigger.tsx +1 -1
- package/src/constants.ts +2 -0
- package/src/context/devtools-context.tsx +28 -9
- package/src/context/devtools-store.ts +3 -3
- package/src/context/use-devtools-context.ts +2 -3
- package/src/core.tsx +18 -20
- package/src/devtools.tsx +34 -18
- package/src/index.ts +7 -3
- package/src/styles/use-styles.ts +257 -13
- package/src/tabs/plugins-tab.tsx +11 -5
- package/src/tabs/settings-tab.tsx +217 -1
- package/src/utils/sanitize.ts +3 -0
|
@@ -9,6 +9,9 @@ const tokens = {
|
|
|
9
9
|
gray: {
|
|
10
10
|
100: "#f2f4f7",
|
|
11
11
|
300: "#d0d5dd",
|
|
12
|
+
400: "#98a2b3",
|
|
13
|
+
500: "#667085",
|
|
14
|
+
600: "#475467",
|
|
12
15
|
700: "#344054"
|
|
13
16
|
},
|
|
14
17
|
blue: {
|
|
@@ -23,7 +26,8 @@ const tokens = {
|
|
|
23
26
|
}
|
|
24
27
|
},
|
|
25
28
|
alpha: {
|
|
26
|
-
90: "e5"
|
|
29
|
+
90: "e5",
|
|
30
|
+
20: "33"
|
|
27
31
|
},
|
|
28
32
|
font: {
|
|
29
33
|
size: {
|
|
@@ -31,7 +35,8 @@ const tokens = {
|
|
|
31
35
|
sm: "calc(var(--tsrd-font-size) * 0.875)"
|
|
32
36
|
},
|
|
33
37
|
fontFamily: {
|
|
34
|
-
sans: "ui-sans-serif, Inter, system-ui, sans-serif, sans-serif"
|
|
38
|
+
sans: "ui-sans-serif, Inter, system-ui, sans-serif, sans-serif",
|
|
39
|
+
mono: `ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace`
|
|
35
40
|
}
|
|
36
41
|
},
|
|
37
42
|
border: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.cjs","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,IAkBN,UAAU;AAAA,MAQR,KAAK;AAAA,MACL,KAAK;AAAA,IAEP;AAAA,IACA,MAAM;AAAA,MAEJ,KAAK;AAAA,MAEL,KAAK;AAAA,
|
|
1
|
+
{"version":3,"file":"tokens.cjs","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,IAkBN,UAAU;AAAA,MAQR,KAAK;AAAA,MACL,KAAK;AAAA,IAEP;AAAA,IACA,MAAM;AAAA,MAEJ,KAAK;AAAA,MAEL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,IAGP;AAAA,IACA,MAAM;AAAA,MAUJ,KAAK;AAAA,IAEP;AAAA,IAcA,KAAK;AAAA,MAMH,KAAK;AAAA,IAMP;AAAA,IAcA,QAAQ;AAAA,MAMN,KAAK;AAAA,MACL,KAAK;AAAA,IAKP;AAAA,EAwCF;AAAA,EACA,OAAO;AAAA,IAEL,IAAI;AAAA,IAOJ,IAAI;AAAA,EAGN;AAAA,EACA,MAAM;AAAA,IACJ,MAAM;AAAA,MAEJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAYN;AAAA,IA6BA,YAAY;AAAA,MACV,MAAM;AAAA,MACN,MAAM;AAAA,IAAA;AAAA,EACR;AAAA,EAUF,QAAQ;AAAA,IACN,QAAQ;AAAA,MASN,MAAM;AAAA,IAAA;AAAA,EACR;AAAA,EAEF,MAAM;AAAA,IAGJ,KAAK;AAAA,IAGL,GAAG;AAAA,IAaH,IAAI;AAAA,IAEJ,IAAI;AAAA,IAUJ,IAAI;AAAA,EAQN;AAiCF;;"}
|
|
@@ -25,10 +25,12 @@ const stylesFactory = () => {
|
|
|
25
25
|
const { fontFamily, size: fontSize } = font;
|
|
26
26
|
const css = goober__namespace.css;
|
|
27
27
|
return {
|
|
28
|
-
devtoolsPanelContainer: css`
|
|
28
|
+
devtoolsPanelContainer: (panelLocation) => css`
|
|
29
29
|
direction: ltr;
|
|
30
30
|
position: fixed;
|
|
31
|
-
|
|
31
|
+
overflow-y: hidden;
|
|
32
|
+
overflow-x: hidden;
|
|
33
|
+
${panelLocation}: 0;
|
|
32
34
|
right: 0;
|
|
33
35
|
z-index: 99999;
|
|
34
36
|
width: 100%;
|
|
@@ -88,13 +90,14 @@ const stylesFactory = () => {
|
|
|
88
90
|
color: ${colors.gray[300]};
|
|
89
91
|
width: w-screen;
|
|
90
92
|
flex-direction: row;
|
|
91
|
-
overflow:
|
|
93
|
+
overflow-x: hidden;
|
|
94
|
+
overflow-y: hidden;
|
|
92
95
|
height: 100%;
|
|
93
96
|
`,
|
|
94
|
-
dragHandle: css`
|
|
97
|
+
dragHandle: (panelLocation) => css`
|
|
95
98
|
position: absolute;
|
|
96
99
|
left: 0;
|
|
97
|
-
top: 0;
|
|
100
|
+
${panelLocation === "bottom" ? "top" : "bottom"}: 0;
|
|
98
101
|
width: 100%;
|
|
99
102
|
height: 4px;
|
|
100
103
|
cursor: row-resize;
|
|
@@ -117,6 +120,16 @@ const stylesFactory = () => {
|
|
|
117
120
|
font-size: ${font.size.xs};
|
|
118
121
|
cursor: pointer;
|
|
119
122
|
transition: all 0.25s ease-out;
|
|
123
|
+
&:hide-until-hover {
|
|
124
|
+
opacity: 0;
|
|
125
|
+
pointer-events: none;
|
|
126
|
+
visibility: hidden;
|
|
127
|
+
}
|
|
128
|
+
&:hide-until-hover:hover {
|
|
129
|
+
opacity: 1;
|
|
130
|
+
pointer-events: auto;
|
|
131
|
+
visibility: visible;
|
|
132
|
+
}
|
|
120
133
|
&:focus-visible {
|
|
121
134
|
outline-offset: 2px;
|
|
122
135
|
border-radius: ${border.radius.full};
|
|
@@ -134,13 +147,21 @@ const stylesFactory = () => {
|
|
|
134
147
|
`;
|
|
135
148
|
return base;
|
|
136
149
|
},
|
|
137
|
-
mainCloseBtnAnimation: (isOpen) => {
|
|
150
|
+
mainCloseBtnAnimation: (isOpen, hideUntilHover) => {
|
|
138
151
|
if (!isOpen) {
|
|
139
|
-
return css`
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
152
|
+
return hideUntilHover ? css`
|
|
153
|
+
opacity: 0;
|
|
154
|
+
|
|
155
|
+
&:hover {
|
|
156
|
+
opacity: 1;
|
|
157
|
+
pointer-events: auto;
|
|
158
|
+
visibility: visible;
|
|
159
|
+
}
|
|
160
|
+
` : css`
|
|
161
|
+
opacity: 1;
|
|
162
|
+
pointer-events: auto;
|
|
163
|
+
visibility: visible;
|
|
164
|
+
`;
|
|
144
165
|
}
|
|
145
166
|
return css`
|
|
146
167
|
opacity: 0;
|
|
@@ -245,6 +266,225 @@ const stylesFactory = () => {
|
|
|
245
266
|
width: 100%;
|
|
246
267
|
height: 100%;
|
|
247
268
|
overflow-y: auto;
|
|
269
|
+
`,
|
|
270
|
+
selectWrapper: css`
|
|
271
|
+
width: 100%;
|
|
272
|
+
max-width: 300px;
|
|
273
|
+
display: flex;
|
|
274
|
+
flex-direction: column;
|
|
275
|
+
gap: 0.375rem;
|
|
276
|
+
`,
|
|
277
|
+
selectContainer: css`
|
|
278
|
+
width: 100%;
|
|
279
|
+
`,
|
|
280
|
+
selectLabel: css`
|
|
281
|
+
font-size: 0.875rem;
|
|
282
|
+
font-weight: 500;
|
|
283
|
+
color: ${colors.gray[100]};
|
|
284
|
+
`,
|
|
285
|
+
selectDescription: css`
|
|
286
|
+
font-size: 0.8rem;
|
|
287
|
+
color: ${colors.gray[400]};
|
|
288
|
+
margin: 0;
|
|
289
|
+
line-height: 1.3;
|
|
290
|
+
`,
|
|
291
|
+
select: css`
|
|
292
|
+
appearance: none;
|
|
293
|
+
width: 100%;
|
|
294
|
+
padding: 0.75rem 3rem 0.75rem 0.75rem;
|
|
295
|
+
border-radius: 0.5rem;
|
|
296
|
+
background-color: ${colors.darkGray[800]};
|
|
297
|
+
color: ${colors.gray[100]};
|
|
298
|
+
border: 1px solid ${colors.gray[700]};
|
|
299
|
+
font-size: 0.875rem;
|
|
300
|
+
transition: all 0.2s ease;
|
|
301
|
+
cursor: pointer;
|
|
302
|
+
|
|
303
|
+
/* Custom arrow */
|
|
304
|
+
background-image: url("data:image/svg+xml;utf8,<svg fill='%236b7280' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
|
|
305
|
+
background-repeat: no-repeat;
|
|
306
|
+
background-position: right 0.75rem center;
|
|
307
|
+
background-size: 1.25rem;
|
|
308
|
+
|
|
309
|
+
&:hover {
|
|
310
|
+
border-color: ${colors.gray[600]};
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
&:focus {
|
|
314
|
+
outline: none;
|
|
315
|
+
border-color: ${colors.purple[400]};
|
|
316
|
+
box-shadow: 0 0 0 3px ${colors.purple[400]}${alpha[20]};
|
|
317
|
+
}
|
|
318
|
+
`,
|
|
319
|
+
inputWrapper: css`
|
|
320
|
+
width: 100%;
|
|
321
|
+
max-width: 300px;
|
|
322
|
+
display: flex;
|
|
323
|
+
flex-direction: column;
|
|
324
|
+
gap: 0.375rem;
|
|
325
|
+
`,
|
|
326
|
+
inputContainer: css`
|
|
327
|
+
width: 100%;
|
|
328
|
+
`,
|
|
329
|
+
inputLabel: css`
|
|
330
|
+
font-size: 0.875rem;
|
|
331
|
+
font-weight: 500;
|
|
332
|
+
color: ${colors.gray[100]};
|
|
333
|
+
`,
|
|
334
|
+
inputDescription: css`
|
|
335
|
+
font-size: 0.8rem;
|
|
336
|
+
color: ${colors.gray[400]};
|
|
337
|
+
margin: 0;
|
|
338
|
+
line-height: 1.3;
|
|
339
|
+
`,
|
|
340
|
+
input: css`
|
|
341
|
+
appearance: none;
|
|
342
|
+
width: 100%;
|
|
343
|
+
padding: 0.75rem;
|
|
344
|
+
border-radius: 0.5rem;
|
|
345
|
+
background-color: ${colors.darkGray[800]};
|
|
346
|
+
color: ${colors.gray[100]};
|
|
347
|
+
border: 1px solid ${colors.gray[700]};
|
|
348
|
+
font-size: 0.875rem;
|
|
349
|
+
font-family: ${fontFamily.mono};
|
|
350
|
+
transition: all 0.2s ease;
|
|
351
|
+
|
|
352
|
+
&::placeholder {
|
|
353
|
+
color: ${colors.gray[500]};
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
&:hover {
|
|
357
|
+
border-color: ${colors.gray[600]};
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
&:focus {
|
|
361
|
+
outline: none;
|
|
362
|
+
border-color: ${colors.purple[400]};
|
|
363
|
+
box-shadow: 0 0 0 3px ${colors.purple[400]}${alpha[20]};
|
|
364
|
+
}
|
|
365
|
+
`,
|
|
366
|
+
checkboxWrapper: css`
|
|
367
|
+
display: flex;
|
|
368
|
+
align-items: flex-start;
|
|
369
|
+
gap: 0.75rem;
|
|
370
|
+
cursor: pointer;
|
|
371
|
+
user-select: none;
|
|
372
|
+
padding: 0.5rem;
|
|
373
|
+
border-radius: 0.5rem;
|
|
374
|
+
transition: background-color 0.2s ease;
|
|
375
|
+
|
|
376
|
+
&:hover {
|
|
377
|
+
background-color: ${colors.darkGray[800]};
|
|
378
|
+
}
|
|
379
|
+
`,
|
|
380
|
+
checkboxContainer: css`
|
|
381
|
+
width: 100%;
|
|
382
|
+
`,
|
|
383
|
+
checkboxLabelContainer: css`
|
|
384
|
+
display: flex;
|
|
385
|
+
flex-direction: column;
|
|
386
|
+
gap: 0.25rem;
|
|
387
|
+
flex: 1;
|
|
388
|
+
`,
|
|
389
|
+
checkbox: css`
|
|
390
|
+
appearance: none;
|
|
391
|
+
width: 1.25rem;
|
|
392
|
+
height: 1.25rem;
|
|
393
|
+
border: 2px solid ${colors.gray[700]};
|
|
394
|
+
border-radius: 0.375rem;
|
|
395
|
+
background-color: ${colors.darkGray[800]};
|
|
396
|
+
display: grid;
|
|
397
|
+
place-items: center;
|
|
398
|
+
transition: all 0.2s ease;
|
|
399
|
+
flex-shrink: 0;
|
|
400
|
+
margin-top: 0.125rem;
|
|
401
|
+
|
|
402
|
+
&:hover {
|
|
403
|
+
border-color: ${colors.purple[400]};
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
&:checked {
|
|
407
|
+
background-color: ${colors.purple[500]};
|
|
408
|
+
border-color: ${colors.purple[500]};
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
&:checked::after {
|
|
412
|
+
content: '';
|
|
413
|
+
width: 0.4rem;
|
|
414
|
+
height: 0.6rem;
|
|
415
|
+
border: solid white;
|
|
416
|
+
border-width: 0 2px 2px 0;
|
|
417
|
+
transform: rotate(45deg);
|
|
418
|
+
margin-top: -3px;
|
|
419
|
+
}
|
|
420
|
+
`,
|
|
421
|
+
checkboxLabel: css`
|
|
422
|
+
color: ${colors.gray[100]};
|
|
423
|
+
font-size: 0.875rem;
|
|
424
|
+
font-weight: 500;
|
|
425
|
+
line-height: 1.4;
|
|
426
|
+
`,
|
|
427
|
+
checkboxDescription: css`
|
|
428
|
+
color: ${colors.gray[400]};
|
|
429
|
+
font-size: 0.8rem;
|
|
430
|
+
line-height: 1.3;
|
|
431
|
+
`,
|
|
432
|
+
settingsContainer: css`
|
|
433
|
+
padding: 1.5rem;
|
|
434
|
+
height: 100%;
|
|
435
|
+
overflow-y: auto;
|
|
436
|
+
background-color: ${colors.darkGray[700]};
|
|
437
|
+
`,
|
|
438
|
+
settingsSection: css`
|
|
439
|
+
margin-bottom: 2rem;
|
|
440
|
+
padding: 1.5rem;
|
|
441
|
+
background-color: ${colors.darkGray[800]};
|
|
442
|
+
border: 1px solid ${colors.gray[700]};
|
|
443
|
+
border-radius: 0.75rem;
|
|
444
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
445
|
+
`,
|
|
446
|
+
sectionTitle: css`
|
|
447
|
+
font-size: 1.125rem;
|
|
448
|
+
font-weight: 600;
|
|
449
|
+
color: ${colors.gray[100]};
|
|
450
|
+
margin: 0 0 1rem 0;
|
|
451
|
+
padding-bottom: 0.5rem;
|
|
452
|
+
border-bottom: 1px solid ${colors.gray[700]};
|
|
453
|
+
display: flex;
|
|
454
|
+
align-items: center;
|
|
455
|
+
gap: 0.5rem;
|
|
456
|
+
`,
|
|
457
|
+
sectionIcon: css`
|
|
458
|
+
color: ${colors.purple[400]};
|
|
459
|
+
`,
|
|
460
|
+
sectionDescription: css`
|
|
461
|
+
color: ${colors.gray[400]};
|
|
462
|
+
font-size: 0.875rem;
|
|
463
|
+
margin: 0 0 1.5rem 0;
|
|
464
|
+
line-height: 1.5;
|
|
465
|
+
`,
|
|
466
|
+
settingsGroup: css`
|
|
467
|
+
display: flex;
|
|
468
|
+
flex-direction: column;
|
|
469
|
+
gap: 1rem;
|
|
470
|
+
`,
|
|
471
|
+
conditionalSetting: css`
|
|
472
|
+
margin-left: 1.5rem;
|
|
473
|
+
padding-left: 1rem;
|
|
474
|
+
border-left: 2px solid ${colors.purple[400]};
|
|
475
|
+
background-color: ${colors.darkGray[800]};
|
|
476
|
+
padding: 1rem;
|
|
477
|
+
border-radius: 0.5rem;
|
|
478
|
+
margin-top: 0.5rem;
|
|
479
|
+
`,
|
|
480
|
+
settingRow: css`
|
|
481
|
+
display: grid;
|
|
482
|
+
grid-template-columns: 1fr 1fr;
|
|
483
|
+
gap: 1rem;
|
|
484
|
+
|
|
485
|
+
@media (max-width: 768px) {
|
|
486
|
+
grid-template-columns: 1fr;
|
|
487
|
+
}
|
|
248
488
|
`
|
|
249
489
|
};
|
|
250
490
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-styles.cjs","sources":["../../../src/styles/use-styles.ts"],"sourcesContent":["import * as goober from 'goober'\nimport { createSignal } from 'solid-js'\nimport { tokens } from './tokens'\nimport type { DevtoolsSettings } from '../context/devtools-context'\nimport type { Accessor } from 'solid-js'\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 devtoolsPanelContainer: css`\n direction: ltr;\n position: fixed;\n bottom: 0;\n right: 0;\n z-index: 99999;\n width: 100%;\n\n max-height: 90%;\n border-top: 1px solid ${colors.gray[700]};\n transform-origin: top;\n `,\n devtoolsPanelContainerVisibility: (isOpen: boolean) => {\n return css`\n visibility: ${isOpen ? 'visible' : 'hidden'};\n height: ${isOpen ? 'auto' : '0'};\n `\n },\n devtoolsPanelContainerResizing: (isResizing: Accessor<boolean>) => {\n if (isResizing()) {\n return css`\n transition: none;\n `\n }\n\n return css`\n transition: all 0.4s ease;\n `\n },\n devtoolsPanelContainerAnimation: (isOpen: boolean, height: number) => {\n if (isOpen) {\n return css`\n pointer-events: auto;\n transform: translateY(0);\n `\n }\n return css`\n pointer-events: none;\n transform: translateY(${height}px);\n `\n },\n logo: css`\n cursor: pointer;\n display: flex;\n flex-direction: column;\n background-color: transparent;\n border: none;\n width: ${size[12]};\n height: ${size[12]};\n font-family: ${fontFamily.sans};\n gap: ${tokens.size[0.5]};\n padding: 0px;\n &:hover {\n opacity: 0.7;\n }\n `,\n\n devtoolsPanel: css`\n display: flex;\n font-size: ${fontSize.sm};\n font-family: ${fontFamily.sans};\n background-color: ${colors.darkGray[700]};\n color: ${colors.gray[300]};\n width: w-screen;\n flex-direction: row;\n overflow: auto;\n height: 100%;\n `,\n dragHandle: css`\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 4px;\n cursor: row-resize;\n z-index: 100000;\n &:hover {\n background-color: ${colors.purple[400]}${alpha[90]};\n }\n `,\n\n mainCloseBtn: css`\n background: transparent;\n position: fixed;\n z-index: 99999;\n display: inline-flex;\n width: fit-content;\n cursor: pointer;\n appearance: none;\n border: 0;\n align-items: center;\n padding: 0;\n font-size: ${font.size.xs};\n cursor: pointer;\n transition: all 0.25s ease-out;\n &:focus-visible {\n outline-offset: 2px;\n border-radius: ${border.radius.full};\n outline: 2px solid ${colors.blue[800]};\n }\n `,\n mainCloseBtnPosition: (position: DevtoolsSettings['position']) => {\n const base = css`\n ${position === 'top-left' ? `top: ${size[2]}; left: ${size[2]};` : ''}\n ${position === 'top-right' ? `top: ${size[2]}; right: ${size[2]};` : ''}\n ${position === 'middle-left'\n ? `top: 50%; left: ${size[2]}; transform: translateY(-50%);`\n : ''}\n ${position === 'middle-right'\n ? `top: 50%; right: ${size[2]}; transform: translateY(-50%);`\n : ''}\n ${position === 'bottom-left'\n ? `bottom: ${size[2]}; left: ${size[2]};`\n : ''}\n ${position === 'bottom-right'\n ? `bottom: ${size[2]}; right: ${size[2]};`\n : ''}\n `\n return base\n },\n mainCloseBtnAnimation: (isOpen: boolean) => {\n if (!isOpen) {\n return css`\n opacity: 1;\n pointer-events: auto;\n visibility: visible;\n `\n }\n return css`\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n `\n },\n tabContainer: css`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n height: 100%;\n background-color: ${colors.darkGray[800]};\n border-right: 1px solid ${colors.gray[700]};\n box-shadow: 0 1px 0 ${colors.gray[700]};\n position: relative;\n width: ${size[10]};\n `,\n\n tab: css`\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: ${size[10]};\n cursor: pointer;\n font-size: ${fontSize.sm};\n font-family: ${fontFamily.sans};\n color: ${colors.gray[300]};\n background-color: transparent;\n border: none;\n transition: all 0.2s ease-in-out;\n border-left: 2px solid transparent;\n &:hover:not(.close):not(.active) {\n background-color: ${colors.gray[700]};\n color: ${colors.gray[100]};\n border-left: 2px solid ${colors.purple[500]};\n }\n &.active {\n background-color: ${colors.purple[500]};\n color: ${colors.gray[100]};\n border-left: 2px solid ${colors.purple[500]};\n }\n &.close {\n margin-top: auto;\n &:hover {\n background-color: ${colors.gray[700]};\n }\n &:hover {\n color: ${colors.red[500]};\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n opacity: 0.2;\n pointer-events: none;\n }\n &.disabled:hover {\n background-color: transparent;\n color: ${colors.gray[300]};\n }\n `,\n tabContent: css`\n transition: all 0.2s ease-in-out;\n width: 100%;\n height: 100%;\n `,\n pluginsTabPanel: css`\n display: flex;\n flex-direction: row;\n width: 100%;\n height: 100%;\n overflow: hidden;\n `,\n pluginsTabSidebar: css`\n width: ${size[48]};\n background-color: ${colors.darkGray[800]};\n border-right: 1px solid ${colors.gray[700]};\n box-shadow: 0 1px 0 ${colors.gray[700]};\n overflow-y: auto;\n `,\n pluginName: css`\n font-size: ${fontSize.xs};\n font-family: ${fontFamily.sans};\n color: ${colors.gray[300]};\n padding: ${size[2]};\n cursor: pointer;\n text-align: center;\n transition: all 0.2s ease-in-out;\n &:hover {\n background-color: ${colors.gray[700]};\n color: ${colors.gray[100]};\n padding: ${size[2]};\n }\n &.active {\n background-color: ${colors.purple[500]};\n color: ${colors.gray[100]};\n }\n `,\n pluginsTabContent: css`\n width: 100%;\n height: 100%;\n overflow-y: auto;\n `,\n }\n}\n\nexport function useStyles() {\n const [_styles] = createSignal(stylesFactory())\n return _styles\n}\n"],"names":["tokens","goober","createSignal"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM,gBAAgB,MAAM;AAC1B,QAAM,EAAE,QAAQ,MAAM,MAAM,OAAO,WAAWA,OAAA;AAC9C,QAAM,EAAE,YAAY,MAAM,SAAa,IAAA;AACvC,QAAM,MAAMC,kBAAO;AAEZ,SAAA;AAAA,IACL,wBAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BASE,OAAO,KAAK,GAAG,CAAC;AAAA;AAAA;AAAA,IAG1C,kCAAkC,CAAC,WAAoB;AAC9C,aAAA;AAAA,sBACS,SAAS,YAAY,QAAQ;AAAA,kBACjC,SAAS,SAAS,GAAG;AAAA;AAAA,I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,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAWjB,OAAO,KAAK,GAAG,CAAC;AAAA;AAAA;AAAA,IAG7B,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA,IAKZ,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOjB,mBAAmB;AAAA,eACR,KAAK,EAAE,CAAC;AAAA,0BACG,OAAO,SAAS,GAAG,CAAC;AAAA,gCACd,OAAO,KAAK,GAAG,CAAC;AAAA,4BACpB,OAAO,KAAK,GAAG,CAAC;AAAA;AAAA;AAAA,IAGxC,YAAY;AAAA,mBACG,SAAS,EAAE;AAAA,qBACT,WAAW,IAAI;AAAA,eACrB,OAAO,KAAK,GAAG,CAAC;AAAA,iBACd,KAAK,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,4BAKI,OAAO,KAAK,GAAG,CAAC;AAAA,iBAC3B,OAAO,KAAK,GAAG,CAAC;AAAA,mBACd,KAAK,CAAC,CAAC;AAAA;AAAA;AAAA,4BAGE,OAAO,OAAO,GAAG,CAAC;AAAA,iBAC7B,OAAO,KAAK,GAAG,CAAC;AAAA;AAAA;AAAA,IAG7B,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKrB;AACF;AAEO,SAAS,YAAY;AAC1B,QAAM,CAAC,OAAO,IAAIE,QAAA,aAAa,eAAe;AACvC,SAAA;AACT;;"}
|
|
1
|
+
{"version":3,"file":"use-styles.cjs","sources":["../../../src/styles/use-styles.ts"],"sourcesContent":["import * as goober from 'goober'\nimport { createSignal } from 'solid-js'\nimport { tokens } from './tokens'\nimport type { TanStackDevtoolsConfig } from '../context/devtools-context'\nimport type { Accessor } from 'solid-js'\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 devtoolsPanelContainer: (\n panelLocation: TanStackDevtoolsConfig['panelLocation'],\n ) => css`\n direction: ltr;\n position: fixed;\n overflow-y: hidden;\n overflow-x: hidden;\n ${panelLocation}: 0;\n right: 0;\n z-index: 99999;\n width: 100%;\n\n max-height: 90%;\n border-top: 1px solid ${colors.gray[700]};\n transform-origin: top;\n `,\n devtoolsPanelContainerVisibility: (isOpen: boolean) => {\n return css`\n visibility: ${isOpen ? 'visible' : 'hidden'};\n height: ${isOpen ? 'auto' : '0'};\n `\n },\n devtoolsPanelContainerResizing: (isResizing: Accessor<boolean>) => {\n if (isResizing()) {\n return css`\n transition: none;\n `\n }\n\n return css`\n transition: all 0.4s ease;\n `\n },\n devtoolsPanelContainerAnimation: (isOpen: boolean, height: number) => {\n if (isOpen) {\n return css`\n pointer-events: auto;\n transform: translateY(0);\n `\n }\n return css`\n pointer-events: none;\n transform: translateY(${height}px);\n `\n },\n logo: css`\n cursor: pointer;\n display: flex;\n flex-direction: column;\n background-color: transparent;\n border: none;\n width: ${size[12]};\n height: ${size[12]};\n font-family: ${fontFamily.sans};\n gap: ${tokens.size[0.5]};\n padding: 0px;\n &:hover {\n opacity: 0.7;\n }\n `,\n\n devtoolsPanel: css`\n display: flex;\n font-size: ${fontSize.sm};\n font-family: ${fontFamily.sans};\n background-color: ${colors.darkGray[700]};\n color: ${colors.gray[300]};\n width: w-screen;\n flex-direction: row;\n overflow-x: hidden;\n overflow-y: hidden;\n height: 100%;\n `,\n dragHandle: (panelLocation: TanStackDevtoolsConfig['panelLocation']) => css`\n position: absolute;\n left: 0;\n ${panelLocation === 'bottom' ? 'top' : 'bottom'}: 0;\n width: 100%;\n height: 4px;\n cursor: row-resize;\n z-index: 100000;\n &:hover {\n background-color: ${colors.purple[400]}${alpha[90]};\n }\n `,\n\n mainCloseBtn: css`\n background: transparent;\n position: fixed;\n z-index: 99999;\n display: inline-flex;\n width: fit-content;\n cursor: pointer;\n appearance: none;\n border: 0;\n align-items: center;\n padding: 0;\n font-size: ${font.size.xs};\n cursor: pointer;\n transition: all 0.25s ease-out;\n &:hide-until-hover {\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n }\n &:hide-until-hover:hover {\n opacity: 1;\n pointer-events: auto;\n visibility: visible;\n }\n &:focus-visible {\n outline-offset: 2px;\n border-radius: ${border.radius.full};\n outline: 2px solid ${colors.blue[800]};\n }\n `,\n mainCloseBtnPosition: (position: TanStackDevtoolsConfig['position']) => {\n const base = css`\n ${position === 'top-left' ? `top: ${size[2]}; left: ${size[2]};` : ''}\n ${position === 'top-right' ? `top: ${size[2]}; right: ${size[2]};` : ''}\n ${position === 'middle-left'\n ? `top: 50%; left: ${size[2]}; transform: translateY(-50%);`\n : ''}\n ${position === 'middle-right'\n ? `top: 50%; right: ${size[2]}; transform: translateY(-50%);`\n : ''}\n ${position === 'bottom-left'\n ? `bottom: ${size[2]}; left: ${size[2]};`\n : ''}\n ${position === 'bottom-right'\n ? `bottom: ${size[2]}; right: ${size[2]};`\n : ''}\n `\n return base\n },\n mainCloseBtnAnimation: (isOpen: boolean, hideUntilHover: boolean) => {\n if (!isOpen) {\n return hideUntilHover\n ? css`\n opacity: 0;\n\n &:hover {\n opacity: 1;\n pointer-events: auto;\n visibility: visible;\n }\n `\n : css`\n opacity: 1;\n pointer-events: auto;\n visibility: visible;\n `\n }\n return css`\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n `\n },\n tabContainer: css`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n height: 100%;\n background-color: ${colors.darkGray[800]};\n border-right: 1px solid ${colors.gray[700]};\n box-shadow: 0 1px 0 ${colors.gray[700]};\n position: relative;\n width: ${size[10]};\n `,\n\n tab: css`\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: ${size[10]};\n cursor: pointer;\n font-size: ${fontSize.sm};\n font-family: ${fontFamily.sans};\n color: ${colors.gray[300]};\n background-color: transparent;\n border: none;\n transition: all 0.2s ease-in-out;\n border-left: 2px solid transparent;\n &:hover:not(.close):not(.active) {\n background-color: ${colors.gray[700]};\n color: ${colors.gray[100]};\n border-left: 2px solid ${colors.purple[500]};\n }\n &.active {\n background-color: ${colors.purple[500]};\n color: ${colors.gray[100]};\n border-left: 2px solid ${colors.purple[500]};\n }\n &.close {\n margin-top: auto;\n &:hover {\n background-color: ${colors.gray[700]};\n }\n &:hover {\n color: ${colors.red[500]};\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n opacity: 0.2;\n pointer-events: none;\n }\n &.disabled:hover {\n background-color: transparent;\n color: ${colors.gray[300]};\n }\n `,\n tabContent: css`\n transition: all 0.2s ease-in-out;\n width: 100%;\n height: 100%;\n `,\n pluginsTabPanel: css`\n display: flex;\n flex-direction: row;\n width: 100%;\n height: 100%;\n overflow: hidden;\n `,\n pluginsTabSidebar: css`\n width: ${size[48]};\n background-color: ${colors.darkGray[800]};\n border-right: 1px solid ${colors.gray[700]};\n box-shadow: 0 1px 0 ${colors.gray[700]};\n overflow-y: auto;\n `,\n pluginName: css`\n font-size: ${fontSize.xs};\n font-family: ${fontFamily.sans};\n color: ${colors.gray[300]};\n padding: ${size[2]};\n cursor: pointer;\n text-align: center;\n transition: all 0.2s ease-in-out;\n &:hover {\n background-color: ${colors.gray[700]};\n color: ${colors.gray[100]};\n padding: ${size[2]};\n }\n &.active {\n background-color: ${colors.purple[500]};\n color: ${colors.gray[100]};\n }\n `,\n pluginsTabContent: css`\n width: 100%;\n height: 100%;\n overflow-y: auto;\n `,\n selectWrapper: css`\n width: 100%;\n max-width: 300px;\n display: flex;\n flex-direction: column;\n gap: 0.375rem;\n `,\n selectContainer: css`\n width: 100%;\n `,\n selectLabel: css`\n font-size: 0.875rem;\n font-weight: 500;\n color: ${colors.gray[100]};\n `,\n selectDescription: css`\n font-size: 0.8rem;\n color: ${colors.gray[400]};\n margin: 0;\n line-height: 1.3;\n `,\n select: css`\n appearance: none;\n width: 100%;\n padding: 0.75rem 3rem 0.75rem 0.75rem;\n border-radius: 0.5rem;\n background-color: ${colors.darkGray[800]};\n color: ${colors.gray[100]};\n border: 1px solid ${colors.gray[700]};\n font-size: 0.875rem;\n transition: all 0.2s ease;\n cursor: pointer;\n\n /* Custom arrow */\n background-image: url(\"data:image/svg+xml;utf8,<svg fill='%236b7280' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>\");\n background-repeat: no-repeat;\n background-position: right 0.75rem center;\n background-size: 1.25rem;\n\n &:hover {\n border-color: ${colors.gray[600]};\n }\n\n &:focus {\n outline: none;\n border-color: ${colors.purple[400]};\n box-shadow: 0 0 0 3px ${colors.purple[400]}${alpha[20]};\n }\n `,\n inputWrapper: css`\n width: 100%;\n max-width: 300px;\n display: flex;\n flex-direction: column;\n gap: 0.375rem;\n `,\n inputContainer: css`\n width: 100%;\n `,\n inputLabel: css`\n font-size: 0.875rem;\n font-weight: 500;\n color: ${colors.gray[100]};\n `,\n inputDescription: css`\n font-size: 0.8rem;\n color: ${colors.gray[400]};\n margin: 0;\n line-height: 1.3;\n `,\n input: css`\n appearance: none;\n width: 100%;\n padding: 0.75rem;\n border-radius: 0.5rem;\n background-color: ${colors.darkGray[800]};\n color: ${colors.gray[100]};\n border: 1px solid ${colors.gray[700]};\n font-size: 0.875rem;\n font-family: ${fontFamily.mono};\n transition: all 0.2s ease;\n\n &::placeholder {\n color: ${colors.gray[500]};\n }\n\n &:hover {\n border-color: ${colors.gray[600]};\n }\n\n &:focus {\n outline: none;\n border-color: ${colors.purple[400]};\n box-shadow: 0 0 0 3px ${colors.purple[400]}${alpha[20]};\n }\n `,\n checkboxWrapper: css`\n display: flex;\n align-items: flex-start;\n gap: 0.75rem;\n cursor: pointer;\n user-select: none;\n padding: 0.5rem;\n border-radius: 0.5rem;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${colors.darkGray[800]};\n }\n `,\n checkboxContainer: css`\n width: 100%;\n `,\n checkboxLabelContainer: css`\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n flex: 1;\n `,\n checkbox: css`\n appearance: none;\n width: 1.25rem;\n height: 1.25rem;\n border: 2px solid ${colors.gray[700]};\n border-radius: 0.375rem;\n background-color: ${colors.darkGray[800]};\n display: grid;\n place-items: center;\n transition: all 0.2s ease;\n flex-shrink: 0;\n margin-top: 0.125rem;\n\n &:hover {\n border-color: ${colors.purple[400]};\n }\n\n &:checked {\n background-color: ${colors.purple[500]};\n border-color: ${colors.purple[500]};\n }\n\n &:checked::after {\n content: '';\n width: 0.4rem;\n height: 0.6rem;\n border: solid white;\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n margin-top: -3px;\n }\n `,\n checkboxLabel: css`\n color: ${colors.gray[100]};\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.4;\n `,\n checkboxDescription: css`\n color: ${colors.gray[400]};\n font-size: 0.8rem;\n line-height: 1.3;\n `,\n settingsContainer: css`\n padding: 1.5rem;\n height: 100%;\n overflow-y: auto;\n background-color: ${colors.darkGray[700]};\n `,\n settingsSection: css`\n margin-bottom: 2rem;\n padding: 1.5rem;\n background-color: ${colors.darkGray[800]};\n border: 1px solid ${colors.gray[700]};\n border-radius: 0.75rem;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n `,\n sectionTitle: css`\n font-size: 1.125rem;\n font-weight: 600;\n color: ${colors.gray[100]};\n margin: 0 0 1rem 0;\n padding-bottom: 0.5rem;\n border-bottom: 1px solid ${colors.gray[700]};\n display: flex;\n align-items: center;\n gap: 0.5rem;\n `,\n sectionIcon: css`\n color: ${colors.purple[400]};\n `,\n sectionDescription: css`\n color: ${colors.gray[400]};\n font-size: 0.875rem;\n margin: 0 0 1.5rem 0;\n line-height: 1.5;\n `,\n settingsGroup: css`\n display: flex;\n flex-direction: column;\n gap: 1rem;\n `,\n conditionalSetting: css`\n margin-left: 1.5rem;\n padding-left: 1rem;\n border-left: 2px solid ${colors.purple[400]};\n background-color: ${colors.darkGray[800]};\n padding: 1rem;\n border-radius: 0.5rem;\n margin-top: 0.5rem;\n `,\n settingRow: css`\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 1rem;\n\n @media (max-width: 768px) {\n grid-template-columns: 1fr;\n }\n `,\n }\n}\n\nexport function useStyles() {\n const [_styles] = createSignal(stylesFactory())\n return _styles\n}\n"],"names":["tokens","goober","createSignal"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM,gBAAgB,MAAM;AAC1B,QAAM,EAAE,QAAQ,MAAM,MAAM,OAAO,WAAWA,OAAAA;AAC9C,QAAM,EAAE,YAAY,MAAM,SAAA,IAAa;AACvC,QAAM,MAAMC,kBAAO;AAEnB,SAAO;AAAA,IACL,wBAAwB,CACtB,kBACG;AAAA;AAAA;AAAA;AAAA;AAAA,QAKD,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAMS,OAAO,KAAK,GAAG,CAAC;AAAA;AAAA;AAAA,IAG1C,kCAAkC,CAAC,WAAoB;AACrD,aAAO;AAAA,sBACS,SAAS,YAAY,QAAQ;AAAA,kBACjC,SAAS,SAAS,GAAG;AAAA;AAAA,IAEnC;AAAA,IACA,gCAAgC,CAAC,eAAkC;AACjE,UAAI,cAAc;AAChB,eAAO;AAAA;AAAA;AAAA,MAGT;AAEA,aAAO;AAAA;AAAA;AAAA,IAGT;AAAA,IACA,iCAAiC,CAAC,QAAiB,WAAmB;AACpE,UAAI,QAAQ;AACV,eAAO;AAAA;AAAA;AAAA;AAAA,MAIT;AACA,aAAO;AAAA;AAAA,gCAEmB,MAAM;AAAA;AAAA,IAElC;AAAA,IACA,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAMK,KAAK,EAAE,CAAC;AAAA,gBACP,KAAK,EAAE,CAAC;AAAA,qBACH,WAAW,IAAI;AAAA,aACvBD,OAAAA,OAAO,KAAK,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOzB,eAAe;AAAA;AAAA,mBAEA,SAAS,EAAE;AAAA,qBACT,WAAW,IAAI;AAAA,0BACV,OAAO,SAAS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AAA;AAAA;AAAA;AAAA,0BAIG,OAAO,SAAS,GAAG,CAAC;AAAA;AAAA,IAE1C,iBAAiB;AAAA;AAAA;AAAA,0BAGK,OAAO,SAAS,GAAG,CAAC;AAAA,0BACpB,OAAO,KAAK,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA,IAItC,cAAc;AAAA;AAAA;AAAA,eAGH,OAAO,KAAK,GAAG,CAAC;AAAA;AAAA;AAAA,iCAGE,OAAO,KAAK,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,IAK7C,aAAa;AAAA,eACF,OAAO,OAAO,GAAG,CAAC;AAAA;AAAA,IAE7B,oBAAoB;AAAA,eACT,OAAO,KAAK,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,IAK3B,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA,IAKf,oBAAoB;AAAA;AAAA;AAAA,+BAGO,OAAO,OAAO,GAAG,CAAC;AAAA,0BACvB,OAAO,SAAS,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,IAK1C,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAUhB;AAEO,SAAS,YAAY;AAC1B,QAAM,CAAC,OAAO,IAAIE,QAAAA,aAAa,eAAe;AAC9C,SAAO;AACT;;"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TanStackDevtoolsConfig } from '../context/devtools-context.cjs';
|
|
2
2
|
import { Accessor } from 'solid-js';
|
|
3
3
|
export declare function useStyles(): Accessor<{
|
|
4
|
-
devtoolsPanelContainer: string;
|
|
4
|
+
devtoolsPanelContainer: (panelLocation: TanStackDevtoolsConfig["panelLocation"]) => string;
|
|
5
5
|
devtoolsPanelContainerVisibility: (isOpen: boolean) => string;
|
|
6
6
|
devtoolsPanelContainerResizing: (isResizing: Accessor<boolean>) => string;
|
|
7
7
|
devtoolsPanelContainerAnimation: (isOpen: boolean, height: number) => string;
|
|
8
8
|
logo: string;
|
|
9
9
|
devtoolsPanel: string;
|
|
10
|
-
dragHandle: string;
|
|
10
|
+
dragHandle: (panelLocation: TanStackDevtoolsConfig["panelLocation"]) => string;
|
|
11
11
|
mainCloseBtn: string;
|
|
12
|
-
mainCloseBtnPosition: (position:
|
|
13
|
-
mainCloseBtnAnimation: (isOpen: boolean) => string;
|
|
12
|
+
mainCloseBtnPosition: (position: TanStackDevtoolsConfig["position"]) => string;
|
|
13
|
+
mainCloseBtnAnimation: (isOpen: boolean, hideUntilHover: boolean) => string;
|
|
14
14
|
tabContainer: string;
|
|
15
15
|
tab: string;
|
|
16
16
|
tabContent: string;
|
|
@@ -18,4 +18,28 @@ export declare function useStyles(): Accessor<{
|
|
|
18
18
|
pluginsTabSidebar: string;
|
|
19
19
|
pluginName: string;
|
|
20
20
|
pluginsTabContent: string;
|
|
21
|
+
selectWrapper: string;
|
|
22
|
+
selectContainer: string;
|
|
23
|
+
selectLabel: string;
|
|
24
|
+
selectDescription: string;
|
|
25
|
+
select: string;
|
|
26
|
+
inputWrapper: string;
|
|
27
|
+
inputContainer: string;
|
|
28
|
+
inputLabel: string;
|
|
29
|
+
inputDescription: string;
|
|
30
|
+
input: string;
|
|
31
|
+
checkboxWrapper: string;
|
|
32
|
+
checkboxContainer: string;
|
|
33
|
+
checkboxLabelContainer: string;
|
|
34
|
+
checkbox: string;
|
|
35
|
+
checkboxLabel: string;
|
|
36
|
+
checkboxDescription: string;
|
|
37
|
+
settingsContainer: string;
|
|
38
|
+
settingsSection: string;
|
|
39
|
+
sectionTitle: string;
|
|
40
|
+
sectionIcon: string;
|
|
41
|
+
sectionDescription: string;
|
|
42
|
+
settingsGroup: string;
|
|
43
|
+
conditionalSetting: string;
|
|
44
|
+
settingRow: string;
|
|
21
45
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/tabs/index.tsx"],"sourcesContent":["import { SettingsTab } from './settings-tab'\nimport { PluginsTab } from './plugins-tab'\n\nexport const tabs = [\n {\n name: 'Plugins',\n id: 'plugins',\n component: () => <PluginsTab />,\n icon: (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M8 6h10\" />\n <path d=\"M6 12h9\" />\n <path d=\"M11 18h7\" />\n </svg>\n ),\n },\n {\n name: 'Settings',\n id: 'settings',\n component: () => <SettingsTab />,\n icon: (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z\" />\n <path d=\"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z\" />\n <path d=\"M12 2v2\" />\n <path d=\"M12 22v-2\" />\n <path d=\"m17 20.66-1-1.73\" />\n <path d=\"M11 10.27 7 3.34\" />\n <path d=\"m20.66 17-1.73-1\" />\n <path d=\"m3.34 7 1.73 1\" />\n <path d=\"M14 12h8\" />\n <path d=\"M2 12h2\" />\n <path d=\"m20.66 7-1.73 1\" />\n <path d=\"m3.34 17 1.73-1\" />\n <path d=\"m17 3.34-1 1.73\" />\n <path d=\"m11 13.73-4 6.93\" />\n </svg>\n ),\n },\n] as const\n\nexport type TabName = (typeof tabs)[number]['id']\n"],"names":["tabs","name","id","component","_$createComponent","PluginsTab","icon","_tmpl$","SettingsTab","_tmpl$2"],"mappings":";;;;;;AAGO,MAAMA,OAAO,CAClB;AAAA,EACEC,MAAM;AAAA,EACNC,IAAI;AAAA,EACJC,WAAWA,MAAAC,IAAAA,gBAAOC,WAAAA,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/tabs/index.tsx"],"sourcesContent":["import { SettingsTab } from './settings-tab'\nimport { PluginsTab } from './plugins-tab'\n\nexport const tabs = [\n {\n name: 'Plugins',\n id: 'plugins',\n component: () => <PluginsTab />,\n icon: (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M8 6h10\" />\n <path d=\"M6 12h9\" />\n <path d=\"M11 18h7\" />\n </svg>\n ),\n },\n {\n name: 'Settings',\n id: 'settings',\n component: () => <SettingsTab />,\n icon: (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z\" />\n <path d=\"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z\" />\n <path d=\"M12 2v2\" />\n <path d=\"M12 22v-2\" />\n <path d=\"m17 20.66-1-1.73\" />\n <path d=\"M11 10.27 7 3.34\" />\n <path d=\"m20.66 17-1.73-1\" />\n <path d=\"m3.34 7 1.73 1\" />\n <path d=\"M14 12h8\" />\n <path d=\"M2 12h2\" />\n <path d=\"m20.66 7-1.73 1\" />\n <path d=\"m3.34 17 1.73-1\" />\n <path d=\"m17 3.34-1 1.73\" />\n <path d=\"m11 13.73-4 6.93\" />\n </svg>\n ),\n },\n] as const\n\nexport type TabName = (typeof tabs)[number]['id']\n"],"names":["tabs","name","id","component","_$createComponent","PluginsTab","icon","_tmpl$","SettingsTab","_tmpl$2"],"mappings":";;;;;;AAGO,MAAMA,OAAO,CAClB;AAAA,EACEC,MAAM;AAAA,EACNC,IAAI;AAAA,EACJC,WAAWA,MAAAC,IAAAA,gBAAOC,WAAAA,YAAU,EAAA;AAAA,EAC5BC,MAAIC,OAAAA;AAiBN,GACA;AAAA,EACEN,MAAM;AAAA,EACNC,IAAI;AAAA,EACJC,WAAWA,MAAAC,IAAAA,gBAAOI,YAAAA,aAAW,EAAA;AAAA,EAC7BF,MAAIG,QAAAA;AA4BN,CAAC;;"}
|
|
@@ -5,6 +5,7 @@ const solidJs = require("solid-js");
|
|
|
5
5
|
const clsx = require("clsx");
|
|
6
6
|
const useDevtoolsContext = require("../context/use-devtools-context.cjs");
|
|
7
7
|
const useStyles = require("../styles/use-styles.cjs");
|
|
8
|
+
const constants = require("../constants.cjs");
|
|
8
9
|
var _tmpl$ = /* @__PURE__ */ web.template(`<div><div></div><div>`), _tmpl$2 = /* @__PURE__ */ web.template(`<div><h3>`);
|
|
9
10
|
const PluginsTab = () => {
|
|
10
11
|
const {
|
|
@@ -14,11 +15,7 @@ const PluginsTab = () => {
|
|
|
14
15
|
} = useDevtoolsContext.usePlugins();
|
|
15
16
|
let activePluginRef;
|
|
16
17
|
solidJs.createEffect(() => {
|
|
17
|
-
|
|
18
|
-
const currentActivePlugin = (_a = plugins()) == null ? void 0 : _a.find((plugin) => {
|
|
19
|
-
var _a2;
|
|
20
|
-
return plugin.id === ((_a2 = activePlugin()) == null ? void 0 : _a2.id);
|
|
21
|
-
});
|
|
18
|
+
const currentActivePlugin = plugins()?.find((plugin) => plugin.id === activePlugin());
|
|
22
19
|
if (activePluginRef && currentActivePlugin) {
|
|
23
20
|
currentActivePlugin.render(activePluginRef);
|
|
24
21
|
}
|
|
@@ -39,21 +36,20 @@ const PluginsTab = () => {
|
|
|
39
36
|
});
|
|
40
37
|
return (() => {
|
|
41
38
|
var _el$4 = _tmpl$2(), _el$5 = _el$4.firstChild;
|
|
42
|
-
_el$4.$$click = () => setActivePlugin(plugin);
|
|
39
|
+
_el$4.$$click = () => setActivePlugin(plugin.id);
|
|
43
40
|
var _ref$2 = pluginHeading;
|
|
44
41
|
typeof _ref$2 === "function" ? web.use(_ref$2, _el$5) : pluginHeading = _el$5;
|
|
45
|
-
web.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}));
|
|
50
|
-
});
|
|
42
|
+
web.setAttribute(_el$5, "id", constants.PLUGIN_TITLE_CONTAINER_ID);
|
|
43
|
+
web.effect(() => web.className(_el$4, clsx(styles().pluginName, {
|
|
44
|
+
active: activePlugin() === plugin.id
|
|
45
|
+
})));
|
|
51
46
|
return _el$4;
|
|
52
47
|
})();
|
|
53
48
|
}
|
|
54
49
|
}));
|
|
55
50
|
var _ref$ = activePluginRef;
|
|
56
51
|
typeof _ref$ === "function" ? web.use(_ref$, _el$3) : activePluginRef = _el$3;
|
|
52
|
+
web.setAttribute(_el$3, "id", constants.PLUGIN_CONTAINER_ID);
|
|
57
53
|
web.effect((_p$) => {
|
|
58
54
|
var _v$ = styles().pluginsTabPanel, _v$2 = styles().pluginsTabSidebar, _v$3 = styles().pluginsTabContent;
|
|
59
55
|
_v$ !== _p$.e && web.className(_el$, _p$.e = _v$);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins-tab.cjs","sources":["../../../src/tabs/plugins-tab.tsx"],"sourcesContent":["import { For, createEffect } from 'solid-js'\nimport clsx from 'clsx'\nimport { usePlugins } from '../context/use-devtools-context'\nimport { useStyles } from '../styles/use-styles'\n\nexport const PluginsTab = () => {\n const { plugins, activePlugin, setActivePlugin } = usePlugins()\n let activePluginRef: HTMLDivElement | undefined\n createEffect(() => {\n const currentActivePlugin = plugins()?.find(\n (plugin) => plugin.id === activePlugin()
|
|
1
|
+
{"version":3,"file":"plugins-tab.cjs","sources":["../../../src/tabs/plugins-tab.tsx"],"sourcesContent":["import { For, createEffect } from 'solid-js'\nimport clsx from 'clsx'\nimport { usePlugins } from '../context/use-devtools-context'\nimport { useStyles } from '../styles/use-styles'\nimport { PLUGIN_CONTAINER_ID, PLUGIN_TITLE_CONTAINER_ID } from '../constants'\n\nexport const PluginsTab = () => {\n const { plugins, activePlugin, setActivePlugin } = usePlugins()\n let activePluginRef: HTMLDivElement | undefined\n\n createEffect(() => {\n const currentActivePlugin = plugins()?.find(\n (plugin) => plugin.id === activePlugin(),\n )\n if (activePluginRef && currentActivePlugin) {\n currentActivePlugin.render(activePluginRef)\n }\n })\n const styles = useStyles()\n return (\n <div class={styles().pluginsTabPanel}>\n <div class={styles().pluginsTabSidebar}>\n <For each={plugins()}>\n {(plugin) => {\n let pluginHeading: HTMLHeadingElement | undefined\n createEffect(() => {\n if (pluginHeading) {\n typeof plugin.name === 'string'\n ? (pluginHeading.textContent = plugin.name)\n : plugin.name(pluginHeading)\n }\n })\n return (\n <div\n onClick={() => setActivePlugin(plugin.id!)}\n class={clsx(styles().pluginName, {\n active: activePlugin() === plugin.id,\n })}\n >\n <h3 id={PLUGIN_TITLE_CONTAINER_ID} ref={pluginHeading} />\n </div>\n )\n }}\n </For>\n </div>\n <div\n id={PLUGIN_CONTAINER_ID}\n ref={activePluginRef}\n class={styles().pluginsTabContent}\n ></div>\n </div>\n )\n}\n"],"names":["PluginsTab","plugins","activePlugin","setActivePlugin","usePlugins","activePluginRef","createEffect","currentActivePlugin","find","plugin","id","render","styles","useStyles","_el$","_tmpl$","_el$2","firstChild","_el$3","nextSibling","_$insert","_$createComponent","For","each","children","pluginHeading","name","textContent","_el$4","_tmpl$2","_el$5","$$click","_ref$2","_$use","_$setAttribute","PLUGIN_TITLE_CONTAINER_ID","_$effect","_$className","clsx","pluginName","active","_ref$","PLUGIN_CONTAINER_ID","_p$","_v$","pluginsTabPanel","_v$2","pluginsTabSidebar","_v$3","pluginsTabContent","e","t","a","undefined","_$delegateEvents"],"mappings":";;;;;;;;;AAMO,MAAMA,aAAaA,MAAM;AAC9B,QAAM;AAAA,IAAEC;AAAAA,IAASC;AAAAA,IAAcC;AAAAA,EAAAA,IAAoBC,8BAAAA;AACnD,MAAIC;AAEJC,UAAAA,aAAa,MAAM;AACjB,UAAMC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