gbpptx 0.2.0 → 0.4.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.
Files changed (46) hide show
  1. package/README.md +237 -214
  2. package/package.json +5 -3
  3. package/src/kernel/model.js +1 -2
  4. package/src/kernel/parts.js +11 -15
  5. package/src/kernel/print.js +14 -16
  6. package/web/app/main.js +8 -8
  7. package/web/app/slides/arrange.js +101 -0
  8. package/web/app/slides/clipboard.js +93 -0
  9. package/web/app/slides/file.js +213 -0
  10. package/web/app/slides/find.js +201 -0
  11. package/web/app/slides/history.js +100 -0
  12. package/web/app/slides/keys.js +179 -0
  13. package/web/app/slides/menus.js +105 -0
  14. package/web/app/slides/objects.js +254 -0
  15. package/web/app/slides/render.js +183 -0
  16. package/web/app/slides/shared.js +85 -0
  17. package/web/app/slides/slides.js +103 -0
  18. package/web/app/slides/table.js +102 -0
  19. package/web/app/slides/text.js +418 -0
  20. package/web/app/slides/view.js +156 -0
  21. package/web/app/slides-app.js +323 -2446
  22. package/web/app/ui/canvas.js +769 -755
  23. package/web/app/ui/color-panel.js +58 -76
  24. package/web/app/ui/dialogs.js +120 -159
  25. package/web/app/ui/file-io.js +116 -132
  26. package/web/app/ui/format-pane.js +427 -427
  27. package/web/app/ui/icons.js +129 -129
  28. package/web/app/ui/menu.js +75 -89
  29. package/web/app/ui/notify.js +45 -45
  30. package/web/app/ui/page-view.js +221 -221
  31. package/web/app/ui/popup.js +80 -80
  32. package/web/app/ui/present.js +292 -292
  33. package/web/app/ui/ribbon.js +868 -878
  34. package/web/app/ui/slide-pane.js +197 -189
  35. package/web/app/ui/statusbar.js +93 -93
  36. package/web/app/ui/text-styles.js +84 -84
  37. package/web/app/ui/titlebar.js +184 -67
  38. package/web/app/ui/transition.js +30 -30
  39. package/web/index.html +23 -21
  40. package/web/serve.mjs +22 -67
  41. package/web/styles/office.css +466 -644
  42. package/web/styles/slides.css +97 -219
  43. package/web/styles/tokens.css +154 -155
  44. package/src/kernel/util/escape.js +0 -21
  45. package/src/kernel/util/id.js +0 -13
  46. package/web/app/ui/backstage.js +0 -255
