x-essential-lib 0.10.43 → 0.11.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.
@@ -1,6 +1,6 @@
1
1
  import { Fragment, computed, defineComponent, getCurrentInstance, getCurrentScope, hasInjectionContext, inject, isRef, onBeforeMount, onBeforeUnmount, onMounted, provide, ref, shallowRef, toValue, unref, watch, watchEffect } from "vue";
2
2
 
3
- //#region node_modules/.pnpm/@vueuse+shared@14.4.0_vue@3.5.42_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
3
+ //#region node_modules/.pnpm/@vueuse+shared@14.4.0_vue@3.5.43_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
4
4
  const localProvidedStateMap = /* @__PURE__ */ new WeakMap();
5
5
  /**
6
6
  * On the basis of `inject`, it is allowed to directly call inject to obtain the value after call provide in the same component.
@@ -60,7 +60,7 @@ function watchImmediate(source, cb, options) {
60
60
  }
61
61
 
62
62
  //#endregion
63
- //#region node_modules/.pnpm/@vueuse+core@14.4.0_vue@3.5.42_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
63
+ //#region node_modules/.pnpm/@vueuse+core@14.4.0_vue@3.5.43_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
64
64
  const defaultWindow = isClient ? window : void 0;
65
65
  const defaultDocument = isClient ? window.document : void 0;
66
66
  const defaultNavigator = isClient ? window.navigator : void 0;
@@ -179,43 +179,30 @@ function useMediaQuery(query, options = {}) {
179
179
  function usePreferredDark(options) {
180
180
  return useMediaQuery("(prefers-color-scheme: dark)", options);
181
181
  }
182
- const DEFAULT_UNITS = [
183
- {
184
- max: 6e4,
185
- value: 1e3,
186
- name: "second"
187
- },
188
- {
189
- max: 276e4,
190
- value: 6e4,
191
- name: "minute"
192
- },
193
- {
194
- max: 72e6,
195
- value: 36e5,
196
- name: "hour"
197
- },
198
- {
199
- max: 5184e5,
200
- value: 864e5,
201
- name: "day"
202
- },
203
- {
204
- max: 24192e5,
205
- value: 6048e5,
206
- name: "week"
207
- },
208
- {
209
- max: 28512e6,
210
- value: 2592e6,
211
- name: "month"
212
- },
213
- {
214
- max: Number.POSITIVE_INFINITY,
215
- value: 31536e6,
216
- name: "year"
217
- }
218
- ];
182
+
183
+ //#endregion
184
+ //#region node_modules/.pnpm/mitt@3.0.1/node_modules/mitt/dist/mitt.mjs
185
+ function mitt_default(n) {
186
+ return {
187
+ all: n = n || /* @__PURE__ */ new Map(),
188
+ on: function(t, e) {
189
+ var i = n.get(t);
190
+ i ? i.push(e) : n.set(t, [e]);
191
+ },
192
+ off: function(t, e) {
193
+ var i = n.get(t);
194
+ i && (e ? i.splice(i.indexOf(e) >>> 0, 1) : n.set(t, []));
195
+ },
196
+ emit: function(t, e) {
197
+ var i = n.get(t);
198
+ i && i.slice().map(function(n) {
199
+ n(e);
200
+ }), (i = n.get("*")) && i.slice().map(function(n) {
201
+ n(t, e);
202
+ });
203
+ }
204
+ };
205
+ }
219
206
 
220
207
  //#endregion
221
208
  //#region node_modules/.pnpm/js-cookie@3.0.8/node_modules/js-cookie/dist/js.cookie.mjs
@@ -289,30 +276,6 @@ function init(converter, defaultAttributes) {
289
276
  }
290
277
  var api = init(defaultConverter, { path: "/" });
291
278
 
292
- //#endregion
293
- //#region node_modules/.pnpm/mitt@3.0.1/node_modules/mitt/dist/mitt.mjs
294
- function mitt_default(n) {
295
- return {
296
- all: n = n || /* @__PURE__ */ new Map(),
297
- on: function(t, e) {
298
- var i = n.get(t);
299
- i ? i.push(e) : n.set(t, [e]);
300
- },
301
- off: function(t, e) {
302
- var i = n.get(t);
303
- i && (e ? i.splice(i.indexOf(e) >>> 0, 1) : n.set(t, []));
304
- },
305
- emit: function(t, e) {
306
- var i = n.get(t);
307
- i && i.slice().map(function(n) {
308
- n(e);
309
- }), (i = n.get("*")) && i.slice().map(function(n) {
310
- n(t, e);
311
- });
312
- }
313
- };
314
- }
315
-
316
279
  //#endregion
