mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2025-01-18 05:22:28 -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 { Export } from './utils/export';
|
||||||
import { Fill } from './utils/fill';
|
import { Fill } from './utils/fill';
|
||||||
import { Grid } from './utils/grid';
|
import { Grid } from './utils/grid';
|
||||||
|
@ -46,8 +47,7 @@ export type Shape = {
|
||||||
transformInverse?: Matrix;
|
transformInverse?: Matrix;
|
||||||
blendMode?: string;
|
blendMode?: string;
|
||||||
interactions?: Interaction[];
|
interactions?: Interaction[];
|
||||||
shadow?: Shadow;
|
shadow?: Shadow[];
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
blur?: Blur;
|
||||||
blur?: any;
|
|
||||||
growType?: 'auto-width' | 'auto-height' | 'fixed';
|
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 { Gradient } from './gradient';
|
||||||
import { Uuid } from './uuid';
|
import { Uuid } from './uuid';
|
||||||
|
|
||||||
type ShadowStyle = 'drop-shadow' | 'inner-shadow';
|
|
||||||
|
|
||||||
export type Shadow = {
|
export type Shadow = {
|
||||||
id?: Uuid;
|
id?: Uuid;
|
||||||
style: ShadowStyle;
|
style: symbol; // 'drop-shadow' | 'inner-shadow'
|
||||||
offsetX: number;
|
offsetX: number;
|
||||||
offsetY: number;
|
offsetY: number;
|
||||||
blur: number;
|
blur: number;
|
||||||
|
|
Loading…
Add table
Reference in a new issue