@kizmann/pico-js 1.0.13 → 2.0.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.
Files changed (125) hide show
  1. package/README.md +27 -7
  2. package/dist/pico-js.browser.js +2 -0
  3. package/dist/pico-js.browser.js.map +1 -0
  4. package/dist/pico-js.esm.js +2 -0
  5. package/dist/pico-js.esm.js.map +1 -0
  6. package/package.json +20 -7
  7. package/src/dom/DomAttribute.js +374 -0
  8. package/src/dom/DomBuilder.js +152 -0
  9. package/src/dom/DomEvent.js +253 -0
  10. package/src/dom/DomFinder.js +669 -0
  11. package/src/dom/DomForm.js +57 -0
  12. package/src/dom/DomGlobal.js +193 -0
  13. package/src/dom/DomInview.js +332 -0
  14. package/src/dom/DomMeta.js +66 -0
  15. package/src/dom/DomObserver.js +57 -0
  16. package/src/dom/DomRectangle.js +657 -0
  17. package/src/format/FormatFile.js +54 -0
  18. package/src/format/FormatOption.js +108 -0
  19. package/src/format/FormatParam.js +107 -0
  20. package/src/format/FormatParser.js +156 -0
  21. package/src/format/FormatUrl.js +75 -0
  22. package/src/index.browser.js +10 -0
  23. package/src/index.esm.js +138 -0
  24. package/src/now/NowDefault.js +533 -0
  25. package/src/now/NowFormat.js +196 -0
  26. package/src/now/NowGrid.js +251 -0
  27. package/src/now/NowHuman.js +118 -0
  28. package/src/now/NowMatch.js +175 -0
  29. package/src/now/NowRange.js +70 -0
  30. package/src/now/NowWalker.js +544 -0
  31. package/src/tool/scope.js +103 -0
  32. package/src/utils/Array.js +986 -0
  33. package/src/utils/Cookie.js +184 -0
  34. package/src/utils/Data.js +200 -0
  35. package/src/utils/Dom.js +208 -0
  36. package/src/utils/Event.js +140 -0
  37. package/src/utils/Format.js +62 -0
  38. package/src/utils/Hash.js +164 -0
  39. package/src/utils/Locale.js +229 -0
  40. package/src/utils/Mixed.js +887 -0
  41. package/src/utils/Now.js +234 -0
  42. package/src/utils/Number.js +238 -0
  43. package/src/utils/Object.js +655 -0
  44. package/src/utils/Route.js +67 -0
  45. package/src/utils/Runner.js +327 -0
  46. package/src/utils/String.js +618 -0
  47. package/src/{library/element.js → wip/Element.js} +90 -16
  48. package/src/{library/map.js → wip/Map.js} +256 -40
  49. package/types/dom/DomAttribute.d.ts +137 -0
  50. package/types/dom/DomBuilder.d.ts +67 -0
  51. package/types/dom/DomEvent.d.ts +103 -0
  52. package/types/dom/DomFinder.d.ts +321 -0
  53. package/types/dom/DomForm.d.ts +21 -0
  54. package/types/dom/DomGlobal.d.ts +79 -0
  55. package/types/dom/DomInview.d.ts +114 -0
  56. package/types/dom/DomMeta.d.ts +29 -0
  57. package/types/dom/DomObserver.d.ts +21 -0
  58. package/types/dom/DomRectangle.d.ts +270 -0
  59. package/types/format/FormatFile.d.ts +18 -0
  60. package/types/format/FormatOption.d.ts +40 -0
  61. package/types/format/FormatParam.d.ts +39 -0
  62. package/types/format/FormatParser.d.ts +46 -0
  63. package/types/format/FormatUrl.d.ts +17 -0
  64. package/types/index.browser.d.ts +1 -0
  65. package/types/index.esm.d.ts +52 -0
  66. package/types/now/NowDefault.d.ts +183 -0
  67. package/types/now/NowFormat.d.ts +70 -0
  68. package/types/now/NowGrid.d.ts +107 -0
  69. package/types/now/NowHuman.d.ts +37 -0
  70. package/types/now/NowMatch.d.ts +108 -0
  71. package/types/now/NowRange.d.ts +21 -0
  72. package/types/now/NowWalker.d.ts +301 -0
  73. package/types/tool/scope.d.ts +24 -0
  74. package/types/utils/Array.d.ts +480 -0
  75. package/types/utils/Cookie.d.ts +60 -0
  76. package/types/utils/Data.d.ts +91 -0
  77. package/types/utils/Dom.d.ts +138 -0
  78. package/types/utils/Event.d.ts +58 -0
  79. package/types/utils/Format.d.ts +37 -0
  80. package/types/utils/Hash.d.ts +81 -0
  81. package/types/utils/Locale.d.ts +115 -0
  82. package/types/utils/Mixed.d.ts +469 -0
  83. package/types/utils/Now.d.ts +125 -0
  84. package/types/utils/Number.d.ts +127 -0
  85. package/types/utils/Object.d.ts +255 -0
  86. package/types/utils/Route.d.ts +37 -0
  87. package/types/utils/Runner.d.ts +139 -0
  88. package/types/utils/String.d.ts +330 -0
  89. package/types/wip/Element.d.ts +119 -0
  90. package/types/wip/Map.d.ts +254 -0
  91. package/dist/.ignore.js +0 -0
  92. package/dist/pico-js.js +0 -2
  93. package/dist/pico-js.js.map +0 -1
  94. package/src/element/default.js +0 -46
  95. package/src/element/example.js +0 -58
  96. package/src/index.js +0 -90
  97. package/src/library/cookie.js +0 -123
  98. package/src/library/data.js +0 -111
  99. package/src/library/event.js +0 -91
  100. package/src/library/locale.js +0 -84
  101. package/src/library/queue.js +0 -64
  102. package/src/library/route.js +0 -28
  103. package/src/utility/any.js +0 -369
  104. package/src/utility/array.js +0 -410
  105. package/src/utility/dom.js +0 -1425
  106. package/src/utility/now.js +0 -544
  107. package/src/utility/number.js +0 -128
  108. package/src/utility/object.js +0 -429
  109. package/src/utility/string.js +0 -328
  110. package/types/index.d.ts +0 -77
  111. package/types/library/cookie.d.ts +0 -10
  112. package/types/library/data.d.ts +0 -15
  113. package/types/library/element.d.ts +0 -22
  114. package/types/library/event.d.ts +0 -13
  115. package/types/library/locale.d.ts +0 -14
  116. package/types/library/map.d.ts +0 -43
  117. package/types/library/queue.d.ts +0 -18
  118. package/types/library/route.d.ts +0 -11
  119. package/types/utility/any.d.ts +0 -35
  120. package/types/utility/array.d.ts +0 -46
  121. package/types/utility/dom.d.ts +0 -101
  122. package/types/utility/now.d.ts +0 -79
  123. package/types/utility/number.d.ts +0 -17
  124. package/types/utility/object.d.ts +0 -29
  125. package/types/utility/string.d.ts +0 -26
