@kizmann/pico-js 2.0.7 → 2.0.9

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} +101 -76
  9. package/src/dom/{DomFinder.js → DomFinder.ts} +103 -139
  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} +70 -87
  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} +187 -152
  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} +21 -21
  39. package/src/utils/{Mixed.js → Mixed.ts} +104 -61
  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} +89 -77
  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} +1 -1
  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 -24
  52. package/types/dom/DomFinder.d.ts +38 -61
  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 -35
  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 -101
  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 +9 -9
  81. package/types/utils/Mixed.d.ts +19 -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 +45 -38
  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,9 +1,7 @@
1
- export const FILE_UNITS: string[];
2
- /**
3
- * @memberof PicoFormat
4
- * @extends {PicoFormat}
5
- */
6
- export class PicoFormatFileStatic {
1
+ export declare const FILE_UNITS: string[];
2
+ export interface PicoFormatFile {
3
+ }
4
+ export declare class PicoFormatFile {
7
5
  /**
8
6
  * Format file size
9
7
  *
@@ -15,5 +13,4 @@ export class PicoFormatFileStatic {
15
13
  */
16
14
  static filesize(value: any, decimals?: number): string;
17
15
  }
18
- export function PicoFormatFilePlugin(self: typeof PicoFormat): typeof PicoFormat;
19
- import { PicoFormat } from "../utils/Format.js";
16
+ export default PicoFormatFile;
@@ -1,10 +1,9 @@
1
- export namespace OPTION_REGEX {
2
- let entry: RegExp;
1
+ export declare const OPTION_REGEX: {
2
+ entry: RegExp;
3
+ };
4
+ export interface PicoFormatOption {
3
5
  }
4
- /**
5
- * @memberof PicoFormat
6
- */
7
- export class PicoFormatOptionStatic {
6
+ export declare class PicoFormatOption {
8
7
  /**
9
8
  * Cast object to options string
10
9
  *
@@ -37,5 +36,4 @@ export class PicoFormatOptionStatic {
37
36
  */
38
37
  static parseOptions(value: string): any;
39
38
  }
40
- export function PicoFormatOptionPlugin(self: typeof PicoFormat): typeof PicoFormat;
41
- import { PicoFormat } from "../utils/Format.js";
39
+ export default PicoFormatOption;
@@ -1,11 +1,9 @@
1
- export namespace PARAM_REGEX {
2
- let entry: RegExp;
1
+ export declare const PARAM_REGEX: {
2
+ entry: RegExp;
3
+ };
4
+ export interface PicoFormatParam {
3
5
  }
4
- /**
5
- * @memberof PicoFormat
6
- * @extends {PicoFormat}
7
- */
8
- export class PicoFormatParamStatic {
6
+ export declare class PicoFormatParam {
9
7
  /**
10
8
  * Cast object to params string
11
9
  *
@@ -36,5 +34,4 @@ export class PicoFormatParamStatic {
36
34
  */
37
35
  static parseParams(value: string): any;
38
36
  }
39
- export function PicoFormatParamPlugin(self: typeof PicoFormat): typeof PicoFormat;
40
- import { PicoFormat } from "../utils/Format.js";
37
+ export default PicoFormatParam;
@@ -1,15 +1,8 @@
1
- export const TYPE_PARSERS: {
2
- match: (val: any) => boolean;
3
- parse: (val: any) => any;
4
- }[];
5
- export const TYPE_CASTERS: {
6
- match: (val: any) => boolean;
7
- parse: (val: any) => string;
8
- }[];
9
- /**
10
- * @memberof PicoFormat
11
- */
12
- export class PicoFormatParserStatic {
1
+ export declare const TYPE_PARSERS: any[];
2
+ export declare const TYPE_CASTERS: any[];
3
+ export interface PicoFormatParser {
4
+ }
5
+ export declare class PicoFormatParser {
13
6
  /**
14
7
  * Convert key path format
15
8
  *
@@ -27,10 +20,10 @@ export class PicoFormatParserStatic {
27
20
  *
28
21
  * @param {any} value Input value
29
22
  * @param {any} [fallback] Fallback value
30
- * @param {Array<any>} [parsers] Custom parsers
23
+ * @param {any[]} [parsers] Custom parsers
31
24
  * @returns {any} Parsed value
32
25
  */
33
- static parsed(value: any, fallback?: any, parsers?: Array<any>): any;
26
+ static parsed(value: any, fallback?: any, parsers?: any[]): any;
34
27
  /**
35
28
  * Cast value to string
36
29
  *
@@ -38,10 +31,9 @@ export class PicoFormatParserStatic {
38
31
  *
39
32
  * @param {any} value Input value
40
33
  * @param {boolean} [encode] Encode value
41
- * @param {Array<any>} [casters] Custom casters
34
+ * @param {any[]} [casters] Custom casters
42
35
  * @returns {string} Casted string
43
36
  */
44
- static casted(value: any, encode?: boolean, casters?: Array<any>): string;
37
+ static casted(value: any, encode?: boolean, casters?: any[]): string;
45
38
  }
46
- export function PicoFormatParserPlugin(self: typeof PicoFormat): typeof PicoFormat;
47
- import { PicoFormat } from "../utils/Format.js";
39
+ export default PicoFormatParser;
@@ -1,9 +1,7 @@
1
- export const SLUG_CONVERT: string[][];
2
- /**
3
- * @memberof PicoFormat
4
- * @extends {PicoFormat}
5
- */
6
- export class PicoFormatUrlStatic {
1
+ export declare const SLUG_CONVERT: any[];
2
+ export interface PicoFormatUrl {
3
+ }
4
+ export declare class PicoFormatUrl {
7
5
  /**
8
6
  * Create slug from string
9
7
  *
@@ -14,5 +12,4 @@ export class PicoFormatUrlStatic {
14
12
  */
15
13
  static slugify(value: any): string;
16
14
  }
17
- export function PicoFormatUrlPlugin(self: typeof PicoFormat): typeof PicoFormat;
18
- import { PicoFormat } from "../utils/Format.js";
15
+ export default PicoFormatUrl;
@@ -1,43 +1,31 @@
1
+ import { default as Run } from "./utils/Runner.ts";
2
+ import { default as Str } from "./utils/String.ts";
3
+ import { default as Num } from "./utils/Number.ts";
4
+ import { default as Arr } from "./utils/Array.ts";
5
+ import { default as Obj } from "./utils/Object.ts";
6
+ import { default as Mix } from "./utils/Mixed.ts";
7
+ import { default as Hash } from "./utils/Hash.ts";
8
+ import { default as Signal } from "./utils/Signal.ts";
9
+ import { default as Locale } from "./utils/Locale.ts";
10
+ import { default as Cookie } from "./utils/Cookie.ts";
11
+ import { default as Now } from "./utils/Now.ts";
12
+ import { default as Dom } from "./utils/Dom.ts";
13
+ import { default as For } from "./utils/Format.ts";
14
+ export { Dom, Now, For, Run, Str, Num, Arr, Obj, Mix, Hash, Signal, Locale, Cookie };
15
+ import { go, browser, device, trait } from "./tool/scope.ts";
16
+ export { go, browser, device, trait };
17
+ import { default as Data } from "./utils/Data.ts";
18
+ import { default as Route } from "./utils/Route.ts";
19
+ export { Route, Data };
1
20
  /**
2
- * @type {typeof PicoMixed}
21
+ * @type {Mix}
3
22
  */
4
- export const Any: typeof PicoMixed;
23
+ export declare const Any: Mix;
5
24
  /**
6
- * @type {typeof PicoMixed}
25
+ * @type {Signal}
7
26
  */
8
- export const Event: typeof PicoMixed;
9
- export function UUID(): string;
27
+ export declare const Event: Signal;
10
28
  /**
11
- * @type {typeof PicoDom}
29
+ * @returns {string}
12
30
  */
13
- export const Dom: typeof PicoDom;
14
- /**
15
- * @type {typeof PicoNow}
16
- */
17
- export const Now: typeof PicoNow;
18
- /**
19
- * @type {typeof PicoFormat}
20
- */
21
- export const For: typeof PicoFormat;
22
- import { default as Run } from "./utils/Runner.js";
23
- import { default as Str } from "./utils/String.js";
24
- import { default as Num } from "./utils/Number.js";
25
- import { default as Arr } from "./utils/Array.js";
26
- import { default as Obj } from "./utils/Object.js";
27
- import { default as Mix } from "./utils/Mixed.js";
28
- import { default as Hash } from "./utils/Hash.js";
29
- import { default as Signal } from "./utils/Signal.js";
30
- import { default as Locale } from "./utils/Locale.js";
31
- import { default as Cookie } from "./utils/Cookie.js";
32
- import { go } from "./tool/scope.js";
33
- import { browser } from "./tool/scope.js";
34
- import { device } from "./tool/scope.js";
35
- import { default as Map } from "./wip/Map.js";
36
- import { default as Data } from "./utils/Data.js";
37
- import { default as Route } from "./utils/Route.js";
38
- import { default as Element } from "./wip/Element.js";
39
- import { PicoMixed } from "./utils/Mixed.js";
40
- import { PicoDom } from "./utils/Dom.js";
41
- import { PicoNow } from "./utils/Now.js";
42
- import { PicoFormat } from "./utils/Format.js";
43
- export { Run, Str, Num, Arr, Obj, Mix, Hash, Signal, Locale, Cookie, go, browser, device, Map, Data, Route, Element };
31
+ export declare const UUID: () => string;
@@ -1,25 +1,21 @@
1
- export namespace NOW_MODIFY {
2
- let second: RegExp;
3
- let minute: RegExp;
4
- let hour: RegExp;
5
- let date: RegExp;
6
- let month: RegExp;
7
- let year: RegExp;
1
+ import { PicoNow, PicoNowInterface } from "../utils/Now.ts";
2
+ export declare const NOW_MODIFY: any;
3
+ export interface PicoNowDefault extends PicoNowInterface {
8
4
  }
9
5
  /**
10
6
  * @memberof PicoNow
11
- * @extends {PicoNow}
12
7
  */
13
- export class PicoNowDefaultInstance {
8
+ export declare class PicoNowDefault {
9
+ static test(value: any): boolean;
14
10
  /**
15
11
  * Get value by scope
16
12
  *
17
13
  * @example Now.get("year") // => 2026
18
14
  *
19
15
  * @param {string} scope Value scope
20
- * @returns {number|PicoNow} Scope value
16
+ * @returns {any} Scope value
21
17
  */
22
- get(scope: string): number | PicoNow;
18
+ get(scope: string): any;
23
19
  /**
24
20
  * Set value by scope
25
21
  *
@@ -36,72 +32,72 @@ export class PicoNowDefaultInstance {
36
32
  * @example Now.time() // => 1739334660000
37
33
  *
38
34
  * @param {any} [value] New timestamp
39
- * @returns {number|PicoNow} Timestamp or instance
35
+ * @returns {any} Timestamp or instance
40
36
  */
41
- time(value?: any): number | PicoNow;
37
+ time(value?: any): any;
42
38
  /**
43
39
  * Get or set seconds
44
40
  *
45
41
  * @example Now.second() // => 45
46
42
  *
47
43
  * @param {any} [value] New seconds
48
- * @returns {number|PicoNow} Seconds or instance
44
+ * @returns {any} Seconds or instance
49
45
  */
50
- second(value?: any): number | PicoNow;
46
+ second(value?: any): any;
51
47
  /**
52
48
  * Get or set minutes
53
49
  *
54
50
  * @example Now.minute() // => 30
55
51
  *
56
52
  * @param {any} [value] New minutes
57
- * @returns {number|PicoNow} Minutes or instance
53
+ * @returns {any} Minutes or instance
58
54
  */
59
- minute(value?: any): number | PicoNow;
55
+ minute(value?: any): any;
60
56
  /**
61
57
  * Get or set hours
62
58
  *
63
59
  * @example Now.hour() // => 12
64
60
  *
65
61
  * @param {any} [value] New hours
66
- * @returns {number|PicoNow} Hours or instance
62
+ * @returns {any} Hours or instance
67
63
  */
68
- hour(value?: any): number | PicoNow;
64
+ hour(value?: any): any;
69
65
  /**
70
66
  * Get or set day of week
71
67
  *
72
68
  * @example Now.day() // => 1
73
69
  *
74
70
  * @param {any} [value] New day
75
- * @returns {number|PicoNow} Day or instance
71
+ * @returns {any} Day or instance
76
72
  */
77
- day(value?: any): number | PicoNow;
73
+ day(value?: any): any;
78
74
  /**
79
75
  * Get or set date of month
80
76
  *
81
77
  * @example Now.date() // => 12
82
78
  *
83
79
  * @param {any} [value] New date
84
- * @returns {number|PicoNow} Date or instance
80
+ * @returns {any} Date or instance
85
81
  */
86
- date(value?: any): number | PicoNow;
82
+ date(value?: any): any;
87
83
  /**
88
84
  * Get or set month
89
85
  *
90
86
  * @example Now.month() // => 2
91
87
  *
92
88
  * @param {any} [value] New month
93
- * @returns {number|PicoNow} Month or instance
89
+ * @returns {any} Month or instance
94
90
  */
95
- month(value?: any): number | PicoNow;
91
+ month(value?: any): any;
96
92
  /**
97
93
  * Get or set year
98
94
  *
99
95
  * @example Now.year() // => 2026
100
96
  *
101
97
  * @param {any} [value] New year
102
- * @returns {number|PicoNow} Year or instance
98
+ * @returns {any} Year or instance
103
99
  */
104
- year(value?: any): number | PicoNow;
100
+ year(value?: any): any;
105
101
  /**
106
102
  * Get short year
107
103
  *
@@ -115,21 +111,21 @@ export class PicoNowDefaultInstance {
115
111
  *
116
112
  * @example Now.add(1, "day")
117
113
  *
118
- * @param {number} value Add value
114
+ * @param {any} value Add value
119
115
  * @param {string} [scope] Target scope
120
116
  * @returns {PicoNow} Current instance
121
117
  */
122
- add(value: number, scope?: string): PicoNow;
118
+ add(value: any, scope?: string): PicoNow;
123
119
  /**
124
120
  * Subtract value from scope
125
121
  *
126
122
  * @example Now.sub(1, "day")
127
123
  *
128
- * @param {number} value Sub value
124
+ * @param {any} value Sub value
129
125
  * @param {string} [scope] Target scope
130
126
  * @returns {PicoNow} Current instance
131
127
  */
132
- sub(value: number, scope?: string): PicoNow;
128
+ sub(value: any, scope?: string): PicoNow;
133
129
  /**
134
130
  * Check if string is modifiable
135
131
  *
@@ -155,10 +151,10 @@ export class PicoNowDefaultInstance {
155
151
  *
156
152
  * @param {any} value Source value
157
153
  * @param {string} [format] Source format
158
- * @param {Array<string>} [keys] Scope keys
154
+ * @param {string[]} [keys] Scope keys
159
155
  * @returns {PicoNow} Current instance
160
156
  */
161
- apply(value: any, format?: string, keys?: Array<string>): PicoNow;
157
+ apply(value: any, format?: string, keys?: string[]): PicoNow;
162
158
  /**
163
159
  * Apply date from other value
164
160
  *
@@ -179,70 +175,5 @@ export class PicoNowDefaultInstance {
179
175
  * @returns {PicoNow} Current instance
180
176
  */
181
177
  applyTime(value: any, format?: string): PicoNow;
182
- /**
183
- * @see PicoNow.add
184
- */
185
- addSecond(value: any): PicoNow;
186
- /**
187
- * @see PicoNow.sub
188
- */
189
- subSecond(value: any): PicoNow;
190
- /**
191
- * @see PicoNow.add
192
- */
193
- addMinute(value: any): PicoNow;
194
- /**
195
- * @see PicoNow.sub
196
- */
197
- subMinute(value: any): PicoNow;
198
- /**
199
- * @see PicoNow.add
200
- */
201
- addHour(value: any): PicoNow;
202
- /**
203
- * @see PicoNow.sub
204
- */
205
- subHour(value: any): PicoNow;
206
- /**
207
- * @see PicoNow.add
208
- */
209
- addDates(value: any): PicoNow;
210
- /**
211
- * @see PicoNow.sub
212
- */
213
- subDates(value: any): PicoNow;
214
- /**
215
- * @see PicoNow.add
216
- */
217
- addMonths(value: any): PicoNow;
218
- /**
219
- * @see PicoNow.sub
220
- */
221
- subMonths(value: any): PicoNow;
222
- /**
223
- * @see PicoNow.add
224
- */
225
- addYears(value: any): PicoNow;
226
- /**
227
- * @see PicoNow.sub
228
- */
229
- subYears(value: any): PicoNow;
230
- /**
231
- * @see PicoNow.add
232
- */
233
- addDecades(value: any): PicoNow;
234
- /**
235
- * @see PicoNow.sub
236
- */
237
- subDecades(value: any): PicoNow;
238
- /**
239
- * @see PicoNow.day
240
- */
241
- humanDay(): number | PicoNow;
242
- /**
243
- * @see PicoNow.month
244
- */
245
- humanMonth(): number | PicoNow;
246
178
  }
247
- export function PicoNowDefaultPlugin(self: typeof PicoNow): typeof PicoNow;
248
- import { PicoNow } from "../utils/Now.js";
179
+ export default PicoNowDefault;
@@ -1,25 +1,14 @@
1
- export namespace NOW_FORMAT {
2
- let L: string;
3
- let LL: string;
4
- let LLL: string;
5
- let LLLL: string;
6
- let LT: string;
7
- let LTS: string;
8
- let LTSD: string;
9
- }
10
- export namespace NOW_PARSE {
11
- let second: string;
12
- let minute: string;
13
- let hour: string;
14
- let date: string;
15
- let month: string;
16
- let year: string;
1
+ import { PicoNow, PicoNowInterface } from "../utils/Now.ts";
2
+ import PicoNowDefault from "./NowDefault.js";
3
+ import PicoNowHuman from "./NowHuman.js";
4
+ export declare const NOW_FORMAT: any;
5
+ export declare const NOW_PARSE: any;
6
+ export interface PicoNowFormat extends PicoNowInterface, PicoNowDefault, PicoNowHuman {
17
7
  }
18
8
  /**
19
9
  * @memberof PicoNow
20
- * @extends {PicoNow}
21
10
  */
22
- export class PicoNowFormatInstance {
11
+ export declare class PicoNowFormat {
23
12
  /**
24
13
  * Check if value matches format
25
14
  *
@@ -40,7 +29,6 @@ export class PicoNowFormatInstance {
40
29
  * @returns {PicoNow} Current instance
41
30
  */
42
31
  parse(value: any, format?: string): PicoNow;
43
- value: Date;
44
32
  /**
45
33
  * Parse date using format
46
34
  *
@@ -70,5 +58,4 @@ export class PicoNowFormatInstance {
70
58
  */
71
59
  code(format?: string): number;
72
60
  }
73
- export function PicoNowFormatPlugin(self: typeof PicoNow): typeof PicoNow;
74
- import { PicoNow } from "../utils/Now.js";
61
+ export default PicoNowFormat;
@@ -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;