react-native-nano-icons 0.2.1 → 1.0.0-beta.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.
Files changed (404) hide show
  1. package/LICENSES.md +40 -0
  2. package/README.md +165 -12
  3. package/android/build.gradle +8 -1
  4. package/android/src/main/java/com/nanoicons/NanoIconFonts.kt +31 -0
  5. package/android/src/main/java/com/nanoicons/NanoIconView.kt +103 -19
  6. package/android/src/main/java/com/nanoicons/NanoIconViewManager.kt +42 -18
  7. package/android/src/main/java/com/nanoicons/NanoIconsFontLoaderModule.kt +72 -11
  8. package/android/src/main/jni/CMakeLists.txt +38 -0
  9. package/android/src/main/jni/RNNanoIconsSpec.h +19 -0
  10. package/common/cpp/react/renderer/components/RNNanoIconsSpec/NanoIconViewComponentDescriptor.h +11 -0
  11. package/common/cpp/react/renderer/components/RNNanoIconsSpec/NanoIconViewShadowNode.cpp +46 -0
  12. package/common/cpp/react/renderer/components/RNNanoIconsSpec/NanoIconViewShadowNode.h +41 -0
  13. package/ios/NanoIconFontResolver.h +5 -0
  14. package/ios/NanoIconFontResolver.mm +32 -0
  15. package/ios/NanoIconInlineBaseline.h +4 -0
  16. package/ios/NanoIconInlineBaseline.mm +190 -0
  17. package/ios/NanoIconView.h +1 -4
  18. package/ios/NanoIconView.mm +178 -162
  19. package/ios/NanoIconsFontLoader.mm +10 -32
  20. package/lib/commonjs/cli/build.d.ts +16 -3
  21. package/lib/commonjs/cli/build.js +108 -25
  22. package/lib/commonjs/cli/buildSymbols.d.ts +26 -0
  23. package/lib/commonjs/cli/buildSymbols.js +134 -0
  24. package/lib/commonjs/cli/config.d.ts +4 -2
  25. package/lib/commonjs/cli/config.js +4 -4
  26. package/lib/commonjs/cli/expoConfig.d.ts +6 -2
  27. package/lib/commonjs/cli/expoConfig.js +37 -13
  28. package/lib/commonjs/cli/index.d.ts +7 -5
  29. package/lib/commonjs/cli/index.js +27 -14
  30. package/lib/commonjs/cli/link.d.ts +19 -3
  31. package/lib/commonjs/cli/link.js +311 -45
  32. package/lib/commonjs/cli/logger.js +9 -7
  33. package/lib/commonjs/metro/fontRebuildWatcher.d.ts +62 -0
  34. package/lib/commonjs/metro/fontRebuildWatcher.js +174 -0
  35. package/lib/commonjs/metro/index.d.ts +35 -0
  36. package/lib/commonjs/metro/index.js +92 -0
  37. package/lib/commonjs/metro/symbolRebuildWatcher.d.ts +19 -0
  38. package/lib/commonjs/metro/symbolRebuildWatcher.js +76 -0
  39. package/lib/commonjs/plugin/src/buildFonts.d.ts +3 -3
  40. package/lib/commonjs/plugin/src/buildFonts.js +5 -15
  41. package/lib/commonjs/plugin/src/buildSymbols.d.ts +3 -0
  42. package/lib/commonjs/plugin/src/buildSymbols.js +18 -0
  43. package/lib/commonjs/plugin/src/index.d.ts +2 -2
  44. package/lib/commonjs/plugin/src/index.js +10 -4
  45. package/lib/commonjs/plugin/src/types.d.ts +44 -3
  46. package/lib/commonjs/plugin/src/withNanoIconsDrawableLinking.d.ts +8 -0
  47. package/lib/commonjs/plugin/src/withNanoIconsDrawableLinking.js +29 -0
  48. package/lib/commonjs/plugin/src/withNanoIconsFontLinking.d.ts +1 -1
  49. package/lib/commonjs/plugin/src/withNanoIconsFontLinking.js +6 -13
  50. package/lib/commonjs/plugin/src/withNanoIconsSymbolLinking.d.ts +8 -0
  51. package/lib/commonjs/plugin/src/withNanoIconsSymbolLinking.js +37 -0
  52. package/lib/commonjs/scripts/cli.js +64 -23
  53. package/lib/commonjs/src/core/flatten/arcs.d.ts +2 -0
  54. package/lib/commonjs/src/core/flatten/arcs.js +136 -0
  55. package/lib/commonjs/src/core/flatten/document.d.ts +35 -0
  56. package/lib/commonjs/src/core/flatten/document.js +164 -0
  57. package/lib/commonjs/src/core/flatten/dom.d.ts +24 -0
  58. package/lib/commonjs/src/core/flatten/dom.js +221 -0
  59. package/lib/commonjs/src/core/flatten/element.d.ts +12 -0
  60. package/lib/commonjs/src/core/flatten/element.js +97 -0
  61. package/lib/commonjs/src/core/flatten/geometry.d.ts +21 -0
  62. package/lib/commonjs/src/core/flatten/geometry.js +85 -0
  63. package/lib/commonjs/src/core/flatten/index.d.ts +2 -0
  64. package/lib/commonjs/src/core/flatten/index.js +11 -0
  65. package/lib/commonjs/src/core/flatten/inherit.d.ts +13 -0
  66. package/lib/commonjs/src/core/flatten/inherit.js +249 -0
  67. package/lib/commonjs/src/core/flatten/path.d.ts +19 -0
  68. package/lib/commonjs/src/core/flatten/path.js +439 -0
  69. package/lib/commonjs/src/core/flatten/pathops.d.ts +14 -0
  70. package/lib/commonjs/src/core/flatten/pathops.js +236 -0
  71. package/lib/commonjs/src/core/flatten/shape.d.ts +29 -0
  72. package/lib/commonjs/src/core/flatten/shape.js +415 -0
  73. package/lib/commonjs/src/core/flatten/stages/clip-path.d.ts +4 -0
  74. package/lib/commonjs/src/core/flatten/stages/clip-path.js +20 -0
  75. package/lib/commonjs/src/core/flatten/stages/collapse.d.ts +2 -0
  76. package/lib/commonjs/src/core/flatten/stages/collapse.js +86 -0
  77. package/lib/commonjs/src/core/flatten/stages/defs.d.ts +4 -0
  78. package/lib/commonjs/src/core/flatten/stages/defs.js +49 -0
  79. package/lib/commonjs/src/core/flatten/stages/discard.d.ts +4 -0
  80. package/lib/commonjs/src/core/flatten/stages/discard.js +50 -0
  81. package/lib/commonjs/src/core/flatten/stages/fill-rule.d.ts +2 -0
  82. package/lib/commonjs/src/core/flatten/stages/fill-rule.js +7 -0
  83. package/lib/commonjs/src/core/flatten/stages/nested-svg.d.ts +2 -0
  84. package/lib/commonjs/src/core/flatten/stages/nested-svg.js +131 -0
  85. package/lib/commonjs/src/core/flatten/stages/opacity.d.ts +2 -0
  86. package/lib/commonjs/src/core/flatten/stages/opacity.js +7 -0
  87. package/lib/commonjs/src/core/flatten/stages/shapes.d.ts +7 -0
  88. package/lib/commonjs/src/core/flatten/stages/shapes.js +37 -0
  89. package/lib/commonjs/src/core/flatten/stages/stroke.d.ts +3 -0
  90. package/lib/commonjs/src/core/flatten/stages/stroke.js +34 -0
  91. package/lib/commonjs/src/core/flatten/stages/styles.d.ts +2 -0
  92. package/lib/commonjs/src/core/flatten/stages/styles.js +29 -0
  93. package/lib/commonjs/src/core/flatten/stages/use.d.ts +4 -0
  94. package/lib/commonjs/src/core/flatten/stages/use.js +80 -0
  95. package/lib/commonjs/src/core/flatten/stages/validate.d.ts +2 -0
  96. package/lib/commonjs/src/core/flatten/stages/validate.js +39 -0
  97. package/lib/commonjs/src/core/flatten/stages.d.ts +2 -0
  98. package/lib/commonjs/src/core/flatten/stages.js +40 -0
  99. package/lib/commonjs/src/core/flatten/transform.d.ts +35 -0
  100. package/lib/commonjs/src/core/flatten/transform.js +221 -0
  101. package/lib/commonjs/src/core/font/compile.d.ts +2 -1
  102. package/lib/commonjs/src/core/font/compile.js +19 -7
  103. package/lib/commonjs/src/core/font/metrics.js +7 -0
  104. package/lib/commonjs/src/core/font/quadratic.d.ts +2 -0
  105. package/lib/commonjs/src/core/font/quadratic.js +33 -0
  106. package/lib/commonjs/src/core/glyph/merge.d.ts +7 -0
  107. package/lib/commonjs/src/core/glyph/merge.js +59 -0
  108. package/lib/commonjs/src/core/glyph/parse.d.ts +27 -0
  109. package/lib/commonjs/src/core/{svg/svg_dom.js → glyph/parse.js} +21 -77
  110. package/lib/commonjs/src/core/{svg/layers.d.ts → glyph/placement.d.ts} +1 -13
  111. package/lib/commonjs/src/core/{svg/layers.js → glyph/placement.js} +0 -17
  112. package/lib/commonjs/src/core/glyph/validate.d.ts +8 -0
  113. package/lib/commonjs/src/core/glyph/validate.js +33 -0
  114. package/lib/commonjs/src/core/pathkit/contours.d.ts +75 -0
  115. package/lib/commonjs/src/core/{svg/svg_pathops.js → pathkit/contours.js} +79 -301
  116. package/lib/commonjs/src/core/pathkit/evenodd.d.ts +12 -0
  117. package/lib/commonjs/src/core/pathkit/evenodd.js +37 -0
  118. package/lib/commonjs/src/core/pathkit/load.d.ts +2 -0
  119. package/lib/commonjs/src/core/pathkit/load.js +26 -0
  120. package/lib/commonjs/src/core/pathkit/types.d.ts +69 -0
  121. package/lib/commonjs/src/core/pathkit/types.js +2 -0
  122. package/lib/commonjs/src/core/pathkit/winding.d.ts +4 -0
  123. package/lib/commonjs/src/core/pathkit/winding.js +59 -0
  124. package/lib/commonjs/src/core/pipeline/config.d.ts +2 -0
  125. package/lib/commonjs/src/core/pipeline/config.js +6 -0
  126. package/lib/commonjs/src/core/pipeline/iconPool.d.ts +14 -0
  127. package/lib/commonjs/src/core/pipeline/iconPool.js +109 -0
  128. package/lib/commonjs/src/core/pipeline/index.d.ts +5 -3
  129. package/lib/commonjs/src/core/pipeline/index.js +8 -5
  130. package/lib/commonjs/src/core/pipeline/prepare.d.ts +20 -0
  131. package/lib/commonjs/src/core/pipeline/prepare.js +74 -0
  132. package/lib/commonjs/src/core/pipeline/prepareIcon.d.ts +25 -0
  133. package/lib/commonjs/src/core/pipeline/prepareIcon.js +81 -0
  134. package/lib/commonjs/src/core/pipeline/prepareSvg.d.ts +6 -0
  135. package/lib/commonjs/src/core/pipeline/prepareSvg.js +11 -0
  136. package/lib/commonjs/src/core/pipeline/prepareSymbol.d.ts +26 -0
  137. package/lib/commonjs/src/core/pipeline/prepareSymbol.js +79 -0
  138. package/lib/commonjs/src/core/pipeline/prepareWorker.d.ts +1 -0
  139. package/lib/commonjs/src/core/pipeline/prepareWorker.js +12 -0
  140. package/lib/commonjs/src/core/pipeline/preparedSvgCache.d.ts +6 -0
  141. package/lib/commonjs/src/core/pipeline/preparedSvgCache.js +44 -0
  142. package/lib/commonjs/src/core/pipeline/runFontPipeline.d.ts +22 -0
  143. package/lib/commonjs/src/core/pipeline/runFontPipeline.js +111 -0
  144. package/lib/commonjs/src/core/pipeline/runSymbolPipeline.d.ts +54 -0
  145. package/lib/commonjs/src/core/pipeline/runSymbolPipeline.js +161 -0
  146. package/lib/commonjs/src/core/symbols/contents.d.ts +2 -0
  147. package/lib/commonjs/src/core/symbols/contents.js +15 -0
  148. package/lib/commonjs/src/core/symbols/knockout.d.ts +3 -0
  149. package/lib/commonjs/src/core/symbols/knockout.js +51 -0
  150. package/lib/commonjs/src/core/symbols/layers.d.ts +36 -0
  151. package/lib/commonjs/src/core/symbols/layers.js +182 -0
  152. package/lib/commonjs/src/core/symbols/template.d.ts +22 -0
  153. package/lib/commonjs/src/core/symbols/template.js +140 -0
  154. package/lib/commonjs/src/core/symbols/vectorDrawable.d.ts +11 -0
  155. package/lib/commonjs/src/core/symbols/vectorDrawable.js +66 -0
  156. package/lib/commonjs/src/core/types.d.ts +3 -92
  157. package/lib/commonjs/src/utils/fingerPrint.d.ts +19 -1
  158. package/lib/commonjs/src/utils/fingerPrint.js +29 -3
  159. package/lib/commonjs/src/utils/fontIdentity.d.ts +4 -0
  160. package/lib/commonjs/src/utils/fontIdentity.js +24 -0
  161. package/lib/commonjs/src/utils/naming.d.ts +10 -0
  162. package/lib/commonjs/src/utils/naming.js +49 -0
  163. package/lib/commonjs/src/utils/packageVersion.d.ts +2 -0
  164. package/lib/commonjs/src/utils/packageVersion.js +37 -0
  165. package/lib/commonjs/src/utils/parse.d.ts +0 -1
  166. package/lib/commonjs/src/utils/parse.js +0 -8
  167. package/lib/commonjs/src/utils/svgPatterns.d.ts +38 -0
  168. package/lib/commonjs/src/utils/svgPatterns.js +46 -0
  169. package/lib/module/const/codegenPrimitives.js +1 -2
  170. package/lib/module/const/colors.js +1 -2
  171. package/lib/module/createNanoIconsSet.js +1 -2
  172. package/lib/module/createNanoIconsSet.native.js +38 -28
  173. package/lib/module/createNanoIconsSet.shared.js +15 -9
  174. package/lib/module/createNanoIconsSet.web.js +22 -8
  175. package/lib/module/devServerFont.js +30 -0
  176. package/lib/module/devServerFont.web.js +25 -0
  177. package/lib/module/fontIntegrity.js +99 -0
  178. package/lib/module/index.js +1 -1
  179. package/lib/module/index.node.js +1 -2
  180. package/lib/module/loadDynamicFont.js +20 -10
  181. package/lib/module/nativeFontLoader.js +3 -0
  182. package/lib/module/nativeFontLoader.web.js +3 -0
  183. package/lib/module/specs/NanoIconViewNativeComponent.ts +9 -6
  184. package/lib/module/specs/NativeNanoIconsFontLoader.js +1 -2
  185. package/lib/module/symbols/index.android.js +42 -0
  186. package/lib/module/symbols/index.ios.js +35 -0
  187. package/lib/module/symbols/index.js +35 -0
  188. package/lib/module/symbols/index.native.js +12 -0
  189. package/lib/module/symbols/types.js +1 -0
  190. package/lib/module/types.js +1 -2
  191. package/lib/module/utils/fingerPrint.js +20 -5
  192. package/lib/module/utils/fontIdentity.js +20 -0
  193. package/lib/module/utils/glyphRuntime.js +36 -3
  194. package/lib/module/utils/naming.js +46 -0
  195. package/lib/module/utils/packageVersion.js +29 -0
  196. package/lib/module/utils/parse.js +1 -9
  197. package/lib/module/utils/runtimeLog.js +12 -0
  198. package/lib/module/utils/shallowEqualColor.js +1 -2
  199. package/lib/module/utils/svgPatterns.js +49 -0
  200. package/lib/module/utils/validateLayerColor.js +24 -0
  201. package/lib/typescript/src/core/flatten/arcs.d.ts +3 -0
  202. package/lib/typescript/src/core/flatten/document.d.ts +36 -0
  203. package/lib/typescript/src/core/flatten/dom.d.ts +25 -0
  204. package/lib/typescript/src/core/flatten/element.d.ts +13 -0
  205. package/lib/typescript/src/core/flatten/geometry.d.ts +22 -0
  206. package/lib/typescript/src/core/flatten/index.d.ts +3 -0
  207. package/lib/typescript/src/core/flatten/inherit.d.ts +14 -0
  208. package/lib/typescript/src/core/flatten/path.d.ts +20 -0
  209. package/lib/typescript/src/core/flatten/pathops.d.ts +15 -0
  210. package/lib/typescript/src/core/flatten/shape.d.ts +30 -0
  211. package/lib/typescript/src/core/flatten/stages/clip-path.d.ts +5 -0
  212. package/lib/typescript/src/core/flatten/stages/collapse.d.ts +3 -0
  213. package/lib/typescript/src/core/flatten/stages/defs.d.ts +5 -0
  214. package/lib/typescript/src/core/flatten/stages/discard.d.ts +5 -0
  215. package/lib/typescript/src/core/flatten/stages/fill-rule.d.ts +3 -0
  216. package/lib/typescript/src/core/flatten/stages/nested-svg.d.ts +3 -0
  217. package/lib/typescript/src/core/flatten/stages/opacity.d.ts +3 -0
  218. package/lib/typescript/src/core/flatten/stages/shapes.d.ts +8 -0
  219. package/lib/typescript/src/core/flatten/stages/stroke.d.ts +4 -0
  220. package/lib/typescript/src/core/flatten/stages/styles.d.ts +3 -0
  221. package/lib/typescript/src/core/flatten/stages/use.d.ts +5 -0
  222. package/lib/typescript/src/core/flatten/stages/validate.d.ts +3 -0
  223. package/lib/typescript/src/core/flatten/stages.d.ts +3 -0
  224. package/lib/typescript/src/core/flatten/transform.d.ts +36 -0
  225. package/lib/typescript/src/core/glyph/merge.d.ts +8 -0
  226. package/lib/typescript/src/core/glyph/parse.d.ts +28 -0
  227. package/lib/typescript/src/core/{svg/layers.d.ts → glyph/placement.d.ts} +2 -14
  228. package/lib/typescript/src/core/glyph/validate.d.ts +9 -0
  229. package/lib/typescript/src/core/pathkit/contours.d.ts +76 -0
  230. package/lib/typescript/src/core/pathkit/evenodd.d.ts +13 -0
  231. package/lib/typescript/src/core/pathkit/load.d.ts +3 -0
  232. package/lib/typescript/src/core/pathkit/types.d.ts +70 -0
  233. package/lib/typescript/src/core/pathkit/winding.d.ts +5 -0
  234. package/lib/typescript/src/core/symbols/contents.d.ts +3 -0
  235. package/lib/typescript/src/core/symbols/knockout.d.ts +4 -0
  236. package/lib/typescript/src/core/symbols/layers.d.ts +37 -0
  237. package/lib/typescript/src/core/symbols/template.d.ts +23 -0
  238. package/lib/typescript/src/core/symbols/vectorDrawable.d.ts +12 -0
  239. package/lib/typescript/src/core/types.d.ts +3 -92
  240. package/lib/typescript/src/devServerFont.d.ts +4 -0
  241. package/lib/typescript/src/devServerFont.web.d.ts +4 -0
  242. package/lib/typescript/src/fontIntegrity.d.ts +24 -0
  243. package/lib/typescript/src/index.d.ts +1 -0
  244. package/lib/typescript/src/loadDynamicFont.d.ts +1 -0
  245. package/lib/typescript/src/nativeFontLoader.d.ts +2 -0
  246. package/lib/typescript/src/nativeFontLoader.web.d.ts +3 -0
  247. package/lib/typescript/src/specs/NanoIconViewNativeComponent.d.ts +6 -5
  248. package/lib/typescript/src/specs/NativeNanoIconsFontLoader.d.ts +1 -0
  249. package/lib/typescript/src/symbols/index.android.d.ts +33 -0
  250. package/lib/typescript/src/symbols/index.d.ts +31 -0
  251. package/lib/typescript/src/symbols/index.ios.d.ts +31 -0
  252. package/lib/typescript/src/symbols/index.native.d.ts +8 -0
  253. package/lib/typescript/src/symbols/types.d.ts +24 -0
  254. package/lib/typescript/src/types.d.ts +7 -0
  255. package/lib/typescript/src/utils/fingerPrint.d.ts +19 -1
  256. package/lib/typescript/src/utils/fontIdentity.d.ts +5 -0
  257. package/lib/typescript/src/utils/glyphRuntime.d.ts +3 -1
  258. package/lib/typescript/src/utils/naming.d.ts +11 -0
  259. package/lib/typescript/src/utils/packageVersion.d.ts +3 -0
  260. package/lib/typescript/src/utils/parse.d.ts +0 -1
  261. package/lib/typescript/src/utils/runtimeLog.d.ts +5 -0
  262. package/lib/typescript/src/utils/svgPatterns.d.ts +39 -0
  263. package/lib/typescript/src/utils/validateLayerColor.d.ts +3 -0
  264. package/metro.js +1 -0
  265. package/package.json +37 -11
  266. package/react-native-nano-icons.podspec +4 -1
  267. package/react-native.config.js +10 -0
  268. package/src/specs/NanoIconViewNativeComponent.ts +9 -6
  269. package/src/specs/NativeNanoIconsFontLoader.ts +1 -0
  270. package/lib/commonjs/src/core/pipeline/managers.d.ts +0 -11
  271. package/lib/commonjs/src/core/pipeline/managers.js +0 -104
  272. package/lib/commonjs/src/core/pipeline/run.d.ts +0 -14
  273. package/lib/commonjs/src/core/pipeline/run.js +0 -189
  274. package/lib/commonjs/src/core/svg/svg_dom.d.ts +0 -51
  275. package/lib/commonjs/src/core/svg/svg_pathops.d.ts +0 -32
  276. package/lib/module/const/codegenPrimitives.js.map +0 -1
  277. package/lib/module/const/colors.js.map +0 -1
  278. package/lib/module/core/font/compile.js +0 -81
  279. package/lib/module/core/font/compile.js.map +0 -1
  280. package/lib/module/core/font/metrics.js +0 -37
  281. package/lib/module/core/font/metrics.js.map +0 -1
  282. package/lib/module/core/pipeline/config.js +0 -20
  283. package/lib/module/core/pipeline/config.js.map +0 -1
  284. package/lib/module/core/pipeline/index.js +0 -5
  285. package/lib/module/core/pipeline/index.js.map +0 -1
  286. package/lib/module/core/pipeline/managers.js +0 -94
  287. package/lib/module/core/pipeline/managers.js.map +0 -1
  288. package/lib/module/core/pipeline/run.js +0 -204
  289. package/lib/module/core/pipeline/run.js.map +0 -1
  290. package/lib/module/core/shims/pathops.py +0 -181
  291. package/lib/module/core/shims/picosvg-0.22.3-py3-none-any.whl +0 -0
  292. package/lib/module/core/svg/layers.js +0 -85
  293. package/lib/module/core/svg/layers.js.map +0 -1
  294. package/lib/module/core/svg/svg_dom.js +0 -170
  295. package/lib/module/core/svg/svg_dom.js.map +0 -1
  296. package/lib/module/core/svg/svg_pathops.js +0 -750
  297. package/lib/module/core/svg/svg_pathops.js.map +0 -1
  298. package/lib/module/core/tsconfig.json +0 -32
  299. package/lib/module/core/types.js +0 -2
  300. package/lib/module/core/types.js.map +0 -1
  301. package/lib/module/createNanoIconsSet.js.map +0 -1
  302. package/lib/module/createNanoIconsSet.native.js.map +0 -1
  303. package/lib/module/createNanoIconsSet.shared.js.map +0 -1
  304. package/lib/module/createNanoIconsSet.web.js.map +0 -1
  305. package/lib/module/index.js.map +0 -1
  306. package/lib/module/index.node.js.map +0 -1
  307. package/lib/module/loadDynamicFont.js.map +0 -1
  308. package/lib/module/specs/NativeNanoIconsFontLoader.js.map +0 -1
  309. package/lib/module/types.js.map +0 -1
  310. package/lib/module/utils/fingerPrint.js.map +0 -1
  311. package/lib/module/utils/glyphRuntime.js.map +0 -1
  312. package/lib/module/utils/parse.js.map +0 -1
  313. package/lib/module/utils/shallowEqualColor.js.map +0 -1
  314. package/lib/typescript/__tests__/build.unit.test.d.ts +0 -3
  315. package/lib/typescript/__tests__/build.unit.test.d.ts.map +0 -1
  316. package/lib/typescript/__tests__/clippath.e2e.test.d.ts +0 -3
  317. package/lib/typescript/__tests__/clippath.e2e.test.d.ts.map +0 -1
  318. package/lib/typescript/__tests__/fingerprint.unit.test.d.ts +0 -3
  319. package/lib/typescript/__tests__/fingerprint.unit.test.d.ts.map +0 -1
  320. package/lib/typescript/__tests__/glyphRuntime.unit.test.d.ts +0 -2
  321. package/lib/typescript/__tests__/glyphRuntime.unit.test.d.ts.map +0 -1
  322. package/lib/typescript/__tests__/link.unit.test.d.ts +0 -3
  323. package/lib/typescript/__tests__/link.unit.test.d.ts.map +0 -1
  324. package/lib/typescript/__tests__/loadDynamicFont.unit.test.d.ts +0 -2
  325. package/lib/typescript/__tests__/loadDynamicFont.unit.test.d.ts.map +0 -1
  326. package/lib/typescript/__tests__/pipeline.e2e.test.d.ts +0 -3
  327. package/lib/typescript/__tests__/pipeline.e2e.test.d.ts.map +0 -1
  328. package/lib/typescript/__tests__/placement.unit.test.d.ts +0 -3
  329. package/lib/typescript/__tests__/placement.unit.test.d.ts.map +0 -1
  330. package/lib/typescript/__tests__/svg_dom.unit.test.d.ts +0 -3
  331. package/lib/typescript/__tests__/svg_dom.unit.test.d.ts.map +0 -1
  332. package/lib/typescript/cli/build.d.ts +0 -32
  333. package/lib/typescript/cli/build.d.ts.map +0 -1
  334. package/lib/typescript/cli/link.d.ts +0 -12
  335. package/lib/typescript/cli/link.d.ts.map +0 -1
  336. package/lib/typescript/cli/logger.d.ts +0 -28
  337. package/lib/typescript/cli/logger.d.ts.map +0 -1
  338. package/lib/typescript/src/const/codegenPrimitives.d.ts.map +0 -1
  339. package/lib/typescript/src/const/colors.d.ts.map +0 -1
  340. package/lib/typescript/src/core/font/compile.d.ts +0 -21
  341. package/lib/typescript/src/core/font/compile.d.ts.map +0 -1
  342. package/lib/typescript/src/core/font/metrics.d.ts +0 -2
  343. package/lib/typescript/src/core/font/metrics.d.ts.map +0 -1
  344. package/lib/typescript/src/core/pipeline/config.d.ts +0 -16
  345. package/lib/typescript/src/core/pipeline/config.d.ts.map +0 -1
  346. package/lib/typescript/src/core/pipeline/index.d.ts +0 -4
  347. package/lib/typescript/src/core/pipeline/index.d.ts.map +0 -1
  348. package/lib/typescript/src/core/pipeline/managers.d.ts +0 -12
  349. package/lib/typescript/src/core/pipeline/managers.d.ts.map +0 -1
  350. package/lib/typescript/src/core/pipeline/run.d.ts +0 -15
  351. package/lib/typescript/src/core/pipeline/run.d.ts.map +0 -1
  352. package/lib/typescript/src/core/svg/layers.d.ts.map +0 -1
  353. package/lib/typescript/src/core/svg/svg_dom.d.ts +0 -52
  354. package/lib/typescript/src/core/svg/svg_dom.d.ts.map +0 -1
  355. package/lib/typescript/src/core/svg/svg_pathops.d.ts +0 -33
  356. package/lib/typescript/src/core/svg/svg_pathops.d.ts.map +0 -1
  357. package/lib/typescript/src/core/types.d.ts.map +0 -1
  358. package/lib/typescript/src/createNanoIconsSet.d.ts.map +0 -1
  359. package/lib/typescript/src/createNanoIconsSet.native.d.ts.map +0 -1
  360. package/lib/typescript/src/createNanoIconsSet.shared.d.ts.map +0 -1
  361. package/lib/typescript/src/createNanoIconsSet.web.d.ts.map +0 -1
  362. package/lib/typescript/src/index.d.ts.map +0 -1
  363. package/lib/typescript/src/index.node.d.ts.map +0 -1
  364. package/lib/typescript/src/loadDynamicFont.d.ts.map +0 -1
  365. package/lib/typescript/src/specs/NanoIconViewNativeComponent.d.ts.map +0 -1
  366. package/lib/typescript/src/specs/NativeNanoIconsFontLoader.d.ts.map +0 -1
  367. package/lib/typescript/src/types.d.ts.map +0 -1
  368. package/lib/typescript/src/utils/fingerPrint.d.ts.map +0 -1
  369. package/lib/typescript/src/utils/glyphRuntime.d.ts.map +0 -1
  370. package/lib/typescript/src/utils/parse.d.ts.map +0 -1
  371. package/lib/typescript/src/utils/shallowEqualColor.d.ts.map +0 -1
  372. package/plugin/src/buildFonts.ts +0 -42
  373. package/plugin/src/index.ts +0 -21
  374. package/plugin/src/types.ts +0 -42
  375. package/plugin/src/withNanoIconsFontLinking.ts +0 -136
  376. package/plugin/tsconfig.json +0 -9
  377. package/scripts/cli.ts +0 -63
  378. package/scripts/tsconfig.json +0 -25
  379. package/src/const/colors.ts +0 -150
  380. package/src/core/font/compile.ts +0 -99
  381. package/src/core/font/metrics.ts +0 -44
  382. package/src/core/pipeline/config.ts +0 -25
  383. package/src/core/pipeline/index.ts +0 -3
  384. package/src/core/pipeline/managers.ts +0 -132
  385. package/src/core/pipeline/run.ts +0 -274
  386. package/src/core/shims/pathops.py +0 -181
  387. package/src/core/shims/picosvg-0.22.3-py3-none-any.whl +0 -0
  388. package/src/core/svg/layers.ts +0 -110
  389. package/src/core/svg/svg_dom.ts +0 -194
  390. package/src/core/svg/svg_pathops.ts +0 -1040
  391. package/src/core/tsconfig.json +0 -32
  392. package/src/core/types.ts +0 -157
  393. package/src/createNanoIconsSet.native.tsx +0 -192
  394. package/src/createNanoIconsSet.shared.tsx +0 -174
  395. package/src/createNanoIconsSet.tsx +0 -20
  396. package/src/createNanoIconsSet.web.tsx +0 -109
  397. package/src/index.node.ts +0 -14
  398. package/src/index.ts +0 -6
  399. package/src/loadDynamicFont.ts +0 -162
  400. package/src/types.ts +0 -31
  401. package/src/utils/fingerPrint.ts +0 -20
  402. package/src/utils/glyphRuntime.ts +0 -46
  403. package/src/utils/parse.ts +0 -67
  404. package/src/utils/shallowEqualColor.ts +0 -17
