evikit 2.3.1 → 2.3.3

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/html.js CHANGED
@@ -8,6 +8,7 @@ export const br = HTMLElement("br");
8
8
  export const button = HTMLElement("button");
9
9
  export const circle = HTMLElement("circle");
10
10
  export const code = HTMLElement("code");
11
+ export const details = HTMLElement("details");
11
12
  export const dialog = HTMLElement("dialog");
12
13
  export const div = HTMLElement("div");
13
14
  export const em = HTMLElement("em");
@@ -42,6 +43,7 @@ export const select = HTMLElement("select");
42
43
  export const small = HTMLElement("small");
43
44
  export const span = HTMLElement("span");
44
45
  export const strong = HTMLElement("strong");
46
+ export const summary = HTMLElement("summary");
45
47
  export const svg = HTMLElement("svg");
46
48
  export const title = HTMLElement("title");
47
49
  export const ul = HTMLElement("ul");
package/index.d.ts CHANGED
@@ -90,6 +90,7 @@ export const br: H<"br">;
90
90
  export const button: H<"button">;
91
91
  export const circle: H<"circle">;
92
92
  export const code: H<"code">;
93
+ export const details: H<"details">;
93
94
  export const dialog: H<"dialog">;
94
95
  export const div: H<"div">;
95
96
  export const em: H<"em">;
@@ -124,6 +125,7 @@ export const select: H<"select">;
124
125
  export const small: H<"small">;
125
126
  export const span: H<"span">;
126
127
  export const strong: H<"strong">;
128
+ export const summary: H<"summary">;
127
129
  export const svg: H<"svg">;
128
130
  export const title: H<"title">;
129
131
  export const ul: H<"ul">;
package/index.js CHANGED
@@ -20,6 +20,7 @@ import {
20
20
  button,
21
21
  circle,
22
22
  code,
23
+ details,
23
24
  dialog,
24
25
  div,
25
26
  em,
@@ -54,6 +55,7 @@ import {
54
55
  small,
55
56
  span,
56
57
  strong,
58
+ summary,
57
59
  svg,
58
60
  title,
59
61
  ul,
@@ -199,6 +201,7 @@ export {
199
201
  button,
200
202
  circle,
201
203
  code,
204
+ details,
202
205
  dialog,
203
206
  div,
204
207
  em,
@@ -233,6 +236,7 @@ export {
233
236
  small,
234
237
  span,
235
238
  strong,
239
+ summary,
236
240
  svg,
237
241
  title,
238
242
  ul,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "evikit",
3
3
  "description": "Preact/SQLite SSR framework for small web apps",
4
- "version": "2.3.1",
4
+ "version": "2.3.3",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": "./index.js",
package/server.js CHANGED
@@ -3,7 +3,7 @@ import { toJsonSchema } from "@valibot/to-json-schema";
3
3
  import acceptLanguage from "accept-language";
4
4
  import { po } from "gettext-parser";
5
5
  import { readFile } from "node:fs/promises";
6
- import { Fragment, h } from "preact";
6
+ import { h } from "preact";
7
7
  import { renderToString } from "preact-render-to-string";
8
8
  import {
9
9
  object,
@@ -234,18 +234,21 @@ export function production({ html, prerender }) {
234
234
  .replace(/<title>.+<\/title>/, () =>
235
235
  renderToString(h("title", null, rendered.head.title)),
236
236
  )
237
- .replace(/<meta http-equiv="status" content=".+?">/, "")
237
+ .replace(/<!--app-head-->[\s\S]+?<body/, (match) =>
238
+ match.replace(/<meta[^>]+>/g, ""),
239
+ )
238
240
  .replace(
239
241
  `<!--app-head-->`,
240
- renderToString(
241
- h(
242
- Fragment,
243
- null,
244
- [...rendered.head.elements.values()].map(({ props, type }) =>
245
- h(type, props),
246
- ),
247
- ),
248
- ),
242
+ [...rendered.head.elements.values()]
243
+ .map(
244
+ ({ props, type }) =>
245
+ `<${type} ` +
246
+ Object.entries(props)
247
+ .map(([name, value]) => `${name}="${value}"`)
248
+ .join(" ") +
249
+ (type == "script" ? `</${type}>` : " />"),
250
+ )
251
+ .join(""),
249
252
  )
250
253
  .replace(
251
254
  /(<div id="app">)[\s\S]+<!--app-html-->/,