@asd20/ui-next 2.18.0 → 2.19.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
# [2.19.0](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.18.0...ui-next-v2.19.0) (2026-08-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add azure blob mp4 and myvrspot video urls for tiptap editor ([b7bc2e9](https://github.com/academydistrict20/asd20-ui-next/commit/b7bc2e94bf8502bb990bfb063c14b6631f981f80))
|
|
9
|
+
|
|
3
10
|
# [2.18.0](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.17.0...ui-next-v2.18.0) (2026-08-06)
|
|
4
11
|
|
|
5
12
|
|
package/package.json
CHANGED
|
@@ -59,6 +59,10 @@ const MARK_TYPES = new Set([
|
|
|
59
59
|
const TABLE_HEADER_SCOPES = new Set(['col', 'row', 'colgroup', 'rowgroup'])
|
|
60
60
|
const VIDEO_TITLE_MAX_LENGTH = 200
|
|
61
61
|
const VIDEO_DESCRIPTION_MAX_LENGTH = 1000
|
|
62
|
+
const MYVRSPOT_VIDEO_ID_PATTERN = /^[A-Za-z0-9_-]{16,256}$/
|
|
63
|
+
const MYVRSPOT_HOST = 'live.myvrspot.com'
|
|
64
|
+
const ASD20_VIDEO_HOST = 'asd20websitestorage.blob.core.windows.net'
|
|
65
|
+
const ASD20_VIDEO_PATH_PREFIX = '/asd20-images/videos/'
|
|
62
66
|
const VIDEO_PROVIDER_RULES = Object.freeze([
|
|
63
67
|
{
|
|
64
68
|
host: 'www.youtube.com',
|
|
@@ -236,14 +240,36 @@ function isCanonicalVideoEmbedSource(value) {
|
|
|
236
240
|
url.username ||
|
|
237
241
|
url.password ||
|
|
238
242
|
url.port ||
|
|
239
|
-
url.search ||
|
|
240
243
|
url.hash
|
|
241
244
|
) {
|
|
242
245
|
return false
|
|
243
246
|
}
|
|
244
247
|
|
|
248
|
+
const host = url.hostname.toLowerCase()
|
|
249
|
+
if (host === MYVRSPOT_HOST) {
|
|
250
|
+
const videoId = url.searchParams.get('v') || ''
|
|
251
|
+
return (
|
|
252
|
+
url.pathname === '/iframe' &&
|
|
253
|
+
MYVRSPOT_VIDEO_ID_PATTERN.test(videoId) &&
|
|
254
|
+
url.searchParams.get('share') === '1' &&
|
|
255
|
+
[...url.searchParams].length === 2 &&
|
|
256
|
+
value === `https://${MYVRSPOT_HOST}/iframe?v=${videoId}&share=1`
|
|
257
|
+
)
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
if (host === ASD20_VIDEO_HOST) {
|
|
261
|
+
return (
|
|
262
|
+
!url.search &&
|
|
263
|
+
url.pathname.startsWith(ASD20_VIDEO_PATH_PREFIX) &&
|
|
264
|
+
url.pathname.toLowerCase().endsWith('.mp4') &&
|
|
265
|
+
value === `https://${ASD20_VIDEO_HOST}${url.pathname}`
|
|
266
|
+
)
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
if (url.search) return false
|
|
270
|
+
|
|
245
271
|
const rule = VIDEO_PROVIDER_RULES.find(
|
|
246
|
-
candidate => candidate.host ===
|
|
272
|
+
candidate => candidate.host === host
|
|
247
273
|
)
|
|
248
274
|
return Boolean(
|
|
249
275
|
rule &&
|