diff --git a/src/ui/lib/types/shape.d.ts b/src/ui/lib/types/shape.d.ts index d5ef19c..de6f3e2 100644 --- a/src/ui/lib/types/shape.d.ts +++ b/src/ui/lib/types/shape.d.ts @@ -5,6 +5,7 @@ import { Interaction } from './utils/interactions/interaction'; import { Matrix } from './utils/matrix'; import { Point } from './utils/point'; import { Selrect } from './utils/selrect'; +import { Shadow } from './utils/shadow'; import { Stroke } from './utils/stroke'; export type Shape = { @@ -45,8 +46,7 @@ export type Shape = { transformInverse?: Matrix; blendMode?: string; interactions?: Interaction[]; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - shadow?: any; + shadow?: Shadow; // eslint-disable-next-line @typescript-eslint/no-explicit-any blur?: any; growType?: 'auto-width' | 'auto-height' | 'fixed'; diff --git a/src/ui/lib/types/utils/interactions/interaction.d.ts b/src/ui/lib/types/utils/interactions/interaction.d.ts index 9e46740..9e49f4b 100644 --- a/src/ui/lib/types/utils/interactions/interaction.d.ts +++ b/src/ui/lib/types/utils/interactions/interaction.d.ts @@ -1,3 +1,4 @@ +import { Uuid } from '../uuid'; import { ActionType } from './actionType'; import { Animation } from './animation'; import { EventType } from './eventType'; @@ -6,14 +7,14 @@ import { OverlayPositioningType } from './overlayPositioningType'; export type Interaction = { eventType: EventType; actionType: ActionType; - destination?: string; + destination?: Uuid; preserveScroll?: boolean; animation?: Animation; overlayPosition?: { x: number; y: number }; overlayPosType?: OverlayPositioningType; closeClickOutside?: boolean; backgroundOverlay?: boolean; - positionRelativeTo?: string; + positionRelativeTo?: Uuid; url?: string; delay?: number; }; diff --git a/src/ui/lib/types/utils/shadow.d.ts b/src/ui/lib/types/utils/shadow.d.ts new file mode 100644 index 0000000..96f4cb7 --- /dev/null +++ b/src/ui/lib/types/utils/shadow.d.ts @@ -0,0 +1,21 @@ +import { Gradient } from './gradient'; +import { Uuid } from './uuid'; + +type ShadowStyle = 'drop-shadow' | 'inner-shadow'; + +export type Shadow = { + id?: Uuid; + style: ShadowStyle; + offsetX: number; + offsetY: number; + blur: number; + spread: number; + hidden: boolean; + color: { + color?: string; + opacity?: number; + gradient?: Gradient; + fileId?: Uuid; + id?: Uuid; + }; +};