@kizmann/pico-js 2.0.9 → 2.0.11

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.
Files changed (41) hide show
  1. package/dist/pico-js.browser.js +1 -1
  2. package/dist/pico-js.browser.js.map +1 -1
  3. package/dist/pico-js.esm.js +1 -1
  4. package/dist/pico-js.esm.js.map +1 -1
  5. package/package.json +1 -1
  6. package/src/dom/DomAttribute.ts +8 -2
  7. package/src/dom/DomEvent.ts +19 -12
  8. package/src/dom/DomFinder.ts +21 -6
  9. package/src/dom/DomGlobal.ts +8 -4
  10. package/src/dom/DomMeta.ts +1 -0
  11. package/src/dom/DomObserver.ts +0 -1
  12. package/src/dom/DomPopover.ts +39 -0
  13. package/src/dom/DomRectangle.ts +8 -0
  14. package/src/format/FormatFile.ts +1 -2
  15. package/src/format/FormatOption.ts +0 -1
  16. package/src/format/FormatParam.ts +0 -1
  17. package/src/now/NowDefault.ts +80 -32
  18. package/src/now/NowGrid.ts +30 -12
  19. package/src/now/NowMatch.ts +1 -1
  20. package/src/now/NowRange.ts +5 -2
  21. package/src/now/NowWalker.ts +0 -1
  22. package/src/tool/scope.ts +6 -0
  23. package/src/utils/Array.ts +130 -21
  24. package/src/utils/Dom.ts +1 -1
  25. package/src/utils/Locale.ts +3 -3
  26. package/src/utils/Mixed.ts +59 -13
  27. package/src/utils/Now.ts +5 -2
  28. package/src/utils/Number.ts +8 -2
  29. package/src/utils/Object.ts +26 -5
  30. package/src/utils/Signal.ts +1 -1
  31. package/src/utils/String.ts +24 -18
  32. package/src/wip/Map.ts +131 -101
  33. package/types/dom/DomEvent.d.ts +1 -1
  34. package/types/dom/DomGlobal.d.ts +4 -0
  35. package/types/dom/DomPopover.d.ts +39 -0
  36. package/types/dom/DomRectangle.d.ts +8 -0
  37. package/types/tool/scope.d.ts +6 -0
  38. package/types/utils/Array.d.ts +55 -4
  39. package/types/utils/Locale.d.ts +1 -1
  40. package/types/utils/Mixed.d.ts +10 -0
  41. package/types/utils/Object.d.ts +9 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kizmann/pico-js",
3
- "version": "2.0.9",
3
+ "version": "2.0.11",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "private": false,
@@ -360,14 +360,20 @@ export class PicoDomAttribute
360
360
 
361
361
  }
362
362
 
363
+ /**
364
+ * @deprecated use Dom.style instead
365
+ */
363
366
  // @ts-ignore
364
- PicoDomAttribute.prototype.css = function (...args : Parameters<typeof PicoDomAttribute.style>) {
367
+ PicoDomAttribute.prototype.css = function(...args : Parameters<typeof PicoDomAttribute.prototype.style>) : any {
365
368
  console.warn('Dom.css() is deprecated, use Dom.style() instead.');
366
369
  return this.style(...args);
367
370
  };
368
371
 
372
+ /**
373
+ * @deprecated use Dom.remClass instead
374
+ */
369
375
  // @ts-ignore
370
- PicoDomAttribute.prototype.removeClass = function (...args : Parameters<typeof PicoDomAttribute.remClass>) {
376
+ PicoDomAttribute.prototype.removeClass = function(...args : Parameters<typeof PicoDomAttribute.prototype.remClass>) : any {
371
377
  console.warn('Dom.removeClass() is deprecated, use Dom.remClass() instead.');
372
378
  return this.remClass(...args);
373
379
  };
@@ -1,4 +1,4 @@
1
- import { Arr, Hash, Mix, Obj, Dom, Run } from "../index.esm.ts";
1
+ import { Arr, Hash, Mix, Dom, Run } from "../index.esm.ts";
2
2
  import { PicoDom, PicoDomInterface } from "../utils/Dom.ts";
3
3
  import PicoDomFinder from "./DomFinder.js";
4
4
  import PicoDomRectangle from "./DomRectangle.js";
@@ -43,12 +43,7 @@ export class PicoDomEvent
43
43
  el, event, cb, selector, pause, options
44
44
  });
45
45
 
46
- console.log(this.els, el);
47
- try {
48
- el.addEventListener(event, cb, options);
49
- } catch (e) {
50
- console.log('ERRROR', this.els, el, e);
51
- }
46
+ el.addEventListener(event, cb, options);
52
47
 
53
48
  return <PicoDom> <unknown> this;
54
49
  }
@@ -135,7 +130,7 @@ export class PicoDomEvent
135
130
  * @example Dom.find("div").off("click")
136
131
  *
137
132
  * @param {any} event Event name
138
- * @param {string} [selector] Event selector
133
+ * @param {any} [selector] Event selector
139
134
  * @param {any} [options] Listener options
140
135
  * @returns {PicoDom} Current instance
141
136
  */
@@ -284,24 +279,36 @@ export class PicoDomEvent
284
279
 
285
280
  }
286
281
 
282
+ /**
283
+ * @deprecated use Dom.once instead
284
+ */
287
285
  // @ts-ignore
288
- PicoDomEvent.prototype.one = function (...args : Parameters<typeof PicoDomEvent.prototype.once>) {
286
+ PicoDomEvent.prototype.one = function(...args : Parameters<typeof PicoDomEvent.prototype.once>) : any {
289
287
  console.warn('Dom.one() is deprecated, use Dom.once() instead.');
290
288
  return this.once(...args);
291
289
  };
292
290
 
291
+ /**
292
+ * @deprecated not implemented anymore
293
+ */
293
294
  // @ts-ignore
294
- PicoDomEvent.prototype.delayed = function () {
295
+ PicoDomEvent.prototype.delayed = function() : void {
295
296
  console.error('Dom.delayed() is not implemented anymore.');
296
297
  };
297
298
 
299
+ /**
300
+ * @deprecated not implemented anymore
301
+ */
298
302
  // @ts-ignore
299
- PicoDomEvent.prototype.pause = function () {
303
+ PicoDomEvent.prototype.pause = function() : void {
300
304
  console.error('Dom.pause() is not implemented anymore.');
301
305
  };
302
306
 
307
+ /**
308
+ * @deprecated not implemented anymore
309
+ */
303
310
  // @ts-ignore
304
- PicoDomEvent.prototype.unpause = function () {
311
+ PicoDomEvent.prototype.unpause = function() : void {
305
312
  console.error('Dom.unpause() is not implemented anymore.');
306
313
  };
307
314
 
@@ -1,4 +1,4 @@
1
- import { Arr, Mix, Obj, Dom } from "../index.esm.ts";
1
+ import { Arr, Mix, Dom } from "../index.esm.ts";
2
2
  import { PicoDomInterface, PicoDom } from "../utils/Dom.ts";
3
3
 
4
4
  export interface PicoDomFinder extends PicoDomInterface
@@ -610,32 +610,47 @@ export class PicoDomFinder
610
610
 
611
611
  }
612
612
 
613
+ /**
614
+ * @deprecated use Dom.above instead
615
+ */
613
616
  // @ts-ignore
614
- PicoDomFinder.prototype.isParent = function (...args : Parameters<typeof PicoDomFinder.prototype.above>) {
617
+ PicoDomFinder.prototype.isParent = function(...args : Parameters<typeof PicoDomFinder.prototype.above>) : any {
615
618
  console.warn('Dom.isParent() is deprecated, use Dom.above() instead.');
616
619
  return this.above(...args);
617
620
  };
618
621
 
622
+ /**
623
+ * @deprecated use Dom.prev instead
624
+ */
619
625
  // @ts-ignore
620
- PicoDomFinder.prototype.previous = function () {
626
+ PicoDomFinder.prototype.previous = function() : any {
621
627
  console.warn('Dom.previous() is deprecated, use Dom.prev() instead.');
622
628
  return this.prev();
623
629
  };
624
630
 
631
+ /**
632
+ * @deprecated use Dom.filter instead
633
+ */
625
634
  // @ts-ignore
626
- PicoDomFinder.prototype.where = function (...args : Parameters<typeof PicoDomFinder.prototype.filter>) {
635
+ PicoDomFinder.prototype.where = function(...args : Parameters<typeof PicoDomFinder.prototype.filter>) : any {
627
636
  console.warn('Dom.where() is deprecated, use Dom.filter() instead.');
628
637
  return this.filter(...args);
629
638
  };
630
639
 
640
+ /**
641
+ * @deprecated use Dom.except instead
642
+ */
631
643
  // @ts-ignore
632
- PicoDomFinder.prototype.not = function (...args : Parameters<typeof PicoDomFinder.prototype.except>) {
644
+ PicoDomFinder.prototype.not = function(...args : Parameters<typeof PicoDomFinder.prototype.except>) : any {
633
645
  console.warn('Dom.not() is deprecated, use Dom.except() instead.');
634
646
  return this.except(...args);
635
647
  };
636
648
 
649
+ /**
650
+ * @deprecated not implemented anymore
651
+ */
637
652
  // @ts-ignore
638
- PicoDomFinder.prototype.getNot = () => {
653
+ PicoDomFinder.prototype.getNot = function() : void {
639
654
  console.error('Dom.getNot() is not implemented anymore.');
640
655
  };
641
656
 
@@ -168,11 +168,15 @@ export class PicoDomGlobal
168
168
 
169
169
  return <PicoDom> <unknown> this;
170
170
  }
171
- }
171
+ /**
172
+ * @deprecated not implemented anymore
173
+ */
174
+ // @ts-ignore
175
+ static required() : void
176
+ {
177
+ console.error('Dom.required() is not implemented anymore.');
178
+ }
172
179
 
173
- // @ts-ignore
174
- PicoDomGlobal.required = () => {
175
- console.error('Dom.required() is not implemented anymore.');
176
180
  }
177
181
 
178
182
  export default PicoDomGlobal;
@@ -37,6 +37,7 @@ export class PicoDomMeta
37
37
 
38
38
  return <PicoDom> <unknown> this;
39
39
  }
40
+
40
41
  }
41
42
 
42
43
  // @ts-ignore
@@ -1,4 +1,3 @@
1
- import { Arr, Mix, Obj, Dom } from "../index.esm.ts";
2
1
  import { PicoDom, PicoDomInterface } from "../utils/Dom.ts";
3
2
 
4
3
  export interface PicoDomObserver extends PicoDomInterface
@@ -14,6 +14,16 @@ export interface PicoDomPopover extends PicoDomInterface,
14
14
  export class PicoDomPopover
15
15
  {
16
16
 
17
+ /**
18
+ * Calculate popover position
19
+ *
20
+ * @example Dom.find(".popover").popover(".target", "bottom-center")
21
+ *
22
+ * @param {any} target Target element
23
+ * @param {string} [position] Popover position
24
+ * @param {any} [options] Popover options
25
+ * @returns {any} Position result
26
+ */
17
27
  popover(target : any, position : string = 'botttom-center', options : any = {}) : any
18
28
  {
19
29
  if ( /^(top|bottom)-/.test(position) ) {
@@ -25,6 +35,16 @@ export class PicoDomPopover
25
35
  }
26
36
  }
27
37
 
38
+ /**
39
+ * Calculate vertical popover position
40
+ *
41
+ * @example Dom.find(".popover").popoverY(".target", "bottom-center")
42
+ *
43
+ * @param {any} target Target element
44
+ * @param {string} [position] Popover position
45
+ * @param {any} [options] Popover options
46
+ * @returns {any} Position result
47
+ */
28
48
  popoverY(target : any, position : string = 'bottom-center', options : any = {}) : any
29
49
  {
30
50
  target = Dom.find(target);
@@ -120,6 +140,16 @@ export class PicoDomPopover
120
140
  return { ...result, position };
121
141
  }
122
142
 
143
+ /**
144
+ * Calculate horizontal popover position
145
+ *
146
+ * @example Dom.find(".popover").popoverX(".target", "left-center")
147
+ *
148
+ * @param {any} target Target element
149
+ * @param {string} [position] Popover position
150
+ * @param {any} [options] Popover options
151
+ * @returns {any} Position result
152
+ */
123
153
  popoverX(target : any, position : string = 'left-center', options : any = {}) : any
124
154
  {
125
155
  target = Dom.find(target);
@@ -199,6 +229,15 @@ export class PicoDomPopover
199
229
  return { ...result, position };
200
230
  }
201
231
 
232
+ /**
233
+ * Normalize popover position
234
+ *
235
+ * @param {any} offset Current offset
236
+ * @param {any} self Popover size
237
+ * @param {any} rect Target rect
238
+ * @param {any} win Window size
239
+ * @returns {any} Normalized position
240
+ */
202
241
  popoverNormalize(offset : any, self : any, rect : any, win : any)
203
242
  {
204
243
  const scroll = Dom.find(document.body).scroll();
@@ -32,6 +32,14 @@ export class PicoDomRectangle
32
32
  return Mix.num(value, 0);
33
33
  }
34
34
 
35
+ /**
36
+ * Get bounding rectangle
37
+ *
38
+ * @example Dom.find("div").rect()
39
+ *
40
+ * @param {any} [fallback] Fallback value
41
+ * @returns {any} Rect object
42
+ */
35
43
  rect(fallback : any = { left: 0, top: 0, width: 0, height: 0 })
36
44
  {
37
45
  if ( !this.el.getBoundingClientRect ) {
@@ -1,5 +1,4 @@
1
- import { Mix, Obj, Num } from "../index.esm.ts";
2
- import { PicoFormat } from "../utils/Format.ts";
1
+ import { Mix, Num } from "../index.esm.ts";
3
2
 
4
3
  export const FILE_UNITS = [
5
4
  'B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'
@@ -1,5 +1,4 @@
1
1
  import { Arr, For, Mix, Obj } from "../index.esm.ts";
2
- import { PicoFormat } from "../utils/Format.ts";
3
2
 
4
3
  export const OPTION_REGEX = {
5
4
  entry: /(^|;)(\s*(?<key>.*?)\s*:\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=;|$)/g
@@ -1,5 +1,4 @@
1
1
  import { Arr, Mix, Obj, For } from "../index.esm.ts";
2
- import { PicoFormat } from "../utils/Format.ts";
3
2
 
4
3
  export const PARAM_REGEX = {
5
4
  entry: /(?<=^|&|\?)(\s*(?<key>.*?)\s*=\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=&|$)/g
@@ -401,100 +401,148 @@ export class PicoNowDefault
401
401
 
402
402
  }
403
403
 
404
+ /**
405
+ * @deprecated use Now.add instead
406
+ */
404
407
  // @ts-ignore
405
- PicoNowDefault.prototype.addSecond = function (value : any) {
408
+ PicoNowDefault.prototype.addSecond = function(value : any) : PicoNow {
406
409
  console.warn('Now.addSecond() is deprecated, use Now.add(value, \'second\') instead.');
407
410
  return this.add(value, 'second');
408
- }
411
+ };
409
412
 
413
+ /**
414
+ * @deprecated use Now.sub instead
415
+ */
410
416
  // @ts-ignore
411
- PicoNowDefault.prototype.subSecond = function (value : any) {
417
+ PicoNowDefault.prototype.subSecond = function(value : any) : PicoNow {
412
418
  console.warn('Now.subSecond() is deprecated, use Now.sub(value, \'second\') instead.');
413
419
  return this.sub(value, 'second');
414
- }
420
+ };
415
421
 
422
+ /**
423
+ * @deprecated use Now.add instead
424
+ */
416
425
  // @ts-ignore
417
- PicoNowDefault.prototype.addMinute = function (value : any) {
426
+ PicoNowDefault.prototype.addMinute = function(value : any) : PicoNow {
418
427
  console.warn('Now.addMinute() is deprecated, use Now.add(value, \'minute\') instead.');
419
428
  return this.add(value, 'minute');
420
- }
429
+ };
421
430
 
431
+ /**
432
+ * @deprecated use Now.sub instead
433
+ */
422
434
  // @ts-ignore
423
- PicoNowDefault.prototype.subMinute = function (value : any) {
435
+ PicoNowDefault.prototype.subMinute = function(value : any) : PicoNow {
424
436
  console.warn('Now.subMinute() is deprecated, use Now.sub(value, \'minute\') instead.');
425
437
  return this.sub(value, 'minute');
426
- }
438
+ };
427
439
 
440
+ /**
441
+ * @deprecated use Now.add instead
442
+ */
428
443
  // @ts-ignore
429
- PicoNowDefault.prototype.addHour = function (value : any) {
444
+ PicoNowDefault.prototype.addHour = function(value : any) : PicoNow {
430
445
  console.warn('Now.addHour() is deprecated, use Now.add(value, \'hour\') instead.');
431
446
  return this.add(value, 'hour');
432
- }
447
+ };
433
448
 
449
+ /**
450
+ * @deprecated use Now.sub instead
451
+ */
434
452
  // @ts-ignore
435
- PicoNowDefault.prototype.subHour = function (value : any) {
453
+ PicoNowDefault.prototype.subHour = function(value : any) : PicoNow {
436
454
  console.warn('Now.subHour() is deprecated, use Now.sub(value, \'hour\') instead.');
437
455
  return this.sub(value, 'hour');
438
- }
456
+ };
439
457
 
458
+ /**
459
+ * @deprecated use Now.add instead
460
+ */
440
461
  // @ts-ignore
441
- PicoNowDefault.prototype.addDates = function (value : any) {
462
+ PicoNowDefault.prototype.addDates = function(value : any) : PicoNow {
442
463
  console.warn('Now.addDates() is deprecated, use Now.add(value, \'date\') instead.');
443
464
  return this.add(value, 'date');
444
- }
465
+ };
445
466
 
467
+ /**
468
+ * @deprecated use Now.sub instead
469
+ */
446
470
  // @ts-ignore
447
- PicoNowDefault.prototype.subDates = function (value : any) {
471
+ PicoNowDefault.prototype.subDates = function(value : any) : PicoNow {
448
472
  console.warn('Now.subDates() is deprecated, use Now.sub(value, \'date\') instead.');
449
473
  return this.sub(value, 'date');
450
- }
474
+ };
451
475
 
476
+ /**
477
+ * @deprecated use Now.add instead
478
+ */
452
479
  // @ts-ignore
453
- PicoNowDefault.prototype.addMonths = function (value : any) {
480
+ PicoNowDefault.prototype.addMonths = function(value : any) : PicoNow {
454
481
  console.warn('Now.addMonths() is deprecated, use Now.add(value, \'month\') instead.');
455
482
  return this.add(value, 'month');
456
- }
483
+ };
457
484
 
485
+ /**
486
+ * @deprecated use Now.sub instead
487
+ */
458
488
  // @ts-ignore
459
- PicoNowDefault.prototype.subMonths = function (value : any) {
489
+ PicoNowDefault.prototype.subMonths = function(value : any) : PicoNow {
460
490
  console.warn('Now.subMonths() is deprecated, use Now.sub(value, \'month\') instead.');
461
491
  return this.sub(value, 'month');
462
- }
492
+ };
463
493
 
494
+ /**
495
+ * @deprecated use Now.add instead
496
+ */
464
497
  // @ts-ignore
465
- PicoNowDefault.prototype.addYears = function (value : any) {
498
+ PicoNowDefault.prototype.addYears = function(value : any) : PicoNow {
466
499
  console.warn('Now.addYears() is deprecated, use Now.add(value, \'year\') instead.');
467
500
  return this.add(value, 'year');
468
- }
501
+ };
469
502
 
503
+ /**
504
+ * @deprecated use Now.sub instead
505
+ */
470
506
  // @ts-ignore
471
- PicoNowDefault.prototype.subYears = function (value : any) {
507
+ PicoNowDefault.prototype.subYears = function(value : any) : PicoNow {
472
508
  console.warn('Now.subYears() is deprecated, use Now.sub(value, \'year\') instead.');
473
509
  return this.sub(value, 'year');
474
- }
510
+ };
475
511
 
512
+ /**
513
+ * @deprecated use Now.add instead
514
+ */
476
515
  // @ts-ignore
477
- PicoNowDefault.prototype.addDecades = function (value : any) {
516
+ PicoNowDefault.prototype.addDecades = function(value : any) : PicoNow {
478
517
  console.warn('Now.addDecades() is deprecated, use Now.grid(10 * value, \'year\') instead.');
479
518
  return this.add(10 * value, 'year');
480
- }
519
+ };
481
520
 
521
+ /**
522
+ * @deprecated use Now.sub instead
523
+ */
482
524
  // @ts-ignore
483
- PicoNowDefault.prototype.subDecades = function (value : any) {
525
+ PicoNowDefault.prototype.subDecades = function(value : any) : PicoNow {
484
526
  console.warn('Now.subDecades() is deprecated, use Now.grid(10 * value, \'year\') instead.');
485
527
  return this.sub(10 * value, 'year');
486
- }
528
+ };
487
529
 
530
+ /**
531
+ * @deprecated use Now.day instead
532
+ */
488
533
  // @ts-ignore
489
- PicoNowDefault.prototype.humanDay = function () {
534
+ PicoNowDefault.prototype.humanDay = function() : number {
490
535
  console.warn('Now.humanDay() is deprecated, use Now.day() instead.');
491
536
  return this.day();
492
- }
537
+ };
493
538
 
539
+ /**
540
+ * @deprecated use Now.month instead
541
+ */
494
542
  // @ts-ignore
495
- PicoNowDefault.prototype.humanMonth = function () {
543
+ PicoNowDefault.prototype.humanMonth = function() : number {
496
544
  console.warn('Now.humanMonth() is deprecated, use Now.month() instead.');
497
545
  return this.month();
498
- }
546
+ };
499
547
 
500
548
  export default PicoNowDefault;
@@ -197,40 +197,58 @@ export class PicoNowGrid
197
197
 
198
198
  }
199
199
 
200
+ /**
201
+ * @deprecated use Now.grid instead
202
+ */
200
203
  // @ts-ignore
201
- PicoNowGrid.prototype.getYears = function () {
204
+ PicoNowGrid.prototype.getYears = function() : Array<PicoNowInterface> {
202
205
  console.warn('Now.getYears() is deprecated, use Now.grid(\'years\') instead.');
203
206
  return this.grid('years');
204
- }
207
+ };
205
208
 
209
+ /**
210
+ * @deprecated use Now.grid instead
211
+ */
206
212
  // @ts-ignore
207
- PicoNowGrid.prototype.getMonths = function () {
213
+ PicoNowGrid.prototype.getMonths = function() : Array<PicoNowInterface> {
208
214
  console.warn('Now.getMonths() is deprecated, use Now.grid(\'months\') instead.');
209
215
  return this.grid('months');
210
- }
216
+ };
211
217
 
218
+ /**
219
+ * @deprecated use Now.grid instead
220
+ */
212
221
  // @ts-ignore
213
- PicoNowGrid.prototype.getDates = function () {
222
+ PicoNowGrid.prototype.getDates = function() : Array<PicoNowInterface> {
214
223
  console.warn('Now.getDates() is deprecated, use Now.grid(\'dates\') instead.');
215
224
  return this.grid('dates');
216
- }
225
+ };
217
226
 
227
+ /**
228
+ * @deprecated use Now.grid instead
229
+ */
218
230
  // @ts-ignore
219
- PicoNowGrid.prototype.getHours = function () {
231
+ PicoNowGrid.prototype.getHours = function() : Array<PicoNowInterface> {
220
232
  console.warn('Now.getHours() is deprecated, use Now.grid(\'hours\') instead.');
221
233
  return this.grid('hours');
222
- }
234
+ };
223
235
 
236
+ /**
237
+ * @deprecated use Now.grid instead
238
+ */
224
239
  // @ts-ignore
225
- PicoNowGrid.prototype.getMinutes = function () {
240
+ PicoNowGrid.prototype.getMinutes = function() : Array<PicoNowInterface> {
226
241
  console.warn('Now.getMinutes() is deprecated, use Now.grid(\'minutes\') instead.');
227
242
  return this.grid('minutes');
228
- }
243
+ };
229
244
 
245
+ /**
246
+ * @deprecated use Now.grid instead
247
+ */
230
248
  // @ts-ignore
231
- PicoNowGrid.prototype.getSeconds = function () {
249
+ PicoNowGrid.prototype.getSeconds = function() : Array<PicoNowInterface> {
232
250
  console.warn('Now.getSeconds() is deprecated, use Now.grid(\'seconds\') instead.');
233
251
  return this.grid('seconds');
234
- }
252
+ };
235
253
 
236
254
  export default PicoNowGrid;
@@ -1,4 +1,4 @@
1
- import { Mix, Now, Obj } from "../index.esm.ts";
1
+ import { Now } from "../index.esm.ts";
2
2
  import { PicoNow, PicoNowInterface } from "../utils/Now.ts";
3
3
  import PicoNowFormat from "./NowFormat.js";
4
4
 
@@ -54,10 +54,13 @@ export class PicoNowRange
54
54
 
55
55
  }
56
56
 
57
+ /**
58
+ * @deprecated use Now.range instead
59
+ */
57
60
  // @ts-ignore
58
- PicoNowRange.prototype.getDatesRange = function (...args:Parameters<typeof PicoNowRange.range>) {
61
+ PicoNowRange.prototype.getDatesRange = function(...args:Parameters<typeof PicoNowRange.prototype.range>) : Array<PicoNow> {
59
62
  console.warn('Now.getDatesRange() is deprecated, use Now.range() instead.');
60
63
  return this.range(...args);
61
- }
64
+ };
62
65
 
63
66
  export default PicoNowRange;
@@ -1,4 +1,3 @@
1
- import { Mix, Now, Obj } from "../index.esm.ts";
2
1
  import { PicoNow, PicoNowInterface } from "../utils/Now.ts";
3
2
  import PicoNowDefault from "./NowDefault.js";
4
3
 
package/src/tool/scope.ts CHANGED
@@ -105,6 +105,12 @@ export function device() : void
105
105
  scope.piudv = result;
106
106
  }
107
107
 
108
+ /**
109
+ * Trait multiple classes
110
+ *
111
+ * @param {any[]} values Class array
112
+ * @returns {any} Traited class
113
+ */
108
114
  export function trait(values : any[]) {
109
115
 
110
116
  const traited : any = values[0];