@apple-pie/slice-native 0.0.0-stage → 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.
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from './_types';
2
+ export declare const NativeIcon: import("react").MemoExoticComponent<(props: IconProps) => import("react").JSX.Element | null>;
@@ -0,0 +1,16 @@
1
+ import type { SvgProps } from 'react-native-svg';
2
+ type IconBaseProps = {
3
+ name?: string;
4
+ size?: number;
5
+ /** Stroke width, matching the web Icon API. */
6
+ stroke?: number;
7
+ strokeColor?: string;
8
+ /** Fill opacity (0–1), matching the web Icon API. */
9
+ fillColor?: number;
10
+ fill?: boolean;
11
+ coverUp?: string;
12
+ toggle?: boolean;
13
+ disabled?: boolean;
14
+ };
15
+ export type IconProps = Omit<SvgProps, keyof IconBaseProps | 'children'> & IconBaseProps;
16
+ export {};
@@ -0,0 +1,17 @@
1
+ import type { JSX } from 'react';
2
+ export interface IconRenderProps {
3
+ stroke: number;
4
+ strokeColor: string;
5
+ fillColor: number;
6
+ coverUp: string;
7
+ }
8
+ export type IconLineRenderer = (props: IconRenderProps) => JSX.Element;
9
+ export interface IconDefinition {
10
+ line: IconLineRenderer;
11
+ lineOn?: IconLineRenderer;
12
+ }
13
+ /**
14
+ * Static icon registry created once at module load.
15
+ * Each entry stores only icon line content renderers.
16
+ */
17
+ export declare const STATIC_ICON_REGISTRY: Map<string, IconDefinition>;
@@ -0,0 +1,137 @@
1
+ export declare const SliceIcons: {
2
+ readonly arrows: {
3
+ readonly arrowLeft: "arrow left";
4
+ readonly arrowRight: "arrow right";
5
+ readonly arrowUp: "arrow up";
6
+ readonly arrowDown: "arrow down";
7
+ readonly chevronDown: "chevron down";
8
+ readonly chevronUp: "chevron up";
9
+ readonly navigateRight: "navigate right";
10
+ readonly navigateLeft: "navigate left";
11
+ readonly share: "share";
12
+ };
13
+ readonly selection: {
14
+ readonly check: "check";
15
+ readonly checkCircle: "check circle";
16
+ readonly checkbox: "checkbox";
17
+ readonly checkboxChecked: "checkbox checked";
18
+ readonly checkboxPartial: "checkbox partial";
19
+ readonly circle: "circle";
20
+ readonly circleFill: "circle fill";
21
+ readonly plus: "plus";
22
+ readonly plusCircle: "plus circle";
23
+ };
24
+ readonly Messaging: {
25
+ readonly chat: "chat";
26
+ readonly mail: "mail";
27
+ readonly notification: "notification";
28
+ readonly inbox: "inbox";
29
+ readonly like: "like";
30
+ readonly unlike: "unlike";
31
+ };
32
+ readonly media: {
33
+ readonly camera: "camera";
34
+ readonly focus: "focus";
35
+ readonly mic: "mic";
36
+ readonly micMuted: "mic muted";
37
+ readonly video: "video";
38
+ readonly videoOff: "video off";
39
+ readonly download: "download";
40
+ readonly upload: "upload";
41
+ readonly speaker: "speaker";
42
+ readonly speakerMuted: "speaker muted";
43
+ readonly speakerHigh: "speaker high";
44
+ readonly speakerLow: "speaker low";
45
+ readonly play: "play";
46
+ readonly playCircle: "play circle";
47
+ readonly pause: "pause";
48
+ readonly pauseCircle: "pause circle";
49
+ };
50
+ readonly files: {
51
+ readonly document: "document";
52
+ readonly documentEditor: "document editor";
53
+ readonly textDocument: "text document";
54
+ };
55
+ readonly people: {
56
+ readonly people: "people";
57
+ readonly person: "person";
58
+ readonly talk: "talk";
59
+ };
60
+ readonly business: {
61
+ readonly briefcase: "briefcase";
62
+ readonly dollar: "dollar";
63
+ readonly invoice: "invoice";
64
+ readonly payment: "payment";
65
+ readonly wallet: "wallet";
66
+ readonly laptop: "laptop";
67
+ };
68
+ readonly charts: {
69
+ readonly barChart: "bar chart";
70
+ readonly chart: "chart";
71
+ readonly chartArrow: "chart arrow";
72
+ };
73
+ readonly status: {
74
+ readonly alert: "alert";
75
+ readonly exclamation: "exclamation";
76
+ readonly help: "help";
77
+ readonly info: "info";
78
+ readonly issue: "issue";
79
+ readonly lightBulb: "light bulb";
80
+ readonly target: "target";
81
+ readonly openCircle: "open circle";
82
+ };
83
+ readonly brands: {
84
+ readonly apple: "apple";
85
+ readonly google: "google";
86
+ readonly googleMono: "google mono";
87
+ readonly linkedin: "linkedin";
88
+ readonly github: "github";
89
+ readonly npm: "npm";
90
+ readonly openAI: "openAI";
91
+ };
92
+ readonly edit: {
93
+ readonly edit: "edit";
94
+ readonly trashBin: "trash bin";
95
+ readonly copy: "copy";
96
+ readonly filter: "filter";
97
+ readonly highlight: "highlight";
98
+ readonly undo: "undo";
99
+ readonly concise: "concise";
100
+ readonly expanded: "expanded";
101
+ readonly moderate: "moderate";
102
+ readonly recent: "recent";
103
+ };
104
+ readonly typography: {
105
+ readonly fontLarger: "font larger";
106
+ readonly fontSmaller: "font smaller";
107
+ readonly characterBeam: "character beam";
108
+ };
109
+ readonly weather: {
110
+ readonly sun: "sun";
111
+ readonly moonFull: "moon full";
112
+ };
113
+ readonly ai: {
114
+ readonly sparkle: "sparkle";
115
+ readonly wand: "wand";
116
+ };
117
+ readonly ui: {
118
+ readonly attach: "attach";
119
+ readonly blank: "blank";
120
+ readonly book: "book";
121
+ readonly globeLocation: "globe location";
122
+ readonly heart: "heart";
123
+ readonly stop: "stop";
124
+ readonly search: "search";
125
+ readonly settings: "settings";
126
+ readonly view: "view";
127
+ readonly refresh: "refresh";
128
+ readonly home: "home";
129
+ readonly menu: "menu";
130
+ readonly more: "more";
131
+ readonly sidebar: "sidebar";
132
+ readonly sidebarSplit: "sidebar split";
133
+ readonly keyboard: "keyboard";
134
+ readonly x: "x";
135
+ readonly fullscreen: "fullscreen";
136
+ };
137
+ };
@@ -0,0 +1,3 @@
1
+ export { NativeIcon, NativeIcon as Icon } from './NativeIcon';
2
+ export type { IconProps } from './_types';
3
+ export { SliceIcons } from './icons';
@@ -0,0 +1,2 @@
1
+ export { Icon, NativeIcon, SliceIcons } from './components/Icon';
2
+ export type { IconProps } from './components/Icon';
package/package.json CHANGED
@@ -1,6 +1,46 @@
1
1
  {
2
- "name": "@apple-pie/slice-native",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "@apple-pie/slice-native",
3
+ "version": "0.1.2",
4
+ "description": "SVG icons for React Native",
5
+ "author": "Uris Dacosta",
6
+ "license": "ISC",
7
+ "type": "commonjs",
8
+ "main": "./dist/cjs/index.js",
9
+ "module": "./dist/esm/index.mjs",
10
+ "react-native": "./dist/esm/index.mjs",
11
+ "types": "./dist/types/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/types/index.d.ts",
15
+ "react-native": "./dist/esm/index.mjs",
16
+ "import": "./dist/esm/index.mjs",
17
+ "require": "./dist/cjs/index.js"
18
+ },
19
+ "./package.json": "./package.json"
20
+ },
21
+ "files": ["dist"],
22
+ "sideEffects": false,
23
+ "scripts": {
24
+ "test": "vitest run --config vitest.config.mts",
25
+ "lint": "biome format --write . && biome check . && npm run typecheck",
26
+ "lint:ci": "biome ci . && npm run typecheck",
27
+ "build": "npm run generate && node scripts/build.mjs",
28
+ "prepack": "npm run build",
29
+ "generate": "node scripts/generate-icons.mjs",
30
+ "typecheck": "tsc --noEmit -p tsconfig.json"
31
+ },
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
35
+ "keywords": ["react-native", "icons", "svg", "apple-pie"],
36
+ "devDependencies": {
37
+ "rollup": "^4.32.0",
38
+ "typescript": "^5.7.3",
39
+ "vitest": "^4.0.18"
40
+ },
41
+ "peerDependencies": {
42
+ "react": "^18.0.0 || ^19.0.0",
43
+ "react-native": ">=0.80.0 <1.0.0",
44
+ "react-native-svg": "^15.0.0"
45
+ }
46
+ }