Group Sokko TCG's interface files by Guild quest and card rendering
The 48 files of the Daily Card, Expeditions, Daily Team and race, Broken Mirror and card rendering move to daily/, expeditions/, team/, mirror/ and rendering/ under website/src/features/cards, with every relative import rewritten. The root keeps the page, server calls, cache and the player sections outside the Guild. The cards README, the quest recipe and the current docs follow the new paths; dated audits and plans keep theirs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
863050437f
commit
88c7bf8317
74 changed files with 165 additions and 161 deletions
|
|
@ -513,3 +513,5 @@
|
||||||
{"id":"int-11ad94ef2f5ed49c12f125c82555574c","kind":"field_change","created_at":"2026-12-01T09:59:58.276719069Z","actor":"Shinuwa","issue_id":"sokko-g-gi3j.5","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"En-têtes complétés pour 23 fichiers du socle : server.mjs, vite.config.js, services/http.js, services/shares/*, main.jsx, routeur, hooks partagés, scripts (Usage et @see), script de livraison."}}
|
{"id":"int-11ad94ef2f5ed49c12f125c82555574c","kind":"field_change","created_at":"2026-12-01T09:59:58.276719069Z","actor":"Shinuwa","issue_id":"sokko-g-gi3j.5","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"En-têtes complétés pour 23 fichiers du socle : server.mjs, vite.config.js, services/http.js, services/shares/*, main.jsx, routeur, hooks partagés, scripts (Usage et @see), script de livraison."}}
|
||||||
{"id":"int-a03bb2f3bdfc920874c5b9a5e64968b9","kind":"field_change","created_at":"2026-12-01T10:22:36.604467848Z","actor":"Shinuwa","issue_id":"sokko-g-gi3j.6","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"tests/file-headers.test.mjs : en-tête @file partout, Utilisé par + @see au-delà de 300 lignes (hors tests), Utilisé par pour CENTRAL_FILES, mention d'Object.assign pour les fichiers de méthodes. 11 fichiers complétés, plus de liste d'attente. Règles documentées dans website/AGENTS.md."}}
|
{"id":"int-a03bb2f3bdfc920874c5b9a5e64968b9","kind":"field_change","created_at":"2026-12-01T10:22:36.604467848Z","actor":"Shinuwa","issue_id":"sokko-g-gi3j.6","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"tests/file-headers.test.mjs : en-tête @file partout, Utilisé par + @see au-delà de 300 lignes (hors tests), Utilisé par pour CENTRAL_FILES, mention d'Object.assign pour les fichiers de méthodes. 11 fichiers complétés, plus de liste d'attente. Règles documentées dans website/AGENTS.md."}}
|
||||||
{"id":"int-638e75aec5f3dd5b521461ba4f868536","kind":"field_change","created_at":"2026-12-01T10:22:47.021612849Z","actor":"Shinuwa","issue_id":"sokko-g-afbw","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"tests/toolbox-compactors.test.mjs compare TOOLBOX_MODULE_DEFINITIONS et MODULE_DATA_COMPACTORS dans les deux sens."}}
|
{"id":"int-638e75aec5f3dd5b521461ba4f868536","kind":"field_change","created_at":"2026-12-01T10:22:47.021612849Z","actor":"Shinuwa","issue_id":"sokko-g-afbw","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"tests/toolbox-compactors.test.mjs compare TOOLBOX_MODULE_DEFINITIONS et MODULE_DATA_COMPACTORS dans les deux sens."}}
|
||||||
|
{"id":"int-c5219f53ca832727daa95d5bae0fc952","kind":"field_change","created_at":"2026-12-01T10:34:51.626561314Z","actor":"Shinuwa","issue_id":"sokko-g-gi3j.7","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Docs datés rangés dans docs/audits et docs/plans, DESIGN_SYSTEM.md renuméroté ; features/cards en sous-dossiers daily, expeditions, team, mirror, rendering (48 fichiers, imports réécrits). services/cards et styles laissés à plat (recommandation acceptée). check et check:cards réussis."}}
|
||||||
|
{"id":"int-d7d379789f25b5fac9b9bf99c03dcce8","kind":"field_change","created_at":"2026-12-01T10:35:12.426447199Z","actor":"Shinuwa","issue_id":"sokko-g-gi3j","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Phases 1 à 4 terminées : documentation d'architecture, en-têtes JSDoc en trois niveaux, garde-fous dans les tests, rangement des docs et de features/cards."}}
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ l'exemple complet à suivre. Une quête touche ces fichiers :
|
||||||
| Base | nouvelle migration à la fin de `MIGRATIONS` (`database.js`) |
|
| Base | nouvelle migration à la fin de `MIGRATIONS` (`database.js`) |
|
||||||
| API | routes dans `services/cards/api.js` |
|
| API | routes dans `services/cards/api.js` |
|
||||||
| Client | fonctions dans `website/src/features/cards/cardsApi.js` |
|
| Client | fonctions dans `website/src/features/cards/cardsApi.js` |
|
||||||
| Interface joueur | `<Quête>Panel.jsx`, section dans `CardsPage.jsx` (`SUBSECTION_PARENTS`), tuile dans `GuildPanel.jsx` et `guildQuests.js` |
|
| Interface joueur | un sous-dossier `website/src/features/cards/<quête>/` avec `<Quête>Panel.jsx`, section dans `CardsPage.jsx` (`SUBSECTION_PARENTS`), tuile dans `GuildPanel.jsx` et `guildQuests.js` |
|
||||||
| Administration | `admin/<Quête>Settings.jsx`, entrée dans `admin/AdminGuild.jsx` et `admin/guildQuests.js` |
|
| Administration | `admin/<Quête>Settings.jsx`, entrée dans `admin/AdminGuild.jsx` et `admin/guildQuests.js` |
|
||||||
| Textes et images | `site.json`, `website/public/static/img/cards/guild/quest-<quête>.webp` |
|
| Textes et images | `site.json`, `website/public/static/img/cards/guild/quest-<quête>.webp` |
|
||||||
| Styles | `website/src/styles/_nebula-<quête>.scss`, ajouté à `cards-route.scss` |
|
| Styles | `website/src/styles/_nebula-<quête>.scss`, ajouté à `cards-route.scss` |
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ de style aux autres.
|
||||||
|
|
||||||
- Fichier : `website/public/static/img/expeditions/items/<nom>.webp` (nom en kebab-case : `guide-star`, `sky-chart`), 600 × 500 px, fond transparent, objet centré avec une
|
- Fichier : `website/public/static/img/expeditions/items/<nom>.webp` (nom en kebab-case : `guide-star`, `sky-chart`), 600 × 500 px, fond transparent, objet centré avec une
|
||||||
marge d'environ 8 % (le Sac l'affiche en 96 px de haut, et en 64 px sur téléphone).
|
marge d'environ 8 % (le Sac l'affiche en 96 px de haut, et en 64 px sur téléphone).
|
||||||
- Puis ajouter l'objet à `ITEM_ART` dans `website/src/features/cards/expeditionFormat.js` ; sans entrée, le Sac affiche
|
- Puis ajouter l'objet à `ITEM_ART` dans `website/src/features/cards/expeditions/expeditionFormat.js` ; sans entrée, le Sac affiche
|
||||||
l'icône générique des objets. Les sept objets ci-dessous sont livrés (novembre 2026).
|
l'icône générique des objets. Les sept objets ci-dessous sont livrés (novembre 2026).
|
||||||
|
|
||||||
| Objet | `id` |
|
| Objet | `id` |
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ Chaque mécanique suit le même découpage :
|
||||||
indices de la Carte du jour sont dans `content/`, jamais envoyés en entier au
|
indices de la Carte du jour sont dans `content/`, jamais envoyés en entier au
|
||||||
navigateur.
|
navigateur.
|
||||||
- **Règles partagées avec le navigateur.** `race-rules.js` est aussi importé par
|
- **Règles partagées avec le navigateur.** `race-rules.js` est aussi importé par
|
||||||
l'interface (`website/src/features/cards/raceRun.js`, `RaceLive.jsx`) : il ne
|
l'interface (`website/src/features/cards/team/raceRun.js`, `team/RaceLive.jsx`) : il ne
|
||||||
doit importer aucun module Node (`node:*`).
|
doit importer aucun module Node (`node:*`).
|
||||||
- **Valeurs par défaut des réglages.** Les réglages (Expéditions, Équipe, Miroir,
|
- **Valeurs par défaut des réglages.** Les réglages (Expéditions, Équipe, Miroir,
|
||||||
boutique, recharge) sont stockés en base. Changer un défaut dans le code ne
|
boutique, recharge) sont stockés en base. Changer un défaut dans le code ne
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,11 @@
|
||||||
import assert from "node:assert/strict";
|
import assert from "node:assert/strict";
|
||||||
import { readFile } from "node:fs/promises";
|
import { readFile } from "node:fs/promises";
|
||||||
import test from "node:test";
|
import test from "node:test";
|
||||||
import { flareEditionFields, flareOfEdition, MATCH_HOLO_FLARE_PALETTE, NO_FLARE, resolveFlare, sameFlare } from "../website/src/features/cards/holoFlares.js";
|
import { flareEditionFields, flareOfEdition, MATCH_HOLO_FLARE_PALETTE, NO_FLARE, resolveFlare, sameFlare } from "../website/src/features/cards/rendering/holoFlares.js";
|
||||||
import { boltGeometry, boltPath, TARGET_ZONE } from "../website/src/features/cards/holoLightning.js";
|
import { boltGeometry, boltPath, TARGET_ZONE } from "../website/src/features/cards/rendering/holoLightning.js";
|
||||||
import { canvasBacking, motifAngle } from "../website/src/features/cards/flareSprites.js";
|
import { canvasBacking, motifAngle } from "../website/src/features/cards/rendering/flareSprites.js";
|
||||||
import { FIREFLY_COUNTS, fireflyFade, fireflyHeading } from "../website/src/features/cards/holoFireflies.js";
|
import { FIREFLY_COUNTS, fireflyFade, fireflyHeading } from "../website/src/features/cards/rendering/holoFireflies.js";
|
||||||
import { TWINKLE_COUNTS, twinkleState } from "../website/src/features/cards/holoTwinkle.js";
|
import { TWINKLE_COUNTS, twinkleState } from "../website/src/features/cards/rendering/holoTwinkle.js";
|
||||||
|
|
||||||
const catalog = JSON.parse(await readFile(new URL("../website/public/data/cards/catalog.json", import.meta.url), "utf8"));
|
const catalog = JSON.parse(await readFile(new URL("../website/public/data/cards/catalog.json", import.meta.url), "utf8"));
|
||||||
const seeded = (seed = 7) => () => { seed = (seed * 16807) % 2147483647; return seed / 2147483647; };
|
const seeded = (seed = 7) => () => { seed = (seed * 16807) % 2147483647; return seed / 2147483647; };
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import { computeStreak, dailyCandidates, dailyCrop, dailyDayKey, dailyZoom, draw
|
||||||
import { answerClues, canUseDailyHint, compareClues, DAILY_HINTS, dailyCluesIssues, dailyHintCredits, loadDailyClues, nameShape, partialDescription, prepareDailyClues } from "../services/cards/daily-clues.js";
|
import { answerClues, canUseDailyHint, compareClues, DAILY_HINTS, dailyCluesIssues, dailyHintCredits, loadDailyClues, nameShape, partialDescription, prepareDailyClues } from "../services/cards/daily-clues.js";
|
||||||
import { CardsDatabase } from "../services/cards/database.js";
|
import { CardsDatabase } from "../services/cards/database.js";
|
||||||
import { CardsService } from "../services/cards/service.js";
|
import { CardsService } from "../services/cards/service.js";
|
||||||
import { dailyKnowledge, dailyVerdict } from "../website/src/features/cards/dailyKnowledge.js";
|
import { dailyKnowledge, dailyVerdict } from "../website/src/features/cards/daily/dailyKnowledge.js";
|
||||||
|
|
||||||
const baseCatalog = prepareVersionedCatalog(JSON.parse(await readFile("website/public/data/cards/catalog.json", "utf8")));
|
const baseCatalog = prepareVersionedCatalog(JSON.parse(await readFile("website/public/data/cards/catalog.json", "utf8")));
|
||||||
const ACTIVE_STATES = [{ collectionId: "primordial-nebula", active: true }, { collectionId: "dream-arcade", active: false }];
|
const ACTIVE_STATES = [{ collectionId: "primordial-nebula", active: true }, { collectionId: "dream-arcade", active: false }];
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import { buildPublishedCatalog, prepareVersionedCatalog } from "../services/card
|
||||||
import { CardsDatabase } from "../services/cards/database.js";
|
import { CardsDatabase } from "../services/cards/database.js";
|
||||||
import { STAT_IDS } from "../services/cards/expedition-rules.js";
|
import { STAT_IDS } from "../services/cards/expedition-rules.js";
|
||||||
import { applyBoost, autoRun, bestBoosts, bestRunner, boostsError, canBoost, drawZones, MAX_RACE_MS, placeOf, RACE_STATS, replayRun, startRun, stepRun, ZONE_COUNT } from "../services/cards/race-rules.js";
|
import { applyBoost, autoRun, bestBoosts, bestRunner, boostsError, canBoost, drawZones, MAX_RACE_MS, placeOf, RACE_STATS, replayRun, startRun, stepRun, ZONE_COUNT } from "../services/cards/race-rules.js";
|
||||||
import { raceReview } from "../website/src/features/cards/raceRun.js";
|
import { raceReview } from "../website/src/features/cards/team/raceRun.js";
|
||||||
import { CardsService } from "../services/cards/service.js";
|
import { CardsService } from "../services/cards/service.js";
|
||||||
import { canRevealStar, chooseCharacter, companionStats, DEFAULT_TEAM_SETTINGS, drawOffer, hiddenStars, inventTeam, keepCompanion, lentCharacters, MIN_SPECIALISTS, OFFER_SIZE, profileKey, recruitmentFinished, rerollOffer, revealStar, specialtiesOf, startRecruitment, TEAM_SIZE, teamCharacters, teamDay, teamSettingsError, visibleSky, WATCHER_TEAM_LEVELS } from "../services/cards/team-rules.js";
|
import { canRevealStar, chooseCharacter, companionStats, DEFAULT_TEAM_SETTINGS, drawOffer, hiddenStars, inventTeam, keepCompanion, lentCharacters, MIN_SPECIALISTS, OFFER_SIZE, profileKey, recruitmentFinished, rerollOffer, revealStar, specialtiesOf, startRecruitment, TEAM_SIZE, teamCharacters, teamDay, teamSettingsError, visibleSky, WATCHER_TEAM_LEVELS } from "../services/cards/team-rules.js";
|
||||||
import { DEFAULT_DAILY_TEAM_SETTINGS, dailyTeamSettingsError, readDailyTeamSettings } from "../services/cards/team-settings.js";
|
import { DEFAULT_DAILY_TEAM_SETTINGS, dailyTeamSettingsError, readDailyTeamSettings } from "../services/cards/team-settings.js";
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import { spawnSync } from "node:child_process";
|
||||||
import { assertVersionedCatalogScope, buildPublishedCatalog, drawableRarities, publicCatalog, prepareVersionedCatalog, validateCardsCatalog, withGeneratedFinishes, missingFinishFiles } from "../services/cards/catalog.js";
|
import { assertVersionedCatalogScope, buildPublishedCatalog, drawableRarities, publicCatalog, prepareVersionedCatalog, validateCardsCatalog, withGeneratedFinishes, missingFinishFiles } from "../services/cards/catalog.js";
|
||||||
import { INITIAL_COLLECTION_STATES, INITIAL_DROP_RATES, INITIAL_RECHARGE_SETTING, INITIAL_SHOP_SETTING } from "../services/cards/admin-seed.js";
|
import { INITIAL_COLLECTION_STATES, INITIAL_DROP_RATES, INITIAL_RECHARGE_SETTING, INITIAL_SHOP_SETTING } from "../services/cards/admin-seed.js";
|
||||||
import { planRecycling } from "../services/cards/stardust.js";
|
import { planRecycling } from "../services/cards/stardust.js";
|
||||||
import { resolveMythicOpeningStyle, resolveOpeningEffect } from "../website/src/features/cards/openingEffects.js";
|
import { resolveMythicOpeningStyle, resolveOpeningEffect } from "../website/src/features/cards/rendering/openingEffects.js";
|
||||||
import { summarizeReward } from "../website/src/features/cards/rewardText.js";
|
import { summarizeReward } from "../website/src/features/cards/rewardText.js";
|
||||||
import { CardsDatabase, MIGRATIONS } from "../services/cards/database.js";
|
import { CardsDatabase, MIGRATIONS } from "../services/cards/database.js";
|
||||||
import { calculateRecharge, drawPack, drawShopPack } from "../services/cards/game-rules.js";
|
import { calculateRecharge, drawPack, drawShopPack } from "../services/cards/game-rules.js";
|
||||||
|
|
|
||||||
|
|
@ -18,16 +18,16 @@ import { useEffect, useRef, useState } from "react";
|
||||||
import { Modal } from "../../components/Modal.jsx";
|
import { Modal } from "../../components/Modal.jsx";
|
||||||
import { Tabs } from "../../components/Tabs.jsx";
|
import { Tabs } from "../../components/Tabs.jsx";
|
||||||
import { recycleDuplicates, setFavorite, upgradeCard } from "./cardsApi.js";
|
import { recycleDuplicates, setFavorite, upgradeCard } from "./cardsApi.js";
|
||||||
import { AwakeningPicker } from "./AwakeningPicker.jsx";
|
import { AwakeningPicker } from "./expeditions/AwakeningPicker.jsx";
|
||||||
import { CardPlan } from "./CardPlan.jsx";
|
import { CardPlan } from "./expeditions/CardPlan.jsx";
|
||||||
import { frenchList, rarityAdjective } from "./rarityWords.js";
|
import { frenchList, rarityAdjective } from "./rarityWords.js";
|
||||||
import { CurrencyAmount, CurrencyIcon } from "./Currency.jsx";
|
import { CurrencyAmount, CurrencyIcon } from "./Currency.jsx";
|
||||||
import { readCollection } from "./collectionState.js";
|
import { readCollection } from "./collectionState.js";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "./dailyShare.js";
|
||||||
import { MaskIcon, StatValue } from "./ExpeditionLabels.jsx";
|
import { MaskIcon, StatValue } from "./expeditions/ExpeditionLabels.jsx";
|
||||||
import { PowerEffects } from "./ExpeditionOutcome.jsx";
|
import { PowerEffects } from "./expeditions/ExpeditionOutcome.jsx";
|
||||||
import { NebulaCard } from "./NebulaCard.jsx";
|
import { NebulaCard } from "./rendering/NebulaCard.jsx";
|
||||||
import { formatEclats, powerText, tagLabel } from "./expeditionFormat.js";
|
import { formatEclats, powerText, tagLabel } from "./expeditions/expeditionFormat.js";
|
||||||
import { formatStardust } from "./stardustFormat.js";
|
import { formatStardust } from "./stardustFormat.js";
|
||||||
|
|
||||||
const STAT_IDS = ["bravoure", "endurance", "fortune", "orientation"];
|
const STAT_IDS = ["bravoure", "endurance", "fortune", "orientation"];
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import { CardDetailModal } from "./CardDetailModal.jsx";
|
||||||
import { DashboardAside, DashboardStat } from "./CardsDashboard.jsx";
|
import { DashboardAside, DashboardStat } from "./CardsDashboard.jsx";
|
||||||
import { DailyTip } from "./DailyTip.jsx";
|
import { DailyTip } from "./DailyTip.jsx";
|
||||||
import { readCollection } from "./collectionState.js";
|
import { readCollection } from "./collectionState.js";
|
||||||
import { NebulaCard } from "./NebulaCard.jsx";
|
import { NebulaCard } from "./rendering/NebulaCard.jsx";
|
||||||
import { OpeningReserve } from "./OpeningReserve.jsx";
|
import { OpeningReserve } from "./OpeningReserve.jsx";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "./dailyShare.js";
|
||||||
import { pendingQuestCount } from "./guildQuests.js";
|
import { pendingQuestCount } from "./guildQuests.js";
|
||||||
|
|
|
||||||
|
|
@ -28,18 +28,18 @@ import { deleteCardsAccount, devLogin, loadCardsSession, loadCardsState, logoutC
|
||||||
import { CardsAccount, CardsDashboardLayout } from "./CardsDashboard.jsx";
|
import { CardsAccount, CardsDashboardLayout } from "./CardsDashboard.jsx";
|
||||||
import { CardsHomePanel } from "./CardsHomePanel.jsx";
|
import { CardsHomePanel } from "./CardsHomePanel.jsx";
|
||||||
import { CollectionPanel } from "./CollectionPanel.jsx";
|
import { CollectionPanel } from "./CollectionPanel.jsx";
|
||||||
import { DailyPanel } from "./DailyPanel.jsx";
|
import { DailyPanel } from "./daily/DailyPanel.jsx";
|
||||||
import { ExpeditionsPanel } from "./ExpeditionsPanel.jsx";
|
import { ExpeditionsPanel } from "./expeditions/ExpeditionsPanel.jsx";
|
||||||
import { HistoryPanel } from "./HistoryPanel.jsx";
|
import { HistoryPanel } from "./HistoryPanel.jsx";
|
||||||
import { PackPanel } from "./PackPanel.jsx";
|
import { PackPanel } from "./PackPanel.jsx";
|
||||||
import { publishCardsReserve } from "./cardsReserve.js";
|
import { publishCardsReserve } from "./cardsReserve.js";
|
||||||
import { PrivacyNotice } from "./PrivacyNotice.jsx";
|
import { PrivacyNotice } from "./PrivacyNotice.jsx";
|
||||||
import { GuildPanel } from "./GuildPanel.jsx";
|
import { GuildPanel } from "./GuildPanel.jsx";
|
||||||
import { pendingQuestCount } from "./guildQuests.js";
|
import { pendingQuestCount } from "./guildQuests.js";
|
||||||
import { MirrorPanel } from "./MirrorPanel.jsx";
|
import { MirrorPanel } from "./mirror/MirrorPanel.jsx";
|
||||||
import { RacePanel } from "./RacePanel.jsx";
|
import { RacePanel } from "./team/RacePanel.jsx";
|
||||||
import { ShopPanel } from "./ShopPanel.jsx";
|
import { ShopPanel } from "./ShopPanel.jsx";
|
||||||
import { TeamPanel } from "./TeamPanel.jsx";
|
import { TeamPanel } from "./team/TeamPanel.jsx";
|
||||||
import { TransfersPanel } from "./TransfersPanel.jsx";
|
import { TransfersPanel } from "./TransfersPanel.jsx";
|
||||||
|
|
||||||
// Le jeu, puis l'économie et les échanges, puis le journal : mêmes groupes séparés par un filet que l'administration.
|
// Le jeu, puis l'économie et les échanges, puis le journal : mêmes groupes séparés par un filet que l'administration.
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import { CardsFilterMenu } from "./CardsFilterMenu.jsx";
|
||||||
import { DashboardAside } from "./CardsDashboard.jsx";
|
import { DashboardAside } from "./CardsDashboard.jsx";
|
||||||
import { recycleDuplicates } from "./cardsApi.js";
|
import { recycleDuplicates } from "./cardsApi.js";
|
||||||
import { readCollection, visibleCollections } from "./collectionState.js";
|
import { readCollection, visibleCollections } from "./collectionState.js";
|
||||||
import { NebulaCard } from "./NebulaCard.jsx";
|
import { NebulaCard } from "./rendering/NebulaCard.jsx";
|
||||||
import { StardustBalance } from "./Currency.jsx";
|
import { StardustBalance } from "./Currency.jsx";
|
||||||
import { formatStardust } from "./stardustFormat.js";
|
import { formatStardust } from "./stardustFormat.js";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "./dailyShare.js";
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
* page.
|
* page.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { formatEclats } from "./expeditionFormat.js";
|
import { formatEclats } from "./expeditions/expeditionFormat.js";
|
||||||
import { formatStardust } from "./stardustFormat.js";
|
import { formatStardust } from "./stardustFormat.js";
|
||||||
|
|
||||||
const ICONS = { stardust: "/static/icons/stardust.svg", eclats: "/static/icons/eclat.svg" };
|
const ICONS = { stardust: "/static/icons/stardust.svg", eclats: "/static/icons/eclat.svg" };
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,9 @@
|
||||||
|
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { fillTemplate, formatStreak } from "./dailyShare.js";
|
import { fillTemplate, formatStreak } from "./dailyShare.js";
|
||||||
import { expeditionQuestStatus } from "./expeditionFormat.js";
|
import { expeditionQuestStatus } from "./expeditions/expeditionFormat.js";
|
||||||
import { guildGreeting, guildQuests, mirrorDone, questDone } from "./guildQuests.js";
|
import { guildGreeting, guildQuests, mirrorDone, questDone } from "./guildQuests.js";
|
||||||
import { TeamTable } from "./TeamTable.jsx";
|
import { TeamTable } from "./team/TeamTable.jsx";
|
||||||
|
|
||||||
const ART = {
|
const ART = {
|
||||||
hall: "/static/img/cards/guild/hall.webp",
|
hall: "/static/img/cards/guild/hall.webp",
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* achats en boutique.
|
* achats en boutique.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { RarityGlyph } from "./NebulaCard.jsx";
|
import { RarityGlyph } from "./rendering/NebulaCard.jsx";
|
||||||
import { formatStardust } from "./stardustFormat.js";
|
import { formatStardust } from "./stardustFormat.js";
|
||||||
const EVENT_LABELS = {
|
const EVENT_LABELS = {
|
||||||
pack_opened: "Paquet ouvert",
|
pack_opened: "Paquet ouvert",
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import { claimReward, completeOpening, openGiftPack, openPack } from "./cardsApi.js";
|
import { claimReward, completeOpening, openGiftPack, openPack } from "./cardsApi.js";
|
||||||
import { DashboardAside } from "./CardsDashboard.jsx";
|
import { DashboardAside } from "./CardsDashboard.jsx";
|
||||||
import { CollectionCardBack } from "./CollectionCardBack.jsx";
|
import { CollectionCardBack } from "./rendering/CollectionCardBack.jsx";
|
||||||
import { formatPercent, rarityPercentages } from "./dropRates.js";
|
import { formatPercent, rarityPercentages } from "./dropRates.js";
|
||||||
import { NebulaCard } from "./NebulaCard.jsx";
|
import { NebulaCard } from "./rendering/NebulaCard.jsx";
|
||||||
import { OpeningReserve } from "./OpeningReserve.jsx";
|
import { OpeningReserve } from "./OpeningReserve.jsx";
|
||||||
import { packDetails, summarizeReward } from "./rewardText.js";
|
import { packDetails, summarizeReward } from "./rewardText.js";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,30 +19,32 @@ l'ancien nom de code du TCG (voir le glossaire d'[ARCHITECTURE.md](../../../../A
|
||||||
reçu avec la session et l'ajoute à chaque requête d'écriture.
|
reçu avec la session et l'ajoute à chaque requête d'écriture.
|
||||||
3. **`CardsDashboard.jsx`** : cadre commun des tableaux de bord joueur et
|
3. **`CardsDashboard.jsx`** : cadre commun des tableaux de bord joueur et
|
||||||
administration (menu des sections, encart sous le menu).
|
administration (menu des sections, encart sous le menu).
|
||||||
4. **`NebulaCard.jsx`** : rendu d'une carte (inclinaison, finitions
|
4. **`rendering/NebulaCard.jsx`** : rendu d'une carte (inclinaison, finitions
|
||||||
holographiques, animation de révélation), utilisé partout.
|
holographiques, animation de révélation), utilisé partout.
|
||||||
|
|
||||||
## Organisation
|
## Organisation
|
||||||
|
|
||||||
Le dossier est plat ; les préfixes indiquent la mécanique :
|
La racine garde la page, l'état partagé et les sections hors Guilde ; chaque
|
||||||
|
quête de la Guilde et le rendu des cartes ont leur sous-dossier.
|
||||||
|
|
||||||
| Préfixe ou fichier | Mécanique |
|
| Chemin | Contenu |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `CardsHomePanel`, `PackPanel`, `OpeningReserve`, `CollectionPanel`, `CardDetailModal`, `ShopPanel`, `TransfersPanel`, `TransferComposer`, `HistoryPanel`, `AccountPanel`, `PrivacyNotice` | Sections du joueur hors Guilde |
|
| racine : `CardsPage`, `cardsApi.js`, `cardCache.js`, `cardsReserve.js`, `useCardsConfig.js`, `CardsDashboard` | Page, appels au serveur, cache, configuration, cadre des tableaux de bord |
|
||||||
| `GuildPanel`, `guildQuests.js` | Hall de la Guilde et liste des quêtes |
|
| racine : `CardsHomePanel`, `DailyTip`, `PackPanel`, `OpeningReserve`, `CollectionPanel`, `CardDetailModal`, `ShopPanel`, `TransfersPanel`, `TransferComposer`, `HistoryPanel`, `AccountPanel`, `PrivacyNotice` | Sections du joueur hors Guilde (`DailyTip` est l'« Astuce du jour » de l'accueil, pas la Carte du jour) |
|
||||||
| `Daily*`, `daily*.js` | Carte du jour |
|
| racine : `GuildPanel`, `guildQuests.js` | Hall de la Guilde et liste des quêtes |
|
||||||
| `Expedition*`, `expeditionFormat.js`, `CardPlan`, `AwakeningPicker` | Expéditions et amélioration des cartes |
|
| racine : `dailyShare.js`, `stardustFormat.js`, `rarityWords.js`, `rewardText.js`, `collectionState.js`, `dropRates.js`, `Currency.jsx` | Règles d'affichage partagées. `dailyShare.js` contient `fillTemplate` et `formatCountdown`, utilisés partout malgré son nom |
|
||||||
| `Team*`, `teamFormat.js` | Équipe du jour |
|
| `daily/` | Carte du jour |
|
||||||
| `Race*`, `raceRun.js` | Course des courants |
|
| `expeditions/` | Expéditions, amélioration des cartes (`CardPlan`, `AwakeningPicker`), `expeditionFormat.js` |
|
||||||
| `Mirror*`, `mirrorFormat.js` | Miroir brisé |
|
| `team/` | Équipe du jour et Course des courants (`Race*`, `raceRun.js`) |
|
||||||
| `NebulaCard`, `CollectionCardBack`, `holo*.js`, `flareSprites.js`, `openingEffects.js` | Rendu des cartes et effets visuels (Canvas 2D) |
|
| `mirror/` | Miroir brisé |
|
||||||
| `cardCache.js`, `cardsReserve.js`, `useCardsConfig.js`, `collectionState.js` | État partagé et cache |
|
| `rendering/` | `NebulaCard`, dos des collections, particules holographiques (`holo*.js`, Canvas 2D), effets d'ouverture |
|
||||||
| `*Format.js`, `rarityWords.js`, `rewardText.js`, `Currency.jsx` | Mise en forme des textes et nombres |
|
|
||||||
| `admin/` | Administration : `AdminPanel.jsx` (navigation), un fichier par section, `useAdminDashboard.js` (données) |
|
| `admin/` | Administration : `AdminPanel.jsx` (navigation), un fichier par section, `useAdminDashboard.js` (données) |
|
||||||
|
|
||||||
|
Une nouvelle quête de la Guilde reçoit son propre sous-dossier.
|
||||||
|
|
||||||
Les fichiers `*Format.js` ne contiennent que de l'affichage. Les règles du jeu
|
Les fichiers `*Format.js` ne contiennent que de l'affichage. Les règles du jeu
|
||||||
sont sur le serveur ; quand l'interface doit rejouer un calcul (la Course des
|
sont sur le serveur ; quand l'interface doit rejouer un calcul (la Course des
|
||||||
courants dans `raceRun.js` et `RaceLive.jsx`), elle importe directement les
|
courants dans `team/raceRun.js` et `team/RaceLive.jsx`), elle importe directement les
|
||||||
règles pures du serveur (`services/cards/race-rules.js`) au lieu de les recopier.
|
règles pures du serveur (`services/cards/race-rules.js`) au lieu de les recopier.
|
||||||
|
|
||||||
## À savoir avant de modifier
|
## À savoir avant de modifier
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@
|
||||||
import { useRef, useState } from "react";
|
import { useRef, useState } from "react";
|
||||||
import { buyOpening, buyShopItem, buyShopPack, completeOpening, convertStardust } from "./cardsApi.js";
|
import { buyOpening, buyShopItem, buyShopPack, completeOpening, convertStardust } from "./cardsApi.js";
|
||||||
import { DashboardAside } from "./CardsDashboard.jsx";
|
import { DashboardAside } from "./CardsDashboard.jsx";
|
||||||
import { CollectionCardBack } from "./CollectionCardBack.jsx";
|
import { CollectionCardBack } from "./rendering/CollectionCardBack.jsx";
|
||||||
import { EclatsBalance, StardustBalance } from "./Currency.jsx";
|
import { EclatsBalance, StardustBalance } from "./Currency.jsx";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "./dailyShare.js";
|
||||||
import { formatEclats } from "./expeditionFormat.js";
|
import { formatEclats } from "./expeditions/expeditionFormat.js";
|
||||||
import { OpeningStage } from "./PackPanel.jsx";
|
import { OpeningStage } from "./PackPanel.jsx";
|
||||||
import { formatStardust } from "./stardustFormat.js";
|
import { formatStardust } from "./stardustFormat.js";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { useEffect, useMemo, useState } from "react";
|
||||||
import { Modal } from "../../components/Modal.jsx";
|
import { Modal } from "../../components/Modal.jsx";
|
||||||
import { SelectDropdown } from "../../components/SelectDropdown.jsx";
|
import { SelectDropdown } from "../../components/SelectDropdown.jsx";
|
||||||
import { createTransfer, loadTraders } from "./cardsApi.js";
|
import { createTransfer, loadTraders } from "./cardsApi.js";
|
||||||
import { NebulaCard, RarityGlyph } from "./NebulaCard.jsx";
|
import { NebulaCard, RarityGlyph } from "./rendering/NebulaCard.jsx";
|
||||||
|
|
||||||
function DuplicatePicker({ catalog, label, entries, selectedId, onSelect, empty, newLabel }) {
|
function DuplicatePicker({ catalog, label, entries, selectedId, onSelect, empty, newLabel }) {
|
||||||
const [search, setSearch] = useState("");
|
const [search, setSearch] = useState("");
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { acceptTransfer, cancelTransfer, declineTransfer } from "./cardsApi.js";
|
import { acceptTransfer, cancelTransfer, declineTransfer } from "./cardsApi.js";
|
||||||
import { NebulaCard } from "./NebulaCard.jsx";
|
import { NebulaCard } from "./rendering/NebulaCard.jsx";
|
||||||
import { TransferComposer } from "./TransferComposer.jsx";
|
import { TransferComposer } from "./TransferComposer.jsx";
|
||||||
import { formatRelative } from "./admin/adminFormat.js";
|
import { formatRelative } from "./admin/adminFormat.js";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,9 @@ import { Modal } from "../../../components/Modal.jsx";
|
||||||
import { ActiveFilterBadges } from "../../games/ActiveFilterBadges.jsx";
|
import { ActiveFilterBadges } from "../../games/ActiveFilterBadges.jsx";
|
||||||
import { updateCollectionMythicOpening } from "../cardsApi.js";
|
import { updateCollectionMythicOpening } from "../cardsApi.js";
|
||||||
import { CardsFilterMenu } from "../CardsFilterMenu.jsx";
|
import { CardsFilterMenu } from "../CardsFilterMenu.jsx";
|
||||||
import { CollectionCardBack } from "../CollectionCardBack.jsx";
|
import { CollectionCardBack } from "../rendering/CollectionCardBack.jsx";
|
||||||
import { NebulaCard } from "../NebulaCard.jsx";
|
import { NebulaCard } from "../rendering/NebulaCard.jsx";
|
||||||
import { resolveMythicOpeningStyle } from "../openingEffects.js";
|
import { resolveMythicOpeningStyle } from "../rendering/openingEffects.js";
|
||||||
import { openingSettingFor, withoutOpeningSetting } from "./catalogSettings.js";
|
import { openingSettingFor, withoutOpeningSetting } from "./catalogSettings.js";
|
||||||
import { MythicEditor } from "./MythicEditor.jsx";
|
import { MythicEditor } from "./MythicEditor.jsx";
|
||||||
import { MythicOpeningFields } from "./MythicOpeningFields.jsx";
|
import { MythicOpeningFields } from "./MythicOpeningFields.jsx";
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import { useEffect, useRef, useState } from "react";
|
||||||
import { ConfirmModal } from "../../../components/ToolboxModals.jsx";
|
import { ConfirmModal } from "../../../components/ToolboxModals.jsx";
|
||||||
import { createCampaign, extendCampaign, loadCampaignDetail, revokeCampaign } from "../cardsApi.js";
|
import { createCampaign, extendCampaign, loadCampaignDetail, revokeCampaign } from "../cardsApi.js";
|
||||||
import { formatPercent, rarityPercentages, recommendedWeights } from "../dropRates.js";
|
import { formatPercent, rarityPercentages, recommendedWeights } from "../dropRates.js";
|
||||||
import { NebulaCard } from "../NebulaCard.jsx";
|
import { NebulaCard } from "../rendering/NebulaCard.jsx";
|
||||||
import { describeReward, summarizeReward } from "../rewardText.js";
|
import { describeReward, summarizeReward } from "../rewardText.js";
|
||||||
import { DATE_FORMATTER, toDateTimeLocal } from "./adminFormat.js";
|
import { DATE_FORMATTER, toDateTimeLocal } from "./adminFormat.js";
|
||||||
import { ExpiryField } from "./ExpiryField.jsx";
|
import { ExpiryField } from "./ExpiryField.jsx";
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { NebulaCard } from "../NebulaCard.jsx";
|
import { NebulaCard } from "../rendering/NebulaCard.jsx";
|
||||||
import { MATCH_HOLO_PALETTE_ID, MATCH_HOLO_PALETTE_LABEL, withCardOpeningSetting } from "../openingEffects.js";
|
import { MATCH_HOLO_PALETTE_ID, MATCH_HOLO_PALETTE_LABEL, withCardOpeningSetting } from "../rendering/openingEffects.js";
|
||||||
import { flareEditionFields, NO_FLARE } from "../holoFlares.js";
|
import { flareEditionFields, NO_FLARE } from "../rendering/holoFlares.js";
|
||||||
import { DEFAULT_TUNING, tuningEditionFields } from "./effectTuning.js";
|
import { DEFAULT_TUNING, tuningEditionFields } from "./effectTuning.js";
|
||||||
import { availableEffects, fittingFormat } from "./finishAvailability.js";
|
import { availableEffects, fittingFormat } from "./finishAvailability.js";
|
||||||
import { SwatchDropdown } from "./SwatchDropdown.jsx";
|
import { SwatchDropdown } from "./SwatchDropdown.jsx";
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,9 @@ import { Tooltip } from "../../../components/Tooltip.jsx";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { ConfirmModal } from "../../../components/ToolboxModals.jsx";
|
import { ConfirmModal } from "../../../components/ToolboxModals.jsx";
|
||||||
import { updateCardMythic, updateMythicFinish, updateMythicFlare, updateMythicTuning } from "../cardsApi.js";
|
import { updateCardMythic, updateMythicFinish, updateMythicFlare, updateMythicTuning } from "../cardsApi.js";
|
||||||
import { flareEditionFields, flareMotifOf, flareOfEdition, NO_FLARE, sameFlare } from "../holoFlares.js";
|
import { flareEditionFields, flareMotifOf, flareOfEdition, NO_FLARE, sameFlare } from "../rendering/holoFlares.js";
|
||||||
import { NebulaCard } from "../NebulaCard.jsx";
|
import { NebulaCard } from "../rendering/NebulaCard.jsx";
|
||||||
import { resolveMythicOpeningStyle, withCardOpeningSetting } from "../openingEffects.js";
|
import { resolveMythicOpeningStyle, withCardOpeningSetting } from "../rendering/openingEffects.js";
|
||||||
import { openingSettingFor, withoutOpeningSetting } from "./catalogSettings.js";
|
import { openingSettingFor, withoutOpeningSetting } from "./catalogSettings.js";
|
||||||
import { DEFAULT_TUNING, tuningEditionFields } from "./effectTuning.js";
|
import { DEFAULT_TUNING, tuningEditionFields } from "./effectTuning.js";
|
||||||
import { finishAvailable } from "./finishAvailability.js";
|
import { finishAvailable } from "./finishAvailability.js";
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { SelectDropdown } from "../../../components/SelectDropdown.jsx";
|
import { SelectDropdown } from "../../../components/SelectDropdown.jsx";
|
||||||
import { MATCH_HOLO_PALETTE_ID, MATCH_HOLO_PALETTE_LABEL } from "../openingEffects.js";
|
import { MATCH_HOLO_PALETTE_ID, MATCH_HOLO_PALETTE_LABEL } from "../rendering/openingEffects.js";
|
||||||
|
|
||||||
const SOURCE_SUFFIXES = { default: "défaut", collection: "hérité de la collection", card: "hérité de la carte" };
|
const SOURCE_SUFFIXES = { default: "défaut", collection: "hérité de la collection", card: "hérité de la carte" };
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { SelectDropdown } from "../../../components/SelectDropdown.jsx";
|
import { SelectDropdown } from "../../../components/SelectDropdown.jsx";
|
||||||
import { Tabs } from "../../../components/Tabs.jsx";
|
import { Tabs } from "../../../components/Tabs.jsx";
|
||||||
import { DEFAULT_FLARE_SCOPE, DEFAULT_FLARE_TUNING, flareMotifOf, MATCH_HOLO_FLARE_LABEL, MATCH_HOLO_FLARE_PALETTE } from "../holoFlares.js";
|
import { DEFAULT_FLARE_SCOPE, DEFAULT_FLARE_TUNING, flareMotifOf, MATCH_HOLO_FLARE_LABEL, MATCH_HOLO_FLARE_PALETTE } from "../rendering/holoFlares.js";
|
||||||
import { EffectTuningFields, TuningRange } from "./EffectTuningFields.jsx";
|
import { EffectTuningFields, TuningRange } from "./EffectTuningFields.jsx";
|
||||||
import { variationSummary } from "./effectTuning.js";
|
import { variationSummary } from "./effectTuning.js";
|
||||||
import { effectMissingHint, fittingFormat, formatMissingHint } from "./finishAvailability.js";
|
import { effectMissingHint, fittingFormat, formatMissingHint } from "./finishAvailability.js";
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
import { Fragment } from "react";
|
import { Fragment } from "react";
|
||||||
import { DailyIcon } from "./DailyIcon.jsx";
|
import { DailyIcon } from "./DailyIcon.jsx";
|
||||||
import { dailyKnowledge, dailyVerdict } from "./dailyKnowledge.js";
|
import { dailyKnowledge, dailyVerdict } from "./dailyKnowledge.js";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
|
|
||||||
// Étapes d'un sujet en pastilles ; `isFound` dit lesquelles le joueur a trouvées, `isNew` celles que le dernier essai vient d'apprendre.
|
// Étapes d'un sujet en pastilles ; `isFound` dit lesquelles le joueur a trouvées, `isNew` celles que le dernier essai vient d'apprendre.
|
||||||
export function SubjectChips({ labels, isFound = () => true, isNew = () => false }) {
|
export function SubjectChips({ labels, isFound = () => true, isNew = () => false }) {
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* la réponse.
|
* la réponse.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { dailyGuessResult, DAILY_MARKS, fillTemplate } from "./dailyShare.js";
|
import { dailyGuessResult, DAILY_MARKS, fillTemplate } from "../dailyShare.js";
|
||||||
|
|
||||||
// Chemin du sujet : les étapes trouvées, puis la première qui diffère. Le chemin de la réponse n'est jamais montré.
|
// Chemin du sujet : les étapes trouvées, puis la première qui diffère. Le chemin de la réponse n'est jamais montré.
|
||||||
function SubjectPath({ subject, content }) {
|
function SubjectPath({ subject, content }) {
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { DailyIcon } from "./DailyIcon.jsx";
|
import { DailyIcon } from "./DailyIcon.jsx";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
|
|
||||||
// Texte dont certains mots manquent : le serveur ne les envoie pas.
|
// Texte dont certains mots manquent : le serveur ne les envoie pas.
|
||||||
function MaskedText({ parts, content }) {
|
function MaskedText({ parts, content }) {
|
||||||
|
|
@ -4,17 +4,17 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useEffect, useMemo, useRef, useState } from "react";
|
import { useEffect, useMemo, useRef, useState } from "react";
|
||||||
import { CategoryAutocompleteInput } from "../../components/CategoryAutocompleteInput.jsx";
|
import { CategoryAutocompleteInput } from "../../../components/CategoryAutocompleteInput.jsx";
|
||||||
import { chooseDailyReward, flipDailyHint, guessDaily, loadDaily, loadDailyImage } from "./cardsApi.js";
|
import { chooseDailyReward, flipDailyHint, guessDaily, loadDaily, loadDailyImage } from "../cardsApi.js";
|
||||||
import { readCollection } from "./collectionState.js";
|
import { readCollection } from "../collectionState.js";
|
||||||
import { DailyFeedback, DailyRules } from "./DailyFeedback.jsx";
|
import { DailyFeedback, DailyRules } from "./DailyFeedback.jsx";
|
||||||
import { DailyGuesses } from "./DailyGuesses.jsx";
|
import { DailyGuesses } from "./DailyGuesses.jsx";
|
||||||
import { DailyHints } from "./DailyHints.jsx";
|
import { DailyHints } from "./DailyHints.jsx";
|
||||||
import { DailyResult } from "./DailyResult.jsx";
|
import { DailyResult } from "./DailyResult.jsx";
|
||||||
import { fillTemplate, findCardByName } from "./dailyShare.js";
|
import { fillTemplate, findCardByName } from "../dailyShare.js";
|
||||||
import { DailyTrack } from "./DailyTrack.jsx";
|
import { DailyTrack } from "./DailyTrack.jsx";
|
||||||
import { NebulaCard } from "./NebulaCard.jsx";
|
import { NebulaCard } from "../rendering/NebulaCard.jsx";
|
||||||
import { formatStardust } from "./stardustFormat.js";
|
import { formatStardust } from "../stardustFormat.js";
|
||||||
|
|
||||||
const COUNTDOWN_TICK_MS = 30_000;
|
const COUNTDOWN_TICK_MS = 30_000;
|
||||||
// Un mot répandu (« étoile ») désigne plus de cartes que les huit suggestions habituelles : la liste défile.
|
// Un mot répandu (« étoile ») désigne plus de cartes que les huit suggestions habituelles : la liste défile.
|
||||||
|
|
@ -6,9 +6,9 @@
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { SubjectChips } from "./DailyFeedback.jsx";
|
import { SubjectChips } from "./DailyFeedback.jsx";
|
||||||
import { dailyKnowledge } from "./dailyKnowledge.js";
|
import { dailyKnowledge } from "./dailyKnowledge.js";
|
||||||
import { dailyShareText, fillTemplate, formatCountdown, formatStreak } from "./dailyShare.js";
|
import { dailyShareText, fillTemplate, formatCountdown, formatStreak } from "../dailyShare.js";
|
||||||
import { DailyTrack } from "./DailyTrack.jsx";
|
import { DailyTrack } from "./DailyTrack.jsx";
|
||||||
import { formatStardust } from "./stardustFormat.js";
|
import { formatStardust } from "../stardustFormat.js";
|
||||||
|
|
||||||
function wonTitle(count, content) {
|
function wonTitle(count, content) {
|
||||||
return count === 1 ? content.wonFirstTitle : fillTemplate(content.wonTitle, { count });
|
return count === 1 ? content.wonFirstTitle : fillTemplate(content.wonTitle, { count });
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
* @file Piste des six essais de la Carte du jour : le signe de chaque essai joué, le numéro de ceux à venir.
|
* @file Piste des six essais de la Carte du jour : le signe de chaque essai joué, le numéro de ceux à venir.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { dailyGuessResult, DAILY_MARKS, fillTemplate } from "./dailyShare.js";
|
import { dailyGuessResult, DAILY_MARKS, fillTemplate } from "../dailyShare.js";
|
||||||
|
|
||||||
export function DailyTrack({ daily, content }) {
|
export function DailyTrack({ daily, content }) {
|
||||||
const playing = daily.status === "playing";
|
const playing = daily.status === "playing";
|
||||||
|
|
@ -10,10 +10,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { Modal } from "../../components/Modal.jsx";
|
import { Modal } from "../../../components/Modal.jsx";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
import { editionEntry } from "./expeditionFormat.js";
|
import { editionEntry } from "./expeditionFormat.js";
|
||||||
import { NebulaCard } from "./NebulaCard.jsx";
|
import { NebulaCard } from "../rendering/NebulaCard.jsx";
|
||||||
|
|
||||||
// `awakening` : vue du serveur (needed, candidates) ; `rarityWords(count)` : les raretés acceptées accordées (« rares »,
|
// `awakening` : vue du serveur (needed, candidates) ; `rarityWords(count)` : les raretés acceptées accordées (« rares »,
|
||||||
// « légendaire ou mythique ») ; `onAwaken(editionIds)` renvoie le résultat de la mutation, null en cas d'échec.
|
// « légendaire ou mythique ») ; `onAwaken(editionIds)` renvoie le résultat de la mutation, null en cas d'échec.
|
||||||
|
|
@ -9,8 +9,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { setCardPlan } from "./cardsApi.js";
|
import { setCardPlan } from "../cardsApi.js";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
import { MaskIcon } from "./ExpeditionLabels.jsx";
|
import { MaskIcon } from "./ExpeditionLabels.jsx";
|
||||||
|
|
||||||
const STATS = ["bravoure", "endurance", "fortune", "orientation"];
|
const STATS = ["bravoure", "endurance", "fortune", "orientation"];
|
||||||
|
|
@ -7,12 +7,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { Modal } from "../../components/Modal.jsx";
|
import { Modal } from "../../../components/Modal.jsx";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
import { MaskIcon } from "./ExpeditionLabels.jsx";
|
import { MaskIcon } from "./ExpeditionLabels.jsx";
|
||||||
import { editionEntry, powerText } from "./expeditionFormat.js";
|
import { editionEntry, powerText } from "./expeditionFormat.js";
|
||||||
import { PowerEffects } from "./ExpeditionOutcome.jsx";
|
import { PowerEffects } from "./ExpeditionOutcome.jsx";
|
||||||
import { NebulaCard } from "./NebulaCard.jsx";
|
import { NebulaCard } from "../rendering/NebulaCard.jsx";
|
||||||
|
|
||||||
const RECIPE_SIZE = 3;
|
const RECIPE_SIZE = 3;
|
||||||
|
|
||||||
|
|
@ -5,11 +5,11 @@
|
||||||
* l'icône d'étiquette.
|
* l'icône d'étiquette.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Tooltip } from "../../components/Tooltip.jsx";
|
import { Tooltip } from "../../../components/Tooltip.jsx";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
import { cardHelps, editionEntry, formatDecimal, STAT_BY_PLAN, STAT_IDS, tagLabel } from "./expeditionFormat.js";
|
import { cardHelps, editionEntry, formatDecimal, STAT_BY_PLAN, STAT_IDS, tagLabel } from "./expeditionFormat.js";
|
||||||
import { MaskIcon } from "./ExpeditionLabels.jsx";
|
import { MaskIcon } from "./ExpeditionLabels.jsx";
|
||||||
import { NebulaCard } from "./NebulaCard.jsx";
|
import { NebulaCard } from "../rendering/NebulaCard.jsx";
|
||||||
|
|
||||||
export function ExpeditionCardTile({ catalog, card, destination, content, selected, sortKey = null, onSelect }) {
|
export function ExpeditionCardTile({ catalog, card, destination, content, selected, sortKey = null, onSelect }) {
|
||||||
const entry = editionEntry(catalog, card.editionId);
|
const entry = editionEntry(catalog, card.editionId);
|
||||||
|
|
@ -8,14 +8,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { Modal } from "../../components/Modal.jsx";
|
import { Modal } from "../../../components/Modal.jsx";
|
||||||
import { Tooltip } from "../../components/Tooltip.jsx";
|
import { Tooltip } from "../../../components/Tooltip.jsx";
|
||||||
import { equipCard } from "./cardsApi.js";
|
import { equipCard } from "../cardsApi.js";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
import { editionEntry, STAT_IDS, tagColor, tagLabel } from "./expeditionFormat.js";
|
import { editionEntry, STAT_IDS, tagColor, tagLabel } from "./expeditionFormat.js";
|
||||||
import { MaskIcon, StatValue } from "./ExpeditionLabels.jsx";
|
import { MaskIcon, StatValue } from "./ExpeditionLabels.jsx";
|
||||||
import { PowerEffects, PowerName } from "./ExpeditionOutcome.jsx";
|
import { PowerEffects, PowerName } from "./ExpeditionOutcome.jsx";
|
||||||
import { NebulaCard } from "./NebulaCard.jsx";
|
import { NebulaCard } from "../rendering/NebulaCard.jsx";
|
||||||
|
|
||||||
// Synergie d'une commune avec la carte : une icône de lien et l'étiquette partagée, dans sa couleur ; « Synergie · … » est dit aux
|
// Synergie d'une commune avec la carte : une icône de lien et l'étiquette partagée, dans sa couleur ; « Synergie · … » est dit aux
|
||||||
// lecteurs d'écran.
|
// lecteurs d'écran.
|
||||||
|
|
@ -7,13 +7,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import { previewJoinExpedition } from "./cardsApi.js";
|
import { previewJoinExpedition } from "../cardsApi.js";
|
||||||
import { fillTemplate, formatCountdown } from "./dailyShare.js";
|
import { fillTemplate, formatCountdown } from "../dailyShare.js";
|
||||||
import { conditionText, dangerText, editionEntry, formatDecimal, formatEclats, powerNote, synergyBadges, tagLabel } from "./expeditionFormat.js";
|
import { conditionText, dangerText, editionEntry, formatDecimal, formatEclats, powerNote, synergyBadges, tagLabel } from "./expeditionFormat.js";
|
||||||
import { DestinationArt, MainStatMark, MaskIcon } from "./ExpeditionLabels.jsx";
|
import { DestinationArt, MainStatMark, MaskIcon } from "./ExpeditionLabels.jsx";
|
||||||
import { ExpeditionLoadout } from "./ExpeditionLoadout.jsx";
|
import { ExpeditionLoadout } from "./ExpeditionLoadout.jsx";
|
||||||
import { BonusBadges, PowersTile, TierTile } from "./ExpeditionOutcome.jsx";
|
import { BonusBadges, PowersTile, TierTile } from "./ExpeditionOutcome.jsx";
|
||||||
import { NebulaCard } from "./NebulaCard.jsx";
|
import { NebulaCard } from "../rendering/NebulaCard.jsx";
|
||||||
|
|
||||||
const PREVIEW_DELAY_MS = 250;
|
const PREVIEW_DELAY_MS = 250;
|
||||||
|
|
||||||
|
|
@ -4,16 +4,16 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { Modal } from "../../components/Modal.jsx";
|
import { Modal } from "../../../components/Modal.jsx";
|
||||||
import { CardDetailModal } from "./CardDetailModal.jsx";
|
import { CardDetailModal } from "../CardDetailModal.jsx";
|
||||||
import { engraveEquipment } from "./cardsApi.js";
|
import { engraveEquipment } from "../cardsApi.js";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
import { ExpeditionCardTile } from "./ExpeditionCardTile.jsx";
|
import { ExpeditionCardTile } from "./ExpeditionCardTile.jsx";
|
||||||
import { CardsFilterMenu } from "./CardsFilterMenu.jsx";
|
import { CardsFilterMenu } from "../CardsFilterMenu.jsx";
|
||||||
import { EquipmentStats } from "./ExpeditionEquipmentSlots.jsx";
|
import { EquipmentStats } from "./ExpeditionEquipmentSlots.jsx";
|
||||||
import { editionEntry, STAT_IDS, tagColor, tagLabel } from "./expeditionFormat.js";
|
import { editionEntry, STAT_IDS, tagColor, tagLabel } from "./expeditionFormat.js";
|
||||||
import { MaskIcon } from "./ExpeditionLabels.jsx";
|
import { MaskIcon } from "./ExpeditionLabels.jsx";
|
||||||
import { NebulaCard } from "./NebulaCard.jsx";
|
import { NebulaCard } from "../rendering/NebulaCard.jsx";
|
||||||
|
|
||||||
// Filtres d'une liste de cartes : recherche par nom, collections, et une stat. `mode` « filter » ne garde que les cartes qui
|
// Filtres d'une liste de cartes : recherche par nom, collections, et une stat. `mode` « filter » ne garde que les cartes qui
|
||||||
// apportent la stat (les communes), « sort » trie toutes les cartes par cette stat (les cartes personnage) ; dans les deux cas,
|
// apportent la stat (les communes), « sort » trie toutes les cartes par cette stat (les cartes personnage) ; dans les deux cas,
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useEffect, useRef } from "react";
|
import { useEffect, useRef } from "react";
|
||||||
import { fillTemplate, formatCountdown } from "./dailyShare.js";
|
import { fillTemplate, formatCountdown } from "../dailyShare.js";
|
||||||
import { coverEntry, editionEntry } from "./expeditionFormat.js";
|
import { coverEntry, editionEntry } from "./expeditionFormat.js";
|
||||||
import { NebulaCard } from "./NebulaCard.jsx";
|
import { NebulaCard } from "../rendering/NebulaCard.jsx";
|
||||||
|
|
||||||
// Silhouettes du décor (cadre 100 × 100).
|
// Silhouettes du décor (cadre 100 × 100).
|
||||||
const SPRITE_PATHS = {
|
const SPRITE_PATHS = {
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* icônes en masque, et une stat en icône et en valeur, son nom au survol.
|
* icônes en masque, et une stat en icône et en valeur, son nom au survol.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Tooltip } from "../../components/Tooltip.jsx";
|
import { Tooltip } from "../../../components/Tooltip.jsx";
|
||||||
import { coverEntry } from "./expeditionFormat.js";
|
import { coverEntry } from "./expeditionFormat.js";
|
||||||
|
|
||||||
// Icône monochrome teintée par la couleur du texte (static/icons, en masque) : stats, cartes et objets.
|
// Icône monochrome teintée par la couleur du texte (static/icons, en masque) : stats, cartes et objets.
|
||||||
|
|
@ -8,16 +8,16 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useMemo, useState } from "react";
|
import { useMemo, useState } from "react";
|
||||||
import { Modal } from "../../components/Modal.jsx";
|
import { Modal } from "../../../components/Modal.jsx";
|
||||||
import { Tooltip } from "../../components/Tooltip.jsx";
|
import { Tooltip } from "../../../components/Tooltip.jsx";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
import { ExpeditionCardTile } from "./ExpeditionCardTile.jsx";
|
import { ExpeditionCardTile } from "./ExpeditionCardTile.jsx";
|
||||||
import { EquipmentPicker, EquipmentSlots } from "./ExpeditionEquipmentSlots.jsx";
|
import { EquipmentPicker, EquipmentSlots } from "./ExpeditionEquipmentSlots.jsx";
|
||||||
import { CardSheet, EngraveModal } from "./ExpeditionImprove.jsx";
|
import { CardSheet, EngraveModal } from "./ExpeditionImprove.jsx";
|
||||||
import { editionEntry, formatDecimal, helpScore, powerText, STAT_IDS, tagColor, tagLabel } from "./expeditionFormat.js";
|
import { editionEntry, formatDecimal, helpScore, powerText, STAT_IDS, tagColor, tagLabel } from "./expeditionFormat.js";
|
||||||
import { MainStatMark, MaskIcon } from "./ExpeditionLabels.jsx";
|
import { MainStatMark, MaskIcon } from "./ExpeditionLabels.jsx";
|
||||||
import { PowerName } from "./ExpeditionOutcome.jsx";
|
import { PowerName } from "./ExpeditionOutcome.jsx";
|
||||||
import { NebulaCard } from "./NebulaCard.jsx";
|
import { NebulaCard } from "../rendering/NebulaCard.jsx";
|
||||||
|
|
||||||
// Tris des cartes jouables : utiles à la destination (condition, dangers, Affinité), Puissance ou une stat.
|
// Tris des cartes jouables : utiles à la destination (condition, dangers, Affinité), Puissance ou une stat.
|
||||||
const SORTS = ["useful", "power", ...STAT_IDS];
|
const SORTS = ["useful", "power", ...STAT_IDS];
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
* pouvoirs de l'équipe.
|
* pouvoirs de l'équipe.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Tooltip } from "../../components/Tooltip.jsx";
|
import { Tooltip } from "../../../components/Tooltip.jsx";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
import { formatEclats, powerEffects, powerLabel, powerText, TIER_VARIANTS } from "./expeditionFormat.js";
|
import { formatEclats, powerEffects, powerLabel, powerText, TIER_VARIANTS } from "./expeditionFormat.js";
|
||||||
import { MaskIcon } from "./ExpeditionLabels.jsx";
|
import { MaskIcon } from "./ExpeditionLabels.jsx";
|
||||||
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useEffect, useMemo, useState } from "react";
|
import { useEffect, useMemo, useState } from "react";
|
||||||
import { Tooltip } from "../../components/Tooltip.jsx";
|
import { Tooltip } from "../../../components/Tooltip.jsx";
|
||||||
import { previewExpedition } from "./cardsApi.js";
|
import { previewExpedition } from "../cardsApi.js";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
import { conditionText, coverEntry, dangerText, editionEntry, formatDecimal, formatEclats, ITEM_ART, powerNote, synergyBadges, tagLabel } from "./expeditionFormat.js";
|
import { conditionText, coverEntry, dangerText, editionEntry, formatDecimal, formatEclats, ITEM_ART, powerNote, synergyBadges, tagLabel } from "./expeditionFormat.js";
|
||||||
import { MainStatMark, MaskIcon } from "./ExpeditionLabels.jsx";
|
import { MainStatMark, MaskIcon } from "./ExpeditionLabels.jsx";
|
||||||
import { ExpeditionLoadout } from "./ExpeditionLoadout.jsx";
|
import { ExpeditionLoadout } from "./ExpeditionLoadout.jsx";
|
||||||
|
|
@ -3,13 +3,13 @@
|
||||||
* terminée ou annulée.
|
* terminée ou annulée.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { CurrencyAmount } from "./Currency.jsx";
|
import { CurrencyAmount } from "../Currency.jsx";
|
||||||
import { fillTemplate, formatCountdown } from "./dailyShare.js";
|
import { fillTemplate, formatCountdown } from "../dailyShare.js";
|
||||||
import { editionEntry, formatEclats, synergyBadges } from "./expeditionFormat.js";
|
import { editionEntry, formatEclats, synergyBadges } from "./expeditionFormat.js";
|
||||||
import { BonusBadges, PowerName } from "./ExpeditionOutcome.jsx";
|
import { BonusBadges, PowerName } from "./ExpeditionOutcome.jsx";
|
||||||
import { DestinationArt } from "./ExpeditionLabels.jsx";
|
import { DestinationArt } from "./ExpeditionLabels.jsx";
|
||||||
import { NebulaCard } from "./NebulaCard.jsx";
|
import { NebulaCard } from "../rendering/NebulaCard.jsx";
|
||||||
import { formatStardust } from "./stardustFormat.js";
|
import { formatStardust } from "../stardustFormat.js";
|
||||||
|
|
||||||
const TIER_VARIANTS = { struggle: "neutral", success: "success", triumph: "gold" };
|
const TIER_VARIANTS = { struggle: "neutral", success: "success", triumph: "gold" };
|
||||||
|
|
||||||
|
|
@ -6,11 +6,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useEffect, useRef } from "react";
|
import { useEffect, useRef } from "react";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
import { editionEntry, formatEclats } from "./expeditionFormat.js";
|
import { editionEntry, formatEclats } from "./expeditionFormat.js";
|
||||||
import { DestinationArt, MaskIcon } from "./ExpeditionLabels.jsx";
|
import { DestinationArt, MaskIcon } from "./ExpeditionLabels.jsx";
|
||||||
import { NebulaCard } from "./NebulaCard.jsx";
|
import { NebulaCard } from "../rendering/NebulaCard.jsx";
|
||||||
import { formatStardust } from "./stardustFormat.js";
|
import { formatStardust } from "../stardustFormat.js";
|
||||||
|
|
||||||
// Une ligne du butin : une icône, puis le gain.
|
// Une ligne du butin : une icône, puis le gain.
|
||||||
function LootLine({ icon, children, variant }) {
|
function LootLine({ icon, children, variant }) {
|
||||||
|
|
@ -5,10 +5,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { Modal } from "../../components/Modal.jsx";
|
import { Modal } from "../../../components/Modal.jsx";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
import { editionEntry } from "./expeditionFormat.js";
|
import { editionEntry } from "./expeditionFormat.js";
|
||||||
import { NebulaCard } from "./NebulaCard.jsx";
|
import { NebulaCard } from "../rendering/NebulaCard.jsx";
|
||||||
|
|
||||||
export function ExpeditionStarter({ catalog, editionId, content, onClose }) {
|
export function ExpeditionStarter({ catalog, editionId, content, onClose }) {
|
||||||
const [revealed, setRevealed] = useState(false);
|
const [revealed, setRevealed] = useState(false);
|
||||||
|
|
@ -17,11 +17,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useCallback, useEffect, useRef, useState } from "react";
|
import { useCallback, useEffect, useRef, useState } from "react";
|
||||||
import { Tabs } from "../../components/Tabs.jsx";
|
import { Tabs } from "../../../components/Tabs.jsx";
|
||||||
import { Tooltip } from "../../components/Tooltip.jsx";
|
import { Tooltip } from "../../../components/Tooltip.jsx";
|
||||||
import { addBonusDestination, addTestPlayer, claimExpedition, craftPowerCommon, recallExpedition, departExpedition, joinExpedition, leaveExpedition, loadExpeditions, markStarterSeen, openTestGroup, rerollDestinations, startExpedition, updateExpeditionMember } from "./cardsApi.js";
|
import { addBonusDestination, addTestPlayer, claimExpedition, craftPowerCommon, recallExpedition, departExpedition, joinExpedition, leaveExpedition, loadExpeditions, markStarterSeen, openTestGroup, rerollDestinations, startExpedition, updateExpeditionMember } from "../cardsApi.js";
|
||||||
import { CurrencyAmount } from "./Currency.jsx";
|
import { CurrencyAmount } from "../Currency.jsx";
|
||||||
import { fillTemplate, formatCountdown } from "./dailyShare.js";
|
import { fillTemplate, formatCountdown } from "../dailyShare.js";
|
||||||
import { ExpeditionAtelier } from "./ExpeditionAtelier.jsx";
|
import { ExpeditionAtelier } from "./ExpeditionAtelier.jsx";
|
||||||
import { ExpeditionGroupCard } from "./ExpeditionGroupCard.jsx";
|
import { ExpeditionGroupCard } from "./ExpeditionGroupCard.jsx";
|
||||||
import { EngraveModal } from "./ExpeditionImprove.jsx";
|
import { EngraveModal } from "./ExpeditionImprove.jsx";
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
* Attention : affichage seulement ; les règles et les valeurs viennent du serveur (vue des Expéditions, réglages).
|
* Attention : affichage seulement ; les règles et les valeurs viennent du serveur (vue des Expéditions, réglages).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { fillTemplate, formatCountdown } from "./dailyShare.js";
|
import { fillTemplate, formatCountdown } from "../dailyShare.js";
|
||||||
|
|
||||||
export const STAT_IDS = ["bravoure", "endurance", "fortune", "orientation"];
|
export const STAT_IDS = ["bravoure", "endurance", "fortune", "orientation"];
|
||||||
// Variante de badge de chaque palier.
|
// Variante de badge de chaque palier.
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
import { sameLine } from "./mirrorFormat.js";
|
import { sameLine } from "./mirrorFormat.js";
|
||||||
|
|
||||||
// `tiles[cell]` : le morceau de l'image servie qui se trouve dans la case. Chaque morceau garde sa clé : il glisse d'une case à
|
// `tiles[cell]` : le morceau de l'image servie qui se trouve dans la case. Chaque morceau garde sa clé : il glisse d'une case à
|
||||||
|
|
@ -13,13 +13,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useCallback, useEffect, useRef, useState } from "react";
|
import { useCallback, useEffect, useRef, useState } from "react";
|
||||||
import { applyMirrorHelp, loadMirror, loadMirrorImage, resetMirror, startMirror, swapMirror } from "./cardsApi.js";
|
import { applyMirrorHelp, loadMirror, loadMirrorImage, resetMirror, startMirror, swapMirror } from "../cardsApi.js";
|
||||||
import { fillTemplate, formatCountdown } from "./dailyShare.js";
|
import { fillTemplate, formatCountdown } from "../dailyShare.js";
|
||||||
import { Tooltip } from "../../components/Tooltip.jsx";
|
import { Tooltip } from "../../../components/Tooltip.jsx";
|
||||||
import { MirrorBoard } from "./MirrorBoard.jsx";
|
import { MirrorBoard } from "./MirrorBoard.jsx";
|
||||||
import { mirrorShareText } from "./mirrorFormat.js";
|
import { mirrorShareText } from "./mirrorFormat.js";
|
||||||
import { formatStardustFull } from "./stardustFormat.js";
|
import { formatStardustFull } from "../stardustFormat.js";
|
||||||
import { MaskIcon } from "./ExpeditionLabels.jsx";
|
import { MaskIcon } from "../expeditions/ExpeditionLabels.jsx";
|
||||||
|
|
||||||
// Les trois miroirs du jour, dans l'ordre : chacun s'ouvre une fois le précédent terminé.
|
// Les trois miroirs du jour, dans l'ordre : chacun s'ouvre une fois le précédent terminé.
|
||||||
const MODES = ["easy", "normal", "hard"];
|
const MODES = ["easy", "normal", "hard"];
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* partager).
|
* partager).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
|
|
||||||
// Deux cases de la même rangée ou de la même colonne : les seules qui s'échangent (sauf échange libre).
|
// Deux cases de la même rangée ou de la même colonne : les seules qui s'échangent (sauf échange libre).
|
||||||
export const sameLine = (cols, x, y) => x !== y && (Math.floor(x / cols) === Math.floor(y / cols) || x % cols === y % cols);
|
export const sameLine = (cols, x, y) => x !== y && (Math.floor(x / cols) === Math.floor(y / cols) || x % cols === y % cols);
|
||||||
|
|
@ -4,9 +4,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useCallback, useEffect, useRef, useState } from "react";
|
import { useCallback, useEffect, useRef, useState } from "react";
|
||||||
import { BOOST_FACTOR, BOOST_MS, RACE_LENGTH } from "../../../../services/cards/race-rules.js";
|
import { BOOST_FACTOR, BOOST_MS, RACE_LENGTH } from "../../../../../services/cards/race-rules.js";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
import { MaskIcon } from "./ExpeditionLabels.jsx";
|
import { MaskIcon } from "../expeditions/ExpeditionLabels.jsx";
|
||||||
import { activeHelper, advanceRace, advanceToNextChoice, allRuns, canGiveBoost, createRace, giveBoost, imageOf, nameOf, playerZone, raceOver, racerName } from "./raceRun.js";
|
import { activeHelper, advanceRace, advanceToNextChoice, allRuns, canGiveBoost, createRace, giveBoost, imageOf, nameOf, playerZone, raceOver, racerName } from "./raceRun.js";
|
||||||
import { RaceTrack } from "./RaceTrack.jsx";
|
import { RaceTrack } from "./RaceTrack.jsx";
|
||||||
import { SpecialtyBand } from "./TeamCompanion.jsx";
|
import { SpecialtyBand } from "./TeamCompanion.jsx";
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import { finishRace, loadTeam, recordRaceBoosts, resetRace, startRace } from "./cardsApi.js";
|
import { finishRace, loadTeam, recordRaceBoosts, resetRace, startRace } from "../cardsApi.js";
|
||||||
import { RaceLive } from "./RaceLive.jsx";
|
import { RaceLive } from "./RaceLive.jsx";
|
||||||
import { RaceResult } from "./RaceResult.jsx";
|
import { RaceResult } from "./RaceResult.jsx";
|
||||||
import { RaceCircuit } from "./RaceTrack.jsx";
|
import { RaceCircuit } from "./RaceTrack.jsx";
|
||||||
|
|
@ -5,11 +5,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useMemo, useState } from "react";
|
import { useMemo, useState } from "react";
|
||||||
import { CurrencyIcon } from "./Currency.jsx";
|
import { CurrencyIcon } from "../Currency.jsx";
|
||||||
import { fillTemplate, formatCountdown } from "./dailyShare.js";
|
import { fillTemplate, formatCountdown } from "../dailyShare.js";
|
||||||
import { MaskIcon } from "./ExpeditionLabels.jsx";
|
import { MaskIcon } from "../expeditions/ExpeditionLabels.jsx";
|
||||||
import { imageOf, nameOf, racerName, raceRanking, raceReview } from "./raceRun.js";
|
import { imageOf, nameOf, racerName, raceRanking, raceReview } from "./raceRun.js";
|
||||||
import { formatStardust } from "./stardustFormat.js";
|
import { formatStardust } from "../stardustFormat.js";
|
||||||
|
|
||||||
const formatTime = (milliseconds) => `${(milliseconds / 1_000).toLocaleString("fr-FR", { minimumFractionDigits: 2, maximumFractionDigits: 2 })} s`;
|
const formatTime = (milliseconds) => `${(milliseconds / 1_000).toLocaleString("fr-FR", { minimumFractionDigits: 2, maximumFractionDigits: 2 })} s`;
|
||||||
const placeText = (place, content) => fillTemplate(place === 1 ? content.placeFirst : content.placeOther, { place });
|
const placeText = (place, content) => fillTemplate(place === 1 ? content.placeFirst : content.placeOther, { place });
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
* @file Dessine le parcours d'une course et les coureurs sur leurs couloirs.
|
* @file Dessine le parcours d'une course et les coureurs sur leurs couloirs.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { MaskIcon } from "./ExpeditionLabels.jsx";
|
import { MaskIcon } from "../expeditions/ExpeditionLabels.jsx";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
import { imageOf } from "./raceRun.js";
|
import { imageOf } from "./raceRun.js";
|
||||||
import { countText } from "./teamFormat.js";
|
import { countText } from "./teamFormat.js";
|
||||||
|
|
||||||
|
|
@ -3,9 +3,9 @@
|
||||||
* fortes.
|
* fortes.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { STAT_IDS } from "./expeditionFormat.js";
|
import { STAT_IDS } from "../expeditions/expeditionFormat.js";
|
||||||
import { MaskIcon } from "./ExpeditionLabels.jsx";
|
import { MaskIcon } from "../expeditions/ExpeditionLabels.jsx";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
import { bandOf, BALANCED, mainStats, specialtyStyle } from "./teamFormat.js";
|
import { bandOf, BALANCED, mainStats, specialtyStyle } from "./teamFormat.js";
|
||||||
|
|
||||||
export function SpecialtyBand({ companion, content, statLabels }) {
|
export function SpecialtyBand({ companion, content, statLabels }) {
|
||||||
|
|
@ -4,9 +4,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import { chooseTeamCharacter, healTeamCompanion, keepTeamCompanion, loadTeam, recruitTeam, rerollTeamOffer, resetTeam, revealTeamStar } from "./cardsApi.js";
|
import { chooseTeamCharacter, healTeamCompanion, keepTeamCompanion, loadTeam, recruitTeam, rerollTeamOffer, resetTeam, revealTeamStar } from "../cardsApi.js";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
import { ITEM_ART } from "./expeditionFormat.js";
|
import { ITEM_ART } from "../expeditions/expeditionFormat.js";
|
||||||
import { TeamRecruitment } from "./TeamRecruitment.jsx";
|
import { TeamRecruitment } from "./TeamRecruitment.jsx";
|
||||||
import { TeamSky } from "./TeamSky.jsx";
|
import { TeamSky } from "./TeamSky.jsx";
|
||||||
import { TeamTable } from "./TeamTable.jsx";
|
import { TeamTable } from "./TeamTable.jsx";
|
||||||
|
|
@ -3,13 +3,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useEffect, useRef } from "react";
|
import { useEffect, useRef } from "react";
|
||||||
import { CurrencyIcon } from "./Currency.jsx";
|
import { CurrencyIcon } from "../Currency.jsx";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
import { ITEM_ART } from "./expeditionFormat.js";
|
import { ITEM_ART } from "../expeditions/expeditionFormat.js";
|
||||||
import { TeamCompanion } from "./TeamCompanion.jsx";
|
import { TeamCompanion } from "./TeamCompanion.jsx";
|
||||||
import { TeamSky } from "./TeamSky.jsx";
|
import { TeamSky } from "./TeamSky.jsx";
|
||||||
import { TeamBest, TeamTable } from "./TeamTable.jsx";
|
import { TeamBest, TeamTable } from "./TeamTable.jsx";
|
||||||
import { MaskIcon } from "./ExpeditionLabels.jsx";
|
import { MaskIcon } from "../expeditions/ExpeditionLabels.jsx";
|
||||||
import { BALANCED, bandOf, countText, isMissing, mainStats, riskLevel, riskPct, specialtyStyle } from "./teamFormat.js";
|
import { BALANCED, bandOf, countText, isMissing, mainStats, riskLevel, riskPct, specialtyStyle } from "./teamFormat.js";
|
||||||
|
|
||||||
// Étoiles encore cachées : un nombre par sorte, avec son effet en quelques mots.
|
// Étoiles encore cachées : un nombre par sorte, avec son effet en quelques mots.
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
* @file Affiche les étoiles d'un recrutement, cachées ou révélées, et laisse choisir celle à révéler.
|
* @file Affiche les étoiles d'un recrutement, cachées ou révélées, et laisse choisir celle à révéler.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { CurrencyIcon } from "./Currency.jsx";
|
import { CurrencyIcon } from "../Currency.jsx";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
|
|
||||||
// Le ciel tient sur deux rangées.
|
// Le ciel tient sur deux rangées.
|
||||||
function Star({ star, index, content, canReveal, onReveal }) {
|
function Star({ star, index, content, canReveal, onReveal }) {
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
* L'équipe n'y est liée à aucun jeu.
|
* L'équipe n'y est liée à aucun jeu.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { STAT_IDS } from "./expeditionFormat.js";
|
import { STAT_IDS } from "../expeditions/expeditionFormat.js";
|
||||||
import { MaskIcon } from "./ExpeditionLabels.jsx";
|
import { MaskIcon } from "../expeditions/ExpeditionLabels.jsx";
|
||||||
import { TeamCompanion } from "./TeamCompanion.jsx";
|
import { TeamCompanion } from "./TeamCompanion.jsx";
|
||||||
import { fateOf, teamBest } from "./teamFormat.js";
|
import { fateOf, teamBest } from "./teamFormat.js";
|
||||||
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
* chacune avec un visuel. L'équipe n'est liée à aucun jeu.
|
* chacune avec un visuel. L'équipe n'est liée à aucun jeu.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { CurrencyIcon } from "./Currency.jsx";
|
import { CurrencyIcon } from "../Currency.jsx";
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
|
|
||||||
const TABLE_ART = "/static/img/cards/guild/tavern.webp";
|
const TABLE_ART = "/static/img/cards/guild/tavern.webp";
|
||||||
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* élans), et en fait le bilan une fois finie.
|
* élans), et en fait le bilan une fois finie.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { applyBoost, autoRun, bestBoosts, canBoost, placeOf, RACE_STATS, replayRun, startRun, STEP_MS, stepRun, zoneAt } from "../../../../services/cards/race-rules.js";
|
import { applyBoost, autoRun, bestBoosts, canBoost, placeOf, RACE_STATS, replayRun, startRun, STEP_MS, stepRun, zoneAt } from "../../../../../services/cards/race-rules.js";
|
||||||
|
|
||||||
const entrant = ({ runner, helpers }) => ({ runner: runner.stats, helpers: helpers.map((helper) => helper.stats) });
|
const entrant = ({ runner, helpers }) => ({ runner: runner.stats, helpers: helpers.map((helper) => helper.stats) });
|
||||||
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
* textes au pluriel).
|
* textes au pluriel).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { fillTemplate } from "./dailyShare.js";
|
import { fillTemplate } from "../dailyShare.js";
|
||||||
import { STAT_IDS } from "./expeditionFormat.js";
|
import { STAT_IDS } from "../expeditions/expeditionFormat.js";
|
||||||
|
|
||||||
// Spécialités affichées sur le bandeau : celles données par le serveur, ou l'équilibre.
|
// Spécialités affichées sur le bandeau : celles données par le serveur, ou l'équilibre.
|
||||||
export const BALANCED = "balanced";
|
export const BALANCED = "balanced";
|
||||||
Loading…
Add table
Add a link
Reference in a new issue