tiny-essentials 1.22.4 → 1.22.6

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 (71) hide show
  1. package/changelog/1/1/0.md +1 -0
  2. package/changelog/1/10/0.md +19 -0
  3. package/changelog/1/10/2.md +23 -0
  4. package/changelog/1/11/0.md +66 -0
  5. package/changelog/1/12/0.md +54 -0
  6. package/changelog/1/12/1.md +37 -0
  7. package/changelog/1/12/2.md +29 -0
  8. package/changelog/1/13/0.md +41 -0
  9. package/changelog/1/13/1.md +7 -0
  10. package/changelog/1/13/2.md +13 -0
  11. package/changelog/1/14/0.md +33 -0
  12. package/changelog/1/15/0.md +39 -0
  13. package/changelog/1/16/0.md +42 -0
  14. package/changelog/1/16/1.md +43 -0
  15. package/changelog/1/16/2.md +29 -0
  16. package/changelog/1/17/0.md +28 -0
  17. package/changelog/1/17/1.md +40 -0
  18. package/changelog/1/18/0.md +43 -0
  19. package/changelog/1/18/1.md +12 -0
  20. package/changelog/1/19/1.md +21 -0
  21. package/changelog/1/19/2.md +23 -0
  22. package/changelog/1/19/3.md +15 -0
  23. package/changelog/1/2/0.md +5 -0
  24. package/changelog/1/2/1.md +5 -0
  25. package/changelog/1/20/0.md +9 -0
  26. package/changelog/1/20/1.md +40 -0
  27. package/changelog/1/20/2.md +22 -0
  28. package/changelog/1/20/3.md +39 -0
  29. package/changelog/1/21/0.md +23 -0
  30. package/changelog/1/21/1.md +12 -0
  31. package/changelog/1/21/10.md +23 -0
  32. package/changelog/1/21/2.md +9 -0
  33. package/changelog/1/21/3.md +9 -0
  34. package/changelog/1/21/4.md +9 -0
  35. package/changelog/1/21/6.md +23 -0
  36. package/changelog/1/21/7.md +16 -0
  37. package/changelog/1/21/8.md +5 -0
  38. package/changelog/1/21/9.md +17 -0
  39. package/changelog/1/22/1.md +28 -0
  40. package/changelog/1/22/2.md +17 -0
  41. package/changelog/1/22/3.md +11 -0
  42. package/changelog/1/22/4.md +35 -0
  43. package/changelog/1/22/5.md +23 -0
  44. package/changelog/1/22/6.md +25 -0
  45. package/changelog/1/3/1.md +4 -0
  46. package/changelog/1/3/2.md +2 -0
  47. package/changelog/1/4/0.md +5 -0
  48. package/changelog/1/5/0.md +4 -0
  49. package/changelog/1/5/1.md +2 -0
  50. package/changelog/1/6/0.md +6 -0
  51. package/changelog/1/7/0.md +3 -0
  52. package/changelog/1/7/1.md +3 -0
  53. package/changelog/1/8/0.md +3 -0
  54. package/changelog/1/8/1.md +2 -0
  55. package/changelog/1/8/2.md +2 -0
  56. package/changelog/1/8/3.md +3 -0
  57. package/changelog/1/8/4.md +2 -0
  58. package/changelog/1/8/5.md +6 -0
  59. package/changelog/1/9/0.md +27 -0
  60. package/changelog/1/9/1.md +5 -0
  61. package/changelog/1/9/2.md +14 -0
  62. package/dist/v1/TinyDragger.min.js +1 -1
  63. package/dist/v1/TinyEssentials.min.js +1 -1
  64. package/dist/v1/TinyHtml.min.js +1 -1
  65. package/dist/v1/TinySmartScroller.min.js +1 -1
  66. package/dist/v1/TinyUploadClicker.min.js +1 -1
  67. package/dist/v1/libs/TinyHtml.cjs +400 -20
  68. package/dist/v1/libs/TinyHtml.d.mts +220 -6
  69. package/dist/v1/libs/TinyHtml.mjs +384 -23
  70. package/docs/v1/libs/TinyHtml.md +36 -0
  71. package/package.json +1 -1
