Skip to content

feat(core): notify selection state changes - #330

Merged
vamgan merged 1 commit into
mainfrom
feat/selection-state-change-callback
Jun 7, 2026
Merged

vamgan merged 1 commit into
mainfrom
feat/selection-state-change-callback

Conversation

@vamgan

@vamgan vamgan commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add onSelectionChange(state) to region and text capture options
  • emit the pinned packet/selection/affordance state after capture and null on clear/dismiss
  • forward latest React callback refs for active capture sessions
  • document the callback for core, React, Vue, and Svelte APIs

Verification

  • npm run test -w @askable-ui/core -- capture.test.ts selection.test.ts
  • npm run test -w @askable-ui/react -- useAskableRegionCapture.test.tsx useAskableTextSelectionCapture.test.tsx
  • npm run build -w @askable-ui/core
  • npm run build -w @askable-ui/react
  • npm run build -w @askable-ui/vue
  • npm run build -w @askable-ui/svelte
  • npm run build --workspaces --if-present
  • npm run test --workspaces --if-present

@vercel

vercel Bot commented Jun 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
askable Ready Ready Preview, Comment Jun 7, 2026 9:56pm

@pkg-pr-new

pkg-pr-new Bot commented Jun 7, 2026

Copy link
Copy Markdown

Open in StackBlitz

@askable-ui/context

npm i https://pkg.pr.new/@askable-ui/context@330

@askable-ui/core

npm i https://pkg.pr.new/@askable-ui/core@330

@askable-ui/create-app

npm i https://pkg.pr.new/@askable-ui/create-app@330

@askable-ui/mcp

npm i https://pkg.pr.new/@askable-ui/mcp@330

@askable-ui/react

npm i https://pkg.pr.new/@askable-ui/react@330

@askable-ui/react-native

npm i https://pkg.pr.new/@askable-ui/react-native@330

@askable-ui/svelte

npm i https://pkg.pr.new/@askable-ui/svelte@330

@askable-ui/vue

npm i https://pkg.pr.new/@askable-ui/vue@330

commit: c5d75ec

@vamgan
vamgan merged commit 820506f into main Jun 7, 2026
9 checks passed
@vamgan
vamgan deleted the feat/selection-state-change-callback branch June 7, 2026 21:58

This branch was successfully deployed

1 active deployment
Preview — c5d75ec1 Deployed Jun 7, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant