@knapsack/renderer-react-components 4.106.3 → 4.107.1

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.
@@ -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 | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode>> | React.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> | null | undefined> | React.JSX.Element | null | undefined;
18
18
  }
19
19
  export {};
20
20
  //# sourceMappingURL=error-catcher.d.ts.map
@@ -13,7 +13,7 @@ export declare const CardPropTypes: {
13
13
  }): React.JSX.Element;
14
14
  defaultProps: {
15
15
  align: string;
16
- children: any;
16
+ children: null;
17
17
  handleClick: () => void;
18
18
  isDark: boolean;
19
19
  };
@@ -9,4 +9,5 @@ export * from './forward-ref-component.js';
9
9
  export * from './nullable-unions.js';
10
10
  export * from './dom-inherited-button.js';
11
11
  export * from './union-react-node.js';
12
+ export * from './no-props.js';
12
13
  //# 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;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,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;AACtC,cAAc,eAAe,CAAC"}
@@ -9,4 +9,5 @@ export * from './forward-ref-component.js';
9
9
  export * from './nullable-unions.js';
10
10
  export * from './dom-inherited-button.js';
11
11
  export * from './union-react-node.js';
12
+ export * from './no-props.js';
12
13
  //# 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;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,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;AACtC,cAAc,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** A component that takes no props, for checking the spec inferred when there is nothing to document */
2
+ export declare const NoProps: () => import("react").JSX.Element;
3
+ //# sourceMappingURL=no-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-props.d.ts","sourceRoot":"","sources":["../../src/test-fixtures/no-props.tsx"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,eAAO,MAAM,OAAO,mCAEnB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /** A component that takes no props, for checking the spec inferred when there is nothing to document */
3
+ export const NoProps = () => {
4
+ return _jsx("div", { children: "No props" });
5
+ };
6
+ //# sourceMappingURL=no-props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-props.js","sourceRoot":"","sources":["../../src/test-fixtures/no-props.tsx"],"names":[],"mappings":";AAAA,wGAAwG;AACxG,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,EAAE;IAC1B,OAAO,qCAAmB,CAAC;AAC7B,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@knapsack/renderer-react-components",
3
3
  "description": "",
4
- "version": "4.106.3",
4
+ "version": "4.107.1",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  "./demo-wrapper": {
@@ -30,15 +30,16 @@
30
30
  },
31
31
  "sideEffects": false,
32
32
  "devDependencies": {
33
- "@knapsack/types": "4.106.3",
34
- "@knapsack/typescript-config-starter": "4.106.3",
33
+ "@knapsack/types": "4.107.1",
34
+ "@knapsack/typescript-config-starter": "4.107.1",
35
35
  "@types/node": "^24.13.2",
36
36
  "@types/prop-types": "^15.7.15",
37
37
  "@types/react": "^19.2.18",
38
38
  "eslint": "^9.20.0",
39
39
  "prop-types": "^15.8.1",
40
40
  "react": "^19.3.0",
41
- "typescript": "^6.0.3"
41
+ "typescript": "^6.0.3",
42
+ "vitest": "^4.1.11"
42
43
  },
43
44
  "license": "GPL-2.0-or-later",
44
45
  "publishConfig": {
@@ -52,6 +53,7 @@
52
53
  "scripts": {
53
54
  "build": "tsc",
54
55
  "clean": "rm -rf ./dist",
55
- "lint": "eslint ./"
56
+ "lint": "eslint ./",
57
+ "test": "vitest run"
56
58
  }
57
59
  }
package/tsconfig.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "compilerOptions": {
4
4
  "rootDir": "./src",
5
5
  "strict": false,
6
- "strictNullChecks": false,
6
+ "strictNullChecks": true,
7
7
  "noImplicitAny": true,
8
8
  "outDir": "./dist"
9
9
  },
@@ -0,0 +1,7 @@
1
+ import { defineConfig } from 'vitest/config';
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ include: ['src/**/*.test.{ts,tsx}'],
6
+ },
7
+ });