@12-apps/mcp 3.5.0 → 3.6.0
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/ADOPTING.md +69 -1
- package/dist/chunk-FBUSSQSK.js +22 -0
- package/dist/chunk-FBUSSQSK.js.map +1 -0
- package/dist/{chunk-FYEVBTDU.js → chunk-HRAQKMDC.js} +12 -20
- package/dist/chunk-HRAQKMDC.js.map +1 -0
- package/dist/{guide-DV5MQbCg.d.ts → guide-KQNcXlMG.d.ts} +32 -17
- package/dist/index.d.ts +2 -1
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/dist/oauth/index.d.ts +1 -1
- package/dist/oauth/index.js +1 -1
- package/dist/pt-BR-e1RnV2v8.d.ts +25 -0
- package/dist/react/index.d.ts +197 -30
- package/dist/react/index.js +327 -147
- package/dist/react/index.js.map +1 -1
- package/package.json +6 -6
- package/src/guide.ts +33 -165
- package/src/index.ts +8 -3
- package/src/pt-BR.ts +195 -0
- package/src/react/ai-capabilities.tsx +10 -6
- package/src/react/ai-connection-utils.ts +18 -13
- package/src/react/ai-flow-steps.tsx +63 -43
- package/src/react/ai-landing.tsx +47 -21
- package/src/react/ai-onboarding.tsx +30 -25
- package/src/react/ai-status-board.tsx +18 -11
- package/src/react/ai-steps.tsx +60 -23
- package/src/react/copy.ts +154 -0
- package/src/react/host-connect-guide.tsx +24 -8
- package/src/react/host-select-step.tsx +4 -1
- package/src/react/index.ts +21 -3
- package/src/react/pt-BR.ts +109 -0
- package/dist/chunk-FYEVBTDU.js.map +0 -1
package/dist/react/index.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
PT_BR_AI_CAPABILITIES,
|
|
3
|
+
PT_BR_AI_CONNECT_PROMPT,
|
|
4
|
+
PT_BR_AI_HOST_GUIDES,
|
|
5
|
+
PT_BR_AI_PERMISSION_MODEL
|
|
6
|
+
} from "../chunk-HRAQKMDC.js";
|
|
7
|
+
import {
|
|
4
8
|
aiConnectPrompt,
|
|
5
|
-
aiHostGuides,
|
|
6
9
|
providerForHostId
|
|
7
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-FBUSSQSK.js";
|
|
8
11
|
import {
|
|
9
12
|
__name
|
|
10
13
|
} from "../chunk-7QVYU63E.js";
|
|
@@ -143,12 +146,13 @@ function CapabilityCard({ capability }) {
|
|
|
143
146
|
}
|
|
144
147
|
__name(CapabilityCard, "CapabilityCard");
|
|
145
148
|
function AiCapabilities({
|
|
146
|
-
capabilities
|
|
149
|
+
capabilities,
|
|
150
|
+
copy
|
|
147
151
|
}) {
|
|
148
152
|
return /* @__PURE__ */ jsxs(Box2, { "data-testid": "ai-capability-examples", sx: { width: "100%" }, children: [
|
|
149
153
|
/* @__PURE__ */ jsxs(Box2, { sx: { mb: 3 }, children: [
|
|
150
|
-
/* @__PURE__ */ jsx2(Text, { variant: "heading", size: "sm", as: "h2", children:
|
|
151
|
-
/* @__PURE__ */ jsx2(Box2, { sx: { mt: 0.5 }, children: /* @__PURE__ */ jsx2(Text, { variant: "body", size: "sm", as: "p", color: "secondary", children:
|
|
154
|
+
/* @__PURE__ */ jsx2(Text, { variant: "heading", size: "sm", as: "h2", children: copy.heading }),
|
|
155
|
+
/* @__PURE__ */ jsx2(Box2, { sx: { mt: 0.5 }, children: /* @__PURE__ */ jsx2(Text, { variant: "body", size: "sm", as: "p", color: "secondary", children: copy.subheading }) })
|
|
152
156
|
] }),
|
|
153
157
|
/* @__PURE__ */ jsx2(
|
|
154
158
|
Box2,
|
|
@@ -201,13 +205,24 @@ __name(FeatureBadge, "FeatureBadge");
|
|
|
201
205
|
|
|
202
206
|
// src/react/ai-landing.tsx
|
|
203
207
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
204
|
-
var
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
function
|
|
208
|
+
var TRUST_ICONS = {
|
|
209
|
+
login: /* @__PURE__ */ jsx4(LockOpenOutlinedIcon, {}),
|
|
210
|
+
install: /* @__PURE__ */ jsx4(BoltOutlinedIcon, {}),
|
|
211
|
+
permissions: /* @__PURE__ */ jsx4(VerifiedUserOutlinedIcon, {}),
|
|
212
|
+
surface: /* @__PURE__ */ jsx4(LanguageOutlinedIcon, {})
|
|
213
|
+
};
|
|
214
|
+
function trustBadges(trust) {
|
|
215
|
+
return trust.map((point) => ({
|
|
216
|
+
icon: TRUST_ICONS[point.id],
|
|
217
|
+
label: point.label,
|
|
218
|
+
caption: point.caption
|
|
219
|
+
}));
|
|
220
|
+
}
|
|
221
|
+
__name(trustBadges, "trustBadges");
|
|
222
|
+
function Hero({
|
|
223
|
+
onStart,
|
|
224
|
+
copy
|
|
225
|
+
}) {
|
|
211
226
|
return /* @__PURE__ */ jsxs3(Stack2, { spacing: 2.5, sx: { maxWidth: 680 }, children: [
|
|
212
227
|
/* @__PURE__ */ jsx4(
|
|
213
228
|
Box4,
|
|
@@ -219,7 +234,7 @@ function Hero({ onStart }) {
|
|
|
219
234
|
letterSpacing: 1.2,
|
|
220
235
|
textTransform: "uppercase"
|
|
221
236
|
},
|
|
222
|
-
children:
|
|
237
|
+
children: copy.eyebrow
|
|
223
238
|
}
|
|
224
239
|
),
|
|
225
240
|
/* @__PURE__ */ jsxs3(Text3, { variant: "heading", size: "xl", weight: "bold", as: "h1", children: [
|
|
@@ -227,20 +242,22 @@ function Hero({ onStart }) {
|
|
|
227
242
|
" ",
|
|
228
243
|
/* @__PURE__ */ jsx4(Box4, { component: "span", sx: { color: "primary.main" }, children: "assistentes de IA" }),
|
|
229
244
|
" ",
|
|
230
|
-
|
|
245
|
+
copy.titleTail
|
|
231
246
|
] }),
|
|
232
|
-
/* @__PURE__ */ jsx4(Text3, { variant: "body", color: "secondary", as: "p", children:
|
|
247
|
+
/* @__PURE__ */ jsx4(Text3, { variant: "body", color: "secondary", as: "p", children: copy.lede }),
|
|
233
248
|
/* @__PURE__ */ jsx4(Box4, { sx: { pt: 1 }, children: /* @__PURE__ */ jsx4(Button, { onClick: onStart, "data-testid": "ai-landing-start", children: "Ver como conectar" }) })
|
|
234
249
|
] });
|
|
235
250
|
}
|
|
236
251
|
__name(Hero, "Hero");
|
|
237
252
|
function AiLanding({
|
|
238
253
|
onStart,
|
|
239
|
-
permissionModel
|
|
240
|
-
capabilities
|
|
254
|
+
permissionModel,
|
|
255
|
+
capabilities,
|
|
256
|
+
copy,
|
|
257
|
+
capabilitiesCopy
|
|
241
258
|
}) {
|
|
242
259
|
return /* @__PURE__ */ jsxs3(Stack2, { spacing: 6, "data-testid": "ai-landing", children: [
|
|
243
|
-
/* @__PURE__ */ jsx4(Hero, { onStart }),
|
|
260
|
+
/* @__PURE__ */ jsx4(Hero, { onStart, copy }),
|
|
244
261
|
/* @__PURE__ */ jsxs3(
|
|
245
262
|
Stack2,
|
|
246
263
|
{
|
|
@@ -279,12 +296,12 @@ function AiLanding({
|
|
|
279
296
|
gap: 3,
|
|
280
297
|
gridTemplateColumns: { xs: "1fr", sm: "1fr 1fr", md: "repeat(4, 1fr)" }
|
|
281
298
|
},
|
|
282
|
-
children:
|
|
299
|
+
children: trustBadges(copy.trust).map((f) => /* @__PURE__ */ jsx4(FeatureBadge, { icon: f.icon, label: f.label, caption: f.caption }, f.label))
|
|
283
300
|
}
|
|
284
301
|
)
|
|
285
302
|
}
|
|
286
303
|
),
|
|
287
|
-
/* @__PURE__ */ jsx4(Box4, { children: /* @__PURE__ */ jsx4(AiCapabilities, { capabilities }) })
|
|
304
|
+
/* @__PURE__ */ jsx4(Box4, { children: /* @__PURE__ */ jsx4(AiCapabilities, { capabilities, copy: capabilitiesCopy }) })
|
|
288
305
|
] });
|
|
289
306
|
}
|
|
290
307
|
__name(AiLanding, "AiLanding");
|
|
@@ -311,13 +328,13 @@ function connectionForHost(connections, hostId) {
|
|
|
311
328
|
return connections.find((c) => c.host === provider) ?? connections.find((c) => c.host === null) ?? null;
|
|
312
329
|
}
|
|
313
330
|
__name(connectionForHost, "connectionForHost");
|
|
314
|
-
function activeAgo(date) {
|
|
331
|
+
function activeAgo(date, copy) {
|
|
315
332
|
const minutes = Math.max(0, Math.floor((Date.now() - date.getTime()) / 6e4));
|
|
316
|
-
if (minutes < 1) return
|
|
317
|
-
if (minutes < 60) return
|
|
333
|
+
if (minutes < 1) return copy.activeNow;
|
|
334
|
+
if (minutes < 60) return copy.activeMinutes(minutes);
|
|
318
335
|
const hours = Math.floor(minutes / 60);
|
|
319
|
-
if (hours < 24) return
|
|
320
|
-
return
|
|
336
|
+
if (hours < 24) return copy.activeHours(hours);
|
|
337
|
+
return copy.activeDays(Math.floor(hours / 24));
|
|
321
338
|
}
|
|
322
339
|
__name(activeAgo, "activeAgo");
|
|
323
340
|
function mostRecent(connections) {
|
|
@@ -327,20 +344,20 @@ function mostRecent(connections) {
|
|
|
327
344
|
);
|
|
328
345
|
}
|
|
329
346
|
__name(mostRecent, "mostRecent");
|
|
330
|
-
function connectedTitle(connections, hosts, connectedHostId) {
|
|
347
|
+
function connectedTitle(connections, hosts, connectedHostId, copy) {
|
|
331
348
|
const providers = [...new Set(connections.map((c) => c.host).filter((h) => h !== null))];
|
|
332
|
-
if (providers.length === 1) return `${PROVIDER_LABEL[providers[0]]}
|
|
349
|
+
if (providers.length === 1) return `${PROVIDER_LABEL[providers[0]]} ${copy.connectedSuffix}`;
|
|
333
350
|
if (providers.length > 1) {
|
|
334
|
-
return
|
|
351
|
+
return copy.connectedSeveral(providers.map((p) => PROVIDER_LABEL[p]).join(", "));
|
|
335
352
|
}
|
|
336
|
-
if (connections.length > 0) return `${hostLabel(hosts, connectedHostId)}
|
|
337
|
-
return
|
|
353
|
+
if (connections.length > 0) return `${hostLabel(hosts, connectedHostId)} ${copy.connectedSuffix}`;
|
|
354
|
+
return copy.connectedGeneric;
|
|
338
355
|
}
|
|
339
356
|
__name(connectedTitle, "connectedTitle");
|
|
340
|
-
function connectedSummary(connections) {
|
|
357
|
+
function connectedSummary(connections, copy) {
|
|
341
358
|
const recent = mostRecent(connections);
|
|
342
|
-
if (!recent) return
|
|
343
|
-
return activeAgo(recent.lastActiveAt);
|
|
359
|
+
if (!recent) return copy.configured;
|
|
360
|
+
return activeAgo(recent.lastActiveAt, copy);
|
|
344
361
|
}
|
|
345
362
|
__name(connectedSummary, "connectedSummary");
|
|
346
363
|
|
|
@@ -380,7 +397,9 @@ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
|
380
397
|
function EndpointCopyBlock({
|
|
381
398
|
endpointUrl,
|
|
382
399
|
copied,
|
|
383
|
-
onCopy
|
|
400
|
+
onCopy,
|
|
401
|
+
flowCopy,
|
|
402
|
+
copy
|
|
384
403
|
}) {
|
|
385
404
|
const handleClick = /* @__PURE__ */ __name(() => {
|
|
386
405
|
if (typeof navigator !== "undefined" && navigator.clipboard) {
|
|
@@ -399,12 +418,12 @@ function EndpointCopyBlock({
|
|
|
399
418
|
bgcolor: "action.hover"
|
|
400
419
|
},
|
|
401
420
|
children: [
|
|
402
|
-
/* @__PURE__ */ jsx6(Text4, { variant: "caption", as: "p", weight: "bold", children:
|
|
403
|
-
/* @__PURE__ */ jsx6(Text4, { variant: "caption", as: "p", color: "secondary", children:
|
|
421
|
+
/* @__PURE__ */ jsx6(Text4, { variant: "caption", as: "p", weight: "bold", children: copy.urlLabel }),
|
|
422
|
+
/* @__PURE__ */ jsx6(Text4, { variant: "caption", as: "p", color: "secondary", children: copy.urlHint }),
|
|
404
423
|
/* @__PURE__ */ jsx6(Box5, { sx: { mt: 1 }, children: /* @__PURE__ */ jsx6(McpEndpointUrl, { url: endpointUrl, copyable: false }) }),
|
|
405
424
|
/* @__PURE__ */ jsx6(Box5, { sx: { mt: 1.5 }, children: /* @__PURE__ */ jsxs4(Button2, { onClick: handleClick, "data-testid": "ai-copy-endpoint", children: [
|
|
406
425
|
copied ? /* @__PURE__ */ jsx6(CheckIcon, { sx: { fontSize: 18, mr: 0.5 } }) : /* @__PURE__ */ jsx6(ContentCopyOutlinedIcon, { sx: { fontSize: 18, mr: 0.5 } }),
|
|
407
|
-
copied ?
|
|
426
|
+
copied ? flowCopy.copied : flowCopy.copyUrl
|
|
408
427
|
] }) })
|
|
409
428
|
]
|
|
410
429
|
}
|
|
@@ -414,7 +433,8 @@ __name(EndpointCopyBlock, "EndpointCopyBlock");
|
|
|
414
433
|
function PromptCopyBlock({
|
|
415
434
|
title,
|
|
416
435
|
caption,
|
|
417
|
-
message
|
|
436
|
+
message,
|
|
437
|
+
flowCopy
|
|
418
438
|
}) {
|
|
419
439
|
const [copied, setCopied] = useState(false);
|
|
420
440
|
const handleClick = /* @__PURE__ */ __name(() => {
|
|
@@ -453,20 +473,20 @@ function PromptCopyBlock({
|
|
|
453
473
|
),
|
|
454
474
|
/* @__PURE__ */ jsx6(Box5, { sx: { mt: 1.5 }, children: /* @__PURE__ */ jsxs4(Button2, { onClick: handleClick, "data-testid": "ai-copy-prompt", children: [
|
|
455
475
|
copied ? /* @__PURE__ */ jsx6(CheckIcon, { sx: { fontSize: 18, mr: 0.5 } }) : /* @__PURE__ */ jsx6(ContentCopyOutlinedIcon, { sx: { fontSize: 18, mr: 0.5 } }),
|
|
456
|
-
copied ?
|
|
476
|
+
copied ? flowCopy.copied : flowCopy.copyMessage
|
|
457
477
|
] }) })
|
|
458
478
|
]
|
|
459
479
|
}
|
|
460
480
|
);
|
|
461
481
|
}
|
|
462
482
|
__name(PromptCopyBlock, "PromptCopyBlock");
|
|
463
|
-
function HostConnectHeader({
|
|
483
|
+
function HostConnectHeader({
|
|
484
|
+
host,
|
|
485
|
+
copy
|
|
486
|
+
}) {
|
|
464
487
|
return /* @__PURE__ */ jsxs4(Stack3, { direction: "row", spacing: 1.5, alignItems: "center", children: [
|
|
465
488
|
/* @__PURE__ */ jsx6(HostBrandAvatar, { brand: host.brand, size: 36 }),
|
|
466
|
-
/* @__PURE__ */
|
|
467
|
-
"Conectar no ",
|
|
468
|
-
host.label
|
|
469
|
-
] })
|
|
489
|
+
/* @__PURE__ */ jsx6(Text4, { variant: "heading", size: "sm", as: "h3", children: copy.connectOn(host.label) })
|
|
470
490
|
] });
|
|
471
491
|
}
|
|
472
492
|
__name(HostConnectHeader, "HostConnectHeader");
|
|
@@ -491,10 +511,13 @@ function HostOpenButton({
|
|
|
491
511
|
) });
|
|
492
512
|
}
|
|
493
513
|
__name(HostOpenButton, "HostOpenButton");
|
|
494
|
-
function HostDocsLink({
|
|
514
|
+
function HostDocsLink({
|
|
515
|
+
host,
|
|
516
|
+
copy
|
|
517
|
+
}) {
|
|
495
518
|
if (!host.docs) return null;
|
|
496
519
|
return /* @__PURE__ */ jsxs4(Text4, { variant: "caption", as: "p", color: "secondary", children: [
|
|
497
|
-
|
|
520
|
+
copy.moreInfo,
|
|
498
521
|
" ",
|
|
499
522
|
/* @__PURE__ */ jsx6(
|
|
500
523
|
Box5,
|
|
@@ -527,46 +550,56 @@ var POLL_INTERVAL_MS = 3e3;
|
|
|
527
550
|
function StepNav({
|
|
528
551
|
nav,
|
|
529
552
|
onNext,
|
|
530
|
-
nextLabel
|
|
553
|
+
nextLabel,
|
|
531
554
|
nextDisabled = false,
|
|
532
|
-
nextTestId
|
|
555
|
+
nextTestId,
|
|
556
|
+
copy
|
|
533
557
|
}) {
|
|
534
558
|
return /* @__PURE__ */ jsxs5(Stack4, { direction: "row", spacing: 1, alignItems: "center", justifyContent: "space-between", children: [
|
|
535
|
-
/* @__PURE__ */ jsx7(Button3, { variant: "ghost", onClick: () => nav.back(), "data-testid": "ai-step-back", children:
|
|
559
|
+
/* @__PURE__ */ jsx7(Button3, { variant: "ghost", onClick: () => nav.back(), "data-testid": "ai-step-back", children: copy.flow.back }),
|
|
536
560
|
/* @__PURE__ */ jsx7(Button3, { onClick: onNext, disabled: nextDisabled, "data-testid": nextTestId, children: nextLabel })
|
|
537
561
|
] });
|
|
538
562
|
}
|
|
539
563
|
__name(StepNav, "StepNav");
|
|
540
|
-
function CopyUrlStep({
|
|
564
|
+
function CopyUrlStep({
|
|
565
|
+
nav,
|
|
566
|
+
endpointUrl,
|
|
567
|
+
copy
|
|
568
|
+
}) {
|
|
541
569
|
return /* @__PURE__ */ jsxs5(Stack4, { spacing: 3, "data-testid": "ai-copy-step", children: [
|
|
542
570
|
/* @__PURE__ */ jsxs5(Box6, { children: [
|
|
543
|
-
/* @__PURE__ */ jsx7(Text5, { variant: "heading", size: "sm", as: "h2", children:
|
|
544
|
-
/* @__PURE__ */ jsx7(Text5, { variant: "caption", as: "p", color: "secondary", children:
|
|
571
|
+
/* @__PURE__ */ jsx7(Text5, { variant: "heading", size: "sm", as: "h2", children: copy.flow.copyUrlTitle }),
|
|
572
|
+
/* @__PURE__ */ jsx7(Text5, { variant: "caption", as: "p", color: "secondary", children: copy.flow.urlCaption })
|
|
545
573
|
] }),
|
|
546
|
-
/* @__PURE__ */ jsx7(EndpointCopyBlock, { endpointUrl, copied: false, onCopy: () => nav.next() }),
|
|
547
|
-
/* @__PURE__ */ jsx7(Box6, { children: /* @__PURE__ */ jsx7(Button3, { variant: "ghost", onClick: () => nav.back(), "data-testid": "ai-step-back", children:
|
|
574
|
+
/* @__PURE__ */ jsx7(EndpointCopyBlock, { copy: copy.connectGuide, flowCopy: copy.flow, endpointUrl, copied: false, onCopy: () => nav.next() }),
|
|
575
|
+
/* @__PURE__ */ jsx7(Box6, { children: /* @__PURE__ */ jsx7(Button3, { variant: "ghost", onClick: () => nav.back(), "data-testid": "ai-step-back", children: copy.flow.back }) })
|
|
548
576
|
] });
|
|
549
577
|
}
|
|
550
578
|
__name(CopyUrlStep, "CopyUrlStep");
|
|
551
|
-
function ConfigureStep({
|
|
579
|
+
function ConfigureStep({
|
|
580
|
+
nav,
|
|
581
|
+
host,
|
|
582
|
+
copy
|
|
583
|
+
}) {
|
|
552
584
|
const [opened, setOpened] = useState2(!host.link);
|
|
553
585
|
return /* @__PURE__ */ jsxs5(Stack4, { spacing: 2.5, "data-testid": "ai-configure-step", children: [
|
|
554
|
-
/* @__PURE__ */ jsx7(HostConnectHeader, { host }),
|
|
586
|
+
/* @__PURE__ */ jsx7(HostConnectHeader, { copy: copy.connectGuide, host }),
|
|
555
587
|
/* @__PURE__ */ jsx7(HostOpenButton, { host, onOpen: () => setOpened(true) }),
|
|
556
588
|
/* @__PURE__ */ jsx7(HostStepList, { steps: host.steps.slice(0, CONFIGURE_STEP_COUNT), start: 1 }),
|
|
557
|
-
/* @__PURE__ */ jsx7(HostDocsLink, { host }),
|
|
558
|
-
/* @__PURE__ */ jsx7(StepNav, { nav, onNext: () => nav.next(), nextDisabled: !opened, nextTestId: "ai-configure-next" })
|
|
589
|
+
/* @__PURE__ */ jsx7(HostDocsLink, { copy: copy.connectGuide, host }),
|
|
590
|
+
/* @__PURE__ */ jsx7(StepNav, { copy, nav, onNext: () => nav.next(), nextDisabled: !opened, nextTestId: "ai-configure-next" })
|
|
559
591
|
] });
|
|
560
592
|
}
|
|
561
593
|
__name(ConfigureStep, "ConfigureStep");
|
|
562
594
|
function ConfigureStageStep({
|
|
563
595
|
nav,
|
|
564
596
|
host,
|
|
565
|
-
stage
|
|
597
|
+
stage,
|
|
598
|
+
copy
|
|
566
599
|
}) {
|
|
567
600
|
const [opened, setOpened] = useState2(!stage.link);
|
|
568
601
|
return /* @__PURE__ */ jsxs5(Stack4, { spacing: 2.5, "data-testid": `ai-stage-${stage.id}`, children: [
|
|
569
|
-
/* @__PURE__ */ jsx7(HostConnectHeader, { host }),
|
|
602
|
+
/* @__PURE__ */ jsx7(HostConnectHeader, { copy: copy.connectGuide, host }),
|
|
570
603
|
stage.link && /* @__PURE__ */ jsx7(Box6, { children: /* @__PURE__ */ jsxs5(
|
|
571
604
|
Button3,
|
|
572
605
|
{
|
|
@@ -582,10 +615,11 @@ function ConfigureStageStep({
|
|
|
582
615
|
}
|
|
583
616
|
) }),
|
|
584
617
|
/* @__PURE__ */ jsx7(HostStepList, { steps: stage.steps, start: 1 }),
|
|
585
|
-
/* @__PURE__ */ jsx7(HostDocsLink, { host }),
|
|
618
|
+
/* @__PURE__ */ jsx7(HostDocsLink, { copy: copy.connectGuide, host }),
|
|
586
619
|
/* @__PURE__ */ jsx7(
|
|
587
620
|
StepNav,
|
|
588
621
|
{
|
|
622
|
+
copy,
|
|
589
623
|
nav,
|
|
590
624
|
onNext: () => nav.next(),
|
|
591
625
|
nextDisabled: !opened,
|
|
@@ -598,33 +632,36 @@ __name(ConfigureStageStep, "ConfigureStageStep");
|
|
|
598
632
|
function ConnectStep({
|
|
599
633
|
nav,
|
|
600
634
|
host,
|
|
601
|
-
connectPrompt
|
|
635
|
+
connectPrompt,
|
|
636
|
+
copy
|
|
602
637
|
}) {
|
|
603
638
|
return /* @__PURE__ */ jsxs5(Stack4, { spacing: 2.5, "data-testid": "ai-connect-step", children: [
|
|
604
|
-
/* @__PURE__ */ jsx7(HostConnectHeader, { host }),
|
|
639
|
+
/* @__PURE__ */ jsx7(HostConnectHeader, { copy: copy.connectGuide, host }),
|
|
605
640
|
/* @__PURE__ */ jsx7(HostStepList, { steps: host.steps.slice(CONFIGURE_STEP_COUNT), start: CONFIGURE_STEP_COUNT + 1 }),
|
|
606
641
|
/* @__PURE__ */ jsx7(
|
|
607
642
|
PromptCopyBlock,
|
|
608
643
|
{
|
|
609
|
-
|
|
610
|
-
|
|
644
|
+
flowCopy: copy.flow,
|
|
645
|
+
title: copy.flow.pasteTitle,
|
|
646
|
+
caption: copy.flow.promptCaption,
|
|
611
647
|
message: connectPrompt
|
|
612
648
|
}
|
|
613
649
|
),
|
|
614
|
-
/* @__PURE__ */ jsx7(HostDocsLink, { host }),
|
|
615
|
-
/* @__PURE__ */ jsx7(StepNav, { nav, onNext: () => nav.next(), nextLabel:
|
|
650
|
+
/* @__PURE__ */ jsx7(HostDocsLink, { copy: copy.connectGuide, host }),
|
|
651
|
+
/* @__PURE__ */ jsx7(StepNav, { copy, nav, onNext: () => nav.next(), nextLabel: copy.flow.advance, nextTestId: "ai-connect-done" })
|
|
616
652
|
] });
|
|
617
653
|
}
|
|
618
654
|
__name(ConnectStep, "ConnectStep");
|
|
619
655
|
function InstallStep({
|
|
620
656
|
nav,
|
|
621
657
|
host,
|
|
622
|
-
connectPrompt
|
|
658
|
+
connectPrompt,
|
|
659
|
+
copy
|
|
623
660
|
}) {
|
|
624
661
|
const [opened, setOpened] = useState2(false);
|
|
625
662
|
return /* @__PURE__ */ jsxs5(Stack4, { spacing: 2.5, "data-testid": "ai-install-step", children: [
|
|
626
|
-
/* @__PURE__ */ jsx7(HostConnectHeader, { host }),
|
|
627
|
-
/* @__PURE__ */ jsx7(Text5, { variant: "body", as: "p", color: "secondary", children:
|
|
663
|
+
/* @__PURE__ */ jsx7(HostConnectHeader, { copy: copy.connectGuide, host }),
|
|
664
|
+
/* @__PURE__ */ jsx7(Text5, { variant: "body", as: "p", color: "secondary", children: copy.flow.installBody }),
|
|
628
665
|
host.pluginUrl && /* @__PURE__ */ jsx7(Box6, { children: /* @__PURE__ */ jsxs5(
|
|
629
666
|
Button3,
|
|
630
667
|
{
|
|
@@ -634,7 +671,7 @@ function InstallStep({
|
|
|
634
671
|
},
|
|
635
672
|
"data-testid": "ai-install-open",
|
|
636
673
|
children: [
|
|
637
|
-
|
|
674
|
+
copy.flow.installAction,
|
|
638
675
|
/* @__PURE__ */ jsx7(OpenInNewIcon2, { sx: { fontSize: 16, ml: 0.5 } })
|
|
639
676
|
]
|
|
640
677
|
}
|
|
@@ -642,18 +679,20 @@ function InstallStep({
|
|
|
642
679
|
/* @__PURE__ */ jsx7(
|
|
643
680
|
PromptCopyBlock,
|
|
644
681
|
{
|
|
645
|
-
|
|
646
|
-
|
|
682
|
+
flowCopy: copy.flow,
|
|
683
|
+
title: copy.flow.askTitle,
|
|
684
|
+
caption: copy.flow.pasteInstallCaption,
|
|
647
685
|
message: connectPrompt
|
|
648
686
|
}
|
|
649
687
|
),
|
|
650
|
-
/* @__PURE__ */ jsx7(HostDocsLink, { host }),
|
|
688
|
+
/* @__PURE__ */ jsx7(HostDocsLink, { copy: copy.connectGuide, host }),
|
|
651
689
|
/* @__PURE__ */ jsx7(
|
|
652
690
|
StepNav,
|
|
653
691
|
{
|
|
692
|
+
copy,
|
|
654
693
|
nav,
|
|
655
694
|
onNext: () => nav.next(),
|
|
656
|
-
nextLabel:
|
|
695
|
+
nextLabel: copy.flow.advance,
|
|
657
696
|
nextDisabled: !opened,
|
|
658
697
|
nextTestId: "ai-install-done"
|
|
659
698
|
}
|
|
@@ -665,7 +704,8 @@ function ConfirmStep({
|
|
|
665
704
|
nav,
|
|
666
705
|
connections,
|
|
667
706
|
hosts,
|
|
668
|
-
onRetest
|
|
707
|
+
onRetest,
|
|
708
|
+
copy
|
|
669
709
|
}) {
|
|
670
710
|
const selectedHostId = nav.data.selectedHost;
|
|
671
711
|
const connection = connectionForHost(connections, selectedHostId);
|
|
@@ -680,31 +720,24 @@ function ConfirmStep({
|
|
|
680
720
|
/* @__PURE__ */ jsxs5(Stack4, { direction: "row", spacing: 1.5, alignItems: "center", children: [
|
|
681
721
|
/* @__PURE__ */ jsx7(CheckCircleIcon, { sx: { color: "success.main" } }),
|
|
682
722
|
/* @__PURE__ */ jsxs5(Box6, { children: [
|
|
683
|
-
/* @__PURE__ */
|
|
684
|
-
|
|
685
|
-
" est\xE1 conectado \xE0 sua loja."
|
|
686
|
-
] }),
|
|
687
|
-
/* @__PURE__ */ jsx7(Text5, { variant: "caption", as: "p", color: "secondary", children: activeAgo(connection.lastActiveAt) })
|
|
723
|
+
/* @__PURE__ */ jsx7(Text5, { variant: "body", weight: "bold", as: "p", children: copy.flow.connectedTo(label) }),
|
|
724
|
+
/* @__PURE__ */ jsx7(Text5, { variant: "caption", as: "p", color: "secondary", children: activeAgo(connection.lastActiveAt, copy.summary) })
|
|
688
725
|
] })
|
|
689
726
|
] }),
|
|
690
|
-
/* @__PURE__ */ jsx7(Box6, { children: /* @__PURE__ */ jsx7(Button3, { onClick: () => nav.complete({ connectedHost: selectedHostId }), children:
|
|
727
|
+
/* @__PURE__ */ jsx7(Box6, { children: /* @__PURE__ */ jsx7(Button3, { onClick: () => nav.complete({ connectedHost: selectedHostId }), children: copy.flow.finish }) })
|
|
691
728
|
] });
|
|
692
729
|
}
|
|
693
730
|
return /* @__PURE__ */ jsxs5(Stack4, { spacing: 2.5, "data-testid": "ai-confirm-waiting", children: [
|
|
694
731
|
/* @__PURE__ */ jsxs5(Stack4, { direction: "row", spacing: 1.5, alignItems: "center", children: [
|
|
695
732
|
/* @__PURE__ */ jsx7(Progress, { variant: "circular", circularSize: 22, thickness: 4, dataTestId: "ai-confirm-spinner" }),
|
|
696
733
|
/* @__PURE__ */ jsxs5(Box6, { children: [
|
|
697
|
-
/* @__PURE__ */ jsx7(Text5, { variant: "body", weight: "bold", as: "p", children:
|
|
698
|
-
/* @__PURE__ */
|
|
699
|
-
"Assim que voc\xEA autorizar o acesso no ",
|
|
700
|
-
label,
|
|
701
|
-
", ela aparece aqui automaticamente."
|
|
702
|
-
] })
|
|
734
|
+
/* @__PURE__ */ jsx7(Text5, { variant: "body", weight: "bold", as: "p", children: copy.flow.waitingTitle }),
|
|
735
|
+
/* @__PURE__ */ jsx7(Text5, { variant: "caption", as: "p", color: "secondary", children: copy.flow.waitingBody(label) })
|
|
703
736
|
] })
|
|
704
737
|
] }),
|
|
705
738
|
/* @__PURE__ */ jsxs5(Stack4, { direction: "row", spacing: 1, children: [
|
|
706
|
-
/* @__PURE__ */ jsx7(Button3, { variant: "ghost", size: "sm", onClick: onRetest, "data-testid": "ai-confirm-retest", children:
|
|
707
|
-
/* @__PURE__ */ jsx7(Button3, { variant: "ghost", size: "sm", onClick: () => nav.back(), children:
|
|
739
|
+
/* @__PURE__ */ jsx7(Button3, { variant: "ghost", size: "sm", onClick: onRetest, "data-testid": "ai-confirm-retest", children: copy.flow.testNow }),
|
|
740
|
+
/* @__PURE__ */ jsx7(Button3, { variant: "ghost", size: "sm", onClick: () => nav.back(), children: copy.flow.back })
|
|
708
741
|
] })
|
|
709
742
|
] });
|
|
710
743
|
}
|
|
@@ -724,7 +757,8 @@ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
|
724
757
|
function ConnectedControls({
|
|
725
758
|
host,
|
|
726
759
|
onConnect,
|
|
727
|
-
onDisconnect
|
|
760
|
+
onDisconnect,
|
|
761
|
+
copy
|
|
728
762
|
}) {
|
|
729
763
|
return /* @__PURE__ */ jsxs6(
|
|
730
764
|
Stack5,
|
|
@@ -757,7 +791,7 @@ function ConnectedControls({
|
|
|
757
791
|
"data-testid": `ai-status-instructions-${host.id}`,
|
|
758
792
|
children: [
|
|
759
793
|
/* @__PURE__ */ jsx8(MenuBookOutlinedIcon, { sx: { fontSize: 16, mr: 0.5 } }),
|
|
760
|
-
|
|
794
|
+
copy.instructions
|
|
761
795
|
]
|
|
762
796
|
}
|
|
763
797
|
),
|
|
@@ -769,10 +803,10 @@ function ConnectedControls({
|
|
|
769
803
|
size: "sm",
|
|
770
804
|
onClick: () => onDisconnect(host.id),
|
|
771
805
|
confirm: {
|
|
772
|
-
title:
|
|
806
|
+
title: copy.disconnectTitle,
|
|
773
807
|
entityName: host.label,
|
|
774
|
-
description:
|
|
775
|
-
confirmText:
|
|
808
|
+
description: copy.disconnectBody,
|
|
809
|
+
confirmText: copy.disconnectConfirm,
|
|
776
810
|
dataTestId: `ai-status-disconnect-confirm-${host.id}`
|
|
777
811
|
},
|
|
778
812
|
"data-testid": `ai-status-disconnect-${host.id}`,
|
|
@@ -790,7 +824,8 @@ __name(ConnectedControls, "ConnectedControls");
|
|
|
790
824
|
function StatusBox({
|
|
791
825
|
status,
|
|
792
826
|
onConnect,
|
|
793
|
-
onDisconnect
|
|
827
|
+
onDisconnect,
|
|
828
|
+
copy
|
|
794
829
|
}) {
|
|
795
830
|
const { host, connected, detail } = status;
|
|
796
831
|
return /* @__PURE__ */ jsxs6(
|
|
@@ -815,9 +850,9 @@ function StatusBox({
|
|
|
815
850
|
/* @__PURE__ */ jsx8(Text6, { variant: "body", weight: "bold", as: "span", children: host.label }),
|
|
816
851
|
connected ? /* @__PURE__ */ jsx8(CheckCircleIcon2, { sx: { fontSize: 18, color: "success.main" } }) : null
|
|
817
852
|
] }),
|
|
818
|
-
/* @__PURE__ */ jsx8(Text6, { variant: "caption", as: "p", color: "secondary", children: connected ? detail ??
|
|
853
|
+
/* @__PURE__ */ jsx8(Text6, { variant: "caption", as: "p", color: "secondary", children: connected ? detail ?? copy.connected : copy.notConnected })
|
|
819
854
|
] }),
|
|
820
|
-
connected ? /* @__PURE__ */ jsx8(ConnectedControls, { host, onConnect, onDisconnect }) : /* @__PURE__ */ jsxs6(
|
|
855
|
+
connected ? /* @__PURE__ */ jsx8(ConnectedControls, { copy, host, onConnect, onDisconnect }) : /* @__PURE__ */ jsxs6(
|
|
821
856
|
Button4,
|
|
822
857
|
{
|
|
823
858
|
variant: "outline",
|
|
@@ -838,12 +873,13 @@ __name(StatusBox, "StatusBox");
|
|
|
838
873
|
function AiStatusBoard({
|
|
839
874
|
statuses,
|
|
840
875
|
onConnect,
|
|
841
|
-
onDisconnect
|
|
876
|
+
onDisconnect,
|
|
877
|
+
copy
|
|
842
878
|
}) {
|
|
843
879
|
return /* @__PURE__ */ jsxs6(Stack5, { spacing: 2, "data-testid": "ai-status-board", children: [
|
|
844
880
|
/* @__PURE__ */ jsxs6(Box7, { children: [
|
|
845
|
-
/* @__PURE__ */ jsx8(Text6, { variant: "heading", size: "sm", as: "h2", children:
|
|
846
|
-
/* @__PURE__ */ jsx8(Text6, { variant: "caption", as: "p", color: "secondary", children:
|
|
881
|
+
/* @__PURE__ */ jsx8(Text6, { variant: "heading", size: "sm", as: "h2", children: copy.boardTitle }),
|
|
882
|
+
/* @__PURE__ */ jsx8(Text6, { variant: "caption", as: "p", color: "secondary", children: copy.boardCaption })
|
|
847
883
|
] }),
|
|
848
884
|
/* @__PURE__ */ jsx8(
|
|
849
885
|
Box7,
|
|
@@ -856,6 +892,7 @@ function AiStatusBoard({
|
|
|
856
892
|
children: statuses.map((status) => /* @__PURE__ */ jsx8(
|
|
857
893
|
StatusBox,
|
|
858
894
|
{
|
|
895
|
+
copy,
|
|
859
896
|
status,
|
|
860
897
|
onConnect,
|
|
861
898
|
onDisconnect
|
|
@@ -923,12 +960,13 @@ __name(HostCard, "HostCard");
|
|
|
923
960
|
function HostSelectStep({
|
|
924
961
|
hosts,
|
|
925
962
|
selectedId,
|
|
926
|
-
onSelect
|
|
963
|
+
onSelect,
|
|
964
|
+
copy
|
|
927
965
|
}) {
|
|
928
966
|
return /* @__PURE__ */ jsxs7(Stack6, { spacing: 3, "data-testid": "ai-host-select", children: [
|
|
929
967
|
/* @__PURE__ */ jsxs7(Box8, { children: [
|
|
930
968
|
/* @__PURE__ */ jsx9(Text7, { variant: "heading", size: "sm", as: "h2", children: "Escolha o seu assistente" }),
|
|
931
|
-
/* @__PURE__ */ jsx9(Text7, { variant: "caption", as: "p", color: "secondary", children:
|
|
969
|
+
/* @__PURE__ */ jsx9(Text7, { variant: "caption", as: "p", color: "secondary", children: copy.caption })
|
|
932
970
|
] }),
|
|
933
971
|
/* @__PURE__ */ jsx9(
|
|
934
972
|
Box8,
|
|
@@ -959,7 +997,8 @@ function StatusBoard({
|
|
|
959
997
|
nav,
|
|
960
998
|
connections,
|
|
961
999
|
hosts,
|
|
962
|
-
onDisconnect
|
|
1000
|
+
onDisconnect,
|
|
1001
|
+
copy
|
|
963
1002
|
}) {
|
|
964
1003
|
const legacyHostId = nav.data.connectedHost ?? nav.data.selectedHost;
|
|
965
1004
|
const statuses = hosts.map((host) => {
|
|
@@ -968,7 +1007,7 @@ function StatusBoard({
|
|
|
968
1007
|
return {
|
|
969
1008
|
host,
|
|
970
1009
|
connected: connection !== null,
|
|
971
|
-
detail: connection ? activeAgo(connection.lastActiveAt) : void 0
|
|
1010
|
+
detail: connection ? activeAgo(connection.lastActiveAt, copy.summary) : void 0
|
|
972
1011
|
};
|
|
973
1012
|
});
|
|
974
1013
|
const goToConnect = /* @__PURE__ */ __name((hostId) => {
|
|
@@ -984,18 +1023,19 @@ function StatusBoard({
|
|
|
984
1023
|
);
|
|
985
1024
|
if (!othersLive) goToConnect(hostId);
|
|
986
1025
|
} : void 0;
|
|
987
|
-
return /* @__PURE__ */ jsx10(AiStatusBoard, { statuses, onConnect: goToConnect, onDisconnect: disconnect });
|
|
1026
|
+
return /* @__PURE__ */ jsx10(AiStatusBoard, { copy: copy.statusBoard, statuses, onConnect: goToConnect, onDisconnect: disconnect });
|
|
988
1027
|
}
|
|
989
1028
|
__name(StatusBoard, "StatusBoard");
|
|
990
|
-
function selectStep(hosts) {
|
|
1029
|
+
function selectStep(hosts, copy) {
|
|
991
1030
|
return {
|
|
992
1031
|
id: "select",
|
|
993
|
-
label:
|
|
1032
|
+
label: copy.flow.steps.select,
|
|
994
1033
|
render: /* @__PURE__ */ __name((nav) => /* @__PURE__ */ jsx10(
|
|
995
1034
|
HostSelectStep,
|
|
996
1035
|
{
|
|
997
1036
|
hosts,
|
|
998
1037
|
selectedId: nav.data.selectedHost ?? null,
|
|
1038
|
+
copy: copy.hostSelect,
|
|
999
1039
|
onSelect: (hostId) => nav.goTo(hosts.find((h) => h.id === hostId)?.pluginUrl ? "install" : "copy", {
|
|
1000
1040
|
selectedHost: hostId
|
|
1001
1041
|
})
|
|
@@ -1004,59 +1044,99 @@ function selectStep(hosts) {
|
|
|
1004
1044
|
};
|
|
1005
1045
|
}
|
|
1006
1046
|
__name(selectStep, "selectStep");
|
|
1007
|
-
function copyStep(endpointUrl) {
|
|
1047
|
+
function copyStep(endpointUrl, copy) {
|
|
1008
1048
|
return {
|
|
1009
1049
|
id: "copy",
|
|
1010
|
-
label:
|
|
1011
|
-
render: /* @__PURE__ */ __name((nav) => /* @__PURE__ */ jsx10(CopyUrlStep, { nav, endpointUrl }), "render")
|
|
1050
|
+
label: copy.flow.steps.copyUrl,
|
|
1051
|
+
render: /* @__PURE__ */ __name((nav) => /* @__PURE__ */ jsx10(CopyUrlStep, { copy, nav, endpointUrl }), "render")
|
|
1012
1052
|
};
|
|
1013
1053
|
}
|
|
1014
1054
|
__name(copyStep, "copyStep");
|
|
1015
|
-
function manualMiddle(host, hosts, endpointUrl, connectPrompt) {
|
|
1055
|
+
function manualMiddle(host, hosts, endpointUrl, connectPrompt, copy) {
|
|
1016
1056
|
if (host.configureStages && host.configureStages.length > 0) {
|
|
1017
1057
|
return [
|
|
1018
|
-
copyStep(endpointUrl),
|
|
1058
|
+
copyStep(endpointUrl, copy),
|
|
1019
1059
|
...host.configureStages.map((stage) => ({
|
|
1020
1060
|
id: stage.id,
|
|
1021
1061
|
label: stage.label,
|
|
1022
|
-
render: /* @__PURE__ */ __name((nav) => /* @__PURE__ */ jsx10(
|
|
1062
|
+
render: /* @__PURE__ */ __name((nav) => /* @__PURE__ */ jsx10(
|
|
1063
|
+
ConfigureStageStep,
|
|
1064
|
+
{
|
|
1065
|
+
nav,
|
|
1066
|
+
host: resolveHost(hosts, nav.data.selectedHost),
|
|
1067
|
+
stage,
|
|
1068
|
+
copy
|
|
1069
|
+
}
|
|
1070
|
+
), "render")
|
|
1023
1071
|
}))
|
|
1024
1072
|
];
|
|
1025
1073
|
}
|
|
1026
1074
|
return [
|
|
1027
|
-
copyStep(endpointUrl),
|
|
1075
|
+
copyStep(endpointUrl, copy),
|
|
1028
1076
|
{
|
|
1029
1077
|
id: "configure",
|
|
1030
|
-
label:
|
|
1031
|
-
render: /* @__PURE__ */ __name((nav) => /* @__PURE__ */ jsx10(
|
|
1078
|
+
label: copy.flow.steps.configure,
|
|
1079
|
+
render: /* @__PURE__ */ __name((nav) => /* @__PURE__ */ jsx10(
|
|
1080
|
+
ConfigureStep,
|
|
1081
|
+
{
|
|
1082
|
+
nav,
|
|
1083
|
+
host: resolveHost(hosts, nav.data.selectedHost),
|
|
1084
|
+
copy
|
|
1085
|
+
}
|
|
1086
|
+
), "render")
|
|
1032
1087
|
},
|
|
1033
1088
|
{
|
|
1034
1089
|
id: "connect",
|
|
1035
|
-
label:
|
|
1036
|
-
render: /* @__PURE__ */ __name((nav) => /* @__PURE__ */ jsx10(
|
|
1090
|
+
label: copy.flow.steps.connect,
|
|
1091
|
+
render: /* @__PURE__ */ __name((nav) => /* @__PURE__ */ jsx10(
|
|
1092
|
+
ConnectStep,
|
|
1093
|
+
{
|
|
1094
|
+
nav,
|
|
1095
|
+
host: resolveHost(hosts, nav.data.selectedHost),
|
|
1096
|
+
connectPrompt,
|
|
1097
|
+
copy
|
|
1098
|
+
}
|
|
1099
|
+
), "render")
|
|
1037
1100
|
}
|
|
1038
1101
|
];
|
|
1039
1102
|
}
|
|
1040
1103
|
__name(manualMiddle, "manualMiddle");
|
|
1041
|
-
function simpleMiddle(hosts, connectPrompt) {
|
|
1104
|
+
function simpleMiddle(hosts, connectPrompt, copy) {
|
|
1042
1105
|
return [
|
|
1043
1106
|
{
|
|
1044
1107
|
id: "install",
|
|
1045
|
-
label:
|
|
1046
|
-
render: /* @__PURE__ */ __name((nav) => /* @__PURE__ */ jsx10(
|
|
1108
|
+
label: copy.flow.steps.install,
|
|
1109
|
+
render: /* @__PURE__ */ __name((nav) => /* @__PURE__ */ jsx10(
|
|
1110
|
+
InstallStep,
|
|
1111
|
+
{
|
|
1112
|
+
nav,
|
|
1113
|
+
host: resolveHost(hosts, nav.data.selectedHost),
|
|
1114
|
+
connectPrompt,
|
|
1115
|
+
copy
|
|
1116
|
+
}
|
|
1117
|
+
), "render")
|
|
1047
1118
|
}
|
|
1048
1119
|
];
|
|
1049
1120
|
}
|
|
1050
1121
|
__name(simpleMiddle, "simpleMiddle");
|
|
1051
1122
|
function buildFlowSteps(opts) {
|
|
1052
|
-
const { host, hosts, endpointUrl, connectPrompt, connections, onRetest } = opts;
|
|
1053
|
-
const middle = host.pluginUrl ? simpleMiddle(hosts, connectPrompt) : manualMiddle(host, hosts, endpointUrl, connectPrompt);
|
|
1123
|
+
const { host, hosts, endpointUrl, connectPrompt, connections, onRetest, copy } = opts;
|
|
1124
|
+
const middle = host.pluginUrl ? simpleMiddle(hosts, connectPrompt, copy) : manualMiddle(host, hosts, endpointUrl, connectPrompt, copy);
|
|
1054
1125
|
const confirm = {
|
|
1055
1126
|
id: "confirm",
|
|
1056
|
-
label:
|
|
1057
|
-
render: /* @__PURE__ */ __name((nav) => /* @__PURE__ */ jsx10(
|
|
1127
|
+
label: copy.flow.steps.confirm,
|
|
1128
|
+
render: /* @__PURE__ */ __name((nav) => /* @__PURE__ */ jsx10(
|
|
1129
|
+
ConfirmStep,
|
|
1130
|
+
{
|
|
1131
|
+
nav,
|
|
1132
|
+
connections,
|
|
1133
|
+
hosts,
|
|
1134
|
+
onRetest,
|
|
1135
|
+
copy
|
|
1136
|
+
}
|
|
1137
|
+
), "render")
|
|
1058
1138
|
};
|
|
1059
|
-
return [selectStep(hosts), ...middle, confirm];
|
|
1139
|
+
return [selectStep(hosts, copy), ...middle, confirm];
|
|
1060
1140
|
}
|
|
1061
1141
|
__name(buildFlowSteps, "buildFlowSteps");
|
|
1062
1142
|
|
|
@@ -1073,7 +1153,8 @@ function AiOnboardingFlow(props) {
|
|
|
1073
1153
|
connectPrompt,
|
|
1074
1154
|
onRetest,
|
|
1075
1155
|
onDisconnect,
|
|
1076
|
-
devReset
|
|
1156
|
+
devReset,
|
|
1157
|
+
copy
|
|
1077
1158
|
} = props;
|
|
1078
1159
|
const { state } = useOnboarding();
|
|
1079
1160
|
const selectedHost = hosts.find((h) => h.id === state.data.selectedHost) ?? hosts[0];
|
|
@@ -1083,33 +1164,37 @@ function AiOnboardingFlow(props) {
|
|
|
1083
1164
|
endpointUrl,
|
|
1084
1165
|
connectPrompt,
|
|
1085
1166
|
connections,
|
|
1086
|
-
onRetest
|
|
1167
|
+
onRetest,
|
|
1168
|
+
copy
|
|
1087
1169
|
});
|
|
1088
1170
|
const connectedHostId = state.data.connectedHost ?? state.data.selectedHost;
|
|
1089
1171
|
return /* @__PURE__ */ jsx11(
|
|
1090
1172
|
GuidedSection,
|
|
1091
1173
|
{
|
|
1092
1174
|
steps,
|
|
1093
|
-
title:
|
|
1094
|
-
startLabel:
|
|
1175
|
+
title: copy.onboarding.title,
|
|
1176
|
+
startLabel: copy.landing.start,
|
|
1095
1177
|
renderLanding: (start) => /* @__PURE__ */ jsx11(
|
|
1096
1178
|
AiLanding,
|
|
1097
1179
|
{
|
|
1098
1180
|
onStart: start,
|
|
1099
1181
|
permissionModel,
|
|
1100
|
-
capabilities
|
|
1182
|
+
capabilities,
|
|
1183
|
+
copy: copy.landing,
|
|
1184
|
+
capabilitiesCopy: copy.capabilities
|
|
1101
1185
|
}
|
|
1102
1186
|
),
|
|
1103
|
-
configuredTitle: connectedTitle(connections, hosts, connectedHostId),
|
|
1104
|
-
configuredSummary: connectedSummary(connections),
|
|
1105
|
-
editLabel:
|
|
1187
|
+
configuredTitle: connectedTitle(connections, hosts, connectedHostId, copy.summary),
|
|
1188
|
+
configuredSummary: connectedSummary(connections, copy.summary),
|
|
1189
|
+
editLabel: copy.onboarding.editLabel,
|
|
1106
1190
|
completedContent: (nav) => /* @__PURE__ */ jsx11(
|
|
1107
1191
|
StatusBoard,
|
|
1108
1192
|
{
|
|
1109
1193
|
nav,
|
|
1110
1194
|
connections,
|
|
1111
1195
|
hosts,
|
|
1112
|
-
onDisconnect
|
|
1196
|
+
onDisconnect,
|
|
1197
|
+
copy
|
|
1113
1198
|
}
|
|
1114
1199
|
),
|
|
1115
1200
|
devReset,
|
|
@@ -1125,15 +1210,15 @@ function AiIntegrationOnboarding({
|
|
|
1125
1210
|
connections,
|
|
1126
1211
|
featureKey = DEFAULT_FEATURE_KEY,
|
|
1127
1212
|
devReset = false,
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
permissionModel = AI_PERMISSION_MODEL,
|
|
1213
|
+
hosts,
|
|
1214
|
+
capabilities,
|
|
1215
|
+
permissionModel,
|
|
1132
1216
|
connectPrompt,
|
|
1133
1217
|
onRetest = /* @__PURE__ */ __name(() => {
|
|
1134
1218
|
if (typeof window !== "undefined") window.location.reload();
|
|
1135
1219
|
}, "onRetest"),
|
|
1136
|
-
onDisconnect
|
|
1220
|
+
onDisconnect,
|
|
1221
|
+
copy
|
|
1137
1222
|
}) {
|
|
1138
1223
|
return /* @__PURE__ */ jsx11(
|
|
1139
1224
|
OnboardingProvider,
|
|
@@ -1152,16 +1237,107 @@ function AiIntegrationOnboarding({
|
|
|
1152
1237
|
connectPrompt,
|
|
1153
1238
|
onRetest,
|
|
1154
1239
|
onDisconnect,
|
|
1155
|
-
devReset
|
|
1240
|
+
devReset,
|
|
1241
|
+
copy
|
|
1156
1242
|
}
|
|
1157
1243
|
)
|
|
1158
1244
|
}
|
|
1159
1245
|
);
|
|
1160
1246
|
}
|
|
1161
1247
|
__name(AiIntegrationOnboarding, "AiIntegrationOnboarding");
|
|
1248
|
+
|
|
1249
|
+
// src/react/pt-BR.ts
|
|
1250
|
+
var PT_BR_MCP_AI_COPY = {
|
|
1251
|
+
capabilities: {
|
|
1252
|
+
heading: "O que o assistente faz por voc\xEA",
|
|
1253
|
+
subheading: "Sem planilhas, sem cliques \u2014 \xE9 s\xF3 perguntar na conversa."
|
|
1254
|
+
},
|
|
1255
|
+
landing: {
|
|
1256
|
+
eyebrow: "Integra\xE7\xE3o com IA",
|
|
1257
|
+
titleTail: "\xE0 sua loja",
|
|
1258
|
+
lede: "Deixe o Claude, o ChatGPT e outros assistentes responderem sobre o seu card\xE1pio, estoque e pedidos \u2014 e executarem a\xE7\xF5es por voc\xEA, direto na conversa. Com seguran\xE7a e sem instalar nada.",
|
|
1259
|
+
trust: [
|
|
1260
|
+
{
|
|
1261
|
+
id: "login",
|
|
1262
|
+
label: "Usa o seu pr\xF3prio login",
|
|
1263
|
+
caption: "Sem chaves ou credenciais extras"
|
|
1264
|
+
},
|
|
1265
|
+
{ id: "install", label: "Sem instalar nada", caption: "Conecta em poucos minutos" },
|
|
1266
|
+
{
|
|
1267
|
+
id: "permissions",
|
|
1268
|
+
label: "S\xF3 o que voc\xEA pode",
|
|
1269
|
+
caption: "As suas permiss\xF5es, nada al\xE9m"
|
|
1270
|
+
},
|
|
1271
|
+
{ id: "surface", label: "Navegador ou app", caption: "Claude, ChatGPT, Codex" }
|
|
1272
|
+
],
|
|
1273
|
+
start: "Come\xE7ar"
|
|
1274
|
+
},
|
|
1275
|
+
flow: {
|
|
1276
|
+
steps: {
|
|
1277
|
+
select: "Escolher",
|
|
1278
|
+
copyUrl: "Copiar URL",
|
|
1279
|
+
configure: "Configurar",
|
|
1280
|
+
connect: "Conectar",
|
|
1281
|
+
install: "Instalar",
|
|
1282
|
+
confirm: "Confirmar"
|
|
1283
|
+
},
|
|
1284
|
+
back: "Voltar",
|
|
1285
|
+
next: "Pr\xF3ximo",
|
|
1286
|
+
advance: "Continuar",
|
|
1287
|
+
finish: "Concluir",
|
|
1288
|
+
copyUrl: "Copiar URL",
|
|
1289
|
+
copied: "Copiado",
|
|
1290
|
+
copyMessage: "Copiar mensagem",
|
|
1291
|
+
copyUrlTitle: "Copie a URL da sua loja",
|
|
1292
|
+
urlCaption: "\xC9 o \xFAnico dado que voc\xEA cola no assistente \u2014 ao copiar, seguimos para o pr\xF3ximo passo.",
|
|
1293
|
+
promptCaption: "Assim ele se conecta, se identifica (Claude, ChatGPT\u2026) e registramos a conex\xE3o.",
|
|
1294
|
+
askTitle: "Pe\xE7a ao assistente para conectar",
|
|
1295
|
+
installBody: "Abra o plugin da sua loja, clique em Instalar e autorize o acesso \u2014 sem copiar URL nem gerar credenciais.",
|
|
1296
|
+
installAction: "Instalar o plugin da loja",
|
|
1297
|
+
pasteTitle: "Cole esta mensagem no assistente",
|
|
1298
|
+
pasteInstallCaption: "Cole no assistente para ele se conectar, se identificar e confirmar o acesso.",
|
|
1299
|
+
connectedTo: /* @__PURE__ */ __name((hostLabel2) => `${hostLabel2} est\xE1 conectado \xE0 sua loja.`, "connectedTo"),
|
|
1300
|
+
waitingTitle: "Esperando conex\xE3o",
|
|
1301
|
+
waitingBody: /* @__PURE__ */ __name((hostLabel2) => `Assim que voc\xEA autorizar o acesso no ${hostLabel2}, ela aparece aqui automaticamente.`, "waitingBody"),
|
|
1302
|
+
testNow: "Testar agora"
|
|
1303
|
+
},
|
|
1304
|
+
statusBoard: {
|
|
1305
|
+
instructions: "Instru\xE7\xF5es",
|
|
1306
|
+
connected: "Conectado",
|
|
1307
|
+
notConnected: "Ainda n\xE3o conectado",
|
|
1308
|
+
connect: "Conectar",
|
|
1309
|
+
disconnect: "Desconectar",
|
|
1310
|
+
disconnectTitle: "Desconectar o assistente?",
|
|
1311
|
+
disconnectBody: "Ele perde o acesso \xE0 sua loja na hora. Para voltar a usar, ser\xE1 preciso conectar de novo.",
|
|
1312
|
+
disconnectConfirm: "Desconectar",
|
|
1313
|
+
boardTitle: "Assistentes conectados",
|
|
1314
|
+
boardCaption: "Em verde os que j\xE1 operam a sua loja; em vermelho os que faltam conectar."
|
|
1315
|
+
},
|
|
1316
|
+
summary: {
|
|
1317
|
+
activeNow: "ativo agora",
|
|
1318
|
+
activeMinutes: /* @__PURE__ */ __name((minutes) => `ativo h\xE1 ${minutes} min`, "activeMinutes"),
|
|
1319
|
+
activeHours: /* @__PURE__ */ __name((hours) => `ativo h\xE1 ${hours} h`, "activeHours"),
|
|
1320
|
+
activeDays: /* @__PURE__ */ __name((days) => `ativo h\xE1 ${days} dias`, "activeDays"),
|
|
1321
|
+
configured: "Integra\xE7\xE3o configurada",
|
|
1322
|
+
connectedSuffix: "Conectado",
|
|
1323
|
+
connectedSeveral: /* @__PURE__ */ __name((names) => `${names} conectados`, "connectedSeveral"),
|
|
1324
|
+
connectedGeneric: "IA conectada"
|
|
1325
|
+
},
|
|
1326
|
+
hostSelect: {
|
|
1327
|
+
caption: "Selecione onde voc\xEA usa a IA \u2014 o passo a passo \xE9 feito sob medida para ele."
|
|
1328
|
+
},
|
|
1329
|
+
connectGuide: {
|
|
1330
|
+
urlLabel: "URL do servidor da sua loja",
|
|
1331
|
+
urlHint: "Copie esta URL e cole no seu assistente para conect\xE1-lo \xE0 loja.",
|
|
1332
|
+
moreInfo: "Para mais informa\xE7\xF5es, consulte a",
|
|
1333
|
+
connectOn: /* @__PURE__ */ __name((hostLabel2) => `Conectar no ${hostLabel2}`, "connectOn")
|
|
1334
|
+
},
|
|
1335
|
+
onboarding: {
|
|
1336
|
+
title: "Conecte assistentes de IA \xE0 sua loja",
|
|
1337
|
+
editLabel: "Conectar IA"
|
|
1338
|
+
}
|
|
1339
|
+
};
|
|
1162
1340
|
export {
|
|
1163
|
-
AI_CAPABILITIES,
|
|
1164
|
-
AI_PERMISSION_MODEL,
|
|
1165
1341
|
AiCapabilities,
|
|
1166
1342
|
AiIntegrationOnboarding,
|
|
1167
1343
|
AiLanding,
|
|
@@ -1175,9 +1351,13 @@ export {
|
|
|
1175
1351
|
HostSelectStep,
|
|
1176
1352
|
HostStepList,
|
|
1177
1353
|
McpEndpointUrl,
|
|
1354
|
+
PT_BR_AI_CAPABILITIES,
|
|
1355
|
+
PT_BR_AI_CONNECT_PROMPT,
|
|
1356
|
+
PT_BR_AI_HOST_GUIDES,
|
|
1357
|
+
PT_BR_AI_PERMISSION_MODEL,
|
|
1358
|
+
PT_BR_MCP_AI_COPY,
|
|
1178
1359
|
PromptCopyBlock,
|
|
1179
1360
|
aiConnectPrompt,
|
|
1180
|
-
aiHostGuides,
|
|
1181
1361
|
providerForHostId
|
|
1182
1362
|
};
|
|
1183
1363
|
//# sourceMappingURL=index.js.map
|