paperjs-offset 1.0.8 → 2.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.
- package/LICENSE +2 -2
- package/README.md +673 -46
- package/dist/index.cjs +815 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.mjs +806 -0
- package/dist/index.mjs.map +1 -0
- package/dist/index.umd.js +819 -405
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -0
- package/dist/types/index.d.ts +22 -15
- package/dist/types/offset_core.d.ts +20 -5
- package/package.json +56 -25
- package/build.js +0 -57
- package/demo/debug.html +0 -12
- package/demo/debug.js +0 -26
- package/demo/demo.css +0 -16
- package/demo/demo.js +0 -125
- package/demo/index.html +0 -12
- package/demo/paperjs-offset.js +0 -410
- package/demo/paperjs-offset.min.js +0 -1
- package/dist/index.es5.js +0 -403
- package/dist/index.es5.js.map +0 -1
- package/dist/lib/bundle.js +0 -10
- package/dist/lib/bundle.js.map +0 -1
- package/dist/lib/index.js +0 -51
- package/dist/lib/index.js.map +0 -1
- package/dist/lib/offset_core.js +0 -359
- package/dist/lib/offset_core.js.map +0 -1
- package/dist/paperjs-offset.js +0 -410
- package/dist/paperjs-offset.min.js +0 -1
- package/dist/types/bundle.d.ts +0 -9
- package/public/preview.jpg +0 -0
- package/src/bundle.ts +0 -18
- package/src/index.ts +0 -56
- package/src/offset_core.ts +0 -369
- package/tsconfig.json +0 -20
- package/tslint.json +0 -17
package/src/offset_core.ts
DELETED
|
@@ -1,369 +0,0 @@
|
|
|
1
|
-
import paper from 'paper';
|
|
2
|
-
|
|
3
|
-
export type StrokeJoinType = 'miter' | 'bevel' | 'round';
|
|
4
|
-
export type StrokeCapType = 'round' | 'butt';
|
|
5
|
-
export type PathType = paper.Path | paper.CompoundPath;
|
|
6
|
-
|
|
7
|
-
type HandleType = 'handleIn' | 'handleOut';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Offset the start/terminal segment of a bezier curve
|
|
11
|
-
* @param segment segment to offset
|
|
12
|
-
* @param curve curve to offset
|
|
13
|
-
* @param handleNormal the normal of the the line formed of two handles
|
|
14
|
-
* @param offset offset value
|
|
15
|
-
*/
|
|
16
|
-
function offsetSegment(segment: paper.Segment, curve: paper.Curve, handleNormal: paper.Point, offset: number) {
|
|
17
|
-
const isFirst = segment.curve === curve;
|
|
18
|
-
// get offset vector
|
|
19
|
-
const offsetVector = (curve.getNormalAtTime(isFirst ? 0 : 1)).multiply(offset);
|
|
20
|
-
// get offset point
|
|
21
|
-
const point = segment.point.add(offsetVector);
|
|
22
|
-
const newSegment = new paper.Segment(point);
|
|
23
|
-
// handleOut for start segment & handleIn for terminal segment
|
|
24
|
-
const handle = (isFirst ? 'handleOut' : 'handleIn') as HandleType;
|
|
25
|
-
newSegment[handle] = segment[handle]!.add(handleNormal.subtract(offsetVector).divide(2));
|
|
26
|
-
return newSegment;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Adaptive offset a curve by repeatly apply the approximation proposed by Tiller and Hanson.
|
|
31
|
-
* @param curve curve to offset
|
|
32
|
-
* @param offset offset value
|
|
33
|
-
*/
|
|
34
|
-
function adaptiveOffsetCurve(curve: paper.Curve, offset: number): paper.Segment[] {
|
|
35
|
-
const hNormal = (new paper.Curve(curve.segment1.handleOut!.add(curve.segment1.point), new paper.Point(0, 0),
|
|
36
|
-
new paper.Point(0, 0), curve.segment2.handleIn!.add(curve.segment2.point))).getNormalAtTime(0.5).multiply(offset);
|
|
37
|
-
const segment1 = offsetSegment(curve.segment1, curve, hNormal, offset);
|
|
38
|
-
const segment2 = offsetSegment(curve.segment2, curve, hNormal, offset);
|
|
39
|
-
// divide && re-offset
|
|
40
|
-
const offsetCurve = new paper.Curve(segment1, segment2);
|
|
41
|
-
// if the offset curve is not self intersected, divide it
|
|
42
|
-
if (offsetCurve.getIntersections(offsetCurve).length === 0) {
|
|
43
|
-
const threshold = Math.min(Math.abs(offset) / 10, 1);
|
|
44
|
-
const midOffset = offsetCurve.getPointAtTime(0.5).getDistance(curve.getPointAtTime(0.5));
|
|
45
|
-
if (Math.abs(midOffset - Math.abs(offset)) > threshold) {
|
|
46
|
-
const subCurve = curve.divideAtTime(0.5);
|
|
47
|
-
if (subCurve != null) {
|
|
48
|
-
return [...adaptiveOffsetCurve(curve, offset), ...adaptiveOffsetCurve(subCurve, offset)];
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return [segment1, segment2];
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Create a round join segment between two adjacent segments.
|
|
57
|
-
*/
|
|
58
|
-
function makeRoundJoin(segment1: paper.Segment, segment2: paper.Segment, originPoint: paper.Point, radius: number) {
|
|
59
|
-
const through = segment1.point.subtract(originPoint).add(segment2.point.subtract(originPoint))
|
|
60
|
-
.normalize(Math.abs(radius)).add(originPoint);
|
|
61
|
-
const arc = new paper.Path.Arc({ from: segment1.point, to: segment2.point, through, insert: false });
|
|
62
|
-
segment1.handleOut = arc.firstSegment.handleOut;
|
|
63
|
-
segment2.handleIn = arc.lastSegment.handleIn;
|
|
64
|
-
return arc.segments.length === 3 ? arc.segments[1] : null;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function det(p1: paper.Point, p2: paper.Point) {
|
|
68
|
-
return p1.x * p2.y - p1.y * p2.x;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Get the intersection point of point based lines
|
|
73
|
-
*/
|
|
74
|
-
function getPointLineIntersections(p1: paper.Point, p2: paper.Point, p3: paper.Point, p4: paper.Point) {
|
|
75
|
-
const l1 = p1.subtract(p2);
|
|
76
|
-
const l2 = p3.subtract(p4);
|
|
77
|
-
const dl1 = det(p1, p2);
|
|
78
|
-
const dl2 = det(p3, p4);
|
|
79
|
-
return new paper.Point(dl1 * l2.x - l1.x * dl2, dl1 * l2.y - l1.y * dl2).divide(det(l1, l2));
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Connect two adjacent bezier curve, each curve is represented by two segments,
|
|
84
|
-
* create different types of joins or simply removal redundant segment.
|
|
85
|
-
*/
|
|
86
|
-
function connectAdjacentBezier(segments1: paper.Segment[], segments2: paper.Segment[], origin: paper.Segment, joinType: StrokeJoinType, offset: number, limit: number) {
|
|
87
|
-
const curve1 = new paper.Curve(segments1[0], segments1[1]);
|
|
88
|
-
const curve2 = new paper.Curve(segments2[0], segments2[1]);
|
|
89
|
-
const intersection = curve1.getIntersections(curve2);
|
|
90
|
-
const distance = segments1[1].point.getDistance(segments2[0].point);
|
|
91
|
-
if (origin.isSmooth()) {
|
|
92
|
-
segments2[0].handleOut = segments2[0].handleOut!.project(origin.handleOut!);
|
|
93
|
-
segments2[0].handleIn = segments1[1].handleIn!.project(origin.handleIn!);
|
|
94
|
-
segments2[0].point = segments1[1].point.add(segments2[0].point).divide(2);
|
|
95
|
-
segments1.pop();
|
|
96
|
-
} else {
|
|
97
|
-
if (intersection.length === 0) {
|
|
98
|
-
if (distance > Math.abs(offset) * 0.1) {
|
|
99
|
-
// connect
|
|
100
|
-
switch (joinType) {
|
|
101
|
-
case 'miter':
|
|
102
|
-
const join = getPointLineIntersections(curve1.point2, curve1.point2.add(curve1.getTangentAtTime(1)),
|
|
103
|
-
curve2.point1, curve2.point1.add(curve2.getTangentAtTime(0)));
|
|
104
|
-
// prevent sharp angle
|
|
105
|
-
const joinOffset = Math.max(join.getDistance(curve1.point2), join.getDistance(curve2.point1));
|
|
106
|
-
if (joinOffset < Math.abs(offset) * limit) {
|
|
107
|
-
segments1.push(new paper.Segment(join));
|
|
108
|
-
}
|
|
109
|
-
break;
|
|
110
|
-
case 'round':
|
|
111
|
-
const mid = makeRoundJoin(segments1[1], segments2[0], origin.point, offset);
|
|
112
|
-
if (mid) {
|
|
113
|
-
segments1.push(mid);
|
|
114
|
-
}
|
|
115
|
-
break;
|
|
116
|
-
default: break;
|
|
117
|
-
}
|
|
118
|
-
} else {
|
|
119
|
-
segments2[0].handleIn = segments1[1].handleIn;
|
|
120
|
-
segments1.pop();
|
|
121
|
-
}
|
|
122
|
-
} else {
|
|
123
|
-
const second1 = curve1.divideAt(intersection[0]);
|
|
124
|
-
if (second1) {
|
|
125
|
-
const join = second1.segment1;
|
|
126
|
-
const second2 = curve2.divideAt(curve2.getIntersections(curve1)[0]);
|
|
127
|
-
join.handleOut = second2 ? second2.segment1.handleOut : segments2[0].handleOut;
|
|
128
|
-
segments1.pop();
|
|
129
|
-
segments2[0] = join;
|
|
130
|
-
} else {
|
|
131
|
-
segments2[0].handleIn = segments1[1].handleIn;
|
|
132
|
-
segments1.pop();
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Connect all the segments together.
|
|
140
|
-
*/
|
|
141
|
-
function connectBeziers(rawSegments: paper.Segment[][], join: StrokeJoinType, source: paper.Path, offset: number, limit: number) {
|
|
142
|
-
const originSegments = source.segments;
|
|
143
|
-
const first = rawSegments[0].slice();
|
|
144
|
-
for (let i = 0; i < rawSegments.length - 1; ++i) {
|
|
145
|
-
connectAdjacentBezier(rawSegments[i], rawSegments[i + 1], originSegments[i + 1], join, offset, limit);
|
|
146
|
-
}
|
|
147
|
-
if (source.closed) {
|
|
148
|
-
connectAdjacentBezier(rawSegments[rawSegments.length - 1], first, originSegments[0], join, offset, limit);
|
|
149
|
-
rawSegments[0][0] = first[0];
|
|
150
|
-
}
|
|
151
|
-
return rawSegments;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
function reduceSingleChildCompoundPath(path: PathType) {
|
|
155
|
-
if (path.children.length === 1) {
|
|
156
|
-
path = path.children[0] as paper.Path;
|
|
157
|
-
path.remove(); // remove from parent, this is critical, or the style attributes will be ignored
|
|
158
|
-
}
|
|
159
|
-
return path;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/** Normalize a path, always clockwise, non-self-intersection, ignore really small components, and no one-component compound path. */
|
|
163
|
-
function normalize(path: PathType, areaThreshold = 0.01) {
|
|
164
|
-
if (path.closed) {
|
|
165
|
-
const ignoreArea = Math.abs(path.area * areaThreshold);
|
|
166
|
-
if (!path.clockwise) {
|
|
167
|
-
path.reverse();
|
|
168
|
-
}
|
|
169
|
-
path = path.unite(path, { insert: false }) as PathType;
|
|
170
|
-
if (path instanceof paper.CompoundPath) {
|
|
171
|
-
path.children.filter((c) => Math.abs((c as PathType).area) < ignoreArea).forEach((c) => c.remove());
|
|
172
|
-
if (path.children.length === 1) {
|
|
173
|
-
return reduceSingleChildCompoundPath(path);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
return path;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
function isSameDirection(partialPath: paper.Path, fullPath: PathType) {
|
|
181
|
-
const offset1 = partialPath.segments[0].location.offset;
|
|
182
|
-
const offset2 = partialPath.segments[Math.max(1, Math.floor(partialPath.segments.length / 2))].location.offset;
|
|
183
|
-
const sampleOffset = (offset1 + offset2) / 3;
|
|
184
|
-
const originOffset1 = fullPath.getNearestLocation(partialPath.getPointAt(sampleOffset)).offset;
|
|
185
|
-
const originOffset2 = fullPath.getNearestLocation(partialPath.getPointAt(2 * sampleOffset)).offset;
|
|
186
|
-
return originOffset1 < originOffset2;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/** Remove self intersection when offset is negative by point direction dectection. */
|
|
190
|
-
function removeIntersection(path: PathType) {
|
|
191
|
-
if (path.closed) {
|
|
192
|
-
const newPath = path.unite(path, { insert: false }) as PathType;
|
|
193
|
-
if (newPath instanceof paper.CompoundPath) {
|
|
194
|
-
(newPath.children as paper.Path[]).filter((c) => {
|
|
195
|
-
if (c.segments.length > 1) {
|
|
196
|
-
return !isSameDirection(c, path);
|
|
197
|
-
} else {
|
|
198
|
-
return true;
|
|
199
|
-
}
|
|
200
|
-
}).forEach((c) => c.remove());
|
|
201
|
-
return reduceSingleChildCompoundPath(newPath);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
return path;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
function getSegments(path: PathType) {
|
|
208
|
-
if (path instanceof paper.CompoundPath) {
|
|
209
|
-
return path.children.map((c) => (c as paper.Path).segments).flat();
|
|
210
|
-
} else {
|
|
211
|
-
return (path as paper.Path).segments;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* Remove impossible segments in negative offset condition.
|
|
217
|
-
*/
|
|
218
|
-
function removeOutsiders(newPath: PathType, path: PathType) {
|
|
219
|
-
const segments = getSegments(newPath).slice();
|
|
220
|
-
segments.forEach((segment) => {
|
|
221
|
-
if (!path.contains(segment.point)) {
|
|
222
|
-
segment.remove();
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
function preparePath(path: paper.Path, offset: number): [paper.Path, number] {
|
|
228
|
-
const source = path.clone({ insert: false }) as paper.Path;
|
|
229
|
-
source.reduce({});
|
|
230
|
-
if (!path.clockwise) {
|
|
231
|
-
source.reverse();
|
|
232
|
-
offset = -offset;
|
|
233
|
-
}
|
|
234
|
-
return [source, offset];
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
function offsetSimpleShape(path: paper.Path, offset: number, join: StrokeJoinType, limit: number): PathType {
|
|
238
|
-
let source: paper.Path;
|
|
239
|
-
[source, offset] = preparePath(path, offset);
|
|
240
|
-
const curves = source.curves.slice();
|
|
241
|
-
const offsetCurves = curves.map((curve) => adaptiveOffsetCurve(curve, offset)).flat();
|
|
242
|
-
const raws: paper.Segment[][] = [];
|
|
243
|
-
for (let i = 0; i < offsetCurves.length; i += 2) {
|
|
244
|
-
raws.push(offsetCurves.slice(i, i + 2));
|
|
245
|
-
}
|
|
246
|
-
const segments = connectBeziers(raws, join, source, offset, limit).flat();
|
|
247
|
-
const newPath = removeIntersection(new paper.Path({ segments, insert: false, closed: path.closed }));
|
|
248
|
-
newPath.reduce({});
|
|
249
|
-
if (source.closed && ((source.clockwise && offset < 0) || (!source.clockwise && offset > 0))) {
|
|
250
|
-
removeOutsiders(newPath, path);
|
|
251
|
-
}
|
|
252
|
-
// recovery path
|
|
253
|
-
if (source.clockwise !== path.clockwise) {
|
|
254
|
-
newPath.reverse();
|
|
255
|
-
}
|
|
256
|
-
return normalize(newPath);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
function makeRoundCap(from: paper.Segment, to: paper.Segment, offset: number) {
|
|
260
|
-
const origin = from.point.add(to.point).divide(2);
|
|
261
|
-
const normal = to.point.subtract(from.point).rotate(-90, new paper.Point(0, 0)).normalize(offset);
|
|
262
|
-
const through = origin.add(normal);
|
|
263
|
-
const arc = new paper.Path.Arc({ from: from.point, to: to.point, through, insert: false });
|
|
264
|
-
return arc.segments;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
function connectSide(outer: PathType, inner: paper.Path, offset: number, cap: StrokeCapType): paper.Path {
|
|
268
|
-
if (outer instanceof paper.CompoundPath) {
|
|
269
|
-
let cs = outer.children.map((c) => ({ c, a: Math.abs((c as paper.Path).area) }));
|
|
270
|
-
cs = cs.sort((c1, c2) => c2.a - c1.a);
|
|
271
|
-
outer = cs[0].c as paper.Path;
|
|
272
|
-
}
|
|
273
|
-
const oSegments = (outer as paper.Path).segments.slice();
|
|
274
|
-
const iSegments = inner.segments.slice();
|
|
275
|
-
switch (cap) {
|
|
276
|
-
case 'round':
|
|
277
|
-
const heads = makeRoundCap(iSegments[iSegments.length - 1], oSegments[0], offset);
|
|
278
|
-
const tails = makeRoundCap(oSegments[oSegments.length - 1], iSegments[0], offset);
|
|
279
|
-
const result = new paper.Path({ segments: [...heads, ...oSegments, ...tails, ...iSegments], closed: true, insert: false });
|
|
280
|
-
result.reduce({});
|
|
281
|
-
return result;
|
|
282
|
-
default: return new paper.Path({ segments: [...oSegments, ...iSegments], closed: true, insert: false });
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
function offsetSimpleStroke(path: paper.Path, offset: number, join: StrokeJoinType, cap: StrokeCapType, limit: number): PathType {
|
|
287
|
-
offset = path.clockwise ? offset : -offset;
|
|
288
|
-
const positiveOffset = offsetSimpleShape(path, offset, join, limit);
|
|
289
|
-
const negativeOffset = offsetSimpleShape(path, -offset, join, limit);
|
|
290
|
-
if (path.closed) {
|
|
291
|
-
return positiveOffset.subtract(negativeOffset, { insert: false }) as PathType;
|
|
292
|
-
} else {
|
|
293
|
-
let inner = negativeOffset;
|
|
294
|
-
let holes = new Array<paper.Path>();
|
|
295
|
-
if (negativeOffset instanceof paper.CompoundPath) {
|
|
296
|
-
holes = negativeOffset.children.filter((c) => (c as paper.Path).closed) as paper.Path[];
|
|
297
|
-
holes.forEach((h) => h.remove());
|
|
298
|
-
inner = negativeOffset.children[0] as paper.Path;
|
|
299
|
-
}
|
|
300
|
-
inner.reverse();
|
|
301
|
-
let final = connectSide(positiveOffset, inner as paper.Path, offset, cap) as PathType;
|
|
302
|
-
if (holes.length > 0) {
|
|
303
|
-
for (const hole of holes) {
|
|
304
|
-
final = final.subtract(hole, { insert: false }) as PathType;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
return final;
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
function getNonSelfItersectionPath(path: PathType) {
|
|
312
|
-
if (path.closed) {
|
|
313
|
-
return path.unite(path, { insert: false }) as PathType;
|
|
314
|
-
}
|
|
315
|
-
return path;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
export function offsetPath(path: PathType, offset: number, join: StrokeJoinType, limit: number): PathType {
|
|
319
|
-
const nonSIPath = getNonSelfItersectionPath(path);
|
|
320
|
-
let result = nonSIPath;
|
|
321
|
-
if (nonSIPath instanceof paper.Path) {
|
|
322
|
-
result = offsetSimpleShape(nonSIPath, offset, join, limit);
|
|
323
|
-
} else {
|
|
324
|
-
const offsetParts = (nonSIPath.children as paper.Path[]).map((c) => {
|
|
325
|
-
if (c.segments.length > 1) {
|
|
326
|
-
if (!isSameDirection(c, path)) {
|
|
327
|
-
c.reverse();
|
|
328
|
-
}
|
|
329
|
-
let offseted = offsetSimpleShape(c, offset, join, limit);
|
|
330
|
-
offseted = normalize(offseted);
|
|
331
|
-
if (offseted.clockwise !== c.clockwise) {
|
|
332
|
-
offseted.reverse();
|
|
333
|
-
}
|
|
334
|
-
if (offseted instanceof paper.CompoundPath) {
|
|
335
|
-
offseted.applyMatrix = true;
|
|
336
|
-
return offseted.children;
|
|
337
|
-
} else {
|
|
338
|
-
return offseted;
|
|
339
|
-
}
|
|
340
|
-
} else {
|
|
341
|
-
return null;
|
|
342
|
-
}
|
|
343
|
-
});
|
|
344
|
-
const children = offsetParts.flat().filter((c) => !!c) as paper.Item[];
|
|
345
|
-
result = new paper.CompoundPath({ children, insert: false });
|
|
346
|
-
}
|
|
347
|
-
result.copyAttributes(nonSIPath, false);
|
|
348
|
-
result.remove();
|
|
349
|
-
return result;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
export function offsetStroke(path: PathType, offset: number, join: StrokeJoinType, cap: StrokeCapType, limit: number): PathType {
|
|
353
|
-
const nonSIPath = getNonSelfItersectionPath(path);
|
|
354
|
-
let result = nonSIPath;
|
|
355
|
-
if (nonSIPath instanceof paper.Path) {
|
|
356
|
-
result = offsetSimpleStroke(nonSIPath, offset, join, cap, limit);
|
|
357
|
-
} else {
|
|
358
|
-
const children = (nonSIPath.children as paper.Path[]).flatMap((c) => {
|
|
359
|
-
return offsetSimpleStroke(c, offset, join, cap, limit);
|
|
360
|
-
});
|
|
361
|
-
result = children.reduce((c1, c2) => c1.unite(c2, { insert: false }) as PathType);
|
|
362
|
-
}
|
|
363
|
-
result.strokeWidth = 0;
|
|
364
|
-
result.fillColor = nonSIPath.strokeColor;
|
|
365
|
-
result.shadowBlur = nonSIPath.shadowBlur;
|
|
366
|
-
result.shadowColor = nonSIPath.shadowColor;
|
|
367
|
-
result.shadowOffset = nonSIPath.shadowOffset;
|
|
368
|
-
return result;
|
|
369
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"moduleResolution": "node",
|
|
4
|
-
"target": "es5",
|
|
5
|
-
"module":"es2015",
|
|
6
|
-
"lib": ["es2019", "dom"],
|
|
7
|
-
"strict": true,
|
|
8
|
-
"sourceMap": true,
|
|
9
|
-
"declaration": true,
|
|
10
|
-
"allowSyntheticDefaultImports": true,
|
|
11
|
-
"experimentalDecorators": true,
|
|
12
|
-
"emitDecoratorMetadata": true,
|
|
13
|
-
"declarationDir": "dist/types",
|
|
14
|
-
"outDir": "dist/lib",
|
|
15
|
-
"typeRoots": [
|
|
16
|
-
"node_modules/@types"
|
|
17
|
-
]
|
|
18
|
-
},
|
|
19
|
-
"include": ["src"]
|
|
20
|
-
}
|
package/tslint.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"defaultSeverity": "warning",
|
|
3
|
-
"extends": [
|
|
4
|
-
"tslint:recommended"
|
|
5
|
-
],
|
|
6
|
-
"linterOptions": {
|
|
7
|
-
"exclude": [
|
|
8
|
-
"node_modules/**"
|
|
9
|
-
]
|
|
10
|
-
},
|
|
11
|
-
"rules": {
|
|
12
|
-
"quotemark": [true, "single"],
|
|
13
|
-
"interface-name": false,
|
|
14
|
-
"ordered-imports": false,
|
|
15
|
-
"max-line-length": [true, 180]
|
|
16
|
-
}
|
|
17
|
-
}
|