@rpg-engine/long-bow 0.8.19 → 0.8.20

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.
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { IInformationCenterProps } from './InformationCenterTypes';
2
+ import { IInformationCenterItem, IInformationCenterNPC } from './InformationCenterTypes';
3
3
  export interface IFaqItem {
4
4
  id: string;
5
5
  question: string;
@@ -13,4 +13,17 @@ export interface IVideoGuide {
13
13
  videoUrl: string;
14
14
  category: 'Combat' | 'Crafting' | 'Exploration' | 'General';
15
15
  }
16
+ export interface IInformationCenterProps {
17
+ itemsAtlasJSON: Record<string, any>;
18
+ itemsAtlasIMG: string;
19
+ entitiesAtlasJSON: Record<string, any>;
20
+ entitiesAtlasIMG: string;
21
+ faqItems?: IFaqItem[];
22
+ bestiaryItems?: IInformationCenterNPC[];
23
+ videoGuides?: IVideoGuide[];
24
+ items?: IInformationCenterItem[];
25
+ loading?: boolean;
26
+ error?: string;
27
+ initialSearchQuery?: string;
28
+ }
16
29
  export declare const InformationCenter: React.FC<IInformationCenterProps>;
@@ -1,5 +1,4 @@
1
1
  import { EntityAttackType, ICharacterPermanentBuff, IEquippableItemBlueprint, INPCLoot, ItemRarities, NPCAlignment, NPCSubtype, RangeTypes } from '@rpg-engine/shared';
2
- import { IFaqItem, IVideoGuide } from './InformationCenter';
3
2
  export declare enum MovementSpeed {
4
3
  ExtraSlow = 1.5,
5
4
  Slow = 2.25,
@@ -36,7 +35,6 @@ interface INPCBlueprintSpellArea {
36
35
  spellKey: string;
37
36
  probability: number;
38
37
  power: string;
39
- texturePath: string;
40
38
  }
41
39
  export interface IInformationCenterNPC {
42
40
  id: string;
@@ -78,19 +76,4 @@ export interface IInformationCenterItem extends IEquippableItemBlueprint {
78
76
  equippedBuff?: ICharacterPermanentBuff[];
79
77
  equippedBuffDescription?: string;
80
78
  }
81
- export interface IInformationCenterProps {
82
- itemsAtlasJSON: Record<string, any>;
83
- itemsAtlasIMG: string;
84
- entitiesAtlasJSON: Record<string, any>;
85
- entitiesAtlasIMG: string;
86
- iconsAtlasJSON: any;
87
- iconsAtlasIMG: any;
88
- faqItems?: IFaqItem[];
89
- bestiaryItems?: IInformationCenterNPC[];
90
- videoGuides?: IVideoGuide[];
91
- items?: IInformationCenterItem[];
92
- loading?: boolean;
93
- error?: string;
94
- initialSearchQuery?: string;
95
- }
96
79
  export {};
@@ -6,8 +6,6 @@ interface IBestiarySectionProps {
6
6
  itemsAtlasIMG: string;
7
7
  entitiesAtlasJSON: Record<string, any>;
8
8
  entitiesAtlasIMG: string;
9
- iconsAtlasIMG: any;
10
- iconsAtlasJSON: any;
11
9
  initialSearchQuery: string;
12
10
  tabId: string;
13
11
  }
@@ -6,8 +6,6 @@ interface INPCDetailsProps {
6
6
  itemsAtlasIMG: string;
7
7
  entitiesAtlasJSON: Record<string, any>;
8
8
  entitiesAtlasIMG: string;
9
- iconAtlasIMG?: any;
10
- iconAtlasJSON?: any;
11
9
  onBack: () => void;
12
10
  }
13
11
  export declare const InformationCenterNPCDetails: React.FC<INPCDetailsProps>;
@@ -29138,7 +29138,7 @@ var SearchContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
29138
29138
  var ContentContainer = /*#__PURE__*/styled__default.div.withConfig({
29139
29139
  displayName: "CraftBook__ContentContainer",
29140
29140
  componentId: "sc-19q95ue-7"
29141
- })(["flex:1;display:flex;flex-direction:column;padding:16px;padding-right:0;padding-bottom:0;width:100%;position:relative;min-height:300px;overflow:hidden;"]);
29141
+ })(["flex:1;display:flex;flex-direction:column;padding:16px;padding-right:0;padding-bottom:0;width:100%;position:relative;min-height:250px;overflow:hidden;"]);
29142
29142
  var RadioInputScroller = /*#__PURE__*/styled__default.div.withConfig({
29143
29143
  displayName: "CraftBook__RadioInputScroller",
29144
29144
  componentId: "sc-19q95ue-8"
@@ -30968,7 +30968,7 @@ var StyledDropdown = /*#__PURE__*/styled__default(Dropdown).withConfig({
30968
30968
  var PaginatedContent = function PaginatedContent(_ref) {
30969
30969
  var items = _ref.items,
30970
30970
  _ref$itemsPerPage = _ref.itemsPerPage,
30971
- itemsPerPage = _ref$itemsPerPage === void 0 ? 8 : _ref$itemsPerPage,
30971
+ itemsPerPage = _ref$itemsPerPage === void 0 ? 5 : _ref$itemsPerPage,
30972
30972
  renderItem = _ref.renderItem,
30973
30973
  _ref$emptyMessage = _ref.emptyMessage,
30974
30974
  emptyMessage = _ref$emptyMessage === void 0 ? 'No items found' : _ref$emptyMessage,
@@ -31186,13 +31186,6 @@ var SpriteContainer$2 = /*#__PURE__*/styled__default.div.withConfig({
31186
31186
  })(["width:64px;height:64px;background:rgba(0,0,0,0.3);border-radius:4px;display:flex;justify-content:center;align-items:center;position:relative;.sprite-from-atlas-img{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(2);transform-origin:center;}"]);
31187
31187
 
31188
31188
  var ITEMS_PER_PAGE$1 = 5;
31189
- var formatItemName = function formatItemName(itemPath) {
31190
- var _itemPath$split$pop;
31191
- var cleanText = ((_itemPath$split$pop = itemPath.split('/').pop()) == null ? void 0 : _itemPath$split$pop.split('.').shift()) || '';
31192
- return cleanText.split('-').map(function (word) {
31193
- return word.charAt(0).toUpperCase() + word.slice(1);
31194
- }).join(' ');
31195
- };
31196
31189
  var InformationCenterNPCDetails = function InformationCenterNPCDetails(_ref) {
31197
31190
  var _npc$loots, _npc$skills$strength, _npc$skills$dexterity, _npc$skills$resistanc;
31198
31191
  var npc = _ref.npc,
@@ -31200,8 +31193,6 @@ var InformationCenterNPCDetails = function InformationCenterNPCDetails(_ref) {
31200
31193
  itemsAtlasIMG = _ref.itemsAtlasIMG,
31201
31194
  entitiesAtlasJSON = _ref.entitiesAtlasJSON,
31202
31195
  entitiesAtlasIMG = _ref.entitiesAtlasIMG,
31203
- iconAtlasIMG = _ref.iconAtlasIMG,
31204
- iconAtlasJSON = _ref.iconAtlasJSON,
31205
31196
  onBack = _ref.onBack;
31206
31197
  var isMobile = shared.isMobileOrTablet();
31207
31198
  var _useState = React.useState(''),
@@ -31235,7 +31226,7 @@ var InformationCenterNPCDetails = function InformationCenterNPCDetails(_ref) {
31235
31226
  }
31236
31227
  };
31237
31228
  var filteredLoots = ((_npc$loots = npc.loots) == null ? void 0 : _npc$loots.filter(function (loot) {
31238
- return formatItemName(loot.itemBlueprintKey).toLowerCase().includes(lootSearchQuery.toLowerCase());
31229
+ return formatText(loot.itemBlueprintKey).toLowerCase().includes(lootSearchQuery.toLowerCase());
31239
31230
  })) || [];
31240
31231
  var totalLootPages = Math.ceil(filteredLoots.length / ITEMS_PER_PAGE$1);
31241
31232
  var paginatedLoots = filteredLoots.slice((currentLootPage - 1) * ITEMS_PER_PAGE$1, currentLootPage * ITEMS_PER_PAGE$1);
@@ -31265,7 +31256,7 @@ var InformationCenterNPCDetails = function InformationCenterNPCDetails(_ref) {
31265
31256
  width: 24,
31266
31257
  height: 24,
31267
31258
  imgScale: 1
31268
- }), React__default.createElement(LootDetails, null, React__default.createElement(LootName, null, formatItemName(loot.itemBlueprintKey)), React__default.createElement(LootInfo, null, React__default.createElement(LootChance, null, formatRarity(loot.chance)), loot.quantityRange && React__default.createElement(LootQuantity, null, "x", loot.quantityRange[0], "-", loot.quantityRange[1]))));
31259
+ }), React__default.createElement(LootDetails, null, React__default.createElement(LootName, null, formatText(loot.itemBlueprintKey)), React__default.createElement(LootInfo, null, React__default.createElement(LootChance, null, formatRarity(loot.chance)), loot.quantityRange && React__default.createElement(LootQuantity, null, "x", loot.quantityRange[0], "-", loot.quantityRange[1]))));
31269
31260
  })), filteredLoots.length > ITEMS_PER_PAGE$1 && React__default.createElement(PaginationContainer$2, null, React__default.createElement(StyledPagination, {
31270
31261
  currentPage: currentLootPage,
31271
31262
  totalPages: totalLootPages,
@@ -31283,14 +31274,7 @@ var InformationCenterNPCDetails = function InformationCenterNPCDetails(_ref) {
31283
31274
  }, React__default.createElement(SpellsList, null, npc.areaSpells.map(function (spell, index) {
31284
31275
  return React__default.createElement(SpellItem, {
31285
31276
  key: index
31286
- }, React__default.createElement(SpellIconContainer, null, React__default.createElement(SpriteFromAtlas, {
31287
- atlasJSON: iconAtlasJSON,
31288
- atlasIMG: iconAtlasIMG,
31289
- spriteKey: spell.texturePath || spell.spellKey,
31290
- width: 24,
31291
- height: 24,
31292
- imgScale: 1
31293
- })), React__default.createElement(SpellContent, null, React__default.createElement(SpellName, null, formatText(spell.spellKey)), React__default.createElement(SpellDetails, null, "Power:", ' ', React__default.createElement(SpellValue, null, formatText(spell.power)), React__default.createElement(Separator, null, "\u2022"), "Chance: ", React__default.createElement(SpellValue, null, spell.probability, "%"))));
31277
+ }, React__default.createElement(SpellName, null, formatText(spell.spellKey)), React__default.createElement(SpellDetails, null, "Power: ", React__default.createElement(SpellValue, null, formatText(spell.power)), React__default.createElement(Separator, null, "\u2022"), "Chance: ", React__default.createElement(SpellValue, null, spell.probability, "%")));
31294
31278
  }))));
