@ezychat/web 0.1.72 → 0.1.75

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.
Files changed (36) hide show
  1. package/dist-lib/chunks/{admin-CFtHolDh.js → admin-CwS6ahLc.js} +30 -9
  2. package/dist-lib/chunks/{admin-B6UI7hY7.js → admin-p6QRa2DG.js} +30 -9
  3. package/dist-lib/chunks/app-CQ2bZhrf.js +225 -0
  4. package/dist-lib/chunks/{app-BXBt4xNx.js → app-DeH3RXhX.js} +137 -10
  5. package/dist-lib/chunks/{common-0sL8O9KV.js → common-CjI5LeVc.js} +4 -2
  6. package/dist-lib/chunks/{common-CIXHivlt.js → common-DYK9ZVMh.js} +4 -2
  7. package/dist-lib/chunks/{inbox-JiKiTquN.js → inbox-C9xTxE6Y.js} +145 -6
  8. package/dist-lib/chunks/{inbox-BHBl1foS.js → inbox-D-koJMyr.js} +145 -6
  9. package/dist-lib/ezychat-web.css +1 -1
  10. package/dist-lib/index.js +9133 -6502
  11. package/dist-lib/types/admin/AgentGroupsCard.d.ts +4 -4
  12. package/dist-lib/types/admin/BusinessTemplateCard.d.ts +11 -3
  13. package/dist-lib/types/admin/business-templates-data.d.ts +117 -0
  14. package/dist-lib/types/admin/business-templates.d.ts +48 -93
  15. package/dist-lib/types/admin/connectors/SheetsSettingsCard.d.ts +5 -3
  16. package/dist-lib/types/admin/connectors/sheets-tabs.d.ts +24 -0
  17. package/dist-lib/types/api/ai-groups.d.ts +70 -1
  18. package/dist-lib/types/api/ai-templates.d.ts +145 -0
  19. package/dist-lib/types/api/ai.d.ts +22 -0
  20. package/dist-lib/types/api/connectors.d.ts +34 -13
  21. package/dist-lib/types/api/group-admin.d.ts +77 -0
  22. package/dist-lib/types/components/app/FeedbackDialog.d.ts +35 -0
  23. package/dist-lib/types/create-app.d.ts +1 -1
  24. package/dist-lib/types/i18n/resources.d.ts +351 -21
  25. package/dist-lib/types/inbox/Composer.d.ts +2 -2
  26. package/dist-lib/types/inbox/FixEnglish.d.ts +27 -0
  27. package/dist-lib/types/inbox/GroupAdmin.d.ts +16 -0
  28. package/dist-lib/types/inbox/GroupAdminDialogs.d.ts +23 -0
  29. package/dist-lib/types/inbox/GroupAdminShared.d.ts +60 -0
  30. package/dist-lib/types/inbox/GroupAiRow.d.ts +5 -3
  31. package/dist-lib/types/inbox/PdfViewer.d.ts +9 -0
  32. package/dist-lib/types/lib/links.d.ts +2 -6
  33. package/dist-lib/types/lib/pdf.d.ts +33 -0
  34. package/package.json +3 -2
  35. package/dist-lib/chunks/app-Zoharwle.js +0 -98
  36. package/dist-lib/types/components/app/FeatureRequestAction.d.ts +0 -7
@@ -4,12 +4,10 @@ export declare const ANCHOR_SPRINT_URL = "https://www.anchorsprint.com";
4
4
  export declare const EZYCHAT_WEBSITE_URL = "https://ezychat.ai/";
5
5
  export declare const GITHUB_REPO_URL = "https://github.com/ossmalaysia/ezychat-lite";
6
6
  export declare const GITHUB_ISSUES_URL = "https://github.com/ossmalaysia/ezychat-lite/issues/new/choose";
7
- /** The website feedback form in the app's language, with the running version filled in. */
8
- export declare function feedbackUrl(locale: string, version: string | null): string;
9
7
  /** Contact Anchor Sprint for custom features. */
10
8
  export declare const CUSTOM_FEATURE_URL = "https://www.anchorsprint.com";
11
9
  /**
12
- * The outside links the UI shows (About, Report an issue, release notes, feedback, support).
10
+ * The outside links the UI shows (About, Report an issue, release notes, support).
13
11
  * Another product build overrides them through `createInboxApp({ links })`; `null` hides a link.
14
12
  */
