@huaqiu/dsh-tool-plugin-update 0.0.0-stage → 0.5.22

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.
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Localized copy for the plugin-update UI (browser half).
3
+ *
4
+ * zh is the fallback, matching the rest of the Huaqiu plugin family
5
+ * (`<html lang>` drives the resolution via the shared sidebar-entry locale
6
+ * helpers). The wording follows the shell's own plugin manager
7
+ * (`ui-plugin-manager/src/client/locales.ts`) so both read as one product.
8
+ *
9
+ * @module
10
+ */
11
+
12
+ const zh = {
13
+ entryLabel: '插件更新',
14
+ entryTooltip: '查看可用的插件更新',
15
+ viewTitle: '插件更新',
16
+ viewIntro: '检查并安装可用的插件更新',
17
+ viewInfo: '在这里查看插件集的更新。标注为「被阻止」的插件因主机或 HQ Edge 版本不兼容而无法安装;已是最新的插件无需操作。',
18
+ refresh: '刷新',
19
+ close: '关闭',
20
+ loading: '正在读取插件更新…',
21
+ empty: '没有可用的插件更新',
22
+ checkFailed: '检查更新失败,请重试',
23
+ installAll: (count: number) => `安装 ${count} 项更新`,
24
+ installOne: '安装',
25
+ installing: '正在安装…(DSH 将自动重启)',
26
+ nothingToInstall: '暂无可安装的更新',
27
+ ignore: '忽略此版本',
28
+ unignore: '恢复提醒',
29
+ ignoredOffer: '已忽略当前插件集更新',
30
+ groupCount: (count: number) => `${count} 个插件`,
31
+ group: {
32
+ actionable: '待处理',
33
+ blocked: '无法安装',
34
+ ignored: '已忽略',
35
+ current: '已是最新',
36
+ },
37
+ state: {
38
+ current: '当前',
39
+ update: '可更新',
40
+ install: '待安装',
41
+ ignored: '已忽略',
42
+ blocked: '被阻止',
43
+ },
44
+ blockedReason: {
45
+ host: '不适用于当前 EDA 主机',
46
+ 'hq-edge-version': '当前 HQ Edge 版本不兼容',
47
+ 'runtime-unknown': 'HQ Edge 版本未知,无法校验',
48
+ },
49
+ runtime: {
50
+ title: 'HQ Edge 运行时',
51
+ current: '当前版本',
52
+ latest: '最新版本',
53
+ set: '发布插件集',
54
+ checkedAt: '上次检查',
55
+ source: '更新源',
56
+ unknown: '版本未知',
57
+ notConfigured: '未配置更新源',
58
+ note: '运行时更新由 EDA 安装器处理',
59
+ },
60
+ lastError: '上次检查失败',
61
+ installError: '安装失败',
62
+ installSuccess: '更新已安装,正在重启 DSH…',
63
+ }
64
+
65
+ export type UpdateCopy = typeof zh
66
+
67
+ const en: UpdateCopy = {
68
+ entryLabel: 'Plugin Updates',
69
+ entryTooltip: 'Review available plugin updates',
70
+ viewTitle: 'Plugin Updates',
71
+ viewIntro: 'Check for and install available plugin updates',
72
+ viewInfo: 'Review the plugin set updates here. A plugin marked Blocked cannot be installed because its host or HQ Edge version is incompatible; a plugin marked Current needs no action.',
73
+ refresh: 'Refresh',
74
+ close: 'Close',
75
+ loading: 'Reading plugin updates…',
76
+ empty: 'No plugin updates available',
77
+ checkFailed: 'Failed to check for updates — please retry',
78
+ installAll: (count: number) => `Install ${count} update${count === 1 ? '' : 's'}`,
79
+ installOne: 'Install',
80
+ installing: 'Installing… (DSH will restart)',
81
+ nothingToInstall: 'Nothing to install right now',
82
+ ignore: 'Ignore this release',
83
+ unignore: 'Show again',
84
+ ignoredOffer: 'The current plugin-set update is ignored',
85
+ groupCount: (count: number) => `${count} plugin${count === 1 ? '' : 's'}`,
86
+ group: {
87
+ actionable: 'Actionable',
88
+ blocked: 'Blocked',
89
+ ignored: 'Ignored',
90
+ current: 'Up to date',
91
+ },
92
+ state: {
93
+ current: 'Current',
94
+ update: 'Update',
95
+ install: 'Install',
96
+ ignored: 'Ignored',
97
+ blocked: 'Blocked',
98
+ },
99
+ blockedReason: {
100
+ host: 'Not applicable to the current EDA host',
101
+ 'hq-edge-version': 'Incompatible with the current HQ Edge version',
102
+ 'runtime-unknown': 'HQ Edge version unknown — cannot verify',
103
+ },
104
+ runtime: {
105
+ title: 'HQ Edge Runtime',
106
+ current: 'Current version',
107
+ latest: 'Latest version',
108
+ set: 'Release set',
109
+ checkedAt: 'Last checked',
110
+ source: 'Update source',
111
+ unknown: 'Version unknown',
112
+ notConfigured: 'No update source configured',
113
+ note: 'Runtime updates are handled by the EDA installer',
114
+ },
115
+ lastError: 'Last check failed',
116
+ installError: 'Install failed',
117
+ installSuccess: 'Update installed — restarting DSH…',
118
+ }
119
+
120
+ export const COPY = { zh, en } as const
@@ -0,0 +1,91 @@
1
+ /**
2
+ * Official DSH icon artwork, inlined as SVG strings.
3
+ *
4
+ * The paths are copied verbatim from `@deepseek-ai/dsh-client-ui-primitives`
5
+ * (deepseek-harness `packages/client/ui-primitives/src/icons/index.tsx`) so the
6
+ * Huaqiu plugin-update view draws the same glyphs as the shell's own plugin
7
+ * manager. Only `currentColor` is used, so every glyph inherits the label ink
8
+ * of whatever surface it sits on — the same contract the primitives rely on.
9
+ *
10
+ * The plugin renders plain DOM (never a React tree), so the artwork is exposed
11
+ * as markup strings rather than components.
12
+ *
13
+ * @module
14
+ */
15
+
16
+ /** Stroke width of the primitives' "Regular" weight. */
17
+ const REGULAR = 1
18
+
19
+ /** Stroke width of the primitives' "Medium" weight. */
20
+ const MEDIUM = 1.3
21
+
22
+ /** Wrap paths in a 16×16 stroked glyph. */
23
+ function glyph(size: number, strokeWidth: number, paths: readonly string[], viewBox = '0 0 16 16'): string {
24
+ const body = paths.map((d) => `<path d="${d}" stroke="currentColor" />`).join('')
25
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="${viewBox}" fill="none" aria-hidden="true" stroke-width="${strokeWidth}" stroke-linecap="round" stroke-linejoin="round">${body}</svg>`
26
+ }
27
+
28
+ /** Wrap fill-only paths (the check glyph) in their own viewBox. */
29
+ function fillGlyph(size: number, paths: readonly string[], viewBox: string): string {
30
+ const body = paths.map((d) => `<path d="${d}" fill="currentColor" />`).join('')
31
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="${viewBox}" fill="none" aria-hidden="true">${body}</svg>`
32
+ }
33
+
34
+ /**
35
+ * The plugin pinwheel — the glyph the shell's own Plugins sidebar entry uses
36
+ * (`IconPluginPinwheelOutlineRegular`). Shared by the sidebar row and the
37
+ * package cards so both read as the same feature.
38
+ */
39
+ export const PLUGIN_ICON = (size = 16): string =>
40
+ glyph(size, REGULAR, [
41
+ 'M7.84457 5.06199C11.6605 4.93876 14.7962 6.14848 14.8484 7.76397C14.8875 8.97461 13.1838 10.0696 10.7215 10.5942',
42
+ 'M5.12742 8.07731C5.00419 4.26138 6.21391 1.12568 7.8294 1.07351C9.04004 1.03441 10.135 2.73808 10.6596 5.20037',
43
+ 'M8.02457 10.6802C4.20865 10.8034 1.07294 9.5937 1.02077 7.97821C0.981678 6.76758 2.68535 5.67262 5.14763 5.14798',
44
+ 'M10.7476 7.89535C10.8708 11.7113 9.66109 14.847 8.0456 14.8991C6.83496 14.9382 5.74 13.2346 5.21536 10.7723',
45
+ ])
46
+
47
+ /** The toolbar's refresh action (`IconRefreshOutlineRegular`). */
48
+ export const REFRESH_ICON = (size = 16): string =>
49
+ glyph(size, REGULAR, [
50
+ 'M14.5001 8C14.5 9.28552 14.1188 10.5422 13.4045 11.611C12.6903 12.6799 11.6752 13.5129 10.4875 14.0049C9.29982 14.4968 7.99295 14.6255 6.73212 14.3747C5.4713 14.124 4.31314 13.505 3.4041 12.596C2.49514 11.687 1.87614 10.5288 1.62537 9.26798C1.37459 8.00716 1.50331 6.70028 1.99525 5.51261C2.48719 4.32494 3.32025 3.30981 4.3891 2.59557C5.45795 1.88134 6.71458 1.50008 8.0001 1.5C9.9001 1.5 11.7001 2.3 13.0001 3.6L14.5001 5.1',
51
+ 'M14.4999 1.5V5.1H10.8999',
52
+ ])
53
+
54
+ /** The panel's close action (`IconCloseOutlineMedium`). */
55
+ export const CLOSE_ICON = (size = 16): string =>
56
+ glyph(size, MEDIUM, ['M2.5 2.5L13.5 13.5', 'M13.5 2.5L2.5 13.5'])
57
+
58
+ /** The notice glyph (`IconWarningOutlineRegular`). */
59
+ export const WARNING_ICON = (size = 16): string =>
60
+ glyph(size, REGULAR, [
61
+ 'M8 14.5C11.5899 14.5 14.5 11.5899 14.5 8C14.5 4.41015 11.5899 1.5 8 1.5C4.41015 1.5 1.5 4.41015 1.5 8C1.5 11.5899 4.41015 14.5 8 14.5Z',
62
+ 'M8 4.29199V9.79199',
63
+ 'M8 10.708V11.708',
64
+ ])
65
+
66
+ /** The settled-state glyph (`IconCheckCircleFillRegular`). */
67
+ export const CHECK_CIRCLE_ICON = (size = 16): string =>
68
+ fillGlyph(size, [
69
+ 'M28.1936 14.6936L19.8066 23.0806C19.2373 23.65 18.7159 24.1742 18.24 24.5571C17.7389 24.9602 17.1365 25.3359 16.3657 25.458C15.9581 25.5225 15.5428 25.5225 15.1353 25.458C14.3645 25.3359 13.7621 24.9602 13.261 24.5571C12.7851 24.1742 12.2637 23.65 11.6943 23.0806L7.80737 19.1936L10.1936 16.8074L14.0806 20.6943C14.7033 21.317 15.0763 21.6873 15.377 21.9292C15.6523 22.1507 15.7109 22.1325 15.6626 22.1248C15.7208 22.1339 15.7802 22.1339 15.8384 22.1248C15.7901 22.1325 15.8486 22.1507 16.124 21.9292C16.4247 21.6873 16.7977 21.317 17.4204 20.6943L25.8074 12.3074L28.1936 14.6936Z',
70
+ 'M32.8496 18.0005C32.8496 9.79906 26.2019 3.15137 18.0005 3.15137C9.79906 3.15137 3.15137 9.79906 3.15137 18.0005C3.15137 26.2019 9.79906 32.8496 18.0005 32.8496C26.2019 32.8496 32.8496 26.2019 32.8496 18.0005ZM35.7764 18.0005C35.7764 27.8173 27.8173 35.7764 18.0005 35.7764C8.18363 35.7764 0.224609 27.8173 0.224609 18.0005C0.224609 8.18363 8.18363 0.224609 18.0005 0.224609C27.8173 0.224609 35.7764 8.18363 35.7764 18.0005Z',
71
+ ], '0 0 36 36')
72
+
73
+ /** The install action (`IconDownloadOutlineRegular`). */
74
+ export const DOWNLOAD_ICON = (size = 16): string =>
75
+ glyph(size, REGULAR, [
76
+ 'M8 1.95317V10.0469',
77
+ 'M4.25 6.29688L8 10.0469L11.75 6.29688',
78
+ 'M1.5 10.0469V13.158C1.5 13.3937 1.60536 13.6198 1.79289 13.7865C1.98043 13.9532 2.23478 14.0469 2.5 14.0469H13.5C13.7652 14.0469 14.0196 13.9532 14.2071 13.7865C14.3946 13.6198 14.5 13.3937 14.5 13.158V10.0469',
79
+ ])
80
+
81
+ /** The head's info affordance (`IconInfoOutlineRegular`, fill-only artwork). */
82
+ export const INFO_ICON = (size = 11): string =>
83
+ fillGlyph(size, [
84
+ 'M12.5757 7.00012C12.5757 3.92085 10.0794 1.42463 7.00012 1.42456C3.9208 1.42456 1.42456 3.9208 1.42456 7.00012C1.42463 10.0794 3.92085 12.5757 7.00012 12.5757C10.0793 12.5756 12.5756 10.0793 12.5757 7.00012ZM13.8002 7.00012C13.8001 10.7559 10.7559 13.8001 7.00012 13.8002C3.2443 13.8002 0.199291 10.7559 0.199219 7.00012C0.199219 3.24426 3.24426 0.199219 7.00012 0.199219C10.7559 0.199291 13.8002 3.2443 13.8002 7.00012Z',
85
+ 'M7.6127 3.18921V4.55986H6.38735V3.18921H7.6127Z',
86
+ 'M7.6127 5.68921V10.8109H6.38735V5.68921H7.6127Z',
87
+ ], '0 0 14 14')
88
+
89
+ /** A folded section's chevron (`IconChevronDownOutlineRegular`). */
90
+ export const CHEVRON_DOWN_ICON = (size = 14): string =>
91
+ glyph(size, REGULAR, ['M4 6L7.29289 9.29289C7.68342 9.68342 8.31658 9.68342 8.70711 9.29289L12 6'])