@@ -0,0 +1,23 @@
1
+ import type { NanoLogger } from '../types';
2
+ export type SymbolTemplateLayer = {
3
+ /** Path data in source viewBox coordinates (nonzero winding). */
4
+ d: string;
5
+ fill: string | null;
6
+ };
7
+ export declare function layerHexColor(fill: string | null): string;
8
+ export declare function layerClass(layerIndex: number): string;
9
+ /**
10
+ * Build the template SVG for one symbol. Layers are back→front; every layer
11
+ * gets `monochrome-N multicolor-N:custom` classes, with the layer fills
12
+ * declared in a `<style>` block.
13
+ */
14
+ export declare function buildSymbolTemplate(opts: {
15
+ layers: SymbolTemplateLayer[];
16
+ viewBox: [number, number, number, number];
17
+ /** Tight content box `[x, y, w, h]`; used instead of the viewBox when given. */
18
+ contentBounds?: [number, number, number, number];
19
+ /** Shown in the template's Notes group. */
20
+ descriptiveName?: string;
21
+ logger?: NanoLogger;
22
+ }): string;
23
+ //# sourceMappingURL=template.d.ts.map
@@ -0,0 +1,12 @@
1
+ import type { SymbolTemplateLayer } from './template';
2
+ /**
3
+ * VectorDrawable XML from z-ordered layers. `contentBounds` (tight `[x,y,w,h]`,
4
+ * defaults to viewBox) sets the viewport so padding doesn't shrink the icon.
5
+ */
6
+ export declare function buildVectorDrawableXml(opts: {
7
+ layers: SymbolTemplateLayer[];
8
+ viewBox: [number, number, number, number];
9
+ /** Tight content box `[x, y, w, h]`; used instead of the viewBox when given. */
10
+ contentBounds?: [number, number, number, number];
11
+ }): string;
12
+ //# sourceMappingURL=vectorDrawable.d.ts.map
@@ -7,98 +7,6 @@ export type NanoLogger = {
7
7
  info: (msg: string) => void;
8
8
  warn: (msg: string) => void;
9
9
  };
