tiny-essentials 1.24.2 → 1.24.3
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/changelog/1/24/3.md +6 -0
- package/dist/v1/TinyDragger.min.js +1 -1
- package/dist/v1/TinyEssentials.min.js +1 -1
- package/dist/v1/TinyHtml.min.js +1 -1
- package/dist/v1/TinySmartScroller.min.js +1 -1
- package/dist/v1/TinyUploadClicker.min.js +1 -1
- package/dist/v1/libs/ColorSafeStringify.d.mts +1 -1
- package/dist/v1/libs/TinyColorValidator.d.mts +16 -16
- package/dist/v1/libs/TinyGamepad.d.mts +1 -1
- package/dist/v1/libs/TinyHtml/TinyHtmlIcon.d.mts +1 -1
- package/dist/v1/libs/TinyHtml/TinyHtmlTemplate.d.mts +1 -1
- package/dist/v1/libs/TinyHtml/index.d.mts +1 -1
- package/dist/v1/libs/TinyHtml.cjs +8 -53
- package/dist/v1/libs/TinyHtml.d.mts +71 -119
- package/dist/v1/libs/TinyHtml.mjs +6 -53
- package/dist/v1/libs/TinyInventory.d.mts +1 -1
- package/dist/v1/libs/UltraRandomMsgGen.d.mts +7 -7
- package/package.json +173 -1
|
@@ -328,12 +328,16 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
328
328
|
y: number;
|
|
329
329
|
};
|
|
330
330
|
};
|
|
331
|
+
/** @type {number} */
|
|
332
|
+
static "__#private@#version": number;
|
|
333
|
+
/** @returns {number} */
|
|
334
|
+
static get version(): number;
|
|
331
335
|
/**
|
|
332
336
|
* Controls whether TinyHtml emits detailed debug output to the console.
|
|
333
337
|
* When enabled, helper methods print structured diagnostics for easier troubleshooting.
|
|
334
338
|
* @type {boolean}
|
|
335
339
|
*/
|
|
336
|
-
static "__#
|
|
340
|
+
static "__#private@#elemDebug": boolean;
|
|
337
341
|
/**
|
|
338
342
|
* Enables or disables debug output.
|
|
339
343
|
* @param {boolean} value True to enable debug output; false to disable.
|
|
@@ -374,7 +378,7 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
374
378
|
* Flag to determine if element observer should start automatically.
|
|
375
379
|
* @type {boolean}
|
|
376
380
|
*/
|
|
377
|
-
static "__#
|
|
381
|
+
static "__#private@#autoStartElemObserver": boolean;
|
|
378
382
|
/**
|
|
379
383
|
* Set the auto-start flag for the observer.
|
|
380
384
|
* @param {boolean} value
|
|
@@ -386,7 +390,7 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
386
390
|
*/
|
|
387
391
|
static get autoStartElemObserver(): boolean;
|
|
388
392
|
/** @type {TinyElementObserver} */
|
|
389
|
-
static "__#
|
|
393
|
+
static "__#private@#tinyObserver": TinyElementObserver;
|
|
390
394
|
/** @returns {TinyElementObserver} */
|
|
391
395
|
static get tinyObserver(): TinyElementObserver;
|
|
392
396
|
/**
|
|
@@ -575,9 +579,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
575
579
|
* @param {string[]} elemName - The list of expected element names for error reporting.
|
|
576
580
|
* @returns {any[]} - A flat array of validated elements.
|
|
577
581
|
* @throws {Error} - If any element is not an instance of one of the allowed types.
|
|
578
|
-
* @readonly
|
|
579
582
|
*/
|
|
580
|
-
static
|
|
583
|
+
static _preElemsTemplate(elems: TinyElement | EventTarget | null | (TinyElement | EventTarget | null)[], where: string, TheTinyElements: any[], elemName: string[]): any[];
|
|
581
584
|
/**
|
|
582
585
|
* Prepares and validates a single element against allowed types.
|
|
583
586
|
*
|
|
@@ -588,9 +591,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
588
591
|
* @param {boolean} [canNull=false] - Whether `null` is allowed as a valid value.
|
|
589
592
|
* @returns {any} - The validated element or `null` if allowed.
|
|
590
593
|
* @throws {Error} - If the element is not valid or if multiple elements are provided.
|
|
591
|
-
* @readonly
|
|
592
594
|
*/
|
|
593
|
-
static
|
|
595
|
+
static _preElemTemplate(elems: TinyElement | EventTarget | null | (TinyElement | EventTarget | null)[], where: string, TheTinyElements: any[], elemName: string[], canNull?: boolean): any;
|
|
594
596
|
/**
|
|
595
597
|
* Ensures the input is returned as an array.
|
|
596
598
|
* Useful to normalize operations across multiple or single elements.
|
|
@@ -598,9 +600,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
598
600
|
* @param {TinyElement|TinyElement[]} elems - A single element or array of elements.
|
|
599
601
|
* @param {string} where - The method or context name where validation is being called.
|
|
600
602
|
* @returns {Element[]} - Always returns an array of elements.
|
|
601
|
-
* @readonly
|
|
602
603
|
*/
|
|
603
|
-
static
|
|
604
|
+
static _preElems(elems: TinyElement | TinyElement[], where: string): Element[];
|
|
604
605
|
/**
|
|
605
606
|
* Ensures the input is returned as an single element.
|
|
606
607
|
* Useful to normalize operations across multiple or single elements.
|
|
@@ -608,9 +609,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
608
609
|
* @param {TinyElement|TinyElement[]} elems - A single element or array of elements.
|
|
609
610
|
* @param {string} where - The method or context name where validation is being called.
|
|
610
611
|
* @returns {Element} - Always returns an single element.
|
|
611
|
-
* @readonly
|
|
612
612
|
*/
|
|
613
|
-
static
|
|
613
|
+
static _preElem(elems: TinyElement | TinyElement[], where: string): Element;
|
|
614
614
|
/**
|
|
615
615
|
* Ensures the input is returned as an array.
|
|
616
616
|
* Useful to normalize operations across multiple or single nodes.
|
|
@@ -618,9 +618,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
618
618
|
* @param {TinyNode|TinyNode[]} elems - A single node or array of nodes.
|
|
619
619
|
* @param {string} where - The method or context name where validation is being called.
|
|
620
620
|
* @returns {Node[]} - Always returns an array of nodes.
|
|
621
|
-
* @readonly
|
|
622
621
|
*/
|
|
623
|
-
static
|
|
622
|
+
static _preNodeElems(elems: TinyNode | TinyNode[], where: string): Node[];
|
|
624
623
|
/**
|
|
625
624
|
* Ensures the input is returned as an single node.
|
|
626
625
|
* Useful to normalize operations across multiple or single nodes.
|
|
@@ -628,9 +627,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
628
627
|
* @param {TinyNode|TinyNode[]} elems - A single node or array of nodes.
|
|
629
628
|
* @param {string} where - The method or context name where validation is being called.
|
|
630
629
|
* @returns {Node} - Always returns an single node.
|
|
631
|
-
* @readonly
|
|
632
630
|
*/
|
|
633
|
-
static
|
|
631
|
+
static _preNodeElem(elems: TinyNode | TinyNode[], where: string): Node;
|
|
634
632
|
/**
|
|
635
633
|
* Ensures the input is returned as an single node.
|
|
636
634
|
* Useful to normalize operations across multiple or single nodes.
|
|
@@ -638,9 +636,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
638
636
|
* @param {TinyNode|TinyNode[]} elems - A single node or array of nodes.
|
|
639
637
|
* @param {string} where - The method or context name where validation is being called.
|
|
640
638
|
* @returns {Node|null} - Always returns an single node or null.
|
|
641
|
-
* @readonly
|
|
642
639
|
*/
|
|
643
|
-
static
|
|
640
|
+
static _preNodeElemWithNull(elems: TinyNode | TinyNode[], where: string): Node | null;
|
|
644
641
|
/**
|
|
645
642
|
* Ensures the input is returned as an array.
|
|
646
643
|
* Useful to normalize operations across multiple or single html elements.
|
|
@@ -648,9 +645,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
648
645
|
* @param {TinyElement|TinyElement[]} elems - A single html element or array of html elements.
|
|
649
646
|
* @param {string} where - The method or context name where validation is being called.
|
|
650
647
|
* @returns {HTMLElement[]} - Always returns an array of html elements.
|
|
651
|
-
* @readonly
|
|
652
648
|
*/
|
|
653
|
-
static
|
|
649
|
+
static _preHtmlElems(elems: TinyElement | TinyElement[], where: string): HTMLElement[];
|
|
654
650
|
/**
|
|
655
651
|
* Ensures the input is returned as an single html element.
|
|
656
652
|
* Useful to normalize operations across multiple or single html elements.
|
|
@@ -658,9 +654,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
658
654
|
* @param {TinyElement|TinyElement[]} elems - A single html element or array of html elements.
|
|
659
655
|
* @param {string} where - The method or context name where validation is being called.
|
|
660
656
|
* @returns {HTMLElement} - Always returns an single html element.
|
|
661
|
-
* @readonly
|
|
662
657
|
*/
|
|
663
|
-
static
|
|
658
|
+
static _preHtmlElem(elems: TinyElement | TinyElement[], where: string): HTMLElement;
|
|
664
659
|
/**
|
|
665
660
|
* Ensures the input is returned as an array.
|
|
666
661
|
* Useful to normalize operations across multiple or single event target elements.
|
|
@@ -668,9 +663,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
668
663
|
* @param {TinyInputElement|TinyInputElement[]} elems - A single event target element or array of html elements.
|
|
669
664
|
* @param {string} where - The method or context name where validation is being called.
|
|
670
665
|
* @returns {InputElement[]} - Always returns an array of event target elements.
|
|
671
|
-
* @readonly
|
|
672
666
|
*/
|
|
673
|
-
static
|
|
667
|
+
static _preInputElems(elems: TinyInputElement | TinyInputElement[], where: string): InputElement[];
|
|
674
668
|
/**
|
|
675
669
|
* Ensures the input is returned as an single event target element.
|
|
676
670
|
* Useful to normalize operations across multiple or single event target elements.
|
|
@@ -678,9 +672,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
678
672
|
* @param {TinyInputElement|TinyInputElement[]} elems - A single event target element or array of html elements.
|
|
679
673
|
* @param {string} where - The method or context name where validation is being called.
|
|
680
674
|
* @returns {InputElement} - Always returns an single event target element.
|
|
681
|
-
* @readonly
|
|
682
675
|
*/
|
|
683
|
-
static
|
|
676
|
+
static _preInputElem(elems: TinyInputElement | TinyInputElement[], where: string): InputElement;
|
|
684
677
|
/**
|
|
685
678
|
* Ensures the input is returned as an array.
|
|
686
679
|
* Useful to normalize operations across multiple or single event target elements.
|
|
@@ -688,9 +681,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
688
681
|
* @param {TinyEventTarget|TinyEventTarget[]} elems - A single event target element or array of html elements.
|
|
689
682
|
* @param {string} where - The method or context name where validation is being called.
|
|
690
683
|
* @returns {EventTarget[]} - Always returns an array of event target elements.
|
|
691
|
-
* @readonly
|
|
692
684
|
*/
|
|
693
|
-
static
|
|
685
|
+
static _preEventTargetElems(elems: TinyEventTarget | TinyEventTarget[], where: string): EventTarget[];
|
|
694
686
|
/**
|
|
695
687
|
* Ensures the input is returned as an single event target element.
|
|
696
688
|
* Useful to normalize operations across multiple or single event target elements.
|
|
@@ -698,9 +690,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
698
690
|
* @param {TinyEventTarget|TinyEventTarget[]} elems - A single event target element or array of html elements.
|
|
699
691
|
* @param {string} where - The method or context name where validation is being called.
|
|
700
692
|
* @returns {EventTarget} - Always returns an single event target element.
|
|
701
|
-
* @readonly
|
|
702
693
|
*/
|
|
703
|
-
static
|
|
694
|
+
static _preEventTargetElem(elems: TinyEventTarget | TinyEventTarget[], where: string): EventTarget;
|
|
704
695
|
/**
|
|
705
696
|
* Ensures the input is returned as an array.
|
|
706
697
|
* Useful to normalize operations across multiple or single element/window elements.
|
|
@@ -708,9 +699,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
708
699
|
* @param {TinyElementAndWindow|TinyElementAndWindow[]} elems - A single element/window element or array of html elements.
|
|
709
700
|
* @param {string} where - The method or context name where validation is being called.
|
|
710
701
|
* @returns {ElementAndWindow[]} - Always returns an array of element/window elements.
|
|
711
|
-
* @readonly
|
|
712
702
|
*/
|
|
713
|
-
static
|
|
703
|
+
static _preElemsAndWindow(elems: TinyElementAndWindow | TinyElementAndWindow[], where: string): ElementAndWindow[];
|
|
714
704
|
/**
|
|
715
705
|
* Ensures the input is returned as an single element/window element.
|
|
716
706
|
* Useful to normalize operations across multiple or single element/window elements.
|
|
@@ -718,9 +708,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
718
708
|
* @param {TinyElementAndWindow|TinyElementAndWindow[]} elems - A single element/window element or array of html elements.
|
|
719
709
|
* @param {string} where - The method or context name where validation is being called.
|
|
720
710
|
* @returns {ElementAndWindow} - Always returns an single element/window element.
|
|
721
|
-
* @readonly
|
|
722
711
|
*/
|
|
723
|
-
static
|
|
712
|
+
static _preElemAndWindow(elems: TinyElementAndWindow | TinyElementAndWindow[], where: string): ElementAndWindow;
|
|
724
713
|
/**
|
|
725
714
|
* Ensures the input is returned as an array.
|
|
726
715
|
* Useful to normalize operations across multiple or single element/window/document elements.
|
|
@@ -728,9 +717,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
728
717
|
* @param {TinyElementAndWinAndDoc|TinyElementAndWinAndDoc[]} elems - A single element/document/window element or array of html elements.
|
|
729
718
|
* @param {string} where - The method or context name where validation is being called.
|
|
730
719
|
* @returns {ElementAndWindow[]} - Always returns an array of element/document/window elements.
|
|
731
|
-
* @readonly
|
|
732
720
|
*/
|
|
733
|
-
static
|
|
721
|
+
static _preElemsAndWinAndDoc(elems: TinyElementAndWinAndDoc | TinyElementAndWinAndDoc[], where: string): ElementAndWindow[];
|
|
734
722
|
/**
|
|
735
723
|
* Ensures the input is returned as an single element/window/document element.
|
|
736
724
|
* Useful to normalize operations across multiple or single element/window/document elements.
|
|
@@ -738,9 +726,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
738
726
|
* @param {TinyElementAndWinAndDoc|TinyElementAndWinAndDoc[]} elems - A single element/document/window element or array of html elements.
|
|
739
727
|
* @param {string} where - The method or context name where validation is being called.
|
|
740
728
|
* @returns {ElementAndWindow} - Always returns an single element/document/window element.
|
|
741
|
-
* @readonly
|
|
742
729
|
*/
|
|
743
|
-
static
|
|
730
|
+
static _preElemAndWinAndDoc(elems: TinyElementAndWinAndDoc | TinyElementAndWinAndDoc[], where: string): ElementAndWindow;
|
|
744
731
|
/**
|
|
745
732
|
* Ensures the input is returned as an array.
|
|
746
733
|
* Useful to normalize operations across multiple or single element with document elements.
|
|
@@ -748,9 +735,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
748
735
|
* @param {TinyElementWithDoc|TinyElementWithDoc[]} elems - A single element with document element or array of html elements.
|
|
749
736
|
* @param {string} where - The method or context name where validation is being called.
|
|
750
737
|
* @returns {ElementWithDoc[]} - Always returns an array of element with document elements.
|
|
751
|
-
* @readonly
|
|
752
738
|
*/
|
|
753
|
-
static
|
|
739
|
+
static _preElemsWithDoc(elems: TinyElementWithDoc | TinyElementWithDoc[], where: string): ElementWithDoc[];
|
|
754
740
|
/**
|
|
755
741
|
* Ensures the input is returned as an single element with document element.
|
|
756
742
|
* Useful to normalize operations across multiple or single element with document elements.
|
|
@@ -758,9 +744,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
758
744
|
* @param {TinyElementWithDoc|TinyElementWithDoc[]} elems - A single element/window element or array of html elements.
|
|
759
745
|
* @param {string} where - The method or context name where validation is being called.
|
|
760
746
|
* @returns {ElementWithDoc} - Always returns an single element/window element.
|
|
761
|
-
* @readonly
|
|
762
747
|
*/
|
|
763
|
-
static
|
|
748
|
+
static _preElemWithDoc(elems: TinyElementWithDoc | TinyElementWithDoc[], where: string): ElementWithDoc;
|
|
764
749
|
/**
|
|
765
750
|
* Normalizes and converts one or more DOM elements (or TinyHtml instances)
|
|
766
751
|
* into an array of `TinyHtml` instances.
|
|
@@ -873,9 +858,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
873
858
|
* Internal data selectors for accessing public or private data stores.
|
|
874
859
|
*
|
|
875
860
|
* @type {Record<string, (where: string, elem: TinyElement) => ElementDataStore>}
|
|
876
|
-
* @readonly
|
|
877
861
|
*/
|
|
878
|
-
static
|
|
862
|
+
static _dataSelector: Record<string, (where: string, elem: TinyElement) => ElementDataStore>;
|
|
879
863
|
/**
|
|
880
864
|
* Retrieves data associated with a DOM element.
|
|
881
865
|
*
|
|
@@ -925,18 +909,16 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
925
909
|
* @param {"previousSibling"|"nextSibling"} direction
|
|
926
910
|
* @param {string} where
|
|
927
911
|
* @returns {ChildNode|null}
|
|
928
|
-
* @readonly
|
|
929
912
|
*/
|
|
930
|
-
static
|
|
913
|
+
static _getSibling(el: TinyNode, direction: "previousSibling" | "nextSibling", where: string): ChildNode | null;
|
|
931
914
|
/**
|
|
932
915
|
* Get all sibling elements excluding the given one.
|
|
933
916
|
*
|
|
934
917
|
* @param {Node|null} start
|
|
935
918
|
* @param {Node|null} [exclude]
|
|
936
919
|
* @returns {ChildNode[]}
|
|
937
|
-
* @readonly
|
|
938
920
|
*/
|
|
939
|
-
static
|
|
921
|
+
static _getSiblings(start: Node | null, exclude?: Node | null): ChildNode[];
|
|
940
922
|
/**
|
|
941
923
|
* Traverse DOM in a direction collecting elements.
|
|
942
924
|
*
|
|
@@ -1034,7 +1016,7 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
1034
1016
|
* @returns {Node[]}
|
|
1035
1017
|
*/
|
|
1036
1018
|
static clone(el: TinyNode | TinyNode[], deep?: boolean): Node[];
|
|
1037
|
-
static
|
|
1019
|
+
static _appendChecker(where: string, ...nodes: (AppendCheckerValues | Record<string, AppendCheckerValues>)[]): (Node | string)[];
|
|
1038
1020
|
/**
|
|
1039
1021
|
* Appends child elements or strings to the end of the target element(s).
|
|
1040
1022
|
*
|
|
@@ -1204,7 +1186,7 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
1204
1186
|
*
|
|
1205
1187
|
* @type {Record<string | symbol, string>}
|
|
1206
1188
|
*/
|
|
1207
|
-
static "__#
|
|
1189
|
+
static "__#private@#cssPropAliases": Record<string | symbol, string>;
|
|
1208
1190
|
/**
|
|
1209
1191
|
* Public proxy to manage camelCase ➝ kebab-case CSS property aliasing.
|
|
1210
1192
|
*
|
|
@@ -1451,7 +1433,7 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
1451
1433
|
*/
|
|
1452
1434
|
static outerWidth(el: TinyElementAndWinAndDoc, includeMargin?: boolean): number;
|
|
1453
1435
|
/** @type {string} */
|
|
1454
|
-
static "__#
|
|
1436
|
+
static "__#private@#defaultDisplay": string;
|
|
1455
1437
|
/**
|
|
1456
1438
|
* Sets the default display value.
|
|
1457
1439
|
* @param {string} value
|
|
@@ -1487,7 +1469,7 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
1487
1469
|
*
|
|
1488
1470
|
* @type {boolean}
|
|
1489
1471
|
*/
|
|
1490
|
-
static "__#
|
|
1472
|
+
static "__#private@#cancelOldStyleFx": boolean;
|
|
1491
1473
|
/**
|
|
1492
1474
|
* Updates the global setting that determines whether old style-based animations
|
|
1493
1475
|
* are cancelled before new ones start.
|
|
@@ -1512,7 +1494,7 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
1512
1494
|
*
|
|
1513
1495
|
* @type {Record<string, number | KeyframeAnimationOptions>}
|
|
1514
1496
|
*/
|
|
1515
|
-
static "__#
|
|
1497
|
+
static "__#private@#styleFxSpeeds": Record<string, number | KeyframeAnimationOptions>;
|
|
1516
1498
|
/**
|
|
1517
1499
|
* Replace the predefined animation speeds.
|
|
1518
1500
|
* @param {Record<string, number | KeyframeAnimationOptions>} speeds
|
|
@@ -1557,12 +1539,12 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
1557
1539
|
* CSS expansion shorthand used by genStyleFx to include margin/padding values.
|
|
1558
1540
|
* @typedef {['Top', 'Right', 'Bottom', 'Left']}
|
|
1559
1541
|
*/
|
|
1560
|
-
static "__#
|
|
1542
|
+
static "__#private@#cssExpand": string[];
|
|
1561
1543
|
/**
|
|
1562
1544
|
* Generate shortcuts
|
|
1563
1545
|
* @type {Record<string, StyleEffects>}
|
|
1564
1546
|
*/
|
|
1565
|
-
static "__#
|
|
1547
|
+
static "__#private@#styleEffects": Record<string, StyleEffects>;
|
|
1566
1548
|
/**
|
|
1567
1549
|
* Replace the entire styleEffects map with a new one.
|
|
1568
1550
|
*
|
|
@@ -1603,7 +1585,7 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
1603
1585
|
* Style Effect Inverse Values
|
|
1604
1586
|
* @type {Record<string, string>}
|
|
1605
1587
|
*/
|
|
1606
|
-
static "__#
|
|
1588
|
+
static "__#private@#styleEffectInverse": Record<string, string>;
|
|
1607
1589
|
/**
|
|
1608
1590
|
* Replace the style inverse values.
|
|
1609
1591
|
* @param {Record<string, string>} values
|
|
@@ -1648,7 +1630,7 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
1648
1630
|
* Style Effect Repeat Detector
|
|
1649
1631
|
* @type {Record<string, StyleEffectsRdFn>}
|
|
1650
1632
|
*/
|
|
1651
|
-
static "__#
|
|
1633
|
+
static "__#private@#styleEffectsRd": Record<string, StyleEffectsRdFn>;
|
|
1652
1634
|
/**
|
|
1653
1635
|
* Replace the style effects repeat detectors.
|
|
1654
1636
|
* @param {Record<string, StyleEffectsRdFn>} detectors
|
|
@@ -1695,7 +1677,7 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
1695
1677
|
*
|
|
1696
1678
|
* @type {StyleEffectsProps}
|
|
1697
1679
|
*/
|
|
1698
|
-
static "__#
|
|
1680
|
+
static "__#private@#styleEffectsProps": StyleEffectsProps;
|
|
1699
1681
|
/**
|
|
1700
1682
|
* Replace the entire styleEffectsProps map with a new one.
|
|
1701
1683
|
*
|
|
@@ -1959,7 +1941,7 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
1959
1941
|
*/
|
|
1960
1942
|
static padding(el: TinyElement): HtmlElBoxSides;
|
|
1961
1943
|
/** @type {boolean} */
|
|
1962
|
-
static "__#
|
|
1944
|
+
static "__#private@#classCanWhitespace": boolean;
|
|
1963
1945
|
/**
|
|
1964
1946
|
* Sets the value of classCanWhitespace.
|
|
1965
1947
|
* @param {boolean} value
|
|
@@ -2166,8 +2148,7 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
2166
2148
|
* @returns {T}
|
|
2167
2149
|
*/
|
|
2168
2150
|
static setHtml<T extends TinyElement | TinyElement[]>(el: T, value: string): T;
|
|
2169
|
-
|
|
2170
|
-
static readonly _valHooks: {
|
|
2151
|
+
static _valHooks: {
|
|
2171
2152
|
option: {
|
|
2172
2153
|
/**
|
|
2173
2154
|
* @param {HTMLOptionElement} elem
|
|
@@ -2226,9 +2207,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
2226
2207
|
/**
|
|
2227
2208
|
* Maps value types to their corresponding getter functions.
|
|
2228
2209
|
* Each function extracts a value of a specific type from a compatible HTMLInputElement.
|
|
2229
|
-
* @readonly
|
|
2230
2210
|
*/
|
|
2231
|
-
static
|
|
2211
|
+
static _valTypes: {
|
|
2232
2212
|
/**
|
|
2233
2213
|
* Gets the string value from any HTMLInputElement.
|
|
2234
2214
|
* @type {(elem: HTMLInputElement) => string}
|
|
@@ -2261,9 +2241,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
2261
2241
|
* @param {string} where - The context/method name using this validation.
|
|
2262
2242
|
* @returns {any} The extracted value, depending on the type.
|
|
2263
2243
|
* @throws {Error} If the element is not an HTMLInputElement or if the type handler is invalid.
|
|
2264
|
-
* @readonly
|
|
2265
2244
|
*/
|
|
2266
|
-
static
|
|
2245
|
+
static _getValByType(elem: InputElement, type: GetValueTypes, where: string): any;
|
|
2267
2246
|
/**
|
|
2268
2247
|
* Retrieves the raw value from the HTML input element.
|
|
2269
2248
|
* If a custom value hook exists, it will be used first.
|
|
@@ -2272,9 +2251,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
2272
2251
|
* @param {GetValueTypes} type - The type of value to retrieve ("string", "date", or "number").
|
|
2273
2252
|
* @param {string} where - The context/method name using this validation.
|
|
2274
2253
|
* @returns {any} The raw value retrieved from the element or hook.
|
|
2275
|
-
* @readonly
|
|
2276
2254
|
*/
|
|
2277
|
-
static
|
|
2255
|
+
static _val(el: TinyInputElement, where: string, type: GetValueTypes): any;
|
|
2278
2256
|
/**
|
|
2279
2257
|
* Gets the value of the current HTML value element.
|
|
2280
2258
|
*
|
|
@@ -2298,9 +2276,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
2298
2276
|
* @param {GetValueTypes} type - The type of value to retrieve ("string", "date", or "number").
|
|
2299
2277
|
* @returns {SetValueBase[]} - The validated value as an array.
|
|
2300
2278
|
* @throws {Error} If the returned value is not an array.
|
|
2301
|
-
* @readonly
|
|
2302
2279
|
*/
|
|
2303
|
-
static
|
|
2280
|
+
static _valArr(el: TinyInputElement, where: string, type: GetValueTypes): SetValueBase[];
|
|
2304
2281
|
/**
|
|
2305
2282
|
* Gets the raw value as a generic array of the current HTML value element (for select).
|
|
2306
2283
|
*
|
|
@@ -2452,7 +2429,7 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
2452
2429
|
*
|
|
2453
2430
|
* @type {Record<string | symbol, string>}
|
|
2454
2431
|
*/
|
|
2455
|
-
static "__#
|
|
2432
|
+
static "__#private@#propFix": Record<string | symbol, string>;
|
|
2456
2433
|
/**
|
|
2457
2434
|
* Public proxy for normalized DOM property names.
|
|
2458
2435
|
*
|
|
@@ -2688,9 +2665,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
2688
2665
|
* @param {DOMRect} rect - The base rectangle to be cloned and extended.
|
|
2689
2666
|
* @param {Partial<DOMRect>} extraRect - Additional dimensions to apply to the base rect (e.g., extra padding or offset).
|
|
2690
2667
|
* @returns {DOMRect} - A new DOMRect object with the combined dimensions.
|
|
2691
|
-
* @readonly
|
|
2692
2668
|
*/
|
|
2693
|
-
static
|
|
2669
|
+
static _getCustomRect(rect: DOMRect, extraRect: Partial<DOMRect>): DOMRect;
|
|
2694
2670
|
/**
|
|
2695
2671
|
* Determines if two HTML elements are colliding, using a simple bounding box comparison.
|
|
2696
2672
|
*
|
|
@@ -2725,9 +2701,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
2725
2701
|
* @param {Element} elem1 - The element to track collision state for.
|
|
2726
2702
|
* @param {CollisionDirLock} lockDirection - The direction from which the collision was first detected.
|
|
2727
2703
|
* @returns {boolean} Returns `true` if the element is still considered colliding (locked), otherwise `false`.
|
|
2728
|
-
* @readonly
|
|
2729
2704
|
*/
|
|
2730
|
-
static
|
|
2705
|
+
static _isCollWithLock(isColliding: boolean, rect1: DOMRect, rect2: DOMRect, elem1: Element, lockDirection: CollisionDirLock): boolean;
|
|
2731
2706
|
/**
|
|
2732
2707
|
* Checks if two DOM elements are colliding on the screen, and locks the collision
|
|
2733
2708
|
* until the element exits through the same side it entered.
|
|
@@ -2887,17 +2862,15 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
2887
2862
|
* @param {string} where - The method name or context calling this.
|
|
2888
2863
|
* @param {number} index - The index of the element to retrieve.
|
|
2889
2864
|
* @returns {ConstructorElValues} - The instance's element.
|
|
2890
|
-
* @readonly
|
|
2891
2865
|
*/
|
|
2892
|
-
|
|
2866
|
+
_getElement(where: string, index: number): ConstructorElValues;
|
|
2893
2867
|
/**
|
|
2894
2868
|
* Returns the current Elements held by this instance.
|
|
2895
2869
|
*
|
|
2896
2870
|
* @param {string} where - The method name or context calling this.
|
|
2897
2871
|
* @returns {ConstructorElValues[]} - The instance's elements.
|
|
2898
|
-
* @readonly
|
|
2899
2872
|
*/
|
|
2900
|
-
|
|
2873
|
+
_getElements(where: string): ConstructorElValues[];
|
|
2901
2874
|
/**
|
|
2902
2875
|
* Prepares and validates multiple elements against allowed types.
|
|
2903
2876
|
*
|
|
@@ -2906,9 +2879,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
2906
2879
|
* @param {string[]} elemName - The list of expected element names for error reporting.
|
|
2907
2880
|
* @returns {any[]} - A flat array of validated elements.
|
|
2908
2881
|
* @throws {Error} - If any element is not an instance of one of the allowed types.
|
|
2909
|
-
* @readonly
|
|
2910
2882
|
*/
|
|
2911
|
-
|
|
2883
|
+
_preElemsTemplate(where: string, TheTinyElements: any[], elemName: string[]): any[];
|
|
2912
2884
|
/**
|
|
2913
2885
|
* Prepares and validates a single element against allowed types.
|
|
2914
2886
|
*
|
|
@@ -2918,162 +2890,144 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
2918
2890
|
* @param {boolean} [canNull=false] - Whether `null` is allowed as a valid value.
|
|
2919
2891
|
* @returns {any} - The validated element or `null` if allowed.
|
|
2920
2892
|
* @throws {Error} - If the element is not valid or if multiple elements are provided.
|
|
2921
|
-
* @readonly
|
|
2922
2893
|
*/
|
|
2923
|
-
|
|
2894
|
+
_preElemTemplate(where: string, TheTinyElements: any[], elemName: string[], canNull?: boolean): any;
|
|
2924
2895
|
/**
|
|
2925
2896
|
* Ensures the input is returned as an array.
|
|
2926
2897
|
* Useful to normalize operations across multiple or single elements.
|
|
2927
2898
|
*
|
|
2928
2899
|
* @param {string} where - The method or context name where validation is being called.
|
|
2929
2900
|
* @returns {Element[]} - Always returns an array of elements.
|
|
2930
|
-
* @readonly
|
|
2931
2901
|
*/
|
|
2932
|
-
|
|
2902
|
+
_preElems(where: string): Element[];
|
|
2933
2903
|
/**
|
|
2934
2904
|
* Ensures the input is returned as an single element.
|
|
2935
2905
|
* Useful to normalize operations across multiple or single elements.
|
|
2936
2906
|
*
|
|
2937
2907
|
* @param {string} where - The method or context name where validation is being called.
|
|
2938
2908
|
* @returns {Element} - Always returns an single element.
|
|
2939
|
-
* @readonly
|
|
2940
2909
|
*/
|
|
2941
|
-
|
|
2910
|
+
_preElem(where: string): Element;
|
|
2942
2911
|
/**
|
|
2943
2912
|
* Ensures the input is returned as an array.
|
|
2944
2913
|
* Useful to normalize operations across multiple or single nodes.
|
|
2945
2914
|
*
|
|
2946
2915
|
* @param {string} where - The method or context name where validation is being called.
|
|
2947
2916
|
* @returns {Node[]} - Always returns an array of nodes.
|
|
2948
|
-
* @readonly
|
|
2949
2917
|
*/
|
|
2950
|
-
|
|
2918
|
+
_preNodeElems(where: string): Node[];
|
|
2951
2919
|
/**
|
|
2952
2920
|
* Ensures the input is returned as an single node.
|
|
2953
2921
|
* Useful to normalize operations across multiple or single nodes.
|
|
2954
2922
|
*
|
|
2955
2923
|
* @param {string} where - The method or context name where validation is being called.
|
|
2956
2924
|
* @returns {Node} - Always returns an single node.
|
|
2957
|
-
* @readonly
|
|
2958
2925
|
*/
|
|
2959
|
-
|
|
2926
|
+
_preNodeElem(where: string): Node;
|
|
2960
2927
|
/**
|
|
2961
2928
|
* Ensures the input is returned as an single node.
|
|
2962
2929
|
* Useful to normalize operations across multiple or single nodes.
|
|
2963
2930
|
*
|
|
2964
2931
|
* @param {string} where - The method or context name where validation is being called.
|
|
2965
2932
|
* @returns {Node|null} - Always returns an single node or null.
|
|
2966
|
-
* @readonly
|
|
2967
2933
|
*/
|
|
2968
|
-
|
|
2934
|
+
_preNodeElemWithNull(where: string): Node | null;
|
|
2969
2935
|
/**
|
|
2970
2936
|
* Ensures the input is returned as an array.
|
|
2971
2937
|
* Useful to normalize operations across multiple or single html elements.
|
|
2972
2938
|
*
|
|
2973
2939
|
* @param {string} where - The method or context name where validation is being called.
|
|
2974
2940
|
* @returns {HTMLElement[]} - Always returns an array of html elements.
|
|
2975
|
-
* @readonly
|
|
2976
2941
|
*/
|
|
2977
|
-
|
|
2942
|
+
_preHtmlElems(where: string): HTMLElement[];
|
|
2978
2943
|
/**
|
|
2979
2944
|
* Ensures the input is returned as an single html element.
|
|
2980
2945
|
* Useful to normalize operations across multiple or single html elements.
|
|
2981
2946
|
*
|
|
2982
2947
|
* @param {string} where - The method or context name where validation is being called.
|
|
2983
2948
|
* @returns {HTMLElement} - Always returns an single html element.
|
|
2984
|
-
* @readonly
|
|
2985
2949
|
*/
|
|
2986
|
-
|
|
2950
|
+
_preHtmlElem(where: string): HTMLElement;
|
|
2987
2951
|
/**
|
|
2988
2952
|
* Ensures the input is returned as an array.
|
|
2989
2953
|
* Useful to normalize operations across multiple or single event target elements.
|
|
2990
2954
|
*
|
|
2991
2955
|
* @param {string} where - The method or context name where validation is being called.
|
|
2992
2956
|
* @returns {InputElement[]} - Always returns an array of event target elements.
|
|
2993
|
-
* @readonly
|
|
2994
2957
|
*/
|
|
2995
|
-
|
|
2958
|
+
_preInputElems(where: string): InputElement[];
|
|
2996
2959
|
/**
|
|
2997
2960
|
* Ensures the input is returned as an single event target element.
|
|
2998
2961
|
* Useful to normalize operations across multiple or single event target elements.
|
|
2999
2962
|
*
|
|
3000
2963
|
* @param {string} where - The method or context name where validation is being called.
|
|
3001
2964
|
* @returns {InputElement} - Always returns an single event target element.
|
|
3002
|
-
* @readonly
|
|
3003
2965
|
*/
|
|
3004
|
-
|
|
2966
|
+
_preInputElem(where: string): InputElement;
|
|
3005
2967
|
/**
|
|
3006
2968
|
* Ensures the input is returned as an array.
|
|
3007
2969
|
* Useful to normalize operations across multiple or single event target elements.
|
|
3008
2970
|
*
|
|
3009
2971
|
* @param {string} where - The method or context name where validation is being called.
|
|
3010
2972
|
* @returns {EventTarget[]} - Always returns an array of event target elements.
|
|
3011
|
-
* @readonly
|
|
3012
2973
|
*/
|
|
3013
|
-
|
|
2974
|
+
_preEventTargetElems(where: string): EventTarget[];
|
|
3014
2975
|
/**
|
|
3015
2976
|
* Ensures the input is returned as an single event target element.
|
|
3016
2977
|
* Useful to normalize operations across multiple or single event target elements.
|
|
3017
2978
|
*
|
|
3018
2979
|
* @param {string} where - The method or context name where validation is being called.
|
|
3019
2980
|
* @returns {EventTarget} - Always returns an single event target element.
|
|
3020
|
-
* @readonly
|
|
3021
2981
|
*/
|
|
3022
|
-
|
|
2982
|
+
_preEventTargetElem(where: string): EventTarget;
|
|
3023
2983
|
/**
|
|
3024
2984
|
* Ensures the input is returned as an array.
|
|
3025
2985
|
* Useful to normalize operations across multiple or single element/window elements.
|
|
3026
2986
|
*
|
|
3027
2987
|
* @param {string} where - The method or context name where validation is being called.
|
|
3028
2988
|
* @returns {ElementAndWindow[]} - Always returns an array of element/window elements.
|
|
3029
|
-
* @readonly
|
|
3030
2989
|
*/
|
|
3031
|
-
|
|
2990
|
+
_preElemsAndWindow(where: string): ElementAndWindow[];
|
|
3032
2991
|
/**
|
|
3033
2992
|
* Ensures the input is returned as an single element/window element.
|
|
3034
2993
|
* Useful to normalize operations across multiple or single element/window elements.
|
|
3035
2994
|
*
|
|
3036
2995
|
* @param {string} where - The method or context name where validation is being called.
|
|
3037
2996
|
* @returns {ElementAndWindow} - Always returns an single element/window element.
|
|
3038
|
-
* @readonly
|
|
3039
2997
|
*/
|
|
3040
|
-
|
|
2998
|
+
_preElemAndWindow(where: string): ElementAndWindow;
|
|
3041
2999
|
/**
|
|
3042
3000
|
* Ensures the input is returned as an array.
|
|
3043
3001
|
* Useful to normalize operations across multiple or single element/window/document elements.
|
|
3044
3002
|
*
|
|
3045
3003
|
* @param {string} where - The method or context name where validation is being called.
|
|
3046
3004
|
* @returns {ElementAndWindow[]} - Always returns an array of element/document/window elements.
|
|
3047
|
-
* @readonly
|
|
3048
3005
|
*/
|
|
3049
|
-
|
|
3006
|
+
_preElemsAndWinAndDoc(where: string): ElementAndWindow[];
|
|
3050
3007
|
/**
|
|
3051
3008
|
* Ensures the input is returned as an single element/window/document element.
|
|
3052
3009
|
* Useful to normalize operations across multiple or single element/window/document elements.
|
|
3053
3010
|
*
|
|
3054
3011
|
* @param {string} where - The method or context name where validation is being called.
|
|
3055
3012
|
* @returns {ElementAndWindow} - Always returns an single element/document/window element.
|
|
3056
|
-
* @readonly
|
|
3057
3013
|
*/
|
|
3058
|
-
|
|
3014
|
+
_preElemAndWinAndDoc(where: string): ElementAndWindow;
|
|
3059
3015
|
/**
|
|
3060
3016
|
* Ensures the input is returned as an array.
|
|
3061
3017
|
* Useful to normalize operations across multiple or single element with document elements.
|
|
3062
3018
|
*
|
|
3063
3019
|
* @param {string} where - The method or context name where validation is being called.
|
|
3064
3020
|
* @returns {ElementWithDoc[]} - Always returns an array of element with document elements.
|
|
3065
|
-
* @readonly
|
|
3066
3021
|
*/
|
|
3067
|
-
|
|
3022
|
+
_preElemsWithDoc(where: string): ElementWithDoc[];
|
|
3068
3023
|
/**
|
|
3069
3024
|
* Ensures the input is returned as an single element with document element.
|
|
3070
3025
|
* Useful to normalize operations across multiple or single element with document elements.
|
|
3071
3026
|
*
|
|
3072
3027
|
* @param {string} where - The method or context name where validation is being called.
|
|
3073
3028
|
* @returns {ElementWithDoc} - Always returns an single element/window element.
|
|
3074
|
-
* @readonly
|
|
3075
3029
|
*/
|
|
3076
|
-
|
|
3030
|
+
_preElemWithDoc(where: string): ElementWithDoc;
|
|
3077
3031
|
/**
|
|
3078
3032
|
* Returns only the elements **not** matching the given selector or function.
|
|
3079
3033
|
*
|
|
@@ -3850,9 +3804,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
3850
3804
|
* @param {GetValueTypes} type - The type of value to retrieve ("string", "date", or "number").
|
|
3851
3805
|
* @param {string} where - The context/method name using this validation.
|
|
3852
3806
|
* @returns {any} The raw value retrieved from the element or hook.
|
|
3853
|
-
* @readonly
|
|
3854
3807
|
*/
|
|
3855
|
-
|
|
3808
|
+
_val(where: string, type: GetValueTypes): any;
|
|
3856
3809
|
/**
|
|
3857
3810
|
* Gets the value of the current HTML value element.
|
|
3858
3811
|
*
|
|
@@ -3873,9 +3826,8 @@ declare class TinyHtml<TinyHtmlT extends TinyHtmlConstructor> {
|
|
|
3873
3826
|
* @param {GetValueTypes} type - The type of value to retrieve ("string", "date", or "number").
|
|
3874
3827
|
* @returns {SetValueBase[]} - The validated value as an array.
|
|
3875
3828
|
* @throws {Error} If the returned value is not an array.
|
|
3876
|
-
* @readonly
|
|
3877
3829
|
*/
|
|
3878
|
-
|
|
3830
|
+
_valArr(where: string, type: GetValueTypes): SetValueBase[];
|
|
3879
3831
|
/**
|
|
3880
3832
|
* Gets the raw value as a generic array of the current HTML value element (for select).
|
|
3881
3833
|
*
|