Rich text / foldkit-richtext
Operation
const · packages/richtext/src/transaction.ts:126
const Operation: Schema.Union<readonly [Schema.Struct<{ readonly type: Schema.Literal<"InsertText">; readonly at: Schema.Struct<{ readonly node: Schema.brand<Schema.NonEmptyString, "foldkit-richtext/NodeId">; readonly offset: Schema.Number; readonly affinity: Schema.Literals<readonly ["before", "after"]>; }>; readonly text: Schema.String; }>, Schema.Struct<{ readonly type: Schema.Literal<"DeleteText">; readonly node: Schema.brand<Schema.NonEmptyString, "foldkit-richtext/NodeId">; readonly from: Schema.Number; readonly to: Schema.Number; }>, Schema.Struct<{ readonly type: Schema.Literal<"AddMark">; readonly node: Schema.brand<Schema.NonEmptyString, "foldkit-richtext/NodeId">; readonly mark: Schema.Union<readonly [Schema.NonEmptyString, Schema.Struct<{ readonly name: Schema.NonEmptyString; readonly props: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>; }>]>; }>, Schema.Struct<{ readonly type: Schema.Literal<"RemoveMark">; readonly node: Schema.brand<Schema.NonEmptyString, "foldkit-richtext/NodeId">; readonly mark: Schema.String; }>, Schema.Struct<{ readonly type: Schema.Literal<"SetSelection">; readonly selection: Schema.NullOr<Schema.Union<readonly [Schema.Struct<{ readonly type: Schema.Literal<"Range">; readonly anchor: Schema.Struct<{ readonly node: Schema.brand<Schema.NonEmptyString, "foldkit-richtext/NodeId">; readonly offset: Schema.Number; readonly affinity: Schema.Literals<readonly ["before", "after"]>; }>; readonly focus: Schema. …;Its type
type Operation = typeof Operation.Type