@manyducks.co/dolla 2.0.0-alpha.57 → 2.0.0-alpha.58
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/bun.lock +207 -0
- package/dist/core/app.d.ts +17 -0
- package/dist/core/context.d.ts +71 -19
- package/dist/core/index.d.ts +2 -2
- package/dist/core/logger.d.ts +2 -2
- package/dist/core/markup.d.ts +14 -13
- package/dist/core/mount.d.ts +2 -2
- package/dist/core/nodes/dom.d.ts +3 -2
- package/dist/core/nodes/dynamic.d.ts +2 -1
- package/dist/core/nodes/html.d.ts +7 -5
- package/dist/core/nodes/portal.d.ts +4 -3
- package/dist/core/nodes/repeat.d.ts +5 -3
- package/dist/core/nodes/view.d.ts +6 -8
- package/dist/core/signals.d.ts +3 -23
- package/dist/core/views/default-crash-view.d.ts +12 -1
- package/dist/i18n.js +1 -1
- package/dist/index.js +85 -87
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.d.ts +2 -1
- package/dist/jsx-dev-runtime.js +4 -11
- package/dist/jsx-dev-runtime.js.map +1 -1
- package/dist/jsx-runtime.d.ts +3 -2
- package/dist/jsx-runtime.js +7 -13
- package/dist/jsx-runtime.js.map +1 -1
- package/dist/logger-C2AJnlaL.js +516 -0
- package/dist/logger-C2AJnlaL.js.map +1 -0
- package/dist/markup-BJx8Fwl2.js +1019 -0
- package/dist/markup-BJx8Fwl2.js.map +1 -0
- package/dist/{router-ClSFnmRK.js → router-vfGbWwl9.js} +77 -76
- package/dist/router-vfGbWwl9.js.map +1 -0
- package/dist/router.js +1 -1
- package/dist/types.d.ts +7 -0
- package/docs/markup.md +4 -4
- package/package.json +2 -2
- package/dist/logger-sSxIw5od.js +0 -626
- package/dist/logger-sSxIw5od.js.map +0 -1
- package/dist/markup-CAJd0zdA.js +0 -937
- package/dist/markup-CAJd0zdA.js.map +0 -1
- package/dist/router-ClSFnmRK.js.map +0 -1
package/dist/core/signals.d.ts
CHANGED
|
@@ -1,24 +1,3 @@
|
|
|
1
|
-
import { type Dependency, type Subscriber, SubscriberFlags } from "alien-signals";
|
|
2
|
-
export interface Effect extends Subscriber, Dependency {
|
|
3
|
-
/**
|
|
4
|
-
* Effect function. Can return an optional cleanup callback to be invoked before the next fn() call.
|
|
5
|
-
*/
|
|
6
|
-
fn(): (() => void) | void;
|
|
7
|
-
cleanup?: () => void;
|
|
8
|
-
}
|
|
9
|
-
export interface Computed<T = any> extends Value<T | undefined>, Subscriber {
|
|
10
|
-
getter: (cachedValue?: T) => T;
|
|
11
|
-
equals: EqualityFn<T>;
|
|
12
|
-
}
|
|
13
|
-
export interface Value<T = any> extends Dependency {
|
|
14
|
-
current: T;
|
|
15
|
-
}
|
|
16
|
-
export declare const link: (dep: Dependency, sub: Subscriber) => import("alien-signals").Link | undefined, propagate: (link: import("alien-signals").Link) => void, updateDirtyFlag: (sub: Subscriber, flags: SubscriberFlags) => boolean, startTracking: (sub: Subscriber) => void, endTracking: (sub: Subscriber) => void, processEffectNotifications: () => void, processComputedUpdate: (computed: Dependency & Subscriber, flags: SubscriberFlags) => void, processPendingInnerEffects: (sub: Subscriber, flags: SubscriberFlags) => void;
|
|
17
|
-
export declare let activeSub: Subscriber | undefined;
|
|
18
|
-
export declare function queueEffect(e: Effect): void;
|
|
19
|
-
export declare function stopEffect(this: Effect): void;
|
|
20
|
-
export declare function pauseTracking(): void;
|
|
21
|
-
export declare function resumeTracking(): void;
|
|
22
1
|
/**
|
|
23
2
|
* A getter that returns the current value held within the signal.
|
|
24
3
|
* If called inside a trackable scope this signal will be tracked as a dependency.
|
|
@@ -42,7 +21,8 @@ export interface SignalOptions<T> {
|
|
|
42
21
|
equals?: EqualityFn<T>;
|
|
43
22
|
}
|
|
44
23
|
export declare function isSource<T>(value: MaybeSignal<T>): value is Source<T>;
|
|
45
|
-
export declare function
|
|
24
|
+
export declare function batch(fn: () => void): void;
|
|
25
|
+
export declare function untracked<T>(value: MaybeSignal<T>): T;
|
|
46
26
|
export declare function get<T>(value: MaybeSignal<T>): T;
|
|
47
27
|
/**
|
|
48
28
|
* Function to be invoked for the effect. Can return an optional cleanup function to be called between invocations.
|
|
@@ -57,7 +37,7 @@ export type UnsubscribeFn = () => void;
|
|
|
57
37
|
* If you are using an effect inside a View or Store, use `ctx.effect` instead, which cleans up automatically when the component unmounts.
|
|
58
38
|
*/
|
|
59
39
|
export declare function effect(fn: EffectFn): UnsubscribeFn;
|
|
60
|
-
export declare function $<T>(compute: () => MaybeSignal<T>, options?: SignalOptions<T>): Signal<T>;
|
|
40
|
+
export declare function $<T>(compute: (previousValue: T) => MaybeSignal<T>, options?: SignalOptions<T>): Signal<T>;
|
|
61
41
|
export declare function $<T>(value: T, options?: SignalOptions<T>): Source<T>;
|
|
62
42
|
export declare function $<T>(value: undefined, options?: SignalOptions<T>): Source<T | undefined>;
|
|
63
43
|
export declare function $<T>(): Source<T | undefined>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Markup } from "../markup.js";
|
|
1
2
|
/**
|
|
2
3
|
* Props passed to the crash view when a crash occurs.
|
|
3
4
|
*/
|
|
@@ -19,4 +20,14 @@ export type CrashViewProps = {
|
|
|
19
20
|
*/
|
|
20
21
|
tagName?: string;
|
|
21
22
|
};
|
|
22
|
-
export declare function DefaultCrashView(props: CrashViewProps):
|
|
23
|
+
export declare function DefaultCrashView(props: CrashViewProps): Markup<{
|
|
24
|
+
style: {
|
|
25
|
+
backgroundColor: string;
|
|
26
|
+
color: string;
|
|
27
|
+
padding: string;
|
|
28
|
+
position: string;
|
|
29
|
+
inset: number;
|
|
30
|
+
fontSize: string;
|
|
31
|
+
};
|
|
32
|
+
children: Markup<any>[];
|
|
33
|
+
}>;
|
package/dist/i18n.js
CHANGED
|
@@ -5,7 +5,7 @@ var D = (o) => {
|
|
|
5
5
|
var J = (o, t, e) => t in o ? B(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
|
|
6
6
|
var O = (o, t, e) => J(o, typeof t != "symbol" ? t + "" : t, e), _ = (o, t, e) => t.has(o) || D("Cannot " + e);
|
|
7
7
|
var i = (o, t, e) => (_(o, t, "read from private field"), e ? e.call(o) : t.get(o)), m = (o, t, e) => t.has(o) ? D("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(o) : t.set(o, e), N = (o, t, e, n) => (_(o, t, "write to private field"), n ? n.call(o, e) : t.set(o, e), e), g = (o, t, e) => (_(o, t, "access private method"), e);
|
|
8
|
-
import { $, f as K, d as Q, g as x } from "./logger-
|
|
8
|
+
import { $, f as K, d as Q, g as x } from "./logger-C2AJnlaL.js";
|
|
9
9
|
import { b as C, i as j, c as U, t as P } from "./typeChecking-BJ-ymQ2F.js";
|
|
10
10
|
var I, F, p, S, G;
|
|
11
11
|
class W {
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { o as
|
|
2
|
-
import { $ as
|
|
3
|
-
import {
|
|
4
|
-
import { c as
|
|
5
|
-
import { R as
|
|
1
|
+
import { o as g } from "./logger-C2AJnlaL.js";
|
|
2
|
+
import { $ as L, f as T, d as q, e as B, g as $, b as v, c as O, h as P, i as S, s as z, a as A, u as D } from "./logger-C2AJnlaL.js";
|
|
3
|
+
import { M as h, m as t, w, C as n, V as c } from "./markup-BJx8Fwl2.js";
|
|
4
|
+
import { c as Y, p as G, r as W, a as _, u as j } from "./markup-BJx8Fwl2.js";
|
|
5
|
+
import { R as y, M as p, U as b } from "./router-vfGbWwl9.js";
|
|
6
6
|
import { a as x } from "./typeChecking-BJ-ymQ2F.js";
|
|
7
|
-
const
|
|
8
|
-
function
|
|
7
|
+
const u = Symbol("Ref.EMPTY");
|
|
8
|
+
function N(e = u) {
|
|
9
9
|
return function() {
|
|
10
10
|
if (arguments.length === 0) {
|
|
11
|
-
if (e ===
|
|
11
|
+
if (e === u)
|
|
12
12
|
throw new Error("Ref getter was called, but ref has no value! Be sure to set your refs before accessing them.");
|
|
13
13
|
} else if (arguments.length === 1)
|
|
14
14
|
e = arguments[0];
|
|
@@ -18,99 +18,97 @@ function C(e = c) {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
function E(e) {
|
|
21
|
-
return
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
inset: 0,
|
|
30
|
-
fontSize: "20px"
|
|
31
|
-
}
|
|
21
|
+
return new h("div", {
|
|
22
|
+
style: {
|
|
23
|
+
backgroundColor: "#880000",
|
|
24
|
+
color: "#fff",
|
|
25
|
+
padding: "2rem",
|
|
26
|
+
position: "fixed",
|
|
27
|
+
inset: 0,
|
|
28
|
+
fontSize: "20px"
|
|
32
29
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"p",
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
30
|
+
children: [
|
|
31
|
+
t("h1", { style: { marginBottom: "0.5rem" }, children: "The app has crashed" }),
|
|
32
|
+
t("p", {
|
|
33
|
+
style: { marginBottom: "0.25rem" },
|
|
34
|
+
children: [
|
|
35
|
+
t("span", {
|
|
36
|
+
style: { fontFamily: "monospace" },
|
|
37
|
+
children: e.loggerName
|
|
38
|
+
}),
|
|
39
|
+
w(
|
|
40
|
+
e.tag,
|
|
41
|
+
t("span", {
|
|
42
|
+
style: { fontFamily: "monospace", opacity: 0.5 },
|
|
43
|
+
children: ` [${e.tagName ? `${e.tagName}: ` : ""}${e.tag}]`
|
|
44
|
+
})
|
|
45
|
+
),
|
|
46
|
+
" says:"
|
|
47
|
+
]
|
|
48
|
+
}),
|
|
49
|
+
t("blockquote", {
|
|
51
50
|
style: {
|
|
52
51
|
backgroundColor: "#991111",
|
|
53
52
|
padding: "0.25em",
|
|
54
53
|
borderRadius: "6px",
|
|
55
54
|
fontFamily: "monospace",
|
|
56
55
|
marginBottom: "1rem"
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
t(
|
|
60
|
-
"span",
|
|
61
|
-
{
|
|
62
|
-
style: {
|
|
63
|
-
display: "inline-block",
|
|
64
|
-
backgroundColor: "red",
|
|
65
|
-
padding: "0.1em 0.4em",
|
|
66
|
-
marginRight: "0.5em",
|
|
67
|
-
borderRadius: "4px",
|
|
68
|
-
fontSize: "0.9em",
|
|
69
|
-
fontWeight: "bold"
|
|
70
|
-
}
|
|
71
56
|
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
57
|
+
children: [
|
|
58
|
+
t("span", {
|
|
59
|
+
style: {
|
|
60
|
+
display: "inline-block",
|
|
61
|
+
backgroundColor: "red",
|
|
62
|
+
padding: "0.1em 0.4em",
|
|
63
|
+
marginRight: "0.5em",
|
|
64
|
+
borderRadius: "4px",
|
|
65
|
+
fontSize: "0.9em",
|
|
66
|
+
fontWeight: "bold"
|
|
67
|
+
},
|
|
68
|
+
children: e.error.name
|
|
69
|
+
}),
|
|
70
|
+
e.error.message
|
|
71
|
+
]
|
|
72
|
+
}),
|
|
73
|
+
t("p", { children: "Please see the browser console for details." })
|
|
74
|
+
]
|
|
75
|
+
});
|
|
78
76
|
}
|
|
79
77
|
let o = !1;
|
|
80
|
-
async function
|
|
81
|
-
if (x(Element,
|
|
78
|
+
async function U(e, s, r) {
|
|
79
|
+
if (x(Element, s, "Expected an element or a selector string. Got type: %t, value: %v"), o)
|
|
82
80
|
throw new Error("A Dolla app is already mounted.");
|
|
83
|
-
let
|
|
84
|
-
const a = (r == null ? void 0 : r.context) ?? new
|
|
85
|
-
|
|
86
|
-
o &&
|
|
87
|
-
}),
|
|
88
|
-
async function
|
|
89
|
-
o && (
|
|
81
|
+
let l, i, f = (r == null ? void 0 : r.crashView) ?? E;
|
|
82
|
+
const a = (r == null ? void 0 : r.context) ?? new n("App");
|
|
83
|
+
g((d) => {
|
|
84
|
+
o && m(), new c(a, f, d).mount(s);
|
|
85
|
+
}), n.willMount(a), e instanceof y ? (i = e, l = await i[p](s, a)) : l = new c(a, e, {}), l.mount(s), o = !0, n.didMount(a);
|
|
86
|
+
async function m() {
|
|
87
|
+
o && (n.willUnmount(a), l.unmount(!1), i && await i[b](), o = !1, n.didUnmount(a));
|
|
90
88
|
}
|
|
91
|
-
return
|
|
89
|
+
return m;
|
|
92
90
|
}
|
|
93
91
|
export {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
92
|
+
L as $,
|
|
93
|
+
Y as createContext,
|
|
94
|
+
T as createLogger,
|
|
95
|
+
q as deepEqual,
|
|
96
|
+
B as effect,
|
|
97
|
+
$ as get,
|
|
98
|
+
v as getEnv,
|
|
101
99
|
t as m,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
100
|
+
U as mount,
|
|
101
|
+
G as portal,
|
|
102
|
+
N as ref,
|
|
103
|
+
W as render,
|
|
104
|
+
_ as repeat,
|
|
105
|
+
O as setEnv,
|
|
106
|
+
P as setLogFilter,
|
|
107
|
+
S as setLogLevels,
|
|
108
|
+
z as shallowEqual,
|
|
109
|
+
A as strictEqual,
|
|
110
|
+
j as unless,
|
|
111
|
+
D as untracked,
|
|
112
|
+
w as when
|
|
115
113
|
};
|
|
116
114
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/core/ref.ts","../src/core/views/default-crash-view.ts","../src/core/mount.ts"],"sourcesContent":["const EMPTY_REF = Symbol(\"Ref.EMPTY\");\n\n/**\n * A hybrid getter/setter function that stores the last value it was called with.\n * Guarantees a value is held at runtime by throwing an error if no value is set.\n */\nexport interface Ref<T> {\n /**\n * Returns the currently stored value of the ref, or throws an error if no value has been set.\n */\n (): T;\n\n /**\n * Stores a new value to the ref and returns that value.\n */\n (value: T): T;\n}\n\n/**\n * Creates a Ref.\n */\nexport function ref<T>(value?: T): Ref<T>;\n\nexport function ref(value = EMPTY_REF) {\n return function () {\n if (arguments.length === 0) {\n if (value === EMPTY_REF) {\n throw new Error(`Ref getter was called, but ref has no value! Be sure to set your refs before accessing them.`);\n }\n } else if (arguments.length === 1) {\n value = arguments[0];\n } else {\n throw new Error(`Ref called with too many arguments. Expected 0 or 1 arguments.`);\n }\n\n return value;\n };\n}\n","import { when, m } from \"../markup.js\";\n\n/**\n * Props passed to the crash view when a crash occurs.\n */\nexport type CrashViewProps = {\n /**\n * JavaScript Error object.\n */\n error: Error;\n\n /**\n * A string to identify the logger that reported this error.\n */\n loggerName: string;\n\n /**\n * Unique identifier to pinpoint the specific view that reported the crash.\n */\n tag?: string;\n\n /**\n * Label for the tag.\n */\n tagName?: string;\n};\n\nexport function DefaultCrashView(props: CrashViewProps) {\n return
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/core/ref.ts","../src/core/views/default-crash-view.ts","../src/core/mount.ts"],"sourcesContent":["const EMPTY_REF = Symbol(\"Ref.EMPTY\");\n\n/**\n * A hybrid getter/setter function that stores the last value it was called with.\n * Guarantees a value is held at runtime by throwing an error if no value is set.\n */\nexport interface Ref<T> {\n /**\n * Returns the currently stored value of the ref, or throws an error if no value has been set.\n */\n (): T;\n\n /**\n * Stores a new value to the ref and returns that value.\n */\n (value: T): T;\n}\n\n/**\n * Creates a Ref.\n */\nexport function ref<T>(value?: T): Ref<T>;\n\nexport function ref(value = EMPTY_REF) {\n return function () {\n if (arguments.length === 0) {\n if (value === EMPTY_REF) {\n throw new Error(`Ref getter was called, but ref has no value! Be sure to set your refs before accessing them.`);\n }\n } else if (arguments.length === 1) {\n value = arguments[0];\n } else {\n throw new Error(`Ref called with too many arguments. Expected 0 or 1 arguments.`);\n }\n\n return value;\n };\n}\n","import { when, m, Markup } from \"../markup.js\";\n\n/**\n * Props passed to the crash view when a crash occurs.\n */\nexport type CrashViewProps = {\n /**\n * JavaScript Error object.\n */\n error: Error;\n\n /**\n * A string to identify the logger that reported this error.\n */\n loggerName: string;\n\n /**\n * Unique identifier to pinpoint the specific view that reported the crash.\n */\n tag?: string;\n\n /**\n * Label for the tag.\n */\n tagName?: string;\n};\n\nexport function DefaultCrashView(props: CrashViewProps) {\n return new Markup(\"div\", {\n style: {\n backgroundColor: \"#880000\",\n color: \"#fff\",\n padding: \"2rem\",\n position: \"fixed\",\n inset: 0,\n fontSize: \"20px\",\n },\n children: [\n m(\"h1\", { style: { marginBottom: \"0.5rem\" }, children: \"The app has crashed\" }),\n m(\"p\", {\n style: { marginBottom: \"0.25rem\" },\n children: [\n m(\"span\", {\n style: { fontFamily: \"monospace\" },\n children: props.loggerName,\n }),\n when(\n props.tag,\n m(\"span\", {\n style: { fontFamily: \"monospace\", opacity: 0.5 },\n children: ` [${props.tagName ? `${props.tagName}: ` : \"\"}${props.tag}]`,\n }),\n ),\n \" says:\",\n ],\n }),\n m(\"blockquote\", {\n style: {\n backgroundColor: \"#991111\",\n padding: \"0.25em\",\n borderRadius: \"6px\",\n fontFamily: \"monospace\",\n marginBottom: \"1rem\",\n },\n children: [\n m(\"span\", {\n style: {\n display: \"inline-block\",\n backgroundColor: \"red\",\n padding: \"0.1em 0.4em\",\n marginRight: \"0.5em\",\n borderRadius: \"4px\",\n fontSize: \"0.9em\",\n fontWeight: \"bold\",\n },\n children: props.error.name,\n }),\n props.error.message,\n ],\n }),\n m(\"p\", { children: \"Please see the browser console for details.\" }),\n ],\n });\n}\n","import { MOUNT, Router, UNMOUNT } from \"../router/router\";\nimport { assertInstanceOf } from \"../typeChecking\";\nimport type { View } from \"../types\";\nimport { Context } from \"./context\";\nimport { type LoggerErrorProps, onLoggerCrash } from \"./logger\";\nimport { type MarkupNode } from \"./markup\";\nimport { ViewInstance } from \"./nodes/view\";\nimport { DefaultCrashView } from \"./views/default-crash-view\";\n\nlet isMounted = false;\n\nexport type UnmountFn = () => Promise<void>;\nexport interface MountOptions {\n crashView?: View<LoggerErrorProps>;\n\n /**\n * An existing Context to use as the root, otherwise a new one will be created.\n * Use this to provide top-level stores and state to the whole app.\n */\n context?: Context;\n}\n\nexport async function mount(view: View<{}>, domNode: Element, options?: MountOptions): Promise<UnmountFn>;\nexport async function mount(router: Router, domNode: Element, options?: MountOptions): Promise<UnmountFn>;\n\nexport async function mount(view: any, rootElement: Element, options?: MountOptions): Promise<UnmountFn> {\n assertInstanceOf(Element, rootElement, \"Expected an element or a selector string. Got type: %t, value: %v\");\n\n if (isMounted) {\n throw new Error(`A Dolla app is already mounted.`);\n }\n\n let rootView: MarkupNode;\n let router: Router | undefined;\n let crashView = options?.crashView ?? DefaultCrashView;\n\n const rootContext = options?.context ?? new Context(\"App\");\n\n onLoggerCrash((props) => {\n if (isMounted) {\n unmount();\n }\n\n // Mount the crash page\n new ViewInstance(rootContext, crashView, props).mount(rootElement);\n });\n\n Context.willMount(rootContext);\n\n if (view instanceof Router) {\n router = view;\n rootView = await router[MOUNT](rootElement, rootContext);\n } else {\n // First, initialize the root view. The router store needs this to connect the initial route.\n rootView = new ViewInstance(rootContext, view, {});\n }\n\n rootView.mount(rootElement);\n isMounted = true;\n\n Context.didMount(rootContext);\n\n async function unmount() {\n if (!isMounted) return;\n\n Context.willUnmount(rootContext);\n\n rootView.unmount(false);\n\n if (router) {\n await router[UNMOUNT]();\n }\n\n isMounted = false;\n\n Context.didUnmount(rootContext);\n }\n\n return unmount;\n}\n"],"names":["EMPTY_REF","ref","value","DefaultCrashView","props","Markup","m","when","isMounted","mount","view","rootElement","options","assertInstanceOf","rootView","router","crashView","rootContext","Context","onLoggerCrash","unmount","ViewInstance","Router","MOUNT","UNMOUNT"],"mappings":";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ildren: any, source: any, self: any):
|
|
1
|
+
export function jsxDEV(element: any, props: any, key: any, isStaticChildren: any, source: any, self: any): Markup<any>;
|
|
2
2
|
export { Fragment } from "./core/views/fragment";
|
|
3
|
+
import { Markup } from "./core/markup";
|
package/dist/jsx-dev-runtime.js
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { M as n } from "./markup-BJx8Fwl2.js";
|
|
2
2
|
import { F as m } from "./fragment-BahD_BJA.js";
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
return o(e, i, ...c);
|
|
6
|
-
}
|
|
7
|
-
function s(e, r) {
|
|
8
|
-
const t = {};
|
|
9
|
-
for (const n in r)
|
|
10
|
-
e.includes(n) || (t[n] = r[n]);
|
|
11
|
-
return t;
|
|
3
|
+
function u(e, r, t, o, a, i) {
|
|
4
|
+
return new n(e, t != null ? { ...r, key: t } : r);
|
|
12
5
|
}
|
|
13
6
|
export {
|
|
14
7
|
m as Fragment,
|
|
15
|
-
|
|
8
|
+
u as jsxDEV
|
|
16
9
|
};
|
|
17
10
|
//# sourceMappingURL=jsx-dev-runtime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsx-dev-runtime.js","sources":["../src/jsx-dev-runtime.js"],"sourcesContent":["import { m } from \"./core/markup\";\nexport { Fragment } from \"./core/views/fragment\";\n\nexport function jsxDEV(element, props, key, isStaticChildren, source, self) {\n
|
|
1
|
+
{"version":3,"file":"jsx-dev-runtime.js","sources":["../src/jsx-dev-runtime.js"],"sourcesContent":["import { m, Markup } from \"./core/markup\";\nexport { Fragment } from \"./core/views/fragment\";\n\nexport function jsxDEV(element, props, key, isStaticChildren, source, self) {\n return new Markup(element, key != null ? { ...props, key } : props);\n}\n\n// function omit(keys, object) {\n// const result = {};\n// for (const key in object) {\n// if (!keys.includes(key)) {\n// result[key] = object[key];\n// }\n// }\n// return result;\n// }\n"],"names":["jsxDEV","element","props","key","isStaticChildren","source","self","Markup"],"mappings":";;AAGO,SAASA,EAAOC,GAASC,GAAOC,GAAKC,GAAkBC,GAAQC,GAAM;AAC1E,SAAO,IAAIC,EAAON,GAASE,KAAO,OAAO,EAAE,GAAGD,GAAO,KAAAC,EAAK,IAAGD,CAAK;AACpE;"}
|
package/dist/jsx-runtime.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* JSX function for elements with dynamic children.
|
|
3
3
|
*/
|
|
4
|
-
export function jsx(element: any, props: any, key: any):
|
|
4
|
+
export function jsx(element: any, props: any, key: any): Markup<any>;
|
|
5
5
|
/**
|
|
6
6
|
* JSX function for elements with static children.
|
|
7
7
|
*/
|
|
8
|
-
export function jsxs(element: any, props: any, key: any):
|
|
8
|
+
export function jsxs(element: any, props: any, key: any): Markup<any>;
|
|
9
9
|
export { Fragment } from "./core/views/fragment";
|
|
10
|
+
import { Markup } from "./core/markup";
|
package/dist/jsx-runtime.js
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { M as u } from "./markup-BJx8Fwl2.js";
|
|
2
2
|
import { F as m } from "./fragment-BahD_BJA.js";
|
|
3
|
-
function
|
|
4
|
-
return t
|
|
3
|
+
function o(t, n, r) {
|
|
4
|
+
return new u(t, r != null ? { ...n, key: r } : n);
|
|
5
5
|
}
|
|
6
|
-
function
|
|
7
|
-
return t
|
|
8
|
-
}
|
|
9
|
-
function u(e, n) {
|
|
10
|
-
const i = {};
|
|
11
|
-
for (const r in n)
|
|
12
|
-
e.includes(r) || (i[r] = n[r]);
|
|
13
|
-
return i;
|
|
6
|
+
function a(t, n, r) {
|
|
7
|
+
return new u(t, r != null ? { ...n, key: r } : n);
|
|
14
8
|
}
|
|
15
9
|
export {
|
|
16
10
|
m as Fragment,
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
o as jsx,
|
|
12
|
+
a as jsxs
|
|
19
13
|
};
|
|
20
14
|
//# sourceMappingURL=jsx-runtime.js.map
|
package/dist/jsx-runtime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsx-runtime.js","sources":["../src/jsx-runtime.js"],"sourcesContent":["import { m } from \"./core/markup\";\nexport { Fragment } from \"./core/views/fragment\";\n\n/**\n * JSX function for elements with dynamic children.\n */\nexport function jsx(element, props, key) {\n return
|
|
1
|
+
{"version":3,"file":"jsx-runtime.js","sources":["../src/jsx-runtime.js"],"sourcesContent":["import { m, Markup } from \"./core/markup\";\nexport { Fragment } from \"./core/views/fragment\";\n\n/**\n * JSX function for elements with dynamic children.\n */\nexport function jsx(element, props, key) {\n return new Markup(element, key != null ? { ...props, key } : props);\n}\n\n/**\n * JSX function for elements with static children.\n */\nexport function jsxs(element, props, key) {\n return new Markup(element, key != null ? { ...props, key } : props);\n}\n\n// function omit(keys, object) {\n// const result = {};\n// for (const key in object) {\n// if (!keys.includes(key)) {\n// result[key] = object[key];\n// }\n// }\n// return result;\n// }\n"],"names":["jsx","element","props","key","Markup","jsxs"],"mappings":";;AAMO,SAASA,EAAIC,GAASC,GAAOC,GAAK;AACvC,SAAO,IAAIC,EAAOH,GAASE,KAAO,OAAO,EAAE,GAAGD,GAAO,KAAAC,EAAK,IAAGD,CAAK;AACpE;AAKO,SAASG,EAAKJ,GAASC,GAAOC,GAAK;AACxC,SAAO,IAAIC,EAAOH,GAASE,KAAO,OAAO,EAAE,GAAGD,GAAO,KAAAC,EAAK,IAAGD,CAAK;AACpE;"}
|