@vibes.diy/use-vibes-base 0.12.14 → 0.12.15-dev02
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/components/AuthWall/AuthWall.d.ts +8 -0
- package/components/AuthWall/AuthWall.js +48 -0
- package/components/AuthWall/AuthWall.js.map +1 -0
- package/components/AuthWall/AuthWall.styles.d.ts +6 -0
- package/components/AuthWall/AuthWall.styles.js +50 -0
- package/components/AuthWall/AuthWall.styles.js.map +1 -0
- package/components/ControlsBar.d.ts +1 -1
- package/components/ControlsBar.js +4 -4
- package/components/ControlsBar.js.map +1 -1
- package/components/HiddenMenuWrapper/HiddenMenuWrapper.d.ts +6 -0
- package/components/HiddenMenuWrapper/HiddenMenuWrapper.js +52 -0
- package/components/HiddenMenuWrapper/HiddenMenuWrapper.js.map +1 -0
- package/components/HiddenMenuWrapper/HiddenMenuWrapper.styles.d.ts +30 -0
- package/components/HiddenMenuWrapper/HiddenMenuWrapper.styles.js +72 -0
- package/components/HiddenMenuWrapper/HiddenMenuWrapper.styles.js.map +1 -0
- package/components/ImgGen.d.ts +1 -2
- package/components/ImgGen.js +6 -4
- package/components/ImgGen.js.map +1 -1
- package/components/ImgGenUtils/ImgGenDisplayPlaceholder.js +1 -1
- package/components/ImgGenUtils/ImgGenDisplayPlaceholder.js.map +1 -1
- package/components/ImgGenUtils/ImgGenDisplayUtils.d.ts +2 -2
- package/components/ImgGenUtils/ImgGenModeUtils.d.ts +1 -1
- package/components/ImgGenUtils/ImgGenUploadWaiting.d.ts +1 -1
- package/components/ImgGenUtils/ImgGenUploadWaiting.js +2 -2
- package/components/ImgGenUtils/ImgGenUploadWaiting.js.map +1 -1
- package/components/ImgGenUtils/overlays/DeleteConfirmationOverlay.js +1 -1
- package/components/ImgGenUtils/overlays/DeleteConfirmationOverlay.js.map +1 -1
- package/components/ImgGenUtils/types.d.ts +1 -1
- package/components/VibeControl.d.ts +13 -0
- package/components/VibeControl.js +59 -0
- package/components/VibeControl.js.map +1 -0
- package/components/VibesButton/VibesButton.d.ts +10 -0
- package/components/VibesButton/VibesButton.js +20 -0
- package/components/VibesButton/VibesButton.js.map +1 -0
- package/components/VibesButton/VibesButton.styles.d.ts +6 -0
- package/components/VibesButton/VibesButton.styles.js +35 -0
- package/components/VibesButton/VibesButton.styles.js.map +1 -0
- package/components/VibesSwitch/VibesSwitch.d.ts +6 -0
- package/components/VibesSwitch/VibesSwitch.js +42 -0
- package/components/VibesSwitch/VibesSwitch.js.map +1 -0
- package/components/VibesSwitch/VibesSwitch.styles.d.ts +4 -0
- package/components/VibesSwitch/VibesSwitch.styles.js +5 -0
- package/components/VibesSwitch/VibesSwitch.styles.js.map +1 -0
- package/hooks/image-gen/image-generator.d.ts +1 -1
- package/hooks/image-gen/index.d.ts +1 -1
- package/hooks/image-gen/index.js.map +1 -1
- package/hooks/image-gen/use-image-gen.d.ts +2 -4
- package/hooks/image-gen/use-image-gen.js.map +1 -1
- package/hooks/image-gen/utils.d.ts +1 -1
- package/hooks/image-gen/utils.js.map +1 -1
- package/hooks/vibes-gen/IframeVibesComponent.d.ts +1 -0
- package/hooks/vibes-gen/IframeVibesComponent.js +8 -3
- package/hooks/vibes-gen/IframeVibesComponent.js.map +1 -1
- package/hooks/vibes-gen/index.d.ts +1 -1
- package/hooks/vibes-gen/use-vibes.d.ts +1 -1
- package/hooks/vibes-gen/use-vibes.js +4 -4
- package/hooks/vibes-gen/use-vibes.js.map +1 -1
- package/index.d.ts +22 -4
- package/index.js +12 -2
- package/index.js.map +1 -1
- package/package.json +16 -6
- package/stories/VibeControl.stories.d.ts +13 -0
- package/stories/VibeControl.stories.js +155 -0
- package/stories/VibeControl.stories.js.map +1 -0
- package/stories/VibeControlMount.stories.d.ts +14 -0
- package/stories/VibeControlMount.stories.js +182 -0
- package/stories/VibeControlMount.stories.js.map +1 -0
- package/tsconfig.json +0 -4
- package/utils/style-utils.d.ts +2 -15
- package/utils/style-utils.js.map +1 -1
- package/utils/vibe-control-styles.d.ts +148 -0
- package/utils/vibe-control-styles.js +170 -0
- package/utils/vibe-control-styles.js.map +1 -0
- package/vibe-auth-wall.d.ts +14 -0
- package/vibe-auth-wall.js +79 -0
- package/vibe-auth-wall.js.map +1 -0
- package/vibe-control-mount.d.ts +14 -0
- package/vibe-control-mount.js +75 -0
- package/vibe-control-mount.js.map +1 -0
- package/vibe-hidden-menu-mount.d.ts +18 -0
- package/vibe-hidden-menu-mount.js +73 -0
- package/vibe-hidden-menu-mount.js.map +1 -0
- 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/vibes-gen/types.d.ts +0 -42
- package/hooks/vibes-gen/types.js +0 -2
- package/hooks/vibes-gen/types.js.map +0 -1
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type { Database, DocWithId } from 'use-fireproof';
|
|
2
|
-
import { ImageGenOptions, ImageResponse } from 'call-ai';
|
|
3
|
-
export interface PromptEntry {
|
|
4
|
-
readonly text: string;
|
|
5
|
-
readonly created: number;
|
|
6
|
-
}
|
|
7
|
-
export interface ImageDocumentPlain {
|
|
8
|
-
readonly _rev?: string;
|
|
9
|
-
readonly type: 'image';
|
|
10
|
-
readonly prompt?: string;
|
|
11
|
-
readonly prompts?: Record<string, PromptEntry>;
|
|
12
|
-
readonly created: number;
|
|
13
|
-
readonly currentVersion: number;
|
|
14
|
-
readonly versions: VersionInfo[];
|
|
15
|
-
readonly currentPromptKey: string;
|
|
16
|
-
}
|
|
17
|
-
export type ImageDocument = DocWithId<ImageDocumentPlain>;
|
|
18
|
-
export type PartialImageDocument = DocWithId<Partial<ImageDocumentPlain>>;
|
|
19
|
-
export interface VersionInfo {
|
|
20
|
-
readonly id: string;
|
|
21
|
-
readonly created: number;
|
|
22
|
-
readonly promptKey?: string;
|
|
23
|
-
}
|
|
24
|
-
export type GenerationPhase = 'idle' | 'generating' | 'complete' | 'error';
|
|
25
|
-
export interface UseImageGenOptions {
|
|
26
|
-
readonly prompt: string;
|
|
27
|
-
readonly _id: string;
|
|
28
|
-
readonly _rev?: string;
|
|
29
|
-
readonly database: string | Database;
|
|
30
|
-
readonly options: Partial<ImageGenOptions>;
|
|
31
|
-
readonly generationId: string;
|
|
32
|
-
readonly skip: boolean;
|
|
33
|
-
readonly type?: string;
|
|
34
|
-
readonly currentVersion?: number;
|
|
35
|
-
readonly versions?: {
|
|
36
|
-
readonly id: string;
|
|
37
|
-
readonly created: number;
|
|
38
|
-
readonly promptKey: string;
|
|
39
|
-
}[];
|
|
40
|
-
readonly _files?: Record<string, File>;
|
|
41
|
-
readonly prompts?: Record<string, PromptEntry>;
|
|
42
|
-
readonly editedPrompt: string;
|
|
43
|
-
}
|
|
44
|
-
export interface UseImageGenResult {
|
|
45
|
-
readonly imageData?: string | null;
|
|
46
|
-
readonly loading: boolean;
|
|
47
|
-
readonly progress: number;
|
|
48
|
-
readonly error?: Error | null;
|
|
49
|
-
readonly size?: {
|
|
50
|
-
readonly width: number;
|
|
51
|
-
readonly height: number;
|
|
52
|
-
};
|
|
53
|
-
readonly document?: PartialImageDocument | null;
|
|
54
|
-
}
|
|
55
|
-
export interface ModuleState {
|
|
56
|
-
readonly pendingImageGenCalls: Map<string, Promise<ImageResponse>>;
|
|
57
|
-
readonly pendingPrompts: Set<string>;
|
|
58
|
-
readonly processingRequests: Set<string>;
|
|
59
|
-
readonly requestTimestamps: Map<string, number>;
|
|
60
|
-
requestCounter: number;
|
|
61
|
-
readonly createdDocuments: Map<string, string>;
|
|
62
|
-
readonly pendingDocumentCreations: Map<string, Promise<{
|
|
63
|
-
id: string;
|
|
64
|
-
doc: ImageDocument;
|
|
65
|
-
}>>;
|
|
66
|
-
}
|
package/hooks/image-gen/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../jsr/hooks/image-gen/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
|
-
export type GeneratedComponentProps = Record<string, unknown>;
|
|
3
|
-
export interface UseVibesOptions {
|
|
4
|
-
database?: string;
|
|
5
|
-
model?: string;
|
|
6
|
-
skip?: boolean;
|
|
7
|
-
regenerate?: boolean;
|
|
8
|
-
dependencies?: string[];
|
|
9
|
-
_id?: string;
|
|
10
|
-
}
|
|
11
|
-
export interface UseVibesResult {
|
|
12
|
-
App: ComponentType<GeneratedComponentProps> | null;
|
|
13
|
-
code: string | null;
|
|
14
|
-
loading: boolean;
|
|
15
|
-
error: Error | null;
|
|
16
|
-
progress: number;
|
|
17
|
-
regenerate: () => void;
|
|
18
|
-
document?: VibeDocument | null;
|
|
19
|
-
}
|
|
20
|
-
export interface VibeDocument {
|
|
21
|
-
_id: string;
|
|
22
|
-
prompt: string;
|
|
23
|
-
code: string;
|
|
24
|
-
title: string;
|
|
25
|
-
dependencies: string[];
|
|
26
|
-
model: string;
|
|
27
|
-
created_at: number;
|
|
28
|
-
version: number;
|
|
29
|
-
metadata?: {
|
|
30
|
-
tokens_used?: number;
|
|
31
|
-
generation_time?: number;
|
|
32
|
-
options_hash?: string;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
export interface UseVibesState {
|
|
36
|
-
App: ComponentType<GeneratedComponentProps> | null;
|
|
37
|
-
code: string | null;
|
|
38
|
-
loading: boolean;
|
|
39
|
-
error: Error | null;
|
|
40
|
-
progress: number;
|
|
41
|
-
document: VibeDocument | null;
|
|
42
|
-
}
|
package/hooks/vibes-gen/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../jsr/hooks/vibes-gen/types.ts"],"names":[],"mappings":""}
|