@live-change/wysiwyg-frontend 0.2.14 → 0.2.17
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.
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
</template>
|
|
25
25
|
</EditorMenu>
|
|
26
26
|
</slot>
|
|
27
|
-
<editor-content :editor="editor" :class="[
|
|
27
|
+
<editor-content :editor="editor" :class="[className, { 'show-edit-buttons': editButtons }]" :style="style" />
|
|
28
28
|
</div>
|
|
29
29
|
</template>
|
|
30
30
|
|
|
@@ -76,6 +76,14 @@
|
|
|
76
76
|
type: Object,
|
|
77
77
|
default: () => ({ type: 'doc', content: [ ] })
|
|
78
78
|
},
|
|
79
|
+
class: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: ''
|
|
82
|
+
},
|
|
83
|
+
style: {
|
|
84
|
+
type: String,
|
|
85
|
+
default: ''
|
|
86
|
+
},
|
|
79
87
|
})
|
|
80
88
|
|
|
81
89
|
const emit = defineEmits(['update:saveState', 'update:version'])
|
|
@@ -87,7 +95,7 @@
|
|
|
87
95
|
const api = useApi(appContext)
|
|
88
96
|
const clientID = api.windowId
|
|
89
97
|
|
|
90
|
-
const { targetType, target } = props
|
|
98
|
+
const { targetType, target, class: className, style } = props
|
|
91
99
|
|
|
92
100
|
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms))
|
|
93
101
|
|
|
@@ -26,8 +26,6 @@ class RemoteAuthority{
|
|
|
26
26
|
this.sentSteps = []
|
|
27
27
|
this.sentVersion = undefined
|
|
28
28
|
|
|
29
|
-
this.handleStepsTimeout = null
|
|
30
|
-
|
|
31
29
|
this.waitingForResync = true
|
|
32
30
|
this.blockNextResync = false
|
|
33
31
|
this.pendingRequests = 0
|
|
@@ -70,17 +68,11 @@ class RemoteAuthority{
|
|
|
70
68
|
handleSteps() {
|
|
71
69
|
for(const listener of this.onNewSteps) listener()
|
|
72
70
|
if(this.receivedSteps.length > 1000) this.receivedSteps = this.receivedSteps.slice(-100)
|
|
73
|
-
this.handleStepsTimeout = null
|
|
74
71
|
this.blockNextResync = false
|
|
75
72
|
if(this.waitingForResync) {
|
|
76
73
|
this.resynchronize()
|
|
77
74
|
}
|
|
78
75
|
}
|
|
79
|
-
handleStepsThrottled() {
|
|
80
|
-
if(this.handleStepsTimeout === null) {
|
|
81
|
-
this.handleStepsTimeout = setTimeout(() => this.handleSteps(), stepsThrottle)
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
76
|
|
|
85
77
|
async startInboxReader() {
|
|
86
78
|
const inboxPrefix = JSON.stringify(JSON.stringify(this.targetType)+':'+JSON.stringify(this.target))+':'
|
|
@@ -103,7 +95,7 @@ class RemoteAuthority{
|
|
|
103
95
|
if(originalVersion != this.remoteVersion) throw new Error("message out of order!")
|
|
104
96
|
this.remoteVersion = modifiedVersion
|
|
105
97
|
this.receivedSteps.push(...message.steps.map(step => ({ step, window: message.window })))
|
|
106
|
-
this.
|
|
98
|
+
this.handleSteps()
|
|
107
99
|
},
|
|
108
100
|
inboxPrefix + JSON.stringify((this.remoteVersion - 1).toFixed().padStart(10, '0')),
|
|
109
101
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/wysiwyg-frontend",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.17",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"memDev": "lcli memDev --enableSessions --initScript ./init.js --dbAccess",
|
|
6
6
|
"localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
|
|
@@ -21,39 +21,40 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@fortawesome/fontawesome-free": "^6.2.0",
|
|
24
|
-
"@live-change/cli": "0.7.
|
|
24
|
+
"@live-change/cli": "0.7.6",
|
|
25
25
|
"@live-change/dao": "0.5.8",
|
|
26
26
|
"@live-change/dao-vue3": "0.5.8",
|
|
27
27
|
"@live-change/dao-websocket": "0.5.8",
|
|
28
|
-
"@live-change/framework": "0.7.
|
|
29
|
-
"@live-change/password-authentication-service": "0.3.
|
|
30
|
-
"@live-change/prosemirror-service": "0.3.
|
|
31
|
-
"@live-change/secret-code-service": "0.3.
|
|
32
|
-
"@live-change/secret-link-service": "0.3.
|
|
33
|
-
"@live-change/session-service": "0.3.
|
|
28
|
+
"@live-change/framework": "0.7.6",
|
|
29
|
+
"@live-change/password-authentication-service": "0.3.8",
|
|
30
|
+
"@live-change/prosemirror-service": "0.3.8",
|
|
31
|
+
"@live-change/secret-code-service": "0.3.8",
|
|
32
|
+
"@live-change/secret-link-service": "0.3.8",
|
|
33
|
+
"@live-change/session-service": "0.3.8",
|
|
34
34
|
"@live-change/vue3-components": "0.2.16",
|
|
35
35
|
"@live-change/vue3-ssr": "0.2.16",
|
|
36
|
-
"@tiptap/
|
|
37
|
-
"@tiptap/extension-
|
|
38
|
-
"@tiptap/extension-
|
|
39
|
-
"@tiptap/extension-
|
|
40
|
-
"@tiptap/extension-code
|
|
41
|
-
"@tiptap/extension-
|
|
42
|
-
"@tiptap/extension-
|
|
43
|
-
"@tiptap/extension-
|
|
44
|
-
"@tiptap/extension-
|
|
45
|
-
"@tiptap/extension-
|
|
46
|
-
"@tiptap/extension-
|
|
47
|
-
"@tiptap/extension-
|
|
48
|
-
"@tiptap/extension-
|
|
49
|
-
"@tiptap/extension-
|
|
50
|
-
"@tiptap/extension-
|
|
51
|
-
"@tiptap/extension-
|
|
52
|
-
"@tiptap/extension-
|
|
53
|
-
"@tiptap/extension-
|
|
54
|
-
"@tiptap/extension-
|
|
55
|
-
"@tiptap/extension-
|
|
56
|
-
"@tiptap/
|
|
36
|
+
"@tiptap/core": "^2.0.0-beta.205",
|
|
37
|
+
"@tiptap/extension-blockquote": "^2.0.0-beta.205",
|
|
38
|
+
"@tiptap/extension-bold": "^2.0.0-beta.205",
|
|
39
|
+
"@tiptap/extension-bullet-list": "^2.0.0-beta.205",
|
|
40
|
+
"@tiptap/extension-code": "^2.0.0-beta.205",
|
|
41
|
+
"@tiptap/extension-code-block": "^2.0.0-beta.205",
|
|
42
|
+
"@tiptap/extension-document": "^2.0.0-beta.205",
|
|
43
|
+
"@tiptap/extension-dropcursor": "^2.0.0-beta.205",
|
|
44
|
+
"@tiptap/extension-gapcursor": "^2.0.0-beta.205",
|
|
45
|
+
"@tiptap/extension-hard-break": "^2.0.0-beta.205",
|
|
46
|
+
"@tiptap/extension-heading": "^2.0.0-beta.205",
|
|
47
|
+
"@tiptap/extension-highlight": "^2.0.0-beta.205",
|
|
48
|
+
"@tiptap/extension-history": "^2.0.0-beta.205",
|
|
49
|
+
"@tiptap/extension-horizontal-rule": "^2.0.0-beta.205",
|
|
50
|
+
"@tiptap/extension-italic": "^2.0.0-beta.205",
|
|
51
|
+
"@tiptap/extension-list-item": "^2.0.0-beta.205",
|
|
52
|
+
"@tiptap/extension-ordered-list": "^2.0.0-beta.205",
|
|
53
|
+
"@tiptap/extension-paragraph": "^2.0.0-beta.205",
|
|
54
|
+
"@tiptap/extension-strike": "^2.0.0-beta.205",
|
|
55
|
+
"@tiptap/extension-text": "^2.0.0-beta.205",
|
|
56
|
+
"@tiptap/extension-underline": "2.0.0-beta.205",
|
|
57
|
+
"@tiptap/vue-3": "2.0.0-beta.205",
|
|
57
58
|
"@vueuse/core": "^9.1.0",
|
|
58
59
|
"codeceptjs-assert": "^0.0.5",
|
|
59
60
|
"compression": "^1.7.4",
|
|
@@ -64,18 +65,14 @@
|
|
|
64
65
|
"primevue": "^3.18.1",
|
|
65
66
|
"prismjs": "^1.28.0",
|
|
66
67
|
"prosemirror-collab": "^1.3.0",
|
|
67
|
-
"prosemirror-commands": "^1.
|
|
68
|
-
"prosemirror-gapcursor": "^1.1.4",
|
|
68
|
+
"prosemirror-commands": "^1.3.1",
|
|
69
69
|
"prosemirror-history": "^1.3.0",
|
|
70
|
-
"prosemirror-
|
|
71
|
-
"prosemirror-
|
|
72
|
-
"prosemirror-
|
|
73
|
-
"prosemirror-
|
|
74
|
-
"prosemirror-
|
|
75
|
-
"prosemirror-
|
|
76
|
-
"prosemirror-tables": "^1.0.4",
|
|
77
|
-
"prosemirror-transform": "^1.3.5",
|
|
78
|
-
"prosemirror-view": "^1.29.1",
|
|
70
|
+
"prosemirror-keymap": "^1.2.0",
|
|
71
|
+
"prosemirror-model": "^1.18.1",
|
|
72
|
+
"prosemirror-schema-list": "^1.2.2",
|
|
73
|
+
"prosemirror-state": "^1.4.1",
|
|
74
|
+
"prosemirror-transform": "^1.7.0",
|
|
75
|
+
"prosemirror-view": "^1.28.2",
|
|
79
76
|
"rollup-plugin-node-builtins": "^2.1.2",
|
|
80
77
|
"rollup-plugin-visualizer": "5.6.0",
|
|
81
78
|
"serve-static": "^1.15.0",
|
|
@@ -83,10 +80,10 @@
|
|
|
83
80
|
"vue-meta": "^3.0.0-alpha.9",
|
|
84
81
|
"vue-prism-editor": "2.0.0-alpha.2",
|
|
85
82
|
"vue-router": "^4.1.3",
|
|
86
|
-
"vue3-scroll-border": "0.1.
|
|
83
|
+
"vue3-scroll-border": "0.1.4"
|
|
87
84
|
},
|
|
88
85
|
"devDependencies": {
|
|
89
|
-
"@live-change/codeceptjs-helper": "0.7.
|
|
86
|
+
"@live-change/codeceptjs-helper": "0.7.6",
|
|
90
87
|
"@wdio/selenium-standalone-service": "^7.20.8",
|
|
91
88
|
"codeceptjs": "^3.3.4",
|
|
92
89
|
"generate-password": "1.7.0",
|
|
@@ -98,5 +95,5 @@
|
|
|
98
95
|
"author": "",
|
|
99
96
|
"license": "ISC",
|
|
100
97
|
"description": "",
|
|
101
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "61ea1e9554f3bf8cb8f9debffdabd8a88855c3b2"
|
|
102
99
|
}
|