@asd20/ui-next 2.19.0 → 2.20.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.20.0](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.19.0...ui-next-v2.20.0) (2026-08-07)
4
+
5
+
6
+ ### Features
7
+
8
+ * adjust video descriptions rendering for tiptap messages ([fbe3171](https://github.com/academydistrict20/asd20-ui-next/commit/fbe3171d365aeffeb7f66add00756ab9689f40a2))
9
+
3
10
  # [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
11
 
5
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asd20/ui-next",
3
- "version": "2.19.0",
3
+ "version": "2.20.0",
4
4
  "private": false,
5
5
  "description": "ASD20 UI component library for Vue 3.",
6
6
  "license": "MIT",
@@ -291,6 +291,16 @@ function validateRequiredCanonicalText(node, name, path, maximumLength) {
291
291
  : null
292
292
  }
293
293
 
294
+ function validateOptionalCanonicalText(node, name, path, maximumLength) {
295
+ const value = node.attrs?.[name]
296
+ if (value === undefined) return null
297
+ return typeof value !== 'string' ||
298
+ value !== value.trim() ||
299
+ value.length > maximumLength
300
+ ? issue('malformed-attribute', path, name)
301
+ : null
302
+ }
303
+
294
304
  function validateMarks(marks, path) {
295
305
  if (marks === undefined) return null
296
306
  if (!Array.isArray(marks)) return issue('malformed-marks', path)
@@ -531,7 +541,7 @@ function validateNode(node, path) {
531
541
  VIDEO_TITLE_MAX_LENGTH
532
542
  )
533
543
  if (titleIssue) return titleIssue
534
- const descriptionIssue = validateRequiredCanonicalText(
544
+ const descriptionIssue = validateOptionalCanonicalText(
535
545
  node,
536
546
  'descriptiveText',
537
547
  path,
@@ -809,15 +819,14 @@ function renderStandardNode(node) {
809
819
  .join('')}</div></figure>`
810
820
  }
811
821
  if (node.type === 'videoEmbed') {
822
+ const description = node.attrs?.descriptiveText || ''
812
823
  return `<div class="asd20-message-video" data-cc-node="video"${attribute(
813
824
  'data-src',
814
825
  node.attrs.src
815
826
  )}${attribute('data-title', node.attrs.title)}${attribute(
816
827
  'data-descriptive-text',
817
- node.attrs.descriptiveText
818
- )}><p class="asd20-message-video__description">${escapeHtml(
819
- node.attrs.descriptiveText
820
- )}</p><div class="asd20-message-video__frame"><iframe${attribute(
828
+ description
829
+ )}><div class="asd20-message-video__frame"><iframe${attribute(
821
830
  'src',
822
831
  node.attrs.src
823
832
  )}${attribute(
@@ -827,7 +836,13 @@ function renderStandardNode(node) {
827
836
  'allowfullscreen',
828
837
  '',
829
838
  true
830
- )}></iframe></div></div>`
839
+ )}></iframe></div>${
840
+ description
841
+ ? `<p class="asd20-message-video__description">${escapeHtml(
842
+ description
843
+ )}</p>`
844
+ : ''
845
+ }</div>`
831
846
  }
832
847
  if (node.type === 'table') return renderTable(node)
833
848
  if (node.type === 'tableRow') return `<tr>${renderChildren(node)}</tr>`