From b4a09bfc5d2021fe85b850ca064c3eeead2e6f1b Mon Sep 17 00:00:00 2001 From: Luna-Klatzer Date: Wed, 6 Nov 2024 15:16:01 +0100 Subject: [PATCH] major (#226): Implemented client-side state management --- .../src/components/common/InfoBox.vue | 3 +- .../editor-settings/CollaboratorCard.vue | 5 +- .../editor-settings/CollaboratorList.vue | 7 +- solardoc/frontend/src/plugins/constants.ts | 109 +- .../editor/ot/client/awaiting-confirm.ts | 101 ++ .../editor/ot/client/awaiting-with-buffer.ts | 119 ++ .../src/scripts/editor/ot/client/ot-client.ts | 130 ++ .../src/scripts/editor/ot/client/ot-state.ts | 70 + .../src/scripts/editor/ot/client/range.ts | 84 ++ .../src/scripts/editor/ot/client/selection.ts | 102 ++ .../scripts/editor/ot/client/synchronised.ts | 77 ++ .../src/scripts/editor/ot/ot-logic-error.ts | 4 + .../src/scripts/editor/ot/single-operation.ts | 18 +- .../src/scripts/editor/ot/text-operation.ts | 361 ++--- .../src/scripts/editor/ot/transform-ot.ts | 2 +- .../phoenix/gen/phoenix-rest-service.ts | 1162 ++++++++++------- .../render/gen/backend-rest-service.ts | 248 ++-- solardoc/frontend/src/stores/current-file.ts | 45 +- 18 files changed, 1788 insertions(+), 859 deletions(-) create mode 100644 solardoc/frontend/src/scripts/editor/ot/client/awaiting-confirm.ts create mode 100644 solardoc/frontend/src/scripts/editor/ot/client/awaiting-with-buffer.ts create mode 100644 solardoc/frontend/src/scripts/editor/ot/client/ot-client.ts create mode 100644 solardoc/frontend/src/scripts/editor/ot/client/ot-state.ts create mode 100644 solardoc/frontend/src/scripts/editor/ot/client/range.ts create mode 100644 solardoc/frontend/src/scripts/editor/ot/client/selection.ts create mode 100644 solardoc/frontend/src/scripts/editor/ot/client/synchronised.ts diff --git a/solardoc/frontend/src/components/common/InfoBox.vue b/solardoc/frontend/src/components/common/InfoBox.vue index e6ba80ee..731cac01 100644 --- a/solardoc/frontend/src/components/common/InfoBox.vue +++ b/solardoc/frontend/src/components/common/InfoBox.vue @@ -5,7 +5,8 @@ defineProps<{ infoText: any }>()