sunyard-szyy-ui 0.2.6 → 0.2.8

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/README.md ADDED
@@ -0,0 +1,251 @@
1
+ # sunyard-szyy-ui
2
+
3
+ > 企业级 Vue 3 组件库 - 基于 Element Plus 的二次封装
4
+
5
+ [![npm version](https://img.shields.io/npm/v/sunyard-szyy-ui.svg)](https://www.npmjs.com/package/sunyard-szyy-ui)
6
+ [![license](https://img.shields.io/npm/l/sunyard-szyy-ui.svg)](https://github.com/your-org/sunyard-szyy-ui/blob/main/LICENSE)
7
+
8
+ ## ✨ 特性
9
+
10
+ - 🚀 **Vue 3 + TypeScript** - 基于 Vue 3.5+ 和 TypeScript 5.6+
11
+ - 📦 **Monorepo 架构** - 使用 pnpm workspace 管理
12
+ - 🎨 **主题定制** - 支持 SCSS 变量和 CSS 变量双重定制
13
+ - 🔥 **按需加载** - 支持自动按需导入,极致的打包体积
14
+ - 📚 **完整文档** - 详细的使用文档和 API 说明
15
+ - 💪 **TypeScript** - 完整的类型定义和类型推导
16
+ - 🌲 **Tree-shaking** - 支持 ES Module,自动 tree-shaking
17
+ - ⚡️ **高性能** - 基于 Element Plus,性能卓越
18
+
19
+ ## 📦 安装
20
+
21
+ ```bash
22
+ # npm
23
+ npm install sunyard-szyy-ui element-plus
24
+
25
+ # pnpm
26
+ pnpm add sunyard-szyy-ui element-plus
27
+
28
+ # yarn
29
+ yarn add sunyard-szyy-ui element-plus
30
+ ```
31
+
32
+ ## 🚀 快速开始
33
+
34
+ ### 全量引入
35
+
36
+ ```typescript
37
+ // main.ts
38
+ import { createApp } from 'vue';
39
+ import ElementPlus from 'element-plus';
40
+ import 'element-plus/dist/index.css';
41
+
42
+ import SunyardSzyyUI from 'sunyard-szyy-ui';
43
+ import 'sunyard-szyy-ui/theme-chalk/index.css';
44
+
45
+ import App from './App.vue';
46
+
47
+ const app = createApp(App);
48
+
49
+ app.use(ElementPlus);
50
+ app.use(SunyardSzyyUI);
51
+ app.mount('#app');
52
+ ```
53
+
54
+ ### 自动按需引入(推荐)
55
+
56
+ ```typescript
57
+ // vite.config.ts
58
+ import { defineConfig } from 'vite';
59
+ import vue from '@vitejs/plugin-vue';
60
+ import AutoImport from 'unplugin-auto-import/vite';
61
+ import Components from 'unplugin-vue-components/vite';
62
+ import { ElementPlusResolver } from 'unplugin-vue-components/resolvers';
63
+ import { SunyardSzyyUIResolver } from 'sunyard-szyy-ui/utils';
64
+
65
+ export default defineConfig({
66
+ plugins: [
67
+ vue(),
68
+ AutoImport({
69
+ resolvers: [ElementPlusResolver()]
70
+ }),
71
+ Components({
72
+ resolvers: [ElementPlusResolver({ importStyle: 'sass' }), SunyardSzyyUIResolver()]
73
+ })
74
+ ],
75
+ css: {
76
+ preprocessorOptions: {
77
+ scss: {
78
+ additionalData: `@use "sunyard-szyy-ui/theme-chalk/var.scss" as *;`
79
+ }
80
+ }
81
+ }
82
+ });
83
+ ```
84
+
85
+ ```typescript
86
+ // main.ts (按需引入时只需引入基础样式)
87
+ import 'sunyard-szyy-ui/theme-chalk/base.css';
88
+ ```
89
+
90
+ ### 使用组件
91
+
92
+ ```vue
93
+ <template>
94
+ <div>
95
+ <SySearchBar v-model="keyword" placeholder="请输入搜索关键词" @search="handleSearch" />
96
+ </div>
97
+ </template>
98
+
99
+ <script setup lang="ts">
100
+ import { ref } from 'vue';
101
+
102
+ const keyword = ref('');
103
+
104
+ const handleSearch = (value: string) => {
105
+ console.log('搜索:', value);
106
+ };
107
+ </script>
108
+ ```
109
+
110
+ ## 📚 包结构
111
+
112
+ 本项目采用 Monorepo 架构,包含以下子包:
113
+
114
+ ```
115
+ sunyard-szyy-ui/
116
+ ├── @sunyard-szyy-ui/components # Vue 组件
117
+ ├── @sunyard-szyy-ui/hooks # Composition API Hooks
118
+ ├── @sunyard-szyy-ui/utils # 工具函数
119
+ ├── @sunyard-szyy-ui/theme-chalk # 样式主题
120
+ └── sunyard-szyy-ui # 主包(聚合导出)
121
+ ```
122
+
123
+ ### 子包说明
124
+
125
+ | 包名 | 说明 | 独立使用 |
126
+ | ------------------------------ | --------------------- | --------- |
127
+ | `sunyard-szyy-ui` | 主包,包含所有功能 | ✅ 推荐 |
128
+ | `@sunyard-szyy-ui/components` | Vue 组件 | ✅ 可以 |
129
+ | `@sunyard-szyy-ui/hooks` | Composition API Hooks | ✅ 可以 |
130
+ | `@sunyard-szyy-ui/utils` | 工具函数 | ✅ 可以 |
131
+ | `@sunyard-szyy-ui/theme-chalk` | 样式主题 | ❌ 不推荐 |
132
+
133
+ ## 🎨 组件列表
134
+
135
+ ### 表单组件
136
+
137
+ - **SySearchBar** - 搜索栏组件
138
+
139
+ > 更多组件正在开发中...
140
+
141
+ ## 🎣 Hooks
142
+
143
+ - **useNamespace** - BEM 命名空间工具
144
+ - **useDebounce** - 防抖 Hook
145
+ - **useToggle** - 布尔值切换 Hook
146
+ - **useLocalStorage** - 本地存储 Hook
147
+
148
+ ## 🛠️ 工具函数
149
+
150
+ - **withInstall** - Vue 组件插件包装器
151
+ - **debounce** - 防抖函数
152
+ - **throttle** - 节流函数
153
+ - **formatDate** - 日期格式化
154
+ - **deepClone** - 深拷贝
155
+ - **SunyardSzyyUIResolver** - 自动导入解析器
156
+
157
+ ## 📖 文档
158
+
159
+ 完整文档请访问:[文档地址](../../docs/index.md)
160
+
161
+ - [快速开始](../../docs/guide/getting-started.md)
162
+ - [使用方式](../../docs/guide/usage.md)
163
+ - [组件 API](../../docs/api/component-api.md)
164
+ - [主题定制](../../docs/guide/usage.md#统一ui规范配置)
165
+
166
+ ## 🔧 开发
167
+
168
+ ```bash
169
+ # 安装依赖
170
+ pnpm install
171
+
172
+ # 启动开发服务器
173
+ pnpm dev
174
+
175
+ # 构建所有包
176
+ pnpm build
177
+
178
+ # 类型检查
179
+ pnpm typecheck
180
+
181
+ # 代码检查
182
+ pnpm lint
183
+
184
+ # 代码格式化
185
+ pnpm format
186
+ ```
187
+
188
+ ## 📦 发布产物
189
+
190
+ 安装 `sunyard-szyy-ui` 后,包含以下内容:
191
+
192
+ ```
193
+ sunyard-szyy-ui/
194
+ ├── es/ # ESM 格式
195
+ │ ├── index.mjs
196
+ │ └── index.d.ts
197
+ ├── lib/ # CJS 格式
198
+ │ ├── index.js
199
+ │ └── index.d.ts
200
+ ├── dist/ # UMD 格式 + 子包
201
+ │ ├── index.full.js # UMD bundle
202
+ │ ├── index.full.mjs # ESM bundle
203
+ │ ├── hooks/ # Hooks 子包
204
+ │ └── utils/ # Utils 子包
205
+ └── theme-chalk/ # 样式文件
206
+ ├── index.css # 完整样式
207
+ ├── base.css # 基础样式
208
+ └── *.css # 组件样式
209
+ ```
210
+
211
+ ## 🤝 依赖关系
212
+
213
+ ```
214
+ sunyard-szyy-ui
215
+ ├── @sunyard-szyy-ui/components
216
+ │ ├── @sunyard-szyy-ui/hooks
217
+ │ │ └── @sunyard-szyy-ui/utils
218
+ │ └── @sunyard-szyy-ui/utils
219
+ ├── @sunyard-szyy-ui/hooks
220
+ │ └── @sunyard-szyy-ui/utils
221
+ └── @sunyard-szyy-ui/utils
222
+ ```
223
+
224
+ **外部依赖(Peer Dependencies):**
225
+
226
+ - `vue` ^3.0.0
227
+ - `element-plus` ^2.0.0
228
+
229
+ ## 🌍 浏览器支持
230
+
231
+ 支持所有现代浏览器:
232
+
233
+ - Chrome >= 90
234
+ - Firefox >= 88
235
+ - Safari >= 14
236
+ - Edge >= 90
237
+
238
+ ## 📄 版本管理
239
+
240
+ 本项目采用语义化版本号:
241
+
242
+ ```bash
243
+ # 查看当前版本
244
+ pnpm version:check
245
+
246
+ # 更新版本号
247
+ pnpm version:set 0.3.0
248
+
249
+ # 生成 CHANGELOG
250
+ pnpm changelog
251
+ ```
@@ -0,0 +1,4 @@
1
+ (function(e,u){typeof exports=="object"&&typeof module!="undefined"?u(exports,require("element-plus"),require("vue"),require("@sunyard-szyy-ui/hooks"),require("@sunyard-szyy-ui/utils")):typeof define=="function"&&define.amd?define(["exports","element-plus","vue","@sunyard-szyy-ui/hooks","@sunyard-szyy-ui/utils"],u):(e=typeof globalThis!="undefined"?globalThis:e||self,u(e.SunyardSzyyUI={},e.ElementPlus,e.Vue,e.hooks,e.utils))})(this,function(e,u,n,i,d){"use strict";/*!
2
+ * sunyard-szyy-ui v0.2.8
3
+ * (c) 2026 Sunyard SZYY Base Team
4
+ */const y=n.defineComponent({name:"SySearchBar",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:"请输入关键字"},buttonText:{type:String,default:"搜索"}},emits:["update:modelValue","search"],setup(r,{emit:s}){const l=i.useNamespace("search-bar"),a=n.ref(r.modelValue);n.watch(()=>r.modelValue,t=>{t!==a.value&&(a.value=t)});function o(){s("search",a.value)}return()=>n.h("div",{class:l.b()},[n.h(u.ElInput,{class:l.e("input"),modelValue:a.value,placeholder:r.placeholder,clearable:!0,"onUpdate:modelValue":t=>{a.value=t,s("update:modelValue",t)},onKeydown:t=>{t.key==="Enter"&&o()}}),n.h(u.ElButton,{class:l.e("button"),type:"primary",onClick:o},()=>r.buttonText)])}}),c=d.withInstall(y);e.SySearchBar=c,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
@@ -0,0 +1,64 @@
1
+ import { ElInput as u, ElButton as c } from "element-plus";
2
+ import { defineComponent as d, ref as m, watch as i, h as o } from "vue";
3
+ import { useNamespace as p } from "@sunyard-szyy-ui/hooks";
4
+ import { withInstall as s } from "@sunyard-szyy-ui/utils";
5
+ /*!
6
+ * sunyard-szyy-ui v0.2.8
7
+ * (c) 2026 Sunyard SZYY Base Team
8
+ */
9
+ const h = d({
10
+ name: "SySearchBar",
11
+ props: {
12
+ modelValue: {
13
+ type: String,
14
+ default: ""
15
+ },
16
+ placeholder: {
17
+ type: String,
18
+ default: "请输入关键字"
19
+ },
20
+ buttonText: {
21
+ type: String,
22
+ default: "搜索"
23
+ }
24
+ },
25
+ emits: ["update:modelValue", "search"],
26
+ setup(t, { emit: r }) {
27
+ const l = p("search-bar"), a = m(t.modelValue);
28
+ i(
29
+ () => t.modelValue,
30
+ (e) => {
31
+ e !== a.value && (a.value = e);
32
+ }
33
+ );
34
+ function n() {
35
+ r("search", a.value);
36
+ }
37
+ return () => o("div", { class: l.b() }, [
38
+ o(u, {
39
+ class: l.e("input"),
40
+ modelValue: a.value,
41
+ placeholder: t.placeholder,
42
+ clearable: !0,
43
+ "onUpdate:modelValue": (e) => {
44
+ a.value = e, r("update:modelValue", e);
45
+ },
46
+ onKeydown: (e) => {
47
+ e.key === "Enter" && n();
48
+ }
49
+ }),
50
+ o(
51
+ c,
52
+ {
53
+ class: l.e("button"),
54
+ type: "primary",
55
+ onClick: n
56
+ },
57
+ () => t.buttonText
58
+ )
59
+ ]);
60
+ }
61
+ }), b = s(h);
62
+ export {
63
+ b as SySearchBar
64
+ };
@@ -43,16 +43,8 @@ function SunyardSzyyUIResolver(options = {}) {
43
43
  devMode = false,
44
44
  importMetaUrl,
45
45
  fileURLToPath,
46
- dirResolver,
47
- disableElementPlusTip = false
46
+ dirResolver
48
47
  } = options;
49
- let hasShownTip = false;
50
- if (!disableElementPlusTip && !hasShownTip) {
51
- hasShownTip = true;
52
- console.warn(
53
- '\n\u26A0\uFE0F [SunyardSzyyUIResolver] \u91CD\u8981\u63D0\u793A\uFF1A\n sunyard-szyy-ui \u7EC4\u4EF6\u5185\u90E8\u4F7F\u7528\u4E86 Element Plus \u7EC4\u4EF6\uFF08\u5982 ElButton\u3001ElInput \u7B49\uFF09\n \u4E3A\u4E86\u6B63\u786E\u52A0\u8F7D Element Plus \u7EC4\u4EF6\u7684\u6837\u5F0F\uFF0C\u8BF7\u540C\u65F6\u914D\u7F6E ElementPlusResolver\uFF1A\n\n import { ElementPlusResolver } from "unplugin-vue-components/resolvers";\n\n Components({\n resolvers: [\n ElementPlusResolver(), // Element Plus \u7EC4\u4EF6\n SunyardSzyyUIResolver() // sunyard-szyy-ui \u7EC4\u4EF6\n ]\n })\n\n \u5982\u679C\u5DF2\u914D\u7F6E\uFF0C\u53EF\u4EE5\u901A\u8FC7 disableElementPlusTip: true \u7981\u7528\u6B64\u63D0\u793A\n'
54
- );
55
- }
56
48
  if (devMode && !dirResolver) {
57
49
  if (!importMetaUrl || !fileURLToPath) {
58
50
  throw new Error(
@@ -91,11 +83,11 @@ function SunyardSzyyUIResolver(options = {}) {
91
83
  };
92
84
  if (importStyle) {
93
85
  if (importStyle === "css") {
94
- result.sideEffects = `${componentsLibraryName}/${componentName}/style/css`;
86
+ result.sideEffects = `${libraryName}/es/components/${componentName}/style/css`;
95
87
  } else if (importStyle === "scss") {
96
- result.sideEffects = `${componentsLibraryName}/${componentName}/style`;
88
+ result.sideEffects = `${libraryName}/es/components/${componentName}/style/index`;
97
89
  } else if (importStyle === true) {
98
- result.sideEffects = `${componentsLibraryName}/${componentName}/style/css`;
90
+ result.sideEffects = `${libraryName}/es/components/${componentName}/style/css`;
99
91
  }
100
92
  }
101
93
  return result;
@@ -99,15 +99,6 @@ interface SunyardSzyyUIResolverOptions {
99
99
  */
100
100
  stylePath?: string;
101
101
  };
102
- /**
103
- * 是否禁用 Element Plus 依赖提示
104
- *
105
- * sunyard-szyy-ui 的组件内部使用了 Element Plus 组件,
106
- * 需要同时配置 ElementPlusResolver 来按需加载 Element Plus 的样式
107
- *
108
- * @default false
109
- */
110
- disableElementPlusTip?: boolean;
111
102
  }
112
103
  /**
113
104
  * sunyard-szyy-ui 组件自动导入 resolver
@@ -12,16 +12,8 @@ function SunyardSzyyUIResolver(options = {}) {
12
12
  devMode = false,
13
13
  importMetaUrl,
14
14
  fileURLToPath,
15
- dirResolver,
16
- disableElementPlusTip = false
15
+ dirResolver
17
16
  } = options;
18
- let hasShownTip = false;
19
- if (!disableElementPlusTip && !hasShownTip) {
20
- hasShownTip = true;
21
- console.warn(
22
- '\n\u26A0\uFE0F [SunyardSzyyUIResolver] \u91CD\u8981\u63D0\u793A\uFF1A\n sunyard-szyy-ui \u7EC4\u4EF6\u5185\u90E8\u4F7F\u7528\u4E86 Element Plus \u7EC4\u4EF6\uFF08\u5982 ElButton\u3001ElInput \u7B49\uFF09\n \u4E3A\u4E86\u6B63\u786E\u52A0\u8F7D Element Plus \u7EC4\u4EF6\u7684\u6837\u5F0F\uFF0C\u8BF7\u540C\u65F6\u914D\u7F6E ElementPlusResolver\uFF1A\n\n import { ElementPlusResolver } from "unplugin-vue-components/resolvers";\n\n Components({\n resolvers: [\n ElementPlusResolver(), // Element Plus \u7EC4\u4EF6\n SunyardSzyyUIResolver() // sunyard-szyy-ui \u7EC4\u4EF6\n ]\n })\n\n \u5982\u679C\u5DF2\u914D\u7F6E\uFF0C\u53EF\u4EE5\u901A\u8FC7 disableElementPlusTip: true \u7981\u7528\u6B64\u63D0\u793A\n'
23
- );
24
- }
25
17
  if (devMode && !dirResolver) {
26
18
  if (!importMetaUrl || !fileURLToPath) {
27
19
  throw new Error(
@@ -60,11 +52,11 @@ function SunyardSzyyUIResolver(options = {}) {
60
52
  };
61
53
  if (importStyle) {
62
54
  if (importStyle === "css") {
63
- result.sideEffects = `${componentsLibraryName}/${componentName}/style/css`;
55
+ result.sideEffects = `${libraryName}/es/components/${componentName}/style/css`;
64
56
  } else if (importStyle === "scss") {
65
- result.sideEffects = `${componentsLibraryName}/${componentName}/style`;
57
+ result.sideEffects = `${libraryName}/es/components/${componentName}/style/index`;
66
58
  } else if (importStyle === true) {
67
- result.sideEffects = `${componentsLibraryName}/${componentName}/style/css`;
59
+ result.sideEffects = `${libraryName}/es/components/${componentName}/style/css`;
68
60
  }
69
61
  }
70
62
  return result;
package/es/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export { SySearchBar } from '@sunyard-szyy-ui/components';
3
3
  export * from '@sunyard-szyy-ui/hooks';
4
4
  export * from '@sunyard-szyy-ui/utils';
5
5
  export { makeInstaller } from './make-installer';
6
- export declare const version = "0.2.5";
6
+ export { version } from './version';
7
7
  export declare const install: (app: App) => void;
8
8
  declare const _default: {
9
9
  version: string;
package/es/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAU,MAAM,KAAK,CAAC;AAIvC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAG1D,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AAGvC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,eAAO,MAAM,OAAO,UAAU,CAAC;AAM/B,eAAO,MAAM,OAAO,GAAI,KAAK,GAAG,SAE/B,CAAC;;;mBAF2B,GAAG;;AAKhC,wBAGE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAU,MAAM,KAAK,CAAC;AAKvC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAG1D,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AAGvC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,eAAO,MAAM,OAAO,GAAI,KAAK,GAAG,SAgC/B,CAAC;;;mBAhC2B,GAAG;;AAmChC,wBAGE"}
package/es/index.mjs CHANGED
@@ -1 +1,4 @@
1
- import{SySearchBar as e}from"@sunyard-szyy-ui/components";import{SySearchBar as p}from"@sunyard-szyy-ui/components";export*from"@sunyard-szyy-ui/hooks";export*from"@sunyard-szyy-ui/utils";import{makeInstaller as S}from"./make-installer.mjs";const t="0.2.5",a=[e],n=o=>{a.forEach(r=>o.use(r))},c={version:t,install:n};export{p as SySearchBar,c as default,n as install,S as makeInstaller,t as version};
1
+ import{SySearchBar as t}from"@sunyard-szyy-ui/components";import{SySearchBar as f}from"@sunyard-szyy-ui/components";import{version as e}from"./version.mjs";export*from"@sunyard-szyy-ui/hooks";export*from"@sunyard-szyy-ui/utils";import{makeInstaller as S}from"./make-installer.mjs";/*!
2
+ * sunyard-szyy-ui v0.2.8
3
+ * (c) 2026 Sunyard SZYY UI Team
4
+ */const r=[t],a=n=>{if(typeof window!="undefined"&&(console.log(`%c[Sunyard SZYY UI]%c v${e} %cinstalled`,"color: #409eff; font-weight: bold","color: #67c23a","color: #909399"),window.__SUNYARD_SZYY_UI_VERSION__=e,window.__SUNYARD_SZYY_UI__={version:e,components:r.map(o=>o.name||"Unknown")}),r.forEach(o=>n.use(o)),typeof window!="undefined"){const o=window.__VUE_DEVTOOLS_GLOBAL_HOOK__;o&&o.emit("app:init",n,e,{label:"Sunyard SZYY UI",packageName:"sunyard-szyy-ui",homepage:"https://github.com/your-org/sunyard-szyy-ui"})}},c={version:e,install:a};export{f as SySearchBar,c as default,a as install,S as makeInstaller,e as version};
@@ -3,13 +3,14 @@ import type { App, Plugin } from 'vue';
3
3
  * 创建组件库安装器
4
4
  *
5
5
  * @param components - 组件列表
6
- * @returns 包含 install 方法的插件对象
6
+ * @param version - 版本号
7
+ * @returns 包含 install 方法和 version 的插件对象
7
8
  *
8
9
  * @example
9
- * const installer = makeInstaller([SySearchBar, SyButton]);
10
+ * const installer = makeInstaller([SySearchBar, SyButton], '1.0.0');
10
11
  * app.use(installer);
11
12
  */
12
- export declare const makeInstaller: (components?: Plugin[]) => {
13
+ export declare const makeInstaller: (components?: Plugin[], version?: string) => {
13
14
  version: string;
14
15
  install: (app: App) => void;
15
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"make-installer.d.ts","sourceRoot":"","sources":["../src/make-installer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAIvC;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,GAAI,aAAY,MAAM,EAAO;;mBAC/B,GAAG;CAc1B,CAAC"}
1
+ {"version":3,"file":"make-installer.d.ts","sourceRoot":"","sources":["../src/make-installer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAIvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,GAAI,aAAY,MAAM,EAAO,EAAE,gBAAiB;;mBAClD,GAAG;CAc1B,CAAC"}
@@ -1 +1,4 @@
1
- const n=Symbol("SUNYARD_SZYY_UI_INSTALLED"),l=(r=[])=>({version:"0.2.5",install:t=>{t[n]||(t[n]=!0,r.forEach(e=>t.use(e)))}});export{l as makeInstaller};
1
+ /*!
2
+ * sunyard-szyy-ui v0.2.8
3
+ * (c) 2026 Sunyard SZYY UI Team
4
+ */const n=Symbol("SUNYARD_SZYY_UI_INSTALLED"),o=(r=[],e="0.0.0")=>({version:e,install:t=>{t[n]||(t[n]=!0,r.forEach(l=>t.use(l)))}});export{o as makeInstaller};
@@ -1 +1 @@
1
- {"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../../src/search-bar/style/css.ts"],"names":[],"mappings":"AACA,OAAO,6CAA6C,CAAC;AACrD,OAAO,4CAA4C,CAAC;AAGpD,OAAO,4CAA4C,CAAC"}
1
+ {"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../../src/search-bar/style/css.ts"],"names":[],"mappings":"AACA,OAAO,6CAA6C,CAAC;AACrD,OAAO,4CAA4C,CAAC;AAKpD,OAAO,4CAA4C,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 自动生成的版本文件
3
+ * 请勿手动修改
4
+ * 通过 pnpm version:set 命令更新版本号
5
+ */
6
+ export declare const version = "0.2.8";
7
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,OAAO,UAAU,CAAC"}
package/es/version.mjs ADDED
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * sunyard-szyy-ui v0.2.8
3
+ * (c) 2026 Sunyard SZYY UI Team
4
+ */const o="0.2.8";export{o as version};
package/lib/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export { SySearchBar } from '@sunyard-szyy-ui/components';
3
3
  export * from '@sunyard-szyy-ui/hooks';
4
4
  export * from '@sunyard-szyy-ui/utils';
5
5
  export { makeInstaller } from './make-installer';
6
- export declare const version = "0.2.5";
6
+ export { version } from './version';
7
7
  export declare const install: (app: App) => void;
8
8
  declare const _default: {
9
9
  version: string;
package/lib/index.js CHANGED
@@ -1 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("@sunyard-szyy-ui/components"),t=require("@sunyard-szyy-ui/hooks"),r=require("@sunyard-szyy-ui/utils"),c=require("./make-installer.js"),a="0.2.5",l=[o.SySearchBar],n=e=>{l.forEach(s=>e.use(s))},u={version:a,install:n};Object.defineProperty(exports,"SySearchBar",{enumerable:!0,get:()=>o.SySearchBar});exports.makeInstaller=c.makeInstaller;exports.default=u;exports.install=n;exports.version=a;Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});Object.keys(r).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});
1
+ "use strict";/*!
2
+ * sunyard-szyy-ui v0.2.8
3
+ * (c) 2026 Sunyard SZYY UI Team
4
+ */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("@sunyard-szyy-ui/components"),r=require("./version.js"),n=require("@sunyard-szyy-ui/hooks"),t=require("@sunyard-szyy-ui/utils"),c=require("./make-installer.js"),i=[s.SySearchBar],a=e=>{if(typeof window!="undefined"&&(console.log(`%c[Sunyard SZYY UI]%c v${r.version} %cinstalled`,"color: #409eff; font-weight: bold","color: #67c23a","color: #909399"),window.__SUNYARD_SZYY_UI_VERSION__=r.version,window.__SUNYARD_SZYY_UI__={version:r.version,components:i.map(o=>o.name||"Unknown")}),i.forEach(o=>e.use(o)),typeof window!="undefined"){const o=window.__VUE_DEVTOOLS_GLOBAL_HOOK__;o&&o.emit("app:init",e,r.version,{label:"Sunyard SZYY UI",packageName:"sunyard-szyy-ui",homepage:"https://github.com/your-org/sunyard-szyy-ui"})}},l={version:r.version,install:a};Object.defineProperty(exports,"SySearchBar",{enumerable:!0,get:()=>s.SySearchBar});exports.version=r.version;exports.makeInstaller=c.makeInstaller;exports.default=l;exports.install=a;Object.keys(n).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>n[e]})});Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});
@@ -3,13 +3,14 @@ import type { App, Plugin } from 'vue';
3
3
  * 创建组件库安装器
