@tanstack/router-devtools 0.0.1-beta.284 → 0.0.1-beta.286

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.
@@ -1,15 +1,15 @@
1
1
  import React from 'react';
2
2
  export declare const defaultTheme: {
3
- readonly background: "#0b1521";
4
- readonly backgroundAlt: "#132337";
3
+ readonly background: "#222222";
4
+ readonly backgroundAlt: "#292929";
5
5
  readonly foreground: "white";
6
- readonly gray: "#3f4e60";
7
- readonly grayAlt: "#222e3e";
6
+ readonly gray: "#444";
7
+ readonly grayAlt: "#444";
8
8
  readonly inputBackgroundColor: "#fff";
9
9
  readonly inputTextColor: "#000";
10
- readonly success: "#00ab52";
10
+ readonly success: "#80cb00";
11
11
  readonly danger: "#ff0085";
12
- readonly active: "#006bff";
12
+ readonly active: "#0099ff";
13
13
  readonly warning: "#ffb200";
14
14
  };
15
15
  export type Theme = typeof defaultTheme;
@@ -19,16 +19,16 @@ interface ProviderProps {
19
19
  }
20
20
  export declare function ThemeProvider({ theme, ...rest }: ProviderProps): React.JSX.Element;
21
21
  export declare function useTheme(): {
22
- readonly background: "#0b1521";
23
- readonly backgroundAlt: "#132337";
22
+ readonly background: "#222222";
23
+ readonly backgroundAlt: "#292929";
24
24
  readonly foreground: "white";
25
- readonly gray: "#3f4e60";
26
- readonly grayAlt: "#222e3e";
25
+ readonly gray: "#444";
26
+ readonly grayAlt: "#444";
27
27
  readonly inputBackgroundColor: "#fff";
28
28
  readonly inputTextColor: "#000";
29
- readonly success: "#00ab52";
29
+ readonly success: "#80cb00";
30
30
  readonly danger: "#ff0085";
31
- readonly active: "#006bff";
31
+ readonly active: "#0099ff";
32
32
  readonly warning: "#ffb200";
33
33
  };
34
34
  export {};
@@ -3,8 +3,8 @@ import { AnyRootRoute, AnyRoute, AnyRouteMatch } from '@tanstack/react-router';
3
3
  import { Theme } from './theme';
4
4
  export declare const isServer: boolean;
5
5
  type StyledComponent<T> = T extends 'button' ? React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> : T extends 'input' ? React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> : T extends 'select' ? React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement> : T extends keyof HTMLElementTagNameMap ? React.HTMLAttributes<HTMLElementTagNameMap[T]> : never;
6
- export declare function getStatusColor(match: AnyRouteMatch, theme: Theme): "#3f4e60" | "#00ab52" | "#ff0085" | "#006bff";
7
- export declare function getRouteStatusColor(matches: AnyRouteMatch[], route: AnyRoute | AnyRootRoute, theme: Theme): "#3f4e60" | "#00ab52" | "#ff0085" | "#006bff";
6
+ export declare function getStatusColor(match: AnyRouteMatch, theme: Theme): "#444" | "#80cb00" | "#ff0085" | "#0099ff";
7
+ export declare function getRouteStatusColor(matches: AnyRouteMatch[], route: AnyRoute | AnyRootRoute, theme: Theme): "#444" | "#80cb00" | "#ff0085" | "#0099ff";
8
8
  type Styles = React.CSSProperties | ((props: Record<string, any>, theme: Theme) => React.CSSProperties);
9
9
  export declare function styled<T extends keyof HTMLElementTagNameMap>(type: T, newStyles: Styles, queries?: Record<string, Styles>): React.ForwardRefExoticComponent<React.PropsWithoutRef<StyledComponent<T>> & React.RefAttributes<HTMLElementTagNameMap[T]>>;
10
10
  export declare function useIsMounted(): () => boolean;
@@ -310,6 +310,15 @@
310
310
  }
311
311
  return updater;
312
312
  }
313
+ function trimPathLeft(path) {
314
+ return path === '/' ? path : path.replace(/^\/{1,}/, '');
315
+ }
316
+ function trimPathRight(path) {
317
+ return path === '/' ? path : path.replace(/\/{1,}$/, '');
318
+ }
319
+ function trimPath(path) {
320
+ return trimPathRight(trimPathLeft(path));
321
+ }
313
322
 
314
323
  let routerContext = /*#__PURE__*/React__namespace.createContext(null);
315
324
  if (typeof document !== 'undefined') {
@@ -329,15 +338,6 @@
329
338
  warning(value, 'useRouter must be used inside a <RouterProvider> component!');
330
339
  return value;
331
340
  }
332
- function trimPathLeft(path) {
333
- return path === '/' ? path : path.replace(/^\/{1,}/, '');
334
- }
335
- function trimPathRight(path) {
336
- return path === '/' ? path : path.replace(/\/{1,}$/, '');
337
- }
338
- function trimPath(path) {
339
- return trimPathRight(trimPathLeft(path));
340
- }
341
341
  const sessionsStorage = typeof window !== 'undefined' && window.sessionStorage;
342
342
  let cache = sessionsStorage ? (() => {
343
343
  const storageKey = 'tsr-scroll-restoration-v2';
@@ -391,16 +391,16 @@
391
391
  }
392
392
 
393
393
  const defaultTheme = {
394
- background: '#0b1521',
395
- backgroundAlt: '#132337',
394
+ background: '#222222',
395
+ backgroundAlt: '#292929',
396
396
  foreground: 'white',
397
- gray: '#3f4e60',
398
- grayAlt: '#222e3e',
397
+ gray: '#444',
398
+ grayAlt: '#444',
399
399
  inputBackgroundColor: '#fff',
400
400
  inputTextColor: '#000',
401
- success: '#00ab52',
401
+ success: '#80cb00',
402
402
  danger: '#ff0085',
403
- active: '#006bff',
403
+ active: '#0099ff',
404
404
  warning: '#ffb200'
405
405
  };
406
406
  const ThemeContext = /*#__PURE__*/React.createContext(defaultTheme);