0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 05:33:02 -05:00
This commit is contained in:
Alex Sánchez 2024-04-11 09:56:56 +02:00
parent 3852805ffc
commit cdf07cc611
No known key found for this signature in database
GPG key ID: 68A95170EEB87E16
3 changed files with 26 additions and 4 deletions

View file

@ -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';

View file

@ -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;
};

21
src/ui/lib/types/utils/shadow.d.ts vendored Normal file
View file

@ -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;
};
};