@arcanejs/toolkit 1.1.1 → 2.0.0
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/dist/backend/components/base.d.mts +10 -79
- package/dist/backend/components/base.d.ts +10 -79
- package/dist/backend/components/base.js +2 -2
- package/dist/backend/components/base.mjs +1 -1
- package/dist/backend/components/button.d.mts +9 -33
- package/dist/backend/components/button.d.ts +9 -33
- package/dist/backend/components/button.js +3 -3
- package/dist/backend/components/button.mjs +2 -2
- package/dist/backend/components/group.d.mts +9 -54
- package/dist/backend/components/group.d.ts +9 -54
- package/dist/backend/components/group.js +3 -3
- package/dist/backend/components/group.mjs +2 -2
- package/dist/backend/components/label.d.mts +6 -2
- package/dist/backend/components/label.d.ts +6 -2
- package/dist/backend/components/label.js +3 -3
- package/dist/backend/components/label.mjs +2 -2
- package/dist/backend/components/rect.d.mts +7 -2
- package/dist/backend/components/rect.d.ts +7 -2
- package/dist/backend/components/rect.js +3 -3
- package/dist/backend/components/rect.mjs +2 -2
- package/dist/backend/components/slider-button.d.mts +8 -3
- package/dist/backend/components/slider-button.d.ts +8 -3
- package/dist/backend/components/slider-button.js +3 -3
- package/dist/backend/components/slider-button.mjs +2 -2
- package/dist/backend/components/switch.d.mts +8 -3
- package/dist/backend/components/switch.d.ts +8 -3
- package/dist/backend/components/switch.js +3 -3
- package/dist/backend/components/switch.mjs +2 -2
- package/dist/backend/components/tabs.d.mts +7 -2
- package/dist/backend/components/tabs.d.ts +7 -2
- package/dist/backend/components/tabs.js +3 -3
- package/dist/backend/components/tabs.mjs +2 -2
- package/dist/backend/components/text-input.d.mts +8 -3
- package/dist/backend/components/text-input.d.ts +8 -3
- package/dist/backend/components/text-input.js +3 -3
- package/dist/backend/components/text-input.mjs +2 -2
- package/dist/backend/components/timeline.d.mts +7 -2
- package/dist/backend/components/timeline.d.ts +7 -2
- package/dist/backend/components/timeline.js +3 -3
- package/dist/backend/components/timeline.mjs +2 -2
- package/dist/{chunk-HNFNG5MD.js → chunk-4OZ22IQU.js} +5 -5
- package/dist/{chunk-5TGGF5UJ.mjs → chunk-5D7OSUZ6.mjs} +3 -3
- package/dist/{chunk-T4TMVBFM.js → chunk-6CWEURJP.js} +2 -2
- package/dist/{chunk-5JPYL5IU.js → chunk-7OX2FB6C.js} +2 -2
- package/dist/{chunk-PXYXUWXE.mjs → chunk-7TTY7CBH.mjs} +1 -1
- package/dist/{chunk-SIXWXDZW.js → chunk-CME7HZZK.js} +5 -5
- package/dist/{chunk-OAPIVG6M.mjs → chunk-CUZSHFDP.mjs} +1 -1
- package/dist/{chunk-ZLJECS4H.js → chunk-DG75CS7F.js} +5 -5
- package/dist/{chunk-V5T44HCM.js → chunk-DRQVYGTI.js} +2 -2
- package/dist/{chunk-ARRRZPUK.js → chunk-GMDJYFHD.js} +3 -3
- package/dist/{chunk-IBIEYR3L.mjs → chunk-JFZXSCGK.mjs} +3 -3
- package/dist/{chunk-LX5IL6WX.mjs → chunk-K37TZB75.mjs} +1 -1
- package/dist/{chunk-BDBRQJSI.mjs → chunk-N6IHYBZH.mjs} +1 -1
- package/dist/{chunk-SBHNIFAS.mjs → chunk-NEQRLPXK.mjs} +3 -3
- package/dist/{chunk-TOPIQUBZ.js → chunk-O5ZW6JYG.js} +6 -6
- package/dist/{chunk-7SZA6JUN.mjs → chunk-RYR5I5FT.mjs} +6 -6
- package/dist/{chunk-ADH7RZG5.js → chunk-SGACFY53.js} +6 -6
- package/dist/{chunk-25LALCAN.js → chunk-VEZGD2PG.js} +5 -5
- package/dist/{chunk-EFNFSHV3.mjs → chunk-W42AOMM6.mjs} +3 -3
- package/dist/{chunk-ISHGZXPO.mjs → chunk-YBBUC3QC.mjs} +3 -3
- package/dist/frontend/entrypoint.js +18 -7
- package/dist/frontend/entrypoint.js.map +2 -2
- package/dist/frontend/index.js +11 -1
- package/dist/frontend/index.mjs +11 -1
- package/dist/index.d.mts +7 -111
- package/dist/index.d.ts +7 -111
- package/dist/index.js +65 -26
- package/dist/index.mjs +54 -15
- package/dist/toolkit-2w2SWHlT.d.ts +269 -0
- package/dist/toolkit-DB8G2TaA.d.mts +269 -0
- package/package.json +5 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
3
|
+
var _chunkCME7HZZKjs = require('../../chunk-CME7HZZK.js');
|
|
4
|
+
require('../../chunk-SGACFY53.js');
|
|
5
5
|
require('../../chunk-3RG5ZIWI.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.SliderButton =
|
|
8
|
+
exports.SliderButton = _chunkCME7HZZKjs.SliderButton;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import * as proto from '@arcanejs/protocol/core';
|
|
2
2
|
import { I as IDMap } from '../../id-map-DxQ3_gyA.mjs';
|
|
3
|
-
import { Base, Listenable } from '
|
|
3
|
+
import { a as ToolkitConnection, d as Base, L as Listenable } from '../../toolkit-DB8G2TaA.mjs';
|
|
4
4
|
import { AnyClientComponentMessage } from '@arcanejs/protocol';
|
|
5
5
|
import '@arcanejs/protocol/logging';
|
|
6
|
+
import 'lodash';
|
|
7
|
+
import 'http';
|
|
8
|
+
import 'express';
|
|
9
|
+
import 'ws';
|
|
10
|
+
import '@arcanejs/protocol/styles';
|
|
6
11
|
|
|
7
12
|
type Events = {
|
|
8
|
-
change: (state: 'on' | 'off') => void | Promise<void>;
|
|
13
|
+
change: (state: 'on' | 'off', connection: ToolkitConnection) => void | Promise<void>;
|
|
9
14
|
};
|
|
10
15
|
type InternalProps = {
|
|
11
16
|
value?: 'on' | 'off';
|
|
@@ -27,7 +32,7 @@ declare class Switch extends Base<proto.CoreNamespace, proto.CoreComponent, Inte
|
|
|
27
32
|
/** @hidden */
|
|
28
33
|
getProtoInfo(idMap: IDMap): proto.CoreComponent;
|
|
29
34
|
/** @hidden */
|
|
30
|
-
handleMessage(message: AnyClientComponentMessage): void;
|
|
35
|
+
handleMessage(message: AnyClientComponentMessage, connection: ToolkitConnection): void;
|
|
31
36
|
setValue(state: 'on' | 'off'): void;
|
|
32
37
|
private onPropsUpdated;
|
|
33
38
|
}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import * as proto from '@arcanejs/protocol/core';
|
|
2
2
|
import { I as IDMap } from '../../id-map-DxQ3_gyA.js';
|
|
3
|
-
import { Base, Listenable } from '
|
|
3
|
+
import { a as ToolkitConnection, d as Base, L as Listenable } from '../../toolkit-2w2SWHlT.js';
|
|
4
4
|
import { AnyClientComponentMessage } from '@arcanejs/protocol';
|
|
5
5
|
import '@arcanejs/protocol/logging';
|
|
6
|
+
import 'lodash';
|
|
7
|
+
import 'http';
|
|
8
|
+
import 'express';
|
|
9
|
+
import 'ws';
|
|
10
|
+
import '@arcanejs/protocol/styles';
|
|
6
11
|
|
|
7
12
|
type Events = {
|
|
8
|
-
change: (state: 'on' | 'off') => void | Promise<void>;
|
|
13
|
+
change: (state: 'on' | 'off', connection: ToolkitConnection) => void | Promise<void>;
|
|
9
14
|
};
|
|
10
15
|
type InternalProps = {
|
|
11
16
|
value?: 'on' | 'off';
|
|
@@ -27,7 +32,7 @@ declare class Switch extends Base<proto.CoreNamespace, proto.CoreComponent, Inte
|
|
|
27
32
|
/** @hidden */
|
|
28
33
|
getProtoInfo(idMap: IDMap): proto.CoreComponent;
|
|
29
34
|
/** @hidden */
|
|
30
|
-
handleMessage(message: AnyClientComponentMessage): void;
|
|
35
|
+
handleMessage(message: AnyClientComponentMessage, connection: ToolkitConnection): void;
|
|
31
36
|
setValue(state: 'on' | 'off'): void;
|
|
32
37
|
private onPropsUpdated;
|
|
33
38
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
3
|
+
var _chunkVEZGD2PGjs = require('../../chunk-VEZGD2PG.js');
|
|
4
|
+
require('../../chunk-SGACFY53.js');
|
|
5
5
|
require('../../chunk-3RG5ZIWI.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.Switch =
|
|
8
|
+
exports.Switch = _chunkVEZGD2PGjs.Switch;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import * as proto from '@arcanejs/protocol/core';
|
|
2
2
|
import { I as IDMap } from '../../id-map-DxQ3_gyA.mjs';
|
|
3
|
-
import { BaseParent, AnyComponent } from '
|
|
4
|
-
import '@arcanejs/protocol';
|
|
3
|
+
import { e as BaseParent, A as AnyComponent } from '../../toolkit-DB8G2TaA.mjs';
|
|
5
4
|
import '@arcanejs/protocol/logging';
|
|
5
|
+
import 'lodash';
|
|
6
|
+
import 'http';
|
|
7
|
+
import 'express';
|
|
8
|
+
import 'ws';
|
|
9
|
+
import '@arcanejs/protocol';
|
|
10
|
+
import '@arcanejs/protocol/styles';
|
|
6
11
|
|
|
7
12
|
type TabDefinition = {
|
|
8
13
|
name: string;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import * as proto from '@arcanejs/protocol/core';
|
|
2
2
|
import { I as IDMap } from '../../id-map-DxQ3_gyA.js';
|
|
3
|
-
import { BaseParent, AnyComponent } from '
|
|
4
|
-
import '@arcanejs/protocol';
|
|
3
|
+
import { e as BaseParent, A as AnyComponent } from '../../toolkit-2w2SWHlT.js';
|
|
5
4
|
import '@arcanejs/protocol/logging';
|
|
5
|
+
import 'lodash';
|
|
6
|
+
import 'http';
|
|
7
|
+
import 'express';
|
|
8
|
+
import 'ws';
|
|
9
|
+
import '@arcanejs/protocol';
|
|
10
|
+
import '@arcanejs/protocol/styles';
|
|
6
11
|
|
|
7
12
|
type TabDefinition = {
|
|
8
13
|
name: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../../chunk-
|
|
4
|
+
var _chunkGMDJYFHDjs = require('../../chunk-GMDJYFHD.js');
|
|
5
|
+
require('../../chunk-SGACFY53.js');
|
|
6
6
|
require('../../chunk-3RG5ZIWI.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.Tab =
|
|
10
|
+
exports.Tab = _chunkGMDJYFHDjs.Tab; exports.Tabs = _chunkGMDJYFHDjs.Tabs;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import * as proto from '@arcanejs/protocol/core';
|
|
2
2
|
import { I as IDMap } from '../../id-map-DxQ3_gyA.mjs';
|
|
3
|
-
import { Base, Listenable } from '
|
|
3
|
+
import { a as ToolkitConnection, d as Base, L as Listenable } from '../../toolkit-DB8G2TaA.mjs';
|
|
4
4
|
import { AnyClientComponentMessage } from '@arcanejs/protocol';
|
|
5
5
|
import '@arcanejs/protocol/logging';
|
|
6
|
+
import 'lodash';
|
|
7
|
+
import 'http';
|
|
8
|
+
import 'express';
|
|
9
|
+
import 'ws';
|
|
10
|
+
import '@arcanejs/protocol/styles';
|
|
6
11
|
|
|
7
12
|
type Events = {
|
|
8
|
-
change: (value: string) => void | Promise<void>;
|
|
13
|
+
change: (value: string, connection: ToolkitConnection) => void | Promise<void>;
|
|
9
14
|
};
|
|
10
15
|
type InternalProps = {
|
|
11
16
|
value: string | null;
|
|
@@ -21,7 +26,7 @@ declare class TextInput extends Base<proto.CoreNamespace, proto.CoreComponent, I
|
|
|
21
26
|
/** @hidden */
|
|
22
27
|
getProtoInfo: (idMap: IDMap) => proto.CoreComponent;
|
|
23
28
|
/** @hidden */
|
|
24
|
-
handleMessage: (message: AnyClientComponentMessage) => void;
|
|
29
|
+
handleMessage: (message: AnyClientComponentMessage, connection: ToolkitConnection) => void;
|
|
25
30
|
getValue: () => string | null;
|
|
26
31
|
getValidatedValue: <T>(validator: (text: string) => T) => null | T;
|
|
27
32
|
setValue: (value: string) => void;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import * as proto from '@arcanejs/protocol/core';
|
|
2
2
|
import { I as IDMap } from '../../id-map-DxQ3_gyA.js';
|
|
3
|
-
import { Base, Listenable } from '
|
|
3
|
+
import { a as ToolkitConnection, d as Base, L as Listenable } from '../../toolkit-2w2SWHlT.js';
|
|
4
4
|
import { AnyClientComponentMessage } from '@arcanejs/protocol';
|
|
5
5
|
import '@arcanejs/protocol/logging';
|
|
6
|
+
import 'lodash';
|
|
7
|
+
import 'http';
|
|
8
|
+
import 'express';
|
|
9
|
+
import 'ws';
|
|
10
|
+
import '@arcanejs/protocol/styles';
|
|
6
11
|
|
|
7
12
|
type Events = {
|
|
8
|
-
change: (value: string) => void | Promise<void>;
|
|
13
|
+
change: (value: string, connection: ToolkitConnection) => void | Promise<void>;
|
|
9
14
|
};
|
|
10
15
|
type InternalProps = {
|
|
11
16
|
value: string | null;
|
|
@@ -21,7 +26,7 @@ declare class TextInput extends Base<proto.CoreNamespace, proto.CoreComponent, I
|
|
|
21
26
|
/** @hidden */
|
|
22
27
|
getProtoInfo: (idMap: IDMap) => proto.CoreComponent;
|
|
23
28
|
/** @hidden */
|
|
24
|
-
handleMessage: (message: AnyClientComponentMessage) => void;
|
|
29
|
+
handleMessage: (message: AnyClientComponentMessage, connection: ToolkitConnection) => void;
|
|
25
30
|
getValue: () => string | null;
|
|
26
31
|
getValidatedValue: <T>(validator: (text: string) => T) => null | T;
|
|
27
32
|
setValue: (value: string) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
3
|
+
var _chunk4OZ22IQUjs = require('../../chunk-4OZ22IQU.js');
|
|
4
|
+
require('../../chunk-SGACFY53.js');
|
|
5
5
|
require('../../chunk-3RG5ZIWI.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.TextInput =
|
|
8
|
+
exports.TextInput = _chunk4OZ22IQUjs.TextInput;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import * as proto from '@arcanejs/protocol/core';
|
|
2
2
|
import { I as IDMap } from '../../id-map-DxQ3_gyA.mjs';
|
|
3
|
-
import { Base } from '
|
|
4
|
-
import '@arcanejs/protocol';
|
|
3
|
+
import { d as Base } from '../../toolkit-DB8G2TaA.mjs';
|
|
5
4
|
import '@arcanejs/protocol/logging';
|
|
5
|
+
import 'lodash';
|
|
6
|
+
import 'http';
|
|
7
|
+
import 'express';
|
|
8
|
+
import 'ws';
|
|
9
|
+
import '@arcanejs/protocol';
|
|
10
|
+
import '@arcanejs/protocol/styles';
|
|
6
11
|
|
|
7
12
|
type InternalProps = {
|
|
8
13
|
state: proto.TimelineState;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import * as proto from '@arcanejs/protocol/core';
|
|
2
2
|
import { I as IDMap } from '../../id-map-DxQ3_gyA.js';
|
|
3
|
-
import { Base } from '
|
|
4
|
-
import '@arcanejs/protocol';
|
|
3
|
+
import { d as Base } from '../../toolkit-2w2SWHlT.js';
|
|
5
4
|
import '@arcanejs/protocol/logging';
|
|
5
|
+
import 'lodash';
|
|
6
|
+
import 'http';
|
|
7
|
+
import 'express';
|
|
8
|
+
import 'ws';
|
|
9
|
+
import '@arcanejs/protocol';
|
|
10
|
+
import '@arcanejs/protocol/styles';
|
|
6
11
|
|
|
7
12
|
type InternalProps = {
|
|
8
13
|
state: proto.TimelineState;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
3
|
+
var _chunk6CWEURJPjs = require('../../chunk-6CWEURJP.js');
|
|
4
|
+
require('../../chunk-SGACFY53.js');
|
|
5
5
|
require('../../chunk-3RG5ZIWI.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.Timeline =
|
|
8
|
+
exports.Timeline = _chunk6CWEURJPjs.Timeline;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class;
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkSGACFY53js = require('./chunk-SGACFY53.js');
|
|
5
5
|
|
|
6
6
|
// src/backend/components/text-input.ts
|
|
7
7
|
var _core = require('@arcanejs/protocol/core'); var proto = _interopRequireWildcard(_core);
|
|
8
8
|
var DEFAULT_PROPS = {
|
|
9
9
|
value: null
|
|
10
10
|
};
|
|
11
|
-
var TextInput = (_class = class extends
|
|
11
|
+
var TextInput = (_class = class extends _chunkSGACFY53js.Base {
|
|
12
12
|
/** @hidden */
|
|
13
|
-
__init() {this.events = new (0,
|
|
13
|
+
__init() {this.events = new (0, _chunkSGACFY53js.EventEmitter)()}
|
|
14
14
|
constructor(props) {
|
|
15
15
|
super(DEFAULT_PROPS, props, {
|
|
16
16
|
onPropsUpdated: (oldProps) => this.events.processPropChanges(
|
|
@@ -35,11 +35,11 @@ var TextInput = (_class = class extends _chunkADH7RZG5js.Base {
|
|
|
35
35
|
};
|
|
36
36
|
}}
|
|
37
37
|
/** @hidden */
|
|
38
|
-
__init5() {this.handleMessage = (message) => {
|
|
38
|
+
__init5() {this.handleMessage = (message, connection) => {
|
|
39
39
|
if (proto.isCoreComponentMessage(message, "text-input")) {
|
|
40
40
|
if (this.props.value !== message.value) {
|
|
41
41
|
this.updateProps({ value: message.value });
|
|
42
|
-
this.events.emit("change", message.value);
|
|
42
|
+
this.events.emit("change", message.value, connection);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
}}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseParent,
|
|
3
3
|
EventEmitter
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RYR5I5FT.mjs";
|
|
5
5
|
|
|
6
6
|
// src/backend/components/group.ts
|
|
7
7
|
import * as proto from "@arcanejs/protocol/core";
|
|
@@ -103,9 +103,9 @@ var Group = class extends BaseParent {
|
|
|
103
103
|
};
|
|
104
104
|
};
|
|
105
105
|
/** @hidden */
|
|
106
|
-
handleMessage = (message) => {
|
|
106
|
+
handleMessage = (message, connection) => {
|
|
107
107
|
if (proto.isCoreComponentMessage(message, "group")) {
|
|
108
|
-
this.events.emit("title-changed", message.title);
|
|
108
|
+
this.events.emit("title-changed", message.title, connection);
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
111
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class;
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkSGACFY53js = require('./chunk-SGACFY53.js');
|
|
4
4
|
|
|
5
5
|
// src/backend/components/timeline.ts
|
|
6
6
|
var DEFAULT_PROPS = {
|
|
@@ -13,7 +13,7 @@ var DEFAULT_PROPS = {
|
|
|
13
13
|
subtitles: null,
|
|
14
14
|
source: null
|
|
15
15
|
};
|
|
16
|
-
var Timeline = (_class = class extends
|
|
16
|
+
var Timeline = (_class = class extends _chunkSGACFY53js.Base {
|
|
17
17
|
constructor(props) {
|
|
18
18
|
super(DEFAULT_PROPS, props);_class.prototype.__init.call(this);;
|
|
19
19
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkSGACFY53js = require('./chunk-SGACFY53.js');
|
|
4
4
|
|
|
5
5
|
// src/backend/components/rect.ts
|
|
6
6
|
var DEFAULT_PROPS = {
|
|
7
7
|
color: "rgba(0, 0, 0, 0)"
|
|
8
8
|
};
|
|
9
|
-
var Rect = class extends
|
|
9
|
+
var Rect = class extends _chunkSGACFY53js.Base {
|
|
10
10
|
constructor(props) {
|
|
11
11
|
super(DEFAULT_PROPS, props);
|
|
12
12
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } var _class;
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkSGACFY53js = require('./chunk-SGACFY53.js');
|
|
5
5
|
|
|
6
6
|
// src/backend/components/slider-button.ts
|
|
7
7
|
var _core = require('@arcanejs/protocol/core'); var proto = _interopRequireWildcard(_core);
|
|
@@ -10,9 +10,9 @@ var DEFAULT_PROPS = {
|
|
|
10
10
|
max: 255,
|
|
11
11
|
step: 5
|
|
12
12
|
};
|
|
13
|
-
var SliderButton = (_class = class extends
|
|
13
|
+
var SliderButton = (_class = class extends _chunkSGACFY53js.Base {
|
|
14
14
|
/** @hidden */
|
|
15
|
-
__init() {this.events = new (0,
|
|
15
|
+
__init() {this.events = new (0, _chunkSGACFY53js.EventEmitter)()}
|
|
16
16
|
/**
|
|
17
17
|
* Manually manage the state of the slider,
|
|
18
18
|
* to support both controlled and uncontrolled inputs.
|
|
@@ -49,7 +49,7 @@ var SliderButton = (_class = class extends _chunkADH7RZG5js.Base {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
/** @hidden */
|
|
52
|
-
handleMessage(message) {
|
|
52
|
+
handleMessage(message, connection) {
|
|
53
53
|
if (!proto.isCoreComponentMessage(message, "slider_button")) return;
|
|
54
54
|
const newValue = this.sanitizeNumber(message.value);
|
|
55
55
|
if (this._value === newValue) return;
|
|
@@ -57,7 +57,7 @@ var SliderButton = (_class = class extends _chunkADH7RZG5js.Base {
|
|
|
57
57
|
this._value = newValue;
|
|
58
58
|
this.updateTree();
|
|
59
59
|
}
|
|
60
|
-
this.events.emit("change", newValue);
|
|
60
|
+
this.events.emit("change", newValue, connection);
|
|
61
61
|
}
|
|
62
62
|
setValue(value) {
|
|
63
63
|
if (this.props.value) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class;
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkSGACFY53js = require('./chunk-SGACFY53.js');
|
|
5
5
|
|
|
6
6
|
// src/backend/components/button.ts
|
|
7
7
|
var _core = require('@arcanejs/protocol/core'); var proto = _interopRequireWildcard(_core);
|
|
@@ -12,9 +12,9 @@ var DEFAULT_PROPS = {
|
|
|
12
12
|
error: null,
|
|
13
13
|
onClick: null
|
|
14
14
|
};
|
|
15
|
-
var Button = (_class = class extends
|
|
15
|
+
var Button = (_class = class extends _chunkSGACFY53js.Base {
|
|
16
16
|
/** @hidden */
|
|
17
|
-
__init() {this.events = new (0,
|
|
17
|
+
__init() {this.events = new (0, _chunkSGACFY53js.EventEmitter)()}
|
|
18
18
|
constructor(props) {
|
|
19
19
|
super(DEFAULT_PROPS, props, {
|
|
20
20
|
onPropsUpdated: (oldProps) => this.events.processPropChanges(
|
|
@@ -56,9 +56,9 @@ var Button = (_class = class extends _chunkADH7RZG5js.Base {
|
|
|
56
56
|
};
|
|
57
57
|
}}
|
|
58
58
|
/** @hidden */
|
|
59
|
-
__init8() {this.handleMessage = (message) => {
|
|
59
|
+
__init8() {this.handleMessage = (message, connection) => {
|
|
60
60
|
if (proto.isCoreComponentMessage(message, "button")) {
|
|
61
|
-
this.events.emit("click").then(() => {
|
|
61
|
+
this.events.emit("click", connection).then(() => {
|
|
62
62
|
if (this.props.error) {
|
|
63
63
|
this.updateProps({
|
|
64
64
|
error: null
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkSGACFY53js = require('./chunk-SGACFY53.js');
|
|
4
4
|
|
|
5
5
|
// src/backend/components/label.ts
|
|
6
|
-
var Label = class extends
|
|
6
|
+
var Label = class extends _chunkSGACFY53js.Base {
|
|
7
7
|
constructor(props) {
|
|
8
8
|
super({ text: null }, props);
|
|
9
9
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class; var _class2;
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkSGACFY53js = require('./chunk-SGACFY53.js');
|
|
4
4
|
|
|
5
5
|
// src/backend/components/tabs.ts
|
|
6
|
-
var Tab = (_class = class extends
|
|
6
|
+
var Tab = (_class = class extends _chunkSGACFY53js.BaseParent {constructor(...args) { super(...args); _class.prototype.__init.call(this);_class.prototype.__init2.call(this); }
|
|
7
7
|
__init() {this.validateChildren = (children) => {
|
|
8
8
|
if (children.length > 1) {
|
|
9
9
|
throw new Error("Tab can only have one child");
|
|
@@ -18,7 +18,7 @@ var Tab = (_class = class extends _chunkADH7RZG5js.BaseParent {constructor(...ar
|
|
|
18
18
|
child: this.getChildren().slice(0, 1).map((c) => c.getProtoInfo(idMap))[0]
|
|
19
19
|
})}
|
|
20
20
|
}, _class);
|
|
21
|
-
var Tabs = (_class2 = class extends
|
|
21
|
+
var Tabs = (_class2 = class extends _chunkSGACFY53js.BaseParent {
|
|
22
22
|
__init3() {this.validateChildren = (children) => {
|
|
23
23
|
for (const child of children) {
|
|
24
24
|
if (!(child instanceof Tab)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Base,
|
|
3
3
|
EventEmitter
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RYR5I5FT.mjs";
|
|
5
5
|
|
|
6
6
|
// src/backend/components/slider-button.ts
|
|
7
7
|
import * as proto from "@arcanejs/protocol/core";
|
|
@@ -49,7 +49,7 @@ var SliderButton = class extends Base {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
/** @hidden */
|
|
52
|
-
handleMessage(message) {
|
|
52
|
+
handleMessage(message, connection) {
|
|
53
53
|
if (!proto.isCoreComponentMessage(message, "slider_button")) return;
|
|
54
54
|
const newValue = this.sanitizeNumber(message.value);
|
|
55
55
|
if (this._value === newValue) return;
|
|
@@ -57,7 +57,7 @@ var SliderButton = class extends Base {
|
|
|
57
57
|
this._value = newValue;
|
|
58
58
|
this.updateTree();
|
|
59
59
|
}
|
|
60
|
-
this.events.emit("change", newValue);
|
|
60
|
+
this.events.emit("change", newValue, connection);
|
|
61
61
|
}
|
|
62
62
|
setValue(value) {
|
|
63
63
|
if (this.props.value) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Base,
|
|
3
3
|
EventEmitter
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RYR5I5FT.mjs";
|
|
5
5
|
|
|
6
6
|
// src/backend/components/switch.ts
|
|
7
7
|
import * as proto from "@arcanejs/protocol/core";
|
|
@@ -40,14 +40,14 @@ var Switch = class extends Base {
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
/** @hidden */
|
|
43
|
-
handleMessage(message) {
|
|
43
|
+
handleMessage(message, connection) {
|
|
44
44
|
if (proto.isCoreComponentMessage(message, "switch")) {
|
|
45
45
|
const state = this._value === "on" ? "off" : "on";
|
|
46
46
|
if (this.props.value === void 0) {
|
|
47
47
|
this._value = state;
|
|
48
48
|
this.updateTree();
|
|
49
49
|
}
|
|
50
|
-
this.events.emit("change", state);
|
|
50
|
+
this.events.emit("change", state, connection);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
setValue(state) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class; var _class2;
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkSGACFY53js = require('./chunk-SGACFY53.js');
|
|
5
5
|
|
|
6
6
|
// src/backend/components/group.ts
|
|
7
7
|
var _core = require('@arcanejs/protocol/core'); var proto = _interopRequireWildcard(_core);
|
|
@@ -13,7 +13,7 @@ var DEFAULT_PROPS = {
|
|
|
13
13
|
title: null,
|
|
14
14
|
labels: null
|
|
15
15
|
};
|
|
16
|
-
var GroupHeader = (_class = class extends
|
|
16
|
+
var GroupHeader = (_class = class extends _chunkSGACFY53js.BaseParent {constructor(...args) { super(...args); _class.prototype.__init.call(this);_class.prototype.__init2.call(this); }
|
|
17
17
|
__init() {this.validateChildren = () => {
|
|
18
18
|
}}
|
|
19
19
|
/** @hidden */
|
|
@@ -24,9 +24,9 @@ var GroupHeader = (_class = class extends _chunkADH7RZG5js.BaseParent {construct
|
|
|
24
24
|
children: this.getChildren().map((c) => c.getProtoInfo(idMap))
|
|
25
25
|
})}
|
|
26
26
|
}, _class);
|
|
27
|
-
var Group = (_class2 = class extends
|
|
27
|
+
var Group = (_class2 = class extends _chunkSGACFY53js.BaseParent {
|
|
28
28
|
/** @hidden */
|
|
29
|
-
__init3() {this.events = new (0,
|
|
29
|
+
__init3() {this.events = new (0, _chunkSGACFY53js.EventEmitter)()}
|
|
30
30
|
constructor(props) {
|
|
31
31
|
super(DEFAULT_PROPS, props, {
|
|
32
32
|
onPropsUpdated: (oldProps) => this.events.processPropChanges(
|
|
@@ -103,9 +103,9 @@ var Group = (_class2 = class extends _chunkADH7RZG5js.BaseParent {
|
|
|
103
103
|
};
|
|
104
104
|
}}
|
|
105
105
|
/** @hidden */
|
|
106
|
-
__init15() {this.handleMessage = (message) => {
|
|
106
|
+
__init15() {this.handleMessage = (message, connection) => {
|
|
107
107
|
if (proto.isCoreComponentMessage(message, "group")) {
|
|
108
|
-
this.events.emit("title-changed", message.title);
|
|
108
|
+
this.events.emit("title-changed", message.title, connection);
|
|
109
109
|
}
|
|
110
110
|
}}
|
|
111
111
|
}, _class2);
|