@mochabug/adapt-react 1.0.1-rc.19 → 1.0.1-rc.20
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.
|
@@ -7,7 +7,7 @@ void AdaptAutomationElement;
|
|
|
7
7
|
* React component for embedding Adapt automations.
|
|
8
8
|
* Renders `<adapt-automation>` custom element and syncs non-serializable properties via ref.
|
|
9
9
|
*/
|
|
10
|
-
export const AdaptAutomation = forwardRef(function AdaptAutomation({ automationId, sessionToken, authToken, transmitter, signals, challengeToken, requiresChallenge, capWidgetOptions, inheritToken, inheritFrom, forkDisplay, darkMode, autoResizing, allowFloating, allowDocking, allowDialogDocking, allowMinimize, allowMaximize, floatingAutoResize, onSession, onOutput, onForkActive, onError, classNames, styles, persist, text, theme, className, style, }, ref) {
|
|
10
|
+
export const AdaptAutomation = forwardRef(function AdaptAutomation({ automationId, sessionToken, authToken, transmitter, signals, challengeToken, requiresChallenge, capWidgetOptions, inheritToken, inheritFrom, forkDisplay, darkMode, autoResizing, allowFloating, allowDocking, allowDialogDocking, allowMinimize, allowMaximize, floatingAutoResize, onSession, onOutput, onForkActive, onError, classNames, styles, persist, text, theme, debug, className, style, }, ref) {
|
|
11
11
|
const internalRef = useRef(null);
|
|
12
12
|
// Merge refs
|
|
13
13
|
const setRef = (element) => {
|
|
@@ -42,5 +42,5 @@ export const AdaptAutomation = forwardRef(function AdaptAutomation({ automationI
|
|
|
42
42
|
return (_jsx("adapt-automation", { ref: setRef, className: className, style: style, "automation-id": automationId, "session-token": sessionToken, "auth-token": authToken, transmitter: transmitter, "challenge-token": challengeToken, "requires-challenge": requiresChallenge ? "" : undefined, "inherit-token": inheritToken, "fork-display-mode": forkDisplay?.mode, "side-by-side-split": forkDisplay?.mode === "side-by-side" &&
|
|
43
43
|
forkDisplay.split !== undefined
|
|
44
44
|
? String(forkDisplay.split)
|
|
45
|
-
: undefined, "dark-mode": darkMode ? "" : undefined, "auto-resizing": autoResizing ? "" : undefined, "allow-floating": allowFloating === false ? "false" : undefined, "allow-docking": allowDocking === false ? "false" : undefined, "allow-dialog-docking": allowDialogDocking === false ? "false" : undefined, "allow-minimize": allowMinimize === false ? "false" : undefined, "allow-maximize": allowMaximize === false ? "false" : undefined, "floating-auto-resize": floatingAutoResize ? "" : undefined, persist: persist ?
|
|
45
|
+
: undefined, "dark-mode": darkMode ? "" : undefined, "auto-resizing": autoResizing ? "" : undefined, "allow-floating": allowFloating === false ? "false" : undefined, "allow-docking": allowDocking === false ? "false" : undefined, "allow-dialog-docking": allowDialogDocking === false ? "false" : undefined, "allow-minimize": allowMinimize === false ? "false" : undefined, "allow-maximize": allowMaximize === false ? "false" : undefined, "floating-auto-resize": floatingAutoResize ? "" : undefined, persist: persist ? true : undefined, debug: debug ? true : undefined }));
|
|
46
46
|
});
|
|
@@ -14,13 +14,14 @@ declare module "react" {
|
|
|
14
14
|
"side-by-side-split"?: string;
|
|
15
15
|
"dark-mode"?: string;
|
|
16
16
|
"auto-resizing"?: string;
|
|
17
|
-
persist?:
|
|
17
|
+
persist?: boolean;
|
|
18
18
|
"allow-floating"?: string;
|
|
19
19
|
"allow-docking"?: string;
|
|
20
20
|
"allow-dialog-docking"?: string;
|
|
21
21
|
"allow-minimize"?: string;
|
|
22
22
|
"allow-maximize"?: string;
|
|
23
23
|
"floating-auto-resize"?: string;
|
|
24
|
+
debug?: boolean;
|
|
24
25
|
}, AdaptAutomationElement>;
|
|
25
26
|
}
|
|
26
27
|
}
|
|
@@ -64,6 +65,8 @@ export interface AdaptAutomationProps {
|
|
|
64
65
|
text?: StatusText;
|
|
65
66
|
/** Theme configuration for semantic theming */
|
|
66
67
|
theme?: AdaptTheme;
|
|
68
|
+
/** Enable debug logging */
|
|
69
|
+
debug?: boolean;
|
|
67
70
|
/** CSS class name for the host element */
|
|
68
71
|
className?: string;
|
|
69
72
|
/** Inline styles for the host element */
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export * from "@mochabug/adapt-web";
|
|
2
|
+
export type { AdaptError, AdaptErrorKind, AdaptTheme, AdaptWebClientOptions, CapWidgetI18n, CapWidgetOptions, ChallengeInfo, ForkDisplay, Output, PersistOptions, RedeemedChallenge, SignalValue, StatusJson, StatusText, } from "@mochabug/adapt-web";
|
|
2
3
|
export { AdaptAutomation, type AdaptAutomationProps } from "./AdaptAutomation.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mochabug/adapt-react",
|
|
3
|
-
"version": "1.0.1-rc.
|
|
3
|
+
"version": "1.0.1-rc.20",
|
|
4
4
|
"description": "React component for Adapt automation platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/esm/index.js",
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
"typescript": "^5.9.3"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@mochabug/adapt-web": "^1.0.1-rc.
|
|
48
|
+
"@mochabug/adapt-web": "^1.0.1-rc.20"
|
|
49
49
|
}
|
|
50
50
|
}
|