@inkeep/cxkit-react 0.5.64 → 0.5.66

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 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("./embedded-chat.cjs"),t=require("@inkeep/cxkit-styled"),p=require("./embedded-search.cjs"),S=require("./embedded-search-and-chat.impl.cjs"),C=require("react"),A=require("./modal.cjs");function g(n){const{config:d,...r}=S.useWidgetImpl(n);return e.jsx(t.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(t.RootProvider,{config:d,componentType:t.WebWidgetInteractionType.EmbeddedSearchAndChat,children:e.jsx(m,{...r})})})}function m(n){const{view:d,setView:r,shouldShowAskAICard:I,onToggleView:o,defaultView:c,shouldAutoFocusInput:s,searchLabel:i,askAILabel:a}=n,b=t.useModal()?A.ModalContent:C.Fragment,h={isHidden:d==="chat",onToggleView:o,shouldShowAskAICard:I,shouldAutoFocusInput:s&&c==="search",searchLabel:i,askAILabel:a},l={isHidden:d==="search",onToggleView:o,shouldAutoFocusInput:s&&c==="chat",searchLabel:i,askAILabel:a};return e.jsx(t.WidgetProvider,{widget:{setView:r,view:d},children:e.jsx(p.InkeepEmbeddedSearchProvider,{...h,children:e.jsx(u.InkeepEmbeddedChatProvider,{...l,children:e.jsxs(b,{children:[e.jsx(p.InkeepEmbeddedSearchImplContent,{...h}),e.jsx(u.InkeepEmbeddedChatImplContent,{...l})]})})})})}exports.InkeepEmbeddedSearchAndChat=g;exports.InkeepEmbeddedSearchAndChatImpl=m;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("./embedded-chat.cjs"),t=require("@inkeep/cxkit-styled"),a=require("./embedded-search.cjs"),S=require("./embedded-search-and-chat.impl.cjs"),C=require("react"),g=require("./modal.cjs");function j(n){const{config:d,...r}=S.useWidgetImpl(n);return e.jsx(t.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(t.RootProvider,{config:d,componentType:t.WebWidgetInteractionType.EmbeddedSearchAndChat,children:e.jsx(h,{...r})})})}function h(n){const{view:d,setView:r,shouldShowAskAICard:l,onToggleView:p,shouldAutoFocusInput:m,searchLabel:u,askAILabel:b}=n,I=t.useModal()?g.ModalContent:C.Fragment,o={onToggleView:p,shouldShowAskAICard:l,shouldAutoFocusInput:m,searchLabel:u,askAILabel:b},i={isHidden:d==="chat",...o},s={isHidden:d==="search",...o};return e.jsx(t.WidgetProvider,{widget:{setView:r,view:d},children:e.jsx(a.InkeepEmbeddedSearchProvider,{...i,children:e.jsx(c.InkeepEmbeddedChatProvider,{...s,children:e.jsxs(I,{children:[e.jsx(a.InkeepEmbeddedSearchImplContent,{...i}),e.jsx(c.InkeepEmbeddedChatImplContent,{...s})]})})})})}exports.InkeepEmbeddedSearchAndChat=j;exports.InkeepEmbeddedSearchAndChatImpl=h;
@@ -1,54 +1,52 @@
1
1
  "use client";
2
2
  import { jsx as e, jsxs as l } from "react/jsx-runtime";
3
- import { InkeepEmbeddedChatProvider as u, InkeepEmbeddedChatImplContent as I } from "./embedded-chat.js";
4
- import { Shadow as f, RootProvider as b, WebWidgetInteractionType as C, useModal as g, WidgetProvider as w } from "@inkeep/cxkit-styled";
5
- import { InkeepEmbeddedSearchProvider as A, InkeepEmbeddedSearchImplContent as k } from "./embedded-search.js";
6
- import { useWidgetImpl as S } from "./embedded-search-and-chat.impl.js";
3
+ import { InkeepEmbeddedChatProvider as I, InkeepEmbeddedChatImplContent as u } from "./embedded-chat.js";
4
+ import { Shadow as b, RootProvider as f, WebWidgetInteractionType as C, useModal as g, WidgetProvider as k } from "@inkeep/cxkit-styled";
5
+ import { InkeepEmbeddedSearchProvider as w, InkeepEmbeddedSearchImplContent as S } from "./embedded-search.js";
6
+ import { useWidgetImpl as A } from "./embedded-search-and-chat.impl.js";
7
7
  import { Fragment as E } from "react";
