@blockbite/ui 2.0.11 → 2.0.12
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/ChapterDivider.d.ts +2 -1
- package/dist/index.js +45 -43
- package/dist/index.js.map +1 -1
- package/dist/ui.css +1 -1
- package/package.json +2 -2
package/dist/ChapterDivider.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ type ChapterDividerProps = {
|
|
|
4
4
|
title?: string;
|
|
5
5
|
className?: string;
|
|
6
6
|
help?: string;
|
|
7
|
+
badge?: string;
|
|
7
8
|
};
|
|
8
|
-
export declare const ChapterDivider: ({ id, title, className, help, }: ChapterDividerProps) => React.JSX.Element;
|
|
9
|
+
export declare const ChapterDivider: ({ id, title, className, help, badge, }: ChapterDividerProps) => React.JSX.Element;
|
|
9
10
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -2250,7 +2250,7 @@ const z = /* @__PURE__ */ Hn(ra), Q = ({
|
|
|
2250
2250
|
);
|
|
2251
2251
|
}
|
|
2252
2252
|
);
|
|
2253
|
-
function
|
|
2253
|
+
function ka({
|
|
2254
2254
|
defaultValue: o,
|
|
2255
2255
|
options: a,
|
|
2256
2256
|
swatch: l,
|
|
@@ -2335,7 +2335,7 @@ function Ra({
|
|
|
2335
2335
|
}
|
|
2336
2336
|
);
|
|
2337
2337
|
}
|
|
2338
|
-
const
|
|
2338
|
+
const aa = ({ children: o, className: a, onClick: l }) => /* @__PURE__ */ n.jsx(
|
|
2339
2339
|
"div",
|
|
2340
2340
|
{
|
|
2341
2341
|
onClick: l,
|
|
@@ -2461,10 +2461,12 @@ const ka = ({ children: o, className: a, onClick: l }) => /* @__PURE__ */ n.jsx(
|
|
|
2461
2461
|
id: o = "",
|
|
2462
2462
|
title: a,
|
|
2463
2463
|
className: l,
|
|
2464
|
-
help: u
|
|
2464
|
+
help: u,
|
|
2465
|
+
badge: d
|
|
2465
2466
|
}) => /* @__PURE__ */ n.jsxs("div", { ...o ? { id: o } : null, className: z("mb-4", l), children: [
|
|
2466
|
-
/* @__PURE__ */ n.jsxs("div", { className: "flex w-full flex-wrap items-center gap-2", children: [
|
|
2467
|
+
/* @__PURE__ */ n.jsxs("div", { className: "flex w-full flex-wrap items-center gap-2 justify-between", children: [
|
|
2467
2468
|
/* @__PURE__ */ n.jsx("small", { className: "shrink-1 text-[12px]", children: a }),
|
|
2469
|
+
!!d && /* @__PURE__ */ n.jsx(aa, { className: "text-[.65rem] py-px px-1", children: d }),
|
|
2468
2470
|
/* @__PURE__ */ n.jsx("span", { className: "h-[1px] w-full bg-easy" })
|
|
2469
2471
|
] }),
|
|
2470
2472
|
u && /* @__PURE__ */ n.jsx("small", { className: "w-full shrink-0 text-[12px]", children: u })
|
|
@@ -2497,7 +2499,7 @@ const ka = ({ children: o, className: a, onClick: l }) => /* @__PURE__ */ n.jsx(
|
|
|
2497
2499
|
clearTimeout(v);
|
|
2498
2500
|
};
|
|
2499
2501
|
}, [l, o]), u && /* @__PURE__ */ n.jsx(n.Fragment, { children: a });
|
|
2500
|
-
},
|
|
2502
|
+
}, oa = ({
|
|
2501
2503
|
label: o,
|
|
2502
2504
|
className: a,
|
|
2503
2505
|
defaultValue: l,
|
|
@@ -2653,7 +2655,7 @@ function Fa(o) {
|
|
|
2653
2655
|
}
|
|
2654
2656
|
),
|
|
2655
2657
|
a ? /* @__PURE__ */ n.jsx("div", { className: "blockbite--editor-linklist", children: /* @__PURE__ */ n.jsx(
|
|
2656
|
-
|
|
2658
|
+
sa,
|
|
2657
2659
|
{
|
|
2658
2660
|
links: u,
|
|
2659
2661
|
onActiveLink: (h) => [
|
|
@@ -2664,7 +2666,7 @@ function Fa(o) {
|
|
|
2664
2666
|
) }) : null
|
|
2665
2667
|
] });
|
|
2666
2668
|
}
|
|
2667
|
-
function
|
|
2669
|
+
function sa({ links: o, onActiveLink: a }) {
|
|
2668
2670
|
if (o === null)
|
|
2669
2671
|
return /* @__PURE__ */ n.jsx("p", { children: "Loading..." });
|
|
2670
2672
|
if (o.length === 0)
|
|
@@ -2768,7 +2770,7 @@ function La({ mediaProps: o, mediaCallback: a }) {
|
|
|
2768
2770
|
u.id !== 0 && /* @__PURE__ */ n.jsx(Kr, { children: /* @__PURE__ */ n.jsx(ve, { onClick: () => f(), isDestructive: !0, children: Le("Remove media", "blockbite") }) })
|
|
2769
2771
|
] });
|
|
2770
2772
|
}
|
|
2771
|
-
const
|
|
2773
|
+
const ia = ({
|
|
2772
2774
|
children: o,
|
|
2773
2775
|
className: a,
|
|
2774
2776
|
position: l,
|
|
@@ -2807,7 +2809,7 @@ const sa = ({
|
|
|
2807
2809
|
] }) })
|
|
2808
2810
|
}
|
|
2809
2811
|
) });
|
|
2810
|
-
},
|
|
2812
|
+
}, la = ({
|
|
2811
2813
|
defaultValue: o,
|
|
2812
2814
|
label: a,
|
|
2813
2815
|
min: l = 0,
|
|
@@ -2941,14 +2943,14 @@ const Ma = ({
|
|
|
2941
2943
|
readOnly: p !== "arbitrary",
|
|
2942
2944
|
children: [
|
|
2943
2945
|
/* @__PURE__ */ n.jsx(
|
|
2944
|
-
|
|
2946
|
+
ia,
|
|
2945
2947
|
{
|
|
2946
2948
|
visible: f,
|
|
2947
2949
|
position: "bottom left",
|
|
2948
2950
|
className: "w-[300px] bg-white shadow-sm",
|
|
2949
2951
|
onVisibleChange: v,
|
|
2950
2952
|
children: p === "arbitrary" ? /* @__PURE__ */ n.jsx(
|
|
2951
|
-
|
|
2953
|
+
la,
|
|
2952
2954
|
{
|
|
2953
2955
|
defaultValue: _,
|
|
2954
2956
|
label: "Pixel Value",
|
|
@@ -2983,7 +2985,7 @@ const Ma = ({
|
|
|
2983
2985
|
}
|
|
2984
2986
|
),
|
|
2985
2987
|
/* @__PURE__ */ n.jsx(
|
|
2986
|
-
|
|
2988
|
+
oa,
|
|
2987
2989
|
{
|
|
2988
2990
|
className: "h-[32px]",
|
|
2989
2991
|
defaultValue: p,
|
|
@@ -3016,7 +3018,7 @@ const Ma = ({
|
|
|
3016
3018
|
return H(() => {
|
|
3017
3019
|
l(f);
|
|
3018
3020
|
}, [f, l]), /* @__PURE__ */ n.jsxs(Lt.Provider, { value: { closeModal: b, openModal: h }, children: [
|
|
3019
|
-
jr.map(o, (p) => Er(p) && p.type ===
|
|
3021
|
+
jr.map(o, (p) => Er(p) && p.type === da ? p : null),
|
|
3020
3022
|
f && /* @__PURE__ */ n.jsx(
|
|
3021
3023
|
Pn,
|
|
3022
3024
|
{
|
|
@@ -3024,14 +3026,14 @@ const Ma = ({
|
|
|
3024
3026
|
onRequestClose: b,
|
|
3025
3027
|
title: u,
|
|
3026
3028
|
children: /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
|
|
3027
|
-
jr.map(o, (p) => Er(p) && p.type ===
|
|
3028
|
-
jr.map(o, (p) => Er(p) && p.type ===
|
|
3029
|
-
jr.map(o, (p) => Er(p) && p.type ===
|
|
3029
|
+
jr.map(o, (p) => Er(p) && p.type === ua ? p : null),
|
|
3030
|
+
jr.map(o, (p) => Er(p) && p.type === fa ? p : null),
|
|
3031
|
+
jr.map(o, (p) => Er(p) && p.type === ca ? p : null)
|
|
3030
3032
|
] })
|
|
3031
3033
|
}
|
|
3032
3034
|
)
|
|
3033
3035
|
] });
|
|
3034
|
-
},
|
|
3036
|
+
}, ua = ({ children: o, className: a = "", ...l }) => /* @__PURE__ */ n.jsx(
|
|
3035
3037
|
"div",
|
|
3036
3038
|
{
|
|
3037
3039
|
className: z(
|
|
@@ -3041,7 +3043,7 @@ const Ma = ({
|
|
|
3041
3043
|
...l,
|
|
3042
3044
|
children: o
|
|
3043
3045
|
}
|
|
3044
|
-
),
|
|
3046
|
+
), ca = ({ children: o, className: a = "", ...l }) => /* @__PURE__ */ n.jsx(
|
|
3045
3047
|
"div",
|
|
3046
3048
|
{
|
|
3047
3049
|
className: z(
|
|
@@ -3051,7 +3053,7 @@ const Ma = ({
|
|
|
3051
3053
|
...l,
|
|
3052
3054
|
children: o
|
|
3053
3055
|
}
|
|
3054
|
-
),
|
|
3056
|
+
), fa = ({ children: o, className: a = "", ...l }) => /* @__PURE__ */ n.jsx(
|
|
3055
3057
|
"div",
|
|
3056
3058
|
{
|
|
3057
3059
|
className: z("text-gray-medium px-4 pb-4 text-sm", a),
|
|
@@ -3061,11 +3063,11 @@ const Ma = ({
|
|
|
3061
3063
|
), Ua = ({ children: o }) => {
|
|
3062
3064
|
const { closeModal: a } = Mt();
|
|
3063
3065
|
return /* @__PURE__ */ n.jsx("div", { onClick: a, className: "cursor-pointer", children: o });
|
|
3064
|
-
},
|
|
3066
|
+
}, da = ({ children: o }) => {
|
|
3065
3067
|
const { openModal: a } = Mt();
|
|
3066
3068
|
return /* @__PURE__ */ n.jsx("div", { onClick: a, className: "cursor-pointer", children: o });
|
|
3067
3069
|
};
|
|
3068
|
-
function
|
|
3070
|
+
function pa(o, a) {
|
|
3069
3071
|
Array.from(o.styleSheets).forEach((l) => {
|
|
3070
3072
|
try {
|
|
3071
3073
|
if (l.cssRules) {
|
|
@@ -3094,7 +3096,7 @@ const Va = ({
|
|
|
3094
3096
|
const u = Bn(() => document.createElement("div"), []);
|
|
3095
3097
|
return H(() => {
|
|
3096
3098
|
const d = o;
|
|
3097
|
-
d.document.body.innerHTML = "", d.document.body.appendChild(u), d.document.body.classList.add("bb_"),
|
|
3099
|
+
d.document.body.innerHTML = "", d.document.body.appendChild(u), d.document.body.classList.add("bb_"), pa(document, d.document), d.document.title = document.title || "Blockbite Editor";
|
|
3098
3100
|
const f = () => {
|
|
3099
3101
|
setTimeout(a, 100);
|
|
3100
3102
|
};
|
|
@@ -3364,16 +3366,16 @@ const Ha = ({
|
|
|
3364
3366
|
),
|
|
3365
3367
|
!u && /* @__PURE__ */ n.jsx("p", { children: "No options available" })
|
|
3366
3368
|
] });
|
|
3367
|
-
}, { select:
|
|
3369
|
+
}, { select: va, dispatch: ma } = wp.data, Xa = ({
|
|
3368
3370
|
buttonText: o = "Add block"
|
|
3369
3371
|
}) => {
|
|
3370
3372
|
const a = () => {
|
|
3371
|
-
const l =
|
|
3373
|
+
const l = va("core/block-editor").getSelectedBlock(), { clientId: u, innerBlocks: d } = l, f = d[d.length - 1], v = Gn(
|
|
3372
3374
|
f.name,
|
|
3373
3375
|
f.attributes,
|
|
3374
3376
|
f.innerBlocks
|
|
3375
3377
|
);
|
|
3376
|
-
|
|
3378
|
+
ma("core/block-editor").insertBlocks(v, 0, u);
|
|
3377
3379
|
};
|
|
3378
3380
|
return /* @__PURE__ */ n.jsx(ve, { variant: "primary", onClick: () => a(), children: o });
|
|
3379
3381
|
}, Za = ({ children: o, watch: a, className: l }) => {
|
|
@@ -3403,7 +3405,7 @@ const Ha = ({
|
|
|
3403
3405
|
u(!1);
|
|
3404
3406
|
}, 500), a && u(!0);
|
|
3405
3407
|
}, [l, a]), l && /* @__PURE__ */ n.jsx(Dn, { className: z(o) });
|
|
3406
|
-
}, tt = Ft(null),
|
|
3408
|
+
}, tt = Ft(null), ha = ({
|
|
3407
3409
|
children: o,
|
|
3408
3410
|
defaultValue: a,
|
|
3409
3411
|
value: l,
|
|
@@ -3417,7 +3419,7 @@ const Ha = ({
|
|
|
3417
3419
|
}
|
|
3418
3420
|
};
|
|
3419
3421
|
return /* @__PURE__ */ n.jsx(tt.Provider, { value: C, children: /* @__PURE__ */ n.jsx(Q, { important: !0, className: d.className, children: o }) });
|
|
3420
|
-
},
|
|
3422
|
+
}, ya = ({
|
|
3421
3423
|
options: o,
|
|
3422
3424
|
children: a,
|
|
3423
3425
|
className: l,
|
|
@@ -3435,14 +3437,14 @@ const Ha = ({
|
|
|
3435
3437
|
children: () => a
|
|
3436
3438
|
}
|
|
3437
3439
|
);
|
|
3438
|
-
},
|
|
3440
|
+
}, ba = ({
|
|
3439
3441
|
value: o,
|
|
3440
3442
|
children: a,
|
|
3441
3443
|
className: l
|
|
3442
3444
|
}) => Qr(tt)?.activeTab === o ? /* @__PURE__ */ n.jsx(Q, { className: l, children: a }) : null, eo = {
|
|
3443
|
-
Wrapper:
|
|
3444
|
-
List:
|
|
3445
|
-
Content:
|
|
3445
|
+
Wrapper: ha,
|
|
3446
|
+
List: ya,
|
|
3447
|
+
Content: ba
|
|
3446
3448
|
}, ro = ({
|
|
3447
3449
|
children: o,
|
|
3448
3450
|
onClick: a,
|
|
@@ -3524,8 +3526,8 @@ const Ha = ({
|
|
|
3524
3526
|
) });
|
|
3525
3527
|
};
|
|
3526
3528
|
export {
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
+
ka as AutocompleteDropdown,
|
|
3530
|
+
aa as Badge,
|
|
3529
3531
|
Ta as BitePreview,
|
|
3530
3532
|
Sa as Button,
|
|
3531
3533
|
ta as ButtonToggle,
|
|
@@ -3534,7 +3536,7 @@ export {
|
|
|
3534
3536
|
Pa as ChapterDivider,
|
|
3535
3537
|
Na as Checkbox,
|
|
3536
3538
|
Aa as DisappearingMessage,
|
|
3537
|
-
|
|
3539
|
+
oa as DropdownPicker,
|
|
3538
3540
|
Ia as EmptyState,
|
|
3539
3541
|
$a as FloatingPanel,
|
|
3540
3542
|
Da as FocalPointControl,
|
|
@@ -3544,16 +3546,16 @@ export {
|
|
|
3544
3546
|
Ma as MetricsControl,
|
|
3545
3547
|
Wa as Modal,
|
|
3546
3548
|
Ua as ModalClose,
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3549
|
+
fa as ModalContent,
|
|
3550
|
+
ca as ModalFooter,
|
|
3551
|
+
ua as ModalHeader,
|
|
3552
|
+
da as ModalTrigger,
|
|
3551
3553
|
Va as NewWindowPortal,
|
|
3552
3554
|
Ba as Notice,
|
|
3553
3555
|
Ya as PasswordInput,
|
|
3554
|
-
|
|
3556
|
+
ia as Popover,
|
|
3555
3557
|
za as ProjectsNavigation,
|
|
3556
|
-
|
|
3558
|
+
la as RangeSlider,
|
|
3557
3559
|
qa as ResponsiveImage,
|
|
3558
3560
|
Ga as ResponsiveVideo,
|
|
3559
3561
|
Ha as ScrollList,
|
|
@@ -3563,9 +3565,9 @@ export {
|
|
|
3563
3565
|
Za as SlideIn,
|
|
3564
3566
|
Qa as Spinner,
|
|
3565
3567
|
eo as Tabs,
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3568
|
+
ba as TabsContent,
|
|
3569
|
+
ya as TabsList,
|
|
3570
|
+
ha as TabsWrapper,
|
|
3569
3571
|
ro as Tag,
|
|
3570
3572
|
rt as TextControl,
|
|
3571
3573
|
to as TextControlLabel,
|