render-core 1.4.30 → 1.4.32

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.
Files changed (66) hide show
  1. package/index.d.ts +66 -33
  2. package/index.js +55 -49
  3. package/kernel/delivery/delivery.d.ts +4 -10
  4. package/kernel/delivery/delivery.js +4 -17
  5. package/kernel/directive/data/v-el.d.ts +1 -1
  6. package/kernel/directive/data/v-html.d.ts +1 -1
  7. package/kernel/directive/data/v-txt.d.ts +1 -1
  8. package/kernel/directive/justify/v-if.js +2 -2
  9. package/kernel/directive/slot/v-slot.d.ts +13 -0
  10. package/kernel/directive/slot/v-slot.js +46 -0
  11. package/kernel/proxyer/getProxy.d.ts +1 -1
  12. package/kernel/renderer/initRender.d.ts +3 -3
  13. package/kernel/renderer/initRender.js +7 -6
  14. package/kernel/renderer/pageRender.d.ts +9 -0
  15. package/kernel/renderer/pageRender.js +53 -0
  16. package/kernel/renderer/postRender.d.ts +3 -3
  17. package/kernel/renderer/postRender.js +5 -4
  18. package/kernel/renderer/rawRender.d.ts +3 -3
  19. package/kernel/renderer/rawRender.js +5 -4
  20. package/kernel/renderer/updateRender.d.ts +1 -1
  21. package/kernel/router/router.d.ts +3 -9
  22. package/kernel/router/router.js +10 -30
  23. package/package.json +1 -1
  24. package/system/generic/component/ComponentGeneric.d.ts +2 -2
  25. package/system/generic/component/instance/AbstractComponent.d.ts +41 -0
  26. package/system/generic/component/instance/AbstractComponent.js +98 -0
  27. package/system/generic/controller/ControllerGeneric.d.ts +3 -3
  28. package/system/generic/controller/prototype/ContextController.d.ts +30 -0
  29. package/system/generic/controller/prototype/ContextController.js +17 -0
  30. package/system/generic/controller/prototype/HttpAction.d.ts +9 -0
  31. package/system/generic/controller/prototype/HttpAction.js +37 -0
  32. package/system/generic/data/ComputedDataGeneric.d.ts +1 -1
  33. package/system/generic/data/OriginalDataGeneric.d.ts +1 -1
  34. package/system/generic/data/WatcherDataGeneric.d.ts +1 -1
  35. package/system/generic/render/RenderGeneric.d.ts +2 -4
  36. package/system/injection/injection.d.ts +1 -1
  37. package/system/injection/injector.d.ts +5 -5
  38. package/system/lifecycle/lifeCycle.d.ts +1 -1
  39. package/system/lifecycle/mount.d.ts +3 -3
  40. package/system/lifecycle/mount.js +1 -1
  41. package/system/recorder/table0/system_func_0.d.ts +5 -5
  42. package/system/recorder/table0/system_t_0.d.ts +2 -2
  43. package/system/recorder/table1/system_func_1.d.ts +2 -0
  44. package/system/recorder/table1/system_func_1.js +6 -0
  45. package/system/recorder/table3/system_func_3.d.ts +1 -1
  46. package/system/utility/directive/cmdUtility.d.ts +3 -3
  47. package/system/utility/directive/cmdUtility.js +1 -1
  48. package/system/utility/initiate/miscUtility.js +2 -1
  49. package/system/utility/initiate/templateUtility.d.ts +2 -2
  50. package/system/utility/react/inputType.d.ts +1 -1
  51. package/system/utility/react/sectionUtility.d.ts +1 -1
  52. package/system/utility/style/styleUtility.d.ts +13 -2
  53. package/system/utility/style/styleUtility.js +43 -2
  54. package/tension/SystemInitPlugin.js +1 -1
  55. package/tension/generic/plugin/hooks/HooksGeneric.d.ts +0 -2
  56. package/tension/generic/plugin/preface/PrefaceGeneric.d.ts +3 -3
  57. package/tension/generic/router/RouterGeneric.d.ts +6 -3
  58. package/tension/prototype/HooksAction.d.ts +0 -2
  59. package/tension/prototype/HooksAction.js +0 -4
  60. package/tension/prototype/PrefaceAction.d.ts +3 -3
  61. package/verify/directive-linter.d.ts +0 -4
  62. package/verify/directive-linter.js +152 -123
  63. package/xboot/entrance.d.ts +1 -13
  64. package/xboot/entrance.js +3 -49
  65. package/xboot/renderProcessor.d.ts +1 -1
  66. package/xboot/tagProcessor.d.ts +2 -2
