@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.
Files changed (78) 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 +7 -2
  6. package/src/dom/DomAttribute.js +13 -11
  7. package/src/dom/DomBuilder.js +9 -7
  8. package/src/dom/DomEvent.js +11 -9
  9. package/src/dom/DomFinder.js +7 -5
  10. package/src/dom/DomForm.js +5 -3
  11. package/src/dom/DomGlobal.js +7 -5
  12. package/src/dom/DomInview.js +4 -2
  13. package/src/dom/DomMeta.js +5 -3
  14. package/src/dom/DomObserver.js +5 -3
  15. package/src/dom/DomRectangle.js +7 -6
  16. package/src/format/FormatFile.js +4 -2
  17. package/src/format/FormatOption.js +4 -2
  18. package/src/format/FormatParam.js +4 -2
  19. package/src/format/FormatParser.js +4 -2
  20. package/src/format/FormatUrl.js +4 -2
  21. package/src/index.browser.js +29 -9
  22. package/src/index.esm.js +46 -68
  23. package/src/now/NowDefault.js +4 -2
  24. package/src/now/NowFormat.js +4 -2
  25. package/src/now/NowGrid.js +4 -2
  26. package/src/now/NowHuman.js +4 -2
  27. package/src/now/NowMatch.js +4 -2
  28. package/src/now/NowRange.js +4 -2
  29. package/src/now/NowWalker.js +4 -2
  30. package/src/utils/Array.js +1 -1
  31. package/src/utils/Cookie.js +1 -1
  32. package/src/utils/Data.js +1 -1
  33. package/src/utils/Dom.js +28 -28
  34. package/src/utils/Event.js +2 -2
  35. package/src/utils/Format.js +10 -10
  36. package/src/utils/Hash.js +1 -1
  37. package/src/utils/Locale.js +1 -1
  38. package/src/utils/Mixed.js +1 -1
  39. package/src/utils/Now.js +15 -15
  40. package/src/utils/Number.js +1 -1
  41. package/src/utils/Object.js +1 -1
  42. package/src/utils/Route.js +1 -1
  43. package/src/utils/Runner.js +4 -4
  44. package/src/utils/String.js +1 -1
  45. package/src/wip/Element.js +4 -4
  46. package/src/wip/Map.js +4 -4
  47. package/types/dom/DomAttribute.d.ts +21 -20
  48. package/types/dom/DomBuilder.d.ts +12 -11
  49. package/types/dom/DomEvent.d.ts +17 -16
  50. package/types/dom/DomFinder.d.ts +8 -7
  51. package/types/dom/DomForm.d.ts +4 -3
  52. package/types/dom/DomGlobal.d.ts +8 -7
  53. package/types/dom/DomInview.d.ts +2 -1
  54. package/types/dom/DomMeta.d.ts +4 -3
  55. package/types/dom/DomObserver.d.ts +4 -3
  56. package/types/dom/DomRectangle.d.ts +9 -8
  57. package/types/format/FormatFile.d.ts +2 -1
  58. package/types/format/FormatOption.d.ts +2 -1
  59. package/types/format/FormatParam.d.ts +2 -1
  60. package/types/format/FormatParser.d.ts +2 -1
  61. package/types/format/FormatUrl.d.ts +2 -1
  62. package/types/index.esm.d.ts +67 -41
  63. package/types/now/NowDefault.d.ts +2 -1
  64. package/types/now/NowFormat.d.ts +2 -1
  65. package/types/now/NowGrid.d.ts +2 -1
  66. package/types/now/NowHuman.d.ts +2 -1
  67. package/types/now/NowMatch.d.ts +2 -1
  68. package/types/now/NowRange.d.ts +2 -1
  69. package/types/now/NowWalker.d.ts +2 -1
  70. package/types/utils/Array.d.ts +6 -6
  71. package/types/utils/Dom.d.ts +35 -35
  72. package/types/utils/Event.d.ts +2 -2
  73. package/types/utils/Format.d.ts +11 -11
  74. package/types/utils/Now.d.ts +14 -14
  75. package/types/utils/Runner.d.ts +6 -6
  76. package/types/wip/Element.d.ts +8 -8
  77. package/types/wip/Map.d.ts +8 -8
  78. package/types/index.browser.d.ts +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kizmann/pico-js",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "private": false,
@@ -9,6 +9,12 @@
9
9
  "main": "src/index.esm.js",
