dsh-knowledge-library 0.0.0-stage → 0.1.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/CHANGELOG.md +22 -0
- package/LICENSE +21 -0
- package/README.md +231 -2
- package/cordis.patch.yml +3 -0
- package/dist/client.d.ts +3 -0
- package/dist/client.js +929 -0
- package/dist/core/extract.d.ts +9 -0
- package/dist/core/extract.js +105 -0
- package/dist/core/fetch.d.ts +10 -0
- package/dist/core/fetch.js +105 -0
- package/dist/core/jobs.d.ts +30 -0
- package/dist/core/jobs.js +96 -0
- package/dist/core/library.d.ts +61 -0
- package/dist/core/library.js +386 -0
- package/dist/http.d.ts +6 -0
- package/dist/http.js +157 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +35 -0
- package/dist/public/app.css +261 -0
- package/dist/public/app.js +56 -0
- package/dist/public/index.html +1 -0
- package/dist/standalone.d.ts +1 -0
- package/dist/standalone.js +38 -0
- package/dist/tools.d.ts +4 -0
- package/dist/tools.js +62 -0
- package/dist/types.d.ts +78 -0
- package/dist/types.js +1 -0
- package/dist/ui/App.d.ts +2 -0
- package/dist/ui/App.js +223 -0
- package/dist/ui/icons.d.ts +8 -0
- package/dist/ui/icons.js +25 -0
- package/dist/ui/main.d.ts +1 -0
- package/dist/ui/main.js +4 -0
- package/package.json +94 -4
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
/* Harness owns the palette and font. Fallbacks are for the standalone preview. */
|
|
2
|
+
.kl-app {
|
|
3
|
+
--kl-bg: var(--dsw-alias-bg-base, light-dark(#fff, #191a1e));
|
|
4
|
+
--kl-panel: var(--dsw-alias-bg-layer-1, light-dark(#fff, #24252a));
|
|
5
|
+
--kl-sidebar: var(--dsw-specific-sidebar-fill, light-dark(#f8f9fa, #202126));
|
|
6
|
+
--kl-ink: var(--dsw-alias-label-primary, light-dark(#18191d, #f3f4f6));
|
|
7
|
+
--kl-secondary: var(--dsw-alias-label-secondary, light-dark(#555963, #c0c2c9));
|
|
8
|
+
--kl-muted: var(--dsw-alias-label-tertiary, light-dark(#858991, #979ba5));
|
|
9
|
+
--kl-caption: var(--dsw-alias-label-caption, light-dark(#a3a7b0, #737781));
|
|
10
|
+
--kl-line: var(--dsw-alias-border-l3, light-dark(#0000001f, #ffffff29));
|
|
11
|
+
--kl-divider: var(--dsw-alias-border-l1, light-dark(#0000000a, #ffffff0f));
|
|
12
|
+
--kl-hover: var(--dsw-alias-interactive-bg-hover, light-dark(#2631480f, #ffffff14));
|
|
13
|
+
--kl-active: var(--dsw-alias-interactive-bg-active, light-dark(#2631481a, #ffffff24));
|
|
14
|
+
--kl-primary: var(--dsw-alias-button-primary-fill, light-dark(#14151a, #f3f4f6));
|
|
15
|
+
--kl-primary-hover: var(--dsw-alias-button-primary-hover, light-dark(#373941, #dfe1e6));
|
|
16
|
+
--kl-on-primary: var(--dsw-alias-label-primary-foreground, light-dark(#fff, #14151a));
|
|
17
|
+
--kl-focus: var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary, #4d6bfe));
|
|
18
|
+
--kl-link: var(--dsw-alias-link, light-dark(#4162e7, #91a2ff));
|
|
19
|
+
--kl-success: var(--dsw-alias-state-success-primary, #36a774);
|
|
20
|
+
--kl-error: var(--dsw-alias-state-error-primary, light-dark(#c63e43, #ff8589));
|
|
21
|
+
--kl-warn: var(--dsw-alias-state-warn-label, light-dark(#926316, #d5ad62));
|
|
22
|
+
--kl-radius: var(--dsw-radius-md, 12px);
|
|
23
|
+
--kl-radius-lg: var(--dsw-radius-lg, 16px);
|
|
24
|
+
--kl-gutter: clamp(24px, 4cqi, 48px);
|
|
25
|
+
font-family: var(--dsw-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif);
|
|
26
|
+
font-size: 14px;
|
|
27
|
+
line-height: 1.6;
|
|
28
|
+
font-synthesis: none;
|
|
29
|
+
color: var(--kl-ink);
|
|
30
|
+
background: var(--kl-bg);
|
|
31
|
+
width: 100%;
|
|
32
|
+
height: 100%;
|
|
33
|
+
min-width: 0;
|
|
34
|
+
min-height: 0;
|
|
35
|
+
display: flex;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
container: knowledge-library / inline-size;
|
|
38
|
+
}
|
|
39
|
+
.kl-app, .kl-app * { box-sizing: border-box; }
|
|
40
|
+
.kl-preview { margin: 0; color-scheme: light dark; }
|
|
41
|
+
.kl-preview > #root > .kl-app { height: 100dvh; }
|
|
42
|
+
.kl-app button, .kl-app input, .kl-app textarea, .kl-app select { font: inherit; color: inherit; }
|
|
43
|
+
.kl-app button, .kl-app a { -webkit-tap-highlight-color: transparent; }
|
|
44
|
+
.kl-app button { cursor: pointer; transition: background-color .12s, color .12s, border-color .12s; }
|
|
45
|
+
.kl-app button:disabled { opacity: .5; cursor: not-allowed; }
|
|
46
|
+
.kl-app :is(button, a, input, textarea, select):focus-visible { outline: 2px solid var(--kl-focus); outline-offset: 2px; }
|
|
47
|
+
.kl-app input::placeholder, .kl-app textarea::placeholder { color: var(--kl-caption); }
|
|
48
|
+
.kl-app svg { flex-shrink: 0; }
|
|
49
|
+
.kl-app :is(time, small) { font-variant-numeric: tabular-nums; }
|
|
50
|
+
.kl-app :is(.kl-list, .kl-nav, .kl-detail, .kl-dialog) {
|
|
51
|
+
scrollbar-width: thin;
|
|
52
|
+
scrollbar-color: var(--dsw-alias-scrollbar-bg-l2, #8885) transparent;
|
|
53
|
+
overscroll-behavior: contain;
|
|
54
|
+
}
|
|
55
|
+
.kl-workspace { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
|
|
56
|
+
.kl-primary, .kl-secondary {
|
|
57
|
+
min-height: 32px; border-radius: var(--kl-radius-lg); padding: 5px 12px; font-size: 13px !important;
|
|
58
|
+
display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
|
|
59
|
+
}
|
|
60
|
+
.kl-app .kl-primary { color: var(--kl-on-primary); background: var(--kl-primary); border: 1px solid transparent; }
|
|
61
|
+
.kl-app .kl-primary:hover:not(:disabled) { background: var(--kl-primary-hover); }
|
|
62
|
+
.kl-secondary { background: transparent; border: .5px solid var(--kl-line); }
|
|
63
|
+
.kl-secondary:hover:not(:disabled) { background: var(--kl-hover); }
|
|
64
|
+
.kl-app .kl-icon-button {
|
|
65
|
+
width: 32px; height: 32px; padding: 6px; border: 0; border-radius: 8px; flex: none;
|
|
66
|
+
display: inline-flex; align-items: center; justify-content: center; color: var(--kl-muted); background: transparent;
|
|
67
|
+
}
|
|
68
|
+
.kl-app .kl-icon-button:hover { color: var(--kl-ink); background: var(--kl-hover); }
|
|
69
|
+
.kl-header { padding: 28px var(--kl-gutter) 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
|
|
70
|
+
[data-platform="darwin"] .kl-header { padding-top: calc(28px + var(--dsh-frame-top-clearance, 0px)); }
|
|
71
|
+
.kl-header h1 { margin: 0; min-width: 0; font-size: 20px; line-height: 28px; font-weight: 500; overflow-wrap: anywhere; }
|
|
72
|
+
.kl-header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
|
|
73
|
+
.kl-navigation { padding: 0 var(--kl-gutter) 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
|
|
74
|
+
.kl-navigation nav { display: flex; flex-wrap: wrap; gap: 8px 12px; }
|
|
75
|
+
.kl-navigation button { border: 0; border-radius: 14px; background: transparent; color: var(--kl-muted); padding: 3px 10px; min-height: 28px; }
|
|
76
|
+
.kl-navigation button:hover, .kl-navigation button[aria-pressed="true"], .kl-navigation button[aria-expanded="true"] { background: var(--kl-hover); color: var(--kl-ink); }
|
|
77
|
+
.kl-navigation .kl-directory-toggle { display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
|
|
78
|
+
.kl-toolbar { padding: 0 var(--kl-gutter) 16px; display: flex; gap: 12px; align-items: center; }
|
|
79
|
+
.kl-search { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; height: 36px; border: .5px solid var(--kl-line); border-radius: var(--kl-radius); padding: 0 10px; color: var(--kl-caption); }
|
|
80
|
+
.kl-search > svg { width: 16px; height: 16px; }
|
|
81
|
+
.kl-search input { width: 0; min-width: 0; flex: 1; border: 0; padding: 0; height: 100%; background: transparent; color: var(--kl-ink); font-size: 14px; }
|
|
82
|
+
.kl-app .kl-search input:focus-visible { outline: none; }
|
|
83
|
+
.kl-search:focus-within { border-color: var(--kl-focus); }
|
|
84
|
+
.kl-search kbd { color: var(--kl-caption); border: .5px solid var(--kl-line); border-radius: 4px; padding: 0 4px; font-family: inherit; font-size: 10px; line-height: 18px; white-space: nowrap; }
|
|
85
|
+
.kl-app .kl-job-button { border: 0; border-radius: 8px; background: transparent; display: flex; align-items: center; gap: 6px; color: var(--kl-muted); padding: 6px; min-height: 32px; white-space: nowrap; font-size: 13px; }
|
|
86
|
+
.kl-job-button:hover { background: var(--kl-hover); }
|
|
87
|
+
.kl-job-button i { width: 5px; height: 5px; border-radius: 50%; corner-shape: round; background: var(--kl-error); }
|
|
88
|
+
.kl-app .kl-job-button.has-jobs { color: var(--kl-link); }
|
|
89
|
+
.kl-filterbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 var(--kl-gutter) 12px; color: var(--kl-muted); font-size: 12px; }
|
|
90
|
+
.kl-filterbar > span { min-width: 0; overflow-wrap: anywhere; }
|
|
91
|
+
.kl-filterbar b { font-weight: 400; }
|
|
92
|
+
.kl-filterbar > div { display: flex; align-items: center; gap: 16px; flex: none; }
|
|
93
|
+
.kl-filterbar select { background: var(--kl-bg); color: var(--kl-muted); border: 0; border-radius: 6px; padding: 3px; max-width: 110px; font-size: 12px; }
|
|
94
|
+
.kl-body { position: relative; display: flex; flex: 1; min-height: 0; overflow: hidden; }
|
|
95
|
+
.kl-list { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; padding: 0 calc(var(--kl-gutter) - 8px) 24px; }
|
|
96
|
+
.kl-body.with-detail .kl-list { flex: 0 0 38%; padding: 0 16px 24px calc(var(--kl-gutter) - 8px); }
|
|
97
|
+
.kl-item { width: 100%; display: block; text-align: left; padding: 14px 12px; margin-bottom: 2px; border: 0; border-radius: var(--kl-radius); background: transparent; }
|
|
98
|
+
.kl-item:hover, .kl-item.selected { background: var(--kl-hover); }
|
|
99
|
+
.kl-item-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 5px; }
|
|
100
|
+
.kl-type { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; color: var(--kl-muted); }
|
|
101
|
+
.kl-item time { color: var(--kl-muted); font-size: 12px; }
|
|
102
|
+
.kl-item h2 { margin: 0 0 5px; font-size: 14px; line-height: 23px; font-weight: 500; overflow-wrap: anywhere; }
|
|
103
|
+
.kl-item > p { margin: 0 0 10px; font-size: 13px; line-height: 21px; color: var(--kl-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
|
|
104
|
+
.kl-item-bottom { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
|
|
105
|
+
.kl-category { display: flex; align-items: center; gap: 4px; max-width: 60%; overflow: hidden; white-space: nowrap; color: var(--kl-muted); font-size: 11px; }
|
|
106
|
+
.kl-chip { padding: 1px 6px; border-radius: 5px; background: var(--kl-hover); color: var(--kl-secondary); font-size: 11px; max-width: 100%; overflow-wrap: anywhere; }
|
|
107
|
+
.kl-item-bottom > svg { margin-left: auto; color: var(--kl-caption); }
|
|
108
|
+
.kl-stored { color: var(--kl-warn); font-size: 11px; }
|
|
109
|
+
.kl-load-more { width: 100%; padding: 16px; border: 0; border-radius: 8px; background: transparent; color: var(--kl-muted); font-size: 13px; }
|
|
110
|
+
.kl-load-more:hover { background: var(--kl-hover); }
|
|
111
|
+
|
|
112
|
+
/* An optional directory leaves the default view as uncluttered as native pages. */
|
|
113
|
+
.kl-nav { width: 200px; max-width: 80%; flex: none; padding: 12px; margin-left: var(--kl-gutter); border-right: .5px solid var(--kl-line); background: var(--kl-bg); overflow-y: auto; display: flex; flex-direction: column; }
|
|
114
|
+
.kl-directory-title { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 500; }
|
|
115
|
+
.kl-nav-section { margin-top: 20px; }
|
|
116
|
+
.kl-nav-label { padding: 0 8px 8px; color: var(--kl-muted); font-size: 12px; }
|
|
117
|
+
.kl-nav-row { width: 100%; display: flex; align-items: center; gap: 8px; background: transparent; border: 0; border-radius: 8px; padding: 8px; text-align: left; min-width: 0; font-size: 13px !important; }
|
|
118
|
+
.kl-nav-row > span:not(.kl-collection-dot) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
119
|
+
.kl-nav-row > svg { color: var(--kl-muted); }
|
|
120
|
+
.kl-nav-row small { margin-left: auto; color: var(--kl-muted); font-size: 11px; }
|
|
121
|
+
.kl-nav button:hover, .kl-nav button[aria-pressed="true"] { background: var(--kl-hover); }
|
|
122
|
+
.kl-nav-hint { color: var(--kl-muted); font-size: 12px; margin: 0; padding: 0 8px; }
|
|
123
|
+
.kl-collection-dot { width: 6px; height: 6px; border-radius: 50%; corner-shape: round; border: 1px solid var(--kl-muted); flex: none; margin: 0 5px; }
|
|
124
|
+
.kl-tag-cloud { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 4px; }
|
|
125
|
+
.kl-tag-cloud button { background: transparent; color: var(--kl-muted); border: 0; border-radius: 6px; padding: 3px 6px; font-size: 12px; max-width: 100%; overflow-wrap: anywhere; }
|
|
126
|
+
.kl-nav-bottom { display: flex; align-items: center; gap: 6px; margin-top: auto; padding: 28px 8px 8px; color: var(--kl-muted); font-size: 11px; }
|
|
127
|
+
.kl-live-dot { width: 5px; height: 5px; border-radius: 50%; corner-shape: round; background: var(--kl-success); display: inline-block; flex-shrink: 0; }
|
|
128
|
+
.kl-detail { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; border-left: .5px solid var(--kl-line); background: var(--kl-bg); }
|
|
129
|
+
.kl-detail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 20px; border-bottom: .5px solid var(--kl-divider); position: sticky; top: 0; background: var(--kl-bg); z-index: 1; }
|
|
130
|
+
.kl-detail-toolbar > div { display: flex; align-items: center; gap: 4px; }
|
|
131
|
+
.kl-detail-toolbar button, .kl-detail-toolbar a { display: flex; align-items: center; gap: 5px; background: transparent; border: 0; border-radius: 8px; min-height: 32px; padding: 6px 8px; color: var(--kl-muted); text-decoration: none; font-size: 12px; white-space: nowrap; }
|
|
132
|
+
.kl-detail-toolbar :is(button, a):hover { color: var(--kl-ink); background: var(--kl-hover); }
|
|
133
|
+
.kl-detail article { max-width: 800px; margin: 0 auto; padding: 24px 28px 40px; }
|
|
134
|
+
.kl-detail-kicker { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--kl-muted); overflow-wrap: anywhere; }
|
|
135
|
+
.kl-detail-kicker span + span::before { content: "/"; margin-right: 8px; color: var(--kl-caption); }
|
|
136
|
+
.kl-detail article > h2 { margin: 10px 0 12px; font-size: 20px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
|
|
137
|
+
.kl-source { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--kl-muted); font-size: 12px; overflow-wrap: anywhere; }
|
|
138
|
+
.kl-source a { color: var(--kl-link); display: flex; align-items: center; gap: 4px; text-decoration: none; }
|
|
139
|
+
.kl-source a:hover { text-decoration: underline; }
|
|
140
|
+
.kl-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
|
|
141
|
+
.kl-source-note { border-left: 2px solid var(--kl-line); padding: 10px 12px; font-size: 13px; line-height: 1.7; color: var(--kl-secondary); background: var(--kl-sidebar); margin: 20px 0; overflow-wrap: anywhere; }
|
|
142
|
+
.kl-content { margin-top: 24px; }
|
|
143
|
+
.kl-segment { margin-bottom: 20px; scroll-margin-top: 64px; }
|
|
144
|
+
.kl-segment.kl-cited { background: var(--kl-hover); box-shadow: 0 0 0 8px var(--kl-hover); border-radius: 4px; }
|
|
145
|
+
.kl-segment-line { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 11px; color: var(--kl-muted); font-variant-numeric: tabular-nums; }
|
|
146
|
+
.kl-segment-line > span { margin-right: auto; }
|
|
147
|
+
.kl-segment-line button { display: grid; place-items: center; width: 26px; height: 26px; background: transparent; border: 0; border-radius: 6px; color: var(--kl-muted); opacity: .6; padding: 4px; }
|
|
148
|
+
.kl-segment:hover button, .kl-segment:focus-within button { opacity: 1; }
|
|
149
|
+
.kl-segment-line button:hover { background: var(--kl-hover); }
|
|
150
|
+
.kl-segment p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--dsh-content-font-size, 14px); line-height: 1.8; margin: 0; color: var(--kl-ink); }
|
|
151
|
+
.kl-segment h3 { font-size: calc(16px + var(--dsh-content-font-delta, 0px)); line-height: 1.7; margin: 0; font-weight: 500; overflow-wrap: anywhere; }
|
|
152
|
+
.kl-detail-footer { margin-top: 32px; padding-top: 16px; border-top: .5px solid var(--kl-line); font-size: 11px; color: var(--kl-muted); }
|
|
153
|
+
.kl-detail-footer > div { display: flex; gap: 6px; align-items: center; }
|
|
154
|
+
.kl-detail-footer a { display: flex; align-items: center; gap: 6px; color: var(--kl-link); text-decoration: none; margin: 12px 0; }
|
|
155
|
+
.kl-detail-footer code { display: block; font-size: 10px; margin-top: 12px; overflow-wrap: anywhere; }
|
|
156
|
+
.kl-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 20px; text-align: center; color: var(--kl-muted); }
|
|
157
|
+
.kl-empty > svg { color: var(--kl-caption); margin-bottom: 4px; }
|
|
158
|
+
.kl-empty h2 { font-size: 14px; font-weight: 400; line-height: 1.6; margin: 0; color: var(--kl-muted); }
|
|
159
|
+
.kl-empty p { font-size: 13px; margin: 0; }
|
|
160
|
+
.kl-empty .kl-secondary { margin-top: 12px; color: var(--kl-ink); }
|
|
161
|
+
.kl-notice { display: flex; gap: 10px; padding: 14px; background: var(--kl-sidebar); margin-top: 20px; border-radius: 10px; color: var(--kl-secondary); }
|
|
162
|
+
.kl-notice strong { font-size: 13px; font-weight: 500; }
|
|
163
|
+
.kl-notice p { font-size: 12px; line-height: 1.7; margin: 4px 0 0; }
|
|
164
|
+
.kl-references { background: var(--kl-sidebar); padding: 14px; border-radius: 10px; margin-top: 24px; }
|
|
165
|
+
.kl-references h3 { font-size: 13px; font-weight: 500; margin: 0 0 8px; }
|
|
166
|
+
.kl-references button { display: flex; gap: 7px; align-items: center; border: 0; background: transparent; color: var(--kl-link); border-radius: 6px; font-size: 12px; padding: 6px; width: 100%; text-align: left; }
|
|
167
|
+
.kl-references button:hover { background: var(--kl-hover); }
|
|
168
|
+
.kl-references button > svg:last-child { margin-left: auto; }
|
|
169
|
+
.kl-references button > span { min-width: 0; overflow-wrap: anywhere; }
|
|
170
|
+
|
|
171
|
+
/* Dialogs remain descendants of .kl-app, so they inherit the same theme. */
|
|
172
|
+
.kl-modal-backdrop { position: fixed; inset: 0; background: var(--dsw-alias-bg-mask-1, #0006); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; }
|
|
173
|
+
.kl-dialog { background: var(--kl-panel); color: var(--kl-ink); width: 580px; max-width: 100%; max-height: calc(100dvh - 48px); overflow: auto; border: .5px solid var(--kl-line); border-radius: var(--kl-radius-lg); box-shadow: var(--dsw-elevation-prominent, 0 16px 64px #0003); animation: kl-enter .15s ease-out; }
|
|
174
|
+
.kl-dialog > header { padding: 24px 24px 18px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
|
|
175
|
+
.kl-dialog > header h2 { margin: 0 0 6px; font-size: 18px; line-height: 26px; font-weight: 500; }
|
|
176
|
+
.kl-dialog > header p { margin: 0; color: var(--kl-muted); font-size: 12px; line-height: 1.7; }
|
|
177
|
+
.kl-dialog > header > button { border: 0; border-radius: 8px; background: transparent; color: var(--kl-muted); padding: 4px; display: flex; }
|
|
178
|
+
.kl-dialog > header > button:hover { background: var(--kl-hover); }
|
|
179
|
+
.kl-editor { padding: 0 24px; }
|
|
180
|
+
.kl-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
|
|
181
|
+
.kl-tabs button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; background: transparent; border: 0; color: var(--kl-muted); border-radius: 14px; min-height: 32px; padding: 5px 8px; font-size: 13px; }
|
|
182
|
+
.kl-tabs button:hover, .kl-tabs button.active { background: var(--kl-hover); color: var(--kl-ink); }
|
|
183
|
+
.kl-editor label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--kl-secondary); margin-bottom: 16px; position: relative; min-width: 0; }
|
|
184
|
+
.kl-editor label > em { position: absolute; right: 0; top: 0; font-size: 11px; color: var(--kl-muted); font-style: normal; }
|
|
185
|
+
.kl-editor input, .kl-editor textarea { width: 100%; background: transparent; border: .5px solid var(--kl-line); border-radius: 10px; padding: 9px 11px; color: var(--kl-ink); font-size: 13px; }
|
|
186
|
+
.kl-editor textarea { resize: vertical; line-height: 1.7; min-height: 120px; max-height: 280px; }
|
|
187
|
+
.kl-editor label > small { color: var(--kl-muted); font-size: 11px; line-height: 1.7; }
|
|
188
|
+
.kl-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
|
|
189
|
+
.kl-editor footer { display: flex; align-items: center; gap: 8px; margin: 20px -24px 0; padding: 16px 24px; border-top: .5px solid var(--kl-divider); }
|
|
190
|
+
.kl-editor footer > span { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--kl-muted); margin-right: auto; }
|
|
191
|
+
.kl-editor .kl-upload { align-items: center; gap: 10px; border: 1px dashed var(--kl-line); background: var(--kl-sidebar); padding: 22px 16px; border-radius: var(--kl-radius); text-align: center; }
|
|
192
|
+
.kl-upload > strong { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
|
|
193
|
+
.kl-upload > span { font-size: 11px; color: var(--kl-muted); }
|
|
194
|
+
.kl-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
|
|
195
|
+
.kl-upload:focus-within { outline: 2px solid var(--kl-focus); outline-offset: 2px; }
|
|
196
|
+
.kl-citation-preview { display: flex; gap: 8px; align-items: center; background: var(--kl-sidebar); font-size: 12px; color: var(--kl-secondary); padding: 10px; border-radius: 8px; margin-bottom: 18px; overflow-wrap: anywhere; }
|
|
197
|
+
.kl-jobs, .kl-info { padding: 0 24px 24px; }
|
|
198
|
+
.kl-muted { color: var(--kl-muted); font-size: 13px; }
|
|
199
|
+
.kl-job { border-bottom: .5px solid var(--kl-line); padding: 0 0 18px; margin-bottom: 18px; }
|
|
200
|
+
.kl-job:last-child { margin-bottom: 0; }
|
|
201
|
+
.kl-job > div { display: flex; justify-content: space-between; align-items: center; }
|
|
202
|
+
.kl-job time { font-size: 11px; color: var(--kl-muted); }
|
|
203
|
+
.kl-job > strong { display: block; overflow-wrap: anywhere; font-size: 13px; font-weight: 400; margin: 12px 0; }
|
|
204
|
+
.kl-job > p { font-size: 12px; color: var(--kl-error); line-height: 1.7; }
|
|
205
|
+
.kl-job button { display: flex; align-items: center; gap: 4px; color: var(--kl-link); font-size: 12px; border: 0; background: transparent; border-radius: 6px; padding: 4px; }
|
|
206
|
+
.kl-job button:hover { background: var(--kl-hover); }
|
|
207
|
+
.kl-job-status { font-size: 11px; border-radius: 6px; padding: 3px 7px; background: var(--kl-hover); color: var(--kl-secondary); }
|
|
208
|
+
.kl-job-status.failed { color: var(--kl-error); }
|
|
209
|
+
.kl-job-status.running { color: var(--kl-link); }
|
|
210
|
+
.kl-info label { display: block; font-size: 12px; color: var(--kl-muted); margin-bottom: 8px; }
|
|
211
|
+
.kl-info code { display: block; overflow-wrap: anywhere; background: var(--kl-sidebar); padding: 12px; border-radius: 8px; font-size: 12px; }
|
|
212
|
+
.kl-info p { font-size: 13px; line-height: 1.8; color: var(--kl-secondary); margin: 16px 0; }
|
|
213
|
+
.kl-error, .kl-form-error { background: var(--kl-sidebar); color: var(--kl-error); font-size: 13px; line-height: 1.7; padding: 10px 12px; border-radius: 8px; overflow-wrap: anywhere; }
|
|
214
|
+
.kl-error { display: flex; align-items: center; gap: 12px; margin: 0 var(--kl-gutter) 14px; }
|
|
215
|
+
.kl-error button { margin-left: auto; border: 0; background: transparent; color: inherit; display: flex; padding: 4px; }
|
|
216
|
+
.kl-form-error { margin-bottom: 14px; }
|
|
217
|
+
.kl-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 32px); background: var(--dsw-alias-toast-bg, #303136); color: var(--dsw-alias-toast-label, #fff); padding: 10px 16px; display: flex; gap: 8px; align-items: center; border-radius: 12px; box-shadow: 0 4px 20px #0002; font-size: 13px; z-index: 1100; }
|
|
218
|
+
.kl-spinner { height: 20px; width: 20px; border: 2px solid var(--kl-line); border-top-color: var(--kl-muted); border-radius: 50%; corner-shape: round; animation: kl-spin 1s linear infinite; }
|
|
219
|
+
@keyframes kl-spin { to { transform: rotate(360deg); } }
|
|
220
|
+
@keyframes kl-enter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
|
|
221
|
+
|
|
222
|
+
/* Respond to the plugin's available space, including the host's side panels. */
|
|
223
|
+
@container knowledge-library (max-width: 900px) {
|
|
224
|
+
.kl-body.with-detail .kl-list { display: none; }
|
|
225
|
+
.kl-detail { border-left: 0; }
|
|
226
|
+
.kl-detail article { padding: 24px var(--kl-gutter) 36px; }
|
|
227
|
+
.kl-detail-toolbar { padding: 8px calc(var(--kl-gutter) - 8px); }
|
|
228
|
+
.kl-nav { position: absolute; top: 0; bottom: 0; left: 0; z-index: 2; margin: 0; width: 240px; border-top: .5px solid var(--kl-line); box-shadow: 8px 0 24px #0001; }
|
|
229
|
+
}
|
|
230
|
+
@container knowledge-library (max-width: 520px) {
|
|
231
|
+
.kl-header { padding: 20px 20px 18px; flex-wrap: wrap; gap: 12px; }
|
|
232
|
+
.kl-header h1 { font-size: 20px; }
|
|
233
|
+
.kl-header-actions { margin-left: auto; }
|
|
234
|
+
.kl-navigation { padding: 0 20px 12px; flex-wrap: wrap; gap: 8px; }
|
|
235
|
+
.kl-navigation nav { gap: 4px; }
|
|
236
|
+
.kl-navigation .kl-directory-toggle { margin-left: auto; }
|
|
237
|
+
.kl-toolbar { padding: 0 20px 12px; gap: 4px; }
|
|
238
|
+
.kl-search kbd, .kl-job-button span, .kl-sort-label { display: none; }
|
|
239
|
+
.kl-filterbar { padding: 0 20px 10px; }
|
|
240
|
+
.kl-list { padding: 0 12px 16px; }
|
|
241
|
+
.kl-empty { padding: 40px 12px; }
|
|
242
|
+
.kl-detail article { padding: 20px; }
|
|
243
|
+
.kl-detail-toolbar { padding: 8px 12px; }
|
|
244
|
+
.kl-error { margin: 0 20px 12px; }
|
|
245
|
+
}
|
|
246
|
+
/* Fixed dialogs use viewport width even when the host panel is narrow. */
|
|
247
|
+
@media (max-width: 600px) {
|
|
248
|
+
.kl-modal-backdrop { padding: 12px; }
|
|
249
|
+
.kl-dialog { max-height: calc(100dvh - 24px); }
|
|
250
|
+
.kl-dialog > header { padding: 20px 18px 16px; }
|
|
251
|
+
.kl-editor { padding: 0 18px; }
|
|
252
|
+
.kl-editor footer { margin-left: -18px; margin-right: -18px; padding: 14px 18px; }
|
|
253
|
+
.kl-editor footer > span { font-size: 10px; }
|
|
254
|
+
.kl-tabs { gap: 4px; }
|
|
255
|
+
.kl-tabs button { padding: 5px; font-size: 12px; }
|
|
256
|
+
.kl-form-grid { gap: 12px; }
|
|
257
|
+
.kl-jobs, .kl-info { padding: 0 18px 20px; }
|
|
258
|
+
}
|
|
259
|
+
@media (prefers-reduced-motion: reduce) {
|
|
260
|
+
.kl-app * { animation: none !important; transition: none !important; }
|
|
261
|
+
}
|