@@ -300,6 +300,42 @@ declare class TinyHtml<TinyHtmlT extends ConstructorElValues | ConstructorElValu
300
300
  y: number;
301
301
  };
302
302
  };
303
+ /**
304
+ * Controls whether TinyHtml emits detailed debug output to the console.
305
+ * When enabled, helper methods print structured diagnostics for easier troubleshooting.
306
+ * @type {boolean}
307
+ */
308
+ static "__#8@#elemDebug": boolean;
309
+ /**
310
+ * Enables or disables debug output.
311
+ * @param {boolean} value True to enable debug output; false to disable.
312
+ * @throws {TypeError} Thrown if the provided value is not a boolean.
313
+ * @returns {void}
314
+ */
315
+ static set elemDebug(value: boolean);
316
+ /**
317
+ * Gets whether debug output is enabled.
318
+ * @returns {boolean} True if debug output is enabled; otherwise, false.
319
+ */
320
+ static get elemDebug(): boolean;
321
+ /**
322
+ * Logs a standardized debug error for element validation, including a console.table
323
+ * with the involved elements. Use this when an element argument is invalid, unexpected,
324
+ * or fails a guard/validation.
325
+ *
326
+ * The output includes:
327
+ * - A concise error header
328
+ * - A stack trace (when supported)
329
+ * - A table of elements (index, typeof, constructor, summary, value)
330
+ * - The specific problematic element, if provided
331
+ *
332
+ * @param {(ConstructorElValues | EventTarget | TinyElement | null)[]} elems
333
+ * A list of elements participating in the operation (may include nulls).
334
+ * @param {ConstructorElValues | EventTarget | TinyElement | null} [elem]
335
+ * The specific element that triggered the error, if available.
336
+ * @returns {void}
337
+ */
338
+ static _debugElemError(elems: (ConstructorElValues | EventTarget | TinyElement | null)[], elem?: ConstructorElValues | EventTarget | TinyElement | null, ...args: any[]): void;
303
339
  /**
304
340
  * Parse inline styles into an object.
305
341
  * @param {string} styleText
@@ -2346,6 +2382,104 @@ declare class TinyHtml<TinyHtmlT extends ConstructorElValues | ConstructorElValu
2346
2382
  * @returns {string} - The corresponding attribute name.
2347
2383
  */
2348
2384
  static getAttrName(name: string): string;
