@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,
|
|
1
|
+
import {jsx,jsxs,Fragment}from'react/jsx-runtime';import React__default,{createContext,useMemo,useState,useEffect,useRef,useCallback,useContext}from'react';import {useWindowDimensions,Alert,Clipboard,Share,View,Text,StyleSheet,TextInput}from'react-native';import {Gesture,GestureHandlerRootView,Pressable,GestureDetector}from'react-native-gesture-handler';import Animated,{useSharedValue,useAnimatedReaction,runOnJS,useAnimatedStyle}from'react-native-reanimated';import {Image}from'expo-image';import {MaterialCommunityIcons}from'@expo/vector-icons';import {getVideoItemRenderer}from'./videoRenderer.js';import {spreadStackedItems,coerceUploadSizedItem,paintOrder,applyItemFrame,MAX_ZOOM,MIN_ZOOM,removeItem,boardBounds,resizeFrame}from'./canvasCore.js';import {CanvasAgentChatPane}from'./CanvasAgentChatPane.js';import {ensureItemShareLink,shareableMediaUrl}from'./linksRpc.js';import {renewMediaUrl,useMediaSource,mediaPhaseLabel}from'./useMediaSource.js';import {CanvasThemeProvider,useCanvasTheme,themedStyles}from'./canvasTheme.js';import {SPACE,RADIUS,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;
|
|
@@ -24,6 +24,8 @@ const SELECTION_COLOR = "#3b82f6";
|
|
|
24
24
|
function MediaGlyph({
|
|
25
25
|
item
|
|
26
26
|
}) {
|
|
27
|
+
const theme = useCanvasTheme();
|
|
28
|
+
const styles = useMemo(() => makeStyles(theme), [theme]);
|
|
27
29
|
return /* @__PURE__ */ jsxs(View, { style: [StyleSheet.absoluteFill, styles.mediaTile], accessibilityLabel: `Canvas ${item.type}`, children: [
|
|
28
30
|
/* @__PURE__ */ jsx(Text, { style: styles.mediaTileGlyph, children: item.type === "video" ? "\u25B6" : "\u266A" }),
|
|
29
31
|
item.generatedAssetName ? /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles.mediaTileLabel, children: item.generatedAssetName }) : null
|
|
@@ -64,11 +66,13 @@ function ImageItemContent({
|
|
|
64
66
|
item
|
|
65
67
|
}) {
|
|
66
68
|
var _a;
|
|
69
|
+
const theme = useCanvasTheme();
|
|
70
|
+
const styles = useMemo(() => makeStyles(theme), [theme]);
|
|
67
71
|
const renew = useContext(MediaRenewContext);
|
|
68
72
|
const media = useMediaSource(item.src, "image", renew);
|
|
69
73
|
const status = mediaPhaseLabel(media.phase);
|
|
70
74
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
71
|
-
media.phase === "broken" ? /* @__PURE__ */ jsx(View, { style: [StyleSheet.absoluteFill, styles.mediaTile], children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "image-off-outline", size: 28, color:
|
|
75
|
+
media.phase === "broken" ? /* @__PURE__ */ jsx(View, { style: [StyleSheet.absoluteFill, styles.mediaTile], children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "image-off-outline", size: 28, color: theme.mutedForeground }) }) : /* @__PURE__ */ jsx(Image, { source: {
|
|
72
76
|
uri: media.src
|
|
73
77
|
}, style: [StyleSheet.absoluteFill, styles.itemImage], contentFit: "cover", transition: 120, onError: media.onError, accessibilityLabel: (_a = item.generatedAssetName) != null ? _a : "Canvas image" }, media.key),
|
|
74
78
|
status ? /* @__PURE__ */ jsx(View, { style: styles.mediaStatus, pointerEvents: "none", children: /* @__PURE__ */ jsx(Text, { style: styles.mediaStatusLabel, children: status }) }) : null
|
|
@@ -98,6 +102,8 @@ function ItemHoverToolbar({
|
|
|
98
102
|
onShareLink,
|
|
99
103
|
onChromeTouch
|
|
100
104
|
}) {
|
|
105
|
+
const theme = useCanvasTheme();
|
|
106
|
+
const styles = useMemo(() => makeStyles(theme), [theme]);
|
|
101
107
|
const [moreOpen, setMoreOpen] = useState(false);
|
|
102
108
|
const [promptOpen, setPromptOpen] = useState(false);
|
|
103
109
|
const [prompt, setPrompt] = useState("");
|
|
@@ -117,7 +123,7 @@ function ItemHoverToolbar({
|
|
|
117
123
|
setMoreOpen(false);
|
|
118
124
|
setPromptOpen((v) => !v);
|
|
119
125
|
}, style: styles.hoverBtn, accessibilityRole: "button", children: [
|
|
120
|
-
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "pencil-outline", size:
|
|
126
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "pencil-outline", size: 18, color: theme.inkSoft }),
|
|
121
127
|
/* @__PURE__ */ jsx(Text, { style: styles.hoverLabel, numberOfLines: 1, children: "Edit Image" })
|
|
122
128
|
] }),
|
|
123
129
|
/* @__PURE__ */ jsxs(Pressable, { onPress: () => {
|
|
@@ -125,7 +131,7 @@ function ItemHoverToolbar({
|
|
|
125
131
|
setPromptOpen(false);
|
|
126
132
|
onAction == null ? void 0 : onAction("edit-image", item);
|
|
127
133
|
}, style: styles.hoverBtn, accessibilityRole: "button", children: [
|
|
128
|
-
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "content-cut", size:
|
|
134
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "content-cut", size: 18, color: theme.inkSoft }),
|
|
129
135
|
/* @__PURE__ */ jsx(Text, { style: styles.hoverLabel, children: "Editor" })
|
|
130
136
|
] }),
|
|
131
137
|
/* @__PURE__ */ jsxs(Pressable, { onPress: () => {
|
|
@@ -133,7 +139,7 @@ function ItemHoverToolbar({
|
|
|
133
139
|
setPromptOpen(false);
|
|
134
140
|
onAction == null ? void 0 : onAction("mark-edit", item);
|
|
135
141
|
}, style: styles.hoverBtn, accessibilityRole: "button", children: [
|
|
136
|
-
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "marker", size:
|
|
142
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "marker", size: 18, color: theme.inkSoft }),
|
|
137
143
|
/* @__PURE__ */ jsx(Text, { style: styles.hoverLabel, children: "Mark & edit" })
|
|
138
144
|
] })
|
|
139
145
|
] }) : null,
|
|
@@ -141,14 +147,14 @@ function ItemHoverToolbar({
|
|
|
141
147
|
setMoreOpen(false);
|
|
142
148
|
onAction == null ? void 0 : onAction("edit-video", item);
|
|
143
149
|
}, style: styles.hoverBtn, accessibilityRole: "button", children: [
|
|
144
|
-
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "content-cut", size:
|
|
150
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "content-cut", size: 18, color: theme.inkSoft }),
|
|
145
151
|
/* @__PURE__ */ jsx(Text, { style: styles.hoverLabel, children: "Edit Video" })
|
|
146
152
|
] }) : null,
|
|
147
153
|
item.type === "audio" ? /* @__PURE__ */ jsxs(Pressable, { onPress: () => {
|
|
148
154
|
setMoreOpen(false);
|
|
149
155
|
onAction == null ? void 0 : onAction("edit-audio", item);
|
|
150
156
|
}, style: styles.hoverBtn, accessibilityRole: "button", children: [
|
|
151
|
-
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "content-cut", size:
|
|
157
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "content-cut", size: 18, color: theme.inkSoft }),
|
|
152
158
|
/* @__PURE__ */ jsx(Text, { style: styles.hoverLabel, children: "Edit Audio" })
|
|
153
159
|
] }) : null,
|
|
154
160
|
/* @__PURE__ */ jsx(View, { style: styles.hoverDivider }),
|
|
@@ -157,8 +163,8 @@ function ItemHoverToolbar({
|
|
|
157
163
|
onAction == null ? void 0 : onAction("create-video", item);
|
|
158
164
|
}, style: styles.hoverBtn, accessibilityRole: "button", children: [
|
|
159
165
|
/* @__PURE__ */ jsxs(View, { children: [
|
|
160
|
-
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "video-outline", size:
|
|
161
|
-
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "star-four-points", size: 8, color:
|
|
166
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "video-outline", size: 18, color: theme.inkSoft }),
|
|
167
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "star-four-points", size: 8, color: theme.inkSoft, style: styles.hoverSparkle })
|
|
162
168
|
] }),
|
|
163
169
|
/* @__PURE__ */ jsx(Text, { style: styles.hoverLabel, children: "Create Video" })
|
|
164
170
|
] }),
|
|
@@ -166,14 +172,14 @@ function ItemHoverToolbar({
|
|
|
166
172
|
setMoreOpen(false);
|
|
167
173
|
onAction == null ? void 0 : onAction("restyle-video", item);
|
|
168
174
|
}, style: styles.hoverBtn, accessibilityRole: "button", children: [
|
|
169
|
-
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "auto-fix", size:
|
|
175
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "auto-fix", size: 18, color: theme.inkSoft }),
|
|
170
176
|
/* @__PURE__ */ jsx(Text, { style: styles.hoverLabel, children: "Restyle" })
|
|
171
177
|
] }) : null,
|
|
172
178
|
item.type === "image" || item.type === "video" ? /* @__PURE__ */ jsxs(Pressable, { onPress: () => {
|
|
173
179
|
setMoreOpen(false);
|
|
174
180
|
onAction == null ? void 0 : onAction("promo-video", item);
|
|
175
181
|
}, style: styles.hoverBtn, accessibilityRole: "button", children: [
|
|
176
|
-
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "bullhorn-outline", size:
|
|
182
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "bullhorn-outline", size: 18, color: theme.inkSoft }),
|
|
177
183
|
/* @__PURE__ */ jsx(Text, { style: styles.hoverLabel, children: "Promo" })
|
|
178
184
|
] }) : null,
|
|
179
185
|
item.type === "video" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -182,45 +188,47 @@ function ItemHoverToolbar({
|
|
|
182
188
|
setMoreOpen(false);
|
|
183
189
|
onAction == null ? void 0 : onAction("trim-video", item);
|
|
184
190
|
}, style: styles.hoverBtn, accessibilityRole: "button", children: [
|
|
185
|
-
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "movie-open-outline", size:
|
|
191
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "movie-open-outline", size: 18, color: theme.inkSoft }),
|
|
186
192
|
/* @__PURE__ */ jsx(Text, { style: styles.hoverLabel, children: "Clips" })
|
|
187
193
|
] })
|
|
188
194
|
] }) : null,
|
|
189
195
|
/* @__PURE__ */ jsx(View, { style: styles.hoverDivider }),
|
|
190
|
-
/* @__PURE__ */ jsx(Pressable, { onPress: download, style: styles.hoverIconBtn, accessibilityRole: "button", accessibilityLabel: "Download", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "download-outline", size:
|
|
196
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: download, style: styles.hoverIconBtn, accessibilityRole: "button", accessibilityLabel: "Download", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "download-outline", size: 18, color: theme.inkSoft }) })
|
|
191
197
|
] }) }),
|
|
192
198
|
/* @__PURE__ */ jsx(View, { style: styles.hoverDivider }),
|
|
193
199
|
/* @__PURE__ */ jsxs(View, { style: styles.moreWrap, children: [
|
|
194
200
|
/* @__PURE__ */ jsx(Pressable, { onPress: () => {
|
|
195
201
|
setPromptOpen(false);
|
|
196
202
|
setMoreOpen((v) => !v);
|
|
197
|
-
}, style: styles.hoverIconBtn, accessibilityRole: "button", accessibilityLabel: "More", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "dots-vertical", size: 20, color:
|
|
203
|
+
}, style: styles.hoverIconBtn, accessibilityRole: "button", accessibilityLabel: "More", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "dots-vertical", size: 20, color: theme.inkSoft }) }),
|
|
198
204
|
moreOpen ? /* @__PURE__ */ jsxs(View, { style: styles.moreMenu, children: [
|
|
199
205
|
/* @__PURE__ */ jsxs(Pressable, { onPress: () => {
|
|
200
206
|
setMoreOpen(false);
|
|
201
207
|
onRemove();
|
|
202
208
|
}, style: styles.moreRow, accessibilityRole: "button", children: [
|
|
203
|
-
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "trash-can-outline", size:
|
|
209
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "trash-can-outline", size: 18, color: theme.inkSoft }),
|
|
204
210
|
/* @__PURE__ */ jsx(Text, { style: styles.moreLabel, children: "Remove" })
|
|
205
211
|
] }),
|
|
206
212
|
/* @__PURE__ */ jsxs(Pressable, { onPress: download, style: styles.moreRow, accessibilityRole: "button", children: [
|
|
207
|
-
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "download-outline", size:
|
|
213
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "download-outline", size: 18, color: theme.inkSoft }),
|
|
208
214
|
/* @__PURE__ */ jsx(Text, { style: styles.moreLabel, children: "Download" })
|
|
209
215
|
] }),
|
|
210
216
|
onShareLink ? /* @__PURE__ */ jsxs(Pressable, { onPress: () => {
|
|
211
217
|
setMoreOpen(false);
|
|
212
218
|
onShareLink();
|
|
213
219
|
}, style: styles.moreRow, accessibilityRole: "button", children: [
|
|
214
|
-
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "link-variant", size:
|
|
220
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "link-variant", size: 18, color: theme.inkSoft }),
|
|
215
221
|
/* @__PURE__ */ jsx(Text, { style: styles.moreLabel, children: item.share ? "Copy share link" : "Create share link" })
|
|
216
222
|
] }) : null
|
|
217
223
|
] }) : null
|
|
218
224
|
] })
|
|
219
225
|
] }),
|
|
220
|
-
promptOpen && item.type === "image" ? /* @__PURE__ */ jsx(View, { style: styles.editPrompt, children: /* @__PURE__ */ jsx(TextInput, { value: prompt, onChangeText: setPrompt, placeholder: "Describe how to edit this image\u2026", placeholderTextColor:
|
|
226
|
+
promptOpen && item.type === "image" ? /* @__PURE__ */ jsx(View, { style: styles.editPrompt, children: /* @__PURE__ */ jsx(TextInput, { value: prompt, onChangeText: setPrompt, placeholder: "Describe how to edit this image\u2026", placeholderTextColor: theme.mutedForeground, multiline: true, style: styles.editPromptInput }) }) : null
|
|
221
227
|
] }) }) });
|
|
222
228
|
}
|
|
223
229
|
function DotGrid() {
|
|
230
|
+
const theme = useCanvasTheme();
|
|
231
|
+
const styles = useMemo(() => makeStyles(theme), [theme]);
|
|
224
232
|
return /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: styles.dots, children: Array.from({
|
|
225
233
|
length: 40
|
|
226
234
|
}).map((_, row) => /* @__PURE__ */ jsx(View, { style: styles.dotRow, children: Array.from({
|
|
@@ -238,6 +246,8 @@ function SelectedItem({
|
|
|
238
246
|
onShareLink,
|
|
239
247
|
onChromeTouch
|
|
240
248
|
}) {
|
|
249
|
+
const theme = useCanvasTheme();
|
|
250
|
+
const styles = useMemo(() => makeStyles(theme), [theme]);
|
|
241
251
|
const fx = useSharedValue(item.x);
|
|
242
252
|
const fy = useSharedValue(item.y);
|
|
243
253
|
const fw = useSharedValue(item.width);
|
|
@@ -347,7 +357,7 @@ function SelectedItem({
|
|
|
347
357
|
showToolbar ? /* @__PURE__ */ jsx(ItemHoverToolbar, { item, onAction, onRemove, onShareLink, onChromeTouch }) : null
|
|
348
358
|
] });
|
|
349
359
|
}
|
|
350
|
-
function
|
|
360
|
+
function NativeCanvasViewerBody({
|
|
351
361
|
board,
|
|
352
362
|
onItemPress,
|
|
353
363
|
onBoardChange,
|
|
@@ -365,6 +375,8 @@ function NativeCanvasViewer({
|
|
|
365
375
|
testID
|
|
366
376
|
}) {
|
|
367
377
|
var _a;
|
|
378
|
+
const theme = useCanvasTheme();
|
|
379
|
+
const styles = useMemo(() => makeStyles(theme), [theme]);
|
|
368
380
|
const {
|
|
369
381
|
width: winW,
|
|
370
382
|
height: winH
|
|
@@ -572,25 +584,23 @@ function NativeCanvasViewer({
|
|
|
572
584
|
}, children: [
|
|
573
585
|
onBoardsPress ? /* @__PURE__ */ jsxs(View, { style: styles.boardHeader, children: [
|
|
574
586
|
/* @__PURE__ */ jsxs(Pressable, { onPress: onBoardsPress, accessibilityRole: "button", accessibilityLabel: "Boards", style: styles.boardsBtn, children: [
|
|
575
|
-
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "view-grid-outline", size:
|
|
587
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "view-grid-outline", size: 18, color: theme.foreground }),
|
|
576
588
|
/* @__PURE__ */ jsx(Text, { style: styles.boardsLabel, children: "Boards" })
|
|
577
589
|
] }),
|
|
578
|
-
/* @__PURE__ */
|
|
579
|
-
/* @__PURE__ */ jsxs(Text, { style: styles.itemCount, children: [
|
|
590
|
+
/* @__PURE__ */ jsxs(Text, { style: styles.itemCount, numberOfLines: 1, children: [
|
|
580
591
|
items.length,
|
|
581
592
|
" ",
|
|
582
593
|
items.length === 1 ? "item" : "items"
|
|
583
594
|
] }),
|
|
584
595
|
/* @__PURE__ */ jsxs(View, { style: styles.headerZoom, children: [
|
|
585
|
-
/* @__PURE__ */ jsx(Pressable, { onPress: () => zoomBy(1 / 1.25), hitSlop:
|
|
586
|
-
/* @__PURE__ */ jsx(Pressable, { onPress: fitBoard, hitSlop:
|
|
596
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: () => zoomBy(1 / 1.25), hitSlop: 6, accessibilityRole: "button", accessibilityLabel: "Zoom out", style: styles.zoomBtn, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "minus", size: 18, color: theme.inkSoft }) }),
|
|
597
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: fitBoard, hitSlop: 6, accessibilityRole: "button", accessibilityLabel: "Fit board", children: /* @__PURE__ */ jsxs(Text, { style: styles.zoomPct, children: [
|
|
587
598
|
zoomPct,
|
|
588
599
|
"%"
|
|
589
600
|
] }) }),
|
|
590
|
-
/* @__PURE__ */ jsx(Pressable, { onPress: () => zoomBy(1.25), hitSlop:
|
|
601
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: () => zoomBy(1.25), hitSlop: 6, accessibilityRole: "button", accessibilityLabel: "Zoom in", style: styles.zoomBtn, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "plus", size: 18, color: theme.inkSoft }) })
|
|
591
602
|
] }),
|
|
592
|
-
/* @__PURE__ */ jsx(
|
|
593
|
-
/* @__PURE__ */ jsx(Pressable, { onPress: () => setAgentOpen(true), style: styles.askAgentBtn, accessibilityRole: "button", accessibilityLabel: "Ask agent", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "creation", size: 16, color: "#64748b" }) })
|
|
603
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: () => setAgentOpen(true), style: styles.askAgentBtn, accessibilityRole: "button", accessibilityLabel: "Ask agent", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "creation", size: 18, color: theme.foreground }) })
|
|
594
604
|
] }) : null,
|
|
595
605
|
/* @__PURE__ */ jsxs(View, { style: styles.canvasPlane, onLayout: (e) => {
|
|
596
606
|
const {
|
|
@@ -610,16 +620,17 @@ function NativeCanvasViewer({
|
|
|
610
620
|
setSelectedId(null);
|
|
611
621
|
}, onShareLink: shareLinks && shareableMediaUrl(item.src) ? () => void handleShareLink(item.id) : void 0, onChromeTouch: armChromeTouch }, item.id) : /* @__PURE__ */ jsx(StaticItem, { item, onTap: handleSelect }, item.id)) }) }) }) }),
|
|
612
622
|
items.length === 0 ? /* @__PURE__ */ jsxs(View, { style: styles.emptyHint, pointerEvents: "none", children: [
|
|
623
|
+
/* @__PURE__ */ jsx(View, { style: styles.emptyHintIcon, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "creation", size: 24, color: theme.foreground }) }),
|
|
613
624
|
/* @__PURE__ */ jsx(Text, { style: styles.emptyHintTitle, children: "Your canvas is empty" }),
|
|
614
625
|
/* @__PURE__ */ jsx(Text, { style: styles.emptyHintDetail, children: "Tap Generate below for an image, video, audio, slides, clips or a promo." })
|
|
615
626
|
] }) : null,
|
|
616
627
|
controls && !onBoardsPress ? /* @__PURE__ */ jsxs(View, { style: styles.zoomHud, pointerEvents: "box-none", children: [
|
|
617
|
-
/* @__PURE__ */ jsx(Pressable, { onPress: () => zoomBy(1 / 1.25), hitSlop: 8, accessibilityRole: "button", accessibilityLabel: "Zoom out", style: styles.zoomBtn, children: /* @__PURE__ */ jsx(
|
|
628
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: () => zoomBy(1 / 1.25), hitSlop: 8, accessibilityRole: "button", accessibilityLabel: "Zoom out", style: styles.zoomBtn, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "minus", size: 18, color: theme.inkSoft }) }),
|
|
618
629
|
/* @__PURE__ */ jsx(Pressable, { onPress: fitBoard, hitSlop: 8, accessibilityRole: "button", accessibilityLabel: "Fit board", children: /* @__PURE__ */ jsxs(Text, { style: styles.zoomPct, children: [
|
|
619
630
|
zoomPct,
|
|
620
631
|
"%"
|
|
621
632
|
] }) }),
|
|
622
|
-
/* @__PURE__ */ jsx(Pressable, { onPress: () => zoomBy(1.25), hitSlop: 8, accessibilityRole: "button", accessibilityLabel: "Zoom in", style: styles.zoomBtn, children: /* @__PURE__ */ jsx(
|
|
633
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: () => zoomBy(1.25), hitSlop: 8, accessibilityRole: "button", accessibilityLabel: "Zoom in", style: styles.zoomBtn, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "plus", size: 18, color: theme.inkSoft }) })
|
|
623
634
|
] }) : null
|
|
624
635
|
] }),
|
|
625
636
|
/* @__PURE__ */ jsx(CanvasAgentChatPane, { visible: agentOpen, onClose: () => setAgentOpen(false), runAction, boardItems: items, selectedItem: (_a = items.find((it) => it.id === selectedId)) != null ? _a : null, onGenerated: (url, meta) => onAgentGenerated == null ? void 0 : onAgentGenerated(url, meta), onReplace: (itemId, url) => onAgentReplace == null ? void 0 : onAgentReplace(itemId, url), onOpenItem: (itemId) => {
|
|
@@ -629,14 +640,17 @@ function NativeCanvasViewer({
|
|
|
629
640
|
] })
|
|
630
641
|
);
|
|
631
642
|
}
|
|
643
|
+
function NativeCanvasViewer(props) {
|
|
644
|
+
return /* @__PURE__ */ jsx(CanvasThemeProvider, { children: /* @__PURE__ */ jsx(NativeCanvasViewerBody, __spreadValues({}, props)) });
|
|
645
|
+
}
|
|
632
646
|
function initialZoomFor(_board, _viewportWidth, _viewportHeight) {
|
|
633
647
|
return 1;
|
|
634
648
|
}
|
|
635
|
-
const
|
|
649
|
+
const makeStyles = themedStyles((theme) => StyleSheet.create({
|
|
636
650
|
viewport: {
|
|
637
651
|
flex: 1,
|
|
638
652
|
overflow: "hidden",
|
|
639
|
-
backgroundColor:
|
|
653
|
+
backgroundColor: theme.isDark ? theme.background : theme.muted
|
|
640
654
|
},
|
|
641
655
|
canvasPlane: {
|
|
642
656
|
flex: 1,
|
|
@@ -645,78 +659,76 @@ const styles = StyleSheet.create({
|
|
|
645
659
|
emptyHint: __spreadProps(__spreadValues({}, StyleSheet.absoluteFillObject), {
|
|
646
660
|
alignItems: "center",
|
|
647
661
|
justifyContent: "center",
|
|
648
|
-
paddingHorizontal:
|
|
649
|
-
paddingTop:
|
|
662
|
+
paddingHorizontal: SPACE.xxl,
|
|
663
|
+
paddingTop: SPACE.sm,
|
|
650
664
|
paddingBottom: 72
|
|
651
665
|
}),
|
|
652
|
-
emptyHintTitle: {
|
|
653
|
-
|
|
654
|
-
fontWeight: "500",
|
|
655
|
-
color: "#0f172a",
|
|
656
|
-
marginBottom: 6
|
|
657
|
-
},
|
|
658
|
-
emptyHintDetail: {
|
|
659
|
-
fontSize: 12,
|
|
660
|
-
color: "#64748b",
|
|
666
|
+
emptyHintTitle: __spreadProps(__spreadValues({}, TYPE.title), {
|
|
667
|
+
color: theme.foreground,
|
|
661
668
|
textAlign: "center",
|
|
662
|
-
|
|
663
|
-
|
|
669
|
+
marginBottom: SPACE.xs
|
|
670
|
+
}),
|
|
671
|
+
emptyHintIcon: {
|
|
672
|
+
width: 52,
|
|
673
|
+
height: 52,
|
|
674
|
+
borderRadius: 26,
|
|
675
|
+
alignItems: "center",
|
|
676
|
+
justifyContent: "center",
|
|
677
|
+
backgroundColor: theme.surface,
|
|
678
|
+
marginBottom: SPACE.md
|
|
664
679
|
},
|
|
680
|
+
emptyHintDetail: __spreadProps(__spreadValues({}, TYPE.body), {
|
|
681
|
+
fontSize: 14,
|
|
682
|
+
lineHeight: 20,
|
|
683
|
+
color: theme.mutedForeground,
|
|
684
|
+
textAlign: "center",
|
|
685
|
+
maxWidth: 280
|
|
686
|
+
}),
|
|
665
687
|
boardHeader: {
|
|
666
688
|
flexDirection: "row",
|
|
667
689
|
alignItems: "center",
|
|
668
|
-
gap:
|
|
669
|
-
paddingHorizontal:
|
|
670
|
-
paddingVertical:
|
|
671
|
-
backgroundColor:
|
|
672
|
-
borderBottomWidth: StyleSheet.hairlineWidth,
|
|
673
|
-
borderBottomColor: "#e2e8f0",
|
|
690
|
+
gap: SPACE.sm,
|
|
691
|
+
paddingHorizontal: SPACE.md,
|
|
692
|
+
paddingVertical: SPACE.sm,
|
|
693
|
+
backgroundColor: theme.background,
|
|
674
694
|
zIndex: 50
|
|
675
695
|
},
|
|
676
696
|
boardsBtn: {
|
|
677
697
|
flexDirection: "row",
|
|
678
698
|
alignItems: "center",
|
|
679
|
-
gap:
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
color:
|
|
687
|
-
},
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
backgroundColor: "#e2e8f0"
|
|
692
|
-
},
|
|
693
|
-
itemCount: {
|
|
694
|
-
fontSize: 11,
|
|
695
|
-
color: "#94a3b8",
|
|
699
|
+
gap: SPACE.sm - 2,
|
|
700
|
+
minHeight: 40,
|
|
701
|
+
paddingHorizontal: SPACE.md + 2,
|
|
702
|
+
borderRadius: RADIUS.pill,
|
|
703
|
+
backgroundColor: theme.card
|
|
704
|
+
},
|
|
705
|
+
boardsLabel: __spreadProps(__spreadValues({}, TYPE.label), {
|
|
706
|
+
color: theme.foreground
|
|
707
|
+
}),
|
|
708
|
+
itemCount: __spreadProps(__spreadValues({}, TYPE.caption), {
|
|
709
|
+
flexShrink: 1,
|
|
710
|
+
color: theme.mutedForeground,
|
|
696
711
|
fontVariant: ["tabular-nums"]
|
|
697
|
-
},
|
|
712
|
+
}),
|
|
698
713
|
headerZoom: {
|
|
699
714
|
marginLeft: "auto",
|
|
700
715
|
flexDirection: "row",
|
|
701
716
|
alignItems: "center",
|
|
702
|
-
|
|
703
|
-
|
|
717
|
+
flexShrink: 0,
|
|
718
|
+
minHeight: 40,
|
|
719
|
+
paddingHorizontal: SPACE.xs,
|
|
720
|
+
borderRadius: RADIUS.pill,
|
|
721
|
+
backgroundColor: theme.card
|
|
704
722
|
},
|
|
705
723
|
askAgentBtn: {
|
|
706
724
|
alignItems: "center",
|
|
707
725
|
justifyContent: "center",
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
borderRadius:
|
|
711
|
-
|
|
712
|
-
height: 32,
|
|
726
|
+
width: 40,
|
|
727
|
+
height: 40,
|
|
728
|
+
borderRadius: 20,
|
|
729
|
+
backgroundColor: theme.card,
|
|
713
730
|
flexShrink: 0
|
|
714
731
|
},
|
|
715
|
-
askAgentLabel: {
|
|
716
|
-
fontSize: 11,
|
|
717
|
-
fontWeight: "600",
|
|
718
|
-
color: "#64748b"
|
|
719
|
-
},
|
|
720
732
|
plane: {
|
|
721
733
|
position: "absolute",
|
|
722
734
|
left: 0,
|
|
@@ -727,38 +739,36 @@ const styles = StyleSheet.create({
|
|
|
727
739
|
},
|
|
728
740
|
itemImage: {
|
|
729
741
|
borderRadius: 8,
|
|
730
|
-
backgroundColor:
|
|
742
|
+
backgroundColor: theme.border
|
|
731
743
|
},
|
|
732
744
|
mediaStatus: {
|
|
733
745
|
position: "absolute",
|
|
734
|
-
left:
|
|
735
|
-
bottom:
|
|
736
|
-
paddingHorizontal:
|
|
737
|
-
paddingVertical:
|
|
738
|
-
borderRadius:
|
|
739
|
-
backgroundColor: "rgba(
|
|
740
|
-
},
|
|
741
|
-
mediaStatusLabel: {
|
|
746
|
+
left: SPACE.sm,
|
|
747
|
+
bottom: SPACE.sm,
|
|
748
|
+
paddingHorizontal: SPACE.sm + 2,
|
|
749
|
+
paddingVertical: SPACE.xs,
|
|
750
|
+
borderRadius: RADIUS.pill,
|
|
751
|
+
backgroundColor: "rgba(10,10,10,0.6)"
|
|
752
|
+
},
|
|
753
|
+
mediaStatusLabel: __spreadProps(__spreadValues({}, TYPE.caption), {
|
|
742
754
|
fontSize: 11,
|
|
755
|
+
lineHeight: 14,
|
|
743
756
|
fontWeight: "600",
|
|
744
|
-
color: "#
|
|
745
|
-
},
|
|
757
|
+
color: "#fafafa"
|
|
758
|
+
}),
|
|
746
759
|
zoomHud: {
|
|
747
760
|
position: "absolute",
|
|
748
|
-
top:
|
|
749
|
-
right:
|
|
761
|
+
top: SPACE.md,
|
|
762
|
+
right: SPACE.md,
|
|
750
763
|
flexDirection: "row",
|
|
751
764
|
alignItems: "center",
|
|
752
|
-
|
|
753
|
-
paddingHorizontal:
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
shadowColor: "#0f172a",
|
|
760
|
-
shadowOpacity: 0.08,
|
|
761
|
-
shadowRadius: 8,
|
|
765
|
+
minHeight: 40,
|
|
766
|
+
paddingHorizontal: SPACE.xs,
|
|
767
|
+
borderRadius: RADIUS.pill,
|
|
768
|
+
backgroundColor: theme.isDark ? theme.card : theme.surface,
|
|
769
|
+
shadowColor: "#000",
|
|
770
|
+
shadowOpacity: theme.isDark ? 0.3 : 0.08,
|
|
771
|
+
shadowRadius: 10,
|
|
762
772
|
shadowOffset: {
|
|
763
773
|
width: 0,
|
|
764
774
|
height: 2
|
|
@@ -776,7 +786,7 @@ const styles = StyleSheet.create({
|
|
|
776
786
|
height: 22,
|
|
777
787
|
borderTopLeftRadius: 8,
|
|
778
788
|
borderTopRightRadius: 8,
|
|
779
|
-
backgroundColor: "rgba(
|
|
789
|
+
backgroundColor: "rgba(10,10,10,0.35)",
|
|
780
790
|
flexDirection: "row",
|
|
781
791
|
alignItems: "center",
|
|
782
792
|
justifyContent: "center",
|
|
@@ -792,11 +802,11 @@ const styles = StyleSheet.create({
|
|
|
792
802
|
dots: __spreadValues({}, StyleSheet.absoluteFillObject),
|
|
793
803
|
dotRow: {
|
|
794
804
|
flexDirection: "row",
|
|
795
|
-
height:
|
|
805
|
+
height: 24
|
|
796
806
|
},
|
|
797
807
|
dotCell: {
|
|
798
|
-
width:
|
|
799
|
-
height:
|
|
808
|
+
width: 24,
|
|
809
|
+
height: 24,
|
|
800
810
|
alignItems: "center",
|
|
801
811
|
justifyContent: "center"
|
|
802
812
|
},
|
|
@@ -804,7 +814,7 @@ const styles = StyleSheet.create({
|
|
|
804
814
|
width: 2,
|
|
805
815
|
height: 2,
|
|
806
816
|
borderRadius: 1,
|
|
807
|
-
backgroundColor:
|
|
817
|
+
backgroundColor: theme.tint(theme.isDark ? 0.1 : 0.08)
|
|
808
818
|
},
|
|
809
819
|
hoverWrap: {
|
|
810
820
|
position: "absolute",
|
|
@@ -812,7 +822,7 @@ const styles = StyleSheet.create({
|
|
|
812
822
|
right: 0,
|
|
813
823
|
bottom: "100%",
|
|
814
824
|
alignItems: "center",
|
|
815
|
-
marginBottom:
|
|
825
|
+
marginBottom: SPACE.sm,
|
|
816
826
|
zIndex: 50,
|
|
817
827
|
overflow: "visible"
|
|
818
828
|
},
|
|
@@ -825,20 +835,20 @@ const styles = StyleSheet.create({
|
|
|
825
835
|
alignItems: "center",
|
|
826
836
|
maxWidth: "100%",
|
|
827
837
|
overflow: "visible",
|
|
828
|
-
paddingHorizontal:
|
|
829
|
-
paddingVertical:
|
|
830
|
-
borderRadius:
|
|
831
|
-
backgroundColor:
|
|
832
|
-
borderWidth: StyleSheet.hairlineWidth,
|
|
833
|
-
borderColor:
|
|
834
|
-
shadowColor: "#
|
|
835
|
-
shadowOpacity: 0.12,
|
|
836
|
-
shadowRadius:
|
|
838
|
+
paddingHorizontal: SPACE.xs + 2,
|
|
839
|
+
paddingVertical: SPACE.xs,
|
|
840
|
+
borderRadius: RADIUS.pill,
|
|
841
|
+
backgroundColor: theme.isDark ? theme.card : theme.surface,
|
|
842
|
+
borderWidth: theme.isDark ? StyleSheet.hairlineWidth : 0,
|
|
843
|
+
borderColor: theme.border,
|
|
844
|
+
shadowColor: "#000",
|
|
845
|
+
shadowOpacity: theme.isDark ? 0.4 : 0.12,
|
|
846
|
+
shadowRadius: 18,
|
|
837
847
|
shadowOffset: {
|
|
838
848
|
width: 0,
|
|
839
|
-
height:
|
|
849
|
+
height: 6
|
|
840
850
|
},
|
|
841
|
-
elevation:
|
|
851
|
+
elevation: 8
|
|
842
852
|
},
|
|
843
853
|
hoverActions: {
|
|
844
854
|
flexShrink: 1,
|
|
@@ -857,51 +867,53 @@ const styles = StyleSheet.create({
|
|
|
857
867
|
zIndex: 80
|
|
858
868
|
},
|
|
859
869
|
editPrompt: {
|
|
860
|
-
marginTop:
|
|
870
|
+
marginTop: SPACE.sm,
|
|
861
871
|
width: 280,
|
|
862
|
-
borderRadius:
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
shadowColor: "#
|
|
869
|
-
shadowOpacity: 0.
|
|
870
|
-
shadowRadius:
|
|
872
|
+
borderRadius: RADIUS.lg + 2,
|
|
873
|
+
paddingHorizontal: SPACE.lg,
|
|
874
|
+
paddingVertical: SPACE.md,
|
|
875
|
+
backgroundColor: theme.isDark ? theme.card : theme.surface,
|
|
876
|
+
borderWidth: theme.isDark ? StyleSheet.hairlineWidth : 0,
|
|
877
|
+
borderColor: theme.border,
|
|
878
|
+
shadowColor: "#000",
|
|
879
|
+
shadowOpacity: theme.isDark ? 0.4 : 0.12,
|
|
880
|
+
shadowRadius: 18,
|
|
871
881
|
shadowOffset: {
|
|
872
882
|
width: 0,
|
|
873
|
-
height:
|
|
883
|
+
height: 6
|
|
874
884
|
},
|
|
875
|
-
elevation:
|
|
885
|
+
elevation: 8
|
|
876
886
|
},
|
|
877
|
-
editPromptInput: {
|
|
878
|
-
minHeight:
|
|
879
|
-
|
|
880
|
-
color: "#334155",
|
|
887
|
+
editPromptInput: __spreadProps(__spreadValues({}, TYPE.body), {
|
|
888
|
+
minHeight: HIT,
|
|
889
|
+
color: theme.foreground,
|
|
881
890
|
padding: 0
|
|
882
|
-
},
|
|
891
|
+
}),
|
|
883
892
|
hoverBtn: {
|
|
884
893
|
flexDirection: "row",
|
|
885
894
|
alignItems: "center",
|
|
886
|
-
gap:
|
|
887
|
-
|
|
888
|
-
|
|
895
|
+
gap: SPACE.sm - 2,
|
|
896
|
+
minHeight: 40,
|
|
897
|
+
paddingHorizontal: SPACE.md,
|
|
898
|
+
borderRadius: RADIUS.pill
|
|
889
899
|
},
|
|
890
900
|
hoverIconBtn: {
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
fontWeight: "600",
|
|
897
|
-
color: "#334155"
|
|
901
|
+
minWidth: 40,
|
|
902
|
+
minHeight: 40,
|
|
903
|
+
alignItems: "center",
|
|
904
|
+
justifyContent: "center",
|
|
905
|
+
borderRadius: 20
|
|
898
906
|
},
|
|
907
|
+
hoverLabel: __spreadProps(__spreadValues({}, TYPE.label), {
|
|
908
|
+
fontSize: 14,
|
|
909
|
+
color: theme.foreground
|
|
910
|
+
}),
|
|
899
911
|
hoverDivider: {
|
|
900
912
|
width: StyleSheet.hairlineWidth,
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
marginHorizontal:
|
|
913
|
+
height: 20,
|
|
914
|
+
alignSelf: "center",
|
|
915
|
+
backgroundColor: theme.borderStrong,
|
|
916
|
+
marginHorizontal: SPACE.xs
|
|
905
917
|
},
|
|
906
918
|
hoverSparkle: {
|
|
907
919
|
position: "absolute",
|
|
@@ -912,50 +924,49 @@ const styles = StyleSheet.create({
|
|
|
912
924
|
position: "absolute",
|
|
913
925
|
top: "100%",
|
|
914
926
|
right: 0,
|
|
915
|
-
marginTop:
|
|
927
|
+
marginTop: SPACE.sm,
|
|
916
928
|
zIndex: 90,
|
|
917
|
-
minWidth:
|
|
918
|
-
borderRadius:
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
shadowColor: "#
|
|
924
|
-
shadowOpacity: 0.12,
|
|
925
|
-
shadowRadius:
|
|
929
|
+
minWidth: 200,
|
|
930
|
+
borderRadius: RADIUS.lg,
|
|
931
|
+
padding: SPACE.xs + 2,
|
|
932
|
+
backgroundColor: theme.isDark ? theme.card : theme.surface,
|
|
933
|
+
borderWidth: theme.isDark ? StyleSheet.hairlineWidth : 0,
|
|
934
|
+
borderColor: theme.border,
|
|
935
|
+
shadowColor: "#000",
|
|
936
|
+
shadowOpacity: theme.isDark ? 0.4 : 0.12,
|
|
937
|
+
shadowRadius: 18,
|
|
926
938
|
shadowOffset: {
|
|
927
939
|
width: 0,
|
|
928
|
-
height:
|
|
940
|
+
height: 6
|
|
929
941
|
},
|
|
930
|
-
elevation:
|
|
942
|
+
elevation: 8
|
|
931
943
|
},
|
|
932
944
|
moreRow: {
|
|
933
945
|
flexDirection: "row",
|
|
934
946
|
alignItems: "center",
|
|
935
|
-
gap:
|
|
936
|
-
|
|
937
|
-
|
|
947
|
+
gap: SPACE.md - 2,
|
|
948
|
+
minHeight: HIT,
|
|
949
|
+
paddingHorizontal: SPACE.md - 2,
|
|
950
|
+
borderRadius: RADIUS.md
|
|
938
951
|
},
|
|
939
|
-
moreLabel: {
|
|
952
|
+
moreLabel: __spreadProps(__spreadValues({}, TYPE.body), {
|
|
940
953
|
fontSize: 14,
|
|
941
|
-
|
|
942
|
-
|
|
954
|
+
fontWeight: "500",
|
|
955
|
+
color: theme.foreground
|
|
956
|
+
}),
|
|
943
957
|
zoomBtn: {
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
color: "#334155",
|
|
950
|
-
fontWeight: "500"
|
|
958
|
+
width: 36,
|
|
959
|
+
height: 36,
|
|
960
|
+
borderRadius: 18,
|
|
961
|
+
alignItems: "center",
|
|
962
|
+
justifyContent: "center"
|
|
951
963
|
},
|
|
952
|
-
zoomPct: {
|
|
953
|
-
|
|
954
|
-
color: "#0f172a",
|
|
964
|
+
zoomPct: __spreadProps(__spreadValues({}, TYPE.label), {
|
|
965
|
+
color: theme.foreground,
|
|
955
966
|
fontVariant: ["tabular-nums"],
|
|
956
|
-
minWidth:
|
|
967
|
+
minWidth: 48,
|
|
957
968
|
textAlign: "center"
|
|
958
|
-
},
|
|
969
|
+
}),
|
|
959
970
|
selectionRing: {
|
|
960
971
|
borderColor: SELECTION_COLOR
|
|
961
972
|
},
|
|
@@ -975,33 +986,33 @@ const styles = StyleSheet.create({
|
|
|
975
986
|
borderRadius: 2,
|
|
976
987
|
backgroundColor: "#3b82f6",
|
|
977
988
|
borderWidth: 1,
|
|
978
|
-
borderColor:
|
|
989
|
+
borderColor: theme.surface
|
|
979
990
|
},
|
|
980
991
|
mediaTile: {
|
|
981
992
|
borderRadius: 8,
|
|
982
|
-
backgroundColor: "#
|
|
993
|
+
backgroundColor: "#18181b",
|
|
983
994
|
alignItems: "center",
|
|
984
995
|
justifyContent: "center",
|
|
985
|
-
padding:
|
|
996
|
+
padding: SPACE.sm
|
|
986
997
|
},
|
|
987
998
|
mediaTileGlyph: {
|
|
988
|
-
color: "#
|
|
999
|
+
color: "#fafafa",
|
|
989
1000
|
fontSize: 28,
|
|
990
|
-
marginBottom:
|
|
1001
|
+
marginBottom: SPACE.xs
|
|
991
1002
|
},
|
|
992
|
-
mediaTileLabel: {
|
|
993
|
-
color: "#cbd5e1",
|
|
1003
|
+
mediaTileLabel: __spreadProps(__spreadValues({}, TYPE.caption), {
|
|
994
1004
|
fontSize: 11,
|
|
1005
|
+
color: "#a1a1aa",
|
|
995
1006
|
maxWidth: "90%"
|
|
996
|
-
},
|
|
1007
|
+
}),
|
|
997
1008
|
empty: {
|
|
998
1009
|
flex: 1,
|
|
999
1010
|
alignItems: "center",
|
|
1000
1011
|
justifyContent: "center",
|
|
1001
|
-
backgroundColor:
|
|
1012
|
+
backgroundColor: theme.muted
|
|
1002
1013
|
},
|
|
1003
1014
|
emptyText: {
|
|
1004
|
-
color:
|
|
1015
|
+
color: theme.mutedForeground,
|
|
1005
1016
|
fontSize: 14
|
|
1006
1017
|
}
|
|
1007
|
-
});export{NativeCanvasViewer,initialZoomFor};//# sourceMappingURL=NativeCanvasViewer.js.map
|
|
1018
|
+
}));export{NativeCanvasViewer,initialZoomFor};//# sourceMappingURL=NativeCanvasViewer.js.map
|