4
4
  *
5
5
  * @param components - 组件列表
6
- * @returns 包含 install 方法的插件对象
6
+ * @param version - 版本号
7
+ * @returns 包含 install 方法和 version 的插件对象
7
8
  *
8
9
  * @example
9
- * const installer = makeInstaller([SySearchBar, SyButton]);
10
+ * const installer = makeInstaller([SySearchBar, SyButton], '1.0.0');
10
11
  * app.use(installer);
11
12
  */
12
- export declare const makeInstaller: (components?: Plugin[]) => {
13
+ export declare const makeInstaller: (components?: Plugin[], version?: string) => {
13
14
  version: string;
14
15
  install: (app: App) => void;
15
16
  };
@@ -1 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=Symbol("SUNYARD_SZYY_UI_INSTALLED"),n=(r=[])=>({version:"0.2.5",install:e=>{e[t]||(e[t]=!0,r.forEach(l=>e.use(l)))}});exports.makeInstaller=n;
1
+ "use strict";/*!
2
+ * sunyard-szyy-ui v0.2.8
3
+ * (c) 2026 Sunyard SZYY UI Team
4
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Symbol("SUNYARD_SZYY_UI_INSTALLED"),s=(l=[],r="0.0.0")=>({version:r,install:t=>{t[e]||(t[e]=!0,l.forEach(n=>t.use(n)))}});exports.makeInstaller=s;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 自动生成的版本文件
3
+ * 请勿手动修改
4
+ * 通过 pnpm version:set 命令更新版本号
5
+ */
6
+ export declare const version = "0.2.8";
7
+ //# sourceMappingURL=version.d.ts.map
package/lib/version.js ADDED
@@ -0,0 +1,4 @@
1
+ "use strict";/*!
2
+ * sunyard-szyy-ui v0.2.8
3
+ * (c) 2026 Sunyard SZYY UI Team
4
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.2.8";exports.version=e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sunyard-szyy-ui",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "type": "module",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.mjs",
@@ -19,6 +19,7 @@
19
19
  "types": "./lib/index.d.ts",
20
20
  "require": "./lib/index.js"
21
21
  },
22
+ "./dist/*": "./dist/*",
22
23
  "./hooks": {
23
24
  "types": "./dist/hooks/index.d.ts",
24
25
  "import": "./dist/hooks/index.js",
@@ -29,6 +30,15 @@
29
30
  "import": "./dist/utils/index.js",
30
31
  "require": "./dist/utils/index.cjs"
31
32
  },
33
+ "./es/components/*/style/css": {
34
+ "import": "./es/components/*/style/css.mjs"
35
+ },
36
+ "./es/components/*/style/index": {
37
+ "import": "./es/components/*/style/index.mjs"
38
+ },
39
+ "./es/components/*/style/*": {
40
+ "import": "./es/components/*/style/*.mjs"
41
+ },
32
42
  "./es/*.mjs": {
33
43
  "types": "./es/*.d.ts",
34
44
  "import": "./es/*.mjs"
@@ -73,9 +83,9 @@
73
83
  "vue": "^3.0.0"
74
84
  },
75
85
  "dependencies": {
76
- "@sunyard-szyy-ui/components": "0.2.6",
77
- "@sunyard-szyy-ui/hooks": "0.2.6",
78
- "@sunyard-szyy-ui/utils": "0.2.6"
86
+ "@sunyard-szyy-ui/components": "0.2.8",
87
+ "@sunyard-szyy-ui/hooks": "0.2.8",
88
+ "@sunyard-szyy-ui/utils": "0.2.8"
79
89
  },
80
90
  "publishConfig": {
81
91
  "access": "public"