2385
+ /**
2386
+ * Returns the BigInt value of an attribute.
2387
+ * @param {TinyElement} el
2388
+ * @param {string} name
2389
+ * @returns {bigint|null}
2390
+ */
2391
+ static attrBigInt(el: TinyElement, name: string): bigint | null;
2392
+ /**
2393
+ * Set a BigInt attribute.
2394
+ * @template {TinyElement|TinyElement[]} T
2395
+ * @param {T} el
2396
+ * @param {string} name
2397
+ * @param {bigint} value
2398
+ * @returns {T}
2399
+ */
2400
+ static setAttrBigInt<T extends TinyElement | TinyElement[]>(el: T, name: string, value: bigint): T;
2401
+ /**
2402
+ * Returns the Date value of an attribute.
2403
+ * @param {TinyElement} el
2404
+ * @param {string} name
2405
+ * @returns {Date|null}
2406
+ */
2407
+ static attrDate(el: TinyElement, name: string): Date | null;
2408
+ /**
2409
+ * Set a Date attribute.
2410
+ * @template {TinyElement|TinyElement[]} T
2411
+ * @param {T} el
2412
+ * @param {string} name
2413
+ * @param {Date} value
2414
+ * @returns {T}
2415
+ */
2416
+ static setAttrDate<T extends TinyElement | TinyElement[]>(el: T, name: string, value: Date): T;
2417
+ /**
2418
+ * Returns the JSON value of an attribute.
2419
+ * @param {TinyElement} el
2420
+ * @param {string} name
2421
+ * @returns {any|null}
2422
+ */
2423
+ static attrJson(el: TinyElement, name: string): any | null;
2424
+ /**
2425
+ * Set a JSON attribute.
2426
+ * @template {TinyElement|TinyElement[]} T
2427
+ * @param {T} el
2428
+ * @param {string} name
2429
+ * @param {any} value
2430
+ * @param {(this: any, key: string, value: any) => any} [replacer]
2431
+ * @param {number|string} [space]
2432
+ * @returns {T}
2433
+ */
2434
+ static setAttrJson<T extends TinyElement | TinyElement[]>(el: T, name: string, value: any, replacer?: (this: any, key: string, value: any) => any, space?: number | string): T;
2435
+ /**
2436
+ * Returns the number value of an attribute.
2437
+ * @param {TinyElement} el
2438
+ * @param {string} name
2439
+ * @returns {number|null}
2440
+ */
2441
+ static attrNumber(el: TinyElement, name: string): number | null;
2442
+ /**
2443
+ * Set a number attribute.
2444
+ * @template {TinyElement|TinyElement[]} T
2445
+ * @param {T} el
2446
+ * @param {string} name
2447
+ * @param {number} value
2448
+ * @returns {T}
2449
+ */
2450
+ static setAttrNumber<T extends TinyElement | TinyElement[]>(el: T, name: string, value: number): T;
2451
+ /**
2452
+ * Returns the boolean value of an attribute.
2453
+ * @param {TinyElement} el
2454
+ * @param {string} name
2455
+ * @returns {boolean|null}
2456
+ */
2457
+ static attrBoolean(el: TinyElement, name: string): boolean | null;
2458
+ /**
2459
+ * Set a boolean attribute.
2460
+ * @template {TinyElement|TinyElement[]} T
2461
+ * @param {T} el
2462
+ * @param {string} name
2463
+ * @param {boolean} value
2464
+ * @returns {T}
2465
+ */
2466
+ static setAttrBoolean<T extends TinyElement | TinyElement[]>(el: T, name: string, value: boolean): T;
2467
+ /**
2468
+ * Returns the string value of an attribute.
2469
+ * @param {TinyElement} el
2470
+ * @param {string} name
2471
+ * @returns {string|null}
2472
+ */
2473
+ static attrString(el: TinyElement, name: string): string | null;
2474
+ /**
2475
+ * Set a string attribute.
2476
+ * @template {TinyElement|TinyElement[]} T
2477
+ * @param {T} el
2478
+ * @param {string} name
2479
+ * @param {string} value
2480
+ * @returns {T}
2481
+ */
2482
+ static setAttrString<T extends TinyElement | TinyElement[]>(el: T, name: string, value: string): T;
2349
2483
  /**
2350
2484
  * Get an attribute on an element.
2351
2485
  * @param {TinyElement} el
@@ -2357,11 +2491,11 @@ declare class TinyHtml<TinyHtmlT extends ConstructorElValues | ConstructorElValu
2357
2491
  * Set one or multiple attributes on an element.
2358
2492
  * @template {TinyElement|TinyElement[]} T
2359
2493
  * @param {T} el - Target element(s).
2360
- * @param {string|Record<string, string|null>} name - Attribute name or an object of attributes.
2361
- * @param {string|number|null} [value=null] - Attribute value (ignored if "name" is an object).
2494
+ * @param {string|Record<string, any>} name - Attribute name or an object of attributes.
2495
+ * @param {any} [value=null] - Attribute value (ignored if "name" is an object).
2362
2496
  * @returns {T}
2363
2497
  */
2364
- static setAttr<T extends TinyElement | TinyElement[]>(el: T, name: string | Record<string, string | null>, value?: string | number | null): T;
2498
+ static setAttr<T extends TinyElement | TinyElement[]>(el: T, name: string | Record<string, any>, value?: any): T;
2365
2499
  /**
2366
2500
  * Remove attribute(s) from an element.
2367
2501
  * @template {TinyElement|TinyElement[]} T
@@ -3528,6 +3662,86 @@ declare class TinyHtml<TinyHtmlT extends ConstructorElValues | ConstructorElValu
3528
3662
  * @returns {this}
3529
3663
  */