@@ -1,219 +1,97 @@
1
- /* [文件] gbpptx·幻灯片渲染与通用控件(页/对象/选中框/浮层/菜单/色板/模态/通知) */
2
-
3
- [hidden] { display: none !important; }
4
-
5
- /* ==================== 幻灯片页与对象 ==================== */
6
-
7
- .sl-page {
8
- position: relative;
9
- width: 960px;
10
- height: 540px;
11
- overflow: hidden;
12
- background: #fff;
13
- color: #202124;
14
- user-select: none;
15
- font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
16
- }
17
- .sl-obj { position: absolute; box-sizing: border-box; }
18
- .sl-obj[contenteditable='true'] { user-select: text; }
19
- .sl-obj--shape { display: flex; align-items: stretch; }
20
- .sl-obj--shape > .sl-shape-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
21
- .sl-obj--shape .sl-shape-text {
22
- position: relative; z-index: 1; width: 100%; height: 100%; box-sizing: border-box;
23
- padding: 6px 8px; display: flex; flex-direction: column; white-space: pre-wrap;
24
- word-break: break-word; overflow: hidden;
25
- }
26
- .sl-obj--shape .sl-shape-text > div { min-height: .1em; }
27
- .sl-obj--image img { display: block; width: 100%; height: 100%; }
28
- .sl-obj--image { overflow: hidden; }
29
- .sl-obj--line > .sl-line-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
30
- .sl-obj.has-shadow .sl-shape-svg path,
31
- .sl-obj.has-shadow > img { filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35)); }
32
-
33
- .sl-textbox { width: 100%; height: 100%; box-sizing: border-box; }
34
- .sl-text {
35
- width: 100%; box-sizing: border-box; outline: none; white-space: pre-wrap;
36
- word-break: break-word; overflow-wrap: anywhere; user-select: none;
37
- }
38
- .sl-text[contenteditable='true'], .sl-shape-text[contenteditable='true'] { user-select: text; cursor: text; }
39
- .sl-text div, .sl-text p { margin: 0; }
40
- .sl-text ul, .sl-text ol { margin: 0; padding-left: 1.45em; }
41
- .sl-text li { margin: 0; }
42
- .sl-text b, .sl-text strong { font-weight: 700; }
43
- .sl-text i, .sl-text em { font-style: italic; }
44
-
45
- .sl-table { width: 100%; height: 100%; border-collapse: collapse; table-layout: fixed; }
46
- .sl-table td {
47
- padding: 4px 8px; vertical-align: top; white-space: pre-wrap; word-break: break-word;
48
- overflow: hidden; line-height: 1.25; box-sizing: border-box;
49
- }
50
- .sl-table td[contenteditable='true'] { outline: 2px solid var(--pp-accent, #c43e1c); outline-offset: -2px; background: #fff; }
51
-
52
- .sl-obj.is-editing { outline: 1.5px solid var(--pp-accent, #c43e1c); outline-offset: 1px; }
53
- .sl-obj.is-flash { animation: pp-flash 0.85s ease; }
54
- @keyframes pp-flash {
55
- 0%, 100% { outline: 0 solid rgba(196, 62, 28, 0); }
56
- 30% { outline: 3px solid rgba(196, 62, 28, 0.95); outline-offset: 3px; }
57
- }
58
- .pp-empty-hint {
59
- position: absolute; left: 8px; top: 6px; color: rgba(120, 120, 120, 0.75);
60
- font-size: 14px; pointer-events: none; white-space: nowrap;
61
- }
62
-
63
- /* ==================== 画布叠加层 ==================== */
64
-
65
- .pp-canvas__inner { position: relative; transform-origin: 0 0; }
66
- .pp-canvas__inner > .sl-page { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
67
- .pp-grid {
68
- position: absolute; inset: 0; z-index: 4; pointer-events: none;
69
- background-image:
70
- linear-gradient(to right, rgba(0, 0, 0, 0.06) 1px, transparent 1px),
71
- linear-gradient(to bottom, rgba(0, 0, 0, 0.06) 1px, transparent 1px);
72
- background-size: 20px 20px;
73
- }
74
- .pp-static-guides { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
75
- .pp-static-guides__v { position: absolute; left: 50%; top: 0; bottom: 0; width: 0; border-left: 1px dashed rgba(196, 62, 28, 0.45); }
76
- .pp-static-guides__h { position: absolute; top: 50%; left: 0; right: 0; height: 0; border-top: 1px dashed rgba(196, 62, 28, 0.45); }
77
- .pp-guides { position: absolute; inset: 0; z-index: 30; pointer-events: none; overflow: visible; }
78
- .pp-guide { position: absolute; background: #00a4ef; }
79
- .pp-guide--v { width: 1px; }
80
- .pp-guide--h { height: 1px; }
81
- .pp-marquee {
82
- position: absolute; z-index: 31; border: 1px solid var(--pp-accent, #c43e1c);
83
- background: rgba(196, 62, 28, 0.08); pointer-events: none;
84
- }
85
- .pp-sel {
86
- position: absolute; z-index: 40; box-sizing: border-box; border: 1px solid var(--pp-accent, #c43e1c);
87
- pointer-events: none;
88
- }
89
- .pp-sel.is-multi { border-style: dashed; }
90
- .pp-sel__handle {
91
- position: absolute; width: calc(9px * var(--pp-inv, 1)); height: calc(9px * var(--pp-inv, 1));
92
- box-sizing: border-box; background: #fff; border: 1px solid var(--pp-accent, #c43e1c);
93
- pointer-events: auto; transform: translate(-50%, -50%);
94
- }
95
- .pp-sel__handle[data-dir='nw'] { left: 0; top: 0; cursor: nwse-resize; }
96
- .pp-sel__handle[data-dir='n'] { left: 50%; top: 0; cursor: ns-resize; }
97
- .pp-sel__handle[data-dir='ne'] { left: 100%; top: 0; cursor: nesw-resize; }
98
- .pp-sel__handle[data-dir='e'] { left: 100%; top: 50%; cursor: ew-resize; }
99
- .pp-sel__handle[data-dir='se'] { left: 100%; top: 100%; cursor: nwse-resize; }
100
- .pp-sel__handle[data-dir='s'] { left: 50%; top: 100%; cursor: ns-resize; }
101
- .pp-sel__handle[data-dir='sw'] { left: 0; top: 100%; cursor: nesw-resize; }
102
- .pp-sel__handle[data-dir='w'] { left: 0; top: 50%; cursor: ew-resize; }
103
- .pp-sel__rotate {
104
- position: absolute; left: 50%; width: calc(16px * var(--pp-inv, 1)); height: calc(16px * var(--pp-inv, 1));
105
- margin-left: calc(-8px * var(--pp-inv, 1)); border-radius: 50%; background: #fff;
106
- border: 1px solid var(--pp-accent, #c43e1c); cursor: grab; pointer-events: auto;
107
- }
108
- .pp-sel__rotate::after {
109
- content: '↻'; display: block; text-align: center; line-height: calc(14px * var(--pp-inv, 1));
110
- font-size: calc(11px * var(--pp-inv, 1)); color: var(--pp-accent, #c43e1c);
111
- }
112
-
113
- /* ==================== 浮层 / 菜单 ==================== */
114
-
115
- .gb-popup {
116
- position: fixed; z-index: 3000; overflow-y: auto; border: 1px solid #d1cfcd; border-radius: 4px;
117
- background: #fff; box-shadow: 0 8px 26px rgba(0, 0, 0, 0.18); color: #201f1e;
118
- }
119
- .gb-menu__list { min-width: 178px; padding: 3px; }
120
- .gb-menu__list--compact { min-width: 120px; }
121
- .gb-menu__header { padding: 6px 10px 4px; color: #797775; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
122
- .gb-menu__item {
123
- display: flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 3px;
124
- font-size: 12.5px; white-space: nowrap; cursor: pointer; color: #201f1e;
125
- }
126
- .gb-menu__item:hover { background: #f3f2f1; }
127
- .gb-menu__item.is-disabled { color: #b4b2af; cursor: default; }
128
- .gb-menu__item.is-disabled:hover { background: transparent; }
129
- .gb-menu__item.is-danger { color: #c43e1c; }
130
- .gb-menu__item.is-danger:hover { background: #fdeae6; }
131
- .gb-menu__lead { width: 16px; display: inline-flex; justify-content: center; color: #605e5c; }
132
- .gb-menu__item.is-active .gb-menu__lead { color: var(--pp-accent, #c43e1c); }
133
- .gb-menu__dot { width: 12px; height: 12px; border-radius: 3px; border: 1px solid #c8c6c4; }
134
- .gb-menu__label { flex: 1; }
135
- .gb-menu__shortcut { color: #a19f9d; font-size: 10.5px; }
136
- .gb-menu__arrow { color: #a19f9d; }
137
- .gb-menu__sep { height: 1px; margin: 3px 2px; background: #edebe9; }
138
-
139
- .gb-color { width: 236px; padding: 10px; }
140
- .gb-color__title { margin-bottom: 7px; color: #605e5c; font-size: 11.5px; font-weight: 600; }
141
- .gb-color__grid { display: grid; gap: 3px; }
142
- .gb-color__swatch {
143
- width: 18px; height: 18px; padding: 0; border: 1px solid #d1cfcd; border-radius: 2px;
144
- cursor: pointer;
145
- }
146
- .gb-color__swatch:hover { outline: 1px solid var(--pp-accent, #c43e1c); }
147
- .gb-color__swatch.is-active { outline: 2px solid var(--pp-accent, #c43e1c); outline-offset: 1px; }
148
- .gb-color__custom { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
149
- .gb-color__custom input[type='color'] { width: 34px; height: 28px; padding: 0; border: 1px solid #d1cfcd; background: #fff; }
150
- .gb-color__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 9px; }
151
-
152
- .gb-modal-overlay {
153
- position: fixed; inset: 0; z-index: 4200; display: flex; align-items: center; justify-content: center;
154
- background: rgba(0, 0, 0, 0.28);
155
- }
156
- .gb-modal {
157
- max-height: 86vh; display: flex; flex-direction: column; border: 1px solid #d1cfcd; border-radius: 5px;
158
- background: #fff; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
159
- }
160
- .gb-modal__head { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid #edebe9; }
161
- .gb-modal__title { flex: 1; font-size: 15px; font-weight: 600; }
162
- .gb-modal__body { padding: 16px; overflow-y: auto; font-size: 13px; }
163
- .gb-modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid #edebe9; }
164
- .gb-modal__close { border: none; background: none; color: #605e5c; font-size: 14px; cursor: pointer; }
165
- .gb-modal__message { margin: 0; line-height: 1.65; white-space: pre-wrap; }
166
-
167
- .gb-btn {
168
- height: 30px; padding: 0 14px; border: 1px solid #d1cfcd; border-radius: 3px; background: #fff;
169
- color: #201f1e; font-size: 12.5px; cursor: pointer;
170
- }
171
- .gb-btn:hover { border-color: #a19f9d; background: #f8f8f8; }
172
- .gb-btn--primary { border-color: var(--pp-accent, #c43e1c); background: var(--pp-accent, #c43e1c); color: #fff; }
173
- .gb-btn--primary:hover { background: #a8341a; border-color: #a8341a; }
174
- .gb-btn--danger { border-color: #c43e1c; background: #c43e1c; color: #fff; }
175
- .gb-btn--danger:hover { background: #a8341a; }
176
- .gb-input {
177
- height: 30px; padding: 0 8px; border: 1px solid #d1cfcd; border-radius: 3px; background: #fff;
178
- color: #201f1e; font-size: 12.5px; outline: none; box-sizing: border-box;
179
- }
180
- .gb-input:focus { border-color: var(--pp-accent, #c43e1c); box-shadow: 0 0 0 1px var(--pp-accent, #c43e1c) inset; }
181
- .gb-field { display: flex; align-items: center; gap: 10px; min-height: 32px; }
182
- .gb-field__label { width: 92px; flex: none; color: #605e5c; font-size: 12px; }
183
- .gb-field .gb-input { flex: 1; min-width: 0; }
184
- .gb-check { display: flex; align-items: center; gap: 7px; font-size: 12.5px; cursor: pointer; }
185
-
186
- /* ==================== 通知 ==================== */
187
-
188
- .gbdocs-notify-host {
189
- position: fixed; top: 44px; right: 16px; z-index: 5000; display: flex; flex-direction: column;
190
- gap: 8px; pointer-events: none;
191
- }
192
- .gb-notify {
193
- display: flex; align-items: center; gap: 9px; min-width: 220px; max-width: 400px;
194
- padding: 9px 13px; border: 1px solid #d1cfcd; border-left: 4px solid var(--pp-accent, #c43e1c);
195
- border-radius: 3px; background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
196
- font-size: 12.5px; opacity: 0; transform: translateY(-6px);
197
- transition: opacity .18s ease, transform .18s ease; pointer-events: auto; cursor: pointer;
198
- }
199
- .gb-notify.is-in { opacity: 1; transform: translateY(0); }
200
- .gb-notify__badge {
201
- width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%;
202
- color: #fff; font-size: 11px; flex-shrink: 0;
203
- }
204
- .gb-notify--success { border-left-color: #107c10; }
205
- .gb-notify--success .gb-notify__badge { background: #107c10; }
206
- .gb-notify--error { border-left-color: #a4262c; }
207
- .gb-notify--error .gb-notify__badge { background: #a4262c; }
208
- .gb-notify--warning { border-left-color: #d18f00; }
209
- .gb-notify--warning .gb-notify__badge { background: #d18f00; }
210
- .gb-notify--info { border-left-color: var(--pp-accent, #c43e1c); }
211
- .gb-notify--info .gb-notify__badge { background: var(--pp-accent, #c43e1c); }
212
- .gb-notify__text { word-break: break-word; }
213
-
214
- /* ==================== 打印 ==================== */
215
-
216
- @media print {
217
- .pp-titlebar, .pp-ribbon, .pp-slidepane, .pp-formatpane, .pp-statusbar, .pp-notes, .pp-findbar { display: none !important; }
218
- .pp-app, .pp-main, .pp-center, .pp-canvas { display: block; background: #fff; }
219
- }
1
+ /* [文件] gbpptx·应用样式 —— 幻灯片页渲染 / 浮层 / 通知 */
2
+
3
+ [hidden] { display: none !important; }
4
+
5
+ .gbp-root { height: 100%; margin: 0; }
6
+ .gbp-root {
7
+ color: var(--gbp-dt-text);
8
+ background: var(--gbp-dt-bg-2);
9
+ font-family: 'Microsoft YaHei', -apple-system, 'Segoe UI', sans-serif;
10
+ font-size: 14px;
11
+ }
12
+ .gbp-root { height: 100%; min-height: 0; }
13
+ .gbp-root button { font-family: inherit; font-size: inherit; color: inherit; }
14
+
15
+ /* ==================== 幻灯片页渲染(缩略图/画布/放映/打印共用同一坐标系 960×540) ==================== */
16
+
17
+ .sl-page {
18
+ position: relative; width: 960px; height: 540px; overflow: hidden;
19
+ background: #fff; color: #202124;
20
+ }
21
+ .sl-obj { position: absolute; box-sizing: border-box; }
22
+ .sl-obj--gbp-text { }
23
+ .sl-obj--gbp-shape { display: flex; align-items: center; justify-content: center; }
24
+ .sl-obj--gbp-shape svg { position: absolute; inset: 0; width: 100%; height: 100%; }
25
+ .sl-obj--gbp-shape .sl-shape-text {
26
+ position: relative; z-index: 1; width: 100%; text-align: center; white-space: pre-wrap;
27
+ word-break: break-word; padding: 4px;
28
+ }
29
+ .sl-obj--gbp-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
30
+ .sl-obj--gbp-line svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
31
+ .sl-obj--gbp-table { display: block; }
32
+ .sl-obj.gbp-is-editing { outline: 1px dashed var(--gbp-dt-accent); outline-offset: 1px; }
33
+ .sl-table { width: 100%; height: 100%; border-collapse: collapse; table-layout: fixed; }
34
+ .sl-table td { border: 1px solid var(--gbp-dt-border-strong); padding: 2px 6px; vertical-align: top; white-space: pre-wrap; word-break: break-word; }
35
+
36
+ /* 正文通用排版(渲染层与就地编辑器共用一份口径) */
37
+ .sl-text { width: 100%; height: 100%; line-height: 1.35; word-break: break-word; white-space: pre-wrap; outline: none; }
38
+ .sl-text div, .sl-text p { margin: 0 0 .35em; }
39
+ .sl-text ul, .sl-text ol { margin: 0 0 .35em; padding-left: 1.4em; }
40
+ .sl-text li { margin: 0; }
41
+ .sl-text img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; margin: .2em 0; }
42
+
43
+ /* ==================== 浮层(菜单/气泡/色板/模态) ==================== */
44
+
45
+ .gbp-popup {
46
+ position: fixed; z-index: 1000; overflow-y: auto; border: 1px solid var(--gbp-dt-border); border-radius: 6px;
47
+ background: var(--gbp-dt-surface); box-shadow: var(--gbp-dt-shadow-popup); color: var(--gbp-dt-text);
48
+ }
49
+ .gbp-menu__list { min-width: 160px; padding: 4px; }
50
+ .gbp-menu__item { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 4px; font-size: 13px; white-space: nowrap; cursor: pointer; }
51
+ .gbp-menu__item:hover { background: var(--gbp-dt-hover); }
52
+ .gbp-menu__item.gbp-is-disabled { color: var(--gbp-dt-text-disabled); cursor: default; }
53
+ .gbp-menu__item.gbp-is-disabled:hover { background: transparent; }
54
+ .gbp-menu__lead { width: 14px; display: inline-flex; justify-content: center; }
55
+ .gbp-menu__dot { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--gbp-dt-border-strong); }
56
+ .gbp-menu__label { flex: 1; }
57
+ .gbp-menu__shortcut { color: var(--gbp-dt-text-tertiary); font-size: 11px; }
58
+ .gbp-menu__arrow { color: var(--gbp-dt-text-tertiary); }
59
+ .gbp-menu__sep { height: 1px; margin: 4px 0; background: var(--gbp-dt-border); }
60
+
61
+ .gbp-btn { padding: 4px 12px; border: 1px solid var(--gbp-dt-border-strong); border-radius: 6px; background: var(--gbp-dt-bg); color: var(--gbp-dt-text); font-size: 13px; cursor: pointer; }
62
+ .gbp-btn:hover { border-color: var(--gbp-dt-accent); background: var(--gbp-dt-accent-soft); }
63
+ .gbp-btn--primary { border-color: var(--gbp-dt-accent); background: var(--gbp-dt-accent); color: var(--gbp-dt-on-accent); }
64
+ .gbp-iconbtn { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--gbp-dt-text-secondary); cursor: pointer; }
65
+ .gbp-iconbtn:hover { background: var(--gbp-dt-hover); }
66
+ .gbp-input { height: 28px; padding: 0 8px; border: 1px solid var(--gbp-dt-border-strong); border-radius: 4px; background: var(--gbp-dt-bg); color: var(--gbp-dt-text); font-size: 13px; outline: none; }
67
+ .gbp-input:focus { border-color: var(--gbp-dt-accent); }
68
+
69
+ .gbp-color { width: 232px; padding: 10px; }
70
+ .gbp-color__grid { display: grid; gap: 3px; }
71
+ .gbp-color__swatch { width: 18px; height: 18px; border: 1px solid var(--gbp-dt-border-strong); border-radius: 3px; cursor: pointer; }
72
+ .gbp-color__swatch.gbp-is-active { outline: 2px solid var(--gbp-dt-accent); outline-offset: 1px; }
73
+ .gbp-color__custom { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
74
+ .gbp-color__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
75
+
76
+ .gbp-modal-overlay { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.32); }
77
+ .gbp-modal { max-height: 86vh; display: flex; flex-direction: column; border: 1px solid var(--gbp-dt-border); border-radius: 8px; background: var(--gbp-dt-surface); box-shadow: var(--gbp-dt-shadow-window); }
78
+ .gbp-modal__head { display: flex; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--gbp-dt-border); }
79
+ .gbp-modal__title { flex: 1; font-size: 14px; font-weight: 600; }
80
+ .gbp-modal__body { padding: 14px; overflow-y: auto; }
81
+ .gbp-modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--gbp-dt-border); }
82
+ .gbp-field { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
83
+ .gbp-field__label { width: 88px; color: var(--gbp-dt-text-secondary); font-size: 12px; }
84
+ .gbp-field .gbp-input { flex: 1; min-width: 0; }
85
+ .gbp-modal__foot .gbp-modal__close { border: none; background: none; color: var(--gbp-dt-text-secondary); font-size: 14px; cursor: pointer; }
86
+
87
+ /* ==================== 通知 ==================== */
88
+
89
+ .gbdocx-notify-host { position: fixed; top: 14px; right: 14px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
90
+ .gbp-notify { display: flex; align-items: center; gap: 8px; min-width: 200px; max-width: 360px; padding: 8px 12px; border: 1px solid var(--gbp-dt-border); border-radius: 6px; background: var(--gbp-dt-surface); box-shadow: var(--gbp-dt-shadow-popup); font-size: 13px; opacity: 0; transform: translateY(-8px); transition: opacity var(--gbp-dt-duration-normal) var(--gbp-dt-ease-out), transform var(--gbp-dt-duration-normal) var(--gbp-dt-ease-out); pointer-events: auto; cursor: pointer; }
91
+ .gbp-notify.gbp-is-in { opacity: 1; transform: translateY(0); }
92
+ .gbp-notify__badge { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: 12px; flex-shrink: 0; }
93
+ .gbp-notify--success .gbp-notify__badge { background: var(--gbp-dt-success); }
94
+ .gbp-notify--error .gbp-notify__badge { background: var(--gbp-dt-danger); }
95
+ .gbp-notify--warning .gbp-notify__badge { background: var(--gbp-dt-warning); }
96
+ .gbp-notify--info .gbp-notify__badge { background: var(--gbp-dt-accent); }
97
+ .gbp-notify__text { word-break: break-word; }
@@ -1,155 +1,154 @@
1
- /* [文件] gbdocs·设计令牌 —— 全局视觉变量唯一数据源(移植自 guabi desks top tokens.css 的相关子集) */
2
-
3
- :root {
4
- --dt-accent: #2a6bff;
5
- --dt-accent-hover: #5a8bff;
6
- --dt-accent-active: #1f52d8;
7
- --dt-on-accent: #ffffff;
8
- --dt-accent-soft: rgba(42, 107, 255, 0.14);
9
- --dt-accent-soft-strong: rgba(42, 107, 255, 0.3);
10
- --dt-accent-fill: rgba(42, 107, 255, 0.42);
11
-
12
- --dt-surface: #f6f8fb;
13
- --dt-surface-2: rgba(255, 255, 255, 0.72);
14
- --dt-surface-3: rgba(255, 255, 255, 0.55);
15
-
16
- --dt-bg: #ffffff;
17
- --dt-bg-2: #f7f9fc;
18
- --dt-bg-3: #fafbfd;
19
- --dt-scrim: #f6f8fb;
20
- --dt-media-overlay: rgba(0, 0, 0, 0.68);
21
-
22
- --dt-text: #171a1f;
23
- --dt-text-secondary: rgba(23, 26, 31, 0.64);
24
- --dt-text-tertiary: rgba(23, 26, 31, 0.44);
25
- --dt-text-disabled: rgba(23, 26, 31, 0.3);
26
-
27
- --dt-border: rgba(23, 26, 31, 0.09);
28
- --dt-border-strong: rgba(23, 26, 31, 0.18);
29
-
30
- --dt-hover: rgba(23, 26, 31, 0.05);
31
- --dt-active: rgba(23, 26, 31, 0.09);
32
-
33
- --dt-fill: rgba(23, 26, 31, 0.035);
34
- --dt-fill-light: rgba(23, 26, 31, 0.02);
35
-
36
- --dt-scrollbar: rgba(23, 26, 31, 0.18);
37
- --dt-scrollbar-hover: rgba(23, 26, 31, 0.3);
38
-
39
- --dt-success: #16a34a;
40
- --dt-success-soft: rgba(22, 163, 74, 0.14);
41
- --dt-warning: #f59e0b;
42
- --dt-warning-soft: rgba(245, 158, 11, 0.14);
43
- --dt-danger: #e5484d;
44
- --dt-danger-hover: #d93a40;
45
- --dt-danger-soft: rgba(229, 72, 77, 0.12);
46
-
47
- --dt-shadow-popup: 0 10px 34px rgba(15, 23, 42, 0.18);
48
- --dt-shadow-window: 0 10px 30px rgba(15, 23, 42, 0.14);
49
-
50
- --dt-radius-sm: 8px;
51
- --dt-radius-md: 10px;
52
- --dt-radius-lg: 14px;
53
-
54
- --dt-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
55
- --dt-duration-fast: 0.15s;
56
- --dt-duration-normal: 0.22s;
57
- }
58
-
59
- [data-theme='dark'] {
60
- --dt-on-accent: #ffffff;
61
- --dt-accent-soft: rgba(122, 162, 255, 0.2);
62
- --dt-accent-soft-strong: rgba(122, 162, 255, 0.4);
63
- --dt-accent-fill: rgba(122, 162, 255, 0.5);
64
-
65
- --dt-surface: #1a1d24;
66
- --dt-surface-2: rgba(35, 39, 48, 0.72);
67
- --dt-surface-3: rgba(47, 52, 63, 0.55);
68
-
69
- --dt-bg: #1a1d24;
70
- --dt-bg-2: #22262f;
71
- --dt-bg-3: #282d37;
72
- --dt-scrim: #1a1d24;
73
-
74
- --dt-text: #eef1f6;
75
- --dt-text-secondary: rgba(238, 241, 246, 0.64);
76
- --dt-text-tertiary: rgba(238, 241, 246, 0.44);
77
- --dt-text-disabled: rgba(238, 241, 246, 0.3);
78
-
79
- --dt-border: rgba(255, 255, 255, 0.09);
80
- --dt-border-strong: rgba(255, 255, 255, 0.18);
81
-
82
- --dt-hover: rgba(255, 255, 255, 0.06);
83
- --dt-active: rgba(255, 255, 255, 0.1);
84
-
85
- --dt-fill: rgba(255, 255, 255, 0.04);
86
- --dt-fill-light: rgba(255, 255, 255, 0.02);
87
-
88
- --dt-scrollbar: rgba(255, 255, 255, 0.18);
89
- --dt-scrollbar-hover: rgba(255, 255, 255, 0.3);
90
-
91
- --dt-success: #34c47c;
92
- --dt-success-soft: rgba(52, 196, 124, 0.16);
93
- --dt-warning: #fbbf24;
94
- --dt-warning-soft: rgba(251, 191, 36, 0.16);
95
- --dt-danger: #ff6b6e;
96
- --dt-danger-hover: #ff8d90;
97
- --dt-danger-soft: rgba(255, 107, 110, 0.18);
98
-
99
- --dt-shadow-popup: 0 10px 38px rgba(0, 0, 0, 0.58);
100
- --dt-shadow-window: 0 12px 36px rgba(0, 0, 0, 0.55);
101
- }
102
-
103
- * {
104
- scrollbar-color: var(--dt-scrollbar) transparent;
105
- box-sizing: border-box;
106
- }
107
-
108
- ::-webkit-scrollbar {
109
- width: 8px;
110
- height: 8px;
111
- }
112
- ::-webkit-scrollbar-track {
113
- background: transparent;
114
- }
115
- ::-webkit-scrollbar-thumb {
116
- background: var(--dt-scrollbar);
117
- border-radius: 4px;
118
- }
119
- ::-webkit-scrollbar-thumb:hover {
120
- background: var(--dt-scrollbar-hover);
121
- }
122
- ::-webkit-scrollbar-corner {
123
- background: transparent;
124
- }
125
-
126
- .dt-scrollbar-thin::-webkit-scrollbar {
127
- width: 4px;
128
- height: 4px;
129
- }
130
- .dt-scrollbar-thin::-webkit-scrollbar-thumb {
131
- border-radius: 2px;
132
- }
133
-
134
- html,
135
- body {
136
- height: 100%;
137
- margin: 0;
138
- }
139
- body {
140
- color: var(--dt-text);
141
- background: var(--dt-bg-2);
142
- font-family: 'Microsoft YaHei', -apple-system, 'Segoe UI', sans-serif;
143
- font-size: 14px;
144
- }
145
-
146
- #app {
147
- height: 100%;
148
- min-height: 0;
149
- }
150
-
151
- button {
152
- font-family: inherit;
153
- font-size: inherit;
154
- color: inherit;
155
- }
1
+ /* [文件] gbdocx·设计令牌 —— 全局视觉变量唯一数据源(移植自 guabi desks top tokens.css 的相关子集) */
2
+
3
+ :root {
4
+ --gbp-dt-accent: #2a6bff;
5
+ --gbp-dt-accent-hover: #5a8bff;
6
+ --gbp-dt-accent-active: #1f52d8;
7
+ --gbp-dt-on-accent: #ffffff;
8
+ --gbp-dt-accent-soft: rgba(42, 107, 255, 0.14);
9
+ --gbp-dt-accent-soft-strong: rgba(42, 107, 255, 0.3);
10
+ --gbp-dt-accent-fill: rgba(42, 107, 255, 0.42);
11
+
12
+ --gbp-dt-surface: #ffffff;
13
+ --gbp-dt-surface-2: rgba(255, 255, 255, 0.72);
14
+ --gbp-dt-surface-3: rgba(255, 255, 255, 0.55);
15
+
16
+ --gbp-dt-bg: #ffffff;
17
+ --gbp-dt-bg-2: #ffffff;
18
+ --gbp-dt-bg-3: #ffffff;
19
+ --gbp-dt-scrim: #ffffff;
20
+ --gbp-dt-media-overlay: rgba(0, 0, 0, 0.68);
21
+
22
+ --gbp-dt-text: #171a1f;
23
+ --gbp-dt-text-secondary: rgba(23, 26, 31, 0.64);
24
+ --gbp-dt-text-tertiary: rgba(23, 26, 31, 0.44);
25
+ --gbp-dt-text-disabled: rgba(23, 26, 31, 0.3);
26
+
27
+ --gbp-dt-border: rgba(23, 26, 31, 0.09);
28
+ --gbp-dt-border-strong: rgba(23, 26, 31, 0.18);
29
+
30
+ --gbp-dt-hover: rgba(23, 26, 31, 0.05);
31
+ --gbp-dt-active: rgba(23, 26, 31, 0.09);
32
+
33
+ --gbp-dt-fill: rgba(23, 26, 31, 0.035);
34
+ --gbp-dt-fill-light: rgba(23, 26, 31, 0.02);
35
+
36
+ --gbp-dt-scrollbar: rgba(23, 26, 31, 0.18);
37
+ --gbp-dt-scrollbar-hover: rgba(23, 26, 31, 0.3);
38
+
39
+ --gbp-dt-success: #16a34a;
40
+ --gbp-dt-success-soft: rgba(22, 163, 74, 0.14);
41
+ --gbp-dt-warning: #f59e0b;
42
+ --gbp-dt-warning-soft: rgba(245, 158, 11, 0.14);
43
+ --gbp-dt-danger: #e5484d;
44
+ --gbp-dt-danger-hover: #d93a40;
45
+ --gbp-dt-danger-soft: rgba(229, 72, 77, 0.12);
46
+
47
+ --gbp-dt-shadow-popup: 0 10px 34px rgba(15, 23, 42, 0.18);
48
+ --gbp-dt-shadow-window: 0 10px 30px rgba(15, 23, 42, 0.14);
49
+
50
+ --gbp-dt-radius-sm: 8px;
51
+ --gbp-dt-radius-md: 10px;
52
+ --gbp-dt-radius-lg: 14px;
53
+
54
+ --gbp-dt-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
55
+ --gbp-dt-duration-fast: 0.15s;
56
+ --gbp-dt-duration-normal: 0.22s;
57
+ }
58
+
59
+ [data-gbp-theme='dark'] {
60
+ --gbp-dt-on-accent: #ffffff;
61
+ --gbp-dt-accent-soft: rgba(122, 162, 255, 0.2);
62
+ --gbp-dt-accent-soft-strong: rgba(122, 162, 255, 0.4);
63
+ --gbp-dt-accent-fill: rgba(122, 162, 255, 0.5);
64
+
65
+ --gbp-dt-surface: #1a1d24;
66
+ --gbp-dt-surface-2: rgba(35, 39, 48, 0.72);
67
+ --gbp-dt-surface-3: rgba(47, 52, 63, 0.55);
68
+
69
+ --gbp-dt-bg: #1a1d24;
70
+ --gbp-dt-bg-2: #22262f;
71
+ --gbp-dt-bg-3: #282d37;
72
+ --gbp-dt-scrim: #1a1d24;
73
+
74
+ --gbp-dt-text: #eef1f6;
75
+ --gbp-dt-text-secondary: rgba(238, 241, 246, 0.64);
76
+ --gbp-dt-text-tertiary: rgba(238, 241, 246, 0.44);
77
+ --gbp-dt-text-disabled: rgba(238, 241, 246, 0.3);
78
+
79
+ --gbp-dt-border: rgba(255, 255, 255, 0.09);
80
+ --gbp-dt-border-strong: rgba(255, 255, 255, 0.18);
81
+
82
+ --gbp-dt-hover: rgba(255, 255, 255, 0.06);
83
+ --gbp-dt-active: rgba(255, 255, 255, 0.1);
84
+
85
+ --gbp-dt-fill: rgba(255, 255, 255, 0.04);
86
+ --gbp-dt-fill-light: rgba(255, 255, 255, 0.02);
87
+
88
+ --gbp-dt-scrollbar: rgba(255, 255, 255, 0.18);
89
+ --gbp-dt-scrollbar-hover: rgba(255, 255, 255, 0.3);
90
+
91
+ --gbp-dt-success: #34c47c;
92
+ --gbp-dt-success-soft: rgba(52, 196, 124, 0.16);
93
+ --gbp-dt-warning: #fbbf24;
94
+ --gbp-dt-warning-soft: rgba(251, 191, 36, 0.16);
95
+ --gbp-dt-danger: #ff6b6e;
96
+ --gbp-dt-danger-hover: #ff8d90;
97
+ --gbp-dt-danger-soft: rgba(255, 107, 110, 0.18);
98
+
99
+ --gbp-dt-shadow-popup: 0 10px 38px rgba(0, 0, 0, 0.58);
100
+ --gbp-dt-shadow-window: 0 12px 36px rgba(0, 0, 0, 0.55);
101
+ }
102
+
103
+ .gbp-root, .gbp-root * {
104
+ scrollbar-color: var(--gbp-dt-scrollbar) transparent;
105
+ box-sizing: border-box;
106
+ }
107
+
108
+ .gbp-root ::-webkit-scrollbar {
109
+ width: 8px;
110
+ height: 8px;
111
+ }
112
+ .gbp-root ::-webkit-scrollbar-track {
113
+ background: transparent;
114
+ }
115
+ .gbp-root ::-webkit-scrollbar-thumb {
116
+ background: var(--gbp-dt-scrollbar);
117
+ border-radius: 4px;
118
+ }
119
+ .gbp-root ::-webkit-scrollbar-thumb:hover {
120
+ background: var(--gbp-dt-scrollbar-hover);
121
+ }
122
+ .gbp-root ::-webkit-scrollbar-corner {
123
+ background: transparent;
124
+ }
125
+
126
+ .dt-scrollbar-thin::-webkit-scrollbar {
127
+ width: 4px;
128
+ height: 4px;
129
+ }
130
+ .dt-scrollbar-thin::-webkit-scrollbar-thumb {
131
+ border-radius: 2px;
132
+ }
133
+
134
+ .gbp-root {
135
+ height: 100%;
136
+ margin: 0;
137
+ }
138
+ .gbp-root {
139
+ color: var(--gbp-dt-text);
140
+ background: var(--gbp-dt-bg-2);
141
+ font-family: 'Microsoft YaHei', -apple-system, 'Segoe UI', sans-serif;
142
+ font-size: 14px;
143
+ }
144
+
145
+ .gbp-root {
146
+ height: 100%;
147
+ min-height: 0;
148
+ }
149
+
150
+ .gbp-root button {
151
+ font-family: inherit;
152
+ font-size: inherit;
153
+ color: inherit;
154
+ }