@kubb/react-fabric 0.2.0 → 0.2.1

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 (76) hide show
  1. package/README.md +49 -78
  2. package/dist/{App-D7ehObix.d.ts → Fabric-nxgJyzWH.d.cts} +27 -27
  3. package/dist/{App-CbT7rbmH.d.cts → Fabric-tVWTpMR5.d.ts} +27 -27
  4. package/dist/{KubbFile-D4gyyfL-.d.ts → KubbFile-DFnA3mmn.d.ts} +1 -1
  5. package/dist/{KubbFile-FGXV713i.d.cts → KubbFile-DHCtBOpy.d.cts} +1 -1
  6. package/dist/chunk-CVmoYqME.js +27 -0
  7. package/dist/chunk-DWy1uDak.cjs +39 -0
  8. package/dist/devtools-DPye8o33.js +11448 -0
  9. package/dist/devtools-DPye8o33.js.map +1 -0
  10. package/dist/devtools-DnQsy6Us.cjs +11456 -0
  11. package/dist/devtools-DnQsy6Us.cjs.map +1 -0
  12. package/dist/devtools.cjs +2 -10885
  13. package/dist/devtools.d.cts +11 -1
  14. package/dist/devtools.d.ts +11 -1
  15. package/dist/devtools.js +2 -10885
  16. package/dist/{globals-BRG2DOJd.d.cts → globals-C7dPa-nz.d.cts} +3 -3
  17. package/dist/{globals-D_1Lfe9-.d.ts → globals-CxZEi_Pn.d.ts} +3 -3
  18. package/dist/globals.d.cts +3 -3
  19. package/dist/globals.d.ts +3 -3
  20. package/dist/index.cjs +34 -23
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.cts +16 -9
  23. package/dist/index.d.ts +16 -9
  24. package/dist/index.js +15 -5
  25. package/dist/index.js.map +1 -1
  26. package/dist/jsx-dev-runtime.cjs +8 -0
  27. package/dist/jsx-dev-runtime.js +5 -0
  28. package/dist/jsx-runtime-9ohe6OS2.cjs +36 -0
  29. package/dist/jsx-runtime-9ohe6OS2.cjs.map +1 -0
  30. package/dist/{react-BBkwFtZV.js → jsx-runtime-BOrVcbIT.cjs} +253 -42
  31. package/dist/jsx-runtime-BOrVcbIT.cjs.map +1 -0
  32. package/dist/{react-Bq0UOw6S.cjs → jsx-runtime-CFd_ktZn.js} +239 -57
  33. package/dist/jsx-runtime-CFd_ktZn.js.map +1 -0
  34. package/dist/jsx-runtime-CvGZkcTo.js +13 -0
  35. package/dist/jsx-runtime-CvGZkcTo.js.map +1 -0
  36. package/dist/jsx-runtime.cjs +6 -15
  37. package/dist/jsx-runtime.d.cts +3 -3
  38. package/dist/jsx-runtime.d.ts +3 -3
  39. package/dist/jsx-runtime.js +3 -12
  40. package/dist/parsers.d.cts +2 -2
  41. package/dist/parsers.d.ts +2 -2
  42. package/dist/{Runtime-DJ4dWT9w.cjs → plugins-CEGJdkpj.cjs} +110 -76
  43. package/dist/plugins-CEGJdkpj.cjs.map +1 -0
  44. package/dist/{Runtime-CatKeybQ.js → plugins-aZCNhIC8.js} +85 -58
  45. package/dist/plugins-aZCNhIC8.js.map +1 -0
  46. package/dist/plugins.cjs +4 -36
  47. package/dist/plugins.d.cts +16 -49
  48. package/dist/plugins.d.ts +16 -49
  49. package/dist/plugins.js +3 -34
  50. package/dist/reactPlugin-B47Guoya.d.ts +38 -0
  51. package/dist/reactPlugin-CLgWWifj.d.cts +38 -0
  52. package/dist/{types-C3p0Ljxf.d.cts → types-DoYRYV1C.d.cts} +1 -1
  53. package/dist/{types-Brnyan9B.d.ts → types-u_NEi07i.d.ts} +1 -1
  54. package/dist/types.d.cts +1 -1
  55. package/dist/types.d.ts +1 -1
  56. package/package.json +10 -6
  57. package/src/Renderer.ts +26 -22
  58. package/src/Runtime.tsx +2 -2
  59. package/src/createReactFabric.ts +17 -0
  60. package/src/devtools.ts +106 -111
  61. package/src/index.ts +2 -1
  62. package/src/plugins/reactPlugin.ts +3 -3
  63. package/dist/Runtime-CatKeybQ.js.map +0 -1
  64. package/dist/Runtime-DJ4dWT9w.cjs.map +0 -1
  65. package/dist/devtools.cjs.map +0 -1
  66. package/dist/devtools.js.map +0 -1
  67. package/dist/jsx-runtime-Dg-pJBHd.js +0 -228
  68. package/dist/jsx-runtime-Dg-pJBHd.js.map +0 -1
  69. package/dist/jsx-runtime-d2dmYscH.cjs +0 -233
  70. package/dist/jsx-runtime-d2dmYscH.cjs.map +0 -1
  71. package/dist/jsx-runtime.cjs.map +0 -1
  72. package/dist/jsx-runtime.js.map +0 -1
  73. package/dist/plugins.cjs.map +0 -1
  74. package/dist/plugins.js.map +0 -1
  75. package/dist/react-BBkwFtZV.js.map +0 -1
  76. package/dist/react-Bq0UOw6S.cjs.map +0 -1
