0.5.1
New Features
- Add MIT License and Update README: Introduce MIT License to clarify usage rights and responsibilities. Enhance
readme.md
by adding links toReact
andInk
for better context. Introduce a new section detailing the interactive component showcase, including setup instructions, features, and navigation tips to aid in development and usage. (91ba52b)
Component Enhancements
- Add Style Options to CardView: Enhance
CardView
by addingselected
androunded
style options. Update the selector to toggle these styles and adjust the card preview to reflect changes. ModifyCard
component to accept and display the new styles. Increaseascii
card height to 12 for better layout. (a764b02) - Simplify Card Artwork Generation: Update
generateDefaultBackArtwork
to use a '?' placeholder for all variants. This change reduces complexity by standardizing the artwork representation across 'ascii', 'simple', and 'minimal' variants, making the function easier to maintain and understand. (f072c7c) - Refactor Card Layout and Styles: Refactor card layout logic by introducing
CARD_DIMENSIONS
for consistent card size and layout across variants. Simplify pip and special art creation withcreatePipLayout
andcreateSpecialArt
. UpdateCard
component to use new layout functions and addselected
androunded
props for styling flexibility. (43ff961)
Storybook and Utility Updates
- Add Storybook Components and Utils: Introduce new Storybook components including
CardStackView
,CardView
,CustomCardView
,DeckView
, andMiniCardView
. These components provide interactive interfaces for card management and customization. AddEnhancedSelectInput
utility for improved user interaction. Update scripts inpackage.json
to support the new Storybook setup. (dcf0325)
CardStack and MiniCard Improvements
- Add
mini
andmicro
Variants to CardStack: EnhanceCardStack
by introducingmini
andmicro
variants, allowing for more compact card displays. Adjust margins for these new variants to ensure proper alignment. Implement conditional rendering to useMiniCard
formini
andmicro
variants, maintaining flexibility in card presentation. (656fed4) - Fix
MiniCard
Layout and Display Logic: ImproveMiniCard
component by adjusting layout and display logic. Addoverflow
property to prevent content overflow. Ensure consistent height for non-mini variants. Refine value and suit symbol rendering to handle single character values correctly and add spacing for symbols in mini variant. (3cca268)
Deck Management Enhancements
- Refactor Discard Pile Initialization: Introduce
newDiscardPile
for clearer discard pile initialization indeckReducer
. This improves readability and maintains consistency when resetting the discard pile after shuffling. By using a named variable, the code becomes more intuitive and easier to maintain, reducing potential errors. (550744c) - Enhance Deck Reset Logic: Update
deckReducer
to handle optional deck payload during 'RESET' action. Introduce shuffled discard pile as fallback when no deck is provided. AdjustDeckAction
type to include payload for 'RESET'. ModifyuseDeck
hook to dispatch 'RESET' with deck payload, ensuring flexibility in deck management. (feacb32)
Miscellaneous
- Update .gitignore for macOS Files: Add
.DS_Store
to.gitignore
to prevent macOS system files from being tracked in the repository. This helps maintain a cleaner project history and avoids unnecessary clutter in version control. The change ensures that these files are ignored across all environments, improving cross-platform collaboration. (a1aebd9) - Update Library Name in README: Rename the library from
card-game-library-ink
toink-playing-cards
in the README. Update installation instructions and import statements to reflect the new library name. This change ensures consistency and clarity for users integrating the library into their projects. (92885ea)
Full Changelog: 0.2.0...0.5.1