logos-bancos-br 0.1.0

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.
Files changed (236) hide show
  1. package/LICENSE +25 -0
  2. package/README.en.md +160 -0
  3. package/README.md +223 -0
  4. package/data/bancos.json +4941 -0
  5. package/dist/chunk-BIKMT23N.cjs +71 -0
  6. package/dist/chunk-S4JZVP5E.js +4997 -0
  7. package/dist/chunk-SPP4OABR.js +70 -0
  8. package/dist/chunk-ZGDTPJIV.cjs +5002 -0
  9. package/dist/cli.cjs +88 -0
  10. package/dist/cli.d.cts +1 -0
  11. package/dist/cli.d.ts +1 -0
  12. package/dist/cli.js +88 -0
  13. package/dist/index.cjs +20 -0
  14. package/dist/index.d.cts +82 -0
  15. package/dist/index.d.ts +82 -0
  16. package/dist/index.js +20 -0
  17. package/dist/node.cjs +11 -0
  18. package/dist/node.d.cts +29 -0
  19. package/dist/node.d.ts +29 -0
  20. package/dist/node.js +11 -0
  21. package/llms.txt +48 -0
  22. package/logos/png/00000000.png +0 -0
  23. package/logos/png/00000208.png +0 -0
  24. package/logos/png/00315557.png +0 -0
  25. package/logos/png/00329598.png +0 -0
  26. package/logos/png/00360305.png +0 -0
  27. package/logos/png/00416968.png +0 -0
  28. package/logos/png/00517645.png +0 -0
  29. package/logos/png/00795423.png +0 -0
  30. package/logos/png/01027058.png +0 -0
  31. package/logos/png/01181521.png +0 -0
  32. package/logos/png/02038232.png +0 -0
  33. package/logos/png/02332886.png +0 -0
  34. package/logos/png/02398976.png +0 -0
  35. package/logos/png/02682287.png +0 -0
  36. package/logos/png/03017677.png +0 -0
  37. package/logos/png/03311443.png +0 -0
  38. package/logos/png/03816413.png +0 -0
  39. package/logos/png/04184779.png +0 -0
  40. package/logos/png/04902979.png +0 -0
  41. package/logos/png/04913711.png +0 -0
  42. package/logos/png/05463212.png +0 -0
  43. package/logos/png/06271464.png +0 -0
  44. package/logos/png/07138049.png +0 -0
  45. package/logos/png/07207996.png +0 -0
  46. package/logos/png/07237373.png +0 -0
  47. package/logos/png/08357240.png +0 -0
  48. package/logos/png/08561701.png +0 -0
  49. package/logos/png/09089356.png +0 -0
  50. package/logos/png/09464032.png +0 -0
  51. package/logos/png/09516419.png +0 -0
  52. package/logos/png/10398952.png +0 -0
  53. package/logos/png/10440482.png +0 -0
  54. package/logos/png/10573521.png +0 -0
  55. package/logos/png/10664513.png +0 -0
  56. package/logos/png/11285104.png +0 -0
  57. package/logos/png/11351086.png +0 -0
  58. package/logos/png/11581339.png +0 -0
  59. package/logos/png/13009717.png +0 -0
  60. package/logos/png/13140088.png +0 -0
  61. package/logos/png/13203354.png +0 -0
  62. package/logos/png/13370835.png +0 -0
  63. package/logos/png/13884775.png +0 -0
  64. package/logos/png/13935893.png +0 -0
  65. package/logos/png/15111975.png +0 -0
  66. package/logos/png/16501555.png +0 -0
  67. package/logos/png/17184037.png +0 -0
  68. package/logos/png/18189547.png +0 -0
  69. package/logos/png/18236120.png +0 -0
  70. package/logos/png/19468242.png +0 -0
  71. package/logos/png/19540550.png +0 -0
  72. package/logos/png/20308187.png +0 -0
  73. package/logos/png/20855875.png +0 -0
  74. package/logos/png/21018182.png +0 -0
  75. package/logos/png/22896431.png +0 -0
  76. package/logos/png/24313102.png +0 -0
  77. package/logos/png/27098060.png +0 -0
  78. package/logos/png/27351731.png +0 -0
  79. package/logos/png/27652684.png +0 -0
  80. package/logos/png/28127603.png +0 -0
  81. package/logos/png/29162769.png +0 -0
  82. package/logos/png/30306294.png +0 -0
  83. package/logos/png/30680829.png +0 -0
  84. package/logos/png/30723871.png +0 -0
  85. package/logos/png/31680151.png +0 -0
  86. package/logos/png/31872495.png +0 -0
  87. package/logos/png/31880826.png +0 -0
  88. package/logos/png/32402502.png +0 -0
  89. package/logos/png/33040601.png +0 -0
  90. package/logos/png/33042151.png +0 -0
  91. package/logos/png/33042953.png +0 -0
  92. package/logos/png/33147315.png +0 -0
  93. package/logos/png/33264668.png +0 -0
  94. package/logos/png/33479023.png +0 -0
  95. package/logos/png/34088029.png +0 -0
  96. package/logos/png/37229413.png +0 -0
  97. package/logos/png/37241230.png +0 -0
  98. package/logos/png/37679449.png +0 -0
  99. package/logos/png/37715993.png +0 -0
  100. package/logos/png/37880206.png +0 -0
  101. package/logos/png/39664698.png +0 -0
  102. package/logos/png/43180355.png +0 -0
  103. package/logos/png/45246410.png +0 -0
  104. package/logos/png/48632754.png +0 -0
  105. package/logos/png/48703388.png +0 -0
  106. package/logos/png/50585090.png +0 -0
  107. package/logos/png/51342763.png +0 -0
  108. package/logos/png/53505601.png +0 -0
  109. package/logos/png/54403563.png +0 -0
  110. package/logos/png/58160789.png +0 -0
  111. package/logos/png/59285411.png +0 -0
  112. package/logos/png/59588111.png +0 -0
  113. package/logos/png/60701190.png +0 -0
  114. package/logos/png/60746948.png +0 -0
  115. package/logos/png/60889128.png +0 -0
  116. package/logos/png/61021673.png +0 -0
  117. package/logos/png/61033106.png +0 -0
  118. package/logos/png/61186680.png +0 -0
  119. package/logos/png/61348538.png +0 -0
  120. package/logos/png/61723847.png +0 -0
  121. package/logos/png/62169875.png +0 -0
  122. package/logos/png/62285390.png +0 -0
  123. package/logos/png/62421979.png +0 -0
  124. package/logos/png/68900810.png +0 -0
  125. package/logos/png/70119680.png +0 -0
  126. package/logos/png/74014747.png +0 -0
  127. package/logos/png/90400888.png +0 -0
  128. package/logos/png/92702067.png +0 -0
  129. package/logos/svg/00000000.svg +7 -0
  130. package/logos/svg/00000208.svg +11 -0
  131. package/logos/svg/00315557.svg +11 -0
  132. package/logos/svg/00329598.svg +1 -0
  133. package/logos/svg/00360305.svg +72 -0
  134. package/logos/svg/00416968.svg +11 -0
  135. package/logos/svg/00517645.svg +13 -0
  136. package/logos/svg/00795423.svg +47 -0
  137. package/logos/svg/01027058.svg +9 -0
  138. package/logos/svg/01181521.svg +24 -0
  139. package/logos/svg/02038232.svg +5 -0
  140. package/logos/svg/02332886.svg +1 -0
  141. package/logos/svg/02398976.svg +139 -0
  142. package/logos/svg/02682287.svg +12 -0
  143. package/logos/svg/03017677.svg +12 -0
  144. package/logos/svg/03311443.svg +1720 -0
  145. package/logos/svg/03816413.svg +12 -0
  146. package/logos/svg/04184779.svg +1 -0
  147. package/logos/svg/04902979.svg +17 -0
  148. package/logos/svg/04913711.svg +1 -0
  149. package/logos/svg/05463212.svg +192 -0
  150. package/logos/svg/06271464.svg +1 -0
  151. package/logos/svg/07138049.svg +5 -0
  152. package/logos/svg/07237373.svg +1 -0
  153. package/logos/svg/08357240.svg +25 -0
  154. package/logos/svg/08561701.svg +27 -0
  155. package/logos/svg/09089356.svg +12 -0
  156. package/logos/svg/09464032.svg +29 -0
  157. package/logos/svg/09516419.svg +5 -0
  158. package/logos/svg/10398952.svg +25 -0
  159. package/logos/svg/10440482.svg +4 -0
  160. package/logos/svg/10573521.svg +7 -0
  161. package/logos/svg/10664513.svg +30 -0
  162. package/logos/svg/11285104.svg +10 -0
  163. package/logos/svg/11351086.svg +30 -0
  164. package/logos/svg/11581339.svg +19 -0
  165. package/logos/svg/13009717.svg +76 -0
  166. package/logos/svg/13140088.svg +106 -0
  167. package/logos/svg/13203354.svg +1 -0
  168. package/logos/svg/13370835.svg +5 -0
  169. package/logos/svg/13884775.svg +20 -0
  170. package/logos/svg/13935893.svg +14 -0
  171. package/logos/svg/15111975.svg +1 -0
  172. package/logos/svg/16501555.svg +25 -0
  173. package/logos/svg/17184037.svg +29 -0
  174. package/logos/svg/18189547.svg +90 -0
  175. package/logos/svg/18236120.svg +1 -0
  176. package/logos/svg/19468242.svg +13 -0
  177. package/logos/svg/19540550.svg +17 -0
  178. package/logos/svg/20308187.svg +33 -0
  179. package/logos/svg/20855875.svg +10 -0
  180. package/logos/svg/21018182.svg +8 -0
  181. package/logos/svg/22896431.svg +5 -0
  182. package/logos/svg/24313102.svg +7 -0
  183. package/logos/svg/27098060.svg +45 -0
  184. package/logos/svg/27351731.svg +17 -0
  185. package/logos/svg/27652684.svg +38 -0
  186. package/logos/svg/28127603.svg +43 -0
  187. package/logos/svg/29162769.svg +10 -0
  188. package/logos/svg/30306294.svg +4 -0
  189. package/logos/svg/30680829.svg +1 -0
  190. package/logos/svg/30723871.svg +36 -0
  191. package/logos/svg/31680151.svg +7 -0
  192. package/logos/svg/31872495.svg +3 -0
  193. package/logos/svg/31880826.svg +295 -0
  194. package/logos/svg/32402502.svg +24 -0
  195. package/logos/svg/33040601.svg +29 -0
  196. package/logos/svg/33042151.svg +1 -0
  197. package/logos/svg/33042953.svg +21 -0
  198. package/logos/svg/33147315.svg +1 -0
  199. package/logos/svg/33264668.svg +1 -0
  200. package/logos/svg/33479023.svg +21 -0
  201. package/logos/svg/34088029.svg +1 -0
  202. package/logos/svg/37229413.svg +12 -0
  203. package/logos/svg/37241230.svg +4 -0
  204. package/logos/svg/37679449.svg +7 -0
  205. package/logos/svg/37715993.svg +26 -0
  206. package/logos/svg/37880206.svg +4 -0
  207. package/logos/svg/39664698.svg +9 -0
  208. package/logos/svg/43180355.svg +119 -0
  209. package/logos/svg/45246410.svg +38 -0
  210. package/logos/svg/48632754.svg +14 -0
  211. package/logos/svg/48703388.svg +5 -0
  212. package/logos/svg/50585090.svg +5 -0
  213. package/logos/svg/51342763.svg +5 -0
  214. package/logos/svg/53505601.svg +25 -0
  215. package/logos/svg/54403563.svg +16 -0
  216. package/logos/svg/58160789.svg +12 -0
  217. package/logos/svg/59285411.svg +12 -0
  218. package/logos/svg/59588111.svg +13 -0
  219. package/logos/svg/60701190.svg +16 -0
  220. package/logos/svg/60746948.svg +1 -0
  221. package/logos/svg/60889128.svg +17 -0
  222. package/logos/svg/61021673.svg +20 -0
  223. package/logos/svg/61033106.svg +4 -0
  224. package/logos/svg/61186680.svg +5 -0
  225. package/logos/svg/61348538.svg +3 -0
  226. package/logos/svg/61723847.svg +10 -0
  227. package/logos/svg/62169875.svg +1 -0
  228. package/logos/svg/62285390.svg +24 -0
  229. package/logos/svg/62421979.svg +5 -0
  230. package/logos/svg/68900810.svg +10 -0
  231. package/logos/svg/70119680.svg +24 -0
  232. package/logos/svg/90400888.svg +10 -0
  233. package/logos/svg/92702067.svg +21 -0
  234. package/package.json +88 -0
  235. package/react-native.d.ts +10 -0
  236. package/react-native.js +222 -0
