Split dailyShare.js and document the shared exported functions with JSDoc

dailyShare.js held fillTemplate and formatCountdown, used across the whole TCG,
under a Daily Card name. They now live in textFormat.js at the root, and the
Daily Card helpers in daily/dailyFormat.js.

173 exported functions that other files call now explain what they return and
how they treat missing values: the server game rules, the toolbox storage chain,
the shared hooks and utilities, and the TCG display helpers. website/AGENTS.md
asks the same of new shared functions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-12-01 13:32:20 +01:00
parent 166790245f
commit aa8bb1ebaa
71 changed files with 339 additions and 57 deletions

View file

@ -204,10 +204,12 @@ export const LIBRARY_CATEGORY_DEFINITIONS = [
{ key: "buildsCommands", types: ["combos", "equipmentPlanner"] }
];
/** Définition d'un type d'outil (titre, catégorie, chargeur…). Un type inconnu retombe sur le Bloc-notes au lieu de casser la page. */
export function getToolboxModuleDefinition(type) {
return TOOLBOX_MODULE_DEFINITIONS[type] || TOOLBOX_MODULE_DEFINITIONS.notepad;
}
/** Titre donné à un nouvel outil de ce type. */
export function getDefaultModuleTitle(type) {
return getToolboxModuleDefinition(type).defaultTitle || "Outil";
}