@blocklet/editor 2.1.148 → 2.1.149

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.
@@ -61,7 +61,7 @@ function PostLinkComponent(postInfo) {
61
61
  textDecoration: 'none',
62
62
  fontWeight: 'bold',
63
63
  color: 'inherit',
64
- }, title: postInfo.title, children: postInfo.title }), !!postInfo.external && (_jsx(Box, { component: "i", className: "iconify", "data-icon": "majesticons:external-link-line", sx: { flex: '0 0 auto', width: 16, height: 16, ml: 0.5, color: 'grey.600' } }))] }));
64
+ }, title: postInfo.title ?? link, children: postInfo.title ?? link }), !!postInfo.external && (_jsx(Box, { component: "i", className: "iconify", "data-icon": "majesticons:external-link-line", sx: { flex: '0 0 auto', width: 16, height: 16, ml: 0.5, color: 'grey.600' } }))] }));
65
65
  }
66
66
  function convertPostElement(domNode) {
67
67
  if (domNode instanceof HTMLElement) {
@@ -88,7 +88,7 @@ export class PostLinkNode extends DecoratorNode {
88
88
  const element = document.createElement('a');
89
89
  element.setAttribute('href', this.__postInfo.link || '');
90
90
  element.setAttribute('data-lexical-post-link-json', JSON.stringify(this.__postInfo));
91
- const text = document.createTextNode(this.__postInfo.title);
91
+ const text = document.createTextNode(this.__postInfo.title ?? this.__postInfo.link);
92
92
  element.appendChild(text);
93
93
  return { element };
94
94
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/editor",
3
- "version": "2.1.148",
3
+ "version": "2.1.149",
4
4
  "main": "lib/index.js",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -66,7 +66,7 @@
66
66
  "ufo": "^1.5.4",
67
67
  "url-join": "^4.0.1",
68
68
  "zustand": "^4.5.5",
69
- "@blocklet/pdf": "^2.1.148"
69
+ "@blocklet/pdf": "^2.1.149"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@babel/core": "^7.25.2",