@vandenberghinc/volt 1.1.4 → 1.1.6

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 (290) hide show
  1. package/backend/dist/cjs/database.d.ts +41 -68
  2. package/backend/dist/cjs/database.js +136 -78
  3. package/backend/dist/cjs/endpoint.d.ts +23 -9
  4. package/backend/dist/cjs/endpoint.js +98 -21
  5. package/backend/dist/cjs/file_watcher.js +2 -2
  6. package/backend/dist/cjs/frontend.d.ts +0 -2
  7. package/backend/dist/cjs/frontend.js +9 -9
  8. package/backend/dist/cjs/image_endpoint.d.ts +3 -1
  9. package/backend/dist/cjs/image_endpoint.js +2 -1
  10. package/backend/dist/cjs/payments/paddle.js +10 -2
  11. package/backend/dist/cjs/plugins/css.d.ts +6 -5
  12. package/backend/dist/cjs/plugins/css.js +32 -7
  13. package/backend/dist/cjs/plugins/ts/compiler.d.ts +6 -1
  14. package/backend/dist/cjs/plugins/ts/compiler.js +26 -2
  15. package/backend/dist/cjs/plugins/ts/preprocessing.js +5 -3
  16. package/backend/dist/cjs/server.d.ts +7 -13
  17. package/backend/dist/cjs/server.js +184 -303
  18. package/backend/dist/cjs/status.d.ts +1 -0
  19. package/backend/dist/cjs/status.js +2 -1
  20. package/backend/dist/cjs/stream.d.ts +5 -3
  21. package/backend/dist/cjs/stream.js +13 -4
  22. package/backend/dist/cjs/users.d.ts +1 -1
  23. package/backend/dist/cjs/users.js +87 -72
  24. package/backend/dist/cjs/utils.d.ts +17 -9
  25. package/backend/dist/cjs/utils.js +22 -64
  26. package/backend/dist/cjs/view.d.ts +2 -2
  27. package/backend/dist/cjs/view.js +38 -40
  28. package/backend/dist/cjs/volt.d.ts +3 -2
  29. package/backend/dist/cjs/volt.js +2 -2
  30. package/backend/dist/css/volt.css +5 -0
  31. package/backend/dist/esm/database.d.ts +41 -68
  32. package/backend/dist/esm/database.js +137 -79
  33. package/backend/dist/esm/endpoint.d.ts +23 -9
  34. package/backend/dist/esm/endpoint.js +99 -22
  35. package/backend/dist/esm/file_watcher.js +2 -2
  36. package/backend/dist/esm/frontend.d.ts +0 -2
  37. package/backend/dist/esm/frontend.js +9 -9
  38. package/backend/dist/esm/image_endpoint.d.ts +3 -1
  39. package/backend/dist/esm/image_endpoint.js +2 -1
  40. package/backend/dist/esm/payments/paddle.js +11 -3
  41. package/backend/dist/esm/plugins/css.d.ts +6 -5
  42. package/backend/dist/esm/plugins/css.js +32 -6
  43. package/backend/dist/esm/plugins/ts/compiler.d.ts +6 -1
  44. package/backend/dist/esm/plugins/ts/compiler.js +26 -2
  45. package/backend/dist/esm/plugins/ts/preprocessing.js +5 -3
  46. package/backend/dist/esm/server.d.ts +7 -13
  47. package/backend/dist/esm/server.js +182 -301
  48. package/backend/dist/esm/status.d.ts +1 -0
  49. package/backend/dist/esm/status.js +1 -0
  50. package/backend/dist/esm/stream.d.ts +5 -3
  51. package/backend/dist/esm/stream.js +13 -4
  52. package/backend/dist/esm/users.d.ts +1 -1
  53. package/backend/dist/esm/users.js +87 -72
  54. package/backend/dist/esm/utils.d.ts +17 -9
  55. package/backend/dist/esm/utils.js +21 -62
  56. package/backend/dist/esm/view.d.ts +2 -2
  57. package/backend/dist/esm/view.js +38 -40
  58. package/backend/dist/esm/volt.d.ts +3 -2
  59. package/backend/dist/esm/volt.js +2 -1
  60. package/backend/dist/esm-dev/blacklist.js +1 -1
  61. package/backend/dist/esm-dev/cli.js +2 -2
  62. package/backend/dist/esm-dev/database.d.ts +41 -68
  63. package/backend/dist/esm-dev/database.js +138 -80
  64. package/backend/dist/esm-dev/endpoint.d.ts +23 -9
  65. package/backend/dist/esm-dev/endpoint.js +100 -23
  66. package/backend/dist/esm-dev/file_watcher.js +3 -3
  67. package/backend/dist/esm-dev/frontend.d.ts +0 -2
  68. package/backend/dist/esm-dev/frontend.js +9 -9
  69. package/backend/dist/esm-dev/image_endpoint.d.ts +3 -1
  70. package/backend/dist/esm-dev/image_endpoint.js +2 -1
  71. package/backend/dist/esm-dev/logger.js +1 -1
  72. package/backend/dist/esm-dev/payments/paddle.js +12 -4
  73. package/backend/dist/esm-dev/plugins/css.d.ts +6 -5
  74. package/backend/dist/esm-dev/plugins/css.js +33 -7
  75. package/backend/dist/esm-dev/plugins/ts/compiler.d.ts +6 -1
  76. package/backend/dist/esm-dev/plugins/ts/compiler.js +27 -3
  77. package/backend/dist/esm-dev/plugins/ts/preprocessing.js +7 -5
  78. package/backend/dist/esm-dev/rate_limit.js +1 -1
  79. package/backend/dist/esm-dev/server.d.ts +7 -13
  80. package/backend/dist/esm-dev/server.js +184 -303
  81. package/backend/dist/esm-dev/status.d.ts +1 -0
  82. package/backend/dist/esm-dev/status.js +1 -0
  83. package/backend/dist/esm-dev/stream.d.ts +5 -3
  84. package/backend/dist/esm-dev/stream.js +13 -4
  85. package/backend/dist/esm-dev/users.d.ts +1 -1
  86. package/backend/dist/esm-dev/users.js +88 -73
  87. package/backend/dist/esm-dev/utils.d.ts +17 -9
  88. package/backend/dist/esm-dev/utils.js +22 -63
  89. package/backend/dist/esm-dev/view.d.ts +2 -2
  90. package/backend/dist/esm-dev/view.js +39 -41
  91. package/backend/dist/esm-dev/volt.d.ts +3 -2
  92. package/backend/dist/esm-dev/volt.js +2 -1
  93. package/backend/src/database.ts +173 -155
  94. package/backend/src/endpoint.ts +123 -31
  95. package/backend/src/file_watcher.ts +2 -2
  96. package/backend/src/frontend.ts +9 -8
  97. package/backend/src/image_endpoint.ts +4 -0
  98. package/backend/src/payments/paddle.ts +11 -3
  99. package/backend/src/plugins/css.ts +36 -8
  100. package/backend/src/plugins/ts/compiler.ts +37 -1
  101. package/backend/src/plugins/ts/preprocessing.ts +5 -3
  102. package/backend/src/server.ts +167 -306
  103. package/backend/src/status.ts +1 -0
  104. package/backend/src/stream.ts +28 -8
  105. package/backend/src/users.ts +87 -72
  106. package/backend/src/utils.ts +58 -25
  107. package/backend/src/view.ts +30 -28
  108. package/backend/src/{volt.js → volt.ts} +2 -1
  109. package/backend/tsconfig.cjs.json +3 -3
  110. package/backend/tsconfig.esm.json +3 -3
  111. package/frontend/dist/elements/base.d.ts +414 -432
  112. package/frontend/dist/elements/base.js +566 -329
  113. package/frontend/dist/elements/module.d.ts +26 -12
  114. package/frontend/dist/elements/module.js +69 -32
  115. package/frontend/dist/elements/register_element.d.ts +3 -0
  116. package/frontend/dist/elements/register_element.js +22 -0
  117. package/frontend/dist/modules/auth.d.ts +1 -0
  118. package/frontend/dist/modules/auth.js +6 -5
  119. package/frontend/dist/modules/color.d.ts +159 -0
  120. package/frontend/dist/modules/color.js +315 -0
  121. package/frontend/dist/modules/colors.d.ts +1 -26
  122. package/frontend/dist/modules/colors.js +417 -340
  123. package/frontend/dist/modules/cookies.d.ts +1 -0
  124. package/frontend/dist/modules/cookies.js +1 -0
  125. package/frontend/dist/modules/events.d.ts +1 -0
  126. package/frontend/dist/modules/events.js +1 -0
  127. package/frontend/dist/modules/google.d.ts +1 -0
  128. package/frontend/dist/modules/google.js +1 -0
  129. package/frontend/dist/modules/meta.d.ts +1 -0
  130. package/frontend/dist/modules/meta.js +1 -0
  131. package/frontend/dist/modules/mutex.d.ts +1 -2
  132. package/frontend/dist/modules/mutex.js +3 -4
  133. package/frontend/dist/modules/paddle.d.ts +1 -0
  134. package/frontend/dist/modules/paddle.js +14 -13
  135. package/frontend/dist/modules/scheme.d.ts +1 -0
  136. package/frontend/dist/modules/scheme.js +5 -3
  137. package/frontend/dist/modules/statics.d.ts +1 -0
  138. package/frontend/dist/modules/statics.js +1 -0
  139. package/frontend/dist/modules/support.d.ts +1 -0
  140. package/frontend/dist/modules/support.js +3 -2
  141. package/frontend/dist/modules/theme.d.ts +56 -0
  142. package/frontend/dist/{ui → modules}/theme.js +186 -75
  143. package/frontend/dist/modules/themes.d.ts +1 -1
  144. package/frontend/dist/modules/themes.js +1 -0
  145. package/frontend/dist/modules/user.d.ts +1 -0
  146. package/frontend/dist/modules/user.js +11 -10
  147. package/frontend/dist/modules/utils.d.ts +23 -2
  148. package/frontend/dist/modules/utils.js +93 -1
  149. package/frontend/dist/types/gradient.js +4 -0
  150. package/frontend/dist/ui/border_button.d.ts +0 -25
  151. package/frontend/dist/ui/border_button.js +50 -51
  152. package/frontend/dist/ui/button.d.ts +0 -21
  153. package/frontend/dist/ui/button.js +41 -46
  154. package/frontend/dist/ui/canvas.js +15 -15
  155. package/frontend/dist/ui/checkbox.d.ts +3 -17
  156. package/frontend/dist/ui/checkbox.js +36 -30
  157. package/frontend/dist/ui/code.d.ts +15 -82
  158. package/frontend/dist/ui/code.js +150 -125
  159. package/frontend/dist/ui/color.d.ts +0 -1
  160. package/frontend/dist/ui/color.js +1 -1
  161. package/frontend/dist/ui/context_menu.d.ts +4 -2
  162. package/frontend/dist/ui/context_menu.js +16 -17
  163. package/frontend/dist/ui/css.js +2 -0
  164. package/frontend/dist/ui/divider.d.ts +0 -7
  165. package/frontend/dist/ui/divider.js +21 -25
  166. package/frontend/dist/ui/dropdown.d.ts +13 -7
  167. package/frontend/dist/ui/dropdown.js +65 -30
  168. package/frontend/dist/ui/for_each.d.ts +0 -5
  169. package/frontend/dist/ui/for_each.js +17 -22
  170. package/frontend/dist/ui/form.d.ts +17 -12
  171. package/frontend/dist/ui/form.js +21 -18
  172. package/frontend/dist/ui/frame_modes.d.ts +9 -12
  173. package/frontend/dist/ui/frame_modes.js +8 -10
  174. package/frontend/dist/ui/google_map.d.ts +0 -11
  175. package/frontend/dist/ui/google_map.js +23 -28
  176. package/frontend/dist/ui/gradient.d.ts +0 -5
  177. package/frontend/dist/ui/gradient.js +17 -22
  178. package/frontend/dist/ui/image.d.ts +27 -58
  179. package/frontend/dist/ui/image.js +99 -93
  180. package/frontend/dist/ui/input.d.ts +20 -97
  181. package/frontend/dist/ui/input.js +192 -170
  182. package/frontend/dist/ui/link.d.ts +0 -18
  183. package/frontend/dist/ui/link.js +42 -48
  184. package/frontend/dist/ui/list.js +36 -37
  185. package/frontend/dist/ui/loader_button.d.ts +4 -19
  186. package/frontend/dist/ui/loader_button.js +35 -37
  187. package/frontend/dist/ui/loaders.d.ts +0 -8
  188. package/frontend/dist/ui/loaders.js +20 -25
  189. package/frontend/dist/ui/popup.d.ts +11 -8
  190. package/frontend/dist/ui/popup.js +183 -24
  191. package/frontend/dist/ui/pseudo.d.ts +3 -3
  192. package/frontend/dist/ui/pseudo.js +14 -17
  193. package/frontend/dist/ui/scroller.d.ts +10 -48
  194. package/frontend/dist/ui/scroller.js +306 -300
  195. package/frontend/dist/ui/slider.d.ts +9 -3
  196. package/frontend/dist/ui/slider.js +31 -17
  197. package/frontend/dist/ui/spacer.d.ts +0 -9
  198. package/frontend/dist/ui/spacer.js +21 -26
  199. package/frontend/dist/ui/span.js +13 -15
  200. package/frontend/dist/ui/stack.d.ts +14 -75
  201. package/frontend/dist/ui/stack.js +166 -169
  202. package/frontend/dist/ui/steps.d.ts +10 -23
  203. package/frontend/dist/ui/steps.js +47 -34
  204. package/frontend/dist/ui/style.d.ts +4 -3
  205. package/frontend/dist/ui/style.js +13 -18
  206. package/frontend/dist/ui/switch.d.ts +10 -4
  207. package/frontend/dist/ui/switch.js +24 -16
  208. package/frontend/dist/ui/table.d.ts +0 -23
  209. package/frontend/dist/ui/table.js +113 -119
  210. package/frontend/dist/ui/tabs.d.ts +3 -19
  211. package/frontend/dist/ui/tabs.js +35 -29
  212. package/frontend/dist/ui/text.d.ts +0 -8
  213. package/frontend/dist/ui/text.js +20 -25
  214. package/frontend/dist/ui/title.d.ts +0 -15
  215. package/frontend/dist/ui/title.js +39 -45
  216. package/frontend/dist/ui/ui.d.ts +0 -2
  217. package/frontend/dist/ui/ui.js +0 -2
  218. package/frontend/dist/ui/view.d.ts +3 -17
  219. package/frontend/dist/ui/view.js +27 -32
  220. package/frontend/dist/volt.d.ts +2 -1
  221. package/frontend/dist/volt.js +3 -1
  222. package/frontend/examples/dashboard/dashboard.ts +774 -0
  223. package/frontend/examples/theme/theme.ts +58 -0
  224. package/frontend/src/css/volt.css +5 -0
  225. package/frontend/src/elements/base.ts +767 -545
  226. package/frontend/src/elements/module.ts +90 -29
  227. package/frontend/src/elements/register_element.ts +24 -0
  228. package/frontend/src/modules/auth.ts +7 -6
  229. package/frontend/src/modules/color.ts +348 -0
  230. package/frontend/src/modules/colors.ts +468 -449
  231. package/frontend/src/modules/cookies.ts +1 -0
  232. package/frontend/src/modules/events.ts +1 -0
  233. package/frontend/src/modules/google.ts +1 -0
  234. package/frontend/src/modules/meta.ts +2 -1
  235. package/frontend/src/modules/mutex.ts +2 -4
  236. package/frontend/src/modules/paddle.ts +21 -20
  237. package/frontend/src/modules/scheme.ts +5 -4
  238. package/frontend/src/modules/statics.ts +2 -1
  239. package/frontend/src/modules/support.ts +3 -2
  240. package/frontend/src/modules/theme.ts +413 -0
  241. package/frontend/src/modules/themes.ts +2 -1
  242. package/frontend/src/modules/user.ts +12 -11
  243. package/frontend/src/modules/utils.ts +125 -2
  244. package/frontend/src/ui/border_button.ts +41 -37
  245. package/frontend/src/ui/button.ts +33 -32
  246. package/frontend/src/ui/canvas.ts +5 -2
  247. package/frontend/src/ui/checkbox.ts +21 -22
  248. package/frontend/src/ui/code.ts +92 -86
  249. package/frontend/src/ui/context_menu.ts +7 -5
  250. package/frontend/src/ui/css.ts +1 -1
  251. package/frontend/src/ui/divider.ts +15 -10
  252. package/frontend/src/ui/dropdown.ts +38 -21
  253. package/frontend/src/ui/for_each.ts +9 -8
  254. package/frontend/src/ui/form.ts +26 -21
  255. package/frontend/src/ui/frame_modes.ts +13 -17
  256. package/frontend/src/ui/google_map.ts +15 -13
  257. package/frontend/src/ui/gradient.ts +9 -8
  258. package/frontend/src/ui/image.ts +108 -86
  259. package/frontend/src/ui/input.ts +145 -144
  260. package/frontend/src/ui/link.ts +25 -23
  261. package/frontend/src/ui/list.ts +12 -6
  262. package/frontend/src/ui/loader_button.ts +26 -25
  263. package/frontend/src/ui/loaders.ts +12 -11
  264. package/frontend/src/ui/popup.ts +168 -14
  265. package/frontend/src/ui/pseudo.ts +5 -3
  266. package/frontend/src/ui/scroller.ts +303 -294
  267. package/frontend/src/ui/slider.ts +15 -10
  268. package/frontend/src/ui/spacer.ts +14 -11
  269. package/frontend/src/ui/span.ts +6 -2
  270. package/frontend/src/ui/stack.ts +196 -183
  271. package/frontend/src/ui/steps.ts +38 -22
  272. package/frontend/src/ui/style.ts +7 -4
  273. package/frontend/src/ui/switch.ts +16 -11
  274. package/frontend/src/ui/table.ts +42 -34
  275. package/frontend/src/ui/tabs.ts +20 -19
  276. package/frontend/src/ui/text.ts +12 -11
  277. package/frontend/src/ui/title.ts +22 -20
  278. package/frontend/src/ui/ui.ts +0 -2
  279. package/frontend/src/ui/view.ts +20 -19
  280. package/frontend/src/volt.ts +3 -1
  281. package/frontend/{compile.js → tools/compile.old.js} +2 -2
  282. package/frontend/tools/embed_scripts.js +69 -0
  283. package/frontend/tsconfig.json +26 -0
  284. package/package.json +7 -6
  285. package/frontend/dist/ui/theme.d.ts +0 -25
  286. package/frontend/exports.json +0 -1340
  287. package/frontend/src/modules/date.js +0 -535
  288. package/frontend/src/ui/color.ts +0 -117
  289. package/frontend/src/ui/theme.ts +0 -279
  290. /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, VElementTagMap } from "../elements/module.js";