@@ -1,4 +1,4 @@
1
- import { Component } from "../../../index";
1
+ import { AdjustComponent, ControlComponent } from "../../../index";
2
2
  /**
3
3
  *
4
4
  * @param tag
@@ -9,7 +9,7 @@ export declare function checkStyleLabel(tag: string): boolean;
9
9
  * @param component
10
10
  * @param styleLib
11
11
  */
12
- export declare function themeStyle(component: Component, styleLib: Map<string, object>): void;
12
+ export declare function themeStyle(component: AdjustComponent | ControlComponent, styleLib: Map<string, object>): void;
13
13
  /**
14
14
  * Here is the function to resolve
15
15
  * @param tag
@@ -27,3 +27,14 @@ export declare function changeStyle(tag: string, theme: string): void;
27
27
  * @param theme
28
28
  */
29
29
  export declare function changeTheme(theme: string): void;
30
+ /**
31
+ * 给 CSS 中所有选择器添加 V-data 属性选择器
32
+ * @param {string} cssText - 原始 CSS 字符串
33
+ * @param {string} salt - 盐值
34
+ * @returns {string} 处理后的 CSS 字符串
35
+ */
36
+ /**
37
+ * Simple synchronous string hash (djb2) — used to produce a unique salt per component name.
38
+ */
39
+ export declare function hashName(name: string): string;
40
+ export declare function style_slot_func(cssText: string, salt: string): string;
@@ -29,7 +29,7 @@ export function themeStyle(component, styleLib) {
29
29
  var styles = dom.getElementsByTagName("template")[0].content.querySelectorAll("style");
30
30
  var componentStyleList = new Map();
31
31
  for (var i = 0; i < styles.length; i++) {
32
- componentStyleList.set(styles[i].getAttribute("theme"), styles[i].innerText);
32
+ componentStyleList.set(styles[i].getAttribute("theme"), style_slot_func(styles[i].innerText, hashName(component.getName())));
33
33
  }
34
34
  styleLib.set(component.getName().toUpperCase(), componentStyleList);
35
35
  }
