trdr-ds-install 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -43,9 +43,23 @@ The skill is **offline-first**: it ships with a snapshot of the catalog (`data/c
43
43
  |---------|-----------|
44
44
  | `/trdr-ds` *(default = analyze)* | Scan + plan, no changes |
45
45
  | `/trdr-ds apply` | Scan + plan + execute after approval |
46
+ | `/trdr-ds apply batch 15` | Same as apply, but process violations in batches of 15 files (default: 25) |
47
+ | `/trdr-ds resume` | Continue a batched migration from the last checkpoint (`DS_PROGRESS.md`) |
48
+ | `/trdr-ds status` | Show migration progress from `DS_PROGRESS.md` — no files modified |
46
49
  | `/trdr-ds sync` | Refresh local snapshot from the Hub (no project changes) |
47
50
  | `/trdr-ds apply --latest` | Sync first, then apply |
48
51
 
52
+ **Large project support:**
53
+
54
+ For projects with more than 50 violations or 30 affected files, Phase 2 switches automatically to **batched mode**:
55
+ - Violations are processed folder by folder (e.g. `src/components/`, `src/pages/`, `src/app/`)
56
+ - Progress is saved to `DS_PROGRESS.md` after each batch — safe to stop and resume across sessions
57
+ - After each batch the dev chooses: `"continuar"` / `"pular [pasta]"` / `"parar"` / `"tudo"`
58
+
59
+ **Logo audit:**
60
+
61
+ Phase 1 automatically scans for logo files (`logo*.svg`, `*trdr*.svg`, `brand*.svg`) and checks each against the official TRDR logo fingerprint (`viewBox="0 0 105 41"`, `fill="#00D4FF"`). Wrong logos are replaced in Phase 2 without changing the filename or path.
62
+
49
63
  The skill matches detected UI patterns against the catalog. Implemented components (`implemented: true`) are applied with full code; stubs (`implemented: false`) get tokens + a banner comment + an entry in `MISSING_COMPONENTS.md` for the maintainer to revisit.
50
64
 
51
65
  ## For maintainers (Mauro)
@@ -98,7 +112,8 @@ trdr-plugins/
98
112
  ├── bin/install.js ← copies skill to ~/.claude/skills
99
113
  ├── scripts/
100
114
  │ ├── sync-components.js ← pull /components.json from Hub
101
- └── sync-tokens.js ← pull /tokens.css from Hub
115
+ ├── sync-tokens.js ← pull /tokens.css from Hub
116
+ │ └── sync-version.js ← syncs Skill version constant on npm version
102
117
  └── plugins/trdr-design-system/
103
118
  ├── .claude-plugin/plugin.json
104
119
  └── skills/trdr-ds/
@@ -107,5 +122,6 @@ trdr-plugins/
107
122
  │ └── components.json ← snapshot of /components.json
108
123
  └── references/
109
124
  ├── rules.md ← absolute design rules (PT-BR)
110
- └── tokens.css ← snapshot of /tokens.css
125
+ ├── tokens.css ← snapshot of /tokens.css
126
+ └── logo-trdr.svg ← official TRDR logo (105×41px)
111
127
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trdr-ds-install",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Installs the TRDR Design System skill for Claude Code",
5
5
  "bin": {
6
6
  "trdr-ds-install": "./bin/install.js"
@@ -6,7 +6,7 @@ argument-hint: "[analyze|apply|resume|status|sync|batch N]"
6
6
  allowed-tools: [Read, Glob, Grep, Edit, Write, Bash, WebFetch]
7
7
  ---
8
8
 
9
- **Skill version:** 1.4.0
9
+ **Skill version:** 1.4.1
10
10
  **npm package:** trdr-ds-install
11
11
 
12
12
  You are implementing the **TRDR Design System** in a developer's project. The Design Hub is the single source of truth and lives at **https://trdr.mrocontent.com.br**.
@@ -55,7 +55,7 @@ Compare the result with the **Skill version** constant at the top of this file (
55
55
  - If registry version == local version: skip silently, continue.
56
56
  - If registry version > local version:
57
57
  ```
58
- 🔄 Nova versão da skill disponível: trdr-ds-install@[registry-version] (instalada: 1.4.0)
58
+ 🔄 Nova versão da skill disponível: trdr-ds-install@[registry-version] (instalada: 1.4.1)
59
59
 
60
60
  Responda:
61
61
  - `"atualizar"` / `"update"` — instalar a nova versão agora (requer reiniciar /trdr-ds após)
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "version": "1.0",
3
- "generatedAt": "2026-05-12T15:34:28.515Z",
4
- "total": 17,
5
- "implemented": 17,
3
+ "generatedAt": "2026-05-12T20:17:42.750Z",
4
+ "total": 18,
5
+ "implemented": 18,
6
6
  "categories": {
7
7
  "formulario": "Formulário / Controles",
8
8
  "modal": "Modais / Overlays",
@@ -1722,6 +1722,127 @@
1722
1722
  "react": "import Janela from '@/components/ui/Janela'\nimport Boleta from '@/components/ui/Boleta'\n\n// Versão default — slot vazio mostra \"Componente coringa\"\n<Janela />\n\n// Com tabs/ferramentas customizadas e callback\n<Janela\n tools={[\n { label: 'Book', icon: 'view_list' },\n { label: 'Gráfico', icon: 'show_chart' },\n ]}\n tabs={['Mercado', 'Posições', 'Histórico']}\n activeTab={0}\n onTabChange={(i) => console.log('tab', i)}\n/>\n\n// Com conteúdo customizado no slot\n<Janela activeTab={2} showSideScroll showBottomScroll>\n <Boleta versao=\"simples\" />\n</Janela>\n\n// Com floating menu de ações aberto\n<Janela\n showActionsMenu\n onActionsMenuToggle={() => setMenuOpen(v => !v)}\n actions={[\n { icon: 'close', label: 'Fechar', onClick: handleClose },\n { icon: 'remove', label: 'Minimizar' },\n { icon: 'arrow_outward', label: 'Maximizar' },\n ]}\n/>",
1723
1723
  "prompt": "Implemente o componente Janela do Design System TRDR — janela de ferramenta de trading composta, pixel-perfect com o Figma 1909:41600.\n\nDIMENSÕES (fixas): 476×312 px, border-radius var(--radius-md) (8px), border 1px solid var(--border-subtle), background var(--bg-secondary), overflow hidden, position relative, font-family var(--font-secondary). Layout em coluna com 3 faixas:\n\n1. HEADER (height 41px, bg var(--bg-secondary), border-bottom 1px var(--border-subtle), padding 0 8px, gap 8px):\n - Tag AI: padding 2px 4px, gap 2px, bg var(--bg-brand) #00D4FF, border-radius var(--radius-sm) 4px, texto \"AI\" Inter 11/600 var(--content-primary). Ícone Material \"auto_awesome\" 12px à esquerda.\n - Abas Ferramentas (flex:1, height 100%, overflow hidden): 3 botões \"Ferramenta N\", padding 0 12px, font Inter 14/16.8 var(--content-tertiary); ativa muda para var(--content-primary) e ganha ::after com height 2px var(--bg-brand) (#00D4FF) no bottom 0 left/right 0. Botão chevron 40×40 com ícone Material \"keyboard_arrow_down\" tertiary.\n - Controles à direita (gap 8px): divider vertical 1×33 var(--border-subtle); botão ícone \"link\" 24×24 cor var(--bg-brand) (cyan); botão \"Multi\" 33h padding 0 8px gap 4 bg var(--action-secondary-default) (#4A4A4A) radius var(--radius-lg) (16px) texto primary + chevron 16px; botões ícone \"more_horiz\" e \"close\" 24×24 tertiary.\n\n2. PILL TABS (height 45px, bg var(--bg-tertiary) #1A1A1A, padding 8px, gap 8px, border-bottom subtle, overflow hidden):\n - 5 pills \"Aba 1..Aba 5\". Cada pill 31h padding 8px 12px radius var(--radius-lg) Inter 14/16.8 whitespace nowrap.\n - Ativa: bg var(--action-secondary-default) #4A4A4A, texto var(--content-primary).\n - Inativa: bg var(--surface-secondary) #222222, texto var(--content-tertiary). Hover muda texto para var(--content-secondary).\n\n3. CONTAINER CENTRAL (flex 1, bg var(--bg-tertiary), padding 16px, gap 8px, position relative, overflow hidden):\n - Slot via children. Quando vazio mostrar fallback \"Componente coringa\" centralizado, Inter 14/16.8 var(--content-primary).\n - Scrollbars opcionais (controlados por props showSideScroll/showBottomScroll):\n • Lateral (right 0, top 0, bottom 6px, width 14px, bg var(--bg-secondary), border-left subtle): seta cima 12×12 Material \"arrow_drop_up\", track 6px com thumb radius 16 bg var(--action-secondary-default) 60% de altura, seta baixo \"arrow_drop_down\".\n • Inferior (left 0, right 14px, height 14px, bg var(--bg-secondary), border-top subtle): seta esquerda \"arrow_left\", track horizontal com thumb radius 16, seta direita \"arrow_right\".\n • Canto: quando ambos ativos, 14×14 no canto inferior direito com bg secondary e borders.\n\n4. FLOATING ACTIONS MENU (opcional, posição absoluta top 45px right 40px, width 172px):\n - bg var(--bg-secondary), border 1px var(--border-subtle), border-radius var(--radius-md) (8px), box-shadow 0 4px 12px rgba(0,0,0,0.30), padding 8px, gap 4px, z-index 10.\n - 5 ações: { close: Fechar, remove: Minimizar, arrow_outward: Maximizar, keep: Fixar, edit: Renomear aba }. Cada item: height 32px, padding 0 8px, gap 8px, border-radius var(--radius-sm), ícone Material 20px var(--content-tertiary), label Inter 14/16.8 var(--content-secondary). Hover bg var(--surface-secondary).\n\nAPI React (TypeScript): props { tools?: JanelaTool[]; activeTool?: number; onToolChange?; tabs?: string[]; activeTab?: number; onTabChange?; multiLabel?: string; onMultiClick?; onLinkClick?; onClose?; showSideScroll?: boolean; showBottomScroll?: boolean; showActionsMenu?: boolean; onActionsMenuToggle?; actions?: JanelaAction[]; children?: ReactNode }. Suporta estado controlado E não-controlado (defaultActiveTool/defaultActiveTab). aria-selected nas pills, aria-expanded no botão de menu, role=\"tab\"/\"tablist\"/\"menu\"/\"menuitem\".\n\nUse APENAS tokens semânticos do TRDR (var(--bg-*), var(--surface-*), var(--content-*), var(--action-*), var(--border-*), var(--radius-*), var(--spacing-*)). NUNCA hex direto. NUNCA --scale-spacing-* ou --scale-radius-* (não existem). O componente deve funcionar nos dois temas (light e dark) sem alterações."
1724
1724
  }
1725
+ },
1726
+ {
1727
+ "slug": "news-card",
1728
+ "name": "News Card",
1729
+ "figmaId": "66:2373",
1730
+ "category": "trading",
1731
+ "description": "Card de notícia financeira — exibe título, fonte, tempo e indicador de sentimento (alta/baixa/neutro). Usado em feeds de notícias dentro do contexto de trading.",
1732
+ "implemented": true,
1733
+ "props": [
1734
+ {
1735
+ "name": "sentiment",
1736
+ "type": "enum",
1737
+ "values": [
1738
+ "up",
1739
+ "down",
1740
+ "neutral"
1741
+ ]
1742
+ },
1743
+ {
1744
+ "name": "title",
1745
+ "type": "string",
1746
+ "values": []
1747
+ },
1748
+ {
1749
+ "name": "source",
1750
+ "type": "string",
1751
+ "values": []
1752
+ },
1753
+ {
1754
+ "name": "time",
1755
+ "type": "string",
1756
+ "values": []
1757
+ },
1758
+ {
1759
+ "name": "href",
1760
+ "type": "string",
1761
+ "values": []
1762
+ }
1763
+ ],
1764
+ "dimensions": [
1765
+ {
1766
+ "label": "Default",
1767
+ "width": "100%",
1768
+ "height": "74px"
1769
+ },
1770
+ {
1771
+ "label": "Dot indicador",
1772
+ "width": "4px",
1773
+ "height": "4px"
1774
+ },
1775
+ {
1776
+ "label": "Botão de ação",
1777
+ "width": "20px",
1778
+ "height": "20px"
1779
+ }
1780
+ ],
1781
+ "tokens": [
1782
+ {
1783
+ "property": "Border bottom",
1784
+ "token": "border.subtle",
1785
+ "value": "#222222"
1786
+ },
1787
+ {
1788
+ "property": "Dot — alta",
1789
+ "token": "context.trading.up",
1790
+ "value": "#4FE290"
1791
+ },
1792
+ {
1793
+ "property": "Dot — baixa",
1794
+ "token": "context.trading.down",
1795
+ "value": "#F34F45"
1796
+ },
1797
+ {
1798
+ "property": "Dot — neutro",
1799
+ "token": "content.tertiary",
1800
+ "value": "#A4A4A4"
1801
+ },
1802
+ {
1803
+ "property": "Título",
1804
+ "token": "content.primary",
1805
+ "value": "#FFFFFF"
1806
+ },
1807
+ {
1808
+ "property": "Fonte / Tempo",
1809
+ "token": "content.tertiary",
1810
+ "value": "#A4A4A4"
1811
+ },
1812
+ {
1813
+ "property": "Separador •",
1814
+ "token": "content.disabled",
1815
+ "value": "#4A4A4A"
1816
+ },
1817
+ {
1818
+ "property": "Hover BG",
1819
+ "token": "surface.secondary",
1820
+ "value": "#222222"
1821
+ },
1822
+ {
1823
+ "property": "Padding",
1824
+ "token": "spacing.sm + spacing.lg",
1825
+ "value": "8px 16px"
1826
+ },
1827
+ {
1828
+ "property": "Gap inner",
1829
+ "token": "spacing.sm",
1830
+ "value": "8px"
1831
+ },
1832
+ {
1833
+ "property": "Radius botão",
1834
+ "token": "radius.sm",
1835
+ "value": "4px"
1836
+ }
1837
+ ],
1838
+ "anatomy": "Container (border-bottom subtle, padding 8px 16px):\n [Dot 4×4px] [Content flex-1 gap-8px] [Action 20×20px]\n Content:\n [Title — Inter 14/400/1.2 content-primary]\n [Meta row gap-8px h-16px]\n [Source 14/400] [• 12px disabled] [Time 14/400]",
1839
+ "notes": "O dot indicador sobe (up) ou desce (down) conforme sentimento da notícia. Hover aplica surface.secondary. Quando href é passado, o container se torna um <a> com target _blank.",
1840
+ "code": {
1841
+ "html": "<!-- News Card — Design System TRDR (Figma: 66:2373) -->\n<!-- sentiment: adicionar .trdr-news-card-dot-up | -down | -neutral -->\n<div class=\"trdr-news-card\">\n <div class=\"trdr-news-card-inner\">\n <div class=\"trdr-news-card-dot trdr-news-card-dot-up\"></div>\n <div class=\"trdr-news-card-content\">\n <p class=\"trdr-news-card-title\">Bitcoin ETF sees record inflows as institutional interest grows</p>\n <div class=\"trdr-news-card-meta\">\n <span class=\"trdr-news-card-source\">CoinDesk</span>\n <span class=\"trdr-news-card-sep\">•</span>\n <span class=\"trdr-news-card-time\">2h ago</span>\n </div>\n </div>\n <button class=\"trdr-news-card-action\" aria-label=\"Abrir notícia\">\n <span class=\"material-symbols-outlined\" style=\"font-size:12px;line-height:12px\">open_in_new</span>\n </button>\n </div>\n</div>",
1842
+ "css": "/* News Card — Design System TRDR (Figma node: 66:2373, 313×74) */\n.trdr-news-card {\n display: flex;\n flex-direction: column;\n padding: 8px 16px; /* --spacing-sm --spacing-lg */\n border-bottom: 1px solid var(--border-subtle); /* #222222 */\n width: 100%;\n cursor: pointer;\n text-decoration: none;\n transition: background-color 0.15s ease;\n}\n\n.trdr-news-card:hover {\n background-color: var(--surface-secondary); /* #222222 */\n}\n\n.trdr-news-card-inner {\n display: flex;\n gap: 8px; /* --spacing-sm */\n align-items: flex-start;\n width: 100%;\n}\n\n.trdr-news-card-dot {\n width: 4px;\n height: 4px;\n border-radius: 9999px;\n flex-shrink: 0;\n margin-top: 6px;\n}\n\n.trdr-news-card-dot-up { background-color: var(--context-trading-up); } /* #4FE290 */\n.trdr-news-card-dot-down { background-color: var(--context-trading-down); } /* #F34F45 */\n.trdr-news-card-dot-neutral{ background-color: var(--content-tertiary); } /* #A4A4A4 */\n\n.trdr-news-card-content {\n display: flex;\n flex-direction: column;\n gap: 8px;\n flex: 1;\n min-width: 0;\n}\n\n.trdr-news-card-title {\n font-family: var(--font-secondary);\n font-size: 14px;\n font-weight: 400;\n line-height: 1.2;\n color: var(--content-primary); /* #FFFFFF */\n width: 100%;\n}\n\n.trdr-news-card-meta {\n display: flex;\n gap: 8px;\n align-items: center;\n height: 16px;\n white-space: nowrap;\n}\n\n.trdr-news-card-source,\n.trdr-news-card-time {\n font-family: var(--font-secondary);\n font-size: 14px;\n font-weight: 400;\n line-height: 1.2;\n color: var(--content-tertiary); /* #A4A4A4 */\n}\n\n.trdr-news-card-sep {\n font-size: 12px;\n line-height: 16px;\n color: var(--content-disabled); /* #4A4A4A */\n}\n\n.trdr-news-card-action {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 4px;\n border-radius: var(--radius-sm); /* 4px */\n flex-shrink: 0;\n width: 20px;\n height: 20px;\n background: transparent;\n border: none;\n cursor: pointer;\n color: var(--content-tertiary);\n transition: background-color 0.15s ease;\n}\n\n.trdr-news-card-action:hover {\n background-color: var(--surface-secondary);\n}",
1843
+ "react": "import NewsCard from '@/components/ui/NewsCard'\n\n// Notícia de alta (dot verde)\n<NewsCard\n sentiment=\"up\"\n title=\"Bitcoin ETF sees record inflows as institutional interest grows\"\n source=\"CoinDesk\"\n time=\"2h ago\"\n href=\"https://coindesk.com/article/...\"\n/>\n\n// Notícia de baixa (dot vermelho)\n<NewsCard\n sentiment=\"down\"\n title=\"Petrobras shares fall on dividend cut concerns\"\n source=\"Valor Econômico\"\n time=\"45m ago\"\n/>\n\n// Neutro com callback no botão de ação\n<NewsCard\n sentiment=\"neutral\"\n title=\"Banco Central mantém Selic em 10,5% ao ano\"\n source=\"Folha\"\n time=\"1h ago\"\n onShare={() => console.log('share clicked')}\n/>",
1844
+ "prompt": "Implemente o componente NewsCard do Design System TRDR — card de notícia financeira, pixel-perfect com o Figma 66:2373.\n\nDIMENSÕES (fixas): width 100%, border-bottom 1px solid var(--border-subtle) (#222222), padding 8px 16px, cursor pointer. Hover: background-color var(--surface-secondary) (#222222).\n\nLAYOUT INTERNO (flex-row, gap 8px, align-items flex-start):\n1. DOT INDICADOR (4×4px, border-radius 9999px, flex-shrink 0, margin-top 6px):\n - sentiment=\"up\" → background var(--context-trading-up) #4FE290\n - sentiment=\"down\" → background var(--context-trading-down) #F34F45\n - sentiment=\"neutral\" → background var(--content-tertiary) #A4A4A4\n\n2. CONTENT (flex: 1, flex-col, gap 8px, min-width 0):\n - Título: font-family var(--font-secondary), 14px/400/1.2, color var(--content-primary) #FFFFFF, width 100%\n - Meta row (flex-row, gap 8px, height 16px, white-space nowrap, align-items center):\n • Fonte: 14px/400/1.2 var(--content-tertiary) #A4A4A4\n • Separador \"•\": 12px/16px var(--content-disabled) #4A4A4A\n • Tempo: 14px/400/1.2 var(--content-tertiary) #A4A4A4\n\n3. BOTÃO DE AÇÃO (20×20px, border-radius var(--radius-sm) 4px, padding 4px, flex-shrink 0):\n - background transparent, border none, color var(--content-tertiary)\n - Hover: background var(--surface-secondary)\n - Ícone: Material Symbols \"open_in_new\" 12px\n\nAPI React: props { title: string; source: string; time: string; sentiment?: 'up' | 'down' | 'neutral'; href?: string; onShare?: () => void }\nQuando href é passado, renderizar como <a target=\"_blank\" rel=\"noreferrer\">, senão como <div>.\n\nUse APENAS tokens semânticos do TRDR. NUNCA hex direto. NUNCA --scale-spacing-* ou --scale-radius-*."
1845
+ }
1725
1846
  }
1726
1847
  ]
1727
1848
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * SNAPSHOT — TRDR Design Tokens
3
3
  * Sincronizado de: https://trdr.mrocontent.com.br/tokens.css
4
- * Em: 2026-05-12T15:40:04.662Z
4
+ * Em: 2026-05-12T20:19:03.361Z
5
5
  * Não edite manualmente — atualize via "npm run sync-tokens"
6
6
  */
7
7