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: reorganize range structure #1366

Merged
merged 13 commits into from
Feb 26, 2023
Merged

refactor: reorganize range structure #1366

merged 13 commits into from
Feb 26, 2023

Conversation

lawvs
Copy link
Member

@lawvs lawvs commented Feb 25, 2023

  • Rename getCurrentRange to getCurrentNativeRange
  • Simpify BlockRange
export type BlockRange = {
  /**
   * 'Native' for native selection, 'Block' for block selection
   */
  type: 'Native' | 'Block';
  /**
   * Promise the length of models is greater than 0
   */
  models: BaseBlockModel[];
  startOffset: number;
  endOffset: number;
};

@codesandbox
Copy link

codesandbox bot commented Feb 25, 2023

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

@vercel
Copy link

vercel bot commented Feb 25, 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 25, 2023 at 9:36PM (UTC)
blocksuite-react ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 25, 2023 at 9:36PM (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