10
- export type Point = readonly [number, number];
11
- export type Cmd = readonly number[];
12
- export type VerbMap = {
13
- MOVE: number;
14
- LINE: number;
15
- QUAD: number;
16
- CONIC: number;
17
- CUBIC: number;
18
- CLOSE: number;
19
- };
20
- export type WrappedPath = {
21
- p: PathKitPath;
22
- meta: {
23
- moves: Point[];
24
- };
25
- };
26
- export interface PathKitPath {
27
- delete?: () => void;
28
- moveTo: (x: number, y: number) => void;
29
- lineTo: (x: number, y: number) => void;
30
- quadTo: (x1: number, y1: number, x2: number, y2: number) => void;
31
- cubicTo: (x1: number, y1: number, x2: number, y2: number, x3: number, y3: number) => void;
32
- close: () => void;
33
- simplify: () => void;
34
- toSVGString: () => string;
35
- toCmds: () => Cmd[];
36
- getBounds: () => {
37
- fLeft: number;
38
- fTop: number;
39
- fRight: number;
40
- fBottom: number;
41
- };
42
- getFillType?: () => number;
43
- setFillType: (t: number) => void;
44
- dash?: (on: number, off: number, phase: number) => void;
45
- stroke: (opts: {
46
- width: number;
47
- cap: number;
48
- join: number;
49
- miter_limit: number;
50
- }) => PathKitPath | null;
51
- transform: (a: number, c: number, e: number, b: number, d: number, f: number, g: number, h: number, i: number) => void;
52
- }
53
- export interface PathKitModule {
54
- MOVE_VERB?: number;
55
- LINE_VERB?: number;
56
- QUAD_VERB?: number;
57
- CONIC_VERB?: number;
58
- CUBIC_VERB?: number;
59
- CLOSE_VERB?: number;
60
- FillType?: {
61
- EVENODD?: number;
62
- EVEN_ODD?: number;
63
- WINDING?: number;
64
- NONZERO?: number;
65
- };
66
- StrokeCap?: {
67
- BUTT?: number;
68
- ROUND?: number;
69
- SQUARE?: number;
70
- };
71
- StrokeJoin?: {
72
- MITER?: number;
73
- ROUND?: number;
74
- BEVEL?: number;
75
- };
76
- PathOp?: {
77
- UNION?: number;
78
- INTERSECT?: number;
79
- DIFFERENCE?: number;
80
- };
81
- NewPath: (src?: PathKitPath) => PathKitPath;
82
- FromSVGString: (svg: string) => PathKitPath | null;
83
- MakeFromOp: (a: PathKitPath, b: PathKitPath, op: number) => PathKitPath | null;
84
- }
85
- export type PyodideModule = {
86
- mountNodeFS: (mountpoint: string, hostPath: string) => void;
87
- registerJsModule: (name: string, mod: unknown) => void;
88
- loadPackage: (pkgs: string[], options?: {
89
- messageCallback?: (msg: string) => void;
90
- errorCallback?: (msg: string) => void;
91
- }) => Promise<void>;
92
- runPythonAsync: (code: string) => Promise<unknown>;
93
- runPython: (code: string) => string;
94
- FS: {
95
- writeFile: (path: string, data: string) => void;
96
- };
97
- globals: {
98
- set: (key: string, value: unknown) => void;
99
- get: (key: string) => unknown;
100
- };
101
- };
102
10
  export type GlyphLayer = [codepoint: number, color: string];
