@adminide-stack/yantra-mobile 12.0.125-alpha.1 → 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.
Files changed (96) hide show
  1. package/lib/features/canvas/AudioEditorExperience.js +207 -109
  2. package/lib/features/canvas/AudioEditorExperience.js.map +1 -1
  3. package/lib/features/canvas/CanvasAgentChatPane.js +87 -72
  4. package/lib/features/canvas/CanvasAgentChatPane.js.map +1 -1
  5. package/lib/features/canvas/CanvasBoardsGrid.js +494 -387
  6. package/lib/features/canvas/CanvasBoardsGrid.js.map +1 -1
  7. package/lib/features/canvas/CanvasChatResultCard.js +78 -59
  8. package/lib/features/canvas/CanvasChatResultCard.js.map +1 -1
  9. package/lib/features/canvas/CanvasEditToolsPanel.js +126 -84
  10. package/lib/features/canvas/CanvasEditToolsPanel.js.map +1 -1
  11. package/lib/features/canvas/CanvasExperience.js +108 -126
  12. package/lib/features/canvas/CanvasExperience.js.map +1 -1
  13. package/lib/features/canvas/CanvasGeneratePanel.js +178 -166
  14. package/lib/features/canvas/CanvasGeneratePanel.js.map +1 -1
  15. package/lib/features/canvas/CanvasLibrarySheet.js +119 -123
  16. package/lib/features/canvas/CanvasLibrarySheet.js.map +1 -1
  17. package/lib/features/canvas/CanvasLooksPanel.js +113 -89
  18. package/lib/features/canvas/CanvasLooksPanel.js.map +1 -1
  19. package/lib/features/canvas/CanvasModelPicker.js +79 -79
  20. package/lib/features/canvas/CanvasModelPicker.js.map +1 -1
  21. package/lib/features/canvas/CanvasTasksPanel.js +193 -128
  22. package/lib/features/canvas/CanvasTasksPanel.js.map +1 -1
  23. package/lib/features/canvas/CanvasTemplatesPanel.js +106 -94
  24. package/lib/features/canvas/CanvasTemplatesPanel.js.map +1 -1
  25. package/lib/features/canvas/CanvasToolDock.js +195 -127
  26. package/lib/features/canvas/CanvasToolDock.js.map +1 -1
  27. package/lib/features/canvas/FrameExtractorExperience.js +163 -100
  28. package/lib/features/canvas/FrameExtractorExperience.js.map +1 -1
  29. package/lib/features/canvas/GeneratorReferenceSlots.js +132 -69
  30. package/lib/features/canvas/GeneratorReferenceSlots.js.map +1 -1
  31. package/lib/features/canvas/ImageEditorExperience.js +278 -209
  32. package/lib/features/canvas/ImageEditorExperience.js.map +1 -1
  33. package/lib/features/canvas/InfluencerStudioExperience.js +167 -125
  34. package/lib/features/canvas/InfluencerStudioExperience.js.map +1 -1
  35. package/lib/features/canvas/MoodboardExperience.js +102 -85
  36. package/lib/features/canvas/MoodboardExperience.js.map +1 -1
  37. package/lib/features/canvas/NativeCanvasViewer.js +203 -192
  38. package/lib/features/canvas/NativeCanvasViewer.js.map +1 -1
  39. package/lib/features/canvas/PromoContextFields.js +125 -92
  40. package/lib/features/canvas/PromoContextFields.js.map +1 -1
  41. package/lib/features/canvas/SetStudioExperience.js +225 -143
  42. package/lib/features/canvas/SetStudioExperience.js.map +1 -1
  43. package/lib/features/canvas/VideoClipsExperience.js +126 -92
  44. package/lib/features/canvas/VideoClipsExperience.js.map +1 -1
  45. package/lib/features/canvas/VideoEditExperience.js +154 -142
  46. package/lib/features/canvas/VideoEditExperience.js.map +1 -1
  47. package/lib/features/canvas/VideoEditorExperience.js +551 -492
  48. package/lib/features/canvas/VideoEditorExperience.js.map +1 -1
  49. package/lib/features/canvas/VideoGeneratorExperience.js +284 -131
  50. package/lib/features/canvas/VideoGeneratorExperience.js.map +1 -1
  51. package/lib/features/canvas/canvasTasks.js +7 -3
  52. package/lib/features/canvas/canvasTasks.js.map +1 -1
  53. package/lib/features/canvas/canvasTheme.js +265 -0
  54. package/lib/features/canvas/canvasTheme.js.map +1 -0
  55. package/lib/features/canvas/canvasUi.js +381 -0
  56. package/lib/features/canvas/canvasUi.js.map +1 -0
  57. package/lib/features/canvas/recorder/CameraRecorderExperience.js +109 -52
  58. package/lib/features/canvas/recorder/CameraRecorderExperience.js.map +1 -1
  59. package/lib/features/canvas/serverTasks.js +1 -1
  60. package/lib/features/canvas/serverTasks.js.map +1 -1
  61. package/lib/features/canvas/set/SetViewportWebView.js +1 -1
  62. package/lib/features/canvas/set/SetViewportWebView.js.map +1 -1
  63. package/lib/features/canvas/videoEditor/BlurBoxOverlay.js +8 -7
  64. package/lib/features/canvas/videoEditor/BlurBoxOverlay.js.map +1 -1
  65. package/lib/features/canvas/videoEditor/ExportTaskCard.js +44 -41
  66. package/lib/features/canvas/videoEditor/ExportTaskCard.js.map +1 -1
  67. package/lib/features/canvas/videoEditor/agent/AgentCutPane.js +50 -45
  68. package/lib/features/canvas/videoEditor/agent/AgentCutPane.js.map +1 -1
  69. package/lib/features/canvas/videoEditor/exportTask.js +3 -2
  70. package/lib/features/canvas/videoEditor/exportTask.js.map +1 -1
  71. package/lib/features/canvas/videoEditor/formWidgets.js +116 -64
  72. package/lib/features/canvas/videoEditor/formWidgets.js.map +1 -1
  73. package/lib/features/canvas/videoEditor/produce/ProduceVideoSheet.js +77 -63
  74. package/lib/features/canvas/videoEditor/produce/ProduceVideoSheet.js.map +1 -1
  75. package/lib/features/canvas/videoEditor/tools/ToolsDrawer.js +95 -79
  76. package/lib/features/canvas/videoEditor/tools/ToolsDrawer.js.map +1 -1
  77. package/lib/features/design/DesignEditorExperience.js +241 -160
  78. package/lib/features/design/DesignEditorExperience.js.map +1 -1
  79. package/lib/features/design/DesignExperience.js +300 -143
  80. package/lib/features/design/DesignExperience.js.map +1 -1
  81. package/lib/features/webbuilder/WebBuilderExperience.js +1 -1
  82. package/lib/features/webbuilder/WebBuilderExperience.js.map +1 -1
  83. package/lib/features/webbuilder/buildFragments.js +3 -2
  84. package/lib/features/webbuilder/buildFragments.js.map +1 -1
  85. package/lib/features/webbuilder/components/PublishSheet.js +1 -1
  86. package/lib/features/webbuilder/components/PublishSheet.js.map +1 -1
  87. package/lib/features/webbuilder/webbuilderPrompts.js +2 -5
  88. package/lib/features/webbuilder/webbuilderPrompts.js.map +1 -1
  89. package/lib/screens/WebBuilderNative/sandboxProxyApi.js +120 -0
  90. package/lib/screens/WebBuilderNative/sandboxProxyApi.js.map +1 -0
  91. package/lib/screens/WebBuilderNative/useRestoredSandboxes.js.map +1 -1
  92. package/lib/screens/WebBuilderNative/useWebBuilderHost.js +26 -4
  93. package/lib/screens/WebBuilderNative/useWebBuilderHost.js.map +1 -1
  94. package/lib/screens/WebBuilderNative/webbuilderTransport.js +110 -7
  95. package/lib/screens/WebBuilderNative/webbuilderTransport.js.map +1 -1
  96. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useState,useCallback,useMemo,useRef}from'react';import {StyleSheet,View,Pressable,Text,ScrollView,PanResponder,TextInput}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Image}from'expo-image';import {KeyboardAwareScreen,KeyboardLiftSpacer}from'../../components/KeyboardComposerDock.js';import {dismissKeyboard}from'../../utils/keyboardController.js';import {resizeFrame}from'../canvas/canvasCore.js';import {replaceLayer,addLayer,newImageLayer,nextZ,layerPaintOrder,bringLayerToFront,sendLayerToBack,duplicateLayer,removeLayer,newTextLayer,newShapeLayer,TSHIRT_COLORS,DESIGN_SWATCHES,TSHIRT_PRINT_AREA}from'./designCore.js';var __defProp = Object.defineProperty;
