@norskvideo/norsk-studio-built-ins 1.13.0 → 1.15.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/client/info.js +234 -228
- package/client/style.css +1 -1
- package/lib/info.js +2 -2
- package/lib/info.js.map +1 -1
- package/lib/processor.onscreenGraphic/image-selection.d.ts +9 -0
- package/lib/{processor.dynamicBug/bug-selection.js → processor.onscreenGraphic/image-selection.js} +10 -10
- package/lib/processor.onscreenGraphic/image-selection.js.map +1 -0
- package/lib/processor.onscreenGraphic/info.d.ts +3 -0
- package/lib/{processor.dynamicBug → processor.onscreenGraphic}/info.js +10 -10
- package/lib/processor.onscreenGraphic/info.js.map +1 -0
- package/lib/processor.onscreenGraphic/runtime.d.ts +67 -0
- package/lib/{processor.dynamicBug → processor.onscreenGraphic}/runtime.js +75 -75
- package/lib/processor.onscreenGraphic/runtime.js.map +1 -0
- package/lib/processor.onscreenGraphic/summary-view.d.ts +4 -0
- package/lib/processor.onscreenGraphic/summary-view.js +128 -0
- package/lib/processor.onscreenGraphic/summary-view.js.map +1 -0
- package/lib/{processor.dynamicBug → processor.onscreenGraphic}/types.d.ts +2 -2
- package/lib/processor.onscreenGraphic/types.js.map +1 -0
- package/lib/processor.onscreenGraphic/types.yaml +25 -0
- package/lib/test/{dynamic-bug.js → onscreen-graphic.js} +79 -79
- package/lib/test/onscreen-graphic.js.map +1 -0
- package/package.json +5 -6
- package/lib/processor.dynamicBug/bug-selection.d.ts +0 -9
- package/lib/processor.dynamicBug/bug-selection.js.map +0 -1
- package/lib/processor.dynamicBug/info.d.ts +0 -3
- package/lib/processor.dynamicBug/info.js.map +0 -1
- package/lib/processor.dynamicBug/runtime.d.ts +0 -67
- package/lib/processor.dynamicBug/runtime.js.map +0 -1
- package/lib/processor.dynamicBug/summary-view.d.ts +0 -4
- package/lib/processor.dynamicBug/summary-view.js +0 -128
- package/lib/processor.dynamicBug/summary-view.js.map +0 -1
- package/lib/processor.dynamicBug/types.js.map +0 -1
- package/lib/test/dynamic-bug.js.map +0 -1
- /package/lib/{processor.dynamicBug → processor.onscreenGraphic}/types.js +0 -0
- /package/lib/test/{dynamic-bug.d.ts → onscreen-graphic.d.ts} +0 -0
package/client/info.js
CHANGED
@@ -643,19 +643,89 @@ var init_inline_view6 = __esm({
|
|
643
643
|
}
|
644
644
|
});
|
645
645
|
|
646
|
-
// build/processor.
|
647
|
-
var
|
648
|
-
__export(
|
649
|
-
default: () =>
|
646
|
+
// build/processor.fixedLadder/rung-view.js
|
647
|
+
var rung_view_exports = {};
|
648
|
+
__export(rung_view_exports, {
|
649
|
+
default: () => rung_view_default
|
650
|
+
});
|
651
|
+
function rung_view_default(rung) {
|
652
|
+
return (0, import_jsx_runtime14.jsx)("div", { className: "", children: rung.name });
|
653
|
+
}
|
654
|
+
var import_jsx_runtime14;
|
655
|
+
var init_rung_view = __esm({
|
656
|
+
"build/processor.fixedLadder/rung-view.js"() {
|
657
|
+
"use strict";
|
658
|
+
import_jsx_runtime14 = __toESM(require_jsx_runtime());
|
659
|
+
}
|
660
|
+
});
|
661
|
+
|
662
|
+
// build/processor.fixedLadder/codec-editor.js
|
663
|
+
var codec_editor_exports = {};
|
664
|
+
__export(codec_editor_exports, {
|
665
|
+
default: () => CodecEditor
|
650
666
|
});
|
651
|
-
function
|
652
|
-
const [loading, setLoading] = (0, import_react13.useState)(true);
|
667
|
+
function CodecEditor(props) {
|
653
668
|
(0, import_react13.useEffect)(() => {
|
669
|
+
if (props.defaultValue)
|
670
|
+
props.onChanged(props.defaultValue);
|
671
|
+
}, [props.defaultValue]);
|
672
|
+
const textAreaRef = (0, import_react13.useRef)(null);
|
673
|
+
const [value, setValue] = (0, import_react13.useState)(props.defaultValue);
|
674
|
+
(0, import_react13.useEffect)(() => {
|
675
|
+
if (textAreaRef.current) {
|
676
|
+
const target = textAreaRef.current;
|
677
|
+
target.style.height = "";
|
678
|
+
target.style.height = target.scrollHeight + "px";
|
679
|
+
}
|
680
|
+
}, []);
|
681
|
+
return (0, import_jsx_runtime15.jsx)("textarea", { ref: textAreaRef, className: "w-full min-h-fit dark:text-white dark:bg-black", onChange: (e) => {
|
682
|
+
const target = e.currentTarget;
|
683
|
+
try {
|
684
|
+
const codec = JSON.parse(target.value);
|
685
|
+
setValue(codec);
|
686
|
+
props.onChanged(codec);
|
687
|
+
} catch (e2) {
|
688
|
+
}
|
689
|
+
}, defaultValue: JSON.stringify(value, void 0, 2) });
|
690
|
+
}
|
691
|
+
var import_jsx_runtime15, import_react13;
|
692
|
+
var init_codec_editor = __esm({
|
693
|
+
"build/processor.fixedLadder/codec-editor.js"() {
|
694
|
+
"use strict";
|
695
|
+
import_jsx_runtime15 = __toESM(require_jsx_runtime());
|
696
|
+
import_react13 = __toESM(require_react());
|
697
|
+
}
|
698
|
+
});
|
699
|
+
|
700
|
+
// build/processor.fixedLadder/codec-view.js
|
701
|
+
var codec_view_exports = {};
|
702
|
+
__export(codec_view_exports, {
|
703
|
+
default: () => CodecEditor2
|
704
|
+
});
|
705
|
+
function CodecEditor2(props) {
|
706
|
+
return (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [props.width, "x", props.height] });
|
707
|
+
}
|
708
|
+
var import_jsx_runtime16;
|
709
|
+
var init_codec_view = __esm({
|
710
|
+
"build/processor.fixedLadder/codec-view.js"() {
|
711
|
+
"use strict";
|
712
|
+
import_jsx_runtime16 = __toESM(require_jsx_runtime());
|
713
|
+
}
|
714
|
+
});
|
715
|
+
|
716
|
+
// build/processor.onscreenGraphic/image-selection.js
|
717
|
+
var image_selection_exports = {};
|
718
|
+
__export(image_selection_exports, {
|
719
|
+
default: () => image_selection_default
|
720
|
+
});
|
721
|
+
function GraphicSelection(props) {
|
722
|
+
const [loading, setLoading] = (0, import_react15.useState)(true);
|
723
|
+
(0, import_react15.useEffect)(() => {
|
654
724
|
const fn = async () => {
|
655
|
-
const result2 = await fetch("components/processor.
|
725
|
+
const result2 = await fetch("components/processor.onscreenGraphic/graphics");
|
656
726
|
if (result2.ok && result2.body) {
|
657
|
-
const
|
658
|
-
|
727
|
+
const graphics = await result2.json();
|
728
|
+
setGraphics(graphics);
|
659
729
|
setLoading(false);
|
660
730
|
if (props.defaultValue)
|
661
731
|
props.onChanged(props.defaultValue);
|
@@ -666,65 +736,65 @@ function BugSelection(props) {
|
|
666
736
|
};
|
667
737
|
fn().catch(console.error);
|
668
738
|
}, []);
|
669
|
-
const [
|
739
|
+
const [graphcs, setGraphics] = (0, import_react15.useState)([]);
|
670
740
|
if (loading) {
|
671
|
-
return (0,
|
741
|
+
return (0, import_jsx_runtime17.jsx)("div", { children: "Loading.." });
|
672
742
|
}
|
673
|
-
if (
|
674
|
-
return (0,
|
743
|
+
if (graphcs.length == 0) {
|
744
|
+
return (0, import_jsx_runtime17.jsx)("div", { children: "No graphics loaded" });
|
675
745
|
}
|
676
|
-
return (0,
|
677
|
-
return (0,
|
746
|
+
return (0, import_jsx_runtime17.jsx)("div", { children: (0, import_jsx_runtime17.jsxs)("select", { defaultValue: props.defaultValue, className: `node-editor-select-input`, id: props.id, onChange: myOnChange, onBlur: myOnChange, children: [(0, import_jsx_runtime17.jsx)("option", { value: "", children: "---" }, "empty"), graphcs.map((o, i) => {
|
747
|
+
return (0, import_jsx_runtime17.jsx)("option", { value: o, children: o }, i);
|
678
748
|
})] }) });
|
679
749
|
function myOnChange(e) {
|
680
750
|
props.onChanged(e.target.value);
|
681
751
|
}
|
682
752
|
}
|
683
|
-
var
|
684
|
-
var
|
685
|
-
"build/processor.
|
753
|
+
var import_jsx_runtime17, import_react15, image_selection_default;
|
754
|
+
var init_image_selection = __esm({
|
755
|
+
"build/processor.onscreenGraphic/image-selection.js"() {
|
686
756
|
"use strict";
|
687
|
-
|
688
|
-
|
689
|
-
|
757
|
+
import_jsx_runtime17 = __toESM(require_jsx_runtime());
|
758
|
+
import_react15 = __toESM(require_react());
|
759
|
+
image_selection_default = GraphicSelection;
|
690
760
|
}
|
691
761
|
});
|
692
762
|
|
693
|
-
// build/processor.
|
763
|
+
// build/processor.onscreenGraphic/summary-view.js
|
694
764
|
var summary_view_exports3 = {};
|
695
765
|
__export(summary_view_exports3, {
|
696
766
|
default: () => summary_view_default3
|
697
767
|
});
|
698
768
|
function SummaryView5({ state, sendCommand, urls }) {
|
699
|
-
const [
|
700
|
-
const [position, setPosition] = (0,
|
701
|
-
const [
|
702
|
-
const [fileToUpload, setFileToUpload] = (0,
|
703
|
-
const [showFileInput, setShowFileInput] = (0,
|
704
|
-
const [showUploadButton, setShowUploadButton] = (0,
|
705
|
-
const [uploadStatus, setUploadStatus] = (0,
|
706
|
-
const [showDeleteDropdown, setShowDeleteDropdown] = (0,
|
707
|
-
const [
|
708
|
-
const
|
769
|
+
const [graphic, setGraphic] = (0, import_react16.useState)(state.activeGraphic?.file);
|
770
|
+
const [position, setPosition] = (0, import_react16.useState)(state.activeGraphic?.position);
|
771
|
+
const [graphics, setGraphics] = (0, import_react16.useState)([]);
|
772
|
+
const [fileToUpload, setFileToUpload] = (0, import_react16.useState)(void 0);
|
773
|
+
const [showFileInput, setShowFileInput] = (0, import_react16.useState)(false);
|
774
|
+
const [showUploadButton, setShowUploadButton] = (0, import_react16.useState)(false);
|
775
|
+
const [uploadStatus, setUploadStatus] = (0, import_react16.useState)({ success: false, message: null });
|
776
|
+
const [showDeleteDropdown, setShowDeleteDropdown] = (0, import_react16.useState)(false);
|
777
|
+
const [graphicToDelete, setGraphicToDelete] = (0, import_react16.useState)("");
|
778
|
+
const updateGraphics = (0, import_react16.useCallback)(async () => {
|
709
779
|
try {
|
710
|
-
const result2 = await fetch(`${urls.componentUrl}/
|
780
|
+
const result2 = await fetch(`${urls.componentUrl}/graphics`);
|
711
781
|
if (result2.ok) {
|
712
|
-
const
|
713
|
-
|
782
|
+
const newGraphics = await result2.json();
|
783
|
+
setGraphics(newGraphics);
|
714
784
|
} else {
|
715
785
|
throw new Error(await result2.text());
|
716
786
|
}
|
717
787
|
} catch (error) {
|
718
|
-
console.error("Failed to update
|
788
|
+
console.error("Failed to update graphics:", error);
|
719
789
|
setUploadStatus({
|
720
790
|
success: false,
|
721
|
-
message: "Failed to update
|
791
|
+
message: "Failed to update graphic list."
|
722
792
|
});
|
723
793
|
}
|
724
794
|
}, [urls.componentUrl]);
|
725
|
-
(0,
|
726
|
-
|
727
|
-
}, [
|
795
|
+
(0, import_react16.useEffect)(() => {
|
796
|
+
updateGraphics().catch(console.error);
|
797
|
+
}, [updateGraphics]);
|
728
798
|
const onFileChange = (e) => {
|
729
799
|
const file = e.target.files?.[0];
|
730
800
|
setFileToUpload(file);
|
@@ -737,7 +807,7 @@ function SummaryView5({ state, sendCommand, urls }) {
|
|
737
807
|
try {
|
738
808
|
const form = new FormData();
|
739
809
|
form.append("file", fileToUpload);
|
740
|
-
const response = await fetch(`${urls.componentUrl}/
|
810
|
+
const response = await fetch(`${urls.componentUrl}/graphics`, {
|
741
811
|
method: "POST",
|
742
812
|
body: form
|
743
813
|
});
|
@@ -745,7 +815,7 @@ function SummaryView5({ state, sendCommand, urls }) {
|
|
745
815
|
const errorData = await response.json();
|
746
816
|
setUploadStatus({
|
747
817
|
success: false,
|
748
|
-
message: `${errorData.error}. Delete the existing
|
818
|
+
message: `${errorData.error}. Delete the existing graphic first if you want to replace it.`
|
749
819
|
});
|
750
820
|
} else if (!response.ok) {
|
751
821
|
throw new Error("Upload failed");
|
@@ -754,138 +824,68 @@ function SummaryView5({ state, sendCommand, urls }) {
|
|
754
824
|
setShowFileInput(false);
|
755
825
|
setUploadStatus({
|
756
826
|
success: true,
|
757
|
-
message: "
|
827
|
+
message: "Graphic uploaded successfully!"
|
758
828
|
});
|
759
|
-
await
|
829
|
+
await updateGraphics();
|
760
830
|
}
|
761
831
|
} catch (error) {
|
762
832
|
console.error("Failed to upload file:", error);
|
763
|
-
setUploadStatus({ success: false, message: "Failed to upload
|
833
|
+
setUploadStatus({ success: false, message: "Failed to upload graphic." });
|
764
834
|
}
|
765
835
|
setTimeout(() => setUploadStatus({ success: false, message: null }), 5e3);
|
766
836
|
};
|
767
837
|
const deleteBug = async () => {
|
768
|
-
if (!
|
838
|
+
if (!graphicToDelete)
|
769
839
|
return;
|
770
840
|
try {
|
771
|
-
const response = await fetch(`${urls.componentUrl}/
|
841
|
+
const response = await fetch(`${urls.componentUrl}/graphic`, {
|
772
842
|
method: "DELETE",
|
773
843
|
headers: {
|
774
844
|
"Content-Type": "application/json"
|
775
845
|
},
|
776
|
-
body: JSON.stringify({ filename:
|
846
|
+
body: JSON.stringify({ filename: graphicToDelete })
|
777
847
|
});
|
778
848
|
if (response.ok) {
|
779
849
|
setUploadStatus({
|
780
850
|
success: true,
|
781
|
-
message: "
|
851
|
+
message: "Graphic deleted successfully!"
|
782
852
|
});
|
783
|
-
await
|
784
|
-
if (
|
785
|
-
|
853
|
+
await updateGraphics();
|
854
|
+
if (graphic === graphicToDelete) {
|
855
|
+
setGraphic(void 0);
|
786
856
|
sendCommand({
|
787
|
-
type: "change-
|
857
|
+
type: "change-graphic",
|
788
858
|
file: void 0,
|
789
859
|
position: void 0
|
790
860
|
});
|
791
861
|
}
|
792
|
-
|
862
|
+
setGraphicToDelete("");
|
793
863
|
setShowDeleteDropdown(false);
|
794
864
|
} else {
|
795
865
|
const errorData = await response.json();
|
796
866
|
setUploadStatus({
|
797
867
|
success: false,
|
798
|
-
message: errorData.error || "Failed to delete
|
868
|
+
message: errorData.error || "Failed to delete graphic"
|
799
869
|
});
|
800
870
|
}
|
801
871
|
} catch (error) {
|
802
|
-
console.error("Failed to delete
|
803
|
-
setUploadStatus({ success: false, message: "Failed to delete
|
872
|
+
console.error("Failed to delete graphic:", error);
|
873
|
+
setUploadStatus({ success: false, message: "Failed to delete graphic" });
|
804
874
|
}
|
805
875
|
setTimeout(() => setUploadStatus({ success: false, message: null }), 3e3);
|
806
876
|
};
|
807
877
|
const buttonClass = "mt-2 mb-5 text-white w-full justify-center bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800";
|
808
878
|
const deleteButtonClass = "mt-2 text-white w-full justify-center bg-red-600 hover:bg-red-700 focus:ring-4 focus:outline-none focus:ring-red-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-red-700 dark:hover:bg-red-800 dark:focus:ring-red-900";
|
809
879
|
const fileInputClass = "block w-full text-gray-900 border border-gray-300 rounded-lg cursor-pointer bg-gray-50 dark:text-gray-400 focus:outline-none dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400";
|
810
|
-
return (0,
|
880
|
+
return (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-3", children: [(0, import_jsx_runtime18.jsx)("h2", { className: "text-xl font-bold text-gray-900 dark:text-white", children: "Controls" }), (0, import_jsx_runtime18.jsxs)("div", { children: [(0, import_jsx_runtime18.jsx)("label", { htmlFor: "select-graphic", className: "block text-gray-900 dark:text-white mb-1", children: "Source" }), (0, import_jsx_runtime18.jsxs)("select", { id: "select-graphic", className: "w-full node-editor-select-input", value: graphic || "", onChange: (e) => setGraphic(e.target.value || void 0), children: [(0, import_jsx_runtime18.jsx)("option", { value: "", children: "---" }), graphics.map((s) => (0, import_jsx_runtime18.jsx)("option", { value: s, children: s }, s))] })] }), graphic && (0, import_jsx_runtime18.jsxs)("div", { children: [(0, import_jsx_runtime18.jsx)("label", { htmlFor: "select-position", className: "block text-gray-900 dark:text-white mb-1", children: "Position" }), (0, import_jsx_runtime18.jsxs)("select", { id: "select-position", className: "w-full node-editor-select-input", value: position, onChange: (e) => setPosition(e.target.value), children: [(0, import_jsx_runtime18.jsx)("option", { value: "topleft", children: "Top Left" }), (0, import_jsx_runtime18.jsx)("option", { value: "topright", children: "Top Right" }), (0, import_jsx_runtime18.jsx)("option", { value: "bottomleft", children: "Bottom Left" }), (0, import_jsx_runtime18.jsx)("option", { value: "bottomright", children: "Bottom Right" })] })] }), (graphic !== state.activeGraphic?.file || position !== state.activeGraphic?.position) && (0, import_jsx_runtime18.jsx)("button", { type: "button", className: buttonClass, onClick: () => sendCommand({ type: "change-graphic", file: graphic, position }), children: "Commit" }), !showFileInput && !uploadStatus.success && (0, import_jsx_runtime18.jsx)("button", { type: "button", className: buttonClass, onClick: () => setShowFileInput(true), style: { marginBottom: "1rem" }, children: "Upload Graphic" }), showFileInput && (0, import_jsx_runtime18.jsxs)("form", { style: { display: "block", marginBottom: "1rem" }, children: [(0, import_jsx_runtime18.jsx)("input", { type: "file", id: "file", name: "filename", onChange: onFileChange, className: fileInputClass }), showUploadButton && (0, import_jsx_runtime18.jsx)("button", { type: "button", className: buttonClass, onClick: uploadFile, children: "Upload" })] }), (0, import_jsx_runtime18.jsx)("button", { type: "button", className: deleteButtonClass, onClick: () => setShowDeleteDropdown(!showDeleteDropdown), style: { marginBottom: "1rem" }, children: showDeleteDropdown ? "Hide Delete Options" : "Delete Graphics" }), showDeleteDropdown && (0, import_jsx_runtime18.jsxs)("div", { className: "mt-2 p-2 bg-gray-100 dark:bg-gray-800 rounded-lg", children: [(0, import_jsx_runtime18.jsx)("h3", { className: "text-lg font-semibold mb-2 text-gray-900 dark:text-white", children: "Select Graphic to Delete" }), (0, import_jsx_runtime18.jsxs)("select", { className: "w-full mb-2 node-editor-select-input", value: graphicToDelete, onChange: (e) => setGraphicToDelete(e.target.value), children: [(0, import_jsx_runtime18.jsx)("option", { value: "", children: " Select a graphic" }), graphics.map((graphicName) => (0, import_jsx_runtime18.jsx)("option", { value: graphicName, children: graphicName }, graphicName))] }), (0, import_jsx_runtime18.jsx)("button", { onClick: deleteBug, disabled: !graphicToDelete, className: `${deleteButtonClass} ${!graphicToDelete ? "opacity-50 cursor-not-allowed" : ""}`, children: "Delete Selected Graphic" })] }), uploadStatus.message && (0, import_jsx_runtime18.jsx)("div", { className: `mt-2 text-center ${uploadStatus.success ? "text-green-600" : "text-red-600"}`, children: uploadStatus.message })] });
|
811
881
|
}
|
812
|
-
var
|
882
|
+
var import_jsx_runtime18, import_react16, summary_view_default3;
|
813
883
|
var init_summary_view3 = __esm({
|
814
|
-
"build/processor.
|
815
|
-
"use strict";
|
816
|
-
import_jsx_runtime15 = __toESM(require_jsx_runtime());
|
817
|
-
import_react14 = __toESM(require_react());
|
818
|
-
summary_view_default3 = SummaryView5;
|
819
|
-
}
|
820
|
-
});
|
821
|
-
|
822
|
-
// build/processor.fixedLadder/rung-view.js
|
823
|
-
var rung_view_exports = {};
|
824
|
-
__export(rung_view_exports, {
|
825
|
-
default: () => rung_view_default
|
826
|
-
});
|
827
|
-
function rung_view_default(rung) {
|
828
|
-
return (0, import_jsx_runtime16.jsx)("div", { className: "", children: rung.name });
|
829
|
-
}
|
830
|
-
var import_jsx_runtime16;
|
831
|
-
var init_rung_view = __esm({
|
832
|
-
"build/processor.fixedLadder/rung-view.js"() {
|
833
|
-
"use strict";
|
834
|
-
import_jsx_runtime16 = __toESM(require_jsx_runtime());
|
835
|
-
}
|
836
|
-
});
|
837
|
-
|
838
|
-
// build/processor.fixedLadder/codec-editor.js
|
839
|
-
var codec_editor_exports = {};
|
840
|
-
__export(codec_editor_exports, {
|
841
|
-
default: () => CodecEditor
|
842
|
-
});
|
843
|
-
function CodecEditor(props) {
|
844
|
-
(0, import_react16.useEffect)(() => {
|
845
|
-
if (props.defaultValue)
|
846
|
-
props.onChanged(props.defaultValue);
|
847
|
-
}, [props.defaultValue]);
|
848
|
-
const textAreaRef = (0, import_react16.useRef)(null);
|
849
|
-
const [value, setValue] = (0, import_react16.useState)(props.defaultValue);
|
850
|
-
(0, import_react16.useEffect)(() => {
|
851
|
-
if (textAreaRef.current) {
|
852
|
-
const target = textAreaRef.current;
|
853
|
-
target.style.height = "";
|
854
|
-
target.style.height = target.scrollHeight + "px";
|
855
|
-
}
|
856
|
-
}, []);
|
857
|
-
return (0, import_jsx_runtime17.jsx)("textarea", { ref: textAreaRef, className: "w-full min-h-fit dark:text-white dark:bg-black", onChange: (e) => {
|
858
|
-
const target = e.currentTarget;
|
859
|
-
try {
|
860
|
-
const codec = JSON.parse(target.value);
|
861
|
-
setValue(codec);
|
862
|
-
props.onChanged(codec);
|
863
|
-
} catch (e2) {
|
864
|
-
}
|
865
|
-
}, defaultValue: JSON.stringify(value, void 0, 2) });
|
866
|
-
}
|
867
|
-
var import_jsx_runtime17, import_react16;
|
868
|
-
var init_codec_editor = __esm({
|
869
|
-
"build/processor.fixedLadder/codec-editor.js"() {
|
870
|
-
"use strict";
|
871
|
-
import_jsx_runtime17 = __toESM(require_jsx_runtime());
|
872
|
-
import_react16 = __toESM(require_react());
|
873
|
-
}
|
874
|
-
});
|
875
|
-
|
876
|
-
// build/processor.fixedLadder/codec-view.js
|
877
|
-
var codec_view_exports = {};
|
878
|
-
__export(codec_view_exports, {
|
879
|
-
default: () => CodecEditor2
|
880
|
-
});
|
881
|
-
function CodecEditor2(props) {
|
882
|
-
return (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [props.width, "x", props.height] });
|
883
|
-
}
|
884
|
-
var import_jsx_runtime18;
|
885
|
-
var init_codec_view = __esm({
|
886
|
-
"build/processor.fixedLadder/codec-view.js"() {
|
884
|
+
"build/processor.onscreenGraphic/summary-view.js"() {
|
887
885
|
"use strict";
|
888
886
|
import_jsx_runtime18 = __toESM(require_jsx_runtime());
|
887
|
+
import_react16 = __toESM(require_react());
|
888
|
+
summary_view_default3 = SummaryView5;
|
889
889
|
}
|
890
890
|
});
|
891
891
|
|
@@ -4402,7 +4402,7 @@ function getAxisItems(chart, position, axis, intersect, useFinalPosition) {
|
|
4402
4402
|
const rangeMethod = axis === "x" ? "inXRange" : "inYRange";
|
4403
4403
|
let intersectsItem = false;
|
4404
4404
|
evaluateInteractionItems(chart, axis, position, (element, datasetIndex, index2) => {
|
4405
|
-
if (element[rangeMethod](position[axis], useFinalPosition)) {
|
4405
|
+
if (element[rangeMethod] && element[rangeMethod](position[axis], useFinalPosition)) {
|
4406
4406
|
items.push({
|
4407
4407
|
element,
|
4408
4408
|
datasetIndex,
|
@@ -8311,8 +8311,10 @@ var init_chart = __esm({
|
|
8311
8311
|
const metasets = iScale.getMatchingVisibleMetas(this._type).filter((meta) => meta.controller.options.grouped);
|
8312
8312
|
const stacked = iScale.options.stacked;
|
8313
8313
|
const stacks = [];
|
8314
|
+
const currentParsed = this._cachedMeta.controller.getParsed(dataIndex);
|
8315
|
+
const iScaleValue = currentParsed && currentParsed[iScale.axis];
|
8314
8316
|
const skipNull = (meta) => {
|
8315
|
-
const parsed = meta.
|
8317
|
+
const parsed = meta._parsed.find((item) => item[iScale.axis] === iScaleValue);
|
8316
8318
|
const val = parsed && parsed[meta.vScale.axis];
|
8317
8319
|
if (isNullOrUndef(val) || isNaN(val)) {
|
8318
8320
|
return true;
|
@@ -11244,7 +11246,7 @@ var init_chart = __esm({
|
|
11244
11246
|
}
|
11245
11247
|
};
|
11246
11248
|
hasFunction = (value) => isObject(value) && Object.getOwnPropertyNames(value).some((key) => isFunction(value[key]));
|
11247
|
-
version = "4.4.
|
11249
|
+
version = "4.4.4";
|
11248
11250
|
KNOWN_POSITIONS = [
|
11249
11251
|
"top",
|
11250
11252
|
"bottom",
|
@@ -11704,8 +11706,8 @@ var init_chart = __esm({
|
|
11704
11706
|
let i;
|
11705
11707
|
if (this._resizeBeforeDraw) {
|
11706
11708
|
const { width, height } = this._resizeBeforeDraw;
|
11707
|
-
this._resize(width, height);
|
11708
11709
|
this._resizeBeforeDraw = null;
|
11710
|
+
this._resize(width, height);
|
11709
11711
|
}
|
11710
11712
|
this.clear();
|
11711
11713
|
if (this.width <= 0 || this.height <= 0) {
|
@@ -12145,7 +12147,8 @@ var init_chart = __esm({
|
|
12145
12147
|
], useFinalPosition);
|
12146
12148
|
const rAdjust = (this.options.spacing + this.options.borderWidth) / 2;
|
12147
12149
|
const _circumference = valueOrDefault(circumference, endAngle - startAngle);
|
12148
|
-
const
|
12150
|
+
const nonZeroBetween = _angleBetween(angle, startAngle, endAngle) && startAngle !== endAngle;
|
12151
|
+
const betweenAngles = _circumference >= TAU || nonZeroBetween;
|
12149
12152
|
const withinRadius = _isBetween(distance, innerRadius + rAdjust, outerRadius + rAdjust);
|
12150
12153
|
return betweenAngles && withinRadius;
|
12151
12154
|
}
|
@@ -13379,6 +13382,9 @@ var init_chart = __esm({
|
|
13379
13382
|
++count;
|
13380
13383
|
}
|
13381
13384
|
}
|
13385
|
+
if (count === 0 || xSet.size === 0) {
|
13386
|
+
return false;
|
13387
|
+
}
|
13382
13388
|
const xAverage = [
|
13383
13389
|
...xSet
|
13384
13390
|
].reduce((a, b) => a + b) / xSet.size;
|
@@ -14705,7 +14711,7 @@ var init_chart = __esm({
|
|
14705
14711
|
ctx.strokeStyle = color2;
|
14706
14712
|
ctx.setLineDash(optsAtIndex.borderDash);
|
14707
14713
|
ctx.lineDashOffset = optsAtIndex.borderDashOffset;
|
14708
|
-
offset = this.getDistanceFromCenterForValue(opts.
|
14714
|
+
offset = this.getDistanceFromCenterForValue(opts.reverse ? this.min : this.max);
|
14709
14715
|
position = this.getPointPosition(i, offset);
|
14710
14716
|
ctx.beginPath();
|
14711
14717
|
ctx.moveTo(this.xCenter, this.yCenter);
|
@@ -16528,90 +16534,13 @@ function assertUnreachable7(_) {
|
|
16528
16534
|
throw new Error("Didn't expect to get here");
|
16529
16535
|
}
|
16530
16536
|
|
16531
|
-
// build/processor.
|
16537
|
+
// build/processor.fixedLadder/info.js
|
16538
|
+
var import_react14 = __toESM(require_react());
|
16532
16539
|
var import_config4 = __toESM(require_config());
|
16533
|
-
var import_react15 = __toESM(require_react());
|
16534
16540
|
function info_default16({ defineComponent, Video }) {
|
16535
|
-
const
|
16536
|
-
const
|
16537
|
-
|
16538
|
-
identifier: "processor.dynamicBug",
|
16539
|
-
category: "processor",
|
16540
|
-
name: "Dynamic Bug",
|
16541
|
-
description: "",
|
16542
|
-
subscription: {
|
16543
|
-
// Only accept a single video stream
|
16544
|
-
accepts: {
|
16545
|
-
type: "single-stream",
|
16546
|
-
media: Video
|
16547
|
-
},
|
16548
|
-
produces: {
|
16549
|
-
type: "single-stream",
|
16550
|
-
media: Video
|
16551
|
-
}
|
16552
|
-
},
|
16553
|
-
extraValidation: function(ctx) {
|
16554
|
-
ctx.requireVideo(1);
|
16555
|
-
},
|
16556
|
-
display: (desc) => {
|
16557
|
-
return {
|
16558
|
-
default: desc.config.initialBug ?? "none"
|
16559
|
-
};
|
16560
|
-
},
|
16561
|
-
runtime: {
|
16562
|
-
summary: SummaryView6,
|
16563
|
-
initialState: () => ({}),
|
16564
|
-
handleEvent: (ev, state) => {
|
16565
|
-
const evType = ev.type;
|
16566
|
-
switch (evType) {
|
16567
|
-
case "bug-changed":
|
16568
|
-
return { ...state, activeBug: { file: ev.file, position: ev.position } };
|
16569
|
-
default:
|
16570
|
-
assertUnreachable8(evType);
|
16571
|
-
}
|
16572
|
-
}
|
16573
|
-
},
|
16574
|
-
configForm: {
|
16575
|
-
global: {
|
16576
|
-
hardware: (0, import_config4.HardwareSelection)()
|
16577
|
-
},
|
16578
|
-
form: {
|
16579
|
-
initialBug: {
|
16580
|
-
help: "The initial bug to render on the video (if any)",
|
16581
|
-
hint: {
|
16582
|
-
type: "custom",
|
16583
|
-
optional: true,
|
16584
|
-
component: BugSelection2
|
16585
|
-
}
|
16586
|
-
},
|
16587
|
-
initialPosition: {
|
16588
|
-
help: "The initial location at which to render the bug",
|
16589
|
-
hint: {
|
16590
|
-
type: "select",
|
16591
|
-
optional: true,
|
16592
|
-
options: [
|
16593
|
-
{ value: "topleft", display: "Top Left" },
|
16594
|
-
{ value: "topright", display: "Top Right" },
|
16595
|
-
{ value: "bottomleft", display: "Bottom Left" },
|
16596
|
-
{ value: "bottomright", display: "Bottom Right" }
|
16597
|
-
]
|
16598
|
-
}
|
16599
|
-
}
|
16600
|
-
}
|
16601
|
-
}
|
16602
|
-
});
|
16603
|
-
}
|
16604
|
-
function assertUnreachable8(_) {
|
16605
|
-
throw new Error("Didn't expect to get here");
|
16606
|
-
}
|
16607
|
-
|
16608
|
-
// build/processor.fixedLadder/info.js
|
16609
|
-
var import_react17 = __toESM(require_react());
|
16610
|
-
var import_config5 = __toESM(require_config());
|
16611
|
-
function info_default17({ defineComponent, Video }) {
|
16612
|
-
const RungView = import_react17.default.lazy(async () => Promise.resolve().then(() => (init_rung_view(), rung_view_exports)));
|
16613
|
-
const CodecEditor3 = import_react17.default.lazy(async () => Promise.resolve().then(() => (init_codec_editor(), codec_editor_exports)));
|
16614
|
-
const CodecView = import_react17.default.lazy(async () => Promise.resolve().then(() => (init_codec_view(), codec_view_exports)));
|
16541
|
+
const RungView = import_react14.default.lazy(async () => Promise.resolve().then(() => (init_rung_view(), rung_view_exports)));
|
16542
|
+
const CodecEditor3 = import_react14.default.lazy(async () => Promise.resolve().then(() => (init_codec_editor(), codec_editor_exports)));
|
16543
|
+
const CodecView = import_react14.default.lazy(async () => Promise.resolve().then(() => (init_codec_view(), codec_view_exports)));
|
16615
16544
|
return defineComponent({
|
16616
16545
|
identifier: "processor.fixedLadder",
|
16617
16546
|
category: "processor",
|
@@ -16651,7 +16580,7 @@ function info_default17({ defineComponent, Video }) {
|
|
16651
16580
|
},
|
16652
16581
|
configForm: {
|
16653
16582
|
global: {
|
16654
|
-
hardware: (0,
|
16583
|
+
hardware: (0, import_config4.HardwareSelection)()
|
16655
16584
|
},
|
16656
16585
|
form: {
|
16657
16586
|
rungs: {
|
@@ -16773,7 +16702,7 @@ function createSoftwareRung(rung) {
|
|
16773
16702
|
case "h264_320x180":
|
16774
16703
|
return createRungImpl({ name: rung, threads: 1, bitrate: 800 });
|
16775
16704
|
default:
|
16776
|
-
return
|
16705
|
+
return assertUnreachable8(rung);
|
16777
16706
|
}
|
16778
16707
|
}
|
16779
16708
|
function createMa35dRung(rung) {
|
@@ -16787,7 +16716,7 @@ function createMa35dRung(rung) {
|
|
16787
16716
|
case "h264_320x180":
|
16788
16717
|
return createMa35DH264RungImpl({ name: rung, bitrate: 1e3 });
|
16789
16718
|
default:
|
16790
|
-
return
|
16719
|
+
return assertUnreachable8(rung);
|
16791
16720
|
}
|
16792
16721
|
}
|
16793
16722
|
function createNvidiaRung(rung) {
|
@@ -16801,7 +16730,7 @@ function createNvidiaRung(rung) {
|
|
16801
16730
|
case "h264_320x180":
|
16802
16731
|
return createNvidiaRungImpl({ name: rung, bitrate: 8e5 });
|
16803
16732
|
default:
|
16804
|
-
return
|
16733
|
+
return assertUnreachable8(rung);
|
16805
16734
|
}
|
16806
16735
|
}
|
16807
16736
|
function createQuadraRung(rung) {
|
@@ -16815,7 +16744,7 @@ function createQuadraRung(rung) {
|
|
16815
16744
|
case "h264_320x180":
|
16816
16745
|
return createQuadraRungImpl({ name: rung, bitrate: 8e5 });
|
16817
16746
|
default:
|
16818
|
-
return
|
16747
|
+
return assertUnreachable8(rung);
|
16819
16748
|
}
|
16820
16749
|
}
|
16821
16750
|
function createLoganRung(rung) {
|
@@ -16829,7 +16758,7 @@ function createLoganRung(rung) {
|
|
16829
16758
|
case "h264_320x180":
|
16830
16759
|
return createLoganRungImpl({ name: rung, bitrate: 8e5 });
|
16831
16760
|
default:
|
16832
|
-
return
|
16761
|
+
return assertUnreachable8(rung);
|
16833
16762
|
}
|
16834
16763
|
}
|
16835
16764
|
function createRungImpl({ name, threads, bitrate }) {
|
@@ -16927,6 +16856,83 @@ function rungWidth(rungName) {
|
|
16927
16856
|
function rungHeight(rungName) {
|
16928
16857
|
return parseInt(rungName.split("_")[1].split(`x`)[1]);
|
16929
16858
|
}
|
16859
|
+
function assertUnreachable8(_) {
|
16860
|
+
throw new Error("Didn't expect to get here");
|
16861
|
+
}
|
16862
|
+
|
16863
|
+
// build/processor.onscreenGraphic/info.js
|
16864
|
+
var import_config5 = __toESM(require_config());
|
16865
|
+
var import_react17 = __toESM(require_react());
|
16866
|
+
function info_default17({ defineComponent, Video }) {
|
16867
|
+
const GraphicSelection2 = import_react17.default.lazy(async () => Promise.resolve().then(() => (init_image_selection(), image_selection_exports)));
|
16868
|
+
const SummaryView6 = import_react17.default.lazy(async () => Promise.resolve().then(() => (init_summary_view3(), summary_view_exports3)));
|
16869
|
+
return defineComponent({
|
16870
|
+
identifier: "processor.onscreenGraphic",
|
16871
|
+
category: "processor",
|
16872
|
+
name: "Onscreen Graphic",
|
16873
|
+
description: "",
|
16874
|
+
subscription: {
|
16875
|
+
// Only accept a single video stream
|
16876
|
+
accepts: {
|
16877
|
+
type: "single-stream",
|
16878
|
+
media: Video
|
16879
|
+
},
|
16880
|
+
produces: {
|
16881
|
+
type: "single-stream",
|
16882
|
+
media: Video
|
16883
|
+
}
|
16884
|
+
},
|
16885
|
+
extraValidation: function(ctx) {
|
16886
|
+
ctx.requireVideo(1);
|
16887
|
+
},
|
16888
|
+
display: (desc) => {
|
16889
|
+
return {
|
16890
|
+
default: desc.config.initialGraphic ?? "none"
|
16891
|
+
};
|
16892
|
+
},
|
16893
|
+
runtime: {
|
16894
|
+
summary: SummaryView6,
|
16895
|
+
initialState: () => ({}),
|
16896
|
+
handleEvent: (ev, state) => {
|
16897
|
+
const evType = ev.type;
|
16898
|
+
switch (evType) {
|
16899
|
+
case "graphic-changed":
|
16900
|
+
return { ...state, activeGraphic: { file: ev.file, position: ev.position } };
|
16901
|
+
default:
|
16902
|
+
assertUnreachable9(evType);
|
16903
|
+
}
|
16904
|
+
}
|
16905
|
+
},
|
16906
|
+
configForm: {
|
16907
|
+
global: {
|
16908
|
+
hardware: (0, import_config5.HardwareSelection)()
|
16909
|
+
},
|
16910
|
+
form: {
|
16911
|
+
initialGraphic: {
|
16912
|
+
help: "The initial graphic to render on the video (if any)",
|
16913
|
+
hint: {
|
16914
|
+
type: "custom",
|
16915
|
+
optional: true,
|
16916
|
+
component: GraphicSelection2
|
16917
|
+
}
|
16918
|
+
},
|
16919
|
+
initialPosition: {
|
16920
|
+
help: "The initial location at which to render the graphic",
|
16921
|
+
hint: {
|
16922
|
+
type: "select",
|
16923
|
+
optional: true,
|
16924
|
+
options: [
|
16925
|
+
{ value: "topleft", display: "Top Left" },
|
16926
|
+
{ value: "topright", display: "Top Right" },
|
16927
|
+
{ value: "bottomleft", display: "Bottom Left" },
|
16928
|
+
{ value: "bottomright", display: "Bottom Right" }
|
16929
|
+
]
|
16930
|
+
}
|
16931
|
+
}
|
16932
|
+
}
|
16933
|
+
}
|
16934
|
+
});
|
16935
|
+
}
|
16930
16936
|
function assertUnreachable9(_) {
|
16931
16937
|
throw new Error("Didn't expect to get here");
|
16932
16938
|
}
|
@@ -17219,7 +17225,7 @@ export {
|
|
17219
17225
|
|
17220
17226
|
chart.js/dist/chunks/helpers.segment.js:
|
17221
17227
|
(*!
|
17222
|
-
* Chart.js v4.4.
|
17228
|
+
* Chart.js v4.4.4
|
17223
17229
|
* https://www.chartjs.org
|
17224
17230
|
* (c) 2024 Chart.js Contributors
|
17225
17231
|
* Released under the MIT License
|
@@ -17227,7 +17233,7 @@ chart.js/dist/chunks/helpers.segment.js:
|
|
17227
17233
|
|
17228
17234
|
chart.js/dist/chart.js:
|
17229
17235
|
(*!
|
17230
|
-
* Chart.js v4.4.
|
17236
|
+
* Chart.js v4.4.4
|
17231
17237
|
* https://www.chartjs.org
|
17232
17238
|
* (c) 2024 Chart.js Contributors
|
17233
17239
|
* Released under the MIT License
|