@player-tools/devtools-basic-web-plugin 0.6.0 → 0.6.1--canary.110.2690

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.
@@ -16,8 +16,7 @@ var PLUGIN_NAME = "Standard Devtools";
16
16
  var PLUGIN_DESCRIPTION = "Standard Player UI Devtools";
17
17
  var PLUGIN_VERSION = "0.0.1";
18
18
  var INTERACTIONS = {
19
- EVALUATE_EXPRESSION: "evaluate-expression",
20
- OVERRIDE_FLOW: "override-flow"
19
+ EVALUATE_EXPRESSION: "evaluate-expression"
21
20
  };
22
21
  var BASE_PLUGIN_DATA = {
23
22
  id: PLUGIN_ID,
@@ -158,20 +157,6 @@ var generated_default = {
158
157
  }
159
158
  }
160
159
  }
161
- },
162
- {
163
- asset: {
164
- id: "Config-header-values-4",
165
- type: "action",
166
- value: "Editor",
167
- label: {
168
- asset: {
169
- id: "Config-header-values-4-label",
170
- type: "text",
171
- value: "Editor"
172
- }
173
- }
174
- }
175
160
  }
176
161
  ]
177
162
  }
@@ -254,20 +239,6 @@ var generated_default = {
254
239
  }
255
240
  }
256
241
  }
257
- },
258
- {
259
- asset: {
260
- id: "Flow-header-values-4",
261
- type: "action",
262
- value: "Editor",
263
- label: {
264
- asset: {
265
- id: "Flow-header-values-4-label",
266
- type: "text",
267
- value: "Editor"
268
- }
269
- }
270
- }
271
242
  }
272
243
  ]
273
244
  }
@@ -364,20 +335,6 @@ var generated_default = {
364
335
  }
365
336
  }
366
337
  }
367
- },
368
- {
369
- asset: {
370
- id: "Logs-header-values-4",
371
- type: "action",
372
- value: "Editor",
373
- label: {
374
- asset: {
375
- id: "Logs-header-values-4-label",
376
- type: "text",
377
- value: "Editor"
378
- }
379
- }
380
- }
381
338
  }
382
339
  ]
383
340
  }
@@ -453,20 +410,6 @@ var generated_default = {
453
410
  }
454
411
  }
455
412
  }
456
- },
457
- {
458
- asset: {
459
- id: "Console-header-values-4",
460
- type: "action",
461
- value: "Editor",
462
- label: {
463
- asset: {
464
- id: "Console-header-values-4-label",
465
- type: "text",
466
- value: "Editor"
467
- }
468
- }
469
- }
470
413
  }
471
414
  ]
472
415
  }
@@ -479,96 +422,6 @@ var generated_default = {
479
422
  binding: "history"
480
423
  }
481
424
  }
482
- },
483
- {
484
- id: "Editor",
485
- type: "stacked-view",
486
- header: {
487
- asset: {
488
- id: "Editor-header",
489
- type: "navigation",
490
- values: [
491
- {
492
- asset: {
493
- id: "Editor-header-values-0",
494
- type: "action",
495
- value: "Config",
496
- label: {
497
- asset: {
498
- id: "Editor-header-values-0-label",
499
- type: "text",
500
- value: "Config"
501
- }
502
- }
503
- }
504
- },
505
- {
506
- asset: {
507
- id: "Editor-header-values-1",
508
- type: "action",
509
- value: "Flow",
510
- label: {
511
- asset: {
512
- id: "Editor-header-values-1-label",
513
- type: "text",
514
- value: "Flow"
515
- }
516
- }
517
- }
518
- },
519
- {
520
- asset: {
521
- id: "Editor-header-values-2",
522
- type: "action",
523
- value: "Logs",
524
- label: {
525
- asset: {
526
- id: "Editor-header-values-2-label",
527
- type: "text",
528
- value: "Logs"
529
- }
530
- }
531
- }
532
- },
533
- {
534
- asset: {
535
- id: "Editor-header-values-3",
536
- type: "action",
537
- value: "Console",
538
- label: {
539
- asset: {
540
- id: "Editor-header-values-3-label",
541
- type: "text",
542
- value: "Console"
543
- }
544
- }
545
- }
546
- },
547
- {
548
- asset: {
549
- id: "Editor-header-values-4",
550
- type: "action",
551
- value: "Editor",
552
- label: {
553
- asset: {
554
- id: "Editor-header-values-4-label",
555
- type: "text",
556
- value: "Editor"
557
- }
558
- }
559
- }
560
- }
561
- ]
562
- }
563
- },
564
- main: {
565
- asset: {
566
- id: "Editor-main",
567
- type: "code-editor",
568
- binding: "flow",
569
- exp: " publish('override-flow', {{code}}) "
570
- }
571
- }
572
425
  }
