@tanstack/devtools-ui 0.5.3 → 0.7.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/assets/BricolageGrotesque-Bold-BIJrwikb.ttf +0 -0
- package/dist/assets/Inter-latin-BwkfbSeq.woff2 +0 -0
- package/dist/esm/assets/fonts/BricolageGrotesque-Bold.js +6 -0
- package/dist/esm/assets/fonts/BricolageGrotesque-Bold.js.map +1 -0
- package/dist/esm/assets/fonts/Inter-latin.js +6 -0
- package/dist/esm/assets/fonts/Inter-latin.js.map +1 -0
- package/dist/esm/components/button.js +3 -3
- package/dist/esm/components/button.js.map +1 -1
- package/dist/esm/components/checkbox.js +16 -10
- package/dist/esm/components/checkbox.js.map +1 -1
- package/dist/esm/components/header.js +4 -4
- package/dist/esm/components/header.js.map +1 -1
- package/dist/esm/components/icons.d.ts +1 -1
- package/dist/esm/components/icons.js +4 -8
- package/dist/esm/components/icons.js.map +1 -1
- package/dist/esm/components/input.js +16 -9
- package/dist/esm/components/input.js.map +1 -1
- package/dist/esm/components/logo.js +3 -3
- package/dist/esm/components/logo.js.map +1 -1
- package/dist/esm/components/main-panel.js +3 -3
- package/dist/esm/components/main-panel.js.map +1 -1
- package/dist/esm/components/section.js +6 -6
- package/dist/esm/components/section.js.map +1 -1
- package/dist/esm/components/select.js +24 -13
- package/dist/esm/components/select.js.map +1 -1
- package/dist/esm/components/tag.js +3 -3
- package/dist/esm/components/tag.js.map +1 -1
- package/dist/esm/components/theme.d.ts +1 -1
- package/dist/esm/components/theme.js +15 -5
- package/dist/esm/components/theme.js.map +1 -1
- package/dist/esm/components/tree.js +114 -62
- package/dist/esm/components/tree.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/internal.d.ts +2 -0
- package/dist/esm/internal.js +2 -0
- package/dist/esm/styles/semantic-theme.d.ts +420 -0
- package/dist/esm/styles/semantic-theme.js +283 -0
- package/dist/esm/styles/semantic-theme.js.map +1 -0
- package/dist/esm/styles/use-styles.d.ts +3 -1
- package/dist/esm/styles/use-styles.js +304 -372
- package/dist/esm/styles/use-styles.js.map +1 -1
- package/package.json +15 -3
- package/src/assets/fonts/OFL-Bricolage-Grotesque.txt +93 -0
- package/src/assets/fonts/OFL-Inter.txt +92 -0
- package/src/components/button.tsx +3 -3
- package/src/components/checkbox.tsx +9 -5
- package/src/components/header.tsx +10 -4
- package/src/components/icons.tsx +5 -5
- package/src/components/input.tsx +14 -5
- package/src/components/logo.tsx +3 -2
- package/src/components/main-panel.tsx +3 -2
- package/src/components/section.tsx +15 -7
- package/src/components/select.tsx +29 -10
- package/src/components/tag.tsx +7 -3
- package/src/components/theme.tsx +18 -5
- package/src/components/tree.tsx +96 -29
- package/src/index.ts +1 -1
- package/src/internal.ts +11 -0
- package/src/styles/semantic-theme.ts +345 -0
- package/src/styles/use-styles.ts +318 -310
- package/dist/esm/styles/tokens.js +0 -301
- package/dist/esm/styles/tokens.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semantic-theme.js","names":[],"sources":["../../../src/styles/semantic-theme.ts"],"sourcesContent":["import bricolageGrotesqueUrl from '../assets/fonts/BricolageGrotesque-Bold.ttf?url&no-inline'\nimport interUrl from '../assets/fonts/Inter-latin.woff2?url&no-inline'\nimport type { TanStackDevtoolsTheme } from '../components/theme'\n\nexport const DEVTOOLS_FONT_STYLE_ID = 'tanstack-devtools-fonts'\nexport const DEVTOOLS_FORCED_COLORS_STYLE_ID = 'tanstack-devtools-forced-colors'\n\nexport const forcedColorsCss = `\n@media (forced-colors: active) {\n [data-tsd-surface] { forced-color-adjust: auto; background: Canvas; color: CanvasText; }\n [data-tsd-control] { forced-color-adjust: auto; background: ButtonFace; color: ButtonText; border-color: ButtonText; }\n [data-tsd-selected=\"true\"] { background: Highlight; color: HighlightText; border-color: HighlightText; }\n [data-tsd-separator] { border-color: CanvasText; }\n [data-tsd-separator=\"resize\"] { border: 1px solid CanvasText; }\n [data-tsd-control]:focus-visible { outline: 2px solid ButtonText; outline-offset: 2px; }\n}`\n\nexport const devtoolsFontCss = `\n@font-face {\n font-family: 'Bricolage Grotesque';\n src: url('${bricolageGrotesqueUrl}') format('truetype');\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n}\n@font-face {\n font-family: 'Inter';\n src: url('${interUrl}') format('woff2');\n font-style: normal;\n font-weight: 100 900;\n font-display: swap;\n}`\n\nexport function ensureDevtoolsFonts(targetDocument: Document): void {\n if (targetDocument.getElementById(DEVTOOLS_FONT_STYLE_ID)) return\n\n const style = targetDocument.createElement('style')\n style.id = DEVTOOLS_FONT_STYLE_ID\n style.textContent = devtoolsFontCss\n targetDocument.head.append(style)\n}\n\nexport function ensureDevtoolsStyles(targetDocument: Document): void {\n ensureDevtoolsFonts(targetDocument)\n if (targetDocument.getElementById(DEVTOOLS_FORCED_COLORS_STYLE_ID)) return\n const style = targetDocument.createElement('style')\n style.id = DEVTOOLS_FORCED_COLORS_STYLE_ID\n style.textContent = forcedColorsCss\n targetDocument.head.append(style)\n}\n\nexport type StatusRole = 'success' | 'warning' | 'error' | 'info' | 'neutral'\n\ntype DeepReadonly<T> = T extends (...args: Array<never>) => unknown\n ? T\n : T extends object\n ? { readonly [Key in keyof T]: DeepReadonly<T[Key]> }\n : T\n\nexport type SemanticTheme = DeepReadonly<{\n font: {\n display: string\n body: string\n mono: string\n }\n space: { 1: '4px'; 2: '8px'; 3: '12px'; 4: '16px' }\n gap: {\n tight: '4px'\n control: '8px'\n section: '12px'\n sectionLarge: '16px'\n }\n padding: { controlBlock: '6px'; controlInline: '8px' }\n type: {\n bodyXs: { size: '12px'; lineHeight: '17px'; weight: 400 }\n bodySm: { size: '14px'; lineHeight: '20px'; weight: 400 }\n bodyMd: { size: '16px'; lineHeight: '24px'; weight: 300 }\n labelSm: {\n size: '12px'\n lineHeight: '14px'\n weight: 500\n tracking: '0.5px'\n }\n headingCompact: { size: '14px'; lineHeight: '18px'; weight: 700 }\n headingPane: { size: '16px'; lineHeight: '21px'; weight: 700 }\n }\n radius: { control: '4px'; group: '6px'; overlay: '8px' }\n shadow: { xs: string; sm: string; overlay: string }\n motion: { strip: '120ms'; graceMs: 400 }\n color: {\n surface: {\n app: string\n workspace: string\n subtle: string\n elevated: string\n brand: string\n }\n text: {\n primary: string\n secondary: string\n muted: string\n mutedOnBrand: string\n inverse: string\n link: string\n }\n border: { decorative: string; control: string; focus: string }\n state: {\n hover: string\n pressed: string\n selectionFill: string\n selectionText: string\n }\n status: Record<\n StatusRole,\n {\n subtleFill: string\n border: string\n text: string\n solidFill: string\n onFill: string\n }\n >\n syntax: {\n keyword: string\n string: string\n number: string\n comment: string\n property: string\n punctuation: string\n selectionFill: string\n selectionText: string\n }\n }\n}>\n\nfunction deepFreeze<const TValue extends object>(value: TValue) {\n for (const nestedValue of Object.values(value)) {\n if (nestedValue !== null && typeof nestedValue === 'object') {\n deepFreeze(nestedValue)\n }\n }\n\n return Object.freeze(value)\n}\n\nconst commonTheme = {\n font: {\n display: \"'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif\",\n body: \"'Inter', ui-sans-serif, system-ui, sans-serif\",\n mono: \"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace\",\n },\n space: { 1: '4px', 2: '8px', 3: '12px', 4: '16px' },\n gap: {\n tight: '4px',\n control: '8px',\n section: '12px',\n sectionLarge: '16px',\n },\n padding: { controlBlock: '6px', controlInline: '8px' },\n type: {\n bodyXs: { size: '12px', lineHeight: '17px', weight: 400 },\n bodySm: { size: '14px', lineHeight: '20px', weight: 400 },\n bodyMd: { size: '16px', lineHeight: '24px', weight: 300 },\n labelSm: {\n size: '12px',\n lineHeight: '14px',\n weight: 500,\n tracking: '0.5px',\n },\n headingCompact: {\n size: '14px',\n lineHeight: '18px',\n weight: 700,\n },\n headingPane: { size: '16px', lineHeight: '21px', weight: 700 },\n },\n radius: { control: '4px', group: '6px', overlay: '8px' },\n shadow: {\n xs: '0 1px 2px rgba(0,0,0,0.03)',\n sm: '0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03)',\n overlay: '0 25px 50px -12px rgba(0,0,0,0.20)',\n },\n motion: { strip: '120ms', graceMs: 400 },\n} satisfies Omit<SemanticTheme, 'color'>\n\nexport const semanticThemes = deepFreeze({\n light: {\n ...commonTheme,\n color: {\n surface: {\n app: '#ffffff',\n workspace: '#ffffff',\n subtle: '#fafafa',\n elevated: '#ffffff',\n brand: '#eeebd4',\n },\n text: {\n primary: '#111111',\n secondary: '#3e3529',\n muted: '#756c5b',\n mutedOnBrand: '#3e3529',\n inverse: '#ffffff',\n link: '#003e53',\n },\n border: {\n decorative: '#eeebd4',\n control: '#756c5b',\n focus: '#003e53',\n },\n state: {\n hover: '#1111110f',\n pressed: '#1111111f',\n selectionFill: '#3e3529',\n selectionText: '#ffffff',\n },\n status: {\n success: {\n subtleFill: '#d8f0da',\n border: '#1d4226',\n text: '#1d4226',\n solidFill: '#1d4226',\n onFill: '#ffffff',\n },\n warning: {\n subtleFill: '#fef6cc',\n border: '#624a00',\n text: '#624a00',\n solidFill: '#624a00',\n onFill: '#ffffff',\n },\n error: {\n subtleFill: '#f9d8c4',\n border: '#5f1a06',\n text: '#5f1a06',\n solidFill: '#5f1a06',\n onFill: '#ffffff',\n },\n info: {\n subtleFill: '#d8f0f3',\n border: '#003e53',\n text: '#003e53',\n solidFill: '#003e53',\n onFill: '#ffffff',\n },\n neutral: {\n subtleFill: '#eeebd4',\n border: '#756c5b',\n text: '#3e3529',\n solidFill: '#3e3529',\n onFill: '#ffffff',\n },\n },\n syntax: {\n keyword: '#5f1a06',\n string: '#1d4226',\n number: '#541f5d',\n comment: '#756c5b',\n property: '#003e53',\n punctuation: '#3e3529',\n selectionFill: '#d8f0f3',\n selectionText: '#003e53',\n },\n },\n },\n dark: {\n ...commonTheme,\n color: {\n surface: {\n app: '#111111',\n workspace: '#1f1f1f',\n subtle: '#1b1b1b',\n elevated: '#2b2b2b',\n brand: '#111111',\n },\n text: {\n primary: '#ffffff',\n secondary: '#aea691',\n muted: '#aea691',\n mutedOnBrand: '#aea691',\n inverse: '#111111',\n link: '#9cd5e2',\n },\n border: { decorative: '#2d2d2d', control: '#aea691', focus: '#61adbf' },\n state: {\n hover: '#ffffff14',\n pressed: '#ffffff1f',\n selectionFill: '#c5c3bf',\n selectionText: '#111111',\n },\n status: {\n success: {\n subtleFill: '#1d4226',\n border: '#69bc75',\n text: '#a2e1a9',\n solidFill: '#69bc75',\n onFill: '#111111',\n },\n warning: {\n subtleFill: '#624a00',\n border: '#f4d648',\n text: '#fae884',\n solidFill: '#f4d648',\n onFill: '#111111',\n },\n error: {\n subtleFill: '#5f1a06',\n border: '#e06e49',\n text: '#edaa8d',\n solidFill: '#e06e49',\n onFill: '#111111',\n },\n info: {\n subtleFill: '#003e53',\n border: '#61adbf',\n text: '#9cd5e2',\n solidFill: '#61adbf',\n onFill: '#111111',\n },\n neutral: {\n subtleFill: '#2b2b2b',\n border: '#aea691',\n text: '#c5c3bf',\n solidFill: '#c5c3bf',\n onFill: '#111111',\n },\n },\n syntax: {\n keyword: '#e06e49',\n string: '#69bc75',\n number: '#c56dcf',\n comment: '#aea691',\n property: '#61adbf',\n punctuation: '#c5c3bf',\n selectionFill: '#003e53',\n selectionText: '#ffffff',\n },\n },\n },\n} as const satisfies Record<TanStackDevtoolsTheme, SemanticTheme>)\n\nexport function resolveSemanticTheme(\n theme: TanStackDevtoolsTheme,\n): SemanticTheme {\n return semanticThemes[theme]\n}\n"],"mappings":";;;AAIA,IAAa,yBAAyB;AACtC,IAAa,kCAAkC;AAE/C,IAAa,kBAAkB;;;;;;;;;AAU/B,IAAa,kBAAkB;;;cAGjB,gCAAsB;;;;;;;cAOtB,oBAAS;;;;;AAMvB,SAAgB,oBAAoB,gBAAgC;CAClE,IAAI,eAAe,eAAA,0BAAsC,EAAE;CAE3D,MAAM,QAAQ,eAAe,cA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W;KACX,QAAQ;KACT;IACD,OAAO;KACL,YAAY;KACZ,QAAQ;KACR,MAAM;KACN,WAAW;KACX,QAAQ;KACT;IACD,MAAM;KACJ,YAAY;KACZ,QAAQ;KACR,MAAM;KACN,WAAW;KACX,QAAQ;KACT;IACD,SAAS;KACP,YAAY;KACZ,QAAQ;KACR,MAAM;KACN,WAAW;KACX,QAAQ;KACT;IACF;GACD,QAAQ;IACN,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,UAAU;IACV,aAAa;IACb,eAAe;IACf,eAAe;IAChB;GACF;EACF;CACF,CAAiE;AAElE,SAAgB,qBACd,OACe;CACf,OAAO,eAAe"}
|
|
@@ -2,7 +2,7 @@ import { tokens } from './tokens.js';
|
|
|
2
2
|
import { ButtonVariant } from '../components/button.js';
|
|
3
3
|
import * as goober from 'goober';
|
|
4
4
|
export declare const css: typeof goober.css;
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function createStyles(): import('solid-js').Accessor<{
|
|
6
6
|
logo: string;
|
|
7
7
|
selectWrapper: string;
|
|
8
8
|
selectContainer: string;
|
|
@@ -33,6 +33,8 @@ export declare function useStyles(): import('solid-js').Accessor<{
|
|
|
33
33
|
tree: {
|
|
34
34
|
info: string;
|
|
35
35
|
actionButton: string;
|
|
36
|
+
actionSuccess: string;
|
|
37
|
+
actionError: string;
|
|
36
38
|
expanderContainer: string;
|
|
37
39
|
expander: string;
|
|
38
40
|
expandedLine: (hasBorder: boolean) => string;
|