@kubb/react-fabric 0.2.1 → 0.2.3

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 (55) hide show
  1. package/dist/{Fabric-tVWTpMR5.d.ts → Fabric-CoGYXq1o.d.ts} +3 -3
  2. package/dist/{Fabric-nxgJyzWH.d.cts → Fabric-PGwn47Lb.d.cts} +2 -2
  3. package/dist/{KubbFile-DFnA3mmn.d.ts → KubbFile-bFdmEsQz.d.ts} +1 -1
  4. package/dist/{devtools-DnQsy6Us.cjs → backend-BwCrJwGY.cjs} +27 -119
  5. package/dist/backend-BwCrJwGY.cjs.map +1 -0
  6. package/dist/{devtools-DPye8o33.js → backend-U2f8IEJ7.js} +27 -114
  7. package/dist/backend-U2f8IEJ7.js.map +1 -0
  8. package/dist/{chunk-CVmoYqME.js → chunk-9mlisOrp.js} +2 -1
  9. package/dist/{chunk-DWy1uDak.cjs → chunk-BaqVhFee.cjs} +7 -0
  10. package/dist/devtools-CYVZyenT.cjs +102 -0
  11. package/dist/devtools-CYVZyenT.cjs.map +1 -0
  12. package/dist/devtools-D7cmED8s.js +94 -0
  13. package/dist/devtools-D7cmED8s.js.map +1 -0
  14. package/dist/devtools.cjs +1 -1
  15. package/dist/devtools.js +1 -1
  16. package/dist/{globals-CxZEi_Pn.d.ts → globals-1MFa0Fvg.d.ts} +3 -3
  17. package/dist/globals.d.ts +3 -3
  18. package/dist/index.cjs +11 -10
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +12 -4
  21. package/dist/index.d.ts +14 -6
  22. package/dist/index.js +9 -7
  23. package/dist/index.js.map +1 -1
  24. package/dist/jsx-dev-runtime.cjs +2 -2
  25. package/dist/jsx-dev-runtime.js +2 -2
  26. package/dist/{jsx-runtime-9ohe6OS2.cjs → jsx-runtime-8_h1Kd4b.cjs} +3 -3
  27. package/dist/{jsx-runtime-9ohe6OS2.cjs.map → jsx-runtime-8_h1Kd4b.cjs.map} +1 -1
  28. package/dist/{jsx-runtime-CvGZkcTo.js → jsx-runtime-BJX2mL7C.js} +3 -3
  29. package/dist/{jsx-runtime-CvGZkcTo.js.map → jsx-runtime-BJX2mL7C.js.map} +1 -1
  30. package/dist/{jsx-runtime-CFd_ktZn.js → jsx-runtime-C9xQ4GQD.js} +2 -2
  31. package/dist/{jsx-runtime-CFd_ktZn.js.map → jsx-runtime-C9xQ4GQD.js.map} +1 -1
  32. package/dist/{jsx-runtime-BOrVcbIT.cjs → jsx-runtime-CSnwG7o6.cjs} +2 -2
  33. package/dist/{jsx-runtime-BOrVcbIT.cjs.map → jsx-runtime-CSnwG7o6.cjs.map} +1 -1
  34. package/dist/jsx-runtime.cjs +2 -2
  35. package/dist/jsx-runtime.d.ts +3 -3
  36. package/dist/jsx-runtime.js +2 -2
  37. package/dist/parsers.d.cts +1 -1
  38. package/dist/parsers.d.ts +2 -2
  39. package/dist/{plugins-CEGJdkpj.cjs → plugins-BQE1GnQ7.cjs} +3 -3
  40. package/dist/{plugins-CEGJdkpj.cjs.map → plugins-BQE1GnQ7.cjs.map} +1 -1
  41. package/dist/{plugins-aZCNhIC8.js → plugins-BVFjgEC2.js} +3 -3
  42. package/dist/{plugins-aZCNhIC8.js.map → plugins-BVFjgEC2.js.map} +1 -1
  43. package/dist/plugins.cjs +2 -2
  44. package/dist/plugins.d.cts +2 -2
  45. package/dist/plugins.d.ts +3 -3
  46. package/dist/plugins.js +2 -2
  47. package/dist/{reactPlugin-B47Guoya.d.ts → reactPlugin-CCty1XGl.d.ts} +2 -2
  48. package/dist/{reactPlugin-CLgWWifj.d.cts → reactPlugin-SuzV8fwK.d.cts} +2 -2
  49. package/dist/{types-u_NEi07i.d.ts → types-BnXxcIyv.d.ts} +1 -1
  50. package/dist/types.d.ts +1 -1
  51. package/package.json +2 -2
  52. package/src/devtools.ts +98 -96
  53. package/src/index.ts +1 -1
  54. package/dist/devtools-DPye8o33.js.map +0 -1
  55. package/dist/devtools-DnQsy6Us.cjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { i as File, o as Path, r as Extname, s as ResolvedFile } from "./KubbFile-DFnA3mmn.js";
