@kubb/react-fabric 0.9.5 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/{devtools-D6dZodXp.js → devtools-8_UKWDTl.js} +1 -1
  2. package/dist/{devtools-D6dZodXp.js.map → devtools-8_UKWDTl.js.map} +1 -1
  3. package/dist/{devtools-CRkwwngz.cjs → devtools-BOpUJhc_.cjs} +1 -1
  4. package/dist/{devtools-CRkwwngz.cjs.map → devtools-BOpUJhc_.cjs.map} +1 -1
  5. package/dist/devtools.cjs +1 -1
  6. package/dist/devtools.js +1 -1
  7. package/dist/globals.d.cts +1 -1
  8. package/dist/globals.d.ts +1 -1
  9. package/dist/index.cjs +88 -60
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.d.cts +209 -57
  12. package/dist/index.d.ts +191 -39
  13. package/dist/index.js +73 -55
  14. package/dist/index.js.map +1 -1
  15. package/dist/jsx-dev-runtime.d.cts +2 -2
  16. package/dist/jsx-dev-runtime.d.ts +2 -2
  17. package/dist/{jsx-namespace-CCPa1Nut.d.cts → jsx-namespace-BnoysbjP.d.cts} +2 -2
  18. package/dist/{jsx-namespace-BAkGpU6g.d.ts → jsx-namespace-D0a66_uR.d.ts} +2 -2
  19. package/dist/{jsx-runtime-BEVcoJUm.cjs → jsx-runtime-Cq39dA50.cjs} +1 -1
  20. package/dist/{jsx-runtime-BEVcoJUm.cjs.map → jsx-runtime-Cq39dA50.cjs.map} +1 -1
  21. package/dist/{jsx-runtime-DDu0mFTI.js → jsx-runtime-Isgf9orn.js} +1 -1
  22. package/dist/{jsx-runtime-DDu0mFTI.js.map → jsx-runtime-Isgf9orn.js.map} +1 -1
  23. package/dist/jsx-runtime.cjs +1 -1
  24. package/dist/jsx-runtime.d.cts +2 -2
  25. package/dist/jsx-runtime.d.ts +2 -2
  26. package/dist/jsx-runtime.js +1 -1
  27. package/dist/plugins.cjs +2 -2
  28. package/dist/plugins.js +2 -2
  29. package/dist/{reactPlugin-CXaAO13f.cjs → reactPlugin-D4SmGYbm.cjs} +52 -59
  30. package/dist/reactPlugin-D4SmGYbm.cjs.map +1 -0
  31. package/dist/{reactPlugin-ixOr00MK.js → reactPlugin-DT9toQPK.js} +53 -48
  32. package/dist/reactPlugin-DT9toQPK.js.map +1 -0
  33. package/dist/{types-CSUzVTpn.d.ts → types-BL7PkfqA.d.ts} +7 -5
  34. package/dist/{types-DP2mgqeb.d.cts → types-BdOHT5YF.d.cts} +7 -5
  35. package/dist/types.d.cts +1 -1
  36. package/dist/types.d.ts +1 -1
  37. package/package.json +3 -3
  38. package/src/components/App.tsx +7 -14
  39. package/src/components/Const.tsx +3 -0
  40. package/src/components/File.tsx +39 -22
  41. package/src/components/Function.tsx +10 -0
  42. package/src/components/Indent.tsx +3 -0
  43. package/src/components/Root.tsx +13 -14
  44. package/src/components/Type.tsx +4 -0
  45. package/src/composables/useApp.ts +1 -15
  46. package/src/composables/useFile.ts +1 -12
  47. package/src/composables/useLifecycle.tsx +7 -8
  48. package/src/index.ts +5 -1
  49. package/src/types.ts +0 -4
  50. package/src/utils/createJSDoc.ts +1 -8
  51. package/dist/reactPlugin-CXaAO13f.cjs.map +0 -1
  52. package/dist/reactPlugin-ixOr00MK.js.map +0 -1
@@ -1,12 +1,52 @@
1
1
  const require_chunk = require('./chunk-BrXtsOCC.cjs');
2
2
  const require_react$1 = require('./react-CWV4qQg2.cjs');
3
- const require_jsx_runtime = require('./jsx-runtime-BEVcoJUm.cjs');
3
+ const require_jsx_runtime = require('./jsx-runtime-Cq39dA50.cjs');
4
+ let _kubb_fabric_core = require("@kubb/fabric-core");
4
5
  let signal_exit = require("signal-exit");
5
6
  let _kubb_fabric_core_plugins = require("@kubb/fabric-core/plugins");
6
7
  let node_process = require("node:process");
7
8
  node_process = require_chunk.__toESM(node_process);
8
9
  let _kubb_fabric_core_parsers_typescript = require("@kubb/fabric-core/parsers/typescript");
9
10
 
