arxatec-ui 0.1.44 → 0.1.45

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 (41) hide show
  1. package/dist/annotation_editor_extensions-OCgySol8.js +804 -0
  2. package/dist/annotation_editor_extensions-OCgySol8.js.map +1 -0
  3. package/dist/components/file_view/index.d.ts +1 -1
  4. package/dist/components/file_view/template_viewer/components/annotation_color_picker/index.d.ts +10 -0
  5. package/dist/components/file_view/template_viewer/components/annotation_docked_toolbar/annotation_box_font_toolbars.d.ts +2 -0
  6. package/dist/components/file_view/template_viewer/components/annotation_docked_toolbar/annotation_format_toolbars.d.ts +1 -0
  7. package/dist/components/file_view/template_viewer/components/annotation_konva_layer/index.d.ts +19 -0
  8. package/dist/components/file_view/template_viewer/components/annotation_overlay/index.d.ts +2 -0
  9. package/dist/components/file_view/template_viewer/components/annotation_shape_toolbar/index.d.ts +10 -0
  10. package/dist/components/file_view/template_viewer/components/annotation_toolbar/index.d.ts +5 -0
  11. package/dist/components/file_view/template_viewer/components/annotations_side_panel/index.d.ts +2 -2
  12. package/dist/components/file_view/template_viewer/components/pdf_template_page_row/index.d.ts +13 -4
  13. package/dist/components/file_view/template_viewer/components/pdf_template_viewer/index.d.ts +11 -3
  14. package/dist/components/file_view/template_viewer/constants/index.d.ts +41 -7
  15. package/dist/components/file_view/template_viewer/context/active_annotation_editor_context.d.ts +13 -5
  16. package/dist/components/file_view/template_viewer/context/active_annotation_editor_provider.d.ts +1 -1
  17. package/dist/components/file_view/template_viewer/utilities/content/index.d.ts +1 -0
  18. package/dist/components/file_view/template_viewer/utilities/file/index.d.ts +1 -0
  19. package/dist/components/file_view/template_viewer/utilities/geometry/annotation_geometry.d.ts +18 -0
  20. package/dist/components/file_view/template_viewer/utilities/geometry/annotation_konva_coords.d.ts +29 -0
  21. package/dist/components/file_view/template_viewer/utilities/geometry/index.d.ts +2 -0
  22. package/dist/components/file_view/template_viewer/utilities/index.d.ts +5 -0
  23. package/dist/components/file_view/template_viewer/utilities/schema/index.d.ts +1 -0
  24. package/dist/components/file_view/template_viewer/utilities/schema/template_annotation_schema.d.ts +11 -0
  25. package/dist/components/file_view/template_viewer/utilities/shapes/index.d.ts +5 -0
  26. package/dist/components/file_view/template_viewer/utilities/shapes/shape_annotation_utils.d.ts +3 -0
  27. package/dist/components/file_view/template_viewer/utilities/shapes/shape_color_palette.d.ts +47 -0
  28. package/dist/components/file_view/template_viewer/utilities/shapes/shape_defaults.d.ts +20 -0
  29. package/dist/components/file_view/template_viewer/utilities/shapes/shape_labels.d.ts +7 -0
  30. package/dist/components/file_view/template_viewer/utilities/shapes/template_insert_tool.d.ts +2 -0
  31. package/dist/components/file_view/types/annotations.d.ts +69 -2
  32. package/dist/file-view.js +2994 -1375
  33. package/dist/file-view.js.map +1 -1
  34. package/dist/index.js +3038 -7492
  35. package/dist/index.js.map +1 -1
  36. package/dist/styles.css +199 -0
  37. package/package.json +16 -10
  38. package/dist/annotation_editor_extensions-Bjm_qaoM.js +0 -1286
  39. package/dist/annotation_editor_extensions-Bjm_qaoM.js.map +0 -1
  40. /package/dist/components/file_view/template_viewer/{merge_plain_into_annotation_html.d.ts → utilities/content/merge_plain_into_annotation_html.d.ts} +0 -0
  41. /package/dist/components/file_view/template_viewer/{template_file_kind.d.ts → utilities/file/template_file_kind.d.ts} +0 -0
