@open330/kiwimu 0.7.1 → 1.1.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/README.md +189 -62
- package/package.json +1 -1
- package/src/build/renderer.ts +273 -32
- package/src/build/static/dynamic-qa.js +423 -0
- package/src/build/static/edit-page.js +58 -0
- package/src/build/static/peek-panel.css +201 -0
- package/src/build/static/peek-panel.js +470 -0
- package/src/build/static/search.js +30 -15
- package/src/build/static/style.css +821 -6
- package/src/build/templates.ts +757 -49
- package/src/config.ts +41 -3
- package/src/demo/sample-data.ts +75 -8
- package/src/demo/setup.ts +26 -7
- package/src/expand/llm.ts +2 -2
- package/src/index.ts +497 -64
- package/src/ingest/docx.ts +1 -1
- package/src/ingest/markdown.ts +21 -0
- package/src/ingest/pdf.ts +4 -2
- package/src/llm-client.ts +63 -69
- package/src/pipeline/citations.ts +107 -0
- package/src/pipeline/llm-chunker.ts +281 -128
- package/src/pipeline/standardizer.ts +41 -0
- package/src/server.ts +466 -33
- package/src/services/dynamic-qa.ts +190 -0
- package/src/services/embedding.ts +122 -0
- package/src/services/index-generator.ts +185 -0
- package/src/services/ingest.ts +84 -26
- package/src/services/lint.ts +249 -0
- package/src/services/promote.ts +150 -0
- package/src/store.test.ts +11 -0
- package/src/store.ts +652 -15
- package/src/utils.ts +30 -0
|
@@ -238,7 +238,8 @@ a:hover {
|
|
|
238
238
|
flex: 1;
|
|
239
239
|
margin-left: var(--sidebar-width);
|
|
240
240
|
padding: 24px 40px;
|
|
241
|
-
max-width:
|
|
241
|
+
max-width: 960px;
|
|
242
|
+
min-width: 0;
|
|
242
243
|
}
|
|
243
244
|
|
|
244
245
|
/* Wiki page - namuwiki style headings */
|
|
@@ -968,6 +969,11 @@ h4 .headerlink {
|
|
|
968
969
|
background: var(--namu-green);
|
|
969
970
|
}
|
|
970
971
|
|
|
972
|
+
/* Mobile nav in sidebar — hidden on desktop, visible on mobile */
|
|
973
|
+
.sidebar-mobile-nav {
|
|
974
|
+
display: none;
|
|
975
|
+
}
|
|
976
|
+
|
|
971
977
|
/* Hamburger menu button */
|
|
972
978
|
.topbar-menu-btn {
|
|
973
979
|
display: none;
|
|
@@ -988,10 +994,39 @@ h4 .headerlink {
|
|
|
988
994
|
@media (max-width: 768px) {
|
|
989
995
|
.topbar-menu-btn { display: flex; align-items: center; }
|
|
990
996
|
|
|
997
|
+
/* Hide nav links on mobile — accessible via sidebar */
|
|
998
|
+
.topbar-links {
|
|
999
|
+
display: none;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
/* Show mobile nav in sidebar */
|
|
1003
|
+
.sidebar-mobile-nav {
|
|
1004
|
+
display: flex;
|
|
1005
|
+
flex-direction: column;
|
|
1006
|
+
border-top: 1px solid var(--border);
|
|
1007
|
+
padding: 8px 0;
|
|
1008
|
+
}
|
|
1009
|
+
.sidebar-mobile-nav a {
|
|
1010
|
+
display: block;
|
|
1011
|
+
padding: 8px 14px;
|
|
1012
|
+
font-size: 13px;
|
|
1013
|
+
color: var(--text);
|
|
1014
|
+
border-bottom: 1px solid #efefef;
|
|
1015
|
+
}
|
|
1016
|
+
.sidebar-mobile-nav a:hover {
|
|
1017
|
+
background: var(--bg-hover);
|
|
1018
|
+
text-decoration: none;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
.topbar-search {
|
|
1022
|
+
flex: 1;
|
|
1023
|
+
max-width: none;
|
|
1024
|
+
}
|
|
1025
|
+
|
|
991
1026
|
.sidebar {
|
|
992
1027
|
position: fixed;
|
|
993
1028
|
left: -260px;
|
|
994
|
-
top:
|
|
1029
|
+
top: var(--topbar-height);
|
|
995
1030
|
bottom: 0;
|
|
996
1031
|
width: 260px;
|
|
997
1032
|
z-index: 99;
|
|
@@ -1005,7 +1040,7 @@ h4 .headerlink {
|
|
|
1005
1040
|
display: none;
|
|
1006
1041
|
position: fixed;
|
|
1007
1042
|
inset: 0;
|
|
1008
|
-
top:
|
|
1043
|
+
top: var(--topbar-height);
|
|
1009
1044
|
background: rgba(0,0,0,0.4);
|
|
1010
1045
|
z-index: 98;
|
|
1011
1046
|
}
|
|
@@ -1014,12 +1049,559 @@ h4 .headerlink {
|
|
|
1014
1049
|
.content {
|
|
1015
1050
|
margin-left: 0;
|
|
1016
1051
|
padding: 16px 14px;
|
|
1052
|
+
max-width: 100%;
|
|
1017
1053
|
}
|
|
1018
|
-
|
|
1019
|
-
|
|
1054
|
+
|
|
1055
|
+
/* Headings & hero scale down */
|
|
1056
|
+
.page-header h1 {
|
|
1057
|
+
font-size: 20px;
|
|
1058
|
+
}
|
|
1059
|
+
.hero h1 {
|
|
1060
|
+
font-size: 24px;
|
|
1061
|
+
}
|
|
1062
|
+
.hero {
|
|
1063
|
+
padding: 24px 0 16px;
|
|
1064
|
+
}
|
|
1065
|
+
.hero-logo {
|
|
1066
|
+
width: 72px;
|
|
1067
|
+
height: 72px;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
/* Tables scroll horizontally */
|
|
1071
|
+
.page-body table {
|
|
1072
|
+
display: block;
|
|
1073
|
+
overflow-x: auto;
|
|
1074
|
+
-webkit-overflow-scrolling: touch;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
/* Code blocks */
|
|
1078
|
+
.page-body pre {
|
|
1079
|
+
font-size: 12px;
|
|
1080
|
+
padding: 10px;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
/* Quick links wrap */
|
|
1084
|
+
.quick-links {
|
|
1085
|
+
flex-wrap: wrap;
|
|
1086
|
+
}
|
|
1087
|
+
.quick-link {
|
|
1088
|
+
flex: 1 1 calc(50% - 5px);
|
|
1089
|
+
text-align: center;
|
|
1090
|
+
font-size: 13px;
|
|
1091
|
+
padding: 8px 12px;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
/* Page cards grid — single column on very small screens */
|
|
1095
|
+
.page-cards {
|
|
1096
|
+
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
|
|
1097
|
+
gap: 6px;
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
/* Stats grid */
|
|
1101
|
+
.stats-grid {
|
|
1102
|
+
gap: 6px;
|
|
1103
|
+
}
|
|
1104
|
+
.stat-card {
|
|
1105
|
+
min-width: 70px;
|
|
1106
|
+
padding: 8px 10px;
|
|
1107
|
+
}
|
|
1108
|
+
.stat-value {
|
|
1109
|
+
font-size: 16px;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
/* QA popover */
|
|
1113
|
+
.qa-popover {
|
|
1114
|
+
width: calc(100vw - 20px);
|
|
1115
|
+
max-width: 300px;
|
|
1116
|
+
left: 10px !important;
|
|
1117
|
+
right: 10px !important;
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
/* Edit modal */
|
|
1121
|
+
.edit-modal-inner {
|
|
1122
|
+
width: 95%;
|
|
1123
|
+
max-height: 90vh;
|
|
1124
|
+
}
|
|
1125
|
+
.edit-textarea {
|
|
1126
|
+
min-height: 250px;
|
|
1127
|
+
font-size: 12px;
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
/* Backlinks */
|
|
1131
|
+
.backlinks ul {
|
|
1132
|
+
gap: 4px;
|
|
1133
|
+
}
|
|
1134
|
+
.backlinks li a {
|
|
1135
|
+
font-size: 12px;
|
|
1136
|
+
padding: 2px 8px;
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
/* Add form */
|
|
1140
|
+
.add-form {
|
|
1141
|
+
flex-direction: column;
|
|
1142
|
+
}
|
|
1143
|
+
.add-form button {
|
|
1144
|
+
width: 100%;
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
/* File drop */
|
|
1148
|
+
.file-drop {
|
|
1149
|
+
padding: 14px;
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
/* Index section headings */
|
|
1153
|
+
.index-section h2 {
|
|
1154
|
+
font-size: 15px;
|
|
1020
1155
|
}
|
|
1021
1156
|
}
|
|
1022
1157
|
|
|
1158
|
+
/* Extra small screens */
|
|
1159
|
+
@media (max-width: 380px) {
|
|
1160
|
+
.topbar-brand {
|
|
1161
|
+
font-size: 14px;
|
|
1162
|
+
}
|
|
1163
|
+
.topbar-logo {
|
|
1164
|
+
width: 22px;
|
|
1165
|
+
height: 22px;
|
|
1166
|
+
}
|
|
1167
|
+
.page-header h1 {
|
|
1168
|
+
font-size: 18px;
|
|
1169
|
+
}
|
|
1170
|
+
.page-cards {
|
|
1171
|
+
grid-template-columns: 1fr;
|
|
1172
|
+
}
|
|
1173
|
+
.quick-links {
|
|
1174
|
+
flex-direction: column;
|
|
1175
|
+
}
|
|
1176
|
+
.quick-link {
|
|
1177
|
+
flex: 1 1 100%;
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
/* Dynamic Q&A Popover */
|
|
1182
|
+
.qa-popover {
|
|
1183
|
+
display: none;
|
|
1184
|
+
position: absolute;
|
|
1185
|
+
z-index: 1000;
|
|
1186
|
+
width: 300px;
|
|
1187
|
+
background: var(--bg);
|
|
1188
|
+
border: 1px solid var(--namu-green);
|
|
1189
|
+
padding: 0;
|
|
1190
|
+
font-size: 13px;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
.qa-popover-header {
|
|
1194
|
+
background: var(--namu-green);
|
|
1195
|
+
color: white;
|
|
1196
|
+
padding: 8px 12px;
|
|
1197
|
+
font-weight: 600;
|
|
1198
|
+
font-size: 12px;
|
|
1199
|
+
display: flex;
|
|
1200
|
+
justify-content: space-between;
|
|
1201
|
+
align-items: center;
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
.qa-popover-selected {
|
|
1205
|
+
padding: 6px 12px;
|
|
1206
|
+
font-size: 11px;
|
|
1207
|
+
color: var(--text-muted);
|
|
1208
|
+
background: var(--bg-alt);
|
|
1209
|
+
border-bottom: 1px solid var(--border);
|
|
1210
|
+
max-height: 60px;
|
|
1211
|
+
overflow: hidden;
|
|
1212
|
+
font-style: italic;
|
|
1213
|
+
line-height: 1.4;
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
mark.qa-highlight {
|
|
1217
|
+
background: rgba(0, 164, 149, 0.2);
|
|
1218
|
+
border-bottom: 2px solid var(--namu-green);
|
|
1219
|
+
padding: 0 1px;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
a.dynamic-link {
|
|
1223
|
+
color: var(--namu-green);
|
|
1224
|
+
border-bottom: 1px dashed var(--namu-green);
|
|
1225
|
+
text-decoration: none;
|
|
1226
|
+
}
|
|
1227
|
+
a.dynamic-link:hover {
|
|
1228
|
+
background: rgba(0, 164, 149, 0.1);
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
/* Red links — wiki convention for non-existent pages */
|
|
1232
|
+
a.redlink {
|
|
1233
|
+
color: #d32f2f;
|
|
1234
|
+
text-decoration: none;
|
|
1235
|
+
border-bottom: 1px dotted #d32f2f;
|
|
1236
|
+
cursor: help;
|
|
1237
|
+
}
|
|
1238
|
+
a.redlink:hover {
|
|
1239
|
+
background: rgba(211, 47, 47, 0.08);
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
.qa-popover-close {
|
|
1243
|
+
background: none;
|
|
1244
|
+
border: none;
|
|
1245
|
+
color: white;
|
|
1246
|
+
font-size: 18px;
|
|
1247
|
+
cursor: pointer;
|
|
1248
|
+
padding: 0 4px;
|
|
1249
|
+
line-height: 1;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
.qa-popover-body {
|
|
1253
|
+
display: flex;
|
|
1254
|
+
flex-direction: column;
|
|
1255
|
+
padding: 8px;
|
|
1256
|
+
gap: 6px;
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
.qa-body-row {
|
|
1260
|
+
display: flex;
|
|
1261
|
+
gap: 6px;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
.qa-popover-input {
|
|
1265
|
+
flex: 1;
|
|
1266
|
+
padding: 6px 10px;
|
|
1267
|
+
border: 1px solid var(--border);
|
|
1268
|
+
font-size: 13px;
|
|
1269
|
+
outline: none;
|
|
1270
|
+
background: var(--bg);
|
|
1271
|
+
color: var(--text);
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
.qa-popover-input:focus {
|
|
1275
|
+
border-color: var(--namu-green);
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
.qa-popover-btn {
|
|
1279
|
+
padding: 6px 14px;
|
|
1280
|
+
background: var(--namu-green);
|
|
1281
|
+
color: white;
|
|
1282
|
+
border: none;
|
|
1283
|
+
cursor: pointer;
|
|
1284
|
+
font-size: 12px;
|
|
1285
|
+
font-weight: 600;
|
|
1286
|
+
white-space: nowrap;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
.qa-popover-btn:hover {
|
|
1290
|
+
background: var(--namu-green-dark);
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
.qa-popover-loading {
|
|
1294
|
+
display: flex;
|
|
1295
|
+
align-items: center;
|
|
1296
|
+
gap: 8px;
|
|
1297
|
+
padding: 12px;
|
|
1298
|
+
color: var(--text-muted);
|
|
1299
|
+
font-size: 12px;
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
.qa-spinner {
|
|
1303
|
+
display: inline-block;
|
|
1304
|
+
width: 14px;
|
|
1305
|
+
height: 14px;
|
|
1306
|
+
border: 2px solid var(--border);
|
|
1307
|
+
border-top-color: var(--namu-green);
|
|
1308
|
+
border-radius: 50%;
|
|
1309
|
+
animation: spin 0.8s linear infinite;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
@keyframes spin {
|
|
1313
|
+
to { transform: rotate(360deg); }
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
.qa-popover-result {
|
|
1317
|
+
padding: 10px 12px;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
.qa-result-link {
|
|
1321
|
+
display: block;
|
|
1322
|
+
color: var(--namu-green);
|
|
1323
|
+
text-decoration: none;
|
|
1324
|
+
font-weight: 600;
|
|
1325
|
+
margin-bottom: 4px;
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
.qa-result-link:hover {
|
|
1329
|
+
text-decoration: underline;
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
.qa-result-hint {
|
|
1333
|
+
font-size: 11px;
|
|
1334
|
+
color: var(--text-muted);
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
.qa-promote-btn {
|
|
1338
|
+
display: block;
|
|
1339
|
+
width: 100%;
|
|
1340
|
+
margin-top: 8px;
|
|
1341
|
+
padding: 6px 12px;
|
|
1342
|
+
border: 1px solid var(--namu-green);
|
|
1343
|
+
border-radius: 6px;
|
|
1344
|
+
background: transparent;
|
|
1345
|
+
color: var(--namu-green);
|
|
1346
|
+
font-size: 12px;
|
|
1347
|
+
cursor: pointer;
|
|
1348
|
+
transition: background 0.15s, color 0.15s;
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
.qa-promote-btn:hover:not(:disabled) {
|
|
1352
|
+
background: var(--namu-green);
|
|
1353
|
+
color: #fff;
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
.qa-promote-btn:disabled {
|
|
1357
|
+
opacity: 0.6;
|
|
1358
|
+
cursor: wait;
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
.qa-promote-success {
|
|
1362
|
+
margin-top: 6px;
|
|
1363
|
+
padding: 6px 0;
|
|
1364
|
+
font-size: 12px;
|
|
1365
|
+
color: var(--namu-green);
|
|
1366
|
+
display: flex;
|
|
1367
|
+
gap: 8px;
|
|
1368
|
+
align-items: center;
|
|
1369
|
+
flex-wrap: wrap;
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
.qa-promote-success a {
|
|
1373
|
+
color: var(--namu-green);
|
|
1374
|
+
text-decoration: underline;
|
|
1375
|
+
font-weight: 500;
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
.qa-popover-error {
|
|
1379
|
+
padding: 10px 12px;
|
|
1380
|
+
color: #e53935;
|
|
1381
|
+
font-size: 12px;
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
.qa-popover-related {
|
|
1385
|
+
border-top: 1px solid var(--border);
|
|
1386
|
+
max-height: 160px;
|
|
1387
|
+
overflow-y: auto;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
.qa-related-label {
|
|
1391
|
+
padding: 6px 12px;
|
|
1392
|
+
font-size: 11px;
|
|
1393
|
+
font-weight: 600;
|
|
1394
|
+
color: var(--text-muted);
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
.qa-related-list {
|
|
1398
|
+
padding: 0 8px 8px;
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
.qa-related-item {
|
|
1402
|
+
display: block;
|
|
1403
|
+
padding: 6px 8px;
|
|
1404
|
+
text-decoration: none;
|
|
1405
|
+
color: var(--text);
|
|
1406
|
+
font-size: 12px;
|
|
1407
|
+
border-bottom: 1px solid var(--border);
|
|
1408
|
+
transition: background 0.15s;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
.qa-related-item:last-child {
|
|
1412
|
+
border-bottom: none;
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
.qa-related-item:hover {
|
|
1416
|
+
background: var(--bg-hover);
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
.qa-related-icon {
|
|
1420
|
+
margin-right: 4px;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
.qa-related-title {
|
|
1424
|
+
font-weight: 600;
|
|
1425
|
+
color: var(--namu-green);
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
.qa-related-preview {
|
|
1429
|
+
display: block;
|
|
1430
|
+
font-size: 11px;
|
|
1431
|
+
color: var(--text-muted);
|
|
1432
|
+
margin-top: 2px;
|
|
1433
|
+
line-height: 1.3;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
/* Global toast — used for promote success and demo magic moment */
|
|
1437
|
+
.kiwi-toast {
|
|
1438
|
+
position: fixed;
|
|
1439
|
+
top: 80px;
|
|
1440
|
+
left: 50%;
|
|
1441
|
+
transform: translateX(-50%) translateY(-200%);
|
|
1442
|
+
background: var(--namu-green, #2e7d32);
|
|
1443
|
+
color: #fff;
|
|
1444
|
+
padding: 14px 24px;
|
|
1445
|
+
border-radius: 12px;
|
|
1446
|
+
font-size: 15px;
|
|
1447
|
+
font-weight: 600;
|
|
1448
|
+
box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
|
|
1449
|
+
z-index: 10000;
|
|
1450
|
+
display: flex;
|
|
1451
|
+
align-items: center;
|
|
1452
|
+
gap: 10px;
|
|
1453
|
+
transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
|
|
1454
|
+
opacity: 0;
|
|
1455
|
+
max-width: calc(100vw - 32px);
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
.kiwi-toast.show {
|
|
1459
|
+
transform: translateX(-50%) translateY(0);
|
|
1460
|
+
opacity: 1;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
.kiwi-toast.error {
|
|
1464
|
+
background: #e53935;
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
.kiwi-toast .kiwi-toast-icon {
|
|
1468
|
+
display: inline-block;
|
|
1469
|
+
font-size: 18px;
|
|
1470
|
+
animation: kiwi-toast-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s both;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
.kiwi-toast .kiwi-toast-text {
|
|
1474
|
+
white-space: nowrap;
|
|
1475
|
+
overflow: hidden;
|
|
1476
|
+
text-overflow: ellipsis;
|
|
1477
|
+
max-width: 60vw;
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
.kiwi-toast .kiwi-toast-link {
|
|
1481
|
+
color: #fff;
|
|
1482
|
+
text-decoration: underline;
|
|
1483
|
+
font-weight: 600;
|
|
1484
|
+
margin-left: 4px;
|
|
1485
|
+
opacity: 0.9;
|
|
1486
|
+
max-width: 200px;
|
|
1487
|
+
overflow: hidden;
|
|
1488
|
+
text-overflow: ellipsis;
|
|
1489
|
+
white-space: nowrap;
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
.kiwi-toast .kiwi-toast-link:hover {
|
|
1493
|
+
opacity: 1;
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
@keyframes kiwi-toast-pop {
|
|
1497
|
+
0% { transform: scale(0.4) rotate(-30deg); opacity: 0; }
|
|
1498
|
+
60% { transform: scale(1.25) rotate(0); opacity: 1; }
|
|
1499
|
+
100% { transform: scale(1) rotate(0); opacity: 1; }
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
/* New sidebar entry slide-in — for demo "wiki grows live" moment */
|
|
1503
|
+
.sidebar-new-entry {
|
|
1504
|
+
animation: kiwi-sidebar-slide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
|
|
1505
|
+
background: linear-gradient(90deg, rgba(46, 125, 50, 0.18), transparent);
|
|
1506
|
+
border-radius: 4px;
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
.sidebar-new-entry > a {
|
|
1510
|
+
font-weight: 600;
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
@keyframes kiwi-sidebar-slide {
|
|
1514
|
+
from { transform: translateX(-12px); opacity: 0; }
|
|
1515
|
+
to { transform: translateX(0); opacity: 1; }
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
/* Dynamic page badge */
|
|
1519
|
+
.page-type-badge.dynamic {
|
|
1520
|
+
background: #7c4dff;
|
|
1521
|
+
color: white;
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
/* Edit button & modal */
|
|
1525
|
+
.edit-btn {
|
|
1526
|
+
background: none;
|
|
1527
|
+
border: none;
|
|
1528
|
+
cursor: pointer;
|
|
1529
|
+
font-size: 16px;
|
|
1530
|
+
padding: 2px 6px;
|
|
1531
|
+
opacity: 0.5;
|
|
1532
|
+
transition: opacity 0.2s;
|
|
1533
|
+
display: none; /* Hidden by default; JS shows it when auth token present */
|
|
1534
|
+
}
|
|
1535
|
+
.edit-btn:hover { opacity: 1; }
|
|
1536
|
+
|
|
1537
|
+
.edit-modal {
|
|
1538
|
+
position: fixed;
|
|
1539
|
+
inset: 0;
|
|
1540
|
+
background: rgba(0,0,0,0.5);
|
|
1541
|
+
display: flex;
|
|
1542
|
+
align-items: center;
|
|
1543
|
+
justify-content: center;
|
|
1544
|
+
z-index: 1001;
|
|
1545
|
+
}
|
|
1546
|
+
.edit-modal-inner {
|
|
1547
|
+
background: var(--bg);
|
|
1548
|
+
width: 90%;
|
|
1549
|
+
max-width: 800px;
|
|
1550
|
+
max-height: 80vh;
|
|
1551
|
+
display: flex;
|
|
1552
|
+
flex-direction: column;
|
|
1553
|
+
border: 1px solid var(--border);
|
|
1554
|
+
}
|
|
1555
|
+
.edit-modal-header {
|
|
1556
|
+
display: flex;
|
|
1557
|
+
justify-content: space-between;
|
|
1558
|
+
align-items: center;
|
|
1559
|
+
padding: 12px 16px;
|
|
1560
|
+
background: var(--namu-green);
|
|
1561
|
+
color: white;
|
|
1562
|
+
font-weight: 600;
|
|
1563
|
+
}
|
|
1564
|
+
.edit-modal-close {
|
|
1565
|
+
background: none;
|
|
1566
|
+
border: none;
|
|
1567
|
+
color: white;
|
|
1568
|
+
font-size: 20px;
|
|
1569
|
+
cursor: pointer;
|
|
1570
|
+
}
|
|
1571
|
+
.edit-textarea {
|
|
1572
|
+
flex: 1;
|
|
1573
|
+
padding: 16px;
|
|
1574
|
+
border: none;
|
|
1575
|
+
font-family: 'JetBrains Mono', 'D2Coding', monospace;
|
|
1576
|
+
font-size: 13px;
|
|
1577
|
+
resize: none;
|
|
1578
|
+
min-height: 400px;
|
|
1579
|
+
background: var(--bg);
|
|
1580
|
+
color: var(--text);
|
|
1581
|
+
}
|
|
1582
|
+
.edit-modal-footer {
|
|
1583
|
+
display: flex;
|
|
1584
|
+
justify-content: flex-end;
|
|
1585
|
+
gap: 8px;
|
|
1586
|
+
padding: 12px 16px;
|
|
1587
|
+
border-top: 1px solid var(--border);
|
|
1588
|
+
}
|
|
1589
|
+
.edit-cancel {
|
|
1590
|
+
padding: 6px 16px;
|
|
1591
|
+
background: var(--bg-alt);
|
|
1592
|
+
border: 1px solid var(--border);
|
|
1593
|
+
cursor: pointer;
|
|
1594
|
+
color: var(--text);
|
|
1595
|
+
}
|
|
1596
|
+
.edit-save {
|
|
1597
|
+
padding: 6px 16px;
|
|
1598
|
+
background: var(--namu-green);
|
|
1599
|
+
color: white;
|
|
1600
|
+
border: none;
|
|
1601
|
+
cursor: pointer;
|
|
1602
|
+
font-weight: 600;
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1023
1605
|
/* Dark mode */
|
|
1024
1606
|
@media (prefers-color-scheme: dark) {
|
|
1025
1607
|
:root {
|
|
@@ -1041,4 +1623,237 @@ h4 .headerlink {
|
|
|
1041
1623
|
.toc-box { background: var(--bg-alt); }
|
|
1042
1624
|
.sidebar { background: var(--bg); border-right-color: var(--border); }
|
|
1043
1625
|
img { opacity: 0.9; }
|
|
1044
|
-
|
|
1626
|
+
|
|
1627
|
+
/* Code blocks */
|
|
1628
|
+
.page-body pre { background: #1e1e3e; border-color: var(--border); }
|
|
1629
|
+
.page-body code { background: #2a2a4a; color: #e0e0e0; }
|
|
1630
|
+
|
|
1631
|
+
/* Blockquotes */
|
|
1632
|
+
.page-body blockquote {
|
|
1633
|
+
background: var(--bg-alt);
|
|
1634
|
+
border-left-color: var(--namu-green);
|
|
1635
|
+
color: var(--text);
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
/* Tables */
|
|
1639
|
+
.page-body table th { background: #1a3a3a; color: var(--text); }
|
|
1640
|
+
.page-body table td { border-color: var(--border); }
|
|
1641
|
+
.page-body table tr:nth-child(even) { background: var(--bg-alt); }
|
|
1642
|
+
|
|
1643
|
+
/* External refs */
|
|
1644
|
+
.external-refs { background: var(--bg-alt); border-color: var(--border); }
|
|
1645
|
+
.external-refs a { color: var(--namu-green); }
|
|
1646
|
+
|
|
1647
|
+
/* Backlinks */
|
|
1648
|
+
.backlinks { border-top-color: var(--border); }
|
|
1649
|
+
.backlinks li a { background: var(--bg-alt); color: var(--text); border-color: var(--border); }
|
|
1650
|
+
|
|
1651
|
+
/* Search */
|
|
1652
|
+
.search-dropdown { background: var(--bg); border-color: var(--border); }
|
|
1653
|
+
.search-dropdown a { color: var(--text); border-bottom-color: var(--border); }
|
|
1654
|
+
.search-dropdown a:hover, .search-dropdown a.selected { background: var(--bg-hover); }
|
|
1655
|
+
|
|
1656
|
+
/* Admin & forms */
|
|
1657
|
+
input, textarea, select { background: var(--bg-alt); color: var(--text); border-color: var(--border); }
|
|
1658
|
+
|
|
1659
|
+
/* Badges */
|
|
1660
|
+
.page-type-badge { background: var(--bg-alt); }
|
|
1661
|
+
|
|
1662
|
+
/* Q&A Popover */
|
|
1663
|
+
.qa-popover { background: var(--bg); border-color: var(--namu-green); }
|
|
1664
|
+
.qa-popover-input { background: var(--bg-alt); color: var(--text); border-color: var(--border); }
|
|
1665
|
+
.qa-related-item { color: var(--text); }
|
|
1666
|
+
.qa-related-item:hover { background: var(--bg-hover); }
|
|
1667
|
+
.qa-popover-related { border-top-color: var(--border); }
|
|
1668
|
+
|
|
1669
|
+
/* Empty state */
|
|
1670
|
+
.empty-state { border-color: var(--border); color: var(--text-muted); }
|
|
1671
|
+
|
|
1672
|
+
/* Edit modal */
|
|
1673
|
+
.edit-modal-inner { background: var(--bg); border-color: var(--border); }
|
|
1674
|
+
.edit-modal-header { background: #004d40; }
|
|
1675
|
+
.edit-textarea { background: var(--bg-alt); color: var(--text); }
|
|
1676
|
+
.edit-cancel { background: var(--bg-alt); color: var(--text); border-color: var(--border); }
|
|
1677
|
+
.edit-save { background: var(--namu-green); }
|
|
1678
|
+
|
|
1679
|
+
/* Footer badge */
|
|
1680
|
+
.kiwimu-badge { border-top-color: var(--border); }
|
|
1681
|
+
.kiwimu-badge a { color: var(--namu-green); }
|
|
1682
|
+
|
|
1683
|
+
/* Catalog page dark mode */
|
|
1684
|
+
.catalog-category { border-color: var(--border); }
|
|
1685
|
+
.catalog-category-header { background: var(--bg-alt); }
|
|
1686
|
+
.catalog-item:hover { background: var(--bg-hover); }
|
|
1687
|
+
.catalog-badge.source { background: #1a3a2a; color: #6ecfa0; }
|
|
1688
|
+
.catalog-badge.concept { background: #1a2a3a; color: #6eb0cf; }
|
|
1689
|
+
.catalog-link-count { color: var(--text-muted); }
|
|
1690
|
+
.catalog-filter input { background: var(--bg-alt); color: var(--text); border-color: var(--border); }
|
|
1691
|
+
|
|
1692
|
+
/* Citations dark mode */
|
|
1693
|
+
.citations-section { border-color: var(--border); background: var(--bg-alt); }
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
/* ─── Catalog Page ─── */
|
|
1697
|
+
|
|
1698
|
+
.catalog-page { max-width: 960px; }
|
|
1699
|
+
.catalog-page h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
|
|
1700
|
+
.catalog-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; }
|
|
1701
|
+
|
|
1702
|
+
.catalog-filter { margin-bottom: 20px; }
|
|
1703
|
+
.catalog-filter input {
|
|
1704
|
+
width: 100%;
|
|
1705
|
+
padding: 10px 14px;
|
|
1706
|
+
font-size: 0.95rem;
|
|
1707
|
+
border: 1px solid var(--border);
|
|
1708
|
+
background: var(--bg-alt);
|
|
1709
|
+
color: var(--text);
|
|
1710
|
+
outline: none;
|
|
1711
|
+
transition: border-color 0.2s;
|
|
1712
|
+
}
|
|
1713
|
+
.catalog-filter input:focus { border-color: var(--namu-green); }
|
|
1714
|
+
|
|
1715
|
+
.catalog-category {
|
|
1716
|
+
border: 1px solid var(--border);
|
|
1717
|
+
margin-bottom: 12px;
|
|
1718
|
+
}
|
|
1719
|
+
.catalog-category-header {
|
|
1720
|
+
padding: 10px 14px;
|
|
1721
|
+
cursor: pointer;
|
|
1722
|
+
background: var(--bg-alt);
|
|
1723
|
+
display: flex;
|
|
1724
|
+
justify-content: space-between;
|
|
1725
|
+
align-items: center;
|
|
1726
|
+
font-weight: 600;
|
|
1727
|
+
user-select: none;
|
|
1728
|
+
}
|
|
1729
|
+
.catalog-category-header:hover { background: var(--bg-hover); }
|
|
1730
|
+
.catalog-category-name { font-size: 1rem; }
|
|
1731
|
+
.catalog-category-count { font-size: 0.8rem; color: var(--text-muted); }
|
|
1732
|
+
.catalog-category-desc { padding: 6px 14px 0; color: var(--text-muted); font-size: 0.85rem; }
|
|
1733
|
+
|
|
1734
|
+
.catalog-list { list-style: none; padding: 0; margin: 0; }
|
|
1735
|
+
.catalog-item {
|
|
1736
|
+
display: flex;
|
|
1737
|
+
align-items: center;
|
|
1738
|
+
gap: 8px;
|
|
1739
|
+
padding: 7px 14px;
|
|
1740
|
+
border-top: 1px solid var(--border);
|
|
1741
|
+
font-size: 0.9rem;
|
|
1742
|
+
}
|
|
1743
|
+
.catalog-item:hover { background: var(--bg-hover); }
|
|
1744
|
+
.catalog-item a { color: var(--link); text-decoration: none; flex: 1; }
|
|
1745
|
+
.catalog-item a:hover { text-decoration: underline; }
|
|
1746
|
+
|
|
1747
|
+
.catalog-badge {
|
|
1748
|
+
display: inline-block;
|
|
1749
|
+
padding: 1px 6px;
|
|
1750
|
+
font-size: 0.72rem;
|
|
1751
|
+
font-weight: 600;
|
|
1752
|
+
white-space: nowrap;
|
|
1753
|
+
}
|
|
1754
|
+
.catalog-badge.source { background: #e0f5f3; color: #007a6e; }
|
|
1755
|
+
.catalog-badge.concept { background: #e0eef5; color: #0a5e8a; }
|
|
1756
|
+
|
|
1757
|
+
.catalog-link-count {
|
|
1758
|
+
font-size: 0.78rem;
|
|
1759
|
+
color: var(--text-muted);
|
|
1760
|
+
white-space: nowrap;
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
.catalog-empty {
|
|
1764
|
+
padding: 40px;
|
|
1765
|
+
text-align: center;
|
|
1766
|
+
color: var(--text-muted);
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
/* ── Citations ── */
|
|
1770
|
+
.citation-ref { font-size: 0.75em; vertical-align: super; line-height: 1; }
|
|
1771
|
+
.citation-ref a { color: var(--namu-green, #2e7d32); text-decoration: none; font-weight: 600; }
|
|
1772
|
+
.citation-ref a:hover { text-decoration: underline; }
|
|
1773
|
+
|
|
1774
|
+
.citations-section {
|
|
1775
|
+
margin-top: 32px;
|
|
1776
|
+
padding: 16px 20px;
|
|
1777
|
+
border: 1px solid var(--border, #e0e0e0);
|
|
1778
|
+
border-radius: 8px;
|
|
1779
|
+
background: var(--bg-secondary, #f8f9fa);
|
|
1780
|
+
font-size: 0.875rem;
|
|
1781
|
+
}
|
|
1782
|
+
.citations-section h3 {
|
|
1783
|
+
margin: 0 0 12px 0;
|
|
1784
|
+
font-size: 0.9rem;
|
|
1785
|
+
font-weight: 600;
|
|
1786
|
+
color: var(--text-muted, #666);
|
|
1787
|
+
}
|
|
1788
|
+
.citation-list {
|
|
1789
|
+
margin: 0;
|
|
1790
|
+
padding: 0;
|
|
1791
|
+
list-style: none;
|
|
1792
|
+
}
|
|
1793
|
+
.citation-item {
|
|
1794
|
+
padding: 6px 0;
|
|
1795
|
+
border-bottom: 1px solid var(--border, #eee);
|
|
1796
|
+
line-height: 1.5;
|
|
1797
|
+
}
|
|
1798
|
+
.citation-item:last-child { border-bottom: none; }
|
|
1799
|
+
.citation-num {
|
|
1800
|
+
font-weight: 600;
|
|
1801
|
+
color: var(--namu-green, #2e7d32);
|
|
1802
|
+
margin-right: 4px;
|
|
1803
|
+
}
|
|
1804
|
+
.citation-excerpt {
|
|
1805
|
+
display: block;
|
|
1806
|
+
font-size: 0.8rem;
|
|
1807
|
+
color: var(--text-muted, #888);
|
|
1808
|
+
font-style: italic;
|
|
1809
|
+
margin-top: 2px;
|
|
1810
|
+
}
|
|
1811
|
+
/* === Track-based grouping (sidebar + index) === */
|
|
1812
|
+
.sidebar-group {
|
|
1813
|
+
margin-bottom: 8px;
|
|
1814
|
+
}
|
|
1815
|
+
.sidebar-group > summary {
|
|
1816
|
+
cursor: pointer;
|
|
1817
|
+
font-weight: 600;
|
|
1818
|
+
font-size: 13px;
|
|
1819
|
+
padding: 4px 0;
|
|
1820
|
+
user-select: none;
|
|
1821
|
+
list-style: none;
|
|
1822
|
+
}
|
|
1823
|
+
.sidebar-group > summary::before {
|
|
1824
|
+
content: "▸";
|
|
1825
|
+
display: inline-block;
|
|
1826
|
+
width: 14px;
|
|
1827
|
+
transition: transform 0.15s;
|
|
1828
|
+
font-size: 10px;
|
|
1829
|
+
}
|
|
1830
|
+
.sidebar-group[open] > summary::before {
|
|
1831
|
+
transform: rotate(90deg);
|
|
1832
|
+
}
|
|
1833
|
+
.sidebar-group > summary::-webkit-details-marker {
|
|
1834
|
+
display: none;
|
|
1835
|
+
}
|
|
1836
|
+
.sidebar-count {
|
|
1837
|
+
color: var(--text-muted, #57606a);
|
|
1838
|
+
font-weight: 400;
|
|
1839
|
+
font-size: 11px;
|
|
1840
|
+
margin-left: 4px;
|
|
1841
|
+
}
|
|
1842
|
+
.sidebar-group .page-list {
|
|
1843
|
+
padding-left: 14px;
|
|
1844
|
+
}
|
|
1845
|
+
.page-group {
|
|
1846
|
+
margin-bottom: 18px;
|
|
1847
|
+
}
|
|
1848
|
+
.page-group-title {
|
|
1849
|
+
font-size: 14px;
|
|
1850
|
+
margin: 0 0 8px;
|
|
1851
|
+
color: var(--text-secondary, #57606a);
|
|
1852
|
+
font-weight: 600;
|
|
1853
|
+
}
|
|
1854
|
+
.page-group-count {
|
|
1855
|
+
font-weight: 400;
|
|
1856
|
+
font-size: 11px;
|
|
1857
|
+
color: var(--text-muted, #8b949e);
|
|
1858
|
+
margin-left: 4px;
|
|
1859
|
+
}
|