11
+ //#region ../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.2.1/node_modules/react-reconciler/cjs/react-reconciler-constants.production.js
12
+ /**
13
+ * @license React
14
+ * react-reconciler-constants.production.js
15
+ *
16
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
17
+ *
18
+ * This source code is licensed under the MIT license found in the
19
+ * LICENSE file in the root directory of this source tree.
20
+ */
21
+ var require_react_reconciler_constants_production = /* @__PURE__ */ require_chunk.__commonJSMin(((exports) => {
22
+ exports.ConcurrentRoot = 1;
23
+ exports.DefaultEventPriority = 32;
24
+ exports.NoEventPriority = 0;
25
+ }));
26
+
27
+ //#endregion
28
+ //#region ../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.2.1/node_modules/react-reconciler/cjs/react-reconciler-constants.development.js
29
+ /**
30
+ * @license React
31
+ * react-reconciler-constants.development.js
32
+ *
33
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
34
+ *
35
+ * This source code is licensed under the MIT license found in the
36
+ * LICENSE file in the root directory of this source tree.
37
+ */
38
+ var require_react_reconciler_constants_development = /* @__PURE__ */ require_chunk.__commonJSMin(((exports) => {
39
+ "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);
40
+ }));
41
+
42
+ //#endregion
43
+ //#region ../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.2.1/node_modules/react-reconciler/constants.js
44
+ var require_constants = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
45
+ if (process.env.NODE_ENV === "production") module.exports = require_react_reconciler_constants_production();
46
+ else module.exports = require_react_reconciler_constants_development();
47
+ }));
48
+
49
+ //#endregion
10
50
  //#region \0@oxc-project+runtime@0.103.0/helpers/typeof.js
11
51
  function _typeof(o) {
12
52
  "@babel/helpers - typeof";
@@ -68,60 +108,25 @@ var ErrorBoundary = class extends import_react.Component {
68
108
  }
69
109
  };
70
110
  _defineProperty(ErrorBoundary, "displayName", "KubbErrorBoundary");
71
- const RootContext = (0, import_react.createContext)({ exit: () => {} });
111
+ /**
112
+ * Provides the root context (exit hook) and wraps children into an
113
+ * ErrorBoundary so errors can be forwarded to the `onError` handler.
114
+ *
115
+ * This component provides the root behaviour for the React Fabric runtime.
116
+ *
117
+ * Returns a React node tree representing the root of the Fabric app.
118
+ */
72
119
  function Root({ onError, onExit: onExit$1, children }) {
120
+ (0, _kubb_fabric_core.provide)(_kubb_fabric_core.RootContext, { exit: onExit$1 });
73
121
  return /* @__PURE__ */ require_jsx_runtime.jsx(ErrorBoundary, {
74
122
  onError: (error) => {
75
123
  onError(error);
76
124
  },
77
- children: /* @__PURE__ */ require_jsx_runtime.jsx(RootContext.Provider, {
78
- value: { exit: onExit$1 },
79
- children
80
- })
125
+ children
81
126
  });
82
127
  }
83
- Root.Context = RootContext;
84
128
  Root.displayName = "KubbRoot";
85
129
 
86
- //#endregion
87
- //#region ../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.2.1/node_modules/react-reconciler/cjs/react-reconciler-constants.production.js
88
- /**
89
- * @license React
90
- * react-reconciler-constants.production.js
91
- *
92
- * Copyright (c) Meta Platforms, Inc. and affiliates.
93
- *
94
- * This source code is licensed under the MIT license found in the
95
- * LICENSE file in the root directory of this source tree.
96
- */
97
- var require_react_reconciler_constants_production = /* @__PURE__ */ require_chunk.__commonJSMin(((exports) => {
98
- exports.ConcurrentRoot = 1;
99
- exports.DefaultEventPriority = 32;
100
- exports.NoEventPriority = 0;
101
- }));
102
-
103
- //#endregion
104
- //#region ../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.2.1/node_modules/react-reconciler/cjs/react-reconciler-constants.development.js
105
- /**
106
- * @license React
107
- * react-reconciler-constants.development.js
108
- *
109
- * Copyright (c) Meta Platforms, Inc. and affiliates.
110
- *
111
- * This source code is licensed under the MIT license found in the
112
- * LICENSE file in the root directory of this source tree.
113
- */
114
- var require_react_reconciler_constants_development = /* @__PURE__ */ require_chunk.__commonJSMin(((exports) => {
115
- "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);
116
- }));
117
-
118
- //#endregion
119
- //#region ../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.2.1/node_modules/react-reconciler/constants.js
120
- var require_constants = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
121
- if (process.env.NODE_ENV === "production") module.exports = require_react_reconciler_constants_production();
122
- else module.exports = require_react_reconciler_constants_development();
123
- }));
124
-
125
130
  //#endregion
126
131
  //#region src/dom.ts
127
132
  const createNode = (nodeName) => {
@@ -15599,18 +15604,6 @@ const reactPlugin = (0, _kubb_fabric_core_plugins.definePlugin)({
15599
15604
  });
15600
15605
 
15601
15606
  //#endregion
15602
- Object.defineProperty(exports, 'Root', {
15603
- enumerable: true,
15604
- get: function () {
15605
- return Root;
15606
- }
15607
- });
15608
- Object.defineProperty(exports, 'RootContext', {
15609
- enumerable: true,
15610
- get: function () {
15611
- return RootContext;
15612
- }
15613
- });
15614
15607
  Object.defineProperty(exports, 'Runtime', {
15615
15608
  enumerable: true,
15616
15609
  get: function () {
@@ -15641,4 +15634,4 @@ Object.defineProperty(exports, 'reactPlugin', {
15641
15634
  return reactPlugin;
15642
15635
  }
15643
15636
  });
15644
- //# sourceMappingURL=reactPlugin-CXaAO13f.cjs.map
15637
+ //# sourceMappingURL=reactPlugin-D4SmGYbm.cjs.map