tiny-essentials 1.28.1 → 1.28.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/28/2.md +43 -0
- package/changelog/1/28/3.md +9 -0
- package/dist/_/numbers.d.mts +91 -16
- package/dist/v1/TinyBasicsEs.min.js +1 -1
- package/dist/v1/TinyEssentials.min.js +1 -1
- package/dist/v1/TinyMediaPlayer.min.js +1 -1
- package/dist/v1/TinyRadioFm.min.js +1 -1
- package/dist/v1/basics/array.d.mts +14 -14
- package/dist/v1/basics/clock.cjs +15 -15
- package/dist/v1/basics/clock.d.mts +21 -21
- package/dist/v1/basics/clock.mjs +15 -15
- package/dist/v1/basics/collision.d.mts +245 -104
- package/dist/v1/basics/deprecated/html.d.mts +33 -33
- package/dist/v1/basics/extendObjType/Buffer.d.mts +1 -1
- package/dist/v1/basics/fullScreen.d.mts +47 -7
- package/dist/v1/basics/html.d.mts +52 -61
- package/dist/v1/basics/index.cjs +2 -0
- package/dist/v1/basics/index.d.mts +11 -67
- package/dist/v1/basics/index.mjs +2 -2
- package/dist/v1/basics/mediaContent.cjs +65 -23
- package/dist/v1/basics/mediaContent.d.mts +144 -73
- package/dist/v1/basics/mediaContent.mjs +65 -23
- package/dist/v1/basics/objChecker.d.mts +2 -2
- package/dist/v1/basics/objFilter.cjs +50 -16
- package/dist/v1/basics/objFilter.d.mts +34 -13
- package/dist/v1/basics/objFilter.mjs +48 -16
- package/dist/v1/basics/simpleMath.d.mts +21 -21
- package/dist/v1/basics/text.d.mts +34 -46
- package/dist/v1/build/ColorSafeStringify.d.mts +1 -1
- package/dist/v1/build/TinyAdvancedRaffle.d.mts +1 -1
- package/dist/v1/build/TinyAfterScrollWatcher.d.mts +1 -1
- package/dist/v1/build/TinyAnalogClock.d.mts +1 -1
- package/dist/v1/build/TinyArrayComparator.d.mts +1 -1
- package/dist/v1/build/TinyArrayPaginator.d.mts +1 -1
- package/dist/v1/build/TinyClassManager.d.mts +1 -1
- package/dist/v1/build/TinyClipboard.d.mts +1 -1
- package/dist/v1/build/TinyColorConverter.d.mts +1 -1
- package/dist/v1/build/TinyColorValidator.d.mts +1 -1
- package/dist/v1/build/TinyCookieConsent.d.mts +1 -1
- package/dist/v1/build/TinyDayNightCycle.d.mts +1 -1
- package/dist/v1/build/TinyDomReadyManager.d.mts +1 -1
- package/dist/v1/build/TinyDragDropDetector.d.mts +1 -1
- package/dist/v1/build/TinyDragger.d.mts +1 -1
- package/dist/v1/build/TinyElementObserver.d.mts +1 -1
- package/dist/v1/build/TinyGamepad.d.mts +1 -1
- package/dist/v1/build/TinyHtml.d.mts +1 -1
- package/dist/v1/build/TinyI18.d.mts +1 -1
- package/dist/v1/build/TinyIframeEvents.d.mts +1 -1
- package/dist/v1/build/TinyInventory.d.mts +1 -1
- package/dist/v1/build/TinyInventoryTrader.d.mts +1 -1
- package/dist/v1/build/TinyLevelUp.d.mts +1 -1
- package/dist/v1/build/TinyLoadingScreen.d.mts +1 -1
- package/dist/v1/build/TinyLocalStorage.d.mts +1 -1
- package/dist/v1/build/TinyMediaPlayer.d.mts +1 -1
- package/dist/v1/build/TinyNeedBar.d.mts +1 -1
- package/dist/v1/build/TinyNewWinEvents.d.mts +1 -1
- package/dist/v1/build/TinyNotifications.d.mts +1 -1
- package/dist/v1/build/TinyNotifyCenter.d.mts +1 -1
- package/dist/v1/build/TinyPromiseQueue.d.mts +1 -1
- package/dist/v1/build/TinyRadioFm.d.mts +1 -1
- package/dist/v1/build/TinyRateLimiter.d.mts +1 -1
- package/dist/v1/build/TinySimpleDice.d.mts +1 -1
- package/dist/v1/build/TinySmartScroller.d.mts +1 -1
- package/dist/v1/build/TinyTextDiffer.d.mts +1 -1
- package/dist/v1/build/TinyTextRangeEditor.d.mts +1 -1
- package/dist/v1/build/TinyTextarea.d.mts +1 -1
- package/dist/v1/build/TinyTimeout.d.mts +1 -1
- package/dist/v1/build/TinyToastNotify.d.mts +1 -1
- package/dist/v1/build/TinyUploadClicker.d.mts +1 -1
- package/dist/v1/build/UltraRandomMsgGen.d.mts +1 -1
- package/dist/v1/fileManager/asyncFuncs.d.mts +13 -13
- package/dist/v1/fileManager/index.d.mts +3 -29
- package/dist/v1/fileManager/normalFuncs.d.mts +22 -22
- package/dist/v1/index.cjs +2 -0
- package/dist/v1/index.d.mts +53 -139
- package/dist/v1/index.mjs +2 -2
- package/dist/v1/libs/ColorSafeStringify.d.mts +3 -12
- package/dist/v1/libs/TinyAdvancedRaffle.d.mts +60 -103
- package/dist/v1/libs/TinyAfterScrollWatcher.d.mts +11 -18
- package/dist/v1/libs/TinyAnalogClock.d.mts +8 -11
- package/dist/v1/libs/TinyArrayComparator.d.mts +14 -20
- package/dist/v1/libs/TinyArrayPaginator.d.mts +22 -26
- package/dist/v1/libs/TinyClassManager/TinyPluginInliner.d.mts +8 -8
- package/dist/v1/libs/TinyClassManager.cjs +5 -7
- package/dist/v1/libs/TinyClassManager.d.mts +16 -16
- package/dist/v1/libs/TinyClassManager.mjs +5 -6
- package/dist/v1/libs/TinyClipboard.d.mts +8 -3
- package/dist/v1/libs/TinyColorConverter.d.mts +8 -31
- package/dist/v1/libs/TinyColorValidator.d.mts +145 -184
- package/dist/v1/libs/TinyCookieConsent.d.mts +17 -17
- package/dist/v1/libs/TinyDayNightCycle.d.mts +85 -110
- package/dist/v1/libs/TinyDomReadyManager.d.mts +8 -16
- package/dist/v1/libs/TinyDragDropDetector.d.mts +30 -30
- package/dist/v1/libs/TinyDragger.d.mts +82 -81
- package/dist/v1/libs/TinyElementObserver.d.mts +25 -28
- package/dist/v1/libs/TinyGamepad.cjs +0 -1
- package/dist/v1/libs/TinyGamepad.d.mts +50 -122
- package/dist/v1/libs/TinyGamepad.mjs +0 -1
- package/dist/v1/libs/TinyHtml/TinyHtmlAnchor.cjs +2 -25
- package/dist/v1/libs/TinyHtml/TinyHtmlAnchor.d.mts +19 -25
- package/dist/v1/libs/TinyHtml/TinyHtmlAnchor.mjs +3 -27
- package/dist/v1/libs/TinyHtml/TinyHtmlButton.cjs +2 -1
- package/dist/v1/libs/TinyHtml/TinyHtmlButton.d.mts +55 -55
- package/dist/v1/libs/TinyHtml/TinyHtmlButton.mjs +2 -1
- package/dist/v1/libs/TinyHtml/TinyHtmlCanvas.d.mts +6 -6
- package/dist/v1/libs/TinyHtml/TinyHtmlDatalist.cjs +8 -4
- package/dist/v1/libs/TinyHtml/TinyHtmlDatalist.d.mts +19 -21
- package/dist/v1/libs/TinyHtml/TinyHtmlDatalist.mjs +7 -4
- package/dist/v1/libs/TinyHtml/TinyHtmlEmbed.d.mts +8 -8
- package/dist/v1/libs/TinyHtml/TinyHtmlForm.d.mts +18 -18
- package/dist/v1/libs/TinyHtml/TinyHtmlIcon.d.mts +5 -6
- package/dist/v1/libs/TinyHtml/TinyHtmlIframe.d.mts +19 -19
- package/dist/v1/libs/TinyHtml/TinyHtmlImage.cjs +0 -28
- package/dist/v1/libs/TinyHtml/TinyHtmlImage.d.mts +22 -28
- package/dist/v1/libs/TinyHtml/TinyHtmlImage.mjs +1 -27
- package/dist/v1/libs/TinyHtml/TinyHtmlInput.d.mts +11 -11
- package/dist/v1/libs/TinyHtml/TinyHtmlLink.d.mts +23 -23
- package/dist/v1/libs/TinyHtml/TinyHtmlMedia.d.mts +26 -26
- package/dist/v1/libs/TinyHtml/TinyHtmlScript.cjs +4 -30
- package/dist/v1/libs/TinyHtml/TinyHtmlScript.d.mts +20 -26
- package/dist/v1/libs/TinyHtml/TinyHtmlScript.mjs +5 -32
- package/dist/v1/libs/TinyHtml/TinyHtmlSelect.d.mts +19 -19
- package/dist/v1/libs/TinyHtml/TinyHtmlStyle.d.mts +8 -8
- package/dist/v1/libs/TinyHtml/TinyHtmlTemplate.d.mts +26 -28
- package/dist/v1/libs/TinyHtml/TinyHtmlTextarea.cjs +14 -15
- package/dist/v1/libs/TinyHtml/TinyHtmlTextarea.d.mts +32 -32
- package/dist/v1/libs/TinyHtml/TinyHtmlTextarea.mjs +15 -15
- package/dist/v1/libs/TinyHtml/index.d.mts +102 -45
- package/dist/v1/libs/TinyHtml/input/TinyHtmlColorInput.cjs +11 -9
- package/dist/v1/libs/TinyHtml/input/TinyHtmlColorInput.d.mts +21 -21
- package/dist/v1/libs/TinyHtml/input/TinyHtmlColorInput.mjs +11 -9
- package/dist/v1/libs/TinyHtml/input/TinyHtmlFileInput.d.mts +11 -11
- package/dist/v1/libs/TinyHtml/input/TinyHtmlHiddenInput.cjs +4 -4
- package/dist/v1/libs/TinyHtml/input/TinyHtmlHiddenInput.d.mts +17 -13
- package/dist/v1/libs/TinyHtml/input/TinyHtmlHiddenInput.mjs +4 -4
- package/dist/v1/libs/TinyHtml/input/TinyHtmlImageInput.d.mts +21 -21
- package/dist/v1/libs/TinyHtml/input/button/TinyHtmlButtonInput.cjs +5 -4
- package/dist/v1/libs/TinyHtml/input/button/TinyHtmlButtonInput.d.mts +14 -14
- package/dist/v1/libs/TinyHtml/input/button/TinyHtmlButtonInput.mjs +5 -4
- package/dist/v1/libs/TinyHtml/input/button/TinyHtmlResetInput.cjs +4 -3
- package/dist/v1/libs/TinyHtml/input/button/TinyHtmlResetInput.d.mts +10 -10
- package/dist/v1/libs/TinyHtml/input/button/TinyHtmlResetInput.mjs +4 -3
- package/dist/v1/libs/TinyHtml/input/button/TinyHtmlSubmitInput.cjs +4 -3
- package/dist/v1/libs/TinyHtml/input/button/TinyHtmlSubmitInput.d.mts +19 -19
- package/dist/v1/libs/TinyHtml/input/button/TinyHtmlSubmitInput.mjs +4 -3
- package/dist/v1/libs/TinyHtml/input/check/TinyHtmlCheckboxInput.cjs +5 -4
- package/dist/v1/libs/TinyHtml/input/check/TinyHtmlCheckboxInput.d.mts +11 -11
- package/dist/v1/libs/TinyHtml/input/check/TinyHtmlCheckboxInput.mjs +5 -4
- package/dist/v1/libs/TinyHtml/input/check/TinyHtmlRadioInput.cjs +4 -3
- package/dist/v1/libs/TinyHtml/input/check/TinyHtmlRadioInput.d.mts +15 -11
- package/dist/v1/libs/TinyHtml/input/check/TinyHtmlRadioInput.mjs +4 -3
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateInput.cjs +49 -21
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateInput.d.mts +34 -20
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateInput.mjs +45 -20
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateTimeInput.cjs +1 -1
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateTimeInput.d.mts +14 -14
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateTimeInput.mjs +1 -1
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlMonthInput.cjs +1 -1
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlMonthInput.d.mts +14 -14
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlMonthInput.mjs +1 -1
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlTimeInput.cjs +48 -25
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlTimeInput.d.mts +27 -21
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlTimeInput.mjs +40 -27
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlWeekInput.cjs +1 -1
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlWeekInput.d.mts +14 -14
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlWeekInput.mjs +1 -1
- package/dist/v1/libs/TinyHtml/input/number/TinyHtmlNumberInput.d.mts +14 -14
- package/dist/v1/libs/TinyHtml/input/number/TinyHtmlRangeInput.d.mts +14 -14
- package/dist/v1/libs/TinyHtml/input/text/TinyHtmlEmailInput.d.mts +25 -21
- package/dist/v1/libs/TinyHtml/input/text/TinyHtmlPasswordInput.d.mts +18 -18
- package/dist/v1/libs/TinyHtml/input/text/TinyHtmlSearchInput.d.mts +33 -29
- package/dist/v1/libs/TinyHtml/input/text/TinyHtmlTelInput.d.mts +22 -22
- package/dist/v1/libs/TinyHtml/input/text/TinyHtmlTextInput.d.mts +18 -18
- package/dist/v1/libs/TinyHtml/input/text/TinyHtmlUrlInput.d.mts +31 -27
- package/dist/v1/libs/TinyHtml/media/TinyHtmlAudio.d.mts +35 -11
- package/dist/v1/libs/TinyHtml/media/TinyHtmlObject.d.mts +10 -10
- package/dist/v1/libs/TinyHtml/media/TinyHtmlSource.d.mts +12 -12
- package/dist/v1/libs/TinyHtml/media/TinyHtmlVideo.d.mts +35 -27
- package/dist/v1/libs/TinyHtml.cjs +3 -4
- package/dist/v1/libs/TinyHtml.d.mts +1503 -1731
- package/dist/v1/libs/TinyHtml.mjs +3 -4
- package/dist/v1/libs/TinyI18.d.mts +23 -61
- package/dist/v1/libs/TinyIframeEvents.cjs +1 -1
- package/dist/v1/libs/TinyIframeEvents.d.mts +29 -38
- package/dist/v1/libs/TinyIframeEvents.mjs +1 -1
- package/dist/v1/libs/TinyInventory.d.mts +78 -141
- package/dist/v1/libs/TinyInventoryTrader.d.mts +19 -22
- package/dist/v1/libs/TinyLevelUp.d.mts +10 -13
- package/dist/v1/libs/TinyLoadingScreen.d.mts +21 -31
- package/dist/v1/libs/TinyLocalStorage.d.mts +11 -36
- package/dist/v1/libs/TinyMamdaniInferenceSystem.d.mts +37 -23
- package/dist/v1/libs/TinyMediaPlayer.cjs +5 -3
- package/dist/v1/libs/TinyMediaPlayer.d.mts +102 -109
- package/dist/v1/libs/TinyMediaPlayer.mjs +5 -3
- package/dist/v1/libs/TinyNeedBar.d.mts +25 -37
- package/dist/v1/libs/TinyNewWinEvents.d.mts +29 -32
- package/dist/v1/libs/TinyNotifications.d.mts +6 -6
- package/dist/v1/libs/TinyNotifyCenter.d.mts +15 -21
- package/dist/v1/libs/TinyPromiseQueue.d.mts +11 -11
- package/dist/v1/libs/TinyRadioFm.cjs +32 -12
- package/dist/v1/libs/TinyRadioFm.d.mts +44 -80
- package/dist/v1/libs/TinyRadioFm.mjs +29 -12
- package/dist/v1/libs/TinyRateLimiter.d.mts +26 -39
- package/dist/v1/libs/TinySimpleDice.d.mts +17 -36
- package/dist/v1/libs/TinySmartScroller.d.mts +50 -60
- package/dist/v1/libs/TinyTextDiffer.d.mts +11 -14
- package/dist/v1/libs/TinyTextRangeEditor.d.mts +8 -8
- package/dist/v1/libs/TinyTextarea.d.mts +31 -31
- package/dist/v1/libs/TinyTimeout.d.mts +14 -14
- package/dist/v1/libs/TinyToastNotify.cjs +1 -1
- package/dist/v1/libs/TinyToastNotify.d.mts +15 -23
- package/dist/v1/libs/TinyToastNotify.mjs +1 -1
- package/dist/v1/libs/TinyUploadClicker.d.mts +38 -14
- package/dist/v1/libs/UltraRandomMsgGen.d.mts +44 -84
- package/dist/v1/libs/utils.d.mts +5 -1
- package/docs/v1/basics/deprecated/objFilter.md +14 -0
- package/docs/v1/basics/objFilter.md +31 -17
- package/package.json +2 -2
|
@@ -24,7 +24,7 @@ class TinyHtmlTextarea extends TinyHtmlTemplate {
|
|
|
24
24
|
* @param {string} [config.placeholder] - Placeholder text.
|
|
25
25
|
* @param {'none'|'sentences'|'words'|'characters'|'on'|'off'} [config.autocapitalize] - Controls automatic capitalization.
|
|
26
26
|
* @param {string} [config.autocomplete] - Autocomplete behavior ("on", "off", or token list).
|
|
27
|
-
* @param {
|
|
27
|
+
* @param {boolean} [config.autocorrect] - Autocorrect behavior ("on" or "off").
|
|
28
28
|
* @param {boolean} [config.autofocus=false] - Whether the textarea should autofocus on load.
|
|
29
29
|
* @param {string} [config.dirname] - Directionality of submitted text.
|
|
30
30
|
* @param {boolean} [config.disabled=false] - Whether the textarea is disabled.
|
|
@@ -34,7 +34,7 @@ class TinyHtmlTextarea extends TinyHtmlTemplate {
|
|
|
34
34
|
* @param {string} [config.name] - The name of the control.
|
|
35
35
|
* @param {boolean} [config.readonly=false] - Whether the textarea is read-only.
|
|
36
36
|
* @param {boolean} [config.required=false] - Whether the textarea is required.
|
|
37
|
-
* @param {
|
|
37
|
+
* @param {boolean|"default"} [config.spellcheck] - Spellcheck behavior.
|
|
38
38
|
* @param {"hard"|"soft"|"off"} [config.wrap] - Wrapping behavior.
|
|
39
39
|
* @param {string|string[]|Set<string>} [config.tags=[]] - Initial CSS classes.
|
|
40
40
|
* @param {string} [config.mainClass=''] - Main CSS class.
|
|
@@ -153,15 +153,12 @@ class TinyHtmlTextarea extends TinyHtmlTemplate {
|
|
|
153
153
|
get autocomplete() {
|
|
154
154
|
return this.attrString('autocomplete');
|
|
155
155
|
}
|
|
156
|
-
/** @param {
|
|
156
|
+
/** @param {boolean} autocorrect */
|
|
157
157
|
set autocorrect(autocorrect) {
|
|
158
|
-
if (typeof autocorrect
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
if (!['on', 'off'].includes(autocorrect))
|
|
163
|
-
throw new TypeError('TinyTextarea: "autocorrect" must be "on" or "off".');
|
|
164
|
-
this.setAttr('autocorrect', autocorrect);
|
|
158
|
+
if (typeof autocorrect !== 'boolean')
|
|
159
|
+
throw new TypeError('TinyTextarea: "autocorrect" must be "true" or "false".');
|
|
160
|
+
this.setAttr('autocorrect', autocorrect ? 'on' : 'off');
|
|
161
|
+
return;
|
|
165
162
|
}
|
|
166
163
|
/** @returns {boolean|null} */
|
|
167
164
|
get autocorrect() {
|
|
@@ -274,15 +271,18 @@ class TinyHtmlTextarea extends TinyHtmlTemplate {
|
|
|
274
271
|
get required() {
|
|
275
272
|
return this.hasProp('required');
|
|
276
273
|
}
|
|
277
|
-
/** @param {
|
|
274
|
+
/** @param {boolean|'default'} spellcheck */
|
|
278
275
|
set spellcheck(spellcheck) {
|
|
279
|
-
if (![true, false, '
|
|
276
|
+
if (![true, false, 'default'].includes(spellcheck))
|
|
280
277
|
throw new TypeError('TinyTextarea: "spellcheck" must be "true", "false" or "default".');
|
|
281
|
-
this.setAttr('spellcheck', spellcheck);
|
|
278
|
+
this.setAttr('spellcheck', typeof spellcheck === 'boolean' ? String(spellcheck) : spellcheck);
|
|
282
279
|
}
|
|
283
|
-
/** @returns {
|
|
280
|
+
/** @returns {boolean|'default'|null} */
|
|
284
281
|
get spellcheck() {
|
|
285
|
-
|
|
282
|
+
const value = this.attrString('spellcheck');
|
|
283
|
+
if (typeof value === 'boolean' || value === 'default')
|
|
284
|
+
return value;
|
|
285
|
+
return null;
|
|
286
286
|
}
|
|
287
287
|
/** @param {'hard'|'soft'|'off'} wrap */
|
|
288
288
|
set wrap(wrap) {
|
|
@@ -1,10 +1,52 @@
|
|
|
1
|
-
|
|
1
|
+
import TinyHtmlButtonInput from './input/button/TinyHtmlButtonInput.mjs';
|
|
2
|
+
import TinyHtmlResetInput from './input/button/TinyHtmlResetInput.mjs';
|
|
3
|
+
import TinyHtmlSubmitInput from './input/button/TinyHtmlSubmitInput.mjs';
|
|
4
|
+
import TinyHtmlNumberInput from './input/number/TinyHtmlNumberInput.mjs';
|
|
5
|
+
import TinyHtmlRangeInput from './input/number/TinyHtmlRangeInput.mjs';
|
|
6
|
+
import TinyHtmlCheckboxInput from './input/check/TinyHtmlCheckboxInput.mjs';
|
|
7
|
+
import TinyHtmlRadioInput from './input/check/TinyHtmlRadioInput.mjs';
|
|
8
|
+
import TinyHtmlDateInput from './input/date/TinyHtmlDateInput.mjs';
|
|
9
|
+
import TinyHtmlDateTimeInput from './input/date/TinyHtmlDateTimeInput.mjs';
|
|
10
|
+
import TinyHtmlMonthInput from './input/date/TinyHtmlMonthInput.mjs';
|
|
11
|
+
import TinyHtmlTimeInput from './input/date/TinyHtmlTimeInput.mjs';
|
|
12
|
+
import TinyHtmlWeekInput from './input/date/TinyHtmlWeekInput.mjs';
|
|
13
|
+
import TinyHtmlEmailInput from './input/text/TinyHtmlEmailInput.mjs';
|
|
14
|
+
import TinyHtmlPasswordInput from './input/text/TinyHtmlPasswordInput.mjs';
|
|
15
|
+
import TinyHtmlSearchInput from './input/text/TinyHtmlSearchInput.mjs';
|
|
16
|
+
import TinyHtmlTelInput from './input/text/TinyHtmlTelInput.mjs';
|
|
17
|
+
import TinyHtmlTextInput from './input/text/TinyHtmlTextInput.mjs';
|
|
18
|
+
import TinyHtmlUrlInput from './input/text/TinyHtmlUrlInput.mjs';
|
|
19
|
+
import TinyHtmlColorInput from './input/TinyHtmlColorInput.mjs';
|
|
20
|
+
import TinyHtmlFileInput from './input/TinyHtmlFileInput.mjs';
|
|
21
|
+
import TinyHtmlHiddenInput from './input/TinyHtmlHiddenInput.mjs';
|
|
22
|
+
import TinyHtmlImageInput from './input/TinyHtmlImageInput.mjs';
|
|
23
|
+
import TinyHtmlAudio from './media/TinyHtmlAudio.mjs';
|
|
24
|
+
import TinyHtmlButton from './TinyHtmlButton.mjs';
|
|
25
|
+
import TinyHtmlCanvas from './TinyHtmlCanvas.mjs';
|
|
26
|
+
import TinyHtmlEmbed from './TinyHtmlEmbed.mjs';
|
|
27
|
+
import TinyHtmlForm from './TinyHtmlForm.mjs';
|
|
28
|
+
import TinyHtmlIcon from './TinyHtmlIcon.mjs';
|
|
29
|
+
import TinyHtmlIframe from './TinyHtmlIframe.mjs';
|
|
30
|
+
import TinyHtmlImage from './TinyHtmlImage.mjs';
|
|
31
|
+
import TinyHtmlInput from './TinyHtmlInput.mjs';
|
|
32
|
+
import TinyHtmlAnchor from './TinyHtmlAnchor.mjs';
|
|
33
|
+
import TinyHtmlObject from './media/TinyHtmlObject.mjs';
|
|
34
|
+
import TinyHtmlSelect from './TinyHtmlSelect.mjs';
|
|
35
|
+
import TinyHtmlTextarea from './TinyHtmlTextarea.mjs';
|
|
36
|
+
import TinyHtmlVideo from './media/TinyHtmlVideo.mjs';
|
|
37
|
+
import TinyHtmlMedia from './TinyHtmlMedia.mjs';
|
|
38
|
+
import TinyHtmlSource from './media/TinyHtmlSource.mjs';
|
|
39
|
+
import TinyHtmlDatalist from './TinyHtmlDatalist.mjs';
|
|
40
|
+
import TinyHtmlLink from './TinyHtmlLink.mjs';
|
|
41
|
+
import TinyHtmlScript from './TinyHtmlScript.mjs';
|
|
42
|
+
import TinyHtmlStyle from './TinyHtmlStyle.mjs';
|
|
43
|
+
import TinyHtmlTemplate from './TinyHtmlTemplate.mjs';
|
|
2
44
|
/**
|
|
3
45
|
* @class
|
|
4
46
|
* @beta
|
|
5
47
|
*/
|
|
6
48
|
declare class TinyHtmlElems {
|
|
7
|
-
|
|
49
|
+
#private;
|
|
8
50
|
static get list(): (typeof TinyHtmlTemplate | typeof TinyHtmlAnchor | typeof TinyHtmlButton | typeof TinyHtmlCanvas | typeof TinyHtmlDatalist | typeof TinyHtmlEmbed | typeof TinyHtmlForm | typeof TinyHtmlIcon | typeof TinyHtmlIframe | typeof TinyHtmlImage | typeof TinyHtmlInput | typeof TinyHtmlLink | typeof TinyHtmlMedia | typeof TinyHtmlScript | typeof TinyHtmlSelect | typeof TinyHtmlStyle | typeof TinyHtmlTextarea | typeof TinyHtmlResetInput | typeof TinyHtmlNumberInput | typeof TinyHtmlFileInput | typeof TinyHtmlHiddenInput | typeof TinyHtmlImageInput | typeof TinyHtmlAudio | typeof TinyHtmlObject | typeof TinyHtmlSource)[];
|
|
9
51
|
static ButtonInput: typeof TinyHtmlButtonInput;
|
|
10
52
|
static ResetInput: typeof TinyHtmlResetInput;
|
|
@@ -49,48 +91,63 @@ declare class TinyHtmlElems {
|
|
|
49
91
|
static Script: typeof TinyHtmlScript;
|
|
50
92
|
static Style: typeof TinyHtmlStyle;
|
|
51
93
|
static Element: typeof TinyHtmlTemplate;
|
|
94
|
+
constructor();
|
|
52
95
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
export default TinyHtmlElems;
|
|
97
|
+
/**
|
|
98
|
+
export {
|
|
99
|
+
TinyHtmlButtonInput,
|
|
100
|
+
TinyHtmlResetInput,
|
|
101
|
+
TinyHtmlSubmitInput,
|
|
102
|
+
/////////////////////////////////////////////////////
|
|
103
|
+
TinyHtmlNumberInput,
|
|
104
|
+
TinyHtmlRangeInput,
|
|
105
|
+
//////////////////////////////////////////////////
|
|
106
|
+
|
|
107
|
+
TinyHtmlCheckboxInput;
|
|
108
|
+
TinyHtmlRadioInput;
|
|
109
|
+
|
|
110
|
+
//////////////////////////////////////////////////
|
|
111
|
+
|
|
112
|
+
TinyHtmlDateInput;
|
|
113
|
+
TinyHtmlDateTimeInput;
|
|
114
|
+
TinyHtmlMonthInput;
|
|
115
|
+
TinyHtmlTimeInput;
|
|
116
|
+
TinyHtmlWeekInput;
|
|
117
|
+
|
|
118
|
+
TinyHtmlEmailInput,
|
|
119
|
+
TinyHtmlPasswordInput,
|
|
120
|
+
TinyHtmlSearchInput,
|
|
121
|
+
TinyHtmlTelInput,
|
|
122
|
+
TinyHtmlTextInput,
|
|
123
|
+
TinyHtmlUrlInput,
|
|
124
|
+
//////////////////////////////////////////////////////
|
|
125
|
+
TinyHtmlColorInput,
|
|
126
|
+
TinyHtmlFileInput,
|
|
127
|
+
TinyHtmlHiddenInput,
|
|
128
|
+
TinyHtmlImageInput,
|
|
129
|
+
////////////////////////////////////////////////////
|
|
130
|
+
TinyHtmlAudio,
|
|
131
|
+
TinyHtmlButton,
|
|
132
|
+
TinyHtmlCanvas,
|
|
133
|
+
TinyHtmlEmbed,
|
|
134
|
+
TinyHtmlForm,
|
|
135
|
+
TinyHtmlTemplate,
|
|
136
|
+
TinyHtmlIcon,
|
|
137
|
+
TinyHtmlIframe,
|
|
138
|
+
TinyHtmlImage,
|
|
139
|
+
TinyHtmlInput,
|
|
140
|
+
TinyHtmlAnchor,
|
|
141
|
+
TinyHtmlObject,
|
|
142
|
+
TinyHtmlSelect,
|
|
143
|
+
TinyHtmlTextarea,
|
|
144
|
+
TinyHtmlVideo,
|
|
145
|
+
TinyHtmlMedia,
|
|
146
|
+
TinyHtmlSource,
|
|
147
|
+
TinyHtmlDatalist,
|
|
148
|
+
TinyHtmlLink,
|
|
149
|
+
TinyHtmlScript,
|
|
150
|
+
TinyHtmlStyle,
|
|
151
|
+
};
|
|
152
|
+
*/
|
|
96
153
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -19,8 +19,8 @@ class TinyHtmlColorInput extends TinyHtmlInput {
|
|
|
19
19
|
/**
|
|
20
20
|
* Creates a new TinyHtmlColorInput instance.
|
|
21
21
|
* @param {Object} config - Configuration object.
|
|
22
|
-
* @param {string
|
|
23
|
-
* @param {
|
|
22
|
+
* @param {string} [config.value="#000000"] - Initial color value.
|
|
23
|
+
* @param {number} [config.alpha] - Alpha (transparency) value.
|
|
24
24
|
* @param {string} [config.placeholder] - Placeholder text.
|
|
25
25
|
* @param {string} [config.name] - Name of the input.
|
|
26
26
|
* @param {string} [config.autocomplete] - Autocomplete hint (e.g., "on", "off", "email").
|
|
@@ -57,28 +57,30 @@ class TinyHtmlColorInput extends TinyHtmlInput {
|
|
|
57
57
|
this.required = required;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
/** @param {string
|
|
60
|
+
/** @param {string} value */
|
|
61
61
|
set value(value) {
|
|
62
62
|
if (typeof value !== 'string' && typeof value !== 'number')
|
|
63
|
-
throw new TypeError('TinyHtmlColorInput: "value" must be a string
|
|
63
|
+
throw new TypeError('TinyHtmlColorInput: "value" must be a string.');
|
|
64
64
|
this.setAttr('value', String(value));
|
|
65
|
+
this.setVal(String(value));
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
/** @returns {string|null} */
|
|
68
69
|
get value() {
|
|
69
|
-
return this.
|
|
70
|
+
return this.valTxt();
|
|
70
71
|
}
|
|
71
72
|
|
|
72
|
-
/** @param {
|
|
73
|
+
/** @param {number} alpha */
|
|
73
74
|
set alpha(alpha) {
|
|
74
75
|
if (typeof alpha !== 'string' && typeof alpha !== 'number')
|
|
75
|
-
throw new TypeError('TinyHtmlColorInput: "alpha" must be a
|
|
76
|
+
throw new TypeError('TinyHtmlColorInput: "alpha" must be a number.');
|
|
76
77
|
this.setAttr('alpha', String(alpha));
|
|
77
78
|
}
|
|
78
79
|
|
|
79
|
-
/** @returns {
|
|
80
|
+
/** @returns {number|null} */
|
|
80
81
|
get alpha() {
|
|
81
|
-
|
|
82
|
+
const value = this.attrString('alpha');
|
|
83
|
+
return typeof value === 'string' ? parseFloat(value) : value;
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
/** @param {string} list */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import TinyHtmlInput from '../TinyHtmlInput.mjs';
|
|
2
2
|
/**
|
|
3
3
|
* TinyHtmlColorInput is a helper class for managing `<input type="color">` elements.
|
|
4
4
|
* It provides strict validation for attributes such as `value`, `alpha`, `autocomplete`,
|
|
@@ -16,8 +16,8 @@ declare class TinyHtmlColorInput extends TinyHtmlInput {
|
|
|
16
16
|
/**
|
|
17
17
|
* Creates a new TinyHtmlColorInput instance.
|
|
18
18
|
* @param {Object} config - Configuration object.
|
|
19
|
-
* @param {string
|
|
20
|
-
* @param {
|
|
19
|
+
* @param {string} [config.value="#000000"] - Initial color value.
|
|
20
|
+
* @param {number} [config.alpha] - Alpha (transparency) value.
|
|
21
21
|
* @param {string} [config.placeholder] - Placeholder text.
|
|
22
22
|
* @param {string} [config.name] - Name of the input.
|
|
23
23
|
* @param {string} [config.autocomplete] - Autocomplete hint (e.g., "on", "off", "email").
|
|
@@ -30,26 +30,26 @@ declare class TinyHtmlColorInput extends TinyHtmlInput {
|
|
|
30
30
|
* @throws {TypeError} If any attribute is of the wrong type.
|
|
31
31
|
*/
|
|
32
32
|
constructor({ list, value, name, autocomplete, alpha, readonly, required, placeholder, colorspace, tags, mainClass, }?: {
|
|
33
|
-
value?: string
|
|
34
|
-
alpha?:
|
|
35
|
-
placeholder?: string
|
|
36
|
-
name?: string
|
|
37
|
-
autocomplete?: string
|
|
38
|
-
list?: string
|
|
39
|
-
readonly?: boolean
|
|
40
|
-
required?: boolean
|
|
41
|
-
colorspace?: string
|
|
42
|
-
tags?: string | string[] | Set<string
|
|
43
|
-
mainClass?: string
|
|
33
|
+
value?: string;
|
|
34
|
+
alpha?: number;
|
|
35
|
+
placeholder?: string;
|
|
36
|
+
name?: string;
|
|
37
|
+
autocomplete?: string;
|
|
38
|
+
list?: string;
|
|
39
|
+
readonly?: boolean;
|
|
40
|
+
required?: boolean;
|
|
41
|
+
colorspace?: string;
|
|
42
|
+
tags?: string | string[] | Set<string>;
|
|
43
|
+
mainClass?: string;
|
|
44
44
|
});
|
|
45
|
-
/** @param {string
|
|
46
|
-
set value(value: string
|
|
45
|
+
/** @param {string} value */
|
|
46
|
+
set value(value: string);
|
|
47
47
|
/** @returns {string|null} */
|
|
48
48
|
get value(): string | null;
|
|
49
|
-
/** @param {
|
|
50
|
-
set alpha(alpha:
|
|
51
|
-
/** @returns {
|
|
52
|
-
get alpha():
|
|
49
|
+
/** @param {number} alpha */
|
|
50
|
+
set alpha(alpha: number);
|
|
51
|
+
/** @returns {number|null} */
|
|
52
|
+
get alpha(): number | null;
|
|
53
53
|
/** @param {string} list */
|
|
54
54
|
set list(list: string);
|
|
55
55
|
/** @returns {string|null} */
|
|
@@ -63,5 +63,5 @@ declare class TinyHtmlColorInput extends TinyHtmlInput {
|
|
|
63
63
|
/** @returns {string|null} */
|
|
64
64
|
get colorspace(): string | null;
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
export default TinyHtmlColorInput;
|
|
67
67
|
//# sourceMappingURL=TinyHtmlColorInput.d.mts.map
|
|
@@ -16,8 +16,8 @@ class TinyHtmlColorInput extends TinyHtmlInput {
|
|
|
16
16
|
/**
|
|
17
17
|
* Creates a new TinyHtmlColorInput instance.
|
|
18
18
|
* @param {Object} config - Configuration object.
|
|
19
|
-
* @param {string
|
|
20
|
-
* @param {
|
|
19
|
+
* @param {string} [config.value="#000000"] - Initial color value.
|
|
20
|
+
* @param {number} [config.alpha] - Alpha (transparency) value.
|
|
21
21
|
* @param {string} [config.placeholder] - Placeholder text.
|
|
22
22
|
* @param {string} [config.name] - Name of the input.
|
|
23
23
|
* @param {string} [config.autocomplete] - Autocomplete hint (e.g., "on", "off", "email").
|
|
@@ -45,25 +45,27 @@ class TinyHtmlColorInput extends TinyHtmlInput {
|
|
|
45
45
|
this.readonly = readonly;
|
|
46
46
|
this.required = required;
|
|
47
47
|
}
|
|
48
|
-
/** @param {string
|
|
48
|
+
/** @param {string} value */
|
|
49
49
|
set value(value) {
|
|
50
50
|
if (typeof value !== 'string' && typeof value !== 'number')
|
|
51
|
-
throw new TypeError('TinyHtmlColorInput: "value" must be a string
|
|
51
|
+
throw new TypeError('TinyHtmlColorInput: "value" must be a string.');
|
|
52
52
|
this.setAttr('value', String(value));
|
|
53
|
+
this.setVal(String(value));
|
|
53
54
|
}
|
|
54
55
|
/** @returns {string|null} */
|
|
55
56
|
get value() {
|
|
56
|
-
return this.
|
|
57
|
+
return this.valTxt();
|
|
57
58
|
}
|
|
58
|
-
/** @param {
|
|
59
|
+
/** @param {number} alpha */
|
|
59
60
|
set alpha(alpha) {
|
|
60
61
|
if (typeof alpha !== 'string' && typeof alpha !== 'number')
|
|
61
|
-
throw new TypeError('TinyHtmlColorInput: "alpha" must be a
|
|
62
|
+
throw new TypeError('TinyHtmlColorInput: "alpha" must be a number.');
|
|
62
63
|
this.setAttr('alpha', String(alpha));
|
|
63
64
|
}
|
|
64
|
-
/** @returns {
|
|
65
|
+
/** @returns {number|null} */
|
|
65
66
|
get alpha() {
|
|
66
|
-
|
|
67
|
+
const value = this.attrString('alpha');
|
|
68
|
+
return typeof value === 'string' ? parseFloat(value) : value;
|
|
67
69
|
}
|
|
68
70
|
/** @param {string} list */
|
|
69
71
|
set list(list) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import TinyHtmlInput from '../TinyHtmlInput.mjs';
|
|
2
2
|
/**
|
|
3
3
|
* TinyHtmlFileInput is a helper class for managing <input type="file"> elements.
|
|
4
4
|
* It allows configuring attributes such as `accept`, `multiple`, `capture`,
|
|
@@ -31,15 +31,15 @@ declare class TinyHtmlFileInput extends TinyHtmlInput {
|
|
|
31
31
|
* @throws {TypeError} If any attribute is of the wrong type.
|
|
32
32
|
*/
|
|
33
33
|
constructor({ name, capture, multiple, accept, placeholder, readonly, required, tags, mainClass, }?: {
|
|
34
|
-
name?: string
|
|
35
|
-
placeholder?: string
|
|
36
|
-
capture?: string | boolean
|
|
37
|
-
multiple?: boolean
|
|
38
|
-
accept?: string
|
|
39
|
-
readonly?: boolean
|
|
40
|
-
required?: boolean
|
|
41
|
-
tags?: string | string[] | Set<string
|
|
42
|
-
mainClass?: string
|
|
34
|
+
name?: string;
|
|
35
|
+
placeholder?: string;
|
|
36
|
+
capture?: string | boolean;
|
|
37
|
+
multiple?: boolean;
|
|
38
|
+
accept?: string;
|
|
39
|
+
readonly?: boolean;
|
|
40
|
+
required?: boolean;
|
|
41
|
+
tags?: string | string[] | Set<string>;
|
|
42
|
+
mainClass?: string;
|
|
43
43
|
});
|
|
44
44
|
/** @param {boolean} multiple */
|
|
45
45
|
set multiple(multiple: boolean);
|
|
@@ -59,5 +59,5 @@ declare class TinyHtmlFileInput extends TinyHtmlInput {
|
|
|
59
59
|
*/
|
|
60
60
|
get files(): FileList | null;
|
|
61
61
|
}
|
|
62
|
-
|
|
62
|
+
export default TinyHtmlFileInput;
|
|
63
63
|
//# sourceMappingURL=TinyHtmlFileInput.d.mts.map
|
|
@@ -20,7 +20,7 @@ class TinyHtmlHiddenInput extends TinyHtmlInput {
|
|
|
20
20
|
/**
|
|
21
21
|
* Creates a new TinyHtmlHiddenInput instance.
|
|
22
22
|
* @param {Object} config - Configuration object.
|
|
23
|
-
* @param {string
|
|
23
|
+
* @param {string} [config.value] - Initial value of the input.
|
|
24
24
|
* @param {string} [config.name] - The name of the control.
|
|
25
25
|
* @param {string} [config.autocomplete] - Autocomplete hint (e.g., "on", "off", "email").
|
|
26
26
|
* @param {string} [config.dirname] - Directionality field name (for text-based inputs).
|
|
@@ -49,10 +49,10 @@ class TinyHtmlHiddenInput extends TinyHtmlInput {
|
|
|
49
49
|
this.required = required;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
/** @param {string
|
|
52
|
+
/** @param {string} value */
|
|
53
53
|
set value(value) {
|
|
54
|
-
if (typeof value !== 'string'
|
|
55
|
-
throw new TypeError('TinyHtmlHiddenInput: "value" must be a string
|
|
54
|
+
if (typeof value !== 'string')
|
|
55
|
+
throw new TypeError('TinyHtmlHiddenInput: "value" must be a string.');
|
|
56
56
|
this.setAttr('value', String(value));
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import TinyHtmlInput from '../TinyHtmlInput.mjs';
|
|
2
2
|
/**
|
|
3
3
|
* TinyHtmlHiddenInput is a helper class for managing
|
|
4
4
|
* <input type="hidden"> elements. It provides validation
|
|
@@ -17,7 +17,7 @@ declare class TinyHtmlHiddenInput extends TinyHtmlInput {
|
|
|
17
17
|
/**
|
|
18
18
|
* Creates a new TinyHtmlHiddenInput instance.
|
|
19
19
|
* @param {Object} config - Configuration object.
|
|
20
|
-
* @param {string
|
|
20
|
+
* @param {string} [config.value] - Initial value of the input.
|
|
21
21
|
* @param {string} [config.name] - The name of the control.
|
|
22
22
|
* @param {string} [config.autocomplete] - Autocomplete hint (e.g., "on", "off", "email").
|
|
23
23
|
* @param {string} [config.dirname] - Directionality field name (for text-based inputs).
|
|
@@ -28,19 +28,23 @@ declare class TinyHtmlHiddenInput extends TinyHtmlInput {
|
|
|
28
28
|
* @throws {TypeError} If any attribute is of the wrong type.
|
|
29
29
|
*/
|
|
30
30
|
constructor({ name, value, dirname, autocomplete, readonly, required, tags, mainClass, }?: {
|
|
31
|
-
value?: string
|
|
32
|
-
name?: string
|
|
33
|
-
autocomplete?: string
|
|
34
|
-
dirname?: string
|
|
35
|
-
readonly?: boolean
|
|
36
|
-
required?: boolean
|
|
37
|
-
tags?: string | string[] | Set<string
|
|
38
|
-
mainClass?: string
|
|
31
|
+
value?: string;
|
|
32
|
+
name?: string;
|
|
33
|
+
autocomplete?: string;
|
|
34
|
+
dirname?: string;
|
|
35
|
+
readonly?: boolean;
|
|
36
|
+
required?: boolean;
|
|
37
|
+
tags?: string | string[] | Set<string>;
|
|
38
|
+
mainClass?: string;
|
|
39
39
|
});
|
|
40
|
-
/** @param {string
|
|
41
|
-
set value(value: string
|
|
40
|
+
/** @param {string} value */
|
|
41
|
+
set value(value: string);
|
|
42
42
|
/** @returns {string|null} */
|
|
43
43
|
get value(): string | null;
|
|
44
|
+
/** @param {string} name */
|
|
45
|
+
set name(name: string);
|
|
46
|
+
/** @returns {string|null} */
|
|
47
|
+
get name(): string | null;
|
|
44
48
|
/** @param {string} autocomplete */
|
|
45
49
|
set autocomplete(autocomplete: string);
|
|
46
50
|
/** @returns {string|null} */
|
|
@@ -50,5 +54,5 @@ declare class TinyHtmlHiddenInput extends TinyHtmlInput {
|
|
|
50
54
|
/** @returns {string|null} */
|
|
51
55
|
get dirname(): string | null;
|
|
52
56
|
}
|
|
53
|
-
|
|
57
|
+
export default TinyHtmlHiddenInput;
|
|
54
58
|
//# sourceMappingURL=TinyHtmlHiddenInput.d.mts.map
|
|
@@ -17,7 +17,7 @@ class TinyHtmlHiddenInput extends TinyHtmlInput {
|
|
|
17
17
|
/**
|
|
18
18
|
* Creates a new TinyHtmlHiddenInput instance.
|
|
19
19
|
* @param {Object} config - Configuration object.
|
|
20
|
-
* @param {string
|
|
20
|
+
* @param {string} [config.value] - Initial value of the input.
|
|
21
21
|
* @param {string} [config.name] - The name of the control.
|
|
22
22
|
* @param {string} [config.autocomplete] - Autocomplete hint (e.g., "on", "off", "email").
|
|
23
23
|
* @param {string} [config.dirname] - Directionality field name (for text-based inputs).
|
|
@@ -38,10 +38,10 @@ class TinyHtmlHiddenInput extends TinyHtmlInput {
|
|
|
38
38
|
this.readonly = readonly;
|
|
39
39
|
this.required = required;
|
|
40
40
|
}
|
|
41
|
-
/** @param {string
|
|
41
|
+
/** @param {string} value */
|
|
42
42
|
set value(value) {
|
|
43
|
-
if (typeof value !== 'string'
|
|
44
|
-
throw new TypeError('TinyHtmlHiddenInput: "value" must be a string
|
|
43
|
+
if (typeof value !== 'string')
|
|
44
|
+
throw new TypeError('TinyHtmlHiddenInput: "value" must be a string.');
|
|
45
45
|
this.setAttr('value', String(value));
|
|
46
46
|
}
|
|
47
47
|
/** @returns {string|null} */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import TinyHtmlInput from '../TinyHtmlInput.mjs';
|
|
2
2
|
/**
|
|
3
3
|
* TinyHtmlImageInput is a helper class for managing <input type="image"> elements.
|
|
4
4
|
* It supports validation and configuration of attributes such as alt, list, form actions,
|
|
@@ -38,23 +38,23 @@ declare class TinyHtmlImageInput extends TinyHtmlInput {
|
|
|
38
38
|
* @throws {TypeError} If any attribute has an invalid type or value.
|
|
39
39
|
*/
|
|
40
40
|
constructor({ list, formenctype, formmethod, formnovalidate, height, width, formtarget, formaction, placeholder, name, readonly, required, alt, autocomplete, src, tags, mainClass, }?: {
|
|
41
|
-
name?: string
|
|
42
|
-
placeholder?: string
|
|
43
|
-
formenctype?:
|
|
44
|
-
formmethod?:
|
|
45
|
-
formnovalidate?: boolean
|
|
46
|
-
formtarget?: string
|
|
47
|
-
autocomplete?: string
|
|
48
|
-
alt?: string
|
|
49
|
-
formaction?: string
|
|
50
|
-
height?: number
|
|
51
|
-
width?: number
|
|
52
|
-
list?: string
|
|
53
|
-
src?: string
|
|
54
|
-
readonly?: boolean
|
|
55
|
-
required?: boolean
|
|
56
|
-
tags?: string | string[] | Set<string
|
|
57
|
-
mainClass?: string
|
|
41
|
+
name?: string;
|
|
42
|
+
placeholder?: string;
|
|
43
|
+
formenctype?: 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain';
|
|
44
|
+
formmethod?: 'get' | 'post' | 'dialog';
|
|
45
|
+
formnovalidate?: boolean;
|
|
46
|
+
formtarget?: string;
|
|
47
|
+
autocomplete?: string;
|
|
48
|
+
alt?: string;
|
|
49
|
+
formaction?: string;
|
|
50
|
+
height?: number;
|
|
51
|
+
width?: number;
|
|
52
|
+
list?: string;
|
|
53
|
+
src?: string;
|
|
54
|
+
readonly?: boolean;
|
|
55
|
+
required?: boolean;
|
|
56
|
+
tags?: string | string[] | Set<string>;
|
|
57
|
+
mainClass?: string;
|
|
58
58
|
});
|
|
59
59
|
/** @param {string} value */
|
|
60
60
|
set src(value: string);
|
|
@@ -73,11 +73,11 @@ declare class TinyHtmlImageInput extends TinyHtmlInput {
|
|
|
73
73
|
/** @returns {string|null} */
|
|
74
74
|
get formaction(): string | null;
|
|
75
75
|
/** @param {'application/x-www-form-urlencoded'|'multipart/form-data'|'text/plain'} formenctype */
|
|
76
|
-
set formenctype(formenctype:
|
|
76
|
+
set formenctype(formenctype: 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain');
|
|
77
77
|
/** @returns {string|null} */
|
|
78
78
|
get formenctype(): string | null;
|
|
79
79
|
/** @param {'get'|'post'|'dialog'} formmethod */
|
|
80
|
-
set formmethod(formmethod:
|
|
80
|
+
set formmethod(formmethod: 'get' | 'post' | 'dialog');
|
|
81
81
|
/** @returns {string|null} */
|
|
82
82
|
get formmethod(): string | null;
|
|
83
83
|
/** @param {boolean} formnovalidate */
|
|
@@ -93,5 +93,5 @@ declare class TinyHtmlImageInput extends TinyHtmlInput {
|
|
|
93
93
|
/** @returns {string|null} */
|
|
94
94
|
get autocomplete(): string | null;
|
|
95
95
|
}
|
|
96
|
-
|
|
96
|
+
export default TinyHtmlImageInput;
|
|
97
97
|
//# sourceMappingURL=TinyHtmlImageInput.d.mts.map
|
|
@@ -22,7 +22,7 @@ class TinyHtmlButtonInput extends TinyHtmlInput {
|
|
|
22
22
|
* @param {string} [config.placeholder] - Placeholder text (non-standard for buttons).
|
|
23
23
|
* @param {string} [config.popovertarget] - The ID of the target popover.
|
|
24
24
|
* @param {"show"|"hide"|"toggle"} [config.popovertargetaction] - The action applied to the popover.
|
|
25
|
-
* @param {string
|
|
25
|
+
* @param {string} [config.value="Button"] - The label displayed on the button.
|
|
26
26
|
* @param {boolean} [config.readonly=false] - Whether the input is read-only.
|
|
27
27
|
* @param {boolean} [config.required=false] - Whether the input is required.
|
|
28
28
|
* @param {string|string[]|Set<string>} [config.tags=[]] - Initial CSS classes.
|
|
@@ -47,16 +47,17 @@ class TinyHtmlButtonInput extends TinyHtmlInput {
|
|
|
47
47
|
if (popovertargetaction !== undefined) this.popovertargetaction = popovertargetaction;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
/** @param {string
|
|
50
|
+
/** @param {string} value */
|
|
51
51
|
set value(value) {
|
|
52
52
|
if (typeof value !== 'string' && typeof value !== 'number')
|
|
53
|
-
throw new TypeError('TinyHtmlButtonInput: "value" must be a string
|
|
53
|
+
throw new TypeError('TinyHtmlButtonInput: "value" must be a string.');
|
|
54
54
|
this.setAttr('value', String(value));
|
|
55
|
+
this.setVal(String(value));
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
/** @returns {string|null} */
|
|
58
59
|
get value() {
|
|
59
|
-
return this.
|
|
60
|
+
return this.valTxt();
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
/** @param {string} popovertarget */
|