@youtyan/code-viewer 0.2.4 → 0.2.6
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 +14 -5
- package/dist/code-viewer.js +3037 -1408
- package/package.json +1 -1
- package/web/app.js +4112 -3096
- package/web/index.html +2 -2
- package/web/style.css +229 -4
package/web/index.html
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<a class="app-menu-item active" data-route="repo" href="/">Repository</a>
|
|
29
29
|
<a class="app-menu-item" data-route="diff" href="/todif?from=HEAD&to=worktree">Diff Viewer</a>
|
|
30
30
|
<a class="app-menu-item" data-route="history" href="/history">History</a>
|
|
31
|
-
<a class="app-menu-item" data-route="database" href="/database">
|
|
31
|
+
<a class="app-menu-item" data-route="database" href="/database">Datastores</a>
|
|
32
32
|
</nav>
|
|
33
33
|
<div class="global-actions">
|
|
34
34
|
<button id="annotations-toggle" class="global-icon-action" title="code annotations" aria-label="code annotations">💬<span id="annotations-count" hidden></span></button>
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
<label class="annotation-follow-label" title="jump to new annotations as they arrive">
|
|
178
178
|
<input type="checkbox" id="annotation-follow" checked /> follow
|
|
179
179
|
</label>
|
|
180
|
-
<button id="annotation-capture-db" class="annotation-icon-btn" type="button" title="pin current
|
|
180
|
+
<button id="annotation-capture-db" class="annotation-icon-btn" type="button" title="pin current datastore view" aria-label="pin current datastore view" hidden></button>
|
|
181
181
|
<button id="annotation-clear" type="button" title="delete all annotations">clear</button>
|
|
182
182
|
<button id="annotation-panel-close" type="button">close</button>
|
|
183
183
|
</div>
|
package/web/style.css
CHANGED
|
@@ -7484,19 +7484,19 @@ body.db-resizing {
|
|
|
7484
7484
|
font-size: var(--db-font-base);
|
|
7485
7485
|
font-style: italic;
|
|
7486
7486
|
}
|
|
7487
|
-
.
|
|
7488
|
-
.
|
|
7487
|
+
.datastore-value-info,
|
|
7488
|
+
.datastore-value-truncation {
|
|
7489
7489
|
padding: 4px 8px;
|
|
7490
7490
|
margin-bottom: 6px;
|
|
7491
7491
|
border-radius: 4px;
|
|
7492
7492
|
font-size: var(--db-font-sm);
|
|
7493
7493
|
font-family: var(--mono, monospace);
|
|
7494
7494
|
}
|
|
7495
|
-
.
|
|
7495
|
+
.datastore-value-info {
|
|
7496
7496
|
background: var(--bg-soft);
|
|
7497
7497
|
color: var(--fg-muted);
|
|
7498
7498
|
}
|
|
7499
|
-
.
|
|
7499
|
+
.datastore-value-truncation {
|
|
7500
7500
|
background: #fff4e0;
|
|
7501
7501
|
color: #8a5a22;
|
|
7502
7502
|
border: 1px solid #f0d8a0;
|
|
@@ -7802,6 +7802,231 @@ body.db-resizing {
|
|
|
7802
7802
|
text-align: center;
|
|
7803
7803
|
padding: 8px;
|
|
7804
7804
|
}
|
|
7805
|
+
|
|
7806
|
+
/* ---------- S3 explorer ---------- */
|
|
7807
|
+
.s3-explorer {
|
|
7808
|
+
flex: 1;
|
|
7809
|
+
display: flex;
|
|
7810
|
+
flex-direction: row;
|
|
7811
|
+
overflow: hidden;
|
|
7812
|
+
background: var(--bg);
|
|
7813
|
+
font-size: var(--db-font-base);
|
|
7814
|
+
}
|
|
7815
|
+
.s3-explorer[hidden] {
|
|
7816
|
+
display: none;
|
|
7817
|
+
}
|
|
7818
|
+
.s3-object-list-pane {
|
|
7819
|
+
width: 420px;
|
|
7820
|
+
border-right: 1px solid var(--border);
|
|
7821
|
+
display: flex;
|
|
7822
|
+
flex-direction: column;
|
|
7823
|
+
overflow: hidden;
|
|
7824
|
+
background: var(--bg);
|
|
7825
|
+
}
|
|
7826
|
+
.s3-toolbar {
|
|
7827
|
+
flex-shrink: 0;
|
|
7828
|
+
display: flex;
|
|
7829
|
+
flex-direction: column;
|
|
7830
|
+
gap: 8px;
|
|
7831
|
+
padding: 10px 12px;
|
|
7832
|
+
border-bottom: 1px solid var(--border);
|
|
7833
|
+
background: var(--bg-soft);
|
|
7834
|
+
}
|
|
7835
|
+
.s3-bucket-row,
|
|
7836
|
+
.s3-search-row,
|
|
7837
|
+
.s3-options-row {
|
|
7838
|
+
display: flex;
|
|
7839
|
+
align-items: center;
|
|
7840
|
+
gap: 8px;
|
|
7841
|
+
min-width: 0;
|
|
7842
|
+
}
|
|
7843
|
+
.s3-field-label {
|
|
7844
|
+
flex: 1;
|
|
7845
|
+
min-width: 0;
|
|
7846
|
+
display: flex;
|
|
7847
|
+
align-items: center;
|
|
7848
|
+
gap: 8px;
|
|
7849
|
+
color: var(--fg-muted);
|
|
7850
|
+
font-size: var(--db-font-sm);
|
|
7851
|
+
}
|
|
7852
|
+
.s3-bucket-select,
|
|
7853
|
+
.s3-sort-select,
|
|
7854
|
+
.s3-search-input {
|
|
7855
|
+
min-width: 0;
|
|
7856
|
+
border: 1px solid var(--border);
|
|
7857
|
+
border-radius: 4px;
|
|
7858
|
+
background: var(--bg);
|
|
7859
|
+
color: var(--fg);
|
|
7860
|
+
font: inherit;
|
|
7861
|
+
}
|
|
7862
|
+
.s3-bucket-select {
|
|
7863
|
+
flex: 1;
|
|
7864
|
+
padding: 4px 8px;
|
|
7865
|
+
}
|
|
7866
|
+
.s3-search-input {
|
|
7867
|
+
flex: 1;
|
|
7868
|
+
padding: 5px 8px;
|
|
7869
|
+
font-family: var(--mono, monospace);
|
|
7870
|
+
font-size: var(--db-font-mono);
|
|
7871
|
+
}
|
|
7872
|
+
.s3-search-input:focus,
|
|
7873
|
+
.s3-bucket-select:focus,
|
|
7874
|
+
.s3-sort-select:focus {
|
|
7875
|
+
border-color: var(--accent);
|
|
7876
|
+
outline: none;
|
|
7877
|
+
}
|
|
7878
|
+
.s3-mode-seg {
|
|
7879
|
+
flex-shrink: 0;
|
|
7880
|
+
}
|
|
7881
|
+
.s3-sort-select {
|
|
7882
|
+
flex: 1;
|
|
7883
|
+
padding: 4px 8px;
|
|
7884
|
+
}
|
|
7885
|
+
.s3-object-status {
|
|
7886
|
+
min-height: 26px;
|
|
7887
|
+
padding: 6px 12px;
|
|
7888
|
+
border-bottom: 1px solid var(--border);
|
|
7889
|
+
color: var(--fg-muted);
|
|
7890
|
+
font-size: var(--db-font-sm);
|
|
7891
|
+
background: var(--bg);
|
|
7892
|
+
flex-shrink: 0;
|
|
7893
|
+
}
|
|
7894
|
+
.s3-object-status.warn {
|
|
7895
|
+
color: #8a5a22;
|
|
7896
|
+
background: #fff4e0;
|
|
7897
|
+
}
|
|
7898
|
+
.s3-object-list {
|
|
7899
|
+
flex: 1;
|
|
7900
|
+
min-height: 0;
|
|
7901
|
+
overflow-y: auto;
|
|
7902
|
+
padding: 4px 0;
|
|
7903
|
+
}
|
|
7904
|
+
.s3-object-item {
|
|
7905
|
+
display: flex;
|
|
7906
|
+
flex-direction: column;
|
|
7907
|
+
gap: 2px;
|
|
7908
|
+
padding: 6px 12px;
|
|
7909
|
+
border-left: 2px solid transparent;
|
|
7910
|
+
border-bottom: 1px solid var(--border);
|
|
7911
|
+
cursor: pointer;
|
|
7912
|
+
user-select: none;
|
|
7913
|
+
}
|
|
7914
|
+
.s3-object-item:hover {
|
|
7915
|
+
background: var(--bg-hover, var(--bg-soft));
|
|
7916
|
+
}
|
|
7917
|
+
.s3-object-item.active {
|
|
7918
|
+
background: var(--bg-active, var(--bg-soft));
|
|
7919
|
+
border-left-color: var(--accent);
|
|
7920
|
+
}
|
|
7921
|
+
.s3-object-name {
|
|
7922
|
+
overflow: hidden;
|
|
7923
|
+
text-overflow: ellipsis;
|
|
7924
|
+
white-space: nowrap;
|
|
7925
|
+
font-family: var(--mono, monospace);
|
|
7926
|
+
font-size: var(--db-font-mono);
|
|
7927
|
+
font-weight: 500;
|
|
7928
|
+
}
|
|
7929
|
+
.s3-object-meta {
|
|
7930
|
+
overflow: hidden;
|
|
7931
|
+
text-overflow: ellipsis;
|
|
7932
|
+
white-space: nowrap;
|
|
7933
|
+
color: var(--fg-muted);
|
|
7934
|
+
font-size: var(--db-font-sm);
|
|
7935
|
+
}
|
|
7936
|
+
.s3-object-more-btn {
|
|
7937
|
+
padding: 6px;
|
|
7938
|
+
border: none;
|
|
7939
|
+
border-top: 1px solid var(--border);
|
|
7940
|
+
background: var(--bg-soft);
|
|
7941
|
+
color: var(--fg);
|
|
7942
|
+
cursor: pointer;
|
|
7943
|
+
font-size: var(--db-font-sm);
|
|
7944
|
+
}
|
|
7945
|
+
.s3-object-more-btn:hover {
|
|
7946
|
+
background: var(--bg-hover, var(--bg));
|
|
7947
|
+
}
|
|
7948
|
+
.s3-object-more-btn:disabled {
|
|
7949
|
+
cursor: default;
|
|
7950
|
+
color: var(--fg-muted);
|
|
7951
|
+
}
|
|
7952
|
+
.s3-preview-pane {
|
|
7953
|
+
flex: 1;
|
|
7954
|
+
min-width: 0;
|
|
7955
|
+
display: flex;
|
|
7956
|
+
flex-direction: column;
|
|
7957
|
+
overflow: hidden;
|
|
7958
|
+
color: var(--fg);
|
|
7959
|
+
}
|
|
7960
|
+
.s3-preview-header {
|
|
7961
|
+
flex-shrink: 0;
|
|
7962
|
+
display: grid;
|
|
7963
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
7964
|
+
gap: 4px 12px;
|
|
7965
|
+
padding: 10px 12px;
|
|
7966
|
+
border-bottom: 1px solid var(--border);
|
|
7967
|
+
background: var(--bg-soft);
|
|
7968
|
+
}
|
|
7969
|
+
.s3-preview-title {
|
|
7970
|
+
overflow: hidden;
|
|
7971
|
+
text-overflow: ellipsis;
|
|
7972
|
+
white-space: nowrap;
|
|
7973
|
+
font-family: var(--mono, monospace);
|
|
7974
|
+
font-size: var(--db-font-mono);
|
|
7975
|
+
font-weight: 600;
|
|
7976
|
+
}
|
|
7977
|
+
.s3-preview-meta {
|
|
7978
|
+
overflow: hidden;
|
|
7979
|
+
text-overflow: ellipsis;
|
|
7980
|
+
white-space: nowrap;
|
|
7981
|
+
color: var(--fg-muted);
|
|
7982
|
+
font-size: var(--db-font-sm);
|
|
7983
|
+
}
|
|
7984
|
+
.s3-preview-actions {
|
|
7985
|
+
grid-row: 1 / span 2;
|
|
7986
|
+
grid-column: 2;
|
|
7987
|
+
display: flex;
|
|
7988
|
+
align-items: center;
|
|
7989
|
+
gap: 6px;
|
|
7990
|
+
}
|
|
7991
|
+
.s3-preview-body {
|
|
7992
|
+
flex: 1;
|
|
7993
|
+
min-height: 0;
|
|
7994
|
+
overflow: auto;
|
|
7995
|
+
padding: 12px;
|
|
7996
|
+
}
|
|
7997
|
+
.s3-source-preview {
|
|
7998
|
+
min-height: 100%;
|
|
7999
|
+
}
|
|
8000
|
+
.s3-text-preview,
|
|
8001
|
+
.s3-text-preview-wrap {
|
|
8002
|
+
margin: 0;
|
|
8003
|
+
}
|
|
8004
|
+
.s3-text-preview {
|
|
8005
|
+
white-space: pre-wrap;
|
|
8006
|
+
word-break: break-word;
|
|
8007
|
+
font-family: var(--mono, monospace);
|
|
8008
|
+
font-size: var(--db-font-mono);
|
|
8009
|
+
}
|
|
8010
|
+
.s3-preview-body .gdp-markdown-layout,
|
|
8011
|
+
.s3-preview-body .gdp-markdown-preview {
|
|
8012
|
+
max-width: none;
|
|
8013
|
+
}
|
|
8014
|
+
.s3-preview-body .gdp-html-preview iframe,
|
|
8015
|
+
.s3-source-preview iframe,
|
|
8016
|
+
.s3-source-preview video,
|
|
8017
|
+
.s3-source-preview img {
|
|
8018
|
+
max-width: 100%;
|
|
8019
|
+
}
|
|
8020
|
+
.s3-source-preview video,
|
|
8021
|
+
.s3-source-preview audio {
|
|
8022
|
+
width: 100%;
|
|
8023
|
+
}
|
|
8024
|
+
.s3-source-preview iframe {
|
|
8025
|
+
width: 100%;
|
|
8026
|
+
min-height: 70vh;
|
|
8027
|
+
border: 1px solid var(--border);
|
|
8028
|
+
background: var(--bg);
|
|
8029
|
+
}
|
|
7805
8030
|
/* ---------- Database multi-tab manager ---------- */
|
|
7806
8031
|
.db-root {
|
|
7807
8032
|
display: flex;
|