@vandenberghinc/volt 1.1.5 → 1.1.7

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 (287) hide show
  1. package/backend/dist/cjs/database.d.ts +41 -68
  2. package/backend/dist/cjs/database.js +127 -76
  3. package/backend/dist/cjs/endpoint.d.ts +23 -9
  4. package/backend/dist/cjs/endpoint.js +98 -21
  5. package/backend/dist/cjs/frontend.d.ts +0 -2
  6. package/backend/dist/cjs/frontend.js +9 -9
  7. package/backend/dist/cjs/image_endpoint.d.ts +3 -1
  8. package/backend/dist/cjs/image_endpoint.js +2 -1
  9. package/backend/dist/cjs/payments/paddle.js +10 -2
  10. package/backend/dist/cjs/plugins/css.d.ts +6 -5
  11. package/backend/dist/cjs/plugins/css.js +32 -7
  12. package/backend/dist/cjs/plugins/ts/compiler.d.ts +6 -1
  13. package/backend/dist/cjs/plugins/ts/compiler.js +26 -2
  14. package/backend/dist/cjs/plugins/ts/preprocessing.js +5 -3
  15. package/backend/dist/cjs/server.d.ts +7 -13
  16. package/backend/dist/cjs/server.js +184 -303
  17. package/backend/dist/cjs/status.d.ts +1 -0
  18. package/backend/dist/cjs/status.js +2 -1
  19. package/backend/dist/cjs/stream.d.ts +5 -3
  20. package/backend/dist/cjs/stream.js +13 -4
  21. package/backend/dist/cjs/users.d.ts +1 -1
  22. package/backend/dist/cjs/users.js +87 -72
  23. package/backend/dist/cjs/utils.d.ts +17 -9
  24. package/backend/dist/cjs/utils.js +22 -64
  25. package/backend/dist/cjs/view.d.ts +2 -2
  26. package/backend/dist/cjs/view.js +38 -40
  27. package/backend/dist/cjs/volt.d.ts +3 -2
  28. package/backend/dist/cjs/volt.js +2 -2
  29. package/backend/dist/css/volt.css +5 -0
  30. package/backend/dist/esm/database.d.ts +41 -68
  31. package/backend/dist/esm/database.js +127 -76
  32. package/backend/dist/esm/endpoint.d.ts +23 -9
  33. package/backend/dist/esm/endpoint.js +99 -22
  34. package/backend/dist/esm/frontend.d.ts +0 -2
  35. package/backend/dist/esm/frontend.js +9 -9
  36. package/backend/dist/esm/image_endpoint.d.ts +3 -1
  37. package/backend/dist/esm/image_endpoint.js +2 -1
  38. package/backend/dist/esm/payments/paddle.js +11 -3
  39. package/backend/dist/esm/plugins/css.d.ts +6 -5
  40. package/backend/dist/esm/plugins/css.js +32 -6
  41. package/backend/dist/esm/plugins/ts/compiler.d.ts +6 -1
  42. package/backend/dist/esm/plugins/ts/compiler.js +26 -2
  43. package/backend/dist/esm/plugins/ts/preprocessing.js +5 -3
  44. package/backend/dist/esm/server.d.ts +7 -13
  45. package/backend/dist/esm/server.js +182 -301
  46. package/backend/dist/esm/status.d.ts +1 -0
  47. package/backend/dist/esm/status.js +1 -0
  48. package/backend/dist/esm/stream.d.ts +5 -3
  49. package/backend/dist/esm/stream.js +13 -4
  50. package/backend/dist/esm/users.d.ts +1 -1
  51. package/backend/dist/esm/users.js +87 -72
  52. package/backend/dist/esm/utils.d.ts +17 -9
  53. package/backend/dist/esm/utils.js +21 -62
  54. package/backend/dist/esm/view.d.ts +2 -2
  55. package/backend/dist/esm/view.js +38 -40
  56. package/backend/dist/esm/volt.d.ts +3 -2
  57. package/backend/dist/esm/volt.js +2 -1
  58. package/backend/dist/esm-dev/blacklist.js +1 -1
  59. package/backend/dist/esm-dev/cli.js +2 -2
  60. package/backend/dist/esm-dev/database.d.ts +41 -68
  61. package/backend/dist/esm-dev/database.js +128 -77
  62. package/backend/dist/esm-dev/endpoint.d.ts +23 -9
  63. package/backend/dist/esm-dev/endpoint.js +100 -23
  64. package/backend/dist/esm-dev/file_watcher.js +1 -1
  65. package/backend/dist/esm-dev/frontend.d.ts +0 -2
  66. package/backend/dist/esm-dev/frontend.js +9 -9
  67. package/backend/dist/esm-dev/image_endpoint.d.ts +3 -1
  68. package/backend/dist/esm-dev/image_endpoint.js +2 -1
  69. package/backend/dist/esm-dev/logger.js +1 -1
  70. package/backend/dist/esm-dev/payments/paddle.js +12 -4
  71. package/backend/dist/esm-dev/plugins/css.d.ts +6 -5
  72. package/backend/dist/esm-dev/plugins/css.js +33 -7
  73. package/backend/dist/esm-dev/plugins/ts/compiler.d.ts +6 -1
  74. package/backend/dist/esm-dev/plugins/ts/compiler.js +27 -3
  75. package/backend/dist/esm-dev/plugins/ts/preprocessing.js +7 -5
  76. package/backend/dist/esm-dev/rate_limit.js +1 -1
  77. package/backend/dist/esm-dev/server.d.ts +7 -13
  78. package/backend/dist/esm-dev/server.js +184 -303
  79. package/backend/dist/esm-dev/status.d.ts +1 -0
  80. package/backend/dist/esm-dev/status.js +1 -0
  81. package/backend/dist/esm-dev/stream.d.ts +5 -3
  82. package/backend/dist/esm-dev/stream.js +13 -4
  83. package/backend/dist/esm-dev/users.d.ts +1 -1
  84. package/backend/dist/esm-dev/users.js +88 -73
  85. package/backend/dist/esm-dev/utils.d.ts +17 -9
  86. package/backend/dist/esm-dev/utils.js +22 -63
  87. package/backend/dist/esm-dev/view.d.ts +2 -2
  88. package/backend/dist/esm-dev/view.js +39 -41
  89. package/backend/dist/esm-dev/volt.d.ts +3 -2
  90. package/backend/dist/esm-dev/volt.js +2 -1
  91. package/backend/src/database.ts +163 -152
  92. package/backend/src/endpoint.ts +123 -31
  93. package/backend/src/frontend.ts +9 -8
  94. package/backend/src/image_endpoint.ts +4 -0
  95. package/backend/src/payments/paddle.ts +11 -3
  96. package/backend/src/plugins/css.ts +36 -8
  97. package/backend/src/plugins/ts/compiler.ts +37 -1
  98. package/backend/src/plugins/ts/preprocessing.ts +5 -3
  99. package/backend/src/server.ts +167 -306
  100. package/backend/src/status.ts +1 -0
  101. package/backend/src/stream.ts +28 -8
  102. package/backend/src/users.ts +87 -72
  103. package/backend/src/utils.ts +58 -25
  104. package/backend/src/view.ts +30 -28
  105. package/backend/src/{volt.js → volt.ts} +2 -1
  106. package/backend/tsconfig.cjs.json +3 -3
  107. package/backend/tsconfig.esm.json +3 -3
  108. package/frontend/dist/elements/base.d.ts +397 -415
  109. package/frontend/dist/elements/base.js +565 -328
  110. package/frontend/dist/elements/module.d.ts +26 -12
  111. package/frontend/dist/elements/module.js +69 -32
  112. package/frontend/dist/elements/register_element.d.ts +3 -0
  113. package/frontend/dist/elements/register_element.js +22 -0
  114. package/frontend/dist/modules/auth.d.ts +1 -0
  115. package/frontend/dist/modules/auth.js +6 -5
  116. package/frontend/dist/modules/color.d.ts +159 -0
  117. package/frontend/dist/modules/color.js +315 -0
  118. package/frontend/dist/modules/colors.d.ts +1 -26
  119. package/frontend/dist/modules/colors.js +417 -338
  120. package/frontend/dist/modules/cookies.d.ts +1 -0
  121. package/frontend/dist/modules/cookies.js +1 -0
  122. package/frontend/dist/modules/events.d.ts +1 -0
  123. package/frontend/dist/modules/events.js +1 -0
  124. package/frontend/dist/modules/google.d.ts +1 -0
  125. package/frontend/dist/modules/google.js +1 -0
  126. package/frontend/dist/modules/meta.d.ts +1 -0
  127. package/frontend/dist/modules/meta.js +1 -0
  128. package/frontend/dist/modules/mutex.d.ts +1 -2
  129. package/frontend/dist/modules/mutex.js +3 -4
  130. package/frontend/dist/modules/paddle.d.ts +1 -0
  131. package/frontend/dist/modules/paddle.js +14 -13
  132. package/frontend/dist/modules/scheme.d.ts +1 -0
  133. package/frontend/dist/modules/scheme.js +4 -2
  134. package/frontend/dist/modules/statics.d.ts +1 -0
  135. package/frontend/dist/modules/statics.js +1 -0
  136. package/frontend/dist/modules/support.d.ts +1 -0
  137. package/frontend/dist/modules/support.js +3 -2
  138. package/frontend/dist/modules/theme.d.ts +56 -0
  139. package/frontend/dist/{ui → modules}/theme.js +186 -75
  140. package/frontend/dist/modules/themes.d.ts +1 -1
  141. package/frontend/dist/modules/themes.js +1 -0
  142. package/frontend/dist/modules/user.d.ts +1 -0
  143. package/frontend/dist/modules/user.js +11 -10
  144. package/frontend/dist/modules/utils.d.ts +23 -2
  145. package/frontend/dist/modules/utils.js +93 -1
  146. package/frontend/dist/types/gradient.js +4 -0
  147. package/frontend/dist/ui/border_button.d.ts +0 -25
  148. package/frontend/dist/ui/border_button.js +50 -51
  149. package/frontend/dist/ui/button.d.ts +0 -21
  150. package/frontend/dist/ui/button.js +41 -46
  151. package/frontend/dist/ui/canvas.js +15 -15
  152. package/frontend/dist/ui/checkbox.d.ts +3 -17
  153. package/frontend/dist/ui/checkbox.js +36 -30
  154. package/frontend/dist/ui/code.d.ts +15 -82
  155. package/frontend/dist/ui/code.js +150 -125
  156. package/frontend/dist/ui/color.d.ts +0 -1
  157. package/frontend/dist/ui/color.js +1 -1
  158. package/frontend/dist/ui/context_menu.d.ts +4 -2
  159. package/frontend/dist/ui/context_menu.js +16 -17
  160. package/frontend/dist/ui/css.js +2 -0
  161. package/frontend/dist/ui/divider.d.ts +0 -7
  162. package/frontend/dist/ui/divider.js +21 -25
  163. package/frontend/dist/ui/dropdown.d.ts +13 -7
  164. package/frontend/dist/ui/dropdown.js +65 -30
  165. package/frontend/dist/ui/for_each.d.ts +0 -5
  166. package/frontend/dist/ui/for_each.js +17 -22
  167. package/frontend/dist/ui/form.d.ts +17 -12
  168. package/frontend/dist/ui/form.js +21 -18
  169. package/frontend/dist/ui/frame_modes.d.ts +9 -12
  170. package/frontend/dist/ui/frame_modes.js +8 -10
  171. package/frontend/dist/ui/google_map.d.ts +0 -11
  172. package/frontend/dist/ui/google_map.js +23 -28
  173. package/frontend/dist/ui/gradient.d.ts +0 -5
  174. package/frontend/dist/ui/gradient.js +17 -22
  175. package/frontend/dist/ui/image.d.ts +27 -58
  176. package/frontend/dist/ui/image.js +99 -93
  177. package/frontend/dist/ui/input.d.ts +20 -97
  178. package/frontend/dist/ui/input.js +192 -170
  179. package/frontend/dist/ui/link.d.ts +0 -18
  180. package/frontend/dist/ui/link.js +42 -48
  181. package/frontend/dist/ui/list.js +36 -37
  182. package/frontend/dist/ui/loader_button.d.ts +4 -19
  183. package/frontend/dist/ui/loader_button.js +35 -37
  184. package/frontend/dist/ui/loaders.d.ts +0 -8
  185. package/frontend/dist/ui/loaders.js +20 -25
  186. package/frontend/dist/ui/popup.d.ts +11 -8
  187. package/frontend/dist/ui/popup.js +183 -24
  188. package/frontend/dist/ui/pseudo.d.ts +3 -3
  189. package/frontend/dist/ui/pseudo.js +14 -17
  190. package/frontend/dist/ui/scroller.d.ts +10 -48
  191. package/frontend/dist/ui/scroller.js +306 -300
  192. package/frontend/dist/ui/slider.d.ts +9 -3
  193. package/frontend/dist/ui/slider.js +31 -17
  194. package/frontend/dist/ui/spacer.d.ts +0 -9
  195. package/frontend/dist/ui/spacer.js +21 -26
  196. package/frontend/dist/ui/span.js +13 -15
  197. package/frontend/dist/ui/stack.d.ts +14 -75
  198. package/frontend/dist/ui/stack.js +166 -169
  199. package/frontend/dist/ui/steps.d.ts +10 -23
  200. package/frontend/dist/ui/steps.js +47 -34
  201. package/frontend/dist/ui/style.d.ts +4 -3
  202. package/frontend/dist/ui/style.js +13 -18
  203. package/frontend/dist/ui/switch.d.ts +10 -4
  204. package/frontend/dist/ui/switch.js +24 -16
  205. package/frontend/dist/ui/table.d.ts +0 -23
  206. package/frontend/dist/ui/table.js +113 -119
  207. package/frontend/dist/ui/tabs.d.ts +3 -19
  208. package/frontend/dist/ui/tabs.js +35 -29
  209. package/frontend/dist/ui/text.d.ts +0 -8
  210. package/frontend/dist/ui/text.js +20 -25
  211. package/frontend/dist/ui/title.d.ts +0 -15
  212. package/frontend/dist/ui/title.js +39 -45
  213. package/frontend/dist/ui/ui.d.ts +0 -2
  214. package/frontend/dist/ui/ui.js +0 -2
  215. package/frontend/dist/ui/view.d.ts +3 -17
  216. package/frontend/dist/ui/view.js +27 -32
  217. package/frontend/dist/volt.d.ts +2 -1
  218. package/frontend/dist/volt.js +3 -1
  219. package/frontend/examples/dashboard/dashboard.ts +774 -0
  220. package/frontend/examples/theme/theme.ts +58 -0
  221. package/frontend/src/css/volt.css +5 -0
  222. package/frontend/src/elements/base.ts +767 -545
  223. package/frontend/src/elements/module.ts +90 -29
  224. package/frontend/src/elements/register_element.ts +24 -0
  225. package/frontend/src/modules/auth.ts +7 -6
  226. package/frontend/src/modules/color.ts +348 -0
  227. package/frontend/src/modules/colors.ts +468 -449
  228. package/frontend/src/modules/cookies.ts +1 -0
  229. package/frontend/src/modules/events.ts +1 -0
  230. package/frontend/src/modules/google.ts +1 -0
  231. package/frontend/src/modules/meta.ts +2 -1
  232. package/frontend/src/modules/mutex.ts +2 -4
  233. package/frontend/src/modules/paddle.ts +21 -20
  234. package/frontend/src/modules/scheme.ts +4 -3
  235. package/frontend/src/modules/statics.ts +2 -1
  236. package/frontend/src/modules/support.ts +3 -2
  237. package/frontend/src/modules/theme.ts +413 -0
  238. package/frontend/src/modules/themes.ts +2 -1
  239. package/frontend/src/modules/user.ts +12 -11
  240. package/frontend/src/modules/utils.ts +125 -2
  241. package/frontend/src/ui/border_button.ts +41 -37
  242. package/frontend/src/ui/button.ts +33 -32
  243. package/frontend/src/ui/canvas.ts +5 -2
  244. package/frontend/src/ui/checkbox.ts +21 -22
  245. package/frontend/src/ui/code.ts +92 -86
  246. package/frontend/src/ui/context_menu.ts +7 -5
  247. package/frontend/src/ui/css.ts +1 -1
  248. package/frontend/src/ui/divider.ts +15 -10
  249. package/frontend/src/ui/dropdown.ts +38 -21
  250. package/frontend/src/ui/for_each.ts +9 -8
  251. package/frontend/src/ui/form.ts +26 -21
  252. package/frontend/src/ui/frame_modes.ts +13 -17
  253. package/frontend/src/ui/google_map.ts +15 -13
  254. package/frontend/src/ui/gradient.ts +9 -8
  255. package/frontend/src/ui/image.ts +108 -86
  256. package/frontend/src/ui/input.ts +145 -144
  257. package/frontend/src/ui/link.ts +25 -23
  258. package/frontend/src/ui/list.ts +12 -6
  259. package/frontend/src/ui/loader_button.ts +26 -25
  260. package/frontend/src/ui/loaders.ts +12 -11
  261. package/frontend/src/ui/popup.ts +168 -14
  262. package/frontend/src/ui/pseudo.ts +5 -3
  263. package/frontend/src/ui/scroller.ts +303 -294
  264. package/frontend/src/ui/slider.ts +15 -10
  265. package/frontend/src/ui/spacer.ts +14 -11
  266. package/frontend/src/ui/span.ts +6 -2
  267. package/frontend/src/ui/stack.ts +196 -183
  268. package/frontend/src/ui/steps.ts +38 -22
  269. package/frontend/src/ui/style.ts +7 -4
  270. package/frontend/src/ui/switch.ts +16 -11
  271. package/frontend/src/ui/table.ts +42 -34
  272. package/frontend/src/ui/tabs.ts +20 -19
  273. package/frontend/src/ui/text.ts +12 -11
  274. package/frontend/src/ui/title.ts +22 -20
  275. package/frontend/src/ui/ui.ts +0 -2
  276. package/frontend/src/ui/view.ts +20 -19
  277. package/frontend/src/volt.ts +3 -1
  278. package/frontend/{compile.js → tools/compile.old.js} +2 -2
  279. package/frontend/tools/embed_scripts.js +69 -0
  280. package/frontend/tsconfig.json +26 -0
  281. package/package.json +8 -8
  282. package/frontend/dist/ui/theme.d.ts +0 -25
  283. package/frontend/exports.json +0 -1340
  284. package/frontend/src/modules/date.js +0 -535
  285. package/frontend/src/ui/color.ts +0 -117
  286. package/frontend/src/ui/theme.ts +0 -279
  287. /package/backend/src/{vinc.dev.js → vinc.dev.ts} +0 -0
