cradova 3.6.0 → 3.6.2
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/dist/index.js +10 -7
- package/package.json +1 -1
- package/dist/primitives/func.d.ts +0 -8
package/dist/index.js
CHANGED
|
@@ -190,21 +190,24 @@ var sendSignal = (func, name, data) => {
|
|
|
190
190
|
}
|
|
191
191
|
};
|
|
192
192
|
var isArrowFunc = (fn) => !fn.hasOwnProperty("prototype");
|
|
193
|
+
var DEFAULT_STATE = {
|
|
194
|
+
rendered: false,
|
|
195
|
+
published: false,
|
|
196
|
+
preRendered: null,
|
|
197
|
+
reference: null,
|
|
198
|
+
effectuate: null,
|
|
199
|
+
_state_index: 0
|
|
200
|
+
};
|
|
193
201
|
var toFunc = (func) => {
|
|
194
202
|
if (func.id)
|
|
195
203
|
return funcManager.render(func);
|
|
196
204
|
cradovaEvent.compId += 1;
|
|
197
205
|
func.id = cradovaEvent.compId;
|
|
198
|
-
func
|
|
199
|
-
func.rendered = false;
|
|
200
|
-
func.published = false;
|
|
201
|
-
func.preRendered = null;
|
|
202
|
-
func.reference = null;
|
|
206
|
+
Object.assign(func, DEFAULT_STATE);
|
|
203
207
|
func.signals = new Map;
|
|
204
208
|
func.pipes = new Map;
|
|
209
|
+
func.effects = [];
|
|
205
210
|
func._state = [];
|
|
206
|
-
func._state_index = 0;
|
|
207
|
-
func.effectuate = null;
|
|
208
211
|
return funcManager.render(func);
|
|
209
212
|
};
|
|
210
213
|
var funcManager = {
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { CradovaFunc } from "./types";
|
|
2
|
-
export declare const funcManager: {
|
|
3
|
-
render(func: CradovaFunc): HTMLElement;
|
|
4
|
-
_effect(func: CradovaFunc, fn: () => Promise<void> | void): void;
|
|
5
|
-
effector(func: CradovaFunc): Promise<void>;
|
|
6
|
-
recall(func: CradovaFunc): void;
|
|
7
|
-
activate(func: CradovaFunc): Promise<void>;
|
|
8
|
-
};
|