@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.
- package/README.md +27 -7
- package/dist/pico-js.browser.js +2 -0
- package/dist/pico-js.browser.js.map +1 -0
- package/dist/pico-js.esm.js +2 -0
- package/dist/pico-js.esm.js.map +1 -0
- package/package.json +20 -7
- package/src/dom/DomAttribute.js +374 -0
- package/src/dom/DomBuilder.js +152 -0
- package/src/dom/DomEvent.js +253 -0
- package/src/dom/DomFinder.js +669 -0
- package/src/dom/DomForm.js +57 -0
- package/src/dom/DomGlobal.js +193 -0
- package/src/dom/DomInview.js +332 -0
- package/src/dom/DomMeta.js +66 -0
- package/src/dom/DomObserver.js +57 -0
- package/src/dom/DomRectangle.js +657 -0
- package/src/format/FormatFile.js +54 -0
- package/src/format/FormatOption.js +108 -0
- package/src/format/FormatParam.js +107 -0
- package/src/format/FormatParser.js +156 -0
- package/src/format/FormatUrl.js +75 -0
- package/src/index.browser.js +10 -0
- package/src/index.esm.js +138 -0
- package/src/now/NowDefault.js +533 -0
- package/src/now/NowFormat.js +196 -0
- package/src/now/NowGrid.js +251 -0
- package/src/now/NowHuman.js +118 -0
- package/src/now/NowMatch.js +175 -0
- package/src/now/NowRange.js +70 -0
- package/src/now/NowWalker.js +544 -0
- package/src/tool/scope.js +103 -0
- package/src/utils/Array.js +986 -0
- package/src/utils/Cookie.js +184 -0
- package/src/utils/Data.js +200 -0
- package/src/utils/Dom.js +208 -0
- package/src/utils/Event.js +140 -0
- package/src/utils/Format.js +62 -0
- package/src/utils/Hash.js +164 -0
- package/src/utils/Locale.js +229 -0
- package/src/utils/Mixed.js +887 -0
- package/src/utils/Now.js +234 -0
- package/src/utils/Number.js +238 -0
- package/src/utils/Object.js +655 -0
- package/src/utils/Route.js +67 -0
- package/src/utils/Runner.js +327 -0
- package/src/utils/String.js +618 -0
- package/src/{library/element.js → wip/Element.js} +90 -16
- package/src/{library/map.js → wip/Map.js} +256 -40
- package/types/dom/DomAttribute.d.ts +137 -0
- package/types/dom/DomBuilder.d.ts +67 -0
- package/types/dom/DomEvent.d.ts +103 -0
- package/types/dom/DomFinder.d.ts +321 -0
- package/types/dom/DomForm.d.ts +21 -0
- package/types/dom/DomGlobal.d.ts +79 -0
- package/types/dom/DomInview.d.ts +114 -0
- package/types/dom/DomMeta.d.ts +29 -0
- package/types/dom/DomObserver.d.ts +21 -0
- package/types/dom/DomRectangle.d.ts +270 -0
- package/types/format/FormatFile.d.ts +18 -0
- package/types/format/FormatOption.d.ts +40 -0
- package/types/format/FormatParam.d.ts +39 -0
- package/types/format/FormatParser.d.ts +46 -0
- package/types/format/FormatUrl.d.ts +17 -0
- package/types/index.browser.d.ts +1 -0
- package/types/index.esm.d.ts +52 -0
- package/types/now/NowDefault.d.ts +183 -0
- package/types/now/NowFormat.d.ts +70 -0
- package/types/now/NowGrid.d.ts +107 -0
- package/types/now/NowHuman.d.ts +37 -0
- package/types/now/NowMatch.d.ts +108 -0
- package/types/now/NowRange.d.ts +21 -0
- package/types/now/NowWalker.d.ts +301 -0
- package/types/tool/scope.d.ts +24 -0
- package/types/utils/Array.d.ts +480 -0
- package/types/utils/Cookie.d.ts +60 -0
- package/types/utils/Data.d.ts +91 -0
- package/types/utils/Dom.d.ts +138 -0
- package/types/utils/Event.d.ts +58 -0
- package/types/utils/Format.d.ts +37 -0
- package/types/utils/Hash.d.ts +81 -0
- package/types/utils/Locale.d.ts +115 -0
- package/types/utils/Mixed.d.ts +469 -0
- package/types/utils/Now.d.ts +125 -0
- package/types/utils/Number.d.ts +127 -0
- package/types/utils/Object.d.ts +255 -0
- package/types/utils/Route.d.ts +37 -0
- package/types/utils/Runner.d.ts +139 -0
- package/types/utils/String.d.ts +330 -0
- package/types/wip/Element.d.ts +119 -0
- package/types/wip/Map.d.ts +254 -0
- package/dist/.ignore.js +0 -0
- package/dist/pico-js.js +0 -2
- package/dist/pico-js.js.map +0 -1
- package/src/element/default.js +0 -46
- package/src/element/example.js +0 -58
- package/src/index.js +0 -90
- package/src/library/cookie.js +0 -123
- package/src/library/data.js +0 -111
- package/src/library/event.js +0 -91
- package/src/library/locale.js +0 -84
- package/src/library/queue.js +0 -64
- package/src/library/route.js +0 -28
- package/src/utility/any.js +0 -369
- package/src/utility/array.js +0 -410
- package/src/utility/dom.js +0 -1425
- package/src/utility/now.js +0 -544
- package/src/utility/number.js +0 -128
- package/src/utility/object.js +0 -429
- package/src/utility/string.js +0 -328
- package/types/index.d.ts +0 -77
- package/types/library/cookie.d.ts +0 -10
- package/types/library/data.d.ts +0 -15
- package/types/library/element.d.ts +0 -22
- package/types/library/event.d.ts +0 -13
- package/types/library/locale.d.ts +0 -14
- package/types/library/map.d.ts +0 -43
- package/types/library/queue.d.ts +0 -18
- package/types/library/route.d.ts +0 -11
- package/types/utility/any.d.ts +0 -35
- package/types/utility/array.d.ts +0 -46
- package/types/utility/dom.d.ts +0 -101
- package/types/utility/now.d.ts +0 -79
- package/types/utility/number.d.ts +0 -17
- package/types/utility/object.d.ts +0 -29
- package/types/utility/string.d.ts +0 -26
package/types/utility/dom.d.ts
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
// types/utility/dom.d.ts
|
|
2
|
-
|
|
3
|
-
declare class Dom {
|
|
4
|
-
el: any;
|
|
5
|
-
static events: any[];
|
|
6
|
-
static datas: any[];
|
|
7
|
-
|
|
8
|
-
constructor(el: any);
|
|
9
|
-
|
|
10
|
-
static ready(callback: Function, delay?: number, count?: number): typeof Dom;
|
|
11
|
-
static complete(callback: Function, delay?: number, count?: number): typeof Dom;
|
|
12
|
-
static required(callback: Function, globals?: string[], timer?: number): typeof Dom;
|
|
13
|
-
static find(element: any): Dom;
|
|
14
|
-
static make(element: any, options?: any): Dom;
|
|
15
|
-
static location(posx: number, posy: number): Dom;
|
|
16
|
-
static title(text?: string, glue?: string): typeof Dom;
|
|
17
|
-
|
|
18
|
-
length(): number;
|
|
19
|
-
empty(): boolean;
|
|
20
|
-
visible(): boolean;
|
|
21
|
-
inviewX(ratio?: number): boolean;
|
|
22
|
-
inviewY(ratio?: number): boolean;
|
|
23
|
-
is(selector: string): boolean;
|
|
24
|
-
isParent(selector: any): boolean;
|
|
25
|
-
first(offset?: number): any;
|
|
26
|
-
last(offset?: number): any;
|
|
27
|
-
get(index?: number): any;
|
|
28
|
-
getNot(el: any): Dom | null;
|
|
29
|
-
each(callback: Function): any;
|
|
30
|
-
matches(selector: string): boolean;
|
|
31
|
-
closest(selector: any): any;
|
|
32
|
-
closestScrollable(fallback?: any): any;
|
|
33
|
-
contains(selector: any): boolean;
|
|
34
|
-
inside(selector: any): boolean;
|
|
35
|
-
parent(): Dom;
|
|
36
|
-
child(selector: any): Dom;
|
|
37
|
-
childs(selector?: any, filter?: boolean): Dom;
|
|
38
|
-
find(selector: string): Dom;
|
|
39
|
-
where(selector: string): Dom;
|
|
40
|
-
not(selector: string): Dom;
|
|
41
|
-
prepend(val: any): this;
|
|
42
|
-
prependTo(el: any): this;
|
|
43
|
-
append(val: any): this;
|
|
44
|
-
appendTo(el: any): this;
|
|
45
|
-
replace(el: any): this;
|
|
46
|
-
previous(): Dom;
|
|
47
|
-
next(): Dom;
|
|
48
|
-
loaded(callback: Function): this;
|
|
49
|
-
bind(event: string, callback: Function): this;
|
|
50
|
-
unbind(event: string): void;
|
|
51
|
-
on(event: string | string[], callback: Function, options?: any, paused?: boolean): this;
|
|
52
|
-
live(event: string | string[], selector: string, callback: Function, options?: any, paused?: boolean): this;
|
|
53
|
-
one(event: string, callback: Function, options?: any): this;
|
|
54
|
-
fire(event: string): this;
|
|
55
|
-
delayed(event: string, callback: Function, delay?: number, options?: any): this;
|
|
56
|
-
off(event: string | string[], selector?: string, options?: any): this;
|
|
57
|
-
unpause(event: string | string[], selector?: string, options?: any): this;
|
|
58
|
-
pause(event: string | string[], selector?: string, options?: any): this;
|
|
59
|
-
observer(callback: Function, initial?: boolean): Function;
|
|
60
|
-
observerResize(callback: Function, initial?: boolean): Function;
|
|
61
|
-
data(key?: any, val?: any, fallback?: any): any;
|
|
62
|
-
value(val?: any): any;
|
|
63
|
-
html(html: string): this;
|
|
64
|
-
computed(key?: string, fallback?: any): any;
|
|
65
|
-
css(vals?: any): any;
|
|
66
|
-
class(vals: string | string[]): void;
|
|
67
|
-
hasClass(vals: string | string[]): boolean;
|
|
68
|
-
addClass(vals: string | string[]): this | void;
|
|
69
|
-
removeClass(vals: string | string[]): this | void;
|
|
70
|
-
toggleClass(vals: string | string[]): this;
|
|
71
|
-
attr(attr: any, val?: any): any;
|
|
72
|
-
actual(callback: Function, val?: any): any;
|
|
73
|
-
loopParent(callback: Function, target?: any): boolean;
|
|
74
|
-
loopOffsetParent(callback: Function, target?: any): boolean;
|
|
75
|
-
offset(key?: string, boundry?: any): any;
|
|
76
|
-
offsetTop(boundry?: any): number;
|
|
77
|
-
offsetBottom(boundry?: any): number;
|
|
78
|
-
offsetLeft(boundry?: any): number;
|
|
79
|
-
offsetRight(boundry?: any): number;
|
|
80
|
-
scroll(key?: string, boundry?: any): any;
|
|
81
|
-
scrollTop(val?: number, boundry?: any): number | this;
|
|
82
|
-
scrollTopGlobal(): number;
|
|
83
|
-
scrollLeft(val?: number, boundry?: any): number | this;
|
|
84
|
-
scrollLeftGlobal(): number;
|
|
85
|
-
margin(key?: string): any;
|
|
86
|
-
padding(key?: string): any;
|
|
87
|
-
height(): number;
|
|
88
|
-
clientHeight(): number;
|
|
89
|
-
scrollHeight(): number;
|
|
90
|
-
innerHeight(): number;
|
|
91
|
-
realHeight(styles?: any): number | string;
|
|
92
|
-
evaluateHeight(target?: any, auto?: boolean): number | string;
|
|
93
|
-
width(): number;
|
|
94
|
-
clientWidth(): number;
|
|
95
|
-
scrollWidth(): number;
|
|
96
|
-
innerWidth(): number;
|
|
97
|
-
realWidth(styles?: any): number;
|
|
98
|
-
evaluateWidth(target?: any, auto?: boolean): number | string;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export default Dom;
|
package/types/utility/now.d.ts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
// types/utility/now.d.ts
|
|
2
|
-
|
|
3
|
-
declare class Now {
|
|
4
|
-
initialDate: any;
|
|
5
|
-
moment: any;
|
|
6
|
-
|
|
7
|
-
constructor(date?: any, format?: string);
|
|
8
|
-
|
|
9
|
-
static make(date?: any, format?: string): Now;
|
|
10
|
-
|
|
11
|
-
get(): any;
|
|
12
|
-
valid(): boolean;
|
|
13
|
-
clone(): Now;
|
|
14
|
-
code(format?: string): number;
|
|
15
|
-
format(format?: string, force?: boolean): string;
|
|
16
|
-
before(before?: any): boolean;
|
|
17
|
-
beforeDate(before?: any): boolean;
|
|
18
|
-
beforeTime(before?: any): boolean;
|
|
19
|
-
after(after?: any): boolean;
|
|
20
|
-
afterDate(after?: any): boolean;
|
|
21
|
-
afterTime(after?: any): boolean;
|
|
22
|
-
equal(equal?: any, format?: string): boolean;
|
|
23
|
-
equalDate(equal?: any, format?: string): boolean;
|
|
24
|
-
equalTime(equal?: any, format?: string): boolean;
|
|
25
|
-
between(fromDate?: any, toDate?: any, format?: string): boolean;
|
|
26
|
-
decade(): number;
|
|
27
|
-
prevDecade(): Now;
|
|
28
|
-
nextDecade(): Now;
|
|
29
|
-
addDecades(count?: number): Now;
|
|
30
|
-
subDecades(count?: number): Now;
|
|
31
|
-
year(year?: number): number | Now;
|
|
32
|
-
prevYear(): Now;
|
|
33
|
-
nextYear(): Now;
|
|
34
|
-
addYears(count?: number): Now;
|
|
35
|
-
subYears(count?: number): Now;
|
|
36
|
-
month(month?: number): number | Now;
|
|
37
|
-
addMonths(count?: number): Now;
|
|
38
|
-
subMonths(count?: number): Now;
|
|
39
|
-
prevMonth(): Now;
|
|
40
|
-
nextMonth(): Now;
|
|
41
|
-
date(date?: number): number | Now;
|
|
42
|
-
addDates(count?: number): Now;
|
|
43
|
-
subDates(count?: number): Now;
|
|
44
|
-
prevDate(): Now;
|
|
45
|
-
nextDate(): Now;
|
|
46
|
-
lastDate(): number;
|
|
47
|
-
day(day?: number): number | Now;
|
|
48
|
-
hour(hour?: number): number | Now;
|
|
49
|
-
addHour(count?: number): Now;
|
|
50
|
-
subHour(count?: number): Now;
|
|
51
|
-
prevHour(): Now;
|
|
52
|
-
nextHour(): Now;
|
|
53
|
-
minute(minute?: number): number | Now;
|
|
54
|
-
addMinute(count?: number): Now;
|
|
55
|
-
subMinute(count?: number): Now;
|
|
56
|
-
prevMinute(): Now;
|
|
57
|
-
nextMinute(): Now;
|
|
58
|
-
second(second?: number): number | Now;
|
|
59
|
-
addSecond(count?: number): Now;
|
|
60
|
-
subSecond(count?: number): Now;
|
|
61
|
-
prevSecond(): Now;
|
|
62
|
-
nextSecond(): Now;
|
|
63
|
-
humanDay(): number;
|
|
64
|
-
humanMonth(): number;
|
|
65
|
-
getMonths(): Now[];
|
|
66
|
-
getYears(): Now[];
|
|
67
|
-
getYearsGrid(size?: number): Now[];
|
|
68
|
-
getDates(): Now[];
|
|
69
|
-
getDatesRange(target?: any): Now[];
|
|
70
|
-
getDatesGrid(start?: number, end?: number): Now[];
|
|
71
|
-
getHours(interval?: number): Now[];
|
|
72
|
-
getMinutes(interval?: number): Now[];
|
|
73
|
-
getSeconds(interval?: number): Now[];
|
|
74
|
-
resetTime(): Now;
|
|
75
|
-
applyDate(now: any, format?: string): void;
|
|
76
|
-
applyTime(now: any, format?: string): void;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export default Now;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// types/utility/number.d.ts
|
|
2
|
-
|
|
3
|
-
declare class Num {
|
|
4
|
-
static int(num: any): number;
|
|
5
|
-
static float(num: any): number;
|
|
6
|
-
static ceil(num: number): number;
|
|
7
|
-
static round(num: number): number;
|
|
8
|
-
static floor(num: number): number;
|
|
9
|
-
static fixed(num: any, fixed?: number): string;
|
|
10
|
-
static random(start?: number, end?: number): number;
|
|
11
|
-
static matrix(num: number, limit?: number, base?: number[]): number[];
|
|
12
|
-
static combine(arr: number[]): number;
|
|
13
|
-
static distance(cord1: any, cord2: any, miles?: boolean): number;
|
|
14
|
-
static format(num: number, decimal?: string, thousand?: string, fixed?: number): string | null;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export default Num;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// types/utility/object.d.ts
|
|
2
|
-
|
|
3
|
-
declare class Obj {
|
|
4
|
-
static has(obj: any, keys: any): boolean;
|
|
5
|
-
static empty(obj: any, key: string): boolean;
|
|
6
|
-
static get(obj: any, keys: any, fallback?: any): any;
|
|
7
|
-
static set(obj: any, keys: any, val: any): any;
|
|
8
|
-
static unset(obj: any, keys: any): any;
|
|
9
|
-
static pluck(obj: any, keys: any, fallback?: any): any;
|
|
10
|
-
static only(obj: any, keys: any, assign?: any): any;
|
|
11
|
-
static except(obj: any, keys: any, assign?: any): any;
|
|
12
|
-
static includes(obj: any, val: any): boolean;
|
|
13
|
-
static matches(obj: any, val: any): boolean;
|
|
14
|
-
static sort(obj: any, key: any): any[];
|
|
15
|
-
static sortString(obj: any, key: any): any[];
|
|
16
|
-
static filter(obj: any, filter: any): any;
|
|
17
|
-
static filterIndex(obj: any, filter: any): any[];
|
|
18
|
-
static find(arr: any, obj: any, fallback?: any): any;
|
|
19
|
-
static findIndex(arr: any, obj: any, fallback?: number): any;
|
|
20
|
-
static clone(obj: any): any;
|
|
21
|
-
static assign(...args: any[]): any;
|
|
22
|
-
static remove(obj: any, keys: any[]): any;
|
|
23
|
-
static each(obj: any, callback: Function): any;
|
|
24
|
-
static map(obj: any, callback: Function): any;
|
|
25
|
-
static values(obj: any): any[];
|
|
26
|
-
static flatten(obj: any): any;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default Obj;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// types/utility/string.d.ts
|
|
2
|
-
|
|
3
|
-
export class Str {
|
|
4
|
-
static regexEscape(val: any): string;
|
|
5
|
-
static upper(val: any): string;
|
|
6
|
-
static lower(val: any): string;
|
|
7
|
-
static camelcase(val: any): string;
|
|
8
|
-
static humancase(val: any): string;
|
|
9
|
-
static slugify(val: any): string;
|
|
10
|
-
static ucfirst(val: string): string;
|
|
11
|
-
static lcfirst(val: string): string;
|
|
12
|
-
static has(val: string, search: string): boolean;
|
|
13
|
-
static filesize(val: number, decimals?: number): string | null;
|
|
14
|
-
static array(value: string, fallback?: any[]): any[];
|
|
15
|
-
static real(value: any): any;
|
|
16
|
-
static objectify(value: any, mode?: string, isArray?: boolean): any;
|
|
17
|
-
static stringify(value: any, mode?: string): string;
|
|
18
|
-
static options(params: any, quota?: string | null): string;
|
|
19
|
-
static fromOptions(value: string, isArray?: boolean): any;
|
|
20
|
-
static convertFromOptions(result: any, match: string): any;
|
|
21
|
-
static params(params: any, quota?: string | null): string;
|
|
22
|
-
static fromParams(value: string, isArray?: boolean): any;
|
|
23
|
-
static convertFromParams(result: any, match: string): any;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export default Str;
|