hortimagic 1.0.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.
@@ -0,0 +1,11 @@
1
+ export * as hm_move_panel from './hm-move-panel';
2
+ export * as hm_icon from './hm-icon';
3
+ export * as hm_menu from './hm-menu';
4
+ export * as hm_notification from './hm-notification';
5
+ export * as hm_button from './hm-button';
6
+ export * as hm_cell from './hm-cell';
7
+ export * as hm_swipe_cell from './hm-swipe-cell';
8
+ export * as hm_switch from './hm-switch';
9
+ export * as hm_accordion from './hm-accordion';
10
+ export *as hm_input from './hm-input';
11
+ export * as hm_dialog from './hm-dialog';
@@ -0,0 +1,48 @@
1
+ import type { HmNotification } from "./hm-notification";
2
+ import type { HmIcon } from "./hm-icon";
3
+ import type { HmMenu } from "./hm-menu";
4
+ import type { HmMovePanel } from "./hm-move-panel";
5
+ import type { HmCell } from "./hm-cell";
6
+ import type { HmSwipeCell } from "./hm-swipe-cell";
7
+ import type { HcSwitch, HmSwitch } from "./hm-switch";
8
+ import type { HmAccordion } from "./hm-accordion";
9
+ import type { HmInput } from "./hm-input";
10
+ import type { HmDialog } from "./hm-dialog";
11
+
12
+ declare global {
13
+ interface HTMLElementTagNameMap {
14
+ "hm-icon": HmIcon;
15
+ 'hm-menu': HmMenu
16
+ "hm-move-panel": HmMovePanel;
17
+ "hm-notification": HmNotification;
18
+ 'hm-cell': HmCell;
19
+ "hm-swipe-cell": HmSwipeCell;
20
+ 'hm-switch': HmSwitch;
21
+ 'hm-accordion': HmAccordion;
22
+ 'hm-input': HmInput;
23
+ 'hm-dialog': HmDialog;
24
+ }
25
+ }
26
+
27
+ // import { LitElement, css, html, render } from 'lit';
28
+ // import { customElement, property } from 'lit/decorators.js';
29
+
30
+
31
+ // @customElement('hm-')
32
+ // export class Hm extends LitElement {
33
+ // @property({ type: String })
34
+ // icon = 'magic-wand';
35
+ // /** 触发点击事件 */
36
+ // handelClick() {
37
+ // this.dispatchEvent(new CustomEvent('hmclick'));
38
+ // }
39
+ // static styles = css`
40
+ // :host {
41
+ // display: inline-block;
42
+ // }
43
+ // `;
44
+
45
+ // render() {
46
+ // return html``;
47
+ // }
48
+ // }
@@ -0,0 +1,351 @@
1
+ // 以下类型定义由 AI 根据 iirosewindow.js 内容「逆向猜测」生成,仅供开发时参考。
2
+ // 因原始代码为混淆/压缩产物,真实签名可能与猜测存在偏差,请结合运行时调试校准。
3
+
4
+ declare global {
5
+ /* ---------------------------------- */
6
+ /* 1. 全局变量(按字母序) */
7
+ /* ---------------------------------- */
8
+
9
+ /** AI 生成:房间主色调,16 进制字符串,如 `"ff5722"` */
10
+ let roomColor: string;
11
+
12
+ /** AI 生成:是否启用面板底部栏,对应 Cookie 值 `"panelBottomBar"` 的布尔转换 */
13
+ let panelStyle: boolean;
14
+
15
+ /** AI 生成:浏览器视口高/宽,实时更新 */
16
+ let browserHeight: number;
17
+ let browserWidth: number;
18
+
19
+ /** AI 生成:性能倍率,用于动画时长缩放 */
20
+ let speedRatio: number;
21
+
22
+ /** AI 生成:用户唯一标识,13 位字符串 */
23
+ let uid: string;
24
+
25
+ /** AI 生成:当前房间号,如 `"5b7cda6765b16"` */
26
+ let roomn: string;
27
+
28
+ /** AI 生成:是否处于移动端 */
29
+ let isMobile: boolean;
30
+
31
+ /** AI 生成:是否启用「精简数据」模式,影响图片/视频懒播行为 */
32
+ let reduceDataUsageProbe: boolean;
33
+
34
+ /** AI 生成:全局 socket 实例,WebSocket 已封装 */
35
+ let socket: WebSocket & {
36
+ /** AI 生成:向服务端发送原始消息,自动补全尾部 `\n` */
37
+ send(raw: string): void;
38
+ };
39
+
40
+ /** AI 生成:主输入框 jQuery 对象 */
41
+ let moveinput: JQuery<HTMLInputElement>;
42
+
43
+ /** AI 生成:主输入框原生节点,与 moveinput 指向同一元素 */
44
+ let moveinputO: HTMLInputElement;
45
+
46
+ /**
47
+ * 消息弹窗
48
+ * @param message 主要的消息内容,可以是文本或HTML,或者任何可以得到结果的东西
49
+ * @param other 可选参数,如果提供,它是一个数组,包含额外的信息,如按钮文本、确认消息等。
50
+ * @param isHtml 布尔值,指示消息是否已经是HTML格式,如果是,则不会对消息进行HTML转义。
51
+ * @param standby 备用消息内容,当t未提供时使用。
52
+ * @param operation 布尔值,可能用于控制是否在某些情况下不执行某些操作,如锁定屏幕或页面模糊。
53
+ */
54
+ function _alert(
55
+ message: any,
56
+ other?: string[],
57
+ isHtml?: boolean,
58
+ standby?: string,
59
+ operation?: boolean
60
+ ): void;
61
+
62
+ /** AI 生成:系统状态数组,保存 17 种图标名,如 `"message-processing"` */
63
+ let statusarr: string[];
64
+
65
+ /** AI 生成:系统提示音文件名数组,含 22 条相对路径 */
66
+ let soundarr: string[];
67
+
68
+ /** AI 生成:时区映射表,城市名 -> 与 UTC 小时偏移量 */
69
+ let timeZoneArr: Record<string, number>;
70
+
71
+ /** AI 生成:国籍映射表,二位国家码 -> 中英文名称,如 `AD:"安道尔共和国 Andorra"` */
72
+ let nationality: Record<string, string>;
73
+
74
+ /** AI 生成:头像框/帽子配饰坐标数据,索引到 `[path, [x,y,w,h]]` */
75
+ let accessoryArr: Record<number, [string, [number, number, number, number, number, number]]>;
76
+
77
+ /* ---------------------------------- */
78
+ /* 2. 主要命名空间 */
79
+ /* ---------------------------------- */
80
+
81
+ /** AI 生成:工具函数集合 */
82
+ namespace Utils {
83
+ let Sound: {
84
+ /**
85
+ * 播放花园常见的声音
86
+ * @param num 编号,0~9
87
+ * @param other 其他参数
88
+ * @returns
89
+ */
90
+ play(num: number, other?: any): any;
91
+ }
92
+
93
+ // 19998行
94
+ /**
95
+ * 预览音频,播放音频
96
+ * @param url 音频链接
97
+ */
98
+ function previewSound(url: string): any;
99
+ /** AI 生成:滤镜与文本处理子模块 */
100
+ namespace Filter {
101
+ /** AI 生成:过滤公开聊天内容,返回过滤后字符串 */
102
+ function pubMsg(raw: string): string;
103
+
104
+ /** AI 生成:将 `(_hr) 消息 (_hr)` 转成引用 DOM 片段 */
105
+ function refMsg(html: string, margin?: 0 | 1 | 2): string;
106
+
107
+ /** AI 生成:将房间地址语法 `[*roomId*]` 转成可点击链接 */
108
+ function roomAdress(html: string): string;
109
+
110
+ /** AI 生成:将媒体链接转成对应表情符号,用于通知摘要 */
111
+ function iconFilterMsg(html: string): string;
112
+ }
113
+ let filter: {
114
+ all: [];
115
+ pubchat: null;
116
+ prichat: null;
117
+ danmaku: null;
118
+ /**
119
+ * 运行过滤器
120
+ */
121
+ run: (e, t) => any;
122
+ }
123
+
124
+ /** AI 生成:事件/媒体相关 */
125
+ namespace Event {
126
+ /** AI 生成:统一处理 audio/video 标签事件,o 参数为行为码 */
127
+ function media(
128
+ action: 0 | 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | 13,
129
+ $target: JQuery,
130
+ o?: any,
131
+ i?: any
132
+ ): void;
133
+
134
+ /** AI 生成:点击视频区域时进入/退出影院模式 */
135
+ function onVideoPointerClick(e: MouseEvent): void;
136
+ }
137
+
138
+ /** AI 生成:移动端生命周期钩子 */
139
+ namespace Mobile {
140
+ function onStop(): void;
141
+ function onStart(): void;
142
+ }
143
+
144
+ /** AI 生成:服务层,含上传、翻译、时区、面板保存等 */
145
+ namespace service {
146
+ /** AI 生成:上传文件入口,自动区分图片/媒体/普通文件 */
147
+ function upload(input: HTMLInputElement, mode: 0 | 1): void;
148
+
149
+ /** AI 生成:将网络图片转存至本站并插入输入框 */
150
+ function uploadUrlImg(url: string, callback: (url: string) => void, useAgent?: boolean): void;
151
+
152
+ /** AI 生成:获取视频自适应尺寸 `[width, height]` */
153
+ function getVideoSize(ratio: number): [number, number];
154
+
155
+ /** AI 生成:获取时区描述文本,如 `UTC +8 / 18:30` */
156
+ function getTimeZone(cityOrStar?: string): string;
157
+
158
+ /** AI 生成:打开/关闭表情面板 */
159
+ function emoji(): void;
160
+
161
+ /** AI 生成:保存当前面板状态,用于断线恢复 */
162
+ function panelSave(): void;
163
+
164
+ /** AI 生成:资源回收,清理公屏/私聊过多消息 */
165
+ function resourceGC(limit?: number): void;
166
+ function resourceGC_PM(pmBox: JQuery, limit?: number): void;
167
+
168
+ /** AI 生成:处理输入框快捷指令,返回 `true` 表示已消费 */
169
+ function moveinputDo(cmd: string, noSend?: boolean): boolean;
170
+
171
+ /** AI 生成:构造离线私聊窗口,成功返回 `1` */
172
+ function offlinePmBuildHelper(targetUid: string, temp?: string): 0 | 1;
173
+
174
+ /** AI 生成:管理员相关子模块 */
175
+ namespace admin {
176
+ function init(raw: string): void;
177
+ function set(global: 0 | 1, type: "0" | "1" | "2" | "3", expired: string, comment: string): void;
178
+ function setInput(enable: boolean, type?: number, placeholder?: string): void;
179
+ function control(type: 0 | 1 | 2, enable: boolean, level: 1 | 2 | 3): void;
180
+ }
181
+ }
182
+
183
+ /** AI 生成:小型工具函数 */
184
+ namespace smallTools {
185
+ /** AI 生成:格式化小数,保留 `digit` 位 */
186
+ function formatDecimal(num: number, digit: number): string;
187
+
188
+ /** AI 生成:拼接网易云歌手数组 */
189
+ function combineArtist(ar: Array<{ name: string }>): string;
190
+
191
+ /** AI 生成:返回当前 Unix 时间戳(秒) */
192
+ function getTime(): number;
193
+
194
+ /** AI 生成:补零日期 `2025/06/05` */
195
+ function dateFill(y: number, m: number, d: number): string;
196
+ }
197
+ }
198
+
199
+ /* ---------------------------------- */
200
+ /* 3. 扩展系统(Ext) */
201
+ /* ---------------------------------- */
202
+
203
+ /** AI 生成:官方扩展 API 命名空间 */
204
+ namespace Ext {
205
+ let Variable: Record<string, any>;
206
+ let Function: Record<string, Function>;
207
+ let Class: Record<string, Function>;
208
+ let Object: Record<string, any>;
209
+ let Constant: Record<string, any>;
210
+ let Storage: Record<string, any>;
211
+ let Package: any[];
212
+ let Temporary: Record<string, any>;
213
+ let Fallback: Record<string, any>;
214
+ let Event: {
215
+ resize: Record<string, Function>;
216
+ beforeunload: Record<string, Function>;
217
+ contextmenu: Record<string, Function>;
218
+ };
219
+
220
+ /** AI 生成:扩展资源区 */
221
+ namespace Assets {
222
+ let settings: Record<string, any>;
223
+ let database: Record<string, any>;
224
+ }
225
+
226
+ /** AI 生成:每个扩展实例的服务端点 */
227
+ namespace Service {
228
+ let instances: Record<string, ExtInstance>;
229
+ function getInstance(extId: string): ExtInstance;
230
+ }
231
+
232
+ /** AI 生成:工具集合 */
233
+ namespace Utils { }
234
+
235
+ interface ExtInstance {
236
+ /** AI 生成:读写扩展本地设置 */
237
+ settings(key: string): any;
238
+ settings(key: string, val: any): void;
239
+
240
+ /** AI 生成:读写扩展持久化数据库 */
241
+ database(key: string): any;
242
+ database(key: string, val: any): void;
243
+
244
+ /** AI 生成:向服务端发送扩展消息 */
245
+ send(cmd: string | string[], body: string): void;
246
+
247
+ /** AI 生成:接收到服务端消息时回调 */
248
+ receive(cmd: string, body: string): void;
249
+
250
+ removeSettings(key: string): void;
251
+ removeDatabase(key: string): void;
252
+
253
+ /** AI 生成:隔离的 localStorage 工具 */
254
+ localStorage: {
255
+ setItem(key: string, val: string): void;
256
+ getItem(key: string): string | null;
257
+ removeItem(key: string): void;
258
+ };
259
+
260
+ /** AI 生成:扩展事件管理 */
261
+ event: {
262
+ add(event: "resize" | "beforeunload" | "contextmenu", key: string, cb: Function): void;
263
+ remove(event: "resize" | "beforeunload" | "contextmenu", key: string): void;
264
+ get(event: "resize" | "beforeunload" | "contextmenu", key: string): Function | undefined;
265
+ };
266
+ }
267
+ }
268
+
269
+ /* ---------------------------------- */
270
+ /* 4. 杂项工具函数 */
271
+ /* ---------------------------------- */
272
+
273
+ /** AI 生成:将字符串转小写,内部实现跳过 Unicode 大写 */
274
+ function toLowerCase(str: string): string;
275
+
276
+ /**
277
+ * HTML反转义函数,用于将字符串e中的HTML特殊字符转换为HTML实体。
278
+ *它检查字符串中是否包含&、<、>、"、'和\,并相应地替换为&amp;、&lt;、&gt;、&quot;、&#039;和&#092;。
279
+ *这个函数没有处理非断空格(&nbsp;)。
280
+ */
281
+ function htmlspecialchars(str: string): string;
282
+
283
+ /**
284
+ * HTML反转义函数,用于将字符串e中的HTML实体转换回特殊字符。
285
+ *它检查字符串中是否包含&#092;、&#039;、&quot;、&gt;、&lt;和&amp;,并相应地替换为\、'、"、>、<和&。
286
+ */
287
+ function unhtmlspecialchars(str: string): string;
288
+
289
+ /** AI 生成:将 hex 色值转 `r,g,b` 字符串 */
290
+ function hex2rgb(hex: string): string;
291
+
292
+ /** AI 生成:将 `r,g,b` 字符串转 hex */
293
+ function rgb2hex(rgb: string): string;
294
+
295
+ /** AI 生成:根据颜色亮度返回是否属于「浅色」 */
296
+ function darkOrLight(color: string, asRgb?: boolean): boolean;
297
+
298
+ /** AI 生成:头像链接转换,支持系统头像、外链、GIF 拦截等 */
299
+ function avatarconv(url: string, noFallback?: boolean): string;
300
+
301
+ /** AI 生成:配饰图片链接转换 */
302
+ function imgconvAccessory(id: number | string): string;
303
+
304
+ /** AI 生成:聚焦输入框并返回自身(PC 端) */
305
+ function focusI<T extends JQuery>(input: T): T;
306
+
307
+ /** AI 生成:执行快捷指令,如 `getname`、`getuid`、`high2` 高亮等 */
308
+ function runCmd(cmd: "getname" | "getuid" | "high2" | string, arg?: string): void;
309
+
310
+ /** AI 生成:弹出图片查看器 */
311
+ function showImg(src: string, show?: boolean): void;
312
+
313
+ /** AI 生成:弹出音频/视频查看器 */
314
+ function showMedia(isVideo: boolean, src: string, show?: boolean): void;
315
+
316
+ /** AI 生成:请求指定用户资料卡片 */
317
+ function getProfile(uid: string, fromMap?: boolean): void;
318
+
319
+ /** AI 生成:展示用户详情弹窗(精简/完整双模式) */
320
+ function whois(
321
+ raw: string,
322
+ data: string[],
323
+ extra?: [number, [number, number]]
324
+ ): void;
325
+
326
+ /** AI 生成:页面加载完毕回调,由 `<body onload>` 触发 */
327
+ function loadIsDone(): void;
328
+
329
+ /** AI 生成:模糊背景,t 为模糊像素值,`"0"` 表示关闭 */
330
+ function blurFunc(e: any, t: string): void;
331
+
332
+ /** 软件版本 */
333
+ declare let appVersion: string;
334
+ // 未知行
335
+ declare let Api: {
336
+ md: {
337
+ // 使用字符串生成网页元素
338
+ render(param: string): string;
339
+ }
340
+ }
341
+ /**
342
+ * 按钮处理
343
+ * @param e
344
+ * @param s
345
+ * @param t
346
+ * @param r
347
+ */
348
+ declare let buttonProcesser: (e: any, s: any, t: any, r: any) => any;
349
+ }
350
+
351
+ export { };
@@ -0,0 +1,2 @@
1
+ /// <reference types="vite/client" />
2
+