react-native-nano-icons 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.
Files changed (159) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +174 -0
  3. package/app.plugin.js +1 -0
  4. package/lib/commonjs/cli/build.d.ts +28 -0
  5. package/lib/commonjs/cli/build.js +83 -0
  6. package/lib/commonjs/cli/config.d.ts +9 -0
  7. package/lib/commonjs/cli/config.js +25 -0
  8. package/lib/commonjs/cli/index.d.ts +4 -0
  9. package/lib/commonjs/cli/index.js +13 -0
  10. package/lib/commonjs/cli/link.d.ts +11 -0
  11. package/lib/commonjs/cli/link.js +135 -0
  12. package/lib/commonjs/cli/logger.d.ts +27 -0
  13. package/lib/commonjs/cli/logger.js +83 -0
  14. package/lib/commonjs/index.node.js +8 -0
  15. package/lib/commonjs/plugin/src/buildFonts.d.ts +7 -0
  16. package/lib/commonjs/plugin/src/buildFonts.js +23 -0
  17. package/lib/commonjs/plugin/src/index.d.ts +5 -0
  18. package/lib/commonjs/plugin/src/index.js +43 -0
  19. package/lib/commonjs/plugin/src/types.d.ts +31 -0
  20. package/lib/commonjs/plugin/src/types.js +2 -0
  21. package/lib/commonjs/plugin/src/withNanoIconsFontLinking.d.ts +14 -0
  22. package/lib/commonjs/plugin/src/withNanoIconsFontLinking.js +92 -0
  23. package/lib/commonjs/scripts/cli.js +28 -0
  24. package/lib/commonjs/src/const/colors.d.ts +1 -0
  25. package/lib/commonjs/src/const/colors.js +153 -0
  26. package/lib/commonjs/src/core/font/compile.d.ts +9 -0
  27. package/lib/commonjs/src/core/font/compile.js +68 -0
  28. package/lib/commonjs/src/core/font/metrics.d.ts +1 -0
  29. package/lib/commonjs/src/core/font/metrics.js +33 -0
  30. package/lib/commonjs/src/core/pipeline/config.d.ts +14 -0
  31. package/lib/commonjs/src/core/pipeline/config.js +17 -0
  32. package/lib/commonjs/src/core/pipeline/index.d.ts +3 -0
  33. package/lib/commonjs/src/core/pipeline/index.js +7 -0
  34. package/lib/commonjs/src/core/pipeline/managers.d.ts +11 -0
  35. package/lib/commonjs/src/core/pipeline/managers.js +89 -0
  36. package/lib/commonjs/src/core/pipeline/run.d.ts +14 -0
  37. package/lib/commonjs/src/core/pipeline/run.js +99 -0
  38. package/lib/commonjs/src/core/svg/layers.d.ts +24 -0
  39. package/lib/commonjs/src/core/svg/layers.js +42 -0
  40. package/lib/commonjs/src/core/svg/svg_dom.d.ts +22 -0
  41. package/lib/commonjs/src/core/svg/svg_dom.js +84 -0
  42. package/lib/commonjs/src/core/svg/svg_pathops.d.ts +21 -0
  43. package/lib/commonjs/src/core/svg/svg_pathops.js +611 -0
  44. package/lib/commonjs/src/core/types.d.ts +120 -0
  45. package/lib/commonjs/src/core/types.js +2 -0
  46. package/lib/commonjs/src/utils/fingerPrint.d.ts +1 -0
  47. package/lib/commonjs/src/utils/fingerPrint.js +20 -0
  48. package/lib/commonjs/src/utils/parse.d.ts +2 -0
  49. package/lib/commonjs/src/utils/parse.js +64 -0
  50. package/lib/module/const/colors.js +153 -0
  51. package/lib/module/const/colors.js.map +1 -0
  52. package/lib/module/core/font/compile.js +70 -0
  53. package/lib/module/core/font/compile.js.map +1 -0
  54. package/lib/module/core/font/metrics.js +37 -0
  55. package/lib/module/core/font/metrics.js.map +1 -0
  56. package/lib/module/core/pipeline/config.js +20 -0
  57. package/lib/module/core/pipeline/config.js.map +1 -0
  58. package/lib/module/core/pipeline/index.js +5 -0
  59. package/lib/module/core/pipeline/index.js.map +1 -0
  60. package/lib/module/core/pipeline/managers.js +80 -0
  61. package/lib/module/core/pipeline/managers.js.map +1 -0
  62. package/lib/module/core/pipeline/run.js +114 -0
  63. package/lib/module/core/pipeline/run.js.map +1 -0
  64. package/lib/module/core/shims/pathops.py +181 -0
  65. package/lib/module/core/svg/layers.js +51 -0
  66. package/lib/module/core/svg/layers.js.map +1 -0
  67. package/lib/module/core/svg/svg_dom.js +83 -0
  68. package/lib/module/core/svg/svg_dom.js.map +1 -0
  69. package/lib/module/core/svg/svg_pathops.js +566 -0
  70. package/lib/module/core/svg/svg_pathops.js.map +1 -0
  71. package/lib/module/core/tsconfig.json +32 -0
  72. package/lib/module/core/types.js +2 -0
  73. package/lib/module/core/types.js.map +1 -0
  74. package/lib/module/createNanoIconsSet.js +84 -0
  75. package/lib/module/createNanoIconsSet.js.map +1 -0
  76. package/lib/module/index.js +5 -0
  77. package/lib/module/index.js.map +1 -0
  78. package/lib/module/index.node.js +13 -0
  79. package/lib/module/index.node.js.map +1 -0
  80. package/lib/module/package.json +1 -0
  81. package/lib/module/utils/fingerPrint.js +17 -0
  82. package/lib/module/utils/fingerPrint.js.map +1 -0
  83. package/lib/module/utils/parse.js +53 -0
  84. package/lib/module/utils/parse.js.map +1 -0
  85. package/lib/typescript/__tests__/build.unit.test.d.ts +3 -0
  86. package/lib/typescript/__tests__/build.unit.test.d.ts.map +1 -0
  87. package/lib/typescript/__tests__/clippath.e2e.test.d.ts +3 -0
  88. package/lib/typescript/__tests__/clippath.e2e.test.d.ts.map +1 -0
  89. package/lib/typescript/__tests__/fingerprint.unit.test.d.ts +3 -0
  90. package/lib/typescript/__tests__/fingerprint.unit.test.d.ts.map +1 -0
  91. package/lib/typescript/__tests__/pipeline.e2e.test.d.ts +3 -0
  92. package/lib/typescript/__tests__/pipeline.e2e.test.d.ts.map +1 -0
  93. package/lib/typescript/__tests__/placement.unit.test.d.ts +3 -0
  94. package/lib/typescript/__tests__/placement.unit.test.d.ts.map +1 -0
  95. package/lib/typescript/__tests__/svg_dom.unit.test.d.ts +3 -0
  96. package/lib/typescript/__tests__/svg_dom.unit.test.d.ts.map +1 -0
  97. package/lib/typescript/cli/build.d.ts +29 -0
  98. package/lib/typescript/cli/build.d.ts.map +1 -0
  99. package/lib/typescript/cli/logger.d.ts +28 -0
  100. package/lib/typescript/cli/logger.d.ts.map +1 -0
  101. package/lib/typescript/package.json +1 -0
  102. package/lib/typescript/src/const/colors.d.ts +2 -0
  103. package/lib/typescript/src/const/colors.d.ts.map +1 -0
  104. package/lib/typescript/src/core/font/compile.d.ts +10 -0
  105. package/lib/typescript/src/core/font/compile.d.ts.map +1 -0
  106. package/lib/typescript/src/core/font/metrics.d.ts +2 -0
  107. package/lib/typescript/src/core/font/metrics.d.ts.map +1 -0
  108. package/lib/typescript/src/core/pipeline/config.d.ts +15 -0
  109. package/lib/typescript/src/core/pipeline/config.d.ts.map +1 -0
  110. package/lib/typescript/src/core/pipeline/index.d.ts +4 -0
  111. package/lib/typescript/src/core/pipeline/index.d.ts.map +1 -0
  112. package/lib/typescript/src/core/pipeline/managers.d.ts +12 -0
  113. package/lib/typescript/src/core/pipeline/managers.d.ts.map +1 -0
  114. package/lib/typescript/src/core/pipeline/run.d.ts +15 -0
  115. package/lib/typescript/src/core/pipeline/run.d.ts.map +1 -0
  116. package/lib/typescript/src/core/svg/layers.d.ts +25 -0
  117. package/lib/typescript/src/core/svg/layers.d.ts.map +1 -0
  118. package/lib/typescript/src/core/svg/svg_dom.d.ts +23 -0
  119. package/lib/typescript/src/core/svg/svg_dom.d.ts.map +1 -0
  120. package/lib/typescript/src/core/svg/svg_pathops.d.ts +22 -0
  121. package/lib/typescript/src/core/svg/svg_pathops.d.ts.map +1 -0
  122. package/lib/typescript/src/core/types.d.ts +121 -0
  123. package/lib/typescript/src/core/types.d.ts.map +1 -0
  124. package/lib/typescript/src/createNanoIconsSet.d.ts +19 -0
  125. package/lib/typescript/src/createNanoIconsSet.d.ts.map +1 -0
  126. package/lib/typescript/src/index.d.ts +3 -0
  127. package/lib/typescript/src/index.d.ts.map +1 -0
  128. package/lib/typescript/src/index.node.d.ts +2 -0
  129. package/lib/typescript/src/index.node.d.ts.map +1 -0
  130. package/lib/typescript/src/utils/fingerPrint.d.ts +2 -0
  131. package/lib/typescript/src/utils/fingerPrint.d.ts.map +1 -0
  132. package/lib/typescript/src/utils/parse.d.ts +3 -0
  133. package/lib/typescript/src/utils/parse.d.ts.map +1 -0
  134. package/package.json +160 -1
  135. package/plugin/src/buildFonts.ts +29 -0
  136. package/plugin/src/index.ts +68 -0
  137. package/plugin/src/types.ts +33 -0
  138. package/plugin/src/withNanoIconsFontLinking.ts +119 -0
  139. package/plugin/tsconfig.json +9 -0
  140. package/scripts/cli.ts +34 -0
  141. package/scripts/tsconfig.json +25 -0
  142. package/src/const/colors.ts +150 -0
  143. package/src/core/font/compile.ts +96 -0
  144. package/src/core/font/metrics.ts +44 -0
  145. package/src/core/pipeline/config.ts +24 -0
  146. package/src/core/pipeline/index.ts +3 -0
  147. package/src/core/pipeline/managers.ts +114 -0
  148. package/src/core/pipeline/run.ts +151 -0
  149. package/src/core/shims/pathops.py +181 -0
  150. package/src/core/svg/layers.ts +66 -0
  151. package/src/core/svg/svg_dom.ts +99 -0
  152. package/src/core/svg/svg_pathops.ts +796 -0
  153. package/src/core/tsconfig.json +32 -0
  154. package/src/core/types.ts +138 -0
  155. package/src/createNanoIconsSet.tsx +131 -0
  156. package/src/index.node.ts +14 -0
  157. package/src/index.ts +7 -0
  158. package/src/utils/fingerPrint.ts +20 -0
  159. package/src/utils/parse.ts +67 -0
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.runPipeline = runPipeline;
7
+ const node_fs_1 = __importDefault(require("node:fs"));
8
+ const promises_1 = __importDefault(require("node:fs/promises"));
9
+ const node_path_1 = __importDefault(require("node:path"));
10
+ const compile_js_1 = require("../font/compile.js");
11
+ const managers_js_1 = require("./managers.js");
12
+ const config_js_1 = require("./config.js");
13
+ const svg_dom_js_1 = require("../svg/svg_dom.js");
14
+ const layers_js_1 = require("../svg/layers.js");
15
+ /**
16
+ * Run the font pipeline with given config and paths.
17
+ * Uses the singleton Pyodide/PathKit instance (initialized on first call).
18
+ */
19
+ async function runPipeline(config, paths, options) {
20
+ const startTime = Date.now();
21
+ const logger = options?.logger;
22
+ logger?.update(`Building "${config.fontFamily}"…`);
23
+ (0, config_js_1.ensureEmptyDir)(paths.tempDir);
24
+ (0, config_js_1.ensureDir)(paths.outputDir);
25
+ const files = (await promises_1.default.readdir(paths.inputDir)).filter((f) => f.toLowerCase().endsWith('.svg'));
26
+ const glyphMap = {
27
+ meta: {
28
+ fontFamily: config.fontFamily,
29
+ upm: config.upm,
30
+ safeZone: config.safeZone,
31
+ startUnicode: config.startUnicode,
32
+ },
33
+ icons: {},
34
+ };
35
+ let currentUnicode = config.startUnicode;
36
+ for (const file of files) {
37
+ const iconName = node_path_1.default.parse(file).name;
38
+ const filePath = node_path_1.default.join(paths.inputDir, file);
39
+ logger?.info(`Processing ${file}`);
40
+ const rawContent = await promises_1.default.readFile(filePath, 'utf-8');
41
+ const validation = (0, svg_dom_js_1.validateSvg)(rawContent);
42
+ if (validation.valid === false) {
43
+ logger?.warn(`Skipping "${config.fontFamily}:${file}": ${validation.reason}`);
44
+ continue;
45
+ }
46
+ const preprocessed = (0, svg_dom_js_1.preprocessSvg)(rawContent);
47
+ const flattenedSvg = await (0, managers_js_1.picoFromFile)(filePath, preprocessed);
48
+ const parsed = (0, svg_dom_js_1.parseFlattenedSvg)(flattenedSvg);
49
+ const { vx, vy, scale, xOff, yOff, adv } = (0, layers_js_1.computePlacement)({
50
+ upm: config.upm,
51
+ safeZone: config.safeZone,
52
+ viewBox: parsed.viewBox,
53
+ });
54
+ const entry = { adv, layers: [] };
55
+ for (const p of parsed.paths) {
56
+ if ((0, svg_dom_js_1.shouldSkipPath)(p.d, p.fill))
57
+ continue;
58
+ const cp = currentUnicode++;
59
+ await (0, layers_js_1.writeLayerSvg)({
60
+ tempDir: paths.tempDir,
61
+ upm: config.upm,
62
+ adv,
63
+ vx,
64
+ vy,
65
+ scale,
66
+ xOff,
67
+ yOff,
68
+ d: p.d,
69
+ codepoint: cp,
70
+ });
71
+ entry.layers.push({ codepoint: cp, color: p.fill || 'black' });
72
+ }
73
+ if (entry.layers.length > 0) {
74
+ glyphMap.icons[iconName] = entry;
75
+ }
76
+ }
77
+ const glyphmapPath = node_path_1.default.join(paths.outputDir, `${config.fontFamily}.glyphmap.json`);
78
+ if (options?.inputHash) {
79
+ glyphMap.meta.hash = options.inputHash;
80
+ }
81
+ await promises_1.default.writeFile(glyphmapPath, JSON.stringify(glyphMap, null, 2), 'utf8');
82
+ logger?.info(`Compiling TTF…`);
83
+ const ttfPath = node_path_1.default.join(paths.outputDir, `${config.fontFamily}.ttf`);
84
+ await (0, compile_js_1.compileTtfFromGlyphSVGs)({
85
+ glyphDir: paths.tempDir,
86
+ outTtfPath: ttfPath,
87
+ fontName: config.fontFamily,
88
+ upm: config.upm,
89
+ ascent: config.upm,
90
+ descent: 0,
91
+ });
92
+ if (node_fs_1.default.existsSync(paths.tempDir)) {
93
+ node_fs_1.default.rmSync(paths.tempDir, { recursive: true, force: true });
94
+ }
95
+ const iconCount = Object.keys(glyphMap.icons).length;
96
+ const elapsed = Date.now() - startTime;
97
+ logger?.succeed(`Built ${config.fontFamily}.ttf [${iconCount} icon${iconCount === 1 ? '' : 's'} in ${elapsed}ms]`);
98
+ return { ttfPath, glyphmapPath };
99
+ }
@@ -0,0 +1,24 @@
1
+ export declare function computePlacement(opts: {
2
+ upm: number;
3
+ safeZone: number;
4
+ viewBox: [number, number, number, number];
5
+ }): {
6
+ vx: number;
7
+ vy: number;
8
+ scale: number;
9
+ xOff: number;
10
+ yOff: number;
11
+ adv: number;
12
+ };
13
+ export declare function writeLayerSvg(opts: {
14
+ tempDir: string;
15
+ upm: number;
16
+ adv: number;
17
+ vx: number;
18
+ vy: number;
19
+ scale: number;
20
+ xOff: number;
21
+ yOff: number;
22
+ d: string;
23
+ codepoint: number;
24
+ }): Promise<void>;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.computePlacement = computePlacement;
7
+ exports.writeLayerSvg = writeLayerSvg;
8
+ const promises_1 = __importDefault(require("node:fs/promises"));
9
+ const node_path_1 = __importDefault(require("node:path"));
10
+ function roundInt(n) {
11
+ return Math.round(n);
12
+ }
13
+ function computePlacement(opts) {
14
+ const [vx, vy, vw, vh] = opts.viewBox;
15
+ // Guard against invalid viewBox height from source svg
16
+ const safeVh = vh === 0 ? 1 : vh;
17
+ // ✅ Fit-to-height (same visual height for all glyphs)
18
+ const scale = opts.safeZone / safeVh;
19
+ const totalPadding = (opts.upm - opts.safeZone) / 2;
20
+ // Scaled dimensions in font units
21
+ const scaledW = vw * scale;
22
+ const scaledH = vh * scale; // ~= safeZone
23
+ // ✅ proportional advance width (includes same padding concept as vertical)
24
+ // This is the width of the glyph coordinate space we will emit in the layer SVG.
25
+ const adv = Math.max(1, roundInt(scaledW + totalPadding * 2));
26
+ // Center scaled content within (adv x upm)
27
+ // (when adv == scaledW + 2*padding, xOff is basically padding, with rounding compensation)
28
+ const xOff = (adv - scaledW) / 2;
29
+ const yOff = (opts.upm - scaledH) / 2; // ~= totalPadding
30
+ return { vx, vy, scale, xOff, yOff, adv };
31
+ }
32
+ async function writeLayerSvg(opts) {
33
+ const hex = opts.codepoint.toString(16).padStart(4, '0');
34
+ const layerSvg = `
35
+ <svg viewBox="0 0 ${opts.adv} ${opts.upm}" xmlns="http://www.w3.org/2000/svg">
36
+ <rect width="${opts.adv}" height="${opts.upm}" fill="none" />
37
+ <g transform="translate(${opts.xOff}, ${opts.yOff}) scale(${opts.scale}) translate(${-opts.vx}, ${-opts.vy})">
38
+ <path d="${opts.d}" fill="black" />
39
+ </g>
40
+ </svg>`.trim();
41
+ await promises_1.default.writeFile(node_path_1.default.join(opts.tempDir, `u${hex}.svg`), layerSvg, 'utf8');
42
+ }
@@ -0,0 +1,22 @@
1
+ export type ParsedFlatSvg = {
2
+ viewBox: [number, number, number, number];
3
+ paths: Array<{
4
+ d: string;
5
+ fill: string | null;
6
+ }>;
7
+ };
8
+ export declare function calculateOpColor(fill: string | null, opacity: number, el: Element): `rgba(${number},${number},${number},${number})`;
9
+ export declare const parsePath: (p: Element) => {
10
+ d: string;
11
+ fill: string | null;
12
+ };
13
+ export declare function parseFlattenedSvg(flattenedSvg: string): ParsedFlatSvg;
14
+ export declare function shouldSkipPath(d: string, fill: string | null): boolean;
15
+ export type SvgValidation = {
16
+ valid: true;
17
+ } | {
18
+ valid: false;
19
+ reason: string;
20
+ };
21
+ export declare function validateSvg(content: string): SvgValidation;
22
+ export declare function preprocessSvg(content: string): string;
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parsePath = void 0;
4
+ exports.calculateOpColor = calculateOpColor;
5
+ exports.parseFlattenedSvg = parseFlattenedSvg;
6
+ exports.shouldSkipPath = shouldSkipPath;
7
+ exports.validateSvg = validateSvg;
8
+ exports.preprocessSvg = preprocessSvg;
9
+ const jsdom_1 = require("jsdom");
10
+ const parse_1 = require("../../utils/parse");
11
+ // if the fill is implicit, walk ancestors for the first explicit fill value
12
+ function resolveInheritedFill(el) {
13
+ let current = el.parentElement;
14
+ while (current !== null) {
15
+ const fill = current.getAttribute('fill');
16
+ if (fill !== null && fill !== 'inherit')
17
+ return fill;
18
+ current = current.parentElement;
19
+ }
20
+ return 'black';
21
+ }
22
+ // bake opacity into the fill as an rgba(...)
23
+ function calculateOpColor(fill, opacity, el) {
24
+ const resolvedFill = fill ?? resolveInheritedFill(el);
25
+ const [r, g, b, a] = (0, parse_1.parseColor)(resolvedFill);
26
+ const finalAlpha = +(a * opacity).toFixed(4);
27
+ return `rgba(${r},${g},${b},${finalAlpha})`;
28
+ }
29
+ const parsePath = (p) => {
30
+ const d = p.getAttribute('d') ?? '';
31
+ const op = p.getAttribute('opacity');
32
+ const fillOp = p.getAttribute('fill-opacity');
33
+ const fill = p.getAttribute('fill');
34
+ if (op !== null || fillOp !== null) {
35
+ const opVal = op !== null ? parseFloat(op) : 1;
36
+ const fillOpVal = fillOp !== null ? parseFloat(fillOp) : 1;
37
+ const combinedOpacity = opVal * fillOpVal;
38
+ return {
39
+ d,
40
+ fill: calculateOpColor(fill, combinedOpacity, p),
41
+ };
42
+ }
43
+ return {
44
+ d,
45
+ fill,
46
+ };
47
+ };
48
+ exports.parsePath = parsePath;
49
+ function parseFlattenedSvg(flattenedSvg) {
50
+ const dom = new jsdom_1.JSDOM(flattenedSvg);
51
+ const doc = dom.window.document;
52
+ const svgEl = doc.querySelector('svg');
53
+ const viewBoxRaw = svgEl
54
+ ?.getAttribute('viewBox')
55
+ ?.split(/\s+/)
56
+ .map(Number) ?? [0, 0, 100, 100];
57
+ const viewBox = viewBoxRaw.length === 4 && viewBoxRaw.every((n) => Number.isFinite(n))
58
+ ? [viewBoxRaw[0], viewBoxRaw[1], viewBoxRaw[2], viewBoxRaw[3]]
59
+ : [0, 0, 100, 100];
60
+ const pathEls = Array.from(doc.querySelectorAll('path'));
61
+ const paths = pathEls.map(exports.parsePath).filter((p) => p.d.trim() !== '');
62
+ return { viewBox, paths };
63
+ }
64
+ function shouldSkipPath(d, fill) {
65
+ if (!d || d.trim() === '')
66
+ return true;
67
+ const f = (fill ?? '').trim().toLowerCase();
68
+ return f === 'transparent' || f === 'none';
69
+ }
70
+ function validateSvg(content) {
71
+ if (/<mask[\s>]/i.test(content)) {
72
+ return { valid: false, reason: '<mask> is not supported yet' };
73
+ }
74
+ if (/<filter[\s>]/i.test(content)) {
75
+ return { valid: false, reason: '<filter> is not supported yet' };
76
+ }
77
+ return { valid: true };
78
+ }
79
+ // ensure the svg has a xmlns attribute
80
+ function preprocessSvg(content) {
81
+ if (/xmlns\s*=/.test(content))
82
+ return content;
83
+ return content.replace(/<svg\b/, '<svg xmlns="http://www.w3.org/2000/svg"');
84
+ }
@@ -0,0 +1,21 @@
1
+ import type { PathKitModule, WrappedPath, Point } from '../types.js';
2
+ export declare function buildPathopsBackend(PathKit: PathKitModule): {
3
+ create_path(fillTypeInt: number): WrappedPath;
4
+ clone_path(h: WrappedPath): WrappedPath;
5
+ delete_path(h: WrappedPath): void;
6
+ get_fill_type(h: WrappedPath): number;
7
+ set_fill_type(h: WrappedPath, fillTypeInt: number): true;
8
+ move_to(h: WrappedPath, x: number, y: number): void;
9
+ line_to(h: WrappedPath, x: number, y: number): void;
10
+ quad_to(h: WrappedPath, x1: number, y1: number, x2: number, y2: number): void;
11
+ cubic_to(h: WrappedPath, x1: number, y1: number, x2: number, y2: number, x3: number, y3: number): void;
12
+ close(h: WrappedPath): void;
13
+ simplify(h: WrappedPath, fixWinding?: boolean): boolean;
14
+ stroke(h: WrappedPath, width: number, capInt: number, joinInt: number, miterLimit: number, dashArray: unknown, dashOffset: number): WrappedPath;
15
+ convert_conics_to_quads(_h: WrappedPath, _tol: number): void;
16
+ transform(h: WrappedPath, a: number, b: number, c: number, d: number, e: number, f: number): WrappedPath;
17
+ op(aHandle: WrappedPath, bHandle: WrappedPath, opInt: number): WrappedPath | null;
18
+ bounds(h: WrappedPath): [number, number, number, number];
19
+ area(h: WrappedPath): number;
20
+ iter_segments(h: WrappedPath): Array<[number, Point[]]>;
21
+ };