8
8
  import { ModalContent as P } from "./modal.js";
9
- function L(t) {
10
- const { config: o, ...d } = S(t);
9
+ function M(o) {
10
+ const { config: r, ...d } = A(o);
11
11
  return /* @__PURE__ */ e(
12
- f,
12
+ b,
13
13
  {
14
14
  wrapperStyles: {
15
15
  height: "inherit",
16
16
  width: "inherit"
17
17
  },
18
- children: /* @__PURE__ */ e(b, { config: o, componentType: C.EmbeddedSearchAndChat, children: /* @__PURE__ */ e(v, { ...d }) })
18
+ children: /* @__PURE__ */ e(f, { config: r, componentType: C.EmbeddedSearchAndChat, children: /* @__PURE__ */ e(v, { ...d }) })
19
19
  }
20
20
  );
21
21
  }
22
- function v(t) {
22
+ function v(o) {
23
23
  const {
24
- view: o,
24
+ view: r,
25
25
  setView: d,
26
- shouldShowAskAICard: s,
27
- onToggleView: r,
28
- defaultView: n,
29
- shouldAutoFocusInput: i,
30
- searchLabel: h,
31
- askAILabel: c
32
- } = t, m = g() ? P : E, a = {
33
- isHidden: o === "chat",
34
- onToggleView: r,
35
- shouldShowAskAICard: s,
36
- shouldAutoFocusInput: i && n === "search",
37
- searchLabel: h,
38
- askAILabel: c
39
- }, p = {
40
- isHidden: o === "search",
41
- onToggleView: r,
42
- shouldAutoFocusInput: i && n === "chat",
43
- searchLabel: h,
44
- askAILabel: c
26
+ shouldShowAskAICard: h,
27
+ onToggleView: c,
28
+ shouldAutoFocusInput: m,
29
+ searchLabel: p,
30
+ askAILabel: a
31
+ } = o, s = g() ? P : E, t = {
32
+ onToggleView: c,
33
+ shouldShowAskAICard: h,
34
+ shouldAutoFocusInput: m,
35
+ searchLabel: p,
36
+ askAILabel: a
37
+ }, n = {
38
+ isHidden: r === "chat",
39
+ ...t
40
+ }, i = {
41
+ isHidden: r === "search",
42
+ ...t
45
43
  };
46
- return /* @__PURE__ */ e(w, { widget: { setView: d, view: o }, children: /* @__PURE__ */ e(A, { ...a, children: /* @__PURE__ */ e(u, { ...p, children: /* @__PURE__ */ l(m, { children: [
47
- /* @__PURE__ */ e(k, { ...a }),
48
- /* @__PURE__ */ e(I, { ...p })
44
+ return /* @__PURE__ */ e(k, { widget: { setView: d, view: r }, children: /* @__PURE__ */ e(w, { ...n, children: /* @__PURE__ */ e(I, { ...i, children: /* @__PURE__ */ l(s, { children: [
45
+ /* @__PURE__ */ e(S, { ...n }),
46
+ /* @__PURE__ */ e(u, { ...i })
49
47
  ] }) }) }) });
50
48
  }
51
49
  export {
52
- L as InkeepEmbeddedSearchAndChat,
50
+ M as InkeepEmbeddedSearchAndChat,
53
51
  v as InkeepEmbeddedSearchAndChatImpl
54
52
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/cxkit-react",
3
- "version": "0.5.64",
3
+ "version": "0.5.66",
4
4
  "description": "",
5
5
  "license": "Inkeep, Inc. Customer License (IICL) v1.1",
6
6
  "homepage": "",
@@ -21,7 +21,7 @@
21
21
  "sideEffects": false,
22
22
  "dependencies": {
23
23
  "@radix-ui/react-use-controllable-state": "^1.1.0",
24
- "@inkeep/cxkit-styled": "0.5.64"
24
+ "@inkeep/cxkit-styled": "0.5.66"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@biomejs/biome": "1.9.4",
@@ -44,8 +44,8 @@
44
44
  "typescript": "5.7.3",
45
45
  "vite": "5.4.11",
46
46
  "vite-plugin-dts": "4.4.0",
47
- "@inkeep/cxkit-color-mode": "0.5.64",
48
- "@inkeep/cxkit-types": "0.5.64"
47
+ "@inkeep/cxkit-color-mode": "0.5.66",
48
+ "@inkeep/cxkit-types": "0.5.66"
49
49
  },
50
50
  "module": "dist/index.js",
51
51
  "types": "dist/index.d.ts",