@mieweb/ui 0.7.3-dev.18 → 0.7.3-dev.19

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 (53) hide show
  1. package/dist/{chunk-GJD4OW7P.cjs → chunk-CGVDGVZS.cjs} +52 -3
  2. package/dist/chunk-CGVDGVZS.cjs.map +1 -0
  3. package/dist/{chunk-LRFH6KM3.cjs → chunk-JHGMZX4I.cjs} +3 -3
  4. package/dist/chunk-JHGMZX4I.cjs.map +1 -0
  5. package/dist/{chunk-GTHNWP4P.js → chunk-KGS7BL5T.js} +2 -2
  6. package/dist/{chunk-GTHNWP4P.js.map → chunk-KGS7BL5T.js.map} +1 -1
  7. package/dist/{chunk-CKZX6IQN.js → chunk-MPMVCAPI.js} +52 -3
  8. package/dist/chunk-MPMVCAPI.js.map +1 -0
  9. package/dist/chunk-NMBYU7D7.cjs +31 -0
  10. package/dist/chunk-NMBYU7D7.cjs.map +1 -0
  11. package/dist/{chunk-2DP6BZ7A.js → chunk-QGZC43L7.js} +3 -3
  12. package/dist/chunk-QGZC43L7.js.map +1 -0
  13. package/dist/chunk-RUGHNFQG.js +28 -0
  14. package/dist/chunk-RUGHNFQG.js.map +1 -0
  15. package/dist/{chunk-XB54G7WS.cjs → chunk-WG6MPHWK.cjs} +2 -2
  16. package/dist/{chunk-XB54G7WS.cjs.map → chunk-WG6MPHWK.cjs.map} +1 -1
  17. package/dist/{collabKit-QZL4P5T5.js → collabKit-A643VH2I.js} +7 -3
  18. package/dist/collabKit-A643VH2I.js.map +1 -0
  19. package/dist/{collabKit-UF7E6V3N.cjs → collabKit-Q4A36LDA.cjs} +7 -3
  20. package/dist/collabKit-Q4A36LDA.cjs.map +1 -0
  21. package/dist/components/Autocomplete/index.cjs +2 -2
  22. package/dist/components/Autocomplete/index.js +1 -1
  23. package/dist/components/SuperChat/plugins/index.cjs +2 -22
  24. package/dist/components/SuperChat/plugins/index.cjs.map +1 -1
  25. package/dist/components/SuperChat/plugins/index.js +1 -21
  26. package/dist/components/SuperChat/plugins/index.js.map +1 -1
  27. package/dist/hooks/index.cjs +23 -14
  28. package/dist/hooks/index.d.cts +16 -1
  29. package/dist/hooks/index.d.ts +16 -1
  30. package/dist/hooks/index.js +2 -1
  31. package/dist/index.cjs +281 -24
  32. package/dist/index.cjs.map +1 -1
  33. package/dist/index.d.cts +63 -2
  34. package/dist/index.d.ts +63 -2
  35. package/dist/index.js +255 -7
  36. package/dist/index.js.map +1 -1
  37. package/dist/kerebron.cjs +200 -68
  38. package/dist/kerebron.cjs.map +1 -1
  39. package/dist/kerebron.css +129 -0
  40. package/dist/kerebron.d.cts +52 -3
  41. package/dist/kerebron.d.ts +52 -3
  42. package/dist/kerebron.js +201 -69
  43. package/dist/kerebron.js.map +1 -1
  44. package/dist/styles.css +1 -1
  45. package/dist/tailwind-preset.cjs +4 -4
  46. package/dist/tailwind-preset.js +1 -1
  47. package/package.json +1 -1
  48. package/dist/chunk-2DP6BZ7A.js.map +0 -1
  49. package/dist/chunk-CKZX6IQN.js.map +0 -1
  50. package/dist/chunk-GJD4OW7P.cjs.map +0 -1
  51. package/dist/chunk-LRFH6KM3.cjs.map +0 -1
  52. package/dist/collabKit-QZL4P5T5.js.map +0 -1
  53. package/dist/collabKit-UF7E6V3N.cjs.map +0 -1
