@editorcn/editor 0.4.2 → 0.5.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/dist/theme.css ADDED
@@ -0,0 +1,43 @@
1
+ @property --rte-toolbar-fade-start {
2
+ syntax: "<length>";
3
+ inherits: false;
4
+ initial-value: 0px;
5
+ }
6
+
7
+ @property --rte-toolbar-fade-end {
8
+ syntax: "<length>";
9
+ inherits: false;
10
+ initial-value: 0px;
11
+ }
12
+
13
+ @theme {
14
+ --animate-rte-bubble-pop-in: rte-bubble-pop-in 180ms ease-out forwards;
15
+ --animate-rte-toolbar-fade: rte-toolbar-fade linear both;
16
+
17
+ @keyframes rte-bubble-pop-in {
18
+ 0% {
19
+ opacity: 0;
20
+ transform: scale(0.98) translateY(4px);
21
+ }
22
+ 100% {
23
+ opacity: 1;
24
+ transform: scale(1) translateY(0);
25
+ }
26
+ }
27
+
28
+ @keyframes rte-toolbar-fade {
29
+ from {
30
+ --rte-toolbar-fade-start: 0px;
31
+ --rte-toolbar-fade-end: 1.5rem;
32
+ }
33
+ 10%,
34
+ 90% {
35
+ --rte-toolbar-fade-start: 1.5rem;
36
+ --rte-toolbar-fade-end: 1.5rem;
37
+ }
38
+ to {
39
+ --rte-toolbar-fade-start: 1.5rem;
40
+ --rte-toolbar-fade-end: 0px;
41
+ }
42
+ }
43
+ }
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@editorcn/editor",
3
- "version": "0.4.2",
3
+ "version": "0.5.1",
4
4
  "files": [
5
+ "CHANGELOG.md",
5
6
  "dist"
6
7
  ],
7
8
  "type": "module",
@@ -14,31 +15,38 @@
14
15
  "import": "./dist/index.js",
15
16
  "require": "./dist/index.cjs"
16
17
  },
17
- "./style.css": "./dist/style.css"
18
+ "./style.css": "./dist/style.css",
19
+ "./theme.css": "./dist/theme.css"
18
20
  },
19
21
  "publishConfig": {
20
22
  "access": "public"
21
23
  },
22
24
  "scripts": {
23
- "build": "tsup && node -e \"require('fs').copyFileSync('src/style.css','dist/style.css')\"",
25
+ "build": "tsup && node ../../scripts/inline-css.ts src/style.css dist/style.css && node ../../scripts/inline-css.ts src/theme.css dist/theme.css",
24
26
  "dev": "tsup --watch",
25
27
  "typecheck": "tsc --noEmit",
26
- "prepublishOnly": "pnpm build"
28
+ "prepublishOnly": "pnpm build",
29
+ "test": "vitest run"
27
30
  },
28
31
  "dependencies": {
29
32
  "clsx": "^2.1.1",
30
- "lucide-react": ">=0.400.0 <1.0.0",
33
+ "lucide-react": ">=0.400.0 <2.0.0",
31
34
  "tailwind-merge": "^3.0.0"
32
35
  },
33
36
  "devDependencies": {
37
+ "@editorcn/content": "workspace:*",
34
38
  "@hugeicons/core-free-icons": "^4.3.5",
35
39
  "@hugeicons/react": "^1.1.10",
36
40
  "@phosphor-icons/react": "^2.1.10",
37
41
  "@remixicon/react": "^4.9.0",
38
42
  "@tabler/icons-react": "^3.48.0",
39
43
  "@types/react": "^19",
44
+ "@types/react-dom": "catalog:",
45
+ "happy-dom": "^21.0.4",
46
+ "radix-ui": "^1.4.3",
40
47
  "tsup": "^8.4.0",
41
- "typescript": "^5"
48
+ "typescript": "^5",
49
+ "vitest": "^3.2.7"
42
50
  },
43
51
  "peerDependencies": {
44
52
  "@base-ui/react": "^1.0.0",
@@ -48,7 +56,7 @@
48
56
  "@tiptap/extension-placeholder": ">=3.0.0 <4",
49
57
  "@tiptap/extension-underline": ">=3.0.0 <4",
50
58
  "@tiptap/pm": ">=3.0.0 <4",
51
- "@tiptap/react": ">=3.0.0 <4",
59
+ "@tiptap/react": ">=3.0.1 <4",
52
60
  "@tiptap/starter-kit": ">=3.0.0 <4",
53
61
  "class-variance-authority": "^0.7.1",
54
62
  "react": "^18 || ^19",