hono 3.8.4 → 3.9.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.
@@ -22,10 +22,10 @@ __export(adapter_exports, {
22
22
  getRuntimeKey: () => getRuntimeKey
23
23
  });
24
24
  module.exports = __toCommonJS(adapter_exports);
25
- const env = (c) => {
25
+ const env = (c, runtime) => {
26
26
  const global = globalThis;
27
27
  const globalEnv = global?.process?.env;
28
- const runtime = getRuntimeKey();
28
+ runtime ?? (runtime = getRuntimeKey());
29
29
  const runtimeEnvHandlers = {
30
30
  bun: () => globalEnv,
31
31
  node: () => globalEnv,
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var intrinsic_elements_exports = {};
16
+ module.exports = __toCommonJS(intrinsic_elements_exports);
@@ -25,15 +25,18 @@ __export(jsx_renderer_exports, {
25
25
  module.exports = __toCommonJS(jsx_renderer_exports);
26
26
  var import_jsx = require("../../jsx");
27
27
  const RequestContext = (0, import_jsx.createContext)(null);
28
- const createRenderer = (c, component) => (children, props) => c.html(
29
- (0, import_jsx.jsx)(
30
- RequestContext.Provider,
31
- { value: c },
32
- component ? component({ children, ...props || {} }) : children
33
- )
34
- );
35
- const jsxRenderer = (component) => (c, next) => {
36
- c.setRenderer(createRenderer(c, component));
28
+ const createRenderer = (c, component, options) => (children, props) => {
29
+ const docType = typeof options?.docType === "string" ? options.docType : options?.docType === true ? "<!DOCTYPE html>" : "";
30
+ return c.html(
31
+ docType + (0, import_jsx.jsx)(
32
+ RequestContext.Provider,
33
+ { value: c },
34
+ component ? component({ children, ...props || {} }) : children
35
+ )
36
+ );
37
+ };
38
+ const jsxRenderer = (component, options) => (c, next) => {
39
+ c.setRenderer(createRenderer(c, component, options));
37
40
  return next();
38
41
  };
39
42
  const useRequestContext = () => {
@@ -1,8 +1,8 @@
1
1
  // src/helper/adapter/index.ts
2
- var env = (c) => {
2
+ var env = (c, runtime) => {
3
3
  const global = globalThis;
4
4
  const globalEnv = global?.process?.env;
5
- const runtime = getRuntimeKey();
5
+ runtime ?? (runtime = getRuntimeKey());
6
6
  const runtimeEnvHandlers = {
7
7
  bun: () => globalEnv,
8
8
  node: () => globalEnv,
File without changes
@@ -1,15 +1,18 @@
1
1
  // src/middleware/jsx-renderer/index.ts
2
2
  import { jsx, createContext, useContext } from "../../jsx/index.js";
3
3
  var RequestContext = createContext(null);
4
- var createRenderer = (c, component) => (children, props) => c.html(
5
- jsx(
6
- RequestContext.Provider,
7
- { value: c },
8
- component ? component({ children, ...props || {} }) : children
9
- )
10
- );
11
- var jsxRenderer = (component) => (c, next) => {
12
- c.setRenderer(createRenderer(c, component));
4
+ var createRenderer = (c, component, options) => (children, props) => {
5
+ const docType = typeof options?.docType === "string" ? options.docType : options?.docType === true ? "<!DOCTYPE html>" : "";
6
+ return c.html(
7
+ docType + jsx(
8
+ RequestContext.Provider,
9
+ { value: c },
10
+ component ? component({ children, ...props || {} }) : children
11
+ )
12
+ );
13
+ };
14
+ var jsxRenderer = (component, options) => (c, next) => {
15
+ c.setRenderer(createRenderer(c, component, options));
13
16
  return next();
14
17
  };
15
18
  var useRequestContext = () => {
@@ -1,10 +1,10 @@
1
+ import type { Runtime } from './helper/adapter';
1
2
  import type { HonoRequest } from './request';
2
3
  import type { Env, FetchEventLike, NotFoundHandler, Input, TypedResponse } from './types';
3
4
  import type { CookieOptions } from './utils/cookie';
4
5
  import type { StatusCode } from './utils/http-status';
5
6
  import { StreamingApi } from './utils/stream';
6
7
  import type { JSONValue, InterfaceToType } from './utils/types';
7
- declare type Runtime = 'node' | 'deno' | 'bun' | 'workerd' | 'fastly' | 'edge-light' | 'lagon' | 'other';
8
8
  declare type HeaderRecord = Record<string, string | string[]>;
9
9
  declare type Data = string | ArrayBuffer | ReadableStream;
10
10
  export interface ExecutionContext {
@@ -1,3 +1,4 @@
1
1
  import type { Context } from '../../context';
2
- export declare const env: <T extends Record<string, string>, C extends Context<any, any, {}> = Context<{}, any, {}>>(c: C) => T & C["env"];
2
+ export declare type Runtime = 'node' | 'deno' | 'bun' | 'workerd' | 'fastly' | 'edge-light' | 'lagon' | 'other';
3
+ export declare const env: <T extends Record<string, string>, C extends Context<any, any, {}> = Context<{}, any, {}>>(c: C, runtime?: Runtime) => T & C["env"];
3
4
  export declare const getRuntimeKey: () => "other" | "node" | "deno" | "bun" | "workerd" | "fastly" | "edge-light" | "lagon";
@@ -1,4 +1,5 @@
1
1
  import type { StringBuffer, HtmlEscaped, HtmlEscapedString } from '../utils/html';
2
+ import type { IntrinsicElements as IntrinsicElementsDefined } from './intrinsic-elements';
2
3
  declare type Props = Record<string, any>;
3
4
  declare global {
4
5
  namespace JSX {
@@ -6,7 +7,7 @@ declare global {
6
7
  interface ElementChildrenAttribute {
7
8
  children: Child;
8
9
  }
9
- interface IntrinsicElements {
10
+ interface IntrinsicElements extends IntrinsicElementsDefined {
10
11
  [tagName: string]: Props;
11
12
  }
12
13
  }
@@ -0,0 +1,517 @@
1
+ /**
2
+ * This code is based on React.
3
+ * https://github.com/facebook/react
4
+ * MIT License
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ */
7
+ declare global {
8
+ namespace Hono {
9
+ type CrossOrigin = 'anonymous' | 'use-credentials' | '' | undefined;
10
+ type CSSProperties = {};
11
+ type AnyAttributes = {
12
+ [attributeName: string]: any;
13
+ };
14
+ interface JSXAttributes {
15
+ dangerouslySetInnerHTML?: {
16
+ __html: string;
17
+ };
18
+ }
19
+ interface HTMLAttributes extends JSXAttributes, AnyAttributes {
20
+ accesskey?: string | undefined;
21
+ autofocus?: boolean | undefined;
22
+ class?: string | undefined;
23
+ contenteditable?: boolean | 'inherit' | undefined;
24
+ contextmenu?: string | undefined;
25
+ dir?: string | undefined;
26
+ draggable?: boolean | undefined;
27
+ hidden?: boolean | undefined;
28
+ id?: string | undefined;
29
+ lang?: string | undefined;
30
+ nonce?: string | undefined;
31
+ placeholder?: string | undefined;
32
+ slot?: string | undefined;
33
+ spellcheck?: boolean | undefined;
34
+ style?: CSSProperties | undefined;
35
+ tabindex?: number | undefined;
36
+ title?: string | undefined;
37
+ translate?: 'yes' | 'no' | undefined;
38
+ }
39
+ type HTMLAttributeReferrerPolicy = '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
40
+ type HTMLAttributeAnchorTarget = '_self' | '_blank' | '_parent' | '_top' | string;
41
+ interface AnchorHTMLAttributes extends HTMLAttributes {
42
+ download?: any;
43
+ href?: string | undefined;
44
+ hreflang?: string | undefined;
45
+ media?: string | undefined;
46
+ ping?: string | undefined;
47
+ target?: HTMLAttributeAnchorTarget | undefined;
48
+ type?: string | undefined;
49
+ referrerpolicy?: HTMLAttributeReferrerPolicy | undefined;
50
+ }
51
+ interface AudioHTMLAttributes extends MediaHTMLAttributes {
52
+ }
53
+ interface AreaHTMLAttributes extends HTMLAttributes {
54
+ alt?: string | undefined;
55
+ coords?: string | undefined;
56
+ download?: any;
57
+ href?: string | undefined;
58
+ hreflang?: string | undefined;
59
+ media?: string | undefined;
60
+ referrerpolicy?: HTMLAttributeReferrerPolicy | undefined;
61
+ shape?: string | undefined;
62
+ target?: string | undefined;
63
+ }
64
+ interface BaseHTMLAttributes extends HTMLAttributes {
65
+ href?: string | undefined;
66
+ target?: string | undefined;
67
+ }
68
+ interface BlockquoteHTMLAttributes extends HTMLAttributes {
69
+ cite?: string | undefined;
70
+ }
71
+ interface ButtonHTMLAttributes extends HTMLAttributes {
72
+ disabled?: boolean | undefined;
73
+ form?: string | undefined;
74
+ formenctype?: string | undefined;
75
+ formmethod?: string | undefined;
76
+ formnovalidate?: boolean | undefined;
77
+ formtarget?: string | undefined;
78
+ name?: string | undefined;
79
+ type?: 'submit' | 'reset' | 'button' | undefined;
80
+ value?: string | ReadonlyArray<string> | number | undefined;
81
+ }
82
+ interface CanvasHTMLAttributes extends HTMLAttributes {
83
+ height?: number | string | undefined;
84
+ width?: number | string | undefined;
85
+ }
86
+ interface ColHTMLAttributes extends HTMLAttributes {
87
+ span?: number | undefined;
88
+ width?: number | string | undefined;
89
+ }
90
+ interface ColgroupHTMLAttributes extends HTMLAttributes {
91
+ span?: number | undefined;
92
+ }
93
+ interface DataHTMLAttributes extends HTMLAttributes {
94
+ value?: string | ReadonlyArray<string> | number | undefined;
95
+ }
96
+ interface DetailsHTMLAttributes extends HTMLAttributes {
97
+ open?: boolean | undefined;
98
+ }
99
+ interface DelHTMLAttributes extends HTMLAttributes {
100
+ cite?: string | undefined;
101
+ dateTime?: string | undefined;
102
+ }
103
+ interface DialogHTMLAttributes extends HTMLAttributes {
104
+ open?: boolean | undefined;
105
+ }
106
+ interface EmbedHTMLAttributes extends HTMLAttributes {
107
+ height?: number | string | undefined;
108
+ src?: string | undefined;
109
+ type?: string | undefined;
110
+ width?: number | string | undefined;
111
+ }
112
+ interface FieldsetHTMLAttributes extends HTMLAttributes {
113
+ disabled?: boolean | undefined;
114
+ form?: string | undefined;
115
+ name?: string | undefined;
116
+ }
117
+ interface FormHTMLAttributes extends HTMLAttributes {
118
+ 'accept-charset'?: string | undefined;
119
+ autocomplete?: string | undefined;
120
+ enctype?: string | undefined;
121
+ method?: string | undefined;
122
+ name?: string | undefined;
123
+ novalidate?: boolean | undefined;
124
+ target?: string | undefined;
125
+ }
126
+ interface HtmlHTMLAttributes extends HTMLAttributes {
127
+ manifest?: string | undefined;
128
+ }
129
+ interface IframeHTMLAttributes extends HTMLAttributes {
130
+ allow?: string | undefined;
131
+ allowfullscreen?: boolean | undefined;
132
+ height?: number | string | undefined;
133
+ loading?: 'eager' | 'lazy' | undefined;
134
+ name?: string | undefined;
135
+ referrerpolicy?: HTMLAttributeReferrerPolicy | undefined;
136
+ sandbox?: string | undefined;
137
+ seamless?: boolean | undefined;
138
+ src?: string | undefined;
139
+ srcdoc?: string | undefined;
140
+ width?: number | string | undefined;
141
+ }
142
+ interface ImgHTMLAttributes extends HTMLAttributes {
143
+ alt?: string | undefined;
144
+ crossorigin?: CrossOrigin;
145
+ decoding?: 'async' | 'auto' | 'sync' | undefined;
146
+ height?: number | string | undefined;
147
+ loading?: 'eager' | 'lazy' | undefined;
148
+ referrerpolicy?: HTMLAttributeReferrerPolicy | undefined;
149
+ sizes?: string | undefined;
150
+ src?: string | undefined;
151
+ srcset?: string | undefined;
152
+ usemap?: string | undefined;
153
+ width?: number | string | undefined;
154
+ }
155
+ interface InsHTMLAttributes extends HTMLAttributes {
156
+ cite?: string | undefined;
157
+ datetime?: string | undefined;
158
+ }
159
+ type HTMLInputTypeAttribute = 'button' | 'checkbox' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'radio' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week' | string;
160
+ interface InputHTMLAttributes extends HTMLAttributes {
161
+ accept?: string | undefined;
162
+ alt?: string | undefined;
163
+ autocomplete?: string | undefined;
164
+ capture?: boolean | 'user' | 'environment' | undefined;
165
+ checked?: boolean | undefined;
166
+ disabled?: boolean | undefined;
167
+ enterkeyhint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send' | undefined;
168
+ form?: string | undefined;
169
+ formenctype?: string | undefined;
170
+ formmethod?: string | undefined;
171
+ formnovalidate?: boolean | undefined;
172
+ formtarget?: string | undefined;
173
+ height?: number | string | undefined;
174
+ list?: string | undefined;
175
+ max?: number | string | undefined;
176
+ maxlength?: number | undefined;
177
+ min?: number | string | undefined;
178
+ minlength?: number | undefined;
179
+ multiple?: boolean | undefined;
180
+ name?: string | undefined;
181
+ pattern?: string | undefined;
182
+ placeholder?: string | undefined;
183
+ readonly?: boolean | undefined;
184
+ required?: boolean | undefined;
185
+ size?: number | undefined;
186
+ src?: string | undefined;
187
+ step?: number | string | undefined;
188
+ type?: HTMLInputTypeAttribute | undefined;
189
+ value?: string | ReadonlyArray<string> | number | undefined;
190
+ width?: number | string | undefined;
191
+ }
192
+ interface KeygenHTMLAttributes extends HTMLAttributes {
193
+ challenge?: string | undefined;
194
+ disabled?: boolean | undefined;
195
+ form?: string | undefined;
196
+ keytype?: string | undefined;
197
+ name?: string | undefined;
198
+ }
199
+ interface LabelHTMLAttributes extends HTMLAttributes {
200
+ form?: string | undefined;
201
+ for?: string | undefined;
202
+ }
203
+ interface LiHTMLAttributes extends HTMLAttributes {
204
+ value?: string | ReadonlyArray<string> | number | undefined;
205
+ }
206
+ interface LinkHTMLAttributes extends HTMLAttributes {
207
+ as?: string | undefined;
208
+ crossorigin?: CrossOrigin;
209
+ href?: string | undefined;
210
+ hreflang?: string | undefined;
211
+ integrity?: string | undefined;
212
+ media?: string | undefined;
213
+ imagesrcset?: string | undefined;
214
+ imagesizes?: string | undefined;
215
+ referrerpolicy?: HTMLAttributeReferrerPolicy | undefined;
216
+ sizes?: string | undefined;
217
+ type?: string | undefined;
218
+ charSet?: string | undefined;
219
+ }
220
+ interface MapHTMLAttributes extends HTMLAttributes {
221
+ name?: string | undefined;
222
+ }
223
+ interface MenuHTMLAttributes extends HTMLAttributes {
224
+ type?: string | undefined;
225
+ }
226
+ interface MediaHTMLAttributes extends HTMLAttributes {
227
+ autoplay?: boolean | undefined;
228
+ controls?: boolean | undefined;
229
+ controlslist?: string | undefined;
230
+ crossorigin?: CrossOrigin;
231
+ loop?: boolean | undefined;
232
+ mediagroup?: string | undefined;
233
+ muted?: boolean | undefined;
234
+ playsinline?: boolean | undefined;
235
+ preload?: string | undefined;
236
+ src?: string | undefined;
237
+ }
238
+ interface MetaHTMLAttributes extends HTMLAttributes {
239
+ charset?: string | undefined;
240
+ 'http-equiv'?: string | undefined;
241
+ name?: string | undefined;
242
+ media?: string | undefined;
243
+ content?: string | undefined;
244
+ }
245
+ interface MeterHTMLAttributes extends HTMLAttributes {
246
+ form?: string | undefined;
247
+ high?: number | undefined;
248
+ low?: number | undefined;
249
+ max?: number | string | undefined;
250
+ min?: number | string | undefined;
251
+ optimum?: number | undefined;
252
+ value?: string | ReadonlyArray<string> | number | undefined;
253
+ }
254
+ interface QuoteHTMLAttributes extends HTMLAttributes {
255
+ cite?: string | undefined;
256
+ }
257
+ interface ObjectHTMLAttributes extends HTMLAttributes {
258
+ data?: string | undefined;
259
+ form?: string | undefined;
260
+ height?: number | string | undefined;
261
+ name?: string | undefined;
262
+ type?: string | undefined;
263
+ usemap?: string | undefined;
264
+ width?: number | string | undefined;
265
+ }
266
+ interface OlHTMLAttributes extends HTMLAttributes {
267
+ reversed?: boolean | undefined;
268
+ start?: number | undefined;
269
+ type?: '1' | 'a' | 'A' | 'i' | 'I' | undefined;
270
+ }
271
+ interface OptgroupHTMLAttributes extends HTMLAttributes {
272
+ disabled?: boolean | undefined;
273
+ label?: string | undefined;
274
+ }
275
+ interface OptionHTMLAttributes extends HTMLAttributes {
276
+ disabled?: boolean | undefined;
277
+ label?: string | undefined;
278
+ selected?: boolean | undefined;
279
+ value?: string | ReadonlyArray<string> | number | undefined;
280
+ }
281
+ interface OutputHTMLAttributes extends HTMLAttributes {
282
+ form?: string | undefined;
283
+ for?: string | undefined;
284
+ name?: string | undefined;
285
+ }
286
+ interface ParamHTMLAttributes extends HTMLAttributes {
287
+ name?: string | undefined;
288
+ value?: string | ReadonlyArray<string> | number | undefined;
289
+ }
290
+ interface ProgressHTMLAttributes extends HTMLAttributes {
291
+ max?: number | string | undefined;
292
+ value?: string | ReadonlyArray<string> | number | undefined;
293
+ }
294
+ interface SlotHTMLAttributes extends HTMLAttributes {
295
+ name?: string | undefined;
296
+ }
297
+ interface ScriptHTMLAttributes extends HTMLAttributes {
298
+ async?: boolean | undefined;
299
+ crossorigin?: CrossOrigin;
300
+ defer?: boolean | undefined;
301
+ integrity?: string | undefined;
302
+ nomodule?: boolean | undefined;
303
+ referrerpolicy?: HTMLAttributeReferrerPolicy | undefined;
304
+ src?: string | undefined;
305
+ type?: string | undefined;
306
+ }
307
+ interface SelectHTMLAttributes extends HTMLAttributes {
308
+ autocomplete?: string | undefined;
309
+ disabled?: boolean | undefined;
310
+ form?: string | undefined;
311
+ multiple?: boolean | undefined;
312
+ name?: string | undefined;
313
+ required?: boolean | undefined;
314
+ size?: number | undefined;
315
+ value?: string | ReadonlyArray<string> | number | undefined;
316
+ }
317
+ interface SourceHTMLAttributes extends HTMLAttributes {
318
+ height?: number | string | undefined;
319
+ media?: string | undefined;
320
+ sizes?: string | undefined;
321
+ src?: string | undefined;
322
+ srcset?: string | undefined;
323
+ type?: string | undefined;
324
+ width?: number | string | undefined;
325
+ }
326
+ interface StyleHTMLAttributes extends HTMLAttributes {
327
+ media?: string | undefined;
328
+ scoped?: boolean | undefined;
329
+ type?: string | undefined;
330
+ }
331
+ interface TableHTMLAttributes extends HTMLAttributes {
332
+ align?: 'left' | 'center' | 'right' | undefined;
333
+ bgcolor?: string | undefined;
334
+ border?: number | undefined;
335
+ cellpadding?: number | string | undefined;
336
+ cellspacing?: number | string | undefined;
337
+ frame?: boolean | undefined;
338
+ rules?: 'none' | 'groups' | 'rows' | 'columns' | 'all' | undefined;
339
+ summary?: string | undefined;
340
+ width?: number | string | undefined;
341
+ }
342
+ interface TextareaHTMLAttributes extends HTMLAttributes {
343
+ autocomplete?: string | undefined;
344
+ cols?: number | undefined;
345
+ dirname?: string | undefined;
346
+ disabled?: boolean | undefined;
347
+ form?: string | undefined;
348
+ maxlength?: number | undefined;
349
+ minlength?: number | undefined;
350
+ name?: string | undefined;
351
+ placeholder?: string | undefined;
352
+ readonly?: boolean | undefined;
353
+ required?: boolean | undefined;
354
+ rows?: number | undefined;
355
+ value?: string | ReadonlyArray<string> | number | undefined;
356
+ wrap?: string | undefined;
357
+ }
358
+ interface TdHTMLAttributes extends HTMLAttributes {
359
+ align?: 'left' | 'center' | 'right' | 'justify' | 'char' | undefined;
360
+ colspan?: number | undefined;
361
+ headers?: string | undefined;
362
+ rowspan?: number | undefined;
363
+ scope?: string | undefined;
364
+ abbr?: string | undefined;
365
+ height?: number | string | undefined;
366
+ width?: number | string | undefined;
367
+ valign?: 'top' | 'middle' | 'bottom' | 'baseline' | undefined;
368
+ }
369
+ interface ThHTMLAttributes extends HTMLAttributes {
370
+ align?: 'left' | 'center' | 'right' | 'justify' | 'char' | undefined;
371
+ colspan?: number | undefined;
372
+ headers?: string | undefined;
373
+ rowspan?: number | undefined;
374
+ scope?: string | undefined;
375
+ abbr?: string | undefined;
376
+ }
377
+ interface TimeHTMLAttributes extends HTMLAttributes {
378
+ datetime?: string | undefined;
379
+ }
380
+ interface TrackHTMLAttributes extends HTMLAttributes {
381
+ default?: boolean | undefined;
382
+ kind?: string | undefined;
383
+ label?: string | undefined;
384
+ src?: string | undefined;
385
+ srclang?: string | undefined;
386
+ }
387
+ interface VideoHTMLAttributes extends MediaHTMLAttributes {
388
+ height?: number | string | undefined;
389
+ playsinline?: boolean | undefined;
390
+ poster?: string | undefined;
391
+ width?: number | string | undefined;
392
+ disablePictureInPicture?: boolean | undefined;
393
+ disableRemotePlayback?: boolean | undefined;
394
+ }
395
+ interface IntrinsicElements {
396
+ a: AnchorHTMLAttributes;
397
+ abbr: HTMLAttributes;
398
+ address: HTMLAttributes;
399
+ area: AreaHTMLAttributes;
400
+ article: HTMLAttributes;
401
+ aside: HTMLAttributes;
402
+ audio: AudioHTMLAttributes;
403
+ b: HTMLAttributes;
404
+ base: BaseHTMLAttributes;
405
+ bdi: HTMLAttributes;
406
+ bdo: HTMLAttributes;
407
+ big: HTMLAttributes;
408
+ blockquote: BlockquoteHTMLAttributes;
409
+ body: HTMLAttributes;
410
+ br: HTMLAttributes;
411
+ button: ButtonHTMLAttributes;
412
+ canvas: CanvasHTMLAttributes;
413
+ caption: HTMLAttributes;
414
+ center: HTMLAttributes;
415
+ cite: HTMLAttributes;
416
+ code: HTMLAttributes;
417
+ col: ColHTMLAttributes;
418
+ colgroup: ColgroupHTMLAttributes;
419
+ data: DataHTMLAttributes;
420
+ datalist: HTMLAttributes;
421
+ dd: HTMLAttributes;
422
+ del: DelHTMLAttributes;
423
+ details: DetailsHTMLAttributes;
424
+ dfn: HTMLAttributes;
425
+ dialog: DialogHTMLAttributes;
426
+ div: HTMLAttributes;
427
+ dl: HTMLAttributes;
428
+ dt: HTMLAttributes;
429
+ em: HTMLAttributes;
430
+ embed: EmbedHTMLAttributes;
431
+ fieldset: FieldsetHTMLAttributes;
432
+ figcaption: HTMLAttributes;
433
+ figure: HTMLAttributes;
434
+ footer: HTMLAttributes;
435
+ form: FormHTMLAttributes;
436
+ h1: HTMLAttributes;
437
+ h2: HTMLAttributes;
438
+ h3: HTMLAttributes;
439
+ h4: HTMLAttributes;
440
+ h5: HTMLAttributes;
441
+ h6: HTMLAttributes;
442
+ head: HTMLAttributes;
443
+ header: HTMLAttributes;
444
+ hgroup: HTMLAttributes;
445
+ hr: HTMLAttributes;
446
+ html: HtmlHTMLAttributes;
447
+ i: HTMLAttributes;
448
+ iframe: IframeHTMLAttributes;
449
+ img: ImgHTMLAttributes;
450
+ input: InputHTMLAttributes;
451
+ ins: InsHTMLAttributes;
452
+ kbd: HTMLAttributes;
453
+ keygen: KeygenHTMLAttributes;
454
+ label: LabelHTMLAttributes;
455
+ legend: HTMLAttributes;
456
+ li: LiHTMLAttributes;
457
+ link: LinkHTMLAttributes;
458
+ main: HTMLAttributes;
459
+ map: MapHTMLAttributes;
460
+ mark: HTMLAttributes;
461
+ menu: MenuHTMLAttributes;
462
+ menuitem: HTMLAttributes;
463
+ meta: MetaHTMLAttributes;
464
+ meter: MeterHTMLAttributes;
465
+ nav: HTMLAttributes;
466
+ noscript: HTMLAttributes;
467
+ object: ObjectHTMLAttributes;
468
+ ol: OlHTMLAttributes;
469
+ optgroup: OptgroupHTMLAttributes;
470
+ option: OptionHTMLAttributes;
471
+ output: OutputHTMLAttributes;
472
+ p: HTMLAttributes;
473
+ param: ParamHTMLAttributes;
474
+ picture: HTMLAttributes;
475
+ pre: HTMLAttributes;
476
+ progress: ProgressHTMLAttributes;
477
+ q: QuoteHTMLAttributes;
478
+ rp: HTMLAttributes;
479
+ rt: HTMLAttributes;
480
+ ruby: HTMLAttributes;
481
+ s: HTMLAttributes;
482
+ samp: HTMLAttributes;
483
+ search: HTMLAttributes;
484
+ slot: SlotHTMLAttributes;
485
+ script: ScriptHTMLAttributes;
486
+ section: HTMLAttributes;
487
+ select: SelectHTMLAttributes;
488
+ small: HTMLAttributes;
489
+ source: SourceHTMLAttributes;
490
+ span: HTMLAttributes;
491
+ strong: HTMLAttributes;
492
+ style: StyleHTMLAttributes;
493
+ sub: HTMLAttributes;
494
+ summary: HTMLAttributes;
495
+ sup: HTMLAttributes;
496
+ table: TableHTMLAttributes;
497
+ template: HTMLAttributes;
498
+ tbody: HTMLAttributes;
499
+ td: TdHTMLAttributes;
500
+ textarea: TextareaHTMLAttributes;
501
+ tfoot: HTMLAttributes;
502
+ th: ThHTMLAttributes;
503
+ thead: HTMLAttributes;
504
+ time: TimeHTMLAttributes;
505
+ title: HTMLAttributes;
506
+ tr: HTMLAttributes;
507
+ track: TrackHTMLAttributes;
508
+ u: HTMLAttributes;
509
+ ul: HTMLAttributes;
510
+ var: HTMLAttributes;
511
+ video: VideoHTMLAttributes;
512
+ wbr: HTMLAttributes;
513
+ }
514
+ }
515
+ }
516
+ export interface IntrinsicElements extends Hono.IntrinsicElements {
517
+ }
@@ -3,6 +3,9 @@ import type { FC } from '../../jsx';
3
3
  import type { Env, Input, MiddlewareHandler } from '../../types';
4
4
  export declare const RequestContext: import("../../jsx").Context<Context<any, any, {}> | null>;
5
5
  declare type PropsForRenderer = [...Required<Parameters<Renderer>>] extends [unknown, infer Props] ? Props : unknown;
6
- export declare const jsxRenderer: (component?: FC<PropsForRenderer>) => MiddlewareHandler;
6
+ declare type RendererOptions = {
7
+ docType?: boolean | string;
8
+ };
9
+ export declare const jsxRenderer: (component?: FC<PropsForRenderer>, options?: RendererOptions) => MiddlewareHandler;
7
10
  export declare const useRequestContext: <E extends Env = any, P extends string = any, I extends Input = {}>() => Context<E, P, I>;
8
11
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hono",
3
- "version": "3.8.4",
3
+ "version": "3.9.0",
4
4
  "description": "Ultrafast web framework for the Edges",
5
5
  "main": "dist/cjs/index.js",
6
6
  "type": "module",