evmux-app-framework 0.0.13 → 0.0.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evmux-app-framework",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -6,6 +6,7 @@ import PostMessageManager from '../PostMessageManager/PostMessageManager';
6
6
  import appsDataManager from '../AppsDataManager/AppsDataManager';
7
7
  import AppsObserverCommentsHandler from './AppsObserverCommentsHandler'
8
8
  import AppsObserverSceneHandler from './AppsObserverSceneHandler'
9
+ import AppsObserverAppsHandler from './AppsObserverAppsHandler'
9
10
 
10
11
  import { availableEvents } from '../EvmuxAppsApi/EvmuxAppsApi'
11
12
 
@@ -18,6 +19,7 @@ export const availableRequests = {
18
19
  unregisterEvent: "unregisterEvent",
19
20
  EvEvent: "EvEvent",
20
21
  raiseAppMessagingEvent: "raiseAppMessagingEvent",
22
+ raiseExternalAppMessagingEvent: "raiseExternalAppMessagingEvent",
21
23
  }
22
24
 
23
25
 
@@ -41,6 +43,9 @@ let createEventResultObject = (requestName, eventName, result) => {
41
43
  this._messagesEventHandlers = new pubSub()
42
44
  this._eventHandler = new pubSub()
43
45
  this._requestHandlers = []
46
+
47
+ // add requestHandler which are the same on editorVue
48
+ this._requestHandlers.push(new AppsObserverAppsHandler(app))
44
49
  }
45
50
 