31295
31279
  };
31296
31280
  var InfoSection = /*#__PURE__*/styled__default.div.withConfig({
@@ -31333,77 +31317,69 @@ var SpellsList = /*#__PURE__*/styled__default.div.withConfig({
31333
31317
  displayName: "InformationCenterNPCDetails__SpellsList",
31334
31318
  componentId: "sc-fdu3xl-9"
31335
31319
  })(["display:flex;flex-direction:column;gap:8px;padding:12px;"]);
31336
- var SpellIconContainer = /*#__PURE__*/styled__default.div.withConfig({
31337
- displayName: "InformationCenterNPCDetails__SpellIconContainer",
31338
- componentId: "sc-fdu3xl-10"
31339
- })(["display:flex;padding-right:30px;padding-bottom:30px;"]);
31340
- var SpellContent = /*#__PURE__*/styled__default.div.withConfig({
31341
- displayName: "InformationCenterNPCDetails__SpellContent",
31342
- componentId: "sc-fdu3xl-11"
31343
- })(["display:flex;flex-direction:column;gap:4px;flex:1;"]);
31344
31320
  var SpellItem = /*#__PURE__*/styled__default.div.withConfig({
31345
31321
  displayName: "InformationCenterNPCDetails__SpellItem",
31346
- componentId: "sc-fdu3xl-12"
31347
- })(["display:flex;gap:8px;background:rgba(255,255,255,0.05);padding:8px;padding-left:10px;border-radius:4px;align-items:center;"]);
31322
+ componentId: "sc-fdu3xl-10"
31323
+ })(["display:flex;flex-direction:column;gap:4px;background:rgba(255,255,255,0.05);padding:8px;border-radius:4px;"]);
31348
31324
  var SpellName = /*#__PURE__*/styled__default.div.withConfig({
31349
31325
  displayName: "InformationCenterNPCDetails__SpellName",
31350
- componentId: "sc-fdu3xl-13"
31326
+ componentId: "sc-fdu3xl-11"
31351
31327
  })(["color:", ";font-size:0.5rem;"], uiColors.yellow);
