@kubb/react-fabric 0.13.3 → 0.14.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.
Files changed (52) hide show
  1. package/README.md +2 -2
  2. package/dist/{chunk-DbZtQ4qb.js → chunk-BGCRLu6H.js} +12 -21
  3. package/dist/globals.d.ts +2 -2
  4. package/dist/globals.js +1 -1
  5. package/dist/index.cjs +79 -89
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.ts +27 -28
  8. package/dist/index.js +27 -35
  9. package/dist/index.js.map +1 -1
  10. package/dist/jsx-dev-runtime.cjs +6 -245
  11. package/dist/jsx-dev-runtime.cjs.map +1 -1
  12. package/dist/jsx-dev-runtime.d.ts +5 -5
  13. package/dist/jsx-dev-runtime.js +6 -245
  14. package/dist/jsx-dev-runtime.js.map +1 -1
  15. package/dist/{jsx-namespace-Bg7Kfg54.d.ts → jsx-namespace-C9N4PA8a.d.ts} +3 -3
  16. package/dist/{react-B4mAwc8c.cjs → jsx-runtime-Bl0DfUmV.js} +262 -61
  17. package/dist/jsx-runtime-Bl0DfUmV.js.map +1 -0
  18. package/dist/{react-C2cYsofv.js → jsx-runtime-Cua1md-Z.cjs} +317 -7
  19. package/dist/jsx-runtime-Cua1md-Z.cjs.map +1 -0
  20. package/dist/jsx-runtime.cjs +4 -6
  21. package/dist/jsx-runtime.cjs.map +1 -1
  22. package/dist/jsx-runtime.d.ts +3 -3
  23. package/dist/jsx-runtime.js +3 -5
  24. package/dist/jsx-runtime.js.map +1 -1
  25. package/dist/parsers.cjs +7 -7
  26. package/dist/parsers.js +2 -3
  27. package/dist/plugins.cjs +10 -10
  28. package/dist/plugins.d.ts +1 -1
  29. package/dist/plugins.js +4 -7
  30. package/dist/{reactPlugin-OUKiWH1q.d.ts → reactPlugin-CKiGUCKQ.d.ts} +11 -11
  31. package/dist/{reactPlugin-BshFnF2Y.cjs → reactPlugin-D74A1eG4.cjs} +50 -65
  32. package/dist/{reactPlugin-BshFnF2Y.cjs.map → reactPlugin-D74A1eG4.cjs.map} +1 -1
  33. package/dist/{reactPlugin-DGKBWjiR.js → reactPlugin-QQPrjNuQ.js} +13 -28
  34. package/dist/{reactPlugin-DGKBWjiR.js.map → reactPlugin-QQPrjNuQ.js.map} +1 -1
  35. package/dist/types-BJVZ7ita.d.ts +104 -0
  36. package/dist/types.cjs +7 -7
  37. package/dist/types.d.ts +2 -62
  38. package/dist/types.js +2 -3
  39. package/package.json +7 -2
  40. package/src/components/{App.tsx → Fabric.tsx} +6 -6
  41. package/src/composables/useFabric.ts +1 -0
  42. package/src/index.ts +2 -3
  43. package/src/jsx-dev-runtime.ts +2 -2
  44. package/src/plugins/reactPlugin.ts +8 -8
  45. package/dist/getFunctionParams-CINBJQGH.d.ts +0 -49
  46. package/dist/jsx-runtime-CZxrhUx8.js +0 -266
  47. package/dist/jsx-runtime-CZxrhUx8.js.map +0 -1
  48. package/dist/jsx-runtime-C_GM3QQI.cjs +0 -270
  49. package/dist/jsx-runtime-C_GM3QQI.cjs.map +0 -1
  50. package/dist/react-B4mAwc8c.cjs.map +0 -1
  51. package/dist/react-C2cYsofv.js.map +0 -1
  52. package/src/composables/useApp.ts +0 -1
