chore: use svelte and react types for AriaRole

This commit is contained in:
Abbey Yacoe
2025-06-03 14:41:25 +02:00
parent 416f533622
commit 96eba257aa
7 changed files with 28 additions and 22 deletions
+1 -7
View File
@@ -1,4 +1,4 @@
import { Position, AriaRole } from './utils';
import { Position } from './utils';
export type EdgeBase<
EdgeData extends Record<string, unknown> = Record<string, unknown>,
@@ -40,12 +40,6 @@ export type EdgeBase<
* This property sets the width of that invisible path.
*/
interactionWidth?: number;
/**
* The ARIA role attribute for the edge, used for accessibility.
* @default "group"
*/
ariaRole?: AriaRole;
/**
* A description of the edge's, used for accessibility.
* @default "edge"
-7
View File
@@ -1,6 +1,5 @@
import type { XYPosition, Position, CoordinateExtent, Handle } from '.';
import { Optional } from '../utils/types';
import { AriaRole } from './utils';
/**
* Framework independent node data structure.
@@ -74,12 +73,6 @@ export type NodeBase<
*/
origin?: NodeOrigin;
handles?: NodeHandle[];
/**
* The ARIA role attribute for the node element, used for accessibility.
* @default "group"
*/
ariaRole?: AriaRole;
/**
* A description of the node's role, used for accessibility.
* @default "node"
-5
View File
@@ -56,8 +56,3 @@ export type Transform = [number, number, number];
* to represent an unbounded extent.
*/
export type CoordinateExtent = [[number, number], [number, number]];
/**
* The `AriaRole` type is used to define the role of an element in the accessibility tree.
*/
export type AriaRole = 'button' | 'group' | 'listitem' | 'application' | 'region' | 'none' | null;