hortimagic 1.0.3 → 1.0.6
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 +94 -9
- package/dist/hortimagic.iife.js +378 -258
- package/dist/hortimagic.js +380 -260
- package/dist/hortimagic.txt +380 -260
- package/dist/hortimagic.user.js +380 -260
- package/dist/index.d.ts +512 -174
- package/package.json +3 -3
- package/src/components/hm-accordion.ts +10 -9
- package/src/components/hm-button.ts +2 -3
- package/src/components/hm-cell.ts +6 -37
- package/src/components/hm-dialog.ts +4 -3
- package/src/components/hm-icon.ts +33 -4
- package/src/components/hm-menu.ts +5 -1
- package/src/components/hm-move-panel.ts +36 -39
- package/src/components/hm-select.ts +242 -0
- package/src/components/hm-swipe-cell.ts +3 -4
- package/src/components/hm-switch.ts +7 -6
- package/src/components/index.ts +1 -0
- package/src/components/type.d.ts +10 -6
- package/dist/hortimagic.es.js +0 -4143
package/README.md
CHANGED
|
@@ -1,9 +1,94 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
# HortiMagic - 蔷薇花园脚本管理插件
|
|
2
|
+
|
|
3
|
+
HortiMagic(园艺魔法)是一个基于Lit构建的蔷薇花园(iirose)浏览器插件,提供了一套丰富的UI组件和脚本管理功能,用于增强花园的使用体验。
|
|
4
|
+
|
|
5
|
+
## 功能特性
|
|
6
|
+
|
|
7
|
+
- **UI组件库**: 提供多种常用的UI组件,如菜单、按钮、对话框、通知、开关、输入框等
|
|
8
|
+
- **脚本管理**: 支持动态添加、管理和运行外部脚本
|
|
9
|
+
- **状态管理**: 使用valtio实现响应式状态管理,支持自动保存设置
|
|
10
|
+
- **网络钩子**: 提供消息发送和接收的钩子函数,可以拦截和处理网络请求
|
|
11
|
+
- **配置系统**: 提供用户界面来配置插件的各种设置
|
|
12
|
+
- **日志系统**: 内置日志记录功能,便于调试和监控插件运行状态
|
|
13
|
+
- **通知系统**: 提供美观的通知组件和API
|
|
14
|
+
|
|
15
|
+
## 核心组件
|
|
16
|
+
|
|
17
|
+
- [hm-accordion](./src/components/hm-accordion.ts) - 手风琴组件
|
|
18
|
+
- [hm-button](./src/components/hm-button.ts) - 按钮组件
|
|
19
|
+
- [hm-cell](./src/components/hm-cell.ts) - 列表单元格组件
|
|
20
|
+
- [hm-dialog](./src/components/hm-dialog.ts) - 对话框组件
|
|
21
|
+
- [hm-icon](./src/components/hm-icon.ts) - 图标组件
|
|
22
|
+
- [hm-input](./src/components/hm-input.ts) - 输入框组件
|
|
23
|
+
- [hm-menu](./src/components/hm-menu.ts) - 菜单组件
|
|
24
|
+
- [hm-move-panel](./src/components/hm-move-panel.ts) - 可移动面板组件
|
|
25
|
+
- [hm-notification](./src/components/hm-notification.ts) - 通知组件
|
|
26
|
+
- [hm-select](./src/components/hm-select.ts) - 选择器组件
|
|
27
|
+
- [hm-swipe-cell](./src/components/hm-swipe-cell.ts) - 滑动单元格组件
|
|
28
|
+
- [hm-switch](./src/components/hm-switch.ts) - 开关组件
|
|
29
|
+
|
|
30
|
+
## 安装使用
|
|
31
|
+
|
|
32
|
+
1. 在花园中打开终端(左侧菜单)
|
|
33
|
+
2. 输入`js`命令
|
|
34
|
+
3. 输入本插件的脚本链接即可使用
|
|
35
|
+
|
|
36
|
+
## 开发
|
|
37
|
+
|
|
38
|
+
### 环境搭建
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# 安装依赖
|
|
42
|
+
npm install
|
|
43
|
+
|
|
44
|
+
# 开发模式
|
|
45
|
+
npm run dev
|
|
46
|
+
|
|
47
|
+
# 构建
|
|
48
|
+
npm run build
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 项目结构
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
src/
|
|
55
|
+
├── apps/ # 应用模块
|
|
56
|
+
│ ├── config-app.ts # 配置应用
|
|
57
|
+
│ ├── dialog-app.ts # 对话框应用
|
|
58
|
+
│ ├── log-app.ts # 日志应用
|
|
59
|
+
│ ├── main-app.ts # 主应用
|
|
60
|
+
│ ├── script-app.ts # 脚本管理应用
|
|
61
|
+
│ └── index.ts
|
|
62
|
+
├── components/ # UI组件
|
|
63
|
+
├── core/ # 核心功能
|
|
64
|
+
│ ├── Emitter.ts # 事件发射器
|
|
65
|
+
│ ├── Message.ts # 消息处理
|
|
66
|
+
│ ├── decoder.ts # 消息解码器
|
|
67
|
+
│ ├── encoder.ts # 消息编码器
|
|
68
|
+
│ ├── elements-hooks.ts # DOM元素钩子
|
|
69
|
+
│ ├── log-tools.ts # 日志工具
|
|
70
|
+
│ ├── script-tools.ts # 脚本管理工具
|
|
71
|
+
│ ├── socket-tools.ts # 网络连接工具
|
|
72
|
+
│ ├── store.ts # 状态管理
|
|
73
|
+
│ └── tools.ts # 通用工具
|
|
74
|
+
├── holders/ # DOM容器
|
|
75
|
+
├── easy-tools.ts # 简化工具
|
|
76
|
+
└── main.ts # 入口文件
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## 依赖
|
|
80
|
+
|
|
81
|
+
- [lit](https://lit.dev/) - 轻量级Web组件库
|
|
82
|
+
- [valtio](https://github.com/pmndrs/valtio) - Reaction-like状态管理
|
|
83
|
+
- [terser](https://github.com/terser/terser) - JavaScript压缩工具
|
|
84
|
+
|
|
85
|
+
## 许可证
|
|
86
|
+
|
|
87
|
+
MIT License
|
|
88
|
+
|
|
89
|
+
## 联系方式
|
|
90
|
+
|
|
91
|
+
如果遇到问题,可以联系作者:
|
|
92
|
+
|
|
93
|
+
1. 花园房间:[留不住别样年华](https://iirose.com/#s=61aef798c94e6&act=i:61aef798c94e6)
|
|
94
|
+
2. QQ群:[56246005](https://qun.qq.com/universal-share/share?ac=1&authKey=bWDSbs%2Bly0dpxZm%2Ff8OsufXeRWSn6fhRWfaz6K%2FJDCKY%2Bt05wP%2BsKeRkovoMfdfQ&busi_data=eyJncm91cENvZGUiOiI5OTU5MzE3MTAiLCJ0b2tlbiI6Im1NSVpiOUhWeE91ZDFLTERla2hiMzdaWDlBd2h3Z2s2ZFREMWMxbUhSaktNSTVIUUxOTkR6RjFQS0tnTWRjNUEiLCJ1aW4iOiIyOTE4NTIzNjk1In0%3D&data=L0gUu0j7KKkHQgShTclZcmvfKQKp7VSQOxmMKJcxhHUviRlnP5nY6pDW-PXvV305qdl4W8DIal1MqjUAPFoJEg&svctype=4&tempid=h5_group_info)
|