Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rtd/use-suggestions

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rtd/use-suggestions - npm Package Compare versions

Comparing version 1.0.0 to 1.0.2

9

dist/types.d.ts

@@ -19,3 +19,3 @@ /**

*/
type HexColor = string & {
export type RouteHexColor = string & {
_brand: 'HexColor';

@@ -27,3 +27,3 @@ };

export type RouteMode = 'BUS' | 'RAIL';
export type TisRouteClassId = 1 | 2 | 3 | 5 | 9 | 11 | 12 | 15 | 28 | 30 | 32 | 34;
export type TisRouteClassId = 0 | 1 | 2 | 3 | 5 | 9 | 11 | 12 | 15 | 28 | 30 | 32 | 34;
/**

@@ -62,4 +62,4 @@ * API Response Types

export interface RouteSuggestion extends Omit<BaseSuggestion, 'lat' | 'lng'> {
routeTextColor: HexColor;
routeColor: HexColor;
routeTextColor: RouteHexColor;
routeColor: RouteHexColor;
routeType: TisRouteClassId;

@@ -169,2 +169,1 @@ mode: RouteMode;

}
export {};
{
"name": "@rtd/use-suggestions",
"version": "1.0.0",
"version": "1.0.2",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

@@ -10,3 +10,3 @@ # use-suggestions

```bash
yarn add file:/path/to/use-suggestions
yarn add @rtd/use-suggestions
```

@@ -17,3 +17,3 @@

```bash
npm install /path/to/use-suggestions
npm install @rtd/use-suggestions
```

@@ -58,3 +58,3 @@

Import the `useSearchSuggestions` hook, types, and constants in your React component:
Import the `useSuggestions` hook, types, and constants in your React component:

@@ -69,3 +69,3 @@ ```typescript

SearchableSuggestion,
} from 'use-suggestions'
} from '@rtd/use-suggestions'
```

@@ -75,3 +75,3 @@

Here’s an example of how to use the `useSearchSuggestions` hook in a React component:
Here’s an example of how to use the `useSuggestions` hook in a React component:

@@ -87,3 +87,3 @@ ```typescript

const namespace = 'api/v1'
const { suggestions, isLoading, error } = useSearchSuggestions(
const { suggestions, isLoading, error } = useSuggestions(
query,

@@ -118,3 +118,3 @@ options,

#### `useSearchSuggestions`
#### `useSuggestions`

@@ -127,3 +127,3 @@ Fetches search suggestions from the API.

- `options: SuggestionsOptions` - Configuration options for the suggestions.
- `baseURL: string` - The base URL for the API (optional).
- `config: ConfigObject` - Object that contains the base URL for the API and namespace (optional).

@@ -165,3 +165,2 @@ **Returns:**

interface SearchableSuggestion {
id: string
suggestionType: SuggestionType

@@ -173,2 +172,3 @@ name: string

lng: number
searchTerms: string[]
}

@@ -175,0 +175,0 @@ ```

@@ -20,3 +20,3 @@ /**

*/
type HexColor = string & { _brand: 'HexColor' }
export type RouteHexColor = string & { _brand: 'HexColor' }

@@ -29,2 +29,3 @@ /**

export type TisRouteClassId =
| 0
| 1

@@ -91,4 +92,4 @@ | 2

// Proerties for Routes
routeTextColor: HexColor
routeColor: HexColor
routeTextColor: RouteHexColor
routeColor: RouteHexColor
routeType: TisRouteClassId

@@ -95,0 +96,0 @@ mode: RouteMode

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc