expo-tvos-search 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +111 -0
- package/README.md +212 -312
- package/build/index.d.ts +57 -5
- package/build/index.d.ts.map +1 -1
- package/ios/CachedAsyncImage.swift +78 -0
- package/ios/ExpoTvosSearchModule.swift +31 -7
- package/ios/ExpoTvosSearchView.swift +250 -421
- package/ios/HexColorParser.swift +55 -0
- package/ios/MarqueeText.swift +28 -51
- package/ios/SearchResultCard.swift +172 -0
- package/ios/SearchResultItem.swift +8 -0
- package/ios/Tests/HexColorParserTests.swift +183 -0
- package/ios/Tests/SearchViewModelTests.swift +1 -1
- package/ios/TvosSearchContentView.swift +125 -0
- package/package.json +2 -1
- package/src/__tests__/events.test.ts +128 -0
- package/src/__tests__/index.test.tsx +47 -1
- package/src/index.tsx +61 -5
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.3.2] - 2026-01-25
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Apple TV hardware keyboard support**: New `onSearchFieldFocused` and `onSearchFieldBlurred` event callbacks
|
|
12
|
+
- Enables proper Siri Remote keyboard input on physical Apple TV devices
|
|
13
|
+
- Works with `TVEventControl.disableGestureHandlersCancelTouches()` for JS-side handling
|
|
14
|
+
- Native Swift implementation automatically disables tap/press gesture recognizers when search field is focused
|
|
15
|
+
- Keeps swipe/pan recognizers enabled for keyboard navigation
|
|
16
|
+
- TypeScript type `SearchFieldFocusEvent` for the new focus events
|
|
17
|
+
- **Data URI support for images**: `imageUrl` now accepts `data:` URIs (e.g., `data:image/png;base64,...`) in addition to HTTP/HTTPS URLs
|
|
18
|
+
- Enables inline base64-encoded images without external requests
|
|
19
|
+
- Useful for cached thumbnails or placeholder images
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
- Siri Remote click events not reaching native SwiftUI search field on real Apple TV hardware
|
|
23
|
+
- React Native gesture handlers intercepting keyboard input before it reached SwiftUI `.searchable` modifier
|
|
24
|
+
|
|
25
|
+
## [1.3.1] - 2026-01-21
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
- Minor stability improvements
|
|
29
|
+
- Documentation updates
|
|
30
|
+
|
|
31
|
+
## [1.3.0] - 2026-01-20
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
- `cardMargin` prop - Customize spacing between cards in the grid (default: 40)
|
|
35
|
+
- `cardPadding` prop - Customize padding inside cards for overlay content (default: 16)
|
|
36
|
+
- `overlayTitleSize` prop - Customize font size for title in blur overlay (default: 20)
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
- Improved grid layout flexibility with customizable spacing
|
|
40
|
+
|
|
41
|
+
## [1.2.3] - 2026-01-20
|
|
42
|
+
- Patch release for npm publish workflow fix.
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
- GitHub Actions workflow step for npm publish, trigger on PR with labels: `release:patch`, `release:minor`, `release:major`
|
|
46
|
+
|
|
47
|
+
## [1.2.0] - 2026-01-17
|
|
48
|
+
|
|
49
|
+
### Added
|
|
50
|
+
- `onError` callback - Receive notifications for fatal errors (image loading failures, validation errors)
|
|
51
|
+
- `onValidationWarning` callback - Receive non-fatal warnings (truncated fields, clamped values, invalid URLs)
|
|
52
|
+
- `SearchViewErrorEvent` and `ValidationWarningEvent` TypeScript types
|
|
53
|
+
- JSDoc documentation for all TypeScript exports
|
|
54
|
+
- `SearchEvent` and `SelectItemEvent` type interfaces for improved type safety
|
|
55
|
+
- Coverage thresholds (80% global) in Jest configuration
|
|
56
|
+
- Explicit tvOS modules section in expo-module.config.json
|
|
57
|
+
- Performance and Accessibility documentation sections in README
|
|
58
|
+
- Debug logging for skipped invalid results (id or title missing/empty)
|
|
59
|
+
|
|
60
|
+
### Changed
|
|
61
|
+
- Input validation: `columns` prop now clamps between 1-10 (was: min 1 only)
|
|
62
|
+
- Input validation: `topInset` prop now clamps between 0-500 (was: min 0 only)
|
|
63
|
+
- Input validation: `marqueeDelay` prop now clamps between 0-60 seconds (was: min 0 only)
|
|
64
|
+
- Input validation: `placeholder` prop now limited to 500 characters
|
|
65
|
+
- Input validation: `results` array now limited to 500 items max
|
|
66
|
+
- MarqueeAnimationCalculator guards against division by zero
|
|
67
|
+
- MarqueeAnimationCalculator ensures non-negative values for spacing and distances
|
|
68
|
+
|
|
69
|
+
### Security
|
|
70
|
+
- URL scheme validation: `imageUrl` now only accepts HTTP/HTTPS schemes
|
|
71
|
+
- String length limits: `id`, `title`, `subtitle` clamped to 500 characters each
|
|
72
|
+
- Empty string rejection: Results with empty `id` or `title` are now skipped
|
|
73
|
+
- Added `@types/react-native` and build dependencies for TypeScript compilation
|
|
74
|
+
|
|
75
|
+
### Fixed
|
|
76
|
+
- TypeScript build now compiles successfully with `jsx: "react"` option
|
|
77
|
+
- Empty strings no longer pass validation for required fields
|
|
78
|
+
|
|
79
|
+
## [1.1.0] - 2026-01-15
|
|
80
|
+
|
|
81
|
+
### Added
|
|
82
|
+
- Marquee scrolling animation for long titles that overflow card width
|
|
83
|
+
- `enableMarquee` prop to toggle marquee behavior (default: true)
|
|
84
|
+
- `marqueeDelay` prop to control delay before scrolling starts (default: 1.5s)
|
|
85
|
+
- `showTitleOverlay` prop for gradient title overlay at bottom of cards
|
|
86
|
+
- MarqueeAnimationCalculator for testable animation logic
|
|
87
|
+
|
|
88
|
+
### Changed
|
|
89
|
+
- Title display now uses overlay by default instead of below-card text
|
|
90
|
+
- Improved focus state visual feedback
|
|
91
|
+
|
|
92
|
+
## [1.0.0] - 2026-01-10
|
|
93
|
+
|
|
94
|
+
### Added
|
|
95
|
+
- Initial release
|
|
96
|
+
- Native SwiftUI search view with `.searchable` modifier
|
|
97
|
+
- Grid layout for search results with configurable columns
|
|
98
|
+
- `TvosSearchView` React Native component
|
|
99
|
+
- `isNativeSearchAvailable()` utility function
|
|
100
|
+
- Core props:
|
|
101
|
+
- `results`, `columns`, `placeholder`, `isLoading`
|
|
102
|
+
- `cardWidth`, `cardHeight` - Customizable card dimensions
|
|
103
|
+
- `imageContentMode` - Image scaling (`fill`, `fit`, `contain`)
|
|
104
|
+
- `textColor`, `accentColor` - Color customization
|
|
105
|
+
- `showTitle`, `showSubtitle`, `showFocusBorder` - Display options
|
|
106
|
+
- `topInset` - Tab bar clearance
|
|
107
|
+
- `emptyStateText`, `searchingText`, `noResultsText`, `noResultsHintText` - Text customization
|
|
108
|
+
- `onSearch` and `onSelectItem` event callbacks
|
|
109
|
+
- Automatic fallback when native module is unavailable
|
|
110
|
+
- TypeScript type definitions (`SearchResult`, `TvosSearchViewProps`, etc.)
|
|
111
|
+
- Comprehensive test suite
|