@youtyan/code-viewer 0.1.24 → 0.1.26
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 +3 -0
- package/dist/code-viewer.js +436 -47
- package/package.json +1 -1
- package/web/app.js +516 -75
- package/web/index.html +3 -1
- package/web/style.css +168 -3
package/web/index.html
CHANGED
|
@@ -124,7 +124,9 @@
|
|
|
124
124
|
<div class="scope-settings-section">
|
|
125
125
|
<strong class="scope-settings-section-title">Excluded directories</strong>
|
|
126
126
|
<label for="scope-omit-dirs">Skip these directory names while browsing and searching</label>
|
|
127
|
-
<textarea id="scope-omit-dirs" rows="
|
|
127
|
+
<textarea id="scope-omit-dirs" rows="6" spellcheck="false"></textarea>
|
|
128
|
+
<label for="scope-exclude-names">Hide these file or directory names completely</label>
|
|
129
|
+
<textarea id="scope-exclude-names" rows="4" spellcheck="false"></textarea>
|
|
128
130
|
<p id="scope-omit-source"></p>
|
|
129
131
|
<div class="scope-settings-actions">
|
|
130
132
|
<button id="scope-omit-reset" type="button">Reset</button>
|
package/web/style.css
CHANGED
|
@@ -1171,10 +1171,11 @@ body.gdp-resizing * { user-select: none !important; }
|
|
|
1171
1171
|
font: inherit;
|
|
1172
1172
|
font-size: 12.5px;
|
|
1173
1173
|
}
|
|
1174
|
-
#scope-omit-dirs
|
|
1174
|
+
#scope-omit-dirs,
|
|
1175
|
+
#scope-exclude-names {
|
|
1175
1176
|
box-sizing: border-box;
|
|
1176
1177
|
width: 100%;
|
|
1177
|
-
min-height:
|
|
1178
|
+
min-height: 110px;
|
|
1178
1179
|
resize: vertical;
|
|
1179
1180
|
border: 1px solid var(--border-muted);
|
|
1180
1181
|
border-radius: 6px;
|
|
@@ -2515,6 +2516,7 @@ table.d2h-diff-table tr.gdp-diff-line-target > td:first-child {
|
|
|
2515
2516
|
.gdp-file-detail-header {
|
|
2516
2517
|
display: flex;
|
|
2517
2518
|
align-items: center;
|
|
2519
|
+
flex-wrap: wrap;
|
|
2518
2520
|
gap: 12px;
|
|
2519
2521
|
min-height: 34px;
|
|
2520
2522
|
margin-bottom: 0;
|
|
@@ -2589,6 +2591,43 @@ table.d2h-diff-table tr.gdp-diff-line-target > td:first-child {
|
|
|
2589
2591
|
flex-shrink: 0;
|
|
2590
2592
|
color: var(--fg-muted);
|
|
2591
2593
|
}
|
|
2594
|
+
.gdp-file-detail-header .gdp-trash-path {
|
|
2595
|
+
flex-shrink: 0;
|
|
2596
|
+
color: var(--danger);
|
|
2597
|
+
}
|
|
2598
|
+
.gdp-file-detail-meta {
|
|
2599
|
+
display: flex;
|
|
2600
|
+
align-items: center;
|
|
2601
|
+
flex-wrap: wrap;
|
|
2602
|
+
gap: 0;
|
|
2603
|
+
color: var(--fg-muted);
|
|
2604
|
+
font-size: 12px;
|
|
2605
|
+
line-height: 18px;
|
|
2606
|
+
}
|
|
2607
|
+
.gdp-file-detail-meta-item {
|
|
2608
|
+
display: inline-flex;
|
|
2609
|
+
align-items: baseline;
|
|
2610
|
+
gap: 6px;
|
|
2611
|
+
padding: 0 10px;
|
|
2612
|
+
border-right: 1px solid var(--border-muted);
|
|
2613
|
+
white-space: nowrap;
|
|
2614
|
+
}
|
|
2615
|
+
.gdp-file-detail-meta-item:first-child {
|
|
2616
|
+
padding-left: 0;
|
|
2617
|
+
}
|
|
2618
|
+
.gdp-file-detail-meta-item:last-child {
|
|
2619
|
+
border-right: 0;
|
|
2620
|
+
padding-right: 0;
|
|
2621
|
+
}
|
|
2622
|
+
.gdp-file-detail-meta-item .label {
|
|
2623
|
+
font-size: 11px;
|
|
2624
|
+
font-weight: 600;
|
|
2625
|
+
color: var(--fg-subtle);
|
|
2626
|
+
}
|
|
2627
|
+
.gdp-file-detail-meta-item .value {
|
|
2628
|
+
color: var(--fg);
|
|
2629
|
+
font-weight: 500;
|
|
2630
|
+
}
|
|
2592
2631
|
.gdp-markdown-preview {
|
|
2593
2632
|
width: 100%;
|
|
2594
2633
|
max-width: none;
|
|
@@ -3124,10 +3163,46 @@ body.gdp-file-detail-page #empty {
|
|
|
3124
3163
|
padding: 0;
|
|
3125
3164
|
overflow: hidden;
|
|
3126
3165
|
}
|
|
3166
|
+
.gdp-repo-sort-header {
|
|
3167
|
+
display: grid;
|
|
3168
|
+
grid-template-columns: 28px minmax(0, 1fr) minmax(150px, 220px) 80px;
|
|
3169
|
+
column-gap: 8px;
|
|
3170
|
+
align-items: center;
|
|
3171
|
+
min-height: 34px;
|
|
3172
|
+
padding: 0 14px;
|
|
3173
|
+
border-top: 1px solid var(--border-muted);
|
|
3174
|
+
border-bottom: 1px solid var(--border-muted);
|
|
3175
|
+
background: var(--bg-soft);
|
|
3176
|
+
}
|
|
3177
|
+
.gdp-repo-sort-spacer {
|
|
3178
|
+
display: block;
|
|
3179
|
+
}
|
|
3180
|
+
.gdp-repo-sort-header button {
|
|
3181
|
+
appearance: none;
|
|
3182
|
+
height: 100%;
|
|
3183
|
+
border: 0;
|
|
3184
|
+
background: transparent;
|
|
3185
|
+
color: var(--fg-muted);
|
|
3186
|
+
font: inherit;
|
|
3187
|
+
font-size: 12px;
|
|
3188
|
+
font-weight: 600;
|
|
3189
|
+
text-align: left;
|
|
3190
|
+
cursor: pointer;
|
|
3191
|
+
line-height: 20px;
|
|
3192
|
+
padding: 0;
|
|
3193
|
+
}
|
|
3194
|
+
.gdp-repo-sort-header button:hover,
|
|
3195
|
+
.gdp-repo-sort-header button.active {
|
|
3196
|
+
color: var(--fg);
|
|
3197
|
+
}
|
|
3198
|
+
.gdp-repo-sort-header button[data-repo-sort="size"] {
|
|
3199
|
+
text-align: right;
|
|
3200
|
+
}
|
|
3127
3201
|
.gdp-repo-row {
|
|
3128
3202
|
display: grid;
|
|
3129
|
-
grid-template-columns: 28px minmax(0, 1fr)
|
|
3203
|
+
grid-template-columns: 28px minmax(0, 1fr) minmax(150px, 220px) 80px;
|
|
3130
3204
|
align-items: center;
|
|
3205
|
+
column-gap: 8px;
|
|
3131
3206
|
width: 100%;
|
|
3132
3207
|
min-height: 42px;
|
|
3133
3208
|
border: 0;
|
|
@@ -3173,6 +3248,96 @@ body.gdp-file-detail-page #empty {
|
|
|
3173
3248
|
color: var(--fg-muted);
|
|
3174
3249
|
font-size: 12px;
|
|
3175
3250
|
}
|
|
3251
|
+
.gdp-repo-row .meta {
|
|
3252
|
+
overflow: hidden;
|
|
3253
|
+
text-overflow: ellipsis;
|
|
3254
|
+
white-space: nowrap;
|
|
3255
|
+
color: var(--fg-muted);
|
|
3256
|
+
font-size: 12px;
|
|
3257
|
+
}
|
|
3258
|
+
.gdp-repo-row .size {
|
|
3259
|
+
justify-self: end;
|
|
3260
|
+
min-width: 0;
|
|
3261
|
+
color: var(--fg-muted);
|
|
3262
|
+
font-size: 12px;
|
|
3263
|
+
white-space: nowrap;
|
|
3264
|
+
}
|
|
3265
|
+
.gdp-context-menu {
|
|
3266
|
+
position: fixed;
|
|
3267
|
+
z-index: 1000;
|
|
3268
|
+
min-width: 180px;
|
|
3269
|
+
padding: 6px;
|
|
3270
|
+
border: 1px solid var(--border);
|
|
3271
|
+
border-radius: 6px;
|
|
3272
|
+
background: var(--bg);
|
|
3273
|
+
box-shadow: 0 8px 24px rgba(31, 35, 40, 0.18);
|
|
3274
|
+
}
|
|
3275
|
+
.gdp-context-menu button {
|
|
3276
|
+
width: 100%;
|
|
3277
|
+
min-height: 30px;
|
|
3278
|
+
padding: 5px 8px;
|
|
3279
|
+
border: 0;
|
|
3280
|
+
border-radius: 4px;
|
|
3281
|
+
background: transparent;
|
|
3282
|
+
color: var(--fg);
|
|
3283
|
+
font: inherit;
|
|
3284
|
+
font-size: 13px;
|
|
3285
|
+
text-align: left;
|
|
3286
|
+
cursor: pointer;
|
|
3287
|
+
}
|
|
3288
|
+
.gdp-context-menu button:hover {
|
|
3289
|
+
background: var(--bg-soft);
|
|
3290
|
+
}
|
|
3291
|
+
.gdp-context-menu .danger {
|
|
3292
|
+
color: var(--danger);
|
|
3293
|
+
}
|
|
3294
|
+
.gdp-trash-dialog-backdrop {
|
|
3295
|
+
position: fixed;
|
|
3296
|
+
inset: 0;
|
|
3297
|
+
z-index: 1100;
|
|
3298
|
+
display: flex;
|
|
3299
|
+
align-items: flex-start;
|
|
3300
|
+
justify-content: center;
|
|
3301
|
+
padding-top: min(14vh, 120px);
|
|
3302
|
+
background: rgba(31, 35, 40, 0.18);
|
|
3303
|
+
}
|
|
3304
|
+
[data-theme="dark"] .gdp-trash-dialog-backdrop {
|
|
3305
|
+
background: rgba(1, 4, 9, 0.45);
|
|
3306
|
+
}
|
|
3307
|
+
.gdp-trash-dialog {
|
|
3308
|
+
width: min(420px, calc(100vw - 32px));
|
|
3309
|
+
border: 1px solid var(--border);
|
|
3310
|
+
border-radius: 8px;
|
|
3311
|
+
background: var(--bg);
|
|
3312
|
+
box-shadow: 0 16px 48px rgba(31, 35, 40, 0.28);
|
|
3313
|
+
}
|
|
3314
|
+
.gdp-trash-dialog-title {
|
|
3315
|
+
padding: 14px 16px 0;
|
|
3316
|
+
color: var(--fg);
|
|
3317
|
+
font-size: 15px;
|
|
3318
|
+
font-weight: 600;
|
|
3319
|
+
}
|
|
3320
|
+
.gdp-trash-dialog-body {
|
|
3321
|
+
padding: 8px 16px 14px;
|
|
3322
|
+
color: var(--fg-muted);
|
|
3323
|
+
font-size: 13px;
|
|
3324
|
+
line-height: 1.5;
|
|
3325
|
+
overflow-wrap: anywhere;
|
|
3326
|
+
}
|
|
3327
|
+
.gdp-trash-dialog-actions {
|
|
3328
|
+
display: flex;
|
|
3329
|
+
justify-content: flex-end;
|
|
3330
|
+
gap: 8px;
|
|
3331
|
+
padding: 12px 16px;
|
|
3332
|
+
border-top: 1px solid var(--border-muted);
|
|
3333
|
+
}
|
|
3334
|
+
.gdp-trash-dialog-danger {
|
|
3335
|
+
border-color: var(--danger);
|
|
3336
|
+
color: var(--danger);
|
|
3337
|
+
}
|
|
3338
|
+
.gdp-trash-dialog-danger:hover {
|
|
3339
|
+
background: var(--diff-del-bg);
|
|
3340
|
+
}
|
|
3176
3341
|
.gdp-repo-empty {
|
|
3177
3342
|
padding: 32px;
|
|
3178
3343
|
color: var(--fg-muted);
|