@@ -0,0 +1,104 @@
1
+ import { i as __reExport, n as __exportAll, r as __name } from "./chunk-BGCRLu6H.js";
2
+ import { KubbFile } from "@kubb/fabric-core/types";
3
+ import React, { JSX, ReactNode } from "react";
4
+
5
+ //#region src/utils/getFunctionParams.d.ts
6
+ type Param = {
7
+ /**
8
+ * `object` will return the pathParams as an object.
9
+ *
10
+ * `inline` will return the pathParams as comma separated params.
11
+ * @default `'inline'`
12
+ * @private
13
+ */
14
+ mode?: 'object' | 'inline' | 'inlineSpread';
15
+ type?: 'string' | 'number' | (string & {});
16
+ optional?: boolean;
17
+ /**
18
+ * @example test = "default"
19
+ */
20
+ default?: string;
21
+ /**
22
+ * Used for no TypeScript(with mode object)
23
+ * @example test: "default"
24
+ */
25
+ value?: string;
26
+ children?: Params;
27
+ };
28
+ type Params = Record<string, Param | undefined>;
29
+ type Options = {
30
+ type: 'constructor' | 'call' | 'object' | 'objectValue';
31
+ transformName?: (name: string) => string;
32
+ transformType?: (type: string) => string;
33
+ };
34
+ declare function createFunctionParams(params: Params): Params;
35
+ declare class FunctionParams {
36
+ #private;
37
+ static factory(params: Params): FunctionParams;
38
+ constructor(params: Params);
39
+ get params(): Params;
40
+ get flatParams(): Params;
41
+ toCall({
42
+ transformName,
43
+ transformType
44
+ }?: Pick<Options, 'transformName' | 'transformType'>): string;
45
+ toObject(): string;
46
+ toObjectValue(): string;
47
+ toConstructor(): string;
48
+ }
49
+ declare namespace types_d_exports {
50
+ export { DOMElement, DOMNode, DOMNodeAttribute, ElementNames, FabricExportProps, FabricFileProps, FabricImportProps, FabricReactElement, FabricReactNode, FabricSourceProps, FabricTextProps, Key, LineBreakProps, Param, Params, TextNode };
51
+ }
52
+ import * as import__kubb_fabric_core_types from "@kubb/fabric-core/types";
53
+ type Key = string | number | bigint;
54
+ type ElementNames = 'br' | 'div' | 'indent' | 'dedent' | 'kubb-text' | 'kubb-file' | 'kubb-source' | 'kubb-import' | 'kubb-export' | 'kubb-root' | 'kubb-app';
55
+ type Node = {
56
+ parentNode: DOMElement | undefined;
57
+ internal_static?: boolean;
58
+ };
59
+ type DOMNodeAttribute = boolean | string | number;
60
+ type TextName = '#text';
61
+ type TextNode = {
62
+ nodeName: TextName;
63
+ nodeValue: string;
64
+ } & Node;
65
+ type DOMNode<T = {
66
+ nodeName: NodeNames;
67
+ }> = T extends {
68
+ nodeName: infer U;
69
+ } ? U extends '#text' ? TextNode : DOMElement : never;
70
+ type OutputTransformer = (s: string, index: number) => string;
71
+ type DOMElement = {
72
+ nodeName: ElementNames;
73
+ attributes: Map<string, DOMNodeAttribute>;
74
+ childNodes: DOMNode[];
75
+ internal_transform?: OutputTransformer;
76
+ isStaticDirty?: boolean;
77
+ staticNode?: DOMElement;
78
+ onComputeLayout?: () => void;
79
+ onRender?: () => void;
80
+ onImmediateRender?: () => void;
81
+ } & Node;
82
+ type NodeNames = ElementNames | TextName;
83
+ type FabricReactNode = ReactNode;
84
+ type FabricReactElement = JSX.Element;
85
+ type FabricTextProps = {
86
+ children?: FabricReactNode;
87
+ };
88
+ type FabricFileProps = {
89
+ id?: string;
90
+ children?: FabricReactNode;
91
+ baseName: string;
92
+ path: string;
93
+ override?: boolean;
94
+ meta?: KubbFile.File['meta'];
95
+ };
96
+ type FabricSourceProps = KubbFile.Source & {
97
+ children?: FabricReactNode;
98
+ };
99
+ type FabricImportProps = KubbFile.Import;
100
+ type FabricExportProps = KubbFile.Export;
101
+ type LineBreakProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLBRElement>, HTMLBRElement>;
102
+ //#endregion
103
+ export { Param as _, FabricExportProps as a, FabricReactElement as c, FabricTextProps as d, Key as f, FunctionParams as g, types_d_exports as h, ElementNames as i, FabricReactNode as l, TextNode as m, DOMNode as n, FabricFileProps as o, LineBreakProps as p, DOMNodeAttribute as r, FabricImportProps as s, DOMElement as t, FabricSourceProps as u, Params as v, createFunctionParams as y };
104
+ //# sourceMappingURL=types-BJVZ7ita.d.ts.map
package/dist/types.cjs CHANGED
@@ -1,9 +1,9 @@
1
-
2
-
3
1
  var _kubb_fabric_core_types = require("@kubb/fabric-core/types");
