@kubb/react-fabric 0.11.5 → 0.11.6
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/{Fabric-BELBf-bX.d.cts → Fabric-4Ac6xwwR.d.ts} +4 -2
- package/dist/{Fabric-8pppnIg0.d.ts → Fabric-xd8epqSF.d.cts} +1 -2
- package/dist/{TreeNode-Dqmg64Vf.d.cts → TreeNode-CoigrXFC.d.ts} +3 -3
- package/dist/{TreeNode-B5YhdIi1.d.ts → TreeNode-Pwm74f2F.d.cts} +2 -3
- package/dist/{chunk-BCPZiDLE.js → chunk-DkQCb-7t.js} +5 -1
- package/dist/globals.d.cts +3 -4
- package/dist/globals.d.ts +4 -4
- package/dist/index.cjs +110 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -24
- package/dist/index.d.ts +27 -24
- package/dist/index.js +107 -9
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.cjs +28 -12
- package/dist/jsx-dev-runtime.cjs.map +1 -1
- package/dist/jsx-dev-runtime.d.cts +6 -7
- package/dist/jsx-dev-runtime.d.ts +7 -7
- package/dist/jsx-dev-runtime.js +25 -8
- package/dist/jsx-dev-runtime.js.map +1 -1
- package/dist/{jsx-namespace-Cwg_oGAF.d.cts → jsx-namespace-CDB8OdrC.d.cts} +3 -3
- package/dist/{jsx-namespace-CfIw-cgT.d.ts → jsx-namespace-rawlYj_g.d.ts} +3 -3
- package/dist/{jsx-runtime-Cq39dA50.cjs → jsx-runtime-6sQc68DD.cjs} +30 -13
- package/dist/{jsx-runtime-Cq39dA50.cjs.map → jsx-runtime-6sQc68DD.cjs.map} +1 -1
- package/dist/{jsx-runtime-Isgf9orn.js → jsx-runtime-CT8FKS42.js} +27 -9
- package/dist/{jsx-runtime-Isgf9orn.js.map → jsx-runtime-CT8FKS42.js.map} +1 -1
- package/dist/jsx-runtime.cjs +2 -2
- package/dist/jsx-runtime.d.cts +6 -7
- package/dist/jsx-runtime.d.ts +7 -7
- package/dist/jsx-runtime.js +2 -2
- package/dist/parsers.d.cts +2 -3
- package/dist/parsers.d.ts +3 -3
- package/dist/plugins.cjs +3 -4
- package/dist/plugins.d.cts +3 -4
- package/dist/plugins.d.ts +4 -4
- package/dist/plugins.js +3 -4
- package/dist/{react-DfIUVisP.js → react-CDrFaZVO.js} +92 -32
- package/dist/{react-DfIUVisP.js.map → react-CDrFaZVO.js.map} +1 -1
- package/dist/{react-CWV4qQg2.cjs → react-DgrQzKJp.cjs} +144 -35
- package/dist/{react-CWV4qQg2.cjs.map → react-DgrQzKJp.cjs.map} +1 -1
- package/dist/{reactPlugin-0E3yLJvd.d.ts → reactPlugin-6pWd-WfZ.d.cts} +2 -3
- package/dist/{Renderer-CRT9gs-h.cjs → reactPlugin-BzGD_nR7.cjs} +11134 -8373
- package/dist/reactPlugin-BzGD_nR7.cjs.map +1 -0
- package/dist/{reactPlugin-yhmHKdUw.d.cts → reactPlugin-CpMrftCn.d.ts} +3 -3
- package/dist/{Renderer-CgXqdVqV.js → reactPlugin-lOa0xpGM.js} +11108 -8359
- package/dist/reactPlugin-lOa0xpGM.js.map +1 -0
- package/dist/{types-BKNiqRcq.d.cts → types-125Qu-Uh.d.ts} +4 -4
- package/dist/{types-BKiEQWrZ.d.ts → types-BrE57KWH.d.cts} +3 -4
- package/dist/types.d.cts +2 -2
- package/dist/types.d.ts +2 -2
- package/package.json +5 -12
- package/shims.d.ts +1 -0
- package/src/components/App.tsx +5 -0
- package/src/createReactFabric.ts +2 -2
- package/src/devtools.ts +3 -4
- package/src/index.ts +1 -1
- package/dist/Renderer-7rMwyODQ.cjs +0 -4
- package/dist/Renderer-CRT9gs-h.cjs.map +0 -1
- package/dist/Renderer-CgXqdVqV.js.map +0 -1
- package/dist/Renderer-D_r5OSso.js +0 -4
- package/dist/chunk-BrXtsOCC.cjs +0 -41
- package/dist/devtools-Cz49mTX5.js +0 -102
- package/dist/devtools-Cz49mTX5.js.map +0 -1
- package/dist/devtools-msRXXQfJ.cjs +0 -109
- package/dist/devtools-msRXXQfJ.cjs.map +0 -1
- package/dist/devtools.cjs +0 -3
- package/dist/devtools.d.cts +0 -11
- package/dist/devtools.d.ts +0 -11
- package/dist/devtools.js +0 -3
- package/dist/reactPlugin-BJ_35CCS.cjs +0 -499
- package/dist/reactPlugin-BJ_35CCS.cjs.map +0 -1
- package/dist/reactPlugin-E8nSWNDp.js +0 -469
- package/dist/reactPlugin-E8nSWNDp.js.map +0 -1
package/dist/chunk-BrXtsOCC.cjs
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
//#region rolldown:runtime
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
-
key = keys[i];
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
14
|
-
__defProp(to, key, {
|
|
15
|
-
get: ((k) => from[k]).bind(null, key),
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return to;
|
|
22
|
-
};
|
|
23
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
-
value: mod,
|
|
25
|
-
enumerable: true
|
|
26
|
-
}) : target, mod));
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
|
-
|
|
30
|
-
Object.defineProperty(exports, '__commonJSMin', {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return __commonJSMin;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, '__toESM', {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return __toESM;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { execa } from "execa";
|
|
2
|
-
import { onExit } from "signal-exit";
|
|
3
|
-
import ws from "ws";
|
|
4
|
-
|
|
5
|
-
//#region src/devtools.ts
|
|
6
|
-
function open() {
|
|
7
|
-
const customGlobal = global;
|
|
8
|
-
customGlobal.WebSocket || (customGlobal.WebSocket = ws);
|
|
9
|
-
customGlobal.window || (customGlobal.window = global);
|
|
10
|
-
customGlobal.self || (customGlobal.self = global);
|
|
11
|
-
customGlobal.isDevtoolsEnabled = true;
|
|
12
|
-
customGlobal.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ = [
|
|
13
|
-
{
|
|
14
|
-
type: 2,
|
|
15
|
-
value: "Context.Provider",
|
|
16
|
-
isEnabled: true,
|
|
17
|
-
isValid: true
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
type: 2,
|
|
21
|
-
value: "KubbRoot",
|
|
22
|
-
isEnabled: true,
|
|
23
|
-
isValid: true
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
type: 2,
|
|
27
|
-
value: "KubbErrorBoundary",
|
|
28
|
-
isEnabled: true,
|
|
29
|
-
isValid: true
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
type: 2,
|
|
33
|
-
value: "kubb-file",
|
|
34
|
-
isEnabled: true,
|
|
35
|
-
isValid: true
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
type: 2,
|
|
39
|
-
value: "kubb-text",
|
|
40
|
-
isEnabled: true,
|
|
41
|
-
isValid: true
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
type: 2,
|
|
45
|
-
value: "kubb-import",
|
|
46
|
-
isEnabled: true,
|
|
47
|
-
isValid: true
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
type: 2,
|
|
51
|
-
value: "kubb-export",
|
|
52
|
-
isEnabled: true,
|
|
53
|
-
isValid: true
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
type: 2,
|
|
57
|
-
value: "kubb-source",
|
|
58
|
-
isEnabled: true,
|
|
59
|
-
isValid: true
|
|
60
|
-
}
|
|
61
|
-
];
|
|
62
|
-
import("react-devtools-core").then(async (devtools) => {
|
|
63
|
-
console.info("Opening devtools");
|
|
64
|
-
const controller = new AbortController();
|
|
65
|
-
execa({
|
|
66
|
-
stdio: "pipe",
|
|
67
|
-
preferLocal: true,
|
|
68
|
-
cancelSignal: controller.signal,
|
|
69
|
-
gracefulCancel: true
|
|
70
|
-
})`npx react-devtools`;
|
|
71
|
-
const { initialize, connectToDevTools } = devtools;
|
|
72
|
-
initialize();
|
|
73
|
-
console.info("Initializing devtools");
|
|
74
|
-
const { Renderer } = await import("./Renderer-D_r5OSso.js");
|
|
75
|
-
Renderer.injectIntoDevTools({
|
|
76
|
-
bundleType: 1,
|
|
77
|
-
version: "19.1.0",
|
|
78
|
-
rendererPackageName: "kubb",
|
|
79
|
-
findFiberByHostInstance: () => null
|
|
80
|
-
});
|
|
81
|
-
console.info("Connecting devtools");
|
|
82
|
-
try {
|
|
83
|
-
connectToDevTools({
|
|
84
|
-
host: "localhost",
|
|
85
|
-
port: 8097,
|
|
86
|
-
useHttps: false,
|
|
87
|
-
isAppActive: () => true
|
|
88
|
-
});
|
|
89
|
-
} catch (e) {
|
|
90
|
-
console.error(e);
|
|
91
|
-
console.info("Error when connecting the devtools");
|
|
92
|
-
}
|
|
93
|
-
onExit(() => {
|
|
94
|
-
console.info("Disconnecting devtools");
|
|
95
|
-
controller.abort();
|
|
96
|
-
}, { alwaysLast: false });
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
//#endregion
|
|
101
|
-
export { open as t };
|
|
102
|
-
//# sourceMappingURL=devtools-Cz49mTX5.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devtools-Cz49mTX5.js","names":[],"sources":["../src/devtools.ts"],"sourcesContent":["import { execa } from 'execa'\nimport { onExit } from 'signal-exit'\nimport ws from 'ws'\n\ndeclare global {\n var WebSocket: typeof WebSocket\n var self: any\n var window: any\n var isDevtoolsEnabled: any\n}\n\nexport function open() {\n // Set up global polyfills BEFORE importing react-devtools-core\n // This is required because react-devtools-core expects these to be available\n const customGlobal = global as any\n customGlobal.WebSocket ||= ws\n customGlobal.window ||= global\n customGlobal.self ||= global\n customGlobal.isDevtoolsEnabled = true\n\n // Filter out Kubbs's internal components from devtools for a cleaner view.\n // See https://github.com/facebook/react/blob/edf6eac8a181860fd8a2d076a43806f1237495a1/packages/react-devtools-shared/src/types.js#L24\n customGlobal.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ = [\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'Context.Provider',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'KubbRoot',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'KubbErrorBoundary',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'kubb-file',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'kubb-text',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'kubb-import',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'kubb-export',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'kubb-source',\n isEnabled: true,\n isValid: true,\n },\n ]\n\n // biome-ignore lint/suspicious/noTsIgnore: cannot find types\n // @ts-ignore\n import('react-devtools-core').then(async (devtools) => {\n console.info('Opening devtools')\n const controller = new AbortController()\n execa({\n stdio: 'pipe',\n preferLocal: true,\n cancelSignal: controller.signal,\n gracefulCancel: true,\n })`npx react-devtools`\n\n // Destructure the functions from the module\n const { initialize, connectToDevTools } = devtools\n\n // Initialize DevTools BEFORE importing Renderer (which imports React)\n initialize()\n console.info('Initializing devtools')\n\n // Now dynamically import the Renderer after DevTools is initialized\n const { Renderer } = await import('./Renderer.ts')\n\n // Inject the renderer BEFORE connecting to DevTools\n // This ensures DevTools can properly discover the custom renderer\n Renderer.injectIntoDevTools({\n bundleType: 1,\n version: '19.1.0',\n rendererPackageName: 'kubb',\n // findFiberByHostInstance is required for DevTools to map elements to fibers\n findFiberByHostInstance: () => null,\n })\n\n console.info('Connecting devtools')\n\n try {\n connectToDevTools({\n host: 'localhost',\n port: 8097,\n useHttps: false,\n isAppActive: () => true,\n })\n } catch (e) {\n console.error(e)\n console.info('Error when connecting the devtools')\n }\n\n onExit(\n () => {\n console.info('Disconnecting devtools')\n controller.abort()\n },\n { alwaysLast: false },\n )\n })\n}\n"],"mappings":";;;;;AAWA,SAAgB,OAAO;CAGrB,MAAM,eAAe;AACrB,cAAa,cAAb,aAAa,YAAc;AAC3B,cAAa,WAAb,aAAa,SAAW;AACxB,cAAa,SAAb,aAAa,OAAS;AACtB,cAAa,oBAAoB;AAIjC,cAAa,OAAO,uCAAuC;EACzD;GAEE,MAAM;GACN,OAAO;GACP,WAAW;GACX,SAAS;GACV;EACD;GAEE,MAAM;GACN,OAAO;GACP,WAAW;GACX,SAAS;GACV;EACD;GAEE,MAAM;GACN,OAAO;GACP,WAAW;GACX,SAAS;GACV;EACD;GAEE,MAAM;GACN,OAAO;GACP,WAAW;GACX,SAAS;GACV;EACD;GAEE,MAAM;GACN,OAAO;GACP,WAAW;GACX,SAAS;GACV;EACD;GAEE,MAAM;GACN,OAAO;GACP,WAAW;GACX,SAAS;GACV;EACD;GAEE,MAAM;GACN,OAAO;GACP,WAAW;GACX,SAAS;GACV;EACD;GAEE,MAAM;GACN,OAAO;GACP,WAAW;GACX,SAAS;GACV;EACF;AAID,QAAO,uBAAuB,KAAK,OAAO,aAAa;AACrD,UAAQ,KAAK,mBAAmB;EAChC,MAAM,aAAa,IAAI,iBAAiB;AACxC,QAAM;GACJ,OAAO;GACP,aAAa;GACb,cAAc,WAAW;GACzB,gBAAgB;GACjB,CAAC;EAGF,MAAM,EAAE,YAAY,sBAAsB;AAG1C,cAAY;AACZ,UAAQ,KAAK,wBAAwB;EAGrC,MAAM,EAAE,aAAa,MAAM,OAAO;AAIlC,WAAS,mBAAmB;GAC1B,YAAY;GACZ,SAAS;GACT,qBAAqB;GAErB,+BAA+B;GAChC,CAAC;AAEF,UAAQ,KAAK,sBAAsB;AAEnC,MAAI;AACF,qBAAkB;IAChB,MAAM;IACN,MAAM;IACN,UAAU;IACV,mBAAmB;IACpB,CAAC;WACK,GAAG;AACV,WAAQ,MAAM,EAAE;AAChB,WAAQ,KAAK,qCAAqC;;AAGpD,eACQ;AACJ,WAAQ,KAAK,yBAAyB;AACtC,cAAW,OAAO;KAEpB,EAAE,YAAY,OAAO,CACtB;GACD"}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-BrXtsOCC.cjs');
|
|
2
|
-
let execa = require("execa");
|
|
3
|
-
let signal_exit = require("signal-exit");
|
|
4
|
-
let ws = require("ws");
|
|
5
|
-
ws = require_chunk.__toESM(ws);
|
|
6
|
-
|
|
7
|
-
//#region src/devtools.ts
|
|
8
|
-
function open() {
|
|
9
|
-
const customGlobal = global;
|
|
10
|
-
customGlobal.WebSocket || (customGlobal.WebSocket = ws.default);
|
|
11
|
-
customGlobal.window || (customGlobal.window = global);
|
|
12
|
-
customGlobal.self || (customGlobal.self = global);
|
|
13
|
-
customGlobal.isDevtoolsEnabled = true;
|
|
14
|
-
customGlobal.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ = [
|
|
15
|
-
{
|
|
16
|
-
type: 2,
|
|
17
|
-
value: "Context.Provider",
|
|
18
|
-
isEnabled: true,
|
|
19
|
-
isValid: true
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
type: 2,
|
|
23
|
-
value: "KubbRoot",
|
|
24
|
-
isEnabled: true,
|
|
25
|
-
isValid: true
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
type: 2,
|
|
29
|
-
value: "KubbErrorBoundary",
|
|
30
|
-
isEnabled: true,
|
|
31
|
-
isValid: true
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
type: 2,
|
|
35
|
-
value: "kubb-file",
|
|
36
|
-
isEnabled: true,
|
|
37
|
-
isValid: true
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
type: 2,
|
|
41
|
-
value: "kubb-text",
|
|
42
|
-
isEnabled: true,
|
|
43
|
-
isValid: true
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
type: 2,
|
|
47
|
-
value: "kubb-import",
|
|
48
|
-
isEnabled: true,
|
|
49
|
-
isValid: true
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
type: 2,
|
|
53
|
-
value: "kubb-export",
|
|
54
|
-
isEnabled: true,
|
|
55
|
-
isValid: true
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
type: 2,
|
|
59
|
-
value: "kubb-source",
|
|
60
|
-
isEnabled: true,
|
|
61
|
-
isValid: true
|
|
62
|
-
}
|
|
63
|
-
];
|
|
64
|
-
import("react-devtools-core").then(async (devtools) => {
|
|
65
|
-
console.info("Opening devtools");
|
|
66
|
-
const controller = new AbortController();
|
|
67
|
-
(0, execa.execa)({
|
|
68
|
-
stdio: "pipe",
|
|
69
|
-
preferLocal: true,
|
|
70
|
-
cancelSignal: controller.signal,
|
|
71
|
-
gracefulCancel: true
|
|
72
|
-
})`npx react-devtools`;
|
|
73
|
-
const { initialize, connectToDevTools } = devtools;
|
|
74
|
-
initialize();
|
|
75
|
-
console.info("Initializing devtools");
|
|
76
|
-
const { Renderer } = await Promise.resolve().then(() => require("./Renderer-7rMwyODQ.cjs"));
|
|
77
|
-
Renderer.injectIntoDevTools({
|
|
78
|
-
bundleType: 1,
|
|
79
|
-
version: "19.1.0",
|
|
80
|
-
rendererPackageName: "kubb",
|
|
81
|
-
findFiberByHostInstance: () => null
|
|
82
|
-
});
|
|
83
|
-
console.info("Connecting devtools");
|
|
84
|
-
try {
|
|
85
|
-
connectToDevTools({
|
|
86
|
-
host: "localhost",
|
|
87
|
-
port: 8097,
|
|
88
|
-
useHttps: false,
|
|
89
|
-
isAppActive: () => true
|
|
90
|
-
});
|
|
91
|
-
} catch (e) {
|
|
92
|
-
console.error(e);
|
|
93
|
-
console.info("Error when connecting the devtools");
|
|
94
|
-
}
|
|
95
|
-
(0, signal_exit.onExit)(() => {
|
|
96
|
-
console.info("Disconnecting devtools");
|
|
97
|
-
controller.abort();
|
|
98
|
-
}, { alwaysLast: false });
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
//#endregion
|
|
103
|
-
Object.defineProperty(exports, 'open', {
|
|
104
|
-
enumerable: true,
|
|
105
|
-
get: function () {
|
|
106
|
-
return open;
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
//# sourceMappingURL=devtools-msRXXQfJ.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devtools-msRXXQfJ.cjs","names":[],"sources":["../src/devtools.ts"],"sourcesContent":["import { execa } from 'execa'\nimport { onExit } from 'signal-exit'\nimport ws from 'ws'\n\ndeclare global {\n var WebSocket: typeof WebSocket\n var self: any\n var window: any\n var isDevtoolsEnabled: any\n}\n\nexport function open() {\n // Set up global polyfills BEFORE importing react-devtools-core\n // This is required because react-devtools-core expects these to be available\n const customGlobal = global as any\n customGlobal.WebSocket ||= ws\n customGlobal.window ||= global\n customGlobal.self ||= global\n customGlobal.isDevtoolsEnabled = true\n\n // Filter out Kubbs's internal components from devtools for a cleaner view.\n // See https://github.com/facebook/react/blob/edf6eac8a181860fd8a2d076a43806f1237495a1/packages/react-devtools-shared/src/types.js#L24\n customGlobal.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ = [\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'Context.Provider',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'KubbRoot',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'KubbErrorBoundary',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'kubb-file',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'kubb-text',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'kubb-import',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'kubb-export',\n isEnabled: true,\n isValid: true,\n },\n {\n // ComponentFilterDisplayName\n type: 2,\n value: 'kubb-source',\n isEnabled: true,\n isValid: true,\n },\n ]\n\n // biome-ignore lint/suspicious/noTsIgnore: cannot find types\n // @ts-ignore\n import('react-devtools-core').then(async (devtools) => {\n console.info('Opening devtools')\n const controller = new AbortController()\n execa({\n stdio: 'pipe',\n preferLocal: true,\n cancelSignal: controller.signal,\n gracefulCancel: true,\n })`npx react-devtools`\n\n // Destructure the functions from the module\n const { initialize, connectToDevTools } = devtools\n\n // Initialize DevTools BEFORE importing Renderer (which imports React)\n initialize()\n console.info('Initializing devtools')\n\n // Now dynamically import the Renderer after DevTools is initialized\n const { Renderer } = await import('./Renderer.ts')\n\n // Inject the renderer BEFORE connecting to DevTools\n // This ensures DevTools can properly discover the custom renderer\n Renderer.injectIntoDevTools({\n bundleType: 1,\n version: '19.1.0',\n rendererPackageName: 'kubb',\n // findFiberByHostInstance is required for DevTools to map elements to fibers\n findFiberByHostInstance: () => null,\n })\n\n console.info('Connecting devtools')\n\n try {\n connectToDevTools({\n host: 'localhost',\n port: 8097,\n useHttps: false,\n isAppActive: () => true,\n })\n } catch (e) {\n console.error(e)\n console.info('Error when connecting the devtools')\n }\n\n onExit(\n () => {\n console.info('Disconnecting devtools')\n controller.abort()\n },\n { alwaysLast: false },\n )\n })\n}\n"],"mappings":";;;;;;;AAWA,SAAgB,OAAO;CAGrB,MAAM,eAAe;AACrB,cAAa,cAAb,aAAa,YAAc;AAC3B,cAAa,WAAb,aAAa,SAAW;AACxB,cAAa,SAAb,aAAa,OAAS;AACtB,cAAa,oBAAoB;AAIjC,cAAa,OAAO,uCAAuC;EACzD;GAEE,MAAM;GACN,OAAO;GACP,WAAW;GACX,SAAS;GACV;EACD;GAEE,MAAM;GACN,OAAO;GACP,WAAW;GACX,SAAS;GACV;EACD;GAEE,MAAM;GACN,OAAO;GACP,WAAW;GACX,SAAS;GACV;EACD;GAEE,MAAM;GACN,OAAO;GACP,WAAW;GACX,SAAS;GACV;EACD;GAEE,MAAM;GACN,OAAO;GACP,WAAW;GACX,SAAS;GACV;EACD;GAEE,MAAM;GACN,OAAO;GACP,WAAW;GACX,SAAS;GACV;EACD;GAEE,MAAM;GACN,OAAO;GACP,WAAW;GACX,SAAS;GACV;EACD;GAEE,MAAM;GACN,OAAO;GACP,WAAW;GACX,SAAS;GACV;EACF;AAID,QAAO,uBAAuB,KAAK,OAAO,aAAa;AACrD,UAAQ,KAAK,mBAAmB;EAChC,MAAM,aAAa,IAAI,iBAAiB;AACxC,mBAAM;GACJ,OAAO;GACP,aAAa;GACb,cAAc,WAAW;GACzB,gBAAgB;GACjB,CAAC;EAGF,MAAM,EAAE,YAAY,sBAAsB;AAG1C,cAAY;AACZ,UAAQ,KAAK,wBAAwB;EAGrC,MAAM,EAAE,aAAa,2CAAM;AAI3B,WAAS,mBAAmB;GAC1B,YAAY;GACZ,SAAS;GACT,qBAAqB;GAErB,+BAA+B;GAChC,CAAC;AAEF,UAAQ,KAAK,sBAAsB;AAEnC,MAAI;AACF,qBAAkB;IAChB,MAAM;IACN,MAAM;IACN,UAAU;IACV,mBAAmB;IACpB,CAAC;WACK,GAAG;AACV,WAAQ,MAAM,EAAE;AAChB,WAAQ,KAAK,qCAAqC;;AAGpD,gCACQ;AACJ,WAAQ,KAAK,yBAAyB;AACtC,cAAW,OAAO;KAEpB,EAAE,YAAY,OAAO,CACtB;GACD"}
|
package/dist/devtools.cjs
DELETED
package/dist/devtools.d.cts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region src/devtools.d.ts
|
|
2
|
-
declare global {
|
|
3
|
-
var WebSocket: typeof WebSocket;
|
|
4
|
-
var self: any;
|
|
5
|
-
var window: any;
|
|
6
|
-
var isDevtoolsEnabled: any;
|
|
7
|
-
}
|
|
8
|
-
declare function open(): void;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { open };
|
|
11
|
-
//# sourceMappingURL=devtools.d.cts.map
|
package/dist/devtools.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region src/devtools.d.ts
|
|
2
|
-
declare global {
|
|
3
|
-
var WebSocket: typeof WebSocket;
|
|
4
|
-
var self: any;
|
|
5
|
-
var window: any;
|
|
6
|
-
var isDevtoolsEnabled: any;
|
|
7
|
-
}
|
|
8
|
-
declare function open(): void;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { open };
|
|
11
|
-
//# sourceMappingURL=devtools.d.ts.map
|
package/dist/devtools.js
DELETED