poi-plugin-quest-info-2 0.7.1 → 0.7.4

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 (50) hide show
  1. package/.eslintrc.js +1 -0
  2. package/README.md +2 -0
  3. package/build/kcQuestsData/DATA_VERSION +1 -1
  4. package/build/kcQuestsData/index.ts +1 -1
  5. package/build/kcQuestsData/quests-scn-new.json +1 -3
  6. package/build/kcQuestsData/quests-scn.json +72 -72
  7. package/build/kcanotifyGamedata/DATA_VERSION +1 -1
  8. package/build/kcanotifyGamedata/index.ts +1 -1
  9. package/build/kcanotifyGamedata/quests-en.json +12 -0
  10. package/build/kcanotifyGamedata/quests-jp.json +12 -0
  11. package/build/kcanotifyGamedata/quests-ko.json +12 -5
  12. package/build/kcanotifyGamedata/quests-scn.json +12 -0
  13. package/build/kcanotifyGamedata/quests-tcn.json +12 -0
  14. package/build/prePostQuest.json +4498 -0
  15. package/build/questCategory.json +590 -588
  16. package/build/questMap.json +575 -0
  17. package/i18n/en-US.json +4 -3
  18. package/i18n/ja-JP.json +4 -3
  19. package/i18n/ko-KR.json +2 -1
  20. package/i18n/zh-CN.json +4 -3
  21. package/i18n/zh-TW.json +4 -3
  22. package/package.json +3 -3
  23. package/src/App.tsx +1 -1
  24. package/src/Toolbar.tsx +5 -67
  25. package/src/__tests__/__snapshots__/questCategory.spec.ts.snap +113 -113
  26. package/src/__tests__/kcanotifyData.spec.ts +14 -1
  27. package/src/__tests__/kcwikiData.spec.ts +11 -1
  28. package/src/__tests__/questCategory.spec.ts +4 -4
  29. package/src/components/QuestCard/MinimalQuestCard.tsx +11 -14
  30. package/src/components/QuestCard/index.tsx +86 -55
  31. package/src/components/QuestCard/styles.ts +17 -0
  32. package/src/components/QuestList.tsx +3 -6
  33. package/src/components/{PreTaskTag.tsx → QuestTag.tsx} +3 -2
  34. package/src/questHelper.ts +13 -5
  35. package/src/store/quest.ts +3 -3
  36. package/src/tags.tsx +172 -0
  37. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -14
  38. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -12
  39. package/.github/workflows/build.yml +0 -51
  40. package/.github/workflows/publish.yml +0 -45
  41. package/.vscode/extensions.json +0 -6
  42. package/.vscode/settings.json +0 -11
  43. package/scripts/convertAssets.ts +0 -57
  44. package/scripts/downloadKcQuestsData.ts +0 -136
  45. package/scripts/downloadKcanotifyGamedata.ts +0 -132
  46. package/scripts/downloadSprites.ts +0 -126
  47. package/scripts/genQuestCategory.ts +0 -58
  48. package/scripts/proxyFetch.ts +0 -42
  49. package/scripts/utils.ts +0 -8
  50. package/src/tags.ts +0 -66
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poi-plugin-quest-info-2",
3
- "version": "0.7.1",
3
+ "version": "0.7.4",
4
4
  "private": false,
5
5
  "description": "show quest info",
6
6
  "homepage": "https://github.com/lawvs/poi-plugin-quest-2/",
@@ -25,13 +25,13 @@
25
25
  "downloadKcQuestsData": "ts-node scripts/downloadKcQuestsData.ts",
26
26
  "downloadKcanotifyData": "ts-node scripts/downloadKcanotifyGamedata.ts",
27
27
  "downloadSprites": "ts-node scripts/downloadSprites.ts",
28
- "genQuestCategory": "ts-node scripts/genQuestCategory.ts",
28
+ "genQuestData": "ts-node scripts/genQuestData.ts",
29
29
  "lint": "eslint . --ignore-path .gitignore",
30
30
  "lint:fix": "npm run lint -- --fix",
31
31
  "storybook": "start-storybook -p 6006",
32
32
  "test": "jest",
33
33
  "typeCheck": "tsc --noEmit",
