@mochabug/adapt-react 1.0.1-rc.15 → 1.0.1-rc.17

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/README.md CHANGED
@@ -380,6 +380,16 @@ Or set variables in your Tailwind global CSS:
380
380
  | `--mb-adapt-cap-spinner-thickness` | `3px` | |
381
381
  | `--mb-adapt-cap-font` | `inherit` | |
382
382
 
383
+ ### Z-index / stacking
384
+
385
+ | Variable | Default | Description |
386
+ |---|---|---|
387
+ | `--mb-adapt-z-base` | `0` | Base z-index offset — added to all internal z-index values |
388
+
389
+ Set `--mb-adapt-z-base` to shift all internal z-index values. Useful when embedding inside modals or drawers that have their own stacking context. Example: `--mb-adapt-z-base: 10000` lifts all layers by 10000.
390
+
391
+ Internal stacking order from low to high: separators (1), resize handles (10), minimized tabs (100), floating panels (100000+), status/cap (200000), confirm dialog (300000), drop targets (999998), drag ghost (999999). All values are offset by `--mb-adapt-z-base`.
392
+
383
393
  </details>
384
394
 
385
395
  ---
@@ -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, 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, className, style, }, ref) {
11
11
  const internalRef = useRef(null);
12
12
  // Merge refs
13
13
  const setRef = (element) => {
@@ -35,6 +35,7 @@ export const AdaptAutomation = forwardRef(function AdaptAutomation({ automationI
35
35
  el.onSessionCallback = onSession;
36
36
  el.onOutputCallback = onOutput;
37
37
  el.onForkActiveCallback = onForkActive;
38
+ el.onErrorCallback = onError;
38
39
  });
39
40
  // React doesn't natively set properties on custom elements (pre-19),
40
41
  // so we use attributes for serializable values and ref for the rest.
@@ -1,4 +1,4 @@
1
- import { AdaptAutomationElement, type AdaptTheme, type AdaptWebClientOptions, type ForkDisplay, type Output, type PersistOptions, type SignalValue, type StatusJson, type StatusText } from "@mochabug/adapt-web/core";
1
+ import { AdaptAutomationElement, type AdaptError, type AdaptTheme, type AdaptWebClientOptions, type ForkDisplay, type Output, type PersistOptions, type SignalValue, type StatusJson, type StatusText } from "@mochabug/adapt-web/core";
2
2
  declare module "react" {
3
3
  namespace JSX {
4
4
  interface IntrinsicElements {
@@ -57,6 +57,7 @@ export interface AdaptAutomationProps {
57
57
  onSession?: (status: StatusJson, fork?: string) => void;
58
58
  onOutput?: (output: Output) => void;
59
59
  onForkActive?: (active: boolean) => void;
60
+ onError?: (error: AdaptError) => void;
60
61
  classNames?: AdaptWebClientOptions["classNames"];
61
62
  styles?: Partial<CSSStyleDeclaration>;
62
63
  persist?: boolean | PersistOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mochabug/adapt-react",
3
- "version": "1.0.1-rc.15",
3
+ "version": "1.0.1-rc.17",
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.15"
48
+ "@mochabug/adapt-web": "^1.0.1-rc.17"
49
49
  }
50
50
  }