@kubb/react-fabric 0.2.1 → 0.2.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.
Files changed (47) hide show
  1. package/dist/{Fabric-tVWTpMR5.d.ts → Fabric-DwVGMumV.d.ts} +2 -2
  2. package/dist/{KubbFile-DFnA3mmn.d.ts → KubbFile-bFdmEsQz.d.ts} +1 -1
  3. package/dist/{devtools-DnQsy6Us.cjs → backend-BwCrJwGY.cjs} +27 -119
  4. package/dist/backend-BwCrJwGY.cjs.map +1 -0
  5. package/dist/{devtools-DPye8o33.js → backend-U2f8IEJ7.js} +27 -114
  6. package/dist/backend-U2f8IEJ7.js.map +1 -0
  7. package/dist/{chunk-CVmoYqME.js → chunk-9mlisOrp.js} +2 -1
  8. package/dist/{chunk-DWy1uDak.cjs → chunk-BaqVhFee.cjs} +7 -0
  9. package/dist/devtools-CYVZyenT.cjs +102 -0
  10. package/dist/devtools-CYVZyenT.cjs.map +1 -0
  11. package/dist/devtools-D7cmED8s.js +94 -0
  12. package/dist/devtools-D7cmED8s.js.map +1 -0
  13. package/dist/devtools.cjs +1 -1
  14. package/dist/devtools.js +1 -1
  15. package/dist/{globals-CxZEi_Pn.d.ts → globals-1MFa0Fvg.d.ts} +3 -3
  16. package/dist/globals.d.ts +3 -3
  17. package/dist/index.cjs +4 -4
  18. package/dist/index.d.ts +5 -5
  19. package/dist/index.js +4 -4
  20. package/dist/jsx-dev-runtime.cjs +2 -2
  21. package/dist/jsx-dev-runtime.js +2 -2
  22. package/dist/{jsx-runtime-9ohe6OS2.cjs → jsx-runtime-8_h1Kd4b.cjs} +3 -3
  23. package/dist/{jsx-runtime-9ohe6OS2.cjs.map → jsx-runtime-8_h1Kd4b.cjs.map} +1 -1
  24. package/dist/{jsx-runtime-CvGZkcTo.js → jsx-runtime-BJX2mL7C.js} +3 -3
  25. package/dist/{jsx-runtime-CvGZkcTo.js.map → jsx-runtime-BJX2mL7C.js.map} +1 -1
  26. package/dist/{jsx-runtime-CFd_ktZn.js → jsx-runtime-C9xQ4GQD.js} +2 -2
  27. package/dist/{jsx-runtime-CFd_ktZn.js.map → jsx-runtime-C9xQ4GQD.js.map} +1 -1
  28. package/dist/{jsx-runtime-BOrVcbIT.cjs → jsx-runtime-CSnwG7o6.cjs} +2 -2
  29. package/dist/{jsx-runtime-BOrVcbIT.cjs.map → jsx-runtime-CSnwG7o6.cjs.map} +1 -1
  30. package/dist/jsx-runtime.cjs +2 -2
  31. package/dist/jsx-runtime.d.ts +3 -3
  32. package/dist/jsx-runtime.js +2 -2
  33. package/dist/parsers.d.ts +2 -2
  34. package/dist/{plugins-CEGJdkpj.cjs → plugins-BQE1GnQ7.cjs} +3 -3
  35. package/dist/{plugins-CEGJdkpj.cjs.map → plugins-BQE1GnQ7.cjs.map} +1 -1
  36. package/dist/{plugins-aZCNhIC8.js → plugins-BVFjgEC2.js} +3 -3
  37. package/dist/{plugins-aZCNhIC8.js.map → plugins-BVFjgEC2.js.map} +1 -1
  38. package/dist/plugins.cjs +2 -2
  39. package/dist/plugins.d.ts +3 -3
  40. package/dist/plugins.js +2 -2
  41. package/dist/{reactPlugin-B47Guoya.d.ts → reactPlugin-DyvfLVFa.d.ts} +2 -2
  42. package/dist/{types-u_NEi07i.d.ts → types-BnXxcIyv.d.ts} +1 -1
  43. package/dist/types.d.ts +1 -1
  44. package/package.json +2 -2
  45. package/src/devtools.ts +98 -96
  46. package/dist/devtools-DPye8o33.js.map +0 -1
  47. package/dist/devtools-DnQsy6Us.cjs.map +0 -1