1
+ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useState,useCallback,useMemo,useRef}from'react';import {View,ScrollView,Text,StyleSheet,PanResponder,TextInput}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Image}from'expo-image';import {KeyboardAwareScreen,KeyboardLiftSpacer}from'../../components/KeyboardComposerDock.js';import {dismissKeyboard}from'../../utils/keyboardController.js';import {resizeFrame}from'../canvas/canvasCore.js';import {useCanvasTheme,themedStyles}from'../canvas/canvasTheme.js';import {Pressable,pressedStyle,SPACE,HIT,RADIUS,TYPE}from'../canvas/canvasUi.js';import {replaceLayer,addLayer,newImageLayer,nextZ,layerPaintOrder,bringLayerToFront,sendLayerToBack,duplicateLayer,removeLayer,newTextLayer,newShapeLayer,TSHIRT_COLORS,DESIGN_SWATCHES,TSHIRT_PRINT_AREA}from'./designCore.js';var __defProp = Object.defineProperty;
2
2
  var __defProps = Object.defineProperties;
3
3
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
@@ -26,6 +26,8 @@ function DesignEditorExperience({
26
26
  canvasImages = []
27
27
  }) {
28
28
  var _a;
29
+ const theme = useCanvasTheme();
30
+ const styles = makeStyles(theme);
29
31
  const [pageIndex, setPageIndex] = useState(0);
30
32
  const [selectedId, setSelectedId] = useState(null);
31
33
  const [dock, setDock] = useState("add");
@@ -68,12 +70,16 @@ function DesignEditorExperience({
68
70
  /* @__PURE__ */ jsx(Pressable, { onPress: () => {
69
71
  dismissKeyboard();
70
72
  onClose();
71
- }, hitSlop: 10, accessibilityRole: "button", accessibilityLabel: "Close editor", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "close", size: 22, color: "#F7F7FA" }) }),
72
- doc.pages.length > 1 ? /* @__PURE__ */ jsx(View, { style: styles.pageChips, children: doc.pages.map((p, i) => /* @__PURE__ */ jsx(Pressable, { onPress: () => {
73
+ }, style: ({
74
+ pressed
75
+ }) => [styles.headerButton, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: "Close editor", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "close", size: 22, color: theme.edInk }) }),
76
+ doc.pages.length > 1 ? /* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: styles.headerMiddleScroll, contentContainerStyle: styles.pageChips, children: doc.pages.map((p, i) => /* @__PURE__ */ jsx(Pressable, { onPress: () => {
73
77
  setPageIndex(i);
74
78
  setSelectedId(null);
75
- }, style: [styles.pageChip, i === pageIndex && styles.pageChipActive], children: /* @__PURE__ */ jsx(Text, { style: [styles.pageChipLabel, i === pageIndex && styles.pageChipLabelActive], children: p.name }) }, p.id)) }) : /* @__PURE__ */ jsx(Text, { style: styles.headerTitle, children: doc.title || "Design" }),
76
- /* @__PURE__ */ jsx(Pressable, { onPress: () => onExport(doc), hitSlop: 10, accessibilityRole: "button", accessibilityLabel: "Export design", children: /* @__PURE__ */ jsx(View, { style: styles.exportButton, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "check", size: 20, color: "#0f172a" }) }) })
79
+ }, style: [styles.pageChip, i === pageIndex && styles.pageChipActive], children: /* @__PURE__ */ jsx(Text, { style: [styles.pageChipLabel, i === pageIndex && styles.pageChipLabelActive], children: p.name }) }, p.id)) }) : /* @__PURE__ */ jsx(Text, { style: styles.headerTitle, numberOfLines: 1, children: doc.title || "Design" }),
80
+ /* @__PURE__ */ jsx(Pressable, { onPress: () => onExport(doc), style: ({
81
+ pressed
82
+ }) => [styles.headerButton, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: "Export design", children: /* @__PURE__ */ jsx(View, { style: styles.exportButton, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "check", size: 20, color: theme.primaryForeground }) }) })
77
83
  ] }),
