Skip to content

Commit 40a6fd8

Browse files
committed
fix: safari related fix
1 parent e0b2c99 commit 40a6fd8

File tree

9 files changed

+3481
-4082
lines changed

9 files changed

+3481
-4082
lines changed

apps/web/package.json

+21-21
Original file line numberDiff line numberDiff line change
@@ -12,43 +12,43 @@
1212
},
1313
"dependencies": {
1414
"@radix-ui/react-dialog": "^1.0.5",
15-
"@radix-ui/react-popover": "^1.0.6",
15+
"@radix-ui/react-popover": "^1.0.7",
1616
"@radix-ui/react-scroll-area": "^1.0.5",
1717
"@radix-ui/react-select": "^2.0.0",
1818
"@radix-ui/react-separator": "^1.0.3",
1919
"@radix-ui/react-slot": "^1.0.2",
2020
"@tailwindcss/typography": "^0.5.10",
21-
"@upstash/ratelimit": "^0.4.3",
22-
"@vercel/analytics": "^1.0.1",
23-
"@vercel/blob": "^0.9.2",
24-
"@vercel/kv": "^0.2.1",
25-
"ai": "^2.2.33",
21+
"@upstash/ratelimit": "^1.0.1",
22+
"@vercel/analytics": "^1.2.2",
23+
"@vercel/blob": "^0.22.1",
24+
"@vercel/kv": "^1.0.1",
25+
"ai": "^3.0.12",
2626
"autoprefixer": "^10.4.17",
2727
"class-variance-authority": "^0.7.0",
28-
"clsx": "^1.2.1",
29-
"cmdk": "^0.2.1",
30-
"eventsource-parser": "^0.1.0",
28+
"clsx": "^2.1.0",
29+
"cmdk": "^1.0.0",
30+
"eventsource-parser": "^1.1.2",
3131
"highlight.js": "^11.9.0",
3232
"lowlight": "^3.1.0",
33-
"lucide-react": "^0.244.0",
34-
"next": "14.1.0",
33+
"lucide-react": "^0.358.0",
34+
"next": "15.1.4",
3535
"next-themes": "^0.2.1",
3636
"novel": "workspace:^",
37-
"openai": "^4.27.0",
37+
"openai": "^4.28.4",
3838
"react": "18.2.0",
3939
"react-dom": "18.2.0",
40-
"react-markdown": "^8.0.7",
41-
"sonner": "^0.7.0",
42-
"tailwind-merge": "^1.14.0",
43-
"tailwindcss-animate": "^1.0.6",
40+
"react-markdown": "^9.0.1",
41+
"sonner": "^1.4.3",
42+
"tailwind-merge": "^2.2.1",
43+
"tailwindcss-animate": "^1.0.7",
4444
"tippy.js": "^6.3.7",
45-
"ts-pattern": "^5.0.6",
46-
"typescript": "^5.3.3",
47-
"use-debounce": "^9.0.3"
45+
"ts-pattern": "^5.0.8",
46+
"typescript": "^5.4.2",
47+
"use-debounce": "^10.0.0"
4848
},
4949
"devDependencies": {
50-
"@types/node": "18.15.3",
51-
"@types/react": "^18.2.55",
50+
"@types/node": "20.11.24",
51+
"@types/react": "^18.2.61",
5252
"@types/react-dom": "18.2.19",
5353
"tailwindcss": "^3.4.1",
5454
"@biomejs/biome": "^1.7.2",

package.json

+8-7
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,18 @@
1414
"typecheck": "turbo typecheck"
1515
},
1616
"dependencies": {
17-
"turbo": "^1.9.3"
17+
"turbo": "^2.3.3"
1818
},
19+
"packageManager": "[email protected]",
1920
"devDependencies": {
20-
"@biomejs/biome": "^1.7.2",
21-
"@commitlint/cli": "^18.6.0",
22-
"@commitlint/config-conventional": "^18.6.0",
21+
"@biomejs/biome": "^1.9.4",
22+
"@commitlint/cli": "^19.6.1",
23+
"@commitlint/config-conventional": "^19.6.0",
2324
"@semantic-release/changelog": "^6.0.3",
2425
"@semantic-release/git": "^10.0.1",
25-
"husky": "^8.0.3",
26-
"postcss": "^8.4.27",
27-
"semantic-release": "^22.0.0"
26+
"husky": "^9.1.7",
27+
"postcss": "^8.5.1",
28+
"semantic-release": "^24.2.1"
2829
},
2930
"commitlint": {
3031
"extends": [

packages/headless/package.json

+30-31
Original file line numberDiff line numberDiff line change
@@ -20,49 +20,48 @@
2020
},
2121
"sideEffects": false,
2222
"peerDependencies": {
23-
"react": "^18.0.0",
24-
"react-dom": "^18.0.0"
23+
"react": ">=18"
2524
},
2625
"dependencies": {
27-
"@radix-ui/react-slot": "^1.0.2",
28-
"@tiptap/core": "^2.1.7",
29-
"@tiptap/extension-character-count": "^2.3.0",
30-
"@tiptap/extension-code-block-lowlight": "^2.2.6",
31-
"@tiptap/extension-color": "^2.1.7",
32-
"@tiptap/extension-highlight": "^2.1.7",
33-
"@tiptap/extension-horizontal-rule": "^2.1.7",
34-
"@tiptap/extension-image": "^2.1.7",
35-
"@tiptap/extension-link": "^2.1.7",
36-
"@tiptap/extension-placeholder": "2.0.3",
37-
"@tiptap/extension-task-item": "^2.1.7",
38-
"@tiptap/extension-task-list": "^2.1.7",
39-
"@tiptap/extension-text-style": "^2.1.7",
40-
"@tiptap/extension-underline": "^2.1.7",
41-
"@tiptap/extension-youtube": "^2.4.0",
42-
"@tiptap/pm": "^2.1.7",
43-
"@tiptap/react": "^2.1.7",
44-
"@tiptap/starter-kit": "^2.1.7",
45-
"@tiptap/suggestion": "^2.1.7",
46-
"@types/node": "18.15.3",
47-
"cmdk": "^0.2.1",
48-
"jotai": "^2.6.4",
49-
"react-markdown": "^8.0.7",
26+
"@radix-ui/react-slot": "^1.1.1",
27+
"@tiptap/core": "^2.11.2",
28+
"@tiptap/extension-character-count": "^2.11.2",
29+
"@tiptap/extension-code-block-lowlight": "^2.11.2",
30+
"@tiptap/extension-color": "^2.11.2",
31+
"@tiptap/extension-highlight": "^2.11.2",
32+
"@tiptap/extension-horizontal-rule": "^2.11.2",
33+
"@tiptap/extension-image": "^2.11.2",
34+
"@tiptap/extension-link": "^2.11.2",
35+
"@tiptap/extension-placeholder": "^2.11.2",
36+
"@tiptap/extension-task-item": "^2.11.2",
37+
"@tiptap/extension-task-list": "^2.11.2",
38+
"@tiptap/extension-text-style": "^2.11.2",
39+
"@tiptap/extension-underline": "^2.11.2",
40+
"@tiptap/extension-youtube": "^2.11.2",
41+
"@tiptap/pm": "^2.11.2",
42+
"@tiptap/react": "^2.11.2",
43+
"@tiptap/starter-kit": "^2.11.2",
44+
"@tiptap/suggestion": "^2.11.2",
45+
"@types/node": "^22.10.6",
46+
"cmdk": "^1.0.4",
47+
"jotai": "^2.11.0",
48+
"react-markdown": "^9.0.3",
5049
"react-moveable": "^0.56.0",
5150
"react-tweet": "^3.2.1",
52-
"katex": "^0.16.10",
51+
"katex": "^0.16.20",
5352
"tippy.js": "^6.3.7",
54-
"tiptap-extension-global-drag-handle": "^0.1.7",
55-
"tiptap-markdown": "^0.8.9",
53+
"tiptap-extension-global-drag-handle": "^0.1.16",
54+
"tiptap-markdown": "^0.8.10",
5655
"tunnel-rat": "^0.1.2"
5756
},
5857
"devDependencies": {
59-
"@biomejs/biome": "^1.7.2",
58+
"@biomejs/biome": "^1.9.4",
6059
"@types/katex": "^0.16.7",
6160
"@types/react": "^18.2.55",
6261
"@types/react-dom": "18.2.19",
6362
"tsconfig": "workspace:*",
64-
"tsup": "^8.0.2",
65-
"typescript": "^5.3.3"
63+
"tsup": "^8.3.5",
64+
"typescript": "^5.7.3"
6665
},
6766
"author": "Steven Tey <[email protected]>",
6867
"homepage": "https://novel.sh",

packages/headless/src/components/editor-bubble.tsx

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { BubbleMenu, isNodeSelection, useCurrentEditor } from "@tiptap/react";
2-
import { useMemo, useRef, useEffect, forwardRef } from "react";
32
import type { BubbleMenuProps } from "@tiptap/react";
3+
import { forwardRef, useEffect, useMemo, useRef } from "react";
44
import type { ReactNode } from "react";
55
import type { Instance, Props } from "tippy.js";
66

@@ -41,10 +41,16 @@ export const EditorBubble = forwardRef<HTMLDivElement, EditorBubbleProps>(
4141
tippyOptions: {
4242
onCreate: (val) => {
4343
instanceRef.current = val;
44+
45+
instanceRef.current.popper.firstChild?.addEventListener("blur", (event) => {
46+
event.preventDefault();
47+
event.stopImmediatePropagation();
48+
});
4449
},
4550
moveTransition: "transform 0.15s ease-out",
4651
...tippyOptions,
4752
},
53+
editor: currentEditor,
4854
...rest,
4955
};
5056
}, [rest, tippyOptions]);
@@ -54,9 +60,7 @@ export const EditorBubble = forwardRef<HTMLDivElement, EditorBubbleProps>(
5460
return (
5561
// We need to add this because of https://github.com/ueberdosis/tiptap/issues/2658
5662
<div ref={ref}>
57-
<BubbleMenu editor={currentEditor} {...bubbleMenuProps}>
58-
{children}
59-
</BubbleMenu>
63+
<BubbleMenu {...bubbleMenuProps}>{children}</BubbleMenu>
6064
</div>
6165
);
6266
},

packages/headless/src/extensions/twitter.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const isValidTwitterUrl = (url: string) => {
99
};
1010

1111
const TweetComponent = ({ node }: { node: Partial<ReactNodeViewRendererOptions> }) => {
12-
const url = node?.attrs?.src;
12+
const url = (node?.attrs as Record<string, string>)?.src;
1313
const tweetId = url?.split("/").pop();
1414

1515
if (!tweetId) {

packages/headless/src/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,4 @@ export {
6767
} from "./utils";
6868

6969
// Store and Atoms
70-
export { novelStore } from "./utils/store";
7170
export { queryAtom, rangeAtom } from "./utils/atoms";

packages/headless/src/utils/store.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
import { createStore } from "jotai";
22

3-
export const novelStore = createStore();
3+
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
4+
export const novelStore: any = createStore();
5+
export * from "jotai";

0 commit comments

Comments
 (0)