@kubb/react-fabric 0.13.2 → 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.
- package/README.md +2 -2
- package/dist/{chunk-Cnw5r_-A.js → chunk-BGCRLu6H.js} +16 -21
- package/dist/globals.d.ts +2 -1
- package/dist/globals.js +1 -1
- package/dist/index.cjs +79 -89
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +27 -27
- package/dist/index.js +27 -35
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.cjs +6 -227
- package/dist/jsx-dev-runtime.cjs.map +1 -1
- package/dist/jsx-dev-runtime.d.ts +5 -4
- package/dist/jsx-dev-runtime.js +6 -227
- package/dist/jsx-dev-runtime.js.map +1 -1
- package/dist/{jsx-namespace-CFK460kI.d.ts → jsx-namespace-C9N4PA8a.d.ts} +3 -2
- package/dist/{react-DorQ0Kea.cjs → jsx-runtime-Bl0DfUmV.js} +347 -75
- package/dist/jsx-runtime-Bl0DfUmV.js.map +1 -0
- package/dist/{react-D652OKii.js → jsx-runtime-Cua1md-Z.cjs} +402 -31
- package/dist/jsx-runtime-Cua1md-Z.cjs.map +1 -0
- package/dist/jsx-runtime.cjs +4 -6
- package/dist/jsx-runtime.cjs.map +1 -1
- package/dist/jsx-runtime.d.ts +3 -2
- package/dist/jsx-runtime.js +3 -5
- package/dist/jsx-runtime.js.map +1 -1
- package/dist/parsers.cjs +7 -7
- package/dist/parsers.js +2 -3
- package/dist/plugins.cjs +10 -10
- package/dist/plugins.d.ts +1 -1
- package/dist/plugins.js +4 -7
- package/dist/{reactPlugin-CJEggKNs.d.ts → reactPlugin-CKiGUCKQ.d.ts} +11 -10
- package/dist/{reactPlugin-BGbgHJfV.cjs → reactPlugin-D74A1eG4.cjs} +1495 -377
- package/dist/{reactPlugin-BGbgHJfV.cjs.map → reactPlugin-D74A1eG4.cjs.map} +1 -1
- package/dist/{reactPlugin-tE73eBS_.js → reactPlugin-QQPrjNuQ.js} +1460 -342
- package/dist/{reactPlugin-tE73eBS_.js.map → reactPlugin-QQPrjNuQ.js.map} +1 -1
- package/dist/types-BJVZ7ita.d.ts +104 -0
- package/dist/types.cjs +7 -7
- package/dist/types.d.ts +2 -62
- package/dist/types.js +2 -3
- package/package.json +9 -3
- package/src/components/{App.tsx → Fabric.tsx} +6 -6
- package/src/composables/useFabric.ts +1 -0
- package/src/index.ts +2 -3
- package/src/jsx-dev-runtime.ts +2 -2
- package/src/plugins/reactPlugin.ts +8 -8
- package/dist/getFunctionParams-BJb7Kd-D.d.ts +0 -48
- package/dist/getFunctionParams-ClT1iMr_.d.ts +0 -47
- package/dist/jsx-namespace-BLQ6SvuD.d.ts +0 -33
- package/dist/jsx-runtime-7CEZevwV.cjs +0 -251
- package/dist/jsx-runtime-7CEZevwV.cjs.map +0 -1
- package/dist/jsx-runtime-Dm7PKVbc.js +0 -247
- package/dist/jsx-runtime-Dm7PKVbc.js.map +0 -1
- package/dist/react-D652OKii.js.map +0 -1
- package/dist/react-DorQ0Kea.cjs.map +0 -1
- package/dist/reactPlugin-DYARkyXy.d.ts +0 -462
- package/src/components/__snapshots__/arrow_function_with_generics.ts +0 -3
- package/src/components/__snapshots__/async_arrow_function.ts +0 -3
- package/src/components/__snapshots__/async_function.ts +0 -3
- package/src/components/__snapshots__/async_function_with_Promise_return_type.ts +0 -3
- package/src/components/__snapshots__/basic_arrow_function.ts +0 -3
- package/src/components/__snapshots__/basic_const.ts +0 -1
- package/src/components/__snapshots__/basic_export.ts +0 -1
- package/src/components/__snapshots__/basic_function.ts +0 -3
- package/src/components/__snapshots__/basic_import.ts +0 -1
- package/src/components/__snapshots__/basic_type.ts +0 -1
- package/src/components/__snapshots__/const_with_JSDoc.ts +0 -4
- package/src/components/__snapshots__/const_with_as_const.ts +0 -1
- package/src/components/__snapshots__/const_with_type.ts +0 -1
- package/src/components/__snapshots__/default_exported_arrow_function.ts +0 -3
- package/src/components/__snapshots__/default_exported_function.ts +0 -3
- package/src/components/__snapshots__/exported_arrow_function.ts +0 -3
- package/src/components/__snapshots__/exported_async_arrow_function_with_generics.ts +0 -3
- package/src/components/__snapshots__/exported_async_function_with_generics.ts +0 -3
- package/src/components/__snapshots__/exported_const.ts +0 -1
- package/src/components/__snapshots__/exported_function.ts +0 -3
- package/src/components/__snapshots__/exported_type.ts +0 -1
- package/src/components/__snapshots__/function_with_JSDoc.ts +0 -6
- package/src/components/__snapshots__/function_with_generics.ts +0 -3
- package/src/components/__snapshots__/function_with_parameters.ts +0 -3
- package/src/components/__snapshots__/function_with_return_type.ts +0 -3
- package/src/components/__snapshots__/matches_with_root_import.ts +0 -1
- package/src/components/__snapshots__/named_export.ts +0 -1
- package/src/components/__snapshots__/named_export_(object_advanced).ts +0 -1
- package/src/components/__snapshots__/named_import.ts +0 -1
- package/src/components/__snapshots__/named_import_(object).ts +0 -1
- package/src/components/__snapshots__/named_import_(object_advanced).ts +0 -1
- package/src/components/__snapshots__/named_typed_export.ts +0 -1
- package/src/components/__snapshots__/named_typed_import.ts +0 -1
- package/src/components/__snapshots__/single_line_arrow_function.ts +0 -1
- package/src/components/__snapshots__/type_with_JSDoc.ts +0 -4
- package/src/components/__snapshots__/typed_export.ts +0 -1
- package/src/components/__snapshots__/typed_import.ts +0 -1
- package/src/composables/useApp.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -1,34 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "./jsx-runtime-Dm7PKVbc.js";
|
|
1
|
+
import { a as __toESM } from "./chunk-BGCRLu6H.js";
|
|
2
|
+
import { n as require_react } from "./jsx-runtime-Bl0DfUmV.js";
|
|
4
3
|
import { Fragment, jsx, jsxs } from "./jsx-runtime.js";
|
|
5
|
-
import { i as Root, n as Runtime, r as Renderer, t as reactPlugin } from "./reactPlugin-
|
|
6
|
-
import {
|
|
4
|
+
import { i as Root, n as Runtime, r as Renderer, t as reactPlugin } from "./reactPlugin-QQPrjNuQ.js";
|
|
5
|
+
import { FabricContext, FileContext, FileManager, FileProcessor, NodeTreeContext, RootContext, TreeNode, createContext, createFabric, createFabric as createFabric$1, createFile, createJSDoc, onProcessExit, provide, useContext, useContext as useContext$1, useFabric, useFile, useFile as useFile$1, useFileManager, useLifecycle, useNodeTree } from "@kubb/fabric-core";
|
|
7
6
|
import { spawn } from "node:child_process";
|
|
8
7
|
import ws from "ws";
|
|
9
8
|
import { sortBy } from "remeda";
|
|
10
|
-
|
|
11
|
-
//#region src/components/App.tsx
|
|
9
|
+
//#region src/utils/createJSDoc.ts
|
|
12
10
|
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
13
|
-
/**
|
|
14
|
-
* App container containing the AppContext carrying `meta` and an `exit` hook.
|
|
15
|
-
*/
|
|
16
|
-
function App({ children, ...props }) {
|
|
17
|
-
const { meta = {} } = props;
|
|
18
|
-
const { exit } = useContext$1(RootContext);
|
|
19
|
-
const nodeTree = useNodeTree();
|
|
20
|
-
if (nodeTree) provide(NodeTreeContext, nodeTree.addChild({
|
|
21
|
-
type: "App",
|
|
22
|
-
props
|
|
23
|
-
}));
|
|
24
|
-
provide(AppContext, {
|
|
25
|
-
exit,
|
|
26
|
-
meta
|
|
27
|
-
});
|
|
28
|
-
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
29
|
-
}
|
|
30
|
-
App.displayName = "App";
|
|
31
|
-
|
|
32
11
|
//#endregion
|
|
33
12
|
//#region src/components/Const.tsx
|
|
34
13
|
/**
|
|
@@ -57,7 +36,26 @@ function Const({ children, ...props }) {
|
|
|
57
36
|
] });
|
|
58
37
|
}
|
|
59
38
|
Const.displayName = "Const";
|
|
60
|
-
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/components/Fabric.tsx
|
|
41
|
+
/**
|
|
42
|
+
* Fabric container containing the FabricContext carrying `meta` and an `exit` hook.
|
|
43
|
+
*/
|
|
44
|
+
function Fabric({ children, ...props }) {
|
|
45
|
+
const { meta = {} } = props;
|
|
46
|
+
const { exit } = useContext$1(RootContext);
|
|
47
|
+
const nodeTree = useNodeTree();
|
|
48
|
+
if (nodeTree) provide(NodeTreeContext, nodeTree.addChild({
|
|
49
|
+
type: "App",
|
|
50
|
+
props
|
|
51
|
+
}));
|
|
52
|
+
provide(FabricContext, {
|
|
53
|
+
exit,
|
|
54
|
+
meta
|
|
55
|
+
});
|
|
56
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
57
|
+
}
|
|
58
|
+
Fabric.displayName = "Fabric";
|
|
61
59
|
//#endregion
|
|
62
60
|
//#region src/components/File.tsx
|
|
63
61
|
/**
|
|
@@ -172,7 +170,6 @@ FileImport.displayName = "FileImport";
|
|
|
172
170
|
File.Export = FileExport;
|
|
173
171
|
File.Import = FileImport;
|
|
174
172
|
File.Source = FileSource;
|
|
175
|
-
|
|
176
173
|
//#endregion
|
|
177
174
|
//#region src/components/Function.tsx
|
|
178
175
|
/**
|
|
@@ -272,7 +269,6 @@ function ArrowFunction({ children, ...props }) {
|
|
|
272
269
|
}
|
|
273
270
|
ArrowFunction.displayName = "ArrowFunction";
|
|
274
271
|
Function.Arrow = ArrowFunction;
|
|
275
|
-
|
|
276
272
|
//#endregion
|
|
277
273
|
//#region src/components/Type.tsx
|
|
278
274
|
/**
|
|
@@ -296,7 +292,6 @@ function Type({ children, ...props }) {
|
|
|
296
292
|
] });
|
|
297
293
|
}
|
|
298
294
|
Type.displayName = "Type";
|
|
299
|
-
|
|
300
295
|
//#endregion
|
|
301
296
|
//#region src/devtools.ts
|
|
302
297
|
let isOpen = false;
|
|
@@ -393,7 +388,6 @@ function openDevtools() {
|
|
|
393
388
|
});
|
|
394
389
|
});
|
|
395
390
|
}
|
|
396
|
-
|
|
397
391
|
//#endregion
|
|
398
392
|
//#region src/createReactFabric.ts
|
|
399
393
|
function createReactFabric(config = {}) {
|
|
@@ -407,7 +401,6 @@ function createReactFabric(config = {}) {
|
|
|
407
401
|
});
|
|
408
402
|
return fabric;
|
|
409
403
|
}
|
|
410
|
-
|
|
411
404
|
//#endregion
|
|
412
405
|
//#region src/utils/getFunctionParams.ts
|
|
413
406
|
function order(items) {
|
|
@@ -520,14 +513,13 @@ var FunctionParams = class FunctionParams {
|
|
|
520
513
|
return getFunctionParams(this.#params, { type: "constructor" });
|
|
521
514
|
}
|
|
522
515
|
};
|
|
523
|
-
|
|
524
516
|
//#endregion
|
|
525
517
|
//#region src/index.ts
|
|
526
518
|
const useState = import_react.useState;
|
|
527
519
|
const useEffect = import_react.useEffect;
|
|
528
520
|
const useReducer = import_react.useReducer;
|
|
529
521
|
const useRef = import_react.useRef;
|
|
530
|
-
|
|
531
522
|
//#endregion
|
|
532
|
-
export {
|
|
523
|
+
export { Const, Fabric, File, FileManager, FileProcessor, Function, FunctionParams, Root, Runtime, TreeNode, Type, createContext, createFabric, createFile, createFunctionParams, createReactFabric, openDevtools, useContext, useEffect, useFabric, useFile, useLifecycle, useReducer, useRef, useState };
|
|
524
|
+
|
|
533
525
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["useContext","useFile","createFabric","#params"],"sources":["../src/components/App.tsx","../src/components/Const.tsx","../src/components/File.tsx","../src/components/Function.tsx","../src/components/Type.tsx","../src/devtools.ts","../src/createReactFabric.ts","../src/utils/getFunctionParams.ts","../src/index.ts"],"sourcesContent":["import { AppContext, NodeTreeContext, provide, RootContext, useContext, useNodeTree } from '@kubb/fabric-core'\nimport type { FabricReactElement, FabricReactNode } from '../types.ts'\n\nexport type AppProps<TMeta extends object = object> = {\n /**\n * Metadata associated with the App.\n */\n meta?: TMeta\n /**\n * Children nodes.\n */\n children?: FabricReactNode\n}\n\n/**\n * App container containing the AppContext carrying `meta` and an `exit` hook.\n */\nexport function App<TMeta extends object = object>({ children, ...props }: AppProps<TMeta>): FabricReactElement {\n const { meta = {} } = props\n\n const { exit } = useContext(RootContext)\n\n const nodeTree = useNodeTree()\n\n if (nodeTree) {\n const childTree = nodeTree.addChild({ type: 'App', props })\n\n provide(NodeTreeContext, childTree)\n }\n\n provide(AppContext, { exit, meta })\n\n return <>{children}</>\n}\n\nApp.displayName = 'App'\n","import { NodeTreeContext, provide, useNodeTree } from '@kubb/fabric-core'\nimport type { FabricReactElement, FabricReactNode, JSDoc, Key } from '../types.ts'\nimport { createJSDoc } from '../utils/createJSDoc.ts'\n\nexport type ConstProps = {\n key?: Key\n /**\n * Name of the const\n */\n name: string\n /**\n * Does this type need to be exported.\n */\n export?: boolean\n /**\n * Type to make the const being typed\n */\n type?: string\n /**\n * Options for JSdocs.\n */\n JSDoc?: JSDoc\n /**\n * Use of `const` assertions\n */\n asConst?: boolean\n /**\n * Children nodes.\n */\n children?: FabricReactNode\n}\n\n/**\n * Generates a TypeScript constant declaration.\n */\nexport function Const({ children, ...props }: ConstProps): FabricReactElement {\n const { name, export: canExport, type, JSDoc, asConst } = props\n\n const nodeTree = useNodeTree()\n\n if (nodeTree) {\n const childTree = nodeTree.addChild({ type: 'Const', props })\n\n provide(NodeTreeContext, childTree)\n }\n\n return (\n <>\n {JSDoc?.comments && (\n <>\n {createJSDoc({ comments: JSDoc?.comments })}\n <br />\n </>\n )}\n {canExport && <>export </>}\n const {name}\n {type ? (\n <>\n {':'}\n {type}{' '}\n </>\n ) : (\n ' '\n )}\n = {children}\n {asConst && <> as const</>}\n </>\n )\n}\n\nConst.displayName = 'Const'\n","import { FileContext, NodeTreeContext, provide, useFile, useFileManager, useNodeTree } from '@kubb/fabric-core'\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport type { FabricReactElement, FabricReactNode, Key } from '../types.ts'\n\ntype BasePropsWithBaseName = {\n /**\n * Name to be used to dynamicly create the baseName(based on input.path).\n * Based on UNIX basename\n * @link https://nodejs.org/api/path.html#pathbasenamepath-suffix\n */\n baseName: KubbFile.BaseName\n /**\n * Path will be full qualified path to a specified file.\n */\n path: KubbFile.Path\n}\n\ntype BasePropsWithoutBaseName = {\n baseName?: never\n /**\n * Path will be full qualified path to a specified file.\n */\n path?: KubbFile.Path\n}\n\ntype BaseProps = BasePropsWithBaseName | BasePropsWithoutBaseName\n\ntype Props<TMeta> = BaseProps & {\n key?: Key\n meta?: TMeta\n banner?: string\n footer?: string\n children?: FabricReactNode\n}\n\n/**\n * Adds files to the FileManager\n */\nexport function File<TMeta extends object = object>({ children, ...props }: Props<TMeta>): FabricReactElement {\n const { baseName, path, meta = {}, footer, banner } = props\n\n const fileManager = useFileManager()\n const nodeTree = useNodeTree()\n\n if (nodeTree) {\n const childTree = nodeTree.addChild({ type: 'File', props })\n\n provide(NodeTreeContext, childTree)\n }\n\n if (!baseName || !path) {\n return <>{children}</>\n }\n\n const file: KubbFile.File = {\n baseName,\n path,\n meta,\n banner,\n footer,\n sources: [],\n imports: [],\n exports: [],\n }\n\n const [resolvedFile] = fileManager.add(file)\n provide(FileContext, resolvedFile)\n\n return <kubb-file {...props}>{children}</kubb-file>\n}\n\nFile.displayName = 'File'\n\ntype FileSourceProps = Omit<KubbFile.Source, 'value'> & {\n key?: Key\n children?: FabricReactNode\n}\n\n/**\n * File.Source\n *\n * Marks a block of source text to be associated with the current file when\n * rendering with the FileCollector. Children are treated as the source string.\n */\nfunction FileSource({ children, ...props }: FileSourceProps): FabricReactElement {\n const { name, isExportable, isIndexable, isTypeOnly } = props\n\n const nodeTree = useNodeTree()\n\n if (nodeTree) {\n const childTree = nodeTree.addChild({ type: 'FileSource', props })\n\n provide(NodeTreeContext, childTree)\n }\n\n return (\n <kubb-source name={name} isTypeOnly={isTypeOnly} isExportable={isExportable} isIndexable={isIndexable}>\n {children}\n </kubb-source>\n )\n}\n\nFileSource.displayName = 'FileSource'\n\nexport type FileExportProps = KubbFile.Export & { key?: Key }\n\n/**\n * File.Export\n *\n * Declares an export entry for the current file. This will be collected by\n * the FileCollector for later emission.\n */\nfunction FileExport(props: FileExportProps): FabricReactElement {\n const { name, path, isTypeOnly, asAlias } = props\n\n const nodeTree = useNodeTree()\n const file = useFile()\n\n if (nodeTree) {\n const childTree = nodeTree.addChild({ type: 'FileExport', props })\n\n provide(NodeTreeContext, childTree)\n }\n\n if (file) {\n file.exports.push({\n name,\n path,\n asAlias,\n isTypeOnly,\n })\n }\n\n return <kubb-export name={name} path={path} isTypeOnly={isTypeOnly} asAlias={asAlias} />\n}\n\nFileExport.displayName = 'FileExport'\n\nexport type FileImportProps = KubbFile.Import & { key?: Key }\n\n/**\n * File.Import\n *\n * Declares an import entry for the current file.\n */\nfunction FileImport(props: FileImportProps): FabricReactElement {\n const { name, root, path, isTypeOnly, isNameSpace } = props\n\n const nodeTree = useNodeTree()\n const file = useFile()\n\n if (nodeTree) {\n const childTree = nodeTree.addChild({ type: 'FileImport', props })\n\n provide(NodeTreeContext, childTree)\n }\n\n if (file) {\n file.imports.push({\n name,\n path,\n root,\n isNameSpace,\n isTypeOnly,\n })\n }\n\n return <kubb-import name={name} root={root} path={path} isNameSpace={isNameSpace} isTypeOnly={isTypeOnly} />\n}\n\nFileImport.displayName = 'FileImport'\n\nFile.Export = FileExport\nFile.Import = FileImport\nFile.Source = FileSource\n","import { NodeTreeContext, provide, useNodeTree } from '@kubb/fabric-core'\nimport type { FabricReactElement, FabricReactNode, JSDoc, Key } from '../types.ts'\nimport { createJSDoc } from '../utils/createJSDoc.ts'\n\ntype Props = {\n key?: Key\n /**\n * Name of the function.\n */\n name: string\n /**\n * Add default when export is being used\n */\n default?: boolean\n /**\n * Parameters/options/props that need to be used.\n */\n params?: string\n /**\n * Does this function need to be exported.\n */\n export?: boolean\n /**\n * Does the function has async/promise behavior.\n * This will also add `Promise<returnType>` as the returnType.\n */\n async?: boolean\n /**\n * Generics that needs to be added for TypeScript.\n */\n generics?: string | string[]\n /**\n * ReturnType(see async for adding Promise type).\n */\n returnType?: string\n /**\n * Options for JSdocs.\n */\n JSDoc?: JSDoc\n /**\n * Children nodes.\n */\n children?: FabricReactNode\n}\n\n/**\n * Generates a TypeScript function declaration.\n */\nexport function Function({ children, ...props }: Props): FabricReactElement {\n const { name, default: isDefault, export: canExport, async, generics, params, returnType, JSDoc } = props\n\n const nodeTree = useNodeTree()\n\n if (nodeTree) {\n const childTree = nodeTree.addChild({ type: 'Function', props })\n\n provide(NodeTreeContext, childTree)\n }\n\n return (\n <>\n {JSDoc?.comments && (\n <>\n {createJSDoc({ comments: JSDoc?.comments })}\n <br />\n </>\n )}\n {canExport && <>export </>}\n {isDefault && <>default </>}\n {async && <>async </>}\n function {name}\n {generics && (\n <>\n {'<'}\n {Array.isArray(generics) ? generics.join(', ').trim() : generics}\n {'>'}\n </>\n )}\n ({params}){returnType && !async && <>: {returnType}</>}\n {returnType && async && (\n <>\n : Promise{'<'}\n {returnType}\n {'>'}\n </>\n )}\n {' {'}\n <br />\n <indent />\n {/* Indent component to handle indentation*/}\n {children}\n <br />\n <dedent />\n {/* Indent component to handle indentation*/}\n {'}'}\n </>\n )\n}\n\nFunction.displayName = 'Function'\n\ntype ArrowFunctionProps = Props & {\n /**\n * Create Arrow function in one line\n */\n singleLine?: boolean\n}\n\n/**\n * ArrowFunction\n *\n * Renders an arrow function definition. Supports the same flags as `Function`.\n * Use `singleLine` to render the body as a single-line expression.\n */\nfunction ArrowFunction({ children, ...props }: ArrowFunctionProps) {\n const { name, default: isDefault, export: canExport, async, generics, params, returnType, JSDoc, singleLine } = props\n\n const nodeTree = useNodeTree()\n\n if (nodeTree) {\n const childTree = nodeTree.addChild({ type: 'ArrowFunction', props })\n\n provide(NodeTreeContext, childTree)\n }\n return (\n <>\n {JSDoc?.comments && (\n <>\n {createJSDoc({ comments: JSDoc?.comments })}\n <br />\n </>\n )}\n {canExport && <>export </>}\n {isDefault && <>default </>}\n const {name} = {async && <>async </>}\n {generics && (\n <>\n {'<'}\n {Array.isArray(generics) ? generics.join(', ').trim() : generics}\n {'>'}\n </>\n )}\n ({params}){returnType && !async && <>: {returnType}</>}\n {returnType && async && (\n <>\n : Promise{'<'}\n {returnType}\n {'>'}\n </>\n )}\n {singleLine && (\n <>\n {' => '}\n {children}\n <br />\n </>\n )}\n {!singleLine && (\n <>\n {' => {'}\n <br />\n <indent />\n {/* Indent component to handle indentation*/}\n {children}\n <br />\n <dedent />\n {/* Indent component to handle indentation*/}\n {'}'}\n <br />\n </>\n )}\n </>\n )\n}\n\nArrowFunction.displayName = 'ArrowFunction'\nFunction.Arrow = ArrowFunction\n","import { NodeTreeContext, provide, useNodeTree } from '@kubb/fabric-core'\nimport type { FabricReactElement, FabricReactNode, JSDoc, Key } from '../types.ts'\nimport { createJSDoc } from '../utils/createJSDoc.ts'\n\nexport type TypeProps = {\n key?: Key\n /**\n * Name of the type, this needs to start with a capital letter.\n */\n name: string\n /**\n * Does this type need to be exported.\n */\n export?: boolean\n /**\n * Options for JSdocs.\n */\n JSDoc?: JSDoc\n /**\n * Children nodes.\n */\n children?: FabricReactNode\n}\n\n/**\n * Generates a TypeScript type declaration.\n */\nexport function Type({ children, ...props }: TypeProps): FabricReactElement {\n const { name, export: canExport, JSDoc } = props\n\n const nodeTree = useNodeTree()\n\n if (nodeTree) {\n const childTree = nodeTree.addChild({ type: 'Type', props })\n\n provide(NodeTreeContext, childTree)\n }\n\n if (name.charAt(0).toUpperCase() !== name.charAt(0)) {\n throw new Error('Name should start with a capital letter(see TypeScript types)')\n }\n\n return (\n <>\n {JSDoc?.comments && (\n <>\n {createJSDoc({ comments: JSDoc?.comments })}\n <br />\n </>\n )}\n {canExport && <>export </>}\n type {name} = {children}\n </>\n )\n}\n\nType.displayName = 'Type'\n","import { spawn } from 'node:child_process'\nimport { onProcessExit } from '@kubb/fabric-core'\nimport ws from 'ws'\nimport { Renderer } from './Renderer.ts'\n\ndeclare global {\n var WebSocket: typeof WebSocket\n var self: any\n var window: any\n var isDevtoolsEnabled: any\n}\n\nlet isOpen = false\n\nexport function openDevtools() {\n if (isOpen) {\n return undefined\n }\n // Set up global polyfills BEFORE importing react-devtools-core\n // This is required because react-devtools-core expects these to be available\n const customGlobal = global as any\n customGlobal.WebSocket ||= ws\n customGlobal.window ||= global\n customGlobal.self ||= global\n customGlobal.isDevtoolsEnabled = true\n\n // Filter out Kubb internal components from devtools for a cleaner view.\n // See https://github.com/facebook/react/blob/edf6eac8a181860fd8a2d076a43806f1237495a1/packages/react-devtools-shared/src/types.js#L24\n customGlobal.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ = [\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'Context.Provider',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'Root',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'ErrorBoundary',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'kubb-file',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'kubb-text',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'kubb-import',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'kubb-export',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'kubb-source',\n isEnabled: true,\n isValid: true,\n },\n ]\n\n // biome-ignore lint/suspicious/noTsIgnore: cannot find types\n // @ts-ignore\n import('react-devtools-core').then(async (devtools) => {\n console.info('Opening devtools')\n const controller = new AbortController()\n if (!isOpen) {\n const child = spawn('npx', ['react-devtools@6.1.5'], {\n signal: controller.signal,\n stdio: 'pipe',\n detached: true,\n })\n child.unref()\n }\n\n isOpen = true\n\n // Destructure the functions from the module\n const { initialize, connectToDevTools } = devtools?.default || devtools\n\n // Initialize DevTools BEFORE importing Renderer (which imports React)\n initialize()\n console.info('Initializing devtools')\n\n // Inject the renderer BEFORE connecting to DevTools\n // This ensures DevTools can properly discover the custom renderer\n Renderer.injectIntoDevTools({\n bundleType: 1,\n version: '19.2.3',\n rendererPackageName: 'kubb',\n // findFiberByHostInstance is required for DevTools to map elements to fibers\n findFiberByHostInstance: () => null,\n })\n\n console.info('Connecting devtools')\n\n try {\n connectToDevTools({\n host: 'localhost',\n port: 8097,\n useHttps: false,\n isAppActive: () => true,\n })\n } catch (e) {\n console.error(e)\n console.info('Error when connecting the devtools')\n }\n\n onProcessExit(() => {\n console.info('Disconnecting devtools')\n controller.abort()\n })\n })\n}\n","import { createFabric } from '@kubb/fabric-core'\nimport type { Fabric, FabricConfig, FabricMode } from '@kubb/fabric-core/types'\nimport { openDevtools } from './devtools.ts'\nimport type { Options } from './plugins/reactPlugin.ts'\nimport { reactPlugin } from './plugins/reactPlugin.ts'\n\nexport function createReactFabric(\n config: FabricConfig<Options & { mode?: FabricMode; devtools?: boolean }> = {},\n): Fabric<Options & { mode?: FabricMode; devtools?: boolean }> {\n if (config.devtools) {\n openDevtools()\n }\n\n const fabric = createFabric({ mode: config.mode })\n\n fabric.use(reactPlugin, {\n stdout: config.stdout,\n stderr: config.stderr,\n debug: config.debug,\n stdin: config.stdin,\n })\n\n return fabric\n}\n","import { sortBy } from 'remeda'\n\nexport type Param = {\n /**\n * `object` will return the pathParams as an object.\n *\n * `inline` will return the pathParams as comma separated params.\n * @default `'inline'`\n * @private\n */\n mode?: 'object' | 'inline' | 'inlineSpread'\n type?: 'string' | 'number' | (string & {})\n optional?: boolean\n /**\n * @example test = \"default\"\n */\n default?: string\n /**\n * Used for no TypeScript(with mode object)\n * @example test: \"default\"\n */\n value?: string\n children?: Params\n}\n\ntype ParamItem =\n | (Pick<Param, 'mode' | 'type' | 'value'> & {\n optional?: true\n default?: never\n children?: Params\n })\n | (Pick<Param, 'mode' | 'type' | 'value'> & {\n optional?: false\n default?: string\n children?: Params\n })\n\nexport type Params = Record<string, Param | undefined>\n\ntype Options = {\n type: 'constructor' | 'call' | 'object' | 'objectValue'\n transformName?: (name: string) => string\n transformType?: (type: string) => string\n}\n\nfunction order(items: Array<[key: string, item?: ParamItem]>) {\n return sortBy(items.filter(Boolean) as Array<[key: string, item?: ParamItem]>, ([_key, item]) => {\n if (item?.children) {\n return 0 // Treat items with children as required (they'll get = {} if all children are optional)\n }\n // Priority order: required (0) → optional (1) → default-only (2)\n if (item?.optional) {\n return 1 // Optional parameters (with or without default)\n }\n if (item?.default) {\n // Parameters with default only (not marked as optional)\n // Note: While the ParamItem type suggests optional and default are mutually exclusive,\n // this handles the case where a parameter has a default value but isn't explicitly marked as optional\n return 2\n }\n return 0 // Required parameters\n })\n}\n\nfunction parseChild(key: string, item: ParamItem, options: Options): string | null {\n // @ts-expect-error\n const entries = order(Object.entries(item.children))\n\n const types: string[] = []\n const names: string[] = []\n\n const optional = entries.every(([_key, item]) => item?.optional || !!item?.default)\n\n entries.forEach(([key, entryItem]) => {\n if (entryItem) {\n const name = parseItem(key, { ...entryItem, type: undefined }, options)\n if (entryItem.children) {\n const subTypes = Object.entries(entryItem.children)\n .map(([key]) => {\n return key\n })\n .join(', ')\n\n if (subTypes) {\n names.push(`${name}: { ${subTypes} }`)\n } else {\n names.push(name)\n }\n } else {\n if (options.type === 'call' && options.transformName) {\n names.push(`${key}: ${name}`)\n } else {\n names.push(name)\n }\n }\n\n if (entries.some(([_key, item]) => item?.type)) {\n types.push(parseItem(key, { ...entryItem, default: undefined }, options))\n }\n }\n })\n\n const name = item.mode === 'inline' ? key : names.length ? `{ ${names.join(', ')} }` : undefined\n const type = item.type ? item.type : types.length ? `{ ${types.join('; ')} }` : undefined\n\n if (!name) {\n return null\n }\n\n return parseItem(\n name,\n {\n type,\n default: item.default,\n optional: !item.default ? optional : undefined,\n } as ParamItem,\n options,\n )\n}\n\nfunction parseItem(name: string, item: ParamItem, options: Options): string {\n const acc: string[] = []\n const transformedName = options.transformName ? options.transformName(name) : name\n const transformedType = options.transformType && item.type ? options.transformType(item.type) : item.type\n\n if (options.type === 'object') {\n return transformedName\n }\n\n if (options.type === 'objectValue') {\n return item.value ? `${transformedName}: ${item.value}` : transformedName\n }\n\n //LEGACY\n if (item.type && options.type === 'constructor') {\n if (item.optional) {\n // Check if this is a destructured parameter (object mode)\n const isDestructured = transformedName.startsWith('{')\n if (isDestructured) {\n // For destructured parameters, use \": type = {}\" syntax to make it optional\n acc.push(`${transformedName}: ${transformedType} = {}`)\n } else {\n // For inline parameters, use \"?: type\" syntax\n acc.push(`${transformedName}?: ${transformedType}`)\n }\n } else {\n acc.push(`${transformedName}: ${transformedType}${item.default ? ` = ${item.default}` : ''}`)\n }\n } else if (item.default && options.type === 'constructor') {\n acc.push(`${transformedName} = ${item.default}`)\n } else if (item.value) {\n acc.push(`${transformedName} : ${item.value}`)\n } else if (item.mode === 'inlineSpread') {\n acc.push(`... ${transformedName}`)\n } else {\n acc.push(transformedName)\n }\n\n return acc[0] as string\n}\n\nexport function getFunctionParams(params: Params, options: Options): string {\n const entries = order(Object.entries(params as Record<string, ParamItem | undefined>))\n\n return entries\n .reduce((acc, [key, item]) => {\n if (!item) {\n return acc\n }\n\n if (item.children) {\n if (Object.keys(item.children).length === 0) {\n return acc\n }\n\n if (item.mode === 'inlineSpread') {\n return [...acc, getFunctionParams(item.children, options)]\n }\n\n const parsedItem = parseChild(key, item, options)\n if (!parsedItem) {\n return acc\n }\n\n return [...acc, parsedItem]\n }\n\n const parsedItem = parseItem(key, item, options)\n\n return [...acc, parsedItem]\n }, [] as string[])\n .join(', ')\n}\n\nexport function createFunctionParams(params: Params): Params {\n return params\n}\n// TODO use of zod\n//TODO use of string as `$name: $type` to create templates for functions instead of call/constructor\nexport class FunctionParams {\n #params: Params\n\n static factory(params: Params) {\n return new FunctionParams(params)\n }\n constructor(params: Params) {\n this.#params = params\n }\n\n get params(): Params {\n return this.#params\n }\n\n get flatParams(): Params {\n const flatter = (acc: Params, [key, item]: [key: string, item?: Param]): Params => {\n if (item?.children) {\n return Object.entries(item.children).reduce(flatter, acc)\n }\n if (item) {\n acc[key] = item\n }\n\n return acc\n }\n return Object.entries(this.#params).reduce(flatter, {} as Params)\n }\n\n toCall({ transformName, transformType }: Pick<Options, 'transformName' | 'transformType'> = {}): string {\n return getFunctionParams(this.#params, { type: 'call', transformName, transformType })\n }\n\n toObject(): string {\n return getFunctionParams(this.#params, { type: 'object' })\n }\n toObjectValue(): string {\n return getFunctionParams(this.#params, { type: 'objectValue' })\n }\n\n toConstructor(): string {\n return getFunctionParams(this.#params, { type: 'constructor' })\n }\n}\n","// import './globals.ts'\nimport * as React from 'react'\n\nexport type { Fabric } from '@kubb/fabric-core'\n// expose fabric core helpers\nexport { createContext, createFabric, createFile, FileManager, FileProcessor, TreeNode, useContext } from '@kubb/fabric-core'\n\n// react helpers\nexport const useState = React.useState\nexport const useEffect = React.useEffect\nexport const useReducer = React.useReducer\nexport const useRef = React.useRef\n\nexport { App } from './components/App.tsx'\nexport { Const } from './components/Const.tsx'\nexport { File } from './components/File.tsx'\nexport { Function } from './components/Function.tsx'\n// components\nexport { Root } from './components/Root.tsx'\nexport { Type } from './components/Type.tsx'\n\n// composables\nexport { useApp } from './composables/useApp.ts'\nexport { useFile } from './composables/useFile.ts'\nexport { useLifecycle } from './composables/useLifecycle.tsx'\n\n// factories\nexport { createReactFabric } from './createReactFabric.ts'\nexport { openDevtools } from './devtools.ts'\nexport { Runtime } from './Runtime.tsx'\n// utils\nexport { createFunctionParams, FunctionParams } from './utils/getFunctionParams.ts'\n"],"mappings":";;;;;;;;;;;;;;;AAiBA;;;;AAOE;;;;AAMA;;;;AAEA;;AAGF;;;;;;;ACAA,SAAgB,MAAM,EAAE,UAAU,GAAG,SAAyC;CAC5E,MAAM,EAAE,MAAM,QAAQ,WAAW,MAAM,OAAO,YAAY;CAE1D,MAAM,WAAW,aAAa;AAE9B,KAAI,SAGF,SAAQ,iBAFU,SAAS,SAAS;EAAE,MAAM;EAAS;EAAO,CAAC,CAE1B;AAGrC,QACE;EACG,OAAO,YACN,4CACG,YAAY,EAAE,UAAU,OAAO,UAAU,CAAC,EAC3C,oBAAC,SAAK,IACL;EAEJ,aAAa,0CAAE,YAAU;EAAC;EACpB;EACN,OACC;GAC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jB,SAAO,kBAAkB,MAAKA,QAAS,EAAE,MAAM,UAAU,CAAC;;CAE5D,gBAAwB;AACtB,SAAO,kBAAkB,MAAKA,QAAS,EAAE,MAAM,eAAe,CAAC;;CAGjE,gBAAwB;AACtB,SAAO,kBAAkB,MAAKA,QAAS,EAAE,MAAM,eAAe,CAAC;;;;;;ACvOnE,MAAa,wBAAiB;AAC9B,MAAa,yBAAkB;AAC/B,MAAa,0BAAmB;AAChC,MAAa,sBAAe"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["useContext","useFile","createFabric","#params"],"sources":["../src/utils/createJSDoc.ts","../src/components/Const.tsx","../src/components/Fabric.tsx","../src/components/File.tsx","../src/components/Function.tsx","../src/components/Type.tsx","../src/devtools.ts","../src/createReactFabric.ts","../src/utils/getFunctionParams.ts","../src/index.ts"],"sourcesContent":["export { createJSDoc } from '@kubb/fabric-core'\n","import { NodeTreeContext, provide, useNodeTree } from '@kubb/fabric-core'\nimport type { FabricReactElement, FabricReactNode, JSDoc, Key } from '../types.ts'\nimport { createJSDoc } from '../utils/createJSDoc.ts'\n\nexport type ConstProps = {\n key?: Key\n /**\n * Name of the const\n */\n name: string\n /**\n * Does this type need to be exported.\n */\n export?: boolean\n /**\n * Type to make the const being typed\n */\n type?: string\n /**\n * Options for JSdocs.\n */\n JSDoc?: JSDoc\n /**\n * Use of `const` assertions\n */\n asConst?: boolean\n /**\n * Children nodes.\n */\n children?: FabricReactNode\n}\n\n/**\n * Generates a TypeScript constant declaration.\n */\nexport function Const({ children, ...props }: ConstProps): FabricReactElement {\n const { name, export: canExport, type, JSDoc, asConst } = props\n\n const nodeTree = useNodeTree()\n\n if (nodeTree) {\n const childTree = nodeTree.addChild({ type: 'Const', props })\n\n provide(NodeTreeContext, childTree)\n }\n\n return (\n <>\n {JSDoc?.comments && (\n <>\n {createJSDoc({ comments: JSDoc?.comments })}\n <br />\n </>\n )}\n {canExport && <>export </>}\n const {name}\n {type ? (\n <>\n {':'}\n {type}{' '}\n </>\n ) : (\n ' '\n )}\n = {children}\n {asConst && <> as const</>}\n </>\n )\n}\n\nConst.displayName = 'Const'\n","import { FabricContext, NodeTreeContext, provide, RootContext, useContext, useNodeTree } from '@kubb/fabric-core'\nimport type { FabricReactElement, FabricReactNode } from '../types.ts'\n\nexport type FabricProps<TMeta extends object = object> = {\n /**\n * Metadata associated with the App.\n */\n meta?: TMeta\n /**\n * Children nodes.\n */\n children?: FabricReactNode\n}\n\n/**\n * Fabric container containing the FabricContext carrying `meta` and an `exit` hook.\n */\nexport function Fabric<TMeta extends object = object>({ children, ...props }: FabricProps<TMeta>): FabricReactElement {\n const { meta = {} } = props\n\n const { exit } = useContext(RootContext)\n\n const nodeTree = useNodeTree()\n\n if (nodeTree) {\n const childTree = nodeTree.addChild({ type: 'App', props })\n\n provide(NodeTreeContext, childTree)\n }\n\n provide(FabricContext, { exit, meta })\n\n return <>{children}</>\n}\n\nFabric.displayName = 'Fabric'\n","import { FileContext, NodeTreeContext, provide, useFile, useFileManager, useNodeTree } from '@kubb/fabric-core'\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport type { FabricReactElement, FabricReactNode, Key } from '../types.ts'\n\ntype BasePropsWithBaseName = {\n /**\n * Name to be used to dynamicly create the baseName(based on input.path).\n * Based on UNIX basename\n * @link https://nodejs.org/api/path.html#pathbasenamepath-suffix\n */\n baseName: KubbFile.BaseName\n /**\n * Path will be full qualified path to a specified file.\n */\n path: KubbFile.Path\n}\n\ntype BasePropsWithoutBaseName = {\n baseName?: never\n /**\n * Path will be full qualified path to a specified file.\n */\n path?: KubbFile.Path\n}\n\ntype BaseProps = BasePropsWithBaseName | BasePropsWithoutBaseName\n\ntype Props<TMeta> = BaseProps & {\n key?: Key\n meta?: TMeta\n banner?: string\n footer?: string\n children?: FabricReactNode\n}\n\n/**\n * Adds files to the FileManager\n */\nexport function File<TMeta extends object = object>({ children, ...props }: Props<TMeta>): FabricReactElement {\n const { baseName, path, meta = {}, footer, banner } = props\n\n const fileManager = useFileManager()\n const nodeTree = useNodeTree()\n\n if (nodeTree) {\n const childTree = nodeTree.addChild({ type: 'File', props })\n\n provide(NodeTreeContext, childTree)\n }\n\n if (!baseName || !path) {\n return <>{children}</>\n }\n\n const file: KubbFile.File = {\n baseName,\n path,\n meta,\n banner,\n footer,\n sources: [],\n imports: [],\n exports: [],\n }\n\n const [resolvedFile] = fileManager.add(file)\n provide(FileContext, resolvedFile)\n\n return <kubb-file {...props}>{children}</kubb-file>\n}\n\nFile.displayName = 'File'\n\ntype FileSourceProps = Omit<KubbFile.Source, 'value'> & {\n key?: Key\n children?: FabricReactNode\n}\n\n/**\n * File.Source\n *\n * Marks a block of source text to be associated with the current file when\n * rendering with the FileCollector. Children are treated as the source string.\n */\nfunction FileSource({ children, ...props }: FileSourceProps): FabricReactElement {\n const { name, isExportable, isIndexable, isTypeOnly } = props\n\n const nodeTree = useNodeTree()\n\n if (nodeTree) {\n const childTree = nodeTree.addChild({ type: 'FileSource', props })\n\n provide(NodeTreeContext, childTree)\n }\n\n return (\n <kubb-source name={name} isTypeOnly={isTypeOnly} isExportable={isExportable} isIndexable={isIndexable}>\n {children}\n </kubb-source>\n )\n}\n\nFileSource.displayName = 'FileSource'\n\nexport type FileExportProps = KubbFile.Export & { key?: Key }\n\n/**\n * File.Export\n *\n * Declares an export entry for the current file. This will be collected by\n * the FileCollector for later emission.\n */\nfunction FileExport(props: FileExportProps): FabricReactElement {\n const { name, path, isTypeOnly, asAlias } = props\n\n const nodeTree = useNodeTree()\n const file = useFile()\n\n if (nodeTree) {\n const childTree = nodeTree.addChild({ type: 'FileExport', props })\n\n provide(NodeTreeContext, childTree)\n }\n\n if (file) {\n file.exports.push({\n name,\n path,\n asAlias,\n isTypeOnly,\n })\n }\n\n return <kubb-export name={name} path={path} isTypeOnly={isTypeOnly} asAlias={asAlias} />\n}\n\nFileExport.displayName = 'FileExport'\n\nexport type FileImportProps = KubbFile.Import & { key?: Key }\n\n/**\n * File.Import\n *\n * Declares an import entry for the current file.\n */\nfunction FileImport(props: FileImportProps): FabricReactElement {\n const { name, root, path, isTypeOnly, isNameSpace } = props\n\n const nodeTree = useNodeTree()\n const file = useFile()\n\n if (nodeTree) {\n const childTree = nodeTree.addChild({ type: 'FileImport', props })\n\n provide(NodeTreeContext, childTree)\n }\n\n if (file) {\n file.imports.push({\n name,\n path,\n root,\n isNameSpace,\n isTypeOnly,\n })\n }\n\n return <kubb-import name={name} root={root} path={path} isNameSpace={isNameSpace} isTypeOnly={isTypeOnly} />\n}\n\nFileImport.displayName = 'FileImport'\n\nFile.Export = FileExport\nFile.Import = FileImport\nFile.Source = FileSource\n","import { NodeTreeContext, provide, useNodeTree } from '@kubb/fabric-core'\nimport type { FabricReactElement, FabricReactNode, JSDoc, Key } from '../types.ts'\nimport { createJSDoc } from '../utils/createJSDoc.ts'\n\ntype Props = {\n key?: Key\n /**\n * Name of the function.\n */\n name: string\n /**\n * Add default when export is being used\n */\n default?: boolean\n /**\n * Parameters/options/props that need to be used.\n */\n params?: string\n /**\n * Does this function need to be exported.\n */\n export?: boolean\n /**\n * Does the function has async/promise behavior.\n * This will also add `Promise<returnType>` as the returnType.\n */\n async?: boolean\n /**\n * Generics that needs to be added for TypeScript.\n */\n generics?: string | string[]\n /**\n * ReturnType(see async for adding Promise type).\n */\n returnType?: string\n /**\n * Options for JSdocs.\n */\n JSDoc?: JSDoc\n /**\n * Children nodes.\n */\n children?: FabricReactNode\n}\n\n/**\n * Generates a TypeScript function declaration.\n */\nexport function Function({ children, ...props }: Props): FabricReactElement {\n const { name, default: isDefault, export: canExport, async, generics, params, returnType, JSDoc } = props\n\n const nodeTree = useNodeTree()\n\n if (nodeTree) {\n const childTree = nodeTree.addChild({ type: 'Function', props })\n\n provide(NodeTreeContext, childTree)\n }\n\n return (\n <>\n {JSDoc?.comments && (\n <>\n {createJSDoc({ comments: JSDoc?.comments })}\n <br />\n </>\n )}\n {canExport && <>export </>}\n {isDefault && <>default </>}\n {async && <>async </>}\n function {name}\n {generics && (\n <>\n {'<'}\n {Array.isArray(generics) ? generics.join(', ').trim() : generics}\n {'>'}\n </>\n )}\n ({params}){returnType && !async && <>: {returnType}</>}\n {returnType && async && (\n <>\n : Promise{'<'}\n {returnType}\n {'>'}\n </>\n )}\n {' {'}\n <br />\n <indent />\n {/* Indent component to handle indentation*/}\n {children}\n <br />\n <dedent />\n {/* Indent component to handle indentation*/}\n {'}'}\n </>\n )\n}\n\nFunction.displayName = 'Function'\n\ntype ArrowFunctionProps = Props & {\n /**\n * Create Arrow function in one line\n */\n singleLine?: boolean\n}\n\n/**\n * ArrowFunction\n *\n * Renders an arrow function definition. Supports the same flags as `Function`.\n * Use `singleLine` to render the body as a single-line expression.\n */\nfunction ArrowFunction({ children, ...props }: ArrowFunctionProps) {\n const { name, default: isDefault, export: canExport, async, generics, params, returnType, JSDoc, singleLine } = props\n\n const nodeTree = useNodeTree()\n\n if (nodeTree) {\n const childTree = nodeTree.addChild({ type: 'ArrowFunction', props })\n\n provide(NodeTreeContext, childTree)\n }\n return (\n <>\n {JSDoc?.comments && (\n <>\n {createJSDoc({ comments: JSDoc?.comments })}\n <br />\n </>\n )}\n {canExport && <>export </>}\n {isDefault && <>default </>}\n const {name} = {async && <>async </>}\n {generics && (\n <>\n {'<'}\n {Array.isArray(generics) ? generics.join(', ').trim() : generics}\n {'>'}\n </>\n )}\n ({params}){returnType && !async && <>: {returnType}</>}\n {returnType && async && (\n <>\n : Promise{'<'}\n {returnType}\n {'>'}\n </>\n )}\n {singleLine && (\n <>\n {' => '}\n {children}\n <br />\n </>\n )}\n {!singleLine && (\n <>\n {' => {'}\n <br />\n <indent />\n {/* Indent component to handle indentation*/}\n {children}\n <br />\n <dedent />\n {/* Indent component to handle indentation*/}\n {'}'}\n <br />\n </>\n )}\n </>\n )\n}\n\nArrowFunction.displayName = 'ArrowFunction'\nFunction.Arrow = ArrowFunction\n","import { NodeTreeContext, provide, useNodeTree } from '@kubb/fabric-core'\nimport type { FabricReactElement, FabricReactNode, JSDoc, Key } from '../types.ts'\nimport { createJSDoc } from '../utils/createJSDoc.ts'\n\nexport type TypeProps = {\n key?: Key\n /**\n * Name of the type, this needs to start with a capital letter.\n */\n name: string\n /**\n * Does this type need to be exported.\n */\n export?: boolean\n /**\n * Options for JSdocs.\n */\n JSDoc?: JSDoc\n /**\n * Children nodes.\n */\n children?: FabricReactNode\n}\n\n/**\n * Generates a TypeScript type declaration.\n */\nexport function Type({ children, ...props }: TypeProps): FabricReactElement {\n const { name, export: canExport, JSDoc } = props\n\n const nodeTree = useNodeTree()\n\n if (nodeTree) {\n const childTree = nodeTree.addChild({ type: 'Type', props })\n\n provide(NodeTreeContext, childTree)\n }\n\n if (name.charAt(0).toUpperCase() !== name.charAt(0)) {\n throw new Error('Name should start with a capital letter(see TypeScript types)')\n }\n\n return (\n <>\n {JSDoc?.comments && (\n <>\n {createJSDoc({ comments: JSDoc?.comments })}\n <br />\n </>\n )}\n {canExport && <>export </>}\n type {name} = {children}\n </>\n )\n}\n\nType.displayName = 'Type'\n","import { spawn } from 'node:child_process'\nimport { onProcessExit } from '@kubb/fabric-core'\nimport ws from 'ws'\nimport { Renderer } from './Renderer.ts'\n\ndeclare global {\n var WebSocket: typeof WebSocket\n var self: any\n var window: any\n var isDevtoolsEnabled: any\n}\n\nlet isOpen = false\n\nexport function openDevtools() {\n if (isOpen) {\n return undefined\n }\n // Set up global polyfills BEFORE importing react-devtools-core\n // This is required because react-devtools-core expects these to be available\n const customGlobal = global as any\n customGlobal.WebSocket ||= ws\n customGlobal.window ||= global\n customGlobal.self ||= global\n customGlobal.isDevtoolsEnabled = true\n\n // Filter out Kubb internal components from devtools for a cleaner view.\n // See https://github.com/facebook/react/blob/edf6eac8a181860fd8a2d076a43806f1237495a1/packages/react-devtools-shared/src/types.js#L24\n customGlobal.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ = [\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'Context.Provider',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'Root',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'ErrorBoundary',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'kubb-file',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'kubb-text',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'kubb-import',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'kubb-export',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'kubb-source',\n isEnabled: true,\n isValid: true,\n },\n ]\n\n // biome-ignore lint/suspicious/noTsIgnore: cannot find types\n // @ts-ignore\n import('react-devtools-core').then(async (devtools) => {\n console.info('Opening devtools')\n const controller = new AbortController()\n if (!isOpen) {\n const child = spawn('npx', ['react-devtools@6.1.5'], {\n signal: controller.signal,\n stdio: 'pipe',\n detached: true,\n })\n child.unref()\n }\n\n isOpen = true\n\n // Destructure the functions from the module\n const { initialize, connectToDevTools } = devtools?.default || devtools\n\n // Initialize DevTools BEFORE importing Renderer (which imports React)\n initialize()\n console.info('Initializing devtools')\n\n // Inject the renderer BEFORE connecting to DevTools\n // This ensures DevTools can properly discover the custom renderer\n Renderer.injectIntoDevTools({\n bundleType: 1,\n version: '19.2.3',\n rendererPackageName: 'kubb',\n // findFiberByHostInstance is required for DevTools to map elements to fibers\n findFiberByHostInstance: () => null,\n })\n\n console.info('Connecting devtools')\n\n try {\n connectToDevTools({\n host: 'localhost',\n port: 8097,\n useHttps: false,\n isAppActive: () => true,\n })\n } catch (e) {\n console.error(e)\n console.info('Error when connecting the devtools')\n }\n\n onProcessExit(() => {\n console.info('Disconnecting devtools')\n controller.abort()\n })\n })\n}\n","import { createFabric } from '@kubb/fabric-core'\nimport type { Fabric, FabricConfig, FabricMode } from '@kubb/fabric-core/types'\nimport { openDevtools } from './devtools.ts'\nimport type { Options } from './plugins/reactPlugin.ts'\nimport { reactPlugin } from './plugins/reactPlugin.ts'\n\nexport function createReactFabric(\n config: FabricConfig<Options & { mode?: FabricMode; devtools?: boolean }> = {},\n): Fabric<Options & { mode?: FabricMode; devtools?: boolean }> {\n if (config.devtools) {\n openDevtools()\n }\n\n const fabric = createFabric({ mode: config.mode })\n\n fabric.use(reactPlugin, {\n stdout: config.stdout,\n stderr: config.stderr,\n debug: config.debug,\n stdin: config.stdin,\n })\n\n return fabric\n}\n","import { sortBy } from 'remeda'\n\nexport type Param = {\n /**\n * `object` will return the pathParams as an object.\n *\n * `inline` will return the pathParams as comma separated params.\n * @default `'inline'`\n * @private\n */\n mode?: 'object' | 'inline' | 'inlineSpread'\n type?: 'string' | 'number' | (string & {})\n optional?: boolean\n /**\n * @example test = \"default\"\n */\n default?: string\n /**\n * Used for no TypeScript(with mode object)\n * @example test: \"default\"\n */\n value?: string\n children?: Params\n}\n\ntype ParamItem =\n | (Pick<Param, 'mode' | 'type' | 'value'> & {\n optional?: true\n default?: never\n children?: Params\n })\n | (Pick<Param, 'mode' | 'type' | 'value'> & {\n optional?: false\n default?: string\n children?: Params\n })\n\nexport type Params = Record<string, Param | undefined>\n\ntype Options = {\n type: 'constructor' | 'call' | 'object' | 'objectValue'\n transformName?: (name: string) => string\n transformType?: (type: string) => string\n}\n\nfunction order(items: Array<[key: string, item?: ParamItem]>) {\n return sortBy(items.filter(Boolean) as Array<[key: string, item?: ParamItem]>, ([_key, item]) => {\n if (item?.children) {\n return 0 // Treat items with children as required (they'll get = {} if all children are optional)\n }\n // Priority order: required (0) → optional (1) → default-only (2)\n if (item?.optional) {\n return 1 // Optional parameters (with or without default)\n }\n if (item?.default) {\n // Parameters with default only (not marked as optional)\n // Note: While the ParamItem type suggests optional and default are mutually exclusive,\n // this handles the case where a parameter has a default value but isn't explicitly marked as optional\n return 2\n }\n return 0 // Required parameters\n })\n}\n\nfunction parseChild(key: string, item: ParamItem, options: Options): string | null {\n // @ts-expect-error\n const entries = order(Object.entries(item.children))\n\n const types: string[] = []\n const names: string[] = []\n\n const optional = entries.every(([_key, item]) => item?.optional || !!item?.default)\n\n entries.forEach(([key, entryItem]) => {\n if (entryItem) {\n const name = parseItem(key, { ...entryItem, type: undefined }, options)\n if (entryItem.children) {\n const subTypes = Object.entries(entryItem.children)\n .map(([key]) => {\n return key\n })\n .join(', ')\n\n if (subTypes) {\n names.push(`${name}: { ${subTypes} }`)\n } else {\n names.push(name)\n }\n } else {\n if (options.type === 'call' && options.transformName) {\n names.push(`${key}: ${name}`)\n } else {\n names.push(name)\n }\n }\n\n if (entries.some(([_key, item]) => item?.type)) {\n types.push(parseItem(key, { ...entryItem, default: undefined }, options))\n }\n }\n })\n\n const name = item.mode === 'inline' ? key : names.length ? `{ ${names.join(', ')} }` : undefined\n const type = item.type ? item.type : types.length ? `{ ${types.join('; ')} }` : undefined\n\n if (!name) {\n return null\n }\n\n return parseItem(\n name,\n {\n type,\n default: item.default,\n optional: !item.default ? optional : undefined,\n } as ParamItem,\n options,\n )\n}\n\nfunction parseItem(name: string, item: ParamItem, options: Options): string {\n const acc: string[] = []\n const transformedName = options.transformName ? options.transformName(name) : name\n const transformedType = options.transformType && item.type ? options.transformType(item.type) : item.type\n\n if (options.type === 'object') {\n return transformedName\n }\n\n if (options.type === 'objectValue') {\n return item.value ? `${transformedName}: ${item.value}` : transformedName\n }\n\n //LEGACY\n if (item.type && options.type === 'constructor') {\n if (item.optional) {\n // Check if this is a destructured parameter (object mode)\n const isDestructured = transformedName.startsWith('{')\n if (isDestructured) {\n // For destructured parameters, use \": type = {}\" syntax to make it optional\n acc.push(`${transformedName}: ${transformedType} = {}`)\n } else {\n // For inline parameters, use \"?: type\" syntax\n acc.push(`${transformedName}?: ${transformedType}`)\n }\n } else {\n acc.push(`${transformedName}: ${transformedType}${item.default ? ` = ${item.default}` : ''}`)\n }\n } else if (item.default && options.type === 'constructor') {\n acc.push(`${transformedName} = ${item.default}`)\n } else if (item.value) {\n acc.push(`${transformedName} : ${item.value}`)\n } else if (item.mode === 'inlineSpread') {\n acc.push(`... ${transformedName}`)\n } else {\n acc.push(transformedName)\n }\n\n return acc[0] as string\n}\n\nexport function getFunctionParams(params: Params, options: Options): string {\n const entries = order(Object.entries(params as Record<string, ParamItem | undefined>))\n\n return entries\n .reduce((acc, [key, item]) => {\n if (!item) {\n return acc\n }\n\n if (item.children) {\n if (Object.keys(item.children).length === 0) {\n return acc\n }\n\n if (item.mode === 'inlineSpread') {\n return [...acc, getFunctionParams(item.children, options)]\n }\n\n const parsedItem = parseChild(key, item, options)\n if (!parsedItem) {\n return acc\n }\n\n return [...acc, parsedItem]\n }\n\n const parsedItem = parseItem(key, item, options)\n\n return [...acc, parsedItem]\n }, [] as string[])\n .join(', ')\n}\n\nexport function createFunctionParams(params: Params): Params {\n return params\n}\n// TODO use of zod\n//TODO use of string as `$name: $type` to create templates for functions instead of call/constructor\nexport class FunctionParams {\n #params: Params\n\n static factory(params: Params) {\n return new FunctionParams(params)\n }\n constructor(params: Params) {\n this.#params = params\n }\n\n get params(): Params {\n return this.#params\n }\n\n get flatParams(): Params {\n const flatter = (acc: Params, [key, item]: [key: string, item?: Param]): Params => {\n if (item?.children) {\n return Object.entries(item.children).reduce(flatter, acc)\n }\n if (item) {\n acc[key] = item\n }\n\n return acc\n }\n return Object.entries(this.#params).reduce(flatter, {} as Params)\n }\n\n toCall({ transformName, transformType }: Pick<Options, 'transformName' | 'transformType'> = {}): string {\n return getFunctionParams(this.#params, { type: 'call', transformName, transformType })\n }\n\n toObject(): string {\n return getFunctionParams(this.#params, { type: 'object' })\n }\n toObjectValue(): string {\n return getFunctionParams(this.#params, { type: 'objectValue' })\n }\n\n toConstructor(): string {\n return getFunctionParams(this.#params, { type: 'constructor' })\n }\n}\n","// import './globals.ts'\nimport * as React from 'react'\n\n// expose fabric core helpers\nexport { createContext, createFabric, createFile, FileManager, FileProcessor, TreeNode, useContext } from '@kubb/fabric-core'\n\n// react helpers\nexport const useState = React.useState\nexport const useEffect = React.useEffect\nexport const useReducer = React.useReducer\nexport const useRef = React.useRef\n\nexport { Const } from './components/Const.tsx'\nexport { Fabric } from './components/Fabric.tsx'\nexport { File } from './components/File.tsx'\nexport { Function } from './components/Function.tsx'\n// components\nexport { Root } from './components/Root.tsx'\nexport { Type } from './components/Type.tsx'\n\n// composables\nexport { useFabric } from './composables/useFabric.ts'\nexport { useFile } from './composables/useFile.ts'\nexport { useLifecycle } from './composables/useLifecycle.tsx'\n\n// factories\nexport { createReactFabric } from './createReactFabric.ts'\nexport { openDevtools } from './devtools.ts'\nexport { Runtime } from './Runtime.tsx'\n// utils\nexport { createFunctionParams, FunctionParams } from './utils/getFunctionParams.ts'\n"],"mappings":";;;;;;;;;;;;;;;ACmCA,SAAgB,MAAM,EAAE,UAAU,GAAG,SAAyC;CAC5E,MAAM,EAAE,MAAM,QAAQ,WAAW,MAAM,OAAO,YAAY;CAE1D,MAAM,WAAW,aAAa;AAE9B,KAAI,SAGF,SAAQ,iBAFU,SAAS,SAAS;EAAE,MAAM;EAAS;EAAO,CAAC,CAE1B;AAGrC,QACE,qBAAA,UAAA,EAAA,UAAA;EACG,OAAO,YACN,qBAAA,UAAA,EAAA,UAAA,CACG,YAAY,EAAE,UAAU,OAAO,UAAU,CAAC,EAC3C,oBAAC,MAAD,EAAM,CAAA,CACL,EAAA,CAAA;EAEJ,aAAa,oBAAA,UAAA,EAAA,UAAE,WAAU,CAAA;EAAC;EACpB;EACN,OACC,qBAAA,UAAA,EAAA,UAAA;GACG;GACA;GAAM;GACN,EAAA,CAAA,GAEH;EACA;EACC;EACF,WAAW,oBAAA,UAAA,EAAA,UAAE,aAAY,CAAA;EACzB,EAAA,CAAA;;AAIP,MAAM,cAAc;;;;;;ACrDpB,SAAgB,OAAsC,EAAE,UAAU,GAAG,SAAiD;CACpH,MAAM,EAAE,OAAO,EAAE,KAAK;CAEtB,MAAM,EA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AkB,MAAA,QAAc,EAAE,MAAM,eAAe,CAAC;;;;;ACxOnE,MAAa,WAAA,aAAiB;AAC9B,MAAa,YAAA,aAAkB;AAC/B,MAAa,aAAA,aAAmB;AAChC,MAAa,SAAA,aAAe"}
|
package/dist/jsx-dev-runtime.cjs
CHANGED
|
@@ -1,232 +1,11 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
//#region ../../node_modules/.pnpm/react@19.2.3/node_modules/react/cjs/react-jsx-dev-runtime.production.js
|
|
5
|
-
/**
|
|
6
|
-
* @license React
|
|
7
|
-
* react-jsx-dev-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_dev_runtime_production = /* @__PURE__ */ require_react$1.__commonJSMin(((exports) => {
|
|
15
|
-
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
16
|
-
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
17
|
-
exports.jsxDEV = void 0;
|
|
18
|
-
}));
|
|
19
|
-
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region ../../node_modules/.pnpm/react@19.2.3/node_modules/react/cjs/react-jsx-dev-runtime.development.js
|
|
22
|
-
/**
|
|
23
|
-
* @license React
|
|
24
|
-
* react-jsx-dev-runtime.development.js
|
|
25
|
-
*
|
|
26
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
27
|
-
*
|
|
28
|
-
* This source code is licensed under the MIT license found in the
|
|
29
|
-
* LICENSE file in the root directory of this source tree.
|
|
30
|
-
*/
|
|
31
|
-
var require_react_jsx_dev_runtime_development = /* @__PURE__ */ require_react$1.__commonJSMin(((exports) => {
|
|
32
|
-
"production" !== process.env.NODE_ENV && (function() {
|
|
33
|
-
function getComponentNameFromType(type) {
|
|
34
|
-
if (null == type) return null;
|
|
35
|
-
if ("function" === typeof type) return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
|
|
36
|
-
if ("string" === typeof type) return type;
|
|
37
|
-
switch (type) {
|
|
38
|
-
case REACT_FRAGMENT_TYPE: return "Fragment";
|
|
39
|
-
case REACT_PROFILER_TYPE: return "Profiler";
|
|
40
|
-
case REACT_STRICT_MODE_TYPE: return "StrictMode";
|
|
41
|
-
case REACT_SUSPENSE_TYPE: return "Suspense";
|
|
42
|
-
case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList";
|
|
43
|
-
case REACT_ACTIVITY_TYPE: return "Activity";
|
|
44
|
-
}
|
|
45
|
-
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) {
|
|
46
|
-
case REACT_PORTAL_TYPE: return "Portal";
|
|
47
|
-
case REACT_CONTEXT_TYPE: return type.displayName || "Context";
|
|
48
|
-
case REACT_CONSUMER_TYPE: return (type._context.displayName || "Context") + ".Consumer";
|
|
49
|
-
case REACT_FORWARD_REF_TYPE:
|
|
50
|
-
var innerType = type.render;
|
|
51
|
-
type = type.displayName;
|
|
52
|
-
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
|
|
53
|
-
return type;
|
|
54
|
-
case REACT_MEMO_TYPE: return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
|
|
55
|
-
case REACT_LAZY_TYPE:
|
|
56
|
-
innerType = type._payload;
|
|
57
|
-
type = type._init;
|
|
58
|
-
try {
|
|
59
|
-
return getComponentNameFromType(type(innerType));
|
|
60
|
-
} catch (x) {}
|
|
61
|
-
}
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
function testStringCoercion(value) {
|
|
65
|
-
return "" + value;
|
|
66
|
-
}
|
|
67
|
-
function checkKeyStringCoercion(value) {
|
|
68
|
-
try {
|
|
69
|
-
testStringCoercion(value);
|
|
70
|
-
var JSCompiler_inline_result = !1;
|
|
71
|
-
} catch (e) {
|
|
72
|
-
JSCompiler_inline_result = !0;
|
|
73
|
-
}
|
|
74
|
-
if (JSCompiler_inline_result) {
|
|
75
|
-
JSCompiler_inline_result = console;
|
|
76
|
-
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
77
|
-
var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
78
|
-
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);
|
|
79
|
-
return testStringCoercion(value);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
function getTaskName(type) {
|
|
83
|
-
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
84
|
-
if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE) return "<...>";
|
|
85
|
-
try {
|
|
86
|
-
var name = getComponentNameFromType(type);
|
|
87
|
-
return name ? "<" + name + ">" : "<...>";
|
|
88
|
-
} catch (x) {
|
|
89
|
-
return "<...>";
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
function getOwner() {
|
|
93
|
-
var dispatcher = ReactSharedInternals.A;
|
|
94
|
-
return null === dispatcher ? null : dispatcher.getOwner();
|
|
95
|
-
}
|
|
96
|
-
function UnknownOwner() {
|
|
97
|
-
return Error("react-stack-top-frame");
|
|
98
|
-
}
|
|
99
|
-
function hasValidKey(config) {
|
|
100
|
-
if (hasOwnProperty.call(config, "key")) {
|
|
101
|
-
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
102
|
-
if (getter && getter.isReactWarning) return !1;
|
|
103
|
-
}
|
|
104
|
-
return void 0 !== config.key;
|
|
105
|
-
}
|
|
106
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
107
|
-
function warnAboutAccessingKey() {
|
|
108
|
-
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));
|
|
109
|
-
}
|
|
110
|
-
warnAboutAccessingKey.isReactWarning = !0;
|
|
111
|
-
Object.defineProperty(props, "key", {
|
|
112
|
-
get: warnAboutAccessingKey,
|
|
113
|
-
configurable: !0
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
function elementRefGetterWithDeprecationWarning() {
|
|
117
|
-
var componentName = getComponentNameFromType(this.type);
|
|
118
|
-
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."));
|
|
119
|
-
componentName = this.props.ref;
|
|
120
|
-
return void 0 !== componentName ? componentName : null;
|
|
121
|
-
}
|
|
122
|
-
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
123
|
-
var refProp = props.ref;
|
|
124
|
-
type = {
|
|
125
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
126
|
-
type,
|
|
127
|
-
key,
|
|
128
|
-
props,
|
|
129
|
-
_owner: owner
|
|
130
|
-
};
|
|
131
|
-
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
|
|
132
|
-
enumerable: !1,
|
|
133
|
-
get: elementRefGetterWithDeprecationWarning
|
|
134
|
-
}) : Object.defineProperty(type, "ref", {
|
|
135
|
-
enumerable: !1,
|
|
136
|
-
value: null
|
|
137
|
-
});
|
|
138
|
-
type._store = {};
|
|
139
|
-
Object.defineProperty(type._store, "validated", {
|
|
140
|
-
configurable: !1,
|
|
141
|
-
enumerable: !1,
|
|
142
|
-
writable: !0,
|
|
143
|
-
value: 0
|
|
144
|
-
});
|
|
145
|
-
Object.defineProperty(type, "_debugInfo", {
|
|
146
|
-
configurable: !1,
|
|
147
|
-
enumerable: !1,
|
|
148
|
-
writable: !0,
|
|
149
|
-
value: null
|
|
150
|
-
});
|
|
151
|
-
Object.defineProperty(type, "_debugStack", {
|
|
152
|
-
configurable: !1,
|
|
153
|
-
enumerable: !1,
|
|
154
|
-
writable: !0,
|
|
155
|
-
value: debugStack
|
|
156
|
-
});
|
|
157
|
-
Object.defineProperty(type, "_debugTask", {
|
|
158
|
-
configurable: !1,
|
|
159
|
-
enumerable: !1,
|
|
160
|
-
writable: !0,
|
|
161
|
-
value: debugTask
|
|
162
|
-
});
|
|
163
|
-
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
164
|
-
return type;
|
|
165
|
-
}
|
|
166
|
-
function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
|
|
167
|
-
var children = config.children;
|
|
168
|
-
if (void 0 !== children) if (isStaticChildren) if (isArrayImpl(children)) {
|
|
169
|
-
for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++) validateChildKeys(children[isStaticChildren]);
|
|
170
|
-
Object.freeze && Object.freeze(children);
|
|
171
|
-
} 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.");
|
|
172
|
-
else validateChildKeys(children);
|
|
173
|
-
if (hasOwnProperty.call(config, "key")) {
|
|
174
|
-
children = getComponentNameFromType(type);
|
|
175
|
-
var keys = Object.keys(config).filter(function(k) {
|
|
176
|
-
return "key" !== k;
|
|
177
|
-
});
|
|
178
|
-
isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
179
|
-
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);
|
|
180
|
-
}
|
|
181
|
-
children = null;
|
|
182
|
-
void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
|
|
183
|
-
hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
|
|
184
|
-
if ("key" in config) {
|
|
185
|
-
maybeKey = {};
|
|
186
|
-
for (var propName in config) "key" !== propName && (maybeKey[propName] = config[propName]);
|
|
187
|
-
} else maybeKey = config;
|
|
188
|
-
children && defineKeyPropWarningGetter(maybeKey, "function" === typeof type ? type.displayName || type.name || "Unknown" : type);
|
|
189
|
-
return ReactElement(type, children, maybeKey, getOwner(), debugStack, debugTask);
|
|
190
|
-
}
|
|
191
|
-
function validateChildKeys(node) {
|
|
192
|
-
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));
|
|
193
|
-
}
|
|
194
|
-
function isValidElement(object) {
|
|
195
|
-
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
196
|
-
}
|
|
197
|
-
var React = require_react$1.require_react(), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
|
|
198
|
-
return null;
|
|
199
|
-
};
|
|
200
|
-
React = { react_stack_bottom_frame: function(callStackForError) {
|
|
201
|
-
return callStackForError();
|
|
202
|
-
} };
|
|
203
|
-
var specialPropKeyWarningShown;
|
|
204
|
-
var didWarnAboutElementRef = {};
|
|
205
|
-
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(React, UnknownOwner)();
|
|
206
|
-
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
207
|
-
var didWarnAboutKeySpread = {};
|
|
208
|
-
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
209
|
-
exports.jsxDEV = function(type, config, maybeKey, isStaticChildren) {
|
|
210
|
-
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
211
|
-
return jsxDEVImpl(type, config, maybeKey, isStaticChildren, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
|
|
212
|
-
};
|
|
213
|
-
})();
|
|
214
|
-
}));
|
|
215
|
-
|
|
216
|
-
//#endregion
|
|
217
|
-
//#region ../../node_modules/.pnpm/react@19.2.3/node_modules/react/jsx-dev-runtime.js
|
|
218
|
-
var require_jsx_dev_runtime = /* @__PURE__ */ require_react$1.__commonJSMin(((exports, module) => {
|
|
219
|
-
if (process.env.NODE_ENV === "production") module.exports = require_react_jsx_dev_runtime_production();
|
|
220
|
-
else module.exports = require_react_jsx_dev_runtime_development();
|
|
221
|
-
}));
|
|
222
|
-
|
|
223
|
-
//#endregion
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_jsx_runtime$1 = require("./jsx-runtime-Cua1md-Z.cjs");
|
|
224
3
|
//#region src/jsx-dev-runtime.ts
|
|
225
|
-
var
|
|
226
|
-
const Fragment =
|
|
227
|
-
const jsxDEV =
|
|
228
|
-
|
|
4
|
+
var import_jsx_runtime = /* @__PURE__ */ require_jsx_runtime$1.__toESM(require_jsx_runtime$1.require_jsx_runtime(), 1);
|
|
5
|
+
const Fragment = import_jsx_runtime.Fragment;
|
|
6
|
+
const jsxDEV = import_jsx_runtime.jsx;
|
|
229
7
|
//#endregion
|
|
230
8
|
exports.Fragment = Fragment;
|
|
231
9
|
exports.jsxDEV = jsxDEV;
|
|
10
|
+
|
|
232
11
|
//# sourceMappingURL=jsx-dev-runtime.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsx-dev-runtime.cjs","names":[],"sources":["../../../node_modules/.pnpm/react@19.2.3/node_modules/react/cjs/react-jsx-dev-runtime.production.js","../../../node_modules/.pnpm/react@19.2.3/node_modules/react/cjs/react-jsx-dev-runtime.development.js","../../../node_modules/.pnpm/react@19.2.3/node_modules/react/jsx-dev-runtime.js","../src/jsx-dev-runtime.ts"],"sourcesContent":["/**\n * @license React\n * react-jsx-dev-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsxDEV = void 0;\n","/**\n * @license React\n * react-jsx-dev-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%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)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"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.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n '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} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsxDEV = function (type, config, maybeKey, isStaticChildren) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-dev-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-dev-runtime.development.js');\n}\n","import * as React from 'react/jsx-dev-runtime'\nimport type { FabricReactElement, FabricReactNode } from './types.ts'\n\nexport const Fragment = React.Fragment\nexport const jsxDEV = React.jsxDEV\n\nexport type * from './jsx-namespace.d.ts'\n\nexport type JSXElement = FabricReactElement\nexport type ReactNode = FabricReactNode\n"],"x_google_ignoreList":[0,1,2],"mappings":";;;;;;;;;;;;;;CAWA,IAAI,sBAAsB,OAAO,IAAI,iBAAiB;AACtD,SAAQ,WAAW;AACnB,SAAQ,SAAS,KAAK;;;;;;;;;;;;;;;ACFtB,kBAAiB,QAA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a,EAC1C,kBAAkB,OAAO,IAAI,aAAa,EAC1C,sBAAsB,OAAO,IAAI,iBAAiB,EAClD,yBAAyB,OAAO,IAAI,yBAAyB,EAC7D,uBACE,MAAM,iEACR,iBAAiB,OAAO,UAAU,gBAClC,cAAc,MAAM,SACpB,aAAa,QAAQ,aACjB,QAAQ,aACR,WAAY;AACV,UAAO;;AAEf,UAAQ,EACN,0BAA0B,SAAU,mBAAmB;AACrD,UAAO,mBAAmB;KAE7B;EACD,IAAI;EACJ,IAAI,yBAAyB,EAAE;EAC/B,IAAI,yBAAyB,MAAM,yBAAyB,KAC1D,OACA,aACD,EAAE;EACH,IAAI,wBAAwB,WAAW,YAAY,aAAa,CAAC;EACjE,IAAI,wBAAwB,EAAE;AAC9B,UAAQ,WAAW;AACnB,UAAQ,SAAS,SAAU,MAAM,QAAQ,UAAU,kBAAkB;GACnE,IAAI,mBACF,MAAM,qBAAqB;AAC7B,UAAO,WACL,MACA,QACA,UACA,kBACA,mBACI,MAAM,wBAAwB,GAC9B,wBACJ,mBAAmB,WAAW,YAAY,KAAK,CAAC,GAAG,sBACpD;;KAED;;;;;;AC/UN,KAAI,QAAQ,IAAI,aAAa,aAC3B,QAAO;KAEP,QAAO;;;;;;ACFT,MAAa,kCAAiB;AAC9B,MAAa,gCAAe"}
|
|
1
|
+
{"version":3,"file":"jsx-dev-runtime.cjs","names":[],"sources":["../src/jsx-dev-runtime.ts"],"sourcesContent":["import * as React from 'react/jsx-runtime'\nimport type { FabricReactElement, FabricReactNode } from './types.ts'\n\nexport const Fragment = React.Fragment\nexport const jsxDEV = React.jsx\n\nexport type * from './jsx-namespace.d.ts'\n\nexport type JSXElement = FabricReactElement\nexport type ReactNode = FabricReactNode\n"],"mappings":";;;;AAGA,MAAa,WAAA,mBAAiB;AAC9B,MAAa,SAAA,mBAAe"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { r as __name } from "./chunk-BGCRLu6H.js";
|
|
2
|
+
import { c as FabricReactElement, l as FabricReactNode } from "./types-BJVZ7ita.js";
|
|
3
|
+
import { t as JSX } from "./jsx-namespace-C9N4PA8a.js";
|
|
3
4
|
import * as react from "react";
|
|
4
|
-
import * as React$1 from "react/jsx-
|
|
5
|
+
import * as React$1 from "react/jsx-runtime";
|
|
5
6
|
|
|
6
7
|
//#region src/jsx-dev-runtime.d.ts
|
|
7
8
|
declare const Fragment: react.ExoticComponent<react.FragmentProps>;
|
|
8
|
-
declare const jsxDEV: typeof React$1.
|
|
9
|
+
declare const jsxDEV: typeof React$1.jsx;
|
|
9
10
|
type JSXElement = FabricReactElement;
|
|
10
11
|
type ReactNode = FabricReactNode;
|
|
11
12
|
//#endregion
|