verstak 0.96.26029 → 0.96.26035
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/build/dist/source/components/Button.v.d.ts +2 -2
- package/build/dist/source/components/Button.v.js +4 -4
- package/build/dist/source/components/Icon.v.d.ts +2 -2
- package/build/dist/source/components/Icon.v.js +3 -3
- package/build/dist/source/components/Image.v.d.ts +2 -2
- package/build/dist/source/components/Image.v.js +3 -3
- package/build/dist/source/components/Input.v.d.ts +2 -2
- package/build/dist/source/components/Input.v.js +7 -7
- package/build/dist/source/components/Markdown.v.js +2 -2
- package/build/dist/source/components/Spinner.v.d.ts +2 -2
- package/build/dist/source/components/Spinner.v.js +4 -4
- package/build/dist/source/components/Toggle.v.d.ts +2 -2
- package/build/dist/source/components/Toggle.v.js +4 -4
- package/build/dist/source/core/El.d.ts +1 -1
- package/build/dist/source/core/El.js +1 -1
- package/build/dist/source/core/ElDriver.d.ts +1 -15
- package/build/dist/source/core/ElDriver.js +5 -17
- package/build/dist/source/core/HtmlApiExt.d.ts +1 -1
- package/build/dist/source/core/HtmlApiExt.js +1 -1
- package/build/dist/source/core/SplitViewMath.js +3 -2
- package/build/dist/source/core/WebDriver.d.ts +1 -1
- package/build/dist/source/core/WebDriver.js +4 -4
- package/build/dist/source/core/api.d.ts +1 -1
- package/build/dist/source/core/api.js +1 -1
- package/build/dist/source/core/elements/ApplicationWindow.d.ts +13 -0
- package/build/dist/source/core/elements/ApplicationWindow.js +20 -0
- package/build/dist/source/core/elements/Cursor.d.ts +13 -0
- package/build/dist/source/core/elements/Cursor.js +19 -0
- package/build/dist/source/core/elements/Element.d.ts +15 -0
- package/build/dist/source/core/elements/Element.js +136 -0
- package/build/dist/source/core/elements/Fragment.d.ts +13 -0
- package/build/dist/source/core/elements/Fragment.js +16 -0
- package/build/dist/source/core/elements/Group.d.ts +13 -0
- package/build/dist/source/core/elements/Group.js +13 -0
- package/build/dist/source/core/elements/Partition.d.ts +17 -0
- package/build/dist/source/core/elements/Partition.js +64 -0
- package/build/dist/source/core/elements/Splitter.d.ts +15 -0
- package/build/dist/source/core/elements/Splitter.js +71 -0
- package/build/dist/source/core/elements/Table.d.ts +13 -0
- package/build/dist/source/core/elements/Table.js +13 -0
- package/build/dist/source/core/elements/api.d.ts +16 -0
- package/build/dist/source/core/elements/api.js +16 -0
- package/build/dist/source/core/elements/v5k.d.ts +1 -0
- package/build/dist/source/core/elements/v5k.js +274 -0
- package/build/dist/source/core/sensors/Handlers.js +1 -1
- package/build/dist/source/html/DraggableArea.view.d.ts +3 -3
- package/build/dist/source/html/DraggableArea.view.js +1 -1
- package/build/dist/source/html/HtmlElements.d.ts +115 -115
- package/build/dist/source/html/HtmlElements.js +115 -115
- package/build/dist/source/svg/SvgElements.d.ts +60 -60
- package/build/dist/source/svg/SvgElements.js +60 -60
- package/package.json +2 -2
- package/build/dist/source/core/Elements.d.ts +0 -44
- package/build/dist/source/core/Elements.js +0 -552
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ReactiveTreeNode,
|
|
1
|
+
import { ReactiveTreeNode, ReactiveTreeNodeDesc } from "reactronic";
|
|
2
2
|
import { El } from "verstak";
|
|
3
3
|
export type ButtonModel = {
|
|
4
4
|
icon?: string;
|
|
5
5
|
label?: string;
|
|
6
6
|
action?(): void;
|
|
7
7
|
};
|
|
8
|
-
export declare function Button(
|
|
8
|
+
export declare function Button(description?: ReactiveTreeNodeDesc<El<HTMLElement, ButtonModel>>): ReactiveTreeNode<El<HTMLElement, ButtonModel>>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ReactiveTreeNode, setBasis } from "reactronic";
|
|
2
|
-
import {
|
|
2
|
+
import { Element, OnClick } from "verstak";
|
|
3
3
|
import { rxModel } from "./common/Utils.js";
|
|
4
4
|
import { Theme } from "./Theme.js";
|
|
5
5
|
import { Icon } from "./Icon.v.js";
|
|
6
|
-
export function Button(
|
|
7
|
-
return (
|
|
6
|
+
export function Button(description) {
|
|
7
|
+
return (Element(setBasis(description, {
|
|
8
8
|
preparation() {
|
|
9
9
|
var _a;
|
|
10
10
|
(_a = this.model) !== null && _a !== void 0 ? _a : (this.model = rxModel({
|
|
@@ -25,7 +25,7 @@ export function Button(declaration) {
|
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
if (m.label) {
|
|
28
|
-
|
|
28
|
+
Element({
|
|
29
29
|
body(el, base) {
|
|
30
30
|
base();
|
|
31
31
|
this.textIsFormatted = false;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactiveTreeNodeDesc } from "reactronic";
|
|
2
2
|
import { El } from "verstak";
|
|
3
|
-
export declare function Icon(name: string,
|
|
3
|
+
export declare function Icon(name: string, description?: ReactiveTreeNodeDesc<El<HTMLElement, void>>): import("reactronic").ReactiveTreeNode<El<HTMLElement, void>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { setBasis } from "reactronic";
|
|
2
|
-
import {
|
|
2
|
+
import { Element } from "verstak";
|
|
3
3
|
import { Theme } from "./Theme.js";
|
|
4
|
-
export function Icon(name,
|
|
5
|
-
return (
|
|
4
|
+
export function Icon(name, description) {
|
|
5
|
+
return (Element(setBasis(description, {
|
|
6
6
|
signalArgs: { name },
|
|
7
7
|
body() {
|
|
8
8
|
const theme = Theme.current.icon;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactiveTreeNodeDesc } from "reactronic";
|
|
2
2
|
import { El } from "verstak";
|
|
3
3
|
export type ImageModel = {
|
|
4
4
|
source?: string;
|
|
5
5
|
};
|
|
6
|
-
export declare function Image(
|
|
6
|
+
export declare function Image(description?: ReactiveTreeNodeDesc<El<HTMLElement, ImageModel>>): import("reactronic").ReactiveTreeNode<El<HTMLElement, ImageModel>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { setBasis } from "reactronic";
|
|
2
|
-
import {
|
|
2
|
+
import { Element } from "verstak";
|
|
3
3
|
import { rxModel } from "./common/Utils.js";
|
|
4
|
-
export function Image(
|
|
5
|
-
return (
|
|
4
|
+
export function Image(description) {
|
|
5
|
+
return (Element(setBasis(description, {
|
|
6
6
|
preparation() {
|
|
7
7
|
var _a;
|
|
8
8
|
(_a = this.model) !== null && _a !== void 0 ? _a : (this.model = rxModel({ source: undefined }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactiveTreeNodeDesc } from "reactronic";
|
|
2
2
|
import { FocusModel, El } from "verstak";
|
|
3
3
|
import { ValuesOrRefs } from "./common/Utils.js";
|
|
4
4
|
export type InputModel<T = string> = FocusModel & {
|
|
@@ -12,5 +12,5 @@ export type InputModel<T = string> = FocusModel & {
|
|
|
12
12
|
isHotText: boolean;
|
|
13
13
|
inputStyle: string;
|
|
14
14
|
};
|
|
15
|
-
export declare function Input(
|
|
15
|
+
export declare function Input(description?: ReactiveTreeNodeDesc<El<HTMLElement, InputModel>>): import("reactronic").ReactiveTreeNode<El<HTMLElement, InputModel<string>>>;
|
|
16
16
|
export declare function composeInputModel<T>(props?: Partial<ValuesOrRefs<InputModel<T>>>): InputModel<T>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Mode, setBasis } from "reactronic";
|
|
2
|
-
import {
|
|
2
|
+
import { Element, OnFocus, rowBreak, Fragment, KeyboardModifiers, H, V } from "verstak";
|
|
3
3
|
import { rxModel } from "./common/Utils.js";
|
|
4
4
|
import { Theme } from "./Theme.js";
|
|
5
5
|
import { Icon } from "./Icon.v.js";
|
|
6
|
-
export function Input(
|
|
7
|
-
return (
|
|
6
|
+
export function Input(description) {
|
|
7
|
+
return (Element(setBasis(description, {
|
|
8
8
|
preparation() {
|
|
9
9
|
var _a;
|
|
10
10
|
(_a = this.model) !== null && _a !== void 0 ? _a : (this.model = composeInputModel());
|
|
@@ -42,7 +42,7 @@ export function composeInputModel(props) {
|
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
function InputField(model, styling) {
|
|
45
|
-
return (
|
|
45
|
+
return (Element({
|
|
46
46
|
key: InputField.name,
|
|
47
47
|
mode: Mode.primitive,
|
|
48
48
|
preparation(el, base) {
|
|
@@ -79,7 +79,7 @@ function InputField(model, styling) {
|
|
|
79
79
|
}));
|
|
80
80
|
}
|
|
81
81
|
function InputPopup(model, styling) {
|
|
82
|
-
return (
|
|
82
|
+
return (Element({
|
|
83
83
|
key: InputPopup.name,
|
|
84
84
|
mode: Mode.primitive,
|
|
85
85
|
body() {
|
|
@@ -91,7 +91,7 @@ function InputPopup(model, styling) {
|
|
|
91
91
|
if (options.length > 0) {
|
|
92
92
|
for (const x of model.options) {
|
|
93
93
|
rowBreak();
|
|
94
|
-
|
|
94
|
+
Element({
|
|
95
95
|
key: x,
|
|
96
96
|
mode: Mode.primitive,
|
|
97
97
|
preparation() {
|
|
@@ -102,7 +102,7 @@ function InputPopup(model, styling) {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
else
|
|
105
|
-
|
|
105
|
+
Element({
|
|
106
106
|
key: "(nothing)",
|
|
107
107
|
mode: Mode.primitive,
|
|
108
108
|
body() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import Md from "markdown-it";
|
|
2
2
|
import * as prism from "prismjs";
|
|
3
|
-
import {
|
|
3
|
+
import { Element } from "verstak";
|
|
4
4
|
export function Markdown(content) {
|
|
5
|
-
return (
|
|
5
|
+
return (Element({
|
|
6
6
|
preparation(el, base) {
|
|
7
7
|
this.contentWrapping = true;
|
|
8
8
|
base();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactiveTreeNodeDesc } from "reactronic";
|
|
2
2
|
import { El } from "verstak";
|
|
3
3
|
import { ValuesOrRefs } from "./common/Utils.js";
|
|
4
4
|
export type SpinnerModel = {
|
|
5
5
|
active: boolean;
|
|
6
6
|
color: string;
|
|
7
7
|
};
|
|
8
|
-
export declare function Spinner(
|
|
8
|
+
export declare function Spinner(description?: ReactiveTreeNodeDesc<El<HTMLElement, SpinnerModel>>): import("reactronic").ReactiveTreeNode<El<HTMLElement, SpinnerModel>>;
|
|
9
9
|
export declare function composeSpinnerModel<T>(props?: Partial<ValuesOrRefs<SpinnerModel>>): SpinnerModel;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Mode, setBasis } from "reactronic";
|
|
2
|
-
import {
|
|
2
|
+
import { Element } from "verstak";
|
|
3
3
|
import { rxModel } from "./common/Utils.js";
|
|
4
|
-
export function Spinner(
|
|
5
|
-
return (
|
|
4
|
+
export function Spinner(description) {
|
|
5
|
+
return (Element(setBasis(description, {
|
|
6
6
|
preparation() {
|
|
7
7
|
var _a;
|
|
8
8
|
(_a = this.model) !== null && _a !== void 0 ? _a : (this.model = composeSpinnerModel());
|
|
@@ -10,7 +10,7 @@ export function Spinner(declaration) {
|
|
|
10
10
|
body() {
|
|
11
11
|
const m = this.model;
|
|
12
12
|
if (m.active)
|
|
13
|
-
|
|
13
|
+
Element({
|
|
14
14
|
mode: Mode.primitive,
|
|
15
15
|
body() {
|
|
16
16
|
this.text = "loading...";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ReactiveTreeNode,
|
|
1
|
+
import { ReactiveTreeNode, ReactiveTreeNodeDesc } from "reactronic";
|
|
2
2
|
import { El } from "verstak";
|
|
3
3
|
export type ToggleModel = {
|
|
4
4
|
label?: string;
|
|
5
5
|
checked?: boolean;
|
|
6
6
|
color?: string;
|
|
7
7
|
};
|
|
8
|
-
export declare function Toggle(
|
|
8
|
+
export declare function Toggle(description?: ReactiveTreeNodeDesc<El<HTMLElement, ToggleModel>>): ReactiveTreeNode<El<HTMLElement, ToggleModel>>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ReactiveTreeNode, Mode, setBasis } from "reactronic";
|
|
2
|
-
import {
|
|
2
|
+
import { Element, OnClick } from "verstak";
|
|
3
3
|
import { rxModel } from "./common/Utils.js";
|
|
4
4
|
import { Theme } from "./Theme.js";
|
|
5
5
|
import { Icon } from "./Icon.v.js";
|
|
6
|
-
export function Toggle(
|
|
7
|
-
return (
|
|
6
|
+
export function Toggle(description) {
|
|
7
|
+
return (Element(setBasis(description, {
|
|
8
8
|
preparation() {
|
|
9
9
|
var _a;
|
|
10
10
|
(_a = this.model) !== null && _a !== void 0 ? _a : (this.model = rxModel({
|
|
@@ -27,7 +27,7 @@ export function Toggle(declaration) {
|
|
|
27
27
|
},
|
|
28
28
|
});
|
|
29
29
|
if (m.label) {
|
|
30
|
-
|
|
30
|
+
Element({
|
|
31
31
|
mode: Mode.primitive,
|
|
32
32
|
body(el, base) {
|
|
33
33
|
base();
|
|
@@ -34,7 +34,7 @@ export declare class ElImpl<T extends Element = any, M = any> implements El<T, M
|
|
|
34
34
|
constructor(node: ReactiveTreeNode<El<T, M>>);
|
|
35
35
|
prepareForUpdate(): void;
|
|
36
36
|
get rank(): number;
|
|
37
|
-
get
|
|
37
|
+
get isElement(): boolean;
|
|
38
38
|
get isTable(): boolean;
|
|
39
39
|
get isAuxiliary(): boolean;
|
|
40
40
|
get kind(): ElKind;
|
|
@@ -144,21 +144,7 @@ declare enum ElLayoutInfoFlags {
|
|
|
144
144
|
childrenRelayoutIsNeeded = 8
|
|
145
145
|
}
|
|
146
146
|
export declare const InitialElLayoutInfo: ElLayoutInfo;
|
|
147
|
-
export declare class CursorCommand {
|
|
148
|
-
absolute?: string;
|
|
149
|
-
columnShift?: number;
|
|
150
|
-
rowShift?: number;
|
|
151
|
-
}
|
|
152
|
-
export declare class CursorCommandDriver extends ElDriver<Element, unknown> {
|
|
153
|
-
constructor();
|
|
154
|
-
}
|
|
155
147
|
export declare const Constants: {
|
|
156
|
-
element: string;
|
|
157
|
-
partition: string;
|
|
158
|
-
wrapper: string;
|
|
159
|
-
splitter: string;
|
|
160
|
-
group: string;
|
|
161
|
-
layouts: string[];
|
|
162
148
|
keyAttrName: string;
|
|
163
149
|
kindAttrName: string;
|
|
164
150
|
ownReactiveTreeNodeKey: symbol;
|
|
@@ -50,7 +50,7 @@ export class ElImpl {
|
|
|
50
50
|
this._hasStylingPresets = false;
|
|
51
51
|
}
|
|
52
52
|
get rank() { return this.node.rank; }
|
|
53
|
-
get
|
|
53
|
+
get isElement() { return this.kind === ElKind.element; }
|
|
54
54
|
get isTable() { return this.kind === ElKind.table; }
|
|
55
55
|
get isAuxiliary() { return this.kind > ElKind.table; }
|
|
56
56
|
get kind() { return this._kind; }
|
|
@@ -72,7 +72,7 @@ export class ElImpl {
|
|
|
72
72
|
const prevEl = (_a = node.prev) === null || _a === void 0 ? void 0 : _a.element;
|
|
73
73
|
const prevElLayoutInfo = (_b = prevEl === null || prevEl === void 0 ? void 0 : prevEl.layoutInfo) !== null && _b !== void 0 ? _b : InitialElLayoutInfo;
|
|
74
74
|
const layoutInfo = this.layoutInfo = owner.children.isStrictOrder ? new ElLayoutInfo(prevElLayoutInfo) : undefined;
|
|
75
|
-
const isCursorElement =
|
|
75
|
+
const isCursorElement = this.kind === ElKind.cursor;
|
|
76
76
|
const coords = getElCoordsAndAdjustLayoutInfo(!isCursorElement, value, ownerEl.maxColumnCount, ownerEl.maxRowCount, prevElLayoutInfo, layoutInfo);
|
|
77
77
|
if (!equalElCoords(coords, this._coords)) {
|
|
78
78
|
if (this.native !== undefined)
|
|
@@ -352,6 +352,7 @@ export class ElImpl {
|
|
|
352
352
|
el.classList.add(StylingClassNameByAlignmentVerticalRowWise[value]);
|
|
353
353
|
}
|
|
354
354
|
static applySelfAlignmentHorizontal(element, existing, value) {
|
|
355
|
+
var _a;
|
|
355
356
|
const e = element.native;
|
|
356
357
|
if (existing !== undefined) {
|
|
357
358
|
e.classList.remove(StylingClassNameBySelfAlignmentHorizontal[existing]);
|
|
@@ -360,7 +361,7 @@ export class ElImpl {
|
|
|
360
361
|
}
|
|
361
362
|
if (value !== undefined) {
|
|
362
363
|
e.classList.add(StylingClassNameBySelfAlignmentHorizontal[value]);
|
|
363
|
-
const grow = element.selfStretchingStrengthHorizontal;
|
|
364
|
+
const grow = (_a = element.selfStretchingStrengthHorizontal) !== null && _a !== void 0 ? _a : 1;
|
|
364
365
|
if ((value === H.stretch || value === H.stretchAndFix) && grow !== undefined && grow !== 1)
|
|
365
366
|
element.style.flexGrow = `${grow}`;
|
|
366
367
|
else
|
|
@@ -669,27 +670,14 @@ function absolutizePosition(pos, cursor, max) {
|
|
|
669
670
|
pos = Math.min(pos, max);
|
|
670
671
|
return pos;
|
|
671
672
|
}
|
|
672
|
-
export class CursorCommand {
|
|
673
|
-
}
|
|
674
|
-
export class CursorCommandDriver extends ElDriver {
|
|
675
|
-
constructor() {
|
|
676
|
-
super("cursor", false, el => el.kind = ElKind.cursor);
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
673
|
export const Constants = {
|
|
680
|
-
element: "el",
|
|
681
|
-
partition: "part",
|
|
682
|
-
wrapper: "wrapper",
|
|
683
|
-
splitter: "splitter",
|
|
684
|
-
group: "group",
|
|
685
|
-
layouts: ["block", "table", "group", "", "", ""],
|
|
686
674
|
keyAttrName: "key",
|
|
687
675
|
kindAttrName: "kind",
|
|
688
676
|
ownReactiveTreeNodeKey: Symbol("own-reactive-tree-node"),
|
|
689
677
|
};
|
|
690
678
|
const DriversByLayout = [
|
|
691
679
|
el => {
|
|
692
|
-
el.native.classList.add("v5k-
|
|
680
|
+
el.native.classList.add("v5k-element");
|
|
693
681
|
},
|
|
694
682
|
el => {
|
|
695
683
|
el.native.classList.add("v5k-table");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SymDataForSensor, SymHtmlSensors, SymResizeObserver } from "../core/sensors/DataForSensor.js";
|
|
2
|
-
import { HtmlSensors } from "../core/sensors/
|
|
2
|
+
import { HtmlSensors } from "../core/sensors/api.js";
|
|
3
3
|
const ElementType = Element !== null && Element !== void 0 ? Element : global.Element;
|
|
4
4
|
if (ElementType !== undefined) {
|
|
5
5
|
Object.defineProperty(ElementType.prototype, "sensors", {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Direction } from "./El.js";
|
|
2
2
|
import { clamp } from "./ElUtils.js";
|
|
3
|
-
import {
|
|
3
|
+
import { isSplitViewPartition } from "./elements/Splitter.js";
|
|
4
|
+
import { SplitterDriver } from "./elements/Splitter.js";
|
|
4
5
|
const DEBUG = false;
|
|
5
6
|
const eps = 0.0001;
|
|
6
7
|
export function equal(a, b) {
|
|
@@ -133,7 +134,7 @@ export function layout(splitViewNode) {
|
|
|
133
134
|
}
|
|
134
135
|
}
|
|
135
136
|
}
|
|
136
|
-
else if (child.driver
|
|
137
|
+
else if (child.driver instanceof SplitterDriver) {
|
|
137
138
|
const el = child.element;
|
|
138
139
|
if (el.native !== undefined) {
|
|
139
140
|
el.style.display = isSplitterEnabled ? "block" : "none";
|
|
@@ -17,7 +17,7 @@ export declare class WebDriver<T extends Element, M = unknown> extends ElDriver<
|
|
|
17
17
|
}
|
|
18
18
|
export declare class StaticDriver<T extends HTMLElement> extends WebDriver<T> {
|
|
19
19
|
readonly native: T;
|
|
20
|
-
constructor(native: T,
|
|
20
|
+
constructor(native: T, id: string, isPartition: boolean, initialize?: Handler<El<T>>);
|
|
21
21
|
assignNativeElement(node: ReactiveTreeNode<El<T>>): void;
|
|
22
22
|
}
|
|
23
23
|
export declare class HtmlDriver<T extends HTMLElement, M = any> extends WebDriver<T, M> {
|
|
@@ -105,8 +105,8 @@ export class WebDriver extends ElDriver {
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
export class StaticDriver extends WebDriver {
|
|
108
|
-
constructor(native,
|
|
109
|
-
super(
|
|
108
|
+
constructor(native, id, isPartition, initialize) {
|
|
109
|
+
super(id, isPartition, initialize);
|
|
110
110
|
this.native = native;
|
|
111
111
|
}
|
|
112
112
|
assignNativeElement(node) {
|
|
@@ -115,12 +115,12 @@ export class StaticDriver extends WebDriver {
|
|
|
115
115
|
}
|
|
116
116
|
export class HtmlDriver extends WebDriver {
|
|
117
117
|
assignNativeElement(node) {
|
|
118
|
-
node.element.native = document.createElement(node.driver.
|
|
118
|
+
node.element.native = document.createElement(node.driver.id);
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
export class SvgDriver extends WebDriver {
|
|
122
122
|
assignNativeElement(node) {
|
|
123
|
-
node.element.native = document.createElementNS("http://www.w3.org/2000/svg", node.driver.
|
|
123
|
+
node.element.native = document.createElementNS("http://www.w3.org/2000/svg", node.driver.id);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
function blink(element, priority, revision) {
|
|
@@ -5,7 +5,7 @@ export * from "./ElDriver.js";
|
|
|
5
5
|
export * from "./WebDriver.js";
|
|
6
6
|
export * from "./Sizes.js";
|
|
7
7
|
export * from "./SplitViewMath.js";
|
|
8
|
-
export * from "./
|
|
8
|
+
export * from "./elements/api.js";
|
|
9
9
|
export * from "./sensors/api.js";
|
|
10
10
|
export * from "./HtmlApiExt.js";
|
|
11
11
|
import "./HtmlApiExt.js";
|
|
@@ -5,7 +5,7 @@ export * from "./ElDriver.js";
|
|
|
5
5
|
export * from "./WebDriver.js";
|
|
6
6
|
export * from "./Sizes.js";
|
|
7
7
|
export * from "./SplitViewMath.js";
|
|
8
|
-
export * from "./
|
|
8
|
+
export * from "./elements/api.js";
|
|
9
9
|
export * from "./sensors/api.js";
|
|
10
10
|
export * from "./HtmlApiExt.js";
|
|
11
11
|
import "./HtmlApiExt.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactiveTreeNode, ReactiveTreeNodeDesc, Script, Mode, ScriptAsync } from "reactronic";
|
|
2
|
+
import { El } from "../El.js";
|
|
3
|
+
import { ElementDriver } from "./Element.js";
|
|
4
|
+
export declare function ApplicationWindow(body: Script<El<HTMLElement>>): ReactiveTreeNode<El<HTMLElement>>;
|
|
5
|
+
export declare function ApplicationWindow(key: string, body: Script<El<HTMLElement>>): ReactiveTreeNode<El<HTMLElement>>;
|
|
6
|
+
export declare function ApplicationWindow(mode: Mode, body: Script<El<HTMLElement>>): ReactiveTreeNode<El<HTMLElement>>;
|
|
7
|
+
export declare function ApplicationWindow(description: ReactiveTreeNodeDesc<El<HTMLElement>>): ReactiveTreeNode<El<HTMLElement>>;
|
|
8
|
+
export declare function ApplicationWindow(key?: string, mode?: Mode, body?: Script<El<HTMLElement>>, bodyTask?: ScriptAsync<El<HTMLElement>>, preparation?: Script<El<HTMLElement>>, preparationTask?: ScriptAsync<El<HTMLElement>>, mounting?: Script<El<HTMLElement>>, finalization?: Script<El<HTMLElement>>, signalArgs?: unknown, unmounted?: boolean, basis?: ReactiveTreeNodeDesc<El<HTMLElement>>): ReactiveTreeNode<El<HTMLElement>>;
|
|
9
|
+
export declare class ApplicationWindowDriver<T extends HTMLElement> extends ElementDriver<T> {
|
|
10
|
+
readonly native: T;
|
|
11
|
+
constructor(native: T);
|
|
12
|
+
assignNativeElement(node: ReactiveTreeNode<El<T>>): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { describe } from "reactronic";
|
|
2
|
+
import { ElementDriver } from "./Element.js";
|
|
3
|
+
import { acquireVerstakStyleSheet } from "./v5k.js";
|
|
4
|
+
export function ApplicationWindow(bodyOrKeyOrModeDescription, bodyOrMode, body, bodyTask, preparation, preparationTask, mounting, finalization, signalArgs, unmounted, basis) {
|
|
5
|
+
acquireVerstakStyleSheet();
|
|
6
|
+
const page = (document !== null && document !== void 0 ? document : global.document).body;
|
|
7
|
+
const driver = new ApplicationWindowDriver(page);
|
|
8
|
+
page.classList.add("v5k-app");
|
|
9
|
+
page.classList.add("v5k-element");
|
|
10
|
+
return describe(driver, bodyOrKeyOrModeDescription, bodyOrMode, body, bodyTask, preparation, preparationTask, mounting, finalization, signalArgs, unmounted, basis);
|
|
11
|
+
}
|
|
12
|
+
export class ApplicationWindowDriver extends ElementDriver {
|
|
13
|
+
constructor(native) {
|
|
14
|
+
super();
|
|
15
|
+
this.native = native;
|
|
16
|
+
}
|
|
17
|
+
assignNativeElement(node) {
|
|
18
|
+
node.element.native = this.native;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ElPlace } from "../El.js";
|
|
2
|
+
import { ElDriver } from "../ElDriver.js";
|
|
3
|
+
export declare function cursor(place: ElPlace): void;
|
|
4
|
+
export declare class CursorCommand {
|
|
5
|
+
absolute?: string;
|
|
6
|
+
columnShift?: number;
|
|
7
|
+
rowShift?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class CursorCommandDriver extends ElDriver<Element, unknown> {
|
|
10
|
+
static readonly id = "cursor";
|
|
11
|
+
static readonly glob: CursorCommandDriver;
|
|
12
|
+
constructor();
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { describe } from "reactronic";
|
|
2
|
+
import { ElKind } from "../El.js";
|
|
3
|
+
import { ElDriver } from "../ElDriver.js";
|
|
4
|
+
export function cursor(place) {
|
|
5
|
+
describe(CursorCommandDriver.glob, {
|
|
6
|
+
body() {
|
|
7
|
+
this.place = place;
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export class CursorCommand {
|
|
12
|
+
}
|
|
13
|
+
export class CursorCommandDriver extends ElDriver {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(CursorCommandDriver.id, false, el => el.kind = ElKind.cursor);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
CursorCommandDriver.id = "cursor";
|
|
19
|
+
CursorCommandDriver.glob = new CursorCommandDriver();
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactiveTreeNode, ReactiveTreeNodeDesc, ReactiveTreeNodeDriver, LinkedItem, Script, Mode, ScriptAsync } from "reactronic";
|
|
2
|
+
import { El } from "../El.js";
|
|
3
|
+
import { HtmlDriver } from "../WebDriver.js";
|
|
4
|
+
export declare function Element<M = unknown>(body: Script<El<HTMLElement, M>>): ReactiveTreeNode<El<HTMLElement, M>>;
|
|
5
|
+
export declare function Element<M = unknown>(key: string, body: Script<El<HTMLElement, M>>): ReactiveTreeNode<El<HTMLElement, M>>;
|
|
6
|
+
export declare function Element<M = unknown>(mode: Mode, body: Script<El<HTMLElement, M>>): ReactiveTreeNode<El<HTMLElement, M>>;
|
|
7
|
+
export declare function Element<M = unknown>(description: ReactiveTreeNodeDesc<El<HTMLElement, M>>): ReactiveTreeNode<El<HTMLElement, M>>;
|
|
8
|
+
export declare function Element<M = unknown>(key?: string, mode?: Mode, body?: Script<El<HTMLElement, M>>, bodyTask?: ScriptAsync<El<HTMLElement, M>>, preparation?: Script<El<HTMLElement, M>>, preparationTask?: ScriptAsync<El<HTMLElement, M>>, mounting?: Script<El<HTMLElement, M>>, finalization?: Script<El<HTMLElement, M>>, signalArgs?: unknown, unmounted?: boolean, basis?: ReactiveTreeNodeDesc<El<HTMLElement, M>>): ReactiveTreeNode<El<HTMLElement, M>>;
|
|
9
|
+
export declare class ElementDriver<T extends HTMLElement> extends HtmlDriver<T> {
|
|
10
|
+
static readonly id: string;
|
|
11
|
+
static readonly glob: ElementDriver<HTMLElement>;
|
|
12
|
+
constructor();
|
|
13
|
+
rebuildBody(node: ReactiveTreeNode<El<T>>): void | Promise<void>;
|
|
14
|
+
describeChild(ownerNode: ReactiveTreeNode<El<T, any>>, childDriver: ReactiveTreeNodeDriver<any>, childDescription?: ReactiveTreeNodeDesc<any> | undefined, childBasis?: ReactiveTreeNodeDesc<any> | undefined): LinkedItem<ReactiveTreeNode> | undefined;
|
|
15
|
+
}
|