@norskvideo/norsk-studio-alpha 1.27.0-2025-09-07-cf101e3f → 1.27.0-2025-09-08-fdd138b9
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 +1986 -30148
- package/client/style.css +0 -92
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/info.js +6 -18
- package/lib/info.js.map +1 -1
- package/package.json +4 -4
- package/lib/input.decklink/info.d.ts +0 -3
- package/lib/input.decklink/info.js +0 -51
- package/lib/input.decklink/info.js.map +0 -1
- package/lib/input.decklink/runtime.d.ts +0 -12
- package/lib/input.decklink/runtime.js +0 -22
- package/lib/input.decklink/runtime.js.map +0 -1
- package/lib/input.decklink/types.d.ts +0 -23
- package/lib/input.decklink/types.js +0 -3
- package/lib/input.decklink/types.js.map +0 -1
- package/lib/input.decklink/types.yaml +0 -32
- package/lib/input.ndi/info.d.ts +0 -3
- package/lib/input.ndi/info.js +0 -52
- package/lib/input.ndi/info.js.map +0 -1
- package/lib/input.ndi/runtime.d.ts +0 -24
- package/lib/input.ndi/runtime.js +0 -60
- package/lib/input.ndi/runtime.js.map +0 -1
- package/lib/input.ndi/source-selection.d.ts +0 -10
- package/lib/input.ndi/source-selection.js +0 -84
- package/lib/input.ndi/source-selection.js.map +0 -1
- package/lib/input.ndi/types.d.ts +0 -52
- package/lib/input.ndi/types.js +0 -3
- package/lib/input.ndi/types.js.map +0 -1
- package/lib/input.ndi/types.yaml +0 -37
- package/lib/output.ndi/info.d.ts +0 -16
- package/lib/output.ndi/info.js +0 -63
- package/lib/output.ndi/info.js.map +0 -1
- package/lib/output.ndi/inline-view.d.ts +0 -6
- package/lib/output.ndi/inline-view.js +0 -12
- package/lib/output.ndi/inline-view.js.map +0 -1
- package/lib/output.ndi/runtime.d.ts +0 -14
- package/lib/output.ndi/runtime.js +0 -35
- package/lib/output.ndi/runtime.js.map +0 -1
- package/lib/output.ndi/types.d.ts +0 -56
- package/lib/output.ndi/types.js +0 -3
- package/lib/output.ndi/types.js.map +0 -1
- package/lib/output.ndi/types.source.yaml +0 -72
- package/lib/output.ndi/types.yaml +0 -77
- package/lib/processor.gemini-poc/info.d.ts +0 -8
- package/lib/processor.gemini-poc/info.js +0 -59
- package/lib/processor.gemini-poc/info.js.map +0 -1
- package/lib/processor.gemini-poc/runtime.d.ts +0 -38
- package/lib/processor.gemini-poc/runtime.js +0 -132
- package/lib/processor.gemini-poc/runtime.js.map +0 -1
- package/lib/processor.gemini-poc/types.d.ts +0 -23
- package/lib/processor.gemini-poc/types.js +0 -3
- package/lib/processor.gemini-poc/types.js.map +0 -1
- package/lib/processor.gemini-poc/types.yaml +0 -43
- package/lib/processor.mixMinus/info.d.ts +0 -7
- package/lib/processor.mixMinus/info.js +0 -40
- package/lib/processor.mixMinus/info.js.map +0 -1
- package/lib/processor.mixMinus/runtime.d.ts +0 -23
- package/lib/processor.mixMinus/runtime.js +0 -85
- package/lib/processor.mixMinus/runtime.js.map +0 -1
- package/lib/processor.mixMinus/types.d.ts +0 -18
- package/lib/processor.mixMinus/types.js +0 -3
- package/lib/processor.mixMinus/types.js.map +0 -1
- package/lib/processor.mixMinus/types.yaml +0 -19
- package/lib/processor.monetise/info.d.ts +0 -3
- package/lib/processor.monetise/info.js +0 -72
- package/lib/processor.monetise/info.js.map +0 -1
- package/lib/processor.monetise/runtime.d.ts +0 -62
- package/lib/processor.monetise/runtime.js +0 -219
- package/lib/processor.monetise/runtime.js.map +0 -1
- package/lib/processor.monetise/summary.d.ts +0 -7
- package/lib/processor.monetise/summary.js +0 -40
- package/lib/processor.monetise/summary.js.map +0 -1
- package/lib/processor.monetise/types.d.ts +0 -16
- package/lib/processor.monetise/types.js +0 -3
- package/lib/processor.monetise/types.js.map +0 -1
- package/lib/processor.monetise/types.yaml +0 -9
package/client/style.css
CHANGED
|
@@ -554,50 +554,6 @@ video {
|
|
|
554
554
|
--tw-contain-style: ;
|
|
555
555
|
}
|
|
556
556
|
|
|
557
|
-
.container {
|
|
558
|
-
width: 100%;
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
@media (min-width: 300px) {
|
|
562
|
-
.container {
|
|
563
|
-
max-width: 300px;
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
@media (min-width: 640px) {
|
|
568
|
-
.container {
|
|
569
|
-
max-width: 640px;
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
@media (min-width: 768px) {
|
|
574
|
-
.container {
|
|
575
|
-
max-width: 768px;
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
@media (min-width: 1024px) {
|
|
580
|
-
.container {
|
|
581
|
-
max-width: 1024px;
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
@media (min-width: 1280px) {
|
|
586
|
-
.container {
|
|
587
|
-
max-width: 1280px;
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
@media (min-width: 1536px) {
|
|
592
|
-
.container {
|
|
593
|
-
max-width: 1536px;
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
.static {
|
|
598
|
-
position: static;
|
|
599
|
-
}
|
|
600
|
-
|
|
601
557
|
.fixed {
|
|
602
558
|
position: fixed;
|
|
603
559
|
}
|
|
@@ -737,15 +693,6 @@ video {
|
|
|
737
693
|
border-radius: 0.5rem;
|
|
738
694
|
}
|
|
739
695
|
|
|
740
|
-
.border {
|
|
741
|
-
border-width: 1px;
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
.border-gray-300 {
|
|
745
|
-
--tw-border-opacity: 1;
|
|
746
|
-
border-color: rgb(209 213 219 / var(--tw-border-opacity));
|
|
747
|
-
}
|
|
748
|
-
|
|
749
696
|
.bg-gray-200 {
|
|
750
697
|
--tw-bg-opacity: 1;
|
|
751
698
|
background-color: rgb(229 231 235 / var(--tw-bg-opacity));
|
|
@@ -761,10 +708,6 @@ video {
|
|
|
761
708
|
background-color: rgb(29 78 216 / var(--tw-bg-opacity));
|
|
762
709
|
}
|
|
763
710
|
|
|
764
|
-
.p-1 {
|
|
765
|
-
padding: 0.25rem;
|
|
766
|
-
}
|
|
767
|
-
|
|
768
711
|
.px-5 {
|
|
769
712
|
padding-left: 1.25rem;
|
|
770
713
|
padding-right: 1.25rem;
|
|
@@ -1001,11 +944,6 @@ video {
|
|
|
1001
944
|
background-color: rgb(30 64 175 / var(--tw-bg-opacity));
|
|
1002
945
|
}
|
|
1003
946
|
|
|
1004
|
-
.focus\:border-blue-500:focus {
|
|
1005
|
-
--tw-border-opacity: 1;
|
|
1006
|
-
border-color: rgb(59 130 246 / var(--tw-border-opacity));
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
947
|
.focus\:outline-none:focus {
|
|
1010
948
|
outline: 2px solid transparent;
|
|
1011
949
|
outline-offset: 2px;
|
|
@@ -1017,21 +955,11 @@ video {
|
|
|
1017
955
|
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
1018
956
|
}
|
|
1019
957
|
|
|
1020
|
-
.focus\:ring-blue-500:focus {
|
|
1021
|
-
--tw-ring-opacity: 1;
|
|
1022
|
-
--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity));
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
958
|
.focus\:ring-primary-300:focus {
|
|
1026
959
|
--tw-ring-opacity: 1;
|
|
1027
960
|
--tw-ring-color: rgb(147 197 253 / var(--tw-ring-opacity));
|
|
1028
961
|
}
|
|
1029
962
|
|
|
1030
|
-
.dark\:border-gray-600:is(.dark *) {
|
|
1031
|
-
--tw-border-opacity: 1;
|
|
1032
|
-
border-color: rgb(75 85 99 / var(--tw-border-opacity));
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
963
|
.dark\:bg-gray-700:is(.dark *) {
|
|
1036
964
|
--tw-bg-opacity: 1;
|
|
1037
965
|
background-color: rgb(55 65 81 / var(--tw-bg-opacity));
|
|
@@ -1047,31 +975,11 @@ video {
|
|
|
1047
975
|
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
1048
976
|
}
|
|
1049
977
|
|
|
1050
|
-
.dark\:placeholder-gray-400:is(.dark *)::-moz-placeholder {
|
|
1051
|
-
--tw-placeholder-opacity: 1;
|
|
1052
|
-
color: rgb(156 163 175 / var(--tw-placeholder-opacity));
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
.dark\:placeholder-gray-400:is(.dark *)::placeholder {
|
|
1056
|
-
--tw-placeholder-opacity: 1;
|
|
1057
|
-
color: rgb(156 163 175 / var(--tw-placeholder-opacity));
|
|
1058
|
-
}
|
|
1059
|
-
|
|
1060
978
|
.dark\:hover\:bg-primary-700:hover:is(.dark *) {
|
|
1061
979
|
--tw-bg-opacity: 1;
|
|
1062
980
|
background-color: rgb(29 78 216 / var(--tw-bg-opacity));
|
|
1063
981
|
}
|
|
1064
982
|
|
|
1065
|
-
.dark\:focus\:border-blue-500:focus:is(.dark *) {
|
|
1066
|
-
--tw-border-opacity: 1;
|
|
1067
|
-
border-color: rgb(59 130 246 / var(--tw-border-opacity));
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
.dark\:focus\:ring-blue-500:focus:is(.dark *) {
|
|
1071
|
-
--tw-ring-opacity: 1;
|
|
1072
|
-
--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity));
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
983
|
.dark\:focus\:ring-primary-800:focus:is(.dark *) {
|
|
1076
984
|
--tw-ring-opacity: 1;
|
|
1077
985
|
--tw-ring-color: rgb(30 64 175 / var(--tw-ring-opacity));
|
package/lib/index.js
CHANGED
|
@@ -8,7 +8,7 @@ const registration_1 = require("@norskvideo/norsk-studio/lib/extension/registrat
|
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
async function registerAll(r) {
|
|
10
10
|
r.registerGlobalStylesheet(path_1.default.join(__dirname, "../client/style.css"));
|
|
11
|
-
return (0, registration_1.autoRegisterComponents)(__dirname, path_1.default.join(__dirname, "../client/info.js"), (p) => p.replace('lib', 'client'))(r);
|
|
11
|
+
return (0, registration_1.autoRegisterComponents)(__dirname, path_1.default.join(__dirname, "../client/info.js"), (p) => p.replace('lib', 'client'), 'alpha')(r);
|
|
12
12
|
}
|
|
13
13
|
exports.default = registerAll;
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAIA,kCAKC;AATD,sFAA4F;AAE5F,gDAAwB;AAEjB,KAAK,UAAU,WAAW,CAAC,CAAgB;IAChD,CAAC,CAAC,wBAAwB,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC,CAAC;IACxE,OAAO,IAAA,qCAAsB,EAAC,SAAS,EACrC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,mBAAmB,CAAC,EACzC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAIA,kCAKC;AATD,sFAA4F;AAE5F,gDAAwB;AAEjB,KAAK,UAAU,WAAW,CAAC,CAAgB;IAChD,CAAC,CAAC,wBAAwB,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC,CAAC;IACxE,OAAO,IAAA,qCAAsB,EAAC,SAAS,EACrC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,mBAAmB,CAAC,EACzC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,kBAAe,WAAW,CAAC"}
|
package/lib/info.js
CHANGED
|
@@ -17,28 +17,16 @@ function getNodeInfo(r, type) {
|
|
|
17
17
|
}
|
|
18
18
|
return InitialisedComponents[type];
|
|
19
19
|
}
|
|
20
|
-
const info_1 = __importDefault(require("./
|
|
20
|
+
const info_1 = __importDefault(require("./output.recorder/info"));
|
|
21
21
|
AllComponents.push((r) => (0, info_1.default)(r));
|
|
22
|
-
const info_2 = __importDefault(require("./
|
|
22
|
+
const info_2 = __importDefault(require("./processor.actionReplay/info"));
|
|
23
23
|
AllComponents.push((r) => (0, info_2.default)(r));
|
|
24
|
-
const info_3 = __importDefault(require("./
|
|
24
|
+
const info_3 = __importDefault(require("./processor.audioLevel/info"));
|
|
25
25
|
AllComponents.push((r) => (0, info_3.default)(r));
|
|
26
|
-
const info_4 = __importDefault(require("./
|
|
26
|
+
const info_4 = __importDefault(require("./processor.delayAll/info"));
|
|
27
27
|
AllComponents.push((r) => (0, info_4.default)(r));
|
|
28
|
-
const info_5 = __importDefault(require("./processor.
|
|
28
|
+
const info_5 = __importDefault(require("./processor.whisper-transcribe/info"));
|
|
29
29
|
AllComponents.push((r) => (0, info_5.default)(r));
|
|
30
|
-
const info_6 = __importDefault(require("./
|
|
30
|
+
const info_6 = __importDefault(require("./util.timestamps/info"));
|
|
31
31
|
AllComponents.push((r) => (0, info_6.default)(r));
|
|
32
|
-
const info_7 = __importDefault(require("./processor.delayAll/info"));
|
|
33
|
-
AllComponents.push((r) => (0, info_7.default)(r));
|
|
34
|
-
const info_8 = __importDefault(require("./processor.gemini-poc/info"));
|
|
35
|
-
AllComponents.push((r) => (0, info_8.default)(r));
|
|
36
|
-
const info_9 = __importDefault(require("./processor.mixMinus/info"));
|
|
37
|
-
AllComponents.push((r) => (0, info_9.default)(r));
|
|
38
|
-
const info_10 = __importDefault(require("./processor.monetise/info"));
|
|
39
|
-
AllComponents.push((r) => (0, info_10.default)(r));
|
|
40
|
-
const info_11 = __importDefault(require("./processor.whisper-transcribe/info"));
|
|
41
|
-
AllComponents.push((r) => (0, info_11.default)(r));
|
|
42
|
-
const info_12 = __importDefault(require("./util.timestamps/info"));
|
|
43
|
-
AllComponents.push((r) => (0, info_12.default)(r));
|
|
44
32
|
//# sourceMappingURL=info.js.map
|
package/lib/info.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info.js","sourceRoot":"","sources":["../src/info.ts"],"names":[],"mappings":";;;;;AAYA,8BASC;AAdD,MAAM,qBAAqB,GAA4C,EAAE,CAAC;AAC1E,IAAI,WAAW,GAAG,KAAK,CAAC;AAExB,MAAM,aAAa,GAAkD,EAAE,CAAC;AAExE,SAAwB,WAAW,CAAC,CAAe,EAAE,IAAY;IAC/D,IAAG,CAAC,WAAW,EAAE,CAAC;QAChB,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YAC1B,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YACf,qBAAqB,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAC1C,CAAC,CAAC,CAAA;QACF,WAAW,GAAG,IAAI,CAAC;IACrB,CAAC;IACD,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC;AAED,
|
|
1
|
+
{"version":3,"file":"info.js","sourceRoot":"","sources":["../src/info.ts"],"names":[],"mappings":";;;;;AAYA,8BASC;AAdD,MAAM,qBAAqB,GAA4C,EAAE,CAAC;AAC1E,IAAI,WAAW,GAAG,KAAK,CAAC;AAExB,MAAM,aAAa,GAAkD,EAAE,CAAC;AAExE,SAAwB,WAAW,CAAC,CAAe,EAAE,IAAY;IAC/D,IAAG,CAAC,WAAW,EAAE,CAAC;QAChB,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YAC1B,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YACf,qBAAqB,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAC1C,CAAC,CAAC,CAAA;QACF,WAAW,GAAG,IAAI,CAAC;IACrB,CAAC;IACD,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC;AAED,kEAAqD;AACrD,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,cAAe,EAAC,CAAC,CAAoC,CAAC,CAAC;AAC/F,yEAAmE;AACnE,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,cAAsB,EAAC,CAAC,CAAoC,CAAC,CAAC;AACtG,uEAA+D;AAC/D,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,cAAoB,EAAC,CAAC,CAAoC,CAAC,CAAC;AACpG,qEAA2D;AAC3D,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,cAAkB,EAAC,CAAC,CAAoC,CAAC,CAAC;AAClG,+EAA+E;AAC/E,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,cAA4B,EAAC,CAAC,CAAoC,CAAC,CAAC;AAC5G,kEAAqD;AACrD,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,cAAe,EAAC,CAAC,CAAoC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@norskvideo/norsk-studio-alpha",
|
|
3
|
-
"version": "1.27.0-2025-09-
|
|
3
|
+
"version": "1.27.0-2025-09-08-fdd138b9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rm -rf lib client build && make clean",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@apidevtools/json-schema-ref-parser": "^12.0.1",
|
|
26
|
-
"@norskvideo/norsk-sdk": "^1.0.402-2025-09-
|
|
27
|
-
"@norskvideo/norsk-studio": "1.27.0-2025-09-
|
|
28
|
-
"@norskvideo/norsk-studio-built-ins": "1.27.0-2025-09-
|
|
26
|
+
"@norskvideo/norsk-sdk": "^1.0.402-2025-09-08-0b83f9cf",
|
|
27
|
+
"@norskvideo/norsk-studio": "1.27.0-2025-09-08-fdd138b9",
|
|
28
|
+
"@norskvideo/norsk-studio-built-ins": "1.27.0-2025-09-08-fdd138b9",
|
|
29
29
|
"@norskvideo/webrtc-client": "^0.1.2",
|
|
30
30
|
"@react-icons/all-files": "^4.1.0",
|
|
31
31
|
"chart.js": "^4.4.2",
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type Registration from "@norskvideo/norsk-studio/lib/extension/registration";
|
|
2
|
-
import type { DeckLinkInputSettings } from "./runtime";
|
|
3
|
-
export default function ({ defineComponent, singleAvStreamMapping, singleAvStreamMappingForm, mappingsToStreams, }: Registration): import("@norskvideo/norsk-studio/lib/extension/client-types").NodeInfo<DeckLinkInputSettings, object, object, object>;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = default_1;
|
|
4
|
-
function default_1({ defineComponent, singleAvStreamMapping, singleAvStreamMappingForm, mappingsToStreams, }) {
|
|
5
|
-
return defineComponent({
|
|
6
|
-
identifier: 'input.decklink',
|
|
7
|
-
category: 'input',
|
|
8
|
-
name: "DeckLink ingest",
|
|
9
|
-
description: "This component receives video and audio streams from SDI or HDMI sources using Blackmagic DeckLink cards.",
|
|
10
|
-
subscription: {
|
|
11
|
-
accepts: undefined,
|
|
12
|
-
produces: {
|
|
13
|
-
type: "dynamic-streams",
|
|
14
|
-
streams: (cfg) => mappingsToStreams(cfg.streamMappings ?? singleAvStreamMapping(cfg))
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
display: (desc) => {
|
|
18
|
-
return {
|
|
19
|
-
cardIndex: desc.config.cardIndex.toString(),
|
|
20
|
-
channelLayout: desc.config.channelLayout.toString(),
|
|
21
|
-
videoConnection: desc.config.videoConnection.toString(),
|
|
22
|
-
};
|
|
23
|
-
},
|
|
24
|
-
configForm: {
|
|
25
|
-
form: {
|
|
26
|
-
cardIndex: { help: "The card index", hint: { type: 'numeric', defaultValue: 0 } },
|
|
27
|
-
channelLayout: {
|
|
28
|
-
help: "The source channel layout",
|
|
29
|
-
hint: {
|
|
30
|
-
type: "select",
|
|
31
|
-
options: channelLayouts().map((ch) => { return { value: ch, display: ch }; }),
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
videoConnection: {
|
|
35
|
-
help: "SDI or HDMI", hint: {
|
|
36
|
-
type: 'select', options: [{ value: "sdi", display: "SDI" },
|
|
37
|
-
{ value: "hdmi", display: "HDMI" }]
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
streamMappings: singleAvStreamMappingForm
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
const channelLayouts = () => {
|
|
46
|
-
const ch = [
|
|
47
|
-
"mono", "stereo", "surround", "4.0", "5.0", "5.1", "7.1", "5.1.4", "7.1.4"
|
|
48
|
-
];
|
|
49
|
-
return ch;
|
|
50
|
-
};
|
|
51
|
-
//# sourceMappingURL=info.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/input.decklink/info.ts"],"names":[],"mappings":";;AAKA,4BAqDC;AArDD,mBAAwB,EACtB,eAAe,EACf,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,GACJ;IACb,OAAO,eAAe,CACpB;QACE,UAAU,EAAE,gBAAgB;QAC5B,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,2GAA2G;QACxH,YAA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AED,MAAM,cAAc,GAAG,GAAG,EAAE;IAC1B,MAAM,EAAE,GAAoB;QAC1B,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO;KAC3E,CAAA;IACD,OAAO,EAAE,CAAA;AACX,CAAC,CAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Norsk, DeckLinkInputSettings as SdkSettings } from '@norskvideo/norsk-sdk';
|
|
2
|
-
import { SimpleInputWrapper } from '@norskvideo/norsk-studio/lib/extension/base-nodes';
|
|
3
|
-
import { StreamMappingConfiguration } from '@norskvideo/norsk-studio/lib/extension/client-types';
|
|
4
|
-
import { OnCreated, ServerComponentDefinition, ServerComponentSchemas } from '@norskvideo/norsk-studio/lib/extension/runtime-types';
|
|
5
|
-
import type { components } from './types';
|
|
6
|
-
export type DeckLinkInputSettings = components['schemas']['Config'] & Pick<SdkSettings, 'cardIndex' | 'channelLayout' | 'videoConnection'> & {
|
|
7
|
-
streamMappings?: StreamMappingConfiguration;
|
|
8
|
-
};
|
|
9
|
-
export default class DeckLinkInputDefinition implements ServerComponentDefinition<DeckLinkInputSettings, SimpleInputWrapper> {
|
|
10
|
-
create(norsk: Norsk, cfg: DeckLinkInputSettings, cb: OnCreated<SimpleInputWrapper>): Promise<void>;
|
|
11
|
-
schemas(): Promise<ServerComponentSchemas>;
|
|
12
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const base_nodes_1 = require("@norskvideo/norsk-studio/lib/extension/base-nodes");
|
|
7
|
-
const schemas_1 = require("../shared/schemas");
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
|
-
class DeckLinkInputDefinition {
|
|
10
|
-
async create(norsk, cfg, cb) {
|
|
11
|
-
const wrapper = new base_nodes_1.SimpleInputWrapper(cfg.id, async () => norsk.input.deckLink({ sourceName: cfg.id, ...cfg }));
|
|
12
|
-
await wrapper.initialised;
|
|
13
|
-
cb(wrapper);
|
|
14
|
-
}
|
|
15
|
-
async schemas() {
|
|
16
|
-
return (0, schemas_1.schemaFromTypes)(path_1.default.join(__dirname, 'types.yaml'), {
|
|
17
|
-
config: 'Config'
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.default = DeckLinkInputDefinition;
|
|
22
|
-
//# sourceMappingURL=runtime.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/input.decklink/runtime.ts"],"names":[],"mappings":";;;;;AACA,kFAAuF;AAGvF,+CAAoD;AACpD,gDAAwB;AAOxB,MAAqB,uBAAuB;IAC1C,KAAK,CAAC,MAAM,CAAC,KAAY,EAAE,GAA0B,EAAE,EAAiC;QACtF,MAAM,OAAO,GAAG,IAAI,+BAAkB,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,IAAI,EAAE,CACxD,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,GAAG,EAAE,CAAC,CACrD,CAAA;QACD,MAAM,OAAO,CAAC,WAAW,CAAC;QAC1B,EAAE,CAAC,OAAO,CAAC,CAAC;IACd,CAAC;IAED,KAAK,CAAC,OAAO;QACX,OAAO,IAAA,yBAAe,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EAAE;YACzD,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAC;IACL,CAAC;CACF;AAdD,0CAcC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export type paths = Record<string, never>;
|
|
2
|
-
export type webhooks = Record<string, never>;
|
|
3
|
-
export interface components {
|
|
4
|
-
schemas: {
|
|
5
|
-
Config: {
|
|
6
|
-
id: string;
|
|
7
|
-
displayName: string;
|
|
8
|
-
cardIndex: number;
|
|
9
|
-
channelLayout: "mono" | "stereo" | "surround" | "4.0" | "5.0" | "5.1" | "7.1" | "5.1.4" | "7.1.4";
|
|
10
|
-
videoConnection: string;
|
|
11
|
-
streamMappings?: {
|
|
12
|
-
[key: string]: unknown;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
responses: never;
|
|
17
|
-
parameters: never;
|
|
18
|
-
requestBodies: never;
|
|
19
|
-
headers: never;
|
|
20
|
-
pathItems: never;
|
|
21
|
-
}
|
|
22
|
-
export type $defs = Record<string, never>;
|
|
23
|
-
export type operations = Record<string, never>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/input.decklink/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
openapi: 3.0.0
|
|
2
|
-
info:
|
|
3
|
-
title: DeckLink Input
|
|
4
|
-
version: 1.0.0
|
|
5
|
-
|
|
6
|
-
paths: {}
|
|
7
|
-
|
|
8
|
-
components:
|
|
9
|
-
schemas:
|
|
10
|
-
Config:
|
|
11
|
-
type: object
|
|
12
|
-
required:
|
|
13
|
-
- id
|
|
14
|
-
- displayName
|
|
15
|
-
- cardIndex
|
|
16
|
-
- channelLayout
|
|
17
|
-
- videoConnection
|
|
18
|
-
properties:
|
|
19
|
-
id:
|
|
20
|
-
type: string
|
|
21
|
-
displayName:
|
|
22
|
-
type: string
|
|
23
|
-
cardIndex:
|
|
24
|
-
type: number
|
|
25
|
-
channelLayout:
|
|
26
|
-
type: string
|
|
27
|
-
enum: ["mono", "stereo", "surround", "4.0", "5.0", "5.1", "7.1", "5.1.4", "7.1.4"]
|
|
28
|
-
videoConnection:
|
|
29
|
-
type: string
|
|
30
|
-
streamMappings:
|
|
31
|
-
type: object
|
|
32
|
-
additionalProperties: true
|
package/lib/input.ndi/info.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type Registration from "@norskvideo/norsk-studio/lib/extension/registration";
|
|
2
|
-
import type { NdiInputSettings } from "./runtime";
|
|
3
|
-
export default function ({ defineComponent, singleAvStreamMapping, singleAvStreamMappingForm, mappingsToStreams, validation: { Z } }: Registration): import("@norskvideo/norsk-studio/lib/extension/client-types").NodeInfo<NdiInputSettings, object, object, object>;
|
package/lib/input.ndi/info.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = default_1;
|
|
7
|
-
const source_selection_1 = __importDefault(require("./source-selection"));
|
|
8
|
-
function default_1({ defineComponent, singleAvStreamMapping, singleAvStreamMappingForm, mappingsToStreams, validation: { Z } }) {
|
|
9
|
-
const validation = Z.object({
|
|
10
|
-
name: Z.string().trim().min(2),
|
|
11
|
-
url: Z.string().trim().min(2),
|
|
12
|
-
created: Z.boolean(),
|
|
13
|
-
}).strict();
|
|
14
|
-
return defineComponent({
|
|
15
|
-
identifier: 'input.ndi',
|
|
16
|
-
category: 'input',
|
|
17
|
-
name: "NDI Ingest",
|
|
18
|
-
description: "This component ingests from an NDI source.",
|
|
19
|
-
subscription: {
|
|
20
|
-
accepts: undefined,
|
|
21
|
-
produces: {
|
|
22
|
-
type: "dynamic-streams",
|
|
23
|
-
streams: (cfg) => mappingsToStreams(cfg.streamMappings ?? singleAvStreamMapping(cfg))
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
display: (desc) => {
|
|
27
|
-
return {
|
|
28
|
-
ndiSourceName: desc.config.ndiSource.name,
|
|
29
|
-
ndiReceiveName: desc.config.ndiReceiveName
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
configForm: {
|
|
33
|
-
form: {
|
|
34
|
-
ndiSource: {
|
|
35
|
-
help: "The source to connect to",
|
|
36
|
-
hint: {
|
|
37
|
-
type: "custom",
|
|
38
|
-
component: source_selection_1.default,
|
|
39
|
-
validation
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
ndiReceiveName: { help: "The name to publish this receiver as", hint: { type: "text" } },
|
|
43
|
-
streamMappings: singleAvStreamMappingForm,
|
|
44
|
-
ignoreSourceFrameRate: {
|
|
45
|
-
help: "Ignore the source frame rate",
|
|
46
|
-
hint: { type: 'boolean', defaultValue: false }
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=info.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/input.ndi/info.ts"],"names":[],"mappings":";;;;;AAKA,4BAqDC;AAxDD,0EAAiD;AAGjD,mBAAwB,EACtB,eAAe,EACf,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,EACjB,UAAU,EAAE,EAAE,CAAC,EAAE,EAAgB;IAGjC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;QAC1B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC7B,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;KACrB,CAAC,CAAC,MAAM,EAA+D,CAAC;IAEzE,OAAO,eAAe,CACpB;QACE,UAAU,EAAE,WAAW;QACvB,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,4CAA4C;QAEzD,YAAY,EAAE;YACZ,OAAO,EAAE,SAAS;YAClB,QAAQ,EAAE;gBACR,IAAI,EAAE,iBAAiB;gBACvB,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,iBAAiB,CAAC,GAAG,CAAC,cAAc,IAAI,qBAAqB,CAAC,GAAG,CAAC,CAAC;aACtF;SACF;QACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;YAChB,OAAO;gBACL,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI;gBACzC,cAAc,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc;aAC3C,CAAA;QACH,CAAC;QACD,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,SAAS,EAAE;oBACT,IAAI,EAAE,0BAA0B;oBAChC,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,SAAS,EAAE,0BAAe;wBAC1B,UAAU;qBACX;iBACF;gBACD,cAAc,EAAE,EAAE,IAAI,EAAE,sCAAsC,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;gBACxF,cAAc,EAAE,yBAAyB;gBACzC,qBAAqB,EAAE;oBACrB,IAAI,EAAE,8BAA8B;oBACpC,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE;iBAC/C;aACF;SACF;KACF,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Norsk, NdiInputSettings as SdkSettings } from '@norskvideo/norsk-sdk';
|
|
2
|
-
import { SimpleInputWrapper } from '@norskvideo/norsk-studio/lib/extension/base-nodes';
|
|
3
|
-
import { OnCreated, ServerComponentDefinition, ServerComponentSchemas, StaticRouteInfo } from '@norskvideo/norsk-studio/lib/extension/runtime-types';
|
|
4
|
-
import { components } from './types';
|
|
5
|
-
import { StreamMappingConfiguration } from '@norskvideo/norsk-studio/lib/extension/client-types';
|
|
6
|
-
export type StudioNdiSource = {
|
|
7
|
-
name: string;
|
|
8
|
-
url: string;
|
|
9
|
-
created: boolean;
|
|
10
|
-
};
|
|
11
|
-
export type NdiInputSettings = Pick<SdkSettings, 'ndiReceiveName'> & {
|
|
12
|
-
id: string;
|
|
13
|
-
displayName: string;
|
|
14
|
-
ndiSource: StudioNdiSource;
|
|
15
|
-
ndiReceiveName: string;
|
|
16
|
-
streamMappings?: StreamMappingConfiguration;
|
|
17
|
-
ignoreSourceFrameRate: boolean;
|
|
18
|
-
};
|
|
19
|
-
export type NdiSource = components['schemas']['ndiSource'];
|
|
20
|
-
export default class NdiInputDefinition implements ServerComponentDefinition<NdiInputSettings, SimpleInputWrapper> {
|
|
21
|
-
create(norsk: Norsk, cfg: NdiInputSettings, cb: OnCreated<SimpleInputWrapper>): Promise<void>;
|
|
22
|
-
staticRoutes(): Promise<StaticRouteInfo[]>;
|
|
23
|
-
schemas(): Promise<ServerComponentSchemas>;
|
|
24
|
-
}
|
package/lib/input.ndi/runtime.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const norsk_sdk_1 = require("@norskvideo/norsk-sdk");
|
|
7
|
-
const base_nodes_1 = require("@norskvideo/norsk-studio/lib/extension/base-nodes");
|
|
8
|
-
const api_1 = require("@norskvideo/norsk-studio/lib/server/api");
|
|
9
|
-
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const logging_1 = require("@norskvideo/norsk-studio/lib/server/logging");
|
|
11
|
-
const schemas_1 = require("../shared/schemas");
|
|
12
|
-
class NdiInputDefinition {
|
|
13
|
-
async create(norsk, cfg, cb) {
|
|
14
|
-
const wrapper = new base_nodes_1.SimpleInputWrapper(cfg.id, async () => {
|
|
15
|
-
const input = await norsk.input.ndi({
|
|
16
|
-
sourceName: cfg.id,
|
|
17
|
-
ndiReceiveName: cfg.ndiReceiveName,
|
|
18
|
-
ndiSource: cfg.ndiSource.created ? { url: cfg.ndiSource.url } : { name: cfg.ndiSource.name },
|
|
19
|
-
sourceFrameRate: cfg.ignoreSourceFrameRate ? { variable: undefined } : undefined
|
|
20
|
-
});
|
|
21
|
-
return input;
|
|
22
|
-
});
|
|
23
|
-
await wrapper.initialised;
|
|
24
|
-
cb(wrapper);
|
|
25
|
-
}
|
|
26
|
-
async staticRoutes() {
|
|
27
|
-
let sources = [];
|
|
28
|
-
const sourcesDiscovered = (discoveredSources) => {
|
|
29
|
-
sources = discoveredSources.map(({ url, name }) => { return { url, name }; });
|
|
30
|
-
};
|
|
31
|
-
const handleDiscoveryError = async () => {
|
|
32
|
-
(0, logging_1.debuglog)("NDI discovery failed");
|
|
33
|
-
setTimeout(() => {
|
|
34
|
-
startDiscovery().catch(handleDiscoveryError);
|
|
35
|
-
}, 500);
|
|
36
|
-
};
|
|
37
|
-
const startDiscovery = async () => {
|
|
38
|
-
const norsk = await norsk_sdk_1.Norsk.connect();
|
|
39
|
-
await norsk.system.ndiDiscovery({
|
|
40
|
-
showLocalSources: true,
|
|
41
|
-
cb: sourcesDiscovered,
|
|
42
|
-
onClose: handleDiscoveryError
|
|
43
|
-
});
|
|
44
|
-
(0, logging_1.debuglog)("NDI Discovery started");
|
|
45
|
-
};
|
|
46
|
-
await startDiscovery().catch(async () => handleDiscoveryError());
|
|
47
|
-
return (0, api_1.defineApi)(path_1.default.join(__dirname, 'types.yaml'), {
|
|
48
|
-
'/sources': {
|
|
49
|
-
get: (_) => async (_req, res) => {
|
|
50
|
-
res.send(JSON.stringify(sources));
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
async schemas() {
|
|
56
|
-
return (0, schemas_1.schemaFromTypes)(path_1.default.join(__dirname, 'types.yaml'), { config: 'config' });
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.default = NdiInputDefinition;
|
|
60
|
-
//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
|
1
|
-
import { StaticUrls } from "@norskvideo/norsk-studio/lib/extension/client-types";
|
|
2
|
-
import { StudioNdiSource } from "./runtime";
|
|
3
|
-
type SourceSelectionProps = {
|
|
4
|
-
defaultValue?: StudioNdiSource;
|
|
5
|
-
id: string;
|
|
6
|
-
onChanged: (value: StudioNdiSource) => void;
|
|
7
|
-
urls?: StaticUrls;
|
|
8
|
-
};
|
|
9
|
-
declare function SourceSelection(props: SourceSelectionProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export default SourceSelection;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const react_1 = require("react");
|
|
8
|
-
const creatable_1 = __importDefault(require("react-select/creatable"));
|
|
9
|
-
function SourceSelection(props) {
|
|
10
|
-
const [loading, setLoading] = (0, react_1.useState)(true);
|
|
11
|
-
const [sourcesD, setSourcesD] = (0, react_1.useState)([]);
|
|
12
|
-
const [options, setOptions] = (0, react_1.useState)([]);
|
|
13
|
-
const [input, setInput] = (0, react_1.useState)(props.defaultValue || { name: "", url: "" });
|
|
14
|
-
const isMounted = (0, react_1.useRef)(true);
|
|
15
|
-
(0, react_1.useEffect)(() => {
|
|
16
|
-
if (props.defaultValue) {
|
|
17
|
-
props.onChanged(props.defaultValue);
|
|
18
|
-
}
|
|
19
|
-
}, [props.defaultValue]);
|
|
20
|
-
(0, react_1.useEffect)(() => {
|
|
21
|
-
const fetchSources = async () => {
|
|
22
|
-
try {
|
|
23
|
-
if (!props.urls?.staticUrl)
|
|
24
|
-
return;
|
|
25
|
-
const result = await fetch(`${props.urls.staticUrl}/sources`);
|
|
26
|
-
if (isMounted.current && result.ok && result.body) {
|
|
27
|
-
const sources = await result.json();
|
|
28
|
-
const studioSources = sources.map((source) => ({ ...source, created: false }));
|
|
29
|
-
if (props.defaultValue !== undefined) {
|
|
30
|
-
if (props.defaultValue !== undefined && sources.find(({ url }) => url == props.defaultValue?.url) === undefined) {
|
|
31
|
-
studioSources.push({ url: props.defaultValue.url, name: props.defaultValue.name, created: true });
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
const options = sources.map((o) => ({
|
|
35
|
-
value: o.url,
|
|
36
|
-
label: o.name,
|
|
37
|
-
}));
|
|
38
|
-
setSourcesD(studioSources);
|
|
39
|
-
setOptions(options);
|
|
40
|
-
setLoading(false);
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
const text = await result.text();
|
|
44
|
-
throw new Error(text);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
catch (err) {
|
|
48
|
-
console.error(err);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
fetchSources().catch(console.error);
|
|
52
|
-
const interval = setInterval(() => { fetchSources().catch(console.error); }, 500);
|
|
53
|
-
return () => {
|
|
54
|
-
clearInterval(interval);
|
|
55
|
-
};
|
|
56
|
-
}, [props.defaultValue, props.urls?.staticUrl]);
|
|
57
|
-
const classNames = (0, react_1.useMemo)(() => ({
|
|
58
|
-
control: () => "bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded focus:ring-blue-500 focus:border-blue-500 p-1 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",
|
|
59
|
-
singleValue: () => "node-edit-select-input",
|
|
60
|
-
option: () => "node-edit-select-input",
|
|
61
|
-
menu: () => "bg-gray-50 dark:bg-gray-700 p-1"
|
|
62
|
-
}), []);
|
|
63
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: loading ?
|
|
64
|
-
(0, jsx_runtime_1.jsx)("div", { children: "Loading..." })
|
|
65
|
-
:
|
|
66
|
-
(0, jsx_runtime_1.jsx)(creatable_1.default, { options: options, value: input ? { value: input.url, label: input.name } : null, isClearable: true, onChange: (selected) => {
|
|
67
|
-
if (selected) {
|
|
68
|
-
const source = sourcesD.find(({ url }) => url == selected.value);
|
|
69
|
-
if (source) {
|
|
70
|
-
setInput(source);
|
|
71
|
-
props.onChanged(source);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}, onCreateOption: (newInput) => {
|
|
75
|
-
const newSource = { name: newInput, url: newInput, created: true };
|
|
76
|
-
const newOption = { label: newInput, value: newInput, created: true };
|
|
77
|
-
setSourcesD((prev) => [...prev, newSource]);
|
|
78
|
-
setOptions((prev) => [...prev, newOption]);
|
|
79
|
-
setInput(newSource);
|
|
80
|
-
props.onChanged(newSource);
|
|
81
|
-
}, placeholder: "Select or type...", classNames: classNames, unstyled: true }) });
|
|
82
|
-
}
|
|
83
|
-
exports.default = SourceSelection;
|
|
84
|
-
//# sourceMappingURL=source-selection.js.map
|