@adminide-stack/yantra-mobile 12.0.125-alpha.0 → 12.0.125
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/lib/features/canvas/AudioEditorExperience.js +207 -109
- package/lib/features/canvas/AudioEditorExperience.js.map +1 -1
- package/lib/features/canvas/CanvasAgentChatPane.js +87 -72
- package/lib/features/canvas/CanvasAgentChatPane.js.map +1 -1
- package/lib/features/canvas/CanvasBoardsGrid.js +494 -387
- package/lib/features/canvas/CanvasBoardsGrid.js.map +1 -1
- package/lib/features/canvas/CanvasChatResultCard.js +78 -59
- package/lib/features/canvas/CanvasChatResultCard.js.map +1 -1
- package/lib/features/canvas/CanvasEditToolsPanel.js +126 -84
- package/lib/features/canvas/CanvasEditToolsPanel.js.map +1 -1
- package/lib/features/canvas/CanvasExperience.js +108 -126
- package/lib/features/canvas/CanvasExperience.js.map +1 -1
- package/lib/features/canvas/CanvasGeneratePanel.js +178 -166
- package/lib/features/canvas/CanvasGeneratePanel.js.map +1 -1
- package/lib/features/canvas/CanvasLibrarySheet.js +119 -123
- package/lib/features/canvas/CanvasLibrarySheet.js.map +1 -1
- package/lib/features/canvas/CanvasLooksPanel.js +113 -89
- package/lib/features/canvas/CanvasLooksPanel.js.map +1 -1
- package/lib/features/canvas/CanvasModelPicker.js +79 -79
- package/lib/features/canvas/CanvasModelPicker.js.map +1 -1
- package/lib/features/canvas/CanvasTasksPanel.js +193 -128
- package/lib/features/canvas/CanvasTasksPanel.js.map +1 -1
- package/lib/features/canvas/CanvasTemplatesPanel.js +106 -94
- package/lib/features/canvas/CanvasTemplatesPanel.js.map +1 -1
- package/lib/features/canvas/CanvasToolDock.js +195 -127
- package/lib/features/canvas/CanvasToolDock.js.map +1 -1
- package/lib/features/canvas/FrameExtractorExperience.js +163 -100
- package/lib/features/canvas/FrameExtractorExperience.js.map +1 -1
- package/lib/features/canvas/GeneratorReferenceSlots.js +132 -69
- package/lib/features/canvas/GeneratorReferenceSlots.js.map +1 -1
- package/lib/features/canvas/ImageEditorExperience.js +278 -209
- package/lib/features/canvas/ImageEditorExperience.js.map +1 -1
- package/lib/features/canvas/InfluencerStudioExperience.js +167 -125
- package/lib/features/canvas/InfluencerStudioExperience.js.map +1 -1
- package/lib/features/canvas/MoodboardExperience.js +102 -85
- package/lib/features/canvas/MoodboardExperience.js.map +1 -1
- package/lib/features/canvas/NativeCanvasViewer.js +203 -192
- package/lib/features/canvas/NativeCanvasViewer.js.map +1 -1
- package/lib/features/canvas/PromoContextFields.js +125 -92
- package/lib/features/canvas/PromoContextFields.js.map +1 -1
- package/lib/features/canvas/SetStudioExperience.js +225 -143
- package/lib/features/canvas/SetStudioExperience.js.map +1 -1
- package/lib/features/canvas/VideoClipsExperience.js +126 -92
- package/lib/features/canvas/VideoClipsExperience.js.map +1 -1
- package/lib/features/canvas/VideoEditExperience.js +154 -142
- package/lib/features/canvas/VideoEditExperience.js.map +1 -1
- package/lib/features/canvas/VideoEditorExperience.js +551 -492
- package/lib/features/canvas/VideoEditorExperience.js.map +1 -1
- package/lib/features/canvas/VideoGeneratorExperience.js +284 -131
- package/lib/features/canvas/VideoGeneratorExperience.js.map +1 -1
- package/lib/features/canvas/canvasTasks.js +7 -3
- package/lib/features/canvas/canvasTasks.js.map +1 -1
- package/lib/features/canvas/canvasTheme.js +265 -0
- package/lib/features/canvas/canvasTheme.js.map +1 -0
- package/lib/features/canvas/canvasUi.js +381 -0
- package/lib/features/canvas/canvasUi.js.map +1 -0
- package/lib/features/canvas/recorder/CameraRecorderExperience.js +109 -52
- package/lib/features/canvas/recorder/CameraRecorderExperience.js.map +1 -1
- package/lib/features/canvas/serverTasks.js +1 -1
- package/lib/features/canvas/serverTasks.js.map +1 -1
- package/lib/features/canvas/set/SetViewportWebView.js +1 -1
- package/lib/features/canvas/set/SetViewportWebView.js.map +1 -1
- package/lib/features/canvas/videoEditor/BlurBoxOverlay.js +8 -7
- package/lib/features/canvas/videoEditor/BlurBoxOverlay.js.map +1 -1
- package/lib/features/canvas/videoEditor/ExportTaskCard.js +44 -41
- package/lib/features/canvas/videoEditor/ExportTaskCard.js.map +1 -1
- package/lib/features/canvas/videoEditor/agent/AgentCutPane.js +50 -45
- package/lib/features/canvas/videoEditor/agent/AgentCutPane.js.map +1 -1
- package/lib/features/canvas/videoEditor/exportTask.js +3 -2
- package/lib/features/canvas/videoEditor/exportTask.js.map +1 -1
- package/lib/features/canvas/videoEditor/formWidgets.js +116 -64
- package/lib/features/canvas/videoEditor/formWidgets.js.map +1 -1
- package/lib/features/canvas/videoEditor/produce/ProduceVideoSheet.js +77 -63
- package/lib/features/canvas/videoEditor/produce/ProduceVideoSheet.js.map +1 -1
- package/lib/features/canvas/videoEditor/tools/ToolsDrawer.js +95 -79
- package/lib/features/canvas/videoEditor/tools/ToolsDrawer.js.map +1 -1
- package/lib/features/design/DesignEditorExperience.js +241 -160
- package/lib/features/design/DesignEditorExperience.js.map +1 -1
- package/lib/features/design/DesignExperience.js +300 -143
- package/lib/features/design/DesignExperience.js.map +1 -1
- package/lib/features/webbuilder/WebBuilderExperience.js +1 -1
- package/lib/features/webbuilder/WebBuilderExperience.js.map +1 -1
- package/lib/features/webbuilder/buildFragments.js +3 -2
- package/lib/features/webbuilder/buildFragments.js.map +1 -1
- package/lib/features/webbuilder/components/PublishSheet.js +1 -1
- package/lib/features/webbuilder/components/PublishSheet.js.map +1 -1
- package/lib/features/webbuilder/webbuilderPrompts.js +2 -5
- package/lib/features/webbuilder/webbuilderPrompts.js.map +1 -1
- package/lib/screens/WebBuilderNative/sandboxProxyApi.js +120 -0
- package/lib/screens/WebBuilderNative/sandboxProxyApi.js.map +1 -0
- package/lib/screens/WebBuilderNative/useRestoredSandboxes.js.map +1 -1
- package/lib/screens/WebBuilderNative/useWebBuilderHost.js +26 -4
- package/lib/screens/WebBuilderNative/useWebBuilderHost.js.map +1 -1
- package/lib/screens/WebBuilderNative/webbuilderTransport.js +110 -7
- package/lib/screens/WebBuilderNative/webbuilderTransport.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {jsxs,jsx}from'react/jsx-runtime';import React__default,{useState,useCallback
|
|
1
|
+
import {jsxs,jsx}from'react/jsx-runtime';import React__default,{useMemo,useState,useCallback}from'react';import {Image,View,Text,Linking,StyleSheet,ActivityIndicator,ScrollView,TextInput}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Image as Image$1}from'expo-image';import {generationImageUrl,friendlyMediaError,resultUrl}from'./videoEditor/mediaActions.js';import {markedEditPrompt,editRequest,settleVariants,EDIT_ASPECTS,EDIT_SIZES,VARIANT_COUNTS}from'./aiEdit.js';import {unwrapProxyUrl}from'./videoEditor/remoteMediaClient.js';import {useCanvasTheme,themedStyles}from'./canvasTheme.js';import {Pressable,pressedStyle,RADIUS,SPACE,HIT,TYPE}from'./canvasUi.js';var __defProp = Object.defineProperty;
|
|
2
2
|
var __defProps = Object.defineProperties;
|
|
3
3
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
@@ -17,6 +17,9 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
const HSCROLL = {
|
|
21
|
+
flexGrow: 0
|
|
22
|
+
};
|
|
20
23
|
const FILTER_NAMES = ["grayscale", "sepia", "chrome", "cold", "warm", "vintage", "fade", "posterize", "vivid", "invert"];
|
|
21
24
|
const CROP_ASPECTS = [{
|
|
22
25
|
label: "1:1",
|
|
@@ -39,6 +42,9 @@ function ImageEditorExperience({
|
|
|
39
42
|
onSave,
|
|
40
43
|
initialTab
|
|
41
44
|
}) {
|
|
45
|
+
var _a;
|
|
46
|
+
const theme = useCanvasTheme();
|
|
47
|
+
const styles = useMemo(() => makeStyles(theme), [theme]);
|
|
42
48
|
const [history, setHistory] = useState([src]);
|
|
43
49
|
const [busy, setBusy] = useState(null);
|
|
44
50
|
const [tab, setTab] = useState(initialTab === "aiedit" ? "aiedit" : "filters");
|
|
@@ -92,7 +98,7 @@ function ImageEditorExperience({
|
|
|
92
98
|
} = settleVariants(settled);
|
|
93
99
|
if (!urls.length) throw new Error("No variant came back");
|
|
94
100
|
setVariants(urls);
|
|
95
|
-
if (failed) setNotice(`${failed} variant${failed === 1 ? "" : "s"} failed
|
|
101
|
+
if (failed) setNotice(`${failed} variant${failed === 1 ? "" : "s"} failed. The rest are below.`);
|
|
96
102
|
else setNotice(null);
|
|
97
103
|
} catch (err) {
|
|
98
104
|
setNotice(friendlyMediaError(err, "mark & edit"));
|
|
@@ -154,15 +160,23 @@ function ImageEditorExperience({
|
|
|
154
160
|
}], []);
|
|
155
161
|
return /* @__PURE__ */ jsxs(View, { style: styles.root, testID: "image-editor", children: [
|
|
156
162
|
/* @__PURE__ */ jsxs(View, { style: styles.header, children: [
|
|
157
|
-
/* @__PURE__ */ jsx(Pressable, { onPress: onClose, hitSlop: 10, accessibilityRole: "button", accessibilityLabel: "Close editor",
|
|
163
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: onClose, hitSlop: 10, accessibilityRole: "button", accessibilityLabel: "Close editor", style: ({
|
|
164
|
+
pressed
|
|
165
|
+
}) => [styles.headerIcon, pressedStyle(pressed)], children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "close", size: 22, color: theme.edInk }) }),
|
|
158
166
|
/* @__PURE__ */ jsx(Text, { style: styles.headerTitle, numberOfLines: 1, children: (name == null ? void 0 : name.trim()) || "Edit image" }),
|
|
159
167
|
/* @__PURE__ */ jsxs(View, { style: styles.headerActions, children: [
|
|
160
|
-
/* @__PURE__ */ jsx(Pressable, { onPress: () => setHistory((h) => h.length > 1 ? h.slice(0, -1) : h), hitSlop: 10, disabled: !edited || busy !== null, accessibilityRole: "button", accessibilityLabel: "Undo", style:
|
|
161
|
-
|
|
168
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: () => setHistory((h) => h.length > 1 ? h.slice(0, -1) : h), hitSlop: 10, disabled: !edited || busy !== null, accessibilityRole: "button", accessibilityLabel: "Undo", style: ({
|
|
169
|
+
pressed
|
|
170
|
+
}) => [styles.headerIcon, !edited || busy ? styles.disabled : null, pressedStyle(pressed)], children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "undo-variant", size: 21, color: theme.edInk }) }),
|
|
171
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: () => Linking.openURL(current), hitSlop: 10, disabled: !edited, accessibilityRole: "button", accessibilityLabel: "Open result", style: ({
|
|
172
|
+
pressed
|
|
173
|
+
}) => [styles.headerIcon, !edited ? styles.disabled : null, pressedStyle(pressed)], children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "open-in-new", size: 20, color: theme.edInk }) }),
|
|
162
174
|
/* @__PURE__ */ jsx(Pressable, { onPress: () => {
|
|
163
175
|
if (edited) onSave == null ? void 0 : onSave(current);
|
|
164
176
|
onClose();
|
|
165
|
-
}, hitSlop: 10, disabled: busy !== null, accessibilityRole: "button", accessibilityLabel: "Done", style:
|
|
177
|
+
}, hitSlop: 10, disabled: busy !== null, accessibilityRole: "button", accessibilityLabel: "Done", style: ({
|
|
178
|
+
pressed
|
|
179
|
+
}) => [styles.donePill, busy ? styles.disabled : null, pressedStyle(pressed)], children: /* @__PURE__ */ jsx(Text, { style: styles.doneLabel, children: edited ? "Done" : "Close" }) })
|
|
166
180
|
] })
|
|
167
181
|
] }),
|
|
168
182
|
/* @__PURE__ */ jsxs(View, { style: styles.stage, children: [
|
|
@@ -181,82 +195,111 @@ function ImageEditorExperience({
|
|
|
181
195
|
history.length - 1
|
|
182
196
|
] }) }) : null
|
|
183
197
|
] }),
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
198
|
+
/* @__PURE__ */ jsxs(View, { style: styles.dock, children: [
|
|
199
|
+
/* @__PURE__ */ jsxs(View, { style: styles.panel, children: [
|
|
200
|
+
/* @__PURE__ */ jsx(Text, { style: styles.sheetTitle, children: (_a = tabs.find((entry) => entry.id === tab)) == null ? void 0 : _a.label }),
|
|
201
|
+
tab === "aiedit" ? /* @__PURE__ */ jsxs(ScrollView, { style: {
|
|
202
|
+
maxHeight: 220
|
|
203
|
+
}, contentContainerStyle: {
|
|
204
|
+
paddingBottom: 8
|
|
205
|
+
}, children: [
|
|
206
|
+
/* @__PURE__ */ jsx(Text, { style: styles.aiHint, children: "Say what should change. Phone Mark & edit sends the whole picture (scribble bake is web/Konva); Original framing keeps the photo's own ratio." }),
|
|
207
|
+
/* @__PURE__ */ jsx(TextInput, { value: editInstruction, onChangeText: setEditInstruction, placeholder: "Add a top hat and monocle", placeholderTextColor: theme.edInk3, style: styles.aiInput, multiline: true }),
|
|
208
|
+
/* @__PURE__ */ jsxs(View, { style: styles.row, children: [
|
|
209
|
+
EDIT_ASPECTS.map((a) => /* @__PURE__ */ jsx(Pressable, { onPress: () => setEditAspect(a.id), style: [styles.chip, editAspect === a.id && styles.chipOn], children: /* @__PURE__ */ jsx(Text, { style: styles.chipLabel, children: a.label }) }, a.id)),
|
|
210
|
+
EDIT_SIZES.map((s) => /* @__PURE__ */ jsx(Pressable, { onPress: () => setEditSize(s), style: [styles.chip, editSize === s && styles.chipOn], children: /* @__PURE__ */ jsx(Text, { style: styles.chipLabel, children: s }) }, s)),
|
|
211
|
+
VARIANT_COUNTS.map((n) => /* @__PURE__ */ jsx(Pressable, { onPress: () => setVariantCount(n), style: [styles.chip, variantCount === n && styles.chipOn], children: /* @__PURE__ */ jsxs(Text, { style: styles.chipLabel, children: [
|
|
212
|
+
n,
|
|
213
|
+
"\xD7"
|
|
214
|
+
] }) }, n))
|
|
215
|
+
] }),
|
|
216
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: () => void runMarkEdit(), disabled: !editInstruction.trim() || Boolean(busy), style: ({
|
|
217
|
+
pressed
|
|
218
|
+
}) => [styles.aiCta, (!editInstruction.trim() || busy) && styles.disabled, pressedStyle(pressed)], children: /* @__PURE__ */ jsx(Text, { style: styles.aiCtaLabel, children: "Generate variants" }) }),
|
|
219
|
+
variants.length ? /* @__PURE__ */ jsx(ScrollView, { style: HSCROLL, horizontal: true, contentContainerStyle: styles.row, children: variants.map((url) => /* @__PURE__ */ jsx(Pressable, { onPress: () => {
|
|
220
|
+
setHistory((h) => [...h, url]);
|
|
221
|
+
setVariants([]);
|
|
222
|
+
setNotice("Applied. Undo brings the original back.");
|
|
223
|
+
}, style: styles.variantThumb, children: /* @__PURE__ */ jsx(Image$1, { source: {
|
|
224
|
+
uri: url
|
|
225
|
+
}, style: styles.variantImg, contentFit: "cover" }) }, url)) }) : null
|
|
226
|
+
] }) : tab === "filters" ? /* @__PURE__ */ jsx(ScrollView, { style: HSCROLL, horizontal: true, showsHorizontalScrollIndicator: false, contentContainerStyle: styles.row, children: FILTER_NAMES.map((filter) => /* @__PURE__ */ jsx(Pressable, { onPress: () => apply(`Filter ${filter}`, "YANTRA_IMAGE_EDIT_FILTER", {
|
|
227
|
+
name: filter
|
|
228
|
+
}), style: ({
|
|
229
|
+
pressed
|
|
230
|
+
}) => [styles.chip, pressedStyle(pressed)], accessibilityRole: "button", children: /* @__PURE__ */ jsx(Text, { style: styles.chipLabel, children: filter }) }, filter)) }) : tab === "adjust" ? /* @__PURE__ */ jsxs(View, { children: [
|
|
231
|
+
/* @__PURE__ */ jsx(AdjustRow, { label: "Brightness", value: adjust.brightness, format: (v) => v.toFixed(2), onChange: (d) => setAdjust((a) => __spreadProps(__spreadValues({}, a), {
|
|
232
|
+
brightness: Math.min(1, Math.max(-1, a.brightness + d * 0.1))
|
|
233
|
+
})) }),
|
|
234
|
+
/* @__PURE__ */ jsx(AdjustRow, { label: "Contrast", value: adjust.contrast, format: (v) => v.toFixed(2), onChange: (d) => setAdjust((a) => __spreadProps(__spreadValues({}, a), {
|
|
235
|
+
contrast: Math.min(3, Math.max(0.2, a.contrast + d * 0.1))
|
|
236
|
+
})) }),
|
|
237
|
+
/* @__PURE__ */ jsx(AdjustRow, { label: "Saturation", value: adjust.saturation, format: (v) => v.toFixed(2), onChange: (d) => setAdjust((a) => __spreadProps(__spreadValues({}, a), {
|
|
238
|
+
saturation: Math.min(3, Math.max(0, a.saturation + d * 0.1))
|
|
239
|
+
})) }),
|
|
240
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: () => apply("Adjusting", "YANTRA_IMAGE_EDIT_FINETUNE", {
|
|
241
|
+
brightness: adjust.brightness,
|
|
242
|
+
contrast: adjust.contrast,
|
|
243
|
+
saturation: adjust.saturation
|
|
244
|
+
}), style: ({
|
|
245
|
+
pressed
|
|
246
|
+
}) => [styles.chip, styles.chipAccent, styles.applyBtn, pressedStyle(pressed)], accessibilityRole: "button", children: /* @__PURE__ */ jsx(Text, { style: [styles.chipLabel, styles.chipLabelDark], children: "Apply adjustments" }) })
|
|
247
|
+
] }) : tab === "transform" ? /* @__PURE__ */ jsxs(View, { style: styles.row, children: [
|
|
248
|
+
/* @__PURE__ */ jsxs(Pressable, { onPress: () => apply("Rotating", "YANTRA_IMAGE_EDIT_ROTATE", {
|
|
249
|
+
degrees: 90
|
|
250
|
+
}), style: ({
|
|
251
|
+
pressed
|
|
252
|
+
}) => [styles.chip, pressedStyle(pressed)], accessibilityRole: "button", children: [
|
|
253
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "rotate-right", size: 14, color: theme.edInk }),
|
|
254
|
+
/* @__PURE__ */ jsx(Text, { style: styles.chipLabel, children: "90\xB0" })
|
|
255
|
+
] }),
|
|
256
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: () => apply("Flipping", "YANTRA_IMAGE_EDIT_FLIP", {
|
|
257
|
+
horizontal: true
|
|
258
|
+
}), style: ({
|
|
259
|
+
pressed
|
|
260
|
+
}) => [styles.chip, pressedStyle(pressed)], accessibilityRole: "button", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "flip-horizontal", size: 14, color: theme.edInk }) }),
|
|
261
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: () => apply("Flipping", "YANTRA_IMAGE_EDIT_FLIP", {
|
|
262
|
+
vertical: true
|
|
263
|
+
}), style: ({
|
|
264
|
+
pressed
|
|
265
|
+
}) => [styles.chip, pressedStyle(pressed)], accessibilityRole: "button", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "flip-vertical", size: 14, color: theme.edInk }) }),
|
|
266
|
+
CROP_ASPECTS.map((aspect) => /* @__PURE__ */ jsx(Pressable, { onPress: () => applyCrop(aspect.ratio, `Cropping ${aspect.label}`), style: ({
|
|
267
|
+
pressed
|
|
268
|
+
}) => [styles.chip, pressedStyle(pressed)], accessibilityRole: "button", children: /* @__PURE__ */ jsx(Text, { style: styles.chipLabel, children: aspect.label }) }, aspect.label))
|
|
269
|
+
] }) : /* @__PURE__ */ jsxs(View, { style: styles.row, children: [
|
|
270
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: () => apply("Vignette", "YANTRA_IMAGE_EDIT_VIGNETTE", {}), style: ({
|
|
271
|
+
pressed
|
|
272
|
+
}) => [styles.chip, pressedStyle(pressed)], accessibilityRole: "button", children: /* @__PURE__ */ jsx(Text, { style: styles.chipLabel, children: "Vignette" }) }),
|
|
273
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: () => apply("Framing", "YANTRA_IMAGE_EDIT_FRAME", {
|
|
274
|
+
thickness: 24,
|
|
275
|
+
color: "white"
|
|
276
|
+
}), style: ({
|
|
277
|
+
pressed
|
|
278
|
+
}) => [styles.chip, pressedStyle(pressed)], accessibilityRole: "button", children: /* @__PURE__ */ jsx(Text, { style: styles.chipLabel, children: "Frame" }) }),
|
|
279
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: () => apply("Shadow", "YANTRA_IMAGE_EDIT_DROP_SHADOW", {
|
|
280
|
+
offset_x: 12,
|
|
281
|
+
offset_y: 12,
|
|
282
|
+
blur: 18
|
|
283
|
+
}), style: ({
|
|
284
|
+
pressed
|
|
285
|
+
}) => [styles.chip, pressedStyle(pressed)], accessibilityRole: "button", children: /* @__PURE__ */ jsx(Text, { style: styles.chipLabel, children: "Shadow" }) }),
|
|
286
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: () => apply("Removing background", "YANTRA_IMAGE_EDIT_REMOVE_BACKGROUND", {}), style: ({
|
|
287
|
+
pressed
|
|
288
|
+
}) => [styles.chip, pressedStyle(pressed)], accessibilityRole: "button", children: /* @__PURE__ */ jsx(Text, { style: styles.chipLabel, children: "Cut out" }) })
|
|
289
|
+
] })
|
|
230
290
|
] }),
|
|
231
|
-
/* @__PURE__ */ jsx(
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
}), style: styles.chip, accessibilityRole: "button", children: /* @__PURE__ */ jsx(Text, { style: styles.chipLabel, children: "Frame" }) }),
|
|
244
|
-
/* @__PURE__ */ jsx(Pressable, { onPress: () => apply("Shadow", "YANTRA_IMAGE_EDIT_DROP_SHADOW", {
|
|
245
|
-
offset_x: 12,
|
|
246
|
-
offset_y: 12,
|
|
247
|
-
blur: 18
|
|
248
|
-
}), style: styles.chip, accessibilityRole: "button", children: /* @__PURE__ */ jsx(Text, { style: styles.chipLabel, children: "Shadow" }) }),
|
|
249
|
-
/* @__PURE__ */ jsx(Pressable, { onPress: () => apply("Removing background", "YANTRA_IMAGE_EDIT_REMOVE_BACKGROUND", {}), style: styles.chip, accessibilityRole: "button", children: /* @__PURE__ */ jsx(Text, { style: styles.chipLabel, children: "Cut out" }) })
|
|
250
|
-
] }) }),
|
|
251
|
-
/* @__PURE__ */ jsx(View, { style: styles.toolbar, children: tabs.map((entry) => {
|
|
252
|
-
const active = tab === entry.id;
|
|
253
|
-
return /* @__PURE__ */ jsxs(Pressable, { onPress: () => setTab(entry.id), style: styles.toolbarTab, accessibilityRole: "tab", accessibilityState: {
|
|
254
|
-
selected: active
|
|
255
|
-
}, children: [
|
|
256
|
-
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: entry.icon, size: 21, color: active ? "#8B7CFF" : "#9A9AA5" }),
|
|
257
|
-
/* @__PURE__ */ jsx(Text, { style: [styles.toolbarLabel, active && styles.toolbarLabelActive], children: entry.label })
|
|
258
|
-
] }, entry.id);
|
|
259
|
-
}) }),
|
|
291
|
+
/* @__PURE__ */ jsx(View, { style: styles.toolbar, children: tabs.map((entry) => {
|
|
292
|
+
const active = tab === entry.id;
|
|
293
|
+
return /* @__PURE__ */ jsxs(Pressable, { onPress: () => setTab(entry.id), style: ({
|
|
294
|
+
pressed
|
|
295
|
+
}) => [styles.toolbarTab, pressedStyle(pressed)], accessibilityRole: "tab", accessibilityState: {
|
|
296
|
+
selected: active
|
|
297
|
+
}, children: [
|
|
298
|
+
/* @__PURE__ */ jsx(View, { style: [styles.toolbarIcon, active && styles.toolbarIconOn], children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: entry.icon, size: 22, color: active ? theme.edInk : theme.edInk3 }) }),
|
|
299
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.toolbarLabel, active && styles.toolbarLabelActive], children: entry.label })
|
|
300
|
+
] }, entry.id);
|
|
301
|
+
}) })
|
|
302
|
+
] }),
|
|
260
303
|
notice ? /* @__PURE__ */ jsxs(View, { style: styles.notice, children: [
|
|
261
304
|
/* @__PURE__ */ jsx(Text, { style: styles.noticeText, children: notice }),
|
|
262
305
|
/* @__PURE__ */ jsx(Pressable, { onPress: () => setNotice(null), hitSlop: 8, children: /* @__PURE__ */ jsx(Text, { style: styles.noticeDismiss, children: "OK" }) })
|
|
@@ -269,223 +312,249 @@ function AdjustRow({
|
|
|
269
312
|
format,
|
|
270
313
|
onChange
|
|
271
314
|
}) {
|
|
315
|
+
const theme = useCanvasTheme();
|
|
316
|
+
const styles = useMemo(() => makeStyles(theme), [theme]);
|
|
272
317
|
return /* @__PURE__ */ jsxs(View, { style: styles.adjustRow, children: [
|
|
273
318
|
/* @__PURE__ */ jsx(Text, { style: styles.adjustLabel, children: label }),
|
|
274
|
-
/* @__PURE__ */ jsx(Pressable, { onPress: () => onChange(-1), hitSlop: 8, accessibilityRole: "button", accessibilityLabel: `${label} less`, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "minus", size: 16, color:
|
|
319
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: () => onChange(-1), hitSlop: 8, accessibilityRole: "button", accessibilityLabel: `${label} less`, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "minus", size: 16, color: theme.edInk }) }),
|
|
275
320
|
/* @__PURE__ */ jsx(Text, { style: styles.adjustValue, children: format(value) }),
|
|
276
|
-
/* @__PURE__ */ jsx(Pressable, { onPress: () => onChange(1), hitSlop: 8, accessibilityRole: "button", accessibilityLabel: `${label} more`, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "plus", size: 16, color:
|
|
321
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: () => onChange(1), hitSlop: 8, accessibilityRole: "button", accessibilityLabel: `${label} more`, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "plus", size: 16, color: theme.edInk }) })
|
|
277
322
|
] });
|
|
278
323
|
}
|
|
279
|
-
const
|
|
324
|
+
const makeStyles = themedStyles((theme) => StyleSheet.create({
|
|
280
325
|
root: {
|
|
281
326
|
flex: 1,
|
|
282
|
-
backgroundColor:
|
|
327
|
+
backgroundColor: theme.edBg
|
|
283
328
|
},
|
|
284
329
|
header: {
|
|
285
330
|
flexDirection: "row",
|
|
286
331
|
alignItems: "center",
|
|
287
332
|
justifyContent: "space-between",
|
|
288
|
-
paddingHorizontal:
|
|
289
|
-
paddingVertical:
|
|
290
|
-
gap:
|
|
333
|
+
paddingHorizontal: SPACE.md,
|
|
334
|
+
paddingVertical: SPACE.sm,
|
|
335
|
+
gap: SPACE.sm
|
|
336
|
+
},
|
|
337
|
+
headerIcon: {
|
|
338
|
+
width: 40,
|
|
339
|
+
height: 40,
|
|
340
|
+
borderRadius: RADIUS.pill,
|
|
341
|
+
alignItems: "center",
|
|
342
|
+
justifyContent: "center"
|
|
291
343
|
},
|
|
292
|
-
headerTitle: {
|
|
344
|
+
headerTitle: __spreadProps(__spreadValues({}, TYPE.title), {
|
|
293
345
|
flex: 1,
|
|
294
|
-
color:
|
|
295
|
-
fontSize: 15,
|
|
296
|
-
fontWeight: "600",
|
|
346
|
+
color: theme.edInk,
|
|
297
347
|
textAlign: "center"
|
|
298
|
-
},
|
|
348
|
+
}),
|
|
299
349
|
headerActions: {
|
|
300
350
|
flexDirection: "row",
|
|
301
351
|
alignItems: "center",
|
|
302
|
-
gap:
|
|
303
|
-
},
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
352
|
+
gap: SPACE.xs
|
|
353
|
+
},
|
|
354
|
+
donePill: {
|
|
355
|
+
minHeight: 36,
|
|
356
|
+
marginLeft: SPACE.xs,
|
|
357
|
+
paddingHorizontal: SPACE.lg,
|
|
358
|
+
borderRadius: RADIUS.pill,
|
|
359
|
+
backgroundColor: theme.primary,
|
|
360
|
+
alignItems: "center",
|
|
361
|
+
justifyContent: "center"
|
|
308
362
|
},
|
|
363
|
+
doneLabel: __spreadProps(__spreadValues({}, TYPE.label), {
|
|
364
|
+
color: theme.primaryForeground
|
|
365
|
+
}),
|
|
309
366
|
disabled: {
|
|
310
367
|
opacity: 0.35
|
|
311
368
|
},
|
|
312
369
|
stage: {
|
|
313
370
|
flex: 1,
|
|
314
|
-
marginHorizontal:
|
|
315
|
-
|
|
371
|
+
marginHorizontal: SPACE.md,
|
|
372
|
+
marginTop: SPACE.xs,
|
|
373
|
+
borderRadius: RADIUS.xl,
|
|
316
374
|
overflow: "hidden",
|
|
317
375
|
backgroundColor: "#000000"
|
|
376
|
+
// media stage stays dark
|
|
318
377
|
},
|
|
319
378
|
busyVeil: __spreadProps(__spreadValues({}, StyleSheet.absoluteFillObject), {
|
|
320
379
|
alignItems: "center",
|
|
321
380
|
justifyContent: "center",
|
|
322
|
-
gap:
|
|
381
|
+
gap: SPACE.sm,
|
|
323
382
|
backgroundColor: "rgba(10, 10, 12, 0.55)"
|
|
324
383
|
}),
|
|
325
|
-
busyLabel: {
|
|
326
|
-
color: "#E8E8EE"
|
|
327
|
-
|
|
328
|
-
},
|
|
384
|
+
busyLabel: __spreadProps(__spreadValues({}, TYPE.caption), {
|
|
385
|
+
color: "#E8E8EE"
|
|
386
|
+
}),
|
|
329
387
|
editedBadge: {
|
|
330
388
|
position: "absolute",
|
|
331
|
-
right:
|
|
332
|
-
top:
|
|
333
|
-
paddingHorizontal:
|
|
334
|
-
paddingVertical:
|
|
335
|
-
borderRadius:
|
|
336
|
-
backgroundColor: "rgba(
|
|
337
|
-
},
|
|
338
|
-
editedBadgeLabel: {
|
|
339
|
-
color: "#
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
389
|
+
right: SPACE.md,
|
|
390
|
+
top: SPACE.md,
|
|
391
|
+
paddingHorizontal: SPACE.sm,
|
|
392
|
+
paddingVertical: SPACE.xs,
|
|
393
|
+
borderRadius: RADIUS.pill,
|
|
394
|
+
backgroundColor: "rgba(10, 10, 12, 0.6)"
|
|
395
|
+
},
|
|
396
|
+
editedBadgeLabel: __spreadProps(__spreadValues({}, TYPE.caption), {
|
|
397
|
+
color: "#F7F7FA"
|
|
398
|
+
}),
|
|
399
|
+
dock: {
|
|
400
|
+
marginTop: SPACE.md,
|
|
401
|
+
backgroundColor: theme.edPanel,
|
|
402
|
+
borderTopLeftRadius: RADIUS.xl,
|
|
403
|
+
borderTopRightRadius: RADIUS.xl
|
|
404
|
+
},
|
|
405
|
+
sheetTitle: __spreadProps(__spreadValues({}, TYPE.label), {
|
|
406
|
+
color: theme.edInk,
|
|
407
|
+
marginBottom: SPACE.sm
|
|
408
|
+
}),
|
|
409
|
+
aiHint: __spreadProps(__spreadValues({}, TYPE.caption), {
|
|
410
|
+
color: theme.edInk2,
|
|
411
|
+
marginBottom: SPACE.sm
|
|
412
|
+
}),
|
|
413
|
+
aiInput: __spreadProps(__spreadValues({}, TYPE.body), {
|
|
414
|
+
minHeight: 60,
|
|
415
|
+
borderRadius: RADIUS.md,
|
|
416
|
+
paddingHorizontal: SPACE.md,
|
|
417
|
+
paddingVertical: SPACE.sm,
|
|
418
|
+
backgroundColor: theme.edRaised,
|
|
419
|
+
color: theme.edInk,
|
|
356
420
|
textAlignVertical: "top",
|
|
357
|
-
marginBottom:
|
|
358
|
-
},
|
|
421
|
+
marginBottom: SPACE.sm
|
|
422
|
+
}),
|
|
359
423
|
chipOn: {
|
|
360
|
-
borderColor:
|
|
361
|
-
backgroundColor:
|
|
424
|
+
borderColor: theme.edInk,
|
|
425
|
+
backgroundColor: theme.edRaisedHi
|
|
362
426
|
},
|
|
363
427
|
aiCta: {
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
borderRadius:
|
|
368
|
-
backgroundColor:
|
|
369
|
-
alignItems: "center"
|
|
370
|
-
|
|
371
|
-
aiCtaLabel: {
|
|
372
|
-
color: "#0f172a",
|
|
373
|
-
fontWeight: "700",
|
|
374
|
-
fontSize: 13
|
|
428
|
+
minHeight: HIT,
|
|
429
|
+
marginTop: SPACE.xs,
|
|
430
|
+
marginBottom: SPACE.sm,
|
|
431
|
+
borderRadius: RADIUS.pill,
|
|
432
|
+
backgroundColor: theme.edInk,
|
|
433
|
+
alignItems: "center",
|
|
434
|
+
justifyContent: "center"
|
|
375
435
|
},
|
|
436
|
+
aiCtaLabel: __spreadProps(__spreadValues({}, TYPE.label), {
|
|
437
|
+
color: theme.edOnInk
|
|
438
|
+
}),
|
|
376
439
|
variantThumb: {
|
|
377
440
|
width: 64,
|
|
378
441
|
height: 64,
|
|
379
|
-
borderRadius:
|
|
442
|
+
borderRadius: RADIUS.sm,
|
|
380
443
|
overflow: "hidden",
|
|
381
|
-
marginRight:
|
|
382
|
-
backgroundColor:
|
|
444
|
+
marginRight: SPACE.sm,
|
|
445
|
+
backgroundColor: theme.edRaised
|
|
383
446
|
},
|
|
384
447
|
variantImg: {
|
|
385
448
|
width: "100%",
|
|
386
449
|
height: "100%"
|
|
387
450
|
},
|
|
388
451
|
panel: {
|
|
389
|
-
minHeight:
|
|
452
|
+
minHeight: 104,
|
|
390
453
|
justifyContent: "center",
|
|
391
|
-
paddingHorizontal:
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
borderTopColor: "rgba(255,255,255,0.08)"
|
|
454
|
+
paddingHorizontal: SPACE.lg,
|
|
455
|
+
paddingTop: SPACE.lg,
|
|
456
|
+
paddingBottom: SPACE.sm
|
|
395
457
|
},
|
|
396
458
|
row: {
|
|
397
459
|
flexDirection: "row",
|
|
398
460
|
alignItems: "center",
|
|
399
|
-
gap:
|
|
461
|
+
gap: SPACE.sm,
|
|
400
462
|
flexWrap: "wrap",
|
|
401
|
-
paddingVertical:
|
|
463
|
+
paddingVertical: SPACE.xs
|
|
402
464
|
},
|
|
403
465
|
chip: {
|
|
404
466
|
flexDirection: "row",
|
|
405
467
|
alignItems: "center",
|
|
406
|
-
gap:
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
borderRadius:
|
|
410
|
-
backgroundColor:
|
|
468
|
+
gap: SPACE.xs,
|
|
469
|
+
minHeight: 36,
|
|
470
|
+
paddingHorizontal: SPACE.md + 2,
|
|
471
|
+
borderRadius: RADIUS.pill,
|
|
472
|
+
backgroundColor: theme.edRaised,
|
|
411
473
|
borderWidth: 1,
|
|
412
474
|
borderColor: "transparent"
|
|
413
475
|
},
|
|
414
476
|
chipAccent: {
|
|
415
|
-
backgroundColor:
|
|
416
|
-
},
|
|
417
|
-
chipLabel: {
|
|
418
|
-
color: "#F7F7FA",
|
|
419
|
-
fontSize: 12.5,
|
|
420
|
-
fontWeight: "500"
|
|
477
|
+
backgroundColor: theme.edInk
|
|
421
478
|
},
|
|
479
|
+
chipLabel: __spreadProps(__spreadValues({}, TYPE.label), {
|
|
480
|
+
color: theme.edInk,
|
|
481
|
+
textTransform: "capitalize"
|
|
482
|
+
}),
|
|
422
483
|
chipLabelDark: {
|
|
423
|
-
color:
|
|
484
|
+
color: theme.edOnInk
|
|
424
485
|
},
|
|
425
486
|
applyBtn: {
|
|
426
487
|
alignSelf: "flex-start",
|
|
427
|
-
marginTop:
|
|
488
|
+
marginTop: SPACE.sm
|
|
428
489
|
},
|
|
429
490
|
adjustRow: {
|
|
430
491
|
flexDirection: "row",
|
|
431
492
|
alignItems: "center",
|
|
432
|
-
gap:
|
|
433
|
-
|
|
493
|
+
gap: SPACE.md,
|
|
494
|
+
minHeight: 36
|
|
434
495
|
},
|
|
435
|
-
adjustLabel: {
|
|
436
|
-
color:
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
},
|
|
440
|
-
|
|
441
|
-
color: "#F7F7FA",
|
|
442
|
-
fontSize: 12.5,
|
|
496
|
+
adjustLabel: __spreadProps(__spreadValues({}, TYPE.caption), {
|
|
497
|
+
color: theme.edInk2,
|
|
498
|
+
width: 84
|
|
499
|
+
}),
|
|
500
|
+
adjustValue: __spreadProps(__spreadValues({}, TYPE.label), {
|
|
501
|
+
color: theme.edInk,
|
|
443
502
|
fontVariant: ["tabular-nums"],
|
|
444
|
-
minWidth:
|
|
503
|
+
minWidth: 48,
|
|
445
504
|
textAlign: "center"
|
|
446
|
-
},
|
|
505
|
+
}),
|
|
447
506
|
toolbar: {
|
|
448
507
|
flexDirection: "row",
|
|
449
508
|
justifyContent: "space-around",
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
borderTopColor: "rgba(255,255,255,0.08)"
|
|
509
|
+
paddingHorizontal: SPACE.sm,
|
|
510
|
+
paddingTop: SPACE.xs,
|
|
511
|
+
paddingBottom: SPACE.md
|
|
454
512
|
},
|
|
455
513
|
toolbarTab: {
|
|
456
514
|
alignItems: "center",
|
|
457
|
-
gap:
|
|
458
|
-
minWidth:
|
|
515
|
+
gap: SPACE.xs,
|
|
516
|
+
minWidth: 60,
|
|
517
|
+
minHeight: HIT
|
|
518
|
+
},
|
|
519
|
+
toolbarIcon: {
|
|
520
|
+
width: 48,
|
|
521
|
+
height: 32,
|
|
522
|
+
borderRadius: RADIUS.pill,
|
|
523
|
+
alignItems: "center",
|
|
524
|
+
justifyContent: "center"
|
|
525
|
+
},
|
|
526
|
+
toolbarIconOn: {
|
|
527
|
+
backgroundColor: theme.edRaisedHi
|
|
459
528
|
},
|
|
460
529
|
toolbarLabel: {
|
|
461
|
-
color:
|
|
462
|
-
fontSize:
|
|
530
|
+
color: theme.edInk3,
|
|
531
|
+
fontSize: 11,
|
|
532
|
+
lineHeight: 14,
|
|
533
|
+
fontWeight: "500"
|
|
463
534
|
},
|
|
464
535
|
toolbarLabelActive: {
|
|
465
|
-
color:
|
|
536
|
+
color: theme.edInk,
|
|
466
537
|
fontWeight: "600"
|
|
467
538
|
},
|
|
468
539
|
notice: {
|
|
469
540
|
position: "absolute",
|
|
470
|
-
left:
|
|
471
|
-
right:
|
|
472
|
-
bottom:
|
|
541
|
+
left: SPACE.lg,
|
|
542
|
+
right: SPACE.lg,
|
|
543
|
+
bottom: 96,
|
|
473
544
|
flexDirection: "row",
|
|
474
545
|
alignItems: "center",
|
|
475
|
-
gap:
|
|
476
|
-
paddingHorizontal:
|
|
477
|
-
paddingVertical:
|
|
478
|
-
borderRadius:
|
|
479
|
-
backgroundColor:
|
|
480
|
-
},
|
|
481
|
-
noticeText: {
|
|
546
|
+
gap: SPACE.md,
|
|
547
|
+
paddingHorizontal: SPACE.lg,
|
|
548
|
+
paddingVertical: SPACE.md,
|
|
549
|
+
borderRadius: RADIUS.lg,
|
|
550
|
+
backgroundColor: theme.edInk
|
|
551
|
+
},
|
|
552
|
+
noticeText: __spreadProps(__spreadValues({}, TYPE.label), {
|
|
553
|
+
fontWeight: "500",
|
|
482
554
|
flex: 1,
|
|
483
|
-
color:
|
|
484
|
-
|
|
485
|
-
},
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
fontWeight: "600"
|
|
490
|
-
}
|
|
491
|
-
});export{ImageEditorExperience,ImageEditorExperience as default};//# sourceMappingURL=ImageEditorExperience.js.map
|
|
555
|
+
color: theme.edOnInk
|
|
556
|
+
}),
|
|
557
|
+
noticeDismiss: __spreadProps(__spreadValues({}, TYPE.label), {
|
|
558
|
+
color: theme.edAccent
|
|
559
|
+
})
|
|
560
|
+
}));export{ImageEditorExperience,ImageEditorExperience as default};//# sourceMappingURL=ImageEditorExperience.js.map
|