317
280
  //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js
318
281
  /** Detect free variable `global` from Node.js. */
@@ -582,12 +545,12 @@ function toLower(value) {
582
545
  //#endregion
583
546
  //#region node_modules/.pnpm/mitt@3.0.1/node_modules/mitt/index.d.ts
584
547
  var [EventType] = [
585
- 60,
548
+ 62,
586
549
  () => [],
587
550
  []
588
551
  ];
589
552
  var [Handler] = [
590
- 61,
553
+ 63,
591
554
  (T) => [T],
592
555
  [
593
556
  "",
@@ -596,7 +559,7 @@ var [Handler] = [
596
559
  ]
597
560
  ];
598
561
  var [WildcardHandler] = [
599
- 62,
562
+ 64,
600
563
  (T) => [
601
564
  Record,
602
565
  T,
@@ -614,7 +577,7 @@ var [WildcardHandler] = [
614
577
  ]
615
578
  ];
616
579
  var [EventHandlerList] = [
617
- 63,
580
+ 65,
618
581
  (T) => [
619
582
  T,
620
583
  Handler,
@@ -628,7 +591,7 @@ var [EventHandlerList] = [
628
591
  ]
629
592
  ];
630
593
  var [WildCardEventHandlerList] = [
631
- 64,
594
+ 66,
632
595
  (T) => [
633
596
  Record,
634
597
  T,
@@ -644,7 +607,7 @@ var [WildCardEventHandlerList] = [
644
607
  ]
645
608
  ];
646
609
  var [EventHandlerMap] = [
647
- 65,
610
+ 67,
648
611
  (Events) => [
649
612
  EventType,
650
613
  Record,
@@ -670,7 +633,7 @@ var [EventHandlerMap] = [
670
633
  ]
671
634
  ];
672
635
  var [Emitter] = [
673
- 66,
636
+ 68,
674
637
  (Key, Events) => [
675
638
  EventType,
676
639
  Record,
@@ -753,4 +716,4 @@ var [Emitter] = [
753
716
  ];
754
717
 
755
718
  //#endregion
756
- export { api as a, mitt_default as i, EventType as n, usePreferredDark as o, toLower as r, Emitter as t };
719
+ export { mitt_default as a, api as i, EventType as n, usePreferredDark as o, toLower as r, Emitter as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
- "version": "0.10.43",
3
+ "version": "0.11.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -15,6 +15,8 @@
15
15
  "registry": "https://registry.npmjs.org"
16
16
  },
17
17
  "scripts": {
18
+ "sync": "git submodule update --remote",
19
+ "gen": "buf generate",
18
20
  "play": "vite",
19
21
  "test": "vitest",
20
22
  "lint": "oxlint",
@@ -23,9 +25,6 @@
23
25
  "lint-staged": "lint-staged",
24
26
  "prepare": "husky"
25
27
  },
26
- "dependencies": {
27
- "x-error-lib": "^0.6.5"
28
- },
29
28
  "devDependencies": {
30
29
  "@types/js-cookie": "^3.0.6",
31
30
  "@types/lodash-es": "^4.17.12",
@@ -38,15 +37,18 @@
38
37
  "mitt": "^3.0.1",
39
38
  "oxfmt": "^0.67.0",
40
39
  "oxlint": "^1.82.0",
40
+ "oxlint-tsgolint": "^7.0.2002",
41
41
  "picomatch": "^4.0.7",
42
42
  "rolldown": "^1.2.8",
43
43
  "sass": "^1.104.0",
44
44
  "tsdown": "^0.23.0",
45
45
  "typescript": "^6.0.3",
46
46
  "vite": "^8.3.0",
47
+ "vue-tsc": "^3.3.11",
47
48
  "x-config-lib": "^0.1.6",
48
49
  "x-config-oxfmt": "^0.1.6",
49
- "x-config-oxlint": "^0.1.7"
50
+ "x-config-oxlint": "^0.1.7",
51
+ "zod": "^4.6.5"
50
52
  },
51
53
  "peerDependencies": {
52
54
  "axios": "^1.20.0",
@@ -1,205 +0,0 @@
1
- import { t as __exportAll } from "./rolldown-runtime.c6i0pdwe.js";
2
-
3
- //#region src/i18n/locales/en/index.ts
4
- var en_exports = /* @__PURE__ */ __exportAll({ default: () => en_default });
5
- var en_default = {
6
- "$vuetify": {
7
- badge: "Badge",
8
- open: "Open",
9
- close: "Close",
10
- dismiss: "Dismiss",
11
- confirmEdit: {
12
- ok: "OK",
13
- cancel: "Cancel"
14
- },
15
- dataIterator: {
16
- noResultsText: "No matching records found",
17
- loadingText: "Loading items..."
18
- },
19
- dataTable: {
20
- itemsPerPageText: "Rows per page:",
21
- ariaLabel: {
22
- sortDescending: "Sorted descending.",
23
- sortAscending: "Sorted ascending.",
24
- sortNone: "Not sorted.",
25
- activateNone: "Activate to remove sorting.",
26
- activateDescending: "Activate to sort descending.",
27
- activateAscending: "Activate to sort ascending.",
28
- selectRow: "Select row",
29
- selectAll: "Select all",
30
- selectGroup: "Select group"
31
- },
32
- sortBy: "Sort by"
33
- },
34
- dataFooter: {
35
- itemsPerPageText: "Items per page:",
36
- itemsPerPageAll: "All",
37
- nextPage: "Next page",
38
- prevPage: "Previous page",
39
- firstPage: "First page",
40
- lastPage: "Last page",
41
- pageText: "{0}-{1} of {2}"
42
- },
43
- dateRangeInput: { divider: "to" },
44
- monthPicker: {
45
- title: "Select month",
46
- itemsSelected: "{0} selected",
47
- header: "Enter month",
48
- range: { title: "Enter months" },
49
- ariaLabel: {
50
- previousYear: "Previous year",
51
- nextYear: "Next year",
52
- selectYear: "Select year",
53
- currentMonth: "Current month, {0}"
54
- }
55
- },
56
- datePicker: {
57
- itemsSelected: "{0} selected",
58
- range: {
59
- title: "Select dates",
60
- header: "Enter dates"
61
- },
62
- title: "Select date",
63
- header: "Enter date",
64
- input: { placeholder: "Enter date" },
65
- ariaLabel: {
66
- previousMonth: "Previous month",
67
- nextMonth: "Next month",
68
- selectYear: "Select year",
69
- previousYear: "Previous year",
70
- nextYear: "Next year",
71
- selectMonth: "Select month",
72
- selectDate: "{0}",
73
- currentDate: "Today, {0}"
74
- }
75
- },
76
- noDataText: "No data available",
77
- carousel: {
78
- prev: "Previous visual",
79
- next: "Next visual",
80
- ariaLabel: { delimiter: "Carousel slide {0} of {1}" }
81
- },
82
- calendar: {
83
- moreEvents: "{0} more",
84
- today: "Today"
85
- },
86
- heatmap: {
87
- less: "Less",
88
- more: "More"
89
- },
90
- input: {
91
- clear: "Clear {0}",
92
- prependAction: "{0} prepended action",
93
- appendAction: "{0} appended action",
94
- otp: "Enter verification code"
95
- },
96
- fileInput: {
97
- counter: "{0} files",
98
- counterSize: "{0} files ({1} in total)"
99
- },
100
- fileUpload: {
101
- title: "Drag and drop files here",
102
- divider: "or",
103
- browse: "Browse Files"
104
- },
105
- timePicker: {
106
- am: "AM",
107
- pm: "PM",
108
- title: "Select Time",
109
- hour: "Hour",
110
- minute: "Minute",
111
- second: "Second",
112
- notAllowed: "Value is not allowed"
113
- },
114
- pagination: { ariaLabel: {
115
- root: "Pagination Navigation",
116
- next: "Next page",
117
- previous: "Previous page",
118
- page: "Go to page {0}",
119
- currentPage: "Page {0}, Current page",
120
- first: "First page",
121
- last: "Last page"
122
- } },
123
- stepper: {
124
- next: "Next",
125
- prev: "Previous"
126
- },
127
- rating: { ariaLabel: { item: "Rating {0} of {1}" } },
128
- loading: "Loading...",
129
- infiniteScroll: {
130
- loadMore: "Load more",
131
- empty: "No more"
132
- },
133
- rules: {
134
- required: "This field is required",
135
- email: "Please enter a valid email",
136
- number: "This field can only contain numbers",
137
- integer: "This field can only contain integer values",
138
- capital: "This field can only contain uppercase letters",
139
- maxLength: "You must enter a maximum of {0} characters",
140
- minLength: "You must enter a minimum of {0} characters",
141
- strictLength: "The length of the entered field is invalid",
142
- exclude: "The {0} character is not allowed",
143
- notEmpty: "Please choose at least one value",
144
- pattern: "Invalid format"
145
- },
146
- command: { search: "Type a command or search..." },
147
- hotkey: {
148
- then: "then",
149
- ctrl: "Ctrl",
150
- command: "Command",
151
- space: "Space",
152
- shift: "Shift",
153
- alt: "Alt",
154
- enter: "Enter",
155
- escape: "Escape",
156
- upArrow: "Up Arrow",
157
- downArrow: "Down Arrow",
158
- leftArrow: "Left Arrow",
159
- rightArrow: "Right Arrow",
160
- backspace: "Backspace",
161
- option: "Option",
162
- plus: "plus",
163
- shortcut: "Keyboard shortcut: {0}",
164
- or: "or"
165
- },
166
- video: {
167
- play: "Play",
168
- pause: "Pause",
169
- seek: "Seek",
170
- volume: "Volume",
171
- showVolume: "Show volume control",
172
- mute: "Mute",
173
- unmute: "Unmute",
174
- enterFullscreen: "Full screen",
175
- exitFullscreen: "Exit full screen"
176
- },
177
- colorPicker: { ariaLabel: {
178
- eyedropper: "Select color with eyedropper",
179
- hueSlider: "Hue",
180
- alphaSlider: "Alpha",
181
- redInput: "Red value",
182
- greenInput: "Green value",
183
- blueInput: "Blue value",
184
- alphaInput: "Alpha value",
185
- hueInput: "Hue value",
186
- saturationInput: "Saturation value",
187
- lightnessInput: "Lightness value",
188
- hexInput: "HEX value",
189
- hexaInput: "HEX with alpha value",
190
- changeFormat: "Change color format"
191
- } }
192
- },
193
- "x-essential-lib": {
194
- dlg: {
195
- ask: "Do you want {verb} {object} '{name}' ?",
196
- cancel: "Cancel",
197
- ok: "OK",
198
- responding: "Responding..."
199
- },
200
- publicDomain: "Public Domain"
201
- }
202
- };
203
-
204
- //#endregion
205
- export { en_exports as t };
@@ -1,205 +0,0 @@
1
- import { t as __exportAll } from "./rolldown-runtime.c6i0pdwe.js";
2
-
3
- //#region src/i18n/locales/zhHans/index.ts
4
- var zhHans_exports = /* @__PURE__ */ __exportAll({ default: () => zhHans_default });
5
- var zhHans_default = {
6
- "$vuetify": {
7
- badge: "徽章",
8
- open: "打开",
9
- close: "关闭",
10
- dismiss: "取消",
11
- confirmEdit: {
12
- ok: "确定",
13
- cancel: "取消"
14
- },
15
- dataIterator: {
16
- noResultsText: "没有符合条件的结果",
17
- loadingText: "加载中……"
18
- },
19
- dataTable: {
20
- itemsPerPageText: "每页数目:",
21
- ariaLabel: {
22
- sortDescending: ":降序排列。",
23
- sortAscending: ":升序排列。",
24
- sortNone: ":未排序。",
25
- activateNone: "点击以移除排序。",
26
- activateDescending: "点击以降序排列。",
27
- activateAscending: "点击以升序排列。",
28
- selectRow: "选择行",
29
- selectAll: "选择全部",
30
- selectGroup: "选择分组"
31
- },
32
- sortBy: "排序方式"
33
- },
34
- dataFooter: {
35
- itemsPerPageText: "每页数目:",
36
- itemsPerPageAll: "全部",
37
- nextPage: "下一页",
38
- prevPage: "上一页",
39
- firstPage: "首页",
40
- lastPage: "尾页",
41
- pageText: "{0}-{1} 共 {2}"
42
- },
43
- dateRangeInput: { divider: "至" },
44
- monthPicker: {
45
- title: "选择月份",
46
- itemsSelected: "已选择 {0} 项",
47
- header: "输入月份",
48
- range: { title: "输入月份" },
49
- ariaLabel: {
50
- previousYear: "上一年",
51
- nextYear: "下一年",
52
- selectYear: "选择年份",
53
- currentMonth: "本月,{0}"
54
- }
55
- },
56
- datePicker: {
57
- itemsSelected: "已选择 {0} 项",
58
- range: {
59
- title: "选择日期",
60
- header: "输入日期"
61
- },
62
- title: "选择日期",
63
- header: "输入日期",
64
- input: { placeholder: "输入日期" },
65
- ariaLabel: {
66
- previousMonth: "上个月",
67
- nextMonth: "下个月",
68
- selectYear: "选择年份",
69
- previousYear: "上一年",
70
- nextYear: "下一年",
71
- selectMonth: "选择月份",
72
- selectDate: "{0}",
73
- currentDate: "今天,{0}"
74
- }
75
- },
76
- noDataText: "没有数据",
77
- carousel: {
78
- prev: "上一张",
79
- next: "下一张",
80
- ariaLabel: { delimiter: "幻灯片 {0} / {1}" }
81
- },
82
- calendar: {
83
- moreEvents: "还有 {0} 项",
84
- today: "今天"
85
- },
86
- heatmap: {
87
- less: "少",
88
- more: "多"
89
- },
90
- input: {
91
- clear: "清除 {0}",
92
- prependAction: "{0} 前置操作",
93
- appendAction: "{0} 后置操作",
94
- otp: "请输入第 {0} 位 OTP"
95
- },
96
- fileInput: {
97
- counter: "{0} 个文件",
98
- counterSize: "{0} 个文件(共 {1})"
99
- },
100
- fileUpload: {
101
- title: "拖放文件到此处",
102
- divider: "或",
103
- browse: "浏览文件"
104
- },
105
- timePicker: {
106
- am: "上午",
107
- pm: "下午",
108
- title: "选择时间",
109
- hour: "小时",
110
- minute: "分钟",
111
- second: "秒",
112
- notAllowed: "值不允许"
113
- },
114
- pagination: { ariaLabel: {
115
- root: "分页导航",
116
- next: "下一页",
117
- previous: "上一页",
118
- page: "转到页面 {0}",
119
- currentPage: "当前页 {0}",
120
- first: "第一页",
121
- last: "最后一页"
122
- } },
123
- stepper: {
124
- next: "下一步",
125
- prev: "上一步"
126
- },
127
- rating: { ariaLabel: { item: "评分 {0} / {1}" } },
128
- loading: "加载中...",
129
- infiniteScroll: {
130
- loadMore: "加载更多",
131
- empty: "没有更多内容"
132
- },
133
- rules: {
134
- required: "此字段为必填项",
135
- email: "请输入有效的电子邮件地址",
136
- number: "此字段只能包含数字",
137
- integer: "此字段只能包含整数",
138
- capital: "此字段只能包含大写字母",
139
- maxLength: "您最多可以输入{0}个字符",
140
- minLength: "您必须至少输入{0}个字符",
141
- strictLength: "输入字段的长度无效",
142
- exclude: "字符{0}是不允许的",
143
- notEmpty: "请至少选择一个值",
144
- pattern: "格式无效"
145
- },
146
- command: { search: "输入命令或搜索..." },
147
- hotkey: {
148
- then: "然后",
149
- ctrl: "Ctrl",
150
- command: "Command",
151
- shift: "Shift",
152
- alt: "Alt",
153
- option: "Option",
154
- enter: "Enter",
155
- escape: "Escape",
156
- upArrow: "上箭头",
157
- downArrow: "下箭头",
158
- leftArrow: "左箭头",
159
- rightArrow: "右箭头",
160
- backspace: "退格",
161
- space: "空格",
162
- plus: "加",
163
- shortcut: "键盘快捷键:{0}",
164
- or: "或"
165
- },
166
- video: {
167
- play: "播放",
168
- pause: "暂停",
169
- seek: "跳转",
170
- volume: "音量",
171
- showVolume: "显示音量控制",
172
- mute: "静音",
173
- unmute: "取消静音",
174
- enterFullscreen: "全屏",
175
- exitFullscreen: "退出全屏"
176
- },
177
- colorPicker: { ariaLabel: {
178
- eyedropper: "从屏幕拾取颜色",
179
- hueSlider: "色相",
180
- alphaSlider: "不透明度",
181
- redInput: "红色",
182
- greenInput: "绿色",
183
- blueInput: "蓝色",
184
- alphaInput: "不透明度",
185
- hueInput: "色相",
186
- saturationInput: "饱和度",
187
- lightnessInput: "亮度",
188
- hexInput: "HEX 值",
189
- hexaInput: "带不透明度 HEX 值",
190
- changeFormat: "更改颜色格式"
191
- } }
192
- },
193
- "x-essential-lib": {
194
- dlg: {
195
- ask: "你想要{verb}{object}'{name}'?",
196
- cancel: "取消",
197
- ok: "确定",
198
- responding: "响应中..."
199
- },
200
- publicDomain: "公域"
201
- }
202
- };
203
-
204
- //#endregion
205
- export { zhHans_exports as t };