@asgard-js/react 0.3.3 → 0.3.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/dist/index.js CHANGED
@@ -1545,7 +1545,7 @@ const ez = "_bot_avatar_1ch7m_1", _h = {
1545
1545
  card_title: iz,
1546
1546
  card_description: oz,
1547
1547
  card_actions: sz
1548
- }, jT = "cwd://";
1548
+ }, jT = "channel-home://";
1549
1549
  function k_(e) {
1550
1550
  return typeof e == "string" && e.startsWith(jT);
1551
1551
  }
@@ -1555,10 +1555,10 @@ function az(e, t) {
1555
1555
  }
1556
1556
  async function qT(e, t, n) {
1557
1557
  try {
1558
- const r = n.slice(jT.length), { blob: i, filename: o } = await e.downloadCwdFile(r, t);
1558
+ const r = n.slice(jT.length), { blob: i, filename: o } = await e.downloadChannelHomeFile(r, t);
1559
1559
  az(i, o);
1560
1560
  } catch (r) {
1561
- console.error("[asgard] cwd download failed:", r);
1561
+ console.error("[asgard] channel-home download failed:", r);
1562
1562
  }
1563
1563
  }
1564
1564
  function WT(e) {
@@ -0,0 +1,12 @@
1
+ import { AsgardServiceClient } from '@asgard-js/core';
2
+
3
+ /**
4
+ * 判斷 uri 是否為指向 Channel Home(channel 檔案交換平面)的 channel-home:// 連結。
5
+ */
6
+ export declare function isChannelHomeUri(uri: string | null | undefined): boolean;
7
+ /**
8
+ * 處理 channel-home:// URI action:取出相對路徑、呼叫 Edge Server 取回檔案 binary、觸發瀏覽器下載。
9
+ * 失敗時記錄錯誤而不向外拋,讓事件 handler 可安全地 `void` 它。
10
+ */
11
+ export declare function downloadChannelHomeUri(client: AsgardServiceClient, customChannelId: string, uri: string): Promise<void>;
12
+ //# sourceMappingURL=channel-home-download.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel-home-download.d.ts","sourceRoot":"","sources":["../../src/utils/channel-home-download.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAItD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAExE;AAmBD;;;GAGG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,mBAAmB,EAC3B,eAAe,EAAE,MAAM,EACvB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,CAAC,CAUf"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asgard-js/react",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -47,7 +47,7 @@
47
47
  "vite-plugin-svgr": "^4.3.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "@asgard-js/core": "^0.3.3",
50
+ "@asgard-js/core": "^0.3.4",
51
51
  "react": "^18.0.0 || ^19.0.0",
52
52
  "react-dom": "^18.0.0 || ^19.0.0"
53
53
  }
@@ -1,12 +0,0 @@
1
- import { AsgardServiceClient } from '@asgard-js/core';
2
-
3
- /**
4
- * 判斷 uri 是否為指向 channel sandbox 工作目錄的 cwd:// 連結。
5
- */
6
- export declare function isCwdUri(uri: string | null | undefined): boolean;
7
- /**
8
- * 處理 cwd:// URI action:取出相對路徑、呼叫 Edge Server 取回檔案 binary、觸發瀏覽器下載。
9
- * 失敗時記錄錯誤而不向外拋,讓事件 handler 可安全地 `void` 它。
10
- */
11
- export declare function downloadCwdUri(client: AsgardServiceClient, customChannelId: string, uri: string): Promise<void>;
12
- //# sourceMappingURL=cwd-download.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cwd-download.d.ts","sourceRoot":"","sources":["../../src/utils/cwd-download.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAItD;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAEhE;AAmBD;;;GAGG;AACH,wBAAsB,cAAc,CAAC,MAAM,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAUrH"}