phecda-vue 3.0.0-alpha.11 → 3.0.0-alpha.12
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 +3 -3
- package/dist/index.mjs +5 -5
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -175,7 +175,7 @@ function createPhecda() {
|
|
|
175
175
|
},
|
|
176
176
|
async unmount() {
|
|
177
177
|
const { state } = (0, import_phecda_web2.getActiveInstance)();
|
|
178
|
-
await Object.values(state).map((ins) => (0, import_phecda_web2.
|
|
178
|
+
await Object.values(state).map((ins) => (0, import_phecda_web2.invokeHandler)("unmount", ins));
|
|
179
179
|
(0, import_phecda_web2.resetActiveInstance)();
|
|
180
180
|
}
|
|
181
181
|
});
|
|
@@ -235,13 +235,13 @@ function useO(module2) {
|
|
|
235
235
|
const { state, _o: oMap } = (0, import_phecda_web3.getActiveInstance)();
|
|
236
236
|
if (module2.prototype.__ISOLATE__) {
|
|
237
237
|
const instance = (0, import_vue4.reactive)(new module2());
|
|
238
|
-
instance._promise = (0, import_phecda_web3.
|
|
238
|
+
instance._promise = (0, import_phecda_web3.invokeHandler)("init", instance);
|
|
239
239
|
return instance;
|
|
240
240
|
}
|
|
241
241
|
const tag = (0, import_phecda_web3.getTag)(module2);
|
|
242
242
|
if (!(tag in state)) {
|
|
243
243
|
const instance = (0, import_vue4.reactive)(new module2());
|
|
244
|
-
instance._promise = (0, import_phecda_web3.
|
|
244
|
+
instance._promise = (0, import_phecda_web3.invokeHandler)("init", instance);
|
|
245
245
|
state[tag] = instance;
|
|
246
246
|
oMap.set(instance, module2);
|
|
247
247
|
} else {
|
package/dist/index.mjs
CHANGED
|
@@ -121,7 +121,7 @@ __name(PV, "PV");
|
|
|
121
121
|
|
|
122
122
|
// src/phecda.ts
|
|
123
123
|
import { markRaw } from "vue";
|
|
124
|
-
import { getActiveInstance,
|
|
124
|
+
import { getActiveInstance, invokeHandler, resetActiveInstance } from "phecda-web";
|
|
125
125
|
var phecdaSymbol = Symbol("phecda");
|
|
126
126
|
function createPhecda() {
|
|
127
127
|
resetActiveInstance();
|
|
@@ -139,7 +139,7 @@ function createPhecda() {
|
|
|
139
139
|
},
|
|
140
140
|
async unmount() {
|
|
141
141
|
const { state } = getActiveInstance();
|
|
142
|
-
await Object.values(state).map((ins) =>
|
|
142
|
+
await Object.values(state).map((ins) => invokeHandler("unmount", ins));
|
|
143
143
|
resetActiveInstance();
|
|
144
144
|
}
|
|
145
145
|
});
|
|
@@ -149,7 +149,7 @@ __name(createPhecda, "createPhecda");
|
|
|
149
149
|
|
|
150
150
|
// src/composable.ts
|
|
151
151
|
import { onBeforeUnmount, reactive, toRaw, toRef } from "vue";
|
|
152
|
-
import { emitter as emitter2, getActiveInstance as getActiveInstance2, getHandler, getTag,
|
|
152
|
+
import { emitter as emitter2, getActiveInstance as getActiveInstance2, getHandler, getTag, invokeHandler as invokeHandler2, wrapError } from "phecda-web";
|
|
153
153
|
|
|
154
154
|
// src/utils.ts
|
|
155
155
|
import { effectScope as effectScope2, isReactive, isRef, onScopeDispose } from "vue";
|
|
@@ -199,13 +199,13 @@ function useO(module) {
|
|
|
199
199
|
const { state, _o: oMap } = getActiveInstance2();
|
|
200
200
|
if (module.prototype.__ISOLATE__) {
|
|
201
201
|
const instance = reactive(new module());
|
|
202
|
-
instance._promise =
|
|
202
|
+
instance._promise = invokeHandler2("init", instance);
|
|
203
203
|
return instance;
|
|
204
204
|
}
|
|
205
205
|
const tag = getTag(module);
|
|
206
206
|
if (!(tag in state)) {
|
|
207
207
|
const instance = reactive(new module());
|
|
208
|
-
instance._promise =
|
|
208
|
+
instance._promise = invokeHandler2("init", instance);
|
|
209
209
|
state[tag] = instance;
|
|
210
210
|
oMap.set(instance, module);
|
|
211
211
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phecda-vue",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.12",
|
|
4
4
|
"description": "provide phecda function to vue",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"vue": "^3.2.45",
|
|
16
|
-
"phecda-web": "1.0.1-alpha.
|
|
16
|
+
"phecda-web": "1.0.1-alpha.6"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"tsup": "^6.5.0"
|