All files / lib index-full.ts

100% Statements 74/74
100% Branches 0/0
100% Functions 0/0
100% Lines 74/74

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166      1x 1x 1x 1x           1x 1x 1x 1x           1x 1x 1x 1x                     1x 1x 1x 1x 1x                     1x 1x 1x 1x 1x 1x 1x 1x 1x                             1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x       1x 1x           1x 1x 1x 1x       1x 1x       1x 1x           1x 1x 1x 1x       1x 1x     1x     1x             1x 1x                 1x 1x 1x 1x   1x   1x 1x 1x 1x 1x 1x   1x 1x 1x   1x 1x 1x  
// /*#*/ include('init.js');
// Inline Straps.js core (the Base class) inside the paper scope first:
// /*#*/ include('../node_modules/straps/straps.js');
import { Base } from './straps';
import './item/ChangeFlag';
import './item/ItemSelection';
import './path/SegmentSelection';
 
// /*#*/ include('core/Base.js');
// /*#*/ include('core/Emitter.js');
// /*#*/ include('core/PaperScope.js');
// /*#*/ include('core/PaperScopeItem.js');
import './core/Base';
import './core/Emitter';
import { PaperScope } from './core/PaperScope';
import './core/PaperScopeItem';
 
// /*#*/ include('util/CollisionDetection.js');
// /*#*/ include('util/Formatter.js');
// /*#*/ include('util/Numerical.js');
// /*#*/ include('util/UID.js');
import './util/CollisionDetection';
import './util/Formatter';
import { Numerical } from './util/Numerical';
import './util/UID';
 
// Include Paper classes, which are later injected into PaperScope by setting
// them on the 'this' object, e.g.:
// var Point = Base.extend(...);
 
// /*#*/ include('basic/Point.js');
// /*#*/ include('basic/Size.js');
// /*#*/ include('basic/Rectangle.js');
// /*#*/ include('basic/Matrix.js');
// /*#*/ include('basic/Line.js');
import './basic/Point';
import './basic/Size';
import './basic/Rectangle';
import './basic/Matrix';
import './basic/Line';
 
// /*#*/ include('item/Project.js');
// /*#*/ include('item/Item.js');
// /*#*/ include('item/Group.js');
// /*#*/ include('item/Layer.js');
// /*#*/ include('item/Shape.js');
// /*#*/ include('item/Raster.js');
// /*#*/ include('item/SymbolItem.js');
// /*#*/ include('item/SymbolDefinition.js');
// /*#*/ include('item/HitResult.js');
import './item/Project';
import './item/Item';
import './item/Group';
import './item/Layer';
import './item/Shape';
import './item/Raster';
import { SymbolItem } from './item/SymbolItem';
import { SymbolDefinition } from './item/SymbolDefinition';
import './item/HitResult';
 
// /*#*/ include('path/Segment.js');
// /*#*/ include('path/SegmentPoint.js');
// /*#*/ include('path/Curve.js');
// /*#*/ include('path/CurveLocation.js');
// /*#*/ include('path/PathItem.js');
// /*#*/ include('path/Path.js');
// /*#*/ include('path/Path.Constructors.js');
// /*#*/ include('path/CompoundPath.js');
// /*#*/ if (__options.booleanOperations) {
// /*#*/     include('path/PathItem.Boolean.js');
// /*#*/ }
// /*#*/ include('path/PathFlattener.js');
// /*#*/ include('path/PathFitter.js');
import './path/Segment';
import './path/SegmentPoint';
import './path/Curve';
import './path/CurveLocation';
import './path/PathItem';
import './path/Path';
import './path/Path.Constructors';
import './path/CompoundPath';
import './path/PathItem.Boolean';
import './path/PathFlattener';
import './path/PathFitter';
 
// /*#*/ include('text/TextItem.js');
// /*#*/ include('text/PointText.js');
import './text/TextItem';
import './text/PointText';
 
// /*#*/ include('style/Color.js');
// /*#*/ include('style/Gradient.js');
// /*#*/ include('style/GradientStop.js');
// /*#*/ include('style/Style.js');
import './style/Color';
import './style/Gradient';
import './style/GradientStop';
import './style/Style';
 
// /*#*/ include('dom/DomElement.js');
// /*#*/ include('dom/DomEvent.js');
import { DomElement } from './dom/DomElement';
import { DomEvent } from './dom/DomEvent';
 
// /*#*/ include('view/View.js');
// /*#*/ include('view/CanvasView.js');
import './view/View';
import './view/CanvasView';
 
// /*#*/ include('event/Event.js');
// /*#*/ include('event/KeyEvent.js');
// /*#*/ include('event/Key.js');
// /*#*/ include('event/MouseEvent.js');
import { Key } from './event/Key'; // NOTE: Changed order
import './event/Event';
import './event/KeyEvent';
import './event/MouseEvent';
 
// /*#*/ include('tool/ToolEvent.js');
// /*#*/ include('tool/Tool.js');
import './tool/ToolEvent';
import './tool/Tool';
 
// /*#*/ include('anim/Tween.js');
import './anim/Tween';
 
// /*#*/ include('net/Http.js');
import './net/Http';
 
// /*#*/ include('canvas/CanvasProvider.js');
// /*#*/ include('canvas/BlendMode.js');
// /*#*/ if (__options.load) {
// /*#*/     include('canvas/ProxyContext.js');
// /*#*/ }
import './canvas/CanvasProvider';
import './canvas/BlendMode';
// import './canvas/ProxyContext'; // I do not know how to use this?
 
// /*#*/ if (__options.svg) {
// /*#*/     include('svg/SvgElement.js');
// /*#*/     include('svg/SvgStyles.js');
// /*#*/     include('svg/SvgExport.js');
// /*#*/     include('svg/SvgImport.js');
// /*#*/ }
import './svg/SvgElement';
import './svg/SvgStyles';
import './svg/SvgExport';
import './svg/SvgImport';
 
import './core/PaperScript';
 
export const paper = new (PaperScope.inject(Base.exports, {
  Base,
  Numerical,
  Key,
  DomEvent,
  DomElement,
  // Export jsdom document and window too, for Node.js
  document: globalThis.document,
  window: globalThis.window,
  globalThis,
  // TODO: Remove in 1.0.0? (deprecated January 2016):
  Symbol: SymbolDefinition,
  PlacedSymbol: SymbolItem,
}))();