@meistrari/tela-build 1.70.3 → 1.70.5

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.
@@ -19,7 +19,7 @@ const sizeStyles = computed(() => (({
19
19
  md: { padding: 'p-32px' },
20
20
  }) as Record<string, { padding: string }>)[props.size ?? 'sm'] ?? { padding: '' })
21
21
 
22
- const paddingClass = computed(() => props.contentPadding ?? sizeStyles.value.padding)
22
+ const paddingClass = computed(() => (props.contentPadding === false ? undefined : props.contentPadding) ?? sizeStyles.value.padding)
23
23
  const rootEl = ref<HTMLElement | null>(null)
24
24
 
25
25
  defineExpose({
@@ -30,7 +30,7 @@ const hasMention = computed(() => props.commands.includes('@'))
30
30
  <template>
31
31
  <div>
32
32
  <TelaChatCommandMention
33
- v-if="hasMention"
33
+ v-if="hasMention && mentionProps"
34
34
  v-bind="mentionProps"
35
35
  >
36
36
  <template #trigger>
@@ -9,6 +9,10 @@ interface PopoverListNestedProps<T> {
9
9
 
10
10
  const props = defineProps<PopoverListNestedProps<T>>()
11
11
 
12
+ defineSlots<{
13
+ item: (props: { item: T, index: number, depth: number | undefined }) => unknown
14
+ }>()
15
+
12
16
  function getNestedItemName(item: T): string {
13
17
  if (typeof item === 'object' && item !== null) {
14
18
  const obj = item as any
@@ -94,7 +98,7 @@ const textStyle = computed(() => props.depth
94
98
  :has-children-fn="hasChildrenFn"
95
99
  :get-children-fn="getChildrenFn"
96
100
  >
97
- <template #item="slotProps: any">
101
+ <template #item="slotProps">
98
102
  <slot name="item" v-bind="slotProps" />
99
103
  </template>
100
104
  </PopoverListNested>
@@ -0,0 +1,15 @@
1
+ import { describe, expect, it, vi } from 'vitest'
2
+
3
+ vi.mock('../../../lib/doc-generator', () => {
4
+ throw new Error('Documentation compiler loaded during ordinary module initialization')
5
+ })
6
+ vi.mock('../../../lib/extractors/volar-extract', () => {
7
+ throw new Error('Volar loaded during ordinary module initialization')
8
+ })
9
+
10
+ describe('documentation startup cost', () => {
11
+ it('can import the Nuxt module without loading either documentation compiler', async () => {
12
+ const module = await import('../index')
13
+ expect(module.default).toBeTypeOf('function')
14
+ })
15
+ })
@@ -2,8 +2,6 @@
2
2
  import { existsSync, writeFileSync, mkdirSync, lstatSync, readFileSync, symlinkSync, readlinkSync, unlinkSync } from 'node:fs'
3
3
  import { defineNuxtModule, createResolver } from 'nuxt/kit'
4
4
  import { dirname, resolve } from 'pathe'
5
- import { collectComponentDocs, generateMarkdown, generateDocsToDirectory } from '../../lib/doc-generator'
6
- import { ensureOverlayTsconfig } from '../../lib/extractors/volar-extract'
7
5
 
8
6
  export interface TelaBuildDocsOptions {
9
7
  layer?: string
@@ -23,7 +21,7 @@ export default defineNuxtModule<TelaBuildDocsOptions>({
23
21
  outDir: undefined,
24
22
  // Keep outFile for backward compatibility (used only if explicitly set)
25
23
  outFile: undefined,
26
- enabled: true,
24
+ enabled: false,
27
25
  },
28
26
  async setup(options, nuxt) {
29
27
  if (!options.enabled) {
@@ -64,6 +62,9 @@ export default defineNuxtModule<TelaBuildDocsOptions>({
64
62
  logger.log(`${colors.gray}[tela/build] ${colors.cyan}◎${colors.gray} Scanning components from ${layerPath}${colors.reset}`)
65
63
 
66
64
  try {
65
+ // Keep TypeScript/Volar out of ordinary Nuxt startup and builds.
66
+ const { collectComponentDocs, generateMarkdown, generateDocsToDirectory } = await import('../../lib/doc-generator')
67
+ const { ensureOverlayTsconfig } = await import('../../lib/extractors/volar-extract')
67
68
  const repositoryRoot = resolveRepositoryRoot(nuxt.options.rootDir, nuxt.options.workspaceDir)
68
69
  try {
69
70
  if (!options.outDir) {
@@ -129,9 +130,7 @@ export default defineNuxtModule<TelaBuildDocsOptions>({
129
130
  }
130
131
  else {
131
132
  // Generate before production build
132
- nuxt.hook('nitro:build:before', async () => {
133
- await generateDocs()
134
- })
133
+ nuxt.hook('build:before', generateDocs)
135
134
  }
136
135
  },
137
136
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/tela-build",
3
- "version": "1.70.3",
3
+ "version": "1.70.5",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "app.config.ts",
@@ -53,7 +53,7 @@
53
53
  "mdast-util-mdx": "3.0.0",
54
54
  "motion": "10.16.4",
55
55
  "motion-v": "2.3.0",
56
- "nitropack": "2.9.7",
56
+ "nitropack": "2.13.4",
57
57
  "number-flow": "0.4.1",
58
58
  "nuxt-svgo": "4.2.6",
59
59
  "pathe": "1.1.2",
@@ -76,7 +76,6 @@
76
76
  "vue-component-meta": "3.0.8",
77
77
  "vue-docgen-api": "4.78.0",
78
78
  "vue-input-otp": "0.3.2",
79
- "vue-router": "4.5.0",
80
79
  "y-protocols": "^1.0.6",
81
80
  "y-websocket": "^2.0.4",
82
81
  "yjs": "13.6.24"
@@ -86,11 +85,16 @@
86
85
  "vue": "^3.5.13"
87
86
  },
88
87
  "devDependencies": {
89
- "@nuxt/kit": "3.17.7",
90
- "@types/node": "18.19.79",
88
+ "@nuxt/kit": "4.5.2",
89
+ "@types/node": "22.19.0",
91
90
  "fs-extra": "11.2.0",
92
91
  "gray-matter": "4.0.3",
93
- "nuxt": "3.17.7",
94
- "vue": "3.5.17"
92
+ "nuxt": "4.5.2",
93
+ "vue": "3.5.42",
94
+ "vitest": "4.1.11",
95
+ "vue-tsc": "3.3.11",
96
+ "@vitejs/plugin-vue": "6.0.8",
97
+ "happy-dom": "20.14.0",
98
+ "vite": "8.2.2"
95
99
  }
96
100
  }