summaryrefslogtreecommitdiff
path: root/apps/web/src/clipboard
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2026-04-29 00:37:56 +0200
committerMaze Winther <mazewinther@gmail.com>2026-05-02 03:27:23 +0200
commita9b9cf6bf50f08723896659634f2e6afc17bcd42 (patch)
tree9175b49ff21f4326872ac9e541d2765cc7994ebc /apps/web/src/clipboard
parentd6622dc6b3523a5658cd512b44f15f7a66fd540c (diff)
downloadopencut-a9b9cf6bf50f08723896659634f2e6afc17bcd42.tar.gz
chore: switch from biome to eslint + prettier; fix ton of lint issues
Diffstat (limited to 'apps/web/src/clipboard')
-rw-r--r--apps/web/src/clipboard/handlers/elements.ts2
-rw-r--r--apps/web/src/clipboard/handlers/index.ts2
-rw-r--r--apps/web/src/clipboard/handlers/keyframes.ts5
-rw-r--r--apps/web/src/clipboard/types.ts8
4 files changed, 10 insertions, 7 deletions
diff --git a/apps/web/src/clipboard/handlers/elements.ts b/apps/web/src/clipboard/handlers/elements.ts
index b2f5f2c3..2297b493 100644
--- a/apps/web/src/clipboard/handlers/elements.ts
+++ b/apps/web/src/clipboard/handlers/elements.ts
@@ -35,7 +35,7 @@ export const ElementsClipboardHandler = {
};
},
- paste(entry, context) {
+ paste({ entry, context }) {
if (entry.items.length === 0) {
return null;
}
diff --git a/apps/web/src/clipboard/handlers/index.ts b/apps/web/src/clipboard/handlers/index.ts
index 29d4d1d0..a042c3dd 100644
--- a/apps/web/src/clipboard/handlers/index.ts
+++ b/apps/web/src/clipboard/handlers/index.ts
@@ -45,5 +45,5 @@ export function buildPasteClipboardCommand({
const handler = clipboardHandlers[entry.type] as ClipboardHandler<
typeof entry.type
>;
- return handler.paste(entry as never, context);
+ return handler.paste({ entry: entry as never, context });
}
diff --git a/apps/web/src/clipboard/handlers/keyframes.ts b/apps/web/src/clipboard/handlers/keyframes.ts
index cb0c0e65..06879e3e 100644
--- a/apps/web/src/clipboard/handlers/keyframes.ts
+++ b/apps/web/src/clipboard/handlers/keyframes.ts
@@ -156,7 +156,10 @@ export const KeyframesClipboardHandler = {
};
},
- paste(entry, { selectedElements, time }) {
+ paste({
+ entry,
+ context: { selectedElements, time },
+ }) {
const targetElement = selectedElements[0];
if (!targetElement || entry.items.length === 0) {
return null;
diff --git a/apps/web/src/clipboard/types.ts b/apps/web/src/clipboard/types.ts
index 562f9ac7..1d469a30 100644
--- a/apps/web/src/clipboard/types.ts
+++ b/apps/web/src/clipboard/types.ts
@@ -69,10 +69,10 @@ export interface ClipboardHandler<TType extends ClipboardEntryType> {
type: TType;
canCopy(context: CopyContext): boolean;
copy(context: CopyContext): ClipboardEntryByType[TType] | null;
- paste(
- entry: ClipboardEntryByType[TType],
- context: PasteContext,
- ): Command | null;
+ paste(args: {
+ entry: ClipboardEntryByType[TType];
+ context: PasteContext;
+ }): Command | null;
}
export type ClipboardHandlerMap = {