pi-web-ui 0.69.0 → 0.70.0

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/themes/white.css CHANGED
@@ -1,160 +1,167 @@
1
- /* theme-name: 白色 */
2
- /* theme-name-en: White */
3
- :root {
4
- color-scheme: light;
5
- --bg: #ffffff;
6
- --bg-elev: #ffffff;
7
- --bg-elev2: #f6f8fa;
8
- --border: #d0d7de;
9
- --border-soft: #d8dee4;
10
- --text: #1f2328;
11
- --text-dim: #59636e;
12
- --text-faint: #818b98;
13
- --accent: #0969da;
14
- --accent-soft: rgba(9, 105, 218, 0.1);
15
- --green: #059669;
16
- --green-soft: rgba(5, 150, 105, 0.12);
17
- --red: #dc2626;
18
- --red-soft: rgba(220, 38, 38, 0.1);
19
- --amber: #d97706;
20
- --term-bg: #ffffff;
21
- --term-fg: #1f2328;
22
- --term-cursor: #0969da;
23
- --term-cursor-accent: #ffffff;
24
- --term-selection: rgba(9, 105, 218, 0.32);
25
- --term-black: #e8eaf0;
26
- --term-red: #dc2626;
27
- --term-green: #059669;
28
- --term-yellow: #d97706;
29
- --term-blue: #2563eb;
30
- --term-magenta: #9333ea;
31
- --term-cyan: #0e7490;
32
- --term-white: #1f2328;
33
- --term-bright-black: #8a91a3;
34
- --term-bright-red: #dc2626;
35
- --term-bright-green: #059669;
36
- --term-bright-yellow: #d97706;
37
- --term-bright-blue: #2563eb;
38
- --term-bright-magenta: #9333ea;
39
- --term-bright-cyan: #0e7490;
40
- --term-bright-white: #000000;
41
- --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
42
- --tooltip-bg: #ffffff;
43
- --code-bg: #f6f8fa;
44
- --code-text: #1f2937;
45
- --err-text: #dc2626;
46
- --red-text: #dc2626;
47
- --amber-text: #b45309;
48
- --info-blue: #2563eb;
49
- --link: #0969da;
50
- --link-hover: #0550ae;
51
- --link-soft: #0969da;
52
- --md-strong: #111827;
53
- --skill-blue: #2563eb;
54
- --plugin-purple: #b58cff;
55
- --auth-green: #059669;
56
- --scroll-thumb: #c7ccd8;
57
- --scroll-thumb-hover: #aab2c0;
58
- --notice-err-bg: #eadadf;
59
- --notice-warn-bg: #eae2dc;
60
- --notice-info-bg: #d8e0f3;
61
- --notice-err-border: #dc2626;
62
- --notice-warn-border: #b45309;
63
- --notice-info-border: #2563eb;
64
- --send-blue: #0969da;
65
- --send-blue-hover: #0550ae;
66
- --brand-grad-a: #8b5cf6;
67
- --brand-grad-b: #6366f1;
68
- --on-amber: #1a1a1a;
69
- --search-active-fg: #1a1d26;
70
- --switch-knob: #ffffff;
71
- --bg-elev3: rgba(0, 0, 0, 0.03);
72
- --glow-015: rgba(0, 0, 0, 0.02);
73
- --glow-025: rgba(0, 0, 0, 0.02);
74
- --glow-03: rgba(0, 0, 0, 0.02);
75
- --glow-04: rgba(0, 0, 0, 0.03);
76
- --glow-05: rgba(0, 0, 0, 0.03);
77
- --glow-12: rgba(0, 0, 0, 0.08);
78
- --glow-18: rgba(0, 0, 0, 0.12);
79
- --glow-22: rgba(0, 0, 0, 0.15);
80
- --glow-38: rgba(0, 0, 0, 0.25);
81
- }
82
-
83
- /* ---- syntax highlighting (overrides static github-dark import) ---- */
84
- .hljs {
85
- color: #1f2328;
86
- background: #f6f8fa;
87
- }
88
- .hljs-doctag,
89
- .hljs-keyword,
90
- .hljs-meta .hljs-keyword,
91
- .hljs-template-tag,
92
- .hljs-template-variable,
93
- .hljs-type,
94
- .hljs-variable.language_ {
95
- color: #cf222e;
96
- }
97
- .hljs-title,
98
- .hljs-title.class_,
99
- .hljs-title.class_.inherited__,
100
- .hljs-title.function_ {
101
- color: #8250df;
102
- }
103
- .hljs-attr,
104
- .hljs-attribute,
105
- .hljs-literal,
106
- .hljs-meta,
107
- .hljs-number,
108
- .hljs-operator,
109
- .hljs-variable,
110
- .hljs-selector-attr,
111
- .hljs-selector-class,
112
- .hljs-selector-id {
113
- color: #0550ae;
114
- }
115
- .hljs-regexp,
116
- .hljs-string,
117
- .hljs-meta .hljs-string {
118
- color: #0a3069;
119
- }
120
- .hljs-built_in,
121
- .hljs-symbol {
122
- color: #953800;
123
- }
124
- .hljs-comment,
125
- .hljs-code,
126
- .hljs-formula {
127
- color: #6e7781;
128
- }
129
- .hljs-name,
130
- .hljs-quote,
131
- .hljs-selector-tag,
132
- .hljs-selector-pseudo {
133
- color: #116329;
134
- }
135
- .hljs-subst {
136
- color: #24292f;
137
- }
138
- .hljs-section {
139
- color: #0550ae;
140
- font-weight: 700;
141
- }
142
- .hljs-bullet {
143
- color: #0550ae;
144
- }
145
- .hljs-emphasis {
146
- color: #24292f;
147
- font-style: italic;
148
- }
149
- .hljs-strong {
150
- color: #24292f;
151
- font-weight: 700;
152
- }
153
- .hljs-addition {
154
- color: #116329;
155
- background: #dafbe1;
156
- }
157
- .hljs-deletion {
158
- color: #82071e;
159
- background: #ffebe9;
160
- }
1
+ /* theme-name: 白色 */
2
+ /* theme-name-en: White */
3
+ :root {
4
+ color-scheme: light;
5
+ --bg: #ffffff;
6
+ --bg-elev: #ffffff;
7
+ --bg-elev2: #f6f8fa;
8
+ --border: #d0d7de;
9
+ --border-soft: #d8dee4;
10
+ --text: #1f2328;
11
+ --text-dim: #59636e;
12
+ --text-faint: #818b98;
13
+ --accent: #0969da;
14
+ --accent-soft: rgba(9, 105, 218, 0.1);
15
+ --green: #059669;
16
+ --green-soft: rgba(5, 150, 105, 0.12);
17
+ --red: #dc2626;
18
+ --red-soft: rgba(220, 38, 38, 0.1);
19
+ --amber: #d97706;
20
+ --term-bg: #ffffff;
21
+ --term-fg: #1f2328;
22
+ --term-cursor: #0969da;
23
+ --term-cursor-accent: #ffffff;
24
+ --term-selection: rgba(9, 105, 218, 0.32);
25
+ --term-black: #e8eaf0;
26
+ --term-red: #dc2626;
27
+ --term-green: #059669;
28
+ --term-yellow: #d97706;
29
+ --term-blue: #2563eb;
30
+ --term-magenta: #9333ea;
31
+ --term-cyan: #0e7490;
32
+ --term-white: #1f2328;
33
+ --term-bright-black: #8a91a3;
34
+ --term-bright-red: #dc2626;
35
+ --term-bright-green: #059669;
36
+ --term-bright-yellow: #d97706;
37
+ --term-bright-blue: #2563eb;
38
+ --term-bright-magenta: #9333ea;
39
+ --term-bright-cyan: #0e7490;
40
+ --term-bright-white: #000000;
41
+ --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
42
+ --mermaid-font-size: 12px;
43
+ --tooltip-bg: #ffffff;
44
+ --code-bg: #f6f8fa;
45
+ --code-text: #1f2937;
46
+ --err-text: #dc2626;
47
+ --red-text: #dc2626;
48
+ --amber-text: #b45309;
49
+ --info-blue: #2563eb;
50
+ --link: #0969da;
51
+ --link-hover: #0550ae;
52
+ --link-soft: #0969da;
53
+ --md-strong: #111827;
54
+ --skill-blue: #2563eb;
55
+ --plugin-purple: #b58cff;
56
+ --auth-green: #059669;
57
+ --scroll-thumb: #c7ccd8;
58
+ --scroll-thumb-hover: #aab2c0;
59
+ --notice-err-bg: #eadadf;
60
+ --notice-warn-bg: #eae2dc;
61
+ --notice-info-bg: #d8e0f3;
62
+ --notice-err-border: #dc2626;
63
+ --notice-warn-border: #b45309;
64
+ --notice-info-border: #2563eb;
65
+ --send-blue: #0969da;
66
+ --send-blue-hover: #0550ae;
67
+ --brand-grad-a: #8b5cf6;
68
+ --brand-grad-b: #6366f1;
69
+ --on-amber: #1a1a1a;
70
+ --search-active-fg: #1a1d26;
71
+ --switch-knob: #ffffff;
72
+ --bg-elev3: rgba(0, 0, 0, 0.03);
73
+ --glow-015: rgba(0, 0, 0, 0.02);
74
+ --glow-025: rgba(0, 0, 0, 0.02);
75
+ --glow-03: rgba(0, 0, 0, 0.02);
76
+ --glow-04: rgba(0, 0, 0, 0.03);
77
+ --glow-05: rgba(0, 0, 0, 0.03);
78
+ --glow-12: rgba(0, 0, 0, 0.08);
79
+ --glow-18: rgba(0, 0, 0, 0.12);
80
+ --glow-22: rgba(0, 0, 0, 0.15);
81
+ --glow-38: rgba(0, 0, 0, 0.25);
82
+ --control-fg: #59636e;
83
+ --control-bg: #f6f8fa;
84
+ --control-border: #d0d7de;
85
+ --bg-image: none;
86
+ --bg-image-dim: 0.78;
87
+ --bg-image-blur: 0px;
88
+ }
89
+
90
+ /* ---- syntax highlighting (overrides static github-dark import) ---- */
91
+ .hljs {
92
+ color: #1f2328;
93
+ background: #f6f8fa;
94
+ }
95
+ .hljs-doctag,
96
+ .hljs-keyword,
97
+ .hljs-meta .hljs-keyword,
98
+ .hljs-template-tag,
99
+ .hljs-template-variable,
100
+ .hljs-type,
101
+ .hljs-variable.language_ {
102
+ color: #cf222e;
103
+ }
104
+ .hljs-title,
105
+ .hljs-title.class_,
106
+ .hljs-title.class_.inherited__,
107
+ .hljs-title.function_ {
108
+ color: #8250df;
109
+ }
110
+ .hljs-attr,
111
+ .hljs-attribute,
112
+ .hljs-literal,
113
+ .hljs-meta,
114
+ .hljs-number,
115
+ .hljs-operator,
116
+ .hljs-variable,
117
+ .hljs-selector-attr,
118
+ .hljs-selector-class,
119
+ .hljs-selector-id {
120
+ color: #0550ae;
121
+ }
122
+ .hljs-regexp,
123
+ .hljs-string,
124
+ .hljs-meta .hljs-string {
125
+ color: #0a3069;
126
+ }
127
+ .hljs-built_in,
128
+ .hljs-symbol {
129
+ color: #953800;
130
+ }
131
+ .hljs-comment,
132
+ .hljs-code,
133
+ .hljs-formula {
134
+ color: #6e7781;
135
+ }
136
+ .hljs-name,
137
+ .hljs-quote,
138
+ .hljs-selector-tag,
139
+ .hljs-selector-pseudo {
140
+ color: #116329;
141
+ }
142
+ .hljs-subst {
143
+ color: #24292f;
144
+ }
145
+ .hljs-section {
146
+ color: #0550ae;
147
+ font-weight: 700;
148
+ }
149
+ .hljs-bullet {
150
+ color: #0550ae;
151
+ }
152
+ .hljs-emphasis {
153
+ color: #24292f;
154
+ font-style: italic;
155
+ }
156
+ .hljs-strong {
157
+ color: #24292f;
158
+ font-weight: 700;
159
+ }
160
+ .hljs-addition {
161
+ color: #116329;
162
+ background: #dafbe1;
163
+ }
164
+ .hljs-deletion {
165
+ color: #82071e;
166
+ background: #ffebe9;
167
+ }
@@ -1,4 +1,4 @@
1
- import{a as l,j as n}from"./markdown-Cpo0pNcR.js";import{u as P,b as O,T as M,a as W,F as Y,c as z,d as Z,e as H,f as ee,g as ne,h as te,i as se,r as ae}from"./index-DCOcsPFm.js";import{D as re,o as ie}from"./xterm-B96xOxS9.js";import"./react-CtudoG1_.js";function le(t){let c=null;return{clean:t.replace(/\r?\n?\[pi-term-exit:(-?\d+)\]\r?\n?/g,(a,x)=>(c=Number(x),`\r
1
+ import{a as l,j as n}from"./markdown-Cpo0pNcR.js";import{u as P,b as O,T as M,a as W,F as Y,c as z,d as Z,e as H,f as ee,g as ne,h as te,i as se,r as ae}from"./index-CaiIOwy7.js";import{D as re,o as ie}from"./xterm-B96xOxS9.js";import"./react-CtudoG1_.js";function le(t){let c=null;return{clean:t.replace(/\r?\n?\[pi-term-exit:(-?\d+)\]\r?\n?/g,(a,x)=>(c=Number(x),`\r
2
2
  `)).replace(/\r?\n?\x1b\[90m\[(?:进程已退出,退出码 |Process exited with code )-?\d+\]\x1b\[0m\r?\n?/g,`\r
3
3
  `),exitCode:c}}function ce({conversationId:t,terminalId:c,command:p,cwd:a,title:x,active:u,running:v,exitCode:j,send:h,register:C}){const T=l.useRef(null),y=l.useRef(null),{locale:o}=P(),N=l.useRef(o);N.current=o;const E=p?JSON.stringify(p):"";l.useEffect(()=>{const m=T.current;if(!m)return;const r=new re({theme:O(),fontFamily:'"SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace',fontSize:13,cursorBlink:!0,scrollback:8e3}),b=new ie;r.loadAddon(b),r.open(m),y.current={term:r,fit:b},u&&r.focus();const g=()=>{r.options.theme=O()};window.addEventListener(M,g),r.attachCustomKeyEventHandler(d=>{if(d.type!=="keydown")return!0;const S=d.key?.toLowerCase();if((d.ctrlKey||d.metaKey)&&S==="v")return!1;if(d.ctrlKey&&!d.shiftKey&&!d.altKey&&S==="c"&&r.hasSelection()){const D=r.textarea;return D&&(D.value=r.getSelection(),D.select()),!1}return!0});const _=C(t,c,{write:d=>r.write(le(d).clean),dispose:()=>r.dispose()}),$=()=>{try{b.fit(),h({type:"terminal_resize",terminalId:c,conversationId:t,cols:r.cols,rows:r.rows})}catch{}},B=requestAnimationFrame(()=>{try{b.fit()}catch{}h(p?{type:"run_command",terminalId:c,conversationId:t,command:p,cols:r.cols,rows:r.rows}:{type:"terminal_create",terminalId:c,title:x,locale:N.current,conversationId:t,cwd:a,cols:r.cols,rows:r.rows})}),R=r.onData(d=>{h({type:"terminal_input",terminalId:c,conversationId:t,data:d})});let k=null;return typeof ResizeObserver<"u"&&(k=new ResizeObserver(()=>{m.offsetWidth>0&&m.offsetHeight>0&&$()}),k.observe(m)),()=>{cancelAnimationFrame(B),R.dispose(),window.removeEventListener(M,g),k?.disconnect(),_(),r.dispose(),y.current=null}},[t,c,E,h,C]),l.useEffect(()=>{if(!u)return;const m=requestAnimationFrame(()=>{const r=y.current;if(r){try{r.fit.fit(),h({type:"terminal_resize",terminalId:c,conversationId:t,cols:r.term.cols,rows:r.term.rows})}catch{}r.term.focus()}});return()=>cancelAnimationFrame(m)},[u]);const{t:F}=P(),f=l.useRef(void 0);return l.useEffect(()=>{if(v===f.current||(f.current=v,v!==!1))return;const m=y.current;m&&m.term.write(`\r
4
4
  \x1B[90m${F("exitBanner",{code:j??""})}\x1B[0m\r