ebuilds-shared 0.1.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.
Files changed (40) hide show
  1. package/README.md +69 -0
  2. package/dist/chunk-6DZX6EAA.mjs +37 -0
  3. package/dist/chunk-G4JQ2UQV.mjs +2878 -0
  4. package/dist/chunk-LATZ6U6A.js +2878 -0
  5. package/dist/chunk-MXO66M74.js +36 -0
  6. package/dist/chunk-OW2EL2VY.mjs +36 -0
  7. package/dist/chunk-QGM4M3NI.js +37 -0
  8. package/dist/chunk-QQPGJGSU.js +6916 -0
  9. package/dist/chunk-RRULL645.mjs +6916 -0
  10. package/dist/functionalComponent/index.d.mts +16 -0
  11. package/dist/functionalComponent/index.d.ts +16 -0
  12. package/dist/functionalComponent/index.js +25 -0
  13. package/dist/functionalComponent/index.mjs +25 -0
  14. package/dist/index-CVmrbYyU.d.mts +34 -0
  15. package/dist/index-CVmrbYyU.d.ts +34 -0
  16. package/dist/index.css +69 -0
  17. package/dist/index.d.mts +11 -0
  18. package/dist/index.d.ts +11 -0
  19. package/dist/index.js +65 -0
  20. package/dist/index.mjs +65 -0
  21. package/dist/stores/index.d.mts +294 -0
  22. package/dist/stores/index.d.ts +294 -0
  23. package/dist/stores/index.js +13 -0
  24. package/dist/stores/index.mjs +13 -0
  25. package/dist/styles/index.css +69 -0
  26. package/dist/styles/index.d.mts +2 -0
  27. package/dist/styles/index.d.ts +2 -0
  28. package/dist/uno-config/index.d.mts +8 -0
  29. package/dist/uno-config/index.d.ts +8 -0
  30. package/dist/uno-config/index.js +9 -0
  31. package/dist/uno-config/index.mjs +9 -0
  32. package/dist/utils/index.d.mts +157 -0
  33. package/dist/utils/index.d.ts +157 -0
  34. package/dist/utils/index.js +49 -0
  35. package/dist/utils/index.mjs +49 -0
  36. package/dist/vite-config/index.d.mts +31 -0
  37. package/dist/vite-config/index.d.ts +31 -0
  38. package/dist/vite-config/index.js +7 -0
  39. package/dist/vite-config/index.mjs +7 -0
  40. package/package.json +79 -0
package/README.md ADDED
@@ -0,0 +1,69 @@
1
+ # @ebuilds/shared
2
+
3
+ 共享工具库和类型定义
4
+
5
+ ## 安装
6
+
7
+ ```bash
8
+ npm install @ebuilds/shared
9
+ ```
10
+
11
+
12
+
13
+ ```bash
14
+ yarn add @ebuilds/shared
15
+ ```
16
+
17
+
18
+
19
+ ```bash
20
+ pnpm add @ebuilds/shared
21
+ ```
22
+
23
+ ## 功能模块
24
+
25
+ ### 工具函数 (utils)
26
+ - `request/curl`: Axios 封装的 HTTP 客户端
27
+ - `hooks/loginHook`: 登录相关 Hook
28
+ - `routerPermission`: 路由权限控制
29
+ - `dateUtils`: 日期处理工具
30
+ - `numUtils`: 数字处理工具
31
+ - `interceptors`: 请求拦截器
32
+ - `util`: 通用工具函数
33
+ - `aesEncrypt`: AES 加密解密
34
+ - `jsonp`: JSONP 实现
35
+
36
+ ### 状态管理 (stores)
37
+ 基于 Pinia 的状态管理模块:
38
+ - `aiChatStore`: AI 聊天状态
39
+ - `commonStore`: 通用状态
40
+ - `dbStore`: 数据库状态
41
+ - `drawerWidthStore`: 抽屉宽度状态
42
+ - `menuStore`: 菜单状态
43
+
44
+ ### Vite 配置 (vite-config)
45
+ Vite 构建工具的标准配置模板
46
+
47
+ ### UnoCSS 配置 (uno-config)
48
+ UnoCSS 样式框架的配置
49
+
50
+ ### 样式 (styles)
51
+ 公共样式文件
52
+
53
+ ## 使用示例
54
+
55
+ ```typescript
56
+ // 引入工具函数
57
+ import { request } from '@ebuilds/shared/utils'
58
+
59
+ // 引入状态管理
60
+ import { useCommonStore } from '@ebuilds/shared/stores'
61
+
62
+ // 引入 Vite 配置
63
+ import viteConfig from '@ebuilds/shared/vite-config'
64
+ ```
65
+
66
+ ## 注意事项
67
+
68
+ - 本库依赖于 Vue 3 和 Pinia
69
+ - 部分功能可能需要配合其他依赖使用
@@ -0,0 +1,37 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
+ }) : x)(function(x) {
10
+ if (typeof require !== "undefined") return require.apply(this, arguments);
11
+ throw Error('Dynamic require of "' + x + '" is not supported');
12
+ });
13
+ var __commonJS = (cb, mod) => function __require2() {
14
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
15
+ };
16
+ var __copyProps = (to, from, except, desc) => {
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from))
19
+ if (!__hasOwnProp.call(to, key) && key !== except)
20
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
21
+ }
22
+ return to;
23
+ };
24
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
+ // If the importer is in node compatibility mode or this is not an ESM
26
+ // file that has been converted to a CommonJS file using a Babel-
27
+ // compatible transform (i.e. "__esModule" has not been set), then set
28
+ // "default" to the CommonJS "module.exports" for node compatibility.
29
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
30
+ mod
31
+ ));
32
+
33
+ export {
34
+ __require,
35
+ __commonJS,
36
+ __toESM
37
+ };