@rslsp1/fa-app-tools 1.3.14 → 1.3.15
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/dist/index.d.mts +40 -2
- package/dist/index.d.ts +40 -2
- package/dist/index.js +81 -1
- package/dist/index.mjs +79 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -316,6 +316,44 @@ interface AvatarArchitectAppProps {
|
|
|
316
316
|
}
|
|
317
317
|
declare function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onSelectMedia, buildInfo, onFetchServerProjects, onServerSave, onServerLoad, onServerDelete }: AvatarArchitectAppProps): react_jsx_runtime.JSX.Element;
|
|
318
318
|
|
|
319
|
+
interface FaAppProps {
|
|
320
|
+
onGenerateImage: (params: Record<string, any>) => Promise<{
|
|
321
|
+
base64: string;
|
|
322
|
+
mediaId?: string;
|
|
323
|
+
}>;
|
|
324
|
+
onGeneratePrompt: (prompt: string, options?: {
|
|
325
|
+
images?: {
|
|
326
|
+
base64: string;
|
|
327
|
+
mimeType: string;
|
|
328
|
+
}[];
|
|
329
|
+
systemInstruction?: string;
|
|
330
|
+
}) => Promise<{
|
|
331
|
+
text: string;
|
|
332
|
+
}>;
|
|
333
|
+
onGenerateVideo?: (params: Record<string, any>) => Promise<{
|
|
334
|
+
base64: string;
|
|
335
|
+
mimeType: string;
|
|
336
|
+
}>;
|
|
337
|
+
onDownload: (base64: string, mimeType: string, filename: string) => Promise<void>;
|
|
338
|
+
onSelectMedia: () => Promise<MediaItem[]>;
|
|
339
|
+
onFlowSave?: (base64: string, mimeType: string, name: string) => Promise<{
|
|
340
|
+
mediaId: string;
|
|
341
|
+
}>;
|
|
342
|
+
onFlowUpload?: (base64: string, mimeType: string, name: string) => Promise<{
|
|
343
|
+
mediaId: string;
|
|
344
|
+
}>;
|
|
345
|
+
onFlowMediaUpload?: (base64: string, mimeType: string, name: string) => Promise<{
|
|
346
|
+
mediaId: string;
|
|
347
|
+
}>;
|
|
348
|
+
libToken?: string;
|
|
349
|
+
onFetchServerProjects?: () => Promise<ProjectMeta[]>;
|
|
350
|
+
onServerSave?: (zipBase64: string, name: string) => Promise<ProjectMeta>;
|
|
351
|
+
onServerLoad?: (id: string) => Promise<File>;
|
|
352
|
+
onServerDelete?: (id: string) => Promise<void>;
|
|
353
|
+
buildInfo?: string;
|
|
354
|
+
}
|
|
355
|
+
declare function FaApp({ onGenerateImage, onGeneratePrompt, onGenerateVideo: _onGenerateVideo, onDownload, onSelectMedia, onFlowSave: _onFlowSave, onFlowUpload: _onFlowUpload, onFlowMediaUpload: _onFlowMediaUpload, libToken, onFetchServerProjects, onServerSave, onServerLoad, onServerDelete, buildInfo, }: FaAppProps): react_jsx_runtime.JSX.Element;
|
|
356
|
+
|
|
319
357
|
interface CollapsibleCardProps {
|
|
320
358
|
title: string;
|
|
321
359
|
icon?: ReactNode;
|
|
@@ -479,6 +517,6 @@ declare function hfLoadMetadata(token: string): Promise<any[]>;
|
|
|
479
517
|
declare function hfUploadImage(base64: string, id: string, token: string, mimeType?: string): Promise<void>;
|
|
480
518
|
declare function hfLoadImageAsBase64(id: string, token: string): Promise<string | null>;
|
|
481
519
|
|
|
482
|
-
declare const LIB_VERSION = "1.3.
|
|
520
|
+
declare const LIB_VERSION = "1.3.15";
|
|
483
521
|
|
|
484
|
-
export { AvatarArchitectApp, type AvatarArchitectAppProps, CollapsibleCard, CompactDropdown, type ExtractedCharacter, FaToolsBadge, type FlowSdk, GLOBAL_STYLES, type Generation, type HFMetadataEntry, HistoryPanel, InspectPanel, LIB_VERSION, LabBlend, LabCompare, type LabFrame, LabImagePicker, type LabItem, LabLoop, LabRemix, type LabServices, LabsTab, ListView, type MediaItem, MediaLibrary, PillButton, type ProjectMeta, type ProjectSettings, ProjectSyncTab, PromptTab, SectionLabel, type SelectedLabImage, type SelectedTag, SetupPanel, type SyncDiff, TagManagerPanel, type TagOption, type WorkspaceTags, autoLabel, buildBlendInstruction, buildCompareInstruction, buildFallbackPrompt, buildGenerationPrompt, buildImageGenerationOptions, buildLoopInstruction, buildPromptTabPayload, buildReferenceImageMediaIds, buildRemixInstruction, buildScanInstruction, cleanAiResponse, createFlowServices, exportProjectToZip, formatTreeToMarkdown, frameToGeneration, getFormattedTimestamp, getHFToken, groupGenerationsToLabItems, hfDeleteProject, hfDownloadProject, hfListProjects, hfLoadImageAsBase64, hfLoadMetadata, hfLoadTags, hfSaveMetadata, hfSaveTags, hfUploadImage, hfUploadProjectForm, importProjectFromZip, injectXMPMetadata, interpretSdkError, parsePromptFile, parsePromptResponse, setHFToken, useKeyboardNavigation, useOnClickOutside };
|
|
522
|
+
export { AvatarArchitectApp, type AvatarArchitectAppProps, CollapsibleCard, CompactDropdown, type ExtractedCharacter, FaApp, type FaAppProps, FaToolsBadge, type FlowSdk, GLOBAL_STYLES, type Generation, type HFMetadataEntry, HistoryPanel, InspectPanel, LIB_VERSION, LabBlend, LabCompare, type LabFrame, LabImagePicker, type LabItem, LabLoop, LabRemix, type LabServices, LabsTab, ListView, type MediaItem, MediaLibrary, PillButton, type ProjectMeta, type ProjectSettings, ProjectSyncTab, PromptTab, SectionLabel, type SelectedLabImage, type SelectedTag, SetupPanel, type SyncDiff, TagManagerPanel, type TagOption, type WorkspaceTags, autoLabel, buildBlendInstruction, buildCompareInstruction, buildFallbackPrompt, buildGenerationPrompt, buildImageGenerationOptions, buildLoopInstruction, buildPromptTabPayload, buildReferenceImageMediaIds, buildRemixInstruction, buildScanInstruction, cleanAiResponse, createFlowServices, exportProjectToZip, formatTreeToMarkdown, frameToGeneration, getFormattedTimestamp, getHFToken, groupGenerationsToLabItems, hfDeleteProject, hfDownloadProject, hfListProjects, hfLoadImageAsBase64, hfLoadMetadata, hfLoadTags, hfSaveMetadata, hfSaveTags, hfUploadImage, hfUploadProjectForm, importProjectFromZip, injectXMPMetadata, interpretSdkError, parsePromptFile, parsePromptResponse, setHFToken, useKeyboardNavigation, useOnClickOutside };
|
package/dist/index.d.ts
CHANGED
|
@@ -316,6 +316,44 @@ interface AvatarArchitectAppProps {
|
|
|
316
316
|
}
|
|
317
317
|
declare function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onSelectMedia, buildInfo, onFetchServerProjects, onServerSave, onServerLoad, onServerDelete }: AvatarArchitectAppProps): react_jsx_runtime.JSX.Element;
|
|
318
318
|
|
|
319
|
+
interface FaAppProps {
|
|
320
|
+
onGenerateImage: (params: Record<string, any>) => Promise<{
|
|
321
|
+
base64: string;
|
|
322
|
+
mediaId?: string;
|
|
323
|
+
}>;
|
|
324
|
+
onGeneratePrompt: (prompt: string, options?: {
|
|
325
|
+
images?: {
|
|
326
|
+
base64: string;
|
|
327
|
+
mimeType: string;
|
|
328
|
+
}[];
|
|
329
|
+
systemInstruction?: string;
|
|
330
|
+
}) => Promise<{
|
|
331
|
+
text: string;
|
|
332
|
+
}>;
|
|
333
|
+
onGenerateVideo?: (params: Record<string, any>) => Promise<{
|
|
334
|
+
base64: string;
|
|
335
|
+
mimeType: string;
|
|
336
|
+
}>;
|
|
337
|
+
onDownload: (base64: string, mimeType: string, filename: string) => Promise<void>;
|
|
338
|
+
onSelectMedia: () => Promise<MediaItem[]>;
|
|
339
|
+
onFlowSave?: (base64: string, mimeType: string, name: string) => Promise<{
|
|
340
|
+
mediaId: string;
|
|
341
|
+
}>;
|
|
342
|
+
onFlowUpload?: (base64: string, mimeType: string, name: string) => Promise<{
|
|
343
|
+
mediaId: string;
|
|
344
|
+
}>;
|
|
345
|
+
onFlowMediaUpload?: (base64: string, mimeType: string, name: string) => Promise<{
|
|
346
|
+
mediaId: string;
|
|
347
|
+
}>;
|
|
348
|
+
libToken?: string;
|
|
349
|
+
onFetchServerProjects?: () => Promise<ProjectMeta[]>;
|
|
350
|
+
onServerSave?: (zipBase64: string, name: string) => Promise<ProjectMeta>;
|
|
351
|
+
onServerLoad?: (id: string) => Promise<File>;
|
|
352
|
+
onServerDelete?: (id: string) => Promise<void>;
|
|
353
|
+
buildInfo?: string;
|
|
354
|
+
}
|
|
355
|
+
declare function FaApp({ onGenerateImage, onGeneratePrompt, onGenerateVideo: _onGenerateVideo, onDownload, onSelectMedia, onFlowSave: _onFlowSave, onFlowUpload: _onFlowUpload, onFlowMediaUpload: _onFlowMediaUpload, libToken, onFetchServerProjects, onServerSave, onServerLoad, onServerDelete, buildInfo, }: FaAppProps): react_jsx_runtime.JSX.Element;
|
|
356
|
+
|
|
319
357
|
interface CollapsibleCardProps {
|
|
320
358
|
title: string;
|
|
321
359
|
icon?: ReactNode;
|
|
@@ -479,6 +517,6 @@ declare function hfLoadMetadata(token: string): Promise<any[]>;
|
|
|
479
517
|
declare function hfUploadImage(base64: string, id: string, token: string, mimeType?: string): Promise<void>;
|
|
480
518
|
declare function hfLoadImageAsBase64(id: string, token: string): Promise<string | null>;
|
|
481
519
|
|
|
482
|
-
declare const LIB_VERSION = "1.3.
|
|
520
|
+
declare const LIB_VERSION = "1.3.15";
|
|
483
521
|
|
|
484
|
-
export { AvatarArchitectApp, type AvatarArchitectAppProps, CollapsibleCard, CompactDropdown, type ExtractedCharacter, FaToolsBadge, type FlowSdk, GLOBAL_STYLES, type Generation, type HFMetadataEntry, HistoryPanel, InspectPanel, LIB_VERSION, LabBlend, LabCompare, type LabFrame, LabImagePicker, type LabItem, LabLoop, LabRemix, type LabServices, LabsTab, ListView, type MediaItem, MediaLibrary, PillButton, type ProjectMeta, type ProjectSettings, ProjectSyncTab, PromptTab, SectionLabel, type SelectedLabImage, type SelectedTag, SetupPanel, type SyncDiff, TagManagerPanel, type TagOption, type WorkspaceTags, autoLabel, buildBlendInstruction, buildCompareInstruction, buildFallbackPrompt, buildGenerationPrompt, buildImageGenerationOptions, buildLoopInstruction, buildPromptTabPayload, buildReferenceImageMediaIds, buildRemixInstruction, buildScanInstruction, cleanAiResponse, createFlowServices, exportProjectToZip, formatTreeToMarkdown, frameToGeneration, getFormattedTimestamp, getHFToken, groupGenerationsToLabItems, hfDeleteProject, hfDownloadProject, hfListProjects, hfLoadImageAsBase64, hfLoadMetadata, hfLoadTags, hfSaveMetadata, hfSaveTags, hfUploadImage, hfUploadProjectForm, importProjectFromZip, injectXMPMetadata, interpretSdkError, parsePromptFile, parsePromptResponse, setHFToken, useKeyboardNavigation, useOnClickOutside };
|
|
522
|
+
export { AvatarArchitectApp, type AvatarArchitectAppProps, CollapsibleCard, CompactDropdown, type ExtractedCharacter, FaApp, type FaAppProps, FaToolsBadge, type FlowSdk, GLOBAL_STYLES, type Generation, type HFMetadataEntry, HistoryPanel, InspectPanel, LIB_VERSION, LabBlend, LabCompare, type LabFrame, LabImagePicker, type LabItem, LabLoop, LabRemix, type LabServices, LabsTab, ListView, type MediaItem, MediaLibrary, PillButton, type ProjectMeta, type ProjectSettings, ProjectSyncTab, PromptTab, SectionLabel, type SelectedLabImage, type SelectedTag, SetupPanel, type SyncDiff, TagManagerPanel, type TagOption, type WorkspaceTags, autoLabel, buildBlendInstruction, buildCompareInstruction, buildFallbackPrompt, buildGenerationPrompt, buildImageGenerationOptions, buildLoopInstruction, buildPromptTabPayload, buildReferenceImageMediaIds, buildRemixInstruction, buildScanInstruction, cleanAiResponse, createFlowServices, exportProjectToZip, formatTreeToMarkdown, frameToGeneration, getFormattedTimestamp, getHFToken, groupGenerationsToLabItems, hfDeleteProject, hfDownloadProject, hfListProjects, hfLoadImageAsBase64, hfLoadMetadata, hfLoadTags, hfSaveMetadata, hfSaveTags, hfUploadImage, hfUploadProjectForm, importProjectFromZip, injectXMPMetadata, interpretSdkError, parsePromptFile, parsePromptResponse, setHFToken, useKeyboardNavigation, useOnClickOutside };
|
package/dist/index.js
CHANGED
|
@@ -504,6 +504,7 @@ __export(index_exports, {
|
|
|
504
504
|
AvatarArchitectApp: () => AvatarArchitectApp,
|
|
505
505
|
CollapsibleCard: () => CollapsibleCard,
|
|
506
506
|
CompactDropdown: () => CompactDropdown,
|
|
507
|
+
FaApp: () => FaApp,
|
|
507
508
|
FaToolsBadge: () => FaToolsBadge,
|
|
508
509
|
GLOBAL_STYLES: () => GLOBAL_STYLES,
|
|
509
510
|
HistoryPanel: () => HistoryPanel,
|
|
@@ -4952,14 +4953,93 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4952
4953
|
] });
|
|
4953
4954
|
}
|
|
4954
4955
|
|
|
4956
|
+
// src/components/FaApp.tsx
|
|
4957
|
+
var import_react22 = require("react");
|
|
4958
|
+
init_hfStateService();
|
|
4959
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
4960
|
+
function TokenDialog({ onSubmit }) {
|
|
4961
|
+
const [value, setValue] = (0, import_react22.useState)("");
|
|
4962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { minHeight: "100vh", background: "#0e0e0e", display: "flex", alignItems: "center", justifyContent: "center", padding: 16 }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { width: "100%", maxWidth: 400, background: "#171717", border: "1px solid #262626", borderRadius: 8, padding: 24, position: "relative", overflow: "hidden" }, children: [
|
|
4963
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { position: "absolute", top: 0, left: 0, width: "100%", height: 3, background: "linear-gradient(to right, #3b82f6, #a855f7, #ec4899)" } }),
|
|
4964
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { marginBottom: 20 }, children: [
|
|
4965
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { color: "#fff", fontSize: 14, fontWeight: 700, marginBottom: 4 }, children: "Lib Token" }),
|
|
4966
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { color: "#525252", fontSize: 11, fontFamily: "monospace" }, children: "Kein Token konfiguriert \u2014 bitte manuell eingeben" })
|
|
4967
|
+
] }),
|
|
4968
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4969
|
+
"input",
|
|
4970
|
+
{
|
|
4971
|
+
type: "password",
|
|
4972
|
+
value,
|
|
4973
|
+
onChange: (e) => setValue(e.target.value),
|
|
4974
|
+
onKeyDown: (e) => e.key === "Enter" && value.trim() && onSubmit(value.trim()),
|
|
4975
|
+
placeholder: "Token eingeben\u2026",
|
|
4976
|
+
autoFocus: true,
|
|
4977
|
+
style: { width: "100%", background: "#000", border: "1px solid #404040", borderRadius: 4, color: "#fff", padding: "10px 12px", fontSize: 12, fontFamily: "monospace", outline: "none", boxSizing: "border-box", marginBottom: 12 }
|
|
4978
|
+
}
|
|
4979
|
+
),
|
|
4980
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4981
|
+
"button",
|
|
4982
|
+
{
|
|
4983
|
+
onClick: () => value.trim() && onSubmit(value.trim()),
|
|
4984
|
+
style: { width: "100%", background: "#3b82f6", border: "none", borderRadius: 4, color: "#fff", padding: "10px", fontSize: 12, fontWeight: 700, cursor: "pointer", fontFamily: "inherit" },
|
|
4985
|
+
children: "Best\xE4tigen"
|
|
4986
|
+
}
|
|
4987
|
+
)
|
|
4988
|
+
] }) });
|
|
4989
|
+
}
|
|
4990
|
+
function FaApp({
|
|
4991
|
+
onGenerateImage,
|
|
4992
|
+
onGeneratePrompt,
|
|
4993
|
+
onGenerateVideo: _onGenerateVideo,
|
|
4994
|
+
onDownload,
|
|
4995
|
+
onSelectMedia,
|
|
4996
|
+
onFlowSave: _onFlowSave,
|
|
4997
|
+
onFlowUpload: _onFlowUpload,
|
|
4998
|
+
onFlowMediaUpload: _onFlowMediaUpload,
|
|
4999
|
+
libToken,
|
|
5000
|
+
onFetchServerProjects,
|
|
5001
|
+
onServerSave,
|
|
5002
|
+
onServerLoad,
|
|
5003
|
+
onServerDelete,
|
|
5004
|
+
buildInfo
|
|
5005
|
+
}) {
|
|
5006
|
+
const [token, setToken] = (0, import_react22.useState)(libToken || "");
|
|
5007
|
+
(0, import_react22.useEffect)(() => {
|
|
5008
|
+
if (libToken) setToken(libToken);
|
|
5009
|
+
}, [libToken]);
|
|
5010
|
+
(0, import_react22.useEffect)(() => {
|
|
5011
|
+
if (token) setHFToken(token);
|
|
5012
|
+
}, [token]);
|
|
5013
|
+
if (!token) return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TokenDialog, { onSubmit: setToken });
|
|
5014
|
+
const wrappedPrompt = async (text, options) => {
|
|
5015
|
+
const result = await onGeneratePrompt(text, options);
|
|
5016
|
+
return result.text;
|
|
5017
|
+
};
|
|
5018
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
5019
|
+
AvatarArchitectApp,
|
|
5020
|
+
{
|
|
5021
|
+
onGenerateImage,
|
|
5022
|
+
onGeneratePrompt: wrappedPrompt,
|
|
5023
|
+
onDownload,
|
|
5024
|
+
onSelectMedia,
|
|
5025
|
+
onFetchServerProjects,
|
|
5026
|
+
onServerSave,
|
|
5027
|
+
onServerLoad,
|
|
5028
|
+
onServerDelete,
|
|
5029
|
+
buildInfo
|
|
5030
|
+
}
|
|
5031
|
+
);
|
|
5032
|
+
}
|
|
5033
|
+
|
|
4955
5034
|
// src/index.ts
|
|
4956
5035
|
init_hfStateService();
|
|
4957
|
-
var LIB_VERSION = "1.3.
|
|
5036
|
+
var LIB_VERSION = "1.3.15";
|
|
4958
5037
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4959
5038
|
0 && (module.exports = {
|
|
4960
5039
|
AvatarArchitectApp,
|
|
4961
5040
|
CollapsibleCard,
|
|
4962
5041
|
CompactDropdown,
|
|
5042
|
+
FaApp,
|
|
4963
5043
|
FaToolsBadge,
|
|
4964
5044
|
GLOBAL_STYLES,
|
|
4965
5045
|
HistoryPanel,
|
package/dist/index.mjs
CHANGED
|
@@ -4395,12 +4395,90 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4395
4395
|
] });
|
|
4396
4396
|
}
|
|
4397
4397
|
|
|
4398
|
+
// src/components/FaApp.tsx
|
|
4399
|
+
import { useState as useState15, useEffect as useEffect6 } from "react";
|
|
4400
|
+
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4401
|
+
function TokenDialog({ onSubmit }) {
|
|
4402
|
+
const [value, setValue] = useState15("");
|
|
4403
|
+
return /* @__PURE__ */ jsx21("div", { style: { minHeight: "100vh", background: "#0e0e0e", display: "flex", alignItems: "center", justifyContent: "center", padding: 16 }, children: /* @__PURE__ */ jsxs19("div", { style: { width: "100%", maxWidth: 400, background: "#171717", border: "1px solid #262626", borderRadius: 8, padding: 24, position: "relative", overflow: "hidden" }, children: [
|
|
4404
|
+
/* @__PURE__ */ jsx21("div", { style: { position: "absolute", top: 0, left: 0, width: "100%", height: 3, background: "linear-gradient(to right, #3b82f6, #a855f7, #ec4899)" } }),
|
|
4405
|
+
/* @__PURE__ */ jsxs19("div", { style: { marginBottom: 20 }, children: [
|
|
4406
|
+
/* @__PURE__ */ jsx21("div", { style: { color: "#fff", fontSize: 14, fontWeight: 700, marginBottom: 4 }, children: "Lib Token" }),
|
|
4407
|
+
/* @__PURE__ */ jsx21("div", { style: { color: "#525252", fontSize: 11, fontFamily: "monospace" }, children: "Kein Token konfiguriert \u2014 bitte manuell eingeben" })
|
|
4408
|
+
] }),
|
|
4409
|
+
/* @__PURE__ */ jsx21(
|
|
4410
|
+
"input",
|
|
4411
|
+
{
|
|
4412
|
+
type: "password",
|
|
4413
|
+
value,
|
|
4414
|
+
onChange: (e) => setValue(e.target.value),
|
|
4415
|
+
onKeyDown: (e) => e.key === "Enter" && value.trim() && onSubmit(value.trim()),
|
|
4416
|
+
placeholder: "Token eingeben\u2026",
|
|
4417
|
+
autoFocus: true,
|
|
4418
|
+
style: { width: "100%", background: "#000", border: "1px solid #404040", borderRadius: 4, color: "#fff", padding: "10px 12px", fontSize: 12, fontFamily: "monospace", outline: "none", boxSizing: "border-box", marginBottom: 12 }
|
|
4419
|
+
}
|
|
4420
|
+
),
|
|
4421
|
+
/* @__PURE__ */ jsx21(
|
|
4422
|
+
"button",
|
|
4423
|
+
{
|
|
4424
|
+
onClick: () => value.trim() && onSubmit(value.trim()),
|
|
4425
|
+
style: { width: "100%", background: "#3b82f6", border: "none", borderRadius: 4, color: "#fff", padding: "10px", fontSize: 12, fontWeight: 700, cursor: "pointer", fontFamily: "inherit" },
|
|
4426
|
+
children: "Best\xE4tigen"
|
|
4427
|
+
}
|
|
4428
|
+
)
|
|
4429
|
+
] }) });
|
|
4430
|
+
}
|
|
4431
|
+
function FaApp({
|
|
4432
|
+
onGenerateImage,
|
|
4433
|
+
onGeneratePrompt,
|
|
4434
|
+
onGenerateVideo: _onGenerateVideo,
|
|
4435
|
+
onDownload,
|
|
4436
|
+
onSelectMedia,
|
|
4437
|
+
onFlowSave: _onFlowSave,
|
|
4438
|
+
onFlowUpload: _onFlowUpload,
|
|
4439
|
+
onFlowMediaUpload: _onFlowMediaUpload,
|
|
4440
|
+
libToken,
|
|
4441
|
+
onFetchServerProjects,
|
|
4442
|
+
onServerSave,
|
|
4443
|
+
onServerLoad,
|
|
4444
|
+
onServerDelete,
|
|
4445
|
+
buildInfo
|
|
4446
|
+
}) {
|
|
4447
|
+
const [token, setToken] = useState15(libToken || "");
|
|
4448
|
+
useEffect6(() => {
|
|
4449
|
+
if (libToken) setToken(libToken);
|
|
4450
|
+
}, [libToken]);
|
|
4451
|
+
useEffect6(() => {
|
|
4452
|
+
if (token) setHFToken(token);
|
|
4453
|
+
}, [token]);
|
|
4454
|
+
if (!token) return /* @__PURE__ */ jsx21(TokenDialog, { onSubmit: setToken });
|
|
4455
|
+
const wrappedPrompt = async (text, options) => {
|
|
4456
|
+
const result = await onGeneratePrompt(text, options);
|
|
4457
|
+
return result.text;
|
|
4458
|
+
};
|
|
4459
|
+
return /* @__PURE__ */ jsx21(
|
|
4460
|
+
AvatarArchitectApp,
|
|
4461
|
+
{
|
|
4462
|
+
onGenerateImage,
|
|
4463
|
+
onGeneratePrompt: wrappedPrompt,
|
|
4464
|
+
onDownload,
|
|
4465
|
+
onSelectMedia,
|
|
4466
|
+
onFetchServerProjects,
|
|
4467
|
+
onServerSave,
|
|
4468
|
+
onServerLoad,
|
|
4469
|
+
onServerDelete,
|
|
4470
|
+
buildInfo
|
|
4471
|
+
}
|
|
4472
|
+
);
|
|
4473
|
+
}
|
|
4474
|
+
|
|
4398
4475
|
// src/index.ts
|
|
4399
|
-
var LIB_VERSION = "1.3.
|
|
4476
|
+
var LIB_VERSION = "1.3.15";
|
|
4400
4477
|
export {
|
|
4401
4478
|
AvatarArchitectApp,
|
|
4402
4479
|
CollapsibleCard,
|
|
4403
4480
|
CompactDropdown,
|
|
4481
|
+
FaApp,
|
|
4404
4482
|
FaToolsBadge,
|
|
4405
4483
|
GLOBAL_STYLES,
|
|
4406
4484
|
HistoryPanel,
|