react-native-nano-icons 1.0.0 → 1.1.0-beta.1
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 +137 -21
- package/android/src/main/java/com/nanoicons/NanoIconFonts.kt +15 -0
- package/android/src/main/java/com/nanoicons/NanoIconView.kt +27 -4
- package/android/src/main/java/com/nanoicons/NanoIconViewManager.kt +9 -2
- package/android/src/main/java/com/nanoicons/NanoIconsFontLoaderModule.kt +3 -0
- package/common/cpp/react/renderer/components/RNNanoIconsSpec/NanoIconProps.cpp +122 -0
- package/common/cpp/react/renderer/components/RNNanoIconsSpec/NanoIconProps.h +60 -0
- package/common/cpp/react/renderer/components/RNNanoIconsSpec/NanoIconViewShadowNode.cpp +0 -39
- package/common/cpp/react/renderer/components/RNNanoIconsSpec/NanoIconViewShadowNode.h +2 -16
- package/ios/NanoIconView.mm +17 -5
- package/ios/NanoIconsFontLoader.mm +5 -0
- package/lib/commonjs/cli/build.d.ts +26 -0
- package/lib/commonjs/cli/build.js +174 -64
- package/lib/commonjs/cli/buildSymbols.d.ts +17 -0
- package/lib/commonjs/cli/buildSymbols.js +103 -42
- package/lib/commonjs/cli/expoConfig.d.ts +10 -0
- package/lib/commonjs/cli/expoConfig.js +22 -7
- package/lib/commonjs/cli/fingerprint.d.ts +15 -0
- package/lib/commonjs/cli/fingerprint.js +36 -0
- package/lib/commonjs/cli/index.d.ts +2 -2
- package/lib/commonjs/cli/index.js +3 -1
- package/lib/commonjs/cli/link.d.ts +4 -0
- package/lib/commonjs/cli/link.js +25 -0
- package/lib/commonjs/cli/sameOutputs.d.ts +5 -0
- package/lib/commonjs/cli/sameOutputs.js +45 -0
- package/lib/commonjs/index.node.js +1 -1
- package/lib/commonjs/plugin/src/buildFonts.d.ts +3 -2
- package/lib/commonjs/plugin/src/buildFonts.js +11 -3
- package/lib/commonjs/plugin/src/buildSymbols.d.ts +2 -2
- package/lib/commonjs/plugin/src/buildSymbols.js +10 -3
- package/lib/commonjs/plugin/src/frozen.d.ts +3 -0
- package/lib/commonjs/plugin/src/frozen.js +18 -0
- package/lib/commonjs/plugin/src/index.js +3 -3
- package/lib/commonjs/plugin/src/types.d.ts +10 -0
- package/lib/commonjs/plugin/src/withNanoIconsDrawableLinking.d.ts +1 -1
- package/lib/commonjs/plugin/src/withNanoIconsDrawableLinking.js +2 -2
- package/lib/commonjs/plugin/src/withNanoIconsFontLinking.d.ts +3 -3
- package/lib/commonjs/plugin/src/withNanoIconsFontLinking.js +8 -8
- package/lib/commonjs/plugin/src/withNanoIconsSymbolLinking.d.ts +1 -1
- package/lib/commonjs/plugin/src/withNanoIconsSymbolLinking.js +2 -2
- package/lib/commonjs/scripts/cli.js +31 -2
- package/lib/commonjs/src/core/flatten/dom.js +40 -5
- package/lib/commonjs/src/core/flatten/element.js +2 -1
- package/lib/commonjs/src/core/flatten/stages/collapse.js +12 -0
- package/lib/commonjs/src/core/font/compile.d.ts +0 -1
- package/lib/commonjs/src/core/font/compile.js +2 -8
- package/lib/commonjs/src/core/glyph/merge.d.ts +2 -1
- package/lib/commonjs/src/core/glyph/merge.js +27 -36
- package/lib/commonjs/src/core/glyph/parse.d.ts +1 -2
- package/lib/commonjs/src/core/glyph/parse.js +31 -18
- package/lib/commonjs/src/core/pathkit/winding.d.ts +7 -1
- package/lib/commonjs/src/core/pathkit/winding.js +172 -0
- package/lib/commonjs/src/core/pipeline/config.d.ts +1 -0
- package/lib/commonjs/src/core/pipeline/prepare.d.ts +1 -1
- package/lib/commonjs/src/core/pipeline/prepare.js +3 -16
- package/lib/commonjs/src/core/pipeline/prepareIcon.d.ts +1 -0
- package/lib/commonjs/src/core/pipeline/prepareIcon.js +1 -1
- package/lib/commonjs/src/core/pipeline/preparedSvgCache.js +1 -1
- package/lib/commonjs/src/core/pipeline/runFontPipeline.js +20 -12
- package/lib/commonjs/src/core/symbols/knockout.js +4 -3
- package/lib/commonjs/src/utils/fingerPrint.d.ts +1 -0
- package/lib/commonjs/src/utils/fingerPrint.js +3 -1
- package/lib/commonjs/src/utils/fontIdentity.d.ts +1 -1
- package/lib/commonjs/src/utils/fontIdentity.js +2 -2
- package/lib/module/createNanoIconsSet.js +0 -1
- package/lib/module/createNanoIconsSet.native.js +26 -21
- package/lib/module/createNanoIconsSet.shared.js +32 -18
- package/lib/module/createNanoIconsSet.web.js +103 -61
- package/lib/module/devServerFont.js +1 -1
- package/lib/module/devServerFont.web.js +3 -5
- package/lib/module/fontIntegrity.js +20 -38
- package/lib/module/fontIntegrity.web.js +48 -0
- package/lib/module/fontIntegrityStore.js +65 -0
- package/lib/module/index.js +1 -1
- package/lib/module/index.node.js +1 -1
- package/lib/module/index.web.js +4 -0
- package/lib/module/loadDynamicFont.js +3 -15
- package/lib/module/specs/NanoIconViewNativeComponent.ts +3 -2
- package/lib/module/utils/fingerPrint.js +3 -2
- package/lib/module/utils/fontIdentity.js +2 -2
- package/lib/module/utils/fontScale.js +23 -0
- package/lib/module/utils/glyphRuntime.js +13 -0
- package/lib/module/utils/iconAccessibility.js +26 -0
- package/lib/module/utils/iconPropsEqual.js +27 -0
- package/lib/module/utils/webCss.js +26 -0
- package/lib/module/utils/webStyle.js +86 -0
- package/lib/module/webFont.js +33 -0
- package/lib/typescript/src/const/codegenPrimitives.d.ts +1 -0
- package/lib/typescript/src/core/glyph/merge.d.ts +2 -1
- package/lib/typescript/src/core/glyph/parse.d.ts +1 -2
- package/lib/typescript/src/core/pathkit/winding.d.ts +7 -1
- package/lib/typescript/src/createNanoIconsSet.d.ts +0 -1
- package/lib/typescript/src/createNanoIconsSet.native.d.ts +0 -2
- package/lib/typescript/src/createNanoIconsSet.shared.d.ts +1 -3
- package/lib/typescript/src/createNanoIconsSet.web.d.ts +1 -2
- package/lib/typescript/src/fontIntegrity.d.ts +2 -14
- package/lib/typescript/src/fontIntegrity.web.d.ts +7 -0
- package/lib/typescript/src/fontIntegrityStore.d.ts +19 -0
- package/lib/typescript/src/index.d.ts +2 -1
- package/lib/typescript/src/index.web.d.ts +5 -0
- package/lib/typescript/src/loadDynamicFont.d.ts +0 -1
- package/lib/typescript/src/specs/NanoIconViewNativeComponent.d.ts +3 -2
- package/lib/typescript/src/specs/NativeNanoIconsFontLoader.d.ts +1 -0
- package/lib/typescript/src/types.d.ts +37 -9
- package/lib/typescript/src/utils/fingerPrint.d.ts +1 -0
- package/lib/typescript/src/utils/fontIdentity.d.ts +1 -1
- package/lib/typescript/src/utils/fontScale.d.ts +2 -0
- package/lib/typescript/src/utils/glyphRuntime.d.ts +8 -0
- package/lib/typescript/src/utils/iconAccessibility.d.ts +4 -0
- package/lib/typescript/src/utils/iconPropsEqual.d.ts +4 -0
- package/lib/typescript/src/utils/webCss.d.ts +9 -0
- package/lib/typescript/src/utils/webStyle.d.ts +3 -0
- package/lib/typescript/src/webFont.d.ts +6 -0
- package/package.json +19 -3
- package/src/const/codegenPrimitives.ts +3 -3
- package/src/specs/NanoIconViewNativeComponent.ts +3 -2
- package/src/specs/NativeNanoIconsFontLoader.ts +1 -0
- package/lib/commonjs/src/core/pathkit/evenodd.d.ts +0 -12
- package/lib/commonjs/src/core/pathkit/evenodd.js +0 -37
- package/lib/typescript/src/core/pathkit/evenodd.d.ts +0 -13
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.convertEvenoddToWinding = convertEvenoddToWinding;
|
|
4
|
-
const contours_1 = require("./contours");
|
|
5
|
-
/**
|
|
6
|
-
* Convert a path `d` string with evenodd fill semantics to an equivalent
|
|
7
|
-
* path that renders identically under nonzero winding.
|
|
8
|
-
*
|
|
9
|
-
* Steps:
|
|
10
|
-
* 1. Parse via PathKit, set fill type to EVENODD, simplify (resolve topology)
|
|
11
|
-
* 2. Split into contours, compute containment depths
|
|
12
|
-
* 3. Fix winding: even depth = CCW (outer), odd depth = CW (hole)
|
|
13
|
-
* 4. Reconstruct d string
|
|
14
|
-
*/
|
|
15
|
-
function convertEvenoddToWinding(PathKit, d) {
|
|
16
|
-
const V = (0, contours_1.verbMap)(PathKit);
|
|
17
|
-
// 1. Parse and simplify with EVENODD fill type
|
|
18
|
-
const p = PathKit.FromSVGString(d);
|
|
19
|
-
if (!p)
|
|
20
|
-
return d;
|
|
21
|
-
p.setFillType((0, contours_1.fillTypes)(PathKit).EVENODD);
|
|
22
|
-
p.simplify();
|
|
23
|
-
// Get the simplified SVG string and re-parse for command access
|
|
24
|
-
const simplified = p.toSVGString();
|
|
25
|
-
p.delete?.();
|
|
26
|
-
const p2 = PathKit.FromSVGString(simplified);
|
|
27
|
-
if (!p2)
|
|
28
|
-
return simplified;
|
|
29
|
-
const cmds = p2.toCmds();
|
|
30
|
-
p2.delete?.();
|
|
31
|
-
if (cmds.length === 0)
|
|
32
|
-
return simplified;
|
|
33
|
-
// 2.+3. Split into contours and fix winding via containment analysis
|
|
34
|
-
const allCmds = (0, contours_1.orientedContours)(cmds, V).flatMap((x) => x.cmds);
|
|
35
|
-
// 4. Reconstruct d string from fixed commands
|
|
36
|
-
return (0, contours_1.cmdsToPathData)(allCmds, V);
|
|
37
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { PathKitModule } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Convert a path `d` string with evenodd fill semantics to an equivalent
|
|
4
|
-
* path that renders identically under nonzero winding.
|
|
5
|
-
*
|
|
6
|
-
* Steps:
|
|
7
|
-
* 1. Parse via PathKit, set fill type to EVENODD, simplify (resolve topology)
|
|
8
|
-
* 2. Split into contours, compute containment depths
|
|
9
|
-
* 3. Fix winding: even depth = CCW (outer), odd depth = CW (hole)
|
|
10
|
-
* 4. Reconstruct d string
|
|
11
|
-
*/
|
|
12
|
-
export declare function convertEvenoddToWinding(PathKit: PathKitModule, d: string): string;
|
|
13
|
-
//# sourceMappingURL=evenodd.d.ts.map
|