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.
- package/.eslintrc.js +1 -0
- package/README.md +2 -0
- package/build/kcQuestsData/DATA_VERSION +1 -1
- package/build/kcQuestsData/index.ts +1 -1
- package/build/kcQuestsData/quests-scn-new.json +1 -3
- package/build/kcQuestsData/quests-scn.json +72 -72
- package/build/kcanotifyGamedata/DATA_VERSION +1 -1
- package/build/kcanotifyGamedata/index.ts +1 -1
- package/build/kcanotifyGamedata/quests-en.json +12 -0
- package/build/kcanotifyGamedata/quests-jp.json +12 -0
- package/build/kcanotifyGamedata/quests-ko.json +12 -5
- package/build/kcanotifyGamedata/quests-scn.json +12 -0
- package/build/kcanotifyGamedata/quests-tcn.json +12 -0
- package/build/prePostQuest.json +4498 -0
- package/build/questCategory.json +590 -588
- package/build/questMap.json +575 -0
- package/i18n/en-US.json +4 -3
- package/i18n/ja-JP.json +4 -3
- package/i18n/ko-KR.json +2 -1
- package/i18n/zh-CN.json +4 -3
- package/i18n/zh-TW.json +4 -3
- package/package.json +3 -3
- package/src/App.tsx +1 -1
- package/src/Toolbar.tsx +5 -67
- package/src/__tests__/__snapshots__/questCategory.spec.ts.snap +113 -113
- package/src/__tests__/kcanotifyData.spec.ts +14 -1
- package/src/__tests__/kcwikiData.spec.ts +11 -1
- package/src/__tests__/questCategory.spec.ts +4 -4
- package/src/components/QuestCard/MinimalQuestCard.tsx +11 -14
- package/src/components/QuestCard/index.tsx +86 -55
- package/src/components/QuestCard/styles.ts +17 -0
- package/src/components/QuestList.tsx +3 -6
- package/src/components/{PreTaskTag.tsx → QuestTag.tsx} +3 -2
- package/src/questHelper.ts +13 -5
- package/src/store/quest.ts +3 -3
- package/src/tags.tsx +172 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -14
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -12
- package/.github/workflows/build.yml +0 -51
- package/.github/workflows/publish.yml +0 -45
- package/.vscode/extensions.json +0 -6
- package/.vscode/settings.json +0 -11
- package/scripts/convertAssets.ts +0 -57
- package/scripts/downloadKcQuestsData.ts +0 -136
- package/scripts/downloadKcanotifyGamedata.ts +0 -132
- package/scripts/downloadSprites.ts +0 -126
- package/scripts/genQuestCategory.ts +0 -58
- package/scripts/proxyFetch.ts +0 -42
- package/scripts/utils.ts +0 -8
- 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.
|
|
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
|
-
"
|
|
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
|
|
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', {
|
|
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,
|
|
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
|
|
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
|
-
<
|
|
86
|
+
<CategoryTags />
|
|
87
|
+
<TypeTags />
|
|
150
88
|
</ToolbarWrapper>
|
|
151
89
|
)
|
|
152
90
|
}
|