@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.
- package/backend/dist/cjs/database.d.ts +41 -68
- package/backend/dist/cjs/database.js +127 -76
- package/backend/dist/cjs/endpoint.d.ts +23 -9
- package/backend/dist/cjs/endpoint.js +98 -21
- package/backend/dist/cjs/frontend.d.ts +0 -2
- package/backend/dist/cjs/frontend.js +9 -9
- package/backend/dist/cjs/image_endpoint.d.ts +3 -1
- package/backend/dist/cjs/image_endpoint.js +2 -1
- package/backend/dist/cjs/payments/paddle.js +10 -2
- package/backend/dist/cjs/plugins/css.d.ts +6 -5
- package/backend/dist/cjs/plugins/css.js +32 -7
- package/backend/dist/cjs/plugins/ts/compiler.d.ts +6 -1
- package/backend/dist/cjs/plugins/ts/compiler.js +26 -2
- package/backend/dist/cjs/plugins/ts/preprocessing.js +5 -3
- package/backend/dist/cjs/server.d.ts +7 -13
- package/backend/dist/cjs/server.js +184 -303
- package/backend/dist/cjs/status.d.ts +1 -0
- package/backend/dist/cjs/status.js +2 -1
- package/backend/dist/cjs/stream.d.ts +5 -3
- package/backend/dist/cjs/stream.js +13 -4
- package/backend/dist/cjs/users.d.ts +1 -1
- package/backend/dist/cjs/users.js +87 -72
- package/backend/dist/cjs/utils.d.ts +17 -9
- package/backend/dist/cjs/utils.js +22 -64
- package/backend/dist/cjs/view.d.ts +2 -2
- package/backend/dist/cjs/view.js +38 -40
- package/backend/dist/cjs/volt.d.ts +3 -2
- package/backend/dist/cjs/volt.js +2 -2
- package/backend/dist/css/volt.css +5 -0
- package/backend/dist/esm/database.d.ts +41 -68
- package/backend/dist/esm/database.js +127 -76
- package/backend/dist/esm/endpoint.d.ts +23 -9
- package/backend/dist/esm/endpoint.js +99 -22
- package/backend/dist/esm/frontend.d.ts +0 -2
- package/backend/dist/esm/frontend.js +9 -9
- package/backend/dist/esm/image_endpoint.d.ts +3 -1
- package/backend/dist/esm/image_endpoint.js +2 -1
- package/backend/dist/esm/payments/paddle.js +11 -3
- package/backend/dist/esm/plugins/css.d.ts +6 -5
- package/backend/dist/esm/plugins/css.js +32 -6
- package/backend/dist/esm/plugins/ts/compiler.d.ts +6 -1
- package/backend/dist/esm/plugins/ts/compiler.js +26 -2
- package/backend/dist/esm/plugins/ts/preprocessing.js +5 -3
- package/backend/dist/esm/server.d.ts +7 -13
- package/backend/dist/esm/server.js +182 -301
- package/backend/dist/esm/status.d.ts +1 -0
- package/backend/dist/esm/status.js +1 -0
- package/backend/dist/esm/stream.d.ts +5 -3
- package/backend/dist/esm/stream.js +13 -4
- package/backend/dist/esm/users.d.ts +1 -1
- package/backend/dist/esm/users.js +87 -72
- package/backend/dist/esm/utils.d.ts +17 -9
- package/backend/dist/esm/utils.js +21 -62
- package/backend/dist/esm/view.d.ts +2 -2
- package/backend/dist/esm/view.js +38 -40
- package/backend/dist/esm/volt.d.ts +3 -2
- package/backend/dist/esm/volt.js +2 -1
- package/backend/dist/esm-dev/blacklist.js +1 -1
- package/backend/dist/esm-dev/cli.js +2 -2
- package/backend/dist/esm-dev/database.d.ts +41 -68
- package/backend/dist/esm-dev/database.js +128 -77
- package/backend/dist/esm-dev/endpoint.d.ts +23 -9
- package/backend/dist/esm-dev/endpoint.js +100 -23
- package/backend/dist/esm-dev/file_watcher.js +1 -1
- package/backend/dist/esm-dev/frontend.d.ts +0 -2
- package/backend/dist/esm-dev/frontend.js +9 -9
- package/backend/dist/esm-dev/image_endpoint.d.ts +3 -1
- package/backend/dist/esm-dev/image_endpoint.js +2 -1
- package/backend/dist/esm-dev/logger.js +1 -1
- package/backend/dist/esm-dev/payments/paddle.js +12 -4
- package/backend/dist/esm-dev/plugins/css.d.ts +6 -5
- package/backend/dist/esm-dev/plugins/css.js +33 -7
- package/backend/dist/esm-dev/plugins/ts/compiler.d.ts +6 -1
- package/backend/dist/esm-dev/plugins/ts/compiler.js +27 -3
- package/backend/dist/esm-dev/plugins/ts/preprocessing.js +7 -5
- package/backend/dist/esm-dev/rate_limit.js +1 -1
- package/backend/dist/esm-dev/server.d.ts +7 -13
- package/backend/dist/esm-dev/server.js +184 -303
- package/backend/dist/esm-dev/status.d.ts +1 -0
- package/backend/dist/esm-dev/status.js +1 -0
- package/backend/dist/esm-dev/stream.d.ts +5 -3
- package/backend/dist/esm-dev/stream.js +13 -4
- package/backend/dist/esm-dev/users.d.ts +1 -1
- package/backend/dist/esm-dev/users.js +88 -73
- package/backend/dist/esm-dev/utils.d.ts +17 -9
- package/backend/dist/esm-dev/utils.js +22 -63
- package/backend/dist/esm-dev/view.d.ts +2 -2
- package/backend/dist/esm-dev/view.js +39 -41
- package/backend/dist/esm-dev/volt.d.ts +3 -2
- package/backend/dist/esm-dev/volt.js +2 -1
- package/backend/src/database.ts +163 -152
- package/backend/src/endpoint.ts +123 -31
- package/backend/src/frontend.ts +9 -8
- package/backend/src/image_endpoint.ts +4 -0
- package/backend/src/payments/paddle.ts +11 -3
- package/backend/src/plugins/css.ts +36 -8
- package/backend/src/plugins/ts/compiler.ts +37 -1
- package/backend/src/plugins/ts/preprocessing.ts +5 -3
- package/backend/src/server.ts +167 -306
- package/backend/src/status.ts +1 -0
- package/backend/src/stream.ts +28 -8
- package/backend/src/users.ts +87 -72
- package/backend/src/utils.ts +58 -25
- package/backend/src/view.ts +30 -28
- package/backend/src/{volt.js → volt.ts} +2 -1
- package/backend/tsconfig.cjs.json +3 -3
- package/backend/tsconfig.esm.json +3 -3
- package/frontend/dist/elements/base.d.ts +397 -415
- package/frontend/dist/elements/base.js +565 -328
- package/frontend/dist/elements/module.d.ts +26 -12
- package/frontend/dist/elements/module.js +69 -32
- package/frontend/dist/elements/register_element.d.ts +3 -0
- package/frontend/dist/elements/register_element.js +22 -0
- package/frontend/dist/modules/auth.d.ts +1 -0
- package/frontend/dist/modules/auth.js +6 -5
- package/frontend/dist/modules/color.d.ts +159 -0
- package/frontend/dist/modules/color.js +315 -0
- package/frontend/dist/modules/colors.d.ts +1 -26
- package/frontend/dist/modules/colors.js +417 -338
- package/frontend/dist/modules/cookies.d.ts +1 -0
- package/frontend/dist/modules/cookies.js +1 -0
- package/frontend/dist/modules/events.d.ts +1 -0
- package/frontend/dist/modules/events.js +1 -0
- package/frontend/dist/modules/google.d.ts +1 -0
- package/frontend/dist/modules/google.js +1 -0
- package/frontend/dist/modules/meta.d.ts +1 -0
- package/frontend/dist/modules/meta.js +1 -0
- package/frontend/dist/modules/mutex.d.ts +1 -2
- package/frontend/dist/modules/mutex.js +3 -4
- package/frontend/dist/modules/paddle.d.ts +1 -0
- package/frontend/dist/modules/paddle.js +14 -13
- package/frontend/dist/modules/scheme.d.ts +1 -0
- package/frontend/dist/modules/scheme.js +4 -2
- package/frontend/dist/modules/statics.d.ts +1 -0
- package/frontend/dist/modules/statics.js +1 -0
- package/frontend/dist/modules/support.d.ts +1 -0
- package/frontend/dist/modules/support.js +3 -2
- package/frontend/dist/modules/theme.d.ts +56 -0
- package/frontend/dist/{ui → modules}/theme.js +186 -75
- package/frontend/dist/modules/themes.d.ts +1 -1
- package/frontend/dist/modules/themes.js +1 -0
- package/frontend/dist/modules/user.d.ts +1 -0
- package/frontend/dist/modules/user.js +11 -10
- package/frontend/dist/modules/utils.d.ts +23 -2
- package/frontend/dist/modules/utils.js +93 -1
- package/frontend/dist/types/gradient.js +4 -0
- package/frontend/dist/ui/border_button.d.ts +0 -25
- package/frontend/dist/ui/border_button.js +50 -51
- package/frontend/dist/ui/button.d.ts +0 -21
- package/frontend/dist/ui/button.js +41 -46
- package/frontend/dist/ui/canvas.js +15 -15
- package/frontend/dist/ui/checkbox.d.ts +3 -17
- package/frontend/dist/ui/checkbox.js +36 -30
- package/frontend/dist/ui/code.d.ts +15 -82
- package/frontend/dist/ui/code.js +150 -125
- package/frontend/dist/ui/color.d.ts +0 -1
- package/frontend/dist/ui/color.js +1 -1
- package/frontend/dist/ui/context_menu.d.ts +4 -2
- package/frontend/dist/ui/context_menu.js +16 -17
- package/frontend/dist/ui/css.js +2 -0
- package/frontend/dist/ui/divider.d.ts +0 -7
- package/frontend/dist/ui/divider.js +21 -25
- package/frontend/dist/ui/dropdown.d.ts +13 -7
- package/frontend/dist/ui/dropdown.js +65 -30
- package/frontend/dist/ui/for_each.d.ts +0 -5
- package/frontend/dist/ui/for_each.js +17 -22
- package/frontend/dist/ui/form.d.ts +17 -12
- package/frontend/dist/ui/form.js +21 -18
- package/frontend/dist/ui/frame_modes.d.ts +9 -12
- package/frontend/dist/ui/frame_modes.js +8 -10
- package/frontend/dist/ui/google_map.d.ts +0 -11
- package/frontend/dist/ui/google_map.js +23 -28
- package/frontend/dist/ui/gradient.d.ts +0 -5
- package/frontend/dist/ui/gradient.js +17 -22
- package/frontend/dist/ui/image.d.ts +27 -58
- package/frontend/dist/ui/image.js +99 -93
- package/frontend/dist/ui/input.d.ts +20 -97
- package/frontend/dist/ui/input.js +192 -170
- package/frontend/dist/ui/link.d.ts +0 -18
- package/frontend/dist/ui/link.js +42 -48
- package/frontend/dist/ui/list.js +36 -37
- package/frontend/dist/ui/loader_button.d.ts +4 -19
- package/frontend/dist/ui/loader_button.js +35 -37
- package/frontend/dist/ui/loaders.d.ts +0 -8
- package/frontend/dist/ui/loaders.js +20 -25
- package/frontend/dist/ui/popup.d.ts +11 -8
- package/frontend/dist/ui/popup.js +183 -24
- package/frontend/dist/ui/pseudo.d.ts +3 -3
- package/frontend/dist/ui/pseudo.js +14 -17
- package/frontend/dist/ui/scroller.d.ts +10 -48
- package/frontend/dist/ui/scroller.js +306 -300
- package/frontend/dist/ui/slider.d.ts +9 -3
- package/frontend/dist/ui/slider.js +31 -17
- package/frontend/dist/ui/spacer.d.ts +0 -9
- package/frontend/dist/ui/spacer.js +21 -26
- package/frontend/dist/ui/span.js +13 -15
- package/frontend/dist/ui/stack.d.ts +14 -75
- package/frontend/dist/ui/stack.js +166 -169
- package/frontend/dist/ui/steps.d.ts +10 -23
- package/frontend/dist/ui/steps.js +47 -34
- package/frontend/dist/ui/style.d.ts +4 -3
- package/frontend/dist/ui/style.js +13 -18
- package/frontend/dist/ui/switch.d.ts +10 -4
- package/frontend/dist/ui/switch.js +24 -16
- package/frontend/dist/ui/table.d.ts +0 -23
- package/frontend/dist/ui/table.js +113 -119
- package/frontend/dist/ui/tabs.d.ts +3 -19
- package/frontend/dist/ui/tabs.js +35 -29
- package/frontend/dist/ui/text.d.ts +0 -8
- package/frontend/dist/ui/text.js +20 -25
- package/frontend/dist/ui/title.d.ts +0 -15
- package/frontend/dist/ui/title.js +39 -45
- package/frontend/dist/ui/ui.d.ts +0 -2
- package/frontend/dist/ui/ui.js +0 -2
- package/frontend/dist/ui/view.d.ts +3 -17
- package/frontend/dist/ui/view.js +27 -32
- package/frontend/dist/volt.d.ts +2 -1
- package/frontend/dist/volt.js +3 -1
- package/frontend/examples/dashboard/dashboard.ts +774 -0
- package/frontend/examples/theme/theme.ts +58 -0
- package/frontend/src/css/volt.css +5 -0
- package/frontend/src/elements/base.ts +767 -545
- package/frontend/src/elements/module.ts +90 -29
- package/frontend/src/elements/register_element.ts +24 -0
- package/frontend/src/modules/auth.ts +7 -6
- package/frontend/src/modules/color.ts +348 -0
- package/frontend/src/modules/colors.ts +468 -449
- package/frontend/src/modules/cookies.ts +1 -0
- package/frontend/src/modules/events.ts +1 -0
- package/frontend/src/modules/google.ts +1 -0
- package/frontend/src/modules/meta.ts +2 -1
- package/frontend/src/modules/mutex.ts +2 -4
- package/frontend/src/modules/paddle.ts +21 -20
- package/frontend/src/modules/scheme.ts +4 -3
- package/frontend/src/modules/statics.ts +2 -1
- package/frontend/src/modules/support.ts +3 -2
- package/frontend/src/modules/theme.ts +413 -0
- package/frontend/src/modules/themes.ts +2 -1
- package/frontend/src/modules/user.ts +12 -11
- package/frontend/src/modules/utils.ts +125 -2
- package/frontend/src/ui/border_button.ts +41 -37
- package/frontend/src/ui/button.ts +33 -32
- package/frontend/src/ui/canvas.ts +5 -2
- package/frontend/src/ui/checkbox.ts +21 -22
- package/frontend/src/ui/code.ts +92 -86
- package/frontend/src/ui/context_menu.ts +7 -5
- package/frontend/src/ui/css.ts +1 -1
- package/frontend/src/ui/divider.ts +15 -10
- package/frontend/src/ui/dropdown.ts +38 -21
- package/frontend/src/ui/for_each.ts +9 -8
- package/frontend/src/ui/form.ts +26 -21
- package/frontend/src/ui/frame_modes.ts +13 -17
- package/frontend/src/ui/google_map.ts +15 -13
- package/frontend/src/ui/gradient.ts +9 -8
- package/frontend/src/ui/image.ts +108 -86
- package/frontend/src/ui/input.ts +145 -144
- package/frontend/src/ui/link.ts +25 -23
- package/frontend/src/ui/list.ts +12 -6
- package/frontend/src/ui/loader_button.ts +26 -25
- package/frontend/src/ui/loaders.ts +12 -11
- package/frontend/src/ui/popup.ts +168 -14
- package/frontend/src/ui/pseudo.ts +5 -3
- package/frontend/src/ui/scroller.ts +303 -294
- package/frontend/src/ui/slider.ts +15 -10
- package/frontend/src/ui/spacer.ts +14 -11
- package/frontend/src/ui/span.ts +6 -2
- package/frontend/src/ui/stack.ts +196 -183
- package/frontend/src/ui/steps.ts +38 -22
- package/frontend/src/ui/style.ts +7 -4
- package/frontend/src/ui/switch.ts +16 -11
- package/frontend/src/ui/table.ts +42 -34
- package/frontend/src/ui/tabs.ts +20 -19
- package/frontend/src/ui/text.ts +12 -11
- package/frontend/src/ui/title.ts +22 -20
- package/frontend/src/ui/ui.ts +0 -2
- package/frontend/src/ui/view.ts +20 -19
- package/frontend/src/volt.ts +3 -1
- package/frontend/{compile.js → tools/compile.old.js} +2 -2
- package/frontend/tools/embed_scripts.js +69 -0
- package/frontend/tsconfig.json +26 -0
- package/package.json +8 -8
- package/frontend/dist/ui/theme.d.ts +0 -25
- package/frontend/exports.json +0 -1340
- package/frontend/src/modules/date.js +0 -535
- package/frontend/src/ui/color.ts +0 -117
- package/frontend/src/ui/theme.ts +0 -279
- /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 } from "../elements/module.js";
|
|
45
41
|
import { Mutex } from "../modules/mutex";
|
|
@@ -50,22 +46,54 @@ import { LoaderButton } from "./loader_button";
|
|
|
50
46
|
import { ImageMask } from "./image";
|
|
51
47
|
// RingLoader.
|
|
52
48
|
// - The width and height must be in pixels.
|
|
53
|
-
let
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
let YesNoPopupElement = (() => {
|
|
50
|
+
let _classDecorators = [Elements.create({
|
|
51
|
+
name: "YesNoPopupElement",
|
|
52
|
+
})];
|
|
56
53
|
let _classDescriptor;
|
|
57
54
|
let _classExtraInitializers = [];
|
|
58
55
|
let _classThis;
|
|
59
56
|
let _classSuper = VStackElement;
|
|
60
|
-
var
|
|
57
|
+
var YesNoPopupElement = class extends _classSuper {
|
|
58
|
+
static { _classThis = this; }
|
|
59
|
+
static {
|
|
60
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
61
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
62
|
+
YesNoPopupElement = _classThis = _classDescriptor.value;
|
|
63
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
64
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
65
|
+
}
|
|
66
|
+
// Attributes.
|
|
67
|
+
p_mutex;
|
|
68
|
+
p_auto_hide;
|
|
69
|
+
p_auto_remove;
|
|
70
|
+
p_animation_duration;
|
|
71
|
+
p_blur;
|
|
72
|
+
p_on_no_handler;
|
|
73
|
+
p_on_yes_handler;
|
|
74
|
+
p_on_popup_handler;
|
|
75
|
+
p_escape_handler;
|
|
76
|
+
image;
|
|
77
|
+
// @ts-ignore
|
|
78
|
+
title;
|
|
79
|
+
// @ts-ignore
|
|
80
|
+
text;
|
|
81
|
+
no_button;
|
|
82
|
+
yes_button;
|
|
83
|
+
buttons;
|
|
84
|
+
// @ts-ignore
|
|
85
|
+
content;
|
|
86
|
+
widget;
|
|
87
|
+
_on_no_called = false;
|
|
61
88
|
constructor({ title, text, no = "No", yes = "Yes", image = false, image_color = "white", content = [], auto_hide = true, auto_remove = false, animation_duration = 0, // in ms.
|
|
62
89
|
blur = 0, on_no = () => { }, on_yes = () => { }, on_popup = () => { }, }) {
|
|
63
90
|
// Initialize base class.
|
|
64
91
|
super();
|
|
65
|
-
this.
|
|
66
|
-
|
|
92
|
+
this._init({
|
|
93
|
+
derived: YesNoPopupElement,
|
|
94
|
+
});
|
|
67
95
|
// Mutex.
|
|
68
|
-
this.p_mutex = Mutex();
|
|
96
|
+
this.p_mutex = new Mutex();
|
|
69
97
|
// Args.
|
|
70
98
|
this.p_auto_hide = auto_hide;
|
|
71
99
|
this.p_auto_remove = auto_remove;
|
|
@@ -204,7 +232,7 @@ let PopupElement = (() => {
|
|
|
204
232
|
}
|
|
205
233
|
// Set default since it inherits HStackElement.
|
|
206
234
|
set_default() {
|
|
207
|
-
return super.set_default(
|
|
235
|
+
return super.set_default(YesNoPopupElement);
|
|
208
236
|
}
|
|
209
237
|
// Await the previous popup.
|
|
210
238
|
async await() {
|
|
@@ -316,16 +344,147 @@ let PopupElement = (() => {
|
|
|
316
344
|
document.body.addEventListener("keydown", this.p_escape_handler); // for some reason on_key_down on main element is not catched.
|
|
317
345
|
}
|
|
318
346
|
};
|
|
319
|
-
|
|
320
|
-
(() => {
|
|
321
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
322
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
323
|
-
PopupElement = _classThis = _classDescriptor.value;
|
|
324
|
-
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
325
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
326
|
-
})();
|
|
327
|
-
return PopupElement = _classThis;
|
|
347
|
+
return YesNoPopupElement = _classThis;
|
|
328
348
|
})();
|
|
329
|
-
export {
|
|
330
|
-
export const
|
|
331
|
-
export const
|
|
349
|
+
export { YesNoPopupElement };
|
|
350
|
+
export const YesNoPopup = Elements.wrapper(YesNoPopupElement);
|
|
351
|
+
export const NullYesNoPopup = Elements.create_null(YesNoPopupElement);
|
|
352
|
+
// /** Custom popup */
|
|
353
|
+
// @Elements.create({
|
|
354
|
+
// name: "CustomPopupElement",
|
|
355
|
+
// })
|
|
356
|
+
// export class CustomPopupElement extends (VStackElement as any as VElementBaseSignature) {
|
|
357
|
+
// public content: FrameElement;
|
|
358
|
+
// public close:
|
|
359
|
+
// close_border(...args) {
|
|
360
|
+
// this.close.border(...args);
|
|
361
|
+
// return this;
|
|
362
|
+
// }
|
|
363
|
+
// constructor(...children: AppendType[]) {
|
|
364
|
+
// // Initialize base class.
|
|
365
|
+
// super();
|
|
366
|
+
// this._init({
|
|
367
|
+
// derived: CustomPopupElement,
|
|
368
|
+
// })
|
|
369
|
+
// const close_handler = (event) => {
|
|
370
|
+
// if (event.key === "Escape") {
|
|
371
|
+
// popup.close();
|
|
372
|
+
// }
|
|
373
|
+
// }
|
|
374
|
+
// this.append(
|
|
375
|
+
// this.content = UI.Widget(...children)
|
|
376
|
+
// .background(Theme.bg_1)
|
|
377
|
+
// .max_width(400)
|
|
378
|
+
// .parent(this),
|
|
379
|
+
// Frame(
|
|
380
|
+
// close = ImageMask("/static/icons/close.webp")
|
|
381
|
+
// .frame(10, 10)
|
|
382
|
+
// .flex(0)
|
|
383
|
+
// .transition_mask("background 300ms ease-in-out")
|
|
384
|
+
// .color(Theme.bg),
|
|
385
|
+
// )
|
|
386
|
+
// .background(Theme.auto_darken_lighten("fg", 0.5))
|
|
387
|
+
// .border_radius("50%")
|
|
388
|
+
// .border(1, Theme.div_bg)
|
|
389
|
+
// .frame(30, 30)
|
|
390
|
+
// .center().center_vertical()
|
|
391
|
+
// .position(25, 25, null, null)
|
|
392
|
+
// .on_click(() => popup.close())
|
|
393
|
+
// .hover_transitions([
|
|
394
|
+
// { target: "this", selected: Theme.auto_darken_lighten("fg", 0.6), unselected: Theme.auto_darken_lighten("fg", 0.5), methods: ["background"] },
|
|
395
|
+
// { target: close, selected: Theme.bg_hover, unselected: Theme.bg, methods: ["color"] },
|
|
396
|
+
// // { target: "this", selected: Theme.fg, unselected: Theme.fg_2, methods: ["color"] },
|
|
397
|
+
// // { target: "this", selected: Theme.fg, unselected: Theme.fg_2, methods: ["color"] },
|
|
398
|
+
// ])
|
|
399
|
+
// )
|
|
400
|
+
// .position(0, 0, 0, 0)
|
|
401
|
+
// .center()
|
|
402
|
+
// .center_vertical()
|
|
403
|
+
// .background("#00000008")
|
|
404
|
+
// .padding(25)
|
|
405
|
+
// .background_blur(5)
|
|
406
|
+
// .transition("opacity 300ms ease-in-out")
|
|
407
|
+
// .on_click((e, event) => {
|
|
408
|
+
// if (event.target === content || content.is_nested_child(event.target)) {
|
|
409
|
+
// return;
|
|
410
|
+
// }
|
|
411
|
+
// e.close()
|
|
412
|
+
// })
|
|
413
|
+
// }
|
|
414
|
+
// // Set width on content instead of parent.
|
|
415
|
+
// width(): string | number;
|
|
416
|
+
// width(value: string | number, check_attribute?: boolean): this;
|
|
417
|
+
// width(value?: string | number, check_attribute: boolean = true): this | number | string {
|
|
418
|
+
// if (this._e === undefined) {
|
|
419
|
+
// return super.width(value as any, check_attribute);
|
|
420
|
+
// }
|
|
421
|
+
// if (value == null) {
|
|
422
|
+
// return this._e.width.toString();
|
|
423
|
+
// }
|
|
424
|
+
// // Assign percentage values to the root.
|
|
425
|
+
// if (typeof value === "string" && value.includes("%")) {
|
|
426
|
+
// super.width(value as any, false);
|
|
427
|
+
// } else {
|
|
428
|
+
// this._e.style.width = this.pad_numeric(value, "px");
|
|
429
|
+
// this._e.width = value as any;
|
|
430
|
+
// }
|
|
431
|
+
// return this;
|
|
432
|
+
// }
|
|
433
|
+
// min_width(): string | number
|
|
434
|
+
// min_width(value: string | number): this;
|
|
435
|
+
// min_width(value?: string | number): this | string | number {
|
|
436
|
+
// if (this._e === undefined) {
|
|
437
|
+
// return super.min_width(value as any);
|
|
438
|
+
// }
|
|
439
|
+
// if (value == null) {
|
|
440
|
+
// return this._e.style.minWidth;
|
|
441
|
+
// }
|
|
442
|
+
// // Assign percentage values to the root.
|
|
443
|
+
// if (typeof value === "string" && value.includes("%")) {
|
|
444
|
+
// super.min_width(value as any);
|
|
445
|
+
// } else {
|
|
446
|
+
// this._e.style.minWidth = this.pad_numeric(value, "px");
|
|
447
|
+
// }
|
|
448
|
+
// return this;
|
|
449
|
+
// }
|
|
450
|
+
// max_width(): string | number
|
|
451
|
+
// max_width(value: string | number): this;
|
|
452
|
+
// max_width(value?: string | number): this | string | number {
|
|
453
|
+
// if (this._e === undefined) {
|
|
454
|
+
// return super.max_width(value as any);
|
|
455
|
+
// }
|
|
456
|
+
// if (value == null) {
|
|
457
|
+
// return this._e.style.maxWidth;
|
|
458
|
+
// }
|
|
459
|
+
// // Assign percentage values to the root.
|
|
460
|
+
// if (typeof value === "string" && value.includes("%")) {
|
|
461
|
+
// super.max_width(value as any);
|
|
462
|
+
// } else {
|
|
463
|
+
// this._e.style.maxWidth = this.pad_numeric(value, "px");
|
|
464
|
+
// }
|
|
465
|
+
// return this;
|
|
466
|
+
// }
|
|
467
|
+
// max_width(value: number) {
|
|
468
|
+
// content.max_width(value);
|
|
469
|
+
// return this;
|
|
470
|
+
// }
|
|
471
|
+
// open() {
|
|
472
|
+
// document.body.addEventListener("keydown", close_handler);
|
|
473
|
+
// UI.view.append(this);
|
|
474
|
+
// this.opacity(0)
|
|
475
|
+
// this.show();
|
|
476
|
+
// this.getBoundingClientRect();
|
|
477
|
+
// this.opacity(1);
|
|
478
|
+
// return this;
|
|
479
|
+
// }
|
|
480
|
+
// close() {
|
|
481
|
+
// document.body.removeEventListener("keydown", close_handler);
|
|
482
|
+
// this.opacity(0)
|
|
483
|
+
// setTimeout(() => this.remove(), 300)
|
|
484
|
+
// return this;
|
|
485
|
+
// }
|
|
486
|
+
// }
|
|
487
|
+
// }
|
|
488
|
+
// export const CustomPopup = Elements.wrapper(CustomPopupElement);
|
|
489
|
+
// export const NullCustomPopup = Elements.create_null(CustomPopupElement);
|
|
490
|
+
// declare module './any_element.d.ts' { interface AnyElementMap { CustomPopupElement: CustomPopupElement } }
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { VElement, VElementTagMap } from "../elements/module.js";
|
|
1
|
+
import { VElement, VElementTagMap, AppendType } from "../elements/module.js";
|
|
2
2
|
export declare class PseudoElement extends VElementTagMap.div {
|
|
3
3
|
added_to_elements: {
|
|
4
4
|
node: VElement;
|
|
5
5
|
type: string;
|
|
6
6
|
}[];
|
|
7
|
-
constructor(...children:
|
|
7
|
+
constructor(...children: AppendType[]);
|
|
8
8
|
update(): this;
|
|
9
9
|
}
|
|
10
|
-
export declare const Pseudo: <Extensions extends object = {}>(...args:
|
|
10
|
+
export declare const Pseudo: <Extensions extends object = {}>(...args: AppendType[]) => PseudoElement & Extensions;
|
|
11
11
|
export declare const NullPseudo: <Extensions extends object = {}>() => PseudoElement & Extensions;
|
|
12
12
|
declare module './any_element.d.ts' {
|
|
13
13
|
interface AnyElementMap {
|
|
@@ -36,25 +36,30 @@ 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 PseudoElement = (() => {
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
let _classDecorators = [Elements.create({
|
|
44
|
+
name: "PseudoElement",
|
|
45
|
+
})];
|
|
49
46
|
let _classDescriptor;
|
|
50
47
|
let _classExtraInitializers = [];
|
|
51
48
|
let _classThis;
|
|
52
49
|
let _classSuper = VElementTagMap.div;
|
|
53
|
-
var PseudoElement =
|
|
50
|
+
var PseudoElement = class extends _classSuper {
|
|
51
|
+
static { _classThis = this; }
|
|
52
|
+
static {
|
|
53
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
54
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
55
|
+
PseudoElement = _classThis = _classDescriptor.value;
|
|
56
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
57
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
58
|
+
}
|
|
59
|
+
// Attributes.
|
|
60
|
+
added_to_elements = [];
|
|
54
61
|
constructor(...children) {
|
|
55
62
|
super({ derived: PseudoElement, });
|
|
56
|
-
// Attributes.
|
|
57
|
-
this.added_to_elements = [];
|
|
58
63
|
// Append.
|
|
59
64
|
this.append(...children);
|
|
60
65
|
}
|
|
@@ -66,14 +71,6 @@ let PseudoElement = (() => {
|
|
|
66
71
|
return this;
|
|
67
72
|
}
|
|
68
73
|
};
|
|
69
|
-
__setFunctionName(_classThis, "PseudoElement");
|
|
70
|
-
(() => {
|
|
71
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
72
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
73
|
-
PseudoElement = _classThis = _classDescriptor.value;
|
|
74
|
-
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
75
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
76
|
-
})();
|
|
77
74
|
return PseudoElement = _classThis;
|
|
78
75
|
})();
|
|
79
76
|
export { PseudoElement };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { VElementTagMap } from "../elements/module.js";
|
|
1
|
+
import { VElementBaseSignature, VElement, VElementTagMap, AppendType } from "../elements/module.js";
|
|
2
|
+
import { AnyElement } from "./any_element.js";
|
|
2
3
|
import { VStackElement } from "./stack";
|
|
3
4
|
type OnScrollCallback = ((element: ScrollerElement, event: Event) => any);
|
|
4
5
|
interface ScrollCallbackItem {
|
|
@@ -6,19 +7,6 @@ interface ScrollCallbackItem {
|
|
|
6
7
|
user_callback: OnScrollCallback;
|
|
7
8
|
}
|
|
8
9
|
export declare class ScrollerElement extends VElementTagMap.div {
|
|
9
|
-
static default_style: {
|
|
10
|
-
position: string;
|
|
11
|
-
margin: string;
|
|
12
|
-
padding: string;
|
|
13
|
-
display: string;
|
|
14
|
-
overflow: string;
|
|
15
|
-
"align-content": string;
|
|
16
|
-
"flex-direction": string;
|
|
17
|
-
"scroll-behavior": string;
|
|
18
|
-
"overscroll-behavior": string;
|
|
19
|
-
height: string;
|
|
20
|
-
"content-visibility": string;
|
|
21
|
-
};
|
|
22
10
|
content: VStackElement;
|
|
23
11
|
thumb: VStackElement & {
|
|
24
12
|
dragging: boolean;
|
|
@@ -37,10 +25,10 @@ export declare class ScrollerElement extends VElementTagMap.div {
|
|
|
37
25
|
_alignment_callback_activated: boolean;
|
|
38
26
|
_alignment_callback: any;
|
|
39
27
|
_fadeout_timeout: any;
|
|
40
|
-
constructor(...children:
|
|
28
|
+
constructor(...children: AppendType[]);
|
|
41
29
|
is_scrollable(): boolean;
|
|
42
30
|
remove_children(): this;
|
|
43
|
-
append(...children:
|
|
31
|
+
append(...children: AppendType[]): this;
|
|
44
32
|
child(index: number): any;
|
|
45
33
|
overflow(): string;
|
|
46
34
|
overflow(value: string): this;
|
|
@@ -82,46 +70,20 @@ export declare class ScrollerElement extends VElementTagMap.div {
|
|
|
82
70
|
leading_vertical(): this;
|
|
83
71
|
trailing_vertical(): this;
|
|
84
72
|
}
|
|
85
|
-
export declare const Scroller: <Extensions extends object = {}>(...args:
|
|
73
|
+
export declare const Scroller: <Extensions extends object = {}>(...args: AppendType[]) => ScrollerElement & Extensions;
|
|
86
74
|
export declare const NullScroller: <Extensions extends object = {}>() => ScrollerElement & Extensions;
|
|
87
75
|
declare module './any_element.d.ts' {
|
|
88
76
|
interface AnyElementMap {
|
|
89
77
|
ScrollerElement: ScrollerElement;
|
|
90
78
|
}
|
|
91
79
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
_last_v_children: number;
|
|
97
|
-
visible_container: VStackElement;
|
|
98
|
-
height_measurer: any;
|
|
99
|
-
constructor(...children: any[]);
|
|
100
|
-
set_default(): this;
|
|
101
|
-
overflow(): string;
|
|
102
|
-
overflow(value: string): this;
|
|
103
|
-
overflow_x(): string;
|
|
104
|
-
overflow_x(value: string): this;
|
|
105
|
-
remove_children(): this;
|
|
106
|
-
render(): this;
|
|
107
|
-
update_heights(): this;
|
|
108
|
-
update_height(child: any): this;
|
|
109
|
-
get_height(element: any, fixed?: boolean): number;
|
|
110
|
-
append(...children: any[]): this;
|
|
111
|
-
}
|
|
112
|
-
export declare const VirtualScroller: <Extensions extends object = {}>(...args: any[]) => VirtualScrollerElement & Extensions;
|
|
113
|
-
export declare const NullVirtualScroller: <Extensions extends object = {}>() => VirtualScrollerElement & Extensions;
|
|
114
|
-
declare module './any_element.d.ts' {
|
|
115
|
-
interface AnyElementMap {
|
|
116
|
-
VirtualScrollerElement: VirtualScrollerElement;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
export declare class SnapScrollerElement extends VStackElement {
|
|
120
|
-
constructor(...children: any[]);
|
|
121
|
-
append(...children: any[]): this;
|
|
80
|
+
declare const SnapScrollerElement_base: VElementBaseSignature;
|
|
81
|
+
export declare class SnapScrollerElement extends SnapScrollerElement_base {
|
|
82
|
+
constructor(...children: VElement[]);
|
|
83
|
+
append(...children: AnyElement[]): this;
|
|
122
84
|
scroll_into_child(index: number, behaviour?: string): this;
|
|
123
85
|
}
|
|
124
|
-
export declare const SnapScroller: <Extensions extends object = {}>(...args:
|
|
86
|
+
export declare const SnapScroller: <Extensions extends object = {}>(...args: VElement[]) => SnapScrollerElement & Extensions;
|
|
125
87
|
export declare const NullSnapScroller: <Extensions extends object = {}>() => SnapScrollerElement & Extensions;
|
|
126
88
|
declare module './any_element.d.ts' {
|
|
127
89
|
interface AnyElementMap {
|