103
11
  export type GlyphEntry = [adv: number, layers: GlyphLayer[]];
104
12
  export type IconsMap = Record<string, GlyphEntry>;
@@ -110,6 +18,7 @@ export type IconsMap = Record<string, GlyphEntry>;
110
18
  * s - start unicode,
111
19
  * h - hash,
112
20
  * l - linking mode: 's' (static, bundled — default when absent) or 'd' (dynamic, OTA-delivered),
21
+ * w - web output: true when a .woff2 was built alongside the .ttf (absent otherwise),
113
22
  * i - icons,
114
23
  * adv - advance width,
115
24
  */
@@ -121,6 +30,7 @@ export type NanoGlyphMap = {
121
30
  s: number;
122
31
  h?: string;
123
32
  l?: 's' | 'd';
33
+ w?: true;
124
34
  };
125
35
  i: IconsMap;
126
36
  };
@@ -133,6 +43,7 @@ export type NanoGlyphMapInput = {
133
43
  s: number;
134
44
  h?: string;
135
45
  l?: 's' | 'd' | (string & {});
46
+ w?: boolean;
136
47
  };
137
48
  i: Record<string, readonly unknown[]>;
138
49
  };
@@ -0,0 +1,4 @@
1
+ export declare const DEV_SERVER_FONT_ROUTE = "/__nanoicons/";
2
+ export declare function devServerFontUri(family: string): string | undefined;
3
+ export declare function loadFontFromDevServer(family: string): Promise<boolean>;
4
+ //# sourceMappingURL=devServerFont.d.ts.map
@@ -0,0 +1,4 @@
1
+ export declare const DEV_SERVER_FONT_ROUTE = "/__nanoicons/";
2
+ export declare function devServerFontUri(family: string): string | undefined;
3
+ export declare function loadFontFromDevServer(family: string): Promise<boolean>;
4
+ //# sourceMappingURL=devServerFont.web.d.ts.map
@@ -0,0 +1,24 @@
1
+ export type FontIntegrityIssue = {
2
+ fontFamily: string;
3
+ family: string;
4
+ linking: 'static' | 'dynamic';
5
+ message: string;
6
+ /** The error behind a dynamic font failure, when there is one. */
7
+ cause?: unknown;
8
+ };
9
+ export type FontIntegrityStatus = 'found' | 'resolved';
10
+ type Listener = (issue: FontIntegrityIssue, status: FontIntegrityStatus) => void;
11
+ export declare function isFontRegistered(family: string): Promise<boolean>;
12
+ export declare function checkFontIntegrity(family: string, linking: 'static' | 'dynamic'): Promise<void>;
13
+ export declare const FONT_MISMATCH_CODE = "E_NANOICONS_FONT_MISMATCH";
14
+ export declare function isFontMismatch(err: unknown): boolean;
15
+ export declare const FONT_SOURCE_CODE = "E_NANOICONS_FONT_SOURCE";
16
+ export declare function reportFontMismatch(family: string, linking: 'static' | 'dynamic'): void;
17
+ export declare function reportMissingDynamicFont(family: string): Promise<void>;
18
+ export declare function reportDynamicFontLoadFailure(family: string, cause: unknown): Promise<void>;
19
+ export declare function resolveFontIssue(family: string): void;
20
+ export declare function addFontIntegrityListener(listener: Listener): () => void;
21
+ export declare function getFontIntegrityIssues(): FontIntegrityIssue[];
22
+ export declare function __resetFontIntegrityForTests(): void;
23
+ export {};
24
+ //# sourceMappingURL=fontIntegrity.d.ts.map
@@ -1,3 +1,4 @@
1
1
  export { createIconSet as createNanoIconSet, type IconComponent, type IconProps, } from './createNanoIconsSet';
