Skip to content

Commit dff1314

Browse files
committed
feat: initial release of token stack selector module
0 parents  commit dff1314

File tree

8 files changed

+888
-0
lines changed

8 files changed

+888
-0
lines changed

.github/workflows/release.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Release Module
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Extract version from tag
17+
id: extract_version
18+
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
19+
20+
- name: Update module.json version
21+
run: |
22+
sed -i 's/"version": ".*"/"version": "${{ steps.extract_version.outputs.version }}"/' module.json
23+
24+
- name: Create module archive
25+
run: |
26+
zip -r token-stack-selector.zip . \
27+
-x "*.git*" \
28+
-x "node_modules/*" \
29+
-x "dist/*" \
30+
-x "*.md" \
31+
-x "screenshots/*" \
32+
-x ".github/*"
33+
34+
- name: Create Release
35+
id: create_release
36+
uses: actions/create-release@v1
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
with:
40+
tag_name: ${{ github.ref }}
41+
release_name: Release ${{ steps.extract_version.outputs.version }}
42+
body: |
43+
## 🚀 Token Stack Selector v${{ steps.extract_version.outputs.version }}
44+
45+
### 📦 Instalação
46+
47+
**Método 1: Automática**
48+
```
49+
https://github.com/${{ github.repository }}/releases/latest/download/module.json
50+
```
51+
52+
**Método 2: Manual**
53+
Baixe o arquivo `token-stack-selector.zip` e extraia na pasta `Data/modules/` do Foundry VTT.
54+
55+
### 📋 Changelog
56+
57+
Veja as mudanças completas no [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md).
58+
59+
---
60+
61+
**Compatibilidade**: Foundry VTT v11-v12
62+
63+
draft: false
64+
prerelease: false
65+
66+
- name: Upload module.json
67+
uses: actions/upload-release-asset@v1
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
with:
71+
upload_url: ${{ steps.create_release.outputs.upload_url }}
72+
asset_path: ./module.json
73+
asset_name: module.json
74+
asset_content_type: application/json
75+
76+
- name: Upload module archive
77+
uses: actions/upload-release-asset@v1
78+
env:
79+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
with:
81+
upload_url: ${{ steps.create_release.outputs.upload_url }}
82+
asset_path: ./token-stack-selector.zip
83+
asset_name: token-stack-selector.zip
84+
asset_content_type: application/zip

.gitignore

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node_modules
30+
node_modules/
31+
32+
# Optional npm cache directory
33+
.npm
34+
35+
# Optional REPL history
36+
.node_repl_history
37+
38+
# Output of 'npm pack'
39+
*.tgz
40+
41+
# Yarn Integrity file
42+
.yarn-integrity
43+
44+
# dotenv environment variables file
45+
.env
46+
47+
# IDE files
48+
.vscode/
49+
.idea/
50+
*.swp
51+
*.swo
52+
*~
53+
54+
# OS generated files
55+
.DS_Store
56+
.DS_Store?
57+
._*
58+
.Spotlight-V100
59+
.Trashes
60+
ehthumbs.db
61+
Thumbs.db
62+
63+
# Build files
64+
dist/
65+
build/
66+
*.zip
67+
68+
# Temporary files
69+
*.tmp
70+
*.temp

CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Changelog
2+
3+
Todas as mudanças notáveis deste projeto serão documentadas neste arquivo.
4+
5+
O formato é baseado em [Keep a Changelog](https://keepachangelog.com/pt-BR/1.0.0/),
6+
e este projeto adere ao [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [1.0.0] - 2024-01-XX
9+
10+
### Adicionado
11+
12+
- ✨ Interface moderna para seleção de tokens empilhados
13+
- 🎯 Ícone único combinando grupo de usuários + mira
14+
- 🎨 Design premium similar ao painel de condições do Foundry
15+
- 📊 Contador visual mostrando quantos tokens estão empilhados
16+
- 🖱️ Seleção inteligente que traz o token para frente automaticamente
17+
- 📱 Posicionamento inteligente do painel (não sai da tela)
18+
- ⌨️ Suporte a múltiplas formas de fechar (ESC, clique fora, seleção)
19+
- 🔄 Sistema de restauração automática do z-index
20+
- 📋 Informações detalhadas dos tokens (nome, tipo, HP)
21+
- 🎭 Animações suaves e feedback visual
22+
- 📜 Scrollbar customizada para muitos tokens
23+
- 🔧 Compatibilidade com Foundry VTT v11-v12
24+
25+
### Funcionalidades
26+
27+
- **Token HUD Integration**: Botão aparece automaticamente quando há tokens empilhados
28+
- **Drag & Drop**: Token selecionado pode ser movido imediatamente
29+
- **Visual Feedback**: Notificações confirmando ações
30+
- **Responsive Design**: Interface se adapta ao tamanho da tela
31+
- **Performance**: Otimizado para não afetar performance do jogo
32+
33+
---
34+
35+
## [Não Lançado]
36+
37+
### Planejado
38+
39+
- 🌐 Suporte a múltiplos idiomas
40+
- ⚙️ Configurações do módulo
41+
- 🎨 Temas customizáveis
42+
- 📊 Estatísticas de uso
43+
- 🔍 Filtros de tokens
44+
- 🎮 Atalhos de teclado
45+
46+
---
47+
48+
_Formato baseado em [Keep a Changelog](https://keepachangelog.com/)_

CONTRIBUTING.md

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
# Guia de Contribuição
2+
3+
Obrigado por considerar contribuir com o **Token Stack Selector**! 🎉
4+
5+
## 🤝 Como Contribuir
6+
7+
### Reportando Bugs
8+
9+
Encontrou um bug? Ajude-nos a melhorar!
10+
11+
1. **Verifique se já não foi reportado** nas [Issues](https://github.com/Sub-Dev/token-stack-selector/issues)
12+
2. **Use o template de bug** ao criar uma nova issue
13+
3. **Forneça informações detalhadas**:
14+
- Versão do Foundry VTT
15+
- Versão do módulo
16+
- Sistema utilizado (D&D 5e, PF2e, etc.)
17+
- Passos para reproduzir
18+
- Screenshots/vídeos se possível
19+
20+
### Sugerindo Melhorias
21+
22+
Tem uma ideia incrível? Queremos ouvir!
23+
24+
1. **Verifique se já não foi sugerido** nas Issues
25+
2. **Use o template de feature request**
26+
3. **Descreva detalhadamente**:
27+
- Problema que resolve
28+
- Solução proposta
29+
- Mockups se aplicável
30+
31+
### Desenvolvendo
32+
33+
#### Pré-requisitos
34+
35+
- Node.js 16+ (se usando ferramentas de build)
36+
- Foundry VTT (para testes)
37+
- Git
38+
39+
#### Setup Local
40+
41+
```bash
42+
# Clone o repositório
43+
git clone https://github.com/Sub-Dev/token-stack-selector.git
44+
cd token-stack-selector
45+
46+
# Crie um link simbólico na pasta de módulos do Foundry
47+
# Windows (Admin):
48+
mklink /D "C:\Users\SEU_USUARIO\AppData\Local\FoundryVTT\Data\modules\token-stack-selector" "C:\CAMINHO\PARA\token-stack-selector"
49+
50+
# Linux/Mac:
51+
ln -s /caminho/para/token-stack-selector ~/.local/share/FoundryVTT/Data/modules/token-stack-selector
52+
```
53+
54+
#### Padrões de Código
55+
56+
- **JavaScript**: ES6+ com JSDoc quando necessário
57+
- **CSS**: Use as classes existentes do Foundry quando possível
58+
- **Comentários**: Em português para facilitar contribuições da comunidade brasileira
59+
- **Formatação**: Use 2 espaços para indentação
60+
61+
#### Estrutura de Commits
62+
63+
Use o padrão [Conventional Commits](https://www.conventionalcommits.org/):
64+
65+
```
66+
tipo(escopo): descrição
67+
68+
Corpo da mensagem (opcional)
69+
70+
Rodapé (opcional)
71+
```
72+
73+
**Tipos:**
74+
75+
- `feat`: nova funcionalidade
76+
- `fix`: correção de bug
77+
- `docs`: documentação
78+
- `style`: formatação/estilo
79+
- `refactor`: refatoração
80+
- `test`: testes
81+
- `chore`: tarefas de manutenção
82+
83+
**Exemplos:**
84+
85+
```bash
86+
feat(ui): adicionar suporte a tema escuro
87+
fix(selection): corrigir problema com tokens invisíveis
88+
docs(readme): atualizar instruções de instalação
89+
```
90+
91+
#### Processo de Pull Request
92+
93+
1. **Fork** o repositório
94+
2. **Crie uma branch** para sua feature/correção:
95+
```bash
96+
git checkout -b feature/minha-feature
97+
# ou
98+
git checkout -b fix/meu-bug
99+
```
100+
3. **Desenvolva e teste** suas mudanças
101+
4. **Commit** seguindo os padrões
102+
5. **Push** para seu fork:
103+
```bash
104+
git push origin feature/minha-feature
105+
```
106+
6. **Abra um Pull Request** com:
107+
- Título descritivo
108+
- Descrição detalhada das mudanças
109+
- Screenshots/GIFs se aplicável
110+
- Referência a issues relacionadas
111+
112+
#### Testes
113+
114+
Antes de submeter, teste:
115+
116+
- ✅ Módulo carrega sem erros
117+
- ✅ Funcionalidade principal funciona
118+
- ✅ Não quebra funcionalidades existentes
119+
- ✅ Interface responsiva
120+
- ✅ Compatibilidade com diferentes sistemas
121+
122+
## 📋 Checklist do Contribuidor
123+
124+
- [ ] Li e entendi este guia
125+
- [ ] Testei minhas mudanças localmente
126+
- [ ] Segui os padrões de código
127+
- [ ] Atualizei documentação se necessário
128+
- [ ] Meu código não quebra funcionalidades existentes
129+
130+
## 🎯 Áreas Prioritárias
131+
132+
Contribuições são especialmente bem-vindas em:
133+
134+
1. **Tradução/Localização**
135+
2. **Testes em diferentes sistemas**
136+
3. **Performance/Otimização**
137+
4. **Acessibilidade**
138+
5. **Documentação**
139+
140+
## 💬 Comunicação
141+
142+
- **Issues**: Para bugs e sugestões
143+
- **Discussions**: Para dúvidas e ideias
144+
- **Discord**: `sub-dev` para chat direto
145+
146+
## 📜 Licença
147+
148+
Ao contribuir, você concorda que suas contribuições serão licenciadas sob a mesma [Licença MIT](LICENSE).
149+
150+
---
151+
152+
**Obrigado por tornar este projeto melhor! 🚀**

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Sub-Dev
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)