mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
add rich_text crate
This commit is contained in:
@ -17,7 +17,10 @@ use flowy_document_infra::{
|
||||
errors::DocumentResult,
|
||||
};
|
||||
use lib_infra::retry::{ExponentialBackoff, Retry};
|
||||
use lib_ot::core::{Interval, RichTextAttribute, RichTextDelta};
|
||||
use lib_ot::{
|
||||
core::Interval,
|
||||
rich_text::{RichTextAttribute, RichTextDelta},
|
||||
};
|
||||
use lib_ws::WsConnectState;
|
||||
use std::{convert::TryFrom, sync::Arc};
|
||||
use tokio::sync::{mpsc, mpsc::UnboundedSender, oneshot};
|
||||
|
@ -6,7 +6,10 @@ use flowy_document_infra::{
|
||||
errors::DocumentError,
|
||||
};
|
||||
use futures::stream::StreamExt;
|
||||
use lib_ot::core::{Interval, OperationTransformable, RichTextAttribute, RichTextDelta};
|
||||
use lib_ot::{
|
||||
core::{Interval, OperationTransformable},
|
||||
rich_text::{RichTextAttribute, RichTextDelta},
|
||||
};
|
||||
use std::{convert::TryFrom, sync::Arc};
|
||||
use tokio::sync::{mpsc, oneshot, RwLock};
|
||||
|
||||
|
@ -8,7 +8,7 @@ use flowy_document_infra::{
|
||||
util::RevIdCounter,
|
||||
};
|
||||
use lib_infra::future::ResultFuture;
|
||||
use lib_ot::core::{OperationTransformable, RichTextDelta};
|
||||
use lib_ot::{core::OperationTransformable, rich_text::RichTextDelta};
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::mpsc;
|
||||
|
||||
|
@ -9,7 +9,10 @@ use flowy_database::{ConnectionPool, SqliteConnection};
|
||||
use flowy_document_infra::entities::doc::{revision_from_doc, Doc, RevId, RevType, Revision, RevisionRange};
|
||||
use futures::stream::StreamExt;
|
||||
use lib_infra::future::ResultFuture;
|
||||
use lib_ot::core::{Operation, OperationTransformable, RichTextDelta};
|
||||
use lib_ot::{
|
||||
core::{Operation, OperationTransformable},
|
||||
rich_text::RichTextDelta,
|
||||
};
|
||||
use std::{collections::VecDeque, sync::Arc, time::Duration};
|
||||
use tokio::{
|
||||
sync::{broadcast, mpsc, RwLock},
|
||||
|
@ -1,8 +1,9 @@
|
||||
#![cfg_attr(rustfmt, rustfmt::skip)]
|
||||
use crate::editor::{TestBuilder, TestOp::*};
|
||||
use flowy_document_infra::core::{FlowyDoc, PlainDoc};
|
||||
use lib_ot::core::{Interval, OperationTransformable, NEW_LINE, WHITESPACE, FlowyStr, RichTextDelta};
|
||||
use lib_ot::core::{Interval, OperationTransformable, NEW_LINE, WHITESPACE, FlowyStr};
|
||||
use unicode_segmentation::UnicodeSegmentation;
|
||||
use lib_ot::rich_text::RichTextDelta;
|
||||
|
||||
#[test]
|
||||
fn attributes_bold_added() {
|
||||
|
@ -6,7 +6,10 @@ mod undo_redo_test;
|
||||
|
||||
use derive_more::Display;
|
||||
use flowy_document_infra::core::{CustomDocument, Document};
|
||||
use lib_ot::core::*;
|
||||
use lib_ot::{
|
||||
core::*,
|
||||
rich_text::{RichTextAttribute, RichTextAttributes, RichTextDelta},
|
||||
};
|
||||
use rand::{prelude::*, Rng as WrappedRng};
|
||||
use std::{sync::Once, time::Duration};
|
||||
|
||||
|
@ -1,7 +1,10 @@
|
||||
#![allow(clippy::all)]
|
||||
use crate::editor::{Rng, TestBuilder, TestOp::*};
|
||||
use flowy_document_infra::core::{FlowyDoc, PlainDoc};
|
||||
use lib_ot::core::*;
|
||||
use lib_ot::{
|
||||
core::*,
|
||||
rich_text::{AttributeBuilder, RichTextAttribute, RichTextAttributes, RichTextDelta},
|
||||
};
|
||||
|
||||
#[test]
|
||||
fn attributes_insert_text() {
|
||||
|
@ -1,5 +1,8 @@
|
||||
use flowy_document_infra::core::{Document, PlainDoc};
|
||||
use lib_ot::core::*;
|
||||
use lib_ot::{
|
||||
core::*,
|
||||
rich_text::{AttributeBuilder, RichTextAttribute, RichTextAttributeValue, RichTextDelta},
|
||||
};
|
||||
|
||||
#[test]
|
||||
fn operation_insert_serialize_test() {
|
||||
|
Reference in New Issue
Block a user