@sybz-components/utils 1.0.14 → 1.0.15
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/base.cjs +1 -1
- package/dist/base.mjs +1 -1
- package/dist/format.cjs +1 -1
- package/dist/format.mjs +1 -1
- package/dist/http.cjs +1 -1
- package/dist/http.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/{utils.Dx5Dp11G.mjs → utils.2cNhEypm.mjs} +1 -1
- package/dist/shared/{utils.Cp3n3FrB.cjs → utils.RNNXtrF5.cjs} +1 -1
- package/dist/vite.cjs +5 -0
- package/dist/vite.d.cts +4 -1
- package/dist/vite.d.mts +4 -1
- package/dist/vite.d.ts +4 -1
- package/dist/vite.mjs +4 -0
- package/package.json +3 -2
package/dist/base.cjs
CHANGED
package/dist/base.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'vue';
|
|
2
2
|
import 'consola';
|
|
3
3
|
import 'es-toolkit';
|
|
4
|
-
export { $ as $toast, c as clearStorage, a as clone, b as configureUtils, d as confirm, e as copy, f as debounce, g as delay, h as getStorage, i as getType, j as getUtilsBuildTime, k as getVariable, l as isEmpty, m as log, n as merge, o as mockValue, p as processWidth, r as random, s as setStorage, t as test, q as throttle, u as toLine, v as tryCatch, w as validate, x as validateForm, y as validateOnSubmit } from './shared/utils.
|
|
4
|
+
export { $ as $toast, c as clearStorage, a as clone, b as configureUtils, d as confirm, e as copy, f as debounce, g as delay, h as getStorage, i as getType, j as getUtilsBuildTime, k as getVariable, l as isEmpty, m as log, n as merge, o as mockValue, p as processWidth, r as random, s as setStorage, t as test, q as throttle, u as toLine, v as tryCatch, w as validate, x as validateForm, y as validateOnSubmit } from './shared/utils.2cNhEypm.mjs';
|
|
5
5
|
import './confirmSemantic.mjs';
|
|
6
6
|
import 'element-plus';
|
|
7
7
|
import 'axios';
|
package/dist/format.cjs
CHANGED
package/dist/format.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { z as formatBytes, A as formatBytesConvert, B as formatDurationTime, C as formatTextToHtml, D as formatThousands, E as formatTime, F as formatToFixed } from './shared/utils.
|
|
1
|
+
export { z as formatBytes, A as formatBytesConvert, B as formatDurationTime, C as formatTextToHtml, D as formatThousands, E as formatTime, F as formatToFixed } from './shared/utils.2cNhEypm.mjs';
|
|
2
2
|
import './is.mjs';
|
|
3
3
|
import 'consola';
|
|
4
4
|
import 'vue';
|
package/dist/http.cjs
CHANGED
package/dist/http.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'axios';
|
|
2
|
-
export { H as HttpError, G as configureHttp, I as createHttp, J as http } from './shared/utils.
|
|
2
|
+
export { H as HttpError, G as configureHttp, I as createHttp, J as http } from './shared/utils.2cNhEypm.mjs';
|
|
3
3
|
import 'vue';
|
|
4
4
|
import 'consola';
|
|
5
5
|
import 'es-toolkit';
|
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { $ as $toast, H as HttpError, c as clearStorage, a as clone, G as configureHttp, b as configureUtils, d as confirm, e as copy, I as createHttp, f as debounce, g as delay, z as formatBytes, A as formatBytesConvert, B as formatDurationTime, C as formatTextToHtml, D as formatThousands, E as formatTime, F as formatToFixed, h as getStorage, i as getType, j as getUtilsBuildTime, k as getVariable, J as http, l as isEmpty, m as log, n as merge, o as mockValue, p as processWidth, r as random, s as setStorage, t as test, q as throttle, u as toLine, v as tryCatch, w as validate, x as validateForm, y as validateOnSubmit } from './shared/utils.
|
|
1
|
+
export { $ as $toast, H as HttpError, c as clearStorage, a as clone, G as configureHttp, b as configureUtils, d as confirm, e as copy, I as createHttp, f as debounce, g as delay, z as formatBytes, A as formatBytesConvert, B as formatDurationTime, C as formatTextToHtml, D as formatThousands, E as formatTime, F as formatToFixed, h as getStorage, i as getType, j as getUtilsBuildTime, k as getVariable, J as http, l as isEmpty, m as log, n as merge, o as mockValue, p as processWidth, r as random, s as setStorage, t as test, q as throttle, u as toLine, v as tryCatch, w as validate, x as validateForm, y as validateOnSubmit } from './shared/utils.2cNhEypm.mjs';
|
|
2
2
|
export { resolveConfirmSemantic } from './confirmSemantic.mjs';
|
|
3
3
|
export { isArray, isBoolean, isComponent, isDate, isEmptyObject, isFunction, isIOS, isMap, isNumber, isObject, isPlainObject, isPromise, isRegExp, isSVGElement, isSet, isString, isStringNumber, isSymbol, isUrl, objectToString, toRawType, toTypeString } from './is.mjs';
|
|
4
4
|
export { SYBZ_THEME_PREFIX, isSybzTheme, resolveSybzComponentTheme } from './theme.mjs';
|
|
@@ -1196,7 +1196,7 @@ function getVariable(propertyName, fallback = "") {
|
|
|
1196
1196
|
const DEFAULT_BUILD_TIME_FALLBACK = "\u672A\u6CE8\u5165";
|
|
1197
1197
|
function getUtilsBuildTime(fallback = DEFAULT_BUILD_TIME_FALLBACK) {
|
|
1198
1198
|
{
|
|
1199
|
-
return "2026-09-
|
|
1199
|
+
return "2026-09-24 16:01:50";
|
|
1200
1200
|
}
|
|
1201
1201
|
}
|
|
1202
1202
|
function test() {
|
|
@@ -1202,7 +1202,7 @@ function getVariable(propertyName, fallback = "") {
|
|
|
1202
1202
|
const DEFAULT_BUILD_TIME_FALLBACK = "\u672A\u6CE8\u5165";
|
|
1203
1203
|
function getUtilsBuildTime(fallback = DEFAULT_BUILD_TIME_FALLBACK) {
|
|
1204
1204
|
{
|
|
1205
|
-
return "2026-09-
|
|
1205
|
+
return "2026-09-24 16:01:50";
|
|
1206
1206
|
}
|
|
1207
1207
|
}
|
|
1208
1208
|
function test() {
|
package/dist/vite.cjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const codeInspectorPlugin = require('code-inspector-plugin');
|
|
4
4
|
const tailwindcss = require('@tailwindcss/vite');
|
|
5
|
+
const vueJsx = require('@vitejs/plugin-vue-jsx');
|
|
5
6
|
const gitCommitLog = require('./gitCommitLog.cjs');
|
|
6
7
|
require('node:child_process');
|
|
7
8
|
require('node:fs');
|
|
@@ -10,6 +11,7 @@ require('node:path');
|
|
|
10
11
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
11
12
|
|
|
12
13
|
const tailwindcss__default = /*#__PURE__*/_interopDefaultCompat(tailwindcss);
|
|
14
|
+
const vueJsx__default = /*#__PURE__*/_interopDefaultCompat(vueJsx);
|
|
13
15
|
|
|
14
16
|
const createCodeInspector = (options = {}) => codeInspectorPlugin.codeInspectorPlugin({ editor: "code", ...options, bundler: "vite" });
|
|
15
17
|
const formatBuildTime = (date) => {
|
|
@@ -43,6 +45,9 @@ const createBuildTime = (metaName = "buildTime") => {
|
|
|
43
45
|
};
|
|
44
46
|
const sybzVitePlugins = (options = {}) => {
|
|
45
47
|
const plugins = [];
|
|
48
|
+
if (options.vueJsx !== false) {
|
|
49
|
+
plugins.push(vueJsx__default(typeof options.vueJsx === "object" ? options.vueJsx : {}));
|
|
50
|
+
}
|
|
46
51
|
if (options.tailwind !== false) {
|
|
47
52
|
plugins.push(...tailwindcss__default(typeof options.tailwind === "object" ? options.tailwind : {}));
|
|
48
53
|
}
|
package/dist/vite.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CodeInspectorPluginOptions } from 'code-inspector-plugin';
|
|
2
2
|
import { PluginOptions } from '@tailwindcss/vite';
|
|
3
|
+
import { Options } from '@vitejs/plugin-vue-jsx';
|
|
3
4
|
import { PluginOption } from 'vite';
|
|
4
5
|
import { GitCommitLogOptions } from './gitCommitLog.cjs';
|
|
5
6
|
|
|
@@ -10,6 +11,8 @@ declare global {
|
|
|
10
11
|
}
|
|
11
12
|
type SybzCodeInspectorOptions = Omit<CodeInspectorPluginOptions, 'bundler'>;
|
|
12
13
|
interface SybzVitePluginsOptions {
|
|
14
|
+
/** Vue JSX/TSX 插件配置;默认启用,设为 false 时关闭。 */
|
|
15
|
+
vueJsx?: boolean | Options;
|
|
13
16
|
/** Tailwind CSS v4 Vite 插件配置;默认启用,设为 false 时关闭。 */
|
|
14
17
|
tailwind?: boolean | PluginOptions;
|
|
15
18
|
/** 代码定位插件配置;默认启用,设为 false 时关闭。 */
|
|
@@ -22,7 +25,7 @@ interface SybzVitePluginsOptions {
|
|
|
22
25
|
};
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
25
|
-
* 创建 sybz 项目的 Vite 插件预设,默认包含 Tailwind CSS v4、代码定位、Git 提交信息和打包时间。
|
|
28
|
+
* 创建 sybz 项目的 Vite 插件预设,默认包含 Vue JSX/TSX、Tailwind CSS v4、代码定位、Git 提交信息和打包时间。
|
|
26
29
|
* Vite 会自动扁平化插件数组,推荐直接写入 plugins,无需展开运算符。
|
|
27
30
|
*/
|
|
28
31
|
declare const sybzVitePlugins: (options?: SybzVitePluginsOptions) => PluginOption;
|
package/dist/vite.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CodeInspectorPluginOptions } from 'code-inspector-plugin';
|
|
2
2
|
import { PluginOptions } from '@tailwindcss/vite';
|
|
3
|
+
import { Options } from '@vitejs/plugin-vue-jsx';
|
|
3
4
|
import { PluginOption } from 'vite';
|
|
4
5
|
import { GitCommitLogOptions } from './gitCommitLog.mjs';
|
|
5
6
|
|
|
@@ -10,6 +11,8 @@ declare global {
|
|
|
10
11
|
}
|
|
11
12
|
type SybzCodeInspectorOptions = Omit<CodeInspectorPluginOptions, 'bundler'>;
|
|
12
13
|
interface SybzVitePluginsOptions {
|
|
14
|
+
/** Vue JSX/TSX 插件配置;默认启用,设为 false 时关闭。 */
|
|
15
|
+
vueJsx?: boolean | Options;
|
|
13
16
|
/** Tailwind CSS v4 Vite 插件配置;默认启用,设为 false 时关闭。 */
|
|
14
17
|
tailwind?: boolean | PluginOptions;
|
|
15
18
|
/** 代码定位插件配置;默认启用,设为 false 时关闭。 */
|
|
@@ -22,7 +25,7 @@ interface SybzVitePluginsOptions {
|
|
|
22
25
|
};
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
25
|
-
* 创建 sybz 项目的 Vite 插件预设,默认包含 Tailwind CSS v4、代码定位、Git 提交信息和打包时间。
|
|
28
|
+
* 创建 sybz 项目的 Vite 插件预设,默认包含 Vue JSX/TSX、Tailwind CSS v4、代码定位、Git 提交信息和打包时间。
|
|
26
29
|
* Vite 会自动扁平化插件数组,推荐直接写入 plugins,无需展开运算符。
|
|
27
30
|
*/
|
|
28
31
|
declare const sybzVitePlugins: (options?: SybzVitePluginsOptions) => PluginOption;
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CodeInspectorPluginOptions } from 'code-inspector-plugin';
|
|
2
2
|
import { PluginOptions } from '@tailwindcss/vite';
|
|
3
|
+
import { Options } from '@vitejs/plugin-vue-jsx';
|
|
3
4
|
import { PluginOption } from 'vite';
|
|
4
5
|
import { GitCommitLogOptions } from './gitCommitLog.js';
|
|
5
6
|
|
|
@@ -10,6 +11,8 @@ declare global {
|
|
|
10
11
|
}
|
|
11
12
|
type SybzCodeInspectorOptions = Omit<CodeInspectorPluginOptions, 'bundler'>;
|
|
12
13
|
interface SybzVitePluginsOptions {
|
|
14
|
+
/** Vue JSX/TSX 插件配置;默认启用,设为 false 时关闭。 */
|
|
15
|
+
vueJsx?: boolean | Options;
|
|
13
16
|
/** Tailwind CSS v4 Vite 插件配置;默认启用,设为 false 时关闭。 */
|
|
14
17
|
tailwind?: boolean | PluginOptions;
|
|
15
18
|
/** 代码定位插件配置;默认启用,设为 false 时关闭。 */
|
|
@@ -22,7 +25,7 @@ interface SybzVitePluginsOptions {
|
|
|
22
25
|
};
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
25
|
-
* 创建 sybz 项目的 Vite 插件预设,默认包含 Tailwind CSS v4、代码定位、Git 提交信息和打包时间。
|
|
28
|
+
* 创建 sybz 项目的 Vite 插件预设,默认包含 Vue JSX/TSX、Tailwind CSS v4、代码定位、Git 提交信息和打包时间。
|
|
26
29
|
* Vite 会自动扁平化插件数组,推荐直接写入 plugins,无需展开运算符。
|
|
27
30
|
*/
|
|
28
31
|
declare const sybzVitePlugins: (options?: SybzVitePluginsOptions) => PluginOption;
|
package/dist/vite.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { codeInspectorPlugin } from 'code-inspector-plugin';
|
|
2
2
|
import tailwindcss from '@tailwindcss/vite';
|
|
3
|
+
import vueJsx from '@vitejs/plugin-vue-jsx';
|
|
3
4
|
import { gitCommitLog } from './gitCommitLog.mjs';
|
|
4
5
|
import 'node:child_process';
|
|
5
6
|
import 'node:fs';
|
|
@@ -37,6 +38,9 @@ const createBuildTime = (metaName = "buildTime") => {
|
|
|
37
38
|
};
|
|
38
39
|
const sybzVitePlugins = (options = {}) => {
|
|
39
40
|
const plugins = [];
|
|
41
|
+
if (options.vueJsx !== false) {
|
|
42
|
+
plugins.push(vueJsx(typeof options.vueJsx === "object" ? options.vueJsx : {}));
|
|
43
|
+
}
|
|
40
44
|
if (options.tailwind !== false) {
|
|
41
45
|
plugins.push(...tailwindcss(typeof options.tailwind === "object" ? options.tailwind : {}));
|
|
42
46
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sybz-components/utils",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "utils of sybz-components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"@tailwindcss/vite": "^4.3.3",
|
|
59
59
|
"@typescript-eslint/eslint-plugin": "8.62.0",
|
|
60
60
|
"@typescript-eslint/parser": "8.62.0",
|
|
61
|
+
"@vitejs/plugin-vue-jsx": "^4.2.0",
|
|
61
62
|
"@vue/reactivity": "^3.5.18",
|
|
62
63
|
"@vue/shared": "^3.5.18",
|
|
63
64
|
"axios": "^1.19.0",
|
|
@@ -78,6 +79,6 @@
|
|
|
78
79
|
"vue-eslint-parser": "10.4.1"
|
|
79
80
|
},
|
|
80
81
|
"peerDependencies": {
|
|
81
|
-
"vite": ">=5 <
|
|
82
|
+
"vite": ">=5 <7"
|
|
82
83
|
}
|
|
83
84
|
}
|