@vandenberghinc/volt 1.2.6 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (472) hide show
  1. package/.libris/config.json +82 -0
  2. package/backend/dist/cjs/backend/src/blacklist.d.ts +12 -0
  3. package/backend/dist/cjs/backend/src/blacklist.js +78 -0
  4. package/backend/dist/cjs/backend/src/cli.d.ts +2 -0
  5. package/backend/dist/cjs/backend/src/cli.js +198 -0
  6. package/backend/dist/cjs/backend/src/database/collection.d.ts +1765 -0
  7. package/backend/dist/cjs/backend/src/database/collection.js +3301 -0
  8. package/backend/dist/cjs/backend/src/database/database.d.ts +92 -0
  9. package/backend/dist/cjs/backend/src/database/database.js +170 -0
  10. package/backend/dist/cjs/backend/src/database/document.d.ts +1 -0
  11. package/backend/dist/cjs/backend/src/database/document.js +15 -0
  12. package/backend/dist/cjs/backend/src/database/filters/filters.d.ts +6 -0
  13. package/backend/dist/cjs/backend/src/database/filters/filters.js +15 -0
  14. package/backend/dist/cjs/backend/src/database/filters/strict_filter.d.ts +223 -0
  15. package/backend/dist/cjs/backend/src/database/filters/strict_filter.js +15 -0
  16. package/backend/dist/cjs/backend/src/database/filters/strict_filter_test.d.ts +1 -0
  17. package/backend/dist/cjs/backend/src/database/filters/strict_filter_test.js +443 -0
  18. package/backend/dist/cjs/backend/src/database/filters/strict_filter_test_v0.d.ts +1 -0
  19. package/backend/dist/cjs/backend/src/database/filters/strict_filter_test_v0.js +15 -0
  20. package/backend/dist/cjs/backend/src/database/filters/strict_filter_v0.d.ts +50 -0
  21. package/backend/dist/cjs/backend/src/database/filters/strict_filter_v0.js +15 -0
  22. package/backend/dist/cjs/backend/src/database/filters/strict_filter_v1.d.ts +76 -0
  23. package/backend/dist/cjs/backend/src/database/filters/strict_filter_v1.js +15 -0
  24. package/backend/dist/cjs/backend/src/database/filters/strict_filter_v2.d.ts +75 -0
  25. package/backend/dist/cjs/backend/src/database/filters/strict_filter_v2.js +15 -0
  26. package/backend/dist/cjs/backend/src/database/filters/strict_filter_v3.d.ts +219 -0
  27. package/backend/dist/cjs/backend/src/database/filters/strict_filter_v3.js +15 -0
  28. package/backend/dist/cjs/backend/src/database/filters/strict_update_filter.d.ts +165 -0
  29. package/backend/dist/cjs/backend/src/database/filters/strict_update_filter.js +15 -0
  30. package/backend/dist/cjs/backend/src/database/filters/strict_update_filter_test.d.ts +5 -0
  31. package/backend/dist/cjs/backend/src/database/filters/strict_update_filter_test.js +355 -0
  32. package/backend/dist/cjs/backend/src/database/flatten.d.ts +78 -0
  33. package/backend/dist/cjs/backend/src/database/flatten.js +53 -0
  34. package/backend/dist/cjs/backend/src/database/flatten_test.d.ts +1 -0
  35. package/backend/dist/cjs/backend/src/database/flatten_test.js +175 -0
  36. package/backend/dist/cjs/backend/src/database/quota/quoata_v2.d.ts +533 -0
  37. package/backend/dist/cjs/backend/src/database/quota/quoata_v2.js +1046 -0
  38. package/backend/dist/cjs/backend/src/database/quota/quota.d.ts +551 -0
  39. package/backend/dist/cjs/backend/src/database/quota/quota.js +1108 -0
  40. package/backend/dist/cjs/backend/src/database/quota/quota_v1.d.ts +534 -0
  41. package/backend/dist/cjs/backend/src/database/quota/quota_v1.js +1087 -0
  42. package/backend/dist/cjs/backend/src/database/quota/safe_int.d.ts +412 -0
  43. package/backend/dist/cjs/backend/src/database/quota/safe_int.js +745 -0
  44. package/backend/dist/cjs/backend/src/endpoint.d.ts +346 -0
  45. package/backend/dist/cjs/backend/src/endpoint.js +468 -0
  46. package/backend/dist/cjs/backend/src/errors/index.d.ts +7 -0
  47. package/backend/dist/cjs/backend/src/errors/index.js +25 -0
  48. package/backend/dist/cjs/backend/src/errors/internal_external.d.ts +52 -0
  49. package/backend/dist/cjs/backend/src/errors/internal_external.js +95 -0
  50. package/backend/dist/cjs/backend/src/errors/invalid_usage_error.d.ts +41 -0
  51. package/backend/dist/cjs/backend/src/errors/invalid_usage_error.js +47 -0
  52. package/backend/dist/cjs/backend/src/errors/system_error.d.ts +261 -0
  53. package/backend/dist/cjs/backend/src/errors/system_error.js +436 -0
  54. package/backend/dist/cjs/backend/src/events.d.ts +97 -0
  55. package/backend/dist/cjs/backend/src/events.js +15 -0
  56. package/backend/dist/cjs/backend/src/frontend.d.ts +13 -0
  57. package/backend/dist/cjs/backend/src/frontend.js +56 -0
  58. package/backend/dist/cjs/backend/src/image_endpoint.d.ts +44 -0
  59. package/backend/dist/cjs/backend/src/image_endpoint.js +185 -0
  60. package/backend/dist/cjs/backend/src/index.d.ts +23 -0
  61. package/backend/dist/cjs/backend/src/index.js +70 -0
  62. package/backend/dist/cjs/backend/src/logger.d.ts +5 -0
  63. package/backend/dist/cjs/backend/src/logger.js +15 -0
  64. package/backend/dist/cjs/backend/src/meta.d.ts +112 -0
  65. package/backend/dist/cjs/backend/src/meta.js +181 -0
  66. package/backend/dist/cjs/backend/src/payments/paddle.d.ts +329 -0
  67. package/backend/dist/cjs/backend/src/payments/paddle.js +1996 -0
  68. package/backend/dist/cjs/backend/src/payments/stripe/checkout.d.ts +113 -0
  69. package/backend/dist/cjs/backend/src/payments/stripe/checkout.js +295 -0
  70. package/backend/dist/cjs/backend/src/payments/stripe/customers.d.ts +17 -0
  71. package/backend/dist/cjs/backend/src/payments/stripe/customers.js +164 -0
  72. package/backend/dist/cjs/backend/src/payments/stripe/error.d.ts +74 -0
  73. package/backend/dist/cjs/backend/src/payments/stripe/error.js +64 -0
  74. package/backend/dist/cjs/backend/src/payments/stripe/events.d.ts +155 -0
  75. package/backend/dist/cjs/backend/src/payments/stripe/events.js +15 -0
  76. package/backend/dist/cjs/backend/src/payments/stripe/meters.d.ts +105 -0
  77. package/backend/dist/cjs/backend/src/payments/stripe/meters.js +230 -0
  78. package/backend/dist/cjs/backend/src/payments/stripe/payment_methods.d.ts +58 -0
  79. package/backend/dist/cjs/backend/src/payments/stripe/payment_methods.js +109 -0
  80. package/backend/dist/cjs/backend/src/payments/stripe/products.d.ts +519 -0
  81. package/backend/dist/cjs/backend/src/payments/stripe/products.js +650 -0
  82. package/backend/dist/cjs/backend/src/payments/stripe/stripe.d.ts +215 -0
  83. package/backend/dist/cjs/backend/src/payments/stripe/stripe.js +468 -0
  84. package/backend/dist/cjs/backend/src/payments/stripe/subscriptions.d.ts +172 -0
  85. package/backend/dist/cjs/backend/src/payments/stripe/subscriptions.js +557 -0
  86. package/backend/dist/cjs/backend/src/payments/stripe/utils.d.ts +63 -0
  87. package/backend/dist/cjs/backend/src/payments/stripe/utils.js +118 -0
  88. package/backend/dist/cjs/backend/src/payments/stripe/webhooks.d.ts +105 -0
  89. package/backend/dist/cjs/backend/src/payments/stripe/webhooks.js +627 -0
  90. package/backend/dist/cjs/backend/src/plugins/browser.d.ts +1 -0
  91. package/backend/dist/cjs/backend/src/plugins/browser.js +15 -0
  92. package/backend/dist/cjs/backend/src/plugins/communication.d.ts +70 -0
  93. package/backend/dist/cjs/backend/src/plugins/communication.js +196 -0
  94. package/backend/dist/cjs/backend/src/plugins/mail/mail.d.ts +255 -0
  95. package/backend/dist/cjs/backend/src/plugins/mail/mail.js +381 -0
  96. package/backend/dist/cjs/backend/src/plugins/mail/ui.d.ts +297 -0
  97. package/backend/dist/cjs/backend/src/plugins/mail/ui.js +1370 -0
  98. package/backend/dist/cjs/backend/src/plugins/pdf.d.ts +1 -0
  99. package/backend/dist/cjs/backend/src/plugins/pdf.js +1456 -0
  100. package/backend/dist/cjs/backend/src/plugins/thread_monitor.d.ts +18 -0
  101. package/backend/dist/cjs/backend/src/plugins/thread_monitor.js +116 -0
  102. package/backend/dist/cjs/backend/src/rate_limit.d.ts +148 -0
  103. package/backend/dist/cjs/backend/src/rate_limit.js +543 -0
  104. package/backend/dist/cjs/backend/src/route.d.ts +39 -0
  105. package/backend/dist/cjs/backend/src/route.js +172 -0
  106. package/backend/dist/cjs/backend/src/server.d.ts +502 -0
  107. package/backend/dist/cjs/backend/src/server.js +1710 -0
  108. package/backend/dist/cjs/backend/src/server.old.d.ts +594 -0
  109. package/backend/dist/cjs/backend/src/server.old.js +2058 -0
  110. package/backend/dist/cjs/backend/src/splash_screen.d.ts +93 -0
  111. package/backend/dist/cjs/backend/src/splash_screen.js +119 -0
  112. package/backend/dist/cjs/backend/src/status.d.ts +89 -0
  113. package/backend/dist/cjs/backend/src/status.js +211 -0
  114. package/backend/dist/cjs/backend/src/stream.d.ts +494 -0
  115. package/backend/dist/cjs/backend/src/stream.js +1370 -0
  116. package/backend/dist/cjs/backend/src/users.d.ts +926 -0
  117. package/backend/dist/cjs/backend/src/users.js +2223 -0
  118. package/backend/dist/cjs/backend/src/utils.d.ts +22 -0
  119. package/backend/dist/cjs/backend/src/utils.js +626 -0
  120. package/backend/dist/cjs/backend/src/view.d.ts +115 -0
  121. package/backend/dist/cjs/backend/src/view.js +519 -0
  122. package/backend/dist/cjs/backend/src/vinc.d.ts +6 -0
  123. package/backend/dist/cjs/backend/src/vinc.js +40 -0
  124. package/backend/dist/cjs/backend/src/volt.d.ts +24 -0
  125. package/backend/dist/cjs/backend/src/volt.js +72 -0
  126. package/backend/dist/cjs/frontend/src/modules/request.d.ts +70 -0
  127. package/backend/dist/cjs/frontend/src/modules/request.js +99 -0
  128. package/backend/dist/cjs/package.json +1 -0
  129. package/backend/dist/esm/backend/src/blacklist.d.ts +12 -0
  130. package/backend/dist/esm/backend/src/blacklist.js +52 -0
  131. package/backend/dist/esm/backend/src/cli.d.ts +2 -0
  132. package/backend/dist/esm/backend/src/cli.js +211 -0
  133. package/backend/dist/esm/backend/src/database/collection.d.ts +1765 -0
  134. package/backend/dist/esm/backend/src/database/collection.js +3779 -0
  135. package/backend/dist/esm/backend/src/database/database.d.ts +92 -0
  136. package/backend/dist/esm/backend/src/database/database.js +214 -0
  137. package/backend/dist/esm/backend/src/database/document.d.ts +1 -0
  138. package/backend/dist/esm/backend/src/database/document.js +558 -0
  139. package/backend/dist/esm/backend/src/database/filters/filters.d.ts +6 -0
  140. package/backend/dist/esm/backend/src/database/filters/filters.js +1 -0
  141. package/backend/dist/esm/backend/src/database/filters/strict_filter.d.ts +223 -0
  142. package/backend/dist/esm/backend/src/database/filters/strict_filter.js +3 -0
  143. package/backend/dist/esm/backend/src/database/filters/strict_filter_test.d.ts +1 -0
  144. package/backend/dist/esm/backend/src/database/filters/strict_filter_test.js +505 -0
  145. package/backend/dist/esm/backend/src/database/filters/strict_filter_test_v0.d.ts +1 -0
  146. package/backend/dist/esm/backend/src/database/filters/strict_filter_test_v0.js +712 -0
  147. package/backend/dist/esm/backend/src/database/filters/strict_filter_v0.d.ts +50 -0
  148. package/backend/dist/esm/backend/src/database/filters/strict_filter_v0.js +5 -0
  149. package/backend/dist/esm/backend/src/database/filters/strict_filter_v1.d.ts +76 -0
  150. package/backend/dist/esm/backend/src/database/filters/strict_filter_v1.js +44 -0
  151. package/backend/dist/esm/backend/src/database/filters/strict_filter_v2.d.ts +75 -0
  152. package/backend/dist/esm/backend/src/database/filters/strict_filter_v2.js +5 -0
  153. package/backend/dist/esm/backend/src/database/filters/strict_filter_v3.d.ts +219 -0
  154. package/backend/dist/esm/backend/src/database/filters/strict_filter_v3.js +1 -0
  155. package/backend/dist/esm/backend/src/database/filters/strict_update_filter.d.ts +165 -0
  156. package/backend/dist/esm/backend/src/database/filters/strict_update_filter.js +5 -0
  157. package/backend/dist/esm/backend/src/database/filters/strict_update_filter_test.d.ts +5 -0
  158. package/backend/dist/esm/backend/src/database/filters/strict_update_filter_test.js +415 -0
  159. package/backend/dist/esm/backend/src/database/flatten.d.ts +78 -0
  160. package/backend/dist/esm/backend/src/database/flatten.js +22 -0
  161. package/backend/dist/esm/backend/src/database/flatten_test.d.ts +1 -0
  162. package/backend/dist/esm/backend/src/database/flatten_test.js +174 -0
  163. package/backend/dist/esm/backend/src/database/quota/quoata_v2.d.ts +533 -0
  164. package/backend/dist/esm/backend/src/database/quota/quoata_v2.js +1155 -0
  165. package/backend/dist/esm/backend/src/database/quota/quota.d.ts +551 -0
  166. package/backend/dist/esm/backend/src/database/quota/quota.js +1219 -0
  167. package/backend/dist/esm/backend/src/database/quota/quota_v1.d.ts +534 -0
  168. package/backend/dist/esm/backend/src/database/quota/quota_v1.js +1242 -0
  169. package/backend/dist/esm/backend/src/database/quota/safe_int.d.ts +412 -0
  170. package/backend/dist/esm/backend/src/database/quota/safe_int.js +810 -0
  171. package/backend/dist/esm/backend/src/endpoint.d.ts +346 -0
  172. package/backend/dist/esm/backend/src/endpoint.js +479 -0
  173. package/backend/dist/esm/backend/src/errors/index.d.ts +7 -0
  174. package/backend/dist/esm/backend/src/errors/index.js +7 -0
  175. package/backend/dist/esm/backend/src/errors/internal_external.d.ts +52 -0
  176. package/backend/dist/esm/backend/src/errors/internal_external.js +86 -0
  177. package/backend/dist/esm/backend/src/errors/invalid_usage_error.d.ts +41 -0
  178. package/backend/dist/esm/backend/src/errors/invalid_usage_error.js +33 -0
  179. package/backend/dist/esm/backend/src/errors/system_error.d.ts +261 -0
  180. package/backend/dist/esm/backend/src/errors/system_error.js +444 -0
  181. package/backend/dist/esm/backend/src/events.d.ts +97 -0
  182. package/backend/dist/esm/backend/src/events.js +5 -0
  183. package/backend/dist/esm/backend/src/frontend.d.ts +13 -0
  184. package/backend/dist/esm/backend/src/frontend.js +23 -0
  185. package/backend/dist/esm/backend/src/image_endpoint.d.ts +44 -0
  186. package/backend/dist/esm/backend/src/image_endpoint.js +196 -0
  187. package/backend/dist/esm/backend/src/index.d.ts +23 -0
  188. package/backend/dist/esm/backend/src/index.js +26 -0
  189. package/backend/dist/esm/backend/src/logger.d.ts +5 -0
  190. package/backend/dist/esm/backend/src/logger.js +8 -0
  191. package/backend/dist/esm/backend/src/meta.d.ts +112 -0
  192. package/backend/dist/esm/backend/src/meta.js +152 -0
  193. package/backend/dist/esm/backend/src/payments/paddle.d.ts +329 -0
  194. package/backend/dist/esm/backend/src/payments/paddle.js +2276 -0
  195. package/backend/dist/esm/backend/src/payments/stripe/checkout.d.ts +113 -0
  196. package/backend/dist/esm/backend/src/payments/stripe/checkout.js +356 -0
  197. package/backend/dist/esm/backend/src/payments/stripe/customers.d.ts +17 -0
  198. package/backend/dist/esm/backend/src/payments/stripe/customers.js +193 -0
  199. package/backend/dist/esm/backend/src/payments/stripe/error.d.ts +74 -0
  200. package/backend/dist/esm/backend/src/payments/stripe/error.js +51 -0
  201. package/backend/dist/esm/backend/src/payments/stripe/events.d.ts +155 -0
  202. package/backend/dist/esm/backend/src/payments/stripe/events.js +5 -0
  203. package/backend/dist/esm/backend/src/payments/stripe/meters.d.ts +105 -0
  204. package/backend/dist/esm/backend/src/payments/stripe/meters.js +318 -0
  205. package/backend/dist/esm/backend/src/payments/stripe/payment_methods.d.ts +58 -0
  206. package/backend/dist/esm/backend/src/payments/stripe/payment_methods.js +135 -0
  207. package/backend/dist/esm/backend/src/payments/stripe/products.d.ts +519 -0
  208. package/backend/dist/esm/backend/src/payments/stripe/products.js +896 -0
  209. package/backend/dist/esm/backend/src/payments/stripe/stripe.d.ts +215 -0
  210. package/backend/dist/esm/backend/src/payments/stripe/stripe.js +464 -0
  211. package/backend/dist/esm/backend/src/payments/stripe/subscriptions.d.ts +172 -0
  212. package/backend/dist/esm/backend/src/payments/stripe/subscriptions.js +754 -0
  213. package/backend/dist/esm/backend/src/payments/stripe/utils.d.ts +63 -0
  214. package/backend/dist/esm/backend/src/payments/stripe/utils.js +131 -0
  215. package/backend/dist/esm/backend/src/payments/stripe/webhooks.d.ts +105 -0
  216. package/backend/dist/esm/backend/src/payments/stripe/webhooks.js +752 -0
  217. package/backend/dist/esm/backend/src/plugins/browser.d.ts +1 -0
  218. package/backend/dist/esm/backend/src/plugins/browser.js +170 -0
  219. package/backend/dist/esm/backend/src/plugins/communication.d.ts +70 -0
  220. package/backend/dist/esm/backend/src/plugins/communication.js +169 -0
  221. package/backend/dist/esm/backend/src/plugins/mail/mail.d.ts +255 -0
  222. package/backend/dist/esm/backend/src/plugins/mail/mail.js +396 -0
  223. package/backend/dist/esm/backend/src/plugins/mail/ui.d.ts +297 -0
  224. package/backend/dist/esm/backend/src/plugins/mail/ui.js +1400 -0
  225. package/backend/dist/esm/backend/src/plugins/pdf.d.ts +1 -0
  226. package/backend/dist/esm/backend/src/plugins/pdf.js +1694 -0
  227. package/backend/dist/esm/backend/src/plugins/thread_monitor.d.ts +18 -0
  228. package/backend/dist/esm/backend/src/plugins/thread_monitor.js +120 -0
  229. package/backend/dist/esm/backend/src/rate_limit.d.ts +148 -0
  230. package/backend/dist/esm/backend/src/rate_limit.js +667 -0
  231. package/backend/dist/esm/backend/src/route.d.ts +39 -0
  232. package/backend/dist/esm/backend/src/route.js +222 -0
  233. package/backend/dist/esm/backend/src/server.d.ts +502 -0
  234. package/backend/dist/esm/backend/src/server.js +2031 -0
  235. package/backend/dist/esm/backend/src/server.old.d.ts +594 -0
  236. package/backend/dist/esm/backend/src/server.old.js +2630 -0
  237. package/backend/dist/esm/backend/src/splash_screen.d.ts +93 -0
  238. package/backend/dist/esm/backend/src/splash_screen.js +156 -0
  239. package/backend/dist/esm/backend/src/status.d.ts +89 -0
  240. package/backend/dist/esm/backend/src/status.js +213 -0
  241. package/backend/dist/esm/backend/src/stream.d.ts +494 -0
  242. package/backend/dist/esm/backend/src/stream.js +1611 -0
  243. package/backend/dist/esm/backend/src/users.d.ts +926 -0
  244. package/backend/dist/esm/backend/src/users.js +2423 -0
  245. package/backend/dist/esm/backend/src/utils.d.ts +22 -0
  246. package/backend/dist/esm/backend/src/utils.js +463 -0
  247. package/backend/dist/esm/backend/src/view.d.ts +115 -0
  248. package/backend/dist/esm/backend/src/view.js +584 -0
  249. package/backend/dist/esm/backend/src/vinc.d.ts +6 -0
  250. package/backend/dist/esm/backend/src/vinc.js +6 -0
  251. package/backend/dist/esm/backend/src/volt.d.ts +24 -0
  252. package/backend/dist/esm/backend/src/volt.js +27 -0
  253. package/backend/dist/esm/frontend/src/modules/request.d.ts +70 -0
  254. package/backend/dist/esm/frontend/src/modules/request.js +117 -0
  255. package/backend/old/file_watcher.ts +359 -0
  256. package/backend/old/request.deprc.js +626 -0
  257. package/backend/old/response.deprc.js +354 -0
  258. package/frontend/dist/backend/src/database/collection.d.ts +1765 -0
  259. package/frontend/dist/backend/src/database/collection.js +3779 -0
  260. package/frontend/dist/backend/src/database/database.d.ts +92 -0
  261. package/frontend/dist/backend/src/database/database.js +214 -0
  262. package/frontend/dist/backend/src/database/filters/filters.d.ts +6 -0
  263. package/frontend/dist/backend/src/database/filters/filters.js +1 -0
  264. package/frontend/dist/backend/src/database/filters/strict_filter.d.ts +223 -0
  265. package/frontend/dist/backend/src/database/filters/strict_filter.js +3 -0
  266. package/frontend/dist/backend/src/database/filters/strict_update_filter.d.ts +165 -0
  267. package/frontend/dist/backend/src/database/filters/strict_update_filter.js +5 -0
  268. package/frontend/dist/backend/src/database/flatten.d.ts +78 -0
  269. package/frontend/dist/backend/src/database/flatten.js +22 -0
  270. package/frontend/dist/backend/src/endpoint.d.ts +346 -0
  271. package/frontend/dist/backend/src/endpoint.js +479 -0
  272. package/frontend/dist/backend/src/errors/index.d.ts +7 -0
  273. package/frontend/dist/backend/src/errors/index.js +7 -0
  274. package/frontend/dist/backend/src/errors/internal_external.d.ts +52 -0
  275. package/frontend/dist/backend/src/errors/internal_external.js +86 -0
  276. package/frontend/dist/backend/src/errors/invalid_usage_error.d.ts +41 -0
  277. package/frontend/dist/backend/src/errors/invalid_usage_error.js +33 -0
  278. package/frontend/dist/backend/src/errors/system_error.d.ts +261 -0
  279. package/frontend/dist/backend/src/errors/system_error.js +444 -0
  280. package/frontend/dist/backend/src/events.d.ts +97 -0
  281. package/frontend/dist/backend/src/events.js +5 -0
  282. package/frontend/dist/backend/src/frontend.d.ts +13 -0
  283. package/frontend/dist/backend/src/frontend.js +23 -0
  284. package/frontend/dist/backend/src/image_endpoint.d.ts +44 -0
  285. package/frontend/dist/backend/src/image_endpoint.js +196 -0
  286. package/frontend/dist/backend/src/meta.d.ts +112 -0
  287. package/frontend/dist/backend/src/meta.js +152 -0
  288. package/frontend/dist/backend/src/payments/paddle.d.ts +329 -0
  289. package/frontend/dist/backend/src/payments/paddle.js +2276 -0
  290. package/frontend/dist/backend/src/payments/stripe/checkout.d.ts +113 -0
  291. package/frontend/dist/backend/src/payments/stripe/checkout.js +356 -0
  292. package/frontend/dist/backend/src/payments/stripe/customers.d.ts +17 -0
  293. package/frontend/dist/backend/src/payments/stripe/customers.js +193 -0
  294. package/frontend/dist/backend/src/payments/stripe/error.d.ts +74 -0
  295. package/frontend/dist/backend/src/payments/stripe/error.js +51 -0
  296. package/frontend/dist/backend/src/payments/stripe/events.d.ts +155 -0
  297. package/frontend/dist/backend/src/payments/stripe/events.js +5 -0
  298. package/frontend/dist/backend/src/payments/stripe/meters.d.ts +105 -0
  299. package/frontend/dist/backend/src/payments/stripe/meters.js +318 -0
  300. package/frontend/dist/backend/src/payments/stripe/payment_methods.d.ts +58 -0
  301. package/frontend/dist/backend/src/payments/stripe/payment_methods.js +135 -0
  302. package/frontend/dist/backend/src/payments/stripe/products.d.ts +519 -0
  303. package/frontend/dist/backend/src/payments/stripe/products.js +896 -0
  304. package/frontend/dist/backend/src/payments/stripe/stripe.d.ts +215 -0
  305. package/frontend/dist/backend/src/payments/stripe/stripe.js +464 -0
  306. package/frontend/dist/backend/src/payments/stripe/subscriptions.d.ts +172 -0
  307. package/frontend/dist/backend/src/payments/stripe/subscriptions.js +754 -0
  308. package/frontend/dist/backend/src/payments/stripe/utils.d.ts +63 -0
  309. package/frontend/dist/backend/src/payments/stripe/utils.js +131 -0
  310. package/frontend/dist/backend/src/payments/stripe/webhooks.d.ts +105 -0
  311. package/frontend/dist/backend/src/payments/stripe/webhooks.js +752 -0
  312. package/frontend/dist/backend/src/plugins/mail/mail.d.ts +255 -0
  313. package/frontend/dist/backend/src/plugins/mail/mail.js +396 -0
  314. package/frontend/dist/backend/src/plugins/mail/ui.d.ts +297 -0
  315. package/frontend/dist/backend/src/plugins/mail/ui.js +1400 -0
  316. package/frontend/dist/backend/src/rate_limit.d.ts +148 -0
  317. package/frontend/dist/backend/src/rate_limit.js +667 -0
  318. package/frontend/dist/backend/src/route.d.ts +39 -0
  319. package/frontend/dist/backend/src/route.js +222 -0
  320. package/frontend/dist/backend/src/server.d.ts +502 -0
  321. package/frontend/dist/backend/src/server.js +2031 -0
  322. package/frontend/dist/backend/src/splash_screen.d.ts +93 -0
  323. package/frontend/dist/backend/src/splash_screen.js +156 -0
  324. package/frontend/dist/backend/src/status.d.ts +89 -0
  325. package/frontend/dist/backend/src/status.js +213 -0
  326. package/frontend/dist/backend/src/stream.d.ts +494 -0
  327. package/frontend/dist/backend/src/stream.js +1611 -0
  328. package/frontend/dist/backend/src/users.d.ts +926 -0
  329. package/frontend/dist/backend/src/users.js +2423 -0
  330. package/frontend/dist/backend/src/utils.d.ts +22 -0
  331. package/frontend/dist/backend/src/utils.js +463 -0
  332. package/frontend/dist/backend/src/view.d.ts +115 -0
  333. package/frontend/dist/backend/src/view.js +584 -0
  334. package/frontend/dist/frontend/src/css/adyen.css +92 -0
  335. package/frontend/dist/frontend/src/css/volt.css +75 -0
  336. package/frontend/dist/frontend/src/elements/base.d.ts +3743 -0
  337. package/frontend/dist/frontend/src/elements/base.js +12151 -0
  338. package/frontend/dist/frontend/src/elements/module.d.ts +95 -0
  339. package/frontend/dist/frontend/src/elements/module.js +216 -0
  340. package/frontend/dist/frontend/src/elements/register_element.d.ts +3 -0
  341. package/frontend/dist/frontend/src/elements/register_element.js +22 -0
  342. package/frontend/dist/frontend/src/elements/resize_query_manager.d.ts +0 -0
  343. package/frontend/dist/frontend/src/elements/resize_query_manager.js +150 -0
  344. package/frontend/dist/frontend/src/elements/types.d.ts +52 -0
  345. package/frontend/dist/frontend/src/elements/types.js +5 -0
  346. package/frontend/dist/frontend/src/index.d.ts +21 -0
  347. package/frontend/dist/frontend/src/index.js +29 -0
  348. package/frontend/dist/frontend/src/modules/attachment.d.ts +126 -0
  349. package/frontend/dist/frontend/src/modules/attachment.js +306 -0
  350. package/frontend/dist/frontend/src/modules/auth.d.ts +44 -0
  351. package/frontend/dist/frontend/src/modules/auth.js +80 -0
  352. package/frontend/dist/frontend/src/modules/color.d.ts +160 -0
  353. package/frontend/dist/frontend/src/modules/color.js +316 -0
  354. package/frontend/dist/frontend/src/modules/compression.d.ts +39 -0
  355. package/frontend/dist/frontend/src/modules/compression.js +102 -0
  356. package/frontend/dist/frontend/src/modules/cookies.d.ts +44 -0
  357. package/frontend/dist/frontend/src/modules/cookies.js +143 -0
  358. package/frontend/dist/frontend/src/modules/events.d.ts +31 -0
  359. package/frontend/dist/frontend/src/modules/events.js +79 -0
  360. package/frontend/dist/frontend/src/modules/google.d.ts +23 -0
  361. package/frontend/dist/frontend/src/modules/google.js +52 -0
  362. package/frontend/dist/frontend/src/modules/meta.d.ts +14 -0
  363. package/frontend/dist/frontend/src/modules/meta.js +48 -0
  364. package/frontend/dist/frontend/src/modules/paddle.d.ts +1207 -0
  365. package/frontend/dist/frontend/src/modules/paddle.js +2594 -0
  366. package/frontend/dist/frontend/src/modules/request.d.ts +70 -0
  367. package/frontend/dist/frontend/src/modules/request.js +117 -0
  368. package/frontend/dist/frontend/src/modules/settings.d.ts +3 -0
  369. package/frontend/dist/frontend/src/modules/settings.js +5 -0
  370. package/frontend/dist/frontend/src/modules/statics.d.ts +21 -0
  371. package/frontend/dist/frontend/src/modules/statics.js +43 -0
  372. package/frontend/dist/frontend/src/modules/stripe/cart.d.ts +112 -0
  373. package/frontend/dist/frontend/src/modules/stripe/cart.js +321 -0
  374. package/frontend/dist/frontend/src/modules/stripe/checkout.d.ts +7 -0
  375. package/frontend/dist/frontend/src/modules/stripe/checkout.js +37 -0
  376. package/frontend/dist/frontend/src/modules/stripe/index.m.d.ts +6 -0
  377. package/frontend/dist/frontend/src/modules/stripe/index.m.js +6 -0
  378. package/frontend/dist/frontend/src/modules/stripe/payments.d.ts +58 -0
  379. package/frontend/dist/frontend/src/modules/stripe/payments.js +92 -0
  380. package/frontend/dist/frontend/src/modules/support.d.ts +30 -0
  381. package/frontend/dist/frontend/src/modules/support.js +53 -0
  382. package/frontend/dist/frontend/src/modules/theme.d.ts +133 -0
  383. package/frontend/dist/frontend/src/modules/theme.js +406 -0
  384. package/frontend/dist/frontend/src/modules/themes.d.ts +12 -0
  385. package/frontend/dist/frontend/src/modules/themes.js +22 -0
  386. package/frontend/dist/frontend/src/modules/user.d.ts +164 -0
  387. package/frontend/dist/frontend/src/modules/user.js +270 -0
  388. package/frontend/dist/frontend/src/modules/utils.d.ts +176 -0
  389. package/frontend/dist/frontend/src/modules/utils.js +569 -0
  390. package/frontend/dist/frontend/src/types/gradient.d.ts +29 -0
  391. package/frontend/dist/frontend/src/types/gradient.js +79 -0
  392. package/frontend/dist/frontend/src/ui/border_button.d.ts +94 -0
  393. package/frontend/dist/frontend/src/ui/border_button.js +228 -0
  394. package/frontend/dist/frontend/src/ui/button.d.ts +241 -0
  395. package/frontend/dist/frontend/src/ui/button.js +682 -0
  396. package/frontend/dist/frontend/src/ui/canvas.d.ts +138 -0
  397. package/frontend/dist/frontend/src/ui/canvas.js +444 -0
  398. package/frontend/dist/frontend/src/ui/checkbox.d.ts +74 -0
  399. package/frontend/dist/frontend/src/ui/checkbox.js +321 -0
  400. package/frontend/dist/frontend/src/ui/code.d.ts +235 -0
  401. package/frontend/dist/frontend/src/ui/code.js +1007 -0
  402. package/frontend/dist/frontend/src/ui/context_menu.d.ts +36 -0
  403. package/frontend/dist/frontend/src/ui/context_menu.js +205 -0
  404. package/frontend/dist/frontend/src/ui/css.d.ts +16 -0
  405. package/frontend/dist/frontend/src/ui/css.js +48 -0
  406. package/frontend/dist/frontend/src/ui/divider.d.ts +15 -0
  407. package/frontend/dist/frontend/src/ui/divider.js +78 -0
  408. package/frontend/dist/frontend/src/ui/dropdown.d.ts +176 -0
  409. package/frontend/dist/frontend/src/ui/dropdown.js +481 -0
  410. package/frontend/dist/frontend/src/ui/for_each.d.ts +37 -0
  411. package/frontend/dist/frontend/src/ui/for_each.js +92 -0
  412. package/frontend/dist/frontend/src/ui/form.d.ts +34 -0
  413. package/frontend/dist/frontend/src/ui/form.js +233 -0
  414. package/frontend/dist/frontend/src/ui/frame_modes.d.ts +37 -0
  415. package/frontend/dist/frontend/src/ui/frame_modes.js +108 -0
  416. package/frontend/dist/frontend/src/ui/google_map.d.ts +24 -0
  417. package/frontend/dist/frontend/src/ui/google_map.js +106 -0
  418. package/frontend/dist/frontend/src/ui/gradient.d.ts +25 -0
  419. package/frontend/dist/frontend/src/ui/gradient.js +131 -0
  420. package/frontend/dist/frontend/src/ui/image.d.ts +111 -0
  421. package/frontend/dist/frontend/src/ui/image.js +576 -0
  422. package/frontend/dist/frontend/src/ui/input.d.ts +392 -0
  423. package/frontend/dist/frontend/src/ui/input.js +1201 -0
  424. package/frontend/dist/frontend/src/ui/link.d.ts +25 -0
  425. package/frontend/dist/frontend/src/ui/link.js +140 -0
  426. package/frontend/dist/frontend/src/ui/list.d.ts +37 -0
  427. package/frontend/dist/frontend/src/ui/list.js +170 -0
  428. package/frontend/dist/frontend/src/ui/loader_button.d.ts +80 -0
  429. package/frontend/dist/frontend/src/ui/loader_button.js +193 -0
  430. package/frontend/dist/frontend/src/ui/loaders.d.ts +57 -0
  431. package/frontend/dist/frontend/src/ui/loaders.js +157 -0
  432. package/frontend/dist/frontend/src/ui/popup.d.ts +94 -0
  433. package/frontend/dist/frontend/src/ui/popup.js +510 -0
  434. package/frontend/dist/frontend/src/ui/pseudo.d.ts +44 -0
  435. package/frontend/dist/frontend/src/ui/pseudo.js +154 -0
  436. package/frontend/dist/frontend/src/ui/scroller.d.ts +105 -0
  437. package/frontend/dist/frontend/src/ui/scroller.js +1253 -0
  438. package/frontend/dist/frontend/src/ui/slider.d.ts +45 -0
  439. package/frontend/dist/frontend/src/ui/slider.js +217 -0
  440. package/frontend/dist/frontend/src/ui/spacer.d.ts +15 -0
  441. package/frontend/dist/frontend/src/ui/spacer.js +78 -0
  442. package/frontend/dist/frontend/src/ui/span.d.ts +15 -0
  443. package/frontend/dist/frontend/src/ui/span.js +73 -0
  444. package/frontend/dist/frontend/src/ui/stack.d.ts +66 -0
  445. package/frontend/dist/frontend/src/ui/stack.js +335 -0
  446. package/frontend/dist/frontend/src/ui/steps.d.ts +131 -0
  447. package/frontend/dist/frontend/src/ui/steps.js +308 -0
  448. package/frontend/dist/frontend/src/ui/style.d.ts +17 -0
  449. package/frontend/dist/frontend/src/ui/style.js +73 -0
  450. package/frontend/dist/frontend/src/ui/switch.d.ts +69 -0
  451. package/frontend/dist/frontend/src/ui/switch.js +357 -0
  452. package/frontend/dist/frontend/src/ui/table.d.ts +100 -0
  453. package/frontend/dist/frontend/src/ui/table.js +405 -0
  454. package/frontend/dist/frontend/src/ui/tabs.d.ts +111 -0
  455. package/frontend/dist/frontend/src/ui/tabs.js +424 -0
  456. package/frontend/dist/frontend/src/ui/text.d.ts +15 -0
  457. package/frontend/dist/frontend/src/ui/text.js +83 -0
  458. package/frontend/dist/frontend/src/ui/title.d.ts +91 -0
  459. package/frontend/dist/frontend/src/ui/title.js +272 -0
  460. package/frontend/dist/frontend/src/ui/ui.d.ts +35 -0
  461. package/frontend/dist/frontend/src/ui/ui.js +38 -0
  462. package/frontend/dist/frontend/src/ui/view.d.ts +15 -0
  463. package/frontend/dist/frontend/src/ui/view.js +88 -0
  464. package/frontend/dist/frontend/src/volt.d.ts +20 -0
  465. package/frontend/dist/frontend/src/volt.js +27 -0
  466. package/frontend/examples/theme/theme.ts +58 -0
  467. package/frontend/tools/bundle_d_ts.js +71 -0
  468. package/frontend/tools/convert_to_jsdoc_input.txt +9452 -0
  469. package/frontend/tools/convert_to_jsdoc_output.txt +7626 -0
  470. package/frontend/tools/convert_to_jsdoc_tmp.js +345 -0
  471. package/frontend/tools/scan_mixed_imports.js +69 -0
  472. package/package.json +1 -5
