idn-finlogos 2.0.1 → 2.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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # idn-finlogos
2
2
 
3
- Indonesian financial institution logos — banks, e-wallets, payment gateways, switching, regulatory, and 18 more categories — as optimized SVGs with per-logo ESM imports.
3
+ Indonesian financial institution logos — banks, e-wallets, payment gateways, switching, regulatory, and 18 more categories — as optimized SVGs, available on **npm, Maven Central, Swift Package Manager, and pub.dev**.
4
4
 
5
5
  **489 logos · 23 categories · SVG only · zero runtime dependencies**
6
6
 
@@ -10,15 +10,19 @@ Indonesian financial institution logos — banks, e-wallets, payment gateways, s
10
10
 
11
11
  ## Install
12
12
 
13
- ```bash
14
- npm install idn-finlogos
15
- ```
13
+ | Platform | Install |
14
+ |---|---|
15
+ | **Web (npm)** | `npm install idn-finlogos` |
16
+ | **Android (Gradle / Maven Central)** | `implementation("io.github.hafidznoor:idn-finlogos:2.0.1")` |
17
+ | **iOS (Swift Package Manager)** | `.package(url: "https://github.com/hafidznoor/idn-finlogos", from: "2.0.1")` |
18
+ | **Flutter (pub.dev)** | `flutter pub add idn_finlogos` |
19
+ | **Web (CDN)** | `https://cdn.jsdelivr.net/npm/idn-finlogos@2/dist/icons/<slug>.svg` |
16
20
 
17
- Or use directly from a CDN no install required.
21
+ Each package ships the same 489 SVGs generated from a single source of truth (`data/logos.yml` + `icons/`). Mobile packages bundle the SVGs as platform-native resources; web packages ship them as ESM modules and raw files.
18
22
 
19
23
  ---
20
24
 
21
- ## Four ways to use it
25
+ ## Web (npm) — four ways to use it
22
26
 
23
27
  ### 1. Per-logo ESM import (recommended for app bundles)
24
28
 
@@ -81,6 +85,99 @@ Pin a major (`@2`), minor (`@2.0`), or exact version (`@2.0.0`).
81
85
 
82
86
  ---
83
87
 
88
+ ## Android
89
+
90
+ ```kotlin
91
+ // app/build.gradle.kts
92
+ dependencies {
93
+ implementation("io.github.hafidznoor:idn-finlogos:2.0.1")
94
+ // Recommended SVG renderer:
95
+ implementation("io.coil-kt:coil-compose:2.6.0")
96
+ implementation("io.coil-kt:coil-svg:2.6.0")
97
+ }
98
+ ```
99
+
100
+ ```kotlin
101
+ import com.hafidznoor.idnfinlogos.IdnFinLogos
102
+ import coil.ImageLoader
103
+ import coil.compose.AsyncImage
104
+ import coil.decode.SvgDecoder
105
+
106
+ @Composable
107
+ fun BcaLogo() {
108
+ val ctx = LocalContext.current
109
+ val loader = remember {
110
+ ImageLoader.Builder(ctx).components { add(SvgDecoder.Factory()) }.build()
111
+ }
112
+ val bca = IdnFinLogos.get("bca") ?: return
113
+ AsyncImage(
114
+ model = "file:///android_asset/${bca.assetPath}",
115
+ imageLoader = loader,
116
+ contentDescription = bca.name,
117
+ )
118
+ }
119
+ ```
120
+
121
+ Catalog API: `IdnFinLogos.all`, `byCategory(...)`, `get(...)`, `search(...)`. See [platforms/android/README.md](./platforms/android/README.md).
122
+
123
+ JitPack also works without waiting on Maven Central — add `maven { url = uri("https://jitpack.io") }` to your repositories and use `com.github.hafidznoor:idn-finlogos:2.0.1`.
124
+
125
+ ---
126
+
127
+ ## iOS
128
+
129
+ ```swift
130
+ // Package.swift
131
+ .package(url: "https://github.com/hafidznoor/idn-finlogos", from: "2.0.1")
132
+ ```
133
+
134
+ Add **SVGKit** (or your preferred SVG renderer) separately:
135
+
136
+ ```swift
137
+ import SwiftUI
138
+ import SVGKit
139
+ import IdnFinLogos
140
+
141
+ struct BcaLogo: View {
142
+ var body: some View {
143
+ if let url = IdnFinLogos.get("bca")?.url,
144
+ let img = SVGKImage(contentsOf: url)?.uiImage {
145
+ Image(uiImage: img).resizable().scaledToFit()
146
+ }
147
+ }
148
+ }
149
+ ```
150
+
151
+ Catalog API: `IdnFinLogos.all`, `byCategory(_:)`, `get(_:)`, `search(_:)`. Minimum platforms: iOS 13, macOS 11, tvOS 13, watchOS 6.
152
+
153
+ ---
154
+
155
+ ## Flutter
156
+
157
+ ```bash
158
+ flutter pub add idn_finlogos flutter_svg
159
+ ```
160
+
161
+ ```dart
162
+ import 'package:flutter_svg/flutter_svg.dart';
163
+ import 'package:idn_finlogos/idn_finlogos.dart';
164
+
165
+ class BcaLogo extends StatelessWidget {
166
+ const BcaLogo({super.key});
167
+
168
+ @override
169
+ Widget build(BuildContext context) {
170
+ final bca = IdnFinLogos.get('bca');
171
+ if (bca == null) return const SizedBox.shrink();
172
+ return SvgPicture.asset(bca.assetPath, semanticsLabel: bca.name);
173
+ }
174
+ }
175
+ ```
176
+
177
+ Catalog API: `IdnFinLogos.all`, `byCategory(...)`, `get(...)`, `search(...)`. See [platforms/flutter/README.md](./platforms/flutter/README.md).
178
+
179
+ ---
180
+
84
181
  ## Categories
85
182
 
86
183
  23 categories, browseable via `getCategories()` or `data/categories.yml`: