@weapp-tailwindcss/runtime 0.0.0 → 0.1.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/README.md +60 -0
- package/dist/index.cjs +80 -6
- package/dist/index.d.cts +45 -3
- package/dist/index.d.mts +45 -3
- package/dist/index.mjs +77 -5
- package/package.json +25 -7
package/README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# @weapp-tailwindcss/runtime
|
|
2
|
+
|
|
3
|
+
`@weapp-tailwindcss/runtime` 提供了一套在小程序环境中运行 Tailwind 相关工具时所需的“公共层”——包含统一的 `escape/unescape` 转换器、`clsx` 封装、`weappTwIgnore`、以及帮助将这些能力注入第三方库的 `createRuntimeFactory`。
|
|
4
|
+
|
|
5
|
+
- 📦 面向 `tailwind-merge`/`tailwind-variants`/`cva` 等运行时库的公共依赖
|
|
6
|
+
- 🔁 自动共享 escape 映射,避免多处维护
|
|
7
|
+
- 🧩 暴露 `weappTwIgnore`(`String.raw` 包装),供第三方消费
|
|
8
|
+
|
|
9
|
+
## 安装
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm add @weapp-tailwindcss/runtime
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## 快速上手
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { createRuntimeFactory } from '@weapp-tailwindcss/runtime'
|
|
19
|
+
import { createTailwindMerge, extendTailwindMerge, twJoin, twMerge } from 'tailwind-merge'
|
|
20
|
+
|
|
21
|
+
const create = createRuntimeFactory({
|
|
22
|
+
createTailwindMerge,
|
|
23
|
+
extendTailwindMerge,
|
|
24
|
+
twJoin,
|
|
25
|
+
twMerge,
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
const runtime = create()
|
|
29
|
+
|
|
30
|
+
runtime.twMerge('text-[#ececec]', 'text-[#ECECEC]') // => 自动 escape 的结果
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 自定义 escape/unescape
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import { createRuntimeFactory } from '@weapp-tailwindcss/runtime'
|
|
37
|
+
import { createTailwindMerge } from 'tailwind-merge'
|
|
38
|
+
|
|
39
|
+
const create = createRuntimeFactory({
|
|
40
|
+
createTailwindMerge,
|
|
41
|
+
extendTailwindMerge,
|
|
42
|
+
twJoin,
|
|
43
|
+
twMerge,
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
const custom = create({
|
|
47
|
+
escape: false, // 关闭最终 escape,适合 Web SSR
|
|
48
|
+
unescape: {
|
|
49
|
+
map: { '#': '__hash__' },
|
|
50
|
+
},
|
|
51
|
+
})
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## 其他导出
|
|
55
|
+
|
|
56
|
+
- `resolveTransformers`:仅想复用 escape/unescape 时可以直接调用
|
|
57
|
+
- `clsx` / `ClsxFn` / `ClassValue`:再导出一次,避免子包重复安装 `clsx`
|
|
58
|
+
- `weappTwIgnore`:模板字符串标签,是 `String.raw` 的别名,方便外部包跳过 weapp 转义
|
|
59
|
+
|
|
60
|
+
更多细节见官方文档:<https://tw.icebreaker.top/docs/community/merge/runtime-api>
|
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,84 @@
|
|
|
1
|
+
let clsx = require("clsx");
|
|
2
|
+
let __weapp_core_escape = require("@weapp-core/escape");
|
|
1
3
|
|
|
2
|
-
//#region src/
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
//#region src/transformers.ts
|
|
5
|
+
const identity = (value) => value;
|
|
6
|
+
function isConfig(value) {
|
|
7
|
+
return typeof value === "object" && value !== null;
|
|
8
|
+
}
|
|
9
|
+
function mergeWithDefaultMap(map) {
|
|
10
|
+
if (!map) return;
|
|
11
|
+
if (map === __weapp_core_escape.MappingChars2String) return __weapp_core_escape.MappingChars2String;
|
|
12
|
+
return {
|
|
13
|
+
...__weapp_core_escape.MappingChars2String,
|
|
14
|
+
...map
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function resolveSharedMap(options) {
|
|
18
|
+
const { escape, unescape } = options ?? {};
|
|
19
|
+
if (isConfig(escape) && escape.map) return mergeWithDefaultMap(escape.map);
|
|
20
|
+
if (isConfig(unescape) && unescape.map) return mergeWithDefaultMap(unescape.map);
|
|
21
|
+
return __weapp_core_escape.MappingChars2String;
|
|
22
|
+
}
|
|
23
|
+
function resolveTransformers(options) {
|
|
24
|
+
const sharedMap = resolveSharedMap(options);
|
|
25
|
+
const escapeConfig = options?.escape;
|
|
26
|
+
const unescapeConfig = options?.unescape;
|
|
27
|
+
const escapeEnabled = escapeConfig !== false;
|
|
28
|
+
const unescapeEnabled = unescapeConfig !== false;
|
|
29
|
+
let escapeOptions;
|
|
30
|
+
if (escapeEnabled) if (isConfig(escapeConfig)) escapeOptions = {
|
|
31
|
+
...escapeConfig,
|
|
32
|
+
map: mergeWithDefaultMap(escapeConfig.map) ?? sharedMap
|
|
33
|
+
};
|
|
34
|
+
else escapeOptions = { map: sharedMap };
|
|
35
|
+
let unescapeOptions;
|
|
36
|
+
if (unescapeEnabled) if (isConfig(unescapeConfig)) unescapeOptions = {
|
|
37
|
+
...unescapeConfig,
|
|
38
|
+
map: mergeWithDefaultMap(unescapeConfig.map) ?? sharedMap
|
|
39
|
+
};
|
|
40
|
+
else unescapeOptions = { map: sharedMap };
|
|
41
|
+
return {
|
|
42
|
+
escape: escapeEnabled ? (value) => (0, __weapp_core_escape.escape)(value, escapeOptions) : identity,
|
|
43
|
+
unescape: unescapeEnabled ? (value) => (0, __weapp_core_escape.unescape)(value, unescapeOptions) : identity
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/create-runtime.ts
|
|
49
|
+
function wrapClassAggregator(fn, transformers) {
|
|
50
|
+
return (...inputs) => {
|
|
51
|
+
const normalized = transformers.unescape((0, clsx.clsx)(...inputs));
|
|
52
|
+
return transformers.escape(fn(normalized));
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function wrapFactory(factory, transformers) {
|
|
56
|
+
return (...args) => {
|
|
57
|
+
return wrapClassAggregator(factory(...args), transformers);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function createRuntimeFactory(options) {
|
|
61
|
+
const { version, twMerge: twMergeImpl, twJoin: twJoinImpl, extendTailwindMerge: extendFactory, createTailwindMerge: createFactory } = options;
|
|
62
|
+
return function createRuntime(createOptions) {
|
|
63
|
+
const transformers = resolveTransformers(createOptions);
|
|
64
|
+
return {
|
|
65
|
+
version,
|
|
66
|
+
twMerge: wrapClassAggregator(twMergeImpl, transformers),
|
|
67
|
+
twJoin: wrapClassAggregator(twJoinImpl, transformers),
|
|
68
|
+
extendTailwindMerge: wrapFactory(extendFactory, transformers),
|
|
69
|
+
createTailwindMerge: wrapFactory(createFactory, transformers)
|
|
70
|
+
};
|
|
71
|
+
};
|
|
5
72
|
}
|
|
6
|
-
const VERSION = "0.0.0";
|
|
7
73
|
|
|
8
74
|
//#endregion
|
|
9
|
-
|
|
10
|
-
|
|
75
|
+
//#region src/index.ts
|
|
76
|
+
const weappTwIgnoreImpl = String.raw;
|
|
77
|
+
const weappTwIgnore = weappTwIgnoreImpl;
|
|
78
|
+
|
|
79
|
+
//#endregion
|
|
80
|
+
exports.clsx = clsx.clsx;
|
|
81
|
+
exports.createRuntimeFactory = createRuntimeFactory;
|
|
82
|
+
exports.identity = identity;
|
|
83
|
+
exports.resolveTransformers = resolveTransformers;
|
|
84
|
+
exports.weappTwIgnore = weappTwIgnore;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
|
+
import { ClassValue, ClassValue as ClassValue$1, clsx as clsxFn } from "clsx";
|
|
2
|
+
import { EscapeOptions, UnescapeOptions } from "@weapp-core/escape";
|
|
3
|
+
|
|
4
|
+
//#region src/types.d.ts
|
|
5
|
+
type EscapeConfig = false | EscapeOptions;
|
|
6
|
+
type UnescapeConfig = false | UnescapeOptions;
|
|
7
|
+
interface CreateOptions {
|
|
8
|
+
escape?: EscapeConfig;
|
|
9
|
+
unescape?: UnescapeConfig;
|
|
10
|
+
}
|
|
11
|
+
interface Transformers {
|
|
12
|
+
escape: (value: string) => string;
|
|
13
|
+
unescape: (value: string) => string;
|
|
14
|
+
}
|
|
15
|
+
type TailwindMergeLibraryFn = (...inputs: any[]) => string;
|
|
16
|
+
type TailwindMergeRuntime = (...inputs: ClassValue$1[]) => string;
|
|
17
|
+
type TailwindMergeFactory<TFactory extends (...args: any[]) => TailwindMergeLibraryFn> = (...args: Parameters<TFactory>) => TailwindMergeRuntime;
|
|
18
|
+
type TailwindMergeVersion = 2 | 3;
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/create-runtime.d.ts
|
|
21
|
+
type TailwindMergeFactoryFn = (...args: any[]) => TailwindMergeLibraryFn;
|
|
22
|
+
interface CreateRuntimeFactoryOptions<TTwMerge extends TailwindMergeLibraryFn, TTwJoin extends TailwindMergeLibraryFn, TExtendFactory extends TailwindMergeFactoryFn, TCreateFactory extends TailwindMergeFactoryFn> {
|
|
23
|
+
version: TailwindMergeVersion;
|
|
24
|
+
twMerge: TTwMerge;
|
|
25
|
+
twJoin: TTwJoin;
|
|
26
|
+
extendTailwindMerge: TExtendFactory;
|
|
27
|
+
createTailwindMerge: TCreateFactory;
|
|
28
|
+
}
|
|
29
|
+
declare function createRuntimeFactory<TTwMerge extends TailwindMergeLibraryFn, TTwJoin extends TailwindMergeLibraryFn, TExtendFactory extends TailwindMergeFactoryFn, TCreateFactory extends TailwindMergeFactoryFn>(options: CreateRuntimeFactoryOptions<TTwMerge, TTwJoin, TExtendFactory, TCreateFactory>): (createOptions?: CreateOptions) => {
|
|
30
|
+
version: TailwindMergeVersion;
|
|
31
|
+
twMerge: TailwindMergeRuntime;
|
|
32
|
+
twJoin: TailwindMergeRuntime;
|
|
33
|
+
extendTailwindMerge: TailwindMergeFactory<TExtendFactory>;
|
|
34
|
+
createTailwindMerge: TailwindMergeFactory<TCreateFactory>;
|
|
35
|
+
};
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/transformers.d.ts
|
|
38
|
+
declare const identity: (value: string) => string;
|
|
39
|
+
declare function resolveTransformers(options?: CreateOptions): Transformers;
|
|
40
|
+
//#endregion
|
|
1
41
|
//#region src/index.d.ts
|
|
2
|
-
declare
|
|
3
|
-
|
|
42
|
+
declare const weappTwIgnore: (template: {
|
|
43
|
+
raw: readonly string[] | ArrayLike<string>;
|
|
44
|
+
}, ...substitutions: any[]) => string;
|
|
45
|
+
type ClsxFn = typeof clsxFn;
|
|
4
46
|
//#endregion
|
|
5
|
-
export {
|
|
47
|
+
export { type ClassValue, ClsxFn, type CreateOptions, type EscapeConfig, type TailwindMergeFactory, type TailwindMergeLibraryFn, type TailwindMergeRuntime, type TailwindMergeVersion, type Transformers, type UnescapeConfig, clsxFn as clsx, createRuntimeFactory, identity, resolveTransformers, weappTwIgnore };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
|
+
import { ClassValue, ClassValue as ClassValue$1, clsx as clsxFn } from "clsx";
|
|
2
|
+
import { EscapeOptions, UnescapeOptions } from "@weapp-core/escape";
|
|
3
|
+
|
|
4
|
+
//#region src/types.d.ts
|
|
5
|
+
type EscapeConfig = false | EscapeOptions;
|
|
6
|
+
type UnescapeConfig = false | UnescapeOptions;
|
|
7
|
+
interface CreateOptions {
|
|
8
|
+
escape?: EscapeConfig;
|
|
9
|
+
unescape?: UnescapeConfig;
|
|
10
|
+
}
|
|
11
|
+
interface Transformers {
|
|
12
|
+
escape: (value: string) => string;
|
|
13
|
+
unescape: (value: string) => string;
|
|
14
|
+
}
|
|
15
|
+
type TailwindMergeLibraryFn = (...inputs: any[]) => string;
|
|
16
|
+
type TailwindMergeRuntime = (...inputs: ClassValue$1[]) => string;
|
|
17
|
+
type TailwindMergeFactory<TFactory extends (...args: any[]) => TailwindMergeLibraryFn> = (...args: Parameters<TFactory>) => TailwindMergeRuntime;
|
|
18
|
+
type TailwindMergeVersion = 2 | 3;
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/create-runtime.d.ts
|
|
21
|
+
type TailwindMergeFactoryFn = (...args: any[]) => TailwindMergeLibraryFn;
|
|
22
|
+
interface CreateRuntimeFactoryOptions<TTwMerge extends TailwindMergeLibraryFn, TTwJoin extends TailwindMergeLibraryFn, TExtendFactory extends TailwindMergeFactoryFn, TCreateFactory extends TailwindMergeFactoryFn> {
|
|
23
|
+
version: TailwindMergeVersion;
|
|
24
|
+
twMerge: TTwMerge;
|
|
25
|
+
twJoin: TTwJoin;
|
|
26
|
+
extendTailwindMerge: TExtendFactory;
|
|
27
|
+
createTailwindMerge: TCreateFactory;
|
|
28
|
+
}
|
|
29
|
+
declare function createRuntimeFactory<TTwMerge extends TailwindMergeLibraryFn, TTwJoin extends TailwindMergeLibraryFn, TExtendFactory extends TailwindMergeFactoryFn, TCreateFactory extends TailwindMergeFactoryFn>(options: CreateRuntimeFactoryOptions<TTwMerge, TTwJoin, TExtendFactory, TCreateFactory>): (createOptions?: CreateOptions) => {
|
|
30
|
+
version: TailwindMergeVersion;
|
|
31
|
+
twMerge: TailwindMergeRuntime;
|
|
32
|
+
twJoin: TailwindMergeRuntime;
|
|
33
|
+
extendTailwindMerge: TailwindMergeFactory<TExtendFactory>;
|
|
34
|
+
createTailwindMerge: TailwindMergeFactory<TCreateFactory>;
|
|
35
|
+
};
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/transformers.d.ts
|
|
38
|
+
declare const identity: (value: string) => string;
|
|
39
|
+
declare function resolveTransformers(options?: CreateOptions): Transformers;
|
|
40
|
+
//#endregion
|
|
1
41
|
//#region src/index.d.ts
|
|
2
|
-
declare
|
|
3
|
-
|
|
42
|
+
declare const weappTwIgnore: (template: {
|
|
43
|
+
raw: readonly string[] | ArrayLike<string>;
|
|
44
|
+
}, ...substitutions: any[]) => string;
|
|
45
|
+
type ClsxFn = typeof clsxFn;
|
|
4
46
|
//#endregion
|
|
5
|
-
export {
|
|
47
|
+
export { type ClassValue, ClsxFn, type CreateOptions, type EscapeConfig, type TailwindMergeFactory, type TailwindMergeLibraryFn, type TailwindMergeRuntime, type TailwindMergeVersion, type Transformers, type UnescapeConfig, clsxFn as clsx, createRuntimeFactory, identity, resolveTransformers, weappTwIgnore };
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,80 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { clsx, clsx as clsxFn } from "clsx";
|
|
2
|
+
import { MappingChars2String, escape, unescape } from "@weapp-core/escape";
|
|
3
|
+
|
|
4
|
+
//#region src/transformers.ts
|
|
5
|
+
const identity = (value) => value;
|
|
6
|
+
function isConfig(value) {
|
|
7
|
+
return typeof value === "object" && value !== null;
|
|
8
|
+
}
|
|
9
|
+
function mergeWithDefaultMap(map) {
|
|
10
|
+
if (!map) return;
|
|
11
|
+
if (map === MappingChars2String) return MappingChars2String;
|
|
12
|
+
return {
|
|
13
|
+
...MappingChars2String,
|
|
14
|
+
...map
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function resolveSharedMap(options) {
|
|
18
|
+
const { escape: escape$1, unescape: unescape$1 } = options ?? {};
|
|
19
|
+
if (isConfig(escape$1) && escape$1.map) return mergeWithDefaultMap(escape$1.map);
|
|
20
|
+
if (isConfig(unescape$1) && unescape$1.map) return mergeWithDefaultMap(unescape$1.map);
|
|
21
|
+
return MappingChars2String;
|
|
4
22
|
}
|
|
5
|
-
|
|
23
|
+
function resolveTransformers(options) {
|
|
24
|
+
const sharedMap = resolveSharedMap(options);
|
|
25
|
+
const escapeConfig = options?.escape;
|
|
26
|
+
const unescapeConfig = options?.unescape;
|
|
27
|
+
const escapeEnabled = escapeConfig !== false;
|
|
28
|
+
const unescapeEnabled = unescapeConfig !== false;
|
|
29
|
+
let escapeOptions;
|
|
30
|
+
if (escapeEnabled) if (isConfig(escapeConfig)) escapeOptions = {
|
|
31
|
+
...escapeConfig,
|
|
32
|
+
map: mergeWithDefaultMap(escapeConfig.map) ?? sharedMap
|
|
33
|
+
};
|
|
34
|
+
else escapeOptions = { map: sharedMap };
|
|
35
|
+
let unescapeOptions;
|
|
36
|
+
if (unescapeEnabled) if (isConfig(unescapeConfig)) unescapeOptions = {
|
|
37
|
+
...unescapeConfig,
|
|
38
|
+
map: mergeWithDefaultMap(unescapeConfig.map) ?? sharedMap
|
|
39
|
+
};
|
|
40
|
+
else unescapeOptions = { map: sharedMap };
|
|
41
|
+
return {
|
|
42
|
+
escape: escapeEnabled ? (value) => escape(value, escapeOptions) : identity,
|
|
43
|
+
unescape: unescapeEnabled ? (value) => unescape(value, unescapeOptions) : identity
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/create-runtime.ts
|
|
49
|
+
function wrapClassAggregator(fn, transformers) {
|
|
50
|
+
return (...inputs) => {
|
|
51
|
+
const normalized = transformers.unescape(clsx(...inputs));
|
|
52
|
+
return transformers.escape(fn(normalized));
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function wrapFactory(factory, transformers) {
|
|
56
|
+
return (...args) => {
|
|
57
|
+
return wrapClassAggregator(factory(...args), transformers);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function createRuntimeFactory(options) {
|
|
61
|
+
const { version, twMerge: twMergeImpl, twJoin: twJoinImpl, extendTailwindMerge: extendFactory, createTailwindMerge: createFactory } = options;
|
|
62
|
+
return function createRuntime(createOptions) {
|
|
63
|
+
const transformers = resolveTransformers(createOptions);
|
|
64
|
+
return {
|
|
65
|
+
version,
|
|
66
|
+
twMerge: wrapClassAggregator(twMergeImpl, transformers),
|
|
67
|
+
twJoin: wrapClassAggregator(twJoinImpl, transformers),
|
|
68
|
+
extendTailwindMerge: wrapFactory(extendFactory, transformers),
|
|
69
|
+
createTailwindMerge: wrapFactory(createFactory, transformers)
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region src/index.ts
|
|
76
|
+
const weappTwIgnoreImpl = String.raw;
|
|
77
|
+
const weappTwIgnore = weappTwIgnoreImpl;
|
|
6
78
|
|
|
7
79
|
//#endregion
|
|
8
|
-
export {
|
|
80
|
+
export { clsxFn as clsx, createRuntimeFactory, identity, resolveTransformers, weappTwIgnore };
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weapp-tailwindcss/runtime",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"description": "
|
|
4
|
+
"version": "0.1.1",
|
|
5
|
+
"description": "Shared runtime helpers (transformers, clsx wrappers, metadata) for weapp-tailwindcss 在小程序运行时的适配层。",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
8
|
+
"homepage": "https://tw.icebreaker.top/docs/community/merge/runtime-api",
|
|
8
9
|
"repository": {
|
|
9
10
|
"type": "git",
|
|
10
11
|
"url": "git+https://github.com/sonofmagic/weapp-tailwindcss.git",
|
|
@@ -13,21 +14,38 @@
|
|
|
13
14
|
"bugs": {
|
|
14
15
|
"url": "https://github.com/sonofmagic/weapp-tailwindcss/issues"
|
|
15
16
|
},
|
|
16
|
-
"keywords": [
|
|
17
|
+
"keywords": [
|
|
18
|
+
"tailwindcss",
|
|
19
|
+
"mini-program",
|
|
20
|
+
"runtime",
|
|
21
|
+
"escape"
|
|
22
|
+
],
|
|
17
23
|
"sideEffects": false,
|
|
18
24
|
"exports": {
|
|
19
25
|
".": {
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
"import": {
|
|
27
|
+
"types": "./dist/index.d.mts",
|
|
28
|
+
"default": "./dist/index.mjs"
|
|
29
|
+
},
|
|
30
|
+
"require": {
|
|
31
|
+
"types": "./dist/index.d.cts",
|
|
32
|
+
"default": "./dist/index.cjs"
|
|
33
|
+
}
|
|
23
34
|
}
|
|
24
35
|
},
|
|
25
36
|
"main": "./dist/index.cjs",
|
|
26
37
|
"module": "./dist/index.mjs",
|
|
27
|
-
"types": "./dist/index.d.
|
|
38
|
+
"types": "./dist/index.d.mts",
|
|
28
39
|
"files": [
|
|
29
40
|
"dist"
|
|
30
41
|
],
|
|
42
|
+
"publishConfig": {
|
|
43
|
+
"access": "public"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@weapp-core/escape": "^5.0.1",
|
|
47
|
+
"clsx": "^2.1.1"
|
|
48
|
+
},
|
|
31
49
|
"scripts": {
|
|
32
50
|
"dev": "tsdown -w",
|
|
33
51
|
"build": "tsdown",
|