@@ -0,0 +1,1370 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var stdin_exports = {};
19
+ __export(stdin_exports, {
20
+ CSS: () => CSS,
21
+ CSSElement: () => CSSElement,
22
+ Divider: () => Divider,
23
+ DividerElement: () => DividerElement,
24
+ Element: () => Element,
25
+ Image: () => Image,
26
+ ImageElement: () => ImageElement,
27
+ ImageMask: () => ImageMask,
28
+ ImageMaskElement: () => ImageMaskElement,
29
+ Mail: () => Mail,
30
+ MailElement: () => MailElement,
31
+ NullCSSElement: () => NullCSSElement,
32
+ NullDividerElement: () => NullDividerElement,
33
+ NullImageElement: () => NullImageElement,
34
+ NullImageMaskElement: () => NullImageMaskElement,
35
+ NullMailElement: () => NullMailElement,
36
+ NullSubtitle: () => NullSubtitle,
37
+ NullTableDataElement: () => NullTableDataElement,
38
+ NullTableElement: () => NullTableElement,
39
+ NullTableRowElement: () => NullTableRowElement,
40
+ NullText: () => NullText,
41
+ NullTitle: () => NullTitle,
42
+ NullVStackElement: () => NullVStackElement,
43
+ Subtitle: () => Subtitle,
44
+ SubtitleElement: () => SubtitleElement,
45
+ Table: () => Table,
46
+ TableData: () => TableData,
47
+ TableDataElement: () => TableDataElement,
48
+ TableElement: () => TableElement,
49
+ TableRow: () => TableRow,
50
+ TableRowElement: () => TableRowElement,
51
+ Text: () => Text,
52
+ TextElement: () => TextElement,
53
+ Title: () => Title,
54
+ TitleElement: () => TitleElement,
55
+ VStack: () => VStack,
56
+ VStackElement: () => VStackElement
57
+ });
58
+ module.exports = __toCommonJS(stdin_exports);
59
+ class Element {
60
+ // ---------------------------------------------------------
61
+ // Attributes.
62
+ // static element_tag: string = tag; // must remain static.
63
+ type;
64
+ element_type;
65
+ tag;
66
+ _style;
67
+ _attrs;
68
+ classes;
69
+ _inner_html;
70
+ children;
71
+ _lang;
72
+ _charset;
73
+ _viewport;
74
+ _title;
75
+ _links;
76
+ _disabled;
77
+ // ---------------------------------------------------------
78
+ // Constructor.
79
+ constructor({ type = "VElement", tag = "div", default_style = null, default_attributes = null, default_events = null }) {
80
+ this.type = type;
81
+ this.element_type = type;
82
+ this.tag = tag;
83
+ this._style = {};
84
+ this._attrs = {};
85
+ this.classes = [];
86
+ this._inner_html = null;
87
+ this.children = [];
88
+ if (default_style != null) {
89
+ Object.keys(default_style).forEach((key) => {
90
+ this._style[key] = default_style[key];
91
+ });
92
+ }
93
+ if (default_attributes != null) {
94
+ Object.keys(default_attributes).forEach((key) => {
95
+ this._attrs[key] = default_attributes[key];
96
+ });
97
+ }
98
+ if (default_events != null) {
99
+ Object.keys(default_events).forEach((key) => {
100
+ this._attrs[key] = default_events[key];
101
+ });
102
+ }
103
+ }
104
+ // ---------------------------------------------------------
105
+ // Utils.
106
+ // Pad a numeric with px.
107
+ pad_numeric(value, padding = "px") {
108
+ if (typeof value === "number") {
109
+ return value + padding;
110
+ }
111
+ return value;
112
+ }
113
+ // ---------------------------------------------------------
114
+ // Build functions.
115
+ // Build the html.
116
+ html() {
117
+ let html = "", tag;
118
+ if (this.tag !== "mail") {
119
+ tag = this.tag;
120
+ } else {
121
+ tag = "body";
122
+ html += "<!DOCTYPE html>";
123
+ html += `<html lang="${this._lang || "en"}" style="height: 100%;">`;
124
+ html += `<head>`;
125
+ html += `<meta charset="${this._charset || "UTF-8"}">`;
126
+ html += `<meta name="viewport" charset="${this._viewport || "width=device-width, initial-scale=1.0"}">`;
127
+ html += `<meta name="color-scheme" content="light">`;
128
+ html += `<meta name="supported-color-schemes" content="light">`;
129
+ html += `<title>${this._title || ""}"</title>`;
130
+ html += '<style type="text/css">* {box-sizing:border-box;}</style>';
131
+ if (this._links !== void 0) {
132
+ this._links.forEach((url) => {
133
+ if (typeof url === "string") {
134
+ html += `<link rel="stylesheet" href="${url}">`;
135
+ } else if (typeof url === "object") {
136
+ if (url.rel == null) {
137
+ url.rel = "stylesheet";
138
+ }
139
+ html += "<link";
140
+ Object.keys(url).forEach((key) => {
141
+ html += ` ${key}="${url[key]}"`;
142
+ });
143
+ html += ">";
144
+ } else {
145
+ throw Error('Invalid type for a css include, the valid value types are "string" and "object".');
146
+ }
147
+ });
148
+ }
149
+ html += `</head>`;
150
+ if (this.children.length > 0 && this.children[0].tag === "table") {
151
+ this.children[0]._attrs.role = "presentation";
152
+ }
153
+ }
154
+ html += "<";
155
+ html += tag;
156
+ html += " ";
157
+ if (this.classes.length > 0) {
158
+ html += 'class="';
159
+ let i = 0;
160
+ this.classes.forEach((key) => {
161
+ html += key;
162
+ if (i < this.classes.length - 1) {
163
+ html += " ";
164
+ }
165
+ ++i;
166
+ });
167
+ html += '" ';
168
+ }
169
+ if (Object.keys(this._style).length > 0) {
170
+ html += 'style="';
171
+ Object.keys(this._style).forEach((key) => {
172
+ html += `${key}:${this._style[key].replaceAll('"', "'")};`;
173
+ });
174
+ html += '"';
175
+ }
176
+ Object.keys(this._attrs).forEach((key) => {
177
+ html += ` ${key}="${this._attrs[key]}"`;
178
+ });
179
+ html += ">\n";
180
+ if (this._inner_html != null) {
181
+ html += this._inner_html;
182
+ }
183
+ this.children.forEach((child) => {
184
+ html += child.html();
185
+ });
186
+ html += "</";
187
+ html += this.tag;
188
+ html += "";
189
+ html += ">\n";
190
+ if (this.tag === "mail") {
191
+ html += "</html>";
192
+ }
193
+ return html;
194
+ }
195
+ // Add links to the main MailElement.
196
+ links(links) {
197
+ if (this._links === void 0) {
198
+ this._links = [];
199
+ }
200
+ this._links = this._links.concat(links);
201
+ return this;
202
+ }
203
+ background_color(value) {
204
+ if (value == null)
205
+ return this._style["background-color"];
206
+ this._style["background-color"] = value;
207
+ return this;
208
+ }
209
+ display(value) {
210
+ if (value == null)
211
+ return this._style["display"];
212
+ this._style["display"] = value;
213
+ return this;
214
+ }
215
+ background_image(value) {
216
+ if (value == null)
217
+ return this._style["background-image"];
218
+ this._style["background-image"] = value;
219
+ return this;
220
+ }
221
+ background_repeat(value) {
222
+ if (value == null)
223
+ return this._style["background-repeat"];
224
+ this._style["background-repeat"] = value;
225
+ return this;
226
+ }
227
+ border_top(value) {
228
+ if (value == null)
229
+ return this._style["border-top"];
230
+ this._style["border-top"] = value;
231
+ return this;
232
+ }
233
+ border_bottom(value) {
234
+ if (value == null)
235
+ return this._style["border-bottom"];
236
+ this._style["border-bottom"] = value;
237
+ return this;
238
+ }
239
+ border_right(value) {
240
+ if (value == null)
241
+ return this._style["border-right"];
242
+ this._style["border-right"] = value;
243
+ return this;
244
+ }
245
+ border_left(value) {
246
+ if (value == null)
247
+ return this._style["border-left"];
248
+ this._style["border-left"] = value;
249
+ return this;
250
+ }
251
+ border_color(value) {
252
+ if (value == null)
253
+ return this._style["border-color"];
254
+ this._style["border-color"] = value;
255
+ return this;
256
+ }
257
+ border_style(value) {
258
+ if (value == null)
259
+ return this._style["border-style"];
260
+ this._style["border-style"] = value;
261
+ return this;
262
+ }
263
+ cursor(value) {
264
+ if (value == null)
265
+ return this._style["cursor"];
266
+ this._style["cursor"] = value;
267
+ return this;
268
+ }
269
+ justify_items(value) {
270
+ if (value == null)
271
+ return this._style["justify-items"];
272
+ this._style["justify-items"] = value;
273
+ return this;
274
+ }
275
+ letter_spacing(value) {
276
+ if (value == null)
277
+ return this._style["letter-spacing"];
278
+ this._style["letter-spacing"] = value;
279
+ return this;
280
+ }
281
+ line_height(value) {
282
+ if (value == null)
283
+ return this._style["line-height"];
284
+ this._style["line-height"] = value;
285
+ return this;
286
+ }
287
+ outline(value) {
288
+ if (value == null)
289
+ return this._style["outline"];
290
+ this._style["outline"] = value;
291
+ return this;
292
+ }
293
+ overflow(value) {
294
+ if (value == null)
295
+ return this._style["overflow"];
296
+ this._style["overflow"] = value;
297
+ return this;
298
+ }
299
+ overflow_x(value) {
300
+ if (value == null)
301
+ return this._style["overflow-x"];
302
+ this._style["overflow-x"] = value;
303
+ return this;
304
+ }
305
+ overflow_y(value) {
306
+ if (value == null)
307
+ return this._style["overflow-y"];
308
+ this._style["overflow-y"] = value;
309
+ return this;
310
+ }
311
+ text_align(value) {
312
+ if (value == null)
313
+ return this._style["text-align"];
314
+ this._style["text-align"] = value;
315
+ return this;
316
+ }
317
+ text_align_last(value) {
318
+ if (value == null)
319
+ return this._style["text-align-last"];
320
+ this._style["text-align-last"] = value;
321
+ return this;
322
+ }
323
+ text_decoration(value) {
324
+ if (value == null)
325
+ return this._style["text-decoration"];
326
+ this._style["text-decoration"] = value;
327
+ return this;
328
+ }
329
+ text_decoration_color(value) {
330
+ if (value == null)
331
+ return this._style["text-decoration-color"];
332
+ this._style["text-decoration-color"] = value;
333
+ return this;
334
+ }
335
+ text_wrap(value) {
336
+ if (value == null)
337
+ return this._style["text-wrap"];
338
+ this._style["text-wrap"] = value;
339
+ return this;
340
+ }
341
+ white_space(value) {
342
+ if (value == null)
343
+ return this._style["white-space"];
344
+ this._style["white-space"] = value;
345
+ return this;
346
+ }
347
+ overflow_wrap(value) {
348
+ if (value == null)
349
+ return this._style["overflow-wrap"];
350
+ this._style["overflow-wrap"] = value;
351
+ return this;
352
+ }
353
+ word_wrap(value) {
354
+ if (value == null)
355
+ return this._style["word-wrap"];
356
+ this._style["word-wrap"] = value;
357
+ return this;
358
+ }
359
+ box_shadow(value) {
360
+ if (value == null)
361
+ return this._style["box-shadow"];
362
+ this._style["box-shadow"] = value;
363
+ return this;
364
+ }
365
+ drop_shadow(value) {
366
+ if (value == null)
367
+ return this._style["drop-shadow"];
368
+ this._style["drop-shadow"] = value;
369
+ return this;
370
+ }
371
+ font_size(value) {
372
+ if (value == null)
373
+ return this._style["font-size"];
374
+ this._style["font-size"] = this.pad_numeric(value);
375
+ return this;
376
+ }
377
+ font(value) {
378
+ if (value == null)
379
+ return this._style["font"];
380
+ this._style["font"] = this.pad_numeric(value);
381
+ return this;
382
+ }
383
+ font_family(value) {
384
+ if (value == null)
385
+ return this._style["font-family"];
386
+ this._style["font-family"] = this.pad_numeric(value);
387
+ return this;
388
+ }
389
+ font_style(value) {
390
+ if (value == null)
391
+ return this._style["font-style"];
392
+ this._style["font-style"] = this.pad_numeric(value);
393
+ return this;
394
+ }
395
+ font_weight(value) {
396
+ if (value == null)
397
+ return this._style["font-weight"];
398
+ this._style["font-weight"] = this.pad_numeric(value);
399
+ return this;
400
+ }
401
+ width(value) {
402
+ if (value == null)
403
+ return this._style["width"];
404
+ this._style["width"] = this.pad_numeric(value);
405
+ return this;
406
+ }
407
+ min_width(value) {
408
+ if (value == null)
409
+ return this._style["min-width"];
410
+ this._style["min-width"] = this.pad_numeric(value);
411
+ return this;
412
+ }
413
+ max_width(value) {
414
+ if (value == null)
415
+ return this._style["max-width"];
416
+ this._style["max-width"] = this.pad_numeric(value);
417
+ return this;
418
+ }
419
+ height(value) {
420
+ if (value == null)
421
+ return this._style["height"];
422
+ this._style["height"] = this.pad_numeric(value);
423
+ return this;
424
+ }
425
+ min_height(value) {
426
+ if (value == null)
427
+ return this._style["min-height"];
428
+ this._style["min-height"] = this.pad_numeric(value);
429
+ return this;
430
+ }
431
+ max_height(value) {
432
+ if (value == null)
433
+ return this._style["max-height"];
434
+ this._style["max-height"] = this.pad_numeric(value);
435
+ return this;
436
+ }
437
+ margin_top(value) {
438
+ if (value == null)
439
+ return this._style["margin-top"];
440
+ this._style["margin-top"] = this.pad_numeric(value);
441
+ return this;
442
+ }
443
+ margin_bottom(value) {
444
+ if (value == null)
445
+ return this._style["margin-bottom"];
446
+ this._style["margin-bottom"] = this.pad_numeric(value);
447
+ return this;
448
+ }
449
+ margin_right(value) {
450
+ if (value == null)
451
+ return this._style["margin-right"];
452
+ this._style["margin-right"] = this.pad_numeric(value);
453
+ return this;
454
+ }
455
+ margin_left(value) {
456
+ if (value == null)
457
+ return this._style["margin-left"];
458
+ this._style["margin-left"] = this.pad_numeric(value);
459
+ return this;
460
+ }
461
+ padding_top(value) {
462
+ if (value == null)
463
+ return this._style["padding-top"];
464
+ this._style["padding-top"] = this.pad_numeric(value);
465
+ return this;
466
+ }
467
+ padding_bottom(value) {
468
+ if (value == null)
469
+ return this._style["padding-bottom"];
470
+ this._style["padding-bottom"] = this.pad_numeric(value);
471
+ return this;
472
+ }
473
+ padding_right(value) {
474
+ if (value == null)
475
+ return this._style["padding-right"];
476
+ this._style["padding-right"] = this.pad_numeric(value);
477
+ return this;
478
+ }
479
+ padding_left(value) {
480
+ if (value == null)
481
+ return this._style["padding-left"];
482
+ this._style["padding-left"] = this.pad_numeric(value);
483
+ return this;
484
+ }
485
+ border_width(value) {
486
+ if (value == null)
487
+ return this._style["border-width"];
488
+ this._style["border-width"] = this.pad_numeric(value);
489
+ return this;
490
+ }
491
+ align_items(value) {
492
+ if (value == null)
493
+ return this._style["align-items"];
494
+ this._style["align-items"] = value;
495
+ this._style["-ms-align-items"] = value;
496
+ this._style["-webkit-align-items"] = value;
497
+ this._style["-moz-align-items"] = value;
498
+ return this;
499
+ }
500
+ align_content(value) {
501
+ if (value == null)
502
+ return this._style["align-content"];
503
+ this._style["align-content"] = value;
504
+ this._style["-ms-align-content"] = value;
505
+ this._style["-webkit-align-content"] = value;
506
+ this._style["-moz-align-content"] = value;
507
+ return this;
508
+ }
509
+ background_size(value) {
510
+ if (value == null)
511
+ return this._style["background-size"];
512
+ this._style["background-size"] = value;
513
+ this._style["-ms-background-size"] = value;
514
+ this._style["-webkit-background-size"] = value;
515
+ this._style["-moz-background-size"] = value;
516
+ return this;
517
+ }
518
+ box_sizing(value) {
519
+ if (value == null)
520
+ return this._style["box-sizing"];
521
+ this._style["box-sizing"] = value;
522
+ this._style["-ms-box-sizing"] = value;
523
+ this._style["-webkit-box-sizing"] = value;
524
+ this._style["-moz-box-sizing"] = value;
525
+ return this;
526
+ }
527
+ flex(value) {
528
+ if (value == null)
529
+ return this._style["flex"];
530
+ this._style["flex"] = value;
531
+ this._style["-ms-flex"] = value;
532
+ this._style["-webkit-flex"] = value;
533
+ this._style["-moz-flex"] = value;
534
+ return this;
535
+ }
536
+ flex_grow(value) {
537
+ if (value == null)
538
+ return this._style["flex-grow"];
539
+ this._style["flex-grow"] = value;
540
+ this._style["-ms-flex-grow"] = value;
541
+ this._style["-webkit-flex-grow"] = value;
542
+ this._style["-moz-flex-grow"] = value;
543
+ return this;
544
+ }
545
+ flex_shrink(value) {
546
+ if (value == null)
547
+ return this._style["flex-shrink"];
548
+ this._style["flex-shrink"] = value;
549
+ this._style["-ms-flex-shrink"] = value;
550
+ this._style["-webkit-flex-shrink"] = value;
551
+ this._style["-moz-flex-shrink"] = value;
552
+ return this;
553
+ }
554
+ justify_content(value) {
555
+ if (value == null)
556
+ return this._style["justify-content"];
557
+ this._style["justify-content"] = value;
558
+ this._style["-ms-justify-content"] = value;
559
+ this._style["-webkit-justify-content"] = value;
560
+ this._style["-moz-justify-content"] = value;
561
+ return this;
562
+ }
563
+ mask(value) {
564
+ if (value == null)
565
+ return this._style["mask"];
566
+ this._style["mask"] = value;
567
+ this._style["-ms-mask"] = value;
568
+ this._style["-webkit-mask"] = value;
569
+ this._style["-moz-mask"] = value;
570
+ return this;
571
+ }
572
+ user_select(value) {
573
+ if (value == null)
574
+ return this._style["user-select"];
575
+ this._style["user-select"] = value;
576
+ this._style["-ms-user-select"] = value;
577
+ this._style["-webkit-user-select"] = value;
578
+ this._style["-moz-user-select"] = value;
579
+ return this;
580
+ }
581
+ // ---------------------------------------------------------
582
+ // Edit the element.
583
+ // Style the element.
584
+ styles(styles) {
585
+ Object.keys(styles).forEach((key) => {
586
+ this._style[key] = styles[key];
587
+ });
588
+ return this;
589
+ }
590
+ // Add attributes to the element.
591
+ attrs(attrs) {
592
+ Object.keys(attrs).forEach((key) => {
593
+ this._attrs[key] = attrs[key];
594
+ });
595
+ return this;
596
+ }
597
+ // Add events to the element.
598
+ events(events) {
599
+ Object.keys(events).forEach((key) => {
600
+ this._attrs[key] = events[key];
601
+ });
602
+ return this;
603
+ }
604
+ // Add class.
605
+ add_class(name) {
606
+ if (this.classes.includes(name) === false) {
607
+ this.classes.push(name);
608
+ }
609
+ return this;
610
+ }
611
+ // Remove class.
612
+ remove_class(name) {
613
+ this.classes = this.classes.filter((cls) => cls !== name);
614
+ return this;
615
+ }
616
+ // Append a child.
617
+ append(...children) {
618
+ children.forEach((child) => {
619
+ if (child == null) {
620
+ return;
621
+ } else if (Array.isArray(child)) {
622
+ this.append(...child);
623
+ } else if (typeof child === "function") {
624
+ this.append(child(this));
625
+ } else {
626
+ this.children.push(child);
627
+ }
628
+ });
629
+ return this;
630
+ }
631
+ inner_html(value) {
632
+ if (value == null) {
633
+ return this._inner_html;
634
+ }
635
+ this._inner_html = value;
636
+ return this;
637
+ }
638
+ // ---------------------------------------------------------
639
+ // Styling.
640
+ // Center the data.
641
+ center() {
642
+ switch (this.tag) {
643
+ case "table":
644
+ case "tr":
645
+ case "td":
646
+ this._attrs["align"] = "center";
647
+ return this;
648
+ default:
649
+ this._style["text-align"] = "center";
650
+ return this;
651
+ }
652
+ }
653
+ padding(...values) {
654
+ if (values.length === 0) {
655
+ return this._style.padding;
656
+ } else if (values.length === 1) {
657
+ this._style.padding = this.pad_numeric(values[0]);
658
+ } else if (values.length === 2) {
659
+ if (values[0] != null) {
660
+ this._style["padding-top"] = this.pad_numeric(values[0]);
661
+ }
662
+ if (values[1] != null) {
663
+ this._style["padding-right"] = this.pad_numeric(values[1]);
664
+ }
665
+ if (values[0] != null) {
666
+ this._style["padding-bottom"] = this.pad_numeric(values[0]);
667
+ }
668
+ if (values[1] != null) {
669
+ this._style["padding-left"] = this.pad_numeric(values[1]);
670
+ }
671
+ } else if (values.length === 4) {
672
+ this._style["padding-top"] = this.pad_numeric(values[0]);
673
+ if (values[1] != null) {
674
+ this._style["padding-right"] = this.pad_numeric(values[1]);
675
+ }
676
+ if (values[2] != null) {
677
+ this._style["padding-bottom"] = this.pad_numeric(values[2]);
678
+ }
679
+ if (values[3] != null) {
680
+ this._style["padding-left"] = this.pad_numeric(values[3]);
681
+ }
682
+ } else {
683
+ console.error('Invalid number of arguments for function "padding()".');
684
+ }
685
+ return this;
686
+ }
687
+ margin(...values) {
688
+ if (values.length === 0) {
689
+ return this._style.margin;
690
+ } else if (values.length === 1) {
691
+ this._style.margin = this.pad_numeric(values[0]);
692
+ } else if (values.length === 2) {
693
+ this._style["margin-top"] = this.pad_numeric(values[0]);
694
+ if (values[1] != null) {
695
+ this._style["margin-left"] = this.pad_numeric(values[1]);
696
+ }
697
+ if (values[0] != null) {
698
+ this._style["margin-bottom"] = this.pad_numeric(values[0]);
699
+ }
700
+ if (values[1] != null) {
701
+ this._style["margin-left"] = this.pad_numeric(values[1]);
702
+ }
703
+ } else if (values.length === 4) {
704
+ this._style["margin-top"] = this.pad_numeric(values[0]);
705
+ if (values[1] != null) {
706
+ this._style["margin-left"] = this.pad_numeric(values[1]);
707
+ }
708
+ if (values[2] != null) {
709
+ this._style["margin-bottom"] = this.pad_numeric(values[2]);
710
+ }
711
+ if (values[3] != null) {
712
+ this._style["margin-left"] = this.pad_numeric(values[3]);
713
+ }
714
+ } else {
715
+ console.error('Invalid number of arguments for function "margin()".');
716
+ }
717
+ return this;
718
+ }
719
+ fixed_width(value) {
720
+ if (value == null) {
721
+ return this._style["min-width"];
722
+ }
723
+ value = this.pad_numeric(value);
724
+ this._style["width"] = value;
725
+ this._style["min-width"] = value;
726
+ this._style["max-width"] = value;
727
+ return this;
728
+ }
729
+ fixed_height(value) {
730
+ if (value == null) {
731
+ return this._style.height;
732
+ }
733
+ value = this.pad_numeric(value);
734
+ this._style["height"] = value;
735
+ this._style["min-height"] = value;
736
+ this._style["max-height"] = value;
737
+ return this;
738
+ }
739
+ // Frame.
740
+ frame(width, height) {
741
+ if (width != null) {
742
+ this.width(width);
743
+ }
744
+ if (height != null) {
745
+ this.height(height);
746
+ }
747
+ return this;
748
+ }
749
+ min_frame(width, height) {
750
+ if (width != null) {
751
+ this.min_width(width);
752
+ }
753
+ if (height != null) {
754
+ this.min_height(height);
755
+ }
756
+ return this;
757
+ }
758
+ max_frame(width, height) {
759
+ if (width != null) {
760
+ this.max_width(width);
761
+ }
762
+ if (height != null) {
763
+ this.max_height(height);
764
+ }
765
+ return this;
766
+ }
767
+ fixed_frame(width, height) {
768
+ if (width != null) {
769
+ width = this.pad_numeric(width);
770
+ this._style.width = width;
771
+ this._style["min-width"] = width;
772
+ this._style["max-width"] = width;
773
+ }
774
+ if (height != null) {
775
+ height = this.pad_numeric(height);
776
+ this._style.height = height;
777
+ this._style["min-height"] = height;
778
+ this._style["max-height"] = height;
779
+ }
780
+ return this;
781
+ }
782
+ color(value) {
783
+ if (value == null) {
784
+ return this._style.color;
785
+ }
786
+ if (value.startsWith("linear-gradient(") || value.startsWith("radial-gradient(")) {
787
+ this._style["background-image"] = value;
788
+ this._style["background-clip"] = "text";
789
+ this._style["-webkit-background-clip"] = "text";
790
+ this._style.color = "transparent";
791
+ } else {
792
+ this._style.color = value;
793
+ }
794
+ return this;
795
+ }
796
+ border(...values) {
797
+ if (values.length === 0) {
798
+ return this._style.border;
799
+ } else if (values.length === 1) {
800
+ this._style.border = values[0].toString();
801
+ } else if (values.length === 2) {
802
+ this._style.border = `${this.pad_numeric(values[0])} solid ${values[1]}`;
803
+ } else if (values.length === 3) {
804
+ this._style.border = `${this.pad_numeric(values[0])} ${values[1]} ${values[2]}`;
805
+ } else {
806
+ console.error('Invalid number of arguments for function "border()".');
807
+ }
808
+ return this;
809
+ }
810
+ border_radius(value) {
811
+ if (value == null) {
812
+ return this._style["border-radius"];
813
+ }
814
+ const paddedValue = this.pad_numeric(value);
815
+ this._style["border-radius"] = paddedValue;
816
+ this._style["-ms-border-radius"] = paddedValue;
817
+ this._style["-webkit-border-radius"] = paddedValue;
818
+ this._style["-moz-border-radius"] = paddedValue;
819
+ return this;
820
+ }
821
+ background(value) {
822
+ if (value == null) {
823
+ return this._style.background;
824
+ }
825
+ if (typeof value === "string" && (value.startsWith("linear-gradient") || value.startsWith("radial-gradient"))) {
826
+ this._style.background = value;
827
+ this._style["background-image"] = value;
828
+ this._style["background-repeat"] = "no-repeat";
829
+ this._style["background-size"] = "cover";
830
+ } else {
831
+ this._style.background = value;
832
+ }
833
+ return this;
834
+ }
835
+ ellipsis_overflow(to = true) {
836
+ if (to == null) {
837
+ return this._style["text-overflow"] === "ellipsis";
838
+ } else if (to === true) {
839
+ this._style["text-overflow"] = "ellipsis";
840
+ this._style["white-space"] = "nowrap";
841
+ this._style.overflow = "hidden";
842
+ this._style["text-wrap"] = "wrap";
843
+ this._style["overflow-wrap"] = "break-word";
844
+ } else if (to === false) {
845
+ this._style["text-overflow"] = "default";
846
+ this._style["white-space"] = "default";
847
+ this._style.overflow = "default";
848
+ this._style["text-wrap"] = "default";
849
+ this._style["overflow-wrap"] = "default";
850
+ }
851
+ return this;
852
+ }
853
+ on_click(callback) {
854
+ if (callback == null) {
855
+ return this._attrs.onclick;
856
+ }
857
+ this._style.cursor = "pointer";
858
+ const e = this;
859
+ this._attrs.onclick = (t) => {
860
+ if (this._disabled !== true) {
861
+ callback(e, t);
862
+ }
863
+ };
864
+ return this;
865
+ }
866
+ lang(value) {
867
+ if (value == null) {
868
+ return this._lang;
869
+ }
870
+ this._lang = value;
871
+ return this;
872
+ }
873
+ charset(value) {
874
+ if (value == null) {
875
+ return this._charset;
876
+ }
877
+ this._charset = value;
878
+ return this;
879
+ }
880
+ viewport(value) {
881
+ if (value == null) {
882
+ return this._viewport;
883
+ }
884
+ this._viewport = value;
885
+ return this;
886
+ }
887
+ title(value) {
888
+ if (value == null) {
889
+ return this._title;
890
+ }
891
+ this._title = value;
892
+ return this;
893
+ }
894
+ }
895
+ function wrapper(constructor) {
896
+ return (...args) => new constructor(...args);
897
+ }
898
+ function create_null(target_class) {
899
+ let instance;
900
+ return () => {
901
+ if (instance === void 0) {
902
+ instance = new target_class();
903
+ }
904
+ return instance;
905
+ };
906
+ }
907
+ class TitleElement extends Element {
908
+ // Constructor.
909
+ constructor(text) {
910
+ super({
911
+ type: "Title",
912
+ tag: "h1",
913
+ default_style: {
914
+ "margin": "0px 0px 0px 0px",
915
+ "color": "inherit",
916
+ "white-space": "wrap",
917
+ "text-align": "inherit",
918
+ "font-size": "26px",
919
+ "line-height": "1.2em"
920
+ }
921
+ });
922
+ if (text) {
923
+ this._inner_html = text;
924
+ }
925
+ }
926
+ }
927
+ const Title = wrapper(TitleElement);
928
+ const NullTitle = create_null(TitleElement);
929
+ class SubtitleElement extends Element {
930
+ // Constructor.
931
+ constructor(text) {
932
+ super({
933
+ type: "Subtitle",
934
+ tag: "h2",
935
+ default_style: {
936
+ "margin": "0px",
937
+ "color": "inherit",
938
+ "white-space": "wrap",
939
+ "text-align": "inherit",
940
+ "font-size": "22px",
941
+ "line-height": "1.2em"
942
+ }
943
+ });
944
+ if (text) {
945
+ this._inner_html = text;
946
+ }
947
+ }
948
+ }
949
+ const Subtitle = wrapper(SubtitleElement);
950
+ const NullSubtitle = create_null(SubtitleElement);
951
+ class TextElement extends Element {
952
+ // Constructor.
953
+ constructor(text) {
954
+ super({
955
+ type: "Text",
956
+ tag: "p",
957
+ default_style: {
958
+ "margin": "0px",
959
+ "padding": "0px",
960
+ "font-size": "18px",
961
+ "line-height": "1.4em",
962
+ "color": "inherit",
963
+ "text-align": "inherit",
964
+ "white-space": "wrap"
965
+ }
966
+ });
967
+ if (text) {
968
+ this._inner_html = text;
969
+ }
970
+ }
971
+ }
972
+ const Text = wrapper(TextElement);
973
+ const NullText = create_null(TextElement);
974
+ class ImageElement extends Element {
975
+ // Constructor.
976
+ constructor(src) {
977
+ super({
978
+ type: "Image",
979
+ tag: "img",
980
+ default_style: {
981
+ "margin": "0px",
982
+ "padding": "0px",
983
+ "object-fit": "cover"
984
+ }
985
+ });
986
+ if (src) {
987
+ this._attrs.src = src;
988
+ }
989
+ }
990
+ }
991
+ const Image = wrapper(ImageElement);
992
+ const NullImageElement = create_null(ImageElement);
993
+ class ImageMaskElement extends Element {
994
+ mask_child;
995
+ _src;
996
+ // Constructor.
997
+ constructor(src) {
998
+ super({
999
+ type: "ImageMask",
1000
+ tag: "div",
1001
+ default_style: {
1002
+ "margin": "0px",
1003
+ "padding": "0px",
1004
+ "object-fit": "cover",
1005
+ "display": "inline-block"
1006
+ }
1007
+ });
1008
+ this.mask_child = VStack().width("100%").height("100%").background("black");
1009
+ if (src != null) {
1010
+ this.mask_child.mask(`url('${src}') no-repeat center/contain`);
1011
+ }
1012
+ this.append(this.mask_child);
1013
+ if (src) {
1014
+ this.src(src);
1015
+ }
1016
+ }
1017
+ mask_color(value) {
1018
+ if (value == null) {
1019
+ return this.mask_child._style.background;
1020
+ }
1021
+ this.mask_child._style.background = value;
1022
+ return this;
1023
+ }
1024
+ src(value) {
1025
+ if (value == null) {
1026
+ return this._src;
1027
+ }
1028
+ this.mask_child.mask(`url('${value}') no-repeat center/contain`);
1029
+ this._src = value;
1030
+ return this;
1031
+ }
1032
+ mask(value) {
1033
+ if (value == null) {
1034
+ return this.mask_child.mask();
1035
+ }
1036
+ this.mask_child.mask(value);
1037
+ return this;
1038
+ }
1039
+ }
1040
+ const ImageMask = wrapper(ImageMaskElement);
1041
+ const NullImageMaskElement = create_null(ImageMaskElement);
1042
+ class VStackElement extends Element {
1043
+ // Constructor.
1044
+ constructor(...children) {
1045
+ super({
1046
+ type: "VStack",
1047
+ tag: "div"
1048
+ });
1049
+ this.append(...children);
1050
+ }
1051
+ }
1052
+ const VStack = wrapper(VStackElement);
1053
+ const NullVStackElement = create_null(VStackElement);
1054
+ class DividerElement extends Element {
1055
+ // Constructor.
1056
+ constructor(text) {
1057
+ super({
1058
+ type: "Divider",
1059
+ tag: "div",
1060
+ default_style: {
1061
+ "margin": "0px",
1062
+ "padding": "0px",
1063
+ "width": "100%",
1064
+ "height": "1px",
1065
+ "min-height": "1px"
1066
+ // "background": "black",
1067
+ }
1068
+ });
1069
+ if (text) {
1070
+ this._inner_html = text;
1071
+ }
1072
+ }
1073
+ }
1074
+ const Divider = wrapper(DividerElement);
1075
+ const NullDividerElement = create_null(DividerElement);
1076
+ class TableDataElement extends Element {
1077
+ // Constructor.
1078
+ constructor(...children) {
1079
+ super({
1080
+ type: "TableData",
1081
+ tag: "td",
1082
+ default_style: {
1083
+ "width": "100%"
1084
+ },
1085
+ default_attributes: {}
1086
+ });
1087
+ this.append(...children);
1088
+ }
1089
+ // Center the data.
1090
+ center() {
1091
+ this.attrs({ align: "center" });
1092
+ return this;
1093
+ }
1094
+ // Vertically center.
1095
+ center_vertical() {
1096
+ this._style["vertical-align"] = "middle";
1097
+ return this;
1098
+ }
1099
+ leading_vertical() {
1100
+ this._style["vertical-align"] = "top";
1101
+ return this;
1102
+ }
1103
+ trailing_vertical() {
1104
+ this._style["vertical-align"] = "bottom";
1105
+ return this;
1106
+ }
1107
+ }
1108
+ const TableData = wrapper(TableDataElement);
1109
+ const NullTableDataElement = create_null(TableDataElement);
1110
+ class TableRowElement extends Element {
1111
+ current_cell;
1112
+ _wrap = false;
1113
+ // Constructor.
1114
+ constructor(...children) {
1115
+ super({
1116
+ type: "TableRow",
1117
+ tag: "tr",
1118
+ default_style: {
1119
+ "width": "100%"
1120
+ },
1121
+ default_attributes: {}
1122
+ });
1123
+ this.append(...children);
1124
+ }
1125
+ // Append.
1126
+ append(...children) {
1127
+ for (let i = 0; i < children.length; i++) {
1128
+ const child = children[i];
1129
+ if (child == null) {
1130
+ continue;
1131
+ } else if (Array.isArray(child)) {
1132
+ this.append(...child);
1133
+ } else if (typeof child === "function") {
1134
+ this.append(child(this));
1135
+ } else if (child instanceof TableDataElement) {
1136
+ this.current_cell = child;
1137
+ this.children.push(child);
1138
+ } else {
1139
+ if (this.current_cell == null) {
1140
+ this.current_cell = TableData();
1141
+ this.children.push(this.current_cell);
1142
+ if (this._attrs["align"] === "center") {
1143
+ this.current_cell.attrs({ align: "center" });
1144
+ }
1145
+ if (this._style["vertical-align"] === "middle") {
1146
+ this.current_cell._style["align"] = "middle";
1147
+ }
1148
+ }
1149
+ if ((child._style.display == null || child._style.display === "") && this._wrap === true) {
1150
+ if (child.tag === "p" || child.tag === "h1" || child.tag === "h2") {
1151
+ child._style.display = "inline";
1152
+ } else {
1153
+ child._style.display = "inline-block";
1154
+ }
1155
+ }
1156
+ this.current_cell.append(child);
1157
+ }
1158
+ }
1159
+ return this;
1160
+ }
1161
+ wrap(value) {
1162
+ if (value == null) {
1163
+ return this._wrap;
1164
+ }
1165
+ this._wrap = value;
1166
+ const set_display_inline = (child) => {
1167
+ if (child instanceof TableDataElement) {
1168
+ child.children.forEach(set_display_inline);
1169
+ } else {
1170
+ if ((child._style.display == null || child._style.display === "") && this._wrap === true) {
1171
+ if (child.tag === "p" || child.tag === "h1" || child.tag === "h2") {
1172
+ child._style.display = "inline";
1173
+ } else {
1174
+ child._style.display = "inline-block";
1175
+ }
1176
+ } else if ((child._style.display === "inline" || child._style.display === "inline-block") && this._wrap === false) {
1177
+ child._style.display = "default";
1178
+ }
1179
+ }
1180
+ };
1181
+ this.children.forEach(set_display_inline);
1182
+ return this;
1183
+ }
1184
+ // Center.
1185
+ center() {
1186
+ this._attrs["align"] = "center";
1187
+ this.children.forEach((child) => {
1188
+ if (child instanceof TableDataElement) {
1189
+ child.attrs({ align: "center" });
1190
+ }
1191
+ });
1192
+ return this;
1193
+ }
1194
+ // Vertically center.
1195
+ center_vertical() {
1196
+ this._style["vertical-align"] = "middle";
1197
+ this.children.forEach((child) => {
1198
+ child._style["vertical-align"] = "middle";
1199
+ if (child instanceof TableDataElement) {
1200
+ child.children.forEach((nested) => {
1201
+ nested._style["vertical-align"] = "middle";
1202
+ });
1203
+ }
1204
+ });
1205
+ return this;
1206
+ }
1207
+ leading_vertical() {
1208
+ this._style["vertical-align"] = "top";
1209
+ this.children.forEach((child) => {
1210
+ child._style["vertical-align"] = "top";
1211
+ if (child instanceof TableDataElement) {
1212
+ child.children.forEach((nested) => {
1213
+ nested._style["vertical-align"] = "top";
1214
+ });
1215
+ }
1216
+ });
1217
+ return this;
1218
+ }
1219
+ trailing_vertical() {
1220
+ this._style["vertical-align"] = "bottom";
1221
+ this.children.forEach((child) => {
1222
+ child._style["vertical-align"] = "bottom";
1223
+ if (child instanceof TableDataElement) {
1224
+ child.children.forEach((nested) => {
1225
+ nested._style["vertical-align"] = "bottom";
1226
+ });
1227
+ }
1228
+ });
1229
+ return this;
1230
+ }
1231
+ }
1232
+ const TableRow = wrapper(TableRowElement);
1233
+ const NullTableRowElement = create_null(TableRowElement);
1234
+ class TableElement extends Element {
1235
+ current_cell;
1236
+ current_row;
1237
+ // Constructor.
1238
+ constructor(...children) {
1239
+ super({
1240
+ type: "Stack",
1241
+ tag: "table",
1242
+ default_style: {
1243
+ "width": "100%"
1244
+ },
1245
+ default_attributes: {
1246
+ "cellspacing": "0",
1247
+ "cellpadding": "0",
1248
+ "border": "0"
1249
+ }
1250
+ });
1251
+ this.current_row = TableRow();
1252
+ this.children.append(this.current_row);
1253
+ this.append(...children);
1254
+ }
1255
+ // Add a row.
1256
+ row(...children) {
1257
+ this.current_row = TableRow();
1258
+ this.children.push(this.current_row);
1259
+ this.current_cell = void 0;
1260
+ this.append(...children);
1261
+ return this;
1262
+ }
1263
+ // Append.
1264
+ append(...children) {
1265
+ for (let i = 0; i < children.length; i++) {
1266
+ const child = children[i];
1267
+ if (child == null) {
1268
+ continue;
1269
+ } else if (Array.isArray(child)) {
1270
+ this.append(...child);
1271
+ } else if (typeof child === "function") {
1272
+ this.append(child(this));
1273
+ } else if (child instanceof TableRowElement) {
1274
+ this.current_row = child;
1275
+ this.children.push(child);
1276
+ } else {
1277
+ if (this.current_row == null) {
1278
+ this.current_row = TableRow();
1279
+ this.children.push(this.current_row);
1280
+ }
1281
+ this.current_row.append(child);
1282
+ }
1283
+ }
1284
+ return this;
1285
+ }
1286
+ }
1287
+ const Table = wrapper(TableElement);
1288
+ const NullTableElement = create_null(TableElement);
1289
+ class CSSElement extends Element {
1290
+ // Constructor.
1291
+ constructor(style) {
1292
+ super({
1293
+ type: "CSS",
1294
+ tag: "style"
1295
+ });
1296
+ if (style) {
1297
+ this._inner_html = style;
1298
+ }
1299
+ }
1300
+ }
1301
+ const CSS = wrapper(CSSElement);
1302
+ const NullCSSElement = create_null(CSSElement);
1303
+ class MailElement extends Element {
1304
+ _subject;
1305
+ // Constructor.
1306
+ constructor(...children) {
1307
+ super({
1308
+ type: "Mail",
1309
+ tag: "mail",
1310
+ default_style: {
1311
+ "width": "100% !important",
1312
+ "min-height": "100% !important",
1313
+ "box-sizing": "border-box",
1314
+ "padding": "0px",
1315
+ // this is required, sometimes it glitches and makes it scrolling without zero padding.
1316
+ "margin": "0px"
1317
+ }
1318
+ });
1319
+ this.append(...children);
1320
+ }
1321
+ subject(subj) {
1322
+ if (subj == null) {
1323
+ return this._subject;
1324
+ }
1325
+ this._subject = subj;
1326
+ return this;
1327
+ }
1328
+ }
1329
+ const Mail = wrapper(MailElement);
1330
+ const NullMailElement = create_null(MailElement);
1331
+ // Annotate the CommonJS export names for ESM import in node:
1332
+ 0 && (module.exports = {
1333
+ CSS,
1334
+ CSSElement,
1335
+ Divider,
1336
+ DividerElement,
1337
+ Element,
1338
+ Image,
1339
+ ImageElement,
1340
+ ImageMask,
1341
+ ImageMaskElement,
1342
+ Mail,
1343
+ MailElement,
1344
+ NullCSSElement,
1345
+ NullDividerElement,
1346
+ NullImageElement,
1347
+ NullImageMaskElement,
1348
+ NullMailElement,
1349
+ NullSubtitle,
1350
+ NullTableDataElement,
1351
+ NullTableElement,
1352
+ NullTableRowElement,
1353
+ NullText,
1354
+ NullTitle,
1355
+ NullVStackElement,
1356
+ Subtitle,
1357
+ SubtitleElement,
1358
+ Table,
1359
+ TableData,
1360
+ TableDataElement,
1361
+ TableElement,
1362
+ TableRow,
1363
+ TableRowElement,
1364
+ Text,
1365
+ TextElement,
1366
+ Title,
1367
+ TitleElement,
1368
+ VStack,
1369
+ VStackElement
1370
+ });