@apple-pie/slice-native 0.1.0 → 0.1.2
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 +22 -3
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
# @apple-pie/
|
|
1
|
+
# @apple-pie/slice-native
|
|
2
2
|
|
|
3
|
-
React Native SVG icons, with the same names and artwork as the web UIKit.
|
|
3
|
+
Experimental React Native SVG icons, with the same names and artwork as the web UIKit.
|
|
4
|
+
Currently **icons only**: this package does not provide the rest of Slice's components,
|
|
5
|
+
theme provider, or shared light/dark palettes. It is built and published independently
|
|
6
|
+
of `@apple-pie/slice` and does not require that package at runtime.
|
|
4
7
|
|
|
5
8
|
```tsx
|
|
6
|
-
import { Icon, SliceIcons } from '@apple-pie/
|
|
9
|
+
import { Icon, SliceIcons } from '@apple-pie/slice-native';
|
|
7
10
|
|
|
8
11
|
<Icon
|
|
9
12
|
name={SliceIcons.ui.home}
|
|
@@ -43,7 +46,10 @@ dependencies installed and TypeScript available from the repository.
|
|
|
43
46
|
From the repository root:
|
|
44
47
|
|
|
45
48
|
```sh
|
|
49
|
+
npm install
|
|
46
50
|
npm install --prefix native
|
|
51
|
+
npm run lint --prefix native
|
|
52
|
+
npm test --prefix native
|
|
47
53
|
npm run build --prefix native
|
|
48
54
|
```
|
|
49
55
|
|
|
@@ -51,6 +57,19 @@ The build refreshes generated icons, checks types, and produces `dist/cjs/index.
|
|
|
51
57
|
`dist/esm/index.mjs`, and declarations under `dist/types`. React, React Native, and
|
|
52
58
|
react-native-svg stay external peer dependencies. The web build is independent.
|
|
53
59
|
|
|
60
|
+
Native tests use their own `vitest.config.mts` and mocked native components. Install native
|
|
61
|
+
dependencies before running them. Root tests and coverage do not include the native package;
|
|
62
|
+
passing the native unit tests does not replace device rendering checks.
|
|
63
|
+
|
|
64
|
+
CI runs these checks independently in **Slice Native Lint, Build, Test** on Node 24.
|
|
65
|
+
It uses `npm run lint:ci --prefix native` to check formatting and types without writing
|
|
66
|
+
fixes, then runs native tests, builds, and inspects the package contents. Root dependencies
|
|
67
|
+
provide shared tooling such as Biome; native dependencies are installed separately.
|
|
68
|
+
|
|
54
69
|
Run `npm pack --dry-run` from `native/` to inspect the publishable files, or
|
|
55
70
|
`npm pack` to create a tarball. The `prepack` hook builds automatically. Build and
|
|
56
71
|
pack from this repository: generation uses the web artwork in `src/components/Icon`.
|
|
72
|
+
|
|
73
|
+
Contributor architecture and future theme-data extraction are documented in
|
|
74
|
+
`contributor-docs/native.md` in the source repository. Shared plain TypeScript color
|
|
75
|
+
constants are planned; the current system light/dark defaults are only icon defaults.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apple-pie/slice-native",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "SVG icons for React Native",
|
|
5
5
|
"author": "Uris Dacosta",
|
|
6
6
|
"license": "ISC",
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
"files": ["dist"],
|
|
22
22
|
"sideEffects": false,
|
|
23
23
|
"scripts": {
|
|
24
|
+
"test": "vitest run --config vitest.config.mts",
|
|
24
25
|
"lint": "biome format --write . && biome check . && npm run typecheck",
|
|
26
|
+
"lint:ci": "biome ci . && npm run typecheck",
|
|
25
27
|
"build": "npm run generate && node scripts/build.mjs",
|
|
26
28
|
"prepack": "npm run build",
|
|
27
29
|
"generate": "node scripts/generate-icons.mjs",
|
|
@@ -33,11 +35,12 @@
|
|
|
33
35
|
"keywords": ["react-native", "icons", "svg", "apple-pie"],
|
|
34
36
|
"devDependencies": {
|
|
35
37
|
"rollup": "^4.32.0",
|
|
36
|
-
"typescript": "^5.7.3"
|
|
38
|
+
"typescript": "^5.7.3",
|
|
39
|
+
"vitest": "^4.0.18"
|
|
37
40
|
},
|
|
38
41
|
"peerDependencies": {
|
|
39
42
|
"react": "^18.0.0 || ^19.0.0",
|
|
40
43
|
"react-native": ">=0.80.0 <1.0.0",
|
|
41
|
-
"react-native-svg": "^15.
|
|
44
|
+
"react-native-svg": "^15.0.0"
|
|
42
45
|
}
|
|
43
46
|
}
|