@kubb/react-fabric 0.1.8 → 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.
- package/README.md +273 -26
- package/dist/{App-D7ehObix.d.ts → Fabric-nxgJyzWH.d.cts} +27 -27
- package/dist/{App-CbT7rbmH.d.cts → Fabric-tVWTpMR5.d.ts} +27 -27
- package/dist/{KubbFile-D4gyyfL-.d.ts → KubbFile-DFnA3mmn.d.ts} +1 -1
- package/dist/{KubbFile-FGXV713i.d.cts → KubbFile-DHCtBOpy.d.cts} +1 -1
- package/dist/chunk-CVmoYqME.js +27 -0
- package/dist/chunk-DWy1uDak.cjs +39 -0
- package/dist/devtools-DPye8o33.js +11448 -0
- package/dist/devtools-DPye8o33.js.map +1 -0
- package/dist/devtools-DnQsy6Us.cjs +11456 -0
- package/dist/devtools-DnQsy6Us.cjs.map +1 -0
- package/dist/devtools.cjs +2 -10885
- package/dist/devtools.d.cts +11 -1
- package/dist/devtools.d.ts +11 -1
- package/dist/devtools.js +2 -10885
- package/dist/{globals-BRG2DOJd.d.cts → globals-C7dPa-nz.d.cts} +3 -3
- package/dist/{globals-D_1Lfe9-.d.ts → globals-CxZEi_Pn.d.ts} +3 -3
- package/dist/globals.d.cts +3 -3
- package/dist/globals.d.ts +3 -3
- package/dist/index.cjs +34 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -9
- package/dist/index.d.ts +16 -9
- package/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.cjs +8 -0
- package/dist/jsx-dev-runtime.js +5 -0
- package/dist/jsx-runtime-9ohe6OS2.cjs +36 -0
- package/dist/jsx-runtime-9ohe6OS2.cjs.map +1 -0
- package/dist/{react-BBkwFtZV.js → jsx-runtime-BOrVcbIT.cjs} +253 -42
- package/dist/jsx-runtime-BOrVcbIT.cjs.map +1 -0
- package/dist/{react-Bq0UOw6S.cjs → jsx-runtime-CFd_ktZn.js} +239 -57
- package/dist/jsx-runtime-CFd_ktZn.js.map +1 -0
- package/dist/jsx-runtime-CvGZkcTo.js +13 -0
- package/dist/jsx-runtime-CvGZkcTo.js.map +1 -0
- package/dist/jsx-runtime.cjs +6 -15
- package/dist/jsx-runtime.d.cts +3 -3
- package/dist/jsx-runtime.d.ts +3 -3
- package/dist/jsx-runtime.js +3 -12
- package/dist/parsers.d.cts +2 -2
- package/dist/parsers.d.ts +2 -2
- package/dist/{Runtime-JI640uK4.cjs → plugins-CEGJdkpj.cjs} +115 -81
- package/dist/plugins-CEGJdkpj.cjs.map +1 -0
- package/dist/{Runtime-DWlDUeLZ.js → plugins-aZCNhIC8.js} +90 -63
- package/dist/plugins-aZCNhIC8.js.map +1 -0
- package/dist/plugins.cjs +4 -35
- package/dist/plugins.d.cts +16 -49
- package/dist/plugins.d.ts +16 -49
- package/dist/plugins.js +3 -33
- package/dist/reactPlugin-B47Guoya.d.ts +38 -0
- package/dist/reactPlugin-CLgWWifj.d.cts +38 -0
- package/dist/{types-C3p0Ljxf.d.cts → types-DoYRYV1C.d.cts} +1 -1
- package/dist/{types-Brnyan9B.d.ts → types-u_NEi07i.d.ts} +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +11 -7
- package/src/Renderer.ts +26 -22
- package/src/Runtime.tsx +8 -7
- package/src/createReactFabric.ts +17 -0
- package/src/devtools.ts +106 -111
- package/src/index.ts +2 -1
- package/src/plugins/reactPlugin.ts +4 -3
- package/dist/Runtime-DWlDUeLZ.js.map +0 -1
- package/dist/Runtime-JI640uK4.cjs.map +0 -1
- package/dist/devtools.cjs.map +0 -1
- package/dist/devtools.js.map +0 -1
- package/dist/jsx-runtime-Dg-pJBHd.js +0 -228
- package/dist/jsx-runtime-Dg-pJBHd.js.map +0 -1
- package/dist/jsx-runtime-d2dmYscH.cjs +0 -233
- package/dist/jsx-runtime-d2dmYscH.cjs.map +0 -1
- package/dist/jsx-runtime.cjs.map +0 -1
- package/dist/jsx-runtime.js.map +0 -1
- package/dist/plugins.cjs.map +0 -1
- package/dist/plugins.js.map +0 -1
- package/dist/react-BBkwFtZV.js.map +0 -1
- package/dist/react-Bq0UOw6S.cjs.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import { t as require_jsx_runtime } from "./jsx-runtime-
|
|
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
|
|
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
|
-
|
|
15192
|
-
|
|
15193
|
-
|
|
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
|
-
|
|
15203
|
-
|
|
15204
|
-
|
|
15205
|
-
},
|
|
15206
|
-
trackSchedulerEvent: function() {
|
|
15207
|
-
throw new Error("Function not implemented.");
|
|
15170
|
+
trackSchedulerEvent() {},
|
|
15171
|
+
resolveEventType() {
|
|
15172
|
+
return null;
|
|
15208
15173
|
},
|
|
15209
|
-
|
|
15210
|
-
|
|
15174
|
+
resolveEventTimeStamp() {
|
|
15175
|
+
return -1.1;
|
|
15211
15176
|
},
|
|
15212
|
-
|
|
15213
|
-
|
|
15177
|
+
preloadInstance() {
|
|
15178
|
+
return true;
|
|
15214
15179
|
},
|
|
15215
|
-
|
|
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());
|
|
@@ -15393,11 +15393,11 @@ var Runtime = class {
|
|
|
15393
15393
|
const originalError = console.error;
|
|
15394
15394
|
console.error = (data) => {
|
|
15395
15395
|
const message = typeof data === "string" ? data : data === null || data === void 0 ? void 0 : data.message;
|
|
15396
|
-
if (message.match(/Encountered two children with the same key/gi)) return;
|
|
15397
|
-
if (message.match(/React will try to recreat/gi)) return;
|
|
15398
|
-
if (message.match(/Each child in a list should have a unique/gi)) return;
|
|
15399
|
-
if (message.match(/The above error occurred in the <KubbErrorBoundary/gi)) return;
|
|
15400
|
-
if (message.match(/A React Element from an older version of React was render/gi)) return;
|
|
15396
|
+
if (message === null || message === void 0 ? void 0 : message.match(/Encountered two children with the same key/gi)) return;
|
|
15397
|
+
if (message === null || message === void 0 ? void 0 : message.match(/React will try to recreat/gi)) return;
|
|
15398
|
+
if (message === null || message === void 0 ? void 0 : message.match(/Each child in a list should have a unique/gi)) return;
|
|
15399
|
+
if (message === null || message === void 0 ? void 0 : message.match(/The above error occurred in the <KubbErrorBoundary/gi)) return;
|
|
15400
|
+
if (message === null || message === void 0 ? void 0 : message.match(/A React Element from an older version of React was render/gi)) return;
|
|
15401
15401
|
originalError(data);
|
|
15402
15402
|
};
|
|
15403
15403
|
const logRecoverableError = typeof reportError === "function" ? reportError : console.error;
|
|
@@ -15414,8 +15414,8 @@ var Runtime = class {
|
|
|
15414
15414
|
this.unmount(code);
|
|
15415
15415
|
}, { alwaysLast: false }).bind(this);
|
|
15416
15416
|
Renderer.injectIntoDevTools({
|
|
15417
|
-
bundleType:
|
|
15418
|
-
version: "19.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
|
-
|
|
15482
|
-
|
|
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
|