@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.
- package/backend/dist/cjs/database.d.ts +41 -68
- package/backend/dist/cjs/database.js +136 -78
- package/backend/dist/cjs/endpoint.d.ts +23 -9
- package/backend/dist/cjs/endpoint.js +98 -21
- package/backend/dist/cjs/file_watcher.js +2 -2
- 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 +137 -79
- package/backend/dist/esm/endpoint.d.ts +23 -9
- package/backend/dist/esm/endpoint.js +99 -22
- package/backend/dist/esm/file_watcher.js +2 -2
- 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 +138 -80
- 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 +3 -3
- 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 +173 -155
- package/backend/src/endpoint.ts +123 -31
- package/backend/src/file_watcher.ts +2 -2
- 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 +414 -432
- package/frontend/dist/elements/base.js +566 -329
- 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 -340
- 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 +5 -3
- 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 +5 -4
- 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 +7 -6
- 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
|
@@ -4,15 +4,18 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// Imports.
|
|
7
|
-
import { Elements } from "../elements/module.js"
|
|
7
|
+
import { Elements, VElementBaseSignature, VElement } from "../elements/module.js"
|
|
8
8
|
import { VStackElement, VStack, HStack, HStackElement } from "./stack"
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
export namespace SliderElement {
|
|
11
|
+
export type OnChangeCallback<This> = (element: This, value: number) => void;
|
|
12
|
+
}
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
// Slider.
|
|
15
|
+
@Elements.create({
|
|
16
|
+
name: "SliderElement",
|
|
17
|
+
})
|
|
18
|
+
export class SliderElement extends (VStackElement as any as VElementBaseSignature) {
|
|
16
19
|
|
|
17
20
|
// Attributes.
|
|
18
21
|
public _type: string;
|
|
@@ -36,7 +39,9 @@ export class SliderElement extends VStackElement {
|
|
|
36
39
|
|
|
37
40
|
// Initialize base class.
|
|
38
41
|
super();
|
|
39
|
-
this.
|
|
42
|
+
this._init({
|
|
43
|
+
derived: SliderElement,
|
|
44
|
+
})
|
|
40
45
|
|
|
41
46
|
// Attributes.
|
|
42
47
|
this._type = "SliderElement";
|
|
@@ -170,11 +175,11 @@ export class SliderElement extends VStackElement {
|
|
|
170
175
|
|
|
171
176
|
// Set the on change handler.
|
|
172
177
|
// @ts-ignore
|
|
173
|
-
on_change(): OnChangeCallback
|
|
178
|
+
on_change(): SwitchElement.OnChangeCallback<this>;
|
|
174
179
|
// @ts-ignore
|
|
175
|
-
on_change(handler: OnChangeCallback): this
|
|
180
|
+
on_change(handler: SwitchElement.OnChangeCallback<this>): this
|
|
176
181
|
// @ts-ignore
|
|
177
|
-
on_change(handler?: OnChangeCallback): OnChangeCallback | this {
|
|
182
|
+
on_change(handler?: SwitchElement.OnChangeCallback<this>): SwitchElement.OnChangeCallback<this> | this {
|
|
178
183
|
if (handler == null) {
|
|
179
184
|
return this.on_change_handler;
|
|
180
185
|
}
|
|
@@ -4,20 +4,23 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// Imports.
|
|
7
|
-
import { Elements, VElementTagMap } from "../elements/module.js"
|
|
7
|
+
import { Elements, VElementBaseSignature, VElement, VElementTagMap } from "../elements/module.js"
|
|
8
8
|
|
|
9
9
|
// Spacer.
|
|
10
|
-
@Elements.
|
|
10
|
+
@Elements.create({
|
|
11
|
+
name: "SpacerElement",
|
|
12
|
+
default_style: {
|
|
13
|
+
"margin": "0px",
|
|
14
|
+
"padding": "0px",
|
|
15
|
+
"flex": "1",
|
|
16
|
+
"flex-grow": "1",
|
|
17
|
+
"background": "#00000000",
|
|
18
|
+
"filter": "opacity(0)",
|
|
19
|
+
"justify-content": "stretch",
|
|
20
|
+
}
|
|
21
|
+
})
|
|
11
22
|
export class SpacerElement extends VElementTagMap.div {
|
|
12
|
-
|
|
13
|
-
"margin": "0px",
|
|
14
|
-
"padding": "0px",
|
|
15
|
-
"flex": "1",
|
|
16
|
-
"flex-grow": "1",
|
|
17
|
-
"background": "#00000000",
|
|
18
|
-
"filter": "opacity(0)",
|
|
19
|
-
"justify-content": "stretch",
|
|
20
|
-
};
|
|
23
|
+
|
|
21
24
|
constructor() {
|
|
22
25
|
super({
|
|
23
26
|
derived: SpacerElement,
|
package/frontend/src/ui/span.ts
CHANGED
|
@@ -4,11 +4,15 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// Imports.
|
|
7
|
-
import { Elements, VElementTagMap } from "../elements/module.js"
|
|
7
|
+
import { Elements, VElementBaseSignature, VElement, VElementTagMap } from "../elements/module.js"
|
|
8
8
|
|
|
9
9
|
// Span.
|
|
10
|
-
@Elements.
|
|
10
|
+
@Elements.create({
|
|
11
|
+
name: "SpanElement",
|
|
12
|
+
})
|
|
11
13
|
export class SpanElement extends VElementTagMap.span {
|
|
14
|
+
|
|
15
|
+
// Constructor.
|
|
12
16
|
constructor(inner_html?: string) {
|
|
13
17
|
|
|
14
18
|
// Initialize base class.
|
package/frontend/src/ui/stack.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// Imports.
|
|
7
|
-
import { Elements, VElementTagMap, VElement } from "../elements/module.js"
|
|
7
|
+
import { Elements, VElementBaseSignature, VElementTagMap, VElement, AppendType } from "../elements/module.js"
|
|
8
8
|
|
|
9
9
|
// Div element
|
|
10
10
|
// export const VDivElement = Elements.create({type: "Div", tag: "div"}); // should always remain a "div" since some elements like LoaderButton rely on the behaviour of a div.
|
|
@@ -14,225 +14,238 @@ import { Elements, VElementTagMap, VElement } from "../elements/module.js"
|
|
|
14
14
|
// declare module './any_element.d.ts' { interface AnyElementMap { VDivElement: VDivElement }}
|
|
15
15
|
|
|
16
16
|
// VStack.
|
|
17
|
-
@Elements.
|
|
17
|
+
@Elements.create({
|
|
18
|
+
name: "FrameElement",
|
|
19
|
+
default_style: {
|
|
20
|
+
// "position": "relative",
|
|
21
|
+
"margin": "0px",
|
|
22
|
+
"padding": "0px",
|
|
23
|
+
// "clear": "both",
|
|
24
|
+
"display": "block",
|
|
25
|
+
"overflow": "hidden",
|
|
26
|
+
"width": "100%", // to ensure its passed along all children.
|
|
27
|
+
}
|
|
28
|
+
})
|
|
18
29
|
export class FrameElement extends VElementTagMap.div {
|
|
19
30
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
// Initialize base class.
|
|
33
|
-
super({
|
|
34
|
-
derived: FrameElement,
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
// Add children.
|
|
38
|
-
this.append(...children);
|
|
39
|
-
|
|
40
|
-
}
|
|
31
|
+
// Constructor.
|
|
32
|
+
constructor(...children: AppendType[]) {
|
|
33
|
+
|
|
34
|
+
// Initialize base class.
|
|
35
|
+
super({
|
|
36
|
+
derived: FrameElement,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
// Add children.
|
|
40
|
+
this.append(...children);
|
|
41
|
+
|
|
42
|
+
}
|
|
41
43
|
}
|
|
42
44
|
export const Frame = Elements.wrapper(FrameElement);
|
|
43
45
|
export const NullFrame = Elements.create_null(FrameElement);
|
|
44
|
-
declare module './any_element.d.ts' { interface AnyElementMap { FrameElement: FrameElement }}
|
|
46
|
+
declare module './any_element.d.ts' { interface AnyElementMap { FrameElement: FrameElement } }
|
|
45
47
|
|
|
46
48
|
// VStack.
|
|
47
|
-
@Elements.
|
|
49
|
+
@Elements.create({
|
|
50
|
+
name: "VStackElement",
|
|
51
|
+
default_style: {
|
|
52
|
+
// "position": "relative",
|
|
53
|
+
"margin": "0px",
|
|
54
|
+
"padding": "0px",
|
|
55
|
+
// "clear": "both",
|
|
56
|
+
"display": "flex", // to support vertical spacers.
|
|
57
|
+
"overflow": "visible",
|
|
58
|
+
// "flex": "1", // disabled to support horizontal spacers in VStacks.
|
|
59
|
+
"align-content": "flex-start", // align items at start, do not stretch / space when inside HStack.
|
|
60
|
+
// "align-items": "flex-start", // otherwise the children automatically expand width to match the vstacks width.
|
|
61
|
+
"flex-direction": "column",
|
|
62
|
+
// "text-align": "start",
|
|
63
|
+
"outline": "none", // otherwise the focus border might show up inside an animation when the href # hashtag id is loaded.
|
|
64
|
+
"border": "none", // otherwise the focus border might show up inside an animation when the href # hashtag id is loaded.
|
|
65
|
+
"width": "100%", // to ensure its passed along all children.
|
|
66
|
+
}
|
|
67
|
+
})
|
|
48
68
|
export class VStackElement extends VElementTagMap.div {
|
|
49
69
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"outline": "none", // otherwise the focus border might show up inside an animation when the href # hashtag id is loaded.
|
|
63
|
-
"border": "none", // otherwise the focus border might show up inside an animation when the href # hashtag id is loaded.
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
// Constructor.
|
|
67
|
-
constructor(...children: any[]) {
|
|
68
|
-
|
|
69
|
-
// Initialize base class.
|
|
70
|
-
super({
|
|
71
|
-
derived: VStackElement,
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
// Add children.
|
|
75
|
-
this.append(...children);
|
|
76
|
-
|
|
77
|
-
}
|
|
70
|
+
// Constructor.
|
|
71
|
+
constructor(...children: AppendType[]) {
|
|
72
|
+
|
|
73
|
+
// Initialize base class.
|
|
74
|
+
super({
|
|
75
|
+
derived: VStackElement,
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
// Add children.
|
|
79
|
+
this.append(...children);
|
|
80
|
+
|
|
81
|
+
}
|
|
78
82
|
}
|
|
79
83
|
export const VStack = Elements.wrapper(VStackElement);
|
|
80
84
|
export const NullVStack = Elements.create_null(VStackElement);
|
|
81
|
-
declare module './any_element.d.ts' { interface AnyElementMap { VStackElement: VStackElement }}
|
|
85
|
+
declare module './any_element.d.ts' { interface AnyElementMap { VStackElement: VStackElement } }
|
|
82
86
|
|
|
83
87
|
// AnchorVStack.
|
|
84
|
-
@Elements.
|
|
88
|
+
@Elements.create({
|
|
89
|
+
name: "AnchorVStackElement",
|
|
90
|
+
default_style: {
|
|
91
|
+
// "position": "relative",
|
|
92
|
+
"margin": "0px",
|
|
93
|
+
"padding": "0px",
|
|
94
|
+
// "clear": "both",
|
|
95
|
+
"display": "flex", // to support vertical spacers.
|
|
96
|
+
"overflow": "visible",
|
|
97
|
+
// "flex": "1", // disabled to support horizontal spacers in VStacks.
|
|
98
|
+
"align-content": "flex-start", // align items at start, do not stretch / space when inside HStack.
|
|
99
|
+
// "align-items": "flex-start", // otherwise the children automatically expand width to match the vstacks width.
|
|
100
|
+
"flex-direction": "column",
|
|
101
|
+
// "text-align": "start",
|
|
102
|
+
"outline": "none", // otherwise the focus border might show up inside an animation when the href # hashtag id is loaded.
|
|
103
|
+
"border": "none", // otherwise the focus border might show up inside an animation when the href # hashtag id is loaded.
|
|
104
|
+
"text-decoration": "none",
|
|
105
|
+
|
|
106
|
+
"width": "100%", // to ensure its passed along all children.
|
|
107
|
+
|
|
108
|
+
// After extending VStack.
|
|
109
|
+
"color": "inherit", // inherit colors since <a> does not have that and a <div> does.
|
|
110
|
+
},
|
|
111
|
+
})
|
|
85
112
|
export class AnchorVStackElement extends VElementTagMap.a {
|
|
86
113
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
"outline": "none", // otherwise the focus border might show up inside an animation when the href # hashtag id is loaded.
|
|
100
|
-
"border": "none", // otherwise the focus border might show up inside an animation when the href # hashtag id is loaded.
|
|
101
|
-
"text-decoration": "none",
|
|
102
|
-
|
|
103
|
-
// After extending VStack.
|
|
104
|
-
"color": "inherit", // inherit colors since <a> does not have that and a <div> does.
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
// Constructor.
|
|
108
|
-
constructor(...children: any[]) {
|
|
109
|
-
|
|
110
|
-
// Initialize base class.
|
|
111
|
-
super({
|
|
112
|
-
derived: AnchorVStackElement,
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
// Add children.
|
|
116
|
-
this.append(...children);
|
|
117
|
-
|
|
118
|
-
}
|
|
114
|
+
// Constructor.
|
|
115
|
+
constructor(...children: AppendType[]) {
|
|
116
|
+
|
|
117
|
+
// Initialize base class.
|
|
118
|
+
super({
|
|
119
|
+
derived: AnchorVStackElement,
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
// Add children.
|
|
123
|
+
this.append(...children);
|
|
124
|
+
|
|
125
|
+
}
|
|
119
126
|
}
|
|
120
127
|
export const AnchorVStack = Elements.wrapper(AnchorVStackElement);
|
|
121
128
|
export const NullAnchorVStack = Elements.create_null(AnchorVStackElement);
|
|
122
|
-
declare module './any_element.d.ts' { interface AnyElementMap { AnchorVStackElement: AnchorVStackElement }}
|
|
129
|
+
declare module './any_element.d.ts' { interface AnyElementMap { AnchorVStackElement: AnchorVStackElement } }
|
|
123
130
|
|
|
124
131
|
// const stack: VElement = new AnchorVStackElement();
|
|
125
132
|
|
|
126
133
|
// HStack.
|
|
127
|
-
@Elements.
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
134
|
+
@Elements.create({
|
|
135
|
+
name: "HStackElement",
|
|
136
|
+
default_style: {
|
|
137
|
+
// "position": "relative",
|
|
138
|
+
"margin": "0px",
|
|
139
|
+
"padding": "0px",
|
|
140
|
+
// "clear": "both",
|
|
141
|
+
"overflow-x": "visible",
|
|
142
|
+
"overflow-y": "visible",
|
|
143
|
+
// "text-align": "start",
|
|
144
|
+
"display": "flex",
|
|
145
|
+
"flex-direction": "row",
|
|
146
|
+
"align-items": "flex-start", // disable the auto extending of the childs height to the max child height.
|
|
147
|
+
// "flex": "1", // disabled to support horizontal spacers in VStacks.
|
|
148
|
+
"flex:": "1 1 auto", // prevent children from exceeding its max width, @warning do not remove this cause it can produce some nasty overflow bugs, so if you want to remove it create an function to optionally remove it.
|
|
149
|
+
"outline": "none", // otherwise the focus border might show up inside an animation when the href # hashtag id is loaded.
|
|
150
|
+
"border": "none", // otherwise the focus border might show up inside an animation when the href # hashtag id is loaded.
|
|
151
|
+
"width": "100%", // to ensure its passed along all children.
|
|
152
|
+
},
|
|
153
|
+
})
|
|
154
|
+
export class HStackElement extends VElementTagMap.div {;
|
|
155
|
+
|
|
156
|
+
// Constructor.
|
|
157
|
+
constructor(...children: AppendType[]) {
|
|
158
|
+
|
|
159
|
+
// Initialize base class.
|
|
160
|
+
super({
|
|
161
|
+
derived: HStackElement,
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// Add children.
|
|
165
|
+
this.append(...children);
|
|
166
|
+
}
|
|
158
167
|
}
|
|
159
168
|
export const HStack = Elements.wrapper(HStackElement);
|
|
160
169
|
export const NullHStack = Elements.create_null(HStackElement);
|
|
161
|
-
declare module './any_element.d.ts' { interface AnyElementMap { HStackElement: HStackElement }}
|
|
170
|
+
declare module './any_element.d.ts' { interface AnyElementMap { HStackElement: HStackElement } }
|
|
162
171
|
|
|
163
172
|
// AnchorHStack
|
|
164
|
-
@Elements.
|
|
173
|
+
@Elements.create({
|
|
174
|
+
name: "AnchorHStackElement",
|
|
175
|
+
default_style: {
|
|
176
|
+
// "position": "relative",
|
|
177
|
+
"margin": "0px",
|
|
178
|
+
"padding": "0px",
|
|
179
|
+
// "clear": "both",
|
|
180
|
+
"overflow-x": "visible",
|
|
181
|
+
"overflow-y": "visible",
|
|
182
|
+
// "text-align": "start",
|
|
183
|
+
"display": "flex",
|
|
184
|
+
"flex-direction": "row",
|
|
185
|
+
"align-items": "flex-start", // disable the auto extending of the childs height to the max child height.
|
|
186
|
+
// "flex": "1", // disabled to support horizontal spacers in VStacks.
|
|
187
|
+
"flex:": "1 1 auto", // prevent children from exceeding its max width, @warning do not remove this cause it can produce some nasty overflow bugs, so if you want to remove it create an function to optionally remove it.
|
|
188
|
+
"outline": "none", // otherwise the focus border might show up inside an animation when the href # hashtag id is loaded.
|
|
189
|
+
"border": "none", // otherwise the focus border might show up inside an animation when the href # hashtag id is loaded.
|
|
190
|
+
"text-decoration": "none",
|
|
191
|
+
"width": "100%", // to ensure its passed along all children.
|
|
192
|
+
|
|
193
|
+
// After extending VStack.
|
|
194
|
+
"color": "inherit", // inherit colors since <a> does not have that and a <div> does.
|
|
195
|
+
},
|
|
196
|
+
})
|
|
165
197
|
export class AnchorHStackElement extends VElementTagMap.a {
|
|
166
198
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
// "flex": "1", // disabled to support horizontal spacers in VStacks.
|
|
179
|
-
"flex:": "1 1 auto", // prevent children from exceeding its max width, @warning do not remove this cause it can produce some nasty overflow bugs, so if you want to remove it create an function to optionally remove it.
|
|
180
|
-
"outline": "none", // otherwise the focus border might show up inside an animation when the href # hashtag id is loaded.
|
|
181
|
-
"border": "none", // otherwise the focus border might show up inside an animation when the href # hashtag id is loaded.
|
|
182
|
-
"text-decoration": "none",
|
|
183
|
-
|
|
184
|
-
// After extending VStack.
|
|
185
|
-
"color": "inherit", // inherit colors since <a> does not have that and a <div> does.
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
// Constructor.
|
|
189
|
-
constructor(...children: any[]) {
|
|
190
|
-
|
|
191
|
-
// Initialize base class.
|
|
192
|
-
super({
|
|
193
|
-
derived: AnchorHStackElement,
|
|
194
|
-
});
|
|
195
|
-
|
|
196
|
-
// Add children.
|
|
197
|
-
this.append(...children);
|
|
198
|
-
}
|
|
199
|
+
// Constructor.
|
|
200
|
+
constructor(...children: AppendType[]) {
|
|
201
|
+
|
|
202
|
+
// Initialize base class.
|
|
203
|
+
super({
|
|
204
|
+
derived: AnchorHStackElement,
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
// Add children.
|
|
208
|
+
this.append(...children);
|
|
209
|
+
}
|
|
199
210
|
}
|
|
200
211
|
export const AnchorHStack = Elements.wrapper(AnchorHStackElement);
|
|
201
212
|
export const NullAnchorHStack = Elements.create_null(AnchorHStackElement);
|
|
202
|
-
declare module './any_element.d.ts' { interface AnyElementMap { AnchorHStackElement: AnchorHStackElement }}
|
|
213
|
+
declare module './any_element.d.ts' { interface AnyElementMap { AnchorHStackElement: AnchorHStackElement } }
|
|
203
214
|
|
|
204
215
|
// ZStack.
|
|
205
|
-
@Elements.
|
|
216
|
+
@Elements.create({
|
|
217
|
+
name: "ZStackElement",
|
|
218
|
+
default_style: {
|
|
219
|
+
// "position": "relative",
|
|
220
|
+
"margin": "0px",
|
|
221
|
+
"padding": "0px",
|
|
222
|
+
"display": "grid",
|
|
223
|
+
// "text-align": "start",
|
|
224
|
+
"outline": "none", // otherwise the focus border might show up inside an animation when the href # hashtag id is loaded.
|
|
225
|
+
"border": "none", // otherwise the focus border might show up inside an animation when the href # hashtag id is loaded.
|
|
226
|
+
"width": "100%", // to ensure its passed along all children.
|
|
227
|
+
},
|
|
228
|
+
})
|
|
206
229
|
export class ZStackElement extends VElementTagMap.div {
|
|
207
230
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
// Add children.
|
|
227
|
-
this.zstack_append(...children);
|
|
228
|
-
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
// Override append.
|
|
232
|
-
append(...children: any[]) : this {
|
|
233
|
-
return this.zstack_append(...children);
|
|
234
|
-
}
|
|
231
|
+
// Constructor.
|
|
232
|
+
constructor(...children: AppendType[]) {
|
|
233
|
+
|
|
234
|
+
// Initialize base class.
|
|
235
|
+
super({
|
|
236
|
+
derived: ZStackElement,
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
// Add children.
|
|
240
|
+
this.zstack_append(children);
|
|
241
|
+
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// Override append.
|
|
245
|
+
append(...children: AppendType[]): this {
|
|
246
|
+
return this.zstack_append(children);
|
|
247
|
+
}
|
|
235
248
|
}
|
|
236
249
|
export const ZStack = Elements.wrapper(ZStackElement);
|
|
237
250
|
export const NullZStack = Elements.create_null(ZStackElement);
|
|
238
|
-
declare module './any_element.d.ts' { interface AnyElementMap { ZStackElement: ZStackElement }}
|
|
251
|
+
declare module './any_element.d.ts' { interface AnyElementMap { ZStackElement: ZStackElement } }
|