2
+ export { addFontIntegrityListener, getFontIntegrityIssues, type FontIntegrityIssue, type FontIntegrityStatus, } from './fontIntegrity';
2
3
  export type { ColorValue } from 'react-native';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -22,6 +22,7 @@ export declare function loadDynamicFont(family: string, font: unknown, opts?: {
22
22
  * errored, or not managed by us).
23
23
  */
24
24
  export declare function useDynamicFontPending(managed: boolean, family: string): boolean;
25
+ export declare function useDynamicFontStatus(family: string): FontStatus | undefined;
25
26
  /** Test-only: reset module state between tests. */
26
27
  export declare function __resetDynamicFontsForTests(): void;
27
28
  export {};
@@ -0,0 +1,2 @@
1
+ export { default } from './specs/NativeNanoIconsFontLoader';
2
+ //# sourceMappingURL=nativeFontLoader.d.ts.map
@@ -0,0 +1,3 @@
1
+ declare const _default: null;
2
+ export default _default;
3
+ //# sourceMappingURL=nativeFontLoader.web.d.ts.map
@@ -1,14 +1,15 @@
1
- import type { ViewProps } from 'react-native';
1
+ import type { ColorValue, ViewProps } from 'react-native';
2
2
  import type { Float, Int32 } from '../const/codegenPrimitives';
3
3
  export interface NativeProps extends ViewProps {
4
4
  fontFamily: string;
5
5
  codepoints: ReadonlyArray<Int32>;
6
- colors: ReadonlyArray<Int32>;
7
- fontSize: Float;
6
+ colors: ReadonlyArray<ColorValue>;
7
+ color?: ColorValue;
8
+ tintLayers: ReadonlyArray<Int32>;
9
+ size: Float;
10
+ allowFontScaling: boolean;
8
11
  advanceWidth: Int32;
9
12
  unitsPerEm: Int32;
10
- iconWidth: Float;
11
- iconHeight: Float;
12
13
  }
13
14
  declare const _default: import("react-native/types_generated/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
14
15
  export default _default;
@@ -2,6 +2,7 @@ import type { TurboModule } from 'react-native';
2
2
  export interface Spec extends TurboModule {
3
3
  /** Pass glyphMap.m.f as `family`. On iOS it must also match the TTF's embedded PostScript/full name. */
4
4
  registerFont(family: string, uri: string): Promise<boolean>;
5
+ isFontRegistered(family: string): Promise<boolean>;
5
6
  }
6
7
  declare const _default: Spec | null | undefined;
7
8
  export default _default;
@@ -0,0 +1,33 @@
1
+ import type { NanoSymbolDescriptor, NanoSymbolRenderingMode } from './types';
2
+ export type { NativeNanoSymbol, NanoSymbolDescriptor, NanoSymbolRenderingMode, } from './types';
3
+ /**
4
+ * Augmentable registry of forged icon names. The build emits a `.d.ts` per symbol
5
+ * set that augments this interface, so `nativeNanoSymbol()` accepts that set's SVG
6
+ * filenames (and autocompletes them) with no explicit generic.
7
+ */
8
+ export interface NanoSymbolNames {
9
+ }
10
+ /** Accepted icon names — the augmented union, or any string until a set is generated. */
11
+ type NanoSymbolName = [keyof NanoSymbolNames] extends [never] ? string : Extract<keyof NanoSymbolNames, string>;
12
+ /**
13
+ * Resolve a forged icon (by its SVG filename) to a native tab-bar descriptor.
14
+ *
15
+ * iOS — the asset is referenced by its asset-catalog name via the `sfSymbol`
16
+ * path. Every forged symbol carries both rendering modes; `renderingMode`
17
+ * picks one: `monochrome` (bar tint, default) or `original` (the SVG's own
18
+ * colors — Apple's "multicolor" symbol rendering).
19
+ *
20
+ * Android — the drawable resource name is derived from `${prefix}.${name}` with
21
+ * the same pure transform the build uses. Each icon ships two drawables;
22
+ * `renderingMode` picks the solid silhouette the bar tints (`monochrome`) or
23
+ * the untinted drawable that keeps its own colors (`original`, `_original`
24
+ * suffix), forwarded as react-navigation's `tinted`.
25
+ *
26
+ * tabBarIcon: () => nativeNanoSymbol('home')
27
+ * // tints only when unfocused, keeps the icon's own colors while focused
28
+ * tabBarIcon: ({ focused }) =>
29
+ * nativeNanoSymbol('home', focused ? 'original' : 'monochrome')
30
+ */
31
+ export declare function nativeNanoSymbol<Name extends NanoSymbolName>(name: Name, renderingMode?: NanoSymbolRenderingMode): NanoSymbolDescriptor<Name, 'nano'>;
32
+ export declare function nativeNanoSymbol<Name extends NanoSymbolName, P extends string>(name: Name, renderingMode: NanoSymbolRenderingMode | undefined, prefix: P): NanoSymbolDescriptor<Name, P>;
33
+ //# sourceMappingURL=index.android.d.ts.map
@@ -0,0 +1,31 @@
1
+ import type { NanoSymbolDescriptor, NanoSymbolRenderingMode } from './types';
2
+ export type { NativeNanoSymbol, NanoSymbolDescriptor, NanoSymbolRenderingMode, } from './types';
3
+ /**
4
+ * Augmentable registry of forged icon names. The build emits a `.d.ts` per symbol
5
+ * set that augments this interface, so `nativeNanoSymbol()` accepts that set's SVG
6
+ * filenames (and autocompletes them) with no explicit generic.
7
+ */
8
+ export interface NanoSymbolNames {
9
+ }
10
+ /** Accepted icon names — the augmented union, or any string until a set is generated. */
11
+ type NanoSymbolName = [keyof NanoSymbolNames] extends [never] ? string : Extract<keyof NanoSymbolNames, string>;
12
+ /**
13
+ * Resolve a forged icon (by its SVG filename) to a native tab-bar descriptor.
14
+ *
15
+ * iOS — the asset is referenced by its asset-catalog name via the `sfSymbol`
16
+ * path. Every forged symbol carries both rendering modes; `renderingMode`
17
+ * picks one: `monochrome` (bar tint, default) or `original` (the SVG's own
18
+ * colors — Apple's "multicolor" symbol rendering).
19
+ *
20
+ * Android — the drawable resource name is derived from `${prefix}.${name}` with
21
+ * the same pure transform the build uses. `renderingMode` controls whether the
22
+ * bar recolors the drawable (`monochrome`) or keeps its own colors (`original`).
23
+ *
24
+ * tabBarIcon: () => nativeNanoSymbol('home')
25
+ * // tints only when unfocused, keeps the icon's own colors while focused
26
+ * tabBarIcon: ({ focused }) =>
27
+ * nativeNanoSymbol('home', focused ? 'original' : 'monochrome')
28
+ */
29
+ export declare function nativeNanoSymbol<Name extends NanoSymbolName>(name: Name, renderingMode?: NanoSymbolRenderingMode): NanoSymbolDescriptor<Name, 'nano'>;
30
+ export declare function nativeNanoSymbol<Name extends NanoSymbolName, P extends string>(name: Name, renderingMode: NanoSymbolRenderingMode | undefined, prefix: P): NanoSymbolDescriptor<Name, P>;
31
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,31 @@
1
+ import type { NanoSymbolDescriptor, NanoSymbolRenderingMode } from './types';
2
+ export type { NativeNanoSymbol, NanoSymbolDescriptor, NanoSymbolRenderingMode, } from './types';
3
+ /**
4
+ * Augmentable registry of forged icon names. The build emits a `.d.ts` per symbol
5
+ * set that augments this interface, so `nativeNanoSymbol()` accepts that set's SVG
6
+ * filenames (and autocompletes them) with no explicit generic.
7
+ */
8
+ export interface NanoSymbolNames {
9
+ }
10
+ /** Accepted icon names — the augmented union, or any string until a set is generated. */
11
+ type NanoSymbolName = [keyof NanoSymbolNames] extends [never] ? string : Extract<keyof NanoSymbolNames, string>;
12
+ /**
13
+ * Resolve a forged icon (by its SVG filename) to a native tab-bar descriptor.
14
+ *
15
+ * iOS — the asset is referenced by its asset-catalog name via the `sfSymbol`
16
+ * path. Every forged symbol carries both rendering modes; `renderingMode`
17
+ * picks one: `monochrome` (bar tint, default) or `original` (the SVG's own
18
+ * colors — Apple's "multicolor" symbol rendering).
19
+ *
20
+ * Android — the drawable resource name is derived from `${prefix}.${name}` with
21
+ * the same pure transform the build uses. `renderingMode` controls whether the
22
+ * bar recolors the drawable (`monochrome`) or keeps its own colors (`original`).
23
+ *
24
+ * tabBarIcon: () => nativeNanoSymbol('home')
25
+ * // tints only when unfocused, keeps the icon's own colors while focused
26
+ * tabBarIcon: ({ focused }) =>
27
+ * nativeNanoSymbol('home', focused ? 'original' : 'monochrome')
28
+ */
29
+ export declare function nativeNanoSymbol<Name extends NanoSymbolName>(name: Name, renderingMode?: NanoSymbolRenderingMode): NanoSymbolDescriptor<Name, 'nano'>;
30
+ export declare function nativeNanoSymbol<Name extends NanoSymbolName, P extends string>(name: Name, renderingMode: NanoSymbolRenderingMode | undefined, prefix: P): NanoSymbolDescriptor<Name, P>;
31
+ //# sourceMappingURL=index.ios.d.ts.map
@@ -0,0 +1,8 @@
1
+ import { nativeNanoSymbol as iosNanoSymbol } from './index.ios';
2
+ /**
3
+ * Runtime platform split for React Native. Metro resolves package `exports`
4
+ * targets verbatim — it never expands `.ios`/`.android` for them — so the
5
+ * filename-based split the source uses cannot survive the `exports` map.
6
+ */
7
+ export declare const nativeNanoSymbol: typeof iosNanoSymbol;
8
+ //# sourceMappingURL=index.native.d.ts.map
@@ -0,0 +1,24 @@
1
+ export type NanoSymbolRenderingMode = 'monochrome' | 'original';
2
+ export type NativeNanoSymbol = {
3
+ type: 'sfSymbol';
4
+ name: string;
5
+ renderingMode: NanoSymbolRenderingMode;
6
+ } | {
7
+ type: 'image';
8
+ source: {
9
+ uri: string;
10
+ };
11
+ tinted: boolean;
12
+ };
13
+ export type NanoSymbolDescriptor<Name extends string, P extends string> = {
14
+ type: 'sfSymbol';
15
+ name: `${P}.${Name}`;
16
+ renderingMode: NanoSymbolRenderingMode;
17
+ } | {
18
+ type: 'image';
19
+ source: {
20
+ uri: string;
21
+ };
22
+ tinted: boolean;
23
+ };
24
+ //# sourceMappingURL=types.d.ts.map
@@ -1,11 +1,13 @@
1
1
  import type { ComponentRef, Ref } from 'react';
2
2
  import type { AccessibilityRole, ColorValue, View, ViewStyle } from 'react-native';
3
3
  import type { NanoGlyphMapInput } from './core/types';
4
+ import type { TintMode } from './utils/glyphRuntime';
4
5
  type ViewRef = ComponentRef<typeof View>;
5
6
  export type IconProps<Name> = {
6
7
  name: Name;
7
8
  size?: number;
8
9
  color?: ColorValue | ColorValue[];
10
+ tintMode?: TintMode;
9
11
  allowFontScaling?: boolean;
10
12
  style?: ViewStyle;
11
13
  accessible?: boolean;
@@ -15,6 +17,11 @@ export type IconProps<Name> = {
15
17
  importantForAccessibility?: 'auto' | 'yes' | 'no' | 'no-hide-descendants';
16
18
  ref?: Ref<ViewRef>;
17
19
  testID?: string;
20
+ /**
21
+ * Forwarded to the container element on web.
22
+ * @platform Web only - no-op on native.
23
+ */
24
+ className?: string;
18
25
  };
19
26
  export type IconComponent<GM extends NanoGlyphMapInput> = React.FC<IconProps<keyof GM['i']>> & {
20
27
  loadFont: (font?: number | string | {
@@ -1,2 +1,20 @@
1
- export declare function getFingerprintSync(dir: string): string;
1
+ export type FingerprintInputs = {
2
+ upm: number;
3
+ safeZone: number;
4
+ startUnicode: number;
5
+ version: string;
6
+ toolchain: readonly string[];
7
+ };
8
+ export type SymbolFingerprintInputs = {
9
+ prefix: string;
10
+ version: string;
11
+ toolchain: readonly string[];
12
+ };
13
+ export type SvgDirFingerprint = {
14
+ hash: string;
15
+ svgHashByFile: Map<string, string>;
16
+ };
17
+ export declare function getFingerprintSync(dir: string, inputs: FingerprintInputs): string;
18
+ export declare function fingerprintSvgDirSync(dir: string, inputs: FingerprintInputs): SvgDirFingerprint;
19
+ export declare function fingerprintSymbolDirSync(dir: string, inputs: SymbolFingerprintInputs): SvgDirFingerprint;
2
20
  //# sourceMappingURL=fingerPrint.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare function buildFontFamily(fontFamily: string, inputHash: string): string;
2
+ export declare function configuredFontFamily(family: string): string;
3
+ export declare function isFontFileOf(fontFamily: string, fileName: string): boolean;
4
+ export declare function isBuildFontFile(fileName: string): boolean;
5
+ //# sourceMappingURL=fontIdentity.d.ts.map
@@ -14,5 +14,7 @@ export declare function createCharCache(): (codepoint: number) => string;
14
14
  * color wins, else the last supplied palette color spills onto remaining
15
15
  * layers, else the glyph's own source color, else black.
16
16
  */
17
- export declare function createLayerColorResolver(color: ColorValue | ColorValue[] | undefined): (index: number, srcColor: string | undefined) => ColorValue;
17
+ export type TintMode = 'all' | 'currentColor';
18
+ export declare function createLayerColorResolver(color: ColorValue | ColorValue[] | undefined, tintMode?: TintMode, layers?: GlyphEntry[1]): (index: number, srcColor: string | undefined) => ColorValue;
19
+ export declare function tintableLayers(layers: GlyphEntry[1], tintMode?: TintMode): readonly number[];
18
20
  //# sourceMappingURL=glyphRuntime.d.ts.map
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Resource names must match `[a-z][a-z0-9_]*` — no dots/uppercase.
3
+ * `nano.home` → `nano_home`, `nano.person-walking` → `nano_person_walking`.
4
+ */
5
+ export declare function toDrawableResourceName(assetName: string): string;
6
+ export declare function toOriginalDrawableResourceName(resourceName: string): string;
7
+ /** "my-tab icons" → "MyTabIcons" — PascalCase base for manifest identifiers. */
8
+ export declare function manifestBaseName(setName: string): string;
9
+ /** Manifest export name, e.g. `MyTabIconsSymbols` / `MyTabIconsDrawables`. */
10
+ export declare function manifestExportName(setName: string, suffix?: string): string;
11
+ //# sourceMappingURL=naming.d.ts.map
@@ -0,0 +1,3 @@
1
+ export declare function packageVersion(): string;
2
+ export declare function fontToolchainVersions(): string[];
3
+ //# sourceMappingURL=packageVersion.d.ts.map
@@ -1,3 +1,2 @@
1
- export declare function parseCodepointFromFilename(filename: string): number;
2
1
  export declare function parseColor(color: string): [r: number, g: number, b: number, a: number];
3
2
  //# sourceMappingURL=parse.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const LOG_PREFIX = "\uD83D\uDD2C react-native-nano-icons";
2
+ export declare function warnRuntime(message: string, ...rest: unknown[]): void;
3
+ export declare function errorRuntime(message: string): void;
4
+ export declare function runtimeError(message: string): Error;
5
+ //# sourceMappingURL=runtimeLog.d.ts.map
@@ -0,0 +1,39 @@
1
+ /** Path already starts with a moveto. */
2
+ export declare const SVG_MOVE_PREFIX: RegExp;
3
+ /** Trailing close-path command (+ optional whitespace). */
4
+ export declare const SVG_TRAILING_CLOSE: RegExp;
5
+ /** A signed int/float token. */
6
+ export declare const SVG_NUMBER: RegExp;
7
+ /** Whitespace separator (e.g. viewBox parts). */
8
+ export declare const WHITESPACE: RegExp;
9
+ /** `<mask …>` element (unsupported). */
10
+ export declare const XML_MASK: RegExp;
11
+ /** `<filter …>` element (unsupported). */
12
+ export declare const XML_FILTER: RegExp;
13
+ /** `<image …>` element (unsupported). */
14
+ export declare const XML_IMAGE: RegExp;
15
+ /** An `xmlns=` attribute. */
16
+ export declare const XML_XMLNS: RegExp;
17
+ /** Opening `<svg` tag. */
18
+ export declare const SVG_OPEN_TAG: RegExp;
19
+ export declare const PX_ATTRIBUTE_VALUE: RegExp;
20
+ export declare const PX_STYLE_VALUE: RegExp;
21
+ /** viewBox: comma or whitespace separated. */
22
+ export declare const VIEWBOX_SEPARATOR: RegExp;
23
+ /** transform() arguments: comma and/or whitespace separated. */
24
+ export declare const TRANSFORM_ARG_SEPARATOR: RegExp;
25
+ /** stroke-dasharray: single comma or space separated. */
26
+ export declare const DASHARRAY_SEPARATOR: RegExp;
27
+ /** One transform function call, e.g. `rotate(30)`; captures name and args. */
28
+ export declare const TRANSFORM_FUNCTION: RegExp;
29
+ /** `url(#id)` reference; captures the id. */
30
+ export declare const URL_ID_REFERENCE: RegExp;
31
+ /** A well-formed XML attribute name. */
32
+ export declare const XML_ATTRIBUTE_NAME: RegExp;
33
+ export declare const XML_AMP: RegExp;
34
+ export declare const XML_LT: RegExp;
35
+ export declare const XML_GT: RegExp;
36
+ export declare const XML_QUOT: RegExp;
37
+ /** svg2ttf error `glyph "u<hex>"` → captures the hex codepoint. */
38
+ export declare const GLYPH_CODEPOINT: RegExp;
39
+ //# sourceMappingURL=svgPatterns.d.ts.map
@@ -0,0 +1,3 @@
1
+ import type { ColorValue } from 'react-native';
2
+ export declare function validateLayerColor(value: ColorValue | undefined, iconName: string, layerIndex: number): ColorValue;
3
+ //# sourceMappingURL=validateLayerColor.d.ts.map
package/metro.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./lib/commonjs/metro/index');
package/package.json CHANGED
@@ -1,30 +1,32 @@
1
1
  {
2
2
  "name": "react-native-nano-icons",
3
- "version": "0.2.1",
3
+ "version": "1.0.0-beta.2",
4
4
  "description": "High-performance icon rendering for React Native & Expo.",
5
- "react-native": "src/index.ts",
5
+ "react-native": "./lib/module/index.js",
6
6
  "source": "src/index.ts",
7
7
  "bin": "lib/commonjs/scripts/cli.js",
8
8
  "main": "./lib/commonjs/index.node.js",
9
9
  "types": "./lib/typescript/src/index.d.ts",
10
10
  "files": [
11
11
  "app.plugin.js",
12
- "src/core/shims",
13
- "bin",
14
- "src",
12
+ "metro.js",
13
+ "LICENSES.md",
14
+ "src/specs",
15
+ "src/const/codegenPrimitives.ts",
15
16
  "lib",
16
- "plugin",
17
- "scripts",
18
17
  "ios",
19
18
  "android",
19
+ "common",
20
+ "react-native.config.js",
20
21
  "react-native-nano-icons.podspec"
21
22
  ],
22
23
  "scripts": {
23
- "build": "yarn build:node-entry && bob build && yarn build:core && yarn build:cli && yarn build:plugin && yarn build:scripts",
24
+ "build": "yarn clean && yarn build:node-entry && bob build && yarn build:core && yarn build:cli && yarn build:plugin && yarn build:metro && yarn build:scripts && del-cli 'lib/typescript/**/*.d.ts.map'",
24
25
  "build:node-entry": "tsc -p tsconfig.node.json",
25
26
  "build:core": "tsc -p src/core/tsconfig.json",
26
27
  "build:cli": "tsc -p cli/tsconfig.json",
27
28
  "build:plugin": "tsc -p plugin/tsconfig.json",
29
+ "build:metro": "tsc -p metro/tsconfig.json",
28
30
  "build:scripts": "tsc -p scripts/tsconfig.json",
29
31
  "clean": "del-cli lib",
30
32
  "prepare": "yarn build",
@@ -39,11 +41,11 @@
39
41
  "@expo/config-plugins": ">=9.0.0",
40
42
  "@xmldom/xmldom": "^0.9.10",
41
43
  "chalk": "^5.6.2",
44
+ "cubic2quad": "^1.2.1",
42
45
  "fonteditor-core": "^2.6.3",
43
46
  "ora": "^9.3.0",
44
47
  "pathkit-wasm": "^1.0.0",
45
48
  "plist": "^3.0.5",
46
- "pyodide": "^0.29.3",
47
49
  "svg2ttf": "^6.0.3",
48
50
  "xcode": "^3.0.1"
49
51
  },
@@ -71,6 +73,7 @@
71
73
  "@types/plist": "^3.0.5",
72
74
  "@types/react": "~19.1.0",
73
75
  "@types/svg2ttf": "^5.0.3",
76
+ "@types/xcode": "^3.0.0",
74
77
  "babel-plugin-module-resolver": "^5.0.2",
75
78
  "del-cli": "^6.0.0",
76
79
  "expo-module-scripts": "^5.0.8",
@@ -83,7 +86,8 @@
83
86
  },
84
87
  "exports": {
85
88
  ".": {
86
- "source": "./src/index.tsx",
89
+ "source": "./src/index.ts",
90
+ "react-native": "./lib/module/index.js",
87
91
  "require": {
88
92
  "types": "./lib/typescript/src/index.d.ts",
89
93
  "default": "./lib/commonjs/index.node.js"
@@ -94,6 +98,22 @@
94
98
  },
95
99
  "default": "./lib/commonjs/index.node.js"
96
100
  },
101
+ "./symbols": {
102
+ "source": "./src/symbols/index.ts",
103
+ "react-native": {
104
+ "types": "./lib/typescript/src/symbols/index.d.ts",
105
+ "default": "./lib/module/symbols/index.native.js"
106
+ },
107
+ "import": {
108
+ "types": "./lib/typescript/src/symbols/index.d.ts",
109
+ "default": "./lib/module/symbols/index.js"
110
+ },
111
+ "require": {
112
+ "types": "./lib/typescript/src/symbols/index.d.ts",
113
+ "default": "./lib/module/symbols/index.js"
114
+ },
115
+ "default": "./lib/module/symbols/index.js"
116
+ },
97
117
  "./cli": {
98
118
  "source": "./cli/index.ts",
99
119
  "types": "./lib/commonjs/cli/index.d.ts",
@@ -110,6 +130,10 @@
110
130
  },
111
131
  "./app.plugin": "./app.plugin.js",
112
132
  "./app.plugin.js": "./app.plugin.js",
133
+ "./metro": {
134
+ "types": "./lib/commonjs/metro/index.d.ts",
135
+ "default": "./metro.js"
136
+ },
113
137
  "./package.json": "./package.json"
114
138
  },
115
139
  "keywords": [
@@ -139,11 +163,13 @@
139
163
  "react-native-builder-bob": {
140
164
  "source": "src",
141
165
  "output": "lib",
166
+ "exclude": "**/{__tests__,__fixtures__,__mocks__,core}/**",
142
167
  "targets": [
143
168
  [
144
169
  "module",
145
170
  {
146
- "esm": true
171
+ "esm": true,
172
+ "sourceMaps": false
147
173
  }
148
174
  ],
149
175
  [