@rpg-engine/long-bow 0.7.96 → 0.7.98

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 (55) hide show
  1. package/dist/components/DPad/JoystickDPad.d.ts +21 -0
  2. package/dist/components/InformationCenter/InformationCenter.d.ts +29 -0
  3. package/dist/components/InformationCenter/InformationCenterCell.d.ts +14 -0
  4. package/dist/components/InformationCenter/InformationCenterTabView.d.ts +19 -0
  5. package/dist/components/InformationCenter/InformationCenterTypes.d.ts +79 -0
  6. package/dist/components/InformationCenter/sections/bestiary/BestiarySection.d.ts +12 -0
  7. package/dist/components/InformationCenter/sections/bestiary/InformationCenterNPCDetails.d.ts +12 -0
  8. package/dist/components/InformationCenter/sections/bestiary/InformationCenterNPCTooltip.d.ts +9 -0
  9. package/dist/components/InformationCenter/sections/faq/FaqSection.d.ts +8 -0
  10. package/dist/components/InformationCenter/sections/items/InformationCenterItemDetails.d.ts +11 -0
  11. package/dist/components/InformationCenter/sections/items/InformationCenterItemTooltip.d.ts +7 -0
  12. package/dist/components/InformationCenter/sections/items/ItemsSection.d.ts +11 -0
  13. package/dist/components/InformationCenter/sections/tutorials/TutorialsSection.d.ts +8 -0
  14. package/dist/components/InformationCenter/shared/BaseInformationDetails.d.ts +10 -0
  15. package/dist/components/shared/BaseTooltip.d.ts +12 -0
  16. package/dist/components/shared/Collapsible/Collapsible.d.ts +9 -0
  17. package/dist/components/shared/Portal/Portal.d.ts +6 -0
  18. package/dist/index.d.ts +1 -0
  19. package/dist/long-bow.cjs.development.js +250 -12
  20. package/dist/long-bow.cjs.development.js.map +1 -1
  21. package/dist/long-bow.cjs.production.min.js +1 -1
  22. package/dist/long-bow.cjs.production.min.js.map +1 -1
  23. package/dist/long-bow.esm.js +251 -14
  24. package/dist/long-bow.esm.js.map +1 -1
  25. package/dist/mocks/informationCenter.mocks.d.ts +6 -0
  26. package/dist/stories/Features/craftbook/CraftBook.stories.d.ts +2 -0
  27. package/dist/stories/UI/info/InformationCenter.stories.d.ts +7 -0
  28. package/dist/stories/UI/joystick/JoystickDPad.stories.d.ts +6 -0
  29. package/package.json +1 -1
  30. package/src/components/CraftBook/CraftBook.tsx +70 -31
  31. package/src/components/CraftBook/CraftingRecipe.tsx +2 -1
  32. package/src/components/CraftBook/CraftingTooltip.tsx +4 -3
  33. package/src/components/DPad/JoystickDPad.tsx +318 -0
  34. package/src/components/InformationCenter/InformationCenter.tsx +155 -0
  35. package/src/components/InformationCenter/InformationCenterCell.tsx +96 -0
  36. package/src/components/InformationCenter/InformationCenterTabView.tsx +121 -0
  37. package/src/components/InformationCenter/InformationCenterTypes.ts +87 -0
  38. package/src/components/InformationCenter/sections/bestiary/BestiarySection.tsx +170 -0
  39. package/src/components/InformationCenter/sections/bestiary/InformationCenterNPCDetails.tsx +366 -0
  40. package/src/components/InformationCenter/sections/bestiary/InformationCenterNPCTooltip.tsx +204 -0
  41. package/src/components/InformationCenter/sections/faq/FaqSection.tsx +71 -0
  42. package/src/components/InformationCenter/sections/items/InformationCenterItemDetails.tsx +323 -0
  43. package/src/components/InformationCenter/sections/items/InformationCenterItemTooltip.tsx +88 -0
  44. package/src/components/InformationCenter/sections/items/ItemsSection.tsx +180 -0
  45. package/src/components/InformationCenter/sections/tutorials/TutorialsSection.tsx +144 -0
  46. package/src/components/InformationCenter/shared/BaseInformationDetails.tsx +162 -0
  47. package/src/components/InternalTabs/InternalTabs.tsx +1 -3
  48. package/src/components/shared/BaseTooltip.tsx +60 -0
  49. package/src/components/shared/Collapsible/Collapsible.tsx +70 -0
  50. package/src/components/shared/Portal/Portal.tsx +19 -0
  51. package/src/index.tsx +1 -0
  52. package/src/mocks/informationCenter.mocks.ts +562 -0
  53. package/src/stories/Features/craftbook/CraftBook.stories.tsx +15 -1
  54. package/src/stories/UI/info/InformationCenter.stories.tsx +58 -0
  55. package/src/stories/UI/joystick/JoystickDPad.stories.tsx +52 -0
