@textbus/collaborate 2.0.0-alpha.56 → 2.0.0-alpha.63
Sign up to get free protection for your applications and to get access to all the features.
- package/bundles/collab/_api.js +1 -1
- package/bundles/collab/collaborate-cursor.js +1 -1
- package/bundles/collab/local-to-remote.js +1 -1
- package/bundles/collab/remote-to-local.js +1 -1
- package/bundles/collaborate.js +1 -1
- package/bundles/public-api.js +1 -1
- package/package.json +4 -4
- package/tsconfig-build.json +1 -1
- package/bundles/collab/_api.js.map +0 -1
- package/bundles/collab/collaborate-cursor.js.map +0 -1
- package/bundles/collab/local-to-remote.js.map +0 -1
- package/bundles/collab/remote-to-local.js.map +0 -1
- package/bundles/collaborate.js.map +0 -1
- package/bundles/public-api.js.map +0 -1
package/bundles/collab/_api.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
export * from './collaborate-cursor';
|
2
2
|
export * from './local-to-remote';
|
3
3
|
export * from './remote-to-local';
|
4
|
-
//# sourceMappingURL=
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb2xsYWIvX2FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHNCQUFzQixDQUFBO0FBQ3BDLGNBQWMsbUJBQW1CLENBQUE7QUFDakMsY0FBYyxtQkFBbUIsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vY29sbGFib3JhdGUtY3Vyc29yJ1xuZXhwb3J0ICogZnJvbSAnLi9sb2NhbC10by1yZW1vdGUnXG5leHBvcnQgKiBmcm9tICcuL3JlbW90ZS10by1sb2NhbCdcbiJdfQ==
|
@@ -242,4 +242,4 @@ CollaborateCursor = __decorate([
|
|
242
242
|
Selection])
|
243
243
|
], CollaborateCursor);
|
244
244
|
export { CollaborateCursor };
|
245
|
-
//# sourceMappingURL=collaborate-cursor.js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+PSAwOyBpLS0pIHtcbiAgICAgICAgICAgIGNvbnN0IHJlY3QgPSByZWN0c1tpXVxuICAgICAgICAgICAgc2VsZWN0aW9uUmVjdHMucHVzaCh7XG4gICAgICAgICAgICAgIGNvbG9yOiBpdGVtLmNvbG9yLFxuICAgICAgICAgICAgICB1c2VybmFtZTogaXRlbS51c2VybmFtZSxcbiAgICAgICAgICAgICAgeDogcmVjdC54IC0gY29udGFpbmVyUmVjdC54LFxuICAgICAgICAgICAgICB5OiByZWN0LnkgLSBjb250YWluZXJSZWN0LnksXG4gICAgICAgICAgICAgIHdpZHRoOiByZWN0LndpZHRoLFxuICAgICAgICAgICAgICBoZWlnaHQ6IHJlY3QuaGVpZ2h0LFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhpcy5vblJlY3RzQ2hhbmdlLm5leHQoc2VsZWN0aW9uUmVjdHMpXG5cbiAgICAgICAgICBjb25zdCBjdXJzb3JSYW5nZSA9IG5hdGl2ZVJhbmdlLmNsb25lUmFuZ2UoKVxuICAgICAgICAgIGN1cnNvclJhbmdlLmNvbGxhcHNlKCFpdGVtLnBhdGhzLmZvY3VzRW5kKVxuXG4gICAgICAgICAgY29uc3QgY3Vyc29yUmVjdCA9IGdldExheW91dFJlY3RCeVJhbmdlKGN1cnNvclJhbmdlKVxuXG4gICAgICAgICAgdXNlcnMucHVzaCh7XG4gICAgICAgICAgICB1c2VybmFtZTogaXRlbS51c2VybmFtZSxcbiAgICAgICAgICAgIGNvbG9yOiBpdGVtLmNvbG9yLFxuICAgICAgICAgICAgeDogY3Vyc29yUmVjdC54IC0gY29udGFpbmVyUmVjdC54LFxuICAgICAgICAgICAgeTogY3Vyc29yUmVjdC55IC0gY29udGFpbmVyUmVjdC55LFxuICAgICAgICAgICAgd2lkdGg6IDIsXG4gICAgICAgICAgICBoZWlnaHQ6IGN1cnNvclJlY3QuaGVpZ2h0XG4gICAgICAgICAgfSlcbiAgICAgICAgfVxuICAgICAgfVx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ICBsZWZ0OiAnLTJweCcsXG4gICAgICAgIHdpZHRoOiAnNnB4JyxcbiAgICAgICAgaGVpZ2h0OiAnNnB4JyxcbiAgICAgICAgcG9pbnRlckV2ZW50czogJ2F1dG8nLFxuICAgICAgICBwb2ludGVyOiAnY3Vyc29yJyxcbiAgICAgIH0sXG4gICAgICBjaGlsZHJlbjogW3VzZXJUaXBdLFxuICAgICAgb246IHtcbiAgICAgICAgbW91c2VlbnRlcigpIHtcbiAgICAgICAgICB1c2VyVGlwLnN0eWxlLmRpc3BsYXkgPSAnYmxvY2snXG4gICAgICAgIH0sXG4gICAgICAgIG1vdXNlbGVhdmUoKSB7XG4gICAgICAgICAgdXNlclRpcC5zdHlsZS5kaXNwbGF5ID0gJ25vbmUnXG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9KVxuICAgIGNoaWxkID0gY3JlYXRlRWxlbWVudCgnc3BhbicsIHtcbiAgICAgIHN0eWxlczoge1xuICAgICAgICBwb3NpdGlvbjogJ2Fic29sdXRlJyxcbiAgICAgIH0sXG4gICAgICBjaGlsZHJlbjogW1xuICAgICAgICBhbmNob3JcbiAgICAgIF1cbiAgICB9KVxuICAgIHRoaXMudG9vbHRpcHMuYXBwZW5kKGNoaWxkKVxuICAgIHJldHVybiB7XG4gICAgICBjdXJzb3I6IGNoaWxkLFxuICAgICAgYW5jaG9yLFxuICAgICAgdXNlclRpcFxuICAgIH1cbiAgfVxufVxuIl19
|
@@ -155,4 +155,4 @@ export class LocalToRemote {
|
|
155
155
|
return null;
|
156
156
|
}
|
157
157
|
}
|
158
|
-
//# sourceMappingURL=local-to-remote.js.map
|
158
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWwtdG8tcmVtb3RlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbGxhYi9sb2NhbC10by1yZW1vdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI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ICdyZXRhaW4nKSB7XG4gICAgICAgIGlmIChhY3Rpb24uZm9ybWF0cykge1xuICAgICAgICAgIGNvbnRlbnQuZm9ybWF0KGluZGV4LCBhY3Rpb24ub2Zmc2V0LCBhY3Rpb24uZm9ybWF0cylcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBpbmRleCA9IGFjdGlvbi5vZmZzZXRcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIGlmIChhY3Rpb24udHlwZSA9PT0gJ2luc2VydCcpIHtcbiAgICAgICAgY29uc3QgZGVsdGEgPSBjb250ZW50LnRvRGVsdGEoKVxuICAgICAgICBjb25zdCBpc0VtcHR5ID0gZGVsdGEubGVuZ3RoID09PSAxICYmIGRlbHRhWzBdLmluc2VydCA9PT0gJ1xcbidcblxuICAgICAgICBpZiAodHlwZW9mIGFjdGlvbi5jb250ZW50ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgIGxlbmd0aCA9IGFjdGlvbi5jb250ZW50Lmxlbmd0aFxuICAgICAgICAgIGNvbnRlbnQuaW5zZXJ0KGluZGV4LCBhY3Rpb24uY29udGVudClcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBsZW5ndGggPSAxXG4gICAgICAgICAgY29udGVudC5pbnNlcnRFbWJlZChpbmRleCwgdGhpcy5tYWtlU2hhcmVkQ29tcG9uZW50QnlDb21wb25lbnRMaXRlcmFsKGFjdGlvbi5jb250ZW50KSlcbiAgICAgICAgfVxuICAgICAgICBpZiAoYWN0aW9uLmZvcm1hdHMpIHtcbiAgICAgICAgICBjb250ZW50LmZvcm1hdChpbmRleCwgbGVuZ3RoLCBhY3Rpb24uZm9ybWF0cylcbiAgICAgICAgfVxuICAgICAgICBpZiAoaXNFbXB0eSAmJiBpbmRleCA9PT0gMCkge1xuICAgICAgICAgIGNvbnRlbnQuZGVsZXRlKGNvbnRlbnQubGVuZ3RoIC0gMSwgMSlcbiAgICAgICAgfVxuICAgICAgICBpbmRleCArPSBsZW5ndGhcbi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jb21wb25lbnRMaXRlcmFsLm5hbWUpXG4gICAgc2hhcmVkQ29tcG9uZW50LnNldCgnc2xvdHMnLCBzbG90cylcbiAgICBzaGFyZWRDb21wb25lbnQuc2V0KCdzdGF0ZScsIGNvbXBvbmVudExpdGVyYWwuc3RhdGUpXG4gICAgcmV0dXJuIHNoYXJlZENvbXBvbmVudFxuICB9XG5cbiAgcHJpdmF0ZSBnZXRTaGFyZWRDb21wb25lbnRCeUluZGV4KGhvc3Q6IFlUZXh0LCBpbmRleDogbnVtYmVyKTogWU1hcDxhbnk+IHwgbnVsbCB7XG4gICAgY29uc3QgZGVsdGEgPSBob3N0LnRvRGVsdGEoKVxuICAgIGxldCBpID0gMFxuICAgIGZvciAoY29uc3QgYWN0aW9uIG9mIGRlbHRhKSB7XG4gICAgICBpZiAoYWN0aW9uLmluc2VydCkge1xuICAgICAgICBpZiAoaSA9PT0gaW5kZXgpIHtcbiAgICAgICAgICByZXR1cm4gYWN0aW9uLmluc2VydCBpbnN0YW5jZW9mIFlNYXAgPyBhY3Rpb24uaW5zZXJ0IDogbnVsbFxuICAgICAgICB9XG4gICAgICAgIGkgKz0gYWN0aW9uLmluc2VydCBpbnN0YW5jZW9mIFlNYXAgPyAxIDogYWN0aW9uLmluc2VydC5sZW5ndGhcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IGNvbGxhYm9yYXRlRXJyb3JGbignVW5leHBlY3RlZCBkZWx0YSBhY3Rpb24uJylcbiAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIG51bGxcbiAgfVxufVxuIl19
|
@@ -192,4 +192,4 @@ export class RemoteToLocal {
|
|
192
192
|
return slot;
|
193
193
|
}
|
194
194
|
}
|
195
|
-
//# sourceMappingURL=remote-to-local.js.map
|
195
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVtb3RlLXRvLWxvY2FsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4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gICAgcHJpdmF0ZSByZWdpc3RyeTogUmVnaXN0cnkpIHtcbiAgfVxuXG4gIHRyYW5zZm9ybShldmVudHM6IFlFdmVudFtdLCByb290Q29tcG9uZW50OiBDb21wb25lbnRJbnN0YW5jZSkge1xuICAgIGV2ZW50cy5mb3JFYWNoKGV2ID0+IHtcbiAgICAgIGNvbnN0IHBhdGg6IFlQYXRoID0gW11cblxuICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBldi5wYXRoLmxlbmd0aDsgaSArPSAyKSB7XG4gICAgICAgIHBhdGgucHVzaChldi5wYXRoLnNsaWNlKGksIGkgKyAyKSBhcyBbbnVtYmVyLCBzdHJpbmddKVxuICAgICAgfVxuXG4gICAgICBjb25zdCBzbG90ID0gcm9vdENvbXBvbmVudC5zbG90cy5nZXQoMClcblxuICAgICAgaWYgKCFzbG90KSB7XG4gICAgICAgIHRocm93IGNvbGxhYm9yYXRlRXJyb3JGbignY2Fubm90IGZpbmQgY2hpbGQgc2xvdCBpbiByb290IGNvbXBvbmVudCEnKVxuICAgICAgfVxuXG4gICAgICBpZiAocGF0aC5sZW5ndGgpIHtcbiAgICAgICAgY29uc3QgY29tcG9uZW50SW5kZXggPSBwYXRoLnNoaWZ0KCkhWzBdIGFzIG51bWJlclxuICAgICAgICBjb25zdCBjb21wb25lbnQgPSBzbG90LmdldENvbnRlbnRBdEluZGV4KGNvbXBvbmVudEluZGV4KSBhcyBDb21wb25lbnRJbnN0YW5jZVxuICAgICAgICB0aGlzLmFwcGx5U2hhcmVkQ29tcG9uZW50VG9Db21wb25lbnQoZXYsIHBhdGgsIGNvbXBvbmVudClcbiAgICAgICAgcmV0dXJuXG4gICAgICB9XG5cbiAgICAgIHRoaXMuYXBwbHlTaGFyZWRTbG90VG9TbG90KGV2LCBwYXRoLCBzbG90KVxuICAgIH0pXG4gIH1cblxuICBwcml2YXRlIGFwcGx5U2hhcmVkQ29tcG9uZW50VG9Db21wb25lbnQoZXY6IFlFdmVudCwgcGF0aDogW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XMgWVRleHRcbiAgICBjb25zdCBkZWx0YSA9IGNvbnRlbnQudG9EZWx0YSgpXG5cbiAgICBjb25zdCBzbG90ID0gdGhpcy50cmFuc2xhdG9yLmNyZWF0ZVNsb3Qoe1xuICAgICAgc2NoZW1hOiBzaGFyZWRTbG90LmdldCgnc2NoZW1hJyksXG4gICAgICBzdGF0ZTogc2hhcmVkU2xvdC5nZXQoJ3N0YXRlJyksXG4gICAgICBmb3JtYXRzOiB7fSxcbiAgICAgIGNvbnRlbnQ6IFtdXG4gICAgfSlcblxuICAgIGZvciAoY29uc3QgYWN0aW9uIG9mIGRlbHRhKSB7XG4gICAgICBpZiAoYWN0aW9uLmluc2VydCkge1xuICAgICAgICBpZiAodHlwZW9mIGFjdGlvbi5pbnNlcnQgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgc2xvdC5pbnNlcnQoYWN0aW9uLmluc2VydCwgYWN0aW9uLmF0dHJpYnV0ZXMgPyBPYmplY3Qua2V5cyhhY3Rpb24uYXR0cmlidXRlcykubWFwKGtleSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gW3RoaXMucmVnaXN0cnkuZ2V0Rm9ybWF0dGVyKGtleSkhLCBhY3Rpb24uYXR0cmlidXRlcyFba2V5XV1cbiAgICAgICAgICB9KSA6IFtdKVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHNsb3QuaW5zZXJ0KHRoaXMuY3JlYXRlQ29tcG9uZW50QnlTaGFyZWRDb21wb25lbnQoYWN0aW9uLmluc2VydCkpXG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IGNvbGxhYm9yYXRlRXJyb3JGbignVW5leHBlY3RlZCBkZWx0YSBhY3Rpb24uJylcbiAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHNsb3RcbiAgfVxufVxuIl19
|
package/bundles/collaborate.js
CHANGED
@@ -239,4 +239,4 @@ Collaborate = __decorate([
|
|
239
239
|
Starter])
|
240
240
|
], Coll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9ybShldmVudHMsIHJvb3RDb21wb25lbnQpXG4gICAgICB0aGlzLnJlbmRlcmVyLnJlbmRlcigpXG4gICAgICB0aGlzLnNlbGVjdGlvbi5yZXN0b3JlKClcbiAgICAgIHRoaXMudXBkYXRlRnJvbVNlbGYgPSB0cnVlXG4gICAgfSlcbiAgICBjb25zdCBvcGVyYXRpb25zOiBPcGVyYXRpb25bXSA9IFtdXG4gICAgdGhpcy5zdWJzY3JpcHRpb25zLnB1c2goXG4gICAgICB0aGlzLnJvb3RDb21wb25lbnRSZWYuY29tcG9uZW50LmNoYW5nZU1hcmtlci5vbkNoYW5nZS5waXBlKFxuICAgICAgICBmaWx0ZXIoKCkgPT4ge1xuICAgICAgICAgIHJldHVybiB0aGlzLnVwZGF0ZUZyb21TZWxmXG4gICAgICAgIH0pLFxuICAgICAgICB0YXAob3AgPT4ge1xuICAgICAgICAgIG9wZXJhdGlvbnMucHVzaChvcClcbiAgICAgICAgfSksXG4gICAgICAgIGRlYm91bmNlVGltZSgxKVxuICAgICAgKS5zdWJzY3JpYmUoKCkgPT4ge1xuICAgICAgICB0aGlzLnlEb2MudHJhbnNhY3QoKCkgPT4ge1xuICAgICAgICAgIG9wZXJhdGlvbnMuZm9yRWFjaChvcGVyYXRpb24gPT4ge1xuICAgICAgICAgICAgdGhpcy5sb2NhbFRvUmVtb3RlLnRyYW5zZm9ybShvcGVyYXRpb24sIHJvb3QpXG4gICAgICAgICAgfSlcbiAgICAgICAgICBvcGVyYXRpb25zLmxlbmd0aCA9IDBcbiAgICAgICAgfSwgdGhpcy55RG9jKVxuICAgICAgICB0aGlzLnJlbmRlcmVyLnJlbmRlcigpXG4gICAgICAgIHRoaXMuc2VsZWN0aW9uLnJlc3RvcmUoKVxuICAgICAgfSlcbiAgICApXG4gIH1cbn1cbiJdfQ==
|
package/bundles/public-api.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
export * from './collab/_api';
|
2
2
|
export * from './collaborate';
|
3
|
-
//# sourceMappingURL=
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsZUFBZSxDQUFBO0FBQzdCLGNBQWMsZUFBZSxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9jb2xsYWIvX2FwaSdcbmV4cG9ydCAqIGZyb20gJy4vY29sbGFib3JhdGUnXG4iXX0=
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@textbus/collaborate",
|
3
|
-
"version": "2.0.0-alpha.
|
3
|
+
"version": "2.0.0-alpha.63",
|
4
4
|
"description": "Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.",
|
5
5
|
"main": "./bundles/public-api.js",
|
6
6
|
"module": "./bundles/public-api.js",
|
@@ -27,8 +27,8 @@
|
|
27
27
|
"dependencies": {
|
28
28
|
"@tanbo/di": "^1.0.7",
|
29
29
|
"@tanbo/stream": "^0.0.12",
|
30
|
-
"@textbus/browser": "^2.0.0-alpha.
|
31
|
-
"@textbus/core": "^2.0.0-alpha.
|
30
|
+
"@textbus/browser": "^2.0.0-alpha.63",
|
31
|
+
"@textbus/core": "^2.0.0-alpha.63",
|
32
32
|
"reflect-metadata": "^0.1.13",
|
33
33
|
"y-protocols": "^1.0.5",
|
34
34
|
"yjs": "^13.5.27"
|
@@ -44,5 +44,5 @@
|
|
44
44
|
"bugs": {
|
45
45
|
"url": "https://github.com/textbus/textbus.git/issues"
|
46
46
|
},
|
47
|
-
"gitHead": "
|
47
|
+
"gitHead": "1141f5982cb163cd916319ff75e99cccd52c5f46"
|
48
48
|
}
|
package/tsconfig-build.json
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_api.js","sourceRoot":"","sources":["../../src/collab/_api.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA","sourcesContent":["export * from './collaborate-cursor'\nexport * from './local-to-remote'\nexport * from './remote-to-local'\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"collaborate-cursor.js","sourceRoot":"","sources":["../../src/collab/collaborate-cursor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EAChB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,SAAS,EAAkB,MAAM,eAAe,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAwBvC,IAAa,iBAAiB,GAA9B,MAAa,iBAAiB;IA4B5B,YAA8C,SAAsB,EACrB,QAAkB,EAC7C,eAAgC,EAChC,SAAoB;;;;;mBAHM;;;;;;mBACC;;;;;;mBAC3B;;;;;;mBACA;;QA9BpB;;;;mBAAiB,aAAa,CAAC,QAAQ,EAAE;gBACvC,MAAM,EAAE;oBACN,QAAQ,EAAE,UAAU;oBACpB,OAAO,EAAE,GAAG;oBACZ,IAAI,EAAE,CAAC;oBACP,GAAG,EAAE,CAAC;oBACN,KAAK,EAAE,MAAM;oBACb,MAAM,EAAE,MAAM;oBACd,aAAa,EAAE,MAAM;iBACtB;aACF,CAAsB;WAAA;QACvB;;;;mBAAkB,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAE;WAAA;QAC/C;;;;mBAAmB,aAAa,CAAC,KAAK,EAAE;gBACtC,MAAM,EAAE;oBACN,QAAQ,EAAE,UAAU;oBACpB,IAAI,EAAE,CAAC;oBACP,GAAG,EAAE,CAAC;oBACN,K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C,gBAAgB,CAAC,CAAA;IACxB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;qCADmB,WAAW;QACX,QAAQ;QAC5B,eAAe;QACrB,SAAS;GA/B7B,iBAAiB,CA+L7B;SA/LY,iBAAiB","sourcesContent":["import { Inject, Injectable } from '@tanbo/di'\nimport {\n createElement,\n EDITABLE_DOCUMENT,\n EDITOR_CONTAINER,\n getLayoutRectByRange,\n SelectionBridge\n} from '@textbus/browser'\nimport { Selection, SelectionPaths } from '@textbus/core'\nimport { Subject } from '@tanbo/stream'\n\nexport interface RemoteSelection {\n color: string\n username: string\n paths: SelectionPaths\n}\n\nexport interface SelectionRect {\n color: string\n username: string\n x: number\n y: number\n width: number\n height: number\n}\n\nexport interface RemoteSelectionCursor {\n cursor: HTMLElement\n anchor: HTMLElement\n userTip: HTMLElement\n}\n\n@Injectable()\nexport class CollaborateCursor {\n private canvas = createElement('canvas', {\n styles: {\n position: 'absolute',\n opacity: 0.5,\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n pointerEvents: 'none'\n }\n }) as HTMLCanvasElement\n private context = this.canvas.getContext('2d')!\n private tooltips = createElement('div', {\n styles: {\n position: 'absolute',\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n fontSize: '12px',\n zIndex: 10\n }\n })\n\n private onRectsChange = new Subject<SelectionRect[]>()\n\n constructor(@Inject(EDITOR_CONTAINER) private container: HTMLElement,\n @Inject(EDITABLE_DOCUMENT) private document: Document,\n private nativeSelection: SelectionBridge,\n private selection: Selection) {\n container.prepend(this.canvas, this.tooltips)\n this.onRectsChange.subscribe(rects => {\n for (const rect of rects) {\n this.context.fillStyle = rect.color\n this.context.beginPath()\n this.context.rect(rect.x, rect.y, rect.width, rect.height)\n this.context.fill()\n this.context.closePath()\n }\n })\n }\n\n draw(paths: RemoteSelection[]) {\n const containerRect = this.container.getBoundingClientRect()\n this.canvas.width = containerRect.width\n this.canvas.height = containerRect.height\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height)\n\n const users: SelectionRect[] = []\n\n\n paths.filter(i => {\n return i.paths.start.length && i.paths.end.length\n }).forEach(item => {\n const startOffset = item.paths.start.pop()!\n const startSlot = this.selection.findSlotByPaths(item.paths.start)\n const endOffset = item.paths.end.pop()!\n const endSlot = this.selection.findSlotByPaths(item.paths.end)\n\n if (startSlot && endSlot) {\n const position = this.nativeSelection.getPositionByRange({\n startOffset,\n endOffset,\n startSlot,\n endSlot\n })\n if (position.start && position.end) {\n const nativeRange = this.document.createRange()\n nativeRange.setStart(position.start.node, position.start.offset)\n nativeRange.setEnd(position.end.node, position.end.offset)\n\n const rects = nativeRange.getClientRects()\n const selectionRects: SelectionRect[] = []\n for (let i = rects.length - 1; i >= 0; i--) {\n const rect = rects[i]\n selectionRects.push({\n color: item.color,\n username: item.username,\n x: rect.x - containerRect.x,\n y: rect.y - containerRect.y,\n width: rect.width,\n height: rect.height,\n })\n }\n this.onRectsChange.next(selectionRects)\n\n const cursorRange = nativeRange.cloneRange()\n cursorRange.collapse(!item.paths.focusEnd)\n\n const cursorRect = getLayoutRectByRange(cursorRange)\n\n users.push({\n username: item.username,\n color: item.color,\n x: cursorRect.x - containerRect.x,\n y: cursorRect.y - containerRect.y,\n width: 2,\n height: cursorRect.height\n })\n }\n }\n })\n this.drawUserCursor(users)\n }\n\n private drawUserCursor(rects: SelectionRect[]) {\n for (let i = 0; i < rects.length; i++) {\n const rect = rects[i]\n const {cursor, userTip, anchor} = this.getUserCursor(i)\n Object.assign(cursor.style, {\n left: rect.x + 'px',\n top: rect.y + 'px',\n width: rect.width + 'px',\n height: rect.height + 'px',\n background: rect.color,\n display: 'block'\n })\n anchor.style.background = rect.color\n userTip.innerText = rect.username\n userTip.style.background = rect.color\n }\n\n for (let i = rects.length; i < this.tooltips.children.length; i++) {\n this.tooltips.removeChild(this.tooltips.children[i])\n }\n }\n\n private getUserCursor(index: number): RemoteSelectionCursor {\n let child: HTMLElement = this.tooltips.children[index] as HTMLElement\n if (child) {\n const anchor = child.children[0] as HTMLElement\n return {\n cursor: child,\n anchor,\n userTip: anchor.children[0] as HTMLElement\n }\n }\n const userTip = createElement('span', {\n styles: {\n position: 'absolute',\n display: 'none',\n left: '50%',\n transform: 'translateX(-50%)',\n marginBottom: '2px',\n bottom: '100%',\n whiteSpace: 'nowrap',\n color: '#fff',\n boxShadow: '0 1px 2px rgba(0,0,0,.1)',\n borderRadius: '3px',\n padding: '3px 5px',\n pointerEvents: 'none',\n }\n })\n\n const anchor = createElement('span', {\n styles: {\n position: 'absolute',\n top: '-2px',\n left: '-2px',\n width: '6px',\n height: '6px',\n pointerEvents: 'auto',\n pointer: 'cursor',\n },\n children: [userTip],\n on: {\n mouseenter() {\n userTip.style.display = 'block'\n },\n mouseleave() {\n userTip.style.display = 'none'\n }\n }\n })\n child = createElement('span', {\n styles: {\n position: 'absolute',\n },\n children: [\n anchor\n ]\n })\n this.tooltips.append(child)\n return {\n cursor: child,\n anchor,\n userTip\n }\n }\n}\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"local-to-remote.js","sourceRoot":"","sources":["../../src/collab/local-to-remote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoD,SAAS,EAAE,MAAM,eAAe,CAAA;AAC3F,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE,MAAM,KAAK,CAAA;AAEjE,MAAM,kBAAkB,GAAG,SAAS,CAAC,aAAa,CAAC,CAAA;AAEnD,MAAM,OAAO,aAAa;IACxB,SAAS,CAAC,SAAoB,EAAE,IAAW;QACzC,MAAM,IAAI,GAAG,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,CAAA;QAChC,IAAI,CAAC,KAAK,EAAE,CAAA;QACZ,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,EAAG,CAAA;YACpC,MAAM,eAAe,GAAG,IAAI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AC9E,MAAM,KAAK,GAAG,IAAI,MAAM,EAAE,CAAA;QAC1B,gBAAgB,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACpC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACtD,CAAC,CAAC,CAAA;QACF,MAAM,eAAe,GAAG,IAAI,IAAI,EAAE,CAAA;QAClC,eAAe,CAAC,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAA;QAClD,eAAe,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;QACnC,eAAe,CAAC,GAAG,CAAC,OAAO,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAA;QACpD,OAAO,eAAe,CAAA;IACxB,CAAC;IAEO,yBAAyB,CAAC,IAAW,EAAE,KAAa;QAC1D,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE,CAAA;QAC5B,IAAI,CAAC,GAAG,CAAC,CAAA;QACT,KAAK,MAAM,MAAM,IAAI,KAAK,EAAE;YAC1B,IAAI,MAAM,CAAC,MAAM,EAAE;gBACjB,IAAI,CAAC,KAAK,KAAK,EAAE;oBACf,OAAO,MAAM,CAAC,MAAM,YAAY,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAA;iBAC5D;gBACD,CAAC,IAAI,MAAM,CAAC,MAAM,YAAY,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAA;aAC9D;iBAAM;gBACL,MAAM,kBAAkB,CAAC,0BAA0B,CAAC,CAAA;aACrD;SACF;QACD,OAAO,IAAI,CAAA;IACb,CAAC;CACF","sourcesContent":["import { Action, Operation, SlotLiteral, ComponentLiteral, makeError } from '@textbus/core'\nimport { Array as YArray, Map as YMap, Text as YText } from 'yjs'\n\nconst collaborateErrorFn = makeError('Collaborate')\n\nexport class LocalToRemote {\n transform(operation: Operation, root: YText) {\n const path = [...operation.path]\n path.shift()\n if (path.length) {\n const componentIndex = path.shift()!\n const sharedComponent = this.getSharedComponentByIndex(root, componentIndex)\n if (sharedComponent) {\n this.applyComponentOperationToSharedComponent(path, operation.apply, sharedComponent)\n }\n return\n }\n this.mergeActionsToSharedSlot(root, operation.apply)\n }\n\n private applyComponentOperationToSharedComponent(path: number[], actions: Action[], componentYMap: YMap<any>) {\n const sharedSlots = componentYMap.get('slots') as YArray<any>\n if (path.length) {\n const slotIndex = path.shift()!\n const sharedSlot = sharedSlots.get(slotIndex)\n this.applySlotOperationToSharedSlot(path, actions, sharedSlot)\n return\n }\n let index: number\n actions.forEach(action => {\n switch (action.type) {\n case 'retain':\n index = action.offset\n break\n case 'insertSlot':\n sharedSlots.insert(index, [this.makeSharedSlotBySlotLiteral(action.slot)])\n index++\n break\n case 'apply':\n componentYMap.set('state', action.value)\n break\n case 'delete':\n sharedSlots.delete(index, action.count)\n break\n }\n })\n }\n\n private applySlotOperationToSharedSlot(path: number[], actions: Action[], slotYMap: YMap<any>) {\n if (path.length) {\n const componentIndex = path.shift()!\n const sharedContent = slotYMap.get('content') as YText\n const sharedComponent = this.getSharedComponentByIndex(sharedContent, componentIndex)!\n this.applyComponentOperationToSharedComponent(path, actions, sharedComponent)\n return\n }\n const content = slotYMap.get('content') as YText\n\n this.mergeActionsToSharedSlot(content, actions, slotYMap)\n }\n\n private mergeActionsToSharedSlot(content: YText, actions: Action[], slotYMap?: YMap<any>) {\n let index: number\n let length: number\n\n actions.forEach(action => {\n if (action.type === 'retain') {\n if (action.formats) {\n content.format(index, action.offset, action.formats)\n } else {\n index = action.offset\n }\n } else if (action.type === 'insert') {\n const delta = content.toDelta()\n const isEmpty = delta.length === 1 && delta[0].insert === '\\n'\n\n if (typeof action.content === 'string') {\n length = action.content.length\n content.insert(index, action.content)\n } else {\n length = 1\n content.insertEmbed(index, this.makeSharedComponentByComponentLiteral(action.content))\n }\n if (action.formats) {\n content.format(index, length, action.formats)\n }\n if (isEmpty && index === 0) {\n content.delete(content.length - 1, 1)\n }\n index += length\n } else if (action.type === 'delete') {\n const delta = content.toDelta()\n content.delete(index, action.count)\n if (content.length === 0) {\n content.insert(0, '\\n', delta[0]?.attributes)\n }\n } else if (action.type === 'apply') {\n slotYMap?.set('state', action.value)\n }\n })\n }\n\n private makeSharedSlotBySlotLiteral(slotLiteral: SlotLiteral): YMap<any> {\n const content = new YText()\n let index = 0\n slotLiteral.content.forEach(i => {\n let size: number\n if (typeof i === 'string') {\n size = i.length\n content.insert(index, i)\n } else {\n size = 1\n content.insertEmbed(index, this.makeSharedComponentByComponentLiteral(i))\n }\n index += size\n })\n const formats = slotLiteral.formats\n Object.keys(formats).forEach(key => {\n const formatRanges = formats[key]\n formatRanges.forEach(formatRange => {\n content.format(formatRange.startIndex, formatRange.endIndex - formatRange.startIndex, {\n [key]: formatRange.value\n })\n })\n })\n\n const sharedSlot = new YMap()\n sharedSlot.set('content', content)\n sharedSlot.set('schema', slotLiteral.schema)\n sharedSlot.set('state', slotLiteral.state)\n return sharedSlot\n }\n\n private makeSharedComponentByComponentLiteral(componentLiteral: ComponentLiteral): YMap<any> {\n const slots = new YArray()\n componentLiteral.slots.forEach(item => {\n slots.push([this.makeSharedSlotBySlotLiteral(item)])\n })\n const sharedComponent = new YMap()\n sharedComponent.set('name', componentLiteral.name)\n sharedComponent.set('slots', slots)\n sharedComponent.set('state', componentLiteral.state)\n return sharedComponent\n }\n\n private getSharedComponentByIndex(host: YText, index: number): YMap<any> | null {\n const delta = host.toDelta()\n let i = 0\n for (const action of delta) {\n if (action.insert) {\n if (i === index) {\n return action.insert instanceof YMap ? action.insert : null\n }\n i += action.insert instanceof YMap ? 1 : action.insert.length\n } else {\n throw collaborateErrorFn('Unexpected delta action.')\n }\n }\n return null\n }\n}\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"remote-to-local.js","sourceRoot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AAE,CAAC,CAAA;iBACT;qBAAM;oBACL,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gCAAgC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAA;iBAClE;aACF;iBAAM;gBACL,MAAM,kBAAkB,CAAC,0BAA0B,CAAC,CAAA;aACrD;SACF;QACD,OAAO,IAAI,CAAA;IACb,CAAC;CACF","sourcesContent":["import {\n Doc as YDoc,\n Map as YMap,\n YArrayEvent,\n YEvent,\n YMapEvent,\n Text as YText,\n YTextEvent,\n Array as YArray,\n} from 'yjs'\nimport { ComponentInstance, ComponentLiteral, makeError, Registry, Selection, Slot, Translator } from '@textbus/core'\n\ntype YPath = [number, string][]\nconst collaborateErrorFn = makeError('Collaborate')\n\nexport class RemoteToLocal {\n constructor(private yDoc: YDoc,\n private translator: Translator,\n private selection: Selection,\n private registry: Registry) {\n }\n\n transform(events: YEvent[], rootComponent: ComponentInstance) {\n events.forEach(ev => {\n const path: YPath = []\n\n for (let i = 0; i < ev.path.length; i += 2) {\n path.push(ev.path.slice(i, i + 2) as [number, string])\n }\n\n const slot = rootComponent.slots.get(0)\n\n if (!slot) {\n throw collaborateErrorFn('cannot find child slot in root component!')\n }\n\n if (path.length) {\n const componentIndex = path.shift()![0] as number\n const component = slot.getContentAtIndex(componentIndex) as ComponentInstance\n this.applySharedComponentToComponent(ev, path, component)\n return\n }\n\n this.applySharedSlotToSlot(ev, path, slot)\n })\n }\n\n private applySharedComponentToComponent(ev: YEvent, path: YPath, component: ComponentInstance) {\n if (path.length) {\n const childPath = path.shift()!\n const slot = component.slots.get(childPath[0])!\n this.applySharedSlotToSlot(ev, path, slot)\n return\n }\n if (ev instanceof YMapEvent) {\n ev.keysChanged.forEach(key => {\n if (key === 'state') {\n const state = (ev.target as YMap<any>).get('state')\n component.updateState(draft => {\n Object.assign(draft, state)\n })\n }\n })\n } else if (ev instanceof YArrayEvent) {\n const slots = component.slots\n ev.delta.forEach(action => {\n if (Reflect.has(action, 'retain')) {\n slots.retain(action.retain!)\n } else if (action.insert) {\n (action.insert as Array<YMap<any>>).forEach(item => {\n slots.insert(this.createSlotBySharedSlot(item))\n })\n } else if (action.delete) {\n slots.retain(slots.index)\n slots.delete(action.delete)\n }\n })\n }\n }\n\n private applySharedSlotToSlot(ev: YEvent, path: YPath, slot: Slot) {\n if (path.length) {\n path.shift()\n const delta = (ev.target.parent as YText).toDelta()\n let componentIndex = 0\n for (let i = 0; i < delta.length; i++) {\n const action = delta[i]\n if (action.insert === ev.target) {\n break\n }\n componentIndex += typeof action.insert === 'string' ? action.insert.length : 1\n }\n const component = slot.getContentAtIndex(componentIndex) as ComponentInstance\n this.applySharedComponentToComponent(ev, path, component)\n return\n }\n if (ev instanceof YTextEvent) {\n slot.retain(0)\n let offset = 0\n ev.delta.forEach(action => {\n if (Reflect.has(action, 'retain')) {\n if (action.attributes) {\n slot.retain(action.retain!, Object.keys(action.attributes).map(key => {\n return [this.registry.getFormatter(key)!, action.attributes![key]]\n }))\n }\n slot.retain(action.retain!)\n } else if (action.insert) {\n if (typeof action.insert === 'string') {\n slot.insert(action.insert, action.attributes ? Object.keys(action.attributes).map(key => {\n return [this.registry.getFormatter(key)!, action.attributes![key]]\n }) : [])\n offset += action.insert.length\n } else {\n const component = this.createComponentBySharedComponent(action.insert as YMap<any>)\n slot.insert(component)\n offset += 1\n }\n } else if (action.delete) {\n slot.retain(slot.index)\n slot.delete(action.delete)\n offset -= action.delete\n } else if (action.attributes) {\n slot.updateState(draft => {\n Object.assign(draft, action.attributes)\n })\n }\n })\n if (this.selection.isSelected) {\n if (slot === this.selection.startSlot) {\n this.selection.setStart(slot, this.selection.startOffset! + offset)\n }\n if (slot === this.selection.endSlot) {\n this.selection.setEnd(slot, this.selection.endOffset! + offset)\n }\n }\n } else if (ev instanceof YMapEvent) {\n ev.keysChanged.forEach(key => {\n if (key === 'state') {\n const state = (ev.target as YMap<any>).get('state')\n slot.updateState(draft => {\n Object.assign(draft, state)\n })\n }\n })\n }\n }\n\n private createComponentBySharedComponent(yMap: YMap<any>): ComponentInstance {\n const slots = yMap.get('slots') as YArray<YMap<any>>\n const componentLiteral: ComponentLiteral = {\n state: yMap.get('state'),\n name: yMap.get('name'),\n slots: slots.map(sharedSlot => {\n return this.createSlotBySharedSlot(sharedSlot).toJSON()\n })\n }\n return this.translator.createComponent(componentLiteral)!\n }\n\n private createSlotBySharedSlot(sharedSlot: YMap<any>): Slot {\n const content = sharedSlot.get('content') as YText\n const delta = content.toDelta()\n\n const slot = this.translator.createSlot({\n schema: sharedSlot.get('schema'),\n state: sharedSlot.get('state'),\n formats: {},\n content: []\n })\n\n for (const action of delta) {\n if (action.insert) {\n if (typeof action.insert === 'string') {\n slot.insert(action.insert, action.attributes ? Object.keys(action.attributes).map(key => {\n return [this.registry.getFormatter(key)!, action.attributes![key]]\n }) : [])\n } else {\n slot.insert(this.createComponentBySharedComponent(action.insert))\n }\n } else {\n throw collaborateErrorFn('Unexpected delta action.')\n }\n }\n return slot\n }\n}\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"collaborate.js","sourceRoot":"","sources":["../src/collaborate.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAc,OAAO,EAAgB,GAAG,EAAE,MAAM,eAAe,CAAA;AAC5F,OAAO,EACL,gBAAgB,EAChB,OAAO,EAEP,UAAU,EACV,QAAQ,EACR,SAAS,EAEA,QAAQ,EAClB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,GAAG,IAAI,IAAI,EAAE,WAAW,EAAE,MAAM,KAAK,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAmB,MAAM,eAAe,CAAA;AAGlE,IAAa,WAAW,GAAxB,MAAa,WA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,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAA;YACtB,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAA;QAC1B,CAAC,CAAC,CACH,CAAA;IACH,CAAC;CACF,CAAA;AAxHY,WAAW;IADvB,UAAU,EAAE;qCAgC2B,gBAAgB;QACf,iBAAiB;QACxB,UAAU;QACZ,QAAQ;QACR,QAAQ;QACP,SAAS;QACX,OAAO;GArCzB,WAAW,CAwHvB;SAxHY,WAAW","sourcesContent":["import { Injectable } from '@tanbo/di'\nimport { debounceTime, filter, Observable, Subject, Subscription, tap } from '@tanbo/stream'\nimport {\n RootComponentRef,\n Starter,\n Operation,\n Translator,\n Registry,\n Selection,\n SelectionPaths,\n History, Renderer\n} from '@textbus/core'\nimport { Doc as YDoc, UndoManager } from 'yjs'\nimport { LocalToRemote } from './collab/local-to-remote'\nimport { RemoteToLocal } from './collab/remote-to-local'\nimport { CollaborateCursor, RemoteSelection } from './collab/_api'\n\n@Injectable()\nexport class Collaborate implements History {\n onSelectionChange: Observable<SelectionPaths>\n yDoc = new YDoc()\n onBack: Observable<void>\n onForward: Observable<void>\n onChange: Observable<any>\n onPush: Observable<void>\n\n get canBack() {\n return this.manager?.canUndo()\n }\n\n get canForward() {\n return this.manager?.canRedo()\n }\n\n private localToRemote = new LocalToRemote()\n private remoteToLocal = new RemoteToLocal(this.yDoc, this.translator, this.selection, this.registry)\n\n private backEvent = new Subject<void>()\n private forwardEvent = new Subject<void>()\n private changeEvent = new Subject<void>()\n private pushEvent = new Subject<void>()\n\n private manager!: UndoManager\n\n private subscriptions: Subscription[] = []\n private updateFromSelf = true\n\n private selectionChangeEvent = new Subject<SelectionPaths>()\n\n constructor(private rootComponentRef: RootComponentRef,\n private collaborateCursor: CollaborateCursor,\n private translator: Translator,\n private renderer: Renderer,\n private registry: Registry,\n private selection: Selection,\n private starter: Starter) {\n this.onSelectionChange = this.selectionChangeEvent.asObservable()\n this.onBack = this.backEvent.asObservable()\n this.onForward = this.forwardEvent.asObservable()\n this.onChange = this.changeEvent.asObservable()\n this.onPush = this.pushEvent.asObservable()\n }\n\n setup() {\n this.subscriptions.push(\n this.starter.onReady.subscribe(() => {\n this.listen2()\n }),\n this.selection.onChange.subscribe(() => {\n const paths = this.selection.getPaths()\n this.selectionChangeEvent.next(paths)\n })\n )\n }\n\n updateRemoteSelection(paths: RemoteSelection[]) {\n this.collaborateCursor.draw(paths)\n }\n\n listen() {\n //\n }\n\n back() {\n if (this.canBack) {\n this.manager.undo()\n }\n }\n\n forward() {\n if (this.canForward) {\n this.manager.redo()\n }\n }\n\n destroy() {\n this.subscriptions.forEach(i => i.unsubscribe())\n }\n\n private listen2() {\n const root = this.yDoc.getText('content')\n const rootComponent = this.rootComponentRef.component!\n this.manager = new UndoManager(root, {\n trackedOrigins: new Set<any>([this.yDoc])\n })\n root.observeDeep((events, transaction) => {\n if (transaction.origin === this.yDoc) {\n return\n }\n this.updateFromSelf = false\n\n this.remoteToLocal.transform(events, rootComponent)\n this.renderer.render()\n this.selection.restore()\n this.updateFromSelf = true\n })\n const operations: Operation[] = []\n this.subscriptions.push(\n this.rootComponentRef.component.changeMarker.onChange.pipe(\n filter(() => {\n return this.updateFromSelf\n }),\n tap(op => {\n operations.push(op)\n }),\n debounceTime(1)\n ).subscribe(() => {\n this.yDoc.transact(() => {\n operations.forEach(operation => {\n this.localToRemote.transform(operation, root)\n })\n operations.length = 0\n }, this.yDoc)\n this.renderer.render()\n this.selection.restore()\n })\n )\n }\n}\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA","sourcesContent":["export * from './collab/_api'\nexport * from './collaborate'\n"]}
|