@verdant-web/tiptap 6.0.1 → 7.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdant-web/tiptap",
3
- "version": "6.0.1",
3
+ "version": "7.0.1",
4
4
  "access": "public",
5
5
  "type": "module",
6
6
  "main": "dist/esm/index.js",
@@ -30,8 +30,8 @@
30
30
  "@tiptap/pm": "^2.11.5",
31
31
  "@tiptap/react": "^2.11.5",
32
32
  "react": "^19.0.0",
33
- "@verdant-web/store": "4.6.1",
34
- "@verdant-web/react": "42.1.1"
33
+ "@verdant-web/react": "43.0.0",
34
+ "@verdant-web/store": "5.0.1"
35
35
  },
36
36
  "peerDependenciesMeta": {
37
37
  "@verdant-web/store": {
@@ -51,7 +51,7 @@
51
51
  "@verdant-web/common": "3.0.0"
52
52
  },
53
53
  "devDependencies": {
54
- "@hono/node-server": "1.14.0",
54
+ "@hono/node-server": "^1.19.5",
55
55
  "@tiptap/core": "^2.11.5",
56
56
  "@tiptap/html": "^2.11.5",
57
57
  "@tiptap/pm": "^2.11.5",
@@ -59,26 +59,26 @@
59
59
  "@tiptap/starter-kit": "^2.11.5",
60
60
  "@types/react": "19.1.16",
61
61
  "@types/react-dom": "19.1.9",
62
- "@vitejs/plugin-basic-ssl": "2.0.0",
63
- "@vitejs/plugin-react": "5.0.4",
64
- "@vitest/browser": "3.2.4",
65
- "hono": "4.7.5",
66
- "playwright": "1.55.1",
62
+ "@vitejs/plugin-basic-ssl": "2.1.0",
63
+ "@vitejs/plugin-react": "^5.1.0",
64
+ "@vitest/browser-playwright": "^4.0.8",
65
+ "hono": "^4.9.9",
66
+ "playwright": "1.56.1",
67
67
  "react": "19.1.1",
68
68
  "react-dom": "19.1.1",
69
69
  "typescript": "5.9.3",
70
- "vite": "7.1.7",
71
- "vitest": "3.2.4",
72
- "vitest-browser-react": "1.0.1",
73
- "@verdant-web/react": "42.1.1",
74
- "@verdant-web/server": "4.0.2",
75
- "@verdant-web/store": "4.6.1",
76
- "@verdant-web/cli": "4.8.3"
70
+ "vite": "^7.2.2",
71
+ "vitest": "^4.0.8",
72
+ "vitest-browser-react": "^2.0.2",
73
+ "@verdant-web/cli": "5.1.0",
74
+ "@verdant-web/react": "43.0.0",
75
+ "@verdant-web/server": "4.0.3",
76
+ "@verdant-web/store": "5.0.1"
77
77
  },
78
78
  "scripts": {
79
79
  "test": "vitest",
80
80
  "ci:test:unit": "vitest run",
81
- "build:client": "tsc --project tsconfig.json",
81
+ "build:client": "tsc --project tsconfig.json --customConditions production",
82
82
  "build:server": "tsc --project tsconfig.server.json",
83
83
  "build": "pnpm run build:client && pnpm run build:server",
84
84
  "prepublish": "pnpm run build",
@@ -2,11 +2,11 @@ import { EditorContent } from '@tiptap/react';
2
2
  import { StarterKit } from '@tiptap/starter-kit';
3
3
  import { createMigration, schema } from '@verdant-web/common';
4
4
  import { createHooks } from '@verdant-web/react';
5
- import { ClientDescriptor, ClientWithCollections } from '@verdant-web/store';
6
- import { userEvent } from '@vitest/browser/context';
5
+ import { Client, ClientWithCollections } from '@verdant-web/store';
7
6
  import { ChangeEvent, ReactNode, Suspense } from 'react';
8
7
  import { afterAll, beforeAll, expect, it } from 'vitest';
9
8
  import { render } from 'vitest-browser-react';
9
+ import { userEvent } from 'vitest/browser';
10
10
  import {
11
11
  createTipTapFieldSchema,
12
12
  createTipTapFileMapSchema,
@@ -49,17 +49,15 @@ function safeLogger(level: string, ...args: any[]) {
49
49
  }
50
50
  }
51
51
 
52
- let clientDesc: ClientDescriptor;
53
52
  let client: ClientWithCollections;
54
53
  beforeAll(async () => {
55
- clientDesc = new ClientDescriptor({
54
+ client = new Client({
56
55
  schema: testSchema,
57
56
  oldSchemas: [testSchema],
58
57
  migrations: [createMigration(testSchema)],
59
58
  namespace: 'tiptatp-test',
60
59
  // log: safeLogger,
61
- });
62
- client = await (clientDesc.open() as Promise<ClientWithCollections>);
60
+ }) as any as ClientWithCollections;
63
61
  });
64
62
 
65
63
  afterAll(() => client.close());
@@ -68,7 +66,7 @@ function renderWithProvider(content: ReactNode) {
68
66
  return render(content, {
69
67
  wrapper: ({ children }) => (
70
68
  <Suspense>
71
- <hooks.Provider value={clientDesc}>
69
+ <hooks.Provider value={client}>
72
70
  <Suspense fallback={<div data-testid="suspense">Loading...</div>}>
73
71
  {children}
74
72
  </Suspense>
@@ -531,7 +529,7 @@ it('should support media nodes', async () => {
531
529
  });
532
530
 
533
531
  const insertMedia = async (ev: ChangeEvent<HTMLInputElement>) => {
534
- const file = ev.target.files?.[0];
532
+ const file = ev.currentTarget.files?.[0];
535
533
  if (!file) return;
536
534
  editor?.chain().insertMedia(file).run();
537
535
  };
@@ -661,7 +659,7 @@ it('can re-render with a different backing entity', async () => {
661
659
  });
662
660
 
663
661
  const insertMedia = async (ev: ChangeEvent<HTMLInputElement>) => {
664
- const file = ev.target.files?.[0];
662
+ const file = ev.currentTarget.files?.[0];
665
663
  if (!file) return;
666
664
  editor?.chain().insertMedia(file).run();
667
665
  };