31352
31328
  var SpellDetails = /*#__PURE__*/styled__default.div.withConfig({
31353
31329
  displayName: "InformationCenterNPCDetails__SpellDetails",
31354
- componentId: "sc-fdu3xl-14"
31330
+ componentId: "sc-fdu3xl-12"
31355
31331
  })(["display:flex;align-items:center;gap:8px;color:", ";font-size:0.45rem;opacity:0.8;"], uiColors.white);
31356
31332
  var SpellValue = /*#__PURE__*/styled__default.span.withConfig({
31357
31333
  displayName: "InformationCenterNPCDetails__SpellValue",
31358
- componentId: "sc-fdu3xl-15"
31334
+ componentId: "sc-fdu3xl-13"
31359
31335
  })(["color:", ";"], uiColors.yellow);
31360
31336
  var Separator = /*#__PURE__*/styled__default.span.withConfig({
31361
31337
  displayName: "InformationCenterNPCDetails__Separator",
31362
- componentId: "sc-fdu3xl-16"
31338
+ componentId: "sc-fdu3xl-14"
31363
31339
  })(["color:", ";opacity:0.5;"], uiColors.yellow);
31364
31340
  var LootSearchContainer = /*#__PURE__*/styled__default.div.withConfig({
31365
31341
  displayName: "InformationCenterNPCDetails__LootSearchContainer",
31366
- componentId: "sc-fdu3xl-17"
31342
+ componentId: "sc-fdu3xl-15"
31367
31343
  })(["padding:12px 12px 0;"]);
