dsh-claude-style 0.2.4 → 0.2.6
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/CHANGELOG.md +105 -74
- package/LICENSE +10 -5
- package/README.en.md +5 -4
- package/README.md +7 -6
- package/docs/REFACTOR.md +294 -0
- package/docs/STYLE.md +42 -14
- package/fonts/AUTHORS.txt +10 -0
- package/fonts/JetBrainsMonoItalicVariable.ttf +0 -0
- package/fonts/JetBrainsMonoVariable.ttf +0 -0
- package/fonts/OFL.txt +93 -0
- package/lib/client.js +1896 -519
- package/lib/index.js +409 -2
- package/lib/model-descriptions.json +598 -0
- package/package.json +6 -2
package/docs/STYLE.md
CHANGED
|
@@ -51,26 +51,54 @@ The shipped bundle `lib/client.js` is **generated** — never edit it directly.
|
|
|
51
51
|
Source lives in `src/` and `node scripts/build.mjs` (or `npm run build`)
|
|
52
52
|
assembles the bundle:
|
|
53
53
|
|
|
54
|
-
| Source |
|
|
55
|
-
|
|
56
|
-
| `src/constants.js` |
|
|
57
|
-
| `src/assets/*.svg` |
|
|
58
|
-
| `src/styles/tokens.css` |
|
|
59
|
-
| `src/styles/typography.css` |
|
|
60
|
-
| `src/styles/chrome.css` |
|
|
61
|
-
| `src/styles/composer.css` |
|
|
62
|
-
| `src/styles/
|
|
63
|
-
| `src/styles/
|
|
64
|
-
| `src/
|
|
65
|
-
| `src/
|
|
66
|
-
| `src/
|
|
67
|
-
| `src/
|
|
54
|
+
| Source | Content |
|
|
55
|
+
|---|---|
|
|
56
|
+
| `src/constants.js` | constants, spinner verbs, shared token values (evaluated at build time to fill `%%TOKEN%%` placeholders) |
|
|
57
|
+
| `src/assets/*.svg` | brand marks, inlined as CSS `url()` data URIs at build time (the loader exposes no asset URLs) |
|
|
58
|
+
| `src/styles/tokens.css` | design tokens (dark base + ivory light) |
|
|
59
|
+
| `src/styles/typography.css` | serif display / sans UI / mono code, editorial markdown |
|
|
60
|
+
| `src/styles/chrome.css` | canvas, hairlines, clay accent, chrome details |
|
|
61
|
+
| `src/styles/composer/hero.css` | hero brand mark and headline |
|
|
62
|
+
| `src/styles/composer/card.css` | composer input card and footer tray (gated by composer preference) |
|
|
63
|
+
| `src/styles/composer/inline.css` | in-conversation single-line composer (gated by composer preference) |
|
|
64
|
+
| `src/styles/sidebar.css` | sidebar brand, new-session row, workspace tree |
|
|
65
|
+
| `src/styles/components/permissions.css` | permission segments and popover |
|
|
66
|
+
| `src/styles/components/account-footer.css` | account row and floating popover |
|
|
67
|
+
| `src/styles/components/model-picker.css` | model picker popovers |
|
|
68
|
+
| `src/styles/components/footer-takeover.css` | host footer takeover rules |
|
|
69
|
+
| `src/styles/components/third-party.css` | agy-link repair rules |
|
|
70
|
+
| `src/styles/components/settings.css` | settings page section |
|
|
71
|
+
| `src/context/host.js` | host accessors and helpers |
|
|
72
|
+
| `src/context/prefs.js` | preference store |
|
|
73
|
+
| `src/context/model-copy.js` | model copy document store |
|
|
74
|
+
| `src/context/i18n.js` | localized copy lookups |
|
|
75
|
+
| `src/overrides/popover-utils.js` | shared anchor positioning and hover intent |
|
|
76
|
+
| `src/overrides/copy.js` | composer/copy rewrites installer |
|
|
77
|
+
| `src/overrides/permissions.js` | permission segments/popover installer |
|
|
78
|
+
| `src/overrides/model-picker.js` | model picker installer |
|
|
79
|
+
| `src/overrides/account-footer.js` | account footer/popover installer |
|
|
80
|
+
| `src/overrides/scheduler.js` | scheduler, observers, subscriptions, teardown |
|
|
81
|
+
| `src/settings.js` | settings section (brand switch) |
|
|
82
|
+
| `src/entry.js` | `apply()` orchestrator + exports |
|
|
83
|
+
| `src/model-descriptions.json` | model copy (picker labels + per-model descriptions); validated at build time and **copied** to `lib/`, not inlined |
|
|
68
84
|
|
|
69
85
|
Fragments share one factory scope at runtime: keep the 4-space base
|
|
70
86
|
indentation and do not use `import`/`export` inside fragments. The build
|
|
71
87
|
script rejects unsubstituted `%%TOKENS%%` and refuses to emit a bundle that
|
|
72
88
|
fails to parse.
|
|
73
89
|
|
|
90
|
+
`src/model-descriptions.json` is the one thing that does **not** go into the
|
|
91
|
+
bundle. Model copy is data: the build validates it and copies it to
|
|
92
|
+
`lib/model-descriptions.json`, and the host half (`lib/index.js`) serves it at
|
|
93
|
+
`/dsh-claude-style/model-descriptions.json` for the browser half to fetch on
|
|
94
|
+
first use. So the table grows without a rebuild, and no model text ships inside
|
|
95
|
+
`lib/client.js`. Every entry is a `{ locale: text }` pair — the picker renders
|
|
96
|
+
one line in the language the shell's own `locale` service reports, falling back
|
|
97
|
+
to the document's `fallback` locale. Lookup descends exact → family → tier →
|
|
98
|
+
the catalog's own text; family rules are ordered and must stay anchored (the
|
|
99
|
+
`flash` rule is scoped to `deepseek`, or another vendor's flash tier inherits
|
|
100
|
+
DeepSeek's copy).
|
|
101
|
+
|
|
74
102
|
### Host selector discipline · 宿主选择器纪律
|
|
75
103
|
|
|
76
104
|
The host uses hashed CSS-module classes (`p_FcLG_row`, `_0cyzDW_viewArea`, …).
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# This is the official list of project authors for copyright purposes.
|
|
2
|
+
# This file is distinct from the CONTRIBUTORS.txt file.
|
|
3
|
+
# See the latter for an explanation.
|
|
4
|
+
#
|
|
5
|
+
# Names should be added to this file as:
|
|
6
|
+
# Name or Organization <email address>
|
|
7
|
+
|
|
8
|
+
JetBrains <>
|
|
9
|
+
Philipp Nurullin <philipp.nurullin@jetbrains.com>
|
|
10
|
+
Konstantin Bulenkov <kb@jetbrains.com>
|
|
Binary file
|
|
Binary file
|
package/fonts/OFL.txt
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|