@@ -41,6 +41,21 @@ interface UseScrollSpyReturn {
41
41
  */
42
42
  declare function useScrollSpy({ selectors, ids, rootMargin, threshold, root, enabled, }?: UseScrollSpyOptions): UseScrollSpyReturn;
43
43
 
44
+ /** Read the current dark-mode state from the document root. */
45
+ declare function isDarkMode(): boolean;
46
+ /**
47
+ * Track dark mode reactively, for the cases a CSS swap cannot cover — content
48
+ * rendered *from* the theme (Mermaid bakes colors into the SVG) or third-party
49
+ * DOM that wants a class of its own (the Kerebron editor surface).
50
+ *
51
+ * @example
52
+ * ```tsx
53
+ * const dark = useIsDarkMode();
54
+ * <div className={dark ? 'kb-component kb-component--dark' : 'kb-component'} />
55
+ * ```
56
+ */
57
+ declare function useIsDarkMode(): boolean;
58
+
44
59
  type Direction = 'ltr' | 'rtl';
45
60
  /** Locales whose primary script reads right-to-left. */
46
61
  declare const RTL_LOCALES: readonly ["ar", "he", "fa", "ur"];
@@ -389,4 +404,4 @@ interface UseMediaTransportReturn {
389
404
  */
390
405
  declare function useMediaTransport(options?: UseMediaTransportOptions): UseMediaTransportReturn;
391
406
 
392
- export { type Direction, type DragOverState, type KeyboardShortcutOptions, type MediaTransportState, RTL_LOCALES, type UseDragReorderOptions, type UseDragReorderReturn, type UseMediaTransportOptions, type UseMediaTransportReturn, type UseScrollSpyOptions, type UseScrollSpyReturn, dragIndicatorClasses, isRtlLocale, reorderIds, useClickOutside, useCommandK, useDirection, useDragReorder, useEscapeKey, useFocusTrap, useIsDesktop, useIsLargeDesktop, useIsMobile, useIsMobileOrTablet, useIsSmallTablet, useIsTablet, useKeyboardShortcut, useLiveAnnouncement, useMediaQuery, useMediaTransport, usePrefersReducedMotion, useScrollSpy };
407
+ export { type Direction, type DragOverState, type KeyboardShortcutOptions, type MediaTransportState, RTL_LOCALES, type UseDragReorderOptions, type UseDragReorderReturn, type UseMediaTransportOptions, type UseMediaTransportReturn, type UseScrollSpyOptions, type UseScrollSpyReturn, dragIndicatorClasses, isDarkMode, isRtlLocale, reorderIds, useClickOutside, useCommandK, useDirection, useDragReorder, useEscapeKey, useFocusTrap, useIsDarkMode, useIsDesktop, useIsLargeDesktop, useIsMobile, useIsMobileOrTablet, useIsSmallTablet, useIsTablet, useKeyboardShortcut, useLiveAnnouncement, useMediaQuery, useMediaTransport, usePrefersReducedMotion, useScrollSpy };
@@ -41,6 +41,21 @@ interface UseScrollSpyReturn {
41
41
  */
42
42
  declare function useScrollSpy({ selectors, ids, rootMargin, threshold, root, enabled, }?: UseScrollSpyOptions): UseScrollSpyReturn;
43
43
 
44
+ /** Read the current dark-mode state from the document root. */
45
+ declare function isDarkMode(): boolean;
46
+ /**
47
+ * Track dark mode reactively, for the cases a CSS swap cannot cover — content
48
+ * rendered *from* the theme (Mermaid bakes colors into the SVG) or third-party
49
+ * DOM that wants a class of its own (the Kerebron editor surface).
50
+ *
51
+ * @example
52
+ * ```tsx
53
+ * const dark = useIsDarkMode();
54
+ * <div className={dark ? 'kb-component kb-component--dark' : 'kb-component'} />
55
+ * ```
56
+ */
57
+ declare function useIsDarkMode(): boolean;
58
+
44
59
  type Direction = 'ltr' | 'rtl';
45
60
  /** Locales whose primary script reads right-to-left. */
46
61
  declare const RTL_LOCALES: readonly ["ar", "he", "fa", "ur"];
@@ -389,4 +404,4 @@ interface UseMediaTransportReturn {
389
404
  */
390
405
  declare function useMediaTransport(options?: UseMediaTransportOptions): UseMediaTransportReturn;
391
406
 
392
- export { type Direction, type DragOverState, type KeyboardShortcutOptions, type MediaTransportState, RTL_LOCALES, type UseDragReorderOptions, type UseDragReorderReturn, type UseMediaTransportOptions, type UseMediaTransportReturn, type UseScrollSpyOptions, type UseScrollSpyReturn, dragIndicatorClasses, isRtlLocale, reorderIds, useClickOutside, useCommandK, useDirection, useDragReorder, useEscapeKey, useFocusTrap, useIsDesktop, useIsLargeDesktop, useIsMobile, useIsMobileOrTablet, useIsSmallTablet, useIsTablet, useKeyboardShortcut, useLiveAnnouncement, useMediaQuery, useMediaTransport, usePrefersReducedMotion, useScrollSpy };
407
+ export { type Direction, type DragOverState, type KeyboardShortcutOptions, type MediaTransportState, RTL_LOCALES, type UseDragReorderOptions, type UseDragReorderReturn, type UseMediaTransportOptions, type UseMediaTransportReturn, type UseScrollSpyOptions, type UseScrollSpyReturn, dragIndicatorClasses, isDarkMode, isRtlLocale, reorderIds, useClickOutside, useCommandK, useDirection, useDragReorder, useEscapeKey, useFocusTrap, useIsDarkMode, useIsDesktop, useIsLargeDesktop, useIsMobile, useIsMobileOrTablet, useIsSmallTablet, useIsTablet, useKeyboardShortcut, useLiveAnnouncement, useMediaQuery, useMediaTransport, usePrefersReducedMotion, useScrollSpy };
@@ -1,4 +1,4 @@
1
- export { RTL_LOCALES, isRtlLocale, useCommandK, useDirection, useIsDesktop, useIsLargeDesktop, useIsMobile, useIsMobileOrTablet, useIsSmallTablet, useIsTablet, useKeyboardShortcut, useMediaQuery, useScrollSpy } from '../chunk-GTHNWP4P.js';
1
+ export { RTL_LOCALES, isRtlLocale, useCommandK, useDirection, useIsDesktop, useIsLargeDesktop, useIsMobile, useIsMobileOrTablet, useIsSmallTablet, useIsTablet, useKeyboardShortcut, useMediaQuery, useScrollSpy } from '../chunk-KGS7BL5T.js';
2
2
  export { useTheme } from '../chunk-KJZNEVYM.js';
3
3
  export { DEFAULT_FILLER_WORDS, DEFAULT_MIN_SILENCE_MS, DEFAULT_NL_SILENCE_MS, buildPlaybackSegments, getSpeedAtIndex, initEditableWords, insertSilences, useTranscriptEdits } from '../chunk-UUI7WXI5.js';
4
4
  import '../chunk-6CGM5H4J.js';
@@ -9,6 +9,7 @@ export { useFocusTrap } from '../chunk-4SMSH4OY.js';
9
9
  export { useEscapeKey } from '../chunk-T4ME7QCT.js';
10
10
  export { useClickOutside } from '../chunk-62ZOA6PX.js';
11
11
  export { useAnchoredPosition } from '../chunk-BOOJDRJO.js';
12
+ export { isDarkMode, useIsDarkMode } from '../chunk-RUGHNFQG.js';
12
13
  import '../chunk-VSQF22GL.js';
13
14
  //# sourceMappingURL=index.js.map
14
15
  //# sourceMappingURL=index.js.map
package/dist/index.cjs CHANGED
@@ -53,12 +53,12 @@ var chunkSPWVKDGC_cjs = require('./chunk-SPWVKDGC.cjs');
53
53
  var chunkYVIH26FG_cjs = require('./chunk-YVIH26FG.cjs');
54
54
  var chunkPLMXN23Q_cjs = require('./chunk-PLMXN23Q.cjs');
55
55
  var chunkRS5VA6QU_cjs = require('./chunk-RS5VA6QU.cjs');
56
- var chunkGJD4OW7P_cjs = require('./chunk-GJD4OW7P.cjs');
56
+ var chunkCGVDGVZS_cjs = require('./chunk-CGVDGVZS.cjs');
57
57
  var chunkEPQPUFS6_cjs = require('./chunk-EPQPUFS6.cjs');
58
58
  var chunkTVLZZI5Q_cjs = require('./chunk-TVLZZI5Q.cjs');
59
59
  var chunkZZJ4ZVYR_cjs = require('./chunk-ZZJ4ZVYR.cjs');
60
60
  var chunkW4Q4UEXA_cjs = require('./chunk-W4Q4UEXA.cjs');
61
- var chunkLRFH6KM3_cjs = require('./chunk-LRFH6KM3.cjs');
61
+ var chunkJHGMZX4I_cjs = require('./chunk-JHGMZX4I.cjs');
62
62
  var chunkU3JU6BI5_cjs = require('./chunk-U3JU6BI5.cjs');
63
63
  require('./chunk-VBWRH4UW.cjs');
64
64
  var chunkRI56YPED_cjs = require('./chunk-RI56YPED.cjs');
@@ -76,7 +76,7 @@ var chunkZ5S5JEJD_cjs = require('./chunk-Z5S5JEJD.cjs');
76
76
  var chunkPAM5UUBL_cjs = require('./chunk-PAM5UUBL.cjs');
77
77
  var chunkRDGRKYQ5_cjs = require('./chunk-RDGRKYQ5.cjs');
78
78
  var chunkYVL3XATO_cjs = require('./chunk-YVL3XATO.cjs');
79
- var chunkXB54G7WS_cjs = require('./chunk-XB54G7WS.cjs');
79
+ var chunkWG6MPHWK_cjs = require('./chunk-WG6MPHWK.cjs');
80
80
  var chunk2O7D6F67_cjs = require('./chunk-2O7D6F67.cjs');
81
81
  var chunkNPKPCYAT_cjs = require('./chunk-NPKPCYAT.cjs');
82
82
  var chunkNUFUV43P_cjs = require('./chunk-NUFUV43P.cjs');
@@ -87,6 +87,7 @@ var chunkNNEFAUHV_cjs = require('./chunk-NNEFAUHV.cjs');
87
87
  var chunkFHY3K6PL_cjs = require('./chunk-FHY3K6PL.cjs');
88
88
  var chunkFSGEDDF2_cjs = require('./chunk-FSGEDDF2.cjs');
89
89
  var chunkMYFZYUPR_cjs = require('./chunk-MYFZYUPR.cjs');
90
+ var chunkNMBYU7D7_cjs = require('./chunk-NMBYU7D7.cjs');
90
91
  require('./chunk-AT732HC6.cjs');
91
92
  var chunkC7RVKV25_cjs = require('./chunk-C7RVKV25.cjs');
92
93
  var chunkL7YQBSEL_cjs = require('./chunk-L7YQBSEL.cjs');
@@ -8599,6 +8600,7 @@ var Assessment = React13__namespace.forwardRef(
8599
8600
  onReorderOrders,
8600
8601
  renderOrderSearch,
8601
8602
  readOnly = false,
8603
+ defaultAddMode = "auto",
8602
8604
  billableOnly = false,
8603
8605
  className,
8604
8606
  "data-testid": dataTestId,
@@ -8606,7 +8608,7 @@ var Assessment = React13__namespace.forwardRef(
8606
8608
  }, ref) => {
8607
8609
  const [addingFor, setAddingFor] = React13__namespace.useState(null);
8608
8610
  const [addMode, setAddMode] = React13__namespace.useState(
8609
- "auto"
8611
+ defaultAddMode
8610
8612
  );
8611
8613
  const [pendingFreeText, setPendingFreeText] = React13__namespace.useState(
8612
8614
  null
@@ -13587,7 +13589,7 @@ function CommandPaletteProvider({
13587
13589
  open();
13588
13590
  }
13589
13591
  }, [isOpen, open, close]);
13590
- chunkXB54G7WS_cjs.useCommandK(toggle, enableShortcut);
13592
+ chunkWG6MPHWK_cjs.useCommandK(toggle, enableShortcut);
13591
13593
  React13__namespace.default.useEffect(() => {
13592
13594
  if (!customEventName) return;
13593
13595
  const handler = () => open();
@@ -18641,7 +18643,7 @@ function DocumentScanner({
18641
18643
  const [error, setError] = React13__namespace.useState(null);
18642
18644
  const [isWebcamOpen, setIsWebcamOpen] = React13__namespace.useState(false);
18643
18645
  const [validationErrors, setValidationErrors] = React13__namespace.useState([]);
18644
- const isMobile = chunkXB54G7WS_cjs.useIsMobile();
18646
+ const isMobile = chunkWG6MPHWK_cjs.useIsMobile();
18645
18647
  const cameraInputRef = React13__namespace.useRef(null);
18646
18648
  const {
18647
18649
  files,
@@ -18979,6 +18981,252 @@ function DocumentScanner({
18979
18981
  );
18980
18982
  }
18981
18983
  DocumentScanner.displayName = "DocumentScanner";
18984
+ var FOCUSABLE_SELECTOR = [
18985
+ "a[href]",
18986
+ "button:not([disabled])",
18987
+ "input:not([disabled])",
18988
+ "select:not([disabled])",
18989
+ "textarea:not([disabled])",
18990
+ '[contenteditable="true"]',
18991
+ '[tabindex]:not([tabindex="-1"])'
18992
+ ].join(", ");
18993
+ var inertClaims = /* @__PURE__ */ new WeakMap();
18994
+ function claimInert(element) {
18995
+ const claims = inertClaims.get(element) ?? 0;
18996
+ if (claims === 0) element.setAttribute("inert", "");
18997
+ inertClaims.set(element, claims + 1);
18998
+ }
18999
+ function releaseInert(element) {
19000
+ const claims = inertClaims.get(element) ?? 0;
19001
+ if (claims <= 1) {
19002
+ inertClaims.delete(element);
19003
+ element.removeAttribute("inert");
19004
+ } else {
19005
+ inertClaims.set(element, claims - 1);
19006
+ }
19007
+ }
19008
+ function DockablePanel({
19009
+ title,
19010
+ children,
19011
+ onClose,
19012
+ mode = "full",
19013
+ onModeChange,
19014
+ dirty = false,
19015
+ dockSummary,
19016
+ discardMessage,
19017
+ container,
19018
+ className
19019
+ }) {
19020
+ const panelRef = React13__namespace.useRef(null);
19021
+ const contentRef = React13__namespace.useRef(null);
19022
+ const onCloseRef = React13__namespace.useRef(onClose);
19023
+ onCloseRef.current = onClose;
19024
+ const onModeChangeRef = React13__namespace.useRef(onModeChange);
19025
+ onModeChangeRef.current = onModeChange;
19026
+ const dirtyRef = React13__namespace.useRef(dirty);
19027
+ dirtyRef.current = dirty;
19028
+ const modeRef = React13__namespace.useRef(mode);
19029
+ modeRef.current = mode;
19030
+ const discardRef = React13__namespace.useRef(discardMessage);
19031
+ discardRef.current = discardMessage;
19032
+ const dockable = Boolean(onModeChange);
19033
+ const docked = dockable && mode === "docked";
19034
+ const contentId = React13__namespace.useId();
19035
+ const [announcement, announce] = chunkYVPC65ZJ_cjs.useLiveAnnouncement();
19036
+ const requestClose = React13__namespace.useCallback(() => {
19037
+ const view = panelRef.current?.ownerDocument.defaultView;
19038
+ if (dirtyRef.current && view?.confirm && !view.confirm(discardRef.current ?? `Discard ${title}?`)) {
19039
+ return;
19040
+ }
19041
+ onCloseRef.current();
19042
+ }, [title]);
19043
+ React13__namespace.useEffect(() => {
19044
+ const handleKeyDown = (event) => {
19045
+ if (event.key !== "Escape") return;
19046
+ if (modeRef.current === "docked" && !panelRef.current?.contains(event.target)) {
19047
+ return;
19048
+ }
19049
+ if (dockable && dirtyRef.current && modeRef.current === "full") {
19050
+ onModeChangeRef.current?.("docked");
19051
+ return;
19052
+ }
19053
+ requestClose();
19054
+ };
19055
+ const doc = panelRef.current?.ownerDocument ?? document;
19056
+ doc.addEventListener("keydown", handleKeyDown);
19057
+ return () => doc.removeEventListener("keydown", handleKeyDown);
19058
+ }, [dockable, requestClose]);
19059
+ React13__namespace.useEffect(() => {
19060
+ if (!dirty || typeof window === "undefined") return;
19061
+ const handleBeforeUnload = (event) => {
19062
+ event.preventDefault();
19063
+ event.returnValue = "";
19064
+ };
19065
+ window.addEventListener("beforeunload", handleBeforeUnload);
19066
+ return () => window.removeEventListener("beforeunload", handleBeforeUnload);
19067
+ }, [dirty]);
19068
+ React13__namespace.useEffect(() => {
19069
+ const panel2 = panelRef.current;
19070
+ if (!panel2 || mode !== "full") return;
19071
+ const root = panel2.closest('[data-slot="dockable-panel-dock"]') ?? panel2;
19072
+ const inerted = Array.from(panel2.ownerDocument.body.children).filter(
19073
+ (child) => child !== root && !child.contains(root) && // Inert applied by something that isn't a DockablePanel is not ours
19074
+ // to count or to remove.
19075
+ (inertClaims.has(child) || !child.hasAttribute("inert"))
19076
+ );
19077
+ for (const element of inerted) claimInert(element);
19078
+ return () => {
19079
+ for (const element of inerted) releaseInert(element);
19080
+ };
19081
+ }, [mode]);
19082
+ React13__namespace.useEffect(() => {
19083
+ contentRef.current?.toggleAttribute("inert", docked);
19084
+ }, [docked]);
19085
+ React13__namespace.useEffect(() => {
19086
+ if (docked) return;
19087
+ const target2 = contentRef.current?.querySelector(FOCUSABLE_SELECTOR) ?? panelRef.current;
19088
+ target2?.focus();
19089
+ }, [docked]);
19090
+ React13__namespace.useEffect(() => {
19091
+ if (!docked) return;
19092
+ announce(`${title} collapsed to dock`);
19093
+ panelRef.current?.querySelector('[data-slot="dockable-panel-restore"]')?.focus();
19094
+ }, [announce, docked, title]);
19095
+ const handleTabTrap = (event) => {
19096
+ if (event.key !== "Tab" || mode !== "full") return;
19097
+ const panel2 = panelRef.current;
19098
+ if (!panel2) return;
19099
+ const focusable = Array.from(
19100
+ panel2.querySelectorAll(FOCUSABLE_SELECTOR)
19101
+ ).filter((element) => element.offsetParent !== null || element === panel2);
19102
+ if (focusable.length === 0) return;
19103
+ const first = focusable[0];
19104
+ const last = focusable[focusable.length - 1];
19105
+ const active = panel2.ownerDocument.activeElement;
19106
+ if (event.shiftKey && (active === first || !panel2.contains(active))) {
19107
+ event.preventDefault();
19108
+ last.focus();
19109
+ } else if (!event.shiftKey && active === last) {
19110
+ event.preventDefault();
19111
+ first.focus();
19112
+ }
19113
+ };
19114
+ const target = container ?? (typeof document === "undefined" ? null : document.body);
19115
+ if (!target) return null;
19116
+ const panel = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
19117
+ !docked && /* @__PURE__ */ jsxRuntime.jsx(
19118
+ "div",
19119
+ {
19120
+ "data-slot": "dockable-panel-scrim",
19121
+ className: "fixed inset-0 bg-slate-900/45",
19122
+ style: { zIndex: "calc(var(--mieweb-dockable-panel-z, 45) - 1)" },
19123
+ "aria-hidden": "true"
19124
+ }
19125
+ ),
19126
+ /* @__PURE__ */ jsxRuntime.jsx(
19127
+ "div",
19128
+ {
19129
+ "data-slot": "dockable-panel-dock",
19130
+ "data-mode": docked ? "docked" : "full",
19131
+ className: chunkS5RVSXDV_cjs.cn(
19132
+ "fixed",
19133
+ docked ? "inset-auto end-6 bottom-0 w-[26rem] max-w-[calc(100vw-3rem)] overflow-hidden max-sm:inset-x-0 max-sm:w-full max-sm:max-w-full" : "inset-6 flex justify-center max-sm:inset-0"
19134
+ ),
19135
+ style: { zIndex: "var(--mieweb-dockable-panel-z, 45)" },
19136
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
19137
+ "div",
19138
+ {
19139
+ ref: panelRef,
19140
+ "data-slot": "dockable-panel",
19141
+ "data-mode": docked ? "docked" : "full",
19142
+ className: chunkS5RVSXDV_cjs.cn(
19143
+ "border-border bg-card text-card-foreground relative flex flex-col overflow-hidden border shadow-[0_1.25rem_2.5rem_rgb(15_23_42/0.22)]",
19144
+ docked ? "w-full rounded-t-lg border-b-0" : "h-full w-full max-w-[90rem] rounded-lg",
19145
+ className
19146
+ ),
19147
+ role: "dialog",
19148
+ "aria-modal": docked ? void 0 : true,
19149
+ "aria-label": title,
19150
+ tabIndex: -1,
19151
+ onKeyDown: handleTabTrap,
19152
+ children: [
19153
+ /* @__PURE__ */ jsxRuntime.jsxs(
19154
+ "div",
19155
+ {
19156
+ "data-slot": "dockable-panel-header",
19157
+ className: "border-border flex items-center justify-between gap-2 border-b px-3 py-2.5",
19158
+ children: [
19159
+ docked ? /* @__PURE__ */ jsxRuntime.jsx(
19160
+ "div",
19161
+ {
19162
+ "data-slot": "dockable-panel-summary",
19163
+ className: "flex min-w-0 items-center gap-2 text-sm",
19164
+ children: dockSummary ?? title
19165
+ }
19166
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
19167
+ "h3",
19168
+ {
19169
+ "data-slot": "dockable-panel-title",
19170
+ className: "m-0 text-[0.9375rem] font-semibold capitalize",
19171
+ children: title
19172
+ }
19173
+ ),
19174
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
19175
+ dockable && /* @__PURE__ */ jsxRuntime.jsx(
19176
+ chunkRDGRKYQ5_cjs.Button,
19177
+ {
19178
+ type: "button",
19179
+ variant: "ghost",
19180
+ size: "sm",
19181
+ "data-slot": docked ? "dockable-panel-restore" : "dockable-panel-collapse",
19182
+ "aria-expanded": !docked,
19183
+ "aria-controls": contentId,
19184
+ onClick: () => onModeChange?.(docked ? "full" : "docked"),
19185
+ "aria-label": docked ? "Restore" : "Collapse to dock",
19186
+ title: docked ? "Restore" : "Collapse to dock",
19187
+ children: docked ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Maximize2, { size: 16, "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Minimize2, { size: 16, "aria-hidden": "true" })
19188
+ }
19189
+ ),
19190
+ /* @__PURE__ */ jsxRuntime.jsx(
19191
+ chunkRDGRKYQ5_cjs.Button,
19192
+ {
19193
+ type: "button",
19194
+ variant: "ghost",
19195
+ size: "sm",
19196
+ "data-slot": "dockable-panel-close",
19197
+ onClick: requestClose,
19198
+ "aria-label": docked ? "Discard" : "Close",
19199
+ title: docked ? "Discard" : "Close",
19200
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { size: 16, "aria-hidden": "true" })
19201
+ }
19202
+ )
19203
+ ] })
19204
+ ]
19205
+ }
19206
+ ),
19207
+ /* @__PURE__ */ jsxRuntime.jsx(
19208
+ "div",
19209
+ {
19210
+ ref: contentRef,
19211
+ id: contentId,
19212
+ "data-slot": "dockable-panel-content",
19213
+ className: chunkS5RVSXDV_cjs.cn(
19214
+ "flex min-h-0 flex-1 flex-col",
19215
+ docked && "absolute end-0 top-full h-[calc(100vh-4rem)] w-[min(90rem,100vw-3rem)] max-sm:w-screen"
19216
+ ),
19217
+ children
19218
+ }
19219
+ )
19220
+ ]
19221
+ }
19222
+ )
19223
+ }
19224
+ ),
19225
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "sr-only", "aria-live": "polite", children: announcement })
19226
+ ] });
19227
+ return ReactDOM.createPortal(panel, target);
19228
+ }
19229
+ DockablePanel.displayName = "DockablePanel";
18982
19230
  var iconMap = {
18983
19231
  upload: lucideReact.Upload,
18984
19232
  file: lucideReact.FileUp,
@@ -40466,7 +40714,7 @@ function SidebarProvider({
40466
40714
  defaultExpandedGroup = null,
40467
40715
  mobileBreakpoint = "(max-width: 1023px)"
40468
40716
  }) {
40469
- const isMobileViewport = chunkXB54G7WS_cjs.useMediaQuery(mobileBreakpoint);
40717
+ const isMobileViewport = chunkWG6MPHWK_cjs.useMediaQuery(mobileBreakpoint);
40470
40718
  const [isCollapsed, setIsCollapsed] = React13.useState(() => {
40471
40719
  if (typeof window !== "undefined" && persistCollapsed) {
40472
40720
  const stored = localStorage.getItem(storageKey);
@@ -43089,7 +43337,7 @@ function TableOfContents({
43089
43337
  }, [manualItems, selector, maxDepth, contentEl]);
43090
43338
  const ids = React13__namespace.useMemo(() => flatItems.map((i) => i.id), [flatItems]);
43091
43339
  const isControlled = controlledActiveId !== void 0;
43092
- const { activeId: spyActiveId } = chunkXB54G7WS_cjs.useScrollSpy({
43340
+ const { activeId: spyActiveId } = chunkWG6MPHWK_cjs.useScrollSpy({
43093
43341
  ids,
43094
43342
  root: contentRef,
43095
43343
  enabled: !isControlled && ids.length > 0,
@@ -45114,11 +45362,11 @@ Object.defineProperty(exports, "sheetOverlayVariants", {
45114
45362
  });
45115
45363
  Object.defineProperty(exports, "miewebUIPreset", {
45116
45364
  enumerable: true,
45117
- get: function () { return chunkGJD4OW7P_cjs.miewebUIPreset; }
45365
+ get: function () { return chunkCGVDGVZS_cjs.miewebUIPreset; }
45118
45366
  });
45119
45367
  Object.defineProperty(exports, "miewebUISafelist", {
45120
45368
  enumerable: true,
45121
- get: function () { return chunkGJD4OW7P_cjs.miewebUISafelist; }
45369
+ get: function () { return chunkCGVDGVZS_cjs.miewebUISafelist; }
45122
45370
  });
45123
45371
  Object.defineProperty(exports, "Alert", {
45124
45372
  enumerable: true,
@@ -45182,7 +45430,7 @@ Object.defineProperty(exports, "waveformContainerVariants", {
45182
45430
  });
45183
45431
  Object.defineProperty(exports, "Autocomplete", {
45184
45432
  enumerable: true,
45185
- get: function () { return chunkLRFH6KM3_cjs.Autocomplete; }
45433
+ get: function () { return chunkJHGMZX4I_cjs.Autocomplete; }
45186
45434
  });
45187
45435
  Object.defineProperty(exports, "Avatar", {
45188
45436
  enumerable: true,
@@ -46182,55 +46430,55 @@ Object.defineProperty(exports, "badgeVariants", {
46182
46430
  });
46183
46431
  Object.defineProperty(exports, "RTL_LOCALES", {
46184
46432
  enumerable: true,
46185
- get: function () { return chunkXB54G7WS_cjs.RTL_LOCALES; }
46433
+ get: function () { return chunkWG6MPHWK_cjs.RTL_LOCALES; }
46186
46434
  });
46187
46435
  Object.defineProperty(exports, "isRtlLocale", {
46188
46436
  enumerable: true,
46189
- get: function () { return chunkXB54G7WS_cjs.isRtlLocale; }
46437
+ get: function () { return chunkWG6MPHWK_cjs.isRtlLocale; }
46190
46438
  });
46191
46439
  Object.defineProperty(exports, "useCommandK", {
46192
46440
  enumerable: true,
46193
- get: function () { return chunkXB54G7WS_cjs.useCommandK; }
46441
+ get: function () { return chunkWG6MPHWK_cjs.useCommandK; }
46194
46442
  });
46195
46443
  Object.defineProperty(exports, "useDirection", {
46196
46444
  enumerable: true,
46197
- get: function () { return chunkXB54G7WS_cjs.useDirection; }
46445
+ get: function () { return chunkWG6MPHWK_cjs.useDirection; }
46198
46446
  });
46199
46447
  Object.defineProperty(exports, "useIsDesktop", {
46200
46448
  enumerable: true,
46201
- get: function () { return chunkXB54G7WS_cjs.useIsDesktop; }
46449
+ get: function () { return chunkWG6MPHWK_cjs.useIsDesktop; }
46202
46450
  });
46203
46451
  Object.defineProperty(exports, "useIsLargeDesktop", {
46204
46452
  enumerable: true,
46205
- get: function () { return chunkXB54G7WS_cjs.useIsLargeDesktop; }
46453
+ get: function () { return chunkWG6MPHWK_cjs.useIsLargeDesktop; }
46206
46454
  });
46207
46455
  Object.defineProperty(exports, "useIsMobile", {
46208
46456
  enumerable: true,
46209
- get: function () { return chunkXB54G7WS_cjs.useIsMobile; }
46457
+ get: function () { return chunkWG6MPHWK_cjs.useIsMobile; }
46210
46458
  });
46211
46459
  Object.defineProperty(exports, "useIsMobileOrTablet", {
46212
46460
  enumerable: true,
46213
- get: function () { return chunkXB54G7WS_cjs.useIsMobileOrTablet; }
46461
+ get: function () { return chunkWG6MPHWK_cjs.useIsMobileOrTablet; }
46214
46462
  });
46215
46463
  Object.defineProperty(exports, "useIsSmallTablet", {
46216
46464
  enumerable: true,
46217
- get: function () { return chunkXB54G7WS_cjs.useIsSmallTablet; }
46465
+ get: function () { return chunkWG6MPHWK_cjs.useIsSmallTablet; }
46218
46466
  });
46219
46467
  Object.defineProperty(exports, "useIsTablet", {
46220
46468
  enumerable: true,
46221
- get: function () { return chunkXB54G7WS_cjs.useIsTablet; }
46469
+ get: function () { return chunkWG6MPHWK_cjs.useIsTablet; }
46222
46470
  });
46223
46471
  Object.defineProperty(exports, "useKeyboardShortcut", {
46224
46472
  enumerable: true,
46225
- get: function () { return chunkXB54G7WS_cjs.useKeyboardShortcut; }
46473
+ get: function () { return chunkWG6MPHWK_cjs.useKeyboardShortcut; }
46226
46474
  });
46227
46475
  Object.defineProperty(exports, "useMediaQuery", {
46228
46476
  enumerable: true,
46229
- get: function () { return chunkXB54G7WS_cjs.useMediaQuery; }
46477
+ get: function () { return chunkWG6MPHWK_cjs.useMediaQuery; }
46230
46478
  });
46231
46479
  Object.defineProperty(exports, "useScrollSpy", {
46232
46480
  enumerable: true,
46233
- get: function () { return chunkXB54G7WS_cjs.useScrollSpy; }
46481
+ get: function () { return chunkWG6MPHWK_cjs.useScrollSpy; }
46234
46482
  });
46235
46483
  Object.defineProperty(exports, "useTheme", {
46236
46484
  enumerable: true,
@@ -46312,6 +46560,14 @@ Object.defineProperty(exports, "useAnchoredPosition", {
46312
46560
  enumerable: true,
46313
46561
  get: function () { return chunkMYFZYUPR_cjs.useAnchoredPosition; }
46314
46562
  });
46563
+ Object.defineProperty(exports, "isDarkMode", {
46564
+ enumerable: true,
46565
+ get: function () { return chunkNMBYU7D7_cjs.isDarkMode; }
46566
+ });
46567
+ Object.defineProperty(exports, "useIsDarkMode", {
46568
+ enumerable: true,
46569
+ get: function () { return chunkNMBYU7D7_cjs.useIsDarkMode; }
46570
+ });
46315
46571
  Object.defineProperty(exports, "isHtmlEmpty", {
46316
46572
  enumerable: true,
46317
46573
  get: function () { return chunkC7RVKV25_cjs.isHtmlEmpty; }
@@ -46467,6 +46723,7 @@ exports.DateRangeFilter = DateRangeFilter;
46467
46723
  exports.DateRangePicker = DateRangePicker;
46468
46724
  exports.DialogOverlay = DialogOverlay;
46469
46725
  exports.DisclaimerText = DisclaimerText;
46726
+ exports.DockablePanel = DockablePanel;
46470
46727
  exports.DocumentDetectionOverlay = DocumentDetectionOverlay;
46471
46728
  exports.DocumentScanner = DocumentScanner;
46472
46729
  exports.DropZone = DropZone;