@weapp-tailwindcss/reset 0.1.6 → 0.1.7-dev.20261117.1
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/index.d.cts +64 -0
- package/package.json +19 -6
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
type ResetPreset = 'minimal' | 'form' | 'content' | 'media' | 'all';
|
|
2
|
+
type BuiltInResetName = 'buttonReset' | 'imageReset' | 'inputReset' | 'textareaReset' | 'listReset' | 'navigatorReset' | 'videoReset';
|
|
3
|
+
interface ResetOptions {
|
|
4
|
+
/**
|
|
5
|
+
* 启用一组内置 reset 预设;默认不传时保持最小行为,仅注入 button/image。
|
|
6
|
+
*/
|
|
7
|
+
preset?: ResetPreset | ResetPreset[];
|
|
8
|
+
/**
|
|
9
|
+
* 控制 `button` reset 的注入与选择器,传入 `false` 可跳过该规则。
|
|
10
|
+
*/
|
|
11
|
+
buttonReset?: false | ResetConfig;
|
|
12
|
+
/**
|
|
13
|
+
* 控制 `image` reset(同时覆盖 `<image>` 与 `<img>`)。
|
|
14
|
+
*/
|
|
15
|
+
imageReset?: false | ResetConfig;
|
|
16
|
+
/**
|
|
17
|
+
* 控制常见输入框 reset(`input`)。
|
|
18
|
+
*/
|
|
19
|
+
inputReset?: false | ResetConfig;
|
|
20
|
+
/**
|
|
21
|
+
* 控制多行输入框 reset(`textarea`)。
|
|
22
|
+
*/
|
|
23
|
+
textareaReset?: false | ResetConfig;
|
|
24
|
+
/**
|
|
25
|
+
* 控制列表 reset(`ul` / `ol`)。
|
|
26
|
+
*/
|
|
27
|
+
listReset?: false | ResetConfig;
|
|
28
|
+
/**
|
|
29
|
+
* 控制链接 reset(`navigator` / `a`)。
|
|
30
|
+
*/
|
|
31
|
+
navigatorReset?: false | ResetConfig;
|
|
32
|
+
/**
|
|
33
|
+
* 控制 `video` reset。
|
|
34
|
+
*/
|
|
35
|
+
videoReset?: false | ResetConfig;
|
|
36
|
+
/**
|
|
37
|
+
* 额外的 reset 规则,可根据业务自定义。
|
|
38
|
+
*/
|
|
39
|
+
extraResets?: ResetConfig[];
|
|
40
|
+
}
|
|
41
|
+
interface ResetConfig {
|
|
42
|
+
selectors?: string[];
|
|
43
|
+
declarations?: Record<string, string | number | false | null | undefined>;
|
|
44
|
+
pseudo?: Record<string, string | number | false | null | undefined>;
|
|
45
|
+
}
|
|
46
|
+
export interface ResetPluginResult {
|
|
47
|
+
handler: (api: {
|
|
48
|
+
addBase: (base: Record<string, Record<string, string>>) => void;
|
|
49
|
+
}) => void;
|
|
50
|
+
config?: Record<string, unknown>;
|
|
51
|
+
}
|
|
52
|
+
interface ResetPlugin {
|
|
53
|
+
(options?: ResetOptions): ResetPluginResult;
|
|
54
|
+
__isOptionsFunction: true;
|
|
55
|
+
}
|
|
56
|
+
interface ResetPlugin {
|
|
57
|
+
(options?: ResetOptions): {
|
|
58
|
+
handler: unknown;
|
|
59
|
+
config?: unknown;
|
|
60
|
+
};
|
|
61
|
+
__isOptionsFunction: true;
|
|
62
|
+
}
|
|
63
|
+
export declare const reset: ResetPlugin;
|
|
64
|
+
export { type BuiltInResetName, type ResetConfig, type ResetOptions, ResetPlugin, type ResetPreset, reset as default };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weapp-tailwindcss/reset",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.7-dev.20261117.1",
|
|
5
5
|
"description": "Cross-platform reset styles for weapp-tailwindcss projects. weapp-tailwindcss 项目的跨端 reset 样式资源。",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -26,9 +26,14 @@
|
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"exports": {
|
|
28
28
|
".": {
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
"import": {
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"default": "./dist/index.js"
|
|
32
|
+
},
|
|
33
|
+
"require": {
|
|
34
|
+
"types": "./dist/index.d.cts",
|
|
35
|
+
"default": "./dist/index.cjs"
|
|
36
|
+
}
|
|
32
37
|
},
|
|
33
38
|
"./*": "./*",
|
|
34
39
|
"./package.json": "./package.json"
|
|
@@ -53,11 +58,19 @@
|
|
|
53
58
|
},
|
|
54
59
|
"publishConfig": {
|
|
55
60
|
"access": "public",
|
|
56
|
-
"registry": "https://registry.npmjs.org"
|
|
61
|
+
"registry": "https://registry.npmjs.org/",
|
|
62
|
+
"tag": "snapshot-nightly"
|
|
63
|
+
},
|
|
64
|
+
"repoctlSnapshot": {
|
|
65
|
+
"kind": "nightly",
|
|
66
|
+
"commit": "06815a1e532fd96bd3f8a73388c4b8b5788c817d",
|
|
67
|
+
"buildId": "44004731642-1",
|
|
68
|
+
"identityKey": "862d5b2edc889f9f141a37385bdde3217931e28f4fdf9ac0f32d4b4ca814bf1c",
|
|
69
|
+
"tag": "snapshot-nightly"
|
|
57
70
|
},
|
|
58
71
|
"scripts": {
|
|
59
72
|
"build": "tsdown",
|
|
60
73
|
"test": "vitest run",
|
|
61
74
|
"test:dev": "vitest"
|
|
62
75
|
}
|
|
63
|
-
}
|
|
76
|
+
}
|