@kubb/react-fabric 0.1.0 → 0.1.2

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/index.cjs CHANGED
@@ -15552,7 +15552,7 @@ function processFiles(node, context) {
15552
15552
  footer: attributes.footer,
15553
15553
  banner: attributes.banner
15554
15554
  };
15555
- context.addFile(file);
15555
+ context.fileManager.add(file);
15556
15556
  }
15557
15557
  }
15558
15558
  }
@@ -15617,7 +15617,7 @@ var ReactTemplate = class {
15617
15617
  _defineProperty(this, "onRender", async () => {
15618
15618
  var _classPrivateFieldGet2$1, _classPrivateFieldGet3, _classPrivateFieldGet4, _classPrivateFieldGet5;
15619
15619
  if (_classPrivateFieldGet2(_isUnmounted, this)) return;
15620
- _classPrivateFieldGet2(_context, this).clear();
15620
+ _classPrivateFieldGet2(_context, this).fileManager.clear();
15621
15621
  processFiles(_classPrivateFieldGet2(_rootNode, this), _classPrivateFieldGet2(_context, this));
15622
15622
  if (!((_classPrivateFieldGet2$1 = _classPrivateFieldGet2(_context, this).options) === null || _classPrivateFieldGet2$1 === void 0 ? void 0 : _classPrivateFieldGet2$1.debug) && !((_classPrivateFieldGet3 = _classPrivateFieldGet2(_context, this).options) === null || _classPrivateFieldGet3 === void 0 ? void 0 : _classPrivateFieldGet3.stdout)) return;
15623
15623
  const output = await _assertClassBrand(_ReactTemplate_brand, this, _getOutput).call(this, _classPrivateFieldGet2(_rootNode, this), _classPrivateFieldGet2(_context, this));
@@ -15690,7 +15690,7 @@ var ReactTemplate = class {
15690
15690
  });
15691
15691
  KubbRenderer.updateContainerSync(element, _classPrivateFieldGet2(_container, this), null, null);
15692
15692
  KubbRenderer.flushSyncWork();
15693
- _classPrivateFieldGet2(_context, this).clear();
15693
+ _classPrivateFieldGet2(_context, this).fileManager.clear();
15694
15694
  return _assertClassBrand(_ReactTemplate_brand, this, _getOutput).call(this, _classPrivateFieldGet2(_rootNode, this), _classPrivateFieldGet2(_context, this));
15695
15695
  }
15696
15696
  unmount(error) {
@@ -15717,20 +15717,20 @@ var ReactTemplate = class {
15717
15717
  };
15718
15718
  async function _getOutput(node, context) {
15719
15719
  const text = squashTextNodes(node);
15720
- const files = context.files;
15720
+ const files = context.fileManager.files;
15721
15721
  return files.length ? [...files].flatMap((file) => [...file.sources].map((item) => item.value)).filter(Boolean).join("\n\n") : text;
15722
15722
  }
15723
15723
 
15724
15724
  //#endregion
15725
15725
  //#region src/createApp.ts
15726
- const createApp = (0, __kubb_fabric_core.defineApp)((app, context) => {
15726
+ const createApp = (0, __kubb_fabric_core.defineApp)((App$1, context) => {
15727
15727
  const template = new ReactTemplate(context);
15728
15728
  return {
15729
15729
  render() {
15730
- template.render((0, import_react.createElement)(app));
15730
+ template.render((0, import_react.createElement)(App$1));
15731
15731
  },
15732
15732
  async renderToString() {
15733
- return template.renderToString((0, import_react.createElement)(app));
15733
+ return template.renderToString((0, import_react.createElement)(App$1));
15734
15734
  },
15735
15735
  waitUntilExit() {
15736
15736
  return template.waitUntilExit();