@janbox/storefront-builder 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/{dialog-header-DPLOS7TT.js → countdown-timer.node-CZrTzirS.js} +3939 -2463
- package/dist/editor/components/index.d.ts +0 -1
- package/dist/editor/hooks/index.d.ts +0 -12
- package/dist/editor/hooks/use-editor.d.ts +6 -2
- package/dist/editor/index.d.ts +4 -0
- package/dist/editor/lib/index.d.ts +6 -4
- package/dist/editor/toolbars/css-font-weight/index.d.ts +9 -0
- package/dist/editor/toolbars/{width/width.d.ts → css-width/index.d.ts} +5 -5
- package/dist/editor/toolbars/html-anchor-target/index.d.ts +7 -0
- package/dist/editor/toolbars/index.d.ts +3 -3
- package/dist/editor/toolbars/text-align/index.d.ts +9 -1
- package/dist/editor/ui/button-group/button-group.d.ts +1 -1
- package/dist/editor/ui/dialog/dialog-body/dialog-body.d.ts +1 -1
- package/dist/editor/ui/form-label/form-label.d.ts +1 -1
- package/dist/editor/ui/input/input.d.ts +1 -2
- package/dist/editor/ui/loading-overlay/loading-overlay.d.ts +1 -1
- package/dist/editor/ui/popover/popover-close.d.ts +1 -1
- package/dist/editor/ui/tabs/tab-content.d.ts +1 -1
- package/dist/editor/ui/tabs/tab-list.d.ts +2 -4
- package/dist/editor/ui/tabs/tab-panel.d.ts +1 -1
- package/dist/editor/ui/tabs/tab.d.ts +2 -5
- package/dist/editor/ui/tabs/tabs.d.ts +1 -1
- package/dist/editor.js +1471 -739
- package/dist/index-B1b2lC5K.js +4 -0
- package/dist/index-CdI5y-ul.js +8326 -0
- package/dist/index.js +176 -334
- package/dist/style.css +1 -1
- package/dist/templates.js +27 -31
- package/dist/theme/index.d.ts +293 -0
- package/dist/tooltip-npH7aBjY.js +75 -0
- package/dist/utils/common.d.ts +0 -2
- package/package.json +1 -11
- package/dist/anchor-target-BlOvysAr.js +0 -2329
- package/dist/color-picker-popover-B3AVFuei.js +0 -201
- package/dist/countdown-timer.node-OmDiT-pz.js +0 -825
- package/dist/date-picker-B4Rju7gG.js +0 -115
- package/dist/dropzone-Dbfed3jK.js +0 -490
- package/dist/editor/components/toolbar-container.d.ts +0 -1
- package/dist/editor/toolbars/anchor-target/anchor-target.d.ts +0 -7
- package/dist/editor/toolbars/anchor-target/index.d.ts +0 -1
- package/dist/editor/toolbars/font-weight/dataset.d.ts +0 -5
- package/dist/editor/toolbars/font-weight/font-weight.d.ts +0 -9
- package/dist/editor/toolbars/font-weight/index.d.ts +0 -1
- package/dist/editor/toolbars/text-align/text-align.d.ts +0 -8
- package/dist/editor/toolbars/width/index.d.ts +0 -1
- package/dist/editor/toolbars.js +0 -336
- package/dist/editor/ui.js +0 -110
- package/dist/index-BbiQ0n_-.js +0 -4
- package/dist/index-CwrFnubn.js +0 -4448
- package/dist/tooltip-KbIHELP2.js +0 -65
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsxs as x, jsx as r } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useRef as k, Fragment as E, isValidElement as I, cloneElement as O } from "react";
|
|
3
|
+
import { useFloating as P, autoUpdate as S, flip as j, offset as V, size as W, arrow as z, useHover as D, safePolygon as M, useFocus as N, useDismiss as T, useRole as _, useInteractions as A, useMergeRefs as G, FloatingPortal as H } from "@floating-ui/react";
|
|
4
|
+
import { get as L } from "lodash-es";
|
|
5
|
+
import { FLOATING_Z_INDEX as U } from "@janbox/storefront-ui/theme";
|
|
6
|
+
import { useControllableState as X } from "@janbox/storefront-ui/hooks";
|
|
7
|
+
import { t as o } from "./countdown-timer.node-CZrTzirS.js";
|
|
8
|
+
const Y = ({ placement: d = "top", open: p, onOpenChange: c, children: e, content: m }) => {
|
|
9
|
+
const [n, u] = X({
|
|
10
|
+
defaultValue: !1,
|
|
11
|
+
value: p
|
|
12
|
+
}), g = k(null), b = (s, l, w) => {
|
|
13
|
+
u(s), c?.(s, l, w);
|
|
14
|
+
}, { refs: i, floatingStyles: h, context: t } = P({
|
|
15
|
+
open: n,
|
|
16
|
+
onOpenChange: b,
|
|
17
|
+
placement: d,
|
|
18
|
+
middleware: [
|
|
19
|
+
j(),
|
|
20
|
+
V(4),
|
|
21
|
+
W({
|
|
22
|
+
apply({ elements: s }) {
|
|
23
|
+
const l = {
|
|
24
|
+
zIndex: `${U}`
|
|
25
|
+
};
|
|
26
|
+
Object.assign(s.floating.style, l);
|
|
27
|
+
}
|
|
28
|
+
}),
|
|
29
|
+
z({ element: g })
|
|
30
|
+
],
|
|
31
|
+
whileElementsMounted: S
|
|
32
|
+
}), v = D(t, { move: !1, handleClose: M() }), R = N(t), y = T(t, {}), C = _(t, {
|
|
33
|
+
role: "tooltip"
|
|
34
|
+
}), { getReferenceProps: a, getFloatingProps: F } = A([v, R, y, C]), f = G([i.setReference, L(e, "ref")]);
|
|
35
|
+
return /* @__PURE__ */ x(E, { children: [
|
|
36
|
+
I(e) ? O(
|
|
37
|
+
e,
|
|
38
|
+
a({
|
|
39
|
+
...e.props ?? {},
|
|
40
|
+
ref: f
|
|
41
|
+
})
|
|
42
|
+
) : /* @__PURE__ */ r("div", { ...a(), ref: f, children: e }),
|
|
43
|
+
n && /* @__PURE__ */ r(H, { children: /* @__PURE__ */ r(
|
|
44
|
+
"div",
|
|
45
|
+
{
|
|
46
|
+
style: h,
|
|
47
|
+
...F(),
|
|
48
|
+
css: { borderRadius: 8, backgroundColor: o.palette.ink["6s"] },
|
|
49
|
+
ref: i.setFloating,
|
|
50
|
+
children: /* @__PURE__ */ r(
|
|
51
|
+
"div",
|
|
52
|
+
{
|
|
53
|
+
css: {
|
|
54
|
+
padding: 8,
|
|
55
|
+
borderRadius: 8,
|
|
56
|
+
backgroundColor: o.palette.ink["6s"],
|
|
57
|
+
color: o.palette.white["6s"],
|
|
58
|
+
borderWidth: 1,
|
|
59
|
+
borderStyle: "solid",
|
|
60
|
+
borderColor: o.palette.white["1s"],
|
|
61
|
+
...o.text.xs,
|
|
62
|
+
":focus-visible": {
|
|
63
|
+
outlineStyle: "none"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
children: m
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
) })
|
|
71
|
+
] });
|
|
72
|
+
};
|
|
73
|
+
export {
|
|
74
|
+
Y as W
|
|
75
|
+
};
|
package/dist/utils/common.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { ClassValue } from 'clsx';
|
|
3
2
|
export declare const parseNumber: (text?: string | number, type?: "int" | "float", separator?: string) => number | undefined;
|
|
4
3
|
export declare function parseSvgString(source: string, uniqueId: string): ReactElement<import('react').SVGProps<SVGSVGElement>, "svg"> | null;
|
|
5
|
-
export declare const cn: (...classes: ClassValue[]) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@janbox/storefront-builder",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Standalone storefront builder library extracted from craft-layers-portal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -19,14 +19,6 @@
|
|
|
19
19
|
"types": "./dist/editor/index.d.ts",
|
|
20
20
|
"import": "./dist/editor.js"
|
|
21
21
|
},
|
|
22
|
-
"./editor/ui": {
|
|
23
|
-
"types": "./dist/editor/ui/index.d.ts",
|
|
24
|
-
"import": "./dist/editor/ui.js"
|
|
25
|
-
},
|
|
26
|
-
"./editor/toolbars": {
|
|
27
|
-
"types": "./dist/editor/toolbars/index.d.ts",
|
|
28
|
-
"import": "./dist/editor/toolbars.js"
|
|
29
|
-
},
|
|
30
22
|
"./templates": {
|
|
31
23
|
"types": "./dist/templates/index.d.ts",
|
|
32
24
|
"import": "./dist/templates.js"
|
|
@@ -48,7 +40,6 @@
|
|
|
48
40
|
"@tiptap/extension-text-style": "^3.22.2",
|
|
49
41
|
"@tiptap/react": "^3.22.2",
|
|
50
42
|
"@tiptap/starter-kit": "^3.22.2",
|
|
51
|
-
"clsx": "^2.1.1",
|
|
52
43
|
"color": "^5.0.0",
|
|
53
44
|
"dayjs": "^1.11.13",
|
|
54
45
|
"flat": "^6.0.1",
|
|
@@ -59,7 +50,6 @@
|
|
|
59
50
|
"react-dropzone": "^14.2.3",
|
|
60
51
|
"react-frame-component": "^5.2.7",
|
|
61
52
|
"react-use": "^17.5.1",
|
|
62
|
-
"tailwind-merge": "^2.4.0",
|
|
63
53
|
"usehooks-ts": "^3.1.1"
|
|
64
54
|
},
|
|
65
55
|
"devDependencies": {
|