@taiga-ui/icons 3.60.0 → 3.61.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/bundles/taiga-ui-icons-scripts.umd.js +533 -679
- package/bundles/taiga-ui-icons-scripts.umd.js.map +1 -1
- package/esm2015/scripts/convert-all-compile-file-to-all-file.js +5 -5
- package/esm2015/scripts/post-prettier-format.js +3 -3
- package/esm2015/scripts/prepare-all-to-compile-file.js +6 -6
- package/esm2015/scripts/process-icons.js +14 -14
- package/esm2015/scripts/rollup-svgo.js +7 -7
- package/fesm2015/taiga-ui-icons-scripts.js +30 -30
- package/fesm2015/taiga-ui-icons-scripts.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,697 +1,551 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rollup'), require('rollup-plugin-typescript2'), require('@rollup/pluginutils'), require('svgo'), require('fs'), require('prettier'), require('path')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@taiga-ui/icons/scripts', ['exports', 'rollup', 'rollup-plugin-typescript2', '@rollup/pluginutils', 'svgo', 'fs', 'prettier', 'path'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].icons = global["taiga-ui"].icons || {}, global["taiga-ui"].icons.scripts = {}), global.rollup, global.typescript, global.pluginutils, global.svgo, global.fs, global.prettier, global.path));
|
|
5
5
|
})(this, (function (exports, rollup, typescript, pluginutils, svgo, fs, prettier, path) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
var typescript__default = /*#__PURE__*/_interopDefaultLegacy(typescript);
|
|
10
|
+
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
|
11
|
+
var prettier__default = /*#__PURE__*/_interopDefaultLegacy(prettier);
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
/*! *****************************************************************************
|
|
14
|
+
Copyright (c) Microsoft Corporation.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
17
|
+
purpose with or without fee is hereby granted.
|
|
18
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
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
function reject(value) { resume("throw", value); }
|
|
331
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
332
|
-
resume(q[0][0], q[0][1]); }
|
|
333
|
-
}
|
|
334
|
-
function __asyncDelegator(o) {
|
|
335
|
-
var i, p;
|
|
336
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
337
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
|
|
338
|
-
}
|
|
339
|
-
function __asyncValues(o) {
|
|
340
|
-
if (!Symbol.asyncIterator)
|
|
341
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
342
|
-
var m = o[Symbol.asyncIterator], i;
|
|
343
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
344
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
345
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
346
|
-
}
|
|
347
|
-
function __makeTemplateObject(cooked, raw) {
|
|
348
|
-
if (Object.defineProperty) {
|
|
349
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
350
|
-
}
|
|
351
|
-
else {
|
|
352
|
-
cooked.raw = raw;
|
|
353
|
-
}
|
|
354
|
-
return cooked;
|
|
355
|
-
}
|
|
356
|
-
;
|
|
357
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
358
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
359
|
-
}) : function (o, v) {
|
|
360
|
-
o["default"] = v;
|
|
361
|
-
};
|
|
362
|
-
function __importStar(mod) {
|
|
363
|
-
if (mod && mod.__esModule)
|
|
364
|
-
return mod;
|
|
365
|
-
var result = {};
|
|
366
|
-
if (mod != null)
|
|
367
|
-
for (var k in mod)
|
|
368
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
369
|
-
__createBinding(result, mod, k);
|
|
370
|
-
__setModuleDefault(result, mod);
|
|
371
|
-
return result;
|
|
372
|
-
}
|
|
373
|
-
function __importDefault(mod) {
|
|
374
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
375
|
-
}
|
|
376
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
377
|
-
if (kind === "a" && !f)
|
|
378
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
379
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
380
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
381
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
382
|
-
}
|
|
383
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
384
|
-
if (kind === "m")
|
|
385
|
-
throw new TypeError("Private method is not writable");
|
|
386
|
-
if (kind === "a" && !f)
|
|
387
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
388
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
389
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
390
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
391
|
-
}
|
|
392
|
-
function __classPrivateFieldIn(state, receiver) {
|
|
393
|
-
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
|
|
394
|
-
throw new TypeError("Cannot use 'in' operator on non-object");
|
|
395
|
-
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
396
|
-
}
|
|
397
|
-
function __addDisposableResource(env, value, async) {
|
|
398
|
-
if (value !== null && value !== void 0) {
|
|
399
|
-
if (typeof value !== "object" && typeof value !== "function")
|
|
400
|
-
throw new TypeError("Object expected.");
|
|
401
|
-
var dispose;
|
|
402
|
-
if (async) {
|
|
403
|
-
if (!Symbol.asyncDispose)
|
|
404
|
-
throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
405
|
-
dispose = value[Symbol.asyncDispose];
|
|
406
|
-
}
|
|
407
|
-
if (dispose === void 0) {
|
|
408
|
-
if (!Symbol.dispose)
|
|
409
|
-
throw new TypeError("Symbol.dispose is not defined.");
|
|
410
|
-
dispose = value[Symbol.dispose];
|
|
411
|
-
}
|
|
412
|
-
if (typeof dispose !== "function")
|
|
413
|
-
throw new TypeError("Object not disposable.");
|
|
414
|
-
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
415
|
-
}
|
|
416
|
-
else if (async) {
|
|
417
|
-
env.stack.push({ async: true });
|
|
418
|
-
}
|
|
419
|
-
return value;
|
|
420
|
-
}
|
|
421
|
-
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
422
|
-
var e = new Error(message);
|
|
423
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
424
|
-
};
|
|
425
|
-
function __disposeResources(env) {
|
|
426
|
-
function fail(e) {
|
|
427
|
-
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
428
|
-
env.hasError = true;
|
|
429
|
-
}
|
|
430
|
-
function next() {
|
|
431
|
-
while (env.stack.length) {
|
|
432
|
-
var rec = env.stack.pop();
|
|
433
|
-
try {
|
|
434
|
-
var result = rec.dispose && rec.dispose.call(rec.value);
|
|
435
|
-
if (rec.async)
|
|
436
|
-
return Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
|
|
437
|
-
}
|
|
438
|
-
catch (e) {
|
|
439
|
-
fail(e);
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
if (env.hasError)
|
|
443
|
-
throw env.error;
|
|
444
|
-
}
|
|
445
|
-
return next();
|
|
446
|
-
}
|
|
447
|
-
var tslib_es6 = {
|
|
448
|
-
__extends: __extends,
|
|
449
|
-
__assign: __assign,
|
|
450
|
-
__rest: __rest,
|
|
451
|
-
__decorate: __decorate,
|
|
452
|
-
__param: __param,
|
|
453
|
-
__metadata: __metadata,
|
|
454
|
-
__awaiter: __awaiter,
|
|
455
|
-
__generator: __generator,
|
|
456
|
-
__createBinding: __createBinding,
|
|
457
|
-
__exportStar: __exportStar,
|
|
458
|
-
__values: __values,
|
|
459
|
-
__read: __read,
|
|
460
|
-
__spread: __spread,
|
|
461
|
-
__spreadArrays: __spreadArrays,
|
|
462
|
-
__spreadArray: __spreadArray,
|
|
463
|
-
__await: __await,
|
|
464
|
-
__asyncGenerator: __asyncGenerator,
|
|
465
|
-
__asyncDelegator: __asyncDelegator,
|
|
466
|
-
__asyncValues: __asyncValues,
|
|
467
|
-
__makeTemplateObject: __makeTemplateObject,
|
|
468
|
-
__importStar: __importStar,
|
|
469
|
-
__importDefault: __importDefault,
|
|
470
|
-
__classPrivateFieldGet: __classPrivateFieldGet,
|
|
471
|
-
__classPrivateFieldSet: __classPrivateFieldSet,
|
|
472
|
-
__classPrivateFieldIn: __classPrivateFieldIn,
|
|
473
|
-
__addDisposableResource: __addDisposableResource,
|
|
474
|
-
__disposeResources: __disposeResources,
|
|
475
|
-
};
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
20
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
21
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
22
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
23
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
24
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
25
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
26
|
+
***************************************************************************** */
|
|
27
|
+
/* global Reflect, Promise */
|
|
28
|
+
var extendStatics = function (d, b) {
|
|
29
|
+
extendStatics = Object.setPrototypeOf ||
|
|
30
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
31
|
+
function (d, b) { for (var p in b)
|
|
32
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
33
|
+
d[p] = b[p]; };
|
|
34
|
+
return extendStatics(d, b);
|
|
35
|
+
};
|
|
36
|
+
function __extends(d, b) {
|
|
37
|
+
if (typeof b !== "function" && b !== null)
|
|
38
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
39
|
+
extendStatics(d, b);
|
|
40
|
+
function __() { this.constructor = d; }
|
|
41
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
42
|
+
}
|
|
43
|
+
var __assign = function () {
|
|
44
|
+
__assign = Object.assign || function __assign(t) {
|
|
45
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
46
|
+
s = arguments[i];
|
|
47
|
+
for (var p in s)
|
|
48
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
49
|
+
t[p] = s[p];
|
|
50
|
+
}
|
|
51
|
+
return t;
|
|
52
|
+
};
|
|
53
|
+
return __assign.apply(this, arguments);
|
|
54
|
+
};
|
|
55
|
+
function __rest(s, e) {
|
|
56
|
+
var t = {};
|
|
57
|
+
for (var p in s)
|
|
58
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
59
|
+
t[p] = s[p];
|
|
60
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
61
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
62
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
63
|
+
t[p[i]] = s[p[i]];
|
|
64
|
+
}
|
|
65
|
+
return t;
|
|
66
|
+
}
|
|
67
|
+
function __decorate(decorators, target, key, desc) {
|
|
68
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
69
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
70
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
71
|
+
else
|
|
72
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
73
|
+
if (d = decorators[i])
|
|
74
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
75
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
76
|
+
}
|
|
77
|
+
function __param(paramIndex, decorator) {
|
|
78
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
79
|
+
}
|
|
80
|
+
function __metadata(metadataKey, metadataValue) {
|
|
81
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
82
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
83
|
+
}
|
|
84
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
85
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
86
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
87
|
+
function fulfilled(value) { try {
|
|
88
|
+
step(generator.next(value));
|
|
89
|
+
}
|
|
90
|
+
catch (e) {
|
|
91
|
+
reject(e);
|
|
92
|
+
} }
|
|
93
|
+
function rejected(value) { try {
|
|
94
|
+
step(generator["throw"](value));
|
|
95
|
+
}
|
|
96
|
+
catch (e) {
|
|
97
|
+
reject(e);
|
|
98
|
+
} }
|
|
99
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
100
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
function __generator(thisArg, body) {
|
|
104
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
105
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
106
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
107
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
108
|
+
function step(op) {
|
|
109
|
+
if (f)
|
|
110
|
+
throw new TypeError("Generator is already executing.");
|
|
111
|
+
while (_)
|
|
112
|
+
try {
|
|
113
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
114
|
+
return t;
|
|
115
|
+
if (y = 0, t)
|
|
116
|
+
op = [op[0] & 2, t.value];
|
|
117
|
+
switch (op[0]) {
|
|
118
|
+
case 0:
|
|
119
|
+
case 1:
|
|
120
|
+
t = op;
|
|
121
|
+
break;
|
|
122
|
+
case 4:
|
|
123
|
+
_.label++;
|
|
124
|
+
return { value: op[1], done: false };
|
|
125
|
+
case 5:
|
|
126
|
+
_.label++;
|
|
127
|
+
y = op[1];
|
|
128
|
+
op = [0];
|
|
129
|
+
continue;
|
|
130
|
+
case 7:
|
|
131
|
+
op = _.ops.pop();
|
|
132
|
+
_.trys.pop();
|
|
133
|
+
continue;
|
|
134
|
+
default:
|
|
135
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
136
|
+
_ = 0;
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
140
|
+
_.label = op[1];
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
144
|
+
_.label = t[1];
|
|
145
|
+
t = op;
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
if (t && _.label < t[2]) {
|
|
149
|
+
_.label = t[2];
|
|
150
|
+
_.ops.push(op);
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
if (t[2])
|
|
154
|
+
_.ops.pop();
|
|
155
|
+
_.trys.pop();
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
op = body.call(thisArg, _);
|
|
159
|
+
}
|
|
160
|
+
catch (e) {
|
|
161
|
+
op = [6, e];
|
|
162
|
+
y = 0;
|
|
163
|
+
}
|
|
164
|
+
finally {
|
|
165
|
+
f = t = 0;
|
|
166
|
+
}
|
|
167
|
+
if (op[0] & 5)
|
|
168
|
+
throw op[1];
|
|
169
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
173
|
+
if (k2 === undefined)
|
|
174
|
+
k2 = k;
|
|
175
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
176
|
+
}) : (function (o, m, k, k2) {
|
|
177
|
+
if (k2 === undefined)
|
|
178
|
+
k2 = k;
|
|
179
|
+
o[k2] = m[k];
|
|
180
|
+
});
|
|
181
|
+
function __exportStar(m, o) {
|
|
182
|
+
for (var p in m)
|
|
183
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
184
|
+
__createBinding(o, m, p);
|
|
185
|
+
}
|
|
186
|
+
function __values(o) {
|
|
187
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
188
|
+
if (m)
|
|
189
|
+
return m.call(o);
|
|
190
|
+
if (o && typeof o.length === "number")
|
|
191
|
+
return {
|
|
192
|
+
next: function () {
|
|
193
|
+
if (o && i >= o.length)
|
|
194
|
+
o = void 0;
|
|
195
|
+
return { value: o && o[i++], done: !o };
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
199
|
+
}
|
|
200
|
+
function __read(o, n) {
|
|
201
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
202
|
+
if (!m)
|
|
203
|
+
return o;
|
|
204
|
+
var i = m.call(o), r, ar = [], e;
|
|
205
|
+
try {
|
|
206
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
207
|
+
ar.push(r.value);
|
|
208
|
+
}
|
|
209
|
+
catch (error) {
|
|
210
|
+
e = { error: error };
|
|
211
|
+
}
|
|
212
|
+
finally {
|
|
213
|
+
try {
|
|
214
|
+
if (r && !r.done && (m = i["return"]))
|
|
215
|
+
m.call(i);
|
|
216
|
+
}
|
|
217
|
+
finally {
|
|
218
|
+
if (e)
|
|
219
|
+
throw e.error;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return ar;
|
|
223
|
+
}
|
|
224
|
+
/** @deprecated */
|
|
225
|
+
function __spread() {
|
|
226
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
227
|
+
ar = ar.concat(__read(arguments[i]));
|
|
228
|
+
return ar;
|
|
229
|
+
}
|
|
230
|
+
/** @deprecated */
|
|
231
|
+
function __spreadArrays() {
|
|
232
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
233
|
+
s += arguments[i].length;
|
|
234
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
235
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
236
|
+
r[k] = a[j];
|
|
237
|
+
return r;
|
|
238
|
+
}
|
|
239
|
+
function __spreadArray(to, from, pack) {
|
|
240
|
+
if (pack || arguments.length === 2)
|
|
241
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
242
|
+
if (ar || !(i in from)) {
|
|
243
|
+
if (!ar)
|
|
244
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
245
|
+
ar[i] = from[i];
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
return to.concat(ar || from);
|
|
249
|
+
}
|
|
250
|
+
function __await(v) {
|
|
251
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
252
|
+
}
|
|
253
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
254
|
+
if (!Symbol.asyncIterator)
|
|
255
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
256
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
257
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
258
|
+
function verb(n) { if (g[n])
|
|
259
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
260
|
+
function resume(n, v) { try {
|
|
261
|
+
step(g[n](v));
|
|
262
|
+
}
|
|
263
|
+
catch (e) {
|
|
264
|
+
settle(q[0][3], e);
|
|
265
|
+
} }
|
|
266
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
267
|
+
function fulfill(value) { resume("next", value); }
|
|
268
|
+
function reject(value) { resume("throw", value); }
|
|
269
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
270
|
+
resume(q[0][0], q[0][1]); }
|
|
271
|
+
}
|
|
272
|
+
function __asyncDelegator(o) {
|
|
273
|
+
var i, p;
|
|
274
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
275
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
276
|
+
}
|
|
277
|
+
function __asyncValues(o) {
|
|
278
|
+
if (!Symbol.asyncIterator)
|
|
279
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
280
|
+
var m = o[Symbol.asyncIterator], i;
|
|
281
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
282
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
283
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
284
|
+
}
|
|
285
|
+
function __makeTemplateObject(cooked, raw) {
|
|
286
|
+
if (Object.defineProperty) {
|
|
287
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
288
|
+
}
|
|
289
|
+
else {
|
|
290
|
+
cooked.raw = raw;
|
|
291
|
+
}
|
|
292
|
+
return cooked;
|
|
293
|
+
}
|
|
294
|
+
;
|
|
295
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
296
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
297
|
+
}) : function (o, v) {
|
|
298
|
+
o["default"] = v;
|
|
299
|
+
};
|
|
300
|
+
function __importStar(mod) {
|
|
301
|
+
if (mod && mod.__esModule)
|
|
302
|
+
return mod;
|
|
303
|
+
var result = {};
|
|
304
|
+
if (mod != null)
|
|
305
|
+
for (var k in mod)
|
|
306
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
307
|
+
__createBinding(result, mod, k);
|
|
308
|
+
__setModuleDefault(result, mod);
|
|
309
|
+
return result;
|
|
310
|
+
}
|
|
311
|
+
function __importDefault(mod) {
|
|
312
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
313
|
+
}
|
|
314
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
315
|
+
if (kind === "a" && !f)
|
|
316
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
317
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
318
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
319
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
320
|
+
}
|
|
321
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
322
|
+
if (kind === "m")
|
|
323
|
+
throw new TypeError("Private method is not writable");
|
|
324
|
+
if (kind === "a" && !f)
|
|
325
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
326
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
327
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
328
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
329
|
+
}
|
|
476
330
|
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
331
|
+
function tuiRollupSvgo(_c) {
|
|
332
|
+
var _d = _c === void 0 ? {} : _c, _e = _d.include, include = _e === void 0 ? '**/*.svg' : _e, exclude = _d.exclude, options = _d.options;
|
|
333
|
+
var filter = pluginutils.createFilter(include, exclude);
|
|
334
|
+
return {
|
|
335
|
+
name: 'rollupSvgo',
|
|
336
|
+
transform: function (svgString, path) {
|
|
337
|
+
var _a, _b;
|
|
338
|
+
var skip = !filter(path);
|
|
339
|
+
if (skip) {
|
|
340
|
+
console.info('\x1B[33m%s\x1B[0m', '[skip]', path);
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
var data;
|
|
344
|
+
var errorMessage;
|
|
345
|
+
try {
|
|
346
|
+
var result = svgo.optimize(svgString, Object.assign({ path: path }, options));
|
|
347
|
+
data = (result === null || result === void 0 ? void 0 : result.data) || {};
|
|
348
|
+
errorMessage = (_a = result) === null || _a === void 0 ? void 0 : _a.error;
|
|
349
|
+
}
|
|
350
|
+
catch (err) {
|
|
351
|
+
errorMessage = (_b = err) === null || _b === void 0 ? void 0 : _b.message;
|
|
352
|
+
}
|
|
353
|
+
if (errorMessage) {
|
|
354
|
+
console.error('\x1B[31m%s\x1B[0m', '[error]', path, "\n" + svgString, "\n" + errorMessage);
|
|
355
|
+
process.exit(1);
|
|
356
|
+
}
|
|
357
|
+
console.info('\x1B[32m%s\x1B[0m', '[success]', path);
|
|
358
|
+
return {
|
|
359
|
+
code: "export default " + JSON.stringify(data),
|
|
360
|
+
map: { mappings: '' },
|
|
361
|
+
};
|
|
362
|
+
},
|
|
363
|
+
};
|
|
364
|
+
}
|
|
511
365
|
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
366
|
+
var banner = "\n/**\n * @description:\n * DO NOT CHANGE THIS FILE. AUTOGENERATED\n *\n * This file contains inline svg icons\n * for users who wants insert into js bundle\n */\n";
|
|
367
|
+
function tuiConvertAllCompileFileToAllFile(config) {
|
|
368
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
369
|
+
var from, to, prt2Options, include, inputOptions, bundle;
|
|
370
|
+
return __generator(this, function (_a) {
|
|
371
|
+
switch (_a.label) {
|
|
372
|
+
case 0:
|
|
373
|
+
from = config.from, to = config.to, prt2Options = config.prt2Options, include = config.include;
|
|
374
|
+
inputOptions = {
|
|
375
|
+
input: from,
|
|
376
|
+
output: {
|
|
377
|
+
generatedCode: {
|
|
378
|
+
constBindings: true,
|
|
379
|
+
},
|
|
380
|
+
},
|
|
381
|
+
plugins: [
|
|
382
|
+
typescript__default["default"](prt2Options),
|
|
383
|
+
tuiRollupSvgo({
|
|
384
|
+
include: include,
|
|
385
|
+
options: {
|
|
386
|
+
plugins: [
|
|
387
|
+
{
|
|
388
|
+
name: 'preset-default',
|
|
389
|
+
params: {
|
|
390
|
+
overrides: {
|
|
391
|
+
removeViewBox: false,
|
|
392
|
+
collapseGroups: false,
|
|
393
|
+
removeUnknownsAndDefaults: false,
|
|
394
|
+
cleanupIds: {},
|
|
395
|
+
sortAttrs: {
|
|
396
|
+
xmlnsOrder: 'alphabetical',
|
|
397
|
+
},
|
|
398
|
+
},
|
|
399
|
+
},
|
|
400
|
+
},
|
|
401
|
+
],
|
|
402
|
+
},
|
|
403
|
+
}),
|
|
404
|
+
],
|
|
405
|
+
};
|
|
406
|
+
console.info('\x1B[36m%s\x1B[0m', 'TypeScript options: ', prt2Options);
|
|
407
|
+
return [4 /*yield*/, rollup.rollup(inputOptions)];
|
|
408
|
+
case 1:
|
|
409
|
+
bundle = _a.sent();
|
|
410
|
+
return [4 /*yield*/, bundle.write({
|
|
411
|
+
banner: banner,
|
|
412
|
+
file: to,
|
|
413
|
+
format: 'es',
|
|
414
|
+
generatedCode: {
|
|
415
|
+
constBindings: true,
|
|
416
|
+
},
|
|
417
|
+
})];
|
|
418
|
+
case 2:
|
|
419
|
+
_a.sent();
|
|
420
|
+
/**
|
|
421
|
+
* @note:
|
|
422
|
+
* The rollup bundle must be closed once `write` is finished to let plugins clean up their external
|
|
423
|
+
* processes or services via the `closeBundle` hook, otherwise it can lead to memory leaks.
|
|
424
|
+
*/
|
|
425
|
+
return [4 /*yield*/, bundle.close()];
|
|
426
|
+
case 3:
|
|
427
|
+
/**
|
|
428
|
+
* @note:
|
|
429
|
+
* The rollup bundle must be closed once `write` is finished to let plugins clean up their external
|
|
430
|
+
* processes or services via the `closeBundle` hook, otherwise it can lead to memory leaks.
|
|
431
|
+
*/
|
|
432
|
+
_a.sent();
|
|
433
|
+
return [2 /*return*/];
|
|
434
|
+
}
|
|
435
|
+
});
|
|
436
|
+
});
|
|
437
|
+
}
|
|
584
438
|
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
439
|
+
function tuiPostPrettierFormat(_a) {
|
|
440
|
+
var file = _a.file, config = _a.config;
|
|
441
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
442
|
+
var bundledBody, formatted;
|
|
443
|
+
return __generator(this, function (_a) {
|
|
444
|
+
switch (_a.label) {
|
|
445
|
+
case 0:
|
|
446
|
+
console.info('\x1B[36m%s\x1B[0m', "format: " + file + " by parser - " + config.parser);
|
|
447
|
+
bundledBody = fs.readFileSync(file, 'utf8');
|
|
448
|
+
return [4 /*yield*/, prettier__default["default"].format(bundledBody, config)];
|
|
449
|
+
case 1:
|
|
450
|
+
formatted = _a.sent();
|
|
451
|
+
fs.writeFileSync(file, formatted);
|
|
452
|
+
return [2 /*return*/];
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
});
|
|
456
|
+
}
|
|
603
457
|
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
458
|
+
function tuiPrepareAllToCompileFile(iconsSrc, entryPointTs) {
|
|
459
|
+
var icons = fs.readdirSync(iconsSrc).filter(function (file) { return file.endsWith('.svg'); });
|
|
460
|
+
console.info('\x1B[36m%s\x1B[0m', "Combine all svg icons into one file for bundling: " + icons.length);
|
|
461
|
+
var importDeclarations = '';
|
|
462
|
+
var exportDeclarations = '';
|
|
463
|
+
icons.forEach(function (iconPath) {
|
|
464
|
+
var fileName = iconPath.split('.').shift();
|
|
465
|
+
var filePath = "./src/" + fileName + ".svg";
|
|
466
|
+
importDeclarations += "import " + fileName + " from '" + filePath + "';\n";
|
|
467
|
+
exportDeclarations += fileName + ", ";
|
|
468
|
+
});
|
|
469
|
+
fs.writeFileSync(entryPointTs, importDeclarations + " \n export { " + exportDeclarations + " }");
|
|
470
|
+
}
|
|
617
471
|
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
472
|
+
var START = '<svg';
|
|
473
|
+
var WIDTH_SEARCH = 'width="';
|
|
474
|
+
var HEIGHT_SEARCH = 'height="';
|
|
475
|
+
function wrapIcon(source, name) {
|
|
476
|
+
var src = source.slice(Math.max(0, source.indexOf(START)));
|
|
477
|
+
var attributes = src.slice(0, Math.max(0, src.indexOf('>')));
|
|
478
|
+
if (!(attributes === null || attributes === void 0 ? void 0 : attributes.includes(WIDTH_SEARCH)) || !attributes.includes(HEIGHT_SEARCH)) {
|
|
479
|
+
return src;
|
|
480
|
+
}
|
|
481
|
+
var indexOfWidth = attributes.indexOf(WIDTH_SEARCH);
|
|
482
|
+
var indexOfHeight = attributes.indexOf(HEIGHT_SEARCH);
|
|
483
|
+
var widthOffset = indexOfWidth + WIDTH_SEARCH.length;
|
|
484
|
+
var heightOffset = indexOfHeight + HEIGHT_SEARCH.length;
|
|
485
|
+
var widthString = attributes.slice(widthOffset, attributes.indexOf('"', widthOffset));
|
|
486
|
+
var heightString = attributes.slice(heightOffset, attributes.indexOf('"', heightOffset));
|
|
487
|
+
if (!heightString ||
|
|
488
|
+
!widthString ||
|
|
489
|
+
widthString.includes('%') ||
|
|
490
|
+
heightString.includes('%')) {
|
|
491
|
+
return src.replace(START, "<svg id=\"" + name + "\"");
|
|
492
|
+
}
|
|
493
|
+
var width = parseInt(widthString, 10);
|
|
494
|
+
var height = parseInt(heightString, 10);
|
|
495
|
+
var emWidth = width / 16;
|
|
496
|
+
var emHeight = height / 16;
|
|
497
|
+
return {
|
|
498
|
+
width: emWidth + "em",
|
|
499
|
+
height: emHeight + "em",
|
|
500
|
+
src: ("\n <g id=\"" + name + "\" xmlns=\"http://www.w3.org/2000/svg\">\n <svg x=\"50%\" y=\"50%\" width=\"" + emWidth + "em\" height=\"" + emHeight + "em\" overflow=\"visible\" viewBox=\"0 0 " + width + " " + height + "\">\n <svg x=\"" + -width / 2 + "\" y=\"" + -height / 2 + "\">" + src + "</svg>\n </svg>\n </g>").trim(),
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
function tuiProcessIcons(files, interceptor) {
|
|
504
|
+
var e_1, _a;
|
|
505
|
+
try {
|
|
506
|
+
for (var files_1 = __values(files), files_1_1 = files_1.next(); !files_1_1.done; files_1_1 = files_1.next()) {
|
|
507
|
+
var file = files_1_1.value;
|
|
508
|
+
var baseContent = String(fs__default["default"].readFileSync(file));
|
|
509
|
+
var src = interceptor ? interceptor(baseContent) : baseContent;
|
|
510
|
+
var name = path.parse(file).base.replace('.svg', '');
|
|
511
|
+
if (src.includes("id=\"" + name + "\"") || name.includes('Outline')) {
|
|
512
|
+
console.info('\x1B[33m%s\x1B[0m', '[skip]:', file);
|
|
513
|
+
continue;
|
|
514
|
+
}
|
|
515
|
+
var wrapped = wrapIcon(src, name);
|
|
516
|
+
var final = typeof wrapped === 'string'
|
|
517
|
+
? wrapped.replace(START, "<svg xmlns=\"http://www.w3.org/2000/svg\"><g id=\"" + name + "\" xmlns=\"http://www.w3.org/2000/svg\"><svg") + "</g></svg>"
|
|
518
|
+
: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"" + wrapped.width + "\" height=\"" + wrapped.height + "\">" + wrapped.src + "</svg>";
|
|
519
|
+
fs__default["default"].writeFileSync(file, final);
|
|
520
|
+
console.info('\x1B[32m%s\x1B[0m', '[preprocessed]:', file);
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
524
|
+
finally {
|
|
525
|
+
try {
|
|
526
|
+
if (files_1_1 && !files_1_1.done && (_a = files_1.return)) _a.call(files_1);
|
|
527
|
+
}
|
|
528
|
+
finally { if (e_1) throw e_1.error; }
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* @deprecated:
|
|
533
|
+
* use @{link tuiProcessIcons}
|
|
534
|
+
*/
|
|
535
|
+
var processIcons = tuiProcessIcons;
|
|
682
536
|
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
537
|
+
/**
|
|
538
|
+
* Generated bundle index. Do not edit.
|
|
539
|
+
*/
|
|
686
540
|
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
541
|
+
exports.processIcons = processIcons;
|
|
542
|
+
exports.tuiConvertAllCompileFileToAllFile = tuiConvertAllCompileFileToAllFile;
|
|
543
|
+
exports.tuiPostPrettierFormat = tuiPostPrettierFormat;
|
|
544
|
+
exports.tuiPrepareAllToCompileFile = tuiPrepareAllToCompileFile;
|
|
545
|
+
exports.tuiProcessIcons = tuiProcessIcons;
|
|
546
|
+
exports.tuiRollupSvgo = tuiRollupSvgo;
|
|
693
547
|
|
|
694
|
-
|
|
548
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
695
549
|
|
|
696
550
|
}));
|
|
697
551
|
//# sourceMappingURL=taiga-ui-icons-scripts.umd.js.map
|