4
- Object.keys(_kubb_fabric_core_types).forEach(function (k) {
5
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
6
- enumerable: true,
7
- get: function () { return _kubb_fabric_core_types[k]; }
8
- });
2
+ Object.keys(_kubb_fabric_core_types).forEach(function(k) {
3
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
4
+ enumerable: true,
5
+ get: function() {
6
+ return _kubb_fabric_core_types[k];
7
+ }
8
+ });
9
9
  });
package/dist/types.d.ts CHANGED
@@ -1,63 +1,3 @@
1
- import { i as __reExport, n as __exportAll, r as __name } from "./chunk-DbZtQ4qb.js";
2
- import { n as Param, r as Params } from "./getFunctionParams-CINBJQGH.js";
3
- import { KubbFile } from "@kubb/fabric-core/types";
4
- import React, { JSX, ReactNode } from "react";
1
+ import { _ as Param, a as FabricExportProps, c as FabricReactElement, d as FabricTextProps, f as Key, i as ElementNames, l as FabricReactNode, m as TextNode, n as DOMNode, o as FabricFileProps, p as LineBreakProps, r as DOMNodeAttribute, s as FabricImportProps, t as DOMElement, u as FabricSourceProps, v as Params } from "./types-BJVZ7ita.js";
5
2
  export * from "@kubb/fabric-core/types";
