@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 CHANGED
@@ -3,7 +3,7 @@
3
3
  require('vue');
4
4
  require('consola');
5
5
  require('es-toolkit');
6
- const format = require('./shared/utils.Cp3n3FrB.cjs');
6
+ const format = require('./shared/utils.RNNXtrF5.cjs');
7
7
  require('./confirmSemantic.cjs');
8
8
  require('element-plus');
9
9
  require('axios');
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.Dx5Dp11G.mjs';
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
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const format = require('./shared/utils.Cp3n3FrB.cjs');
3
+ const format = require('./shared/utils.RNNXtrF5.cjs');
4
4
  require('./is.cjs');
5
5
  require('consola');
6
6
  require('vue');
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.Dx5Dp11G.mjs';
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
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  require('axios');
4
- const format = require('./shared/utils.Cp3n3FrB.cjs');
4
+ const format = require('./shared/utils.RNNXtrF5.cjs');
5
5
  require('vue');
6
6
  require('consola');
7
7
  require('es-toolkit');
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.Dx5Dp11G.mjs';
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
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const format = require('./shared/utils.Cp3n3FrB.cjs');
3
+ const format = require('./shared/utils.RNNXtrF5.cjs');
4
4
  const confirmSemantic = require('./confirmSemantic.cjs');
5
5
  const is = require('./is.cjs');
6
6
  const theme = require('./theme.cjs');
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.Dx5Dp11G.mjs';
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-23 17:35:43";
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-23 17:35:43";
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.14",
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 <8"
82
+ "vite": ">=5 <7"
82
83
  }
83
84
  }