@rpg-engine/long-bow 0.1.91 → 0.1.92

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 (88) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +181 -181
  3. package/dist/components/Item/Inventory/itemContainerHelper.d.ts +2 -2
  4. package/dist/long-bow.cjs.development.js +49 -2
  5. package/dist/long-bow.cjs.development.js.map +1 -1
  6. package/dist/long-bow.cjs.production.min.js +1 -1
  7. package/dist/long-bow.cjs.production.min.js.map +1 -1
  8. package/dist/long-bow.esm.js +49 -2
  9. package/dist/long-bow.esm.js.map +1 -1
  10. package/package.json +98 -98
  11. package/src/components/Abstractions/SlotsContainer.tsx +42 -42
  12. package/src/components/Button.tsx +30 -30
  13. package/src/components/Chat/Chat.tsx +193 -193
  14. package/src/components/CheckButton.tsx +65 -65
  15. package/src/components/DraggableContainer.tsx +150 -150
  16. package/src/components/Dropdown.tsx +57 -57
  17. package/src/components/Equipment/EquipmentSet.tsx +134 -134
  18. package/src/components/Input.tsx +11 -11
  19. package/src/components/Item/Cards/ItemTooltip.tsx +32 -32
  20. package/src/components/Item/Inventory/ItemContainer.tsx +65 -65
  21. package/src/components/Item/Inventory/ItemContainerTypes.ts +4 -4
  22. package/src/components/Item/Inventory/ItemSlot.tsx +199 -199
  23. package/src/components/Item/Inventory/itemContainerHelper.ts +94 -81
  24. package/src/components/ListMenu.tsx +65 -65
  25. package/src/components/Multitab/Tab.tsx +57 -57
  26. package/src/components/Multitab/TabBody.tsx +13 -13
  27. package/src/components/Multitab/TabsContainer.tsx +97 -97
  28. package/src/components/NPCDialog/NPCDialog.tsx +145 -145
  29. package/src/components/NPCDialog/NPCDialogText.tsx +53 -53
  30. package/src/components/NPCDialog/QuestionDialog/QuestionDialog.tsx +239 -239
  31. package/src/components/ProgressBar.tsx +91 -91
  32. package/src/components/PropertySelect/PropertySelect.tsx +101 -101
  33. package/src/components/PropertySelect/img/ui-arrows/arrow01-left-clicked.png +0 -0
  34. package/src/components/PropertySelect/img/ui-arrows/arrow01-left.png +0 -0
  35. package/src/components/PropertySelect/img/ui-arrows/arrow01-right-clicked.png +0 -0
  36. package/src/components/PropertySelect/img/ui-arrows/arrow01-right.png +0 -0
  37. package/src/components/PropertySelect/img/ui-arrows/arrow02-left-clicked.png +0 -0
  38. package/src/components/PropertySelect/img/ui-arrows/arrow02-left.png +0 -0
  39. package/src/components/PropertySelect/img/ui-arrows/arrow02-right-clicked.png +0 -0
  40. package/src/components/PropertySelect/img/ui-arrows/arrow02-right.png +0 -0
  41. package/src/components/QuestInfo/QuestInfo.tsx +143 -143
  42. package/src/components/RPGUIContainer.tsx +47 -47
  43. package/src/components/RPGUIRoot.tsx +14 -14
  44. package/src/components/RadioButton.tsx +53 -53
  45. package/src/components/RangeSlider.tsx +68 -68
  46. package/src/components/RelativeListMenu.tsx +83 -83
  47. package/src/components/ScrollList.tsx +77 -77
  48. package/src/components/SimpleProgressBar.tsx +62 -62
  49. package/src/components/SkillProgressBar.tsx +123 -123
  50. package/src/components/SkillsContainer.tsx +196 -196
  51. package/src/components/TextArea.tsx +11 -11
  52. package/src/components/Truncate.tsx +25 -25
  53. package/src/components/shared/Column.tsx +16 -16
  54. package/src/components/shared/SpriteFromAtlas.tsx +99 -99
  55. package/src/components/typography/DynamicText.tsx +49 -49
  56. package/src/constants/uiColors.ts +10 -10
  57. package/src/hooks/useEventListener.ts +21 -21
  58. package/src/hooks/useOutsideAlerter.ts +25 -25
  59. package/src/index.tsx +25 -25
  60. package/src/libs/StringHelpers.ts +3 -3
  61. package/src/mocks/atlas/icons/icons.json +735 -735
  62. package/src/mocks/atlas/items/items.json +5215 -5215
  63. package/src/mocks/equipmentSet.mocks.ts +347 -347
  64. package/src/mocks/itemContainer.mocks.ts +249 -249
  65. package/src/mocks/skills.mocks.ts +122 -122
  66. package/src/stories/Button.stories.tsx +36 -36
  67. package/src/stories/Chat.stories.tsx +170 -170
  68. package/src/stories/CheckButton.stories.tsx +48 -48
  69. package/src/stories/DraggableContainer.stories.tsx +28 -28
  70. package/src/stories/Dropdown.stories.tsx +46 -46
  71. package/src/stories/EquipmentSet.stories.tsx +50 -50
  72. package/src/stories/ItemContainer.stories.tsx +50 -50
  73. package/src/stories/ListMenu.stories.tsx +56 -56
  74. package/src/stories/Multitab.stories.tsx +51 -51
  75. package/src/stories/NPCDialog.stories.tsx +130 -130
  76. package/src/stories/ProgressBar.stories.tsx +23 -23
  77. package/src/stories/PropertySelect.stories.tsx +41 -41
  78. package/src/stories/QuestInfo.stories.tsx +76 -76
  79. package/src/stories/RPGUIContainers.stories.tsx +42 -42
  80. package/src/stories/RadioButton.stories.tsx +49 -49
  81. package/src/stories/RangeSlider.stories.tsx +60 -60
  82. package/src/stories/ScrollList.stories.tsx +85 -85
  83. package/src/stories/SimpleProgressBar.stories.tsx +22 -22
  84. package/src/stories/SkillProgressBar.stories.tsx +30 -30
  85. package/src/stories/SkillsContainer.stories.tsx +31 -31
  86. package/src/stories/Text.stories.tsx +42 -42
  87. package/src/types/eventTypes.ts +4 -4
  88. package/src/types/index.d.ts +2 -2