46
51
  init(app) {
@@ -0,0 +1,26 @@
1
+ import AppsObserverRequestHandlerBase from './AppsObserverRequestHandlerBase'
2
+
3
+ import AppsObserver, { availableRequests } from './AppsObserver'
4
+ export default class AppsObserverAppsHandler extends AppsObserverRequestHandlerBase {
5
+ constructor(){
6
+ super()
7
+ }
8
+
9
+ canHandleRequest(requestObj)
10
+ {
11
+ const supportedRequests = [availableRequests.raiseExternalAppMessagingEvent];
12
+ return supportedRequests.includes(requestObj.request);
13
+ }
14
+
15
+ async raiseAppMessagingEvent(requestObj) {
16
+ AppsObserver._sendPostMessageToUsrAppInstancesComponents(requestObj.data.targetUserAppInstanceId, requestObj.data.data);
17
+ return null;
18
+ }
19
+
20
+ async handleRequest(requestObj)
21
+ {
22
+ return this[requestObj.request](requestObj);
23
+ }
24
+
25
+
26
+ }
@@ -10,7 +10,12 @@ export const availableEvents = {
10
10
  viewerCountChanged: "viewerCountChanged",
11
11
  keystroke: "keystroke",
12
12
  comments: "comments",
13
- appMessaging: "appMessaging"
13
+ appMessaging: "appMessaging",
14
+ externalAppMessaging: "externalAppMessaging"
15
+ }
16
+
17
+ export const layerTypes = {
18
+ userApp: "userApp"
14
19
  }
15
20
 
16
21
  export default class EvmuxAppsApi {
@@ -0,0 +1,22 @@
1
+ import { availableRequests } from '../AppsObserver/AppsObserver.js'
2
+ export default class EvmuxAppsApiApps {
3
+
4
+ constructor(evmuxAppsApi) {
5
+ this.evmuxAppsApi = evmuxAppsApi;
6
+ }
7
+
8
+ sendMessageToApp(userAppInstanceId, dataObject= {}) {
9
+ let requestObj = {
10
+ request: availableRequests.raiseExternalAppMessagingEvent,
11
+ userAppInstanceId: this.evmuxAppsApi._userAppInstanceId,
12
+ componentId: this.evmuxAppsApi._componentId,
13
+ data: {
14
+ targetUserAppInstanceId: userAppInstanceId,
15
+ data: dataObject
16
+ }
17
+ }
18
+
19
+ return this._postMessageManager.sendRequest(requestObj);
20
+ }
21
+
22
+ }
@@ -0,0 +1,450 @@
1
+ body.light {background-color: #fff;}
2
+ body.dark {background-color: #2f353f;}
3
+
4
+ .app_settings_title {
5
+ font-weight: 500;
6
+ font-size: 14px;
7
+ margin-bottom: 15px;
8
+ padding-left: 10px;
9
+ padding-right: 10px;
10
+ }
11
+ .light .app_settings_title {color: #676778;}
12
+ .dark .app_settings_title {color: #fff;}
13
+ .app_settings_item + .app_settings_title {margin-top: 15px;}
14
+
15
+
16
+
17
+
18
+ .app_settings_item {
19
+ display: flex;
20
+ align-items: center;
21
+ padding-left: 10px;
22
+ padding-right: 10px;
23
+ }
24
+ .app_settings_item + .app_settings_item {
25
+ border-top-width: 1px;
26
+ border-top-style: solid;
27
+ margin-top: 6px;
28
+ padding-top: 6px;
29
+ }
30
+ .light .app_settings_item + .app_settings_item {border-top-color: #efeff7;}
31
+ .dark .app_settings_item + .app_settings_item {border-top-color: #383e4c;}
32
+
33
+ .app_settings_item_head {
34
+ display: flex;
35
+ align-items: center;
36
+ /*overflow: hidden;*/
37
+ flex: 0 0 120px;
38
+ padding-right: 4px;
39
+ }
40
+ .app_settings_item_title {
41
+ word-break: break-word;
42
+ font-weight: 400;
43
+ font-size: 12px;
44
+ line-height: 16px;
45
+ flex: 1;
46
+ overflow: hidden;
47
+ }
48
+ .light .app_settings_item_title {color: #676778;}
49
+ .dark .app_settings_item_title {color: #fff;}
50
+
51
+ .question_mark {width: 16px; flex: 0 0 16px; margin-right: 4px; position: relative;}
52
+ .question_mark svg {width: 16px; display: block; cursor: pointer;}
53
+ .question_mark .tool_tip {
54
+ display: none;
55
+ position: absolute;
56
+ bottom: calc(100% + 10px);
57
+ left: 0;
58
+ min-width: 40px;
59
+ max-width: 200px;
60
+ padding: 12px;
61
+ border-radius: 10px;
62
+ font-weight: 500;
63
+ font-size: 13px;
64
+ line-height: 18px;
65
+ text-align: center;
66
+ z-index: 16;
67
+ pointer-events: none;
68
+ border-width: 1px;
69
+ border-style: solid;
70
+ word-break: break-word;
71
+ width: max-content;
72
+ }
73
+ .question_mark:hover .tool_tip.bottom {
74
+ bottom: auto;
75
+ top: calc(100% + 10px);
76
+ }
77
+ .question_mark:hover .tool_tip {
78
+ display: block;
79
+ }
80
+ .light .question_mark path {fill: #676778;}
81
+ .dark .question_mark path {fill: #fff;}
82
+ .light .question_mark .tool_tip {
83
+ border-color: #d5d5e5;
84
+ background-color: #fff;
85
+ color: #676778;
86
+ box-shadow: 10px 4px 6px 0 rgba(0, 0, 0, 0.06);
87
+ }
88
+ .dark .question_mark .tool_tip {
89
+ background-color: #1E222B;
90
+ border-color: #383e4c;
91
+ box-shadow: 0 0 11px 4px rgba(0, 0, 0, 0.15);
92
+ color: #fff;
93
+ }
94
+
95
+ .app_settings_item_body {
96
+ flex: 1;
97
+ overflow: hidden;
98
+ }
99
+
100
+ .app_settings_item_text_input {
101
+ display: block;
102
+ width: 100%;
103
+ font-weight: 500;
104
+ font-size: 13px;
105
+ border-width: 1px;
106
+ border-style: solid;
107
+ border-radius: 10px;
108
+ height: 36px;
109
+ padding: 0 10px;
110
+ outline: none;
111
+ box-shadow: none;
112
+ overflow: hidden;
113
+ background: transparent;
114
+ }
115
+ .light .app_settings_item_text_input {color: #676778; border-color: #dcdce8;}
116
+ .dark .app_settings_item_text_input {color: #fff; border-color: #505a68;}
117
+ .light .app_settings_item_text_input:active,
118
+ .light .app_settings_item_text_input:focus,
119
+ .light .app_settings_item_text_input:active:focus,
120
+ .dark .app_settings_item_text_input:active,
121
+ .dark .app_settings_item_text_input:focus,
122
+ .dark .app_settings_item_text_input:active:focus {border-color: #0096ff;}
123
+ @media (max-width: 1400px), (max-height: 780px) {
124
+ .app_settings_item_text_input {
125
+ height: 30px;
126
+ font-size: 11px;
127
+ }
128
+ }
129
+
130
+
131
+ .app_settings_item_select {
132
+ cursor: pointer;
133
+ border-width: 1px;
134
+ border-style: solid;
135
+ height: 40px;
136
+ border-radius: 10px;
137
+ font-weight: 400;
138
+ font-size: 14px;
139
+ padding: 0 12px;
140
+ width: 100%;
141
+ }
142
+ .light .app_settings_item_select {
143
+ border-color: #e3e3ec;
144
+ color: #676778;
145
+ }
146
+ .dark .app_settings_item_select {
147
+ border-color: #2f353f;
148
+ color: #fff;
149
+ background-color: #383e4c;
150
+ }
151
+ @media (max-width: 1400px), (max-height: 780px) {
152
+ .app_settings_item_select {
153
+ height: 30px;
154
+ font-size: 11px;
155
+ }
156
+ }
157
+
158
+
159
+
160
+ .app_settings_item_file_chooser {
161
+ display: flex;
162
+ align-items: center;
163
+ }
164
+ .app_settings_item_file_chooser_input_block {
165
+ width: 94px;
166
+ height: 52px;
167
+ border-radius: 8px;
168
+ border-width: 1px;
169
+ border-style: solid;
170
+ overflow: hidden;
171
+ position: relative;
172
+ }
173
+ .light .app_settings_item_file_chooser_input_block {border-color: #efeff7;}
174
+ .dark .app_settings_item_file_chooser_input_block {border-color: #383e4c;}
175
+
176
+ .app_settings_item_file_chooser_input_block img {
177
+ display: block;
178
+ width: 100%;
179
+ height: 100%;
180
+ aspect-ratio: 94/52;
181
+ object-fit: contain;
182
+ }
183
+ .app_settings_item_file_chooser_input_block input {
184
+ position: absolute;
185
+ z-index: 2;
186
+ display: block;
187
+ width: 100%;
188
+ height: 100%;
189
+ top: 0;
190
+ left: 0;
191
+ cursor: pointer;
192
+ opacity: 0;
193
+ }
194
+ .app_settings_item_file_chooser_input_block input::file-selector-button {
195
+ display: none;
196
+ }
197
+
198
+ .app_settings_item_file_chooser_no_image {
199
+ position: absolute;
200
+ top: 1px;
201
+ left: 1px;
202
+ width: calc(100% - 2px);
203
+ height: calc(100% - 2px);
204
+ border-radius: 8px;
205
+ display: flex;
206
+ align-items: center;
207
+ justify-content: center;
208
+ }
209
+ .app_settings_item_file_chooser_no_image svg {
210
+ width: 20px;
211
+ }
212
+ .light .app_settings_item_file_chooser_no_image svg path {
213
+ fill: #676778;
214
+ }
215
+ .dark .app_settings_item_file_chooser_no_image svg path {
216
+ fill: #fff;
217
+ }
218
+
219
+ .light .app_settings_item_file_chooser_no_image {background-color: #efeff7;}
220
+ .dark .app_settings_item_file_chooser_no_image {background-color: #383e4c;}
221
+
222
+
223
+
224
+ .app_settings_item_color {
225
+ display: flex;
226
+ align-items: center;
227
+ cursor: pointer;
228
+ }
229
+ .app_settings_item_color svg {
230
+ width: 20px;
231
+ margin-right: 8px;
232
+ }
233
+ .light .app_settings_item_color_preview_border {fill: #e3e3ec;}
234
+ .dark .app_settings_item_color_preview_border {fill: #505a68;}
235
+
236
+ .app_settings_item_color_code {
237
+ display: flex;
238
+ align-items: center;
239
+ height: 30px;
240
+ overflow: hidden;
241
+ width: 110px;
242
+ border-radius: 4px;
243
+ }
244
+ .light .app_settings_item_color_code {color: #676778; background-color: #f0f0f7;}
245
+ .dark .app_settings_item_color_code {color: #fff; background-color: #383e4c;}
246
+ .app_settings_item_color_code:before {
247
+ content: '#';
248
+ display: flex;
249
+ align-items: center;
250
+ justify-content: center;
251
+ font-size: 14px;
252
+ width: 24px;
253
+ height: 100%;
254
+ margin-right: 8px;
255
+ flex: 0 0 24px;
256
+ }
257
+ .light .app_settings_item_color_code:before {background-color: #d6d6e5;}
258
+ .dark .app_settings_item_color_code:before {background-color: #505a68;}
259
+
260
+ .app_settings_item_color_code_text {
261
+ font-size: 14px;
262
+ line-height: 16px;
263
+ font-weight: 400;
264
+ }
265
+ .color_picker_holder {
266
+ flex: 0 0 100%;
267
+ padding-top: 10px;
268
+ }
269
+ .color_picker_holder .alwan {
270
+ border-radius: 12px;
271
+ overflow: hidden;
272
+ }
273
+ .light .color_picker_holder .alwan {
274
+ background-color: #fff;
275
+ border-color: #D6D6E5;
276
+ }
277
+ .dark .color_picker_holder .alwan {
278
+ background-color: #2f353f;
279
+ border-color: #383e4c;
280
+ }
281
+
282
+ .color_picker_holder .alwan .alwan__slider::-webkit-slider-runnable-track {
283
+ height: 10px;
284
+ border-radius: 5px;
285
+ }
286
+ .color_picker_holder .alwan .alwan__slider::-webkit-slider-thumb {
287
+ width: 12px;
288
+ height: 12px;
289
+ border-radius: 50%;
290
+ border: none;
291
+ box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.37);
292
+ transform: translateY(2px);
293
+ }
294
+ .color_picker_holder .alwan .alwan__slider--alpha {
295
+ margin-top: 8px;
296
+ }
297
+ .color_picker_holder .alwan .alwan__preview {
298
+ width: 30px;
299
+ height: 30px;
300
+ border-radius: 50%;
301
+ }
302
+
303
+ .light .alwan__container {border-top-color: #D6D6E5;}
304
+ .dark .alwan__container {border-top-color: #383e4c;}
305
+
306
+ .light .color_picker_holder .alwan .alwan__inputs label {color: #676778;}
307
+ .dark .color_picker_holder .alwan .alwan__inputs label {color: #fff;}
308
+
309
+ .color_picker_holder .alwan .alwan__input {
310
+ padding: 0;
311
+ height: 24px;
312
+ border-radius: 8px;
313
+ font-size: 12px;
314
+ font-weight: 500;
315
+ background: transparent;
316
+ }
317
+ .light .color_picker_holder .alwan .alwan__input {border-color: #D6D6E5; color: #676778;}
318
+ .dark .color_picker_holder .alwan .alwan__input {border-color: #383e4c; color: #fff;}
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+
328
+ .btn {
329
+ display: flex;
330
+ align-items: center;
331
+ justify-content: center;
332
+ border-radius: 10px;
333
+ height: 40px;
334
+ font-weight: 500;
335
+ font-size: 14px;
336
+ cursor: pointer;
337
+ border: none;
338
+ box-shadow: none;
339
+ text-align: center;
340
+ background: transparent;
341
+ }
342
+ .btn:not(.btn_icon) {
343
+ min-width: 94px;
344
+ padding: 0 20px;
345
+ }
346
+ .btn_icon {
347
+ width: 40px;
348
+ }
349
+ .btn_icon svg {
350
+ width: 20px;
351
+ }
352
+ .btn_icon svg path {}
353
+
354
+ .light .btn.primary,
355
+ .dark .btn.primary {
356
+ color: #fff;
357
+ background-color: #0096ff;
358
+ }
359
+
360
+ .light .btn.delete svg path,
361
+ .dark .btn.delete svg path {fill: #676778;}
362
+ .light .btn.primary svg path,
363
+ .dark .btn.primary svg path {fill: #fff;}
364
+
365
+ .light .btn.delete:hover {background-color: #efced2;}
366
+ .dark .btn.delete:hover {background-color: #342832;}
367
+ .light .btn.delete:hover svg path,
368
+ .dark .btn.delete:hover svg path {fill: #ff616d;}
369
+
370
+ @media (max-width: 1400px), (max-height: 780px) {
371
+ body:not(.mobile) .btn:not(.btn_icon) {
372
+ height: 30px;
373
+ padding: 0 15px;
374
+ font-size: 11px;
375
+ }
376
+ }
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+
385
+
386
+
387
+ .scroll_bar_style::-webkit-scrollbar {
388
+ width: 4px;
389
+ height: 4px;
390
+ }
391
+ .scroll_bar_style::-webkit-scrollbar-thumb {
392
+ border-radius: 1.5px;
393
+ border: none;
394
+ }
395
+ .scroll_bar_style::-webkit-scrollbar-track {
396
+ background-color: rgba(255, 255, 255, 0.015);
397
+ }
398
+ .scroll_bar_style::-webkit-scrollbar {
399
+ background-color: rgba(255, 255, 255, 0.015);
400
+ }
401
+ .scroll_bar_style::-webkit-scrollbar-thumb {
402
+ background-color: rgba(204, 204, 204, 0.9);
403
+ }
404
+ .scroll_bar_style.hidden_scroll {
405
+ padding-right: 4px;
406
+ pointer-events: none;
407
+ }
408
+ .scroll_bar_style.hidden_scroll::-webkit-scrollbar {
409
+ width: 0px;
410
+ height: 0px;
411
+ }
412
+ .scroll_bar_style.hidden_scroll::-webkit-scrollbar-thumb {
413
+ border-radius: 0px;
414
+ border: none;
415
+ }
416
+
417
+
418
+
419
+
420
+
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+
@@ -0,0 +1,44 @@
1
+ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
2
+ const path = require("path");
3
+
4
+
5
+ module.exports = {
6
+
7
+ entry: {
8
+ 'evmuxUiStylesCss': './src/style/evmuxUiStyles.css',
9
+
10
+ },
11
+ output: {
12
+ path: path.resolve(__dirname, "dist"),
13
+
14
+ publicPath: "",
15
+ // the output bundle
16
+ //filename: '[name].[hash].js',
17
+ // filename: '[name].js',
18
+ // chunkFilename: "[name].[hash].bundle.js",
19
+ // saves the files into the dist/static folder
20
+ // path: path.resolve(__dirname, '/home/ubuntu/CONSOLE/www/editorevmux/public/producerApp'),
21
+ // path: path.resolve(__dirname, 'dist'),
22
+ // set static as src="static/main.js as relative path
23
+
24
+ // publicPath: '', // ROMA!!! - if need to run broadcast local
25
+ },
26
+ module: {
27
+
28
+
29
+ rules: [
30
+
31
+ {
32
+ test: /\.(scss|css)$/,
33
+ use: [
34
+ MiniCssExtractPlugin.loader,
35
+ 'css-loader',
36
+ ],
37
+ },
38
+
39
+
40
+ ],
41
+ },
42
+
43
+ plugins: [new MiniCssExtractPlugin({ filename: '[name].css'})],
44
+ };