From cd9ba5d19cb2e56053cff88bfc4d88218a0261e0 Mon Sep 17 00:00:00 2001 From: Murderlon Date: Tue, 16 Sep 2025 15:51:40 +0200 Subject: [PATCH] WIP --- packages/@uppy/core/src/_common.scss | 11 ++++++++ packages/@uppy/image-generator/src/index.tsx | 25 +++++++++++++++-- packages/@uppy/image-generator/src/style.scss | 28 ++++++++++++++++--- packages/@uppy/image-generator/turbo.json | 8 ++++++ private/dev/index.js | 11 +++++++- yarn.lock | 3 +- 6 files changed, 78 insertions(+), 8 deletions(-) create mode 100644 packages/@uppy/image-generator/turbo.json diff --git a/packages/@uppy/core/src/_common.scss b/packages/@uppy/core/src/_common.scss index 315ae8033..b33c4917d 100644 --- a/packages/@uppy/core/src/_common.scss +++ b/packages/@uppy/core/src/_common.scss @@ -187,3 +187,14 @@ color: $gray-500; } } + +.sr-only { + clip: rect(1px, 1px, 1px, 1px); + clip-path: inset(50%); + height: 1px; + width: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; +} diff --git a/packages/@uppy/image-generator/src/index.tsx b/packages/@uppy/image-generator/src/index.tsx index 95129e777..526f41804 100644 --- a/packages/@uppy/image-generator/src/index.tsx +++ b/packages/@uppy/image-generator/src/index.tsx @@ -1,7 +1,6 @@ import type { Body, Meta, UIPluginOptions, Uppy } from '@uppy/core' import { UIPlugin } from '@uppy/core' import { SearchInput } from '@uppy/provider-views' -// eslint-disable-next-line import/no-extraneous-dependencies import type Transloadit from '@uppy/transloadit' import type { AssemblyResult } from '@uppy/transloadit' import locale from './locale.js' @@ -69,7 +68,7 @@ export default class ImageGenerator< this.setPluginState({ loading: true }) await this.uppy.upload() } catch { - // TODO: inform the user + // TODO: inform the user? } finally { // Normally uppy.upload() is only used to upload your files // but here we need it to _get_ the results from the AI image generator Robot. @@ -120,7 +119,9 @@ export default class ImageGenerator< this.setPluginState({ prompt: (e.target as HTMLInputElement).value, @@ -128,6 +129,26 @@ export default class ImageGenerator< } /> +