@@ -0,0 +1,562 @@
1
+ import {
2
+ BasicAttribute,
3
+ CharacterBuffDurationType,
4
+ CharacterBuffType,
5
+ EntityAttackType,
6
+ ItemRarities,
7
+ ItemSlotType,
8
+ ItemSubType,
9
+ ItemType,
10
+ NPCAlignment,
11
+ NPCSubtype,
12
+ RangeTypes,
13
+ } from '@rpg-engine/shared';
14
+ import {
15
+ IFaqItem,
16
+ IVideoGuide,
17
+ } from '../components/InformationCenter/InformationCenter';
18
+ import {
19
+ EntityEffectBlueprint,
20
+ IInformationCenterItem,
21
+ IInformationCenterNPC,
22
+ LootProbability,
23
+ MovementSpeed,
24
+ } from '../components/InformationCenter/InformationCenterTypes';
25
+
26
+ export const mockBestiaryItems: IInformationCenterNPC[] = [
27
+ {
28
+ id: '1',
29
+ name: 'Yellow Dragon',
30
+ key: 'yellow-dragon-02/down/standing/0.png',
31
+ subType: NPCSubtype.Dragon,
32
+ alignment: NPCAlignment.Hostile,
33
+ attackType: EntityAttackType.Melee,
34
+ maxRangeAttack: RangeTypes.High,
35
+ speed: MovementSpeed.Standard,
36
+ baseHealth: 5000,
37
+ skills: {
38
+ level: 300,
39
+ strength: { level: 280 },
40
+ dexterity: { level: 260 },
41
+ resistance: { level: 290 },
42
+ },
43
+ fleeOnLowHealth: false,
44
+ entityEffects: [EntityEffectBlueprint.Burning],
45
+ areaSpells: [
46
+ {
47
+ spellKey: 'ThunderStorm',
48
+ probability: 35,
49
+ power: 'UltraHigh',
50
+ },
51
+ {
52
+ spellKey: 'LightningBreath',
53
+ probability: 45,
54
+ power: 'High',
55
+ },
56
+ ],
57
+ loots: [
58
+ {
59
+ itemBlueprintKey: 'DragonScale',
60
+ chance: LootProbability.Uncommon,
61
+ },
62
+ {
63
+ itemBlueprintKey: 'ThunderStaff',
64
+ chance: LootProbability.Rare,
65
+ },
66
+ {
67
+ itemBlueprintKey: 'DragonEssence',
68
+ chance: LootProbability.Uncommon,
69
+ quantityRange: [1, 3],
70
+ },
71
+ ],
72
+ },
73
+ {
74
+ id: '2',
75
+ name: 'Orc Warrior',
76
+ key: 'orc-warrior/down/standing/0.png',
77
+ subType: NPCSubtype.Humanoid,
78
+ alignment: NPCAlignment.Hostile,
79
+ attackType: EntityAttackType.Melee,
80
+ maxRangeAttack: RangeTypes.High,
81
+ speed: MovementSpeed.Standard,
82
+ baseHealth: 800,
83
+ skills: {
84
+ level: 85,
85
+ strength: { level: 95 },
86
+ dexterity: { level: 75 },
87
+ resistance: { level: 80 },
88
+ },
89
+ fleeOnLowHealth: false,
90
+ entityEffects: [EntityEffectBlueprint.Bleeding, EntityEffectBlueprint.Rage],
91
+ areaSpells: [
92
+ {
93
+ spellKey: 'WarCry',
94
+ probability: 25,
95
+ power: 'Medium',
96
+ },
97
+ ],
98
+ loots: [
99
+ {
100
+ itemBlueprintKey: 'OrcishAxe',
101
+ chance: LootProbability.Uncommon,
102
+ },
103
+ {
104
+ itemBlueprintKey: 'HealingHerb',
105
+ chance: LootProbability.Common,
106
+ quantityRange: [1, 4],
107
+ },
108
+ ],
109
+ },
110
+ {
111
+ id: '3',
112
+ name: 'Ancient Skeleton',
113
+ key: 'skeleton/down/standing/0.png',
114
+ subType: NPCSubtype.Undead,
115
+ alignment: NPCAlignment.Hostile,
116
+ attackType: EntityAttackType.Melee,
117
+ maxRangeAttack: RangeTypes.High,
118
+ speed: MovementSpeed.Standard,
119
+ baseHealth: 400,
120
+ skills: {
121
+ level: 45,
122
+ strength: { level: 50 },
123
+ dexterity: { level: 60 },
124
+ resistance: { level: 40 },
125
+ },
126
+ fleeOnLowHealth: false,
127
+ entityEffects: [
128
+ EntityEffectBlueprint.Curse,
129
+ EntityEffectBlueprint.Weakness,
130
+ ],
131
+ areaSpells: [
132
+ {
133
+ spellKey: 'BoneShards',
134
+ probability: 20,
135
+ power: 'Medium',
136
+ },
137
+ ],
138
+ loots: [
139
+ {
140
+ itemBlueprintKey: 'RustySword',
141
+ chance: LootProbability.Common,
142
+ },
143
+ {
144
+ itemBlueprintKey: 'BoneDust',
145
+ chance: LootProbability.Uncommon,
146
+ quantityRange: [1, 3],
147
+ },
148
+ ],
149
+ },
150
+ {
151
+ id: '4',
152
+ name: 'Dire Wolf',
153
+ key: 'wolf/down/standing/0.png',
154
+ subType: NPCSubtype.Animal,
155
+ alignment: NPCAlignment.Hostile,
156
+ attackType: EntityAttackType.Melee,
157
+ maxRangeAttack: RangeTypes.High,
158
+ speed: MovementSpeed.Fast,
159
+ baseHealth: 350,
160
+ skills: {
161
+ level: 40,
162
+ strength: { level: 45 },
163
+ dexterity: { level: 65 },
164
+ resistance: { level: 35 },
165
+ },
166
+ fleeOnLowHealth: true,
167
+ entityEffects: [
168
+ EntityEffectBlueprint.Bleeding,
169
+ EntityEffectBlueprint.Cripple,
170
+ ],
171
+ areaSpells: [],
172
+ loots: [
173
+ {
174
+ itemBlueprintKey: 'WolfFang',
175
+ chance: LootProbability.Common,
176
+ quantityRange: [1, 2],
177
+ },
178
+ {
179
+ itemBlueprintKey: 'WolfPelt',
180
+ chance: LootProbability.Uncommon,
181
+ },
182
+ ],
183
+ },
184
+ {
185
+ id: '5',
186
+ name: 'Minotaur',
187
+ key: 'minotaur/down/standing/0.png',
188
+ subType: NPCSubtype.Animal,
189
+ alignment: NPCAlignment.Hostile,
190
+ attackType: EntityAttackType.Melee,
191
+ maxRangeAttack: RangeTypes.High,
192
+ speed: MovementSpeed.Fast,
193
+ baseHealth: 420,
194
+ skills: {
195
+ level: 50,
196
+ strength: { level: 55 },
197
+ dexterity: { level: 70 },
198
+ resistance: { level: 60 },
199
+ },
200
+ fleeOnLowHealth: true,
201
+ entityEffects: [
202
+ EntityEffectBlueprint.Freezing,
203
+ EntityEffectBlueprint.Bleeding,
204
+ ],
205
+ areaSpells: [
206
+ {
207
+ spellKey: 'FrostBite',
208
+ probability: 15,
209
+ power: 'Medium',
210
+ },
211
+ ],
212
+ loots: [
213
+ {
214
+ itemBlueprintKey: 'FrostEssence',
215
+ chance: LootProbability.Uncommon,
216
+ quantityRange: [1, 2],
217
+ },
218
+ {
219
+ itemBlueprintKey: 'ArcticPelt',
220
+ chance: LootProbability.Rare,
221
+ },
222
+ ],
223
+ },
224
+ {
225
+ id: '6',
226
+ name: 'Lich Lord',
227
+ key: 'litch/down/standing/0.png',
228
+ subType: NPCSubtype.Undead,
229
+ alignment: NPCAlignment.Hostile,
230
+ attackType: EntityAttackType.Ranged,
231
+ maxRangeAttack: RangeTypes.High,
232
+ speed: MovementSpeed.Standard,
233
+ baseHealth: 2200,
234
+ skills: {
235
+ level: 200,
236
+ strength: { level: 160 },
237
+ dexterity: { level: 180 },
238
+ resistance: { level: 220 },
239
+ },
240
+ fleeOnLowHealth: false,
241
+ entityEffects: [
242
+ EntityEffectBlueprint.Curse,
243
+ EntityEffectBlueprint.Drain,
244
+ EntityEffectBlueprint.Shadow,
245
+ ],
246
+ areaSpells: [
247
+ {
248
+ spellKey: 'DeathNova',
249
+ probability: 30,
250
+ power: 'VeryHigh',
251
+ },
252
+ {
253
+ spellKey: 'SoulDrain',
254
+ probability: 25,
255
+ power: 'High',
256
+ },
257
+ ],
258
+ loots: [
259
+ {
260
+ itemBlueprintKey: 'Phylactery',
261
+ chance: LootProbability.VeryRare,
262
+ },
263
+ {
264
+ itemBlueprintKey: 'NecromancerStaff',
265
+ chance: LootProbability.Rare,
266
+ },
267
+ {
268
+ itemBlueprintKey: 'DarkEssence',
269
+ chance: LootProbability.Uncommon,
270
+ quantityRange: [2, 4],
271
+ },
272
+ ],
273
+ },
274
+ {
275
+ id: '7',
276
+ name: 'Cyclops',
277
+ key: 'cyclops/down/standing/0.png',
278
+ subType: NPCSubtype.Animal,
279
+ alignment: NPCAlignment.Hostile,
280
+ attackType: EntityAttackType.Ranged,
281
+ maxRangeAttack: RangeTypes.High,
282
+ speed: MovementSpeed.Slow,
283
+ baseHealth: 1800,
284
+ skills: {
285
+ level: 150,
286
+ strength: { level: 180 },
287
+ dexterity: { level: 90 },
288
+ resistance: { level: 130 },
289
+ },
290
+ fleeOnLowHealth: false,
291
+ entityEffects: [
292
+ EntityEffectBlueprint.Stun,
293
+ EntityEffectBlueprint.Knockback,
294
+ ],
295
+ areaSpells: [
296
+ {
297
+ spellKey: 'BoulderThrow',
298
+ probability: 40,
299
+ power: 'High',
300
+ },
301
+ ],
302
+ loots: [
303
+ {
304
+ itemBlueprintKey: 'GiantClub',
305
+ chance: LootProbability.Uncommon,
306
+ },
307
+ {
308
+ itemBlueprintKey: 'CyclopsEye',
309
+ chance: LootProbability.VeryRare,
310
+ },
311
+ {
312
+ itemBlueprintKey: 'GiantBone',
313
+ chance: LootProbability.Common,
314
+ quantityRange: [1, 3],
315
+ },
316
+ ],
317
+ },
318
+ {
319
+ id: '8',
320
+ name: 'Forest Troll',
321
+ key: 'forest-troll/down/standing/0.png',
322
+ subType: NPCSubtype.Animal,
323
+ alignment: NPCAlignment.Hostile,
324
+ attackType: EntityAttackType.Melee,
325
+ maxRangeAttack: RangeTypes.High,
326
+ speed: MovementSpeed.Standard,
327
+ baseHealth: 1200,
328
+ skills: {
329
+ level: 100,
330
+ strength: { level: 130 },
331
+ dexterity: { level: 80 },
332
+ resistance: { level: 110 },
333
+ },
334
+ fleeOnLowHealth: false,
335
+ entityEffects: [
336
+ EntityEffectBlueprint.Poison,
337
+ EntityEffectBlueprint.Regeneration,
338
+ ],
339
+ areaSpells: [
340
+ {
341
+ spellKey: 'ToxicCloud',
342
+ probability: 20,
343
+ power: 'Medium',
344
+ },
345
+ ],
346
+ loots: [
347
+ {
348
+ itemBlueprintKey: 'TrollClub',
349
+ chance: LootProbability.Uncommon,
350
+ },
351
+ {
352
+ itemBlueprintKey: 'TrollBlood',
353
+ chance: LootProbability.Rare,
354
+ quantityRange: [1, 2],
355
+ },
356
+ {
357
+ itemBlueprintKey: 'MossyPendant',
358
+ chance: LootProbability.Uncommon,
359
+ },
360
+ ],
361
+ },
362
+ ];
363
+
364
+ export const mockItems: IInformationCenterItem[] = [
365
+ {
366
+ name: 'Dragon Scale Armor',
367
+ key: 'dark-shield',
368
+ type: ItemType.Armor,
369
+ subType: ItemSubType.Armor,
370
+ textureAtlas: 'items',
371
+ texturePath: 'shields/dark-shield.png',
372
+ description: 'A legendary armor forged from dragon scales.',
373
+ weight: 15,
374
+ basePrice: 5000,
375
+ canSell: true,
376
+ maxStackSize: 1,
377
+ usableEffectDescription: 'Increases defense by 150',
378
+ allowedEquipSlotType: [ItemSlotType.Torso],
379
+ attack: 0,
380
+ defense: 150,
381
+ tier: 5,
382
+ rarity: ItemRarities.Legendary,
383
+ equippedBuff: [
384
+ {
385
+ type: CharacterBuffType.Skill,
386
+ trait: BasicAttribute.Strength,
387
+ buffPercentage: 10,
388
+ durationType: CharacterBuffDurationType.Permanent,
389
+ },
390
+ ],
391
+ equippedBuffDescription: 'Increases strength by 10%',
392
+ entityEffects: [EntityEffectBlueprint.Burning],
393
+ entityEffectChance: 70,
394
+ },
395
+ {
396
+ name: 'Angelic Sword',
397
+ key: 'angelic-sword',
398
+ type: ItemType.Weapon,
399
+ subType: ItemSubType.Sword,
400
+ textureAtlas: 'items',
401
+ texturePath: 'swords/angelic-sword.png',
402
+ description: 'A legendary sword imbued with the power of lightning.',
403
+ weight: 8,
404
+ basePrice: 8000,
405
+ canSell: true,
406
+ allowedEquipSlotType: [ItemSlotType.LeftHand, ItemSlotType.RightHand],
407
+ attack: 120,
408
+ defense: 0,
409
+ tier: 5,
410
+ rangeType: EntityAttackType.Melee,
411
+ rarity: ItemRarities.Legendary,
412
+ maxStackSize: 1,
413
+ usableEffectDescription: 'Increases attack by 120',
414
+ },
415
+ {
416
+ name: 'Greater Life Potion',
417
+ key: 'greater-life-potion',
418
+ type: ItemType.Consumable,
419
+ subType: ItemSubType.Potion,
420
+ textureAtlas: 'items',
421
+ texturePath: 'potions/greater-life-potion.png',
422
+ description: 'Restores a significant amount of health.',
423
+ weight: 0.5,
424
+ basePrice: 100,
425
+ canSell: true,
426
+ maxStackSize: 100,
427
+ usableEffectDescription: 'Restores 200 HP when consumed',
428
+ rarity: ItemRarities.Common,
429
+ tier: 1,
430
+ allowedEquipSlotType: [ItemSlotType.LeftHand],
431
+ },
432
+ {
433
+ name: 'Zephyrus Bow',
434
+ key: 'ranged-weapons/zephyrus-bow.png',
435
+ type: ItemType.Weapon,
436
+ subType: ItemSubType.Ranged,
437
+ textureAtlas: 'items',
438
+ texturePath: 'ranged-weapons/zephyrus-bow.png',
439
+ description: 'A basic wooden shield.',
440
+ weight: 3,
441
+ basePrice: 50,
442
+ canSell: true,
443
+ maxStackSize: 1,
444
+ usableEffectDescription: 'Increases attack by 120',
445
+ allowedEquipSlotType: [ItemSlotType.LeftHand],
446
+ attack: 0,
447
+ defense: 15,
448
+ tier: 1,
449
+ rarity: ItemRarities.Common,
450
+ },
451
+ ];
452
+
453
+ export const mockFaqItems: IFaqItem[] = [
454
+ {
455
+ id: '1',
456
+ question: 'How do I level up my character?',
457
+ answer:
458
+ 'You can level up by gaining experience points through combat, completing quests, and exploring new areas. Each level grants you skill points to improve your abilities.',
459
+ },
460
+ {
461
+ id: '2',
462
+ question: 'What are the different item rarities?',
463
+ answer:
464
+ 'Items come in different rarities: Common (white), Uncommon (green), Rare (blue), and Very Rare (purple). Higher rarity items generally have better stats and unique properties.',
465
+ },
466
+ {
467
+ id: '3',
468
+ question: 'How does combat work?',
469
+ answer:
470
+ "Combat is turn-based and depends on your character's stats. Attack determines damage dealt, Defense reduces damage taken, and HP represents your health points.",
471
+ },
472
+ ];
473
+
474
+ export const mockTutorials: IVideoGuide[] = [
475
+ {
476
+ id: '1',
477
+ title: 'Getting Started Guide',
478
+ description:
479
+ 'Learn the basics of character creation, movement, and basic combat.',
480
+ thumbnailUrl: '/tutorials/getting-started.jpg',
481
+ videoUrl: 'https://youtube.com/watch?v=getting-started',
482
+ category: 'General',
483
+ },
484
+ {
485
+ id: '2',
486
+ title: 'Advanced Combat Techniques',
487
+ description:
488
+ 'Master the art of combat with advanced combos and spell casting.',
489
+ thumbnailUrl: '/tutorials/advanced-combat.jpg',
490
+ videoUrl: 'https://youtube.com/watch?v=advanced-combat',
491
+ category: 'Combat',
492
+ },
493
+ {
494
+ id: '3',
495
+ title: 'Crafting System Tutorial',
496
+ description:
497
+ 'Everything you need to know about crafting weapons and items.',
498
+ thumbnailUrl: '/tutorials/crafting.jpg',
499
+ videoUrl: 'https://youtube.com/watch?v=crafting',
500
+ category: 'Crafting',
501
+ },
502
+ {
503
+ id: '4',
504
+ title: 'Secret Areas Guide',
505
+ description: 'Discover hidden locations and treasures across the world.',
506
+ thumbnailUrl: '/tutorials/exploration.jpg',
507
+ videoUrl: 'https://youtube.com/watch?v=exploration',
508
+ category: 'Exploration',
509
+ },
510
+ {
511
+ id: '5',
512
+ title: 'Boss Battle Strategies',
513
+ description:
514
+ 'Learn effective strategies to defeat challenging boss encounters.',
515
+ thumbnailUrl: '/tutorials/boss-battles.jpg',
516
+ videoUrl: 'https://youtube.com/watch?v=boss-battles',
517
+ category: 'Combat',
518
+ },
519
+ {
520
+ id: '6',
521
+ title: 'Resource Gathering Guide',
522
+ description:
523
+ 'Efficient methods for gathering crafting materials and resources.',
524
+ thumbnailUrl: '/tutorials/resource-gathering.jpg',
525
+ videoUrl: 'https://youtube.com/watch?v=resource-gathering',
526
+ category: 'Crafting',
527
+ },
528
+ {
529
+ id: '7',
530
+ title: 'Dungeon Exploration Tips',
531
+ description:
532
+ 'Essential tips for surviving and navigating dangerous dungeons.',
533
+ thumbnailUrl: '/tutorials/dungeon-tips.jpg',
534
+ videoUrl: 'https://youtube.com/watch?v=dungeon-tips',
535
+ category: 'Exploration',
536
+ },
537
+ {
538
+ id: '8',
539
+ title: 'Character Build Guide',
540
+ description: 'Optimize your character builds for different playstyles.',
541
+ thumbnailUrl: '/tutorials/character-builds.jpg',
542
+ videoUrl: 'https://youtube.com/watch?v=character-builds',
543
+ category: 'General',
544
+ },
545
+ {
546
+ id: '9',
547
+ title: 'PvP Combat Guide',
548
+ description: 'Advanced tactics for player versus player combat scenarios.',
549
+ thumbnailUrl: '/tutorials/pvp-combat.jpg',
550
+ videoUrl: 'https://youtube.com/watch?v=pvp-combat',
551
+ category: 'Combat',
552
+ },
553
+ {
554
+ id: '10',
555
+ title: 'Rare Item Crafting',
556
+ description:
557
+ 'Special recipes and techniques for crafting rare and legendary items.',
558
+ thumbnailUrl: '/tutorials/rare-crafting.jpg',
559
+ videoUrl: 'https://youtube.com/watch?v=rare-crafting',
560
+ category: 'Crafting',
561
+ },
562
+ ];
@@ -49,7 +49,7 @@ const Template: Story = args => (
49
49
  atlasJSON={atlasJSON}
50
50
  onSelect={onSelect}
51
51
  onClose={() => console.log('closing Equipment Set Container')}
52
- craftablesItems={extendedCraftableItems}
52
+ craftablesItems={args.craftablesItems ?? extendedCraftableItems}
53
53
  onCraftItem={(value, maxCraftable) => {
54
54
  console.log('Crafting:', {
55
55
  itemKey: value,
@@ -81,3 +81,17 @@ export const WithCategory = Template.bind({});
81
81
  WithCategory.args = {
82
82
  savedSelectedType: 'Weapon',
83
83
  };
84
+
85
+ // Add a story with empty state
86
+ export const Empty = Template.bind({});
87
+ Empty.args = {
88
+ craftablesItems: [],
89
+ savedSelectedType: 'Weapon',
90
+ };
91
+
92
+ // Add a story with search that yields no results
93
+ export const NoSearchResults = Template.bind({});
94
+ NoSearchResults.args = {
95
+ craftablesItems: extendedCraftableItems,
96
+ searchTerm: 'xyzabc123', // A search term that won't match any items
97
+ };
@@ -0,0 +1,58 @@
1
+ import type { Meta, Story } from '@storybook/react';
2
+ import React from 'react';
3
+ import { InformationCenter } from '../../../components/InformationCenter/InformationCenter';
4
+ import { IInformationCenterItem } from '../../../components/InformationCenter/InformationCenterTypes';
5
+ import { RPGUIRoot } from '../../../components/RPGUI/RPGUIRoot';
6
+ import entitiesAtlasJSON from '../../../mocks/atlas/entities/entities.json';
7
+ import entitiesAtlasIMG from '../../../mocks/atlas/entities/entities.png';
8
+ import itemsAtlasJSON from '../../../mocks/atlas/items/items.json';
9
+ import itemsAtlasIMG from '../../../mocks/atlas/items/items.png';
10
+ import { mockBestiaryItems, mockFaqItems, mockItems, mockTutorials } from '../../../mocks/informationCenter.mocks';
11
+
12
+
13
+ const meta: Meta = {
14
+ title: 'UI/Info/InformationCenter',
15
+ component: InformationCenter,
16
+ parameters: {
17
+ layout: 'centered',
18
+ },
19
+ };
20
+
21
+ export default meta;
22
+
23
+ const Template: Story = args => (
24
+ <RPGUIRoot>
25
+ <InformationCenter
26
+ itemsAtlasJSON={itemsAtlasJSON}
27
+ itemsAtlasIMG={itemsAtlasIMG}
28
+ entitiesAtlasJSON={entitiesAtlasJSON}
29
+ entitiesAtlasIMG={entitiesAtlasIMG}
30
+ faqItems={mockFaqItems}
31
+ bestiaryItems={mockBestiaryItems}
32
+ videoGuides={mockTutorials}
33
+ items={mockItems as unknown as IInformationCenterItem[]}
34
+ {...args}
35
+ />
36
+ </RPGUIRoot>
37
+ );
38
+
39
+ export const Default = Template.bind({});
40
+ Default.args = {};
41
+
42
+ export const Loading = Template.bind({});
43
+ Loading.args = {
44
+ loading: true,
45
+ };
46
+
47
+ export const Error = Template.bind({});
48
+ Error.args = {
49
+ error: 'Failed to load content',
50
+ };
51
+
52
+ export const Empty = Template.bind({});
53
+ Empty.args = {
54
+ faqItems: [],
55
+ bestiaryItems: [],
56
+ videoGuides: [],
57
+ items: [],
58
+ };
@@ -0,0 +1,52 @@
1
+ import { action } from '@storybook/addon-actions';
2
+ import { Meta, Story } from '@storybook/react';
3
+ import React from 'react';
4
+ import { JoystickDPad } from '../../../components/DPad/JoystickDPad';
5
+
6
+ export default {
7
+ title: 'UI/Joystick/DPad',
8
+ component: JoystickDPad,
9
+ argTypes: {
10
+ options: {
11
+ control: 'object',
12
+ },
13
+ disabled: {
14
+ control: 'boolean',
15
+ },
16
+ },
17
+ } as Meta;
18
+
19
+ const Template: Story = args => <JoystickDPad {...args} />;
20
+
21
+ export const Default = Template.bind({});
22
+ Default.args = {
23
+ onDirectionPress: (direction: 'up' | 'down' | 'left' | 'right') => {
24
+ console.log(`Direction pressed: ${direction}`);
25
+ action(`Direction pressed`)(direction);
26
+ },
27
+ };
28
+
29
+ export const WithBackground = Template.bind({});
30
+ WithBackground.args = {
31
+ ...Default.args,
32
+ options: {
33
+ showBackground: true,
34
+ },
35
+ };
36
+
37
+ export const WithCustomOptions = Template.bind({});
38
+ WithCustomOptions.args = {
39
+ ...Default.args,
40
+ options: {
41
+ size: 150,
42
+ opacity: 0.8,
43
+ pressInterval: 100,
44
+ showBackground: true,
45
+ },
46
+ };
47
+
48
+ export const Disabled = Template.bind({});
49
+ Disabled.args = {
50
+ ...Default.args,
51
+ disabled: true,
52
+ };