@crediblemark/build 0.22.7 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ArrayField-EPM4TV3J.mjs → ArrayField-MR3B7WKR.mjs} +9 -9
- package/dist/{Editor-L674TD7T.mjs → Editor-5TR52PVR.mjs} +7 -7
- package/dist/{ObjectField-MW3SSNKI.mjs → ObjectField-ZGTFFKHJ.mjs} +8 -8
- package/dist/{chunk-K27LFPQL.mjs → chunk-62JTNLF7.mjs} +1 -1
- package/dist/{chunk-JNMMY5D7.mjs → chunk-6TAU2PST.mjs} +1 -1
- package/dist/{chunk-NYBWAKLT.mjs → chunk-7HQNPCGI.mjs} +1 -1
- package/dist/{chunk-2JUMF5G3.mjs → chunk-ACKK2BYK.mjs} +6 -6
- package/dist/{chunk-T6RT6PV4.mjs → chunk-AP7SVXSU.mjs} +7 -7
- package/dist/{chunk-ZY24NW7X.mjs → chunk-E7XYUXJM.mjs} +76 -46
- package/dist/{chunk-JNHQNNGW.mjs → chunk-EDVDS4CH.mjs} +143 -57
- package/dist/{chunk-AEKBE267.mjs → chunk-FC3ZRBT2.mjs} +2 -2
- package/dist/{chunk-RDTXKOE7.mjs → chunk-P6XSBCUA.mjs} +1 -1
- package/dist/{chunk-67TMLSKM.mjs → chunk-QA2U7BOE.mjs} +1 -1
- package/dist/{chunk-4PJ4QMWI.mjs → chunk-RUAHVDDE.mjs} +1 -1
- package/dist/{full-SGY5HNVB.mjs → full-AGQP4VE6.mjs} +5 -5
- package/dist/index.js +233 -103
- package/dist/index.mjs +10 -10
- package/dist/{loaded-2GLOBOVP.mjs → loaded-IATND5Y2.mjs} +2 -2
- package/dist/{loaded-ARSKBJWP.mjs → loaded-PWOXIOQ2.mjs} +2 -2
- package/dist/{loaded-AH3CPHD2.mjs → loaded-QZ5Z7NDX.mjs} +2 -2
- package/dist/no-external.js +233 -103
- package/dist/no-external.mjs +10 -10
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LoadedRichTextMenu
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FC3ZRBT2.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DragIcon,
|
|
6
6
|
collisionStore,
|
|
7
7
|
createDynamicCollisionDetector,
|
|
8
8
|
setDeep,
|
|
9
9
|
useSensors
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-62JTNLF7.mjs";
|
|
11
11
|
import {
|
|
12
12
|
AutoFieldPrivate,
|
|
13
13
|
Button,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
fieldContextStore,
|
|
17
17
|
useContextStore,
|
|
18
18
|
useSafeId
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ACKK2BYK.mjs";
|
|
20
20
|
import {
|
|
21
21
|
RichTextRenderFallback,
|
|
22
22
|
SlotRender,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
ActionBar,
|
|
31
31
|
IconButton,
|
|
32
32
|
Loader
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-AP7SVXSU.mjs";
|
|
34
34
|
import {
|
|
35
35
|
Box,
|
|
36
36
|
ChartColumn,
|
|
@@ -55,6 +55,7 @@ import {
|
|
|
55
55
|
Megaphone,
|
|
56
56
|
Minimize2,
|
|
57
57
|
Monitor,
|
|
58
|
+
Moon,
|
|
58
59
|
PanelLeft,
|
|
59
60
|
PanelRight,
|
|
60
61
|
Quote,
|
|
@@ -63,6 +64,7 @@ import {
|
|
|
63
64
|
Settings,
|
|
64
65
|
Shapes,
|
|
65
66
|
Smartphone,
|
|
67
|
+
Sun,
|
|
66
68
|
Tablet,
|
|
67
69
|
ToyBrick,
|
|
68
70
|
Trash,
|
|
@@ -83,7 +85,7 @@ import {
|
|
|
83
85
|
useRegisterHistorySlice,
|
|
84
86
|
useRegisterPermissionsSlice,
|
|
85
87
|
useResetAutoZoom
|
|
86
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-E7XYUXJM.mjs";
|
|
87
89
|
import {
|
|
88
90
|
getItem,
|
|
89
91
|
insert,
|
|
@@ -1516,7 +1518,7 @@ import {
|
|
|
1516
1518
|
} from "react";
|
|
1517
1519
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1518
1520
|
var Editor = lazy(
|
|
1519
|
-
() => import("./Editor-
|
|
1521
|
+
() => import("./Editor-5TR52PVR.mjs").then((m) => ({
|
|
1520
1522
|
default: m.Editor
|
|
1521
1523
|
}))
|
|
1522
1524
|
);
|
|
@@ -2559,7 +2561,8 @@ import { useEffect as useEffect12, useState as useState8 } from "react";
|
|
|
2559
2561
|
var styles_module_default5 = { "ComponentList": "_ComponentList_1jl8i_1", "ComponentList--isExpanded": "_ComponentList--isExpanded_1jl8i_5", "ComponentList-content": "_ComponentList-content_1jl8i_9", "ComponentList-title": "_ComponentList-title_1jl8i_17", "ComponentList-titleIcon": "_ComponentList-titleIcon_1jl8i_53" };
|
|
2560
2562
|
|
|
2561
2563
|
// components/ComponentList/index.tsx
|
|
2562
|
-
import { useEffect as useEffect11 } from "react";
|
|
2564
|
+
import { useEffect as useEffect11, useRef as useRef9 } from "react";
|
|
2565
|
+
import { useVirtualizer as useVirtualizer2 } from "@tanstack/react-virtual";
|
|
2563
2566
|
import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2564
2567
|
var getClassName5 = get_class_name_factory_default("ComponentList", styles_module_default5);
|
|
2565
2568
|
var ComponentListItem = ({
|
|
@@ -2589,7 +2592,16 @@ var ComponentList = ({
|
|
|
2589
2592
|
const config = useAppStore((s) => s.config);
|
|
2590
2593
|
const setUi = useAppStore((s) => s.setUi);
|
|
2591
2594
|
const componentList = useAppStore((s) => s.state.ui.componentList);
|
|
2595
|
+
const parentRef = useRef9(null);
|
|
2592
2596
|
const { expanded = true } = componentList[id] || {};
|
|
2597
|
+
const components = Object.keys(config.components);
|
|
2598
|
+
const virtualizer = useVirtualizer2({
|
|
2599
|
+
count: components.length,
|
|
2600
|
+
getScrollElement: () => parentRef.current,
|
|
2601
|
+
estimateSize: () => 40,
|
|
2602
|
+
// Estimated height of each item
|
|
2603
|
+
overscan: 5
|
|
2604
|
+
});
|
|
2593
2605
|
return /* @__PURE__ */ jsxs4("div", { className: getClassName5({ isExpanded: expanded }), children: [
|
|
2594
2606
|
title && /* @__PURE__ */ jsxs4(
|
|
2595
2607
|
"button",
|
|
@@ -2605,7 +2617,6 @@ var ComponentList = ({
|
|
|
2605
2617
|
}
|
|
2606
2618
|
}
|
|
2607
2619
|
}),
|
|
2608
|
-
title: expanded ? `Collapse${title ? ` ${title}` : ""}` : `Expand${title ? ` ${title}` : ""}`,
|
|
2609
2620
|
children: [
|
|
2610
2621
|
/* @__PURE__ */ jsxs4("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
2611
2622
|
id.toLowerCase().includes("hero") && /* @__PURE__ */ jsx12(LayoutTemplate, { size: 12, strokeWidth: 2.5 }),
|
|
@@ -2620,16 +2631,52 @@ var ComponentList = ({
|
|
|
2620
2631
|
]
|
|
2621
2632
|
}
|
|
2622
2633
|
),
|
|
2623
|
-
/* @__PURE__ */ jsx12(
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2634
|
+
/* @__PURE__ */ jsx12(
|
|
2635
|
+
"div",
|
|
2636
|
+
{
|
|
2637
|
+
ref: parentRef,
|
|
2638
|
+
className: getClassName5("content"),
|
|
2639
|
+
style: {
|
|
2640
|
+
maxHeight: expanded ? "500px" : "0px",
|
|
2641
|
+
overflowY: "auto",
|
|
2642
|
+
transition: "max-height 0.3s ease-in-out"
|
|
2629
2643
|
},
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2644
|
+
children: /* @__PURE__ */ jsx12(
|
|
2645
|
+
"div",
|
|
2646
|
+
{
|
|
2647
|
+
style: {
|
|
2648
|
+
height: `${virtualizer.getTotalSize()}px`,
|
|
2649
|
+
width: "100%",
|
|
2650
|
+
position: "relative"
|
|
2651
|
+
},
|
|
2652
|
+
children: /* @__PURE__ */ jsx12(Drawer, { children: children || virtualizer.getVirtualItems().map((virtualItem) => {
|
|
2653
|
+
const componentKey = components[virtualItem.index];
|
|
2654
|
+
return /* @__PURE__ */ jsx12(
|
|
2655
|
+
"div",
|
|
2656
|
+
{
|
|
2657
|
+
style: {
|
|
2658
|
+
position: "absolute",
|
|
2659
|
+
top: 0,
|
|
2660
|
+
left: 0,
|
|
2661
|
+
width: "100%",
|
|
2662
|
+
height: `${virtualItem.size}px`,
|
|
2663
|
+
transform: `translateY(${virtualItem.start}px)`
|
|
2664
|
+
},
|
|
2665
|
+
children: /* @__PURE__ */ jsx12(
|
|
2666
|
+
ComponentListItem,
|
|
2667
|
+
{
|
|
2668
|
+
label: config.components[componentKey]["label"] ?? componentKey,
|
|
2669
|
+
name: componentKey
|
|
2670
|
+
}
|
|
2671
|
+
)
|
|
2672
|
+
},
|
|
2673
|
+
virtualItem.key
|
|
2674
|
+
);
|
|
2675
|
+
}) })
|
|
2676
|
+
}
|
|
2677
|
+
)
|
|
2678
|
+
}
|
|
2679
|
+
)
|
|
2633
2680
|
] });
|
|
2634
2681
|
};
|
|
2635
2682
|
ComponentList.Item = ComponentListItem;
|
|
@@ -2748,9 +2795,9 @@ import {
|
|
|
2748
2795
|
forwardRef as forwardRef2,
|
|
2749
2796
|
useCallback as useCallback11,
|
|
2750
2797
|
useContext as useContext7,
|
|
2751
|
-
useRef as
|
|
2798
|
+
useRef as useRef10
|
|
2752
2799
|
} from "react";
|
|
2753
|
-
import { useVirtualizer as
|
|
2800
|
+
import { useVirtualizer as useVirtualizer3 } from "@tanstack/react-virtual";
|
|
2754
2801
|
import { Fragment as Fragment5, jsx as jsx16, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2755
2802
|
var getClassName7 = get_class_name_factory_default("LayerTree", styles_module_default7);
|
|
2756
2803
|
var getClassNameLayer = get_class_name_factory_default("Layer", styles_module_default7);
|
|
@@ -3019,8 +3066,8 @@ var VirtualizedLayerTreeItems = ({
|
|
|
3019
3066
|
selectedPathIds,
|
|
3020
3067
|
tree
|
|
3021
3068
|
}) => {
|
|
3022
|
-
const listRef =
|
|
3023
|
-
const virtualizer =
|
|
3069
|
+
const listRef = useRef10(null);
|
|
3070
|
+
const virtualizer = useVirtualizer3({
|
|
3024
3071
|
count: tree.items.length,
|
|
3025
3072
|
estimateSize: (index) => getEstimatedRowHeight(tree.items[index].itemId),
|
|
3026
3073
|
getItemKey: (index) => tree.items[index].itemId,
|
|
@@ -3423,12 +3470,12 @@ import {
|
|
|
3423
3470
|
useCallback as useCallback22,
|
|
3424
3471
|
useEffect as useEffect23,
|
|
3425
3472
|
useMemo as useMemo21,
|
|
3426
|
-
useRef as
|
|
3473
|
+
useRef as useRef18,
|
|
3427
3474
|
useState as useState17
|
|
3428
3475
|
} from "react";
|
|
3429
3476
|
|
|
3430
3477
|
// components/CredBuild/components/Preview/index.tsx
|
|
3431
|
-
import { useCallback as useCallback14, useEffect as useEffect15, useRef as
|
|
3478
|
+
import { useCallback as useCallback14, useEffect as useEffect15, useRef as useRef12, useMemo as useMemo13 } from "react";
|
|
3432
3479
|
|
|
3433
3480
|
// components/AutoFrame/index.tsx
|
|
3434
3481
|
import {
|
|
@@ -3436,7 +3483,7 @@ import {
|
|
|
3436
3483
|
useCallback as useCallback13,
|
|
3437
3484
|
useContext as useContext9,
|
|
3438
3485
|
useEffect as useEffect14,
|
|
3439
|
-
useRef as
|
|
3486
|
+
useRef as useRef11,
|
|
3440
3487
|
useState as useState9
|
|
3441
3488
|
} from "react";
|
|
3442
3489
|
import hash from "object-hash";
|
|
@@ -3678,8 +3725,8 @@ function AutoFrame({
|
|
|
3678
3725
|
const handleStylesLoaded = useCallback13(() => {
|
|
3679
3726
|
setStylesLoaded(true);
|
|
3680
3727
|
}, []);
|
|
3681
|
-
const onReadyRef =
|
|
3682
|
-
const onNotReadyRef =
|
|
3728
|
+
const onReadyRef = useRef11(onReady);
|
|
3729
|
+
const onNotReadyRef = useRef11(onNotReady);
|
|
3683
3730
|
useEffect14(() => {
|
|
3684
3731
|
onReadyRef.current = onReady;
|
|
3685
3732
|
onNotReadyRef.current = onNotReady;
|
|
@@ -3825,7 +3872,7 @@ var Preview = ({ id = "credbuild-preview" }) => {
|
|
|
3825
3872
|
);
|
|
3826
3873
|
const Frame = useMemo13(() => overrides.iframe, [overrides]);
|
|
3827
3874
|
const rootProps = root.props || root;
|
|
3828
|
-
const ref =
|
|
3875
|
+
const ref = useRef12(null);
|
|
3829
3876
|
useBubbleIframeEvents(ref);
|
|
3830
3877
|
const inner = !renderData ? /* @__PURE__ */ jsx23(
|
|
3831
3878
|
Page,
|
|
@@ -4013,7 +4060,7 @@ import {
|
|
|
4013
4060
|
useCallback as useCallback16,
|
|
4014
4061
|
useEffect as useEffect17,
|
|
4015
4062
|
useMemo as useMemo15,
|
|
4016
|
-
useRef as
|
|
4063
|
+
useRef as useRef13,
|
|
4017
4064
|
useState as useState11
|
|
4018
4065
|
} from "react";
|
|
4019
4066
|
import { AutoScroller, defaultPreset } from "@dnd-kit/dom";
|
|
@@ -4347,7 +4394,7 @@ import { jsx as jsx26 } from "react/jsx-runtime";
|
|
|
4347
4394
|
var DEBUG2 = false;
|
|
4348
4395
|
var AREA_CHANGE_DEBOUNCE_MS = 100;
|
|
4349
4396
|
var useTempDisableFallback = (timeout2) => {
|
|
4350
|
-
const lastFallbackDisable =
|
|
4397
|
+
const lastFallbackDisable = useRef13(null);
|
|
4351
4398
|
return useCallback16((manager) => {
|
|
4352
4399
|
collisionStore.setState({ fallbackEnabled: false });
|
|
4353
4400
|
const fallbackId = generateId();
|
|
@@ -4367,7 +4414,7 @@ var DragDropContextClient = ({
|
|
|
4367
4414
|
const dispatch = useAppStore((s) => s.dispatch);
|
|
4368
4415
|
const instanceId = useAppStore((s) => s.instanceId);
|
|
4369
4416
|
const appStore = useAppStoreApi();
|
|
4370
|
-
const debouncedParamsRef =
|
|
4417
|
+
const debouncedParamsRef = useRef13(null);
|
|
4371
4418
|
const tempDisableFallback = useTempDisableFallback(100);
|
|
4372
4419
|
const [zoneStore] = useState11(() => {
|
|
4373
4420
|
const rootVirtualizers = /* @__PURE__ */ new Map();
|
|
@@ -4513,8 +4560,8 @@ var DragDropContextClient = ({
|
|
|
4513
4560
|
]);
|
|
4514
4561
|
const sensors = useSensors();
|
|
4515
4562
|
const [dragListeners, setDragListeners] = useState11({});
|
|
4516
|
-
const dragMode =
|
|
4517
|
-
const initialSelector =
|
|
4563
|
+
const dragMode = useRef13(null);
|
|
4564
|
+
const initialSelector = useRef13(void 0);
|
|
4518
4565
|
const nextContextValue = useMemo15(
|
|
4519
4566
|
() => ({
|
|
4520
4567
|
mode: "edit",
|
|
@@ -5005,7 +5052,7 @@ import { useShallow as useShallow6 } from "zustand/react/shallow";
|
|
|
5005
5052
|
import {
|
|
5006
5053
|
createContext as createContext7,
|
|
5007
5054
|
useContext as useContext12,
|
|
5008
|
-
useRef as
|
|
5055
|
+
useRef as useRef14,
|
|
5009
5056
|
useMemo as useMemo17
|
|
5010
5057
|
} from "react";
|
|
5011
5058
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
@@ -5013,7 +5060,7 @@ var FrameContext = createContext7(null);
|
|
|
5013
5060
|
var FrameProvider = ({
|
|
5014
5061
|
children
|
|
5015
5062
|
}) => {
|
|
5016
|
-
const frameRef =
|
|
5063
|
+
const frameRef = useRef14(null);
|
|
5017
5064
|
const value = useMemo17(
|
|
5018
5065
|
() => ({
|
|
5019
5066
|
frameRef
|
|
@@ -5037,7 +5084,8 @@ var styles_module_default16 = { "CredBuildHeader": "_CredBuildHeader_qzv5u_1", "
|
|
|
5037
5084
|
import { Fragment as Fragment11, jsx as jsx30, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
5038
5085
|
var getClassName15 = get_class_name_factory_default("CredBuildHeader", styles_module_default16);
|
|
5039
5086
|
var HeaderInner = ({
|
|
5040
|
-
hidePlugins
|
|
5087
|
+
hidePlugins,
|
|
5088
|
+
theme
|
|
5041
5089
|
}) => {
|
|
5042
5090
|
const {
|
|
5043
5091
|
onPublish,
|
|
@@ -5163,16 +5211,39 @@ var HeaderInner = ({
|
|
|
5163
5211
|
}),
|
|
5164
5212
|
children: /* @__PURE__ */ jsxs11("div", { className: getClassName15("inner"), children: [
|
|
5165
5213
|
/* @__PURE__ */ jsxs11("div", { className: getClassName15("leftActions"), children: [
|
|
5166
|
-
/* @__PURE__ */
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5214
|
+
/* @__PURE__ */ jsxs11("div", { style: { marginRight: "8px", display: "flex", gap: "8px", alignItems: "center" }, children: [
|
|
5215
|
+
/* @__PURE__ */ jsx30(
|
|
5216
|
+
Button,
|
|
5217
|
+
{
|
|
5218
|
+
href: "/dashboard",
|
|
5219
|
+
variant: "secondary",
|
|
5220
|
+
size: "medium",
|
|
5221
|
+
icon: /* @__PURE__ */ jsx30(LayoutDashboard, { size: 14 }),
|
|
5222
|
+
children: "Dashboard"
|
|
5223
|
+
}
|
|
5224
|
+
),
|
|
5225
|
+
/* @__PURE__ */ jsx30(
|
|
5226
|
+
IconButton,
|
|
5227
|
+
{
|
|
5228
|
+
type: "button",
|
|
5229
|
+
onClick: () => {
|
|
5230
|
+
const editorEl = document.querySelector(".CredBuild");
|
|
5231
|
+
if (!editorEl) return;
|
|
5232
|
+
const isDark = editorEl.classList.contains("dark");
|
|
5233
|
+
const newTheme = isDark ? "light" : "dark";
|
|
5234
|
+
if (isDark) {
|
|
5235
|
+
editorEl.classList.remove("dark");
|
|
5236
|
+
} else {
|
|
5237
|
+
editorEl.classList.add("dark");
|
|
5238
|
+
}
|
|
5239
|
+
localStorage.setItem("credbuild-theme", newTheme);
|
|
5240
|
+
window.dispatchEvent(new CustomEvent("credbuild-theme-change", { detail: newTheme }));
|
|
5241
|
+
},
|
|
5242
|
+
title: "Toggle Theme",
|
|
5243
|
+
children: theme === "dark" ? /* @__PURE__ */ jsx30(Sun, { size: 16 }) : /* @__PURE__ */ jsx30(Moon, { size: 16 })
|
|
5244
|
+
}
|
|
5245
|
+
)
|
|
5246
|
+
] }),
|
|
5176
5247
|
/* @__PURE__ */ jsxs11("div", { className: getClassName15("toggle"), children: [
|
|
5177
5248
|
/* @__PURE__ */ jsx30("div", { className: getClassName15("leftSideBarToggle"), children: /* @__PURE__ */ jsx30(
|
|
5178
5249
|
IconButton,
|
|
@@ -5310,7 +5381,7 @@ import {
|
|
|
5310
5381
|
useCallback as useCallback18,
|
|
5311
5382
|
useEffect as useEffect19,
|
|
5312
5383
|
useMemo as useMemo19,
|
|
5313
|
-
useRef as
|
|
5384
|
+
useRef as useRef15,
|
|
5314
5385
|
useState as useState14
|
|
5315
5386
|
} from "react";
|
|
5316
5387
|
|
|
@@ -5364,7 +5435,7 @@ var Canvas = () => {
|
|
|
5364
5435
|
}))
|
|
5365
5436
|
);
|
|
5366
5437
|
const [showTransition, setShowTransition] = useState14(false);
|
|
5367
|
-
const isResizingRef =
|
|
5438
|
+
const isResizingRef = useRef15(false);
|
|
5368
5439
|
const defaultRender = useMemo19(() => {
|
|
5369
5440
|
const CredBuildDefault = ({ children }) => /* @__PURE__ */ jsx32(Fragment12, { children });
|
|
5370
5441
|
return CredBuildDefault;
|
|
@@ -5533,10 +5604,10 @@ var Canvas = () => {
|
|
|
5533
5604
|
};
|
|
5534
5605
|
|
|
5535
5606
|
// lib/use-sidebar-resize.ts
|
|
5536
|
-
import { useCallback as useCallback19, useEffect as useEffect20, useRef as
|
|
5607
|
+
import { useCallback as useCallback19, useEffect as useEffect20, useRef as useRef16, useState as useState15 } from "react";
|
|
5537
5608
|
function useSidebarResize(position, dispatch) {
|
|
5538
5609
|
const [width, setWidth] = useState15(null);
|
|
5539
|
-
const sidebarRef =
|
|
5610
|
+
const sidebarRef = useRef16(null);
|
|
5540
5611
|
const storeWidth = useAppStore(
|
|
5541
5612
|
(s) => position === "left" ? s.state.ui.leftSideBarWidth : s.state.ui.rightSideBarWidth
|
|
5542
5613
|
);
|
|
@@ -5614,7 +5685,7 @@ function useSidebarResize(position, dispatch) {
|
|
|
5614
5685
|
}
|
|
5615
5686
|
|
|
5616
5687
|
// components/CredBuild/components/ResizeHandle/index.tsx
|
|
5617
|
-
import { useCallback as useCallback20, useRef as
|
|
5688
|
+
import { useCallback as useCallback20, useRef as useRef17 } from "react";
|
|
5618
5689
|
|
|
5619
5690
|
// css-module:/home/crediblemark/Project/Credibuild/components/CredBuild/components/ResizeHandle/styles.module.css#css-module
|
|
5620
5691
|
var styles_module_default19 = { "ResizeHandle": "_ResizeHandle_144bf_2", "ResizeHandle--left": "_ResizeHandle--left_144bf_16", "ResizeHandle--right": "_ResizeHandle--right_144bf_20" };
|
|
@@ -5630,10 +5701,10 @@ var ResizeHandle = ({
|
|
|
5630
5701
|
}) => {
|
|
5631
5702
|
const { frameRef } = useCanvasFrame();
|
|
5632
5703
|
const resetAutoZoom = useResetAutoZoom(frameRef);
|
|
5633
|
-
const handleRef =
|
|
5634
|
-
const isDragging =
|
|
5635
|
-
const startX =
|
|
5636
|
-
const startWidth =
|
|
5704
|
+
const handleRef = useRef17(null);
|
|
5705
|
+
const isDragging = useRef17(false);
|
|
5706
|
+
const startX = useRef17(0);
|
|
5707
|
+
const startWidth = useRef17(0);
|
|
5637
5708
|
const handleMouseMove = useCallback20(
|
|
5638
5709
|
(e) => {
|
|
5639
5710
|
if (!isDragging.current) return;
|
|
@@ -5905,8 +5976,23 @@ var Layout = ({ children }) => {
|
|
|
5905
5976
|
[overrides]
|
|
5906
5977
|
);
|
|
5907
5978
|
const [mounted, setMounted] = useState16(false);
|
|
5979
|
+
const [theme, setTheme] = useState16("dark");
|
|
5908
5980
|
useEffect22(() => {
|
|
5909
5981
|
setMounted(true);
|
|
5982
|
+
const savedTheme = localStorage.getItem("credbuild-theme");
|
|
5983
|
+
if (savedTheme) {
|
|
5984
|
+
setTheme(savedTheme);
|
|
5985
|
+
}
|
|
5986
|
+
const handleThemeToggle = (e) => {
|
|
5987
|
+
const newTheme = e.detail || localStorage.getItem("credbuild-theme");
|
|
5988
|
+
if (newTheme) setTheme(newTheme);
|
|
5989
|
+
};
|
|
5990
|
+
window.addEventListener("credbuild-theme-change", handleThemeToggle);
|
|
5991
|
+
window.addEventListener("storage", handleThemeToggle);
|
|
5992
|
+
return () => {
|
|
5993
|
+
window.removeEventListener("credbuild-theme-change", handleThemeToggle);
|
|
5994
|
+
window.removeEventListener("storage", handleThemeToggle);
|
|
5995
|
+
};
|
|
5910
5996
|
}, []);
|
|
5911
5997
|
const ready = useAppStore((s) => s.status === "READY");
|
|
5912
5998
|
useMonitorHotkeys();
|
|
@@ -5993,7 +6079,7 @@ var Layout = ({ children }) => {
|
|
|
5993
6079
|
return /* @__PURE__ */ jsxs16(
|
|
5994
6080
|
"div",
|
|
5995
6081
|
{
|
|
5996
|
-
className: `CredBuild ${getClassName21({
|
|
6082
|
+
className: `CredBuild ${theme === "dark" ? "dark" : ""} ${getClassName21({
|
|
5997
6083
|
hidePlugins: hasLegacySideBarPlugin
|
|
5998
6084
|
})}`,
|
|
5999
6085
|
id: instanceId,
|
|
@@ -6017,7 +6103,7 @@ var Layout = ({ children }) => {
|
|
|
6017
6103
|
className: getLayoutClassName("inner"),
|
|
6018
6104
|
style: layoutOptions,
|
|
6019
6105
|
children: [
|
|
6020
|
-
/* @__PURE__ */ jsx36("div", { className: getLayoutClassName("header"), children: /* @__PURE__ */ jsx36(Header, { hidePlugins: hasLegacySideBarPlugin }) }),
|
|
6106
|
+
/* @__PURE__ */ jsx36("div", { className: getLayoutClassName("header"), children: /* @__PURE__ */ jsx36(Header, { theme, hidePlugins: hasLegacySideBarPlugin }) }),
|
|
6021
6107
|
/* @__PURE__ */ jsxs16(
|
|
6022
6108
|
Sidebar,
|
|
6023
6109
|
{
|
|
@@ -6246,7 +6332,7 @@ function CredBuildProvider({ children }) {
|
|
|
6246
6332
|
index: initialHistoryIndex,
|
|
6247
6333
|
initialAppState
|
|
6248
6334
|
});
|
|
6249
|
-
const previousData =
|
|
6335
|
+
const previousData = useRef18(null);
|
|
6250
6336
|
useEffect23(() => {
|
|
6251
6337
|
return appStore.subscribe(
|
|
6252
6338
|
(s) => s.state.data,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LoadedRichTextMenuInner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AP7SVXSU.mjs";
|
|
4
4
|
|
|
5
5
|
// components/RichTextMenu/index.tsx
|
|
6
6
|
import { lazy, Suspense } from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
var LoadedRichTextMenuFull = lazy(
|
|
9
|
-
() => import("./full-
|
|
9
|
+
() => import("./full-AGQP4VE6.mjs").then((m) => ({
|
|
10
10
|
default: m.LoadedRichTextMenuFull
|
|
11
11
|
}))
|
|
12
12
|
);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LoadedRichTextMenuInner
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-AP7SVXSU.mjs";
|
|
4
|
+
import "./chunk-7HQNPCGI.mjs";
|
|
5
|
+
import "./chunk-QA2U7BOE.mjs";
|
|
6
|
+
import "./chunk-6TAU2PST.mjs";
|
|
7
|
+
import "./chunk-E7XYUXJM.mjs";
|
|
8
8
|
import "./chunk-64A37UUC.mjs";
|
|
9
9
|
import "./chunk-SMAWAXVX.mjs";
|
|
10
10
|
import "./chunk-BFHV72KK.mjs";
|