package/dist/cli.cjs ADDED
@@ -0,0 +1,88 @@
1
+ #!/usr/bin/env node
2
+ "use strict"; function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
3
+
4
+ var _chunkBIKMT23Ncjs = require('./chunk-BIKMT23N.cjs');
5
+
6
+
7
+
8
+ var _chunkZGDTPJIVcjs = require('./chunk-ZGDTPJIV.cjs');
9
+
10
+ // src/cli.ts
11
+ var _util = require('util');
12
+ var HELP = `logos-bancos-br v${_chunkZGDTPJIVcjs.version} \u2014 logos e dados de bancos brasileiros (fontes oficiais)
13
+
14
+ Uso:
15
+ logos-bancos-br copy --dest <dir> [--format png|svg|both] [--by compe|ispb] [--only 341,001]
16
+ Copia os logos para um diret\xF3rio do seu projeto (qualquer stack).
17
+ --format png (padr\xE3o), svg ou both
18
+ --by nome dos arquivos: compe (0341.png, padr\xE3o) ou ispb (60701190.png)
19
+ --only restringe a c\xF3digos COMPE/ISPB separados por v\xEDrgula
20
+
21
+ logos-bancos-br list [--json]
22
+ Lista as institui\xE7\xF5es (COMPE, ISPB, nome, se h\xE1 logo). --json emite o dataset.
23
+
24
+ logos-bancos-br help
25
+ `;
26
+ function fail(message) {
27
+ console.error(`erro: ${message}
28
+ `);
29
+ console.error(HELP);
30
+ process.exit(1);
31
+ }
32
+ var [command, ...rest] = process.argv.slice(2);
33
+ switch (command) {
34
+ case "copy": {
35
+ const { values } = _util.parseArgs.call(void 0, {
36
+ args: rest,
37
+ options: {
38
+ dest: { type: "string" },
39
+ format: { type: "string", default: "png" },
40
+ by: { type: "string", default: "compe" },
41
+ only: { type: "string" }
42
+ }
43
+ });
44
+ if (!values.dest) fail("--dest \xE9 obrigat\xF3rio em `copy`");
45
+ if (!["png", "svg", "both"].includes(_nullishCoalesce(values.format, () => ( "")))) {
46
+ fail(`--format inv\xE1lido: ${values.format}`);
47
+ }
48
+ if (!["compe", "ispb"].includes(_nullishCoalesce(values.by, () => ( "")))) fail(`--by inv\xE1lido: ${values.by}`);
49
+ const only = values.only ? values.only.split(",").map((token) => token.trim()).filter(Boolean) : void 0;
50
+ const result = _chunkBIKMT23Ncjs.copyLogos.call(void 0, {
51
+ dest: values.dest,
52
+ format: values.format,
53
+ by: values.by,
54
+ only
55
+ });
56
+ console.log(`${result.copied.length} arquivo(s) copiado(s) para ${values.dest}`);
57
+ if (result.skippedNoSvg.length) {
58
+ console.log(
59
+ `${result.skippedNoSvg.length} institui\xE7\xE3o(\xF5es) sem SVG seguro (s\xF3 PNG): ${result.skippedNoSvg.join(", ")}`
60
+ );
61
+ }
62
+ break;
63
+ }
64
+ case "list": {
65
+ const { values } = _util.parseArgs.call(void 0, { args: rest, options: { json: { type: "boolean" } } });
66
+ const all = _chunkZGDTPJIVcjs.banks.call(void 0, );
67
+ if (values.json) {
68
+ console.log(JSON.stringify({ banks: all }, null, 2));
69
+ break;
70
+ }
71
+ for (const bank of all) {
72
+ const marker = bank.logo ? "\u25CF" : "\xB7";
73
+ console.log(`${marker} ${bank.compe4} ${bank.ispb} ${bank.shortName || bank.name}`);
74
+ }
75
+ const withLogo = all.filter((bank) => bank.logo).length;
76
+ console.log(`
77
+ ${all.length} institui\xE7\xF5es \xB7 ${withLogo} com logo (\u25CF)`);
78
+ break;
79
+ }
80
+ case "help":
81
+ case "--help":
82
+ case "-h":
83
+ case void 0:
84
+ console.log(HELP);
85
+ break;
86
+ default:
87
+ fail(`comando desconhecido: ${command}`);
88
+ }
package/dist/cli.d.cts ADDED
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
package/dist/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
package/dist/cli.js ADDED
@@ -0,0 +1,88 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ copyLogos
4
+ } from "./chunk-SPP4OABR.js";
5
+ import {
6
+ banks,
7
+ version
8
+ } from "./chunk-S4JZVP5E.js";
9
+
10
+ // src/cli.ts
11
+ import { parseArgs } from "util";
12
+ var HELP = `logos-bancos-br v${version} \u2014 logos e dados de bancos brasileiros (fontes oficiais)
13
+
14
+ Uso:
15
+ logos-bancos-br copy --dest <dir> [--format png|svg|both] [--by compe|ispb] [--only 341,001]
16
+ Copia os logos para um diret\xF3rio do seu projeto (qualquer stack).
17
+ --format png (padr\xE3o), svg ou both
18
+ --by nome dos arquivos: compe (0341.png, padr\xE3o) ou ispb (60701190.png)
19
+ --only restringe a c\xF3digos COMPE/ISPB separados por v\xEDrgula
20
+
21
+ logos-bancos-br list [--json]
22
+ Lista as institui\xE7\xF5es (COMPE, ISPB, nome, se h\xE1 logo). --json emite o dataset.
23
+
24
+ logos-bancos-br help
25
+ `;
26
+ function fail(message) {
27
+ console.error(`erro: ${message}
28
+ `);
29
+ console.error(HELP);
30
+ process.exit(1);
31
+ }
32
+ var [command, ...rest] = process.argv.slice(2);
33
+ switch (command) {
34
+ case "copy": {
35
+ const { values } = parseArgs({
36
+ args: rest,
37
+ options: {
38
+ dest: { type: "string" },
39
+ format: { type: "string", default: "png" },
40
+ by: { type: "string", default: "compe" },
41
+ only: { type: "string" }
42
+ }
43
+ });
44
+ if (!values.dest) fail("--dest \xE9 obrigat\xF3rio em `copy`");
45
+ if (!["png", "svg", "both"].includes(values.format ?? "")) {
46
+ fail(`--format inv\xE1lido: ${values.format}`);
47
+ }
48
+ if (!["compe", "ispb"].includes(values.by ?? "")) fail(`--by inv\xE1lido: ${values.by}`);
49
+ const only = values.only ? values.only.split(",").map((token) => token.trim()).filter(Boolean) : void 0;
50
+ const result = copyLogos({
51
+ dest: values.dest,
52
+ format: values.format,
53
+ by: values.by,
54
+ only
55
+ });
56
+ console.log(`${result.copied.length} arquivo(s) copiado(s) para ${values.dest}`);
57
+ if (result.skippedNoSvg.length) {
58
+ console.log(
59
+ `${result.skippedNoSvg.length} institui\xE7\xE3o(\xF5es) sem SVG seguro (s\xF3 PNG): ${result.skippedNoSvg.join(", ")}`
60
+ );
61
+ }
62
+ break;
63
+ }
64
+ case "list": {
65
+ const { values } = parseArgs({ args: rest, options: { json: { type: "boolean" } } });
66
+ const all = banks();
67
+ if (values.json) {
68
+ console.log(JSON.stringify({ banks: all }, null, 2));
69
+ break;
70
+ }
71
+ for (const bank of all) {
72
+ const marker = bank.logo ? "\u25CF" : "\xB7";
73
+ console.log(`${marker} ${bank.compe4} ${bank.ispb} ${bank.shortName || bank.name}`);
74
+ }
75
+ const withLogo = all.filter((bank) => bank.logo).length;
76
+ console.log(`
77
+ ${all.length} institui\xE7\xF5es \xB7 ${withLogo} com logo (\u25CF)`);
78
+ break;
79
+ }
80
+ case "help":
81
+ case "--help":
82
+ case "-h":
83
+ case void 0:
84
+ console.log(HELP);
85
+ break;
86
+ default:
87
+ fail(`comando desconhecido: ${command}`);
88
+ }
package/dist/index.cjs ADDED
@@ -0,0 +1,20 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+ var _chunkZGDTPJIVcjs = require('./chunk-ZGDTPJIV.cjs');
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+ exports.banks = _chunkZGDTPJIVcjs.banks; exports.byCompe = _chunkZGDTPJIVcjs.byCompe; exports.byIspb = _chunkZGDTPJIVcjs.byIspb; exports.findBank = _chunkZGDTPJIVcjs.findBank; exports.logoCdnUrl = _chunkZGDTPJIVcjs.logoCdnUrl; exports.normalizeCompe = _chunkZGDTPJIVcjs.normalizeCompe; exports.normalizeIspb = _chunkZGDTPJIVcjs.normalizeIspb; exports.version = _chunkZGDTPJIVcjs.version;
@@ -0,0 +1,82 @@
1
+ /**
2
+ * logos-bancos-br — Brazilian bank logos and data from official sources only.
3
+ *
4
+ * Universal entry point: works in Node, bundlers (web) and React Native.
5
+ * The dataset is inlined at build time; no filesystem or network access.
6
+ *
7
+ * - Node filesystem paths for the shipped assets: `logos-bancos-br/node`.
8
+ * - React Native static require() map: `logos-bancos-br/react-native`.
9
+ */
10
+ interface BankLogoSource {
11
+ /**
12
+ * Where the logo came from:
13
+ * - `openfinance`: published by the institution in the Open Finance Brasil
14
+ * participants directory (matched by ISPB/CNPJ);
15
+ * - `direct-uri`: a hand-reviewed direct URL;
16
+ * - `override`: a manually maintained file in the repository.
17
+ */
18
+ type: 'openfinance' | 'direct-uri' | 'override';
19
+ /** Open Finance organisation name, when type is `openfinance`. */
20
+ org: string | null;
21
+ /** Organisation CNPJ (14 digits), when type is `openfinance`. */
22
+ cnpj: string | null;
23
+ /** Source URI of the original artwork. */
24
+ uri: string;
25
+ /** SHA-256 of the original artwork (provenance / change detection). */
26
+ sha256: string;
27
+ /** ISO date (YYYY-MM-DD) of the last time the artwork changed. */
28
+ updatedAt: string;
29
+ }
30
+ interface BankLogo {
31
+ /** Package-relative path of the normalized 256×256 PNG. */
32
+ png: string;
33
+ /** Package-relative path of the original SVG, when safely redistributable. */
34
+ svg: string | null;
35
+ source: BankLogoSource;
36
+ }
37
+ interface Bank {
38
+ /** 8-digit ISPB (Central Bank identifier). */
39
+ ispb: string;
40
+ /** COMPE number as published by the Central Bank (e.g. "1", "341"). */
41
+ compe: string;
42
+ /** COMPE zero-padded to 4 digits (e.g. "0001", "0341"). */
43
+ compe4: string;
44
+ /** Official full name (Nome Extenso). */
45
+ name: string;
46
+ /** Official short name (Nome Reduzido). */
47
+ shortName: string;
48
+ /** Logo info, or null when the institution has no logo in the official sources. */
49
+ logo: BankLogo | null;
50
+ }
51
+ /** Package version (used to pin CDN URLs). */
52
+ declare const version: string;
53
+ /** Normalizes a COMPE code ("341", 341, "0341") to the 4-digit form. */
54
+ declare function normalizeCompe(code: string | number): string;
55
+ /** Normalizes an ISPB (number or string) to the 8-digit form. */
56
+ declare function normalizeIspb(ispb: string | number): string;
57
+ /** Every institution in the Central Bank STR list that has a COMPE number. */
58
+ declare function banks(): readonly Bank[];
59
+ /** Looks a bank up by COMPE code ("341", 341 and "0341" are equivalent). */
60
+ declare function byCompe(code: string | number): Bank | undefined;
61
+ /** Looks a bank up by 8-digit ISPB. */
62
+ declare function byIspb(ispb: string | number): Bank | undefined;
63
+ /**
64
+ * Convenience lookup: digits with more than 4 characters are treated as an
65
+ * ISPB, anything else as a COMPE code.
66
+ */
67
+ declare function findBank(code: string | number | Bank): Bank | undefined;
68
+ interface LogoCdnUrlOptions {
69
+ /** Which asset to link. Defaults to `png`; `svg` returns null when there is no safe SVG. */
70
+ format?: 'png' | 'svg';
71
+ /** Package version for the pinned URL. Defaults to this build's version. */
72
+ version?: string;
73
+ }
74
+ /**
75
+ * URL of the logo served by the jsDelivr CDN (no install required), pinned to
76
+ * this package version. Returns null when the bank is unknown or has no logo.
77
+ *
78
+ * Example: https://cdn.jsdelivr.net/npm/logos-bancos-br@0.1.0/logos/png/60701190.png
79
+ */
80
+ declare function logoCdnUrl(code: string | number | Bank, { format, version: pinnedVersion }?: LogoCdnUrlOptions): string | null;
81
+
82
+ export { type Bank, type BankLogo, type BankLogoSource, type LogoCdnUrlOptions, banks, byCompe, byIspb, findBank, logoCdnUrl, normalizeCompe, normalizeIspb, version };
@@ -0,0 +1,82 @@
1
+ /**
2
+ * logos-bancos-br — Brazilian bank logos and data from official sources only.
3
+ *
4
+ * Universal entry point: works in Node, bundlers (web) and React Native.
5
+ * The dataset is inlined at build time; no filesystem or network access.
6
+ *
7
+ * - Node filesystem paths for the shipped assets: `logos-bancos-br/node`.
8
+ * - React Native static require() map: `logos-bancos-br/react-native`.
9
+ */
10
+ interface BankLogoSource {
11
+ /**
12
+ * Where the logo came from:
13
+ * - `openfinance`: published by the institution in the Open Finance Brasil
14
+ * participants directory (matched by ISPB/CNPJ);
15
+ * - `direct-uri`: a hand-reviewed direct URL;
16
+ * - `override`: a manually maintained file in the repository.
17
+ */
18
+ type: 'openfinance' | 'direct-uri' | 'override';
19
+ /** Open Finance organisation name, when type is `openfinance`. */
20
+ org: string | null;
21
+ /** Organisation CNPJ (14 digits), when type is `openfinance`. */
22
+ cnpj: string | null;
23
+ /** Source URI of the original artwork. */
24
+ uri: string;
25
+ /** SHA-256 of the original artwork (provenance / change detection). */
26
+ sha256: string;
27
+ /** ISO date (YYYY-MM-DD) of the last time the artwork changed. */
28
+ updatedAt: string;
29
+ }
30
+ interface BankLogo {
31
+ /** Package-relative path of the normalized 256×256 PNG. */
32
+ png: string;
33
+ /** Package-relative path of the original SVG, when safely redistributable. */
34
+ svg: string | null;
35
+ source: BankLogoSource;
36
+ }
37
+ interface Bank {
38
+ /** 8-digit ISPB (Central Bank identifier). */
39
+ ispb: string;
40
+ /** COMPE number as published by the Central Bank (e.g. "1", "341"). */
41
+ compe: string;
42
+ /** COMPE zero-padded to 4 digits (e.g. "0001", "0341"). */
43
+ compe4: string;
44
+ /** Official full name (Nome Extenso). */
45
+ name: string;
46
+ /** Official short name (Nome Reduzido). */
47
+ shortName: string;
48
+ /** Logo info, or null when the institution has no logo in the official sources. */
49
+ logo: BankLogo | null;
50
+ }
51
+ /** Package version (used to pin CDN URLs). */
52
+ declare const version: string;
53
+ /** Normalizes a COMPE code ("341", 341, "0341") to the 4-digit form. */
54
+ declare function normalizeCompe(code: string | number): string;
55
+ /** Normalizes an ISPB (number or string) to the 8-digit form. */
56
+ declare function normalizeIspb(ispb: string | number): string;
57
+ /** Every institution in the Central Bank STR list that has a COMPE number. */
58
+ declare function banks(): readonly Bank[];
59
+ /** Looks a bank up by COMPE code ("341", 341 and "0341" are equivalent). */
60
+ declare function byCompe(code: string | number): Bank | undefined;
61
+ /** Looks a bank up by 8-digit ISPB. */
62
+ declare function byIspb(ispb: string | number): Bank | undefined;
63
+ /**
64
+ * Convenience lookup: digits with more than 4 characters are treated as an
65
+ * ISPB, anything else as a COMPE code.
66
+ */
67
+ declare function findBank(code: string | number | Bank): Bank | undefined;
68
+ interface LogoCdnUrlOptions {
69
+ /** Which asset to link. Defaults to `png`; `svg` returns null when there is no safe SVG. */
70
+ format?: 'png' | 'svg';
71
+ /** Package version for the pinned URL. Defaults to this build's version. */
72
+ version?: string;
73
+ }
74
+ /**
75
+ * URL of the logo served by the jsDelivr CDN (no install required), pinned to
76
+ * this package version. Returns null when the bank is unknown or has no logo.
77
+ *
78
+ * Example: https://cdn.jsdelivr.net/npm/logos-bancos-br@0.1.0/logos/png/60701190.png
79
+ */
80
+ declare function logoCdnUrl(code: string | number | Bank, { format, version: pinnedVersion }?: LogoCdnUrlOptions): string | null;
81
+
82
+ export { type Bank, type BankLogo, type BankLogoSource, type LogoCdnUrlOptions, banks, byCompe, byIspb, findBank, logoCdnUrl, normalizeCompe, normalizeIspb, version };
package/dist/index.js ADDED
@@ -0,0 +1,20 @@
1
+ import {
2
+ banks,
3
+ byCompe,
4
+ byIspb,
5
+ findBank,
6
+ logoCdnUrl,
7
+ normalizeCompe,
8
+ normalizeIspb,
9
+ version
10
+ } from "./chunk-S4JZVP5E.js";
11
+ export {
12
+ banks,
13
+ byCompe,
14
+ byIspb,
15
+ findBank,
16
+ logoCdnUrl,
17
+ normalizeCompe,
18
+ normalizeIspb,
19
+ version
20
+ };
package/dist/node.cjs ADDED
@@ -0,0 +1,11 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+ var _chunkBIKMT23Ncjs = require('./chunk-BIKMT23N.cjs');
6
+ require('./chunk-ZGDTPJIV.cjs');
7
+
8
+
9
+
10
+
11
+ exports.copyLogos = _chunkBIKMT23Ncjs.copyLogos; exports.logoPngPath = _chunkBIKMT23Ncjs.logoPngPath; exports.logoSvgPath = _chunkBIKMT23Ncjs.logoSvgPath;
@@ -0,0 +1,29 @@
1
+ import { Bank } from './index.cjs';
2
+
3
+ /**
4
+ * Node-only helpers: absolute filesystem paths of the shipped assets and the
5
+ * copy routine used by the CLI to vendor logos into any project (any stack).
6
+ */
7
+
8
+ /** Absolute path of the bank's normalized PNG, or null when it has no logo. */
9
+ declare function logoPngPath(code: string | number | Bank): string | null;
10
+ /** Absolute path of the bank's original SVG, or null when unavailable. */
11
+ declare function logoSvgPath(code: string | number | Bank): string | null;
12
+ interface CopyLogosOptions {
13
+ /** Destination directory (created if missing). */
14
+ dest: string;
15
+ /** Which assets to copy. Defaults to `png`. */
16
+ format?: 'png' | 'svg' | 'both';
17
+ /** File naming: 4-digit COMPE (default) or 8-digit ISPB. */
18
+ by?: 'compe' | 'ispb';
19
+ /** Restrict to these COMPE/ISPB codes (any format). Copies all when omitted. */
20
+ only?: Array<string | number>;
21
+ }
22
+ interface CopyLogosResult {
23
+ copied: string[];
24
+ skippedNoSvg: string[];
25
+ }
26
+ /** Copies shipped logos into a project directory, named by COMPE or ISPB. */
27
+ declare function copyLogos({ dest, format, by, only, }: CopyLogosOptions): CopyLogosResult;
28
+
29
+ export { type CopyLogosOptions, type CopyLogosResult, copyLogos, logoPngPath, logoSvgPath };
package/dist/node.d.ts ADDED
@@ -0,0 +1,29 @@
1
+ import { Bank } from './index.js';
2
+
3
+ /**
4
+ * Node-only helpers: absolute filesystem paths of the shipped assets and the
5
+ * copy routine used by the CLI to vendor logos into any project (any stack).
6
+ */
7
+
8
+ /** Absolute path of the bank's normalized PNG, or null when it has no logo. */
9
+ declare function logoPngPath(code: string | number | Bank): string | null;
10
+ /** Absolute path of the bank's original SVG, or null when unavailable. */
11
+ declare function logoSvgPath(code: string | number | Bank): string | null;
12
+ interface CopyLogosOptions {
13
+ /** Destination directory (created if missing). */
14
+ dest: string;
15
+ /** Which assets to copy. Defaults to `png`. */
16
+ format?: 'png' | 'svg' | 'both';
17
+ /** File naming: 4-digit COMPE (default) or 8-digit ISPB. */
18
+ by?: 'compe' | 'ispb';
19
+ /** Restrict to these COMPE/ISPB codes (any format). Copies all when omitted. */
20
+ only?: Array<string | number>;
21
+ }
22
+ interface CopyLogosResult {
23
+ copied: string[];
24
+ skippedNoSvg: string[];
25
+ }
26
+ /** Copies shipped logos into a project directory, named by COMPE or ISPB. */
27
+ declare function copyLogos({ dest, format, by, only, }: CopyLogosOptions): CopyLogosResult;
28
+
29
+ export { type CopyLogosOptions, type CopyLogosResult, copyLogos, logoPngPath, logoSvgPath };
package/dist/node.js ADDED
@@ -0,0 +1,11 @@
1
+ import {
2
+ copyLogos,
3
+ logoPngPath,
4
+ logoSvgPath
5
+ } from "./chunk-SPP4OABR.js";
6
+ import "./chunk-S4JZVP5E.js";
7
+ export {
8
+ copyLogos,
9
+ logoPngPath,
10
+ logoSvgPath
11
+ };
package/llms.txt ADDED
@@ -0,0 +1,48 @@
1
+ # logos-bancos-br
2
+
3
+ > Brazilian bank institution list + official bank logos, rebuilt automatically every week from
4
+ > official sources only: the Central Bank of Brazil (BCB) STR participants list and the Open
5
+ > Finance Brasil participants directory. npm package: `logos-bancos-br`. Code and dataset are
6
+ > MIT; the logos are trademarks of their respective institutions, redistributed for nominative
7
+ > use (see DISCLAIMER.md).
8
+
9
+ Key facts:
10
+
11
+ - The **institution list is auto-updated**: every institution with a COMPE code in the BCB STR
12
+ participants list (currently ~470) ships in `data/bancos.json` with `ispb` (8 digits),
13
+ `compe`, `compe4` (zero-padded), official `name`, `shortName`, and `logo` (or `logo: null`).
14
+ - The **logos are auto-updated** too: currently ~107 institutions, as normalized transparent
15
+ 256×256 PNGs (`logos/png/<ISPB>.png`) plus sanitized original SVGs (`logos/svg/<ISPB>.svg`)
16
+ when available. Assets are keyed by **ISPB**, not COMPE.
17
+ - **Update cadence**: a GitHub Action (`.github/workflows/update-logos.yml`) runs every Monday
18
+ (and on demand), rebuilds the list and the logos from the official sources, and opens a pull
19
+ request with a report and the visual diff. Nothing is hand-curated.
20
+ - **Per-logo provenance**: each logo records the source URI, the SHA-256 of the original artwork
21
+ and the last-change date in `data/bancos.json`.
22
+ - **Matching safety**: a logo is assigned automatically only when the institution's ISPB equals
23
+ the first 8 digits of the Open Finance organisation's CNPJ. Name similarity never assigns a
24
+ logo — it only produces suggestions that a human reviews and promotes to `forcedMatches` in
25
+ `pipeline/config.json`.
26
+ - **JavaScript API** (`logos-bancos-br`): `banks()`, `byCompe('341' | 341 | '0341')`,
27
+ `byIspb('60701190')`, `findBank(code)`, `logoCdnUrl(code, { format: 'png' | 'svg' })`.
28
+ Node-only paths: `logoPngPath()` / `logoSvgPath()` from `logos-bancos-br/node`. React Native
29
+ static require() map: `logos-bancos-br/react-native` (keys: 4-digit COMPE and 8-digit ISPB).
30
+ - **CLI for any stack** (Flutter, Kotlin, Swift, .NET, PHP…):
31
+ `npx logos-bancos-br copy --dest <dir> [--by compe|ispb] [--format png|svg|both] [--only 341,001]`
32
+ and `npx logos-bancos-br list [--json]`.
33
+ - **CDN, no install** (pin a version):
34
+ `https://cdn.jsdelivr.net/npm/logos-bancos-br@<version>/logos/png/<ISPB>.png`. The COMPE→ISPB
35
+ mapping lives in `data/bancos.json`.
36
+
37
+ ## Docs
38
+
39
+ - [README (português)](README.md)
40
+ - [README (English)](README.en.md)
41
+ - [Gallery of all shipped logos](PREVIEW.md)
42
+ - [Trademark notice and takedown policy](DISCLAIMER.md)
43
+ - [Maintenance and pipeline guide](CONTRIBUTING.md)
44
+
45
+ ## Official sources
46
+
47
+ - [BCB STR participants CSV](https://www.bcb.gov.br/content/estabilidadefinanceira/str1/ParticipantesSTR.csv)
48
+ - [Open Finance Brasil participants directory](https://data.directory.openbankingbrasil.org.br/participants)
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file