0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2025-01-03 05:10:13 -05:00

blur and fixes

This commit is contained in:
Alex Sánchez 2024-04-11 10:09:14 +02:00
parent cdf07cc611
commit 94472a95cc
No known key found for this signature in database
GPG key ID: 68A95170EEB87E16
14 changed files with 37 additions and 66 deletions

View file

@ -1,3 +1,4 @@
import { Blur } from './utils/blur';
import { Export } from './utils/export';
import { Fill } from './utils/fill';
import { Grid } from './utils/grid';
@ -46,8 +47,7 @@ export type Shape = {
transformInverse?: Matrix;
blendMode?: string;
interactions?: Interaction[];
shadow?: Shadow;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
blur?: any;
shadow?: Shadow[];
blur?: Blur;
growType?: 'auto-width' | 'auto-height' | 'fixed';
};

8
src/ui/lib/types/utils/animation.d.ts vendored Normal file
View file

@ -0,0 +1,8 @@
export type Animation = {
animationType: symbol; // 'dissolve' | 'slide' | 'push'
duration: number;
easing: symbol; // 'linear' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out'
way?: symbol; // 'in' | 'out'
direction?: symbol; // 'right' | 'left' | 'up' | 'down'
offsetEffect?: boolean;
};

8
src/ui/lib/types/utils/blur.d.ts vendored Normal file
View file

@ -0,0 +1,8 @@
import { Uuid } from './uuid';
export type Blur = {
id: Uuid;
type: symbol; // layer-blur
value: number;
hidden: boolean;
};

17
src/ui/lib/types/utils/interaction.d.ts vendored Normal file
View file

@ -0,0 +1,17 @@
import { Animation } from './animation';
import { Uuid } from './uuid';
export type Interaction = {
eventType: symbol; // 'click' | 'mouse-press' | 'mouse-over' | 'mouse-enter' | 'mouse-leave' | 'after-delay'
actionType: symbol; // 'navigate' | 'open-overlay' | 'toggle-overlay' | 'close-overlay' | 'prev-screen' | 'open-url'
destination?: Uuid;
preserveScroll?: boolean;
animation?: Animation;
overlayPosition?: { x: number; y: number };
overlayPosType?: symbol; // 'manual' | 'center' | 'top-left' | 'top-right' | 'top-center' | 'bottom-left' | 'bottom-right' | 'bottom-center'
closeClickOutside?: boolean;
backgroundOverlay?: boolean;
positionRelativeTo?: Uuid;
url?: string;
delay?: number;
};

View file

@ -1,7 +0,0 @@
export type ActionType =
| 'navigate'
| 'open-overlay'
| 'toggle-overlay'
| 'close-overlay'
| 'prev-screen'
| 'open-url';

View file

@ -1,13 +0,0 @@
import { AnimationType } from './animationType';
import { DirectionType } from './directionType';
import { EasingType } from './easingType';
import { WayType } from './wayType';
export type Animation = {
animationType: AnimationType;
duration: number;
easing: EasingType;
way?: WayType;
direction?: DirectionType;
offsetEffect?: boolean;
};

View file

@ -1 +0,0 @@
export type AnimationType = 'dissolve' | 'slide' | 'push';

View file

@ -1 +0,0 @@
export type DirectionType = 'right' | 'left' | 'up' | 'down';

View file

@ -1 +0,0 @@
export type EasingType = 'linear' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out';

View file

@ -1,7 +0,0 @@
export type EventType =
| 'click'
| 'mouse-press'
| 'mouse-over'
| 'mouse-enter'
| 'mouse-leave'
| 'after-delay';

View file

@ -1,20 +0,0 @@
import { Uuid } from '../uuid';
import { ActionType } from './actionType';
import { Animation } from './animation';
import { EventType } from './eventType';
import { OverlayPositioningType } from './overlayPositioningType';
export type Interaction = {
eventType: EventType;
actionType: ActionType;
destination?: Uuid;
preserveScroll?: boolean;
animation?: Animation;
overlayPosition?: { x: number; y: number };
overlayPosType?: OverlayPositioningType;
closeClickOutside?: boolean;
backgroundOverlay?: boolean;
positionRelativeTo?: Uuid;
url?: string;
delay?: number;
};

View file

@ -1,9 +0,0 @@
export type OverlayPositioningType =
| 'manual'
| 'center'
| 'top-left'
| 'top-right'
| 'top-center'
| 'bottom-left'
| 'bottom-right'
| 'bottom-center';

View file

@ -1 +0,0 @@
export type WayType = 'in' | 'out';

View file

@ -1,11 +1,9 @@
import { Gradient } from './gradient';
import { Uuid } from './uuid';
type ShadowStyle = 'drop-shadow' | 'inner-shadow';
export type Shadow = {
id?: Uuid;
style: ShadowStyle;
style: symbol; // 'drop-shadow' | 'inner-shadow'
offsetX: number;
offsetY: number;
blur: number;