573
426
  ],
574
427
  navigation: {
@@ -582,8 +435,7 @@ var generated_default = {
582
435
  Config: "CONFIG",
583
436
  Flow: "FLOW",
584
437
  Logs: "LOGS",
585
- Console: "CONSOLE",
586
- Editor: "EDITOR"
438
+ Console: "CONSOLE"
587
439
  }
588
440
  },
589
441
  FLOW: {
@@ -593,8 +445,7 @@ var generated_default = {
593
445
  Config: "CONFIG",
594
446
  Flow: "FLOW",
595
447
  Logs: "LOGS",
596
- Console: "CONSOLE",
597
- Editor: "EDITOR"
448
+ Console: "CONSOLE"
598
449
  }
599
450
  },
600
451
  LOGS: {
@@ -604,8 +455,7 @@ var generated_default = {
604
455
  Config: "CONFIG",
605
456
  Flow: "FLOW",
606
457
  Logs: "LOGS",
607
- Console: "CONSOLE",
608
- Editor: "EDITOR"
458
+ Console: "CONSOLE"
609
459
  }
610
460
  },
611
461
  CONSOLE: {
@@ -615,19 +465,7 @@ var generated_default = {
615
465
  Config: "CONFIG",
616
466
  Flow: "FLOW",
617
467
  Logs: "LOGS",
618
- Console: "CONSOLE",
619
- Editor: "EDITOR"
620
- }
621
- },
622
- EDITOR: {
623
- state_type: "VIEW",
624
- ref: "Editor",
625
- transitions: {
626
- Config: "CONFIG",
627
- Flow: "FLOW",
628
- Logs: "LOGS",
629
- Console: "CONSOLE",
630
- Editor: "EDITOR"
468
+ Console: "CONSOLE"
631
469
  }
632
470
  }
633
471
  }
@@ -652,18 +490,6 @@ var generated_default = {
652
490
  type: "string"
653
491
  }
654
492
  },
655
- code: {
656
- type: "StringType",
657
- default: "",
658
- validation: [
659
- {
660
- type: "string"
661
- }
662
- ],
663
- format: {
664
- type: "string"
665
- }
666
- },
667
493
  history: {
668
494
  type: "historyType",
669
495
  isArray: true
@@ -890,8 +716,7 @@ var WrapperComponent = ({
890
716
  playerConfig,
891
717
  logs,
892
718
  flow,
893
- expressionEvaluator,
894
- overrideFlow
719
+ expressionEvaluator
895
720
  }) => {
896
721
  const [state, playerID, dispatch] = usePluginState();
897
722
  const lastProcessedInteraction = React.useRef(0);
@@ -929,15 +754,6 @@ var WrapperComponent = ({
929
754
  });
930
755
  lastProcessedInteraction.current += 1;
931
756
  }
932
- if (type === INTERACTIONS.OVERRIDE_FLOW && payload && overrideFlow) {
933
- let newFlow;
934
- try {
935
- newFlow = JSON.parse(payload);
936
- } catch (e) {
937
- console.error("Error parsing new flow", e);
938
- }
939
- newFlow && overrideFlow(newFlow);
940
- }
941
757
  },
942
758
  [dispatch, expressionEvaluator, id, state]
943
759
  );
@@ -1018,7 +834,6 @@ var BasicWevDevtoolsPlugin = class {
1018
834
  expressionEvaluator;
1019
835
  view;
1020
836
  dataController;
1021
- overrideFlow;
1022
837
  checkIfDevtoolsIsActive() {
1023
838
  return localStorage.getItem("player-ui-devtools-active") === "true";
1024
839
  }
@@ -1053,7 +868,6 @@ var BasicWevDevtoolsPlugin = class {
1053
868
  player.hooks.expressionEvaluator.tap(this.name, (evaluator) => {
1054
869
  this.expressionEvaluator = new WeakRef(evaluator);
1055
870
  });
1056
- this.overrideFlow = player.start.bind(player);
1057
871
  }
1058
872
  applyReact(reactPlayer) {
1059
873
  if (!this.checkIfDevtoolsIsActive()) {
@@ -1069,7 +883,6 @@ var BasicWevDevtoolsPlugin = class {
1069
883
  logs: this.logs,
1070
884
  flow: this.flow,
1071
885
  view: this.view,
1072
- overrideFlow: this.overrideFlow,
1073
886
  expressionEvaluator: this.expressionEvaluator
1074
887
  },
1075
888
  /* @__PURE__ */ React2.createElement(Component, null)
package/dist/index.mjs CHANGED
@@ -16,8 +16,7 @@ var PLUGIN_NAME = "Standard Devtools";
16
16
  var PLUGIN_DESCRIPTION = "Standard Player UI Devtools";
17
17
  var PLUGIN_VERSION = "0.0.1";
18
18
  var INTERACTIONS = {
19
- EVALUATE_EXPRESSION: "evaluate-expression",
20
- OVERRIDE_FLOW: "override-flow"
19
+ EVALUATE_EXPRESSION: "evaluate-expression"
21
20
  };
22
21
  var BASE_PLUGIN_DATA = {
23
22
  id: PLUGIN_ID,
@@ -158,20 +157,6 @@ var generated_default = {
158
157
  }
159
158
  }
160
159
  }
161
- },
162
- {
163
- asset: {
164
- id: "Config-header-values-4",
165
- type: "action",
166
- value: "Editor",
167
- label: {
168
- asset: {
169
- id: "Config-header-values-4-label",
170
- type: "text",
171
- value: "Editor"
172
- }
173
- }
174
- }
175
160
  }
176
161
  ]
