@dxos/ui-editor 0.8.4-main.bc674ce → 0.8.4-main.ef1bc66f44
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/lib/browser/index.mjs +6 -6
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +6 -6
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/extensions/preview/preview.d.ts +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +29 -29
- package/src/extensions/preview/preview.ts +7 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/ui-editor",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.ef1bc66f44",
|
|
4
4
|
"description": "Text editor components.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -65,28 +65,28 @@
|
|
|
65
65
|
"lodash.merge": "^4.6.2",
|
|
66
66
|
"lodash.sortby": "^4.7.0",
|
|
67
67
|
"style-mod": "^4.1.0",
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/lit-ui": "0.8.4-main.
|
|
78
|
-
"@dxos/
|
|
79
|
-
"@dxos/
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/
|
|
82
|
-
"@dxos/
|
|
83
|
-
"@dxos/
|
|
68
|
+
"@dxos/app-graph": "0.8.4-main.ef1bc66f44",
|
|
69
|
+
"@dxos/async": "0.8.4-main.ef1bc66f44",
|
|
70
|
+
"@dxos/context": "0.8.4-main.ef1bc66f44",
|
|
71
|
+
"@dxos/client": "0.8.4-main.ef1bc66f44",
|
|
72
|
+
"@dxos/echo": "0.8.4-main.ef1bc66f44",
|
|
73
|
+
"@dxos/display-name": "0.8.4-main.ef1bc66f44",
|
|
74
|
+
"@dxos/debug": "0.8.4-main.ef1bc66f44",
|
|
75
|
+
"@dxos/invariant": "0.8.4-main.ef1bc66f44",
|
|
76
|
+
"@dxos/echo-db": "0.8.4-main.ef1bc66f44",
|
|
77
|
+
"@dxos/lit-ui": "0.8.4-main.ef1bc66f44",
|
|
78
|
+
"@dxos/protocols": "0.8.4-main.ef1bc66f44",
|
|
79
|
+
"@dxos/ui-theme": "0.8.4-main.ef1bc66f44",
|
|
80
|
+
"@dxos/ui": "0.8.4-main.ef1bc66f44",
|
|
81
|
+
"@dxos/log": "0.8.4-main.ef1bc66f44",
|
|
82
|
+
"@dxos/util": "0.8.4-main.ef1bc66f44",
|
|
83
|
+
"@dxos/ui-types": "0.8.4-main.ef1bc66f44"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@automerge/automerge": "3.2.3",
|
|
87
87
|
"@automerge/automerge-repo": "2.5.1",
|
|
88
88
|
"@automerge/automerge-repo-network-broadcastchannel": "2.5.1",
|
|
89
|
-
"@effect/platform": "0.
|
|
89
|
+
"@effect/platform": "0.94.4",
|
|
90
90
|
"@types/chai": "^4.2.15",
|
|
91
91
|
"@types/chai-dom": "^1.11.0",
|
|
92
92
|
"@types/lodash.defaultsdeep": "^4.6.6",
|
|
@@ -94,25 +94,25 @@
|
|
|
94
94
|
"@types/lodash.sortby": "^4.7.7",
|
|
95
95
|
"chai": "^4.4.1",
|
|
96
96
|
"chai-dom": "^1.11.0",
|
|
97
|
-
"effect": "3.19.
|
|
97
|
+
"effect": "3.19.16",
|
|
98
98
|
"happy-dom": "^13.3.1",
|
|
99
99
|
"jsdom": "^27.0.0",
|
|
100
100
|
"mocha": "^10.6.0",
|
|
101
101
|
"vite": "7.1.9",
|
|
102
102
|
"vite-plugin-top-level-await": "^1.6.0",
|
|
103
103
|
"vite-plugin-wasm": "^3.5.0",
|
|
104
|
-
"@dxos/config": "0.8.4-main.
|
|
105
|
-
"@dxos/
|
|
106
|
-
"@dxos/
|
|
107
|
-
"@dxos/random": "0.8.4-main.
|
|
108
|
-
"@dxos/schema": "0.8.4-main.
|
|
109
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
110
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
104
|
+
"@dxos/config": "0.8.4-main.ef1bc66f44",
|
|
105
|
+
"@dxos/keyboard": "0.8.4-main.ef1bc66f44",
|
|
106
|
+
"@dxos/echo": "0.8.4-main.ef1bc66f44",
|
|
107
|
+
"@dxos/random": "0.8.4-main.ef1bc66f44",
|
|
108
|
+
"@dxos/schema": "0.8.4-main.ef1bc66f44",
|
|
109
|
+
"@dxos/ui-theme": "0.8.4-main.ef1bc66f44",
|
|
110
|
+
"@dxos/storybook-utils": "0.8.4-main.ef1bc66f44"
|
|
111
111
|
},
|
|
112
112
|
"peerDependencies": {
|
|
113
|
-
"@effect/platform": "0.
|
|
114
|
-
"effect": "3.19.
|
|
115
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
113
|
+
"@effect/platform": "0.94.4",
|
|
114
|
+
"effect": "3.19.16",
|
|
115
|
+
"@dxos/ui-theme": "0.8.4-main.ef1bc66f44"
|
|
116
116
|
},
|
|
117
117
|
"publishConfig": {
|
|
118
118
|
"access": "public"
|
|
@@ -16,7 +16,7 @@ export type PreviewLinkRef = {
|
|
|
16
16
|
suggest?: boolean;
|
|
17
17
|
block?: boolean;
|
|
18
18
|
label: string;
|
|
19
|
-
|
|
19
|
+
dxn: string;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export type PreviewLinkTarget = {
|
|
@@ -119,13 +119,13 @@ export const getLinkRef = (state: EditorState, node: SyntaxNode): PreviewLinkRef
|
|
|
119
119
|
const mark = node.getChildren('LinkMark');
|
|
120
120
|
const urlNode = node.getChild('URL');
|
|
121
121
|
if (mark && urlNode) {
|
|
122
|
-
const
|
|
123
|
-
if (
|
|
122
|
+
const dxn = state.sliceDoc(urlNode.from, urlNode.to);
|
|
123
|
+
if (dxn.startsWith('dxn:')) {
|
|
124
124
|
const label = state.sliceDoc(mark[0].to, mark[1].from);
|
|
125
125
|
return {
|
|
126
126
|
block: state.sliceDoc(mark[0].from, mark[0].from + 1) === '!',
|
|
127
127
|
label,
|
|
128
|
-
|
|
128
|
+
dxn,
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
131
|
}
|
|
@@ -148,14 +148,14 @@ class PreviewInlineWidget extends WidgetType {
|
|
|
148
148
|
// }
|
|
149
149
|
|
|
150
150
|
override eq(other: this) {
|
|
151
|
-
return this._link.
|
|
151
|
+
return this._link.dxn === other._link.dxn && this._link.label === other._link.label;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
override toDOM(_view: EditorView) {
|
|
155
155
|
const root = document.createElement('dx-anchor');
|
|
156
156
|
root.classList.add('dx-tag--anchor');
|
|
157
157
|
root.textContent = this._link.label;
|
|
158
|
-
root.setAttribute('
|
|
158
|
+
root.setAttribute('dxn', this._link.dxn);
|
|
159
159
|
return root;
|
|
160
160
|
}
|
|
161
161
|
}
|
|
@@ -177,7 +177,7 @@ class PreviewBlockWidget extends WidgetType {
|
|
|
177
177
|
// }
|
|
178
178
|
|
|
179
179
|
override eq(other: this) {
|
|
180
|
-
return this._link.
|
|
180
|
+
return this._link.dxn === other._link.dxn;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
override toDOM(_view: EditorView) {
|