@2kog/kacha 0.1.2 → 0.2.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.
@@ -1,4 +1,4 @@
1
- :root {
1
+ html:root {
2
2
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
3
3
  color: #1f2937;
4
4
  background: #f6f8fa;
@@ -8,6 +8,13 @@
8
8
  --accent: #5b5cf5;
9
9
  --accent-bg: #eef2ff;
10
10
  --focus-border: #818cf8;
11
+ --el-color-primary: var(--accent);
12
+ --el-color-primary-light-3: color-mix(in srgb, var(--accent) 70%, white);
13
+ --el-color-primary-light-5: color-mix(in srgb, var(--accent) 50%, white);
14
+ --el-color-primary-light-7: color-mix(in srgb, var(--accent) 30%, white);
15
+ --el-color-primary-light-8: color-mix(in srgb, var(--accent) 20%, white);
16
+ --el-color-primary-light-9: var(--accent-bg);
17
+ --el-color-primary-dark-2: color-mix(in srgb, var(--accent) 80%, black);
11
18
  }
12
19
  * { box-sizing: border-box; }
13
20
  body { margin: 0; }
@@ -18,7 +25,7 @@ button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
18
25
  :is(button, a, summary, input, textarea, select):focus-visible { outline: none; }
19
26
  button:focus-visible, summary:focus-visible, input[type="checkbox"]:focus-visible { box-shadow: inset 0 0 0 1px var(--focus-border); }
20
27
  a:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; }
21
- .field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible,
28
+ .field input:not(.el-select__input):focus-visible, .field textarea:focus-visible,
22
29
  .asset-story-panel textarea:focus-visible { border-color: var(--focus-border); }
23
30
  @media (forced-colors: active) { :focus-visible { outline: 1px solid Highlight; outline-offset: -1px; } }
24
31
  .shell { display: grid; min-height: 100vh; grid-template-columns: 208px minmax(0, 1fr); }
@@ -37,17 +44,175 @@ a:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; }
37
44
  .nav-arrow { margin-left: auto; }
