dozy 1.0.14 → 1.0.16
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/Dozy.d.ts +1 -0
- package/dist/Dozy.d.ts.map +1 -0
- package/dist/Functions.d.ts +1 -0
- package/dist/Functions.d.ts.map +1 -0
- package/dist/Store.d.ts +1 -0
- package/dist/Store.d.ts.map +1 -0
- package/dist/WebFunctions.d.ts +1 -0
- package/dist/WebFunctions.d.ts.map +1 -0
- package/dist/assets/cover.css +476 -0
- package/dist/index.d.ts +118 -10
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +24 -23
package/dist/Dozy.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dozy.d.ts","sourceRoot":"","sources":["../src/Dozy.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAA;AAEhD,MAAM,MAAM,cAAc,GAAG,EAAE,CAAA;AAC/B,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;AAChD,cAAM,IAAI;IACT,MAAM,EAAE,cAAc,CAAK;CAC3B;AACD,eAAO,MAAM,IAAI,MAAa,CAAA"}
|
package/dist/Functions.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export declare function $isObject(value: unknown): value is Record<string, unkno
|
|
|
2
2
|
export declare function $deepClone<T>(value: T): T;
|
|
3
3
|
export declare function $capitalize(s: string): string;
|
|
4
4
|
export declare function $clamp(n: number, min: number, max: number): number;
|
|
5
|
+
//# sourceMappingURL=Functions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Functions.d.ts","sourceRoot":"","sources":["../src/Functions.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE1E;AACD,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAMzC;AAkBD,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,UAGpC;AACD,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,UAEzD"}
|
package/dist/Store.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Store.d.ts","sourceRoot":"","sources":["../src/Store.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,8EAAa,CAAA;AACpC,eAAO,MAAM,cAAc;;;CAAiB,CAAA;AAG5C,eAAO,MAAM,KAAK,EAAkB,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,EAAE,CAAA;AACtF,eAAO,MAAM,QAAQ,EAAqB,CAAC,CAAC,SAAS,MAAM,EAC1D,GAAG,EAAE,CAAC,KACF,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA;AACrC,eAAO,MAAM,OAAO;;;;;CAAgB,CAAA;AACpC,eAAO,MAAM,OAAO;;;;;CAAgB,CAAA;AACpC,eAAO,MAAM,eAAe,gFAAwB,CAAA;AACpD,eAAO,MAAM,OAAO;;;;;;CAAgB,CAAA;AACpC,eAAO,MAAM,GAAG,uCAAY,CAAA;AAG5B,eAAO,MAAM,UAAU;;;;;CAAa,CAAA;AACpC,eAAO,MAAM,aAAa,4BAAgB,CAAA;AAG1C,eAAO,MAAM,mBAAmB,gCAAsB,CAAA;AACtD,eAAO,MAAM,oBAAoB,qCAAuB,CAAA;AAGxD,eAAO,MAAM,YAAY,8BAAe,CAAA;AACxC,eAAO,MAAM,eAAe,8BAAkB,CAAA;AAG9C,eAAO,MAAM,KAAK,MAAO,CAAA;AAGzB,eAAO,MAAM,IAAI,cAAW,CAAA;AAC5B,eAAO,MAAM,KAAK,iBAAO,CAAA;AAGzB,eAAO,MAAM,QAAQ,oBAAU,CAAA;AAG/B,eAAO,MAAM,IAAI;;;;;;;CAAM,CAAA;AACvB,eAAO,MAAM,gBAAgB;;;CAAkB,CAAA;AAG/C,eAAO,MAAM,MAAM,wBAA6B,CAAA;AAGhD,eAAO,MAAM,OAAO,0CAAqD,CAAA;AACzE,eAAO,MAAM,SAAS,sBAAyD,CAAA;AAC/E,eAAO,MAAM,SAAS,sBAA8D,CAAA;AACpF,eAAO,MAAM,KAAK,8GAA0D,CAAA;AAC5E,eAAO,MAAM,WAAW,8GAAgE,CAAA;AACxF,eAAO,MAAM,aAAa,wEAAkE,CAAA;AAC5F,eAAO,MAAM,YAAY,+GAAiE,CAAA;AAC1F,eAAO,MAAM,cAAc,yEAAmE,CAAA;AAG9F,eAAO,MAAM,MAAM,0BAAmD,CAAA;AACtE,eAAO,MAAM,QAAQ;;;aAAuD,CAAA;AAC5E,eAAO,MAAM,QAAQ;;;aAAuD,CAAA;AAC5E,eAAO,MAAM,SAAS;;;;;;aAAyD,CAAA;AAU/E,eAAO,MAAM,OAAO,oBAAqD,CAAA"}
|
package/dist/WebFunctions.d.ts
CHANGED
|
@@ -11,3 +11,4 @@ export declare function web$pathStartData(): {
|
|
|
11
11
|
export declare function web$enableProdProtector(): void;
|
|
12
12
|
export declare function web$enableHttpsRedirect(): void;
|
|
13
13
|
export declare function web$redirectToDomain(newDomain: string): void;
|
|
14
|
+
//# sourceMappingURL=WebFunctions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebFunctions.d.ts","sourceRoot":"","sources":["../src/WebFunctions.ts"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,QAG1C;AACD,wBAAgB,iBAAiB;;;;;;;;EA+BhC;AAED,wBAAgB,uBAAuB,SA6CtC;AACD,wBAAgB,uBAAuB,SAWtC;AACD,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,QAIrD"}
|
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
/* =========================================
|
|
2
|
+
CSS Reset and Global Styles
|
|
3
|
+
Project: xaidozy
|
|
4
|
+
========================================= */
|
|
5
|
+
|
|
6
|
+
/* =======================
|
|
7
|
+
1. 字体定义 (Font Face)
|
|
8
|
+
======================= */
|
|
9
|
+
@font-face {
|
|
10
|
+
font-family: 'xaifont';
|
|
11
|
+
src: url('@/assets/fonts/xaifont.ttf') format('truetype');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* @font-face {
|
|
15
|
+
font-family: 'defaultFont';
|
|
16
|
+
src: url('your-font-file-path.woff2') format('woff2'),
|
|
17
|
+
url('your-font-file-path.woff') format('woff');
|
|
18
|
+
font-weight: normal;
|
|
19
|
+
font-style: normal;
|
|
20
|
+
}
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/* =======================
|
|
24
|
+
2. 核心盒模型与基础重置 (Core Reset)
|
|
25
|
+
======================= */
|
|
26
|
+
|
|
27
|
+
/* 1. 防止 padding 和 border 影响元素宽度 (Box-sizing)
|
|
28
|
+
2. 移除所有元素的默认 margin 和 padding
|
|
29
|
+
3. 重置所有边框样式
|
|
30
|
+
*/
|
|
31
|
+
*,
|
|
32
|
+
::after,
|
|
33
|
+
::before,
|
|
34
|
+
::backdrop,
|
|
35
|
+
::file-selector-button {
|
|
36
|
+
box-sizing: border-box; /* 1 */
|
|
37
|
+
margin: 0; /* 2 */
|
|
38
|
+
padding: 0; /* 2 */
|
|
39
|
+
border: 0 solid; /* 3 */
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* =======================
|
|
43
|
+
3. 全局通用样式 (Global Styles)
|
|
44
|
+
======================= */
|
|
45
|
+
|
|
46
|
+
/* 根元素设置 */
|
|
47
|
+
:root {
|
|
48
|
+
font-synthesis: none; /* 禁止浏览器合成粗体/斜体 */
|
|
49
|
+
text-rendering: optimizeLegibility; /* 优化文本渲染清晰度 */
|
|
50
|
+
-webkit-font-smoothing: antialiased; /* WebKit字体抗锯齿 */
|
|
51
|
+
-moz-osx-font-smoothing: grayscale; /* Firefox字体抗锯齿 */
|
|
52
|
+
|
|
53
|
+
--base-font-size: 16;
|
|
54
|
+
--px: calc(1 / 16 * 1rem);
|
|
55
|
+
|
|
56
|
+
--content-width: 0;
|
|
57
|
+
--modal-max-height: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* HTML 基础设置
|
|
61
|
+
1. 统一行高
|
|
62
|
+
2. iOS 字体大小调整修正
|
|
63
|
+
3. 设置更易读的 Tab 宽度
|
|
64
|
+
4. 默认无衬线字体栈
|
|
65
|
+
5. 禁用 iOS 点击高亮
|
|
66
|
+
*/
|
|
67
|
+
html {
|
|
68
|
+
font-size: calc(var(--base-font-size) * 1px);
|
|
69
|
+
width: 100%;
|
|
70
|
+
height: 100%;
|
|
71
|
+
overflow-x: hidden;
|
|
72
|
+
overflow-y: hidden; /* 防止 HTML 层滚动,通常由 Body 处理 */
|
|
73
|
+
|
|
74
|
+
line-height: 1.5; /* 1 */
|
|
75
|
+
-webkit-text-size-adjust: 100%; /* 2 */
|
|
76
|
+
tab-size: 4; /* 3 */
|
|
77
|
+
|
|
78
|
+
/* 字体栈 */
|
|
79
|
+
font-family: xaifont, Inter, system-ui, Avenir, Helvetica, Arial, ui-sans-serif,
|
|
80
|
+
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif; /* 4 */
|
|
81
|
+
|
|
82
|
+
font-feature-settings: normal;
|
|
83
|
+
font-variation-settings: normal;
|
|
84
|
+
-webkit-tap-highlight-color: transparent; /* 5 */
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Body 基础设置 */
|
|
88
|
+
body {
|
|
89
|
+
width: 100%;
|
|
90
|
+
height: 100%;
|
|
91
|
+
|
|
92
|
+
/* 滚动行为 */
|
|
93
|
+
overflow-y: scroll;
|
|
94
|
+
overflow-x: hidden;
|
|
95
|
+
|
|
96
|
+
/* 用户交互 */
|
|
97
|
+
user-select: none;
|
|
98
|
+
|
|
99
|
+
/* 背景设置 */
|
|
100
|
+
color: #fff;
|
|
101
|
+
background-color: #000;
|
|
102
|
+
background-attachment: fixed;
|
|
103
|
+
background-size: cover;
|
|
104
|
+
background-blend-mode: hard-light;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* React根元素 */
|
|
108
|
+
div#root {
|
|
109
|
+
width: 100%;
|
|
110
|
+
height: 100%;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* 全局激进重置 (Aggressive Global Reset)
|
|
114
|
+
注意:此处包含所有元素的过渡动画、文字阴影和背景默认行为。
|
|
115
|
+
这对性能有一定影响,属于特定视觉风格需求。
|
|
116
|
+
*/
|
|
117
|
+
*,
|
|
118
|
+
*::before,
|
|
119
|
+
*::after {
|
|
120
|
+
text-shadow: 0 var(--px) var(--px) #000;
|
|
121
|
+
user-select: inherit;
|
|
122
|
+
|
|
123
|
+
/* 背景图默认行为 */
|
|
124
|
+
background-repeat: no-repeat;
|
|
125
|
+
background-size: contain;
|
|
126
|
+
background-position: center center;
|
|
127
|
+
background-attachment: scroll;
|
|
128
|
+
|
|
129
|
+
/* 排版行为 */
|
|
130
|
+
text-align: justify;
|
|
131
|
+
vertical-align: baseline;
|
|
132
|
+
|
|
133
|
+
/* 换行行为 */
|
|
134
|
+
word-wrap: break-word;
|
|
135
|
+
word-break: break-all;
|
|
136
|
+
overflow-wrap: break-word;
|
|
137
|
+
white-space: normal;
|
|
138
|
+
|
|
139
|
+
/* 全局过渡动画 */
|
|
140
|
+
transition: all 0.1s linear;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* 选中态样式 */
|
|
144
|
+
*::selection {
|
|
145
|
+
background-color: #222;
|
|
146
|
+
color: #fff;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* =======================
|
|
150
|
+
4. 滚动条样式 (Scrollbars)
|
|
151
|
+
======================= */
|
|
152
|
+
|
|
153
|
+
/* WebKit 浏览器 (Chrome / Edge / Safari) */
|
|
154
|
+
::-webkit-scrollbar {
|
|
155
|
+
width: 8px; /* 垂直滚动条宽度 */
|
|
156
|
+
height: 8px; /* 水平滚动条高度 */
|
|
157
|
+
}
|
|
158
|
+
::-webkit-scrollbar-track {
|
|
159
|
+
background: #888; /* 轨道背景 */
|
|
160
|
+
}
|
|
161
|
+
::-webkit-scrollbar-thumb {
|
|
162
|
+
background-color: #ccc; /* 滑块颜色 */
|
|
163
|
+
border-radius: 9999px; /* 大圆角 */
|
|
164
|
+
border: 2px solid transparent; /*以此模拟内边距效果 */
|
|
165
|
+
background-clip: padding-box;
|
|
166
|
+
}
|
|
167
|
+
::-webkit-scrollbar-thumb:hover {
|
|
168
|
+
background-color: #fff; /* 悬停颜色 */
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* Firefox 浏览器 */
|
|
172
|
+
* {
|
|
173
|
+
scrollbar-width: thin; /* 细滚动条 */
|
|
174
|
+
scrollbar-color: #ccc #888; /* 滑块颜色 轨道背景 */
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* =======================
|
|
178
|
+
5. 排版与文本 (Typography)
|
|
179
|
+
======================= */
|
|
180
|
+
|
|
181
|
+
/* 重置标题字号和字重,以便由类名控制 */
|
|
182
|
+
h1,
|
|
183
|
+
h2,
|
|
184
|
+
h3,
|
|
185
|
+
h4,
|
|
186
|
+
h5,
|
|
187
|
+
h6 {
|
|
188
|
+
font-size: inherit;
|
|
189
|
+
font-weight: inherit;
|
|
190
|
+
user-select: text;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* 文本容器允许选择 */
|
|
194
|
+
p,
|
|
195
|
+
blockquote,
|
|
196
|
+
figure,
|
|
197
|
+
figcaption,
|
|
198
|
+
dl,
|
|
199
|
+
dt,
|
|
200
|
+
dd,
|
|
201
|
+
ol,
|
|
202
|
+
ul,
|
|
203
|
+
li {
|
|
204
|
+
user-select: text;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* 分割线重置 */
|
|
208
|
+
hr {
|
|
209
|
+
height: 0;
|
|
210
|
+
color: inherit;
|
|
211
|
+
border-top-width: 1em;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/* 缩写下划线样式 */
|
|
215
|
+
abbr:where([title]) {
|
|
216
|
+
-webkit-text-decoration: underline dotted;
|
|
217
|
+
text-decoration: underline dotted;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/* 链接样式重置 */
|
|
221
|
+
a {
|
|
222
|
+
color: inherit;
|
|
223
|
+
text-decoration: none; /* 移除下划线 */
|
|
224
|
+
-webkit-text-decoration: inherit;
|
|
225
|
+
border: 0;
|
|
226
|
+
user-select: text;
|
|
227
|
+
cursor: pointer;
|
|
228
|
+
}
|
|
229
|
+
a:hover,
|
|
230
|
+
a:active {
|
|
231
|
+
color: inherit;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/* 加粗标签标准化 */
|
|
235
|
+
b,
|
|
236
|
+
strong {
|
|
237
|
+
font-weight: bolder;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/* 代码字体统一化 */
|
|
241
|
+
code,
|
|
242
|
+
kbd,
|
|
243
|
+
samp,
|
|
244
|
+
pre {
|
|
245
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
|
|
246
|
+
'Courier New', monospace;
|
|
247
|
+
font-feature-settings: normal;
|
|
248
|
+
font-variation-settings: normal;
|
|
249
|
+
font-size: 1em;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* 小号字体 */
|
|
253
|
+
small {
|
|
254
|
+
font-size: 80%;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/* 上标与下标 (防止影响行高) */
|
|
258
|
+
sub,
|
|
259
|
+
sup {
|
|
260
|
+
font-size: 75%;
|
|
261
|
+
line-height: 0;
|
|
262
|
+
position: relative;
|
|
263
|
+
vertical-align: baseline;
|
|
264
|
+
}
|
|
265
|
+
sub {
|
|
266
|
+
bottom: -0.25em;
|
|
267
|
+
}
|
|
268
|
+
sup {
|
|
269
|
+
top: -0.5em;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/* =======================
|
|
273
|
+
6. 区块与布局元素 (Layout & Blocks)
|
|
274
|
+
======================= */
|
|
275
|
+
|
|
276
|
+
/* HTML5 块级元素重置 */
|
|
277
|
+
article,
|
|
278
|
+
section,
|
|
279
|
+
header,
|
|
280
|
+
aside,
|
|
281
|
+
footer,
|
|
282
|
+
nav,
|
|
283
|
+
main,
|
|
284
|
+
figure,
|
|
285
|
+
figcaption,
|
|
286
|
+
li {
|
|
287
|
+
display: block;
|
|
288
|
+
user-select: text;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/* 列表重置 */
|
|
292
|
+
ol,
|
|
293
|
+
ul,
|
|
294
|
+
menu {
|
|
295
|
+
list-style: none;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/* 详情摘要 */
|
|
299
|
+
summary {
|
|
300
|
+
display: list-item;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/* 表格重置 */
|
|
304
|
+
table {
|
|
305
|
+
border-collapse: collapse; /* 合并边框 */
|
|
306
|
+
border-spacing: 0;
|
|
307
|
+
text-indent: 0; /* 修复 Chrome/Safari 表格缩进问题 */
|
|
308
|
+
border-color: inherit; /* 继承边框颜色 */
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/* =======================
|
|
312
|
+
7. 媒体元素 (Media: Images & Video)
|
|
313
|
+
======================= */
|
|
314
|
+
|
|
315
|
+
/* 基础行内块设定 */
|
|
316
|
+
span,
|
|
317
|
+
img {
|
|
318
|
+
display: inline-block;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/* 媒体元素块级化与响应式
|
|
322
|
+
注意:这里的 display: block 会覆盖上面 img 的 inline-block,
|
|
323
|
+
除非有更具体的选择器。
|
|
324
|
+
*/
|
|
325
|
+
img,
|
|
326
|
+
svg,
|
|
327
|
+
video,
|
|
328
|
+
canvas,
|
|
329
|
+
audio,
|
|
330
|
+
iframe,
|
|
331
|
+
embed,
|
|
332
|
+
object {
|
|
333
|
+
display: block;
|
|
334
|
+
vertical-align: middle;
|
|
335
|
+
border: 0;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/* 响应式尺寸限制 */
|
|
339
|
+
img,
|
|
340
|
+
video {
|
|
341
|
+
max-width: 100%;
|
|
342
|
+
height: auto;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/* =======================
|
|
346
|
+
8. 表单元素 (Forms)
|
|
347
|
+
======================= */
|
|
348
|
+
|
|
349
|
+
/* 基础表单字体与重置 */
|
|
350
|
+
button,
|
|
351
|
+
input,
|
|
352
|
+
select,
|
|
353
|
+
optgroup,
|
|
354
|
+
textarea,
|
|
355
|
+
::file-selector-button {
|
|
356
|
+
font: inherit;
|
|
357
|
+
font-feature-settings: inherit;
|
|
358
|
+
font-variation-settings: inherit;
|
|
359
|
+
letter-spacing: inherit;
|
|
360
|
+
color: inherit;
|
|
361
|
+
border-radius: 0;
|
|
362
|
+
background-color: transparent;
|
|
363
|
+
opacity: 1;
|
|
364
|
+
outline: none; /* 移除默认轮廓线 */
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/* 文本域设置 */
|
|
368
|
+
textarea {
|
|
369
|
+
resize: none; /* 禁止拖拽改变大小 */
|
|
370
|
+
overflow-y: scroll;
|
|
371
|
+
overflow-x: auto;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/* 按钮与输入框的外观修正 (iOS) */
|
|
375
|
+
button,
|
|
376
|
+
input:where([type='button'], [type='reset'], [type='submit']),
|
|
377
|
+
::file-selector-button {
|
|
378
|
+
appearance: button;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/* 恢复 Select 中 optgroup 的字重 */
|
|
382
|
+
:where(select:is([multiple], [size])) optgroup {
|
|
383
|
+
font-weight: bolder;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/* 恢复 Select 中 option 的缩进 */
|
|
387
|
+
:where(select:is([multiple], [size])) optgroup option {
|
|
388
|
+
padding-inline-start: 20px;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/* 文件上传按钮间距 */
|
|
392
|
+
::file-selector-button {
|
|
393
|
+
margin-inline-end: 4px;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/* Firefox Focus 样式 */
|
|
397
|
+
:-moz-focusring {
|
|
398
|
+
outline: auto;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/* 进度条垂直对齐 */
|
|
402
|
+
progress {
|
|
403
|
+
vertical-align: baseline;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/* Placeholder (占位符) 样式
|
|
407
|
+
修复 Firefox 透明度问题,并设置颜色
|
|
408
|
+
*/
|
|
409
|
+
::placeholder {
|
|
410
|
+
opacity: 1;
|
|
411
|
+
}
|
|
412
|
+
@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
|
|
413
|
+
::placeholder {
|
|
414
|
+
color: color-mix(in oklab, currentcolor 50%, transparent);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/* Webkit 表单控件特定修饰清除
|
|
419
|
+
*/
|
|
420
|
+
|
|
421
|
+
/* 移除 macOS Chrome/Safari 的搜索框装饰 */
|
|
422
|
+
::-webkit-search-decoration {
|
|
423
|
+
-webkit-appearance: none;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/* 修复 iOS Safari 日期时间输入框高度和对齐 */
|
|
427
|
+
::-webkit-date-and-time-value {
|
|
428
|
+
min-height: 1lh;
|
|
429
|
+
text-align: inherit;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
/* macOS Safari 日期输入框显示修正 */
|
|
433
|
+
::-webkit-datetime-edit {
|
|
434
|
+
display: inline-flex;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/* 清除日期输入框的多余 padding */
|
|
438
|
+
::-webkit-datetime-edit-fields-wrapper {
|
|
439
|
+
padding: 0;
|
|
440
|
+
}
|
|
441
|
+
::-webkit-datetime-edit,
|
|
442
|
+
::-webkit-datetime-edit-year-field,
|
|
443
|
+
::-webkit-datetime-edit-month-field,
|
|
444
|
+
::-webkit-datetime-edit-day-field,
|
|
445
|
+
::-webkit-datetime-edit-hour-field,
|
|
446
|
+
::-webkit-datetime-edit-minute-field,
|
|
447
|
+
::-webkit-datetime-edit-second-field,
|
|
448
|
+
::-webkit-datetime-edit-millisecond-field,
|
|
449
|
+
::-webkit-datetime-edit-meridiem-field {
|
|
450
|
+
padding-block: 0;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/* 修复 Chrome 中 datalist 下拉箭头对齐 */
|
|
454
|
+
::-webkit-calendar-picker-indicator {
|
|
455
|
+
line-height: 1;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/* 修复 Safari 中数字输入框按钮的光标 */
|
|
459
|
+
::-webkit-inner-spin-button,
|
|
460
|
+
::-webkit-outer-spin-button {
|
|
461
|
+
height: auto;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/* 移除 Firefox 中无效输入的额外样式 */
|
|
465
|
+
:-moz-ui-invalid {
|
|
466
|
+
box-shadow: none;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
/* =======================
|
|
470
|
+
9. 工具类与杂项 (Utilities & Misc)
|
|
471
|
+
======================= */
|
|
472
|
+
|
|
473
|
+
/* 强制隐藏 hidden 属性元素 */
|
|
474
|
+
[hidden]:where(:not([hidden='until-found'])) {
|
|
475
|
+
display: none !important;
|
|
476
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,120 @@
|
|
|
1
|
-
export * from './Dozy.js';
|
|
2
|
-
export * from './Functions.js';
|
|
3
|
-
export * from './WebFunctions.js';
|
|
4
|
-
export * from './Store.js';
|
|
5
|
-
export * from 'axios';
|
|
6
1
|
import axios from 'axios';
|
|
7
|
-
export { axios };
|
|
8
2
|
import l from 'lodash';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export
|
|
12
|
-
export
|
|
3
|
+
|
|
4
|
+
export type LogFilter = (msg: string) => boolean;
|
|
5
|
+
export type DozyConfigItem = {};
|
|
6
|
+
export type DozyConfig = Partial<DozyConfigItem>;
|
|
7
|
+
declare class Dozy {
|
|
8
|
+
config: DozyConfigItem;
|
|
9
|
+
}
|
|
10
|
+
export declare const dozy: Dozy;
|
|
11
|
+
export declare function $isObject(value: unknown): value is Record<string, unknown>;
|
|
12
|
+
export declare function $deepClone<T>(value: T): T;
|
|
13
|
+
export declare function $capitalize(s: string): string;
|
|
14
|
+
export declare function $clamp(n: number, min: number, max: number): number;
|
|
15
|
+
export declare function web$setPathTarget(s: string): void;
|
|
16
|
+
export declare function web$pathStartData(): {
|
|
17
|
+
href: string;
|
|
18
|
+
origin: string;
|
|
19
|
+
target: string;
|
|
20
|
+
host: string;
|
|
21
|
+
path: string;
|
|
22
|
+
search: string;
|
|
23
|
+
standardJump: boolean;
|
|
24
|
+
};
|
|
25
|
+
export declare function web$enableProdProtector(): void;
|
|
26
|
+
export declare function web$enableHttpsRedirect(): void;
|
|
27
|
+
export declare function web$redirectToDomain(newDomain: string): void;
|
|
28
|
+
export declare const $jsonParse: (text: string, reviver?: (this: any, key: string, value: any) => any) => any;
|
|
29
|
+
export declare const $jsonStringify: {
|
|
30
|
+
(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
31
|
+
(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
|
|
32
|
+
};
|
|
33
|
+
export declare const $keys: <T extends object>(obj: T) => (keyof T & string)[];
|
|
34
|
+
export declare const $entries: <T extends object>(obj: T) => [
|
|
35
|
+
keyof T & string,
|
|
36
|
+
T[keyof T]
|
|
37
|
+
][];
|
|
38
|
+
export declare const $values: {
|
|
39
|
+
<T>(o: {
|
|
40
|
+
[s: string]: T;
|
|
41
|
+
} | ArrayLike<T>): T[];
|
|
42
|
+
(o: {}): any[];
|
|
43
|
+
};
|
|
44
|
+
export declare const $assign: {
|
|
45
|
+
<T extends {}, U>(target: T, source: U): T & U;
|
|
46
|
+
<T extends {}, U, V>(target: T, source1: U, source2: V): T & U & V;
|
|
47
|
+
<T extends {}, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
|
|
48
|
+
(target: object, ...sources: any[]): any;
|
|
49
|
+
};
|
|
50
|
+
export declare const $defineProperty: <T>(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>) => T;
|
|
51
|
+
export declare const $freeze: {
|
|
52
|
+
<T extends Function>(f: T): T;
|
|
53
|
+
<T extends {
|
|
54
|
+
[idx: string]: U | null | undefined | object;
|
|
55
|
+
}, U extends string | bigint | number | boolean | symbol>(o: T): Readonly<T>;
|
|
56
|
+
<T>(o: T): Readonly<T>;
|
|
57
|
+
};
|
|
58
|
+
export declare const $is: (value1: any, value2: any) => boolean;
|
|
59
|
+
export declare const $arrayFrom: {
|
|
60
|
+
<T>(arrayLike: ArrayLike<T>): T[];
|
|
61
|
+
<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
62
|
+
<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
63
|
+
<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
64
|
+
};
|
|
65
|
+
export declare const $arrayIsArray: (arg: any) => arg is any[];
|
|
66
|
+
export declare const $stringFromCharCode: (...codes: number[]) => string;
|
|
67
|
+
export declare const $stringFromCodePoint: (...codePoints: number[]) => string;
|
|
68
|
+
export declare const $numberIsNaN: (number: unknown) => boolean;
|
|
69
|
+
export declare const $numberIsFinite: (number: unknown) => boolean;
|
|
70
|
+
export declare const $math: Math;
|
|
71
|
+
export declare const $now: () => number;
|
|
72
|
+
export declare const $date: DateConstructor;
|
|
73
|
+
export declare const $promise: PromiseConstructor;
|
|
74
|
+
export declare const $URL: {
|
|
75
|
+
new (url: string | URL, base?: string | URL): URL;
|
|
76
|
+
prototype: URL;
|
|
77
|
+
canParse(url: string | URL, base?: string | URL): boolean;
|
|
78
|
+
createObjectURL(obj: Blob | MediaSource): string;
|
|
79
|
+
parse(url: string | URL, base?: string | URL): URL | null;
|
|
80
|
+
revokeObjectURL(url: string): void;
|
|
81
|
+
};
|
|
82
|
+
export declare const $URLSearchParams: {
|
|
83
|
+
new (init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
|
|
84
|
+
prototype: URLSearchParams;
|
|
85
|
+
};
|
|
86
|
+
export declare const $clone: typeof structuredClone;
|
|
87
|
+
export declare const $window: (Window & typeof globalThis) | undefined;
|
|
88
|
+
export declare const $document: Document | undefined;
|
|
89
|
+
export declare const $location: Location | undefined;
|
|
90
|
+
export declare const $open: (((url?: string | URL, target?: string, features?: string) => WindowProxy | null) & typeof open) | undefined;
|
|
91
|
+
export declare const $setTimeout: (((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) & typeof setTimeout) | undefined;
|
|
92
|
+
export declare const $clearTimeout: (((id: number | undefined) => void) & typeof clearTimeout) | undefined;
|
|
93
|
+
export declare const $setInterval: (((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) & typeof setInterval) | undefined;
|
|
94
|
+
export declare const $clearInterval: (((id: number | undefined) => void) & typeof clearInterval) | undefined;
|
|
95
|
+
export declare const $fetch: typeof fetch | undefined;
|
|
96
|
+
export declare const $Headers: {
|
|
97
|
+
new (init?: HeadersInit): Headers;
|
|
98
|
+
prototype: Headers;
|
|
99
|
+
} | undefined;
|
|
100
|
+
export declare const $Request: {
|
|
101
|
+
new (input: RequestInfo | URL, init?: RequestInit): Request;
|
|
102
|
+
prototype: Request;
|
|
103
|
+
} | undefined;
|
|
104
|
+
export declare const $Response: {
|
|
105
|
+
new (body?: BodyInit | null, init?: ResponseInit): Response;
|
|
106
|
+
prototype: Response;
|
|
107
|
+
error(): Response;
|
|
108
|
+
json(data: any, init?: ResponseInit): Response;
|
|
109
|
+
redirect(url: string | URL, status?: number): Response;
|
|
110
|
+
} | undefined;
|
|
111
|
+
export declare const $crypto: Crypto | undefined;
|
|
112
|
+
export declare const DOZY = "1.0.16";
|
|
113
|
+
export * from "axios";
|
|
114
|
+
|
|
115
|
+
export {
|
|
116
|
+
axios,
|
|
117
|
+
l,
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA;AAE1B,cAAc,OAAO,CAAA;AACrB,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EAAE,CAAC,EAAE,CAAA;AAEZ,OAAO,QAAQ,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,CAAA;AAEnB,eAAO,MAAM,IAAI,WAAW,CAAA"}
|