mp-taro-kit 0.0.1 → 0.0.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # mp-taro-kit
2
2
 
3
- 基于 Taro + React 的小程序 UI 基础库:遮罩、弹出层、面板、安全区等容器能力,业务内容通过 `children` / 插槽注入。
3
+ 基于 Taro + React 的小程序基础库(kit)。叫 kit 不叫 UI,是因为能力域不止界面:既有遮罩、弹出层、面板、安全区等 UI 容器能力,也会收纳跨项目通用的操作功能封装;具体业务内容通过 `children` / 插槽或宿主提供。
4
4
 
5
5
  - Skyline 为主路径,WebView 必须可用
6
6
  - 对外样式值走 CSS 变量(`var(--mp-*, 兜底值)`),可整体换肤
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ /* mp-taro-kit 对外样式变量入口。
2
+ token 清单与取值待能力清单定稿后补齐;此处只保留覆盖已定五类样式值的最小占位,
3
+ 保证 ./styles/tokens 出口有实体、宿主可 import。 */
4
+ :root {
5
+ --mp-color-primary: #1677ff;
6
+ --mp-radius-md: 8px;
7
+ --mp-space-md: 12px;
8
+ --mp-font-size-md: 14px;
9
+ --mp-duration-base: 200ms;
10
+ }
package/dist/index.cjs ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./design/index.cjs"), exports);
18
+ __exportStar(require("./runtime/index.cjs"), exports);
19
+ __exportStar(require("./utils/index.cjs"), exports);
20
+ __exportStar(require("./core/index.cjs"), exports);
21
+ __exportStar(require("./ui/index.cjs"), exports);
@@ -0,0 +1,5 @@
1
+ export * from './design/index.js';
2
+ export * from './runtime/index.js';
3
+ export * from './utils/index.js';
4
+ export * from './core/index.js';
5
+ export * from './ui/index.js';
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export * from './design/index.js';
2
+ export * from './runtime/index.js';
3
+ export * from './utils/index.js';
4
+ export * from './core/index.js';
5
+ export * from './ui/index.js';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ /* mp-taro-kit 对外样式变量入口。
2
+ token 清单与取值待能力清单定稿后补齐;此处只保留覆盖已定五类样式值的最小占位,
3
+ 保证 ./styles/tokens 出口有实体、宿主可 import。 */
4
+ :root {
5
+ --mp-color-primary: #1677ff;
6
+ --mp-radius-md: 8px;
7
+ --mp-space-md: 12px;
8
+ --mp-font-size-md: 14px;
9
+ --mp-duration-base: 200ms;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,11 +1,64 @@
1
1
  {
2
2
  "name": "mp-taro-kit",
3
- "version": "0.0.1",
4
- "description": "基于 Taro + React 的小程序 UI 基础库(占位发布,API 未定)",
3
+ "version": "0.0.3",
4
+ "description": "基于 Taro + React 的小程序基础库(kit):UI 容器能力与通用操作功能封装(占位发布,API 未定)",
5
5
  "license": "MIT",
6
+ "type": "module",
6
7
  "files": [
8
+ "dist",
7
9
  "README.md"
8
10
  ],
11
+ "main": "./dist/index.cjs",
12
+ "module": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "sideEffects": [
15
+ "**/*.css"
16
+ ],
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/index.d.ts",
20
+ "import": "./dist/index.js",
21
+ "require": "./dist/index.cjs"
22
+ },
23
+ "./design": {
24
+ "types": "./dist/design/index.d.ts",
25
+ "import": "./dist/design/index.js",
26
+ "require": "./dist/design/index.cjs"
27
+ },
28
+ "./runtime": {
29
+ "types": "./dist/runtime/index.d.ts",
30
+ "import": "./dist/runtime/index.js",
31
+ "require": "./dist/runtime/index.cjs"
32
+ },
33
+ "./utils": {
34
+ "types": "./dist/utils/index.d.ts",
35
+ "import": "./dist/utils/index.js",
36
+ "require": "./dist/utils/index.cjs"
37
+ },
38
+ "./core": {
39
+ "types": "./dist/core/index.d.ts",
40
+ "import": "./dist/core/index.js",
41
+ "require": "./dist/core/index.cjs"
42
+ },
43
+ "./ui": {
44
+ "types": "./dist/ui/index.d.ts",
45
+ "import": "./dist/ui/index.js",
46
+ "require": "./dist/ui/index.cjs"
47
+ },
48
+ "./ui/*": {
49
+ "types": "./dist/ui/*/index.d.ts",
50
+ "import": "./dist/ui/*/index.js",
51
+ "require": "./dist/ui/*/index.cjs"
52
+ },
53
+ "./ui/*/style": "./dist/ui/*/style/index.css",
54
+ "./styles/tokens": "./dist/styles/tokens.css",
55
+ "./package.json": "./package.json"
56
+ },
57
+ "peerDependencies": {
58
+ "@tarojs/components": ">=4.0.0",
59
+ "@tarojs/taro": ">=4.0.0",
60
+ "react": ">=18.0.0"
61
+ },
9
62
  "repository": {
10
63
  "type": "git",
11
64
  "url": "git+https://github.com/cq-guojia/mp-taro-kit.git"
@@ -15,5 +68,14 @@
15
68
  "weapp",
16
69
  "mini-program",
17
70
  "ui"
18
- ]
19
- }
71
+ ],
72
+ "devDependencies": {
73
+ "sass": "^1.107.1",
74
+ "typescript": "^5.9.3"
75
+ },
76
+ "scripts": {
77
+ "build": "node scripts/build.mjs",
78
+ "test": "node scripts/check.mjs",
79
+ "guard": "node scripts/check.mjs --release"
80
+ }
81
+ }