@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.
- package/dist/{Fabric-tVWTpMR5.d.ts → Fabric-CoGYXq1o.d.ts} +3 -3
- package/dist/{Fabric-nxgJyzWH.d.cts → Fabric-PGwn47Lb.d.cts} +2 -2
- package/dist/{KubbFile-DFnA3mmn.d.ts → KubbFile-bFdmEsQz.d.ts} +1 -1
- package/dist/{devtools-DnQsy6Us.cjs → backend-BwCrJwGY.cjs} +27 -119
- package/dist/backend-BwCrJwGY.cjs.map +1 -0
- package/dist/{devtools-DPye8o33.js → backend-U2f8IEJ7.js} +27 -114
- package/dist/backend-U2f8IEJ7.js.map +1 -0
- package/dist/{chunk-CVmoYqME.js → chunk-9mlisOrp.js} +2 -1
- package/dist/{chunk-DWy1uDak.cjs → chunk-BaqVhFee.cjs} +7 -0
- package/dist/devtools-CYVZyenT.cjs +102 -0
- package/dist/devtools-CYVZyenT.cjs.map +1 -0
- package/dist/devtools-D7cmED8s.js +94 -0
- package/dist/devtools-D7cmED8s.js.map +1 -0
- package/dist/devtools.cjs +1 -1
- package/dist/devtools.js +1 -1
- package/dist/{globals-CxZEi_Pn.d.ts → globals-1MFa0Fvg.d.ts} +3 -3
- package/dist/globals.d.ts +3 -3
- package/dist/index.cjs +11 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -4
- package/dist/index.d.ts +14 -6
- package/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.cjs +2 -2
- package/dist/jsx-dev-runtime.js +2 -2
- package/dist/{jsx-runtime-9ohe6OS2.cjs → jsx-runtime-8_h1Kd4b.cjs} +3 -3
- package/dist/{jsx-runtime-9ohe6OS2.cjs.map → jsx-runtime-8_h1Kd4b.cjs.map} +1 -1
- package/dist/{jsx-runtime-CvGZkcTo.js → jsx-runtime-BJX2mL7C.js} +3 -3
- package/dist/{jsx-runtime-CvGZkcTo.js.map → jsx-runtime-BJX2mL7C.js.map} +1 -1
- package/dist/{jsx-runtime-CFd_ktZn.js → jsx-runtime-C9xQ4GQD.js} +2 -2
- package/dist/{jsx-runtime-CFd_ktZn.js.map → jsx-runtime-C9xQ4GQD.js.map} +1 -1
- package/dist/{jsx-runtime-BOrVcbIT.cjs → jsx-runtime-CSnwG7o6.cjs} +2 -2
- package/dist/{jsx-runtime-BOrVcbIT.cjs.map → jsx-runtime-CSnwG7o6.cjs.map} +1 -1
- package/dist/jsx-runtime.cjs +2 -2
- package/dist/jsx-runtime.d.ts +3 -3
- package/dist/jsx-runtime.js +2 -2
- package/dist/parsers.d.cts +1 -1
- package/dist/parsers.d.ts +2 -2
- package/dist/{plugins-CEGJdkpj.cjs → plugins-BQE1GnQ7.cjs} +3 -3
- package/dist/{plugins-CEGJdkpj.cjs.map → plugins-BQE1GnQ7.cjs.map} +1 -1
- package/dist/{plugins-aZCNhIC8.js → plugins-BVFjgEC2.js} +3 -3
- package/dist/{plugins-aZCNhIC8.js.map → plugins-BVFjgEC2.js.map} +1 -1
- package/dist/plugins.cjs +2 -2
- package/dist/plugins.d.cts +2 -2
- package/dist/plugins.d.ts +3 -3
- package/dist/plugins.js +2 -2
- package/dist/{reactPlugin-B47Guoya.d.ts → reactPlugin-CCty1XGl.d.ts} +2 -2
- package/dist/{reactPlugin-CLgWWifj.d.cts → reactPlugin-SuzV8fwK.d.cts} +2 -2
- package/dist/{types-u_NEi07i.d.ts → types-BnXxcIyv.d.ts} +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +2 -2
- package/src/devtools.ts +98 -96
- package/src/index.ts +1 -1
- package/dist/devtools-DPye8o33.js.map +0 -1
- package/dist/devtools-DnQsy6Us.cjs.map +0 -1
package/dist/plugins.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
require('./jsx-runtime-
|
|
2
|
-
const require_plugins = require('./plugins-
|
|
1
|
+
require('./jsx-runtime-CSnwG7o6.cjs');
|
|
2
|
+
const require_plugins = require('./plugins-BQE1GnQ7.cjs');
|
|
3
3
|
|
|
4
4
|
exports.reactPlugin = require_plugins.reactPlugin;
|
|
5
5
|
var __kubb_fabric_core_plugins = require("@kubb/fabric-core/plugins");
|
package/dist/plugins.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as Extname } from "./KubbFile-DHCtBOpy.cjs";
|
|
2
|
-
import { c as
|
|
3
|
-
import { n as reactPlugin } from "./reactPlugin-
|
|
2
|
+
import { c as Plugin, l as UserPlugin } from "./Fabric-PGwn47Lb.cjs";
|
|
3
|
+
import { n as reactPlugin } from "./reactPlugin-SuzV8fwK.cjs";
|
|
4
4
|
|
|
5
5
|
//#region ../fabric-core/src/plugins/createPlugin.d.ts
|
|
6
6
|
declare function createPlugin<Options$3 = unknown, TAppExtension extends Record<string, any> = {}>(plugin: UserPlugin<Options$3, TAppExtension>): Plugin<Options$3, TAppExtension>;
|
package/dist/plugins.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as Extname } from "./KubbFile-
|
|
2
|
-
import { c as
|
|
3
|
-
import { n as reactPlugin } from "./reactPlugin-
|
|
1
|
+
import { r as Extname } from "./KubbFile-bFdmEsQz.js";
|
|
2
|
+
import { c as Plugin, l as UserPlugin } from "./Fabric-CoGYXq1o.js";
|
|
3
|
+
import { n as reactPlugin } from "./reactPlugin-CCty1XGl.js";
|
|
4
4
|
|
|
5
5
|
//#region ../fabric-core/src/plugins/createPlugin.d.ts
|
|
6
6
|
declare function createPlugin<Options$3 = unknown, TAppExtension extends Record<string, any> = {}>(plugin: UserPlugin<Options$3, TAppExtension>): Plugin<Options$3, TAppExtension>;
|
package/dist/plugins.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as Plugin } from "./Fabric-CoGYXq1o.js";
|
|
2
2
|
import { ElementType } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/plugins/reactPlugin.d.ts
|
|
@@ -35,4 +35,4 @@ declare global {
|
|
|
35
35
|
declare const reactPlugin: Plugin<Options, ExtendOptions>;
|
|
36
36
|
//#endregion
|
|
37
37
|
export { reactPlugin as n, Options as t };
|
|
38
|
-
//# sourceMappingURL=reactPlugin-
|
|
38
|
+
//# sourceMappingURL=reactPlugin-CCty1XGl.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as Plugin } from "./Fabric-PGwn47Lb.cjs";
|
|
2
2
|
import { ElementType } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/plugins/reactPlugin.d.ts
|
|
@@ -35,4 +35,4 @@ declare global {
|
|
|
35
35
|
declare const reactPlugin: Plugin<Options, ExtendOptions>;
|
|
36
36
|
//#endregion
|
|
37
37
|
export { reactPlugin as n, Options as t };
|
|
38
|
-
//# sourceMappingURL=reactPlugin-
|
|
38
|
+
//# sourceMappingURL=reactPlugin-SuzV8fwK.d.cts.map
|
|
@@ -82,4 +82,4 @@ type JSDoc = {
|
|
|
82
82
|
};
|
|
83
83
|
//#endregion
|
|
84
84
|
export { JSDoc as a, TextNode as c, Params as d, createFunctionParams as f, ElementNames as i, FunctionParams as l, DOMNode as n, Key as o, DOMNodeAttribute as r, KubbNode as s, DOMElement as t, Param as u };
|
|
85
|
-
//# sourceMappingURL=types-
|
|
85
|
+
//# sourceMappingURL=types-BnXxcIyv.d.ts.map
|
package/dist/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as JSDoc, c as TextNode, d as Params, i as ElementNames, n as DOMNode, o as Key, r as DOMNodeAttribute, s as KubbNode, t as DOMElement, u as Param } from "./types-
|
|
1
|
+
import { a as JSDoc, c as TextNode, d as Params, i as ElementNames, n as DOMNode, o as Key, r as DOMNodeAttribute, s as KubbNode, t as DOMElement, u as Param } from "./types-BnXxcIyv.js";
|
|
2
2
|
export { DOMElement, DOMNode, DOMNodeAttribute, ElementNames, JSDoc, Key, KubbNode, Param, Params, TextNode };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/react-fabric",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "React integration for Kubb, providing JSX runtime support and React component generation capabilities for code generation plugins.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"react-reconciler": "0.32.0",
|
|
103
103
|
"signal-exit": "^4.1.0",
|
|
104
104
|
"ws": "8.18.0",
|
|
105
|
-
"@kubb/fabric-core": "0.2.
|
|
105
|
+
"@kubb/fabric-core": "0.2.3"
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
108
|
"react": "^19.2.0",
|
package/src/devtools.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { onExit } from 'signal-exit'
|
|
2
|
-
|
|
3
|
-
// @ts-ignore
|
|
4
|
-
import devtools from 'react-devtools-core'
|
|
2
|
+
|
|
5
3
|
import ws from 'ws'
|
|
6
4
|
import { execa } from 'execa'
|
|
7
5
|
|
|
@@ -13,101 +11,105 @@ declare global {
|
|
|
13
11
|
}
|
|
14
12
|
|
|
15
13
|
export function open() {
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
14
|
+
// biome-ignore lint/suspicious/noTsIgnore: cannot find types
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
import('react-devtools-core').then((devtools) => {
|
|
17
|
+
// Filter out Kubbs's internal components from devtools for a cleaner view.
|
|
18
|
+
// See https://github.com/facebook/react/blob/edf6eac8a181860fd8a2d076a43806f1237495a1/packages/react-devtools-shared/src/types.js#L24
|
|
19
|
+
const customGlobal = global as any
|
|
20
|
+
customGlobal.WebSocket ||= ws
|
|
21
|
+
customGlobal.window ||= global
|
|
22
|
+
customGlobal.self ||= global
|
|
23
|
+
customGlobal.isDevtoolsEnabled = true
|
|
24
|
+
customGlobal.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ = [
|
|
25
|
+
{
|
|
26
|
+
// ComponentFilterDisplayName
|
|
27
|
+
type: 2,
|
|
28
|
+
value: 'Context.Provider',
|
|
29
|
+
isEnabled: true,
|
|
30
|
+
isValid: true,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
// ComponentFilterDisplayName
|
|
34
|
+
type: 2,
|
|
35
|
+
value: 'KubbRoot',
|
|
36
|
+
isEnabled: true,
|
|
37
|
+
isValid: true,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
// ComponentFilterDisplayName
|
|
41
|
+
type: 2,
|
|
42
|
+
value: 'KubbErrorBoundary',
|
|
43
|
+
isEnabled: true,
|
|
44
|
+
isValid: true,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
// ComponentFilterDisplayName
|
|
48
|
+
type: 2,
|
|
49
|
+
value: 'kubb-file',
|
|
50
|
+
isEnabled: true,
|
|
51
|
+
isValid: true,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
// ComponentFilterDisplayName
|
|
55
|
+
type: 2,
|
|
56
|
+
value: 'kubb-text',
|
|
57
|
+
isEnabled: true,
|
|
58
|
+
isValid: true,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
// ComponentFilterDisplayName
|
|
62
|
+
type: 2,
|
|
63
|
+
value: 'kubb-import',
|
|
64
|
+
isEnabled: true,
|
|
65
|
+
isValid: true,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
// ComponentFilterDisplayName
|
|
69
|
+
type: 2,
|
|
70
|
+
value: 'kubb-export',
|
|
71
|
+
isEnabled: true,
|
|
72
|
+
isValid: true,
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
// ComponentFilterDisplayName
|
|
76
|
+
type: 2,
|
|
77
|
+
value: 'kubb-source',
|
|
78
|
+
isEnabled: true,
|
|
79
|
+
isValid: true,
|
|
80
|
+
},
|
|
81
|
+
]
|
|
81
82
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
console.info('Opening devtools')
|
|
84
|
+
const controller = new AbortController()
|
|
85
|
+
execa({
|
|
86
|
+
stdio: 'pipe',
|
|
87
|
+
preferLocal: true,
|
|
88
|
+
cancelSignal: controller.signal,
|
|
89
|
+
gracefulCancel: true,
|
|
90
|
+
})`npx react-devtools`
|
|
90
91
|
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
;(devtools as any).initialize()
|
|
93
|
+
console.info('Connecting devtools')
|
|
93
94
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
95
|
+
try {
|
|
96
|
+
;(devtools as any).connectToDevTools({
|
|
97
|
+
host: 'localhost',
|
|
98
|
+
port: 8097,
|
|
99
|
+
useHttps: false,
|
|
100
|
+
isAppActive: () => true,
|
|
101
|
+
})
|
|
102
|
+
} catch (e) {
|
|
103
|
+
console.error(e)
|
|
104
|
+
console.info('Error when connecting the devtools')
|
|
105
|
+
}
|
|
105
106
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
107
|
+
onExit(
|
|
108
|
+
() => {
|
|
109
|
+
console.info('Disconnecting devtools')
|
|
110
|
+
controller.abort()
|
|
111
|
+
},
|
|
112
|
+
{ alwaysLast: false },
|
|
113
|
+
)
|
|
114
|
+
})
|
|
113
115
|
}
|
package/src/index.ts
CHANGED
|
@@ -15,7 +15,7 @@ export { useFile } from './composables/useFile.ts'
|
|
|
15
15
|
export { useLifecycle } from './composables/useLifecycle.tsx'
|
|
16
16
|
|
|
17
17
|
// expose fabric core helpers
|
|
18
|
-
export
|
|
18
|
+
export * from '@kubb/fabric-core'
|
|
19
19
|
export { createReactFabric } from './createReactFabric.ts'
|
|
20
20
|
|
|
21
21
|
// utils
|