@salesforce/sdk-view 1.120.4 → 1.120.7

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
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAIvF;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,UAAU;IACjD,iEAAiE;IACjE,OAAO,CAAC,EAAE,qBAAqB,CAAC;CAChC;AAED;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAyB9E;AAED,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEvE,YAAY,EACX,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,KAAK,EACL,SAAS,EACT,YAAY,EACZ,OAAO,GACP,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAIvF;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,UAAU;IACjD,iEAAiE;IACjE,OAAO,CAAC,EAAE,qBAAqB,CAAC;CAChC;AAED;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAuB9E;AAED,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEvE,YAAY,EACX,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,KAAK,EACL,SAAS,EACT,YAAY,EACZ,OAAO,GACP,MAAM,sBAAsB,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { getSurface as p, Surface as a, McpAppsSession as f } from "@salesforce/sdk-core";
2
- function m(s) {
1
+ import { getSurface as d, Surface as a, McpAppsSession as m } from "@salesforce/sdk-core";
2
+ function p(s) {
3
3
  switch (s) {
4
4
  case "info":
5
5
  return "ℹ️";
@@ -14,7 +14,7 @@ function m(s) {
14
14
  }
15
15
  }
16
16
  function c(s, e) {
17
- return `${m(e)} ${s}`;
17
+ return `${p(e)} ${s}`;
18
18
  }
19
19
  function l(s, e) {
20
20
  const t = s.trim();
@@ -32,7 +32,7 @@ function l(s, e) {
32
32
  error: `Invalid ${e}: "${s}". Value must be a positive number.`
33
33
  } : { success: !0, value: r };
34
34
  }
35
- class w {
35
+ class f {
36
36
  constructor(e) {
37
37
  this.session = e;
38
38
  }
@@ -77,7 +77,7 @@ class w {
77
77
  return n.value !== void 0 && (o.width = n.value), r.value !== void 0 && (o.height = r.value), this.session.sendNotification("ui/notifications/size-changed", o), Promise.resolve();
78
78
  }
79
79
  }
80
- class d {
80
+ class w {
81
81
  async displayAlert(e) {
82
82
  const t = e.level || "info", n = c(e.message, t);
83
83
  await window.openai.sendFollowUpMessage({ prompt: n });
@@ -108,24 +108,24 @@ function M() {
108
108
  i = null, u = null;
109
109
  }
110
110
  async function h(s) {
111
- switch (p(s?.surface)) {
111
+ switch (d(s?.surface)) {
112
112
  case a.OpenAI:
113
- return new d();
113
+ return new w();
114
114
  case a.UIBundle:
115
- case a.MicroFrontend:
116
115
  return {};
117
116
  case a.SalesforceACC:
118
117
  return {};
118
+ case a.MicroFrontend:
119
119
  case a.MCPApps: {
120
- const t = await f.getInstance(s?.mcpApps);
121
- return t.handshakeSucceeded ? new w(t) : window.openai ? new d() : {};
120
+ const t = await m.getInstance(s?.mcpApps);
121
+ return t.handshakeSucceeded ? new f(t) : {};
122
122
  }
123
123
  default:
124
124
  return {};
125
125
  }
126
126
  }
127
127
  export {
128
- w as MCPAppsViewSDK,
128
+ f as MCPAppsViewSDK,
129
129
  h as createViewSDK,
130
130
  v as getViewSDK,
131
131
  y as getViewSDKSync,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/sdk-view",
3
- "version": "1.120.4",
3
+ "version": "1.120.7",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -26,7 +26,7 @@
26
26
  "test:coverage": "vitest run --coverage"
27
27
  },
28
28
  "dependencies": {
29
- "@salesforce/sdk-core": "^1.120.4"
29
+ "@salesforce/sdk-core": "^1.120.7"
30
30
  },
31
31
  "devDependencies": {
32
32
  "vite": "^7.3.1",