@meistrari/tela-build 1.30.0 → 1.30.2

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.
@@ -31,11 +31,13 @@ const props = withDefaults(defineProps<{
31
31
  isCloseIconAbsolute?: boolean
32
32
  smallTitle?: boolean
33
33
  titleClass?: string
34
+ hideEnterAnimation?: boolean
34
35
  }>(), {
35
36
  modalWidth: 'md',
36
37
  isCloseIcon: true,
37
38
  isCloseIconAbsolute: false,
38
39
  smallTitle: false,
40
+ hideEnterAnimation: false,
39
41
  })
40
42
  const emit = defineEmits<{
41
43
  close: []
@@ -85,6 +87,7 @@ function handlePointerDownOutside(event: any) {
85
87
  <DialogPortal>
86
88
  <DialogOverlay :class="`DialogOverlay ${overlayClass ?? ''}`" bg="#000/35" z-600 overflow-y-auto flex items-center justify-center :p-16px="!fullscreen">
87
89
  <DialogContent
90
+ :data-animation="hideEnterAnimation"
88
91
  :class="cn('DialogContent shadow-xl', modalMaxWidth, dialogContentClass)"
89
92
  z-101
90
93
  rounded-16px
@@ -199,12 +202,12 @@ function handlePointerDownOutside(event: any) {
199
202
  width: 400px;
200
203
  padding: 24px;
201
204
 
202
- &[data-state="open"] {
205
+ [data-animation="false"]&[data-state="open"] {
203
206
  animation: contentShow 0.12s ease-out forwards;
204
207
  overflow: visible;
205
208
  }
206
209
 
207
- &[data-state="closed"] {
210
+ [data-animation="false"]&[data-state="closed"] {
208
211
  animation: contentHide 0.12s ease-out forwards;
209
212
  animation-delay: 0s;
210
213
  }
@@ -930,8 +930,8 @@ watch([() => props.highlightText, () => props.highlightPage, () => props.highlig
930
930
  v-for="pageNum in 2" :key="pageNum"
931
931
  relative bg-white rounded-12px overflow-hidden mx-auto
932
932
  :class="cn({
933
- 'w-446px min-h-631px': variant === 'default',
934
- 'w-256px min-h-363px': variant === 'minimal',
933
+ 'w-full max-w-446px min-h-631px': variant === 'default',
934
+ 'w-full max-w-256px min-h-363px': variant === 'minimal',
935
935
  })"
936
936
  >
937
937
  <!-- Page badge -->
@@ -970,7 +970,7 @@ watch([() => props.highlightText, () => props.highlightPage, () => props.highlig
970
970
  <div
971
971
  v-else
972
972
  :class="cn({
973
- 'px-46px': variant === 'default',
973
+ 'px-36px': variant === 'default',
974
974
  'px-32px': variant === 'minimal',
975
975
  })"
976
976
  >
@@ -978,8 +978,8 @@ watch([() => props.highlightText, () => props.highlightPage, () => props.highlig
978
978
  bg-white rounded-12px
979
979
  flex="~ col" justify-between mx-auto relative
980
980
  :class="cn({
981
- 'w-446px min-h-631px px-32px py-28px': variant === 'default',
982
- 'w-256px min-h-363px px-16px py-14px': variant === 'minimal',
981
+ 'w-full max-w-446px min-h-631px px-32px py-28px': variant === 'default',
982
+ 'w-full max-w-256px min-h-363px px-16px py-14px': variant === 'minimal',
983
983
  })"
984
984
  >
985
985
  <div flex="~ col" gap-16px>
@@ -1041,7 +1041,7 @@ watch([() => props.highlightText, () => props.highlightPage, () => props.highlig
1041
1041
  data-markdown
1042
1042
  :data-variant="variant"
1043
1043
  :class="cn({
1044
- 'px-46px': variant === 'default',
1044
+ 'px-36px': variant === 'default',
1045
1045
  'px-32px': variant === 'minimal',
1046
1046
  'pt-88px': variant === 'default' && props.segmentTab && props.file.fileType === 'application/pdf',
1047
1047
  'pt-42px': variant === 'minimal' && props.segmentTab && props.file.fileType === 'application/pdf',
@@ -1058,8 +1058,8 @@ watch([() => props.highlightText, () => props.highlightPage, () => props.highlig
1058
1058
  <div
1059
1059
  bg-white rounded-12px
1060
1060
  :class="cn({
1061
- 'w-446px min-h-631px px-32px py-28px': variant === 'default',
1062
- 'w-256px min-h-363px px-16px py-14px': variant === 'minimal',
1061
+ 'w-full max-w-446px min-h-631px px-32px py-28px': variant === 'default',
1062
+ 'w-full max-w-256px min-h-363px px-16px py-14px': variant === 'minimal',
1063
1063
  'h-full overflow-y-auto no-scrollbar': variant === 'default' && props.segmentTab !== 'processed',
1064
1064
  })"
1065
1065
  mx-auto relative
@@ -1172,7 +1172,7 @@ watch([() => props.highlightText, () => props.highlightPage, () => props.highlig
1172
1172
  data-pdf-page-card
1173
1173
  :data-page-num="pageNum"
1174
1174
  relative bg-white rounded-12px overflow-hidden mx-auto
1175
- :class="cn(variant === 'minimal' && 'w-256px pdf-page-card--minimal')"
1175
+ :class="cn(variant === 'minimal' && 'w-full max-w-256px pdf-page-card--minimal')"
1176
1176
  :style="getPagePlaceholderStyle(pageNum)"
1177
1177
  >
1178
1178
  <canvas />
@@ -1229,7 +1229,7 @@ watch([() => props.highlightText, () => props.highlightPage, () => props.highlig
1229
1229
  <template v-else>
1230
1230
  <div
1231
1231
  :class="cn({
1232
- 'px-46px w-446px': variant === 'default',
1232
+ 'px-36px w-446px': variant === 'default',
1233
1233
  'w-256px': variant === 'minimal',
1234
1234
  })"
1235
1235
  flex items-center justify-center mx-auto
@@ -80,10 +80,6 @@ function handleDeleteSearchValue() {
80
80
  search.value = ''
81
81
  }
82
82
 
83
- const totalOptions = computed(() => {
84
- return groupedOptions.value.map(group => group.children.length).reduce((a, b) => a + b, 0)
85
- })
86
-
87
83
  const firstColumnWidth = computed(() => {
88
84
  const allVariableNames = [...new Set(props.options.map(opt => opt.variable))]
89
85
  const allTexts = [
@@ -155,7 +151,7 @@ function iconSrc(option: PreviewVariableOption): string {
155
151
  <TelaComboboxTrigger
156
152
  as="button"
157
153
  tabindex="0"
158
- class="w-full bg border-0.5px border-strong rounded-10px px-12px py-7px flex items-center justify-between"
154
+ class="w-full bg border-0.5px border-strong rounded-10px px-12px py-7px flex items-center justify-between gap-10px"
159
155
  >
160
156
  <div class="grid items-center gap-22px w-full min-w-0 grid-cols-[var(--first-col-width,minmax(82px,auto))_1fr]">
161
157
  <p body-14-semibold text-start text-primary min-w-0>
@@ -163,8 +159,9 @@ function iconSrc(option: PreviewVariableOption): string {
163
159
  </p>
164
160
  <div v-if="selectedOption?.file" flex items-center gap-6px min-w-0>
165
161
  <img :src="iconSrc(selectedOption)" class="h-16px! w-16px!" alt="">
166
- <p truncate body-14-medium text-primary flex-shrink-0>
167
- {{ selectedOption.file }}
162
+ <p flex min-w-0 body-14-medium text-primary>
163
+ <span truncate>{{ selectedOption.file.includes('.') ? `${selectedOption.file.replace(/\.[^.]+$/, '')}.` : selectedOption.file }}</span>
164
+ <span flex-shrink-0>{{ selectedOption.file.includes('.') ? (selectedOption.file.match(/[^.]+$/)?.[0] ?? '') : '' }}</span>
168
165
  </p>
169
166
  </div>
170
167
  </div>
@@ -178,7 +175,7 @@ function iconSrc(option: PreviewVariableOption): string {
178
175
  </div>
179
176
  </TelaComboboxTrigger>
180
177
  </TelaComboboxAnchor>
181
- <TelaComboboxList :class="cn('z-999 w-full', popoverClass)" :disable-portal="true" align="center">
178
+ <TelaComboboxList :class="cn('z-999 w-full max-w-[var(--reka-combobox-trigger-width)]', popoverClass)" :disable-portal="true" align="center">
182
179
  <div class="relative">
183
180
  <div class="absolute inset-y-0 flex items-center justify-center px-2.5">
184
181
  <TelaIcon name="i-ph-magnifying-glass-bold" size="13px" color="neutral-300" />
@@ -229,14 +226,6 @@ function iconSrc(option: PreviewVariableOption): string {
229
226
  {{ labels.clear }}
230
227
  </TelaButton>
231
228
  </TelaComboboxEmpty>
232
- <div v-if="totalOptions > 0" class="grid items-center gap-22px h-28px px-12px border-b-0.5px border grid-cols-[var(--first-col-width,minmax(82px,auto))_1fr]">
233
- <span body-12-medium text-secondary lowercase min-w-0>
234
- {{ labels.variablesLabel }}
235
- </span>
236
- <span body-12-medium text-secondary lowercase min-w-0>
237
- {{ totalOptions }} {{ labels.filesLabel }}
238
- </span>
239
- </div>
240
229
  <div class="divide-y-0.5px divide-border">
241
230
  <div v-for="group in groupedOptions" :key="group.heading" mx-12px>
242
231
  <TelaComboboxGroup
@@ -247,14 +236,17 @@ function iconSrc(option: PreviewVariableOption): string {
247
236
  v-for="(item, index) in group.children"
248
237
  :key="item.value"
249
238
  :value="item.value"
250
- class="grid items-center gap-22px grid-cols-[var(--first-col-width,minmax(82px,auto))_1fr] h-32px w-full"
239
+ class="grid items-center gap-22px grid-cols-[var(--first-col-width,minmax(82px,auto))_minmax(0,1fr)] h-32px w-full"
251
240
  >
252
241
  <span v-if="index === 0" body-14-semibold text-primary min-w-0>{{ group.heading }}</span>
253
242
  <span v-else />
254
- <div flex items-center justify-between w-full min-w-0>
255
- <div v-if="item.file" flex items-center gap-6px min-w-0>
243
+ <div flex items-center justify-between w-full min-w-0 overflow-hidden>
244
+ <div v-if="item.file" flex items-center gap-6px min-w-0 overflow-hidden pr-12px>
256
245
  <img :src="iconSrc(item)" class="h-16px! w-16px!" alt="">
257
- <span body-14-medium text-primary truncate>{{ item.file }}</span>
246
+ <p flex min-w-0 body-14-medium text-primary>
247
+ <span truncate>{{ item.file.includes('.') ? `${item.file.replace(/\.[^.]+$/, '')}.` : item.file }}</span>
248
+ <span flex-shrink-0>{{ item.file.includes('.') ? (item.file.match(/[^.]+$/)?.[0] ?? '') : '' }}</span>
249
+ </p>
258
250
  </div>
259
251
  <div v-if="props.modelValue === item.value" class="flex gap-2 items-center">
260
252
  <TelaComboboxItemIndicator>
@@ -0,0 +1,33 @@
1
+ import { mkdtempSync, readFileSync, rmSync } from 'node:fs'
2
+ import { tmpdir } from 'node:os'
3
+ import { join } from 'pathe'
4
+ import matter from 'gray-matter'
5
+ import { afterEach, describe, expect, it } from 'vitest'
6
+ import { generateDocsToDirectory } from '../doc-generator'
7
+ import { TypeResolver } from '../type-resolver'
8
+
9
+ const tempDirs: string[] = []
10
+
11
+ afterEach(() => {
12
+ for (const dir of tempDirs.splice(0)) {
13
+ rmSync(dir, { recursive: true, force: true })
14
+ }
15
+ })
16
+
17
+ describe('generateDocsToDirectory', () => {
18
+ it('writes parseable YAML frontmatter for the tela-build skill', () => {
19
+ const outDir = mkdtempSync(join(tmpdir(), 'tela-build-docs-'))
20
+ tempDirs.push(outDir)
21
+
22
+ generateDocsToDirectory([], new TypeResolver(outDir), outDir)
23
+
24
+ const skillMd = readFileSync(join(outDir, 'tela-build', 'SKILL.md'), 'utf-8')
25
+ const parsed = matter(skillMd)
26
+
27
+ expect(parsed.data).toMatchObject({
28
+ name: 'tela-build',
29
+ description: expect.stringContaining('repository: ask for component props'),
30
+ })
31
+ expect(skillMd).toContain('description: "')
32
+ })
33
+ })
@@ -691,7 +691,7 @@ function wrapWithSkillFrontmatter(meta: { name: string, description: string, all
691
691
  const lines: string[] = []
692
692
  lines.push('---')
693
693
  lines.push(`name: ${sanitizeSkillName(name)}`)
694
- lines.push(`description: ${sanitizeDescription(description)}`)
694
+ lines.push(`description: ${serializeYamlString(sanitizeDescription(description))}`)
695
695
  if (allowedTools && allowedTools.length > 0) {
696
696
  lines.push(`allowed-tools: ${allowedTools.join(', ')}`)
697
697
  }
@@ -703,6 +703,10 @@ function wrapWithSkillFrontmatter(meta: { name: string, description: string, all
703
703
  return lines.join('\n')
704
704
  }
705
705
 
706
+ function serializeYamlString(value: string): string {
707
+ return JSON.stringify(value)
708
+ }
709
+
706
710
  function sanitizeSkillName(name: string): string {
707
711
  // Lowercase + hyphens + digits only, max 64 chars
708
712
  return name.toLowerCase().replace(/[^a-z0-9-]/g, '-').slice(0, 64).replace(/-{2,}/g, '-')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/tela-build",
3
- "version": "1.30.0",
3
+ "version": "1.30.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "app.config.ts",