@rpg-engine/long-bow 0.8.31 → 0.8.32

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.
Files changed (24) hide show
  1. package/dist/components/InformationCenter/sections/bestiary/BestiaryAdvancedFilters.d.ts +13 -0
  2. package/dist/components/InformationCenter/sections/bestiary/InformationCenterBestiarySection.d.ts +2 -2
  3. package/dist/components/InformationCenter/sections/items/ItemsAdvancedFilters.d.ts +11 -0
  4. package/dist/components/shared/AdvancedFilters/AdvancedFilters.d.ts +23 -0
  5. package/dist/components/shared/PaginatedContent/PaginatedContent.d.ts +1 -0
  6. package/dist/components/shared/SearchBar/SearchBar.d.ts +1 -0
  7. package/dist/components/shared/SearchHeader/SearchHeader.d.ts +1 -0
  8. package/dist/hooks/useTooltipPosition.d.ts +15 -0
  9. package/dist/long-bow.cjs.development.js +467 -163
  10. package/dist/long-bow.cjs.development.js.map +1 -1
  11. package/dist/long-bow.cjs.production.min.js +1 -1
  12. package/dist/long-bow.cjs.production.min.js.map +1 -1
  13. package/dist/long-bow.esm.js +468 -164
  14. package/dist/long-bow.esm.js.map +1 -1
  15. package/package.json +1 -1
  16. package/src/components/InformationCenter/sections/bestiary/BestiaryAdvancedFilters.tsx +95 -0
  17. package/src/components/InformationCenter/sections/bestiary/InformationCenterBestiarySection.tsx +103 -61
  18. package/src/components/InformationCenter/sections/items/InformationCenterItemsSection.tsx +62 -69
  19. package/src/components/InformationCenter/sections/items/ItemsAdvancedFilters.tsx +80 -0
  20. package/src/components/shared/AdvancedFilters/AdvancedFilters.tsx +279 -0
  21. package/src/components/shared/PaginatedContent/PaginatedContent.tsx +1 -0
  22. package/src/components/shared/SearchBar/SearchBar.tsx +15 -5
  23. package/src/components/shared/SearchHeader/SearchHeader.tsx +2 -0
  24. package/src/hooks/useTooltipPosition.ts +73 -0
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ interface IBestiaryAdvancedFiltersProps {
3
+ isOpen: boolean;
4
+ onToggle: () => void;
5
+ onLevelRangeChange: (range: [number | undefined, number | undefined]) => void;
6
+ onSubtypeChange: (value: string) => void;
7
+ onAttackTypeChange: (value: string) => void;
8
+ levelRange: [number | undefined, number | undefined];
9
+ selectedSubtype: string;
10
+ selectedAttackType: string;
11
+ }
12
+ export declare const BestiaryAdvancedFilters: ({ isOpen, onToggle, onLevelRangeChange, onSubtypeChange, onAttackTypeChange, levelRange, selectedSubtype, selectedAttackType, }: IBestiaryAdvancedFiltersProps) => JSX.Element;
13
+ export {};
@@ -1,5 +1,5 @@
1
+ /// <reference types="react" />
1
2
  import { IInformationCenterNPC } from '@rpg-engine/shared';
2
- import React from 'react';
3
3
  interface IBestiarySectionProps {
4
4
  bestiaryItems: IInformationCenterNPC[];
5
5
  itemsAtlasJSON: Record<string, any>;
@@ -11,5 +11,5 @@ interface IBestiarySectionProps {
11
11
  initialSearchQuery: string;
12
12
  tabId: string;
13
13
  }
14
- export declare const InformationCenterBestiarySection: React.FC<IBestiarySectionProps>;
14
+ export declare const InformationCenterBestiarySection: ({ bestiaryItems, itemsAtlasJSON, itemsAtlasIMG, iconsAtlasIMG, iconsAtlasJSON, entitiesAtlasJSON, entitiesAtlasIMG, initialSearchQuery, tabId, }: IBestiarySectionProps) => JSX.Element;
15
15
  export {};
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ interface IItemsAdvancedFiltersProps {
3
+ isOpen: boolean;
4
+ onToggle: () => void;
5
+ onTierChange: (value: string) => void;
6
+ onTypeChange: (value: string) => void;
7
+ selectedTier: string;
8
+ selectedType: string;
9
+ }
10
+ export declare const ItemsAdvancedFilters: ({ isOpen, onToggle, onTierChange, onTypeChange, selectedTier, selectedType, }: IItemsAdvancedFiltersProps) => JSX.Element;
11
+ export {};
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ export interface IFilterOption {
3
+ id: number;
4
+ value: string;
5
+ option: string;
6
+ }
7
+ export interface IFilterSection {
8
+ type: 'range' | 'dropdown';
9
+ label: string;
10
+ key: string;
11
+ options?: IFilterOption[];
12
+ value?: string | [number | undefined, number | undefined];
13
+ onChange: (value: any) => void;
14
+ }
15
+ interface IAdvancedFiltersProps {
16
+ isOpen: boolean;
17
+ onToggle: () => void;
18
+ sections: IFilterSection[];
19
+ onClearAll: () => void;
20
+ hasActiveFilters: boolean;
21
+ }
22
+ export declare const AdvancedFilters: React.FC<IAdvancedFiltersProps>;
23
+ export {};
@@ -15,6 +15,7 @@ interface IPaginatedContentProps<T> {
15
15
  value: string;
16
16
  onChange: (value: string) => void;
17
17
  placeholder?: string;
18
+ rightElement?: React.ReactNode;
18
19
  };
19
20
  dependencies?: any[];
20
21
  tabId?: string;
@@ -4,6 +4,7 @@ interface ISearchBarProps {
4
4
  onChange: (value: string) => void;
5
5
  placeholder?: string;
6
6
  className?: string;
7
+ rightElement?: React.ReactNode;
7
8
  }
8
9
  export declare const SearchBar: React.FC<ISearchBarProps>;
9
10
  export {};
@@ -5,6 +5,7 @@ interface ISearchHeaderProps {
5
5
  value: string;
6
6
  onChange: (value: string) => void;
7
7
  placeholder?: string;
8
+ rightElement?: React.ReactNode;
8
9
  };
9
10
  filterOptions?: {
10
11
  options: IOptionsProps[];
@@ -0,0 +1,15 @@
1
+ interface ITooltipPosition {
2
+ x: number;
3
+ y: number;
4
+ }
5
+ interface ITooltipState<T> {
6
+ item: T | null;
7
+ position: ITooltipPosition;
8
+ }
9
+ export declare const useTooltipPosition: <T>() => {
10
+ tooltipState: ITooltipState<T> | null;
11
+ handleMouseEnter: (item: T, event: React.MouseEvent) => void;
12
+ handleMouseLeave: () => void;
13
+ TOOLTIP_WIDTH: number;
14
+ };
15
+ export {};