Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: migrate SelectedBlock to BlockRange #1334

Merged
merged 3 commits into from
Feb 22, 2023
Merged

Conversation

lawvs
Copy link
Member

@lawvs lawvs commented Feb 22, 2023

  • Add new type BlockRange. It is designed for consistency between the native range and the block selection.
export type BlockRange = {
  startModel: BaseBlockModel;
  endModel: BaseBlockModel;
  startOffset: number;
  endOffset: number;
  /**
   * Models between startModel and endModel, not including startModel and endModel
   */
  betweenModels: BaseBlockModel[];
  // startModel === endModel && startOffset === endOffset
  // collapsed: true;
};

@codesandbox
Copy link

codesandbox bot commented Feb 22, 2023

CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@vercel
Copy link

vercel bot commented Feb 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
blocksuite ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 22, 2023 at 5:25PM (UTC)
blocksuite-react ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 22, 2023 at 5:25PM (UTC)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

1 participant