38
45
  .topbar { display: flex; align-items: center; gap: 9px; height: 65px; padding: 0 34px; background: #fff; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
39
46
  .topbar strong { color: #33384a; }
40
- .topbar .language-control {
41
- flex: none;
42
- width: 148px;
43
- margin-inline-start: auto;
44
- --el-input-icon-color: var(--accent);
45
- --el-select-input-color: var(--accent);
46
- --el-text-color-regular: var(--accent);
47
- --el-border-color-hover: var(--focus-border);
47
+ .topbar-actions { display: flex; flex: none; gap: 8px; margin-inline-start: auto; }
48
+ .topbar-icon-button {
49
+ position: relative;
50
+ display: inline-grid;
51
+ place-items: center;
52
+ width: 32px;
53
+ height: 32px;
54
+ padding: 0;
55
+ border: 0;
56
+ border-radius: 8px;
57
+ background: transparent;
58
+ color: var(--accent);
59
+ }
60
+ .topbar-icon-button:hover, .oss-sync-trigger.is-running { background: var(--accent-bg); }
61
+ .oss-sync-trigger.has-count {
62
+ display: inline-flex;
63
+ width: auto;
64
+ gap: 5px;
65
+ padding-inline: 0 8px;
66
+ }
67
+ .oss-sync-cloud { display: grid; position: relative; width: 32px; height: 32px; place-items: center; }
68
+ .oss-sync-ring {
69
+ position: absolute;
70
+ inset: 1px;
71
+ border-radius: 50%;
72
+ background: conic-gradient(var(--accent) var(--oss-sync-progress), var(--el-color-primary-light-7) 0);
73
+ mask-image: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
74
+ }
75
+ .oss-sync-topbar-count { font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
76
+ .oss-sync-notification { max-width: calc(100vw - 32px); }
77
+ .oss-sync-notification--clickable { cursor: pointer; }
78
+ .oss-sync-notice-details {
79
+ display: block;
80
+ margin-top: 6px;
81
+ padding: 0;
82
+ border: 0;
83
+ background: transparent;
84
+ color: var(--accent);
85
+ font-weight: 650;
86
+ }
87
+ .oss-sync-notice-details:hover { text-decoration: underline; }
88
+ .oss-sync-failure-list {
89
+ max-height: min(48vh, 440px);
90
+ overflow: auto;
91
+ margin: 0;
92
+ padding: 0 12px;
93
+ border: 1px solid var(--line);
94
+ border-radius: 8px;
95
+ list-style: none;
96
+ }
97
+ .oss-sync-failure-list li { display: grid; gap: 4px; padding: 10px 0; overflow-wrap: anywhere; }
98
+ .oss-sync-failure-list li + li { border-top: 1px solid var(--line); }
99
+ .oss-sync-failure-list small { color: var(--muted); }
100
+ @media (prefers-reduced-motion: no-preference) {
101
+ .oss-sync-ring.is-scanning { animation: storage-test-spin .9s linear infinite; }
102
+ }
103
+ .oss-sync-dialog { width: min(540px, calc(100vw - 28px)); }
104
+ .oss-sync-plan-dialog { width: min(640px, calc(100vw - 28px)); }
105
+ .oss-sync-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
106
+ .oss-sync-dialog .dialog-head { flex: none; }
107
+ .oss-sync-body { display: grid; gap: 12px; min-height: 0; overflow: auto; font-size: 13px; }
108
+ .oss-sync-status {
109
+ display: flex;
110
+ align-items: center;
111
+ gap: 8px;
112
+ padding: 12px 14px;
113
+ border-radius: 8px;
114
+ background: var(--accent-bg);
115
+ color: #4546bd;
116
+ }
117
+ .oss-sync-status[data-state="completed"] { background: #f0faf5; color: #166344; }
118
+ .oss-sync-status[data-state="failed"] { background: #fff5f5; color: #9e263b; }
119
+ .oss-sync-status[data-state="interrupted"] { background: #fff7ed; color: #9a3412; }
120
+ .oss-sync-status-icon { flex: none; }
121
+ @media (prefers-reduced-motion: no-preference) {
122
+ .oss-sync-status[data-state="running"] .oss-sync-status-icon { animation: storage-test-spin .9s linear infinite; }
48
123
  }
49
- .topbar .language-control, .language-options { --el-color-primary: var(--accent); }
50
- .language-options { --el-fill-color-light: var(--accent-bg); }
124
+ .oss-sync-progress, .oss-sync-file { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
125
+ .oss-sync-progress strong, .oss-sync-counts dd { color: #1f2937; font-variant-numeric: tabular-nums; }
126
+ .oss-sync-file, .oss-sync-note { margin: 0; color: var(--muted); }
127
+ .oss-sync-file code, .oss-sync-note code, .oss-sync-failures li { overflow-wrap: anywhere; }
128
+ .oss-sync-counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 4px 0; }
129
+ .oss-sync-counts div { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; }
130
+ .oss-sync-counts dt { color: var(--muted); }
131
+ .oss-sync-counts dd { margin: 4px 0 0; font-size: 18px; font-weight: 650; }
132
+ .oss-sync-failures { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; }
133
+ .oss-sync-failures summary { cursor: pointer; }
134
+ .oss-sync-failures ul { display: grid; gap: 8px; max-height: 160px; overflow: auto; margin: 8px 0 0; padding-inline-start: 20px; }
135
+ .oss-sync-failures small { display: block; color: var(--muted); }
136
+ .oss-sync-plan-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
137
+ .oss-sync-plan-group, .oss-sync-conflicts { border: 1px solid var(--line); border-radius: 8px; }
138
+ .oss-sync-plan-group summary { padding: 10px 12px; cursor: pointer; }
139
+ .oss-sync-plan-group summary strong { float: inline-end; margin-inline-start: 8px; font-variant-numeric: tabular-nums; }
140
+ .oss-sync-plan-files, .oss-sync-conflict-files { list-style: none; margin: 0; padding: 0 12px; }
141
+ .oss-sync-plan-files { max-height: 220px; overflow: auto; }
142
+ .oss-sync-plan-files li, .oss-sync-conflict-files li {
143
+ display: flex;
144
+ align-items: baseline;
145
+ justify-content: space-between;
146
+ flex-wrap: wrap;
147
+ gap: 8px 12px;
148
+ padding: 8px 0;
149
+ border-top: 1px solid var(--line);
150
+ }
151
+ .oss-sync-plan-files code, .oss-sync-conflict-files code { min-width: 0; overflow-wrap: anywhere; }
152
+ .oss-sync-plan-files small { flex-shrink: 0; color: var(--muted); white-space: nowrap; }
153
+ .oss-sync-conflicts h3 { margin: 12px 12px 4px; font-size: 14px; }
154
+ .oss-sync-conflicts > p { margin: 0 12px 8px; }
155
+ .oss-sync-conflict-files li { align-items: center; }
156
+ .oss-sync-conflict-files .el-radio-group { flex-shrink: 0; }
157
+ .oss-sync-delete-confirmation { max-width: 100%; height: auto; }
158
+ .oss-sync-delete-confirmation .el-checkbox__label { white-space: normal; }
159
+ .oss-sync-actions { flex-wrap: wrap; }
160
+ .oss-sync-refresh { margin-inline-end: auto; }
161
+ @media (max-width: 480px) {
162
+ .oss-sync-plan-groups { grid-template-columns: 1fr; }
163
+ .oss-sync-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
164
+ }
165
+ .project-config-form { display: grid; gap: 12px; }
166
+ .project-logo-field { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
167
+ .project-logo-field .brand-icon { width: 64px; height: 64px; border: 1px solid var(--line); }
168
+ .project-logo-field img { object-fit: contain; padding: 4px; }
169
+ .project-logo-field .upload:focus-within { box-shadow: inset 0 0 0 1px var(--focus-border); }
170
+ .storage-lfs-target {
171
+ display: grid;
172
+ gap: 4px;
173
+ padding: 12px 14px;
174
+ border-radius: 8px;
175
+ background: var(--accent-bg);
176
+ color: #33384a;
177
+ font-size: 13px;
178
+ }
179
+ .storage-lfs-target strong { color: var(--accent); }
180
+ .storage-lfs-target p { margin: 0; }
181
+ .storage-lfs-target code { overflow-wrap: anywhere; }
182
+ .storage-test-button { margin-inline-end: auto; }
183
+ .storage-test-result {
184
+ display: grid;
185
+ grid-template-columns: auto minmax(0, 1fr);
186
+ align-items: start;
187
+ gap: 10px;
188
+ padding: 12px 14px;
189
+ border: 1px solid #f6c7cc;
190
+ border-radius: 10px;
191
+ background: #fff5f5;
192
+ color: #9e263b;
193
+ font-size: 13px;
194
+ line-height: 1.5;
195
+ }
196
+ .storage-test-result.is-success { border-color: #bfe2d1; background: #f0faf5; color: #166344; }
197
+ .storage-test-result > svg { margin-top: 1px; }
198
+ .storage-test-detail { min-width: 0; }
199
+ .storage-test-detail p { margin: 0; font-weight: 650; }
200
+ .storage-test-detail code {
201
+ display: block;
202
+ width: fit-content;
203
+ max-width: 100%;
204
+ margin-top: 6px;
205
+ padding: 2px 6px;
206
+ border-radius: 4px;
207
+ background: #ffffffb3;
208
+ color: var(--muted);
209
+ overflow-wrap: anywhere;
210
+ }
211
+ @media (prefers-reduced-motion: no-preference) {
212
+ .storage-test-spinner { animation: storage-test-spin .9s linear infinite; }
213
+ }
214
+ @keyframes storage-test-spin { to { transform: rotate(360deg); } }
215
+ .project-config-error { margin: 0; color: #b91c1c; }
51
216
  .content { max-width: 1530px; margin: 0 auto; padding: 32px 34px 44px; }
52
217
  .heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
53
218
  h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.04em; }
@@ -58,13 +223,15 @@ h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.04em; }
58
223
  .secondary { color: #434b62; background: #fff; border: 1px solid var(--line); }
59
224
  .secondary:hover:not(:disabled) { border-color: #a9a5d9; }
60
225
  .tools { display: flex; flex-direction: column; gap: 13px; margin: 22px 0 20px; }
61
- .character-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
226
+ .character-toolbar { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
227
+ .character-selection-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-inline-start: auto; }
228
+ .character-selection-actions [role="status"] { color: var(--muted); font-size: 13px; }
229
+ .character-selection-actions button[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-bg); }
62
230
  .character-toolbar-actions {
63
231
  display: flex;
64
232
  align-items: center;
65
233
  min-height: 41px;
66
234
  max-width: 100%;
67
- margin-left: auto;
68
235
  padding: 4px;
69
236
  border: 1px solid var(--line);
70
237
  border-radius: 10px;
@@ -106,6 +273,32 @@ h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.04em; }
106
273
  .card { min-width: 0; overflow: hidden; border: 1px solid var(--line); background: #fff; border-radius: 12px; box-shadow: 0 2px 3px #252a3807; }
107
274
  .card:hover { border-color: #c9c4ef; }
108
275
  .card-preview { position: relative; }
276
+ .card.character-card-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
277
+ .character-selection-checkbox.el-checkbox {
278
+ --el-checkbox-input-width: 20px;
279
+ --el-checkbox-input-height: 20px;
280
+ --el-checkbox-border-radius: 50%;
281
+ --el-checkbox-bg-color: rgb(31 41 55 / 55%);
282
+ --el-checkbox-input-border: 1px solid rgb(255 255 255 / 90%);
283
+ --el-checkbox-input-border-color-hover: #fff;
284
+ position: absolute;
285
+ z-index: 1;
286
+ inset-block-start: 6px;
287
+ inset-inline-end: 6px;
288
+ display: grid;
289
+ place-items: center;
290
+ width: 32px;
291
+ height: 32px;
292
+ margin: 0;
293
+ }
294
+ .character-selection-checkbox .el-checkbox__inner::after {
295
+ width: 4px;
296
+ height: 8px;
297
+ }
298
+ .character-selection-checkbox .el-checkbox__original:focus-visible + .el-checkbox__inner {
299
+ outline: 2px solid #fff;
300
+ outline-offset: 2px;
301
+ }
109
302
  .cover { display: grid; place-items: center; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; border: 0; padding: 0; background: #eeedf6; }
110
303
  .cover img { display: block; width: 100%; height: 100%; object-fit: contain; }
111
304
  .preview-toggle {
@@ -148,8 +341,23 @@ h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.04em; }
148
341
  .error { color: #9e263b; background: #fdf0f3; }
149
342
  .dialog { width: min(800px, calc(100vw - 28px)); max-height: calc(100dvh - 36px); padding: 0; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 25px 100px #20203c44; color: inherit; }
150
343
  .asset-detail-dialog[open] { display: flex; flex-direction: column; height: min(820px, calc(100dvh - 36px)); overflow: hidden; }
151
- .asset-detail-dialog > .dialog-head, .asset-detail-dialog > .tabs { flex: none; }
344
+ .asset-detail-dialog > .dialog-head, .asset-detail-dialog > .tabs,
345
+ .audio-detail-dialog > .dialog-head, .dialog-form > .dialog-head { flex: none; }
152
346
  .asset-detail-dialog > .dialog-body { flex: 1; min-height: 0; overflow: auto; scrollbar-gutter: stable; }
347
+ .audio-detail-dialog[open], .small-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
348
+ .dialog-form { display: flex; flex-direction: column; min-height: 0; }
349
+ .audio-detail-dialog > .dialog-body, .dialog-form > .dialog-body { min-height: 0; overflow: auto; }
350
+ .dialog-footer {
351
+ display: flex;
352
+ flex: none;
353
+ justify-content: flex-end;
354
+ align-items: center;
355
+ gap: 8px;
356
+ padding: 12px 22px;
357
+ border-top: 1px solid var(--line);
358
+ background: #fff;
359
+ }
360
+ .dialog-footer > button { min-width: 80px; }
153
361
  .dialog::backdrop { background: #19182f88; }
154
362
  .small-dialog { width: min(430px, calc(100vw - 28px)); }
155
363
  .dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
@@ -157,10 +365,9 @@ h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.04em; }
157
365
  .dialog-head .card-tags { margin-top: 4px; }
158
366
  .dialog-head .card-tags:empty { display: none; }
159
367
  .dialog-actions, .media-actions { display: flex; align-items: center; gap: 8px; }
160
- .create-actions { justify-content: flex-end; }
161
- .overview-actions { justify-content: space-between; align-items: center; flex-wrap: wrap; }
162
- .overview-actions .overview-save-button { margin-left: auto; }
163
- .overview-save-button, .overview-actions .overview-delete-button { min-width: 96px; }
368
+ .overview-actions { flex-wrap: wrap; }
369
+ .overview-actions:not(:has(.codex-sync-link)) .overview-delete-button { margin-inline-end: auto; }
370
+ .overview-actions .codex-sync-link { height: 38px; text-decoration: none; margin-inline-end: auto; }
164
371
  .overview-actions :is(.overview-save-button, .overview-delete-button) { height: 38px; }
165
372
  .overview-actions .overview-delete-button { border-radius: 8px; font-size: 13px; font-weight: 650; }
166
373
  .icon-button { display: grid; place-items: center; color: var(--muted); background: #f4f4f9; border: 0; border-radius: 7px; width: 34px; height: 34px; }
@@ -183,7 +390,7 @@ h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.04em; }
183
390
  .asset-story-panel textarea { display: block; width: 100%; height: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; resize: none; font-family: ui-monospace, monospace; }
184
391
  .edit-form { display: grid; gap: 13px; }
185
392
  .field { display: grid; gap: 6px; margin-bottom: 10px; color: #4b5267; font-size: 13px; }
186
- .field input, .field textarea { min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; color: #262a38; background: #fff; }
393
+ .field input:not(.el-select__input), .field textarea { min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; color: #262a38; background: #fff; }
187
394
  .field textarea { resize: vertical; }
188
395
  .asset-history a { color: var(--accent); }
189
396
  .asset-history { border: 1px solid var(--line); border-radius: 10px; }
@@ -19,8 +19,6 @@ export default {
19
19
 
20
20
  <style scoped>
21
21
  .asset-tag-editor.el-input-tag {
22
- --el-color-primary: var(--accent);
23
- --el-color-primary-light-9: var(--accent-bg);
24
22
  --el-input-tag-input-focus-border-color: var(--focus-border);
25
23
  }
26
24
  </style>