1
+ import { i as File, o as Path, r as Extname, s as ResolvedFile } from "./KubbFile-bFdmEsQz.js";
2
2
 
3
3
  //#region ../fabric-core/src/plugins/types.d.ts
4
4
  type Plugin<TOptions = unknown, TAppExtension extends Record<string, any> = {}> = {
@@ -196,5 +196,5 @@ interface Fabric<TOptions extends FabricOptions = FabricOptions> extends Kubb.Fa
196
196
  addFile(...files: Array<File>): Promise<void>;
197
197
  }
198
198
  //#endregion
199
- export { Parser as a, UserPlugin as c, FileManager as i, FabricMode as n, UserParser as o, FabricOptions as r, Plugin as s, Fabric as t };
200
- //# sourceMappingURL=Fabric-tVWTpMR5.d.ts.map
199
+ export { FileProcessor as a, Plugin as c, FileManager as i, UserPlugin as l, FabricMode as n, Parser as o, FabricOptions as r, UserParser as s, Fabric as t };
200
+ //# sourceMappingURL=Fabric-CoGYXq1o.d.ts.map
@@ -196,5 +196,5 @@ interface Fabric<TOptions extends FabricOptions = FabricOptions> extends Kubb.Fa
196
196
  addFile(...files: Array<File>): Promise<void>;
197
197
  }
198
198
  //#endregion
199
- export { Parser as a, UserPlugin as c, FileManager as i, FabricMode as n, UserParser as o, FabricOptions as r, Plugin as s, Fabric as t };
200
- //# sourceMappingURL=Fabric-nxgJyzWH.d.cts.map
199
+ export { FileProcessor as a, Plugin as c, FileManager as i, UserPlugin as l, FabricMode as n, Parser as o, FabricOptions as r, UserParser as s, Fabric as t };
200
+ //# sourceMappingURL=Fabric-PGwn47Lb.d.cts.map
@@ -112,4 +112,4 @@ type ResolvedFile<TMeta extends object = object> = File<TMeta> & {
112
112
  };
113
113
  //#endregion
114
114
  export { Import as a, Source as c, File as i, Export as n, Path as o, Extname as r, ResolvedFile as s, BaseName as t };
115
- //# sourceMappingURL=KubbFile-DFnA3mmn.d.ts.map
115
+ //# sourceMappingURL=KubbFile-bFdmEsQz.d.ts.map
@@ -1,10 +1,4 @@
1
- const require_chunk = require('./chunk-DWy1uDak.cjs');
2
- let signal_exit = require("signal-exit");
3
- signal_exit = require_chunk.__toESM(signal_exit);
4
- let ws = require("ws");
5
- ws = require_chunk.__toESM(ws);
6
- let execa = require("execa");
7
- execa = require_chunk.__toESM(execa);
1
+ const require_chunk = require('./chunk-BaqVhFee.cjs');
8
2
 
9
3
  //#region ../../node_modules/.pnpm/react-devtools-core@6.1.2/node_modules/react-devtools-core/dist/backend.js
10
4
  var require_backend = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/react-devtools-core@6.1.2/node_modules/react-devtools-core/dist/backend.js": ((exports, module) => {
@@ -5443,7 +5437,7 @@ var require_backend = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
5443
5437
  function supportsConsoleTasks(componentInfo) {
5444
5438
  return !!componentInfo.debugTask;
5445
5439
  }