78
84
  /* @__PURE__ */ jsx(View, { style: styles.canvasArea, onLayout: (e) => setCanvasSize(e.nativeEvent.layout), onTouchStart: dismissKeyboard, children: scale > 0 ? /* @__PURE__ */ jsxs(Pressable, { style: [styles.page, {
79
85
  width: page.width * scale,
@@ -100,13 +106,13 @@ function DesignEditorExperience({
100
106
  opacity: Math.min(1, +(selected.opacity + 0.1).toFixed(2))
101
107
  })) }),
102
108
  /* @__PURE__ */ jsx(View, { style: styles.inspectorSpacer }),
103
- /* @__PURE__ */ jsx(IconButton, { name: "trash-can-outline", color: "#F87171", onPress: () => {
109
+ /* @__PURE__ */ jsx(IconButton, { name: "trash-can-outline", color: theme.edDanger, onPress: () => {
104
110
  setPage(removeLayer(page, selected.id));
105
111
  setSelectedId(null);
106
112
  } })
107
113
  ] }) : null,
108
114
  /* @__PURE__ */ jsxs(View, { style: styles.dockPanel, children: [
109
- dock === "add" ? /* @__PURE__ */ jsxs(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, contentContainerStyle: styles.addRow, children: [
115
+ dock === "add" ? /* @__PURE__ */ jsxs(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: styles.hScroll, contentContainerStyle: styles.addRow, children: [
110
116
  /* @__PURE__ */ jsx(AddButton, { icon: "format-text", label: "Text", onPress: () => addAndSelect(newTextLayer("Tap to edit", nextZ(page))) }),
111
117
  /* @__PURE__ */ jsx(AddButton, { icon: "square-rounded-outline", label: "Rectangle", onPress: () => addAndSelect(newShapeLayer("rect", nextZ(page))) }),
112
118
  /* @__PURE__ */ jsx(AddButton, { icon: "minus", label: "Line", onPress: () => addAndSelect(newShapeLayer("line", nextZ(page))) }),
@@ -124,28 +130,32 @@ function DesignEditorExperience({
124
130
  background
125
131
  })) })
126
132
  ] }) : null,
127
- dock === "layers" ? /* @__PURE__ */ jsxs(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, contentContainerStyle: styles.addRow, children: [
133
+ dock === "layers" ? /* @__PURE__ */ jsxs(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: styles.hScroll, contentContainerStyle: styles.addRow, children: [
128
134
  layerPaintOrder(page.layers).slice().reverse().map((layer) => /* @__PURE__ */ jsxs(Pressable, { onPress: () => setSelectedId(layer.id), style: [styles.layerChip, layer.id === selectedId && styles.layerChipActive], children: [
129
- /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: layer.type === "text" ? "format-text" : layer.type === "image" ? "image-outline" : "square-rounded-outline", size: 14, color: layer.id === selectedId ? "#0f172a" : "#CBD5E1" }),
135
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: layer.type === "text" ? "format-text" : layer.type === "image" ? "image-outline" : "square-rounded-outline", size: 14, color: layer.id === selectedId ? theme.edOnInk : theme.edInk2 }),
130
136
  /* @__PURE__ */ jsx(Text, { style: [styles.layerChipLabel, layer.id === selectedId && styles.layerChipLabelActive], numberOfLines: 1, children: layer.type === "text" ? layer.text.slice(0, 14) || "Text" : layer.type })
131
137
  ] }, layer.id)),
132
138
  page.layers.length === 0 ? /* @__PURE__ */ jsx(Text, { style: styles.panelHint, children: "No layers yet" }) : null
133
139
  ] }) : null
134
140
  ] }),
