@vibes.diy/use-vibes-base 0.19.8-dev → 0.19.16-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
|
-
if (typeof document !==
|
|
2
|
-
const styleId =
|
|
1
|
+
if (typeof document !== "undefined") {
|
|
2
|
+
const styleId = "vibe-control-vars";
|
|
3
3
|
if (!document.getElementById(styleId)) {
|
|
4
|
-
const style = document.createElement(
|
|
4
|
+
const style = document.createElement("style");
|
|
5
5
|
style.id = styleId;
|
|
6
6
|
style.textContent = `
|
|
7
7
|
:root {
|
|
@@ -41,49 +41,49 @@ if (typeof document !== 'undefined') {
|
|
|
41
41
|
}
|
|
42
42
|
export const vibeControlTheme = {
|
|
43
43
|
colors: {
|
|
44
|
-
buttonBg:
|
|
45
|
-
buttonBgHover:
|
|
46
|
-
buttonText:
|
|
47
|
-
buttonBorder:
|
|
48
|
-
overlayBackdrop:
|
|
49
|
-
overlayBg:
|
|
50
|
-
overlayText:
|
|
51
|
-
overlayBorder:
|
|
52
|
-
closeButtonBg:
|
|
53
|
-
closeButtonBgHover:
|
|
54
|
-
closeButtonText:
|
|
55
|
-
accent:
|
|
56
|
-
shadow:
|
|
44
|
+
buttonBg: "var(--vc-button-bg, var(--vibes-red-bright))",
|
|
45
|
+
buttonBgHover: "var(--vc-button-bg-hover, var(--vibes-red-dark))",
|
|
46
|
+
buttonText: "var(--vc-button-text, var(--vibes-white))",
|
|
47
|
+
buttonBorder: "var(--vc-button-border, var(--vibes-red-bright))",
|
|
48
|
+
overlayBackdrop: "var(--vc-overlay-backdrop, rgba(0, 0, 0, 0.5))",
|
|
49
|
+
overlayBg: "var(--vc-overlay-bg, var(--vibes-white))",
|
|
50
|
+
overlayText: "var(--vc-overlay-text, var(--vibes-gray-dark))",
|
|
51
|
+
overlayBorder: "var(--vc-overlay-border, var(--vibes-gray-ultralight))",
|
|
52
|
+
closeButtonBg: "var(--vc-close-bg, var(--vibes-gray-whisper))",
|
|
53
|
+
closeButtonBgHover: "var(--vc-close-bg-hover, var(--vibes-gray-ultralight))",
|
|
54
|
+
closeButtonText: "var(--vc-close-text, var(--vibes-gray-medium))",
|
|
55
|
+
accent: "var(--vc-accent, var(--vibes-blue-accent))",
|
|
56
|
+
shadow: "var(--vc-shadow, rgba(0, 0, 0, 0.15))",
|
|
57
57
|
},
|
|
58
58
|
dimensions: {
|
|
59
|
-
buttonWidth:
|
|
60
|
-
buttonHeight:
|
|
61
|
-
buttonPadding:
|
|
62
|
-
buttonBorderRadius:
|
|
63
|
-
buttonPosition:
|
|
64
|
-
overlayPadding:
|
|
65
|
-
overlayBorderRadius:
|
|
66
|
-
overlayMaxWidth:
|
|
67
|
-
overlayMaxHeight:
|
|
68
|
-
closeButtonSize:
|
|
69
|
-
closeButtonBorderRadius:
|
|
59
|
+
buttonWidth: "120px",
|
|
60
|
+
buttonHeight: "40px",
|
|
61
|
+
buttonPadding: "8px 16px",
|
|
62
|
+
buttonBorderRadius: "20px",
|
|
63
|
+
buttonPosition: "20px", // Distance from edge
|
|
64
|
+
overlayPadding: "24px",
|
|
65
|
+
overlayBorderRadius: "12px",
|
|
66
|
+
overlayMaxWidth: "800px",
|
|
67
|
+
overlayMaxHeight: "90vh",
|
|
68
|
+
closeButtonSize: "32px",
|
|
69
|
+
closeButtonBorderRadius: "16px",
|
|
70
70
|
},
|
|
71
71
|
typography: {
|
|
72
|
-
buttonFontSize:
|
|
73
|
-
buttonFontWeight:
|
|
74
|
-
buttonLineHeight:
|
|
75
|
-
overlayTitleFontSize:
|
|
76
|
-
overlayTitleFontWeight:
|
|
77
|
-
overlayTitleLineHeight:
|
|
78
|
-
overlayBodyFontSize:
|
|
79
|
-
overlayBodyLineHeight:
|
|
72
|
+
buttonFontSize: "14px",
|
|
73
|
+
buttonFontWeight: "600",
|
|
74
|
+
buttonLineHeight: "1.2",
|
|
75
|
+
overlayTitleFontSize: "24px",
|
|
76
|
+
overlayTitleFontWeight: "700",
|
|
77
|
+
overlayTitleLineHeight: "1.3",
|
|
78
|
+
overlayBodyFontSize: "16px",
|
|
79
|
+
overlayBodyLineHeight: "1.5",
|
|
80
80
|
},
|
|
81
81
|
effects: {
|
|
82
|
-
buttonShadow:
|
|
83
|
-
buttonShadowHover:
|
|
84
|
-
overlayShadow:
|
|
85
|
-
transition:
|
|
86
|
-
backdropFilter:
|
|
82
|
+
buttonShadow: "0 2px 8px rgba(0, 0, 0, 0.15)",
|
|
83
|
+
buttonShadowHover: "0 4px 12px rgba(0, 0, 0, 0.2)",
|
|
84
|
+
overlayShadow: "0 8px 32px rgba(0, 0, 0, 0.2)",
|
|
85
|
+
transition: "0.2s ease-in-out",
|
|
86
|
+
backdropFilter: "blur(4px)",
|
|
87
87
|
},
|
|
88
88
|
zIndex: {
|
|
89
89
|
button: 1000,
|
|
@@ -91,30 +91,30 @@ export const vibeControlTheme = {
|
|
|
91
91
|
backdrop: 1050,
|
|
92
92
|
},
|
|
93
93
|
};
|
|
94
|
-
export const createVibeControlStyles = (position =
|
|
94
|
+
export const createVibeControlStyles = (position = "bottom-right") => {
|
|
95
95
|
const pos = vibeControlTheme.dimensions.buttonPosition;
|
|
96
96
|
const anchor = {};
|
|
97
97
|
switch (position) {
|
|
98
|
-
case
|
|
98
|
+
case "bottom-right":
|
|
99
99
|
anchor.bottom = pos;
|
|
100
100
|
anchor.right = pos;
|
|
101
101
|
break;
|
|
102
|
-
case
|
|
102
|
+
case "bottom-left":
|
|
103
103
|
anchor.bottom = pos;
|
|
104
104
|
anchor.left = pos;
|
|
105
105
|
break;
|
|
106
|
-
case
|
|
106
|
+
case "top-right":
|
|
107
107
|
anchor.top = pos;
|
|
108
108
|
anchor.right = pos;
|
|
109
109
|
break;
|
|
110
|
-
case
|
|
110
|
+
case "top-left":
|
|
111
111
|
anchor.top = pos;
|
|
112
112
|
anchor.left = pos;
|
|
113
113
|
break;
|
|
114
114
|
}
|
|
115
115
|
return {
|
|
116
116
|
button: {
|
|
117
|
-
position:
|
|
117
|
+
position: "fixed",
|
|
118
118
|
...anchor,
|
|
119
119
|
width: vibeControlTheme.dimensions.buttonWidth,
|
|
120
120
|
height: vibeControlTheme.dimensions.buttonHeight,
|
|
@@ -126,22 +126,22 @@ export const createVibeControlStyles = (position = 'bottom-right') => {
|
|
|
126
126
|
fontSize: vibeControlTheme.typography.buttonFontSize,
|
|
127
127
|
fontWeight: vibeControlTheme.typography.buttonFontWeight,
|
|
128
128
|
lineHeight: vibeControlTheme.typography.buttonLineHeight,
|
|
129
|
-
cursor:
|
|
129
|
+
cursor: "pointer",
|
|
130
130
|
boxShadow: vibeControlTheme.effects.buttonShadow,
|
|
131
131
|
transition: `background-color ${vibeControlTheme.effects.transition}, box-shadow ${vibeControlTheme.effects.transition}, transform ${vibeControlTheme.effects.transition}`,
|
|
132
132
|
zIndex: vibeControlTheme.zIndex.button,
|
|
133
|
-
display:
|
|
134
|
-
alignItems:
|
|
135
|
-
justifyContent:
|
|
136
|
-
userSelect:
|
|
133
|
+
display: "flex",
|
|
134
|
+
alignItems: "center",
|
|
135
|
+
justifyContent: "center",
|
|
136
|
+
userSelect: "none",
|
|
137
137
|
},
|
|
138
138
|
buttonHover: {
|
|
139
139
|
backgroundColor: vibeControlTheme.colors.buttonBgHover,
|
|
140
140
|
boxShadow: vibeControlTheme.effects.buttonShadowHover,
|
|
141
|
-
transform:
|
|
141
|
+
transform: "translateY(-2px)",
|
|
142
142
|
},
|
|
143
143
|
backdrop: {
|
|
144
|
-
position:
|
|
144
|
+
position: "fixed",
|
|
145
145
|
top: 0,
|
|
146
146
|
left: 0,
|
|
147
147
|
right: 0,
|
|
@@ -149,9 +149,9 @@ export const createVibeControlStyles = (position = 'bottom-right') => {
|
|
|
149
149
|
backgroundColor: vibeControlTheme.colors.overlayBackdrop,
|
|
150
150
|
backdropFilter: vibeControlTheme.effects.backdropFilter,
|
|
151
151
|
zIndex: vibeControlTheme.zIndex.backdrop,
|
|
152
|
-
display:
|
|
153
|
-
alignItems:
|
|
154
|
-
justifyContent:
|
|
152
|
+
display: "flex",
|
|
153
|
+
alignItems: "center",
|
|
154
|
+
justifyContent: "center",
|
|
155
155
|
},
|
|
156
156
|
overlay: {
|
|
157
157
|
backgroundColor: vibeControlTheme.colors.overlayBg,
|
|
@@ -161,34 +161,34 @@ export const createVibeControlStyles = (position = 'bottom-right') => {
|
|
|
161
161
|
padding: vibeControlTheme.dimensions.overlayPadding,
|
|
162
162
|
maxWidth: vibeControlTheme.dimensions.overlayMaxWidth,
|
|
163
163
|
maxHeight: vibeControlTheme.dimensions.overlayMaxHeight,
|
|
164
|
-
width:
|
|
164
|
+
width: "90%",
|
|
165
165
|
boxShadow: vibeControlTheme.effects.overlayShadow,
|
|
166
|
-
position:
|
|
167
|
-
overflow:
|
|
166
|
+
position: "relative",
|
|
167
|
+
overflow: "auto",
|
|
168
168
|
},
|
|
169
169
|
overlayTitle: {
|
|
170
170
|
fontSize: vibeControlTheme.typography.overlayTitleFontSize,
|
|
171
171
|
fontWeight: vibeControlTheme.typography.overlayTitleFontWeight,
|
|
172
172
|
lineHeight: vibeControlTheme.typography.overlayTitleLineHeight,
|
|
173
|
-
margin:
|
|
174
|
-
paddingRight:
|
|
173
|
+
margin: "0 0 16px 0",
|
|
174
|
+
paddingRight: "40px",
|
|
175
175
|
},
|
|
176
176
|
closeButton: {
|
|
177
|
-
position:
|
|
177
|
+
position: "absolute",
|
|
178
178
|
top: vibeControlTheme.dimensions.overlayPadding,
|
|
179
179
|
right: vibeControlTheme.dimensions.overlayPadding,
|
|
180
180
|
width: vibeControlTheme.dimensions.closeButtonSize,
|
|
181
181
|
height: vibeControlTheme.dimensions.closeButtonSize,
|
|
182
182
|
backgroundColor: vibeControlTheme.colors.closeButtonBg,
|
|
183
183
|
color: vibeControlTheme.colors.closeButtonText,
|
|
184
|
-
border:
|
|
184
|
+
border: "none",
|
|
185
185
|
borderRadius: vibeControlTheme.dimensions.closeButtonBorderRadius,
|
|
186
|
-
cursor:
|
|
187
|
-
display:
|
|
188
|
-
alignItems:
|
|
189
|
-
justifyContent:
|
|
190
|
-
fontSize:
|
|
191
|
-
fontWeight:
|
|
186
|
+
cursor: "pointer",
|
|
187
|
+
display: "flex",
|
|
188
|
+
alignItems: "center",
|
|
189
|
+
justifyContent: "center",
|
|
190
|
+
fontSize: "18px",
|
|
191
|
+
fontWeight: "bold",
|
|
192
192
|
transition: `background-color ${vibeControlTheme.effects.transition}`,
|
|
193
193
|
},
|
|
194
194
|
closeButtonHover: {
|
|
@@ -201,11 +201,11 @@ export const createVibeControlStyles = (position = 'bottom-right') => {
|
|
|
201
201
|
};
|
|
202
202
|
};
|
|
203
203
|
export const defaultVibeControlClasses = {
|
|
204
|
-
button:
|
|
205
|
-
backdrop:
|
|
206
|
-
overlay:
|
|
207
|
-
overlayTitle:
|
|
208
|
-
closeButton:
|
|
209
|
-
content:
|
|
204
|
+
button: "",
|
|
205
|
+
backdrop: "",
|
|
206
|
+
overlay: "",
|
|
207
|
+
overlayTitle: "",
|
|
208
|
+
closeButton: "",
|
|
209
|
+
content: "",
|
|
210
210
|
};
|
|
211
211
|
//# sourceMappingURL=vibe-control-styles.js.map
|