@magemetrics/ai 0.11.3 → 0.11.4
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/dist/react/ai.js +7443 -7330
- package/dist/react/index.d.ts +43 -25
- package/dist/styles.css +1 -1
- package/dist/web-component/index.d.ts +121 -1090
- package/dist/web-component/web-component.es.js +36089 -45163
- package/package.json +14 -15
package/dist/react/index.d.ts
CHANGED
|
@@ -214,6 +214,15 @@ declare type ConfigurableChatComponentProps = {
|
|
|
214
214
|
appearance?: AppearanceConfig;
|
|
215
215
|
};
|
|
216
216
|
|
|
217
|
+
/** Context usage — the modal reuses an ancestor `MageMetricsContextProvider`. */
|
|
218
|
+
declare type ContextManagedModalProps = ManagedModalInnerProps & {
|
|
219
|
+
apiKey?: never;
|
|
220
|
+
externalJwt?: never;
|
|
221
|
+
apiUrl?: never;
|
|
222
|
+
components?: never;
|
|
223
|
+
applicationName?: never;
|
|
224
|
+
};
|
|
225
|
+
|
|
217
226
|
/** @deprecated This type is no longer used and will be removed in a future version. */
|
|
218
227
|
declare type ControlledModalProps = {
|
|
219
228
|
visible: boolean;
|
|
@@ -450,23 +459,18 @@ declare type MageMetricsPublicContextProviderProps = PropsWithChildren<Pick<Mage
|
|
|
450
459
|
|
|
451
460
|
export declare const ManagedModal: React.FC<ManagedModalProps>;
|
|
452
461
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
apiUrl: string;
|
|
462
|
+
/**
|
|
463
|
+
* Props shared by both standalone and context-aware usage of `ManagedModal`.
|
|
464
|
+
* These are the props that `ManagedModalInner` actually consumes — they have
|
|
465
|
+
* nothing to do with provider initialisation.
|
|
466
|
+
*/
|
|
467
|
+
declare type ManagedModalInnerProps = ModalProps & {
|
|
460
468
|
/** Whether to disable canvas functionality in conversations */
|
|
461
469
|
disableCanvas?: boolean;
|
|
462
470
|
/** Whether to render data freshness info in the conversation header */
|
|
463
471
|
showDataFreshness?: boolean;
|
|
464
472
|
/** Where to persist modal state (localStorage, queryParam, or none) */
|
|
465
473
|
persist?: PersistenceOptions;
|
|
466
|
-
/** Custom component overrides for extending functionality */
|
|
467
|
-
components?: Components;
|
|
468
|
-
/** Application name to associate with flows created through this modal */
|
|
469
|
-
applicationName?: string;
|
|
470
474
|
/**
|
|
471
475
|
* Appearance configuration for customizing the visual style.
|
|
472
476
|
* Includes brand colors and modal-specific styling options.
|
|
@@ -479,10 +483,7 @@ declare type ManagedModalBaseProps = ModalProps & {
|
|
|
479
483
|
};
|
|
480
484
|
};
|
|
481
485
|
|
|
482
|
-
|
|
483
|
-
* Props for ManagedModal component.
|
|
484
|
-
*/
|
|
485
|
-
declare type ManagedModalProps = ManagedModalBaseProps;
|
|
486
|
+
declare type ManagedModalProps = StandaloneManagedModalProps | ContextManagedModalProps;
|
|
486
487
|
|
|
487
488
|
declare const MessagesContainer: default_2.FC;
|
|
488
489
|
|
|
@@ -610,6 +611,32 @@ export declare const StandaloneDataTable: React.FC<{
|
|
|
610
611
|
onStateChange?: (state: DataTableState) => void;
|
|
611
612
|
}>;
|
|
612
613
|
|
|
614
|
+
/**
|
|
615
|
+
* Props for ManagedModal component.
|
|
616
|
+
*
|
|
617
|
+
* When rendered inside a `MageMetricsContextProvider`, the modal reuses the
|
|
618
|
+
* parent context instead of creating a duplicate. In that case `apiKey`,
|
|
619
|
+
* `externalJwt`, `apiUrl`, `components`, and `applicationName` must **not**
|
|
620
|
+
* be passed (they are inherited from the parent provider).
|
|
621
|
+
*
|
|
622
|
+
* When rendered standalone (no parent context), `apiKey`, `externalJwt`, and
|
|
623
|
+
* `apiUrl` are **required**, and `components`/`applicationName` may optionally
|
|
624
|
+
* be provided.
|
|
625
|
+
*/
|
|
626
|
+
/** Standalone usage — the modal creates its own `MageMetricsContextProvider`. */
|
|
627
|
+
declare type StandaloneManagedModalProps = ManagedModalInnerProps & {
|
|
628
|
+
/** API key for authenticating with the MageMetrics service */
|
|
629
|
+
apiKey: string;
|
|
630
|
+
/** External JWT token for user authentication */
|
|
631
|
+
externalJwt: string;
|
|
632
|
+
/** Base URL for the MageMetrics API */
|
|
633
|
+
apiUrl: string;
|
|
634
|
+
/** Custom component overrides for extending functionality */
|
|
635
|
+
components?: Components;
|
|
636
|
+
/** Application name to associate with flows created through this modal */
|
|
637
|
+
applicationName?: string;
|
|
638
|
+
};
|
|
639
|
+
|
|
613
640
|
declare type StartOptions = DisplayControlProps & {
|
|
614
641
|
/** Label text displayed above the chat launcher input */
|
|
615
642
|
label?: string;
|
|
@@ -1083,22 +1110,13 @@ withTitle: boolean;
|
|
|
1083
1110
|
exportingEnabled?: boolean;
|
|
1084
1111
|
} & RefAttributes<HTMLDivElement>>;
|
|
1085
1112
|
|
|
1086
|
-
export declare type WebComponentManagedModalProps =
|
|
1113
|
+
export declare type WebComponentManagedModalProps = StandaloneManagedModalProps & {
|
|
1087
1114
|
enableCsvDownload: boolean;
|
|
1088
1115
|
};
|
|
1089
1116
|
|
|
1090
1117
|
export { }
|
|
1091
1118
|
|
|
1092
1119
|
|
|
1093
|
-
declare module "react" {
|
|
1094
|
-
namespace JSX {
|
|
1095
|
-
interface IntrinsicElements {
|
|
1096
|
-
"magemetrics-ai": WebComponentManagedModalProps;
|
|
1097
|
-
}
|
|
1098
|
-
}
|
|
1099
|
-
}
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
1120
|
declare module "react" {
|
|
1103
1121
|
namespace JSX {
|
|
1104
1122
|
interface IntrinsicElements {
|