Skip to content

Commit e07a5a0

Browse files
committed
fixes
1 parent e42fe26 commit e07a5a0

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

examples/image/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"dev": "portless image-demo.json-render next dev --turbopack",
88
"build": "next build",
99
"start": "next start",
10-
"check-types": "tsc --noEmit"
10+
"check-types": "tsc --noEmit",
11+
"lint": "eslint --max-warnings 0"
1112
},
1213
"dependencies": {
1314
"@json-render/core": "workspace:*",
@@ -30,10 +31,12 @@
3031
"zod": "4.3.6"
3132
},
3233
"devDependencies": {
34+
"@internal/eslint-config": "workspace:*",
3335
"@internal/typescript-config": "workspace:*",
3436
"@types/node": "^22.10.0",
3537
"@types/react": "19.2.3",
3638
"@types/react-dom": "19.2.3",
39+
"eslint": "^9.39.1",
3740
"shadcn": "^3.8.5",
3841
"tw-animate-css": "^1.4.0",
3942
"typescript": "^5.7.2"

packages/image/src/render.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@ import type { ComponentRegistry } from "./types";
1212

1313
export { standardComponents };
1414

15-
export type RenderComponentRegistry = Record<string, React.ComponentType<any>>;
16-
1715
export interface RenderOptions {
18-
registry?: RenderComponentRegistry;
16+
registry?: ComponentRegistry;
1917
includeStandard?: boolean;
2018
state?: Record<string, unknown>;
2119
fonts?: SatoriOptions["fonts"];
@@ -30,7 +28,7 @@ const noopEmit = () => {};
3028
function renderElement(
3129
elementKey: string,
3230
spec: Spec,
33-
registry: RenderComponentRegistry,
31+
registry: ComponentRegistry,
3432
stateModel: Record<string, unknown>,
3533
repeatItem?: unknown,
3634
repeatIndex?: number,
@@ -155,7 +153,7 @@ function buildTree(
155153
...state,
156154
};
157155

158-
const registry: RenderComponentRegistry = {
156+
const registry: ComponentRegistry = {
159157
...(includeStandard ? standardComponents : {}),
160158
...customRegistry,
161159
};

0 commit comments

Comments
 (0)