6
-
7
- //#region src/types.d.ts
8
- declare namespace types_d_exports {
9
- export { DOMElement, DOMNode, DOMNodeAttribute, ElementNames, FabricExportProps, FabricFileProps, FabricImportProps, FabricReactElement, FabricReactNode, FabricSourceProps, FabricTextProps, Key, LineBreakProps, Param, Params, TextNode };
10
- }
11
- import * as import__kubb_fabric_core_types from "@kubb/fabric-core/types";
12
- type Key = string | number | bigint;
13
- type ElementNames = 'br' | 'div' | 'indent' | 'dedent' | 'kubb-text' | 'kubb-file' | 'kubb-source' | 'kubb-import' | 'kubb-export' | 'kubb-root' | 'kubb-app';
14
- type Node = {
15
- parentNode: DOMElement | undefined;
16
- internal_static?: boolean;
17
- };
18
- type DOMNodeAttribute = boolean | string | number;
19
- type TextName = '#text';
20
- type TextNode = {
21
- nodeName: TextName;
22
- nodeValue: string;
23
- } & Node;
24
- type DOMNode<T = {
25
- nodeName: NodeNames;
26
- }> = T extends {
27
- nodeName: infer U;
28
- } ? U extends '#text' ? TextNode : DOMElement : never;
29
- type OutputTransformer = (s: string, index: number) => string;
30
- type DOMElement = {
31
- nodeName: ElementNames;
32
- attributes: Map<string, DOMNodeAttribute>;
33
- childNodes: DOMNode[];
34
- internal_transform?: OutputTransformer;
35
- isStaticDirty?: boolean;
36
- staticNode?: DOMElement;
37
- onComputeLayout?: () => void;
38
- onRender?: () => void;
39
- onImmediateRender?: () => void;
40
- } & Node;
41
- type NodeNames = ElementNames | TextName;
42
- type FabricReactNode = ReactNode;
43
- type FabricReactElement = JSX.Element;
44
- type FabricTextProps = {
45
- children?: FabricReactNode;
46
- };
47
- type FabricFileProps = {
48
- id?: string;
49
- children?: FabricReactNode;
50
- baseName: string;
51
- path: string;
52
- override?: boolean;
53
- meta?: KubbFile.File['meta'];
54
- };
55
- type FabricSourceProps = KubbFile.Source & {
56
- children?: FabricReactNode;
57
- };
58
- type FabricImportProps = KubbFile.Import;
59
- type FabricExportProps = KubbFile.Export;
60
- type LineBreakProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLBRElement>, HTMLBRElement>;
61
- //#endregion
62
- export { DOMElement, DOMNode, DOMNodeAttribute, ElementNames, FabricExportProps, FabricFileProps, FabricImportProps, FabricReactElement, FabricReactNode, FabricSourceProps, FabricTextProps, Key, LineBreakProps, type Param, type Params, TextNode, types_d_exports as t };
63
- //# sourceMappingURL=types.d.ts.map
3
+ export { DOMElement, DOMNode, DOMNodeAttribute, ElementNames, FabricExportProps, FabricFileProps, FabricImportProps, FabricReactElement, FabricReactNode, FabricSourceProps, FabricTextProps, Key, LineBreakProps, Param, Params, TextNode };
package/dist/types.js CHANGED
@@ -1,3 +1,2 @@
1
- export * from "@kubb/fabric-core/types"
2
-
3
- export { };
1
+ export * from "@kubb/fabric-core/types";
2
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/react-fabric",
3
- "version": "0.13.3",
3
+ "version": "0.14.0",
4
4
  "description": "React integration for Kubb's fabric - JSX runtime and component-based code generation with React reconciler for building type-safe generators",
5
5
  "keywords": [
6
6
  "react",
@@ -106,7 +106,7 @@
106
106
  "react-devtools-core": "6.1.5",
107
107
  "remeda": "^2.33.6",
108
108
  "ws": "8.18.0",
109
- "@kubb/fabric-core": "0.13.3"
109
+ "@kubb/fabric-core": "0.14.0"
110
110
  },
111
111
  "devDependencies": {
112
112
  "@types/react": "^19.2.14",
@@ -122,6 +122,11 @@
122
122
  "access": "public",
123
123
  "registry": "https://registry.npmjs.org/"
124
124
  },
