@luma-ai/react 2.0.3 → 2.0.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # تغییرات @luma-ai/react
2
2
 
3
+ ## 2.0.4
4
+
5
+ ### تغییرها
6
+
7
+ - **یک نشانی برای API لوما**: ویجت و `createLumaSessionHandler` همیشه از `https://dash.lumai.ir/api` استفاده می‌کنند. این نشانی حالا پشت CDN داخل ایران است و از شبکه‌های ایران و خارج در دسترس است، پس سرور واسط `ir.lumai.ir` که گزینهٔ `server: "internal"` (پیش‌فرض قبلی) انتخاب می‌کرد کنار گذاشته شد. گزینهٔ `server` هنوز پذیرفته می‌شود تا کد موجود بی‌تغییر کامپایل شود، ولی دیگر اثری ندارد؛ برای نشانی دیگر (مثلاً توسعه محلی) از `apiBaseUrl` استفاده کنید.
8
+ - **افزونه وردپرس**: تنظیم «سرور دستیار» (داخلی/مستقیم) حذف شد و انتخاب ذخیره‌شده نادیده گرفته می‌شود.
9
+
3
10
  ## 2.0.3
4
11
 
5
12
  ### تازه‌ها
@@ -148,11 +148,6 @@ function actionContract(definition) {
148
148
  confirm: definition.confirm
149
149
  });
150
150
  }
151
- // src/core/config.ts
152
- var API_BASE_URLS = {
153
- internal: "https://ir.lumai.ir/api",
154
- direct: "https://dash.lumai.ir/api"
155
- };
156
151
  function parseSession(value) {
157
152
  const raw = value && typeof value === "object" && "data" in value && !("sessionId" in value) ? value.data : value;
158
153
  if (!raw || typeof raw !== "object" || !("sessionId" in raw) || typeof raw.sessionId !== "string" || !raw.sessionId.trim()) throw new Error("Invalid session response");
@@ -4748,7 +4743,7 @@ function callNoteText(note, lang) {
4748
4743
  * (an alias in apps/assistant-widget/vite.config.ts): their call module is
4749
4744
  * a script beside the build (`call.js`, `/build/call-<hash>.js`).
4750
4745
  */
4751
- var importCallModule = () => import("./visitor-call-BtS7EaEX.js").then((module) => ({
4746
+ var importCallModule = () => import("./visitor-call-DkVfVNOy.js").then((module) => ({
4752
4747
  api: 1,
4753
4748
  mountVisitorCall: module.mountVisitorCall
4754
4749
  }));
@@ -4988,7 +4983,7 @@ function placeInViewport(point, viewport, margin = 16) {
4988
4983
  * (an alias in apps/assistant-widget/vite.config.ts): their module is a
4989
4984
  * script beside the build (`cobrowse.js`, `/build/cobrowse-<hash>.js`).
4990
4985
  */
4991
- var importCobrowseModule = () => import("./visitor-cobrowse-DitGnzHK.js").then((module) => ({
4986
+ var importCobrowseModule = () => import("./visitor-cobrowse-DgEub0or.js").then((module) => ({
4992
4987
  api: 1,
4993
4988
  startCobrowse: module.startCobrowse
4994
4989
  }));
@@ -7497,7 +7492,7 @@ function LumaProvider(props) {
7497
7492
  }
7498
7493
  function LumaWidgetHost({ controller, ...props }) {
7499
7494
  const host = props.host;
7500
- const apiBaseUrl = (props.apiBaseUrl ?? API_BASE_URLS[props.server ?? "internal"]).replace(/\/+$/, "");
7495
+ const apiBaseUrl = (props.apiBaseUrl ?? "https://dash.lumai.ir/api").replace(/\/+$/, "");
7501
7496
  const mode = props.sessionEndpoint ? "server" : "public";
7502
7497
  const siteContextKey = JSON.stringify(host?.siteContext ?? null);
7503
7498
  const connection = useMemo(() => ({
@@ -7676,4 +7671,4 @@ var lumaLabel = (label) => ({ "data-luma-label": label });
7676
7671
  var lumaPrivate = () => ({ "data-luma-private": "" });
7677
7672
  export { useLumaAction as a, COBROWSE_LIMITS as c, CALL_FAILURE_TEXT as d, CALL_TIMING as f, defineAction as h, useLuma as i, placeInViewport as l, routerPath as m, lumaPrivate as n, useLumaContext as o, callDuration as p, LumaPrivate as r, LumaProvider as s, lumaLabel as t, pointOf as u };
7678
7673
 
7679
- //# sourceMappingURL=src-BLo_tGKW.js.map
7674
+ //# sourceMappingURL=src-BHvPjJWi.js.map