10
10
  "unpkg": "dist/pico-js.browser.js",
11
11
  "types": "types/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./types/index.d.ts",
15
+ "import": "./src/index.esm.js"
16
+ }
17
+ },
12
18
  "imports": {
13
19
  "#src/*": "./src/*"
14
20
  },
@@ -49,7 +55,6 @@
49
55
  "sass-loader": "^12.0.0",
50
56
  "terser-webpack-plugin": "^4.2.3",
51
57
  "tinybench": "^6.0.0",
52
- "tsc-alias": "^1.8.16",
53
58
  "typescript": "^5.9.3",
54
59
  "webpack": "^5.0.0",
55
60
  "webpack-cli": "^4.0.0",
@@ -1,4 +1,5 @@
1
- import { Arr, Dom, For, Mix, Obj } from "#src/index.esm.js";
1
+ import { Arr, Dom, For, Mix, Obj } from "../index.esm.js";
2
+ import { PicoDom } from "../utils/Dom.js";
2
3
 
3
4
  /**
4
5
  * @memberof PicoDom
@@ -22,7 +23,7 @@ export class PicoDomAttributeInstance
22
23
  * @param {string} key Attr key
23
24
  * @param {any} [value] Attr value
24
25
  * @param {any} [fallback] Fallback value
25
- * @returns {any|this} Attr value or instance
26
+ * @returns {any|PicoDom} Attr value or instance
26
27
  */
27
28
  attr(key, value = undefined, fallback = null)
