@kizmann/pico-js 2.0.0 → 2.0.2
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.
- package/dist/pico-js.browser.js +1 -1
- package/dist/pico-js.browser.js.map +1 -1
- package/dist/pico-js.esm.js +1 -1
- package/dist/pico-js.esm.js.map +1 -1
- package/package.json +7 -2
- package/src/dom/DomAttribute.js +13 -11
- package/src/dom/DomBuilder.js +9 -7
- package/src/dom/DomEvent.js +11 -9
- package/src/dom/DomFinder.js +7 -5
- package/src/dom/DomForm.js +5 -3
- package/src/dom/DomGlobal.js +7 -5
- package/src/dom/DomInview.js +4 -2
- package/src/dom/DomMeta.js +5 -3
- package/src/dom/DomObserver.js +5 -3
- package/src/dom/DomRectangle.js +7 -6
- package/src/format/FormatFile.js +4 -2
- package/src/format/FormatOption.js +4 -2
- package/src/format/FormatParam.js +4 -2
- package/src/format/FormatParser.js +4 -2
- package/src/format/FormatUrl.js +4 -2
- package/src/index.browser.js +29 -9
- package/src/index.esm.js +46 -68
- package/src/now/NowDefault.js +4 -2
- package/src/now/NowFormat.js +4 -2
- package/src/now/NowGrid.js +4 -2
- package/src/now/NowHuman.js +4 -2
- package/src/now/NowMatch.js +4 -2
- package/src/now/NowRange.js +4 -2
- package/src/now/NowWalker.js +4 -2
- package/src/utils/Array.js +1 -1
- package/src/utils/Cookie.js +1 -1
- package/src/utils/Data.js +1 -1
- package/src/utils/Dom.js +28 -28
- package/src/utils/Event.js +2 -2
- package/src/utils/Format.js +10 -10
- package/src/utils/Hash.js +1 -1
- package/src/utils/Locale.js +1 -1
- package/src/utils/Mixed.js +1 -1
- package/src/utils/Now.js +15 -15
- package/src/utils/Number.js +1 -1
- package/src/utils/Object.js +1 -1
- package/src/utils/Route.js +1 -1
- package/src/utils/Runner.js +4 -4
- package/src/utils/String.js +1 -1
- package/src/wip/Element.js +4 -4
- package/src/wip/Map.js +4 -4
- package/types/dom/DomAttribute.d.ts +21 -20
- package/types/dom/DomBuilder.d.ts +12 -11
- package/types/dom/DomEvent.d.ts +17 -16
- package/types/dom/DomFinder.d.ts +8 -7
- package/types/dom/DomForm.d.ts +4 -3
- package/types/dom/DomGlobal.d.ts +8 -7
- package/types/dom/DomInview.d.ts +2 -1
- package/types/dom/DomMeta.d.ts +4 -3
- package/types/dom/DomObserver.d.ts +4 -3
- package/types/dom/DomRectangle.d.ts +9 -8
- package/types/format/FormatFile.d.ts +2 -1
- package/types/format/FormatOption.d.ts +2 -1
- package/types/format/FormatParam.d.ts +2 -1
- package/types/format/FormatParser.d.ts +2 -1
- package/types/format/FormatUrl.d.ts +2 -1
- package/types/index.esm.d.ts +67 -41
- package/types/now/NowDefault.d.ts +2 -1
- package/types/now/NowFormat.d.ts +2 -1
- package/types/now/NowGrid.d.ts +2 -1
- package/types/now/NowHuman.d.ts +2 -1
- package/types/now/NowMatch.d.ts +2 -1
- package/types/now/NowRange.d.ts +2 -1
- package/types/now/NowWalker.d.ts +2 -1
- package/types/utils/Array.d.ts +6 -6
- package/types/utils/Dom.d.ts +35 -35
- package/types/utils/Event.d.ts +2 -2
- package/types/utils/Format.d.ts +11 -11
- package/types/utils/Now.d.ts +14 -14
- package/types/utils/Runner.d.ts +6 -6
- package/types/wip/Element.d.ts +8 -8
- package/types/wip/Map.d.ts +8 -8
- package/types/index.browser.d.ts +0 -1
package/src/index.esm.js
CHANGED
|
@@ -1,129 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
1
|
+
import { default as PicoRunner } from "./utils/Runner.js";
|
|
2
|
+
import { default as PicoString } from "./utils/String.js";
|
|
3
|
+
import { default as PicoNumber } from "./utils/Number.js";
|
|
4
|
+
import { default as PicoArray } from "./utils/Array.js";
|
|
5
|
+
import { default as PicoObject } from "./utils/Object.js";
|
|
6
|
+
import { default as PicoMixed } from "./utils/Mixed.js";
|
|
7
|
+
import { default as PicoHash } from "./utils/Hash.js";
|
|
8
|
+
import { default as PicoEvent } from "./utils/Event.js";
|
|
9
|
+
import { default as PicoLocale } from "./utils/Locale.js";
|
|
10
|
+
import { default as PicoCookie } from "./utils/Cookie.js";
|
|
11
|
+
import { PicoDom, default as DomBuilder } from "./utils/Dom.js";
|
|
12
|
+
import { PicoNow, default as NowBuilder } from "./utils/Now.js";
|
|
13
|
+
import { PicoFormat, default as ForBuilder } from "./utils/Format.js";
|
|
14
|
+
|
|
15
|
+
import { go, browser, device } from "./tool/scope.js";
|
|
16
|
+
export { go, browser, device };
|
|
4
17
|
|
|
5
|
-
//
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
18
|
+
// You will be removed soon
|
|
19
|
+
import { default as Data } from "./utils/Data.js";
|
|
20
|
+
import { default as Route } from "./utils/Route.js";
|
|
8
21
|
|
|
9
22
|
export {
|
|
10
|
-
Map, Data
|
|
23
|
+
Map, Data
|
|
11
24
|
}
|
|
12
25
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*/
|
|
17
|
-
import { go as PicoToolGo } from "#src/tool/scope.js";
|
|
18
|
-
export const go = PicoToolGo;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @typedef {typeof import("#src/tool/scope.js").browser} PicoToolBrowser
|
|
22
|
-
* @type {PicoToolBrowser}
|
|
23
|
-
*/
|
|
24
|
-
import { browser as PicoToolBrowser } from "#src/tool/scope.js";
|
|
25
|
-
export const browser = PicoToolBrowser;
|
|
26
|
+
// Work in progress (not started yet)
|
|
27
|
+
import { default as Map } from "./wip/Map.js";
|
|
28
|
+
import { default as Element } from "./wip/Element.js";
|
|
26
29
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
*/
|
|
31
|
-
import { device as PicoToolDevice } from "#src/tool/scope.js";
|
|
32
|
-
export const device = PicoToolDevice;
|
|
30
|
+
export {
|
|
31
|
+
Route, Element
|
|
32
|
+
}
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* @
|
|
36
|
-
* @type {PicoDom}
|
|
35
|
+
* @type {typeof PicoDom}
|
|
37
36
|
*/
|
|
38
|
-
import { default as DomBuilder } from "#src/utils/Dom.js";
|
|
39
37
|
export const Dom = DomBuilder();
|
|
40
38
|
|
|
41
39
|
/**
|
|
42
|
-
* @
|
|
43
|
-
* @type {PicoNow}
|
|
40
|
+
* @type {typeof PicoNow}
|
|
44
41
|
*/
|
|
45
|
-
import { default as NowBuilder } from "#src/utils/Now.js";
|
|
46
42
|
export const Now = NowBuilder();
|
|
47
43
|
|
|
48
44
|
/**
|
|
49
|
-
* @
|
|
50
|
-
* @type {PicoFormat}
|
|
45
|
+
* @type {typeof PicoFormat}
|
|
51
46
|
*/
|
|
52
|
-
import { default as ForBuilder } from "#src/utils/Format.js";
|
|
53
47
|
export const For = ForBuilder();
|
|
54
48
|
|
|
55
49
|
/**
|
|
56
|
-
* @
|
|
57
|
-
* @type {PicoRunner}
|
|
50
|
+
* @type {typeof PicoRunner}
|
|
58
51
|
*/
|
|
59
|
-
import { default as PicoRunner } from "#src/utils/Runner.js";
|
|
60
52
|
export const Run = PicoRunner;
|
|
61
53
|
|
|
62
54
|
/**
|
|
63
|
-
* @
|
|
64
|
-
* @type {PicoString}
|
|
55
|
+
* @type {typeof PicoString}
|
|
65
56
|
*/
|
|
66
|
-
import { default as PicoString } from "#src/utils/String.js";
|
|
67
57
|
export const Str = PicoString;
|
|
68
58
|
|
|
69
59
|
/**
|
|
70
|
-
* @
|
|
71
|
-
* @type {PicoNumber}
|
|
60
|
+
* @type {typeof PicoNumber}
|
|
72
61
|
*/
|
|
73
|
-
import { default as PicoNumber } from "#src/utils/Number.js";
|
|
74
62
|
export const Num = PicoNumber;
|
|
75
63
|
|
|
76
64
|
/**
|
|
77
|
-
* @
|
|
78
|
-
* @type {PicoArray}
|
|
65
|
+
* @type {typeof PicoArray}
|
|
79
66
|
*/
|
|
80
|
-
import { default as PicoArray } from "#src/utils/Array.js";
|
|
81
67
|
export const Arr = PicoArray;
|
|
82
68
|
|
|
83
69
|
/**
|
|
84
|
-
* @
|
|
85
|
-
* @type {PicoObject}
|
|
70
|
+
* @type {typeof PicoObject}
|
|
86
71
|
*/
|
|
87
|
-
import { default as PicoObject } from "#src/utils/Object.js";
|
|
88
72
|
export const Obj = PicoObject;
|
|
89
73
|
|
|
90
74
|
/**
|
|
91
|
-
* @
|
|
92
|
-
* @type {PicoMixed}
|
|
75
|
+
* @type {typeof PicoMixed}
|
|
93
76
|
*/
|
|
94
|
-
import { default as PicoMixed } from "#src/utils/Mixed.js";
|
|
95
77
|
export const Mix = PicoMixed;
|
|
96
78
|
|
|
97
79
|
/**
|
|
98
|
-
* @
|
|
99
|
-
* @type {PicoHash}
|
|
80
|
+
* @type {typeof PicoHash}
|
|
100
81
|
*/
|
|
101
|
-
import { default as PicoHash } from "#src/utils/Hash.js";
|
|
102
82
|
export const Hash = PicoHash;
|
|
103
83
|
|
|
104
84
|
/**
|
|
105
|
-
* @
|
|
106
|
-
* @type {PicoEvent}
|
|
85
|
+
* @type {typeof PicoEvent}
|
|
107
86
|
*/
|
|
108
|
-
import { default as PicoEvent } from "#src/utils/Event.js";
|
|
109
87
|
export const Event = PicoEvent;
|
|
110
88
|
|
|
111
89
|
/**
|
|
112
|
-
* @
|
|
113
|
-
* @type {PicoLocale}
|
|
90
|
+
* @type {typeof PicoLocale}
|
|
114
91
|
*/
|
|
115
|
-
import { default as PicoLocale } from "#src/utils/Locale.js";
|
|
116
92
|
export const Locale = PicoLocale;
|
|
117
93
|
|
|
118
94
|
/**
|
|
119
|
-
* @
|
|
120
|
-
* @type {PicoCookie}
|
|
95
|
+
* @type {typeof PicoCookie}
|
|
121
96
|
*/
|
|
122
|
-
import { default as PicoCookie } from "#src/utils/Cookie.js";
|
|
123
97
|
export const Cookie = PicoCookie;
|
|
124
98
|
|
|
125
99
|
|
|
126
|
-
|
|
100
|
+
/**
|
|
101
|
+
* @type {typeof PicoMixed}
|
|
102
|
+
*/
|
|
127
103
|
export const Any = new Proxy({}, {
|
|
128
104
|
get: function (target, prop) {
|
|
129
105
|
console.warn(`Any.${prop} is deprecated, use Mix.${prop}() instead.`);
|
|
@@ -131,8 +107,10 @@ export const Any = new Proxy({}, {
|
|
|
131
107
|
}
|
|
132
108
|
});
|
|
133
109
|
|
|
134
|
-
|
|
110
|
+
/**
|
|
111
|
+
* @returns {string}
|
|
112
|
+
*/
|
|
135
113
|
export const UUID = function () {
|
|
136
114
|
console.warn('UUID() is deprecated, use Hash.make() instead.');
|
|
137
|
-
return
|
|
115
|
+
return PicoHash.make();
|
|
138
116
|
};
|
package/src/now/NowDefault.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Arr, Mix, Now, Num, Obj, Str } from "
|
|
1
|
+
import { Arr, Mix, Now, Num, Obj, Str } from "../index.esm.js";
|
|
2
|
+
import { PicoNow } from "../utils/Now.js";
|
|
2
3
|
|
|
3
4
|
export const NOW_MODIFY = {
|
|
4
5
|
'second': /([+-])([0-9]+)\s?seconds?/i,
|
|
@@ -521,7 +522,8 @@ PicoNowGridInstance.prototype.humanMonth = function () {
|
|
|
521
522
|
}
|
|
522
523
|
|
|
523
524
|
/**
|
|
524
|
-
* @
|
|
525
|
+
* @param {typeof PicoNow} self
|
|
526
|
+
* @returns {typeof PicoNow}
|
|
525
527
|
*/
|
|
526
528
|
export const PicoNowDefaultPlugin = function (self) {
|
|
527
529
|
|
package/src/now/NowFormat.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Arr, Locale, Mix, Num, Obj, Str } from "
|
|
1
|
+
import { Arr, Locale, Mix, Num, Obj, Str } from "../index.esm.js";
|
|
2
|
+
import { PicoNow } from "../utils/Now.js";
|
|
2
3
|
|
|
3
4
|
export const NOW_FORMAT = {
|
|
4
5
|
'L': 'DD/MM/YYYY',
|
|
@@ -184,7 +185,8 @@ export class PicoNowFormatInstance
|
|
|
184
185
|
}
|
|
185
186
|
|
|
186
187
|
/**
|
|
187
|
-
* @
|
|
188
|
+
* @param {typeof PicoNow} self
|
|
189
|
+
* @returns {typeof PicoNow}
|
|
188
190
|
*/
|
|
189
191
|
export const PicoNowFormatPlugin = function (self) {
|
|
190
192
|
|
package/src/now/NowGrid.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Arr, Mix, Num, Obj, Str } from "
|
|
1
|
+
import { Arr, Mix, Num, Obj, Str } from "../index.esm.js";
|
|
2
|
+
import { PicoNow } from "../utils/Now.js";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* @memberof PicoNow
|
|
@@ -239,7 +240,8 @@ PicoNowGridInstance.prototype.getSeconds = function () {
|
|
|
239
240
|
}
|
|
240
241
|
|
|
241
242
|
/**
|
|
242
|
-
* @
|
|
243
|
+
* @param {typeof PicoNow} self
|
|
244
|
+
* @returns {typeof PicoNow}
|
|
243
245
|
*/
|
|
244
246
|
export const PicoNowGridPlugin = function (self) {
|
|
245
247
|
|
package/src/now/NowHuman.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Arr, Locale, Mix, Num, Obj, Str } from "
|
|
1
|
+
import { Arr, Locale, Mix, Num, Obj, Str } from "../index.esm.js";
|
|
2
|
+
import { PicoNow } from "../utils/Now.js";
|
|
2
3
|
|
|
3
4
|
export const NOW_HUMAN_DAYS = [
|
|
4
5
|
'Sunday',
|
|
@@ -106,7 +107,8 @@ export class PicoNowHumanInstance
|
|
|
106
107
|
}
|
|
107
108
|
|
|
108
109
|
/**
|
|
109
|
-
* @
|
|
110
|
+
* @param {typeof PicoNow} self
|
|
111
|
+
* @returns {typeof PicoNow}
|
|
110
112
|
*/
|
|
111
113
|
export const PicoNowHumanPlugin = function (self) {
|
|
112
114
|
|
package/src/now/NowMatch.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Mix, Now, Obj } from "
|
|
1
|
+
import { Mix, Now, Obj } from "../index.esm.js";
|
|
2
|
+
import { PicoNow } from "../utils/Now.js";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* @memberof PicoNow
|
|
@@ -163,7 +164,8 @@ export class PicoNowMatchInstance
|
|
|
163
164
|
}
|
|
164
165
|
|
|
165
166
|
/**
|
|
166
|
-
* @
|
|
167
|
+
* @param {typeof PicoNow} self
|
|
168
|
+
* @returns {typeof PicoNow}
|
|
167
169
|
*/
|
|
168
170
|
export const PicoNowMatchPlugin = function (self) {
|
|
169
171
|
|
package/src/now/NowRange.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Mix, Now, Obj, Arr } from "
|
|
1
|
+
import { Mix, Now, Obj, Arr } from "../index.esm.js";
|
|
2
|
+
import { PicoNow } from "../utils/Now.js";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* @memberof PicoNow
|
|
@@ -58,7 +59,8 @@ PicoNowRangeInstance.prototype.getDatesRange = function (...args) {
|
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
/**
|
|
61
|
-
* @
|
|
62
|
+
* @param {typeof PicoNow} self
|
|
63
|
+
* @returns {typeof PicoNow}
|
|
62
64
|
*/
|
|
63
65
|
export const PicoNowRangePlugin = function (self) {
|
|
64
66
|
|
package/src/now/NowWalker.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Mix, Now, Obj } from "
|
|
1
|
+
import { Mix, Now, Obj } from "../index.esm.js";
|
|
2
|
+
import { PicoNow } from "../utils/Now.js";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* @memberof PicoNow
|
|
@@ -532,7 +533,8 @@ export class PicoNowWalkerInstance
|
|
|
532
533
|
}
|
|
533
534
|
|
|
534
535
|
/**
|
|
535
|
-
* @
|
|
536
|
+
* @param {typeof PicoNow} self
|
|
537
|
+
* @returns {typeof PicoNow}
|
|
536
538
|
*/
|
|
537
539
|
export const PicoNowWalkerPlugin = function (self) {
|
|
538
540
|
|
package/src/utils/Array.js
CHANGED
package/src/utils/Cookie.js
CHANGED
package/src/utils/Data.js
CHANGED
package/src/utils/Dom.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Arr, Mix, Dom } from "
|
|
2
|
-
import { PicoDomFinderPlugin } from "
|
|
3
|
-
import { PicoDomFormPlugin } from "
|
|
4
|
-
import { PicoDomEventPlugin } from "
|
|
5
|
-
import { PicoDomBuilderPlugin } from "
|
|
6
|
-
import { PicoDomGlobalPlugin } from "
|
|
7
|
-
import { PicoDomRectanglePlugin } from "
|
|
8
|
-
import { PicoDomAttributePlugin } from "
|
|
9
|
-
import { PicoDomInviewPlugin } from "
|
|
10
|
-
import { PicoDomMetaPlugin } from "
|
|
11
|
-
import { PicoDomObserverPlugin } from "
|
|
1
|
+
import { Arr, Mix, Dom } from "../index.esm.js";
|
|
2
|
+
import { PicoDomFinderPlugin } from "../dom/DomFinder.js";
|
|
3
|
+
import { PicoDomFormPlugin } from "../dom/DomForm.js";
|
|
4
|
+
import { PicoDomEventPlugin } from "../dom/DomEvent.js";
|
|
5
|
+
import { PicoDomBuilderPlugin } from "../dom/DomBuilder.js";
|
|
6
|
+
import { PicoDomGlobalPlugin } from "../dom/DomGlobal.js";
|
|
7
|
+
import { PicoDomRectanglePlugin } from "../dom/DomRectangle.js";
|
|
8
|
+
import { PicoDomAttributePlugin } from "../dom/DomAttribute.js";
|
|
9
|
+
import { PicoDomInviewPlugin } from "../dom/DomInview.js";
|
|
10
|
+
import { PicoDomMetaPlugin } from "../dom/DomMeta.js";
|
|
11
|
+
import { PicoDomObserverPlugin } from "../dom/DomObserver.js";
|
|
12
12
|
|
|
13
13
|
export const PicoDomPlugins = [
|
|
14
14
|
PicoDomFinderPlugin,
|
|
@@ -26,23 +26,23 @@ export const PicoDomPlugins = [
|
|
|
26
26
|
/**
|
|
27
27
|
* @class PicoDom
|
|
28
28
|
*
|
|
29
|
-
* @typedef {import('
|
|
30
|
-
* @typedef {import('
|
|
31
|
-
* @typedef {import('
|
|
32
|
-
* @typedef {import('
|
|
33
|
-
* @typedef {import('
|
|
34
|
-
* @typedef {import('
|
|
35
|
-
* @typedef {import('
|
|
36
|
-
* @typedef {import('
|
|
37
|
-
* @typedef {import('
|
|
38
|
-
* @typedef {import('
|
|
39
|
-
* @typedef {import('
|
|
40
|
-
* @typedef {import('
|
|
41
|
-
* @typedef {import('
|
|
42
|
-
* @typedef {import('
|
|
43
|
-
* @typedef {import('
|
|
44
|
-
* @typedef {import('
|
|
45
|
-
* @typedef {import('
|
|
29
|
+
* @typedef {import('../dom/DomFinder.js').PicoDomFinderInstance} PicoDomFinderInstance
|
|
30
|
+
* @typedef {import('../dom/DomGlobal.js').PicoDomGlobalStatic} PicoDomGlobalStatic
|
|
31
|
+
* @typedef {import('../dom/DomGlobal.js').PicoDomGlobalInstance} PicoDomGlobalInstance
|
|
32
|
+
* @typedef {import('../dom/DomEvent.js').PicoDomEventStatic} PicoDomEventStatic
|
|
33
|
+
* @typedef {import('../dom/DomEvent.js').PicoDomEventInstance} PicoDomEventInstance
|
|
34
|
+
* @typedef {import('../dom/DomBuilder.js').PicoDomBuilderStatic} PicoDomBuilderStatic
|
|
35
|
+
* @typedef {import('../dom/DomBuilder.js').PicoDomBuilderInstance} PicoDomBuilderInstance
|
|
36
|
+
* @typedef {import('../dom/DomRectangle.js').PicoDomRectangleStatic} PicoDomRectangleStatic
|
|
37
|
+
* @typedef {import('../dom/DomRectangle.js').PicoDomRectangleInstance} PicoDomRectangleInstance
|
|
38
|
+
* @typedef {import('../dom/DomAttribute.js').PicoDomAttributeStatic} PicoDomAttributeStatic
|
|
39
|
+
* @typedef {import('../dom/DomAttribute.js').PicoDomAttributeInstance} PicoDomAttributeInstance
|
|
40
|
+
* @typedef {import('../dom/DomInview.js').PicoDomInviewStatic} PicoDomInviewStatic
|
|
41
|
+
* @typedef {import('../dom/DomInview.js').PicoDomInviewInstance} PicoDomInviewInstance
|
|
42
|
+
* @typedef {import('../dom/DomMeta.js').PicoDomMetaStatic} PicoDomMetaStatic
|
|
43
|
+
* @typedef {import('../dom/DomMeta.js').PicoDomMetaInstance} PicoDomMetaInstance
|
|
44
|
+
* @typedef {import('../dom/DomObserver.js').PicoDomObserverStatic} PicoDomObserverStatic
|
|
45
|
+
* @typedef {import('../dom/DomObserver.js').PicoDomObserverInstance} PicoDomObserverInstance
|
|
46
46
|
*
|
|
47
47
|
* @mixes PicoDomFinderStatic
|
|
48
48
|
* @mixes PicoDomGlobalStatic
|
package/src/utils/Event.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Str, Event, For, Mix, Arr } from "
|
|
1
|
+
import { Str, Event, For, Mix, Arr } from "../index.esm.js";
|
|
2
2
|
export class PicoEvent
|
|
3
3
|
{
|
|
4
4
|
static $events = [];
|
|
@@ -65,7 +65,7 @@ export class PicoEvent
|
|
|
65
65
|
* @example Event.fire("x", 1) // => Event
|
|
66
66
|
*
|
|
67
67
|
* @param {string} event Event name
|
|
68
|
-
* @param {...any}
|
|
68
|
+
* @param {...any} args Event args
|
|
69
69
|
* @returns {typeof PicoEvent} Event class
|
|
70
70
|
*/
|
|
71
71
|
static fire(event, ...args)
|
package/src/utils/Format.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PicoFormatParserPlugin } from "
|
|
2
|
-
import { PicoFormatParamPlugin } from "
|
|
3
|
-
import { PicoFormatOptionPlugin } from "
|
|
4
|
-
import { PicoFormatUrlPlugin } from "
|
|
5
|
-
import { PicoFormatFilePlugin } from "
|
|
1
|
+
import { PicoFormatParserPlugin } from "../format/FormatParser.js";
|
|
2
|
+
import { PicoFormatParamPlugin } from "../format/FormatParam.js";
|
|
3
|
+
import { PicoFormatOptionPlugin } from "../format/FormatOption.js";
|
|
4
|
+
import { PicoFormatUrlPlugin } from "../format/FormatUrl.js";
|
|
5
|
+
import { PicoFormatFilePlugin } from "../format/FormatFile.js";
|
|
6
6
|
|
|
7
7
|
export const PicoFormatPlugins = [
|
|
8
8
|
PicoFormatParserPlugin,
|
|
@@ -15,11 +15,11 @@ export const PicoFormatPlugins = [
|
|
|
15
15
|
/**
|
|
16
16
|
* @class PicoFormat
|
|
17
17
|
*
|
|
18
|
-
* @typedef {import('
|
|
19
|
-
* @typedef {import('
|
|
20
|
-
* @typedef {import('
|
|
21
|
-
* @typedef {import('
|
|
22
|
-
* @typedef {import('
|
|
18
|
+
* @typedef {import('../format/FormatParser.js').PicoFormatParserStatic} PicoFormatParserStatic
|
|
19
|
+
* @typedef {import('../format/FormatParam.js').PicoFormatParamStatic} PicoFormatParamStatic
|
|
20
|
+
* @typedef {import('../format/FormatOption.js').PicoFormatOptionStatic} PicoFormatOptionStatic
|
|
21
|
+
* @typedef {import('../format/FormatUrl.js').PicoFormatUrlStatic} PicoFormatUrlStatic
|
|
22
|
+
* @typedef {import('../format/FormatFile.js').PicoFormatFileStatic} PicoFormatFileStatic
|
|
23
23
|
*
|
|
24
24
|
* @mixes PicoFormatParserStatic
|
|
25
25
|
* @mixes PicoFormatParamStatic
|
package/src/utils/Hash.js
CHANGED
package/src/utils/Locale.js
CHANGED
package/src/utils/Mixed.js
CHANGED
package/src/utils/Now.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Arr, Dom, Mix, Now, Num } from "
|
|
2
|
-
import { PicoNowDefaultPlugin } from "
|
|
3
|
-
import { PicoNowFormatPlugin } from "
|
|
4
|
-
import { PicoNowMatchPlugin } from "
|
|
5
|
-
import { PicoNowGridPlugin } from "
|
|
6
|
-
import { PicoNowWalkerPlugin } from "
|
|
7
|
-
import { PicoNowRangePlugin } from "
|
|
8
|
-
import { PicoNowHumanPlugin } from "
|
|
1
|
+
import { Arr, Dom, Mix, Now, Num } from "../index.esm.js";
|
|
2
|
+
import { PicoNowDefaultPlugin } from "../now/NowDefault.js";
|
|
3
|
+
import { PicoNowFormatPlugin } from "../now/NowFormat.js";
|
|
4
|
+
import { PicoNowMatchPlugin } from "../now/NowMatch.js";
|
|
5
|
+
import { PicoNowGridPlugin } from "../now/NowGrid.js";
|
|
6
|
+
import { PicoNowWalkerPlugin } from "../now/NowWalker.js";
|
|
7
|
+
import { PicoNowRangePlugin } from "../now/NowRange.js";
|
|
8
|
+
import { PicoNowHumanPlugin } from "../now/NowHuman.js";
|
|
9
9
|
|
|
10
10
|
export const PicoNowPlugins = [
|
|
11
11
|
PicoNowDefaultPlugin,
|
|
@@ -20,13 +20,13 @@ export const PicoNowPlugins = [
|
|
|
20
20
|
/**
|
|
21
21
|
* @class PicoNow
|
|
22
22
|
*
|
|
23
|
-
* @typedef {import('
|
|
24
|
-
* @typedef {import('
|
|
25
|
-
* @typedef {import('
|
|
26
|
-
* @typedef {import('
|
|
27
|
-
* @typedef {import('
|
|
28
|
-
* @typedef {import('
|
|
29
|
-
* @typedef {import('
|
|
23
|
+
* @typedef {import('../now/NowMatch.js').PicoNowMatchInstance} PicoNowMatchInstance
|
|
24
|
+
* @typedef {import('../now/NowFormat.js').PicoNowFormatInstance} PicoNowFormatInstance
|
|
25
|
+
* @typedef {import('../now/NowMatch.js').PicoNowMatchInstance} PicoNowMatchInstance
|
|
26
|
+
* @typedef {import('../now/NowGrid.js').PicoNowGridInstance} PicoNowGridInstance
|
|
27
|
+
* @typedef {import('../now/NowWalker.js').PicoNowWalkerInstance} PicoNowWalkerInstance
|
|
28
|
+
* @typedef {import('../now/NowRange.js').PicoNowRangeInstance} PicoNowRangeInstance
|
|
29
|
+
* @typedef {import('../now/NowHuman.js').PicoNowHumanInstance} PicoNowHumanInstance
|
|
30
30
|
*
|
|
31
31
|
* @extends PicoNowDefaultInstance
|
|
32
32
|
* @extends PicoNowFormatInstance
|
package/src/utils/Number.js
CHANGED
package/src/utils/Object.js
CHANGED
package/src/utils/Route.js
CHANGED
package/src/utils/Runner.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Arr, Hash, Mix } from "
|
|
1
|
+
import { Arr, Hash, Mix } from "../index.esm.js";
|
|
2
2
|
|
|
3
3
|
export class PicoRunner
|
|
4
4
|
{
|
|
@@ -120,7 +120,7 @@ export class PicoRunner
|
|
|
120
120
|
* @example Run.frame(() => {}) // => Run
|
|
121
121
|
*
|
|
122
122
|
* @param {function} fn Callback to run
|
|
123
|
-
* @param {...any}
|
|
123
|
+
* @param {...any} args Callback args
|
|
124
124
|
* @returns {typeof PicoRunner} Runner class
|
|
125
125
|
*/
|
|
126
126
|
static frame(fn, ...args)
|
|
@@ -138,7 +138,7 @@ export class PicoRunner
|
|
|
138
138
|
* @example Run.async(() => {}) // => Run
|
|
139
139
|
*
|
|
140
140
|
* @param {function} fn Callback to run
|
|
141
|
-
* @param {...any}
|
|
141
|
+
* @param {...any} args Callback args
|
|
142
142
|
* @returns {typeof PicoRunner} Runner class
|
|
143
143
|
*/
|
|
144
144
|
static async(fn, ...args)
|
|
@@ -157,7 +157,7 @@ export class PicoRunner
|
|
|
157
157
|
*
|
|
158
158
|
* @param {function} fn Callback to run
|
|
159
159
|
* @param {number} [delay] Delay ms
|
|
160
|
-
* @param {...any}
|
|
160
|
+
* @param {...any} args Callback args
|
|
161
161
|
* @returns {function} Cancel function
|
|
162
162
|
*/
|
|
163
163
|
static delay(fn, delay = 0, ...args)
|
package/src/utils/String.js
CHANGED
package/src/wip/Element.js
CHANGED
|
@@ -71,7 +71,7 @@ export class PicoElement
|
|
|
71
71
|
*
|
|
72
72
|
* @param {string} key Alias key
|
|
73
73
|
* @param {any} instance Class instance
|
|
74
|
-
* @returns {
|
|
74
|
+
* @returns {PicoElement} Current class
|
|
75
75
|
*/
|
|
76
76
|
static alias(key, instance)
|
|
77
77
|
{
|
|
@@ -88,7 +88,7 @@ export class PicoElement
|
|
|
88
88
|
* @param {string} key Alias key
|
|
89
89
|
* @param {any} selector Dom selector
|
|
90
90
|
* @param {any} [options] Init options
|
|
91
|
-
* @returns {
|
|
91
|
+
* @returns {PicoElement} Current class
|
|
92
92
|
*/
|
|
93
93
|
static bind(key, selector, options = {})
|
|
94
94
|
{
|
|
@@ -135,7 +135,7 @@ export class PicoElement
|
|
|
135
135
|
* @param {string} key Alias key
|
|
136
136
|
* @param {any} selector Dom selector
|
|
137
137
|
* @param {any} [options] Init options
|
|
138
|
-
* @returns {
|
|
138
|
+
* @returns {PicoElement} Current class
|
|
139
139
|
*/
|
|
140
140
|
static unbind(key, selector, options = {})
|
|
141
141
|
{
|
|
@@ -175,7 +175,7 @@ export class PicoElement
|
|
|
175
175
|
*
|
|
176
176
|
* @param {string} key Alias key
|
|
177
177
|
* @param {boolean} [plain] Plain options
|
|
178
|
-
* @returns {
|
|
178
|
+
* @returns {PicoElement} Current class
|
|
179
179
|
*/
|
|
180
180
|
static observe(key, plain = false)
|
|
181
181
|
{
|
package/src/wip/Map.js
CHANGED
|
@@ -56,7 +56,7 @@ export class PicoMap
|
|
|
56
56
|
* @example Map.setMapStyle(style)
|
|
57
57
|
*
|
|
58
58
|
* @param {Array<any>} [style] Style array
|
|
59
|
-
* @returns {
|
|
59
|
+
* @returns {PicoMap} Current class
|
|
60
60
|
*/
|
|
61
61
|
static setMapStyle(style = [])
|
|
62
62
|
{
|
|
@@ -73,7 +73,7 @@ export class PicoMap
|
|
|
73
73
|
* @param {string} key Style key
|
|
74
74
|
* @param {any} [style] Style options
|
|
75
75
|
* @param {any} [extra] Extra options
|
|
76
|
-
* @returns {
|
|
76
|
+
* @returns {PicoMap} Current class
|
|
77
77
|
*/
|
|
78
78
|
static setMarkerStyle(key, style = {}, extra = {})
|
|
79
79
|
{
|
|
@@ -666,7 +666,7 @@ export class PicoMap
|
|
|
666
666
|
* @example map.showMarkers()
|
|
667
667
|
*
|
|
668
668
|
* @param {any} [filter] Marker filter
|
|
669
|
-
* @returns {
|
|
669
|
+
* @returns {PicoMap} Current instance
|
|
670
670
|
*/
|
|
671
671
|
showMarkers(filter = null)
|
|
672
672
|
{
|
|
@@ -722,7 +722,7 @@ export class PicoMap
|
|
|
722
722
|
* @param {any} [filter] Marker filter
|
|
723
723
|
* @param {number} [maxZoom] Max zoom level
|
|
724
724
|
* @param {number} [boundSpace] Viewport space
|
|
725
|
-
* @returns {
|
|
725
|
+
* @returns {PicoMap} Current instance
|
|
726
726
|
*/
|
|
727
727
|
focusMarkers(filter = null, maxZoom = 14, boundSpace = 15)
|
|
728
728
|
{
|