evikit 2.2.1 → 2.3.0
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 +4 -1
- package/db.d.ts +2 -1
- package/html.js +14 -0
- package/index.js +28 -0
- package/package.json +52 -52
package/README.md
CHANGED
|
@@ -37,6 +37,7 @@ Our language will be standard modern JavaScript as supported by Node.js directly
|
|
|
37
37
|
- [Application logic](#application-logic)
|
|
38
38
|
- [Data fetching](#data-fetching)
|
|
39
39
|
- [Forms](#forms)
|
|
40
|
+
- [File upload](#file-upload)
|
|
40
41
|
- [Translation](#translation)
|
|
41
42
|
- [Styling](#styling)
|
|
42
43
|
- _TODO_ [Testing](#testing)
|
|
@@ -77,6 +78,7 @@ node_modules
|
|
|
77
78
|
/dist
|
|
78
79
|
*~
|
|
79
80
|
*swp
|
|
81
|
+
*.mo
|
|
80
82
|
.env
|
|
81
83
|
```
|
|
82
84
|
|
|
@@ -159,6 +161,7 @@ export function ErrorPage({ children, error }) {
|
|
|
159
161
|
useTitle(status);
|
|
160
162
|
|
|
161
163
|
return main(
|
|
164
|
+
null,
|
|
162
165
|
p({ class: "nav" }, a({ href: "/" }, i18n.gettext("Questions"))),
|
|
163
166
|
h1({ class: "title" }, status),
|
|
164
167
|
children,
|
|
@@ -688,7 +691,7 @@ form(
|
|
|
688
691
|
),
|
|
689
692
|
```
|
|
690
693
|
|
|
691
|
-
|
|
694
|
+
##### File upload
|
|
692
695
|
|
|
693
696
|
Why not let each choice have an icon?
|
|
694
697
|
|
package/db.d.ts
CHANGED
|
@@ -20,7 +20,8 @@ export type Db<
|
|
|
20
20
|
| InferOutput<Schema[Table]["entries"][K]>[];
|
|
21
21
|
}): void;
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
24
|
+
select<W extends Join<R, Table> = { with: {} }>(
|
|
24
25
|
props?: W,
|
|
25
26
|
): Select<Schema, R, F, Table, W>[];
|
|
26
27
|
|
package/html.js
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import { HTMLElement } from "./html-element.js";
|
|
2
2
|
|
|
3
3
|
export const a = HTMLElement("a");
|
|
4
|
+
export const article = HTMLElement("article");
|
|
4
5
|
export const b = HTMLElement("b");
|
|
6
|
+
export const blockquote = HTMLElement("blockquote");
|
|
7
|
+
export const br = HTMLElement("br");
|
|
5
8
|
export const button = HTMLElement("button");
|
|
6
9
|
export const circle = HTMLElement("circle");
|
|
10
|
+
export const code = HTMLElement("code");
|
|
7
11
|
export const dialog = HTMLElement("dialog");
|
|
8
12
|
export const div = HTMLElement("div");
|
|
13
|
+
export const em = HTMLElement("em");
|
|
9
14
|
export const fieldset = HTMLElement("fieldset");
|
|
15
|
+
export const figcaption = HTMLElement("figcaption");
|
|
10
16
|
export const figure = HTMLElement("figure");
|
|
17
|
+
export const footer = HTMLElement("footer");
|
|
11
18
|
export const form = HTMLElement("form");
|
|
12
19
|
export const header = HTMLElement("header");
|
|
13
20
|
export const h1 = HTMLElement("h1");
|
|
@@ -16,18 +23,25 @@ export const h3 = HTMLElement("h3");
|
|
|
16
23
|
export const h4 = HTMLElement("h4");
|
|
17
24
|
export const h5 = HTMLElement("h5");
|
|
18
25
|
export const h6 = HTMLElement("h6");
|
|
26
|
+
export const hr = HTMLElement("hr");
|
|
19
27
|
export const i = HTMLElement("i");
|
|
20
28
|
export const img = HTMLElement("img");
|
|
21
29
|
export const input = HTMLElement("input");
|
|
22
30
|
export const label = HTMLElement("label");
|
|
31
|
+
export const legend = HTMLElement("legend");
|
|
23
32
|
export const li = HTMLElement("li");
|
|
24
33
|
export const main = HTMLElement("main");
|
|
34
|
+
export const nav = HTMLElement("nav");
|
|
25
35
|
export const ol = HTMLElement("ol");
|
|
26
36
|
export const option = HTMLElement("option");
|
|
27
37
|
export const p = HTMLElement("p");
|
|
28
38
|
export const path = HTMLElement("path");
|
|
39
|
+
export const pre = HTMLElement("pre");
|
|
40
|
+
export const section = HTMLElement("section");
|
|
29
41
|
export const select = HTMLElement("select");
|
|
42
|
+
export const small = HTMLElement("small");
|
|
30
43
|
export const span = HTMLElement("span");
|
|
44
|
+
export const strong = HTMLElement("strong");
|
|
31
45
|
export const svg = HTMLElement("svg");
|
|
32
46
|
export const title = HTMLElement("title");
|
|
33
47
|
export const ul = HTMLElement("ul");
|
package/index.js
CHANGED
|
@@ -13,13 +13,20 @@ import { useState } from "preact/hooks";
|
|
|
13
13
|
import { flatten, primary, references, relations } from "./db.js";
|
|
14
14
|
import {
|
|
15
15
|
a,
|
|
16
|
+
article,
|
|
16
17
|
b,
|
|
18
|
+
blockquote,
|
|
19
|
+
br,
|
|
17
20
|
button,
|
|
18
21
|
circle,
|
|
22
|
+
code,
|
|
19
23
|
dialog,
|
|
20
24
|
div,
|
|
25
|
+
em,
|
|
21
26
|
fieldset,
|
|
27
|
+
figcaption,
|
|
22
28
|
figure,
|
|
29
|
+
footer,
|
|
23
30
|
form,
|
|
24
31
|
h1,
|
|
25
32
|
h2,
|
|
@@ -28,18 +35,25 @@ import {
|
|
|
28
35
|
h5,
|
|
29
36
|
h6,
|
|
30
37
|
header,
|
|
38
|
+
hr,
|
|
31
39
|
i,
|
|
32
40
|
img,
|
|
33
41
|
input,
|
|
34
42
|
label,
|
|
43
|
+
legend,
|
|
35
44
|
li,
|
|
36
45
|
main,
|
|
46
|
+
nav,
|
|
37
47
|
ol,
|
|
38
48
|
option,
|
|
39
49
|
p,
|
|
40
50
|
path,
|
|
51
|
+
pre,
|
|
52
|
+
section,
|
|
41
53
|
select,
|
|
54
|
+
small,
|
|
42
55
|
span,
|
|
56
|
+
strong,
|
|
43
57
|
svg,
|
|
44
58
|
title,
|
|
45
59
|
ul,
|
|
@@ -178,13 +192,20 @@ export { getI18n, useApi, useEnhance, useI18n, useQueryClient, useStatus };
|
|
|
178
192
|
|
|
179
193
|
export {
|
|
180
194
|
a,
|
|
195
|
+
article,
|
|
181
196
|
b,
|
|
197
|
+
blockquote,
|
|
198
|
+
br,
|
|
182
199
|
button,
|
|
183
200
|
circle,
|
|
201
|
+
code,
|
|
184
202
|
dialog,
|
|
185
203
|
div,
|
|
204
|
+
em,
|
|
186
205
|
fieldset,
|
|
206
|
+
figcaption,
|
|
187
207
|
figure,
|
|
208
|
+
footer,
|
|
188
209
|
form,
|
|
189
210
|
h1,
|
|
190
211
|
h2,
|
|
@@ -193,18 +214,25 @@ export {
|
|
|
193
214
|
h5,
|
|
194
215
|
h6,
|
|
195
216
|
header,
|
|
217
|
+
hr,
|
|
196
218
|
i,
|
|
197
219
|
img,
|
|
198
220
|
input,
|
|
199
221
|
label,
|
|
222
|
+
legend,
|
|
200
223
|
li,
|
|
201
224
|
main,
|
|
225
|
+
nav,
|
|
202
226
|
ol,
|
|
203
227
|
option,
|
|
204
228
|
p,
|
|
205
229
|
path,
|
|
230
|
+
pre,
|
|
231
|
+
section,
|
|
206
232
|
select,
|
|
233
|
+
small,
|
|
207
234
|
span,
|
|
235
|
+
strong,
|
|
208
236
|
svg,
|
|
209
237
|
title,
|
|
210
238
|
ul,
|
package/package.json
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "evikit",
|
|
3
|
-
"description": "Preact/SQLite SSR framework for small web apps",
|
|
4
|
-
"version": "2.
|
|
5
|
-
"type": "module",
|
|
6
|
-
"exports": {
|
|
7
|
-
".": "./index.js",
|
|
8
|
-
"./db": "./db.js",
|
|
9
|
-
"./server": "./server.js",
|
|
10
|
-
"./sqlite": "./sqlite.js",
|
|
11
|
-
"./testing": "./testing.js"
|
|
12
|
-
},
|
|
13
|
-
"bin": {
|
|
14
|
-
"evikit-extract": "bin/evikit-extract.js"
|
|
15
|
-
},
|
|
16
|
-
"scripts": {
|
|
17
|
-
"build": "tsc",
|
|
18
|
-
"format": "prettier --write . && eslint --fix .",
|
|
19
|
-
"lint": "prettier --check . && eslint ."
|
|
20
|
-
},
|
|
21
|
-
"author": "Denys Nykula <nykula@ukr.net>",
|
|
22
|
-
"license": "MIT",
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@fastify/busboy": "^3.2.0",
|
|
25
|
-
"@types/gettext-parser": "^9.0.0",
|
|
26
|
-
"@types/gettext.js": "^2.0.0",
|
|
27
|
-
"@types/node": "^25",
|
|
28
|
-
"@valibot/to-json-schema": "^1.7.0",
|
|
29
|
-
"env-paths": "^4.0.0",
|
|
30
|
-
"gettext-parser": "^9.0.2",
|
|
31
|
-
"gettext.js": "^2.0.3",
|
|
32
|
-
"preact-render-to-string": "^6.7.0"
|
|
33
|
-
},
|
|
34
|
-
"peerDependencies": {
|
|
35
|
-
"accept-language": "^3.0.20",
|
|
36
|
-
"hoofd": "^1.7.3",
|
|
37
|
-
"preact": "^10.29.2",
|
|
38
|
-
"preact-iso": "^2.12.0",
|
|
39
|
-
"valibot": "^1.4.0"
|
|
40
|
-
},
|
|
41
|
-
"devDependencies": {
|
|
42
|
-
"@eslint/compat": "^2.1.0",
|
|
43
|
-
"@eslint/js": "^10.0.1",
|
|
44
|
-
"eslint": "^10.4.0",
|
|
45
|
-
"eslint-config-prettier": "^10.1.8",
|
|
46
|
-
"eslint-plugin-perfectionist": "^5.9.0",
|
|
47
|
-
"globals": "^17.6.0",
|
|
48
|
-
"prettier": "^3.8.3",
|
|
49
|
-
"typescript": "^6.0.3",
|
|
50
|
-
"typescript-eslint": "^8.59.4"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "evikit",
|
|
3
|
+
"description": "Preact/SQLite SSR framework for small web apps",
|
|
4
|
+
"version": "2.3.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./index.js",
|
|
8
|
+
"./db": "./db.js",
|
|
9
|
+
"./server": "./server.js",
|
|
10
|
+
"./sqlite": "./sqlite.js",
|
|
11
|
+
"./testing": "./testing.js"
|
|
12
|
+
},
|
|
13
|
+
"bin": {
|
|
14
|
+
"evikit-extract": "bin/evikit-extract.js"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsc",
|
|
18
|
+
"format": "prettier --write . && eslint --fix .",
|
|
19
|
+
"lint": "prettier --check . && eslint ."
|
|
20
|
+
},
|
|
21
|
+
"author": "Denys Nykula <nykula@ukr.net>",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@fastify/busboy": "^3.2.0",
|
|
25
|
+
"@types/gettext-parser": "^9.0.0",
|
|
26
|
+
"@types/gettext.js": "^2.0.0",
|
|
27
|
+
"@types/node": "^25",
|
|
28
|
+
"@valibot/to-json-schema": "^1.7.0",
|
|
29
|
+
"env-paths": "^4.0.0",
|
|
30
|
+
"gettext-parser": "^9.0.2",
|
|
31
|
+
"gettext.js": "^2.0.3",
|
|
32
|
+
"preact-render-to-string": "^6.7.0"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"accept-language": "^3.0.20",
|
|
36
|
+
"hoofd": "^1.7.3",
|
|
37
|
+
"preact": "^10.29.2",
|
|
38
|
+
"preact-iso": "^2.12.0",
|
|
39
|
+
"valibot": "^1.4.0"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@eslint/compat": "^2.1.0",
|
|
43
|
+
"@eslint/js": "^10.0.1",
|
|
44
|
+
"eslint": "^10.4.0",
|
|
45
|
+
"eslint-config-prettier": "^10.1.8",
|
|
46
|
+
"eslint-plugin-perfectionist": "^5.9.0",
|
|
47
|
+
"globals": "^17.6.0",
|
|
48
|
+
"prettier": "^3.8.3",
|
|
49
|
+
"typescript": "^6.0.3",
|
|
50
|
+
"typescript-eslint": "^8.59.4"
|
|
51
|
+
}
|
|
52
|
+
}
|