framepexls-ui-lib 2.2.7 → 2.2.11

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 (50) hide show
  1. package/dist/AccessibilityFab.js +2 -0
  2. package/dist/AccessibilityFab.mjs +2 -0
  3. package/dist/AvatarSquare.d.mts +4 -1
  4. package/dist/AvatarSquare.d.ts +4 -1
  5. package/dist/AvatarSquare.js +7 -1
  6. package/dist/AvatarSquare.mjs +7 -1
  7. package/dist/Checkbox.js +2 -2
  8. package/dist/Checkbox.mjs +2 -2
  9. package/dist/ComboSelect.js +4 -3
  10. package/dist/ComboSelect.mjs +4 -3
  11. package/dist/DateTimeField.js +3 -2
  12. package/dist/DateTimeField.mjs +3 -2
  13. package/dist/Dropdown.js +3 -0
  14. package/dist/Dropdown.mjs +3 -0
  15. package/dist/HeliipLoader.js +77 -5
  16. package/dist/HeliipLoader.mjs +77 -5
  17. package/dist/MarkdownEditor.d.mts +71 -3
  18. package/dist/MarkdownEditor.d.ts +71 -3
  19. package/dist/MarkdownEditor.js +2370 -65
  20. package/dist/MarkdownEditor.mjs +2388 -66
  21. package/dist/MediaSelector.d.mts +4 -1
  22. package/dist/MediaSelector.d.ts +4 -1
  23. package/dist/MediaSelector.js +134 -23
  24. package/dist/MediaSelector.mjs +135 -24
  25. package/dist/Select.js +2 -0
  26. package/dist/Select.mjs +2 -0
  27. package/dist/Sidebar.d.mts +2 -1
  28. package/dist/Sidebar.d.ts +2 -1
  29. package/dist/Sidebar.js +82 -19
  30. package/dist/Sidebar.mjs +82 -19
  31. package/dist/SupportChatWidget.js +88 -42
  32. package/dist/SupportChatWidget.mjs +89 -42
  33. package/dist/TimePanel.js +2 -1
  34. package/dist/TimePanel.mjs +2 -1
  35. package/dist/TimePopover.js +4 -3
  36. package/dist/TimePopover.mjs +4 -3
  37. package/dist/TimeRangeField.js +3 -2
  38. package/dist/TimeRangeField.mjs +3 -2
  39. package/dist/UploadCard.js +7 -7
  40. package/dist/UploadCard.mjs +7 -7
  41. package/dist/index.d.mts +1 -1
  42. package/dist/index.d.ts +1 -1
  43. package/dist/index.js +4 -0
  44. package/dist/index.mjs +3 -1
  45. package/dist/theme/FontSizeController.js +1 -1
  46. package/dist/theme/FontSizeController.mjs +1 -1
  47. package/dist/theme/ThemeController.js +2 -1
  48. package/dist/theme/ThemeController.mjs +2 -1
  49. package/dist/theme.css +47 -0
  50. package/package.json +8 -8
