refactor: extract core features and controllers from React package#124
Merged
refactor: extract core features and controllers from React package#124
Conversation
… management and event handling
…rmalizeProps utility function for improved prop handling and remove redundant code.
…er, and related components to replace prop access with state access for improved consistency in state management.
…cross components, including Store, MarkedInput, and Container. Introduce new types for improved type safety and clarity in the codebase.
…methods, enhancing consistency and clarity in state management across the codebase.
… with MarkputState, enhancing type safety and clarity in state management. Update related documentation to reflect changes in prop structure.
…andling. Consolidate destructuring in MarkedInput for clarity and update normalizeProps to return a more structured object, enhancing type safety and reducing redundancy.
…grating its functionality directly into the component. Update prop destructuring for clarity and enhance default options handling. Adjust documentation links to reflect changes in line numbers.
…nsolidating state setup into a single line. Update useCoreFeatures hook to rename isMounted to isInitialized for improved clarity in component lifecycle management.
…eateUseHook for improved clarity and maintainability. Remove unused imports and streamline state initialization. Introduce createUseHook utility for better signal management.
… clarity and usability
…gement. Introduce StateObject type for better type safety and simplify state updates in MarkedInput by using a single set method. Update documentation links and improve clarity in prop descriptions.
…enhancing usability and ensuring consistent behavior. Adjust prop destructuring for clarity.
…orrect emitter and state management behavior. Cover scenarios including emitter creation, subscription handling, and state updates with various payloads.
…event management. Update useCoreFeatures hook to utilize disableClose, ensuring proper cleanup of event listeners. Add unit test for reopening overlay after closing in Overlay.spec.tsx to verify functionality.
… files for defineEvents and defineState to include necessary vitest imports for improved test structure and functionality.
…s for value, Mark, and options. This change enhances performance and ensures consistent behavior when options are provided.
…s and properties, enhancing performance and consistency across Container, EditableSpan, TextSpan, and MarkRenderer. Update resolveSlot and resolveSlotProps functions to accept reactive state inputs, improving overall code clarity and maintainability.
… during recovery state. Update useOverlay hook to utilize useMemo for ref management, improving performance. Add new unit tests in Overlay.spec.tsx to verify token conversion and focus restoration after overlay selection.
…Index in recovery state, improving focus restoration logic. Update Recovery type to include childIndex for better state management. Add verifyCaretPosition utility for testing caret position after overlay selection in Overlay.spec.tsx.
…is NaN. Add unit test for MarkedInput to ensure no empty marks are created when pressing Enter without selection in overlay.
…r options, slots, and slotProps. Improve clarity in prop descriptions to aid user understanding.
…proved overlay management. Add new OverlayRenderer component to handle overlay rendering logic and state management.
…te related documentation and remove deprecated MarkedInputHandler interface.
…ation into Store. Update useCoreFeatures hook to utilize Lifecycle for improved state management and parsing synchronization.
…ggestions component to handle keyboard events directly. Remove deprecated useListener hook and related functionality for cleaner event management.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…te documentation for MarkedInput and MarkputHandler interfaces, including examples and corrected line references. Remove deprecated useListener documentation.
This was referenced Mar 3, 2026
Nowely
pushed a commit
that referenced
this pull request
Mar 3, 2026
🤖 I have created a release *beep* *boop* --- ## [0.2.0](root-0.1.0...root-0.2.0) (2026-03-03) ### Features * **vue:** add initial Vue support ([#125](#125)) ([c479853](c479853)) ### Bug Fixes * **storybook:** prevent caret reset in TextSpan and fix Storybook issues ([#122](#122)) ([3472085](3472085)) ### Refactoring * extract core features and controllers from React package ([#124](#124)) ([c0ad3d7](c0ad3d7)) ### Miscellaneous * add release-please config for unified versioning ([db07f5e](db07f5e)) * upgrade to React 19 ([#121](#121)) ([d9c9531](d9c9531)) ### CI * add automated release workflow and PR validation ([#120](#120)) ([85b6fc4](85b6fc4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Major refactoring to extract framework-agnostic features from React package into the core package, improving separation of concerns and reusability.
Key Changes
Core Package Enhancements
SystemListenerController,FocusController,KeyDownController,OverlayController,TextSelectionControllerdefineStateanddefineEventsutilities for reactive state managementLifecycleclass for parsing synchronization and event subscriptionvalueParserandfindTokenfrom React packageReact Package Simplification
StoreProvider,Whisper,FeatureruseKeyDown,useSystemListeners,useCloseOverlayByEsc,useCloseOverlayByOutsideClick,useFocusRecovery,useTextSelection,useValueParser,useMarkedInputHandler,useListenercreateUseHook,useCoreFeatures,OverlayRendererArchitecture Improvements
Breaking Changes
MarkedInputHandlerinterface (replaced withMarkputHandler)useListenerhook