@knapsack/renderer-react-components 4.73.0 → 4.73.1--canary.5422.13eea70.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.
- package/.turbo/turbo-lint.log +0 -9
- package/CHANGELOG.md +0 -20
- package/dist/test-fixtures/index.d.ts +0 -3
- package/dist/test-fixtures/index.d.ts.map +1 -1
- package/dist/test-fixtures/index.js +0 -3
- package/dist/test-fixtures/index.js.map +1 -1
- package/package.json +6 -7
- package/src/test-fixtures/index.ts +0 -3
- package/dist/test-fixtures/complex-props.d.ts +0 -16
- package/dist/test-fixtures/complex-props.d.ts.map +0 -1
- package/dist/test-fixtures/complex-props.js +0 -3
- package/dist/test-fixtures/complex-props.js.map +0 -1
- package/dist/test-fixtures/generic-component-type.d.ts +0 -10
- package/dist/test-fixtures/generic-component-type.d.ts.map +0 -1
- package/dist/test-fixtures/generic-component-type.js +0 -3
- package/dist/test-fixtures/generic-component-type.js.map +0 -1
- package/dist/test-fixtures/render-node-props.d.ts +0 -14
- package/dist/test-fixtures/render-node-props.d.ts.map +0 -1
- package/dist/test-fixtures/render-node-props.js +0 -3
- package/dist/test-fixtures/render-node-props.js.map +0 -1
- package/src/test-fixtures/complex-props.tsx +0 -25
- package/src/test-fixtures/generic-component-type.tsx +0 -20
- package/src/test-fixtures/render-node-props.tsx +0 -23
package/.turbo/turbo-lint.log
CHANGED
|
@@ -2,12 +2,3 @@
|
|
|
2
2
|
> @knapsack/renderer-react-components@4.72.1 lint /home/runner/work/app-monorepo/app-monorepo/apps/client/libs/renderer-react-components
|
|
3
3
|
> eslint ./
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
/home/runner/work/app-monorepo/app-monorepo/apps/client/libs/renderer-react-components/src/test-fixtures/complex-props.tsx
|
|
7
|
-
18:3 warning 'config' is defined but never used. Allowed unused args must match /^_/u unused-imports/no-unused-vars
|
|
8
|
-
|
|
9
|
-
/home/runner/work/app-monorepo/app-monorepo/apps/client/libs/renderer-react-components/src/test-fixtures/generic-component-type.tsx
|
|
10
|
-
16:23 warning 'index' is defined but never used. Allowed unused args must match /^_/u unused-imports/no-unused-vars
|
|
11
|
-
|
|
12
|
-
✖ 2 problems (0 errors, 2 warnings)
|
|
13
|
-
|
package/CHANGELOG.md
CHANGED
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
# v4.73.0 (Thu Jan 16 2025)
|
|
2
|
-
|
|
3
|
-
#### 🚀 Enhancement
|
|
4
|
-
|
|
5
|
-
- improved react renderer infer spec engine [#5222](https://github.com/knapsack-labs/app-monorepo/pull/5222) ([@mabry1985](https://github.com/mabry1985))
|
|
6
|
-
|
|
7
|
-
#### 🐛 Bug Fix
|
|
8
|
-
|
|
9
|
-
- merge latest ([@mabry1985](https://github.com/mabry1985))
|
|
10
|
-
- Merge branch 'latest' into feature/ksp-5583-replace-react-renderer-infer-spec-engine ([@mabry1985](https://github.com/mabry1985))
|
|
11
|
-
- add additional test scenarios ([@mabry1985](https://github.com/mabry1985))
|
|
12
|
-
- reorder exports ([@mabry1985](https://github.com/mabry1985))
|
|
13
|
-
- add pkg updates ([@mabry1985](https://github.com/mabry1985))
|
|
14
|
-
|
|
15
|
-
#### Authors: 1
|
|
16
|
-
|
|
17
|
-
- Josh Mabry ([@mabry1985](https://github.com/mabry1985))
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
1
|
# v4.72.1 (Thu Jan 16 2025)
|
|
22
2
|
|
|
23
3
|
#### 🐛 Bug Fix
|
|
@@ -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
|
|
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"}
|
|
@@ -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
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knapsack/renderer-react-components",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "4.73.0",
|
|
4
|
+
"version": "4.73.1--canary.5422.13eea70.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./demo-wrapper": {
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
"types": "./dist/react-renderer-client-app.d.ts",
|
|
23
23
|
"default": "./dist/react-renderer-client-app.js"
|
|
24
24
|
},
|
|
25
|
-
"./src/test-fixtures/*": "./src/test-fixtures/*",
|
|
26
25
|
"./test-fixtures": {
|
|
27
26
|
"types": "./dist/test-fixtures/index.d.ts",
|
|
28
27
|
"default": "./dist/test-fixtures/index.js"
|
|
@@ -35,10 +34,10 @@
|
|
|
35
34
|
"lint": "eslint ./"
|
|
36
35
|
},
|
|
37
36
|
"devDependencies": {
|
|
38
|
-
"@knapsack/eslint-config-starter": "4.73.0",
|
|
39
|
-
"@knapsack/prettier-config": "4.73.0",
|
|
40
|
-
"@knapsack/types": "4.73.0",
|
|
41
|
-
"@knapsack/typescript-config-starter": "4.73.0",
|
|
37
|
+
"@knapsack/eslint-config-starter": "4.73.1--canary.5422.13eea70.0",
|
|
38
|
+
"@knapsack/prettier-config": "4.73.1--canary.5422.13eea70.0",
|
|
39
|
+
"@knapsack/types": "4.73.1--canary.5422.13eea70.0",
|
|
40
|
+
"@knapsack/typescript-config-starter": "4.73.1--canary.5422.13eea70.0",
|
|
42
41
|
"@types/node": "^20.17.11",
|
|
43
42
|
"@types/prop-types": "^15.7.14",
|
|
44
43
|
"@types/react": "^18.3.12",
|
|
@@ -56,5 +55,5 @@
|
|
|
56
55
|
"directory": "apps/client/libs/renderer-react-components",
|
|
57
56
|
"type": "git"
|
|
58
57
|
},
|
|
59
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "13eea70de8cdcdeed244b252300c882079a6c11a"
|
|
60
59
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
interface ComplexProps {
|
|
2
|
-
/** Array of user objects */
|
|
3
|
-
users: Array<{
|
|
4
|
-
id: number;
|
|
5
|
-
name: string;
|
|
6
|
-
role: 'admin' | 'user';
|
|
7
|
-
}>;
|
|
8
|
-
/** Configuration object */
|
|
9
|
-
config: {
|
|
10
|
-
theme: 'light' | 'dark';
|
|
11
|
-
showHeader: boolean;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export declare const ComplexComponent: ({ users, config, }: ComplexProps) => JSX.Element;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=complex-props.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,uBAG1B,YAAY,KAAG,GAAG,CAAC,OAMrB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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,10 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
interface ListProps<T> {
|
|
3
|
-
/** List of items */
|
|
4
|
-
items: T[];
|
|
5
|
-
/** Render function for each item */
|
|
6
|
-
renderItem: (item: T) => ReactNode;
|
|
7
|
-
}
|
|
8
|
-
export declare const GenericComponentType: <T>({ items, renderItem, }: ListProps<T>) => JSX.Element;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=generic-component-type.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,0BAGnC,SAAS,CAAC,CAAC,CAAC,KAAG,GAAG,CAAC,OAMrB,CAAC"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
export const GenericComponentType = ({ items, renderItem, }) => (_jsx("ul", { children: items.map((item, index) => (_jsx("li", { children: renderItem(item) }, JSON.stringify(item)))) }));
|
|
3
|
-
//# sourceMappingURL=generic-component-type.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,14 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
interface RenderPropsComponentProps {
|
|
3
|
-
/** Header render function */
|
|
4
|
-
renderHeader: () => ReactNode;
|
|
5
|
-
/** Content render function */
|
|
6
|
-
renderContent: (data: {
|
|
7
|
-
count: number;
|
|
8
|
-
}) => ReactNode;
|
|
9
|
-
/** Optional footer */
|
|
10
|
-
footer?: ReactNode;
|
|
11
|
-
}
|
|
12
|
-
export declare const RenderPropsComponent: ({ renderHeader, renderContent, footer, }: RenderPropsComponentProps) => JSX.Element;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=render-node-props.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,6CAI9B,yBAAyB,KAAG,GAAG,CAAC,OAMlC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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,25 +0,0 @@
|
|
|
1
|
-
// Example with complex TypeScript types
|
|
2
|
-
interface ComplexProps {
|
|
3
|
-
/** Array of user objects */
|
|
4
|
-
users: Array<{
|
|
5
|
-
id: number;
|
|
6
|
-
name: string;
|
|
7
|
-
role: 'admin' | 'user';
|
|
8
|
-
}>;
|
|
9
|
-
/** Configuration object */
|
|
10
|
-
config: {
|
|
11
|
-
theme: 'light' | 'dark';
|
|
12
|
-
showHeader: boolean;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const ComplexComponent = ({
|
|
17
|
-
users,
|
|
18
|
-
config,
|
|
19
|
-
}: ComplexProps): JSX.Element => (
|
|
20
|
-
<div>
|
|
21
|
-
{users.map((user) => (
|
|
22
|
-
<div key={user.id}>{user.name}</div>
|
|
23
|
-
))}
|
|
24
|
-
</div>
|
|
25
|
-
);
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
// // Example with generic types
|
|
4
|
-
interface ListProps<T> {
|
|
5
|
-
/** List of items */
|
|
6
|
-
items: T[];
|
|
7
|
-
/** Render function for each item */
|
|
8
|
-
renderItem: (item: T) => ReactNode;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const GenericComponentType = <T,>({
|
|
12
|
-
items,
|
|
13
|
-
renderItem,
|
|
14
|
-
}: ListProps<T>): JSX.Element => (
|
|
15
|
-
<ul>
|
|
16
|
-
{items.map((item, index) => (
|
|
17
|
-
<li key={JSON.stringify(item)}>{renderItem(item)}</li>
|
|
18
|
-
))}
|
|
19
|
-
</ul>
|
|
20
|
-
);
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
// Example with render props using TypeScript
|
|
4
|
-
interface RenderPropsComponentProps {
|
|
5
|
-
/** Header render function */
|
|
6
|
-
renderHeader: () => ReactNode;
|
|
7
|
-
/** Content render function */
|
|
8
|
-
renderContent: (data: { count: number }) => ReactNode;
|
|
9
|
-
/** Optional footer */
|
|
10
|
-
footer?: ReactNode;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const RenderPropsComponent = ({
|
|
14
|
-
renderHeader,
|
|
15
|
-
renderContent,
|
|
16
|
-
footer,
|
|
17
|
-
}: RenderPropsComponentProps): JSX.Element => (
|
|
18
|
-
<div>
|
|
19
|
-
{renderHeader()}
|
|
20
|
-
{renderContent({ count: 0 })}
|
|
21
|
-
{footer}
|
|
22
|
-
</div>
|
|
23
|
-
);
|