@kubb/react-fabric 0.2.7 → 0.2.9
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/dist/{Fabric-BF1akKIl.d.cts → Fabric-BMvLfKlB.d.cts} +119 -4
- package/dist/{Fabric-E6DCwBtT.d.ts → Fabric-TETpTRcg.d.ts} +121 -3
- package/dist/globals.d.cts +2 -2
- package/dist/globals.d.ts +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -9
- package/dist/index.d.ts +3 -9
- package/dist/index.js +1 -1
- package/dist/jsx-dev-runtime.d.cts +3 -3
- package/dist/jsx-dev-runtime.d.ts +3 -3
- package/dist/{jsx-namespace-ChKpfNjr.d.cts → jsx-namespace-Cpatx8zF.d.cts} +2 -2
- package/dist/{jsx-namespace-K9CSDVFl.d.ts → jsx-namespace-D5ipteo8.d.ts} +2 -2
- package/dist/jsx-runtime.d.cts +3 -3
- package/dist/jsx-runtime.d.ts +3 -3
- package/dist/parsers.d.cts +1 -2
- package/dist/parsers.d.ts +1 -2
- package/dist/{plugins-DY54zqZS.js → plugins-CftsHDZ2.js} +2 -2
- package/dist/plugins-CftsHDZ2.js.map +1 -0
- package/dist/{plugins-Bo68efdW.cjs → plugins-DzBEnan-.cjs} +7 -7
- package/dist/plugins-DzBEnan-.cjs.map +1 -0
- package/dist/plugins.cjs +1 -1
- package/dist/plugins.d.cts +2 -3
- package/dist/plugins.d.ts +2 -3
- package/dist/plugins.js +1 -1
- package/dist/{reactPlugin-B4CbqrDr.d.cts → reactPlugin-BRjwo_IX.d.cts} +2 -2
- package/dist/{reactPlugin-B0NqEe-x.d.ts → reactPlugin-H_LXLEx_.d.ts} +2 -2
- package/dist/{types-B2EZG5-G.d.cts → types-6UYuSzYO.d.ts} +8 -3
- package/dist/{types-UALIyxCE.d.ts → types-CdE_cJBr.d.cts} +8 -3
- package/dist/types.cjs +9 -0
- package/dist/types.d.cts +3 -3
- package/dist/types.d.ts +3 -3
- package/dist/types.js +2 -0
- package/package.json +11 -6
- package/src/Renderer.ts +1 -1
- package/src/Runtime.tsx +1 -1
- package/src/types.ts +2 -0
- package/dist/KubbFile-D4gyyfL-.d.ts +0 -115
- package/dist/KubbFile-FGXV713i.d.cts +0 -115
- package/dist/chunk-BEV-X5tz.js +0 -27
- package/dist/plugins-Bo68efdW.cjs.map +0 -1
- package/dist/plugins-DY54zqZS.js.map +0 -1
|
@@ -1,5 +1,120 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare namespace KubbFile_d_exports {
|
|
2
|
+
export { AdvancedPath, BaseName, Export, Extname, File, Import, Mode, OptionalPath, Path, ResolvedExport, ResolvedFile, ResolvedImport, Source };
|
|
3
|
+
}
|
|
4
|
+
type BasePath<T extends string = string> = `${T}/`;
|
|
5
|
+
type Import = {
|
|
6
|
+
/**
|
|
7
|
+
* Import name to be used
|
|
8
|
+
* @example ["useState"]
|
|
9
|
+
* @example "React"
|
|
10
|
+
*/
|
|
11
|
+
name: string | Array<string | {
|
|
12
|
+
propertyName: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
}>;
|
|
15
|
+
/**
|
|
16
|
+
* Path for the import
|
|
17
|
+
* @example '@kubb/core'
|
|
18
|
+
*/
|
|
19
|
+
path: string;
|
|
20
|
+
/**
|
|
21
|
+
* Add `type` prefix to the import, this will result in: `import type { Type } from './path'`.
|
|
22
|
+
*/
|
|
23
|
+
isTypeOnly?: boolean;
|
|
24
|
+
isNameSpace?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* When root is set it will get the path with relative getRelativePath(root, path).
|
|
27
|
+
*/
|
|
28
|
+
root?: string;
|
|
29
|
+
};
|
|
30
|
+
type Source = {
|
|
31
|
+
name?: string;
|
|
32
|
+
value?: string;
|
|
33
|
+
isTypeOnly?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Has const or type 'export'
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
isExportable?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* When set, barrel generation will add this
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
isIndexable?: boolean;
|
|
44
|
+
};
|
|
45
|
+
type Export = {
|
|
46
|
+
/**
|
|
47
|
+
* Export name to be used.
|
|
48
|
+
* @example ["useState"]
|
|
49
|
+
* @example "React"
|
|
50
|
+
*/
|
|
51
|
+
name?: string | Array<string>;
|
|
52
|
+
/**
|
|
53
|
+
* Path for the import.
|
|
54
|
+
* @example '@kubb/core'
|
|
55
|
+
*/
|
|
56
|
+
path: string;
|
|
57
|
+
/**
|
|
58
|
+
* Add `type` prefix to the export, this will result in: `export type { Type } from './path'`.
|
|
59
|
+
*/
|
|
60
|
+
isTypeOnly?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Make it possible to override the name, this will result in: `export * as aliasName from './path'`.
|
|
63
|
+
*/
|
|
64
|
+
asAlias?: boolean;
|
|
65
|
+
};
|
|
66
|
+
type Extname = '.ts' | '.js' | '.tsx' | '.json' | `.${string}`;
|
|
67
|
+
type Mode = 'single' | 'split';
|
|
68
|
+
/**
|
|
69
|
+
* Name to be used to dynamicly create the baseName(based on input.path)
|
|
70
|
+
* Based on UNIX basename
|
|
71
|
+
* @link https://nodejs.org/api/path.html#pathbasenamepath-suffix
|
|
72
|
+
*/
|
|
73
|
+
type BaseName = `${string}.${string}`;
|
|
74
|
+
/**
|
|
75
|
+
* Path will be full qualified path to a specified file
|
|
76
|
+
*/
|
|
77
|
+
type Path = string;
|
|
78
|
+
type AdvancedPath<T extends BaseName = BaseName> = `${BasePath}${T}`;
|
|
79
|
+
type OptionalPath = Path | undefined | null;
|
|
80
|
+
type File<TMeta extends object = object> = {
|
|
81
|
+
/**
|
|
82
|
+
* Name to be used to create the path
|
|
83
|
+
* Based on UNIX basename, `${name}.extname`
|
|
84
|
+
* @link https://nodejs.org/api/path.html#pathbasenamepath-suffix
|
|
85
|
+
*/
|
|
86
|
+
baseName: BaseName;
|
|
87
|
+
/**
|
|
88
|
+
* Path will be full qualified path to a specified file
|
|
89
|
+
*/
|
|
90
|
+
path: AdvancedPath<BaseName> | Path;
|
|
91
|
+
sources: Array<Source>;
|
|
92
|
+
imports?: Array<Import>;
|
|
93
|
+
exports?: Array<Export>;
|
|
94
|
+
/**
|
|
95
|
+
* Use extra meta, this is getting used to generate the barrel/index files.
|
|
96
|
+
*/
|
|
97
|
+
meta?: TMeta;
|
|
98
|
+
banner?: string;
|
|
99
|
+
footer?: string;
|
|
100
|
+
};
|
|
101
|
+
type ResolvedImport = Import;
|
|
102
|
+
type ResolvedExport = Export;
|
|
103
|
+
type ResolvedFile<TMeta extends object = object> = File<TMeta> & {
|
|
104
|
+
/**
|
|
105
|
+
* @default hash
|
|
106
|
+
*/
|
|
107
|
+
id: string;
|
|
108
|
+
/**
|
|
109
|
+
* Contains the first part of the baseName, generated based on baseName
|
|
110
|
+
* @link https://nodejs.org/api/path.html#pathformatpathobject
|
|
111
|
+
*/
|
|
112
|
+
name: string;
|
|
113
|
+
extname: Extname;
|
|
114
|
+
imports: Array<ResolvedImport>;
|
|
115
|
+
exports: Array<ResolvedExport>;
|
|
116
|
+
};
|
|
117
|
+
//#endregion
|
|
3
118
|
//#region ../fabric-core/src/plugins/types.d.ts
|
|
4
119
|
type Plugin<TOptions = unknown, TAppExtension extends Record<string, any> = {}> = {
|
|
5
120
|
name: string;
|
|
@@ -196,5 +311,5 @@ interface Fabric<TOptions extends FabricOptions = FabricOptions> extends Kubb.Fa
|
|
|
196
311
|
addFile(...files: Array<File>): Promise<void>;
|
|
197
312
|
}
|
|
198
313
|
//#endregion
|
|
199
|
-
export {
|
|
200
|
-
//# sourceMappingURL=Fabric-
|
|
314
|
+
export { Path as _, FileManager as a, UserParser as c, BaseName as d, Export as f, KubbFile_d_exports as g, Import as h, FabricOptions as i, Plugin as l, File as m, FabricContext as n, FileProcessor as o, Extname as p, FabricMode as r, Parser as s, Fabric as t, UserPlugin as u, ResolvedFile as v, Source as y };
|
|
315
|
+
//# sourceMappingURL=Fabric-BMvLfKlB.d.cts.map
|
|
@@ -1,5 +1,123 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
2
|
|
|
3
|
+
//#region rolldown:runtime
|
|
4
|
+
declare namespace KubbFile_d_exports {
|
|
5
|
+
export { AdvancedPath, BaseName, Export, Extname, File, Import, Mode, OptionalPath, Path, ResolvedExport, ResolvedFile, ResolvedImport, Source };
|
|
6
|
+
}
|
|
7
|
+
type BasePath<T extends string = string> = `${T}/`;
|
|
8
|
+
type Import = {
|
|
9
|
+
/**
|
|
10
|
+
* Import name to be used
|
|
11
|
+
* @example ["useState"]
|
|
12
|
+
* @example "React"
|
|
13
|
+
*/
|
|
14
|
+
name: string | Array<string | {
|
|
15
|
+
propertyName: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
}>;
|
|
18
|
+
/**
|
|
19
|
+
* Path for the import
|
|
20
|
+
* @example '@kubb/core'
|
|
21
|
+
*/
|
|
22
|
+
path: string;
|
|
23
|
+
/**
|
|
24
|
+
* Add `type` prefix to the import, this will result in: `import type { Type } from './path'`.
|
|
25
|
+
*/
|
|
26
|
+
isTypeOnly?: boolean;
|
|
27
|
+
isNameSpace?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* When root is set it will get the path with relative getRelativePath(root, path).
|
|
30
|
+
*/
|
|
31
|
+
root?: string;
|
|
32
|
+
};
|
|
33
|
+
type Source = {
|
|
34
|
+
name?: string;
|
|
35
|
+
value?: string;
|
|
36
|
+
isTypeOnly?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Has const or type 'export'
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
isExportable?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* When set, barrel generation will add this
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
isIndexable?: boolean;
|
|
47
|
+
};
|
|
48
|
+
type Export = {
|
|
49
|
+
/**
|
|
50
|
+
* Export name to be used.
|
|
51
|
+
* @example ["useState"]
|
|
52
|
+
* @example "React"
|
|
53
|
+
*/
|
|
54
|
+
name?: string | Array<string>;
|
|
55
|
+
/**
|
|
56
|
+
* Path for the import.
|
|
57
|
+
* @example '@kubb/core'
|
|
58
|
+
*/
|
|
59
|
+
path: string;
|
|
60
|
+
/**
|
|
61
|
+
* Add `type` prefix to the export, this will result in: `export type { Type } from './path'`.
|
|
62
|
+
*/
|
|
63
|
+
isTypeOnly?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Make it possible to override the name, this will result in: `export * as aliasName from './path'`.
|
|
66
|
+
*/
|
|
67
|
+
asAlias?: boolean;
|
|
68
|
+
};
|
|
69
|
+
type Extname = '.ts' | '.js' | '.tsx' | '.json' | `.${string}`;
|
|
70
|
+
type Mode = 'single' | 'split';
|
|
71
|
+
/**
|
|
72
|
+
* Name to be used to dynamicly create the baseName(based on input.path)
|
|
73
|
+
* Based on UNIX basename
|
|
74
|
+
* @link https://nodejs.org/api/path.html#pathbasenamepath-suffix
|
|
75
|
+
*/
|
|
76
|
+
type BaseName = `${string}.${string}`;
|
|
77
|
+
/**
|
|
78
|
+
* Path will be full qualified path to a specified file
|
|
79
|
+
*/
|
|
80
|
+
type Path = string;
|
|
81
|
+
type AdvancedPath<T extends BaseName = BaseName> = `${BasePath}${T}`;
|
|
82
|
+
type OptionalPath = Path | undefined | null;
|
|
83
|
+
type File<TMeta extends object = object> = {
|
|
84
|
+
/**
|
|
85
|
+
* Name to be used to create the path
|
|
86
|
+
* Based on UNIX basename, `${name}.extname`
|
|
87
|
+
* @link https://nodejs.org/api/path.html#pathbasenamepath-suffix
|
|
88
|
+
*/
|
|
89
|
+
baseName: BaseName;
|
|
90
|
+
/**
|
|
91
|
+
* Path will be full qualified path to a specified file
|
|
92
|
+
*/
|
|
93
|
+
path: AdvancedPath<BaseName> | Path;
|
|
94
|
+
sources: Array<Source>;
|
|
95
|
+
imports?: Array<Import>;
|
|
96
|
+
exports?: Array<Export>;
|
|
97
|
+
/**
|
|
98
|
+
* Use extra meta, this is getting used to generate the barrel/index files.
|
|
99
|
+
*/
|
|
100
|
+
meta?: TMeta;
|
|
101
|
+
banner?: string;
|
|
102
|
+
footer?: string;
|
|
103
|
+
};
|
|
104
|
+
type ResolvedImport = Import;
|
|
105
|
+
type ResolvedExport = Export;
|
|
106
|
+
type ResolvedFile<TMeta extends object = object> = File<TMeta> & {
|
|
107
|
+
/**
|
|
108
|
+
* @default hash
|
|
109
|
+
*/
|
|
110
|
+
id: string;
|
|
111
|
+
/**
|
|
112
|
+
* Contains the first part of the baseName, generated based on baseName
|
|
113
|
+
* @link https://nodejs.org/api/path.html#pathformatpathobject
|
|
114
|
+
*/
|
|
115
|
+
name: string;
|
|
116
|
+
extname: Extname;
|
|
117
|
+
imports: Array<ResolvedImport>;
|
|
118
|
+
exports: Array<ResolvedExport>;
|
|
119
|
+
};
|
|
120
|
+
//#endregion
|
|
3
121
|
//#region ../fabric-core/src/plugins/types.d.ts
|
|
4
122
|
type Plugin<TOptions = unknown, TAppExtension extends Record<string, any> = {}> = {
|
|
5
123
|
name: string;
|
|
@@ -196,5 +314,5 @@ interface Fabric<TOptions extends FabricOptions = FabricOptions> extends Kubb.Fa
|
|
|
196
314
|
addFile(...files: Array<File>): Promise<void>;
|
|
197
315
|
}
|
|
198
316
|
//#endregion
|
|
199
|
-
export {
|
|
200
|
-
//# sourceMappingURL=Fabric-
|
|
317
|
+
export { Path as _, FileManager as a, UserParser as c, BaseName as d, Export as f, KubbFile_d_exports as g, Import as h, FabricOptions as i, Plugin as l, File as m, FabricContext as n, FileProcessor as o, Extname as p, FabricMode as r, Parser as s, Fabric as t, UserPlugin as u, ResolvedFile as v, Source as y };
|
|
318
|
+
//# sourceMappingURL=Fabric-TETpTRcg.d.ts.map
|
package/dist/globals.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { c as KubbExportProps, d as KubbNode, f as KubbSourceProps, l as KubbFileProps, m as LineBreakProps, p as KubbTextProps, s as KubbElement, u as KubbImportProps } from "./types-
|
|
1
|
+
import "./Fabric-BMvLfKlB.cjs";
|
|
2
|
+
import { c as KubbExportProps, d as KubbNode, f as KubbSourceProps, l as KubbFileProps, m as LineBreakProps, p as KubbTextProps, s as KubbElement, u as KubbImportProps } from "./types-CdE_cJBr.cjs";
|
|
3
3
|
import React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/globals.d.ts
|
package/dist/globals.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { c as KubbExportProps, d as KubbNode, f as KubbSourceProps, l as KubbFileProps, m as LineBreakProps, p as KubbTextProps, s as KubbElement, u as KubbImportProps } from "./types-
|
|
1
|
+
import "./Fabric-TETpTRcg.js";
|
|
2
|
+
import { c as KubbExportProps, d as KubbNode, f as KubbSourceProps, l as KubbFileProps, m as LineBreakProps, p as KubbTextProps, s as KubbElement, u as KubbImportProps } from "./types-6UYuSzYO.js";
|
|
3
3
|
import React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/globals.d.ts
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_plugins = require('./plugins-
|
|
2
|
+
const require_plugins = require('./plugins-DzBEnan-.cjs');
|
|
3
3
|
require('./jsx-runtime-CpPZNgzW.cjs');
|
|
4
4
|
const require_devtools = require('./devtools-D4p2T_2t.cjs');
|
|
5
5
|
let react = require("react");
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import { t as Options$1 } from "./reactPlugin-B4CbqrDr.cjs";
|
|
1
|
+
import { _ as Path, a as FileManager, d as BaseName, f as Export, h as Import, i as FabricOptions, m as File$1, o as FileProcessor, r as FabricMode, t as Fabric, v as ResolvedFile, y as Source } from "./Fabric-BMvLfKlB.cjs";
|
|
2
|
+
import { a as JSDoc, b as DefineFabric, d as KubbNode, g as FunctionParams, o as Key, x as defineFabric, y as createFunctionParams } from "./types-CdE_cJBr.cjs";
|
|
3
|
+
import { t as Options$1 } from "./reactPlugin-BRjwo_IX.cjs";
|
|
5
4
|
import * as react0 from "react";
|
|
6
5
|
import React, { ReactNode, createContext, createElement, use, useContext, useEffect, useReducer, useRef, useState } from "react";
|
|
7
6
|
|
|
@@ -14,11 +13,6 @@ declare const createFabric: DefineFabric<FabricOptions>;
|
|
|
14
13
|
*/
|
|
15
14
|
declare function createFile<TMeta extends object = object>(file: File$1<TMeta>): ResolvedFile<TMeta>;
|
|
16
15
|
//#endregion
|
|
17
|
-
//#region ../fabric-core/src/defineFabric.d.ts
|
|
18
|
-
type RootRenderFunction<TOptions extends FabricOptions> = (fabric: Fabric<TOptions>) => void | Promise<void>;
|
|
19
|
-
type DefineFabric<TOptions> = (options?: TOptions) => Fabric;
|
|
20
|
-
declare function defineFabric<TOptions extends FabricOptions>(instance?: RootRenderFunction<TOptions>): DefineFabric<TOptions>;
|
|
21
|
-
//#endregion
|
|
22
16
|
//#region src/components/App.d.ts
|
|
23
17
|
type AppContextProps<TMeta = unknown> = {
|
|
24
18
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import { t as Options$1 } from "./reactPlugin-B0NqEe-x.js";
|
|
1
|
+
import { _ as Path, a as FileManager, d as BaseName, f as Export, h as Import, i as FabricOptions, m as File$1, o as FileProcessor, r as FabricMode, t as Fabric, v as ResolvedFile, y as Source } from "./Fabric-TETpTRcg.js";
|
|
2
|
+
import { a as JSDoc, b as DefineFabric, d as KubbNode, g as FunctionParams, o as Key, x as defineFabric, y as createFunctionParams } from "./types-6UYuSzYO.js";
|
|
3
|
+
import { t as Options$1 } from "./reactPlugin-H_LXLEx_.js";
|
|
5
4
|
import * as react0 from "react";
|
|
6
5
|
import React, { ReactNode, createContext, createElement, use, useContext, useEffect, useReducer, useRef, useState } from "react";
|
|
7
6
|
|
|
@@ -14,11 +13,6 @@ declare const createFabric: DefineFabric<FabricOptions>;
|
|
|
14
13
|
*/
|
|
15
14
|
declare function createFile<TMeta extends object = object>(file: File$1<TMeta>): ResolvedFile<TMeta>;
|
|
16
15
|
//#endregion
|
|
17
|
-
//#region ../fabric-core/src/defineFabric.d.ts
|
|
18
|
-
type RootRenderFunction<TOptions extends FabricOptions> = (fabric: Fabric<TOptions>) => void | Promise<void>;
|
|
19
|
-
type DefineFabric<TOptions> = (options?: TOptions) => Fabric;
|
|
20
|
-
declare function defineFabric<TOptions extends FabricOptions>(instance?: RootRenderFunction<TOptions>): DefineFabric<TOptions>;
|
|
21
|
-
//#endregion
|
|
22
16
|
//#region src/components/App.d.ts
|
|
23
17
|
type AppContextProps<TMeta = unknown> = {
|
|
24
18
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as _classPrivateFieldInitSpec, i as _classPrivateFieldGet2, n as Runtime, o as Root, r as _classPrivateFieldSet2, s as RootContext, t as reactPlugin } from "./plugins-
|
|
1
|
+
import { a as _classPrivateFieldInitSpec, i as _classPrivateFieldGet2, n as Runtime, o as Root, r as _classPrivateFieldSet2, s as RootContext, t as reactPlugin } from "./plugins-CftsHDZ2.js";
|
|
2
2
|
import { i as jsxs, n as jsx, t as Fragment } from "./jsx-runtime-CVfJARUD.js";
|
|
3
3
|
import { t as open } from "./devtools-Cb1pMQYm.js";
|
|
4
4
|
import React, { createContext, createContext as createContext$1, createElement, use, useContext, useContext as useContext$1, useEffect, useReducer, useRef, useState } from "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { d as KubbNode, s as KubbElement } from "./types-
|
|
3
|
-
import { t as JSX } from "./jsx-namespace-
|
|
1
|
+
import "./Fabric-BMvLfKlB.cjs";
|
|
2
|
+
import { d as KubbNode, s as KubbElement } from "./types-CdE_cJBr.cjs";
|
|
3
|
+
import { t as JSX } from "./jsx-namespace-Cpatx8zF.cjs";
|
|
4
4
|
import { Fragment, jsxDEV } from "react/jsx-dev-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/jsx-dev-runtime.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { d as KubbNode, s as KubbElement } from "./types-
|
|
3
|
-
import { t as JSX } from "./jsx-namespace-
|
|
1
|
+
import "./Fabric-TETpTRcg.js";
|
|
2
|
+
import { d as KubbNode, s as KubbElement } from "./types-6UYuSzYO.js";
|
|
3
|
+
import { t as JSX } from "./jsx-namespace-D5ipteo8.js";
|
|
4
4
|
import { Fragment, jsxDEV } from "react/jsx-dev-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/jsx-dev-runtime.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as KubbExportProps, d as KubbNode, f as KubbSourceProps, l as KubbFileProps, m as LineBreakProps, p as KubbTextProps, s as KubbElement, u as KubbImportProps } from "./types-
|
|
1
|
+
import { c as KubbExportProps, d as KubbNode, f as KubbSourceProps, l as KubbFileProps, m as LineBreakProps, p as KubbTextProps, s as KubbElement, u as KubbImportProps } from "./types-CdE_cJBr.cjs";
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/jsx-namespace.d.ts
|
|
@@ -28,4 +28,4 @@ declare namespace JSX$1 {
|
|
|
28
28
|
}
|
|
29
29
|
//#endregion
|
|
30
30
|
export { JSX$1 as t };
|
|
31
|
-
//# sourceMappingURL=jsx-namespace-
|
|
31
|
+
//# sourceMappingURL=jsx-namespace-Cpatx8zF.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as KubbExportProps, d as KubbNode, f as KubbSourceProps, l as KubbFileProps, m as LineBreakProps, p as KubbTextProps, s as KubbElement, u as KubbImportProps } from "./types-
|
|
1
|
+
import { c as KubbExportProps, d as KubbNode, f as KubbSourceProps, l as KubbFileProps, m as LineBreakProps, p as KubbTextProps, s as KubbElement, u as KubbImportProps } from "./types-6UYuSzYO.js";
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/jsx-namespace.d.ts
|
|
@@ -28,4 +28,4 @@ declare namespace JSX$1 {
|
|
|
28
28
|
}
|
|
29
29
|
//#endregion
|
|
30
30
|
export { JSX$1 as t };
|
|
31
|
-
//# sourceMappingURL=jsx-namespace-
|
|
31
|
+
//# sourceMappingURL=jsx-namespace-D5ipteo8.d.ts.map
|
package/dist/jsx-runtime.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { d as KubbNode, s as KubbElement } from "./types-
|
|
3
|
-
import { t as JSX } from "./jsx-namespace-
|
|
1
|
+
import "./Fabric-BMvLfKlB.cjs";
|
|
2
|
+
import { d as KubbNode, s as KubbElement } from "./types-CdE_cJBr.cjs";
|
|
3
|
+
import { t as JSX } from "./jsx-namespace-Cpatx8zF.cjs";
|
|
4
4
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
|
package/dist/jsx-runtime.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { d as KubbNode, s as KubbElement } from "./types-
|
|
3
|
-
import { t as JSX } from "./jsx-namespace-
|
|
1
|
+
import "./Fabric-TETpTRcg.js";
|
|
2
|
+
import { d as KubbNode, s as KubbElement } from "./types-6UYuSzYO.js";
|
|
3
|
+
import { t as JSX } from "./jsx-namespace-D5ipteo8.js";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
6
6
|
|
package/dist/parsers.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { o as Parser, s as UserParser } from "./Fabric-BF1akKIl.cjs";
|
|
1
|
+
import { c as UserParser, s as Parser } from "./Fabric-BMvLfKlB.cjs";
|
|
3
2
|
|
|
4
3
|
//#region ../fabric-core/src/parsers/createParser.d.ts
|
|
5
4
|
declare function createParser<TOptions = unknown, TMeta extends object = any>(parser: UserParser<TOptions, TMeta>): Parser<TOptions, TMeta>;
|
package/dist/parsers.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { o as Parser, s as UserParser } from "./Fabric-E6DCwBtT.js";
|
|
1
|
+
import { c as UserParser, s as Parser } from "./Fabric-TETpTRcg.js";
|
|
3
2
|
|
|
4
3
|
//#region ../fabric-core/src/parsers/createParser.d.ts
|
|
5
4
|
declare function createParser<TOptions = unknown, TMeta extends object = any>(parser: UserParser<TOptions, TMeta>): Parser<TOptions, TMeta>;
|
|
@@ -2,7 +2,7 @@ import { n as jsx } from "./jsx-runtime-CVfJARUD.js";
|
|
|
2
2
|
import { Component, createContext, createElement } from "react";
|
|
3
3
|
import { createPlugin } from "@kubb/fabric-core/plugins";
|
|
4
4
|
import process from "node:process";
|
|
5
|
-
import { ConcurrentRoot, DefaultEventPriority, NoEventPriority } from "react-reconciler/constants";
|
|
5
|
+
import { ConcurrentRoot, DefaultEventPriority, NoEventPriority } from "react-reconciler/constants.js";
|
|
6
6
|
import { onExit } from "signal-exit";
|
|
7
7
|
import Reconciler from "react-reconciler";
|
|
8
8
|
import { createExport, createImport, print } from "@kubb/fabric-core/parsers/typescript";
|
|
@@ -587,4 +587,4 @@ const reactPlugin = createPlugin({
|
|
|
587
587
|
|
|
588
588
|
//#endregion
|
|
589
589
|
export { _classPrivateFieldInitSpec as a, _classPrivateFieldGet2 as i, Runtime as n, Root as o, _classPrivateFieldSet2 as r, RootContext as s, reactPlugin as t };
|
|
590
|
-
//# sourceMappingURL=plugins-
|
|
590
|
+
//# sourceMappingURL=plugins-CftsHDZ2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins-CftsHDZ2.js","names":["onExit","node: TextNode","nodeNames: Array<ElementNames>","text","file: KubbFile.File"],"sources":["../src/components/Root.tsx","../src/dom.ts","../src/Renderer.ts","../src/utils/squashTextNodes.ts","../src/utils/squashExportNodes.ts","../src/utils/squashImportNodes.ts","../src/utils/squashSourceNodes.ts","../src/utils/processFiles.ts","../src/Runtime.tsx","../src/plugins/reactPlugin.ts"],"sourcesContent":["import { Component, createContext } from 'react'\n\nimport type { KubbNode } from '../types.ts'\n\ntype ErrorBoundaryProps = {\n onError: (error: Error) => void\n children?: KubbNode\n}\n\nclass ErrorBoundary extends Component<{\n onError: ErrorBoundaryProps['onError']\n children?: KubbNode\n}> {\n state = { hasError: false }\n\n static displayName = 'KubbErrorBoundary'\n static getDerivedStateFromError(_error: Error) {\n return { hasError: true }\n }\n\n componentDidCatch(error: Error) {\n if (error) {\n this.props.onError(error)\n }\n }\n\n render() {\n if (this.state.hasError) {\n return null\n }\n return this.props.children\n }\n}\n\nexport type RootContextProps = {\n /**\n * Exit (unmount) the whole Ink app.\n */\n readonly exit: (error?: Error) => void\n}\n\nexport const RootContext = createContext<RootContextProps>({\n exit: () => {},\n})\n\ntype RootProps = {\n /**\n * Exit (unmount) hook\n */\n readonly onExit: (error?: Error) => void\n /**\n * Error hook\n */\n readonly onError: (error: Error) => void\n readonly children?: KubbNode\n}\n\nexport function Root({ onError, onExit, children }: RootProps) {\n try {\n return (\n <ErrorBoundary\n onError={(error) => {\n onError(error)\n }}\n >\n <RootContext.Provider value={{ exit: onExit }}>{children}</RootContext.Provider>\n </ErrorBoundary>\n )\n } catch (_e) {\n return null\n }\n}\n\nRoot.Context = RootContext\nRoot.displayName = 'KubbRoot'\n","import type { DOMElement, DOMNode, DOMNodeAttribute, ElementNames, TextNode } from './types.ts'\n\nexport const createNode = (nodeName: string): DOMElement => {\n const node: DOMElement = {\n nodeName: nodeName as DOMElement['nodeName'],\n attributes: {},\n childNodes: [],\n parentNode: undefined,\n }\n\n return node\n}\n\nexport const appendChildNode = (node: DOMNode, childNode: DOMElement | DOMNode): void => {\n if (childNode.parentNode) {\n removeChildNode(childNode.parentNode, childNode)\n }\n\n if (node.nodeName !== '#text') {\n childNode.parentNode = node\n node.childNodes.push(childNode)\n }\n}\n\nexport const insertBeforeNode = (node: DOMElement, newChildNode: DOMNode, beforeChildNode: DOMNode): void => {\n if (newChildNode.parentNode) {\n removeChildNode(newChildNode.parentNode, newChildNode)\n }\n\n newChildNode.parentNode = node\n\n const index = node.childNodes.indexOf(beforeChildNode)\n if (index >= 0) {\n node.childNodes.splice(index, 0, newChildNode)\n\n return\n }\n\n node.childNodes.push(newChildNode)\n}\n\nexport const removeChildNode = (node: DOMElement, removeNode: DOMNode): void => {\n removeNode.parentNode = undefined\n\n const index = node.childNodes.indexOf(removeNode)\n if (index >= 0) {\n node.childNodes.splice(index, 1)\n }\n}\n\nexport const setAttribute = (node: DOMElement, key: string, value: DOMNodeAttribute): void => {\n node.attributes[key] = value\n}\n\nexport const createTextNode = (text: string): TextNode => {\n const node: TextNode = {\n nodeName: '#text',\n nodeValue: text,\n parentNode: undefined,\n }\n\n setTextNodeValue(node, text)\n\n return node\n}\n\nexport const setTextNodeValue = (node: TextNode, text: string): void => {\n if (typeof text !== 'string') {\n text = String(text)\n }\n\n node.nodeValue = text\n}\n\nexport const nodeNames: Array<ElementNames> = ['kubb-export', 'kubb-file', 'kubb-source', 'kubb-import', 'kubb-text']\n","import Reconciler, { type ReactContext } from 'react-reconciler'\nimport { DefaultEventPriority, NoEventPriority } from 'react-reconciler/constants.js'\n\nimport { appendChildNode, createNode, createTextNode, insertBeforeNode, removeChildNode, setAttribute, setTextNodeValue } from './dom.ts'\nimport type { KubbNode } from './types'\nimport type { DOMElement, DOMNodeAttribute, ElementNames, TextNode } from './types.ts'\nimport { createContext } from 'react'\n\ndeclare module 'react-reconciler' {\n // @ts-expect-error custom override\n interface Reconciler {\n updateContainerSync(element: KubbNode, container: unknown, parentComponent: any, callback?: null | (() => void)): void\n flushSyncWork(): void\n createContainer(\n containerInfo: unknown,\n tag: Reconciler.RootTag,\n hydrationCallbacks: null | Reconciler.SuspenseHydrationCallbacks<any>,\n isStrictMode: boolean,\n concurrentUpdatesByDefaultOverride: null | boolean,\n identifierPrefix: string,\n onUncaughtError: (error: Error) => void,\n onCaughtError: (error: Error) => void,\n onRecoverableError: (error: Error) => void,\n transitionCallbacks: null | Reconciler.TransitionTracingCallbacks,\n ): Reconciler.OpaqueRoot\n }\n}\n\ntype Props = Record<string, unknown>\n\ntype HostContext = {\n type: ElementNames\n isFile: boolean\n isSource: boolean\n}\n\nlet currentUpdatePriority = NoEventPriority\n\n/**\n * @link https://www.npmjs.com/package/react-devtools-inline\n * @link https://github.com/nitin42/Making-a-custom-React-renderer/blob/master/part-one.md\n * @link https://github.com/facebook/react/tree/main/packages/react-reconciler#practical-examples\n * @link https://github.com/vadimdemedes/ink\n * @link https://github.com/pixijs/pixi-react/tree/main/packages\n * @link https://github.com/diegomura/react-pdf/blob/master/packages/reconciler/src/reconciler-31.ts\n */\nexport const Renderer = Reconciler({\n getRootHostContext: () => ({\n type: 'kubb-root',\n isFile: false,\n isSource: false,\n }),\n prepareForCommit: () => {\n return null\n },\n preparePortalMount: () => null,\n clearContainer: () => false,\n resetAfterCommit(rootNode: DOMElement) {\n if (typeof rootNode.onRender === 'function') {\n rootNode.onRender()\n }\n },\n getChildHostContext(parentHostContext: HostContext, type: ElementNames) {\n const isInsideText = type === 'kubb-text'\n const isFile = type === 'kubb-file' || parentHostContext.isFile\n const isSource = type === 'kubb-source' || parentHostContext.isSource\n\n return { isInsideText, isFile, isSource, type }\n },\n shouldSetTextContent: () => false,\n createInstance(originalType: ElementNames, newProps: Props, _root: DOMElement) {\n const node = createNode(originalType)\n\n for (const [key, value] of Object.entries(newProps)) {\n if (key === 'children') {\n continue\n }\n\n setAttribute(node, key, value as DOMNodeAttribute)\n }\n\n return node\n },\n createTextInstance(text: string, _root: DOMElement, hostContext: HostContext) {\n if (hostContext.isFile && !hostContext.isSource) {\n throw new Error(`[react] '${text}' should be part of <File.Source> component when using the <File/> component`)\n }\n\n return createTextNode(text)\n },\n resetTextContent() {},\n hideTextInstance(node: TextNode) {\n setTextNodeValue(node, '')\n },\n unhideTextInstance(node: TextNode, text: string) {\n setTextNodeValue(node, text)\n },\n getPublicInstance: (instance) => instance,\n appendInitialChild: appendChildNode,\n appendChild: appendChildNode,\n insertBefore: insertBeforeNode,\n finalizeInitialChildren(_node, _type, _props, _rootNode) {\n return false\n },\n supportsMutation: true,\n isPrimaryRenderer: true,\n supportsPersistence: false,\n supportsHydration: false,\n scheduleTimeout: setTimeout,\n cancelTimeout: clearTimeout,\n noTimeout: -1,\n beforeActiveInstanceBlur() {},\n afterActiveInstanceBlur() {},\n detachDeletedInstance() {},\n getInstanceFromNode: () => null,\n prepareScopeUpdate() {},\n getInstanceFromScope: () => null,\n appendChildToContainer: appendChildNode,\n insertInContainerBefore: insertBeforeNode,\n removeChildFromContainer(node: DOMElement, removeNode: TextNode) {\n removeChildNode(node, removeNode)\n },\n commitMount() {},\n commitUpdate(node: DOMElement, _payload, _type, _oldProps: Props, newProps: Props) {\n const { props } = newProps\n\n if (props) {\n for (const [key, value] of Object.entries(props)) {\n setAttribute(node, key, value as DOMNodeAttribute)\n }\n }\n },\n commitTextUpdate(node: TextNode, _oldText, newText) {\n setTextNodeValue(node, newText)\n },\n removeChild(node: DOMElement, removeNode: TextNode) {\n removeChildNode(node, removeNode)\n },\n setCurrentUpdatePriority: (newPriority: number) => {\n currentUpdatePriority = newPriority\n },\n getCurrentUpdatePriority: () => currentUpdatePriority,\n resolveUpdatePriority() {\n if (currentUpdatePriority !== NoEventPriority) {\n return currentUpdatePriority\n }\n\n return DefaultEventPriority\n },\n maySuspendCommit() {\n return false\n },\n // eslint-disable-next-line @typescript-eslint/naming-convention\n NotPendingTransition: undefined,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n HostTransitionContext: createContext(null) as unknown as ReactContext<unknown>,\n resetFormInstance() {},\n requestPostPaintCallback() {},\n shouldAttemptEagerTransition() {\n return false\n },\n trackSchedulerEvent() {},\n resolveEventType() {\n return null\n },\n resolveEventTimeStamp() {\n return -1.1\n },\n preloadInstance() {\n return true\n },\n startSuspendingCommit() {},\n suspendInstance() {},\n waitForCommitToBeReady() {\n return null\n },\n})\n\nexport type { FiberRoot } from 'react-reconciler'\n","import { createImport, createExport, print } from '@kubb/fabric-core/parsers/typescript'\n\nimport type { File } from '../components/File.tsx'\nimport { nodeNames } from '../dom.ts'\nimport type { DOMElement } from '../types.ts'\n\nexport function squashTextNodes(node: DOMElement): string {\n let text = ''\n\n for (const childNode of node.childNodes) {\n if (!childNode) {\n continue\n }\n\n let nodeText = ''\n\n const getPrintText = (text: string): string => {\n if (childNode.nodeName === 'kubb-import') {\n const attributes = childNode.attributes as React.ComponentProps<typeof File.Import>\n\n return print([\n createImport({\n name: attributes.name,\n path: attributes.path,\n root: attributes.root,\n isTypeOnly: attributes.isTypeOnly,\n }),\n ])\n }\n\n if (childNode.nodeName === 'kubb-export') {\n const attributes = childNode.attributes as React.ComponentProps<typeof File.Export>\n if (attributes.path) {\n return print([\n createExport({\n name: attributes.name,\n path: attributes.path,\n isTypeOnly: attributes.isTypeOnly,\n asAlias: attributes.asAlias,\n }),\n ])\n }\n }\n\n if (childNode.nodeName === 'kubb-source') {\n return text\n }\n\n return text\n }\n\n if (childNode.nodeName === '#text') {\n nodeText = childNode.nodeValue\n } else {\n if (['kubb-text', 'kubb-file', 'kubb-source'].includes(childNode.nodeName)) {\n nodeText = squashTextNodes(childNode)\n }\n\n nodeText = getPrintText(nodeText)\n\n if (childNode.nodeName === 'br') {\n nodeText = '\\n'\n }\n\n // no kubb element or br\n if (![...nodeNames, 'br'].includes(childNode.nodeName)) {\n const attributes = Object.entries(childNode.attributes).reduce((acc, [key, value]) => {\n if (typeof value === 'string') {\n return `${acc} ${key}=\"${value}\"`\n }\n\n return `${acc} ${key}={${value}}`\n }, '')\n nodeText = `<${childNode.nodeName}${attributes}>${squashTextNodes(childNode)}</${childNode.nodeName}>`\n }\n }\n\n text += nodeText\n }\n\n return text\n}\n","import { nodeNames } from '../dom.ts'\n\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport type React from 'react'\nimport type { File } from '../components/File.tsx'\nimport type { DOMElement } from '../types.ts'\n\nexport function squashExportNodes(node: DOMElement): Set<KubbFile.ResolvedExport> {\n let exports = new Set<KubbFile.Export>()\n\n node.childNodes.filter(Boolean).forEach((childNode) => {\n if (childNode.nodeName !== '#text' && nodeNames.includes(childNode.nodeName)) {\n exports = new Set([...exports, ...squashExportNodes(childNode)])\n }\n\n if (childNode.nodeName === 'kubb-export') {\n const attributes = childNode.attributes as React.ComponentProps<typeof File.Export>\n exports.add(attributes)\n }\n })\n\n return exports\n}\n","import { nodeNames } from '../dom.ts'\n\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport type React from 'react'\nimport type { File } from '../components/File.tsx'\nimport type { DOMElement } from '../types.ts'\n\nexport function squashImportNodes(node: DOMElement): Set<KubbFile.Import> {\n let imports = new Set<KubbFile.Import>()\n\n node.childNodes.filter(Boolean).forEach((childNode) => {\n if (childNode.nodeName !== '#text' && nodeNames.includes(childNode.nodeName)) {\n imports = new Set([...imports, ...squashImportNodes(childNode)])\n }\n\n if (childNode.nodeName === 'kubb-import') {\n const attributes = childNode.attributes as React.ComponentProps<typeof File.Import>\n imports.add(attributes)\n }\n })\n\n return imports\n}\n","import { nodeNames } from '../dom.ts'\n\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport type React from 'react'\nimport type { File } from '../components/File.tsx'\nimport type { DOMElement, ElementNames } from '../types.ts'\nimport { squashTextNodes } from './squashTextNodes.ts'\n\nexport function squashSourceNodes(node: DOMElement, ignores: Array<ElementNames>): Set<KubbFile.Source> {\n let sources = new Set<KubbFile.Source>()\n\n for (const childNode of node.childNodes) {\n if (!childNode) {\n continue\n }\n\n if (childNode.nodeName !== '#text' && ignores.includes(childNode.nodeName)) {\n continue\n }\n\n if (childNode.nodeName === 'kubb-source') {\n const attributes = childNode.attributes as React.ComponentProps<typeof File.Source>\n const value = squashTextNodes(childNode)\n\n sources.add({\n ...attributes,\n // remove end enter\n value: value.trim().replace(/^\\s+|\\s+$/g, ''),\n })\n\n continue\n }\n\n if (childNode.nodeName !== '#text' && nodeNames.includes(childNode.nodeName)) {\n sources = new Set([...sources, ...squashSourceNodes(childNode, ignores)])\n }\n }\n\n return sources\n}\n","import { nodeNames } from '../dom.ts'\nimport { squashExportNodes } from './squashExportNodes.ts'\nimport { squashImportNodes } from './squashImportNodes.ts'\nimport { squashSourceNodes } from './squashSourceNodes.ts'\n\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport type React from 'react'\nimport type { File } from '../components/File.tsx'\nimport type { DOMElement } from '../types.ts'\nimport type { FileManager } from '@kubb/fabric-core'\n\nexport function processFiles(node: DOMElement, fileManager: FileManager) {\n for (let index = 0; index < node.childNodes.length; index++) {\n const childNode = node.childNodes[index]\n\n if (!childNode) {\n continue\n }\n\n if (childNode.nodeName !== '#text' && childNode.nodeName !== 'kubb-file' && nodeNames.includes(childNode.nodeName)) {\n processFiles(childNode, fileManager)\n }\n\n if (childNode.nodeName === 'kubb-file') {\n const attributes = childNode.attributes as React.ComponentProps<typeof File>\n\n if (attributes.baseName && attributes.path) {\n const sources = squashSourceNodes(childNode, ['kubb-export', 'kubb-import'])\n\n const file: KubbFile.File = {\n baseName: attributes.baseName,\n path: attributes.path,\n sources: [...sources],\n exports: [...squashExportNodes(childNode)],\n imports: [...squashImportNodes(childNode)],\n meta: attributes.meta || {},\n footer: attributes.footer,\n banner: attributes.banner,\n }\n\n fileManager.add(file)\n }\n }\n }\n}\n","import process from 'node:process'\nimport type { ReactNode } from 'react'\nimport { ConcurrentRoot } from 'react-reconciler/constants.js'\nimport { onExit } from 'signal-exit'\nimport { Root } from './components/Root.tsx'\nimport { createNode } from './dom.ts'\nimport type { FiberRoot } from './Renderer.ts'\nimport { Renderer } from './Renderer.ts'\nimport type { DOMElement } from './types.ts'\nimport { squashTextNodes } from './utils/squashTextNodes.ts'\nimport { processFiles } from './utils/processFiles.ts'\nimport type { FileManager } from '@kubb/fabric-core'\n\ntype Options = {\n fileManager: FileManager\n stdout?: NodeJS.WriteStream\n stdin?: NodeJS.ReadStream\n stderr?: NodeJS.WriteStream\n /**\n * Set this to true to always see the result of the render in the console(line per render)\n */\n debug?: boolean\n}\n\nexport class Runtime {\n readonly #options: Options\n // Ignore last render after unmounting a tree to prevent empty output before exit\n #isUnmounted: boolean\n\n exitPromise?: Promise<void>\n readonly #container: FiberRoot\n readonly #rootNode: DOMElement\n\n constructor(options: Options) {\n this.#options = options\n\n this.#rootNode = createNode('kubb-root')\n this.#rootNode.onRender = this.onRender\n this.#rootNode.onImmediateRender = this.onRender\n\n // Ignore last render after unmounting a tree to prevent empty output before exit\n this.#isUnmounted = false\n this.unmount.bind(this)\n\n const originalError = console.error\n console.error = (data: string | Error) => {\n const message = typeof data === 'string' ? data : data?.message\n\n if (message?.match(/Encountered two children with the same key/gi)) {\n return\n }\n if (message?.match(/React will try to recreat/gi)) {\n return\n }\n if (message?.match(/Each child in a list should have a unique/gi)) {\n return\n }\n if (message?.match(/The above error occurred in the <KubbErrorBoundary/gi)) {\n return\n }\n\n if (message?.match(/A React Element from an older version of React was render/gi)) {\n return\n }\n\n originalError(data)\n }\n\n // Report when an error was detected in a previous render\n // https://github.com/pmndrs/react-three-fiber/pull/2261\n const logRecoverableError =\n typeof reportError === 'function'\n ? // In modern browsers, reportError will dispatch an error event,\n // emulating an uncaught JavaScript error.\n reportError\n : // In older browsers and test environments, fallback to console.error.\n console.error\n\n const rootTag = ConcurrentRoot\n const hydrationCallbacks = null\n const isStrictMode = false\n const concurrentUpdatesByDefaultOverride = false\n const identifierPrefix = 'id'\n const onUncaughtError = logRecoverableError\n const onCaughtError = logRecoverableError\n const onRecoverableError = logRecoverableError\n const transitionCallbacks = null\n\n this.#container = Renderer.createContainer(\n this.#rootNode,\n rootTag,\n hydrationCallbacks,\n isStrictMode,\n concurrentUpdatesByDefaultOverride,\n identifierPrefix,\n onUncaughtError,\n onCaughtError,\n onRecoverableError,\n transitionCallbacks,\n )\n\n // Unmount when process exits\n this.unsubscribeExit = onExit(\n (code) => {\n this.unmount(code)\n },\n { alwaysLast: false },\n ).bind(this)\n\n Renderer.injectIntoDevTools({\n bundleType: 1, // 0 for PROD, 1 for DEV\n version: '19.1.0', // should be React version and not Kubb's custom version\n rendererPackageName: 'kubb', // package name\n })\n }\n\n get fileManager() {\n return this.#options.fileManager\n }\n\n resolveExitPromise: () => void = () => {}\n rejectExitPromise: (reason?: Error) => void = () => {}\n unsubscribeExit: () => void = () => {}\n onRender: () => void = async () => {\n if (this.#isUnmounted) {\n return\n }\n\n // TODO remove to allow multiple renders\n this.fileManager.clear()\n\n processFiles(this.#rootNode, this.fileManager)\n\n if (!this.#options?.debug && !this.#options?.stdout) {\n return\n }\n\n const output = await this.#getOutput(this.#rootNode)\n\n if (this.#options?.debug) {\n console.log('Rendering: \\n')\n console.log(output)\n }\n\n if (this.#options?.stdout && process.env.NODE_ENV !== 'test') {\n this.#options.stdout.clearLine(0)\n this.#options.stdout.cursorTo(0)\n this.#options.stdout.write(output)\n }\n }\n onError(error: Error): void {\n if (process.env.NODE_ENV === 'test') {\n console.warn(error)\n }\n\n throw error\n }\n onExit(error?: Error): void {\n this.unmount(error)\n }\n\n async #getOutput(node: DOMElement): Promise<string> {\n const text = squashTextNodes(node)\n const files = this.fileManager.files\n\n return files.length\n ? [...files]\n .flatMap((file) => [...file.sources].map((item) => item.value))\n .filter(Boolean)\n .join('\\n\\n')\n : text\n }\n\n render(node: ReactNode): void {\n const element = (\n <Root onExit={this.onExit.bind(this)} onError={this.onError.bind(this)}>\n {node}\n </Root>\n )\n\n Renderer.updateContainerSync(element, this.#container, null, null)\n Renderer.flushSyncWork()\n }\n\n async renderToString(node: ReactNode): Promise<string> {\n const element = (\n <Root onExit={this.onExit.bind(this)} onError={this.onError.bind(this)}>\n {node}\n </Root>\n )\n\n Renderer.updateContainerSync(element, this.#container, null, null)\n Renderer.flushSyncWork()\n\n this.fileManager.clear()\n\n return this.#getOutput(this.#rootNode)\n }\n\n unmount(error?: Error | number | null): void {\n if (this.#isUnmounted) {\n return\n }\n\n if (this.#options?.debug) {\n console.log('Unmount', error)\n }\n\n this.onRender()\n this.unsubscribeExit()\n\n this.#isUnmounted = true\n\n Renderer.updateContainerSync(null, this.#container, null, null)\n\n if (error instanceof Error) {\n this.rejectExitPromise(error)\n\n return\n }\n\n this.resolveExitPromise()\n }\n\n async waitUntilExit(): Promise<void> {\n if (!this.exitPromise) {\n this.exitPromise = new Promise((resolve, reject) => {\n this.resolveExitPromise = resolve\n this.rejectExitPromise = reject\n })\n }\n\n return this.exitPromise\n }\n}\n","import { createPlugin } from '@kubb/fabric-core/plugins'\nimport { Runtime } from '../Runtime.tsx'\nimport { createElement, type ElementType } from 'react'\n\nexport type Options = {\n stdout?: NodeJS.WriteStream\n stdin?: NodeJS.ReadStream\n stderr?: NodeJS.WriteStream\n /**\n * Set this to true to always see the result of the render in the console(line per render)\n */\n debug?: boolean\n}\n\ntype ExtendOptions = {\n render(App: ElementType): Promise<void> | void\n renderToString(App: ElementType): Promise<string> | string\n waitUntilExit(): Promise<void>\n}\n\n// biome-ignore lint/suspicious/noTsIgnore: production ready\n// @ts-ignore\ndeclare module '@kubb/fabric-core' {\n interface Fabric {\n render(App: ElementType): Promise<void> | void\n renderToString(App: ElementType): Promise<string> | string\n waitUntilExit(): Promise<void>\n }\n}\n\ndeclare global {\n namespace Kubb {\n interface Fabric {\n render(App: ElementType): Promise<void> | void\n renderToString(App: ElementType): Promise<string> | string\n waitUntilExit(): Promise<void>\n }\n }\n}\n\nexport const reactPlugin = createPlugin<Options, ExtendOptions>({\n name: 'react',\n install() {},\n inject(app, options = {}) {\n const runtime = new Runtime({ fileManager: app.context.fileManager, ...options })\n\n return {\n async render(App) {\n runtime.render(createElement(App))\n await app.context.events.emit('start')\n },\n async renderToString(App) {\n await app.context.events.emit('start')\n return runtime.renderToString(createElement(App))\n },\n async waitUntilExit() {\n await runtime.waitUntilExit()\n\n await app.context.events.emit('end')\n },\n }\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAM,gBAAN,cAA4B,UAGzB;;;wBACD,SAAQ,EAAE,UAAU,OAAO;;CAG3B,OAAO,yBAAyB,QAAe;AAC7C,SAAO,EAAE,UAAU,MAAM;;CAG3B,kBAAkB,OAAc;AAC9B,MAAI,MACF,MAAK,MAAM,QAAQ,MAAM;;CAI7B,SAAS;AACP,MAAI,KAAK,MAAM,SACb,QAAO;AAET,SAAO,KAAK,MAAM;;;+BAfb,eAAc;AA0BvB,MAAa,cAAc,cAAgC,EACzD,YAAY,IACb,CAAC;AAcF,SAAgB,KAAK,EAAE,SAAS,kBAAQ,YAAuB;AAC7D,KAAI;AACF,SACE,oBAAC;GACC,UAAU,UAAU;AAClB,YAAQ,MAAM;;aAGhB,oBAAC,YAAY;IAAS,OAAO,EAAE,MAAMA,UAAQ;IAAG;KAAgC;IAClE;UAEX,IAAI;AACX,SAAO;;;AAIX,KAAK,UAAU;AACf,KAAK,cAAc;;;;ACxEnB,MAAa,cAAc,aAAiC;AAQ1D,QAPyB;EACb;EACV,YAAY,EAAE;EACd,YAAY,EAAE;EACd,YAAY;EACb;;AAKH,MAAa,mBAAmB,MAAe,cAA0C;AACvF,KAAI,UAAU,WACZ,iBAAgB,UAAU,YAAY,UAAU;AAGlD,KAAI,KAAK,aAAa,SAAS;AAC7B,YAAU,aAAa;AACvB,OAAK,WAAW,KAAK,UAAU;;;AAInC,MAAa,oBAAoB,MAAkB,cAAuB,oBAAmC;AAC3G,KAAI,aAAa,WACf,iBAAgB,aAAa,YAAY,aAAa;AAGxD,cAA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MAAM,CACP,SAAS,SAAS,CAAC,GAAG,KAAK,QAAQ,CAAC,KAAK,SAAS,KAAK,MAAM,CAAC,CAC9D,OAAO,QAAQ,CACf,KAAK,OAAO,GACf;;;;;AClIR,MAAa,cAAc,aAAqC;CAC9D,MAAM;CACN,UAAU;CACV,OAAO,KAAK,UAAU,EAAE,EAAE;EACxB,MAAM,UAAU,IAAI,QAAQ;GAAE,aAAa,IAAI,QAAQ;GAAa,GAAG;GAAS,CAAC;AAEjF,SAAO;GACL,MAAM,OAAO,KAAK;AAChB,YAAQ,OAAO,cAAc,IAAI,CAAC;AAClC,UAAM,IAAI,QAAQ,OAAO,KAAK,QAAQ;;GAExC,MAAM,eAAe,KAAK;AACxB,UAAM,IAAI,QAAQ,OAAO,KAAK,QAAQ;AACtC,WAAO,QAAQ,eAAe,cAAc,IAAI,CAAC;;GAEnD,MAAM,gBAAgB;AACpB,UAAM,QAAQ,eAAe;AAE7B,UAAM,IAAI,QAAQ,OAAO,KAAK,MAAM;;GAEvC;;CAEJ,CAAC"}
|
|
@@ -5,8 +5,8 @@ let __kubb_fabric_core_plugins = require("@kubb/fabric-core/plugins");
|
|
|
5
5
|
__kubb_fabric_core_plugins = require_chunk.__toESM(__kubb_fabric_core_plugins);
|
|
6
6
|
let node_process = require("node:process");
|
|
7
7
|
node_process = require_chunk.__toESM(node_process);
|
|
8
|
-
let
|
|
9
|
-
|
|
8
|
+
let react_reconciler_constants_js = require("react-reconciler/constants.js");
|
|
9
|
+
react_reconciler_constants_js = require_chunk.__toESM(react_reconciler_constants_js);
|
|
10
10
|
let signal_exit = require("signal-exit");
|
|
11
11
|
signal_exit = require_chunk.__toESM(signal_exit);
|
|
12
12
|
let react_reconciler = require("react-reconciler");
|
|
@@ -153,7 +153,7 @@ const nodeNames = [
|
|
|
153
153
|
|
|
154
154
|
//#endregion
|
|
155
155
|
//#region src/Renderer.ts
|
|
156
|
-
let currentUpdatePriority =
|
|
156
|
+
let currentUpdatePriority = react_reconciler_constants_js.NoEventPriority;
|
|
157
157
|
/**
|
|
158
158
|
* @link https://www.npmjs.com/package/react-devtools-inline
|
|
159
159
|
* @link https://github.com/nitin42/Making-a-custom-React-renderer/blob/master/part-one.md
|
|
@@ -245,8 +245,8 @@ const Renderer = (0, react_reconciler.default)({
|
|
|
245
245
|
},
|
|
246
246
|
getCurrentUpdatePriority: () => currentUpdatePriority,
|
|
247
247
|
resolveUpdatePriority() {
|
|
248
|
-
if (currentUpdatePriority !==
|
|
249
|
-
return
|
|
248
|
+
if (currentUpdatePriority !== react_reconciler_constants_js.NoEventPriority) return currentUpdatePriority;
|
|
249
|
+
return react_reconciler_constants_js.DefaultEventPriority;
|
|
250
250
|
},
|
|
251
251
|
maySuspendCommit() {
|
|
252
252
|
return false;
|
|
@@ -491,7 +491,7 @@ var Runtime = class {
|
|
|
491
491
|
originalError(data);
|
|
492
492
|
};
|
|
493
493
|
const logRecoverableError = typeof reportError === "function" ? reportError : console.error;
|
|
494
|
-
const rootTag =
|
|
494
|
+
const rootTag = react_reconciler_constants_js.ConcurrentRoot;
|
|
495
495
|
const hydrationCallbacks = null;
|
|
496
496
|
const isStrictMode = false;
|
|
497
497
|
const concurrentUpdatesByDefaultOverride = false;
|
|
@@ -637,4 +637,4 @@ Object.defineProperty(exports, 'reactPlugin', {
|
|
|
637
637
|
return reactPlugin;
|
|
638
638
|
}
|
|
639
639
|
});
|
|
640
|
-
//# sourceMappingURL=plugins-
|
|
640
|
+
//# sourceMappingURL=plugins-DzBEnan-.cjs.map
|