31368
31344
  var StyledSearchBar$1 = /*#__PURE__*/styled__default(SearchBar).withConfig({
31369
31345
  displayName: "InformationCenterNPCDetails__StyledSearchBar",
31370
- componentId: "sc-fdu3xl-18"
31346
+ componentId: "sc-fdu3xl-16"
31371
31347
  })(["width:100%;"]);
31372
31348
  var LootGrid = /*#__PURE__*/styled__default.div.withConfig({
31373
31349
  displayName: "InformationCenterNPCDetails__LootGrid",
31374
- componentId: "sc-fdu3xl-19"
31350
+ componentId: "sc-fdu3xl-17"
31375
31351
  })(["display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px;padding:12px;"]);
31376
31352
  var LootItem = /*#__PURE__*/styled__default.div.withConfig({
31377
31353
  displayName: "InformationCenterNPCDetails__LootItem",
31378
- componentId: "sc-fdu3xl-20"
31354
+ componentId: "sc-fdu3xl-18"
31379
31355
  })(["display:flex;align-items:center;gap:8px;background:rgba(255,255,255,0.05);padding:8px;border-radius:4px;"]);
31380
31356
  var LootDetails = /*#__PURE__*/styled__default.div.withConfig({
31381
31357
  displayName: "InformationCenterNPCDetails__LootDetails",
31382
- componentId: "sc-fdu3xl-21"
31358
+ componentId: "sc-fdu3xl-19"
31383
31359
  })(["flex:1;display:flex;flex-direction:column;gap:4px;"]);
31384
31360
  var LootName = /*#__PURE__*/styled__default.div.withConfig({
31385
31361
  displayName: "InformationCenterNPCDetails__LootName",
31386
- componentId: "sc-fdu3xl-22"
31362
+ componentId: "sc-fdu3xl-20"
31387
31363
  })(["color:", ";font-size:0.5rem;"], uiColors.white);
31388
31364
  var LootInfo = /*#__PURE__*/styled__default.div.withConfig({
31389
31365
  displayName: "InformationCenterNPCDetails__LootInfo",
31390
- componentId: "sc-fdu3xl-23"
31366
+ componentId: "sc-fdu3xl-21"
31391
31367
  })(["display:flex;align-items:center;gap:8px;"]);
