Skip to content

Commit ce2d6b9

Browse files
committed
add esm build artifacts
1 parent d4ae9b9 commit ce2d6b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+3144
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ out.json
99
.vscode/
1010
*.received.*
1111
commonjs/*.js
12-
esm/
12+
1313
*.tgz
1414
*.lock

esm/AutoCadColorIndex.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
* AutoCad files sometimes use an indexed color value between 1 and 255 inclusive.
3+
* Each value corresponds to a color. index 1 is red, that is 16711680 or 0xFF0000.
4+
* index 0 and 256, while included in this array, are actually reserved for inheritance
5+
* values in AutoCad so they should not be used for index color lookups.
6+
*/
7+
declare const _default: number[];
8+
export default _default;

esm/AutoCadColorIndex.js

Lines changed: 264 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,264 @@
1+
/**
2+
* AutoCad files sometimes use an indexed color value between 1 and 255 inclusive.
3+
* Each value corresponds to a color. index 1 is red, that is 16711680 or 0xFF0000.
4+
* index 0 and 256, while included in this array, are actually reserved for inheritance
5+
* values in AutoCad so they should not be used for index color lookups.
6+
*/
7+
export default [
8+
0,
9+
16711680,
10+
16776960,
11+
65280,
12+
65535,
13+
255,
14+
16711935,
15+
16777215,
16+
8421504,
17+
12632256,
18+
16711680,
19+
16744319,
20+
13369344,
21+
13395558,
22+
10027008,
23+
10046540,
24+
8323072,
25+
8339263,
26+
4980736,
27+
4990502,
28+
16727808,
29+
16752511,
30+
13382400,
31+
13401958,
32+
10036736,
33+
10051404,
34+
8331008,
35+
8343359,
36+
4985600,
37+
4992806,
38+
16744192,
39+
16760703,
40+
13395456,
41+
13408614,
42+
10046464,
43+
10056268,
44+
8339200,
45+
8347455,
46+
4990464,
47+
4995366,
48+
16760576,
49+
16768895,
50+
13408512,
51+
13415014,
52+
10056192,
53+
10061132,
54+
8347392,
55+
8351551,
56+
4995328,
57+
4997670,
58+
16776960,
59+
16777087,
60+
13421568,
61+
13421670,
62+
10000384,
63+
10000460,
64+
8355584,
65+
8355647,
66+
5000192,
67+
5000230,
68+
12582656,
69+
14679935,
70+
10079232,
71+
11717734,
72+
7510016,
73+
8755276,
74+
6258432,
75+
7307071,
76+
3755008,
77+
4344870,
78+
8388352,
79+
12582783,
80+
6736896,
81+
10079334,
82+
5019648,
83+
7510092,
84+
4161280,
85+
6258495,
86+
2509824,
87+
3755046,
88+
4194048,
89+
10485631,
90+
3394560,
91+
8375398,
92+
2529280,
93+
6264908,
94+
2064128,
95+
5209919,
96+
1264640,
97+
3099686,
98+
65280,
99+
8388479,
100+
52224,
101+
6736998,
102+
38912,
103+
5019724,
104+
32512,
105+
4161343,
106+
19456,
107+
2509862,
108+
65343,
109+
8388511,
110+
52275,
111+
6737023,
112+
38950,
113+
5019743,
114+
32543,
115+
4161359,
116+
19475,
117+
2509871,
118+
65407,
119+
8388543,
120+
52326,
121+
6737049,
122+
38988,
123+
5019762,
124+
32575,
125+
4161375,
126+
19494,
127+
2509881,
128+
65471,
129+
8388575,
130+
52377,
131+
6737074,
132+
39026,
133+
5019781,
134+
32607,
135+
4161391,
136+
19513,
137+
2509890,
138+
65535,
139+
8388607,
140+
52428,
141+
6737100,
142+
39064,
143+
5019800,
144+
32639,
145+
4161407,
146+
19532,
147+
2509900,
148+
49151,
149+
8380415,
150+
39372,
151+
6730444,
152+
29336,
153+
5014936,
154+
24447,
155+
4157311,
156+
14668,
157+
2507340,
158+
32767,
159+
8372223,
160+
26316,
161+
6724044,
162+
19608,
163+
5010072,
164+
16255,
165+
4153215,
166+
9804,
167+
2505036,
168+
16383,
169+
8364031,
170+
13260,
171+
6717388,
172+
9880,
173+
5005208,
174+
8063,
175+
4149119,
176+
4940,
177+
2502476,
178+
255,
179+
8355839,
180+
204,
181+
6710988,
182+
152,
183+
5000344,
184+
127,
185+
4145023,
186+
76,
187+
2500172,
188+
4129023,
189+
10452991,
190+
3342540,
191+
8349388,
192+
2490520,
193+
6245528,
194+
2031743,
195+
5193599,
196+
1245260,
197+
3089996,
198+
8323327,
199+
12550143,
200+
6684876,
201+
10053324,
202+
4980888,
203+
7490712,
204+
4128895,
205+
6242175,
206+
2490444,
207+
3745356,
208+
12517631,
209+
14647295,
210+
10027212,
211+
11691724,
212+
7471256,
213+
8735896,
214+
6226047,
215+
7290751,
216+
3735628,
217+
4335180,
218+
16711935,
219+
16744447,
220+
13369548,
221+
13395660,
222+
9961624,
223+
9981080,
224+
8323199,
225+
8339327,
226+
4980812,
227+
4990540,
228+
16711871,
229+
16744415,
230+
13369497,
231+
13395634,
232+
9961586,
233+
9981061,
234+
8323167,
235+
8339311,
236+
4980793,
237+
4990530,
238+
16711807,
239+
16744383,
240+
13369446,
241+
13395609,
242+
9961548,
243+
9981042,
244+
8323135,
245+
8339295,
246+
4980774,
247+
4990521,
248+
16711743,
249+
16744351,
250+
13369395,
251+
13395583,
252+
9961510,
253+
9981023,
254+
8323103,
255+
8339279,
256+
4980755,
257+
4990511,
258+
3355443,
259+
5987163,
260+
8684676,
261+
11382189,
262+
14079702,
263+
16777215
264+
];

esm/DxfArrayScanner.d.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
export interface IGroup {
2+
code: number;
3+
value: number | string | boolean;
4+
}
5+
/**
6+
* DxfArrayScanner
7+
*
8+
* Based off the AutoCad 2012 DXF Reference
9+
* http://images.autodesk.com/adsk/files/autocad_2012_pdf_dxf-reference_enu.pdf
10+
*
11+
* Reads through an array representing lines of a dxf file. Takes an array and
12+
* provides an easy interface to extract group code and value pairs.
13+
* @param data - an array where each element represents a line in the dxf file
14+
* @constructor
15+
*/
16+
export default class DxfArrayScanner {
17+
private _pointer;
18+
private _eof;
19+
lastReadGroup: IGroup;
20+
private _data;
21+
constructor(data: string[]);
22+
/**
23+
* Gets the next group (code, value) from the array. A group is two consecutive elements
24+
* in the array. The first is the code, the second is the value.
25+
* @returns {{code: Number}|*}
26+
*/
27+
next(): IGroup;
28+
peek(): IGroup;
29+
rewind(numberOfGroups?: number): void;
30+
/**
31+
* Returns true if there is another code/value pair (2 elements in the array).
32+
* @returns {boolean}
33+
*/
34+
hasNext(): boolean;
35+
/**
36+
* Returns true if the scanner is at the end of the array
37+
* @returns {boolean}
38+
*/
39+
isEOF(): boolean;
40+
}

0 commit comments

Comments
 (0)