@ryupold/vode 0.12.0 → 0.12.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/package.json +1 -1
- package/src/vode.ts +3 -5
- package/vode.mjs +2 -2
package/package.json
CHANGED
package/src/vode.ts
CHANGED
|
@@ -85,9 +85,7 @@ export type ContainerNode<S> = HTMLElement & {
|
|
|
85
85
|
liveEffectCount: number,
|
|
86
86
|
renderPatchCount: number,
|
|
87
87
|
renderCount: number,
|
|
88
|
-
|
|
89
|
-
queueLengthBeforeRender: number,
|
|
90
|
-
queueLengthAfterRender: number,
|
|
88
|
+
lastRenderTime: number,
|
|
91
89
|
},
|
|
92
90
|
}
|
|
93
91
|
};
|
|
@@ -125,7 +123,7 @@ export function app<S extends object | unknown>(container: HTMLElement, initialS
|
|
|
125
123
|
if (typeof dom !== "function") throw new Error("dom must be a function that returns a vode");
|
|
126
124
|
|
|
127
125
|
const _vode = {} as ContainerNode<S>["_vode"];
|
|
128
|
-
_vode.stats = {
|
|
126
|
+
_vode.stats = { lastRenderTime: 0, renderCount: 0, liveEffectCount: 0, patchCount: 0, renderPatchCount: 0 };
|
|
129
127
|
|
|
130
128
|
Object.defineProperty(initialState, "patch", {
|
|
131
129
|
enumerable: false, configurable: true,
|
|
@@ -190,7 +188,7 @@ export function app<S extends object | unknown>(container: HTMLElement, initialS
|
|
|
190
188
|
} finally {
|
|
191
189
|
_vode.isRendering = false;
|
|
192
190
|
_vode.stats.renderCount++;
|
|
193
|
-
_vode.stats.
|
|
191
|
+
_vode.stats.lastRenderTime = Date.now() - sw;
|
|
194
192
|
if (_vode.q) {
|
|
195
193
|
_vode.render();
|
|
196
194
|
}
|
package/vode.mjs
CHANGED
|
@@ -23,7 +23,7 @@ function app(container, initialState, dom, ...initialPatches) {
|
|
|
23
23
|
if (typeof dom !== "function")
|
|
24
24
|
throw new Error("dom must be a function that returns a vode");
|
|
25
25
|
const _vode = {};
|
|
26
|
-
_vode.stats = {
|
|
26
|
+
_vode.stats = { lastRenderTime: 0, renderCount: 0, liveEffectCount: 0, patchCount: 0, renderPatchCount: 0 };
|
|
27
27
|
Object.defineProperty(initialState, "patch", {
|
|
28
28
|
enumerable: false,
|
|
29
29
|
configurable: true,
|
|
@@ -93,7 +93,7 @@ function app(container, initialState, dom, ...initialPatches) {
|
|
|
93
93
|
} finally {
|
|
94
94
|
_vode.isRendering = false;
|
|
95
95
|
_vode.stats.renderCount++;
|
|
96
|
-
_vode.stats.
|
|
96
|
+
_vode.stats.lastRenderTime = Date.now() - sw;
|
|
97
97
|
if (_vode.q) {
|
|
98
98
|
_vode.render();
|
|
99
99
|
}
|