@vibes.diy/use-vibes-base 0.19.8-dev → 0.19.14-dev-cli
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 +27 -27
- package/components/ControlsBar.d.ts +2 -2
- package/components/ControlsBar.js +35 -39
- package/components/ControlsBar.js.map +1 -1
- package/components/ImgGen.d.ts +5 -5
- package/components/ImgGen.js +40 -43
- package/components/ImgGen.js.map +1 -1
- package/components/ImgGenUtils/AsyncImg.d.ts +2 -2
- package/components/ImgGenUtils/AsyncImg.js +5 -5
- package/components/ImgGenUtils/ImgGenDisplay.d.ts +2 -2
- package/components/ImgGenUtils/ImgGenDisplay.js +57 -67
- package/components/ImgGenUtils/ImgGenDisplay.js.map +1 -1
- package/components/ImgGenUtils/ImgGenDisplayPlaceholder.d.ts +2 -2
- package/components/ImgGenUtils/ImgGenDisplayPlaceholder.js +28 -29
- package/components/ImgGenUtils/ImgGenDisplayPlaceholder.js.map +1 -1
- package/components/ImgGenUtils/ImgGenDisplayUtils.d.ts +1 -1
- package/components/ImgGenUtils/ImgGenDisplayUtils.js +13 -18
- package/components/ImgGenUtils/ImgGenDisplayUtils.js.map +1 -1
- package/components/ImgGenUtils/ImgGenError.d.ts +2 -2
- package/components/ImgGenUtils/ImgGenError.js +6 -6
- package/components/ImgGenUtils/ImgGenError.js.map +1 -1
- package/components/ImgGenUtils/ImgGenFileDrop.d.ts +1 -1
- package/components/ImgGenUtils/ImgGenFileDrop.js +7 -7
- package/components/ImgGenUtils/ImgGenFileDrop.js.map +1 -1
- package/components/ImgGenUtils/ImgGenModal.d.ts +3 -3
- package/components/ImgGenUtils/ImgGenModal.js +35 -35
- package/components/ImgGenUtils/ImgGenModeUtils.d.ts +2 -2
- package/components/ImgGenUtils/ImgGenModeUtils.js +17 -17
- package/components/ImgGenUtils/ImgGenModeUtils.js.map +1 -1
- package/components/ImgGenUtils/ImgGenPromptWaiting.d.ts +2 -2
- package/components/ImgGenUtils/ImgGenPromptWaiting.js +13 -13
- package/components/ImgGenUtils/ImgGenPromptWaiting.js.map +1 -1
- package/components/ImgGenUtils/ImgGenUploadWaiting.d.ts +4 -4
- package/components/ImgGenUtils/ImgGenUploadWaiting.js +26 -26
- package/components/ImgGenUtils/ImgGenUploadWaiting.js.map +1 -1
- package/components/ImgGenUtils/index.d.ts +6 -6
- package/components/ImgGenUtils/index.js +6 -6
- package/components/ImgGenUtils/overlays/DeleteConfirmationOverlay.d.ts +2 -2
- package/components/ImgGenUtils/overlays/DeleteConfirmationOverlay.js +18 -18
- package/components/ImgGenUtils/overlays/ImageOverlay.d.ts +2 -2
- package/components/ImgGenUtils/overlays/ImageOverlay.js +6 -6
- package/components/ImgGenUtils/types.d.ts +2 -2
- package/components/ImgGenUtils.d.ts +2 -2
- package/components/ImgGenUtils.js +2 -2
- package/components/ImgGenUtils.js.map +1 -1
- package/components/PromptBar.d.ts +2 -2
- package/components/PromptBar.js +5 -5
- package/constants.js +1 -1
- package/contexts/VibeContext.d.ts +23 -11
- package/contexts/VibeContext.js +113 -48
- package/contexts/VibeContext.js.map +1 -1
- package/hooks/image-gen/image-generator.d.ts +2 -2
- package/hooks/image-gen/image-generator.js +12 -12
- package/hooks/image-gen/image-generator.js.map +1 -1
- package/hooks/image-gen/index.d.ts +4 -4
- package/hooks/image-gen/index.js +3 -3
- package/hooks/image-gen/index.js.map +1 -1
- package/hooks/image-gen/use-image-gen.d.ts +1 -1
- package/hooks/image-gen/use-image-gen.js +41 -48
- package/hooks/image-gen/use-image-gen.js.map +1 -1
- package/hooks/image-gen/utils.d.ts +2 -2
- package/hooks/image-gen/utils.js +14 -14
- package/hooks/image-gen/utils.js.map +1 -1
- package/hooks/useMobile.js +7 -7
- package/hooks/useThemeDetection.js +5 -5
- package/hooks/vibes-gen/IframeVibesComponent.d.ts +1 -1
- package/hooks/vibes-gen/IframeVibesComponent.js +15 -19
- package/hooks/vibes-gen/IframeVibesComponent.js.map +1 -1
- package/hooks/vibes-gen/index.d.ts +2 -2
- package/hooks/vibes-gen/index.js +1 -1
- package/hooks/vibes-gen/use-vibes.d.ts +2 -2
- package/hooks/vibes-gen/use-vibes.js +21 -17
- package/hooks/vibes-gen/use-vibes.js.map +1 -1
- package/index.d.ts +76 -51
- package/index.js +137 -184
- package/index.js.map +1 -1
- package/package.json +18 -21
- package/utils/appSlug.js +16 -16
- package/utils/base64.js +2 -4
- package/utils/base64.js.map +1 -1
- package/utils/databaseName.d.ts +2 -0
- package/utils/databaseName.js +4 -0
- package/utils/databaseName.js.map +1 -0
- package/utils/debug.js +1 -1
- package/utils/style-utils.d.ts +1 -1
- package/utils/style-utils.js +3 -3
- package/utils/styles.d.ts +2 -2
- package/utils/styles.js +170 -170
- package/utils/vibe-control-styles.d.ts +1 -1
- package/utils/vibe-control-styles.js +75 -75
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { combineClasses } from
|
|
3
|
-
import { imgGenStyles } from
|
|
4
|
-
export function ImgGenFileDrop({ onFilesDropped, className, isActive = true, maxFiles = 10, debug, addFilesMessage =
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { combineClasses } from "../../utils/style-utils.js";
|
|
3
|
+
import { imgGenStyles } from "../../utils/styles.js";
|
|
4
|
+
export function ImgGenFileDrop({ onFilesDropped, className, isActive = true, maxFiles = 10, debug, addFilesMessage = "Drop images here or click to browse", }) {
|
|
5
5
|
const fileInputRef = React.useRef(null);
|
|
6
6
|
const [isDragging, setIsDragging] = React.useState(false);
|
|
7
7
|
const handleDragOver = React.useCallback((e) => {
|
|
@@ -29,7 +29,7 @@ export function ImgGenFileDrop({ onFilesDropped, className, isActive = true, max
|
|
|
29
29
|
if (debug) {
|
|
30
30
|
console.log(`[ImgGenFileDrop] Processing ${filesToProcess.length} files of ${files.length} selected`);
|
|
31
31
|
}
|
|
32
|
-
const imageFiles = filesToProcess.filter((file) => file.type.startsWith(
|
|
32
|
+
const imageFiles = filesToProcess.filter((file) => file.type.startsWith("image/"));
|
|
33
33
|
if (imageFiles.length > 0) {
|
|
34
34
|
onFilesDropped(imageFiles);
|
|
35
35
|
}
|
|
@@ -45,12 +45,12 @@ export function ImgGenFileDrop({ onFilesDropped, className, isActive = true, max
|
|
|
45
45
|
processFiles(e.target.files);
|
|
46
46
|
}
|
|
47
47
|
}, [processFiles]);
|
|
48
|
-
return (React.createElement("div", { className: combineClasses(
|
|
48
|
+
return (React.createElement("div", { className: combineClasses("imggen-file-drop", isDragging ? "imggen-file-drop-active" : "", !isActive ? "imggen-file-drop-disabled" : "", className), style: {
|
|
49
49
|
...imgGenStyles.fileDrop,
|
|
50
50
|
...(isDragging ? imgGenStyles.fileDropActive : {}),
|
|
51
51
|
...(!isActive ? imgGenStyles.fileDropDisabled : {}),
|
|
52
52
|
}, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, onClick: handleClick },
|
|
53
|
-
React.createElement("input", { type: "file", ref: fileInputRef, accept: "image/*", onChange: handleFileInput, multiple: true, style: { display:
|
|
53
|
+
React.createElement("input", { type: "file", ref: fileInputRef, accept: "image/*", onChange: handleFileInput, multiple: true, style: { display: "none" } }),
|
|
54
54
|
React.createElement("div", { className: "imggen-file-drop-message", style: imgGenStyles.fileDropMessage }, addFilesMessage)));
|
|
55
55
|
}
|
|
56
56
|
//# sourceMappingURL=ImgGenFileDrop.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImgGenFileDrop.js","sourceRoot":"","sources":["../../../jsr/components/ImgGenUtils/ImgGenFileDrop.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAoBrD,MAAM,UAAU,cAAc,CAAC,EAC7B,cAAc,EACd,SAAS,EACT,QAAQ,GAAG,IAAI,EACf,QAAQ,GAAG,EAAE,E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,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;YAC3B,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;IAAA,CACF,EACD,CAAC,YAAY,CAAC,CACf,CAAC;IAEF,OAAO,CACL,6BACE,SAAS,EAAE,cAAc,CACvB,kBAAkB,EAClB,UAAU,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,EAAE,EAC3C,CAAC,QAAQ,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,EAAE,EAC5C,SAAS,CACV,EACD,KAAK,EAAE;YACL,GAAG,YAAY,CAAC,QAAQ;YACxB,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;YAClD,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC;SACpD,EACD,UAAU,EAAE,cAAc,EAC1B,WAAW,EAAE,eAAe,EAC5B,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,WAAW;QAEpB,+BAAO,IAAI,EAAC,MAAM,EAAC,GAAG,EAAE,YAAY,EAAE,MAAM,EAAC,SAAS,EAAC,QAAQ,EAAE,eAAe,EAAE,QAAQ,QAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAI;QACzH,6BAAK,SAAS,EAAC,0BAA0B,EAAC,KAAK,EAAE,YAAY,CAAC,eAAe,IAC1E,eAAe,CACZ,CACF,CACP,CAAC;AAAA,CACH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { DocFileMeta } from
|
|
3
|
-
import { ImgGenClasses } from
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { DocFileMeta } from "@fireproof/use-fireproof";
|
|
3
|
+
import { ImgGenClasses } from "../../utils/style-utils.js";
|
|
4
4
|
export interface ImgGenModalProps {
|
|
5
5
|
readonly isOpen: boolean;
|
|
6
6
|
readonly onClose: () => void;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { AsyncImg } from
|
|
3
|
-
import { createPortal } from
|
|
4
|
-
import { ImageOverlay } from
|
|
5
|
-
import { ImgGenError } from
|
|
6
|
-
import { defaultClasses } from
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { AsyncImg } from "./AsyncImg.js";
|
|
3
|
+
import { createPortal } from "react-dom";
|
|
4
|
+
import { ImageOverlay } from "./overlays/ImageOverlay.js";
|
|
5
|
+
import { ImgGenError } from "./ImgGenError.js";
|
|
6
|
+
import { defaultClasses } from "../../utils/style-utils.js";
|
|
7
7
|
export function ImgGenModal({ isOpen, onClose, currentFile, alt, promptText, editedPrompt, setEditedPrompt, handlePromptEdit, handleDeleteConfirm, handlePrevVersion, handleNextVersion, handleRegen, versionIndex, totalVersions, progress, versionFlash = false, isRegenerating = false, error = null, classes = defaultClasses, }) {
|
|
8
8
|
React.useEffect(() => {
|
|
9
9
|
const handleEsc = (e) => {
|
|
10
|
-
if (e.key ===
|
|
10
|
+
if (e.key === "Escape") {
|
|
11
11
|
onClose();
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
if (isOpen) {
|
|
15
|
-
window.addEventListener(
|
|
16
|
-
return () => window.removeEventListener(
|
|
15
|
+
window.addEventListener("keydown", handleEsc);
|
|
16
|
+
return () => window.removeEventListener("keydown", handleEsc);
|
|
17
17
|
}
|
|
18
18
|
}, [isOpen, onClose]);
|
|
19
19
|
if (!isOpen || !currentFile) {
|
|
@@ -21,47 +21,47 @@ export function ImgGenModal({ isOpen, onClose, currentFile, alt, promptText, edi
|
|
|
21
21
|
}
|
|
22
22
|
const effectivePromptText = promptText;
|
|
23
23
|
return createPortal(React.createElement("div", { className: "imggen-backdrop", style: {
|
|
24
|
-
position:
|
|
24
|
+
position: "fixed",
|
|
25
25
|
top: 0,
|
|
26
26
|
left: 0,
|
|
27
27
|
right: 0,
|
|
28
28
|
bottom: 0,
|
|
29
|
-
backgroundColor:
|
|
30
|
-
display:
|
|
31
|
-
alignItems:
|
|
32
|
-
justifyContent:
|
|
29
|
+
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
30
|
+
display: "flex",
|
|
31
|
+
alignItems: "center",
|
|
32
|
+
justifyContent: "center",
|
|
33
33
|
zIndex: 9999,
|
|
34
|
-
padding:
|
|
35
|
-
boxSizing:
|
|
34
|
+
padding: "20px",
|
|
35
|
+
boxSizing: "border-box",
|
|
36
36
|
}, onClick: (e) => {
|
|
37
37
|
e.stopPropagation();
|
|
38
38
|
onClose();
|
|
39
39
|
}, role: "presentation" },
|
|
40
40
|
React.createElement("figure", { className: "imggen-full-wrapper", role: "figure", style: {
|
|
41
|
-
position:
|
|
41
|
+
position: "relative",
|
|
42
42
|
margin: 0,
|
|
43
|
-
maxWidth:
|
|
44
|
-
maxHeight:
|
|
45
|
-
display:
|
|
46
|
-
flexDirection:
|
|
47
|
-
backgroundColor:
|
|
48
|
-
borderRadius:
|
|
49
|
-
overflow:
|
|
50
|
-
boxShadow:
|
|
43
|
+
maxWidth: "90vw",
|
|
44
|
+
maxHeight: "90vh",
|
|
45
|
+
display: "flex",
|
|
46
|
+
flexDirection: "column",
|
|
47
|
+
backgroundColor: "white",
|
|
48
|
+
borderRadius: "8px",
|
|
49
|
+
overflow: "hidden",
|
|
50
|
+
boxShadow: "0 20px 60px rgba(0, 0, 0, 0.5)",
|
|
51
51
|
}, onClick: (e) => e.stopPropagation() },
|
|
52
52
|
error ? (React.createElement("div", { className: "imggen-backdrop-error", style: {
|
|
53
|
-
display:
|
|
54
|
-
alignItems:
|
|
55
|
-
justifyContent:
|
|
56
|
-
minHeight:
|
|
57
|
-
padding:
|
|
53
|
+
display: "flex",
|
|
54
|
+
alignItems: "center",
|
|
55
|
+
justifyContent: "center",
|
|
56
|
+
minHeight: "400px",
|
|
57
|
+
padding: "2rem",
|
|
58
58
|
} },
|
|
59
59
|
React.createElement(ImgGenError, { message: error.message }))) : (React.createElement(AsyncImg, { file: currentFile, className: "imggen-backdrop-image", style: {
|
|
60
|
-
maxWidth:
|
|
61
|
-
maxHeight:
|
|
62
|
-
objectFit:
|
|
63
|
-
display:
|
|
64
|
-
}, alt: alt ||
|
|
60
|
+
maxWidth: "100%",
|
|
61
|
+
maxHeight: "70vh",
|
|
62
|
+
objectFit: "contain",
|
|
63
|
+
display: "block",
|
|
64
|
+
}, alt: alt || "Generated image" })),
|
|
65
65
|
React.createElement(ImageOverlay, { promptText: effectivePromptText, editedPrompt: editedPrompt, setEditedPrompt: setEditedPrompt, handlePromptEdit: handlePromptEdit, handleDeleteConfirm: handleDeleteConfirm, handlePrevVersion: handlePrevVersion, handleNextVersion: handleNextVersion, handleRegen: handleRegen, versionIndex: versionIndex, totalVersions: totalVersions, progress: progress, versionFlash: versionFlash, isRegenerating: isRegenerating, classes: classes, showDelete: true }))), globalThis.document.body);
|
|
66
66
|
}
|
|
67
67
|
//# sourceMappingURL=ImgGenModal.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PartialImageDocument } from
|
|
2
|
-
export type ImgGenMode =
|
|
1
|
+
import type { PartialImageDocument } from "@vibes.diy/use-vibes-types";
|
|
2
|
+
export type ImgGenMode = "placeholder" | "uploadWaiting" | "generating" | "display" | "error";
|
|
3
3
|
export declare function getImgGenMode({ document, prompt, loading, error, debug }: {
|
|
4
4
|
document?: PartialImageDocument | null;
|
|
5
5
|
prompt?: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export function getImgGenMode({ document, prompt, loading, error, debug, }) {
|
|
2
2
|
if (error) {
|
|
3
3
|
if (debug)
|
|
4
|
-
console.log(
|
|
5
|
-
return
|
|
4
|
+
console.log("[ImgGenModeUtils] Error present - error mode");
|
|
5
|
+
return "error";
|
|
6
6
|
}
|
|
7
7
|
let effectivePrompt = prompt;
|
|
8
8
|
if (!effectivePrompt && document) {
|
|
9
|
-
if (document.prompt && typeof document.prompt ===
|
|
9
|
+
if (document.prompt && typeof document.prompt === "string") {
|
|
10
10
|
effectivePrompt = document.prompt;
|
|
11
11
|
}
|
|
12
12
|
// Check newer structured prompts
|
|
@@ -17,18 +17,18 @@ export function getImgGenMode({ document, prompt, loading, error, debug, }) {
|
|
|
17
17
|
const hasVersions = !!document?.versions?.length;
|
|
18
18
|
if (loading && (prompt || effectivePrompt) && !hasVersions) {
|
|
19
19
|
if (debug)
|
|
20
|
-
console.log(
|
|
21
|
-
return
|
|
20
|
+
console.log("[ImgGenModeUtils] Prompt + loading + no versions → generating");
|
|
21
|
+
return "generating";
|
|
22
22
|
}
|
|
23
23
|
if (hasVersions) {
|
|
24
24
|
if (debug)
|
|
25
|
-
console.log(
|
|
26
|
-
return
|
|
25
|
+
console.log("[ImgGenModeUtils] Has versions - display mode");
|
|
26
|
+
return "display";
|
|
27
27
|
}
|
|
28
|
-
const hasInputFiles = document?._files && Object.keys(document._files).some((key) => key.startsWith(
|
|
28
|
+
const hasInputFiles = document?._files && Object.keys(document._files).some((key) => key.startsWith("in"));
|
|
29
29
|
const hasEmptyDoc = !!document && (!document._files || Object.keys(document._files).length === 0) && !hasVersions;
|
|
30
30
|
if (debug) {
|
|
31
|
-
console.log(
|
|
31
|
+
console.log("[ImgGenModeUtils] Determining mode:", {
|
|
32
32
|
prompt: !!prompt,
|
|
33
33
|
effectivePrompt: !!effectivePrompt,
|
|
34
34
|
hasVersions,
|
|
@@ -39,21 +39,21 @@ export function getImgGenMode({ document, prompt, loading, error, debug, }) {
|
|
|
39
39
|
}
|
|
40
40
|
if (!document) {
|
|
41
41
|
if (debug)
|
|
42
|
-
console.log(
|
|
43
|
-
return
|
|
42
|
+
console.log("[ImgGenModeUtils] No document - placeholder mode");
|
|
43
|
+
return "placeholder";
|
|
44
44
|
}
|
|
45
45
|
if (hasInputFiles && !effectivePrompt && !hasVersions) {
|
|
46
46
|
if (debug)
|
|
47
|
-
console.log(
|
|
48
|
-
return
|
|
47
|
+
console.log("[ImgGenModeUtils] Has input files but no effective prompt - uploadWaiting mode");
|
|
48
|
+
return "uploadWaiting";
|
|
49
49
|
}
|
|
50
50
|
if (document && effectivePrompt && !hasVersions) {
|
|
51
51
|
if (debug)
|
|
52
|
-
console.log(
|
|
53
|
-
return
|
|
52
|
+
console.log("[ImgGenModeUtils] Has document + prompt but no versions - generating mode");
|
|
53
|
+
return "generating";
|
|
54
54
|
}
|
|
55
55
|
if (debug)
|
|
56
|
-
console.log(
|
|
57
|
-
return
|
|
56
|
+
console.log("[ImgGenModeUtils] Fallback - placeholder mode");
|
|
57
|
+
return "placeholder";
|
|
58
58
|
}
|
|
59
59
|
//# sourceMappingURL=ImgGenModeUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImgGenModeUtils.js","sourceRoot":"","sources":["../../../jsr/components/ImgGenUtils/ImgGenModeUtils.ts"],"names":[],"mappings":"AAgBA,MAAM,UAAU,aAAa,CAAC,EAC5B,QAAQ,EACR,MAAM,EACN,OAAO,EACP,KAAK,EACL,KAAK,GAON,EAAc;IACb,IAAI,KAAK,EAAE,CAAC;QACV,IAAI,KAAK;YAAE,OAAO,CAAC,GAAG,CAAC,8CAA8C,CAAC,CAAC;QACvE,OAAO,OAAO,CAAC;IACjB,CAAC;IAGD,IAAI,eAAe,GAAG,MAAM,CAAC;IAC7B,IAAI,CAAC,eAAe,IAAI,QAAQ,EAAE,CAAC;QAEjC,IAAI,QAAQ,CAAC,MAAM,IAAI,OAAO,QAAQ,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC3D,eAAe,GAAG,QAAQ,CAAC,MAAM,CAAC;QACpC,CAAC;QACD,iCAAiC;aAC5B,IAAI,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC,gBAAgB,EAAE,CAAC;YACvD,eAAe,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,IAA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,GAAG,CAAC,gFAAgF,CAAC,CAAC;QACzG,OAAO,eAAe,CAAC;IACzB,CAAC;IAGD,IAAI,QAAQ,IAAI,eAAe,IAAI,CAAC,WAAW,EAAE,CAAC;QAChD,IAAI,KAAK;YAAE,OAAO,CAAC,GAAG,CAAC,2EAA2E,CAAC,CAAC;QACpG,OAAO,YAAY,CAAC;IACtB,CAAC;IAGD,IAAI,KAAK;QAAE,OAAO,CAAC,GAAG,CAAC,+CAA+C,CAAC,CAAC;IACxE,OAAO,aAAa,CAAC;AAAA,CACtB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { ImgGenClasses } from
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ImgGenClasses } from "../../utils/style-utils.js";
|
|
3
3
|
interface ImgGenPromptWaitingProps {
|
|
4
4
|
readonly className?: string;
|
|
5
5
|
readonly classes?: Partial<ImgGenClasses>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { combineClasses, defaultClasses } from
|
|
3
|
-
import { ImgGenFileDrop } from
|
|
4
|
-
import { useFireproof } from
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { combineClasses, defaultClasses } from "../../utils/style-utils.js";
|
|
3
|
+
import { ImgGenFileDrop } from "./ImgGenFileDrop.js";
|
|
4
|
+
import { useFireproof } from "@fireproof/use-fireproof";
|
|
5
5
|
export function ImgGenPromptWaiting({ className, classes = defaultClasses, database, debug, onFilesUploaded, }) {
|
|
6
|
-
const { database: db } = useFireproof(database ||
|
|
6
|
+
const { database: db } = useFireproof(database || "ImgGen");
|
|
7
7
|
const handleFilesDropped = React.useCallback(async (files) => {
|
|
8
8
|
if (!files.length)
|
|
9
9
|
return;
|
|
@@ -12,7 +12,7 @@ export function ImgGenPromptWaiting({ className, classes = defaultClasses, datab
|
|
|
12
12
|
}
|
|
13
13
|
try {
|
|
14
14
|
const newDoc = {
|
|
15
|
-
type:
|
|
15
|
+
type: "image",
|
|
16
16
|
createdAt: new Date().toISOString(),
|
|
17
17
|
_files: {},
|
|
18
18
|
};
|
|
@@ -21,20 +21,20 @@ export function ImgGenPromptWaiting({ className, classes = defaultClasses, datab
|
|
|
21
21
|
});
|
|
22
22
|
const result = await db.put(newDoc);
|
|
23
23
|
if (debug) {
|
|
24
|
-
console.log(
|
|
24
|
+
console.log("[ImgGenPromptWaiting] Created document for uploads:", result.id);
|
|
25
25
|
}
|
|
26
26
|
if (onFilesUploaded && result.id) {
|
|
27
27
|
onFilesUploaded(result.id);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
catch (error) {
|
|
31
|
-
console.error(
|
|
31
|
+
console.error("[ImgGenPromptWaiting] Error handling file upload:", error);
|
|
32
32
|
}
|
|
33
33
|
}, [db, debug, onFilesUploaded]);
|
|
34
|
-
return (React.createElement("div", { className: combineClasses(
|
|
35
|
-
React.createElement("div", { className: "imggen-placeholder-content", style: { marginBottom:
|
|
36
|
-
React.createElement("h3", { style: { margin:
|
|
37
|
-
React.createElement("p", { style: { margin:
|
|
38
|
-
React.createElement(ImgGenFileDrop, { className: classes?.dropZone ||
|
|
34
|
+
return (React.createElement("div", { className: combineClasses("imggen-upload-waiting", className || "", classes?.uploadWaiting || "") },
|
|
35
|
+
React.createElement("div", { className: "imggen-placeholder-content", style: { marginBottom: "1rem", textAlign: "center" } },
|
|
36
|
+
React.createElement("h3", { style: { margin: "0 0 0.5rem 0", color: "#333" } }, "Generate an Image"),
|
|
37
|
+
React.createElement("p", { style: { margin: "0", color: "#666" } }, "Enter a prompt or upload an image to edit")),
|
|
38
|
+
React.createElement(ImgGenFileDrop, { className: classes?.dropZone || "", onFilesDropped: handleFilesDropped, isActive: true, maxFiles: 10, debug: debug, addFilesMessage: "Drop images here to upload (or click to browse)" })));
|
|
39
39
|
}
|
|
40
40
|
//# sourceMappingURL=ImgGenPromptWaiting.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImgGenPromptWaiting.js","sourceRoot":"","sources":["../../../jsr/components/ImgGenUtils/ImgGenPromptWaiting.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,cAAc,EAAiB,MAAM,4BAA4B,CAAC;AAC3F,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ImgGenPromptWaiting.js","sourceRoot":"","sources":["../../../jsr/components/ImgGenUtils/ImgGenPromptWaiting.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,cAAc,EAAiB,MAAM,4BAA4B,CAAC;AAC3F,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAiBxD,MAAM,UAAU,mBAAmB,CAAC,EAClC,SAAS,EACT,OAAO,GAAG,cAAc,EACxB,QAAQ,EACR,KAAK,EACL,eAAe,GACU,EAAE;IAC3B,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,YAAY,CAAC,QAAQ,IAAI,QAAQ,CAAC,CAAC;IAG5D,MAAM,kBAAkB,GAAG,KAAK,CAAC,WAAW,CAC1C,KAAK,EAAE,KAAa,EAAE,EAAE,CAAC;QACvB,IAAI,CAAC,KAAK,CAAC,MAAM;YAAE,OAAO;QAE1B,IAAI,KAAK,EAAE,CAAC;YACV,OAAO,CAAC,GAAG,CAAC,kCAAkC,KAAK,CAAC,MAAM,gBAAgB,CAAC,CAAC;QAC9E,CAAC;QAED,IAAI,CAAC;YAEH,MAAM,MAAM,GAAG;gBACb,IAAI,EAAE,OAAO;gBACb,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACnC,MAAM,EAAE,EAA0B;aACnC,CAAC;YAGF,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,KAAK,EAAE,KAAK,EACZ,eAAe,EAAC,iDAAiD,GACjE,CACE,CACP,CAAC;AAAA,CACH"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import type { PartialImageDocument } from
|
|
3
|
-
import { Database } from
|
|
4
|
-
import { ImgGenClasses } from
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { PartialImageDocument } from "@vibes.diy/use-vibes-types";
|
|
3
|
+
import { Database } from "@fireproof/use-fireproof";
|
|
4
|
+
import { ImgGenClasses } from "../../utils/style-utils.js";
|
|
5
5
|
interface ImgGenUploadWaitingProps {
|
|
6
6
|
readonly document?: PartialImageDocument;
|
|
7
7
|
readonly className?: string;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { useFireproof, ImgFile } from
|
|
3
|
-
import { ImgGenFileDrop } from
|
|
4
|
-
import { combineClasses } from
|
|
5
|
-
import { imgGenStyles, imgGenTheme } from
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useFireproof, ImgFile } from "@fireproof/use-fireproof";
|
|
3
|
+
import { ImgGenFileDrop } from "../ImgGenUtils/ImgGenFileDrop.js";
|
|
4
|
+
import { combineClasses } from "../../utils/style-utils.js";
|
|
5
|
+
import { imgGenStyles, imgGenTheme } from "../../utils/styles.js";
|
|
6
6
|
export function ImgGenUploadWaiting({ document, className, classes, debug, database, onFilesAdded, onDocumentCreated, onPromptSubmit, }) {
|
|
7
|
-
const { database: db } = useFireproof(database ||
|
|
8
|
-
const [prompt, setPrompt] = React.useState(
|
|
7
|
+
const { database: db } = useFireproof(database || "ImgGen");
|
|
8
|
+
const [prompt, setPrompt] = React.useState("");
|
|
9
9
|
const [inputFiles, setInputFiles] = React.useState([]);
|
|
10
10
|
React.useEffect(() => {
|
|
11
11
|
if (document?._files) {
|
|
12
12
|
const inFiles = Object.keys(document._files)
|
|
13
|
-
.filter((key) => key.startsWith(
|
|
13
|
+
.filter((key) => key.startsWith("in"))
|
|
14
14
|
.sort();
|
|
15
15
|
setInputFiles(inFiles);
|
|
16
16
|
if (debug) {
|
|
17
|
-
console.log(
|
|
17
|
+
console.log("[ImgGenUploadWaiting] Found input files:", inFiles);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
}, [document, debug]);
|
|
@@ -38,7 +38,7 @@ export function ImgGenUploadWaiting({ document, className, classes, debug, datab
|
|
|
38
38
|
const createNewDocumentWithFiles = async (files) => {
|
|
39
39
|
try {
|
|
40
40
|
const newDoc = {
|
|
41
|
-
type:
|
|
41
|
+
type: "image",
|
|
42
42
|
createdAt: new Date().toISOString(),
|
|
43
43
|
_files: {},
|
|
44
44
|
};
|
|
@@ -47,14 +47,14 @@ export function ImgGenUploadWaiting({ document, className, classes, debug, datab
|
|
|
47
47
|
});
|
|
48
48
|
const result = await db.put(newDoc);
|
|
49
49
|
if (debug) {
|
|
50
|
-
console.log(
|
|
50
|
+
console.log("[ImgGenUploadWaiting] Created document for uploads:", result.id);
|
|
51
51
|
}
|
|
52
52
|
if (onDocumentCreated && result.id) {
|
|
53
53
|
onDocumentCreated(result.id);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
catch (error) {
|
|
57
|
-
console.error(
|
|
57
|
+
console.error("[ImgGenUploadWaiting] Error creating document for uploads:", error);
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
const addFilesToExistingDocument = async (files) => {
|
|
@@ -63,13 +63,13 @@ export function ImgGenUploadWaiting({ document, className, classes, debug, datab
|
|
|
63
63
|
try {
|
|
64
64
|
const doc = await db.get(document._id);
|
|
65
65
|
if (!doc) {
|
|
66
|
-
console.error(
|
|
66
|
+
console.error("[ImgGenUploadWaiting] Document not found:", document._id);
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
69
|
let maxInputNum = 0;
|
|
70
70
|
if (doc._files) {
|
|
71
71
|
Object.keys(doc._files).forEach((key) => {
|
|
72
|
-
if (key.startsWith(
|
|
72
|
+
if (key.startsWith("in")) {
|
|
73
73
|
const num = parseInt(key.substring(2), 10);
|
|
74
74
|
if (!isNaN(num) && num > maxInputNum) {
|
|
75
75
|
maxInputNum = num;
|
|
@@ -90,16 +90,16 @@ export function ImgGenUploadWaiting({ document, className, classes, debug, datab
|
|
|
90
90
|
}
|
|
91
91
|
const result = await db.put(updatedDoc);
|
|
92
92
|
if (debug) {
|
|
93
|
-
console.log(
|
|
93
|
+
console.log("[ImgGenUploadWaiting] Document updated with new files:", result.id);
|
|
94
94
|
}
|
|
95
95
|
const refreshedDoc = await db.get(result.id);
|
|
96
96
|
if (refreshedDoc) {
|
|
97
97
|
const inFiles = Object.keys(refreshedDoc._files || {})
|
|
98
|
-
.filter((key) => key.startsWith(
|
|
98
|
+
.filter((key) => key.startsWith("in"))
|
|
99
99
|
.sort();
|
|
100
100
|
setInputFiles(inFiles);
|
|
101
101
|
if (debug) {
|
|
102
|
-
console.log(
|
|
102
|
+
console.log("[ImgGenUploadWaiting] Refreshed input files:", inFiles);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
if (onFilesAdded) {
|
|
@@ -107,7 +107,7 @@ export function ImgGenUploadWaiting({ document, className, classes, debug, datab
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
catch (error) {
|
|
110
|
-
console.error(
|
|
110
|
+
console.error("[ImgGenUploadWaiting] Error updating document with new files:", error);
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
113
|
const handleSubmit = (e) => {
|
|
@@ -115,34 +115,34 @@ export function ImgGenUploadWaiting({ document, className, classes, debug, datab
|
|
|
115
115
|
if (prompt.trim()) {
|
|
116
116
|
if (document && document._id) {
|
|
117
117
|
if (debug) {
|
|
118
|
-
console.log(
|
|
118
|
+
console.log("[ImgGenUploadWaiting] Submitting prompt with document ID:", document._id);
|
|
119
119
|
}
|
|
120
120
|
onPromptSubmit(prompt.trim(), document._id);
|
|
121
121
|
}
|
|
122
122
|
else {
|
|
123
123
|
if (debug) {
|
|
124
|
-
console.log(
|
|
124
|
+
console.log("[ImgGenUploadWaiting] Submitting prompt with no document");
|
|
125
125
|
}
|
|
126
126
|
onPromptSubmit(prompt.trim());
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
};
|
|
130
|
-
return (React.createElement("div", { className: combineClasses(
|
|
131
|
-
React.createElement("div", { className: "imggen-placeholder-content", style: { textAlign:
|
|
132
|
-
React.createElement("h3", { style: { margin:
|
|
130
|
+
return (React.createElement("div", { className: combineClasses("imggen-upload-waiting", className || "", classes?.uploadWaiting || ""), style: imgGenStyles.uploadWaiting },
|
|
131
|
+
React.createElement("div", { className: "imggen-placeholder-content", style: { textAlign: "center" } },
|
|
132
|
+
React.createElement("h3", { style: { margin: "0 0 0.5rem 0", color: imgGenTheme.colors.titleText } }, "Image Generator")),
|
|
133
133
|
React.createElement("p", { style: { color: imgGenTheme.colors.titleText } }, "No prompt or file provided"),
|
|
134
134
|
React.createElement("form", { onSubmit: handleSubmit, className: "imggen-prompt-form", style: imgGenStyles.promptForm },
|
|
135
135
|
React.createElement("input", { type: "text", value: prompt, onChange: (e) => setPrompt(e.target.value), placeholder: "Enter a prompt...", className: "imggen-prompt-input", style: imgGenStyles.promptInput }),
|
|
136
136
|
React.createElement("button", { type: "submit", disabled: !prompt.trim(), className: "imggen-prompt-submit", style: {
|
|
137
137
|
...imgGenStyles.promptSubmit,
|
|
138
138
|
opacity: !prompt.trim() ? 0.5 : 1,
|
|
139
|
-
cursor: !prompt.trim() ?
|
|
139
|
+
cursor: !prompt.trim() ? "not-allowed" : "pointer",
|
|
140
140
|
} }, "Generate")),
|
|
141
141
|
inputFiles.length > 0 && (React.createElement("div", { className: "imggen-uploaded-previews", style: imgGenStyles.uploadedPreviews },
|
|
142
142
|
React.createElement("div", { className: "imggen-upload-count", style: imgGenStyles.uploadCount },
|
|
143
143
|
inputFiles.length,
|
|
144
144
|
" ",
|
|
145
|
-
inputFiles.length === 1 ?
|
|
145
|
+
inputFiles.length === 1 ? "image" : "images",
|
|
146
146
|
" uploaded"),
|
|
147
147
|
React.createElement("div", { className: "imggen-thumbnails", style: imgGenStyles.thumbnails },
|
|
148
148
|
inputFiles.slice(0, 4).map((fileKey) => (React.createElement("div", { key: fileKey, className: "imggen-thumbnail", style: imgGenStyles.thumbnail }, document?._files && document._files[fileKey] && (React.createElement(ImgFile, { file: document._files[fileKey], alt: `Upload ${fileKey}`, className: "imggen-thumbnail-img", style: imgGenStyles.thumbnailImg }))))),
|
|
@@ -150,6 +150,6 @@ export function ImgGenUploadWaiting({ document, className, classes, debug, datab
|
|
|
150
150
|
"+",
|
|
151
151
|
inputFiles.length - 4,
|
|
152
152
|
" more"))))),
|
|
153
|
-
React.createElement(ImgGenFileDrop, { className: classes?.dropZone ||
|
|
153
|
+
React.createElement(ImgGenFileDrop, { className: classes?.dropZone || "", onFilesDropped: handleFilesUploaded, isActive: true, maxFiles: 10, debug: debug, addFilesMessage: "Drop images or click to upload (optional)" })));
|
|
154
154
|
}
|
|
155
155
|
//# sourceMappingURL=ImgGenUploadWaiting.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImgGenUploadWaiting.js","sourceRoot":"","sources":["../../../jsr/components/ImgGenUtils/ImgGenUploadWaiting.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,OAAO,EAAY,MAAM,
|
|
1
|
+
{"version":3,"file":"ImgGenUploadWaiting.js","sourceRoot":"","sources":["../../../jsr/components/ImgGenUtils/ImgGenUploadWaiting.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,OAAO,EAAY,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAiB,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,YAAY,EAA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AI,CACxB,6BAAK,SAAS,EAAC,mBAAmB,EAAC,KAAK,EAAE,YAAY,CAAC,SAAS;;oBAC5D,UAAU,CAAC,MAAM,GAAG,CAAC;4BACnB,CACP,CACG,CACF,CACP;QAGD,oBAAC,cAAc,IACb,SAAS,EAAE,OAAO,EAAE,QAAQ,IAAI,EAAE,EAClC,cAAc,EAAE,mBAAmB,EACnC,QAAQ,EAAE,IAAI,EACd,QAAQ,EAAE,EAAE,EACZ,KAAK,EAAE,KAAK,EACZ,eAAe,EAAC,2CAA2C,GAC3D,CACE,CACP,CAAC;AAAA,CACH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ImgGenPromptWaiting } from
|
|
2
|
-
export { ImgGenError } from
|
|
3
|
-
export { ImgGenDisplayPlaceholder } from
|
|
4
|
-
export { ImgGenDisplay } from
|
|
5
|
-
export { ImgGenUploadWaiting } from
|
|
6
|
-
export * from
|
|
1
|
+
export { ImgGenPromptWaiting } from "./ImgGenPromptWaiting.js";
|
|
2
|
+
export { ImgGenError } from "./ImgGenError.js";
|
|
3
|
+
export { ImgGenDisplayPlaceholder } from "./ImgGenDisplayPlaceholder.js";
|
|
4
|
+
export { ImgGenDisplay } from "./ImgGenDisplay.js";
|
|
5
|
+
export { ImgGenUploadWaiting } from "./ImgGenUploadWaiting.js";
|
|
6
|
+
export * from "./types.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { ImgGenPromptWaiting } from
|
|
2
|
-
export { ImgGenError } from
|
|
3
|
-
export { ImgGenDisplayPlaceholder } from
|
|
4
|
-
export { ImgGenDisplay } from
|
|
5
|
-
export { ImgGenUploadWaiting } from
|
|
6
|
-
export * from
|
|
1
|
+
export { ImgGenPromptWaiting } from "./ImgGenPromptWaiting.js";
|
|
2
|
+
export { ImgGenError } from "./ImgGenError.js";
|
|
3
|
+
export { ImgGenDisplayPlaceholder } from "./ImgGenDisplayPlaceholder.js";
|
|
4
|
+
export { ImgGenDisplay } from "./ImgGenDisplay.js";
|
|
5
|
+
export { ImgGenUploadWaiting } from "./ImgGenUploadWaiting.js";
|
|
6
|
+
export * from "./types.js";
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { ImgGenClasses } from
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ImgGenClasses } from "../../../utils/style-utils.js";
|
|
3
3
|
interface DeleteConfirmationOverlayProps {
|
|
4
4
|
readonly handleDeleteConfirm: () => void;
|
|
5
5
|
readonly handleCancelDelete: () => void;
|