Split toolbox storage by module

This commit is contained in:
Shinuwa 2026-08-14 09:45:48 +02:00
parent 97253acb00
commit 588c1298cd
18 changed files with 1248 additions and 1180 deletions

View file

@ -11,6 +11,10 @@ test("toolbox storage, cards and pages are wired", async () => {
const toolboxPages = await readFile("website/src/features/toolboxes/ToolboxPages.jsx", "utf8");
const toolboxActions = await readFile("website/src/features/toolboxes/useToolboxActions.js", "utf8");
const toolboxStorage = await readFile("website/src/features/toolboxes/storage/toolboxStorage.js", "utf8");
const storageCompactorRegistry = await readFile("website/src/features/toolboxes/storage/modules/index.js", "utf8");
const checklistStorage = await readFile("website/src/features/toolboxes/storage/modules/checklist.js", "utf8");
const timerStorage = await readFile("website/src/features/toolboxes/storage/modules/timer.js", "utf8");
const equipmentStorage = await readFile("website/src/features/toolboxes/storage/modules/equipmentPlanner.js", "utf8");
const indexedToolboxesHook = await readFile("website/src/features/toolboxes/storage/useIndexedToolboxes.js", "utf8");
const storageQuota = await readFile("website/src/components/StorageQuota.jsx", "utf8");
const importButton = await readFile("website/src/components/ImportButton.jsx", "utf8");
@ -31,25 +35,27 @@ test("toolbox storage, cards and pages are wired", async () => {
assert.match(toolboxStorage, /TOOLBOX_ICON_FILES/);
assert.match(toolboxStorage, /export function normalizeToolboxIcon/);
assert.match(toolboxStorage, /export function createGlobalExportPayload/);
assert.match(toolboxStorage, /qtyTarget/);
assert.match(toolboxStorage, /qtyCurrent/);
assert.match(toolboxStorage, /hideCompletedSections/);
assert.match(toolboxStorage, /hideCompletedSectionsFully/);
assert.match(toolboxStorage, /hideWhenComplete/);
assert.match(toolboxStorage, /collapsed/);
assert.match(checklistStorage, /qtyTarget/);
assert.match(checklistStorage, /qtyCurrent/);
assert.match(checklistStorage, /hideCompletedSections/);
assert.match(checklistStorage, /hideCompletedSectionsFully/);
assert.match(checklistStorage, /hideWhenComplete/);
assert.match(equipmentStorage, /collapsed/);
assert.match(toolboxStorage, /module\.scrollable/);
assert.match(toolboxStorage, /export function normalizeLinksData/);
assert.match(toolboxStorage, /export function normalizeCountersData/);
assert.match(toolboxStorage, /export function normalizeCombosData/);
assert.match(toolboxStorage, /export function normalizeCalculatorData/);
assert.match(toolboxStorage, /export function normalizeTableData/);
assert.match(toolboxStorage, /export function normalizeTimerData/);
assert.match(toolboxStorage, /export function normalizeTaskPlannerData/);
assert.match(toolboxStorage, /export function normalizeEquipmentPlannerData/);
assert.match(toolboxStorage, /export function summarizeEquipmentPlannerData/);
assert.match(toolboxStorage, /export function normalizeImageAnnotationData/);
assert.match(toolboxStorage, /normalizeLinksData/);
assert.match(toolboxStorage, /normalizeCountersData/);
assert.match(toolboxStorage, /normalizeCombosData/);
assert.match(toolboxStorage, /normalizeCalculatorData/);
assert.match(toolboxStorage, /normalizeTableData/);
assert.match(toolboxStorage, /normalizeTimerData/);
assert.match(toolboxStorage, /normalizeTaskPlannerData/);
assert.match(toolboxStorage, /normalizeEquipmentPlannerData/);
assert.match(toolboxStorage, /summarizeEquipmentPlannerData/);
assert.match(toolboxStorage, /normalizeImageAnnotationData/);
assert.match(toolboxStorage, /export function compactModuleDataForStorage\(type, value\)/);
assert.match(toolboxStorage, /scrollResults/);
assert.match(storageCompactorRegistry, /export const MODULE_DATA_COMPACTORS/);
assert.match(storageCompactorRegistry, /timer: compactTimerDataForStorage/);
assert.match(timerStorage, /scrollResults/);
assert.match(toolboxCard, /DEFAULT_TOOLBOX_ICON/);
assert.match(toolboxCard, /export function ToolboxCard/);
assert.match(toolboxCard, /export function ToolboxIconPicker/);