@leta-io/components 0.1.0 → 0.2.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 +16 -4
- package/dist/assets/doorstep-delivery.png +0 -0
- package/dist/assets/signature.png +0 -0
- package/dist/index.js +101 -101
- package/package.json +7 -5
package/README.md
CHANGED
|
@@ -30,11 +30,23 @@ and load order decides the winner.
|
|
|
30
30
|
React 18 or 19. `leaflet` and `lottie-web` are required only if you use the map
|
|
31
31
|
or loading-overlay components.
|
|
32
32
|
|
|
33
|
-
##
|
|
33
|
+
## Bundle size
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
Import what you need from the package root — the barrel tree-shakes. Every
|
|
36
|
+
component factory carries a `/* @__PURE__ */` annotation, so a bundler drops the
|
|
37
|
+
ones you never reference. Measured on an app importing only `Badge` and `Title`:
|
|
38
|
+
1.69 MB → 565 KB raw, 739 KB → 175 KB gzip.
|
|
39
|
+
|
|
40
|
+
There are no per-component subpaths, and you don't need them.
|
|
41
|
+
|
|
42
|
+
Two caveats worth knowing:
|
|
43
|
+
|
|
44
|
+
- **Icons are all-or-nothing.** Components take an icon as a name string
|
|
45
|
+
(`leadingIcon="Check"`), so any component that can show one needs the whole
|
|
46
|
+
registry available — about 327 KB, and most of what remains above. Nothing you
|
|
47
|
+
can do at the import site changes that.
|
|
48
|
+
- **Leaflet and Lottie are already lazy.** They load only when `MapView` or
|
|
49
|
+
`LoadingOverlay` actually renders, so they never touch your initial bundle.
|
|
38
50
|
- Components never hardcode colours or sizes — every value resolves to a token
|
|
39
51
|
from `@leta-io/design-tokens`.
|
|
40
52
|
|
|
Binary file
|
|
Binary file
|