@@ -0,0 +1,804 @@
1
+ import { _ as e, f as t, g as n, l as r, u as i, y as a } from "./sheet-BiKQYwnD.js";
2
+ import * as o from "react";
3
+ import s, { useEffect as c, useState as l } from "react";
4
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
5
+ import { CheckIcon as f, ChevronDown as p, ChevronDownIcon as m, ChevronUpIcon as h, ItalicIcon as ee, UnderlineIcon as te, XIcon as ne } from "lucide-react";
6
+ import * as g from "@radix-ui/react-dialog";
7
+ import * as _ from "@radix-ui/react-scroll-area";
8
+ import * as re from "@radix-ui/react-label";
9
+ import * as v from "@radix-ui/react-select";
10
+ import { Slot as ie } from "@radix-ui/react-slot";
11
+ import { cva as ae } from "class-variance-authority";
12
+ import * as y from "@radix-ui/react-popover";
13
+ import { Drawer as b } from "vaul";
14
+ import * as x from "@radix-ui/react-slider";
15
+ import * as S from "@radix-ui/react-tabs";
16
+ import { Color as oe } from "@tiptap/extension-color";
17
+ import se from "@tiptap/extension-highlight";
18
+ import { FontFamily as C, FontSize as ce, TextStyle as le } from "@tiptap/extension-text-style";
19
+ import ue from "@tiptap/extension-underline";
20
+ import de from "@tiptap/starter-kit";
21
+ import fe from "@tiptap/extension-placeholder";
22
+ //#region src/hooks/use_media_query/index.ts
23
+ function w(e) {
24
+ let [t, n] = l(!1);
25
+ return c(() => {
26
+ let r = window.matchMedia(e);
27
+ r.matches !== t && n(r.matches);
28
+ let i = () => n(r.matches);
29
+ return window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
30
+ }, [t, e]), t;
31
+ }
32
+ //#endregion
33
+ //#region src/components/dialog/index.tsx
34
+ function pe({ ...e }) {
35
+ return /* @__PURE__ */ u(g.Root, {
36
+ "data-slot": "dialog",
37
+ ...e
38
+ });
39
+ }
40
+ function me({ ...e }) {
41
+ return /* @__PURE__ */ u(g.Trigger, {
42
+ "data-slot": "dialog-trigger",
43
+ ...e
44
+ });
45
+ }
46
+ function T({ ...e }) {
47
+ return /* @__PURE__ */ u(g.Portal, {
48
+ "data-slot": "dialog-portal",
49
+ ...e
50
+ });
51
+ }
52
+ function he({ ...e }) {
53
+ return /* @__PURE__ */ u(g.Close, {
54
+ "data-slot": "dialog-close",
55
+ ...e
56
+ });
57
+ }
58
+ function E({ className: e, onContextMenu: t, ...n }) {
59
+ return /* @__PURE__ */ u(g.Overlay, {
60
+ "data-slot": "dialog-overlay",
61
+ className: a("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", e),
62
+ onContextMenu: (e) => {
63
+ e.stopPropagation(), t?.(e);
64
+ },
65
+ ...n
66
+ });
67
+ }
68
+ function ge({ className: e, children: t, showCloseButton: n = !0, onContextMenu: r, ...i }) {
69
+ return /* @__PURE__ */ d(T, {
70
+ "data-slot": "dialog-portal",
71
+ children: [/* @__PURE__ */ u(E, {}), /* @__PURE__ */ d(g.Content, {
72
+ "data-slot": "dialog-content",
73
+ className: a("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-md border p-4 shadow-lg duration-200 sm:max-w-lg", e),
74
+ onContextMenu: (e) => {
75
+ e.stopPropagation(), r?.(e);
76
+ },
77
+ ...i,
78
+ children: [t, n && /* @__PURE__ */ d(g.Close, {
79
+ "data-slot": "dialog-close",
80
+ className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
81
+ children: [/* @__PURE__ */ u(ne, {}), /* @__PURE__ */ u("span", {
82
+ className: "sr-only",
83
+ children: "Close"
84
+ })]
85
+ })]
86
+ })]
87
+ });
88
+ }
89
+ function _e({ className: e, ...t }) {
90
+ return /* @__PURE__ */ u("div", {
91
+ "data-slot": "dialog-header",
92
+ className: a("flex flex-col gap-2 text-center sm:text-left", e),
93
+ ...t
94
+ });
95
+ }
96
+ function ve({ className: e, ...t }) {
97
+ return /* @__PURE__ */ u("div", {
98
+ "data-slot": "dialog-footer",
99
+ className: a("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
100
+ ...t
101
+ });
102
+ }
103
+ function ye({ className: e, ...t }) {
104
+ return /* @__PURE__ */ u(g.Title, {
105
+ "data-slot": "dialog-title",
106
+ className: a("text-base font-normal text-primary leading-none", e),
107
+ ...t
108
+ });
109
+ }
110
+ function be({ className: e, ...t }) {
111
+ return /* @__PURE__ */ u(g.Description, {
112
+ "data-slot": "dialog-description",
113
+ className: a("text-muted-foreground text-sm", e),
114
+ ...t
115
+ });
116
+ }
117
+ //#endregion
118
+ //#region src/components/scroll_area/index.tsx
119
+ function D({ className: e, children: t, viewportRef: n, ...r }) {
120
+ let i = o.useRef(null);
121
+ return o.useLayoutEffect(() => {
122
+ if (!n || !i.current) return;
123
+ let e = i.current.closest("[data-slot=\"scroll-area-viewport\"]");
124
+ return typeof n == "function" ? (n(e), () => {
125
+ n(null);
126
+ }) : (n.current = e, () => {
127
+ n.current = null;
128
+ });
129
+ }, [n]), /* @__PURE__ */ d(_.Root, {
130
+ "data-slot": "scroll-area",
131
+ className: a("relative", e),
132
+ ...r,
133
+ children: [
134
+ /* @__PURE__ */ d(_.Viewport, {
135
+ "data-slot": "scroll-area-viewport",
136
+ className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
137
+ children: [/* @__PURE__ */ u("div", {
138
+ ref: i,
139
+ "aria-hidden": !0,
140
+ style: { display: "none" }
141
+ }), t]
142
+ }),
143
+ /* @__PURE__ */ u(O, {}),
144
+ /* @__PURE__ */ u(_.Corner, {})
145
+ ]
146
+ });
147
+ }
148
+ function O({ className: e, orientation: t = "vertical", ...n }) {
149
+ return /* @__PURE__ */ u(_.ScrollAreaScrollbar, {
150
+ "data-slot": "scroll-area-scrollbar",
151
+ orientation: t,
152
+ className: a("flex touch-none p-px transition-colors select-none", t === "vertical" && "h-full w-2.5 border-l border-l-transparent", t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", e),
153
+ ...n,
154
+ children: /* @__PURE__ */ u(_.ScrollAreaThumb, {
155
+ "data-slot": "scroll-area-thumb",
156
+ className: "bg-border relative flex-1 rounded-sm"
157
+ })
158
+ });
159
+ }
160
+ //#endregion
161
+ //#region src/components/label/index.tsx
162
+ function xe({ className: e, ...t }) {
163
+ return /* @__PURE__ */ u(re.Root, {
164
+ "data-slot": "label",
165
+ className: a("flex items-center gap-2 text-sm leading-none font-normal select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", e),
166
+ ...t
167
+ });
168
+ }
169
+ //#endregion
170
+ //#region src/components/select/index.tsx
171
+ function Se({ ...e }) {
172
+ return /* @__PURE__ */ u(v.Root, {
173
+ "data-slot": "select",
174
+ ...e
175
+ });
176
+ }
177
+ function Ce({ ...e }) {
178
+ return /* @__PURE__ */ u(v.Group, {
179
+ "data-slot": "select-group",
180
+ ...e
181
+ });
182
+ }
183
+ function k({ ...e }) {
184
+ return /* @__PURE__ */ u(v.Value, {
185
+ "data-slot": "select-value",
186
+ ...e
187
+ });
188
+ }
189
+ function A({ className: e, size: t = "default", children: n, ...r }) {
190
+ return /* @__PURE__ */ d(v.Trigger, {
191
+ "data-slot": "select-trigger",
192
+ "data-size": t,
193
+ className: a("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-card px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
194
+ ...r,
195
+ children: [n, /* @__PURE__ */ u(v.Icon, {
196
+ asChild: !0,
197
+ children: /* @__PURE__ */ u(m, { className: "size-4 opacity-50" })
198
+ })]
199
+ });
200
+ }
201
+ function we({ className: e, children: t, position: n = "popper", ...r }) {
202
+ return /* @__PURE__ */ u(v.Portal, { children: /* @__PURE__ */ d(v.Content, {
203
+ "data-slot": "select-content",
204
+ className: a("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md", n === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", e),
205
+ position: n,
206
+ ...r,
207
+ children: [
208
+ /* @__PURE__ */ u(j, {}),
209
+ /* @__PURE__ */ u(v.Viewport, {
210
+ className: a("p-1", n === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),
211
+ children: t
212
+ }),
213
+ /* @__PURE__ */ u(M, {})
214
+ ]
215
+ }) });
216
+ }
217
+ function Te({ className: e, ...t }) {
218
+ return /* @__PURE__ */ u(v.Label, {
219
+ "data-slot": "select-label",
220
+ className: a("text-muted-foreground px-2 py-1.5 text-xs", e),
221
+ ...t
222
+ });
223
+ }
224
+ function Ee({ className: e, children: t, ...n }) {
225
+ return /* @__PURE__ */ d(v.Item, {
226
+ "data-slot": "select-item",
227
+ className: a("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", e),
228
+ ...n,
229
+ children: [/* @__PURE__ */ u("span", {
230
+ className: "absolute right-2 flex size-3.5 items-center justify-center",
231
+ children: /* @__PURE__ */ u(v.ItemIndicator, { children: /* @__PURE__ */ u(f, { className: "size-4" }) })
232
+ }), /* @__PURE__ */ u(v.ItemText, { children: t })]
233
+ });
234
+ }
235
+ function De({ className: e, ...t }) {
236
+ return /* @__PURE__ */ u(v.Separator, {
237
+ "data-slot": "select-separator",
238
+ className: a("bg-border pointer-events-none -mx-1 my-1 h-px", e),
239
+ ...t
240
+ });
241
+ }
242
+ function j({ className: e, ...t }) {
243
+ return /* @__PURE__ */ u(v.ScrollUpButton, {
244
+ "data-slot": "select-scroll-up-button",
245
+ className: a("flex cursor-default items-center justify-center py-1", e),
246
+ ...t,
247
+ children: /* @__PURE__ */ u(h, { className: "size-4" })
248
+ });
249
+ }
250
+ function M({ className: e, ...t }) {
251
+ return /* @__PURE__ */ u(v.ScrollDownButton, {
252
+ "data-slot": "select-scroll-down-button",
253
+ className: a("flex cursor-default items-center justify-center py-1", e),
254
+ ...t,
255
+ children: /* @__PURE__ */ u(m, { className: "size-4" })
256
+ });
257
+ }
258
+ //#endregion
259
+ //#region src/components/badge/index.tsx
260
+ var N = ae("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", {
261
+ variants: { variant: {
262
+ default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
263
+ secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
264
+ destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
265
+ outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
266
+ } },
267
+ defaultVariants: { variant: "default" }
268
+ });
269
+ function Oe({ className: e, variant: t, asChild: n = !1, ...r }) {
270
+ return /* @__PURE__ */ u(n ? ie : "span", {
271
+ "data-slot": "badge",
272
+ className: a(N({ variant: t }), e),
273
+ ...r
274
+ });
275
+ }
276
+ //#endregion
277
+ //#region src/components/popover/index.tsx
278
+ function P({ ...e }) {
279
+ return /* @__PURE__ */ u(y.Root, {
280
+ "data-slot": "popover",
281
+ ...e
282
+ });
283
+ }
284
+ function F({ ...e }) {
285
+ return /* @__PURE__ */ u(y.Trigger, {
286
+ "data-slot": "popover-trigger",
287
+ ...e
288
+ });
289
+ }
290
+ function I({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
291
+ return /* @__PURE__ */ u(y.Portal, { children: /* @__PURE__ */ u(y.Content, {
292
+ "data-slot": "popover-content",
293
+ align: t,
294
+ sideOffset: n,
295
+ className: a("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", e),
296
+ ...r
297
+ }) });
298
+ }
299
+ function ke({ ...e }) {
300
+ return /* @__PURE__ */ u(y.Anchor, {
301
+ "data-slot": "popover-anchor",
302
+ ...e
303
+ });
304
+ }
305
+ //#endregion
306
+ //#region src/components/drawer/index.tsx
307
+ function L({ ...e }) {
308
+ return /* @__PURE__ */ u(b.Root, {
309
+ "data-slot": "drawer",
310
+ ...e
311
+ });
312
+ }
313
+ function R({ ...e }) {
314
+ return /* @__PURE__ */ u(b.Trigger, {
315
+ "data-slot": "drawer-trigger",
316
+ ...e
317
+ });
318
+ }
319
+ function z({ ...e }) {
320
+ return /* @__PURE__ */ u(b.Portal, {
321
+ "data-slot": "drawer-portal",
322
+ ...e
323
+ });
324
+ }
325
+ function Ae({ ...e }) {
326
+ return /* @__PURE__ */ u(b.Close, {
327
+ "data-slot": "drawer-close",
328
+ ...e
329
+ });
330
+ }
331
+ function B({ className: e, ...t }) {
332
+ return /* @__PURE__ */ u(b.Overlay, {
333
+ "data-slot": "drawer-overlay",
334
+ className: a("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", e),
335
+ ...t
336
+ });
337
+ }
338
+ function V({ className: e, children: t, ...n }) {
339
+ return /* @__PURE__ */ d(z, {
340
+ "data-slot": "drawer-portal",
341
+ children: [/* @__PURE__ */ u(B, {}), /* @__PURE__ */ d(b.Content, {
342
+ "data-slot": "drawer-content",
343
+ className: a("group/drawer-content bg-background fixed z-50 flex h-auto flex-col", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm", e),
344
+ ...n,
345
+ children: [/* @__PURE__ */ u("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }), t]
346
+ })]
347
+ });
348
+ }
349
+ function H({ className: e, ...t }) {
350
+ return /* @__PURE__ */ u("div", {
351
+ "data-slot": "drawer-header",
352
+ className: a("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left", e),
353
+ ...t
354
+ });
355
+ }
356
+ function je({ className: e, ...t }) {
357
+ return /* @__PURE__ */ u("div", {
358
+ "data-slot": "drawer-footer",
359
+ className: a("mt-auto flex flex-col gap-2 p-4", e),
360
+ ...t
361
+ });
362
+ }
363
+ function U({ className: e, ...t }) {
364
+ return /* @__PURE__ */ u(b.Title, {
365
+ "data-slot": "drawer-title",
366
+ className: a("text-foreground font-semibold", e),
367
+ ...t
368
+ });
369
+ }
370
+ function Me({ className: e, ...t }) {
371
+ return /* @__PURE__ */ u(b.Description, {
372
+ "data-slot": "drawer-description",
373
+ className: a("text-muted-foreground text-sm", e),
374
+ ...t
375
+ });
376
+ }
377
+ //#endregion
378
+ //#region src/components/slider/index.tsx
379
+ function Ne({ className: e, defaultValue: t, value: n, min: r = 0, max: i = 100, ...s }) {
380
+ let c = o.useMemo(() => Array.isArray(n) ? n : Array.isArray(t) ? t : [r, i], [
381
+ n,
382
+ t,
383
+ r,
384
+ i
385
+ ]);
386
+ return /* @__PURE__ */ d(x.Root, {
387
+ "data-slot": "slider",
388
+ defaultValue: t,
389
+ value: n,
390
+ min: r,
391
+ max: i,
392
+ className: a("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", e),
393
+ ...s,
394
+ children: [/* @__PURE__ */ u(x.Track, {
395
+ "data-slot": "slider-track",
396
+ className: a("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),
397
+ children: /* @__PURE__ */ u(x.Range, {
398
+ "data-slot": "slider-range",
399
+ className: a("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")
400
+ })
401
+ }), Array.from({ length: c.length }, (e, t) => /* @__PURE__ */ u(x.Thumb, {
402
+ "data-slot": "slider-thumb",
403
+ className: "border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
404
+ }, t))]
405
+ });
406
+ }
407
+ //#endregion
408
+ //#region src/components/status_message/index.tsx
409
+ var W = {
410
+ rose: {
411
+ border: "border-status-card-border-error",
412
+ background: "bg-status-card-background-error",
413
+ backgroundCardIcon: "bg-status-card-background-icon-error",
414
+ textPrimary: "text-status-card-foreground-error",
415
+ textSecondary: "text-status-card-foreground-error opacity-60"
416
+ },
417
+ white: {
418
+ border: "border-status-card-border-empty",
419
+ background: "bg-status-card-background-empty",
420
+ backgroundCardIcon: "bg-status-card-background-icon-empty",
421
+ textPrimary: "text-status-card-foreground-empty",
422
+ textSecondary: "text-status-card-foreground-emtpy opacity-60"
423
+ }
424
+ }, Pe = ({ title: e, description: t, color: n = "rose", icon: r, size: i = "md", classNameCard: o, classNameDescription: s, classNameIconCard: c, classNameTitle: l }) => /* @__PURE__ */ d("div", {
425
+ className: a(" rounded-md flex items-center flex-wrap border", i === "sm" ? "p-4 gap-2" : "p-6 gap-4", o, W[n].background, W[n].border),
426
+ children: [r && /* @__PURE__ */ u("div", {
427
+ className: a("rounded-md flex items-center justify-center ", i === "sm" ? "size-8" : "size-12", c, W[n].backgroundCardIcon),
428
+ children: /* @__PURE__ */ u(r, { className: a(W[n].textPrimary, i === "sm" ? "size-4" : "size-6") })
429
+ }), /* @__PURE__ */ d("div", {
430
+ className: a("flex flex-col"),
431
+ children: [/* @__PURE__ */ u("h2", {
432
+ className: a("font-normal", i === "sm" ? "text-sm" : "text-base", W[n].textPrimary, l),
433
+ children: e
434
+ }), /* @__PURE__ */ u("p", {
435
+ className: a(i === "sm" ? "text-sm" : "text-sm max-w-md", W[n].textSecondary, s),
436
+ children: t
437
+ })]
438
+ })]
439
+ });
440
+ //#endregion
441
+ //#region src/components/tabs/index.tsx
442
+ function Fe({ className: e, ...t }) {
443
+ return /* @__PURE__ */ u(S.Root, {
444
+ "data-slot": "tabs",
445
+ className: a("flex flex-col gap-2", e),
446
+ ...t
447
+ });
448
+ }
449
+ function Ie({ className: e, ...t }) {
450
+ return /* @__PURE__ */ u(S.List, {
451
+ "data-slot": "tabs-list",
452
+ className: a("bg-muted text-muted-foreground inline-flex h-8 w-fit items-center justify-center rounded-md p-[3px]", e),
453
+ ...t
454
+ });
455
+ }
456
+ function Le({ className: e, ...t }) {
457
+ return /* @__PURE__ */ u(S.Trigger, {
458
+ "data-slot": "tabs-trigger",
459
+ className: a("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
460
+ ...t
461
+ });
462
+ }
463
+ function Re({ className: e, ...t }) {
464
+ return /* @__PURE__ */ u(S.Content, {
465
+ "data-slot": "tabs-content",
466
+ className: a("flex-1 outline-none", e),
467
+ ...t
468
+ });
469
+ }
470
+ //#endregion
471
+ //#region src/components/text_area/index.tsx
472
+ function ze({ className: e, ...t }) {
473
+ return /* @__PURE__ */ u("textarea", {
474
+ "data-slot": "textarea",
475
+ className: a("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-card px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", e),
476
+ ...t
477
+ });
478
+ }
479
+ //#endregion
480
+ //#region src/components/rich_text_editor/toolbars/mobile_toolbar_group/index.tsx
481
+ var G = ({ label: t, children: n, className: r }) => {
482
+ let [i, o] = l(!1), c = () => o(!1);
483
+ return /* @__PURE__ */ d(L, {
484
+ open: i,
485
+ onOpenChange: o,
486
+ children: [/* @__PURE__ */ u(R, {
487
+ asChild: !0,
488
+ children: /* @__PURE__ */ d(e, {
489
+ variant: "ghost",
490
+ size: "sm",
491
+ className: a("h-8 w-max gap-1 px-3 font-normal", r),
492
+ children: [t, /* @__PURE__ */ u(p, { className: "h-4 w-4" })]
493
+ })
494
+ }), /* @__PURE__ */ d(V, { children: [/* @__PURE__ */ u(H, { children: /* @__PURE__ */ u(U, {
495
+ className: "text-start",
496
+ children: t
497
+ }) }), /* @__PURE__ */ u("div", {
498
+ className: "flex flex-col p-4",
499
+ children: s.Children.map(n, (e) => s.isValidElement(e) ? s.cloneElement(e, { closeDrawer: c }) : e)
500
+ })] })]
501
+ });
502
+ }, K = ({ children: e, active: t, onClick: n, closeDrawer: r, ...i }) => /* @__PURE__ */ u("button", {
503
+ className: a("flex w-full items-center rounded-md px-4 py-2 text-sm transition-colors hover:bg-accent", t && "bg-accent"),
504
+ onClick: (e) => {
505
+ n?.(e), setTimeout(() => {
506
+ r?.();
507
+ }, 100);
508
+ },
509
+ ...i,
510
+ children: e
511
+ }), q = s.createContext(null), J = () => {
512
+ let e = s.useContext(q);
513
+ if (!e) throw Error("useToolbar must be used within a ToolbarProvider");
514
+ return e;
515
+ }, Be = ({ editor: e, children: t }) => {
516
+ let [, n] = s.useReducer((e) => e + 1, 0);
517
+ return s.useEffect(() => {
518
+ if (!e) return;
519
+ let t = () => n();
520
+ return e.on("transaction", t), () => {
521
+ e.off("transaction", t);
522
+ };
523
+ }, [e]), /* @__PURE__ */ u(q.Provider, {
524
+ value: { editor: e },
525
+ children: t
526
+ });
527
+ }, Y = [
528
+ {
529
+ name: "Predeterminado",
530
+ color: "var(--editor-text-default)"
531
+ },
532
+ {
533
+ name: "Gris",
534
+ color: "var(--editor-text-gray)"
535
+ },
536
+ {
537
+ name: "Marrón",
538
+ color: "var(--editor-text-brown)"
539
+ },
540
+ {
541
+ name: "Naranja",
542
+ color: "var(--editor-text-orange)"
543
+ },
544
+ {
545
+ name: "Amarillo",
546
+ color: "var(--editor-text-yellow)"
547
+ },
548
+ {
549
+ name: "Verde",
550
+ color: "var(--editor-text-green)"
551
+ },
552
+ {
553
+ name: "Azul",
554
+ color: "var(--editor-text-blue)"
555
+ },
556
+ {
557
+ name: "Púrpura",
558
+ color: "var(--editor-text-purple)"
559
+ },
560
+ {
561
+ name: "Rosa",
562
+ color: "var(--editor-text-pink)"
563
+ },
564
+ {
565
+ name: "Rojo",
566
+ color: "var(--editor-text-red)"
567
+ }
568
+ ], X = [
569
+ {
570
+ name: "Predeterminado",
571
+ color: "var(--editor-highlight-default)"
572
+ },
573
+ {
574
+ name: "Gris",
575
+ color: "var(--editor-highlight-gray)"
576
+ },
577
+ {
578
+ name: "Marrón",
579
+ color: "var(--editor-highlight-brown)"
580
+ },
581
+ {
582
+ name: "Naranja",
583
+ color: "var(--editor-highlight-orange)"
584
+ },
585
+ {
586
+ name: "Amarillo",
587
+ color: "var(--editor-highlight-yellow)"
588
+ },
589
+ {
590
+ name: "Verde",
591
+ color: "var(--editor-highlight-green)"
592
+ },
593
+ {
594
+ name: "Azul",
595
+ color: "var(--editor-highlight-blue)"
596
+ },
597
+ {
598
+ name: "Púrpura",
599
+ color: "var(--editor-highlight-purple)"
600
+ },
601
+ {
602
+ name: "Rosa",
603
+ color: "var(--editor-highlight-pink)"
604
+ },
605
+ {
606
+ name: "Rojo",
607
+ color: "var(--editor-highlight-red)"
608
+ }
609
+ ], Z = ({ name: e, color: t, isActive: n, onClick: r, isHighlight: i }) => /* @__PURE__ */ d("button", {
610
+ onClick: r,
611
+ className: "flex w-full items-center justify-between rounded-sm px-2 py-1 text-sm hover:bg-muted cursor-pointer",
612
+ type: "button",
613
+ children: [/* @__PURE__ */ d("div", {
614
+ className: "flex items-center space-x-2 ",
615
+ children: [/* @__PURE__ */ u("div", {
616
+ className: "rounded-sm border size-5 font-medium",
617
+ style: i ? { backgroundColor: t } : { color: t },
618
+ children: "A"
619
+ }), /* @__PURE__ */ u("span", { children: e })]
620
+ }), n && /* @__PURE__ */ u(f, { className: "h-4 w-4" })]
621
+ }), Ve = () => {
622
+ let { editor: o } = J(), s = w("(max-width: 640px)"), c = o?.getAttributes("textStyle").color, l = o?.getAttributes("highlight").color, f = (e) => {
623
+ o?.chain().focus().setColor(e === c ? "" : e).run();
624
+ }, p = (e) => {
625
+ o?.chain().focus().setHighlight(e === l ? { color: "" } : { color: e }).run();
626
+ }, h = !o?.can().chain().setHighlight().run() || !o?.can().chain().setColor("").run();
627
+ return s ? /* @__PURE__ */ d("div", {
628
+ className: "flex gap-1",
629
+ children: [/* @__PURE__ */ u(G, {
630
+ label: "Color",
631
+ children: Y.map(({ name: e, color: t }) => /* @__PURE__ */ u(K, {
632
+ onClick: () => f(t),
633
+ active: c === t,
634
+ children: /* @__PURE__ */ d("div", {
635
+ className: "flex items-center gap-2",
636
+ children: [/* @__PURE__ */ u("div", {
637
+ className: "rounded-sm border px-2",
638
+ style: { color: t },
639
+ children: "A"
640
+ }), /* @__PURE__ */ u("span", { children: e })]
641
+ })
642
+ }, e))
643
+ }), /* @__PURE__ */ u(G, {
644
+ label: "Resaltado",
645
+ children: X.map(({ name: e, color: t }) => /* @__PURE__ */ u(K, {
646
+ onClick: () => p(t),
647
+ active: l === t,
648
+ children: /* @__PURE__ */ d("div", {
649
+ className: "flex items-center gap-2",
650
+ children: [/* @__PURE__ */ u("div", {
651
+ className: "rounded-sm border px-2",
652
+ style: { backgroundColor: t },
653
+ children: "A"
654
+ }), /* @__PURE__ */ u("span", { children: e })]
655
+ })
656
+ }, e))
657
+ })]
658
+ }) : /* @__PURE__ */ u(P, { children: /* @__PURE__ */ d("div", {
659
+ className: "relative h-full",
660
+ children: [/* @__PURE__ */ d(r, { children: [/* @__PURE__ */ u(t, {
661
+ asChild: !0,
662
+ children: /* @__PURE__ */ u(F, {
663
+ disabled: h,
664
+ asChild: !0,
665
+ children: /* @__PURE__ */ d(e, {
666
+ variant: "ghost",
667
+ size: "sm",
668
+ style: { color: c },
669
+ className: a("h-8 w-14 p-0 font-normal"),
670
+ children: [/* @__PURE__ */ u("span", {
671
+ className: "text-md",
672
+ children: "A"
673
+ }), /* @__PURE__ */ u(m, { className: "ml-2 h-4 w-4" })]
674
+ })
675
+ })
676
+ }), /* @__PURE__ */ u(i, { children: "Color de Texto y Resaltado" })] }), /* @__PURE__ */ u(I, {
677
+ align: "start",
678
+ className: "w-56 p-0! dark:bg-gray-2",
679
+ onWheel: (e) => e.stopPropagation(),
680
+ onTouchMove: (e) => e.stopPropagation(),
681
+ children: /* @__PURE__ */ d(D, {
682
+ className: "h-80 pb-2",
683
+ children: [
684
+ /* @__PURE__ */ u("div", {
685
+ className: "mb-1 mt-2 px-2 text-xs text-muted-foreground uppercase",
686
+ children: "Color"
687
+ }),
688
+ /* @__PURE__ */ u("div", {
689
+ className: "px-2",
690
+ children: Y.map(({ name: e, color: t }) => /* @__PURE__ */ u(Z, {
691
+ name: e,
692
+ color: t,
693
+ isActive: c === t,
694
+ onClick: () => f(t)
695
+ }, e))
696
+ }),
697
+ /* @__PURE__ */ u(n, { className: "my-3" }),
698
+ /* @__PURE__ */ u("div", {
699
+ className: "mb-1 w-full px-2 text-xs text-muted-foreground uppercase",
700
+ children: "Fondo (Resaltado)"
701
+ }),
702
+ /* @__PURE__ */ u("div", {
703
+ className: "px-2",
704
+ children: X.map(({ name: e, color: t }) => /* @__PURE__ */ u(Z, {
705
+ name: e,
706
+ color: t,
707
+ isActive: l === t,
708
+ onClick: () => p(t),
709
+ isHighlight: !0
710
+ }, e))
711
+ })
712
+ ]
713
+ })
714
+ })]
715
+ }) });
716
+ }, He = [
717
+ "10px",
718
+ "11px",
719
+ "12px",
720
+ "14px",
721
+ "16px",
722
+ "18px",
723
+ "20px",
724
+ "22px",
725
+ "24px",
726
+ "28px",
727
+ "32px",
728
+ "36px",
729
+ "40px",
730
+ "48px",
731
+ "56px",
732
+ "64px",
733
+ "72px"
734
+ ], Q = s.forwardRef(({ className: n, onClick: o, children: s, ...c }, l) => {
735
+ let { editor: f } = J();
736
+ return /* @__PURE__ */ d(r, { children: [/* @__PURE__ */ u(t, {
737
+ asChild: !0,
738
+ children: /* @__PURE__ */ u(e, {
739
+ variant: "ghost",
740
+ size: "icon",
741
+ className: a("size-7", f?.isActive("italic") && "bg-accent", n),
742
+ onClick: (e) => {
743
+ f?.chain().focus().toggleItalic().run(), o?.(e);
744
+ },
745
+ disabled: !f?.can().toggleItalic(),
746
+ ref: l,
747
+ ...c,
748
+ children: s ?? /* @__PURE__ */ u(ee, { className: "h-4 w-4" })
749
+ })
750
+ }), /* @__PURE__ */ u(i, { children: /* @__PURE__ */ u("span", { children: "Cursiva" }) })] });
751
+ });
752
+ Q.displayName = "ItalicToolbar";
753
+ //#endregion
754
+ //#region src/components/rich_text_editor/toolbars/underline/index.tsx
755
+ var $ = s.forwardRef(({ className: n, onClick: o, children: s, ...c }, l) => {
756
+ let { editor: f } = J();
757
+ return /* @__PURE__ */ d(r, { children: [/* @__PURE__ */ u(t, {
758
+ asChild: !0,
759
+ children: /* @__PURE__ */ u(e, {
760
+ variant: "ghost",
761
+ size: "icon",
762
+ className: a("size-7", f?.isActive("underline") && "bg-accent", n),
763
+ onClick: (e) => {
764
+ f?.chain().focus().toggleUnderline().run(), o?.(e);
765
+ },
766
+ disabled: !f?.can().toggleUnderline(),
767
+ ref: l,
768
+ ...c,
769
+ children: s ?? /* @__PURE__ */ u(te, { className: "h-4 w-4" })
770
+ })
771
+ }), /* @__PURE__ */ u(i, { children: /* @__PURE__ */ u("span", { children: "Subrayado" }) })] });
772
+ });
773
+ $.displayName = "UnderlineToolbar";
774
+ //#endregion
775
+ //#region src/components/rich_text_editor/lib/annotation_editor_extensions.ts
776
+ function Ue(e = "Escribe aquí…") {
777
+ return [
778
+ de.configure({
779
+ heading: !1,
780
+ blockquote: !1,
781
+ horizontalRule: !1,
782
+ codeBlock: !1,
783
+ code: !1,
784
+ strike: !1,
785
+ link: !1,
786
+ underline: !1
787
+ }),
788
+ fe.configure({
789
+ placeholder: e,
790
+ emptyNodeClass: "is-editor-empty",
791
+ includeChildren: !1
792
+ }),
793
+ le,
794
+ C,
795
+ ce,
796
+ ue,
797
+ oe,
798
+ se.configure({ multicolor: !0 })
799
+ ];
800
+ }
801
+ //#endregion
802
+ export { T as $, F as A, De as B, B as C, P as D, R as E, Ce as F, O as G, k as H, Ee as I, ge as J, pe as K, Te as L, N as M, Se as N, ke as O, we as P, E as Q, M as R, H as S, U as T, xe as U, A as V, D as W, ve as X, be as Y, _e as Z, L as _, Ve as a, Me as b, G as c, Fe as d, ye as et, Re as f, Ne as g, Pe as h, He as i, Oe as j, I as k, K as l, Le as m, $ as n, w as nt, Be as o, Ie as p, he as q, Q as r, J as s, Ue as t, me as tt, ze as u, Ae as v, z as w, je as x, V as y, j as z };
803
+
804
+ //# sourceMappingURL=annotation_editor_extensions-OCgySol8.js.map