@vandenberghinc/volt 1.1.26 → 1.1.28
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/backend/dist/cjs/{blacklist.d.ts → backend/src/blacklist.d.ts} +5 -3
- package/backend/dist/cjs/{blacklist.js → backend/src/blacklist.js} +8 -5
- package/backend/dist/cjs/{cli.js → backend/src/cli.js} +29 -47
- package/backend/dist/cjs/backend/src/database/collection.d.ts +1543 -0
- package/backend/dist/cjs/backend/src/database/collection.js +3042 -0
- package/backend/dist/cjs/backend/src/database/database.d.ts +66 -0
- package/backend/dist/cjs/{database → backend/src/database}/database.js +48 -43
- package/backend/dist/cjs/backend/src/database/filters/filters.d.ts +6 -0
- package/backend/dist/cjs/backend/src/database/filters/filters.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter.d.ts +223 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_test.js +443 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_test_v0.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v0.d.ts +50 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v0.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v1.d.ts +76 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v1.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v2.d.ts +75 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v2.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v3.d.ts +219 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v3.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_update_filter.d.ts +165 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_update_filter.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_update_filter_test.d.ts +5 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_update_filter_test.js +355 -0
- package/backend/dist/cjs/backend/src/database/flatten.d.ts +75 -0
- package/backend/dist/cjs/{logger.js → backend/src/database/flatten.js} +18 -7
- package/backend/dist/cjs/backend/src/database/flatten_test.js +175 -0
- package/backend/dist/cjs/backend/src/database/quota/quota.d.ts +461 -0
- package/backend/dist/cjs/backend/src/database/quota/quota.js +1014 -0
- package/backend/dist/cjs/backend/src/database/quota/quota_v1.d.ts +534 -0
- package/backend/dist/cjs/backend/src/database/quota/quota_v1.js +1087 -0
- package/backend/dist/cjs/backend/src/database/quota/safe_int.d.ts +293 -0
- package/backend/dist/cjs/backend/src/database/quota/safe_int.js +573 -0
- package/backend/dist/{esm → cjs/backend/src}/endpoint.d.ts +69 -46
- package/backend/dist/cjs/{endpoint.js → backend/src/endpoint.js} +87 -101
- package/backend/dist/cjs/backend/src/errors/index.d.ts +7 -0
- package/backend/dist/cjs/backend/src/errors/index.js +25 -0
- package/backend/dist/{esm/utils.d.ts → cjs/backend/src/errors/internal_external.d.ts} +14 -22
- package/backend/dist/cjs/backend/src/errors/internal_external.js +85 -0
- package/backend/dist/cjs/backend/src/errors/invalid_usage_error.d.ts +38 -0
- package/backend/dist/cjs/{mutex.js → backend/src/errors/invalid_usage_error.js} +20 -37
- package/backend/dist/cjs/backend/src/errors/system_error.d.ts +230 -0
- package/backend/dist/cjs/backend/src/errors/system_error.js +393 -0
- package/backend/dist/cjs/backend/src/events.d.ts +54 -0
- package/backend/dist/cjs/backend/src/events.js +15 -0
- package/backend/dist/cjs/{frontend.js → backend/src/frontend.js} +1 -1
- package/backend/dist/cjs/{image_endpoint.d.ts → backend/src/image_endpoint.d.ts} +16 -1
- package/backend/dist/cjs/{image_endpoint.js → backend/src/image_endpoint.js} +3 -5
- package/backend/dist/cjs/backend/src/logger.d.ts +5 -0
- package/backend/dist/cjs/backend/src/logger.js +15 -0
- package/backend/dist/cjs/backend/src/meta.d.ts +64 -0
- package/backend/dist/cjs/{meta.js → backend/src/meta.js} +9 -12
- package/backend/dist/cjs/backend/src/payments/paddle.d.ts +326 -0
- package/backend/dist/cjs/{payments → backend/src/payments}/paddle.js +377 -327
- package/backend/dist/cjs/backend/src/plugins/browser.d.ts +1 -0
- package/backend/dist/cjs/backend/src/plugins/browser.js +15 -0
- package/backend/dist/cjs/backend/src/plugins/mail/mail.d.ts +248 -0
- package/backend/dist/cjs/backend/src/plugins/mail/mail.js +379 -0
- package/backend/dist/{esm → cjs/backend/src}/plugins/mail/ui.d.ts +23 -0
- package/backend/dist/cjs/backend/src/plugins/pdf.d.ts +1 -0
- package/backend/dist/cjs/backend/src/rate_limit.d.ts +145 -0
- package/backend/dist/cjs/backend/src/rate_limit.js +549 -0
- package/backend/dist/cjs/{route.d.ts → backend/src/route.d.ts} +3 -10
- package/backend/dist/cjs/{route.js → backend/src/route.js} +23 -21
- package/backend/dist/cjs/backend/src/server.d.ts +485 -0
- package/backend/dist/cjs/{server.js → backend/src/server.js} +688 -873
- package/backend/dist/cjs/backend/src/splash_screen.d.ts +80 -0
- package/backend/dist/cjs/{splash_screen.js → backend/src/splash_screen.js} +24 -3
- package/backend/dist/cjs/backend/src/status.d.ts +74 -0
- package/backend/dist/cjs/{status.js → backend/src/status.js} +64 -64
- package/backend/dist/cjs/backend/src/stream.d.ts +376 -0
- package/backend/dist/cjs/{stream.js → backend/src/stream.js} +299 -276
- package/backend/dist/cjs/backend/src/users.d.ts +807 -0
- package/backend/dist/cjs/backend/src/users.js +1971 -0
- package/backend/dist/cjs/backend/src/utils.d.ts +16 -0
- package/backend/dist/cjs/{utils.js → backend/src/utils.js} +14 -77
- package/backend/dist/{esm → cjs/backend/src}/view.d.ts +33 -11
- package/backend/dist/cjs/backend/src/view.js +508 -0
- package/backend/dist/{esm → cjs/backend/src}/volt.d.ts +10 -1
- package/backend/dist/cjs/{volt.js → backend/src/volt.js} +8 -5
- package/backend/dist/cjs/frontend/src/modules/request.d.ts +70 -0
- package/backend/dist/cjs/frontend/src/modules/request.js +99 -0
- package/backend/dist/esm/{blacklist.d.ts → backend/src/blacklist.d.ts} +5 -3
- package/backend/dist/esm/{blacklist.js → backend/src/blacklist.js} +9 -6
- package/backend/dist/esm/{cli.js → backend/src/cli.js} +43 -60
- package/backend/dist/esm/backend/src/database/collection.d.ts +1543 -0
- package/backend/dist/esm/backend/src/database/collection.js +3510 -0
- package/backend/dist/esm/backend/src/database/database.d.ts +66 -0
- package/backend/dist/esm/{database → backend/src/database}/database.js +62 -103
- package/backend/dist/esm/backend/src/database/document.d.ts +1 -0
- package/backend/dist/esm/backend/src/database/document.js +558 -0
- package/backend/dist/esm/backend/src/database/filters/filters.d.ts +6 -0
- package/backend/dist/esm/backend/src/database/filters/filters.js +1 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter.d.ts +223 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter.js +3 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_test.d.ts +1 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_test.js +505 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_test_v0.d.ts +1 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_test_v0.js +712 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v0.d.ts +50 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v0.js +5 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v1.d.ts +76 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v1.js +44 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v2.d.ts +75 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v2.js +5 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v3.d.ts +219 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v3.js +1 -0
- package/backend/dist/esm/backend/src/database/filters/strict_update_filter.d.ts +165 -0
- package/backend/dist/esm/backend/src/database/filters/strict_update_filter.js +5 -0
- package/backend/dist/esm/backend/src/database/filters/strict_update_filter_test.d.ts +5 -0
- package/backend/dist/esm/backend/src/database/filters/strict_update_filter_test.js +405 -0
- package/backend/dist/esm/backend/src/database/flatten.d.ts +75 -0
- package/backend/dist/esm/backend/src/database/flatten.js +22 -0
- package/backend/dist/esm/backend/src/database/flatten_test.d.ts +1 -0
- package/backend/dist/esm/backend/src/database/flatten_test.js +174 -0
- package/backend/dist/esm/backend/src/database/quota/quota.d.ts +461 -0
- package/backend/dist/esm/backend/src/database/quota/quota.js +1118 -0
- package/backend/dist/esm/backend/src/database/quota/quota_v1.d.ts +534 -0
- package/backend/dist/esm/backend/src/database/quota/quota_v1.js +1242 -0
- package/backend/dist/esm/backend/src/database/quota/safe_int.d.ts +293 -0
- package/backend/dist/esm/backend/src/database/quota/safe_int.js +602 -0
- package/backend/dist/{cjs → esm/backend/src}/endpoint.d.ts +69 -46
- package/backend/dist/esm/{endpoint.js → backend/src/endpoint.js} +136 -127
- package/backend/dist/esm/backend/src/errors/index.d.ts +7 -0
- package/backend/dist/esm/backend/src/errors/index.js +7 -0
- package/backend/dist/{cjs/utils.d.ts → esm/backend/src/errors/internal_external.d.ts} +14 -22
- package/backend/dist/esm/backend/src/errors/internal_external.js +70 -0
- package/backend/dist/esm/backend/src/errors/invalid_usage_error.d.ts +38 -0
- package/backend/dist/esm/backend/src/errors/invalid_usage_error.js +30 -0
- package/backend/dist/esm/backend/src/errors/system_error.d.ts +230 -0
- package/backend/dist/esm/backend/src/errors/system_error.js +402 -0
- package/backend/dist/esm/backend/src/events.d.ts +54 -0
- package/backend/dist/esm/backend/src/events.js +5 -0
- package/backend/dist/esm/{frontend.js → backend/src/frontend.js} +1 -1
- package/backend/dist/esm/{image_endpoint.d.ts → backend/src/image_endpoint.d.ts} +16 -1
- package/backend/dist/esm/{image_endpoint.js → backend/src/image_endpoint.js} +16 -20
- package/backend/dist/esm/backend/src/logger.d.ts +5 -0
- package/backend/dist/esm/backend/src/logger.js +8 -0
- package/backend/dist/esm/backend/src/meta.d.ts +64 -0
- package/backend/dist/esm/{meta.js → backend/src/meta.js} +15 -54
- package/backend/dist/esm/backend/src/payments/paddle.d.ts +326 -0
- package/backend/dist/esm/{payments → backend/src/payments}/paddle.js +417 -452
- package/backend/dist/esm/backend/src/plugins/browser.d.ts +1 -0
- package/backend/dist/esm/backend/src/plugins/browser.js +170 -0
- package/backend/dist/esm/backend/src/plugins/mail/mail.d.ts +248 -0
- package/backend/dist/esm/backend/src/plugins/mail/mail.js +389 -0
- package/backend/dist/{cjs → esm/backend/src}/plugins/mail/ui.d.ts +23 -0
- package/backend/dist/esm/{plugins → backend/src/plugins}/mail/ui.js +3 -6
- package/backend/dist/esm/backend/src/plugins/pdf.d.ts +1 -0
- package/backend/dist/esm/{plugins → backend/src/plugins}/pdf.js +3 -3
- package/backend/dist/esm/backend/src/rate_limit.d.ts +145 -0
- package/backend/dist/esm/backend/src/rate_limit.js +667 -0
- package/backend/dist/esm/{route.d.ts → backend/src/route.d.ts} +3 -10
- package/backend/dist/esm/{route.js → backend/src/route.js} +26 -21
- package/backend/dist/esm/backend/src/server.d.ts +485 -0
- package/backend/dist/esm/{server.js → backend/src/server.js} +891 -1441
- package/backend/dist/esm/backend/src/splash_screen.d.ts +80 -0
- package/backend/dist/esm/{splash_screen.js → backend/src/splash_screen.js} +42 -55
- package/backend/dist/esm/backend/src/status.d.ts +74 -0
- package/backend/dist/esm/backend/src/status.js +199 -0
- package/backend/dist/esm/backend/src/stream.d.ts +376 -0
- package/backend/dist/esm/{stream.js → backend/src/stream.js} +327 -292
- package/backend/dist/esm/backend/src/users.d.ts +809 -0
- package/backend/dist/esm/backend/src/users.js +2140 -0
- package/backend/dist/esm/backend/src/utils.d.ts +16 -0
- package/backend/dist/esm/{utils.js → backend/src/utils.js} +20 -81
- package/backend/dist/{cjs → esm/backend/src}/view.d.ts +33 -11
- package/backend/dist/esm/{view.js → backend/src/view.js} +266 -86
- package/backend/dist/{cjs → esm/backend/src}/volt.d.ts +10 -1
- package/backend/dist/esm/{volt.js → backend/src/volt.js} +7 -4
- package/backend/dist/esm/frontend/src/modules/request.d.ts +70 -0
- package/backend/dist/esm/frontend/src/modules/request.js +117 -0
- package/frontend/dist/backend/src/database/collection.d.ts +1543 -0
- package/frontend/dist/backend/src/database/collection.js +3510 -0
- package/frontend/dist/backend/src/database/database.d.ts +66 -0
- package/frontend/dist/backend/src/database/database.js +196 -0
- package/frontend/dist/backend/src/database/filters/filters.d.ts +6 -0
- package/frontend/dist/backend/src/database/filters/filters.js +1 -0
- package/frontend/dist/backend/src/database/filters/strict_filter.d.ts +223 -0
- package/frontend/dist/backend/src/database/filters/strict_filter.js +3 -0
- package/frontend/dist/backend/src/database/filters/strict_update_filter.d.ts +165 -0
- package/frontend/dist/backend/src/database/filters/strict_update_filter.js +5 -0
- package/frontend/dist/backend/src/database/flatten.d.ts +75 -0
- package/frontend/dist/backend/src/database/flatten.js +22 -0
- package/frontend/dist/backend/src/endpoint.d.ts +204 -0
- package/frontend/dist/backend/src/endpoint.js +570 -0
- package/frontend/dist/backend/src/errors/index.d.ts +7 -0
- package/frontend/dist/backend/src/errors/index.js +7 -0
- package/frontend/dist/backend/src/errors/internal_external.d.ts +38 -0
- package/frontend/dist/backend/src/errors/internal_external.js +70 -0
- package/frontend/dist/backend/src/errors/invalid_usage_error.d.ts +38 -0
- package/frontend/dist/backend/src/errors/invalid_usage_error.js +30 -0
- package/frontend/dist/backend/src/errors/system_error.d.ts +230 -0
- package/frontend/dist/backend/src/errors/system_error.js +402 -0
- package/frontend/dist/backend/src/events.d.ts +54 -0
- package/frontend/dist/backend/src/events.js +5 -0
- package/frontend/dist/backend/src/frontend.d.ts +11 -0
- package/frontend/dist/backend/src/frontend.js +12 -0
- package/frontend/dist/backend/src/image_endpoint.d.ts +39 -0
- package/frontend/dist/backend/src/image_endpoint.js +202 -0
- package/frontend/dist/backend/src/meta.d.ts +64 -0
- package/frontend/dist/backend/src/meta.js +110 -0
- package/frontend/dist/backend/src/payments/paddle.d.ts +326 -0
- package/frontend/dist/backend/src/payments/paddle.js +2256 -0
- package/frontend/dist/backend/src/plugins/mail/mail.d.ts +248 -0
- package/frontend/dist/backend/src/plugins/mail/mail.js +389 -0
- package/{backend/dist/esm/plugins/mail.d.ts → frontend/dist/backend/src/plugins/mail/ui.d.ts} +23 -0
- package/{backend/dist/esm/plugins/mail.js → frontend/dist/backend/src/plugins/mail/ui.js} +3 -6
- package/frontend/dist/backend/src/rate_limit.d.ts +145 -0
- package/frontend/dist/backend/src/rate_limit.js +673 -0
- package/frontend/dist/backend/src/route.d.ts +35 -0
- package/frontend/dist/backend/src/route.js +212 -0
- package/frontend/dist/backend/src/server.d.ts +485 -0
- package/frontend/dist/backend/src/server.js +2670 -0
- package/frontend/dist/backend/src/splash_screen.d.ts +80 -0
- package/frontend/dist/backend/src/splash_screen.js +135 -0
- package/frontend/dist/backend/src/status.d.ts +74 -0
- package/frontend/dist/backend/src/status.js +199 -0
- package/frontend/dist/backend/src/stream.d.ts +376 -0
- package/frontend/dist/backend/src/stream.js +1007 -0
- package/frontend/dist/backend/src/users.d.ts +807 -0
- package/frontend/dist/backend/src/users.js +2118 -0
- package/frontend/dist/backend/src/utils.d.ts +16 -0
- package/frontend/dist/backend/src/utils.js +241 -0
- package/frontend/dist/backend/src/view.d.ts +162 -0
- package/frontend/dist/backend/src/view.js +720 -0
- package/frontend/dist/frontend/src/elements/base.d.ts +4414 -0
- package/frontend/dist/{elements → frontend/src/elements}/base.js +3624 -260
- package/frontend/dist/frontend/src/elements/module.d.ts +95 -0
- package/frontend/dist/{elements → frontend/src/elements}/module.js +53 -52
- package/frontend/dist/frontend/src/elements/types.d.ts +52 -0
- package/frontend/dist/frontend/src/elements/types.js +5 -0
- package/frontend/dist/frontend/src/modules/attachment.d.ts +126 -0
- package/frontend/dist/frontend/src/modules/attachment.js +306 -0
- package/frontend/dist/frontend/src/modules/auth.d.ts +44 -0
- package/frontend/dist/frontend/src/modules/auth.js +80 -0
- package/frontend/dist/{modules → frontend/src/modules}/color.js +2 -2
- package/frontend/dist/frontend/src/modules/compression.d.ts +39 -0
- package/frontend/dist/frontend/src/modules/compression.js +102 -0
- package/frontend/dist/frontend/src/modules/cookies.d.ts +44 -0
- package/frontend/dist/frontend/src/modules/cookies.js +143 -0
- package/frontend/dist/frontend/src/modules/events.d.ts +31 -0
- package/frontend/dist/frontend/src/modules/events.js +74 -0
- package/frontend/dist/frontend/src/modules/google.d.ts +23 -0
- package/frontend/dist/frontend/src/modules/google.js +52 -0
- package/frontend/dist/frontend/src/modules/meta.d.ts +14 -0
- package/frontend/dist/{modules → frontend/src/modules}/meta.js +9 -7
- package/frontend/dist/{modules → frontend/src/modules}/paddle.d.ts +37 -134
- package/frontend/dist/{modules → frontend/src/modules}/paddle.js +620 -568
- package/frontend/dist/frontend/src/modules/request.d.ts +70 -0
- package/frontend/dist/frontend/src/modules/request.js +117 -0
- package/frontend/dist/frontend/src/modules/settings.d.ts +3 -0
- package/frontend/dist/frontend/src/modules/settings.js +5 -0
- package/frontend/dist/frontend/src/modules/statics.d.ts +21 -0
- package/frontend/dist/{modules → frontend/src/modules}/statics.js +15 -18
- package/frontend/dist/frontend/src/modules/support.d.ts +30 -0
- package/frontend/dist/frontend/src/modules/support.js +53 -0
- package/frontend/dist/{modules → frontend/src/modules}/theme.d.ts +67 -0
- package/frontend/dist/{modules → frontend/src/modules}/theme.js +68 -38
- package/frontend/dist/frontend/src/modules/themes.d.ts +12 -0
- package/frontend/dist/frontend/src/modules/themes.js +22 -0
- package/frontend/dist/frontend/src/modules/user.d.ts +164 -0
- package/frontend/dist/frontend/src/modules/user.js +268 -0
- package/frontend/dist/frontend/src/modules/utils.d.ts +176 -0
- package/frontend/dist/frontend/src/modules/utils.js +569 -0
- package/frontend/dist/frontend/src/types/gradient.d.ts +29 -0
- package/frontend/dist/{types → frontend/src/types}/gradient.js +14 -18
- package/frontend/dist/frontend/src/ui/border_button.d.ts +94 -0
- package/frontend/dist/{ui → frontend/src/ui}/border_button.js +7 -13
- package/frontend/dist/frontend/src/ui/button.d.ts +28 -0
- package/frontend/dist/{ui → frontend/src/ui}/button.js +21 -12
- package/frontend/dist/frontend/src/ui/canvas.d.ts +138 -0
- package/frontend/dist/{ui → frontend/src/ui}/canvas.js +88 -55
- package/frontend/dist/frontend/src/ui/checkbox.d.ts +74 -0
- package/frontend/dist/{ui → frontend/src/ui}/checkbox.js +80 -41
- package/frontend/dist/{ui → frontend/src/ui}/code.d.ts +73 -6
- package/frontend/dist/{ui → frontend/src/ui}/code.js +55 -52
- package/frontend/dist/{ui → frontend/src/ui}/context_menu.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/context_menu.js +12 -17
- package/frontend/dist/{ui → frontend/src/ui}/css.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/css.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/divider.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/divider.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/dropdown.d.ts +57 -2
- package/frontend/dist/{ui → frontend/src/ui}/dropdown.js +87 -94
- package/frontend/dist/{ui → frontend/src/ui}/for_each.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/for_each.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/form.d.ts +6 -2
- package/frontend/dist/{ui → frontend/src/ui}/form.js +10 -7
- package/frontend/dist/frontend/src/ui/frame_modes.d.ts +37 -0
- package/frontend/dist/{ui → frontend/src/ui}/frame_modes.js +16 -22
- package/frontend/dist/{ui → frontend/src/ui}/google_map.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/google_map.js +4 -4
- package/frontend/dist/{ui → frontend/src/ui}/gradient.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/gradient.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/image.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/image.js +5 -5
- package/frontend/dist/frontend/src/ui/input.d.ts +392 -0
- package/frontend/dist/{ui → frontend/src/ui}/input.js +346 -360
- package/frontend/dist/{ui → frontend/src/ui}/link.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/link.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/list.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/list.js +12 -6
- package/frontend/dist/frontend/src/ui/loader_button.d.ts +80 -0
- package/frontend/dist/{ui → frontend/src/ui}/loader_button.js +35 -47
- package/frontend/dist/frontend/src/ui/loaders.d.ts +57 -0
- package/frontend/dist/{ui → frontend/src/ui}/loaders.js +11 -11
- package/frontend/dist/{ui → frontend/src/ui}/popup.d.ts +11 -6
- package/frontend/dist/{ui → frontend/src/ui}/popup.js +32 -18
- package/frontend/dist/frontend/src/ui/pseudo.d.ts +44 -0
- package/frontend/dist/{ui → frontend/src/ui}/pseudo.js +84 -8
- package/frontend/dist/{ui → frontend/src/ui}/scroller.d.ts +14 -2
- package/frontend/dist/{ui → frontend/src/ui}/scroller.js +37 -43
- package/frontend/dist/{ui → frontend/src/ui}/slider.d.ts +5 -1
- package/frontend/dist/{ui → frontend/src/ui}/slider.js +4 -4
- package/frontend/dist/{ui → frontend/src/ui}/spacer.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/spacer.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/span.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/span.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/stack.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/stack.js +3 -9
- package/frontend/dist/frontend/src/ui/steps.d.ts +131 -0
- package/frontend/dist/{ui → frontend/src/ui}/steps.js +30 -45
- package/frontend/dist/{ui → frontend/src/ui}/style.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/style.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/switch.d.ts +5 -1
- package/frontend/dist/{ui → frontend/src/ui}/switch.js +4 -4
- package/frontend/dist/{ui → frontend/src/ui}/table.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/table.js +6 -6
- package/frontend/dist/{ui → frontend/src/ui}/tabs.d.ts +45 -3
- package/frontend/dist/{ui → frontend/src/ui}/tabs.js +65 -40
- package/frontend/dist/{ui → frontend/src/ui}/text.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/text.js +3 -3
- package/frontend/dist/frontend/src/ui/title.d.ts +91 -0
- package/frontend/dist/frontend/src/ui/title.js +272 -0
- package/frontend/dist/{ui → frontend/src/ui}/view.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/view.js +3 -3
- package/frontend/dist/{volt.d.ts → frontend/src/volt.d.ts} +3 -0
- package/frontend/dist/{volt.js → frontend/src/volt.js} +4 -0
- package/frontend/tools/bundle_d_ts.js +71 -0
- package/frontend/tools/convert_to_jsdoc_input.txt +9452 -0
- package/frontend/tools/convert_to_jsdoc_output.txt +7626 -0
- package/frontend/tools/convert_to_jsdoc_tmp.js +345 -0
- package/package.json +11 -12
- package/backend/dist/cjs/database/collection.d.ts +0 -160
- package/backend/dist/cjs/database/collection.js +0 -842
- package/backend/dist/cjs/database/database.d.ts +0 -121
- package/backend/dist/cjs/database/document.d.ts +0 -131
- package/backend/dist/cjs/database/document.js +0 -224
- package/backend/dist/cjs/database.d.ts +0 -502
- package/backend/dist/cjs/database.js +0 -2248
- package/backend/dist/cjs/logger.d.ts +0 -3
- package/backend/dist/cjs/meta.d.ts +0 -50
- package/backend/dist/cjs/mutex.d.ts +0 -24
- package/backend/dist/cjs/payments/paddle.d.ts +0 -160
- package/backend/dist/cjs/plugins/browser.d.ts +0 -36
- package/backend/dist/cjs/plugins/browser.js +0 -198
- package/backend/dist/cjs/plugins/css.d.ts +0 -11
- package/backend/dist/cjs/plugins/css.js +0 -80
- package/backend/dist/cjs/plugins/mail.d.ts +0 -277
- package/backend/dist/cjs/plugins/mail.js +0 -1370
- package/backend/dist/cjs/plugins/ts/compiler.d.ts +0 -139
- package/backend/dist/cjs/plugins/ts/compiler.js +0 -750
- package/backend/dist/cjs/plugins/ts/preprocessing.d.ts +0 -14
- package/backend/dist/cjs/plugins/ts/preprocessing.js +0 -440
- package/backend/dist/cjs/rate_limit.d.ts +0 -63
- package/backend/dist/cjs/rate_limit.js +0 -348
- package/backend/dist/cjs/request.deprc.d.ts +0 -48
- package/backend/dist/cjs/request.deprc.js +0 -572
- package/backend/dist/cjs/response.deprc.d.ts +0 -55
- package/backend/dist/cjs/response.deprc.js +0 -275
- package/backend/dist/cjs/server.d.ts +0 -342
- package/backend/dist/cjs/splash_screen.d.ts +0 -35
- package/backend/dist/cjs/status.d.ts +0 -61
- package/backend/dist/cjs/stream.d.ts +0 -79
- package/backend/dist/cjs/users.d.ts +0 -111
- package/backend/dist/cjs/users.js +0 -1817
- package/backend/dist/cjs/view.js +0 -352
- package/backend/dist/cjs/vinc.dev.d.ts +0 -3
- package/backend/dist/cjs/vinc.dev.js +0 -7
- package/backend/dist/css/adyen.css +0 -92
- package/backend/dist/css/volt.css +0 -70
- package/backend/dist/esm/database/collection.d.ts +0 -160
- package/backend/dist/esm/database/collection.js +0 -1328
- package/backend/dist/esm/database/database.d.ts +0 -121
- package/backend/dist/esm/database/document.d.ts +0 -131
- package/backend/dist/esm/database/document.js +0 -247
- package/backend/dist/esm/database.d.ts +0 -502
- package/backend/dist/esm/database.js +0 -2423
- package/backend/dist/esm/file_watcher.js +0 -329
- package/backend/dist/esm/logger.d.ts +0 -3
- package/backend/dist/esm/logger.js +0 -11
- package/backend/dist/esm/meta.d.ts +0 -50
- package/backend/dist/esm/mutex.d.ts +0 -24
- package/backend/dist/esm/mutex.js +0 -48
- package/backend/dist/esm/payments/paddle.d.ts +0 -160
- package/backend/dist/esm/plugins/browser.d.ts +0 -36
- package/backend/dist/esm/plugins/browser.js +0 -176
- package/backend/dist/esm/plugins/css.d.ts +0 -11
- package/backend/dist/esm/plugins/css.js +0 -90
- package/backend/dist/esm/plugins/ts/compiler.d.ts +0 -139
- package/backend/dist/esm/plugins/ts/compiler.js +0 -1194
- package/backend/dist/esm/plugins/ts/preprocessing.d.ts +0 -14
- package/backend/dist/esm/plugins/ts/preprocessing.js +0 -726
- package/backend/dist/esm/rate_limit.d.ts +0 -63
- package/backend/dist/esm/rate_limit.js +0 -417
- package/backend/dist/esm/request.deprc.d.ts +0 -48
- package/backend/dist/esm/request.deprc.js +0 -572
- package/backend/dist/esm/response.deprc.d.ts +0 -55
- package/backend/dist/esm/response.deprc.js +0 -275
- package/backend/dist/esm/server.d.ts +0 -342
- package/backend/dist/esm/splash_screen.d.ts +0 -35
- package/backend/dist/esm/status.d.ts +0 -61
- package/backend/dist/esm/status.js +0 -197
- package/backend/dist/esm/stream.d.ts +0 -79
- package/backend/dist/esm/users.d.ts +0 -111
- package/backend/dist/esm/users.js +0 -1935
- package/backend/dist/esm/vinc.dev.d.ts +0 -3
- package/backend/dist/esm/vinc.dev.js +0 -7
- package/frontend/dist/elements/base.d.ts +0 -9889
- package/frontend/dist/elements/module.d.ts +0 -30
- package/frontend/dist/modules/array.d.ts +0 -94
- package/frontend/dist/modules/array.js +0 -634
- package/frontend/dist/modules/auth.d.ts +0 -46
- package/frontend/dist/modules/auth.js +0 -139
- package/frontend/dist/modules/colors.d.ts +0 -1
- package/frontend/dist/modules/colors.js +0 -417
- package/frontend/dist/modules/compression.d.ts +0 -6
- package/frontend/dist/modules/compression.js +0 -999
- package/frontend/dist/modules/cookies.d.ts +0 -18
- package/frontend/dist/modules/cookies.js +0 -167
- package/frontend/dist/modules/date.d.ts +0 -142
- package/frontend/dist/modules/date.js +0 -493
- package/frontend/dist/modules/events.d.ts +0 -8
- package/frontend/dist/modules/events.js +0 -91
- package/frontend/dist/modules/google.d.ts +0 -11
- package/frontend/dist/modules/google.js +0 -54
- package/frontend/dist/modules/meta.d.ts +0 -10
- package/frontend/dist/modules/mutex.d.ts +0 -7
- package/frontend/dist/modules/mutex.js +0 -51
- package/frontend/dist/modules/number.d.ts +0 -16
- package/frontend/dist/modules/number.js +0 -23
- package/frontend/dist/modules/object.d.ts +0 -52
- package/frontend/dist/modules/object.js +0 -383
- package/frontend/dist/modules/scheme.d.ts +0 -227
- package/frontend/dist/modules/scheme.js +0 -531
- package/frontend/dist/modules/settings.d.ts +0 -3
- package/frontend/dist/modules/settings.js +0 -4
- package/frontend/dist/modules/statics.d.ts +0 -5
- package/frontend/dist/modules/string.d.ts +0 -124
- package/frontend/dist/modules/string.js +0 -745
- package/frontend/dist/modules/support.d.ts +0 -19
- package/frontend/dist/modules/support.js +0 -103
- package/frontend/dist/modules/themes.d.ts +0 -8
- package/frontend/dist/modules/themes.js +0 -18
- package/frontend/dist/modules/user.d.ts +0 -59
- package/frontend/dist/modules/user.js +0 -280
- package/frontend/dist/modules/utils.d.ts +0 -87
- package/frontend/dist/modules/utils.js +0 -923
- package/frontend/dist/types/gradient.d.ts +0 -12
- package/frontend/dist/ui/border_button.d.ts +0 -152
- package/frontend/dist/ui/button.d.ts +0 -21
- package/frontend/dist/ui/canvas.d.ts +0 -56
- package/frontend/dist/ui/checkbox.d.ts +0 -52
- package/frontend/dist/ui/frame_modes.d.ts +0 -25
- package/frontend/dist/ui/input.d.ts +0 -241
- package/frontend/dist/ui/loader_button.d.ts +0 -93
- package/frontend/dist/ui/loaders.d.ts +0 -57
- package/frontend/dist/ui/pseudo.d.ts +0 -16
- package/frontend/dist/ui/steps.d.ts +0 -59
- package/frontend/dist/ui/title.d.ts +0 -21
- package/frontend/dist/ui/title.js +0 -121
- package/frontend/examples/dashboard/dashboard.ts +0 -776
- /package/backend/dist/cjs/{cli.d.ts → backend/src/cli.d.ts} +0 -0
- /package/backend/dist/cjs/{file_watcher.d.ts → backend/src/database/document.d.ts} +0 -0
- /package/backend/dist/cjs/{file_watcher.js → backend/src/database/document.js} +0 -0
- /package/backend/dist/cjs/{plugins/pdf.d.ts → backend/src/database/filters/strict_filter_test.d.ts} +0 -0
- /package/backend/dist/{esm/file_watcher.d.ts → cjs/backend/src/database/filters/strict_filter_test_v0.d.ts} +0 -0
- /package/backend/dist/{esm/plugins/pdf.d.ts → cjs/backend/src/database/flatten_test.d.ts} +0 -0
- /package/backend/dist/cjs/{frontend.d.ts → backend/src/frontend.d.ts} +0 -0
- /package/backend/dist/cjs/{plugins → backend/src/plugins}/communication.d.ts +0 -0
- /package/backend/dist/cjs/{plugins → backend/src/plugins}/communication.js +0 -0
- /package/backend/dist/cjs/{plugins → backend/src/plugins}/mail/ui.js +0 -0
- /package/backend/dist/cjs/{plugins → backend/src/plugins}/pdf.js +0 -0
- /package/backend/dist/cjs/{plugins → backend/src/plugins}/thread_monitor.d.ts +0 -0
- /package/backend/dist/cjs/{plugins → backend/src/plugins}/thread_monitor.js +0 -0
- /package/backend/dist/cjs/{vinc.d.ts → backend/src/vinc.d.ts} +0 -0
- /package/backend/dist/cjs/{vinc.js → backend/src/vinc.js} +0 -0
- /package/backend/dist/esm/{cli.d.ts → backend/src/cli.d.ts} +0 -0
- /package/backend/dist/esm/{frontend.d.ts → backend/src/frontend.d.ts} +0 -0
- /package/backend/dist/esm/{plugins → backend/src/plugins}/communication.d.ts +0 -0
- /package/backend/dist/esm/{plugins → backend/src/plugins}/communication.js +0 -0
- /package/backend/dist/esm/{plugins → backend/src/plugins}/thread_monitor.d.ts +0 -0
- /package/backend/dist/esm/{plugins → backend/src/plugins}/thread_monitor.js +0 -0
- /package/backend/dist/esm/{vinc.d.ts → backend/src/vinc.d.ts} +0 -0
- /package/backend/dist/esm/{vinc.js → backend/src/vinc.js} +0 -0
- /package/frontend/dist/{elements → frontend/src/elements}/register_element.d.ts +0 -0
- /package/frontend/dist/{elements → frontend/src/elements}/register_element.js +0 -0
- /package/frontend/dist/{modules → frontend/src/modules}/color.d.ts +0 -0
- /package/frontend/dist/{ui → frontend/src/ui}/ui.d.ts +0 -0
- /package/frontend/dist/{ui → frontend/src/ui}/ui.js +0 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Daan van den Bergh
|
|
3
|
+
* @copyright © 2022 - 2025 Daan van den Bergh. All rights reserved
|
|
4
|
+
*/
|
|
5
|
+
import { VDivElement, VElementTagMap } from "../elements/module.js";
|
|
6
|
+
/**
|
|
7
|
+
* Supports a gradient color for the border combined with border radius.
|
|
8
|
+
* Warning: this class is still experimental and may be subject to future change.
|
|
9
|
+
*/
|
|
10
|
+
export declare class BorderButtonElement extends VElementTagMap.a {
|
|
11
|
+
nodes: {
|
|
12
|
+
border: VDivElement;
|
|
13
|
+
text: VDivElement;
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Initializes a new instance of the BorderButton element with the provided text.
|
|
18
|
+
* @param text The text to be displayed on the BorderButton.
|
|
19
|
+
* @returns This constructor does not return a value.
|
|
20
|
+
* @docs
|
|
21
|
+
*/
|
|
22
|
+
constructor(text?: string);
|
|
23
|
+
/**
|
|
24
|
+
* Sets or gets the gradient color for the border element. If no value is provided, the current background is returned.
|
|
25
|
+
* @param value The color value to set for the gradient.
|
|
26
|
+
* @returns When a value is provided, returns this for chaining; otherwise, returns the current background value.
|
|
27
|
+
* @docs
|
|
28
|
+
*/
|
|
29
|
+
gradient(): string;
|
|
30
|
+
gradient(value: string | null): this;
|
|
31
|
+
/**
|
|
32
|
+
* Sets or gets the border color of the element. If no value is provided, the current border color is returned.
|
|
33
|
+
* @param value The color value to set for the border.
|
|
34
|
+
* @returns When a value is provided, returns this for chaining; otherwise, returns the current border color.
|
|
35
|
+
* @docs
|
|
36
|
+
*/
|
|
37
|
+
border_color(): string;
|
|
38
|
+
border_color(value: string | null): this;
|
|
39
|
+
/**
|
|
40
|
+
* Sets or retrieves the border width of the element. If no argument is passed, the current border width (padding) is returned.
|
|
41
|
+
* @param value The value of the border width to set.
|
|
42
|
+
* @returns When a value is provided, returns this for chaining; otherwise, returns the current border width.
|
|
43
|
+
* @docs
|
|
44
|
+
*/
|
|
45
|
+
border_width(): string;
|
|
46
|
+
border_width(value: string | number): this;
|
|
47
|
+
/**
|
|
48
|
+
* Sets or gets the border radius for the element. If no value is provided, the current border radius is returned.
|
|
49
|
+
* @param value The value for the border radius to set.
|
|
50
|
+
* @returns Returns the current border radius if no value is provided; otherwise, returns this for chaining.
|
|
51
|
+
* @docs
|
|
52
|
+
*/
|
|
53
|
+
border_radius(): string;
|
|
54
|
+
border_radius(value: string | number): this;
|
|
55
|
+
/**
|
|
56
|
+
* Sets or retrieves the color of the child text. When a value is provided, it updates the color; when omitted, it returns the current color.
|
|
57
|
+
* @param value The color value to set for the child text.
|
|
58
|
+
* @returns Returns the current color if no value is provided; otherwise, returns this for chaining.
|
|
59
|
+
* @docs
|
|
60
|
+
*/
|
|
61
|
+
color(): string;
|
|
62
|
+
color(value: string): this;
|
|
63
|
+
/**
|
|
64
|
+
* Retrieves or sets the styling attributes for the element. If no argument is provided, styles are computed from child elements.
|
|
65
|
+
* @param style_dict A dictionary of styles to set. If omitted, the method computes styles based on child elements.
|
|
66
|
+
* @returns Returns the computed styles when no argument is passed, or the result of the super method when an argument is provided.
|
|
67
|
+
* @docs
|
|
68
|
+
*/
|
|
69
|
+
styles(): Record<string, string>;
|
|
70
|
+
styles(style_dict: Record<string, any>): this;
|
|
71
|
+
/**
|
|
72
|
+
* Sets or gets the text of the element. If a value is provided, it sets the text; otherwise, it returns the current text.
|
|
73
|
+
* @param val The value to set as text or omitted to retrieve the current text.
|
|
74
|
+
* @returns When a value is provided, returns this for chaining; otherwise, returns the current text.
|
|
75
|
+
* @docs
|
|
76
|
+
*/
|
|
77
|
+
text(): string;
|
|
78
|
+
text(val: string): this;
|
|
79
|
+
/**
|
|
80
|
+
* Sets or retrieves the transition for the border color of the element.
|
|
81
|
+
* @param val The value to set for the transition or omit to retrieve the current transition.
|
|
82
|
+
* @returns When a value is provided, returns this for chaining; otherwise, returns the already set transition value.
|
|
83
|
+
* @docs
|
|
84
|
+
*/
|
|
85
|
+
transition_border_color(): string;
|
|
86
|
+
transition_border_color(val: string): this;
|
|
87
|
+
}
|
|
88
|
+
export declare const BorderButton: <Extensions extends object = {}>(text?: string | undefined) => BorderButtonElement & Extensions;
|
|
89
|
+
export declare const NullBorderButton: <Extensions extends object = {}>() => BorderButtonElement & Extensions;
|
|
90
|
+
declare module './any_element.d.ts' {
|
|
91
|
+
interface AnyElementMap {
|
|
92
|
+
BorderButtonElement: BorderButtonElement;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
1
|
+
/**
|
|
2
|
+
* @author Daan van den Bergh
|
|
3
|
+
* @copyright © 2022 - 2025 Daan van den Bergh. All rights reserved
|
|
4
4
|
*/
|
|
5
5
|
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
6
6
|
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
@@ -96,16 +96,10 @@ let BorderButtonElement = (() => {
|
|
|
96
96
|
}
|
|
97
97
|
nodes;
|
|
98
98
|
/**
|
|
99
|
-
*
|
|
100
|
-
* @
|
|
101
|
-
* @
|
|
102
|
-
* @
|
|
103
|
-
* @name: text
|
|
104
|
-
* @descr: The text to be displayed on the BorderButton.
|
|
105
|
-
* @type: string
|
|
106
|
-
* @return:
|
|
107
|
-
* @type: void
|
|
108
|
-
* @description This constructor does not return a value.
|
|
99
|
+
* Initializes a new instance of the BorderButton element with the provided text.
|
|
100
|
+
* @param text The text to be displayed on the BorderButton.
|
|
101
|
+
* @returns This constructor does not return a value.
|
|
102
|
+
* @docs
|
|
109
103
|
*/
|
|
110
104
|
constructor(text = "") {
|
|
111
105
|
// Initialize base classes.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Daan van den Bergh
|
|
3
|
+
* @copyright © 2022 - 2025 Daan van den Bergh. All rights reserved
|
|
4
|
+
*/
|
|
5
|
+
import { VElementTagMap } from "../elements/module.js";
|
|
6
|
+
import { BorderButtonElement } from "./border_button.js";
|
|
7
|
+
import { LoaderButtonElement } from "./loader_button.js";
|
|
8
|
+
/**
|
|
9
|
+
* Is any button like,
|
|
10
|
+
* including loader and bordered buttons.
|
|
11
|
+
*/
|
|
12
|
+
export declare function isButtonLike(element: any): element is (ButtonElement | LoaderButtonElement | BorderButtonElement);
|
|
13
|
+
export declare class ButtonElement extends VElementTagMap.a {
|
|
14
|
+
/**
|
|
15
|
+
* Initializes the Button element with the provided text.
|
|
16
|
+
* @param text The text to display on the button.
|
|
17
|
+
* @nav Frontend/Buttons
|
|
18
|
+
* @docs
|
|
19
|
+
*/
|
|
20
|
+
constructor(text?: string);
|
|
21
|
+
}
|
|
22
|
+
export declare const Button: <Extensions extends object = {}>(text?: string | undefined) => ButtonElement & Extensions;
|
|
23
|
+
export declare const NullButton: <Extensions extends object = {}>() => ButtonElement & Extensions;
|
|
24
|
+
declare module './any_element.d.ts' {
|
|
25
|
+
interface AnyElementMap {
|
|
26
|
+
ButtonElement: ButtonElement;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
1
|
+
/**
|
|
2
|
+
* @author Daan van den Bergh
|
|
3
|
+
* @copyright © 2022 - 2025 Daan van den Bergh. All rights reserved
|
|
4
4
|
*/
|
|
5
5
|
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
6
6
|
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
@@ -37,7 +37,20 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
37
37
|
return useValue ? value : void 0;
|
|
38
38
|
};
|
|
39
39
|
// Imports.
|
|
40
|
-
import { Elements, VElementTagMap } from "../elements/module.js";
|
|
40
|
+
import { Elements, VElementTagMap, isVElement } from "../elements/module.js";
|
|
41
|
+
import { BorderButtonElement } from "./border_button.js";
|
|
42
|
+
import { LoaderButtonElement } from "./loader_button.js";
|
|
43
|
+
/**
|
|
44
|
+
* Is any button like,
|
|
45
|
+
* including loader and bordered buttons.
|
|
46
|
+
*/
|
|
47
|
+
export function isButtonLike(element) {
|
|
48
|
+
return (element instanceof ButtonElement
|
|
49
|
+
|| element instanceof LoaderButtonElement
|
|
50
|
+
|| element instanceof BorderButtonElement) || (isVElement(element) && (element.element_name === "ButtonElement"
|
|
51
|
+
|| element.element_name === "LoaderButtonElement"
|
|
52
|
+
|| element.element_name === "BorderButtonElement"));
|
|
53
|
+
}
|
|
41
54
|
// Button.
|
|
42
55
|
let ButtonElement = (() => {
|
|
43
56
|
let _classDecorators = [Elements.create({
|
|
@@ -86,14 +99,10 @@ let ButtonElement = (() => {
|
|
|
86
99
|
__runInitializers(_classThis, _classExtraInitializers);
|
|
87
100
|
}
|
|
88
101
|
/**
|
|
89
|
-
*
|
|
90
|
-
* @
|
|
91
|
-
* @
|
|
92
|
-
* @
|
|
93
|
-
* @desc: Initializes the Button element with the provided text.
|
|
94
|
-
* @param:
|
|
95
|
-
* @name: text
|
|
96
|
-
* @description The text to display on the button.
|
|
102
|
+
* Initializes the Button element with the provided text.
|
|
103
|
+
* @param text The text to display on the button.
|
|
104
|
+
* @nav Frontend/Buttons
|
|
105
|
+
* @docs
|
|
97
106
|
*/
|
|
98
107
|
constructor(text = "") {
|
|
99
108
|
super({
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Daan van den Bergh
|
|
3
|
+
* @copyright © 2022 - 2025 Daan van den Bergh. All rights reserved
|
|
4
|
+
*/
|
|
5
|
+
import { VElementTagMap } from "../elements/module.js";
|
|
6
|
+
import { GradientType } from "../types/gradient.js";
|
|
7
|
+
/**
|
|
8
|
+
* A point in 2D space used for drawing lines.
|
|
9
|
+
* Optional `tension` overrides curve smoothing for that segment.
|
|
10
|
+
*/
|
|
11
|
+
type PointObject = {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
tension?: number;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Canvas element.
|
|
18
|
+
* @nav Frontend/Elements
|
|
19
|
+
* @experimental true
|
|
20
|
+
* @warning This class is still experimental and may be subject to future change.
|
|
21
|
+
* @docs
|
|
22
|
+
*/
|
|
23
|
+
export declare class CanvasElement extends VElementTagMap.canvas {
|
|
24
|
+
_e: any;
|
|
25
|
+
ctx_2d: any;
|
|
26
|
+
/**
|
|
27
|
+
* Initialize the canvas element and, on Safari, create a shadow DOM
|
|
28
|
+
* canvas to work around rendering issues.
|
|
29
|
+
*/
|
|
30
|
+
constructor();
|
|
31
|
+
height(): string | number;
|
|
32
|
+
height(value: string | number, check_attribute?: boolean): this;
|
|
33
|
+
min_height(): string | number;
|
|
34
|
+
min_height(value: string | number): this;
|
|
35
|
+
max_height(): string;
|
|
36
|
+
max_height(value: string | number): this;
|
|
37
|
+
width(): string | number;
|
|
38
|
+
width(value: string | number, check_attribute?: boolean): this;
|
|
39
|
+
min_width(): string | number;
|
|
40
|
+
min_width(value: string | number): this;
|
|
41
|
+
max_width(): string;
|
|
42
|
+
max_width(value: string | number): this;
|
|
43
|
+
/**
|
|
44
|
+
* Get a rendering context for the canvas.
|
|
45
|
+
* In Safari, forwards to the shadow canvas element.
|
|
46
|
+
* @param args Arguments forwarded to `HTMLCanvasElement.getContext`.
|
|
47
|
+
* @returns The rendering context.
|
|
48
|
+
*/
|
|
49
|
+
getContext(...args: any[]): any;
|
|
50
|
+
/**
|
|
51
|
+
* Draw a smoothed path through the given points on the provided context.
|
|
52
|
+
* Uses a Catmull–Rom style bezier approximation controlled by `tension`.
|
|
53
|
+
* @param ctx Canvas 2D context.
|
|
54
|
+
* @param points Ordered list of points to draw through.
|
|
55
|
+
* @param tension Optional smoothing factor; 0 for straight segments.
|
|
56
|
+
* @returns this
|
|
57
|
+
*/
|
|
58
|
+
draw_lines(ctx: any, points?: PointObject[], tension?: number): this;
|
|
59
|
+
/**
|
|
60
|
+
* Create a canvas gradient from a `GradientType` definition.
|
|
61
|
+
* Supports linear and (placeholder) radial gradients.
|
|
62
|
+
* @param ctx Canvas 2D context.
|
|
63
|
+
* @param gradient The gradient definition (`GradientType`).
|
|
64
|
+
* @param start_x Start x coordinate.
|
|
65
|
+
* @param start_y Start y coordinate.
|
|
66
|
+
* @param end_x End x coordinate.
|
|
67
|
+
* @param end_y End y coordinate.
|
|
68
|
+
* @returns The created gradient or null when invalid.
|
|
69
|
+
*/
|
|
70
|
+
create_gradient(ctx: any, gradient: GradientType, start_x: number, start_y: number, end_x: number, end_y: number): any;
|
|
71
|
+
/**
|
|
72
|
+
* Create a line, optionally curved and with custom styling.
|
|
73
|
+
* @returns Returns the `Canvas` object.
|
|
74
|
+
* @param points The line points, an array with objects with `x` and `y` values.
|
|
75
|
+
* @param tension The smoothness of the line, use `null` or `0` for a straight line and {0.0, 2.0} for a smooth line.
|
|
76
|
+
* @param color The line color.
|
|
77
|
+
* @param width The line width in pixels.
|
|
78
|
+
* @param fill The fill color, supports a `GradientType` class. leave `null` to ignore.
|
|
79
|
+
* @param scale When enabled all x and y coordinates are treated as a 0.0 till 1.0 scale in relation to the canvas' width and height.
|
|
80
|
+
* @param dots Place dots at each coordinate, leave `null` to ignore.
|
|
81
|
+
* @param dots.width Dot width in pixels when `scale` is `false`, and dot width in percentage `{0.0,1.0}` when `scale` is `true`.
|
|
82
|
+
* @param dots.color Fill color.
|
|
83
|
+
* @docs
|
|
84
|
+
*/
|
|
85
|
+
lines({ points, tension, color, width, fill, scale, dots, }: {
|
|
86
|
+
points: PointObject[];
|
|
87
|
+
tension?: number;
|
|
88
|
+
color?: string;
|
|
89
|
+
width?: number;
|
|
90
|
+
fill?: string | GradientType;
|
|
91
|
+
scale?: boolean;
|
|
92
|
+
dots?: {
|
|
93
|
+
width?: number;
|
|
94
|
+
color?: string | GradientType;
|
|
95
|
+
};
|
|
96
|
+
}): this;
|
|
97
|
+
/**
|
|
98
|
+
* Clear the entire canvas.
|
|
99
|
+
* @returns this
|
|
100
|
+
*/
|
|
101
|
+
clear(): this;
|
|
102
|
+
/**
|
|
103
|
+
* Get or set the shadow color used for drawing operations.
|
|
104
|
+
* @param val The CSS color value.
|
|
105
|
+
* @returns The current shadow color or this.
|
|
106
|
+
*/
|
|
107
|
+
shadow_color(): string;
|
|
108
|
+
shadow_color(val: string): this;
|
|
109
|
+
/**
|
|
110
|
+
* Get or set the shadow blur radius.
|
|
111
|
+
* @param val The blur amount.
|
|
112
|
+
* @returns The current shadow blur or this.
|
|
113
|
+
*/
|
|
114
|
+
shadow_blur(): string;
|
|
115
|
+
shadow_blur(val: string): this;
|
|
116
|
+
/**
|
|
117
|
+
* Get or set the horizontal shadow offset.
|
|
118
|
+
* @param val The offset value.
|
|
119
|
+
* @returns The current shadow offset X or this.
|
|
120
|
+
*/
|
|
121
|
+
shadow_offset_x(): string;
|
|
122
|
+
shadow_offset_x(val: number | string): this;
|
|
123
|
+
/**
|
|
124
|
+
* Get or set the vertical shadow offset.
|
|
125
|
+
* @param val The offset value.
|
|
126
|
+
* @returns The current shadow offset Y or this.
|
|
127
|
+
*/
|
|
128
|
+
shadow_offset_y(): string;
|
|
129
|
+
shadow_offset_y(val: number | string): this;
|
|
130
|
+
}
|
|
131
|
+
export declare const Canvas: <Extensions extends object = {}>() => CanvasElement & Extensions;
|
|
132
|
+
export declare const NullCanvas: <Extensions extends object = {}>() => CanvasElement & Extensions;
|
|
133
|
+
declare module './any_element.d.ts' {
|
|
134
|
+
interface AnyElementMap {
|
|
135
|
+
CanvasElement: CanvasElement;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
1
|
+
/**
|
|
2
|
+
* @author Daan van den Bergh
|
|
3
|
+
* @copyright © 2022 - 2025 Daan van den Bergh. All rights reserved
|
|
4
4
|
*/
|
|
5
5
|
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
6
6
|
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
@@ -41,15 +41,12 @@ import { Utils } from "../modules/utils.js";
|
|
|
41
41
|
import { Elements, VElementTagMap } from "../elements/module.js";
|
|
42
42
|
import { GradientType } from "../types/gradient.js";
|
|
43
43
|
// Canvas.
|
|
44
|
-
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* @experimental: true
|
|
51
|
-
* @warning:
|
|
52
|
-
* This class is still experimental and may be subject to future change.
|
|
44
|
+
/**
|
|
45
|
+
* Canvas element.
|
|
46
|
+
* @nav Frontend/Elements
|
|
47
|
+
* @experimental true
|
|
48
|
+
* @warning This class is still experimental and may be subject to future change.
|
|
49
|
+
* @docs
|
|
53
50
|
*/
|
|
54
51
|
let CanvasElement = (() => {
|
|
55
52
|
let _classDecorators = [Elements.create({
|
|
@@ -73,6 +70,10 @@ let CanvasElement = (() => {
|
|
|
73
70
|
ctx_2d;
|
|
74
71
|
// ---------------------------------------------------------
|
|
75
72
|
// Constructors.
|
|
73
|
+
/**
|
|
74
|
+
* Initialize the canvas element and, on Safari, create a shadow DOM
|
|
75
|
+
* canvas to work around rendering issues.
|
|
76
|
+
*/
|
|
76
77
|
constructor() {
|
|
77
78
|
super({
|
|
78
79
|
derived: CanvasElement,
|
|
@@ -95,6 +96,12 @@ let CanvasElement = (() => {
|
|
|
95
96
|
}
|
|
96
97
|
this.ctx_2d = this.getContext("2d");
|
|
97
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* Get or set the canvas height with Safari shadow-canvas support.
|
|
101
|
+
* @param value The height value.
|
|
102
|
+
* @param check_attribute When true, also update the element attribute.
|
|
103
|
+
* @returns The current height or this.
|
|
104
|
+
*/
|
|
98
105
|
height(value, check_attribute) {
|
|
99
106
|
if (this._e === undefined) {
|
|
100
107
|
return super.height(value, check_attribute);
|
|
@@ -107,6 +114,11 @@ let CanvasElement = (() => {
|
|
|
107
114
|
this._e.height = this.pad_numeric(value, "");
|
|
108
115
|
return this;
|
|
109
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* Get or set the minimum canvas height (Safari shadow-canvas aware).
|
|
119
|
+
* @param value The minimum height value.
|
|
120
|
+
* @returns The current minimum height or this.
|
|
121
|
+
*/
|
|
110
122
|
min_height(value) {
|
|
111
123
|
if (this._e === undefined) {
|
|
112
124
|
return super.min_height(value);
|
|
@@ -117,6 +129,11 @@ let CanvasElement = (() => {
|
|
|
117
129
|
this._e.style.minHeight = this.pad_numeric(value, "px");
|
|
118
130
|
return this;
|
|
119
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Get or set the maximum canvas height (Safari shadow-canvas aware).
|
|
134
|
+
* @param value The maximum height value.
|
|
135
|
+
* @returns The current maximum height or this.
|
|
136
|
+
*/
|
|
120
137
|
max_height(value) {
|
|
121
138
|
if (this._e === undefined) {
|
|
122
139
|
return super.max_height(value);
|
|
@@ -127,6 +144,12 @@ let CanvasElement = (() => {
|
|
|
127
144
|
this._e.style.maxHeight = this.pad_numeric(value, "px");
|
|
128
145
|
return this;
|
|
129
146
|
}
|
|
147
|
+
/**
|
|
148
|
+
* Get or set the canvas width with Safari shadow-canvas support.
|
|
149
|
+
* @param value The width value.
|
|
150
|
+
* @param check_attribute When true, also update the element attribute.
|
|
151
|
+
* @returns The current width or this.
|
|
152
|
+
*/
|
|
130
153
|
width(value, check_attribute = true) {
|
|
131
154
|
if (this._e === undefined) {
|
|
132
155
|
return super.width(value, check_attribute);
|
|
@@ -139,6 +162,11 @@ let CanvasElement = (() => {
|
|
|
139
162
|
this._e.width = value;
|
|
140
163
|
return this;
|
|
141
164
|
}
|
|
165
|
+
/**
|
|
166
|
+
* Get or set the minimum canvas width (Safari shadow-canvas aware).
|
|
167
|
+
* @param value The minimum width value.
|
|
168
|
+
* @returns The current minimum width or this.
|
|
169
|
+
*/
|
|
142
170
|
min_width(value) {
|
|
143
171
|
if (this._e === undefined) {
|
|
144
172
|
return super.min_width(value);
|
|
@@ -149,6 +177,11 @@ let CanvasElement = (() => {
|
|
|
149
177
|
this._e.style.minWidth = this.pad_numeric(value, "px");
|
|
150
178
|
return this;
|
|
151
179
|
}
|
|
180
|
+
/**
|
|
181
|
+
* Get or set the maximum canvas width (Safari shadow-canvas aware).
|
|
182
|
+
* @param value The maximum width value.
|
|
183
|
+
* @returns The current maximum width or this.
|
|
184
|
+
*/
|
|
152
185
|
max_width(value) {
|
|
153
186
|
if (this._e === undefined) {
|
|
154
187
|
return super.max_width(value);
|
|
@@ -161,6 +194,12 @@ let CanvasElement = (() => {
|
|
|
161
194
|
}
|
|
162
195
|
// ---------------------------------------------------------
|
|
163
196
|
// Utility functions.
|
|
197
|
+
/**
|
|
198
|
+
* Get a rendering context for the canvas.
|
|
199
|
+
* In Safari, forwards to the shadow canvas element.
|
|
200
|
+
* @param args Arguments forwarded to `HTMLCanvasElement.getContext`.
|
|
201
|
+
* @returns The rendering context.
|
|
202
|
+
*/
|
|
164
203
|
getContext(...args) {
|
|
165
204
|
if (Utils.is_safari) {
|
|
166
205
|
return this._e.getContext(...args);
|
|
@@ -168,6 +207,14 @@ let CanvasElement = (() => {
|
|
|
168
207
|
// @ts-ignore
|
|
169
208
|
return super.getContext(...args);
|
|
170
209
|
}
|
|
210
|
+
/**
|
|
211
|
+
* Draw a smoothed path through the given points on the provided context.
|
|
212
|
+
* Uses a Catmull–Rom style bezier approximation controlled by `tension`.
|
|
213
|
+
* @param ctx Canvas 2D context.
|
|
214
|
+
* @param points Ordered list of points to draw through.
|
|
215
|
+
* @param tension Optional smoothing factor; 0 for straight segments.
|
|
216
|
+
* @returns this
|
|
217
|
+
*/
|
|
171
218
|
// Draw lines.
|
|
172
219
|
draw_lines(ctx, points = [], tension) {
|
|
173
220
|
ctx.beginPath();
|
|
@@ -192,6 +239,17 @@ let CanvasElement = (() => {
|
|
|
192
239
|
}
|
|
193
240
|
return this;
|
|
194
241
|
}
|
|
242
|
+
/**
|
|
243
|
+
* Create a canvas gradient from a `GradientType` definition.
|
|
244
|
+
* Supports linear and (placeholder) radial gradients.
|
|
245
|
+
* @param ctx Canvas 2D context.
|
|
246
|
+
* @param gradient The gradient definition (`GradientType`).
|
|
247
|
+
* @param start_x Start x coordinate.
|
|
248
|
+
* @param start_y Start y coordinate.
|
|
249
|
+
* @param end_x End x coordinate.
|
|
250
|
+
* @param end_y End y coordinate.
|
|
251
|
+
* @returns The created gradient or null when invalid.
|
|
252
|
+
*/
|
|
195
253
|
// Create gradient.
|
|
196
254
|
create_gradient(ctx, gradient, start_x, start_y, end_x, end_y) {
|
|
197
255
|
if (!(gradient instanceof GradientType)) {
|
|
@@ -227,38 +285,19 @@ let CanvasElement = (() => {
|
|
|
227
285
|
// ---------------------------------------------------------
|
|
228
286
|
// Functions.
|
|
229
287
|
// Create a line.
|
|
230
|
-
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
* @name: color
|
|
244
|
-
* @description: The line color.
|
|
245
|
-
* @parameter:
|
|
246
|
-
* @name: fill
|
|
247
|
-
* @description: The fill color, supports a `GradientType` class. leave `null` to ignore.
|
|
248
|
-
* @parameter:
|
|
249
|
-
* @name: scale
|
|
250
|
-
* @type: boolean
|
|
251
|
-
* @description: When enabled all x and y coordinates are treated as a 0.0 till 1.0 scale in relation to the canvas' width and height.
|
|
252
|
-
* @parameter:
|
|
253
|
-
* @name: dots
|
|
254
|
-
* @type: object
|
|
255
|
-
* @description:
|
|
256
|
-
* Place dots at each coordinate, leave `null` to ignore.
|
|
257
|
-
* Fields:
|
|
258
|
-
* ```{
|
|
259
|
-
* width: 0.01, // Dot width in pixels when `scale` is `false`, and dot width in percentage `{0.0,1.0}` when `scale` is `true`.
|
|
260
|
-
* color: "black", // Fill color.
|
|
261
|
-
* }```
|
|
288
|
+
/**
|
|
289
|
+
* Create a line, optionally curved and with custom styling.
|
|
290
|
+
* @returns Returns the `Canvas` object.
|
|
291
|
+
* @param points The line points, an array with objects with `x` and `y` values.
|
|
292
|
+
* @param tension The smoothness of the line, use `null` or `0` for a straight line and {0.0, 2.0} for a smooth line.
|
|
293
|
+
* @param color The line color.
|
|
294
|
+
* @param width The line width in pixels.
|
|
295
|
+
* @param fill The fill color, supports a `GradientType` class. leave `null` to ignore.
|
|
296
|
+
* @param scale When enabled all x and y coordinates are treated as a 0.0 till 1.0 scale in relation to the canvas' width and height.
|
|
297
|
+
* @param dots Place dots at each coordinate, leave `null` to ignore.
|
|
298
|
+
* @param dots.width Dot width in pixels when `scale` is `false`, and dot width in percentage `{0.0,1.0}` when `scale` is `true`.
|
|
299
|
+
* @param dots.color Fill color.
|
|
300
|
+
* @docs
|
|
262
301
|
*/
|
|
263
302
|
lines({ points, tension, color = "black", width, fill, scale = false, dots, }) {
|
|
264
303
|
// Create context.
|
|
@@ -283,7 +322,7 @@ let CanvasElement = (() => {
|
|
|
283
322
|
// ctx.beginPath();
|
|
284
323
|
// ctx.moveTo(points[0].x, points[0].y);
|
|
285
324
|
// for (let i = 1; i < points.length; i++) {
|
|
286
|
-
//
|
|
325
|
+
// ctx.lineTo(points[i].x, points[i].y);
|
|
287
326
|
// }
|
|
288
327
|
// Stroke style.
|
|
289
328
|
if (width != null) {
|
|
@@ -359,6 +398,10 @@ let CanvasElement = (() => {
|
|
|
359
398
|
return this;
|
|
360
399
|
}
|
|
361
400
|
// Remove all contexts.
|
|
401
|
+
/**
|
|
402
|
+
* Clear the entire canvas.
|
|
403
|
+
* @returns this
|
|
404
|
+
*/
|
|
362
405
|
// @ts-ignore
|
|
363
406
|
clear() {
|
|
364
407
|
this.ctx_2d.clearRect(0, 0, this.width, this.height);
|
|
@@ -399,13 +442,3 @@ export { CanvasElement };
|
|
|
399
442
|
;
|
|
400
443
|
export const Canvas = Elements.wrapper(CanvasElement);
|
|
401
444
|
export const NullCanvas = Elements.create_null(CanvasElement);
|
|
402
|
-
// function Canvas(...args) {
|
|
403
|
-
// if (Utils.is_safari) {
|
|
404
|
-
// const e = document.createElement(CanvasElement.element_tag, {is: "v-" + CanvasElement.name.toLowerCase()})
|
|
405
|
-
// console.log("E", e);
|
|
406
|
-
// e._init(...args);
|
|
407
|
-
// return e;
|
|
408
|
-
// } else {
|
|
409
|
-
// return new CanvasElement(...args);
|
|
410
|
-
// }
|
|
411
|
-
// }
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Daan van den Bergh
|
|
3
|
+
* @copyright © 2022 - 2025 Daan van den Bergh. All rights reserved
|
|
4
|
+
*/
|
|
5
|
+
import { VElementBaseSignature, ValueOrThis } from "../elements/module.js";
|
|
6
|
+
import { VStackElement, HStackElement } from "./stack.js";
|
|
7
|
+
import { TextElement } from "./text.js";
|
|
8
|
+
interface CircleExtension {
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
toggle(): this;
|
|
11
|
+
value(to?: boolean): this;
|
|
12
|
+
inner: VStackElement;
|
|
13
|
+
}
|
|
14
|
+
declare const CheckBoxElement_base: VElementBaseSignature;
|
|
15
|
+
export declare class CheckBoxElement extends CheckBoxElement_base {
|
|
16
|
+
/** Has error state. */
|
|
17
|
+
has_error: boolean;
|
|
18
|
+
_border_color: string;
|
|
19
|
+
_inner_bg: string;
|
|
20
|
+
_inner_bg_focused: string;
|
|
21
|
+
_focus_color: string;
|
|
22
|
+
_error_color: string;
|
|
23
|
+
_required: boolean;
|
|
24
|
+
_circle: VStackElement & CircleExtension;
|
|
25
|
+
text: TextElement;
|
|
26
|
+
container: HStackElement;
|
|
27
|
+
error_text: TextElement;
|
|
28
|
+
constructor(text_or_obj?: string | {
|
|
29
|
+
text: string;
|
|
30
|
+
required: boolean;
|
|
31
|
+
id?: string;
|
|
32
|
+
});
|
|
33
|
+
border_color(): string;
|
|
34
|
+
border_color(val: string): this;
|
|
35
|
+
inner_bg(): string;
|
|
36
|
+
inner_bg(val: string): this;
|
|
37
|
+
inner_bg_focused(): string;
|
|
38
|
+
inner_bg_focused(val: string): this;
|
|
39
|
+
styles(): Record<string, string>;
|
|
40
|
+
styles(style_dict: Record<string, any>): this;
|
|
41
|
+
set_default(): this;
|
|
42
|
+
toggle(): this;
|
|
43
|
+
value(): boolean;
|
|
44
|
+
value(to: boolean): this;
|
|
45
|
+
required(): boolean;
|
|
46
|
+
required(to: boolean): this;
|
|
47
|
+
focus_color(): string;
|
|
48
|
+
focus_color(val: string): this;
|
|
49
|
+
/** Set the missing color. */
|
|
50
|
+
error_color(): string;
|
|
51
|
+
error_color(val: string): this;
|
|
52
|
+
/**
|
|
53
|
+
* Set the error state and message.
|
|
54
|
+
* Providing a truthy value will enable the error state and return the current instance for chaining.
|
|
55
|
+
* Providing a falsy value will disable the error state and return the current instance for chaining.
|
|
56
|
+
* Providing no value will return the current error message or `undefined` when no error is set.
|
|
57
|
+
*/
|
|
58
|
+
error<V extends undefined | false | string = undefined>(err?: V): ValueOrThis<V, string | undefined, this>;
|
|
59
|
+
/** Remove the error state and mark as valid. */
|
|
60
|
+
valid(): this;
|
|
61
|
+
submit(): boolean;
|
|
62
|
+
}
|
|
63
|
+
export declare const CheckBox: <Extensions extends object = {}>(text_or_obj?: string | {
|
|
64
|
+
text: string;
|
|
65
|
+
required: boolean;
|
|
66
|
+
id?: string;
|
|
67
|
+
} | undefined) => CheckBoxElement & Extensions;
|
|
68
|
+
export declare const NullCheckBox: <Extensions extends object = {}>() => CheckBoxElement & Extensions;
|
|
69
|
+
declare module './any_element.d.ts' {
|
|
70
|
+
interface AnyElementMap {
|
|
71
|
+
CheckBoxElement: CheckBoxElement;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export {};
|