34
- "update": "npm run downloadKcanotifyData && npm run downloadKcQuestsData && npm run genQuestCategory"
34
+ "update": "npm run downloadKcanotifyData && npm run downloadKcQuestsData && npm run genQuestData"
35
35
  },
36
36
  "dependencies": {
37
37
  "react-use": "^17.3.1",
package/src/App.tsx CHANGED
@@ -31,7 +31,7 @@ const Main: React.FC = () => {
31
31
  return (
32
32
  <>
33
33
  <Toolbar></Toolbar>
34
- <CountText>{t('TotalQuests', { count: quests.length })}</CountText>
34
+ <CountText>{t('TotalQuests', { number: quests.length })}</CountText>
35
35
  <QuestList quests={quests}></QuestList>
36
36
  </>
37
37
  )
package/src/Toolbar.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import { Button, InputGroup, Intent, Tag, Tooltip } from '@blueprintjs/core'
1
+ import { Button, InputGroup, Intent, Tooltip } from '@blueprintjs/core'
2
2
  import { IconNames } from '@blueprintjs/icons'
3
3
  import type { ChangeEvent } from 'react'
4
4
  import React, { useCallback } from 'react'
@@ -10,12 +10,7 @@ import type { UnionQuest } from './questHelper'
10
10
  import { useQuest, useSyncWithGame } from './store'
11
11
  import { useFilterTags, useSyncGameTagEffect } from './store/filterTags'
12
12
  import { useSearchInput } from './store/search'
13
- import {
14
- ALL_CATEGORY_TAG,
15
- ALL_TYPE_TAG,
16
- CATEGORY_TAGS,
17
- TYPE_TAGS,
18
- } from './tags'
13
+ import { CategoryTags, CATEGORY_TAGS, TypeTags, TYPE_TAGS } from './tags'
19
14
 
20
15
  const ToolbarWrapper = styled.div`
21
16
  display: flex;
@@ -27,15 +22,6 @@ const ToolbarWrapper = styled.div`
27
22
  }
28
23
  `
29
24
 
30
- const TagsWrapper = styled.div`
31
- margin-left: -4px;
32
- margin-right: -4px;
33
-
34
- & > * {
35
- margin: 4px;
36
- }
37
- `
38
-
39
25
  const SyncButton = () => {
40
26
  const { t } = usePluginTranslation()
41
27
  const { searchInput } = useSearchInput()
@@ -91,62 +77,14 @@ export const SearchInput: React.FC = () => {
91
77
  )
92
78
  }
93
79
 
94
- const Tags = () => {
95
- const { t } = usePluginTranslation()
96
-
80
+ export const Toolbar = () => {
97
81
  useSyncGameTagEffect()
98
82
 
99
- const { typeTags, categoryTags, setCategoryTags, setTypeTags } =
100
- useFilterTags()
101
-
102
- return (
103
- <>
104
- <TagsWrapper>
105
- {CATEGORY_TAGS.map(({ name }) => (
106
- <Tag
107
- onClick={() => setCategoryTags(name)}
108
- intent={
109
- categoryTags[name]
110
- ? name === ALL_CATEGORY_TAG.name
111
- ? 'success'
112
- : 'primary'
113
- : 'none'
114
- }
115
- interactive={true}
116
- key={name}
117
- >
118
- {t(name)}
119
- </Tag>
120
- ))}
121
- </TagsWrapper>
122
- <TagsWrapper>
123
- {TYPE_TAGS.map((tag) => (
124
- <Tag
125
- onClick={() => setTypeTags(tag.name)}
126
- intent={
127
- typeTags[tag.name]
128
- ? tag.name === ALL_TYPE_TAG.name
129
- ? 'success'
130
- : 'primary'
131
- : 'none'
132
- }
133
- interactive={true}
134
- key={tag.name}
135
- >
136
- {t(tag.name)}
137
- {'suffix' in tag && ' ' + tag.suffix}
138
- </Tag>
139
- ))}
140
- </TagsWrapper>
141
- </>
142
- )
143
- }
144
-
145
- export const Toolbar = () => {
146
83
  return (
147
84
  <ToolbarWrapper>
148
85
  <SearchInput></SearchInput>
149
- <Tags></Tags>
86
+ <CategoryTags />
87
+ <TypeTags />
150
88
  </ToolbarWrapper>
151
89
  )
152
90
  }