use-vibes 0.11.2 → 0.12.0-dev-preview
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -58
- package/index.d.ts +1 -20
- package/index.js +1 -20
- package/index.js.map +1 -1
- package/package.json +5 -27
- package/tsconfig.json +4 -0
- package/components/ControlsBar.d.ts +0 -20
- package/components/ControlsBar.js +0 -80
- package/components/ControlsBar.js.map +0 -1
- package/components/ImgGen.css +0 -675
- package/components/ImgGen.d.ts +0 -25
- package/components/ImgGen.js +0 -257
- package/components/ImgGen.js.map +0 -1
- package/components/ImgGenUtils/ImgGenDisplay.d.ts +0 -3
- package/components/ImgGenUtils/ImgGenDisplay.js +0 -192
- package/components/ImgGenUtils/ImgGenDisplay.js.map +0 -1
- package/components/ImgGenUtils/ImgGenDisplayPlaceholder.d.ts +0 -3
- package/components/ImgGenUtils/ImgGenDisplayPlaceholder.js +0 -107
- package/components/ImgGenUtils/ImgGenDisplayPlaceholder.js.map +0 -1
- package/components/ImgGenUtils/ImgGenDisplayUtils.d.ts +0 -27
- package/components/ImgGenUtils/ImgGenDisplayUtils.js +0 -95
- package/components/ImgGenUtils/ImgGenDisplayUtils.js.map +0 -1
- package/components/ImgGenUtils/ImgGenError.d.ts +0 -3
- package/components/ImgGenUtils/ImgGenError.js +0 -6
- package/components/ImgGenUtils/ImgGenError.js.map +0 -1
- package/components/ImgGenUtils/ImgGenFileDrop.d.ts +0 -12
- package/components/ImgGenUtils/ImgGenFileDrop.js +0 -50
- package/components/ImgGenUtils/ImgGenFileDrop.js.map +0 -1
- package/components/ImgGenUtils/ImgGenModal.d.ts +0 -24
- package/components/ImgGenUtils/ImgGenModal.js +0 -28
- package/components/ImgGenUtils/ImgGenModal.js.map +0 -1
- package/components/ImgGenUtils/ImgGenModeUtils.d.ts +0 -9
- package/components/ImgGenUtils/ImgGenModeUtils.js +0 -48
- package/components/ImgGenUtils/ImgGenModeUtils.js.map +0 -1
- package/components/ImgGenUtils/ImgGenPromptWaiting.d.ts +0 -12
- package/components/ImgGenUtils/ImgGenPromptWaiting.js +0 -37
- package/components/ImgGenUtils/ImgGenPromptWaiting.js.map +0 -1
- package/components/ImgGenUtils/ImgGenUploadWaiting.d.ts +0 -17
- package/components/ImgGenUtils/ImgGenUploadWaiting.js +0 -132
- package/components/ImgGenUtils/ImgGenUploadWaiting.js.map +0 -1
- package/components/ImgGenUtils/index.d.ts +0 -6
- package/components/ImgGenUtils/index.js +0 -7
- package/components/ImgGenUtils/index.js.map +0 -1
- package/components/ImgGenUtils/overlays/DeleteConfirmationOverlay.d.ts +0 -9
- package/components/ImgGenUtils/overlays/DeleteConfirmationOverlay.js +0 -30
- package/components/ImgGenUtils/overlays/DeleteConfirmationOverlay.js.map +0 -1
- package/components/ImgGenUtils/overlays/ImageOverlay.d.ts +0 -22
- package/components/ImgGenUtils/overlays/ImageOverlay.js +0 -8
- package/components/ImgGenUtils/overlays/ImageOverlay.js.map +0 -1
- package/components/ImgGenUtils/types.d.ts +0 -29
- package/components/ImgGenUtils/types.js +0 -2
- package/components/ImgGenUtils/types.js.map +0 -1
- package/components/ImgGenUtils.d.ts +0 -2
- package/components/ImgGenUtils.js +0 -3
- package/components/ImgGenUtils.js.map +0 -1
- package/components/PromptBar.d.ts +0 -11
- package/components/PromptBar.js +0 -16
- package/components/PromptBar.js.map +0 -1
- package/fix-ranges-tarball.js +0 -62
- package/hooks/image-gen/image-generator.d.ts +0 -11
- package/hooks/image-gen/image-generator.js +0 -136
- package/hooks/image-gen/image-generator.js.map +0 -1
- package/hooks/image-gen/index.d.ts +0 -7
- package/hooks/image-gen/index.js +0 -6
- package/hooks/image-gen/index.js.map +0 -1
- package/hooks/image-gen/types.d.ts +0 -66
- package/hooks/image-gen/types.js +0 -2
- package/hooks/image-gen/types.js.map +0 -1
- package/hooks/image-gen/use-image-gen.d.ts +0 -4
- package/hooks/image-gen/use-image-gen.js +0 -544
- package/hooks/image-gen/use-image-gen.js.map +0 -1
- package/hooks/image-gen/utils.d.ts +0 -20
- package/hooks/image-gen/utils.js +0 -159
- package/hooks/image-gen/utils.js.map +0 -1
- package/hooks/use-image-gen.d.ts +0 -1
- package/hooks/use-image-gen.js +0 -2
- package/hooks/use-image-gen.js.map +0 -1
- package/style-loader.d.ts +0 -1
- package/style-loader.js +0 -23
- package/style-loader.js.map +0 -1
- package/utils/base64.d.ts +0 -1
- package/utils/base64.js +0 -13
- package/utils/base64.js.map +0 -1
- package/utils/debug.d.ts +0 -2
- package/utils/debug.js +0 -8
- package/utils/debug.js.map +0 -1
- package/utils/style-utils.d.ts +0 -17
- package/utils/style-utils.js +0 -15
- package/utils/style-utils.js.map +0 -1
package/README.md
CHANGED
|
@@ -12,7 +12,6 @@ pnpm add use-vibes
|
|
|
12
12
|
|
|
13
13
|
```jsx
|
|
14
14
|
import { ImgGen } from 'use-vibes';
|
|
15
|
-
import 'use-vibes/style-loader'; // Quick setup for CSS
|
|
16
15
|
|
|
17
16
|
function MyComponent() {
|
|
18
17
|
// You can use ImgGen without any props - it includes its own form UI
|
|
@@ -270,33 +269,9 @@ This guide covers the implementation, configuration, and best practices for usin
|
|
|
270
269
|
pnpm add use-vibes
|
|
271
270
|
```
|
|
272
271
|
|
|
273
|
-
###
|
|
272
|
+
### Styling
|
|
274
273
|
|
|
275
|
-
The ImgGen component
|
|
276
|
-
|
|
277
|
-
#### Option A: Explicit CSS Link (Recommended for Production)
|
|
278
|
-
|
|
279
|
-
Add a CSS link tag to your HTML:
|
|
280
|
-
|
|
281
|
-
```html
|
|
282
|
-
<link rel="stylesheet" href="/node_modules/use-vibes/dist/components/ImgGen.css" />
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
Or for ESM/CDN environments:
|
|
286
|
-
|
|
287
|
-
```html
|
|
288
|
-
<link rel="stylesheet" href="https://esm.sh/use-vibes@latest/dist/components/ImgGen.css" />
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
#### Option B: Automatic CSS Loading (Convenient for Prototyping)
|
|
292
|
-
|
|
293
|
-
Import the style-loader early in your application:
|
|
294
|
-
|
|
295
|
-
```js
|
|
296
|
-
import 'use-vibes/style-loader'; // Auto-loads CSS when imported
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
This approach is perfect for quick prototypes, but for production sites, Option A gives you better control over CSS loading order and timing.
|
|
274
|
+
The ImgGen component uses inline styles with centralized theme constants, so **no separate CSS setup is required**. All styling is self-contained within the component.
|
|
300
275
|
|
|
301
276
|
## Basic Usage
|
|
302
277
|
|
|
@@ -472,37 +447,7 @@ const imageFile = base64ToFile(imageResponse.data[0].b64_json, 'my-image.png');
|
|
|
472
447
|
|
|
473
448
|
### CSS Variables
|
|
474
449
|
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
```css
|
|
478
|
-
/* In your CSS file */
|
|
479
|
-
:root {
|
|
480
|
-
--imggen-text-color: #222;
|
|
481
|
-
--imggen-overlay-bg: rgba(245, 245, 245, 0.85);
|
|
482
|
-
--imggen-accent: #0088ff;
|
|
483
|
-
--imggen-border-radius: 4px;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
/* Dark theme example */
|
|
487
|
-
.dark-theme {
|
|
488
|
-
--imggen-text-color: #f0f0f0;
|
|
489
|
-
--imggen-overlay-bg: rgba(25, 25, 25, 0.85);
|
|
490
|
-
--imggen-accent: #66b2ff;
|
|
491
|
-
}
|
|
492
|
-
```
|
|
493
|
-
|
|
494
|
-
### Available CSS Variables
|
|
495
|
-
|
|
496
|
-
| Variable | Default | Description |
|
|
497
|
-
| ------------------------ | -------------------------- | --------------------------------- |
|
|
498
|
-
| `--imggen-text-color` | `#333` | Main text color |
|
|
499
|
-
| `--imggen-background` | `#333333` | Background color for placeholder |
|
|
500
|
-
| `--imggen-overlay-bg` | `rgba(255, 255, 255, 0.5)` | Overlay panel background |
|
|
501
|
-
| `--imggen-accent` | `#0066cc` | Accent color (progress bar, etc.) |
|
|
502
|
-
| `--imggen-error-text` | `#ff6666` | Error message text color |
|
|
503
|
-
| `--imggen-border-radius` | `8px` | Border radius for containers |
|
|
504
|
-
| `--imggen-button-bg` | `rgba(255, 255, 255, 0.7)` | Button background color |
|
|
505
|
-
| `--imggen-font-size` | `14px` | Default font size |
|
|
450
|
+
The component uses centralized theme constants from `imgGenTheme` for consistent styling. All styles are applied inline using JavaScript objects, eliminating the need for external CSS files.
|
|
506
451
|
|
|
507
452
|
### Custom Classes
|
|
508
453
|
|
package/index.d.ts
CHANGED
|
@@ -1,20 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
import { useFireproof as originalUseFireproof } from 'use-fireproof';
|
|
3
|
-
export declare const useFireproof: typeof originalUseFireproof;
|
|
4
|
-
import { imageGen, callAi, type ImageGenOptions, type ImageResponse } from 'call-ai';
|
|
5
|
-
export { imageGen, callAi, type ImageGenOptions, type ImageResponse };
|
|
6
|
-
export { default as ImgGen } from './components/ImgGen.js';
|
|
7
|
-
export type { ImgGenProps } from './components/ImgGen.js';
|
|
8
|
-
export { ControlsBar } from './components/ControlsBar.js';
|
|
9
|
-
export { useImageGen, hashInput } from './hooks/image-gen/index.js';
|
|
10
|
-
export { type ImgGenClasses, defaultClasses } from './utils/style-utils.js';
|
|
11
|
-
export { base64ToFile } from './utils/base64.js';
|
|
12
|
-
export { PromptBar } from './components/PromptBar.js';
|
|
13
|
-
export { ImageOverlay } from './components/ImgGenUtils/overlays/ImageOverlay.js';
|
|
14
|
-
export { MODULE_STATE } from './hooks/image-gen/utils.js';
|
|
15
|
-
export { type ImageDocument } from './hooks/image-gen/types.js';
|
|
16
|
-
export { addNewVersion } from './hooks/image-gen/utils.js';
|
|
17
|
-
export { ImgGenDisplay } from './components/ImgGenUtils/ImgGenDisplay.js';
|
|
18
|
-
export { ImgGenModal } from './components/ImgGenUtils/ImgGenModal.js';
|
|
19
|
-
export { ImgGenDisplayPlaceholder } from './components/ImgGenUtils/ImgGenDisplayPlaceholder.js';
|
|
20
|
-
export { type UseImageGenOptions, type UseImageGenResult, type PartialImageDocument, } from './hooks/image-gen/types.js';
|
|
1
|
+
export { ImgGen, type ImgGenProps, useFireproof, fireproof, ImgFile, callAI, callAi, type Fireproof, type CallAI, } from '@vibes.diy/use-vibes-base';
|
package/index.js
CHANGED
|
@@ -1,21 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
import { useFireproof as originalUseFireproof } from 'use-fireproof';
|
|
3
|
-
export const useFireproof = (...args) => {
|
|
4
|
-
console.log('Using vibes-customized useFireproof');
|
|
5
|
-
return originalUseFireproof(...args);
|
|
6
|
-
};
|
|
7
|
-
import { imageGen, callAi } from 'call-ai';
|
|
8
|
-
export { imageGen, callAi };
|
|
9
|
-
export { default as ImgGen } from './components/ImgGen.js';
|
|
10
|
-
export { ControlsBar } from './components/ControlsBar.js';
|
|
11
|
-
export { useImageGen, hashInput } from './hooks/image-gen/index.js';
|
|
12
|
-
export { defaultClasses } from './utils/style-utils.js';
|
|
13
|
-
export { base64ToFile } from './utils/base64.js';
|
|
14
|
-
export { PromptBar } from './components/PromptBar.js';
|
|
15
|
-
export { ImageOverlay } from './components/ImgGenUtils/overlays/ImageOverlay.js';
|
|
16
|
-
export { MODULE_STATE } from './hooks/image-gen/utils.js';
|
|
17
|
-
export { addNewVersion } from './hooks/image-gen/utils.js';
|
|
18
|
-
export { ImgGenDisplay } from './components/ImgGenUtils/ImgGenDisplay.js';
|
|
19
|
-
export { ImgGenModal } from './components/ImgGenUtils/ImgGenModal.js';
|
|
20
|
-
export { ImgGenDisplayPlaceholder } from './components/ImgGenUtils/ImgGenDisplayPlaceholder.js';
|
|
1
|
+
export { ImgGen, useFireproof, fireproof, ImgFile, callAI, callAi, } from '@vibes.diy/use-vibes-base';
|
|
21
2
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../jsr/index.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../jsr/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,MAAM,EAIN,YAAY,EACZ,SAAS,EACT,OAAO,EAGP,MAAM,EACN,MAAM,GAKP,MAAM,2BAA2B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "use-vibes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0-dev-preview",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Transform any DOM element into an AI-powered micro-app",
|
|
6
|
-
"exports": {
|
|
7
|
-
".": {
|
|
8
|
-
"types": "./index.d.ts",
|
|
9
|
-
"import": "./index.js"
|
|
10
|
-
},
|
|
11
|
-
"./style-loader": {
|
|
12
|
-
"types": "./style-loader.d.ts",
|
|
13
|
-
"import": "./style-loader.js"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
6
|
"keywords": [
|
|
17
7
|
"ai",
|
|
18
8
|
"dom",
|
|
@@ -28,16 +18,14 @@
|
|
|
28
18
|
],
|
|
29
19
|
"license": "Apache-2.0",
|
|
30
20
|
"dependencies": {
|
|
31
|
-
"
|
|
32
|
-
"use-fireproof": "0.23.5",
|
|
33
|
-
"uuid": "^11.1.0"
|
|
21
|
+
"@vibes.diy/use-vibes-base": "^0.12.0-dev-preview"
|
|
34
22
|
},
|
|
35
23
|
"peerDependencies": {
|
|
36
|
-
"react": "^
|
|
24
|
+
"react": "^18.0.0 || ^19.0.0"
|
|
37
25
|
},
|
|
38
26
|
"devDependencies": {
|
|
39
27
|
"@eslint/js": "^9.31.0",
|
|
40
|
-
"@fireproof/core-cli": "^0.23.
|
|
28
|
+
"@fireproof/core-cli": "^0.23.11",
|
|
41
29
|
"@testing-library/jest-dom": "^6.6.3",
|
|
42
30
|
"@testing-library/react": "^16.3.0",
|
|
43
31
|
"@types/react": "^19.1.0",
|
|
@@ -59,16 +47,6 @@
|
|
|
59
47
|
},
|
|
60
48
|
"scripts": {
|
|
61
49
|
"build": "core-cli tsc",
|
|
62
|
-
"
|
|
63
|
-
"build:watch": "tsc --watch",
|
|
64
|
-
"dev:build": "tsc --watch",
|
|
65
|
-
"lint": "eslint src --ext .ts,.tsx",
|
|
66
|
-
"lint:fix": "eslint src --ext .ts,.tsx --fix --rule 'no-unused-vars: 1' --rule 'no-empty: 1' --rule '@typescript-eslint/no-unused-vars: 1'",
|
|
67
|
-
"format": "prettier --write \"./**/*.{js,jsx,ts,tsx,json,md}\"",
|
|
68
|
-
"test": "vitest run",
|
|
69
|
-
"test:watch": "vitest",
|
|
70
|
-
"clean": "rimraf dist",
|
|
71
|
-
"typecheck": "tsc --noEmit",
|
|
72
|
-
"check": "pnpm lint && pnpm format && pnpm typecheck && pnpm test"
|
|
50
|
+
"test": "vitest run"
|
|
73
51
|
}
|
|
74
52
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ImgGenClasses } from '../utils/style-utils.js';
|
|
3
|
-
interface ControlsBarProps {
|
|
4
|
-
readonly handleDeleteConfirm: () => void;
|
|
5
|
-
readonly handlePrevVersion: () => void;
|
|
6
|
-
readonly handleNextVersion: () => void;
|
|
7
|
-
readonly handleRegen: () => void;
|
|
8
|
-
readonly versionIndex: number;
|
|
9
|
-
readonly totalVersions: number;
|
|
10
|
-
readonly classes?: Partial<ImgGenClasses>;
|
|
11
|
-
readonly showControls?: boolean;
|
|
12
|
-
readonly editedPrompt: string | null;
|
|
13
|
-
readonly promptText: string;
|
|
14
|
-
readonly progress?: number;
|
|
15
|
-
readonly showDelete?: boolean;
|
|
16
|
-
readonly versionFlash?: boolean;
|
|
17
|
-
readonly isRegenerating?: boolean;
|
|
18
|
-
}
|
|
19
|
-
export declare function ControlsBar({ handleDeleteConfirm, handlePrevVersion, handleNextVersion, handleRegen, versionIndex, totalVersions, classes, showControls, editedPrompt, promptText, progress, showDelete, versionFlash, isRegenerating }: ControlsBarProps): React.JSX.Element;
|
|
20
|
-
export {};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { combineClasses, defaultClasses } from '../utils/style-utils.js';
|
|
3
|
-
import { logDebug } from '../utils/debug.js';
|
|
4
|
-
export function ControlsBar({ handleDeleteConfirm, handlePrevVersion, handleNextVersion, handleRegen, versionIndex, totalVersions, classes = defaultClasses, showControls = true, editedPrompt, promptText, progress = 100, showDelete = true, versionFlash = false, isRegenerating = false, }) {
|
|
5
|
-
const [showConfirmation, setShowConfirmation] = React.useState(false);
|
|
6
|
-
const cancelTimerRef = React.useRef(null);
|
|
7
|
-
const isConfirming = showConfirmation;
|
|
8
|
-
const onDeleteClick = () => {
|
|
9
|
-
if (isConfirming) {
|
|
10
|
-
logDebug('ControlsBar: Delete confirmed, calling handleDeleteConfirm');
|
|
11
|
-
handleDeleteConfirm();
|
|
12
|
-
setShowConfirmation(false);
|
|
13
|
-
if (cancelTimerRef.current) {
|
|
14
|
-
window.clearTimeout(cancelTimerRef.current);
|
|
15
|
-
cancelTimerRef.current = null;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
logDebug('ControlsBar: Showing delete confirmation');
|
|
20
|
-
setShowConfirmation(true);
|
|
21
|
-
cancelTimerRef.current = window.setTimeout(() => {
|
|
22
|
-
setShowConfirmation(false);
|
|
23
|
-
}, 6500);
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
React.useEffect(() => {
|
|
27
|
-
return () => {
|
|
28
|
-
if (cancelTimerRef.current) {
|
|
29
|
-
window.clearTimeout(cancelTimerRef.current);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
}, []);
|
|
33
|
-
return (React.createElement(React.Fragment, null, progress < 100 && (React.createElement("div", { className: "imggen-progress", style: {
|
|
34
|
-
width: `${progress}%`,
|
|
35
|
-
position: 'absolute',
|
|
36
|
-
top: 0,
|
|
37
|
-
left: 0,
|
|
38
|
-
height: 'var(--imggen-progress-height)',
|
|
39
|
-
zIndex: 20,
|
|
40
|
-
} })), React.createElement("div", { className: combineClasses('imggen-controls', classes.controls) }, showControls ? (React.createElement(React.Fragment, null, React.createElement("div", { style: { display: 'flex', gap: '6px', alignItems: 'center', flex: 1 } }, showDelete && (React.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: '8px' } }, React.createElement("button", { "aria-label": "Delete image", onClick: onDeleteClick, className: combineClasses('imggen-button imggen-delete-button', classes.button), style: {
|
|
41
|
-
position: 'static',
|
|
42
|
-
width: 'var(--imggen-button-size)',
|
|
43
|
-
height: 'var(--imggen-button-size)',
|
|
44
|
-
backgroundColor: isConfirming ? 'var(--imggen-error-border)' : undefined,
|
|
45
|
-
color: isConfirming ? 'white' : undefined,
|
|
46
|
-
opacity: isConfirming ? 1 : undefined,
|
|
47
|
-
} }), isConfirming && (React.createElement("div", { className: "fade-transition", style: { animationDelay: '6s' } }, React.createElement("button", { onClick: () => {
|
|
48
|
-
handleDeleteConfirm();
|
|
49
|
-
setShowConfirmation(false);
|
|
50
|
-
}, "aria-label": "Confirm delete", style: {
|
|
51
|
-
fontSize: 'var(--imggen-font-size)',
|
|
52
|
-
fontWeight: 'bold',
|
|
53
|
-
whiteSpace: 'nowrap',
|
|
54
|
-
border: '1px solid var(--imggen-error-border, #ff3333)',
|
|
55
|
-
background: 'var(--imggen-error-border, #ff3333)',
|
|
56
|
-
color: 'white',
|
|
57
|
-
borderRadius: '4px',
|
|
58
|
-
cursor: 'pointer',
|
|
59
|
-
padding: '2px 8px',
|
|
60
|
-
} }, "Delete image"), React.createElement("button", { onClick: () => {
|
|
61
|
-
logDebug('ControlsBar: Delete canceled');
|
|
62
|
-
setShowConfirmation(false);
|
|
63
|
-
if (cancelTimerRef.current) {
|
|
64
|
-
window.clearTimeout(cancelTimerRef.current);
|
|
65
|
-
}
|
|
66
|
-
}, "aria-label": "Cancel delete", style: {
|
|
67
|
-
fontSize: 'var(--imggen-font-size)',
|
|
68
|
-
whiteSpace: 'nowrap',
|
|
69
|
-
border: 'none',
|
|
70
|
-
background: 'none',
|
|
71
|
-
color: 'var(--imggen-font-color)',
|
|
72
|
-
cursor: 'pointer',
|
|
73
|
-
padding: '0 4px',
|
|
74
|
-
} }, "Cance")))))), React.createElement("div", { className: "imggen-control-group" }, totalVersions > 1 && (React.createElement("button", { "aria-label": "Previous version", disabled: versionIndex === 0, onClick: handlePrevVersion, className: combineClasses('imggen-button', classes.button) }, "\u25C0")), totalVersions > 1 && (React.createElement("span", { className: `imggen-version-indicator version-indicator ${versionFlash ? 'imggen-version-flash' : ''}`, "aria-live": "polite" }, versionIndex + 1, " / ", totalVersions)), totalVersions > 1 && (React.createElement("button", { "aria-label": "Next version", disabled: versionIndex >= totalVersions - 1, onClick: handleNextVersion, className: combineClasses('imggen-button', classes.button) }, "\u25B6")), React.createElement("button", { "aria-label": "Regenerate image", onClick: () => {
|
|
75
|
-
handleRegen();
|
|
76
|
-
}, disabled: isRegenerating, className: combineClasses('imggen-button', classes.button, editedPrompt !== null && editedPrompt.trim() !== promptText
|
|
77
|
-
? 'imggen-button-highlight'
|
|
78
|
-
: '', isRegenerating ? 'imggen-button-disabled' : '') }, React.createElement("span", { className: isRegenerating ? 'imggen-regen-spinning' : '' }, "\u27F3"))))) : progress < 100 ? (React.createElement("div", { className: "imggen-status-text" }, "Generating...")) : null)));
|
|
79
|
-
}
|
|
80
|
-
//# sourceMappingURL=ControlsBar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ControlsBar.js","sourceRoot":"","sources":["../../jsr/components/ControlsBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,cAAc,EAAiB,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAgC7C,MAAM,UAAU,WAAW,CAAC,EAC1B,mBAAmB,EACnB,iBAAiB,EACjB,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