@inkeep/agents-ui-cloud 0.15.16 → 0.15.18

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 o=require("@inkeep/agents-ui"),l=require("../default-settings.cjs"),g=require("./use-user-properties.cjs"),S=require("../utils/transform-source/index.cjs"),d=i=>{const s=o.mergeProps(l.defaultInkeepBaseSettings,i??{}),a=g.useUserProperties(s),{analyticsApiBaseUrl:m,transformSource:u}=s,c={userProperties:a,async onEvent(e){["modal_opened","modal_closed"].includes(e.eventName)},transformSource(e,t,r){const n=u?.(e,t,r);return S.transformInkeepSource?.(n??e,t,r)??n}};return o.mergeProps(s,c)};exports.useBaseSettings=d;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@inkeep/agents-ui"),l=require("../default-settings.cjs"),d=require("./use-user-properties.cjs"),g=require("../utils/transform-source/index.cjs"),S=i=>{const s=o.mergeProps(l.defaultInkeepBaseSettings,i??{}),a=d.useUserProperties(s),{analyticsApiBaseUrl:m,transformSource:c}=s,u={userProperties:a,async onEvent(e){["modal_opened","modal_closed"].includes(e.eventName)},async onFeedback(e){return e},transformSource(e,t,r){const n=c?.(e,t,r);return g.transformInkeepSource?.(n??e,t,r)??n}};return o.mergeProps(s,u)};exports.useBaseSettings=S;
@@ -1,45 +1,36 @@
1
1
  "use client";
2
- import { mergeProps as n } from "@inkeep/agents-ui";
3
- import { defaultInkeepBaseSettings as c } from "../default-settings.js";
2
+ import { mergeProps as o } from "@inkeep/agents-ui";
3
+ import { defaultInkeepBaseSettings as m } from "../default-settings.js";
4
4
  import { useUserProperties as p } from "./use-user-properties.js";
5
5
  import { transformInkeepSource as u } from "../utils/transform-source/index.js";
6
- const k = (i) => {
7
- const s = n(
8
- c,
9
- i ?? {}
10
- ), a = p(s), {
6
+ const B = (a) => {
7
+ const r = o(
8
+ m,
9
+ a ?? {}
10
+ ), i = p(r), {
11
11
  analyticsApiBaseUrl: f,
12
12
  // privacyPreferences,
13
13
  // env,
14
- transformSource: m
15
- } = s;
16
- return n(
17
- s,
14
+ transformSource: c
15
+ } = r;
16
+ return o(
17
+ r,
18
18
  {
19
- userProperties: a,
19
+ userProperties: i,
20
20
  async onEvent(e) {
21
21
  ["modal_opened", "modal_closed"].includes(e.eventName);
22
22
  },
23
- // we don't have this endpoint in the new api yet so we shouldn't show the feedback buttons
24
- // async onFeedback(feedback) {
25
- // return submitFeedback({
26
- // type: feedback.type,
27
- // messageId: feedback.messageId,
28
- // reasons: feedback.reasons,
29
- // // TODO
30
- // apiKey: '',
31
- // apiUrl: analyticsApiBaseUrl ?? '',
32
- // userProperties,
33
- // properties: feedback.properties,
34
- // })
35
- // },
36
- transformSource(e, t, r) {
37
- const o = m?.(e, t, r);
38
- return u?.(o ?? e, t, r) ?? o;
23
+ // we don't have this endpoint yet but we still want to show the feedback buttons
24
+ async onFeedback(e) {
25
+ return e;
26
+ },
27
+ transformSource(e, s, t) {
28
+ const n = c?.(e, s, t);
29
+ return u?.(n ?? e, s, t) ?? n;
39
30
  }
40
31
  }
41
32
  );
42
33
  };
43
34
  export {
44
- k as useBaseSettings
35
+ B as useBaseSettings
45
36
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),n=require("@inkeep/agents-ui"),a=require("../default-settings.cjs"),s=require("../utils/search-implementation.cjs"),u=({baseSettings:r,searchSettings:e})=>o.useMemo(()=>{const t=n.mergeProps(a.defaultInkeepSearchSettings,e??{}),c=e?.onSearch?e.onSearch:s.createInkeepSearchImplementation({baseSettings:r,searchSettings:t});return n.mergeProps(t,{onSearch:c})},[r,e]);exports.useSearchSettings=u;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),n=require("@inkeep/agents-ui"),a=require("../default-settings.cjs"),u=require("../utils/search-implementation.cjs"),s=({baseSettings:t,searchSettings:r})=>o.useMemo(()=>{const e=n.mergeProps(a.defaultInkeepSearchSettings,r??{});e.url&&(e.url=e.url.replace(/\/+$/,""));const c=r?.onSearch?r.onSearch:u.createInkeepSearchImplementation({baseSettings:t,searchSettings:e});return n.mergeProps(e,{onSearch:c})},[t,r]);exports.useSearchSettings=s;
@@ -3,21 +3,23 @@ import { useMemo as n } from "react";
3
3
  import { mergeProps as t } from "@inkeep/agents-ui";
4
4
  import { defaultInkeepSearchSettings as c } from "../default-settings.js";
5
5
  import { createInkeepSearchImplementation as p } from "../utils/search-implementation.js";
6
- const u = ({
7
- baseSettings: r,
8
- searchSettings: e
6
+ const S = ({
7
+ baseSettings: o,
8
+ searchSettings: r
9
9
  }) => n(() => {
10
- const o = t(
10
+ const e = t(
11
11
  c,
12
- e ?? {}
13
- ), m = e?.onSearch ? e.onSearch : p({
14
- baseSettings: r,
15
- searchSettings: o
12
+ r ?? {}
13
+ );
14
+ e.url && (e.url = e.url.replace(/\/+$/, ""));
15
+ const m = r?.onSearch ? r.onSearch : p({
16
+ baseSettings: o,
17
+ searchSettings: e
16
18
  });
17
- return t(o, {
19
+ return t(e, {
18
20
  onSearch: m
19
21
  });
20
- }, [r, e]);
22
+ }, [o, r]);
21
23
  export {
22
- u as useSearchSettings
24
+ S as useSearchSettings
23
25
  };
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@inkeep/agents-ui-cloud",
3
- "version": "0.15.16",
3
+ "version": "0.15.18",
4
4
  "description": "",
5
5
  "license": "Inkeep, Inc. Customer License (IICL) v1.1",
6
6
  "homepage": "",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "git+https://github.com/inkeep/widget",
9
+ "url": "git+https://github.com/inkeep/agents-ui",
10
10
  "directory": "packages/react"
11
11
  },
12
12
  "type": "module",
@@ -40,7 +40,7 @@
40
40
  "dependencies": {
41
41
  "@radix-ui/react-use-controllable-state": "^1.1.0",
42
42
  "lucide-react": "^0.503.0",
43
- "@inkeep/agents-ui": "0.15.16"
43
+ "@inkeep/agents-ui": "0.15.18"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@biomejs/biome": "1.9.4",