177
162
  }
@@ -254,20 +239,6 @@ var generated_default = {
254
239
  }
255
240
  }
256
241
  }
257
- },
258
- {
259
- asset: {
260
- id: "Flow-header-values-4",
261
- type: "action",
262
- value: "Editor",
263
- label: {
264
- asset: {
265
- id: "Flow-header-values-4-label",
266
- type: "text",
267
- value: "Editor"
268
- }
269
- }
270
- }
271
242
  }
272
243
  ]
273
244
  }
@@ -364,20 +335,6 @@ var generated_default = {
364
335
  }
365
336
  }
366
337
  }
367
- },
368
- {
369
- asset: {
370
- id: "Logs-header-values-4",
371
- type: "action",
372
- value: "Editor",
373
- label: {
374
- asset: {
375
- id: "Logs-header-values-4-label",
376
- type: "text",
377
- value: "Editor"
378
- }
379
- }
380
- }
381
338
  }
382
339
  ]
383
340
  }
@@ -453,20 +410,6 @@ var generated_default = {
453
410
  }
454
411
  }
455
412
  }
456
- },
457
- {
458
- asset: {
459
- id: "Console-header-values-4",
460
- type: "action",
461
- value: "Editor",
462
- label: {
463
- asset: {
464
- id: "Console-header-values-4-label",
465
- type: "text",
466
- value: "Editor"
467
- }
468
- }
469
- }
470
413
  }
471
414
  ]
472
415
  }
@@ -479,96 +422,6 @@ var generated_default = {
479
422
  binding: "history"
480
423
  }
481
424
  }
482
- },
483
- {
484
- id: "Editor",
485
- type: "stacked-view",
486
- header: {
487
- asset: {
488
- id: "Editor-header",
489
- type: "navigation",
490
- values: [
491
- {
492
- asset: {
493
- id: "Editor-header-values-0",
494
- type: "action",
495
- value: "Config",
496
- label: {
497
- asset: {
498
- id: "Editor-header-values-0-label",
499
- type: "text",
500
- value: "Config"
501
- }
502
- }
503
- }
504
- },
505
- {
506
- asset: {
507
- id: "Editor-header-values-1",
508
- type: "action",
509
- value: "Flow",
510
- label: {
511
- asset: {
512
- id: "Editor-header-values-1-label",
513
- type: "text",
514
- value: "Flow"
515
- }
516
- }
517
- }
518
- },
519
- {
520
- asset: {
521
- id: "Editor-header-values-2",
522
- type: "action",
523
- value: "Logs",
524
- label: {
525
- asset: {
526
- id: "Editor-header-values-2-label",
527
- type: "text",
528
- value: "Logs"
529
- }
530
- }
531
- }
532
- },
533
- {
534
- asset: {
535
- id: "Editor-header-values-3",
536
- type: "action",
537
- value: "Console",
538
- label: {
539
- asset: {
540
- id: "Editor-header-values-3-label",
541
- type: "text",
542
- value: "Console"
543
- }
544
- }
545
- }
546
- },
547
- {
548
- asset: {
549
- id: "Editor-header-values-4",
550
- type: "action",
551
- value: "Editor",
552
- label: {
553
- asset: {
554
- id: "Editor-header-values-4-label",
555
- type: "text",
556
- value: "Editor"
557
- }
558
- }
559
- }
560
- }
561
- ]
562
- }
563
- },
564
- main: {
565
- asset: {
566
- id: "Editor-main",
567
- type: "code-editor",
568
- binding: "flow",
569
- exp: " publish('override-flow', {{code}}) "
570
- }
571
- }
572
425
  }