28
29
  {
@@ -61,7 +62,7 @@ export class PicoDomAttributeInstance
61
62
  * @param {string} key Data key
62
63
  * @param {any} [value] Data value
63
64
  * @param {any} [fallback] Fallback value
64
- * @returns {any|this} Data value or instance
65
+ * @returns {any|PicoDom} Data value or instance
65
66
  */
66
67
  data(key, value = undefined, fallback = null)
67
68
  {
@@ -103,7 +104,7 @@ export class PicoDomAttributeInstance
103
104
  *
104
105
  * @param {any} [value] Style value
105
106
  * @param {boolean} [combine] Combine style
106
- * @returns {any|this} Style or instance
107
+ * @returns {any|PicoDom} Style or instance
107
108
  */
108
109
  style(value = undefined, combine = true)
109
110
  {
@@ -141,7 +142,7 @@ export class PicoDomAttributeInstance
141
142
  *
142
143
  * @param {any} [value] Class value
143
144
  * @param {boolean} [combine] Combine classes
144
- * @returns {any|this} Classes or instance
145
+ * @returns {any|PicoDom} Classes or instance
145
146
  */
146
147
  class(value = undefined, combine = false)
147
148
  {
@@ -178,7 +179,7 @@ export class PicoDomAttributeInstance
178
179
  * @example Dom.find("div").html("<span></span>")
179
180
  *
180
181
  * @param {any} [html] HTML content
181
- * @returns {string|this} HTML or instance
182
+ * @returns {string|PicoDom} HTML or instance
182
183
  */
183
184
  html(html = undefined)
184
185
  {
@@ -238,7 +239,7 @@ export class PicoDomAttributeInstance
238
239
  * @example Dom.find("div").addClass("active")
239
240
  *
240
241
  * @param {any} cls Class name
241
- * @returns {this} Current instance
242
+ * @returns {PicoDom} Current instance
242
243
  */
243
244
  addClass(cls)
244
245
  {
@@ -269,7 +270,7 @@ export class PicoDomAttributeInstance
269
270
  * @example Dom.find("div").remClass("active")
270
271
  *
271
272
  * @param {any} cls Class name
272
- * @returns {this} Current instance
273
+ * @returns {PicoDom} Current instance
273
274
  */
274
275
  remClass(cls)
275
276
  {
@@ -300,7 +301,7 @@ export class PicoDomAttributeInstance
300
301
  * @example Dom.find("div").toggleClass("active")
301
302
  *
302
303
  * @param {any} cls Class name
303
- * @returns {this} Current instance
304
+ * @returns {PicoDom} Current instance
304
305
  */
305
306
  toggleClass(cls)
306
307
  {
@@ -322,7 +323,7 @@ export class PicoDomAttributeInstance
322
323
  *
323
324
  * @param {any} cls Class name
324
325
  * @param {boolean} [state] Target state
325
- * @returns {this} Current instance
326
+ * @returns {PicoDom} Current instance
326
327
  */
327
328
  stateClass(cls, state = true)
328
329
  {
@@ -356,7 +357,8 @@ PicoDomAttributeInstance.prototype.removeClass = function (...args) {
356
357
  };
357
358
 
358
359
  /**
359
- * @returns {typeof import('#src/utils/Dom.js').PicoDom}
360
+ * @param {typeof PicoDom} self
361
+ * @returns {typeof PicoDom}
360
362
  */
361
363
  export const PicoDomAttributePlugin = function (self) {
362
364
 
@@ -1,4 +1,5 @@
1
- import { Arr, Dom, Mix, Obj } from "#src/index.esm.js";
1
+ import { Arr, Dom, Mix, Obj } from "../index.esm.js";
2
+ import { PicoDom } from "../utils/Dom.js";
2
3
 
3
4
  /**
4
5
  * @memberof PicoDom
@@ -52,7 +53,7 @@ export class PicoDomBuilderInstance
52
53
  * @example Dom.find("div").prepend("<span></span>")
53
54
  *
54
55
  * @param {any} value Prepend value
55
- * @returns {this} Current instance
56
+ * @returns {PicoDom} Current instance
56
57
  */
57
58
  prepend(value)
58
59
  {
@@ -69,7 +70,7 @@ export class PicoDomBuilderInstance
69
70
  * @example Dom.find("span").prependTo("div")
70
71
  *
71
72
  * @param {any} value Target element
72
- * @returns {this} Current instance
73
+ * @returns {PicoDom} Current instance
73
74
  */
74
75
  prependTo(value)
75
76
  {
@@ -86,7 +87,7 @@ export class PicoDomBuilderInstance
86
87
  * @example Dom.find("div").append("<span></span>")
87
88
  *
88
89
  * @param {any} value Append value
89
- * @returns {this} Current instance
90
+ * @returns {PicoDom} Current instance
90
91
  */
91
92
  append(value)
92
93
  {
@@ -103,7 +104,7 @@ export class PicoDomBuilderInstance
103
104
  * @example Dom.find("span").appendTo("div")
104
105
  *
105
106
  * @param {any} value Target element
106
- * @returns {this} Current instance
107
+ * @returns {PicoDom} Current instance
107
108
  */
108
109
  appendTo(value)
109
110
  {
@@ -120,7 +121,7 @@ export class PicoDomBuilderInstance
120
121
  * @example Dom.find("div").replace("<span></span>")
121
122
  *
122
123
  * @param {any} value Replacement value
123
- * @returns {this} Current instance
124
+ * @returns {PicoDom} Current instance
124
125
  */
125
126
  replace(value)
126
127
  {
@@ -134,7 +135,8 @@ export class PicoDomBuilderInstance
134
135
  }
135
136
 
136
137
  /**
137
- * @returns {typeof import('#src/utils/Dom.js').PicoDom}
138
+ * @param {typeof PicoDom} self
139
+ * @returns {typeof PicoDom}
138
140
  */
139
141
  export const PicoDomBuilderPlugin = function (self) {
140
142
 
@@ -1,4 +1,5 @@
1
- import { Arr, Hash, Mix, Obj, Dom } from "#src/index.esm.js";
1
+ import { Arr, Hash, Mix, Obj, Dom } from "../index.esm.js";
2
+ import { PicoDom } from "../utils/Dom.js";
2
3
 
3
4
  /**
4
5
  * @memberof PicoDom
@@ -26,7 +27,7 @@ export class PicoDomEventInstance
26
27
  * @param {string} [selector] Event selector
27
28
  * @param {boolean} [pause] Pause listener
28
29
  * @param {any} [options] Listener options
29
- * @returns {this} Current instance
30
+ * @returns {PicoDom} Current instance
30
31
  */
31
32
  bind(el, event, cb, selector = null, pause = false, options = {})
32
33
  {
@@ -52,7 +53,7 @@ export class PicoDomEventInstance
52
53
  * @param {string} event Event name
53
54
  * @param {string} [selector] Event selector
54
55
  * @param {any} [options] Listener options
55
- * @returns {this} Current instance
56
+ * @returns {PicoDom} Current instance
56
57
  */
57
58
  unbind(el, event, selector = null, options = {})
58
59
  {
@@ -91,7 +92,7 @@ export class PicoDomEventInstance
91
92
  * @param {any} [options] Listener options
92
93
  * @param {boolean} [pause] Pause listener
93
94
  * @param {string} [selector] Event selector
94
- * @returns {this} Current instance
95
+ * @returns {PicoDom} Current instance
95
96
  */
96
97
  on(event, cb, options = {}, pause = false, selector = null)
97
98
  {
@@ -122,7 +123,7 @@ export class PicoDomEventInstance
122
123
  * @param {any} event Event name
123
124
  * @param {string} [selector] Event selector
124
125
  * @param {any} [options] Listener options
125
- * @returns {this} Current instance
126
+ * @returns {PicoDom} Current instance
126
127
  */
127
128
  off(event, selector = null, options = {})
128
129
  {
@@ -149,7 +150,7 @@ export class PicoDomEventInstance
149
150
  * @param {any} event Event name
150
151
  * @param {function} cb Callback fn
151
152
  * @param {any} [options] Listener options
152
- * @returns {this} Current instance
153
+ * @returns {PicoDom} Current instance
153
154
  */
154
155
  once(event, cb, options = {})
155
156
  {
@@ -172,7 +173,7 @@ export class PicoDomEventInstance
172
173
  * @param {function} cb Callback fn
173
174
  * @param {any} [options] Listener options
174
175
  * @param {boolean} [pause] Pause listener
175
- * @returns {this} Current instance
176
+ * @returns {PicoDom} Current instance
176
177
  */
177
178
  live(event, selector, cb, options = {}, pause = false)
178
179
  {
@@ -198,7 +199,7 @@ export class PicoDomEventInstance
198
199
  * @example Dom.find("div").fire("click")
199
200
  *
200
201
  * @param {string} event Event name
201
- * @returns {this} Current instance
202
+ * @returns {PicoDom} Current instance
202
203
  */
203
204
  fire(event)
204
205
  {
@@ -235,7 +236,8 @@ PicoDomEventInstance.prototype.unpause = function () {
235
236
  };
236
237
 
237
238
  /**
238
- * @returns {typeof import('#src/utils/Dom.js').PicoDom}
239
+ * @param {typeof PicoDom} self
240
+ * @returns {typeof PicoDom}
239
241
  */
240
242
  export const PicoDomEventPlugin = function (self) {
241
243
 
@@ -1,4 +1,5 @@
1
- import { Arr, Mix, Obj, Dom } from "#src/index.esm.js";
1
+ import { Arr, Mix, Obj, Dom } from "../index.esm.js";
2
+ import { PicoDom } from "../utils/Dom.js";
2
3
 
3
4
  /**
4
5
  * @memberof PicoDom
@@ -209,7 +210,7 @@ export class PicoDomFinderInstance
209
210
  * @example Dom.find("div").sanatize(1)
210
211
  *
211
212
  * @param {number} [filter] Node type
212
- * @returns {this} Current instance
213
+ * @returns {PicoDom} Current instance
213
214
  */
214
215
  sanatize(filter = 1)
215
216
  {
@@ -332,7 +333,7 @@ export class PicoDomFinderInstance
332
333
  * @example Dom.find("div").each((el) => console.log(el))
333
334
  *
334
335
  * @param {function} cb Callback fn
335
- * @returns {this} Current instance
336
+ * @returns {PicoDom} Current instance
336
337
  */
337
338
  each(cb)
338
339
  {
@@ -346,7 +347,7 @@ export class PicoDomFinderInstance
346
347
  *
347
348
  * @param {function} cb Callback fn
348
349
  * @param {any} [boundry] Loop limit
349
- * @returns {this} Current instance
350
+ * @returns {PicoDom} Current instance
350
351
  */
351
352
  loopParent(cb, boundry = null)
352
353
  {
@@ -651,7 +652,8 @@ PicoDomFinderInstance.prototype.getNot = () => {
651
652
  };
652
653
 
653
654
  /**
654
- * @returns {typeof import('#src/utils/Dom.js').PicoDom}
655
+ * @param {typeof PicoDom} self
656
+ * @returns {typeof PicoDom}
655
657
  */
656
658
  export const PicoDomFinderPlugin = function (self) {
657
659
 
@@ -1,4 +1,5 @@
1
- import { Arr, Mix, Obj, Dom } from "#src/index.esm.js";
1
+ import { Mix, Obj } from "../index.esm.js";
2
+ import { PicoDom } from "../utils/Dom.js";
2
3
 
3
4
  /**
4
5
  * @memberof PicoDom
@@ -21,7 +22,7 @@ export class PicoDomFormInstance
21
22
  * @example Dom.find("input").value("hello")
22
23
  *
23
24
  * @param {any} [value] Input value
24
- * @returns {any|this} Value or instance
25
+ * @returns {any|PicoDom} Value or instance
25
26
  */
26
27
  value(value = undefined)
27
28
  {
@@ -39,7 +40,8 @@ export class PicoDomFormInstance
39
40
  }
40
41
 
41
42
  /**
42
- * @returns {typeof import('#src/utils/Dom.js').PicoDom}
43
+ * @param {typeof PicoDom} self
44
+ * @returns {typeof PicoDom}
43
45
  */
44
46
  export const PicoDomFormPlugin = function (self) {
45
47
 
@@ -1,4 +1,5 @@
1
- import { Run, Mix, Obj, Dom } from "#src/index.esm.js";
1
+ import { Run, Mix, Obj, Dom } from "../index.esm.js";
2
+ import { PicoDom } from "../utils/Dom.js";
2
3
 
3
4
  /**
4
5
  * @memberof PicoDom
@@ -55,7 +56,7 @@ export class PicoDomGlobalStatic
55
56
  * @param {function} cb Callback fn
56
57
  * @param {number} [delay] Execution delay
57
58
  * @param {number} [limit] Wait limit
58
- * @returns {this} Static class
59
+ * @returns {PicoDom} Static class
59
60
  */
60
61
  static ready(cb, delay = 0, limit = 6000)
61
62
  {
@@ -88,7 +89,7 @@ export class PicoDomGlobalStatic
88
89
  * @param {function} cb Callback fn
89
90
  * @param {number} [delay] Execution delay
90
91
  * @param {number} [limit] Wait limit
91
- * @returns {this} Static class
92
+ * @returns {PicoDom} Static class
92
93
  */
93
94
  static complete(cb, delay = 0, limit = 6000)
94
95
  {
@@ -156,7 +157,7 @@ export class PicoDomGlobalInstance
156
157
  *
157
158
  * @param {function} cb Callback fn
158
159
  * @param {number} [limit] Wait limit
159
- * @returns {this} Current instance
160
+ * @returns {PicoDom} Current instance
160
161
  */
161
162
  loaded(cb, limit = 6000)
162
163
  {
@@ -175,7 +176,8 @@ export class PicoDomGlobalInstance
175
176
  }
176
177
 
177
178
  /**
178
- * @returns {typeof import('#src/utils/Dom.js').PicoDom}
179
+ * @param {typeof PicoDom} self
180
+ * @returns {typeof PicoDom}
179
181
  */
180
182
  export const PicoDomGlobalPlugin = function (self) {
181
183
 
@@ -1,4 +1,5 @@
1
- import { Arr, Dom, Mix, Obj } from "#src/index.esm.js";
1
+ import { Arr, Dom, Mix, Obj } from "../index.esm.js";
2
+ import { PicoDom } from "../utils/Dom.js";
2
3
 
3
4
  /**
4
5
  * @memberof PicoDom
@@ -314,7 +315,8 @@ PicoDomInviewInstance.prototype.inviewWidth = function (...args) {
314
315
  }
315
316
 
316
317
  /**
317
- * @returns {typeof import('#src/utils/Dom.js').PicoDom}
318
+ * @param {typeof PicoDom} self
319
+ * @returns {typeof PicoDom}
318
320
  */
319
321
  export const PicoDomInviewPlugin = function (self) {
320
322
 
@@ -1,4 +1,5 @@
1
- import { Arr, Mix, Obj, Dom, Locale } from "#src/index.esm.js";
1
+ import { Arr, Mix, Obj, Dom, Locale } from "../index.esm.js";
2
+ import { PicoDom } from "../utils/Dom.js";
2
3
 
3
4
  /**
4
5
  * @memberof PicoDom
@@ -14,7 +15,7 @@ export class PicoDomMetaStatic
14
15
  *
15
16
  * @param {string} value New title
16
17
  * @param {string} [glue] Title glue
17
- * @returns {this} Static class
18
+ * @returns {PicoDom} Static class
18
19
  */
19
20
  static setMetaTitle(value, glue = ':value - :title')
20
21
  {
@@ -48,7 +49,8 @@ export class PicoDomMetaInstance
48
49
  }
49
50
 
50
51
  /**
51
- * @returns {typeof import('#src/utils/Dom.js').PicoDom}
52
+ * @param {typeof PicoDom} self
53
+ * @returns {typeof PicoDom}
52
54
  */
53
55
  export const PicoDomMetaPlugin = function (self) {
54
56
 
@@ -1,4 +1,5 @@
1
- import { Arr, Mix, Obj, Dom } from "#src/index.esm.js";
1
+ import { Arr, Mix, Obj, Dom } from "../index.esm.js";
2
+ import { PicoDom } from "../utils/Dom.js";
2
3
 
3
4
  /**
4
5
  * @memberof PicoDom
@@ -21,7 +22,7 @@ export class PicoDomObserverInstance
21
22
  * @example Dom.find("input").value("hello")
22
23
  *
23
24
  * @param {any} [value] New value
24
- * @returns {any|this} Value or instance
25
+ * @returns {any|PicoDom} Value or instance
25
26
  */
26
27
  value(value = undefined)
27
28
  {
@@ -39,7 +40,8 @@ export class PicoDomObserverInstance
39
40
  }
40
41
 
41
42
  /**
42
- * @returns {typeof import('#src/utils/Dom.js').PicoDom}
43
+ * @param {typeof PicoDom} self
44
+ * @returns {typeof PicoDom}
43
45
  */
44
46
  export const PicoDomObserverPlugin = function (self) {
45
47
 
@@ -1,5 +1,5 @@
1
- import { Arr, Dom, Mix, Obj } from "#src/index.esm.js";
2
-
1
+ import { Arr, Dom, Mix, Obj } from "../index.esm.js";
2
+ import { PicoDom } from "../utils/Dom.js";
3
3
 
4
4
  /**
5
5
  * @memberof PicoDom
@@ -409,7 +409,7 @@ export class PicoDomRectangleInstance
409
409
  *
410
410
  * @param {function} cb Callback fn
411
411
  * @param {any} [boundry] Loop limit
412
- * @returns {this} Current instance
412
+ * @returns {PicoDom} Current instance
413
413
  */
414
414
  loopOffset(cb, boundry = null)
415
415
  {
@@ -529,7 +529,7 @@ export class PicoDomRectangleInstance
529
529
  *
530
530
  * @param {any} [value] Scroll value
531
531
  * @param {any} [boundry] View boundry
532
- * @returns {number|this} Value or instance
532
+ * @returns {number|PicoDom} Value or instance
533
533
  */
534
534
  scrollTop(value = null, boundry = null)
535
535
  {
@@ -551,7 +551,7 @@ export class PicoDomRectangleInstance
551
551
  *
552
552
  * @param {any} [value] Scroll value
553
553
  * @param {any} [boundry] View boundry
554
- * @returns {number|this} Value or instance
554
+ * @returns {number|PicoDom} Value or instance
555
555
  */
556
556
  scrollLeft(value = null, boundry = null)
557
557
  {
@@ -639,7 +639,8 @@ PicoDomRectangleInstance.prototype.scrollLeftGlobal = function () {
639
639
  };
640
640
 
641
641
  /**
642
- * @returns {typeof import('#src/utils/Dom.js').PicoDom}
642
+ * @param {typeof PicoDom} self
643
+ * @returns {typeof PicoDom}
643
644
  */
644
645
  export const PicoDomRectanglePlugin = function (self) {
645
646
 
@@ -1,4 +1,5 @@
1
- import { Mix, Obj, Num } from "#src/index.esm.js";
1
+ import { Mix, Obj, Num } from "../index.esm.js";
2
+ import { PicoFormat } from "../utils/Format.js";
2
3
 
3
4
  export const FILE_UNITS = [
4
5
  'B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'
@@ -42,7 +43,8 @@ export class PicoFormatFileStatic
42
43
  }
43
44
 
44
45
  /**
45
- * @returns {typeof import('#src/utils/Format.js').PicoFormat}
46
+ * @param {typeof PicoFormat} self
47
+ * @returns {typeof PicoFormat}
46
48
  */
47
49
  export const PicoFormatFilePlugin = function (self) {
48
50
 
@@ -1,4 +1,5 @@
1
- import { Arr, For, Mix, Obj } from "#src/index.esm.js";
1
+ import { Arr, For, Mix, Obj } from "../index.esm.js";
2
+ import { PicoFormat } from "../utils/Format.js";
2
3
 
3
4
  export const OPTION_REGEX = {
4
5
  entry: /(^|;)(\s*(?<key>.*?)\s*:\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=;|$)/g
@@ -96,7 +97,8 @@ export class PicoFormatOptionStatic
96
97
  }
97
98
 
98
99
  /**
99
- * @returns {typeof import('#src/utils/Format.js').PicoFormat}
100
+ * @param {typeof PicoFormat} self
101
+ * @returns {typeof PicoFormat}
100
102
  */
101
103
  export const PicoFormatOptionPlugin = function (self) {
102
104
 
@@ -1,4 +1,5 @@
1
- import { Arr, Mix, Obj, For } from "#src/index.esm.js";
1
+ import { Arr, Mix, Obj, For } from "../index.esm.js";
2
+ import { PicoFormat } from "../utils/Format.js";
2
3
 
3
4
  export const PARAM_REGEX = {
4
5
  entry: /(?<=^|&|\?)(\s*(?<key>.*?)\s*=\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=&|$)/g
@@ -95,7 +96,8 @@ export class PicoFormatParamStatic
95
96
  }
96
97
 
97
98
  /**
98
- * @returns {typeof import('#src/utils/Format.js').PicoFormat}
99
+ * @param {typeof PicoFormat} self
100
+ * @returns {typeof PicoFormat}
99
101
  */
100
102
  export const PicoFormatParamPlugin = function (self) {
101
103
 
@@ -1,4 +1,5 @@
1
- import { Mix, Obj } from "#src/index.esm.js";
1
+ import { Mix, Obj } from "../index.esm.js";
2
+ import { PicoFormat } from "../utils/Format.js";
2
3
 
3
4
  export const TYPE_PARSERS = [
4
5
  { // null
@@ -144,7 +145,8 @@ export class PicoFormatParserStatic
144
145
  }
145
146
 
146
147
  /**
147
- * @returns {typeof import('#src/utils/Format.js').PicoFormat}
148
+ * @param {typeof PicoFormat} self
149
+ * @returns {typeof PicoFormat}
148
150
  */
149
151
  export const PicoFormatParserPlugin = function (self) {
150
152
 
@@ -1,4 +1,5 @@
1
- import { Arr, Mix, Obj } from "#src/index.esm.js";
1
+ import { Arr, Mix, Obj } from "../index.esm.js";
2
+ import { PicoFormat } from "../utils/Format.js";
2
3
 
3
4
  export const SLUG_CONVERT = [
4
5
  ['à', 'a'],
@@ -63,7 +64,8 @@ export class PicoFormatUrlStatic
63
64
  }
64
65
 
65
66
  /**
66
- * @returns {typeof import('#src/utils/Format.js').PicoFormat}
67
+ * @param {typeof PicoFormat} self
68
+ * @returns {typeof PicoFormat}
67
69
  */
68
70
  export const PicoFormatUrlPlugin = function (self) {
69
71
 
@@ -1,10 +1,30 @@
1
- import * as pi from "#src/index.esm.js";
1
+ import * as pi from "./index.esm.js";
2
2
 
3
- // Force immediate global access
4
- if (typeof globalThis !== 'undefined') {
5
- if ( globalThis.pi === undefined ) {
6
- globalThis.pi = pi;
7
- } else {
8
- globalThis.pix = pi;
9
- }
10
- }
3
+ /**
4
+ * @typedef {Object} PicoLibrary
5
+ * @property {function(): *} [go]
6
+ * @property {function(): void} [browser]
7
+ * @property {function(): void} [device]
8
+ * @property {PicoDom} [Dom]
9
+ * @property {PicoNow} [Now]
10
+ * @property {PicoFormat} [For]
11
+ * @property {PicoArray} [Arr]
12
+ * @property {PicoMixed} [Mix]
13
+ * @property {PicoNumber} [Num]
14
+ * @property {PicoObject} [Obj]
15
+ * @property {PicoRunner} [Run]
16
+ * @property {PicoString} [Str]
17
+ * @property {PicoHash} [Hash]
18
+ * @property {PicoEvent} [Event]
19
+ * @property {PicoLocale} [Locale]
20
+ * @property {PicoCookie} [Cookie]
21
+ * @property {PicoData} [Data]
22
+ * @property {PicoRoute} [Route]
23
+ * @property {PicoMap} [Map]
24
+ * @property {PicoElement} [Element]
25
+ */
26
+
27
+ /**
28
+ * @type {PicoLibrary}
29
+ */
30
+ globalThis.pi = pi;