@@ -78,6 +78,8 @@ function AccessibilityFab({
78
78
  const path = typeof event.composedPath === "function" ? event.composedPath() : [];
79
79
  if (popRef.current && path.includes(popRef.current)) return;
80
80
  if (btnRef.current && path.includes(btnRef.current)) return;
81
+ const target = event.target;
82
+ if (target == null ? void 0 : target.closest("[data-fx-keep-open], [data-fx-overlay]")) return;
81
83
  setOpen(false);
82
84
  };
83
85
  window.addEventListener("keydown", onKeyDown);
@@ -51,6 +51,8 @@ function AccessibilityFab({
51
51
  const path = typeof event.composedPath === "function" ? event.composedPath() : [];
52
52
  if (popRef.current && path.includes(popRef.current)) return;
53
53
  if (btnRef.current && path.includes(btnRef.current)) return;
54
+ const target = event.target;
55
+ if (target == null ? void 0 : target.closest("[data-fx-keep-open], [data-fx-overlay]")) return;
54
56
  setOpen(false);
55
57
  };
56
58
  window.addEventListener("keydown", onKeyDown);
@@ -6,10 +6,13 @@ type Props = {
6
6
  alt?: string;
7
7
  initials?: string | null;
8
8
  imageFit?: "cover" | "contain";
9
+ imageFetchPriority?: "auto" | "high" | "low";
10
+ imageLoading?: "eager" | "lazy";
11
+ imagePreload?: boolean;
9
12
  className?: string;
10
13
  radiusClass?: string;
11
14
  color?: "accent" | "slate" | "gray" | "zinc" | "neutral" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
12
15
  };
13
- declare function AvatarSquare({ size, src, alt, initials, imageFit, className, radiusClass, color, }: Props): React__default.JSX.Element;
16
+ declare function AvatarSquare({ size, src, alt, initials, imageFit, imageFetchPriority, imageLoading, imagePreload, className, radiusClass, color, }: Props): React__default.JSX.Element;
14
17
 
15
18
  export { AvatarSquare as default };
@@ -6,10 +6,13 @@ type Props = {
6
6
  alt?: string;
7
7
  initials?: string | null;
8
8
  imageFit?: "cover" | "contain";
9
+ imageFetchPriority?: "auto" | "high" | "low";
10
+ imageLoading?: "eager" | "lazy";
11
+ imagePreload?: boolean;
9
12
  className?: string;
10
13
  radiusClass?: string;
11
14
  color?: "accent" | "slate" | "gray" | "zinc" | "neutral" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
12
15
  };
13
- declare function AvatarSquare({ size, src, alt, initials, imageFit, className, radiusClass, color, }: Props): React__default.JSX.Element;
16
+ declare function AvatarSquare({ size, src, alt, initials, imageFit, imageFetchPriority, imageLoading, imagePreload, className, radiusClass, color, }: Props): React__default.JSX.Element;
14
17
 
15
18
  export { AvatarSquare as default };
@@ -42,12 +42,16 @@ function AvatarSquare({
42
42
  alt = "",
43
43
  initials = null,
44
44
  imageFit = "cover",
45
+ imageFetchPriority,
46
+ imageLoading = "lazy",
47
+ imagePreload = false,
45
48
  className = "",
46
49
  radiusClass = "rounded-xl",
47
50
  color = "accent"
48
51
  }) {
49
52
  const [error, setError] = import_react.default.useState(false);
50
53
  const showImg = !!src && !error;
54
+ const resolvedImageLoading = imagePreload && imageLoading === "lazy" ? "eager" : imageLoading;
51
55
  const boxStyle = { width: size, height: size };
52
56
  const RING = {
53
57
  accent: "ring-[color-mix(in_oklab,var(--ring)_30%,transparent)] dark:ring-[color-mix(in_oklab,var(--ring)_22%,transparent)]",
@@ -118,7 +122,9 @@ function AvatarSquare({
118
122
  fill: true,
119
123
  className: imageFit === "contain" ? "object-contain" : "object-cover",
120
124
  sizes: `${size}px`,
121
- priority: false,
125
+ fetchPriority: imageFetchPriority,
126
+ loading: resolvedImageLoading,
127
+ preload: imagePreload,
122
128
  onError: () => setError(true),
123
129
  draggable: false
124
130
  }
@@ -9,12 +9,16 @@ function AvatarSquare({
9
9
  alt = "",
10
10
  initials = null,
11
11
  imageFit = "cover",
12
+ imageFetchPriority,
13
+ imageLoading = "lazy",
14
+ imagePreload = false,
12
15
  className = "",
13
16
  radiusClass = "rounded-xl",
14
17
  color = "accent"
15
18
  }) {
16
19
  const [error, setError] = React.useState(false);
17
20
  const showImg = !!src && !error;
21
+ const resolvedImageLoading = imagePreload && imageLoading === "lazy" ? "eager" : imageLoading;
18
22
  const boxStyle = { width: size, height: size };
19
23
  const RING = {
20
24
  accent: "ring-[color-mix(in_oklab,var(--ring)_30%,transparent)] dark:ring-[color-mix(in_oklab,var(--ring)_22%,transparent)]",
@@ -85,7 +89,9 @@ function AvatarSquare({
85
89
  fill: true,
86
90
  className: imageFit === "contain" ? "object-contain" : "object-cover",
87
91
  sizes: `${size}px`,
88
- priority: false,
92
+ fetchPriority: imageFetchPriority,
93
+ loading: resolvedImageLoading,
94
+ preload: imagePreload,
89
95
  onError: () => setError(true),
90
96
  draggable: false
91
97
  }
package/dist/Checkbox.js CHANGED
@@ -39,7 +39,7 @@ var import_Input = __toESM(require("./Input"));
39
39
  function cx(...a) {
40
40
  return a.filter(Boolean).join(" ");
41
41
  }
42
- const baseInput = "appearance-none grid place-items-center rounded border border-slate-300 bg-white shadow-sm outline-none focus:ring-1 focus:ring-inset checked:bg-[var(--primary)] checked:border-[var(--primary)] disabled:opacity-60 disabled:cursor-not-allowed dark:border-white/10 dark:bg-[var(--fx-surface)]";
42
+ const baseInput = "appearance-none grid place-items-center rounded border border-slate-300 bg-white shadow-sm outline-none transition-colors checked:border-[var(--primary)] checked:bg-[var(--primary)] checked:shadow-none disabled:cursor-not-allowed disabled:opacity-60 dark:border-white/10 dark:bg-[var(--fx-surface)]";
43
43
  const sizeMap = {
44
44
  sm: "h-4 w-4",
45
45
  md: "h-5 w-5",
@@ -101,7 +101,7 @@ const Checkbox = import_react.default.forwardRef(
101
101
  className: cx(
102
102
  baseInput,
103
103
  sizeMap[size],
104
- (error || tone === "danger") && "border-[color-mix(in_oklab,var(--danger)_40%,transparent)] focus:[--tw-ring-color:color-mix(in_oklab,var(--danger-ring)_35%,transparent)]",
104
+ (error || tone === "danger") && "border-[color-mix(in_oklab,var(--danger)_40%,transparent)] checked:border-[var(--danger)] checked:bg-[var(--danger)]",
105
105
  inputClassName
106
106
  ),
107
107
  onChange: (e) => {
package/dist/Checkbox.mjs CHANGED
@@ -6,7 +6,7 @@ import Input from "./Input.mjs";
6
6
  function cx(...a) {
7
7
  return a.filter(Boolean).join(" ");
8
8
  }
9
- const baseInput = "appearance-none grid place-items-center rounded border border-slate-300 bg-white shadow-sm outline-none focus:ring-1 focus:ring-inset checked:bg-[var(--primary)] checked:border-[var(--primary)] disabled:opacity-60 disabled:cursor-not-allowed dark:border-white/10 dark:bg-[var(--fx-surface)]";
9
+ const baseInput = "appearance-none grid place-items-center rounded border border-slate-300 bg-white shadow-sm outline-none transition-colors checked:border-[var(--primary)] checked:bg-[var(--primary)] checked:shadow-none disabled:cursor-not-allowed disabled:opacity-60 dark:border-white/10 dark:bg-[var(--fx-surface)]";
10
10
  const sizeMap = {
11
11
  sm: "h-4 w-4",
12
12
  md: "h-5 w-5",
@@ -68,7 +68,7 @@ const Checkbox = React.forwardRef(
68
68
  className: cx(
69
69
  baseInput,
70
70
  sizeMap[size],
71
- (error || tone === "danger") && "border-[color-mix(in_oklab,var(--danger)_40%,transparent)] focus:[--tw-ring-color:color-mix(in_oklab,var(--danger-ring)_35%,transparent)]",
71
+ (error || tone === "danger") && "border-[color-mix(in_oklab,var(--danger)_40%,transparent)] checked:border-[var(--danger)] checked:bg-[var(--danger)]",
72
72
  inputClassName
73
73
  ),
74
74
  onChange: (e) => {
@@ -42,6 +42,7 @@ var import_framer_motion = require("framer-motion");
42
42
  var import_animations = require("./animations");
43
43
  var import_iconos = require("./iconos");
44
44
  const cx = (...a) => a.filter(Boolean).join(" ");
45
+ const PORTAL_OVERLAY_Z_INDEX = 2147483647;
45
46
  const controlShell = "relative w-full rounded-2xl border border-slate-200 bg-white text-sm text-slate-900 placeholder:text-slate-400 shadow-sm outline-none transition focus-within:ring-1 focus-within:border-[color-mix(in_oklab,var(--ring)_35%,var(--border))] disabled:opacity-60 disabled:cursor-not-allowed dark:border-[var(--border)] dark:bg-[var(--fx-surface)] dark:text-[var(--foreground)] dark:placeholder:text-[var(--muted)] dark:shadow-[0_0_0_1px_rgba(0,0,0,0.55)]";
46
47
  const isFocusableOrInteractive = (el) => {
47
48
  if (!el) return false;
@@ -248,8 +249,7 @@ function ComboSelect({
248
249
  left: r.left,
249
250
  width: r.width,
250
251
  maxHeight: maxH,
251
- // Keep above Dialog (3000) and other overlays.
252
- zIndex: 3600
252
+ zIndex: PORTAL_OVERLAY_Z_INDEX
253
253
  });
254
254
  }, []);
255
255
  import_react.default.useLayoutEffect(() => {
@@ -316,7 +316,7 @@ function ComboSelect({
316
316
  "div",
317
317
  {
318
318
  className: "fixed inset-0",
319
- style: { zIndex: 3599 },
319
+ style: { zIndex: PORTAL_OVERLAY_Z_INDEX - 1 },
320
320
  onMouseDown: () => {
321
321
  closeDropdown();
322
322
  },
@@ -331,6 +331,7 @@ function ComboSelect({
331
331
  ref: dropRef,
332
332
  role: "listbox",
333
333
  id: listId,
334
+ "data-fx-overlay": "combo-select",
334
335
  style: { ...dropStyle, willChange: "transform, opacity" },
335
336
  variants: import_animations.popOver,
336
337
  initial: "initial",
@@ -9,6 +9,7 @@ import { AnimatePresence, motion } from "framer-motion";
9
9
  import { popOver, menuTransition } from "./animations.mjs";
10
10
  import { CheckIcon, ChevronDownIcon, CloseIcon } from "./iconos/index.mjs";
11
11
  const cx = (...a) => a.filter(Boolean).join(" ");
12
+ const PORTAL_OVERLAY_Z_INDEX = 2147483647;
12
13
  const controlShell = "relative w-full rounded-2xl border border-slate-200 bg-white text-sm text-slate-900 placeholder:text-slate-400 shadow-sm outline-none transition focus-within:ring-1 focus-within:border-[color-mix(in_oklab,var(--ring)_35%,var(--border))] disabled:opacity-60 disabled:cursor-not-allowed dark:border-[var(--border)] dark:bg-[var(--fx-surface)] dark:text-[var(--foreground)] dark:placeholder:text-[var(--muted)] dark:shadow-[0_0_0_1px_rgba(0,0,0,0.55)]";
13
14
  const isFocusableOrInteractive = (el) => {
14
15
  if (!el) return false;
@@ -215,8 +216,7 @@ function ComboSelect({
215
216
  left: r.left,
216
217
  width: r.width,
217
218
  maxHeight: maxH,
218
- // Keep above Dialog (3000) and other overlays.
219
- zIndex: 3600
219
+ zIndex: PORTAL_OVERLAY_Z_INDEX
220
220
  });
221
221
  }, []);
222
222
  React.useLayoutEffect(() => {
@@ -283,7 +283,7 @@ function ComboSelect({
283
283
  "div",
284
284
  {
285
285
  className: "fixed inset-0",
286
- style: { zIndex: 3599 },
286
+ style: { zIndex: PORTAL_OVERLAY_Z_INDEX - 1 },
287
287
  onMouseDown: () => {
288
288
  closeDropdown();
289
289
  },
@@ -298,6 +298,7 @@ function ComboSelect({
298
298
  ref: dropRef,
299
299
  role: "listbox",
300
300
  id: listId,
301
+ "data-fx-overlay": "combo-select",
301
302
  style: { ...dropStyle, willChange: "transform, opacity" },
302
303
  variants: popOver,
303
304
  initial: "initial",
@@ -126,6 +126,7 @@ const formatDisplayValue = (value, mode) => {
126
126
  return fmtISODateTimeLocal(parsed);
127
127
  }
128
128
  };
129
+ const PORTAL_OVERLAY_Z_INDEX = 2147483647;
129
130
  function DateTimeField({
130
131
  type = "datetime-local",
131
132
  value,
@@ -190,7 +191,7 @@ function DateTimeField({
190
191
  left = Math.max(MARGIN, Math.min(left, window.innerWidth - (W + MARGIN)));
191
192
  let top = anchorRect.top - GAP - H;
192
193
  if (top < MARGIN) top = Math.max(MARGIN, anchorRect.bottom + GAP);
193
- return { position: "fixed", top, left, zIndex: 1e5 };
194
+ return { position: "fixed", top, left, zIndex: PORTAL_OVERLAY_Z_INDEX };
194
195
  })();
195
196
  const parsed = (0, import_react.useMemo)(() => value ? parseValueByType(value, type) : null, [value, type]);
196
197
  const [cursor, setCursor] = (0, import_react.useState)(() => parsed != null ? parsed : /* @__PURE__ */ new Date());
@@ -390,7 +391,7 @@ function DateTimeField({
390
391
  {
391
392
  unstyled: true,
392
393
  type: "button",
393
- className: "pointer-events-auto inline-flex h-7 w-7 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 hover:bg-slate-50 active:scale-95 dark:border-white/10 dark:bg-[var(--fx-surface)]",
394
+ className: "pointer-events-auto inline-flex h-7 w-7 items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--card)] text-[var(--muted)] transition hover:border-[color-mix(in_oklab,var(--primary)_36%,var(--border))] hover:bg-[color-mix(in_oklab,var(--primary)_8%,var(--card))] hover:text-[var(--foreground)] focus:outline-none focus-visible:ring-1 focus-visible:ring-[var(--primary)] active:scale-95",
394
395
  onClick: (e) => {
395
396
  e.preventDefault();
396
397
  openPopover();
@@ -93,6 +93,7 @@ const formatDisplayValue = (value, mode) => {
93
93
  return fmtISODateTimeLocal(parsed);
94
94
  }
95
95
  };
96
+ const PORTAL_OVERLAY_Z_INDEX = 2147483647;
96
97
  function DateTimeField({
97
98
  type = "datetime-local",
98
99
  value,
@@ -157,7 +158,7 @@ function DateTimeField({
157
158
  left = Math.max(MARGIN, Math.min(left, window.innerWidth - (W + MARGIN)));
158
159
  let top = anchorRect.top - GAP - H;
159
160
  if (top < MARGIN) top = Math.max(MARGIN, anchorRect.bottom + GAP);
160
- return { position: "fixed", top, left, zIndex: 1e5 };
161
+ return { position: "fixed", top, left, zIndex: PORTAL_OVERLAY_Z_INDEX };
161
162
  })();
162
163
  const parsed = useMemo(() => value ? parseValueByType(value, type) : null, [value, type]);
163
164
  const [cursor, setCursor] = useState(() => parsed != null ? parsed : /* @__PURE__ */ new Date());
@@ -357,7 +358,7 @@ function DateTimeField({
357
358
  {
358
359
  unstyled: true,
359
360
  type: "button",
360
- className: "pointer-events-auto inline-flex h-7 w-7 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 hover:bg-slate-50 active:scale-95 dark:border-white/10 dark:bg-[var(--fx-surface)]",
361
+ className: "pointer-events-auto inline-flex h-7 w-7 items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--card)] text-[var(--muted)] transition hover:border-[color-mix(in_oklab,var(--primary)_36%,var(--border))] hover:bg-[color-mix(in_oklab,var(--primary)_8%,var(--card))] hover:text-[var(--foreground)] focus:outline-none focus-visible:ring-1 focus-visible:ring-[var(--primary)] active:scale-95",
361
362
  onClick: (e) => {
362
363
  e.preventDefault();
363
364
  openPopover();
package/dist/Dropdown.js CHANGED
@@ -46,6 +46,7 @@ var import_framer_motion = require("framer-motion");
46
46
  var import_animations = require("./animations");
47
47
  var import_iconos = require("./iconos/index");
48
48
  var import_Button = __toESM(require("./Button"));
49
+ const PORTAL_OVERLAY_Z_INDEX = 2147483647;
49
50
  const DropdownCtx = (0, import_react.createContext)(null);
50
51
  const useDropdown = () => {
51
52
  const ctx = (0, import_react.useContext)(DropdownCtx);
@@ -289,6 +290,7 @@ function Content({
289
290
  "aria-labelledby": labelId,
290
291
  ref: menuRef,
291
292
  onKeyDown,
293
+ "data-fx-overlay": "dropdown",
292
294
  variants: import_animations.popOver,
293
295
  initial: "initial",
294
296
  animate: "animate",
@@ -300,6 +302,7 @@ function Content({
300
302
  left: pos.left,
301
303
  maxHeight: pos.maxH,
302
304
  maxWidth: "calc(100vw - 16px)",
305
+ zIndex: PORTAL_OVERLAY_Z_INDEX,
303
306
  willChange: "transform, opacity"
304
307
  },
305
308
  className: [
package/dist/Dropdown.mjs CHANGED
@@ -15,6 +15,7 @@ import { AnimatePresence, motion } from "framer-motion";
15
15
  import { popOver, menuTransition } from "./animations.mjs";
16
16
  import { MenuPuntosVerticalIcon } from "./iconos/index.mjs";
17
17
  import Button from "./Button.mjs";
18
+ const PORTAL_OVERLAY_Z_INDEX = 2147483647;
18
19
  const DropdownCtx = createContext(null);
19
20
  const useDropdown = () => {
20
21
  const ctx = useContext(DropdownCtx);
@@ -258,6 +259,7 @@ function Content({
258
259
  "aria-labelledby": labelId,
259
260
  ref: menuRef,
260
261
  onKeyDown,
262
+ "data-fx-overlay": "dropdown",
261
263
  variants: popOver,
262
264
  initial: "initial",
263
265
  animate: "animate",
@@ -269,6 +271,7 @@ function Content({
269
271
  left: pos.left,
270
272
  maxHeight: pos.maxH,
271
273
  maxWidth: "calc(100vw - 16px)",
274
+ zIndex: PORTAL_OVERLAY_Z_INDEX,
272
275
  willChange: "transform, opacity"
273
276
  },
274
277
  className: [
@@ -23,18 +23,89 @@ __export(HeliipLoader_exports, {
23
23
  });
24
24
  module.exports = __toCommonJS(HeliipLoader_exports);
25
25
  var import_jsx_runtime = require("react/jsx-runtime");
26
- var import_framer_motion = require("framer-motion");
27
- var import_iconos = require("./iconos");
28
26
  const cx = (...a) => a.filter(Boolean).join(" ");
27
+ const loaderStyles = `
28
+ @keyframes fx-loader-multi-shadow-spin {
29
+ 0% {
30
+ box-shadow:
31
+ 0 -0.83em 0 -0.4em,
32
+ 0 -0.83em 0 -0.42em,
33
+ 0 -0.83em 0 -0.44em,
34
+ 0 -0.83em 0 -0.46em,
35
+ 0 -0.83em 0 -0.477em;
36
+ }
37
+ 5%,
38
+ 95% {
39
+ box-shadow:
40
+ 0 -0.83em 0 -0.4em,
41
+ 0 -0.83em 0 -0.42em,
42
+ 0 -0.83em 0 -0.44em,
43
+ 0 -0.83em 0 -0.46em,
44
+ 0 -0.83em 0 -0.477em;
45
+ }
46
+ 10%,
47
+ 59% {
48
+ box-shadow:
49
+ 0 -0.83em 0 -0.4em,
50
+ -0.087em -0.825em 0 -0.42em,
51
+ -0.173em -0.812em 0 -0.44em,
52
+ -0.256em -0.789em 0 -0.46em,
53
+ -0.297em -0.775em 0 -0.477em;
54
+ }
55
+ 20% {
56
+ box-shadow:
57
+ 0 -0.83em 0 -0.4em,
58
+ -0.338em -0.758em 0 -0.42em,
59
+ -0.555em -0.617em 0 -0.44em,
60
+ -0.671em -0.488em 0 -0.46em,
61
+ -0.749em -0.34em 0 -0.477em;
62
+ }
63
+ 38% {
64
+ box-shadow:
65
+ 0 -0.83em 0 -0.4em,
66
+ -0.377em -0.74em 0 -0.42em,
67
+ -0.645em -0.522em 0 -0.44em,
68
+ -0.775em -0.297em 0 -0.46em,
69
+ -0.82em -0.09em 0 -0.477em;
70
+ }
71
+ 100% {
72
+ box-shadow:
73
+ 0 -0.83em 0 -0.4em,
74
+ 0 -0.83em 0 -0.42em,
75
+ 0 -0.83em 0 -0.44em,
76
+ 0 -0.83em 0 -0.46em,
77
+ 0 -0.83em 0 -0.477em;
78
+ }
79
+ }
80
+
81
+ @keyframes fx-loader-round {
82
+ 0% { transform: rotate(0deg); }
83
+ 100% { transform: rotate(360deg); }
84
+ }
85
+
86
+ .fx-loader-multi-shadow {
87
+ width: 1em;
88
+ height: 1em;
89
+ overflow: hidden;
90
+ border-radius: 50%;
91
+ color: currentColor;
92
+ position: relative;
93
+ text-indent: -9999em;
94
+ transform: translateZ(0);
95
+ animation:
96
+ fx-loader-multi-shadow-spin 1.7s infinite ease,
97
+ fx-loader-round 1.7s infinite ease;
98
+ }
99
+ `;
29
100
  function HeliipLoader({
30
101
  title = "Heliip",
31
- subtitle = "Cargando\u2026",
102
+ subtitle = "Cargando...",
32
103
  className,
33
104
  compact = false,
34
105
  size
35
106
  }) {
36
107
  const resolvedSize = size != null ? size : compact ? "sm" : "md";
37
- const iconSize = resolvedSize === "lg" ? "h-10 w-10" : resolvedSize === "sm" ? "h-5 w-5" : "h-7 w-7";
108
+ const loaderSize = resolvedSize === "lg" ? "text-[45px]" : resolvedSize === "sm" ? "text-[22px]" : "text-[32px]";
38
109
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
39
110
  "div",
40
111
  {
@@ -42,7 +113,8 @@ function HeliipLoader({
42
113
  className: cx("inline-flex items-center justify-center text-[var(--primary)]", className),
43
114
  role: "status",
44
115
  children: [
45
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.motion.span, { animate: { rotate: 360 }, "aria-hidden": true, className: "inline-flex", transition: { duration: 0.8, ease: "linear", repeat: Infinity }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_iconos.SpinnerGapIcon, { className: iconSize }) }),
116
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", { dangerouslySetInnerHTML: { __html: loaderStyles } }),
117
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-hidden": true, className: cx("fx-loader-multi-shadow", loaderSize) }),
46
118
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: subtitle || title })
47
119
  ]
48
120
  }
@@ -1,17 +1,88 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { motion } from "framer-motion";
4
- import { SpinnerGapIcon } from "./iconos/index.mjs";
5
3
  const cx = (...a) => a.filter(Boolean).join(" ");
4
+ const loaderStyles = `
5
+ @keyframes fx-loader-multi-shadow-spin {
6
+ 0% {
7
+ box-shadow:
8
+ 0 -0.83em 0 -0.4em,
9
+ 0 -0.83em 0 -0.42em,
10
+ 0 -0.83em 0 -0.44em,
11
+ 0 -0.83em 0 -0.46em,
12
+ 0 -0.83em 0 -0.477em;
13
+ }
14
+ 5%,
15
+ 95% {
16
+ box-shadow:
17
+ 0 -0.83em 0 -0.4em,
18
+ 0 -0.83em 0 -0.42em,
19
+ 0 -0.83em 0 -0.44em,
20
+ 0 -0.83em 0 -0.46em,
21
+ 0 -0.83em 0 -0.477em;
22
+ }
23
+ 10%,
24
+ 59% {
25
+ box-shadow:
26
+ 0 -0.83em 0 -0.4em,
27
+ -0.087em -0.825em 0 -0.42em,
28
+ -0.173em -0.812em 0 -0.44em,
29
+ -0.256em -0.789em 0 -0.46em,
30
+ -0.297em -0.775em 0 -0.477em;
31
+ }
32
+ 20% {
33
+ box-shadow:
34
+ 0 -0.83em 0 -0.4em,
35
+ -0.338em -0.758em 0 -0.42em,
36
+ -0.555em -0.617em 0 -0.44em,
37
+ -0.671em -0.488em 0 -0.46em,
38
+ -0.749em -0.34em 0 -0.477em;
39
+ }
40
+ 38% {
41
+ box-shadow:
42
+ 0 -0.83em 0 -0.4em,
43
+ -0.377em -0.74em 0 -0.42em,
44
+ -0.645em -0.522em 0 -0.44em,
45
+ -0.775em -0.297em 0 -0.46em,
46
+ -0.82em -0.09em 0 -0.477em;
47
+ }
48
+ 100% {
49
+ box-shadow:
50
+ 0 -0.83em 0 -0.4em,
51
+ 0 -0.83em 0 -0.42em,
52
+ 0 -0.83em 0 -0.44em,
53
+ 0 -0.83em 0 -0.46em,
54
+ 0 -0.83em 0 -0.477em;
55
+ }
56
+ }
57
+
58
+ @keyframes fx-loader-round {
59
+ 0% { transform: rotate(0deg); }
60
+ 100% { transform: rotate(360deg); }
61
+ }
62
+
63
+ .fx-loader-multi-shadow {
64
+ width: 1em;
65
+ height: 1em;
66
+ overflow: hidden;
67
+ border-radius: 50%;
68
+ color: currentColor;
69
+ position: relative;
70
+ text-indent: -9999em;
71
+ transform: translateZ(0);
72
+ animation:
73
+ fx-loader-multi-shadow-spin 1.7s infinite ease,
74
+ fx-loader-round 1.7s infinite ease;
75
+ }
76
+ `;
6
77
  function HeliipLoader({
7
78
  title = "Heliip",
8
- subtitle = "Cargando\u2026",
79
+ subtitle = "Cargando...",
9
80
  className,
10
81
  compact = false,
11
82
  size
12
83
  }) {
13
84
  const resolvedSize = size != null ? size : compact ? "sm" : "md";
14
- const iconSize = resolvedSize === "lg" ? "h-10 w-10" : resolvedSize === "sm" ? "h-5 w-5" : "h-7 w-7";
85
+ const loaderSize = resolvedSize === "lg" ? "text-[45px]" : resolvedSize === "sm" ? "text-[22px]" : "text-[32px]";
15
86
  return /* @__PURE__ */ jsxs(
16
87
  "div",
17
88
  {
@@ -19,7 +90,8 @@ function HeliipLoader({
19
90
  className: cx("inline-flex items-center justify-center text-[var(--primary)]", className),
20
91
  role: "status",
21
92
  children: [
22
- /* @__PURE__ */ jsx(motion.span, { animate: { rotate: 360 }, "aria-hidden": true, className: "inline-flex", transition: { duration: 0.8, ease: "linear", repeat: Infinity }, children: /* @__PURE__ */ jsx(SpinnerGapIcon, { className: iconSize }) }),
93
+ /* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: loaderStyles } }),
94
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: cx("fx-loader-multi-shadow", loaderSize) }),
23
95
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: subtitle || title })
24
96
  ]
25
97
  }
@@ -4,16 +4,84 @@ type Template = {
4
4
  label: string;
5
5
  content: string;
6
6
  };
7
+ type MarkdownRange = {
8
+ start: number;
9
+ end: number;
10
+ kind?: string;
11
+ activeOffset?: number;
12
+ };
13
+ type MarkdownRenderOptions = {
14
+ includeRanges?: boolean;
15
+ selectedRange?: MarkdownRange | null;
16
+ };
17
+ declare function renderMarkdown(value: string, options?: MarkdownRenderOptions): string;
7
18
  type MarkdownEditorProps = {
8
19
  value: string;
9
20
  onChange: (next: string) => void;
10
21
  placeholder?: string;
11
22
  rows?: number;
12
- height?: number;
23
+ height?: number | string;
24
+ fullscreenHeight?: number | string;
13
25
  className?: string;
14
26
  templates?: Template[];
15
27
  disabled?: boolean;
28
+ showPreview?: boolean;
29
+ enablePreview?: boolean;
30
+ enableFullscreen?: boolean;
31
+ enableDiagrams?: boolean;
32
+ maxImageBytes?: number;
33
+ maxVideoBytes?: number;
34
+ labels?: Partial<{
35
+ editor: string;
36
+ preview: string;
37
+ emptyPreview: string;
38
+ headings: string;
39
+ paragraph: string;
40
+ h1: string;
41
+ h2: string;
42
+ h3: string;
43
+ quote: string;
44
+ undo: string;
45
+ redo: string;
46
+ bold: string;
47
+ italic: string;
48
+ code: string;
49
+ bullets: string;
50
+ numbers: string;
51
+ link: string;
52
+ color: string;
53
+ insert: string;
54
+ imageUrl: string;
55
+ imageUpload: string;
56
+ videoUrl: string;
57
+ videoUpload: string;
58
+ table: string;
59
+ lineBreak: string;
60
+ diagram: string;
61
+ umlClass: string;
62
+ umlSequence: string;
63
+ divider: string;
64
+ blocksView: string;
65
+ markdownView: string;
66
+ previewView: string;
67
+ sampleButton: string;
68
+ showPreview: string;
69
+ hidePreview: string;
70
+ fullscreen: string;
71
+ exitFullscreen: string;
72
+ }>;
16
73
  };
17
- declare function MarkdownEditor({ value, onChange, placeholder, rows, height, className, templates, disabled, }: MarkdownEditorProps): React__default.JSX.Element;
74
+ declare function MarkdownPreview({ value, className, emptyLabel, selectable, selectedRange, onSelectRange, onOpenSelectionMenu, showBlockControls, onOpenBlockMenu, }: {
75
+ value: string | null | undefined;
76
+ className?: string;
77
+ emptyLabel?: string;
78
+ selectable?: boolean;
79
+ selectedRange?: MarkdownRange | null;
80
+ onSelectRange?: (range: MarkdownRange) => void;
81
+ onOpenSelectionMenu?: (event: React__default.MouseEvent, range: MarkdownRange) => void;
82
+ showBlockControls?: boolean;
83
+ onOpenBlockMenu?: (event: React__default.MouseEvent, range: MarkdownRange) => void;
84
+ }): React__default.JSX.Element;
85
+ declare function MarkdownEditor({ value, onChange, placeholder, rows, height, className, templates, disabled, fullscreenHeight, showPreview, enablePreview, enableFullscreen, enableDiagrams, labels, maxImageBytes, maxVideoBytes, }: MarkdownEditorProps): React__default.JSX.Element;
18
86
 
19
- export { type MarkdownEditorProps, MarkdownEditor as default };
87
+ export { type MarkdownEditorProps, MarkdownPreview, MarkdownEditor as default, renderMarkdown };