@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,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-DDu0mFTI.js";
3
+ import { n as jsx } from "./jsx-runtime-Isgf9orn.js";
4
+ import { RootContext, 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
- const RootContext = (0, import_react.createContext)({ exit: () => {} });
110
+ /**
111
+ * Provides the root context (exit hook) and wraps children into an
112
+ * ErrorBoundary so errors can be forwarded to the `onError` handler.
113
+ *
114
+ * This component provides the root behaviour for the React Fabric runtime.
115
+ *
116
+ * Returns a React node tree representing the root of the Fabric app.
117
+ */
71
118
  function Root({ onError, onExit: onExit$1, children }) {
119
+ provide(RootContext, { exit: onExit$1 });
72
120
  return /* @__PURE__ */ jsx(ErrorBoundary, {
73
121
  onError: (error) => {
74
122
  onError(error);
75
123
  },
76
- children: /* @__PURE__ */ jsx(RootContext.Provider, {
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) => {
@@ -15598,5 +15603,5 @@ const reactPlugin = definePlugin({
15598
15603
  });
15599
15604
 
15600
15605
  //#endregion
15601
- export { _classPrivateFieldInitSpec as a, _classPrivateFieldGet2 as i, Runtime as n, Root as o, _classPrivateFieldSet2 as r, RootContext as s, reactPlugin as t };
15602
- //# sourceMappingURL=reactPlugin-ixOr00MK.js.map
15606
+ export { _classPrivateFieldInitSpec as a, _classPrivateFieldGet2 as i, Runtime as n, _classPrivateFieldSet2 as r, reactPlugin as t };
15607
+ //# sourceMappingURL=reactPlugin-DT9toQPK.js.map