@rsmax/build-store 1.3.14 → 2.0.0-canary.91

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/lib/index.d.ts CHANGED
@@ -30,6 +30,7 @@ declare const Store: {
30
30
  props: string[];
31
31
  };
32
32
  extractedTemplates: Map<string, ExtractedTemplate>;
33
+ componentDepth: Map<string, number>;
33
34
  templateId: number;
34
35
  registerNativeComponent(componentPath: string, output: string): string;
35
36
  registerPluginComponent(componentPath: string, importer: string): string;
package/lib/index.js CHANGED
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  const crypto = __importStar(require("node:crypto"));
27
37
  const shared_1 = require("@rsmax/shared");
@@ -53,6 +63,8 @@ const Store = {
53
63
  props: [],
54
64
  },
55
65
  extractedTemplates: new Map(),
66
+ // 渐进式层级统计:每个宿主组件的实际最大层级(1 + 祖先链出现次数)
67
+ componentDepth: new Map(),
56
68
  templateId: 1,
57
69
  registerNativeComponent(componentPath, output) {
58
70
  let component = this.nativeComponents.get(componentPath);
@@ -112,6 +124,8 @@ const Store = {
112
124
  this.appEvents.clear();
113
125
  this.pageEvents.clear();
114
126
  this.templateId = 1;
127
+ // 清空层级统计
128
+ this.componentDepth.clear();
115
129
  },
116
130
  };
117
131
  exports.default = Store;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsmax/build-store",
3
- "version": "1.3.14",
3
+ "version": "2.0.0-canary.91+5982cbe",
4
4
  "description": "使用真正的 React 构建跨平台小程序",
5
5
  "homepage": "https://remax.wdchiphop.cn",
6
6
  "repository": {
@@ -23,15 +23,15 @@
23
23
  "clean": "rimraf lib tsconfig.tsbuildinfo"
24
24
  },
25
25
  "dependencies": {
26
- "@rsmax/shared": "1.3.14",
26
+ "@rsmax/shared": "2.0.0-canary.91+5982cbe",
27
27
  "lodash": "^4.17.11"
28
28
  },
29
29
  "devDependencies": {
30
- "@rsmax/types": "1.3.14",
30
+ "@rsmax/types": "2.0.0-canary.91+5982cbe",
31
31
  "@types/lodash": "^4.14.135"
32
32
  },
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
- "gitHead": "a542ee33a167f862ec9db0f7466a33f1cef31106"
36
+ "gitHead": "5982cbe3e1e3a3bf52fa41d0c31bfb043277f669"
37
37
  }