31392
31368
  var LootChance = /*#__PURE__*/styled__default.span.withConfig({
31393
31369
  displayName: "InformationCenterNPCDetails__LootChance",
31394
- componentId: "sc-fdu3xl-24"
31370
+ componentId: "sc-fdu3xl-22"
31395
31371
  })(["color:", ";font-size:0.45rem;"], uiColors.yellow);
31396
31372
  var LootQuantity = /*#__PURE__*/styled__default.span.withConfig({
31397
31373
  displayName: "InformationCenterNPCDetails__LootQuantity",
31398
- componentId: "sc-fdu3xl-25"
31374
+ componentId: "sc-fdu3xl-23"
31399
31375
  })(["color:", ";font-size:0.45rem;"], uiColors.lightGray);
31400
31376
  var PaginationContainer$2 = /*#__PURE__*/styled__default.div.withConfig({
31401
31377
  displayName: "InformationCenterNPCDetails__PaginationContainer",
31402
- componentId: "sc-fdu3xl-26"
31378
+ componentId: "sc-fdu3xl-24"
31403
31379
  })(["display:flex;justify-content:center;padding:12px;"]);
31404
31380
  var StyledPagination = /*#__PURE__*/styled__default(Pagination).withConfig({
31405
31381
  displayName: "InformationCenterNPCDetails__StyledPagination",
31406
- componentId: "sc-fdu3xl-27"
31382
+ componentId: "sc-fdu3xl-25"
31407
31383
  })(["font-size:0.6rem;"]);
31408
31384
 
31409
31385
  var TooltipContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
@@ -31533,8 +31509,6 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
31533
31509
  var bestiaryItems = _ref.bestiaryItems,
31534
31510
  itemsAtlasJSON = _ref.itemsAtlasJSON,
31535
31511
  itemsAtlasIMG = _ref.itemsAtlasIMG,
31536
- iconsAtlasIMG = _ref.iconsAtlasIMG,
31537
- iconsAtlasJSON = _ref.iconsAtlasJSON,
31538
31512
  entitiesAtlasJSON = _ref.entitiesAtlasJSON,
31539
31513
  entitiesAtlasIMG = _ref.entitiesAtlasIMG,
31540
31514
  initialSearchQuery = _ref.initialSearchQuery,
@@ -31646,8 +31620,6 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
31646
31620
  npc: selectedMonster,
31647
31621
  itemsAtlasJSON: itemsAtlasJSON,
31648
31622
  itemsAtlasIMG: itemsAtlasIMG,
31649
- iconAtlasIMG: iconsAtlasIMG,
31650
- iconAtlasJSON: iconsAtlasJSON,
31651
31623
  entitiesAtlasJSON: entitiesAtlasJSON,
31652
31624
  entitiesAtlasIMG: entitiesAtlasIMG,
31653
31625
  onBack: function onBack() {
@@ -32127,8 +32099,6 @@ var InformationCenter = function InformationCenter(_ref) {
32127
32099
  itemsAtlasIMG = _ref.itemsAtlasIMG,
32128
32100
  entitiesAtlasJSON = _ref.entitiesAtlasJSON,
32129
32101
  entitiesAtlasIMG = _ref.entitiesAtlasIMG,
32130
- iconsAtlasIMG = _ref.iconsAtlasIMG,
32131
- iconsAtlasJSON = _ref.iconsAtlasJSON,
32132
32102
  _ref$faqItems = _ref.faqItems,
32133
32103
  faqItems = _ref$faqItems === void 0 ? [] : _ref$faqItems,
32134
32104
  _ref$bestiaryItems = _ref.bestiaryItems,
@@ -32161,8 +32131,6 @@ var InformationCenter = function InformationCenter(_ref) {
32161
32131
  bestiaryItems: bestiaryItems,
32162
32132
  itemsAtlasJSON: itemsAtlasJSON,
32163
32133
  itemsAtlasIMG: itemsAtlasIMG,
32164
- iconsAtlasIMG: iconsAtlasIMG,
32165
- iconsAtlasJSON: iconsAtlasJSON,
32166
32134
  entitiesAtlasJSON: entitiesAtlasJSON,
32167
32135
  entitiesAtlasIMG: entitiesAtlasIMG,
32168
32136
  initialSearchQuery: initialSearchQuery,