@kungal/ui-core 2.36.0 → 2.38.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/CHANGELOG.md +4 -0
- package/dist/index.cjs +180 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +179 -1
- package/dist/index.js.map +1 -1
- package/dist/locale/en.cjs +163 -0
- package/dist/locale/en.cjs.map +1 -0
- package/dist/locale/en.d.cts +5 -0
- package/dist/locale/en.d.ts +5 -0
- package/dist/locale/en.js +161 -0
- package/dist/locale/en.js.map +1 -0
- package/dist/types-BJErf81b.d.cts +182 -0
- package/dist/types-BJErf81b.d.ts +182 -0
- package/package.json +8 -1
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
interface KunMessages {
|
|
2
|
+
alert: {
|
|
3
|
+
title: string;
|
|
4
|
+
confirm: string;
|
|
5
|
+
cancel: string;
|
|
6
|
+
};
|
|
7
|
+
autocomplete: {
|
|
8
|
+
clear: string;
|
|
9
|
+
loading: string;
|
|
10
|
+
noResult: string;
|
|
11
|
+
};
|
|
12
|
+
avatar: {
|
|
13
|
+
unknownUser: string;
|
|
14
|
+
};
|
|
15
|
+
/** `{count}` — number of users in the group. */
|
|
16
|
+
avatarGroup: {
|
|
17
|
+
label: string;
|
|
18
|
+
};
|
|
19
|
+
/** `goto` takes `{index}`, the 1-based slide number. */
|
|
20
|
+
carousel: {
|
|
21
|
+
label: string;
|
|
22
|
+
prev: string;
|
|
23
|
+
next: string;
|
|
24
|
+
nav: string;
|
|
25
|
+
goto: string;
|
|
26
|
+
};
|
|
27
|
+
chip: {
|
|
28
|
+
remove: string;
|
|
29
|
+
};
|
|
30
|
+
/** `resultCount` takes `{count}`. */
|
|
31
|
+
commandPalette: {
|
|
32
|
+
placeholder: string;
|
|
33
|
+
empty: string;
|
|
34
|
+
noResult: string;
|
|
35
|
+
loading: string;
|
|
36
|
+
close: string;
|
|
37
|
+
hintSelect: string;
|
|
38
|
+
hintOpen: string;
|
|
39
|
+
hintClose: string;
|
|
40
|
+
resultCount: string;
|
|
41
|
+
};
|
|
42
|
+
/** `success` / `failure` take `{text}`, the copied string. */
|
|
43
|
+
copy: {
|
|
44
|
+
copied: string;
|
|
45
|
+
success: string;
|
|
46
|
+
failure: string;
|
|
47
|
+
};
|
|
48
|
+
/** `prevPage` / `nextPage` take `{unit}`, filled from `unitMonth` /
|
|
49
|
+
* `unitYear` / `unitDecade`; `zoomOut` takes `{label}`; `monthCell` takes
|
|
50
|
+
* `{month}` and `{year}` — one template, because Chinese puts the year
|
|
51
|
+
* first. */
|
|
52
|
+
datePicker: {
|
|
53
|
+
placeholderDay: string;
|
|
54
|
+
placeholderMonth: string;
|
|
55
|
+
placeholderYear: string;
|
|
56
|
+
clear: string;
|
|
57
|
+
today: string;
|
|
58
|
+
close: string;
|
|
59
|
+
prevYear: string;
|
|
60
|
+
nextYear: string;
|
|
61
|
+
prevPage: string;
|
|
62
|
+
nextPage: string;
|
|
63
|
+
zoomOut: string;
|
|
64
|
+
unitMonth: string;
|
|
65
|
+
unitYear: string;
|
|
66
|
+
unitDecade: string;
|
|
67
|
+
monthCell: string;
|
|
68
|
+
};
|
|
69
|
+
drawer: {
|
|
70
|
+
close: string;
|
|
71
|
+
};
|
|
72
|
+
/** `selected` takes `{count}`. */
|
|
73
|
+
fileInput: {
|
|
74
|
+
trigger: string;
|
|
75
|
+
selected: string;
|
|
76
|
+
};
|
|
77
|
+
/** `tooLarge` takes `{name}` and `{size}`. */
|
|
78
|
+
filePicker: {
|
|
79
|
+
tooLarge: string;
|
|
80
|
+
};
|
|
81
|
+
input: {
|
|
82
|
+
clear: string;
|
|
83
|
+
reveal: string;
|
|
84
|
+
hide: string;
|
|
85
|
+
};
|
|
86
|
+
/** `goto` takes `{index}`, the 1-based image number. */
|
|
87
|
+
lightbox: {
|
|
88
|
+
label: string;
|
|
89
|
+
close: string;
|
|
90
|
+
prev: string;
|
|
91
|
+
next: string;
|
|
92
|
+
goto: string;
|
|
93
|
+
zoomIn: string;
|
|
94
|
+
zoomOut: string;
|
|
95
|
+
rotateLeft: string;
|
|
96
|
+
rotateRight: string;
|
|
97
|
+
reset: string;
|
|
98
|
+
download: string;
|
|
99
|
+
};
|
|
100
|
+
lightboxGallery: {
|
|
101
|
+
view: string;
|
|
102
|
+
};
|
|
103
|
+
loading: {
|
|
104
|
+
description: string;
|
|
105
|
+
};
|
|
106
|
+
loli: {
|
|
107
|
+
close: string;
|
|
108
|
+
};
|
|
109
|
+
message: {
|
|
110
|
+
close: string;
|
|
111
|
+
};
|
|
112
|
+
modal: {
|
|
113
|
+
close: string;
|
|
114
|
+
};
|
|
115
|
+
/** KunNull — the "nothing here" empty state. */
|
|
116
|
+
null: {
|
|
117
|
+
description: string;
|
|
118
|
+
};
|
|
119
|
+
numberInput: {
|
|
120
|
+
decrement: string;
|
|
121
|
+
increment: string;
|
|
122
|
+
};
|
|
123
|
+
/** `page` takes `{page}`. The two `hint` halves wrap the arrow-key icons. */
|
|
124
|
+
pagination: {
|
|
125
|
+
nav: string;
|
|
126
|
+
prev: string;
|
|
127
|
+
next: string;
|
|
128
|
+
page: string;
|
|
129
|
+
hintBefore: string;
|
|
130
|
+
hintAfter: string;
|
|
131
|
+
jumpLabel: string;
|
|
132
|
+
jump: string;
|
|
133
|
+
};
|
|
134
|
+
/** `digit` takes `{label}` and `{index}`, the 1-based position. */
|
|
135
|
+
pinInput: {
|
|
136
|
+
label: string;
|
|
137
|
+
digit: string;
|
|
138
|
+
};
|
|
139
|
+
reaction: {
|
|
140
|
+
label: string;
|
|
141
|
+
};
|
|
142
|
+
/** `removeOption` takes `{label}`, the option's own label. */
|
|
143
|
+
select: {
|
|
144
|
+
searchPlaceholder: string;
|
|
145
|
+
noResult: string;
|
|
146
|
+
loading: string;
|
|
147
|
+
clear: string;
|
|
148
|
+
removeOption: string;
|
|
149
|
+
};
|
|
150
|
+
spoiler: {
|
|
151
|
+
copyCode: string;
|
|
152
|
+
reveal: string;
|
|
153
|
+
};
|
|
154
|
+
/** Both take `{tag}`. */
|
|
155
|
+
tagInput: {
|
|
156
|
+
tag: string;
|
|
157
|
+
removeTag: string;
|
|
158
|
+
};
|
|
159
|
+
upload: {
|
|
160
|
+
imageAlt: string;
|
|
161
|
+
cropTitle: string;
|
|
162
|
+
cancel: string;
|
|
163
|
+
confirm: string;
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
/** A locale's strings plus its identity — everything about a locale that is
|
|
167
|
+
* framework-agnostic. A render layer extends it with whatever else it needs
|
|
168
|
+
* (the Vue layer adds a date-fns locale for the calendar grid). */
|
|
169
|
+
interface KunMessageCatalog {
|
|
170
|
+
/** Endonym, for a language switcher's own list (e.g. `简体中文`). */
|
|
171
|
+
name: string;
|
|
172
|
+
/** BCP 47 tag. Not used for matching — KunUI never picks a locale for you. */
|
|
173
|
+
code: string;
|
|
174
|
+
messages: KunMessages;
|
|
175
|
+
}
|
|
176
|
+
/** Dotted path into `KunMessages`, e.g. `'pagination.prev'`. */
|
|
177
|
+
type KunMessagePath = {
|
|
178
|
+
[K in keyof KunMessages]: `${K & string}.${keyof KunMessages[K] & string}`;
|
|
179
|
+
}[keyof KunMessages];
|
|
180
|
+
type KunTranslate = (path: KunMessagePath, params?: Record<string, string | number>) => string;
|
|
181
|
+
|
|
182
|
+
export type { KunMessages as K, KunMessagePath as a, KunMessageCatalog as b, KunTranslate as c };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kungal/ui-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.38.0",
|
|
4
4
|
"description": "KunUI framework-agnostic core — design types, cn(), variant matrix, radius system, utils. No Vue/React.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -36,6 +36,11 @@
|
|
|
36
36
|
"types": "./dist/index.d.ts",
|
|
37
37
|
"import": "./dist/index.js",
|
|
38
38
|
"require": "./dist/index.cjs"
|
|
39
|
+
},
|
|
40
|
+
"./locale/en": {
|
|
41
|
+
"types": "./dist/locale/en.d.ts",
|
|
42
|
+
"import": "./dist/locale/en.js",
|
|
43
|
+
"require": "./dist/locale/en.cjs"
|
|
39
44
|
}
|
|
40
45
|
},
|
|
41
46
|
"dependencies": {
|
|
@@ -45,6 +50,7 @@
|
|
|
45
50
|
"devDependencies": {
|
|
46
51
|
"@iconify-json/lucide": "^1.2.111",
|
|
47
52
|
"@iconify-json/svg-spinners": "^1.2.4",
|
|
53
|
+
"@types/node": "^22.10.0",
|
|
48
54
|
"oslllo-svg-fixer": "^6.0.1",
|
|
49
55
|
"svg2ttf": "^6.1.0",
|
|
50
56
|
"svgicons2svgfont": "^16.0.0",
|
|
@@ -57,6 +63,7 @@
|
|
|
57
63
|
"typecheck": "tsc --noEmit",
|
|
58
64
|
"gen:icons": "node scripts/gen-icons.mjs",
|
|
59
65
|
"gen:icons:flutter": "node scripts/gen-icons-flutter.mjs",
|
|
66
|
+
"gen:messages:flutter": "node scripts/gen-messages-flutter.mjs",
|
|
60
67
|
"gen:scales": "node scripts/gen-tw-scales.mjs",
|
|
61
68
|
"gen:motion": "node scripts/gen-motion.mjs",
|
|
62
69
|
"clean": "rm -rf dist"
|