fabricjs / fabric.js

Javascript Canvas Library, SVG-to-Canvas (& canvas-to-SVG) Parser
http://fabricjs.com
Other
28.02k stars 3.45k forks source link

chore(TS): svg reviver is optional #9935

Closed asturur closed 1 week ago

asturur commented 1 week ago

close #9929

codesandbox[bot] commented 1 week ago

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview
github-actions[bot] commented 1 week ago

Build Stats

file / KB (diff) bundled minified
fabric 913.552 (-0.018) 305.032 (0)
github-actions[bot] commented 1 week ago

Coverage after merging svg-reviver-typings into master will be

83.77%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
index.node.ts14.29%100%0%25%23, 26, 29, 41, 44, 47
src
   ClassRegistry.ts88.71%53.85%100%97.73%31, 52, 52
   Collection.ts71.39%31.15%45.16%83.91%130, 138, 153, 155–157, 159, 169–170, 180–181, 197, 215, 217, 219, 228, 243, 254, 263, 265, 270, 279, 281, 283, 286–287, 302, 304, 306, 309–310, 327–328, 328, 328–329, 333–334, 337–344, 346–348, 350, 75, 99
   CommonMethods.ts88.57%64.29%83.33%96%50, 52, 9
   Intersection.ts81.42%41.30%73.33%96.14%105, 132–133, 166, 184–190, 228, 228, 237, 239, 289–291, 297, 297, 78, 80
   Observable.ts71.20%45.45%31.25%85.48%136, 145, 148, 160, 162, 165, 167, 41, 43, 68–70, 72, 76, 78, 80, 82–85, 87–91
   Point.ts84.43%61.22%41.18%92.38%104, 117, 148, 157, 179, 197, 206, 216, 225, 236–239, 259, 284–285, 294–297, 317, 328, 341, 349, 359, 95
   Shadow.ts81.22%13.04%37.50%90.19%144, 144–145, 145–146, 148, 150–155, 164, 181, 181, 181, 181, 199, 199, 201–202, 202, 204, 211, 211, 228–235, 237, 237, 239–240
   cache.ts83.72%45.45%75%90.14%57, 59, 71–72, 74–77
   config.ts82.21%20%44.44%94.03%123, 131–132, 134–137, 139, 142–143, 147, 152, 152, 152, 152, 152, 152
   constants.ts100%100%100%100%
src/LayoutManager
   ActiveSelectionLayoutManager.ts86.67%76.92%28.57%100%
   LayoutManager.ts89%65.06%53.85%99.29%269, 333, 344
   constants.ts100%100%100%100%
   index.ts48.57%37.50%80%66.67%1, 1, 1–2, 2, 2–3, 3, 3–4, 4, 4–5, 5, 5, 5–6
   types.ts100%100%100%100%
src/LayoutManager/LayoutStrategies
   ClipPathLayout.ts69.23%33.33%100%78.95%39, 41–42, 42–44, 46–48, 57, 57–58, 58, 66–69
   FitContentLayout.ts100%100%100%100%
   FixedLayout.ts85.71%20%100%100%23, 23
   LayoutStrategy.ts84.30%48.15%71.43%96.55%46, 52, 54, 72, 72, 74, 88
   utils.ts62.90%7.14%100%78.72%28–32, 34–35, 39, 39–44, 47, 47, 47
src/Pattern
   Pattern.ts54.39%3.03%10%65.95%105–107, 113, 113–114, 117, 117–119, 119, 119–122, 130, 130–132, 132, 132, 132, 132, 132–138, 140–141, 143, 150, 150, 150, 150, 153–160, 160, 160–164, 174–175, 175, 175, 175–176, 176, 176–182, 182, 182, 182–183, 183, 183–188, 190–199, 204–205, 207–209, 211, 33, 37
src/brushes
   BaseBrush.ts78.67%8.33%14.29%88.55%110, 114, 114–115, 122, 122, 122, 122, 124–125, 130, 135, 143, 146, 155, 155, 155, 155, 155–160, 99
   CircleBrush.ts52.10%12.50%12.50%58.25%100–108, 108–118, 122, 130–139, 55, 67, 69, 76, 76, 78–79, 79, 83, 85–86, 92–98
   PatternBrush.ts97.06%87.50%100%100%21
   PencilBrush.ts91.06%82.35%100%93.81%122–123, 152, 152–154, 176, 176, 276, 280, 285–286, 68–69, 84–85
   SprayBrush.ts0%0%0%0%107, 107, 107, 107, 107–108, 110–111, 118–119, 121, 123–127, 136, 140–141, 141, 148, 148, 148–151, 153–156, 160–161, 163, 165–168, 17, 171, 178–179, 18, 181, 183–184, 186, 193–194, 196–197, 20, 200, 200, 207, 207, 21, 211, 22, 22, 22–24, 28, 32, 39, 46, 53, 60, 67, 84–86, 94–96, 98–99
src/canvas
   Canvas.ts72.70%29.88%78.57%84.75%1004, 1008, 1012–1013, 1018, 1022, 1031–1032, 1047, 1049, 1056, 1058, 1063–1068, 1105, 1126, 1128, 1130, 1137, 1140, 117, 1203–1207, 1249, 1252, 1260, 1285–1290, 1319–1320, 1337, 1382–1401, 1401–1404, 1406–1407, 1407–1412, 1414–1415, 1417, 1421, 1423–1424, 1426–1428, 1432, 1434–1438, 1441–1446, 1449–1451, 1454, 1456, 1468, 1470, 1477, 1479–1490, 1492–1495, 1495, 1497, 1501–1502, 1505–1506, 1509–1511, 1514, 183, 318, 323, 343, 354, 369, 388, 431, 443, 559–563, 566–567, 569, 579, 582–583, 585, 588–590, 602, 609–613, 615–620, 622–626, 659, 661, 668–672, 674–679, 681, 683–684, 686–689, 691–692, 703, 747, 783–786, 789, 791, 791, 794, 796, 798, 824, 830, 839–840, 844, 853, 870, 870, 886–887, 906, 932–933, 935–936, 938, 947–953, 956, 964–970, 972, 974, 995–996, 999
   CanvasOptions.ts100%100%100%100%
   SelectableCanvas.ts83%49.08%80%93.58%1012, 1021, 1089–1093, 1139–1140, 1142–1143, 1145, 1172, 1174–1175, 1175, 1177, 1213, 1216, 1218, 1220,