135
141
  /* @__PURE__ */ jsx(View, { style: styles.dock, children: [["add", "plus-box-outline", "Add"], ["style", "palette-outline", "Style"], ["page", "file-outline", "Page"], ["layers", "layers-outline", "Layers"]].map(([tab, icon, label]) => /* @__PURE__ */ jsxs(Pressable, { onPress: () => setDock(tab), style: styles.dockTab, accessibilityRole: "tab", children: [
136
- /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: icon, size: 22, color: dock === tab ? "#A5B4FC" : "#94A3B8" }),
142
+ /* @__PURE__ */ jsx(View, { style: [styles.dockPill, dock === tab && styles.dockPillActive], children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: icon, size: 22, color: dock === tab ? theme.edInk : theme.edInk3 }) }),
137
143
  /* @__PURE__ */ jsx(Text, { style: [styles.dockLabel, dock === tab && styles.dockLabelActive], children: label })
138
144
  ] }, tab)) }),
139
145
  imagePicker ? /* @__PURE__ */ jsx(View, { style: styles.pickerOverlay, children: /* @__PURE__ */ jsxs(View, { style: styles.pickerCard, children: [
140
- /* @__PURE__ */ jsx(Text, { style: styles.pickerTitle, children: "Add an image" }),
146
+ /* @__PURE__ */ jsxs(View, { style: styles.pickerHead, children: [
147
+ /* @__PURE__ */ jsx(Text, { style: styles.pickerTitle, children: "Add an image" }),
148
+ /* @__PURE__ */ jsx(Pressable, { onPress: () => setImagePicker(false), style: ({
149
+ pressed
150
+ }) => [styles.pickerDismiss, pressedStyle(pressed)], children: /* @__PURE__ */ jsx(Text, { style: styles.pickerDismissLabel, children: "Cancel" }) })
151
+ ] }),
141
152
  /* @__PURE__ */ jsx(Text, { style: styles.panelHint, children: canvasImages.length ? "From your canvases:" : onPickLocalMedia ? "No images on your canvases yet." : "Photo library needs an app update - images from your canvases work now." }),
142
- /* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, contentContainerStyle: styles.pickerRow, children: canvasImages.map((src) => /* @__PURE__ */ jsx(Pressable, { onPress: () => {
153
+ /* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: styles.hScroll, contentContainerStyle: styles.pickerRow, children: canvasImages.map((src) => /* @__PURE__ */ jsx(Pressable, { onPress: () => {
143
154
  setImagePicker(false);
144
155
  addAndSelect(newImageLayer(src, nextZ(page)));
145
156
  }, children: /* @__PURE__ */ jsx(Image, { source: {
146
157
  uri: src
147
- }, style: styles.pickerThumb, contentFit: "cover" }) }, src)) }),
148
- /* @__PURE__ */ jsx(Pressable, { onPress: () => setImagePicker(false), style: styles.pickerDismiss, children: /* @__PURE__ */ jsx(Text, { style: styles.pickerDismissLabel, children: "Cancel" }) })
158
+ }, style: styles.pickerThumb, contentFit: "cover" }) }, src)) })
149
159
  ] }) }) : null,
150
160
  /* @__PURE__ */ jsx(KeyboardLiftSpacer, {})
151
161
  ] });
@@ -156,6 +166,7 @@ function PageChrome({
156
166
  pageIndex,
157
167
  scale
158
168
  }) {
169
+ const styles = makeStyles(useCanvasTheme());
159
170
  if (doc.kind === "tshirt") {
160
171
  const area = TSHIRT_PRINT_AREA;
161
172
  return /* @__PURE__ */ jsxs(View, { pointerEvents: "none", style: StyleSheet.absoluteFill, children: [
@@ -207,6 +218,8 @@ function LayerView({
207
218
  onSelect,
208
219
  onCommit
209
220
  }) {
221
+ const theme = useCanvasTheme();
222
+ const styles = makeStyles(theme);
210
223
  const [live, setLive] = useState(null);
211
224
  const gestureBase = useRef({
212
225
  x: 0,
@@ -295,7 +308,7 @@ function LayerView({
295
308
  }, numberOfLines: 0, children: layer.text }),
296
309
  !selected ? /* @__PURE__ */ jsx(Pressable, { style: StyleSheet.absoluteFill, onPress: onSelect }) : /* @__PURE__ */ jsxs(Fragment, { children: [
297
310
  /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: styles.selection }),
298
- /* @__PURE__ */ jsx(View, __spreadProps(__spreadValues({ style: styles.handle }, resize.current.panHandlers), { children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "arrow-expand", size: 10, color: "#0f172a" }) }))
311
+ /* @__PURE__ */ jsx(View, __spreadProps(__spreadValues({ style: styles.handle }, resize.current.panHandlers), { children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "arrow-expand", size: 11, color: "#ffffff" }) }))
299
312
  ] })
300
313
  ] }));
301
314
  }
