domain0 0.3.0 → 0.3.2
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/dist/contracts.cjs +2 -2
- package/dist/contracts.cjs.map +1 -1
- package/dist/contracts.mjs +2 -2
- package/dist/contracts.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{sdk-BGxexkQy.cjs → sdk-DILJWt1m.cjs} +150 -20
- package/dist/sdk-DILJWt1m.cjs.map +1 -0
- package/dist/{sdk-BUD9fOZT.mjs → sdk-IuBNH4cL.mjs} +150 -20
- package/dist/sdk-IuBNH4cL.mjs.map +1 -0
- package/dist/ui.cjs +1 -1
- package/dist/ui.mjs +1 -1
- package/package.json +1 -1
- package/dist/sdk-BGxexkQy.cjs.map +0 -1
- package/dist/sdk-BUD9fOZT.mjs.map +0 -1
|
@@ -447,13 +447,13 @@ const domain0Styles = `
|
|
|
447
447
|
padding: 0;
|
|
448
448
|
background: var(--domain0-bg);
|
|
449
449
|
color: var(--domain0-text);
|
|
450
|
-
box-shadow: 0
|
|
450
|
+
box-shadow: 0 2rem 6rem -2.75rem rgb(28 24 92 / 0.32);
|
|
451
451
|
overflow: auto;
|
|
452
452
|
}
|
|
453
453
|
|
|
454
454
|
.domain0-dialog::backdrop {
|
|
455
455
|
background: var(--domain0-backdrop);
|
|
456
|
-
backdrop-filter: blur(0.
|
|
456
|
+
backdrop-filter: blur(0.75rem);
|
|
457
457
|
}
|
|
458
458
|
|
|
459
459
|
.domain0-dialog--inline {
|
|
@@ -466,19 +466,37 @@ const domain0Styles = `
|
|
|
466
466
|
}
|
|
467
467
|
|
|
468
468
|
.domain0-panel {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
min-height:
|
|
472
|
-
|
|
473
|
-
|
|
469
|
+
position: relative;
|
|
470
|
+
display: flex;
|
|
471
|
+
min-height: min(43.25rem, calc(100dvh - 2rem));
|
|
472
|
+
flex-direction: column;
|
|
473
|
+
align-items: center;
|
|
474
|
+
padding: clamp(1.5rem, 5vw, 2.5rem);
|
|
474
475
|
min-width: 0;
|
|
475
476
|
}
|
|
476
477
|
|
|
478
|
+
.domain0-brand-mark {
|
|
479
|
+
display: inline-flex;
|
|
480
|
+
width: 3.25rem;
|
|
481
|
+
height: 3.25rem;
|
|
482
|
+
flex: 0 0 auto;
|
|
483
|
+
margin-top: 2.5rem;
|
|
484
|
+
color: var(--domain0-text);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.domain0-brand-mark svg { width: 100%; height: 100%; }
|
|
488
|
+
.domain0-panel:has(.domain0-provider-chip) > .domain0-brand-mark { display: none; }
|
|
489
|
+
|
|
477
490
|
.domain0-company-identity {
|
|
478
491
|
display: flex;
|
|
479
492
|
align-items: center;
|
|
480
|
-
gap: 0.
|
|
493
|
+
gap: 0.625rem;
|
|
481
494
|
min-width: 0;
|
|
495
|
+
min-height: 2.5rem;
|
|
496
|
+
margin-top: 1.25rem;
|
|
497
|
+
border: 0.0625rem solid var(--domain0-hairline);
|
|
498
|
+
border-radius: 999px;
|
|
499
|
+
padding: 0.35rem 0.85rem 0.35rem 0.4rem;
|
|
482
500
|
justify-content: center;
|
|
483
501
|
}
|
|
484
502
|
|
|
@@ -498,10 +516,18 @@ const domain0Styles = `
|
|
|
498
516
|
min-width: 0;
|
|
499
517
|
margin: 0;
|
|
500
518
|
overflow-wrap: anywhere;
|
|
519
|
+
font-size: 0.875rem;
|
|
501
520
|
font-weight: var(--domain0-bold-font-weight);
|
|
502
521
|
}
|
|
503
522
|
|
|
504
|
-
.domain0-content {
|
|
523
|
+
.domain0-content {
|
|
524
|
+
display: grid;
|
|
525
|
+
width: 100%;
|
|
526
|
+
max-width: 33.75rem;
|
|
527
|
+
min-width: 0;
|
|
528
|
+
gap: 0.875rem;
|
|
529
|
+
margin-top: 1.75rem;
|
|
530
|
+
}
|
|
505
531
|
|
|
506
532
|
.domain0-heading, .domain0-subheading, .domain0-copy, .domain0-status, .domain0-error, .domain0-list {
|
|
507
533
|
margin: 0;
|
|
@@ -509,7 +535,9 @@ const domain0Styles = `
|
|
|
509
535
|
}
|
|
510
536
|
|
|
511
537
|
.domain0-heading {
|
|
512
|
-
|
|
538
|
+
max-width: 34rem;
|
|
539
|
+
margin-top: 0.75rem;
|
|
540
|
+
font-size: clamp(1.75rem, 5vw, 2.125rem);
|
|
513
541
|
line-height: 1.18;
|
|
514
542
|
letter-spacing: -0.03em;
|
|
515
543
|
font-weight: var(--domain0-bold-font-weight);
|
|
@@ -517,6 +545,7 @@ const domain0Styles = `
|
|
|
517
545
|
}
|
|
518
546
|
.domain0-subheading { font-size: 1rem; line-height: 1.35; }
|
|
519
547
|
.domain0-copy {
|
|
548
|
+
max-width: 29.375rem;
|
|
520
549
|
color: var(--domain0-muted);
|
|
521
550
|
font-size: 1.0625rem;
|
|
522
551
|
line-height: 1.65;
|
|
@@ -526,6 +555,8 @@ const domain0Styles = `
|
|
|
526
555
|
full sentence, so it keeps normal casing and tracking. Uppercase at 0.16em is
|
|
527
556
|
for short eyebrow labels, not something you have to read. */
|
|
528
557
|
.domain0-status {
|
|
558
|
+
max-width: 29.375rem;
|
|
559
|
+
margin-top: 0.75rem;
|
|
529
560
|
color: var(--domain0-muted);
|
|
530
561
|
font-family: var(--domain0-mono-font-family);
|
|
531
562
|
font-size: 0.8125rem;
|
|
@@ -534,7 +565,22 @@ const domain0Styles = `
|
|
|
534
565
|
.domain0-panel > .domain0-copy,
|
|
535
566
|
.domain0-panel > .domain0-status,
|
|
536
567
|
.domain0-panel > .domain0-error { text-align: center; }
|
|
537
|
-
.domain0-
|
|
568
|
+
.domain0-panel > .domain0-copy { margin-top: 0.75rem; }
|
|
569
|
+
.domain0-error {
|
|
570
|
+
width: 100%;
|
|
571
|
+
max-width: 33.75rem;
|
|
572
|
+
margin-top: 1rem;
|
|
573
|
+
border: 0.0625rem solid color-mix(in srgb, var(--domain0-danger) 28%, transparent);
|
|
574
|
+
border-radius: var(--domain0-input-radius);
|
|
575
|
+
padding: 0.875rem 1rem;
|
|
576
|
+
background: color-mix(in srgb, var(--domain0-danger) 8%, var(--domain0-bg));
|
|
577
|
+
color: var(--domain0-danger);
|
|
578
|
+
font-size: 0.875rem;
|
|
579
|
+
font-weight: var(--domain0-bold-font-weight);
|
|
580
|
+
line-height: 1.5;
|
|
581
|
+
}
|
|
582
|
+
.domain0-error:empty { display: none; }
|
|
583
|
+
.domain0-error-retry { margin-inline: auto; }
|
|
538
584
|
|
|
539
585
|
.domain0-form { display: grid; gap: 0.875rem; }
|
|
540
586
|
.domain0-label { font-weight: var(--domain0-bold-font-weight); }
|
|
@@ -622,8 +668,10 @@ const domain0Styles = `
|
|
|
622
668
|
gap: 0.5rem;
|
|
623
669
|
border: 0.0625rem solid color-mix(in srgb, var(--domain0-primary) 15%, transparent);
|
|
624
670
|
border-radius: 999px;
|
|
625
|
-
|
|
626
|
-
|
|
671
|
+
min-height: 3.125rem;
|
|
672
|
+
margin-top: 3.375rem;
|
|
673
|
+
padding: 0.55rem 1.125rem 0.55rem 0.55rem;
|
|
674
|
+
background: var(--domain0-bg);
|
|
627
675
|
font-size: 0.875rem;
|
|
628
676
|
font-weight: var(--domain0-bold-font-weight);
|
|
629
677
|
box-shadow: 0 0.25rem 1rem -0.75rem rgb(0 0 0 / 0.35);
|
|
@@ -642,15 +690,56 @@ const domain0Styles = `
|
|
|
642
690
|
|
|
643
691
|
.domain0-actions {
|
|
644
692
|
display: flex;
|
|
693
|
+
width: 100%;
|
|
694
|
+
max-width: 33.75rem;
|
|
645
695
|
flex-wrap: wrap;
|
|
646
696
|
justify-content: flex-end;
|
|
647
697
|
gap: 0.75rem;
|
|
698
|
+
margin-top: 1.25rem;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
.domain0-panel > .domain0-actions > .domain0-button--secondary:last-child:not(.domain0-button--completion) {
|
|
702
|
+
position: absolute;
|
|
703
|
+
top: 1.75rem;
|
|
704
|
+
right: 1.75rem;
|
|
705
|
+
width: 2.25rem;
|
|
706
|
+
min-height: 2.25rem;
|
|
707
|
+
border: 0;
|
|
708
|
+
padding: 0;
|
|
709
|
+
background: color-mix(in srgb, var(--domain0-text) 6%, var(--domain0-bg));
|
|
710
|
+
color: transparent;
|
|
711
|
+
font-size: 0;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
.domain0-panel > .domain0-actions > .domain0-button--secondary:last-child:not(.domain0-button--completion)::before,
|
|
715
|
+
.domain0-panel > .domain0-actions > .domain0-button--secondary:last-child:not(.domain0-button--completion)::after {
|
|
716
|
+
position: absolute;
|
|
717
|
+
width: 0.875rem;
|
|
718
|
+
height: 0.1rem;
|
|
719
|
+
border-radius: 999px;
|
|
720
|
+
background: var(--domain0-text);
|
|
721
|
+
content: '';
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
.domain0-panel > .domain0-actions > .domain0-button--secondary:last-child:not(.domain0-button--completion)::before {
|
|
725
|
+
transform: rotate(45deg);
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
.domain0-panel > .domain0-actions > .domain0-button--secondary:last-child:not(.domain0-button--completion)::after {
|
|
729
|
+
transform: rotate(-45deg);
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
.domain0-button--completion {
|
|
733
|
+
width: 100%;
|
|
734
|
+
border-color: var(--domain0-primary);
|
|
735
|
+
background: var(--domain0-primary);
|
|
736
|
+
color: var(--domain0-primary-text);
|
|
648
737
|
}
|
|
649
738
|
|
|
650
739
|
/* The machine state as a short label above the heading: the same eyebrow role
|
|
651
740
|
the mono labels play across the brand. connectionState() keeps it short. */
|
|
652
741
|
.domain0-eyebrow {
|
|
653
|
-
margin: 0;
|
|
742
|
+
margin: 1.75rem 0 0;
|
|
654
743
|
color: var(--domain0-muted);
|
|
655
744
|
font-family: var(--domain0-mono-font-family);
|
|
656
745
|
font-size: 0.6875rem;
|
|
@@ -674,21 +763,42 @@ const domain0Styles = `
|
|
|
674
763
|
display: flex;
|
|
675
764
|
align-items: center;
|
|
676
765
|
justify-content: center;
|
|
677
|
-
gap: 0;
|
|
678
|
-
|
|
766
|
+
gap: 0.4375rem;
|
|
767
|
+
margin-top: auto;
|
|
768
|
+
padding-top: 2rem;
|
|
679
769
|
color: var(--domain0-muted);
|
|
680
770
|
}
|
|
681
771
|
|
|
772
|
+
.domain0-footer__label {
|
|
773
|
+
font-family: var(--domain0-mono-font-family);
|
|
774
|
+
font-size: 0.6875rem;
|
|
775
|
+
font-weight: 500;
|
|
776
|
+
letter-spacing: 0.16em;
|
|
777
|
+
text-transform: uppercase;
|
|
778
|
+
}
|
|
779
|
+
|
|
682
780
|
.domain0-footer__name {
|
|
683
781
|
font-size: 0.9375rem;
|
|
684
782
|
font-weight: var(--domain0-bold-font-weight);
|
|
685
783
|
letter-spacing: -0.045em;
|
|
686
784
|
}
|
|
687
785
|
|
|
688
|
-
.domain0-footer__mark {
|
|
786
|
+
.domain0-footer__mark {
|
|
787
|
+
display: inline-flex;
|
|
788
|
+
position: relative;
|
|
789
|
+
top: 1px;
|
|
790
|
+
width: 0.75rem;
|
|
791
|
+
height: 0.75rem;
|
|
792
|
+
}
|
|
793
|
+
.domain0-footer__mark svg { width: 100%; height: 100%; }
|
|
689
794
|
|
|
690
795
|
@media (max-width: 24rem) {
|
|
691
796
|
.domain0-dialog { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); }
|
|
797
|
+
.domain0-panel {
|
|
798
|
+
min-height: calc(100dvh - 1rem);
|
|
799
|
+
padding: 1.25rem;
|
|
800
|
+
}
|
|
801
|
+
.domain0-brand-mark { margin-top: 3.5rem; }
|
|
692
802
|
.domain0-actions { align-items: stretch; flex-direction: column-reverse; }
|
|
693
803
|
.domain0-button { width: 100%; }
|
|
694
804
|
}
|
|
@@ -2340,6 +2450,7 @@ function mountDomain0Connect(options) {
|
|
|
2340
2450
|
dialog.setAttribute("aria-labelledby", headingId);
|
|
2341
2451
|
if (presentation === "inline") dialog.hidden = true;
|
|
2342
2452
|
const panel = element(document, "div", "domain0-panel");
|
|
2453
|
+
const brandMark = renderDomain0Mark(document);
|
|
2343
2454
|
const companyIdentity = renderCompanyIdentity(document, applicationName, whiteLabel);
|
|
2344
2455
|
const heading = element(document, "h2", "domain0-heading");
|
|
2345
2456
|
heading.id = headingId;
|
|
@@ -2361,15 +2472,19 @@ function mountDomain0Connect(options) {
|
|
|
2361
2472
|
const closeButton = element(document, "button", "domain0-button domain0-button--secondary");
|
|
2362
2473
|
closeButton.type = "button";
|
|
2363
2474
|
closeButton.textContent = messages.close;
|
|
2475
|
+
closeButton.setAttribute("aria-label", messages.close);
|
|
2364
2476
|
closeButton.hidden = presentation === "inline";
|
|
2365
2477
|
actions.append(cancelButton, closeButton);
|
|
2478
|
+
panel.append(brandMark);
|
|
2366
2479
|
if (companyIdentity !== void 0) panel.append(companyIdentity);
|
|
2367
2480
|
const footer = element(document, "div", "domain0-footer");
|
|
2368
2481
|
footer.setAttribute("aria-hidden", "true");
|
|
2369
|
-
|
|
2482
|
+
const footerLabel = element(document, "span", "domain0-footer__label");
|
|
2483
|
+
footerLabel.textContent = "Secured by";
|
|
2370
2484
|
const footerName = element(document, "span", "domain0-footer__name");
|
|
2371
2485
|
footerName.textContent = "domain";
|
|
2372
|
-
|
|
2486
|
+
const footerMark = renderDomain0Mark(document, "domain0-footer__mark");
|
|
2487
|
+
footer.append(footerLabel, footerName, footerMark);
|
|
2373
2488
|
panel.append(eyebrow, heading, explanation, status, error, content, actions, footer);
|
|
2374
2489
|
dialog.append(panel);
|
|
2375
2490
|
root.append(style, trigger, dialog);
|
|
@@ -2610,7 +2725,9 @@ function mountDomain0Connect(options) {
|
|
|
2610
2725
|
eyebrow.textContent = connection === void 0 ? "" : localizer.connectionState(connection.state);
|
|
2611
2726
|
content.replaceChildren();
|
|
2612
2727
|
heading.textContent = messages.headingConnectDomain;
|
|
2728
|
+
closeButton.classList.remove("domain0-button--completion");
|
|
2613
2729
|
closeButton.textContent = messages.close;
|
|
2730
|
+
closeButton.setAttribute("aria-label", messages.close);
|
|
2614
2731
|
if (connection === void 0) {
|
|
2615
2732
|
cancelButton.hidden = true;
|
|
2616
2733
|
return;
|
|
@@ -2636,6 +2753,8 @@ function mountDomain0Connect(options) {
|
|
|
2636
2753
|
heading.textContent = interpolateWhiteLabelCopy(localizedCopy(whiteLabel.copy.successTitle, localizer.locale) ?? messages.headingConnectDomain, { "{DOMAIN}": connection.intent.domain });
|
|
2637
2754
|
message.textContent = interpolateWhiteLabelCopy(localizedCopy(whiteLabel.copy.successDescription, localizer.locale) ?? messages.successDescription("{DOMAIN}"), { "{DOMAIN}": connection.intent.domain });
|
|
2638
2755
|
closeButton.textContent = localizedCopy(whiteLabel.copy.successButton, localizer.locale) ?? messages.close;
|
|
2756
|
+
closeButton.setAttribute("aria-label", closeButton.textContent);
|
|
2757
|
+
closeButton.classList.add("domain0-button--completion");
|
|
2639
2758
|
content.append(message);
|
|
2640
2759
|
renderDkimGuidance(connection);
|
|
2641
2760
|
emitRenderedConnection(connection, "active");
|
|
@@ -3532,6 +3651,11 @@ function mountDomain0Connect(options) {
|
|
|
3532
3651
|
const message = cause instanceof Domain0Error ? localizer.apiError(cause.response.error.code) : cause instanceof Domain0TransportError ? messages.transportError : cause instanceof Domain0ProtocolError ? messages.protocolError : cause instanceof Error ? cause.message : messages.unknownError;
|
|
3533
3652
|
error.textContent = messages.errorPrefix(message);
|
|
3534
3653
|
status.textContent = "";
|
|
3654
|
+
if (connection === void 0) {
|
|
3655
|
+
const retry = actionButton(messages.refreshConnection, async () => open());
|
|
3656
|
+
retry.classList.add("domain0-error-retry");
|
|
3657
|
+
content.replaceChildren(retry);
|
|
3658
|
+
}
|
|
3535
3659
|
}
|
|
3536
3660
|
function clearError() {
|
|
3537
3661
|
error.textContent = "";
|
|
@@ -3552,6 +3676,12 @@ function mountDomain0Connect(options) {
|
|
|
3552
3676
|
}
|
|
3553
3677
|
};
|
|
3554
3678
|
}
|
|
3679
|
+
function renderDomain0Mark(document, className = "domain0-brand-mark") {
|
|
3680
|
+
const mark = element(document, "span", className);
|
|
3681
|
+
mark.setAttribute("aria-hidden", "true");
|
|
3682
|
+
mark.innerHTML = "<svg viewBox=\"0 0 100 100\" fill=\"none\"><path d=\"M66.34 17.92A36 36 0 0 0 17.92 66.34\" stroke=\"currentColor\" stroke-width=\"15\"/><path d=\"M33.66 82.08A36 36 0 0 0 82.08 33.66\" stroke=\"currentColor\" stroke-width=\"15\"/><path d=\"M16.77 83.23 83.23 16.77\" stroke=\"currentColor\" stroke-width=\"12\"/></svg>";
|
|
3683
|
+
return mark;
|
|
3684
|
+
}
|
|
3555
3685
|
function renderCompanyIdentity(document, applicationName, whiteLabel) {
|
|
3556
3686
|
const logoUrl = whiteLabel.logo;
|
|
3557
3687
|
const showLogo = logoUrl !== void 0 && !whiteLabel.hideCompanyLogo;
|
|
@@ -4054,4 +4184,4 @@ const domain0 = createDomain0();
|
|
|
4054
4184
|
//#endregion
|
|
4055
4185
|
export { mountDomain0Connect as a, localizedCopy as c, createDomain0Client as d, createSharedFlowUrl as f, mountDomain0ConnectionFlow as i, applyWhiteLabel as l, domain0 as n, createDomain0Localizer as o, loadSharedFlow as p, mountDomain0SharedFlow as r, domain0TranslatedLocales as s, createDomain0 as t, interpolateWhiteLabelCopy as u };
|
|
4056
4186
|
|
|
4057
|
-
//# sourceMappingURL=sdk-
|
|
4187
|
+
//# sourceMappingURL=sdk-IuBNH4cL.mjs.map
|