ilha 0.14.3 → 0.14.4
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/README.md +3 -1
- package/dist/define.d.ts +2 -2
- package/dist/define.js +4 -4
- package/dist/index.d.ts +18 -13
- package/dist/index.js +34 -34
- package/dist/jsx-dev-runtime.d.ts +2 -2
- package/dist/jsx-dev-runtime.js +1 -1
- package/dist/jsx-runtime.d.ts +5 -5
- package/dist/jsx-runtime.js +1 -1
- package/dist/mount-hD-OyLIo.js +1519 -0
- package/dist/types-DQVTD0ts.d.ts +41 -0
- package/dist/{vnode-15tImQ6O.d.ts → vnode-DHBqDHtZ.d.ts} +19 -16
- package/dist/vnode-DP76Gn-b.js +89 -0
- package/package.json +1 -1
- package/dist/mount-CCMOkDSb.js +0 -1661
- package/dist/types-Cie0Ihl6.d.ts +0 -32
- package/dist/vnode-DHN2EFHi.js +0 -37
package/dist/types-Cie0Ihl6.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import "effect/Scope";
|
|
2
|
-
import { AtomRegistry } from "effect/unstable/reactivity/AtomRegistry";
|
|
3
|
-
import { Effect, Stream } from "effect";
|
|
4
|
-
import { Atom } from "effect/unstable/reactivity";
|
|
5
|
-
//#region src/types.d.ts
|
|
6
|
-
type JsonText = string | number | bigint | boolean | null | undefined;
|
|
7
|
-
type View = VNode | JsonText | AtomHandle<any> | Stream.Stream<View, any, any> | GeneratorFn | Component | View[] | Iterable<View>;
|
|
8
|
-
declare const Fragment: unique symbol;
|
|
9
|
-
type Fragment = typeof Fragment;
|
|
10
|
-
interface VNode {
|
|
11
|
-
readonly $$ilha: 1;
|
|
12
|
-
readonly type: string | Fragment | ((props: Record<string, unknown>) => unknown);
|
|
13
|
-
readonly props: Record<string, unknown>;
|
|
14
|
-
readonly children: View[];
|
|
15
|
-
readonly key?: string | number;
|
|
16
|
-
}
|
|
17
|
-
type GeneratorFn = (this: void, ...args: any[]) => Generator<Yielded, View | void, unknown>;
|
|
18
|
-
type Yielded = View | Instruction<any> | Effect.Effect<any, any, any>;
|
|
19
|
-
interface Instruction<A, E = unknown> extends Iterable<Instruction<A, E>, A>, PromiseLike<A> {
|
|
20
|
-
readonly $$ilhaOp: 1;
|
|
21
|
-
readonly effect: Effect.Effect<A, E, AtomRegistry>;
|
|
22
|
-
}
|
|
23
|
-
type Component = (() => View | void | Promise<View | void>) | GeneratorFn;
|
|
24
|
-
interface AtomHandle<A> {
|
|
25
|
-
readonly $$atom: 1;
|
|
26
|
-
readonly atom: Atom.Atom<A>;
|
|
27
|
-
(): A;
|
|
28
|
-
set(next: A): void;
|
|
29
|
-
update(f: (current: A) => A): void;
|
|
30
|
-
}
|
|
31
|
-
//#endregion
|
|
32
|
-
export { VNode as a, Instruction as i, Component as n, View as o, Fragment as r, Yielded as s, AtomHandle as t };
|
package/dist/vnode-DHN2EFHi.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
//#region src/types.ts
|
|
2
|
-
const Fragment = Symbol("ilha.Fragment");
|
|
3
|
-
|
|
4
|
-
//#endregion
|
|
5
|
-
//#region src/vnode.ts
|
|
6
|
-
function h(type, props, ...rest) {
|
|
7
|
-
const p = { ...props };
|
|
8
|
-
const fromProps = p.children;
|
|
9
|
-
delete p.children;
|
|
10
|
-
const children = flatten([...fromProps === void 0 ? [] : [fromProps], ...rest]);
|
|
11
|
-
const key = p.key;
|
|
12
|
-
delete p.key;
|
|
13
|
-
return {
|
|
14
|
-
$$ilha: 1,
|
|
15
|
-
type,
|
|
16
|
-
props: p,
|
|
17
|
-
children,
|
|
18
|
-
key
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
function flatten(xs) {
|
|
22
|
-
const out = [];
|
|
23
|
-
for (const x of xs) if (Array.isArray(x)) out.push(...flatten(x));
|
|
24
|
-
else out.push(x);
|
|
25
|
-
return out;
|
|
26
|
-
}
|
|
27
|
-
function isVNode(x) {
|
|
28
|
-
return typeof x === "object" && x !== null && x.$$ilha === 1;
|
|
29
|
-
}
|
|
30
|
-
function isSetupFn(x) {
|
|
31
|
-
if (typeof x !== "function") return false;
|
|
32
|
-
const n = x.constructor?.name;
|
|
33
|
-
return n === "GeneratorFunction" || n === "AsyncFunction";
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
//#endregion
|
|
37
|
-
export { Fragment as i, isSetupFn as n, isVNode as r, h as t };
|