@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
  // @exports: CodeBlockElement, CodeBlock, CodePreElement, CodePre, CodeLineElement, CodeLine, MultiLanguageCodeBlockElement, MultiLanguageCodeBlock
44
40
  // Imports.
45
41
  import { Utils } from "../modules/utils.js";
@@ -51,18 +47,66 @@ import { ForEach } from "./for_each";
51
47
  import { Spacer } from "./spacer";
52
48
  import { Divider } from "./divider";
53
49
  // import * as vhighlight from "/Users/administrator/persistance/private/dev/vinc/vhighlight"
54
- import * as vhighlight from "../../../../vhighlight/dist/web";
50
+ import * as vhighlight from "vhighlight";
55
51
  // All codeblocks using languages.
56
52
  const language_codeblocks = [];
57
53
  // CodeBlock.
58
54
  let CodeBlockElement = (() => {
59
- var _a;
60
- let _classDecorators = [(_a = Elements).register.bind(_a)];
55
+ let _classDecorators = [Elements.create({
56
+ name: "CodeBlockElement",
57
+ default_style: {
58
+ "display": "flex",
59
+ "flex-direction": "column",
60
+ "margin": "0px 0px 0px 0px",
61
+ "padding": "15px 20px 15px 20px",
62
+ "text-align": "start",
63
+ "white-space": "pre",
64
+ "font-family": "'Menlo', 'Consolas', monospace",
65
+ "font-size": "13px",
66
+ "font-weight": "500",
67
+ "line-height": "18px",
68
+ "border-radius": "15px",
69
+ "color": "#FFFFFF",
70
+ "background": "#262F3D",
71
+ "overflow": "hidden", // only the content should scroll so the header remains fixed.
72
+ "width": "100%",
73
+ "min-width": "100%",
74
+ "--header-color": "inherit",
75
+ "--header-border": "#00000010",
76
+ "--header-background": "inherit",
77
+ "--selected-language-color": "inherit",
78
+ },
79
+ })];
61
80
  let _classDescriptor;
62
81
  let _classExtraInitializers = [];
63
82
  let _classThis;
64
83
  let _classSuper = VElementTagMap.code;
65
- var CodeBlockElement = _classThis = class extends _classSuper {
84
+ var CodeBlockElement = class extends _classSuper {
85
+ static { _classThis = this; }
86
+ static {
87
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
88
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
89
+ CodeBlockElement = _classThis = _classDescriptor.value;
90
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
91
+ __runInitializers(_classThis, _classExtraInitializers);
92
+ }
93
+ // Attributes.
94
+ language;
95
+ line_numbers;
96
+ line_divider;
97
+ // @ts-expect-error
98
+ animate;
99
+ // @ts-expect-error
100
+ delay;
101
+ // @ts-expect-error
102
+ duration;
103
+ already_highlighted;
104
+ opts;
105
+ pre;
106
+ lines;
107
+ lines_divider;
108
+ // @ts-expect-error
109
+ content;
66
110
  // Constructor.
67
111
  constructor(code_or_opts = {
68
112
  code: "", // the code data.
@@ -159,13 +203,14 @@ let CodeBlockElement = (() => {
159
203
  // The content.
160
204
  this.content = HStack(this.lines, this.lines_divider, this.pre)
161
205
  .parent(this)
162
- .padding(CodeBlockElement.default_style.padding)
206
+ // .padding(CodeBlockElement.default_style.padding)
163
207
  .flex_wrap("nowrap")
164
208
  .overflow("auto visible");
165
209
  // Append code pre.
166
210
  this.append(this.content);
167
211
  // Set padding.
168
- this.padding(0);
212
+ // this.padding(0)
213
+ this.padding(CodeBlockElement.default_style.padding);
169
214
  }
170
215
  // Hide/show the scrollbar.
171
216
  hide_scrollbar() {
@@ -245,38 +290,6 @@ let CodeBlockElement = (() => {
245
290
  return this;
246
291
  }
247
292
  };
248
- __setFunctionName(_classThis, "CodeBlockElement");
249
- (() => {
250
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
251
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
252
- CodeBlockElement = _classThis = _classDescriptor.value;
253
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
254
- })();
255
- _classThis.default_style = {
256
- "display": "flex",
257
- "flex-direction": "column",
258
- "margin": "0px 0px 0px 0px",
259
- "padding": "15px 20px 15px 20px",
260
- "text-align": "start",
261
- "white-space": "pre",
262
- "font-family": "'Menlo', 'Consolas', monospace",
263
- "font-size": "13px",
264
- "font-weight": "500",
265
- "line-height": "18px",
266
- "border-radius": "15px",
267
- "color": "#FFFFFF",
268
- "background": "#262F3D",
269
- "overflow": "hidden", // only the content should scroll so the header remains fixed.
270
- "width": "100%",
271
- "min-width": "100%",
272
- "--header-color": "inherit",
273
- "--header-border": "#00000010",
274
- "--header-background": "inherit",
275
- "--selected-language-color": "inherit",
276
- };
277
- (() => {
278
- __runInitializers(_classThis, _classExtraInitializers);
279
- })();
280
293
  return CodeBlockElement = _classThis;
281
294
  })();
282
295
  export { CodeBlockElement };
@@ -284,21 +297,50 @@ export const CodeBlock = Elements.wrapper(CodeBlockElement);
284
297
  export const NullCodeBlock = Elements.create_null(CodeBlockElement);
285
298
  // CodePre.
286
299
  let CodePreElement = (() => {
287
- var _a;
288
- let _classDecorators = [(_a = Elements).register.bind(_a)];
300
+ let _classDecorators = [Elements.create({
301
+ name: "CodePreElement",
302
+ default_style: {
303
+ "margin": "0px 0px 0px 0px",
304
+ "padding": "15px 20px 15px 20px",
305
+ "text-align": "start",
306
+ "white-space": "pre",
307
+ "font-family": "'Menlo', 'Consolas', monospace",
308
+ "font-size": "13px",
309
+ "font-weight": "500",
310
+ "line-height": "16px",
311
+ "border-radius": "15px",
312
+ "color": "#FFFFFF",
313
+ "background": "#262F3D",
314
+ "tab-size": 4,
315
+ "overflow": "scroll visible",
316
+ },
317
+ })];
289
318
  let _classDescriptor;
290
319
  let _classExtraInitializers = [];
291
320
  let _classThis;
292
321
  let _classSuper = VElementTagMap.pre;
293
- var CodePreElement = _classThis = class extends _classSuper {
322
+ var CodePreElement = class extends _classSuper {
323
+ static { _classThis = this; }
324
+ static {
325
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
326
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
327
+ CodePreElement = _classThis = _classDescriptor.value;
328
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
329
+ __runInitializers(_classThis, _classExtraInitializers);
330
+ }
331
+ // Attributes.
332
+ code;
333
+ tokens = null;
334
+ allow_animation;
335
+ animate_promise;
336
+ tokenizer;
337
+ language = "";
294
338
  // Constructor.
295
339
  constructor(code = "") {
296
340
  // Initialize base class.
297
341
  super({
298
342
  derived: CodePreElement,
299
343
  });
300
- this.tokens = null;
301
- this.language = "";
302
344
  // Attributes.
303
345
  this.code = code;
304
346
  // Set code.
@@ -515,31 +557,6 @@ let CodePreElement = (() => {
515
557
  return this;
516
558
  }
517
559
  };
518
- __setFunctionName(_classThis, "CodePreElement");
519
- (() => {
520
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
521
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
522
- CodePreElement = _classThis = _classDescriptor.value;
523
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
524
- })();
525
- _classThis.default_style = {
526
- "margin": "0px 0px 0px 0px",
527
- "padding": "15px 20px 15px 20px",
528
- "text-align": "start",
529
- "white-space": "pre",
530
- "font-family": "'Menlo', 'Consolas', monospace",
531
- "font-size": "13px",
532
- "font-weight": "500",
533
- "line-height": "16px",
534
- "border-radius": "15px",
535
- "color": "#FFFFFF",
536
- "background": "#262F3D",
537
- "tab-size": 4,
538
- "overflow": "scroll visible",
539
- };
540
- (() => {
541
- __runInitializers(_classThis, _classExtraInitializers);
542
- })();
543
560
  return CodePreElement = _classThis;
544
561
  })();
545
562
  export { CodePreElement };
@@ -557,13 +574,32 @@ export const NullCodePre = Elements.create_null(CodePreElement);
557
574
  @descr: The code line content.
558
575
  */
559
576
  let CodeLineElement = (() => {
560
- var _a;
561
- let _classDecorators = [(_a = Elements).register.bind(_a)];
577
+ let _classDecorators = [Elements.create({
578
+ name: "CodeLineElement",
579
+ default_style: {
580
+ "font-family": "\"Menlo\", \"Consolas\", monospace",
581
+ "font-size": "0.90em",
582
+ "font-style": "italic",
583
+ "background": "#000000",
584
+ "color": "#FFFFFF",
585
+ "border-radius": "10px",
586
+ "white-space": "pre",
587
+ "padding": "2.5px 7.5px 2.5px 7.5px",
588
+ }
589
+ })];
562
590
  let _classDescriptor;
563
591
  let _classExtraInitializers = [];
564
592
  let _classThis;
565
593
  let _classSuper = VElementTagMap.span;
566
- var CodeLineElement = _classThis = class extends _classSuper {
594
+ var CodeLineElement = class extends _classSuper {
595
+ static { _classThis = this; }
596
+ static {
597
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
598
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
599
+ CodeLineElement = _classThis = _classDescriptor.value;
600
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
601
+ __runInitializers(_classThis, _classExtraInitializers);
602
+ }
567
603
  // Constructor.
568
604
  constructor(text) {
569
605
  // Initialize base class.
@@ -599,26 +635,6 @@ let CodeLineElement = (() => {
599
635
  return text;
600
636
  }
601
637
  };
602
- __setFunctionName(_classThis, "CodeLineElement");
603
- (() => {
604
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
605
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
606
- CodeLineElement = _classThis = _classDescriptor.value;
607
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
608
- })();
609
- _classThis.default_style = {
610
- "font-family": "\"Menlo\", \"Consolas\", monospace",
611
- "font-size": "0.90em",
612
- "font-style": "italic",
613
- "background": "#000000",
614
- "color": "#FFFFFF",
615
- "border-radius": "10px",
616
- "white-space": "pre",
617
- "padding": "2.5px 7.5px 2.5px 7.5px",
618
- };
619
- (() => {
620
- __runInitializers(_classThis, _classExtraInitializers);
621
- })();
622
638
  return CodeLineElement = _classThis;
623
639
  })();
624
640
  export { CodeLineElement };
@@ -650,20 +666,53 @@ export const NullCodeLine = Elements.create_null(CodeLineElement);
650
666
  @descr: Highlight the code content.
651
667
  */
652
668
  let MultiLanguageCodeBlockElement = (() => {
653
- var _a;
654
- let _classDecorators = [(_a = Elements).register.bind(_a)];
669
+ let _classDecorators = [Elements.create({
670
+ name: "MultiLanguageCodeBlockElement",
671
+ default_style: {
672
+ ...VStackElement.default_style,
673
+ "font-family": "'Menlo', 'Consolas', monospace",
674
+ "background": "black",
675
+ "color": "white",
676
+ "box-shadow": "0px 0px 5px #00000005",
677
+ "font-size": "13px",
678
+ "line-height": "18px",
679
+ "border-radius": "10px",
680
+ "tab-size": 4,
681
+ "--mlcb-tint": "white",
682
+ "--mlcb-div-bg": "grey",
683
+ "--mlcb-title-opac": 0.7,
684
+ },
685
+ })];
655
686
  let _classDescriptor;
656
687
  let _classExtraInitializers = [];
657
688
  let _classThis;
658
689
  let _classSuper = VStackElement;
659
- var MultiLanguageCodeBlockElement = _classThis = class extends _classSuper {
690
+ var MultiLanguageCodeBlockElement = class extends _classSuper {
691
+ static { _classThis = this; }
692
+ static {
693
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
694
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
695
+ MultiLanguageCodeBlockElement = _classThis = _classDescriptor.value;
696
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
697
+ __runInitializers(_classThis, _classExtraInitializers);
698
+ }
699
+ // Attributes.
700
+ _fg;
701
+ _tint;
702
+ _div_bg;
703
+ _title_opac;
704
+ _pre_nodes = [];
705
+ _title_nodes = [];
706
+ header;
707
+ _copy_img;
708
+ // @ts-expect-error
709
+ content;
710
+ divider;
660
711
  // Constructor.
661
712
  constructor(args) {
662
713
  // Inherit.
663
714
  super();
664
- this._pre_nodes = [];
665
- this._title_nodes = [];
666
- this._init_derived({
715
+ this._init({
667
716
  derived: MultiLanguageCodeBlockElement,
668
717
  });
669
718
  // Specify.
@@ -946,30 +995,6 @@ let MultiLanguageCodeBlockElement = (() => {
946
995
  return this;
947
996
  }
948
997
  };
949
- __setFunctionName(_classThis, "MultiLanguageCodeBlockElement");
950
- (() => {
951
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
952
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
953
- MultiLanguageCodeBlockElement = _classThis = _classDescriptor.value;
954
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
955
- })();
956
- _classThis.default_style = {
957
- ...VStackElement.default_style,
958
- "font-family": "'Menlo', 'Consolas', monospace",
959
- "background": "black",
960
- "color": "white",
961
- "box-shadow": "0px 0px 5px #00000005",
962
- "font-size": "13px",
963
- "line-height": "18px",
964
- "border-radius": "10px",
965
- "tab-size": 4,
966
- "--mlcb-tint": "white",
967
- "--mlcb-div-bg": "grey",
968
- "--mlcb-title-opac": 0.7,
969
- };
970
- (() => {
971
- __runInitializers(_classThis, _classExtraInitializers);
972
- })();
973
998
  return MultiLanguageCodeBlockElement = _classThis;
974
999
  })();
975
1000
  export { MultiLanguageCodeBlockElement };
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +1,7 @@
1
+ "use strict";
1
2
  // // Imports.
2
3
  // import { Colors } from "../modules/colors"
3
4
  // import { Elements } from "../elements/module.js"
4
- export {};
5
5
  // // Types.
6
6
  // type Hex = string;
7
7
  // type RGBArray = number[];
@@ -1,5 +1,6 @@
1
- import { VStackElement } from "./stack";
2
- export declare class ContextMenuElement extends VStackElement {
1
+ import { VElementBaseSignature } from "../elements/module.js";
2
+ declare const ContextMenuElement_base: VElementBaseSignature;
3
+ export declare class ContextMenuElement extends ContextMenuElement_base {
3
4
  remove_child_callback: any;
4
5
  constructor(content: {
5
6
  label: string;
@@ -28,3 +29,4 @@ declare global {
28
29
  on_context_menu(callback?: Function | ContextMenuElement | any[]): this;
29
30
  }
30
31
  }
32
+ export {};
@@ -36,30 +36,37 @@ 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 { Button } from "./button";
46
42
  import { VStackElement } from "./stack";
47
43
  // Context Menu.
48
44
  let ContextMenuElement = (() => {
49
- var _a;
50
- let _classDecorators = [(_a = Elements).register.bind(_a)];
45
+ let _classDecorators = [Elements.create({
46
+ name: "ContextMenuElement",
47
+ })];
51
48
  let _classDescriptor;
52
49
  let _classExtraInitializers = [];
53
50
  let _classThis;
54
51
  let _classSuper = VStackElement;
55
- var ContextMenuElement = _classThis = class extends _classSuper {
52
+ var ContextMenuElement = class extends _classSuper {
53
+ static { _classThis = this; }
54
+ static {
55
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
56
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
57
+ ContextMenuElement = _classThis = _classDescriptor.value;
58
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
59
+ __runInitializers(_classThis, _classExtraInitializers);
60
+ }
61
+ // Attributes.
62
+ remove_child_callback;
56
63
  // Constructor.
57
64
  // The content may either be an array with nodes, or an array with object like {label: ..., on_click: (element, event) => {}, on_render: (element) => {}}.
58
65
  // A node / object may also be "null" and it will be ignored.
59
66
  constructor(content) {
60
67
  // Initialize base classes.
61
68
  super();
62
- this._init_derived({
69
+ this._init({
63
70
  derived: ContextMenuElement,
64
71
  });
65
72
  // Append content.
@@ -142,14 +149,6 @@ let ContextMenuElement = (() => {
142
149
  return this;
143
150
  }
144
151
  };
145
- __setFunctionName(_classThis, "ContextMenuElement");
146
- (() => {
147
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
148
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
149
- ContextMenuElement = _classThis = _classDescriptor.value;
150
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
151
- __runInitializers(_classThis, _classExtraInitializers);
152
- })();
153
152
  return ContextMenuElement = _classThis;
154
153
  })();
155
154
  export { ContextMenuElement };
@@ -180,7 +179,7 @@ Elements.extend({
180
179
  return this.oncontextmenu ?? undefined;
181
180
  }
182
181
  }
183
- if (callback instanceof ContextMenuElement || callback.element_type === "ContextMenu") {
182
+ if (callback instanceof ContextMenuElement || callback.element_name === "ContextMenuElement") {
184
183
  this._context_menu = callback;
185
184
  const _this_ = this;
186
185
  this.oncontextmenu = (event) => {
@@ -4,6 +4,8 @@
4
4
  */
5
5
  // Button.
6
6
  export class Stylesheet {
7
+ // Attributes.
8
+ _element;
7
9
  // Constructor.
8
10
  constructor(data, auto_append = false) {
9
11
  this._element = document.createElement("style");
@@ -1,12 +1,5 @@
1
1
  import { VElementTagMap } from "../elements/module.js";
2
2
  export declare class DividerElement extends VElementTagMap.div {
3
- static default_style: {
4
- margin: string;
5
- padding: string;
6
- width: string;
7
- height: string;
8
- "min-height": string;
9
- };
10
3
  constructor();
11
4
  }
12
5
  export declare const Divider: <Extensions extends object = {}>() => DividerElement & Extensions;
@@ -36,45 +36,41 @@ 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
  // Divider.
46
42
  let DividerElement = (() => {
47
- var _a;
48
- let _classDecorators = [(_a = Elements).register.bind(_a)];
43
+ let _classDecorators = [Elements.create({
44
+ name: "DividerElement",
45
+ default_style: {
46
+ "margin": "0px",
47
+ "padding": "0px",
48
+ "width": "100%",
49
+ "height": "1px",
50
+ "min-height": "1px",
51
+ // "background": "black",
52
+ },
53
+ })];
49
54
  let _classDescriptor;
50
55
  let _classExtraInitializers = [];
51
56
  let _classThis;
52
57
  let _classSuper = VElementTagMap.div;
53
- var DividerElement = _classThis = class extends _classSuper {
58
+ var DividerElement = class extends _classSuper {
59
+ static { _classThis = this; }
60
+ static {
61
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
62
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
63
+ DividerElement = _classThis = _classDescriptor.value;
64
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
65
+ __runInitializers(_classThis, _classExtraInitializers);
66
+ }
67
+ // Constructor.
54
68
  constructor() {
55
69
  super({
56
70
  derived: DividerElement,
57
71
  });
58
72
  }
59
73
  };
60
- __setFunctionName(_classThis, "DividerElement");
61
- (() => {
62
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
63
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
64
- DividerElement = _classThis = _classDescriptor.value;
65
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
66
- })();
67
- _classThis.default_style = {
68
- "margin": "0px",
69
- "padding": "0px",
70
- "width": "100%",
71
- "height": "1px",
72
- "min-height": "1px",
73
- // "background": "black",
74
- };
75
- (() => {
76
- __runInitializers(_classThis, _classExtraInitializers);
77
- })();
78
74
  return DividerElement = _classThis;
79
75
  })();
80
76
  export { DividerElement };
@@ -1,8 +1,12 @@
1
- import { VStackElement, HStackElement, AnchorHStackElement } from "./stack";
1
+ import { VElementBaseSignature } from "../elements/module.js";
2
+ import { HStackElement, AnchorHStackElement } from "./stack";
2
3
  import { ImageMaskElement } from "./image";
4
+ import { AnyElement } from "./any_element.js";
3
5
  type DropdownCallback = (element: DropdownElement) => void;
4
- export declare class DropdownElement extends VStackElement {
5
- target: HTMLElement;
6
+ declare const DropdownElement_base: VElementBaseSignature;
7
+ export declare class DropdownElement extends DropdownElement_base {
8
+ static element_name: string;
9
+ target: AnyElement | HTMLElement;
6
10
  animate: boolean;
7
11
  duration: number;
8
12
  side?: string;
@@ -33,7 +37,7 @@ export declare class DropdownElement extends VStackElement {
33
37
  animation_timeout: any;
34
38
  close_handler?: Function;
35
39
  constructor({ target, animate, duration, side, auto_remove, min_width, max_width, min_height, max_height, use_target_min, below_target, x_offset, y_offset, content, }: {
36
- target: HTMLElement;
40
+ target: AnyElement | HTMLElement;
37
41
  animate?: boolean;
38
42
  duration?: number;
39
43
  side?: string;
@@ -56,7 +60,8 @@ export declare class DropdownElement extends VStackElement {
56
60
  on_click?: Function;
57
61
  on_click_redirect?: string;
58
62
  anchor?: boolean;
59
- };
63
+ ellipsis_overflow?: boolean;
64
+ }[];
60
65
  });
61
66
  _get_frame(): void;
62
67
  toggle(): this;
@@ -81,7 +86,7 @@ export declare class DropdownElement extends VStackElement {
81
86
  content_opacity(value: number): this;
82
87
  }
83
88
  export declare const Dropdown: <Extensions extends object = {}>(args_0: {
84
- target: HTMLElement;
89
+ target: AnyElement | HTMLElement;
85
90
  animate?: boolean;
86
91
  duration?: number;
87
92
  side?: string;
@@ -104,7 +109,8 @@ export declare const Dropdown: <Extensions extends object = {}>(args_0: {
104
109
  on_click?: Function;
105
110
  on_click_redirect?: string;
106
111
  anchor?: boolean;
107
- };
112
+ ellipsis_overflow?: boolean;
113
+ }[];
108
114
  }) => DropdownElement & Extensions;
109
115
  export declare const NullDropdown: <Extensions extends object = {}>() => DropdownElement & Extensions;
110
116
  declare module './any_element.d.ts' {