@bstage-sdk/bridge 0.14.2 → 0.15.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/README.md +35 -2
- package/dist/{chunk-5OWBSJ6E.js → chunk-QMYFZ7I6.js} +577 -3
- package/dist/frame.d.cts +1 -1
- package/dist/frame.d.ts +1 -1
- package/dist/host.cjs +1110 -141
- package/dist/host.d.cts +83 -4
- package/dist/host.d.ts +83 -4
- package/dist/host.js +531 -136
- package/dist/index.cjs +581 -3
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -1
- package/dist/{messages-Cdjpvu2S.d.cts → messages-_p1yCNj9.d.cts} +91 -4
- package/dist/{messages-Cdjpvu2S.d.ts → messages-_p1yCNj9.d.ts} +91 -4
- package/package.json +3 -2
|
@@ -35,7 +35,9 @@ var BRIDGE_ERROR_CODES = [
|
|
|
35
35
|
"BAD_REQUEST",
|
|
36
36
|
"TIMEOUT",
|
|
37
37
|
"NETWORK_ERROR",
|
|
38
|
-
"UNSUPPORTED"
|
|
38
|
+
"UNSUPPORTED",
|
|
39
|
+
// 권한(capability) 없는 배치의 계정 요청, 또는 결속 조건을 벗어난 세션 요청.
|
|
40
|
+
"NOT_ALLOWED"
|
|
39
41
|
];
|
|
40
42
|
var BridgeError = class extends Error {
|
|
41
43
|
constructor(code, message) {
|
|
@@ -63,7 +65,9 @@ var REQUEST_TYPES = [
|
|
|
63
65
|
"track",
|
|
64
66
|
"storage",
|
|
65
67
|
"log",
|
|
66
|
-
"report"
|
|
68
|
+
"report",
|
|
69
|
+
"session",
|
|
70
|
+
"otp"
|
|
67
71
|
];
|
|
68
72
|
var HOST_EVENT_TYPES = ["slot.context", "locale", "member", "theme", "visibility"];
|
|
69
73
|
var READY_EVENT = "ready";
|
|
@@ -73,6 +77,15 @@ var BRIDGE_SURFACES = ["page", "slot"];
|
|
|
73
77
|
function isBridgeSurface(value) {
|
|
74
78
|
return BRIDGE_SURFACES.includes(value);
|
|
75
79
|
}
|
|
80
|
+
var ACCOUNT_SESSION_CAPABILITY = "account-session";
|
|
81
|
+
var KNOWN_CAPABILITIES = [ACCOUNT_SESSION_CAPABILITY];
|
|
82
|
+
var SESSION_OPS = ["signup", "signupSocial", "loginAfterSignup", "phoneReverify"];
|
|
83
|
+
var OTP_OPS = [
|
|
84
|
+
"sendSignup",
|
|
85
|
+
"sendPhoneChange",
|
|
86
|
+
"verifySignup",
|
|
87
|
+
"verifyPhoneChange"
|
|
88
|
+
];
|
|
76
89
|
var TEMPLATE_REPORT_KINDS = ["error", "rejection", "load"];
|
|
77
90
|
var REPORT_MESSAGE_MAX_LENGTH = 300;
|
|
78
91
|
var REPORT_MAX_FRAMES = 10;
|
|
@@ -465,7 +478,550 @@ function toScriptLiteral(value) {
|
|
|
465
478
|
return JSON.stringify(value).replace(/</g, "\\u003c").replace(/>/g, "\\u003e").replace(/&/g, "\\u0026").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
466
479
|
}
|
|
467
480
|
|
|
481
|
+
// ../design/dist/user/index.js
|
|
482
|
+
var modeColors = {
|
|
483
|
+
"bg/base": {
|
|
484
|
+
"dark": "#151515",
|
|
485
|
+
"light": "#ffffff"
|
|
486
|
+
},
|
|
487
|
+
"bg/blue-grey": {
|
|
488
|
+
"dark": "#1f2023",
|
|
489
|
+
"light": "#eff1f7"
|
|
490
|
+
},
|
|
491
|
+
"bg/elevated": {
|
|
492
|
+
"dark": "#232323",
|
|
493
|
+
"light": "#ffffff"
|
|
494
|
+
},
|
|
495
|
+
"bg/grouped-strong": {
|
|
496
|
+
"dark": "#000000",
|
|
497
|
+
"light": "#f7f7f7"
|
|
498
|
+
},
|
|
499
|
+
"bg/grouped-weak": {
|
|
500
|
+
"dark": "#111111",
|
|
501
|
+
"light": "#f7f7f7"
|
|
502
|
+
},
|
|
503
|
+
"bg/grouped-weak-a": {
|
|
504
|
+
"dark": "#ffffff0f",
|
|
505
|
+
"light": "#0000000f"
|
|
506
|
+
},
|
|
507
|
+
"bg/highlight": {
|
|
508
|
+
"dark": "#2f2f2f",
|
|
509
|
+
"light": "#e6e6e6"
|
|
510
|
+
},
|
|
511
|
+
"bg/invert-weak-a": {
|
|
512
|
+
"dark": "#00000026",
|
|
513
|
+
"light": "#ffffff26"
|
|
514
|
+
},
|
|
515
|
+
"border/blue": {
|
|
516
|
+
"dark": "#0090ff",
|
|
517
|
+
"light": "#148aff"
|
|
518
|
+
},
|
|
519
|
+
"border/blue-weak-a": {
|
|
520
|
+
"dark": "#0090ff4d",
|
|
521
|
+
"light": "#148aff4d"
|
|
522
|
+
},
|
|
523
|
+
"border/default-a": {
|
|
524
|
+
"dark": "#ffffff1a",
|
|
525
|
+
"light": "#0000001a"
|
|
526
|
+
},
|
|
527
|
+
"border/divider-weaker": {
|
|
528
|
+
"dark": "#0d0d0d",
|
|
529
|
+
"light": "#f7f7f7"
|
|
530
|
+
},
|
|
531
|
+
"border/green": {
|
|
532
|
+
"dark": "#0be06f",
|
|
533
|
+
"light": "#00b84d"
|
|
534
|
+
},
|
|
535
|
+
"border/green-weak-a": {
|
|
536
|
+
"dark": "#0be06f4d",
|
|
537
|
+
"light": "#00b84d4d"
|
|
538
|
+
},
|
|
539
|
+
"border/grey": {
|
|
540
|
+
"dark": "#b3b3b3",
|
|
541
|
+
"light": "#7a7a7a"
|
|
542
|
+
},
|
|
543
|
+
"border/grey-weak-a": {
|
|
544
|
+
"dark": "#b3b3b34d",
|
|
545
|
+
"light": "#7a7a7a4d"
|
|
546
|
+
},
|
|
547
|
+
"border/invert": {
|
|
548
|
+
"dark": "#0d0d0d",
|
|
549
|
+
"light": "#ffffff"
|
|
550
|
+
},
|
|
551
|
+
"border/red": {
|
|
552
|
+
"dark": "#ff4747",
|
|
553
|
+
"light": "#ff4a40"
|
|
554
|
+
},
|
|
555
|
+
"border/red-weak-a": {
|
|
556
|
+
"dark": "#ff47474d",
|
|
557
|
+
"light": "#ff4a404d"
|
|
558
|
+
},
|
|
559
|
+
"border/strong-a": {
|
|
560
|
+
"dark": "#ffffff33",
|
|
561
|
+
"light": "#00000033"
|
|
562
|
+
},
|
|
563
|
+
"border/stronger": {
|
|
564
|
+
"dark": "#eeeeee",
|
|
565
|
+
"light": "#454545"
|
|
566
|
+
},
|
|
567
|
+
"border/weak-a": {
|
|
568
|
+
"dark": "#ffffff0a",
|
|
569
|
+
"light": "#0000000f"
|
|
570
|
+
},
|
|
571
|
+
"border/yellow": {
|
|
572
|
+
"dark": "#f5b625",
|
|
573
|
+
"light": "#f29900"
|
|
574
|
+
},
|
|
575
|
+
"border/yellow-weak-a": {
|
|
576
|
+
"dark": "#f5b6254d",
|
|
577
|
+
"light": "#f299004d"
|
|
578
|
+
},
|
|
579
|
+
"icon/blue": {
|
|
580
|
+
"dark": "#0090ff",
|
|
581
|
+
"light": "#148aff"
|
|
582
|
+
},
|
|
583
|
+
"icon/green": {
|
|
584
|
+
"dark": "#0be06f",
|
|
585
|
+
"light": "#00b84d"
|
|
586
|
+
},
|
|
587
|
+
"icon/grey": {
|
|
588
|
+
"dark": "#b3b3b3",
|
|
589
|
+
"light": "#7a7a7a"
|
|
590
|
+
},
|
|
591
|
+
"icon/invert": {
|
|
592
|
+
"dark": "#0d0d0d",
|
|
593
|
+
"light": "#ffffff"
|
|
594
|
+
},
|
|
595
|
+
"icon/primary": {
|
|
596
|
+
"dark": "#ffffff",
|
|
597
|
+
"light": "#000000"
|
|
598
|
+
},
|
|
599
|
+
"icon/quaternary-a": {
|
|
600
|
+
"dark": "#ffffff4d",
|
|
601
|
+
"light": "#0000004d"
|
|
602
|
+
},
|
|
603
|
+
"icon/red": {
|
|
604
|
+
"dark": "#ff4747",
|
|
605
|
+
"light": "#ff4a40"
|
|
606
|
+
},
|
|
607
|
+
"icon/secondary-a": {
|
|
608
|
+
"dark": "#ffffffba",
|
|
609
|
+
"light": "#000000ba"
|
|
610
|
+
},
|
|
611
|
+
"icon/tertiary-a": {
|
|
612
|
+
"dark": "#ffffff80",
|
|
613
|
+
"light": "#00000080"
|
|
614
|
+
},
|
|
615
|
+
"icon/yellow": {
|
|
616
|
+
"dark": "#f5b625",
|
|
617
|
+
"light": "#f29900"
|
|
618
|
+
},
|
|
619
|
+
"overlay/hover-a": {
|
|
620
|
+
"dark": "#ffffff14",
|
|
621
|
+
"light": "#0000001a"
|
|
622
|
+
},
|
|
623
|
+
"overlay/hover-grey-a": {
|
|
624
|
+
"dark": "#4545451a",
|
|
625
|
+
"light": "#4545451a"
|
|
626
|
+
},
|
|
627
|
+
"overlay/press-a": {
|
|
628
|
+
"dark": "#ffffff33",
|
|
629
|
+
"light": "#00000026"
|
|
630
|
+
},
|
|
631
|
+
"overlay/press-grey-a": {
|
|
632
|
+
"dark": "#45454526",
|
|
633
|
+
"light": "#45454526"
|
|
634
|
+
},
|
|
635
|
+
"service/live": {
|
|
636
|
+
"dark": "#e51a42",
|
|
637
|
+
"light": "#e2012d"
|
|
638
|
+
},
|
|
639
|
+
"service/live-weak-a": {
|
|
640
|
+
"dark": "#e51a4226",
|
|
641
|
+
"light": "#e2012d4d"
|
|
642
|
+
},
|
|
643
|
+
"service/membership": {
|
|
644
|
+
"dark": "#ffbf00",
|
|
645
|
+
"light": "#ffb010"
|
|
646
|
+
},
|
|
647
|
+
"service/membership-weak-a": {
|
|
648
|
+
"dark": "#ffbf001f",
|
|
649
|
+
"light": "#eb91001f"
|
|
650
|
+
},
|
|
651
|
+
"service/noti": {
|
|
652
|
+
"dark": "#0c198b",
|
|
653
|
+
"light": "#020f81"
|
|
654
|
+
},
|
|
655
|
+
"service/pop-bg": {
|
|
656
|
+
"dark": "linear-gradient(135deg, #3b3a2d 13.08%, #232732 87.56%)",
|
|
657
|
+
"light": "linear-gradient(135deg, #faf7de 13.08%, #e7edfd 87.56%)"
|
|
658
|
+
},
|
|
659
|
+
"surface/card": {
|
|
660
|
+
"dark": "#232323",
|
|
661
|
+
"light": "#ffffff"
|
|
662
|
+
},
|
|
663
|
+
"surface/display-bar-bottom": {
|
|
664
|
+
"dark": "#151515",
|
|
665
|
+
"light": "#fdfdfd"
|
|
666
|
+
},
|
|
667
|
+
"surface/display-bar-top": {
|
|
668
|
+
"dark": "#151515",
|
|
669
|
+
"light": "#ffffff"
|
|
670
|
+
},
|
|
671
|
+
"surface/display-lock": {
|
|
672
|
+
"dark": "#2f2f2f",
|
|
673
|
+
"light": "#bfbfbf"
|
|
674
|
+
},
|
|
675
|
+
"surface/form-blue": {
|
|
676
|
+
"dark": "#0090ff",
|
|
677
|
+
"light": "#148aff"
|
|
678
|
+
},
|
|
679
|
+
"surface/form-blue-weak-a": {
|
|
680
|
+
"dark": "#0f97ff1f",
|
|
681
|
+
"light": "#007aff26"
|
|
682
|
+
},
|
|
683
|
+
"surface/form-gradient-h": {
|
|
684
|
+
"dark": "linear-gradient(90deg, #151515 0%, #15151500 100%)",
|
|
685
|
+
"light": "linear-gradient(90deg, #ffffff 0%, #ffffff00 100%)"
|
|
686
|
+
},
|
|
687
|
+
"surface/form-green": {
|
|
688
|
+
"dark": "#00cc5f",
|
|
689
|
+
"light": "#00bf59"
|
|
690
|
+
},
|
|
691
|
+
"surface/form-green-weak-a": {
|
|
692
|
+
"dark": "#0be06f14",
|
|
693
|
+
"light": "#00b84d26"
|
|
694
|
+
},
|
|
695
|
+
"surface/form-grey": {
|
|
696
|
+
"dark": "#7a7a7a",
|
|
697
|
+
"light": "#999999"
|
|
698
|
+
},
|
|
699
|
+
"surface/form-grey-weak-a": {
|
|
700
|
+
"dark": "#b3b3b314",
|
|
701
|
+
"light": "#6666661f"
|
|
702
|
+
},
|
|
703
|
+
"surface/form-inverted": {
|
|
704
|
+
"dark": "#f7f7f7",
|
|
705
|
+
"light": "#151515"
|
|
706
|
+
},
|
|
707
|
+
"surface/form-inverted-deep": {
|
|
708
|
+
"dark": "#ffffff",
|
|
709
|
+
"light": "#000000"
|
|
710
|
+
},
|
|
711
|
+
"surface/form-primary-a": {
|
|
712
|
+
"dark": "#ffffff0f",
|
|
713
|
+
"light": "#0000000f"
|
|
714
|
+
},
|
|
715
|
+
"surface/form-red": {
|
|
716
|
+
"dark": "#ff4747",
|
|
717
|
+
"light": "#ff4a40"
|
|
718
|
+
},
|
|
719
|
+
"surface/form-red-weak-a": {
|
|
720
|
+
"dark": "#ff47471f",
|
|
721
|
+
"light": "#ff4a4026"
|
|
722
|
+
},
|
|
723
|
+
"surface/form-secondary-a": {
|
|
724
|
+
"dark": "#ffffff0a",
|
|
725
|
+
"light": "#0000000a"
|
|
726
|
+
},
|
|
727
|
+
"surface/form-yellow": {
|
|
728
|
+
"dark": "#f5b625",
|
|
729
|
+
"light": "#f29900"
|
|
730
|
+
},
|
|
731
|
+
"surface/form-yellow-weak-a": {
|
|
732
|
+
"dark": "#f5b62514",
|
|
733
|
+
"light": "#f299001f"
|
|
734
|
+
},
|
|
735
|
+
"text/blue": {
|
|
736
|
+
"dark": "#0090ff",
|
|
737
|
+
"light": "#148aff"
|
|
738
|
+
},
|
|
739
|
+
"text/green": {
|
|
740
|
+
"dark": "#0be06f",
|
|
741
|
+
"light": "#00b84d"
|
|
742
|
+
},
|
|
743
|
+
"text/grey": {
|
|
744
|
+
"dark": "#b3b3b3",
|
|
745
|
+
"light": "#666666"
|
|
746
|
+
},
|
|
747
|
+
"text/invert-a": {
|
|
748
|
+
"dark": "#000000ed",
|
|
749
|
+
"light": "#ffffffed"
|
|
750
|
+
},
|
|
751
|
+
"text/primary": {
|
|
752
|
+
"dark": "#eeeeee",
|
|
753
|
+
"light": "#151515"
|
|
754
|
+
},
|
|
755
|
+
"text/primary-a": {
|
|
756
|
+
"dark": "#ffffffed",
|
|
757
|
+
"light": "#000000ed"
|
|
758
|
+
},
|
|
759
|
+
"text/quaternary": {
|
|
760
|
+
"dark": "#777777",
|
|
761
|
+
"light": "#999999"
|
|
762
|
+
},
|
|
763
|
+
"text/quaternary-a": {
|
|
764
|
+
"dark": "#ffffff80",
|
|
765
|
+
"light": "#00000080"
|
|
766
|
+
},
|
|
767
|
+
"text/red": {
|
|
768
|
+
"dark": "#ff4747",
|
|
769
|
+
"light": "#ff4a40"
|
|
770
|
+
},
|
|
771
|
+
"text/secondary": {
|
|
772
|
+
"dark": "#bababa",
|
|
773
|
+
"light": "#454545"
|
|
774
|
+
},
|
|
775
|
+
"text/secondary-a": {
|
|
776
|
+
"dark": "#ffffffba",
|
|
777
|
+
"light": "#000000ba"
|
|
778
|
+
},
|
|
779
|
+
"text/tertiary": {
|
|
780
|
+
"dark": "#999999",
|
|
781
|
+
"light": "#666666"
|
|
782
|
+
},
|
|
783
|
+
"text/tertiary-a": {
|
|
784
|
+
"dark": "#ffffff99",
|
|
785
|
+
"light": "#00000099"
|
|
786
|
+
},
|
|
787
|
+
"text/yellow": {
|
|
788
|
+
"dark": "#f5b625",
|
|
789
|
+
"light": "#f29900"
|
|
790
|
+
}
|
|
791
|
+
};
|
|
792
|
+
var flatColors = {
|
|
793
|
+
"always/avatar-bg01": "#aa47bc",
|
|
794
|
+
"always/avatar-bg02": "#7a1fa2",
|
|
795
|
+
"always/avatar-bg03": "#7e57c2",
|
|
796
|
+
"always/avatar-bg04": "#512da7",
|
|
797
|
+
"always/avatar-bg05": "#5c6bc0",
|
|
798
|
+
"always/avatar-bg06": "#0288d1",
|
|
799
|
+
"always/avatar-bg07": "#00579c",
|
|
800
|
+
"always/avatar-bg08": "#0098a6",
|
|
801
|
+
"always/avatar-bg09": "#00887a",
|
|
802
|
+
"always/avatar-bg10": "#689f39",
|
|
803
|
+
"always/avatar-bg11": "#33691e",
|
|
804
|
+
"always/avatar-bg12": "#004c3f",
|
|
805
|
+
"always/avatar-bg13": "#ec407a",
|
|
806
|
+
"always/avatar-bg14": "#c2175b",
|
|
807
|
+
"always/avatar-bg15": "#bf360c",
|
|
808
|
+
"always/avatar-bg16": "#f5511e",
|
|
809
|
+
"always/avatar-bg17": "#ef6c00",
|
|
810
|
+
"always/avatar-bg18": "#8c6e63",
|
|
811
|
+
"always/avatar-bg19": "#5d4038",
|
|
812
|
+
"always/avatar-bg20": "#78909c",
|
|
813
|
+
"always/avatar-bg21": "#465a65",
|
|
814
|
+
"always/black006-a": "#0000000f",
|
|
815
|
+
"always/black010-a": "#0000001a",
|
|
816
|
+
"always/black015-a": "#00000026",
|
|
817
|
+
"always/black020-a": "#00000033",
|
|
818
|
+
"always/black030-a": "#0000004d",
|
|
819
|
+
"always/black050-a": "#00000080",
|
|
820
|
+
"always/black060-a": "#00000099",
|
|
821
|
+
"always/black080-a": "#000000cc",
|
|
822
|
+
"always/black100": "#000000",
|
|
823
|
+
"always/grey-strong": "#232323",
|
|
824
|
+
"always/grey085": "#5c5c5c",
|
|
825
|
+
"always/lightgrey006-a": "#9999990f",
|
|
826
|
+
"always/lightgrey010-a": "#9999991a",
|
|
827
|
+
"always/lightgrey015-a": "#99999926",
|
|
828
|
+
"always/lightgrey020-a": "#99999933",
|
|
829
|
+
"always/lightgrey030-a": "#9999994d",
|
|
830
|
+
"always/lightgrey050-a": "#99999980",
|
|
831
|
+
"always/lightgrey080-a": "#999999cc",
|
|
832
|
+
"always/lightgrey100": "#999999",
|
|
833
|
+
"always/palette05": "linear-gradient(135deg, #db2667 0%, #f4a368 100%)",
|
|
834
|
+
"always/service-live-pop": "#df3868",
|
|
835
|
+
"always/service-live-red": "#ff0000",
|
|
836
|
+
"always/service-mnet": "#ff477f",
|
|
837
|
+
"always/service-mnetapp": "#ff477f",
|
|
838
|
+
"always/service-point": "linear-gradient(135deg, #1cac3c 0%, #1ca6bb 100%)",
|
|
839
|
+
"always/service-pop-ing": "linear-gradient(135deg, #db2667 0%, #f4a368 100%)",
|
|
840
|
+
"always/service-popgrey-weak-a": "#707ca00f",
|
|
841
|
+
"always/service-post-thumb-a": "#aa89f5cc",
|
|
842
|
+
"always/service-rankingpoll-thumb-a": "#FFADDD80",
|
|
843
|
+
"always/service-red080-a": "#f5254acc",
|
|
844
|
+
"always/service-survey": "#597eff",
|
|
845
|
+
"always/service-survey-thumb-a": "#7192f5cc",
|
|
846
|
+
"always/service-ticket": "#00bf59",
|
|
847
|
+
"always/white006-a": "#ffffff0f",
|
|
848
|
+
"always/white010-a": "#ffffff1a",
|
|
849
|
+
"always/white015-a": "#ffffff26",
|
|
850
|
+
"always/white020-a": "#ffffff33",
|
|
851
|
+
"always/white030-a": "#ffffff4d",
|
|
852
|
+
"always/white050-a": "#ffffff80",
|
|
853
|
+
"always/white060-a": "#ffffff99",
|
|
854
|
+
"always/white080-a": "#ffffffcc",
|
|
855
|
+
"always/white100": "#ffffff",
|
|
856
|
+
"auto/icon-primary-on-dark": "#ffffff",
|
|
857
|
+
"auto/icon-primary-on-light": "#000000ed",
|
|
858
|
+
"auto/icon-secondary-on-dark": "#ffffff",
|
|
859
|
+
"auto/icon-secondary-on-light": "#000000ba",
|
|
860
|
+
"auto/text-primary-on-dark": "#ffffff",
|
|
861
|
+
"auto/text-primary-on-light": "#000000",
|
|
862
|
+
"auto/text-secondary-on-dark": "#ffffffcc",
|
|
863
|
+
"auto/text-secondary-on-light": "#000000cc",
|
|
864
|
+
"picker/button": "#654bff",
|
|
865
|
+
"picker/button-weak-a": "#654bff26",
|
|
866
|
+
"picker/on-button": "#ffffff",
|
|
867
|
+
"picker/star": "#7266ff",
|
|
868
|
+
"pop/bg-tl01": "#c9d0ea",
|
|
869
|
+
"pop/bg-tl02": "#f2de6f",
|
|
870
|
+
"pop/bg-tl03": "#fca783",
|
|
871
|
+
"pop/bg-tl04": "#a0dda6",
|
|
872
|
+
"pop/bg-tl05": "#a2bce3",
|
|
873
|
+
"pop/bg-tl06": "#f7b3cf",
|
|
874
|
+
"pop/bg-tl07": "#bfa2e3",
|
|
875
|
+
"pop/bg-tl08": "#fb8686",
|
|
876
|
+
"pop/bg-tl09": "#eec2c2",
|
|
877
|
+
"pop/bg-tl10": "#e2d1b0",
|
|
878
|
+
"pop/bubble-tl01": "#7984b1",
|
|
879
|
+
"pop/bubble-tl03": "#e3703f",
|
|
880
|
+
"pop/bubble-tl04": "#5fac70",
|
|
881
|
+
"pop/bubble-tl05": "#587ab1",
|
|
882
|
+
"pop/bubble-tl06": "#ca7094",
|
|
883
|
+
"pop/bubble-tl07": "#8067b5",
|
|
884
|
+
"pop/bubble-tl08": "#cb4e4e",
|
|
885
|
+
"pop/bubble-tl09": "#cb8181",
|
|
886
|
+
"pop/bubble-tl1": "#a79272",
|
|
887
|
+
"pop/item-gradient01": "linear-gradient(135deg, #fbf3ac 0%, #ffe1fc 100%)",
|
|
888
|
+
"pop/item-gradient02": "linear-gradient(135deg, #cbe6ff 0%, #d5ffdf 100%)",
|
|
889
|
+
"pop/item-gradient03": "linear-gradient(135deg, #e4ceff 0%, #ffe4cc 100%)",
|
|
890
|
+
"pop/item-gradient04": "linear-gradient(135deg, #ffdcb3 0%, #c9f8ff 100%)",
|
|
891
|
+
"pop/item-gradient05": "linear-gradient(135deg, #ffd0ec 0%, #d3fcff 100%)",
|
|
892
|
+
"pop/item-gradient06": "linear-gradient(135deg, #feb5b5 0%, #d6fee1 100%)"
|
|
893
|
+
};
|
|
894
|
+
var shadowTokens = {
|
|
895
|
+
"shadow/default-large": {
|
|
896
|
+
"dark": "0px 1px 2px 0px #00000033, 0px 8px 48px 0px #00000099",
|
|
897
|
+
"light": "0px 1px 2px 0px #1a1a1a05, 0px 8px 48px 0px #1a1a1a26"
|
|
898
|
+
},
|
|
899
|
+
"shadow/default-medium": {
|
|
900
|
+
"dark": "0px 1px 2px 0px #00000033, 0px 4px 24px 0px #00000066",
|
|
901
|
+
"light": "0px 1px 2px 0px #00000005, 0px 4px 24px 0px #1a1a1a1a"
|
|
902
|
+
},
|
|
903
|
+
"shadow/default-small": {
|
|
904
|
+
"dark": "0px 1px 2px 0px #0000001a, 0px 2px 8px 0px #00000066",
|
|
905
|
+
"light": "0px 1px 2px 0px #1a1a1a05, 0px 2px 8px 0px #1a1a1a1a"
|
|
906
|
+
},
|
|
907
|
+
"shadow/default-xlarge": {
|
|
908
|
+
"dark": "0px 1px 2px 0px #00000033, 0px 16px 72px 0px #00000099",
|
|
909
|
+
"light": "0px 1px 2px 0px #1a1a1a05, 0px 16px 72px 0px #1a1a1a26"
|
|
910
|
+
},
|
|
911
|
+
"shadow/default-xsmall": {
|
|
912
|
+
"dark": "0px 1px 2px 0px #00000033, 0px 0px 4px 0px #00000066",
|
|
913
|
+
"light": "0px 1px 2px 0px #1a1a1a05, 0px 0px 4px 0px #1a1a1a26"
|
|
914
|
+
},
|
|
915
|
+
"shadow/weak-large": {
|
|
916
|
+
"dark": "0px 1px 2px 0px #0000001a, 0px 8px 48px 0px #00000066",
|
|
917
|
+
"light": "0px 1px 2px 0px #1a1a1a05, 0px 8px 48px 0px #1a1a1a1f"
|
|
918
|
+
},
|
|
919
|
+
"shadow/weak-medium": {
|
|
920
|
+
"dark": "0px 1px 2px 0px #0000001a, 0px 4px 24px 0px #00000033",
|
|
921
|
+
"light": "0px 1px 2px 0px #00000005, 0px 4px 20px 0px #1a1a1a14"
|
|
922
|
+
},
|
|
923
|
+
"shadow/weak-small": {
|
|
924
|
+
"dark": "0px 1px 2px 0px #0000001a, 0px 2px 8px 0px #00000033",
|
|
925
|
+
"light": "0px 1px 2px 0px #1a1a1a05, 0px 2px 8px 0px #1a1a1a14"
|
|
926
|
+
},
|
|
927
|
+
"shadow/weak-xlarge": {
|
|
928
|
+
"dark": "0px 1px 2px 0px #0000001a, 0px 16px 72px 0px #00000066",
|
|
929
|
+
"light": "0px 1px 2px 0px #1a1a1a05, 0px 16px 72px 0px #1a1a1a1f"
|
|
930
|
+
},
|
|
931
|
+
"shadow/weak-xsmall": {
|
|
932
|
+
"dark": "0px 1px 2px 0px #0000001a, 0px 0px 4px 0px #00000033",
|
|
933
|
+
"light": "0px 1px 1px 0px #1a1a1a05, 0px 0px 4px 0px #1a1a1a14"
|
|
934
|
+
}
|
|
935
|
+
};
|
|
936
|
+
var fontFamily = "'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'";
|
|
937
|
+
function cssVarName(slug, prefix, kind) {
|
|
938
|
+
const s = slug.replace(/\//g, "-");
|
|
939
|
+
return kind === "mode" ? `--${prefix}-mode-${s}` : `--${prefix}-${s}`;
|
|
940
|
+
}
|
|
941
|
+
function cssVarRef(slug, prefix, kind) {
|
|
942
|
+
return `var(${cssVarName(slug, prefix, kind)})`;
|
|
943
|
+
}
|
|
944
|
+
function buildColorTree(modeColors2, flatColors2, prefix) {
|
|
945
|
+
const tree = {};
|
|
946
|
+
const add = (slug, kind) => {
|
|
947
|
+
const [cat, ...rest] = slug.split("/");
|
|
948
|
+
const leaf = rest.join("/").replace(/\//g, "-") || cat;
|
|
949
|
+
(tree[cat] ?? (tree[cat] = {}))[leaf] = cssVarRef(slug, prefix, kind);
|
|
950
|
+
};
|
|
951
|
+
for (const slug of Object.keys(modeColors2)) add(slug, "mode");
|
|
952
|
+
for (const slug of Object.keys(flatColors2)) add(slug, "flat");
|
|
953
|
+
return tree;
|
|
954
|
+
}
|
|
955
|
+
function buildShadowRefs(shadowTokens2, prefix) {
|
|
956
|
+
const out = {};
|
|
957
|
+
for (const slug of Object.keys(shadowTokens2)) {
|
|
958
|
+
const leaf = slug.replace(/^shadow\//, "");
|
|
959
|
+
out[leaf] = cssVarRef(slug, prefix, "mode");
|
|
960
|
+
}
|
|
961
|
+
return out;
|
|
962
|
+
}
|
|
963
|
+
function colorLines(t, prefix, mode) {
|
|
964
|
+
return [
|
|
965
|
+
...Object.entries(t.modeColors).map(
|
|
966
|
+
([slug, pair]) => ` ${cssVarName(slug, prefix, "mode")}: ${pair[mode]};`
|
|
967
|
+
),
|
|
968
|
+
...Object.entries(t.shadowTokens).map(
|
|
969
|
+
([slug, pair]) => ` ${cssVarName(slug, prefix, "mode")}: ${pair[mode]};`
|
|
970
|
+
)
|
|
971
|
+
].join("\n");
|
|
972
|
+
}
|
|
973
|
+
function renderFallbackCss(t, opts) {
|
|
974
|
+
const p = opts.prefix;
|
|
975
|
+
const flat = Object.entries(t.flatColors).map(([slug, v]) => ` ${cssVarName(slug, p, "flat")}: ${v};`).join("\n");
|
|
976
|
+
const lightColors = colorLines(t, p, "light");
|
|
977
|
+
const frame = opts.target === "frame";
|
|
978
|
+
const header = frame ? `/* bstage \uB514\uC790\uC778 \uD1A0\uD070 \u2014 \uACA9\uB9AC \uD504\uB808\uC784 (${p}). \uD638\uC2A4\uD2B8 :root\uB97C \uC0C1\uC18D\uD558\uC9C0 \uBABB\uD558\uB294 \uD504\uB808\uC784 \uBB38\uC11C\uC6A9 */` : `/* ================================================================
|
|
979
|
+
* bstage \uB514\uC790\uC778 \uD1A0\uD070 \u2014 dev fallback (${p})
|
|
980
|
+
* @bstage-sdk/design \uC0DD\uC131\uBB3C. \uAC1C\uBC1C/\uBBF8\uB9AC\uBCF4\uAE30 \uC804\uC6A9(:root fallback).
|
|
981
|
+
* \uBC30\uD3EC \uC2DC\uC5D4 \uD50C\uB7AB\uD3FC :root \uAC12\uC744 \uC0C1\uC18D\uD558\uBA70 \uC774 \uD30C\uC77C\uC740 \uBC88\uB4E4\uB418\uC9C0 \uC54A\uB294\uB2E4.
|
|
982
|
+
* ================================================================ */`;
|
|
983
|
+
let css = `${header}
|
|
984
|
+
|
|
985
|
+
:root {
|
|
986
|
+
${lightColors}
|
|
987
|
+
|
|
988
|
+
${flat}
|
|
989
|
+
|
|
990
|
+
--${p}-font-family: ${t.fontFamily};
|
|
991
|
+
}
|
|
992
|
+
`;
|
|
993
|
+
if (opts.dark) {
|
|
994
|
+
const darkColors = colorLines(t, p, "dark");
|
|
995
|
+
if (!frame) {
|
|
996
|
+
css += `
|
|
997
|
+
@media (prefers-color-scheme: dark) {
|
|
998
|
+
:root:not([data-bspoke="light"]) {
|
|
999
|
+
${darkColors.replace(/^ {2}/gm, " ")}
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
`;
|
|
1003
|
+
}
|
|
1004
|
+
css += `
|
|
1005
|
+
:root[data-bspoke="dark"],
|
|
1006
|
+
:root.dark {
|
|
1007
|
+
${darkColors}
|
|
1008
|
+
}
|
|
1009
|
+
`;
|
|
1010
|
+
}
|
|
1011
|
+
return css;
|
|
1012
|
+
}
|
|
1013
|
+
var PREFIX = "user";
|
|
1014
|
+
var color = buildColorTree(modeColors, flatColors, PREFIX);
|
|
1015
|
+
var shadow = buildShadowRefs(shadowTokens, PREFIX);
|
|
1016
|
+
function renderFrameCss() {
|
|
1017
|
+
return renderFallbackCss(
|
|
1018
|
+
{ modeColors, flatColors, shadowTokens, fontFamily },
|
|
1019
|
+
{ prefix: PREFIX, dark: true, target: "frame" }
|
|
1020
|
+
);
|
|
1021
|
+
}
|
|
1022
|
+
|
|
468
1023
|
// src/srcdoc/createSrcdoc.ts
|
|
1024
|
+
var FRAME_TOKEN_CSS = renderFrameCss();
|
|
469
1025
|
var MAX_MEDIA_ORIGINS = 20;
|
|
470
1026
|
var REPORT_FLUSH_DELAY_MS = 1e3;
|
|
471
1027
|
var MAX_ELEMENT_NAME_LENGTH = 100;
|
|
@@ -546,6 +1102,14 @@ function bootstrapScript(o) {
|
|
|
546
1102
|
` maxCount: ${REPORT_COUNT_MAX},`,
|
|
547
1103
|
` flushDelayMs: ${REPORT_FLUSH_DELAY_MS}`,
|
|
548
1104
|
"});",
|
|
1105
|
+
// 호스트 테마를 프레임 문서에 반영한다(토큰 CSS의 `:root.dark`). 템플릿 코드보다 먼저 구독한다.
|
|
1106
|
+
"function applyTheme(theme) {",
|
|
1107
|
+
" var root = document.documentElement;",
|
|
1108
|
+
" if (!theme || typeof theme.dark !== 'boolean' || !root || !root.classList) return;",
|
|
1109
|
+
" root.classList.toggle('dark', theme.dark);",
|
|
1110
|
+
"}",
|
|
1111
|
+
"client.on('theme', applyTheme);",
|
|
1112
|
+
"client.ready.then(function (init) { applyTheme(init && init.theme); }, function () {});",
|
|
549
1113
|
"var lastHeight = -1;",
|
|
550
1114
|
"var scheduled = false;",
|
|
551
1115
|
"function reportHeight() {",
|
|
@@ -602,6 +1166,9 @@ function createSrcdoc(options) {
|
|
|
602
1166
|
if (/<\/script|<!--/i.test(script)) {
|
|
603
1167
|
throw new Error("[bstage-bridge] \uBD80\uD2B8\uC2A4\uD2B8\uB7A9 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 \uC2A4\uD06C\uB9BD\uD2B8 \uC885\uB8CC \uC2DC\uD000\uC2A4\uAC00 \uC788\uC2B5\uB2C8\uB2E4");
|
|
604
1168
|
}
|
|
1169
|
+
if (/<\/style|<!--/i.test(FRAME_TOKEN_CSS)) {
|
|
1170
|
+
throw new Error("[bstage-bridge] \uB514\uC790\uC778 \uD1A0\uD070 CSS\uC5D0 \uC2A4\uD0C0\uC77C \uC885\uB8CC \uC2DC\uD000\uC2A4\uAC00 \uC788\uC2B5\uB2C8\uB2E4");
|
|
1171
|
+
}
|
|
605
1172
|
return [
|
|
606
1173
|
"<!doctype html>",
|
|
607
1174
|
"<html>",
|
|
@@ -612,7 +1179,10 @@ function createSrcdoc(options) {
|
|
|
612
1179
|
`<title>${escapeHtml(title)}</title>`,
|
|
613
1180
|
// body 높이를 콘텐츠 높이로 잰다 — documentElement.scrollHeight는 뷰포트 이상이라 줄어들지 못한다.
|
|
614
1181
|
// flow-root는 자식 margin이 body 밖으로 접혀 나가 높이에서 빠지는 것을 막는다.
|
|
615
|
-
|
|
1182
|
+
`<style>${FRAME_TOKEN_CSS}</style>`,
|
|
1183
|
+
// 글자색·글꼴은 호스트와 같은 토큰(inline 배치가 상속받던 값). 배경은 투명 — 호스트 배경이 비친다.
|
|
1184
|
+
// color-scheme은 두지 않는다 — 호스트도 두지 않으며, 다르면 브라우저가 iframe 캔버스를 불투명하게 칠한다.
|
|
1185
|
+
"<style>html,body{margin:0;padding:0;background:transparent;height:auto}body{display:flow-root;color:var(--user-mode-text-primary);font-family:var(--user-font-family)}</style>",
|
|
616
1186
|
`<script nonce="${escapeHtml(nonce)}">
|
|
617
1187
|
${script}
|
|
618
1188
|
</script>`,
|
|
@@ -642,6 +1212,10 @@ export {
|
|
|
642
1212
|
FRAME_UNLOAD_EVENT,
|
|
643
1213
|
BRIDGE_SURFACES,
|
|
644
1214
|
isBridgeSurface,
|
|
1215
|
+
ACCOUNT_SESSION_CAPABILITY,
|
|
1216
|
+
KNOWN_CAPABILITIES,
|
|
1217
|
+
SESSION_OPS,
|
|
1218
|
+
OTP_OPS,
|
|
645
1219
|
TEMPLATE_REPORT_KINDS,
|
|
646
1220
|
REPORT_MESSAGE_MAX_LENGTH,
|
|
647
1221
|
REPORT_MAX_FRAMES,
|
package/dist/frame.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as BridgeInit, l as BridgeRequestType, k as BridgeRequestMap, g as BridgeEventMap, X as TemplateReportKind } from './messages-_p1yCNj9.cjs';
|
|
2
2
|
|
|
3
3
|
/** 프레임 런타임 설정 — srcdoc 부트스트랩이 상수로 넘긴다. */
|
|
4
4
|
interface BridgeClientConfig {
|
package/dist/frame.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as BridgeInit, l as BridgeRequestType, k as BridgeRequestMap, g as BridgeEventMap, X as TemplateReportKind } from './messages-_p1yCNj9.js';
|
|
2
2
|
|
|
3
3
|
/** 프레임 런타임 설정 — srcdoc 부트스트랩이 상수로 넘긴다. */
|
|
4
4
|
interface BridgeClientConfig {
|