@vibes.diy/use-vibes-base 2.0.3 → 2.0.7
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 +44 -44
- package/hooks/vibes-gen/IframeVibesComponent.js +1 -1
- package/hooks/vibes-gen/IframeVibesComponent.js.map +1 -1
- package/hooks/vibes-gen/use-vibes.js +6 -12
- package/hooks/vibes-gen/use-vibes.js.map +1 -1
- package/index.d.ts +2 -13
- package/index.js +0 -10
- package/index.js.map +1 -1
- package/package.json +6 -4
- package/components/ControlsBar.d.ts +0 -20
- package/components/ControlsBar.js +0 -104
- package/components/ControlsBar.js.map +0 -1
- package/components/ImgGen.d.ts +0 -23
- package/components/ImgGen.js +0 -257
- package/components/ImgGen.js.map +0 -1
- package/components/ImgGenUtils/AsyncImg.d.ts +0 -7
- package/components/ImgGenUtils/AsyncImg.js +0 -41
- package/components/ImgGenUtils/AsyncImg.js.map +0 -1
- package/components/ImgGenUtils/ImgGenDisplay.d.ts +0 -3
- package/components/ImgGenUtils/ImgGenDisplay.js +0 -230
- package/components/ImgGenUtils/ImgGenDisplay.js.map +0 -1
- package/components/ImgGenUtils/ImgGenDisplayPlaceholder.d.ts +0 -3
- package/components/ImgGenUtils/ImgGenDisplayPlaceholder.js +0 -97
- package/components/ImgGenUtils/ImgGenDisplayPlaceholder.js.map +0 -1
- package/components/ImgGenUtils/ImgGenDisplayUtils.d.ts +0 -27
- package/components/ImgGenUtils/ImgGenDisplayUtils.js +0 -90
- package/components/ImgGenUtils/ImgGenDisplayUtils.js.map +0 -1
- package/components/ImgGenUtils/ImgGenError.d.ts +0 -3
- package/components/ImgGenUtils/ImgGenError.js +0 -9
- package/components/ImgGenUtils/ImgGenError.js.map +0 -1
- package/components/ImgGenUtils/ImgGenFileDrop.d.ts +0 -11
- package/components/ImgGenUtils/ImgGenFileDrop.js +0 -56
- package/components/ImgGenUtils/ImgGenFileDrop.js.map +0 -1
- package/components/ImgGenUtils/ImgGenModal.d.ts +0 -25
- package/components/ImgGenUtils/ImgGenModal.js +0 -67
- package/components/ImgGenUtils/ImgGenModal.js.map +0 -1
- package/components/ImgGenUtils/ImgGenModeUtils.d.ts +0 -9
- package/components/ImgGenUtils/ImgGenModeUtils.js +0 -58
- package/components/ImgGenUtils/ImgGenModeUtils.js.map +0 -1
- package/components/ImgGenUtils/ImgGenPromptWaiting.d.ts +0 -11
- package/components/ImgGenUtils/ImgGenPromptWaiting.js +0 -40
- package/components/ImgGenUtils/ImgGenPromptWaiting.js.map +0 -1
- package/components/ImgGenUtils/ImgGenUploadWaiting.d.ts +0 -16
- package/components/ImgGenUtils/ImgGenUploadWaiting.js +0 -154
- 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 -31
- 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 -11
- 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 -24
- package/components/PromptBar.js.map +0 -1
- package/hooks/image-gen/image-generator.d.ts +0 -11
- package/hooks/image-gen/image-generator.js +0 -146
- 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/use-image-gen.d.ts +0 -2
- package/hooks/image-gen/use-image-gen.js +0 -537
- package/hooks/image-gen/use-image-gen.js.map +0 -1
- package/hooks/image-gen/utils.d.ts +0 -19
- package/hooks/image-gen/utils.js +0 -150
- package/hooks/image-gen/utils.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 -4
- package/utils/style-utils.js +0 -15
- package/utils/style-utils.js.map +0 -1
- package/utils/styles.d.ts +0 -325
- package/utils/styles.js +0 -328
- package/utils/styles.js.map +0 -1
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { imageGen as originalImageGen } from "call-ai";
|
|
2
|
-
import { MODULE_STATE, getRelevantOptions } from "./utils.js";
|
|
3
|
-
export async function imageGen(prompt, options) {
|
|
4
|
-
const relevantOptions = getRelevantOptions(options);
|
|
5
|
-
const stableKey = options?._regenerationId
|
|
6
|
-
? `${prompt}-${JSON.stringify(relevantOptions)}-regen-${options._regenerationId}`
|
|
7
|
-
: `${prompt}-${JSON.stringify(relevantOptions)}`;
|
|
8
|
-
const requestId = ++MODULE_STATE.requestCounter;
|
|
9
|
-
if (MODULE_STATE.pendingPrompts.has(stableKey)) {
|
|
10
|
-
if (MODULE_STATE.pendingImageGenCalls.has(stableKey)) {
|
|
11
|
-
return MODULE_STATE.pendingImageGenCalls.get(stableKey);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
MODULE_STATE.pendingPrompts.add(stableKey);
|
|
15
|
-
MODULE_STATE.processingRequests.add(stableKey);
|
|
16
|
-
MODULE_STATE.requestTimestamps.set(stableKey, Date.now());
|
|
17
|
-
if (options?.debug) {
|
|
18
|
-
console.log(`[ImgGen Debug] Generating image with prompt: "${prompt}"`, {
|
|
19
|
-
requestId,
|
|
20
|
-
options,
|
|
21
|
-
hasImages: options.images ? options.images.length + " files" : "No",
|
|
22
|
-
stableKey,
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
let promise;
|
|
26
|
-
try {
|
|
27
|
-
const enhancedOptions = { ...options };
|
|
28
|
-
if (!enhancedOptions.images && enhancedOptions.document && enhancedOptions.document._files) {
|
|
29
|
-
const imageFiles = [];
|
|
30
|
-
for (const key of Object.keys(enhancedOptions.document._files)) {
|
|
31
|
-
if (key.startsWith("in") || key === "original") {
|
|
32
|
-
const file = enhancedOptions.document._files[key];
|
|
33
|
-
if (file) {
|
|
34
|
-
if (file instanceof File) {
|
|
35
|
-
imageFiles.push(file);
|
|
36
|
-
}
|
|
37
|
-
else if (typeof file.file === "function") {
|
|
38
|
-
try {
|
|
39
|
-
const fileObj = await file.file();
|
|
40
|
-
imageFiles.push(fileObj);
|
|
41
|
-
}
|
|
42
|
-
catch (e) {
|
|
43
|
-
if (enhancedOptions.debug) {
|
|
44
|
-
console.error(`Error getting file from DocFileMeta for key ${key}:`, e);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
if (imageFiles.length > 0) {
|
|
52
|
-
enhancedOptions.images = imageFiles;
|
|
53
|
-
if (enhancedOptions.debug) {
|
|
54
|
-
console.log("[ImgGen Debug] Extracted images from document:", {
|
|
55
|
-
count: imageFiles.length,
|
|
56
|
-
keys: Object.keys(enhancedOptions.document._files).filter((k) => k.startsWith("in") || k === "original"),
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
promise = originalImageGen(prompt, enhancedOptions);
|
|
62
|
-
}
|
|
63
|
-
catch (e) {
|
|
64
|
-
if (options?.debug) {
|
|
65
|
-
console.error(`[ImgGen Debug] Error with imageGen for request #${requestId}:`, e);
|
|
66
|
-
}
|
|
67
|
-
promise = Promise.reject(e);
|
|
68
|
-
}
|
|
69
|
-
MODULE_STATE.pendingImageGenCalls.set(stableKey, promise);
|
|
70
|
-
promise
|
|
71
|
-
.then((response) => {
|
|
72
|
-
MODULE_STATE.processingRequests.delete(stableKey);
|
|
73
|
-
return response;
|
|
74
|
-
})
|
|
75
|
-
.catch((error) => {
|
|
76
|
-
if (options?.debug) {
|
|
77
|
-
console.error(`[ImgGen Debug] Request #${requestId} failed [key:${stableKey.slice(0, 12)}...]: ${error}`);
|
|
78
|
-
}
|
|
79
|
-
MODULE_STATE.processingRequests.delete(stableKey);
|
|
80
|
-
return Promise.reject(error);
|
|
81
|
-
});
|
|
82
|
-
return promise;
|
|
83
|
-
}
|
|
84
|
-
export function createImageGenerator(requestHash) {
|
|
85
|
-
return async (promptText, genOptions) => {
|
|
86
|
-
JSON.stringify(getRelevantOptions(genOptions));
|
|
87
|
-
const debug = genOptions?.debug;
|
|
88
|
-
if (genOptions && "document" in genOptions && genOptions.document) {
|
|
89
|
-
const document = genOptions.document;
|
|
90
|
-
const imageFiles = [];
|
|
91
|
-
if (document._files) {
|
|
92
|
-
for (const key of Object.keys(document._files)) {
|
|
93
|
-
if (key.startsWith("in")) {
|
|
94
|
-
const file = document._files[key];
|
|
95
|
-
if (file) {
|
|
96
|
-
if (file instanceof File) {
|
|
97
|
-
imageFiles.push(file);
|
|
98
|
-
}
|
|
99
|
-
else if (typeof file.file === "function") {
|
|
100
|
-
try {
|
|
101
|
-
const fileObj = await file.file();
|
|
102
|
-
imageFiles.push(fileObj);
|
|
103
|
-
}
|
|
104
|
-
catch (e) {
|
|
105
|
-
if (debug) {
|
|
106
|
-
console.error(`Error getting file from DocFileMeta for key ${key}:`, e);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
if (imageFiles.length > 0) {
|
|
115
|
-
if (debug) {
|
|
116
|
-
console.log("[imageGenerator] Found images to include:", {
|
|
117
|
-
count: imageFiles.length,
|
|
118
|
-
fileTypes: imageFiles.map((f) => f.type),
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
genOptions = {
|
|
122
|
-
...genOptions,
|
|
123
|
-
images: imageFiles,
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
try {
|
|
128
|
-
if (debug) {
|
|
129
|
-
console.log(`[imageGenerator] Generating image with prompt: "${promptText.slice(0, 30)}...", options:`, {
|
|
130
|
-
...genOptions,
|
|
131
|
-
hasImages: genOptions?.images ? "Yes" : "No",
|
|
132
|
-
imageCount: genOptions?.images ? genOptions.images.length : 0,
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
const response = await imageGen(promptText, genOptions);
|
|
136
|
-
return response;
|
|
137
|
-
}
|
|
138
|
-
catch (error) {
|
|
139
|
-
if (debug) {
|
|
140
|
-
console.error(`[ImgGen Debug] Failed request [ID:${requestHash}]: ${error}`);
|
|
141
|
-
}
|
|
142
|
-
throw error;
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
//# sourceMappingURL=image-generator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"image-generator.js","sourceRoot":"","sources":["../../../jsr/hooks/image-gen/image-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyD,QAAQ,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC9G,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAiB9D,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,MAAc,EAAE,OAAkC;IAE/E,MAAM,eAAe,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAOpD,MAAM,SAAS,GAAG,OAAO,EAAE,eAAe;QACxC,CAAC,CAAC,GAAG,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,UAAU,OAAO,CAAC,eAAe,EAAE;QACjF,CAAC,CAAC,GAAG,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC;IAGnD,MAAM,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,IAAI,KAAK,EAAE,CAAC;gBACV,OAAO,CAAC,GAAG,CAAC,mDAAmD,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,EAAE;oBACtG,GAAG,UAAU;oBACb,SAAS,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;oBAC5C,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;iBAC9D,CAAC,CAAC;YACL,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;YACxD,OAAO,QAAQ,CAAC;QAClB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,EAAE,CAAC;gBACV,OAAO,CAAC,KAAK,CAAC,qCAAqC,WAAW,MAAM,KAAK,EAAE,CAAC,CAAC;YAC/E,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { useImageGen } from "./use-image-gen.js";
|
|
2
|
-
import { imageGen } from "./image-generator.js";
|
|
3
|
-
import { base64ToFile, hashInput, MODULE_STATE } from "./utils.js";
|
|
4
|
-
import type { ImageDocument, UseImageGenOptions, UseImageGenResult } from "@vibes.diy/use-vibes-types";
|
|
5
|
-
export { MODULE_STATE };
|
|
6
|
-
export { useImageGen, imageGen, base64ToFile, hashInput };
|
|
7
|
-
export type { ImageDocument, UseImageGenOptions, UseImageGenResult };
|
package/hooks/image-gen/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { useImageGen } from "./use-image-gen.js";
|
|
2
|
-
import { imageGen } from "./image-generator.js";
|
|
3
|
-
import { base64ToFile, hashInput, MODULE_STATE } from "./utils.js";
|
|
4
|
-
export { MODULE_STATE };
|
|
5
|
-
export { useImageGen, imageGen, base64ToFile, hashInput };
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../jsr/hooks/image-gen/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAGnE,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC"}
|