@octanejs/visx 0.1.58 → 0.1.60

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/visx",
3
- "version": "0.1.58",
3
+ "version": "0.1.60",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "engines": {
@@ -81,7 +81,7 @@
81
81
  },
82
82
  "dependencies": {
83
83
  "@floating-ui/dom": "^1.8.0",
84
- "@octanejs/floating-ui": "0.1.62",
84
+ "@octanejs/floating-ui": "0.1.64",
85
85
  "@types/d3-array": "3.0.3",
86
86
  "@types/d3-chord": "^1.0.14",
87
87
  "@types/d3-color": "3.1.0",
@@ -122,12 +122,12 @@
122
122
  "svg-path-properties": "2.0.2"
123
123
  },
124
124
  "peerDependencies": {
125
- "octane": "^0.10.0"
125
+ "octane": "^0.11.0"
126
126
  },
127
127
  "devDependencies": {
128
128
  "@juggle/resize-observer": "^3.4.0",
129
129
  "@react-spring/web": "^10.1.2",
130
- "@tsrx/react": "^0.3.7",
130
+ "@tsrx/react": "^0.4.5",
131
131
  "@visx/chord": "4.0.0",
132
132
  "@visx/annotation": "4.0.0",
133
133
  "@visx/brush": "4.0.0",
@@ -141,7 +141,7 @@
141
141
  "@visx/zoom": "4.0.0",
142
142
  "@vitest/coverage-istanbul": "4.1.10",
143
143
  "esbuild": "^0.28.1",
144
- "octane": "0.10.0",
144
+ "octane": "0.11.0",
145
145
  "react": "19.2.7",
146
146
  "react-dom": "19.2.7",
147
147
  "typescript": "^5.9.3",
@@ -1,10 +1,10 @@
1
1
  // Generated by scripts/generate-tsrx-types.mjs.
2
2
  import type { SharedAxisProps, AxisScale } from '../types';
3
3
  export declare const bottomTickLabelProps: {
4
- readonly dy: "0.25em";
5
- readonly fill: "#222";
6
- readonly fontFamily: "Arial";
4
+ readonly dy: '0.25em';
5
+ readonly fill: '#222';
6
+ readonly fontFamily: 'Arial';
7
7
  readonly fontSize: 10;
8
- readonly textAnchor: "middle";
8
+ readonly textAnchor: 'middle';
9
9
  };
10
10
  export default function AxisBottom<Scale extends AxisScale>({ axisClassName, labelOffset, tickLength, tickLabelProps, ...restProps }: SharedAxisProps<Scale>): import("react").JSX.Element;
@@ -1,11 +1,11 @@
1
1
  // Generated by scripts/generate-tsrx-types.mjs.
2
2
  import type { SharedAxisProps, AxisScale } from '../types';
3
3
  export declare const leftTickLabelProps: {
4
- readonly dx: "-0.25em";
5
- readonly dy: "0.25em";
6
- readonly fill: "#222";
7
- readonly fontFamily: "Arial";
4
+ readonly dx: '-0.25em';
5
+ readonly dy: '0.25em';
6
+ readonly fill: '#222';
7
+ readonly fontFamily: 'Arial';
8
8
  readonly fontSize: 10;
9
- readonly textAnchor: "end";
9
+ readonly textAnchor: 'end';
10
10
  };
11
11
  export default function AxisLeft<Scale extends AxisScale>({ axisClassName, labelOffset, tickLength, tickLabelProps, ...restProps }: SharedAxisProps<Scale>): import("react").JSX.Element;
@@ -2,11 +2,11 @@
2
2
  import type { SharedAxisProps, AxisScale } from '../types';
3
3
  export type AxisRightProps<Scale extends AxisScale> = SharedAxisProps<Scale>;
4
4
  export declare const rightTickLabelProps: {
5
- readonly dx: "0.25em";
6
- readonly dy: "0.25em";
7
- readonly fill: "#222";
8
- readonly fontFamily: "Arial";
5
+ readonly dx: '0.25em';
6
+ readonly dy: '0.25em';
7
+ readonly fill: '#222';
8
+ readonly fontFamily: 'Arial';
9
9
  readonly fontSize: 10;
10
- readonly textAnchor: "start";
10
+ readonly textAnchor: 'start';
11
11
  };
12
12
  export default function AxisRight<Scale extends AxisScale>({ axisClassName, labelOffset, tickLength, tickLabelProps, ...restProps }: AxisRightProps<Scale>): import("react").JSX.Element;
@@ -2,10 +2,10 @@
2
2
  import type { SharedAxisProps, AxisScale } from '../types';
3
3
  export type AxisTopProps<Scale extends AxisScale> = SharedAxisProps<Scale>;
4
4
  export declare const topTickLabelProps: {
5
- readonly dy: "-0.75em";
6
- readonly fill: "#222";
7
- readonly fontFamily: "Arial";
5
+ readonly dy: '-0.75em';
6
+ readonly fill: '#222';
7
+ readonly fontFamily: 'Arial';
8
8
  readonly fontSize: 10;
9
- readonly textAnchor: "middle";
9
+ readonly textAnchor: 'middle';
10
10
  };
11
11
  export default function AxisTop<Scale extends AxisScale>({ axisClassName, labelOffset, tickLength, tickLabelProps, ...restProps }: AxisTopProps<Scale>): import("react").JSX.Element;
@@ -1,3 +1,3 @@
1
1
  // Generated by scripts/generate-tsrx-types.mjs.
2
2
  /** Return samples along a path, relative to the parent SVG */
3
- export default function useSamplesAlongPath(restrictToPath?: SVGGeometryElement | null): never[];
3
+ export default function useSamplesAlongPath(restrictToPath?: SVGGeometryElement | null): DOMPoint[];
@@ -32,7 +32,6 @@ export default function AnimatedTicks<Scale extends AxisScale>({
32
32
  });
33
33
 
34
34
  return <>
35
- {/* @ts-expect-error react-spring's type inference issue on the styles */}
36
35
  {animatedTicks(({ fromX, toX, fromY, toY, opacity }, item, { key }, index) => {
37
36
  const tickLabelProps = allTickLabelProps[index] ?? allTickLabelProps[0] ?? {};
38
37
  return item == null || key == null
@@ -29,7 +29,6 @@ export default function AnimatedGridLines<Scale extends GridScale>({
29
29
  });
30
30
 
31
31
  return <>
32
- {/* @ts-expect-error react-spring's type inference issue on the styles */}
33
32
  {animatedLines(
34
33
  ({ fromX, toX, fromY, toY, opacity }, _, { key }) =>
35
34
  <animated.line
@@ -4,11 +4,11 @@ import type { OctaneNode } from 'octane';
4
4
  import type { AddSVGProps } from '../types';
5
5
  export declare const getPoint: ({ sides, size, center, rotate, side }: {
6
6
  side: number;
7
- } & NonNullable<Pick<PolygonProps, "sides" | "size" | "center" | "rotate">>) => {
7
+ } & NonNullable<Pick<PolygonProps, 'sides' | 'size' | 'center' | 'rotate'>>) => {
8
8
  x: number;
9
9
  y: number;
10
10
  };
11
- export declare const getPoints: ({ sides, size, center, rotate }: NonNullable<Pick<PolygonProps, "sides" | "size" | "center" | "rotate">>) => {
11
+ export declare const getPoints: ({ sides, size, center, rotate }: NonNullable<Pick<PolygonProps, 'sides' | 'size' | 'center' | 'rotate'>>) => {
12
12
  x: number;
13
13
  y: number;
14
14
  }[];
@@ -20,5 +20,10 @@ export type ThemeScopeProps = AutoThemeScopeProps | EmittingThemeScopeProps;
20
20
  export default function ThemeScope({ as, children, className, style, theme, }: ThemeScopeProps): import("octane").ElementDescriptor<import("octane").FragmentProps> | import("octane").ElementDescriptor<{
21
21
  className: string | undefined;
22
22
  style: CSSVarStyle | undefined;
23
+ }> | import("octane").ElementDescriptor<{
24
+ className: string | undefined;
25
+ style: {
26
+ [x: `--${string}`]: string | number | undefined;
27
+ };
23
28
  }>;
24
29
  export {};
@@ -32,10 +32,10 @@ export type TooltipProps = {
32
32
  unstyled?: boolean;
33
33
  };
34
34
  export declare const defaultStyles: CSSProperties;
35
- declare const Tooltip: {
36
- ({ className, top, left, offsetLeft, offsetTop, style, children, unstyled, applyPositionStyle, ref, ...restProps }: TooltipProps & Omit<Octane.HTMLAttributes<HTMLDivElement>, keyof TooltipProps> & {
37
- ref?: Ref<HTMLDivElement>;
38
- }): import("react").JSX.Element;
39
- displayName: string;
40
- };
35
+ declare function Tooltip({ className, top, left, offsetLeft, offsetTop, style, children, unstyled, applyPositionStyle, ref, ...restProps }: TooltipProps & Omit<Octane.HTMLAttributes<HTMLDivElement>, keyof TooltipProps> & {
36
+ ref?: Ref<HTMLDivElement>;
37
+ }): import("react").JSX.Element;
38
+ declare namespace Tooltip {
39
+ var displayName: string;
40
+ }
41
41
  export default Tooltip;
@@ -78,7 +78,6 @@ export default function AnimatedGlyphs<XScale extends AxisScale, YScale extends
78
78
  });
79
79
 
80
80
  return <>
81
- {/** @ts-expect-error x/y aren't in react-spring's CSSProperties */}
82
81
  {animatedGlyphs(
83
82
  ({ x, y, color, opacity }, item, { key }) => <animated.g
84
83
  key={key}
@@ -20,4 +20,4 @@ eventType?: EventType,
20
20
  /** Handler invoked on emission of EventType event. */
21
21
  handler?: Handler,
22
22
  /** Optional valid sources for EventType subscription. */
23
- allowedSources?: string[]): ((type: EventType, event: HandlerParams["event"], source?: string) => void) | null;
23
+ allowedSources?: string[]): ((type: EventType, event: HandlerParams['event'], source?: string) => void) | null;