@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,7 +1,12 @@
1
+ import { PicoDom, PicoDomInterface } from "../utils/Dom.ts";
2
+ import PicoDomFinder from "./DomFinder.js";
3
+ import PicoDomAttribute from "./DomAttribute.js";
4
+ export interface PicoDomRectangle extends PicoDomInterface, PicoDomFinder, PicoDomAttribute {
5
+ }
1
6
  /**
2
7
  * @memberof PicoDom
3
8
  */
4
- export class PicoDomRectangleStatic {
9
+ export declare class PicoDomRectangle {
5
10
  /**
6
11
  * Cast value to number
7
12
  *
@@ -11,18 +16,7 @@ export class PicoDomRectangleStatic {
11
16
  * @returns {number} Number value
12
17
  */
13
18
  static num(value: any): number;
14
- }
15
- /**
16
- * @memberof PicoDom
17
- * @extends {PicoDom}
18
- */
19
- export class PicoDomRectangleInstance {
20
- rect(fallback?: {
21
- left: number;
22
- top: number;
23
- width: number;
24
- height: number;
25
- }): any;
19
+ rect(fallback?: any): any;
26
20
  /**
27
21
  * Get margin values
28
22
  *
@@ -81,9 +75,9 @@ export class PicoDomRectangleInstance {
81
75
  * @example Dom.find("div").realHeight({ display: "block" })
82
76
  *
83
77
  * @param {any} [style] Temp style
84
- * @returns {number} Height value
78
+ * @returns {any} Height value
85
79
  */
86
- realHeight(style?: any): number;
80
+ realHeight(style?: any): any;
87
81
  /**
88
82
  * Evaluate target height
89
83
  *
@@ -91,9 +85,9 @@ export class PicoDomRectangleInstance {
91
85
  *
92
86
  * @param {any} [target] Target element
93
87
  * @param {boolean} [apply] Apply style
94
- * @returns {number} Height value
88
+ * @returns {any} Height value
95
89
  */
96
- evaluateHeight(target?: any, apply?: boolean): number;
90
+ evaluateHeight(target?: any, apply?: boolean): any;
97
91
  /**
98
92
  * Get element width
99
93
  *
@@ -132,9 +126,9 @@ export class PicoDomRectangleInstance {
132
126
  * @example Dom.find("div").realWidth({ display: "block" })
133
127
  *
134
128
  * @param {any} [style] Temp style
135
- * @returns {number} Width value
129
+ * @returns {any} Width value
136
130
  */
137
- realWidth(style?: any): number;
131
+ realWidth(style?: {}): any;
138
132
  /**
139
133
  * Evaluate target width
140
134
  *
@@ -142,9 +136,9 @@ export class PicoDomRectangleInstance {
142
136
  *
143
137
  * @param {any} [target] Target element
144
138
  * @param {boolean} [apply] Apply style
145
- * @returns {number} Width value
139
+ * @returns {any} Width value
146
140
  */
147
- evaluateWidth(target?: any, apply?: boolean): number;
141
+ evaluateWidth(target?: any, apply?: boolean): any;
148
142
  /**
149
143
  * Get element offset
150
144
  *
@@ -196,7 +190,7 @@ export class PicoDomRectangleInstance {
196
190
  *
197
191
  * @example Dom.find("div").loopOffset((el) => console.log(el))
198
192
  *
199
- * @param {function} cb Callback fn
193
+ * @param {Function} cb Callback fn
200
194
  * @param {any} [boundry] Loop limit
201
195
  * @returns {PicoDom} Current instance
202
196
  */
@@ -238,9 +232,9 @@ export class PicoDomRectangleInstance {
238
232
  *
239
233
  * @param {any} [value] Scroll value
240
234
  * @param {any} [boundry] View boundry
241
- * @returns {number|PicoDom} Value or instance
235
+ * @returns {any} Value or instance
242
236
  */
243
- scrollTop(value?: any, boundry?: any): number | PicoDom;
237
+ scrollTop(value?: any, boundry?: any): any;
244
238
  /**
245
239
  * Get or set scroll left
246
240
  *
@@ -248,9 +242,9 @@ export class PicoDomRectangleInstance {
248
242
  *
249
243
  * @param {any} [value] Scroll value
250
244
  * @param {any} [boundry] View boundry
251
- * @returns {number|PicoDom} Value or instance
245
+ * @returns {any} Value or instance
252
246
  */
253
- scrollLeft(value?: any, boundry?: any): number | PicoDom;
247
+ scrollLeft(value?: any, boundry?: any): any;
254
248
  /**
255
249
  * Get relative scroll
256
250
  *
@@ -260,18 +254,5 @@ export class PicoDomRectangleInstance {
260
254
  * @returns {any} Scroll values
261
255
  */
262
256
  getScroll(boundry?: any): any;
263
- /**
264
- * @see PicoDom.loopOffsetParent
265
- */
266
- loopOffsetParent(...args: any[]): PicoDom;
267
- /**
268
- * @see PicoDom.scrollTopGlobal
269
- */
270
- scrollTopGlobal(): any;
271
- /**
272
- * @see PicoDom.scrollLeftGlobal
273
- */
274
- scrollLeftGlobal(): any;
275
257
  }
276
- export function PicoDomRectanglePlugin(self: typeof PicoDom): typeof PicoDom;
277
- import { PicoDom } from "../utils/Dom.js";
258
+ export default PicoDomRectangle;
@@ -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;