3530
3664
  trigger(events: string | string[], payload?: Event | CustomEvent | CustomEventInit): this;
3665
+ /**
3666
+ * Returns the BigInt value of an attribute.
3667
+ * @param {string} name
3668
+ * @returns {bigint|null}
3669
+ */
3670
+ attrBigInt(name: string): bigint | null;
3671
+ /**
3672
+ * Set a BigInt attribute.
3673
+ * @param {string} name
3674
+ * @param {bigint} value
3675
+ * @returns {this}
3676
+ */
3677
+ setAttrBigInt(name: string, value: bigint): this;
3678
+ /**
3679
+ * Returns the Date value of an attribute.
3680
+ * @param {string} name
3681
+ * @returns {Date|null}
3682
+ */
3683
+ attrDate(name: string): Date | null;
3684
+ /**
3685
+ * Set a Date attribute.
3686
+ * @param {string} name
3687
+ * @param {Date} value
3688
+ * @returns {this}
3689
+ */
3690
+ setAttrDate(name: string, value: Date): this;
3691
+ /**
3692
+ * Returns the JSON value of an attribute.
3693
+ * @param {string} name
3694
+ * @returns {any|null}
3695
+ */
3696
+ attrJson(name: string): any | null;
3697
+ /**
3698
+ * Set a JSON attribute.
3699
+ * @param {string} name
3700
+ * @param {any} value
3701
+ * @param {(this: any, key: string, value: any) => any} [replacer]
3702
+ * @param {number|string} [space]
3703
+ * @returns {this}
3704
+ */
3705
+ setAttrJson(name: string, value: any, replacer?: (this: any, key: string, value: any) => any, space?: number | string): this;
3706
+ /**
3707
+ * Returns the number value of an attribute.
3708
+ * @param {string} name
3709
+ * @returns {number|null}
3710
+ */
3711
+ attrNumber(name: string): number | null;
3712
+ /**
3713
+ * Set a number attribute.
3714
+ * @param {string} name
3715
+ * @param {number} value
3716
+ * @returns {this}
3717
+ */
3718
+ setAttrNumber(name: string, value: number): this;
3719
+ /**
3720
+ * Returns the boolean value of an attribute.
3721
+ * @param {string} name
3722
+ * @returns {boolean|null}
3723
+ */
3724
+ attrBoolean(name: string): boolean | null;
3725
+ /**
3726
+ * Set a boolean attribute.
3727
+ * @param {string} name
3728
+ * @param {boolean} value
3729
+ * @returns {this}
3730
+ */
3731
+ setAttrBoolean(name: string, value: boolean): this;
3732
+ /**
3733
+ * Returns the string value of an attribute.
3734
+ * @param {string} name
3735
+ * @returns {string|null}
3736
+ */
3737
+ attrString(name: string): string | null;
3738
+ /**
3739
+ * Set a string attribute.
3740
+ * @param {string} name
3741
+ * @param {string} value
3742
+ * @returns {this}
3743
+ */
3744
+ setAttrString(name: string, value: string): this;
3531
3745
  /**
3532
3746
  * Get an attribute on an element.
3533
3747
  * @param {string} name
@@ -3536,11 +3750,11 @@ declare class TinyHtml<TinyHtmlT extends ConstructorElValues | ConstructorElValu
3536
3750
  attr(name: string): string | null;
3537
3751
  /**
3538
3752
  * Set one or multiple attributes on an element.
3539
- * @param {string|Record<string, string|null>} name - Attribute name or an object of attributes.
3540
- * @param {string|number|null} [value=null] - Attribute value (ignored if "name" is an object).
3753
+ * @param {string|Record<string, any>} name - Attribute name or an object of attributes.
3754
+ * @param {any} [value=null] - Attribute value (ignored if "name" is an object).
3541
3755
  * @returns {this}
3542
3756
  */
3543
- setAttr(name: string | Record<string, string | null>, value?: string | number | null): this;
3757
+ setAttr(name: string | Record<string, any>, value?: any): this;
3544
3758
  /**
3545
3759
  * Remove attribute(s) from an element.
3546
3760
  * @param {string} name Space-separated list of attributes.