45
41
  import { Utils } from "../modules/utils.js";
@@ -51,13 +47,41 @@ import { Scroller } from "./scroller";
51
47
  import { Divider } from "./divider";
52
48
  // Input.
53
49
  let InputElement = (() => {
54
- var _a;
55
- let _classDecorators = [(_a = Elements).register.bind(_a)];
50
+ let _classDecorators = [Elements.create({
51
+ name: "InputElement",
52
+ default_style: {
53
+ "margin": "0px 0px 0px 0px",
54
+ "padding": "2.5px 5px 2.5px 5px",
55
+ "font": "inherit",
56
+ "color": "inherit",
57
+ "background": "none",
58
+ "outline": "none",
59
+ "border": "none",
60
+ "border-radius": "10px",
61
+ "text-align": "start",
62
+ "white-space": "nowrap",
63
+ },
64
+ default_attributes: {
65
+ "spellcheck": "false",
66
+ "autocorrect": "off",
67
+ "autocapitalize": "none",
68
+ },
69
+ })];
56
70
  let _classDescriptor;
57
71
  let _classExtraInitializers = [];
58
72
  let _classThis;
59
73
  let _classSuper = VElementTagMap.input;
60
- var InputElement = _classThis = class extends _classSuper {
74
+ var InputElement = class extends _classSuper {
75
+ static { _classThis = this; }
76
+ static {
77
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
78
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
79
+ InputElement = _classThis = _classDescriptor.value;
80
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
81
+ __runInitializers(_classThis, _classExtraInitializers);
82
+ }
83
+ // Attributes.
84
+ _e;
61
85
  // Constructor.
62
86
  constructor(placeholder, type = "text", value) {
63
87
  // Initialize base class.
@@ -156,33 +180,6 @@ let InputElement = (() => {
156
180
  return this;
157
181
  }
158
182
  };
159
- __setFunctionName(_classThis, "InputElement");
160
- (() => {
161
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
162
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
163
- InputElement = _classThis = _classDescriptor.value;
164
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
165
- })();
166
- _classThis.default_style = {
167
- "margin": "0px 0px 0px 0px",
168
- "padding": "2.5px 5px 2.5px 5px",
169
- "font": "inherit",
170
- "color": "inherit",
171
- "background": "none",
172
- "outline": "none",
173
- "border": "none",
174
- "border-radius": "10px",
175
- "text-align": "start",
176
- "white-space": "nowrap",
177
- };
178
- _classThis.default_attributes = {
179
- "spellcheck": "false",
180
- "autocorrect": "off",
181
- "autocapitalize": "none",
182
- };
183
- (() => {
184
- __runInitializers(_classThis, _classExtraInitializers);
185
- })();
186
183
  return InputElement = _classThis;
187
184
  })();
188
185
  export { InputElement };
@@ -190,13 +187,43 @@ export const Input = Elements.wrapper(InputElement);
190
187
  export const NullInput = Elements.create_null(InputElement);
191
188
  // InputBox.
192
189
  let InputBoxElement = (() => {
193
- var _a;
194
- let _classDecorators = [(_a = Elements).register.bind(_a)];
190
+ let _classDecorators = [Elements.create({
191
+ name: "InputBoxElement",
192
+ default_style: {
193
+ "margin": "0px 0px 0px 0px",
194
+ "padding": "2.5px 5px 2.5px 5px",
195
+ "height": "20px",
196
+ "font": "inherit",
197
+ "color": "inherit",
198
+ "background": "none",
199
+ "outline": "none",
200
+ "border": "none",
201
+ "border-radius": "10px",
202
+ "text-align": "start",
203
+ "white-space": "wrap",
204
+ "resize": "none",
205
+ },
206
+ default_attributes: {
207
+ "spellcheck": "false",
208
+ "autocorrect": "off",
209
+ "autocapitalize": "none",
210
+ },
211
+ })];
195
212
  let _classDescriptor;
196
213
  let _classExtraInitializers = [];
197
214
  let _classThis;
198
215
  let _classSuper = VElementTagMap.textarea;
199
- var InputBoxElement = _classThis = class extends _classSuper {
216
+ var InputBoxElement = class extends _classSuper {
217
+ static { _classThis = this; }
218
+ static {
219
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
220
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
221
+ InputBoxElement = _classThis = _classDescriptor.value;
222
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
223
+ __runInitializers(_classThis, _classExtraInitializers);
224
+ }
225
+ // Attributes.
226
+ _e;
200
227
  // Constructor.
201
228
  constructor(placeholder) {
202
229
  // Initialize base class.
@@ -294,35 +321,6 @@ let InputBoxElement = (() => {
294
321
  return this;
295
322
  }
296
323
  };
297
- __setFunctionName(_classThis, "InputBoxElement");
298
- (() => {
299
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
300
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
301
- InputBoxElement = _classThis = _classDescriptor.value;
302
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
303
- })();
304
- _classThis.default_style = {
305
- "margin": "0px 0px 0px 0px",
306
- "padding": "2.5px 5px 2.5px 5px",
307
- "height": "20px",
308
- "font": "inherit",
309
- "color": "inherit",
310
- "background": "none",
311
- "outline": "none",
312
- "border": "none",
313
- "border-radius": "10px",
314
- "text-align": "start",
315
- "white-space": "wrap",
316
- "resize": "none",
317
- };
318
- _classThis.default_attributes = {
319
- "spellcheck": "false",
320
- "autocorrect": "off",
321
- "autocapitalize": "none",
322
- };
323
- (() => {
324
- __runInitializers(_classThis, _classExtraInitializers);
325
- })();
326
324
  return InputBoxElement = _classThis;
327
325
  })();
328
326
  export { InputBoxElement };
@@ -330,19 +328,60 @@ export const InputBox = Elements.wrapper(InputBoxElement);
330
328
  export const NullInputBox = Elements.create_null(InputBoxElement);
331
329
  // Extended input.
332
330
  let ExtendedInputElement = (() => {
333
- var _a;
334
- let _classDecorators = [(_a = Elements).register.bind(_a)];
331
+ let _classDecorators = [Elements.create({
332
+ name: "ExtendedInputElement",
333
+ default_style: {
334
+ ...VStackElement.default_style,
335
+ "color": "inherit",
336
+ "font-size": "16px",
337
+ // Custom.
338
+ "--input-padding": "12px 6px",
339
+ "--input-border-radius": "5px",
340
+ "--input-border-color": "gray",
341
+ "--input-hover-border-color": "gray",
342
+ "--input-background": "transparent",
343
+ "--image-mask-color": "#000",
344
+ "--image-size": "20px",
345
+ "--image-margin-right": "10px",
346
+ "--image-margin-left": "5px",
347
+ "--image-alt": "VWeb",
348
+ "--focus-color": "#8EB8EB",
349
+ "--missing-color": "#E8454E",
350
+ },
351
+ })];
335
352
  let _classDescriptor;
336
353
  let _classExtraInitializers = [];
337
354
  let _classThis;
338
355
  let _classSuper = VStackElement;
339
- var ExtendedInputElement = _classThis = class extends _classSuper {
356
+ var ExtendedInputElement = class extends _classSuper {
357
+ static { _classThis = this; }
358
+ static {
359
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
360
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
361
+ ExtendedInputElement = _classThis = _classDescriptor.value;
362
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
363
+ __runInitializers(_classThis, _classExtraInitializers);
364
+ }
365
+ _focus_color;
366
+ _missing_color;
367
+ _mask_color;
368
+ _initial_border_color;
369
+ _hover_border_color;
370
+ // @ts-expect-error
371
+ label;
372
+ image;
373
+ input;
374
+ input_border;
375
+ container;
376
+ error;
377
+ is_missing = false;
378
+ is_focused = false;
340
379
  // @todo add readonly func
341
380
  // Constructor.
342
381
  constructor({ label = undefined, image = undefined, alt = undefined, placeholder = "Input", id = undefined, readonly = false, required = false, type = "text", value = undefined, }) {
343
382
  // Initialize super.
344
383
  super();
345
- this._init_derived({
384
+ this._init({
346
385
  derived: ExtendedInputElement,
347
386
  });
348
387
  // Set id.
@@ -350,19 +389,18 @@ let ExtendedInputElement = (() => {
350
389
  this.id(id);
351
390
  }
352
391
  // Attributes.
353
- this.element_type = "ExtendedInput";
354
392
  this._focus_color = ExtendedInputElement.default_style["--focus-color"];
355
393
  this._missing_color = ExtendedInputElement.default_style["--missing-color"];
356
394
  this._mask_color = ExtendedInputElement.default_style["--image-mask-color"];
357
- this._initial_border_color = "black";
358
- this._missing = false;
395
+ this._initial_border_color = ExtendedInputElement.default_style["--input-border-color"];
396
+ this._hover_border_color = ExtendedInputElement.default_style["--input-hover-border-color"];
359
397
  // Set default styling.
360
398
  this.styles(ExtendedInputElement.default_style);
361
399
  // Title element.
362
400
  this.label = Text(label)
363
401
  .parent(this)
364
402
  .font_size("inherit")
365
- .margin(0, 0, 5, 0)
403
+ .margin(0, 0, 7.5, 0)
366
404
  .color("inherit")
367
405
  .width("fit-content")
368
406
  .ellipsis_overflow(true);
@@ -404,26 +442,16 @@ let ExtendedInputElement = (() => {
404
442
  .outline("none")
405
443
  .z_index(1)
406
444
  .border_radius(0) // is required.
407
- // .on_focus(() => {
408
- // if (this._missing !== true) {
409
- // this.container.outline(`1px solid ${this._focus_color}`)
410
- // this.container.box_shadow(`0 0 0 3px ${this._focus_color}80`)
411
- // }
412
- // })
413
- // .on_blur(() => {
414
- // if (this._missing !== true) {
415
- // this.container.outline("0px solid transparent")
416
- // this.container.box_shadow(`0 0 0 0px transparent`)
417
- // }
418
- // })
419
445
  .on_focus(() => {
420
- if (this._missing !== true) {
446
+ if (!this.is_missing) {
447
+ this.is_focused = true;
421
448
  this.input_border.border_color(this._focus_color);
422
449
  this.container.box_shadow(`0 0 0 3px ${this._focus_color}80`);
423
450
  }
424
451
  })
425
452
  .on_blur(() => {
426
- if (this._missing !== true) {
453
+ if (!this.is_missing) {
454
+ this.is_focused = false;
427
455
  this.input_border.border_color(this._initial_border_color);
428
456
  this.container.box_shadow(`0 0 0 0px transparent`);
429
457
  }
@@ -440,6 +468,7 @@ let ExtendedInputElement = (() => {
440
468
  .transition("background 200ms ease-in-out");
441
469
  // The hstack container.
442
470
  this.container = HStack(VStack(this.image)
471
+ .width("fit-content")
443
472
  .height("1.6em")
444
473
  .center_vertical(), this.input_border, this.input)
445
474
  .parent(this)
@@ -449,7 +478,16 @@ let ExtendedInputElement = (() => {
449
478
  .transition("box-shadow 0.2s ease-in-out")
450
479
  .outline("0px solid transparent")
451
480
  .box_shadow(`0 0 0 0px transparent`)
452
- .width("100%");
481
+ .width("100%")
482
+ .on_mouse_over_out((e) => {
483
+ if (!this.is_missing && !this.is_focused) {
484
+ this.input_border.border_color(this._hover_border_color);
485
+ }
486
+ }, (e) => {
487
+ if (!this.is_missing && !this.is_focused) {
488
+ this.input_border.border_color(this._initial_border_color);
489
+ }
490
+ });
453
491
  // The error message.
454
492
  this.error = Text("Incomplete field")
455
493
  .color(this._missing_color)
@@ -480,6 +518,7 @@ let ExtendedInputElement = (() => {
480
518
  styles["--input-padding"] = this.container.padding();
481
519
  styles["--input-border-radius"] = this.container.border_radius();
482
520
  styles["--input-border-color"] = this.container.border_color();
521
+ styles["--input-hover-border-color"] = this._hover_border_color;
483
522
  styles["--image-mask-color"] = this._mask_color;
484
523
  styles["--image-size"] = this.image.width().toString();
485
524
  styles["--image-margin-right"] = this.image.margin_right().toString();
@@ -514,10 +553,10 @@ let ExtendedInputElement = (() => {
514
553
  }
515
554
  missing(to, err = "Incomplete field") {
516
555
  if (to == null) {
517
- return this._missing;
556
+ return this.is_missing;
518
557
  }
519
558
  else if (to === true) {
520
- this._missing = true;
559
+ this.is_missing = true;
521
560
  this.input_border.border_color(this._missing_color);
522
561
  // this.container.outline(`1px solid ${this._missing_color}`)
523
562
  this.container.box_shadow(`0 0 0 3px ${this._missing_color}80`);
@@ -528,7 +567,7 @@ let ExtendedInputElement = (() => {
528
567
  }
529
568
  }
530
569
  else {
531
- this._missing = false;
570
+ this.is_missing = false;
532
571
  this.input_border.border_color(this._initial_border_color);
533
572
  // this.container.outline("0px solid transparent")
534
573
  this.container.box_shadow(`0 0 0 0px transparent`);
@@ -604,6 +643,13 @@ let ExtendedInputElement = (() => {
604
643
  this.input_border.border_color(val);
605
644
  return this;
606
645
  }
646
+ hover_border_color(val) {
647
+ if (val == null) {
648
+ return this._hover_border_color;
649
+ }
650
+ this._hover_border_color = val;
651
+ return this;
652
+ }
607
653
  border_width(val) { if (val == null) {
608
654
  return this.container.border_width();
609
655
  } this.container.border_width(val); this.input_border.border_width(val); return this; }
@@ -628,33 +674,6 @@ let ExtendedInputElement = (() => {
628
674
  return this;
629
675
  }
630
676
  };
631
- __setFunctionName(_classThis, "ExtendedInputElement");
632
- (() => {
633
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
634
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
635
- ExtendedInputElement = _classThis = _classDescriptor.value;
636
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
637
- })();
638
- _classThis.default_style = {
639
- ...VStackElement.default_style,
640
- "color": "inherit",
641
- "font-size": "16px",
642
- // Custom.
643
- "--input-padding": "12px 6px",
644
- "--input-border-radius": "5px",
645
- "--input-border-color": "gray",
646
- "--input-background": "transparent",
647
- "--image-mask-color": "#000",
648
- "--image-size": "20px",
649
- "--image-margin-right": "10px",
650
- "--image-margin-left": "5px",
651
- "--image-alt": "VWeb",
652
- "--focus-color": "#8EB8EB",
653
- "--missing-color": "#E8454E",
654
- };
655
- (() => {
656
- __runInitializers(_classThis, _classExtraInitializers);
657
- })();
658
677
  return ExtendedInputElement = _classThis;
659
678
  })();
660
679
  export { ExtendedInputElement };
@@ -662,19 +681,64 @@ export const ExtendedInput = Elements.wrapper(ExtendedInputElement);
662
681
  export const NullExtendedInput = Elements.create_null(ExtendedInputElement);
663
682
  // Extended input.
664
683
  let ExtendedSelectElement = (() => {
665
- var _a;
666
- let _classDecorators = [(_a = Elements).register.bind(_a)];
684
+ let _classDecorators = [Elements.create({
685
+ name: "ExtendedSelectElement",
686
+ default_style: {
687
+ ...VStackElement.default_style,
688
+ "color": "inherit",
689
+ "font-size": "16px",
690
+ "background": "#FFFFFF",
691
+ // Custom.
692
+ "--input-padding": "12px 6px",
693
+ "--input-border-radius": "5px",
694
+ "--input-border-color": "gray",
695
+ "--image-mask-color": "#000",
696
+ "--image-size": "20px",
697
+ "--image-margin-right": "10px",
698
+ "--image-margin-left": "5px",
699
+ "--image-alt": "VWeb",
700
+ "--hover-bg": "#00000007",
701
+ "--focus-color": "#8EB8EB",
702
+ "--missing-color": "#E8454E",
703
+ }
704
+ })];
667
705
  let _classDescriptor;
668
706
  let _classExtraInitializers = [];
669
707
  let _classThis;
670
708
  let _classSuper = VStackElement;
671
- var ExtendedSelectElement = _classThis = class extends _classSuper {
709
+ var ExtendedSelectElement = class extends _classSuper {
710
+ static { _classThis = this; }
711
+ static {
712
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
713
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
714
+ ExtendedSelectElement = _classThis = _classDescriptor.value;
715
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
716
+ __runInitializers(_classThis, _classExtraInitializers);
717
+ }
718
+ _focus_color;
719
+ _missing_color;
720
+ _mask_color;
721
+ _border_color;
722
+ _hover_bg;
723
+ items;
724
+ // @ts-expect-error
725
+ label;
726
+ image;
727
+ input;
728
+ container;
729
+ error;
730
+ dropdown;
731
+ is_missing = false;
732
+ _on_change_callback;
733
+ _on_dropdown_close;
734
+ _dropdown_height;
735
+ _value;
672
736
  // Constructor.
673
737
  constructor({ label = undefined, image = undefined, alt = "", placeholder = "Placeholder", id = undefined, required = false, items = [{ id: "option", text: "Option", image: undefined }], // may also be an array with strings which will be used as the item's id and text.
674
738
  }) {
675
739
  // Initialize super.
676
740
  super();
677
- this._init_derived({
741
+ this._init({
678
742
  derived: ExtendedSelectElement,
679
743
  });
680
744
  // Arguments.
@@ -715,22 +779,19 @@ let ExtendedSelectElement = (() => {
715
779
  else {
716
780
  throw Error(`Parameter "items" should be a defined value of type "array" or "object".`);
717
781
  }
718
- // Default attributes.
719
- this.element_type = "ExtendedSelect";
720
782
  // Attributes.
721
783
  this._focus_color = ExtendedSelectElement.default_style["--focus-color"];
722
784
  this._missing_color = ExtendedSelectElement.default_style["--missing-color"];
723
785
  this._mask_color = ExtendedSelectElement.default_style["--image-mask-color"];
724
786
  this._border_color = ExtendedSelectElement.default_style["--input-border-color"];
725
787
  this._hover_bg = ExtendedSelectElement.default_style["--hover-bg"];
726
- this._missing = false;
727
788
  // Set default styling.
728
789
  this.styles(ExtendedSelectElement.default_style);
729
790
  // Title element.
730
791
  this.label = Text(label)
731
792
  .parent(this)
732
793
  .font_size("inherit")
733
- .margin(0, 0, 5, 0)
794
+ .margin(0, 0, 7.5, 0)
734
795
  .color("inherit")
735
796
  .width("fit-content")
736
797
  .ellipsis_overflow(true);
@@ -764,20 +825,9 @@ let ExtendedSelectElement = (() => {
764
825
  .box_shadow("none")
765
826
  .cursor("pointer")
766
827
  .border_radius(0); // is required
767
- // .on_focus(() => {
768
- // if (this._missing !== true) {
769
- // this.container.outline(`1px solid ${this._focus_color}`)
770
- // this.container.box_shadow(`0 0 0 3px ${this._focus_color}80`)
771
- // }
772
- // })
773
- // .on_blur(() => {
774
- // if (this._missing !== true) {
775
- // this.container.outline("0px solid transparent")
776
- // this.container.box_shadow(`0 0 0 0px transparent`)
777
- // }
778
- // })
779
828
  // The hstack container.
780
829
  this.container = HStack(VStack(this.image)
830
+ .width("fit-content")
781
831
  .height("1.6em")
782
832
  .center_vertical(), this.input)
783
833
  .parent(this)
@@ -898,10 +948,10 @@ let ExtendedSelectElement = (() => {
898
948
  }
899
949
  missing(to, err = "Incomplete field") {
900
950
  if (to == null) {
901
- return this._missing;
951
+ return this.is_missing;
902
952
  }
903
953
  else if (to === true) {
904
- this._missing = true;
954
+ this.is_missing = true;
905
955
  this.container.outline(`1px solid ${this._missing_color}`);
906
956
  this.container.box_shadow(`0 0 0 3px ${this._missing_color}80`);
907
957
  this.image.mask_color(this._missing_color);
@@ -911,7 +961,7 @@ let ExtendedSelectElement = (() => {
911
961
  }
912
962
  }
913
963
  else {
914
- this._missing = false;
964
+ this.is_missing = false;
915
965
  this.container.outline("0px solid transparent");
916
966
  this.container.box_shadow(`0 0 0 0px transparent`);
917
967
  this.image.mask_color(this._mask_color);
@@ -1152,34 +1202,6 @@ let ExtendedSelectElement = (() => {
1152
1202
  return this.input.required();
1153
1203
  } this.input.required(val); return this; }
1154
1204
  };
1155
- __setFunctionName(_classThis, "ExtendedSelectElement");
1156
- (() => {
1157
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1158
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1159
- ExtendedSelectElement = _classThis = _classDescriptor.value;
1160
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1161
- })();
1162
- _classThis.default_style = {
1163
- ...VStackElement.default_style,
1164
- "color": "inherit",
1165
- "font-size": "16px",
1166
- "background": "#FFFFFF",
1167
- // Custom.
1168
- "--input-padding": "12px 6px",
1169
- "--input-border-radius": "5px",
1170
- "--input-border-color": "gray",
1171
- "--image-mask-color": "#000",
1172
- "--image-size": "20px",
1173
- "--image-margin-right": "10px",
1174
- "--image-margin-left": "5px",
1175
- "--image-alt": "VWeb",
1176
- "--hover-bg": "#00000007",
1177
- "--focus-color": "#8EB8EB",
1178
- "--missing-color": "#E8454E",
1179
- };
1180
- (() => {
1181
- __runInitializers(_classThis, _classExtraInitializers);
1182
- })();
1183
1205
  return ExtendedSelectElement = _classThis;
1184
1206
  })();
1185
1207
  export { ExtendedSelectElement };
@@ -1,15 +1,5 @@
1
1
  import { VElementTagMap } from "../elements/module.js";
2
2
  export declare class AnchorElement extends VElementTagMap.a {
3
- static default_style: {
4
- "font-family": string;
5
- "font-size": string;
6
- color: string;
7
- "text-decoration": string;
8
- "text-underline-position": string;
9
- cursor: string;
10
- outline: string;
11
- border: string;
12
- };
13
3
  constructor(text?: string, href?: string, alt?: string);
14
4
  }
15
5
  export declare const Anchor: <Extensions extends object = {}>(text?: string | undefined, href?: string | undefined, alt?: string | undefined) => AnchorElement & Extensions;
@@ -20,14 +10,6 @@ declare module './any_element.d.ts' {
20
10
  }
21
11
  }
22
12
  export declare class LinkElement extends VElementTagMap.a {
23
- static default_style: {
24
- "font-family": string;
25
- "font-size": string;
26
- color: string;
27
- "text-decoration": string;
28
- "text-underline-position": string;
29
- cursor: string;
30
- };
31
13
  constructor(text?: string, href?: string);
32
14
  }
33
15
  export declare const Link: <Extensions extends object = {}>(text?: string | undefined, href?: string | undefined) => LinkElement & Extensions;