@crediblemark/build 0.25.1 → 0.25.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/ArrayField-JZ2XQAUS.mjs +19 -0
- package/dist/{Editor-CD7CMRO5.mjs → Editor-GGSPWIO6.mjs} +7 -7
- package/dist/ObjectField-ZUGNSCNN.mjs +19 -0
- package/dist/{chunk-WEPD3OBO.mjs → chunk-3R4HYYSJ.mjs} +2 -2
- package/dist/{chunk-NJZPPQVT.mjs → chunk-4CV4HOSK.mjs} +3 -3
- package/dist/{chunk-BC5TH63U.mjs → chunk-4Z54QJVQ.mjs} +1 -1
- package/dist/{chunk-NSDGBGNG.mjs → chunk-A7MU7FEU.mjs} +1 -1
- package/dist/{chunk-OUXISRNA.mjs → chunk-BVZDBEP4.mjs} +355 -273
- package/dist/{chunk-MLM27DOG.mjs → chunk-DWF5T7E3.mjs} +1 -1
- package/dist/{chunk-PQXVFRLA.mjs → chunk-GY4BXVOH.mjs} +6 -6
- package/dist/{chunk-UPNU77XM.mjs → chunk-IJPF46QY.mjs} +1 -1
- package/dist/{chunk-BPBYJDIJ.mjs → chunk-J66BZ4WH.mjs} +95 -80
- package/dist/{chunk-JKWSSGAY.mjs → chunk-KRFBBRUA.mjs} +7 -7
- package/dist/{chunk-3S3KWE2J.mjs → chunk-YDODUFKC.mjs} +2 -2
- package/dist/{full-HTQAR5N2.mjs → full-KPGLJZI5.mjs} +5 -5
- package/dist/index.css +119 -40
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +741 -634
- package/dist/index.mjs +11 -11
- package/dist/{loaded-AHSNCA4P.mjs → loaded-5QLBLQ3N.mjs} +2 -2
- package/dist/{loaded-Q7N3MNZB.mjs → loaded-HEYQUU36.mjs} +2 -2
- package/dist/{loaded-CDAPR2WZ.mjs → loaded-RXPNBJYA.mjs} +2 -2
- package/dist/no-external.css +119 -40
- package/dist/no-external.js +741 -634
- package/dist/no-external.mjs +11 -11
- package/package.json +1 -1
- package/dist/ArrayField-N36WXYIG.mjs +0 -19
- package/dist/ObjectField-RMXFC6TI.mjs +0 -19
package/dist/no-external.js
CHANGED
|
@@ -776,46 +776,67 @@ var init_image = __esm({
|
|
|
776
776
|
}
|
|
777
777
|
});
|
|
778
778
|
|
|
779
|
+
// node_modules/lucide-react/dist/esm/icons/inbox.js
|
|
780
|
+
var __iconNode25, Inbox;
|
|
781
|
+
var init_inbox = __esm({
|
|
782
|
+
"node_modules/lucide-react/dist/esm/icons/inbox.js"() {
|
|
783
|
+
"use strict";
|
|
784
|
+
init_react_import();
|
|
785
|
+
init_createLucideIcon();
|
|
786
|
+
__iconNode25 = [
|
|
787
|
+
["polyline", { points: "22 12 16 12 14 15 10 15 8 12 2 12", key: "o97t9d" }],
|
|
788
|
+
[
|
|
789
|
+
"path",
|
|
790
|
+
{
|
|
791
|
+
d: "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",
|
|
792
|
+
key: "oot6mr"
|
|
793
|
+
}
|
|
794
|
+
]
|
|
795
|
+
];
|
|
796
|
+
Inbox = createLucideIcon("inbox", __iconNode25);
|
|
797
|
+
}
|
|
798
|
+
});
|
|
799
|
+
|
|
779
800
|
// node_modules/lucide-react/dist/esm/icons/info.js
|
|
780
|
-
var
|
|
801
|
+
var __iconNode26, Info;
|
|
781
802
|
var init_info = __esm({
|
|
782
803
|
"node_modules/lucide-react/dist/esm/icons/info.js"() {
|
|
783
804
|
"use strict";
|
|
784
805
|
init_react_import();
|
|
785
806
|
init_createLucideIcon();
|
|
786
|
-
|
|
807
|
+
__iconNode26 = [
|
|
787
808
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
788
809
|
["path", { d: "M12 16v-4", key: "1dtifu" }],
|
|
789
810
|
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
790
811
|
];
|
|
791
|
-
Info = createLucideIcon("info",
|
|
812
|
+
Info = createLucideIcon("info", __iconNode26);
|
|
792
813
|
}
|
|
793
814
|
});
|
|
794
815
|
|
|
795
816
|
// node_modules/lucide-react/dist/esm/icons/italic.js
|
|
796
|
-
var
|
|
817
|
+
var __iconNode27, Italic;
|
|
797
818
|
var init_italic = __esm({
|
|
798
819
|
"node_modules/lucide-react/dist/esm/icons/italic.js"() {
|
|
799
820
|
"use strict";
|
|
800
821
|
init_react_import();
|
|
801
822
|
init_createLucideIcon();
|
|
802
|
-
|
|
823
|
+
__iconNode27 = [
|
|
803
824
|
["line", { x1: "19", x2: "10", y1: "4", y2: "4", key: "15jd3p" }],
|
|
804
825
|
["line", { x1: "14", x2: "5", y1: "20", y2: "20", key: "bu0au3" }],
|
|
805
826
|
["line", { x1: "15", x2: "9", y1: "4", y2: "20", key: "uljnxc" }]
|
|
806
827
|
];
|
|
807
|
-
Italic = createLucideIcon("italic",
|
|
828
|
+
Italic = createLucideIcon("italic", __iconNode27);
|
|
808
829
|
}
|
|
809
830
|
});
|
|
810
831
|
|
|
811
832
|
// node_modules/lucide-react/dist/esm/icons/layers.js
|
|
812
|
-
var
|
|
833
|
+
var __iconNode28, Layers;
|
|
813
834
|
var init_layers = __esm({
|
|
814
835
|
"node_modules/lucide-react/dist/esm/icons/layers.js"() {
|
|
815
836
|
"use strict";
|
|
816
837
|
init_react_import();
|
|
817
838
|
init_createLucideIcon();
|
|
818
|
-
|
|
839
|
+
__iconNode28 = [
|
|
819
840
|
[
|
|
820
841
|
"path",
|
|
821
842
|
{
|
|
@@ -838,83 +859,83 @@ var init_layers = __esm({
|
|
|
838
859
|
}
|
|
839
860
|
]
|
|
840
861
|
];
|
|
841
|
-
Layers = createLucideIcon("layers",
|
|
862
|
+
Layers = createLucideIcon("layers", __iconNode28);
|
|
842
863
|
}
|
|
843
864
|
});
|
|
844
865
|
|
|
845
866
|
// node_modules/lucide-react/dist/esm/icons/layout-dashboard.js
|
|
846
|
-
var
|
|
867
|
+
var __iconNode29, LayoutDashboard;
|
|
847
868
|
var init_layout_dashboard = __esm({
|
|
848
869
|
"node_modules/lucide-react/dist/esm/icons/layout-dashboard.js"() {
|
|
849
870
|
"use strict";
|
|
850
871
|
init_react_import();
|
|
851
872
|
init_createLucideIcon();
|
|
852
|
-
|
|
873
|
+
__iconNode29 = [
|
|
853
874
|
["rect", { width: "7", height: "9", x: "3", y: "3", rx: "1", key: "10lvy0" }],
|
|
854
875
|
["rect", { width: "7", height: "5", x: "14", y: "3", rx: "1", key: "16une8" }],
|
|
855
876
|
["rect", { width: "7", height: "9", x: "14", y: "12", rx: "1", key: "1hutg5" }],
|
|
856
877
|
["rect", { width: "7", height: "5", x: "3", y: "16", rx: "1", key: "ldoo1y" }]
|
|
857
878
|
];
|
|
858
|
-
LayoutDashboard = createLucideIcon("layout-dashboard",
|
|
879
|
+
LayoutDashboard = createLucideIcon("layout-dashboard", __iconNode29);
|
|
859
880
|
}
|
|
860
881
|
});
|
|
861
882
|
|
|
862
883
|
// node_modules/lucide-react/dist/esm/icons/layout-grid.js
|
|
863
|
-
var
|
|
884
|
+
var __iconNode30, LayoutGrid;
|
|
864
885
|
var init_layout_grid = __esm({
|
|
865
886
|
"node_modules/lucide-react/dist/esm/icons/layout-grid.js"() {
|
|
866
887
|
"use strict";
|
|
867
888
|
init_react_import();
|
|
868
889
|
init_createLucideIcon();
|
|
869
|
-
|
|
890
|
+
__iconNode30 = [
|
|
870
891
|
["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
|
|
871
892
|
["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
|
|
872
893
|
["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }],
|
|
873
894
|
["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }]
|
|
874
895
|
];
|
|
875
|
-
LayoutGrid = createLucideIcon("layout-grid",
|
|
896
|
+
LayoutGrid = createLucideIcon("layout-grid", __iconNode30);
|
|
876
897
|
}
|
|
877
898
|
});
|
|
878
899
|
|
|
879
900
|
// node_modules/lucide-react/dist/esm/icons/layout-template.js
|
|
880
|
-
var
|
|
901
|
+
var __iconNode31, LayoutTemplate;
|
|
881
902
|
var init_layout_template = __esm({
|
|
882
903
|
"node_modules/lucide-react/dist/esm/icons/layout-template.js"() {
|
|
883
904
|
"use strict";
|
|
884
905
|
init_react_import();
|
|
885
906
|
init_createLucideIcon();
|
|
886
|
-
|
|
907
|
+
__iconNode31 = [
|
|
887
908
|
["rect", { width: "18", height: "7", x: "3", y: "3", rx: "1", key: "f1a2em" }],
|
|
888
909
|
["rect", { width: "9", height: "7", x: "3", y: "14", rx: "1", key: "jqznyg" }],
|
|
889
910
|
["rect", { width: "5", height: "7", x: "16", y: "14", rx: "1", key: "q5h2i8" }]
|
|
890
911
|
];
|
|
891
|
-
LayoutTemplate = createLucideIcon("layout-template",
|
|
912
|
+
LayoutTemplate = createLucideIcon("layout-template", __iconNode31);
|
|
892
913
|
}
|
|
893
914
|
});
|
|
894
915
|
|
|
895
916
|
// node_modules/lucide-react/dist/esm/icons/link.js
|
|
896
|
-
var
|
|
917
|
+
var __iconNode32, Link;
|
|
897
918
|
var init_link = __esm({
|
|
898
919
|
"node_modules/lucide-react/dist/esm/icons/link.js"() {
|
|
899
920
|
"use strict";
|
|
900
921
|
init_react_import();
|
|
901
922
|
init_createLucideIcon();
|
|
902
|
-
|
|
923
|
+
__iconNode32 = [
|
|
903
924
|
["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
|
|
904
925
|
["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
|
|
905
926
|
];
|
|
906
|
-
Link = createLucideIcon("link",
|
|
927
|
+
Link = createLucideIcon("link", __iconNode32);
|
|
907
928
|
}
|
|
908
929
|
});
|
|
909
930
|
|
|
910
931
|
// node_modules/lucide-react/dist/esm/icons/list-ordered.js
|
|
911
|
-
var
|
|
932
|
+
var __iconNode33, ListOrdered;
|
|
912
933
|
var init_list_ordered = __esm({
|
|
913
934
|
"node_modules/lucide-react/dist/esm/icons/list-ordered.js"() {
|
|
914
935
|
"use strict";
|
|
915
936
|
init_react_import();
|
|
916
937
|
init_createLucideIcon();
|
|
917
|
-
|
|
938
|
+
__iconNode33 = [
|
|
918
939
|
["path", { d: "M11 5h10", key: "1cz7ny" }],
|
|
919
940
|
["path", { d: "M11 12h10", key: "1438ji" }],
|
|
920
941
|
["path", { d: "M11 19h10", key: "11t30w" }],
|
|
@@ -922,18 +943,18 @@ var init_list_ordered = __esm({
|
|
|
922
943
|
["path", { d: "M4 9h2", key: "r1h2o0" }],
|
|
923
944
|
["path", { d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02", key: "xtkcd5" }]
|
|
924
945
|
];
|
|
925
|
-
ListOrdered = createLucideIcon("list-ordered",
|
|
946
|
+
ListOrdered = createLucideIcon("list-ordered", __iconNode33);
|
|
926
947
|
}
|
|
927
948
|
});
|
|
928
949
|
|
|
929
950
|
// node_modules/lucide-react/dist/esm/icons/list.js
|
|
930
|
-
var
|
|
951
|
+
var __iconNode34, List;
|
|
931
952
|
var init_list = __esm({
|
|
932
953
|
"node_modules/lucide-react/dist/esm/icons/list.js"() {
|
|
933
954
|
"use strict";
|
|
934
955
|
init_react_import();
|
|
935
956
|
init_createLucideIcon();
|
|
936
|
-
|
|
957
|
+
__iconNode34 = [
|
|
937
958
|
["path", { d: "M3 5h.01", key: "18ugdj" }],
|
|
938
959
|
["path", { d: "M3 12h.01", key: "nlz23k" }],
|
|
939
960
|
["path", { d: "M3 19h.01", key: "noohij" }],
|
|
@@ -941,65 +962,65 @@ var init_list = __esm({
|
|
|
941
962
|
["path", { d: "M8 12h13", key: "1za7za" }],
|
|
942
963
|
["path", { d: "M8 19h13", key: "m83p4d" }]
|
|
943
964
|
];
|
|
944
|
-
List = createLucideIcon("list",
|
|
965
|
+
List = createLucideIcon("list", __iconNode34);
|
|
945
966
|
}
|
|
946
967
|
});
|
|
947
968
|
|
|
948
969
|
// node_modules/lucide-react/dist/esm/icons/lock-open.js
|
|
949
|
-
var
|
|
970
|
+
var __iconNode35, LockOpen;
|
|
950
971
|
var init_lock_open = __esm({
|
|
951
972
|
"node_modules/lucide-react/dist/esm/icons/lock-open.js"() {
|
|
952
973
|
"use strict";
|
|
953
974
|
init_react_import();
|
|
954
975
|
init_createLucideIcon();
|
|
955
|
-
|
|
976
|
+
__iconNode35 = [
|
|
956
977
|
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
957
978
|
["path", { d: "M7 11V7a5 5 0 0 1 9.9-1", key: "1mm8w8" }]
|
|
958
979
|
];
|
|
959
|
-
LockOpen = createLucideIcon("lock-open",
|
|
980
|
+
LockOpen = createLucideIcon("lock-open", __iconNode35);
|
|
960
981
|
}
|
|
961
982
|
});
|
|
962
983
|
|
|
963
984
|
// node_modules/lucide-react/dist/esm/icons/lock.js
|
|
964
|
-
var
|
|
985
|
+
var __iconNode36, Lock;
|
|
965
986
|
var init_lock = __esm({
|
|
966
987
|
"node_modules/lucide-react/dist/esm/icons/lock.js"() {
|
|
967
988
|
"use strict";
|
|
968
989
|
init_react_import();
|
|
969
990
|
init_createLucideIcon();
|
|
970
|
-
|
|
991
|
+
__iconNode36 = [
|
|
971
992
|
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
972
993
|
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
973
994
|
];
|
|
974
|
-
Lock = createLucideIcon("lock",
|
|
995
|
+
Lock = createLucideIcon("lock", __iconNode36);
|
|
975
996
|
}
|
|
976
997
|
});
|
|
977
998
|
|
|
978
999
|
// node_modules/lucide-react/dist/esm/icons/maximize-2.js
|
|
979
|
-
var
|
|
1000
|
+
var __iconNode37, Maximize2;
|
|
980
1001
|
var init_maximize_2 = __esm({
|
|
981
1002
|
"node_modules/lucide-react/dist/esm/icons/maximize-2.js"() {
|
|
982
1003
|
"use strict";
|
|
983
1004
|
init_react_import();
|
|
984
1005
|
init_createLucideIcon();
|
|
985
|
-
|
|
1006
|
+
__iconNode37 = [
|
|
986
1007
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
987
1008
|
["path", { d: "m21 3-7 7", key: "1l2asr" }],
|
|
988
1009
|
["path", { d: "m3 21 7-7", key: "tjx5ai" }],
|
|
989
1010
|
["path", { d: "M9 21H3v-6", key: "wtvkvv" }]
|
|
990
1011
|
];
|
|
991
|
-
Maximize2 = createLucideIcon("maximize-2",
|
|
1012
|
+
Maximize2 = createLucideIcon("maximize-2", __iconNode37);
|
|
992
1013
|
}
|
|
993
1014
|
});
|
|
994
1015
|
|
|
995
1016
|
// node_modules/lucide-react/dist/esm/icons/megaphone.js
|
|
996
|
-
var
|
|
1017
|
+
var __iconNode38, Megaphone;
|
|
997
1018
|
var init_megaphone = __esm({
|
|
998
1019
|
"node_modules/lucide-react/dist/esm/icons/megaphone.js"() {
|
|
999
1020
|
"use strict";
|
|
1000
1021
|
init_react_import();
|
|
1001
1022
|
init_createLucideIcon();
|
|
1002
|
-
|
|
1023
|
+
__iconNode38 = [
|
|
1003
1024
|
[
|
|
1004
1025
|
"path",
|
|
1005
1026
|
{
|
|
@@ -1010,63 +1031,63 @@ var init_megaphone = __esm({
|
|
|
1010
1031
|
["path", { d: "M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14", key: "1853fq" }],
|
|
1011
1032
|
["path", { d: "M8 6v8", key: "15ugcq" }]
|
|
1012
1033
|
];
|
|
1013
|
-
Megaphone = createLucideIcon("megaphone",
|
|
1034
|
+
Megaphone = createLucideIcon("megaphone", __iconNode38);
|
|
1014
1035
|
}
|
|
1015
1036
|
});
|
|
1016
1037
|
|
|
1017
1038
|
// node_modules/lucide-react/dist/esm/icons/minimize-2.js
|
|
1018
|
-
var
|
|
1039
|
+
var __iconNode39, Minimize2;
|
|
1019
1040
|
var init_minimize_2 = __esm({
|
|
1020
1041
|
"node_modules/lucide-react/dist/esm/icons/minimize-2.js"() {
|
|
1021
1042
|
"use strict";
|
|
1022
1043
|
init_react_import();
|
|
1023
1044
|
init_createLucideIcon();
|
|
1024
|
-
|
|
1045
|
+
__iconNode39 = [
|
|
1025
1046
|
["path", { d: "m14 10 7-7", key: "oa77jy" }],
|
|
1026
1047
|
["path", { d: "M20 10h-6V4", key: "mjg0md" }],
|
|
1027
1048
|
["path", { d: "m3 21 7-7", key: "tjx5ai" }],
|
|
1028
1049
|
["path", { d: "M4 14h6v6", key: "rmj7iw" }]
|
|
1029
1050
|
];
|
|
1030
|
-
Minimize2 = createLucideIcon("minimize-2",
|
|
1051
|
+
Minimize2 = createLucideIcon("minimize-2", __iconNode39);
|
|
1031
1052
|
}
|
|
1032
1053
|
});
|
|
1033
1054
|
|
|
1034
1055
|
// node_modules/lucide-react/dist/esm/icons/minus.js
|
|
1035
|
-
var
|
|
1056
|
+
var __iconNode40, Minus;
|
|
1036
1057
|
var init_minus = __esm({
|
|
1037
1058
|
"node_modules/lucide-react/dist/esm/icons/minus.js"() {
|
|
1038
1059
|
"use strict";
|
|
1039
1060
|
init_react_import();
|
|
1040
1061
|
init_createLucideIcon();
|
|
1041
|
-
|
|
1042
|
-
Minus = createLucideIcon("minus",
|
|
1062
|
+
__iconNode40 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
|
|
1063
|
+
Minus = createLucideIcon("minus", __iconNode40);
|
|
1043
1064
|
}
|
|
1044
1065
|
});
|
|
1045
1066
|
|
|
1046
1067
|
// node_modules/lucide-react/dist/esm/icons/monitor.js
|
|
1047
|
-
var
|
|
1068
|
+
var __iconNode41, Monitor;
|
|
1048
1069
|
var init_monitor = __esm({
|
|
1049
1070
|
"node_modules/lucide-react/dist/esm/icons/monitor.js"() {
|
|
1050
1071
|
"use strict";
|
|
1051
1072
|
init_react_import();
|
|
1052
1073
|
init_createLucideIcon();
|
|
1053
|
-
|
|
1074
|
+
__iconNode41 = [
|
|
1054
1075
|
["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
|
|
1055
1076
|
["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
|
|
1056
1077
|
["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
|
|
1057
1078
|
];
|
|
1058
|
-
Monitor = createLucideIcon("monitor",
|
|
1079
|
+
Monitor = createLucideIcon("monitor", __iconNode41);
|
|
1059
1080
|
}
|
|
1060
1081
|
});
|
|
1061
1082
|
|
|
1062
1083
|
// node_modules/lucide-react/dist/esm/icons/moon.js
|
|
1063
|
-
var
|
|
1084
|
+
var __iconNode42, Moon;
|
|
1064
1085
|
var init_moon = __esm({
|
|
1065
1086
|
"node_modules/lucide-react/dist/esm/icons/moon.js"() {
|
|
1066
1087
|
"use strict";
|
|
1067
1088
|
init_react_import();
|
|
1068
1089
|
init_createLucideIcon();
|
|
1069
|
-
|
|
1090
|
+
__iconNode42 = [
|
|
1070
1091
|
[
|
|
1071
1092
|
"path",
|
|
1072
1093
|
{
|
|
@@ -1075,63 +1096,63 @@ var init_moon = __esm({
|
|
|
1075
1096
|
}
|
|
1076
1097
|
]
|
|
1077
1098
|
];
|
|
1078
|
-
Moon = createLucideIcon("moon",
|
|
1099
|
+
Moon = createLucideIcon("moon", __iconNode42);
|
|
1079
1100
|
}
|
|
1080
1101
|
});
|
|
1081
1102
|
|
|
1082
1103
|
// node_modules/lucide-react/dist/esm/icons/panel-left.js
|
|
1083
|
-
var
|
|
1104
|
+
var __iconNode43, PanelLeft;
|
|
1084
1105
|
var init_panel_left = __esm({
|
|
1085
1106
|
"node_modules/lucide-react/dist/esm/icons/panel-left.js"() {
|
|
1086
1107
|
"use strict";
|
|
1087
1108
|
init_react_import();
|
|
1088
1109
|
init_createLucideIcon();
|
|
1089
|
-
|
|
1110
|
+
__iconNode43 = [
|
|
1090
1111
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
1091
1112
|
["path", { d: "M9 3v18", key: "fh3hqa" }]
|
|
1092
1113
|
];
|
|
1093
|
-
PanelLeft = createLucideIcon("panel-left",
|
|
1114
|
+
PanelLeft = createLucideIcon("panel-left", __iconNode43);
|
|
1094
1115
|
}
|
|
1095
1116
|
});
|
|
1096
1117
|
|
|
1097
1118
|
// node_modules/lucide-react/dist/esm/icons/panel-right.js
|
|
1098
|
-
var
|
|
1119
|
+
var __iconNode44, PanelRight;
|
|
1099
1120
|
var init_panel_right = __esm({
|
|
1100
1121
|
"node_modules/lucide-react/dist/esm/icons/panel-right.js"() {
|
|
1101
1122
|
"use strict";
|
|
1102
1123
|
init_react_import();
|
|
1103
1124
|
init_createLucideIcon();
|
|
1104
|
-
|
|
1125
|
+
__iconNode44 = [
|
|
1105
1126
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
1106
1127
|
["path", { d: "M15 3v18", key: "14nvp0" }]
|
|
1107
1128
|
];
|
|
1108
|
-
PanelRight = createLucideIcon("panel-right",
|
|
1129
|
+
PanelRight = createLucideIcon("panel-right", __iconNode44);
|
|
1109
1130
|
}
|
|
1110
1131
|
});
|
|
1111
1132
|
|
|
1112
1133
|
// node_modules/lucide-react/dist/esm/icons/plus.js
|
|
1113
|
-
var
|
|
1134
|
+
var __iconNode45, Plus;
|
|
1114
1135
|
var init_plus = __esm({
|
|
1115
1136
|
"node_modules/lucide-react/dist/esm/icons/plus.js"() {
|
|
1116
1137
|
"use strict";
|
|
1117
1138
|
init_react_import();
|
|
1118
1139
|
init_createLucideIcon();
|
|
1119
|
-
|
|
1140
|
+
__iconNode45 = [
|
|
1120
1141
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
1121
1142
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
1122
1143
|
];
|
|
1123
|
-
Plus = createLucideIcon("plus",
|
|
1144
|
+
Plus = createLucideIcon("plus", __iconNode45);
|
|
1124
1145
|
}
|
|
1125
1146
|
});
|
|
1126
1147
|
|
|
1127
1148
|
// node_modules/lucide-react/dist/esm/icons/quote.js
|
|
1128
|
-
var
|
|
1149
|
+
var __iconNode46, Quote;
|
|
1129
1150
|
var init_quote = __esm({
|
|
1130
1151
|
"node_modules/lucide-react/dist/esm/icons/quote.js"() {
|
|
1131
1152
|
"use strict";
|
|
1132
1153
|
init_react_import();
|
|
1133
1154
|
init_createLucideIcon();
|
|
1134
|
-
|
|
1155
|
+
__iconNode46 = [
|
|
1135
1156
|
[
|
|
1136
1157
|
"path",
|
|
1137
1158
|
{
|
|
@@ -1147,65 +1168,65 @@ var init_quote = __esm({
|
|
|
1147
1168
|
}
|
|
1148
1169
|
]
|
|
1149
1170
|
];
|
|
1150
|
-
Quote = createLucideIcon("quote",
|
|
1171
|
+
Quote = createLucideIcon("quote", __iconNode46);
|
|
1151
1172
|
}
|
|
1152
1173
|
});
|
|
1153
1174
|
|
|
1154
1175
|
// node_modules/lucide-react/dist/esm/icons/rectangle-ellipsis.js
|
|
1155
|
-
var
|
|
1176
|
+
var __iconNode47, RectangleEllipsis;
|
|
1156
1177
|
var init_rectangle_ellipsis = __esm({
|
|
1157
1178
|
"node_modules/lucide-react/dist/esm/icons/rectangle-ellipsis.js"() {
|
|
1158
1179
|
"use strict";
|
|
1159
1180
|
init_react_import();
|
|
1160
1181
|
init_createLucideIcon();
|
|
1161
|
-
|
|
1182
|
+
__iconNode47 = [
|
|
1162
1183
|
["rect", { width: "20", height: "12", x: "2", y: "6", rx: "2", key: "9lu3g6" }],
|
|
1163
1184
|
["path", { d: "M12 12h.01", key: "1mp3jc" }],
|
|
1164
1185
|
["path", { d: "M17 12h.01", key: "1m0b6t" }],
|
|
1165
1186
|
["path", { d: "M7 12h.01", key: "eqddd0" }]
|
|
1166
1187
|
];
|
|
1167
|
-
RectangleEllipsis = createLucideIcon("rectangle-ellipsis",
|
|
1188
|
+
RectangleEllipsis = createLucideIcon("rectangle-ellipsis", __iconNode47);
|
|
1168
1189
|
}
|
|
1169
1190
|
});
|
|
1170
1191
|
|
|
1171
1192
|
// node_modules/lucide-react/dist/esm/icons/redo-2.js
|
|
1172
|
-
var
|
|
1193
|
+
var __iconNode48, Redo2;
|
|
1173
1194
|
var init_redo_2 = __esm({
|
|
1174
1195
|
"node_modules/lucide-react/dist/esm/icons/redo-2.js"() {
|
|
1175
1196
|
"use strict";
|
|
1176
1197
|
init_react_import();
|
|
1177
1198
|
init_createLucideIcon();
|
|
1178
|
-
|
|
1199
|
+
__iconNode48 = [
|
|
1179
1200
|
["path", { d: "m15 14 5-5-5-5", key: "12vg1m" }],
|
|
1180
1201
|
["path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13", key: "6uklza" }]
|
|
1181
1202
|
];
|
|
1182
|
-
Redo2 = createLucideIcon("redo-2",
|
|
1203
|
+
Redo2 = createLucideIcon("redo-2", __iconNode48);
|
|
1183
1204
|
}
|
|
1184
1205
|
});
|
|
1185
1206
|
|
|
1186
1207
|
// node_modules/lucide-react/dist/esm/icons/search.js
|
|
1187
|
-
var
|
|
1208
|
+
var __iconNode49, Search;
|
|
1188
1209
|
var init_search = __esm({
|
|
1189
1210
|
"node_modules/lucide-react/dist/esm/icons/search.js"() {
|
|
1190
1211
|
"use strict";
|
|
1191
1212
|
init_react_import();
|
|
1192
1213
|
init_createLucideIcon();
|
|
1193
|
-
|
|
1214
|
+
__iconNode49 = [
|
|
1194
1215
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
1195
1216
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
1196
1217
|
];
|
|
1197
|
-
Search = createLucideIcon("search",
|
|
1218
|
+
Search = createLucideIcon("search", __iconNode49);
|
|
1198
1219
|
}
|
|
1199
1220
|
});
|
|
1200
1221
|
|
|
1201
1222
|
// node_modules/lucide-react/dist/esm/icons/settings.js
|
|
1202
|
-
var
|
|
1223
|
+
var __iconNode50, Settings;
|
|
1203
1224
|
var init_settings = __esm({
|
|
1204
1225
|
"node_modules/lucide-react/dist/esm/icons/settings.js"() {
|
|
1205
1226
|
"use strict";
|
|
1206
1227
|
init_react_import();
|
|
1207
1228
|
init_createLucideIcon();
|
|
1208
|
-
|
|
1229
|
+
__iconNode50 = [
|
|
1209
1230
|
[
|
|
1210
1231
|
"path",
|
|
1211
1232
|
{
|
|
@@ -1215,18 +1236,18 @@ var init_settings = __esm({
|
|
|
1215
1236
|
],
|
|
1216
1237
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
1217
1238
|
];
|
|
1218
|
-
Settings = createLucideIcon("settings",
|
|
1239
|
+
Settings = createLucideIcon("settings", __iconNode50);
|
|
1219
1240
|
}
|
|
1220
1241
|
});
|
|
1221
1242
|
|
|
1222
1243
|
// node_modules/lucide-react/dist/esm/icons/shapes.js
|
|
1223
|
-
var
|
|
1244
|
+
var __iconNode51, Shapes;
|
|
1224
1245
|
var init_shapes = __esm({
|
|
1225
1246
|
"node_modules/lucide-react/dist/esm/icons/shapes.js"() {
|
|
1226
1247
|
"use strict";
|
|
1227
1248
|
init_react_import();
|
|
1228
1249
|
init_createLucideIcon();
|
|
1229
|
-
|
|
1250
|
+
__iconNode51 = [
|
|
1230
1251
|
[
|
|
1231
1252
|
"path",
|
|
1232
1253
|
{
|
|
@@ -1237,18 +1258,18 @@ var init_shapes = __esm({
|
|
|
1237
1258
|
["rect", { x: "3", y: "14", width: "7", height: "7", rx: "1", key: "1bkyp8" }],
|
|
1238
1259
|
["circle", { cx: "17.5", cy: "17.5", r: "3.5", key: "w3z12y" }]
|
|
1239
1260
|
];
|
|
1240
|
-
Shapes = createLucideIcon("shapes",
|
|
1261
|
+
Shapes = createLucideIcon("shapes", __iconNode51);
|
|
1241
1262
|
}
|
|
1242
1263
|
});
|
|
1243
1264
|
|
|
1244
1265
|
// node_modules/lucide-react/dist/esm/icons/sliders-horizontal.js
|
|
1245
|
-
var
|
|
1266
|
+
var __iconNode52, SlidersHorizontal;
|
|
1246
1267
|
var init_sliders_horizontal = __esm({
|
|
1247
1268
|
"node_modules/lucide-react/dist/esm/icons/sliders-horizontal.js"() {
|
|
1248
1269
|
"use strict";
|
|
1249
1270
|
init_react_import();
|
|
1250
1271
|
init_createLucideIcon();
|
|
1251
|
-
|
|
1272
|
+
__iconNode52 = [
|
|
1252
1273
|
["path", { d: "M10 5H3", key: "1qgfaw" }],
|
|
1253
1274
|
["path", { d: "M12 19H3", key: "yhmn1j" }],
|
|
1254
1275
|
["path", { d: "M14 3v4", key: "1sua03" }],
|
|
@@ -1259,65 +1280,65 @@ var init_sliders_horizontal = __esm({
|
|
|
1259
1280
|
["path", { d: "M8 10v4", key: "tgpxqk" }],
|
|
1260
1281
|
["path", { d: "M8 12H3", key: "a7s4jb" }]
|
|
1261
1282
|
];
|
|
1262
|
-
SlidersHorizontal = createLucideIcon("sliders-horizontal",
|
|
1283
|
+
SlidersHorizontal = createLucideIcon("sliders-horizontal", __iconNode52);
|
|
1263
1284
|
}
|
|
1264
1285
|
});
|
|
1265
1286
|
|
|
1266
1287
|
// node_modules/lucide-react/dist/esm/icons/smartphone.js
|
|
1267
|
-
var
|
|
1288
|
+
var __iconNode53, Smartphone;
|
|
1268
1289
|
var init_smartphone = __esm({
|
|
1269
1290
|
"node_modules/lucide-react/dist/esm/icons/smartphone.js"() {
|
|
1270
1291
|
"use strict";
|
|
1271
1292
|
init_react_import();
|
|
1272
1293
|
init_createLucideIcon();
|
|
1273
|
-
|
|
1294
|
+
__iconNode53 = [
|
|
1274
1295
|
["rect", { width: "14", height: "20", x: "5", y: "2", rx: "2", ry: "2", key: "1yt0o3" }],
|
|
1275
1296
|
["path", { d: "M12 18h.01", key: "mhygvu" }]
|
|
1276
1297
|
];
|
|
1277
|
-
Smartphone = createLucideIcon("smartphone",
|
|
1298
|
+
Smartphone = createLucideIcon("smartphone", __iconNode53);
|
|
1278
1299
|
}
|
|
1279
1300
|
});
|
|
1280
1301
|
|
|
1281
1302
|
// node_modules/lucide-react/dist/esm/icons/square-code.js
|
|
1282
|
-
var
|
|
1303
|
+
var __iconNode54, SquareCode;
|
|
1283
1304
|
var init_square_code = __esm({
|
|
1284
1305
|
"node_modules/lucide-react/dist/esm/icons/square-code.js"() {
|
|
1285
1306
|
"use strict";
|
|
1286
1307
|
init_react_import();
|
|
1287
1308
|
init_createLucideIcon();
|
|
1288
|
-
|
|
1309
|
+
__iconNode54 = [
|
|
1289
1310
|
["path", { d: "m10 9-3 3 3 3", key: "1oro0q" }],
|
|
1290
1311
|
["path", { d: "m14 15 3-3-3-3", key: "bz13h7" }],
|
|
1291
1312
|
["rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", key: "h1oib" }]
|
|
1292
1313
|
];
|
|
1293
|
-
SquareCode = createLucideIcon("square-code",
|
|
1314
|
+
SquareCode = createLucideIcon("square-code", __iconNode54);
|
|
1294
1315
|
}
|
|
1295
1316
|
});
|
|
1296
1317
|
|
|
1297
1318
|
// node_modules/lucide-react/dist/esm/icons/strikethrough.js
|
|
1298
|
-
var
|
|
1319
|
+
var __iconNode55, Strikethrough;
|
|
1299
1320
|
var init_strikethrough = __esm({
|
|
1300
1321
|
"node_modules/lucide-react/dist/esm/icons/strikethrough.js"() {
|
|
1301
1322
|
"use strict";
|
|
1302
1323
|
init_react_import();
|
|
1303
1324
|
init_createLucideIcon();
|
|
1304
|
-
|
|
1325
|
+
__iconNode55 = [
|
|
1305
1326
|
["path", { d: "M16 4H9a3 3 0 0 0-2.83 4", key: "43sutm" }],
|
|
1306
1327
|
["path", { d: "M14 12a4 4 0 0 1 0 8H6", key: "nlfj13" }],
|
|
1307
1328
|
["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }]
|
|
1308
1329
|
];
|
|
1309
|
-
Strikethrough = createLucideIcon("strikethrough",
|
|
1330
|
+
Strikethrough = createLucideIcon("strikethrough", __iconNode55);
|
|
1310
1331
|
}
|
|
1311
1332
|
});
|
|
1312
1333
|
|
|
1313
1334
|
// node_modules/lucide-react/dist/esm/icons/sun.js
|
|
1314
|
-
var
|
|
1335
|
+
var __iconNode56, Sun;
|
|
1315
1336
|
var init_sun = __esm({
|
|
1316
1337
|
"node_modules/lucide-react/dist/esm/icons/sun.js"() {
|
|
1317
1338
|
"use strict";
|
|
1318
1339
|
init_react_import();
|
|
1319
1340
|
init_createLucideIcon();
|
|
1320
|
-
|
|
1341
|
+
__iconNode56 = [
|
|
1321
1342
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
1322
1343
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
1323
1344
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -1328,190 +1349,190 @@ var init_sun = __esm({
|
|
|
1328
1349
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
1329
1350
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
1330
1351
|
];
|
|
1331
|
-
Sun = createLucideIcon("sun",
|
|
1352
|
+
Sun = createLucideIcon("sun", __iconNode56);
|
|
1332
1353
|
}
|
|
1333
1354
|
});
|
|
1334
1355
|
|
|
1335
1356
|
// node_modules/lucide-react/dist/esm/icons/tablet.js
|
|
1336
|
-
var
|
|
1357
|
+
var __iconNode57, Tablet;
|
|
1337
1358
|
var init_tablet = __esm({
|
|
1338
1359
|
"node_modules/lucide-react/dist/esm/icons/tablet.js"() {
|
|
1339
1360
|
"use strict";
|
|
1340
1361
|
init_react_import();
|
|
1341
1362
|
init_createLucideIcon();
|
|
1342
|
-
|
|
1363
|
+
__iconNode57 = [
|
|
1343
1364
|
["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", ry: "2", key: "76otgf" }],
|
|
1344
1365
|
["line", { x1: "12", x2: "12.01", y1: "18", y2: "18", key: "1dp563" }]
|
|
1345
1366
|
];
|
|
1346
|
-
Tablet = createLucideIcon("tablet",
|
|
1367
|
+
Tablet = createLucideIcon("tablet", __iconNode57);
|
|
1347
1368
|
}
|
|
1348
1369
|
});
|
|
1349
1370
|
|
|
1350
1371
|
// node_modules/lucide-react/dist/esm/icons/text-align-center.js
|
|
1351
|
-
var
|
|
1372
|
+
var __iconNode58, TextAlignCenter;
|
|
1352
1373
|
var init_text_align_center = __esm({
|
|
1353
1374
|
"node_modules/lucide-react/dist/esm/icons/text-align-center.js"() {
|
|
1354
1375
|
"use strict";
|
|
1355
1376
|
init_react_import();
|
|
1356
1377
|
init_createLucideIcon();
|
|
1357
|
-
|
|
1378
|
+
__iconNode58 = [
|
|
1358
1379
|
["path", { d: "M21 5H3", key: "1fi0y6" }],
|
|
1359
1380
|
["path", { d: "M17 12H7", key: "16if0g" }],
|
|
1360
1381
|
["path", { d: "M19 19H5", key: "vjpgq2" }]
|
|
1361
1382
|
];
|
|
1362
|
-
TextAlignCenter = createLucideIcon("text-align-center",
|
|
1383
|
+
TextAlignCenter = createLucideIcon("text-align-center", __iconNode58);
|
|
1363
1384
|
}
|
|
1364
1385
|
});
|
|
1365
1386
|
|
|
1366
1387
|
// node_modules/lucide-react/dist/esm/icons/text-align-end.js
|
|
1367
|
-
var
|
|
1388
|
+
var __iconNode59, TextAlignEnd;
|
|
1368
1389
|
var init_text_align_end = __esm({
|
|
1369
1390
|
"node_modules/lucide-react/dist/esm/icons/text-align-end.js"() {
|
|
1370
1391
|
"use strict";
|
|
1371
1392
|
init_react_import();
|
|
1372
1393
|
init_createLucideIcon();
|
|
1373
|
-
|
|
1394
|
+
__iconNode59 = [
|
|
1374
1395
|
["path", { d: "M21 5H3", key: "1fi0y6" }],
|
|
1375
1396
|
["path", { d: "M21 12H9", key: "dn1m92" }],
|
|
1376
1397
|
["path", { d: "M21 19H7", key: "4cu937" }]
|
|
1377
1398
|
];
|
|
1378
|
-
TextAlignEnd = createLucideIcon("text-align-end",
|
|
1399
|
+
TextAlignEnd = createLucideIcon("text-align-end", __iconNode59);
|
|
1379
1400
|
}
|
|
1380
1401
|
});
|
|
1381
1402
|
|
|
1382
1403
|
// node_modules/lucide-react/dist/esm/icons/text-align-justify.js
|
|
1383
|
-
var
|
|
1404
|
+
var __iconNode60, TextAlignJustify;
|
|
1384
1405
|
var init_text_align_justify = __esm({
|
|
1385
1406
|
"node_modules/lucide-react/dist/esm/icons/text-align-justify.js"() {
|
|
1386
1407
|
"use strict";
|
|
1387
1408
|
init_react_import();
|
|
1388
1409
|
init_createLucideIcon();
|
|
1389
|
-
|
|
1410
|
+
__iconNode60 = [
|
|
1390
1411
|
["path", { d: "M3 5h18", key: "1u36vt" }],
|
|
1391
1412
|
["path", { d: "M3 12h18", key: "1i2n21" }],
|
|
1392
1413
|
["path", { d: "M3 19h18", key: "awlh7x" }]
|
|
1393
1414
|
];
|
|
1394
|
-
TextAlignJustify = createLucideIcon("text-align-justify",
|
|
1415
|
+
TextAlignJustify = createLucideIcon("text-align-justify", __iconNode60);
|
|
1395
1416
|
}
|
|
1396
1417
|
});
|
|
1397
1418
|
|
|
1398
1419
|
// node_modules/lucide-react/dist/esm/icons/text-align-start.js
|
|
1399
|
-
var
|
|
1420
|
+
var __iconNode61, TextAlignStart;
|
|
1400
1421
|
var init_text_align_start = __esm({
|
|
1401
1422
|
"node_modules/lucide-react/dist/esm/icons/text-align-start.js"() {
|
|
1402
1423
|
"use strict";
|
|
1403
1424
|
init_react_import();
|
|
1404
1425
|
init_createLucideIcon();
|
|
1405
|
-
|
|
1426
|
+
__iconNode61 = [
|
|
1406
1427
|
["path", { d: "M21 5H3", key: "1fi0y6" }],
|
|
1407
1428
|
["path", { d: "M15 12H3", key: "6jk70r" }],
|
|
1408
1429
|
["path", { d: "M17 19H3", key: "z6ezky" }]
|
|
1409
1430
|
];
|
|
1410
|
-
TextAlignStart = createLucideIcon("text-align-start",
|
|
1431
|
+
TextAlignStart = createLucideIcon("text-align-start", __iconNode61);
|
|
1411
1432
|
}
|
|
1412
1433
|
});
|
|
1413
1434
|
|
|
1414
1435
|
// node_modules/lucide-react/dist/esm/icons/toy-brick.js
|
|
1415
|
-
var
|
|
1436
|
+
var __iconNode62, ToyBrick;
|
|
1416
1437
|
var init_toy_brick = __esm({
|
|
1417
1438
|
"node_modules/lucide-react/dist/esm/icons/toy-brick.js"() {
|
|
1418
1439
|
"use strict";
|
|
1419
1440
|
init_react_import();
|
|
1420
1441
|
init_createLucideIcon();
|
|
1421
|
-
|
|
1442
|
+
__iconNode62 = [
|
|
1422
1443
|
["rect", { width: "18", height: "12", x: "3", y: "8", rx: "1", key: "158fvp" }],
|
|
1423
1444
|
["path", { d: "M10 8V5c0-.6-.4-1-1-1H6a1 1 0 0 0-1 1v3", key: "s0042v" }],
|
|
1424
1445
|
["path", { d: "M19 8V5c0-.6-.4-1-1-1h-3a1 1 0 0 0-1 1v3", key: "9wmeh2" }]
|
|
1425
1446
|
];
|
|
1426
|
-
ToyBrick = createLucideIcon("toy-brick",
|
|
1447
|
+
ToyBrick = createLucideIcon("toy-brick", __iconNode62);
|
|
1427
1448
|
}
|
|
1428
1449
|
});
|
|
1429
1450
|
|
|
1430
1451
|
// node_modules/lucide-react/dist/esm/icons/trash.js
|
|
1431
|
-
var
|
|
1452
|
+
var __iconNode63, Trash;
|
|
1432
1453
|
var init_trash = __esm({
|
|
1433
1454
|
"node_modules/lucide-react/dist/esm/icons/trash.js"() {
|
|
1434
1455
|
"use strict";
|
|
1435
1456
|
init_react_import();
|
|
1436
1457
|
init_createLucideIcon();
|
|
1437
|
-
|
|
1458
|
+
__iconNode63 = [
|
|
1438
1459
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
1439
1460
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
1440
1461
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
1441
1462
|
];
|
|
1442
|
-
Trash = createLucideIcon("trash",
|
|
1463
|
+
Trash = createLucideIcon("trash", __iconNode63);
|
|
1443
1464
|
}
|
|
1444
1465
|
});
|
|
1445
1466
|
|
|
1446
1467
|
// node_modules/lucide-react/dist/esm/icons/type.js
|
|
1447
|
-
var
|
|
1468
|
+
var __iconNode64, Type;
|
|
1448
1469
|
var init_type = __esm({
|
|
1449
1470
|
"node_modules/lucide-react/dist/esm/icons/type.js"() {
|
|
1450
1471
|
"use strict";
|
|
1451
1472
|
init_react_import();
|
|
1452
1473
|
init_createLucideIcon();
|
|
1453
|
-
|
|
1474
|
+
__iconNode64 = [
|
|
1454
1475
|
["path", { d: "M12 4v16", key: "1654pz" }],
|
|
1455
1476
|
["path", { d: "M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2", key: "e0r10z" }],
|
|
1456
1477
|
["path", { d: "M9 20h6", key: "s66wpe" }]
|
|
1457
1478
|
];
|
|
1458
|
-
Type = createLucideIcon("type",
|
|
1479
|
+
Type = createLucideIcon("type", __iconNode64);
|
|
1459
1480
|
}
|
|
1460
1481
|
});
|
|
1461
1482
|
|
|
1462
1483
|
// node_modules/lucide-react/dist/esm/icons/underline.js
|
|
1463
|
-
var
|
|
1484
|
+
var __iconNode65, Underline;
|
|
1464
1485
|
var init_underline = __esm({
|
|
1465
1486
|
"node_modules/lucide-react/dist/esm/icons/underline.js"() {
|
|
1466
1487
|
"use strict";
|
|
1467
1488
|
init_react_import();
|
|
1468
1489
|
init_createLucideIcon();
|
|
1469
|
-
|
|
1490
|
+
__iconNode65 = [
|
|
1470
1491
|
["path", { d: "M6 4v6a6 6 0 0 0 12 0V4", key: "9kb039" }],
|
|
1471
1492
|
["line", { x1: "4", x2: "20", y1: "20", y2: "20", key: "nun2al" }]
|
|
1472
1493
|
];
|
|
1473
|
-
Underline = createLucideIcon("underline",
|
|
1494
|
+
Underline = createLucideIcon("underline", __iconNode65);
|
|
1474
1495
|
}
|
|
1475
1496
|
});
|
|
1476
1497
|
|
|
1477
1498
|
// node_modules/lucide-react/dist/esm/icons/undo-2.js
|
|
1478
|
-
var
|
|
1499
|
+
var __iconNode66, Undo2;
|
|
1479
1500
|
var init_undo_2 = __esm({
|
|
1480
1501
|
"node_modules/lucide-react/dist/esm/icons/undo-2.js"() {
|
|
1481
1502
|
"use strict";
|
|
1482
1503
|
init_react_import();
|
|
1483
1504
|
init_createLucideIcon();
|
|
1484
|
-
|
|
1505
|
+
__iconNode66 = [
|
|
1485
1506
|
["path", { d: "M9 14 4 9l5-5", key: "102s5s" }],
|
|
1486
1507
|
["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11", key: "f3b9sd" }]
|
|
1487
1508
|
];
|
|
1488
|
-
Undo2 = createLucideIcon("undo-2",
|
|
1509
|
+
Undo2 = createLucideIcon("undo-2", __iconNode66);
|
|
1489
1510
|
}
|
|
1490
1511
|
});
|
|
1491
1512
|
|
|
1492
1513
|
// node_modules/lucide-react/dist/esm/icons/x.js
|
|
1493
|
-
var
|
|
1514
|
+
var __iconNode67, X;
|
|
1494
1515
|
var init_x = __esm({
|
|
1495
1516
|
"node_modules/lucide-react/dist/esm/icons/x.js"() {
|
|
1496
1517
|
"use strict";
|
|
1497
1518
|
init_react_import();
|
|
1498
1519
|
init_createLucideIcon();
|
|
1499
|
-
|
|
1520
|
+
__iconNode67 = [
|
|
1500
1521
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
1501
1522
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
1502
1523
|
];
|
|
1503
|
-
X = createLucideIcon("x",
|
|
1524
|
+
X = createLucideIcon("x", __iconNode67);
|
|
1504
1525
|
}
|
|
1505
1526
|
});
|
|
1506
1527
|
|
|
1507
1528
|
// node_modules/lucide-react/dist/esm/icons/zap.js
|
|
1508
|
-
var
|
|
1529
|
+
var __iconNode68, Zap;
|
|
1509
1530
|
var init_zap = __esm({
|
|
1510
1531
|
"node_modules/lucide-react/dist/esm/icons/zap.js"() {
|
|
1511
1532
|
"use strict";
|
|
1512
1533
|
init_react_import();
|
|
1513
1534
|
init_createLucideIcon();
|
|
1514
|
-
|
|
1535
|
+
__iconNode68 = [
|
|
1515
1536
|
[
|
|
1516
1537
|
"path",
|
|
1517
1538
|
{
|
|
@@ -1520,40 +1541,40 @@ var init_zap = __esm({
|
|
|
1520
1541
|
}
|
|
1521
1542
|
]
|
|
1522
1543
|
];
|
|
1523
|
-
Zap = createLucideIcon("zap",
|
|
1544
|
+
Zap = createLucideIcon("zap", __iconNode68);
|
|
1524
1545
|
}
|
|
1525
1546
|
});
|
|
1526
1547
|
|
|
1527
1548
|
// node_modules/lucide-react/dist/esm/icons/zoom-in.js
|
|
1528
|
-
var
|
|
1549
|
+
var __iconNode69, ZoomIn;
|
|
1529
1550
|
var init_zoom_in = __esm({
|
|
1530
1551
|
"node_modules/lucide-react/dist/esm/icons/zoom-in.js"() {
|
|
1531
1552
|
"use strict";
|
|
1532
1553
|
init_react_import();
|
|
1533
1554
|
init_createLucideIcon();
|
|
1534
|
-
|
|
1555
|
+
__iconNode69 = [
|
|
1535
1556
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
1536
1557
|
["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
|
|
1537
1558
|
["line", { x1: "11", x2: "11", y1: "8", y2: "14", key: "1vmskp" }],
|
|
1538
1559
|
["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
|
|
1539
1560
|
];
|
|
1540
|
-
ZoomIn = createLucideIcon("zoom-in",
|
|
1561
|
+
ZoomIn = createLucideIcon("zoom-in", __iconNode69);
|
|
1541
1562
|
}
|
|
1542
1563
|
});
|
|
1543
1564
|
|
|
1544
1565
|
// node_modules/lucide-react/dist/esm/icons/zoom-out.js
|
|
1545
|
-
var
|
|
1566
|
+
var __iconNode70, ZoomOut;
|
|
1546
1567
|
var init_zoom_out = __esm({
|
|
1547
1568
|
"node_modules/lucide-react/dist/esm/icons/zoom-out.js"() {
|
|
1548
1569
|
"use strict";
|
|
1549
1570
|
init_react_import();
|
|
1550
1571
|
init_createLucideIcon();
|
|
1551
|
-
|
|
1572
|
+
__iconNode70 = [
|
|
1552
1573
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
1553
1574
|
["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
|
|
1554
1575
|
["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
|
|
1555
1576
|
];
|
|
1556
|
-
ZoomOut = createLucideIcon("zoom-out",
|
|
1577
|
+
ZoomOut = createLucideIcon("zoom-out", __iconNode70);
|
|
1557
1578
|
}
|
|
1558
1579
|
});
|
|
1559
1580
|
|
|
@@ -1595,6 +1616,7 @@ var init_lucide_react = __esm({
|
|
|
1595
1616
|
init_heading_6();
|
|
1596
1617
|
init_heading();
|
|
1597
1618
|
init_image();
|
|
1619
|
+
init_inbox();
|
|
1598
1620
|
init_info();
|
|
1599
1621
|
init_italic();
|
|
1600
1622
|
init_layout_dashboard();
|
|
@@ -8309,11 +8331,11 @@ function RichTextRender({
|
|
|
8309
8331
|
}) {
|
|
8310
8332
|
const { tiptap = {}, options } = field;
|
|
8311
8333
|
const { extensions = [] } = tiptap;
|
|
8312
|
-
const loadedExtensions = (0,
|
|
8334
|
+
const loadedExtensions = (0, import_react66.useMemo)(
|
|
8313
8335
|
() => [CredBuildRichText.configure(options), ...extensions],
|
|
8314
8336
|
[extensions, options]
|
|
8315
8337
|
);
|
|
8316
|
-
const normalized = (0,
|
|
8338
|
+
const normalized = (0, import_react66.useMemo)(() => {
|
|
8317
8339
|
if (typeof content === "object" && content?.type === "doc") {
|
|
8318
8340
|
return content;
|
|
8319
8341
|
}
|
|
@@ -8331,18 +8353,18 @@ function RichTextRender({
|
|
|
8331
8353
|
}
|
|
8332
8354
|
return { type: "doc", content: [] };
|
|
8333
8355
|
}, [content, loadedExtensions]);
|
|
8334
|
-
const html = (0,
|
|
8356
|
+
const html = (0, import_react66.useMemo)(() => {
|
|
8335
8357
|
return (0, import_html.generateHTML)(normalized, loadedExtensions);
|
|
8336
8358
|
}, [normalized, loadedExtensions]);
|
|
8337
8359
|
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: getClassName24(), children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "rich-text", dangerouslySetInnerHTML: { __html: html } }) });
|
|
8338
8360
|
}
|
|
8339
|
-
var import_html,
|
|
8361
|
+
var import_html, import_react66, import_jsx_runtime63, getClassName24;
|
|
8340
8362
|
var init_Render = __esm({
|
|
8341
8363
|
"components/RichTextEditor/components/Render.tsx"() {
|
|
8342
8364
|
"use strict";
|
|
8343
8365
|
init_react_import();
|
|
8344
8366
|
import_html = require("@tiptap/html");
|
|
8345
|
-
|
|
8367
|
+
import_react66 = require("react");
|
|
8346
8368
|
init_get_class_name_factory();
|
|
8347
8369
|
init_styles_module10();
|
|
8348
8370
|
init_extension();
|
|
@@ -8465,7 +8487,8 @@ var SliderField = ({
|
|
|
8465
8487
|
step = 1,
|
|
8466
8488
|
unit = "px",
|
|
8467
8489
|
defaultValue = 0,
|
|
8468
|
-
useUnits = true
|
|
8490
|
+
useUnits = true,
|
|
8491
|
+
style = {}
|
|
8469
8492
|
}) => {
|
|
8470
8493
|
const parseValue = (val) => {
|
|
8471
8494
|
if (typeof val === "number") return val;
|
|
@@ -8496,7 +8519,7 @@ var SliderField = ({
|
|
|
8496
8519
|
const newUnit = e.target.value;
|
|
8497
8520
|
onChange(`${numericValue}${newUnit}`);
|
|
8498
8521
|
};
|
|
8499
|
-
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { style: { padding: "
|
|
8522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { style: { padding: "0", ...style }, children: [
|
|
8500
8523
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("style", { dangerouslySetInnerHTML: { __html: `
|
|
8501
8524
|
.cb-slider-input {
|
|
8502
8525
|
-webkit-appearance: none;
|
|
@@ -8601,7 +8624,7 @@ var SliderField = ({
|
|
|
8601
8624
|
|
|
8602
8625
|
// components/AutoField/fields/ResponsiveSliderField/index.tsx
|
|
8603
8626
|
init_react_import();
|
|
8604
|
-
|
|
8627
|
+
init_store2();
|
|
8605
8628
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
8606
8629
|
var DesktopIcon = () => /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
8607
8630
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2", ry: "2" }),
|
|
@@ -8626,7 +8649,39 @@ var ResponsiveSliderField = ({
|
|
|
8626
8649
|
step = 1,
|
|
8627
8650
|
defaultValue = 0
|
|
8628
8651
|
}) => {
|
|
8629
|
-
const
|
|
8652
|
+
const setUi = useAppStore((s) => s.setUi);
|
|
8653
|
+
const viewportsState = useAppStore((s) => s.state.ui.viewports);
|
|
8654
|
+
const zoomConfig = useAppStore((s) => s.zoomConfig);
|
|
8655
|
+
const setZoomConfig = useAppStore((s) => s.setZoomConfig);
|
|
8656
|
+
const viewportConfigOptions = useAppStore((s) => s.viewports);
|
|
8657
|
+
const getModeFromWidth = (width) => {
|
|
8658
|
+
if (width === "100%") return "desktop";
|
|
8659
|
+
const w = typeof width === "string" ? parseInt(width) : width;
|
|
8660
|
+
if (w <= 480) return "mobile";
|
|
8661
|
+
if (w <= 900) return "tablet";
|
|
8662
|
+
return "desktop";
|
|
8663
|
+
};
|
|
8664
|
+
const mode = getModeFromWidth(viewportsState.current.width);
|
|
8665
|
+
const changeGlobalViewport = (targetMode) => {
|
|
8666
|
+
const targetIcon = targetMode === "mobile" ? "Smartphone" : targetMode === "tablet" ? "Tablet" : "Monitor";
|
|
8667
|
+
const matched = viewportConfigOptions.find((v) => v.icon === targetIcon) || viewportConfigOptions.find((v) => {
|
|
8668
|
+
if (targetMode === "mobile") return v.width !== "100%" && parseInt(String(v.width)) <= 480;
|
|
8669
|
+
if (targetMode === "tablet") return v.width !== "100%" && parseInt(String(v.width)) > 480 && parseInt(String(v.width)) <= 900;
|
|
8670
|
+
return v.width === "100%" || parseInt(String(v.width)) > 900;
|
|
8671
|
+
}) || viewportConfigOptions[0];
|
|
8672
|
+
const isFullWidth = matched.width === "100%";
|
|
8673
|
+
const uiViewport = {
|
|
8674
|
+
...matched,
|
|
8675
|
+
height: matched.height || "auto",
|
|
8676
|
+
zoom: isFullWidth ? 1 : zoomConfig.zoom
|
|
8677
|
+
};
|
|
8678
|
+
if (isFullWidth) {
|
|
8679
|
+
setZoomConfig({ ...zoomConfig, zoom: 1 });
|
|
8680
|
+
}
|
|
8681
|
+
setUi({
|
|
8682
|
+
viewports: { ...viewportsState, current: uiViewport }
|
|
8683
|
+
});
|
|
8684
|
+
};
|
|
8630
8685
|
const getCurrentValue = () => {
|
|
8631
8686
|
const val = value?.[mode];
|
|
8632
8687
|
if (val !== void 0 && val !== null) {
|
|
@@ -8654,34 +8709,37 @@ var ResponsiveSliderField = ({
|
|
|
8654
8709
|
[mode]: newVal
|
|
8655
8710
|
});
|
|
8656
8711
|
};
|
|
8657
|
-
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "2px" }, children: [
|
|
8658
|
-
/* @__PURE__ */ (0, import_jsx_runtime57.
|
|
8659
|
-
|
|
8660
|
-
|
|
8661
|
-
|
|
8662
|
-
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8668
|
-
|
|
8669
|
-
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
] })
|
|
8712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "2px", width: "100%" }, children: [
|
|
8713
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "2px" }, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("label", { style: {
|
|
8714
|
+
fontSize: "10px",
|
|
8715
|
+
fontWeight: 600,
|
|
8716
|
+
color: "var(--cb-silver-muted, #71717a)",
|
|
8717
|
+
display: "flex",
|
|
8718
|
+
alignItems: "center",
|
|
8719
|
+
gap: "4px",
|
|
8720
|
+
textTransform: "uppercase",
|
|
8721
|
+
letterSpacing: "0.05em"
|
|
8722
|
+
}, children: [
|
|
8723
|
+
label,
|
|
8724
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { style: { fontSize: "9px", opacity: 0.5, fontWeight: "400" }, children: [
|
|
8725
|
+
"(",
|
|
8726
|
+
mode,
|
|
8727
|
+
")"
|
|
8728
|
+
] })
|
|
8729
|
+
] }) }),
|
|
8730
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px", width: "100%" }, children: [
|
|
8674
8731
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { style: {
|
|
8675
8732
|
display: "flex",
|
|
8676
8733
|
backgroundColor: "var(--cb-bg-panel, #f1f5f9)",
|
|
8677
8734
|
borderRadius: "4px",
|
|
8678
8735
|
padding: "1px",
|
|
8679
|
-
border: "1px solid var(--cb-border, #e2e8f0)"
|
|
8736
|
+
border: "1px solid var(--cb-border, #e2e8f0)",
|
|
8737
|
+
flexShrink: 0
|
|
8680
8738
|
}, children: [
|
|
8681
8739
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
8682
8740
|
"button",
|
|
8683
8741
|
{
|
|
8684
|
-
onClick: () =>
|
|
8742
|
+
onClick: () => changeGlobalViewport("desktop"),
|
|
8685
8743
|
style: {
|
|
8686
8744
|
padding: "2px 5px",
|
|
8687
8745
|
border: "none",
|
|
@@ -8701,7 +8759,7 @@ var ResponsiveSliderField = ({
|
|
|
8701
8759
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
8702
8760
|
"button",
|
|
8703
8761
|
{
|
|
8704
|
-
onClick: () =>
|
|
8762
|
+
onClick: () => changeGlobalViewport("tablet"),
|
|
8705
8763
|
style: {
|
|
8706
8764
|
padding: "2px 5px",
|
|
8707
8765
|
border: "none",
|
|
@@ -8721,7 +8779,7 @@ var ResponsiveSliderField = ({
|
|
|
8721
8779
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
8722
8780
|
"button",
|
|
8723
8781
|
{
|
|
8724
|
-
onClick: () =>
|
|
8782
|
+
onClick: () => changeGlobalViewport("mobile"),
|
|
8725
8783
|
style: {
|
|
8726
8784
|
padding: "2px 5px",
|
|
8727
8785
|
border: "none",
|
|
@@ -8738,20 +8796,20 @@ var ResponsiveSliderField = ({
|
|
|
8738
8796
|
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(MobileIcon, {})
|
|
8739
8797
|
}
|
|
8740
8798
|
)
|
|
8741
|
-
] })
|
|
8742
|
-
|
|
8743
|
-
|
|
8744
|
-
|
|
8745
|
-
|
|
8746
|
-
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
|
|
8750
|
-
|
|
8751
|
-
|
|
8752
|
-
|
|
8753
|
-
}
|
|
8754
|
-
)
|
|
8799
|
+
] }),
|
|
8800
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { style: { flex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
8801
|
+
SliderField,
|
|
8802
|
+
{
|
|
8803
|
+
value: getCurrentValue(),
|
|
8804
|
+
onChange: handleChange,
|
|
8805
|
+
unit,
|
|
8806
|
+
max,
|
|
8807
|
+
min,
|
|
8808
|
+
step,
|
|
8809
|
+
useUnits: false
|
|
8810
|
+
}
|
|
8811
|
+
) })
|
|
8812
|
+
] })
|
|
8755
8813
|
] });
|
|
8756
8814
|
};
|
|
8757
8815
|
|
|
@@ -8834,23 +8892,23 @@ var styles_module_default14 = { "Drawer": "_Drawer_1bd7y_1", "Drawer-draggable":
|
|
|
8834
8892
|
// components/Drawer/index.tsx
|
|
8835
8893
|
init_get_class_name_factory();
|
|
8836
8894
|
init_DragIcon();
|
|
8837
|
-
var
|
|
8895
|
+
var import_react54 = require("react");
|
|
8838
8896
|
init_generate_id();
|
|
8839
8897
|
|
|
8840
8898
|
// components/DragDropContext/context.tsx
|
|
8841
8899
|
init_react_import();
|
|
8842
|
-
var
|
|
8843
|
-
var dragListenerContext = (0,
|
|
8900
|
+
var import_react53 = require("react");
|
|
8901
|
+
var dragListenerContext = (0, import_react53.createContext)({
|
|
8844
8902
|
dragListeners: {}
|
|
8845
8903
|
});
|
|
8846
8904
|
function useDragListener(type, fn, deps = []) {
|
|
8847
|
-
const { setDragListeners } = (0,
|
|
8848
|
-
const id = (0,
|
|
8849
|
-
const fnRef = (0,
|
|
8850
|
-
(0,
|
|
8905
|
+
const { setDragListeners } = (0, import_react53.useContext)(dragListenerContext);
|
|
8906
|
+
const id = (0, import_react53.useId)();
|
|
8907
|
+
const fnRef = (0, import_react53.useRef)(fn);
|
|
8908
|
+
(0, import_react53.useEffect)(() => {
|
|
8851
8909
|
fnRef.current = fn;
|
|
8852
8910
|
}, [fn]);
|
|
8853
|
-
(0,
|
|
8911
|
+
(0, import_react53.useEffect)(() => {
|
|
8854
8912
|
if (setDragListeners) {
|
|
8855
8913
|
const wrappedFn = ((...args) => {
|
|
8856
8914
|
return fnRef.current(...args);
|
|
@@ -8871,7 +8929,7 @@ function useDragListener(type, fn, deps = []) {
|
|
|
8871
8929
|
|
|
8872
8930
|
// components/Drawer/index.tsx
|
|
8873
8931
|
init_use_safe_id();
|
|
8874
|
-
var
|
|
8932
|
+
var import_react55 = require("@dnd-kit/react");
|
|
8875
8933
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
8876
8934
|
var getClassName21 = get_class_name_factory_default("Drawer", styles_module_default14);
|
|
8877
8935
|
var getClassNameItem2 = get_class_name_factory_default("DrawerItem", styles_module_default14);
|
|
@@ -8882,7 +8940,7 @@ var DrawerItemInner = ({
|
|
|
8882
8940
|
dragRef,
|
|
8883
8941
|
isDragDisabled
|
|
8884
8942
|
}) => {
|
|
8885
|
-
const CustomInner = (0,
|
|
8943
|
+
const CustomInner = (0, import_react54.useMemo)(
|
|
8886
8944
|
() => children || (({ children: children2 }) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: getClassNameItem2("default"), children: children2 })),
|
|
8887
8945
|
[children]
|
|
8888
8946
|
);
|
|
@@ -8908,7 +8966,7 @@ var DrawerItemDraggable = ({
|
|
|
8908
8966
|
id,
|
|
8909
8967
|
isDragDisabled
|
|
8910
8968
|
}) => {
|
|
8911
|
-
const { ref } = (0,
|
|
8969
|
+
const { ref } = (0, import_react55.useDraggable)({
|
|
8912
8970
|
id,
|
|
8913
8971
|
data: { componentType: name },
|
|
8914
8972
|
disabled: isDragDisabled,
|
|
@@ -8937,7 +8995,7 @@ var DrawerItem = ({
|
|
|
8937
8995
|
isDragDisabled
|
|
8938
8996
|
}) => {
|
|
8939
8997
|
const resolvedId = id || name;
|
|
8940
|
-
const [dynamicId, setDynamicId] = (0,
|
|
8998
|
+
const [dynamicId, setDynamicId] = (0, import_react54.useState)(generateId(resolvedId));
|
|
8941
8999
|
if (typeof index !== "undefined") {
|
|
8942
9000
|
console.error(
|
|
8943
9001
|
"Warning: The `index` prop on Drawer.Item is deprecated and no longer required."
|
|
@@ -8977,7 +9035,7 @@ var Drawer = ({
|
|
|
8977
9035
|
);
|
|
8978
9036
|
}
|
|
8979
9037
|
const id = useSafeId();
|
|
8980
|
-
const { ref } = (0,
|
|
9038
|
+
const { ref } = (0, import_react55.useDroppable)({
|
|
8981
9039
|
id,
|
|
8982
9040
|
type: "void",
|
|
8983
9041
|
collisionPriority: 0
|
|
@@ -8999,11 +9057,11 @@ Drawer.Item = DrawerItem;
|
|
|
8999
9057
|
|
|
9000
9058
|
// components/DropZone/index.tsx
|
|
9001
9059
|
init_react_import();
|
|
9002
|
-
var
|
|
9060
|
+
var import_react74 = require("react");
|
|
9003
9061
|
|
|
9004
9062
|
// components/DraggableComponent/index.tsx
|
|
9005
9063
|
init_react_import();
|
|
9006
|
-
var
|
|
9064
|
+
var import_react58 = require("react");
|
|
9007
9065
|
|
|
9008
9066
|
// css-module:/home/crediblemark/Project/Credibuild/components/DraggableComponent/styles.module.css#css-module
|
|
9009
9067
|
init_react_import();
|
|
@@ -9019,12 +9077,12 @@ var import_react_dom2 = require("react-dom");
|
|
|
9019
9077
|
|
|
9020
9078
|
// components/DropZone/context.tsx
|
|
9021
9079
|
init_react_import();
|
|
9022
|
-
var
|
|
9080
|
+
var import_react56 = require("react");
|
|
9023
9081
|
init_store2();
|
|
9024
9082
|
var import_zustand5 = require("zustand");
|
|
9025
9083
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
9026
|
-
var dropZoneContext = (0,
|
|
9027
|
-
var ZoneStoreContext = (0,
|
|
9084
|
+
var dropZoneContext = (0, import_react56.createContext)(null);
|
|
9085
|
+
var ZoneStoreContext = (0, import_react56.createContext)(
|
|
9028
9086
|
(0, import_zustand5.createStore)(() => ({
|
|
9029
9087
|
zoneDepthIndex: {},
|
|
9030
9088
|
nextZoneDepthIndex: {},
|
|
@@ -9052,7 +9110,7 @@ var DropZoneProvider = ({
|
|
|
9052
9110
|
value
|
|
9053
9111
|
}) => {
|
|
9054
9112
|
const dispatch = useAppStore((s) => s.dispatch);
|
|
9055
|
-
const registerZone = (0,
|
|
9113
|
+
const registerZone = (0, import_react56.useCallback)(
|
|
9056
9114
|
(zoneCompound) => {
|
|
9057
9115
|
dispatch({
|
|
9058
9116
|
type: "registerZone",
|
|
@@ -9061,7 +9119,7 @@ var DropZoneProvider = ({
|
|
|
9061
9119
|
},
|
|
9062
9120
|
[dispatch]
|
|
9063
9121
|
);
|
|
9064
|
-
const memoValue = (0,
|
|
9122
|
+
const memoValue = (0, import_react56.useMemo)(
|
|
9065
9123
|
() => ({
|
|
9066
9124
|
registerZone,
|
|
9067
9125
|
...value
|
|
@@ -9101,11 +9159,11 @@ init_use_context_store();
|
|
|
9101
9159
|
|
|
9102
9160
|
// lib/dnd/use-on-drag-finished.ts
|
|
9103
9161
|
init_react_import();
|
|
9104
|
-
var
|
|
9162
|
+
var import_react57 = require("react");
|
|
9105
9163
|
init_store2();
|
|
9106
9164
|
var useOnDragFinished = (cb, _deps = []) => {
|
|
9107
9165
|
const appStore = useAppStoreApi();
|
|
9108
|
-
return (0,
|
|
9166
|
+
return (0, import_react57.useCallback)(() => {
|
|
9109
9167
|
let dispose = () => {
|
|
9110
9168
|
};
|
|
9111
9169
|
const processDragging = (isDragging2) => {
|
|
@@ -9198,10 +9256,10 @@ var DraggableComponent = ({
|
|
|
9198
9256
|
const overrides = useAppStore((s) => s.overrides);
|
|
9199
9257
|
const dispatch = useAppStore((s) => s.dispatch);
|
|
9200
9258
|
const iframe = useAppStore((s) => s.iframe);
|
|
9201
|
-
const lastMeasureRef = (0,
|
|
9202
|
-
const ctx = (0,
|
|
9203
|
-
const [localZones, setLocalZones] = (0,
|
|
9204
|
-
const registerLocalZone = (0,
|
|
9259
|
+
const lastMeasureRef = (0, import_react58.useRef)(0);
|
|
9260
|
+
const ctx = (0, import_react58.useContext)(dropZoneContext);
|
|
9261
|
+
const [localZones, setLocalZones] = (0, import_react58.useState)({});
|
|
9262
|
+
const registerLocalZone = (0, import_react58.useCallback)(
|
|
9205
9263
|
(zoneCompound2, active) => {
|
|
9206
9264
|
ctx?.registerLocalZone?.(zoneCompound2, active);
|
|
9207
9265
|
setLocalZones((obj) => ({
|
|
@@ -9211,7 +9269,7 @@ var DraggableComponent = ({
|
|
|
9211
9269
|
},
|
|
9212
9270
|
[setLocalZones, ctx]
|
|
9213
9271
|
);
|
|
9214
|
-
const unregisterLocalZone = (0,
|
|
9272
|
+
const unregisterLocalZone = (0, import_react58.useCallback)(
|
|
9215
9273
|
(zoneCompound2) => {
|
|
9216
9274
|
ctx?.unregisterLocalZone?.(zoneCompound2);
|
|
9217
9275
|
setLocalZones((obj) => {
|
|
@@ -9232,9 +9290,9 @@ var DraggableComponent = ({
|
|
|
9232
9290
|
return s.permissions.getPermissions({ item });
|
|
9233
9291
|
})
|
|
9234
9292
|
);
|
|
9235
|
-
const zoneStore = (0,
|
|
9236
|
-
const [dragAxis, setDragAxis] = (0,
|
|
9237
|
-
const dynamicCollisionDetector = (0,
|
|
9293
|
+
const zoneStore = (0, import_react58.useContext)(ZoneStoreContext);
|
|
9294
|
+
const [dragAxis, setDragAxis] = (0, import_react58.useState)(userDragAxis || autoDragAxis);
|
|
9295
|
+
const dynamicCollisionDetector = (0, import_react58.useMemo)(
|
|
9238
9296
|
() => createDynamicCollisionDetector(dragAxis),
|
|
9239
9297
|
[dragAxis]
|
|
9240
9298
|
);
|
|
@@ -9266,7 +9324,7 @@ var DraggableComponent = ({
|
|
|
9266
9324
|
},
|
|
9267
9325
|
feedback: "clone"
|
|
9268
9326
|
});
|
|
9269
|
-
(0,
|
|
9327
|
+
(0, import_react58.useEffect)(() => {
|
|
9270
9328
|
const isEnabled = zoneStore.getState().enabledIndex[zoneCompound];
|
|
9271
9329
|
sortable.droppable.disabled = !isEnabled;
|
|
9272
9330
|
sortable.draggable.disabled = !permissions.drag;
|
|
@@ -9282,9 +9340,9 @@ var DraggableComponent = ({
|
|
|
9282
9340
|
}
|
|
9283
9341
|
return cleanup;
|
|
9284
9342
|
}, [permissions.drag, zoneCompound, sortable.draggable, sortable.droppable, zoneStore]);
|
|
9285
|
-
const [, setRerender] = (0,
|
|
9286
|
-
const ref = (0,
|
|
9287
|
-
const refSetter = (0,
|
|
9343
|
+
const [, setRerender] = (0, import_react58.useState)(0);
|
|
9344
|
+
const ref = (0, import_react58.useRef)(null);
|
|
9345
|
+
const refSetter = (0, import_react58.useCallback)(
|
|
9288
9346
|
(el) => {
|
|
9289
9347
|
sortableRef(el);
|
|
9290
9348
|
if (ref.current !== el) {
|
|
@@ -9297,13 +9355,13 @@ var DraggableComponent = ({
|
|
|
9297
9355
|
},
|
|
9298
9356
|
[itemRef, sortableRef]
|
|
9299
9357
|
);
|
|
9300
|
-
const [portalEl, setPortalEl] = (0,
|
|
9301
|
-
(0,
|
|
9358
|
+
const [portalEl, setPortalEl] = (0, import_react58.useState)();
|
|
9359
|
+
(0, import_react58.useEffect)(() => {
|
|
9302
9360
|
setPortalEl(
|
|
9303
9361
|
iframe.enabled ? ref.current?.ownerDocument.body : ref.current?.closest("[data-credbuild-preview]") ?? document.body
|
|
9304
9362
|
);
|
|
9305
9363
|
}, [iframe.enabled]);
|
|
9306
|
-
const getStyle = (0,
|
|
9364
|
+
const getStyle = (0, import_react58.useCallback)(() => {
|
|
9307
9365
|
if (!ref.current) return;
|
|
9308
9366
|
const el = ref.current;
|
|
9309
9367
|
const rect = el.getBoundingClientRect();
|
|
@@ -9334,23 +9392,23 @@ var DraggableComponent = ({
|
|
|
9334
9392
|
};
|
|
9335
9393
|
return style2;
|
|
9336
9394
|
}, [iframe.enabled]);
|
|
9337
|
-
const [style, setStyle] = (0,
|
|
9338
|
-
const lastRectRef = (0,
|
|
9339
|
-
const syncRafRef = (0,
|
|
9340
|
-
const sync = (0,
|
|
9395
|
+
const [style, setStyle] = (0, import_react58.useState)();
|
|
9396
|
+
const lastRectRef = (0, import_react58.useRef)(null);
|
|
9397
|
+
const syncRafRef = (0, import_react58.useRef)(null);
|
|
9398
|
+
const sync = (0, import_react58.useCallback)(() => {
|
|
9341
9399
|
setStyle(getStyle());
|
|
9342
9400
|
if (itemRef) {
|
|
9343
9401
|
assignRefs([itemRef], ref.current);
|
|
9344
9402
|
}
|
|
9345
9403
|
}, [getStyle, itemRef]);
|
|
9346
|
-
const scheduleSync = (0,
|
|
9404
|
+
const scheduleSync = (0, import_react58.useCallback)(() => {
|
|
9347
9405
|
if (syncRafRef.current != null) return;
|
|
9348
9406
|
syncRafRef.current = requestAnimationFrame(() => {
|
|
9349
9407
|
syncRafRef.current = null;
|
|
9350
9408
|
sync();
|
|
9351
9409
|
});
|
|
9352
9410
|
}, [sync]);
|
|
9353
|
-
(0,
|
|
9411
|
+
(0, import_react58.useEffect)(() => {
|
|
9354
9412
|
return () => {
|
|
9355
9413
|
if (syncRafRef.current != null) {
|
|
9356
9414
|
cancelAnimationFrame(syncRafRef.current);
|
|
@@ -9358,7 +9416,7 @@ var DraggableComponent = ({
|
|
|
9358
9416
|
}
|
|
9359
9417
|
};
|
|
9360
9418
|
}, []);
|
|
9361
|
-
(0,
|
|
9419
|
+
(0, import_react58.useEffect)(() => {
|
|
9362
9420
|
if (ref.current) {
|
|
9363
9421
|
const observer = new ResizeObserver(() => {
|
|
9364
9422
|
scheduleSync();
|
|
@@ -9371,37 +9429,37 @@ var DraggableComponent = ({
|
|
|
9371
9429
|
}, [scheduleSync, itemRef]);
|
|
9372
9430
|
const registerNode = useAppStore((s) => s.nodes.registerNode);
|
|
9373
9431
|
const unregisterNode = useAppStore((s) => s.nodes.unregisterNode);
|
|
9374
|
-
const hideOverlay = (0,
|
|
9432
|
+
const hideOverlay = (0, import_react58.useCallback)(() => {
|
|
9375
9433
|
setIsVisible(false);
|
|
9376
9434
|
}, []);
|
|
9377
|
-
const showOverlay = (0,
|
|
9435
|
+
const showOverlay = (0, import_react58.useCallback)(() => {
|
|
9378
9436
|
setIsVisible(true);
|
|
9379
9437
|
}, []);
|
|
9380
|
-
const nodeHandleRef = (0,
|
|
9438
|
+
const nodeHandleRef = (0, import_react58.useRef)({
|
|
9381
9439
|
sync: () => null,
|
|
9382
9440
|
hideOverlay: () => null,
|
|
9383
9441
|
showOverlay: () => null
|
|
9384
9442
|
});
|
|
9385
|
-
(0,
|
|
9443
|
+
(0, import_react58.useLayoutEffect)(() => {
|
|
9386
9444
|
nodeHandleRef.current.sync = sync;
|
|
9387
9445
|
nodeHandleRef.current.hideOverlay = hideOverlay;
|
|
9388
9446
|
nodeHandleRef.current.showOverlay = showOverlay;
|
|
9389
9447
|
}, [hideOverlay, showOverlay, sync]);
|
|
9390
|
-
(0,
|
|
9448
|
+
(0, import_react58.useEffect)(() => {
|
|
9391
9449
|
registerNode(id, nodeHandleRef.current);
|
|
9392
9450
|
return () => {
|
|
9393
9451
|
unregisterNode(id);
|
|
9394
9452
|
};
|
|
9395
9453
|
}, [id, registerNode, unregisterNode]);
|
|
9396
|
-
const CustomActionBar = (0,
|
|
9454
|
+
const CustomActionBar = (0, import_react58.useMemo)(
|
|
9397
9455
|
() => overrides.actionBar || DefaultActionBar,
|
|
9398
9456
|
[overrides.actionBar]
|
|
9399
9457
|
);
|
|
9400
|
-
const CustomOverlay = (0,
|
|
9458
|
+
const CustomOverlay = (0, import_react58.useMemo)(
|
|
9401
9459
|
() => overrides.componentOverlay || DefaultOverlay,
|
|
9402
9460
|
[overrides.componentOverlay]
|
|
9403
9461
|
);
|
|
9404
|
-
const onClick = (0,
|
|
9462
|
+
const onClick = (0, import_react58.useCallback)(
|
|
9405
9463
|
(e) => {
|
|
9406
9464
|
const userIsDragging = !!zoneStore.getState().draggedItem;
|
|
9407
9465
|
if (userIsDragging) {
|
|
@@ -9430,7 +9488,7 @@ var DraggableComponent = ({
|
|
|
9430
9488
|
[index, zoneCompound, isSelected, _experimentalFullScreenCanvas, dispatch, zoneStore]
|
|
9431
9489
|
);
|
|
9432
9490
|
const appStore = useAppStoreApi();
|
|
9433
|
-
const onSelectParent = (0,
|
|
9491
|
+
const onSelectParent = (0, import_react58.useCallback)(() => {
|
|
9434
9492
|
const { nodes, zones } = appStore.getState().state.indexes;
|
|
9435
9493
|
const node = nodes[id];
|
|
9436
9494
|
const parentNode = node?.parentId ? nodes[node?.parentId] : null;
|
|
@@ -9451,26 +9509,26 @@ var DraggableComponent = ({
|
|
|
9451
9509
|
}
|
|
9452
9510
|
});
|
|
9453
9511
|
}, [appStore, dispatch, id]);
|
|
9454
|
-
const onDuplicate = (0,
|
|
9512
|
+
const onDuplicate = (0, import_react58.useCallback)(() => {
|
|
9455
9513
|
dispatch({
|
|
9456
9514
|
type: "duplicate",
|
|
9457
9515
|
sourceIndex: index,
|
|
9458
9516
|
sourceZone: zoneCompound
|
|
9459
9517
|
});
|
|
9460
9518
|
}, [index, zoneCompound, dispatch]);
|
|
9461
|
-
const onDelete = (0,
|
|
9519
|
+
const onDelete = (0, import_react58.useCallback)(() => {
|
|
9462
9520
|
dispatch({
|
|
9463
9521
|
type: "remove",
|
|
9464
9522
|
index,
|
|
9465
9523
|
zone: zoneCompound
|
|
9466
9524
|
});
|
|
9467
9525
|
}, [index, zoneCompound, dispatch]);
|
|
9468
|
-
const [hover, setHover] = (0,
|
|
9526
|
+
const [hover, setHover] = (0, import_react58.useState)(false);
|
|
9469
9527
|
const indicativeHover = useContextStore(
|
|
9470
9528
|
ZoneStoreContext,
|
|
9471
9529
|
(s) => s.hoveringComponent === id
|
|
9472
9530
|
);
|
|
9473
|
-
(0,
|
|
9531
|
+
(0, import_react58.useEffect)(() => {
|
|
9474
9532
|
if (!ref.current) {
|
|
9475
9533
|
return;
|
|
9476
9534
|
}
|
|
@@ -9517,10 +9575,10 @@ var DraggableComponent = ({
|
|
|
9517
9575
|
zoneStore,
|
|
9518
9576
|
id
|
|
9519
9577
|
]);
|
|
9520
|
-
const [isVisible, setIsVisible] = (0,
|
|
9521
|
-
const [dragFinished, setDragFinished] = (0,
|
|
9522
|
-
const [_, startTransition] = (0,
|
|
9523
|
-
(0,
|
|
9578
|
+
const [isVisible, setIsVisible] = (0, import_react58.useState)(false);
|
|
9579
|
+
const [dragFinished, setDragFinished] = (0, import_react58.useState)(true);
|
|
9580
|
+
const [_, startTransition] = (0, import_react58.useTransition)();
|
|
9581
|
+
(0, import_react58.useEffect)(() => {
|
|
9524
9582
|
startTransition(() => {
|
|
9525
9583
|
if (hover || indicativeHover || isSelected) {
|
|
9526
9584
|
scheduleSync();
|
|
@@ -9531,9 +9589,9 @@ var DraggableComponent = ({
|
|
|
9531
9589
|
}
|
|
9532
9590
|
});
|
|
9533
9591
|
}, [hover, indicativeHover, isSelected, iframe, scheduleSync]);
|
|
9534
|
-
const [thisWasDragging, setThisWasDragging] = (0,
|
|
9592
|
+
const [thisWasDragging, setThisWasDragging] = (0, import_react58.useState)(false);
|
|
9535
9593
|
const onDragFinished = useOnDragFinished(
|
|
9536
|
-
(0,
|
|
9594
|
+
(0, import_react58.useCallback)(
|
|
9537
9595
|
(finished) => {
|
|
9538
9596
|
if (finished) {
|
|
9539
9597
|
startTransition(() => {
|
|
@@ -9547,15 +9605,15 @@ var DraggableComponent = ({
|
|
|
9547
9605
|
[sync, startTransition]
|
|
9548
9606
|
)
|
|
9549
9607
|
);
|
|
9550
|
-
(0,
|
|
9608
|
+
(0, import_react58.useEffect)(() => {
|
|
9551
9609
|
if (thisIsDragging) {
|
|
9552
9610
|
setThisWasDragging(true);
|
|
9553
9611
|
}
|
|
9554
9612
|
}, [thisIsDragging]);
|
|
9555
|
-
(0,
|
|
9613
|
+
(0, import_react58.useEffect)(() => {
|
|
9556
9614
|
if (thisWasDragging) return onDragFinished();
|
|
9557
9615
|
}, [thisWasDragging, onDragFinished]);
|
|
9558
|
-
(0,
|
|
9616
|
+
(0, import_react58.useEffect)(() => {
|
|
9559
9617
|
if (!dragFinished || !(isSelected || thisIsDragging)) return;
|
|
9560
9618
|
const el = ref.current;
|
|
9561
9619
|
if (!el) return;
|
|
@@ -9592,7 +9650,7 @@ var DraggableComponent = ({
|
|
|
9592
9650
|
cancelAnimationFrame(frame);
|
|
9593
9651
|
};
|
|
9594
9652
|
}, [dragFinished, isSelected, thisIsDragging, scheduleSync]);
|
|
9595
|
-
const syncActionsPosition = (0,
|
|
9653
|
+
const syncActionsPosition = (0, import_react58.useCallback)(
|
|
9596
9654
|
(el) => {
|
|
9597
9655
|
if (el) {
|
|
9598
9656
|
const view = el.ownerDocument.defaultView;
|
|
@@ -9617,7 +9675,7 @@ var DraggableComponent = ({
|
|
|
9617
9675
|
},
|
|
9618
9676
|
[]
|
|
9619
9677
|
);
|
|
9620
|
-
(0,
|
|
9678
|
+
(0, import_react58.useEffect)(() => {
|
|
9621
9679
|
if (userDragAxis) {
|
|
9622
9680
|
setDragAxis(userDragAxis);
|
|
9623
9681
|
return;
|
|
@@ -9631,11 +9689,11 @@ var DraggableComponent = ({
|
|
|
9631
9689
|
}
|
|
9632
9690
|
setDragAxis(autoDragAxis);
|
|
9633
9691
|
}, [ref, userDragAxis, autoDragAxis]);
|
|
9634
|
-
const parentAction = (0,
|
|
9692
|
+
const parentAction = (0, import_react58.useMemo)(
|
|
9635
9693
|
() => ctx?.areaId && ctx?.areaId !== "root" && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ActionBar.Action, { onClick: onSelectParent, label: "Select parent", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(CornerLeftUp, { size: 16 }) }),
|
|
9636
9694
|
[ctx?.areaId, onSelectParent]
|
|
9637
9695
|
);
|
|
9638
|
-
const nextContextValue = (0,
|
|
9696
|
+
const nextContextValue = (0, import_react58.useMemo)(
|
|
9639
9697
|
() => ({
|
|
9640
9698
|
...ctx,
|
|
9641
9699
|
areaId: id,
|
|
@@ -9750,12 +9808,12 @@ var styles_module_default16 = { "DropZone": "_DropZone_1vmgt_1", "DropZone--hasC
|
|
|
9750
9808
|
|
|
9751
9809
|
// components/DropZone/index.tsx
|
|
9752
9810
|
init_store2();
|
|
9753
|
-
var
|
|
9811
|
+
var import_react75 = require("@dnd-kit/react");
|
|
9754
9812
|
var import_collision2 = require("@dnd-kit/collision");
|
|
9755
9813
|
|
|
9756
9814
|
// components/DropZone/lib/use-min-empty-height.ts
|
|
9757
9815
|
init_react_import();
|
|
9758
|
-
var
|
|
9816
|
+
var import_react59 = require("react");
|
|
9759
9817
|
init_use_context_store();
|
|
9760
9818
|
init_store2();
|
|
9761
9819
|
var getNumItems = (appStore, zoneCompound) => appStore.getState().state.indexes.zones[zoneCompound].contentIds.length;
|
|
@@ -9765,17 +9823,17 @@ var useMinEmptyHeight = ({
|
|
|
9765
9823
|
ref
|
|
9766
9824
|
}) => {
|
|
9767
9825
|
const appStore = useAppStoreApi();
|
|
9768
|
-
const [prevHeight, setPrevHeight] = (0,
|
|
9769
|
-
const [isAnimating, setIsAnimating] = (0,
|
|
9826
|
+
const [prevHeight, setPrevHeight] = (0, import_react59.useState)(0);
|
|
9827
|
+
const [isAnimating, setIsAnimating] = (0, import_react59.useState)(false);
|
|
9770
9828
|
const { draggedItem, isZone } = useContextStore(ZoneStoreContext, (s) => {
|
|
9771
9829
|
return {
|
|
9772
9830
|
draggedItem: s.draggedItem?.data.zone === zoneCompound ? s.draggedItem : null,
|
|
9773
9831
|
isZone: s.draggedItem?.data.zone === zoneCompound
|
|
9774
9832
|
};
|
|
9775
9833
|
});
|
|
9776
|
-
const numItems = (0,
|
|
9834
|
+
const numItems = (0, import_react59.useRef)(0);
|
|
9777
9835
|
const onDragFinished = useOnDragFinished(
|
|
9778
|
-
(0,
|
|
9836
|
+
(0, import_react59.useCallback)(
|
|
9779
9837
|
(finished) => {
|
|
9780
9838
|
if (finished) {
|
|
9781
9839
|
const newNumItems = getNumItems(appStore, zoneCompound);
|
|
@@ -9804,7 +9862,7 @@ var useMinEmptyHeight = ({
|
|
|
9804
9862
|
[appStore, zoneCompound]
|
|
9805
9863
|
)
|
|
9806
9864
|
);
|
|
9807
|
-
(0,
|
|
9865
|
+
(0, import_react59.useEffect)(() => {
|
|
9808
9866
|
if (draggedItem && ref.current) {
|
|
9809
9867
|
if (isZone) {
|
|
9810
9868
|
const rect = ref.current.getBoundingClientRect();
|
|
@@ -9821,15 +9879,15 @@ var useMinEmptyHeight = ({
|
|
|
9821
9879
|
|
|
9822
9880
|
// components/DropZone/lib/use-content-with-preview.ts
|
|
9823
9881
|
init_react_import();
|
|
9824
|
-
var
|
|
9882
|
+
var import_react62 = require("react");
|
|
9825
9883
|
|
|
9826
9884
|
// lib/dnd/use-rendered-callback.ts
|
|
9827
9885
|
init_react_import();
|
|
9828
|
-
var
|
|
9829
|
-
var
|
|
9886
|
+
var import_react60 = require("@dnd-kit/react");
|
|
9887
|
+
var import_react61 = require("react");
|
|
9830
9888
|
function useRenderedCallback(callback, _deps = []) {
|
|
9831
|
-
const manager = (0,
|
|
9832
|
-
return (0,
|
|
9889
|
+
const manager = (0, import_react60.useDragDropManager)();
|
|
9890
|
+
return (0, import_react61.useCallback)(
|
|
9833
9891
|
async (...args) => {
|
|
9834
9892
|
await manager?.renderer.rendering;
|
|
9835
9893
|
return callback(...args);
|
|
@@ -9843,18 +9901,18 @@ init_insert();
|
|
|
9843
9901
|
init_use_context_store();
|
|
9844
9902
|
init_store2();
|
|
9845
9903
|
var useContentIdsWithPreview = (contentIds, zoneCompound) => {
|
|
9846
|
-
const zoneStore = (0,
|
|
9904
|
+
const zoneStore = (0, import_react62.useContext)(ZoneStoreContext);
|
|
9847
9905
|
const preview = useContextStore(
|
|
9848
9906
|
ZoneStoreContext,
|
|
9849
9907
|
(s) => s.previewIndex[zoneCompound]
|
|
9850
9908
|
);
|
|
9851
9909
|
const isDragging = useAppStore((s) => s.state.ui.isDragging);
|
|
9852
|
-
const [contentIdsWithPreview, setContentIdsWithPreview] = (0,
|
|
9853
|
-
const [localPreview, setLocalPreview] = (0,
|
|
9910
|
+
const [contentIdsWithPreview, setContentIdsWithPreview] = (0, import_react62.useState)(contentIds);
|
|
9911
|
+
const [localPreview, setLocalPreview] = (0, import_react62.useState)(
|
|
9854
9912
|
preview
|
|
9855
9913
|
);
|
|
9856
9914
|
const updateContent = useRenderedCallback(
|
|
9857
|
-
(0,
|
|
9915
|
+
(0, import_react62.useCallback)(
|
|
9858
9916
|
(contentIds2, preview2, isDragging2, draggedItemId, previewExists) => {
|
|
9859
9917
|
if (isDragging2 && !previewExists) {
|
|
9860
9918
|
return;
|
|
@@ -9887,7 +9945,7 @@ var useContentIdsWithPreview = (contentIds, zoneCompound) => {
|
|
|
9887
9945
|
[]
|
|
9888
9946
|
)
|
|
9889
9947
|
);
|
|
9890
|
-
(0,
|
|
9948
|
+
(0, import_react62.useEffect)(() => {
|
|
9891
9949
|
const s = zoneStore.getState();
|
|
9892
9950
|
const draggedItemId = s.draggedItem?.id;
|
|
9893
9951
|
const previewExists = Object.keys(s.previewIndex || {}).length > 0;
|
|
@@ -9904,17 +9962,17 @@ var useContentIdsWithPreview = (contentIds, zoneCompound) => {
|
|
|
9904
9962
|
|
|
9905
9963
|
// components/DropZone/lib/use-drag-axis.ts
|
|
9906
9964
|
init_react_import();
|
|
9907
|
-
var
|
|
9965
|
+
var import_react63 = require("react");
|
|
9908
9966
|
init_store2();
|
|
9909
9967
|
var GRID_DRAG_AXIS = "dynamic";
|
|
9910
9968
|
var FLEX_ROW_DRAG_AXIS = "x";
|
|
9911
9969
|
var DEFAULT_DRAG_AXIS = "y";
|
|
9912
9970
|
var useDragAxis = (ref, collisionAxis) => {
|
|
9913
9971
|
const status = useAppStore((s) => s.status);
|
|
9914
|
-
const [dragAxis, setDragAxis] = (0,
|
|
9972
|
+
const [dragAxis, setDragAxis] = (0, import_react63.useState)(
|
|
9915
9973
|
collisionAxis || DEFAULT_DRAG_AXIS
|
|
9916
9974
|
);
|
|
9917
|
-
const calculateDragAxis = (0,
|
|
9975
|
+
const calculateDragAxis = (0, import_react63.useCallback)(() => {
|
|
9918
9976
|
if (ref.current) {
|
|
9919
9977
|
const computedStyle = window.getComputedStyle(ref.current);
|
|
9920
9978
|
if (computedStyle.display === "grid") {
|
|
@@ -9926,7 +9984,7 @@ var useDragAxis = (ref, collisionAxis) => {
|
|
|
9926
9984
|
}
|
|
9927
9985
|
}
|
|
9928
9986
|
}, [ref]);
|
|
9929
|
-
(0,
|
|
9987
|
+
(0, import_react63.useEffect)(() => {
|
|
9930
9988
|
const onViewportChange = () => {
|
|
9931
9989
|
calculateDragAxis();
|
|
9932
9990
|
};
|
|
@@ -9935,7 +9993,7 @@ var useDragAxis = (ref, collisionAxis) => {
|
|
|
9935
9993
|
window.removeEventListener("viewportchange", onViewportChange);
|
|
9936
9994
|
};
|
|
9937
9995
|
}, [calculateDragAxis]);
|
|
9938
|
-
(0,
|
|
9996
|
+
(0, import_react63.useEffect)(calculateDragAxis, [status, collisionAxis, calculateDragAxis]);
|
|
9939
9997
|
return [dragAxis, calculateDragAxis];
|
|
9940
9998
|
};
|
|
9941
9999
|
|
|
@@ -9945,8 +10003,8 @@ var import_shallow6 = require("zustand/react/shallow");
|
|
|
9945
10003
|
|
|
9946
10004
|
// components/Render/context.tsx
|
|
9947
10005
|
init_react_import();
|
|
9948
|
-
var
|
|
9949
|
-
var renderContext =
|
|
10006
|
+
var import_react64 = __toESM(require("react"));
|
|
10007
|
+
var renderContext = import_react64.default.createContext({
|
|
9950
10008
|
config: { components: {} },
|
|
9951
10009
|
data: { root: {}, content: [] },
|
|
9952
10010
|
metadata: {}
|
|
@@ -9957,7 +10015,7 @@ init_react_import();
|
|
|
9957
10015
|
|
|
9958
10016
|
// lib/field-transforms/use-field-transforms.tsx
|
|
9959
10017
|
init_react_import();
|
|
9960
|
-
var
|
|
10018
|
+
var import_react65 = require("react");
|
|
9961
10019
|
init_map_fields();
|
|
9962
10020
|
|
|
9963
10021
|
// lib/field-transforms/build-mappers.ts
|
|
@@ -9986,14 +10044,14 @@ function buildMappers(transforms, readOnly, forceReadOnly) {
|
|
|
9986
10044
|
|
|
9987
10045
|
// lib/field-transforms/use-field-transforms.tsx
|
|
9988
10046
|
function useFieldTransforms(config, item, transforms, readOnly, forceReadOnly) {
|
|
9989
|
-
const mappers = (0,
|
|
10047
|
+
const mappers = (0, import_react65.useMemo)(
|
|
9990
10048
|
() => buildMappers(transforms, readOnly, forceReadOnly),
|
|
9991
10049
|
[transforms, readOnly, forceReadOnly]
|
|
9992
10050
|
);
|
|
9993
|
-
const transformedProps = (0,
|
|
10051
|
+
const transformedProps = (0, import_react65.useMemo)(() => {
|
|
9994
10052
|
return mapFields(item, mappers, config).props;
|
|
9995
10053
|
}, [config, item, mappers]);
|
|
9996
|
-
const mergedProps = (0,
|
|
10054
|
+
const mergedProps = (0, import_react65.useMemo)(
|
|
9997
10055
|
() => ({ ...item.props, ...transformedProps }),
|
|
9998
10056
|
[item.props, transformedProps]
|
|
9999
10057
|
);
|
|
@@ -10034,11 +10092,11 @@ init_store2();
|
|
|
10034
10092
|
|
|
10035
10093
|
// components/SlotRender/server.tsx
|
|
10036
10094
|
init_react_import();
|
|
10037
|
-
var
|
|
10095
|
+
var import_react68 = require("react");
|
|
10038
10096
|
|
|
10039
10097
|
// components/RichTextEditor/lib/use-richtext-props.tsx
|
|
10040
10098
|
init_react_import();
|
|
10041
|
-
var
|
|
10099
|
+
var import_react67 = require("react");
|
|
10042
10100
|
|
|
10043
10101
|
// components/RichTextEditor/components/RenderFallback.tsx
|
|
10044
10102
|
init_react_import();
|
|
@@ -10101,10 +10159,10 @@ var findAllRichtextKeys = (fields, path = []) => {
|
|
|
10101
10159
|
return result;
|
|
10102
10160
|
};
|
|
10103
10161
|
function useRichtextProps(fields, props) {
|
|
10104
|
-
const richtextKeys = (0,
|
|
10105
|
-
const richtextProps = (0,
|
|
10162
|
+
const richtextKeys = (0, import_react67.useMemo)(() => findAllRichtextKeys(fields), [fields]);
|
|
10163
|
+
const richtextProps = (0, import_react67.useMemo)(() => {
|
|
10106
10164
|
if (!richtextKeys?.length) return {};
|
|
10107
|
-
const RichTextRender3 = (0,
|
|
10165
|
+
const RichTextRender3 = (0, import_react67.lazy)(
|
|
10108
10166
|
() => Promise.resolve().then(() => (init_Render(), Render_exports)).then((m) => ({
|
|
10109
10167
|
default: m.RichTextRender
|
|
10110
10168
|
}))
|
|
@@ -10112,7 +10170,7 @@ function useRichtextProps(fields, props) {
|
|
|
10112
10170
|
let result = { ...props };
|
|
10113
10171
|
for (const { path, field } of richtextKeys) {
|
|
10114
10172
|
result = mapDeep(result, path, (content) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
10115
|
-
|
|
10173
|
+
import_react67.Suspense,
|
|
10116
10174
|
{
|
|
10117
10175
|
fallback: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(RichTextRenderFallback, { content }),
|
|
10118
10176
|
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(RichTextRender3, { content, field })
|
|
@@ -10148,7 +10206,7 @@ var Item2 = ({
|
|
|
10148
10206
|
}
|
|
10149
10207
|
);
|
|
10150
10208
|
};
|
|
10151
|
-
var SlotRender = (0,
|
|
10209
|
+
var SlotRender = (0, import_react68.forwardRef)(
|
|
10152
10210
|
function SlotRenderInternal({ className, style, content, config, metadata, as }, ref) {
|
|
10153
10211
|
const El = as ?? "div";
|
|
10154
10212
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(El, { className, style, ref, children: content.map((item) => {
|
|
@@ -10199,16 +10257,16 @@ init_flatten_node();
|
|
|
10199
10257
|
|
|
10200
10258
|
// lib/field-transforms/use-field-transforms-tracked.tsx
|
|
10201
10259
|
init_react_import();
|
|
10202
|
-
var
|
|
10260
|
+
var import_react69 = require("react");
|
|
10203
10261
|
init_map_fields();
|
|
10204
10262
|
function useFieldTransformsTracked(config, item, transforms, readOnly, forceReadOnly) {
|
|
10205
|
-
const prevProps = (0,
|
|
10206
|
-
const prevResult = (0,
|
|
10207
|
-
const mappers = (0,
|
|
10263
|
+
const prevProps = (0, import_react69.useRef)(null);
|
|
10264
|
+
const prevResult = (0, import_react69.useRef)(item.props);
|
|
10265
|
+
const mappers = (0, import_react69.useMemo)(
|
|
10208
10266
|
() => buildMappers(transforms, readOnly, forceReadOnly),
|
|
10209
10267
|
[transforms, readOnly, forceReadOnly]
|
|
10210
10268
|
);
|
|
10211
|
-
const transformedProps = (0,
|
|
10269
|
+
const transformedProps = (0, import_react69.useMemo)(() => {
|
|
10212
10270
|
const changedProps = {};
|
|
10213
10271
|
const componentConfig = item.type === "root" ? config.root : config.components?.[item.type];
|
|
10214
10272
|
let changeIncludesSlot = false;
|
|
@@ -10233,7 +10291,7 @@ function useFieldTransformsTracked(config, item, transforms, readOnly, forceRead
|
|
|
10233
10291
|
prevResult.current = { ...prevResult.current, ...mapped };
|
|
10234
10292
|
return prevResult.current;
|
|
10235
10293
|
}, [config, item, mappers]);
|
|
10236
|
-
const mergedProps = (0,
|
|
10294
|
+
const mergedProps = (0, import_react69.useMemo)(
|
|
10237
10295
|
() => ({ ...item.props, ...transformedProps }),
|
|
10238
10296
|
[item.props, transformedProps]
|
|
10239
10297
|
);
|
|
@@ -10245,7 +10303,7 @@ init_react_import();
|
|
|
10245
10303
|
|
|
10246
10304
|
// components/InlineTextField/index.tsx
|
|
10247
10305
|
init_react_import();
|
|
10248
|
-
var
|
|
10306
|
+
var import_react70 = require("react");
|
|
10249
10307
|
|
|
10250
10308
|
// lib/overlay-portal/index.tsx
|
|
10251
10309
|
init_react_import();
|
|
@@ -10326,10 +10384,10 @@ var InlineTextFieldInternal = ({
|
|
|
10326
10384
|
isReadOnly,
|
|
10327
10385
|
opts = {}
|
|
10328
10386
|
}) => {
|
|
10329
|
-
const ref = (0,
|
|
10387
|
+
const ref = (0, import_react70.useRef)(null);
|
|
10330
10388
|
const appStoreApi = useAppStoreApi();
|
|
10331
10389
|
const disableLineBreaks = opts.disableLineBreaks ?? false;
|
|
10332
|
-
(0,
|
|
10390
|
+
(0, import_react70.useEffect)(() => {
|
|
10333
10391
|
const appStore = appStoreApi.getState();
|
|
10334
10392
|
const data = appStore.state.indexes.nodes[componentId].data;
|
|
10335
10393
|
const componentConfig = appStore.getComponentConfig(data.type);
|
|
@@ -10374,8 +10432,8 @@ var InlineTextFieldInternal = ({
|
|
|
10374
10432
|
};
|
|
10375
10433
|
}
|
|
10376
10434
|
}, [appStoreApi, ref, value, disableLineBreaks, componentId, propPath]);
|
|
10377
|
-
const [isHovering, setIsHovering] = (0,
|
|
10378
|
-
const [isFocused, setIsFocused] = (0,
|
|
10435
|
+
const [isHovering, setIsHovering] = (0, import_react70.useState)(false);
|
|
10436
|
+
const [isFocused, setIsFocused] = (0, import_react70.useState)(false);
|
|
10379
10437
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
10380
10438
|
"span",
|
|
10381
10439
|
{
|
|
@@ -10412,7 +10470,7 @@ var InlineTextFieldInternal = ({
|
|
|
10412
10470
|
}
|
|
10413
10471
|
);
|
|
10414
10472
|
};
|
|
10415
|
-
var InlineTextField = (0,
|
|
10473
|
+
var InlineTextField = (0, import_react70.memo)(InlineTextFieldInternal);
|
|
10416
10474
|
|
|
10417
10475
|
// lib/field-transforms/default-transforms/inline-text-transform.tsx
|
|
10418
10476
|
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
@@ -10467,19 +10525,19 @@ init_react_import();
|
|
|
10467
10525
|
init_EditorFallback();
|
|
10468
10526
|
init_store2();
|
|
10469
10527
|
init_set_deep();
|
|
10470
|
-
var
|
|
10528
|
+
var import_react71 = require("react");
|
|
10471
10529
|
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
10472
|
-
var Editor3 = (0,
|
|
10530
|
+
var Editor3 = (0, import_react71.lazy)(
|
|
10473
10531
|
() => Promise.resolve().then(() => (init_Editor(), Editor_exports)).then((m) => ({
|
|
10474
10532
|
default: m.Editor
|
|
10475
10533
|
}))
|
|
10476
10534
|
);
|
|
10477
|
-
var RichTextRender2 = (0,
|
|
10535
|
+
var RichTextRender2 = (0, import_react71.lazy)(
|
|
10478
10536
|
() => Promise.resolve().then(() => (init_Render(), Render_exports)).then((m) => ({
|
|
10479
10537
|
default: m.RichTextRender
|
|
10480
10538
|
}))
|
|
10481
10539
|
);
|
|
10482
|
-
var InlineEditorWrapper = (0,
|
|
10540
|
+
var InlineEditorWrapper = (0, import_react71.memo)(
|
|
10483
10541
|
({
|
|
10484
10542
|
value,
|
|
10485
10543
|
componentId,
|
|
@@ -10487,7 +10545,7 @@ var InlineEditorWrapper = (0, import_react72.memo)(
|
|
|
10487
10545
|
field,
|
|
10488
10546
|
id
|
|
10489
10547
|
}) => {
|
|
10490
|
-
const portalRef = (0,
|
|
10548
|
+
const portalRef = (0, import_react71.useRef)(null);
|
|
10491
10549
|
const appStoreApi = useAppStoreApi();
|
|
10492
10550
|
const onClickHandler = (e) => {
|
|
10493
10551
|
e.preventDefault();
|
|
@@ -10502,14 +10560,14 @@ var InlineEditorWrapper = (0, import_react72.memo)(
|
|
|
10502
10560
|
);
|
|
10503
10561
|
appStoreApi.getState().setUi({ itemSelector });
|
|
10504
10562
|
};
|
|
10505
|
-
(0,
|
|
10563
|
+
(0, import_react71.useEffect)(() => {
|
|
10506
10564
|
if (!portalRef.current) return;
|
|
10507
10565
|
const cleanup = registerOverlayPortal(portalRef.current, {
|
|
10508
10566
|
disableDragOnFocus: true
|
|
10509
10567
|
});
|
|
10510
10568
|
return () => cleanup?.();
|
|
10511
10569
|
}, []);
|
|
10512
|
-
const handleChange = (0,
|
|
10570
|
+
const handleChange = (0, import_react71.useCallback)(
|
|
10513
10571
|
async (content, ui) => {
|
|
10514
10572
|
const appStore = appStoreApi.getState();
|
|
10515
10573
|
const node = appStore.state.indexes.nodes[componentId];
|
|
@@ -10532,7 +10590,7 @@ var InlineEditorWrapper = (0, import_react72.memo)(
|
|
|
10532
10590
|
},
|
|
10533
10591
|
[appStoreApi, componentId, propPath]
|
|
10534
10592
|
);
|
|
10535
|
-
const handleFocus = (0,
|
|
10593
|
+
const handleFocus = (0, import_react71.useCallback)(
|
|
10536
10594
|
(editor) => {
|
|
10537
10595
|
appStoreApi.setState({
|
|
10538
10596
|
currentRichText: {
|
|
@@ -10547,7 +10605,7 @@ var InlineEditorWrapper = (0, import_react72.memo)(
|
|
|
10547
10605
|
[field, componentId, appStoreApi, id]
|
|
10548
10606
|
);
|
|
10549
10607
|
if (!field.contentEditable)
|
|
10550
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
10608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react71.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(RichTextRenderFallback, { content: value }), children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(RichTextRender2, { content: value, field }) });
|
|
10551
10609
|
const editorProps = {
|
|
10552
10610
|
content: value,
|
|
10553
10611
|
onChange: handleChange,
|
|
@@ -10563,7 +10621,7 @@ var InlineEditorWrapper = (0, import_react72.memo)(
|
|
|
10563
10621
|
ref: portalRef,
|
|
10564
10622
|
onClick: onClickHandler,
|
|
10565
10623
|
onClickCapture: onClickCaptureHandler,
|
|
10566
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
10624
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react71.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(EditorFallback, { ...editorProps }), children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Editor3, { ...editorProps }) })
|
|
10567
10625
|
}
|
|
10568
10626
|
);
|
|
10569
10627
|
}
|
|
@@ -10593,7 +10651,7 @@ var getRichTextTransform = () => ({
|
|
|
10593
10651
|
// components/MemoizeComponent/index.tsx
|
|
10594
10652
|
init_react_import();
|
|
10595
10653
|
var import_fast_equals3 = require("fast-equals");
|
|
10596
|
-
var
|
|
10654
|
+
var import_react72 = require("react");
|
|
10597
10655
|
|
|
10598
10656
|
// lib/shallow-equal.ts
|
|
10599
10657
|
init_react_import();
|
|
@@ -10627,7 +10685,7 @@ var RenderComponent = ({
|
|
|
10627
10685
|
}) => {
|
|
10628
10686
|
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Component, { ...renderProps });
|
|
10629
10687
|
};
|
|
10630
|
-
var MemoizeComponent = (0,
|
|
10688
|
+
var MemoizeComponent = (0, import_react72.memo)(RenderComponent, (prev, next) => {
|
|
10631
10689
|
let credbuildEquals = true;
|
|
10632
10690
|
if ("credbuild" in prev.componentProps && "credbuild" in next.componentProps) {
|
|
10633
10691
|
credbuildEquals = (0, import_fast_equals3.deepEqual)(prev.componentProps.credbuild, next.componentProps.credbuild);
|
|
@@ -10637,7 +10695,7 @@ var MemoizeComponent = (0, import_react73.memo)(RenderComponent, (prev, next) =>
|
|
|
10637
10695
|
|
|
10638
10696
|
// components/DropZone/VirtualizedDropZone.tsx
|
|
10639
10697
|
init_react_import();
|
|
10640
|
-
var
|
|
10698
|
+
var import_react73 = require("react");
|
|
10641
10699
|
init_store2();
|
|
10642
10700
|
var import_react_virtual = require("@tanstack/react-virtual");
|
|
10643
10701
|
init_use_context_store();
|
|
@@ -10672,7 +10730,7 @@ var VirtualizedDropZone = ({
|
|
|
10672
10730
|
}) => {
|
|
10673
10731
|
const selectedId = useAppStore((s) => s.selectedItem?.props.id ?? null);
|
|
10674
10732
|
const frame = getFrame();
|
|
10675
|
-
const zoneStore = (0,
|
|
10733
|
+
const zoneStore = (0, import_react73.useContext)(ZoneStoreContext);
|
|
10676
10734
|
const draggedItemId = useContextStore(ZoneStoreContext, (s) => {
|
|
10677
10735
|
const draggedId = s.draggedItem?.id;
|
|
10678
10736
|
return draggedId ? String(draggedId) : null;
|
|
@@ -10685,9 +10743,9 @@ var VirtualizedDropZone = ({
|
|
|
10685
10743
|
return null;
|
|
10686
10744
|
});
|
|
10687
10745
|
const iframeWindow = frame?.defaultView;
|
|
10688
|
-
const measureRefsRef = (0,
|
|
10746
|
+
const measureRefsRef = (0, import_react73.useRef)(/* @__PURE__ */ new Map());
|
|
10689
10747
|
const appStoreApi = useAppStoreApi();
|
|
10690
|
-
const resolveIndex = (0,
|
|
10748
|
+
const resolveIndex = (0, import_react73.useCallback)(
|
|
10691
10749
|
(targetId) => {
|
|
10692
10750
|
if (!targetId || targetId === "root") {
|
|
10693
10751
|
return -1;
|
|
@@ -10711,7 +10769,7 @@ var VirtualizedDropZone = ({
|
|
|
10711
10769
|
},
|
|
10712
10770
|
[appStoreApi, contentIds]
|
|
10713
10771
|
);
|
|
10714
|
-
const pinnedIndexes = (0,
|
|
10772
|
+
const pinnedIndexes = (0, import_react73.useMemo)(() => {
|
|
10715
10773
|
const nextPinnedIndexes = /* @__PURE__ */ new Set();
|
|
10716
10774
|
[selectedId, draggedItemId, dragTargetParentId].forEach((targetId) => {
|
|
10717
10775
|
const currentIndex = resolveIndex(targetId);
|
|
@@ -10721,7 +10779,7 @@ var VirtualizedDropZone = ({
|
|
|
10721
10779
|
});
|
|
10722
10780
|
return Array.from(nextPinnedIndexes).sort((a, b) => a - b);
|
|
10723
10781
|
}, [dragTargetParentId, draggedItemId, resolveIndex, selectedId]);
|
|
10724
|
-
const rangeExtractor = (0,
|
|
10782
|
+
const rangeExtractor = (0, import_react73.useCallback)(
|
|
10725
10783
|
(range) => {
|
|
10726
10784
|
const indexes = (0, import_react_virtual.defaultRangeExtractor)(range);
|
|
10727
10785
|
pinnedIndexes.forEach((index) => {
|
|
@@ -10746,7 +10804,7 @@ var VirtualizedDropZone = ({
|
|
|
10746
10804
|
rangeExtractor,
|
|
10747
10805
|
initialOffset: () => iframeWindow ? iframeWindow.scrollY : 0
|
|
10748
10806
|
});
|
|
10749
|
-
(0,
|
|
10807
|
+
(0, import_react73.useEffect)(() => {
|
|
10750
10808
|
zoneStore.getState().registerRootVirtualizer(zoneCompound, {
|
|
10751
10809
|
resolveIndex: (targetId) => resolveIndex(targetId),
|
|
10752
10810
|
virtualizer
|
|
@@ -10755,7 +10813,7 @@ var VirtualizedDropZone = ({
|
|
|
10755
10813
|
zoneStore.getState().unregisterRootVirtualizer(zoneCompound);
|
|
10756
10814
|
};
|
|
10757
10815
|
}, [resolveIndex, virtualizer, zoneCompound, zoneStore]);
|
|
10758
|
-
const getMeasureRef = (0,
|
|
10816
|
+
const getMeasureRef = (0, import_react73.useCallback)((componentId) => {
|
|
10759
10817
|
const cachedRef = measureRefsRef.current.get(componentId);
|
|
10760
10818
|
if (cachedRef) {
|
|
10761
10819
|
return cachedRef;
|
|
@@ -10772,7 +10830,7 @@ var VirtualizedDropZone = ({
|
|
|
10772
10830
|
measureRefsRef.current.set(componentId, measureRef);
|
|
10773
10831
|
return measureRef;
|
|
10774
10832
|
}, []);
|
|
10775
|
-
(0,
|
|
10833
|
+
(0, import_react73.useEffect)(() => {
|
|
10776
10834
|
const validIds = new Set(contentIds);
|
|
10777
10835
|
Array.from(measureRefsRef.current.keys()).forEach((componentId) => {
|
|
10778
10836
|
if (!validIds.has(componentId)) {
|
|
@@ -10782,7 +10840,7 @@ var VirtualizedDropZone = ({
|
|
|
10782
10840
|
}, [contentIds]);
|
|
10783
10841
|
const virtualItems = virtualizer.getVirtualItems();
|
|
10784
10842
|
const totalSize = virtualizer.getTotalSize();
|
|
10785
|
-
const renderedItems = (0,
|
|
10843
|
+
const renderedItems = (0, import_react73.useMemo)(() => {
|
|
10786
10844
|
const items = [];
|
|
10787
10845
|
let previousEnd = 0;
|
|
10788
10846
|
let previousIndex = -1;
|
|
@@ -10857,9 +10915,9 @@ var DropZoneChild = ({
|
|
|
10857
10915
|
itemRef
|
|
10858
10916
|
}) => {
|
|
10859
10917
|
const metadata = useAppStore((s) => s.metadata);
|
|
10860
|
-
const ctx = (0,
|
|
10918
|
+
const ctx = (0, import_react74.useContext)(dropZoneContext);
|
|
10861
10919
|
const { depth = 1 } = ctx ?? {};
|
|
10862
|
-
const zoneStore = (0,
|
|
10920
|
+
const zoneStore = (0, import_react74.useContext)(ZoneStoreContext);
|
|
10863
10921
|
const nodeProps = useAppStore(
|
|
10864
10922
|
(0, import_shallow6.useShallow)((s) => {
|
|
10865
10923
|
return s.state.indexes.nodes[componentId]?.flatData.props;
|
|
@@ -10872,7 +10930,7 @@ var DropZoneChild = ({
|
|
|
10872
10930
|
(0, import_shallow6.useShallow)((s) => s.state.indexes.nodes[componentId]?.data.readOnly)
|
|
10873
10931
|
);
|
|
10874
10932
|
const appStore = useAppStoreApi();
|
|
10875
|
-
const item = (0,
|
|
10933
|
+
const item = (0, import_react74.useMemo)(() => {
|
|
10876
10934
|
if (nodeProps) {
|
|
10877
10935
|
const expanded = expandNode({
|
|
10878
10936
|
type: nodeType,
|
|
@@ -10894,7 +10952,7 @@ var DropZoneChild = ({
|
|
|
10894
10952
|
const componentConfig = useAppStore(
|
|
10895
10953
|
(s) => item?.type ? s.config.components[item.type] : null
|
|
10896
10954
|
);
|
|
10897
|
-
const credbuildProps = (0,
|
|
10955
|
+
const credbuildProps = (0, import_react74.useMemo)(
|
|
10898
10956
|
() => ({
|
|
10899
10957
|
renderDropZone: DropZoneEditPure,
|
|
10900
10958
|
isEditing: true,
|
|
@@ -10911,7 +10969,7 @@ var DropZoneChild = ({
|
|
|
10911
10969
|
(s) => s.selectedItem?.props.id === componentId || false
|
|
10912
10970
|
);
|
|
10913
10971
|
let label = componentConfig?.label ?? item?.type.toString() ?? "Component";
|
|
10914
|
-
const defaultsProps = (0,
|
|
10972
|
+
const defaultsProps = (0, import_react74.useMemo)(
|
|
10915
10973
|
() => ({
|
|
10916
10974
|
...componentConfig?.defaultProps,
|
|
10917
10975
|
...item?.props,
|
|
@@ -10921,14 +10979,14 @@ var DropZoneChild = ({
|
|
|
10921
10979
|
}),
|
|
10922
10980
|
[componentConfig?.defaultProps, item?.props, credbuildProps]
|
|
10923
10981
|
);
|
|
10924
|
-
const defaultedNode = (0,
|
|
10982
|
+
const defaultedNode = (0, import_react74.useMemo)(
|
|
10925
10983
|
() => ({ type: item?.type ?? nodeType, props: defaultsProps }),
|
|
10926
10984
|
[item?.type, nodeType, defaultsProps]
|
|
10927
10985
|
);
|
|
10928
10986
|
const config = useAppStore((s) => s.config);
|
|
10929
10987
|
const plugins = useAppStore((s) => s.plugins);
|
|
10930
10988
|
const userFieldTransforms = useAppStore((s) => s.fieldTransforms);
|
|
10931
|
-
const combinedFieldTransforms = (0,
|
|
10989
|
+
const combinedFieldTransforms = (0, import_react74.useMemo)(
|
|
10932
10990
|
() => ({
|
|
10933
10991
|
...getSlotTransform(DropZoneEditPure, (slotProps) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(ContextSlotRender, { componentId, zone: slotProps.zone })),
|
|
10934
10992
|
...getInlineTextTransform(),
|
|
@@ -11001,8 +11059,8 @@ var DropZoneChild = ({
|
|
|
11001
11059
|
}
|
|
11002
11060
|
);
|
|
11003
11061
|
};
|
|
11004
|
-
var DropZoneChildMemo = (0,
|
|
11005
|
-
var DropZoneEdit = (0,
|
|
11062
|
+
var DropZoneChildMemo = (0, import_react74.memo)(DropZoneChild);
|
|
11063
|
+
var DropZoneEdit = (0, import_react74.forwardRef)(
|
|
11006
11064
|
function DropZoneEditInternal({
|
|
11007
11065
|
zone,
|
|
11008
11066
|
allow,
|
|
@@ -11013,7 +11071,7 @@ var DropZoneEdit = (0, import_react75.forwardRef)(
|
|
|
11013
11071
|
collisionAxis,
|
|
11014
11072
|
as
|
|
11015
11073
|
}, userRef) {
|
|
11016
|
-
const ctx = (0,
|
|
11074
|
+
const ctx = (0, import_react74.useContext)(dropZoneContext);
|
|
11017
11075
|
const appStoreApi = useAppStoreApi();
|
|
11018
11076
|
const {
|
|
11019
11077
|
// These all need setting via context
|
|
@@ -11046,14 +11104,14 @@ var DropZoneEdit = (0, import_react75.forwardRef)(
|
|
|
11046
11104
|
return s.state.indexes.zones[zoneCompound]?.type;
|
|
11047
11105
|
})
|
|
11048
11106
|
);
|
|
11049
|
-
(0,
|
|
11107
|
+
(0, import_react74.useEffect)(() => {
|
|
11050
11108
|
if (!zoneType || zoneType === "dropzone") {
|
|
11051
11109
|
if (ctx?.registerZone) {
|
|
11052
11110
|
ctx?.registerZone(zoneCompound);
|
|
11053
11111
|
}
|
|
11054
11112
|
}
|
|
11055
11113
|
}, [zoneType, appStoreApi, ctx, zoneCompound]);
|
|
11056
|
-
(0,
|
|
11114
|
+
(0, import_react74.useEffect)(() => {
|
|
11057
11115
|
if (zoneType === "dropzone") {
|
|
11058
11116
|
if (zoneCompound !== rootDroppableId) {
|
|
11059
11117
|
console.warn(
|
|
@@ -11062,11 +11120,11 @@ var DropZoneEdit = (0, import_react75.forwardRef)(
|
|
|
11062
11120
|
}
|
|
11063
11121
|
}
|
|
11064
11122
|
}, [zoneType, zoneCompound]);
|
|
11065
|
-
const contentIds = (0,
|
|
11123
|
+
const contentIds = (0, import_react74.useMemo)(() => {
|
|
11066
11124
|
return zoneContentIds || [];
|
|
11067
11125
|
}, [zoneContentIds]);
|
|
11068
|
-
const ref = (0,
|
|
11069
|
-
const acceptsTarget = (0,
|
|
11126
|
+
const ref = (0, import_react74.useRef)(null);
|
|
11127
|
+
const acceptsTarget = (0, import_react74.useCallback)(
|
|
11070
11128
|
(componentType) => {
|
|
11071
11129
|
if (!componentType) {
|
|
11072
11130
|
return true;
|
|
@@ -11102,7 +11160,7 @@ var DropZoneEdit = (0, import_react75.forwardRef)(
|
|
|
11102
11160
|
}
|
|
11103
11161
|
return _isEnabled;
|
|
11104
11162
|
});
|
|
11105
|
-
(0,
|
|
11163
|
+
(0, import_react74.useEffect)(() => {
|
|
11106
11164
|
if (registerLocalZone) {
|
|
11107
11165
|
registerLocalZone(zoneCompound, targetAccepted || isEnabled);
|
|
11108
11166
|
}
|
|
@@ -11117,8 +11175,8 @@ var DropZoneEdit = (0, import_react75.forwardRef)(
|
|
|
11117
11175
|
zoneCompound
|
|
11118
11176
|
);
|
|
11119
11177
|
const isDropEnabled = isEnabled && (preview ? contentIdsWithPreview.length === 1 : contentIdsWithPreview.length === 0);
|
|
11120
|
-
const zoneStore = (0,
|
|
11121
|
-
(0,
|
|
11178
|
+
const zoneStore = (0, import_react74.useContext)(ZoneStoreContext);
|
|
11179
|
+
(0, import_react74.useEffect)(() => {
|
|
11122
11180
|
const { enabledIndex } = zoneStore.getState();
|
|
11123
11181
|
zoneStore.setState({
|
|
11124
11182
|
enabledIndex: { ...enabledIndex, [zoneCompound]: isEnabled }
|
|
@@ -11137,7 +11195,7 @@ var DropZoneEdit = (0, import_react75.forwardRef)(
|
|
|
11137
11195
|
path: path || []
|
|
11138
11196
|
}
|
|
11139
11197
|
};
|
|
11140
|
-
const { ref: dropRef } = (0,
|
|
11198
|
+
const { ref: dropRef } = (0, import_react75.useDroppable)(droppableConfig);
|
|
11141
11199
|
const isAreaSelected = useAppStore(
|
|
11142
11200
|
(s) => s?.selectedItem && areaId === s?.selectedItem.props.id
|
|
11143
11201
|
);
|
|
@@ -11147,7 +11205,7 @@ var DropZoneEdit = (0, import_react75.forwardRef)(
|
|
|
11147
11205
|
userMinEmptyHeight,
|
|
11148
11206
|
ref
|
|
11149
11207
|
});
|
|
11150
|
-
const setRefs = (0,
|
|
11208
|
+
const setRefs = (0, import_react74.useCallback)(
|
|
11151
11209
|
(node) => {
|
|
11152
11210
|
assignRefs([ref, dropRef, userRef], node);
|
|
11153
11211
|
},
|
|
@@ -11220,7 +11278,7 @@ var DropZoneRenderItem = ({
|
|
|
11220
11278
|
}) => {
|
|
11221
11279
|
const Component = config.components[item.type];
|
|
11222
11280
|
const props = useSlots(config, item, (slotProps) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(SlotRenderPure, { ...slotProps, config, metadata }));
|
|
11223
|
-
const nextContextValue = (0,
|
|
11281
|
+
const nextContextValue = (0, import_react74.useMemo)(
|
|
11224
11282
|
() => ({
|
|
11225
11283
|
areaId: props.id,
|
|
11226
11284
|
depth: 1
|
|
@@ -11242,19 +11300,19 @@ var DropZoneRenderItem = ({
|
|
|
11242
11300
|
) }, props.id);
|
|
11243
11301
|
};
|
|
11244
11302
|
var DropZoneRenderPure = (props) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(DropZoneRender, { ...props });
|
|
11245
|
-
var DropZoneRender = (0,
|
|
11303
|
+
var DropZoneRender = (0, import_react74.forwardRef)(
|
|
11246
11304
|
function DropZoneRenderInternal({ className, style, zone, as }, ref) {
|
|
11247
|
-
const ctx = (0,
|
|
11305
|
+
const ctx = (0, import_react74.useContext)(dropZoneContext);
|
|
11248
11306
|
const { areaId = "root" } = ctx || {};
|
|
11249
|
-
const { config, data, metadata } = (0,
|
|
11307
|
+
const { config, data, metadata } = (0, import_react74.useContext)(renderContext);
|
|
11250
11308
|
let zoneCompound = `${areaId}:${zone}`;
|
|
11251
|
-
const content = (0,
|
|
11309
|
+
const content = (0, import_react74.useMemo)(() => {
|
|
11252
11310
|
if (zoneCompound !== rootDroppableId) {
|
|
11253
11311
|
return setupZone(data, zoneCompound).zones[zoneCompound];
|
|
11254
11312
|
}
|
|
11255
11313
|
return data?.content || [];
|
|
11256
11314
|
}, [data, zoneCompound]);
|
|
11257
|
-
(0,
|
|
11315
|
+
(0, import_react74.useEffect)(() => {
|
|
11258
11316
|
if (!content) {
|
|
11259
11317
|
if (ctx?.registerZone) {
|
|
11260
11318
|
ctx?.registerZone(zoneCompound);
|
|
@@ -11283,9 +11341,9 @@ var DropZoneRender = (0, import_react75.forwardRef)(
|
|
|
11283
11341
|
}
|
|
11284
11342
|
);
|
|
11285
11343
|
var DropZonePure = (props) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(DropZone, { ...props });
|
|
11286
|
-
var DropZone = (0,
|
|
11344
|
+
var DropZone = (0, import_react74.forwardRef)(
|
|
11287
11345
|
function DropZone2(props, ref) {
|
|
11288
|
-
const ctx = (0,
|
|
11346
|
+
const ctx = (0, import_react74.useContext)(dropZoneContext);
|
|
11289
11347
|
if (ctx?.mode === "edit") {
|
|
11290
11348
|
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_jsx_runtime72.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(DropZoneEdit, { ...props, ref }) });
|
|
11291
11349
|
}
|
|
@@ -11298,7 +11356,7 @@ init_IconButton2();
|
|
|
11298
11356
|
|
|
11299
11357
|
// components/CredBuild/index.tsx
|
|
11300
11358
|
init_react_import();
|
|
11301
|
-
var
|
|
11359
|
+
var import_react101 = require("react");
|
|
11302
11360
|
init_store2();
|
|
11303
11361
|
|
|
11304
11362
|
// components/CredBuild/components/Fields/index.tsx
|
|
@@ -11315,7 +11373,7 @@ var styles_module_default18 = { "CredBuildFields": "_CredBuildFields_53gu7_1", "
|
|
|
11315
11373
|
|
|
11316
11374
|
// components/CredBuild/components/Fields/index.tsx
|
|
11317
11375
|
init_lib();
|
|
11318
|
-
var
|
|
11376
|
+
var import_react76 = require("react");
|
|
11319
11377
|
init_fields();
|
|
11320
11378
|
var import_shallow7 = require("zustand/react/shallow");
|
|
11321
11379
|
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
@@ -11384,15 +11442,15 @@ var FieldsChildInner = ({ fieldName }) => {
|
|
|
11384
11442
|
})
|
|
11385
11443
|
);
|
|
11386
11444
|
const appStore = useAppStoreApi();
|
|
11387
|
-
const onChange = (0,
|
|
11445
|
+
const onChange = (0, import_react76.useCallback)(
|
|
11388
11446
|
async (value, updatedUi) => {
|
|
11389
11447
|
createOnChange(fieldName, appStore)(value, updatedUi);
|
|
11390
11448
|
},
|
|
11391
11449
|
[fieldName, appStore]
|
|
11392
11450
|
);
|
|
11393
11451
|
const { visible = true } = field ?? {};
|
|
11394
|
-
const fieldStore = (0,
|
|
11395
|
-
(0,
|
|
11452
|
+
const fieldStore = (0, import_react76.useContext)(fieldContextStore.ctx);
|
|
11453
|
+
(0, import_react76.useEffect)(() => {
|
|
11396
11454
|
return appStore.subscribe(
|
|
11397
11455
|
(s) => {
|
|
11398
11456
|
const data = s.getCurrentData();
|
|
@@ -11418,13 +11476,13 @@ var FieldsChildInner = ({ fieldName }) => {
|
|
|
11418
11476
|
};
|
|
11419
11477
|
var FieldsChild = ({ fieldName }) => {
|
|
11420
11478
|
const appStore = useAppStoreApi();
|
|
11421
|
-
const initialValue = (0,
|
|
11479
|
+
const initialValue = (0, import_react76.useMemo)(() => {
|
|
11422
11480
|
const value = appStore.getState().getCurrentData().props?.[fieldName];
|
|
11423
11481
|
return { [fieldName]: value };
|
|
11424
11482
|
}, [appStore, fieldName]);
|
|
11425
11483
|
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(fieldContextStore.Provider, { value: initialValue, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(FieldsChildInner, { fieldName }) });
|
|
11426
11484
|
};
|
|
11427
|
-
var FieldsChildMemo = (0,
|
|
11485
|
+
var FieldsChildMemo = (0, import_react76.memo)(FieldsChild);
|
|
11428
11486
|
var FieldsInternal = ({ wrapFields = true }) => {
|
|
11429
11487
|
const overrides = useAppStore((s) => s.overrides);
|
|
11430
11488
|
const componentResolving = useAppStore((s) => {
|
|
@@ -11445,7 +11503,7 @@ var FieldsInternal = ({ wrapFields = true }) => {
|
|
|
11445
11503
|
})
|
|
11446
11504
|
);
|
|
11447
11505
|
const isLoading = fieldsLoading || componentResolving;
|
|
11448
|
-
const Wrapper = (0,
|
|
11506
|
+
const Wrapper = (0, import_react76.useMemo)(() => overrides.fields || DefaultFields, [overrides]);
|
|
11449
11507
|
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
11450
11508
|
"form",
|
|
11451
11509
|
{
|
|
@@ -11460,14 +11518,14 @@ var FieldsInternal = ({ wrapFields = true }) => {
|
|
|
11460
11518
|
}
|
|
11461
11519
|
);
|
|
11462
11520
|
};
|
|
11463
|
-
var Fields = (0,
|
|
11521
|
+
var Fields = (0, import_react76.memo)(FieldsInternal);
|
|
11464
11522
|
|
|
11465
11523
|
// components/CredBuild/components/Components/index.tsx
|
|
11466
11524
|
init_react_import();
|
|
11467
11525
|
|
|
11468
11526
|
// lib/use-component-list.tsx
|
|
11469
11527
|
init_react_import();
|
|
11470
|
-
var
|
|
11528
|
+
var import_react78 = require("react");
|
|
11471
11529
|
|
|
11472
11530
|
// components/ComponentList/index.tsx
|
|
11473
11531
|
init_react_import();
|
|
@@ -11478,10 +11536,9 @@ var styles_module_default19 = { "ComponentList": "_ComponentList_10tqo_1", "Comp
|
|
|
11478
11536
|
|
|
11479
11537
|
// components/ComponentList/index.tsx
|
|
11480
11538
|
init_get_class_name_factory();
|
|
11481
|
-
var
|
|
11539
|
+
var import_react77 = require("react");
|
|
11482
11540
|
init_store2();
|
|
11483
11541
|
init_lucide_react();
|
|
11484
|
-
var import_react_virtual2 = require("@tanstack/react-virtual");
|
|
11485
11542
|
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
11486
11543
|
var getClassName28 = get_class_name_factory_default("ComponentList", styles_module_default19);
|
|
11487
11544
|
var ComponentListItem = ({
|
|
@@ -11494,7 +11551,7 @@ var ComponentListItem = ({
|
|
|
11494
11551
|
type: name
|
|
11495
11552
|
}).insert
|
|
11496
11553
|
);
|
|
11497
|
-
(0,
|
|
11554
|
+
(0, import_react77.useEffect)(() => {
|
|
11498
11555
|
if (overrides.componentItem) {
|
|
11499
11556
|
console.warn(
|
|
11500
11557
|
"The `componentItem` override has been deprecated and renamed to `drawerItem`"
|
|
@@ -11511,16 +11568,8 @@ var ComponentList = ({
|
|
|
11511
11568
|
const config = useAppStore((s) => s.config);
|
|
11512
11569
|
const setUi = useAppStore((s) => s.setUi);
|
|
11513
11570
|
const componentList = useAppStore((s) => s.state.ui.componentList);
|
|
11514
|
-
const parentRef = (0, import_react78.useRef)(null);
|
|
11515
11571
|
const { expanded = true } = componentList[id] || {};
|
|
11516
11572
|
const components = Object.keys(config.components);
|
|
11517
|
-
const virtualizer = (0, import_react_virtual2.useVirtualizer)({
|
|
11518
|
-
count: components.length,
|
|
11519
|
-
getScrollElement: () => parentRef.current,
|
|
11520
|
-
estimateSize: () => 32,
|
|
11521
|
-
// Estimated height of each item
|
|
11522
|
-
overscan: 5
|
|
11523
|
-
});
|
|
11524
11573
|
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: getClassName28({ isExpanded: expanded }), children: [
|
|
11525
11574
|
title && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
11526
11575
|
"button",
|
|
@@ -11553,47 +11602,22 @@ var ComponentList = ({
|
|
|
11553
11602
|
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
11554
11603
|
"div",
|
|
11555
11604
|
{
|
|
11556
|
-
ref: parentRef,
|
|
11557
11605
|
className: getClassName28("content"),
|
|
11558
11606
|
style: {
|
|
11559
|
-
|
|
11560
|
-
|
|
11561
|
-
transition: "max-height 0.3s ease-in-out"
|
|
11607
|
+
overflow: "visible",
|
|
11608
|
+
display: expanded ? "block" : "none"
|
|
11562
11609
|
},
|
|
11563
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
11564
|
-
|
|
11565
|
-
|
|
11566
|
-
|
|
11567
|
-
|
|
11568
|
-
|
|
11569
|
-
|
|
11610
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Drawer, { children: children || components.map((componentKey, i) => {
|
|
11611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
11612
|
+
ComponentListItem,
|
|
11613
|
+
{
|
|
11614
|
+
label: config.components[componentKey]["label"] ?? componentKey,
|
|
11615
|
+
name: componentKey,
|
|
11616
|
+
index: i
|
|
11570
11617
|
},
|
|
11571
|
-
|
|
11572
|
-
|
|
11573
|
-
|
|
11574
|
-
"div",
|
|
11575
|
-
{
|
|
11576
|
-
style: {
|
|
11577
|
-
position: "absolute",
|
|
11578
|
-
top: 0,
|
|
11579
|
-
left: 0,
|
|
11580
|
-
width: "100%",
|
|
11581
|
-
height: `${virtualItem.size}px`,
|
|
11582
|
-
transform: `translateY(${virtualItem.start}px)`
|
|
11583
|
-
},
|
|
11584
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
11585
|
-
ComponentListItem,
|
|
11586
|
-
{
|
|
11587
|
-
label: config.components[componentKey]["label"] ?? componentKey,
|
|
11588
|
-
name: componentKey
|
|
11589
|
-
}
|
|
11590
|
-
)
|
|
11591
|
-
},
|
|
11592
|
-
virtualItem.key
|
|
11593
|
-
);
|
|
11594
|
-
}) })
|
|
11595
|
-
}
|
|
11596
|
-
)
|
|
11618
|
+
componentKey
|
|
11619
|
+
);
|
|
11620
|
+
}) })
|
|
11597
11621
|
}
|
|
11598
11622
|
)
|
|
11599
11623
|
] });
|
|
@@ -11604,10 +11628,10 @@ ComponentList.Item = ComponentListItem;
|
|
|
11604
11628
|
init_store2();
|
|
11605
11629
|
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
11606
11630
|
var useComponentList = () => {
|
|
11607
|
-
const [componentList, setComponentList] = (0,
|
|
11631
|
+
const [componentList, setComponentList] = (0, import_react78.useState)();
|
|
11608
11632
|
const config = useAppStore((s) => s.config);
|
|
11609
11633
|
const uiComponentList = useAppStore((s) => s.state.ui.componentList);
|
|
11610
|
-
(0,
|
|
11634
|
+
(0, import_react78.useEffect)(() => {
|
|
11611
11635
|
if (Object.keys(uiComponentList).length > 0) {
|
|
11612
11636
|
const matchedComponents = [];
|
|
11613
11637
|
let _componentList;
|
|
@@ -11679,12 +11703,23 @@ var useComponentList = () => {
|
|
|
11679
11703
|
|
|
11680
11704
|
// components/CredBuild/components/Components/index.tsx
|
|
11681
11705
|
init_store2();
|
|
11682
|
-
var
|
|
11706
|
+
var import_react79 = require("react");
|
|
11707
|
+
init_lucide_react();
|
|
11708
|
+
|
|
11709
|
+
// css-module:/home/crediblemark/Project/Credibuild/components/CredBuild/components/Components/styles.module.css#css-module
|
|
11710
|
+
init_react_import();
|
|
11711
|
+
var styles_module_default20 = { "CredBuildComponents": "_CredBuildComponents_17idm_1", "CredBuildComponents-searchContainer": "_CredBuildComponents-searchContainer_17idm_7", "CredBuildComponents-searchWrapper": "_CredBuildComponents-searchWrapper_17idm_16", "CredBuildComponents-searchInput": "_CredBuildComponents-searchInput_17idm_23", "CredBuildComponents-searchIcon": "_CredBuildComponents-searchIcon_17idm_42", "CredBuildComponents-clearButton": "_CredBuildComponents-clearButton_17idm_49", "CredBuildComponents-listContainer": "_CredBuildComponents-listContainer_17idm_69", "CredBuildComponents-noResults": "_CredBuildComponents-noResults_17idm_74" };
|
|
11712
|
+
|
|
11713
|
+
// components/CredBuild/components/Components/index.tsx
|
|
11714
|
+
init_lib();
|
|
11683
11715
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
11716
|
+
var getClassName29 = get_class_name_factory_default("CredBuildComponents", styles_module_default20);
|
|
11684
11717
|
var Components = () => {
|
|
11685
11718
|
const overrides = useAppStore((s) => s.overrides);
|
|
11719
|
+
const config = useAppStore((s) => s.config);
|
|
11720
|
+
const [searchTerm, setSearchTerm] = (0, import_react79.useState)("");
|
|
11686
11721
|
const componentList = useComponentList();
|
|
11687
|
-
const Wrapper = (0,
|
|
11722
|
+
const Wrapper = (0, import_react79.useMemo)(() => {
|
|
11688
11723
|
if (overrides.components) {
|
|
11689
11724
|
console.warn(
|
|
11690
11725
|
"The `components` override has been deprecated and renamed to `drawer`"
|
|
@@ -11692,18 +11727,89 @@ var Components = () => {
|
|
|
11692
11727
|
}
|
|
11693
11728
|
return overrides.components || overrides.drawer || "div";
|
|
11694
11729
|
}, [overrides]);
|
|
11695
|
-
|
|
11730
|
+
const matchingComponents = (0, import_react79.useMemo)(() => {
|
|
11731
|
+
if (!searchTerm.trim()) return [];
|
|
11732
|
+
return Object.keys(config.components).filter((componentKey) => {
|
|
11733
|
+
const componentConf = config.components[componentKey] || {};
|
|
11734
|
+
const label = componentConf["label"] ?? componentKey;
|
|
11735
|
+
return label.toLowerCase().includes(searchTerm.toLowerCase()) || componentKey.toLowerCase().includes(searchTerm.toLowerCase());
|
|
11736
|
+
});
|
|
11737
|
+
}, [searchTerm, config.components]);
|
|
11738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(Wrapper, { className: getClassName29(), children: [
|
|
11739
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: getClassName29("searchContainer"), children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: getClassName29("searchWrapper"), children: [
|
|
11740
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Search, { size: 14, className: getClassName29("searchIcon") }),
|
|
11741
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
11742
|
+
"input",
|
|
11743
|
+
{
|
|
11744
|
+
type: "text",
|
|
11745
|
+
className: getClassName29("searchInput"),
|
|
11746
|
+
placeholder: "Search blocks...",
|
|
11747
|
+
value: searchTerm,
|
|
11748
|
+
onChange: (e) => setSearchTerm(e.target.value)
|
|
11749
|
+
}
|
|
11750
|
+
),
|
|
11751
|
+
searchTerm && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
11752
|
+
"button",
|
|
11753
|
+
{
|
|
11754
|
+
type: "button",
|
|
11755
|
+
className: getClassName29("clearButton"),
|
|
11756
|
+
onClick: () => setSearchTerm(""),
|
|
11757
|
+
title: "Clear search",
|
|
11758
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(X, { size: 12 })
|
|
11759
|
+
}
|
|
11760
|
+
)
|
|
11761
|
+
] }) }),
|
|
11762
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: getClassName29("listContainer"), children: searchTerm.trim() ? matchingComponents.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { style: { padding: "10px 12px" }, children: [
|
|
11763
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
11764
|
+
"div",
|
|
11765
|
+
{
|
|
11766
|
+
style: {
|
|
11767
|
+
fontSize: "10px",
|
|
11768
|
+
fontWeight: 700,
|
|
11769
|
+
color: "var(--cb-silver-muted)",
|
|
11770
|
+
marginBottom: "8px",
|
|
11771
|
+
textTransform: "uppercase",
|
|
11772
|
+
letterSpacing: "0.05em"
|
|
11773
|
+
},
|
|
11774
|
+
children: [
|
|
11775
|
+
"Search Results (",
|
|
11776
|
+
matchingComponents.length,
|
|
11777
|
+
")"
|
|
11778
|
+
]
|
|
11779
|
+
}
|
|
11780
|
+
),
|
|
11781
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Drawer, { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "2px" }, children: matchingComponents.map((componentName, i) => {
|
|
11782
|
+
const componentConf = config.components[componentName] || {};
|
|
11783
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
11784
|
+
ComponentList.Item,
|
|
11785
|
+
{
|
|
11786
|
+
label: componentConf["label"] ?? componentName,
|
|
11787
|
+
name: componentName,
|
|
11788
|
+
index: i
|
|
11789
|
+
},
|
|
11790
|
+
componentName
|
|
11791
|
+
);
|
|
11792
|
+
}) }) })
|
|
11793
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: getClassName29("noResults"), children: [
|
|
11794
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Inbox, { size: 20, strokeWidth: 1.5 }),
|
|
11795
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { children: [
|
|
11796
|
+
'No blocks found matching "',
|
|
11797
|
+
searchTerm,
|
|
11798
|
+
'"'
|
|
11799
|
+
] })
|
|
11800
|
+
] }) : componentList ? componentList : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(ComponentList, { id: "all" }) })
|
|
11801
|
+
] });
|
|
11696
11802
|
};
|
|
11697
11803
|
|
|
11698
11804
|
// components/CredBuild/components/Preview/index.tsx
|
|
11699
11805
|
init_react_import();
|
|
11700
11806
|
init_root_droppable_id();
|
|
11701
|
-
var
|
|
11807
|
+
var import_react82 = require("react");
|
|
11702
11808
|
init_store2();
|
|
11703
11809
|
|
|
11704
11810
|
// components/AutoFrame/index.tsx
|
|
11705
11811
|
init_react_import();
|
|
11706
|
-
var
|
|
11812
|
+
var import_react80 = require("react");
|
|
11707
11813
|
var import_object_hash = __toESM(require("object-hash"));
|
|
11708
11814
|
var import_react_dom3 = require("react-dom");
|
|
11709
11815
|
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
@@ -11756,7 +11862,7 @@ var CopyHostStyles = ({
|
|
|
11756
11862
|
onStylesLoaded = () => null
|
|
11757
11863
|
}) => {
|
|
11758
11864
|
const { document: doc, window: win } = useFrame();
|
|
11759
|
-
(0,
|
|
11865
|
+
(0, import_react80.useEffect)(() => {
|
|
11760
11866
|
if (!win || !doc) {
|
|
11761
11867
|
return () => {
|
|
11762
11868
|
};
|
|
@@ -11922,8 +12028,8 @@ var CopyHostStyles = ({
|
|
|
11922
12028
|
}, [debug, doc, onStylesLoaded, win]);
|
|
11923
12029
|
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_jsx_runtime77.Fragment, { children });
|
|
11924
12030
|
};
|
|
11925
|
-
var autoFrameContext = (0,
|
|
11926
|
-
var useFrame = () => (0,
|
|
12031
|
+
var autoFrameContext = (0, import_react80.createContext)({});
|
|
12032
|
+
var useFrame = () => (0, import_react80.useContext)(autoFrameContext);
|
|
11927
12033
|
function AutoFrame({
|
|
11928
12034
|
children,
|
|
11929
12035
|
className,
|
|
@@ -11936,20 +12042,20 @@ function AutoFrame({
|
|
|
11936
12042
|
frameRef,
|
|
11937
12043
|
...props
|
|
11938
12044
|
}) {
|
|
11939
|
-
const [loaded, setLoaded] = (0,
|
|
11940
|
-
const [ctx, setCtx] = (0,
|
|
11941
|
-
const [mountTarget, setMountTarget] = (0,
|
|
11942
|
-
const [stylesLoaded, setStylesLoaded] = (0,
|
|
11943
|
-
const handleStylesLoaded = (0,
|
|
12045
|
+
const [loaded, setLoaded] = (0, import_react80.useState)(false);
|
|
12046
|
+
const [ctx, setCtx] = (0, import_react80.useState)({});
|
|
12047
|
+
const [mountTarget, setMountTarget] = (0, import_react80.useState)();
|
|
12048
|
+
const [stylesLoaded, setStylesLoaded] = (0, import_react80.useState)(false);
|
|
12049
|
+
const handleStylesLoaded = (0, import_react80.useCallback)(() => {
|
|
11944
12050
|
setStylesLoaded(true);
|
|
11945
12051
|
}, []);
|
|
11946
|
-
const onReadyRef = (0,
|
|
11947
|
-
const onNotReadyRef = (0,
|
|
11948
|
-
(0,
|
|
12052
|
+
const onReadyRef = (0, import_react80.useRef)(onReady);
|
|
12053
|
+
const onNotReadyRef = (0, import_react80.useRef)(onNotReady);
|
|
12054
|
+
(0, import_react80.useEffect)(() => {
|
|
11949
12055
|
onReadyRef.current = onReady;
|
|
11950
12056
|
onNotReadyRef.current = onNotReady;
|
|
11951
12057
|
}, [onReady, onNotReady]);
|
|
11952
|
-
(0,
|
|
12058
|
+
(0, import_react80.useEffect)(() => {
|
|
11953
12059
|
if (frameRef.current) {
|
|
11954
12060
|
const doc = frameRef.current.contentDocument;
|
|
11955
12061
|
const win = frameRef.current.contentWindow;
|
|
@@ -11997,7 +12103,7 @@ var AutoFrame_default = AutoFrame;
|
|
|
11997
12103
|
|
|
11998
12104
|
// css-module:/home/crediblemark/Project/Credibuild/components/CredBuild/components/Preview/styles.module.css#css-module
|
|
11999
12105
|
init_react_import();
|
|
12000
|
-
var
|
|
12106
|
+
var styles_module_default21 = { "CredBuildPreview": "_CredBuildPreview_1z08a_1", "CredBuildPreview-frame": "_CredBuildPreview-frame_1z08a_6" };
|
|
12001
12107
|
|
|
12002
12108
|
// components/CredBuild/components/Preview/index.tsx
|
|
12003
12109
|
init_lib();
|
|
@@ -12005,7 +12111,7 @@ init_lib();
|
|
|
12005
12111
|
// components/Render/index.tsx
|
|
12006
12112
|
init_react_import();
|
|
12007
12113
|
init_root_droppable_id();
|
|
12008
|
-
var
|
|
12114
|
+
var import_react81 = require("react");
|
|
12009
12115
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
12010
12116
|
function Render({
|
|
12011
12117
|
config,
|
|
@@ -12037,7 +12143,7 @@ function Render({
|
|
|
12037
12143
|
(props) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(SlotRender, { ...props, config, metadata })
|
|
12038
12144
|
);
|
|
12039
12145
|
const richtextProps = useRichtextProps(config.root?.fields, pageProps);
|
|
12040
|
-
const nextContextValue = (0,
|
|
12146
|
+
const nextContextValue = (0, import_react81.useMemo)(
|
|
12041
12147
|
() => ({
|
|
12042
12148
|
mode: "render",
|
|
12043
12149
|
depth: 0
|
|
@@ -12071,10 +12177,10 @@ var BubbledPointerEvent = class extends BaseEvent {
|
|
|
12071
12177
|
|
|
12072
12178
|
// components/CredBuild/components/Preview/index.tsx
|
|
12073
12179
|
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
12074
|
-
var
|
|
12180
|
+
var getClassName30 = get_class_name_factory_default("CredBuildPreview", styles_module_default21);
|
|
12075
12181
|
var useBubbleIframeEvents = (ref) => {
|
|
12076
12182
|
const status = useAppStore((s) => s.status);
|
|
12077
|
-
(0,
|
|
12183
|
+
(0, import_react82.useEffect)(() => {
|
|
12078
12184
|
if (ref.current && status === "READY") {
|
|
12079
12185
|
const iframe = ref.current;
|
|
12080
12186
|
const handlePointerMove = (event) => {
|
|
@@ -12122,7 +12228,7 @@ var Preview = ({ id = "credbuild-preview" }) => {
|
|
|
12122
12228
|
const renderData = useAppStore(
|
|
12123
12229
|
(s) => s.state.ui.previewMode === "edit" ? null : s.state.data
|
|
12124
12230
|
);
|
|
12125
|
-
const Page = (0,
|
|
12231
|
+
const Page = (0, import_react82.useCallback)(
|
|
12126
12232
|
(pageProps) => {
|
|
12127
12233
|
const propsWithSlots = useSlots(
|
|
12128
12234
|
config,
|
|
@@ -12141,9 +12247,9 @@ var Preview = ({ id = "credbuild-preview" }) => {
|
|
|
12141
12247
|
},
|
|
12142
12248
|
[config]
|
|
12143
12249
|
);
|
|
12144
|
-
const Frame = (0,
|
|
12250
|
+
const Frame = (0, import_react82.useMemo)(() => overrides.iframe, [overrides]);
|
|
12145
12251
|
const rootProps = root.props || root;
|
|
12146
|
-
const ref = (0,
|
|
12252
|
+
const ref = (0, import_react82.useRef)(null);
|
|
12147
12253
|
useBubbleIframeEvents(ref);
|
|
12148
12254
|
const inner = !renderData ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
12149
12255
|
Page,
|
|
@@ -12159,7 +12265,7 @@ var Preview = ({ id = "credbuild-preview" }) => {
|
|
|
12159
12265
|
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(DropZonePure, { zone: rootDroppableId })
|
|
12160
12266
|
}
|
|
12161
12267
|
) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Render, { data: renderData, config, metadata });
|
|
12162
|
-
(0,
|
|
12268
|
+
(0, import_react82.useEffect)(() => {
|
|
12163
12269
|
if (!iframe.enabled) {
|
|
12164
12270
|
setStatus("READY");
|
|
12165
12271
|
}
|
|
@@ -12167,7 +12273,7 @@ var Preview = ({ id = "credbuild-preview" }) => {
|
|
|
12167
12273
|
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
12168
12274
|
"div",
|
|
12169
12275
|
{
|
|
12170
|
-
className:
|
|
12276
|
+
className: getClassName30(),
|
|
12171
12277
|
id,
|
|
12172
12278
|
"data-credbuild-preview": true,
|
|
12173
12279
|
onClick: (e) => {
|
|
@@ -12180,7 +12286,7 @@ var Preview = ({ id = "credbuild-preview" }) => {
|
|
|
12180
12286
|
AutoFrame_default,
|
|
12181
12287
|
{
|
|
12182
12288
|
id: "preview-frame",
|
|
12183
|
-
className:
|
|
12289
|
+
className: getClassName30("frame"),
|
|
12184
12290
|
"data-rfd-iframe": true,
|
|
12185
12291
|
onReady: () => {
|
|
12186
12292
|
setStatus("READY");
|
|
@@ -12200,7 +12306,7 @@ var Preview = ({ id = "credbuild-preview" }) => {
|
|
|
12200
12306
|
"div",
|
|
12201
12307
|
{
|
|
12202
12308
|
id: "preview-frame",
|
|
12203
|
-
className:
|
|
12309
|
+
className: getClassName30("frame"),
|
|
12204
12310
|
ref,
|
|
12205
12311
|
"data-credbuild-entry": true,
|
|
12206
12312
|
children: inner
|
|
@@ -12218,19 +12324,19 @@ init_react_import();
|
|
|
12218
12324
|
|
|
12219
12325
|
// css-module:/home/crediblemark/Project/Credibuild/components/LayerTree/styles.module.css#css-module
|
|
12220
12326
|
init_react_import();
|
|
12221
|
-
var
|
|
12327
|
+
var styles_module_default22 = { "LayerTree": "_LayerTree_nus40_1", "LayerTree-zoneTitle": "_LayerTree-zoneTitle_nus40_11", "LayerTree-helper": "_LayerTree-helper_nus40_17", "Layer": "_Layer_nus40_1", "Layer-inner": "_Layer-inner_nus40_29", "Layer--containsZone": "_Layer--containsZone_nus40_35", "Layer-clickable": "_Layer-clickable_nus40_39", "Layer--isSelected": "_Layer--isSelected_nus40_58", "Layer-chevron": "_Layer-chevron_nus40_79", "Layer--childIsSelected": "_Layer--childIsSelected_nus40_80", "Layer-zones": "_Layer-zones_nus40_84", "Layer-title": "_Layer-title_nus40_98", "Layer-name": "_Layer-name_nus40_107", "Layer-icon": "_Layer-icon_nus40_113", "Layer-zoneIcon": "_Layer-zoneIcon_nus40_118" };
|
|
12222
12328
|
|
|
12223
12329
|
// components/LayerTree/index.tsx
|
|
12224
12330
|
init_get_class_name_factory();
|
|
12225
12331
|
init_lucide_react();
|
|
12226
12332
|
init_root_droppable_id();
|
|
12227
|
-
var
|
|
12333
|
+
var import_react83 = require("react");
|
|
12228
12334
|
init_store2();
|
|
12229
12335
|
init_use_context_store();
|
|
12230
|
-
var
|
|
12336
|
+
var import_react_virtual2 = require("@tanstack/react-virtual");
|
|
12231
12337
|
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
12232
|
-
var
|
|
12233
|
-
var getClassNameLayer = get_class_name_factory_default("Layer",
|
|
12338
|
+
var getClassName31 = get_class_name_factory_default("LayerTree", styles_module_default22);
|
|
12339
|
+
var getClassNameLayer = get_class_name_factory_default("Layer", styles_module_default22);
|
|
12234
12340
|
var DEFAULT_LAYER_ROW_HEIGHT = 32;
|
|
12235
12341
|
var LAYER_TREE_VIRTUALIZATION_OVERSCAN = 8;
|
|
12236
12342
|
var MIN_VIRTUALIZED_LAYER_COUNT = 25;
|
|
@@ -12327,7 +12433,7 @@ var getScrollParent = (el) => {
|
|
|
12327
12433
|
}
|
|
12328
12434
|
return null;
|
|
12329
12435
|
};
|
|
12330
|
-
var Layer = (0,
|
|
12436
|
+
var Layer = (0, import_react83.forwardRef)(function Layer2({
|
|
12331
12437
|
childIsSelected,
|
|
12332
12438
|
dataIndex,
|
|
12333
12439
|
depth,
|
|
@@ -12337,13 +12443,13 @@ var Layer = (0, import_react84.forwardRef)(function Layer2({
|
|
|
12337
12443
|
selectedPathIds
|
|
12338
12444
|
}, ref) {
|
|
12339
12445
|
const dispatch = useAppStore((s) => s.dispatch);
|
|
12340
|
-
const zoneStore = (0,
|
|
12446
|
+
const zoneStore = (0, import_react83.useContext)(ZoneStoreContext);
|
|
12341
12447
|
const isHovering = useContextStore(
|
|
12342
12448
|
ZoneStoreContext,
|
|
12343
12449
|
(s) => s.hoveringComponent === node.itemId
|
|
12344
12450
|
);
|
|
12345
12451
|
const containsZone = node.childZones.length > 0;
|
|
12346
|
-
const setItemSelector = (0,
|
|
12452
|
+
const setItemSelector = (0, import_react83.useCallback)(
|
|
12347
12453
|
(itemSelector) => {
|
|
12348
12454
|
dispatch({ type: "setUi", ui: { itemSelector } });
|
|
12349
12455
|
},
|
|
@@ -12445,8 +12551,8 @@ var LayerTreeZone = ({
|
|
|
12445
12551
|
}) => {
|
|
12446
12552
|
const shouldVirtualize = depth === 0 && tree.items.length >= MIN_VIRTUALIZED_LAYER_COUNT;
|
|
12447
12553
|
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
|
|
12448
|
-
tree.label && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className:
|
|
12449
|
-
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className:
|
|
12554
|
+
tree.label && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: getClassName31("zoneTitle"), children: [
|
|
12555
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: getClassName31("zoneIcon"), children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Layers, { size: "16" }) }),
|
|
12450
12556
|
tree.label
|
|
12451
12557
|
] }),
|
|
12452
12558
|
shouldVirtualize ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
@@ -12474,8 +12580,8 @@ var StaticLayerTreeItems = ({
|
|
|
12474
12580
|
selectedPathIds,
|
|
12475
12581
|
tree
|
|
12476
12582
|
}) => {
|
|
12477
|
-
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("ul", { className:
|
|
12478
|
-
tree.items.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className:
|
|
12583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("ul", { className: getClassName31(), children: [
|
|
12584
|
+
tree.items.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: getClassName31("helper"), children: "No items" }),
|
|
12479
12585
|
tree.items.map((node) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
12480
12586
|
Layer,
|
|
12481
12587
|
{
|
|
@@ -12496,8 +12602,8 @@ var VirtualizedLayerTreeItems = ({
|
|
|
12496
12602
|
selectedPathIds,
|
|
12497
12603
|
tree
|
|
12498
12604
|
}) => {
|
|
12499
|
-
const listRef = (0,
|
|
12500
|
-
const virtualizer = (0,
|
|
12605
|
+
const listRef = (0, import_react83.useRef)(null);
|
|
12606
|
+
const virtualizer = (0, import_react_virtual2.useVirtualizer)({
|
|
12501
12607
|
count: tree.items.length,
|
|
12502
12608
|
estimateSize: (index) => getEstimatedRowHeight(tree.items[index].itemId),
|
|
12503
12609
|
getItemKey: (index) => tree.items[index].itemId,
|
|
@@ -12564,8 +12670,8 @@ var VirtualizedLayerTreeItems = ({
|
|
|
12564
12670
|
)
|
|
12565
12671
|
);
|
|
12566
12672
|
}
|
|
12567
|
-
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("ul", { className:
|
|
12568
|
-
tree.items.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className:
|
|
12673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("ul", { className: getClassName31(), ref: listRef, children: [
|
|
12674
|
+
tree.items.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: getClassName31("helper"), children: "No items" }),
|
|
12569
12675
|
renderedItems
|
|
12570
12676
|
] });
|
|
12571
12677
|
};
|
|
@@ -12588,7 +12694,7 @@ var LayerTree = ({
|
|
|
12588
12694
|
|
|
12589
12695
|
// components/CredBuild/components/Outline/index.tsx
|
|
12590
12696
|
init_store2();
|
|
12591
|
-
var
|
|
12697
|
+
var import_react84 = require("react");
|
|
12592
12698
|
|
|
12593
12699
|
// lib/data/find-zones-for-area.ts
|
|
12594
12700
|
init_react_import();
|
|
@@ -12610,13 +12716,13 @@ var Outline = () => {
|
|
|
12610
12716
|
const rootZones = useAppStore(
|
|
12611
12717
|
(0, import_shallow8.useShallow)((s) => findZonesForArea(s.state, "root"))
|
|
12612
12718
|
);
|
|
12613
|
-
const selectedPathIds = (0,
|
|
12719
|
+
const selectedPathIds = (0, import_react84.useMemo)(() => {
|
|
12614
12720
|
const selectedPath = selectedId ? nodes[selectedId]?.path : null;
|
|
12615
12721
|
return new Set(
|
|
12616
12722
|
selectedPath?.map((candidate) => candidate.split(":")[0]).filter(Boolean) || []
|
|
12617
12723
|
);
|
|
12618
12724
|
}, [nodes, selectedId]);
|
|
12619
|
-
const trees = (0,
|
|
12725
|
+
const trees = (0, import_react84.useMemo)(
|
|
12620
12726
|
() => rootZones.map(
|
|
12621
12727
|
(zoneCompound) => buildLayerTree({
|
|
12622
12728
|
config,
|
|
@@ -12628,7 +12734,7 @@ var Outline = () => {
|
|
|
12628
12734
|
),
|
|
12629
12735
|
[config, nodes, rootZones, zones]
|
|
12630
12736
|
);
|
|
12631
|
-
const Wrapper = (0,
|
|
12737
|
+
const Wrapper = (0, import_react84.useMemo)(() => outlineOverride || "div", [outlineOverride]);
|
|
12632
12738
|
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Wrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
12633
12739
|
LayerTree,
|
|
12634
12740
|
{
|
|
@@ -12644,7 +12750,7 @@ init_default_viewports();
|
|
|
12644
12750
|
|
|
12645
12751
|
// lib/use-loaded-overrides.ts
|
|
12646
12752
|
init_react_import();
|
|
12647
|
-
var
|
|
12753
|
+
var import_react85 = require("react");
|
|
12648
12754
|
|
|
12649
12755
|
// lib/load-overrides.ts
|
|
12650
12756
|
init_react_import();
|
|
@@ -12687,7 +12793,7 @@ var useLoadedOverrides = ({
|
|
|
12687
12793
|
overrides,
|
|
12688
12794
|
plugins
|
|
12689
12795
|
}) => {
|
|
12690
|
-
return (0,
|
|
12796
|
+
return (0, import_react85.useMemo)(() => {
|
|
12691
12797
|
return loadOverrides({ overrides, plugins });
|
|
12692
12798
|
}, [plugins, overrides]);
|
|
12693
12799
|
};
|
|
@@ -12698,7 +12804,7 @@ init_permissions();
|
|
|
12698
12804
|
|
|
12699
12805
|
// lib/use-credbuild.ts
|
|
12700
12806
|
init_react_import();
|
|
12701
|
-
var
|
|
12807
|
+
var import_react86 = require("react");
|
|
12702
12808
|
var import_zustand6 = require("zustand");
|
|
12703
12809
|
init_make_state_public();
|
|
12704
12810
|
init_get_item();
|
|
@@ -12802,7 +12908,7 @@ var generateUseCredBuild = (store, getState) => {
|
|
|
12802
12908
|
};
|
|
12803
12909
|
return storeData;
|
|
12804
12910
|
};
|
|
12805
|
-
var UseCredBuildStoreContext = (0,
|
|
12911
|
+
var UseCredBuildStoreContext = (0, import_react86.createContext)(
|
|
12806
12912
|
null
|
|
12807
12913
|
);
|
|
12808
12914
|
var convertToPickedStore = (store) => {
|
|
@@ -12816,7 +12922,7 @@ var convertToPickedStore = (store) => {
|
|
|
12816
12922
|
};
|
|
12817
12923
|
};
|
|
12818
12924
|
var useRegisterUseCredBuildStore = (appStore) => {
|
|
12819
|
-
const [useCredBuildStore] = (0,
|
|
12925
|
+
const [useCredBuildStore] = (0, import_react86.useState)(
|
|
12820
12926
|
() => (0, import_zustand6.createStore)(
|
|
12821
12927
|
() => generateUseCredBuild(
|
|
12822
12928
|
convertToPickedStore(appStore.getState()),
|
|
@@ -12824,7 +12930,7 @@ var useRegisterUseCredBuildStore = (appStore) => {
|
|
|
12824
12930
|
)
|
|
12825
12931
|
)
|
|
12826
12932
|
);
|
|
12827
|
-
(0,
|
|
12933
|
+
(0, import_react86.useEffect)(() => {
|
|
12828
12934
|
return appStore.subscribe(
|
|
12829
12935
|
(store) => convertToPickedStore(store),
|
|
12830
12936
|
(pickedStore) => {
|
|
@@ -12838,7 +12944,7 @@ var useRegisterUseCredBuildStore = (appStore) => {
|
|
|
12838
12944
|
};
|
|
12839
12945
|
function createUseCredBuild() {
|
|
12840
12946
|
return function useCredBuild2(selector) {
|
|
12841
|
-
const useCredBuildApi = (0,
|
|
12947
|
+
const useCredBuildApi = (0, import_react86.useContext)(UseCredBuildStoreContext);
|
|
12842
12948
|
if (!useCredBuildApi) {
|
|
12843
12949
|
throw new Error("useCredBuild must be used inside <CredBuild>.");
|
|
12844
12950
|
}
|
|
@@ -12850,7 +12956,7 @@ function createUseCredBuild() {
|
|
|
12850
12956
|
};
|
|
12851
12957
|
}
|
|
12852
12958
|
function useCredBuild() {
|
|
12853
|
-
(0,
|
|
12959
|
+
(0, import_react86.useEffect)(() => {
|
|
12854
12960
|
console.warn(
|
|
12855
12961
|
"You're using the `useCredBuild` method without a selector, which may cause unnecessary re-renders. Replace with `createUseCredBuild` and provide a selector for improved performance."
|
|
12856
12962
|
);
|
|
@@ -12858,7 +12964,7 @@ function useCredBuild() {
|
|
|
12858
12964
|
return createUseCredBuild()((s) => s);
|
|
12859
12965
|
}
|
|
12860
12966
|
function useGetCredBuild() {
|
|
12861
|
-
const useCredBuildApi = (0,
|
|
12967
|
+
const useCredBuildApi = (0, import_react86.useContext)(UseCredBuildStoreContext);
|
|
12862
12968
|
if (!useCredBuildApi) {
|
|
12863
12969
|
throw new Error("useCredBuildGet must be used inside <CredBuild>.");
|
|
12864
12970
|
}
|
|
@@ -12873,33 +12979,33 @@ init_to_component();
|
|
|
12873
12979
|
|
|
12874
12980
|
// components/CredBuild/components/Layout/index.tsx
|
|
12875
12981
|
init_react_import();
|
|
12876
|
-
var
|
|
12982
|
+
var import_react100 = require("react");
|
|
12877
12983
|
init_lib();
|
|
12878
12984
|
|
|
12879
12985
|
// components/CredBuild/context.tsx
|
|
12880
12986
|
init_react_import();
|
|
12881
|
-
var
|
|
12987
|
+
var import_react87 = require("react");
|
|
12882
12988
|
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
12883
|
-
var propsContext = (0,
|
|
12989
|
+
var propsContext = (0, import_react87.createContext)({});
|
|
12884
12990
|
function PropsProvider(props) {
|
|
12885
12991
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(propsContext.Provider, { value: props, children: props.children });
|
|
12886
12992
|
}
|
|
12887
|
-
var usePropsContext = () => (0,
|
|
12993
|
+
var usePropsContext = () => (0, import_react87.useContext)(propsContext);
|
|
12888
12994
|
|
|
12889
12995
|
// css-module:/home/crediblemark/Project/Credibuild/components/CredBuild/components/Layout/styles.module.css#css-module
|
|
12890
12996
|
init_react_import();
|
|
12891
|
-
var
|
|
12997
|
+
var styles_module_default23 = { "CredBuildLayout": "_CredBuildLayout_14aaz_1", "CredBuildLayout-inner": "_CredBuildLayout-inner_14aaz_8", "CredBuildLayout--leftSideBarVisible": "_CredBuildLayout--leftSideBarVisible_14aaz_29", "CredBuildLayout--rightSideBarVisible": "_CredBuildLayout--rightSideBarVisible_14aaz_33", "CredBuild--hidePlugins": "_CredBuild--hidePlugins_14aaz_37", "CredBuildLayout-item": "_CredBuildLayout-item_14aaz_43", "CredBuildLayout-header": "_CredBuildLayout-header_14aaz_49", "CredBuildLayout-left": "_CredBuildLayout-left_14aaz_54", "CredBuildLayout-editor": "_CredBuildLayout-editor_14aaz_67", "CredBuildLayout-right": "_CredBuildLayout-right_14aaz_75", "CredBuildLayout-sidebar": "_CredBuildLayout-sidebar_14aaz_92", "CredBuildPluginTab": "_CredBuildPluginTab_14aaz_107", "CredBuildPluginTab--visible": "_CredBuildPluginTab--visible_14aaz_114", "CredBuildPluginTab-body": "_CredBuildPluginTab-body_14aaz_118", "CredBuildLayout--mounted": "_CredBuildLayout--mounted_14aaz_134" };
|
|
12892
12998
|
|
|
12893
12999
|
// lib/use-inject-css.ts
|
|
12894
13000
|
init_react_import();
|
|
12895
|
-
var
|
|
13001
|
+
var import_react88 = require("react");
|
|
12896
13002
|
var styles = ``;
|
|
12897
13003
|
var useInjectStyleSheet = (initialStyles, iframeEnabled) => {
|
|
12898
|
-
const [el, setEl] = (0,
|
|
12899
|
-
(0,
|
|
13004
|
+
const [el, setEl] = (0, import_react88.useState)();
|
|
13005
|
+
(0, import_react88.useEffect)(() => {
|
|
12900
13006
|
setEl(document.createElement("style"));
|
|
12901
13007
|
}, []);
|
|
12902
|
-
(0,
|
|
13008
|
+
(0, import_react88.useEffect)(() => {
|
|
12903
13009
|
if (!el || typeof window === "undefined") {
|
|
12904
13010
|
return;
|
|
12905
13011
|
}
|
|
@@ -12929,12 +13035,12 @@ init_use_hotkey();
|
|
|
12929
13035
|
|
|
12930
13036
|
// lib/use-preview-mode-hotkeys.ts
|
|
12931
13037
|
init_react_import();
|
|
12932
|
-
var
|
|
13038
|
+
var import_react89 = require("react");
|
|
12933
13039
|
init_use_hotkey();
|
|
12934
13040
|
init_store2();
|
|
12935
13041
|
var usePreviewModeHotkeys = () => {
|
|
12936
13042
|
const appStore = useAppStoreApi();
|
|
12937
|
-
const toggleInteractive = (0,
|
|
13043
|
+
const toggleInteractive = (0, import_react89.useCallback)(() => {
|
|
12938
13044
|
const dispatch = appStore.getState().dispatch;
|
|
12939
13045
|
dispatch({
|
|
12940
13046
|
type: "setUi",
|
|
@@ -12949,9 +13055,9 @@ var usePreviewModeHotkeys = () => {
|
|
|
12949
13055
|
|
|
12950
13056
|
// components/DragDropContext/index.tsx
|
|
12951
13057
|
init_react_import();
|
|
12952
|
-
var
|
|
13058
|
+
var import_react90 = require("@dnd-kit/react");
|
|
12953
13059
|
init_store2();
|
|
12954
|
-
var
|
|
13060
|
+
var import_react91 = require("react");
|
|
12955
13061
|
var import_dom = require("@dnd-kit/dom");
|
|
12956
13062
|
init_get_item();
|
|
12957
13063
|
|
|
@@ -13298,8 +13404,8 @@ var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
|
13298
13404
|
var DEBUG3 = false;
|
|
13299
13405
|
var AREA_CHANGE_DEBOUNCE_MS = 100;
|
|
13300
13406
|
var useTempDisableFallback = (timeout3) => {
|
|
13301
|
-
const lastFallbackDisable = (0,
|
|
13302
|
-
return (0,
|
|
13407
|
+
const lastFallbackDisable = (0, import_react91.useRef)(null);
|
|
13408
|
+
return (0, import_react91.useCallback)((manager) => {
|
|
13303
13409
|
collisionStore.setState({ fallbackEnabled: false });
|
|
13304
13410
|
const fallbackId = generateId();
|
|
13305
13411
|
lastFallbackDisable.current = fallbackId;
|
|
@@ -13318,9 +13424,9 @@ var DragDropContextClient = ({
|
|
|
13318
13424
|
const dispatch = useAppStore((s) => s.dispatch);
|
|
13319
13425
|
const instanceId = useAppStore((s) => s.instanceId);
|
|
13320
13426
|
const appStore = useAppStoreApi();
|
|
13321
|
-
const debouncedParamsRef = (0,
|
|
13427
|
+
const debouncedParamsRef = (0, import_react91.useRef)(null);
|
|
13322
13428
|
const tempDisableFallback = useTempDisableFallback(100);
|
|
13323
|
-
const [zoneStore] = (0,
|
|
13429
|
+
const [zoneStore] = (0, import_react91.useState)(() => {
|
|
13324
13430
|
const rootVirtualizers = /* @__PURE__ */ new Map();
|
|
13325
13431
|
return (0, import_zustand7.createStore)(() => ({
|
|
13326
13432
|
zoneDepthIndex: {},
|
|
@@ -13359,7 +13465,7 @@ var DragDropContextClient = ({
|
|
|
13359
13465
|
}
|
|
13360
13466
|
}));
|
|
13361
13467
|
});
|
|
13362
|
-
const getChanged2 = (0,
|
|
13468
|
+
const getChanged2 = (0, import_react91.useCallback)(
|
|
13363
13469
|
(params) => {
|
|
13364
13470
|
const { zoneDepthIndex = {}, areaDepthIndex = {} } = zoneStore.getState() || {};
|
|
13365
13471
|
const stateHasZone = Object.keys(zoneDepthIndex).length > 0;
|
|
@@ -13380,7 +13486,7 @@ var DragDropContextClient = ({
|
|
|
13380
13486
|
},
|
|
13381
13487
|
[zoneStore]
|
|
13382
13488
|
);
|
|
13383
|
-
const setDeepestAndCollide = (0,
|
|
13489
|
+
const setDeepestAndCollide = (0, import_react91.useCallback)(
|
|
13384
13490
|
(params, manager) => {
|
|
13385
13491
|
const { zoneChanged, areaChanged } = getChanged2(params);
|
|
13386
13492
|
if (!zoneChanged && !areaChanged) return;
|
|
@@ -13404,7 +13510,7 @@ var DragDropContextClient = ({
|
|
|
13404
13510
|
setDeepestDb.cancel();
|
|
13405
13511
|
debouncedParamsRef.current = null;
|
|
13406
13512
|
};
|
|
13407
|
-
(0,
|
|
13513
|
+
(0, import_react91.useEffect)(() => {
|
|
13408
13514
|
if (DEBUG3) {
|
|
13409
13515
|
return zoneStore.subscribe(
|
|
13410
13516
|
(s) => console.log(
|
|
@@ -13415,7 +13521,7 @@ var DragDropContextClient = ({
|
|
|
13415
13521
|
);
|
|
13416
13522
|
}
|
|
13417
13523
|
}, [zoneStore]);
|
|
13418
|
-
const [plugins] = (0,
|
|
13524
|
+
const [plugins] = (0, import_react91.useState)(() => [
|
|
13419
13525
|
...disableAutoScroll ? import_dom.defaultPreset.plugins.filter((plugin) => plugin !== import_dom.AutoScroller) : import_dom.defaultPreset.plugins,
|
|
13420
13526
|
createNestedDroppablePlugin(
|
|
13421
13527
|
{
|
|
@@ -13463,10 +13569,10 @@ var DragDropContextClient = ({
|
|
|
13463
13569
|
)
|
|
13464
13570
|
]);
|
|
13465
13571
|
const sensors = useSensors();
|
|
13466
|
-
const [dragListeners, setDragListeners] = (0,
|
|
13467
|
-
const dragMode = (0,
|
|
13468
|
-
const initialSelector = (0,
|
|
13469
|
-
const nextContextValue = (0,
|
|
13572
|
+
const [dragListeners, setDragListeners] = (0, import_react91.useState)({});
|
|
13573
|
+
const dragMode = (0, import_react91.useRef)(null);
|
|
13574
|
+
const initialSelector = (0, import_react91.useRef)(void 0);
|
|
13575
|
+
const nextContextValue = (0, import_react91.useMemo)(
|
|
13470
13576
|
() => ({
|
|
13471
13577
|
mode: "edit",
|
|
13472
13578
|
areaId: "root",
|
|
@@ -13482,7 +13588,7 @@ var DragDropContextClient = ({
|
|
|
13482
13588
|
setDragListeners
|
|
13483
13589
|
},
|
|
13484
13590
|
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
13485
|
-
|
|
13591
|
+
import_react90.DragDropProvider,
|
|
13486
13592
|
{
|
|
13487
13593
|
plugins,
|
|
13488
13594
|
sensors,
|
|
@@ -13722,7 +13828,7 @@ var DragDropContext = ({
|
|
|
13722
13828
|
|
|
13723
13829
|
// components/CredBuild/components/Header/index.tsx
|
|
13724
13830
|
init_react_import();
|
|
13725
|
-
var
|
|
13831
|
+
var import_react94 = require("react");
|
|
13726
13832
|
init_store2();
|
|
13727
13833
|
init_lucide_react();
|
|
13728
13834
|
init_Heading();
|
|
@@ -13736,12 +13842,12 @@ init_get_class_name_factory();
|
|
|
13736
13842
|
|
|
13737
13843
|
// css-module:/home/crediblemark/Project/Credibuild/components/MenuBar/styles.module.css#css-module
|
|
13738
13844
|
init_react_import();
|
|
13739
|
-
var
|
|
13845
|
+
var styles_module_default24 = { "MenuBar": "_MenuBar_1m2ld_1", "MenuBar--menuOpen": "_MenuBar--menuOpen_1m2ld_14", "MenuBar-inner": "_MenuBar-inner_1m2ld_29", "MenuBar-history": "_MenuBar-history_1m2ld_45" };
|
|
13740
13846
|
|
|
13741
13847
|
// components/MenuBar/index.tsx
|
|
13742
13848
|
init_store2();
|
|
13743
13849
|
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
13744
|
-
var
|
|
13850
|
+
var getClassName32 = get_class_name_factory_default("MenuBar", styles_module_default24);
|
|
13745
13851
|
function MenuBar({
|
|
13746
13852
|
menuOpen = false,
|
|
13747
13853
|
renderHeaderActions,
|
|
@@ -13754,7 +13860,7 @@ function MenuBar({
|
|
|
13754
13860
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
13755
13861
|
"div",
|
|
13756
13862
|
{
|
|
13757
|
-
className:
|
|
13863
|
+
className: getClassName32({ menuOpen }),
|
|
13758
13864
|
onClick: (event) => {
|
|
13759
13865
|
const element = event.target;
|
|
13760
13866
|
if (window.matchMedia("(min-width: 638px)").matches) {
|
|
@@ -13764,8 +13870,8 @@ function MenuBar({
|
|
|
13764
13870
|
setMenuOpen(false);
|
|
13765
13871
|
}
|
|
13766
13872
|
},
|
|
13767
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className:
|
|
13768
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className:
|
|
13873
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: getClassName32("inner"), children: [
|
|
13874
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: getClassName32("history"), children: [
|
|
13769
13875
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
13770
13876
|
IconButton,
|
|
13771
13877
|
{
|
|
@@ -13802,12 +13908,12 @@ init_react_import();
|
|
|
13802
13908
|
init_lucide_react();
|
|
13803
13909
|
init_IconButton2();
|
|
13804
13910
|
init_store2();
|
|
13805
|
-
var
|
|
13911
|
+
var import_react92 = require("react");
|
|
13806
13912
|
init_lib();
|
|
13807
13913
|
|
|
13808
13914
|
// css-module:/home/crediblemark/Project/Credibuild/components/ViewportControls/styles.module.css#css-module
|
|
13809
13915
|
init_react_import();
|
|
13810
|
-
var
|
|
13916
|
+
var styles_module_default25 = { "ViewportControls": "_ViewportControls_gefvg_1", "ViewportControls--fullScreen": "_ViewportControls--fullScreen_gefvg_5", "ViewportControls-toggleButton": "_ViewportControls-toggleButton_gefvg_14", "ViewportControls--isExpanded": "_ViewportControls--isExpanded_gefvg_38", "ViewportControls-actions": "_ViewportControls-actions_gefvg_42", "ViewportControls-actionsInner": "_ViewportControls-actionsInner_gefvg_46", "ViewportControls-divider": "_ViewportControls-divider_gefvg_76", "ViewportControls-zoomSelect": "_ViewportControls-zoomSelect_gefvg_83", "ViewportControls-zoom": "_ViewportControls-zoom_gefvg_83", "ViewportButton-inner": "_ViewportButton-inner_gefvg_114", "ViewportButton--isActive": "_ViewportButton--isActive_gefvg_122" };
|
|
13811
13917
|
|
|
13812
13918
|
// components/ViewportControls/index.tsx
|
|
13813
13919
|
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
@@ -13817,8 +13923,8 @@ var icons = {
|
|
|
13817
13923
|
Monitor: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Monitor, { size: 16 }),
|
|
13818
13924
|
FullWidth: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Expand, { size: 16 })
|
|
13819
13925
|
};
|
|
13820
|
-
var
|
|
13821
|
-
var getClassNameButton = get_class_name_factory_default("ViewportButton",
|
|
13926
|
+
var getClassName33 = get_class_name_factory_default("ViewportControls", styles_module_default25);
|
|
13927
|
+
var getClassNameButton = get_class_name_factory_default("ViewportButton", styles_module_default25);
|
|
13822
13928
|
var ActionButton = ({
|
|
13823
13929
|
children,
|
|
13824
13930
|
title,
|
|
@@ -13859,7 +13965,7 @@ var ViewportControls = ({
|
|
|
13859
13965
|
const defaultsContainAutoZoom = defaultZoomOptions.find(
|
|
13860
13966
|
(option) => option.value === autoZoom
|
|
13861
13967
|
);
|
|
13862
|
-
const zoomOptions = (0,
|
|
13968
|
+
const zoomOptions = (0, import_react92.useMemo)(() => {
|
|
13863
13969
|
const options = [
|
|
13864
13970
|
...defaultZoomOptions,
|
|
13865
13971
|
...defaultsContainAutoZoom || isNaN(autoZoom) ? [] : [
|
|
@@ -13871,20 +13977,20 @@ var ViewportControls = ({
|
|
|
13871
13977
|
].filter((a) => a.value <= (autoZoom || 1)).sort((a, b) => a.value > b.value ? 1 : -1);
|
|
13872
13978
|
return options.length > 0 ? options : defaultZoomOptions;
|
|
13873
13979
|
}, [autoZoom, defaultsContainAutoZoom]);
|
|
13874
|
-
const [activeViewport, setActiveViewport] = (0,
|
|
13980
|
+
const [activeViewport, setActiveViewport] = (0, import_react92.useState)(
|
|
13875
13981
|
uiViewports.current.width
|
|
13876
13982
|
);
|
|
13877
|
-
(0,
|
|
13983
|
+
(0, import_react92.useEffect)(() => {
|
|
13878
13984
|
setActiveViewport(uiViewports.current.width);
|
|
13879
13985
|
}, [uiViewports.current.width, uiViewports]);
|
|
13880
|
-
const [isExpanded, setIsExpanded] = (0,
|
|
13986
|
+
const [isExpanded, setIsExpanded] = (0, import_react92.useState)(false);
|
|
13881
13987
|
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
13882
13988
|
"div",
|
|
13883
13989
|
{
|
|
13884
|
-
className:
|
|
13990
|
+
className: getClassName33({ isExpanded, fullScreen }),
|
|
13885
13991
|
suppressHydrationWarning: true,
|
|
13886
13992
|
children: [
|
|
13887
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className:
|
|
13993
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: getClassName33("actions"), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: getClassName33("actionsInner"), children: [
|
|
13888
13994
|
viewports.map((viewport, i) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
13889
13995
|
ActionButton,
|
|
13890
13996
|
{
|
|
@@ -13898,7 +14004,7 @@ var ViewportControls = ({
|
|
|
13898
14004
|
},
|
|
13899
14005
|
i
|
|
13900
14006
|
)),
|
|
13901
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className:
|
|
14007
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: getClassName33("divider") }),
|
|
13902
14008
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
13903
14009
|
ActionButton,
|
|
13904
14010
|
{
|
|
@@ -13933,12 +14039,12 @@ var ViewportControls = ({
|
|
|
13933
14039
|
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ZoomIn, { size: 16 })
|
|
13934
14040
|
}
|
|
13935
14041
|
),
|
|
13936
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className:
|
|
13937
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className:
|
|
14042
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: getClassName33("zoom"), children: [
|
|
14043
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: getClassName33("divider") }),
|
|
13938
14044
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
13939
14045
|
"select",
|
|
13940
14046
|
{
|
|
13941
|
-
className:
|
|
14047
|
+
className: getClassName33("zoomSelect"),
|
|
13942
14048
|
value: zoom.toString(),
|
|
13943
14049
|
onClick: (e) => {
|
|
13944
14050
|
e.stopPropagation();
|
|
@@ -13961,7 +14067,7 @@ var ViewportControls = ({
|
|
|
13961
14067
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
13962
14068
|
"button",
|
|
13963
14069
|
{
|
|
13964
|
-
className:
|
|
14070
|
+
className: getClassName33("toggleButton"),
|
|
13965
14071
|
title: "Toggle viewport menu",
|
|
13966
14072
|
onClick: () => setIsExpanded((s) => !s),
|
|
13967
14073
|
children: isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(X, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Monitor, { size: 16 })
|
|
@@ -13977,14 +14083,14 @@ var import_shallow9 = require("zustand/react/shallow");
|
|
|
13977
14083
|
|
|
13978
14084
|
// lib/frame-context.tsx
|
|
13979
14085
|
init_react_import();
|
|
13980
|
-
var
|
|
14086
|
+
var import_react93 = require("react");
|
|
13981
14087
|
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
13982
|
-
var FrameContext = (0,
|
|
14088
|
+
var FrameContext = (0, import_react93.createContext)(null);
|
|
13983
14089
|
var FrameProvider = ({
|
|
13984
14090
|
children
|
|
13985
14091
|
}) => {
|
|
13986
|
-
const frameRef = (0,
|
|
13987
|
-
const value = (0,
|
|
14092
|
+
const frameRef = (0, import_react93.useRef)(null);
|
|
14093
|
+
const value = (0, import_react93.useMemo)(
|
|
13988
14094
|
() => ({
|
|
13989
14095
|
frameRef
|
|
13990
14096
|
}),
|
|
@@ -13993,7 +14099,7 @@ var FrameProvider = ({
|
|
|
13993
14099
|
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(FrameContext.Provider, { value, children });
|
|
13994
14100
|
};
|
|
13995
14101
|
var useCanvasFrame = () => {
|
|
13996
|
-
const context = (0,
|
|
14102
|
+
const context = (0, import_react93.useContext)(FrameContext);
|
|
13997
14103
|
if (context === null) {
|
|
13998
14104
|
throw new Error("useCanvasFrame must be used within a FrameProvider");
|
|
13999
14105
|
}
|
|
@@ -14002,11 +14108,11 @@ var useCanvasFrame = () => {
|
|
|
14002
14108
|
|
|
14003
14109
|
// css-module:/home/crediblemark/Project/Credibuild/components/CredBuild/components/Header/styles.module.css#css-module
|
|
14004
14110
|
init_react_import();
|
|
14005
|
-
var
|
|
14111
|
+
var styles_module_default26 = { "CredBuildHeader": "_CredBuildHeader_qzv5u_1", "CredBuildHeader-inner": "_CredBuildHeader-inner_qzv5u_20", "CredBuildHeader-viewportTools": "_CredBuildHeader-viewportTools_qzv5u_28", "CredBuildHeader-leftActions": "_CredBuildHeader-leftActions_qzv5u_35", "CredBuildHeader-toggle": "_CredBuildHeader-toggle_qzv5u_41", "CredBuildHeader-leftSideBarToggle": "_CredBuildHeader-leftSideBarToggle_qzv5u_47", "CredBuildHeader-rightSideBarToggle": "_CredBuildHeader-rightSideBarToggle_qzv5u_48", "CredBuildHeader-title": "_CredBuildHeader-title_qzv5u_52", "CredBuildHeader-path": "_CredBuildHeader-path_qzv5u_57", "CredBuildHeader-tools": "_CredBuildHeader-tools_qzv5u_68", "CredBuildHeader-menuButton": "_CredBuildHeader-menuButton_qzv5u_75" };
|
|
14006
14112
|
|
|
14007
14113
|
// components/CredBuild/components/Header/index.tsx
|
|
14008
14114
|
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
14009
|
-
var
|
|
14115
|
+
var getClassName34 = get_class_name_factory_default("CredBuildHeader", styles_module_default26);
|
|
14010
14116
|
var HeaderInner = ({
|
|
14011
14117
|
hidePlugins,
|
|
14012
14118
|
theme
|
|
@@ -14021,7 +14127,7 @@ var HeaderInner = ({
|
|
|
14021
14127
|
} = usePropsContext();
|
|
14022
14128
|
const dispatch = useAppStore((s) => s.dispatch);
|
|
14023
14129
|
const appStore = useAppStoreApi();
|
|
14024
|
-
const defaultHeaderRender = (0,
|
|
14130
|
+
const defaultHeaderRender = (0, import_react94.useMemo)(() => {
|
|
14025
14131
|
if (renderHeader) {
|
|
14026
14132
|
console.warn(
|
|
14027
14133
|
"`renderHeader` is deprecated. Please use `overrides.header` and the `useCredBuild` hook instead"
|
|
@@ -14035,7 +14141,7 @@ var HeaderInner = ({
|
|
|
14035
14141
|
}
|
|
14036
14142
|
return DefaultOverride;
|
|
14037
14143
|
}, [renderHeader, dispatch]);
|
|
14038
|
-
const defaultHeaderActionsRender = (0,
|
|
14144
|
+
const defaultHeaderActionsRender = (0, import_react94.useMemo)(() => {
|
|
14039
14145
|
if (renderHeaderActions) {
|
|
14040
14146
|
console.warn(
|
|
14041
14147
|
"`renderHeaderActions` is deprecated. Please use `overrides.headerActions` and the `useCredBuild` hook instead."
|
|
@@ -14055,7 +14161,7 @@ var HeaderInner = ({
|
|
|
14055
14161
|
const CustomHeaderActions = useAppStore(
|
|
14056
14162
|
(s) => s.overrides.headerActions || defaultHeaderActionsRender
|
|
14057
14163
|
);
|
|
14058
|
-
const [menuOpen, setMenuOpen] = (0,
|
|
14164
|
+
const [menuOpen, setMenuOpen] = (0, import_react94.useState)(false);
|
|
14059
14165
|
const rootTitle = useAppStore((s) => {
|
|
14060
14166
|
const rootData = s.state.indexes.nodes["root"]?.data;
|
|
14061
14167
|
return rootData.props.title ?? "";
|
|
@@ -14084,7 +14190,7 @@ var HeaderInner = ({
|
|
|
14084
14190
|
);
|
|
14085
14191
|
const { frameRef } = useCanvasFrame();
|
|
14086
14192
|
const resetAutoZoom = useResetAutoZoom(frameRef);
|
|
14087
|
-
const toggleSidebars = (0,
|
|
14193
|
+
const toggleSidebars = (0, import_react94.useCallback)(
|
|
14088
14194
|
(sidebar) => {
|
|
14089
14195
|
const widerViewport = window.matchMedia("(min-width: 638px)").matches;
|
|
14090
14196
|
const sideBarVisible = sidebar === "left" ? leftSideBarVisible : rightSideBarVisible;
|
|
@@ -14128,13 +14234,13 @@ var HeaderInner = ({
|
|
|
14128
14234
|
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
14129
14235
|
"header",
|
|
14130
14236
|
{
|
|
14131
|
-
className:
|
|
14237
|
+
className: getClassName34({
|
|
14132
14238
|
leftSideBarVisible,
|
|
14133
14239
|
rightSideBarVisible,
|
|
14134
14240
|
hidePlugins
|
|
14135
14241
|
}),
|
|
14136
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className:
|
|
14137
|
-
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className:
|
|
14242
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: getClassName34("inner"), children: [
|
|
14243
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: getClassName34("leftActions"), children: [
|
|
14138
14244
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { style: { marginRight: "8px", display: "flex", gap: "8px", alignItems: "center" }, children: [
|
|
14139
14245
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
14140
14246
|
Button,
|
|
@@ -14168,8 +14274,8 @@ var HeaderInner = ({
|
|
|
14168
14274
|
}
|
|
14169
14275
|
)
|
|
14170
14276
|
] }),
|
|
14171
|
-
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className:
|
|
14172
|
-
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className:
|
|
14277
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: getClassName34("toggle"), children: [
|
|
14278
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: getClassName34("leftSideBarToggle"), children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
14173
14279
|
IconButton,
|
|
14174
14280
|
{
|
|
14175
14281
|
type: "button",
|
|
@@ -14180,7 +14286,7 @@ var HeaderInner = ({
|
|
|
14180
14286
|
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(PanelLeft, { size: 16, focusable: "false" })
|
|
14181
14287
|
}
|
|
14182
14288
|
) }),
|
|
14183
|
-
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className:
|
|
14289
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: getClassName34("rightSideBarToggle"), children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
14184
14290
|
IconButton,
|
|
14185
14291
|
{
|
|
14186
14292
|
type: "button",
|
|
@@ -14192,12 +14298,12 @@ var HeaderInner = ({
|
|
|
14192
14298
|
}
|
|
14193
14299
|
) })
|
|
14194
14300
|
] }),
|
|
14195
|
-
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className:
|
|
14301
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: getClassName34("title"), children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Heading7, { rank: "2", size: "xs", children: [
|
|
14196
14302
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { style: { fontSize: "11px", textTransform: "uppercase", letterSpacing: "0.08em", fontWeight: 600 }, children: headerTitle || rootTitle || "Page" }),
|
|
14197
|
-
headerPath && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_jsx_runtime88.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("code", { className:
|
|
14303
|
+
headerPath && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_jsx_runtime88.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("code", { className: getClassName34("path"), style: { fontSize: "10px", opacity: 0.6, marginLeft: "8px" }, children: headerPath }) })
|
|
14198
14304
|
] }) })
|
|
14199
14305
|
] }),
|
|
14200
|
-
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className:
|
|
14306
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: getClassName34("viewportTools"), children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
14201
14307
|
ViewportControls,
|
|
14202
14308
|
{
|
|
14203
14309
|
fullScreen: _experimentalFullScreenCanvas,
|
|
@@ -14223,8 +14329,8 @@ var HeaderInner = ({
|
|
|
14223
14329
|
}
|
|
14224
14330
|
}
|
|
14225
14331
|
) }),
|
|
14226
|
-
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className:
|
|
14227
|
-
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className:
|
|
14332
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: getClassName34("tools"), children: [
|
|
14333
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: getClassName34("menuButton"), children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
14228
14334
|
IconButton,
|
|
14229
14335
|
{
|
|
14230
14336
|
type: "button",
|
|
@@ -14274,14 +14380,14 @@ var HeaderInner = ({
|
|
|
14274
14380
|
}
|
|
14275
14381
|
);
|
|
14276
14382
|
};
|
|
14277
|
-
var Header = (0,
|
|
14383
|
+
var Header = (0, import_react94.memo)(HeaderInner);
|
|
14278
14384
|
|
|
14279
14385
|
// components/SidebarSection/index.tsx
|
|
14280
14386
|
init_react_import();
|
|
14281
14387
|
|
|
14282
14388
|
// css-module:/home/crediblemark/Project/Credibuild/components/SidebarSection/styles.module.css#css-module
|
|
14283
14389
|
init_react_import();
|
|
14284
|
-
var
|
|
14390
|
+
var styles_module_default27 = { "SidebarSection": "_SidebarSection_1w6vl_1", "SidebarSection-title": "_SidebarSection-title_1w6vl_12", "SidebarSection--noBorderTop": "_SidebarSection--noBorderTop_1w6vl_38", "SidebarSection-content": "_SidebarSection-content_1w6vl_42", "SidebarSection-breadcrumbLabel": "_SidebarSection-breadcrumbLabel_1w6vl_51", "SidebarSection-breadcrumbs": "_SidebarSection-breadcrumbs_1w6vl_80", "SidebarSection-breadcrumb": "_SidebarSection-breadcrumb_1w6vl_51", "SidebarSection-heading": "_SidebarSection-heading_1w6vl_92", "SidebarSection-loadingOverlay": "_SidebarSection-loadingOverlay_1w6vl_96" };
|
|
14285
14391
|
|
|
14286
14392
|
// components/SidebarSection/index.tsx
|
|
14287
14393
|
init_get_class_name_factory();
|
|
@@ -14293,7 +14399,7 @@ init_react_import();
|
|
|
14293
14399
|
|
|
14294
14400
|
// css-module:/home/crediblemark/Project/Credibuild/components/Breadcrumbs/styles.module.css#css-module
|
|
14295
14401
|
init_react_import();
|
|
14296
|
-
var
|
|
14402
|
+
var styles_module_default28 = { "Breadcrumbs": "_Breadcrumbs_1e0gb_1", "Breadcrumbs-breadcrumbLabel": "_Breadcrumbs-breadcrumbLabel_1e0gb_7", "Breadcrumbs-breadcrumb": "_Breadcrumbs-breadcrumb_1e0gb_7" };
|
|
14297
14403
|
|
|
14298
14404
|
// components/Breadcrumbs/index.tsx
|
|
14299
14405
|
init_get_class_name_factory();
|
|
@@ -14301,14 +14407,14 @@ init_lucide_react();
|
|
|
14301
14407
|
|
|
14302
14408
|
// lib/use-breadcrumbs.ts
|
|
14303
14409
|
init_react_import();
|
|
14304
|
-
var
|
|
14410
|
+
var import_react95 = require("react");
|
|
14305
14411
|
init_store2();
|
|
14306
14412
|
var useBreadcrumbs = (renderCount) => {
|
|
14307
14413
|
const selectedId = useAppStore((s) => s.selectedItem?.props.id);
|
|
14308
14414
|
const config = useAppStore((s) => s.config);
|
|
14309
14415
|
const path = useAppStore((s) => s.state.indexes.nodes[selectedId]?.path);
|
|
14310
14416
|
const appStore = useAppStoreApi();
|
|
14311
|
-
return (0,
|
|
14417
|
+
return (0, import_react95.useMemo)(() => {
|
|
14312
14418
|
const breadcrumbs = path?.map((zoneCompound) => {
|
|
14313
14419
|
const [componentId] = zoneCompound.split(":");
|
|
14314
14420
|
if (componentId === "root") {
|
|
@@ -14340,20 +14446,20 @@ var useBreadcrumbs = (renderCount) => {
|
|
|
14340
14446
|
// components/Breadcrumbs/index.tsx
|
|
14341
14447
|
init_store2();
|
|
14342
14448
|
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
14343
|
-
var
|
|
14449
|
+
var getClassName35 = get_class_name_factory_default("Breadcrumbs", styles_module_default28);
|
|
14344
14450
|
var Breadcrumbs = ({
|
|
14345
14451
|
children,
|
|
14346
14452
|
numParents = 1
|
|
14347
14453
|
}) => {
|
|
14348
14454
|
const setUi = useAppStore((s) => s.setUi);
|
|
14349
14455
|
const breadcrumbs = useBreadcrumbs(numParents);
|
|
14350
|
-
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className:
|
|
14351
|
-
breadcrumbs.map((breadcrumb, i) => /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className:
|
|
14456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: getClassName35(), children: [
|
|
14457
|
+
breadcrumbs.map((breadcrumb, i) => /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: getClassName35("breadcrumb"), children: [
|
|
14352
14458
|
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
14353
14459
|
"button",
|
|
14354
14460
|
{
|
|
14355
14461
|
type: "button",
|
|
14356
|
-
className:
|
|
14462
|
+
className: getClassName35("breadcrumbLabel"),
|
|
14357
14463
|
onClick: () => setUi({ itemSelector: breadcrumb.selector }),
|
|
14358
14464
|
children: breadcrumb.label
|
|
14359
14465
|
}
|
|
@@ -14366,7 +14472,7 @@ var Breadcrumbs = ({
|
|
|
14366
14472
|
|
|
14367
14473
|
// components/SidebarSection/index.tsx
|
|
14368
14474
|
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
14369
|
-
var
|
|
14475
|
+
var getClassName36 = get_class_name_factory_default("SidebarSection", styles_module_default27);
|
|
14370
14476
|
var SidebarSection = ({
|
|
14371
14477
|
children,
|
|
14372
14478
|
title,
|
|
@@ -14375,25 +14481,25 @@ var SidebarSection = ({
|
|
|
14375
14481
|
noBorderTop,
|
|
14376
14482
|
isLoading
|
|
14377
14483
|
}) => {
|
|
14378
|
-
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className:
|
|
14379
|
-
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className:
|
|
14484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: getClassName36({ noBorderTop }), style: { background }, children: [
|
|
14485
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: getClassName36("title"), children: /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: getClassName36("breadcrumbs"), children: [
|
|
14380
14486
|
showBreadcrumbs && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Breadcrumbs, {}),
|
|
14381
|
-
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className:
|
|
14487
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: getClassName36("heading"), children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Heading7, { rank: "2", size: "xs", children: title }) })
|
|
14382
14488
|
] }) }),
|
|
14383
|
-
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className:
|
|
14384
|
-
isLoading && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className:
|
|
14489
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: getClassName36("content"), children }),
|
|
14490
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: getClassName36("loadingOverlay"), children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Loader, { size: 32 }) })
|
|
14385
14491
|
] });
|
|
14386
14492
|
};
|
|
14387
14493
|
|
|
14388
14494
|
// components/CredBuild/components/Canvas/index.tsx
|
|
14389
14495
|
init_react_import();
|
|
14390
14496
|
init_css_box_model_esm();
|
|
14391
|
-
var
|
|
14497
|
+
var import_react96 = require("react");
|
|
14392
14498
|
init_store2();
|
|
14393
14499
|
|
|
14394
14500
|
// css-module:/home/crediblemark/Project/Credibuild/components/CredBuild/components/Canvas/styles.module.css#css-module
|
|
14395
14501
|
init_react_import();
|
|
14396
|
-
var
|
|
14502
|
+
var styles_module_default29 = { "CredBuildCanvas": "_CredBuildCanvas_1ivia_1", "CredBuildCanvas--fullScreen": "_CredBuildCanvas--fullScreen_1ivia_22", "CredBuildCanvas-inner": "_CredBuildCanvas-inner_1ivia_33", "CredBuildCanvas-root": "_CredBuildCanvas-root_1ivia_42", "CredBuildCanvas--ready": "_CredBuildCanvas--ready_1ivia_67", "CredBuildCanvas-loader": "_CredBuildCanvas-loader_1ivia_72", "CredBuildCanvas--showLoader": "_CredBuildCanvas--showLoader_1ivia_82" };
|
|
14397
14503
|
|
|
14398
14504
|
// components/CredBuild/components/Canvas/index.tsx
|
|
14399
14505
|
init_lib();
|
|
@@ -14401,7 +14507,7 @@ init_Loader();
|
|
|
14401
14507
|
var import_shallow10 = require("zustand/react/shallow");
|
|
14402
14508
|
init_default_viewports();
|
|
14403
14509
|
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
14404
|
-
var
|
|
14510
|
+
var getClassName37 = get_class_name_factory_default("CredBuildCanvas", styles_module_default29);
|
|
14405
14511
|
var ZOOM_ON_CHANGE = true;
|
|
14406
14512
|
var TRANSITION_DURATION = 150;
|
|
14407
14513
|
var Canvas = () => {
|
|
@@ -14444,17 +14550,17 @@ var Canvas = () => {
|
|
|
14444
14550
|
viewports: s.state.ui.viewports
|
|
14445
14551
|
}))
|
|
14446
14552
|
);
|
|
14447
|
-
const [showTransition, setShowTransition] = (0,
|
|
14448
|
-
const isResizingRef = (0,
|
|
14449
|
-
const defaultRender = (0,
|
|
14553
|
+
const [showTransition, setShowTransition] = (0, import_react96.useState)(false);
|
|
14554
|
+
const isResizingRef = (0, import_react96.useRef)(false);
|
|
14555
|
+
const defaultRender = (0, import_react96.useMemo)(() => {
|
|
14450
14556
|
const CredBuildDefault = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_jsx_runtime91.Fragment, { children });
|
|
14451
14557
|
return CredBuildDefault;
|
|
14452
14558
|
}, []);
|
|
14453
|
-
const CustomPreview = (0,
|
|
14559
|
+
const CustomPreview = (0, import_react96.useMemo)(
|
|
14454
14560
|
() => overrides.preview || defaultRender,
|
|
14455
14561
|
[overrides, defaultRender]
|
|
14456
14562
|
);
|
|
14457
|
-
const getFrameDimensions = (0,
|
|
14563
|
+
const getFrameDimensions = (0, import_react96.useCallback)(() => {
|
|
14458
14564
|
if (frameRef.current) {
|
|
14459
14565
|
const frame = frameRef.current;
|
|
14460
14566
|
const box = getBox(frame);
|
|
@@ -14462,7 +14568,7 @@ var Canvas = () => {
|
|
|
14462
14568
|
}
|
|
14463
14569
|
return { width: 0, height: 0 };
|
|
14464
14570
|
}, [frameRef]);
|
|
14465
|
-
(0,
|
|
14571
|
+
(0, import_react96.useEffect)(() => {
|
|
14466
14572
|
resetAutoZoom();
|
|
14467
14573
|
}, [
|
|
14468
14574
|
frameRef,
|
|
@@ -14472,7 +14578,7 @@ var Canvas = () => {
|
|
|
14472
14578
|
viewports,
|
|
14473
14579
|
resetAutoZoom
|
|
14474
14580
|
]);
|
|
14475
|
-
(0,
|
|
14581
|
+
(0, import_react96.useEffect)(() => {
|
|
14476
14582
|
const { height: frameHeight } = getFrameDimensions();
|
|
14477
14583
|
if (viewports.current.height === "auto") {
|
|
14478
14584
|
const newRootHeight = frameHeight / zoomConfig.zoom;
|
|
@@ -14490,12 +14596,12 @@ var Canvas = () => {
|
|
|
14490
14596
|
viewports,
|
|
14491
14597
|
zoomConfig.rootHeight
|
|
14492
14598
|
]);
|
|
14493
|
-
(0,
|
|
14599
|
+
(0, import_react96.useEffect)(() => {
|
|
14494
14600
|
if (ZOOM_ON_CHANGE) {
|
|
14495
14601
|
resetAutoZoom();
|
|
14496
14602
|
}
|
|
14497
14603
|
}, [viewports.current.width, viewports, resetAutoZoom]);
|
|
14498
|
-
(0,
|
|
14604
|
+
(0, import_react96.useEffect)(() => {
|
|
14499
14605
|
if (!frameRef.current) return;
|
|
14500
14606
|
const resizeObserver = new ResizeObserver(() => {
|
|
14501
14607
|
if (!isResizingRef.current) {
|
|
@@ -14507,14 +14613,14 @@ var Canvas = () => {
|
|
|
14507
14613
|
resizeObserver.disconnect();
|
|
14508
14614
|
};
|
|
14509
14615
|
}, [frameRef, resetAutoZoom]);
|
|
14510
|
-
const [showLoader, setShowLoader] = (0,
|
|
14511
|
-
(0,
|
|
14616
|
+
const [showLoader, setShowLoader] = (0, import_react96.useState)(false);
|
|
14617
|
+
(0, import_react96.useEffect)(() => {
|
|
14512
14618
|
setTimeout(() => {
|
|
14513
14619
|
setShowLoader(true);
|
|
14514
14620
|
}, 500);
|
|
14515
14621
|
}, []);
|
|
14516
14622
|
const appStoreApi = useAppStoreApi();
|
|
14517
|
-
(0,
|
|
14623
|
+
(0, import_react96.useEffect)(() => {
|
|
14518
14624
|
if (typeof window === "undefined") return;
|
|
14519
14625
|
if (uiProp?.viewports?.current) return;
|
|
14520
14626
|
const viewportWidth = window.innerWidth;
|
|
@@ -14571,7 +14677,7 @@ var Canvas = () => {
|
|
|
14571
14677
|
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
14572
14678
|
"div",
|
|
14573
14679
|
{
|
|
14574
|
-
className:
|
|
14680
|
+
className: getClassName37({
|
|
14575
14681
|
ready: status === "READY" || !iframe.enabled || !iframe.waitForStyles,
|
|
14576
14682
|
showLoader,
|
|
14577
14683
|
fullScreen: _experimentalFullScreenCanvas
|
|
@@ -14586,11 +14692,11 @@ var Canvas = () => {
|
|
|
14586
14692
|
});
|
|
14587
14693
|
}
|
|
14588
14694
|
},
|
|
14589
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className:
|
|
14695
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: getClassName37("inner"), ref: frameRef, children: [
|
|
14590
14696
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
14591
14697
|
"div",
|
|
14592
14698
|
{
|
|
14593
|
-
className:
|
|
14699
|
+
className: getClassName37("root"),
|
|
14594
14700
|
style: {
|
|
14595
14701
|
width: iframe.enabled ? viewports.current.width : "100%",
|
|
14596
14702
|
height: !zoomConfig.rootHeight || isNaN(zoomConfig.rootHeight) ? "100%" : zoomConfig.rootHeight,
|
|
@@ -14608,7 +14714,7 @@ var Canvas = () => {
|
|
|
14608
14714
|
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(CustomPreview, { children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Preview, {}) })
|
|
14609
14715
|
}
|
|
14610
14716
|
),
|
|
14611
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className:
|
|
14717
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: getClassName37("loader"), children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Loader, { size: 24 }) })
|
|
14612
14718
|
] })
|
|
14613
14719
|
}
|
|
14614
14720
|
);
|
|
@@ -14616,15 +14722,15 @@ var Canvas = () => {
|
|
|
14616
14722
|
|
|
14617
14723
|
// lib/use-sidebar-resize.ts
|
|
14618
14724
|
init_react_import();
|
|
14619
|
-
var
|
|
14725
|
+
var import_react97 = require("react");
|
|
14620
14726
|
init_store2();
|
|
14621
14727
|
function useSidebarResize(position, dispatch) {
|
|
14622
|
-
const [width, setWidth] = (0,
|
|
14623
|
-
const sidebarRef = (0,
|
|
14728
|
+
const [width, setWidth] = (0, import_react97.useState)(null);
|
|
14729
|
+
const sidebarRef = (0, import_react97.useRef)(null);
|
|
14624
14730
|
const storeWidth = useAppStore(
|
|
14625
14731
|
(s) => position === "left" ? s.state.ui.leftSideBarWidth : s.state.ui.rightSideBarWidth
|
|
14626
14732
|
);
|
|
14627
|
-
(0,
|
|
14733
|
+
(0, import_react97.useEffect)(() => {
|
|
14628
14734
|
if (typeof window !== "undefined" && !storeWidth) {
|
|
14629
14735
|
try {
|
|
14630
14736
|
const savedWidths = localStorage.getItem("credbuild-sidebar-widths");
|
|
@@ -14649,12 +14755,12 @@ function useSidebarResize(position, dispatch) {
|
|
|
14649
14755
|
}
|
|
14650
14756
|
}
|
|
14651
14757
|
}, [dispatch, position, storeWidth]);
|
|
14652
|
-
(0,
|
|
14758
|
+
(0, import_react97.useEffect)(() => {
|
|
14653
14759
|
if (storeWidth !== void 0) {
|
|
14654
14760
|
setWidth(storeWidth);
|
|
14655
14761
|
}
|
|
14656
14762
|
}, [storeWidth]);
|
|
14657
|
-
const handleResizeEnd = (0,
|
|
14763
|
+
const handleResizeEnd = (0, import_react97.useCallback)(
|
|
14658
14764
|
(width2) => {
|
|
14659
14765
|
dispatch({
|
|
14660
14766
|
type: "setUi",
|
|
@@ -14702,17 +14808,17 @@ init_react_import();
|
|
|
14702
14808
|
|
|
14703
14809
|
// components/CredBuild/components/ResizeHandle/index.tsx
|
|
14704
14810
|
init_react_import();
|
|
14705
|
-
var
|
|
14811
|
+
var import_react98 = require("react");
|
|
14706
14812
|
init_get_class_name_factory();
|
|
14707
14813
|
|
|
14708
14814
|
// css-module:/home/crediblemark/Project/Credibuild/components/CredBuild/components/ResizeHandle/styles.module.css#css-module
|
|
14709
14815
|
init_react_import();
|
|
14710
|
-
var
|
|
14816
|
+
var styles_module_default30 = { "ResizeHandle": "_ResizeHandle_144bf_2", "ResizeHandle--left": "_ResizeHandle--left_144bf_16", "ResizeHandle--right": "_ResizeHandle--right_144bf_20" };
|
|
14711
14817
|
|
|
14712
14818
|
// components/CredBuild/components/ResizeHandle/index.tsx
|
|
14713
14819
|
init_lib();
|
|
14714
14820
|
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
14715
|
-
var
|
|
14821
|
+
var getClassName38 = get_class_name_factory_default("ResizeHandle", styles_module_default30);
|
|
14716
14822
|
var ResizeHandle = ({
|
|
14717
14823
|
position,
|
|
14718
14824
|
sidebarRef,
|
|
@@ -14721,11 +14827,11 @@ var ResizeHandle = ({
|
|
|
14721
14827
|
}) => {
|
|
14722
14828
|
const { frameRef } = useCanvasFrame();
|
|
14723
14829
|
const resetAutoZoom = useResetAutoZoom(frameRef);
|
|
14724
|
-
const handleRef = (0,
|
|
14725
|
-
const isDragging = (0,
|
|
14726
|
-
const startX = (0,
|
|
14727
|
-
const startWidth = (0,
|
|
14728
|
-
const handleMouseMove = (0,
|
|
14830
|
+
const handleRef = (0, import_react98.useRef)(null);
|
|
14831
|
+
const isDragging = (0, import_react98.useRef)(false);
|
|
14832
|
+
const startX = (0, import_react98.useRef)(0);
|
|
14833
|
+
const startWidth = (0, import_react98.useRef)(0);
|
|
14834
|
+
const handleMouseMove = (0, import_react98.useCallback)(
|
|
14729
14835
|
(e) => {
|
|
14730
14836
|
if (!isDragging.current) return;
|
|
14731
14837
|
const delta = e.clientX - startX.current;
|
|
@@ -14736,7 +14842,7 @@ var ResizeHandle = ({
|
|
|
14736
14842
|
},
|
|
14737
14843
|
[onResize, position]
|
|
14738
14844
|
);
|
|
14739
|
-
const handleMouseUp = (0,
|
|
14845
|
+
const handleMouseUp = (0, import_react98.useCallback)(() => {
|
|
14740
14846
|
if (!isDragging.current) return;
|
|
14741
14847
|
isDragging.current = false;
|
|
14742
14848
|
document.body.style.cursor = "";
|
|
@@ -14751,7 +14857,7 @@ var ResizeHandle = ({
|
|
|
14751
14857
|
onResizeEnd(finalWidth);
|
|
14752
14858
|
resetAutoZoom();
|
|
14753
14859
|
}, [onResizeEnd, handleMouseMove, resetAutoZoom, sidebarRef]);
|
|
14754
|
-
const handleMouseDown = (0,
|
|
14860
|
+
const handleMouseDown = (0, import_react98.useCallback)(
|
|
14755
14861
|
(e) => {
|
|
14756
14862
|
isDragging.current = true;
|
|
14757
14863
|
startX.current = e.clientX;
|
|
@@ -14772,7 +14878,7 @@ var ResizeHandle = ({
|
|
|
14772
14878
|
"div",
|
|
14773
14879
|
{
|
|
14774
14880
|
ref: handleRef,
|
|
14775
|
-
className:
|
|
14881
|
+
className: getClassName38({ [position]: true }),
|
|
14776
14882
|
onMouseDown: handleMouseDown
|
|
14777
14883
|
}
|
|
14778
14884
|
);
|
|
@@ -14783,11 +14889,11 @@ init_get_class_name_factory();
|
|
|
14783
14889
|
|
|
14784
14890
|
// css-module:/home/crediblemark/Project/Credibuild/components/CredBuild/components/Sidebar/styles.module.css#css-module
|
|
14785
14891
|
init_react_import();
|
|
14786
|
-
var
|
|
14892
|
+
var styles_module_default31 = { "Sidebar": "_Sidebar_1kcif_1", "Sidebar--isVisible": "_Sidebar--isVisible_1kcif_13", "Sidebar--left": "_Sidebar--left_1kcif_17", "Sidebar--right": "_Sidebar--right_1kcif_29", "Sidebar-resizeHandle": "_Sidebar-resizeHandle_1kcif_42" };
|
|
14787
14893
|
|
|
14788
14894
|
// components/CredBuild/components/Sidebar/index.tsx
|
|
14789
14895
|
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
14790
|
-
var
|
|
14896
|
+
var getClassName39 = get_class_name_factory_default("Sidebar", styles_module_default31);
|
|
14791
14897
|
var Sidebar = ({
|
|
14792
14898
|
position,
|
|
14793
14899
|
sidebarRef,
|
|
@@ -14801,11 +14907,11 @@ var Sidebar = ({
|
|
|
14801
14907
|
"div",
|
|
14802
14908
|
{
|
|
14803
14909
|
ref: sidebarRef,
|
|
14804
|
-
className:
|
|
14910
|
+
className: getClassName39({ [position]: true, isVisible }),
|
|
14805
14911
|
children
|
|
14806
14912
|
}
|
|
14807
14913
|
),
|
|
14808
|
-
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: `${
|
|
14914
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: `${getClassName39("resizeHandle")}`, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
14809
14915
|
ResizeHandle,
|
|
14810
14916
|
{
|
|
14811
14917
|
position,
|
|
@@ -14819,7 +14925,7 @@ var Sidebar = ({
|
|
|
14819
14925
|
|
|
14820
14926
|
// lib/use-delete-hotkeys.ts
|
|
14821
14927
|
init_react_import();
|
|
14822
|
-
var
|
|
14928
|
+
var import_react99 = require("react");
|
|
14823
14929
|
init_use_hotkey();
|
|
14824
14930
|
init_store2();
|
|
14825
14931
|
var isElementVisible = (element) => {
|
|
@@ -14855,7 +14961,7 @@ var shouldBlockDeleteHotkey = (e) => {
|
|
|
14855
14961
|
};
|
|
14856
14962
|
var useDeleteHotkeys = () => {
|
|
14857
14963
|
const appStore = useAppStoreApi();
|
|
14858
|
-
const deleteSelectedComponent = (0,
|
|
14964
|
+
const deleteSelectedComponent = (0, import_react99.useCallback)(
|
|
14859
14965
|
(e) => {
|
|
14860
14966
|
if (shouldBlockDeleteHotkey(e)) {
|
|
14861
14967
|
return false;
|
|
@@ -14883,13 +14989,13 @@ init_react_import();
|
|
|
14883
14989
|
|
|
14884
14990
|
// css-module:/home/crediblemark/Project/Credibuild/components/CredBuild/components/Nav/styles.module.css#css-module
|
|
14885
14991
|
init_react_import();
|
|
14886
|
-
var
|
|
14992
|
+
var styles_module_default32 = { "Nav": "_Nav_wbh7e_1", "Nav-list": "_Nav-list_wbh7e_9", "CredBuildHeader-path": "_CredBuildHeader-path_wbh7e_20", "NavItem": "_NavItem_wbh7e_38", "NavItem-link": "_NavItem-link_wbh7e_43", "NavItem-linkIcon": "_NavItem-linkIcon_wbh7e_64", "NavItem--active": "_NavItem--active_wbh7e_77", "NavItem--mobileOnly": "_NavItem--mobileOnly_wbh7e_90", "NavItem--desktopOnly": "_NavItem--desktopOnly_wbh7e_95" };
|
|
14887
14993
|
|
|
14888
14994
|
// components/CredBuild/components/Nav/index.tsx
|
|
14889
14995
|
init_lib();
|
|
14890
14996
|
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
14891
|
-
var
|
|
14892
|
-
var getClassNameItem3 = get_class_name_factory_default("NavItem",
|
|
14997
|
+
var getClassName40 = get_class_name_factory_default("Nav", styles_module_default32);
|
|
14998
|
+
var getClassNameItem3 = get_class_name_factory_default("NavItem", styles_module_default32);
|
|
14893
14999
|
var MenuItem = ({
|
|
14894
15000
|
label,
|
|
14895
15001
|
icon,
|
|
@@ -14917,9 +15023,9 @@ var Nav = ({
|
|
|
14917
15023
|
items,
|
|
14918
15024
|
mobileActions
|
|
14919
15025
|
}) => {
|
|
14920
|
-
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("nav", { className:
|
|
14921
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("ul", { className:
|
|
14922
|
-
mobileActions && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className:
|
|
15026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("nav", { className: getClassName40(), children: [
|
|
15027
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("ul", { className: getClassName40("list"), children: Object.entries(items).map(([key, item]) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(MenuItem, { ...item }, key)) }),
|
|
15028
|
+
mobileActions && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: getClassName40("mobileActions"), children: mobileActions })
|
|
14923
15029
|
] });
|
|
14924
15030
|
};
|
|
14925
15031
|
|
|
@@ -14933,16 +15039,16 @@ init_lucide_react();
|
|
|
14933
15039
|
|
|
14934
15040
|
// css-module:/home/crediblemark/Project/Credibuild/plugins/blocks/styles.module.css#css-module
|
|
14935
15041
|
init_react_import();
|
|
14936
|
-
var
|
|
15042
|
+
var styles_module_default33 = { "BlocksPlugin": "_BlocksPlugin_1ey1i_1" };
|
|
14937
15043
|
|
|
14938
15044
|
// plugins/blocks/index.tsx
|
|
14939
15045
|
init_lib();
|
|
14940
15046
|
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
14941
|
-
var
|
|
15047
|
+
var getClassName41 = get_class_name_factory_default("BlocksPlugin", styles_module_default33);
|
|
14942
15048
|
var blocksPlugin = () => ({
|
|
14943
15049
|
name: "blocks",
|
|
14944
15050
|
label: "Blocks",
|
|
14945
|
-
render: () => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className:
|
|
15051
|
+
render: () => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: getClassName41(), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Components, {}) }),
|
|
14946
15052
|
icon: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Shapes, {})
|
|
14947
15053
|
});
|
|
14948
15054
|
|
|
@@ -14952,16 +15058,16 @@ init_lucide_react();
|
|
|
14952
15058
|
|
|
14953
15059
|
// css-module:/home/crediblemark/Project/Credibuild/plugins/outline/styles.module.css#css-module
|
|
14954
15060
|
init_react_import();
|
|
14955
|
-
var
|
|
15061
|
+
var styles_module_default34 = { "OutlinePlugin": "_OutlinePlugin_q92j6_1" };
|
|
14956
15062
|
|
|
14957
15063
|
// plugins/outline/index.tsx
|
|
14958
15064
|
init_lib();
|
|
14959
15065
|
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
14960
|
-
var
|
|
15066
|
+
var getClassName42 = get_class_name_factory_default("OutlinePlugin", styles_module_default34);
|
|
14961
15067
|
var outlinePlugin = () => ({
|
|
14962
15068
|
name: "outline",
|
|
14963
15069
|
label: "Outline",
|
|
14964
|
-
render: () => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className:
|
|
15070
|
+
render: () => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: getClassName42(), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Outline, {}) }),
|
|
14965
15071
|
icon: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(List, {})
|
|
14966
15072
|
});
|
|
14967
15073
|
|
|
@@ -14972,12 +15078,12 @@ init_store2();
|
|
|
14972
15078
|
|
|
14973
15079
|
// css-module:/home/crediblemark/Project/Credibuild/plugins/fields/styles.module.css#css-module
|
|
14974
15080
|
init_react_import();
|
|
14975
|
-
var
|
|
15081
|
+
var styles_module_default35 = { "FieldsPlugin": "_FieldsPlugin_6as57_1", "FieldsPlugin-header": "_FieldsPlugin-header_6as57_7" };
|
|
14976
15082
|
|
|
14977
15083
|
// plugins/fields/index.tsx
|
|
14978
15084
|
init_lib();
|
|
14979
15085
|
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
14980
|
-
var
|
|
15086
|
+
var getClassName43 = get_class_name_factory_default("FieldsPlugin", styles_module_default35);
|
|
14981
15087
|
var CurrentTitle = () => {
|
|
14982
15088
|
const label = useAppStore((s) => {
|
|
14983
15089
|
const selectedItem = s.selectedItem;
|
|
@@ -14988,8 +15094,8 @@ var CurrentTitle = () => {
|
|
|
14988
15094
|
var fieldsPlugin = ({ desktopSideBar = "right" } = {}) => ({
|
|
14989
15095
|
name: "fields",
|
|
14990
15096
|
label: "Fields",
|
|
14991
|
-
render: () => /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className:
|
|
14992
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className:
|
|
15097
|
+
render: () => /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: getClassName43(), children: [
|
|
15098
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: getClassName43("header"), children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Breadcrumbs, { numParents: 2, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(CurrentTitle, {}) }) }),
|
|
14993
15099
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Fields, {})
|
|
14994
15100
|
] }),
|
|
14995
15101
|
icon: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(RectangleEllipsis, {}),
|
|
@@ -14998,9 +15104,9 @@ var fieldsPlugin = ({ desktopSideBar = "right" } = {}) => ({
|
|
|
14998
15104
|
|
|
14999
15105
|
// components/CredBuild/components/Layout/index.tsx
|
|
15000
15106
|
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
15001
|
-
var
|
|
15002
|
-
var getLayoutClassName = get_class_name_factory_default("CredBuildLayout",
|
|
15003
|
-
var getPluginTabClassName = get_class_name_factory_default("CredBuildPluginTab",
|
|
15107
|
+
var getClassName44 = get_class_name_factory_default("CredBuild", styles_module_default23);
|
|
15108
|
+
var getLayoutClassName = get_class_name_factory_default("CredBuildLayout", styles_module_default23);
|
|
15109
|
+
var getPluginTabClassName = get_class_name_factory_default("CredBuildPluginTab", styles_module_default23);
|
|
15004
15110
|
var FieldSideBar = () => {
|
|
15005
15111
|
const title = useAppStore(
|
|
15006
15112
|
(s) => s.selectedItem ? s.config.components[s.selectedItem.type]?.["label"] ?? s.selectedItem.type.toString() : s.config.root?.label || "Page"
|
|
@@ -15022,7 +15128,7 @@ var Layout = ({ children }) => {
|
|
|
15022
15128
|
plugins,
|
|
15023
15129
|
height
|
|
15024
15130
|
} = usePropsContext();
|
|
15025
|
-
const iframe = (0,
|
|
15131
|
+
const iframe = (0, import_react100.useMemo)(
|
|
15026
15132
|
() => ({
|
|
15027
15133
|
enabled: true,
|
|
15028
15134
|
waitForStyles: true,
|
|
@@ -15049,7 +15155,7 @@ var Layout = ({ children }) => {
|
|
|
15049
15155
|
sidebarRef: rightSidebarRef,
|
|
15050
15156
|
handleResizeEnd: handleRightSidebarResizeEnd
|
|
15051
15157
|
} = useSidebarResize("right", dispatch);
|
|
15052
|
-
(0,
|
|
15158
|
+
(0, import_react100.useEffect)(() => {
|
|
15053
15159
|
if (!window.matchMedia("(min-width: 638px)").matches) {
|
|
15054
15160
|
dispatch({
|
|
15055
15161
|
type: "setUi",
|
|
@@ -15076,13 +15182,13 @@ var Layout = ({ children }) => {
|
|
|
15076
15182
|
};
|
|
15077
15183
|
}, [dispatch]);
|
|
15078
15184
|
const overrides = useAppStore((s) => s.overrides);
|
|
15079
|
-
const CustomCredBuild = (0,
|
|
15185
|
+
const CustomCredBuild = (0, import_react100.useMemo)(
|
|
15080
15186
|
() => overrides.credbuild || DefaultOverride,
|
|
15081
15187
|
[overrides]
|
|
15082
15188
|
);
|
|
15083
|
-
const [mounted, setMounted] = (0,
|
|
15084
|
-
const [theme, setTheme] = (0,
|
|
15085
|
-
(0,
|
|
15189
|
+
const [mounted, setMounted] = (0, import_react100.useState)(false);
|
|
15190
|
+
const [theme, setTheme] = (0, import_react100.useState)("dark");
|
|
15191
|
+
(0, import_react100.useEffect)(() => {
|
|
15086
15192
|
setMounted(true);
|
|
15087
15193
|
const savedTheme = localStorage.getItem("credbuild-theme");
|
|
15088
15194
|
if (savedTheme) {
|
|
@@ -15101,7 +15207,7 @@ var Layout = ({ children }) => {
|
|
|
15101
15207
|
}, []);
|
|
15102
15208
|
const ready = useAppStore((s) => s.status === "READY");
|
|
15103
15209
|
useMonitorHotkeys();
|
|
15104
|
-
(0,
|
|
15210
|
+
(0, import_react100.useEffect)(() => {
|
|
15105
15211
|
if (ready && iframe.enabled) {
|
|
15106
15212
|
const frameDoc = getFrame();
|
|
15107
15213
|
if (frameDoc) {
|
|
@@ -15121,12 +15227,12 @@ var Layout = ({ children }) => {
|
|
|
15121
15227
|
const setUi = useAppStore((s) => s.setUi);
|
|
15122
15228
|
const currentPlugin = useAppStore((s) => s.state.ui.plugin?.current);
|
|
15123
15229
|
const appStoreApi = useAppStoreApi();
|
|
15124
|
-
const [mobilePanelHeightMode, setMobilePanelHeightMode] = (0,
|
|
15125
|
-
const hasLegacySideBarPlugin = (0,
|
|
15230
|
+
const [mobilePanelHeightMode, setMobilePanelHeightMode] = (0, import_react100.useState)("toggle");
|
|
15231
|
+
const hasLegacySideBarPlugin = (0, import_react100.useMemo)(
|
|
15126
15232
|
() => !!plugins?.find((p) => p.name === "legacy-side-bar"),
|
|
15127
15233
|
[plugins]
|
|
15128
15234
|
);
|
|
15129
|
-
const pluginItems = (0,
|
|
15235
|
+
const pluginItems = (0, import_react100.useMemo)(() => {
|
|
15130
15236
|
const details = {};
|
|
15131
15237
|
const defaultPlugins = [blocksPlugin(), outlinePlugin()];
|
|
15132
15238
|
const isLegacy = (plugin) => plugin.name === "legacy-side-bar" ? -1 : 0;
|
|
@@ -15171,7 +15277,7 @@ var Layout = ({ children }) => {
|
|
|
15171
15277
|
});
|
|
15172
15278
|
return details;
|
|
15173
15279
|
}, [plugins, currentPlugin, leftSideBarVisible, hasLegacySideBarPlugin, setUi]);
|
|
15174
|
-
(0,
|
|
15280
|
+
(0, import_react100.useEffect)(() => {
|
|
15175
15281
|
if (!currentPlugin) {
|
|
15176
15282
|
const names = Object.keys(pluginItems);
|
|
15177
15283
|
setUi({ plugin: { current: names[0] } });
|
|
@@ -15184,7 +15290,7 @@ var Layout = ({ children }) => {
|
|
|
15184
15290
|
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
15185
15291
|
"div",
|
|
15186
15292
|
{
|
|
15187
|
-
className: `CredBuild ${theme === "dark" ? "dark" : ""} ${
|
|
15293
|
+
className: `CredBuild ${theme === "dark" ? "dark" : ""} ${getClassName44({
|
|
15188
15294
|
hidePlugins: hasLegacySideBarPlugin
|
|
15189
15295
|
})}`,
|
|
15190
15296
|
"data-theme": theme,
|
|
@@ -15269,7 +15375,7 @@ var Layout = ({ children }) => {
|
|
|
15269
15375
|
)
|
|
15270
15376
|
}
|
|
15271
15377
|
) }) }) }),
|
|
15272
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { id: "credbuild-portal-root", className:
|
|
15378
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { id: "credbuild-portal-root", className: getClassName44("portal") })
|
|
15273
15379
|
]
|
|
15274
15380
|
}
|
|
15275
15381
|
);
|
|
@@ -15296,7 +15402,7 @@ function CredBuildProvider({ children }) {
|
|
|
15296
15402
|
_experimentalFullScreenCanvas,
|
|
15297
15403
|
_experimentalVirtualization
|
|
15298
15404
|
} = usePropsContext();
|
|
15299
|
-
const iframe = (0,
|
|
15405
|
+
const iframe = (0, import_react101.useMemo)(
|
|
15300
15406
|
() => ({
|
|
15301
15407
|
enabled: true,
|
|
15302
15408
|
waitForStyles: true,
|
|
@@ -15304,7 +15410,7 @@ function CredBuildProvider({ children }) {
|
|
|
15304
15410
|
}),
|
|
15305
15411
|
[_iframe]
|
|
15306
15412
|
);
|
|
15307
|
-
const [generatedAppState] = (0,
|
|
15413
|
+
const [generatedAppState] = (0, import_react101.useState)(() => {
|
|
15308
15414
|
const initial = { ...defaultAppState.ui, ...initialUi };
|
|
15309
15415
|
let clientUiState = {};
|
|
15310
15416
|
if (Object.keys(initialData?.root || {}).length > 0 && !initialData?.root?.props) {
|
|
@@ -15351,7 +15457,7 @@ function CredBuildProvider({ children }) {
|
|
|
15351
15457
|
return walkAppState(newAppState, config);
|
|
15352
15458
|
});
|
|
15353
15459
|
const { appendData = true } = _initialHistory || {};
|
|
15354
|
-
const [blendedHistories] = (0,
|
|
15460
|
+
const [blendedHistories] = (0, import_react101.useState)(
|
|
15355
15461
|
[
|
|
15356
15462
|
..._initialHistory?.histories || [],
|
|
15357
15463
|
...appendData ? [{ state: generatedAppState }] : []
|
|
@@ -15366,7 +15472,7 @@ function CredBuildProvider({ children }) {
|
|
|
15366
15472
|
};
|
|
15367
15473
|
})
|
|
15368
15474
|
);
|
|
15369
|
-
const initialHistoryIndex = (0,
|
|
15475
|
+
const initialHistoryIndex = (0, import_react101.useMemo)(() => {
|
|
15370
15476
|
if (_initialHistory?.index !== void 0 && _initialHistory?.index >= 0 && _initialHistory?.index < blendedHistories.length) {
|
|
15371
15477
|
return _initialHistory?.index;
|
|
15372
15478
|
}
|
|
@@ -15377,7 +15483,7 @@ function CredBuildProvider({ children }) {
|
|
|
15377
15483
|
overrides,
|
|
15378
15484
|
plugins
|
|
15379
15485
|
});
|
|
15380
|
-
const loadedFieldTransforms = (0,
|
|
15486
|
+
const loadedFieldTransforms = (0, import_react101.useMemo)(() => {
|
|
15381
15487
|
const _plugins = plugins || [];
|
|
15382
15488
|
const pluginFieldTransforms = _plugins.reduce(
|
|
15383
15489
|
(acc, plugin) => ({ ...acc, ...plugin.fieldTransforms }),
|
|
@@ -15389,7 +15495,7 @@ function CredBuildProvider({ children }) {
|
|
|
15389
15495
|
};
|
|
15390
15496
|
}, [fieldTransforms, plugins]);
|
|
15391
15497
|
const instanceId = useSafeId();
|
|
15392
|
-
const generateAppStore = (0,
|
|
15498
|
+
const generateAppStore = (0, import_react101.useCallback)(
|
|
15393
15499
|
(state) => {
|
|
15394
15500
|
return {
|
|
15395
15501
|
instanceId,
|
|
@@ -15420,15 +15526,15 @@ function CredBuildProvider({ children }) {
|
|
|
15420
15526
|
loadedFieldTransforms
|
|
15421
15527
|
]
|
|
15422
15528
|
);
|
|
15423
|
-
const [appStore] = (0,
|
|
15529
|
+
const [appStore] = (0, import_react101.useState)(
|
|
15424
15530
|
() => createAppStore(generateAppStore(initialAppState))
|
|
15425
15531
|
);
|
|
15426
|
-
(0,
|
|
15532
|
+
(0, import_react101.useEffect)(() => {
|
|
15427
15533
|
if (process.env.NODE_ENV !== "production") {
|
|
15428
15534
|
window.__CREDBUILD_INTERNAL_DO_NOT_USE = { appStore };
|
|
15429
15535
|
}
|
|
15430
15536
|
}, [appStore]);
|
|
15431
|
-
(0,
|
|
15537
|
+
(0, import_react101.useEffect)(() => {
|
|
15432
15538
|
const state = appStore.getState().state;
|
|
15433
15539
|
appStore.setState({
|
|
15434
15540
|
...generateAppStore(state)
|
|
@@ -15439,8 +15545,8 @@ function CredBuildProvider({ children }) {
|
|
|
15439
15545
|
index: initialHistoryIndex,
|
|
15440
15546
|
initialAppState
|
|
15441
15547
|
});
|
|
15442
|
-
const previousData = (0,
|
|
15443
|
-
(0,
|
|
15548
|
+
const previousData = (0, import_react101.useRef)(null);
|
|
15549
|
+
(0, import_react101.useEffect)(() => {
|
|
15444
15550
|
return appStore.subscribe(
|
|
15445
15551
|
(s) => s.state.data,
|
|
15446
15552
|
(data) => {
|
|
@@ -15454,7 +15560,7 @@ function CredBuildProvider({ children }) {
|
|
|
15454
15560
|
}, [onChange, appStore]);
|
|
15455
15561
|
useRegisterPermissionsSlice(appStore, permissions);
|
|
15456
15562
|
const uCredBuildStore = useRegisterUseCredBuildStore(appStore);
|
|
15457
|
-
(0,
|
|
15563
|
+
(0, import_react101.useEffect)(() => {
|
|
15458
15564
|
const { resolveAndCommitData } = appStore.getState();
|
|
15459
15565
|
setTimeout(() => {
|
|
15460
15566
|
resolveAndCommitData();
|
|
@@ -15799,6 +15905,7 @@ lucide-react/dist/esm/icons/heading-5.js:
|
|
|
15799
15905
|
lucide-react/dist/esm/icons/heading-6.js:
|
|
15800
15906
|
lucide-react/dist/esm/icons/heading.js:
|
|
15801
15907
|
lucide-react/dist/esm/icons/image.js:
|
|
15908
|
+
lucide-react/dist/esm/icons/inbox.js:
|
|
15802
15909
|
lucide-react/dist/esm/icons/info.js:
|
|
15803
15910
|
lucide-react/dist/esm/icons/italic.js:
|
|
15804
15911
|
lucide-react/dist/esm/icons/layers.js:
|