@kizmann/pico-js 2.0.6 → 2.0.7

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.
@@ -98,9 +98,10 @@ export class PicoDomEventInstance {
98
98
  * @example Dom.find("div").fire("click")
99
99
  *
100
100
  * @param {string} event Event name
101
+ * @param {object} [detail] Event detail
101
102
  * @returns {PicoDom} Current instance
102
103
  */
103
- fire(event: string): PicoDom;
104
+ fire(event: string, detail?: object): PicoDom;
104
105
  /**
105
106
  * @see PicoDom.once
106
107
  */
@@ -213,6 +213,7 @@ export class PicoDomFinderInstance {
213
213
  * @returns {Element} Found element
214
214
  */
215
215
  closest(selector: any): Element;
216
+ upnode(selector: any): PicoDom;
216
217
  /**
217
218
  * Get previous element
218
219
  *
@@ -8,15 +8,6 @@ export class PicoDomObserverStatic {
8
8
  * @extends {PicoDom}
9
9
  */
10
10
  export class PicoDomObserverInstance {
11
- /**
12
- * Get or set element value
13
- *
14
- * @example Dom.find("input").value("hello")
15
- *
16
- * @param {any} [value] New value
17
- * @returns {any|PicoDom} Value or instance
18
- */
19
- value(value?: any): any | PicoDom;
20
11
  }
21
12
  export function PicoDomObserverPlugin(self: typeof PicoDom): typeof PicoDom;
22
13
  import { PicoDom } from "../utils/Dom.js";
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @memberof PicoDom
3
+ */
4
+ export class PicoDomPopoverStatic {
5
+ }
6
+ /**
7
+ * @memberof PicoDom
8
+ * @extends {PicoDom}
9
+ */
10
+ export class PicoDomPopoverInstance {
11
+ popover(target: any, position?: string, options?: {}): any;
12
+ popoverY(target: any, position?: string, options?: {}): any;
13
+ popoverX(target: any, position?: string, options?: {}): any;
14
+ popoverNormalize(offset: any, self: any, rect: any, win: any): any;
15
+ }
16
+ export function PicoDomPopoverPlugin(self: typeof PicoDom): typeof PicoDom;
17
+ import { PicoDom } from "../utils/Dom.js";
@@ -17,6 +17,7 @@ export class PicoDomRectangleStatic {
17
17
  * @extends {PicoDom}
18
18
  */
19
19
  export class PicoDomRectangleInstance {
20
+ rect(fallback?: {}): any;
20
21
  /**
21
22
  * Get margin values
22
23
  *
@@ -2,6 +2,10 @@
2
2
  * @type {typeof PicoMixed}
3
3
  */
4
4
  export const Any: typeof PicoMixed;
5
+ /**
6
+ * @type {typeof PicoMixed}
7
+ */
8
+ export const Event: typeof PicoMixed;
5
9
  export function UUID(): string;
6
10
  /**
7
11
  * @type {typeof PicoDom}
@@ -22,7 +26,7 @@ import { default as Arr } from "./utils/Array.js";
22
26
  import { default as Obj } from "./utils/Object.js";
23
27
  import { default as Mix } from "./utils/Mixed.js";
24
28
  import { default as Hash } from "./utils/Hash.js";
25
- import { default as Event } from "./utils/Event.js";
29
+ import { default as Signal } from "./utils/Signal.js";
26
30
  import { default as Locale } from "./utils/Locale.js";
27
31
  import { default as Cookie } from "./utils/Cookie.js";
28
32
  import { go } from "./tool/scope.js";
@@ -36,4 +40,4 @@ import { PicoMixed } from "./utils/Mixed.js";
36
40
  import { PicoDom } from "./utils/Dom.js";
37
41
  import { PicoNow } from "./utils/Now.js";
38
42
  import { PicoFormat } from "./utils/Format.js";
39
- export { Run, Str, Num, Arr, Obj, Mix, Hash, Event, Locale, Cookie, go, browser, device, Map, Data, Route, Element };
43
+ export { Run, Str, Num, Arr, Obj, Mix, Hash, Signal, Locale, Cookie, go, browser, device, Map, Data, Route, Element };
@@ -3,6 +3,9 @@ export namespace NOW_FORMAT {
3
3
  let LL: string;
4
4
  let LLL: string;
5
5
  let LLLL: string;
6
+ let LT: string;
7
+ let LTS: string;
8
+ let LTSD: string;
6
9
  }
7
10
  export namespace NOW_PARSE {
8
11
  let second: string;
@@ -23,6 +23,8 @@ export const PicoDomPlugins: ((self: typeof PicoDom) => typeof PicoDom)[];
23
23
  * @typedef {import('../dom/DomMeta.js').PicoDomMetaInstance} PicoDomMetaInstance
24
24
  * @typedef {import('../dom/DomObserver.js').PicoDomObserverStatic} PicoDomObserverStatic
25
25
  * @typedef {import('../dom/DomObserver.js').PicoDomObserverInstance} PicoDomObserverInstance
26
+ * @typedef {import('../dom/DomPopover.js').PicoDomPopoverStatic} PicoDomPopoverStatic
27
+ * @typedef {import('../dom/DomPopover.js').PicoDomPopoverInstance} PicoDomPopoverInstance
26
28
  *
27
29
  * @mixes PicoDomFinderStatic
28
30
  * @mixes PicoDomGlobalStatic
@@ -34,6 +36,7 @@ export const PicoDomPlugins: ((self: typeof PicoDom) => typeof PicoDom)[];
34
36
  * @mixes PicoDomInviewStatic
35
37
  * @mixes PicoDomMetaStatic
36
38
  * @mixes PicoDomObserverStatic
39
+ * @mixes PicoDomPopoverStatic
37
40
  *
38
41
  * @extends PicoDomFinderInstance
39
42
  * @extends PicoDomGlobalInstance
@@ -45,6 +48,7 @@ export const PicoDomPlugins: ((self: typeof PicoDom) => typeof PicoDom)[];
45
48
  * @extends PicoDomInviewInstance
46
49
  * @extends PicoDomMetaInstance
47
50
  * @extends PicoDomObserverInstance
51
+ * @extends PicoDomPopoverInstance
48
52
  */
49
53
  export class PicoDom {
50
54
  /**
@@ -136,3 +140,5 @@ export type PicoDomMetaStatic = import("../dom/DomMeta.js").PicoDomMetaStatic;
136
140
  export type PicoDomMetaInstance = import("../dom/DomMeta.js").PicoDomMetaInstance;
137
141
  export type PicoDomObserverStatic = import("../dom/DomObserver.js").PicoDomObserverStatic;
138
142
  export type PicoDomObserverInstance = import("../dom/DomObserver.js").PicoDomObserverInstance;
143
+ export type PicoDomPopoverStatic = import("../dom/DomPopover.js").PicoDomPopoverStatic;
144
+ export type PicoDomPopoverInstance = import("../dom/DomPopover.js").PicoDomPopoverInstance;
@@ -1,4 +1,4 @@
1
- export class PicoEvent {
1
+ export class PicoSignal {
2
2
  static $events: any[];
3
3
  /**
4
4
  * Bind callback to event name
@@ -10,9 +10,9 @@ export class PicoEvent {
10
10
  * @param {function} cb Event callback
11
11
  * @param {any} [options] Listener options
12
12
  * @param {boolean} [paused] Start paused
13
- * @returns {typeof PicoEvent} Event class
13
+ * @returns {typeof PicoSignal} Event class
14
14
  */
15
- static bind(event: any, cb: Function, options?: any, paused?: boolean): typeof PicoEvent;
15
+ static bind(event: any, cb: Function, options?: any, paused?: boolean): typeof PicoSignal;
16
16
  /**
17
17
  * Unbind callback(s) from event
18
18
  *
@@ -21,9 +21,9 @@ export class PicoEvent {
21
21
  *
22
22
  * @param {any} event Event name(s)
23
23
  * @param {any} [options] Listener options
24
- * @returns {typeof PicoEvent} Event class
24
+ * @returns {typeof PicoSignal} Event class
25
25
  */
26
- static unbind(event: any, options?: any): typeof PicoEvent;
26
+ static unbind(event: any, options?: any): typeof PicoSignal;
27
27
  /**
28
28
  * Fire event with arguments
29
29
  *
@@ -31,9 +31,9 @@ export class PicoEvent {
31
31
  *
32
32
  * @param {string} event Event name
33
33
  * @param {...any} args Event args
34
- * @returns {typeof PicoEvent} Event class
34
+ * @returns {typeof PicoSignal} Event class
35
35
  */
36
- static fire(event: string, ...args: any[]): typeof PicoEvent;
36
+ static fire(event: string, ...args: any[]): typeof PicoSignal;
37
37
  /**
38
38
  * Pause listeners for event
39
39
  *
@@ -41,9 +41,9 @@ export class PicoEvent {
41
41
  *
42
42
  * @param {any} event Event name(s)
43
43
  * @param {any} [options] Listener options
44
- * @returns {typeof PicoEvent} Event class
44
+ * @returns {typeof PicoSignal} Event class
45
45
  */
46
- static pause(event: any, options?: any): typeof PicoEvent;
46
+ static pause(event: any, options?: any): typeof PicoSignal;
47
47
  /**
48
48
  * Unpause listeners for event
49
49
  *
@@ -51,8 +51,8 @@ export class PicoEvent {
51
51
  *
52
52
  * @param {any} event Event name(s)
53
53
  * @param {any} [options] Listener options
54
- * @returns {typeof PicoEvent} Event class
54
+ * @returns {typeof PicoSignal} Event class
55
55
  */
56
- static unpause(event: any, options?: any): typeof PicoEvent;
56
+ static unpause(event: any, options?: any): typeof PicoSignal;
57
57
  }
58
- export default Event;
58
+ export default PicoSignal;