dsh-biocore 0.3.0 → 0.3.2

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/ui/panel.css CHANGED
@@ -972,4 +972,126 @@ body.layout-editing .card.is-hidden { display: none; }
972
972
  animation-iteration-count: 1 !important;
973
973
  transition-duration: .001ms !important;
974
974
  }
975
- }
975
+ }
976
+ /* =========================================================== phone ≤640 ===
977
+ * Density pass for phones only. Desktop (≥1024) and the 641–1023 tablet
978
+ * layout keep their previous metrics byte for byte.
979
+ * card 24/16 → 14/10 padding, radius 18, 2-column grid for the channels
980
+ */
981
+ @media (max-width: 640px) {
982
+ .panel {
983
+ padding: var(--sp-2) var(--sp-2) calc(84px + env(safe-area-inset-bottom, 0px));
984
+ gap: 10px;
985
+ }
986
+ .topbar {
987
+ min-height: 46px;
988
+ margin: calc(-1 * var(--sp-2)) calc(-1 * var(--sp-2)) 0;
989
+ padding: var(--sp-1) var(--sp-2);
990
+ }
991
+ .topbar h1 { font-size: 22px; line-height: 28px; }
992
+
993
+ .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
994
+ .grid > .card { grid-column: span 2; }
995
+
996
+ .card {
997
+ padding: 14px;
998
+ border-radius: 18px;
999
+ gap: 8px;
1000
+ }
1001
+ .card-head { min-height: 28px; gap: 8px; }
1002
+ .card-ico { width: 28px; height: 28px; border-radius: 12px; }
1003
+ .card-ico svg { width: 16px; height: 16px; }
1004
+ .card-head h2 { font-size: 14px; line-height: 20px; }
1005
+ .card-trail { font-size: var(--fs-xs); line-height: 20px; max-width: 52%; }
1006
+ .card-actions { gap: var(--sp-2); }
1007
+ .ghost-button, .primary-button { height: 34px; padding: 0 var(--sp-3); }
1008
+
1009
+ /* status: one row, small orb, three facts on a single line */
1010
+ .status-card {
1011
+ flex-direction: row;
1012
+ flex-wrap: wrap;
1013
+ align-items: center;
1014
+ gap: var(--sp-2) var(--sp-3);
1015
+ padding: 14px;
1016
+ }
1017
+ .status-body { flex: 1 1 120px; min-width: 0; }
1018
+ .status-body .motivation { -webkit-line-clamp: 2; }
1019
+ .orb-wrap { width: 56px; height: 56px; border-radius: 14px; }
1020
+ .orb { width: 40px; height: 40px; border-radius: 10px; }
1021
+ .status-body { gap: 2px; }
1022
+ .status-body h2 { font-size: 16px; line-height: 22px; }
1023
+ .status-body .motivation { font-size: var(--fs-xs); line-height: 16px; -webkit-line-clamp: 1; }
1024
+ .fact-list {
1025
+ flex: 1 0 100%;
1026
+ flex-direction: row;
1027
+ align-items: center;
1028
+ justify-content: space-between;
1029
+ gap: var(--sp-3);
1030
+ min-width: 0;
1031
+ margin-left: 0;
1032
+ padding: 6px 8px;
1033
+ }
1034
+ .fact-list div { flex: 0 0 auto; gap: 4px; }
1035
+ .fact-list dt, .fact-list dd { font-size: var(--fs-xs); }
1036
+
1037
+ /* metrics: number + status word + delta on one line */
1038
+ .metric-card,
1039
+ .channel-card {
1040
+ display: grid;
1041
+ grid-template-columns: minmax(0, 1fr) auto;
1042
+ grid-template-areas:
1043
+ "head head"
1044
+ "metric delta"
1045
+ "bar bar";
1046
+ gap: 6px 8px;
1047
+ align-content: start;
1048
+ }
1049
+ .metric-card .card-head,
1050
+ .channel-card .card-head { grid-area: head; }
1051
+ .metric-card .metric,
1052
+ .channel-card .metric { grid-area: metric; gap: 4px; }
1053
+ .metric-card .hint,
1054
+ .channel-card .hint { display: none; }
1055
+ .metric-card .subblock,
1056
+ .channel-card .subblock { display: contents; }
1057
+ .metric-card .data-row,
1058
+ .channel-card .data-row { grid-area: delta; align-self: center; }
1059
+ .metric-card .data-row > span,
1060
+ .channel-card .data-row > span { display: none; }
1061
+ .metric-card .bar,
1062
+ .channel-card .bar { grid-area: bar; height: 4px; margin-top: 2px; }
1063
+ .metric strong { font-size: 24px; line-height: 28px; }
1064
+ .metric-sm strong { font-size: 20px; line-height: 24px; }
1065
+ .metric-word { font-size: var(--fs-xs); }
1066
+
1067
+ /* four channels side by side, 2 x 2, about 200px tall in total */
1068
+ .grid > .card.channel-card { grid-column: span 1; }
1069
+ .grid > .card[data-card-id="tension"] { grid-column: span 1; }
1070
+ .channel-card .card-trail,
1071
+ .metric-card .card-trail { display: none; }
1072
+
1073
+ .triple { gap: var(--sp-2); }
1074
+ .triple-col { padding: 6px 8px; gap: 0; }
1075
+ .triple-col span { font-size: var(--fs-xs); line-height: 16px; }
1076
+ .triple-col strong { font-size: 20px; line-height: 24px; }
1077
+
1078
+ .data-list div { padding: 4px 6px; }
1079
+ .data-list dt, .data-list dd { font-size: var(--fs-xs); }
1080
+ .avg-card .data-list div { padding: 2px 6px; }
1081
+ .relation-foot { gap: var(--sp-3); padding: 6px 8px; }
1082
+ .chart-well canvas { height: 120px; }
1083
+ .memory-list li { padding: 6px; }
1084
+ .table-head, .memory-list li { grid-template-columns: 76px 48px minmax(0, 1fr); gap: var(--sp-2); }
1085
+
1086
+ /* reading order on a phone: 此刻 → 心情 → 四通道 → 今日 → 其余 */
1087
+ body:not(.layout-editing) .grid > .card[data-card-id="status"] { order: 1; }
1088
+ body:not(.layout-editing) .grid > .card[data-card-id="mood"] { order: 2; }
1089
+ body:not(.layout-editing) .grid > .card[data-card-id="tension"],
1090
+ body:not(.layout-editing) .grid > .card[data-card-id="warmth"],
1091
+ body:not(.layout-editing) .grid > .card[data-card-id="heaviness"],
1092
+ body:not(.layout-editing) .grid > .card[data-card-id="clarity"] { order: 3; }
1093
+ body:not(.layout-editing) .grid > .card[data-card-id="today"] { order: 4; }
1094
+ body:not(.layout-editing) .grid > .card { order: 5; }
1095
+
1096
+ .add-cards { padding: 14px; border-radius: 18px; }
1097
+ }
package/ui/panel.html CHANGED
@@ -92,7 +92,7 @@
92
92
  </dl>
93
93
  </section>
94
94
 
95
- <section class="card metric-card span-3 h-208" data-card-id="mood" data-card-label="心情">
95
+ <section class="card metric-card span-3 h-208" data-card-id="mood" data-card-label="心情" title="心情指数范围 −1 到 1">
96
96
  <header class="card-head">
97
97
  <span class="card-ico"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><use href="#i-mood"></use></svg></span>
98
98
  <h2>心情</h2>
@@ -106,7 +106,7 @@
106
106
  </div>
107
107
  </section>
108
108
 
109
- <section class="card metric-card span-3 h-208" data-card-id="tension" data-card-label="张力">
109
+ <section class="card metric-card span-3 h-208" data-card-id="tension" data-card-label="张力" title="0.65 以上为阈值区">
110
110
  <header class="card-head">
111
111
  <span class="card-ico"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><use href="#i-tension"></use></svg></span>
112
112
  <h2>张力</h2>