@kubb/react-fabric 0.9.5 → 0.11.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/dist/{Fabric-DitK3IEP.d.ts → Fabric-BELBf-bX.d.cts} +5 -5
- package/dist/{Fabric-C61uYmUy.d.cts → Fabric-DbJhvsCq.d.ts} +5 -5
- package/dist/{devtools-D6dZodXp.js → devtools-8_UKWDTl.js} +1 -1
- package/dist/{devtools-D6dZodXp.js.map → devtools-8_UKWDTl.js.map} +1 -1
- package/dist/{devtools-CRkwwngz.cjs → devtools-BOpUJhc_.cjs} +1 -1
- package/dist/{devtools-CRkwwngz.cjs.map → devtools-BOpUJhc_.cjs.map} +1 -1
- package/dist/devtools.cjs +1 -1
- package/dist/devtools.js +1 -1
- package/dist/globals.d.cts +2 -2
- package/dist/globals.d.ts +2 -2
- package/dist/index.cjs +166 -73
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -359
- package/dist/index.d.ts +3 -359
- package/dist/index.js +151 -68
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.d.cts +5 -5
- package/dist/jsx-dev-runtime.d.ts +3 -3
- package/dist/{jsx-namespace-BAkGpU6g.d.ts → jsx-namespace-CBOEkCmJ.d.ts} +2 -2
- package/dist/{jsx-namespace-CCPa1Nut.d.cts → jsx-namespace-od7sqrmY.d.cts} +2 -2
- package/dist/{jsx-runtime-BEVcoJUm.cjs → jsx-runtime-Cq39dA50.cjs} +1 -1
- package/dist/{jsx-runtime-BEVcoJUm.cjs.map → jsx-runtime-Cq39dA50.cjs.map} +1 -1
- package/dist/{jsx-runtime-DDu0mFTI.js → jsx-runtime-Isgf9orn.js} +1 -1
- package/dist/{jsx-runtime-DDu0mFTI.js.map → jsx-runtime-Isgf9orn.js.map} +1 -1
- package/dist/jsx-runtime.cjs +1 -1
- package/dist/jsx-runtime.d.cts +5 -5
- package/dist/jsx-runtime.d.ts +3 -3
- package/dist/jsx-runtime.js +1 -1
- package/dist/parsers.d.cts +1 -1
- package/dist/parsers.d.ts +1 -1
- package/dist/plugins.cjs +2 -2
- package/dist/plugins.d.cts +2 -2
- package/dist/plugins.d.ts +2 -2
- package/dist/plugins.js +2 -2
- package/dist/{reactPlugin-CXaAO13f.cjs → reactPlugin-B8F6jVb5.cjs} +77 -64
- package/dist/reactPlugin-B8F6jVb5.cjs.map +1 -0
- package/dist/{reactPlugin-ixOr00MK.js → reactPlugin-CAtVV84d.js} +78 -53
- package/dist/reactPlugin-CAtVV84d.js.map +1 -0
- package/dist/types-C3ODUOKN.d.cts +675 -0
- package/dist/types-DwaohVJS.d.ts +675 -0
- package/dist/types.d.cts +3 -3
- package/dist/types.d.ts +3 -3
- package/package.json +3 -3
- package/src/Runtime.tsx +22 -12
- package/src/components/App.tsx +24 -15
- package/src/components/Const.tsx +19 -3
- package/src/components/File.tsx +107 -31
- package/src/components/Function.tsx +36 -5
- package/src/components/Indent.tsx +3 -0
- package/src/components/Root.tsx +26 -20
- package/src/components/Type.tsx +19 -2
- package/src/components/__snapshots__/arrow_function.ts +3 -0
- package/src/components/__snapshots__/arrow_function_default.ts +3 -0
- package/src/components/__snapshots__/arrow_function_generics.ts +3 -0
- package/src/components/__snapshots__/arrow_function_single_line.ts +1 -0
- package/src/components/__snapshots__/arrow_function_with_generics.ts +3 -0
- package/src/components/__snapshots__/async_arrow_function.ts +3 -0
- package/src/components/__snapshots__/async_function.ts +3 -0
- package/src/components/__snapshots__/async_function_with_Promise_return_type.ts +3 -0
- package/src/components/__snapshots__/basic_arrow_function.ts +3 -0
- package/src/components/__snapshots__/basic_const.ts +1 -0
- package/src/components/__snapshots__/basic_export.ts +1 -0
- package/src/components/__snapshots__/basic_function.ts +3 -0
- package/src/components/__snapshots__/basic_import.ts +1 -0
- package/src/components/__snapshots__/basic_type.ts +1 -0
- package/src/components/__snapshots__/const_with_JSDoc.ts +4 -0
- package/src/components/__snapshots__/const_with_as_const.ts +1 -0
- package/src/components/__snapshots__/const_with_type.ts +1 -0
- package/src/components/__snapshots__/default_exported_arrow_function.ts +3 -0
- package/src/components/__snapshots__/default_exported_function.ts +3 -0
- package/src/components/__snapshots__/exported_arrow_function.ts +3 -0
- package/src/components/__snapshots__/exported_const.ts +1 -0
- package/src/components/__snapshots__/exported_function.ts +3 -0
- package/src/components/__snapshots__/exported_type.ts +1 -0
- package/src/components/__snapshots__/function_generics.ts +3 -0
- package/src/components/__snapshots__/function_with_JSDoc.ts +6 -0
- package/src/components/__snapshots__/function_with_comments.ts +6 -0
- package/src/components/__snapshots__/function_with_generics.ts +3 -0
- package/src/components/__snapshots__/function_with_parameters.ts +3 -0
- package/src/components/__snapshots__/function_with_params.ts +3 -0
- package/src/components/__snapshots__/function_with_returnType.ts +3 -0
- package/src/components/__snapshots__/function_with_return_type.ts +3 -0
- package/src/components/__snapshots__/matches_with_root_import.ts +1 -0
- package/src/components/__snapshots__/multiple_functions.ts +3 -0
- package/src/components/__snapshots__/named_export.ts +1 -0
- package/src/components/__snapshots__/named_export_(object_advanced).ts +1 -0
- package/src/components/__snapshots__/named_import.ts +1 -0
- package/src/components/__snapshots__/named_import_(object).ts +1 -0
- package/src/components/__snapshots__/named_import_(object_advanced).ts +1 -0
- package/src/components/__snapshots__/named_typed_export.ts +1 -0
- package/src/components/__snapshots__/named_typed_import.ts +1 -0
- package/src/components/__snapshots__/single_line_arrow_function.ts +1 -0
- package/src/components/__snapshots__/type_with_JSDoc.ts +4 -0
- package/src/components/__snapshots__/typed_export.ts +1 -0
- package/src/components/__snapshots__/typed_import.ts +1 -0
- package/src/composables/useApp.ts +1 -15
- package/src/composables/useFile.ts +1 -12
- package/src/composables/useLifecycle.tsx +7 -8
- package/src/index.ts +5 -1
- package/src/plugins/reactPlugin.ts +7 -6
- package/src/types.ts +0 -4
- package/src/utils/createJSDoc.ts +1 -8
- package/dist/reactPlugin-4-kcMKwZ.d.ts +0 -31
- package/dist/reactPlugin-B4xarQJX.d.cts +0 -31
- package/dist/reactPlugin-CXaAO13f.cjs.map +0 -1
- package/dist/reactPlugin-ixOr00MK.js.map +0 -1
- package/dist/types-CSUzVTpn.d.ts +0 -104
- package/dist/types-DP2mgqeb.d.cts +0 -104
|
@@ -1,11 +1,51 @@
|
|
|
1
1
|
import { r as __toESM, t as __commonJSMin } from "./chunk-BCPZiDLE.js";
|
|
2
2
|
import { t as require_react } from "./react-DfIUVisP.js";
|
|
3
|
-
import { n as jsx } from "./jsx-runtime-
|
|
3
|
+
import { n as jsx } from "./jsx-runtime-Isgf9orn.js";
|
|
4
|
+
import { NodeTreeContext, RootContext, TreeNode, provide } from "@kubb/fabric-core";
|
|
4
5
|
import { onExit } from "signal-exit";
|
|
5
6
|
import { definePlugin } from "@kubb/fabric-core/plugins";
|
|
6
7
|
import process$1 from "node:process";
|
|
7
8
|
import { createExport, createImport, print } from "@kubb/fabric-core/parsers/typescript";
|
|
8
9
|
|
|
10
|
+
//#region ../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.2.1/node_modules/react-reconciler/cjs/react-reconciler-constants.production.js
|
|
11
|
+
/**
|
|
12
|
+
* @license React
|
|
13
|
+
* react-reconciler-constants.production.js
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
16
|
+
*
|
|
17
|
+
* This source code is licensed under the MIT license found in the
|
|
18
|
+
* LICENSE file in the root directory of this source tree.
|
|
19
|
+
*/
|
|
20
|
+
var require_react_reconciler_constants_production = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
21
|
+
exports.ConcurrentRoot = 1;
|
|
22
|
+
exports.DefaultEventPriority = 32;
|
|
23
|
+
exports.NoEventPriority = 0;
|
|
24
|
+
}));
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region ../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.2.1/node_modules/react-reconciler/cjs/react-reconciler-constants.development.js
|
|
28
|
+
/**
|
|
29
|
+
* @license React
|
|
30
|
+
* react-reconciler-constants.development.js
|
|
31
|
+
*
|
|
32
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the MIT license found in the
|
|
35
|
+
* LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/
|
|
37
|
+
var require_react_reconciler_constants_development = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
38
|
+
"production" !== process.env.NODE_ENV && (exports.ConcurrentRoot = 1, exports.ContinuousEventPriority = 8, exports.DefaultEventPriority = 32, exports.DiscreteEventPriority = 2, exports.IdleEventPriority = 268435456, exports.LegacyRoot = 0, exports.NoEventPriority = 0);
|
|
39
|
+
}));
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region ../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.2.1/node_modules/react-reconciler/constants.js
|
|
43
|
+
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
44
|
+
if (process.env.NODE_ENV === "production") module.exports = require_react_reconciler_constants_production();
|
|
45
|
+
else module.exports = require_react_reconciler_constants_development();
|
|
46
|
+
}));
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
9
49
|
//#region \0@oxc-project+runtime@0.103.0/helpers/typeof.js
|
|
10
50
|
function _typeof(o) {
|
|
11
51
|
"@babel/helpers - typeof";
|
|
@@ -67,60 +107,25 @@ var ErrorBoundary = class extends import_react.Component {
|
|
|
67
107
|
}
|
|
68
108
|
};
|
|
69
109
|
_defineProperty(ErrorBoundary, "displayName", "KubbErrorBoundary");
|
|
70
|
-
|
|
71
|
-
|
|
110
|
+
/**
|
|
111
|
+
* This component provides the root behavior for the Fabric runtime.
|
|
112
|
+
*/
|
|
113
|
+
function Root({ onError, onExit: onExit$1, treeNode, fileManager, children }) {
|
|
114
|
+
provide(RootContext, {
|
|
115
|
+
exit: onExit$1,
|
|
116
|
+
treeNode,
|
|
117
|
+
fileManager
|
|
118
|
+
});
|
|
119
|
+
provide(NodeTreeContext, treeNode);
|
|
72
120
|
return /* @__PURE__ */ jsx(ErrorBoundary, {
|
|
73
121
|
onError: (error) => {
|
|
74
122
|
onError(error);
|
|
75
123
|
},
|
|
76
|
-
children
|
|
77
|
-
value: { exit: onExit$1 },
|
|
78
|
-
children
|
|
79
|
-
})
|
|
124
|
+
children
|
|
80
125
|
});
|
|
81
126
|
}
|
|
82
|
-
Root.Context = RootContext;
|
|
83
127
|
Root.displayName = "KubbRoot";
|
|
84
128
|
|
|
85
|
-
//#endregion
|
|
86
|
-
//#region ../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.2.1/node_modules/react-reconciler/cjs/react-reconciler-constants.production.js
|
|
87
|
-
/**
|
|
88
|
-
* @license React
|
|
89
|
-
* react-reconciler-constants.production.js
|
|
90
|
-
*
|
|
91
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
92
|
-
*
|
|
93
|
-
* This source code is licensed under the MIT license found in the
|
|
94
|
-
* LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/
|
|
96
|
-
var require_react_reconciler_constants_production = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
97
|
-
exports.ConcurrentRoot = 1;
|
|
98
|
-
exports.DefaultEventPriority = 32;
|
|
99
|
-
exports.NoEventPriority = 0;
|
|
100
|
-
}));
|
|
101
|
-
|
|
102
|
-
//#endregion
|
|
103
|
-
//#region ../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.2.1/node_modules/react-reconciler/cjs/react-reconciler-constants.development.js
|
|
104
|
-
/**
|
|
105
|
-
* @license React
|
|
106
|
-
* react-reconciler-constants.development.js
|
|
107
|
-
*
|
|
108
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
109
|
-
*
|
|
110
|
-
* This source code is licensed under the MIT license found in the
|
|
111
|
-
* LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/
|
|
113
|
-
var require_react_reconciler_constants_development = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
114
|
-
"production" !== process.env.NODE_ENV && (exports.ConcurrentRoot = 1, exports.ContinuousEventPriority = 8, exports.DefaultEventPriority = 32, exports.DiscreteEventPriority = 2, exports.IdleEventPriority = 268435456, exports.LegacyRoot = 0, exports.NoEventPriority = 0);
|
|
115
|
-
}));
|
|
116
|
-
|
|
117
|
-
//#endregion
|
|
118
|
-
//#region ../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.2.1/node_modules/react-reconciler/constants.js
|
|
119
|
-
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
120
|
-
if (process.env.NODE_ENV === "production") module.exports = require_react_reconciler_constants_production();
|
|
121
|
-
else module.exports = require_react_reconciler_constants_development();
|
|
122
|
-
}));
|
|
123
|
-
|
|
124
129
|
//#endregion
|
|
125
130
|
//#region src/dom.ts
|
|
126
131
|
const createNode = (nodeName) => {
|
|
@@ -15509,9 +15514,19 @@ var Runtime = class {
|
|
|
15509
15514
|
this.unmount(error);
|
|
15510
15515
|
}
|
|
15511
15516
|
async render(node) {
|
|
15512
|
-
const
|
|
15517
|
+
const treeNode = new TreeNode({
|
|
15518
|
+
type: "Root",
|
|
15519
|
+
props: {}
|
|
15520
|
+
});
|
|
15521
|
+
const props = {
|
|
15522
|
+
fileManager: this.fileManager,
|
|
15523
|
+
treeNode,
|
|
15513
15524
|
onExit: this.onExit.bind(this),
|
|
15514
|
-
onError: this.onError.bind(this)
|
|
15525
|
+
onError: this.onError.bind(this)
|
|
15526
|
+
};
|
|
15527
|
+
treeNode.data.props = props;
|
|
15528
|
+
const element = /* @__PURE__ */ jsx(Root, {
|
|
15529
|
+
...props,
|
|
15515
15530
|
children: node
|
|
15516
15531
|
});
|
|
15517
15532
|
Renderer.updateContainerSync(element, _classPrivateFieldGet2(_container, this), null, null);
|
|
@@ -15524,9 +15539,19 @@ var Runtime = class {
|
|
|
15524
15539
|
}
|
|
15525
15540
|
}
|
|
15526
15541
|
async renderToString(node) {
|
|
15527
|
-
const
|
|
15542
|
+
const treeNode = new TreeNode({
|
|
15543
|
+
type: "Root",
|
|
15544
|
+
props: {}
|
|
15545
|
+
});
|
|
15546
|
+
const props = {
|
|
15547
|
+
fileManager: this.fileManager,
|
|
15548
|
+
treeNode,
|
|
15528
15549
|
onExit: this.onExit.bind(this),
|
|
15529
|
-
onError: this.onError.bind(this)
|
|
15550
|
+
onError: this.onError.bind(this)
|
|
15551
|
+
};
|
|
15552
|
+
treeNode.data.props = props;
|
|
15553
|
+
const element = /* @__PURE__ */ jsx(Root, {
|
|
15554
|
+
...props,
|
|
15530
15555
|
children: node
|
|
15531
15556
|
});
|
|
15532
15557
|
Renderer.updateContainerSync(element, _classPrivateFieldGet2(_container, this), null, null);
|
|
@@ -15598,5 +15623,5 @@ const reactPlugin = definePlugin({
|
|
|
15598
15623
|
});
|
|
15599
15624
|
|
|
15600
15625
|
//#endregion
|
|
15601
|
-
export { _classPrivateFieldInitSpec as a, _classPrivateFieldGet2 as i, Runtime as n,
|
|
15602
|
-
//# sourceMappingURL=reactPlugin-
|
|
15626
|
+
export { _classPrivateFieldInitSpec as a, _classPrivateFieldGet2 as i, Runtime as n, _classPrivateFieldSet2 as r, reactPlugin as t };
|
|
15627
|
+
//# sourceMappingURL=reactPlugin-CAtVV84d.js.map
|