Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/react-19-alignment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@open-slide/core": major
"@open-slide/cli": major
---

Require React 19 for the runtime and generated workspaces.
8 changes: 4 additions & 4 deletions apps/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
},
"dependencies": {
"@open-slide/core": "workspace:*",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.2.7",
"react-dom": "^19.2.7"
},
"devDependencies": {
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1"
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3"
}
}
5 changes: 4 additions & 1 deletion apps/web/components/mdx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import type { MDXComponents } from 'mdx/types';
export function getMDXComponents(components?: MDXComponents) {
return {
...defaultMdxComponents,
img: (props) => <ImageZoom {...props} />,
img: (props) => {
const { src, ...rest } = props;
return <ImageZoom {...rest} src={typeof src === 'string' ? src : undefined} />;
},
TypeTable,
...components,
} satisfies MDXComponents;
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
},
"dependencies": {
"@open-slide/core": "^0.0.6",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.2.7",
"react-dom": "^19.2.7"
},
"devDependencies": {
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
Comment on lines +14 to +19

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Do not modify the CLI template package.json.

packages/cli/template/package.json is explicitly excluded by the path instructions. Revert this file’s changes or obtain an updated repository instruction before proceeding.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/cli/template/package.json` around lines 14 - 19, Revert the
dependency changes in the CLI template package.json, restoring the file to its
prior state; do not modify this excluded template file unless repository
instructions are explicitly updated.

Source: Path instructions

"vite": "^5.4.10"
}
}
8 changes: 4 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
"html-to-image": "^1.11.13",
"lucide-react": "^1.25.0",
"next-themes": "^0.4.6",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.2.7",
"react-dom": "^19.2.7",
"react-image-crop": "^11.0.10",
"react-router-dom": "^7.18.1",
"shadcn": "^4.12.0",
Expand All @@ -99,8 +99,8 @@
"devDependencies": {
"@playwright/test": "~1.56.1",
"@types/node": "^22.19.17",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"tsdown": "^0.9.9",
"typescript": "^5.9.3"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function Frame({
showImageActions = false,
}: {
anchor: HTMLElement | null;
overlayRef: React.RefObject<HTMLDivElement>;
overlayRef: React.RefObject<HTMLDivElement | null>;
variant: FrameVariant;
showImageActions?: boolean;
}) {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/app/lib/use-click-page-navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const NAV_PASSTHROUGH =
'a, button, input, textarea, select, label, summary, iframe, video, audio, embed, object, [role="button"], [role="link"], [contenteditable="true"], [data-osd-interactive], [data-osd-chrome]';

type UseClickPageNavigationOptions<T extends HTMLElement> = {
ref: RefObject<T>;
ref: RefObject<T | null>;
enabled?: boolean;
/** Fraction of the width on each side that navigates; the center is inert. */
edgeRatio?: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/app/lib/use-wheel-page-navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const WHEEL_NAV_COOLDOWN_MS = 100;
const WHEEL_GESTURE_IDLE_MS = 80;

type UseWheelPageNavigationOptions<T extends HTMLElement> = {
ref: RefObject<T>;
ref: RefObject<T | null>;
enabled?: boolean;
canPrev: boolean;
canNext: boolean;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/app/routes/slide.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ function SlideViewportNavigation({
canPrev,
canNext,
}: {
targetRef: RefObject<HTMLElement>;
targetRef: RefObject<HTMLElement | null>;
onPrev: () => void;
onNext: () => void;
canPrev: boolean;
Expand Down
Loading