@texturehq/edges 1.6.2 → 1.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.
@@ -8,6 +8,63 @@ import { ViewState, MapRef } from 'react-map-gl';
8
8
  import * as d3_scale from 'd3-scale';
9
9
  import { ScaleTime, ScaleLinear } from 'd3-scale';
10
10
 
11
+ type YFormatType = "number" | "percent" | "kWh" | "kW" | "amperes" | "temperature" | "percentageChange" | "decimal" | "currency" | "scientific" | "integer" | "logarithmic" | "timeDuration" | "compact" | "si" | "bytes" | "rate" | "ordinal" | "date" | "largeCurrency" | "coordinates" | "ranked";
12
+ interface TooltipData {
13
+ xValue: Date;
14
+ series: TooltipSeries[];
15
+ x: number;
16
+ y: number;
17
+ position: "left" | "right";
18
+ }
19
+ interface TooltipSeries {
20
+ label: string;
21
+ value: number;
22
+ color: string;
23
+ type?: "area" | "line" | "bar";
24
+ }
25
+ interface ChartContextType {
26
+ xScale: ScaleTime<number, number>;
27
+ yScale: ScaleLinear<number, number>;
28
+ width: number;
29
+ height: number;
30
+ yFormatType: YFormatType;
31
+ animationSettings: {
32
+ duration: number;
33
+ ease: string;
34
+ };
35
+ tooltip: {
36
+ data: TooltipData | null;
37
+ show: (data: TooltipData) => void;
38
+ hide: () => void;
39
+ };
40
+ }
41
+ declare const ChartContext: React$1.Context<ChartContextType | null>;
42
+
43
+ declare const useChartContext: () => ChartContextType;
44
+
45
+ interface BaseDataPoint {
46
+ xValue: Date;
47
+ yValue: number;
48
+ category?: string;
49
+ }
50
+ interface ChartMargin {
51
+ top: number;
52
+ right: number;
53
+ bottom: number;
54
+ left: number;
55
+ }
56
+ declare const defaultMargin: ChartMargin;
57
+ interface YFormatSettings {
58
+ format: (value: number) => string;
59
+ min?: number;
60
+ max?: number;
61
+ tickInterval?: number;
62
+ tickFormat?: (value: number) => string;
63
+ }
64
+ declare function getYFormatSettings(formatType: YFormatType, currencySymbol?: string): YFormatSettings;
65
+ declare const createXScale: (data: BaseDataPoint[], width: number) => d3_scale.ScaleTime<number, number, never>;
66
+ declare const createYScale: (data: BaseDataPoint[], height: number, formatType: YFormatType) => d3_scale.ScaleLinear<number, number, never>;
67
+
11
68
  type PhosphorIconName = keyof typeof PhosphorIcons;
12
69
  type IconName = PhosphorIconName;
