keits 0.1.0 → 0.1.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/dev/forms.js +4 -1
- package/dist/dev/index.js +5 -3
- package/dist/dev/shared/element-Bgf6SNbW.js +21 -0
- package/dist/dev/shared/{hydrate-C8cOsDDH.js → hydrate-g_akkVyT.js} +1 -1
- package/dist/dev/shared/{element-DXwmUAnz.js → insert-DadcXJL8.js} +97 -21
- package/dist/dev/shared/{mount-CDB2HgN5.js → mount-BtpMEhSZ.js} +1 -1
- package/dist/dev/static.js +2 -2
- package/dist/dev/svg.js +2 -2
- package/dist/dev/testing.js +32 -12
- package/dist/prod/forms.js +40 -38
- package/dist/prod/index.js +36 -36
- package/dist/prod/shared/element-B-0tH1YW.js +15 -0
- package/dist/prod/shared/{hydrate-kKnJbkV7.js → hydrate-DhHCtdOz.js} +28 -28
- package/dist/prod/shared/insert-CbcOsYmu.js +192 -0
- package/dist/prod/shared/{mount-DbeKIoyD.js → mount-BEAO35S_.js} +1 -1
- package/dist/prod/static.js +2 -2
- package/dist/prod/svg.js +2 -2
- package/dist/prod/testing.js +35 -18
- package/dist/types/api/client.d.ts +2 -2
- package/dist/types/api/index.d.ts +3 -3
- package/dist/types/async/index.d.ts +2 -2
- package/dist/types/async/lazy.d.ts +1 -1
- package/dist/types/async/render-context.d.ts +2 -2
- package/dist/types/async/resource.d.ts +1 -1
- package/dist/types/async/suspense-context.d.ts +1 -1
- package/dist/types/core/computed.d.ts +1 -1
- package/dist/types/core/signal.d.ts +2 -2
- package/dist/types/dom/element.d.ts +1 -1
- package/dist/types/dom/index.d.ts +6 -6
- package/dist/types/dom/insert.d.ts +1 -1
- package/dist/types/dom/mount.d.ts +1 -1
- package/dist/types/dom/props.d.ts +2 -0
- package/dist/types/dom/tags.d.ts +112 -112
- package/dist/types/flow/catch.d.ts +1 -1
- package/dist/types/flow/dynamic.d.ts +1 -1
- package/dist/types/flow/for.d.ts +2 -2
- package/dist/types/flow/if.d.ts +2 -2
- package/dist/types/flow/index.d.ts +8 -8
- package/dist/types/flow/portal.d.ts +1 -1
- package/dist/types/flow/range.d.ts +1 -1
- package/dist/types/flow/suspense.d.ts +1 -1
- package/dist/types/flow/switch.d.ts +1 -1
- package/dist/types/forms/form.d.ts +3 -3
- package/dist/types/forms/index.d.ts +2 -2
- package/dist/types/index.d.ts +12 -12
- package/dist/types/router/index.d.ts +4 -4
- package/dist/types/router/match.d.ts +1 -1
- package/dist/types/router/router.d.ts +2 -2
- package/dist/types/router/types.d.ts +2 -2
- package/dist/types/static/head.d.ts +2 -2
- package/dist/types/static/hydrate.d.ts +1 -1
- package/dist/types/static/index.d.ts +4 -4
- package/dist/types/static/island.d.ts +1 -1
- package/dist/types/static/render.d.ts +1 -1
- package/dist/types/static/server-dom.d.ts +1 -1
- package/dist/types/svg/element.d.ts +1 -1
- package/dist/types/svg/index.d.ts +3 -3
- package/dist/types/svg/tags.d.ts +63 -63
- package/dist/types/svg/types.d.ts +1 -1
- package/dist/types/testing/index.d.ts +13 -6
- package/dist/types/vite/index.d.ts +1 -1
- package/package.json +8 -8
- package/dist/dev/shared/namespaces-Cz82B0Pr.js +0 -84
- package/dist/prod/shared/element-DCit4-3e.js +0 -129
- package/dist/prod/shared/namespaces-BSRrBJIU.js +0 -71
package/dist/prod/svg.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./shared/element-
|
|
2
|
-
import { t } from "./shared/
|
|
1
|
+
import { t as e } from "./shared/element-B-0tH1YW.js";
|
|
2
|
+
import { i as t } from "./shared/insert-CbcOsYmu.js";
|
|
3
3
|
// src/svg/element.ts
|
|
4
4
|
function n(n) {
|
|
5
5
|
return e(n, t);
|
package/dist/prod/testing.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./shared/mount-
|
|
2
|
-
import { n as t, r as n, t as r } from "./shared/hydrate-
|
|
1
|
+
import { t as e } from "./shared/mount-BEAO35S_.js";
|
|
2
|
+
import { n as t, r as n, t as r } from "./shared/hydrate-DhHCtdOz.js";
|
|
3
3
|
// src/testing/index.ts
|
|
4
4
|
var i = /* @__PURE__ */ new Set();
|
|
5
5
|
function a(t) {
|
|
@@ -74,20 +74,20 @@ function d(e, t) {
|
|
|
74
74
|
throw Error(`[keits/testing] Can't ${t} ${h(e)}: it isn't an <input> or <textarea>.`);
|
|
75
75
|
}
|
|
76
76
|
function f(e) {
|
|
77
|
-
let t = () => [...e.querySelectorAll("*")], n = (e) => {
|
|
78
|
-
let
|
|
79
|
-
return
|
|
80
|
-
}, r = (e, n = {}) => t().filter((t) => v(t) === e && (n.name === void 0 || m(
|
|
77
|
+
let t = () => [...e.querySelectorAll("*")], n = (e, n) => {
|
|
78
|
+
let r = t().filter((t) => m(p(t.textContent ?? ""), e, n));
|
|
79
|
+
return r.filter((e) => !r.some((t) => t !== e && e.contains(t)));
|
|
80
|
+
}, r = (e, n = {}) => t().filter((t) => v(t) === e && (n.name === void 0 || m(b(t), n.name))), i = (t, n) => {
|
|
81
81
|
if (t.length === 1) return t[0];
|
|
82
82
|
let r = p(e.textContent ?? "").slice(0, 200);
|
|
83
83
|
throw t.length === 0 ? Error(`[keits/testing] Found no element ${n}. The page says: "${r}"`) : Error(`[keits/testing] Found ${t.length} elements ${n}: ${t.map(h).join(", ")}. Make the query more specific.`);
|
|
84
84
|
}, a = (e, t) => `with role "${e}"${t?.name === void 0 ? "" : ` named ${String(t.name)}`}`;
|
|
85
85
|
return {
|
|
86
|
-
getByText: (e) => i(n(e), `with the text ${String(e)}`),
|
|
87
|
-
queryByText: (e) => n(e)[0] ?? null,
|
|
88
|
-
getAllByText: (e) => {
|
|
89
|
-
let
|
|
90
|
-
return
|
|
86
|
+
getByText: (e, t) => i(n(e, t), `with the text ${String(e)}`),
|
|
87
|
+
queryByText: (e, t) => n(e, t)[0] ?? null,
|
|
88
|
+
getAllByText: (e, t) => {
|
|
89
|
+
let r = n(e, t);
|
|
90
|
+
return r.length === 0 && i(r, `with the text ${String(e)}`), r;
|
|
91
91
|
},
|
|
92
92
|
getByRole: (e, t) => i(r(e, t), a(e, t)),
|
|
93
93
|
queryByRole: (e, t) => r(e, t)[0] ?? null,
|
|
@@ -95,11 +95,11 @@ function f(e) {
|
|
|
95
95
|
let n = r(e, t);
|
|
96
96
|
return n.length === 0 && i(n, a(e, t)), n;
|
|
97
97
|
},
|
|
98
|
-
getByLabelText: (e) => i(t().filter((t) => g(t) && _(t).some((t) => m(t, e))), `labelled ${String(e)}`),
|
|
98
|
+
getByLabelText: (e, n) => i(t().filter((t) => g(t) && _(t).some((t) => m(t, e, n))), `labelled ${String(e)}`),
|
|
99
99
|
getByTestId: (e) => i(t().filter((t) => t.getAttribute("data-testid") === e), `with data-testid "${e}"`)
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
var p = (e) => e.replace(/\s+/g, " ").trim(), m = (e, t) => typeof t == "string" ? e === t : t.test(e), h = (e) => `<${e.localName}${e.id ? `#${e.id}` : ""}>`, g = (e) => [
|
|
102
|
+
var p = (e) => e.replace(/\s+/g, " ").trim(), m = (e, t, n) => typeof t == "string" ? n?.exact === !1 ? e.toLowerCase().includes(p(t).toLowerCase()) : e === t : t.test(e), h = (e) => `<${e.localName}${e.id ? `#${e.id}` : ""}>`, g = (e) => [
|
|
103
103
|
"input",
|
|
104
104
|
"select",
|
|
105
105
|
"textarea",
|
|
@@ -121,10 +121,9 @@ function v(e) {
|
|
|
121
121
|
let t = (e.getAttribute("type") ?? "text").toLowerCase();
|
|
122
122
|
return t === "checkbox" || t === "radio" ? t : t === "button" || t === "submit" || t === "reset" ? "button" : t === "range" ? "slider" : t === "number" ? "spinbutton" : t === "search" ? "searchbox" : t === "hidden" ? null : "textbox";
|
|
123
123
|
}
|
|
124
|
-
return /^h[1-6]$/.test(n) ? "heading" : n === "a" ? e.hasAttribute("href") ? "link" : null : n === "img" ? e.getAttribute("alt") === "" ? "presentation" : "img" : {
|
|
124
|
+
return /^h[1-6]$/.test(n) ? "heading" : n === "th" ? e.getAttribute("scope") === "row" ? "rowheader" : "columnheader" : n === "select" ? e.hasAttribute("multiple") ? "listbox" : "combobox" : n === "a" ? e.hasAttribute("href") ? "link" : null : n === "img" ? e.getAttribute("alt") === "" ? "presentation" : "img" : {
|
|
125
125
|
button: "button",
|
|
126
126
|
textarea: "textbox",
|
|
127
|
-
select: "combobox",
|
|
128
127
|
ul: "list",
|
|
129
128
|
ol: "list",
|
|
130
129
|
li: "listitem",
|
|
@@ -132,13 +131,31 @@ function v(e) {
|
|
|
132
131
|
main: "main",
|
|
133
132
|
form: "form",
|
|
134
133
|
dialog: "dialog",
|
|
134
|
+
option: "option",
|
|
135
135
|
table: "table",
|
|
136
|
+
thead: "rowgroup",
|
|
137
|
+
tbody: "rowgroup",
|
|
138
|
+
tfoot: "rowgroup",
|
|
136
139
|
tr: "row",
|
|
137
|
-
|
|
140
|
+
td: "cell",
|
|
141
|
+
fieldset: "group",
|
|
142
|
+
aside: "complementary",
|
|
143
|
+
progress: "progressbar",
|
|
144
|
+
meter: "meter",
|
|
145
|
+
hr: "separator"
|
|
138
146
|
}[n] ?? null;
|
|
139
147
|
}
|
|
140
|
-
|
|
148
|
+
var y = {
|
|
149
|
+
table: "caption",
|
|
150
|
+
fieldset: "legend",
|
|
151
|
+
figure: "figcaption"
|
|
152
|
+
};
|
|
153
|
+
function b(e) {
|
|
141
154
|
let t = e.getAttribute("aria-label");
|
|
142
|
-
|
|
155
|
+
if (t !== null) return p(t);
|
|
156
|
+
let n = e.getAttribute("aria-labelledby");
|
|
157
|
+
if (n !== null) return p(n.split(/\s+/).map((t) => e.ownerDocument.getElementById(t)?.textContent ?? "").join(" "));
|
|
158
|
+
let r = y[e.localName];
|
|
159
|
+
return r === void 0 ? g(e) && e.localName !== "button" ? _(e)[0] ?? p(e.getAttribute("placeholder") ?? "") : e.localName === "img" ? p(e.getAttribute("alt") ?? "") : p(e.textContent ?? "") : p(e.querySelector(`:scope > ${r}`)?.textContent ?? "");
|
|
143
160
|
}
|
|
144
161
|
export { c as cleanup, l as flush, a as render, o as renderOnServer, u as user, f as within };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Resource } from "../async/resource";
|
|
2
|
-
import { type PathParams, type QueryParams } from "./url";
|
|
1
|
+
import { type Resource } from "../async/resource.js";
|
|
2
|
+
import { type PathParams, type QueryParams } from "./url.js";
|
|
3
3
|
export interface ApiConfig {
|
|
4
4
|
baseUrl?: string;
|
|
5
5
|
headers?: HeadersInit | (() => HeadersInit | PromiseLike<HeadersInit>);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createApi, type Api, type ApiConfig, type QueryOptions, type RequestOptions } from "./client";
|
|
2
|
-
export { ApiError } from "./error";
|
|
3
|
-
export type { PathParams, QueryParams, QueryValue } from "./url";
|
|
1
|
+
export { createApi, type Api, type ApiConfig, type QueryOptions, type RequestOptions } from "./client.js";
|
|
2
|
+
export { ApiError } from "./error.js";
|
|
3
|
+
export type { PathParams, QueryParams, QueryValue } from "./url.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { resource, type FetchInfo, type Resource, type ResourceOptions, type ResourceState } from "./resource";
|
|
2
|
-
export { lazy, type LazyComponent } from "./lazy";
|
|
1
|
+
export { resource, type FetchInfo, type Resource, type ResourceOptions, type ResourceState } from "./resource.js";
|
|
2
|
+
export { lazy, type LazyComponent } from "./lazy.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { Owner } from "../core/graph";
|
|
1
|
+
import type { Owner } from "../core/graph.js";
|
|
2
2
|
export interface RenderTracker {
|
|
3
3
|
wait(loading: Promise<unknown>): void;
|
|
4
4
|
store(key: string, value: unknown, owner: Owner | null): void;
|
|
5
5
|
}
|
|
6
|
-
export declare const RenderContext: import("
|
|
6
|
+
export declare const RenderContext: import("../index.js").Context<RenderTracker | null>;
|
|
7
7
|
export declare let hydratedValue: ((key: string) => {
|
|
8
8
|
value: unknown;
|
|
9
9
|
} | undefined) | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export interface SuspenseBoundary {
|
|
2
2
|
wait(key: object, subscribe: (done: () => void) => void): void;
|
|
3
3
|
}
|
|
4
|
-
export declare const SuspenseContext: import("
|
|
4
|
+
export declare const SuspenseContext: import("../index.js").Context<SuspenseBoundary | null>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type SignalSource } from "./graph";
|
|
2
|
-
import type { Accessor } from "./types";
|
|
1
|
+
import { type SignalSource } from "./graph.js";
|
|
2
|
+
import type { Accessor } from "./types.js";
|
|
3
3
|
export interface Signal<T> extends Accessor<T> {
|
|
4
4
|
set(next: Exclude<T, Function> | ((prev: T) => T)): void;
|
|
5
5
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { Child, ElementFactory } from "./types";
|
|
1
|
+
import type { Child, ElementFactory } from "./types.js";
|
|
2
2
|
export declare function html<K extends keyof HTMLElementTagNameMap>(tag: K): ElementFactory<HTMLElementTagNameMap[K]>;
|
|
3
3
|
export declare function createFactory(tag: string, namespace: string | null): (first?: unknown, children?: Child) => Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from "./tags";
|
|
2
|
-
export { html } from "./element";
|
|
3
|
-
export { insert } from "./insert";
|
|
4
|
-
export { mount } from "./mount";
|
|
5
|
-
export { unsafeHTML } from "./unsafe";
|
|
6
|
-
export type { Child, ClassValue, ElementFactory, EventHandler, MaybeAccessor, Props, StyleValue } from "./types";
|
|
1
|
+
export * from "./tags.js";
|
|
2
|
+
export { html } from "./element.js";
|
|
3
|
+
export { insert } from "./insert.js";
|
|
4
|
+
export { mount } from "./mount.js";
|
|
5
|
+
export { unsafeHTML } from "./unsafe.js";
|
|
6
|
+
export type { Child, ClassValue, ElementFactory, EventHandler, MaybeAccessor, Props, StyleValue } from "./types.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Child } from "./types";
|
|
1
|
+
import type { Child } from "./types.js";
|
|
2
2
|
export declare function insert(parent: Node, child: Child, before?: Node | null): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Child } from "./types";
|
|
1
|
+
import type { Child } from "./types.js";
|
|
2
2
|
export declare function mount(app: () => Child, target: Element | null): () => void;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export declare const BLOCKED_URL = "about:invalid#keits-blocked";
|
|
2
2
|
export declare function applyProps(element: Element, props: Record<string, unknown>): void;
|
|
3
3
|
export declare function setProp(element: Element, key: string, value: unknown): void;
|
|
4
|
+
/** After keits changes the children of `parent`: if it's (in) a <select> given a `value`, select that value again. */
|
|
5
|
+
export declare function restoreSelectValue(parent: Node | null): void;
|
package/dist/types/dom/tags.d.ts
CHANGED
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
export declare const $a: import("./types").ElementFactory<HTMLAnchorElement>;
|
|
2
|
-
export declare const $abbr: import("./types").ElementFactory<HTMLElement>;
|
|
3
|
-
export declare const $address: import("./types").ElementFactory<HTMLElement>;
|
|
4
|
-
export declare const $area: import("./types").ElementFactory<HTMLAreaElement>;
|
|
5
|
-
export declare const $article: import("./types").ElementFactory<HTMLElement>;
|
|
6
|
-
export declare const $aside: import("./types").ElementFactory<HTMLElement>;
|
|
7
|
-
export declare const $audio: import("./types").ElementFactory<HTMLAudioElement>;
|
|
8
|
-
export declare const $b: import("./types").ElementFactory<HTMLElement>;
|
|
9
|
-
export declare const $base: import("./types").ElementFactory<HTMLBaseElement>;
|
|
10
|
-
export declare const $bdi: import("./types").ElementFactory<HTMLElement>;
|
|
11
|
-
export declare const $bdo: import("./types").ElementFactory<HTMLElement>;
|
|
12
|
-
export declare const $blockquote: import("./types").ElementFactory<HTMLQuoteElement>;
|
|
13
|
-
export declare const $body: import("./types").ElementFactory<HTMLBodyElement>;
|
|
14
|
-
export declare const $br: import("./types").ElementFactory<HTMLBRElement>;
|
|
15
|
-
export declare const $button: import("./types").ElementFactory<HTMLButtonElement>;
|
|
16
|
-
export declare const $canvas: import("./types").ElementFactory<HTMLCanvasElement>;
|
|
17
|
-
export declare const $caption: import("./types").ElementFactory<HTMLTableCaptionElement>;
|
|
18
|
-
export declare const $cite: import("./types").ElementFactory<HTMLElement>;
|
|
19
|
-
export declare const $code: import("./types").ElementFactory<HTMLElement>;
|
|
20
|
-
export declare const $col: import("./types").ElementFactory<HTMLTableColElement>;
|
|
21
|
-
export declare const $colgroup: import("./types").ElementFactory<HTMLTableColElement>;
|
|
22
|
-
export declare const $data: import("./types").ElementFactory<HTMLDataElement>;
|
|
23
|
-
export declare const $datalist: import("./types").ElementFactory<HTMLDataListElement>;
|
|
24
|
-
export declare const $dd: import("./types").ElementFactory<HTMLElement>;
|
|
25
|
-
export declare const $del: import("./types").ElementFactory<HTMLModElement>;
|
|
26
|
-
export declare const $details: import("./types").ElementFactory<HTMLDetailsElement>;
|
|
27
|
-
export declare const $dfn: import("./types").ElementFactory<HTMLElement>;
|
|
28
|
-
export declare const $dialog: import("./types").ElementFactory<HTMLDialogElement>;
|
|
29
|
-
export declare const $div: import("./types").ElementFactory<HTMLDivElement>;
|
|
30
|
-
export declare const $dl: import("./types").ElementFactory<HTMLDListElement>;
|
|
31
|
-
export declare const $dt: import("./types").ElementFactory<HTMLElement>;
|
|
32
|
-
export declare const $em: import("./types").ElementFactory<HTMLElement>;
|
|
33
|
-
export declare const $embed: import("./types").ElementFactory<HTMLEmbedElement>;
|
|
34
|
-
export declare const $fieldset: import("./types").ElementFactory<HTMLFieldSetElement>;
|
|
35
|
-
export declare const $figcaption: import("./types").ElementFactory<HTMLElement>;
|
|
36
|
-
export declare const $figure: import("./types").ElementFactory<HTMLElement>;
|
|
37
|
-
export declare const $footer: import("./types").ElementFactory<HTMLElement>;
|
|
38
|
-
export declare const $form: import("./types").ElementFactory<HTMLFormElement>;
|
|
39
|
-
export declare const $h1: import("./types").ElementFactory<HTMLHeadingElement>;
|
|
40
|
-
export declare const $h2: import("./types").ElementFactory<HTMLHeadingElement>;
|
|
41
|
-
export declare const $h3: import("./types").ElementFactory<HTMLHeadingElement>;
|
|
42
|
-
export declare const $h4: import("./types").ElementFactory<HTMLHeadingElement>;
|
|
43
|
-
export declare const $h5: import("./types").ElementFactory<HTMLHeadingElement>;
|
|
44
|
-
export declare const $h6: import("./types").ElementFactory<HTMLHeadingElement>;
|
|
45
|
-
export declare const $head: import("./types").ElementFactory<HTMLHeadElement>;
|
|
46
|
-
export declare const $header: import("./types").ElementFactory<HTMLElement>;
|
|
47
|
-
export declare const $hgroup: import("./types").ElementFactory<HTMLElement>;
|
|
48
|
-
export declare const $hr: import("./types").ElementFactory<HTMLHRElement>;
|
|
49
|
-
export declare const $html: import("./types").ElementFactory<HTMLHtmlElement>;
|
|
50
|
-
export declare const $i: import("./types").ElementFactory<HTMLElement>;
|
|
51
|
-
export declare const $iframe: import("./types").ElementFactory<HTMLIFrameElement>;
|
|
52
|
-
export declare const $img: import("./types").ElementFactory<HTMLImageElement>;
|
|
53
|
-
export declare const $input: import("./types").ElementFactory<HTMLInputElement>;
|
|
54
|
-
export declare const $ins: import("./types").ElementFactory<HTMLModElement>;
|
|
55
|
-
export declare const $kbd: import("./types").ElementFactory<HTMLElement>;
|
|
56
|
-
export declare const $label: import("./types").ElementFactory<HTMLLabelElement>;
|
|
57
|
-
export declare const $legend: import("./types").ElementFactory<HTMLLegendElement>;
|
|
58
|
-
export declare const $li: import("./types").ElementFactory<HTMLLIElement>;
|
|
59
|
-
export declare const $link: import("./types").ElementFactory<HTMLLinkElement>;
|
|
60
|
-
export declare const $main: import("./types").ElementFactory<HTMLElement>;
|
|
61
|
-
export declare const $map: import("./types").ElementFactory<HTMLMapElement>;
|
|
62
|
-
export declare const $mark: import("./types").ElementFactory<HTMLElement>;
|
|
63
|
-
export declare const $menu: import("./types").ElementFactory<HTMLMenuElement>;
|
|
64
|
-
export declare const $meta: import("./types").ElementFactory<HTMLMetaElement>;
|
|
65
|
-
export declare const $meter: import("./types").ElementFactory<HTMLMeterElement>;
|
|
66
|
-
export declare const $nav: import("./types").ElementFactory<HTMLElement>;
|
|
67
|
-
export declare const $noscript: import("./types").ElementFactory<HTMLElement>;
|
|
68
|
-
export declare const $object: import("./types").ElementFactory<HTMLObjectElement>;
|
|
69
|
-
export declare const $ol: import("./types").ElementFactory<HTMLOListElement>;
|
|
70
|
-
export declare const $optgroup: import("./types").ElementFactory<HTMLOptGroupElement>;
|
|
71
|
-
export declare const $option: import("./types").ElementFactory<HTMLOptionElement>;
|
|
72
|
-
export declare const $output: import("./types").ElementFactory<HTMLOutputElement>;
|
|
73
|
-
export declare const $p: import("./types").ElementFactory<HTMLParagraphElement>;
|
|
74
|
-
export declare const $picture: import("./types").ElementFactory<HTMLPictureElement>;
|
|
75
|
-
export declare const $pre: import("./types").ElementFactory<HTMLPreElement>;
|
|
76
|
-
export declare const $progress: import("./types").ElementFactory<HTMLProgressElement>;
|
|
77
|
-
export declare const $q: import("./types").ElementFactory<HTMLQuoteElement>;
|
|
78
|
-
export declare const $rp: import("./types").ElementFactory<HTMLElement>;
|
|
79
|
-
export declare const $rt: import("./types").ElementFactory<HTMLElement>;
|
|
80
|
-
export declare const $ruby: import("./types").ElementFactory<HTMLElement>;
|
|
81
|
-
export declare const $s: import("./types").ElementFactory<HTMLElement>;
|
|
82
|
-
export declare const $samp: import("./types").ElementFactory<HTMLElement>;
|
|
83
|
-
export declare const $script: import("./types").ElementFactory<HTMLScriptElement>;
|
|
84
|
-
export declare const $search: import("./types").ElementFactory<HTMLElement>;
|
|
85
|
-
export declare const $section: import("./types").ElementFactory<HTMLElement>;
|
|
86
|
-
export declare const $select: import("./types").ElementFactory<HTMLSelectElement>;
|
|
87
|
-
export declare const $slot: import("./types").ElementFactory<HTMLSlotElement>;
|
|
88
|
-
export declare const $small: import("./types").ElementFactory<HTMLElement>;
|
|
89
|
-
export declare const $source: import("./types").ElementFactory<HTMLSourceElement>;
|
|
90
|
-
export declare const $span: import("./types").ElementFactory<HTMLSpanElement>;
|
|
91
|
-
export declare const $strong: import("./types").ElementFactory<HTMLElement>;
|
|
92
|
-
export declare const $style: import("./types").ElementFactory<HTMLStyleElement>;
|
|
93
|
-
export declare const $sub: import("./types").ElementFactory<HTMLElement>;
|
|
94
|
-
export declare const $summary: import("./types").ElementFactory<HTMLElement>;
|
|
95
|
-
export declare const $sup: import("./types").ElementFactory<HTMLElement>;
|
|
96
|
-
export declare const $table: import("./types").ElementFactory<HTMLTableElement>;
|
|
97
|
-
export declare const $tbody: import("./types").ElementFactory<HTMLTableSectionElement>;
|
|
98
|
-
export declare const $td: import("./types").ElementFactory<HTMLTableCellElement>;
|
|
99
|
-
export declare const $template: import("./types").ElementFactory<HTMLTemplateElement>;
|
|
100
|
-
export declare const $textarea: import("./types").ElementFactory<HTMLTextAreaElement>;
|
|
101
|
-
export declare const $tfoot: import("./types").ElementFactory<HTMLTableSectionElement>;
|
|
102
|
-
export declare const $th: import("./types").ElementFactory<HTMLTableCellElement>;
|
|
103
|
-
export declare const $thead: import("./types").ElementFactory<HTMLTableSectionElement>;
|
|
104
|
-
export declare const $time: import("./types").ElementFactory<HTMLTimeElement>;
|
|
105
|
-
export declare const $title: import("./types").ElementFactory<HTMLTitleElement>;
|
|
106
|
-
export declare const $tr: import("./types").ElementFactory<HTMLTableRowElement>;
|
|
107
|
-
export declare const $track: import("./types").ElementFactory<HTMLTrackElement>;
|
|
108
|
-
export declare const $u: import("./types").ElementFactory<HTMLElement>;
|
|
109
|
-
export declare const $ul: import("./types").ElementFactory<HTMLUListElement>;
|
|
110
|
-
export declare const $var: import("./types").ElementFactory<HTMLElement>;
|
|
111
|
-
export declare const $video: import("./types").ElementFactory<HTMLVideoElement>;
|
|
112
|
-
export declare const $wbr: import("./types").ElementFactory<HTMLElement>;
|
|
1
|
+
export declare const $a: import("./types.js").ElementFactory<HTMLAnchorElement>;
|
|
2
|
+
export declare const $abbr: import("./types.js").ElementFactory<HTMLElement>;
|
|
3
|
+
export declare const $address: import("./types.js").ElementFactory<HTMLElement>;
|
|
4
|
+
export declare const $area: import("./types.js").ElementFactory<HTMLAreaElement>;
|
|
5
|
+
export declare const $article: import("./types.js").ElementFactory<HTMLElement>;
|
|
6
|
+
export declare const $aside: import("./types.js").ElementFactory<HTMLElement>;
|
|
7
|
+
export declare const $audio: import("./types.js").ElementFactory<HTMLAudioElement>;
|
|
8
|
+
export declare const $b: import("./types.js").ElementFactory<HTMLElement>;
|
|
9
|
+
export declare const $base: import("./types.js").ElementFactory<HTMLBaseElement>;
|
|
10
|
+
export declare const $bdi: import("./types.js").ElementFactory<HTMLElement>;
|
|
11
|
+
export declare const $bdo: import("./types.js").ElementFactory<HTMLElement>;
|
|
12
|
+
export declare const $blockquote: import("./types.js").ElementFactory<HTMLQuoteElement>;
|
|
13
|
+
export declare const $body: import("./types.js").ElementFactory<HTMLBodyElement>;
|
|
14
|
+
export declare const $br: import("./types.js").ElementFactory<HTMLBRElement>;
|
|
15
|
+
export declare const $button: import("./types.js").ElementFactory<HTMLButtonElement>;
|
|
16
|
+
export declare const $canvas: import("./types.js").ElementFactory<HTMLCanvasElement>;
|
|
17
|
+
export declare const $caption: import("./types.js").ElementFactory<HTMLTableCaptionElement>;
|
|
18
|
+
export declare const $cite: import("./types.js").ElementFactory<HTMLElement>;
|
|
19
|
+
export declare const $code: import("./types.js").ElementFactory<HTMLElement>;
|
|
20
|
+
export declare const $col: import("./types.js").ElementFactory<HTMLTableColElement>;
|
|
21
|
+
export declare const $colgroup: import("./types.js").ElementFactory<HTMLTableColElement>;
|
|
22
|
+
export declare const $data: import("./types.js").ElementFactory<HTMLDataElement>;
|
|
23
|
+
export declare const $datalist: import("./types.js").ElementFactory<HTMLDataListElement>;
|
|
24
|
+
export declare const $dd: import("./types.js").ElementFactory<HTMLElement>;
|
|
25
|
+
export declare const $del: import("./types.js").ElementFactory<HTMLModElement>;
|
|
26
|
+
export declare const $details: import("./types.js").ElementFactory<HTMLDetailsElement>;
|
|
27
|
+
export declare const $dfn: import("./types.js").ElementFactory<HTMLElement>;
|
|
28
|
+
export declare const $dialog: import("./types.js").ElementFactory<HTMLDialogElement>;
|
|
29
|
+
export declare const $div: import("./types.js").ElementFactory<HTMLDivElement>;
|
|
30
|
+
export declare const $dl: import("./types.js").ElementFactory<HTMLDListElement>;
|
|
31
|
+
export declare const $dt: import("./types.js").ElementFactory<HTMLElement>;
|
|
32
|
+
export declare const $em: import("./types.js").ElementFactory<HTMLElement>;
|
|
33
|
+
export declare const $embed: import("./types.js").ElementFactory<HTMLEmbedElement>;
|
|
34
|
+
export declare const $fieldset: import("./types.js").ElementFactory<HTMLFieldSetElement>;
|
|
35
|
+
export declare const $figcaption: import("./types.js").ElementFactory<HTMLElement>;
|
|
36
|
+
export declare const $figure: import("./types.js").ElementFactory<HTMLElement>;
|
|
37
|
+
export declare const $footer: import("./types.js").ElementFactory<HTMLElement>;
|
|
38
|
+
export declare const $form: import("./types.js").ElementFactory<HTMLFormElement>;
|
|
39
|
+
export declare const $h1: import("./types.js").ElementFactory<HTMLHeadingElement>;
|
|
40
|
+
export declare const $h2: import("./types.js").ElementFactory<HTMLHeadingElement>;
|
|
41
|
+
export declare const $h3: import("./types.js").ElementFactory<HTMLHeadingElement>;
|
|
42
|
+
export declare const $h4: import("./types.js").ElementFactory<HTMLHeadingElement>;
|
|
43
|
+
export declare const $h5: import("./types.js").ElementFactory<HTMLHeadingElement>;
|
|
44
|
+
export declare const $h6: import("./types.js").ElementFactory<HTMLHeadingElement>;
|
|
45
|
+
export declare const $head: import("./types.js").ElementFactory<HTMLHeadElement>;
|
|
46
|
+
export declare const $header: import("./types.js").ElementFactory<HTMLElement>;
|
|
47
|
+
export declare const $hgroup: import("./types.js").ElementFactory<HTMLElement>;
|
|
48
|
+
export declare const $hr: import("./types.js").ElementFactory<HTMLHRElement>;
|
|
49
|
+
export declare const $html: import("./types.js").ElementFactory<HTMLHtmlElement>;
|
|
50
|
+
export declare const $i: import("./types.js").ElementFactory<HTMLElement>;
|
|
51
|
+
export declare const $iframe: import("./types.js").ElementFactory<HTMLIFrameElement>;
|
|
52
|
+
export declare const $img: import("./types.js").ElementFactory<HTMLImageElement>;
|
|
53
|
+
export declare const $input: import("./types.js").ElementFactory<HTMLInputElement>;
|
|
54
|
+
export declare const $ins: import("./types.js").ElementFactory<HTMLModElement>;
|
|
55
|
+
export declare const $kbd: import("./types.js").ElementFactory<HTMLElement>;
|
|
56
|
+
export declare const $label: import("./types.js").ElementFactory<HTMLLabelElement>;
|
|
57
|
+
export declare const $legend: import("./types.js").ElementFactory<HTMLLegendElement>;
|
|
58
|
+
export declare const $li: import("./types.js").ElementFactory<HTMLLIElement>;
|
|
59
|
+
export declare const $link: import("./types.js").ElementFactory<HTMLLinkElement>;
|
|
60
|
+
export declare const $main: import("./types.js").ElementFactory<HTMLElement>;
|
|
61
|
+
export declare const $map: import("./types.js").ElementFactory<HTMLMapElement>;
|
|
62
|
+
export declare const $mark: import("./types.js").ElementFactory<HTMLElement>;
|
|
63
|
+
export declare const $menu: import("./types.js").ElementFactory<HTMLMenuElement>;
|
|
64
|
+
export declare const $meta: import("./types.js").ElementFactory<HTMLMetaElement>;
|
|
65
|
+
export declare const $meter: import("./types.js").ElementFactory<HTMLMeterElement>;
|
|
66
|
+
export declare const $nav: import("./types.js").ElementFactory<HTMLElement>;
|
|
67
|
+
export declare const $noscript: import("./types.js").ElementFactory<HTMLElement>;
|
|
68
|
+
export declare const $object: import("./types.js").ElementFactory<HTMLObjectElement>;
|
|
69
|
+
export declare const $ol: import("./types.js").ElementFactory<HTMLOListElement>;
|
|
70
|
+
export declare const $optgroup: import("./types.js").ElementFactory<HTMLOptGroupElement>;
|
|
71
|
+
export declare const $option: import("./types.js").ElementFactory<HTMLOptionElement>;
|
|
72
|
+
export declare const $output: import("./types.js").ElementFactory<HTMLOutputElement>;
|
|
73
|
+
export declare const $p: import("./types.js").ElementFactory<HTMLParagraphElement>;
|
|
74
|
+
export declare const $picture: import("./types.js").ElementFactory<HTMLPictureElement>;
|
|
75
|
+
export declare const $pre: import("./types.js").ElementFactory<HTMLPreElement>;
|
|
76
|
+
export declare const $progress: import("./types.js").ElementFactory<HTMLProgressElement>;
|
|
77
|
+
export declare const $q: import("./types.js").ElementFactory<HTMLQuoteElement>;
|
|
78
|
+
export declare const $rp: import("./types.js").ElementFactory<HTMLElement>;
|
|
79
|
+
export declare const $rt: import("./types.js").ElementFactory<HTMLElement>;
|
|
80
|
+
export declare const $ruby: import("./types.js").ElementFactory<HTMLElement>;
|
|
81
|
+
export declare const $s: import("./types.js").ElementFactory<HTMLElement>;
|
|
82
|
+
export declare const $samp: import("./types.js").ElementFactory<HTMLElement>;
|
|
83
|
+
export declare const $script: import("./types.js").ElementFactory<HTMLScriptElement>;
|
|
84
|
+
export declare const $search: import("./types.js").ElementFactory<HTMLElement>;
|
|
85
|
+
export declare const $section: import("./types.js").ElementFactory<HTMLElement>;
|
|
86
|
+
export declare const $select: import("./types.js").ElementFactory<HTMLSelectElement>;
|
|
87
|
+
export declare const $slot: import("./types.js").ElementFactory<HTMLSlotElement>;
|
|
88
|
+
export declare const $small: import("./types.js").ElementFactory<HTMLElement>;
|
|
89
|
+
export declare const $source: import("./types.js").ElementFactory<HTMLSourceElement>;
|
|
90
|
+
export declare const $span: import("./types.js").ElementFactory<HTMLSpanElement>;
|
|
91
|
+
export declare const $strong: import("./types.js").ElementFactory<HTMLElement>;
|
|
92
|
+
export declare const $style: import("./types.js").ElementFactory<HTMLStyleElement>;
|
|
93
|
+
export declare const $sub: import("./types.js").ElementFactory<HTMLElement>;
|
|
94
|
+
export declare const $summary: import("./types.js").ElementFactory<HTMLElement>;
|
|
95
|
+
export declare const $sup: import("./types.js").ElementFactory<HTMLElement>;
|
|
96
|
+
export declare const $table: import("./types.js").ElementFactory<HTMLTableElement>;
|
|
97
|
+
export declare const $tbody: import("./types.js").ElementFactory<HTMLTableSectionElement>;
|
|
98
|
+
export declare const $td: import("./types.js").ElementFactory<HTMLTableCellElement>;
|
|
99
|
+
export declare const $template: import("./types.js").ElementFactory<HTMLTemplateElement>;
|
|
100
|
+
export declare const $textarea: import("./types.js").ElementFactory<HTMLTextAreaElement>;
|
|
101
|
+
export declare const $tfoot: import("./types.js").ElementFactory<HTMLTableSectionElement>;
|
|
102
|
+
export declare const $th: import("./types.js").ElementFactory<HTMLTableCellElement>;
|
|
103
|
+
export declare const $thead: import("./types.js").ElementFactory<HTMLTableSectionElement>;
|
|
104
|
+
export declare const $time: import("./types.js").ElementFactory<HTMLTimeElement>;
|
|
105
|
+
export declare const $title: import("./types.js").ElementFactory<HTMLTitleElement>;
|
|
106
|
+
export declare const $tr: import("./types.js").ElementFactory<HTMLTableRowElement>;
|
|
107
|
+
export declare const $track: import("./types.js").ElementFactory<HTMLTrackElement>;
|
|
108
|
+
export declare const $u: import("./types.js").ElementFactory<HTMLElement>;
|
|
109
|
+
export declare const $ul: import("./types.js").ElementFactory<HTMLUListElement>;
|
|
110
|
+
export declare const $var: import("./types.js").ElementFactory<HTMLElement>;
|
|
111
|
+
export declare const $video: import("./types.js").ElementFactory<HTMLVideoElement>;
|
|
112
|
+
export declare const $wbr: import("./types.js").ElementFactory<HTMLElement>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Child } from "../dom/types";
|
|
1
|
+
import type { Child } from "../dom/types.js";
|
|
2
2
|
export declare function $catch(children: () => Child, fallback: (error: unknown, reset: () => void) => Child): Child;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Child } from "../dom/types";
|
|
1
|
+
import type { Child } from "../dom/types.js";
|
|
2
2
|
export type Component<P> = (props: P) => Child;
|
|
3
3
|
type MaybeComponent<P> = Component<P> | null | undefined | false;
|
|
4
4
|
export declare function $dynamic(component: () => MaybeComponent<void>): Child;
|
package/dist/types/flow/for.d.ts
CHANGED
package/dist/types/flow/if.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Accessor } from "../core/types";
|
|
2
|
-
import type { Child } from "../dom/types";
|
|
1
|
+
import type { Accessor } from "../core/types.js";
|
|
2
|
+
import type { Child } from "../dom/types.js";
|
|
3
3
|
export type Truthy<T> = Exclude<T, null | undefined | false | 0 | "" | 0>;
|
|
4
4
|
export declare function $if<T>(when: () => T, then: (value: Accessor<Truthy<T>>) => Child, otherwise?: () => Child): Child;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { $for, type ForOptions } from "./for";
|
|
2
|
-
export { $if, type Truthy } from "./if";
|
|
3
|
-
export { $show } from "./show";
|
|
4
|
-
export { $switch, type PartialSwitchCases, type SwitchCases } from "./switch";
|
|
5
|
-
export { $dynamic, type Component } from "./dynamic";
|
|
6
|
-
export { $catch } from "./catch";
|
|
7
|
-
export { $portal } from "./portal";
|
|
8
|
-
export { $suspense } from "./suspense";
|
|
1
|
+
export { $for, type ForOptions } from "./for.js";
|
|
2
|
+
export { $if, type Truthy } from "./if.js";
|
|
3
|
+
export { $show } from "./show.js";
|
|
4
|
+
export { $switch, type PartialSwitchCases, type SwitchCases } from "./switch.js";
|
|
5
|
+
export { $dynamic, type Component } from "./dynamic.js";
|
|
6
|
+
export { $catch } from "./catch.js";
|
|
7
|
+
export { $portal } from "./portal.js";
|
|
8
|
+
export { $suspense } from "./suspense.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Child } from "../dom/types";
|
|
1
|
+
import type { Child } from "../dom/types.js";
|
|
2
2
|
export declare function $portal(children: () => Child, target?: Element | null): Child;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Child } from "../dom/types";
|
|
1
|
+
import type { Child } from "../dom/types.js";
|
|
2
2
|
export declare function $suspense(children: () => Child, fallback: () => Child): Child;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type Store } from "../core/store";
|
|
2
|
-
import type { MaybeAccessor } from "../dom/types";
|
|
3
|
-
import type { ArrayPath, CheckResult, FormErrors, Path, PathValue, StandardSchemaV1 } from "./types";
|
|
1
|
+
import { type Store } from "../core/store.js";
|
|
2
|
+
import type { MaybeAccessor } from "../dom/types.js";
|
|
3
|
+
import type { ArrayPath, CheckResult, FormErrors, Path, PathValue, StandardSchemaV1 } from "./types.js";
|
|
4
4
|
export type FieldChecks<T> = {
|
|
5
5
|
[P in Path<T>]?: (value: PathValue<T, P>, values: T) => CheckResult | PromiseLike<CheckResult>;
|
|
6
6
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { form, type BindProps, type FieldArray, type FieldChecks, type Form, type FormOptions } from "./form";
|
|
2
|
-
export type { ArrayPath, CheckResult, FormErrors, Path, PathValue, StandardIssue, StandardResult, StandardSchemaV1 } from "./types";
|
|
1
|
+
export { form, type BindProps, type FieldArray, type FieldChecks, type Form, type FormOptions } from "./form.js";
|
|
2
|
+
export type { ArrayPath, CheckResult, FormErrors, Path, PathValue, StandardIssue, StandardResult, StandardSchemaV1 } from "./types.js";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export type { Accessor } from "./core/types";
|
|
2
|
-
export { signal, type Signal, type SignalOptions } from "./core/signal";
|
|
3
|
-
export { effect, type EffectOptions } from "./core/effect";
|
|
4
|
-
export { computed, type ComputedOptions } from "./core/computed";
|
|
5
|
-
export { batch, isStaticRender, untrack } from "./core/graph";
|
|
6
|
-
export { isServer } from "./core/env";
|
|
7
|
-
export { catchError, createRoot, getOwner, onCleanup, onMount, renderStatic, runWithOwner, type Owner } from "./core/owner";
|
|
8
|
-
export { createContext, provide, useContext, type Context, type ContextOptions } from "./core/context";
|
|
9
|
-
export { reconcile, store, unwrap, type ReconcileOptions, type SetStore, type Store, type StoreOptions } from "./core/store";
|
|
10
|
-
export * from "./dom/index";
|
|
11
|
-
export * from "./flow/index";
|
|
12
|
-
export * from "./async/index";
|
|
1
|
+
export type { Accessor } from "./core/types.js";
|
|
2
|
+
export { signal, type Signal, type SignalOptions } from "./core/signal.js";
|
|
3
|
+
export { effect, type EffectOptions } from "./core/effect.js";
|
|
4
|
+
export { computed, type ComputedOptions } from "./core/computed.js";
|
|
5
|
+
export { batch, isStaticRender, untrack } from "./core/graph.js";
|
|
6
|
+
export { isServer } from "./core/env.js";
|
|
7
|
+
export { catchError, createRoot, getOwner, onCleanup, onMount, renderStatic, runWithOwner, type Owner } from "./core/owner.js";
|
|
8
|
+
export { createContext, provide, useContext, type Context, type ContextOptions } from "./core/context.js";
|
|
9
|
+
export { reconcile, store, unwrap, type ReconcileOptions, type SetStore, type Store, type StoreOptions } from "./core/store.js";
|
|
10
|
+
export * from "./dom/index.js";
|
|
11
|
+
export * from "./flow/index.js";
|
|
12
|
+
export * from "./async/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createRouter, type RouterConfig } from "./router";
|
|
2
|
-
export { browserHistory, hashHistory, memoryHistory, type HistoryLocation, type RouterHistory } from "./history";
|
|
3
|
-
export type { GuardResult, LayoutProps, LinkOptions, NavigateOptions, NavigationTarget, ParamNames, Params, QueryOf, QuerySchema, QuerySpec, QueryValues, RouteDef, RouteMatch, RoutePath, Router } from "./types";
|
|
4
|
-
export { staticPaths } from "./match";
|
|
1
|
+
export { createRouter, type RouterConfig } from "./router.js";
|
|
2
|
+
export { browserHistory, hashHistory, memoryHistory, type HistoryLocation, type RouterHistory } from "./history.js";
|
|
3
|
+
export type { GuardResult, LayoutProps, LinkOptions, NavigateOptions, NavigationTarget, ParamNames, Params, QueryOf, QuerySchema, QuerySpec, QueryValues, RouteDef, RouteMatch, RoutePath, Router } from "./types.js";
|
|
4
|
+
export { staticPaths } from "./match.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type RouterHistory } from "./history";
|
|
2
|
-
import type { RouteDef, Router } from "./types";
|
|
1
|
+
import { type RouterHistory } from "./history.js";
|
|
2
|
+
import type { RouteDef, Router } from "./types.js";
|
|
3
3
|
export interface RouterConfig<Routes extends readonly RouteDef[]> {
|
|
4
4
|
routes: Routes;
|
|
5
5
|
history?: "browser" | "hash" | RouterHistory;
|