@inkeep/cxkit-react 0.5.36 → 0.5.38
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/_virtual/index.cjs +1 -0
- package/dist/_virtual/index.js +4 -0
- package/dist/_virtual/use-sync-external-store-shim.development.cjs +1 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.production.cjs +1 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
- package/dist/components/embedded-chat.cjs +1 -1
- package/dist/components/embedded-chat.js +1 -1
- package/dist/components/embedded-search-and-chat.impl.cjs +1 -1
- package/dist/components/embedded-search.cjs +1 -1
- package/dist/components/embedded-search.js +29 -28
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.1/node_modules/@radix-ui/primitive/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.1/node_modules/@radix-ui/primitive/dist/index.js +9 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.1_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.1_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-compose-refs/dist/index.js +29 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.1_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-context/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.1_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-context/dist/index.js +68 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dialog@1.1.4_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19.0._ucun7uecgispdhq4vhr26lovum/node_modules/@radix-ui/react-dialog/dist/index.cjs +5 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dialog@1.1.4_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19.0._ucun7uecgispdhq4vhr26lovum/node_modules/@radix-ui/react-dialog/dist/index.js +253 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.3_@types_react-dom@19.0.3_@types_react@19.0.10__@types__v2z2flytqizqloot5tnzsv72ca/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.3_@types_react-dom@19.0.3_@types_react@19.0.10__@types__v2z2flytqizqloot5tnzsv72ca/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +127 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.1_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.1_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-focus-guards/dist/index.js +17 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.1_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@_jnpeo7zp526zce4fsmzkscleui/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.1_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@_jnpeo7zp526zce4fsmzkscleui/node_modules/@radix-ui/react-focus-scope/dist/index.js +136 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.0_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-id/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.0_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-id/dist/index.js +13 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.3_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19.0._k6mvjumazun2buzo2dcp22wl2y/node_modules/@radix-ui/react-portal/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.3_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19.0._k6mvjumazun2buzo2dcp22wl2y/node_modules/@radix-ui/react-portal/dist/index.js +15 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.2_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19._ceqn6mtlqa4vrghvmtsw5zpqya/node_modules/@radix-ui/react-presence/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.2_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19._ceqn6mtlqa4vrghvmtsw5zpqya/node_modules/@radix-ui/react-presence/dist/index.js +70 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.0.1_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19_zjcik7jr4zh3druglzeqejtmrq/node_modules/@radix-ui/react-primitive/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.0.1_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19_zjcik7jr4zh3druglzeqejtmrq/node_modules/@radix-ui/react-primitive/dist/index.js +35 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.0.2_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19_xmwzi2lpk7e4iscy4hlhgpd4fu/node_modules/@radix-ui/react-primitive/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.0.2_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19_xmwzi2lpk7e4iscy4hlhgpd4fu/node_modules/@radix-ui/react-primitive/dist/index.js +31 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.1.1_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-slot/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.1.1_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-slot/dist/index.js +47 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.1.2_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-slot/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.1.2_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-slot/dist/index.js +43 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.0_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.0_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +10 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.1.0_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.1.0_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +14 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.0_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.0_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
- package/dist/node_modules/.pnpm/aria-hidden@1.2.4/node_modules/aria-hidden/dist/es2015/index.cjs +1 -0
- package/dist/node_modules/.pnpm/aria-hidden@1.2.4/node_modules/aria-hidden/dist/es2015/index.js +52 -0
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.cjs +1 -0
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +7 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +38 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll-bar/dist/es2015/component.js +72 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +8 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +26 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/Combination.js +12 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +4 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +113 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/UI.cjs +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/UI.js +32 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +17 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +65 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/medium.cjs +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/medium.js +6 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js +8 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.0.10_react@19.0.0/node_modules/react-style-singleton/dist/es2015/component.cjs +1 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.0.10_react@19.0.0/node_modules/react-style-singleton/dist/es2015/component.js +12 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.0.10_react@19.0.0/node_modules/react-style-singleton/dist/es2015/hook.cjs +1 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.0.10_react@19.0.0/node_modules/react-style-singleton/dist/es2015/hook.js +16 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.0.10_react@19.0.0/node_modules/react-style-singleton/dist/es2015/singleton.cjs +1 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.0.10_react@19.0.0/node_modules/react-style-singleton/dist/es2015/singleton.js +31 -0
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.cjs +1 -0
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +28 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.0.10_react@19.0.0/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +1 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.0.10_react@19.0.0/node_modules/use-callback-ref/dist/es2015/assignRef.js +7 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.0.10_react@19.0.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +1 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.0.10_react@19.0.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +27 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.0.10_react@19.0.0/node_modules/use-callback-ref/dist/es2015/useRef.cjs +1 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.0.10_react@19.0.0/node_modules/use-callback-ref/dist/es2015/useRef.js +26 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.0.10_react@19.0.0/node_modules/use-sidecar/dist/es2015/exports.cjs +1 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.0.10_react@19.0.0/node_modules/use-sidecar/dist/es2015/exports.js +19 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.0.10_react@19.0.0/node_modules/use-sidecar/dist/es2015/medium.cjs +1 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.0.10_react@19.0.0/node_modules/use-sidecar/dist/es2015/medium.js +68 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.4.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +9 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.4.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +68 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.4.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs +9 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.4.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +56 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.4.0_react@19.0.0/node_modules/use-sync-external-store/shim/index.cjs +1 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.4.0_react@19.0.0/node_modules/use-sync-external-store/shim/index.js +8 -0
- package/dist/packages/primitives/src/atoms/cmdk/command-score.cjs +1 -0
- package/dist/packages/primitives/src/atoms/cmdk/command-score.js +46 -0
- package/dist/packages/primitives/src/atoms/cmdk/index.cjs +1 -0
- package/dist/packages/primitives/src/atoms/cmdk/index.js +519 -0
- package/dist/packages/primitives/src/atoms/shadow/context.cjs +1 -0
- package/dist/packages/primitives/src/atoms/shadow/context.js +8 -0
- package/dist/packages/primitives/src/constants/search.cjs +1 -0
- package/dist/packages/primitives/src/constants/search.js +5 -0
- package/package.json +4 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("@inkeep/cxkit-styled"),h=require("react"),b=require("./widget-toggle.cjs"),l=require("./modal.cjs");function C(a){const{baseSettings:t,aiChatSettings:s}=a;return e.jsx(d.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(d.RootProvider,{config:{baseSettings:t,aiChatSettings:s},componentType:d.WebWidgetInteractionType.EmbeddedChat,children:e.jsx(c,{...a})})})}function m(a){const{children:t,onToggleView:s,isHidden:n,shouldAutoFocusInput:r=!s}=a;return e.jsx(d.EmbeddedChat.Provider,{isHidden:n,shouldAutoFocusInput:r,children:t})}function c(a){return e.jsx(m,{...a,children:e.jsx(i,{...a})})}function i(a){const{onToggleView:t}=a,s=d.useModal(),n=d.useWidget(),r=s&&!n?l.ModalContent:h.Fragment;return e.jsx(r,{children:e.jsxs(d.EmbeddedChat.Wrapper,{variant:t?"no-shadow":"container-with-shadow","data-composite":d.dataAttr(!!a.onToggleView||s?.isOpen),children:[e.jsx(d.EmbeddedChat.ConversationLoading,{}),e.jsxs(d.EmbeddedChat.Root,{children:[e.jsx(x,{...a}),e.jsx(j,{}),e.jsx(I,{})]}),e.jsx(T,{}),e.jsx(B,{})]})})}function x(a){const{onToggleView:t,askAILabel:s,searchLabel:n}=a,r=!!t;return e.jsxs(d.EmbeddedChat.Header,{"data-show-toolbar":d.dataAttr(r),children:[r&&e.jsxs(d.EmbeddedChat.HeaderToolbar,{children:[e.jsxs(d.EmbeddedChat.HeaderToolbarWrapper,{children:[e.jsx(d.EmbeddedChat.ToolbarHeader,{}),e.jsxs(d.EmbeddedChat.Disclaimer,{children:[e.jsx(d.EmbeddedChat.DisclaimerTrigger,{}),e.jsxs(d.EmbeddedChat.DisclaimerContent,{side:"bottom",align:"start",children:[e.jsx(d.EmbeddedChat.DisclaimerText,{}),e.jsx(d.EmbeddedChat.DisclaimerArrow,{})]})]})]}),e.jsx(b.WidgetToggle,{onToggleView:t,askAILabel:s,searchLabel:n,view:"chat"})]}),e.jsx(d.Modal.Close,{})]})}function j(){return e.jsx(d.EmbeddedChat.Content,{children:e.jsxs(d.EmbeddedChat.ContentScrollArea,{children:[e.jsx(d.EmbeddedChat.ContentScrollAreaViewport,{children:e.jsx(E,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaScrollbar,{children:e.jsx(d.EmbeddedChat.ContentScrollAreaThumb,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaCorner,{})]})})}function E(){return e.jsx(d.EmbeddedChat.Messages,{children:({messages:a})=>e.jsxs(e.Fragment,{children:[e.jsx(u,{}),a.map(t=>e.jsxs(d.EmbeddedChat.MessageWrapper,{message:t,children:[e.jsx(F,{}),e.jsx(d.EmbeddedChat.MessageLoading,{}),e.jsxs(d.EmbeddedChat.MessageContentWrapper,{children:[e.jsx(d.EmbeddedChat.MessageContent,{children:e.jsx(d.EmbeddedChat.Message,{})}),e.jsx(g,{}),e.jsx(p,{}),e.jsx(A,{})]})]},t.id))]})})}function u(){return e.jsxs(d.EmbeddedChat.IntroMessageWrapper,{children:[e.jsxs(d.EmbeddedChat.MessageHeader,{children:[e.jsx(d.EmbeddedChat.MessageAvatar,{children:e.jsxs(d.EmbeddedChat.MessageAvatarContent,{children:[e.jsx(d.EmbeddedChat.MessageAvatarFallback,{}),e.jsx(d.EmbeddedChat.MessageAvatarImage,{})]})}),e.jsx(d.EmbeddedChat.MessageName,{})]}),e.jsxs(d.EmbeddedChat.MessageContentWrapper,{children:[e.jsx(d.EmbeddedChat.MessageContent,{children:e.jsx(d.EmbeddedChat.Message,{})}),e.jsxs(d.EmbeddedChat.Disclaimer,{children:[e.jsx(d.EmbeddedChat.DisclaimerLabel,{}),e.jsx(d.EmbeddedChat.DisclaimerTrigger,{}),e.jsxs(d.EmbeddedChat.DisclaimerContent,{children:[e.jsx(d.EmbeddedChat.DisclaimerText,{}),e.jsx(d.EmbeddedChat.DisclaimerArrow,{})]})]}),e.jsxs(d.EmbeddedChat.ExampleQuestions,{children:[e.jsx(d.EmbeddedChat.ExampleQuestionsLabel,{}),e.jsx(d.EmbeddedChat.ExampleQuestionsList,{children:a=>a.map(t=>e.jsx(d.EmbeddedChat.ExampleQuestion,{children:e.jsx(d.EmbeddedChat.ExampleQuestionButton,{question:t})},t))})]})]})]})}function F(){return e.jsxs(d.EmbeddedChat.MessageHeader,{children:[e.jsx(d.EmbeddedChat.MessageAvatar,{children:e.jsxs(d.EmbeddedChat.MessageAvatarContent,{children:[e.jsx(d.EmbeddedChat.MessageAvatarFallback,{}),e.jsx(d.EmbeddedChat.MessageAvatarImage,{})]})}),e.jsx(d.EmbeddedChat.MessageName,{})]})}function g(){return e.jsxs(d.EmbeddedChat.MessageAttachments,{children:[e.jsx(d.EmbeddedChat.MessageAttachmentsList,{children:a=>a.map(t=>e.jsxs(d.EmbeddedChat.MessageAttachmentsItem,{attachment:t,children:[e.jsx(d.EmbeddedChat.MessageAttachmentsItemIcon,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsItemTitle,{})]},t.id))}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreview,{children:e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewOverlay,{children:e.jsxs(d.EmbeddedChat.MessageAttachmentsPreviewContent,{children:[e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewHeader,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewClose,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewBody,{})]})})})})]})}function p(){return e.jsxs(d.EmbeddedChat.MessageActions,{children:[e.jsx(d.EmbeddedChat.MessageToolActions,{children:a=>a.map((t,s)=>e.jsx(d.EmbeddedChat.MessageToolAction,{action:t},`action-${s}`))}),e.jsx(d.EmbeddedChat.MessageAction,{action:"copy"}),e.jsx(d.EmbeddedChat.MessageAction,{action:"upvote"}),e.jsx(d.EmbeddedChat.MessageAction,{action:"downvote"})]})}function A(){return e.jsxs(d.EmbeddedChat.MessageSources,{children:[e.jsx(d.EmbeddedChat.MessageSourcesHeader,{}),e.jsx(d.EmbeddedChat.MessageSourcesList,{children:a=>a.map((t,s)=>e.jsxs(d.EmbeddedChat.MessageSourceItem,{href:t.url,source:t,children:[e.jsx(d.EmbeddedChat.MessageSourceItemBreadcrumbs,{children:t.breadcrumbs?.map(n=>e.jsxs(h.Fragment,{children:[n,e.jsx(d.EmbeddedChat.MessageSourceItemBreadcrumbIcon,{})]},n))}),e.jsx(d.EmbeddedChat.MessageSourceItemIcon,{}),e.jsx(d.EmbeddedChat.MessageSourceItemTitle,{}),e.jsx(d.EmbeddedChat.MessageSourceItemTag,{}),e.jsx(d.EmbeddedChat.MessageSourceItemDescription,{children:n=>n.map((r,o)=>e.jsx(d.EmbeddedChat.MessageSourceItemDescriptionPart,{part:r},`part-${o}`))}),e.jsx(d.EmbeddedChat.MessageSourceItemIndicator,{})]},s))})]})}function I(){return e.jsxs(d.EmbeddedChat.Footer,{children:[e.jsx(M,{}),e.jsx(k,{})]})}function M(){return e.jsxs(d.EmbeddedChat.InputFieldset,{children:[e.jsxs(d.EmbeddedChat.InputGroup,{children:[e.jsx(d.EmbeddedChat.Input,{}),e.jsx(d.EmbeddedChat.SendButton,{children:e.jsx(d.EmbeddedChat.SendButtonIcon,{})})]}),e.jsxs(d.EmbeddedChat.AttachmentsBar,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarList,{children:a=>a.map(t=>e.jsxs(d.EmbeddedChat.AttachmentsBarAttachment,{attachment:t,children:[e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentIcon,{}),e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentTitle,{}),e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentDelete,{})]},t.id))}),e.jsxs(d.EmbeddedChat.AttachmentsBarActions,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarInfoTip,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarInfoTipIcon,{}),e.jsx(d.EmbeddedChat.AttachmentsBarInfoTipText,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarInputs,{children:a=>a.map(t=>e.jsxs(d.EmbeddedChat.AttachmentsBarInput,{input:t,children:[e.jsx(d.EmbeddedChat.AttachmentsBarInputIcon,{}),t.displayName]},t.id))})]}),e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.AttachmentsBarModal,{children:e.jsx(d.EmbeddedChat.AttachmentsBarModalOverlay,{children:e.jsxs(d.EmbeddedChat.AttachmentsBarModalContent,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarModalHeader,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarModalHeading,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalDescription,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalHelp,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarModalClose,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalBody,{children:e.jsxs(d.EmbeddedChat.AttachmentsBarForm,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarFormTitle,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleLabel,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleInput,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleError,{})]}),e.jsxs(d.EmbeddedChat.AttachmentsBarFormContent,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarFormContentLabel,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormContentInput,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormContentError,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarFormSubmitButton,{})]})})]})})})})]})]})}function k(){return e.jsxs(d.EmbeddedChat.ActionBar,{children:[e.jsxs(d.EmbeddedChat.TaglineContainer,{children:[e.jsx(d.EmbeddedChat.TaglineText,{}),e.jsx(d.EmbeddedChat.TaglineLogo,{}),e.jsx(d.EmbeddedChat.TaglineBrandName,{})]}),e.jsxs(d.EmbeddedChat.Actions,{children:[e.jsx(d.EmbeddedChat.HelpActions,{children:({pinned:a,unpinned:t})=>e.jsxs(e.Fragment,{children:[a.map(s=>e.jsx(d.EmbeddedChat.HelpAction,{action:s},s.name)),t.length>0&&e.jsx(d.EmbeddedChat.HelpActionsTrigger,{}),e.jsxs(d.EmbeddedChat.HelpActionsMenu,{children:[e.jsx(d.EmbeddedChat.HelpActionsMenuArrow,{}),t.map(s=>e.jsxs(d.EmbeddedChat.HelpActionsMenuItem,{action:s,children:[e.jsx(d.EmbeddedChat.HelpActionsMenuItemIcon,{action:s}),s.name]},s.name))]})]})}),e.jsxs(d.EmbeddedChat.ChatAction,{action:"copy",children:[e.jsx(d.EmbeddedChat.ChatActionLabel,{action:"copy"}),e.jsx(d.EmbeddedChat.ChatActionFeedback,{action:"copy"})]}),e.jsxs(d.EmbeddedChat.ChatAction,{action:"share",children:[e.jsx(d.EmbeddedChat.ChatActionLabel,{action:"share"}),e.jsx(d.EmbeddedChat.ChatActionFeedback,{action:"share"})]}),e.jsx(d.EmbeddedChat.ChatAction,{action:"clear"}),e.jsx(d.EmbeddedChat.ChatAction,{action:"stop"})]})]})}function T(){return e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.FeedbackModal,{children:e.jsx(d.EmbeddedChat.FeedbackModalOverlay,{children:e.jsxs(d.EmbeddedChat.FeedbackModalContent,{children:[e.jsx(d.EmbeddedChat.FeedbackModalHeader,{}),e.jsx(d.EmbeddedChat.FeedbackModalClose,{}),e.jsx(d.EmbeddedChat.FeedbackModalBody,{children:e.jsxs(d.EmbeddedChat.FeedbackForm,{children:[e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"unrelated_response",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"inaccurate_statement",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"inaccurate_code_snippet",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"irrelevant_citations",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{})]}),e.jsx(d.EmbeddedChat.FeedbackSubmitButton,{})]})})]})})})})}function B(){return e.jsxs(d.EmbeddedChat.FormWrapper,{children:[e.jsx(d.EmbeddedChat.FormClose,{}),e.jsxs(d.EmbeddedChat.Form,{children:[e.jsxs(d.EmbeddedChat.FormHeader,{children:[e.jsx(d.EmbeddedChat.FormHeading,{}),e.jsx(d.EmbeddedChat.FormDescription,{})]}),e.jsx(d.EmbeddedChat.FormContent,{children:a=>e.jsxs(e.Fragment,{children:[a.map((t,s)=>e.jsxs(d.EmbeddedChat.FormField,{field:t,autoFocus:s===0,children:[e.jsx(d.EmbeddedChat.FormFieldLabel,{}),t.inputType==="text"&&e.jsx(d.EmbeddedChat.FormFieldText,{}),t.inputType==="email"&&e.jsx(d.EmbeddedChat.FormFieldEmail,{}),t.inputType==="file"&&e.jsx(d.EmbeddedChat.FormFieldFile,{}),t.inputType==="textarea"&&e.jsx(d.EmbeddedChat.FormFieldTextArea,{}),t.inputType==="checkbox"&&e.jsx(d.EmbeddedChat.FormFieldCheckbox,{children:e.jsx(d.EmbeddedChat.FormFieldCheckboxIndicator,{})}),t.inputType==="select"&&e.jsxs(d.EmbeddedChat.FormFieldSelect,{children:[e.jsxs(d.EmbeddedChat.FormFieldSelectTrigger,{children:[e.jsx(d.EmbeddedChat.FormFieldSelectValue,{}),e.jsx(d.EmbeddedChat.FormFieldSelectIcon,{})]}),e.jsx(d.EmbeddedChat.FormFieldSelectContent,{children:e.jsx(d.EmbeddedChat.FormFieldSelectViewport,{children:t.items.map(n=>e.jsxs(d.EmbeddedChat.FormFieldSelectItem,{value:n.value,children:[e.jsx(d.EmbeddedChat.FormFieldSelectItemText,{children:n.label}),e.jsx(d.EmbeddedChat.FormFieldSelectItemIndicator,{})]},n.value))})})]}),e.jsx(d.EmbeddedChat.FormFieldError,{})]},t.name)),e.jsx(d.EmbeddedChat.FormError,{})]})}),e.jsxs(d.EmbeddedChat.FormFooter,{children:[e.jsx(d.EmbeddedChat.FormCancel,{}),e.jsx(d.EmbeddedChat.FormSubmit,{})]})]}),e.jsxs(d.EmbeddedChat.FormSuccess,{children:[e.jsx(d.EmbeddedChat.FormSuccessHeading,{}),e.jsx(d.EmbeddedChat.FormSuccessMessage,{}),e.jsx(d.EmbeddedChat.FormSuccessButton,{})]})]})}exports.InkeepEmbeddedChat=C;exports.InkeepEmbeddedChatImpl=c;exports.InkeepEmbeddedChatImplContent=i;exports.InkeepEmbeddedChatProvider=m;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("@inkeep/cxkit-styled"),h=require("react"),b=require("./widget-toggle.cjs"),l=require("./modal.cjs");function C(a){const{baseSettings:t,aiChatSettings:s}=a;return e.jsx(d.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(d.RootProvider,{config:{baseSettings:t,aiChatSettings:s},componentType:d.WebWidgetInteractionType.EmbeddedChat,children:e.jsx(c,{...a})})})}function m(a){const{children:t,onToggleView:s,isHidden:n,shouldAutoFocusInput:r=!s}=a;return e.jsx(d.EmbeddedChat.Provider,{isHidden:n,shouldAutoFocusInput:r,children:t})}function c(a){return e.jsx(m,{...a,children:e.jsx(o,{...a})})}function o(a){const{onToggleView:t}=a,s=d.useModal(),n=d.useWidget(),r=s&&!n?l.ModalContent:h.Fragment;return e.jsx(r,{children:e.jsxs(d.EmbeddedChat.Wrapper,{variant:t?"no-shadow":"container-with-shadow","data-composite":d.dataAttr(!!a.onToggleView||s?.isOpen),children:[e.jsx(d.EmbeddedChat.ConversationLoading,{}),e.jsxs(d.EmbeddedChat.Root,{children:[e.jsx(x,{...a}),e.jsx(j,{}),e.jsx(I,{})]}),e.jsx(T,{}),e.jsx(B,{})]})})}function x(a){const{onToggleView:t,askAILabel:s,searchLabel:n}=a,r=!!t;return e.jsxs(d.EmbeddedChat.Header,{"data-show-toolbar":d.dataAttr(r),children:[r&&e.jsxs(d.EmbeddedChat.HeaderToolbar,{children:[e.jsxs(d.EmbeddedChat.HeaderToolbarWrapper,{children:[e.jsx(d.EmbeddedChat.ToolbarHeader,{}),e.jsxs(d.EmbeddedChat.Disclaimer,{children:[e.jsx(d.EmbeddedChat.DisclaimerTrigger,{}),e.jsxs(d.EmbeddedChat.DisclaimerContent,{side:"bottom",align:"start",children:[e.jsx(d.EmbeddedChat.DisclaimerText,{}),e.jsx(d.EmbeddedChat.DisclaimerArrow,{})]})]})]}),e.jsx(b.WidgetToggle,{onToggleView:t,askAILabel:s,searchLabel:n,view:"chat"})]}),e.jsx(d.Modal.Close,{})]})}function j(){return e.jsx(d.EmbeddedChat.Content,{children:e.jsxs(d.EmbeddedChat.ContentScrollArea,{children:[e.jsx(d.EmbeddedChat.ContentScrollAreaViewport,{children:e.jsx(E,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaScrollbar,{children:e.jsx(d.EmbeddedChat.ContentScrollAreaThumb,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaCorner,{})]})})}function E(){return e.jsx(d.EmbeddedChat.Messages,{children:({messages:a})=>e.jsxs(e.Fragment,{children:[e.jsx(u,{}),a.map(t=>e.jsxs(d.EmbeddedChat.MessageWrapper,{message:t,children:[e.jsx(F,{}),e.jsx(d.EmbeddedChat.MessageLoading,{}),e.jsxs(d.EmbeddedChat.MessageContentWrapper,{children:[e.jsx(d.EmbeddedChat.MessageContent,{children:e.jsx(d.EmbeddedChat.Message,{})}),e.jsx(g,{}),e.jsx(p,{}),e.jsx(A,{})]})]},t.id))]})})}function u(){return e.jsxs(d.EmbeddedChat.IntroMessageWrapper,{children:[e.jsxs(d.EmbeddedChat.MessageHeader,{children:[e.jsx(d.EmbeddedChat.MessageAvatar,{children:e.jsxs(d.EmbeddedChat.MessageAvatarContent,{children:[e.jsx(d.EmbeddedChat.MessageAvatarFallback,{}),e.jsx(d.EmbeddedChat.MessageAvatarImage,{})]})}),e.jsx(d.EmbeddedChat.MessageName,{})]}),e.jsxs(d.EmbeddedChat.MessageContentWrapper,{children:[e.jsx(d.EmbeddedChat.MessageContent,{children:e.jsx(d.EmbeddedChat.Message,{})}),e.jsxs(d.EmbeddedChat.Disclaimer,{children:[e.jsx(d.EmbeddedChat.DisclaimerLabel,{}),e.jsx(d.EmbeddedChat.DisclaimerTrigger,{}),e.jsxs(d.EmbeddedChat.DisclaimerContent,{children:[e.jsx(d.EmbeddedChat.DisclaimerText,{}),e.jsx(d.EmbeddedChat.DisclaimerArrow,{})]})]}),e.jsxs(d.EmbeddedChat.ExampleQuestions,{children:[e.jsx(d.EmbeddedChat.ExampleQuestionsLabel,{}),e.jsx(d.EmbeddedChat.ExampleQuestionsList,{children:a=>a.map(t=>e.jsx(d.EmbeddedChat.ExampleQuestion,{children:e.jsx(d.EmbeddedChat.ExampleQuestionButton,{question:t})},t))})]})]})]})}function F(){return e.jsxs(d.EmbeddedChat.MessageHeader,{children:[e.jsx(d.EmbeddedChat.MessageAvatar,{children:e.jsxs(d.EmbeddedChat.MessageAvatarContent,{children:[e.jsx(d.EmbeddedChat.MessageAvatarFallback,{}),e.jsx(d.EmbeddedChat.MessageAvatarImage,{})]})}),e.jsx(d.EmbeddedChat.MessageName,{})]})}function g(){return e.jsxs(d.EmbeddedChat.MessageAttachments,{children:[e.jsx(d.EmbeddedChat.MessageAttachmentsList,{children:a=>a.map(t=>e.jsxs(d.EmbeddedChat.MessageAttachmentsItem,{attachment:t,children:[e.jsx(d.EmbeddedChat.MessageAttachmentsItemIcon,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsItemTitle,{})]},t.id))}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreview,{children:e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewOverlay,{children:e.jsxs(d.EmbeddedChat.MessageAttachmentsPreviewContent,{children:[e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewHeader,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewClose,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewBody,{})]})})})})]})}function p(){return e.jsxs(d.EmbeddedChat.MessageToolbar,{children:[e.jsx(d.EmbeddedChat.MessageToolActions,{children:a=>a.map((t,s)=>e.jsx(d.EmbeddedChat.MessageToolAction,{action:t},`action-${s}`))}),e.jsx(d.EmbeddedChat.MessageAction,{action:"copy"}),e.jsx(d.EmbeddedChat.MessageAction,{action:"upvote"}),e.jsx(d.EmbeddedChat.MessageAction,{action:"downvote"})]})}function A(){return e.jsxs(d.EmbeddedChat.MessageSources,{children:[e.jsx(d.EmbeddedChat.MessageSourcesHeader,{}),e.jsx(d.EmbeddedChat.MessageSourcesList,{children:a=>a.map((t,s)=>e.jsxs(d.EmbeddedChat.MessageSourceItem,{href:t.url,source:t,children:[e.jsx(d.EmbeddedChat.MessageSourceItemBreadcrumbs,{children:t.breadcrumbs?.map(n=>e.jsxs(h.Fragment,{children:[n,e.jsx(d.EmbeddedChat.MessageSourceItemBreadcrumbIcon,{})]},n))}),e.jsx(d.EmbeddedChat.MessageSourceItemIcon,{}),e.jsx(d.EmbeddedChat.MessageSourceItemTitle,{}),e.jsx(d.EmbeddedChat.MessageSourceItemTag,{}),e.jsx(d.EmbeddedChat.MessageSourceItemDescription,{children:n=>n.map((r,i)=>e.jsx(d.EmbeddedChat.MessageSourceItemDescriptionPart,{part:r},`part-${i}`))}),e.jsx(d.EmbeddedChat.MessageSourceItemIndicator,{})]},s))})]})}function I(){return e.jsxs(d.EmbeddedChat.Footer,{children:[e.jsx(M,{}),e.jsx(k,{})]})}function M(){return e.jsxs(d.EmbeddedChat.InputFieldset,{children:[e.jsxs(d.EmbeddedChat.InputGroup,{children:[e.jsx(d.EmbeddedChat.Input,{}),e.jsx(d.EmbeddedChat.SendButton,{children:e.jsx(d.EmbeddedChat.SendButtonIcon,{})})]}),e.jsxs(d.EmbeddedChat.AttachmentsBar,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarList,{children:a=>a.map(t=>e.jsxs(d.EmbeddedChat.AttachmentsBarAttachment,{attachment:t,children:[e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentIcon,{}),e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentTitle,{}),e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentDelete,{})]},t.id))}),e.jsxs(d.EmbeddedChat.AttachmentsBarActions,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarInfoTip,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarInfoTipIcon,{}),e.jsx(d.EmbeddedChat.AttachmentsBarInfoTipText,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarInputs,{children:a=>a.map(t=>e.jsxs(d.EmbeddedChat.AttachmentsBarInput,{input:t,children:[e.jsx(d.EmbeddedChat.AttachmentsBarInputIcon,{}),t.displayName]},t.id))})]}),e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.AttachmentsBarModal,{children:e.jsx(d.EmbeddedChat.AttachmentsBarModalOverlay,{children:e.jsxs(d.EmbeddedChat.AttachmentsBarModalContent,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarModalHeader,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarModalHeading,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalDescription,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalHelp,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarModalClose,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalBody,{children:e.jsxs(d.EmbeddedChat.AttachmentsBarForm,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarFormTitle,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleLabel,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleInput,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleError,{})]}),e.jsxs(d.EmbeddedChat.AttachmentsBarFormContent,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarFormContentLabel,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormContentInput,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormContentError,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarFormSubmitButton,{})]})})]})})})})]})]})}function k(){return e.jsxs(d.EmbeddedChat.ActionBar,{children:[e.jsxs(d.EmbeddedChat.TaglineContainer,{children:[e.jsx(d.EmbeddedChat.TaglineText,{}),e.jsx(d.EmbeddedChat.TaglineLogo,{}),e.jsx(d.EmbeddedChat.TaglineBrandName,{})]}),e.jsxs(d.EmbeddedChat.Actions,{children:[e.jsx(d.EmbeddedChat.HelpActions,{children:({pinned:a,unpinned:t})=>e.jsxs(e.Fragment,{children:[a.map(s=>e.jsx(d.EmbeddedChat.HelpAction,{action:s},s.name)),t.length>0&&e.jsx(d.EmbeddedChat.HelpActionsTrigger,{}),e.jsxs(d.EmbeddedChat.HelpActionsMenu,{children:[e.jsx(d.EmbeddedChat.HelpActionsMenuArrow,{}),t.map(s=>e.jsxs(d.EmbeddedChat.HelpActionsMenuItem,{action:s,children:[e.jsx(d.EmbeddedChat.HelpActionsMenuItemIcon,{action:s}),s.name]},s.name))]})]})}),e.jsxs(d.EmbeddedChat.ChatAction,{action:"copy",children:[e.jsx(d.EmbeddedChat.ChatActionLabel,{action:"copy"}),e.jsx(d.EmbeddedChat.ChatActionFeedback,{action:"copy"})]}),e.jsxs(d.EmbeddedChat.ChatAction,{action:"share",children:[e.jsx(d.EmbeddedChat.ChatActionLabel,{action:"share"}),e.jsx(d.EmbeddedChat.ChatActionFeedback,{action:"share"})]}),e.jsx(d.EmbeddedChat.ChatAction,{action:"clear"}),e.jsx(d.EmbeddedChat.ChatAction,{action:"stop"})]})]})}function T(){return e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.FeedbackModal,{children:e.jsx(d.EmbeddedChat.FeedbackModalOverlay,{children:e.jsxs(d.EmbeddedChat.FeedbackModalContent,{children:[e.jsx(d.EmbeddedChat.FeedbackModalHeader,{}),e.jsx(d.EmbeddedChat.FeedbackModalClose,{}),e.jsx(d.EmbeddedChat.FeedbackModalBody,{children:e.jsxs(d.EmbeddedChat.FeedbackForm,{children:[e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"unrelated_response",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"inaccurate_statement",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"inaccurate_code_snippet",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"irrelevant_citations",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{})]}),e.jsx(d.EmbeddedChat.FeedbackSubmitButton,{})]})})]})})})})}function B(){return e.jsxs(d.EmbeddedChat.FormWrapper,{children:[e.jsx(d.EmbeddedChat.FormClose,{}),e.jsxs(d.EmbeddedChat.Form,{children:[e.jsxs(d.EmbeddedChat.FormHeader,{children:[e.jsx(d.EmbeddedChat.FormHeading,{}),e.jsx(d.EmbeddedChat.FormDescription,{})]}),e.jsx(d.EmbeddedChat.FormContent,{children:a=>e.jsxs(e.Fragment,{children:[a.map((t,s)=>e.jsxs(d.EmbeddedChat.FormField,{field:t,autoFocus:s===0,children:[e.jsx(d.EmbeddedChat.FormFieldLabel,{}),t.inputType==="text"&&e.jsx(d.EmbeddedChat.FormFieldText,{}),t.inputType==="email"&&e.jsx(d.EmbeddedChat.FormFieldEmail,{}),t.inputType==="file"&&e.jsx(d.EmbeddedChat.FormFieldFile,{}),t.inputType==="textarea"&&e.jsx(d.EmbeddedChat.FormFieldTextArea,{}),t.inputType==="checkbox"&&e.jsx(d.EmbeddedChat.FormFieldCheckbox,{children:e.jsx(d.EmbeddedChat.FormFieldCheckboxIndicator,{})}),t.inputType==="select"&&e.jsxs(d.EmbeddedChat.FormFieldSelect,{children:[e.jsxs(d.EmbeddedChat.FormFieldSelectTrigger,{children:[e.jsx(d.EmbeddedChat.FormFieldSelectValue,{}),e.jsx(d.EmbeddedChat.FormFieldSelectIcon,{})]}),e.jsx(d.EmbeddedChat.FormFieldSelectContent,{children:e.jsx(d.EmbeddedChat.FormFieldSelectViewport,{children:t.items.map(n=>e.jsxs(d.EmbeddedChat.FormFieldSelectItem,{value:n.value,children:[e.jsx(d.EmbeddedChat.FormFieldSelectItemText,{children:n.label}),e.jsx(d.EmbeddedChat.FormFieldSelectItemIndicator,{})]},n.value))})})]}),e.jsx(d.EmbeddedChat.FormFieldError,{})]},t.name)),e.jsx(d.EmbeddedChat.FormError,{})]})}),e.jsxs(d.EmbeddedChat.FormFooter,{children:[e.jsx(d.EmbeddedChat.FormCancel,{}),e.jsx(d.EmbeddedChat.FormSubmit,{})]})]}),e.jsxs(d.EmbeddedChat.FormSuccess,{children:[e.jsx(d.EmbeddedChat.FormSuccessHeading,{}),e.jsx(d.EmbeddedChat.FormSuccessMessage,{}),e.jsx(d.EmbeddedChat.FormSuccessButton,{})]})]})}exports.InkeepEmbeddedChat=C;exports.InkeepEmbeddedChatImpl=c;exports.InkeepEmbeddedChatImplContent=o;exports.InkeepEmbeddedChatProvider=m;
|
|
@@ -152,7 +152,7 @@ function H() {
|
|
|
152
152
|
] });
|
|
153
153
|
}
|
|
154
154
|
function f() {
|
|
155
|
-
return /* @__PURE__ */ n(e.
|
|
155
|
+
return /* @__PURE__ */ n(e.MessageToolbar, { children: [
|
|
156
156
|
/* @__PURE__ */ t(e.MessageToolActions, { children: (a) => a.map((r, c) => /* @__PURE__ */ t(e.MessageToolAction, { action: r }, `action-${c}`)) }),
|
|
157
157
|
/* @__PURE__ */ t(e.MessageAction, { action: "copy" }),
|
|
158
158
|
/* @__PURE__ */ t(e.MessageAction, { action: "upvote" }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),a=require("../utils.cjs");function p(f){const{defaultView:u="search",aiChatSettings:i,baseSettings:g,searchSettings:o,shouldAutoFocusInput:l=!0,onToggleView:h,ref:S
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),a=require("../utils.cjs");function p(f){const{defaultView:u="search",aiChatSettings:i,baseSettings:g,searchSettings:o,shouldAutoFocusInput:l=!0,onToggleView:h,ref:R,...S}=f,s=t.useRef(null),m=a.composeRefs(s,i?.chatFunctionsRef),r=t.useRef(null),d=a.composeRefs(r,o?.searchFunctionsRef),w={...i,chatFunctionsRef:m},I={...o,searchFunctionsRef:d},[n,c]=t.useState(u),b=e=>{e.autoSubmit&&e.query&&s.current?.submitMessage(e.query),h?.(e),c(e.view)};return t.useImperativeHandle(R,()=>({setView:c})),t.useEffect(()=>{n==="chat"?s.current?.focusInput():r.current?.focusInput()},[n]),{config:{baseSettings:g,aiChatSettings:w,searchSettings:I},defaultView:u,view:n,setView:c,onToggleView:b,shouldAutoFocusInput:l,...S}}exports.useWidgetImpl=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("@inkeep/cxkit-styled"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("@inkeep/cxkit-styled"),i=require("react"),o=require("./widget-toggle.cjs"),b=require("./modal.cjs"),h=require("../packages/primitives/src/atoms/cmdk/index.cjs");function x(s){const{baseSettings:r,searchSettings:t}=s;return e.jsx(d.Shadow,{children:e.jsx(d.RootProvider,{config:{baseSettings:r,searchSettings:t},componentType:d.WebWidgetInteractionType.EmbeddedSearch,children:e.jsx(u,{...s})})})}function m(s){const{children:r,onToggleView:t,isHidden:n,shouldAutoFocusInput:c=!t}=s;return e.jsx(d.EmbeddedSearch.Provider,{isHidden:n,shouldAutoFocusInput:c,children:r})}function u(s){return e.jsx(m,{...s,children:e.jsx(S,{...s})})}function S(s){const{searchSettings:{view:r}}=d.useInkeepConfig(),{onToggleView:t,shouldShowAskAICard:n=!!t&&r!=="dual-pane"}=s,c=d.useModal(),a=d.useWidget(),l=c&&!a?b.ModalContent:i.Fragment;return e.jsx(l,{children:e.jsx(d.EmbeddedSearch.Wrapper,{"data-show-ask-ai-card":d.dataAttr(n),"data-composite":d.dataAttr(!!t||c?.isOpen),children:e.jsxs(d.EmbeddedSearch.Root,{children:[e.jsx(j,{...s}),e.jsxs(d.EmbeddedSearch.Content,{children:[e.jsx(I,{askAILabel:s.askAILabel,onToggleView:s.onToggleView,shouldShowAskAICard:n}),e.jsx(E,{})]}),e.jsx(A,{})]})})})}function j(s){const{onToggleView:r,askAILabel:t,searchLabel:n}=s,c=h.useCommandState(a=>a.search);return e.jsxs(d.EmbeddedSearch.InputGroup,{children:[e.jsx(d.EmbeddedSearch.InputIcon,{}),e.jsx(d.EmbeddedSearch.Input,{}),e.jsx(d.EmbeddedSearch.Loading,{}),r&&e.jsx(o.WidgetToggle,{onToggleView:r,query:c,askAILabel:t,searchLabel:n,view:"search"}),e.jsx(d.Modal.Close,{})]})}function I(s){const{askAILabel:r,onToggleView:t,shouldShowAskAICard:n}=s,c=h.useCommandState(l=>l.search),{handleToggle:a}=o.useToggleView({onToggleView:t,query:c});return n?e.jsxs(d.EmbeddedSearch.AskAITrigger,{onSelect:()=>a("chat",!0),children:[e.jsx(d.EmbeddedSearch.AskAITriggerIcon,{}),e.jsxs(d.EmbeddedSearch.AskAITriggerLabel,{children:[r||"Ask AI",c&&` "${c}"`]}),e.jsx(d.EmbeddedSearch.AskAITriggerIndicator,{})]}):null}function E(){return e.jsxs(d.EmbeddedSearch.Results,{children:[e.jsx(d.EmbeddedSearch.ResultsLoading,{}),e.jsx(d.EmbeddedSearch.ResultsTabList,{children:s=>s.map(r=>e.jsx(d.EmbeddedSearch.ResultsTab,{tab:r},r))}),e.jsx(d.EmbeddedSearch.ResultsEmpty,{}),e.jsxs(d.EmbeddedSearch.ResultsContent,{children:[e.jsx(g,{}),e.jsx(R,{})]})]})}function g(){return e.jsxs(d.EmbeddedSearch.ResultsScrollArea,{children:[e.jsx(d.EmbeddedSearch.ResultsScrollAreaViewport,{children:e.jsx(d.EmbeddedSearch.ResultsList,{children:s=>s.map(r=>e.jsxs(d.EmbeddedSearch.ResultsItem,{item:r,children:[e.jsx(d.EmbeddedSearch.ResultsItemBreadcrumbs,{children:t=>t.map((n,c)=>e.jsxs(i.Fragment,{children:[n,e.jsx(d.EmbeddedSearch.ResultsItemBreadcrumbIcon,{})]},`${n}-${c}`))}),e.jsx(d.EmbeddedSearch.ResultsItemIcon,{}),e.jsx(d.EmbeddedSearch.ResultsItemTitle,{}),e.jsx(d.EmbeddedSearch.ResultsItemTag,{}),e.jsx(d.EmbeddedSearch.ResultsItemDescription,{children:t=>t.map((n,c)=>e.jsx(d.EmbeddedSearch.ResultsItemDescriptionPart,{part:n},`part-${c}`))}),e.jsx(d.EmbeddedSearch.ResultsItemIndicator,{})]},r.id))})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaScrollbar,{children:e.jsx(d.EmbeddedSearch.ResultsScrollAreaThumb,{})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaCorner,{})]})}function R(){return e.jsxs(d.EmbeddedSearch.ResultsScrollArea,{children:[e.jsx(d.EmbeddedSearch.ResultsScrollAreaViewport,{children:e.jsxs(d.EmbeddedSearch.ResultsItemPreview,{children:[e.jsxs(d.EmbeddedSearch.ResultsItemPreviewHeader,{children:[e.jsxs(d.EmbeddedSearch.ResultsItemPreviewHeading,{children:[e.jsx(d.EmbeddedSearch.ResultsItemPreviewTitle,{}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewTitleLinkIcon,{})]}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewBreadcrumbs,{children:s=>s.map((r,t)=>e.jsxs(i.Fragment,{children:[r,e.jsx(d.EmbeddedSearch.ResultsItemPreviewBreadcrumbIcon,{})]},`${r}-${t}`))})]}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewBody,{}),e.jsxs(d.EmbeddedSearch.ResultsItemPreviewOutline,{children:[e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineTitle,{}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineList,{children:s=>s.map((r,t)=>e.jsxs(d.EmbeddedSearch.ResultsItemPreviewOutlineItem,{href:r.url??void 0,"data-is-match":d.dataAttr(r.isMatch),children:[e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineItemIcon,{}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineItemText,{children:r.content}),r.url&&e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineItemLinkIcon,{})]},`${r.anchor}-${t}`))})]})]})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaScrollbar,{children:e.jsx(d.EmbeddedSearch.ResultsScrollAreaThumb,{})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaCorner,{})]})}function A(){return e.jsx(d.EmbeddedSearch.Footer,{children:e.jsxs(d.EmbeddedSearch.TaglineContainer,{children:[e.jsx(d.EmbeddedSearch.TaglineText,{}),e.jsx(d.EmbeddedSearch.TaglineLogo,{}),e.jsx(d.EmbeddedSearch.TaglineBrandName,{})]})})}exports.InkeepEmbeddedSearch=x;exports.InkeepEmbeddedSearchImpl=u;exports.InkeepEmbeddedSearchImplContent=S;exports.InkeepEmbeddedSearchProvider=m;
|
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as t, jsxs as s } from "react/jsx-runtime";
|
|
3
|
-
import { Shadow as
|
|
3
|
+
import { Shadow as m, RootProvider as I, WebWidgetInteractionType as g, EmbeddedSearch as e, useInkeepConfig as R, useModal as p, useWidget as w, dataAttr as u, Modal as A } from "@inkeep/cxkit-styled";
|
|
4
4
|
import { Fragment as d } from "react";
|
|
5
|
-
import { WidgetToggle as
|
|
6
|
-
import { ModalContent as
|
|
7
|
-
|
|
5
|
+
import { WidgetToggle as T, useToggleView as S } from "./widget-toggle.js";
|
|
6
|
+
import { ModalContent as v } from "./modal.js";
|
|
7
|
+
import { useCommandState as h } from "../packages/primitives/src/atoms/cmdk/index.js";
|
|
8
|
+
function M(n) {
|
|
8
9
|
const { baseSettings: r, searchSettings: l } = n;
|
|
9
|
-
return /* @__PURE__ */ t(
|
|
10
|
-
|
|
10
|
+
return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(
|
|
11
|
+
I,
|
|
11
12
|
{
|
|
12
13
|
config: {
|
|
13
14
|
baseSettings: r,
|
|
14
15
|
searchSettings: l
|
|
15
16
|
},
|
|
16
|
-
componentType:
|
|
17
|
-
children: /* @__PURE__ */ t(
|
|
17
|
+
componentType: g.EmbeddedSearch,
|
|
18
|
+
children: /* @__PURE__ */ t(f, { ...n })
|
|
18
19
|
}
|
|
19
20
|
) });
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
+
function k(n) {
|
|
22
23
|
const { children: r, onToggleView: l, isHidden: o, shouldAutoFocusInput: i = !l } = n;
|
|
23
24
|
return /* @__PURE__ */ t(e.Provider, { isHidden: o, shouldAutoFocusInput: i, children: r });
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
-
return /* @__PURE__ */ t(
|
|
26
|
+
function f(n) {
|
|
27
|
+
return /* @__PURE__ */ t(k, { ...n, children: /* @__PURE__ */ t(P, { ...n }) });
|
|
27
28
|
}
|
|
28
29
|
function P(n) {
|
|
29
30
|
const {
|
|
30
31
|
searchSettings: { view: r }
|
|
31
|
-
} =
|
|
32
|
-
return /* @__PURE__ */ t(i && !c ?
|
|
32
|
+
} = R(), { onToggleView: l, shouldShowAskAICard: o = !!l && r !== "dual-pane" } = n, i = p(), c = w();
|
|
33
|
+
return /* @__PURE__ */ t(i && !c ? v : d, { children: /* @__PURE__ */ t(
|
|
33
34
|
e.Wrapper,
|
|
34
35
|
{
|
|
35
36
|
"data-show-ask-ai-card": u(o),
|
|
@@ -38,7 +39,7 @@ function P(n) {
|
|
|
38
39
|
/* @__PURE__ */ t(b, { ...n }),
|
|
39
40
|
/* @__PURE__ */ s(e.Content, { children: [
|
|
40
41
|
/* @__PURE__ */ t(
|
|
41
|
-
|
|
42
|
+
C,
|
|
42
43
|
{
|
|
43
44
|
askAILabel: n.askAILabel,
|
|
44
45
|
onToggleView: n.onToggleView,
|
|
@@ -47,19 +48,19 @@ function P(n) {
|
|
|
47
48
|
),
|
|
48
49
|
/* @__PURE__ */ t(L, {})
|
|
49
50
|
] }),
|
|
50
|
-
/* @__PURE__ */ t(
|
|
51
|
+
/* @__PURE__ */ t($, {})
|
|
51
52
|
] })
|
|
52
53
|
}
|
|
53
54
|
) });
|
|
54
55
|
}
|
|
55
56
|
function b(n) {
|
|
56
|
-
const { onToggleView: r, askAILabel: l, searchLabel: o } = n,
|
|
57
|
+
const { onToggleView: r, askAILabel: l, searchLabel: o } = n, i = h((c) => c.search);
|
|
57
58
|
return /* @__PURE__ */ s(e.InputGroup, { children: [
|
|
58
59
|
/* @__PURE__ */ t(e.InputIcon, {}),
|
|
59
60
|
/* @__PURE__ */ t(e.Input, {}),
|
|
60
61
|
/* @__PURE__ */ t(e.Loading, {}),
|
|
61
62
|
r && /* @__PURE__ */ t(
|
|
62
|
-
|
|
63
|
+
T,
|
|
63
64
|
{
|
|
64
65
|
onToggleView: r,
|
|
65
66
|
query: i,
|
|
@@ -68,11 +69,11 @@ function b(n) {
|
|
|
68
69
|
view: "search"
|
|
69
70
|
}
|
|
70
71
|
),
|
|
71
|
-
/* @__PURE__ */ t(
|
|
72
|
+
/* @__PURE__ */ t(A.Close, {})
|
|
72
73
|
] });
|
|
73
74
|
}
|
|
74
|
-
function
|
|
75
|
-
const { askAILabel: r, onToggleView: l, shouldShowAskAICard: o } = n,
|
|
75
|
+
function C(n) {
|
|
76
|
+
const { askAILabel: r, onToggleView: l, shouldShowAskAICard: o } = n, i = h((a) => a.search), { handleToggle: c } = S({
|
|
76
77
|
onToggleView: l,
|
|
77
78
|
query: i
|
|
78
79
|
});
|
|
@@ -91,12 +92,12 @@ function L() {
|
|
|
91
92
|
/* @__PURE__ */ t(e.ResultsTabList, { children: (n) => n.map((r) => /* @__PURE__ */ t(e.ResultsTab, { tab: r }, r)) }),
|
|
92
93
|
/* @__PURE__ */ t(e.ResultsEmpty, {}),
|
|
93
94
|
/* @__PURE__ */ s(e.ResultsContent, { children: [
|
|
94
|
-
/* @__PURE__ */ t(
|
|
95
|
-
/* @__PURE__ */ t(
|
|
95
|
+
/* @__PURE__ */ t(V, {}),
|
|
96
|
+
/* @__PURE__ */ t(O, {})
|
|
96
97
|
] })
|
|
97
98
|
] });
|
|
98
99
|
}
|
|
99
|
-
function
|
|
100
|
+
function V() {
|
|
100
101
|
return /* @__PURE__ */ s(e.ResultsScrollArea, { children: [
|
|
101
102
|
/* @__PURE__ */ t(e.ResultsScrollAreaViewport, { children: /* @__PURE__ */ t(e.ResultsList, { children: (n) => n.map((r) => /* @__PURE__ */ s(e.ResultsItem, { item: r, children: [
|
|
102
103
|
/* @__PURE__ */ t(e.ResultsItemBreadcrumbs, { children: (l) => l.map((o, i) => /* @__PURE__ */ s(d, { children: [
|
|
@@ -119,7 +120,7 @@ function C() {
|
|
|
119
120
|
/* @__PURE__ */ t(e.ResultsScrollAreaCorner, {})
|
|
120
121
|
] });
|
|
121
122
|
}
|
|
122
|
-
function
|
|
123
|
+
function O() {
|
|
123
124
|
return /* @__PURE__ */ s(e.ResultsScrollArea, { children: [
|
|
124
125
|
/* @__PURE__ */ t(e.ResultsScrollAreaViewport, { children: /* @__PURE__ */ s(e.ResultsItemPreview, { children: [
|
|
125
126
|
/* @__PURE__ */ s(e.ResultsItemPreviewHeader, { children: [
|
|
@@ -154,7 +155,7 @@ function V() {
|
|
|
154
155
|
/* @__PURE__ */ t(e.ResultsScrollAreaCorner, {})
|
|
155
156
|
] });
|
|
156
157
|
}
|
|
157
|
-
function
|
|
158
|
+
function $() {
|
|
158
159
|
return /* @__PURE__ */ t(e.Footer, { children: /* @__PURE__ */ s(e.TaglineContainer, { children: [
|
|
159
160
|
/* @__PURE__ */ t(e.TaglineText, {}),
|
|
160
161
|
/* @__PURE__ */ t(e.TaglineLogo, {}),
|
|
@@ -162,8 +163,8 @@ function O() {
|
|
|
162
163
|
] }) });
|
|
163
164
|
}
|
|
164
165
|
export {
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
M as InkeepEmbeddedSearch,
|
|
167
|
+
f as InkeepEmbeddedSearchImpl,
|
|
167
168
|
P as InkeepEmbeddedSearchImplContent,
|
|
168
|
-
|
|
169
|
+
k as InkeepEmbeddedSearchProvider
|
|
169
170
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function o(t,n,{checkForDefaultPrevented:r=!0}={}){return function(e){if(t?.(e),r===!1||!e.defaultPrevented)return n?.(e)}}exports.composeEventHandlers=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react");function f(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const i=f(l);function r(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function s(...e){return t=>{let n=!1;const u=e.map(o=>{const c=r(o,t);return!n&&typeof c=="function"&&(n=!0),c});if(n)return()=>{for(let o=0;o<u.length;o++){const c=u[o];typeof c=="function"?c():r(e[o],null)}}}}function a(...e){return i.useCallback(s(...e),e)}exports.composeRefs=s;exports.useComposedRefs=a;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
function l(n, o) {
|
|
3
|
+
if (typeof n == "function")
|
|
4
|
+
return n(o);
|
|
5
|
+
n != null && (n.current = o);
|
|
6
|
+
}
|
|
7
|
+
function i(...n) {
|
|
8
|
+
return (o) => {
|
|
9
|
+
let u = !1;
|
|
10
|
+
const c = n.map((t) => {
|
|
11
|
+
const e = l(t, o);
|
|
12
|
+
return !u && typeof e == "function" && (u = !0), e;
|
|
13
|
+
});
|
|
14
|
+
if (u)
|
|
15
|
+
return () => {
|
|
16
|
+
for (let t = 0; t < c.length; t++) {
|
|
17
|
+
const e = c[t];
|
|
18
|
+
typeof e == "function" ? e() : l(n[t], null);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function s(...n) {
|
|
24
|
+
return f.useCallback(i(...n), n);
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
i as composeRefs,
|
|
28
|
+
s as useComposedRefs
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react"),v=require("react/jsx-runtime");function P(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const i=P(C);function j(e,o){const t=i.createContext(o),s=c=>{const{children:n,...r}=c,u=i.useMemo(()=>r,Object.values(r));return v.jsx(t.Provider,{value:u,children:n})};s.displayName=e+"Provider";function a(c){const n=i.useContext(t);if(n)return n;if(o!==void 0)return o;throw new Error(`\`${c}\` must be used within \`${e}\``)}return[s,a]}function g(e,o=[]){let t=[];function s(c,n){const r=i.createContext(n),u=t.length;t=[...t,n];const d=p=>{const{scope:f,children:l,...x}=p,S=f?.[e]?.[u]||r,b=i.useMemo(()=>x,Object.values(x));return v.jsx(S.Provider,{value:b,children:l})};d.displayName=c+"Provider";function m(p,f){const l=f?.[e]?.[u]||r,x=i.useContext(l);if(x)return x;if(n!==void 0)return n;throw new Error(`\`${p}\` must be used within \`${c}\``)}return[d,m]}const a=()=>{const c=t.map(n=>i.createContext(n));return function(r){const u=r?.[e]||c;return i.useMemo(()=>({[`__scope${e}`]:{...r,[e]:u}}),[r,u])}};return a.scopeName=e,[s,_(a,...o)]}function _(...e){const o=e[0];if(e.length===1)return o;const t=()=>{const s=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(c){const n=s.reduce((r,{useScope:u,scopeName:d})=>{const p=u(c)[`__scope${d}`];return{...r,...p}},{});return i.useMemo(()=>({[`__scope${o.scopeName}`]:n}),[n])}};return t.scopeName=o.scopeName,t}exports.createContext=j;exports.createContextScope=g;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as u from "react";
|
|
2
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
3
|
+
function $(t, c) {
|
|
4
|
+
const n = u.createContext(c), p = (r) => {
|
|
5
|
+
const { children: e, ...o } = r, s = u.useMemo(() => o, Object.values(o));
|
|
6
|
+
return /* @__PURE__ */ f(n.Provider, { value: s, children: e });
|
|
7
|
+
};
|
|
8
|
+
p.displayName = t + "Provider";
|
|
9
|
+
function i(r) {
|
|
10
|
+
const e = u.useContext(n);
|
|
11
|
+
if (e) return e;
|
|
12
|
+
if (c !== void 0) return c;
|
|
13
|
+
throw new Error(`\`${r}\` must be used within \`${t}\``);
|
|
14
|
+
}
|
|
15
|
+
return [p, i];
|
|
16
|
+
}
|
|
17
|
+
function w(t, c = []) {
|
|
18
|
+
let n = [];
|
|
19
|
+
function p(r, e) {
|
|
20
|
+
const o = u.createContext(e), s = n.length;
|
|
21
|
+
n = [...n, e];
|
|
22
|
+
const d = (x) => {
|
|
23
|
+
const { scope: m, children: v, ...a } = x, S = m?.[t]?.[s] || o, h = u.useMemo(() => a, Object.values(a));
|
|
24
|
+
return /* @__PURE__ */ f(S.Provider, { value: h, children: v });
|
|
25
|
+
};
|
|
26
|
+
d.displayName = r + "Provider";
|
|
27
|
+
function C(x, m) {
|
|
28
|
+
const v = m?.[t]?.[s] || o, a = u.useContext(v);
|
|
29
|
+
if (a) return a;
|
|
30
|
+
if (e !== void 0) return e;
|
|
31
|
+
throw new Error(`\`${x}\` must be used within \`${r}\``);
|
|
32
|
+
}
|
|
33
|
+
return [d, C];
|
|
34
|
+
}
|
|
35
|
+
const i = () => {
|
|
36
|
+
const r = n.map((e) => u.createContext(e));
|
|
37
|
+
return function(o) {
|
|
38
|
+
const s = o?.[t] || r;
|
|
39
|
+
return u.useMemo(
|
|
40
|
+
() => ({ [`__scope${t}`]: { ...o, [t]: s } }),
|
|
41
|
+
[o, s]
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
return i.scopeName = t, [p, P(i, ...c)];
|
|
46
|
+
}
|
|
47
|
+
function P(...t) {
|
|
48
|
+
const c = t[0];
|
|
49
|
+
if (t.length === 1) return c;
|
|
50
|
+
const n = () => {
|
|
51
|
+
const p = t.map((i) => ({
|
|
52
|
+
useScope: i(),
|
|
53
|
+
scopeName: i.scopeName
|
|
54
|
+
}));
|
|
55
|
+
return function(r) {
|
|
56
|
+
const e = p.reduce((o, { useScope: s, scopeName: d }) => {
|
|
57
|
+
const x = s(r)[`__scope${d}`];
|
|
58
|
+
return { ...o, ...x };
|
|
59
|
+
}, {});
|
|
60
|
+
return u.useMemo(() => ({ [`__scope${c.scopeName}`]: e }), [e]);
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
return n.scopeName = c.scopeName, n;
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
$ as createContext,
|
|
67
|
+
w as createContextScope
|
|
68
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("react"),f=require("../../../../../@radix-ui_primitive@1.1.1/node_modules/@radix-ui/primitive/dist/index.cjs"),C=require("../../../../../@radix-ui_react-compose-refs@1.1.1_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-compose-refs/dist/index.cjs"),I=require("../../../../../@radix-ui_react-context@1.1.1_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-context/dist/index.cjs"),x=require("../../../../../@radix-ui_react-id@1.1.0_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-id/dist/index.cjs"),B=require("@radix-ui/react-use-controllable-state"),U=require("../../../../../@radix-ui_react-dismissable-layer@1.1.3_@types_react-dom@19.0.3_@types_react@19.0.10__@types__v2z2flytqizqloot5tnzsv72ca/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs"),V=require("../../../../../@radix-ui_react-focus-scope@1.1.1_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@_jnpeo7zp526zce4fsmzkscleui/node_modules/@radix-ui/react-focus-scope/dist/index.cjs"),z=require("../../../../../@radix-ui_react-portal@1.1.3_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19.0._k6mvjumazun2buzo2dcp22wl2y/node_modules/@radix-ui/react-portal/dist/index.cjs"),R=require("../../../../../@radix-ui_react-presence@1.1.2_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19._ceqn6mtlqa4vrghvmtsw5zpqya/node_modules/@radix-ui/react-presence/dist/index.cjs"),p=require("../../../../../@radix-ui_react-primitive@2.0.1_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19_zjcik7jr4zh3druglzeqejtmrq/node_modules/@radix-ui/react-primitive/dist/index.cjs"),K=require("../../../../../@radix-ui_react-focus-guards@1.1.1_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-focus-guards/dist/index.cjs"),Y=require("../../../../../react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/Combination.cjs"),Z=require("../../../../../aria-hidden@1.2.4/node_modules/aria-hidden/dist/es2015/index.cjs"),J=require("../../../../../@radix-ui_react-slot@1.1.1_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-slot/dist/index.cjs"),a=require("react/jsx-runtime");function Q(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const s=Q(H);var P="Dialog",[j,X]=I.createContextScope(P),[ee,u]=j(P),_=e=>{const{__scopeDialog:t,children:o,open:r,defaultOpen:i,onOpenChange:n,modal:l=!0}=e,c=s.useRef(null),g=s.useRef(null),[v=!1,m]=B.useControllableState({prop:r,defaultProp:i,onChange:n});return a.jsx(ee,{scope:t,triggerRef:c,contentRef:g,contentId:x.useId(),titleId:x.useId(),descriptionId:x.useId(),open:v,onOpenChange:m,onOpenToggle:s.useCallback(()=>m(L=>!L),[m]),modal:l,children:o})};_.displayName=P;var T="DialogTrigger",A=s.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,i=u(T,o),n=C.useComposedRefs(t,i.triggerRef);return a.jsx(p.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":N(i.open),...r,ref:n,onClick:f.composeEventHandlers(e.onClick,i.onOpenToggle)})});A.displayName=T;var y="DialogPortal",[te,M]=j(y,{forceMount:void 0}),E=e=>{const{__scopeDialog:t,forceMount:o,children:r,container:i}=e,n=u(y,t);return a.jsx(te,{scope:t,forceMount:o,children:s.Children.map(r,l=>a.jsx(R.Presence,{present:o||n.open,children:a.jsx(z.Portal,{asChild:!0,container:i,children:l})}))})};E.displayName=y;var D="DialogOverlay",O=s.forwardRef((e,t)=>{const o=M(D,e.__scopeDialog),{forceMount:r=o.forceMount,...i}=e,n=u(D,e.__scopeDialog);return n.modal?a.jsx(R.Presence,{present:r||n.open,children:a.jsx(oe,{...i,ref:t})}):null});O.displayName=D;var oe=s.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,i=u(D,o);return a.jsx(Y.default,{as:J.Slot,allowPinchZoom:!0,shards:[i.contentRef],children:a.jsx(p.Primitive.div,{"data-state":N(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),d="DialogContent",h=s.forwardRef((e,t)=>{const o=M(d,e.__scopeDialog),{forceMount:r=o.forceMount,...i}=e,n=u(d,e.__scopeDialog);return a.jsx(R.Presence,{present:r||n.open,children:n.modal?a.jsx(ne,{...i,ref:t}):a.jsx(re,{...i,ref:t})})});h.displayName=d;var ne=s.forwardRef((e,t)=>{const o=u(d,e.__scopeDialog),r=s.useRef(null),i=C.useComposedRefs(t,o.contentRef,r);return s.useEffect(()=>{const n=r.current;if(n)return Z.hideOthers(n)},[]),a.jsx(S,{...e,ref:i,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:f.composeEventHandlers(e.onCloseAutoFocus,n=>{n.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:f.composeEventHandlers(e.onPointerDownOutside,n=>{const l=n.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&n.preventDefault()}),onFocusOutside:f.composeEventHandlers(e.onFocusOutside,n=>n.preventDefault())})}),re=s.forwardRef((e,t)=>{const o=u(d,e.__scopeDialog),r=s.useRef(!1),i=s.useRef(!1);return a.jsx(S,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{e.onCloseAutoFocus?.(n),n.defaultPrevented||(r.current||o.triggerRef.current?.focus(),n.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:n=>{e.onInteractOutside?.(n),n.defaultPrevented||(r.current=!0,n.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=n.target;o.triggerRef.current?.contains(l)&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&i.current&&n.preventDefault()}})}),S=s.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:n,...l}=e,c=u(d,o),g=s.useRef(null),v=C.useComposedRefs(t,g);return K.useFocusGuards(),a.jsxs(a.Fragment,{children:[a.jsx(V.FocusScope,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:n,children:a.jsx(U.DismissableLayer,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":N(c.open),...l,ref:v,onDismiss:()=>c.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(ae,{titleId:c.titleId}),a.jsx(ce,{contentRef:g,descriptionId:c.descriptionId})]})]})}),b="DialogTitle",w=s.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,i=u(b,o);return a.jsx(p.Primitive.h2,{id:i.titleId,...r,ref:t})});w.displayName=b;var F="DialogDescription",q=s.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,i=u(F,o);return a.jsx(p.Primitive.p,{id:i.descriptionId,...r,ref:t})});q.displayName=F;var $="DialogClose",W=s.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,i=u($,o);return a.jsx(p.Primitive.button,{type:"button",...r,ref:t,onClick:f.composeEventHandlers(e.onClick,()=>i.onOpenChange(!1))})});W.displayName=$;function N(e){return e?"open":"closed"}var k="DialogTitleWarning",[ie,G]=I.createContext(k,{contentName:d,titleName:b,docsSlug:"dialog"}),ae=({titleId:e})=>{const t=G(k),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2
|
+
|
|
3
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4
|
+
|
|
5
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},se="DialogDescriptionWarning",ce=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${G(se).contentName}}.`;return s.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},le=_,ue=E,de=O,ge=h;exports.Content=ge;exports.Dialog=_;exports.DialogClose=W;exports.DialogContent=h;exports.DialogDescription=q;exports.DialogOverlay=O;exports.DialogPortal=E;exports.DialogTitle=w;exports.DialogTrigger=A;exports.Overlay=de;exports.Portal=ue;exports.Root=le;exports.WarningProvider=ie;exports.createDialogScope=X;
|