@adminide-stack/yantra-mobile 12.0.173 → 12.0.174-alpha.1
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/compute.js +54 -1
- package/lib/compute.js.map +1 -1
- package/lib/features/apps/AppsCatalog.js +10 -0
- package/lib/features/apps/AppsCatalog.js.map +1 -1
- package/lib/features/apps/mobileAppCatalog.js +6 -1
- package/lib/features/apps/mobileAppCatalog.js.map +1 -1
- package/lib/features/apps/nativeAppHandoff.js +4 -1
- package/lib/features/apps/nativeAppHandoff.js.map +1 -1
- package/lib/features/apps/nativeSurfaceTwin.js +2 -1
- package/lib/features/apps/nativeSurfaceTwin.js.map +1 -1
- package/lib/features/channels/ChannelIcon.js +13 -3
- package/lib/features/channels/ChannelIcon.js.map +1 -1
- package/lib/features/channels/ConnectAppsSheet.js +5 -5
- package/lib/features/channels/ConnectAppsSheet.js.map +1 -1
- package/lib/features/channels/HomeImessage.js +5 -3
- package/lib/features/channels/HomeImessage.js.map +1 -1
- package/lib/features/channels/channelLinks.js +13 -1
- package/lib/features/channels/channelLinks.js.map +1 -1
- package/lib/features/computer/ComputerAgentChatPane.js +45 -0
- package/lib/features/computer/ComputerAgentChatPane.js.map +1 -0
- package/lib/features/computer/ComputerDesktop.js +164 -0
- package/lib/features/computer/ComputerDesktop.js.map +1 -0
- package/lib/features/computer/ComputerExperience.js +79 -0
- package/lib/features/computer/ComputerExperience.js.map +1 -0
- package/lib/features/computer/ComputerHandoff.js +142 -0
- package/lib/features/computer/ComputerHandoff.js.map +1 -0
- package/lib/features/computer/FilesPane.js +179 -0
- package/lib/features/computer/FilesPane.js.map +1 -0
- package/lib/features/computer/LivePage.js +1093 -0
- package/lib/features/computer/LivePage.js.map +1 -0
- package/lib/features/computer/TerminalPane.js +139 -0
- package/lib/features/computer/TerminalPane.js.map +1 -0
- package/lib/features/computer/computerApi.js +819 -0
- package/lib/features/computer/computerApi.js.map +1 -0
- package/lib/features/computer/computerChat.js +42 -0
- package/lib/features/computer/computerChat.js.map +1 -0
- package/lib/features/computer/computerControls.js +227 -0
- package/lib/features/computer/computerControls.js.map +1 -0
- package/lib/features/computer/computerStyles.js +384 -0
- package/lib/features/computer/computerStyles.js.map +1 -0
- package/lib/features/computer/computerTheme.js +133 -0
- package/lib/features/computer/computerTheme.js.map +1 -0
- package/lib/features/computer/handoff.js +73 -0
- package/lib/features/computer/handoff.js.map +1 -0
- package/lib/features/computer/inputLane.js +171 -0
- package/lib/features/computer/inputLane.js.map +1 -0
- package/lib/features/computer/inputPump.js +77 -0
- package/lib/features/computer/inputPump.js.map +1 -0
- package/lib/features/computer/inputSocket.js +148 -0
- package/lib/features/computer/inputSocket.js.map +1 -0
- package/lib/features/computer/keyboardBridge.js +176 -0
- package/lib/features/computer/keyboardBridge.js.map +1 -0
- package/lib/features/computer/pageCoordinates.js +19 -0
- package/lib/features/computer/pageCoordinates.js.map +1 -0
- package/lib/features/computer/pageZoom.js +12 -0
- package/lib/features/computer/pageZoom.js.map +1 -0
- package/lib/features/computer/pictureGeometry.js +68 -0
- package/lib/features/computer/pictureGeometry.js.map +1 -0
- package/lib/features/computer/tabsState.js +7 -0
- package/lib/features/computer/tabsState.js.map +1 -0
- package/lib/features/computer/useComputerHooks.js +146 -0
- package/lib/features/computer/useComputerHooks.js.map +1 -0
- package/lib/features/games/cubeforgeFriends.js +14 -1
- package/lib/features/games/cubeforgeFriends.js.map +1 -1
- package/lib/features/games/useCubeforgeFriends.js +5 -2
- package/lib/features/games/useCubeforgeFriends.js.map +1 -1
- package/lib/features/games/vendored/ui/screens/Cubeforge3DHomeScreen.js +146 -37
- package/lib/features/games/vendored/ui/screens/Cubeforge3DHomeScreen.js.map +1 -1
- package/lib/features/games/vendored/ui/theme.js +3 -1
- package/lib/features/games/vendored/ui/theme.js.map +1 -1
- package/lib/features/links/openInApp.js +10 -1
- package/lib/features/links/openInApp.js.map +1 -1
- package/lib/features/webbuilder/WebBuilderExperience.js +180 -44
- package/lib/features/webbuilder/WebBuilderExperience.js.map +1 -1
- package/lib/features/webbuilder/buildFragments.js +16 -3
- package/lib/features/webbuilder/buildFragments.js.map +1 -1
- package/lib/features/webbuilder/codezenHandoff.js +29 -1
- package/lib/features/webbuilder/codezenHandoff.js.map +1 -1
- package/lib/features/webbuilder/components/CodeView.js +69 -23
- package/lib/features/webbuilder/components/CodeView.js.map +1 -1
- package/lib/features/webbuilder/components/PreviewFrame.js +62 -2
- package/lib/features/webbuilder/components/PreviewFrame.js.map +1 -1
- package/lib/features/webbuilder/components/PreviewScreen.js +37 -2
- package/lib/features/webbuilder/components/PreviewScreen.js.map +1 -1
- package/lib/features/webbuilder/components/ProjectChat.js +2 -1
- package/lib/features/webbuilder/components/ProjectChat.js.map +1 -1
- package/lib/features/webbuilder/components/ProjectSheets.js +147 -57
- package/lib/features/webbuilder/components/ProjectSheets.js.map +1 -1
- package/lib/features/webbuilder/components/PublishSheet.js +106 -2
- package/lib/features/webbuilder/components/PublishSheet.js.map +1 -1
- package/lib/features/webbuilder/components/ReferenceModeChoice.js +105 -0
- package/lib/features/webbuilder/components/ReferenceModeChoice.js.map +1 -0
- package/lib/features/webbuilder/components/RetentionBanner.js +17 -6
- package/lib/features/webbuilder/components/RetentionBanner.js.map +1 -1
- package/lib/features/webbuilder/components/SiteUploadSheet.js +327 -0
- package/lib/features/webbuilder/components/SiteUploadSheet.js.map +1 -0
- package/lib/features/webbuilder/components/StreamStallNote.js +38 -0
- package/lib/features/webbuilder/components/StreamStallNote.js.map +1 -0
- package/lib/features/webbuilder/components/StudioHome.js +18 -8
- package/lib/features/webbuilder/components/StudioHome.js.map +1 -1
- package/lib/features/webbuilder/previewRoutes.js +30 -1
- package/lib/features/webbuilder/previewRoutes.js.map +1 -1
- package/lib/features/webbuilder/studioCatalog.js +9 -2
- package/lib/features/webbuilder/studioCatalog.js.map +1 -1
- package/lib/features/webbuilder/web/chat/referenceMode.js +11 -0
- package/lib/features/webbuilder/web/chat/referenceMode.js.map +1 -0
- package/lib/features/webbuilder/web/chat/siteCopy.js +5 -2
- package/lib/features/webbuilder/web/chat/siteCopy.js.map +1 -1
- package/lib/features/webbuilder/web/chat/streamStall.js +6 -0
- package/lib/features/webbuilder/web/chat/streamStall.js.map +1 -0
- package/lib/features/webbuilder/web/code/savedCode.js +7 -0
- package/lib/features/webbuilder/web/code/savedCode.js.map +1 -0
- package/lib/features/webbuilder/web/design/directions.js.map +1 -1
- package/lib/features/webbuilder/web/history/versions.js.map +1 -1
- package/lib/features/webbuilder/web/import/websiteImport.js +27 -0
- package/lib/features/webbuilder/web/import/websiteImport.js.map +1 -0
- package/lib/features/webbuilder/web/preview/setupPhase.js +31 -0
- package/lib/features/webbuilder/web/preview/setupPhase.js.map +1 -0
- package/lib/features/webbuilder/web/publish/siteInsights.js +23 -1
- package/lib/features/webbuilder/web/publish/siteInsights.js.map +1 -1
- package/lib/features/webbuilder/web/upload/sitePhotos.js +102 -0
- package/lib/features/webbuilder/web/upload/sitePhotos.js.map +1 -0
- package/lib/routes.json +54 -0
- package/lib/screens/ComputerNative/index.js +124 -0
- package/lib/screens/ComputerNative/index.js.map +1 -0
- package/lib/screens/ComputerNative/useComputerHostChat.js +83 -0
- package/lib/screens/ComputerNative/useComputerHostChat.js.map +1 -0
- package/lib/screens/GamesNative/index.js +1 -1
- package/lib/screens/GamesNative/index.js.map +1 -1
- package/lib/screens/Home/components/homeCatalog.js +2 -1
- package/lib/screens/Home/components/homeCatalog.js.map +1 -1
- package/lib/screens/WebBuilder/nativeWebBuilderRedirect.js +6 -2
- package/lib/screens/WebBuilder/nativeWebBuilderRedirect.js.map +1 -1
- package/lib/screens/WebBuilderNative/index.js +15 -3
- package/lib/screens/WebBuilderNative/index.js.map +1 -1
- package/lib/screens/WebBuilderNative/useWebBuilderHost.js +18 -3
- package/lib/screens/WebBuilderNative/useWebBuilderHost.js.map +1 -1
- package/lib/screens/WebBuilderNative/webbuilderTransport.js +16 -7
- package/lib/screens/WebBuilderNative/webbuilderTransport.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
import {StyleSheet}from'react-native';var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
const makeComputerStyles = (C) => StyleSheet.create({
|
|
21
|
+
screen: {
|
|
22
|
+
flex: 1,
|
|
23
|
+
backgroundColor: C.screen
|
|
24
|
+
},
|
|
25
|
+
fill: {
|
|
26
|
+
flex: 1
|
|
27
|
+
},
|
|
28
|
+
row: {
|
|
29
|
+
flexDirection: "row",
|
|
30
|
+
alignItems: "center",
|
|
31
|
+
gap: 10
|
|
32
|
+
},
|
|
33
|
+
header: {
|
|
34
|
+
flexDirection: "row",
|
|
35
|
+
alignItems: "center",
|
|
36
|
+
gap: 8,
|
|
37
|
+
height: 52,
|
|
38
|
+
paddingLeft: 4,
|
|
39
|
+
paddingRight: 12,
|
|
40
|
+
borderBottomWidth: StyleSheet.hairlineWidth,
|
|
41
|
+
borderBottomColor: C.hairline
|
|
42
|
+
},
|
|
43
|
+
headerButton: {
|
|
44
|
+
width: 36,
|
|
45
|
+
height: 44,
|
|
46
|
+
alignItems: "center",
|
|
47
|
+
justifyContent: "center"
|
|
48
|
+
},
|
|
49
|
+
headerTitle: {
|
|
50
|
+
fontSize: 16,
|
|
51
|
+
fontWeight: "600",
|
|
52
|
+
letterSpacing: -0.2,
|
|
53
|
+
color: C.ink
|
|
54
|
+
},
|
|
55
|
+
headerSpacer: {
|
|
56
|
+
flex: 1
|
|
57
|
+
},
|
|
58
|
+
agentChip: {
|
|
59
|
+
flexDirection: "row",
|
|
60
|
+
alignItems: "center",
|
|
61
|
+
gap: 4,
|
|
62
|
+
height: 32,
|
|
63
|
+
paddingHorizontal: 12,
|
|
64
|
+
borderRadius: 16,
|
|
65
|
+
backgroundColor: C.accent
|
|
66
|
+
},
|
|
67
|
+
agentChipPressed: {
|
|
68
|
+
backgroundColor: C.accentPressed
|
|
69
|
+
},
|
|
70
|
+
agentChipText: {
|
|
71
|
+
fontSize: 14,
|
|
72
|
+
fontWeight: "700",
|
|
73
|
+
color: C.accentInk
|
|
74
|
+
},
|
|
75
|
+
badge: {
|
|
76
|
+
flexDirection: "row",
|
|
77
|
+
alignItems: "center",
|
|
78
|
+
gap: 6,
|
|
79
|
+
paddingHorizontal: 8,
|
|
80
|
+
paddingVertical: 3,
|
|
81
|
+
borderRadius: 999
|
|
82
|
+
},
|
|
83
|
+
badgeText: {
|
|
84
|
+
fontSize: 12,
|
|
85
|
+
fontWeight: "500"
|
|
86
|
+
},
|
|
87
|
+
dot: {
|
|
88
|
+
width: 6,
|
|
89
|
+
height: 6,
|
|
90
|
+
borderRadius: 3
|
|
91
|
+
},
|
|
92
|
+
segments: {
|
|
93
|
+
flexDirection: "row",
|
|
94
|
+
gap: 4,
|
|
95
|
+
marginHorizontal: 12,
|
|
96
|
+
marginTop: 8,
|
|
97
|
+
padding: 3,
|
|
98
|
+
borderRadius: 10,
|
|
99
|
+
backgroundColor: C.fill
|
|
100
|
+
},
|
|
101
|
+
segment: {
|
|
102
|
+
flex: 1,
|
|
103
|
+
flexDirection: "row",
|
|
104
|
+
alignItems: "center",
|
|
105
|
+
justifyContent: "center",
|
|
106
|
+
gap: 6,
|
|
107
|
+
height: 32,
|
|
108
|
+
borderRadius: 8
|
|
109
|
+
},
|
|
110
|
+
segmentOn: {
|
|
111
|
+
backgroundColor: C.fillStrong
|
|
112
|
+
},
|
|
113
|
+
segmentText: {
|
|
114
|
+
fontSize: 13,
|
|
115
|
+
fontWeight: "500",
|
|
116
|
+
color: C.muted
|
|
117
|
+
},
|
|
118
|
+
segmentTextOn: {
|
|
119
|
+
color: C.ink
|
|
120
|
+
},
|
|
121
|
+
chipsBar: {
|
|
122
|
+
flexGrow: 0
|
|
123
|
+
},
|
|
124
|
+
chips: {
|
|
125
|
+
gap: 6,
|
|
126
|
+
paddingHorizontal: 12,
|
|
127
|
+
paddingVertical: 8
|
|
128
|
+
},
|
|
129
|
+
chip: {
|
|
130
|
+
flexDirection: "row",
|
|
131
|
+
alignItems: "center",
|
|
132
|
+
height: 32,
|
|
133
|
+
borderRadius: 16,
|
|
134
|
+
paddingHorizontal: 4
|
|
135
|
+
},
|
|
136
|
+
chipOn: {
|
|
137
|
+
backgroundColor: C.fillStrong
|
|
138
|
+
},
|
|
139
|
+
chipNew: {
|
|
140
|
+
gap: 4,
|
|
141
|
+
paddingHorizontal: 10,
|
|
142
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
143
|
+
borderColor: C.border
|
|
144
|
+
},
|
|
145
|
+
chipMain: {
|
|
146
|
+
flexDirection: "row",
|
|
147
|
+
alignItems: "center",
|
|
148
|
+
gap: 6,
|
|
149
|
+
height: 32,
|
|
150
|
+
paddingHorizontal: 8,
|
|
151
|
+
maxWidth: 180
|
|
152
|
+
},
|
|
153
|
+
chipText: {
|
|
154
|
+
fontSize: 13,
|
|
155
|
+
fontWeight: "500",
|
|
156
|
+
color: C.muted
|
|
157
|
+
},
|
|
158
|
+
chipTextOn: {
|
|
159
|
+
color: C.ink
|
|
160
|
+
},
|
|
161
|
+
chipClose: {
|
|
162
|
+
width: 22,
|
|
163
|
+
height: 22,
|
|
164
|
+
alignItems: "center",
|
|
165
|
+
justifyContent: "center",
|
|
166
|
+
marginRight: 2
|
|
167
|
+
},
|
|
168
|
+
stage: {
|
|
169
|
+
flex: 1,
|
|
170
|
+
marginTop: 8,
|
|
171
|
+
overflow: "hidden",
|
|
172
|
+
borderTopWidth: StyleSheet.hairlineWidth,
|
|
173
|
+
borderBottomWidth: StyleSheet.hairlineWidth,
|
|
174
|
+
borderColor: C.hairline,
|
|
175
|
+
backgroundColor: C.page
|
|
176
|
+
},
|
|
177
|
+
handoffStage: {
|
|
178
|
+
marginTop: 12
|
|
179
|
+
},
|
|
180
|
+
controlRing: __spreadProps(__spreadValues({}, StyleSheet.absoluteFillObject), {
|
|
181
|
+
borderWidth: 2,
|
|
182
|
+
borderColor: C.accentRing,
|
|
183
|
+
zIndex: 10
|
|
184
|
+
}),
|
|
185
|
+
notice: {
|
|
186
|
+
position: "absolute",
|
|
187
|
+
top: 10,
|
|
188
|
+
left: 16,
|
|
189
|
+
right: 16,
|
|
190
|
+
paddingHorizontal: 12,
|
|
191
|
+
paddingVertical: 8,
|
|
192
|
+
borderRadius: 10,
|
|
193
|
+
backgroundColor: C.menu,
|
|
194
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
195
|
+
borderColor: C.hairline,
|
|
196
|
+
zIndex: 20
|
|
197
|
+
},
|
|
198
|
+
noticeText: {
|
|
199
|
+
fontSize: 12,
|
|
200
|
+
color: C.soft
|
|
201
|
+
},
|
|
202
|
+
footer: {
|
|
203
|
+
paddingHorizontal: 16,
|
|
204
|
+
paddingTop: 12,
|
|
205
|
+
gap: 12
|
|
206
|
+
},
|
|
207
|
+
footerRow: {
|
|
208
|
+
flexDirection: "row",
|
|
209
|
+
alignItems: "center",
|
|
210
|
+
gap: 8,
|
|
211
|
+
minHeight: 34
|
|
212
|
+
},
|
|
213
|
+
footerText: {
|
|
214
|
+
flex: 1,
|
|
215
|
+
minWidth: 0,
|
|
216
|
+
fontSize: 13,
|
|
217
|
+
color: C.dim
|
|
218
|
+
},
|
|
219
|
+
footerNote: {
|
|
220
|
+
fontSize: 13,
|
|
221
|
+
lineHeight: 18
|
|
222
|
+
},
|
|
223
|
+
pair: {
|
|
224
|
+
flexDirection: "row",
|
|
225
|
+
gap: 12
|
|
226
|
+
},
|
|
227
|
+
smallButton: {
|
|
228
|
+
flexDirection: "row",
|
|
229
|
+
alignItems: "center",
|
|
230
|
+
gap: 6,
|
|
231
|
+
height: 34,
|
|
232
|
+
paddingHorizontal: 10,
|
|
233
|
+
borderRadius: 8,
|
|
234
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
235
|
+
borderColor: C.hairline,
|
|
236
|
+
backgroundColor: C.fillSoft
|
|
237
|
+
},
|
|
238
|
+
smallButtonPressed: {
|
|
239
|
+
backgroundColor: C.fillStrong
|
|
240
|
+
},
|
|
241
|
+
smallButtonText: {
|
|
242
|
+
fontSize: 13,
|
|
243
|
+
fontWeight: "500",
|
|
244
|
+
color: C.inkSoft
|
|
245
|
+
},
|
|
246
|
+
zoom: {
|
|
247
|
+
flexDirection: "row",
|
|
248
|
+
alignItems: "center",
|
|
249
|
+
borderRadius: 8,
|
|
250
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
251
|
+
borderColor: C.hairline,
|
|
252
|
+
backgroundColor: C.fillSoft
|
|
253
|
+
},
|
|
254
|
+
zoomButton: {
|
|
255
|
+
width: 38,
|
|
256
|
+
height: 34,
|
|
257
|
+
alignItems: "center",
|
|
258
|
+
justifyContent: "center"
|
|
259
|
+
},
|
|
260
|
+
zoomLabel: {
|
|
261
|
+
width: 40,
|
|
262
|
+
textAlign: "center",
|
|
263
|
+
fontSize: 12,
|
|
264
|
+
fontWeight: "500",
|
|
265
|
+
color: C.soft
|
|
266
|
+
},
|
|
267
|
+
bigButton: {
|
|
268
|
+
flexDirection: "row",
|
|
269
|
+
alignItems: "center",
|
|
270
|
+
justifyContent: "center",
|
|
271
|
+
gap: 8,
|
|
272
|
+
height: 48,
|
|
273
|
+
borderRadius: 12,
|
|
274
|
+
paddingHorizontal: 16
|
|
275
|
+
},
|
|
276
|
+
bigPrimary: {
|
|
277
|
+
backgroundColor: C.accent
|
|
278
|
+
},
|
|
279
|
+
bigPrimaryPressed: {
|
|
280
|
+
backgroundColor: C.accentPressed
|
|
281
|
+
},
|
|
282
|
+
bigSecondary: {
|
|
283
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
284
|
+
borderColor: C.border,
|
|
285
|
+
backgroundColor: C.fill
|
|
286
|
+
},
|
|
287
|
+
bigSecondaryPressed: {
|
|
288
|
+
backgroundColor: C.fillStrong
|
|
289
|
+
},
|
|
290
|
+
bigDisabled: {
|
|
291
|
+
backgroundColor: C.accentDisabled
|
|
292
|
+
},
|
|
293
|
+
bigText: {
|
|
294
|
+
fontSize: 16,
|
|
295
|
+
fontWeight: "600"
|
|
296
|
+
},
|
|
297
|
+
banner: {
|
|
298
|
+
flexDirection: "row",
|
|
299
|
+
alignItems: "flex-start",
|
|
300
|
+
gap: 12,
|
|
301
|
+
marginHorizontal: 16,
|
|
302
|
+
marginTop: 12,
|
|
303
|
+
paddingHorizontal: 14,
|
|
304
|
+
paddingVertical: 12,
|
|
305
|
+
borderRadius: 12,
|
|
306
|
+
borderWidth: StyleSheet.hairlineWidth
|
|
307
|
+
},
|
|
308
|
+
bannerIcon: {
|
|
309
|
+
marginTop: 1
|
|
310
|
+
},
|
|
311
|
+
bannerTitle: {
|
|
312
|
+
fontSize: 15,
|
|
313
|
+
fontWeight: "600",
|
|
314
|
+
lineHeight: 20,
|
|
315
|
+
color: C.ink
|
|
316
|
+
},
|
|
317
|
+
bannerBody: {
|
|
318
|
+
marginTop: 2,
|
|
319
|
+
fontSize: 13,
|
|
320
|
+
lineHeight: 18,
|
|
321
|
+
color: C.muted
|
|
322
|
+
},
|
|
323
|
+
splash: {
|
|
324
|
+
flex: 1,
|
|
325
|
+
alignItems: "center",
|
|
326
|
+
justifyContent: "center",
|
|
327
|
+
paddingHorizontal: 32
|
|
328
|
+
},
|
|
329
|
+
splashCard: {
|
|
330
|
+
width: "100%",
|
|
331
|
+
maxWidth: 360,
|
|
332
|
+
alignItems: "center"
|
|
333
|
+
},
|
|
334
|
+
splashIcon: {
|
|
335
|
+
width: 56,
|
|
336
|
+
height: 56,
|
|
337
|
+
borderRadius: 16,
|
|
338
|
+
alignItems: "center",
|
|
339
|
+
justifyContent: "center",
|
|
340
|
+
marginBottom: 16,
|
|
341
|
+
backgroundColor: C.accentSoft
|
|
342
|
+
},
|
|
343
|
+
splashTitle: {
|
|
344
|
+
fontSize: 17,
|
|
345
|
+
fontWeight: "600",
|
|
346
|
+
color: C.ink,
|
|
347
|
+
textAlign: "center"
|
|
348
|
+
},
|
|
349
|
+
splashBody: {
|
|
350
|
+
marginTop: 6,
|
|
351
|
+
fontSize: 14,
|
|
352
|
+
lineHeight: 20,
|
|
353
|
+
color: C.dim,
|
|
354
|
+
textAlign: "center"
|
|
355
|
+
},
|
|
356
|
+
splashMuted: {
|
|
357
|
+
flexShrink: 1,
|
|
358
|
+
fontSize: 14,
|
|
359
|
+
lineHeight: 20,
|
|
360
|
+
color: C.dim,
|
|
361
|
+
textAlign: "center"
|
|
362
|
+
},
|
|
363
|
+
splashAction: {
|
|
364
|
+
alignSelf: "stretch",
|
|
365
|
+
marginTop: 20
|
|
366
|
+
},
|
|
367
|
+
splashProblem: {
|
|
368
|
+
marginTop: 12,
|
|
369
|
+
fontSize: 12,
|
|
370
|
+
color: C.faint,
|
|
371
|
+
textAlign: "center"
|
|
372
|
+
},
|
|
373
|
+
waiting: {
|
|
374
|
+
flex: 1,
|
|
375
|
+
alignItems: "center",
|
|
376
|
+
justifyContent: "center",
|
|
377
|
+
gap: 10,
|
|
378
|
+
paddingHorizontal: 32
|
|
379
|
+
},
|
|
380
|
+
agentLive: {
|
|
381
|
+
height: 170,
|
|
382
|
+
backgroundColor: C.page
|
|
383
|
+
}
|
|
384
|
+
});export{makeComputerStyles};//# sourceMappingURL=computerStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computerStyles.js","sources":["../../../src/features/computer/computerStyles.ts"],"sourcesContent":["/** The Computer screen's styles, shared by its desktop, its handoff and their controls. */\nimport { StyleSheet } from 'react-native';\n\nimport type { ComputerColors } from './computerTheme';\n\nexport const makeComputerStyles = (C: ComputerColors) =>\n StyleSheet.create({\n screen: { flex: 1, backgroundColor: C.screen },\n fill: { flex: 1 },\n row: { flexDirection: 'row', alignItems: 'center', gap: 10 },\n header: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n height: 52,\n paddingLeft: 4,\n paddingRight: 12,\n borderBottomWidth: StyleSheet.hairlineWidth,\n borderBottomColor: C.hairline,\n },\n headerButton: { width: 36, height: 44, alignItems: 'center', justifyContent: 'center' },\n headerTitle: { fontSize: 16, fontWeight: '600', letterSpacing: -0.2, color: C.ink },\n headerSpacer: { flex: 1 },\n agentChip: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n height: 32,\n paddingHorizontal: 12,\n borderRadius: 16,\n backgroundColor: C.accent,\n },\n agentChipPressed: { backgroundColor: C.accentPressed },\n agentChipText: { fontSize: 14, fontWeight: '700', color: C.accentInk },\n badge: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 6,\n paddingHorizontal: 8,\n paddingVertical: 3,\n borderRadius: 999,\n },\n badgeText: { fontSize: 12, fontWeight: '500' },\n dot: { width: 6, height: 6, borderRadius: 3 },\n segments: {\n flexDirection: 'row',\n gap: 4,\n marginHorizontal: 12,\n marginTop: 8,\n padding: 3,\n borderRadius: 10,\n backgroundColor: C.fill,\n },\n segment: {\n flex: 1,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 6,\n height: 32,\n borderRadius: 8,\n },\n segmentOn: { backgroundColor: C.fillStrong },\n segmentText: { fontSize: 13, fontWeight: '500', color: C.muted },\n segmentTextOn: { color: C.ink },\n chipsBar: { flexGrow: 0 },\n chips: { gap: 6, paddingHorizontal: 12, paddingVertical: 8 },\n chip: { flexDirection: 'row', alignItems: 'center', height: 32, borderRadius: 16, paddingHorizontal: 4 },\n chipOn: { backgroundColor: C.fillStrong },\n chipNew: { gap: 4, paddingHorizontal: 10, borderWidth: StyleSheet.hairlineWidth, borderColor: C.border },\n chipMain: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 6,\n height: 32,\n paddingHorizontal: 8,\n maxWidth: 180,\n },\n chipText: { fontSize: 13, fontWeight: '500', color: C.muted },\n chipTextOn: { color: C.ink },\n chipClose: { width: 22, height: 22, alignItems: 'center', justifyContent: 'center', marginRight: 2 },\n stage: {\n flex: 1,\n marginTop: 8,\n overflow: 'hidden',\n borderTopWidth: StyleSheet.hairlineWidth,\n borderBottomWidth: StyleSheet.hairlineWidth,\n borderColor: C.hairline,\n backgroundColor: C.page,\n },\n handoffStage: { marginTop: 12 },\n controlRing: { ...StyleSheet.absoluteFillObject, borderWidth: 2, borderColor: C.accentRing, zIndex: 10 },\n notice: {\n position: 'absolute',\n top: 10,\n left: 16,\n right: 16,\n paddingHorizontal: 12,\n paddingVertical: 8,\n borderRadius: 10,\n backgroundColor: C.menu,\n borderWidth: StyleSheet.hairlineWidth,\n borderColor: C.hairline,\n zIndex: 20,\n },\n noticeText: { fontSize: 12, color: C.soft },\n footer: { paddingHorizontal: 16, paddingTop: 12, gap: 12 },\n footerRow: { flexDirection: 'row', alignItems: 'center', gap: 8, minHeight: 34 },\n footerText: { flex: 1, minWidth: 0, fontSize: 13, color: C.dim },\n footerNote: { fontSize: 13, lineHeight: 18 },\n pair: { flexDirection: 'row', gap: 12 },\n smallButton: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 6,\n height: 34,\n paddingHorizontal: 10,\n borderRadius: 8,\n borderWidth: StyleSheet.hairlineWidth,\n borderColor: C.hairline,\n backgroundColor: C.fillSoft,\n },\n smallButtonPressed: { backgroundColor: C.fillStrong },\n smallButtonText: { fontSize: 13, fontWeight: '500', color: C.inkSoft },\n zoom: {\n flexDirection: 'row',\n alignItems: 'center',\n borderRadius: 8,\n borderWidth: StyleSheet.hairlineWidth,\n borderColor: C.hairline,\n backgroundColor: C.fillSoft,\n },\n zoomButton: { width: 38, height: 34, alignItems: 'center', justifyContent: 'center' },\n zoomLabel: { width: 40, textAlign: 'center', fontSize: 12, fontWeight: '500', color: C.soft },\n bigButton: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 8,\n height: 48,\n borderRadius: 12,\n paddingHorizontal: 16,\n },\n bigPrimary: { backgroundColor: C.accent },\n bigPrimaryPressed: { backgroundColor: C.accentPressed },\n bigSecondary: { borderWidth: StyleSheet.hairlineWidth, borderColor: C.border, backgroundColor: C.fill },\n bigSecondaryPressed: { backgroundColor: C.fillStrong },\n bigDisabled: { backgroundColor: C.accentDisabled },\n bigText: { fontSize: 16, fontWeight: '600' },\n banner: {\n flexDirection: 'row',\n alignItems: 'flex-start',\n gap: 12,\n marginHorizontal: 16,\n marginTop: 12,\n paddingHorizontal: 14,\n paddingVertical: 12,\n borderRadius: 12,\n borderWidth: StyleSheet.hairlineWidth,\n },\n bannerIcon: { marginTop: 1 },\n bannerTitle: { fontSize: 15, fontWeight: '600', lineHeight: 20, color: C.ink },\n bannerBody: { marginTop: 2, fontSize: 13, lineHeight: 18, color: C.muted },\n splash: { flex: 1, alignItems: 'center', justifyContent: 'center', paddingHorizontal: 32 },\n splashCard: { width: '100%', maxWidth: 360, alignItems: 'center' },\n splashIcon: {\n width: 56,\n height: 56,\n borderRadius: 16,\n alignItems: 'center',\n justifyContent: 'center',\n marginBottom: 16,\n backgroundColor: C.accentSoft,\n },\n splashTitle: { fontSize: 17, fontWeight: '600', color: C.ink, textAlign: 'center' },\n splashBody: { marginTop: 6, fontSize: 14, lineHeight: 20, color: C.dim, textAlign: 'center' },\n splashMuted: { flexShrink: 1, fontSize: 14, lineHeight: 20, color: C.dim, textAlign: 'center' },\n splashAction: { alignSelf: 'stretch', marginTop: 20 },\n splashProblem: { marginTop: 12, fontSize: 12, color: C.faint, textAlign: 'center' },\n waiting: { flex: 1, alignItems: 'center', justifyContent: 'center', gap: 10, paddingHorizontal: 32 },\n agentLive: { height: 170, backgroundColor: C.page },\n });\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAGO,MAAM,kBAAqB,GAAA,CAAC,CAAsB,KAAA,UAAA,CAAW,MAAO,CAAA;AAAA,EACzE,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,CAAA;AAAA,IACN,iBAAiB,CAAE,CAAA;AAAA,GACrB;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA;AAAA,GACR;AAAA,EACA,GAAK,EAAA;AAAA,IACH,aAAe,EAAA,KAAA;AAAA,IACf,UAAY,EAAA,QAAA;AAAA,IACZ,GAAK,EAAA;AAAA,GACP;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,aAAe,EAAA,KAAA;AAAA,IACf,UAAY,EAAA,QAAA;AAAA,IACZ,GAAK,EAAA,CAAA;AAAA,IACL,MAAQ,EAAA,EAAA;AAAA,IACR,WAAa,EAAA,CAAA;AAAA,IACb,YAAc,EAAA,EAAA;AAAA,IACd,mBAAmB,UAAW,CAAA,aAAA;AAAA,IAC9B,mBAAmB,CAAE,CAAA;AAAA,GACvB;AAAA,EACA,YAAc,EAAA;AAAA,IACZ,KAAO,EAAA,EAAA;AAAA,IACP,MAAQ,EAAA,EAAA;AAAA,IACR,UAAY,EAAA,QAAA;AAAA,IACZ,cAAgB,EAAA;AAAA,GAClB;AAAA,EACA,WAAa,EAAA;AAAA,IACX,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA,KAAA;AAAA,IACZ,aAAe,EAAA,IAAA;AAAA,IACf,OAAO,CAA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U,EAAA,EAAA;AAAA,IACV,UAAY,EAAA,KAAA;AAAA,IACZ,OAAO,CAAE,CAAA,GAAA;AAAA,IACT,SAAW,EAAA;AAAA,GACb;AAAA,EACA,UAAY,EAAA;AAAA,IACV,SAAW,EAAA,CAAA;AAAA,IACX,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA,EAAA;AAAA,IACZ,OAAO,CAAE,CAAA,GAAA;AAAA,IACT,SAAW,EAAA;AAAA,GACb;AAAA,EACA,WAAa,EAAA;AAAA,IACX,UAAY,EAAA,CAAA;AAAA,IACZ,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA,EAAA;AAAA,IACZ,OAAO,CAAE,CAAA,GAAA;AAAA,IACT,SAAW,EAAA;AAAA,GACb;AAAA,EACA,YAAc,EAAA;AAAA,IACZ,SAAW,EAAA,SAAA;AAAA,IACX,SAAW,EAAA;AAAA,GACb;AAAA,EACA,aAAe,EAAA;AAAA,IACb,SAAW,EAAA,EAAA;AAAA,IACX,QAAU,EAAA,EAAA;AAAA,IACV,OAAO,CAAE,CAAA,KAAA;AAAA,IACT,SAAW,EAAA;AAAA,GACb;AAAA,EACA,OAAS,EAAA;AAAA,IACP,IAAM,EAAA,CAAA;AAAA,IACN,UAAY,EAAA,QAAA;AAAA,IACZ,cAAgB,EAAA,QAAA;AAAA,IAChB,GAAK,EAAA,EAAA;AAAA,IACL,iBAAmB,EAAA;AAAA,GACrB;AAAA,EACA,SAAW,EAAA;AAAA,IACT,MAAQ,EAAA,GAAA;AAAA,IACR,iBAAiB,CAAE,CAAA;AAAA;AAEvB,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import {createContext,useContext}from'react';import {Platform}from'react-native';var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
const ACCENT = {
|
|
21
|
+
accent: "#f0813c",
|
|
22
|
+
accentInk: "#15130f",
|
|
23
|
+
accentPressed: "#e2742f",
|
|
24
|
+
accentDisabled: "rgba(240,129,60,0.55)",
|
|
25
|
+
accentRing: "rgba(240,129,60,0.85)",
|
|
26
|
+
accentIcon: "rgba(240,129,60,0.75)"
|
|
27
|
+
};
|
|
28
|
+
const DARK_COMPUTER_COLORS = __spreadProps(__spreadValues({}, ACCENT), {
|
|
29
|
+
isDark: true,
|
|
30
|
+
screen: "#171410",
|
|
31
|
+
raised: "#1c1a16",
|
|
32
|
+
page: "#0f0e0c",
|
|
33
|
+
menu: "rgba(36,32,27,0.95)",
|
|
34
|
+
hairline: "rgba(255,255,255,0.08)",
|
|
35
|
+
border: "rgba(255,255,255,0.15)",
|
|
36
|
+
fill: "rgba(255,255,255,0.04)",
|
|
37
|
+
fillSoft: "rgba(255,255,255,0.03)",
|
|
38
|
+
fillStrong: "rgba(255,255,255,0.10)",
|
|
39
|
+
well: "rgba(0,0,0,0.3)",
|
|
40
|
+
ink: "rgba(255,255,255,0.90)",
|
|
41
|
+
inkSoft: "rgba(255,255,255,0.80)",
|
|
42
|
+
soft: "rgba(255,255,255,0.72)",
|
|
43
|
+
muted: "rgba(255,255,255,0.55)",
|
|
44
|
+
dim: "rgba(255,255,255,0.5)",
|
|
45
|
+
faint: "rgba(255,255,255,0.35)",
|
|
46
|
+
ghost: "rgba(255,255,255,0.28)",
|
|
47
|
+
disabled: "rgba(255,255,255,0.2)",
|
|
48
|
+
accentSoft: "rgba(240,129,60,0.10)",
|
|
49
|
+
accentBorder: "rgba(240,129,60,0.30)",
|
|
50
|
+
hint: "#f3b27e",
|
|
51
|
+
danger: "#e4836b",
|
|
52
|
+
ok: "#5cbc90",
|
|
53
|
+
live: "#34d399",
|
|
54
|
+
liveSoft: "rgba(52,211,153,0.10)",
|
|
55
|
+
liveInk: "#6ee7b7",
|
|
56
|
+
waiting: "#fbbf24",
|
|
57
|
+
doneBorder: "rgba(52,211,153,0.25)",
|
|
58
|
+
doneSoft: "rgba(52,211,153,0.07)",
|
|
59
|
+
overlay: "rgba(20,20,22,0.90)"
|
|
60
|
+
});
|
|
61
|
+
const LIGHT_COMPUTER_COLORS = __spreadProps(__spreadValues({}, ACCENT), {
|
|
62
|
+
isDark: false,
|
|
63
|
+
screen: "#ffffff",
|
|
64
|
+
raised: "#f7f6f3",
|
|
65
|
+
page: "#efede9",
|
|
66
|
+
menu: "rgba(255,255,255,0.97)",
|
|
67
|
+
hairline: "rgba(28,25,23,0.10)",
|
|
68
|
+
border: "rgba(28,25,23,0.16)",
|
|
69
|
+
fill: "rgba(28,25,23,0.04)",
|
|
70
|
+
fillSoft: "rgba(28,25,23,0.03)",
|
|
71
|
+
fillStrong: "rgba(28,25,23,0.08)",
|
|
72
|
+
well: "#ffffff",
|
|
73
|
+
ink: "#1c1917",
|
|
74
|
+
inkSoft: "rgba(28,25,23,0.85)",
|
|
75
|
+
soft: "rgba(28,25,23,0.75)",
|
|
76
|
+
muted: "rgba(28,25,23,0.58)",
|
|
77
|
+
dim: "rgba(28,25,23,0.52)",
|
|
78
|
+
faint: "rgba(28,25,23,0.42)",
|
|
79
|
+
ghost: "rgba(28,25,23,0.32)",
|
|
80
|
+
disabled: "rgba(28,25,23,0.22)",
|
|
81
|
+
accentSoft: "rgba(240,129,60,0.10)",
|
|
82
|
+
accentBorder: "rgba(234,108,31,0.35)",
|
|
83
|
+
hint: "#b45309",
|
|
84
|
+
danger: "#c2410c",
|
|
85
|
+
ok: "#15803d",
|
|
86
|
+
live: "#16a34a",
|
|
87
|
+
liveSoft: "rgba(22,163,74,0.10)",
|
|
88
|
+
liveInk: "#15803d",
|
|
89
|
+
waiting: "#d97706",
|
|
90
|
+
doneBorder: "rgba(22,163,74,0.30)",
|
|
91
|
+
doneSoft: "rgba(22,163,74,0.07)",
|
|
92
|
+
overlay: "rgba(255,255,255,0.95)"
|
|
93
|
+
});
|
|
94
|
+
function computerColorsFor(isDark) {
|
|
95
|
+
return isDark ? DARK_COMPUTER_COLORS : LIGHT_COMPUTER_COLORS;
|
|
96
|
+
}
|
|
97
|
+
const ComputerThemeContext = createContext(DARK_COMPUTER_COLORS);
|
|
98
|
+
const ComputerThemeProvider = ComputerThemeContext.Provider;
|
|
99
|
+
function useComputerColors() {
|
|
100
|
+
return useContext(ComputerThemeContext);
|
|
101
|
+
}
|
|
102
|
+
const built = /* @__PURE__ */ new WeakMap();
|
|
103
|
+
function useThemedStyles(make) {
|
|
104
|
+
const colors = useComputerColors();
|
|
105
|
+
let byPalette = built.get(make);
|
|
106
|
+
if (!byPalette) {
|
|
107
|
+
byPalette = /* @__PURE__ */ new WeakMap();
|
|
108
|
+
built.set(make, byPalette);
|
|
109
|
+
}
|
|
110
|
+
if (!byPalette.has(colors)) byPalette.set(colors, make(colors));
|
|
111
|
+
return byPalette.get(colors);
|
|
112
|
+
}
|
|
113
|
+
function computerChatPalette(colors) {
|
|
114
|
+
return colors.isDark ? {
|
|
115
|
+
isDark: true,
|
|
116
|
+
ink: "#f2ede6",
|
|
117
|
+
muted: "rgba(242,237,230,0.55)",
|
|
118
|
+
screen: "#15130f",
|
|
119
|
+
border: "rgba(255,255,255,0.10)",
|
|
120
|
+
card: "#24201b"
|
|
121
|
+
} : {
|
|
122
|
+
isDark: false,
|
|
123
|
+
ink: colors.ink,
|
|
124
|
+
muted: colors.muted,
|
|
125
|
+
screen: colors.screen,
|
|
126
|
+
border: colors.hairline,
|
|
127
|
+
card: colors.raised
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
const MONO_FONT = Platform.select({
|
|
131
|
+
ios: "Menlo",
|
|
132
|
+
default: "monospace"
|
|
133
|
+
});export{ComputerThemeContext,ComputerThemeProvider,DARK_COMPUTER_COLORS,LIGHT_COMPUTER_COLORS,MONO_FONT,computerChatPalette,computerColorsFor,useComputerColors,useThemedStyles};//# sourceMappingURL=computerTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computerTheme.js","sources":["../../../src/features/computer/computerTheme.ts"],"sourcesContent":["/**\n * The Computer's colours, in the app's light or dark appearance.\n *\n * The web surface is always dark (a warm dusk wallpaper). On the phone the\n * Computer follows the app's theme like every other native screen; dark keeps\n * the web's dusk, light is its daylight twin with the same orange accent. The\n * live page itself is a picture of a browser and keeps its own colours.\n *\n * The screen provides the appearance (ComputerThemeProvider); a component reads\n * its palette with useComputerColors() and its styles with useThemedStyles().\n */\nimport { createContext, useContext } from 'react';\nimport { Platform } from 'react-native';\n\nexport interface ComputerColors {\n isDark: boolean;\n screen: string;\n raised: string;\n /** Behind the live page, and the terminal's and the files' ground. */\n page: string;\n /** A floating panel: a notice, a menu. */\n menu: string;\n hairline: string;\n border: string;\n fill: string;\n fillSoft: string;\n fillStrong: string;\n /** The address field's well. */\n well: string;\n ink: string;\n inkSoft: string;\n soft: string;\n muted: string;\n dim: string;\n faint: string;\n ghost: string;\n disabled: string;\n accent: string;\n accentInk: string;\n accentPressed: string;\n accentDisabled: string;\n accentSoft: string;\n accentBorder: string;\n accentRing: string;\n accentIcon: string;\n hint: string;\n danger: string;\n ok: string;\n live: string;\n liveSoft: string;\n liveInk: string;\n waiting: string;\n doneBorder: string;\n doneSoft: string;\n /** The pill over the page (\"Two fingers to look around\"). */\n overlay: string;\n}\n\nconst ACCENT = {\n accent: '#f0813c',\n accentInk: '#15130f',\n accentPressed: '#e2742f',\n accentDisabled: 'rgba(240,129,60,0.55)',\n accentRing: 'rgba(240,129,60,0.85)',\n accentIcon: 'rgba(240,129,60,0.75)',\n} as const;\n\n/** The web surface's dusk. */\nexport const DARK_COMPUTER_COLORS: ComputerColors = {\n ...ACCENT,\n isDark: true,\n screen: '#171410',\n raised: '#1c1a16',\n page: '#0f0e0c',\n menu: 'rgba(36,32,27,0.95)',\n hairline: 'rgba(255,255,255,0.08)',\n border: 'rgba(255,255,255,0.15)',\n fill: 'rgba(255,255,255,0.04)',\n fillSoft: 'rgba(255,255,255,0.03)',\n fillStrong: 'rgba(255,255,255,0.10)',\n well: 'rgba(0,0,0,0.3)',\n ink: 'rgba(255,255,255,0.90)',\n inkSoft: 'rgba(255,255,255,0.80)',\n soft: 'rgba(255,255,255,0.72)',\n muted: 'rgba(255,255,255,0.55)',\n dim: 'rgba(255,255,255,0.5)',\n faint: 'rgba(255,255,255,0.35)',\n ghost: 'rgba(255,255,255,0.28)',\n disabled: 'rgba(255,255,255,0.2)',\n accentSoft: 'rgba(240,129,60,0.10)',\n accentBorder: 'rgba(240,129,60,0.30)',\n hint: '#f3b27e',\n danger: '#e4836b',\n ok: '#5cbc90',\n live: '#34d399',\n liveSoft: 'rgba(52,211,153,0.10)',\n liveInk: '#6ee7b7',\n waiting: '#fbbf24',\n doneBorder: 'rgba(52,211,153,0.25)',\n doneSoft: 'rgba(52,211,153,0.07)',\n overlay: 'rgba(20,20,22,0.90)',\n};\n\n/** The same machine in daylight: warm paper, ink, the same accent. */\nexport const LIGHT_COMPUTER_COLORS: ComputerColors = {\n ...ACCENT,\n isDark: false,\n screen: '#ffffff',\n raised: '#f7f6f3',\n page: '#efede9',\n menu: 'rgba(255,255,255,0.97)',\n hairline: 'rgba(28,25,23,0.10)',\n border: 'rgba(28,25,23,0.16)',\n fill: 'rgba(28,25,23,0.04)',\n fillSoft: 'rgba(28,25,23,0.03)',\n fillStrong: 'rgba(28,25,23,0.08)',\n well: '#ffffff',\n ink: '#1c1917',\n inkSoft: 'rgba(28,25,23,0.85)',\n soft: 'rgba(28,25,23,0.75)',\n muted: 'rgba(28,25,23,0.58)',\n dim: 'rgba(28,25,23,0.52)',\n faint: 'rgba(28,25,23,0.42)',\n ghost: 'rgba(28,25,23,0.32)',\n disabled: 'rgba(28,25,23,0.22)',\n accentSoft: 'rgba(240,129,60,0.10)',\n accentBorder: 'rgba(234,108,31,0.35)',\n hint: '#b45309',\n danger: '#c2410c',\n ok: '#15803d',\n live: '#16a34a',\n liveSoft: 'rgba(22,163,74,0.10)',\n liveInk: '#15803d',\n waiting: '#d97706',\n doneBorder: 'rgba(22,163,74,0.30)',\n doneSoft: 'rgba(22,163,74,0.07)',\n overlay: 'rgba(255,255,255,0.95)',\n};\n\nexport function computerColorsFor(isDark: boolean): ComputerColors {\n return isDark ? DARK_COMPUTER_COLORS : LIGHT_COMPUTER_COLORS;\n}\n\n/** The appearance the Computer is drawn in; the screen sets it from the app's theme. */\nexport const ComputerThemeContext = createContext<ComputerColors>(DARK_COMPUTER_COLORS);\nexport const ComputerThemeProvider = ComputerThemeContext.Provider;\n\nexport function useComputerColors(): ComputerColors {\n return useContext(ComputerThemeContext);\n}\n\n/** Styles built once per palette and kept, so a re-render never rebuilds a stylesheet. */\nconst built = new WeakMap<object, WeakMap<ComputerColors, unknown>>();\n\nexport function useThemedStyles<T>(make: (colors: ComputerColors) => T): T {\n const colors = useComputerColors();\n let byPalette = built.get(make);\n if (!byPalette) {\n byPalette = new WeakMap();\n built.set(make, byPalette);\n }\n if (!byPalette.has(colors)) byPalette.set(colors, make(colors));\n return byPalette.get(colors) as T;\n}\n\n/** The NativeAgentChat palette that sits on the Computer. */\nexport function computerChatPalette(colors: ComputerColors) {\n return colors.isDark\n ? {\n isDark: true,\n ink: '#f2ede6',\n muted: 'rgba(242,237,230,0.55)',\n screen: '#15130f',\n border: 'rgba(255,255,255,0.10)',\n card: '#24201b',\n }\n : {\n isDark: false,\n ink: colors.ink,\n muted: colors.muted,\n screen: colors.screen,\n border: colors.hairline,\n card: colors.raised,\n };\n}\n\n/** The monospace face per platform (a terminal, a path, an address). */\nexport const MONO_FONT = Platform.select({ ios: 'Menlo', default: 'monospace' });\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAwDA,MAAM,MAAS,GAAA;AAAA,EACb,MAAQ,EAAA,SAAA;AAAA,EACR,SAAW,EAAA,SAAA;AAAA,EACX,aAAe,EAAA,SAAA;AAAA,EACf,cAAgB,EAAA,uBAAA;AAAA,EAChB,UAAY,EAAA,uBAAA;AAAA,EACZ,UAAY,EAAA;AACd,CAAA;AAGa,MAAA,oBAAA,GAAuC,iCAC/C,MAD+C,CAAA,EAAA;AAAA,EAElD,MAAQ,EAAA,IAAA;AAAA,EACR,MAAQ,EAAA,SAAA;AAAA,EACR,MAAQ,EAAA,SAAA;AAAA,EACR,IAAM,EAAA,SAAA;AAAA,EACN,IAAM,EAAA,qBAAA;AAAA,EACN,QAAU,EAAA,wBAAA;AAAA,EACV,MAAQ,EAAA,wBAAA;AAAA,EACR,IAAM,EAAA,wBAAA;AAAA,EACN,QAAU,EAAA,wBAAA;AAAA,EACV,UAAY,EAAA,wBAAA;AAAA,EACZ,IAAM,EAAA,iBAAA;AAAA,EACN,GAAK,EAAA,wBAAA;AAAA,EACL,OAAS,EAAA,wBAAA;AAAA,EACT,IAAM,EAAA,wBAAA;AAAA,EACN,KAAO,EAAA,wBAAA;AAAA,EACP,GAAK,EAAA,uBAAA;AAAA,EACL,KAAO,EAAA,wBAAA;AAAA,EACP,KAAO,EAAA,wBAAA;AAAA,EACP,QAAU,EAAA,uBAAA;AAAA,EACV,UAAY,EAAA,uBAAA;AAAA,EACZ,YAAc,E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AAA,IACf,MAAM,MAAO,CAAA;AAAA,GACf;AACF;AAGa,MAAA,SAAA,GAAY,SAAS,MAAO,CAAA;AAAA,EACvC,GAAK,EAAA,OAAA;AAAA,EACL,OAAS,EAAA;AACX,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
const DEFAULT_HANDOFF_REASON = "Finish the check on the page, then tap Done.";
|
|
21
|
+
const MAX_REASON = 160;
|
|
22
|
+
const CHAT_ID_RE = /^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$/;
|
|
23
|
+
function text(value) {
|
|
24
|
+
return typeof value === "string" ? value : "";
|
|
25
|
+
}
|
|
26
|
+
function readHandoff(params) {
|
|
27
|
+
const reason = text(params == null ? void 0 : params.reason).replace(/[\u0000-\u001f\u007f]+/g, " ").replace(/\s+/g, " ").trim().slice(0, MAX_REASON).trim();
|
|
28
|
+
const chat = text(params == null ? void 0 : params.chat).trim();
|
|
29
|
+
return {
|
|
30
|
+
active: text(params == null ? void 0 : params.mode) === "handoff",
|
|
31
|
+
reason: reason || DEFAULT_HANDOFF_REASON,
|
|
32
|
+
chat: CHAT_ID_RE.test(chat) ? chat : null,
|
|
33
|
+
key: `${text(params == null ? void 0 : params.at)}|${reason}`
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function queryValue(query, name) {
|
|
37
|
+
const part = query.split("&").find((row) => row === name || row.startsWith(`${name}=`));
|
|
38
|
+
if (part === void 0) return "";
|
|
39
|
+
const raw = part.slice(name.length + 1).replace(/\+/g, " ");
|
|
40
|
+
try {
|
|
41
|
+
return decodeURIComponent(raw);
|
|
42
|
+
} catch (e) {
|
|
43
|
+
return raw;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function computerParamsFromUrl(url) {
|
|
47
|
+
const source = (url != null ? url : "").split("#")[0];
|
|
48
|
+
const queryAt = source.indexOf("?");
|
|
49
|
+
if (queryAt < 0) return {};
|
|
50
|
+
const query = source.slice(queryAt + 1);
|
|
51
|
+
if (queryValue(query, "mode") !== "handoff") return {};
|
|
52
|
+
const at = queryValue(query, "at") || queryValue(query, "yc");
|
|
53
|
+
const chat = queryValue(query, "chat");
|
|
54
|
+
return __spreadProps(__spreadValues({
|
|
55
|
+
mode: "handoff",
|
|
56
|
+
reason: queryValue(query, "reason")
|
|
57
|
+
}, chat ? {
|
|
58
|
+
chat
|
|
59
|
+
} : {}), {
|
|
60
|
+
// A fresh value per open, so a second link re-opens the handoff on the reused screen.
|
|
61
|
+
at: at || String(Date.now())
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
const HANDOFF_DONE_MUTATION = `
|
|
65
|
+
mutation GatewayBridgeComputerHandoffDone($input: GatewayBridgeComputerHandoffDoneInput!) {
|
|
66
|
+
gatewayBridgeComputerHandoffDone(input: $input) { success error }
|
|
67
|
+
}`;
|
|
68
|
+
function readHandoffDoneAnswer(body) {
|
|
69
|
+
var _a, _b, _c;
|
|
70
|
+
const result = (_a = body.data) == null ? void 0 : _a.gatewayBridgeComputerHandoffDone;
|
|
71
|
+
if (result == null ? void 0 : result.success) return;
|
|
72
|
+
throw new Error((result == null ? void 0 : result.error) || ((_c = (_b = body.errors) == null ? void 0 : _b[0]) == null ? void 0 : _c.message) || "Could not reach your assistant.");
|
|
73
|
+
}export{DEFAULT_HANDOFF_REASON,HANDOFF_DONE_MUTATION,computerParamsFromUrl,readHandoff,readHandoffDoneAnswer};//# sourceMappingURL=handoff.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handoff.js","sources":["../../../src/features/computer/handoff.ts"],"sourcesContent":["/**\n * The handoff: the agent stopped at something only the person can do - a\n * reCAPTCHA box, a press-and-hold, a code it must not see - and handed them\n * the live browser to do it.\n *\n * Native twin of the web Computer's `handoff.ts`. On the web the page is\n * opened as `?mode=handoff&reason=…&chat=…`; on the phone the same link (a\n * chat card's \"Open my Computer\", a Computer link tapped anywhere) opens the\n * native Computer with those values as route params (openInApp ->\n * computerOpeningFromUrl). Nothing here carries a credential: the live\n * session's viewer token is minted by the screen, signed in, and only ever\n * travels in a header.\n *\n * Pure: no React Native imports.\n */\n\n/** What the agent hears when the person taps Done - the gateway sends the same sentence for a card's Done. */\nexport const HANDOFF_DONE_TEXT = 'Done - I finished the check on my Computer';\n\n/** The banner when the agent gave no reason. */\nexport const DEFAULT_HANDOFF_REASON = 'Finish the check on the page, then tap Done.';\n\n/** One banner line on a phone; the gateway already capped it shorter. */\nconst MAX_REASON = 160;\n\n/** A Yantra chat session id, as the gateway puts it in the card. */\nconst CHAT_ID_RE = /^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$/;\n\nexport interface HandoffRequest {\n /** The screen was opened to hand the browser to the person. */\n active: boolean;\n reason: string;\n /** The bridged chat Done answers into, when the card came from one. */\n chat: string | null;\n /** Which handoff this is, so a second one on an open screen starts over. */\n key: string;\n}\n\n/** The route params a handoff opens the native Computer with. */\nexport interface HandoffParams {\n mode?: unknown;\n reason?: unknown;\n chat?: unknown;\n /** The card's per-send token (`yc`) or the app's (`at`): tells two handoffs apart. */\n at?: unknown;\n}\n\nfunction text(value: unknown): string {\n return typeof value === 'string' ? value : '';\n}\n\nexport function readHandoff(params: HandoffParams | null | undefined): HandoffRequest {\n const reason = text(params?.reason)\n // Control characters have no business on a banner (matching them is the point).\n // eslint-disable-next-line no-control-regex\n .replace(/[\\u0000-\\u001f\\u007f]+/g, ' ')\n .replace(/\\s+/g, ' ')\n .trim()\n .slice(0, MAX_REASON)\n .trim();\n const chat = text(params?.chat).trim();\n return {\n active: text(params?.mode) === 'handoff',\n reason: reason || DEFAULT_HANDOFF_REASON,\n chat: CHAT_ID_RE.test(chat) ? chat : null,\n key: `${text(params?.at)}|${reason}`,\n };\n}\n\n/** A query value, decoded; '' when it is not there or will not decode. */\nfunction queryValue(query: string, name: string): string {\n const part = query.split('&').find((row) => row === name || row.startsWith(`${name}=`));\n if (part === undefined) return '';\n const raw = part.slice(name.length + 1).replace(/\\+/g, ' ');\n try {\n return decodeURIComponent(raw);\n } catch {\n return raw;\n }\n}\n\n/**\n * The route params a Computer surface link opens the native screen with: its\n * handoff, when it is one (`mode=handoff`), else nothing - the plain Computer.\n * Parsed by hand: React Native's URL has no `searchParams` without the polyfill.\n */\nexport function computerParamsFromUrl(url: string | null | undefined): HandoffParams {\n const source = (url ?? '').split('#')[0];\n const queryAt = source.indexOf('?');\n if (queryAt < 0) return {};\n const query = source.slice(queryAt + 1);\n if (queryValue(query, 'mode') !== 'handoff') return {};\n const at = queryValue(query, 'at') || queryValue(query, 'yc');\n const chat = queryValue(query, 'chat');\n return {\n mode: 'handoff',\n reason: queryValue(query, 'reason'),\n ...(chat ? { chat } : {}),\n // A fresh value per open, so a second link re-opens the handoff on the reused screen.\n at: at || String(Date.now()),\n };\n}\n\n/** The gateway mutation behind a bridged chat's Done (same document as the web surface sends). */\nexport const HANDOFF_DONE_MUTATION = `\n mutation GatewayBridgeComputerHandoffDone($input: GatewayBridgeComputerHandoffDoneInput!) {\n gatewayBridgeComputerHandoffDone(input: $input) { success error }\n }`;\n\n/** The gateway's answer to Done, read the way the web surface reads it; throws with its own words. */\nexport function readHandoffDoneAnswer(body: {\n data?: { gatewayBridgeComputerHandoffDone?: { success?: boolean | null; error?: string | null } | null } | null;\n errors?: ReadonlyArray<{ message?: string }> | null;\n}): void {\n const result = body.data?.gatewayBridgeComputerHandoffDone;\n if (result?.success) return;\n throw new Error(result?.error || body.errors?.[0]?.message || 'Could not reach your assistant.');\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAoBO,MAAM,sBAAyB,GAAA;AAGtC,MAAM,UAAa,GAAA,GAAA;AAGnB,MAAM,UAAa,GAAA,qCAAA;AAmBnB,SAAS,KAAK,KAAwB,EAAA;AACpC,EAAO,OAAA,OAAO,KAAU,KAAA,QAAA,GAAW,KAAQ,GAAA,EAAA;AAC7C;AACO,SAAS,YAAY,MAA0D,EAAA;AACpF,EAAA,MAAM,SAAS,IAAK,CAAA,MAAA,IAAA,IAAA,GAAA,MAAA,GAAA,MAAA,CAAQ,MAAM,CAGjC,CAAA,OAAA,CAAQ,2BAA2B,GAAG,CAAA,CAAE,QAAQ,MAAQ,EAAA,GAAG,EAAE,IAAK,EAAA,CAAE,MAAM,CAAG,EAAA,UAAU,EAAE,IAAK,EAAA;AAC/F,EAAA,MAAM,IAAO,GAAA,IAAA,CAAK,MAAQ,IAAA,IAAA,GAAA,MAAA,GAAA,MAAA,CAAA,IAAI,EAAE,IAAK,EAAA;AACrC,EAAO,OAAA;AAAA,IACL,MAAQ,EAAA,IAAA,CAAK,MAAQ,IAAA,IAAA,GAAA,MAAA,GAAA,MAAA,CAAA,IAAI,CAAM,KAAA,SAAA;AAAA,IAC/B,QAAQ,MAAU,IAAA,sBAAA;AAAA,IAClB,IAAM,EAAA,UAAA,CAAW,IAAK,CAAA,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