13
70
  declare const sizePresets: {
@@ -345,10 +402,10 @@ declare namespace Card {
345
402
  var Content: typeof CardContent;
346
403
  var Footer: typeof CardFooter;
347
404
  }
348
- declare function CardHeader({ title, subtitle, actions, className, isLoading, }: CardHeaderProps): react_jsx_runtime.JSX.Element | null;
349
- declare function CardMedia({ src, alt, aspectRatio, className, children, isLoading, }: CardMediaProps): react_jsx_runtime.JSX.Element | null;
405
+ declare function CardHeader({ title, subtitle, actions, className, isLoading }: CardHeaderProps): react_jsx_runtime.JSX.Element | null;
406
+ declare function CardMedia({ src, alt, aspectRatio, className, children, isLoading }: CardMediaProps): react_jsx_runtime.JSX.Element | null;
350
407
  declare function CardContent({ className, children, isLoading }: CardContentProps): react_jsx_runtime.JSX.Element | null;
351
- declare function CardFooter({ className, children, align, isLoading, }: CardFooterProps): react_jsx_runtime.JSX.Element | null;
408
+ declare function CardFooter({ className, children, align, isLoading }: CardFooterProps): react_jsx_runtime.JSX.Element | null;
352
409
 
353
410
  type CodeLanguage = "json" | "javascript" | "typescript" | "html" | "css" | "markdown" | "yaml" | "xml" | "python" | "sql";
354
411
  type CodeTheme = "github" | "github_dark";
@@ -432,63 +489,6 @@ interface CodeEditorProps {
432
489
  */
433
490
  declare function CodeEditor({ value, readOnly, onChange, language, theme, height, width, className, lineHeight, minLines, maxLines, showLineNumbers, showGutter, fontSize, wrapEnabled, }: CodeEditorProps): react_jsx_runtime.JSX.Element;
434
491
 
435
- type YFormatType = "number" | "percent" | "kWh" | "kW" | "amperes" | "temperature" | "percentageChange" | "decimal" | "currency" | "scientific" | "integer" | "logarithmic" | "timeDuration" | "compact" | "si" | "bytes" | "rate" | "ordinal" | "date" | "largeCurrency" | "coordinates" | "ranked";
436
- interface TooltipData {
437
- xValue: Date;
438
- series: TooltipSeries[];
439
- x: number;
440
- y: number;
441
- position: "left" | "right";
442
- }
443
- interface TooltipSeries {
444
- label: string;
445
- value: number;
446
- color: string;
447
- type?: "area" | "line" | "bar";
448
- }
449
- interface ChartContextType {
450
- xScale: ScaleTime<number, number>;
451
- yScale: ScaleLinear<number, number>;
452
- width: number;
453
- height: number;
454
- yFormatType: YFormatType;
455
- animationSettings: {
456
- duration: number;
457
- ease: string;
458
- };
459
- tooltip: {
460
- data: TooltipData | null;
461
- show: (data: TooltipData) => void;
462
- hide: () => void;
463
- };
464
- }
465
- declare const ChartContext: React$1.Context<ChartContextType | null>;
466
-
467
- declare const useChartContext: () => ChartContextType;
468
-
469
- interface BaseDataPoint {
470
- xValue: Date;
471
- yValue: number;
472
- category?: string;
473
- }
474
- interface ChartMargin {
475
- top: number;
476
- right: number;
477
- bottom: number;
478
- left: number;
479
- }
480
- declare const defaultMargin: ChartMargin;
481
- interface YFormatSettings {
482
- format: (value: number) => string;
483
- min?: number;
484
- max?: number;
485
- tickInterval?: number;
486
- tickFormat?: (value: number) => string;
487
- }
488
- declare function getYFormatSettings(formatType: YFormatType, currencySymbol?: string): YFormatSettings;
489
- declare const createXScale: (data: BaseDataPoint[], width: number) => d3_scale.ScaleTime<number, number, never>;
490
- declare const createYScale: (data: BaseDataPoint[], height: number, formatType: YFormatType) => d3_scale.ScaleLinear<number, number, never>;
491
-
492
492
  /**
493
493
  * DateField
494
494
  *
@@ -589,7 +589,7 @@ interface HeadingProps {
589
589
  className?: string;
590
590
  children?: React__default.ReactNode;
591
591
  }
592
- declare function Heading({ tag: Tag, size, height, className, children, }: HeadingProps): react_jsx_runtime.JSX.Element;
592
+ declare function Heading({ tag: Tag, size, height, className, children }: HeadingProps): react_jsx_runtime.JSX.Element;
593
593
 
594
594
  interface LoaderProps {
595
595
  /**
@@ -8,6 +8,63 @@ import { ViewState, MapRef } from 'react-map-gl';
8
8
  import * as d3_scale from 'd3-scale';
9
9
  import { ScaleTime, ScaleLinear } from 'd3-scale';
10
10
 
11
+ type YFormatType = "number" | "percent" | "kWh" | "kW" | "amperes" | "temperature" | "percentageChange" | "decimal" | "currency" | "scientific" | "integer" | "logarithmic" | "timeDuration" | "compact" | "si" | "bytes" | "rate" | "ordinal" | "date" | "largeCurrency" | "coordinates" | "ranked";
12
+ interface TooltipData {
13
+ xValue: Date;
14
+ series: TooltipSeries[];
15
+ x: number;
16
+ y: number;
17
+ position: "left" | "right";
18
+ }
19
+ interface TooltipSeries {
20
+ label: string;
21
+ value: number;
22
+ color: string;
23
+ type?: "area" | "line" | "bar";
24
+ }
25
+ interface ChartContextType {
26
+ xScale: ScaleTime<number, number>;
27
+ yScale: ScaleLinear<number, number>;
28
+ width: number;
29
+ height: number;
30
+ yFormatType: YFormatType;
31
+ animationSettings: {
32
+ duration: number;
33
+ ease: string;
34
+ };
35
+ tooltip: {
36
+ data: TooltipData | null;
37
+ show: (data: TooltipData) => void;
38
+ hide: () => void;
39
+ };
40
+ }
41
+ declare const ChartContext: React$1.Context<ChartContextType | null>;
42
+
43
+ declare const useChartContext: () => ChartContextType;
44
+
45
+ interface BaseDataPoint {
46
+ xValue: Date;
47
+ yValue: number;
48
+ category?: string;
49
+ }
50
+ interface ChartMargin {
51
+ top: number;
52
+ right: number;
53
+ bottom: number;
54
+ left: number;
55
+ }
56
+ declare const defaultMargin: ChartMargin;
57
+ interface YFormatSettings {
58
+ format: (value: number) => string;
59
+ min?: number;
60
+ max?: number;
61
+ tickInterval?: number;
62
+ tickFormat?: (value: number) => string;
63
+ }
64
+ declare function getYFormatSettings(formatType: YFormatType, currencySymbol?: string): YFormatSettings;
65
+ declare const createXScale: (data: BaseDataPoint[], width: number) => d3_scale.ScaleTime<number, number, never>;
66
+ declare const createYScale: (data: BaseDataPoint[], height: number, formatType: YFormatType) => d3_scale.ScaleLinear<number, number, never>;
67
+
11
68
  type PhosphorIconName = keyof typeof PhosphorIcons;
12
69
  type IconName = PhosphorIconName;
13
70
  declare const sizePresets: {
@@ -345,10 +402,10 @@ declare namespace Card {
345
402
  var Content: typeof CardContent;
346
403
  var Footer: typeof CardFooter;
347
404
  }
348
- declare function CardHeader({ title, subtitle, actions, className, isLoading, }: CardHeaderProps): react_jsx_runtime.JSX.Element | null;
349
- declare function CardMedia({ src, alt, aspectRatio, className, children, isLoading, }: CardMediaProps): react_jsx_runtime.JSX.Element | null;
405
+ declare function CardHeader({ title, subtitle, actions, className, isLoading }: CardHeaderProps): react_jsx_runtime.JSX.Element | null;
406
+ declare function CardMedia({ src, alt, aspectRatio, className, children, isLoading }: CardMediaProps): react_jsx_runtime.JSX.Element | null;
350
407
  declare function CardContent({ className, children, isLoading }: CardContentProps): react_jsx_runtime.JSX.Element | null;
351
- declare function CardFooter({ className, children, align, isLoading, }: CardFooterProps): react_jsx_runtime.JSX.Element | null;
408
+ declare function CardFooter({ className, children, align, isLoading }: CardFooterProps): react_jsx_runtime.JSX.Element | null;
352
409
 
353
410
  type CodeLanguage = "json" | "javascript" | "typescript" | "html" | "css" | "markdown" | "yaml" | "xml" | "python" | "sql";
354
411
  type CodeTheme = "github" | "github_dark";
@@ -432,63 +489,6 @@ interface CodeEditorProps {
432
489
  */
433
490
  declare function CodeEditor({ value, readOnly, onChange, language, theme, height, width, className, lineHeight, minLines, maxLines, showLineNumbers, showGutter, fontSize, wrapEnabled, }: CodeEditorProps): react_jsx_runtime.JSX.Element;
434
491
 
435
- type YFormatType = "number" | "percent" | "kWh" | "kW" | "amperes" | "temperature" | "percentageChange" | "decimal" | "currency" | "scientific" | "integer" | "logarithmic" | "timeDuration" | "compact" | "si" | "bytes" | "rate" | "ordinal" | "date" | "largeCurrency" | "coordinates" | "ranked";
436
- interface TooltipData {
437
- xValue: Date;
438
- series: TooltipSeries[];
439
- x: number;
440
- y: number;
441
- position: "left" | "right";
442
- }
443
- interface TooltipSeries {
444
- label: string;
445
- value: number;
446
- color: string;
447
- type?: "area" | "line" | "bar";
448
- }
449
- interface ChartContextType {
450
- xScale: ScaleTime<number, number>;
451
- yScale: ScaleLinear<number, number>;
452
- width: number;
453
- height: number;
454
- yFormatType: YFormatType;
455
- animationSettings: {
456
- duration: number;
457
- ease: string;
458
- };
459
- tooltip: {
460
- data: TooltipData | null;
461
- show: (data: TooltipData) => void;
462
- hide: () => void;
463
- };
464
- }
465
- declare const ChartContext: React$1.Context<ChartContextType | null>;
466
-
467
- declare const useChartContext: () => ChartContextType;
468
-
469
- interface BaseDataPoint {
470
- xValue: Date;
471
- yValue: number;
472
- category?: string;
473
- }
474
- interface ChartMargin {
475
- top: number;
476
- right: number;
477
- bottom: number;
478
- left: number;
479
- }
480
- declare const defaultMargin: ChartMargin;
481
- interface YFormatSettings {
482
- format: (value: number) => string;
483
- min?: number;
484
- max?: number;
485
- tickInterval?: number;
486
- tickFormat?: (value: number) => string;
487
- }
488
- declare function getYFormatSettings(formatType: YFormatType, currencySymbol?: string): YFormatSettings;
489
- declare const createXScale: (data: BaseDataPoint[], width: number) => d3_scale.ScaleTime<number, number, never>;
490
- declare const createYScale: (data: BaseDataPoint[], height: number, formatType: YFormatType) => d3_scale.ScaleLinear<number, number, never>;
491
-
492
492
  /**
493
493
  * DateField
494
494
  *
@@ -589,7 +589,7 @@ interface HeadingProps {
589
589
  className?: string;
590
590
  children?: React__default.ReactNode;
591
591
  }
592
- declare function Heading({ tag: Tag, size, height, className, children, }: HeadingProps): react_jsx_runtime.JSX.Element;
592
+ declare function Heading({ tag: Tag, size, height, className, children }: HeadingProps): react_jsx_runtime.JSX.Element;
593
593
 
594
594
  interface LoaderProps {
595
595
  /**