5446
- function attach(hook, rendererID, renderer, global$1) {
5440
+ function attach(hook, rendererID, renderer, global) {
5447
5441
  var getCurrentComponentInfo = renderer.getCurrentComponentInfo;
5448
5442
  function getComponentStack(topFrame) {
5449
5443
  if (getCurrentComponentInfo === void 0) return null;
@@ -7243,7 +7237,7 @@ var require_backend = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
7243
7237
  }
7244
7238
  }
7245
7239
  }
7246
- function renderer_attach(hook, rendererID, renderer, global$1, shouldStartProfilingNow, profilingSettings) {
7240
+ function renderer_attach(hook, rendererID, renderer, global, shouldStartProfilingNow, profilingSettings) {
7247
7241
  var version = renderer.reconcilerVersion || renderer.version;
7248
7242
  var _getInternalReactCons = getInternalReactConstants(version), getDisplayNameForFiber = _getInternalReactCons.getDisplayNameForFiber, getTypeSymbol = _getInternalReactCons.getTypeSymbol, ReactPriorityLevels = _getInternalReactCons.ReactPriorityLevels, ReactTypeOfWork = _getInternalReactCons.ReactTypeOfWork, StrictModeBits = _getInternalReactCons.StrictModeBits;
7249
7243
  var CacheComponent = ReactTypeOfWork.CacheComponent, ClassComponent = ReactTypeOfWork.ClassComponent, ContextConsumer = ReactTypeOfWork.ContextConsumer, DehydratedSuspenseComponent = ReactTypeOfWork.DehydratedSuspenseComponent, ForwardRef = ReactTypeOfWork.ForwardRef, Fragment = ReactTypeOfWork.Fragment, FunctionComponent = ReactTypeOfWork.FunctionComponent, HostRoot = ReactTypeOfWork.HostRoot, HostHoistable = ReactTypeOfWork.HostHoistable, HostSingleton = ReactTypeOfWork.HostSingleton, HostPortal = ReactTypeOfWork.HostPortal, HostComponent = ReactTypeOfWork.HostComponent, HostText = ReactTypeOfWork.HostText, IncompleteClassComponent = ReactTypeOfWork.IncompleteClassComponent, IncompleteFunctionComponent = ReactTypeOfWork.IncompleteFunctionComponent, IndeterminateComponent = ReactTypeOfWork.IndeterminateComponent, LegacyHiddenComponent = ReactTypeOfWork.LegacyHiddenComponent, MemoComponent = ReactTypeOfWork.MemoComponent, OffscreenComponent = ReactTypeOfWork.OffscreenComponent, SimpleMemoComponent = ReactTypeOfWork.SimpleMemoComponent, SuspenseComponent = ReactTypeOfWork.SuspenseComponent, SuspenseListComponent = ReactTypeOfWork.SuspenseListComponent, TracingMarkerComponent = ReactTypeOfWork.TracingMarkerComponent, Throw = ReactTypeOfWork.Throw, ViewTransitionComponent = ReactTypeOfWork.ViewTransitionComponent;
@@ -8930,18 +8924,18 @@ var require_backend = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
8930
8924
  case ClassComponent:
8931
8925
  case IncompleteClassComponent:
8932
8926
  case IndeterminateComponent:
8933
- global$1.$r = stateNode;
8927
+ global.$r = stateNode;
8934
8928
  break;
8935
8929
  case IncompleteFunctionComponent:
8936
8930
  case FunctionComponent:
8937
- global$1.$r = {
8931
+ global.$r = {
8938
8932
  hooks,
8939
8933
  props,
8940
8934
  type
8941
8935
  };
8942
8936
  break;
8943
8937
  case ForwardRef:
8944
- global$1.$r = {
8938
+ global.$r = {
8945
8939
  hooks,
8946
8940
  props,
8947
8941
  type: type.render
@@ -8949,14 +8943,14 @@ var require_backend = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
8949
8943
  break;
8950
8944
  case MemoComponent:
8951
8945
  case SimpleMemoComponent:
8952
- global$1.$r = {
8946
+ global.$r = {
8953
8947
  hooks,
8954
8948
  props,
8955
8949
  type: elementType != null && elementType.type != null ? elementType.type : type
8956
8950
  };
8957
8951
  break;
8958
8952
  default:
8959
- global$1.$r = null;
8953
+ global.$r = null;
8960
8954
  break;
8961
8955
  }
8962
8956
  }
@@ -9711,7 +9705,7 @@ var require_backend = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
9711
9705
  }
9712
9706
  return children;
9713
9707
  }
9714
- function legacy_renderer_attach(hook, rendererID, renderer, global$1) {
9708
+ function legacy_renderer_attach(hook, rendererID, renderer, global) {
9715
9709
  var idToInternalInstanceMap = /* @__PURE__ */ new Map();
9716
9710
  var internalInstanceToIDMap = /* @__PURE__ */ new WeakMap();
9717
9711
  var internalInstanceToRootIDMap = /* @__PURE__ */ new WeakMap();
@@ -10011,7 +10005,7 @@ var require_backend = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
10011
10005
  }
10012
10006
  switch (getElementType(internalInstance)) {
10013
10007
  case types_ElementTypeClass:
10014
- global$1.$r = internalInstance._instance;
10008
+ global.$r = internalInstance._instance;
10015
10009
  break;
10016
10010
  case types_ElementTypeFunction:
10017
10011
  var element = internalInstance._currentElement;
@@ -10019,13 +10013,13 @@ var require_backend = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
10019
10013
  console.warn("Could not find element with id \"".concat(id, "\""));
10020
10014
  return;
10021
10015
  }
10022
- global$1.$r = {
10016
+ global.$r = {
10023
10017
  props: element.props,
10024
10018
  type: element.type
10025
10019
  };
10026
10020
  break;
10027
10021
  default:
10028
- global$1.$r = null;
10022
+ global.$r = null;
10029
10023
  break;
10030
10024
  }
10031
10025
  }
@@ -10320,13 +10314,13 @@ var require_backend = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
10320
10314
  function isMatchingRender(version) {
10321
10315
  return !hasAssignedBackend(version);
10322
10316
  }
10323
- function attachRenderer(hook, id, renderer, global$1, shouldStartProfilingNow, profilingSettings) {
10317
+ function attachRenderer(hook, id, renderer, global, shouldStartProfilingNow, profilingSettings) {
10324
10318
  if (!isMatchingRender(renderer.reconcilerVersion || renderer.version)) return;
10325
10319
  var rendererInterface = hook.rendererInterfaces.get(id);
10326
10320
  if (rendererInterface == null) {
10327
- if (typeof renderer.getCurrentComponentInfo === "function") rendererInterface = attach(hook, id, renderer, global$1);
10328
- else if (typeof renderer.findFiberByHostInstance === "function" || renderer.currentDispatcherRef != null) rendererInterface = renderer_attach(hook, id, renderer, global$1, shouldStartProfilingNow, profilingSettings);
10329
- else if (renderer.ComponentTree) rendererInterface = legacy_renderer_attach(hook, id, renderer, global$1);
10321
+ if (typeof renderer.getCurrentComponentInfo === "function") rendererInterface = attach(hook, id, renderer, global);
10322
+ else if (typeof renderer.findFiberByHostInstance === "function" || renderer.currentDispatcherRef != null) rendererInterface = renderer_attach(hook, id, renderer, global, shouldStartProfilingNow, profilingSettings);
10323
+ else if (renderer.ComponentTree) rendererInterface = legacy_renderer_attach(hook, id, renderer, global);
10330
10324
  }
10331
10325
  return rendererInterface;
10332
10326
  }
@@ -10837,7 +10831,7 @@ var require_backend = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
10837
10831
  *
10838
10832
  *
10839
10833
  */
10840
- function initBackend(hook, agent$1, global$1, isReloadAndProfileSupported) {
10834
+ function initBackend(hook, agent$1, global, isReloadAndProfileSupported) {
10841
10835
  if (hook == null) return function() {};
10842
10836
  function registerRendererInterface(id, rendererInterface) {
10843
10837
  agent$1.registerRendererInterface(id, rendererInterface);
@@ -11224,11 +11218,11 @@ var require_backend = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
11224
11218
  var bridge = null;
11225
11219
  var messageListeners = [];
11226
11220
  var uri = protocol + "://" + host + ":" + port;
11227
- var ws$2 = websocket ? websocket : new window.WebSocket(uri);
11228
- ws$2.onclose = handleClose;
11229
- ws$2.onerror = handleFailed;
11230
- ws$2.onmessage = handleMessage;
11231
- ws$2.onopen = function() {
11221
+ var ws = websocket ? websocket : new window.WebSocket(uri);
11222
+ ws.onclose = handleClose;
11223
+ ws.onerror = handleFailed;
11224
+ ws.onmessage = handleMessage;
11225
+ ws.onopen = function() {
11232
11226
  bridge = new src_bridge({
11233
11227
  listen: function listen(fn) {
11234
11228
  messageListeners.push(fn);
@@ -11238,9 +11232,9 @@ var require_backend = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
11238
11232
  };
11239
11233
  },
11240
11234
  send: function send(event, payload, transferable) {
11241
- if (ws$2.readyState === ws$2.OPEN) {
11235
+ if (ws.readyState === ws.OPEN) {
11242
11236
  if (__DEBUG__) backend_debug("wall.send()", event, payload);
11243
- ws$2.send(JSON.stringify({
11237
+ ws.send(JSON.stringify({
11244
11238
  event,
11245
11239
  payload
11246
11240
  }));
@@ -11361,96 +11355,10 @@ var require_backend = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
11361
11355
  }) });
11362
11356
 
11363
11357
  //#endregion
11364
- //#region src/devtools.ts
11365
- var import_backend = /* @__PURE__ */ require_chunk.__toESM(require_backend(), 1);
11366
- function open() {
11367
- const customGlobal = global;
11368
- customGlobal.WebSocket || (customGlobal.WebSocket = ws.default);
11369
- customGlobal.window || (customGlobal.window = global);
11370
- customGlobal.self || (customGlobal.self = global);
11371
- customGlobal.isDevtoolsEnabled = true;
11372
- customGlobal.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ = [
11373
- {
11374
- type: 2,
11375
- value: "Context.Provider",
11376
- isEnabled: true,
11377
- isValid: true
11378
- },
11379
- {
11380
- type: 2,
11381
- value: "KubbRoot",
11382
- isEnabled: true,
11383
- isValid: true
11384
- },
11385
- {
11386
- type: 2,
11387
- value: "KubbErrorBoundary",
11388
- isEnabled: true,
11389
- isValid: true
11390
- },
11391
- {
11392
- type: 2,
11393
- value: "kubb-file",
11394
- isEnabled: true,
11395
- isValid: true
11396
- },
11397
- {
11398
- type: 2,
11399
- value: "kubb-text",
11400
- isEnabled: true,
11401
- isValid: true
11402
- },
11403
- {
11404
- type: 2,
11405
- value: "kubb-import",
11406
- isEnabled: true,
11407
- isValid: true
11408
- },
11409
- {
11410
- type: 2,
11411
- value: "kubb-export",
11412
- isEnabled: true,
11413
- isValid: true
11414
- },
11415
- {
11416
- type: 2,
11417
- value: "kubb-source",
11418
- isEnabled: true,
11419
- isValid: true
11420
- }
11421
- ];
11422
- console.info("Opening devtools");
11423
- const controller = new AbortController();
11424
- (0, execa.execa)({
11425
- stdio: "pipe",
11426
- preferLocal: true,
11427
- cancelSignal: controller.signal,
11428
- gracefulCancel: true
11429
- })`npx react-devtools`;
11430
- import_backend.default.initialize();
11431
- console.info("Connecting devtools");
11432
- try {
11433
- import_backend.default.connectToDevTools({
11434
- host: "localhost",
11435
- port: 8097,
11436
- useHttps: false,
11437
- isAppActive: () => true
11438
- });
11439
- } catch (e) {
11440
- console.error(e);
11441
- console.info("Error when connecting the devtools");
11442
- }
11443
- (0, signal_exit.onExit)(() => {
11444
- console.info("Disconnecting devtools");
11445
- controller.abort();
11446
- }, { alwaysLast: false });
11447
- }
11448
-
11449
- //#endregion
11450
- Object.defineProperty(exports, 'open', {
11358
+ Object.defineProperty(exports, 'default', {
11451
11359
  enumerable: true,
11452
11360
  get: function () {
11453
- return open;
11361
+ return require_backend();
11454
11362
  }
11455
11363
  });
11456
- //# sourceMappingURL=devtools-DnQsy6Us.cjs.map
11364
+ //# sourceMappingURL=backend-BwCrJwGY.cjs.map