hono 4.2.9 → 4.3.1
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 +0 -13
- package/dist/adapter/deno/serve-static.js +1 -1
- package/dist/cjs/adapter/deno/serve-static.js +1 -1
- package/dist/cjs/client/client.js +2 -1
- package/dist/cjs/helper/cookie/index.js +2 -0
- package/dist/cjs/helper/factory/index.js +13 -1
- package/dist/cjs/jsx/base.js +26 -14
- package/dist/cjs/jsx/children.js +45 -0
- package/dist/cjs/jsx/constants.js +3 -0
- package/dist/cjs/jsx/dom/context.js +22 -11
- package/dist/cjs/jsx/dom/css.js +6 -4
- package/dist/cjs/jsx/dom/index.js +35 -4
- package/dist/cjs/jsx/dom/jsx-dev-runtime.js +20 -13
- package/dist/cjs/jsx/dom/render.js +110 -48
- package/dist/cjs/jsx/dom/utils.js +33 -0
- package/dist/cjs/jsx/hooks/index.js +41 -1
- package/dist/cjs/jsx/index.js +17 -1
- package/dist/cjs/jsx/jsx-dev-runtime.js +0 -1
- package/dist/cjs/jsx/utils.js +12 -2
- package/dist/cjs/middleware/bearer-auth/index.js +2 -1
- package/dist/cjs/middleware/secure-headers/index.js +58 -8
- package/dist/cjs/middleware/serve-static/index.js +5 -2
- package/dist/cjs/middleware/timing/index.js +3 -2
- package/dist/cjs/utils/mime.js +4 -2
- package/dist/client/client.js +2 -1
- package/dist/helper/cookie/index.js +2 -0
- package/dist/helper/factory/index.js +13 -1
- package/dist/jsx/base.js +27 -15
- package/dist/jsx/children.js +21 -0
- package/dist/jsx/constants.js +2 -0
- package/dist/jsx/dom/context.js +22 -11
- package/dist/jsx/dom/css.js +6 -4
- package/dist/jsx/dom/index.js +31 -5
- package/dist/jsx/dom/jsx-dev-runtime.js +20 -13
- package/dist/jsx/dom/render.js +109 -49
- package/dist/jsx/dom/utils.js +10 -0
- package/dist/jsx/hooks/index.js +37 -1
- package/dist/jsx/index.js +17 -2
- package/dist/jsx/jsx-dev-runtime.js +0 -1
- package/dist/jsx/utils.js +10 -1
- package/dist/middleware/bearer-auth/index.js +2 -1
- package/dist/middleware/secure-headers/index.js +57 -8
- package/dist/middleware/serve-static/index.js +5 -2
- package/dist/middleware/timing/index.js +3 -2
- package/dist/types/adapter/cloudflare-workers/serve-static.d.ts +6 -0
- package/dist/types/client/types.d.ts +44 -20
- package/dist/types/context.d.ts +6 -6
- package/dist/types/helper/cookie/index.d.ts +1 -1
- package/dist/types/helper/factory/index.d.ts +15 -1
- package/dist/types/helper/websocket/index.d.ts +1 -4
- package/dist/types/jsx/base.d.ts +10 -3
- package/dist/types/jsx/children.d.ts +9 -0
- package/dist/types/jsx/constants.d.ts +1 -0
- package/dist/types/jsx/dom/context.d.ts +1 -10
- package/dist/types/jsx/dom/index.d.ts +31 -11
- package/dist/types/jsx/dom/jsx-dev-runtime.d.ts +3 -13
- package/dist/types/jsx/dom/render.d.ts +6 -4
- package/dist/types/jsx/dom/utils.d.ts +1 -0
- package/dist/types/jsx/hooks/index.d.ts +6 -0
- package/dist/types/jsx/index.d.ts +18 -3
- package/dist/types/jsx/types.d.ts +24 -1
- package/dist/types/jsx/utils.d.ts +1 -0
- package/dist/types/middleware/bearer-auth/index.d.ts +2 -0
- package/dist/types/middleware/secure-headers/index.d.ts +30 -21
- package/dist/types/middleware/serve-static/index.d.ts +2 -2
- package/dist/types/middleware/timing/index.d.ts +1 -1
- package/dist/types/request.d.ts +3 -2
- package/dist/types/types.d.ts +88 -63
- package/dist/types/utils/mime.d.ts +2 -0
- package/dist/types/utils/types.d.ts +3 -0
- package/dist/utils/mime.js +2 -1
- package/package.json +9 -1
package/README.md
CHANGED
|
@@ -53,19 +53,6 @@ npm create hono@latest
|
|
|
53
53
|
- **Batteries Included** 🔋 - Hono has built-in middleware, custom middleware, and third-party middleware. Batteries included.
|
|
54
54
|
- **Delightful DX** 😃 - Super clean APIs. First-class TypeScript support. Now, we've got "Types".
|
|
55
55
|
|
|
56
|
-
## Benchmarks
|
|
57
|
-
|
|
58
|
-
**Hono is the fastest**, compared to other routers for Cloudflare Workers.
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
Hono x 510,171 ops/sec ±4.61% (82 runs sampled)
|
|
62
|
-
itty-router x 285,810 ops/sec ±4.13% (85 runs sampled)
|
|
63
|
-
sunder x 345,272 ops/sec ±4.46% (87 runs sampled)
|
|
64
|
-
worktop x 203,468 ops/sec ±3.03% (91 runs sampled)
|
|
65
|
-
Fastest is Hono
|
|
66
|
-
✨ Done in 28.68s.
|
|
67
|
-
```
|
|
68
|
-
|
|
69
56
|
## Documentation
|
|
70
57
|
|
|
71
58
|
The documentation is available on [hono.dev](https://hono.dev).
|
|
@@ -105,7 +105,9 @@ const setSignedCookie = async (c, name, value, secret, opt) => {
|
|
|
105
105
|
c.header("set-cookie", cookie, { append: true });
|
|
106
106
|
};
|
|
107
107
|
const deleteCookie = (c, name, opt) => {
|
|
108
|
+
const deletedCookie = getCookie(c, name);
|
|
108
109
|
setCookie(c, name, "", { ...opt, maxAge: 0 });
|
|
110
|
+
return deletedCookie;
|
|
109
111
|
};
|
|
110
112
|
// Annotate the CommonJS export names for ESM import in node:
|
|
111
113
|
0 && (module.exports = {
|
|
@@ -23,13 +23,25 @@ __export(factory_exports, {
|
|
|
23
23
|
createMiddleware: () => createMiddleware
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(factory_exports);
|
|
26
|
+
var import_hono = require("../../hono");
|
|
26
27
|
class Factory {
|
|
28
|
+
initApp;
|
|
29
|
+
constructor(init) {
|
|
30
|
+
this.initApp = init?.initApp;
|
|
31
|
+
}
|
|
32
|
+
createApp = () => {
|
|
33
|
+
const app = new import_hono.Hono();
|
|
34
|
+
if (this.initApp) {
|
|
35
|
+
this.initApp(app);
|
|
36
|
+
}
|
|
37
|
+
return app;
|
|
38
|
+
};
|
|
27
39
|
createMiddleware = (middleware) => middleware;
|
|
28
40
|
createHandlers(...handlers) {
|
|
29
41
|
return handlers.filter((handler) => handler !== void 0);
|
|
30
42
|
}
|
|
31
43
|
}
|
|
32
|
-
const createFactory = () => new Factory();
|
|
44
|
+
const createFactory = (init) => new Factory(init);
|
|
33
45
|
const createMiddleware = (middleware) => createFactory().createMiddleware(middleware);
|
|
34
46
|
// Annotate the CommonJS export names for ESM import in node:
|
|
35
47
|
0 && (module.exports = {
|
package/dist/cjs/jsx/base.js
CHANGED
|
@@ -107,6 +107,12 @@ class JSXNode {
|
|
|
107
107
|
this.props = props;
|
|
108
108
|
this.children = children;
|
|
109
109
|
}
|
|
110
|
+
get type() {
|
|
111
|
+
return this.tag;
|
|
112
|
+
}
|
|
113
|
+
get ref() {
|
|
114
|
+
return this.props.ref || null;
|
|
115
|
+
}
|
|
110
116
|
toString() {
|
|
111
117
|
const buffer = [""];
|
|
112
118
|
this.localContexts?.forEach(([context, value]) => {
|
|
@@ -130,13 +136,16 @@ class JSXNode {
|
|
|
130
136
|
for (let i = 0, len = propsKeys.length; i < len; i++) {
|
|
131
137
|
const key = propsKeys[i];
|
|
132
138
|
const v = props[key];
|
|
133
|
-
if (key === "
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
139
|
+
if (key === "children") {
|
|
140
|
+
} else if (key === "style" && typeof v === "object") {
|
|
141
|
+
let styleStr = "";
|
|
142
|
+
(0, import_utils.styleObjectForEach)(v, (property, value) => {
|
|
143
|
+
if (value != null) {
|
|
144
|
+
styleStr += `${styleStr ? ";" : ""}${property}:${value}`;
|
|
145
|
+
}
|
|
146
|
+
});
|
|
138
147
|
buffer[0] += ' style="';
|
|
139
|
-
(0, import_html2.escapeToBuffer)(
|
|
148
|
+
(0, import_html2.escapeToBuffer)(styleStr, buffer);
|
|
140
149
|
buffer[0] += '"';
|
|
141
150
|
} else if (typeof v === "string") {
|
|
142
151
|
buffer[0] += ` ${key}="`;
|
|
@@ -213,11 +222,12 @@ class JSXFragmentNode extends JSXNode {
|
|
|
213
222
|
}
|
|
214
223
|
}
|
|
215
224
|
const jsx = (tag, props, ...children) => {
|
|
216
|
-
|
|
217
|
-
if (
|
|
218
|
-
|
|
219
|
-
delete props["key"];
|
|
225
|
+
props ??= {};
|
|
226
|
+
if (children.length) {
|
|
227
|
+
props.children = children.length === 1 ? children[0] : children;
|
|
220
228
|
}
|
|
229
|
+
const key = props.key;
|
|
230
|
+
delete props["key"];
|
|
221
231
|
const node = jsxFn(tag, props, children);
|
|
222
232
|
node.key = key;
|
|
223
233
|
return node;
|
|
@@ -264,18 +274,20 @@ const Fragment = ({
|
|
|
264
274
|
}) => {
|
|
265
275
|
return new JSXFragmentNode(
|
|
266
276
|
"",
|
|
267
|
-
{
|
|
277
|
+
{
|
|
278
|
+
children
|
|
279
|
+
},
|
|
268
280
|
Array.isArray(children) ? children : children ? [children] : []
|
|
269
281
|
);
|
|
270
282
|
};
|
|
271
283
|
const isValidElement = (element) => {
|
|
272
|
-
return !!(element && typeof element === "object" && "tag" in element && "props" in element
|
|
284
|
+
return !!(element && typeof element === "object" && "tag" in element && "props" in element);
|
|
273
285
|
};
|
|
274
286
|
const cloneElement = (element, props, ...children) => {
|
|
275
|
-
return
|
|
287
|
+
return jsx(
|
|
276
288
|
element.tag,
|
|
277
289
|
{ ...element.props, ...props },
|
|
278
|
-
children
|
|
290
|
+
...children
|
|
279
291
|
);
|
|
280
292
|
};
|
|
281
293
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -0,0 +1,45 @@
|
|
|
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 __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var children_exports = {};
|
|
20
|
+
__export(children_exports, {
|
|
21
|
+
Children: () => Children,
|
|
22
|
+
toArray: () => toArray
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(children_exports);
|
|
25
|
+
const toArray = (children) => Array.isArray(children) ? children : [children];
|
|
26
|
+
const Children = {
|
|
27
|
+
map: (children, fn) => toArray(children).map(fn),
|
|
28
|
+
forEach: (children, fn) => {
|
|
29
|
+
toArray(children).forEach(fn);
|
|
30
|
+
},
|
|
31
|
+
count: (children) => toArray(children).length,
|
|
32
|
+
only: (_children) => {
|
|
33
|
+
const children = toArray(_children);
|
|
34
|
+
if (children.length !== 1) {
|
|
35
|
+
throw new Error("Children.only() expects only one child");
|
|
36
|
+
}
|
|
37
|
+
return children[0];
|
|
38
|
+
},
|
|
39
|
+
toArray
|
|
40
|
+
};
|
|
41
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
+
0 && (module.exports = {
|
|
43
|
+
Children,
|
|
44
|
+
toArray
|
|
45
|
+
});
|
|
@@ -19,6 +19,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var constants_exports = {};
|
|
20
20
|
__export(constants_exports, {
|
|
21
21
|
DOM_ERROR_HANDLER: () => DOM_ERROR_HANDLER,
|
|
22
|
+
DOM_INTERNAL_TAG: () => DOM_INTERNAL_TAG,
|
|
22
23
|
DOM_RENDERER: () => DOM_RENDERER,
|
|
23
24
|
DOM_STASH: () => DOM_STASH
|
|
24
25
|
});
|
|
@@ -26,9 +27,11 @@ module.exports = __toCommonJS(constants_exports);
|
|
|
26
27
|
const DOM_RENDERER = Symbol("RENDERER");
|
|
27
28
|
const DOM_ERROR_HANDLER = Symbol("ERROR_HANDLER");
|
|
28
29
|
const DOM_STASH = Symbol("STASH");
|
|
30
|
+
const DOM_INTERNAL_TAG = Symbol("INTERNAL");
|
|
29
31
|
// Annotate the CommonJS export names for ESM import in node:
|
|
30
32
|
0 && (module.exports = {
|
|
31
33
|
DOM_ERROR_HANDLER,
|
|
34
|
+
DOM_INTERNAL_TAG,
|
|
32
35
|
DOM_RENDERER,
|
|
33
36
|
DOM_STASH
|
|
34
37
|
});
|
|
@@ -25,28 +25,39 @@ module.exports = __toCommonJS(context_exports);
|
|
|
25
25
|
var import_constants = require("../constants");
|
|
26
26
|
var import_context = require("../context");
|
|
27
27
|
var import_jsx_runtime = require("./jsx-runtime");
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
var import_utils = require("./utils");
|
|
29
|
+
const createContextProviderFunction = (values) => (0, import_utils.setInternalTagFlag)(({ value, children }) => {
|
|
30
|
+
if (!children) {
|
|
31
|
+
return void 0;
|
|
32
|
+
}
|
|
33
|
+
const props = {
|
|
30
34
|
children: [
|
|
31
35
|
{
|
|
32
|
-
tag: () => {
|
|
36
|
+
tag: (0, import_utils.setInternalTagFlag)(() => {
|
|
33
37
|
values.push(value);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
...children,
|
|
37
|
-
{
|
|
38
|
-
tag: () => {
|
|
39
|
-
values.pop();
|
|
40
|
-
}
|
|
38
|
+
}),
|
|
39
|
+
props: {}
|
|
41
40
|
}
|
|
42
41
|
]
|
|
42
|
+
};
|
|
43
|
+
if (Array.isArray(children)) {
|
|
44
|
+
props.children.push(...children.flat());
|
|
45
|
+
} else {
|
|
46
|
+
props.children.push(children);
|
|
47
|
+
}
|
|
48
|
+
props.children.push({
|
|
49
|
+
tag: (0, import_utils.setInternalTagFlag)(() => {
|
|
50
|
+
values.pop();
|
|
51
|
+
}),
|
|
52
|
+
props: {}
|
|
43
53
|
});
|
|
54
|
+
const res = (0, import_jsx_runtime.Fragment)(props);
|
|
44
55
|
res[import_constants.DOM_ERROR_HANDLER] = (err) => {
|
|
45
56
|
values.pop();
|
|
46
57
|
throw err;
|
|
47
58
|
};
|
|
48
59
|
return res;
|
|
49
|
-
};
|
|
60
|
+
});
|
|
50
61
|
const createContext = (defaultValue) => {
|
|
51
62
|
const values = [defaultValue];
|
|
52
63
|
const context = {
|
package/dist/cjs/jsx/dom/css.js
CHANGED
|
@@ -107,10 +107,12 @@ const createCssJsxDomObjects = ({ id }) => {
|
|
|
107
107
|
};
|
|
108
108
|
const Style2 = ({ children }) => ({
|
|
109
109
|
tag: "style",
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
props: {
|
|
111
|
+
id,
|
|
112
|
+
children: children && (Array.isArray(children) ? children : [children]).map(
|
|
113
|
+
(c) => c[import_common.STYLE_STRING]
|
|
114
|
+
)
|
|
115
|
+
}
|
|
114
116
|
});
|
|
115
117
|
return [cssObject, Style2];
|
|
116
118
|
};
|
|
@@ -15,19 +15,26 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
}
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
20
|
var dom_exports = {};
|
|
20
21
|
__export(dom_exports, {
|
|
22
|
+
Children: () => import_children.Children,
|
|
21
23
|
ErrorBoundary: () => import_components.ErrorBoundary,
|
|
24
|
+
Fragment: () => import_jsx_runtime.Fragment,
|
|
22
25
|
Suspense: () => import_components.Suspense,
|
|
23
26
|
cloneElement: () => cloneElement,
|
|
24
27
|
createContext: () => import_context2.createContext,
|
|
25
28
|
createElement: () => createElement,
|
|
29
|
+
createPortal: () => import_render.createPortal,
|
|
30
|
+
createRef: () => import_hooks.createRef,
|
|
26
31
|
default: () => dom_default,
|
|
32
|
+
flushSync: () => import_render.flushSync,
|
|
33
|
+
forwardRef: () => import_hooks.forwardRef,
|
|
27
34
|
isValidElement: () => import_base.isValidElement,
|
|
28
35
|
jsx: () => createElement,
|
|
29
36
|
memo: () => import_base.memo,
|
|
30
|
-
render: () =>
|
|
37
|
+
render: () => import_render2.render,
|
|
31
38
|
startTransition: () => import_hooks.startTransition,
|
|
32
39
|
startViewTransition: () => import_hooks.startViewTransition,
|
|
33
40
|
use: () => import_hooks.use,
|
|
@@ -37,24 +44,32 @@ __export(dom_exports, {
|
|
|
37
44
|
useDeferredValue: () => import_hooks.useDeferredValue,
|
|
38
45
|
useEffect: () => import_hooks.useEffect,
|
|
39
46
|
useId: () => import_hooks.useId,
|
|
47
|
+
useImperativeHandle: () => import_hooks.useImperativeHandle,
|
|
40
48
|
useLayoutEffect: () => import_hooks.useLayoutEffect,
|
|
41
49
|
useMemo: () => import_hooks.useMemo,
|
|
42
50
|
useReducer: () => import_hooks.useReducer,
|
|
43
51
|
useRef: () => import_hooks.useRef,
|
|
44
52
|
useState: () => import_hooks.useState,
|
|
53
|
+
useSyncExternalStore: () => import_hooks.useSyncExternalStore,
|
|
45
54
|
useTransition: () => import_hooks.useTransition,
|
|
46
55
|
useViewTransition: () => import_hooks.useViewTransition
|
|
47
56
|
});
|
|
48
57
|
module.exports = __toCommonJS(dom_exports);
|
|
49
58
|
var import_base = require("../base");
|
|
59
|
+
var import_children = require("../children");
|
|
50
60
|
var import_context = require("../context");
|
|
51
61
|
var import_hooks = require("../hooks");
|
|
52
62
|
var import_components = require("./components");
|
|
53
63
|
var import_context2 = require("./context");
|
|
54
64
|
var import_jsx_runtime = require("./jsx-runtime");
|
|
55
65
|
var import_render = require("./render");
|
|
66
|
+
var import_render2 = require("./render");
|
|
67
|
+
__reExport(dom_exports, require("../types"), module.exports);
|
|
56
68
|
const createElement = (tag, props, ...children) => {
|
|
57
|
-
const jsxProps = { ...props
|
|
69
|
+
const jsxProps = props ? { ...props } : {};
|
|
70
|
+
if (children.length) {
|
|
71
|
+
jsxProps.children = children.length === 1 ? children[0] : children;
|
|
72
|
+
}
|
|
58
73
|
let key = void 0;
|
|
59
74
|
if ("key" in jsxProps) {
|
|
60
75
|
key = jsxProps.key;
|
|
@@ -68,7 +83,7 @@ const cloneElement = (element, props, ...children) => {
|
|
|
68
83
|
{
|
|
69
84
|
...element.props,
|
|
70
85
|
...props,
|
|
71
|
-
children: children.length ? children : element.children
|
|
86
|
+
children: children.length ? children : element.props.children
|
|
72
87
|
},
|
|
73
88
|
element.key
|
|
74
89
|
);
|
|
@@ -89,6 +104,10 @@ var dom_default = {
|
|
|
89
104
|
useReducer: import_hooks.useReducer,
|
|
90
105
|
useId: import_hooks.useId,
|
|
91
106
|
useDebugValue: import_hooks.useDebugValue,
|
|
107
|
+
createRef: import_hooks.createRef,
|
|
108
|
+
forwardRef: import_hooks.forwardRef,
|
|
109
|
+
useImperativeHandle: import_hooks.useImperativeHandle,
|
|
110
|
+
useSyncExternalStore: import_hooks.useSyncExternalStore,
|
|
92
111
|
Suspense: import_components.Suspense,
|
|
93
112
|
ErrorBoundary: import_components.ErrorBoundary,
|
|
94
113
|
createContext: import_context2.createContext,
|
|
@@ -96,15 +115,25 @@ var dom_default = {
|
|
|
96
115
|
memo: import_base.memo,
|
|
97
116
|
isValidElement: import_base.isValidElement,
|
|
98
117
|
createElement,
|
|
99
|
-
cloneElement
|
|
118
|
+
cloneElement,
|
|
119
|
+
Children: import_children.Children,
|
|
120
|
+
Fragment: import_jsx_runtime.Fragment,
|
|
121
|
+
flushSync: import_render.flushSync,
|
|
122
|
+
createPortal: import_render.createPortal
|
|
100
123
|
};
|
|
101
124
|
// Annotate the CommonJS export names for ESM import in node:
|
|
102
125
|
0 && (module.exports = {
|
|
126
|
+
Children,
|
|
103
127
|
ErrorBoundary,
|
|
128
|
+
Fragment,
|
|
104
129
|
Suspense,
|
|
105
130
|
cloneElement,
|
|
106
131
|
createContext,
|
|
107
132
|
createElement,
|
|
133
|
+
createPortal,
|
|
134
|
+
createRef,
|
|
135
|
+
flushSync,
|
|
136
|
+
forwardRef,
|
|
108
137
|
isValidElement,
|
|
109
138
|
jsx,
|
|
110
139
|
memo,
|
|
@@ -118,11 +147,13 @@ var dom_default = {
|
|
|
118
147
|
useDeferredValue,
|
|
119
148
|
useEffect,
|
|
120
149
|
useId,
|
|
150
|
+
useImperativeHandle,
|
|
121
151
|
useLayoutEffect,
|
|
122
152
|
useMemo,
|
|
123
153
|
useReducer,
|
|
124
154
|
useRef,
|
|
125
155
|
useState,
|
|
156
|
+
useSyncExternalStore,
|
|
126
157
|
useTransition,
|
|
127
158
|
useViewTransition
|
|
128
159
|
});
|
|
@@ -23,23 +23,30 @@ __export(jsx_dev_runtime_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(jsx_dev_runtime_exports);
|
|
25
25
|
var import_utils = require("../utils");
|
|
26
|
+
const JSXNodeCompatPrototype = {
|
|
27
|
+
type: {
|
|
28
|
+
get() {
|
|
29
|
+
return this.tag;
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
ref: {
|
|
33
|
+
get() {
|
|
34
|
+
return this.props?.ref;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
26
38
|
const jsxDEV = (tag, props, key) => {
|
|
27
39
|
if (typeof tag === "string") {
|
|
28
40
|
(0, import_utils.normalizeIntrinsicElementProps)(props);
|
|
29
41
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
tag,
|
|
39
|
-
props,
|
|
40
|
-
key,
|
|
41
|
-
children: Array.isArray(children) ? children : [children]
|
|
42
|
-
};
|
|
42
|
+
return Object.defineProperties(
|
|
43
|
+
{
|
|
44
|
+
tag,
|
|
45
|
+
props,
|
|
46
|
+
key
|
|
47
|
+
},
|
|
48
|
+
JSXNodeCompatPrototype
|
|
49
|
+
);
|
|
43
50
|
};
|
|
44
51
|
const Fragment = (props) => jsxDEV("", props, void 0);
|
|
45
52
|
// Annotate the CommonJS export names for ESM import in node:
|