zs_library 0.4.10 → 0.4.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.
Files changed (64) hide show
  1. package/dist/components/desktop/config.js +15 -0
  2. package/dist/components/desktop/context/config/context.js +14 -0
  3. package/dist/components/desktop/context/config/hooks.js +7 -0
  4. package/dist/components/desktop/context/state/context.js +221 -0
  5. package/dist/components/desktop/context/state/hooks.js +7 -0
  6. package/dist/components/desktop/context-menu/index.js +312 -0
  7. package/dist/components/desktop/index.js +40 -0
  8. package/dist/components/desktop/items/group-item.js +305 -0
  9. package/dist/components/desktop/items/modal/group-item-modal.js +158 -0
  10. package/dist/components/desktop/items/modal/info-modal.js +33 -0
  11. package/dist/components/desktop/items/sortable-item.js +120 -0
  12. package/dist/components/desktop/sortable.js +272 -0
  13. package/dist/components/desktop/style.js +18 -0
  14. package/dist/components/desktop/theme.js +32 -0
  15. package/dist/components/desktop/utils.js +15 -0
  16. package/dist/components/dock/dock-desktop.js +83 -0
  17. package/dist/components/dock/dock-mobile.js +69 -0
  18. package/dist/components/dock/index.js +24 -0
  19. package/dist/components/dock/utils.js +9 -0
  20. package/dist/components/editor/editor.js +199 -0
  21. package/dist/components/editor/extensions/drag-handle/clipboard-serializer.js +20 -0
  22. package/dist/components/editor/extensions/drag-handle/index.js +273 -0
  23. package/dist/components/editor/extensions.js +131 -0
  24. package/dist/components/editor/generative/ai-completion-command.js +59 -0
  25. package/dist/components/editor/generative/ai-selector-commands.js +78 -0
  26. package/dist/components/editor/generative/ai-selector.js +90 -0
  27. package/dist/components/editor/generative/drag-handle.js +70 -0
  28. package/dist/components/editor/generative/generative-dropdown-menu.js +55 -0
  29. package/dist/components/editor/generative/generative-menu-switch.js +59 -0
  30. package/dist/components/editor/image-upload.js +36 -0
  31. package/dist/components/editor/index.js +8 -0
  32. package/dist/components/editor/lib/colors.js +98 -0
  33. package/dist/components/editor/lib/content.js +8 -0
  34. package/dist/components/editor/lib/nodes.js +70 -0
  35. package/dist/components/editor/lib/url-utils.js +21 -0
  36. package/dist/components/editor/preview.js +12 -0
  37. package/dist/components/editor/selectors/color-selector.js +100 -0
  38. package/dist/components/editor/selectors/link-selector.js +82 -0
  39. package/dist/components/editor/selectors/math-selector.js +37 -0
  40. package/dist/components/editor/selectors/node-selector.js +56 -0
  41. package/dist/components/editor/selectors/text-buttons.js +75 -0
  42. package/dist/components/editor/slash-command.js +129 -0
  43. package/dist/components/editor/ui/button.js +44 -0
  44. package/dist/components/editor/ui/command.js +94 -0
  45. package/dist/components/editor/ui/dialog.js +68 -0
  46. package/dist/components/editor/ui/dropdown-menu.js +99 -0
  47. package/dist/components/editor/ui/icons/crazy-spinner.js +10 -0
  48. package/dist/components/editor/ui/popover.js +24 -0
  49. package/dist/components/editor/ui/scroll-area.js +39 -0
  50. package/dist/components/editor/ui/separator.js +25 -0
  51. package/dist/components/editor/ui/tooltip.js +25 -0
  52. package/dist/components/md-editor/editor.js +104 -0
  53. package/dist/components/md-editor/i18n/index.js +12 -0
  54. package/dist/components/md-editor/i18n/zh_CN.js +122 -0
  55. package/dist/components/md-editor/index.js +8 -0
  56. package/dist/components/md-editor/preview.js +81 -0
  57. package/dist/components/md-editor/style.js +267 -0
  58. package/dist/components/md-editor/utils.js +8 -0
  59. package/dist/i18n/index.js +23 -0
  60. package/dist/i18n/locales/en-US.js +30 -0
  61. package/dist/i18n/locales/zh-CN.js +30 -0
  62. package/dist/index.js +12 -10612
  63. package/dist/node_modules/.pnpm/@tiptap_pm@2.11.5/node_modules/@tiptap/pm/view/dist/index.js +3 -0
  64. package/package.json +6 -1
