mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 13:43:03 -05:00
shadow
This commit is contained in:
parent
3852805ffc
commit
cdf07cc611
3 changed files with 26 additions and 4 deletions
4
src/ui/lib/types/shape.d.ts
vendored
4
src/ui/lib/types/shape.d.ts
vendored
|
@ -5,6 +5,7 @@ import { Interaction } from './utils/interactions/interaction';
|
||||||
import { Matrix } from './utils/matrix';
|
import { Matrix } from './utils/matrix';
|
||||||
import { Point } from './utils/point';
|
import { Point } from './utils/point';
|
||||||
import { Selrect } from './utils/selrect';
|
import { Selrect } from './utils/selrect';
|
||||||
|
import { Shadow } from './utils/shadow';
|
||||||
import { Stroke } from './utils/stroke';
|
import { Stroke } from './utils/stroke';
|
||||||
|
|
||||||
export type Shape = {
|
export type Shape = {
|
||||||
|
@ -45,8 +46,7 @@ export type Shape = {
|
||||||
transformInverse?: Matrix;
|
transformInverse?: Matrix;
|
||||||
blendMode?: string;
|
blendMode?: string;
|
||||||
interactions?: Interaction[];
|
interactions?: Interaction[];
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
shadow?: Shadow;
|
||||||
shadow?: any;
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
blur?: any;
|
blur?: any;
|
||||||
growType?: 'auto-width' | 'auto-height' | 'fixed';
|
growType?: 'auto-width' | 'auto-height' | 'fixed';
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { Uuid } from '../uuid';
|
||||||
import { ActionType } from './actionType';
|
import { ActionType } from './actionType';
|
||||||
import { Animation } from './animation';
|
import { Animation } from './animation';
|
||||||
import { EventType } from './eventType';
|
import { EventType } from './eventType';
|
||||||
|
@ -6,14 +7,14 @@ import { OverlayPositioningType } from './overlayPositioningType';
|
||||||
export type Interaction = {
|
export type Interaction = {
|
||||||
eventType: EventType;
|
eventType: EventType;
|
||||||
actionType: ActionType;
|
actionType: ActionType;
|
||||||
destination?: string;
|
destination?: Uuid;
|
||||||
preserveScroll?: boolean;
|
preserveScroll?: boolean;
|
||||||
animation?: Animation;
|
animation?: Animation;
|
||||||
overlayPosition?: { x: number; y: number };
|
overlayPosition?: { x: number; y: number };
|
||||||
overlayPosType?: OverlayPositioningType;
|
overlayPosType?: OverlayPositioningType;
|
||||||
closeClickOutside?: boolean;
|
closeClickOutside?: boolean;
|
||||||
backgroundOverlay?: boolean;
|
backgroundOverlay?: boolean;
|
||||||
positionRelativeTo?: string;
|
positionRelativeTo?: Uuid;
|
||||||
url?: string;
|
url?: string;
|
||||||
delay?: number;
|
delay?: number;
|
||||||
};
|
};
|
||||||
|
|
21
src/ui/lib/types/utils/shadow.d.ts
vendored
Normal file
21
src/ui/lib/types/utils/shadow.d.ts
vendored
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
Loading…
Reference in a new issue