@@ -303,10 +316,12 @@ function TextStylePanel({
303
316
  layer,
304
317
  onChange
305
318
  }) {
319
+ const theme = useCanvasTheme();
320
+ const styles = makeStyles(theme);
306
321
  return /* @__PURE__ */ jsxs(View, { children: [
307
322
  /* @__PURE__ */ jsx(TextInput, { style: styles.textInput, value: layer.text, onChangeText: (text) => onChange(__spreadProps(__spreadValues({}, layer), {
308
323
  text
309
- })), placeholder: "Your text", placeholderTextColor: "#64748B", multiline: true }),
324
+ })), placeholder: "Your text", placeholderTextColor: theme.edInk3, multiline: true }),
310
325
  /* @__PURE__ */ jsxs(View, { style: styles.textControls, children: [
311
326
  /* @__PURE__ */ jsx(IconButton, { name: "format-font-size-decrease", onPress: () => onChange(__spreadProps(__spreadValues({}, layer), {
312
327
  fontSize: Math.max(16, layer.fontSize - 8)
@@ -315,10 +330,10 @@ function TextStylePanel({
315
330
  /* @__PURE__ */ jsx(IconButton, { name: "format-font-size-increase", onPress: () => onChange(__spreadProps(__spreadValues({}, layer), {
316
331
  fontSize: Math.min(400, layer.fontSize + 8)
317
332
  })) }),
318
- /* @__PURE__ */ jsx(IconButton, { name: "format-bold", color: layer.bold ? "#A5B4FC" : "#CBD5E1", onPress: () => onChange(__spreadProps(__spreadValues({}, layer), {
333
+ /* @__PURE__ */ jsx(IconButton, { name: "format-bold", active: layer.bold, onPress: () => onChange(__spreadProps(__spreadValues({}, layer), {
319
334
  bold: !layer.bold
320
335
  })) }),
321
- ["left", "center", "right"].map((align) => /* @__PURE__ */ jsx(IconButton, { name: `format-align-${align}`, color: layer.align === align ? "#A5B4FC" : "#CBD5E1", onPress: () => onChange(__spreadProps(__spreadValues({}, layer), {
336
+ ["left", "center", "right"].map((align) => /* @__PURE__ */ jsx(IconButton, { name: `format-align-${align}`, active: layer.align === align, onPress: () => onChange(__spreadProps(__spreadValues({}, layer), {
322
337
  align
323
338
  })) }, align))
324
339
  ] }),
@@ -332,7 +347,8 @@ function SwatchRow({
332
347
  value,
333
348
  onPick
334
349
  }) {
335
- return /* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, contentContainerStyle: styles.swatchRow, children: swatches.map((color) => /* @__PURE__ */ jsx(Pressable, { onPress: () => onPick(color), style: [styles.swatch, {
350
+ const styles = makeStyles(useCanvasTheme());
351
+ return /* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: styles.hScroll, contentContainerStyle: styles.swatchRow, children: swatches.map((color) => /* @__PURE__ */ jsx(Pressable, { onPress: () => onPick(color), style: [styles.swatch, {
336
352
  backgroundColor: color
337
353
  }, value === color && styles.swatchActive], accessibilityRole: "button", accessibilityLabel: `Colour ${color}` }, color)) });
338
354
  }
@@ -341,68 +357,96 @@ function AddButton({
341
357
  label,
342
358
  onPress
343
359
  }) {
344
- return /* @__PURE__ */ jsxs(Pressable, { onPress, style: styles.addButton, accessibilityRole: "button", children: [
345
- /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: icon, size: 22, color: "#E2E8F0" }),
360
+ const theme = useCanvasTheme();
361
+ const styles = makeStyles(theme);
362
+ return /* @__PURE__ */ jsxs(Pressable, { onPress, style: ({
363
+ pressed
364
+ }) => [styles.addButton, pressedStyle(pressed)], accessibilityRole: "button", children: [
365
+ /* @__PURE__ */ jsx(View, { style: styles.addIcon, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: icon, size: 22, color: theme.edInk }) }),
346
366
  /* @__PURE__ */ jsx(Text, { style: styles.addButtonLabel, children: label })
347
367
  ] });
348
368
  }
349
369
  function IconButton({
350
370
  name,
351
- color = "#CBD5E1",
371
+ color,
372
+ active,
352
373
  onPress
353
374
  }) {
354
- return /* @__PURE__ */ jsx(Pressable, { onPress, hitSlop: 8, style: styles.iconButton, accessibilityRole: "button", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name, size: 18, color }) });
375
+ const theme = useCanvasTheme();
376
+ const styles = makeStyles(theme);
377
+ const ink = color != null ? color : active === false ? theme.edInk3 : theme.edInk2;
378
+ return /* @__PURE__ */ jsx(Pressable, { onPress, hitSlop: 4, style: ({
379
+ pressed
380
+ }) => [styles.iconButton, active && styles.iconButtonActive, pressedStyle(pressed)], accessibilityRole: "button", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name, size: 20, color: active ? theme.edInk : ink }) });
355
381
  }
356
- const styles = StyleSheet.create({
382
+ const STAGE = "#0c0c0f";
383
+ const makeStyles = themedStyles((theme) => StyleSheet.create({
357
384
  root: {
358
385
  flex: 1,
359
- backgroundColor: "#0B0B0F"
386
+ backgroundColor: theme.edBg
360
387
  },
361
388
  header: {
362
389
  flexDirection: "row",
363
390
  alignItems: "center",
364
- justifyContent: "space-between",
365
- paddingHorizontal: 16,
366
- paddingVertical: 12
391
+ gap: SPACE.sm,
392
+ minHeight: 56,
393
+ paddingHorizontal: SPACE.sm,
394
+ backgroundColor: theme.edPanel,
395
+ borderBottomWidth: StyleSheet.hairlineWidth,
396
+ borderBottomColor: theme.edLine
397
+ },
398
+ headerButton: {
399
+ width: HIT,
400
+ height: HIT,
401
+ borderRadius: HIT / 2,
402
+ alignItems: "center",
403
+ justifyContent: "center"
367
404
  },
368
- headerTitle: {
369
- fontSize: 16,
370
- fontWeight: "600",
371
- color: "#F7F7FA"
405
+ headerTitle: __spreadProps(__spreadValues({}, TYPE.title), {
406
+ flex: 1,
407
+ textAlign: "center",
408
+ color: theme.edInk
409
+ }),
410
+ headerMiddleScroll: {
411
+ flexGrow: 0,
412
+ flexShrink: 1,
413
+ marginHorizontal: "auto"
372
414
  },
373
415
  exportButton: {
374
- width: 32,
375
- height: 32,
376
- borderRadius: 16,
377
- backgroundColor: "#F7F7FA",
416
+ width: 36,
417
+ height: 36,
418
+ borderRadius: 18,
419
+ backgroundColor: theme.primary,
378
420
  alignItems: "center",
379
421
  justifyContent: "center"
380
422
  },
381
423
  pageChips: {
382
424
  flexDirection: "row",
383
- gap: 6
425
+ alignItems: "center",
426
+ gap: SPACE.xs + 2
384
427
  },
385
428
  pageChip: {
386
- paddingHorizontal: 14,
387
- paddingVertical: 6,
388
- borderRadius: 16,
389
- backgroundColor: "#1E1E24"
429
+ minHeight: 32,
430
+ paddingHorizontal: SPACE.md + 2,
431
+ borderRadius: RADIUS.pill,
432
+ alignItems: "center",
433
+ justifyContent: "center",
434
+ backgroundColor: theme.edRaised
390
435
  },
391
436
  pageChipActive: {
392
- backgroundColor: "#A5B4FC"
393
- },
394
- pageChipLabel: {
395
- fontSize: 13,
396
- fontWeight: "600",
397
- color: "#CBD5E1"
437
+ backgroundColor: theme.edInk
398
438
  },
439
+ pageChipLabel: __spreadProps(__spreadValues({}, TYPE.label), {
440
+ color: theme.edInk2
441
+ }),
399
442
  pageChipLabelActive: {
400
- color: "#0f172a"
443
+ color: theme.edOnInk
401
444
  },
402
445
  canvasArea: {
403
446
  flex: 1,
404
447
  alignItems: "center",
405
- justifyContent: "center"
448
+ justifyContent: "center",
449
+ backgroundColor: STAGE
406
450
  },
407
451
  page: {
408
452
  borderRadius: 4,
@@ -413,7 +457,7 @@ const styles = StyleSheet.create({
413
457
  },
414
458
  selection: __spreadProps(__spreadValues({}, StyleSheet.absoluteFillObject), {
415
459
  borderWidth: 1.5,
416
- borderColor: "#A5B4FC",
460
+ borderColor: theme.info,
417
461
  borderRadius: 2
418
462
  }),
419
463
  handle: {
@@ -423,221 +467,258 @@ const styles = StyleSheet.create({
423
467
  width: 24,
424
468
  height: 24,
425
469
  borderRadius: 12,
426
- backgroundColor: "#A5B4FC",
470
+ backgroundColor: theme.info,
471
+ borderWidth: 2,
472
+ borderColor: "#ffffff",
427
473
  alignItems: "center",
428
474
  justifyContent: "center"
429
475
  },
476
+ // Guides draw on the design's own page colour, so their ink is fixed, not themed.
430
477
  printArea: {
431
478
  position: "absolute",
432
479
  borderWidth: 1.5,
433
480
  borderStyle: "dashed",
434
- borderColor: "rgba(148,163,184,0.9)",
481
+ borderColor: "rgba(148,148,160,0.9)",
435
482
  borderRadius: 6
436
483
  },
437
484
  tshirtNeck: {
438
485
  position: "absolute",
439
486
  top: 0,
440
487
  borderBottomWidth: 2,
441
- borderColor: "rgba(148,163,184,0.6)"
488
+ borderColor: "rgba(148,148,160,0.6)"
442
489
  },
443
490
  chromeHint: {
444
491
  position: "absolute",
445
492
  alignSelf: "center",
446
- fontSize: 10,
493
+ fontSize: 11,
447
494
  fontWeight: "600",
448
- letterSpacing: 0.6,
449
- textTransform: "uppercase",
450
- color: "rgba(148,163,184,0.9)"
495
+ color: "rgba(148,148,160,0.95)"
451
496
  },
452
497
  postDivider: {
453
498
  position: "absolute",
454
499
  width: 1.5,
455
- backgroundColor: "rgba(15,23,42,0.25)"
500
+ backgroundColor: "rgba(20,20,20,0.22)"
456
501
  },
457
502
  postAddressLine: {
458
503
  position: "absolute",
459
504
  height: 1.5,
460
- backgroundColor: "rgba(15,23,42,0.18)"
505
+ backgroundColor: "rgba(20,20,20,0.16)"
461
506
  },
462
507
  postStamp: {
463
508
  position: "absolute",
464
509
  borderWidth: 1.5,
465
510
  borderStyle: "dashed",
466
- borderColor: "rgba(15,23,42,0.25)",
511
+ borderColor: "rgba(20,20,20,0.22)",
467
512
  borderRadius: 4
468
513
  },
469
514
  inspector: {
470
515
  flexDirection: "row",
471
516
  alignItems: "center",
472
- gap: 4,
473
- paddingHorizontal: 12,
474
- paddingVertical: 8,
475
- backgroundColor: "#141419",
517
+ gap: SPACE.xs,
518
+ paddingHorizontal: SPACE.sm,
519
+ paddingVertical: SPACE.xs,
520
+ backgroundColor: theme.edPanel,
476
521
  borderTopWidth: StyleSheet.hairlineWidth,
477
- borderTopColor: "#26262E"
522
+ borderTopColor: theme.edLine
478
523
  },
479
524
  inspectorSpacer: {
480
525
  flex: 1
481
526
  },
482
- inspectorLabel: {
483
- fontSize: 12,
484
- color: "#94A3B8"
485
- },
486
- inspectorValue: {
487
- fontSize: 13,
488
- fontWeight: "600",
489
- color: "#E2E8F0",
527
+ inspectorLabel: __spreadProps(__spreadValues({}, TYPE.caption), {
528
+ color: theme.edInk3
529
+ }),
530
+ inspectorValue: __spreadProps(__spreadValues({}, TYPE.label), {
531
+ color: theme.edInk,
490
532
  minWidth: 40,
491
- textAlign: "center"
492
- },
533
+ textAlign: "center",
534
+ fontVariant: ["tabular-nums"]
535
+ }),
493
536
  iconButton: {
494
- padding: 6
537
+ width: 40,
538
+ height: 40,
539
+ borderRadius: RADIUS.pill,
540
+ alignItems: "center",
541
+ justifyContent: "center"
542
+ },
543
+ iconButtonActive: {
544
+ backgroundColor: theme.edRaisedHi
495
545
  },
496
546
  dockPanel: {
497
- minHeight: 64,
498
- paddingHorizontal: 14,
499
- paddingVertical: 10,
500
- backgroundColor: "#111116",
547
+ minHeight: 84,
548
+ justifyContent: "center",
549
+ paddingHorizontal: SPACE.lg,
550
+ paddingVertical: SPACE.md,
551
+ backgroundColor: theme.edPanel,
501
552
  borderTopWidth: StyleSheet.hairlineWidth,
502
- borderTopColor: "#26262E"
553
+ borderTopColor: theme.edLine
554
+ },
555
+ hScroll: {
556
+ flexGrow: 0
503
557
  },
504
558
  addRow: {
505
559
  flexDirection: "row",
506
560
  alignItems: "center",
507
- gap: 12
561
+ gap: SPACE.md
508
562
  },
509
563
  addButton: {
510
564
  alignItems: "center",
511
- gap: 4,
512
- paddingHorizontal: 10,
513
- paddingVertical: 6
565
+ gap: SPACE.xs + 2,
566
+ minWidth: 64
567
+ },
568
+ addIcon: {
569
+ width: 48,
570
+ height: 48,
571
+ borderRadius: RADIUS.md,
572
+ alignItems: "center",
573
+ justifyContent: "center",
574
+ backgroundColor: theme.edRaised
514
575
  },
515
576
  addButtonLabel: {
516
577
  fontSize: 11,
517
- color: "#CBD5E1"
518
- },
519
- panelHint: {
520
- fontSize: 12,
521
- color: "#64748B",
522
- paddingVertical: 8
523
- },
524
- panelLabel: {
525
- fontSize: 12,
526
- fontWeight: "600",
527
- color: "#94A3B8",
528
- marginBottom: 8
578
+ lineHeight: 14,
579
+ fontWeight: "500",
580
+ color: theme.edInk2
529
581
  },
582
+ panelHint: __spreadProps(__spreadValues({}, TYPE.caption), {
583
+ color: theme.edInk3,
584
+ paddingVertical: SPACE.sm
585
+ }),
586
+ panelLabel: __spreadProps(__spreadValues({}, TYPE.label), {
587
+ color: theme.edInk2,
588
+ marginBottom: SPACE.sm
589
+ }),
530
590
  swatchRow: {
531
591
  flexDirection: "row",
532
- gap: 10,
533
- paddingVertical: 6
592
+ alignItems: "center",
593
+ gap: SPACE.md,
594
+ paddingVertical: SPACE.xs + 2
534
595
  },
535
596
  swatch: {
536
- width: 30,
537
- height: 30,
538
- borderRadius: 15,
597
+ width: 32,
598
+ height: 32,
599
+ borderRadius: 16,
539
600
  borderWidth: 1,
540
- borderColor: "rgba(148,163,184,0.4)"
601
+ borderColor: theme.edLineHi
541
602
  },
542
603
  swatchActive: {
543
- borderWidth: 2.5,
544
- borderColor: "#A5B4FC"
604
+ borderWidth: 3,
605
+ borderColor: theme.edInk
545
606
  },
546
607
  textInput: {
547
- backgroundColor: "#1E1E24",
548
- borderRadius: 10,
549
- paddingHorizontal: 12,
550
- paddingVertical: 8,
551
- color: "#F7F7FA",
552
- fontSize: 14,
553
- maxHeight: 80
608
+ backgroundColor: theme.edRaised,
609
+ borderRadius: RADIUS.md,
610
+ paddingHorizontal: SPACE.md,
611
+ paddingVertical: SPACE.sm + 2,
612
+ color: theme.edInk,
613
+ fontSize: 15,
614
+ maxHeight: 84
554
615
  },
555
616
  textControls: {
556
617
  flexDirection: "row",
557
618
  alignItems: "center",
558
- gap: 2,
559
- marginTop: 8
619
+ gap: SPACE.xs,
620
+ marginTop: SPACE.sm
560
621
  },
561
622
  layerChip: {
562
623
  flexDirection: "row",
563
624
  alignItems: "center",
564
- gap: 6,
565
- paddingHorizontal: 12,
566
- paddingVertical: 8,
567
- borderRadius: 16,
568
- backgroundColor: "#1E1E24"
625
+ gap: SPACE.xs + 2,
626
+ minHeight: 36,
627
+ paddingHorizontal: SPACE.md,
628
+ borderRadius: RADIUS.pill,
629
+ backgroundColor: theme.edRaised
569
630
  },
570
631
  layerChipActive: {
571
- backgroundColor: "#A5B4FC"
632
+ backgroundColor: theme.edInk
572
633
  },
573
- layerChipLabel: {
574
- fontSize: 12,
575
- color: "#CBD5E1",
634
+ layerChipLabel: __spreadProps(__spreadValues({}, TYPE.caption), {
635
+ color: theme.edInk2,
576
636
  maxWidth: 110
577
- },
637
+ }),
578
638
  layerChipLabelActive: {
579
- color: "#0f172a",
639
+ color: theme.edOnInk,
580
640
  fontWeight: "600"
581
641
  },
582
642
  dock: {
583
643
  flexDirection: "row",
584
644
  justifyContent: "space-around",
585
- paddingVertical: 10,
586
- backgroundColor: "#0B0B0F",
645
+ paddingTop: SPACE.sm,
646
+ paddingBottom: SPACE.sm,
647
+ backgroundColor: theme.edPanel,
587
648
  borderTopWidth: StyleSheet.hairlineWidth,
588
- borderTopColor: "#26262E"
649
+ borderTopColor: theme.edLine
589
650
  },
590
651
  dockTab: {
591
652
  alignItems: "center",
592
653
  gap: 2,
593
- minWidth: 64
654
+ minWidth: 64,
655
+ minHeight: HIT
656
+ },
657
+ dockPill: {
658
+ width: 56,
659
+ height: 30,
660
+ borderRadius: RADIUS.pill,
661
+ alignItems: "center",
662
+ justifyContent: "center"
663
+ },
664
+ dockPillActive: {
665
+ backgroundColor: theme.edRaisedHi
594
666
  },
595
667
  dockLabel: {
596
668
  fontSize: 11,
597
- color: "#94A3B8"
669
+ lineHeight: 14,
670
+ fontWeight: "500",
671
+ color: theme.edInk3
598
672
  },
599
673
  dockLabelActive: {
600
- color: "#A5B4FC",
674
+ color: theme.edInk,
601
675
  fontWeight: "600"
602
676
  },
603
677
  pickerOverlay: __spreadProps(__spreadValues({}, StyleSheet.absoluteFillObject), {
604
- backgroundColor: "rgba(0,0,0,0.65)",
605
- alignItems: "center",
606
- justifyContent: "center",
607
- padding: 24
678
+ backgroundColor: "rgba(0,0,0,0.5)",
679
+ justifyContent: "flex-end"
608
680
  }),
609
681
  pickerCard: {
610
682
  width: "100%",
611
- maxWidth: 360,
612
- backgroundColor: "#17171C",
613
- borderRadius: 16,
614
- padding: 18,
615
- gap: 8
616
- },
617
- pickerTitle: {
618
- fontSize: 16,
619
- fontWeight: "600",
620
- color: "#F7F7FA"
683
+ backgroundColor: theme.edPanel,
684
+ borderTopLeftRadius: RADIUS.xl,
685
+ borderTopRightRadius: RADIUS.xl,
686
+ paddingHorizontal: SPACE.lg,
687
+ paddingTop: SPACE.xs,
688
+ paddingBottom: SPACE.xl,
689
+ gap: SPACE.xs
690
+ },
691
+ pickerHead: {
692
+ flexDirection: "row",
693
+ alignItems: "center",
694
+ minHeight: 52,
695
+ borderBottomWidth: StyleSheet.hairlineWidth,
696
+ borderBottomColor: theme.edLine,
697
+ marginBottom: SPACE.xs
621
698
  },
699
+ pickerTitle: __spreadProps(__spreadValues({}, TYPE.title), {
700
+ flex: 1,
701
+ color: theme.edInk
702
+ }),
622
703
  pickerRow: {
623
704
  flexDirection: "row",
624
- gap: 10,
625
- paddingVertical: 8
705
+ gap: SPACE.sm + 2,
706
+ paddingVertical: SPACE.sm
626
707
  },
627
708
  pickerThumb: {
628
- width: 84,
629
- height: 84,
630
- borderRadius: 10,
631
- backgroundColor: "#26262E"
709
+ width: 88,
710
+ height: 88,
711
+ borderRadius: RADIUS.md,
712
+ backgroundColor: theme.edRaised
632
713
  },
633
714
  pickerDismiss: {
634
- alignSelf: "flex-end",
635
- paddingHorizontal: 14,
636
- paddingVertical: 8
715
+ minHeight: HIT,
716
+ paddingHorizontal: SPACE.md,
717
+ alignItems: "center",
718
+ justifyContent: "center"
637
719
  },
638
- pickerDismissLabel: {
639
- fontSize: 13,
640
- fontWeight: "600",
641
- color: "#A5B4FC"
642
- }
643
- });export{DesignEditorExperience};//# sourceMappingURL=DesignEditorExperience.js.map
720
+ pickerDismissLabel: __spreadProps(__spreadValues({}, TYPE.label), {
721
+ fontSize: 15,
722
+ color: theme.edInk2
723
+ })
724
+ }));export{DesignEditorExperience};//# sourceMappingURL=DesignEditorExperience.js.map