@@ -0,0 +1,15 @@
1
+ import "./index.css";
2
+ const o = {
3
+ maxRow: 2,
4
+ maxCol: 2
5
+ }, p = {
6
+ ...o
7
+ }, a = {
8
+ app: o,
9
+ group: p
10
+ };
11
+ export {
12
+ o as appConfig,
13
+ a as configMap,
14
+ p as groupConfig
15
+ };
@@ -0,0 +1,14 @@
1
+ import "./index.css";
2
+ import { jsx as m } from "react/jsx-runtime";
3
+ import { createContext as n, useMemo as s } from "react";
4
+ import { themeLight as h, themeDark as f } from "../../theme.js";
5
+ const l = n(
6
+ {}
7
+ ), d = (r) => {
8
+ const { children: t, theme: e, ...o } = r, i = s(() => e === "light" ? h : e === "dark" ? f : e, [e]);
9
+ return /* @__PURE__ */ m(l.Provider, { value: { theme: i, ...o }, children: t });
10
+ };
11
+ export {
12
+ l as SortableConfigContext,
13
+ d as SortableConfigProvider
14
+ };
@@ -0,0 +1,7 @@
1
+ import "./index.css";
2
+ import { useContext as t } from "react";
3
+ import { SortableConfigContext as o } from "./context.js";
4
+ const i = () => t(o);
5
+ export {
6
+ i as useSortableConfig
7
+ };
@@ -0,0 +1,221 @@
1
+ import "./index.css";
2
+ import { jsx as re } from "react/jsx-runtime";
3
+ import { useLocalStorageState as oe, useDebounceEffect as ue } from "ahooks";
4
+ import { createContext as se, useState as d, useRef as ie, useEffect as b } from "react";
5
+ import { v4 as k } from "uuid";
6
+ import { configMap as ce } from "../../config.js";
7
+ import M from "../../utils.js";
8
+ const le = se({
9
+ list: [],
10
+ setList: () => {
11
+ },
12
+ contextMenu: null,
13
+ setContextMenu: () => {
14
+ },
15
+ listStatus: null,
16
+ setListStatus: () => {
17
+ },
18
+ contextMenuFuns: () => {
19
+ },
20
+ hideContextMenu: () => {
21
+ },
22
+ showInfoItemData: null,
23
+ setShowInfoItemData: () => {
24
+ },
25
+ openGroupItemData: null,
26
+ setOpenGroupItemData: () => {
27
+ },
28
+ longPressTriggered: !1,
29
+ updateItem: () => {
30
+ },
31
+ updateItemConfig: () => {
32
+ },
33
+ removeItem: () => {
34
+ },
35
+ addItem: () => {
36
+ },
37
+ moveItemId: null,
38
+ setMoveItemId: () => {
39
+ },
40
+ moveTargetId: null,
41
+ setMoveTargetId: () => {
42
+ }
43
+ }), ve = (C) => {
44
+ const {
45
+ children: F,
46
+ list: I = [],
47
+ onChange: n,
48
+ storageKey: Y = "ZS_LIBRARY_DESKTOP_SORTABLE_CONFIG",
49
+ enableCaching: x = !0
50
+ } = C, [S, T] = d(), [B, A] = d(), [g, K] = d(null), p = ie(g), [U, D] = d(null), [h, a] = d([]), [X, j] = d(
51
+ null
52
+ ), [w, N] = d(
53
+ null
54
+ ), [V, P] = d(!1), [Z, z] = d(null), [H, J] = d(
55
+ null
56
+ ), [R, Q] = d(!1), [v, W] = oe(Y, {
57
+ defaultValue: [],
58
+ listenStorageChange: !0
59
+ }), G = () => {
60
+ D(null), clearTimeout(S), T(void 0), p.current = null;
61
+ }, q = (e, l) => {
62
+ D({ ...e, pageX: e.pageX, pageY: e.pageY, data: l }), clearTimeout(S);
63
+ }, $ = (e, l = !0) => {
64
+ const { config: c = {} } = e;
65
+ return c.allowContextMenu === !1 ? {} : {
66
+ onMouseDown: (r) => {
67
+ T(
68
+ setTimeout(() => {
69
+ l && p.current === null && q(r, e);
70
+ }, 800)
71
+ ), P(!1), A(
72
+ setTimeout(() => {
73
+ P(!0);
74
+ }, 800)
75
+ );
76
+ },
77
+ onMouseUp: () => {
78
+ clearTimeout(B), A(void 0), clearTimeout(S), T(void 0);
79
+ },
80
+ onContextMenu: (r) => {
81
+ l && (r.preventDefault(), q(r, e));
82
+ }
83
+ };
84
+ }, y = (e, l) => {
85
+ const c = [...l || []];
86
+ if (c.length > 0)
87
+ a((r) => {
88
+ const s = [...r], u = (t) => {
89
+ var E, L;
90
+ const o = c.shift(), i = t.find((m) => m.id === o), f = t.findIndex((m) => m.id === o);
91
+ if (c.length && i) {
92
+ if (((E = i.children) == null ? void 0 : E.filter(
93
+ (m) => !e.some((ne) => ne.id === m.id)
94
+ ).length) === 1 && e.length === 1) {
95
+ const m = { ...e[0] };
96
+ return t.splice(f, 1, m), n == null || n(t), t;
97
+ }
98
+ return i.children = u(i.children || []), t.splice(f, 1, i), n == null || n(t), t;
99
+ }
100
+ if (i) {
101
+ if (!((L = i.children) != null && L.length) && e.length) {
102
+ const m = { ...i };
103
+ return i.data = { name: "文件夹" }, i.type = "group", i.children = [m, ...e], i.id = k(), t.splice(f, 1, i), n == null || n(t), t;
104
+ }
105
+ return i.children = M.uniqueArray(e), t.splice(f, 1, i), n == null || n(t), t;
106
+ }
107
+ return M.uniqueArray(e);
108
+ };
109
+ return M.uniqueArray(u(s));
110
+ });
111
+ else {
112
+ const r = M.uniqueArray(e);
113
+ n == null || n(r), a(r);
114
+ }
115
+ }, _ = (e, l) => {
116
+ a((c) => {
117
+ const r = [...c], s = (u) => {
118
+ var t;
119
+ for (let o = 0; o < u.length; o++)
120
+ if (u[o].id === e) {
121
+ u[o].config = l;
122
+ break;
123
+ } else ((t = u[o].children) == null ? void 0 : t.length) !== void 0 && s(u[o].children);
124
+ };
125
+ return s(r), n == null || n(r), r;
126
+ });
127
+ }, O = (e, l) => {
128
+ a((c) => {
129
+ const r = [...c], s = (u) => {
130
+ var t;
131
+ for (let o = 0; o < u.length; o++)
132
+ if (u[o].id === e) {
133
+ u[o].data = l;
134
+ break;
135
+ } else ((t = u[o].children) == null ? void 0 : t.length) !== void 0 && s(u[o].children);
136
+ };
137
+ return s(r), n == null || n(r), r;
138
+ });
139
+ }, ee = (e) => {
140
+ a((l) => {
141
+ const c = [...l], r = (s) => {
142
+ var u;
143
+ for (let t = 0; t < s.length; t++)
144
+ if (s[t].id === e) {
145
+ s.splice(t, 1);
146
+ break;
147
+ } else ((u = s[t].children) == null ? void 0 : u.length) !== void 0 && r(s[t].children);
148
+ };
149
+ return r(c), n == null || n(c), c;
150
+ });
151
+ }, te = (e, l) => {
152
+ const c = [...h], r = (s, u) => {
153
+ const t = u.shift(), o = s.find((f) => f.id === t), i = s.findIndex((f) => f.id === t);
154
+ if (o) {
155
+ if (u.length)
156
+ o.children = r(o.children || [], u);
157
+ else {
158
+ const f = (e == null ? void 0 : e.type) ?? "app";
159
+ o.children = [
160
+ ...o.children ?? [],
161
+ {
162
+ ...e,
163
+ id: k(),
164
+ config: (e == null ? void 0 : e.config) ?? ce[f]
165
+ }
166
+ ];
167
+ }
168
+ return s.splice(i, 1, o), s;
169
+ } else
170
+ return s;
171
+ };
172
+ a(r(c, l));
173
+ };
174
+ return b(() => {
175
+ (I == null ? void 0 : I.length) > 0 && h.length === 0 && y(I);
176
+ }, [I]), b(() => {
177
+ p.current = g, g !== null && G();
178
+ }, [g]), b(() => {
179
+ x && v != null && v.length && !R && (y(v), Q(!0));
180
+ }, [v, R, x]), ue(
181
+ () => {
182
+ x && W(h);
183
+ },
184
+ [h, x],
185
+ {
186
+ wait: 1e3
187
+ }
188
+ ), /* @__PURE__ */ re(
189
+ le.Provider,
190
+ {
191
+ value: {
192
+ list: h,
193
+ setList: y,
194
+ contextMenu: U,
195
+ setContextMenu: D,
196
+ listStatus: g,
197
+ setListStatus: K,
198
+ contextMenuFuns: $,
199
+ hideContextMenu: G,
200
+ showInfoItemData: X,
201
+ setShowInfoItemData: j,
202
+ openGroupItemData: w,
203
+ setOpenGroupItemData: N,
204
+ longPressTriggered: V,
205
+ updateItemConfig: _,
206
+ updateItem: O,
207
+ removeItem: ee,
208
+ addItem: te,
209
+ moveItemId: Z,
210
+ setMoveItemId: z,
211
+ moveTargetId: H,
212
+ setMoveTargetId: J
213
+ },
214
+ children: F
215
+ }
216
+ );
217
+ };
218
+ export {
219
+ le as SortableStateContext,
220
+ ve as SortableStateProvider
221
+ };
@@ -0,0 +1,7 @@
1
+ import "./index.css";
2
+ import { useContext as t } from "react";
3
+ import { SortableStateContext as e } from "./context.js";
4
+ const m = () => t(e);
5
+ export {
6
+ m as useSortableState
7
+ };
@@ -0,0 +1,312 @@
1
+ import "./index.css";
2
+ import { jsx as o, jsxs as d } from "react/jsx-runtime";
3
+ import { cx as s, css as n } from "@emotion/css";
4
+ import { RiPencilRuler2Line as T, RiShareLine as j, RiInformationLine as L, RiCloseCircleLine as P } from "@remixicon/react";
5
+ import { AnimatePresence as D, motion as t } from "framer-motion";
6
+ import { configMap as X } from "../config.js";
7
+ import { useSortableConfig as M } from "../context/config/hooks.js";
8
+ import { useSortableState as Y } from "../context/state/hooks.js";
9
+ import $ from "../utils.js";
10
+ const H = {
11
+ menuShow: {
12
+ opacity: 1,
13
+ y: 0,
14
+ transition: { type: "spring", stiffness: 300, damping: 24 }
15
+ },
16
+ menuHide: { opacity: 0, y: 20, transition: { duration: 0.2 } }
17
+ }, w = (h) => {
18
+ const { icon: f, title: x, onClick: l } = h, { theme: k } = M(), { light: m, dark: p } = $.getTheme(k);
19
+ return /* @__PURE__ */ o(
20
+ t.div,
21
+ {
22
+ className: n`
23
+ &:hover {
24
+ background-color: ${m.contextMenuActiveColor};
25
+ @media (prefers-color-scheme: dark) {
26
+ background-color: ${p.contextMenuActiveColor};
27
+ }
28
+ }
29
+ @media (prefers-color-scheme: dark) {
30
+ color: black;
31
+ }
32
+ font-size: 0.75rem;
33
+ line-height: 1rem;
34
+ cursor: pointer;
35
+ transition: all 0.3s;
36
+ user-select: none;
37
+ border-radius: 0.5rem;
38
+ `,
39
+ onClick: (u) => {
40
+ u.stopPropagation(), l == null || l();
41
+ },
42
+ variants: H,
43
+ children: /* @__PURE__ */ d(
44
+ t.div,
45
+ {
46
+ className: s(
47
+ "py-1.5 px-3 rounded-lg",
48
+ n`
49
+ padding-top: 0.375rem;
50
+ padding-bottom: 0.375rem;
51
+ padding-left: 0.75rem;
52
+ padding-right: 0.75rem;
53
+ border-radius: 0.5rem;
54
+ `
55
+ ),
56
+ whileTap: { scale: 0.9 },
57
+ children: [
58
+ /* @__PURE__ */ o(
59
+ t.div,
60
+ {
61
+ className: s(
62
+ n`
63
+ margin-bottom: 0.375rem;
64
+ display: flex;
65
+ justify-content: center;
66
+ `
67
+ ),
68
+ children: f
69
+ }
70
+ ),
71
+ /* @__PURE__ */ o(t.div, { children: x })
72
+ ]
73
+ }
74
+ )
75
+ }
76
+ );
77
+ }, Q = (h) => {
78
+ const {
79
+ showInfoButton: f = !0,
80
+ showRemoveButton: x = !0,
81
+ showShareButton: l = !0,
82
+ showSizeButton: k = !0,
83
+ onInfoClick: m,
84
+ onShareClick: p,
85
+ onRemoveClick: u
86
+ } = h, {
87
+ contextMenu: r,
88
+ setContextMenu: S,
89
+ hideContextMenu: N,
90
+ setShowInfoItemData: z,
91
+ removeItem: y,
92
+ updateItemConfig: B
93
+ } = Y(), { theme: R } = M(), { light: a, dark: c } = $.getTheme(R), { data: A } = r ?? {}, { config: b = {} } = A ?? {}, I = () => {
94
+ var g;
95
+ const e = X[(g = r == null ? void 0 : r.data) == null ? void 0 : g.type], i = [];
96
+ for (let C = 1; C <= ((e == null ? void 0 : e.maxRow) ?? 2); C++)
97
+ for (let v = 1; v <= ((e == null ? void 0 : e.maxCol) ?? 2); v++)
98
+ i.push(`${C}x${v}`);
99
+ return i;
100
+ };
101
+ return /* @__PURE__ */ o(D, { children: r && /* @__PURE__ */ d(
102
+ t.div,
103
+ {
104
+ initial: { opacity: 0 },
105
+ animate: { opacity: 1 },
106
+ exit: { opacity: 0 },
107
+ onMouseDown: (e) => {
108
+ e.stopPropagation(), e.preventDefault();
109
+ },
110
+ children: [
111
+ /* @__PURE__ */ o(
112
+ t.div,
113
+ {
114
+ className: s(
115
+ n`
116
+ border-radius: 0.5rem;
117
+ overflow: hidden;
118
+ background-color: ${a.contextMenuBackgroundColor};
119
+ box-shadow: 0 0 0.5rem ${a.contextMenuShadowColor};
120
+ @media (prefers-color-scheme: dark) {
121
+ background-color: ${c.contextMenuBackgroundColor};
122
+ box-shadow: 0 0 0.5rem ${c.contextMenuShadowColor};
123
+ }
124
+ `
125
+ ),
126
+ children: k && b.allowResize !== !1 && /* @__PURE__ */ o(
127
+ t.ul,
128
+ {
129
+ className: n`
130
+ background-color: white;
131
+ padding: 0.25rem;
132
+ margin: 0;
133
+ `,
134
+ children: [
135
+ {
136
+ label: "修改大小",
137
+ key: "size",
138
+ icon: /* @__PURE__ */ o(T, { size: 14 }),
139
+ items: I().map((e) => ({
140
+ label: e,
141
+ key: e,
142
+ onClick: () => {
143
+ const [i, g] = e.split("x").map(Number);
144
+ B(r.data.id, {
145
+ row: i,
146
+ col: g
147
+ });
148
+ }
149
+ }))
150
+ }
151
+ ].map((e) => /* @__PURE__ */ d(
152
+ t.li,
153
+ {
154
+ className: n`
155
+ padding-top: 0.5rem;
156
+ padding-bottom: 0.5rem;
157
+ padding-left: 0.75rem;
158
+ padding-right: 0.75rem;
159
+ `,
160
+ children: [
161
+ /* @__PURE__ */ d(
162
+ t.p,
163
+ {
164
+ className: n`
165
+ display: flex;
166
+ align-items: center;
167
+ font-size: 0.875rem;
168
+ line-height: 1.25rem;
169
+ gap: 0.5rem;
170
+ padding-bottom: 0.5rem;
171
+ margin: 0;
172
+ `,
173
+ children: [
174
+ e.icon,
175
+ " ",
176
+ e.label
177
+ ]
178
+ }
179
+ ),
180
+ /* @__PURE__ */ o(
181
+ t.div,
182
+ {
183
+ className: n`
184
+ display: grid;
185
+ grid-template-columns: repeat(2, minmax(0, 1fr));
186
+ gap: 0.25rem;
187
+ `,
188
+ children: e.items.map((i) => /* @__PURE__ */ o(
189
+ t.div,
190
+ {
191
+ className: s(
192
+ "py-1 px-2 hover:bg-gray-100 rounded transition-all cursor-pointer text-center text-sm",
193
+ n`
194
+ padding-top: 0.25rem;
195
+ padding-bottom: 0.25rem;
196
+ padding-left: 0.5rem;
197
+ padding-right: 0.5rem;
198
+ border-radius: 0.25rem;
199
+ transition: all 0.3s;
200
+ font-size: 0.875rem;
201
+ line-height: 1.25rem;
202
+ cursor: pointer;
203
+ text-align: center;
204
+ color: ${a.contextMenuTextColor};
205
+ @media (prefers-color-scheme: dark) {
206
+ color: ${c.contextMenuTextColor};
207
+ }
208
+ &:hover {
209
+ background-color: ${a.contextMenuActiveColor};
210
+ @media (prefers-color-scheme: dark) {
211
+ background-color: ${c.contextMenuActiveColor};
212
+ }
213
+ }
214
+ `,
215
+ `${b.row}x${b.col}` === i.key && n`
216
+ background-color: ${a.contextMenuActiveColor};
217
+ @media (prefers-color-scheme: dark) {
218
+ background-color: ${c.contextMenuActiveColor};
219
+ }
220
+ `
221
+ ),
222
+ onClick: i.onClick,
223
+ children: i.label
224
+ },
225
+ i.key
226
+ ))
227
+ }
228
+ )
229
+ ]
230
+ },
231
+ e.key
232
+ ))
233
+ }
234
+ )
235
+ }
236
+ ),
237
+ /* @__PURE__ */ d(
238
+ t.div,
239
+ {
240
+ className: s(
241
+ n`
242
+ background-color: ${a.contextMenuBackgroundColor};
243
+ box-shadow: 0 0 0.5rem ${a.contextMenuShadowColor};
244
+ @media (prefers-color-scheme: dark) {
245
+ background-color: ${c.contextMenuBackgroundColor};
246
+ box-shadow: 0 0 0.5rem ${c.contextMenuShadowColor};
247
+ }
248
+ display: flex;
249
+ justify-content: space-around;
250
+ align-items: center;
251
+ margin-top: 0.5rem;
252
+ border-radius: 0.5rem;
253
+ overflow: hidden;
254
+ padding: 0.25rem;
255
+ `
256
+ ),
257
+ children: [
258
+ l && /* @__PURE__ */ o(
259
+ w,
260
+ {
261
+ icon: /* @__PURE__ */ o(j, { size: 20 }),
262
+ title: "分享",
263
+ onClick: () => {
264
+ if (p) {
265
+ p(r.data);
266
+ return;
267
+ }
268
+ }
269
+ }
270
+ ),
271
+ f && /* @__PURE__ */ o(
272
+ w,
273
+ {
274
+ icon: /* @__PURE__ */ o(L, { size: 20 }),
275
+ title: "信息",
276
+ onClick: () => {
277
+ if (m) {
278
+ m(r.data);
279
+ return;
280
+ }
281
+ z({
282
+ ...r.data,
283
+ pageX: r.pageX,
284
+ pageY: r.pageY
285
+ }), N();
286
+ }
287
+ }
288
+ ),
289
+ x && /* @__PURE__ */ o(
290
+ w,
291
+ {
292
+ icon: /* @__PURE__ */ o(P, { size: 20 }),
293
+ title: "移除",
294
+ onClick: () => {
295
+ if (u) {
296
+ u(r.data, y);
297
+ return;
298
+ }
299
+ S(null), y(r.data.id);
300
+ }
301
+ }
302
+ )
303
+ ]
304
+ }
305
+ )
306
+ ]
307
+ }
308
+ ) });
309
+ };
310
+ export {
311
+ Q as default
312
+ };
@@ -0,0 +1,40 @@
1
+ import "./index.css";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import f from "./sortable.js";
4
+ import { SortableConfigProvider as h } from "./context/config/context.js";
5
+ import { SortableStateProvider as B } from "./context/state/context.js";
6
+ const P = (e) => {
7
+ const {
8
+ list: o,
9
+ onChange: r,
10
+ storageKey: i,
11
+ enableCaching: n,
12
+ theme: a,
13
+ noLetters: s,
14
+ contextMenu: l,
15
+ contextMenuBuilder: c,
16
+ itemBuilder: m,
17
+ itemIconBuilder: d,
18
+ pagingDotBuilder: g,
19
+ pagingDotsBuilder: p,
20
+ ...u
21
+ } = e;
22
+ return /* @__PURE__ */ t(B, { ...{
23
+ list: o,
24
+ onChange: r,
25
+ storageKey: i,
26
+ enableCaching: n
27
+ }, children: /* @__PURE__ */ t(h, { ...{
28
+ theme: a,
29
+ noLetters: s,
30
+ contextMenu: l,
31
+ pagingDotsBuilder: p,
32
+ pagingDotBuilder: g,
33
+ itemBuilder: m,
34
+ itemIconBuilder: d,
35
+ contextMenuBuilder: c
36
+ }, children: /* @__PURE__ */ t(f, { ...u }) }) });
37
+ };
38
+ export {
39
+ P as default
40
+ };