@live-change/wysiwyg-frontend 0.2.15 → 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,16 +21,16 @@
|
|
|
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
36
|
"@tiptap/core": "^2.0.0-beta.205",
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
"vue-meta": "^3.0.0-alpha.9",
|
|
81
81
|
"vue-prism-editor": "2.0.0-alpha.2",
|
|
82
82
|
"vue-router": "^4.1.3",
|
|
83
|
-
"vue3-scroll-border": "0.1.
|
|
83
|
+
"vue3-scroll-border": "0.1.4"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"@live-change/codeceptjs-helper": "0.7.
|
|
86
|
+
"@live-change/codeceptjs-helper": "0.7.6",
|
|
87
87
|
"@wdio/selenium-standalone-service": "^7.20.8",
|
|
88
88
|
"codeceptjs": "^3.3.4",
|
|
89
89
|
"generate-password": "1.7.0",
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"author": "",
|
|
96
96
|
"license": "ISC",
|
|
97
97
|
"description": "",
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "61ea1e9554f3bf8cb8f9debffdabd8a88855c3b2"
|
|
99
99
|
}
|