15
13
  export interface AppLinks {
@@ -24,8 +22,6 @@ export interface AppLinks {
24
22
  * release through the desktop bridge; another value is opened as a plain link.
25
23
  */
26
24
  releaseNotes: ((version: string) => string | null) | null;
27
- /** The feedback / feature request form in the app's language. */
28
- feedback: (locale: string, version: string | null) => string;
29
25
  /** Support email address (mailto link where there is no report-issue page). */
30
26
  supportEmail: string | null;
31
27
  /** "Upgrade to Enterprise" page (Lite's limits, account menu, About); null hides every upgrade link. */
@@ -50,7 +46,7 @@ export declare const ENTERPRISE_UPGRADE_URL = "https://ezychat.ai/?utm_source=ez
50
46
  export declare const CONNECTOR_REQUEST_WHATSAPP = "601159246128";
51
47
  /** A WhatsApp chat with the EzyChat team, with `message` ready to send. */
52
48
  export declare function connectorRequestUrl(message: string): string;
53
- /** Lite's links: GitHub repository and issues, feedback on ezychat.ai. */
49
+ /** Lite's links: GitHub repository and issues, the website. */
54
50
  export declare const LITE_APP_LINKS: Readonly<AppLinks>;
55
51
  /** Lite's links with the given overrides (an explicit `null` hides that link). */
56
52
  export declare function resolveAppLinks(overrides?: Partial<AppLinks>): AppLinks;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Shows PDF attachments inside the app (pdf.js, loaded on first use), so a teammate can read a
3
+ * customer's PDF without saving it first. The bytes are fetched from our own media route and drawn on
4
+ * canvases: the PDF never becomes a document on our origin, its scripts never run, and no plugin or
5
+ * external viewer is involved.
6
+ */
7
+ export interface PdfPage {
8
+ /** Size in CSS pixels at scale 1. */
9
+ width: number;
10
+ height: number;
11
+ /** Draws the page on `canvas` at `scale` (CSS pixels) × `pixelRatio`. Rejects when cancelled. */
12
+ render(canvas: HTMLCanvasElement, scale: number, pixelRatio: number): {
13
+ promise: Promise<void>;
14
+ cancel(): void;
15
+ };
16
+ }
17
+ export interface PdfDocument {
18
+ numPages: number;
19
+ getPage(pageNumber: number): Promise<PdfPage>;
20
+ destroy(): void;
21
+ }
22
+ /** PDFs larger than this are not opened in the app (download instead): parsing runs in the browser. */
23
+ export declare const PDF_VIEW_MAX_BYTES: number;
24
+ export declare class PdfLoadError extends Error {
25
+ readonly reason: 'too_large' | 'not_pdf' | 'failed';
26
+ constructor(reason: 'too_large' | 'not_pdf' | 'failed');
27
+ }
28
+ /** True for the files the in-app viewer opens. */
29
+ export declare function isPdfMime(mime: string | null | undefined): boolean;
30
+ /** Checks the first bytes: only a real PDF goes to the parser. */
31
+ export declare function looksLikePdf(bytes: Uint8Array): boolean;
32
+ /** Downloads the media file and opens it with pdf.js. */
33
+ export declare function loadPdf(url: string, signal: AbortSignal): Promise<PdfDocument>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ezychat/web",
3
- "version": "0.1.72",
3
+ "version": "0.1.75",
4
4
  "type": "module",
5
5
  "description": "EzyChat core: the team inbox web app (React) as a library, with createInboxApp and its extension API.",
6
6
  "license": "MIT",
@@ -40,7 +40,7 @@
40
40
  "build:lib": "node ../../scripts/build-web-lib.mjs"
41
41
  },
42
42
  "dependencies": {
43
- "@ezychat/shared": "0.1.72",
43
+ "@ezychat/shared": "0.1.75",
44
44
  "@fontsource-variable/inter": "^5.3.0",
45
45
  "@tanstack/react-query": "^5.105.0",
46
46
  "@types/react": "^19.3.0",
@@ -55,6 +55,7 @@
55
55
  "next-themes": "^0.4.6",
56
56
  "nspell": "2.1.5",
57
57
  "opus-recorder": "8.0.5",
58
+ "pdfjs-dist": "6.4.299",
58
59
  "qrcode.react": "^4.2.0",
59
60
  "radix-ui": "^1.8.1",
60
61
  "react": "^19.3.1",
@@ -1,98 +0,0 @@
1
- // src/i18n/locales/zh-CN/app.json
2
- var e = {
3
- title: "关于 {{product}}",
4
- description: "一个 WhatsApp 号码,全队共用一个收件箱,在您自己的电脑上运行。",
5
- version: "版本 {{version}}",
6
- versionUnknown: "版本未知",
7
- github: "在 GitHub 上查看",
8
- website: "访问网站"
9
- }, t = {
10
- builtBy: "由 <a>Anchor Sprint</a> 开发",
11
- versionShort: "v{{version}}",
12
- supportLinks: "支持链接",
13
- reportIssue: "报告问题",
14
- customFeatures: "定制功能",
15
- customFeature: "需要定制功能?<a>联系 Anchor Sprint</a>",
16
- helpFeedback: "帮助与反馈",
17
- emailSupport: "发送邮件给支持团队"
18
- }, n = {
19
- label: "建议新功能",
20
- opensWebsite: "(在新窗口中打开 ezychat.ai)"
21
- }, r = { clear: "清除{{label}}" }, i = {
22
- title: "应用更新",
23
- installed: "已安装 {{version}}",
24
- checkingGitHub: "正在检查 GitHub…",
25
- current: "没有更新的已发布版本。",
26
- available: "版本 {{version}} 可用。",
27
- checkFailed: "无法完成更新检查。",
28
- automatic: "这台电脑会自动在 GitHub 上检查新版本。",
29
- downloading: "正在下载更新… {{percent}}%",
30
- downloaded: "版本 {{version}} 已下载并通过验证。",
31
- preparing: "正在准备重启并更新…",
32
- progressLabel: "更新下载",
33
- keepsWorking: "下载期间收件箱可照常使用。",
34
- preview: "预览版",
35
- howManaged: "请先下载更新。准备就绪后,选择“重启并更新”并批准系统提示。应用及已安装的后台服务会自动重启。您的账户、聊天和设置都会保留。",
36
- howManual: "下载安装程序,从托盘菜单退出此应用,然后安装新版本。您的账户、聊天和设置会保留在这台电脑上。",
37
- noInstaller: "暂时没有适用于这台电脑的安装程序。详情请查看 GitHub 上的发布页面。",
38
- interrupt: "更新会短暂中断团队访问,请选择空闲时段。",
39
- interruptManual: "更新会短暂中断团队访问,请选择空闲时段。如使用 Windows 服务,请在安装前停止服务,安装后再启动。在 Mac 上,请在安装前移除服务,安装后再启用,以刷新受保护的应用副本。",
40
- unverified: "此版本无法在这里验证安装。请在 GitHub 上打开发布页面获取手动安装程序。",
41
- restart: "重启并更新",
42
- download: "下载 {{version}}",
43
- cancelDownload: "取消下载",
44
- releaseOnGitHub: "GitHub 发布页面",
45
- checking: "正在检查…",
46
- check: "检查更新",
47
- lastChecked: "上次检查:{{time}}",
48
- dialogTitle: "更新 {{product}}",
49
- notice: {
50
- label: "有可用的应用更新",
51
- title: "{{product}} {{version}} 已可用",
52
- preview: "GitHub 上有新的预览版。",
53
- release: "GitHub 上有新版本。",
54
- dismiss: "忽略更新提示",
55
- review: "查看更新",
56
- previewFeed: "新的预览版已就绪。",
57
- releaseFeed: "新版本已就绪。"
58
- },
59
- checkingFeed: "正在检查更新…",
60
- automaticFeed: "这台电脑会自动检查新版本。",
61
- noInstallerFeed: "暂时没有适用于这台电脑的安装程序。详情请查看发布说明。",
62
- unverifiedFeed: "此版本无法在这里验证安装。请联系支持团队获取手动安装程序。",
63
- releaseNotes: "发布说明",
64
- whatsNew: "{{version}} 的新内容",
65
- updatedTo: "已更新到 {{version}}。您的对话、账户和设置均已保留。"
66
- }, a = {
67
- title: "分享此应用",
68
- description: "向他人介绍您的免费团队收件箱。发布什么内容由您决定。",
69
- caption: "我在使用 EzyChat Lite,一个在我自己电脑上运行的免费 WhatsApp 团队收件箱。一个号码,团队共享收件箱,数据由我掌握。",
70
- message: "您的消息",
71
- copyMessage: "复制消息和链接",
72
- publicLink: "应用公开链接",
73
- privacy: "这里分享的是公开的项目页面。您的私人收件箱地址和对话不会公开。",
74
- copyLink: "仅复制链接",
75
- socialTitle: "LinkedIn 和 Facebook",
76
- socialHint: "先复制您的消息,再粘贴到打开的帖子中。",
77
- opensNewWindow: "(在新窗口中打开)",
78
- instagramHint: "下载图片,在 Instagram 中创建帖子,然后把复制的消息粘贴为说明文字。将公开链接添加到个人简介或快拍链接贴纸中。",
79
- imageAlt: "EzyChat Lite:免费的 WhatsApp 团队收件箱。在您的电脑上运行,数据由您掌握。",
80
- downloadImage: "下载 Instagram 图片",
81
- more: "更多分享方式",
82
- feedback: {
83
- messageCopied: "消息和公开链接已复制,请粘贴到您的帖子中。",
84
- linkCopied: "应用公开链接已复制。",
85
- copyUnavailable: "此处无法复制。请选中上方的消息或链接后手动复制。",
86
- shareUnavailable: "此处无法分享。请选中上方的消息或链接后手动复制。",
87
- imageStarted: "图片已开始下载。请上传到 Instagram 并粘贴您的说明文字。",
88
- imageFailed: "无法生成图片。请重新下载,或分享消息和公开链接。"
89
- }
90
- }, o = {
91
- about: e,
92
- credits: t,
93
- featureRequest: n,
94
- search: r,
95
- updates: i,
96
- share: a
97
- };
98
- export { e as about, t as credits, o as default, n as featureRequest, r as search, a as share, i as updates };
@@ -1,7 +0,0 @@
1
- /**
2
- * Opens the feedback form on ezychat.ai in the app's language, with the app version filled in.
3
- * No GitHub account needed; nothing is sent until the user submits the form.
4
- */
5
- export declare function FeatureRequestAction({ placement }: {
6
- placement?: 'button' | 'menu';
7
- }): import("react").JSX.Element;