@huaweidevtools/aishell-dsh-brand 0.0.0-stage → 0.0.1-beta.1

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/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined in Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is derived from (or based upon) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2024 Huawei Cloud AI Shell
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
200
+ implied. See the License for the specific language governing
201
+ permissions and limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,41 @@
1
- # Temporary Holding Version
1
+ # @huaweidevtools/aishell-dsh-brand
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ AI Shell brand reskin for DSH web. Replaces the default DeepSeek fish mark in the sidebar and blank-session hero with the AI Shell icon and wordmark, and shadows the browser/window product title at runtime.
4
+
5
+ ## How it works
6
+
7
+ Registers occupants for three `single` brand slots:
8
+
9
+ - `sidebar.brand.mark` — the icon in the expanded sidebar brand row and collapsed rail
10
+ - `sidebar.brand.name` — the wordmark beside the expanded mark
11
+ - `conversation.hero.brand.mark` — the icon on the blank-session first screen
12
+
13
+ All three are `kind: 'single'` slots, so this plugin replaces whatever occupied them before. In a default (non-official) DSH build those slots are empty (the shell renders a fish fallback), so aishell-brand simply fills them. In an official build it overrides `ui-brand-official`.
14
+
15
+ SVG assets are inlined as CSS `background-image` data URIs via lightningcss CSS Modules — no runtime fetch, no flash of missing image.
16
+
17
+ ## Window title shadow
18
+
19
+ The product title "DeepSeek Harness" is baked into the dsh tree at build time (`DSH_CLIENT_TITLE` → both the served `dsh-web-frontend/dist/index.html` and the ui-layout `DocumentTitle` component), and that tree is covered by the desktop-runtime digest — the asar shell-layer swap cannot reach it. The plugin therefore shadows the title at runtime (`src/client/title-shadow.ts`): an own `title` property on the document intercepts every write and rewrites the product name to "AI Shell" in flight, covering both the initial page title and the repeated writes `DocumentTitle` performs on each session/panel change. The Electron main process never calls `setTitle` on the main window, so the window title follows `document.title` and this single seam covers both.
20
+
21
+ Shadowing is a default, not a force: the effect's disposer removes the own property and restores the official title, so disabling the plugin returns the shell to its official behavior.
22
+
23
+ ## Install
24
+
25
+ ```sh
26
+ # Standalone:
27
+ dsh plugin --profile <name> add link:<repo>/packages/aishell-brand
28
+
29
+ # Or via the aishell-base bundle:
30
+ dsh plugin --profile <name> add @huaweidevtools/aishell-dsh-base
31
+ ```
32
+
33
+ ## What it does NOT touch
34
+
35
+ - Navigation, settings, panels, conversation — only the three brand slots and the product title.
36
+ - DSH default plugins — no rows disabled.
37
+ - Session titles in the browser title — the part before the product name passes through unchanged.
38
+
39
+ ## License
40
+
41
+ Apache License 2.0.
@@ -0,0 +1,11 @@
1
+ <svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="44.000000" height="44.000000" fill="none">
2
+ <defs>
3
+ <linearGradient id="paint_linear_0" x1="38.5" x2="2.19999695" y1="1.90734863e-06" y2="39.5999908" gradientUnits="userSpaceOnUse">
4
+ <stop stop-color="rgb(53,137,255)" offset="0" stop-opacity="1" />
5
+ <stop stop-color="rgb(169,38,255)" offset="1" stop-opacity="1" />
6
+ </linearGradient>
7
+ </defs>
8
+ <rect id="icon_AIShell" width="44.000000" height="44.000000" x="0.000000" y="0.000000" fill="rgb(255,255,255)" fill-opacity="0" />
9
+ <path id="合并" d="M37.4576 0.299738C37.3775 0.139877 37.2861 0.0428196 37.1832 0.00856393C37.0917 -0.0142732 37.006 0.00856394 36.9259 0.0770754C36.8459 0.145587 36.7887 0.219808 36.7545 0.299738C36.4572 1.86408 35.7369 3.21718 34.5937 4.35904C33.4618 5.48948 32.0956 6.22027 30.495 6.55141C30.3921 6.57424 30.3178 6.64275 30.272 6.75694C30.2377 6.87113 30.2435 6.97389 30.2892 7.06524C30.3464 7.15659 30.415 7.20226 30.495 7.20226C31.2078 7.35296 31.8779 7.58759 32.5055 7.90618L32.5055 7.9062L32.5056 7.90623C33.257 8.28771 33.9473 8.78955 34.5765 9.41176C35.7312 10.5422 36.4572 11.8896 36.7545 13.4539C36.8116 13.591 36.8974 13.6823 37.0117 13.728C37.1146 13.7622 37.2061 13.7565 37.2861 13.7109C37.3775 13.6538 37.4347 13.5681 37.4576 13.4539C37.7891 11.8896 38.5151 10.5422 39.6355 9.41176C40.7674 8.2699 42.1279 7.5334 43.717 7.20226C43.8199 7.17943 43.9 7.12233 43.9571 7.03099C44.0143 6.92822 44.0143 6.83116 43.9571 6.73981C43.9 6.63705 43.8199 6.57424 43.717 6.55141C42.1507 6.22027 40.7959 5.48948 39.6527 4.35904C38.5208 3.21718 37.7891 1.86408 37.4576 0.299738ZM42.625 16.4999L42.625 33C42.625 33.9493 42.4572 34.829 42.1216 35.6392C41.786 36.4495 41.2826 37.1902 40.6114 37.8614C39.9402 38.5326 39.1994 39.036 38.3892 39.3716C37.579 39.7072 36.6992 39.875 35.75 39.875L10.9999 39.875L8.24995 39.875C7.30073 39.875 6.42102 39.7072 5.61081 39.3716C4.80058 39.036 4.05985 38.5326 3.38863 37.8614C2.71742 37.1902 2.21402 36.4494 1.87841 35.6392C1.5428 34.829 1.375 33.9493 1.375 33L1.375 11C1.375 10.0508 1.5428 9.17106 1.8784 8.36083L1.87841 8.36082C2.21402 7.55059 2.71743 6.80987 3.38864 6.13866C4.05985 5.46745 4.80057 4.96404 5.61079 4.62843L5.6108 4.62843C6.42103 4.29282 7.30076 4.12502 8.25 4.12502L27.4999 4.125C28.2699 4.125 28.8749 4.73 28.8749 5.5C28.8749 6.27 28.2699 6.875 27.4999 6.875L8.25 6.87502C7.68045 6.87502 7.15261 6.9757 6.66648 7.17706C6.18034 7.37843 5.73591 7.68047 5.33318 8.0832C4.93046 8.48593 4.62841 8.93036 4.42705 9.41649C4.22568 9.90263 4.125 10.4305 4.125 11L4.125 33C4.125 33.5696 4.22568 34.0974 4.42705 34.5835C4.62841 35.0697 4.93045 35.5141 5.33317 35.9168C5.73588 36.3195 6.18028 36.6216 6.66639 36.8229C7.15256 37.0243 7.68042 37.125 8.24999 37.125L10.9999 37.125L35.75 37.125C36.3195 37.125 36.8474 37.0243 37.3335 36.823C37.8197 36.6216 38.2641 36.3196 38.6668 35.9168C39.0695 35.5141 39.3716 35.0697 39.573 34.5835C39.7743 34.0974 39.875 33.5696 39.875 33L39.875 16.4999C39.875 15.7299 40.48 15.1249 41.25 15.1249C42.02 15.1249 42.625 15.7299 42.625 16.4999ZM10.0277 12.7777C10.5722 12.2333 11.4278 12.2333 11.9723 12.7777L20.2222 21.0277C20.4907 21.2962 20.6249 21.6203 20.6249 22C20.6249 22.3797 20.4907 22.7037 20.2222 22.9722L11.9722 31.2223C11.4277 31.7668 10.5721 31.7668 10.0277 31.2223C9.48318 30.6779 9.48317 29.8223 10.0276 29.2778L17.3054 22L10.0277 14.7223C9.48325 14.1778 9.48326 13.3222 10.0277 12.7777ZM20.625 28.875C20.625 28.105 21.23 27.5 22 27.5L33 27.5C33.77 27.5 34.375 28.105 34.375 28.875C34.375 29.645 33.77 30.25 33 30.25L22 30.25C21.23 30.25 20.625 29.645 20.625 28.875Z" fill="rgb(0,0,0)" fill-opacity="0" fill-rule="evenodd" />
10
+ <path id="合并" d="M37.4576 0.299738C37.3775 0.139877 37.2861 0.0428196 37.1832 0.00856393C37.0917 -0.0142732 37.006 0.00856394 36.9259 0.0770754C36.8459 0.145587 36.7887 0.219808 36.7545 0.299738C36.4572 1.86408 35.7369 3.21718 34.5937 4.35904C33.4618 5.48948 32.0956 6.22027 30.495 6.55141C30.3921 6.57424 30.3178 6.64275 30.272 6.75694C30.2377 6.87113 30.2435 6.97389 30.2892 7.06524C30.3464 7.15659 30.415 7.20226 30.495 7.20226C31.2078 7.35296 31.8779 7.58759 32.5055 7.90618L32.5055 7.9062L32.5056 7.90623C33.257 8.28771 33.9473 8.78955 34.5765 9.41176C35.7312 10.5422 36.4572 11.8896 36.7545 13.4539C36.8116 13.591 36.8974 13.6823 37.0117 13.728C37.1146 13.7622 37.2061 13.7565 37.2861 13.7109C37.3775 13.6538 37.4347 13.5681 37.4576 13.4539C37.7891 11.8896 38.5151 10.5422 39.6355 9.41176C40.7674 8.2699 42.1279 7.5334 43.717 7.20226C43.8199 7.17943 43.9 7.12233 43.9571 7.03099C44.0143 6.92822 44.0143 6.83116 43.9571 6.73981C43.9 6.63705 43.8199 6.57424 43.717 6.55141C42.1507 6.22027 40.7959 5.48948 39.6527 4.35904C38.5208 3.21718 37.7891 1.86408 37.4576 0.299738ZM42.625 16.4999L42.625 33C42.625 33.9493 42.4572 34.829 42.1216 35.6392C41.786 36.4495 41.2826 37.1902 40.6114 37.8614C39.9402 38.5326 39.1994 39.036 38.3892 39.3716C37.579 39.7072 36.6992 39.875 35.75 39.875L10.9999 39.875L8.24995 39.875C7.30073 39.875 6.42102 39.7072 5.61081 39.3716C4.80058 39.036 4.05985 38.5326 3.38863 37.8614C2.71742 37.1902 2.21402 36.4494 1.87841 35.6392C1.5428 34.829 1.375 33.9493 1.375 33L1.375 11C1.375 10.0508 1.5428 9.17106 1.8784 8.36083L1.87841 8.36082C2.21402 7.55059 2.71743 6.80987 3.38864 6.13866C4.05985 5.46745 4.80057 4.96404 5.61079 4.62843L5.6108 4.62843C6.42103 4.29282 7.30076 4.12502 8.25 4.12502L27.4999 4.125C28.2699 4.125 28.8749 4.73 28.8749 5.5C28.8749 6.27 28.2699 6.875 27.4999 6.875L8.25 6.87502C7.68045 6.87502 7.15261 6.9757 6.66648 7.17706C6.18034 7.37843 5.73591 7.68047 5.33318 8.0832C4.93046 8.48593 4.62841 8.93036 4.42705 9.41649C4.22568 9.90263 4.125 10.4305 4.125 11L4.125 33C4.125 33.5696 4.22568 34.0974 4.42705 34.5835C4.62841 35.0697 4.93045 35.5141 5.33317 35.9168C5.73588 36.3195 6.18028 36.6216 6.66639 36.8229C7.15256 37.0243 7.68042 37.125 8.24999 37.125L10.9999 37.125L35.75 37.125C36.3195 37.125 36.8474 37.0243 37.3335 36.823C37.8197 36.6216 38.2641 36.3196 38.6668 35.9168C39.0695 35.5141 39.3716 35.0697 39.573 34.5835C39.7743 34.0974 39.875 33.5696 39.875 33L39.875 16.4999C39.875 15.7299 40.48 15.1249 41.25 15.1249C42.02 15.1249 42.625 15.7299 42.625 16.4999ZM10.0277 12.7777C10.5722 12.2333 11.4278 12.2333 11.9723 12.7777L20.2222 21.0277C20.4907 21.2962 20.6249 21.6203 20.6249 22C20.6249 22.3797 20.4907 22.7037 20.2222 22.9722L11.9722 31.2223C11.4277 31.7668 10.5721 31.7668 10.0277 31.2223C9.48318 30.6779 9.48317 29.8223 10.0276 29.2778L17.3054 22L10.0277 14.7223C9.48325 14.1778 9.48326 13.3222 10.0277 12.7777ZM20.625 28.875C20.625 28.105 21.23 27.5 22 27.5L33 27.5C33.77 27.5 34.375 28.105 34.375 28.875C34.375 29.645 33.77 30.25 33 30.25L22 30.25C21.23 30.25 20.625 29.645 20.625 28.875Z" fill="url(#paint_linear_0)" fill-rule="evenodd" />
11
+ </svg>
@@ -0,0 +1,8 @@
1
+ # aishell-brand bundle patch: inserts the brand reskin plugin.
2
+ # Install standalone: `dsh plugin --profile <name> add link:<repo>/packages/aishell-brand`
3
+ # The single row mounts BOTH halves: the host side (no-op Node plugin) and the
4
+ # browser side (injects AI Shell SVG into sidebar.brand.mark/name +
5
+ # conversation.hero.brand.mark, replacing the default DeepSeek fish mark).
6
+ - insert:
7
+ - id: aishell-brand
8
+ name: '@huaweidevtools/aishell-dsh-brand'
package/lib/client.js ADDED
@@ -0,0 +1,341 @@
1
+ window.__ModuleLoader__.load({ id: "@huaweidevtools/aishell-dsh-brand", factory: (require) => {
2
+ "use strict";
3
+ var module = { exports: {} }; var exports = module.exports;
4
+ //#region rolldown:runtime
5
+ var __create = Object.create;
6
+ var __defProp = Object.defineProperty;
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __getOwnPropNames = Object.getOwnPropertyNames;
9
+ var __getProtoOf = Object.getPrototypeOf;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
13
+ key = keys[i];
14
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
+ get: ((k) => from[k]).bind(null, key),
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
22
+ value: mod,
23
+ enumerable: true
24
+ }) : target, mod));
25
+
26
+ //#endregion
27
+ const react_jsx_runtime = __toESM(require("react/jsx-runtime"));
28
+
29
+ //#region \0dsh-css:/home/eushing/opensource/aishell-dsh-plugins/packages/aishell-brand/src/client/brand.module.css.mjs
30
+ const css = ".NP1U9q_mark{background:url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDQgNDQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSI0NC4wMDAwMDAiIGhlaWdodD0iNDQuMDAwMDAwIiBmaWxsPSJub25lIj4KCTxkZWZzPgoJCTxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnRfbGluZWFyXzAiIHgxPSIzOC41IiB4Mj0iMi4xOTk5OTY5NSIgeTE9IjEuOTA3MzQ4NjNlLTA2IiB5Mj0iMzkuNTk5OTkwOCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgoJCQk8c3RvcCBzdG9wLWNvbG9yPSJyZ2IoNTMsMTM3LDI1NSkiIG9mZnNldD0iMCIgc3RvcC1vcGFjaXR5PSIxIiAvPgoJCQk8c3RvcCBzdG9wLWNvbG9yPSJyZ2IoMTY5LDM4LDI1NSkiIG9mZnNldD0iMSIgc3RvcC1vcGFjaXR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uNzcgMzAuMjUgMzMgMzAuMjVMMjIgMzAuMjVDMjEuMjMgMzAuMjUgMjAuNjI1IDI5LjY0NSAyMC42MjUgMjguODc1WiIgZmlsbD0idXJsKCNwYWludF9saW5lYXJfMCkiIGZpbGwtcnVsZT0iZXZlbm9kZCIgLz4KPC9zdmc+Cg==) 50%/contain no-repeat;display:inline-block}.NP1U9q_name{vertical-align:middle;align-items:center;gap:6px;min-width:0;height:24px;display:inline-flex}.NP1U9q_name:before{content:\"AI Shell\";letter-spacing:.04em;color:var(--dsw-alias-label-primary,#1a1a1a);white-space:nowrap;font-size:18px;font-weight:600;line-height:24px}.NP1U9q_version{height:14px;color:var(--dsw-alias-label-primary-inverted,#fff);background:var(--dsw-alias-label-primary,#1a1a1a);white-space:nowrap;border-radius:3px;flex:none;align-items:center;margin-top:-8px;padding:0 4px;font-size:8px;font-weight:500;line-height:14px;display:inline-flex}";
31
+ const tagId = "@huaweidevtools/aishell-dsh-brand//home/eushing/opensource/aishell-dsh-plugins/packages/aishell-brand/src/client/brand.module.css";
32
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
33
+ const tag = document.createElement("style");
34
+ tag.dataset.plugin = "@huaweidevtools/aishell-dsh-brand";
35
+ tag.dataset.pluginCss = tagId;
36
+ tag.textContent = css;
37
+ document.head.appendChild(tag);
38
+ }
39
+ var brand_module_css_default = {
40
+ "mark": "NP1U9q_mark",
41
+ "name": "NP1U9q_name",
42
+ "version": "NP1U9q_version"
43
+ };
44
+
45
+ //#endregion
46
+ //#region src/client/Brand.tsx
47
+ const HERO_PATCH_CSS = [
48
+ ":root { --aishell-hero-title: \"Smart on Huawei Cloud, Smooth on Deployment\"; }",
49
+ ":lang(zh), :lang(zh-CN), :lang(zh-Hans) { --aishell-hero-title: \"智联华为云,部署零门槛\"; }",
50
+ "@keyframes aishell-title-float {",
51
+ " 0%, 100% { transform: none; }",
52
+ " 35% { transform: translateY(-2px); }",
53
+ " 70% { transform: translateY(1px); }",
54
+ "}",
55
+ "@keyframes aishell-gradient-flow {",
56
+ " 0%, 100% { background-position: 0% 50%; }",
57
+ " 50% { background-position: 100% 50%; }",
58
+ "}",
59
+ "@keyframes aishell-title-glow {",
60
+ " 0%, 100% { text-shadow: 0 0 0 transparent; }",
61
+ " 50% { text-shadow: 0 0 16px rgba(53, 137, 255, 0.5), 0 0 4px rgba(169, 38, 255, 0.3); }",
62
+ "}",
63
+ "@keyframes aishell-title-scale {",
64
+ " 0%, 100% { transform: scale(1); }",
65
+ " 50% { transform: scale(1.03); }",
66
+ "}",
67
+ "@keyframes aishell-logo-bob {",
68
+ " 0%, 100% { transform: none; }",
69
+ " 35% { transform: rotate(-4deg) translate(-0.4px, -0.9px); }",
70
+ " 70% { transform: rotate(1.6deg) translate(0.3px, 0.2px); }",
71
+ "}",
72
+ "[class*=\"headline\"] [class*=\"titleGroup\"] > span:first-child {",
73
+ " font-size: 0;",
74
+ "}",
75
+ "[class*=\"headline\"] [class*=\"titleGroup\"] > span:first-child::after {",
76
+ " content: var(--aishell-hero-title);",
77
+ " display: inline-block;",
78
+ " vertical-align: middle;",
79
+ " white-space: nowrap;",
80
+ " font-size: 26px;",
81
+ " font-weight: 500;",
82
+ " line-height: 32px;",
83
+ " color: var(--dsw-alias-label-primary, #fff);",
84
+ " transform-origin: center;",
85
+ " transition: color 0.4s ease, background 0.6s ease;",
86
+ "}",
87
+ "@media (prefers-reduced-motion: no-preference) {",
88
+ " [class*=\"headline\"] [class*=\"titleGroup\"] > span:first-child::after {",
89
+ " animation: aishell-title-float 2s ease-in-out infinite;",
90
+ " }",
91
+ "}",
92
+ "@media (hover: hover) and (prefers-reduced-motion: no-preference) {",
93
+ " [class*=\"headline\"] [class*=\"fishHitbox\"]:hover ~ [class*=\"titleGroup\"] > span:first-child::after,",
94
+ " [class*=\"headline\"] [class*=\"titleGroup\"] > span:first-child:hover::after {",
95
+ " background: linear-gradient(90deg, rgb(53, 137, 255), rgb(169, 38, 255), rgb(53, 137, 255));",
96
+ " background-size: 200% 100%;",
97
+ " -webkit-background-clip: text;",
98
+ " background-clip: text;",
99
+ " -webkit-text-fill-color: transparent;",
100
+ " animation: aishell-title-float 1.4s ease-in-out infinite, aishell-gradient-flow 2s ease-in-out infinite, aishell-title-glow 1.4s ease-in-out infinite, aishell-title-scale 1.4s ease-in-out infinite;",
101
+ " filter: brightness(1.1);",
102
+ " }",
103
+ " [class*=\"headline\"] [class*=\"fishHitbox\"]:hover [class*=\"fish\"],",
104
+ " [class*=\"headline\"] [class*=\"fish\"].aishell-logo-hover {",
105
+ " animation: aishell-logo-bob 1.4s ease-in-out infinite;",
106
+ " }",
107
+ "}",
108
+ "[class*=\"headline\"] [class*=\"titleGroup\"] > span:last-child {",
109
+ " margin-top: -4px;",
110
+ "}"
111
+ ].join("\n");
112
+ /** Inject the hero headline patch CSS once at module load. */
113
+ function injectHeroPatchCss() {
114
+ if (typeof document === "undefined" || document.querySelector("style[data-aishell-hero-patch]")) return;
115
+ const tag = document.createElement("style");
116
+ tag.dataset.aishellHeroPatch = "";
117
+ tag.textContent = HERO_PATCH_CSS;
118
+ document.head.appendChild(tag);
119
+ }
120
+ injectHeroPatchCss();
121
+ /**
122
+ * JS hover bridge: CSS ~ only matches forward siblings, so hovering the
123
+ * title text cannot trigger the logo's animation (the logo sits before the
124
+ * title in DOM order). This adds a mouseenter/mouseleave listener on the
125
+ * title span that toggles a class on the logo to trigger its bob animation.
126
+ */
127
+ function bridgeHeroHover() {
128
+ if (typeof document === "undefined") return;
129
+ const bridge = (root) => {
130
+ const groups = root.querySelectorAll("[class*=\"titleGroup\"]");
131
+ for (const group of groups) {
132
+ const titleSpan = group.children[0];
133
+ if (!titleSpan || titleSpan.dataset.aishellHoverBridged === "true") continue;
134
+ titleSpan.dataset.aishellHoverBridged = "true";
135
+ titleSpan.addEventListener("mouseenter", () => {
136
+ const headline = titleSpan.closest("[class*=\"headline\"]");
137
+ const fish = headline?.querySelector("[class*=\"fish\"]");
138
+ fish?.classList.add("aishell-logo-hover");
139
+ });
140
+ titleSpan.addEventListener("mouseleave", () => {
141
+ const headline = titleSpan.closest("[class*=\"headline\"]");
142
+ const fish = headline?.querySelector("[class*=\"fish\"]");
143
+ fish?.classList.remove("aishell-logo-hover");
144
+ });
145
+ }
146
+ };
147
+ bridge(document);
148
+ const observer = new MutationObserver((mutations) => {
149
+ for (const m of mutations) for (const node of m.addedNodes) if (node.nodeType === 1) bridge(node);
150
+ });
151
+ observer.observe(document.body, {
152
+ childList: true,
153
+ subtree: true
154
+ });
155
+ }
156
+ bridgeHeroHover();
157
+ /**
158
+ * Render the AI Shell mark with the presentation requested by its host surface.
159
+ * Used in both the expanded sidebar brand row and the collapsed rail.
160
+ */
161
+ function AishellBrandMark({ size }) {
162
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
163
+ className: brand_module_css_default.mark,
164
+ style: {
165
+ width: size,
166
+ height: size
167
+ },
168
+ role: "img",
169
+ "aria-label": "AI Shell"
170
+ });
171
+ }
172
+ /**
173
+ * Render the AI Shell name with a version badge in the top-right corner,
174
+ * matching DSH's native `.buildVersion` badge style.
175
+ */
176
+ function AishellBrandName() {
177
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
178
+ className: brand_module_css_default.name,
179
+ role: "img",
180
+ "aria-label": "AI Shell",
181
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
182
+ className: brand_module_css_default.version,
183
+ children: "0.0.1-beta.1"
184
+ })
185
+ });
186
+ }
187
+ /**
188
+ * Render the AI Shell mark for the blank-session hero. Inherits the host's
189
+ * className for surrounding mark geometry (e.g. centering).
190
+ */
191
+ function AishellHeroBrandMark({ size, className }) {
192
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
193
+ className: `${brand_module_css_default.mark} ${className ?? ""}`.trim(),
194
+ style: {
195
+ width: size,
196
+ height: size
197
+ },
198
+ role: "img",
199
+ "aria-label": "AI Shell"
200
+ });
201
+ }
202
+ /**
203
+ * Insert "Powered by deepseek-harness" below the hero headline, centered
204
+ * inside .stack. Uses a MutationObserver because the hero mounts/unmounts
205
+ * as the user navigates between sessions.
206
+ */
207
+ function injectPoweredBy() {
208
+ if (typeof document === "undefined") return;
209
+ const insert = (root) => {
210
+ const stacks = root.querySelectorAll("[class*=\"stack\"]");
211
+ for (const stack of stacks) {
212
+ if (!stack.querySelector("[class*=\"headline\"]")) continue;
213
+ if (stack.querySelector("[data-aishell-powered-by]")) continue;
214
+ const label = document.createElement("div");
215
+ label.dataset.aishellPoweredBy = "";
216
+ label.style.cssText = "text-align:center;font-size:11px;font-weight:400;line-height:16px;color:var(--dsw-alias-label-quaternary, #999);user-select:none;white-space:nowrap;";
217
+ label.textContent = "Powered by deepseek-harness";
218
+ const headline = stack.querySelector("[class*=\"headline\"]");
219
+ if (headline && headline.nextSibling) stack.insertBefore(label, headline.nextSibling);
220
+ else stack.appendChild(label);
221
+ }
222
+ };
223
+ insert(document);
224
+ const observer = new MutationObserver((mutations) => {
225
+ for (const m of mutations) for (const node of m.addedNodes) if (node.nodeType === 1) insert(node);
226
+ });
227
+ observer.observe(document.body, {
228
+ childList: true,
229
+ subtree: true
230
+ });
231
+ }
232
+ injectPoweredBy();
233
+
234
+ //#endregion
235
+ //#region src/client/title-shadow.ts
236
+ /**
237
+ * Runtime window-title shadowing for the branded distribution.
238
+ *
239
+ * The official product title is baked into the dsh tree at build time
240
+ * (`DSH_CLIENT_TITLE` → "DeepSeek Harness" in both the served
241
+ * dsh-web-frontend dist index.html and the ui-layout DocumentTitle
242
+ * component), and that tree is covered by the desktop-runtime digest —
243
+ * the asar shell-layer swap cannot reach it. The plugin side therefore
244
+ * shadows the title at runtime: this module intercepts every
245
+ * `document.title` write in the renderer and rewrites the product name
246
+ * to "AI Shell" in flight. The Electron main process never calls
247
+ * setTitle on the main window, so the window title follows
248
+ * document.title and this single seam covers both.
249
+ *
250
+ * Shadowing is a default, not a force (plan §2.2): install() and the
251
+ * disposer it returns are symmetric, so disabling the plugin restores
252
+ * the official title behavior exactly.
253
+ *
254
+ * @module @huaweidevtools/aishell-dsh-brand/client
255
+ */
256
+ /** The official product title, baked into the digest-protected dsh tree. */
257
+ const OFFICIAL_TITLE = "DeepSeek Harness";
258
+ /** The branded product title that shadows it. */
259
+ const BRANDED_TITLE = "AI Shell";
260
+ /**
261
+ * Rewrite the product name inside a title write.
262
+ * Anything else in the value (the session-title prefix ui-layout adds)
263
+ * passes through untouched, and a value without the product name is
264
+ * returned as-is — the shadow never invents content.
265
+ */
266
+ function rebrandTitle(value) {
267
+ return value.split(OFFICIAL_TITLE).join(BRANDED_TITLE);
268
+ }
269
+ /**
270
+ * Find the `title` property descriptor on the prototype chain.
271
+ *
272
+ * `document.title` is a WebIDL accessor on Document.prototype — the
273
+ * instance itself has no own property to describe, so the descriptor
274
+ * must be located by walking up the chain.
275
+ */
276
+ function findTitleDescriptor(target) {
277
+ let proto = target;
278
+ while (proto !== null) {
279
+ const desc = Object.getOwnPropertyDescriptor(proto, "title");
280
+ if (desc !== void 0) return desc;
281
+ proto = Object.getPrototypeOf(proto);
282
+ }
283
+ return void 0;
284
+ }
285
+ /**
286
+ * Install the title shadow on the document.
287
+ *
288
+ * Defines an own `title` property on the instance (shadowing the
289
+ * prototype accessor) whose setter rewrites each write, then rewrites
290
+ * the current title once so the page's initial <title> from the served
291
+ * dist is covered too. Returns the disposer: it removes the own
292
+ * property (the prototype accessor takes over again) and rewrites the
293
+ * live value back to its official form, so an unload leaves the shell
294
+ * exactly as it was found.
295
+ */
296
+ function installTitleShadow(target) {
297
+ const original = findTitleDescriptor(target);
298
+ if (original === void 0 || original.configurable !== true || typeof original.set !== "function") return () => {};
299
+ const nativeSet = original.set;
300
+ const shadow = {
301
+ configurable: true,
302
+ enumerable: original.enumerable ?? false,
303
+ ...original.get !== void 0 ? { get: original.get } : {},
304
+ set(value) {
305
+ nativeSet.call(this, typeof value === "string" ? rebrandTitle(value) : value);
306
+ }
307
+ };
308
+ Object.defineProperty(target, "title", shadow);
309
+ const initial = target.title;
310
+ target.title = initial;
311
+ return () => {
312
+ delete target.title;
313
+ target.title = target.title.split(BRANDED_TITLE).join(OFFICIAL_TITLE);
314
+ };
315
+ }
316
+
317
+ //#endregion
318
+ //#region src/client/index.ts
319
+ /** Required service: the UI slot registry. */
320
+ const inject = ["slots"];
321
+ function apply(ctx) {
322
+ ctx.slots.inject("sidebar.brand.mark", () => ctx.slots.register({
323
+ name: "sidebar.brand.mark",
324
+ priority: -1
325
+ }, AishellBrandMark));
326
+ ctx.slots.inject("sidebar.brand.name", () => ctx.slots.register({
327
+ name: "sidebar.brand.name",
328
+ priority: -1
329
+ }, AishellBrandName));
330
+ ctx.slots.inject("conversation.hero.brand.mark", () => ctx.slots.register({
331
+ name: "conversation.hero.brand.mark",
332
+ priority: -1
333
+ }, AishellHeroBrandMark));
334
+ if (typeof document !== "undefined") ctx.effect(() => installTitleShadow(document), "aishell-brand: window title shadow");
335
+ }
336
+
337
+ //#endregion
338
+ exports.apply = apply
339
+ exports.inject = inject
340
+ return module.exports; } });
341
+ //# sourceMappingURL=client.js.map
package/lib/index.js ADDED
@@ -0,0 +1,8 @@
1
+ //#region src/index.ts
2
+ const name = "aishell-brand";
3
+ const inject = [];
4
+ function apply(_ctx) {}
5
+
6
+ //#endregion
7
+ export { apply, inject, name };
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,25 @@
1
+ /**
2
+ * AI Shell brand occupants for the DSH browser brand slots.
3
+ *
4
+ * Three components replace the default DeepSeek fish mark with the AI Shell
5
+ * icon/logo, rendered through CSS modules so the SVG assets are inlined as
6
+ * data URIs (no runtime fetch, no flash of missing image).
7
+ */
8
+ import type { SidebarBrandMarkOwnerProps } from '@deepseek-ai/dsh-client-ui-sidebar/client';
9
+ import type { HeroBrandMarkOwnerProps } from '@deepseek-ai/dsh-client-ui-conversation/client';
10
+ /**
11
+ * Render the AI Shell mark with the presentation requested by its host surface.
12
+ * Used in both the expanded sidebar brand row and the collapsed rail.
13
+ */
14
+ export declare function AishellBrandMark({ size }: SidebarBrandMarkOwnerProps): import("react").JSX.Element;
15
+ /**
16
+ * Render the AI Shell name with a version badge in the top-right corner,
17
+ * matching DSH's native `.buildVersion` badge style.
18
+ */
19
+ export declare function AishellBrandName(): import("react").JSX.Element;
20
+ /**
21
+ * Render the AI Shell mark for the blank-session hero. Inherits the host's
22
+ * className for surrounding mark geometry (e.g. centering).
23
+ */
24
+ export declare function AishellHeroBrandMark({ size, className }: HeroBrandMarkOwnerProps): import("react").JSX.Element;
25
+ //# sourceMappingURL=Brand.d.ts.map
@@ -0,0 +1,14 @@
1
+ /**
2
+ * aishell brand browser-half — occupies the generic browser-brand slots.
3
+ *
4
+ * Fills the sidebar brand slots (mark + name) and the conversation hero brand
5
+ * mark, plus a "Powered by deepseek-harness" label in the sidebar footer.
6
+ * Replaces the default DeepSeek fish mark with the AI Shell icon/logo.
7
+ *
8
+ * @module @huaweidevtools/aishell-dsh-brand/client
9
+ */
10
+ import type { Context as ClientContext } from '@deepseek-ai/cordis';
11
+ /** Required service: the UI slot registry. */
12
+ export declare const inject: string[];
13
+ export declare function apply(ctx: ClientContext): void;
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Runtime window-title shadowing for the branded distribution.
3
+ *
4
+ * The official product title is baked into the dsh tree at build time
5
+ * (`DSH_CLIENT_TITLE` → "DeepSeek Harness" in both the served
6
+ * dsh-web-frontend dist index.html and the ui-layout DocumentTitle
7
+ * component), and that tree is covered by the desktop-runtime digest —
8
+ * the asar shell-layer swap cannot reach it. The plugin side therefore
9
+ * shadows the title at runtime: this module intercepts every
10
+ * `document.title` write in the renderer and rewrites the product name
11
+ * to "AI Shell" in flight. The Electron main process never calls
12
+ * setTitle on the main window, so the window title follows
13
+ * document.title and this single seam covers both.
14
+ *
15
+ * Shadowing is a default, not a force (plan §2.2): install() and the
16
+ * disposer it returns are symmetric, so disabling the plugin restores
17
+ * the official title behavior exactly.
18
+ *
19
+ * @module @huaweidevtools/aishell-dsh-brand/client
20
+ */
21
+ /**
22
+ * Rewrite the product name inside a title write.
23
+ * Anything else in the value (the session-title prefix ui-layout adds)
24
+ * passes through untouched, and a value without the product name is
25
+ * returned as-is — the shadow never invents content.
26
+ */
27
+ export declare function rebrandTitle(value: string): string;
28
+ /** The disposer restores the official title behavior; a no-op install returns this. */
29
+ export type TitleShadowDisposer = () => void;
30
+ /**
31
+ * Install the title shadow on the document.
32
+ *
33
+ * Defines an own `title` property on the instance (shadowing the
34
+ * prototype accessor) whose setter rewrites each write, then rewrites
35
+ * the current title once so the page's initial <title> from the served
36
+ * dist is covered too. Returns the disposer: it removes the own
37
+ * property (the prototype accessor takes over again) and rewrites the
38
+ * live value back to its official form, so an unload leaves the shell
39
+ * exactly as it was found.
40
+ */
41
+ export declare function installTitleShadow(target: Document): TitleShadowDisposer;
42
+ //# sourceMappingURL=title-shadow.d.ts.map
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Node-half entry for the aishell brand plugin.
3
+ *
4
+ * This package is browser-only (brand slots live in the web client). The Node
5
+ * half is a no-op cordis plugin — it exists so the cordis loader can mount the
6
+ * package as a loader entry, which makes its `dsh.client` declaration visible
7
+ * to the client-modules scanner and its browser bundle (`lib/client.js`)
8
+ * discoverable at `/plugins/<id>/client.js`.
9
+ *
10
+ * @module @huaweidevtools/aishell-dsh-brand
11
+ */
12
+ import type { Context } from '@deepseek-ai/cordis';
13
+ export declare const name = "aishell-brand";
14
+ export declare const inject: readonly string[];
15
+ export declare function apply(_ctx: Context): void;
16
+ //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,66 @@
1
1
  {
2
2
  "name": "@huaweidevtools/aishell-dsh-brand",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "description": "AI Shell brand reskin for DSH web — replaces sidebar and hero brand marks with AI Shell SVG",
4
+ "version": "0.0.1-beta.1",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/yusheng-g/aishell-dsh-plugins.git",
11
+ "directory": "packages/aishell-brand"
12
+ },
13
+ "type": "module",
14
+ "main": "lib/index.js",
15
+ "types": "lib/types/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./lib/types/index.d.ts",
19
+ "default": "./lib/index.js"
20
+ },
21
+ "./client": {
22
+ "types": "./lib/types/client/index.d.ts",
23
+ "default": "./lib/client.js"
24
+ },
25
+ "./src/*": "./src/*",
26
+ "./package.json": "./package.json"
27
+ },
28
+ "dsh": {
29
+ "client": {
30
+ "inject": [
31
+ "@deepseek-ai/dsh-client-ui-renderer",
32
+ "@deepseek-ai/dsh-client-ui-sidebar",
33
+ "@deepseek-ai/dsh-client-ui-conversation"
34
+ ],
35
+ "platform": "web"
36
+ },
37
+ "bundle": {
38
+ "patch": "./cordis.patch.yml"
39
+ }
40
+ },
41
+ "license": "Apache-2.0",
42
+ "peerDependencies": {
43
+ "@deepseek-ai/cordis": "^4.0.4"
44
+ },
45
+ "devDependencies": {
46
+ "@deepseek-ai/cordis": "^4.0.4",
47
+ "@deepseek-ai/dsh-client-ui-conversation": "0.2.0-rc.1",
48
+ "@deepseek-ai/dsh-client-ui-renderer": "0.2.0-rc.1",
49
+ "@deepseek-ai/dsh-client-ui-sidebar": "0.2.0-rc.1",
50
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.1",
51
+ "@types/react": "~18.3.1",
52
+ "react": "^18.2.0",
53
+ "tsdown": "^0.10.0",
54
+ "typescript": "^5.7.0"
55
+ },
56
+ "files": [
57
+ "lib/index.js",
58
+ "lib/client.js",
59
+ "lib/types/**/*.d.ts",
60
+ "assets/*.svg",
61
+ "cordis.patch.yml"
62
+ ],
63
+ "scripts": {
64
+ "build:bundle": "tsdown"
65
+ }
6
66
  }