@@ -0,0 +1,301 @@
1
+ /**
2
+ * @memberof PicoNow
3
+ * @extends {PicoNow}
4
+ */
5
+ export class PicoNowWalkerInstance {
6
+ /**
7
+ * Get previous date by scope
8
+ *
9
+ * @example Now.prev("day") // => Now
10
+ *
11
+ * @param {string} [scope] Target scope
12
+ * @returns {PicoNow} New instance
13
+ */
14
+ prev(scope?: string): PicoNow;
15
+ /**
16
+ * Get next date by scope
17
+ *
18
+ * @example Now.next("day") // => Now
19
+ *
20
+ * @param {string} [scope] Target scope
21
+ * @returns {PicoNow} New instance
22
+ */
23
+ next(scope?: string): PicoNow;
24
+ /**
25
+ * Get previous second
26
+ *
27
+ * @example Now.prevSecond()
28
+ *
29
+ * @returns {PicoNow} New instance
30
+ */
31
+ prevSecond(): PicoNow;
32
+ /**
33
+ * Get next second
34
+ *
35
+ * @example Now.nextSecond()
36
+ *
37
+ * @returns {PicoNow} New instance
38
+ */
39
+ nextSecond(): PicoNow;
40
+ /**
41
+ * Get previous minute
42
+ *
43
+ * @example Now.prevMinute()
44
+ *
45
+ * @returns {PicoNow} New instance
46
+ */
47
+ prevMinute(): PicoNow;
48
+ /**
49
+ * Get next minute
50
+ *
51
+ * @example Now.nextMinute()
52
+ *
53
+ * @returns {PicoNow} New instance
54
+ */
55
+ nextMinute(): PicoNow;
56
+ /**
57
+ * Get previous hour
58
+ *
59
+ * @example Now.prevHour()
60
+ *
61
+ * @returns {PicoNow} New instance
62
+ */
63
+ prevHour(): PicoNow;
64
+ /**
65
+ * Get next hour
66
+ *
67
+ * @example Now.nextHour()
68
+ *
69
+ * @returns {PicoNow} New instance
70
+ */
71
+ nextHour(): PicoNow;
72
+ /**
73
+ * Get previous date
74
+ *
75
+ * @example Now.prevDate()
76
+ *
77
+ * @returns {PicoNow} New instance
78
+ */
79
+ prevDate(): PicoNow;
80
+ /**
81
+ * Get next date
82
+ *
83
+ * @example Now.nextDate()
84
+ *
85
+ * @returns {PicoNow} New instance
86
+ */
87
+ nextDate(): PicoNow;
88
+ /**
89
+ * Get previous month
90
+ *
91
+ * @example Now.prevMonth()
92
+ *
93
+ * @returns {PicoNow} New instance
94
+ */
95
+ prevMonth(): PicoNow;
96
+ /**
97
+ * Get next month
98
+ *
99
+ * @example Now.nextMonth()
100
+ *
101
+ * @returns {PicoNow} New instance
102
+ */
103
+ nextMonth(): PicoNow;
104
+ /**
105
+ * Get previous year
106
+ *
107
+ * @example Now.prevYear()
108
+ *
109
+ * @returns {PicoNow} New instance
110
+ */
111
+ prevYear(): PicoNow;
112
+ /**
113
+ * Get next year
114
+ *
115
+ * @example Now.nextYear()
116
+ *
117
+ * @returns {PicoNow} New instance
118
+ */
119
+ nextYear(): PicoNow;
120
+ /**
121
+ * Get previous decade
122
+ *
123
+ * @example Now.prevDecade()
124
+ *
125
+ * @returns {PicoNow} New instance
126
+ */
127
+ prevDecade(): PicoNow;
128
+ /**
129
+ * Get next decade
130
+ *
131
+ * @example Now.nextDecade()
132
+ *
133
+ * @returns {PicoNow} New instance
134
+ */
135
+ nextDecade(): PicoNow;
136
+ /**
137
+ * Get start of scope
138
+ *
139
+ * @example Now.first("month")
140
+ *
141
+ * @param {string} [scope] Target scope
142
+ * @returns {PicoNow} New instance
143
+ */
144
+ first(scope?: string): PicoNow;
145
+ /**
146
+ * Get end of scope
147
+ *
148
+ * @example Now.last("month")
149
+ *
150
+ * @param {string} [scope] Target scope
151
+ * @returns {PicoNow} New instance
152
+ */
153
+ last(scope?: string): PicoNow;
154
+ /**
155
+ * Get start of second
156
+ *
157
+ * @example Now.firstSecond()
158
+ *
159
+ * @returns {PicoNow} New instance
160
+ */
161
+ firstSecond(): PicoNow;
162
+ /**
163
+ * Get end of second
164
+ *
165
+ * @example Now.lastSecond()
166
+ *
167
+ * @returns {PicoNow} New instance
168
+ */
169
+ lastSecond(): PicoNow;
170
+ /**
171
+ * Get start of minute
172
+ *
173
+ * @example Now.firstMinute()
174
+ *
175
+ * @returns {PicoNow} New instance
176
+ */
177
+ firstMinute(): PicoNow;
178
+ /**
179
+ * Get end of minute
180
+ *
181
+ * @example Now.lastMinute()
182
+ *
183
+ * @returns {PicoNow} New instance
184
+ */
185
+ lastMinute(): PicoNow;
186
+ /**
187
+ * Get start of hour
188
+ *
189
+ * @example Now.firstHour()
190
+ *
191
+ * @returns {PicoNow} New instance
192
+ */
193
+ firstHour(): PicoNow;
194
+ /**
195
+ * Get end of hour
196
+ *
197
+ * @example Now.lastHour()
198
+ *
199
+ * @returns {PicoNow} New instance
200
+ */
201
+ lastHour(): PicoNow;
202
+ /**
203
+ * Get start of day
204
+ *
205
+ * @example Now.firstDay()
206
+ *
207
+ * @returns {PicoNow} New instance
208
+ */
209
+ firstDay(): PicoNow;
210
+ /**
211
+ * Get end of day
212
+ *
213
+ * @example Now.lastDay()
214
+ *
215
+ * @returns {PicoNow} New instance
216
+ */
217
+ lastDay(): PicoNow;
218
+ /**
219
+ * Get start of month date
220
+ *
221
+ * @example Now.firstDate()
222
+ *
223
+ * @returns {PicoNow} New instance
224
+ */
225
+ firstDate(): PicoNow;
226
+ /**
227
+ * Get end of month date
228
+ *
229
+ * @example Now.lastDate()
230
+ *
231
+ * @returns {PicoNow} New instance
232
+ */
233
+ lastDate(): PicoNow;
234
+ /**
235
+ * Get start of year month
236
+ *
237
+ * @example Now.firstMonth()
238
+ *
239
+ * @returns {PicoNow} New instance
240
+ */
241
+ firstMonth(): PicoNow;
242
+ /**
243
+ * Get end of year month
244
+ *
245
+ * @example Now.lastMonth()
246
+ *
247
+ * @returns {PicoNow} New instance
248
+ */
249
+ lastMonth(): PicoNow;
250
+ /**
251
+ * Get nth year of decade
252
+ *
253
+ * @example Now.nthYear(5)
254
+ *
255
+ * @param {number} [n] Year index
256
+ * @returns {PicoNow} New instance
257
+ */
258
+ nthYear(n?: number): PicoNow;
259
+ /**
260
+ * Get first year of decade
261
+ *
262
+ * @example Now.firstYear()
263
+ *
264
+ * @returns {PicoNow} New instance
265
+ */
266
+ firstYear(): PicoNow;
267
+ /**
268
+ * Get last year of decade
269
+ *
270
+ * @example Now.lastYear()
271
+ *
272
+ * @returns {PicoNow} New instance
273
+ */
274
+ lastYear(): PicoNow;
275
+ /**
276
+ * Get nth decade of century
277
+ *
278
+ * @example Now.nthDecade(5)
279
+ *
280
+ * @param {number} [n] Decade index
281
+ * @returns {PicoNow} New instance
282
+ */
283
+ nthDecade(n?: number): PicoNow;
284
+ /**
285
+ * Get first decade of century
286
+ *
287
+ * @example Now.firstDecade()
288
+ *
289
+ * @returns {PicoNow} New instance
290
+ */
291
+ firstDecade(): PicoNow;
292
+ /**
293
+ * Get last decade of century
294
+ *
295
+ * @example Now.lastDecade()
296
+ *
297
+ * @returns {PicoNow} New instance
298
+ */
299
+ lastDecade(): PicoNow;
300
+ }
301
+ export function PicoNowWalkerPlugin(self: any): typeof import("#src/utils/Now.js").PicoNow;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Get global runtime scope
3
+ *
4
+ * @example go().Math // => Math
5
+ *
6
+ * @returns {any} Global scope obj
7
+ */
8
+ export function go(): any;
9
+ /**
10
+ * Detect browser from userAgent
11
+ *
12
+ * @example browser() // sets global flags
13
+ *
14
+ * @returns {void} No return value
15
+ */
16
+ export function browser(): void;
17
+ /**
18
+ * Detect device OS from userAgent
19
+ *
20
+ * @example device() // sets global flags
21
+ *
22
+ * @returns {void} No return value
23
+ */
24
+ export function device(): void;