125
+ "inlinedDependencies": {
126
+ "react": "19.2.3",
127
+ "react-reconciler": "0.33.0",
128
+ "scheduler": "0.27.0"
129
+ },
125
130
  "scripts": {
126
131
  "build": "tsdown && size-limit",
127
132
  "clean": "node -e \"require('fs').rmSync('./dist', {recursive:true,force:true})\"",
@@ -1,7 +1,7 @@
1
- import { AppContext, NodeTreeContext, provide, RootContext, useContext, useNodeTree } from '@kubb/fabric-core'
1
+ import { FabricContext, NodeTreeContext, provide, RootContext, useContext, useNodeTree } from '@kubb/fabric-core'
2
2
  import type { FabricReactElement, FabricReactNode } from '../types.ts'
3
3
 
4
- export type AppProps<TMeta extends object = object> = {
4
+ export type FabricProps<TMeta extends object = object> = {
5
5
  /**
6
6
  * Metadata associated with the App.
7
7
  */
@@ -13,9 +13,9 @@ export type AppProps<TMeta extends object = object> = {
13
13
  }
14
14
 
15
15
  /**
16
- * App container containing the AppContext carrying `meta` and an `exit` hook.
16
+ * Fabric container containing the FabricContext carrying `meta` and an `exit` hook.
17
17
  */
18
- export function App<TMeta extends object = object>({ children, ...props }: AppProps<TMeta>): FabricReactElement {
18
+ export function Fabric<TMeta extends object = object>({ children, ...props }: FabricProps<TMeta>): FabricReactElement {
19
19
  const { meta = {} } = props
20
20
 
21
21
  const { exit } = useContext(RootContext)
@@ -28,9 +28,9 @@ export function App<TMeta extends object = object>({ children, ...props }: AppPr
28
28
  provide(NodeTreeContext, childTree)
29
29
  }
30
30
 
31
- provide(AppContext, { exit, meta })
31
+ provide(FabricContext, { exit, meta })
32
32
 
33
33
  return <>{children}</>
34
34
  }
35
35
 
36
- App.displayName = 'App'
36
+ Fabric.displayName = 'Fabric'
@@ -0,0 +1 @@
1
+ export { useFabric } from '@kubb/fabric-core'
package/src/index.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  // import './globals.ts'
2
2
  import * as React from 'react'
3
3
 
4
- export type { Fabric } from '@kubb/fabric-core'
5
4
  // expose fabric core helpers
6
5
  export { createContext, createFabric, createFile, FileManager, FileProcessor, TreeNode, useContext } from '@kubb/fabric-core'
7
6
 
@@ -11,8 +10,8 @@ export const useEffect = React.useEffect
11
10
  export const useReducer = React.useReducer
12
11
  export const useRef = React.useRef
13
12
 
14
- export { App } from './components/App.tsx'
15
13
  export { Const } from './components/Const.tsx'
14
+ export { Fabric } from './components/Fabric.tsx'
16
15
  export { File } from './components/File.tsx'
17
16
  export { Function } from './components/Function.tsx'
18
17
  // components
@@ -20,7 +19,7 @@ export { Root } from './components/Root.tsx'
20
19
  export { Type } from './components/Type.tsx'
21
20
 
22
21
  // composables
23
- export { useApp } from './composables/useApp.ts'
22
+ export { useFabric } from './composables/useFabric.ts'
24
23
  export { useFile } from './composables/useFile.ts'
25
24
  export { useLifecycle } from './composables/useLifecycle.tsx'
26
25
 
@@ -1,8 +1,8 @@
1
- import * as React from 'react/jsx-dev-runtime'
1
+ import * as React from 'react/jsx-runtime'
2
2
  import type { FabricReactElement, FabricReactNode } from './types.ts'
3
3
 
4
4
  export const Fragment = React.Fragment
5
- export const jsxDEV = React.jsxDEV
5
+ export const jsxDEV = React.jsx
6
6
 
7
7
  export type * from './jsx-namespace.d.ts'
8
8
 
@@ -15,8 +15,8 @@ export type Options = {
15
15
  }
16
16
 
17
17
  type ExtendOptions = {
18
- render(App: FabricReactElement): Promise<void>
19
- renderToString(App: FabricReactElement): Promise<string>
18
+ render(Fabric: FabricReactElement): Promise<void>
19
+ renderToString(Fabric: FabricReactElement): Promise<string>
20
20
  waitUntilExit(): Promise<void>
21
21
  unmount(error?: Error | number | null): void
22
22
  }
@@ -24,8 +24,8 @@ type ExtendOptions = {
24
24
  declare global {
25
25
  namespace Kubb {
26
26
  interface Fabric {
27
- render(App: FabricReactElement): Promise<void>
28
- renderToString(App: FabricReactElement): Promise<string>
27
+ render(Fabric: FabricReactElement): Promise<void>
28
+ renderToString(Fabric: FabricReactElement): Promise<string>
29
29
  waitUntilExit(): Promise<void>
30
30
  }
31
31
  }
@@ -38,13 +38,13 @@ export const reactPlugin = definePlugin<Options, ExtendOptions>({
38
38
  const runtime = new Runtime({ fileManager: ctx.fileManager, ...options })
39
39
 
40
40
  return {
41
- async render(App) {
41
+ async render(Fabric) {
42
42
  await ctx.emit('lifecycle:start')
43
- await runtime.render(App)
43
+ await runtime.render(Fabric)
44
44
  },
45
- async renderToString(App) {
45
+ async renderToString(Fabric) {
46
46
  await ctx.emit('lifecycle:start')
47
- return runtime.renderToString(App)
47
+ return runtime.renderToString(Fabric)
48
48
  },
49
49
  async waitUntilExit() {
50
50
  await runtime.waitUntilExit()
@@ -1,49 +0,0 @@
1
- import { r as __name } from "./chunk-DbZtQ4qb.js";
2
-
3
- //#region src/utils/getFunctionParams.d.ts
4
- type Param = {
5
- /**
6
- * `object` will return the pathParams as an object.
7
- *
8
- * `inline` will return the pathParams as comma separated params.
9
- * @default `'inline'`
10
- * @private
11
- */
12
- mode?: 'object' | 'inline' | 'inlineSpread';
13
- type?: 'string' | 'number' | (string & {});
14
- optional?: boolean;
15
- /**
16
- * @example test = "default"
17
- */
18
- default?: string;
19
- /**
20
- * Used for no TypeScript(with mode object)
21
- * @example test: "default"
22
- */
23
- value?: string;
24
- children?: Params;
25
- };
26
- type Params = Record<string, Param | undefined>;
27
- type Options = {
28
- type: 'constructor' | 'call' | 'object' | 'objectValue';
29
- transformName?: (name: string) => string;
30
- transformType?: (type: string) => string;
31
- };
32
- declare function createFunctionParams(params: Params): Params;
33
- declare class FunctionParams {
34
- #private;
35
- static factory(params: Params): FunctionParams;
36
- constructor(params: Params);
37
- get params(): Params;
38
- get flatParams(): Params;
39
- toCall({
40
- transformName,
41
- transformType
42
- }?: Pick<Options, 'transformName' | 'transformType'>): string;
43
- toObject(): string;
44
- toObjectValue(): string;
45
- toConstructor(): string;
46
- }
47
- //#endregion
48
- export { createFunctionParams as i, Param as n, Params as r, FunctionParams as t };
49
- //# sourceMappingURL=getFunctionParams-CINBJQGH.d.ts.map
@@ -1,266 +0,0 @@
1
- import { r as __name, t as __commonJSMin } from "./chunk-DbZtQ4qb.js";
2
- import { t as require_react } from "./react-C2cYsofv.js";
3
-
4
- //#region ../../node_modules/.pnpm/react@19.2.3/node_modules/react/cjs/react-jsx-runtime.production.js
5
- /**
6
- * @license React
7
- * react-jsx-runtime.production.js
8
- *
9
- * Copyright (c) Meta Platforms, Inc. and affiliates.
10
- *
11
- * This source code is licensed under the MIT license found in the
12
- * LICENSE file in the root directory of this source tree.
13
- */
14
- var require_react_jsx_runtime_production = /* @__PURE__ */ __commonJSMin(((exports) => {
15
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element");
16
- var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
17
- function jsxProd(type, config, maybeKey) {
18
- var key = null;
19
- void 0 !== maybeKey && (key = "" + maybeKey);
20
- void 0 !== config.key && (key = "" + config.key);
21
- if ("key" in config) {
22
- maybeKey = {};
23
- for (var propName in config) "key" !== propName && (maybeKey[propName] = config[propName]);
24
- } else maybeKey = config;
25
- config = maybeKey.ref;
26
- return {
27
- $$typeof: REACT_ELEMENT_TYPE,
28
- type,
29
- key,
30
- ref: void 0 !== config ? config : null,
31
- props: maybeKey
32
- };
33
- }
34
- exports.Fragment = REACT_FRAGMENT_TYPE;
35
- exports.jsx = jsxProd;
36
- exports.jsxs = jsxProd;
37
- }));
38
-
39
- //#endregion
40
- //#region ../../node_modules/.pnpm/react@19.2.3/node_modules/react/cjs/react-jsx-runtime.development.js
41
- /**
42
- * @license React
43
- * react-jsx-runtime.development.js
44
- *
45
- * Copyright (c) Meta Platforms, Inc. and affiliates.
46
- *
47
- * This source code is licensed under the MIT license found in the
48
- * LICENSE file in the root directory of this source tree.
49
- */
50
- var require_react_jsx_runtime_development = /* @__PURE__ */ __commonJSMin(((exports) => {
51
- "production" !== process.env.NODE_ENV && (function() {
52
- function getComponentNameFromType(type) {
53
- if (null == type) return null;
54
- if ("function" === typeof type) return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
55
- if ("string" === typeof type) return type;
56
- switch (type) {
57
- case REACT_FRAGMENT_TYPE: return "Fragment";
58
- case REACT_PROFILER_TYPE: return "Profiler";
59
- case REACT_STRICT_MODE_TYPE: return "StrictMode";
60
- case REACT_SUSPENSE_TYPE: return "Suspense";
61
- case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList";
62
- case REACT_ACTIVITY_TYPE: return "Activity";
63
- }
64
- if ("object" === typeof type) switch ("number" === typeof type.tag && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof) {
65
- case REACT_PORTAL_TYPE: return "Portal";
66
- case REACT_CONTEXT_TYPE: return type.displayName || "Context";
67
- case REACT_CONSUMER_TYPE: return (type._context.displayName || "Context") + ".Consumer";
68
- case REACT_FORWARD_REF_TYPE:
69
- var innerType = type.render;
70
- type = type.displayName;
71
- type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
72
- return type;
73
- case REACT_MEMO_TYPE: return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
74
- case REACT_LAZY_TYPE:
75
- innerType = type._payload;
76
- type = type._init;
77
- try {
78
- return getComponentNameFromType(type(innerType));
79
- } catch (x) {}
80
- }
81
- return null;
82
- }
83
- function testStringCoercion(value) {
84
- return "" + value;
85
- }
86
- function checkKeyStringCoercion(value) {
87
- try {
88
- testStringCoercion(value);
89
- var JSCompiler_inline_result = !1;
90
- } catch (e) {
91
- JSCompiler_inline_result = !0;
92
- }
93
- if (JSCompiler_inline_result) {
94
- JSCompiler_inline_result = console;
95
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
96
- var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
97
- JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0);
98
- return testStringCoercion(value);
99
- }
100
- }
101
- function getTaskName(type) {
102
- if (type === REACT_FRAGMENT_TYPE) return "<>";
103
- if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE) return "<...>";
104
- try {
105
- var name = getComponentNameFromType(type);
106
- return name ? "<" + name + ">" : "<...>";
107
- } catch (x) {
108
- return "<...>";
109
- }
110
- }
111
- function getOwner() {
112
- var dispatcher = ReactSharedInternals.A;
113
- return null === dispatcher ? null : dispatcher.getOwner();
114
- }
115
- function UnknownOwner() {
116
- return Error("react-stack-top-frame");
117
- }
118
- function hasValidKey(config) {
119
- if (hasOwnProperty.call(config, "key")) {
120
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
121
- if (getter && getter.isReactWarning) return !1;
122
- }
123
- return void 0 !== config.key;
124
- }
125
- function defineKeyPropWarningGetter(props, displayName) {
126
- function warnAboutAccessingKey() {
127
- specialPropKeyWarningShown || (specialPropKeyWarningShown = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName));
128
- }
129
- warnAboutAccessingKey.isReactWarning = !0;
130
- Object.defineProperty(props, "key", {
131
- get: warnAboutAccessingKey,
132
- configurable: !0
133
- });
134
- }
135
- function elementRefGetterWithDeprecationWarning() {
136
- var componentName = getComponentNameFromType(this.type);
137
- didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."));
138
- componentName = this.props.ref;
139
- return void 0 !== componentName ? componentName : null;
140
- }
141
- function ReactElement(type, key, props, owner, debugStack, debugTask) {
142
- var refProp = props.ref;
143
- type = {
144
- $$typeof: REACT_ELEMENT_TYPE,
145
- type,
146
- key,
147
- props,
148
- _owner: owner
149
- };
150
- null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
151
- enumerable: !1,
152
- get: elementRefGetterWithDeprecationWarning
153
- }) : Object.defineProperty(type, "ref", {
154
- enumerable: !1,
155
- value: null
156
- });
157
- type._store = {};
158
- Object.defineProperty(type._store, "validated", {
159
- configurable: !1,
160
- enumerable: !1,
161
- writable: !0,
162
- value: 0
163
- });
164
- Object.defineProperty(type, "_debugInfo", {
165
- configurable: !1,
166
- enumerable: !1,
167
- writable: !0,
168
- value: null
169
- });
170
- Object.defineProperty(type, "_debugStack", {
171
- configurable: !1,
172
- enumerable: !1,
173
- writable: !0,
174
- value: debugStack
175
- });
176
- Object.defineProperty(type, "_debugTask", {
177
- configurable: !1,
178
- enumerable: !1,
179
- writable: !0,
180
- value: debugTask
181
- });
182
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
183
- return type;
184
- }
185
- function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
186
- var children = config.children;
187
- if (void 0 !== children) if (isStaticChildren) if (isArrayImpl(children)) {
188
- for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++) validateChildKeys(children[isStaticChildren]);
189
- Object.freeze && Object.freeze(children);
190
- } else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
191
- else validateChildKeys(children);
192
- if (hasOwnProperty.call(config, "key")) {
193
- children = getComponentNameFromType(type);
194
- var keys = Object.keys(config).filter(function(k) {
195
- return "key" !== k;
196
- });
197
- isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
198
- didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", isStaticChildren, children, keys, children), didWarnAboutKeySpread[children + isStaticChildren] = !0);
199
- }
200
- children = null;
201
- void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
202
- hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
203
- if ("key" in config) {
204
- maybeKey = {};
205
- for (var propName in config) "key" !== propName && (maybeKey[propName] = config[propName]);
206
- } else maybeKey = config;
207
- children && defineKeyPropWarningGetter(maybeKey, "function" === typeof type ? type.displayName || type.name || "Unknown" : type);
208
- return ReactElement(type, children, maybeKey, getOwner(), debugStack, debugTask);
209
- }
210
- function validateChildKeys(node) {
211
- isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
212
- }
213
- function isValidElement(object) {
214
- return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
215
- }
216
- var React = require_react();
217
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element");
218
- var REACT_PORTAL_TYPE = Symbol.for("react.portal");
219
- var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
220
- var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
221
- var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
222
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
223
- var REACT_CONTEXT_TYPE = Symbol.for("react.context");
224
- var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
225
- var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
226
- var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
227
- var REACT_MEMO_TYPE = Symbol.for("react.memo");
228
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
229
- var REACT_ACTIVITY_TYPE = Symbol.for("react.activity");
230
- var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
231
- var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
232
- var hasOwnProperty = Object.prototype.hasOwnProperty;
233
- var isArrayImpl = Array.isArray;
234
- var createTask = console.createTask ? console.createTask : function() {
235
- return null;
236
- };
237
- React = { react_stack_bottom_frame: function(callStackForError) {
238
- return callStackForError();
239
- } };
240
- var specialPropKeyWarningShown;
241
- var didWarnAboutElementRef = {};
242
- var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(React, UnknownOwner)();
243
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
244
- var didWarnAboutKeySpread = {};
245
- exports.Fragment = REACT_FRAGMENT_TYPE;
246
- exports.jsx = function(type, config, maybeKey) {
247
- var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
248
- return jsxDEVImpl(type, config, maybeKey, !1, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
249
- };
250
- exports.jsxs = function(type, config, maybeKey) {
251
- var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
252
- return jsxDEVImpl(type, config, maybeKey, !0, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
253
- };
254
- })();
255
- }));
256
-
257
- //#endregion
258
- //#region ../../node_modules/.pnpm/react@19.2.3/node_modules/react/jsx-runtime.js
259
- var require_jsx_runtime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
260
- if (process.env.NODE_ENV === "production") module.exports = require_react_jsx_runtime_production();
261
- else module.exports = require_react_jsx_runtime_development();
262
- }));
263
-
264
- //#endregion
265
- export { require_jsx_runtime as t };
266
- //# sourceMappingURL=jsx-runtime-CZxrhUx8.js.map