@@ -64,7 +64,7 @@ export function loader_tag_style(tag, styleLib) {
64
64
  export function changeStyle(tag, theme) {
65
65
  var styleTxt = get_style_library().get(tag.toUpperCase()).get(theme);
66
66
  if (styleTxt === undefined) {
67
- console.log("Dont`t find this style!");
67
+ console.log("Don`t find this style!");
68
68
  }
69
69
  else {
70
70
  var style = document.createElement('style');
@@ -100,3 +100,44 @@ export function changeTheme(theme) {
100
100
  });
101
101
  set_theme_style(theme);
102
102
  }
103
+ /**
104
+ * 给 CSS 中所有选择器添加 V-data 属性选择器
105
+ * @param {string} cssText - 原始 CSS 字符串
106
+ * @param {string} salt - 盐值
107
+ * @returns {string} 处理后的 CSS 字符串
108
+ */
109
+ /**
110
+ * Simple synchronous string hash (djb2) — used to produce a unique salt per component name.
111
+ */
112
+ export function hashName(name) {
113
+ var hash = 0;
114
+ for (var i = 0; i < name.length; i++) {
115
+ hash = ((hash << 5) - hash) + name.charCodeAt(i);
116
+ hash |= 0;
117
+ }
118
+ return Math.abs(hash).toString(16);
119
+ }
120
+ export function style_slot_func(cssText, salt) {
121
+ if (!cssText || !salt)
122
+ return cssText;
123
+ // 正则匹配:选择器部分 { 声明部分 }
124
+ // 注意:这里不处理嵌套规则(如 @media 内部的选择器),如果需要可以调整
125
+ return cssText.replace(/([^{]+)(\{)/g, function (match, selectors, brace) {
126
+ // 如果是 @ 开头的规则,不处理
127
+ if (selectors.trim().startsWith('@')) {
128
+ return match;
129
+ }
130
+ // 将每个选择器(以逗号分隔)都加上 [V-data="salt"]
131
+ var newSelectors = selectors
132
+ .split(',')
133
+ .map(function (sel) {
134
+ var trimmed = sel.trim();
135
+ if (!trimmed)
136
+ return '';
137
+ return "".concat(trimmed, "[v-data=\"").concat(salt, "\"]");
138
+ })
139
+ .filter(function (s) { return s; })
140
+ .join(', ');
141
+ return newSelectors + brace;
142
+ });
143
+ }
@@ -1,4 +1,4 @@
1
- import { HttpAction } from "../system/prototype/HttpAction";
1
+ import { HttpAction } from "../system/generic/controller/prototype/HttpAction";
2
2
  /**
3
3
  *
4
4
  */
@@ -1,6 +1,4 @@
1
- import { Component } from "../../../../index";
2
1
  export interface HooksGeneric {
3
2
  changeStyle(tag: string, theme: string): void;
4
3
  changeTheme(theme: string): void;
5
- directDelivery(component: Component): void;
6
4
  }
@@ -1,11 +1,11 @@
1
- import { HttpAction } from "../../../../system/prototype/HttpAction";
2
- import { Component } from "../../../../index";
1
+ import { HttpAction } from "../../../../system/generic/controller/prototype/HttpAction";
2
+ import { AdjustComponent, ControlComponent } from "../../../../index";
3
3
  import { RouterGeneric } from "../../router/RouterGeneric";
4
4
  export interface PrefaceGeneric {
5
5
  add_system_router(router: RouterGeneric): void;
6
6
  add_user_http(http: HttpAction): void;
7
7
  add_anonymous_extension(name: string, plugin: object): void;
8
8
  add_anonymous_filed(name: string, value: any): void;
9
- register_component(component: Component): void;
9
+ register_component(component: AdjustComponent | ControlComponent): void;
10
10
  set_field_route_mode(value: boolean): void;
11
11
  }
@@ -1,5 +1,8 @@
1
- import { Component } from "../../../index";
1
+ import { PageComponent } from "../../../index";
2
2
  export interface RouterGeneric {
3
- getComponent(): Component;
4
- getPathVariable(): Map<string, any>;
3
+ getComponent(): {
4
+ params: Map<string, any>;
5
+ pathParams: Map<string, any>;
6
+ component: PageComponent;
7
+ };
5
8
  }
@@ -1,7 +1,5 @@
1
1
  import { HooksGeneric } from "../generic/plugin/hooks/HooksGeneric";
2
- import { Component } from "../../index";
3
2
  export declare class HooksAction implements HooksGeneric {
4
3
  changeStyle(tag: string, theme: string): void;
5
4
  changeTheme(theme: string): void;
6
- directDelivery(component: Component): void;
7
5
  }
@@ -1,5 +1,4 @@
1
1
  import { changeStyle, changeTheme } from "../../system/utility/style/styleUtility";
2
- import { direct_delivery } from "../../kernel/delivery/delivery";
3
2
  var HooksAction = /** @class */ (function () {
4
3
  function HooksAction() {
5
4
  }
@@ -11,9 +10,6 @@ var HooksAction = /** @class */ (function () {
11
10
  HooksAction.prototype.changeTheme = function (theme) {
12
11
  changeTheme(theme);
13
12
  };
14
- HooksAction.prototype.directDelivery = function (component) {
15
- direct_delivery(component);
16
- };
17
13
  return HooksAction;
18
14
  }());
19
15
  export { HooksAction };
@@ -1,12 +1,12 @@
1
1
  import { PrefaceGeneric } from "../generic/plugin/preface/PrefaceGeneric";
2
- import { Component } from "../../index";
3
- import { HttpAction } from "../../system/prototype/HttpAction";
2
+ import { AdjustComponent, ControlComponent } from "../../index";
3
+ import { HttpAction } from "../../system/generic/controller/prototype/HttpAction";
4
4
  import { RouterGeneric } from "../generic/router/RouterGeneric";
5
5
  export declare class PrefaceAction implements PrefaceGeneric {
6
6
  add_anonymous_extension(name: string, plugin: object): void;
7
7
  add_anonymous_filed(name: string, value: any): void;
8
8
  add_system_router(router: RouterGeneric): void;
9
9
  add_user_http(http: HttpAction): void;
10
- register_component(component: Component): void;
10
+ register_component(component: AdjustComponent | ControlComponent): void;
11
11
  set_field_route_mode(value: boolean): void;
12
12
  }
@@ -1,4 +0,0 @@
1
- import { Component } from "../index";
2
- import LintError from "./generic/lintError";
3
- export declare function lintComponent(component: Component): LintError[];
4
- export declare function lintComponents(components: Component[]): Map<string, LintError[]>;
@@ -1,123 +1,152 @@
1
- var BOOLEAN_CONDITION_DIRECTIVES = ["@if", "@show"];
2
- var ARRAY_ITERATION_DIRECTIVES = ["@for", "@map"];
3
- var MODEL_ELEMENT = ["INPUT", "SELECT", "TEXTAREA"];
4
- function parseTemplateForDirectives(template) {
5
- var directives = [];
6
- var lines = template.split("\n");
7
- for (var lineIndex = 0; lineIndex < lines.length; lineIndex++) {
8
- var line = lines[lineIndex];
9
- var directiveRegex = /@(\w+)(?:\s*=\s*"([^"]*)"|\s*=\s*'([^']*)')?/g;
10
- var match = void 0;
11
- while ((match = directiveRegex.exec(line)) !== null) {
12
- var directiveName = match[1];
13
- var expression = match[2] || match[3] || "";
14
- var elementMatch = line.match(/<(\w+)/);
15
- var element = elementMatch ? elementMatch[1] : "unknown";
16
- directives.push({
17
- directive: "@".concat(directiveName),
18
- expression: expression,
19
- element: element.toUpperCase(),
20
- line: lineIndex + 1,
21
- column: match.index + 1
22
- });
23
- }
24
- }
25
- return directives;
26
- }
27
- function inferType(value) {
28
- if (value === true || value === false)
29
- return "boolean";
30
- if (Array.isArray(value))
31
- return "array";
32
- if (typeof value === "number")
33
- return "number";
34
- if (typeof value === "string")
35
- return "string";
36
- if (typeof value === "object" && value !== null)
37
- return "object";
38
- if (value === null)
39
- return "null";
40
- return "unknown";
41
- }
42
- function getDataTypes(component) {
43
- var types = new Map();
44
- var data = component.getData();
45
- if (data && typeof data === "object") {
46
- Object.keys(data).forEach(function (key) {
47
- types.set(key, inferType(data[key]));
48
- });
49
- }
50
- return types;
51
- }
52
- function validateBooleanCondition(directive, component) {
53
- var dataTypes = getDataTypes(component);
54
- var actualType = dataTypes.get(directive.expression);
55
- if (actualType && actualType !== "boolean") {
56
- return {
57
- rule: "boolean-condition",
58
- message: "Directive '".concat(directive.directive, "' expects boolean but '").concat(directive.expression, "' is ").concat(actualType),
59
- line: directive.line,
60
- column: directive.column
61
- };
62
- }
63
- return null;
64
- }
65
- function validateArrayIteration(directive, component) {
66
- var dataTypes = getDataTypes(component);
67
- var actualType = dataTypes.get(directive.expression);
68
- if (actualType && actualType !== "array") {
69
- return {
70
- rule: "array-iteration",
71
- message: "Directive '".concat(directive.directive, "' expects array but '").concat(directive.expression, "' is ").concat(actualType),
72
- line: directive.line,
73
- column: directive.column
74
- };
75
- }
76
- return null;
77
- }
78
- function validateModelElement(directive, component) {
79
- if (MODEL_ELEMENT.indexOf(directive.element) === -1) {
80
- return {
81
- rule: "valid-model-element",
82
- message: "Directive '@model' can only be used on INPUT, SELECT, or TEXTAREA, but found '".concat(directive.element, "'"),
83
- line: directive.line,
84
- column: directive.column
85
- };
86
- }
87
- return null;
88
- }
89
- export function lintComponent(component) {
90
- var errors = [];
91
- var template = component.getTemplate();
92
- var directives = parseTemplateForDirectives(template);
93
- for (var _i = 0, directives_1 = directives; _i < directives_1.length; _i++) {
94
- var directive = directives_1[_i];
95
- if (BOOLEAN_CONDITION_DIRECTIVES.indexOf(directive.directive) !== -1) {
96
- var error = validateBooleanCondition(directive, component);
97
- if (error)
98
- errors.push(error);
99
- }
100
- if (ARRAY_ITERATION_DIRECTIVES.indexOf(directive.directive) !== -1) {
101
- var error = validateArrayIteration(directive, component);
102
- if (error)
103
- errors.push(error);
104
- }
105
- if (directive.directive === "@model") {
106
- var error = validateModelElement(directive, component);
107
- if (error)
108
- errors.push(error);
109
- }
110
- }
111
- return errors;
112
- }
113
- export function lintComponents(components) {
114
- var allErrors = new Map();
115
- for (var _i = 0, components_1 = components; _i < components_1.length; _i++) {
116
- var component = components_1[_i];
117
- var errors = lintComponent(component);
118
- if (errors.length > 0) {
119
- allErrors.set(component.getName(), errors);
120
- }
121
- }
122
- return allErrors;
123
- }
1
+ // import {Component} from "../index";
2
+ // import DirectiveLocation from "./generic/location";
3
+ // import LintError from "./generic/lintError";
4
+ //
5
+ // const BOOLEAN_CONDITION_DIRECTIVES = ["@if", "@show"];
6
+ // const ARRAY_ITERATION_DIRECTIVES = ["@for", "@map"];
7
+ // const MODEL_ELEMENT = ["INPUT", "SELECT", "TEXTAREA"];
8
+ //
9
+ // function parseTemplateForDirectives(template: string): DirectiveLocation[] {
10
+ // const directives: DirectiveLocation[] = [];
11
+ // const lines = template.split("\n");
12
+ //
13
+ // for (let lineIndex = 0; lineIndex < lines.length; lineIndex++) {
14
+ // const line = lines[lineIndex];
15
+ //
16
+ // const directiveRegex = /@(\w+)(?:\s*=\s*"([^"]*)"|\s*=\s*'([^']*)')?/g;
17
+ // let match;
18
+ //
19
+ // while ((match = directiveRegex.exec(line)) !== null) {
20
+ // const directiveName = match[1];
21
+ // const expression = match[2] || match[3] || "";
22
+ //
23
+ // const elementMatch = line.match(/<(\w+)/);
24
+ // const element = elementMatch ? elementMatch[1] : "unknown";
25
+ //
26
+ // directives.push({
27
+ // directive: `@${directiveName}`,
28
+ // expression: expression,
29
+ // element: element.toUpperCase(),
30
+ // line: lineIndex + 1,
31
+ // column: match.index + 1
32
+ // });
33
+ // }
34
+ // }
35
+ //
36
+ // return directives;
37
+ // }
38
+ //
39
+ // function inferType(value: any): string {
40
+ // if (value === true || value === false) return "boolean";
41
+ // if (Array.isArray(value)) return "array";
42
+ // if (typeof value === "number") return "number";
43
+ // if (typeof value === "string") return "string";
44
+ // if (typeof value === "object" && value !== null) return "object";
45
+ // if (value === null) return "null";
46
+ // return "unknown";
47
+ // }
48
+ //
49
+ // function getDataTypes(component: Component): Map<string, string> {
50
+ // const types = new Map<string, string>();
51
+ // const data = component.getData();
52
+ //
53
+ // if (data && typeof data === "object") {
54
+ // Object.keys(data).forEach(function(key: string) {
55
+ // types.set(key, inferType((data as any)[key]));
56
+ // });
57
+ // }
58
+ //
59
+ // return types;
60
+ // }
61
+ //
62
+ // function validateBooleanCondition(
63
+ // directive: DirectiveLocation,
64
+ // component: Component
65
+ // ): LintError | null {
66
+ // const dataTypes = getDataTypes(component);
67
+ // const actualType = dataTypes.get(directive.expression);
68
+ //
69
+ // if (actualType && actualType !== "boolean") {
70
+ // return {
71
+ // rule: "boolean-condition",
72
+ // message: `Directive '${directive.directive}' expects boolean but '${directive.expression}' is ${actualType}`,
73
+ // line: directive.line,
74
+ // column: directive.column
75
+ // };
76
+ // }
77
+ //
78
+ // return null;
79
+ // }
80
+ //
81
+ // function validateArrayIteration(
82
+ // directive: DirectiveLocation,
83
+ // component: Component
84
+ // ): LintError | null {
85
+ // const dataTypes = getDataTypes(component);
86
+ // const actualType = dataTypes.get(directive.expression);
87
+ //
88
+ // if (actualType && actualType !== "array") {
89
+ // return {
90
+ // rule: "array-iteration",
91
+ // message: `Directive '${directive.directive}' expects array but '${directive.expression}' is ${actualType}`,
92
+ // line: directive.line,
93
+ // column: directive.column
94
+ // };
95
+ // }
96
+ //
97
+ // return null;
98
+ // }
99
+ //
100
+ // function validateModelElement(
101
+ // directive: DirectiveLocation,
102
+ // component: Component
103
+ // ): LintError | null {
104
+ // if (MODEL_ELEMENT.indexOf(directive.element) === -1) {
105
+ // return {
106
+ // rule: "valid-model-element",
107
+ // message: `Directive '@model' can only be used on INPUT, SELECT, or TEXTAREA, but found '${directive.element}'`,
108
+ // line: directive.line,
109
+ // column: directive.column
110
+ // };
111
+ // }
112
+ //
113
+ // return null;
114
+ // }
115
+ //
116
+ // export function lintComponent(component: Component): LintError[] {
117
+ // const errors: LintError[] = [];
118
+ // const template = component.getTemplate();
119
+ // const directives = parseTemplateForDirectives(template);
120
+ //
121
+ // for (const directive of directives) {
122
+ // if (BOOLEAN_CONDITION_DIRECTIVES.indexOf(directive.directive) !== -1) {
123
+ // const error = validateBooleanCondition(directive, component);
124
+ // if (error) errors.push(error);
125
+ // }
126
+ //
127
+ // if (ARRAY_ITERATION_DIRECTIVES.indexOf(directive.directive) !== -1) {
128
+ // const error = validateArrayIteration(directive, component);
129
+ // if (error) errors.push(error);
130
+ // }
131
+ //
132
+ // if (directive.directive === "@model") {
133
+ // const error = validateModelElement(directive, component);
134
+ // if (error) errors.push(error);
135
+ // }
136
+ // }
137
+ //
138
+ // return errors;
139
+ // }
140
+ //
141
+ // export function lintComponents(components: Component[]): Map<string, LintError[]> {
142
+ // const allErrors = new Map<string, LintError[]>();
143
+ //
144
+ // for (const component of components) {
145
+ // const errors = lintComponent(component);
146
+ // if (errors.length > 0) {
147
+ // allErrors.set(component.getName(), errors);
148
+ // }
149
+ // }
150
+ //
151
+ // return allErrors;
152
+ // }
@@ -1,16 +1,4 @@
1
- import { Component } from "../index";
2
- /**
3
- * The entrance of weave
4
- * @param root
5
- */
6
- export declare function render_for_weave(root?: string): void;
7
1
  /**
8
2
  * The entrance of listen
9
3
  */
10
- export declare function render_for_listen(): void;
11
- /**
12
- * The entrance of render
13
- * @param component
14
- * @param mounter
15
- */
16
- export declare function render_for_render(component: Component, mounter: string): void;
4
+ export declare function render_for_listen(params: Map<string, any>, pathParams: Map<string, any>): void;
package/xboot/entrance.js CHANGED
@@ -1,53 +1,7 @@
1
- import { themeStyle } from "../system/utility/style/styleUtility";
2
- import { renderHtml } from "./renderProcessor";
3
- import { get_context_controller, get_style_library, get_tag_library } from "../system/recorder/table0/system_func_0";
4
- import { router_listener_with_router, router_listener_without_router } from "../kernel/router/router";
5
- /**
6
- * The entrance of weave
7
- * @param root
8
- */
9
- export function render_for_weave(root) {
10
- get_tag_library().forEach(function (component) {
11
- themeStyle(component, get_style_library());
12
- });
13
- if (root == null) {
14
- //开始渲染
15
- get_context_controller().componentAttachedRootElement = document.body;
16
- renderHtml(document.children, get_context_controller());
17
- }
18
- else {
19
- var mountPoint = document.getElementById(root);
20
- if (mountPoint == null) {
21
- get_context_controller().componentAttachedRootElement = document.body;
22
- //开始渲染
23
- console.warn("Mount point not found");
24
- console.warn("Mount point was selected to body");
25
- renderHtml(document.body.children, get_context_controller());
26
- }
27
- else {
28
- //开始渲染
29
- get_context_controller().componentAttachedRootElement = mountPoint;
30
- renderHtml(mountPoint.children, get_context_controller());
31
- }
32
- }
33
- }
1
+ import { router_listener_with_router } from "../kernel/router/router";
34
2
  /**
35
3
  * The entrance of listen
36
4
  */
37
- export function render_for_listen() {
38
- get_tag_library().forEach(function (component) {
39
- themeStyle(component, get_style_library());
40
- });
41
- router_listener_with_router(document.querySelector("webview"));
42
- }
43
- /**
44
- * The entrance of render
45
- * @param component
46
- * @param mounter
47
- */
48
- export function render_for_render(component, mounter) {
49
- get_tag_library().forEach(function (component) {
50
- themeStyle(component, get_style_library());
51
- });
52
- router_listener_without_router(component, document.getElementById(mounter));
5
+ export function render_for_listen(params, pathParams) {
6
+ router_listener_with_router(document.body, params, pathParams);
53
7
  }
@@ -1,4 +1,4 @@
1
- import { ContextController } from "../system/prototype/ContextController";
1
+ import { ContextController } from "../system/generic/controller/prototype/ContextController";
2
2
  /**
3
3
  * This function is used to render element below the mount point.
4
4
  * @param collection
@@ -1,7 +1,7 @@
1
- import { Component } from "../index";
1
+ import { AdjustComponent, ControlComponent } from "../index";
2
2
  /**
3
3
  * This function is used to save the prototype component proto in the window object.
4
4
  * So, you can have a tip that we custom a property named 'tagLib' in the window object.
5
5
  * @param component
6
6
  */
7
- export declare function registerTagLib(component: Component | Component[]): void;
7
+ export declare function registerTagLib(component: AdjustComponent | AdjustComponent[] | ControlComponent | ControlComponent[]): void;