@@ -36,10 +36,6 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
36
36
  }
37
37
  return useValue ? value : void 0;
38
38
  };
39
- var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
40
- if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
41
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
42
- };
43
39
  // Imports.
44
40
  import { Elements, VDiv, VElementTagMap } from "../elements/module.js";
45
41
  // BorderButton.
@@ -48,13 +44,57 @@ import { Elements, VDiv, VElementTagMap } from "../elements/module.js";
48
44
  * Warning: this class is still experimental and may be subject to future change.
49
45
  */
50
46
  let BorderButtonElement = (() => {
51
- var _a;
52
- let _classDecorators = [(_a = Elements).register.bind(_a)];
47
+ let _classDecorators = [Elements.create({
48
+ name: "BorderButtonElement",
49
+ default_style: {
50
+ "margin": "0px 0px 0px 0px",
51
+ "display": "inline-block",
52
+ "color": "inherit",
53
+ "text-align": "center",
54
+ "cursor": "pointer",
55
+ "position": "relative",
56
+ "z-index": "0",
57
+ "background": "none",
58
+ "user-select": "none",
59
+ "outline": "none",
60
+ "border": "none",
61
+ "text-decoration": "none",
62
+ // Custom.
63
+ "--child-color": "black",
64
+ "--child-background": "black",
65
+ "--child-border-width": "2px",
66
+ "--child-border-radius": "10px",
67
+ "--child-padding": "5px 10px 5px 10px",
68
+ },
69
+ default_events: {
70
+ "onmousedown": function () {
71
+ this.style.filter = "brightness(80%)";
72
+ },
73
+ "onmouseover": function () {
74
+ this.style.filter = "brightness(90%)";
75
+ },
76
+ "onmouseup": function () {
77
+ this.style.filter = "brightness(100%)";
78
+ },
79
+ "onmouseout": function () {
80
+ this.style.filter = "brightness(100%)";
81
+ },
82
+ },
83
+ })];
53
84
  let _classDescriptor;
54
85
  let _classExtraInitializers = [];
55
86
  let _classThis;
56
87
  let _classSuper = VElementTagMap.a;
57
- var BorderButtonElement = _classThis = class extends _classSuper {
88
+ var BorderButtonElement = class extends _classSuper {
89
+ static { _classThis = this; }
90
+ static {
91
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
92
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
93
+ BorderButtonElement = _classThis = _classDescriptor.value;
94
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
95
+ __runInitializers(_classThis, _classExtraInitializers);
96
+ }
97
+ nodes;
58
98
  /**
59
99
  * @docs:
60
100
  * @title: Constructor
@@ -180,54 +220,13 @@ let BorderButtonElement = (() => {
180
220
  if (val == null) {
181
221
  return this.nodes.border.transition();
182
222
  }
223
+ else if (/[0-9]/.test(val.charAt(0))) {
224
+ val = "border-color " + val;
225
+ }
183
226
  this.nodes.border.transition(typeof val !== "string" ? val : val.replace("border-color ", "background "));
184
227
  return this;
185
228
  }
186
229
  };
187
- __setFunctionName(_classThis, "BorderButtonElement");
188
- (() => {
189
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
190
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
191
- BorderButtonElement = _classThis = _classDescriptor.value;
192
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
193
- })();
194
- _classThis.default_style = {
195
- "margin": "0px 0px 0px 0px",
196
- "display": "inline-block",
197
- "color": "inherit",
198
- "text-align": "center",
199
- "cursor": "pointer",
200
- "position": "relative",
201
- "z-index": "0",
202
- "background": "none",
203
- "user-select": "none",
204
- "outline": "none",
205
- "border": "none",
206
- "text-decoration": "none",
207
- // Custom.
208
- "--child-color": "black",
209
- "--child-background": "black",
210
- "--child-border-width": "2px",
211
- "--child-border-radius": "10px",
212
- "--child-padding": "5px 10px 5px 10px",
213
- };
214
- _classThis.default_events = {
215
- "onmousedown": function () {
216
- this.style.filter = "brightness(80%)";
217
- },
218
- "onmouseover": function () {
219
- this.style.filter = "brightness(90%)";
220
- },
221
- "onmouseup": function () {
222
- this.style.filter = "brightness(100%)";
223
- },
224
- "onmouseout": function () {
225
- this.style.filter = "brightness(100%)";
226
- },
227
- };
228
- (() => {
229
- __runInitializers(_classThis, _classExtraInitializers);
230
- })();
231
230
  return BorderButtonElement = _classThis;
232
231
  })();
233
232
  export { BorderButtonElement };
@@ -1,26 +1,5 @@
1
1
  import { VElementTagMap } from "../elements/module.js";
2
2
  export declare class ButtonElement extends VElementTagMap.a {
3
- static default_style: {
4
- margin: string;
5
- padding: string;
6
- outline: string;
7
- border: string;
8
- "border-radius": string;
9
- cursor: string;
10
- color: string;
11
- "text-align": string;
12
- display: string;
13
- "align-items": string;
14
- "white-space": string;
15
- "user-select": string;
16
- "text-decoration": string;
17
- };
18
- static default_events: {
19
- onmousedown: (this: any) => void;
20
- onmouseover: (this: any) => void;
21
- onmouseup: (this: any) => void;
22
- onmouseout: (this: any) => void;
23
- };
24
3
  /**
25
4
  * @docs:
26
5
  * @nav: Frontend
@@ -36,21 +36,55 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
36
36
  }
37
37
  return useValue ? value : void 0;
38
38
  };
39
- var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
40
- if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
41
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
42
- };
43
39
  // Imports.
44
40
  import { Elements, VElementTagMap } from "../elements/module.js";
45
41
  // Button.
46
42
  let ButtonElement = (() => {
47
- var _a;
48
- let _classDecorators = [(_a = Elements).register.bind(_a)];
43
+ let _classDecorators = [Elements.create({
44
+ name: "ButtonElement",
45
+ default_style: {
46
+ "margin": "0px 0px 0px",
47
+ "padding": "5px 10px 5px 10px",
48
+ "outline": "none",
49
+ "border": "none",
50
+ "border-radius": "10px",
51
+ "cursor": "pointer",
52
+ "color": "inherit",
53
+ "text-align": "center",
54
+ "display": "grid",
55
+ "align-items": "center",
56
+ "white-space": "nowrap",
57
+ "user-select": "none",
58
+ "text-decoration": "none",
59
+ },
60
+ default_events: {
61
+ "onmousedown": function () {
62
+ this.style.filter = "brightness(80%)";
63
+ },
64
+ "onmouseover": function () {
65
+ this.style.filter = "brightness(90%)";
66
+ },
67
+ "onmouseup": function () {
68
+ this.style.filter = "brightness(100%)";
69
+ },
70
+ "onmouseout": function () {
71
+ this.style.filter = "brightness(100%)";
72
+ },
73
+ },
74
+ })];
49
75
  let _classDescriptor;
50
76
  let _classExtraInitializers = [];
51
77
  let _classThis;
52
78
  let _classSuper = VElementTagMap.a;
53
- var ButtonElement = _classThis = class extends _classSuper {
79
+ var ButtonElement = class extends _classSuper {
80
+ static { _classThis = this; }
81
+ static {
82
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
83
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
84
+ ButtonElement = _classThis = _classDescriptor.value;
85
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
86
+ __runInitializers(_classThis, _classExtraInitializers);
87
+ }
54
88
  /**
55
89
  * @docs:
56
90
  * @nav: Frontend
@@ -68,45 +102,6 @@ let ButtonElement = (() => {
68
102
  this.inner_html(text);
69
103
  }
70
104
  };
71
- __setFunctionName(_classThis, "ButtonElement");
72
- (() => {
73
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
74
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
75
- ButtonElement = _classThis = _classDescriptor.value;
76
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
77
- })();
78
- _classThis.default_style = {
79
- "margin": "0px 0px 0px",
80
- "padding": "5px 10px 5px 10px",
81
- "outline": "none",
82
- "border": "none",
83
- "border-radius": "10px",
84
- "cursor": "pointer",
85
- "color": "inherit",
86
- "text-align": "center",
87
- "display": "grid",
88
- "align-items": "center",
89
- "white-space": "nowrap",
90
- "user-select": "none",
91
- "text-decoration": "none",
92
- };
93
- _classThis.default_events = {
94
- "onmousedown": function () {
95
- this.style.filter = "brightness(80%)";
96
- },
97
- "onmouseover": function () {
98
- this.style.filter = "brightness(90%)";
99
- },
100
- "onmouseup": function () {
101
- this.style.filter = "brightness(100%)";
102
- },
103
- "onmouseout": function () {
104
- this.style.filter = "brightness(100%)";
105
- },
106
- };
107
- (() => {
108
- __runInitializers(_classThis, _classExtraInitializers);
109
- })();
110
105
  return ButtonElement = _classThis;
111
106
  })();
112
107
  export { ButtonElement };
@@ -36,10 +36,6 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
36
36
  }
37
37
  return useValue ? value : void 0;
38
38
  };
39
- var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
40
- if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
41
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
42
- };
43
39
  // Imports.
44
40
  import { Utils } from "../modules/utils.js";
45
41
  import { Elements, VElementTagMap } from "../elements/module.js";
@@ -56,13 +52,25 @@ import { GradientType } from "../types/gradient.js";
56
52
  * This class is still experimental and may be subject to future change.
57
53
  */
58
54
  let CanvasElement = (() => {
59
- var _a;
60
- let _classDecorators = [(_a = Elements).register.bind(_a)];
55
+ let _classDecorators = [Elements.create({
56
+ name: "CanvasElement",
57
+ })];
61
58
  let _classDescriptor;
62
59
  let _classExtraInitializers = [];
63
60
  let _classThis;
64
61
  let _classSuper = VElementTagMap.canvas;
65
- var CanvasElement = _classThis = class extends _classSuper {
62
+ var CanvasElement = class extends _classSuper {
63
+ static { _classThis = this; }
64
+ static {
65
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
66
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
67
+ CanvasElement = _classThis = _classDescriptor.value;
68
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
69
+ __runInitializers(_classThis, _classExtraInitializers);
70
+ }
71
+ // Attributes.
72
+ _e;
73
+ ctx_2d;
66
74
  // ---------------------------------------------------------
67
75
  // Constructors.
68
76
  constructor() {
@@ -385,14 +393,6 @@ let CanvasElement = (() => {
385
393
  return this;
386
394
  }
387
395
  };
388
- __setFunctionName(_classThis, "CanvasElement");
389
- (() => {
390
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
391
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
392
- CanvasElement = _classThis = _classDescriptor.value;
393
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
394
- __runInitializers(_classThis, _classExtraInitializers);
395
- })();
396
396
  return CanvasElement = _classThis;
397
397
  })();
398
398
  export { CanvasElement };
@@ -1,3 +1,4 @@
1
+ import { VElementBaseSignature } from "../elements/module.js";
1
2
  import { VStackElement, HStackElement } from "./stack";
2
3
  import { TextElement } from "./text";
3
4
  interface CircleExtension {
@@ -6,23 +7,8 @@ interface CircleExtension {
6
7
  value(to?: boolean): this;
7
8
  inner: VStackElement;
8
9
  }
9
- export declare class CheckBoxElement extends VStackElement {
10
- static default_style: {
11
- color: string;
12
- "font-size": string;
13
- "--circle-border-color": string;
14
- "--circle-inner-bg": string;
15
- "--focus-color": string;
16
- "--missing-color": string;
17
- margin: string;
18
- padding: string;
19
- display: string;
20
- overflow: string;
21
- "align-content": string;
22
- "flex-direction": string;
23
- outline: string;
24
- border: string;
25
- };
10
+ declare const CheckBoxElement_base: VElementBaseSignature;
11
+ export declare class CheckBoxElement extends CheckBoxElement_base {
26
12
  _border_color: string;
27
13
  _inner_bg: string;
28
14
  _focus_color: string;
@@ -36,23 +36,51 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
36
36
  }
37
37
  return useValue ? value : void 0;
38
38
  };
39
- var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
40
- if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
41
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
42
- };
43
39
  // Imports.
44
40
  import { Elements } from "../elements/module.js";
45
41
  import { VStack, VStackElement, HStack } from "./stack";
46
42
  import { Text } from "./text";
47
43
  // Extended input.
48
44
  let CheckBoxElement = (() => {
49
- var _a;
50
- let _classDecorators = [(_a = Elements).register.bind(_a)];
45
+ let _classDecorators = [Elements.create({
46
+ name: "CheckBoxElement",
47
+ default_style: {
48
+ ...VStackElement.default_style,
49
+ "color": "inherit",
50
+ "font-size": "16px",
51
+ // Custom.
52
+ "--circle-border-color": "gray",
53
+ "--circle-inner-bg": "#FFFFFF",
54
+ "--focus-color": "#8EB8EB",
55
+ "--missing-color": "#E8454E",
56
+ },
57
+ })];
51
58
  let _classDescriptor;
52
59
  let _classExtraInitializers = [];
53
60
  let _classThis;
54
61
  let _classSuper = VStackElement;
55
- var CheckBoxElement = _classThis = class extends _classSuper {
62
+ var CheckBoxElement = class extends _classSuper {
63
+ static { _classThis = this; }
64
+ static {
65
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
66
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
67
+ CheckBoxElement = _classThis = _classDescriptor.value;
68
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
69
+ __runInitializers(_classThis, _classExtraInitializers);
70
+ }
71
+ // Attributes.
72
+ _border_color;
73
+ _inner_bg;
74
+ _focus_color;
75
+ _missing_color;
76
+ _missing;
77
+ _required;
78
+ circle;
79
+ // @ts-expect-error
80
+ text;
81
+ // @ts-expect-error
82
+ content;
83
+ error;
56
84
  // Constructor.
57
85
  constructor(text_or_obj = {
58
86
  text: "",
@@ -61,7 +89,7 @@ let CheckBoxElement = (() => {
61
89
  }) {
62
90
  // Initialize super.
63
91
  super();
64
- this._init_derived({
92
+ this._init({
65
93
  derived: CheckBoxElement,
66
94
  });
67
95
  // Args.
@@ -248,28 +276,6 @@ let CheckBoxElement = (() => {
248
276
  return value;
249
277
  }
250
278
  };
251
- __setFunctionName(_classThis, "CheckBoxElement");
252
- (() => {
253
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
254
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
255
- CheckBoxElement = _classThis = _classDescriptor.value;
256
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
257
- })();
258
- // Default styling.
259
- // static default_style = Object.assign({}, HStackElement.default_style, {
260
- _classThis.default_style = {
261
- ...VStackElement.default_style,
262
- "color": "inherit",
263
- "font-size": "16px",
264
- // Custom.
265
- "--circle-border-color": "gray",
266
- "--circle-inner-bg": "#FFFFFF",
267
- "--focus-color": "#8EB8EB",
268
- "--missing-color": "#E8454E",
269
- };
270
- (() => {
271
- __runInitializers(_classThis, _classExtraInitializers);
272
- })();
273
279
  return CheckBoxElement = _classThis;
274
280
  })();
275
281
  export { CheckBoxElement };
@@ -1,30 +1,8 @@
1
- import { VElementTagMap, VDivElement } from "../elements/module.js";
1
+ import { VElementBaseSignature, VElementTagMap, VDivElement } from "../elements/module.js";
2
2
  import { VStackElement, HStackElement } from "./stack";
3
3
  import { ImageMaskElement } from "./image";
4
4
  import { DividerElement } from "./divider";
5
5
  export declare class CodeBlockElement extends VElementTagMap.code {
6
- static default_style: {
7
- display: string;
8
- "flex-direction": string;
9
- margin: string;
10
- padding: string;
11
- "text-align": string;
12
- "white-space": string;
13
- "font-family": string;
14
- "font-size": string;
15
- "font-weight": string;
16
- "line-height": string;
17
- "border-radius": string;
18
- color: string;
19
- background: string;
20
- overflow: string;
21
- width: string;
22
- "min-width": string;
23
- "--header-color": string;
24
- "--header-border": string;
25
- "--header-background": string;
26
- "--selected-language-color": string;
27
- };
28
6
  language?: string;
29
7
  line_numbers?: boolean;
30
8
  line_divider?: boolean;
@@ -40,13 +18,13 @@ export declare class CodeBlockElement extends VElementTagMap.code {
40
18
  constructor(code_or_opts?: string | {
41
19
  code: string;
42
20
  language?: string;
43
- line_numbers: boolean;
44
- line_divider: boolean;
45
- animate: boolean;
46
- delay: number;
21
+ line_numbers?: boolean;
22
+ line_divider?: boolean;
23
+ animate?: boolean;
24
+ delay?: number;
47
25
  duration?: number;
48
- already_highlighted: boolean;
49
- opts: Record<string, any>;
26
+ already_highlighted?: boolean;
27
+ opts?: Record<string, any>;
50
28
  });
51
29
  hide_scrollbar(): this;
52
30
  show_scrollbar(): this;
@@ -72,13 +50,13 @@ export declare class CodeBlockElement extends VElementTagMap.code {
72
50
  export declare const CodeBlock: <Extensions extends object = {}>(code_or_opts?: string | {
73
51
  code: string;
74
52
  language?: string;
75
- line_numbers: boolean;
76
- line_divider: boolean;
77
- animate: boolean;
78
- delay: number;
53
+ line_numbers?: boolean;
54
+ line_divider?: boolean;
55
+ animate?: boolean;
56
+ delay?: number;
79
57
  duration?: number;
80
- already_highlighted: boolean;
81
- opts: Record<string, any>;
58
+ already_highlighted?: boolean;
59
+ opts?: Record<string, any>;
82
60
  } | undefined) => CodeBlockElement & Extensions;
83
61
  export declare const NullCodeBlock: <Extensions extends object = {}>() => CodeBlockElement & Extensions;
84
62
  declare module './any_element.d.ts' {
@@ -87,21 +65,6 @@ declare module './any_element.d.ts' {
87
65
  }
88
66
  }
89
67
  export declare class CodePreElement extends VElementTagMap.pre {
90
- static default_style: {
91
- margin: string;
92
- padding: string;
93
- "text-align": string;
94
- "white-space": string;
95
- "font-family": string;
96
- "font-size": string;
97
- "font-weight": string;
98
- "line-height": string;
99
- "border-radius": string;
100
- color: string;
101
- background: string;
102
- "tab-size": number;
103
- overflow: string;
104
- };
105
68
  code: string;
106
69
  tokens: any;
107
70
  allow_animation: any;
@@ -139,16 +102,6 @@ declare module './any_element.d.ts' {
139
102
  }
140
103
  }
141
104
  export declare class CodeLineElement extends VElementTagMap.span {
142
- static default_style: {
143
- "font-family": string;
144
- "font-size": string;
145
- "font-style": string;
146
- background: string;
147
- color: string;
148
- "border-radius": string;
149
- "white-space": string;
150
- padding: string;
151
- };
152
105
  constructor(text?: string);
153
106
  static fill(text: any, codeline_callback?: () => CodeLineElement): string;
154
107
  }
@@ -171,28 +124,8 @@ interface HeaderExtension {
171
124
  set_selected(index: number): this;
172
125
  select(lang_or_index: number | string, recursive?: boolean): this;
173
126
  }
174
- export declare class MultiLanguageCodeBlockElement extends VStackElement {
175
- static default_style: {
176
- "font-family": string;
177
- background: string;
178
- color: string;
179
- "box-shadow": string;
180
- "font-size": string;
181
- "line-height": string;
182
- "border-radius": string;
183
- "tab-size": number;
184
- "--mlcb-tint": string;
185
- "--mlcb-div-bg": string;
186
- "--mlcb-title-opac": number;
187
- margin: string;
188
- padding: string;
189
- display: string;
190
- overflow: string;
191
- "align-content": string;
192
- "flex-direction": string;
193
- outline: string;
194
- border: string;
195
- };
127
+ declare const MultiLanguageCodeBlockElement_base: VElementBaseSignature;
128
+ export declare class MultiLanguageCodeBlockElement extends MultiLanguageCodeBlockElement_base {
196
129
  _fg: string;
197
130
  _tint: string;
198
131
  _div_bg: string;