haze-ui 1.27.0 → 1.28.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/components/Calendar/Calendar.js +222 -151
- package/dist/components/Cascader/Cascader.js +180 -146
- package/dist/components/Chart/Chart.js +12 -9
- package/dist/components/Chart/chart-elements.js +118 -42
- package/dist/components/CodeBlock/CodeBlock.js +39 -9
- package/dist/components/Combobox/Combobox.js +107 -99
- package/dist/components/DataTable/DataTable.js +224 -221
- package/dist/components/DataTable/csv.js +29 -0
- package/dist/components/DataTable/index.js +3 -2
- package/dist/components/DateRangePicker/DateRangePicker.js +31 -16
- package/dist/components/DateRangePicker/presets.js +43 -0
- package/dist/components/Datepicker/Datepicker.js +12 -11
- package/dist/components/Datepicker/DatepickerCore.js +72 -51
- package/dist/components/Datepicker/datetime.js +23 -0
- package/dist/components/Descriptions/Descriptions.js +46 -0
- package/dist/components/Descriptions/index.js +3 -0
- package/dist/components/DiffViewer/DiffViewer.js +31 -30
- package/dist/components/FilePreview/FilePreview.js +135 -0
- package/dist/components/FilePreview/file-preview-format.js +23 -0
- package/dist/components/FilePreview/index.js +3 -0
- package/dist/components/FloatButton/FloatButton.js +42 -0
- package/dist/components/FloatButton/FloatButtonGroup.js +58 -0
- package/dist/components/FloatButton/float-button-context.js +9 -0
- package/dist/components/FloatButton/float-button-glyphs.js +26 -0
- package/dist/components/FloatButton/float-button-styles.js +14 -0
- package/dist/components/FloatButton/index.js +4 -0
- package/dist/components/InlineCompletion/InlineCompletion.js +81 -0
- package/dist/components/InlineCompletion/index.js +3 -0
- package/dist/components/JsonView/JsonView.js +209 -0
- package/dist/components/JsonView/index.js +3 -0
- package/dist/components/JsonView/json-view-utils.js +24 -0
- package/dist/components/LocaleProvider/index.js +5 -4
- package/dist/components/LocaleProvider/ja-jp.js +222 -0
- package/dist/components/LocaleProvider/locale.js +42 -4
- package/dist/components/LocaleProvider/useStrings.js +13 -11
- package/dist/components/LocaleProvider/zh-cn.js +42 -4
- package/dist/components/Masonry/Masonry.js +29 -0
- package/dist/components/Masonry/index.js +3 -0
- package/dist/components/Masonry/masonry-distribute.js +15 -0
- package/dist/components/Select/Select.js +14 -13
- package/dist/components/Select/SelectCore.js +27 -26
- package/dist/components/Select/SelectFloating.js +76 -68
- package/dist/components/Signature/Signature.js +165 -0
- package/dist/components/Signature/index.js +3 -0
- package/dist/components/Signature/signature-points.js +28 -0
- package/dist/components/Sources/Sources.js +109 -0
- package/dist/components/Sources/index.js +3 -0
- package/dist/components/TagGroup/SortableTagGroup.js +26 -0
- package/dist/components/TagGroup/TagGroup.js +7 -21
- package/dist/components/TagGroup/TagGroupItem.js +1 -1
- package/dist/components/TagGroup/index.js +2 -1
- package/dist/components/TagGroup/tag-group-styles.js +7 -0
- package/dist/components/TagInput/SortableTagInput.js +24 -0
- package/dist/components/TagInput/SortableTagInputCore.js +52 -0
- package/dist/components/TagInput/TagInput.js +9 -10
- package/dist/components/TagInput/TagInputCore.js +61 -84
- package/dist/components/TagInput/index.js +3 -1
- package/dist/components/TagInput/tag-input-styles.js +7 -0
- package/dist/components/Toast/Toast.js +44 -43
- package/dist/components/Tree/Tree.js +184 -121
- package/dist/components/Tree/TreeItem.js +91 -57
- package/dist/components/Tree/utils.js +57 -1
- package/dist/components/Upload/Upload.js +12 -9
- package/dist/components/Upload/UploadCore.js +130 -124
- package/dist/components/Upload/UploadList.js +164 -36
- package/dist/css/bottom-sheet.css +1 -1
- package/dist/css/cascader.css +1 -1
- package/dist/css/datepicker.css +1 -1
- package/dist/css/descriptions.css +2 -0
- package/dist/css/dialog.css +1 -1
- package/dist/css/drawer.css +1 -1
- package/dist/css/file-preview.css +2 -0
- package/dist/css/float-button.css +2 -0
- package/dist/css/inline-completion.css +2 -0
- package/dist/css/json-view.css +2 -0
- package/dist/css/masonry.css +2 -0
- package/dist/css/signature.css +2 -0
- package/dist/css/sources.css +2 -0
- package/dist/css/tag-group.css +2 -2
- package/dist/css/tag-input.css +2 -3
- package/dist/css/tree.css +2 -2
- package/dist/css/upload.css +1 -1
- package/dist/css-manifest.json +15 -0
- package/dist/haze-ui.css +20 -13
- package/dist/headless/index.js +18 -6
- package/dist/hooks/useDarkMode.js +27 -0
- package/dist/index.js +207 -192
- package/dist/registry.json +210 -34
- package/dist/types/components/Cascader/Cascader.d.ts +20 -1
- package/dist/types/components/Chart/Chart.d.ts +27 -13
- package/dist/types/components/Chart/chart-elements.d.ts +62 -10
- package/dist/types/components/Chart/index.d.ts +1 -1
- package/dist/types/components/CodeBlock/CodeBlock.d.ts +19 -2
- package/dist/types/components/CodeBlock/index.d.ts +1 -1
- package/dist/types/components/Combobox/Combobox.d.ts +11 -1
- package/dist/types/components/DataTable/DataTable.d.ts +36 -1
- package/dist/types/components/DataTable/csv.d.ts +36 -0
- package/dist/types/components/DataTable/features.d.ts +6 -0
- package/dist/types/components/DataTable/index.d.ts +2 -0
- package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +15 -3
- package/dist/types/components/DateRangePicker/index.d.ts +1 -1
- package/dist/types/components/DateRangePicker/presets.d.ts +23 -0
- package/dist/types/components/Datepicker/Datepicker.d.ts +5 -1
- package/dist/types/components/Datepicker/DatepickerCore.d.ts +6 -1
- package/dist/types/components/Datepicker/datetime.d.ts +27 -0
- package/dist/types/components/Descriptions/Descriptions.d.ts +30 -0
- package/dist/types/components/Descriptions/index.d.ts +2 -0
- package/dist/types/components/FilePreview/FilePreview.d.ts +35 -0
- package/dist/types/components/FilePreview/file-preview-format.d.ts +20 -0
- package/dist/types/components/FilePreview/index.d.ts +2 -0
- package/dist/types/components/FloatButton/FloatButton.d.ts +43 -0
- package/dist/types/components/FloatButton/FloatButtonGroup.d.ts +33 -0
- package/dist/types/components/FloatButton/float-button-context.d.ts +11 -0
- package/dist/types/components/FloatButton/float-button-glyphs.d.ts +3 -0
- package/dist/types/components/FloatButton/float-button-styles.d.ts +58 -0
- package/dist/types/components/FloatButton/index.d.ts +4 -0
- package/dist/types/components/InlineCompletion/InlineCompletion.d.ts +29 -0
- package/dist/types/components/InlineCompletion/index.d.ts +2 -0
- package/dist/types/components/JsonView/JsonView.d.ts +26 -0
- package/dist/types/components/JsonView/index.d.ts +2 -0
- package/dist/types/components/JsonView/json-view-utils.d.ts +22 -0
- package/dist/types/components/LocaleProvider/index.d.ts +1 -0
- package/dist/types/components/LocaleProvider/ja-jp.d.ts +13 -0
- package/dist/types/components/LocaleProvider/locale.d.ts +44 -0
- package/dist/types/components/Masonry/Masonry.d.ts +34 -0
- package/dist/types/components/Masonry/index.d.ts +2 -0
- package/dist/types/components/Masonry/masonry-distribute.d.ts +16 -0
- package/dist/types/components/Select/Select.d.ts +13 -1
- package/dist/types/components/Select/SelectCore.d.ts +10 -1
- package/dist/types/components/Select/SelectFloating.d.ts +12 -1
- package/dist/types/components/Signature/Signature.d.ts +51 -0
- package/dist/types/components/Signature/index.d.ts +2 -0
- package/dist/types/components/Signature/signature-points.d.ts +31 -0
- package/dist/types/components/Sources/Sources.d.ts +37 -0
- package/dist/types/components/Sources/index.d.ts +2 -0
- package/dist/types/components/TagGroup/SortableTagGroup.d.ts +20 -0
- package/dist/types/components/TagGroup/TagGroup.d.ts +4 -13
- package/dist/types/components/TagGroup/index.d.ts +2 -0
- package/dist/types/components/TagGroup/tag-group-styles.d.ts +7 -0
- package/dist/types/components/TagInput/SortableTagInput.d.ts +34 -0
- package/dist/types/components/TagInput/SortableTagInputCore.d.ts +18 -0
- package/dist/types/components/TagInput/TagInput.d.ts +1 -8
- package/dist/types/components/TagInput/TagInputCore.d.ts +4 -10
- package/dist/types/components/TagInput/index.d.ts +4 -0
- package/dist/types/components/TagInput/tag-input-styles.d.ts +12 -0
- package/dist/types/components/Tree/Tree.d.ts +1 -1
- package/dist/types/components/Tree/TreeItem.d.ts +11 -1
- package/dist/types/components/Tree/types.d.ts +25 -0
- package/dist/types/components/Tree/utils.d.ts +41 -0
- package/dist/types/components/Upload/Upload.d.ts +10 -1
- package/dist/types/components/Upload/UploadCore.d.ts +21 -1
- package/dist/types/components/Upload/UploadList.d.ts +8 -2
- package/dist/types/headless/index.d.ts +221 -4
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/useDarkMode.d.ts +40 -0
- package/dist/types/index.d.ts +28 -11
- package/dist/types/utils/sortable-handle.d.ts +25 -0
- package/dist/types/utils/sortable-shared.d.ts +12 -24
- package/dist/utils/sortable-handle.js +12 -0
- package/dist/utils/sortable-shared.js +8 -16
- package/dist/utils/sortable.js +2 -1
- package/dist/utils/submenu.js +7 -5
- package/package.json +65 -5
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/lib/components/LocaleProvider/ja-jp.ts
|
|
3
|
+
var e = {
|
|
4
|
+
alert: { close: "閉じる" },
|
|
5
|
+
approvalCard: {
|
|
6
|
+
title: "承認が必要",
|
|
7
|
+
approve: "承認",
|
|
8
|
+
deny: "拒否"
|
|
9
|
+
},
|
|
10
|
+
asyncSection: {
|
|
11
|
+
loading: "読み込み中…",
|
|
12
|
+
error: "エラーが発生しました",
|
|
13
|
+
retry: "再試行"
|
|
14
|
+
},
|
|
15
|
+
avatarGroup: { more: "+{count}" },
|
|
16
|
+
calendar: {
|
|
17
|
+
previousMonth: "前の月",
|
|
18
|
+
nextMonth: "次の月",
|
|
19
|
+
today: "今日",
|
|
20
|
+
selectMonth: "月を選択",
|
|
21
|
+
selectQuarter: "四半期を選択",
|
|
22
|
+
selectYear: "年を選択",
|
|
23
|
+
previousYear: "前の年",
|
|
24
|
+
nextYear: "次の年",
|
|
25
|
+
previousDecade: "前の 10 年",
|
|
26
|
+
nextDecade: "次の 10 年",
|
|
27
|
+
weekNumber: "週"
|
|
28
|
+
},
|
|
29
|
+
cascader: { expand: "展開" },
|
|
30
|
+
combobox: {
|
|
31
|
+
create: "「{query}」を作成",
|
|
32
|
+
noResults: "結果なし"
|
|
33
|
+
},
|
|
34
|
+
command: { noResults: "結果なし" },
|
|
35
|
+
sidebar: {
|
|
36
|
+
toggle: "サイドバーを切り替える",
|
|
37
|
+
expand: "サイドバーを展開",
|
|
38
|
+
collapse: "サイドバーを折りたたむ"
|
|
39
|
+
},
|
|
40
|
+
tour: {
|
|
41
|
+
next: "次へ",
|
|
42
|
+
back: "戻る",
|
|
43
|
+
done: "完了",
|
|
44
|
+
skip: "スキップ",
|
|
45
|
+
stepOf: "ステップ {current} / {total}"
|
|
46
|
+
},
|
|
47
|
+
backToTop: { label: "トップへ戻る" },
|
|
48
|
+
banner: { close: "閉じる" },
|
|
49
|
+
breadcrumb: { label: "パンくずリスト" },
|
|
50
|
+
carousel: {
|
|
51
|
+
label: "カルーセル",
|
|
52
|
+
previousSlide: "前のスライド",
|
|
53
|
+
nextSlide: "次のスライド",
|
|
54
|
+
goToSlide: "スライド {index} へ移動"
|
|
55
|
+
},
|
|
56
|
+
chat: {
|
|
57
|
+
newMessages: "新着メッセージ",
|
|
58
|
+
stopGeneration: "生成を停止",
|
|
59
|
+
copy: "コピー"
|
|
60
|
+
},
|
|
61
|
+
chatInput: {
|
|
62
|
+
placeholder: "メッセージを入力…",
|
|
63
|
+
send: "送信"
|
|
64
|
+
},
|
|
65
|
+
chatMessage: {
|
|
66
|
+
sending: "送信中…",
|
|
67
|
+
sent: "送信済み",
|
|
68
|
+
failedToSend: "送信できませんでした"
|
|
69
|
+
},
|
|
70
|
+
chip: { remove: "削除" },
|
|
71
|
+
colorPicker: {
|
|
72
|
+
pickColor: "色を選択",
|
|
73
|
+
hexColor: "HEX カラー"
|
|
74
|
+
},
|
|
75
|
+
confirmDialog: {
|
|
76
|
+
confirm: "確認",
|
|
77
|
+
cancel: "キャンセル"
|
|
78
|
+
},
|
|
79
|
+
dateRangePicker: {
|
|
80
|
+
startDate: "開始日",
|
|
81
|
+
endDate: "終了日",
|
|
82
|
+
presetToday: "今日",
|
|
83
|
+
presetYesterday: "昨日",
|
|
84
|
+
presetLast7Days: "過去 7 日間",
|
|
85
|
+
presetLast30Days: "過去 30 日間",
|
|
86
|
+
presetThisMonth: "今月",
|
|
87
|
+
presetLastMonth: "先月"
|
|
88
|
+
},
|
|
89
|
+
datepicker: { time: "時刻" },
|
|
90
|
+
dataTable: {
|
|
91
|
+
selectAll: "すべて選択",
|
|
92
|
+
filterPlaceholder: "フィルター"
|
|
93
|
+
},
|
|
94
|
+
diffViewer: { header: "差分" },
|
|
95
|
+
empty: { description: "データがありません" },
|
|
96
|
+
fileInput: { label: "ファイルを選択" },
|
|
97
|
+
filePreview: {
|
|
98
|
+
remove: "削除",
|
|
99
|
+
retry: "再試行",
|
|
100
|
+
uploading: "アップロード中",
|
|
101
|
+
uploaded: "アップロード済み",
|
|
102
|
+
error: "アップロードに失敗しました"
|
|
103
|
+
},
|
|
104
|
+
image: {
|
|
105
|
+
zoomIn: "拡大",
|
|
106
|
+
zoomOut: "縮小",
|
|
107
|
+
reset: "リセット",
|
|
108
|
+
rotate: "回転",
|
|
109
|
+
close: "閉じる"
|
|
110
|
+
},
|
|
111
|
+
inlineEdit: { placeholder: "クリックして編集" },
|
|
112
|
+
inlineCompletion: { hint: "補完候補があります。Tab キーで確定、Esc キーでキャンセル。" },
|
|
113
|
+
jsonView: {
|
|
114
|
+
copy: "コピー",
|
|
115
|
+
more: "他 {count} 件"
|
|
116
|
+
},
|
|
117
|
+
logViewer: {
|
|
118
|
+
all: "すべて",
|
|
119
|
+
noLogs: "ログがありません"
|
|
120
|
+
},
|
|
121
|
+
mentions: {
|
|
122
|
+
label: "メンション候補",
|
|
123
|
+
noMatch: "該当なし"
|
|
124
|
+
},
|
|
125
|
+
modelPicker: { label: "モデル" },
|
|
126
|
+
numberInput: {
|
|
127
|
+
decrease: "減らす",
|
|
128
|
+
increase: "増やす"
|
|
129
|
+
},
|
|
130
|
+
otpInput: { digitLabel: "検証コードの {index} 桁目(全 {total} 桁)" },
|
|
131
|
+
pagination: {
|
|
132
|
+
previous: "前へ",
|
|
133
|
+
next: "次へ"
|
|
134
|
+
},
|
|
135
|
+
passwordInput: {
|
|
136
|
+
label: "パスワード",
|
|
137
|
+
show: "パスワードを表示",
|
|
138
|
+
hide: "パスワードを隠す"
|
|
139
|
+
},
|
|
140
|
+
progress: { label: "進捗" },
|
|
141
|
+
promptInput: {
|
|
142
|
+
label: "プロンプト",
|
|
143
|
+
removeTag: "{tag} を削除",
|
|
144
|
+
noMatch: "該当なし",
|
|
145
|
+
loading: "読み込み中…"
|
|
146
|
+
},
|
|
147
|
+
rating: {
|
|
148
|
+
star: "{count} つ星",
|
|
149
|
+
stars: "{count} つ星"
|
|
150
|
+
},
|
|
151
|
+
signature: {
|
|
152
|
+
clear: "クリア",
|
|
153
|
+
undo: "元に戻す",
|
|
154
|
+
unsupported: "このブラウザでは署名を利用できません。"
|
|
155
|
+
},
|
|
156
|
+
select: {
|
|
157
|
+
placeholder: "選択してください",
|
|
158
|
+
listboxLabel: "オプション",
|
|
159
|
+
clear: "クリア",
|
|
160
|
+
searchLabel: "オプションを検索",
|
|
161
|
+
searchPlaceholder: "検索…",
|
|
162
|
+
noMatch: "該当なし",
|
|
163
|
+
loading: "オプションを読み込み中…",
|
|
164
|
+
moreTags: "+{count}"
|
|
165
|
+
},
|
|
166
|
+
spinner: { loading: "読み込み中" },
|
|
167
|
+
sources: {
|
|
168
|
+
label: "引用元",
|
|
169
|
+
expand: "抜粋を表示",
|
|
170
|
+
collapse: "抜粋を非表示"
|
|
171
|
+
},
|
|
172
|
+
tag: { remove: "削除" },
|
|
173
|
+
tagGroup: { remove: "削除" },
|
|
174
|
+
tagInput: {
|
|
175
|
+
placeholder: "タグを追加",
|
|
176
|
+
removeTag: "{tag} を削除",
|
|
177
|
+
tagCount: "{count} 個のタグ",
|
|
178
|
+
tagCountSingular: "{count} 個のタグ"
|
|
179
|
+
},
|
|
180
|
+
thinkingIndicator: { text: "思考中" },
|
|
181
|
+
toast: {
|
|
182
|
+
loading: "読み込み中…",
|
|
183
|
+
success: "成功",
|
|
184
|
+
error: "エラーが発生しました",
|
|
185
|
+
close: "閉じる"
|
|
186
|
+
},
|
|
187
|
+
tokenCounter: { label: "トークン数" },
|
|
188
|
+
toolCallCard: {
|
|
189
|
+
pending: "待機中",
|
|
190
|
+
running: "実行中…",
|
|
191
|
+
done: "完了",
|
|
192
|
+
error: "エラー",
|
|
193
|
+
inputLabel: "入力",
|
|
194
|
+
outputLabel: "出力"
|
|
195
|
+
},
|
|
196
|
+
transfer: {
|
|
197
|
+
source: "移動元({count})",
|
|
198
|
+
target: "移動先({count})",
|
|
199
|
+
moveToTarget: ">",
|
|
200
|
+
moveToSource: "<"
|
|
201
|
+
},
|
|
202
|
+
tree: {
|
|
203
|
+
expand: "展開",
|
|
204
|
+
collapse: "折りたたむ",
|
|
205
|
+
loadError: "読み込みに失敗しました",
|
|
206
|
+
retry: "再試行",
|
|
207
|
+
noMatch: "該当なし"
|
|
208
|
+
},
|
|
209
|
+
upload: {
|
|
210
|
+
hint: "ここにファイルをドラッグ&ドロップ、またはクリックしてアップロード",
|
|
211
|
+
clickHint: "クリックしてファイルを選択",
|
|
212
|
+
label: "ファイルをアップロード",
|
|
213
|
+
retry: "アップロードを再試行",
|
|
214
|
+
cancel: "アップロードをキャンセル",
|
|
215
|
+
remove: "ファイルを削除",
|
|
216
|
+
uploading: "アップロード中",
|
|
217
|
+
success: "アップロード済み",
|
|
218
|
+
error: "アップロードに失敗しました"
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
//#endregion
|
|
222
|
+
export { e as jaJP };
|
|
@@ -78,10 +78,29 @@ var e = {
|
|
|
78
78
|
},
|
|
79
79
|
dateRangePicker: {
|
|
80
80
|
startDate: "Start date",
|
|
81
|
-
endDate: "End date"
|
|
82
|
-
|
|
81
|
+
endDate: "End date",
|
|
82
|
+
presetToday: "Today",
|
|
83
|
+
presetYesterday: "Yesterday",
|
|
84
|
+
presetLast7Days: "Last 7 days",
|
|
85
|
+
presetLast30Days: "Last 30 days",
|
|
86
|
+
presetThisMonth: "This month",
|
|
87
|
+
presetLastMonth: "Last month"
|
|
88
|
+
},
|
|
89
|
+
datepicker: { time: "Time" },
|
|
90
|
+
dataTable: {
|
|
91
|
+
selectAll: "Select all rows",
|
|
92
|
+
filterPlaceholder: "Filter"
|
|
93
|
+
},
|
|
94
|
+
diffViewer: { header: "Diff" },
|
|
83
95
|
empty: { description: "No data" },
|
|
84
96
|
fileInput: { label: "Choose file" },
|
|
97
|
+
filePreview: {
|
|
98
|
+
remove: "Remove",
|
|
99
|
+
retry: "Retry",
|
|
100
|
+
uploading: "Uploading",
|
|
101
|
+
uploaded: "Uploaded",
|
|
102
|
+
error: "Upload failed"
|
|
103
|
+
},
|
|
85
104
|
image: {
|
|
86
105
|
zoomIn: "Zoom in",
|
|
87
106
|
zoomOut: "Zoom out",
|
|
@@ -90,6 +109,11 @@ var e = {
|
|
|
90
109
|
close: "Close"
|
|
91
110
|
},
|
|
92
111
|
inlineEdit: { placeholder: "Click to edit" },
|
|
112
|
+
inlineCompletion: { hint: "Completion available. Press Tab to accept, Escape to dismiss." },
|
|
113
|
+
jsonView: {
|
|
114
|
+
copy: "Copy",
|
|
115
|
+
more: "+{count} more"
|
|
116
|
+
},
|
|
93
117
|
logViewer: {
|
|
94
118
|
all: "All",
|
|
95
119
|
noLogs: "No logs"
|
|
@@ -124,6 +148,11 @@ var e = {
|
|
|
124
148
|
star: "{count} star",
|
|
125
149
|
stars: "{count} stars"
|
|
126
150
|
},
|
|
151
|
+
signature: {
|
|
152
|
+
clear: "Clear",
|
|
153
|
+
undo: "Undo",
|
|
154
|
+
unsupported: "Signature is not supported in this browser."
|
|
155
|
+
},
|
|
127
156
|
select: {
|
|
128
157
|
placeholder: "Select…",
|
|
129
158
|
listboxLabel: "Options",
|
|
@@ -135,6 +164,11 @@ var e = {
|
|
|
135
164
|
moreTags: "+{count}"
|
|
136
165
|
},
|
|
137
166
|
spinner: { loading: "Loading" },
|
|
167
|
+
sources: {
|
|
168
|
+
label: "Sources",
|
|
169
|
+
expand: "Show excerpt",
|
|
170
|
+
collapse: "Hide excerpt"
|
|
171
|
+
},
|
|
138
172
|
tag: { remove: "Remove" },
|
|
139
173
|
tagGroup: { remove: "Remove" },
|
|
140
174
|
tagInput: {
|
|
@@ -147,7 +181,8 @@ var e = {
|
|
|
147
181
|
toast: {
|
|
148
182
|
loading: "Loading…",
|
|
149
183
|
success: "Success",
|
|
150
|
-
error: "Something went wrong"
|
|
184
|
+
error: "Something went wrong",
|
|
185
|
+
close: "Close"
|
|
151
186
|
},
|
|
152
187
|
tokenCounter: { label: "Tokens" },
|
|
153
188
|
toolCallCard: {
|
|
@@ -166,7 +201,10 @@ var e = {
|
|
|
166
201
|
},
|
|
167
202
|
tree: {
|
|
168
203
|
expand: "Expand",
|
|
169
|
-
collapse: "Collapse"
|
|
204
|
+
collapse: "Collapse",
|
|
205
|
+
loadError: "Load failed",
|
|
206
|
+
retry: "Retry",
|
|
207
|
+
noMatch: "No matches"
|
|
170
208
|
},
|
|
171
209
|
upload: {
|
|
172
210
|
hint: "Drag & drop files here, or click to upload",
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { LocaleContext as e } from "./LocaleContext.js";
|
|
3
3
|
import { enUS as t } from "./locale.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { jaJP as n } from "./ja-jp.js";
|
|
5
|
+
import { zhCN as r } from "./zh-cn.js";
|
|
6
|
+
import { useContext as i } from "react";
|
|
6
7
|
//#region src/lib/components/LocaleProvider/useStrings.ts
|
|
7
|
-
function
|
|
8
|
+
function a(e) {
|
|
8
9
|
if (!e) return [];
|
|
9
|
-
let t =
|
|
10
|
+
let t = a(e.parent);
|
|
10
11
|
return e.strings ? [...t, e.strings] : t;
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
+
function o(e) {
|
|
13
14
|
if (e) {
|
|
14
15
|
let t = e.toLowerCase();
|
|
15
|
-
if (t === "zh" || t.startsWith("zh-") || t.startsWith("zh_")) return
|
|
16
|
+
if (t === "zh" || t.startsWith("zh-") || t.startsWith("zh_")) return r;
|
|
17
|
+
if (t === "ja" || t.startsWith("ja-") || t.startsWith("ja_")) return n;
|
|
16
18
|
}
|
|
17
19
|
return t;
|
|
18
20
|
}
|
|
19
|
-
function
|
|
20
|
-
let n =
|
|
21
|
-
return
|
|
21
|
+
function s(t) {
|
|
22
|
+
let n = i(e);
|
|
23
|
+
return a(n).map((e) => e[t]).filter((e) => e !== void 0).reduce((e, t) => ({
|
|
22
24
|
...e,
|
|
23
25
|
...t
|
|
24
|
-
}),
|
|
26
|
+
}), o(n?.locale)[t]);
|
|
25
27
|
}
|
|
26
28
|
//#endregion
|
|
27
|
-
export {
|
|
29
|
+
export { s as useStrings };
|
|
@@ -78,10 +78,29 @@ var e = {
|
|
|
78
78
|
},
|
|
79
79
|
dateRangePicker: {
|
|
80
80
|
startDate: "开始日期",
|
|
81
|
-
endDate: "结束日期"
|
|
82
|
-
|
|
81
|
+
endDate: "结束日期",
|
|
82
|
+
presetToday: "今天",
|
|
83
|
+
presetYesterday: "昨天",
|
|
84
|
+
presetLast7Days: "近 7 天",
|
|
85
|
+
presetLast30Days: "近 30 天",
|
|
86
|
+
presetThisMonth: "本月",
|
|
87
|
+
presetLastMonth: "上月"
|
|
88
|
+
},
|
|
89
|
+
datepicker: { time: "时间" },
|
|
90
|
+
dataTable: {
|
|
91
|
+
selectAll: "全选",
|
|
92
|
+
filterPlaceholder: "筛选"
|
|
93
|
+
},
|
|
94
|
+
diffViewer: { header: "差异" },
|
|
83
95
|
empty: { description: "暂无数据" },
|
|
84
96
|
fileInput: { label: "选择文件" },
|
|
97
|
+
filePreview: {
|
|
98
|
+
remove: "移除",
|
|
99
|
+
retry: "重试",
|
|
100
|
+
uploading: "上传中",
|
|
101
|
+
uploaded: "已上传",
|
|
102
|
+
error: "上传失败"
|
|
103
|
+
},
|
|
85
104
|
image: {
|
|
86
105
|
zoomIn: "放大",
|
|
87
106
|
zoomOut: "缩小",
|
|
@@ -90,6 +109,11 @@ var e = {
|
|
|
90
109
|
close: "关闭"
|
|
91
110
|
},
|
|
92
111
|
inlineEdit: { placeholder: "点击编辑" },
|
|
112
|
+
inlineCompletion: { hint: "有可用的补全,按 Tab 接受,按 Esc 忽略。" },
|
|
113
|
+
jsonView: {
|
|
114
|
+
copy: "复制",
|
|
115
|
+
more: "还有 {count} 项"
|
|
116
|
+
},
|
|
93
117
|
logViewer: {
|
|
94
118
|
all: "全部",
|
|
95
119
|
noLogs: "暂无日志"
|
|
@@ -124,6 +148,11 @@ var e = {
|
|
|
124
148
|
star: "{count} 颗星",
|
|
125
149
|
stars: "{count} 颗星"
|
|
126
150
|
},
|
|
151
|
+
signature: {
|
|
152
|
+
clear: "清除",
|
|
153
|
+
undo: "撤销",
|
|
154
|
+
unsupported: "当前浏览器不支持签名板。"
|
|
155
|
+
},
|
|
127
156
|
select: {
|
|
128
157
|
placeholder: "请选择",
|
|
129
158
|
listboxLabel: "选项",
|
|
@@ -135,6 +164,11 @@ var e = {
|
|
|
135
164
|
moreTags: "+{count}"
|
|
136
165
|
},
|
|
137
166
|
spinner: { loading: "加载中" },
|
|
167
|
+
sources: {
|
|
168
|
+
label: "引用来源",
|
|
169
|
+
expand: "展开摘录",
|
|
170
|
+
collapse: "收起摘录"
|
|
171
|
+
},
|
|
138
172
|
tag: { remove: "移除" },
|
|
139
173
|
tagGroup: { remove: "移除" },
|
|
140
174
|
tagInput: {
|
|
@@ -147,7 +181,8 @@ var e = {
|
|
|
147
181
|
toast: {
|
|
148
182
|
loading: "加载中…",
|
|
149
183
|
success: "成功",
|
|
150
|
-
error: "出错了"
|
|
184
|
+
error: "出错了",
|
|
185
|
+
close: "关闭"
|
|
151
186
|
},
|
|
152
187
|
tokenCounter: { label: "Token 数" },
|
|
153
188
|
toolCallCard: {
|
|
@@ -166,7 +201,10 @@ var e = {
|
|
|
166
201
|
},
|
|
167
202
|
tree: {
|
|
168
203
|
expand: "展开",
|
|
169
|
-
collapse: "折叠"
|
|
204
|
+
collapse: "折叠",
|
|
205
|
+
loadError: "加载失败",
|
|
206
|
+
retry: "重试",
|
|
207
|
+
noMatch: "无匹配项"
|
|
170
208
|
},
|
|
171
209
|
upload: {
|
|
172
210
|
hint: "将文件拖拽到此处,或点击上传",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
4
|
+
import { distributeIndices as t } from "./masonry-distribute.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
7
|
+
import { Children as r, isValidElement as i, useMemo as a } from "react";
|
|
8
|
+
//#region src/lib/components/Masonry/Masonry.tsx
|
|
9
|
+
var o = "haze-Masonry__base", s = "haze-Masonry__column", c = "haze-Masonry__item";
|
|
10
|
+
function l({ columns: l = 3, gap: u = 4, children: d, className: f, ...p }) {
|
|
11
|
+
let m = a(() => r.toArray(d), [d]), h = Math.max(1, Math.floor(l)), g = a(() => t(m.length, h), [m.length, h]);
|
|
12
|
+
return /* @__PURE__ */ n("div", {
|
|
13
|
+
style: { gap: `var(--haze-space-${u})` },
|
|
14
|
+
...p,
|
|
15
|
+
className: e([o, f]),
|
|
16
|
+
children: g.map((t, r) => /* @__PURE__ */ n("div", {
|
|
17
|
+
className: e([s]),
|
|
18
|
+
children: t.map((t) => {
|
|
19
|
+
let r = m[t];
|
|
20
|
+
return r == null ? null : /* @__PURE__ */ n("div", {
|
|
21
|
+
className: e([c]),
|
|
22
|
+
children: r
|
|
23
|
+
}, i(r) ? r.key : t);
|
|
24
|
+
})
|
|
25
|
+
}, r))
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { l as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/lib/components/Masonry/masonry-distribute.ts
|
|
3
|
+
function e(e, t, n = () => 1) {
|
|
4
|
+
let r = Array.from({ length: Math.max(1, t) }, () => ({
|
|
5
|
+
indices: [],
|
|
6
|
+
height: 0
|
|
7
|
+
}));
|
|
8
|
+
for (let t = 0; t < e; t += 1) {
|
|
9
|
+
let e = r.reduce((e, t) => t.height < e.height ? t : e);
|
|
10
|
+
e.indices.push(t), e.height += Math.max(0, n(t));
|
|
11
|
+
}
|
|
12
|
+
return r.map((e) => e.indices);
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { e as distributeIndices };
|
|
@@ -3,26 +3,27 @@ import e from "./SelectCore.js";
|
|
|
3
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
4
|
import { useControl as n } from "react-use-control";
|
|
5
5
|
//#region src/lib/components/Select/Select.tsx
|
|
6
|
-
function r({ value: r, multiple: i = !1, searchable: a = !1, clearable: o = !1, loading: s = !1,
|
|
7
|
-
let [
|
|
6
|
+
function r({ value: r, multiple: i = !1, searchable: a = !1, clearable: o = !1, loading: s = !1, onSearch: c, maxTagCount: l, virtualized: u, size: d, className: f, children: p, onChange: m, onValuesChange: h, placeholder: g, ref: _, ...v }) {
|
|
7
|
+
let [y, b] = n(r, i ? [] : "");
|
|
8
8
|
return /* @__PURE__ */ t(e, {
|
|
9
|
-
ref:
|
|
10
|
-
value:
|
|
9
|
+
ref: _,
|
|
10
|
+
value: y,
|
|
11
11
|
onChange: (e) => {
|
|
12
|
-
|
|
12
|
+
b(e), h?.(e);
|
|
13
13
|
},
|
|
14
|
-
onNativeChange: i || a ? void 0 :
|
|
14
|
+
onNativeChange: i || a ? void 0 : m,
|
|
15
15
|
multiple: i,
|
|
16
16
|
searchable: a,
|
|
17
17
|
clearable: o,
|
|
18
18
|
loading: s,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
onSearch: c,
|
|
20
|
+
maxTagCount: l,
|
|
21
|
+
virtualized: u,
|
|
22
|
+
size: d,
|
|
23
|
+
className: f,
|
|
24
|
+
placeholder: g,
|
|
25
|
+
...v,
|
|
26
|
+
children: p
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
29
|
//#endregion
|
|
@@ -14,38 +14,39 @@ var l = "haze-SelectCore__base", u = {
|
|
|
14
14
|
md: "haze-SelectCore__md",
|
|
15
15
|
lg: "haze-SelectCore__lg"
|
|
16
16
|
}, d = "haze-SelectCore__nativeClearWrap", f = "haze-SelectCore__nativeClear";
|
|
17
|
-
function p({ value: p, onChange: m, onNativeChange: h, multiple: g = !1, searchable: _ = !1, clearable: v = !1, loading: y = !1,
|
|
18
|
-
let
|
|
17
|
+
function p({ value: p, onChange: m, onNativeChange: h, multiple: g = !1, searchable: _ = !1, clearable: v = !1, loading: y = !1, onSearch: b, maxTagCount: x, size: S = "md", virtualized: C, className: w, placeholder: T, children: E, ref: D, ...O }) {
|
|
18
|
+
let k = n("select"), A = c(null), j = s((e) => t(A, D)(e), [A, D]);
|
|
19
19
|
if (g || _) return /* @__PURE__ */ a(i, {
|
|
20
|
-
ref:
|
|
20
|
+
ref: D,
|
|
21
21
|
value: p,
|
|
22
22
|
onChange: m,
|
|
23
|
-
entries: r(
|
|
23
|
+
entries: r(E),
|
|
24
24
|
multiple: g,
|
|
25
25
|
searchable: _,
|
|
26
26
|
clearable: v,
|
|
27
27
|
loading: y,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
onSearch: b,
|
|
29
|
+
maxTagCount: x,
|
|
30
|
+
size: S,
|
|
31
|
+
virtualized: C,
|
|
32
|
+
className: w,
|
|
33
|
+
placeholder: T,
|
|
34
|
+
...O
|
|
34
35
|
});
|
|
35
|
-
let
|
|
36
|
+
let M = typeof p == "string" ? p : "";
|
|
36
37
|
if (v) {
|
|
37
|
-
let { onKeyDown: t, ...n } =
|
|
38
|
+
let { onKeyDown: t, ...n } = O;
|
|
38
39
|
return /* @__PURE__ */ o("span", {
|
|
39
|
-
"data-clearable":
|
|
40
|
+
"data-clearable": M !== "" || void 0,
|
|
40
41
|
className: e(d),
|
|
41
42
|
children: [/* @__PURE__ */ a("select", {
|
|
42
|
-
ref:
|
|
43
|
+
ref: j,
|
|
43
44
|
value: p,
|
|
44
45
|
onChange: (e) => {
|
|
45
46
|
m(e.target.value), h?.(e);
|
|
46
47
|
},
|
|
47
48
|
onKeyDown: (e) => {
|
|
48
|
-
if (e.key === "Backspace" &&
|
|
49
|
+
if (e.key === "Backspace" && M !== "") {
|
|
49
50
|
e.preventDefault(), m("");
|
|
50
51
|
return;
|
|
51
52
|
}
|
|
@@ -54,15 +55,15 @@ function p({ value: p, onChange: m, onNativeChange: h, multiple: g = !1, searcha
|
|
|
54
55
|
...n,
|
|
55
56
|
className: e([
|
|
56
57
|
l,
|
|
57
|
-
u[
|
|
58
|
-
|
|
58
|
+
u[S],
|
|
59
|
+
w
|
|
59
60
|
]),
|
|
60
|
-
children:
|
|
61
|
-
}),
|
|
61
|
+
children: E
|
|
62
|
+
}), M !== "" && /* @__PURE__ */ a("span", {
|
|
62
63
|
"aria-hidden": "true",
|
|
63
|
-
title:
|
|
64
|
+
title: k.clear,
|
|
64
65
|
onClick: (e) => {
|
|
65
|
-
e.stopPropagation(), m(""),
|
|
66
|
+
e.stopPropagation(), m(""), A.current?.focus();
|
|
66
67
|
},
|
|
67
68
|
className: e(f),
|
|
68
69
|
children: "×"
|
|
@@ -70,18 +71,18 @@ function p({ value: p, onChange: m, onNativeChange: h, multiple: g = !1, searcha
|
|
|
70
71
|
});
|
|
71
72
|
}
|
|
72
73
|
return /* @__PURE__ */ a("select", {
|
|
73
|
-
ref:
|
|
74
|
+
ref: D,
|
|
74
75
|
value: p,
|
|
75
76
|
onChange: (e) => {
|
|
76
77
|
m(e.target.value), h?.(e);
|
|
77
78
|
},
|
|
78
|
-
...
|
|
79
|
+
...O,
|
|
79
80
|
className: e([
|
|
80
81
|
l,
|
|
81
|
-
u[
|
|
82
|
-
|
|
82
|
+
u[S],
|
|
83
|
+
w
|
|
83
84
|
]),
|
|
84
|
-
children:
|
|
85
|
+
children: E
|
|
85
86
|
});
|
|
86
87
|
}
|
|
87
88
|
//#endregion
|