@knapsack/renderer-react-components 5.0.0--canary.6593.d6350c3.0 β†’ 5.0.0--canary.7791.86072ba.0

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 (38) hide show
  1. package/.lintstagedrc.mjs +2 -2
  2. package/CHANGELOG.md +152 -0
  3. package/dist/error-catcher.d.ts +1 -1
  4. package/dist/error-catcher.js +2 -3
  5. package/dist/error-catcher.js.map +1 -1
  6. package/dist/test-fixtures/card.d.ts +1 -1
  7. package/dist/test-fixtures/card.d.ts.map +1 -1
  8. package/dist/test-fixtures/complex-props.d.ts +1 -1
  9. package/dist/test-fixtures/complex-props.d.ts.map +1 -1
  10. package/dist/test-fixtures/complex-props.js +1 -1
  11. package/dist/test-fixtures/complex-props.js.map +1 -1
  12. package/dist/test-fixtures/dom-inherited-button.d.ts +23 -0
  13. package/dist/test-fixtures/dom-inherited-button.d.ts.map +1 -0
  14. package/dist/test-fixtures/dom-inherited-button.js +3 -0
  15. package/dist/test-fixtures/dom-inherited-button.js.map +1 -0
  16. package/dist/test-fixtures/generic-component-type.d.ts +2 -2
  17. package/dist/test-fixtures/generic-component-type.d.ts.map +1 -1
  18. package/dist/test-fixtures/generic-component-type.js.map +1 -1
  19. package/dist/test-fixtures/index.d.ts +2 -0
  20. package/dist/test-fixtures/index.d.ts.map +1 -1
  21. package/dist/test-fixtures/index.js +2 -0
  22. package/dist/test-fixtures/index.js.map +1 -1
  23. package/dist/test-fixtures/nullable-unions.d.ts +1 -1
  24. package/dist/test-fixtures/nullable-unions.d.ts.map +1 -1
  25. package/dist/test-fixtures/nullable-unions.js +1 -1
  26. package/dist/test-fixtures/nullable-unions.js.map +1 -1
  27. package/dist/test-fixtures/numeric-enum-negative.d.ts +1 -1
  28. package/dist/test-fixtures/numeric-enum-negative.d.ts.map +1 -1
  29. package/dist/test-fixtures/render-node-props.d.ts +2 -2
  30. package/dist/test-fixtures/render-node-props.d.ts.map +1 -1
  31. package/dist/test-fixtures/render-node-props.js.map +1 -1
  32. package/dist/test-fixtures/union-react-node.d.ts +48 -0
  33. package/dist/test-fixtures/union-react-node.d.ts.map +1 -0
  34. package/dist/test-fixtures/union-react-node.js +15 -0
  35. package/dist/test-fixtures/union-react-node.js.map +1 -0
  36. package/package.json +11 -11
  37. package/.eslintignore +0 -1
  38. package/.eslintrc.cjs +0 -9
package/.lintstagedrc.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { dirname } from 'path';
2
- import { fileURLToPath } from 'url';
1
+ import { dirname } from 'node:path';
2
+ import { fileURLToPath } from 'node:url';
3
3
 
4
4
  import defaultConfig from '../../../../.lintstagedrc.mjs';
5
5
 
