@yh-ui/components 1.0.42 → 1.0.44
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/col/src/col.d.vue.ts +1 -1
- package/dist/col/src/col.vue.d.ts +1 -1
- package/dist/date-picker/src/panel-utils.cjs +1 -1
- package/dist/date-picker/src/panel-utils.mjs +1 -1
- package/dist/dayjs-plugins.cjs +31 -47
- package/dist/dayjs-plugins.d.cts +10 -0
- package/dist/dayjs-plugins.d.mts +10 -0
- package/dist/dayjs-plugins.d.ts +9 -6
- package/dist/dayjs-plugins.mjs +16 -14
- package/dist/vite-plugin.cjs +31 -0
- package/dist/vite-plugin.d.ts +29 -0
- package/dist/vite-plugin.mjs +30 -0
- package/package.json +11 -5
|
@@ -99,10 +99,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
99
99
|
readonly span: number;
|
|
100
100
|
readonly tag: string;
|
|
101
101
|
readonly md: number | import("./col").ColResponsiveValue;
|
|
102
|
-
readonly lg: number | import("./col").ColResponsiveValue;
|
|
103
102
|
readonly pull: number;
|
|
104
103
|
readonly xs: number | import("./col").ColResponsiveValue;
|
|
105
104
|
readonly sm: number | import("./col").ColResponsiveValue;
|
|
105
|
+
readonly lg: number | import("./col").ColResponsiveValue;
|
|
106
106
|
readonly xl: number | import("./col").ColResponsiveValue;
|
|
107
107
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
108
108
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
@@ -99,10 +99,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
99
99
|
readonly span: number;
|
|
100
100
|
readonly tag: string;
|
|
101
101
|
readonly md: number | import("./col").ColResponsiveValue;
|
|
102
|
-
readonly lg: number | import("./col").ColResponsiveValue;
|
|
103
102
|
readonly pull: number;
|
|
104
103
|
readonly xs: number | import("./col").ColResponsiveValue;
|
|
105
104
|
readonly sm: number | import("./col").ColResponsiveValue;
|
|
105
|
+
readonly lg: number | import("./col").ColResponsiveValue;
|
|
106
106
|
readonly xl: number | import("./col").ColResponsiveValue;
|
|
107
107
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
108
108
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.parseDate = exports.generateCalendar = exports.formatDate = exports.DEFAULT_FORMATS = void 0;
|
|
7
7
|
var _dayjs = _interopRequireDefault(require("../../dayjs.cjs"));
|
|
8
|
-
var _dayjsPlugins = require("../../dayjs-plugins
|
|
8
|
+
var _dayjsPlugins = require("../../dayjs-plugins");
|
|
9
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
_dayjs.default.extend(_dayjsPlugins.isBetweenPlugin);
|
|
11
11
|
_dayjs.default.extend(_dayjsPlugins.weekOfYearPlugin);
|
package/dist/dayjs-plugins.cjs
CHANGED
|
@@ -1,48 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return _quarterOfYear.default;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "weekOfYearPlugin", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _weekOfYear.default;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
var _advancedFormat = _interopRequireDefault(require("dayjs/plugin/advancedFormat.js"));
|
|
43
|
-
var _customParseFormat = _interopRequireDefault(require("dayjs/plugin/customParseFormat.js"));
|
|
44
|
-
var _isBetween = _interopRequireDefault(require("dayjs/plugin/isBetween.js"));
|
|
45
|
-
var _isoWeek = _interopRequireDefault(require("dayjs/plugin/isoWeek.js"));
|
|
46
|
-
var _quarterOfYear = _interopRequireDefault(require("dayjs/plugin/quarterOfYear.js"));
|
|
47
|
-
var _weekOfYear = _interopRequireDefault(require("dayjs/plugin/weekOfYear.js"));
|
|
48
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
3
|
+
const _advancedFormat = require('dayjs/plugin/advancedFormat');
|
|
4
|
+
const _customParseFormat = require('dayjs/plugin/customParseFormat');
|
|
5
|
+
const _isBetween = require('dayjs/plugin/isBetween');
|
|
6
|
+
const _isoWeek = require('dayjs/plugin/isoWeek');
|
|
7
|
+
const _quarterOfYear = require('dayjs/plugin/quarterOfYear');
|
|
8
|
+
const _weekOfYear = require('dayjs/plugin/weekOfYear');
|
|
9
|
+
|
|
10
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
11
|
+
|
|
12
|
+
const _advancedFormat__default = /*#__PURE__*/_interopDefaultCompat(_advancedFormat);
|
|
13
|
+
const _customParseFormat__default = /*#__PURE__*/_interopDefaultCompat(_customParseFormat);
|
|
14
|
+
const _isBetween__default = /*#__PURE__*/_interopDefaultCompat(_isBetween);
|
|
15
|
+
const _isoWeek__default = /*#__PURE__*/_interopDefaultCompat(_isoWeek);
|
|
16
|
+
const _quarterOfYear__default = /*#__PURE__*/_interopDefaultCompat(_quarterOfYear);
|
|
17
|
+
const _weekOfYear__default = /*#__PURE__*/_interopDefaultCompat(_weekOfYear);
|
|
18
|
+
|
|
19
|
+
const interop = (m) => m.default ?? m;
|
|
20
|
+
const advancedFormatPlugin = interop(_advancedFormat__default);
|
|
21
|
+
const customParseFormatPlugin = interop(_customParseFormat__default);
|
|
22
|
+
const isBetweenPlugin = interop(_isBetween__default);
|
|
23
|
+
const isoWeekPlugin = interop(_isoWeek__default);
|
|
24
|
+
const quarterOfYearPlugin = interop(_quarterOfYear__default);
|
|
25
|
+
const weekOfYearPlugin = interop(_weekOfYear__default);
|
|
26
|
+
|
|
27
|
+
exports.advancedFormatPlugin = advancedFormatPlugin;
|
|
28
|
+
exports.customParseFormatPlugin = customParseFormatPlugin;
|
|
29
|
+
exports.isBetweenPlugin = isBetweenPlugin;
|
|
30
|
+
exports.isoWeekPlugin = isoWeekPlugin;
|
|
31
|
+
exports.quarterOfYearPlugin = quarterOfYearPlugin;
|
|
32
|
+
exports.weekOfYearPlugin = weekOfYearPlugin;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PluginFunc } from 'dayjs';
|
|
2
|
+
|
|
3
|
+
declare const advancedFormatPlugin: PluginFunc;
|
|
4
|
+
declare const customParseFormatPlugin: PluginFunc;
|
|
5
|
+
declare const isBetweenPlugin: PluginFunc;
|
|
6
|
+
declare const isoWeekPlugin: PluginFunc;
|
|
7
|
+
declare const quarterOfYearPlugin: PluginFunc;
|
|
8
|
+
declare const weekOfYearPlugin: PluginFunc;
|
|
9
|
+
|
|
10
|
+
export { advancedFormatPlugin, customParseFormatPlugin, isBetweenPlugin, isoWeekPlugin, quarterOfYearPlugin, weekOfYearPlugin };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PluginFunc } from 'dayjs';
|
|
2
|
+
|
|
3
|
+
declare const advancedFormatPlugin: PluginFunc;
|
|
4
|
+
declare const customParseFormatPlugin: PluginFunc;
|
|
5
|
+
declare const isBetweenPlugin: PluginFunc;
|
|
6
|
+
declare const isoWeekPlugin: PluginFunc;
|
|
7
|
+
declare const quarterOfYearPlugin: PluginFunc;
|
|
8
|
+
declare const weekOfYearPlugin: PluginFunc;
|
|
9
|
+
|
|
10
|
+
export { advancedFormatPlugin, customParseFormatPlugin, isBetweenPlugin, isoWeekPlugin, quarterOfYearPlugin, weekOfYearPlugin };
|
package/dist/dayjs-plugins.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { PluginFunc } from 'dayjs';
|
|
2
|
+
|
|
3
|
+
declare const advancedFormatPlugin: PluginFunc;
|
|
4
|
+
declare const customParseFormatPlugin: PluginFunc;
|
|
5
|
+
declare const isBetweenPlugin: PluginFunc;
|
|
6
|
+
declare const isoWeekPlugin: PluginFunc;
|
|
7
|
+
declare const quarterOfYearPlugin: PluginFunc;
|
|
8
|
+
declare const weekOfYearPlugin: PluginFunc;
|
|
9
|
+
|
|
7
10
|
export { advancedFormatPlugin, customParseFormatPlugin, isBetweenPlugin, isoWeekPlugin, quarterOfYearPlugin, weekOfYearPlugin };
|
package/dist/dayjs-plugins.mjs
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import _advancedFormat from 'dayjs/plugin/advancedFormat';
|
|
2
|
+
import _customParseFormat from 'dayjs/plugin/customParseFormat';
|
|
3
|
+
import _isBetween from 'dayjs/plugin/isBetween';
|
|
4
|
+
import _isoWeek from 'dayjs/plugin/isoWeek';
|
|
5
|
+
import _quarterOfYear from 'dayjs/plugin/quarterOfYear';
|
|
6
|
+
import _weekOfYear from 'dayjs/plugin/weekOfYear';
|
|
7
|
+
|
|
8
|
+
const interop = (m) => m.default ?? m;
|
|
9
|
+
const advancedFormatPlugin = interop(_advancedFormat);
|
|
10
|
+
const customParseFormatPlugin = interop(_customParseFormat);
|
|
11
|
+
const isBetweenPlugin = interop(_isBetween);
|
|
12
|
+
const isoWeekPlugin = interop(_isoWeek);
|
|
13
|
+
const quarterOfYearPlugin = interop(_quarterOfYear);
|
|
14
|
+
const weekOfYearPlugin = interop(_weekOfYear);
|
|
15
|
+
|
|
16
|
+
export { advancedFormatPlugin, customParseFormatPlugin, isBetweenPlugin, isoWeekPlugin, quarterOfYearPlugin, weekOfYearPlugin };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.YhUIVitePlugin = YhUIVitePlugin;
|
|
7
|
+
|
|
8
|
+
const DAYJS_PLUGINS = ["dayjs", "dayjs/plugin/advancedFormat", "dayjs/plugin/customParseFormat", "dayjs/plugin/isBetween", "dayjs/plugin/isoWeek", "dayjs/plugin/quarterOfYear", "dayjs/plugin/weekOfYear"];
|
|
9
|
+
function YhUIVitePlugin(options = {}) {
|
|
10
|
+
const {
|
|
11
|
+
optimizeDayjs = true
|
|
12
|
+
} = options;
|
|
13
|
+
return {
|
|
14
|
+
name: "yh-ui:vite-plugin",
|
|
15
|
+
config() {
|
|
16
|
+
if (!optimizeDayjs) return {};
|
|
17
|
+
return {
|
|
18
|
+
optimizeDeps: {
|
|
19
|
+
// 强制 Vite 将 dayjs CJS 插件预构建为 ESM,解决 pnpm 严格模式下的 404 和
|
|
20
|
+
// "does not provide an export named 'default'" 报错
|
|
21
|
+
include: [...DAYJS_PLUGINS]
|
|
22
|
+
},
|
|
23
|
+
ssr: {
|
|
24
|
+
// SSR 模式下同样需要处理这些 CJS 模块
|
|
25
|
+
noExternal: ["dayjs"]
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
module.exports = YhUIVitePlugin;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Plugin } from 'vite';
|
|
2
|
+
export interface YhUIVitePluginOptions {
|
|
3
|
+
/**
|
|
4
|
+
* 是否自动预构建 dayjs 及其插件(推荐保持开启)。
|
|
5
|
+
* 解决 pnpm + Vite 6 下 dayjs CJS 插件无 default export 的问题。
|
|
6
|
+
* @default true
|
|
7
|
+
*/
|
|
8
|
+
optimizeDayjs?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* YH-UI Vite 插件。
|
|
12
|
+
*
|
|
13
|
+
* 自动处理 pnpm + Vite 6 环境下的 CJS/ESM 互操作问题,
|
|
14
|
+
* 无需手动配置 `optimizeDeps`。
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* // vite.config.ts
|
|
19
|
+
* import { defineConfig } from 'vite'
|
|
20
|
+
* import vue from '@vitejs/plugin-vue'
|
|
21
|
+
* import { YhUIVitePlugin } from '@yh-ui/components/vite-plugin'
|
|
22
|
+
*
|
|
23
|
+
* export default defineConfig({
|
|
24
|
+
* plugins: [vue(), YhUIVitePlugin()]
|
|
25
|
+
* })
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare function YhUIVitePlugin(options?: YhUIVitePluginOptions): Plugin;
|
|
29
|
+
export default YhUIVitePlugin;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const DAYJS_PLUGINS = [
|
|
2
|
+
"dayjs",
|
|
3
|
+
"dayjs/plugin/advancedFormat",
|
|
4
|
+
"dayjs/plugin/customParseFormat",
|
|
5
|
+
"dayjs/plugin/isBetween",
|
|
6
|
+
"dayjs/plugin/isoWeek",
|
|
7
|
+
"dayjs/plugin/quarterOfYear",
|
|
8
|
+
"dayjs/plugin/weekOfYear"
|
|
9
|
+
];
|
|
10
|
+
export function YhUIVitePlugin(options = {}) {
|
|
11
|
+
const { optimizeDayjs = true } = options;
|
|
12
|
+
return {
|
|
13
|
+
name: "yh-ui:vite-plugin",
|
|
14
|
+
config() {
|
|
15
|
+
if (!optimizeDayjs) return {};
|
|
16
|
+
return {
|
|
17
|
+
optimizeDeps: {
|
|
18
|
+
// 强制 Vite 将 dayjs CJS 插件预构建为 ESM,解决 pnpm 严格模式下的 404 和
|
|
19
|
+
// "does not provide an export named 'default'" 报错
|
|
20
|
+
include: [...DAYJS_PLUGINS]
|
|
21
|
+
},
|
|
22
|
+
ssr: {
|
|
23
|
+
// SSR 模式下同样需要处理这些 CJS 模块
|
|
24
|
+
noExternal: ["dayjs"]
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export default YhUIVitePlugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yh-ui/components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.44",
|
|
4
4
|
"description": "YH-UI Vue 3 Components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
"import": "./dist/resolver.mjs",
|
|
23
23
|
"require": "./dist/resolver.cjs"
|
|
24
24
|
},
|
|
25
|
+
"./vite-plugin": {
|
|
26
|
+
"types": "./dist/vite-plugin.d.ts",
|
|
27
|
+
"import": "./dist/vite-plugin.mjs",
|
|
28
|
+
"require": "./dist/vite-plugin.cjs"
|
|
29
|
+
},
|
|
25
30
|
"./style": "./dist/style.css",
|
|
26
31
|
"./style.css": "./dist/style.css",
|
|
27
32
|
"./*": {
|
|
@@ -45,10 +50,10 @@
|
|
|
45
50
|
"dependencies": {
|
|
46
51
|
"@webcontainer/api": "^1.6.1",
|
|
47
52
|
"@floating-ui/dom": "^1.7.4",
|
|
48
|
-
"@yh-ui/hooks": "^1.0.
|
|
49
|
-
"@yh-ui/locale": "^1.0.
|
|
50
|
-
"@yh-ui/theme": "^1.0.
|
|
51
|
-
"@yh-ui/utils": "^1.0.
|
|
53
|
+
"@yh-ui/hooks": "^1.0.44",
|
|
54
|
+
"@yh-ui/locale": "^1.0.44",
|
|
55
|
+
"@yh-ui/theme": "^1.0.44",
|
|
56
|
+
"@yh-ui/utils": "^1.0.44",
|
|
52
57
|
"async-validator": "^4.2.5",
|
|
53
58
|
"dayjs": "^1.11.19",
|
|
54
59
|
"dompurify": "^3.3.3"
|
|
@@ -82,6 +87,7 @@
|
|
|
82
87
|
"devDependencies": {
|
|
83
88
|
"@types/markdown-it": "^14.1.2",
|
|
84
89
|
"@vitejs/plugin-vue": "^6.0.0",
|
|
90
|
+
"vite": "^6.0.0",
|
|
85
91
|
"monaco-editor": "^0.55.1",
|
|
86
92
|
"xlsx": "^0.18.5",
|
|
87
93
|
"viewerjs": "^1.11.7",
|