@meistrari/tela-build 1.87.1 → 1.87.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/CHANGELOG.md CHANGED
@@ -4,6 +4,8 @@ Latest updates and announcements.
4
4
 
5
5
  ## October 15, 2026
6
6
 
7
+ - [Preview](/components/preview) displays failed processed-file loads as errors and skips original file URL resolution and PDF loading when showing processed text.
8
+ - [Preview](/patterns/preview) reserves space for the file selector and Original/Processed tabs so document content stays visible below them, including while scrolling.
7
9
  - [Preview](/components/preview) wraps preformatted text within the document width, keeping long indented email paragraphs readable while preserving indentation and line breaks.
8
10
 
9
11
  ## October 14, 2026
@@ -677,6 +677,7 @@ async function reRenderAllPdfPages() {
677
677
 
678
678
  watch(() => props.file, async (newFile, oldFile) => {
679
679
  const isSamePdfRecompute = newFile?.fileType === 'application/pdf'
680
+ && !newFile.isMarkdown
680
681
  && pdfDocHandle.value
681
682
  && newFile?.fileName === oldFile?.fileName
682
683
  && newFile?.fileUrl === oldFile?.fileUrl
@@ -711,7 +712,7 @@ watch(() => props.file, async (newFile, oldFile) => {
711
712
  fileUrl.value = newFile.fileUrl
712
713
  isLoading.value = false
713
714
  }
714
- else if (containsVaultFile.value && newFile.fileUrl) {
715
+ else if (!newFile.isMarkdown && containsVaultFile.value && newFile.fileUrl) {
715
716
  fileUrl.value = await resolveVaultFileUrl(newFile.fileUrl)
716
717
  }
717
718
  else {
@@ -730,7 +731,7 @@ watch(() => props.file, async (newFile, oldFile) => {
730
731
  processMarkdownContent(newFile.fileContent || '')
731
732
  }
732
733
 
733
- if (newFile.fileType === 'application/pdf' && fileUrl.value && props.pdfLoader) {
734
+ if (newFile.fileType === 'application/pdf' && !newFile.isMarkdown && fileUrl.value && props.pdfLoader) {
734
735
  await nextTick()
735
736
  const doc = await props.pdfLoader(fileUrl.value)
736
737
 
@@ -933,10 +934,7 @@ watch([() => props.highlightText, () => props.highlightPage, () => props.highlig
933
934
  relative
934
935
  :data-pdf-preview="props.file.fileType === 'application/pdf'"
935
936
  :data-has-tabs="props.segmentTab === 'processed' && props.file.fileType !== 'application/pdf'"
936
- :class="cn('group', {
937
- 'data-[has-tabs=true]:pt-88px data-[pdf-preview=false]:pt-0px': variant === 'default',
938
- 'data-[has-tabs=true]:pt-42px data-[pdf-preview=false]:pt-0px': variant === 'minimal',
939
- })"
937
+ class="group"
940
938
  overflow-y-auto no-scrollbar
941
939
  @mouseenter="handleContainerMouseEnter"
942
940
  @mouseleave="handleContainerMouseLeave"
@@ -945,11 +943,7 @@ watch([() => props.highlightText, () => props.highlightPage, () => props.highlig
945
943
  <!-- PDF skeleton: mimics the real PDF page stack -->
946
944
  <div
947
945
  v-if="props.file.fileType === 'application/pdf'"
948
- :class="cn('flex flex-col items-center gap-8px pb-80px', {
949
- 'pt-56px': !props.segmentTab,
950
- 'pt-88px': props.segmentTab,
951
- 'px-28px': true,
952
- })"
946
+ class="flex flex-col items-center gap-8px px-28px pt-20px pb-80px"
953
947
  >
954
948
  <div
955
949
  v-for="pageNum in 2" :key="pageNum"
@@ -1047,13 +1041,13 @@ watch([() => props.highlightText, () => props.highlightPage, () => props.highlig
1047
1041
  </div>
1048
1042
  </template>
1049
1043
 
1050
- <template v-else-if="error">
1044
+ <template v-else-if="error || (props.file.isMarkdown && props.file.error)">
1051
1045
  <div flex="~ col" items-center justify-center h-400px>
1052
1046
  <TelaIcon name="i-ph-file-x" size="xl" class="text-gray-400" />
1053
1047
  <p body-16-semibold text-gray-600 mt-12px>
1054
1048
  {{ labels.failedToLoadFile }}
1055
1049
  </p>
1056
- <p body-14-regular text-gray-400 mt-8px>
1050
+ <p v-if="error" body-14-regular text-gray-400 mt-8px>
1057
1051
  {{ error }}
1058
1052
  </p>
1059
1053
  </div>
@@ -1068,8 +1062,6 @@ watch([() => props.highlightText, () => props.highlightPage, () => props.highlig
1068
1062
  :class="cn({
1069
1063
  'px-36px': variant === 'default',
1070
1064
  'px-32px': variant === 'minimal',
1071
- 'pt-88px': variant === 'default' && props.segmentTab && props.file.fileType === 'application/pdf',
1072
- 'pt-42px': variant === 'minimal' && props.segmentTab && props.file.fileType === 'application/pdf',
1073
1065
  'h-full flex flex-col': variant === 'default' && props.segmentTab !== 'processed',
1074
1066
  })"
1075
1067
  >
@@ -1164,14 +1156,8 @@ watch([() => props.highlightText, () => props.highlightPage, () => props.highlig
1164
1156
  >
1165
1157
  <div
1166
1158
  :data-has-tabs="props.segmentTab"
1167
- class="pdf-zoom-wrapper min-w-full"
1168
- px-28px pb-80px
1169
- :class="cn('group', {
1170
- 'pt-88px': variant === 'default' && props.segmentTab,
1171
- 'pt-56px': variant === 'default' && !props.segmentTab,
1172
- 'pt-42px': variant === 'minimal' && props.segmentTab,
1173
- 'pt-20px': variant === 'minimal' && !props.segmentTab,
1174
- })"
1159
+ class="pdf-zoom-wrapper min-w-full group"
1160
+ px-28px pt-20px pb-80px
1175
1161
  >
1176
1162
  <div
1177
1163
  v-if="pdfLoadError"
@@ -271,13 +271,14 @@ interface PdfDocumentHandle {
271
271
  ## Variants
272
272
 
273
273
  ### Default
274
- - Full variable selector at the top with gradient background
274
+ - Full variable selector at the top, outside the document scroll area
275
+ - Selector and optional segment toggle reserve their own height so content cannot scroll behind them
275
276
  - Larger content area and padding
276
277
  - PDF: more vertical padding and larger page cards
277
278
 
278
279
  ### Minimal
279
280
  - Used **inside TelaHoverCard** for compact file previews
280
- - No variable selector strip; optional segment toggle and gradient
281
+ - No variable selector strip; optional segment toggle above the document scroll area
281
282
  - Tighter padding and smaller content width
282
283
  - PDF: compact layout and smaller cards
283
284
 
@@ -76,11 +76,13 @@ const fileReaderKey = computed(() => {
76
76
  </script>
77
77
 
78
78
  <template>
79
- <div bg-neutral-50 relative flex flex-col gap-64px h-full overflow-hidden>
79
+ <div bg-neutral-50 relative flex flex-col h-full min-h-0 overflow-hidden>
80
80
  <div
81
- absolute z-10 flex="~ col" items-center gap-8px w-full flex-shrink-0
81
+ v-if="variant === 'default' || hasSegmentToggle"
82
+ relative z-10 flex="~ col" items-center gap-8px w-full flex-shrink-0
82
83
  :class="{
83
- 'top-8px': variant === 'minimal',
84
+ 'pb-12px': variant === 'default',
85
+ 'py-8px': variant === 'minimal',
84
86
  }"
85
87
  >
86
88
  <div
@@ -108,12 +110,6 @@ const fileReaderKey = computed(() => {
108
110
  { label: labels.processed, value: 'processed' },
109
111
  ]"
110
112
  />
111
- <div
112
- v-if="variant === 'minimal'"
113
- aria-hidden
114
- absolute top--12px w-full h-40px z--1
115
- class="bg-gradient-to-b from-neutral-50/90 via-neutral-50/60 to-transparent"
116
- />
117
113
  </div>
118
114
 
119
115
  <div w-full flex flex-col flex-1 min-h-0>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/tela-build",
3
- "version": "1.87.1",
3
+ "version": "1.87.3",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "app.config.ts",