@octane-xplat/nano-icons 0.15.0 → 0.16.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/package.json +6 -6
- package/src/NanoIcon.macos.tsrx +7 -15
- package/src/NanoIcon.tsrx +4 -23
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octane-xplat/nano-icons",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "Build-time icon fonts and layered glyph rendering for Octane Xplat — SVG directories or Iconify collections compile to a TTF + typed glyph map (pipeline adapted from react-native-nano-icons)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cross-platform",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@iconify/types": "2.0.0",
|
|
64
64
|
"@iconify/utils": "3.1.7",
|
|
65
|
-
"@octane-xplat/ui": "0.
|
|
65
|
+
"@octane-xplat/ui": "0.16.0",
|
|
66
66
|
"@xmldom/xmldom": "0.9.12",
|
|
67
67
|
"cubic2quad": "1.2.1",
|
|
68
68
|
"fonteditor-core": "2.6.3",
|
|
@@ -74,17 +74,17 @@
|
|
|
74
74
|
"@nativescript/core": "9.1.3",
|
|
75
75
|
"@octanejs/vite-plugin": "0.1.61",
|
|
76
76
|
"@tsrx/typescript-plugin": "0.4.11",
|
|
77
|
-
"@types/node": "
|
|
77
|
+
"@types/node": "24.10.1",
|
|
78
78
|
"@types/svg2ttf": "5.0.3",
|
|
79
79
|
"octane": "0.11.0",
|
|
80
|
-
"tsrx-typegen": "0.3.
|
|
80
|
+
"tsrx-typegen": "0.3.1",
|
|
81
81
|
"typescript": "5.9.3",
|
|
82
82
|
"vite": "8.3.0"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"@nativescript-community/octane": ">=0.2.1 <1",
|
|
86
86
|
"@nativescript/core": ">=9.1.0 <10",
|
|
87
|
-
"@octane-xplat/macos-renderer": "0.
|
|
87
|
+
"@octane-xplat/macos-renderer": "0.16.0",
|
|
88
88
|
"octane": ">=0.6.3 <1"
|
|
89
89
|
},
|
|
90
90
|
"peerDependenciesMeta": {
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
},
|
|
104
104
|
"scripts": {
|
|
105
105
|
"typegen": "tsrx-typegen --target nano-icons",
|
|
106
|
-
"typecheck": "node ../../scripts/typecheck.
|
|
106
|
+
"typecheck": "node ../../scripts/typecheck.ts && pnpm exec tsc --noEmit -p tsconfig.build.json",
|
|
107
107
|
"test": "pnpm build && node --test tests/*.test.mjs",
|
|
108
108
|
"pack:check": "tsrx-typegen --pack-check",
|
|
109
109
|
"test:packed": "node tests/packed-consumer.mjs",
|
package/src/NanoIcon.macos.tsrx
CHANGED
|
@@ -63,26 +63,18 @@ function MacGlyphLayers(props: NanoIconProps & { glyphMap: NanoGlyphMap }) {
|
|
|
63
63
|
const family = props.glyphMap.m.f;
|
|
64
64
|
|
|
65
65
|
return (
|
|
66
|
-
<
|
|
67
|
-
id={props.id}
|
|
68
|
-
className={props.className}
|
|
69
|
-
style={{ width, height: size }}
|
|
70
|
-
ref={(el: any) => applyHostProps(el, props)}
|
|
71
|
-
>
|
|
66
|
+
<masonview id={props.id} className={props.className} style={{ width, height: size }} ref={(el: any) => applyHostProps(el, props)}>
|
|
72
67
|
{layers.map(([codepoint, srcColor], i) => (
|
|
73
|
-
<label
|
|
74
|
-
key={i}
|
|
75
|
-
id={props.id ? props.id + ':layer-' + i : undefined}
|
|
76
|
-
{...({ left: 0, top: 0, accessible: false } as Record<string, unknown>)}
|
|
77
|
-
text={getChar(codepoint)}
|
|
78
|
-
style={{
|
|
68
|
+
<label key={i} id={props.id ? props.id + ':layer-' + i : undefined} {...({ accessible: false } as Record<string, unknown>)} text={getChar(codepoint)} style={{
|
|
79
69
|
fontFamily: family,
|
|
80
70
|
fontSize: size,
|
|
81
71
|
color: layerColor(resolveColor(i, srcColor)),
|
|
82
|
-
|
|
83
|
-
|
|
72
|
+
position: 'absolute',
|
|
73
|
+
left: 0,
|
|
74
|
+
top: 0,
|
|
75
|
+
}} />
|
|
84
76
|
))}
|
|
85
|
-
</
|
|
77
|
+
</masonview>
|
|
86
78
|
);
|
|
87
79
|
}
|
|
88
80
|
|
package/src/NanoIcon.tsrx
CHANGED
|
@@ -45,34 +45,15 @@ function NanoGlyphLayers(props: NanoIconProps & { glyphMap: NanoGlyphMap }) @{
|
|
|
45
45
|
const width = (adv / props.glyphMap.m.u) * size;
|
|
46
46
|
const family = props.glyphMap.m.f;
|
|
47
47
|
|
|
48
|
-
<
|
|
49
|
-
id={props.id}
|
|
50
|
-
className={props.className}
|
|
51
|
-
accessible={!!props.label}
|
|
52
|
-
accessibilityRole={props.label ? AccessibilityRole.Image : undefined}
|
|
53
|
-
accessibilityLabel={props.label}
|
|
54
|
-
rotate={((props.rotate ?? 0) * 90) % 360}
|
|
55
|
-
scaleX={props.hFlip ? -1 : 1}
|
|
56
|
-
scaleY={props.vFlip ? -1 : 1}
|
|
57
|
-
style={{ width, height: size }}
|
|
58
|
-
ref={(el: any) => applyPlatformBag(el, props)}
|
|
59
|
-
>
|
|
48
|
+
<masonview id={props.id} className={props.className} accessible={!!props.label} accessibilityRole={props.label ? AccessibilityRole.Image : undefined} accessibilityLabel={props.label} rotate={((props.rotate ?? 0) * 90) % 360} scaleX={props.hFlip ? -1 : 1} scaleY={props.vFlip ? -1 : 1} style={{ width, height: size }} ref={(el: any) => applyPlatformBag(el, props)}>
|
|
60
49
|
{layers.map(([codepoint, srcColor], i) => (
|
|
61
|
-
<label
|
|
62
|
-
key={i}
|
|
63
|
-
id={props.id ? props.id + ':layer-' + i : undefined}
|
|
64
|
-
left={0}
|
|
65
|
-
top={0}
|
|
66
|
-
accessible={false}
|
|
67
|
-
text={getChar(codepoint)}
|
|
68
|
-
style={{
|
|
50
|
+
<label key={i} id={props.id ? props.id + ':layer-' + i : undefined} accessible={false} text={getChar(codepoint)} style={[{
|
|
69
51
|
fontFamily: family,
|
|
70
52
|
fontSize: size,
|
|
71
53
|
color: layerColor(resolveColor(i, srcColor)) as any,
|
|
72
|
-
}}
|
|
73
|
-
/>
|
|
54
|
+
}, {position: 'absolute', left: 0, top: 0}]} />
|
|
74
55
|
))}
|
|
75
|
-
</
|
|
56
|
+
</masonview>
|
|
76
57
|
}
|
|
77
58
|
|
|
78
59
|
/**
|