573
426
  ],
574
427
  navigation: {
@@ -582,8 +435,7 @@ var generated_default = {
582
435
  Config: "CONFIG",
583
436
  Flow: "FLOW",
584
437
  Logs: "LOGS",
585
- Console: "CONSOLE",
586
- Editor: "EDITOR"
438
+ Console: "CONSOLE"
587
439
  }
588
440
  },
589
441
  FLOW: {
@@ -593,8 +445,7 @@ var generated_default = {
593
445
  Config: "CONFIG",
594
446
  Flow: "FLOW",
595
447
  Logs: "LOGS",
596
- Console: "CONSOLE",
597
- Editor: "EDITOR"
448
+ Console: "CONSOLE"
598
449
  }
599
450
  },
600
451
  LOGS: {
@@ -604,8 +455,7 @@ var generated_default = {
604
455
  Config: "CONFIG",
605
456
  Flow: "FLOW",
606
457
  Logs: "LOGS",
607
- Console: "CONSOLE",
608
- Editor: "EDITOR"
458
+ Console: "CONSOLE"
609
459
  }
610
460
  },
611
461
  CONSOLE: {
@@ -615,19 +465,7 @@ var generated_default = {
615
465
  Config: "CONFIG",
616
466
  Flow: "FLOW",
617
467
  Logs: "LOGS",
618
- Console: "CONSOLE",
619
- Editor: "EDITOR"
620
- }
621
- },
622
- EDITOR: {
623
- state_type: "VIEW",
624
- ref: "Editor",
625
- transitions: {
626
- Config: "CONFIG",
627
- Flow: "FLOW",
628
- Logs: "LOGS",
629
- Console: "CONSOLE",
630
- Editor: "EDITOR"
468
+ Console: "CONSOLE"
631
469
  }
632
470
  }
633
471
  }
@@ -652,18 +490,6 @@ var generated_default = {
652
490
  type: "string"
653
491
  }
654
492
  },
655
- code: {
656
- type: "StringType",
657
- default: "",
658
- validation: [
659
- {
660
- type: "string"
661
- }
662
- ],
663
- format: {
664
- type: "string"
665
- }
666
- },
667
493
  history: {
668
494
  type: "historyType",
669
495
  isArray: true
@@ -890,8 +716,7 @@ var WrapperComponent = ({
890
716
  playerConfig,
891
717
  logs,
892
718
  flow,
893
- expressionEvaluator,
894
- overrideFlow
719
+ expressionEvaluator
895
720
  }) => {
896
721
  const [state, playerID, dispatch] = usePluginState();
897
722
  const lastProcessedInteraction = React.useRef(0);
@@ -929,15 +754,6 @@ var WrapperComponent = ({
929
754
  });
930
755
  lastProcessedInteraction.current += 1;
931
756
  }
932
- if (type === INTERACTIONS.OVERRIDE_FLOW && payload && overrideFlow) {
933
- let newFlow;
934
- try {
935
- newFlow = JSON.parse(payload);
936
- } catch (e) {
937
- console.error("Error parsing new flow", e);
938
- }
939
- newFlow && overrideFlow(newFlow);
940
- }
941
757
  },
942
758
  [dispatch, expressionEvaluator, id, state]
943
759
  );
@@ -1018,7 +834,6 @@ var BasicWevDevtoolsPlugin = class {
1018
834
  expressionEvaluator;
1019
835
  view;
1020
836
  dataController;
1021
- overrideFlow;
1022
837
  checkIfDevtoolsIsActive() {
1023
838
  return localStorage.getItem("player-ui-devtools-active") === "true";
1024
839
  }
@@ -1053,7 +868,6 @@ var BasicWevDevtoolsPlugin = class {
1053
868
  player.hooks.expressionEvaluator.tap(this.name, (evaluator) => {
1054
869
  this.expressionEvaluator = new WeakRef(evaluator);
1055
870
  });
1056
- this.overrideFlow = player.start.bind(player);
1057
871
  }
1058
872
  applyReact(reactPlayer) {
1059
873
  if (!this.checkIfDevtoolsIsActive()) {
@@ -1069,7 +883,6 @@ var BasicWevDevtoolsPlugin = class {
1069
883
  logs: this.logs,
1070
884
  flow: this.flow,
1071
885
  view: this.view,
1072
- overrideFlow: this.overrideFlow,
1073
886
  expressionEvaluator: this.expressionEvaluator
1074
887
  },
1075
888
  /* @__PURE__ */ React2.createElement(Component, null)