poi-plugin-quest-info-2
Advanced tools
Comparing version 0.8.4 to 0.8.5
@@ -15,2 +15,2 @@ import zh_CN from './quests-scn.json' | ||
export const version = '2022042601' | ||
export const version = '2022061801' |
@@ -7,2 +7,2 @@ import zh_CN from './quests-scn.json' | ||
export const version = '148476742357a844acd8fd6ca11723711fd4217d' | ||
export const version = '9e40dc8e52e658d7b57356703dae2a4fab7dd950' |
[ | ||
"315", | ||
"356", | ||
"357", | ||
"932", | ||
@@ -10,3 +11,7 @@ "971", | ||
"975", | ||
"1114" | ||
"976", | ||
"977", | ||
"978", | ||
"1114", | ||
"1115" | ||
] |
@@ -3568,3 +3568,4 @@ { | ||
"post": [ | ||
"B86" | ||
"B86", | ||
"B180" | ||
] | ||
@@ -4096,3 +4097,4 @@ }, | ||
"post": [ | ||
"Bq13" | ||
"Bq13", | ||
"By11" | ||
] | ||
@@ -4556,4 +4558,11 @@ }, | ||
}, | ||
"973": { | ||
"pre": [ | ||
"B141" | ||
], | ||
"post": [] | ||
}, | ||
"974": { | ||
"pre": [ | ||
"B79", | ||
"By1" | ||
@@ -4571,2 +4580,16 @@ ], | ||
}, | ||
"976": { | ||
"pre": [ | ||
"F109" | ||
], | ||
"post": [ | ||
"B182" | ||
] | ||
}, | ||
"977": { | ||
"pre": [ | ||
"B181" | ||
], | ||
"post": [] | ||
}, | ||
"1101": { | ||
@@ -4621,3 +4644,9 @@ "pre": [], | ||
"post": [] | ||
}, | ||
"1115": { | ||
"pre": [], | ||
"post": [ | ||
"B181" | ||
] | ||
} | ||
} |
@@ -333,2 +333,3 @@ { | ||
356, | ||
357, | ||
401, | ||
@@ -599,2 +600,5 @@ 405, | ||
974, | ||
976, | ||
977, | ||
978, | ||
1101, | ||
@@ -609,4 +613,5 @@ 1102, | ||
1113, | ||
1114 | ||
1114, | ||
1115 | ||
] | ||
} |
@@ -248,2 +248,3 @@ { | ||
"C65": 356, | ||
"C66": 357, | ||
"D1": 401, | ||
@@ -581,2 +582,5 @@ "D2": 402, | ||
"By12": 975, | ||
"B181": 976, | ||
"B182": 977, | ||
"B183": 978, | ||
"F96": 1101, | ||
@@ -595,3 +599,4 @@ "F97": 1102, | ||
"F107": 1113, | ||
"F108": 1114 | ||
"F108": 1114, | ||
"F109": 1115 | ||
} |
{ | ||
"name": "poi-plugin-quest-info-2", | ||
"version": "0.8.4", | ||
"version": "0.8.5", | ||
"private": false, | ||
@@ -39,3 +39,4 @@ "description": "show quest info", | ||
"react-use": "^17.3.1", | ||
"react-virtualized": "^9.22.3" | ||
"react-virtualized-auto-sizer": "^1.0.6", | ||
"react-window": "^1.8.7" | ||
}, | ||
@@ -51,3 +52,4 @@ "devDependencies": { | ||
"@types/pangu": "^3.3.0", | ||
"@types/react-virtualized": "^9.21.11", | ||
"@types/react-virtualized-auto-sizer": "^1.0.1", | ||
"@types/react-window": "^1.8.5", | ||
"@types/sharp": "^0.27.1", | ||
@@ -54,0 +56,0 @@ "@types/styled-components": "^5.1.7", |
import { version, QuestData } from '../../build/kcanotifyGamedata' | ||
test('should Kcanotify Game data version correct', () => { | ||
expect(version).toMatchInlineSnapshot(`"2022042601"`) | ||
expect(version).toMatchInlineSnapshot(`"2022061801"`) | ||
}) | ||
@@ -6,0 +6,0 @@ |
@@ -7,3 +7,3 @@ import { version, KcwikiQuestData } from '../../build/kcQuestsData' | ||
expect(version).toMatchInlineSnapshot( | ||
`"148476742357a844acd8fd6ca11723711fd4217d"` | ||
`"9e40dc8e52e658d7b57356703dae2a4fab7dd950"` | ||
) | ||
@@ -10,0 +10,0 @@ }) |
@@ -12,3 +12,3 @@ import questCategory from '../../build/questCategory.json' | ||
expect(questCategory.yearlyQuest.length).toMatchInlineSnapshot(`39`) | ||
expect(questCategory.singleQuest.length).toMatchInlineSnapshot(`480`) | ||
expect(questCategory.singleQuest.length).toMatchInlineSnapshot(`485`) | ||
}) | ||
@@ -15,0 +15,0 @@ |
@@ -27,6 +27,8 @@ import { useEffect, useState } from 'react' | ||
const emptyArray = [] as GameQuest[] | ||
export const useGameQuest = () => { | ||
const [quests, setQuests] = useState<GameQuest[]>([]) | ||
useEffect(() => { | ||
const listener = (quests: GameQuest[] | null) => setQuests(quests ?? []) | ||
const listener = (quests: GameQuest[] | null) => | ||
setQuests(quests ?? emptyArray) | ||
// See reducer.ts | ||
@@ -33,0 +35,0 @@ return observePluginStore(listener, (i) => i?._?.questList) |
import { name as PACKAGE_NAME } from '../../package.json' | ||
import type { PluginState } from '../reducer' | ||
import { IN_POI, importFromPoi } from './env' | ||
import { id, noop } from '../utils' | ||
import { importFromPoi, IN_POI } from './env' | ||
import type { PoiState, Store } from './types' | ||
const noop = () => {} | ||
const id = <T>(x: T) => x | ||
/** | ||
@@ -10,0 +8,0 @@ * See https://redux.js.org/api/store#subscribelistener |
import { useCallback } from 'react' | ||
import { useGameQuest, usePluginTranslation } from '../poi/hooks' | ||
import { usePluginTranslation } from '../poi/hooks' | ||
import { | ||
@@ -14,2 +14,3 @@ DocQuest, | ||
} from '../questHelper' | ||
import { useGlobalGameQuest } from './gameQuest' | ||
import { checkIsKcwikiSupportedLanguages, useKcwikiData } from './kcwiki' | ||
@@ -55,3 +56,3 @@ import { useStore, useSyncWithGame } from './store' | ||
const docQuestMap = useQuestMap() | ||
const gameQuest = useGameQuest() | ||
const gameQuest = useGlobalGameQuest() | ||
const { syncWithGame } = useSyncWithGame() | ||
@@ -106,3 +107,3 @@ | ||
export const useQuestStatus = (gameId: number | null) => { | ||
const gameQuest = useGameQuest() | ||
const gameQuest = useGlobalGameQuest() | ||
@@ -109,0 +110,0 @@ if (!gameId) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1631787
61
33204
4
34
+ Addedreact-window@^1.8.7
+ Addedmemoize-one@5.2.1(transitive)
+ Addedreact-virtualized-auto-sizer@1.0.25(transitive)
+ Addedreact-window@1.8.11(transitive)
- Removedreact-virtualized@^9.22.3
- Removedclsx@1.2.1(transitive)
- Removeddom-helpers@5.2.1(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedloose-envify@1.4.0(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedprop-types@15.8.1(transitive)
- Removedreact-is@16.13.1(transitive)
- Removedreact-lifecycles-compat@3.0.4(transitive)
- Removedreact-virtualized@9.22.6(transitive)