@epam/ai-dial-chat-shared 1.3.0-dev.331 → 1.3.0-dev.342
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/UnsavedChangesProvider/UnsavedChangesProvider.d.ts +22 -0
- package/components/UnsavedChangesProvider/UnsavedChangesProvider.d.ts.map +1 -0
- package/components/UnsavedChangesProvider/UnsavedChangesProvider.js +57 -0
- package/components/UnsavedChangesProvider/unsaved-changes-context.d.ts +44 -0
- package/components/UnsavedChangesProvider/unsaved-changes-context.d.ts.map +1 -0
- package/components/UnsavedChangesProvider/unsaved-changes-context.js +13 -0
- package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts.map +1 -1
- package/file-manager/OperationLoaderModal/OperationLoaderModal.js +21 -20
- package/hooks/useUnsavedChangesLeaveConfirmation.d.ts +12 -0
- package/hooks/useUnsavedChangesLeaveConfirmation.d.ts.map +1 -0
- package/hooks/useUnsavedChangesLeaveConfirmation.js +22 -0
- package/hooks/useUnsavedChangesLeaveGuard.d.ts +24 -0
- package/hooks/useUnsavedChangesLeaveGuard.d.ts.map +1 -0
- package/hooks/useUnsavedChangesLeaveGuard.js +24 -0
- package/index.css +1 -1
- package/index.d.ts +4 -0
- package/index.d.ts.map +1 -1
- package/index.js +12 -8
- package/package.json +3 -3
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
/** User-visible strings of the unsaved-changes dialog. */
|
|
3
|
+
export interface UnsavedChangesLabels {
|
|
4
|
+
/** Dialog title, which also names the dialog. Defaults to `'Discard unsaved changes?'`. */
|
|
5
|
+
title?: string;
|
|
6
|
+
/** Dialog message. Defaults to `'You have unsaved changes. Leaving now will discard them.'`. */
|
|
7
|
+
message?: string;
|
|
8
|
+
/** Label of the discarding action. Defaults to `'Discard changes'`. */
|
|
9
|
+
confirmLabel?: string;
|
|
10
|
+
/** Label of the action that keeps the edits. Defaults to `'Keep editing'`. */
|
|
11
|
+
cancelLabel?: string;
|
|
12
|
+
}
|
|
13
|
+
/** Props for `UnsavedChangesProvider`. */
|
|
14
|
+
export interface UnsavedChangesProviderProps {
|
|
15
|
+
/** Subtree whose forms and exits share the dialog. */
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
/** User-visible strings of the dialog; each missing field keeps its English default. */
|
|
18
|
+
labels?: UnsavedChangesLabels;
|
|
19
|
+
}
|
|
20
|
+
/** Owns the single "Discard unsaved changes?" dialog and the dirty state of the one guarded form mounted below it. */
|
|
21
|
+
export declare const UnsavedChangesProvider: FC<UnsavedChangesProviderProps>;
|
|
22
|
+
//# sourceMappingURL=UnsavedChangesProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnsavedChangesProvider.d.ts","sourceRoot":"","sources":["../../../src/components/UnsavedChangesProvider/UnsavedChangesProvider.tsx"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,EAAE,EACP,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAQf,0DAA0D;AAC1D,MAAM,WAAW,oBAAoB;IACnC,2FAA2F;IAC3F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gGAAgG;IAChG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AASD,0CAA0C;AAC1C,MAAM,WAAW,2BAA2B;IAC1C,sDAAsD;IACtD,QAAQ,EAAE,SAAS,CAAC;IACpB,wFAAwF;IACxF,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B;AAED,sHAAsH;AACtH,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CAiFlE,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ConfirmationDialog as e } from "../ConfirmationDialog/ConfirmationDialog.js";
|
|
2
|
+
import { UnsavedChangesContext as t, UnsavedChangesInternalContext as n } from "./unsaved-changes-context.js";
|
|
3
|
+
import { ConfirmationPopupVariant as r } from "@epam/ai-dial-ui-kit";
|
|
4
|
+
import { useCallback as i, useEffect as a, useMemo as o, useRef as s, useState as c } from "react";
|
|
5
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/UnsavedChangesProvider/UnsavedChangesProvider.tsx
|
|
7
|
+
var d = {
|
|
8
|
+
title: "Discard unsaved changes?",
|
|
9
|
+
message: "You have unsaved changes. Leaving now will discard them.",
|
|
10
|
+
confirmLabel: "Discard changes",
|
|
11
|
+
cancelLabel: "Keep editing"
|
|
12
|
+
}, f = ({ children: f, labels: p }) => {
|
|
13
|
+
let [m, h] = c(!1), [g, _] = c(null), v = s(!1), y = {
|
|
14
|
+
title: p?.title ?? d.title,
|
|
15
|
+
message: p?.message ?? d.message,
|
|
16
|
+
confirmLabel: p?.confirmLabel ?? d.confirmLabel,
|
|
17
|
+
cancelLabel: p?.cancelLabel ?? d.cancelLabel
|
|
18
|
+
};
|
|
19
|
+
a(() => () => {
|
|
20
|
+
v.current = !1;
|
|
21
|
+
}, []);
|
|
22
|
+
let b = i((e) => (h(e), () => h(!1)), []), x = i((e) => (v.current = !1, _(e), () => _((t) => t === e ? null : t)), []), S = i((e) => {
|
|
23
|
+
x({
|
|
24
|
+
onDiscard: e,
|
|
25
|
+
shouldAllowUnload: !0
|
|
26
|
+
});
|
|
27
|
+
}, [x]), C = () => {
|
|
28
|
+
g && (_(null), g.shouldAllowUnload && (v.current = !0), g.onDiscard());
|
|
29
|
+
}, w = () => {
|
|
30
|
+
g && (_(null), g.onKeep?.());
|
|
31
|
+
}, T = o(() => ({
|
|
32
|
+
hasUnsavedChanges: m,
|
|
33
|
+
requestDiscard: S
|
|
34
|
+
}), [m, S]), E = o(() => ({
|
|
35
|
+
register: b,
|
|
36
|
+
open: x,
|
|
37
|
+
unloadAllowedRef: v
|
|
38
|
+
}), [b, x]);
|
|
39
|
+
return /* @__PURE__ */ l(n.Provider, {
|
|
40
|
+
value: E,
|
|
41
|
+
children: /* @__PURE__ */ u(t.Provider, {
|
|
42
|
+
value: T,
|
|
43
|
+
children: [f, /* @__PURE__ */ l(e, {
|
|
44
|
+
open: g != null,
|
|
45
|
+
title: y.title,
|
|
46
|
+
message: y.message,
|
|
47
|
+
confirmLabel: y.confirmLabel,
|
|
48
|
+
cancelLabel: y.cancelLabel,
|
|
49
|
+
variant: r.Danger,
|
|
50
|
+
onConfirm: C,
|
|
51
|
+
onClose: w
|
|
52
|
+
})]
|
|
53
|
+
})
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
export { f as UnsavedChangesProvider };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/** Value of {@link useUnsavedChanges}. */
|
|
3
|
+
export interface UnsavedChangesContextValue {
|
|
4
|
+
/** Whether the guarded form reports unsaved changes. `false` when no form is registered. */
|
|
5
|
+
hasUnsavedChanges: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Opens the unsaved-changes dialog. **Discard changes** allows the next page
|
|
8
|
+
* unload, closes the dialog and runs `onDiscard`; **Keep editing** or any
|
|
9
|
+
* dismissal closes it and runs nothing. Used by exits that are not router
|
|
10
|
+
* transitions, such as Log out.
|
|
11
|
+
*/
|
|
12
|
+
requestDiscard: (onDiscard: () => void) => void;
|
|
13
|
+
}
|
|
14
|
+
/** Actions run by the dialog's two outcomes. */
|
|
15
|
+
export interface PendingDiscard {
|
|
16
|
+
/** Runs when the user chooses Discard changes. */
|
|
17
|
+
onDiscard: () => void;
|
|
18
|
+
/** Runs when the user chooses Keep editing or dismisses the dialog. */
|
|
19
|
+
onKeep?: () => void;
|
|
20
|
+
/** Whether confirming lets the next `beforeunload` pass without the native prompt. Defaults to `false`. */
|
|
21
|
+
shouldAllowUnload?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/** Registration and dialog plumbing shared by the provider and the leave-guard hooks. */
|
|
24
|
+
export interface UnsavedChangesInternalContextValue {
|
|
25
|
+
/** Registers the guarded form's dirty state; the returned callback unregisters it. */
|
|
26
|
+
register: (isDirty: boolean) => () => void;
|
|
27
|
+
/**
|
|
28
|
+
* Opens the dialog wired to the given outcomes. The returned callback closes
|
|
29
|
+
* it without running either outcome, and does nothing once the dialog has
|
|
30
|
+
* been answered or another request has replaced it.
|
|
31
|
+
*/
|
|
32
|
+
open: (pending: PendingDiscard) => () => void;
|
|
33
|
+
/** Set once a discard has allowed the page to unload; the `beforeunload` listener skips its prompt while it is `true`. */
|
|
34
|
+
unloadAllowedRef: RefObject<boolean>;
|
|
35
|
+
}
|
|
36
|
+
/** Public unsaved-changes state, read through `useUnsavedChanges`. */
|
|
37
|
+
export declare const UnsavedChangesContext: import('react').Context<UnsavedChangesContextValue | undefined>;
|
|
38
|
+
/** Registration and dialog plumbing, read through `useUnsavedChangesInternal`. */
|
|
39
|
+
export declare const UnsavedChangesInternalContext: import('react').Context<UnsavedChangesInternalContextValue | undefined>;
|
|
40
|
+
/** Returns the guarded form's dirty state and the dialog entry point for exits that are not router transitions; throws outside `UnsavedChangesProvider`. */
|
|
41
|
+
export declare const useUnsavedChanges: () => UnsavedChangesContextValue;
|
|
42
|
+
/** Returns the registration and dialog plumbing for the leave-guard hooks; throws outside `UnsavedChangesProvider`. Not re-exported from the package. */
|
|
43
|
+
export declare const useUnsavedChangesInternal: () => UnsavedChangesInternalContextValue;
|
|
44
|
+
//# sourceMappingURL=unsaved-changes-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unsaved-changes-context.d.ts","sourceRoot":"","sources":["../../../src/components/UnsavedChangesProvider/unsaved-changes-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAElE,0CAA0C;AAC1C,MAAM,WAAW,0BAA0B;IACzC,4FAA4F;IAC5F,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;;;;OAKG;IACH,cAAc,EAAE,CAAC,SAAS,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;CACjD;AAED,gDAAgD;AAChD,MAAM,WAAW,cAAc;IAC7B,kDAAkD;IAClD,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,2GAA2G;IAC3G,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,yFAAyF;AACzF,MAAM,WAAW,kCAAkC;IACjD,sFAAsF;IACtF,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,IAAI,CAAC;IAC3C;;;;OAIG;IACH,IAAI,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,MAAM,IAAI,CAAC;IAC9C,0HAA0H;IAC1H,gBAAgB,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;CACtC;AAED,sEAAsE;AACtE,eAAO,MAAM,qBAAqB,iEAEtB,CAAC;AAEb,kFAAkF;AAClF,eAAO,MAAM,6BAA6B,yEAE9B,CAAC;AAEb,4JAA4J;AAC5J,eAAO,MAAM,iBAAiB,QAAO,0BAQpC,CAAC;AAEF,yJAAyJ;AACzJ,eAAO,MAAM,yBAAyB,QAChC,kCAQH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createContext as e, useContext as t } from "react";
|
|
2
|
+
//#region src/components/UnsavedChangesProvider/unsaved-changes-context.ts
|
|
3
|
+
var n = e(void 0), r = e(void 0), i = () => {
|
|
4
|
+
let e = t(n);
|
|
5
|
+
if (!e) throw Error("useUnsavedChanges must be used within an UnsavedChangesProvider");
|
|
6
|
+
return e;
|
|
7
|
+
}, a = () => {
|
|
8
|
+
let e = t(r);
|
|
9
|
+
if (!e) throw Error("The unsaved-changes leave guard must be used within an UnsavedChangesProvider");
|
|
10
|
+
return e;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { n as UnsavedChangesContext, r as UnsavedChangesInternalContext, i as useUnsavedChanges, a as useUnsavedChangesInternal };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationLoaderModal.d.ts","sourceRoot":"","sources":["../../../src/file-manager/OperationLoaderModal/OperationLoaderModal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGtC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAGlE,6EAA6E;AAC7E,MAAM,WAAW,yBAAyB;IACxC,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,wDAAwD;IACxD,MAAM,CAAC,EAAE,0BAA0B,CAAC;IACpC,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,uFAAuF;AACvF,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,
|
|
1
|
+
{"version":3,"file":"OperationLoaderModal.d.ts","sourceRoot":"","sources":["../../../src/file-manager/OperationLoaderModal/OperationLoaderModal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGtC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAGlE,6EAA6E;AAC7E,MAAM,WAAW,yBAAyB;IACxC,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,wDAAwD;IACxD,MAAM,CAAC,EAAE,0BAA0B,CAAC;IACpC,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,uFAAuF;AACvF,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CA6B9D,CAAC;;AAEF,wBAA0C"}
|
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
import { mergeClasses as e } from "../../utils/merge-class.js";
|
|
2
2
|
import { buildCssVars as t } from "../../utils/build-css-vars.js";
|
|
3
3
|
import n from "./OperationLoaderModal.module.scss.js";
|
|
4
|
-
import {
|
|
5
|
-
import { memo as
|
|
6
|
-
import { jsx as
|
|
4
|
+
import { LiveRegion as r, Popup as i, Spinner as a } from "@epam/ai-dial-ui-kit";
|
|
5
|
+
import { memo as o } from "react";
|
|
6
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
7
|
//#region src/file-manager/OperationLoaderModal/OperationLoaderModal.tsx
|
|
8
|
-
var
|
|
8
|
+
var l = ({ title: o, text: l, cancelLabel: u, onCancel: d, colors: f, textClassName: p = "dial-small-text" }) => /* @__PURE__ */ s(i, {
|
|
9
9
|
className: "h-fit! max-h-full! w-[400px]!",
|
|
10
10
|
open: !0,
|
|
11
11
|
closeOnOutsideClick: !1,
|
|
12
12
|
hideClose: !0,
|
|
13
|
-
onClose:
|
|
14
|
-
overlayStyle: t({ "--olm-text":
|
|
13
|
+
onClose: d,
|
|
14
|
+
overlayStyle: t({ "--olm-text": f?.text }),
|
|
15
15
|
mainButtons: [{
|
|
16
|
-
label:
|
|
17
|
-
onClick:
|
|
16
|
+
label: u,
|
|
17
|
+
onClick: d
|
|
18
18
|
}],
|
|
19
|
-
children: /* @__PURE__ */
|
|
20
|
-
"aria-live": "polite",
|
|
19
|
+
children: /* @__PURE__ */ c("div", {
|
|
21
20
|
className: "flex flex-col items-center gap-4 px-6 py-4 text-center",
|
|
22
|
-
children: [/* @__PURE__ */
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
children: [/* @__PURE__ */ s("span", {
|
|
22
|
+
"aria-hidden": !0,
|
|
23
|
+
children: /* @__PURE__ */ s(a, {
|
|
24
|
+
size: 32,
|
|
25
|
+
fullWidth: !1
|
|
26
|
+
})
|
|
27
|
+
}), /* @__PURE__ */ c(r, {
|
|
27
28
|
className: "flex flex-col gap-1",
|
|
28
|
-
children: [/* @__PURE__ */
|
|
29
|
-
className: e(
|
|
30
|
-
children:
|
|
29
|
+
children: [/* @__PURE__ */ s("div", { children: o }), /* @__PURE__ */ s("div", {
|
|
30
|
+
className: e(p, n.text),
|
|
31
|
+
children: l
|
|
31
32
|
})]
|
|
32
33
|
})]
|
|
33
34
|
})
|
|
34
35
|
});
|
|
35
|
-
|
|
36
|
+
o(l);
|
|
36
37
|
//#endregion
|
|
37
|
-
export {
|
|
38
|
+
export { l as OperationLoaderModal };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Options of {@link useUnsavedChangesLeaveConfirmation}. */
|
|
2
|
+
export interface UnsavedChangesLeaveConfirmationOptions {
|
|
3
|
+
/** Whether a transition is currently held by the host's blocker. */
|
|
4
|
+
isBlocked: boolean;
|
|
5
|
+
/** Lets the held transition continue; runs on Discard changes. */
|
|
6
|
+
onDiscard: () => void;
|
|
7
|
+
/** Drops the held transition; runs on Keep editing or any dismissal. */
|
|
8
|
+
onKeep: () => void;
|
|
9
|
+
}
|
|
10
|
+
/** Opens the `UnsavedChangesProvider` dialog while a transition is blocked, and closes it unanswered once the transition is gone or the caller unmounts. */
|
|
11
|
+
export declare const useUnsavedChangesLeaveConfirmation: ({ isBlocked, onDiscard, onKeep, }: UnsavedChangesLeaveConfirmationOptions) => void;
|
|
12
|
+
//# sourceMappingURL=useUnsavedChangesLeaveConfirmation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUnsavedChangesLeaveConfirmation.d.ts","sourceRoot":"","sources":["../../src/hooks/useUnsavedChangesLeaveConfirmation.ts"],"names":[],"mappings":"AAGA,6DAA6D;AAC7D,MAAM,WAAW,sCAAsC;IACrD,oEAAoE;IACpE,SAAS,EAAE,OAAO,CAAC;IACnB,kEAAkE;IAClE,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,wEAAwE;IACxE,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,4JAA4J;AAC5J,eAAO,MAAM,kCAAkC,GAAI,mCAIhD,sCAAsC,KAAG,IAyB3C,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useUnsavedChangesInternal as e } from "../components/UnsavedChangesProvider/unsaved-changes-context.js";
|
|
2
|
+
import { useEffect as t, useLayoutEffect as n, useRef as r } from "react";
|
|
3
|
+
//#region src/hooks/useUnsavedChangesLeaveConfirmation.ts
|
|
4
|
+
var i = ({ isBlocked: i, onDiscard: a, onKeep: o }) => {
|
|
5
|
+
let { open: s } = e(), c = r({
|
|
6
|
+
onDiscard: a,
|
|
7
|
+
onKeep: o
|
|
8
|
+
});
|
|
9
|
+
n(() => {
|
|
10
|
+
c.current = {
|
|
11
|
+
onDiscard: a,
|
|
12
|
+
onKeep: o
|
|
13
|
+
};
|
|
14
|
+
}, [a, o]), t(() => {
|
|
15
|
+
if (i) return s({
|
|
16
|
+
onDiscard: () => c.current.onDiscard(),
|
|
17
|
+
onKeep: () => c.current.onKeep()
|
|
18
|
+
});
|
|
19
|
+
}, [i, s]);
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { i as useUnsavedChangesLeaveConfirmation };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Options of {@link useUnsavedChangesLeaveGuard}. */
|
|
2
|
+
export interface UnsavedChangesLeaveGuardOptions {
|
|
3
|
+
/** Whether the form currently holds edits that leaving would discard. */
|
|
4
|
+
isDirty: boolean;
|
|
5
|
+
}
|
|
6
|
+
/** Result of {@link useUnsavedChangesLeaveGuard}. */
|
|
7
|
+
export interface UnsavedChangesLeaveGuardResult {
|
|
8
|
+
/**
|
|
9
|
+
* Returns whether a transition must be blocked: `isLeaving` (the host's own
|
|
10
|
+
* "this transition leaves the form" decision) while the form is dirty,
|
|
11
|
+
* unless `allowNextNavigation` armed a bypass, which this call consumes.
|
|
12
|
+
* Stable across renders and reads the latest `isDirty`.
|
|
13
|
+
*/
|
|
14
|
+
shouldBlockLeave: (isLeaving: boolean) => boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Lets exactly one following transition through unblocked. Call it right
|
|
17
|
+
* before the form's own post-save exit, while `isDirty` may still be `true`
|
|
18
|
+
* because the clean state has not re-rendered yet.
|
|
19
|
+
*/
|
|
20
|
+
allowNextNavigation: () => void;
|
|
21
|
+
}
|
|
22
|
+
/** Registers the form's dirty state with `UnsavedChangesProvider`, warns before the page unloads while dirty, and returns a router-agnostic block predicate with a one-shot bypass. */
|
|
23
|
+
export declare const useUnsavedChangesLeaveGuard: ({ isDirty, }: UnsavedChangesLeaveGuardOptions) => UnsavedChangesLeaveGuardResult;
|
|
24
|
+
//# sourceMappingURL=useUnsavedChangesLeaveGuard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUnsavedChangesLeaveGuard.d.ts","sourceRoot":"","sources":["../../src/hooks/useUnsavedChangesLeaveGuard.ts"],"names":[],"mappings":"AAGA,sDAAsD;AACtD,MAAM,WAAW,+BAA+B;IAC9C,yEAAyE;IACzE,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,qDAAqD;AACrD,MAAM,WAAW,8BAA8B;IAC7C;;;;;OAKG;IACH,gBAAgB,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,OAAO,CAAC;IAClD;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,IAAI,CAAC;CACjC;AAED,uLAAuL;AACvL,eAAO,MAAM,2BAA2B,GAAI,cAEzC,+BAA+B,KAAG,8BAuCpC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useUnsavedChangesInternal as e } from "../components/UnsavedChangesProvider/unsaved-changes-context.js";
|
|
2
|
+
import { useCallback as t, useEffect as n, useLayoutEffect as r, useRef as i } from "react";
|
|
3
|
+
//#region src/hooks/useUnsavedChangesLeaveGuard.ts
|
|
4
|
+
var a = ({ isDirty: a }) => {
|
|
5
|
+
let { register: o, unloadAllowedRef: s } = e(), c = i(a), l = i(!1);
|
|
6
|
+
r(() => {
|
|
7
|
+
c.current = a;
|
|
8
|
+
}, [a]), n(() => o(a), [o, a]);
|
|
9
|
+
let u = t((e) => l.current ? (l.current = !1, !1) : c.current && e, []);
|
|
10
|
+
return n(() => {
|
|
11
|
+
if (!a) return;
|
|
12
|
+
let e = (e) => {
|
|
13
|
+
s.current || e.preventDefault();
|
|
14
|
+
};
|
|
15
|
+
return window.addEventListener("beforeunload", e), () => window.removeEventListener("beforeunload", e);
|
|
16
|
+
}, [a, s]), {
|
|
17
|
+
shouldBlockLeave: u,
|
|
18
|
+
allowNextNavigation: t(() => {
|
|
19
|
+
l.current = !0;
|
|
20
|
+
}, [])
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { a as useUnsavedChangesLeaveGuard };
|
package/index.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
._text_89yo1_1{color:var(--olm-text,var(--text-secondary,#57647a))}._surface_186yw_1{background:var(--dfms-surface,var(--bg-layer-base,#f5f7fa))}._tree_186yw_5{border-color:var(--dfms-tree-border,var(--stroke-tertiary,#e0e6f0));background:var(--dfms-tree-bg,var(--bg-layer-raised,#fcfcfc))}._overlay_186yw_10{background:var(--dfms-overlay-backdrop,var(--bg-backdrop,#161b2d4d))}._popup_9ugin_2{background:var(--fmam-bg,var(--bg-layer-raised,#fcfcfc))!important}._title_9ugin_6{color:var(--fmam-title,var(--text-primary,#161b2d))}._agentIconBadge_147d2_1{background:var(--di-icon-bg,var(--bg-entity-icon,var(--bg-layer-sunken,#eef1f7)))}._label_1qwvo_1{color:var(--pes-label-color,var(--text-primary,#161b2d))}._description_1qwvo_5{color:var(--pes-description-color,var(--text-secondary,#57647a))}._icon_18yqy_1{color:var(--nva-icon,var(--text-accent,#1d4ed8))}._title_11w3i_1{color:var(--ih-title-color,var(--text-primary,#161b2d))}._count_11w3i_5{color:var(--ih-count-color,var(--text-secondary,#57647a))}._row_1csuq_1{border-color:var(--rs-border,var(--stroke-tertiary,#e0e6f0));background:var(--rs-bg,var(--bg-layer-sunken,#eef1f7))}._versionTag_1csuq_7{border-color:var(--rs-version-tag-border,var(--stroke-tertiary,#e0e6f0))!important;background:var(--rs-version-tag-bg,var(--bg-control-accent-alpha,#2764d90f))!important;color:var(--rs-version-tag-text,var(--text-accent,#1d4ed8))!important}._info_pkxew_1{--rs-bg:var(--bg-info,#e1eaf9)}._danger_pkxew_5{--rs-bg:var(--bg-control-error-alpha-active,#f7646433);--rs-border:var(--stroke-error-alpha,#ae2f2f73)}._typeLabel_17nhs_1{color:var(--cir-type-label-text,var(--text-secondary,#57647a))}._message_1iqfi_1{color:var(--cfm-message-text,var(--text-primary,#161b2d))}._consequences_1iqfi_5{color:var(--cfm-consequence-text,var(--text-secondary,#57647a))}._footer_1iqfi_9{border-block-start:1px solid var(--cfm-footer-border,var(--stroke-tertiary,#e0e6f0))}._names_g31v4_1{color:var(--cfm-message-text,var(--text-primary,#161b2d))}._more_g31v4_5{color:var(--cfm-consequence-text,var(--text-secondary,#57647a))}._tableHeader_1qvg8_1{background:var(--cm-code-block-header-bg,var(--bg-layer-raised,#fcfcfc));border-color:var(--cm-markdown-border,var(--cm-code-block-border,var(--stroke-secondary,#d1dbea)))}._container_sqe5k_1{background:var(--cm-code-block-bg,var(--bg-layer-raised,#fcfcfc));border-color:var(--cm-code-block-border,var(--stroke-secondary,#d1dbea))}._containerLight_sqe5k_6{background:var(--cm-code-block-bg,var(--bg-layer-raised,#fcfcfc))}._header_sqe5k_10{background:var(--cm-code-block-header-bg,var(--bg-layer-raised,#fcfcfc));border-color:var(--cm-code-block-border,var(--stroke-secondary,#d1dbea))}._languageLabel_sqe5k_15{color:var(--cm-code-block-language,var(--text-secondary,#57647a))}._copiedIcon_sqe5k_19{color:var(--cm-code-block-copied,var(--text-success,#007274))}._scrollContainer_sqe5k_23 .token.table,._scrollContainer_sqe5k_23 .token.table-header-row,._scrollContainer_sqe5k_23 .token.table-line,._scrollContainer_sqe5k_23 .token.table-data-rows{display:inline}._scrollContainer_sqe5k_23{scrollbar-width:thin;scrollbar-color:var(--cm-code-block-scrollbar,var(--stroke-primary,#57647a)) transparent}._scrollContainer_sqe5k_23::-webkit-scrollbar{width:4px;height:4px}._scrollContainer_sqe5k_23::-webkit-scrollbar-track{background-color:#0000}._scrollContainer_sqe5k_23::-webkit-scrollbar-thumb{background-color:var(--cm-code-block-scrollbar,var(--stroke-primary,#57647a));border-radius:4px}._tableContainer_82t2b_1{background:var(--cm-code-block-bg,var(--bg-layer-raised,#fcfcfc));border-color:var(--cm-markdown-border,var(--cm-code-block-border,var(--stroke-secondary,#d1dbea)))}._tableContainerLight_82t2b_6{background:var(--cm-code-block-bg,var(--bg-layer-base,#f5f7fa))}._actions_82t2b_10{border-color:var(--cm-table-actions-border,var(--stroke-tertiary,#e0e6f0));background:var(--cm-table-actions-bg,var(--bg-layer-raised,#fcfcfc))}._copiedIcon_82t2b_15{color:var(--cm-code-block-copied,var(--text-success,#007274))}._scrollContainer_82t2b_19{scrollbar-width:thin;scrollbar-color:var(--cm-table-scrollbar,var(--stroke-primary,#57647a)) transparent}._scrollContainer_82t2b_19::-webkit-scrollbar{width:4px;height:4px}._scrollContainer_82t2b_19::-webkit-scrollbar-track{background-color:#0000}._scrollContainer_82t2b_19::-webkit-scrollbar-thumb{background-color:var(--cm-table-scrollbar,var(--stroke-primary,#57647a));border-radius:4px}._tableHeaderCell_82t2b_35{background:var(--cm-code-block-header-bg,var(--bg-layer-raised,#fcfcfc));height:3rem;color:var(--cm-table-header-text,var(--text-secondary,#57647a))}._sectionRow_82t2b_42 td{background:var(--cm-code-block-header-bg,var(--bg-layer-raised,#fcfcfc))}._rowDivider_82t2b_46{border-block-end:.5px solid var(--cm-table-row-divider,var(--stroke-tertiary,#e0e6f0))}tbody ._row_82t2b_46:hover td{background:var(--cm-table-row-hover-bg,var(--bg-control-accent-alpha-hover,#2764d924))}._tableScrollFadeEnd_82t2b_56{-webkit-mask-image:linear-gradient(to right, var(--cm-table-fade,var(--stroke-black,#161b2d)) 0, var(--cm-table-fade,var(--stroke-black,#161b2d)) calc(100% - 1rem), transparent 100%);mask-image:linear-gradient(to right, var(--cm-table-fade,var(--stroke-black,#161b2d)) 0, var(--cm-table-fade,var(--stroke-black,#161b2d)) calc(100% - 1rem), transparent 100%)}[dir=rtl] ._tableScrollFadeEnd_82t2b_56{-webkit-mask-image:linear-gradient(to left, var(--cm-table-fade,var(--stroke-black,#161b2d)) 0, var(--cm-table-fade,var(--stroke-black,#161b2d)) calc(100% - 1rem), transparent 100%);mask-image:linear-gradient(to left, var(--cm-table-fade,var(--stroke-black,#161b2d)) 0, var(--cm-table-fade,var(--stroke-black,#161b2d)) calc(100% - 1rem), transparent 100%)}._tableScrollFadeStart_82t2b_64{-webkit-mask-image:linear-gradient(to right, transparent 0, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 1rem, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 100%);mask-image:linear-gradient(to right, transparent 0, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 1rem, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 100%)}[dir=rtl] ._tableScrollFadeStart_82t2b_64{-webkit-mask-image:linear-gradient(to left, transparent 0, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 1rem, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 100%);mask-image:linear-gradient(to left, transparent 0, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 1rem, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 100%)}._tableScrollFadeBoth_82t2b_72{-webkit-mask-image:linear-gradient(to right, transparent 0, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 1rem, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) calc(100% - 1rem), transparent 100%);mask-image:linear-gradient(to right, transparent 0, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 1rem, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) calc(100% - 1rem), transparent 100%)}@keyframes _cm-shimmer_1ql91_1{0%{background-position:200%}to{background-position:-200%}}._thinking_1ql91_9{background:linear-gradient(270deg, var(--cm-thinking-inverted,var(--text-primary,#161b2d)) 0%, var(--cm-thinking-secondary,var(--text-secondary,#57647a)) 40%, var(--cm-thinking-inverted,var(--text-primary,#161b2d)) 80%);color:#0000;background-size:200%;-webkit-background-clip:text;background-clip:text;animation:2s linear infinite _cm-shimmer_1ql91_1}._h6_1ql91_18{color:var(--cm-h6-text,var(--text-secondary,#57647a))}._codeInline_1ql91_22{background:var(--cm-code-inline-bg,var(--bg-layer-raised,#fcfcfc));color:var(--cm-code-inline-text,var(--text-primary,#161b2d))}._secondaryBorder_1ql91_27{border-color:var(--cm-markdown-border,var(--stroke-secondary,#d1dbea))}._blockquote_1ql91_31{border-color:var(--cm-blockquote-border,var(--stroke-primary,#57647a));color:var(--cm-blockquote-text,var(--text-secondary,#57647a))}._link_1ql91_36{color:var(--cm-link-text,var(--text-accent,#1d4ed8))}._link_1ql91_36:focus-visible{outline-color:var(--cm-link-focus,var(--stroke-focus,#161b2d))}._scrollContainer_n2oom_1{scrollbar-width:thin;scrollbar-color:var(--cm-math-scrollbar,var(--stroke-primary,#57647a)) transparent}._scrollContainer_n2oom_1::-webkit-scrollbar{height:4px}._scrollContainer_n2oom_1::-webkit-scrollbar-track{background-color:#0000}._scrollContainer_n2oom_1::-webkit-scrollbar-thumb{background-color:var(--cm-math-scrollbar,var(--stroke-primary,#57647a));border-radius:4px}._scrollContainer_n2oom_1:focus-visible{outline:1px solid var(--cm-math-focus,var(--stroke-focus,#161b2d));outline-offset:2px}._mathContent_n2oom_24{width:max-content;min-width:100%;display:block}
|
|
2
2
|
/*$vite$:1*//*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
3
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid}}}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{inset-inline:0}.inset-e-0{inset-inline-end:0}.inset-e-2{inset-inline-end:.5rem}.inset-e-4{inset-inline-end:1rem}.top-0{top:0}.top-2{top:.5rem}.top-\[-6px\]{top:-6px}.bottom-4{bottom:1rem}.bottom-\[calc\(1\.5rem\+env\(safe-area-inset-bottom\)\)\]{bottom:calc(1.5rem + env(safe-area-inset-bottom))}.z-2{z-index:2}.z-10{z-index:10}.z-51{z-index:51}.z-52{z-index:52}.z-70{z-index:70}.mx-0\.5{margin-inline:.125rem}.my-4{margin-block:1rem}.my-5{margin-block:1.25rem}.ms-auto{margin-inline-start:auto}.me-1\.5{margin-inline-end:.375rem}.mt-1{margin-top:.25rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.table{display:table}.size-full{width:100%;height:100%}.h-0{height:0}.h-\[24px\]{height:24px}.h-\[min\(900px\,100dvh\)\]\!{height:min(900px,100dvh)!important}.h-fit\!{height:fit-content!important}.h-full{height:100%}.max-h-\[30vh\]{max-height:30vh}.max-h-\[50vh\]{max-height:50vh}.max-h-\[60vh\]{max-height:60vh}.max-h-\[344px\]{max-height:344px}.max-h-\[calc\(100dvh-3rem\)\]{max-height:calc(100dvh - 3rem)}.max-h-full\!{max-height:100%!important}.min-h-0{min-height:0}.min-h-10{min-height:2.5rem}.w-\[360px\]{width:360px}.w-\[400px\]\!{width:400px!important}.w-full{width:100%}.w-max{width:max-content}.max-w-96{max-width:24rem}.max-w-\[30\%\]{max-width:30%}.max-w-\[45\%\]{max-width:45%}.max-w-\[1600px\]\!{max-width:1600px!important}.max-w-\[min\(600px\,100\%\)\]{max-width:min(600px,100%)}.max-w-full{max-width:100%}.min-w-0{min-width:0}.min-w-full{min-width:100%}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.resize{resize:both}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(.25rem * var(--tw-space-y-reverse));margin-block-end:calc(.25rem * calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:.75rem}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-clip{overflow:clip}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-y-hidden{overflow-y:hidden}.rounded{border-radius:4px}.rounded-\[14px\]{border-radius:14px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-xl{border-radius:.75rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-s-2{border-inline-start-style:var(--tw-border-style);border-inline-start-width:2px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.bg-layer-raised{background-color:var(--bg-layer-raised,#fcfcfc)}.bg-layer-sunken{background-color:var(--bg-layer-sunken,#eef1f7)}.object-contain{object-fit:contain}.p-0{padding:0}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-0{padding-inline:0}.px-1{padding-inline:.25rem}.px-1\.5{padding-inline:.375rem}.px-2{padding-inline:.5rem}.px-3{padding-inline:.75rem}.px-4{padding-inline:1rem}.px-6{padding-inline:1.5rem}.py-0{padding-block:0}.py-0\.5{padding-block:.125rem}.py-1{padding-block:.25rem}.py-2{padding-block:.5rem}.py-2\.5{padding-block:.625rem}.py-4{padding-block:1rem}.py-\[7px\]{padding-block:7px}.ps-4{padding-inline-start:1rem}.ps-5{padding-inline-start:1.25rem}.ps-\[2em\]{padding-inline-start:2em}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pb-0{padding-bottom:0}.pb-4{padding-bottom:1rem}.text-center{text-align:center}.text-end{text-align:end}.text-start{text-align:start}.align-middle{vertical-align:middle}.align-top{vertical-align:top}.\[text-wrap\:balance\]{text-wrap:balance}.\[text-wrap\:pretty\]{text-wrap:pretty}.\[overflow-wrap\:anywhere\]{overflow-wrap:anywhere}.break-words{overflow-wrap:break-word}.wrap-anywhere{overflow-wrap:anywhere}.wrap-break-word{overflow-wrap:break-word}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.decoration-current\/60{text-decoration-color:currentColor}@supports (color:color-mix(in lab, red, red)){.decoration-current\/60{-webkit-text-decoration-color:color-mix(in oklab, currentcolor 60%, transparent);-webkit-text-decoration-color:color-mix(in oklab, currentcolor 60%, transparent);text-decoration-color:color-mix(in oklab, currentcolor 60%, transparent)}}.underline-offset-2{text-underline-offset:2px}.opacity-0{opacity:0}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-chat-button{--tw-shadow:0 2px 12px 0 var(--tw-shadow-color,var(--shadow-xs-1,#2764d933)), 0 2px 6px 0 var(--tw-shadow-color,var(--shadow-xs-2,#161b2d08));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xs{--tw-shadow:0 0 8px 1px var(--tw-shadow-color,var(--shadow-xs-1,#2764d933));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,cubic-bezier(.4, 0, .2, 1));transition-duration:var(--tw-duration,.15s)}@media (hover:hover){.group-hover\/table\:opacity-100:is(:where(.group\/table):hover *){opacity:1}}.first\:mt-0:first-child{margin-top:0}.last\:mb-0:last-child{margin-bottom:0}.focus-within\:opacity-100:focus-within{opacity:1}@media (hover:hover){.hover\:decoration-current:hover{text-decoration-color:currentColor}}.focus-visible\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.rtl\:flex-row-reverse:where(:dir(rtl),[dir=rtl],[dir=rtl] *){flex-direction:row-reverse}.rtl\:justify-start:where(:dir(rtl),[dir=rtl],[dir=rtl] *){justify-content:flex-start}@media (max-width:1279px){.mobile\:h-full\!{height:100%!important}.mobile\:max-w-full\!{max-width:100%!important}.mobile\:flex-1{flex:1}.mobile\:rounded-none{border-radius:0}.mobile\:p-0{padding:0}}@media (min-width:1280px){.desktop\:inset-s-auto{inset-inline-start:auto}.desktop\:me-6{margin-inline-end:1.5rem}.desktop\:w-\[min\(600px\,calc\(100vw-3rem\)\)\]{width:min(600px,100vw - 3rem)}.desktop\:w-auto{width:auto}.desktop\:items-end{align-items:flex-end}.desktop\:p-4{padding:1rem}.desktop\:px-0{padding-inline:0}.desktop\:px-6{padding-inline:1.5rem}}.\[\&_\.w-md-editor\:not\(\.w-md-editor-fullscreen\)\]\:\!h-\[var\(--resizable-field-max-height\,70vh\)\] .w-md-editor:not(.w-md-editor-fullscreen){height:var(--resizable-field-max-height,70vh)!important}.\[\&_\.w-md-editor\:not\(\.w-md-editor-fullscreen\)\]\:max-h-\[var\(--resizable-field-max-height\,70vh\)\] .w-md-editor:not(.w-md-editor-fullscreen){max-height:var(--resizable-field-max-height,70vh)}.\[\&_\.wmde-markdown_ul\]\:list-disc .wmde-markdown ul{list-style-type:disc}.\[\&_\.wmde-markdown_ul_ul\]\:list-\[circle\] .wmde-markdown ul ul{list-style-type:circle}.\[\&_\.wmde-markdown_ul_ul_ul\]\:list-\[square\] .wmde-markdown ul ul ul{list-style-type:square}.\[\&_\.wmde-markdown\>ol\]\:list-decimal .wmde-markdown>ol{list-style-type:decimal}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}
|
|
3
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid}}}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{inset-inline:0}.inset-e-0{inset-inline-end:0}.inset-e-2{inset-inline-end:.5rem}.inset-e-4{inset-inline-end:1rem}.top-0{top:0}.top-2{top:.5rem}.top-\[-6px\]{top:-6px}.bottom-4{bottom:1rem}.bottom-\[calc\(1\.5rem\+env\(safe-area-inset-bottom\)\)\]{bottom:calc(1.5rem + env(safe-area-inset-bottom))}.z-2{z-index:2}.z-10{z-index:10}.z-51{z-index:51}.z-52{z-index:52}.z-70{z-index:70}.mx-0\.5{margin-inline:.125rem}.my-4{margin-block:1rem}.my-5{margin-block:1.25rem}.ms-auto{margin-inline-start:auto}.me-1\.5{margin-inline-end:.375rem}.mt-1{margin-top:.25rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.table{display:table}.size-full{width:100%;height:100%}.h-0{height:0}.h-\[24px\]{height:24px}.h-\[min\(900px\,100dvh\)\]\!{height:min(900px,100dvh)!important}.h-fit\!{height:fit-content!important}.h-full{height:100%}.max-h-\[30vh\]{max-height:30vh}.max-h-\[50vh\]{max-height:50vh}.max-h-\[60vh\]{max-height:60vh}.max-h-\[344px\]{max-height:344px}.max-h-\[calc\(100dvh-3rem\)\]{max-height:calc(100dvh - 3rem)}.max-h-full\!{max-height:100%!important}.min-h-0{min-height:0}.min-h-10{min-height:2.5rem}.w-\[360px\]{width:360px}.w-\[400px\]\!{width:400px!important}.w-full{width:100%}.w-max{width:max-content}.max-w-96{max-width:24rem}.max-w-\[30\%\]{max-width:30%}.max-w-\[45\%\]{max-width:45%}.max-w-\[1600px\]\!{max-width:1600px!important}.max-w-\[min\(600px\,100\%\)\]{max-width:min(600px,100%)}.max-w-full{max-width:100%}.min-w-0{min-width:0}.min-w-full{min-width:100%}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.resize{resize:both}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(.25rem * var(--tw-space-y-reverse));margin-block-end:calc(.25rem * calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:.75rem}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-clip{overflow:clip}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-y-hidden{overflow-y:hidden}.rounded{border-radius:4px}.rounded-\[14px\]{border-radius:14px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-xl{border-radius:.75rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-s-2{border-inline-start-style:var(--tw-border-style);border-inline-start-width:2px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.bg-layer-raised{background-color:var(--bg-layer-raised,#fcfcfc)}.bg-layer-sunken{background-color:var(--bg-layer-sunken,#eef1f7)}.object-contain{object-fit:contain}.p-0{padding:0}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-0{padding-inline:0}.px-1{padding-inline:.25rem}.px-1\.5{padding-inline:.375rem}.px-2{padding-inline:.5rem}.px-3{padding-inline:.75rem}.px-4{padding-inline:1rem}.px-6{padding-inline:1.5rem}.py-0{padding-block:0}.py-0\.5{padding-block:.125rem}.py-1{padding-block:.25rem}.py-2{padding-block:.5rem}.py-2\.5{padding-block:.625rem}.py-4{padding-block:1rem}.py-\[7px\]{padding-block:7px}.ps-4{padding-inline-start:1rem}.ps-5{padding-inline-start:1.25rem}.ps-\[2em\]{padding-inline-start:2em}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pb-0{padding-bottom:0}.pb-4{padding-bottom:1rem}.text-center{text-align:center}.text-end{text-align:end}.text-start{text-align:start}.align-middle{vertical-align:middle}.align-top{vertical-align:top}.\[text-wrap\:balance\]{text-wrap:balance}.\[text-wrap\:pretty\]{text-wrap:pretty}.\[overflow-wrap\:anywhere\]{overflow-wrap:anywhere}.break-words{overflow-wrap:break-word}.wrap-anywhere{overflow-wrap:anywhere}.wrap-break-word{overflow-wrap:break-word}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.decoration-current\/60{text-decoration-color:currentColor}@supports (color:color-mix(in lab, red, red)){.decoration-current\/60{-webkit-text-decoration-color:color-mix(in oklab, currentcolor 60%, transparent);-webkit-text-decoration-color:color-mix(in oklab, currentcolor 60%, transparent);text-decoration-color:color-mix(in oklab, currentcolor 60%, transparent)}}.underline-offset-2{text-underline-offset:2px}.opacity-0{opacity:0}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-chat-button{--tw-shadow:0 2px 12px 0 var(--tw-shadow-color,var(--shadow-xs-1,#2764d933)), 0 2px 6px 0 var(--tw-shadow-color,var(--shadow-xs-2,#161b2d08));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xs{--tw-shadow:0 0 8px 1px var(--tw-shadow-color,var(--shadow-xs-1,#2764d933));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,cubic-bezier(.4, 0, .2, 1));transition-duration:var(--tw-duration,.15s)}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,cubic-bezier(.4, 0, .2, 1));transition-duration:var(--tw-duration,.15s)}@media (hover:hover){.group-hover\/table\:opacity-100:is(:where(.group\/table):hover *){opacity:1}}.first\:mt-0:first-child{margin-top:0}.last\:mb-0:last-child{margin-bottom:0}.focus-within\:opacity-100:focus-within{opacity:1}@media (hover:hover){.hover\:decoration-current:hover{text-decoration-color:currentColor}}.focus-visible\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.rtl\:flex-row-reverse:where(:dir(rtl),[dir=rtl],[dir=rtl] *){flex-direction:row-reverse}.rtl\:justify-start:where(:dir(rtl),[dir=rtl],[dir=rtl] *){justify-content:flex-start}@media (max-width:1279px){.mobile\:h-full\!{height:100%!important}.mobile\:max-w-full\!{max-width:100%!important}.mobile\:flex-1{flex:1}.mobile\:rounded-none{border-radius:0}.mobile\:p-0{padding:0}}@media (min-width:1280px){.desktop\:inset-s-auto{inset-inline-start:auto}.desktop\:me-6{margin-inline-end:1.5rem}.desktop\:w-\[min\(600px\,calc\(100vw-3rem\)\)\]{width:min(600px,100vw - 3rem)}.desktop\:w-auto{width:auto}.desktop\:items-end{align-items:flex-end}.desktop\:p-4{padding:1rem}.desktop\:px-0{padding-inline:0}.desktop\:px-6{padding-inline:1.5rem}}.\[\&_\.w-md-editor\:not\(\.w-md-editor-fullscreen\)\]\:\!h-\[var\(--resizable-field-max-height\,70vh\)\] .w-md-editor:not(.w-md-editor-fullscreen){height:var(--resizable-field-max-height,70vh)!important}.\[\&_\.w-md-editor\:not\(\.w-md-editor-fullscreen\)\]\:max-h-\[var\(--resizable-field-max-height\,70vh\)\] .w-md-editor:not(.w-md-editor-fullscreen){max-height:var(--resizable-field-max-height,70vh)}.\[\&_\.wmde-markdown_ul\]\:list-disc .wmde-markdown ul{list-style-type:disc}.\[\&_\.wmde-markdown_ul_ul\]\:list-\[circle\] .wmde-markdown ul ul{list-style-type:circle}.\[\&_\.wmde-markdown_ul_ul_ul\]\:list-\[square\] .wmde-markdown ul ul ul{list-style-type:square}.\[\&_\.wmde-markdown\>ol\]\:list-decimal .wmde-markdown>ol{list-style-type:decimal}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}
|
package/index.d.ts
CHANGED
|
@@ -82,6 +82,10 @@ export * from './hooks/useIsTablet';
|
|
|
82
82
|
export * from './hooks/useIsTextClipped';
|
|
83
83
|
export * from './hooks/useTextRefinement';
|
|
84
84
|
export * from './hooks/useUnsavedChangesGuard';
|
|
85
|
+
export * from './hooks/useUnsavedChangesLeaveGuard';
|
|
86
|
+
export * from './hooks/useUnsavedChangesLeaveConfirmation';
|
|
87
|
+
export * from './components/UnsavedChangesProvider/UnsavedChangesProvider';
|
|
88
|
+
export { useUnsavedChanges, type UnsavedChangesContextValue, } from './components/UnsavedChangesProvider/unsaved-changes-context';
|
|
85
89
|
export * from './file-manager/index';
|
|
86
90
|
export { CHAT_SHARED_CLASS } from './constants/public-class-names';
|
|
87
91
|
export { isSkillSelectionUnsupported } from './utils/is-skill-selection-unsupported';
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAg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./hooks/useIsTablet.js";
|
|
80
80
|
import { useIsTextClipped as Vt } from "./hooks/useIsTextClipped.js";
|
|
81
81
|
import { useUnsavedChangesGuard as Ht } from "./hooks/useUnsavedChangesGuard.js";
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
|
|
82
|
+
import { useUnsavedChanges as Ut } from "./components/UnsavedChangesProvider/unsaved-changes-context.js";
|
|
83
|
+
import { useUnsavedChangesLeaveGuard as Wt } from "./hooks/useUnsavedChangesLeaveGuard.js";
|
|
84
|
+
import { useUnsavedChangesLeaveConfirmation as Gt } from "./hooks/useUnsavedChangesLeaveConfirmation.js";
|
|
85
|
+
import { UnsavedChangesProvider as Kt } from "./components/UnsavedChangesProvider/UnsavedChangesProvider.js";
|
|
86
|
+
import { DialFileManagerActionProfile as qt, DialFileManagerVariant as Jt } from "./file-manager/file-manager-variant.js";
|
|
87
|
+
import { getParentFolderPath as Yt, isHiddenPath as Xt } from "./file-manager/path.js";
|
|
88
|
+
import { FileDownloadStatus as Zt, FileUploadFailureReason as Qt, FileUploadStatus as $t, isDownloadInProgress as en, isUploadInProgress as tn } from "./file-manager/upload-batch.js";
|
|
89
|
+
import { useGridEditingScroll as nn } from "./file-manager/useGridEditingScroll/useGridEditingScroll.js";
|
|
90
|
+
import { OperationLoaderModal as rn } from "./file-manager/OperationLoaderModal/OperationLoaderModal.js";
|
|
91
|
+
import { isSkillSelectionUnsupported as an } from "./utils/is-skill-selection-unsupported.js";
|
|
92
|
+
import { toConversationTransferQueueItems as on } from "./conversation-transfer/conversation-transfer-queue.js";
|
|
93
|
+
export { Ye as ActionMenu, m as AttachmentErrorReason, h as AttachmentType, Ce as BASE_LG_ICON_PROPS, we as BASE_MD_ICON_PROPS, s as BackgroundGenerationStatus, _t as CHAT_SHARED_CLASS, Ot as COMPACT_MARKDOWN_CLASS_NAMES, g as CatalogEntityType, y as CodeBlockTheme, ct as ConfirmationDialog, st as ConfirmationFooter, it as ConfirmationIdentityCard, at as ConfirmationIdentityRow, ot as ConfirmationView, a as ConversationKind, e as ConversationTransferErrorCode, t as ConversationTransferJobStatus, n as ConversationTransferSubjectKind, r as ConversationTransferUnitKind, i as ConversationTransferWarningCode, We as CopyButton, Ge as CopyIconButton, kt as DEFAULT_MARKDOWN_CLASS_NAMES, xt as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, lt as DELETE_CONFIRMATION_MAX_LISTED_NAMES, Fe as DESKTOP_BREAKPOINT_PX, Ie as DESKTOP_MEDIA_QUERY, dt as DeleteConfirmationDialog, ft as DeleteConfirmationDrawer, ut as DeleteConfirmationView, Ue as DeploymentIcon, qt as DialFileManagerActionProfile, Jt as DialFileManagerVariant, z as ENTITY_DESCRIPTION_MAX_LENGTH, B as ENTITY_INSTRUCTIONS_MAX_LENGTH, V as ENTITY_NAME_MAX_LENGTH, pe as ENTITY_TYPE_BG_COLOR, me as ENTITY_TYPE_COLOR, nt as EntityHeader, et as EntityTypeLabel, tt as FeaturedChip, Zt as FileDownloadStatus, _ as FileExtension, Qt as FileUploadFailureReason, $t as FileUploadStatus, o as FilterTab, Te as HIDDEN_FILE, He as InitialsAvatar, $e as ItemHeader, Oe as MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME, ke as MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME, Me as MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME, St as MARKDOWN_TABLE_CSV_MIME_TYPE, jt as MDMessageViewer, v as MIMEType, b as MIME_TYPE_ALIASES, x as MIME_TYPE_AUDIO_PREFIX, S as MIME_TYPE_EXT_MAP, C as MIME_TYPE_WILDCARD, Le as MOBILE_MAX_WIDTH_PX, Re as MOBILE_MEDIA_QUERY, bt as MarkdownCodeBlock, Et as MarkdownRenderer, Tt as MarkdownTable, Ct as MarkdownTableCopyFormat, Mt as MarkdownWithPlaceholders, c as MessageRating, l as MessageRole, Ze as NewVersionAlert, Qe as NotificationStack, rn as OperationLoaderModal, ze as PHONE_MEDIA_QUERY, P as PROHIBITED_CONVERSATION_NAME_CHARS_RE, he as PROMPT_PARAM_DEFAULT_SEPARATOR, ge as PROMPT_PARAM_PATTERN, _e as PROMPT_VARIABLE_CLASS_NAME, Ee as PUBLIC_BUCKET, Xe as PanelEmptyState, At as PlainTextRenderer, Ae as RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE, je as RESIZABLE_TEXTAREA_CLASS_NAME, u as RequestStatus, rt as ResourceSummary, p as ResponseFormat, Ne as SELECT_LIST_MAX_HEIGHT_CLASS_NAME, Pe as SELECT_LIST_MAX_HEIGHT_PX, d as StageStatus, f as StatusEvent, Be as TABLET_BREAKPOINT_PX, Ve as TABLET_MEDIA_QUERY, De as TAG_INPUT_TAG_CLASS_NAME, pt as TableHeader, gt as TextRefinementField, mt as TextRefinementState, Kt as UnsavedChangesProvider, ae as base64ToBlob, G as buildCssVars, Nt as buildInlineSegmentSource, ve as buildPromptParamDefaults, X as copyMarkdownAsRichText, Z as copyToClipboard, Pt as createInlineSegmentComponents, Ft as createRehypeInlineSegments, M as decodeJsonFromBase64, Dt as defaultMarkdownComponents, oe as downloadTextFile, N as encodeJsonToBase64, se as ensureDownloadFilename, H as exceedsMaxLength, Ke as extractInitials, ye as extractPromptParams, ne as formatCost, te as formatFileSize, ee as formatLastUsed, re as formatPrice, ie as formatUnitPrice, Se as generateUUID, w as getAttachmentTypeFromMime, T as getBaseMimeType, ce as getFileExtensionForLanguage, Yt as getParentFolderPath, F as getUtf8ByteLength, U as hasControlCharacters, E as inferMimeTypeFromPath, k as isAnnotationSelector, Y as isAudioTranscriptionSupported, en as isDownloadInProgress, Xt as isHiddenPath, an as isSkillSelectionUnsupported, K as isStatusMessage, fe as isSyntaxHighlightingAllowed, tn as isUploadInProgress, $ as makeOutsideInert, Q as markdownToRichTextHtml, W as mergeClasses, q as messageAttachmentToDisplayAttachment, J as messageAttachmentsToDisplayAttachments, D as normalizeMimeType, A as normalizePersistedHtmlTagAttachmentType, j as normalizeRawAnnotations, qe as pickAvatarColor, be as rehypePromptVariables, xe as resolvePromptParams, yt as restrainedSyntaxTheme, I as sanitizeConversationName, wt as serializeMarkdownTableRows, L as stripTrailingDots, O as stripUrlQueryAndFragment, on as toConversationTransferQueueItems, le as triggerAnchorDownload, ue as triggerBlobDownload, R as truncateToUtf8Bytes, de as tryBase64ToBytes, Lt as useAvailableHeightCap, vt as useCodeCopy, It as useCollapsedText, Rt as useControlErrorAssociation, nn as useGridEditingScroll, zt as useIsMobile, Je as useIsPhone, Bt as useIsTablet, Vt as useIsTextClipped, ht as useTextRefinement, Ut as useUnsavedChanges, Ht as useUnsavedChangesGuard, Gt as useUnsavedChangesLeaveConfirmation, Wt as useUnsavedChangesLeaveGuard };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-chat-shared",
|
|
3
3
|
"description": "Shared domain models, utilities, and UI components for AI DIAL Chat libraries",
|
|
4
|
-
"version": "1.3.0-dev.
|
|
4
|
+
"version": "1.3.0-dev.342",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": [
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": "^19.2.8",
|
|
35
35
|
"react-dom": "^19.2.8",
|
|
36
|
-
"@epam/ai-dial-ui-kit": "^0.16.0
|
|
37
|
-
"@epam/ai-dial-react-file-manager": "^0.4.0
|
|
36
|
+
"@epam/ai-dial-ui-kit": "^0.16.0",
|
|
37
|
+
"@epam/ai-dial-react-file-manager": "^0.4.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"ag-grid-community": "^35.3.0",
|