Conversation
…t management ## Summary - Refactored the context management by replacing `TokenProvider` with `TokenContext` across multiple components. - Updated imports and usage in `MarkedInput`, `MarkRenderer`, `TextSpan`, and `Token` components to utilize the new context. - Removed the deprecated `TokenProvider` and associated utility functions. ## Changes - Updated context provider usage in `MarkedInput.tsx`, `MarkRenderer.tsx`, `TextSpan.tsx`, and `Token.tsx`. - Introduced `TokenContext.ts` for the new context implementation. - Deleted `TokenProvider.ts` and `createContext.ts` as they are no longer needed.
## Summary - Replaced imports of `useStore` from the deprecated `hooks` directory to the new `providers/StoreContext` across multiple components. - Removed the old `useStore` hook implementation as it is now integrated within the `StoreContext`. ## Changes - Updated imports in `BlockContainer`, `Container`, `MarkRenderer`, `OverlayRenderer`, `TextSpan`, `Suggestions`, `useMark`, `useOverlay`, and `useSlot` components. - Deleted the `useStore.ts` file from the `hooks` directory. - Enhanced `StoreContext.ts` to include a new `useStore` implementation with error handling.
## Summary - Added new utility functions `resolveSlot` and `resolveSlotProps` to handle slot resolution in both React and Vue components. - Updated existing components to utilize the new slot utilities, improving code organization and maintainability. - Removed the old slot resolution implementation from the `utils` directory. ## Changes - Created `slots.ts` in both React and Vue libraries to encapsulate slot resolution logic. - Updated imports in `BlockContainer`, `Container`, and `TextSpan` components to use the new slot utilities. - Enhanced type definitions for better TypeScript support.
## Summary - Updated `resolveSlot` and `resolveSlotProps` functions to support generic types, improving type safety and flexibility in component implementations. - Removed the old slot resolution implementation from the `lib/slots` directory in both React and Vue packages. - Adjusted component imports and usages in `BlockContainer`, `Container`, and `TextSpan` to utilize the updated slot resolution utilities. ## Changes - Enhanced type definitions for `resolveSlot` and `resolveSlotProps` to allow for more specific return types. - Updated components to reflect the new generic type usage, ensuring better integration with TypeScript's type system.
…r components ## Summary - Updated `MarkRenderer` and `OverlayRenderer` components to utilize the new `useSlot` utility for improved slot resolution. - Removed unnecessary component references and streamlined the computed properties for better readability and maintainability. ## Changes - Refactored the `resolved` computed property in both components to leverage the `useSlot` function, enhancing type safety and reducing complexity. - Adjusted template bindings to align with the new slot resolution structure.
- Move DEFAULT_OPTIONS constant from React/Vue to @markput/core - Create createMarkFromOverlay utility for token creation from overlay matches - Remove duplicated constants.ts files from both framework packages - Update useOverlay hooks to use new core utility
- Add MarkOptions interface to core - Add resolveOptionSlot utility for slot resolution - Add filterSuggestions for overlay filtering - Add suggestionNavigation for keyboard navigation - Update React/Vue adapters to use core utilities
|
Deployment failed with the following error: Learn More: https://vercel.com/nowelys-projects?upgradeToPro=build-rate-limit |
Nowely
pushed a commit
that referenced
this pull request
Mar 7, 2026
🤖 I have created a release *beep* *boop* --- ## [0.5.0](0.4.0...0.5.0) (2026-03-07) ### Features * **core:** add ContentEditableController for DOM-based editing ([#134](#134)) ([633133b](633133b)) ### Refactoring * extract shared logic from framework adapters to core ([#145](#145)) ([795c0e8](795c0e8)) * improve Signal typing with interface augmentation for framework-specific use() return types ([#143](#143)) ([e6d4efc](e6d4efc)) ### Miscellaneous * migrate to pnpm catalog for centralized dependency management ([#140](#140)) ([b71cd55](b71cd55)) * update oxlint configuration ([#144](#144)) ([1db73ec](1db73ec)) ### Tests * add comprehensive Vue component tests with Vitest ([#142](#142)) ([231f3dc](231f3dc)) --- 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
This PR refactors the codebase to reduce duplication between React and Vue adapters by moving shared logic to the core package. Key improvements include:
DEFAULT_OPTIONS,createMarkFromOverlay,DataAttributestype, and other shared utilities from framework adapters to@markput/coreTokenProviderwithTokenContextfor better context management and updatesuseStoreto useStoreContextproviderMarkRendererandOverlayRenderercomponents with enhanced generic type support