@@ -1,5 +1,6 @@
1
- import { n as __commonJS, r as __toESM, t as require_react } from "./react-BBkwFtZV.js";
2
- import { t as require_jsx_runtime } from "./jsx-runtime-Dg-pJBHd.js";
1
+ import { n as __toESM, t as __commonJS } from "./chunk-CVmoYqME.js";
2
+ import { n as require_react, t as require_jsx_runtime } from "./jsx-runtime-CFd_ktZn.js";
3
+ import { createPlugin } from "@kubb/fabric-core/plugins";
3
4
  import process$1 from "node:process";
4
5
  import { onExit } from "signal-exit";
5
6
  import { createExport, createImport, print } from "@kubb/fabric-core/parsers/typescript";
@@ -85,37 +86,6 @@ function Root({ onError, onExit: onExit$1, children }) {
85
86
  Root.Context = RootContext;
86
87
  Root.displayName = "KubbRoot";
87
88
 
88
- //#endregion
89
- //#region \0@oxc-project+runtime@0.95.0/helpers/checkPrivateRedeclaration.js
90
- function _checkPrivateRedeclaration(e, t) {
91
- if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
92
- }
93
-
94
- //#endregion
95
- //#region \0@oxc-project+runtime@0.95.0/helpers/classPrivateFieldInitSpec.js
96
- function _classPrivateFieldInitSpec(e, t, a) {
97
- _checkPrivateRedeclaration(e, t), t.set(e, a);
98
- }
99
-
100
- //#endregion
101
- //#region \0@oxc-project+runtime@0.95.0/helpers/assertClassBrand.js
102
- function _assertClassBrand(e, t, n) {
103
- if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
104
- throw new TypeError("Private element is not present on this object");
105
- }
106
-
107
- //#endregion
108
- //#region \0@oxc-project+runtime@0.95.0/helpers/classPrivateFieldSet2.js
109
- function _classPrivateFieldSet2(s, a, r) {
110
- return s.set(_assertClassBrand(s, a), r), r;
111
- }
112
-
113
- //#endregion
114
- //#region \0@oxc-project+runtime@0.95.0/helpers/classPrivateFieldGet2.js
115
- function _classPrivateFieldGet2(s, a) {
116
- return s.get(_assertClassBrand(s, a));
117
- }
118
-
119
89
  //#endregion
120
90
  //#region ../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.2.0/node_modules/react-reconciler/cjs/react-reconciler-constants.production.js
121
91
  var require_react_reconciler_constants_production = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.2.0/node_modules/react-reconciler/cjs/react-reconciler-constants.production.js": ((exports) => {
@@ -15168,7 +15138,6 @@ const Renderer = (0, import_react_reconciler.default)({
15168
15138
  removeChildFromContainer(node, removeNode) {
15169
15139
  removeChildNode(node, removeNode);
15170
15140
  },
15171
- resetFormInstance() {},
15172
15141
  commitMount() {},
15173
15142
  commitUpdate(node, _payload, _type, _oldProps, newProps) {
15174
15143
  const { props } = newProps;
@@ -15184,35 +15153,35 @@ const Renderer = (0, import_react_reconciler.default)({
15184
15153
  currentUpdatePriority = newPriority;
15185
15154
  },
15186
15155
  getCurrentUpdatePriority: () => currentUpdatePriority,
15187
- resolveUpdatePriority: () => currentUpdatePriority || import_constants$1.DefaultEventPriority,
15156
+ resolveUpdatePriority() {
15157
+ if (currentUpdatePriority !== import_constants$1.NoEventPriority) return currentUpdatePriority;
15158
+ return import_constants$1.DefaultEventPriority;
15159
+ },
15188
15160
  maySuspendCommit() {
15189
15161
  return false;
15190
15162
  },
15191
- startSuspendingCommit() {},
15192
- waitForCommitToBeReady() {
15193
- return null;
15194
- },
15195
- preloadInstance() {
15196
- return true;
15197
- },
15198
- suspendInstance() {},
15163
+ NotPendingTransition: void 0,
15164
+ HostTransitionContext: (0, import_react.createContext)(null),
15165
+ resetFormInstance() {},
15166
+ requestPostPaintCallback() {},
15199
15167
  shouldAttemptEagerTransition() {
15200
15168
  return false;
15201
15169
  },
15202
- NotPendingTransition: void 0,
15203
- requestPostPaintCallback: function(_callback) {
15204
- throw new Error("Function not implemented.");
15205
- },
15206
- trackSchedulerEvent: function() {
15207
- throw new Error("Function not implemented.");
15170
+ trackSchedulerEvent() {},
15171
+ resolveEventType() {
15172
+ return null;
15208
15173
  },
15209
- resolveEventType: function() {
15210
- throw new Error("Function not implemented.");
15174
+ resolveEventTimeStamp() {
15175
+ return -1.1;
15211
15176
  },
15212
- resolveEventTimeStamp: function() {
15213
- throw new Error("Function not implemented.");
15177
+ preloadInstance() {
15178
+ return true;
15214
15179
  },
15215
- HostTransitionContext: void 0
15180
+ startSuspendingCommit() {},
15181
+ suspendInstance() {},
15182
+ waitForCommitToBeReady() {
15183
+ return null;
15184
+ }
15216
15185
  });
15217
15186
 
15218
15187
  //#endregion
@@ -15342,12 +15311,43 @@ function processFiles(node, fileManager) {
15342
15311
  }
15343
15312
  }
15344
15313
 
15314
+ //#endregion
15315
+ //#region \0@oxc-project+runtime@0.95.0/helpers/checkPrivateRedeclaration.js
15316
+ function _checkPrivateRedeclaration(e, t) {
15317
+ if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
15318
+ }
15319
+
15345
15320
  //#endregion
15346
15321
  //#region \0@oxc-project+runtime@0.95.0/helpers/classPrivateMethodInitSpec.js
15347
15322
  function _classPrivateMethodInitSpec(e, a) {
15348
15323
  _checkPrivateRedeclaration(e, a), a.add(e);
15349
15324
  }
15350
15325
 
15326
+ //#endregion
15327
+ //#region \0@oxc-project+runtime@0.95.0/helpers/classPrivateFieldInitSpec.js
15328
+ function _classPrivateFieldInitSpec(e, t, a) {
15329
+ _checkPrivateRedeclaration(e, t), t.set(e, a);
15330
+ }
15331
+
15332
+ //#endregion
15333
+ //#region \0@oxc-project+runtime@0.95.0/helpers/assertClassBrand.js
15334
+ function _assertClassBrand(e, t, n) {
15335
+ if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
15336
+ throw new TypeError("Private element is not present on this object");
15337
+ }
15338
+
15339
+ //#endregion
15340
+ //#region \0@oxc-project+runtime@0.95.0/helpers/classPrivateFieldGet2.js
15341
+ function _classPrivateFieldGet2(s, a) {
15342
+ return s.get(_assertClassBrand(s, a));
15343
+ }
15344
+
15345
+ //#endregion
15346
+ //#region \0@oxc-project+runtime@0.95.0/helpers/classPrivateFieldSet2.js
15347
+ function _classPrivateFieldSet2(s, a, r) {
15348
+ return s.set(_assertClassBrand(s, a), r), r;
15349
+ }
15350
+
15351
15351
  //#endregion
15352
15352
  //#region src/Runtime.tsx
15353
15353
  var import_constants = /* @__PURE__ */ __toESM(require_constants());
@@ -15414,8 +15414,8 @@ var Runtime = class {
15414
15414
  this.unmount(code);
15415
15415
  }, { alwaysLast: false }).bind(this);
15416
15416
  Renderer.injectIntoDevTools({
15417
- bundleType: 0,
15418
- version: "19.1.1",
15417
+ bundleType: 1,
15418
+ version: "19.1.0",
15419
15419
  rendererPackageName: "kubb"
15420
15420
  });
15421
15421
  }
@@ -15478,5 +15478,32 @@ async function _getOutput(node) {
15478
15478
  }
15479
15479
 
15480
15480
  //#endregion
15481
- export { Root as a, _classPrivateFieldInitSpec as i, _classPrivateFieldGet2 as n, RootContext as o, _classPrivateFieldSet2 as r, Runtime as t };
15482
- //# sourceMappingURL=Runtime-CatKeybQ.js.map
15481
+ //#region src/plugins/reactPlugin.ts
15482
+ const reactPlugin = createPlugin({
15483
+ name: "react",
15484
+ install() {},
15485
+ inject(app, options = {}) {
15486
+ const runtime = new Runtime({
15487
+ fileManager: app.context.fileManager,
15488
+ ...options
15489
+ });
15490
+ return {
15491
+ async render(App) {
15492
+ runtime.render((0, import_react.createElement)(App));
15493
+ await app.context.events.emit("start");
15494
+ },
15495
+ async renderToString(App) {
15496
+ await app.context.events.emit("start");
15497
+ return runtime.renderToString((0, import_react.createElement)(App));
15498
+ },
15499
+ async waitUntilExit() {
15500
+ await runtime.waitUntilExit();
15501
+ await app.context.events.emit("end");
15502
+ }
15503
+ };
15504
+ }
15505
+ });
15506
+
15507
+ //#endregion
15508
+ export { _classPrivateFieldInitSpec as a, _classPrivateFieldGet2 as i, Runtime as n, Root as o, _classPrivateFieldSet2 as r, RootContext as s, reactPlugin as t };
15509
+ //# sourceMappingURL=plugins-aZCNhIC8.js.map