@brightcove/components-embed-code-modal 1.1.1 → 1.1.3
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/.github/workflows/ci.yml +1 -1
- package/CHANGELOG.md +21 -1
- package/__tests__/PrismLiveModal.test.tsx +85 -0
- package/__tests__/PrismPlayerControls.test.tsx +139 -0
- package/__tests__/VideoPlayer.test.tsx +68 -1
- package/build/__tests__/PrismLiveModal.test.d.ts +2 -0
- package/build/__tests__/PrismLiveModal.test.d.ts.map +1 -0
- package/build/__tests__/PrismPlayerControls.test.d.ts +2 -0
- package/build/__tests__/PrismPlayerControls.test.d.ts.map +1 -0
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/build/package.json +2 -2
- package/build/src/js/components/prism/PrismLiveModal.d.ts.map +1 -1
- package/build/src/js/components/prism/PrismPlayerControls.d.ts +2 -1
- package/build/src/js/components/prism/PrismPlayerControls.d.ts.map +1 -1
- package/build/src/js/components/prism/PrismPlayerPreview.d.ts +2 -1
- package/build/src/js/components/prism/PrismPlayerPreview.d.ts.map +1 -1
- package/build/src/js/hooks/useIsMobile.d.ts +3 -0
- package/build/src/js/hooks/useIsMobile.d.ts.map +1 -0
- package/build/src/js/i18n.d.ts +24 -0
- package/build/src/js/i18n.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/js/components/VideoPlayer.tsx +2 -2
- package/src/js/components/prism/PrismLiveModal.tsx +40 -6
- package/src/js/components/prism/PrismPlayerControls.tsx +56 -43
- package/src/js/components/prism/PrismPlayerPreview.tsx +19 -7
- package/src/js/hooks/useIsMobile.ts +33 -0
- package/src/styles/prism/PrismLiveModal.sass +35 -62
- package/src/translations/en.json +4 -0
- package/src/translations/es.json +4 -0
- package/src/translations/fr.json +4 -0
- package/src/translations/ja.json +4 -0
- package/src/translations/ko.json +4 -0
- package/src/translations/zh.json +4 -0
|
@@ -1,66 +1,58 @@
|
|
|
1
1
|
@import "~@brightcove/prism-core/build/scss/tokens"
|
|
2
2
|
|
|
3
|
-
.prismLiveModal
|
|
4
|
-
width: 900px
|
|
5
|
-
max-width: 90vw
|
|
6
|
-
height: 700px
|
|
7
|
-
max-height: 90vh
|
|
8
|
-
|
|
9
|
-
div[class^='Modal-Modal__content']
|
|
10
|
-
position: static
|
|
11
|
-
|
|
12
3
|
.prismLiveModalContent
|
|
13
4
|
display: grid
|
|
14
|
-
grid-template-columns: 52% 48%
|
|
5
|
+
grid-template-columns: minmax(0, 52%) minmax(0, 48%)
|
|
15
6
|
gap: 0
|
|
16
7
|
height: 100%
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
min-height: 0
|
|
9
|
+
min-width: 0
|
|
19
10
|
|
|
20
11
|
.prismLeftColumn
|
|
21
12
|
padding: var(--spacing-5, 24px)
|
|
22
13
|
display: flex
|
|
23
14
|
flex-direction: column
|
|
24
|
-
gap: var(--spacing-
|
|
15
|
+
gap: var(--spacing-4, 16px)
|
|
25
16
|
overflow-y: auto
|
|
17
|
+
min-height: 0
|
|
18
|
+
min-width: 0
|
|
26
19
|
border-right: 1px solid var(--stroke-tertiary-default, #f5f4f0)
|
|
27
20
|
background: var(--surface-primary-default, #ffffff)
|
|
28
21
|
|
|
29
|
-
/* Custom scrollbar */
|
|
30
|
-
&::-webkit-scrollbar
|
|
31
|
-
width: 6px
|
|
32
|
-
|
|
33
|
-
&::-webkit-scrollbar-track
|
|
34
|
-
background: transparent
|
|
35
|
-
|
|
36
|
-
&::-webkit-scrollbar-thumb
|
|
37
|
-
background: var(--stroke-tertiary-default, #f5f4f0)
|
|
38
|
-
border-radius: 3px
|
|
39
|
-
|
|
40
|
-
&::-webkit-scrollbar-thumb:hover
|
|
41
|
-
background: var(--stroke-secondary-default, #e8e6de)
|
|
42
|
-
|
|
43
22
|
.prismRightColumn
|
|
44
23
|
padding: var(--spacing-5, 24px)
|
|
45
24
|
display: flex
|
|
46
25
|
flex-direction: column
|
|
26
|
+
overflow-y: auto
|
|
27
|
+
min-height: 0
|
|
28
|
+
min-width: 0
|
|
47
29
|
background: var(--surface-primary-default, #ffffff)
|
|
48
|
-
overflow: hidden
|
|
49
30
|
|
|
50
31
|
.prismInputGroup
|
|
51
32
|
display: flex
|
|
52
33
|
gap: var(--spacing-2, 8px)
|
|
53
34
|
align-items: flex-end
|
|
54
35
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
width: 44%
|
|
36
|
+
.prismSizingField
|
|
37
|
+
flex: 1 1 0
|
|
38
|
+
min-width: 0
|
|
59
39
|
|
|
60
40
|
.prismLinkButton
|
|
61
41
|
margin-bottom: 8px
|
|
62
42
|
flex-shrink: 0
|
|
63
43
|
|
|
44
|
+
// Let the card grow with the code (all lines visible, long code scrolls the
|
|
45
|
+
// column) and keep a 150px floor. The clip keeps the rounded corners that
|
|
46
|
+
// `indefiniteGrow` gives up on the card root.
|
|
47
|
+
.prismCodeCard
|
|
48
|
+
flex: 0 0 auto
|
|
49
|
+
border-radius: var(--radius-2, 8px)
|
|
50
|
+
overflow: hidden
|
|
51
|
+
|
|
52
|
+
// PrismCodeCard pins its code area at min-height 170px.
|
|
53
|
+
[class*='CodeCard__scroll']
|
|
54
|
+
min-height: 150px
|
|
55
|
+
|
|
64
56
|
.prismCustomPluginNotice
|
|
65
57
|
padding: var(--spacing-2, 8px) var(--spacing-3, 12px)
|
|
66
58
|
background: var(--surface-warning-subdued, #fff4e5)
|
|
@@ -70,26 +62,6 @@
|
|
|
70
62
|
border-radius: var(--radius-2, 8px)
|
|
71
63
|
margin-top: var(--spacing-3, 12px)
|
|
72
64
|
|
|
73
|
-
// Bound the code card so the upstream PrismCodeCard's own scroll
|
|
74
|
-
// engages instead of overflowing the modal's left column. The upstream
|
|
75
|
-
// component doesn't expose a height-cap prop, so we cap its inner
|
|
76
|
-
// scroll element by class-name match. Re-verify on prism-core upgrades.
|
|
77
|
-
.prismCodeCard
|
|
78
|
-
flex: 0 0 auto
|
|
79
|
-
max-height: 280px
|
|
80
|
-
|
|
81
|
-
[class*='CodeCard__scroll']
|
|
82
|
-
max-height: 220px
|
|
83
|
-
overflow-y: auto
|
|
84
|
-
|
|
85
|
-
.prismFooter
|
|
86
|
-
display: flex
|
|
87
|
-
justify-content: flex-end
|
|
88
|
-
gap: var(--spacing-2, 8px)
|
|
89
|
-
padding: var(--spacing-4, 16px) var(--spacing-5, 24px)
|
|
90
|
-
border-top: 1px solid var(--stroke-tertiary-default, #f5f4f0)
|
|
91
|
-
background: var(--surface-primary-default, #ffffff)
|
|
92
|
-
|
|
93
65
|
// Player Preview Styles
|
|
94
66
|
.prismPlayerPreviewContainer
|
|
95
67
|
display: flex
|
|
@@ -135,21 +107,22 @@
|
|
|
135
107
|
height: 100%
|
|
136
108
|
object-fit: contain
|
|
137
109
|
|
|
138
|
-
// Responsive adjustments
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
width: 100%
|
|
142
|
-
height: 100%
|
|
143
|
-
max-width: 100vw
|
|
144
|
-
max-height: 100vh
|
|
145
|
-
|
|
110
|
+
// Responsive adjustments. Matches useIsMobile / media's Prism modal policy:
|
|
111
|
+
// below 1024 the modal is a vertical stack, from 1024 up it is two columns.
|
|
112
|
+
@media (max-width: 1023px)
|
|
146
113
|
.prismLiveModalContent
|
|
147
|
-
grid-template-columns: 1fr
|
|
148
|
-
|
|
114
|
+
grid-template-columns: minmax(0, 1fr)
|
|
115
|
+
height: auto
|
|
149
116
|
|
|
150
117
|
.prismLeftColumn
|
|
118
|
+
overflow-y: visible
|
|
151
119
|
border-right: none
|
|
152
120
|
border-bottom: 1px solid var(--stroke-tertiary-default, #f5f4f0)
|
|
153
121
|
|
|
154
122
|
.prismRightColumn
|
|
123
|
+
overflow-y: visible
|
|
155
124
|
min-height: 400px
|
|
125
|
+
|
|
126
|
+
// On phones the footer offers Copy Code instead of showing the card.
|
|
127
|
+
.prismCodeCard
|
|
128
|
+
display: none
|
package/src/translations/en.json
CHANGED
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
"bcMapTrackingTextWarning": "This player is configured with MAPs Tracking. To ensure proper tracking, the JavaScript embed code should be used."
|
|
20
20
|
},
|
|
21
21
|
"done": "Done",
|
|
22
|
+
"urlShort": "URL",
|
|
23
|
+
"previewShort": "Preview",
|
|
24
|
+
"copyCode": "Copy Code",
|
|
25
|
+
"codeCopied": "Code copied to clipboard",
|
|
22
26
|
"close": "Close",
|
|
23
27
|
"toasterTitle": "Success.",
|
|
24
28
|
"toasterMessage": "Code copied to clipboard",
|
package/src/translations/es.json
CHANGED
|
@@ -25,6 +25,10 @@
|
|
|
25
25
|
"toasterErrorMessage": "Se ha producido un error al copiar el texto al portapapeles.",
|
|
26
26
|
"customPluginNotice": "Puede ocurrir que las configuraciones personalizadas impidan la previsualización completa.",
|
|
27
27
|
"done": "Hecho",
|
|
28
|
+
"urlShort": "URL",
|
|
29
|
+
"previewShort": "Vista previa",
|
|
30
|
+
"copyCode": "Copiar el código",
|
|
31
|
+
"codeCopied": "Código copiado al portapapeles",
|
|
28
32
|
"close": "Cerrar",
|
|
29
33
|
"noPlayerModalHeader": "Crear un reproductor de interactividad",
|
|
30
34
|
"noPlayerModalContent1": "Para poder incrustar un proyecto de interactividad, primero hay que activar la función de interactividad.",
|
package/src/translations/fr.json
CHANGED
|
@@ -25,6 +25,10 @@
|
|
|
25
25
|
"toasterErrorMessage": "Erreur lors de la copie du texte dans le presse-papiers",
|
|
26
26
|
"customPluginNotice": "En raison des configurations personnalisées, vous pourriez ne pas pouvoir visualiser l'aperçu plein écran.",
|
|
27
27
|
"done": "Terminé",
|
|
28
|
+
"urlShort": "URL",
|
|
29
|
+
"previewShort": "Aperçu",
|
|
30
|
+
"copyCode": "Copier le code",
|
|
31
|
+
"codeCopied": "Code copié dans le presse-papiers",
|
|
28
32
|
"close": "Fermer",
|
|
29
33
|
"noPlayerModalHeader": "Créer un lecteur d’interactivité",
|
|
30
34
|
"noPlayerModalContent1": "Pour intégrer un projet d’interactivité vous devez activer la fonction d’interactivité.",
|
package/src/translations/ja.json
CHANGED
|
@@ -25,6 +25,10 @@
|
|
|
25
25
|
"toasterErrorMessage": "テキストをクリップボードにコピー中にエラーが発生しました",
|
|
26
26
|
"customPluginNotice": "カスタム設定により、プレビューが完全でない場合があります。",
|
|
27
27
|
"done": "完了",
|
|
28
|
+
"urlShort": "URL",
|
|
29
|
+
"previewShort": "プレビュー",
|
|
30
|
+
"copyCode": "コードをコピー",
|
|
31
|
+
"codeCopied": "コードをクリップボードにコピーしました",
|
|
28
32
|
"close": "閉じる",
|
|
29
33
|
"noPlayerModalHeader": "インタラクティブプレーヤーの作成",
|
|
30
34
|
"noPlayerModalContent1": "インタラクティブプロジェクトを埋め込むには、インタラクティブ機能を有効にする必要があります。",
|
package/src/translations/ko.json
CHANGED
|
@@ -25,6 +25,10 @@
|
|
|
25
25
|
"toasterErrorMessage": "클립보드에 텍스트를 복사하는 중 오류 발생",
|
|
26
26
|
"customPluginNotice": "사용자 정의 구성으로 인해 전체 미리 보기를 이용하지 못할 수도 있습니다.",
|
|
27
27
|
"done": "완료",
|
|
28
|
+
"urlShort": "URL",
|
|
29
|
+
"previewShort": "미리보기",
|
|
30
|
+
"copyCode": "코드 복사",
|
|
31
|
+
"codeCopied": "코드가 클립보드에 복사되었습니다",
|
|
28
32
|
"close": "닫기",
|
|
29
33
|
"noPlayerModalHeader": "상호작용성 플레이어 생성",
|
|
30
34
|
"noPlayerModalContent1": "상호작용성 프로젝트를 임베딩하려면 상호작용성 기능을 활성화해야 합니다.",
|
package/src/translations/zh.json
CHANGED
|
@@ -25,6 +25,10 @@
|
|
|
25
25
|
"toasterErrorMessage": "複製文字到剪貼簿時發生錯誤",
|
|
26
26
|
"customPluginNotice": "由於自訂組態,您可能無法體驗完整預覽版。",
|
|
27
27
|
"done": "完成",
|
|
28
|
+
"urlShort": "URL",
|
|
29
|
+
"previewShort": "預覽",
|
|
30
|
+
"copyCode": "複製代碼",
|
|
31
|
+
"codeCopied": "代碼已複製到剪貼簿",
|
|
28
32
|
"close": "關閉",
|
|
29
33
|
"noPlayerModalHeader": "建立互動播放程式",
|
|
30
34
|
"noPlayerModalContent1": "若要嵌入互動專案,您必須啟用互動功能。",
|