package/dist/plugins.cjs CHANGED
@@ -1,5 +1,5 @@
1
- require('./jsx-runtime-BOrVcbIT.cjs');
2
- const require_plugins = require('./plugins-CEGJdkpj.cjs');
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.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { r as Extname } from "./KubbFile-DFnA3mmn.js";
2
- import { c as UserPlugin, s as Plugin } from "./Fabric-tVWTpMR5.js";
3
- import { n as reactPlugin } from "./reactPlugin-B47Guoya.js";
1
+ import { r as Extname } from "./KubbFile-bFdmEsQz.js";
2
+ import { c as UserPlugin, s as Plugin } from "./Fabric-DwVGMumV.js";
3
+ import { n as reactPlugin } from "./reactPlugin-DyvfLVFa.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,5 +1,5 @@
1
- import "./jsx-runtime-CFd_ktZn.js";
2
- import { t as reactPlugin } from "./plugins-aZCNhIC8.js";
1
+ import "./jsx-runtime-C9xQ4GQD.js";
2
+ import { t as reactPlugin } from "./plugins-BVFjgEC2.js";
3
3
 
4
4
  export * from "@kubb/fabric-core/plugins"
5
5
 
@@ -1,4 +1,4 @@
1
- import { s as Plugin } from "./Fabric-tVWTpMR5.js";
1
+ import { s as Plugin } from "./Fabric-DwVGMumV.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-B47Guoya.d.ts.map
38
+ //# sourceMappingURL=reactPlugin-DyvfLVFa.d.ts.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-u_NEi07i.d.ts.map
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-u_NEi07i.js";
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.1",
3
+ "version": "0.2.2",
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.1"
105
+ "@kubb/fabric-core": "0.2.2"
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
- // biome-ignore lint/suspicious/noTsIgnore: cannot find types
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
- // Filter out Kubbs's internal components from devtools for a cleaner view.
17
- // See https://github.com/facebook/react/blob/edf6eac8a181860fd8a2d076a43806f1237495a1/packages/react-devtools-shared/src/types.js#L24
18
- const customGlobal = global as any
19
- customGlobal.WebSocket ||= ws
20
- customGlobal.window ||= global
21
- customGlobal.self ||= global
22
- customGlobal.isDevtoolsEnabled = true
23
- customGlobal.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ = [
24
- {
25
- // ComponentFilterDisplayName
26
- type: 2,
27
- value: 'Context.Provider',
28
- isEnabled: true,
29
- isValid: true,
30
- },
31
- {
32
- // ComponentFilterDisplayName
33
- type: 2,
34
- value: 'KubbRoot',
35
- isEnabled: true,
36
- isValid: true,
37
- },
38
- {
39
- // ComponentFilterDisplayName
40
- type: 2,
41
- value: 'KubbErrorBoundary',
42
- isEnabled: true,
43
- isValid: true,
44
- },
45
- {
46
- // ComponentFilterDisplayName
47
- type: 2,
48
- value: 'kubb-file',
49
- isEnabled: true,
50
- isValid: true,
51
- },
52
- {
53
- // ComponentFilterDisplayName
54
- type: 2,
55
- value: 'kubb-text',
56
- isEnabled: true,
57
- isValid: true,
58
- },
59
- {
60
- // ComponentFilterDisplayName
61
- type: 2,
62
- value: 'kubb-import',
63
- isEnabled: true,
64
- isValid: true,
65
- },
66
- {
67
- // ComponentFilterDisplayName
68
- type: 2,
69
- value: 'kubb-export',
70
- isEnabled: true,
71
- isValid: true,
72
- },
73
- {
74
- // ComponentFilterDisplayName
75
- type: 2,
76
- value: 'kubb-source',
77
- isEnabled: true,
78
- isValid: true,
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
- console.info('Opening devtools')
83
- const controller = new AbortController()
84
- execa({
85
- stdio: 'pipe',
86
- preferLocal: true,
87
- cancelSignal: controller.signal,
88
- gracefulCancel: true,
89
- })`npx react-devtools`
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
- ;(devtools as any).initialize()
92
- console.info('Connecting devtools')
92
+ ;(devtools as any).initialize()
93
+ console.info('Connecting devtools')
93
94
 
94
- try {
95
- ;(devtools as any).connectToDevTools({
96
- host: 'localhost',
97
- port: 8097,
98
- useHttps: false,
99
- isAppActive: () => true,
100
- })
101
- } catch (e) {
102
- console.error(e)
103
- console.info('Error when connecting the devtools')
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
- onExit(
107
- () => {
108
- console.info('Disconnecting devtools')
109
- controller.abort()
110
- },
111
- { alwaysLast: false },
112
- )
107
+ onExit(
108
+ () => {
109
+ console.info('Disconnecting devtools')
110
+ controller.abort()
111
+ },
112
+ { alwaysLast: false },
113
+ )
114
+ })
113
115
  }