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:
parent
cdf07cc611
commit
94472a95cc
14 changed files with 37 additions and 66 deletions
6
src/ui/lib/types/shape.d.ts
vendored
6
src/ui/lib/types/shape.d.ts
vendored
|
@ -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
8
src/ui/lib/types/utils/animation.d.ts
vendored
Normal 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
8
src/ui/lib/types/utils/blur.d.ts
vendored
Normal 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
17
src/ui/lib/types/utils/interaction.d.ts
vendored
Normal 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;
|
||||
};
|
|
@ -1,7 +0,0 @@
|
|||
export type ActionType =
|
||||
| 'navigate'
|
||||
| 'open-overlay'
|
||||
| 'toggle-overlay'
|
||||
| 'close-overlay'
|
||||
| 'prev-screen'
|
||||
| 'open-url';
|
|
@ -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;
|
||||
};
|
|
@ -1 +0,0 @@
|
|||
export type AnimationType = 'dissolve' | 'slide' | 'push';
|
|
@ -1 +0,0 @@
|
|||
export type DirectionType = 'right' | 'left' | 'up' | 'down';
|
|
@ -1 +0,0 @@
|
|||
export type EasingType = 'linear' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out';
|
|
@ -1,7 +0,0 @@
|
|||
export type EventType =
|
||||
| 'click'
|
||||
| 'mouse-press'
|
||||
| 'mouse-over'
|
||||
| 'mouse-enter'
|
||||
| 'mouse-leave'
|
||||
| 'after-delay';
|
|
@ -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;
|
||||
};
|
|
@ -1,9 +0,0 @@
|
|||
export type OverlayPositioningType =
|
||||
| 'manual'
|
||||
| 'center'
|
||||
| 'top-left'
|
||||
| 'top-right'
|
||||
| 'top-center'
|
||||
| 'bottom-left'
|
||||
| 'bottom-right'
|
||||
| 'bottom-center';
|
|
@ -1 +0,0 @@
|
|||
export type WayType = 'in' | 'out';
|
4
src/ui/lib/types/utils/shadow.d.ts
vendored
4
src/ui/lib/types/utils/shadow.d.ts
vendored
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue