@kizmann/pico-js 2.0.8 → 2.0.10

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 (97) 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 +4 -6
  6. package/src/dom/{DomAttribute.js → DomAttribute.ts} +40 -63
  7. package/src/dom/{DomBuilder.js → DomBuilder.ts} +27 -44
  8. package/src/dom/{DomEvent.js → DomEvent.ts} +74 -78
  9. package/src/dom/{DomFinder.js → DomFinder.ts} +89 -129
  10. package/src/dom/DomForm.ts +38 -0
  11. package/src/dom/{DomGlobal.js → DomGlobal.ts} +34 -51
  12. package/src/dom/{DomInview.js → DomInview.ts} +37 -57
  13. package/src/dom/DomMeta.ts +48 -0
  14. package/src/dom/DomObserver.ts +17 -0
  15. package/src/dom/{DomPopover.js → DomPopover.ts} +20 -39
  16. package/src/dom/{DomRectangle.js → DomRectangle.ts} +67 -88
  17. package/src/format/{FormatFile.js → FormatFile.ts} +12 -23
  18. package/src/format/{FormatOption.js → FormatOption.ts} +15 -24
  19. package/src/format/{FormatParam.js → FormatParam.ts} +14 -25
  20. package/src/format/{FormatParser.js → FormatParser.ts} +29 -39
  21. package/src/format/{FormatUrl.js → FormatUrl.ts} +9 -21
  22. package/src/index.browser.ts +32 -0
  23. package/src/index.esm.ts +64 -0
  24. package/src/now/{NowDefault.js → NowDefault.ts} +86 -121
  25. package/src/now/{NowFormat.js → NowFormat.ts} +23 -28
  26. package/src/now/{NowGrid.js → NowGrid.ts} +41 -58
  27. package/src/now/{NowHuman.js → NowHuman.ts} +18 -27
  28. package/src/now/{NowMatch.js → NowMatch.ts} +22 -28
  29. package/src/now/{NowRange.js → NowRange.ts} +13 -22
  30. package/src/now/{NowWalker.js → NowWalker.ts} +65 -71
  31. package/src/tool/{scope.js → scope.ts} +41 -11
  32. package/src/utils/{Array.js → Array.ts} +146 -160
  33. package/src/utils/{Cookie.js → Cookie.ts} +15 -12
  34. package/src/utils/{Data.js → Data.ts} +17 -17
  35. package/src/utils/Dom.ts +204 -0
  36. package/src/utils/Format.ts +48 -0
  37. package/src/utils/{Hash.js → Hash.ts} +20 -20
  38. package/src/utils/{Locale.js → Locale.ts} +22 -22
  39. package/src/utils/{Mixed.js → Mixed.ts} +70 -58
  40. package/src/utils/{Now.js → Now.ts} +68 -69
  41. package/src/utils/{Number.js → Number.ts} +34 -36
  42. package/src/utils/{Object.js → Object.ts} +68 -122
  43. package/src/utils/{Route.js → Route.ts} +11 -9
  44. package/src/utils/{Runner.js → Runner.ts} +65 -47
  45. package/src/utils/{Signal.js → Signal.ts} +35 -22
  46. package/src/utils/{String.js → String.ts} +79 -69
  47. package/src/wip/{Element.js → Element.ts} +2 -2
  48. package/src/wip/{Map.js → Map.ts} +131 -101
  49. package/types/dom/DomAttribute.d.ts +16 -27
  50. package/types/dom/DomBuilder.d.ts +6 -9
  51. package/types/dom/DomEvent.d.ts +19 -25
  52. package/types/dom/DomFinder.d.ts +35 -58
  53. package/types/dom/DomForm.d.ts +7 -10
  54. package/types/dom/DomGlobal.d.ts +8 -15
  55. package/types/dom/DomInview.d.ts +9 -19
  56. package/types/dom/DomMeta.d.ts +9 -16
  57. package/types/dom/DomObserver.d.ts +4 -8
  58. package/types/dom/DomPopover.d.ts +8 -11
  59. package/types/dom/DomRectangle.d.ts +21 -40
  60. package/types/format/FormatFile.d.ts +5 -8
  61. package/types/format/FormatOption.d.ts +6 -8
  62. package/types/format/FormatParam.d.ts +6 -9
  63. package/types/format/FormatParser.d.ts +10 -18
  64. package/types/format/FormatUrl.d.ts +5 -8
  65. package/types/index.esm.d.ts +25 -37
  66. package/types/now/NowDefault.d.ts +30 -99
  67. package/types/now/NowFormat.d.ts +8 -21
  68. package/types/now/NowGrid.d.ts +24 -46
  69. package/types/now/NowHuman.d.ts +10 -11
  70. package/types/now/NowMatch.d.ts +6 -4
  71. package/types/now/NowRange.d.ts +5 -8
  72. package/types/now/NowWalker.d.ts +6 -4
  73. package/types/tool/scope.d.ts +11 -3
  74. package/types/utils/Array.d.ts +83 -104
  75. package/types/utils/Cookie.d.ts +11 -8
  76. package/types/utils/Data.d.ts +7 -7
  77. package/types/utils/Dom.d.ts +63 -96
  78. package/types/utils/Format.d.ts +15 -28
  79. package/types/utils/Hash.d.ts +21 -21
  80. package/types/utils/Locale.d.ts +10 -10
  81. package/types/utils/Mixed.d.ts +18 -32
  82. package/types/utils/Now.d.ts +51 -56
  83. package/types/utils/Number.d.ts +9 -20
  84. package/types/utils/Object.d.ts +21 -36
  85. package/types/utils/Route.d.ts +5 -2
  86. package/types/utils/Runner.d.ts +41 -24
  87. package/types/utils/Signal.d.ts +16 -16
  88. package/types/utils/String.d.ts +40 -76
  89. package/src/dom/DomForm.js +0 -59
  90. package/src/dom/DomMeta.js +0 -68
  91. package/src/dom/DomObserver.js +0 -38
  92. package/src/index.browser.js +0 -36
  93. package/src/index.esm.js +0 -80
  94. package/src/utils/Dom.js +0 -214
  95. package/src/utils/Format.js +0 -62
  96. package/types/wip/Element.d.ts +0 -119
  97. package/types/wip/Map.d.ts +0 -254
@@ -1,108 +1,86 @@
1
+ import { PicoNowInterface } from "../utils/Now.ts";
2
+ import PicoNowWalker from "./NowWalker.js";
3
+ export interface PicoNowGrid extends PicoNowInterface, PicoNowWalker {
4
+ }
1
5
  /**
2
6
  * @memberof PicoNow
3
- * @extends {PicoNow}
4
7
  */
5
- export class PicoNowGridInstance {
8
+ export declare class PicoNowGrid {
6
9
  /**
7
10
  * Get grid of dates by scope
8
11
  *
9
12
  * @example Now.grid("month") // => [Now, Now, ...]
10
13
  *
11
14
  * @param {string} [scope] Grid scope
12
- * @returns {Array<PicoNow>} Array of dates
15
+ * @returns {Array<PicoNowInterface>} Array of dates
13
16
  */
14
- grid(scope?: string): Array<PicoNow>;
17
+ grid(scope?: string): Array<PicoNowInterface>;
15
18
  /**
16
19
  * Get seconds grid
17
20
  *
18
21
  * @example Now.getSecondsGrid(10)
19
22
  *
20
23
  * @param {number} [interval] Step interval
21
- * @returns {Array<PicoNow>} Array of dates
24
+ * @returns {Array<PicoNowInterface>} Array of dates
22
25
  */
23
- getSecondsGrid(interval?: number): Array<PicoNow>;
26
+ getSecondsGrid(interval?: number): Array<PicoNowInterface>;
24
27
  /**
25
28
  * Get minutes grid
26
29
  *
27
30
  * @example Now.getMinutesGrid(10)
28
31
  *
29
32
  * @param {number} [interval] Step interval
30
- * @returns {Array<PicoNow>} Array of dates
33
+ * @returns {Array<PicoNowInterface>} Array of dates
31
34
  */
32
- getMinutesGrid(interval?: number): Array<PicoNow>;
35
+ getMinutesGrid(interval?: number): Array<PicoNowInterface>;
33
36
  /**
34
37
  * Get hours grid
35
38
  *
36
39
  * @example Now.getHoursGrid(2)
37
40
  *
38
41
  * @param {number} [interval] Step interval
39
- * @returns {Array<PicoNow>} Array of dates
42
+ * @returns {Array<PicoNowInterface>} Array of dates
40
43
  */
41
- getHoursGrid(interval?: number): Array<PicoNow>;
44
+ getHoursGrid(interval?: number): Array<PicoNowInterface>;
42
45
  /**
43
46
  * Get days grid
44
47
  *
45
48
  * @example Now.getDaysGrid()
46
49
  *
47
- * @returns {Array<PicoNow>} Array of dates
50
+ * @returns {Array<PicoNowInterface>} Array of dates
48
51
  */
49
- getDaysGrid(): Array<PicoNow>;
52
+ getDaysGrid(): Array<PicoNowInterface>;
50
53
  /**
51
54
  * Get dates grid
52
55
  *
53
56
  * @example Now.getDatesGrid()
54
57
  *
55
- * @returns {Array<PicoNow>} Array of dates
58
+ * @returns {Array<PicoNowInterface>} Array of dates
56
59
  */
57
- getDatesGrid(): Array<PicoNow>;
60
+ getDatesGrid(): Array<PicoNowInterface>;
58
61
  /**
59
62
  * Get months grid
60
63
  *
61
64
  * @example Now.getMonthsGrid()
62
65
  *
63
- * @returns {Array<PicoNow>} Array of dates
66
+ * @returns {Array<PicoNowInterface>} Array of dates
64
67
  */
65
- getMonthsGrid(): Array<PicoNow>;
68
+ getMonthsGrid(): Array<PicoNowInterface>;
66
69
  /**
67
70
  * Get years grid
68
71
  *
69
72
  * @example Now.getYearsGrid()
70
73
  *
71
- * @returns {Array<PicoNow>} Array of dates
74
+ * @returns {Array<PicoNowInterface>} Array of dates
72
75
  */
73
- getYearsGrid(): Array<PicoNow>;
76
+ getYearsGrid(): Array<PicoNowInterface>;
74
77
  /**
75
78
  * Get decades grid
76
79
  *
77
80
  * @example Now.getDecadesGrid()
78
81
  *
79
- * @returns {Array<PicoNow>} Array of dates
80
- */
81
- getDecadesGrid(): Array<PicoNow>;
82
- /**
83
- * @see PicoNow.grid
84
- */
85
- getYears(): PicoNow[];
86
- /**
87
- * @see PicoNow.grid
88
- */
89
- getMonths(): PicoNow[];
90
- /**
91
- * @see PicoNow.grid
92
- */
93
- getDates(): PicoNow[];
94
- /**
95
- * @see PicoNow.grid
96
- */
97
- getHours(): PicoNow[];
98
- /**
99
- * @see PicoNow.grid
100
- */
101
- getMinutes(): PicoNow[];
102
- /**
103
- * @see PicoNow.grid
82
+ * @returns {Array<PicoNowInterface>} Array of dates
104
83
  */
105
- getSeconds(): PicoNow[];
84
+ getDecadesGrid(): Array<PicoNowInterface>;
106
85
  }
107
- export function PicoNowGridPlugin(self: typeof PicoNow): typeof PicoNow;
108
- import { PicoNow } from "../utils/Now.js";
86
+ export default PicoNowGrid;
@@ -1,10 +1,10 @@
1
- export const NOW_HUMAN_DAYS: string[];
2
- export const NOW_HUMAN_MONTHS: string[];
3
- /**
4
- * @memberof PicoNow
5
- * @extends {PicoNow}
6
- */
7
- export class PicoNowHumanInstance {
1
+ import { PicoNowInterface } from "../utils/Now.ts";
2
+ import PicoNowDefault from "./NowDefault.js";
3
+ export declare const NOW_HUMAN_DAYS: string[];
4
+ export declare const NOW_HUMAN_MONTHS: string[];
5
+ export interface PicoNowHuman extends PicoNowInterface, PicoNowDefault {
6
+ }
7
+ export declare class PicoNowHuman {
8
8
  /**
9
9
  * Get human readable value
10
10
  *
@@ -12,9 +12,9 @@ export class PicoNowHumanInstance {
12
12
  *
13
13
  * @param {string} [scope] Value scope
14
14
  * @param {number} [substr] Substring length
15
- * @returns {string|number} Human value
15
+ * @returns {any} Human value
16
16
  */
17
- human(scope?: string, substr?: number): string | number;
17
+ human(scope?: string, substr?: number): any;
18
18
  /**
19
19
  * Get human readable day
20
20
  *
@@ -34,5 +34,4 @@ export class PicoNowHumanInstance {
34
34
  */
35
35
  getHumanMonth(substr?: number): string;
36
36
  }
37
- export function PicoNowHumanPlugin(self: typeof PicoNow): typeof PicoNow;
38
- import { PicoNow } from "../utils/Now.js";
37
+ export default PicoNowHuman;
@@ -1,8 +1,11 @@
1
+ import { PicoNowInterface } from "../utils/Now.ts";
2
+ import PicoNowFormat from "./NowFormat.js";
3
+ export interface PicoNowMatch extends PicoNowInterface, PicoNowFormat {
4
+ }
1
5
  /**
2
6
  * @memberof PicoNow
3
- * @extends {PicoNow}
4
7
  */
5
- export class PicoNowMatchInstance {
8
+ export declare class PicoNowMatch {
6
9
  /**
7
10
  * Check if date is before value
8
11
  *
@@ -105,5 +108,4 @@ export class PicoNowMatchInstance {
105
108
  */
106
109
  between(start?: any, end?: any, format?: string): boolean;
107
110
  }
108
- export function PicoNowMatchPlugin(self: typeof PicoNow): typeof PicoNow;
109
- import { PicoNow } from "../utils/Now.js";
111
+ export default PicoNowMatch;
@@ -1,8 +1,10 @@
1
+ import { PicoNow, PicoNowInterface } from "../utils/Now.ts";
2
+ export interface PicoNowRange extends PicoNowInterface {
3
+ }
1
4
  /**
2
5
  * @memberof PicoNow
3
- * @extends {PicoNow}
4
6
  */
5
- export class PicoNowRangeInstance {
7
+ export declare class PicoNowRange {
6
8
  /**
7
9
  * Get range of dates
8
10
  *
@@ -13,10 +15,5 @@ export class PicoNowRangeInstance {
13
15
  * @returns {Array<PicoNow>} Array of dates
14
16
  */
15
17
  range(value?: any, scope?: string): Array<PicoNow>;
16
- /**
17
- * @see PicoNow.range
18
- */
19
- getDatesRange(...args: any[]): PicoNow[];
20
18
  }
21
- export function PicoNowRangePlugin(self: typeof PicoNow): typeof PicoNow;
22
- import { PicoNow } from "../utils/Now.js";
19
+ export default PicoNowRange;
@@ -1,8 +1,11 @@
1
+ import { PicoNow, PicoNowInterface } from "../utils/Now.ts";
2
+ import PicoNowDefault from "./NowDefault.js";
3
+ export interface PicoNowWalker extends PicoNowInterface, PicoNowDefault {
4
+ }
1
5
  /**
2
6
  * @memberof PicoNow
3
- * @extends {PicoNow}
4
7
  */
5
- export class PicoNowWalkerInstance {
8
+ export declare class PicoNowWalker {
6
9
  /**
7
10
  * Get previous date by scope
8
11
  *
@@ -298,5 +301,4 @@ export class PicoNowWalkerInstance {
298
301
  */
299
302
  lastDecade(): PicoNow;
300
303
  }
301
- export function PicoNowWalkerPlugin(self: typeof PicoNow): typeof PicoNow;
302
- import { PicoNow } from "../utils/Now.js";
304
+ export default PicoNowWalker;
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * @returns {any} Global scope obj
7
7
  */
8
- export function go(): any;
8
+ export declare function go(): any;
9
9
  /**
10
10
  * Detect browser from userAgent
11
11
  *
@@ -13,7 +13,7 @@ export function go(): any;
13
13
  *
14
14
  * @returns {void} No return value
15
15
  */
16
- export function browser(): void;
16
+ export declare function browser(): void;
17
17
  /**
18
18
  * Detect device OS from userAgent
19
19
  *
@@ -21,4 +21,12 @@ export function browser(): void;
21
21
  *
22
22
  * @returns {void} No return value
23
23
  */
24
- export function device(): void;
24
+ export declare function device(): void;
25
+ export declare function trait(values: any[]): any;
26
+ declare const _default: {
27
+ go: typeof go;
28
+ browser: typeof browser;
29
+ device: typeof device;
30
+ trait: typeof trait;
31
+ };
32
+ export default _default;