Mudanças entre as edições de "Predefinição:Character"

De Wiki Gla
Ir para navegação Ir para pesquisar
m
m
 
(35 revisões intermediárias pelo mesmo usuário não estão sendo mostradas)
Linha 1: Linha 1:
<includeonly>
<noinclude>
<templatestyles src="Template:Character/styles.css" />
<!-- Predefinição:Character — Documentação de Arquitetura -->
{{#invoke:Character|generate
== Arquivos envolvidos ==
| nome        = {{{nome|}}}
 
| tier        = {{{tier|}}}
=== Predefinição ===
| desc        = {{{desc|}}}
* [[Predefinição:Character]] — Ponto de entrada. Invoca <code><nowiki>{{#invoke:C|generate}}</nowiki></code> e carrega todos os widgets.
| classe      = {{{classe|}}}
 
| image      = {{{image|}}}
=== Módulos Lua ===
<!-- Habilidades (1–21) -->
* [[Módulo:C]] — Fachada: re-exporta funções de C.Utils, C.i18n, C.Skin e C.Generate.
| hab1-nome  = {{{hab1-nome|}}}  | hab1-icon  = {{{hab1-icon|}}}  | hab1-level  = {{{hab1-level|}}}  | hab1-desc  = {{{hab1-desc|}}}  | hab1-atr  = {{{hab1-atr|}}}  | hab1-video  = {{{hab1-video|}}}
* [[Módulo:C.Generate]] — Gera todo o HTML server-side (header, icon-bar, skills, skins, data-attributes i18n).
| hab2-nome  = {{{hab2-nome|}}}  | hab2-icon  = {{{hab2-icon|}}}  | hab2-level  = {{{hab2-level|}}}  | hab2-desc  = {{{hab2-desc|}}}  | hab2-atr  = {{{hab2-atr|}}}  | hab2-video  = {{{hab2-video|}}}
* [[Módulo:C.i18n]] — Constantes i18n (ATTR, FLAGS, TAB, TIER, TAGS) e funções tierPackFrom / tagsPackFrom.
| hab3-nome  = {{{hab3-nome|}}}  | hab3-icon  = {{{hab3-icon|}}}  | hab3-level  = {{{hab3-level|}}}  | hab3-desc  = {{{hab3-desc|}}}  | hab3-atr  = {{{hab3-atr|}}}  | hab3-video  = {{{hab3-video|}}}
* [[Módulo:C.Skin]] — Serializa dados de skin (<code><nowiki>{{Skin}}</nowiki></code>) para JSON consumido por C.Generate.
| hab4-nome  = {{{hab4-nome|}}}  | hab4-icon  = {{{hab4-icon|}}}  | hab4-level  = {{{hab4-level|}}}  | hab4-desc  = {{{hab4-desc|}}}  | hab4-atr  = {{{hab4-atr|}}}  | hab4-video  = {{{hab4-video|}}}
* [[Módulo:C.Utils]] — Utilitários: trim, fileURL, normalizeDim, makeAttrString, requireCharModule, collectJsonObjects.
| hab5-nome  = {{{hab5-nome|}}}  | hab5-icon  = {{{hab5-icon|}}}  | hab5-level  = {{{hab5-level|}}}  | hab5-desc  = {{{hab5-desc|}}}  | hab5-atr  = {{{hab5-atr|}}}  | hab5-video  = {{{hab5-video|}}}
* [[Módulo:I]] — Fachada do sistema Info: re-exporta I.Utils, I.Skills, I.Expand.
| hab6-nome  = {{{hab6-nome|}}}  | hab6-icon  = {{{hab6-icon|}}}  | hab6-level  = {{{hab6-level|}}}  | hab6-desc  = {{{hab6-desc|}}}  | hab6-atr  = {{{hab6-atr|}}}  | hab6-video  = {{{hab6-video|}}}
* [[Módulo:I.Skills]] — Gera JSON de skills/skins a partir do módulo do personagem (skill, skin, forms).
| hab7-nome  = {{{hab7-nome|}}}  | hab7-icon  = {{{hab7-icon|}}}  | hab7-level  = {{{hab7-level|}}}  | hab7-desc  = {{{hab7-desc|}}}  | hab7-atr  = {{{hab7-atr|}}}  | hab7-video  = {{{hab7-video|}}}
* [[Módulo:I.Utils]] — Utilitários Info: trim, colorize, parseFlags, requireCharacterModule.
| hab8-nome  = {{{hab8-nome|}}}  | hab8-icon   = {{{hab8-icon|}}}  | hab8-level  = {{{hab8-level|}}}  | hab8-desc  = {{{hab8-desc|}}}  | hab8-atr  = {{{hab8-atr|}}}  | hab8-video  = {{{hab8-video|}}}
* [[Módulo:I.Expand]] — Expande tier/tags i18n via token (getTier, getTags, expandTier, expandTags).
| hab9-nome  = {{{hab9-nome|}}}  | hab9-icon  = {{{hab9-icon|}}}  | hab9-level  = {{{hab9-level|}}}  | hab9-desc  = {{{hab9-desc|}}}  | hab9-atr  = {{{hab9-atr|}}}  | hab9-video  = {{{hab9-video|}}}
| hab10-nome  = {{{hab10-nome|}}}  | hab10-icon  = {{{hab10-icon|}}}  | hab10-level  = {{{hab10-level|}}}  | hab10-desc  = {{{hab10-desc|}}}  | hab10-atr  = {{{hab10-atr|}}}  | hab10-video  = {{{hab10-video|}}}
| hab11-nome  = {{{hab11-nome|}}}  | hab11-icon  = {{{hab11-icon|}}}  | hab11-level  = {{{hab11-level|}}}  | hab11-desc  = {{{hab11-desc|}}}  | hab11-atr  = {{{hab11-atr|}}}  | hab11-video  = {{{hab11-video|}}}
| hab12-nome  = {{{hab12-nome|}}}  | hab12-icon  = {{{hab12-icon|}}}  | hab12-level  = {{{hab12-level|}}}  | hab12-desc  = {{{hab12-desc|}}}  | hab12-atr  = {{{hab12-atr|}}}  | hab12-video  = {{{hab12-video|}}}
| hab13-nome  = {{{hab13-nome|}}}  | hab13-icon  = {{{hab13-icon|}}}  | hab13-level  = {{{hab13-level|}}}  | hab13-desc  = {{{hab13-desc|}}}  | hab13-atr  = {{{hab13-atr|}}}  | hab13-video  = {{{hab13-video|}}}
| hab14-nome  = {{{hab14-nome|}}}  | hab14-icon  = {{{hab14-icon|}}}  | hab14-level  = {{{hab14-level|}}}  | hab14-desc  = {{{hab14-desc|}}}  | hab14-atr  = {{{hab14-atr|}}}  | hab14-video  = {{{hab14-video|}}}
| hab15-nome  = {{{hab15-nome|}}}  | hab15-icon  = {{{hab15-icon|}}}  | hab15-level  = {{{hab15-level|}}}  | hab15-desc  = {{{hab15-desc|}}}  | hab15-atr  = {{{hab15-atr|}}}  | hab15-video  = {{{hab15-video|}}}
| hab16-nome  = {{{hab16-nome|}}}  | hab16-icon  = {{{hab16-icon|}}}  | hab16-level  = {{{hab16-level|}}}  | hab16-desc  = {{{hab16-desc|}}}  | hab16-atr  = {{{hab16-atr|}}}  | hab16-video  = {{{hab16-video|}}}
| hab17-nome  = {{{hab17-nome|}}}  | hab17-icon  = {{{hab17-icon|}}}  | hab17-level  = {{{hab17-level|}}}  | hab17-desc  = {{{hab17-desc|}}}  | hab17-atr  = {{{hab17-atr|}}}  | hab17-video  = {{{hab17-video|}}}
| hab18-nome  = {{{hab18-nome|}}}  | hab18-icon  = {{{hab18-icon|}}}  | hab18-level  = {{{hab18-level|}}}  | hab18-desc  = {{{hab18-desc|}}}  | hab18-atr  = {{{hab18-atr|}}}  | hab18-video  = {{{hab18-video|}}}
| hab19-nome  = {{{hab19-nome|}}}  | hab19-icon  = {{{hab19-icon|}}}  | hab19-level  = {{{hab19-level|}}}  | hab19-desc  = {{{hab19-desc|}}}  | hab19-atr  = {{{hab19-atr|}}}  | hab19-video  = {{{hab19-video|}}}
| hab20-nome  = {{{hab20-nome|}}}  | hab20-icon  = {{{hab20-icon|}}}  | hab20-level  = {{{hab20-level|}}}  | hab20-desc  = {{{hab20-desc|}}}  | hab20-atr  = {{{hab20-atr|}}}  | hab20-video  = {{{hab20-video|}}}
| hab21-nome  = {{{hab21-nome|}}}  | hab21-icon  = {{{hab21-icon|}}}  | hab21-level  = {{{hab21-level|}}}  | hab21-desc  = {{{hab21-desc|}}}  | hab21-atr  = {{{hab21-atr|}}}  | hab21-video  = {{{hab21-video|}}}


<!-- Skins (1–11) -->
=== Widgets HTML ===
| skin1-image = {{{skin1-image|}}}  | skin1-banner = {{{skin1-banner|}}}  | skin1-tooltip = {{{skin1-tooltip|}}}
* [[Widget:C.Base]] — CSS completo: layout, icon-bar, tabs, skins, responsivo, tier visual.
  | skin2-image = {{{skin2-image|}}} | skin2-banner = {{{skin2-banner|}}} | skin2-tooltip = {{{skin2-tooltip|}}}
* [[Widget:C.Skills]] — JS principal: seleção de skill, vídeo, atributos, flags, forms, swap de personagens (`data-swap`, `data-only-character`, `data-character-videos`; opcional `data-default-character` no `#skills` via `character_swap_default` no módulo Lua).
  | skin3-image = {{{skin3-image|}}} | skin3-banner = {{{skin3-banner|}}} | skin3-tooltip = {{{skin3-tooltip|}}}
* [[Widget:C.Background]] — JS: carrega background via IndexedDB cache + fallback URL.
  | skin4-image = {{{skin4-image|}}}  | skin4-banner = {{{skin4-banner|}}}  | skin4-tooltip = {{{skin4-tooltip|}}}
* [[Widget:C.Skins]] — JS: podium isométrico, tooltip, offset_x, YouTube spotlight.
  | skin5-image = {{{skin5-image|}}}  | skin5-banner = {{{skin5-banner|}}}  | skin5-tooltip = {{{skin5-tooltip|}}}
* [[Widget:C.Subskills]] — JS: barra aninhada de sub-habilidades, herança de atributos.
  | skin6-image = {{{skin6-image|}}}  | skin6-banner = {{{skin6-banner|}}}  | skin6-tooltip = {{{skin6-tooltip|}}}
* [[Widget:C.Translator]] — JS: troca de idioma (pt/en/es/pl), atualiza tier, tags, descs, flags, skins.
  | skin7-image = {{{skin7-image|}}}  | skin7-banner = {{{skin7-banner|}}}  | skin7-tooltip = {{{skin7-tooltip|}}}
* [[Widget:C.WeaponToggle]] — JS: toggle de arma especial, popup i18n, swap de atributos/vídeos.
  | skin8-image = {{{skin8-image|}}} | skin8-banner = {{{skin8-banner|}}} | skin8-tooltip = {{{skin8-tooltip|}}}
 
| skin9-image = {{{skin9-image|}}} | skin9-banner = {{{skin9-banner|}}} | skin9-tooltip = {{{skin9-tooltip|}}}
== Dependências (quem chama quem) ==
| skin10-image = {{{skin10-image|}}} | skin10-banner = {{{skin10-banner|}}} | skin10-tooltip = {{{skin10-tooltip|}}}
 
| skin11-image = {{{skin11-image|}}} | skin11-banner = {{{skin11-banner|}}} | skin11-tooltip = {{{skin11-tooltip|}}}
<pre>
}}
Predefinição:Character
{{#widget:Character}}
├─ {{#invoke:C|generate}}
</includeonly>
  │  └─ Módulo:C (fachada)
<noinclude>
│      ├─ Módulo:C.Utils      ← usado por todos os módulos C.*
{{Predefinição:Character/doc}}
│      ├─ Módulo:C.i18n      ← usado por C.Generate
</noinclude>
  │      ├─ Módulo:C.Skin      ← usa C.Utils
  │      └─ Módulo:C.Generate  ← usa C.Utils, C.i18n, I.Utils, I.Skills
  │          ├─ Módulo:I.Skills ← usa I.Utils, C.Utils
  │          └─ Módulo:I.Utils
  ├─ {{#widget:C.Base}}         (CSS — sem dependências JS)
  ├─ {{#widget:C.Skills}}       (JS — lê data-* gerados por C.Generate)
  ├─ {{#widget:C.Background}}   (JS — lê data-bg-url/data-bg-file)
  ├─ {{#widget:C.Skins}}         (JS — lê .skins-podium gerado por C.Generate)
  ├─ {{#widget:C.Subskills}}     (JS — lê data-subs dos skill-icon)
  ├─ {{#widget:C.Translator}}   (JS — lê data-*-i18n, altera DOM)
  └─ {{#widget:C.WeaponToggle}}  (JS — lê data-weapon dos skill-icon)
 
Módulo:I (fachada)
  ├─ Módulo:I.Utils
  ├─ Módulo:I.Skills  ← usa I.Utils, C.Utils
  └─ Módulo:I.Expand  ← usa I.Utils
</pre>
</noinclude><includeonly>{{#invoke:C|generate
|name={{{name|}}}
|module={{{module|}}}
}}{{#widget:C.Base}}{{#widget:C.Skills}}{{#widget:C.Background}}{{#widget:C.Skins}}{{#widget:C.Subskills}}{{#widget:C.Translator}}{{#widget:C.WeaponToggle}}{{#widget:TiraTitulo}}</includeonly>

Edição atual tal como às 21h20min de 2 de abril de 2026

Arquivos envolvidos

Predefinição

Módulos Lua

  • Módulo:C — Fachada: re-exporta funções de C.Utils, C.i18n, C.Skin e C.Generate.
  • Módulo:C.Generate — Gera todo o HTML server-side (header, icon-bar, skills, skins, data-attributes i18n).
  • Módulo:C.i18n — Constantes i18n (ATTR, FLAGS, TAB, TIER, TAGS) e funções tierPackFrom / tagsPackFrom.
  • Módulo:C.Skin — Serializa dados de skin ({{Skin}}) para JSON consumido por C.Generate.
  • Módulo:C.Utils — Utilitários: trim, fileURL, normalizeDim, makeAttrString, requireCharModule, collectJsonObjects.
  • Módulo:I — Fachada do sistema Info: re-exporta I.Utils, I.Skills, I.Expand.
  • Módulo:I.Skills — Gera JSON de skills/skins a partir do módulo do personagem (skill, skin, forms).
  • Módulo:I.Utils — Utilitários Info: trim, colorize, parseFlags, requireCharacterModule.
  • Módulo:I.Expand — Expande tier/tags i18n via token (getTier, getTags, expandTier, expandTags).

Widgets HTML

  • Widget:C.Base — CSS completo: layout, icon-bar, tabs, skins, responsivo, tier visual.
  • Widget:C.Skills — JS principal: seleção de skill, vídeo, atributos, flags, forms, swap de personagens (`data-swap`, `data-only-character`, `data-character-videos`; opcional `data-default-character` no `#skills` via `character_swap_default` no módulo Lua).
  • Widget:C.Background — JS: carrega background via IndexedDB cache + fallback URL.
  • Widget:C.Skins — JS: podium isométrico, tooltip, offset_x, YouTube spotlight.
  • Widget:C.Subskills — JS: barra aninhada de sub-habilidades, herança de atributos.
  • Widget:C.Translator — JS: troca de idioma (pt/en/es/pl), atualiza tier, tags, descs, flags, skins.
  • Widget:C.WeaponToggle — JS: toggle de arma especial, popup i18n, swap de atributos/vídeos.

Dependências (quem chama quem)

Predefinição:Character
 ├─ {{#invoke:C|generate}}
 │   └─ Módulo:C (fachada)
 │       ├─ Módulo:C.Utils      ← usado por todos os módulos C.*
 │       ├─ Módulo:C.i18n       ← usado por C.Generate
 │       ├─ Módulo:C.Skin       ← usa C.Utils
 │       └─ Módulo:C.Generate   ← usa C.Utils, C.i18n, I.Utils, I.Skills
 │           ├─ Módulo:I.Skills  ← usa I.Utils, C.Utils
 │           └─ Módulo:I.Utils
 ├─ {{#widget:C.Base}}          (CSS — sem dependências JS)
 ├─ {{#widget:C.Skills}}        (JS — lê data-* gerados por C.Generate)
 ├─ {{#widget:C.Background}}    (JS — lê data-bg-url/data-bg-file)
 ├─ {{#widget:C.Skins}}         (JS — lê .skins-podium gerado por C.Generate)
 ├─ {{#widget:C.Subskills}}     (JS — lê data-subs dos skill-icon)
 ├─ {{#widget:C.Translator}}    (JS — lê data-*-i18n, altera DOM)
 └─ {{#widget:C.WeaponToggle}}  (JS — lê data-weapon dos skill-icon)

Módulo:I (fachada)
 ├─ Módulo:I.Utils
 ├─ Módulo:I.Skills   ← usa I.Utils, C.Utils
 └─ Módulo:I.Expand   ← usa I.Utils