@@ -1,122 +1,122 @@
1
- import { SkillType } from '@rpg-engine/shared';
2
-
3
- export const skillMock = {
4
- _id: '62aebda8785a9f0089a4f757',
5
- stamina: {
6
- type: SkillType.BasicAttributes,
7
- level: 1,
8
- skillPoints: 10,
9
- skillPointsToNextLevel: 80,
10
- },
11
- magic: {
12
- type: SkillType.BasicAttributes,
13
- level: 1,
14
- skillPoints: 22,
15
- skillPointsToNextLevel: 80,
16
- },
17
- magicResistance: {
18
- type: SkillType.BasicAttributes,
19
- level: 1,
20
- skillPoints: 13,
21
- skillPointsToNextLevel: 80,
22
- },
23
- strength: {
24
- type: SkillType.BasicAttributes,
25
- level: 1,
26
- skillPoints: 14,
27
- skillPointsToNextLevel: 80,
28
- },
29
- resistance: {
30
- type: SkillType.BasicAttributes,
31
- level: 1,
32
- skillPoints: 5,
33
- skillPointsToNextLevel: 80,
34
- },
35
- dexterity: {
36
- type: SkillType.BasicAttributes,
37
- level: 1,
38
- skillPoints: 52,
39
- skillPointsToNextLevel: 80,
40
- },
41
- first: {
42
- type: SkillType.Combat,
43
- level: 1,
44
- skillPoints: 22,
45
- skillPointsToNextLevel: 80,
46
- },
47
- club: {
48
- type: SkillType.Combat,
49
- level: 1,
50
- skillPoints: 12,
51
- skillPointsToNextLevel: 80,
52
- },
53
- sword: {
54
- type: SkillType.Combat,
55
- level: 1,
56
- skillPoints: 3,
57
- skillPointsToNextLevel: 80,
58
- },
59
- dagger: {
60
- type: SkillType.Combat,
61
- level: 1,
62
- skillPoints: 3,
63
- skillPointsToNextLevel: 80,
64
- },
65
- axe: {
66
- type: SkillType.Combat,
67
- level: 1,
68
- skillPoints: 45,
69
- skillPointsToNextLevel: 80,
70
- },
71
- distance: {
72
- type: SkillType.Combat,
73
- level: 1,
74
- skillPoints: 23,
75
- skillPointsToNextLevel: 80,
76
- },
77
- shielding: {
78
- type: SkillType.Combat,
79
- level: 1,
80
- skillPoints: 12,
81
- skillPointsToNextLevel: 80,
82
- },
83
- fishing: {
84
- type: SkillType.Gathering,
85
- level: 1,
86
- skillPoints: 5,
87
- skillPointsToNextLevel: 80,
88
- },
89
- mining: {
90
- type: SkillType.Crafting,
91
- level: 1,
92
- skillPoints: 3,
93
- skillPointsToNextLevel: 80,
94
- },
95
- lumberjacking: {
96
- type: SkillType.Crafting,
97
- level: 1,
98
- skillPoints: 2,
99
- skillPointsToNextLevel: 80,
100
- },
101
- cooking: {
102
- type: SkillType.Crafting,
103
- level: 1,
104
- skillPoints: 10,
105
- skillPointsToNextLevel: 80,
106
- },
107
- alchemy: {
108
- type: SkillType.Crafting,
109
- level: 1,
110
- skillPoints: 2,
111
- skillPointsToNextLevel: 80,
112
- },
113
- level: 1,
114
- xpGainRate: 100,
115
- experience: 0,
116
- xpToNextLevel: 40,
117
- ownerType: 'NPC',
118
- owner: '62aebda8785a9f0089a4f758',
119
- createdAt: '2022-06-19T06:09:44.661Z',
120
- updatedAt: '2022-06-19T06:09:44.661Z',
121
- __v: 0,
122
- };
1
+ import { SkillType } from '@rpg-engine/shared';
2
+
3
+ export const skillMock = {
4
+ _id: '62aebda8785a9f0089a4f757',
5
+ stamina: {
6
+ type: SkillType.BasicAttributes,
7
+ level: 1,
8
+ skillPoints: 10,
9
+ skillPointsToNextLevel: 80,
10
+ },
11
+ magic: {
12
+ type: SkillType.BasicAttributes,
13
+ level: 1,
14
+ skillPoints: 22,
15
+ skillPointsToNextLevel: 80,
16
+ },
17
+ magicResistance: {
18
+ type: SkillType.BasicAttributes,
19
+ level: 1,
20
+ skillPoints: 13,
21
+ skillPointsToNextLevel: 80,
22
+ },
23
+ strength: {
24
+ type: SkillType.BasicAttributes,
25
+ level: 1,
26
+ skillPoints: 14,
27
+ skillPointsToNextLevel: 80,
28
+ },
29
+ resistance: {
30
+ type: SkillType.BasicAttributes,
31
+ level: 1,
32
+ skillPoints: 5,
33
+ skillPointsToNextLevel: 80,
34
+ },
35
+ dexterity: {
36
+ type: SkillType.BasicAttributes,
37
+ level: 1,
38
+ skillPoints: 52,
39
+ skillPointsToNextLevel: 80,
40
+ },
41
+ first: {
42
+ type: SkillType.Combat,
43
+ level: 1,
44
+ skillPoints: 22,
45
+ skillPointsToNextLevel: 80,
46
+ },
47
+ club: {
48
+ type: SkillType.Combat,
49
+ level: 1,
50
+ skillPoints: 12,
51
+ skillPointsToNextLevel: 80,
52
+ },
53
+ sword: {
54
+ type: SkillType.Combat,
55
+ level: 1,
56
+ skillPoints: 3,
57
+ skillPointsToNextLevel: 80,
58
+ },
59
+ dagger: {
60
+ type: SkillType.Combat,
61
+ level: 1,
62
+ skillPoints: 3,
63
+ skillPointsToNextLevel: 80,
64
+ },
65
+ axe: {
66
+ type: SkillType.Combat,
67
+ level: 1,
68
+ skillPoints: 45,
69
+ skillPointsToNextLevel: 80,
70
+ },
71
+ distance: {
72
+ type: SkillType.Combat,
73
+ level: 1,
74
+ skillPoints: 23,
75
+ skillPointsToNextLevel: 80,
76
+ },
77
+ shielding: {
78
+ type: SkillType.Combat,
79
+ level: 1,
80
+ skillPoints: 12,
81
+ skillPointsToNextLevel: 80,
82
+ },
83
+ fishing: {
84
+ type: SkillType.Gathering,
85
+ level: 1,
86
+ skillPoints: 5,
87
+ skillPointsToNextLevel: 80,
88
+ },
89
+ mining: {
90
+ type: SkillType.Crafting,
91
+ level: 1,
92
+ skillPoints: 3,
93
+ skillPointsToNextLevel: 80,
94
+ },
95
+ lumberjacking: {
96
+ type: SkillType.Crafting,
97
+ level: 1,
98
+ skillPoints: 2,
99
+ skillPointsToNextLevel: 80,
100
+ },
101
+ cooking: {
102
+ type: SkillType.Crafting,
103
+ level: 1,
104
+ skillPoints: 10,
105
+ skillPointsToNextLevel: 80,
106
+ },
107
+ alchemy: {
108
+ type: SkillType.Crafting,
109
+ level: 1,
110
+ skillPoints: 2,
111
+ skillPointsToNextLevel: 80,
112
+ },
113
+ level: 1,
114
+ xpGainRate: 100,
115
+ experience: 0,
116
+ xpToNextLevel: 40,
117
+ ownerType: 'NPC',
118
+ owner: '62aebda8785a9f0089a4f758',
119
+ createdAt: '2022-06-19T06:09:44.661Z',
120
+ updatedAt: '2022-06-19T06:09:44.661Z',
121
+ __v: 0,
122
+ };
@@ -1,36 +1,36 @@
1
- import { Meta, Story } from '@storybook/react';
2
- import React from 'react';
3
- import { Button, ButtonTypes, IButtonProps } from '../../src/components/Button';
4
- import { RPGUIRoot } from '../../src/components/RPGUIRoot';
5
-
6
- const meta: Meta = {
7
- title: 'Button',
8
- component: Button,
9
- argTypes: {
10
- children: {},
11
- buttonType: {
12
- control: {
13
- type: 'select',
14
- labels: {
15
- [ButtonTypes.RPGUIButton]: 'rpgui-button',
16
- [ButtonTypes.RPGUIGoldButton]: 'rpgui-button gold',
17
- },
18
- },
19
- },
20
- },
21
- };
22
-
23
- export default meta;
24
-
25
- const Template: Story<IButtonProps> = args => (
26
- <RPGUIRoot>
27
- <Button {...args} />
28
- </RPGUIRoot>
29
- );
30
-
31
- export const Default = Template.bind({});
32
-
33
- Default.args = {
34
- children: 'Teste',
35
- buttonType: ButtonTypes.RPGUIButton,
36
- };
1
+ import { Meta, Story } from '@storybook/react';
2
+ import React from 'react';
3
+ import { Button, ButtonTypes, IButtonProps } from '../../src/components/Button';
4
+ import { RPGUIRoot } from '../../src/components/RPGUIRoot';
5
+
6
+ const meta: Meta = {
7
+ title: 'Button',
8
+ component: Button,
9
+ argTypes: {
10
+ children: {},
11
+ buttonType: {
12
+ control: {
13
+ type: 'select',
14
+ labels: {
15
+ [ButtonTypes.RPGUIButton]: 'rpgui-button',
16
+ [ButtonTypes.RPGUIGoldButton]: 'rpgui-button gold',
17
+ },
18
+ },
19
+ },
20
+ },
21
+ };
22
+
23
+ export default meta;
24
+
25
+ const Template: Story<IButtonProps> = args => (
26
+ <RPGUIRoot>
27
+ <Button {...args} />
28
+ </RPGUIRoot>
29
+ );
30
+
31
+ export const Default = Template.bind({});
32
+
33
+ Default.args = {
34
+ children: 'Teste',
35
+ buttonType: ButtonTypes.RPGUIButton,
36
+ };
@@ -1,170 +1,170 @@
1
- import { ChatMessageType, IChatMessage } from '@rpg-engine/shared';
2
- import { Meta, Story } from '@storybook/react';
3
- import React from 'react';
4
- import { Chat } from '../../src/components/Chat/Chat';
5
- import { RPGUIRoot } from '../../src/components/RPGUIRoot';
6
-
7
- const meta: Meta = {
8
- title: 'Chat',
9
- component: Chat,
10
- };
11
-
12
- export default meta;
13
-
14
- const chatMessagesMock = [
15
- {
16
- _id: 'test-id-1',
17
- message: 'test message',
18
- emitter: {
19
- _id: 'someid',
20
- name: 'Guilherme',
21
- },
22
- type: ChatMessageType.Global,
23
- x: 128,
24
- y: 128,
25
- scene: 'MainScene',
26
- createdAt: '2020-08-20T16:00:00.000Z',
27
- updatedAt: '2020-08-20T16:00:00.000Z',
28
- },
29
- {
30
- _id: 'test-id-1',
31
- message: 'test message',
32
- emitter: {
33
- _id: 'someid',
34
- name: 'Guilherme',
35
- },
36
- type: ChatMessageType.Global,
37
- x: 128,
38
- y: 128,
39
- scene: 'MainScene',
40
- createdAt: '2020-08-20T16:00:00.000Z',
41
- updatedAt: '2020-08-20T16:00:00.000Z',
42
- },
43
- {
44
- _id: 'test-id-2',
45
- message: 'Good morning!',
46
- emitter: {
47
- _id: 'someid',
48
- name: 'Guilherme',
49
- },
50
- type: ChatMessageType.Global,
51
- x: 128,
52
- y: 128,
53
- scene: 'MainScene',
54
- createdAt: '2020-08-20T16:00:00.000Z',
55
- updatedAt: '2020-08-20T16:00:00.000Z',
56
- },
57
- {
58
- _id: 'test-id-3',
59
- message: 'How are you doing?',
60
- emitter: {
61
- _id: 'someid',
62
- name: 'Guilherme',
63
- },
64
- type: ChatMessageType.Global,
65
- x: 128,
66
- y: 128,
67
- scene: 'MainScene',
68
- createdAt: '2020-08-20T16:00:00.000Z',
69
- updatedAt: '2020-08-20T16:00:00.000Z',
70
- },
71
- {
72
- _id: 'test-id-4',
73
- message: 'Hey hey hey!!!',
74
- emitter: {
75
- _id: 'someid',
76
- name: 'Guilherme',
77
- },
78
- type: ChatMessageType.Global,
79
- x: 128,
80
- y: 128,
81
- scene: 'MainScene',
82
- createdAt: '2020-08-20T16:00:00.000Z',
83
- updatedAt: '2020-08-20T16:00:00.000Z',
84
- },
85
- {
86
- _id: 'test-id-5',
87
- message: 'BITCONNEEEEEEEEECT!',
88
- emitter: {
89
- _id: 'someid',
90
- name: 'Guilherme',
91
- },
92
- type: ChatMessageType.Global,
93
- x: 128,
94
- y: 128,
95
- scene: 'MainScene',
96
- createdAt: '2020-08-20T16:00:00.000Z',
97
- updatedAt: '2020-08-20T16:00:00.000Z',
98
- },
99
- {
100
- _id: 'test-id-6',
101
- message: 'BITCONNEEEEEEEEECT!',
102
- emitter: {
103
- _id: 'someid',
104
- name: 'Guilherme',
105
- },
106
- type: ChatMessageType.Global,
107
- x: 128,
108
- y: 128,
109
- scene: 'MainScene',
110
- createdAt: '2020-08-20T16:00:00.000Z',
111
- updatedAt: '2020-08-20T16:00:00.000Z',
112
- },
113
- {
114
- _id: 'test-id-7',
115
- message: 'BITCONNEEEEEEEEECT!',
116
- emitter: {
117
- _id: 'someid',
118
- name: 'Guilherme',
119
- },
120
- type: ChatMessageType.Global,
121
- x: 128,
122
- y: 128,
123
- scene: 'MainScene',
124
- createdAt: '2020-08-20T16:00:00.000Z',
125
- updatedAt: '2020-08-20T16:00:00.000Z',
126
- },
127
- {
128
- _id: 'test-id-8',
129
- message: 'BITCONNEEEEEEEEECT!',
130
- emitter: {
131
- _id: 'someid',
132
- name: 'Guilherme',
133
- },
134
- type: ChatMessageType.Global,
135
- x: 128,
136
- y: 128,
137
- scene: 'MainScene',
138
- createdAt: '2020-08-20T16:00:00.000Z',
139
- updatedAt: '2020-08-20T16:00:00.000Z',
140
- },
141
- {
142
- _id: 'test-id-9',
143
- message: 'BITCONNEEEEEEEEECT!',
144
- emitter: {
145
- _id: 'someid',
146
- name: 'Guilherme',
147
- },
148
- type: ChatMessageType.Global,
149
- x: 128,
150
- y: 128,
151
- scene: 'MainScene',
152
- createdAt: '2020-08-20T16:00:00.000Z',
153
- updatedAt: '2020-08-20T16:00:00.000Z',
154
- },
155
- ];
156
-
157
- const Template: Story<IChatMessage> = args => (
158
- <RPGUIRoot>
159
- <Chat
160
- onSendChatMessage={msg => console.log(msg)}
161
- chatMessages={chatMessagesMock}
162
- opacity={0.5}
163
- height={'200px'}
164
- onCloseButton={() => console.log('closing chat...')}
165
- {...args}
166
- />
167
- </RPGUIRoot>
168
- );
169
-
170
- export const Default = Template.bind({});
1
+ import { ChatMessageType, IChatMessage } from '@rpg-engine/shared';
2
+ import { Meta, Story } from '@storybook/react';
3
+ import React from 'react';
4
+ import { Chat } from '../../src/components/Chat/Chat';
5
+ import { RPGUIRoot } from '../../src/components/RPGUIRoot';
6
+
7
+ const meta: Meta = {
8
+ title: 'Chat',
9
+ component: Chat,
10
+ };
11
+
12
+ export default meta;
13
+
14
+ const chatMessagesMock = [
15
+ {
16
+ _id: 'test-id-1',
17
+ message: 'test message',
18
+ emitter: {
19
+ _id: 'someid',
20
+ name: 'Guilherme',
21
+ },
22
+ type: ChatMessageType.Global,
23
+ x: 128,
24
+ y: 128,
25
+ scene: 'MainScene',
26
+ createdAt: '2020-08-20T16:00:00.000Z',
27
+ updatedAt: '2020-08-20T16:00:00.000Z',
28
+ },
29
+ {
30
+ _id: 'test-id-1',
31
+ message: 'test message',
32
+ emitter: {
33
+ _id: 'someid',
34
+ name: 'Guilherme',
35
+ },
36
+ type: ChatMessageType.Global,
37
+ x: 128,
38
+ y: 128,
39
+ scene: 'MainScene',
40
+ createdAt: '2020-08-20T16:00:00.000Z',
41
+ updatedAt: '2020-08-20T16:00:00.000Z',
42
+ },
43
+ {
44
+ _id: 'test-id-2',
45
+ message: 'Good morning!',
46
+ emitter: {
47
+ _id: 'someid',
48
+ name: 'Guilherme',
49
+ },
50
+ type: ChatMessageType.Global,
51
+ x: 128,
52
+ y: 128,
53
+ scene: 'MainScene',
54
+ createdAt: '2020-08-20T16:00:00.000Z',
55
+ updatedAt: '2020-08-20T16:00:00.000Z',
56
+ },
57
+ {
58
+ _id: 'test-id-3',
59
+ message: 'How are you doing?',
60
+ emitter: {
61
+ _id: 'someid',
62
+ name: 'Guilherme',
63
+ },
64
+ type: ChatMessageType.Global,
65
+ x: 128,
66
+ y: 128,
67
+ scene: 'MainScene',
68
+ createdAt: '2020-08-20T16:00:00.000Z',
69
+ updatedAt: '2020-08-20T16:00:00.000Z',
70
+ },
71
+ {
72
+ _id: 'test-id-4',
73
+ message: 'Hey hey hey!!!',
74
+ emitter: {
75
+ _id: 'someid',
76
+ name: 'Guilherme',
77
+ },
78
+ type: ChatMessageType.Global,
79
+ x: 128,
80
+ y: 128,
81
+ scene: 'MainScene',
82
+ createdAt: '2020-08-20T16:00:00.000Z',
83
+ updatedAt: '2020-08-20T16:00:00.000Z',
84
+ },
85
+ {
86
+ _id: 'test-id-5',
87
+ message: 'BITCONNEEEEEEEEECT!',
88
+ emitter: {
89
+ _id: 'someid',
90
+ name: 'Guilherme',
91
+ },
92
+ type: ChatMessageType.Global,
93
+ x: 128,
94
+ y: 128,
95
+ scene: 'MainScene',
96
+ createdAt: '2020-08-20T16:00:00.000Z',
97
+ updatedAt: '2020-08-20T16:00:00.000Z',
98
+ },
99
+ {
100
+ _id: 'test-id-6',
101
+ message: 'BITCONNEEEEEEEEECT!',
102
+ emitter: {
103
+ _id: 'someid',
104
+ name: 'Guilherme',
105
+ },
106
+ type: ChatMessageType.Global,
107
+ x: 128,
108
+ y: 128,
109
+ scene: 'MainScene',
110
+ createdAt: '2020-08-20T16:00:00.000Z',
111
+ updatedAt: '2020-08-20T16:00:00.000Z',
112
+ },
113
+ {
114
+ _id: 'test-id-7',
115
+ message: 'BITCONNEEEEEEEEECT!',
116
+ emitter: {
117
+ _id: 'someid',
118
+ name: 'Guilherme',
119
+ },
120
+ type: ChatMessageType.Global,
121
+ x: 128,
122
+ y: 128,
123
+ scene: 'MainScene',
124
+ createdAt: '2020-08-20T16:00:00.000Z',
125
+ updatedAt: '2020-08-20T16:00:00.000Z',
126
+ },
127
+ {
128
+ _id: 'test-id-8',
129
+ message: 'BITCONNEEEEEEEEECT!',
130
+ emitter: {
131
+ _id: 'someid',
132
+ name: 'Guilherme',
133
+ },
134
+ type: ChatMessageType.Global,
135
+ x: 128,
136
+ y: 128,
137
+ scene: 'MainScene',
138
+ createdAt: '2020-08-20T16:00:00.000Z',
139
+ updatedAt: '2020-08-20T16:00:00.000Z',
140
+ },
141
+ {
142
+ _id: 'test-id-9',
143
+ message: 'BITCONNEEEEEEEEECT!',
144
+ emitter: {
145
+ _id: 'someid',
146
+ name: 'Guilherme',
147
+ },
148
+ type: ChatMessageType.Global,
149
+ x: 128,
150
+ y: 128,
151
+ scene: 'MainScene',
152
+ createdAt: '2020-08-20T16:00:00.000Z',
153
+ updatedAt: '2020-08-20T16:00:00.000Z',
154
+ },
155
+ ];
156
+
157
+ const Template: Story<IChatMessage> = args => (
158
+ <RPGUIRoot>
159
+ <Chat
160
+ onSendChatMessage={msg => console.log(msg)}
161
+ chatMessages={chatMessagesMock}
162
+ opacity={0.5}
163
+ height={'200px'}
164
+ onCloseButton={() => console.log('closing chat...')}
165
+ {...args}
166
+ />
167
+ </RPGUIRoot>
168
+ );
169
+
170
+ export const Default = Template.bind({});