@seanyeh77/ui 0.17.0 → 0.18.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/dist/bundle.js +10 -3
- package/dist/bundle.js.map +1 -1
- package/dist/{format-entry-Bxd5-D9B.js → format-entry-madGv9m_.js} +2 -1
- package/dist/format-entry-madGv9m_.js.map +1 -0
- package/dist/format.js +1 -1
- package/dist/index.d.ts +84 -3
- package/dist/index.js +711 -35
- package/dist/index.js.map +1 -1
- package/dist/styles.css +281 -1
- package/docs/CodeView.md +2 -2
- package/docs/DetailList.md +6 -0
- package/docs/Markdown.md +55 -0
- package/docs/Section.md +42 -0
- package/docs/guidelines.md +3 -1
- package/docs/motion.md +1 -0
- package/package.json +2 -2
- package/dist/format-entry-Bxd5-D9B.js.map +0 -1
package/dist/styles.css
CHANGED
|
@@ -4902,6 +4902,48 @@ html.ui-theme-fade * {
|
|
|
4902
4902
|
color: var(--ink-muted);
|
|
4903
4903
|
white-space: nowrap;
|
|
4904
4904
|
}
|
|
4905
|
+
/* No line numbers: the code starts 16 px in, like the header text. */
|
|
4906
|
+
.ui-cv.no-nums .ui-cv-text {
|
|
4907
|
+
margin-left: var(--space-4);
|
|
4908
|
+
padding-right: var(--space-4);
|
|
4909
|
+
}
|
|
4910
|
+
/* KB: a Markdown code block has a low header (32 px) with no rule under it. */
|
|
4911
|
+
.ui-md-code .ui-cv-head {
|
|
4912
|
+
min-height: 32px;
|
|
4913
|
+
padding-left: var(--space-4);
|
|
4914
|
+
border-bottom: 0;
|
|
4915
|
+
}
|
|
4916
|
+
.ui-md-code .ui-cv-body {
|
|
4917
|
+
padding: 2px 0 10px;
|
|
4918
|
+
}
|
|
4919
|
+
/* A small copy icon at the right of the header, as in Suggestion; 48 px on phones. */
|
|
4920
|
+
.ui-cv-copy {
|
|
4921
|
+
flex: 0 0 auto;
|
|
4922
|
+
width: 32px;
|
|
4923
|
+
height: 32px;
|
|
4924
|
+
margin-right: calc(-1 * var(--space-1));
|
|
4925
|
+
border-color: transparent;
|
|
4926
|
+
}
|
|
4927
|
+
.ui-cv-lang + .ui-cv-copy {
|
|
4928
|
+
margin-left: 0;
|
|
4929
|
+
}
|
|
4930
|
+
.ui-cv-copy:first-child,
|
|
4931
|
+
.ui-cv-file + .ui-cv-copy,
|
|
4932
|
+
.ui-cv-title + .ui-cv-copy {
|
|
4933
|
+
margin-left: auto;
|
|
4934
|
+
}
|
|
4935
|
+
.ui-cv-copy:hover {
|
|
4936
|
+
background: var(--surface);
|
|
4937
|
+
}
|
|
4938
|
+
.ui-cv-copy.is-copied {
|
|
4939
|
+
color: var(--success-text);
|
|
4940
|
+
}
|
|
4941
|
+
@media (max-width: 599px) {
|
|
4942
|
+
.ui-cv-copy {
|
|
4943
|
+
width: var(--touch-target);
|
|
4944
|
+
height: var(--touch-target);
|
|
4945
|
+
}
|
|
4946
|
+
}
|
|
4905
4947
|
.ui-cv-body {
|
|
4906
4948
|
margin: 0;
|
|
4907
4949
|
padding: 6px 0;
|
|
@@ -4933,7 +4975,8 @@ html.ui-theme-fade * {
|
|
|
4933
4975
|
.ui-cv-num {
|
|
4934
4976
|
flex: 0 0 auto;
|
|
4935
4977
|
box-sizing: border-box;
|
|
4936
|
-
|
|
4978
|
+
/* VA: off the left edge, and clear of the code. */
|
|
4979
|
+
padding: 0 var(--space-4) 0 var(--space-3);
|
|
4937
4980
|
text-align: right;
|
|
4938
4981
|
color: var(--ink-muted);
|
|
4939
4982
|
font-variant-numeric: tabular-nums;
|
|
@@ -6054,3 +6097,240 @@ html.ui-theme-fade * {
|
|
|
6054
6097
|
border-radius: var(--radius-sm);
|
|
6055
6098
|
box-shadow: 0 0 0 3px var(--focus-ring);
|
|
6056
6099
|
}
|
|
6100
|
+
|
|
6101
|
+
/* Section: a part of a page that closes to its title and a one-line summary (SLR4LANG). */
|
|
6102
|
+
.ui-sec + .ui-sec {
|
|
6103
|
+
border-top: 1px solid var(--line);
|
|
6104
|
+
}
|
|
6105
|
+
.ui-sec-h {
|
|
6106
|
+
margin: 0;
|
|
6107
|
+
font: inherit;
|
|
6108
|
+
}
|
|
6109
|
+
.ui-sec-btn {
|
|
6110
|
+
display: flex;
|
|
6111
|
+
align-items: center;
|
|
6112
|
+
gap: var(--space-2);
|
|
6113
|
+
width: 100%;
|
|
6114
|
+
min-height: 48px;
|
|
6115
|
+
padding: var(--space-2) 0;
|
|
6116
|
+
border: 0;
|
|
6117
|
+
border-radius: var(--radius-sm);
|
|
6118
|
+
background: none;
|
|
6119
|
+
color: var(--ink);
|
|
6120
|
+
font: inherit;
|
|
6121
|
+
text-align: left;
|
|
6122
|
+
cursor: pointer;
|
|
6123
|
+
}
|
|
6124
|
+
.ui-sec-btn:focus-visible {
|
|
6125
|
+
outline: 2px solid var(--focus-ring, var(--accent));
|
|
6126
|
+
outline-offset: 2px;
|
|
6127
|
+
}
|
|
6128
|
+
.ui-sec-caret {
|
|
6129
|
+
flex: none;
|
|
6130
|
+
color: var(--ink-muted);
|
|
6131
|
+
transition: transform 260ms ease;
|
|
6132
|
+
}
|
|
6133
|
+
.ui-sec.is-open .ui-sec-caret {
|
|
6134
|
+
transform: rotate(90deg);
|
|
6135
|
+
}
|
|
6136
|
+
.ui-sec-title {
|
|
6137
|
+
flex: none;
|
|
6138
|
+
max-width: 100%;
|
|
6139
|
+
font-size: 20px;
|
|
6140
|
+
line-height: 28px;
|
|
6141
|
+
font-weight: 700;
|
|
6142
|
+
white-space: nowrap;
|
|
6143
|
+
overflow: hidden;
|
|
6144
|
+
text-overflow: ellipsis;
|
|
6145
|
+
}
|
|
6146
|
+
.ui-sec-sum {
|
|
6147
|
+
flex: 1 1 auto;
|
|
6148
|
+
min-width: 0;
|
|
6149
|
+
padding-left: var(--space-1);
|
|
6150
|
+
color: var(--ink-muted);
|
|
6151
|
+
font-size: 13px;
|
|
6152
|
+
line-height: 20px;
|
|
6153
|
+
font-weight: 400;
|
|
6154
|
+
white-space: nowrap;
|
|
6155
|
+
overflow: hidden;
|
|
6156
|
+
text-overflow: ellipsis;
|
|
6157
|
+
}
|
|
6158
|
+
.ui-sec-body {
|
|
6159
|
+
display: grid;
|
|
6160
|
+
grid-template-rows: 0fr;
|
|
6161
|
+
transition: grid-template-rows 260ms ease;
|
|
6162
|
+
}
|
|
6163
|
+
.ui-sec.is-open > .ui-sec-body {
|
|
6164
|
+
grid-template-rows: 1fr;
|
|
6165
|
+
}
|
|
6166
|
+
.ui-sec-in {
|
|
6167
|
+
min-height: 0;
|
|
6168
|
+
overflow: hidden;
|
|
6169
|
+
}
|
|
6170
|
+
.ui-sec-content {
|
|
6171
|
+
padding: var(--space-1) 0 var(--space-4);
|
|
6172
|
+
}
|
|
6173
|
+
.ui-sec-bar {
|
|
6174
|
+
display: flex;
|
|
6175
|
+
flex-wrap: wrap;
|
|
6176
|
+
justify-content: flex-end;
|
|
6177
|
+
gap: var(--space-2);
|
|
6178
|
+
padding-bottom: var(--space-2);
|
|
6179
|
+
}
|
|
6180
|
+
@media (prefers-reduced-motion: reduce) {
|
|
6181
|
+
.ui-sec-caret,
|
|
6182
|
+
.ui-sec-body {
|
|
6183
|
+
transition: none;
|
|
6184
|
+
}
|
|
6185
|
+
}
|
|
6186
|
+
|
|
6187
|
+
/* Markdown: project documents and code comments in the system's type; # is an h4 (20 px). */
|
|
6188
|
+
.ui-md {
|
|
6189
|
+
font-size: 16px;
|
|
6190
|
+
line-height: 1.65;
|
|
6191
|
+
color: var(--ink);
|
|
6192
|
+
overflow-wrap: anywhere;
|
|
6193
|
+
}
|
|
6194
|
+
.ui-md.is-small {
|
|
6195
|
+
font-size: 13px;
|
|
6196
|
+
line-height: 20px;
|
|
6197
|
+
}
|
|
6198
|
+
.ui-md > :first-child {
|
|
6199
|
+
margin-top: 0;
|
|
6200
|
+
}
|
|
6201
|
+
.ui-md > :last-child {
|
|
6202
|
+
margin-bottom: 0;
|
|
6203
|
+
}
|
|
6204
|
+
.ui-md p,
|
|
6205
|
+
.ui-md ul,
|
|
6206
|
+
.ui-md ol,
|
|
6207
|
+
.ui-md blockquote,
|
|
6208
|
+
.ui-md hr,
|
|
6209
|
+
.ui-md .ui-md-code,
|
|
6210
|
+
.ui-md .ui-md-table-wrap {
|
|
6211
|
+
margin: 0 0 var(--space-3);
|
|
6212
|
+
}
|
|
6213
|
+
.ui-md h4.ui-md-h {
|
|
6214
|
+
margin: var(--space-5) 0 var(--space-2);
|
|
6215
|
+
font-size: 20px;
|
|
6216
|
+
line-height: 28px;
|
|
6217
|
+
font-weight: 700;
|
|
6218
|
+
}
|
|
6219
|
+
.ui-md h5.ui-md-h,
|
|
6220
|
+
.ui-md h6.ui-md-h,
|
|
6221
|
+
.ui-md h3.ui-md-h {
|
|
6222
|
+
margin: var(--space-4) 0 var(--space-1);
|
|
6223
|
+
font-size: 1em;
|
|
6224
|
+
line-height: inherit;
|
|
6225
|
+
font-weight: 700;
|
|
6226
|
+
}
|
|
6227
|
+
.ui-md h3.ui-md-h {
|
|
6228
|
+
font-size: 25px;
|
|
6229
|
+
line-height: 32px;
|
|
6230
|
+
}
|
|
6231
|
+
.ui-md.is-small h4.ui-md-h {
|
|
6232
|
+
font-size: 13px;
|
|
6233
|
+
line-height: 20px;
|
|
6234
|
+
}
|
|
6235
|
+
.ui-md ul,
|
|
6236
|
+
.ui-md ol {
|
|
6237
|
+
padding-left: var(--space-6);
|
|
6238
|
+
}
|
|
6239
|
+
.ui-md li > ul,
|
|
6240
|
+
.ui-md li > ol,
|
|
6241
|
+
.ui-md li > p {
|
|
6242
|
+
margin: var(--space-1) 0 0;
|
|
6243
|
+
}
|
|
6244
|
+
.ui-md blockquote {
|
|
6245
|
+
padding-left: var(--space-3);
|
|
6246
|
+
border-left: 3px solid var(--line);
|
|
6247
|
+
color: var(--ink-muted);
|
|
6248
|
+
}
|
|
6249
|
+
.ui-md hr {
|
|
6250
|
+
height: 0;
|
|
6251
|
+
border: 0;
|
|
6252
|
+
border-top: 1px solid var(--line);
|
|
6253
|
+
}
|
|
6254
|
+
.ui-md-link {
|
|
6255
|
+
padding: 0;
|
|
6256
|
+
border: 0;
|
|
6257
|
+
background: none;
|
|
6258
|
+
color: var(--accent-text);
|
|
6259
|
+
font: inherit;
|
|
6260
|
+
text-decoration: underline;
|
|
6261
|
+
text-underline-offset: 2px;
|
|
6262
|
+
cursor: pointer;
|
|
6263
|
+
}
|
|
6264
|
+
.ui-md-table-wrap {
|
|
6265
|
+
max-width: 100%;
|
|
6266
|
+
overflow-x: auto;
|
|
6267
|
+
border-radius: var(--radius-sm);
|
|
6268
|
+
box-shadow: 0 0 0 1px var(--line);
|
|
6269
|
+
}
|
|
6270
|
+
.ui-md-table {
|
|
6271
|
+
border-collapse: collapse;
|
|
6272
|
+
min-width: 100%;
|
|
6273
|
+
font-size: 14px;
|
|
6274
|
+
line-height: 20px;
|
|
6275
|
+
}
|
|
6276
|
+
.ui-md-table th {
|
|
6277
|
+
background: var(--surface-sub);
|
|
6278
|
+
font-weight: 700;
|
|
6279
|
+
text-align: left;
|
|
6280
|
+
white-space: nowrap;
|
|
6281
|
+
}
|
|
6282
|
+
.ui-md-table th,
|
|
6283
|
+
.ui-md-table td {
|
|
6284
|
+
padding: 10px 12px;
|
|
6285
|
+
border-right: 1px solid var(--line);
|
|
6286
|
+
border-bottom: 1px solid var(--line);
|
|
6287
|
+
vertical-align: top;
|
|
6288
|
+
}
|
|
6289
|
+
.ui-md-table th:last-child,
|
|
6290
|
+
.ui-md-table td:last-child {
|
|
6291
|
+
border-right: 0;
|
|
6292
|
+
}
|
|
6293
|
+
.ui-md-table tbody tr:last-child td {
|
|
6294
|
+
border-bottom: 0;
|
|
6295
|
+
}
|
|
6296
|
+
.ui-md-table tbody tr:nth-child(even) {
|
|
6297
|
+
background: var(--surface-sub);
|
|
6298
|
+
}
|
|
6299
|
+
.ui-md-table td.is-num {
|
|
6300
|
+
font-family: var(--font-mono);
|
|
6301
|
+
font-variant-numeric: tabular-nums;
|
|
6302
|
+
white-space: nowrap;
|
|
6303
|
+
}
|
|
6304
|
+
|
|
6305
|
+
/* DetailList labelWidth="auto": the label column as wide as the longest label (at most 40 %), on every row. */
|
|
6306
|
+
.ui-dl.is-auto {
|
|
6307
|
+
display: grid;
|
|
6308
|
+
grid-template-columns: fit-content(40%) minmax(0, 1fr);
|
|
6309
|
+
column-gap: var(--space-6);
|
|
6310
|
+
}
|
|
6311
|
+
.ui-dl.is-auto > .ui-dl-item {
|
|
6312
|
+
grid-column: 1 / -1;
|
|
6313
|
+
grid-template-columns: subgrid;
|
|
6314
|
+
column-gap: var(--space-6);
|
|
6315
|
+
}
|
|
6316
|
+
.ui-dl.is-fixed > .ui-dl-item {
|
|
6317
|
+
grid-template-columns: var(--dl-label) minmax(0, 1fr);
|
|
6318
|
+
}
|
|
6319
|
+
/* labelSize="body": the label in the value's size and the ink color. */
|
|
6320
|
+
.ui-dl.is-body .ui-dl-item dt {
|
|
6321
|
+
color: var(--ink);
|
|
6322
|
+
font-size: inherit;
|
|
6323
|
+
line-height: inherit;
|
|
6324
|
+
}
|
|
6325
|
+
@container (max-width: 599px) {
|
|
6326
|
+
.ui-dl.is-auto > .ui-dl-item {
|
|
6327
|
+
display: block;
|
|
6328
|
+
}
|
|
6329
|
+
.ui-dl.is-fixed > .ui-dl-item {
|
|
6330
|
+
grid-template-columns: minmax(0, 1fr);
|
|
6331
|
+
}
|
|
6332
|
+
.ui-dl.is-body .ui-dl-item dt {
|
|
6333
|
+
font-size: 13px;
|
|
6334
|
+
line-height: 20px;
|
|
6335
|
+
}
|
|
6336
|
+
}
|
package/docs/CodeView.md
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
有行號的程式碼檢視,用在詳細卡片的原始碼、檢查筆記的引用。
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
- 行號:灰色等寬數字靠右,沒有底色和分隔線;左邊留 12 px(和標題列的檔名對齊),和程式碼隔 16 px。可以選取複製程式碼,不會連行號一起複製。`lineNumbers={false}` 不顯示行號,給沒有人會引用行號的短片段用;螢幕閱讀器仍念「第 n 行」。
|
|
6
6
|
- 目標行(`target`,一行或 `[from, to]`):淡強調色底,左側 3 px 強調色細條,行號變粗。有 `maxHeight` 時會自動捲到目標行。
|
|
7
7
|
- 太長的行自動換行,續行縮排 4 個字元寬,縮排裡有一條 2 px 的灰色直線(`line-strong`),看得出是同一行的接續,不是下一行程式。優先在逗號、句點和左括號後面換行;`->`、`==`、`&&` 這類運算子不會從中間斷開。不用橫向捲動。
|
|
8
8
|
- 語法上色:關鍵字藍、常數與字串綠、註解灰色斜體,其他是文字顏色。語言看 `file` 的副檔名(c、h、cpp、js、ts、py、sh),或用 `language` 指定;`highlight={false}` 關掉。內建的上色只認這幾種語言;其他語言給 `tokenizer`,把每行切成 `[class, 文字]`(class 是 `is-keyword`、`is-constant`、`is-comment`、`is-string` 或空字串)。
|
|
9
9
|
- 手機上(寬度小於 600 px)只顯示目標行前後 2 行(`context`),下方「顯示全部 N 行」。
|
|
10
10
|
- 標題列:`file` 顯示路徑,給 `fileHref` 或 `onFile` 變成連結;右邊用次要文字色寫程式語言,是純文字不是按鈕,C 寫成「C 語言」(單一個「C」看起來像按鈕),螢幕閱讀器讀「程式語言:C 語言」。`languageLabel` 換掉這個字,`false` 不顯示。沒有檔案時可以給 `title`。
|
|
11
11
|
- 註解和字串裡的路徑可以變成連結:給 `refHref: (path) => 連結`(回傳 `undefined` 的不變)或 `onRef: (path, e) => …`,和 `CodeText` 一樣。算路徑的:有資料夾和副檔名的(`docs/design/ring-overrun.md`)、檔名加行號(`ring.c:42`、`src/app.c:86-90`);程式碼本身和只有檔名的(`printf.h`)不算。有連結時是 `<a>`,只有 `onRef` 時是按鈕;強調文字色、底線。
|
|
12
|
-
-
|
|
12
|
+
- 複製:`copy` 在標題列最右邊(語言標示的右側)放一個複製的小圖示(32 px,手機 48 px),複製整段程式碼後 2 秒變成勾,提示「已複製」;沒有 `file`、`title` 時也會顯示標題列。`onCopy`、`onCopyError` 接手結果,例如複製失敗時用 Toast 說明。預設不顯示;Markdown 的程式碼區塊預設顯示。
|
|
13
13
|
|
|
14
14
|
```js
|
|
15
15
|
h(UI.CodeView, {
|
package/docs/DetailList.md
CHANGED
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
- 寬度 600 px 以上:欄位名稱在左(13 px 次要文字,不換行)、值在右。
|
|
6
6
|
- 比較窄時:名稱在上、值在下,全部靠左,和手機表格卡片一致。依照元件本身的寬度切換。
|
|
7
7
|
- 值可以放任何元素:`UI.InlineCode` 連結、`UI.Tag`、`UI.Badge`。
|
|
8
|
+
- 寬面板(例如 1300 px 的側邊面板):設 `labelWidth: 'auto'` 與 `labelSize: 'body'`。左欄寬度依最長的名稱(最多 40%),每列對齊,名稱和值隔 24 px;名稱改成和值同字級(16 px)、ink 色。600 px 以下仍是名稱在上、值在下,名稱 13 px。
|
|
9
|
+
|
|
10
|
+
| Prop | 說明 |
|
|
11
|
+
|---|---|
|
|
12
|
+
| `labelWidth` | 左欄寬度。預設 30%(至少 96 px);`'auto'` 依最長的名稱;數字是固定 px。 |
|
|
13
|
+
| `labelSize` | `'small'`(預設)13 px 次要色;`'body'` 與值同字級、ink 色。 |
|
|
8
14
|
|
|
9
15
|
```js
|
|
10
16
|
h(UI.DetailList, {
|
package/docs/Markdown.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Markdown
|
|
2
|
+
|
|
3
|
+
顯示專案文件與程式註解裡的 Markdown,例如 README.md 的摘錄、檔案開頭的註解、側邊面板裡 .md 檔的預覽。
|
|
4
|
+
|
|
5
|
+
- 支援:段落與換行、標題、粗體、斜體、行內程式碼(`UI.InlineCode`)、程式碼區塊(`UI.CodeView`,依語言上色;32 px 的矮標題列只有語言名稱和複製的小圖示,沒有分隔線也沒有行號,程式碼左右留 16 px)、連結、項目與編號清單(可巢狀)、引用、表格、水平線。圖片只顯示替代文字,不載入。
|
|
6
|
+
- 標題降級:`#` 顯示成 h4(20 px),`##` 是 h5,`###` 以下是 h6(兩者都是 16 px 粗體)。用 `topLevel` 改 `#` 對應的層級。
|
|
7
|
+
- 字級:正文和周圍文字同字級(16 px);`size="small"` 是 13 px,給註記用。
|
|
8
|
+
- 表格:灰底粗體表頭、斑馬紋加格線;全是數字的欄自動靠右、等寬數字。比容器寬時左右捲動。
|
|
9
|
+
- 換行:同一段裡的換行接成空格,中文字或全形標點旁邊不加空格;行尾兩個空格或反斜線是強制換行。
|
|
10
|
+
|
|
11
|
+
## 安全
|
|
12
|
+
|
|
13
|
+
- 不執行任何 HTML。原文裡的 HTML 標籤與註解直接去掉,只留標籤之間的文字(`<details>評分細節</details>` 顯示成「評分細節」)。
|
|
14
|
+
- 連結只允許 http、https、mailto 與相對路徑;`javascript:`、`data:` 等其他網址只顯示文字。
|
|
15
|
+
|
|
16
|
+
## 連結與路徑
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
h(
|
|
20
|
+
UI.Markdown,
|
|
21
|
+
{
|
|
22
|
+
linkHref: function (href) {
|
|
23
|
+
return '#open=' + href;
|
|
24
|
+
}, // 連結的網址;回傳 undefined 表示不做連結
|
|
25
|
+
onLink: function (href, e) {
|
|
26
|
+
openInPanel(href);
|
|
27
|
+
}, // 一般點擊(Ctrl、⌘、Shift 仍照 linkHref 開新分頁)
|
|
28
|
+
refHref: function (ref) {
|
|
29
|
+
return '#code=' + ref;
|
|
30
|
+
}, // 行內程式碼是路徑時,例如 `harness/routing.py:108`
|
|
31
|
+
onRef: function (ref, e) {
|
|
32
|
+
openInPanel(ref);
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
readme,
|
|
36
|
+
);
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
- 行內程式碼是路徑(有資料夾的檔名 `docs/a.md`,或檔名加行號 `routing.py:108`)時走 `refHref`、`onRef`,和 CodeView、CodeText 一致;`make` 這類一般程式碼不是連結。程式碼區塊裡註解與字串中的路徑也一樣。
|
|
40
|
+
- 沒有給 `linkHref` 時連結照原網址;外部網址在新分頁開啟。
|
|
41
|
+
|
|
42
|
+
## inline
|
|
43
|
+
|
|
44
|
+
只渲染行內語法、不產生段落,給一行摘要用,例如 README 的第一句:
|
|
45
|
+
|
|
46
|
+
```js
|
|
47
|
+
h(UI.Markdown, { inline: true }, '先跑 `make`,再用 **harness/run.sh** 啟動。');
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## .md 檔的「原始碼/預覽」
|
|
51
|
+
|
|
52
|
+
CodeView 不內建預覽:由使用的地方在面板上方放 `UI.Tabs`(「原始碼」「預覽」),原始碼用 CodeView,預覽用 Markdown。
|
|
53
|
+
|
|
54
|
+
- 預覽沒有行號。連到某一行的位置(`README.md:12`、CodeView 的 `target`)時,切回「原始碼」分頁再捲到那一行。
|
|
55
|
+
- 預覽裡的連結和路徑交給同一組 `onLink`、`onRef`,例如在側邊面板開啟另一個檔案。
|
package/docs/Section.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Section
|
|
2
|
+
|
|
3
|
+
一頁裡可以收合的一段內容,例如程式碼地圖的「概觀」、設定頁或報告頁的分段。收合時仍看得到標題和一行摘要。
|
|
4
|
+
|
|
5
|
+
- 外觀:標題 20 px 粗體(h4 字級),比 16 px 的內容大;標題左邊有箭頭,展開時轉 90 度。標題右邊同一行是一行摘要(13 px、次要文字色),放不下時以「…」截斷。段落之間一條細線(`line`)。
|
|
6
|
+
- 動畫:展開與收合 260 ms,和 TreeList 子項目長出來一樣;`prefers-reduced-motion` 時不做動畫。
|
|
7
|
+
- 標題列是 `<h3>` 裡的 `<button>`,帶 `aria-expanded` 與 `aria-controls`;Enter 與空白鍵切換。螢幕閱讀器的標題清單找得到每一段。用 `level` 改標題層級,大小不變。
|
|
8
|
+
- 摘要是按鈕的一部分,會跟著標題念出來;不要放連結或按鈕。
|
|
9
|
+
|
|
10
|
+
```js
|
|
11
|
+
h(UI.Section, { id: 'external', title: '外部指令', summary: '29 個指令、4 個 namespace、3 個沒有逾時', lazy: true },
|
|
12
|
+
h(UI.DataTable, { /* … */ }),
|
|
13
|
+
);
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Props
|
|
17
|
+
|
|
18
|
+
| Prop | 說明 |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `title` | 段落標題。 |
|
|
21
|
+
| `summary` | 標題右邊的一行重點,收合時也顯示。可放 ReactNode,但不放互動元素。 |
|
|
22
|
+
| `defaultOpen` | 不受控:一開始是否展開,預設 `false`。有記住的狀態(`storageKey`)時以記住的為準。 |
|
|
23
|
+
| `open`、`onOpenChange` | 受控用法。點標題、網址跳到這段、「全部展開/全部收合」都會呼叫 `onOpenChange`。 |
|
|
24
|
+
| `id` | 錨點。網址 hash 是這個 id(載入時,或點了頁內的 `#id` 連結)時自動展開,並捲到標題。 |
|
|
25
|
+
| `lazy` | 收合時完全不渲染內容。預設 `false`:內容留在頁面上但隱藏(`hidden="until-found"`),瀏覽器的頁內搜尋(Ctrl+F)找到裡面的字時自動展開。很長的段落(例如上百筆的表格)再設 `lazy`。 |
|
|
26
|
+
| `storageKey` | 用這個 key 把開合狀態存在 localStorage(`ui-section:<key>`)。讀寫失敗時照常運作,只是不記住。 |
|
|
27
|
+
| `level` | 標題的 heading 層級,預設 3。 |
|
|
28
|
+
|
|
29
|
+
## SectionGroup
|
|
30
|
+
|
|
31
|
+
一組 Section,上方右側有「全部展開」與「全部收合」兩個按鈕,各帶圖示;全部已展開時「全部展開」停用,全部已收合時「全部收合」停用。
|
|
32
|
+
|
|
33
|
+
```js
|
|
34
|
+
h(UI.SectionGroup, { actions: h(UI.Button, { icon: 'link' }, '複製連結') },
|
|
35
|
+
h(UI.Section, { title: '元件', summary: '6 個元件、138 個函式', defaultOpen: true }, '…'),
|
|
36
|
+
h(UI.Section, { title: '進入與結束', summary: '2 個進入點', defaultOpen: true }, '…'),
|
|
37
|
+
h(UI.Section, { title: '外部指令', summary: '29 個指令', lazy: true }, '…'),
|
|
38
|
+
);
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
- `actions`:同一列、兩個按鈕左邊的其他控制項。
|
|
42
|
+
- 受控的 Section 也會收到「全部展開/全部收合」:由它的 `onOpenChange` 處理。
|
package/docs/guidelines.md
CHANGED
|
@@ -220,7 +220,9 @@
|
|
|
220
220
|
|
|
221
221
|
## 詳細資訊與操作
|
|
222
222
|
|
|
223
|
-
- 一個項目的詳細欄位用 `DetailList`:寬度 600 px
|
|
223
|
+
- 一個項目的詳細欄位用 `DetailList`:寬度 600 px 以上時欄位名稱在左、值在右;比較窄時名稱在上、值在下,和手機表格卡片一致。寬面板(約 1300 px)用 `labelWidth: 'auto'`(左欄依最長的名稱)與 `labelSize: 'body'`(名稱和值同字級、ink 色)。
|
|
224
|
+
- 可以收合的段落用 `Section`:標題 20 px 粗體,左邊箭頭,右邊同一行一行次要色的重點摘要(收合時也顯示);段落之間一條細線;展開與收合 260 ms。收合的內容留在頁面上,頁內搜尋找到時自動展開;很長的段落設 `lazy`。一組段落用 `SectionGroup`,上方右側有帶圖示的「全部展開」「全部收合」。
|
|
225
|
+
- 專案文件與程式註解的 Markdown 用 `Markdown`:正文 16 px,`#` 顯示成 h4;不執行 HTML,標籤去掉只留文字;程式碼區塊是 CodeView,右上有複製的小圖示;.md 檔的「原始碼/預覽」由頁面放 Tabs 切換。
|
|
224
226
|
- 卡片上的多個操作用 `ActionBar`:寬度小於 600 px 時,最常用的一個是全寬的主要按鈕,其他收進右邊的「⋯」選單;比較寬時並排。
|
|
225
227
|
|
|
226
228
|
## 文字語氣
|
package/docs/motion.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seanyeh77/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "SeanYeh's design system: typed React components on Base UI, styled with design tokens.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Hsiu-An Yeh",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"react-dom": "^19.3.1",
|
|
50
50
|
"tsdown": "^0.23.7",
|
|
51
51
|
"vitest": "^5.1.0",
|
|
52
|
-
"@seanyeh77/tokens": "^0.
|
|
52
|
+
"@seanyeh77/tokens": "^0.18.0"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@base-ui/react": "^1.9.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format-entry-Bxd5-D9B.js","names":[],"sources":["../src/i18n.ts","../src/format.ts"],"sourcesContent":["/* ---------- i18n and formats ----------\n Every built-in string is the zh-TW text passed through tr(); other languages come from UI.addMessages().\n Dates and numbers go through UI.format, which uses Intl for the current locale. The zh-TW rules are the\n ones the design system chose; other locales use their own conventions from Intl. */\ninterface I18nState {\n locale: string;\n currency: string;\n messages: Record<string, Record<string, string>>;\n}\n\nexport const I18N: I18nState = {\n locale: 'zh-TW',\n currency: 'TWD',\n messages: {\n en: {\n 'Email 或帳號': 'Email or username',\n '{label}:{a} 到 {b}': '{label}: {a} to {b}',\n '{n} 個百分點': '{n} pts',\n 上一頁: 'Previous page',\n 上個月: 'Previous month',\n '上傳失敗,請再試一次。': 'Upload failed. Try again.',\n 下一頁: 'Next page',\n 下個月: 'Next month',\n 主要導覽: 'Main navigation',\n 主題: 'Theme',\n 今天: 'Today',\n 全選: 'Select all',\n 全部: 'All',\n 全部標為已讀: 'Mark all as read',\n '共 {n} 筆': '{n} items',\n 分頁: 'Pagination',\n 刪除: 'Delete',\n 危險操作: 'Danger zone',\n 取消選取: 'Clear selection',\n '可以直接輸入,例如 2026/11/14': 'Type a date, e.g. 2026/11/14',\n 回上一頁: 'Go back',\n 回首頁: 'Go home',\n '完成 ✓': 'Done ✓',\n 密碼: 'Password',\n 展開側邊欄: 'Expand sidebar',\n '已選 {n} 筆': '{n} selected',\n 帳號: 'Username',\n 強調色: 'Accent color',\n '忘記密碼?': 'Forgot password?',\n 找不到符合的選項: 'No matching options',\n '拖放檔案,或 ': 'Drop files here, or ',\n 搜尋: 'Search',\n 操作: 'Actions',\n 收合側邊欄: 'Collapse sidebar',\n 放棄: 'Discard',\n '放棄未儲存的變更?': 'Discard unsaved changes?',\n '{label}?': '{label}?',\n '{name} 上傳進度': 'Upload progress of {name}',\n 左右方向鍵查看每一項的數值: 'Use ← and → to read each value',\n 左右方向鍵查看每一個時間點的數值: 'Use ← and → to read each point',\n '新增「{q}」': 'Add “{q}”',\n '日期格式不正確,請寫成 2026/11/14': 'Invalid date. Use 2026/11/14.',\n 更多操作: 'More actions',\n 更多: 'More',\n 左右滑動: 'Scroll sideways',\n 跳到主要內容: 'Skip to main content',\n 說明: 'Explain',\n 開啟導覽: 'Open navigation',\n 顯示方式: 'View',\n 顯示線上文字: 'Show line labels',\n 線上文字: 'Line labels',\n 圖: 'Diagram',\n 清單: 'List',\n 項目: 'Items',\n 關係: 'Relations',\n 已展開: 'Expanded',\n 已收合: 'Collapsed',\n '已展開,{n} 個子項目': 'Expanded, {n} items',\n '顯示 {n} 筆': 'Showing {n} rows',\n '找到 {n} 筆結果': '{n} results',\n '第 {a} 步,共 {b} 步': 'Step {a} of {b}',\n '說明 {name}': 'Explain {name}',\n 程式碼: 'Code',\n '第 {n} 行': 'Line {n}',\n '第 {n} 層': 'Level {n}',\n 第一行: 'First line',\n 最後一行: 'Last line',\n '上 20 行': '20 lines up',\n '下 20 行': '20 lines down',\n 上一段: 'Previous section',\n 下一段: 'Next section',\n '{name},第 {n} 行': '{name}, line {n}',\n '顯示 {n} 筆,另有 {m} 筆,請輸入更長的字': 'Showing {n}, {m} more: type more to narrow it down',\n '縮排 {n} 格': 'indented {n} spaces',\n '縮排 {n} 個 tab': 'indented {n} tabs',\n '縮排 {a} 個 tab、{b} 格': 'indented {a} tabs and {b} spaces',\n 向右捲動: 'Scroll right',\n 筆: 'rows',\n '1 筆': '1 row',\n // Separators: full-width in Chinese, ASCII and a space in English.\n ',': ', ',\n ':': ': ',\n '。': '. ',\n '來自 {from},{label}': 'From {from}, {label}',\n '{from} 到 {to},{what}': '{from} to {to}, {what}',\n 到: 'to',\n '{label}({inferred})': '{label} ({inferred})',\n 調整面板寬度: 'Resize the panel',\n '主要區域 {a} px,面板 {b} px': 'Main area {a} px, panel {b} px',\n 'repo 外': 'outside the repo',\n 詳細: 'Details',\n '展開 {name}': 'Expand {name}',\n '收合 {name}': 'Collapse {name}',\n 字: 'characters',\n 'C 語言': 'C',\n 程式語言: 'Language',\n 全部頁面: 'All pages',\n '最近 30 天': 'Last 30 days',\n '最近 7 天': 'Last 7 days',\n 期間: 'Period',\n 未讀: 'Unread',\n 本月: 'This month',\n 沒有符合的資料: 'No matching data',\n 沒有通知: 'No notifications',\n 清除: 'Clear',\n 清除搜尋: 'Clear search',\n 登入: 'Sign in',\n 發生錯誤: 'Something went wrong',\n '移除 {name}': 'Remove {name}',\n '第 {a}–{b} 筆,共 {n} 筆': '{a}–{b} of {n}',\n 繼續編輯: 'Keep editing',\n '自訂強調色(色碼)': 'Custom accent color (hex)',\n '色碼格式不正確,例如 #2457d6': 'Invalid hex, e.g. #2457d6',\n 設定分類: 'Settings sections',\n 請輸入密碼: 'Enter your password',\n 請輸入帳號: 'Enter your username',\n 請選擇: 'Select',\n 路徑: 'Breadcrumb',\n 較上週: 'vs last week',\n 載入中: 'Loading',\n '輸入 # 加 6 碼': 'Enter # and 6 digits',\n 通知: 'Notifications',\n '通知,{n} 則未讀': 'Notifications, {n} unread',\n '選取第 {n} 筆': 'Select row {n}',\n 選擇日期: 'Choose date',\n 選擇期間: 'Choose period',\n 選擇檔案: 'choose files',\n 重試: 'Retry',\n 開啟日曆: 'Open calendar',\n 關閉: 'Close',\n '關閉後,剛才的修改不會保留。': 'If you close now, your changes will be lost.',\n 關閉提示: 'Dismiss',\n 隱藏密碼: 'Hide password',\n 顯示密碼: 'Show password',\n '(今天)': ' (today)',\n 伺服器暫時無法回應: 'The server is not responding',\n 找不到這個頁面: 'Page not found',\n 沒有權限查看這個頁面: 'You do not have access to this page',\n '網址可能打錯了,或這個頁面已經移除。': 'The address may be wrong, or the page has been removed.',\n '這個問題已經記錄下來,請稍後重新整理再試。': 'The problem has been logged. Refresh the page later.',\n '請向管理員申請權限,或切換成有權限的帳號。': 'Ask an admin for access, or switch to an account that has it.',\n 自動: 'Auto',\n 淺色: 'Light',\n 深色: 'Dark',\n 藍: 'Blue',\n 靛: 'Indigo',\n 紫: 'Purple',\n 桃紅: 'Pink',\n 紅: 'Red',\n 橘: 'Orange',\n 綠: 'Green',\n 青: 'Teal',\n 草稿: 'Draft',\n 進行中: 'In progress',\n 審核中: 'In review',\n 完成: 'Done',\n 失敗: 'Failed',\n 檢視: 'Views',\n '{n} / {total} 筆': '{n} / {total}',\n '{n} / {total} {unit}': '{n} / {total} {unit}',\n '{n} / {total}': '{n} / {total}',\n '{total} {unit}中的 {n} {unit}': '{n} of {total} {unit}',\n '{total} 中的 {n}': '{n} of {total}',\n 欄位: 'Columns',\n 顯示的欄位: 'Visible columns',\n 清除篩選: 'Clear filters',\n 清除全部: 'Clear all',\n 篩選: 'Filter',\n 最低: 'Min',\n 最高: 'Max',\n '合計 {n} 筆': 'Total: {n}',\n 平均: 'Avg',\n '選取 {name}': 'Select {name}',\n '{n} 個新': '{n} new',\n '{n} 個檔案': '{n} files',\n '下載 {name}': 'Download {name}',\n '已選 {n} 個檔案': '{n} files selected',\n '共 {size}': '{size} total',\n 清除選取: 'Clear selection',\n 下載: 'Download',\n 全部展開: 'Expand all',\n 全部收合: 'Collapse all',\n 這裡還沒有檔案: 'No files here yet',\n 顯示全部: 'Show all',\n 收合: 'Show less',\n 依狀態篩選: 'Filter by status',\n 展開: 'Expand',\n 沒有項目: 'Nothing here',\n 即時: 'Live',\n 已過期: 'Stale',\n 離線: 'Offline',\n 切換專案: 'Switch project',\n '切換專案,目前是 {name}': 'Switch project, now {name}',\n 推測: 'Inferred',\n '{n} 個項目': '{n} items',\n '1 個項目': '1 item',\n '{a} 個項目使用,共 {b} 次': 'Used {b} times by {a} items',\n 共用項目: 'Shared',\n 次數越多線越粗: 'Thicker lines mean more often',\n 架構圖: 'Architecture',\n '{n} 次': '{n} calls',\n '1 次': '1 call',\n 原始碼: 'Source',\n '顯示全部 {n} 行': 'Show all {n} lines',\n '只顯示第 {n} 行前後': 'Show only around line {n}',\n '無法載入 {name} 的子項目': 'Could not load the children of {name}',\n '找不到符合「{q}」的結果': 'No results for “{q}”',\n 輸入名稱開始搜尋: 'Type a name to search',\n 搜尋中: 'Searching',\n 搜尋結果: 'Search results',\n 最近開啟: 'Recently opened',\n 選擇: 'Select',\n 打開: 'Open',\n 取消: 'Cancel',\n 略過: 'Skip',\n 上一步: 'Back',\n 下一步: 'Next',\n 建議修正: 'Suggested fix',\n 複製修正: 'Copy fix',\n 已複製: 'Copied',\n '原本:': 'Before: ',\n '改成:': 'After: ',\n 關閉說明: 'Close explanation',\n '(說明)': ' (explain)',\n '搜尋({k})': 'Search ({k})',\n 確定的關係: 'Confirmed',\n 推測的關係: 'Inferred',\n 專案宣告的關係: 'Declared by the project',\n 宣告: 'Declared',\n 外部項目: 'External',\n },\n },\n};\n\nfunction msgsFor(loc: string): Record<string, string> | null {\n return I18N.messages[loc] || I18N.messages[loc.split('-')[0]] || null;\n}\n\n/** Translates a built-in zh-TW string into the current locale; {name} placeholders take vars. */\nexport function tr(key: string, vars?: Record<string, string | number>): string {\n // zh-TW (and zh-Hant) is the source text; other Chinese locales (zh-CN) use the messages an app adds for them.\n const m = isZhTW() ? null : msgsFor(I18N.locale);\n const out = m?.[key] ?? key;\n return vars ? out.replace(/\\{(\\w+)\\}/g, (a, k: string) => (vars[k] !== undefined ? String(vars[k]) : a)) : out;\n}\n\n/** A count's unit: a function gets the count (for plurals, 「1 row」「2 rows」); a string goes through tr(), and for 1\n * the message 「1 <unit>」 is used when the locale has one (「1 筆」 → 「1 row」), without the number. */\nexport type CountUnit = string | ((n: number) => string);\nexport function unitFor(unit: CountUnit | undefined, n: number): string {\n if (!unit) return '';\n if (typeof unit === 'function') return unit(n);\n if (n === 1) {\n const one = tr('1 ' + unit);\n if (one !== '1 ' + unit) return one.replace(/^1\\s*/, '');\n }\n return tr(unit);\n}\n\n/** Switches the interface language and, optionally, the currency used by format.money. */\nexport function setLocale(locale: string, opts?: { currency?: string }): void {\n I18N.locale = locale || 'zh-TW';\n if (opts?.currency) I18N.currency = opts.currency;\n if (typeof document !== 'undefined') document.documentElement.setAttribute('lang', I18N.locale);\n}\n\n/** Adds or overrides translations for a locale. Keys are the zh-TW strings. */\nexport function addMessages(locale: string, dict: Record<string, string>): void {\n I18N.messages[locale] = { ...I18N.messages[locale], ...dict };\n}\n\nexport const isZhTW = (): boolean => /^zh-(TW|Hant)/i.test(I18N.locale);\n","import { I18N, isZhTW, tr } from './i18n';\n\n/* Dates and numbers for the current locale (setLocale). zh-TW follows the design system's rules\n (2026/11/04(三), 24-hour clock, NT$ 1,280, 萬 and 億 in KPI cards); other locales use Intl's conventions. */\n\nexport type Decimals = number | 'money' | 'percent' | 'size' | 'count';\n\nconst DECIMALS = { money: 0, percent: 1, size: 1, count: 0 } as const;\n\nconst pad2 = (n: number): string => String(n).padStart(2, '0');\n\nfunction locale(): string {\n return I18N.locale;\n}\n\n/** zh-TW: 2026/11/04(三). Other locales: their short date with weekday. */\nfunction date(d: Date | null | undefined, o: { weekday?: boolean; long?: boolean } = {}): string {\n if (!d) return '';\n const wd = o.weekday !== false;\n if (o.long) return new Intl.DateTimeFormat(I18N.locale, { year: 'numeric', month: 'long', day: 'numeric', weekday: wd ? 'long' : undefined }).format(d);\n if (isZhTW()) return fmtDate(d) + (wd ? `(${new Intl.DateTimeFormat('zh-TW', { weekday: 'narrow' }).format(d)})` : '');\n return new Intl.DateTimeFormat(I18N.locale, { year: 'numeric', month: '2-digit', day: '2-digit', weekday: wd ? 'short' : undefined }).format(d);\n}\n\n/** zh-TW: 24-hour 15:57. Other locales: their own clock. */\nfunction time(d: Date | null | undefined): string {\n if (!d) return '';\n return new Intl.DateTimeFormat(\n I18N.locale,\n isZhTW() ? { hour: '2-digit', minute: '2-digit', hourCycle: 'h23' } : { hour: 'numeric', minute: '2-digit' },\n ).format(d);\n}\n\nfunction dateTime(d: Date | null | undefined, o?: { weekday?: boolean }): string {\n return d ? `${date(d, o)} ${time(d)}` : '';\n}\n\n/** Within 7 days: 「2 小時前」、「昨天」. Older: full date and time. Pass now to test. */\nfunction relative(d: Date | null | undefined, now: Date = new Date()): string {\n if (!d) return '';\n const s = (now.getTime() - d.getTime()) / 1000;\n if (s < 0 || s >= 604800) return dateTime(d);\n const rt = new Intl.RelativeTimeFormat(I18N.locale, { numeric: 'auto' });\n if (s < 60) return rt.format(0, 'second');\n if (s < 3600) return rt.format(-Math.floor(s / 60), 'minute');\n if (s < 86400) return rt.format(-Math.floor(s / 3600), 'hour');\n return rt.format(-Math.floor(s / 86400), 'day');\n}\n\nfunction month(d: Date): string {\n return new Intl.DateTimeFormat(I18N.locale, { year: 'numeric', month: 'long' }).format(d);\n}\n\n/** Week starts on Sunday for zh-TW; other locales use Intl's week info when the browser has it. */\nfunction firstDay(): number {\n if (isZhTW()) return 0;\n try {\n const l = new Intl.Locale(I18N.locale) as Intl.Locale & { getWeekInfo?: () => { firstDay: number }; weekInfo?: { firstDay: number } };\n const w = l.getWeekInfo ? l.getWeekInfo() : l.weekInfo;\n if (w?.firstDay) return w.firstDay % 7;\n } catch {\n /* older browsers have no week info */\n }\n return 0;\n}\n\n/** Narrow weekday names, starting from firstDay(). */\nfunction weekdays(): string[] {\n const fd = firstDay();\n const f = new Intl.DateTimeFormat(I18N.locale, { weekday: 'narrow' });\n // 2026/11/01 is a Sunday.\n return Array.from({ length: 7 }, (_, i) => f.format(new Date(2026, 10, 1 + ((fd + i) % 7))));\n}\n\n/** Decimals by unit: money 0, percent 1, size 1, count 0; pass a number to force it. */\nfunction number(v: number, dec?: Decimals): string {\n const dd = typeof dec === 'number' ? dec : dec ? DECIMALS[dec] : 0;\n return new Intl.NumberFormat(I18N.locale, { minimumFractionDigits: dd, maximumFractionDigits: dd }).format(v);\n}\n\nfunction percent(v: number, dec = 1): string {\n return new Intl.NumberFormat(I18N.locale, { style: 'percent', minimumFractionDigits: dec, maximumFractionDigits: dec }).format(v / 100);\n}\n\n/** Only KPI cards abbreviate: 1,284 萬 in zh-TW (萬、億), 12.8M in English.\n * like: format v with the unit and decimals that `like` gets, so a counting KPI keeps its width. */\nfunction compact(v: number, like?: number): string {\n const ref = like ?? v;\n if (Math.abs(ref) < 1e4) return number(v);\n if (/^zh/i.test(I18N.locale)) {\n const a = Math.abs(ref);\n const [unit, div, maxDec] = a >= 1e8 ? (['億', 1e8, 2] as const) : (['萬', 1e4, 1] as const);\n const finalStr = new Intl.NumberFormat(I18N.locale, { maximumFractionDigits: maxDec }).format(a / div);\n const sign = v < 0 ? '-' : '';\n if (like === undefined) return `${sign}${finalStr} ${unit}`;\n const digits = (finalStr.split('.')[1] || '').length;\n return `${sign}${new Intl.NumberFormat(I18N.locale, { minimumFractionDigits: digits, maximumFractionDigits: digits }).format(Math.abs(v) / div)} ${unit}`;\n }\n const nf = new Intl.NumberFormat(I18N.locale, { notation: 'compact', maximumFractionDigits: 1 });\n if (like === undefined) return nf.format(v);\n const parts = nf.formatToParts(ref);\n let num = '';\n let dec = '';\n for (const pt of parts) {\n if (pt.type === 'integer') num += pt.value;\n if (pt.type === 'fraction') {\n num += '.' + pt.value;\n dec = pt.value;\n }\n }\n const mant = parseFloat(num) || 1;\n const scale = 10 ** Math.round(Math.log10(Math.abs(ref) / mant));\n const inner = new Intl.NumberFormat(I18N.locale, { minimumFractionDigits: dec.length, maximumFractionDigits: dec.length }).format(Math.abs(v) / scale);\n let done = false;\n const body = parts\n .map((pt) => {\n if (pt.type === 'integer' || pt.type === 'group' || pt.type === 'decimal' || pt.type === 'fraction') {\n if (done) return '';\n done = true;\n return inner;\n }\n return pt.value;\n })\n .join('');\n return (v < 0 && ref >= 0 ? '-' : '') + body;\n}\n\n/** zh-TW with TWD: NT$ 1,280, negatives -NT$ 1,280. Other locales and currencies: Intl's own symbol and order. */\nfunction money(v: number, o: { currency?: string; compact?: boolean; like?: number } = {}): string {\n const cur = o.currency || I18N.currency;\n const body = o.compact ? compact(Math.abs(v), o.like !== undefined ? Math.abs(o.like) : undefined) : number(Math.abs(v), 'money');\n if (isZhTW() && cur === 'TWD') return `${v < 0 ? '-' : ''}NT$ ${body}`;\n if (o.compact) return `${v < 0 ? '-' : ''}${body} ${cur}`;\n return new Intl.NumberFormat(I18N.locale, {\n style: 'currency',\n currency: cur,\n currencyDisplay: 'narrowSymbol',\n minimumFractionDigits: 0,\n maximumFractionDigits: cur === 'TWD' || cur === 'JPY' ? 0 : 2,\n }).format(v);\n}\n\n/** Bytes to 「186 KB」「54.9 MB」「1.2 GB」. */\nexport function fileSize(b: number | null | undefined): string {\n if (b == null || Number.isNaN(b)) return '';\n // An empty file is 0 KB; anything else at least 1 KB.\n if (b < 1048576) return number(b === 0 ? 0 : Math.max(1, Math.round(b / 1024))) + ' KB';\n if (b < 1073741824) return number(b / 1048576, 1) + ' MB';\n return number(b / 1073741824, 1) + ' GB';\n}\n\n/** Shortens a path: keeps the first segment and the last two, 「src/…/hooks/ops.c:58」. */\nfunction path(p: string | null | undefined, o: { head?: number; tail?: number } = {}): string {\n const head = o.head ?? 1;\n const tail = o.tail ?? 2;\n const parts = String(p ?? '').split('/');\n return parts.length > head + tail ? `${parts.slice(0, head).join('/')}/…/${parts.slice(-tail).join('/')}` : String(p ?? '');\n}\n\n/** A part of a whole, as shown: 「1 / 1 個」「6 / 6 筆」, or 「1 / 5」 without a unit. Give screen readers\n * `fractionLabel` with it: they read the slash as 「斜線」. */\nfunction fraction(n: number, total: number, unit?: string): string {\n return tr(unit ? '{n} / {total} {unit}' : '{n} / {total}', { n: number(n), total: number(total), unit: unit ?? '' });\n}\n\n/** The same fraction as read aloud: 「1 個中的 1 個」「6 筆中的 6 筆」, or 「5 中的 1」 without a unit (English:\n * 「1 of 1」). For `aria-label`, or for visually hidden text beside the shown fraction. */\nfunction fractionLabel(n: number, total: number, unit?: string): string {\n return tr(unit ? '{total} {unit}中的 {n} {unit}' : '{total} 中的 {n}', { n: number(n), total: number(total), unit: unit ?? '' });\n}\n\n/** Every date, number, amount, size and path shown in the UI goes through these. */\nexport const format = {\n locale,\n date,\n time,\n dateTime,\n relative,\n month,\n weekdays,\n firstDay,\n number,\n percent,\n compact,\n money,\n fileSize,\n path,\n fraction,\n fractionLabel,\n};\n\n/* Calendar helpers (local dates, no time). */\nexport const fmtDate = (d: Date | null | undefined): string => (d ? `${d.getFullYear()}/${pad2(d.getMonth() + 1)}/${pad2(d.getDate())}` : '');\n\nexport function parseDate(s: string | null | undefined): Date | null {\n const m = /^(\\d{4})\\/(\\d{1,2})\\/(\\d{1,2})$/.exec(s || '');\n if (!m) return null;\n const d = new Date(+m[1], +m[2] - 1, +m[3]);\n return d.getMonth() === +m[2] - 1 ? d : null;\n}\n\nexport const sameDay = (a: Date | null | undefined, b: Date | null | undefined): boolean =>\n !!a && !!b && a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();\n\nexport const dayAdd = (d: Date, n: number): Date => new Date(d.getFullYear(), d.getMonth(), d.getDate() + n);\n"],"mappings":";AAUA,MAAa,OAAkB;CAC7B,QAAQ;CACR,UAAU;CACV,UAAU,EACR,IAAI;EACF,aAAa;EACb,qBAAqB;EACrB,YAAY;EACZ,KAAK;EACL,KAAK;EACL,eAAe;EACf,KAAK;EACL,KAAK;EACL,MAAM;EACN,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,QAAQ;EACR,WAAW;EACX,IAAI;EACJ,IAAI;EACJ,MAAM;EACN,MAAM;EACN,wBAAwB;EACxB,MAAM;EACN,KAAK;EACL,QAAQ;EACR,IAAI;EACJ,OAAO;EACP,YAAY;EACZ,IAAI;EACJ,KAAK;EACL,SAAS;EACT,UAAU;EACV,WAAW;EACX,IAAI;EACJ,IAAI;EACJ,OAAO;EACP,IAAI;EACJ,aAAa;EACb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