@symbiote-native/symbols 0.0.0 → 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.
- package/README.md +176 -23
- package/build/angular/symbol-view.js +4 -4
- package/build/core/symbols.js +3 -1
- package/build-ngc/angular/symbol-view.js +8 -8
- package/build-ngc/angular/symbol-view.js.map +1 -1
- package/build-ngc/core/symbols.js +3 -1
- package/build-ngc/core/symbols.js.map +1 -1
- package/package.json +16 -16
- package/src/angular/symbol-view.ts +4 -4
- package/src/core/android/symbols.json +4056 -4056
- package/src/core/symbol-types.ts +4 -13
- package/src/core/symbols.ts +9 -2
package/src/core/symbol-types.ts
CHANGED
|
@@ -26,11 +26,7 @@ export type ISymbolWeight =
|
|
|
26
26
|
| 'black';
|
|
27
27
|
|
|
28
28
|
export type ISymbolScale =
|
|
29
|
-
| '
|
|
30
|
-
| 'unspecified'
|
|
31
|
-
| 'small'
|
|
32
|
-
| 'medium'
|
|
33
|
-
| 'large';
|
|
29
|
+
'default' | 'unspecified' | 'small' | 'medium' | 'large';
|
|
34
30
|
|
|
35
31
|
/** How the image is resized to fit its container */
|
|
36
32
|
export type IContentMode =
|
|
@@ -50,10 +46,7 @@ export type IContentMode =
|
|
|
50
46
|
|
|
51
47
|
/** The symbol variant, `palette` takes its colors from `colors` */
|
|
52
48
|
export type ISymbolType =
|
|
53
|
-
| '
|
|
54
|
-
| 'hierarchical'
|
|
55
|
-
| 'palette'
|
|
56
|
-
| 'multicolor';
|
|
49
|
+
'monochrome' | 'hierarchical' | 'palette' | 'multicolor';
|
|
57
50
|
|
|
58
51
|
export type IAnimationType = 'bounce' | 'pulse' | 'scale';
|
|
59
52
|
|
|
@@ -104,8 +97,7 @@ type IViewSurface = IAccessibilityProps &
|
|
|
104
97
|
};
|
|
105
98
|
|
|
106
99
|
export type ISymbolName =
|
|
107
|
-
| SFSymbol
|
|
108
|
-
| { ios?: SFSymbol; android?: IAndroidSymbol; web?: IAndroidSymbol };
|
|
100
|
+
SFSymbol | { ios?: SFSymbol; android?: IAndroidSymbol; web?: IAndroidSymbol };
|
|
109
101
|
|
|
110
102
|
export type ISymbolViewProps = IViewSurface & {
|
|
111
103
|
/** SF Symbols names are listed in the Apple SF Symbols app */
|
|
@@ -125,8 +117,7 @@ export type ISymbolViewProps = IViewSurface & {
|
|
|
125
117
|
* @default 'unspecified'
|
|
126
118
|
*/
|
|
127
119
|
weight?:
|
|
128
|
-
| ISymbolWeight
|
|
129
|
-
| { ios: ISymbolWeight; android: IAndroidSymbolWeight };
|
|
120
|
+
ISymbolWeight | { ios: ISymbolWeight; android: IAndroidSymbolWeight };
|
|
130
121
|
/**
|
|
131
122
|
* Colors of a `palette` symbol
|
|
132
123
|
* @platform ios
|
package/src/core/symbols.ts
CHANGED
|
@@ -143,7 +143,9 @@ export async function loadSymbolFont(props: object): Promise<boolean> {
|
|
|
143
143
|
await loadAsync({
|
|
144
144
|
[font.name]: {
|
|
145
145
|
uri: font.font,
|
|
146
|
-
testString: name
|
|
146
|
+
testString: name
|
|
147
|
+
? (androidSymbolToString(name) ?? undefined)
|
|
148
|
+
: undefined,
|
|
147
149
|
},
|
|
148
150
|
});
|
|
149
151
|
return true;
|
|
@@ -177,7 +179,12 @@ export async function unstable_getMaterialSymbolSourceAsync(
|
|
|
177
179
|
symbol: IAndroidSymbol | null,
|
|
178
180
|
size: number,
|
|
179
181
|
color: string,
|
|
180
|
-
): Promise<{
|
|
182
|
+
): Promise<{
|
|
183
|
+
uri: string;
|
|
184
|
+
width: number;
|
|
185
|
+
height: number;
|
|
186
|
+
scale: number;
|
|
187
|
+
} | null> {
|
|
181
188
|
if (runsOnIos() || !symbol) return null;
|
|
182
189
|
const glyph = androidSymbolToString(symbol);
|
|
183
190
|
if (!glyph) return null;
|