package/CHANGELOG.md CHANGED
@@ -1,3 +1,155 @@
1
+ # v4.89.8 (Fri Feb 20 2026)
2
+
3
+ ### Release Notes
4
+
5
+ #### KSP-7685: Synthetic Data for Conflict Enrichment/Resolution testing ([#7154](https://github.com/knapsack-labs/app-monorepo/pull/7154))
6
+
7
+ * **Documentation**
8
+ * Added synthetic multi-source test fixtures including component documentation, design tokens, and brand guidelines for comprehensive testing coverage.
9
+
10
+ <!-- end of auto-generated comment: release notes by coderabbit.ai -->
11
+
12
+ ---
13
+
14
+ #### πŸ› Bug Fix
15
+
16
+ - merge latest in ([@EmmanuelVelez](https://github.com/EmmanuelVelez))
17
+ - Merge branch 'latest' into sxa/KSP-7037-tests-v2 ([@sxalexander](https://github.com/sxalexander))
18
+ - Use node: protocol prefix in all .lintstagedrc.mjs files ([@EmmanuelVelez](https://github.com/EmmanuelVelez))
19
+ - Migrated ESLint config to flat config format (ESLint 9) ([@EmmanuelVelez](https://github.com/EmmanuelVelez))
20
+
21
+ #### 🏠 Internal
22
+
23
+ - KSP-7685: Synthetic Data for Conflict Enrichment/Resolution testing [#7154](https://github.com/knapsack-labs/app-monorepo/pull/7154) ([@sxalexander](https://github.com/sxalexander))
24
+ - KSP-5524 Migrated ESLint config to flat config format (ESLint 9) [#7162](https://github.com/knapsack-labs/app-monorepo/pull/7162) ([@EmmanuelVelez](https://github.com/EmmanuelVelez))
25
+
26
+ #### Authors: 2
27
+
28
+ - [@EmmanuelVelez](https://github.com/EmmanuelVelez)
29
+ - Sam Alexander ([@sxalexander](https://github.com/sxalexander))
30
+
31
+ ---
32
+
33
+ # v4.89.7 (Fri Feb 06 2026)
34
+
35
+ #### πŸ› Bug Fix
36
+
37
+ - Merge branch 'latest' into feature/ksp-6555-remove-app-client-watchers-for-files-in-data-directory ([@EvanLovely](https://github.com/EvanLovely))
38
+ - Merge branch 'latest' into feature/ksp-6555-remove-app-client-watchers-for-files-in-data-directory ([@EmmanuelVelez](https://github.com/EmmanuelVelez))
39
+
40
+ #### 🏠 Internal
41
+
42
+ - KSP-6106 Added consistent-type-imports rule with inline type syntax [#7128](https://github.com/knapsack-labs/app-monorepo/pull/7128) ([@EmmanuelVelez](https://github.com/EmmanuelVelez))
43
+ - KSP-7692: expand server actions body size limit [#7097](https://github.com/knapsack-labs/app-monorepo/pull/7097) ([@illepic](https://github.com/illepic))
44
+ - KSP-7623 resolved some of react-hooks/set-state-in-effect lint errors and enab… [#7077](https://github.com/knapsack-labs/app-monorepo/pull/7077) ([@EmmanuelVelez](https://github.com/EmmanuelVelez))
45
+
46
+ #### Authors: 3
47
+
48
+ - [@EmmanuelVelez](https://github.com/EmmanuelVelez)
49
+ - Christopher Bloom ([@illepic](https://github.com/illepic))
50
+ - Evan Lovely ([@EvanLovely](https://github.com/EvanLovely))
51
+
52
+ ---
53
+
54
+ # v4.89.4 (Mon Jan 05 2026)
55
+
56
+ #### 🏠 Internal
57
+
58
+ - KSP-6086 normalize error and log metadata for api domains [#6997](https://github.com/knapsack-labs/app-monorepo/pull/6997) ([@EmmanuelVelez](https://github.com/EmmanuelVelez))
59
+
60
+ #### Authors: 1
61
+
62
+ - [@EmmanuelVelez](https://github.com/EmmanuelVelez)
63
+
64
+ ---
65
+
66
+ # v4.89.3 (Thu Dec 11 2025)
67
+
68
+ #### πŸ› Bug Fix
69
+
70
+ - KSP-6536 Fixed align token metrics counting with UI logic for variables and collections [#6778](https://github.com/knapsack-labs/app-monorepo/pull/6778) ([@EmmanuelVelez](https://github.com/EmmanuelVelez))
71
+ - Merge branch 'latest' into feature/ksp-6536-metrics-not-computing-tokens-and-variables-correctly ([@EmmanuelVelez](https://github.com/EmmanuelVelez))
72
+ - Merge remote-tracking branch 'origin/feature/ksp-6536-metrics-not-computing-tokens-and-variables-correctly' into feature/ksp-6536-metrics-not-computing-tokens-and-variables-correctly ([@EmmanuelVelez](https://github.com/EmmanuelVelez))
73
+
74
+ #### Authors: 1
75
+
76
+ - [@EmmanuelVelez](https://github.com/EmmanuelVelez)
77
+
78
+ ---
79
+
80
+ # v4.89.1 (Wed Dec 10 2025)
81
+
82
+ #### πŸ› Bug Fix
83
+
84
+ - Merge remote-tracking branch 'origin/latest' into KSP-6900_mcp_onboarding_pages ([@brittanysmart](https://github.com/brittanysmart))
85
+
86
+ #### Authors: 1
87
+
88
+ - Brittany Smart ([@brittanysmart](https://github.com/brittanysmart))
89
+
90
+ ---
91
+
92
+ # v4.88.0 (Mon Nov 24 2025)
93
+
94
+ #### πŸš€ Enhancement
95
+
96
+ - upgrade to react 19 [#6897](https://github.com/knapsack-labs/app-monorepo/pull/6897) ([@brittanysmart](https://github.com/brittanysmart) [@EvanLovely](https://github.com/EvanLovely))
97
+
98
+ #### Authors: 2
99
+
100
+ - Brittany Smart ([@brittanysmart](https://github.com/brittanysmart))
101
+ - Evan Lovely ([@EvanLovely](https://github.com/EvanLovely))
102
+
103
+ ---
104
+
105
+ # v4.87.9 (Thu Nov 20 2025)
106
+
107
+ #### 🏠 Internal
108
+
109
+ - fix(deps): update dependency @types/node to ^20.19.25 [#6803](https://github.com/knapsack-labs/app-monorepo/pull/6803) ([@renovate[bot]](https://github.com/renovate[bot]))
110
+
111
+ #### Authors: 1
112
+
113
+ - [@renovate[bot]](https://github.com/renovate[bot])
114
+
115
+ ---
116
+
117
+ # v4.87.7 (Mon Nov 10 2025)
118
+
119
+ #### 🏠 Internal
120
+
121
+ - fix(deps): update typescript [#6863](https://github.com/knapsack-labs/app-monorepo/pull/6863) ([@renovate[bot]](https://github.com/renovate[bot]))
122
+
123
+ #### Authors: 1
124
+
125
+ - [@renovate[bot]](https://github.com/renovate[bot])
126
+
127
+ ---
128
+
129
+ # v4.87.6 (Wed Nov 05 2025)
130
+
131
+ #### 🏠 Internal
132
+
133
+ - Add comprehensive testing for remaining frameworks and MUI lib [#6876](https://github.com/knapsack-labs/app-monorepo/pull/6876) ([@mabry1985](https://github.com/mabry1985))
134
+
135
+ #### Authors: 1
136
+
137
+ - Josh Mabry ([@mabry1985](https://github.com/mabry1985))
138
+
139
+ ---
140
+
141
+ # v4.87.4 (Fri Oct 31 2025)
142
+
143
+ #### 🏠 Internal
144
+
145
+ - adds wider testing to angular renderer [#6871](https://github.com/knapsack-labs/app-monorepo/pull/6871) ([@mabry1985](https://github.com/mabry1985))
146
+
147
+ #### Authors: 1
148
+
149
+ - Josh Mabry ([@mabry1985](https://github.com/mabry1985))
150
+
151
+ ---
152
+
1
153
  # v4.87.3 (Thu Oct 30 2025)
2
154
 
3
155
  #### πŸ› Bug Fix
@@ -14,7 +14,7 @@ export default class ErrorCatcher extends React.Component<{
14
14
  hasError: boolean;
15
15
  };
16
16
  componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
17
- render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element;
17
+ render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode>> | import("react/jsx-runtime").JSX.Element;
18
18
  }
19
19
  export {};
20
20
  //# sourceMappingURL=error-catcher.d.ts.map
@@ -18,15 +18,14 @@ export default class ErrorCatcher extends React.Component {
18
18
  const { componentStack } = errorInfo;
19
19
  this.setState({
20
20
  error,
21
- componentStack: componentStack !== null && componentStack !== void 0 ? componentStack : '',
21
+ componentStack: componentStack ?? '',
22
22
  });
23
23
  }
24
24
  render() {
25
- var _a, _b, _c, _d, _e, _f;
26
25
  if (this.state.hasError) {
27
26
  return (_jsxs("div", { style: {
28
27
  padding: '5px',
29
- }, children: [_jsx("h5", { children: "Error caught in React Components" }), ((_a = this.state.error) === null || _a === void 0 ? void 0 : _a.name) && (_jsxs("h5", { children: ["Error Name: ", _jsx("code", { children: (_b = this.state.error) === null || _b === void 0 ? void 0 : _b.name })] })), ((_c = this.state.error) === null || _c === void 0 ? void 0 : _c.message) && (_jsxs("h5", { children: ["Message:", (_d = this.state.error) === null || _d === void 0 ? void 0 : _d.message] })), this.state.componentStack && (_jsxs(_Fragment, { children: [_jsx("h6", { children: "Component Stack:" }), _jsx("pre", { children: _jsx("code", { children: this.state.componentStack }) }), _jsx("br", {})] })), ((_e = this.state.error) === null || _e === void 0 ? void 0 : _e.stack) && (_jsxs(_Fragment, { children: [_jsx("h6", { children: "Error Stack:" }), _jsx("pre", { children: _jsx("code", { children: (_f = this.state.error) === null || _f === void 0 ? void 0 : _f.stack }) })] }))] }));
28
+ }, children: [_jsx("h5", { children: "Error caught in React Components" }), this.state.error?.name && (_jsxs("h5", { children: ["Error Name: ", _jsx("code", { children: this.state.error?.name })] })), this.state.error?.message && (_jsxs("h5", { children: ["Message:", this.state.error?.message] })), this.state.componentStack && (_jsxs(_Fragment, { children: [_jsx("h6", { children: "Component Stack:" }), _jsx("pre", { children: _jsx("code", { children: this.state.componentStack }) }), _jsx("br", {})] })), this.state.error?.stack && (_jsxs(_Fragment, { children: [_jsx("h6", { children: "Error Stack:" }), _jsx("pre", { children: _jsx("code", { children: this.state.error?.stack }) })] }))] }));
30
29
  }
31
30
  return this.props.children;
32
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"error-catcher.js","sourceRoot":"","sources":["../src/error-catcher.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,KAAK,CAAC,SAG/C;IACC,YAAY,KAAoC;QAC9C,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACX,QAAQ,EAAE,KAAK;YACf,cAAc,EAAE,EAAE;SACnB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,MAAa;QAC3C,6DAA6D;QAC7D,OAAO;YACL,QAAQ,EAAE,IAAI;SACf,CAAC;IACJ,CAAC;IAEQ,iBAAiB,CAAC,KAAY,EAAE,SAA0B;QACjE,MAAM,EAAE,cAAc,EAAE,GAAG,SAAS,CAAC;QACrC,IAAI,CAAC,QAAQ,CAAC;YACZ,KAAK;YACL,cAAc,EAAE,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,EAAE;SACrC,CAAC,CAAC;IACL,CAAC;IAEQ,MAAM;;QACb,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YACxB,OAAO,CACL,eACE,KAAK,EAAE;oBACL,OAAO,EAAE,KAAK;iBACf,aAED,4DAAyC,EACxC,CAAA,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,0CAAE,IAAI,KAAI,CACzB,yCACc,yBAAO,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,0CAAE,IAAI,GAAQ,IAC9C,CACN,EACA,CAAA,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,0CAAE,OAAO,KAAI,CAC5B,qCAEG,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,0CAAE,OAAO,IACvB,CACN,EACA,IAAI,CAAC,KAAK,CAAC,cAAc,IAAI,CAC5B,8BACE,4CAAyB,EACzB,wBACE,yBAAO,IAAI,CAAC,KAAK,CAAC,cAAc,GAAQ,GACpC,EACN,cAAM,IACL,CACJ,EACA,CAAA,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,0CAAE,KAAK,KAAI,CAC1B,8BACE,wCAAqB,EACrB,wBACE,yBAAO,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,0CAAE,KAAK,GAAQ,GAClC,IACL,CACJ,IACG,CACP,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;CACF"}
1
+ {"version":3,"file":"error-catcher.js","sourceRoot":"","sources":["../src/error-catcher.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,KAAK,CAAC,SAG/C;IACC,YAAY,KAAoC;QAC9C,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACX,QAAQ,EAAE,KAAK;YACf,cAAc,EAAE,EAAE;SACnB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,MAAa;QAC3C,6DAA6D;QAC7D,OAAO;YACL,QAAQ,EAAE,IAAI;SACf,CAAC;IACJ,CAAC;IAEQ,iBAAiB,CAAC,KAAY,EAAE,SAA0B;QACjE,MAAM,EAAE,cAAc,EAAE,GAAG,SAAS,CAAC;QACrC,IAAI,CAAC,QAAQ,CAAC;YACZ,KAAK;YACL,cAAc,EAAE,cAAc,IAAI,EAAE;SACrC,CAAC,CAAC;IACL,CAAC;IAEQ,MAAM;QACb,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YACxB,OAAO,CACL,eACE,KAAK,EAAE;oBACL,OAAO,EAAE,KAAK;iBACf,aAED,4DAAyC,EACxC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,IAAI,CACzB,yCACc,yBAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,GAAQ,IAC9C,CACN,EACA,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,IAAI,CAC5B,qCAEG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,IACvB,CACN,EACA,IAAI,CAAC,KAAK,CAAC,cAAc,IAAI,CAC5B,8BACE,4CAAyB,EACzB,wBACE,yBAAO,IAAI,CAAC,KAAK,CAAC,cAAc,GAAQ,GACpC,EACN,cAAM,IACL,CACJ,EACA,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,IAAI,CAC1B,8BACE,wCAAqB,EACrB,wBACE,yBAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAQ,GAClC,IACL,CACJ,IACG,CACP,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;CACF"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  type Props = {
3
3
  textAlign?: 'left' | 'center' | 'right';
4
4
  imgSrc?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/test-fixtures/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAExC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC;IAClC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,EAAE;QACL,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,EAAE,CAAC;CACL,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAwBhC,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/test-fixtures/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAExC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC;IAClC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,EAAE;QACL,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,EAAE,CAAC;CACL,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAwBhC,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -11,6 +11,6 @@ interface ComplexProps {
11
11
  showHeader: boolean;
12
12
  };
13
13
  }
14
- export declare const ComplexComponent: ({ users, config, }: ComplexProps) => JSX.Element;
14
+ export declare const ComplexComponent: ({ users, config: _config }: ComplexProps) => import("react/jsx-runtime").JSX.Element;
15
15
  export {};
16
16
  //# sourceMappingURL=complex-props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"complex-props.d.ts","sourceRoot":"","sources":["../../src/test-fixtures/complex-props.tsx"],"names":[],"mappings":"AACA,UAAU,YAAY;IACpB,4BAA4B;IAC5B,KAAK,EAAE,KAAK,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;KACxB,CAAC,CAAC;IACH,2BAA2B;IAC3B,MAAM,EAAE;QACN,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;QACxB,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;CACH;AAED,eAAO,MAAM,gBAAgB,GAAI,oBAG9B,YAAY,KAAG,GAAG,CAAC,OAMrB,CAAC"}
1
+ {"version":3,"file":"complex-props.d.ts","sourceRoot":"","sources":["../../src/test-fixtures/complex-props.tsx"],"names":[],"mappings":"AACA,UAAU,YAAY;IACpB,4BAA4B;IAC5B,KAAK,EAAE,KAAK,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;KACxB,CAAC,CAAC;IACH,2BAA2B;IAC3B,MAAM,EAAE;QACN,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;QACxB,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;CACH;AAED,eAAO,MAAM,gBAAgB,GAAI,4BAA4B,YAAY,4CAMxE,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- export const ComplexComponent = ({ users, config, }) => (_jsx("div", { children: users.map((user) => (_jsx("div", { children: user.name }, user.id))) }));
2
+ export const ComplexComponent = ({ users, config: _config }) => (_jsx("div", { children: users.map((user) => (_jsx("div", { children: user.name }, user.id))) }));
3
3
  //# sourceMappingURL=complex-props.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"complex-props.js","sourceRoot":"","sources":["../../src/test-fixtures/complex-props.tsx"],"names":[],"mappings":";AAeA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC/B,KAAK,EACL,MAAM,GACO,EAAe,EAAE,CAAC,CAC/B,wBACG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,wBAAoB,IAAI,CAAC,IAAI,IAAnB,IAAI,CAAC,EAAE,CAAmB,CACrC,CAAC,GACE,CACP,CAAC"}
1
+ {"version":3,"file":"complex-props.js","sourceRoot":"","sources":["../../src/test-fixtures/complex-props.tsx"],"names":[],"mappings":";AAeA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAgB,EAAE,EAAE,CAAC,CAC5E,wBACG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,wBAAoB,IAAI,CAAC,IAAI,IAAnB,IAAI,CAAC,EAAE,CAAmB,CACrC,CAAC,GACE,CACP,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { ButtonHTMLAttributes, DetailedHTMLProps, ReactNode } from 'react';
2
+ /**
3
+ * Author-defined props. `className` is intentionally redeclared here to verify
4
+ * that the inheritance-based filter keeps user-declared props even when the
5
+ * name collides with one on `HTMLAttributes`.
6
+ */
7
+ export interface DomInheritedButtonAuthorProps {
8
+ /** Size variant declared on the author's interface, NOT inherited. */
9
+ size?: 'sm' | 'md' | 'lg';
10
+ /** Custom semantic prop. */
11
+ iconLeading?: ReactNode;
12
+ /** Override of the inherited className β€” should survive `removeHtmlAttributes`. */
13
+ className?: string;
14
+ }
15
+ /**
16
+ * Inherits from ButtonHTMLAttributes (which transitively pulls in
17
+ * HTMLAttributes / AriaAttributes / DOMAttributes), simulating the prop-deluge
18
+ * scenario the workspace infer-spec filters were designed to address.
19
+ */
20
+ export interface DomInheritedButtonProps extends DomInheritedButtonAuthorProps, DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
21
+ }
22
+ export declare const DomInheritedButton: ({ size, iconLeading, className, ...rest }: DomInheritedButtonProps) => import("react/jsx-runtime").JSX.Element;
23
+ //# sourceMappingURL=dom-inherited-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom-inherited-button.d.ts","sourceRoot":"","sources":["../../src/test-fixtures/dom-inherited-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEhF;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC5C,sEAAsE;IACtE,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,4BAA4B;IAC5B,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,uBACf,SACE,6BAA6B,EAC7B,iBAAiB,CACf,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,iBAAiB,CAClB;CAAG;AAER,eAAO,MAAM,kBAAkB,GAAI,2CAKhC,uBAAuB,4CAIzB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export const DomInheritedButton = ({ size = 'md', iconLeading, className, ...rest }) => (_jsx("button", { type: "button", className: className, "data-size": size, ...rest, children: iconLeading }));
3
+ //# sourceMappingURL=dom-inherited-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom-inherited-button.js","sourceRoot":"","sources":["../../src/test-fixtures/dom-inherited-button.tsx"],"names":[],"mappings":";AA6BA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,IAAI,GAAG,IAAI,EACX,WAAW,EACX,SAAS,EACT,GAAG,IAAI,EACiB,EAAE,EAAE,CAAC,CAC7B,iBAAQ,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAE,SAAS,eAAa,IAAI,KAAM,IAAI,YAClE,WAAW,GACL,CACV,CAAC"}
@@ -1,10 +1,10 @@
1
- import { ReactNode } from 'react';
1
+ import { type ReactNode } from 'react';
2
2
  interface ListProps<T> {
3
3
  /** List of items */
4
4
  items: T[];
5
5
  /** Render function for each item */
6
6
  renderItem: (item: T) => ReactNode;
7
7
  }
8
- export declare const GenericComponentType: <T>({ items, renderItem, }: ListProps<T>) => JSX.Element;
8
+ export declare const GenericComponentType: <T>({ items, renderItem, }: ListProps<T>) => import("react/jsx-runtime").JSX.Element;
9
9
  export {};
10
10
  //# sourceMappingURL=generic-component-type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generic-component-type.d.ts","sourceRoot":"","sources":["../../src/test-fixtures/generic-component-type.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,UAAU,SAAS,CAAC,CAAC;IACnB,oBAAoB;IACpB,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,oCAAoC;IACpC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,SAAS,CAAC;CACpC;AAED,eAAO,MAAM,oBAAoB,GAAI,CAAC,EAAG,wBAGtC,SAAS,CAAC,CAAC,CAAC,KAAG,GAAG,CAAC,OAMrB,CAAC"}
1
+ {"version":3,"file":"generic-component-type.d.ts","sourceRoot":"","sources":["../../src/test-fixtures/generic-component-type.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,SAAS,CAAC,CAAC;IACnB,oBAAoB;IACpB,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,oCAAoC;IACpC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,SAAS,CAAC;CACpC;AAED,eAAO,MAAM,oBAAoB,GAAI,CAAC,EAAG,wBAGtC,SAAS,CAAC,CAAC,CAAC,4CAMd,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"generic-component-type.js","sourceRoot":"","sources":["../../src/test-fixtures/generic-component-type.tsx"],"names":[],"mappings":";AAUA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAK,EACvC,KAAK,EACL,UAAU,GACG,EAAe,EAAE,CAAC,CAC/B,uBACG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1B,uBAAgC,UAAU,CAAC,IAAI,CAAC,IAAvC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAyB,CACvD,CAAC,GACC,CACN,CAAC"}
1
+ {"version":3,"file":"generic-component-type.js","sourceRoot":"","sources":["../../src/test-fixtures/generic-component-type.tsx"],"names":[],"mappings":";AAUA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAK,EACvC,KAAK,EACL,UAAU,GACG,EAAE,EAAE,CAAC,CAClB,uBACG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1B,uBAAgC,UAAU,CAAC,IAAI,CAAC,IAAvC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAyB,CACvD,CAAC,GACC,CACN,CAAC"}
@@ -7,4 +7,6 @@ export * from './render-node-props.js';
7
7
  export * from './numeric-enum-negative.js';
8
8
  export * from './forward-ref-component.js';
9
9
  export * from './nullable-unions.js';
10
+ export * from './dom-inherited-button.js';
11
+ export * from './union-react-node.js';
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test-fixtures/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test-fixtures/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC"}
@@ -7,4 +7,6 @@ export * from './render-node-props.js';
7
7
  export * from './numeric-enum-negative.js';
8
8
  export * from './forward-ref-component.js';
9
9
  export * from './nullable-unions.js';
10
+ export * from './dom-inherited-button.js';
11
+ export * from './union-react-node.js';
10
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/test-fixtures/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/test-fixtures/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  export interface NullableUnionsProps {
3
3
  /**
4
4
  * Optional string that can be undefined
@@ -1 +1 @@
1
- {"version":3,"file":"nullable-unions.d.ts","sourceRoot":"","sources":["../../src/test-fixtures/nullable-unions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAYxD,CAAC"}
1
+ {"version":3,"file":"nullable-unions.d.ts","sourceRoot":"","sources":["../../src/test-fixtures/nullable-unions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAYxD,CAAC"}
@@ -3,6 +3,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  * Component to test nullable union type inference
4
4
  */
5
5
  export const NullableUnions = ({ label, value, description, }) => {
6
- return (_jsxs("div", { children: [label && _jsx("h3", { children: label }), _jsxs("p", { children: ["Value: ", value !== null && value !== void 0 ? value : 'N/A'] }), description && _jsx("p", { children: description })] }));
6
+ return (_jsxs("div", { children: [label && _jsx("h3", { children: label }), _jsxs("p", { children: ["Value: ", value ?? 'N/A'] }), description && _jsx("p", { children: description })] }));
7
7
  };
8
8
  //# sourceMappingURL=nullable-unions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nullable-unions.js","sourceRoot":"","sources":["../../src/test-fixtures/nullable-unions.tsx"],"names":[],"mappings":";AAiBA;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,EAC5D,KAAK,EACL,KAAK,EACL,WAAW,GACZ,EAAE,EAAE;IACH,OAAO,CACL,0BACG,KAAK,IAAI,uBAAK,KAAK,GAAM,EAC1B,mCAAW,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,KAAK,IAAK,EAC7B,WAAW,IAAI,sBAAI,WAAW,GAAK,IAChC,CACP,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"nullable-unions.js","sourceRoot":"","sources":["../../src/test-fixtures/nullable-unions.tsx"],"names":[],"mappings":";AAiBA;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,EAC5D,KAAK,EACL,KAAK,EACL,WAAW,GACZ,EAAE,EAAE;IACH,OAAO,CACL,0BACG,KAAK,IAAI,uBAAK,KAAK,GAAM,EAC1B,mCAAW,KAAK,IAAI,KAAK,IAAK,EAC7B,WAAW,IAAI,sBAAI,WAAW,GAAK,IAChC,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  type Offset = -10 | -5 | 0 | 5 | 10;
3
3
  export interface NumericEnumNegativeProps {
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"numeric-enum-negative.d.ts","sourceRoot":"","sources":["../../src/test-fixtures/numeric-enum-negative.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,KAAK,MAAM,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AAEpC,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAKlE,CAAC"}
1
+ {"version":3,"file":"numeric-enum-negative.d.ts","sourceRoot":"","sources":["../../src/test-fixtures/numeric-enum-negative.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,KAAK,MAAM,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AAEpC,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAKlE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import { type ReactNode } from 'react';
2
2
  interface RenderPropsComponentProps {
3
3
  /** Header render function */
4
4
  renderHeader: () => ReactNode;
@@ -9,6 +9,6 @@ interface RenderPropsComponentProps {
9
9
  /** Optional footer */
10
10
  footer?: ReactNode;
11
11
  }
12
- export declare const RenderPropsComponent: ({ renderHeader, renderContent, footer, }: RenderPropsComponentProps) => JSX.Element;
12
+ export declare const RenderPropsComponent: ({ renderHeader, renderContent, footer, }: RenderPropsComponentProps) => import("react/jsx-runtime").JSX.Element;
13
13
  export {};
14
14
  //# sourceMappingURL=render-node-props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"render-node-props.d.ts","sourceRoot":"","sources":["../../src/test-fixtures/render-node-props.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,UAAU,yBAAyB;IACjC,6BAA6B;IAC7B,YAAY,EAAE,MAAM,SAAS,CAAC;IAC9B,8BAA8B;IAC9B,aAAa,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,SAAS,CAAC;IACtD,sBAAsB;IACtB,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,eAAO,MAAM,oBAAoB,GAAI,0CAIlC,yBAAyB,KAAG,GAAG,CAAC,OAMlC,CAAC"}
1
+ {"version":3,"file":"render-node-props.d.ts","sourceRoot":"","sources":["../../src/test-fixtures/render-node-props.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,yBAAyB;IACjC,6BAA6B;IAC7B,YAAY,EAAE,MAAM,SAAS,CAAC;IAC9B,8BAA8B;IAC9B,aAAa,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,SAAS,CAAC;IACtD,sBAAsB;IACtB,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,eAAO,MAAM,oBAAoB,GAAI,0CAIlC,yBAAyB,4CAM3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"render-node-props.js","sourceRoot":"","sources":["../../src/test-fixtures/render-node-props.tsx"],"names":[],"mappings":";AAYA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EACnC,YAAY,EACZ,aAAa,EACb,MAAM,GACoB,EAAe,EAAE,CAAC,CAC5C,0BACG,YAAY,EAAE,EACd,aAAa,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAC3B,MAAM,IACH,CACP,CAAC"}
1
+ {"version":3,"file":"render-node-props.js","sourceRoot":"","sources":["../../src/test-fixtures/render-node-props.tsx"],"names":[],"mappings":";AAYA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EACnC,YAAY,EACZ,aAAa,EACb,MAAM,GACoB,EAAE,EAAE,CAAC,CAC/B,0BACG,YAAY,EAAE,EACd,aAAa,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAC3B,MAAM,IACH,CACP,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { type FC, type ReactNode } from 'react';
2
+ /**
3
+ * Mirrors the shape of GSK's `Button` icon props, where a prop is a union of a
4
+ * component type and `ReactNode` (`FC<…> | ReactNode`). Because `FC` is not
5
+ * assignable to `ReactNode`, TypeScript keeps this a real union and expands the
6
+ * `ReactNode` alias into its constituents β€” which previously caused the prop to
7
+ * infer as a plain string field instead of a ReactNode slot.
8
+ */
9
+ interface UnionReactNodeProps {
10
+ /** Component-or-node union, like an icon slot. Should be a slot. */
11
+ iconLeading?: FC<{
12
+ className?: string;
13
+ }> | ReactNode;
14
+ /** Plain string-or-node union. Should be a slot. */
15
+ label?: string | ReactNode;
16
+ /** Bare ReactNode. Should be a slot (regression guard for the existing path). */
17
+ iconTrailing?: ReactNode;
18
+ /** Enum union β€” must stay a prop, NOT be treated as a slot. */
19
+ size?: 'sm' | 'md' | 'lg';
20
+ /** Enum whose value happens to be the literal "ReactNode" β€” must stay a prop. */
21
+ display?: 'ReactNode' | 'text';
22
+ }
23
+ export declare const UnionReactNode: ({ iconLeading, label, iconTrailing, size, display, }: UnionReactNodeProps) => import("react/jsx-runtime").JSX.Element;
24
+ /**
25
+ * Faithfully mirrors GSK's `Button`: the props type is itself a UNION of two
26
+ * interfaces (button vs. link) that share `iconLeading: FC<…> | ReactNode`.
27
+ * That extra union-of-interfaces level is what nests the icon prop one deeper
28
+ * than a plain object props type β€” the exact shape that must still route the
29
+ * icon prop to a ReactNode slot.
30
+ */
31
+ interface IconButtonCommonProps {
32
+ /** Component-or-node union, like an icon slot. Should be a slot. */
33
+ iconLeading?: FC<{
34
+ className?: string;
35
+ }> | ReactNode;
36
+ /** Enum union β€” must stay a prop. */
37
+ size?: 'sm' | 'md' | 'lg';
38
+ }
39
+ interface IconButtonAsButtonProps extends IconButtonCommonProps {
40
+ type?: 'button' | 'submit' | 'reset';
41
+ }
42
+ interface IconButtonAsLinkProps extends IconButtonCommonProps {
43
+ href?: string;
44
+ }
45
+ export type UnionPropsIconButtonProps = IconButtonAsButtonProps | IconButtonAsLinkProps;
46
+ export declare const UnionPropsIconButton: (props: UnionPropsIconButtonProps) => import("react/jsx-runtime").JSX.Element;
47
+ export {};
48
+ //# sourceMappingURL=union-react-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"union-react-node.d.ts","sourceRoot":"","sources":["../../src/test-fixtures/union-react-node.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEhD;;;;;;GAMG;AACH,UAAU,mBAAmB;IAC3B,oEAAoE;IACpE,WAAW,CAAC,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IACrD,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,iFAAiF;IACjF,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,iFAAiF;IACjF,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;CAChC;AAED,eAAO,MAAM,cAAc,GAAI,sDAM5B,mBAAmB,4CAYrB,CAAC;AAEF;;;;;;GAMG;AACH,UAAU,qBAAqB;IAC7B,oEAAoE;IACpE,WAAW,CAAC,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IACrD,qCAAqC;IACrC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B;AACD,UAAU,uBAAwB,SAAQ,qBAAqB;IAC7D,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;CACtC;AACD,UAAU,qBAAsB,SAAQ,qBAAqB;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AACD,MAAM,MAAM,yBAAyB,GACjC,uBAAuB,GACvB,qBAAqB,CAAC;AAE1B,eAAO,MAAM,oBAAoB,GAAI,OAAO,yBAAyB,4CASpE,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export const UnionReactNode = ({ iconLeading, label, iconTrailing, size = 'md', display = 'text', }) => {
3
+ // `iconLeading` can be a component or a node; render accordingly. (Only the
4
+ // prop types are analyzed for the spec β€” the body just needs to compile.)
5
+ const Leading = typeof iconLeading === 'function' ? iconLeading : null;
6
+ const leadingNode = typeof iconLeading === 'function' ? null : iconLeading;
7
+ return (_jsxs("button", { type: "button", "data-size": size, "data-display": display, children: [Leading ? _jsx(Leading, {}) : leadingNode, label, iconTrailing] }));
8
+ };
9
+ export const UnionPropsIconButton = (props) => {
10
+ const { iconLeading, size = 'md' } = props;
11
+ const Leading = typeof iconLeading === 'function' ? iconLeading : null;
12
+ const leadingNode = typeof iconLeading === 'function' ? null : iconLeading;
13
+ return (_jsx("button", { type: "button", "data-size": size, children: Leading ? _jsx(Leading, {}) : leadingNode }));
14
+ };
15
+ //# sourceMappingURL=union-react-node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"union-react-node.js","sourceRoot":"","sources":["../../src/test-fixtures/union-react-node.tsx"],"names":[],"mappings":";AAsBA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,WAAW,EACX,KAAK,EACL,YAAY,EACZ,IAAI,GAAG,IAAI,EACX,OAAO,GAAG,MAAM,GACI,EAAE,EAAE;IACxB,4EAA4E;IAC5E,0EAA0E;IAC1E,MAAM,OAAO,GAAG,OAAO,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC;IACvE,MAAM,WAAW,GAAG,OAAO,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC;IAC3E,OAAO,CACL,kBAAQ,IAAI,EAAC,QAAQ,eAAY,IAAI,kBAAgB,OAAO,aACzD,OAAO,CAAC,CAAC,CAAC,KAAC,OAAO,KAAG,CAAC,CAAC,CAAC,WAAW,EACnC,KAAK,EACL,YAAY,IACN,CACV,CAAC;AACJ,CAAC,CAAC;AAyBF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAgC,EAAE,EAAE;IACvE,MAAM,EAAE,WAAW,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAC3C,MAAM,OAAO,GAAG,OAAO,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC;IACvE,MAAM,WAAW,GAAG,OAAO,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC;IAC3E,OAAO,CACL,iBAAQ,IAAI,EAAC,QAAQ,eAAY,IAAI,YAClC,OAAO,CAAC,CAAC,CAAC,KAAC,OAAO,KAAG,CAAC,CAAC,CAAC,WAAW,GAC7B,CACV,CAAC;AACJ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@knapsack/renderer-react-components",
3
3
  "description": "",
4
- "version": "5.0.0--canary.6593.d6350c3.0",
4
+ "version": "5.0.0--canary.7791.86072ba.0",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  "./demo-wrapper": {
@@ -35,17 +35,17 @@
35
35
  "lint": "eslint ./"
36
36
  },
37
37
  "devDependencies": {
38
- "@knapsack/eslint-config-starter": "5.0.0--canary.6593.d6350c3.0",
39
- "@knapsack/prettier-config": "5.0.0--canary.6593.d6350c3.0",
40
- "@knapsack/types": "5.0.0--canary.6593.d6350c3.0",
41
- "@knapsack/typescript-config-starter": "5.0.0--canary.6593.d6350c3.0",
42
- "@types/node": "^20.19.22",
38
+ "@knapsack/eslint-config-starter": "5.0.0--canary.7791.86072ba.0",
39
+ "@knapsack/prettier-config": "5.0.0--canary.7791.86072ba.0",
40
+ "@knapsack/types": "5.0.0--canary.7791.86072ba.0",
41
+ "@knapsack/typescript-config-starter": "5.0.0--canary.7791.86072ba.0",
42
+ "@types/node": "^22.19.11",
43
43
  "@types/prop-types": "^15.7.15",
44
- "@types/react": "^18.3.26",
45
- "eslint": "^8.57.0",
44
+ "@types/react": "^19.2.3",
45
+ "eslint": "^9.20.0",
46
46
  "prop-types": "^15.8.1",
47
- "react": "^18.3.1",
48
- "typescript": "^5.9.2"
47
+ "react": "^19.2.0",
48
+ "typescript": "^5.9.3"
49
49
  },
50
50
  "license": "GPL-2.0-or-later",
51
51
  "publishConfig": {
@@ -56,5 +56,5 @@
56
56
  "directory": "apps/client/libs/renderer-react-components",
57
57
  "type": "git"
58
58
  },
59
- "gitHead": "d6350c3155974b24f788116c8edb9769c6c3460e"
59
+ "gitHead": "86072ba9ee416b70b656ebf4fc91827c1d46b0d2"
60
60
  }
package/.eslintignore DELETED
@@ -1 +0,0 @@
1
- dist
package/.eslintrc.cjs DELETED
@@ -1,9 +0,0 @@
1
- module.exports = {
2
- extends: [
3
- '@knapsack/eslint-config-starter/react',
4
- '@knapsack/eslint-config-starter',
5
- ],
6
- parserOptions: { tsconfigRootDir: __dirname },
7
- ignorePatterns: [],
8
- rules: {},
9
- };