@open-elements/ui 0.4.0 → 0.5.0

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": "@open-elements/ui",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Shared UI component library for Open Elements applications",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -25,17 +25,12 @@
25
25
  "sideEffects": [
26
26
  "**/*.css"
27
27
  ],
28
- "peerDependencies": {
29
- "react": "^19.0.0",
30
- "react-dom": "^19.0.0",
31
- "@base-ui/react": "^1.3.0",
32
- "radix-ui": "^1.4.0",
33
- "lucide-react": "^0.500.0",
28
+ "dependencies": {
34
29
  "class-variance-authority": "^0.7.0",
35
30
  "clsx": "^2.1.0",
36
31
  "tailwind-merge": "^3.0.0",
37
- "react-day-picker": "^9.14.0",
38
32
  "date-fns": "^4.1.0",
33
+ "react-day-picker": "^9.14.0",
39
34
  "@tiptap/core": "^3.22.0",
40
35
  "@tiptap/react": "^3.22.0",
41
36
  "@tiptap/starter-kit": "^3.22.0",
@@ -43,6 +38,13 @@
43
38
  "@tiptap/extension-placeholder": "^3.22.0",
44
39
  "tiptap-markdown": "^0.9.0"
45
40
  },
41
+ "peerDependencies": {
42
+ "react": "^19.0.0",
43
+ "react-dom": "^19.0.0",
44
+ "@base-ui/react": "^1.3.0",
45
+ "radix-ui": "^1.4.0",
46
+ "lucide-react": "^0.500.0"
47
+ },
46
48
  "devDependencies": {
47
49
  "@types/react": "^19.0.0",
48
50
  "@types/react-dom": "^19.0.0",
@@ -60,18 +62,7 @@
60
62
  "react-dom": "^19.0.0",
61
63
  "@base-ui/react": "^1.3.0",
62
64
  "radix-ui": "^1.4.0",
63
- "lucide-react": "^0.500.0",
64
- "class-variance-authority": "^0.7.0",
65
- "clsx": "^2.1.0",
66
- "tailwind-merge": "^3.0.0",
67
- "react-day-picker": "^9.14.0",
68
- "date-fns": "^4.1.0",
69
- "@tiptap/core": "^3.22.0",
70
- "@tiptap/react": "^3.22.0",
71
- "@tiptap/starter-kit": "^3.22.0",
72
- "@tiptap/extension-link": "^3.22.0",
73
- "@tiptap/extension-placeholder": "^3.22.0",
74
- "tiptap-markdown": "^0.9.0"
65
+ "lucide-react": "^0.500.0"
75
66
  },
76
67
  "scripts": {
77
68
  "build": "tsc -p tsconfig.build.json && pnpm run build:css",
@@ -115,8 +115,7 @@ export function MarkdownEditor({ value, onChange, placeholder }: MarkdownEditorP
115
115
  content: value,
116
116
  immediatelyRender: false,
117
117
  onUpdate: ({ editor: ed }) => {
118
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
119
- onChange((ed.storage as any).markdown.getMarkdown());
118
+ onChange(ed.storage.markdown.getMarkdown());
120
119
  },
121
120
  editorProps: {
122
121
  attributes: {
@@ -127,8 +126,7 @@ export function MarkdownEditor({ value, onChange, placeholder }: MarkdownEditorP
127
126
 
128
127
  useEffect(() => {
129
128
  if (!editor) return;
130
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
131
- const currentMarkdown = (editor.storage as any).markdown.getMarkdown();
129
+ const currentMarkdown = editor.storage.markdown.getMarkdown();
132
130
  if (value !== currentMarkdown) {
133
131
  editor.commands.setContent(value);
134
132
  }
@@ -0,0 +1,11 @@
1
+ import type { MarkdownStorage } from "tiptap-markdown";
2
+
3
+ // Augment tiptap's Storage interface so editor.storage.markdown is typed.
4
+ // See https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#storage
5
+ declare module "@tiptap/core" {
6
+ interface Storage {
7
+ markdown: MarkdownStorage;
8
+ }
9
+ }
10
+
11
+ export {};