@envive-ai/react-widgets 0.1.2-arthur-1 → 0.1.2-arthur-2

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.
@@ -1,6 +1,6 @@
1
+ import React$1 from "react";
1
2
  import * as react_jsx_runtime1 from "react/jsx-runtime";
2
3
  import { SearchEntryPointWidgetConfig, SearchInputVariant } from "@envive-ai/react-hooks/contexts/types";
3
- import React$1 from "react";
4
4
 
5
5
  //#region src/SearchZeroState/types.d.ts
6
6
  interface SearchZeroStateProps {
@@ -1,6 +1,6 @@
1
- import React$1 from "react";
2
1
  import * as react_jsx_runtime0 from "react/jsx-runtime";
3
2
  import { SearchEntryPointWidgetConfig, SearchInputVariant } from "@envive-ai/react-hooks/contexts/types";
3
+ import React$1 from "react";
4
4
 
5
5
  //#region src/SearchZeroState/types.d.ts
6
6
  interface SearchZeroStateProps {
@@ -2663,6 +2663,8 @@ const SEARCH_OVERLAY_PORTAL_ID = "spiffy-ai-search-overlay-portal";
2663
2663
  * Find the portal target inside the overlay host's ShadowRoot.
2664
2664
  */
2665
2665
  function getOverlayPortalTarget(hostId = SEARCH_OVERLAY_ENTRYPOINT_ID) {
2666
+ const bareMount = document.getElementById(SEARCH_OVERLAY_PORTAL_ID);
2667
+ if (bareMount) return bareMount;
2666
2668
  const host = document.getElementById(hostId);
2667
2669
  if (!host) throw new Error(`[Overlay] Host #${hostId} not found`);
2668
2670
  const sr = host.shadowRoot;
@@ -2660,6 +2660,8 @@ const SEARCH_OVERLAY_PORTAL_ID = "spiffy-ai-search-overlay-portal";
2660
2660
  * Find the portal target inside the overlay host's ShadowRoot.
2661
2661
  */
2662
2662
  function getOverlayPortalTarget(hostId = SEARCH_OVERLAY_ENTRYPOINT_ID) {
2663
+ const bareMount = document.getElementById(SEARCH_OVERLAY_PORTAL_ID);
2664
+ if (bareMount) return bareMount;
2663
2665
  const host = document.getElementById(hostId);
2664
2666
  if (!host) throw new Error(`[Overlay] Host #${hostId} not found`);
2665
2667
  const sr = host.shadowRoot;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@envive-ai/react-widgets",
3
- "version": "0.1.2-arthur-1",
3
+ "version": "0.1.2-arthur-2",
4
4
  "description": "React widget library for Envive services.",
5
5
  "keywords": [
6
6
  "react",
@@ -7,6 +7,8 @@ export const SEARCH_OVERLAY_PORTAL_ID = 'spiffy-ai-search-overlay-portal'; // Th
7
7
  export function getOverlayPortalTarget(
8
8
  hostId: string = SEARCH_OVERLAY_ENTRYPOINT_ID,
9
9
  ): HTMLElement {
10
+ const bareMount = document.getElementById(SEARCH_OVERLAY_PORTAL_ID) as HTMLElement | null;
11
+ if (bareMount) return bareMount;
10
12
  const host = document.getElementById(hostId);
11
13
  if (!host) throw new Error(`[Overlay] Host #${hostId} not found`);
12
14
  const sr = host.shadowRoot;