@pyreon/vue-compat 0.2.1 → 0.3.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/lib/analysis/index.js.html +1 -1
- package/lib/index.js +261 -65
- package/lib/index.js.map +1 -1
- package/lib/types/index.d.ts +265 -64
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index2.d.ts +22 -49
- package/lib/types/index2.d.ts.map +1 -1
- package/package.json +14 -4
- package/src/index.ts +307 -81
- package/src/jsx-runtime.ts +178 -0
- package/src/tests/vue-compat.test.ts +348 -119
package/lib/types/index.d.ts
CHANGED
|
@@ -2,32 +2,63 @@ import { Fragment, createContext, h as pyreonH, onMount, onUnmount, onUpdate, po
|
|
|
2
2
|
import { batch, computed as computed$1, createStore, effect, nextTick as nextTick$1, signal } from "@pyreon/reactivity";
|
|
3
3
|
import { mount } from "@pyreon/runtime-dom";
|
|
4
4
|
|
|
5
|
+
//#region src/jsx-runtime.ts
|
|
6
|
+
|
|
7
|
+
function getCurrentCtx() {
|
|
8
|
+
return _currentCtx;
|
|
9
|
+
}
|
|
10
|
+
function getHookIndex() {
|
|
11
|
+
return _hookIndex++;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
5
15
|
//#region src/index.ts
|
|
6
16
|
|
|
7
17
|
/**
|
|
8
18
|
* Creates a reactive ref wrapping the given value.
|
|
9
19
|
* Access via `.value` — reads track, writes trigger.
|
|
10
20
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
21
|
+
* Inside a component: hook-indexed. The setter also calls `scheduleRerender()`.
|
|
22
|
+
* Outside a component: creates a standalone reactive ref.
|
|
13
23
|
*/
|
|
14
24
|
function ref(value) {
|
|
25
|
+
const ctx = getCurrentCtx();
|
|
26
|
+
if (ctx) {
|
|
27
|
+
const idx = getHookIndex();
|
|
28
|
+
if (idx < ctx.hooks.length) return ctx.hooks[idx];
|
|
29
|
+
const s = signal(value);
|
|
30
|
+
const {
|
|
31
|
+
scheduleRerender
|
|
32
|
+
} = ctx;
|
|
33
|
+
const r = {
|
|
34
|
+
[V_IS_REF]: true,
|
|
35
|
+
get value() {
|
|
36
|
+
return s();
|
|
37
|
+
},
|
|
38
|
+
set value(v) {
|
|
39
|
+
s.set(v);
|
|
40
|
+
scheduleRerender();
|
|
41
|
+
},
|
|
42
|
+
_signal: s,
|
|
43
|
+
_scheduleRerender: scheduleRerender
|
|
44
|
+
};
|
|
45
|
+
ctx.hooks[idx] = r;
|
|
46
|
+
return r;
|
|
47
|
+
}
|
|
15
48
|
const s = signal(value);
|
|
16
49
|
return {
|
|
17
50
|
[V_IS_REF]: true,
|
|
18
51
|
get value() {
|
|
19
52
|
return s();
|
|
20
53
|
},
|
|
21
|
-
set value(
|
|
22
|
-
s.set(
|
|
54
|
+
set value(v) {
|
|
55
|
+
s.set(v);
|
|
23
56
|
},
|
|
24
57
|
_signal: s
|
|
25
58
|
};
|
|
26
59
|
}
|
|
27
60
|
/**
|
|
28
61
|
* Creates a shallow ref — same as `ref()` in Pyreon since signals are inherently shallow.
|
|
29
|
-
*
|
|
30
|
-
* Difference from Vue: identical to `ref()` — Pyreon signals don't perform deep conversion.
|
|
31
62
|
*/
|
|
32
63
|
function shallowRef(value) {
|
|
33
64
|
return ref(value);
|
|
@@ -42,6 +73,7 @@ function triggerRef(r) {
|
|
|
42
73
|
internal._signal.set(void 0);
|
|
43
74
|
internal._signal.set(current);
|
|
44
75
|
}
|
|
76
|
+
if (internal._scheduleRerender) internal._scheduleRerender();
|
|
45
77
|
}
|
|
46
78
|
/**
|
|
47
79
|
* Returns `true` if the value is a ref (created by `ref()` or `computed()`).
|
|
@@ -56,6 +88,30 @@ function unref(r) {
|
|
|
56
88
|
return isRef(r) ? r.value : r;
|
|
57
89
|
}
|
|
58
90
|
function computed(fnOrOptions) {
|
|
91
|
+
const ctx = getCurrentCtx();
|
|
92
|
+
if (ctx) {
|
|
93
|
+
const idx = getHookIndex();
|
|
94
|
+
if (idx < ctx.hooks.length) return ctx.hooks[idx];
|
|
95
|
+
const getter = typeof fnOrOptions === "function" ? fnOrOptions : fnOrOptions.get;
|
|
96
|
+
const setter = typeof fnOrOptions === "object" ? fnOrOptions.set : void 0;
|
|
97
|
+
const c = computed$1(getter);
|
|
98
|
+
const {
|
|
99
|
+
scheduleRerender
|
|
100
|
+
} = ctx;
|
|
101
|
+
const r = {
|
|
102
|
+
[V_IS_REF]: true,
|
|
103
|
+
get value() {
|
|
104
|
+
return c();
|
|
105
|
+
},
|
|
106
|
+
set value(v) {
|
|
107
|
+
if (!setter) throw new Error("Cannot set value of a computed ref — computed refs are readonly");
|
|
108
|
+
setter(v);
|
|
109
|
+
scheduleRerender();
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
ctx.hooks[idx] = r;
|
|
113
|
+
return r;
|
|
114
|
+
}
|
|
59
115
|
const getter = typeof fnOrOptions === "function" ? fnOrOptions : fnOrOptions.get;
|
|
60
116
|
const setter = typeof fnOrOptions === "object" ? fnOrOptions.set : void 0;
|
|
61
117
|
const c = computed$1(getter);
|
|
@@ -74,20 +130,41 @@ function computed(fnOrOptions) {
|
|
|
74
130
|
* Creates a deeply reactive proxy from a plain object.
|
|
75
131
|
* Backed by Pyreon's `createStore()`.
|
|
76
132
|
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
133
|
+
* Inside a component: hook-indexed. Proxy wrapper intercepts sets to
|
|
134
|
+
* call `scheduleRerender()`.
|
|
79
135
|
*/
|
|
80
136
|
function reactive(obj) {
|
|
137
|
+
const ctx = getCurrentCtx();
|
|
138
|
+
if (ctx) {
|
|
139
|
+
const idx = getHookIndex();
|
|
140
|
+
if (idx < ctx.hooks.length) return ctx.hooks[idx];
|
|
141
|
+
const proxy = createStore(obj);
|
|
142
|
+
rawMap.set(proxy, obj);
|
|
143
|
+
const {
|
|
144
|
+
scheduleRerender
|
|
145
|
+
} = ctx;
|
|
146
|
+
const wrapped = new Proxy(proxy, {
|
|
147
|
+
set(target, key, value, receiver) {
|
|
148
|
+
const result = Reflect.set(target, key, value, receiver);
|
|
149
|
+
scheduleRerender();
|
|
150
|
+
return result;
|
|
151
|
+
},
|
|
152
|
+
deleteProperty(target, key) {
|
|
153
|
+
const result = Reflect.deleteProperty(target, key);
|
|
154
|
+
scheduleRerender();
|
|
155
|
+
return result;
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
rawMap.set(wrapped, obj);
|
|
159
|
+
ctx.hooks[idx] = wrapped;
|
|
160
|
+
return wrapped;
|
|
161
|
+
}
|
|
81
162
|
const proxy = createStore(obj);
|
|
82
163
|
rawMap.set(proxy, obj);
|
|
83
164
|
return proxy;
|
|
84
165
|
}
|
|
85
166
|
/**
|
|
86
|
-
* Creates a shallow reactive proxy.
|
|
87
|
-
* In Pyreon, `createStore` is already per-property (not deeply recursive for primitives),
|
|
88
|
-
* but nested objects will be wrapped. For truly shallow behavior, use individual refs.
|
|
89
|
-
*
|
|
90
|
-
* Difference from Vue: backed by `createStore()` — same as `reactive()` in practice.
|
|
167
|
+
* Creates a shallow reactive proxy — same as `reactive()` in Pyreon.
|
|
91
168
|
*/
|
|
92
169
|
function shallowReactive(obj) {
|
|
93
170
|
return reactive(obj);
|
|
@@ -95,10 +172,20 @@ function shallowReactive(obj) {
|
|
|
95
172
|
/**
|
|
96
173
|
* Returns a readonly proxy that throws on mutation attempts.
|
|
97
174
|
*
|
|
98
|
-
*
|
|
99
|
-
* rather than Vue's full readonly reactive system.
|
|
175
|
+
* Inside a component: hook-indexed.
|
|
100
176
|
*/
|
|
101
177
|
function readonly(obj) {
|
|
178
|
+
const ctx = getCurrentCtx();
|
|
179
|
+
if (ctx) {
|
|
180
|
+
const idx = getHookIndex();
|
|
181
|
+
if (idx < ctx.hooks.length) return ctx.hooks[idx];
|
|
182
|
+
const proxy = _createReadonlyProxy(obj);
|
|
183
|
+
ctx.hooks[idx] = proxy;
|
|
184
|
+
return proxy;
|
|
185
|
+
}
|
|
186
|
+
return _createReadonlyProxy(obj);
|
|
187
|
+
}
|
|
188
|
+
function _createReadonlyProxy(obj) {
|
|
102
189
|
return new Proxy(obj, {
|
|
103
190
|
get(target, key) {
|
|
104
191
|
if (key === V_IS_READONLY) return true;
|
|
@@ -116,8 +203,6 @@ function readonly(obj) {
|
|
|
116
203
|
}
|
|
117
204
|
/**
|
|
118
205
|
* Returns the raw (unwrapped) object behind a reactive or readonly proxy.
|
|
119
|
-
*
|
|
120
|
-
* Difference from Vue: only works for objects created via `reactive()` or `readonly()`.
|
|
121
206
|
*/
|
|
122
207
|
function toRaw(proxy) {
|
|
123
208
|
const readonlyRaw = proxy[V_RAW];
|
|
@@ -127,8 +212,21 @@ function toRaw(proxy) {
|
|
|
127
212
|
/**
|
|
128
213
|
* Creates a ref linked to a property of a reactive object.
|
|
129
214
|
* Reading/writing the ref's `.value` reads/writes the original property.
|
|
215
|
+
*
|
|
216
|
+
* Inside a component: hook-indexed.
|
|
130
217
|
*/
|
|
131
218
|
function toRef(obj, key) {
|
|
219
|
+
const ctx = getCurrentCtx();
|
|
220
|
+
if (ctx) {
|
|
221
|
+
const idx = getHookIndex();
|
|
222
|
+
if (idx < ctx.hooks.length) return ctx.hooks[idx];
|
|
223
|
+
const r = _createToRef(obj, key);
|
|
224
|
+
ctx.hooks[idx] = r;
|
|
225
|
+
return r;
|
|
226
|
+
}
|
|
227
|
+
return _createToRef(obj, key);
|
|
228
|
+
}
|
|
229
|
+
function _createToRef(obj, key) {
|
|
132
230
|
return {
|
|
133
231
|
[V_IS_REF]: true,
|
|
134
232
|
get value() {
|
|
@@ -142,20 +240,61 @@ function toRef(obj, key) {
|
|
|
142
240
|
/**
|
|
143
241
|
* Converts all properties of a reactive object into individual refs.
|
|
144
242
|
* Each ref is linked to the original property (not a copy).
|
|
243
|
+
*
|
|
244
|
+
* Inside a component: hook-indexed (the entire result, not individual refs).
|
|
145
245
|
*/
|
|
146
246
|
function toRefs(obj) {
|
|
247
|
+
const ctx = getCurrentCtx();
|
|
248
|
+
if (ctx) {
|
|
249
|
+
const idx = getHookIndex();
|
|
250
|
+
if (idx < ctx.hooks.length) return ctx.hooks[idx];
|
|
251
|
+
const result = {};
|
|
252
|
+
for (const key of Object.keys(obj)) result[key] = _createToRef(obj, key);
|
|
253
|
+
ctx.hooks[idx] = result;
|
|
254
|
+
return result;
|
|
255
|
+
}
|
|
147
256
|
const result = {};
|
|
148
|
-
for (const key of Object.keys(obj)) result[key] =
|
|
257
|
+
for (const key of Object.keys(obj)) result[key] = _createToRef(obj, key);
|
|
149
258
|
return result;
|
|
150
259
|
}
|
|
151
260
|
/**
|
|
152
261
|
* Watches a reactive source and calls `cb` when it changes.
|
|
153
|
-
* Tracks old and new values.
|
|
154
262
|
*
|
|
155
|
-
*
|
|
156
|
-
* Returns a stop function to dispose the watcher.
|
|
263
|
+
* Inside a component: hook-indexed, created once. Disposed on unmount.
|
|
157
264
|
*/
|
|
158
265
|
function watch(source, cb, options) {
|
|
266
|
+
const ctx = getCurrentCtx();
|
|
267
|
+
if (ctx) {
|
|
268
|
+
const idx = getHookIndex();
|
|
269
|
+
if (idx < ctx.hooks.length) return ctx.hooks[idx];
|
|
270
|
+
const getter = isRef(source) ? () => source.value : source;
|
|
271
|
+
let oldValue;
|
|
272
|
+
let initialized = false;
|
|
273
|
+
if (options?.immediate) {
|
|
274
|
+
oldValue = void 0;
|
|
275
|
+
const current = getter();
|
|
276
|
+
cb(current, oldValue);
|
|
277
|
+
oldValue = current;
|
|
278
|
+
initialized = true;
|
|
279
|
+
}
|
|
280
|
+
let running = false;
|
|
281
|
+
const e = effect(() => {
|
|
282
|
+
if (running) return;
|
|
283
|
+
running = true;
|
|
284
|
+
try {
|
|
285
|
+
const newValue = getter();
|
|
286
|
+
if (initialized) cb(newValue, oldValue);
|
|
287
|
+
oldValue = newValue;
|
|
288
|
+
initialized = true;
|
|
289
|
+
} finally {
|
|
290
|
+
running = false;
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
const stop = () => e.dispose();
|
|
294
|
+
ctx.hooks[idx] = stop;
|
|
295
|
+
ctx.unmountCallbacks.push(stop);
|
|
296
|
+
return stop;
|
|
297
|
+
}
|
|
159
298
|
const getter = isRef(source) ? () => source.value : source;
|
|
160
299
|
let oldValue;
|
|
161
300
|
let initialized = false;
|
|
@@ -166,11 +305,18 @@ function watch(source, cb, options) {
|
|
|
166
305
|
oldValue = current;
|
|
167
306
|
initialized = true;
|
|
168
307
|
}
|
|
308
|
+
let running = false;
|
|
169
309
|
const e = effect(() => {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
310
|
+
if (running) return;
|
|
311
|
+
running = true;
|
|
312
|
+
try {
|
|
313
|
+
const newValue = getter();
|
|
314
|
+
if (initialized) cb(newValue, oldValue);
|
|
315
|
+
oldValue = newValue;
|
|
316
|
+
initialized = true;
|
|
317
|
+
} finally {
|
|
318
|
+
running = false;
|
|
319
|
+
}
|
|
174
320
|
});
|
|
175
321
|
return () => e.dispose();
|
|
176
322
|
}
|
|
@@ -178,61 +324,117 @@ function watch(source, cb, options) {
|
|
|
178
324
|
* Runs the given function reactively — re-executes whenever its tracked
|
|
179
325
|
* dependencies change.
|
|
180
326
|
*
|
|
181
|
-
*
|
|
182
|
-
* Returns a stop function.
|
|
327
|
+
* Inside a component: hook-indexed, created once. Disposed on unmount.
|
|
183
328
|
*/
|
|
184
329
|
function watchEffect(fn) {
|
|
185
|
-
const
|
|
330
|
+
const ctx = getCurrentCtx();
|
|
331
|
+
if (ctx) {
|
|
332
|
+
const idx = getHookIndex();
|
|
333
|
+
if (idx < ctx.hooks.length) return ctx.hooks[idx];
|
|
334
|
+
let running = false;
|
|
335
|
+
const e = effect(() => {
|
|
336
|
+
if (running) return;
|
|
337
|
+
running = true;
|
|
338
|
+
try {
|
|
339
|
+
fn();
|
|
340
|
+
} finally {
|
|
341
|
+
running = false;
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
const stop = () => e.dispose();
|
|
345
|
+
ctx.hooks[idx] = stop;
|
|
346
|
+
ctx.unmountCallbacks.push(stop);
|
|
347
|
+
return stop;
|
|
348
|
+
}
|
|
349
|
+
let running = false;
|
|
350
|
+
const e = effect(() => {
|
|
351
|
+
if (running) return;
|
|
352
|
+
running = true;
|
|
353
|
+
try {
|
|
354
|
+
fn();
|
|
355
|
+
} finally {
|
|
356
|
+
running = false;
|
|
357
|
+
}
|
|
358
|
+
});
|
|
186
359
|
return () => e.dispose();
|
|
187
360
|
}
|
|
188
361
|
/**
|
|
189
362
|
* Registers a callback to run after the component is mounted.
|
|
190
|
-
*
|
|
191
|
-
* Difference from Vue: maps directly to Pyreon's `onMount()`.
|
|
192
|
-
* In Pyreon there is no distinction between beforeMount and mounted.
|
|
363
|
+
* Hook-indexed: only registered on first render.
|
|
193
364
|
*/
|
|
194
365
|
function onMounted(fn) {
|
|
195
|
-
|
|
196
|
-
|
|
366
|
+
const ctx = getCurrentCtx();
|
|
367
|
+
if (!ctx) {
|
|
368
|
+
onMount(() => {
|
|
369
|
+
fn();
|
|
370
|
+
});
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
const idx = getHookIndex();
|
|
374
|
+
if (idx < ctx.hooks.length) return;
|
|
375
|
+
ctx.hooks[idx] = true;
|
|
376
|
+
ctx.pendingEffects.push({
|
|
377
|
+
fn: () => {
|
|
378
|
+
fn();
|
|
379
|
+
},
|
|
380
|
+
deps: [],
|
|
381
|
+
cleanup: void 0
|
|
197
382
|
});
|
|
198
383
|
}
|
|
199
384
|
/**
|
|
200
|
-
* Registers a callback to run
|
|
201
|
-
*
|
|
202
|
-
* Difference from Vue: maps to Pyreon's `onUnmount()`.
|
|
203
|
-
* In Pyreon there is no distinction between beforeUnmount and unmounted.
|
|
385
|
+
* Registers a callback to run when the component is unmounted.
|
|
386
|
+
* Hook-indexed: only registered on first render.
|
|
204
387
|
*/
|
|
205
388
|
function onUnmounted(fn) {
|
|
206
|
-
|
|
389
|
+
const ctx = getCurrentCtx();
|
|
390
|
+
if (!ctx) {
|
|
391
|
+
onUnmount(fn);
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
394
|
+
const idx = getHookIndex();
|
|
395
|
+
if (idx < ctx.hooks.length) return;
|
|
396
|
+
ctx.hooks[idx] = true;
|
|
397
|
+
ctx.unmountCallbacks.push(fn);
|
|
207
398
|
}
|
|
208
399
|
/**
|
|
209
|
-
* Registers a callback to run after a reactive update.
|
|
210
|
-
*
|
|
211
|
-
* Difference from Vue: maps to Pyreon's `onUpdate()`.
|
|
400
|
+
* Registers a callback to run after a reactive update (not on initial mount).
|
|
401
|
+
* Hook-indexed: registered once, fires on each re-render.
|
|
212
402
|
*/
|
|
213
403
|
function onUpdated(fn) {
|
|
214
|
-
|
|
404
|
+
const ctx = getCurrentCtx();
|
|
405
|
+
if (!ctx) {
|
|
406
|
+
onUpdate(fn);
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
const idx = getHookIndex();
|
|
410
|
+
if (idx >= ctx.hooks.length) {
|
|
411
|
+
ctx.hooks[idx] = true;
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
ctx.pendingEffects.push({
|
|
415
|
+
fn: () => {
|
|
416
|
+
fn();
|
|
417
|
+
},
|
|
418
|
+
deps: void 0,
|
|
419
|
+
cleanup: void 0
|
|
420
|
+
});
|
|
215
421
|
}
|
|
216
422
|
/**
|
|
217
423
|
* Registers a callback to run before mount.
|
|
218
|
-
* In Pyreon there is no pre-mount phase — maps to `
|
|
424
|
+
* In Pyreon there is no pre-mount phase — maps to `onMounted()`.
|
|
219
425
|
*/
|
|
220
426
|
function onBeforeMount(fn) {
|
|
221
|
-
|
|
222
|
-
fn();
|
|
223
|
-
});
|
|
427
|
+
onMounted(fn);
|
|
224
428
|
}
|
|
225
429
|
/**
|
|
226
430
|
* Registers a callback to run before unmount.
|
|
227
|
-
* In Pyreon there is no pre-unmount phase — maps to `
|
|
431
|
+
* In Pyreon there is no pre-unmount phase — maps to `onUnmounted()`.
|
|
228
432
|
*/
|
|
229
433
|
function onBeforeUnmount(fn) {
|
|
230
|
-
|
|
434
|
+
onUnmounted(fn);
|
|
231
435
|
}
|
|
232
436
|
/**
|
|
233
437
|
* Returns a Promise that resolves after all pending reactive updates have flushed.
|
|
234
|
-
*
|
|
235
|
-
* Difference from Vue: identical to Pyreon's `nextTick()`.
|
|
236
438
|
*/
|
|
237
439
|
function nextTick() {
|
|
238
440
|
return nextTick$1();
|
|
@@ -244,19 +446,24 @@ function getOrCreateContext(key, defaultValue) {
|
|
|
244
446
|
/**
|
|
245
447
|
* Provides a value to all descendant components.
|
|
246
448
|
*
|
|
247
|
-
*
|
|
248
|
-
* Must be called during component setup. The value is scoped to the component
|
|
249
|
-
* tree — not globally shared.
|
|
449
|
+
* Inside a component: hook-indexed, pushed once. Popped on unmount.
|
|
250
450
|
*/
|
|
251
451
|
function provide(key, value) {
|
|
252
|
-
const ctx =
|
|
253
|
-
|
|
254
|
-
|
|
452
|
+
const ctx = getCurrentCtx();
|
|
453
|
+
if (ctx) {
|
|
454
|
+
const idx = getHookIndex();
|
|
455
|
+
if (idx < ctx.hooks.length) return;
|
|
456
|
+
ctx.hooks[idx] = true;
|
|
457
|
+
const vueCtx = getOrCreateContext(key);
|
|
458
|
+
pushContext(new Map([[vueCtx.id, value]]));
|
|
459
|
+
ctx.unmountCallbacks.push(() => popContext());
|
|
460
|
+
return;
|
|
461
|
+
}
|
|
462
|
+
const vueCtx = getOrCreateContext(key);
|
|
463
|
+
pushContext(new Map([[vueCtx.id, value]]));
|
|
255
464
|
}
|
|
256
465
|
/**
|
|
257
466
|
* Injects a value provided by an ancestor component.
|
|
258
|
-
*
|
|
259
|
-
* Difference from Vue: backed by Pyreon's context system (useContext).
|
|
260
467
|
*/
|
|
261
468
|
function inject(key, defaultValue) {
|
|
262
469
|
const value = useContext(getOrCreateContext(key));
|
|
@@ -265,9 +472,6 @@ function inject(key, defaultValue) {
|
|
|
265
472
|
/**
|
|
266
473
|
* Defines a component using Vue 3 Composition API style.
|
|
267
474
|
* Only supports the `setup()` function — Options API is not supported.
|
|
268
|
-
*
|
|
269
|
-
* Difference from Vue: returns a Pyreon `ComponentFn`. No template/render option —
|
|
270
|
-
* the setup function should return a render function or VNode directly.
|
|
271
475
|
*/
|
|
272
476
|
function defineComponent(options) {
|
|
273
477
|
if (typeof options === "function") return options;
|
|
@@ -283,9 +487,6 @@ function defineComponent(options) {
|
|
|
283
487
|
}
|
|
284
488
|
/**
|
|
285
489
|
* Creates a Pyreon application instance — Vue 3 `createApp()` compatible.
|
|
286
|
-
*
|
|
287
|
-
* Difference from Vue: does not support plugins, directives, or global config.
|
|
288
|
-
* The component receives `props` if provided.
|
|
289
490
|
*/
|
|
290
491
|
function createApp(component, props) {
|
|
291
492
|
return {
|
package/lib/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["pyreonComputed","pyreonNextTick","pyreonMount"],"sources":["../../src/index.ts"],"mappings":";;;;;;;;;;;;;AA8DA,SAAgB,GAAA,CAAO,KAAA,EAAkB;EACvC,MAAM,CAAA,GAAI,MAAA,CAAO,KAAA,CAAM;EAYvB,OAXU;KACP,QAAA,GAAW,IAAA;IACZ,IAAI,KAAA,CAAA,EAAW;MACb,OAAO,CAAA,CAAA,CAAG;;IAEZ,IAAI,KAAA,CAAM,QAAA,EAAa;MACrB,CAAA,CAAE,GAAA,CAAI,QAAA,CAAS;;IAGjB,OAAA,EAAS;GACV;;;;;;;AASH,SAAgB,UAAA,CAAc,KAAA,EAAkB;EAC9C,OAAO,GAAA,CAAI,KAAA,CAAM;;;;;AAMnB,SAAgB,UAAA,CAAc,CAAA,EAAiB;EAC7C,MAAM,QAAA,GAAW,CAAA;EACjB,IAAI,QAAA,CAAS,OAAA,EAAS;IAEpB,MAAM,OAAA,GAAU,QAAA,CAAS,OAAA,CAAQ,IAAA,CAAA,CAAM;IACvC,QAAA,CAAS,OAAA,CAAQ,GAAA,CAAI,KA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