vize 0.345.0 → 0.350.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.
@@ -220,4 +220,4 @@ function normalizeGlobalTypes(config) {
220
220
  //#endregion
221
221
  export { loadConfig as a, defineConfig as i, VIZE_CONFIG_JSON_SCHEMA_PATH as n, normalizeGlobalTypes as o, VIZE_CONFIG_PKL_SCHEMA_PATH as r, resolveConfigExport as s, CONFIG_FILE_NAMES as t };
222
222
 
223
- //# sourceMappingURL=config-CqEev07u.mjs.map
223
+ //# sourceMappingURL=config-CuGxe7fm.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"config-CqEev07u.mjs","names":["PACKAGE_ROOT","path","getErrorMessage","fs","path","fs"],"sources":["../src/config/pkl.js","../src/config.ts"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { execFileSync } from \"node:child_process\";\nimport { randomUUID } from \"node:crypto\";\nimport { fileURLToPath, pathToFileURL } from \"node:url\";\n\nconst PACKAGE_ROOT = path.resolve(fileURLToPath(new URL(\".\", import.meta.url)), \"../..\");\n\nconst DOCUMENTED_PKL_SCHEMA_IMPORT_RE =\n /^(\\s*(?:amends|import)\\s+)([\"'])node_modules\\/vize\\/pkl\\/(VizeConfig\\.pkl|vize\\.pkl)\\2/gm;\n\n/**\n * Evaluate a `vize.config.pkl` file and return its JSON representation.\n *\n * The npm-facing loader keeps PKL execution in Node because it needs package\n * resolution for `@pkl-community/pkl`, but all structural config normalization\n * happens in Rust after this function returns. A missing PKL runtime returns\n * `null` so config discovery can fall through to lower-priority formats; an\n * evaluation failure throws because a present PKL config should not silently be\n * ignored.\n */\nexport function loadPklConfigJson(filePath) {\n const pklBin = findPklBinary();\n if (!pklBin) {\n console.warn(\n \"[vize] pkl CLI not found. Install @pkl-community/pkl or add pkl to PATH. \" +\n \"Falling back to the next config format.\",\n );\n return null;\n }\n\n const patchedFilePath = createPklConfigWithBundledSchemaImports(filePath);\n const evalFilePath = patchedFilePath ?? filePath;\n try {\n return execFileSync(pklBin, [\"eval\", \"-f\", \"json\", evalFilePath], {\n cwd: path.dirname(filePath),\n encoding: \"utf-8\",\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n timeout: 30_000,\n });\n } catch (error) {\n throw new Error(`Failed to evaluate vize PKL config at ${filePath}: ${getErrorMessage(error)}`);\n } finally {\n if (patchedFilePath) {\n fs.rmSync(patchedFilePath, { force: true });\n }\n }\n}\n\nfunction findPklBinary() {\n try {\n const pklPkgPath = import.meta.resolve?.(\"@pkl-community/pkl\");\n if (pklPkgPath) {\n const pklLibDir = path.dirname(fileURLToPath(pklPkgPath));\n const pklPackageDir = path.dirname(pklLibDir);\n const candidates = [\n path.join(pklLibDir, \"main.js\"),\n path.join(pklPackageDir, \"pkl\"),\n path.join(pklPackageDir, \"pkl.exe\"),\n ];\n\n for (const candidate of candidates) {\n if (fs.existsSync(candidate)) {\n try {\n execFileSync(candidate, [\"--version\"], { stdio: \"ignore\" });\n return candidate;\n } catch {\n // Keep looking: the shim can exist when its runtime is unavailable.\n }\n }\n }\n }\n } catch {\n // Fall back to PATH below.\n }\n\n try {\n execFileSync(\"pkl\", [\"--version\"], { stdio: \"ignore\" });\n return \"pkl\";\n } catch {\n return null;\n }\n}\n\nfunction createPklConfigWithBundledSchemaImports(filePath) {\n const configDir = path.dirname(filePath);\n const source = fs.readFileSync(filePath, \"utf-8\");\n let patched = false;\n\n const content = source.replace(\n DOCUMENTED_PKL_SCHEMA_IMPORT_RE,\n (match, prefix, quote, schemaFile) => {\n const projectSchemaPath = path.join(configDir, \"node_modules\", \"vize\", \"pkl\", schemaFile);\n if (fs.existsSync(projectSchemaPath)) {\n return match;\n }\n\n const bundledSchemaPath = path.join(PACKAGE_ROOT, \"pkl\", schemaFile);\n if (!fs.existsSync(bundledSchemaPath)) {\n return match;\n }\n\n patched = true;\n return `${prefix}${quote}${pathToFileURL(bundledSchemaPath).href}${quote}`;\n },\n );\n\n if (!patched) {\n return null;\n }\n\n const tempFile = path.join(\n configDir,\n `.vize-config-${process.pid}-${Date.now()}-${randomUUID()}.pkl`,\n );\n fs.writeFileSync(tempFile, content, { flag: \"wx\", mode: 0o600 });\n return tempFile;\n}\n\nfunction getErrorMessage(error) {\n if (error instanceof Error) {\n return error.message;\n }\n\n return String(error);\n}\n","import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { randomUUID } from \"node:crypto\";\nimport { createRequire } from \"node:module\";\nimport { fileURLToPath, pathToFileURL } from \"node:url\";\nimport { transform } from \"oxc-transform\";\nimport type {\n ResolvedVizeConfig,\n LoadConfigOptions,\n UserConfigExport,\n ConfigEnv,\n GlobalTypesConfig,\n GlobalTypeDeclaration,\n} from \"./types/index.js\";\nimport { loadPklConfigJson } from \"./config/pkl.js\";\n\ntype NativeConfigHelpers = {\n normalizeVizeConfig(value: unknown): unknown;\n};\n\nconst require = createRequire(import.meta.url);\nconst native = require(\"@vizejs/native\") as NativeConfigHelpers;\n\nexport const CONFIG_FILE_NAMES = [\n \"vize.config.pkl\",\n \"vize.config.ts\",\n \"vize.config.js\",\n \"vize.config.mjs\",\n \"vize.config.json\",\n] as const;\n\nconst DEFAULT_CONFIG_ENV: ConfigEnv = {\n mode: \"development\",\n command: \"serve\",\n};\n\nconst PACKAGE_ROOT = path.resolve(fileURLToPath(new URL(\".\", import.meta.url)), \"..\");\n\nexport const VIZE_CONFIG_JSON_SCHEMA_PATH = path.join(\n PACKAGE_ROOT,\n \"schemas\",\n \"vize.config.schema.json\",\n);\n\nexport const VIZE_CONFIG_PKL_SCHEMA_PATH = path.join(PACKAGE_ROOT, \"pkl\", \"vize.pkl\");\n\n/**\n * Define a Vize configuration with type checking.\n * Accepts a plain object or a function that receives ConfigEnv.\n */\nexport function defineConfig(config: UserConfigExport): UserConfigExport {\n return config;\n}\n\n/**\n * Load `vize.config.*` from the specified directory.\n */\nexport async function loadConfig(\n root: string,\n options: LoadConfigOptions = {},\n): Promise<ResolvedVizeConfig | null> {\n const { mode = \"root\", configFile, env } = options;\n\n if (mode === \"none\") {\n return null;\n }\n\n if (configFile) {\n const absolutePath = path.isAbsolute(configFile) ? configFile : path.resolve(root, configFile);\n if (fs.existsSync(absolutePath)) {\n return loadConfigFile(absolutePath, env);\n }\n return null;\n }\n\n if (mode === \"auto\") {\n return loadConfigFromDirAuto(root, env);\n }\n\n return loadConfigFromDir(root, env);\n}\n\nasync function loadConfigFromDir(dir: string, env?: ConfigEnv): Promise<ResolvedVizeConfig | null> {\n for (const name of CONFIG_FILE_NAMES) {\n const filePath = path.join(dir, name);\n if (!fs.existsSync(filePath)) {\n continue;\n }\n\n const config = await loadConfigFile(filePath, env);\n if (config !== null) {\n return config;\n }\n }\n return null;\n}\n\nasync function loadConfigFromDirAuto(\n startDir: string,\n env?: ConfigEnv,\n): Promise<ResolvedVizeConfig | null> {\n let currentDir = path.resolve(startDir);\n\n while (true) {\n const config = await loadConfigFromDir(currentDir, env);\n if (config !== null) {\n return config;\n }\n\n const parentDir = path.dirname(currentDir);\n if (parentDir === currentDir) {\n return null;\n }\n\n currentDir = parentDir;\n }\n}\n\nasync function loadConfigFile(\n filePath: string,\n env?: ConfigEnv,\n): Promise<ResolvedVizeConfig | null> {\n const absolutePath = path.resolve(filePath);\n if (!fs.existsSync(absolutePath)) {\n return null;\n }\n\n const ext = path.extname(absolutePath);\n\n if (ext === \".pkl\") {\n return loadPklConfig(absolutePath);\n }\n\n if (ext === \".json\") {\n const content = fs.readFileSync(absolutePath, \"utf-8\");\n return parseJsonConfig(content, absolutePath);\n }\n\n if (ext === \".ts\") {\n return loadTypeScriptConfig(absolutePath, env);\n }\n\n return loadESMConfig(absolutePath, env);\n}\n\nfunction loadPklConfig(filePath: string): ResolvedVizeConfig | null {\n const output = loadPklConfigJson(filePath);\n return output === null ? null : parseJsonConfig(output, filePath);\n}\n\nexport async function resolveConfigExport(\n exported: UserConfigExport,\n env?: ConfigEnv,\n): Promise<ResolvedVizeConfig> {\n if (typeof exported === \"function\") {\n return normalizeLoadedConfig(await exported(env ?? DEFAULT_CONFIG_ENV));\n }\n\n return normalizeLoadedConfig(exported);\n}\n\nasync function loadTypeScriptConfig(\n filePath: string,\n env?: ConfigEnv,\n): Promise<ResolvedVizeConfig> {\n const source = fs.readFileSync(filePath, \"utf-8\");\n const result = await transform(filePath, source, {\n typescript: {\n onlyRemoveTypeImports: true,\n },\n });\n\n const tempFile = path.join(\n path.dirname(filePath),\n `.vize-config-${process.pid}-${Date.now()}-${randomUUID()}.mjs`,\n );\n fs.writeFileSync(tempFile, result.code, { flag: \"wx\", mode: 0o600 });\n\n try {\n const module = await importFresh(tempFile);\n const exported: UserConfigExport = module.default || module;\n return resolveConfigExport(exported, env);\n } finally {\n fs.rmSync(tempFile, { force: true });\n }\n}\n\nasync function loadESMConfig(filePath: string, env?: ConfigEnv): Promise<ResolvedVizeConfig> {\n const module = await importFresh(filePath);\n const exported: UserConfigExport = module.default || module;\n return resolveConfigExport(exported, env);\n}\n\nasync function importFresh(filePath: string): Promise<Record<string, unknown>> {\n const fileUrl = pathToFileURL(filePath);\n fileUrl.searchParams.set(\"t\", String(fs.statSync(filePath).mtimeMs));\n return import(fileUrl.href);\n}\n\nfunction parseJsonConfig(content: string, filePath: string): ResolvedVizeConfig {\n try {\n return normalizeLoadedConfig(JSON.parse(content));\n } catch (error) {\n throw new Error(`Failed to parse vize config JSON at ${filePath}: ${getErrorMessage(error)}`);\n }\n}\n\nfunction normalizeLoadedConfig(config: unknown): ResolvedVizeConfig {\n return native.normalizeVizeConfig(config ?? null) as ResolvedVizeConfig;\n}\n\nfunction getErrorMessage(error: unknown): string {\n if (error instanceof Error) {\n return error.message;\n }\n\n return String(error);\n}\n\n/**\n * Normalize GlobalTypesConfig shorthand strings to GlobalTypeDeclaration objects\n */\nexport function normalizeGlobalTypes(\n config: GlobalTypesConfig,\n): Record<string, GlobalTypeDeclaration> {\n const resolvedConfig =\n \"types\" in config &&\n typeof config.types === \"object\" &&\n config.types !== null &&\n !Array.isArray(config.types)\n ? config.types\n : config;\n\n const result: Record<string, GlobalTypeDeclaration> = {};\n for (const [key, value] of Object.entries(resolvedConfig)) {\n if (typeof value === \"string\") {\n result[key] = { type: value };\n } else {\n result[key] = value;\n }\n }\n return result;\n}\n"],"mappings":";;;;;;;;AAMA,MAAMA,iBAAeC,OAAK,QAAQ,cAAc,IAAI,IAAI,KAAK,OAAO,KAAK,IAAI,CAAC,EAAE,QAAQ;AAExF,MAAM,kCACJ;;;;;;;;;;;AAYF,SAAgB,kBAAkB,UAAU;CAC1C,MAAM,SAAS,eAAe;CAC9B,IAAI,CAAC,QAAQ;EACX,QAAQ,KACN,mHAED;EACD,OAAO;;CAGT,MAAM,kBAAkB,wCAAwC,SAAS;CACzE,MAAM,eAAe,mBAAmB;CACxC,IAAI;EACF,OAAO,aAAa,QAAQ;GAAC;GAAQ;GAAM;GAAQ;GAAa,EAAE;GAChE,KAAKA,OAAK,QAAQ,SAAS;GAC3B,UAAU;GACV,OAAO;IAAC;IAAU;IAAQ;IAAO;GACjC,SAAS;GACV,CAAC;UACK,OAAO;EACd,MAAM,IAAI,MAAM,yCAAyC,SAAS,IAAIC,kBAAgB,MAAM,GAAG;WACvF;EACR,IAAI,iBACF,KAAG,OAAO,iBAAiB,EAAE,OAAO,MAAM,CAAC;;;AAKjD,SAAS,gBAAgB;CACvB,IAAI;EACF,MAAM,aAAa,OAAO,KAAK,UAAU,qBAAqB;EAC9D,IAAI,YAAY;GACd,MAAM,YAAYD,OAAK,QAAQ,cAAc,WAAW,CAAC;GACzD,MAAM,gBAAgBA,OAAK,QAAQ,UAAU;GAC7C,MAAM,aAAa;IACjBA,OAAK,KAAK,WAAW,UAAU;IAC/BA,OAAK,KAAK,eAAe,MAAM;IAC/BA,OAAK,KAAK,eAAe,UAAU;IACpC;GAED,KAAK,MAAM,aAAa,YACtB,IAAIE,KAAG,WAAW,UAAU,EAC1B,IAAI;IACF,aAAa,WAAW,CAAC,YAAY,EAAE,EAAE,OAA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CAAuC,SAAS,IAAI,gBAAgB,MAAM,GAAG;;;AAIjG,SAAS,sBAAsB,QAAqC;CAClE,OAAO,OAAO,oBAAoB,UAAU,KAAK;;AAGnD,SAAS,gBAAgB,OAAwB;CAC/C,IAAI,iBAAiB,OACnB,OAAO,MAAM;CAGf,OAAO,OAAO,MAAM;;;;;AAMtB,SAAgB,qBACd,QACuC;CACvC,MAAM,iBACJ,WAAW,UACX,OAAO,OAAO,UAAU,YACxB,OAAO,UAAU,QACjB,CAAC,MAAM,QAAQ,OAAO,MAAM,GACxB,OAAO,QACP;CAEN,MAAM,SAAgD,EAAE;CACxD,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,eAAe,EACvD,IAAI,OAAO,UAAU,UACnB,OAAO,OAAO,EAAE,MAAM,OAAO;MAE7B,OAAO,OAAO;CAGlB,OAAO"}
1
+ {"version":3,"file":"config-CuGxe7fm.mjs","names":["PACKAGE_ROOT","path","getErrorMessage","fs","path","fs"],"sources":["../src/config/pkl.js","../src/config.ts"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { execFileSync } from \"node:child_process\";\nimport { randomUUID } from \"node:crypto\";\nimport { fileURLToPath, pathToFileURL } from \"node:url\";\n\nconst PACKAGE_ROOT = path.resolve(fileURLToPath(new URL(\".\", import.meta.url)), \"../..\");\n\nconst DOCUMENTED_PKL_SCHEMA_IMPORT_RE =\n /^(\\s*(?:amends|import)\\s+)([\"'])node_modules\\/vize\\/pkl\\/(VizeConfig\\.pkl|vize\\.pkl)\\2/gm;\n\n/**\n * Evaluate a `vize.config.pkl` file and return its JSON representation.\n *\n * The npm-facing loader keeps PKL execution in Node because it needs package\n * resolution for `@pkl-community/pkl`, but all structural config normalization\n * happens in Rust after this function returns. A missing PKL runtime returns\n * `null` so config discovery can fall through to lower-priority formats; an\n * evaluation failure throws because a present PKL config should not silently be\n * ignored.\n */\nexport function loadPklConfigJson(filePath) {\n const pklBin = findPklBinary();\n if (!pklBin) {\n console.warn(\n \"[vize] pkl CLI not found. Install @pkl-community/pkl or add pkl to PATH. \" +\n \"Falling back to the next config format.\",\n );\n return null;\n }\n\n const patchedFilePath = createPklConfigWithBundledSchemaImports(filePath);\n const evalFilePath = patchedFilePath ?? filePath;\n try {\n return execFileSync(pklBin, [\"eval\", \"-f\", \"json\", evalFilePath], {\n cwd: path.dirname(filePath),\n encoding: \"utf-8\",\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n timeout: 30_000,\n });\n } catch (error) {\n throw new Error(`Failed to evaluate vize PKL config at ${filePath}: ${getErrorMessage(error)}`);\n } finally {\n if (patchedFilePath) {\n fs.rmSync(patchedFilePath, { force: true });\n }\n }\n}\n\nfunction findPklBinary() {\n try {\n const pklPkgPath = import.meta.resolve?.(\"@pkl-community/pkl\");\n if (pklPkgPath) {\n const pklLibDir = path.dirname(fileURLToPath(pklPkgPath));\n const pklPackageDir = path.dirname(pklLibDir);\n const candidates = [\n path.join(pklLibDir, \"main.js\"),\n path.join(pklPackageDir, \"pkl\"),\n path.join(pklPackageDir, \"pkl.exe\"),\n ];\n\n for (const candidate of candidates) {\n if (fs.existsSync(candidate)) {\n try {\n execFileSync(candidate, [\"--version\"], { stdio: \"ignore\" });\n return candidate;\n } catch {\n // Keep looking: the shim can exist when its runtime is unavailable.\n }\n }\n }\n }\n } catch {\n // Fall back to PATH below.\n }\n\n try {\n execFileSync(\"pkl\", [\"--version\"], { stdio: \"ignore\" });\n return \"pkl\";\n } catch {\n return null;\n }\n}\n\nfunction createPklConfigWithBundledSchemaImports(filePath) {\n const configDir = path.dirname(filePath);\n const source = fs.readFileSync(filePath, \"utf-8\");\n let patched = false;\n\n const content = source.replace(\n DOCUMENTED_PKL_SCHEMA_IMPORT_RE,\n (match, prefix, quote, schemaFile) => {\n const projectSchemaPath = path.join(configDir, \"node_modules\", \"vize\", \"pkl\", schemaFile);\n if (fs.existsSync(projectSchemaPath)) {\n return match;\n }\n\n const bundledSchemaPath = path.join(PACKAGE_ROOT, \"pkl\", schemaFile);\n if (!fs.existsSync(bundledSchemaPath)) {\n return match;\n }\n\n patched = true;\n return `${prefix}${quote}${pathToFileURL(bundledSchemaPath).href}${quote}`;\n },\n );\n\n if (!patched) {\n return null;\n }\n\n const tempFile = path.join(\n configDir,\n `.vize-config-${process.pid}-${Date.now()}-${randomUUID()}.pkl`,\n );\n fs.writeFileSync(tempFile, content, { flag: \"wx\", mode: 0o600 });\n return tempFile;\n}\n\nfunction getErrorMessage(error) {\n if (error instanceof Error) {\n return error.message;\n }\n\n return String(error);\n}\n","import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { randomUUID } from \"node:crypto\";\nimport { createRequire } from \"node:module\";\nimport { fileURLToPath, pathToFileURL } from \"node:url\";\nimport { transform } from \"oxc-transform\";\nimport type {\n ResolvedVizeConfig,\n LoadConfigOptions,\n UserConfigExport,\n ConfigEnv,\n GlobalTypesConfig,\n GlobalTypeDeclaration,\n} from \"./types/index.js\";\nimport { loadPklConfigJson } from \"./config/pkl.js\";\n\ntype NativeConfigHelpers = {\n normalizeVizeConfig(value: unknown): unknown;\n};\n\nconst require = createRequire(import.meta.url);\nconst native = require(\"@vizejs/native\") as NativeConfigHelpers;\n\nexport const CONFIG_FILE_NAMES = [\n \"vize.config.pkl\",\n \"vize.config.ts\",\n \"vize.config.js\",\n \"vize.config.mjs\",\n \"vize.config.json\",\n] as const;\n\nconst DEFAULT_CONFIG_ENV: ConfigEnv = {\n mode: \"development\",\n command: \"serve\",\n};\n\nconst PACKAGE_ROOT = path.resolve(fileURLToPath(new URL(\".\", import.meta.url)), \"..\");\n\nexport const VIZE_CONFIG_JSON_SCHEMA_PATH = path.join(\n PACKAGE_ROOT,\n \"schemas\",\n \"vize.config.schema.json\",\n);\n\nexport const VIZE_CONFIG_PKL_SCHEMA_PATH = path.join(PACKAGE_ROOT, \"pkl\", \"vize.pkl\");\n\n/**\n * Define a Vize configuration with type checking.\n * Accepts a plain object or a function that receives ConfigEnv.\n */\nexport function defineConfig(config: UserConfigExport): UserConfigExport {\n return config;\n}\n\n/**\n * Load `vize.config.*` from the specified directory.\n */\nexport async function loadConfig(\n root: string,\n options: LoadConfigOptions = {},\n): Promise<ResolvedVizeConfig | null> {\n const { mode = \"root\", configFile, env } = options;\n\n if (mode === \"none\") {\n return null;\n }\n\n if (configFile) {\n const absolutePath = path.isAbsolute(configFile) ? configFile : path.resolve(root, configFile);\n if (fs.existsSync(absolutePath)) {\n return loadConfigFile(absolutePath, env);\n }\n return null;\n }\n\n if (mode === \"auto\") {\n return loadConfigFromDirAuto(root, env);\n }\n\n return loadConfigFromDir(root, env);\n}\n\nasync function loadConfigFromDir(dir: string, env?: ConfigEnv): Promise<ResolvedVizeConfig | null> {\n for (const name of CONFIG_FILE_NAMES) {\n const filePath = path.join(dir, name);\n if (!fs.existsSync(filePath)) {\n continue;\n }\n\n const config = await loadConfigFile(filePath, env);\n if (config !== null) {\n return config;\n }\n }\n return null;\n}\n\nasync function loadConfigFromDirAuto(\n startDir: string,\n env?: ConfigEnv,\n): Promise<ResolvedVizeConfig | null> {\n let currentDir = path.resolve(startDir);\n\n while (true) {\n const config = await loadConfigFromDir(currentDir, env);\n if (config !== null) {\n return config;\n }\n\n const parentDir = path.dirname(currentDir);\n if (parentDir === currentDir) {\n return null;\n }\n\n currentDir = parentDir;\n }\n}\n\nasync function loadConfigFile(\n filePath: string,\n env?: ConfigEnv,\n): Promise<ResolvedVizeConfig | null> {\n const absolutePath = path.resolve(filePath);\n if (!fs.existsSync(absolutePath)) {\n return null;\n }\n\n const ext = path.extname(absolutePath);\n\n if (ext === \".pkl\") {\n return loadPklConfig(absolutePath);\n }\n\n if (ext === \".json\") {\n const content = fs.readFileSync(absolutePath, \"utf-8\");\n return parseJsonConfig(content, absolutePath);\n }\n\n if (ext === \".ts\") {\n return loadTypeScriptConfig(absolutePath, env);\n }\n\n return loadESMConfig(absolutePath, env);\n}\n\nfunction loadPklConfig(filePath: string): ResolvedVizeConfig | null {\n const output = loadPklConfigJson(filePath);\n return output === null ? null : parseJsonConfig(output, filePath);\n}\n\nexport async function resolveConfigExport(\n exported: UserConfigExport,\n env?: ConfigEnv,\n): Promise<ResolvedVizeConfig> {\n if (typeof exported === \"function\") {\n return normalizeLoadedConfig(await exported(env ?? DEFAULT_CONFIG_ENV));\n }\n\n return normalizeLoadedConfig(exported);\n}\n\nasync function loadTypeScriptConfig(\n filePath: string,\n env?: ConfigEnv,\n): Promise<ResolvedVizeConfig> {\n const source = fs.readFileSync(filePath, \"utf-8\");\n const result = await transform(filePath, source, {\n typescript: {\n onlyRemoveTypeImports: true,\n },\n });\n\n const tempFile = path.join(\n path.dirname(filePath),\n `.vize-config-${process.pid}-${Date.now()}-${randomUUID()}.mjs`,\n );\n fs.writeFileSync(tempFile, result.code, { flag: \"wx\", mode: 0o600 });\n\n try {\n const module = await importFresh(tempFile);\n const exported: UserConfigExport = module.default || module;\n return resolveConfigExport(exported, env);\n } finally {\n fs.rmSync(tempFile, { force: true });\n }\n}\n\nasync function loadESMConfig(filePath: string, env?: ConfigEnv): Promise<ResolvedVizeConfig> {\n const module = await importFresh(filePath);\n const exported: UserConfigExport = module.default || module;\n return resolveConfigExport(exported, env);\n}\n\nasync function importFresh(filePath: string): Promise<Record<string, unknown>> {\n const fileUrl = pathToFileURL(filePath);\n fileUrl.searchParams.set(\"t\", String(fs.statSync(filePath).mtimeMs));\n return import(fileUrl.href);\n}\n\nfunction parseJsonConfig(content: string, filePath: string): ResolvedVizeConfig {\n try {\n return normalizeLoadedConfig(JSON.parse(content));\n } catch (error) {\n throw new Error(`Failed to parse vize config JSON at ${filePath}: ${getErrorMessage(error)}`);\n }\n}\n\nfunction normalizeLoadedConfig(config: unknown): ResolvedVizeConfig {\n return native.normalizeVizeConfig(config ?? null) as ResolvedVizeConfig;\n}\n\nfunction getErrorMessage(error: unknown): string {\n if (error instanceof Error) {\n return error.message;\n }\n\n return String(error);\n}\n\n/**\n * Normalize GlobalTypesConfig shorthand strings to GlobalTypeDeclaration objects\n */\nexport function normalizeGlobalTypes(\n config: GlobalTypesConfig,\n): Record<string, GlobalTypeDeclaration> {\n const resolvedConfig =\n \"types\" in config &&\n typeof config.types === \"object\" &&\n config.types !== null &&\n !Array.isArray(config.types)\n ? config.types\n : config;\n\n const result: Record<string, GlobalTypeDeclaration> = {};\n for (const [key, value] of Object.entries(resolvedConfig)) {\n if (typeof value === \"string\") {\n result[key] = { type: value };\n } else {\n result[key] = value;\n }\n }\n return result;\n}\n"],"mappings":";;;;;;;;AAMA,MAAMA,iBAAeC,OAAK,QAAQ,cAAc,IAAI,IAAI,KAAK,OAAO,KAAK,GAAG,CAAC,GAAG,OAAO;AAEvF,MAAM,kCACJ;;;;;;;;;;;AAYF,SAAgB,kBAAkB,UAAU;CAC1C,MAAM,SAAS,cAAc;CAC7B,IAAI,CAAC,QAAQ;EACX,QAAQ,KACN,kHAEF;EACA,OAAO;CACT;CAEA,MAAM,kBAAkB,wCAAwC,QAAQ;CACxE,MAAM,eAAe,mBAAmB;CACxC,IAAI;EACF,OAAO,aAAa,QAAQ;GAAC;GAAQ;GAAM;GAAQ;EAAY,GAAG;GAChE,KAAKA,OAAK,QAAQ,QAAQ;GAC1B,UAAU;GACV,OAAO;IAAC;IAAU;IAAQ;GAAM;GAChC,SAAS;EACX,CAAC;CACH,SAAS,OAAO;EACd,MAAM,IAAI,MAAM,yCAAyC,SAAS,IAAIC,kBAAgB,KAAK,GAAG;CAChG,UAAU;EACR,IAAI,iBACF,KAAG,OAAO,iBAAiB,EAAE,OAAO,KAAK,CAAC;CAE9C;AACF;AAEA,SAAS,gBAAgB;CACvB,IAAI;EACF,MAAM,aAAa,OAAO,KAAK,UAAU,oBAAoB;EAC7D,IAAI,YAAY;GACd,MAAM,YAAYD,OAAK,QAAQ,cAAc,UAAU,CAAC;GACxD,MAAM,gBAAgBA,OAAK,QAAQ,SAAS;GAC5C,MAAM,aAAa;IACjBA,OAAK,KAAK,WAAW,SAAS;IAC9BA,OAAK,KAAK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eAAe,YAAY,UAAoD;CAC7E,MAAM,UAAU,cAAc,QAAQ;CACtC,QAAQ,aAAa,IAAI,KAAK,OAAOC,KAAG,SAAS,QAAQ,EAAE,OAAO,CAAC;CACnE,OAAO,OAAO,QAAQ;AACxB;AAEA,SAAS,gBAAgB,SAAiB,UAAsC;CAC9E,IAAI;EACF,OAAO,sBAAsB,KAAK,MAAM,OAAO,CAAC;CAClD,SAAS,OAAO;EACd,MAAM,IAAI,MAAM,uCAAuC,SAAS,IAAI,gBAAgB,KAAK,GAAG;CAC9F;AACF;AAEA,SAAS,sBAAsB,QAAqC;CAClE,OAAO,OAAO,oBAAoB,UAAU,IAAI;AAClD;AAEA,SAAS,gBAAgB,OAAwB;CAC/C,IAAI,iBAAiB,OACnB,OAAO,MAAM;CAGf,OAAO,OAAO,KAAK;AACrB;;;;AAKA,SAAgB,qBACd,QACuC;CACvC,MAAM,iBACJ,WAAW,UACX,OAAO,OAAO,UAAU,YACxB,OAAO,UAAU,QACjB,CAAC,MAAM,QAAQ,OAAO,KAAK,IACvB,OAAO,QACP;CAEN,MAAM,SAAgD,CAAC;CACvD,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,cAAc,GACtD,IAAI,OAAO,UAAU,UACnB,OAAO,OAAO,EAAE,MAAM,MAAM;MAE5B,OAAO,OAAO;CAGlB,OAAO;AACT"}
@@ -82,6 +82,10 @@ interface CompilerConfig {
82
82
  * Treat lowercase non-HTML tags as custom renderer elements
83
83
  */
84
84
  customRenderer?: boolean;
85
+ /**
86
+ * Tag patterns that compile as custom elements instead of Vue components
87
+ */
88
+ customElements?: string[];
85
89
  /**
86
90
  * Enable SSR mode
87
91
  */
@@ -417,6 +421,10 @@ interface LanguageServerConfig {
417
421
  * Enable completions
418
422
  */
419
423
  completion?: boolean;
424
+ /**
425
+ * Enable TypeScript signature help
426
+ */
427
+ signatureHelp?: boolean;
420
428
  /**
421
429
  * Enable hover information
422
430
  */
@@ -725,4 +733,4 @@ declare function resolveConfigExport(exported: UserConfigExport, env?: ConfigEnv
725
733
  declare function normalizeGlobalTypes(config: GlobalTypesConfig): Record<string, GlobalTypeDeclaration>;
726
734
  //#endregion
727
735
  export { MuseaConfig as A, GlobalTypeDeclaration as C, LinterConfig as D, LintPreset as E, VitePluginConfig as F, VizeConfig as I, VizeConfigEntry as L, RuleCategory as M, RuleSeverity as N, MuseaA11yConfig as O, TypeCheckerConfig as P, VueVersion as R, FormatterConfig as S, LanguageServerConfig as T, VueConfig as _, loadConfig as a, CompilerCompatibilityConfig as b, LspConfig as c, MaybePromise as d, ResolvedVizeConfig as f, UserConfigInput as g, UserConfigExport as h, defineConfig as i, MuseaVrtConfig as j, MuseaAutogenConfig as k, ConfigEnv as l, UserConfigEntry as m, VIZE_CONFIG_JSON_SCHEMA_PATH as n, normalizeGlobalTypes as o, UserConfig as p, VIZE_CONFIG_PKL_SCHEMA_PATH as r, resolveConfigExport as s, CONFIG_FILE_NAMES as t, LoadConfigOptions as u, LintRuleName as v, GlobalTypesConfig as w, CompilerConfig as x, LintRulesConfig as y };
728
- //# sourceMappingURL=config-D1VKwrsv.d.mts.map
736
+ //# sourceMappingURL=config-ihW9XDVK.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-ihW9XDVK.d.mts","names":[],"sources":["../src/types/generated.ts","../src/types/rules.ts","../src/types/runtime.ts","../src/types/index.ts","../src/config.ts"],"mappings":";;AAOA;;;;KAAY,UAAA;AAAA,KAQA,YAAA;AAAA,KAEA,YAAA;;;AAFY;KAOZ,UAAA;;;;UAKK,UAAA;EALL;;;EASV,IAAA;EAToB;AAKtB;;EAQE,QAAA;EAiBW;;;EAbX,KAAA;EAyBY;;;EArBZ,OAAA;EAyBc;;;EArBd,OAAA;EAhBA;;;EAoBA,OAAA;EACA,QAAA,GAAW,cAAA;EACX,aAAA;IAAA,CACG,CAAA;MAAA,CAGM,CAAA;IAAA;EAAA;EAIT,IAAA,GAAO,gBAAA;EACP,MAAA,GAAS,YAAA;E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gBAAA,GACR,eAAA,KACE,GAAA,EAAK,SAAA,KAAc,YAAA,CAAa,eAAA;AAAA,UAMrB,iBAAA;EFTf;;;;;;;EEiBA,IAAA;EFPc;;;EEYd,UAAA;EFViB;;;EEejB,GAAA,GAAM,SAAS;AAAA;;;;;;KCpDL,SAAA,GAAS,oBAAgD;;;cCLxD,iBAAA;AAAA,cAeA,4BAAA;AAAA,cAMA,2BAAA;;AJrCS;AAQtB;;iBImCgB,YAAA,CAAa,MAAA,EAAQ,gBAAA,GAAmB,gBAAgB;;AJnChD;AAExB;iBIwCsB,UAAA,CACpB,IAAA,UACA,OAAA,GAAS,iBAAA,GACR,OAAA,CAAQ,kBAAA;AAAA,iBA0FW,mBAAA,CACpB,QAAA,EAAU,gBAAA,EACV,GAAA,GAAM,SAAA,GACL,OAAA,CAAQ,kBAAA;;AJxIa;AAKxB;iBIwMgB,oBAAA,CACd,MAAA,EAAQ,iBAAA,GACP,MAAA,SAAe,qBAAA"}
package/dist/config.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as loadConfig, i as defineConfig, n as VIZE_CONFIG_JSON_SCHEMA_PATH, o as normalizeGlobalTypes, r as VIZE_CONFIG_PKL_SCHEMA_PATH, s as resolveConfigExport, t as CONFIG_FILE_NAMES } from "./config-D1VKwrsv.mjs";
1
+ import { a as loadConfig, i as defineConfig, n as VIZE_CONFIG_JSON_SCHEMA_PATH, o as normalizeGlobalTypes, r as VIZE_CONFIG_PKL_SCHEMA_PATH, s as resolveConfigExport, t as CONFIG_FILE_NAMES } from "./config-ihW9XDVK.mjs";
2
2
  export { CONFIG_FILE_NAMES, VIZE_CONFIG_JSON_SCHEMA_PATH, VIZE_CONFIG_PKL_SCHEMA_PATH, defineConfig, loadConfig, normalizeGlobalTypes, resolveConfigExport };
package/dist/config.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as loadConfig, i as defineConfig, n as VIZE_CONFIG_JSON_SCHEMA_PATH, o as normalizeGlobalTypes, r as VIZE_CONFIG_PKL_SCHEMA_PATH, s as resolveConfigExport, t as CONFIG_FILE_NAMES } from "./config-CqEev07u.mjs";
1
+ import { a as loadConfig, i as defineConfig, n as VIZE_CONFIG_JSON_SCHEMA_PATH, o as normalizeGlobalTypes, r as VIZE_CONFIG_PKL_SCHEMA_PATH, s as resolveConfigExport, t as CONFIG_FILE_NAMES } from "./config-CuGxe7fm.mjs";
2
2
  export { CONFIG_FILE_NAMES, VIZE_CONFIG_JSON_SCHEMA_PATH, VIZE_CONFIG_PKL_SCHEMA_PATH, defineConfig, loadConfig, normalizeGlobalTypes, resolveConfigExport };
package/dist/index.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { A as MuseaConfig, C as GlobalTypeDeclaration, D as LinterConfig, E as LintPreset, F as VitePluginConfig, I as VizeConfig, L as VizeConfigEntry, M as RuleCategory, N as RuleSeverity, O as MuseaA11yConfig, P as TypeCheckerConfig, R as VueVersion, S as FormatterConfig, T as LanguageServerConfig, _ as VueConfig, a as loadConfig, b as CompilerCompatibilityConfig, c as LspConfig, d as MaybePromise, f as ResolvedVizeConfig, g as UserConfigInput, h as UserConfigExport, i as defineConfig, j as MuseaVrtConfig, k as MuseaAutogenConfig, l as ConfigEnv, m as UserConfigEntry, n as VIZE_CONFIG_JSON_SCHEMA_PATH, o as normalizeGlobalTypes, p as UserConfig, r as VIZE_CONFIG_PKL_SCHEMA_PATH, s as resolveConfigExport, t as CONFIG_FILE_NAMES, u as LoadConfigOptions, v as LintRuleName, w as GlobalTypesConfig, x as CompilerConfig, y as LintRulesConfig } from "./config-D1VKwrsv.mjs";
1
+ import { A as MuseaConfig, C as GlobalTypeDeclaration, D as LinterConfig, E as LintPreset, F as VitePluginConfig, I as VizeConfig, L as VizeConfigEntry, M as RuleCategory, N as RuleSeverity, O as MuseaA11yConfig, P as TypeCheckerConfig, R as VueVersion, S as FormatterConfig, T as LanguageServerConfig, _ as VueConfig, a as loadConfig, b as CompilerCompatibilityConfig, c as LspConfig, d as MaybePromise, f as ResolvedVizeConfig, g as UserConfigInput, h as UserConfigExport, i as defineConfig, j as MuseaVrtConfig, k as MuseaAutogenConfig, l as ConfigEnv, m as UserConfigEntry, n as VIZE_CONFIG_JSON_SCHEMA_PATH, o as normalizeGlobalTypes, p as UserConfig, r as VIZE_CONFIG_PKL_SCHEMA_PATH, s as resolveConfigExport, t as CONFIG_FILE_NAMES, u as LoadConfigOptions, v as LintRuleName, w as GlobalTypesConfig, x as CompilerConfig, y as LintRulesConfig } from "./config-ihW9XDVK.mjs";
2
2
  export { CONFIG_FILE_NAMES, type CompilerCompatibilityConfig, type CompilerConfig, type ConfigEnv, type FormatterConfig, type GlobalTypeDeclaration, type GlobalTypesConfig, type LanguageServerConfig, type LintPreset, type LintRuleName, type LintRulesConfig, type LinterConfig, type LoadConfigOptions, type LspConfig, type MaybePromise, type MuseaA11yConfig, type MuseaAutogenConfig, type MuseaConfig, type MuseaVrtConfig, type ResolvedVizeConfig, type RuleCategory, type RuleSeverity, type TypeCheckerConfig, type UserConfig, type UserConfigEntry, type UserConfigExport, type UserConfigInput, VIZE_CONFIG_JSON_SCHEMA_PATH, VIZE_CONFIG_PKL_SCHEMA_PATH, type VitePluginConfig, type VizeConfig, type VizeConfigEntry, type VueConfig, type VueVersion, defineConfig, loadConfig, normalizeGlobalTypes, resolveConfigExport };
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as loadConfig, i as defineConfig, n as VIZE_CONFIG_JSON_SCHEMA_PATH, o as normalizeGlobalTypes, r as VIZE_CONFIG_PKL_SCHEMA_PATH, s as resolveConfigExport, t as CONFIG_FILE_NAMES } from "./config-CqEev07u.mjs";
1
+ import { a as loadConfig, i as defineConfig, n as VIZE_CONFIG_JSON_SCHEMA_PATH, o as normalizeGlobalTypes, r as VIZE_CONFIG_PKL_SCHEMA_PATH, s as resolveConfigExport, t as CONFIG_FILE_NAMES } from "./config-CuGxe7fm.mjs";
2
2
  export { CONFIG_FILE_NAMES, VIZE_CONFIG_JSON_SCHEMA_PATH, VIZE_CONFIG_PKL_SCHEMA_PATH, defineConfig, loadConfig, normalizeGlobalTypes, resolveConfigExport };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vize",
3
- "version": "0.345.0",
3
+ "version": "0.350.2",
4
4
  "description": "Vize - High-performance Vue.js toolchain in Rust",
5
5
  "keywords": [
6
6
  "cli",
@@ -53,17 +53,17 @@
53
53
  "access": "public"
54
54
  },
55
55
  "dependencies": {
56
- "@vizejs/native": "0.345.0",
57
- "oxc-transform": "0.130.0"
56
+ "@vizejs/native": "0.350.2",
57
+ "oxc-transform": "0.144.0"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@pkl-community/pkl": "0.30.2",
61
- "@tsdown/css": "0.22.0",
61
+ "@tsdown/css": "0.22.14",
62
62
  "@types/node": "25.9.2",
63
- "tsdown": "0.22.0",
63
+ "tsdown": "0.22.14",
64
64
  "typescript": "6.0.3",
65
- "vite": "npm:@voidzero-dev/vite-plus-core@0.1.21",
66
- "vite-plus": "0.1.21",
65
+ "vite": "npm:@voidzero-dev/vite-plus-core@0.1.24",
66
+ "vite-plus": "0.1.24",
67
67
  "vue": "3.5.35"
68
68
  },
69
69
  "peerDependencies": {
@@ -79,24 +79,29 @@
79
79
  }
80
80
  },
81
81
  "optionalDependencies": {
82
- "@typescript/native-preview": "7.0.0-dev.20260602.1"
82
+ "@typescript/native-preview": "7.0.0-dev.20260603.1"
83
+ },
84
+ "typescript": {
85
+ "contentMapper": {
86
+ "compilerOptions": [
87
+ "noUnusedLocals"
88
+ ],
89
+ "exec": [
90
+ "node",
91
+ "./bin/vize",
92
+ "content-mapper"
93
+ ]
94
+ }
83
95
  },
84
96
  "engines": {
85
97
  "node": ">=22"
86
98
  },
87
- "tsContentMapper": {
88
- "exec": [
89
- "node",
90
- "./bin/vize",
91
- "content-mapper"
92
- ]
93
- },
94
99
  "scripts": {
95
100
  "build": "vp run --workspace-root generate:rule-types && vp pack",
96
101
  "check": "vp check src tests vite.config.ts",
97
102
  "check:fix": "vp check --fix src tests vite.config.ts",
98
103
  "fmt": "vp fmt --write src tests vite.config.ts",
99
104
  "generate:rule-types": "vp run --workspace-root generate:rule-types",
100
- "test": "vp pack && vp test run tests/corsa-runtime.test.ts tests/setup.test.ts tests/setup-oxlint-config.test.ts tests/init.test.ts tests/init-frameworks.test.ts tests/init-prompt.test.ts"
105
+ "test": "vp pack && vp test run tests/corsa-runtime.test.ts tests/setup.test.ts tests/setup-oxlint-config.test.ts tests/init.test.ts tests/init-frameworks.test.ts tests/init-tsconfig.test.ts tests/init-prompt.test.ts"
101
106
  }
102
107
  }
@@ -42,6 +42,9 @@ class CompilerConfig {
42
42
  /// Treat lowercase non-HTML tags as custom renderer elements.
43
43
  customRenderer: Boolean = false
44
44
 
45
+ /// Tag patterns that compile as custom elements instead of Vue components.
46
+ customElements: Listing<String> = new Listing {}
47
+
45
48
  /// Enable SSR mode.
46
49
  ssr: Boolean = false
47
50
 
@@ -23,6 +23,9 @@ class LanguageServerConfig {
23
23
  /// Enable completions.
24
24
  completion: Boolean? = null
25
25
 
26
+ /// Enable TypeScript signature help.
27
+ signatureHelp: Boolean? = null
28
+
26
29
  /// Enable hover information.
27
30
  hover: Boolean? = null
28
31
 
@@ -90,6 +90,14 @@ compilerConfigDef: JsonSchema = new JsonSchema {
90
90
  description = "Treat lowercase non-HTML tags as custom renderer elements"
91
91
  default = false
92
92
  }
93
+ ["customElements"] = new JsonSchema {
94
+ type = "array"
95
+ items = new JsonSchema {
96
+ type = "string"
97
+ }
98
+ description = "Tag patterns that compile as custom elements instead of Vue components"
99
+ default = new Listing {}
100
+ }
93
101
  ["ssr"] = new JsonSchema {
94
102
  type = "boolean"
95
103
  description = "Enable SSR mode"
@@ -0,0 +1,119 @@
1
+ /// Musea gallery definitions used by the secondary JSON Schema compatibility output.
2
+ module vize.jsonschema.MuseaSchemaDefinitions
3
+
4
+ import "@json_schema/JsonSchema.pkl"
5
+
6
+ viewportDef: JsonSchema = new JsonSchema {
7
+ type = "object"
8
+ properties {
9
+ ["width"] = new JsonSchema {
10
+ type = "integer"
11
+ description = "Viewport width"
12
+ }
13
+ ["height"] = new JsonSchema {
14
+ type = "integer"
15
+ description = "Viewport height"
16
+ }
17
+ ["name"] = new JsonSchema {
18
+ type = "string"
19
+ description = "Viewport name"
20
+ }
21
+ }
22
+ required = new Listing { "width"; "height" }
23
+ additionalProperties = false
24
+ }
25
+
26
+ museaVrtConfigDef: JsonSchema = new JsonSchema {
27
+ type = "object"
28
+ description = "VRT (Visual Regression Testing) configuration"
29
+ properties {
30
+ ["threshold"] = new JsonSchema {
31
+ type = "number"
32
+ description = "Threshold for pixel comparison (0-1)"
33
+ default = 0.1
34
+ }
35
+ ["outDir"] = new JsonSchema {
36
+ type = "string"
37
+ description = "Output directory for screenshots"
38
+ default = "__musea_snapshots__"
39
+ }
40
+ ["viewports"] = new JsonSchema {
41
+ type = "array"
42
+ items = new JsonSchema { `$ref` = "#/definitions/MuseaViewport" }
43
+ description = "Viewport sizes"
44
+ }
45
+ }
46
+ additionalProperties = false
47
+ }
48
+
49
+ museaA11yConfigDef: JsonSchema = new JsonSchema {
50
+ type = "object"
51
+ description = "A11y configuration"
52
+ properties {
53
+ ["enabled"] = new JsonSchema {
54
+ type = "boolean"
55
+ description = "Enable a11y checking"
56
+ default = false
57
+ }
58
+ ["rules"] = new JsonSchema {
59
+ type = "object"
60
+ description = "Axe-core rules to enable/disable"
61
+ additionalProperties = new JsonSchema { type = "boolean" }
62
+ }
63
+ }
64
+ additionalProperties = false
65
+ }
66
+
67
+ museaAutogenConfigDef: JsonSchema = new JsonSchema {
68
+ type = "object"
69
+ description = "Autogen configuration"
70
+ properties {
71
+ ["enabled"] = new JsonSchema {
72
+ type = "boolean"
73
+ description = "Enable auto-generation of variants"
74
+ default = false
75
+ }
76
+ ["maxVariants"] = new JsonSchema {
77
+ type = "integer"
78
+ description = "Max variants to generate per component"
79
+ default = 10
80
+ }
81
+ }
82
+ additionalProperties = false
83
+ }
84
+
85
+ museaConfigDef: JsonSchema = new JsonSchema {
86
+ type = "object"
87
+ description = "Musea component gallery options"
88
+ properties {
89
+ ["include"] = new JsonSchema {
90
+ type = "array"
91
+ items = new JsonSchema { type = "string" }
92
+ description = "Glob patterns for art files"
93
+ }
94
+ ["exclude"] = new JsonSchema {
95
+ type = "array"
96
+ items = new JsonSchema { type = "string" }
97
+ description = "Glob patterns to exclude"
98
+ }
99
+ ["basePath"] = new JsonSchema {
100
+ type = "string"
101
+ description = "Base path for gallery"
102
+ default = "/__musea__"
103
+ }
104
+ ["storybookCompat"] = new JsonSchema {
105
+ type = "boolean"
106
+ description = "Enable Storybook compatibility"
107
+ default = false
108
+ }
109
+ ["inlineArt"] = new JsonSchema {
110
+ type = "boolean"
111
+ description = "Enable inline art detection in .vue files"
112
+ default = false
113
+ }
114
+ ["vrt"] = new JsonSchema { `$ref` = "#/definitions/MuseaVrtConfig" }
115
+ ["a11y"] = new JsonSchema { `$ref` = "#/definitions/MuseaA11yConfig" }
116
+ ["autogen"] = new JsonSchema { `$ref` = "#/definitions/MuseaAutogenConfig" }
117
+ }
118
+ additionalProperties = false
119
+ }
@@ -4,6 +4,7 @@
4
4
  module vize.jsonschema.generate
5
5
  import "@json_schema/JsonSchema.pkl"
6
6
  import "ConfigArtifactDefinitions.pkl"
7
+ import "MuseaSchemaDefinitions.pkl"
7
8
  local ruleSeverityEnum: JsonSchema = new JsonSchema {
8
9
  type = "string"
9
10
  enum = new Listing { "off"; "warn"; "error" }
@@ -344,6 +345,10 @@ local languageServerConfigDef: JsonSchema = new JsonSchema {
344
345
  type = "boolean"
345
346
  description = "Enable completions"
346
347
  }
348
+ ["signatureHelp"] = new JsonSchema {
349
+ type = "boolean"
350
+ description = "Enable TypeScript signature help"
351
+ }
347
352
  ["hover"] = new JsonSchema {
348
353
  type = "boolean"
349
354
  description = "Enable hover information"
@@ -412,121 +417,6 @@ local languageServerConfigDef: JsonSchema = new JsonSchema {
412
417
  additionalProperties = false
413
418
  }
414
419
 
415
- local viewportDef: JsonSchema = new JsonSchema {
416
- type = "object"
417
- properties {
418
- ["width"] = new JsonSchema {
419
- type = "integer"
420
- description = "Viewport width"
421
- }
422
- ["height"] = new JsonSchema {
423
- type = "integer"
424
- description = "Viewport height"
425
- }
426
- ["name"] = new JsonSchema {
427
- type = "string"
428
- description = "Viewport name"
429
- }
430
- }
431
- required = new Listing { "width"; "height" }
432
- additionalProperties = false
433
- }
434
-
435
- local museaVrtConfigDef: JsonSchema = new JsonSchema {
436
- type = "object"
437
- description = "VRT (Visual Regression Testing) configuration"
438
- properties {
439
- ["threshold"] = new JsonSchema {
440
- type = "number"
441
- description = "Threshold for pixel comparison (0-1)"
442
- default = 0.1
443
- }
444
- ["outDir"] = new JsonSchema {
445
- type = "string"
446
- description = "Output directory for screenshots"
447
- default = "__musea_snapshots__"
448
- }
449
- ["viewports"] = new JsonSchema {
450
- type = "array"
451
- items = new JsonSchema { `$ref` = "#/definitions/MuseaViewport" }
452
- description = "Viewport sizes"
453
- }
454
- }
455
- additionalProperties = false
456
- }
457
-
458
- local museaA11yConfigDef: JsonSchema = new JsonSchema {
459
- type = "object"
460
- description = "A11y configuration"
461
- properties {
462
- ["enabled"] = new JsonSchema {
463
- type = "boolean"
464
- description = "Enable a11y checking"
465
- default = false
466
- }
467
- ["rules"] = new JsonSchema {
468
- type = "object"
469
- description = "Axe-core rules to enable/disable"
470
- additionalProperties = new JsonSchema { type = "boolean" }
471
- }
472
- }
473
- additionalProperties = false
474
- }
475
-
476
- local museaAutogenConfigDef: JsonSchema = new JsonSchema {
477
- type = "object"
478
- description = "Autogen configuration"
479
- properties {
480
- ["enabled"] = new JsonSchema {
481
- type = "boolean"
482
- description = "Enable auto-generation of variants"
483
- default = false
484
- }
485
- ["maxVariants"] = new JsonSchema {
486
- type = "integer"
487
- description = "Max variants to generate per component"
488
- default = 10
489
- }
490
- }
491
- additionalProperties = false
492
- }
493
-
494
- local museaConfigDef: JsonSchema = new JsonSchema {
495
- type = "object"
496
- description = "Musea component gallery options"
497
- properties {
498
- ["include"] = new JsonSchema {
499
- type = "array"
500
- items = new JsonSchema { type = "string" }
501
- description = "Glob patterns for art files"
502
- }
503
- ["exclude"] = new JsonSchema {
504
- type = "array"
505
- items = new JsonSchema { type = "string" }
506
- description = "Glob patterns to exclude"
507
- }
508
- ["basePath"] = new JsonSchema {
509
- type = "string"
510
- description = "Base path for gallery"
511
- default = "/__musea__"
512
- }
513
- ["storybookCompat"] = new JsonSchema {
514
- type = "boolean"
515
- description = "Enable Storybook compatibility"
516
- default = false
517
- }
518
- ["inlineArt"] = new JsonSchema {
519
- type = "boolean"
520
- description = "Enable inline art detection in .vue files"
521
- default = false
522
- }
523
- ["vrt"] = new JsonSchema { `$ref` = "#/definitions/MuseaVrtConfig" }
524
- ["a11y"] = new JsonSchema { `$ref` = "#/definitions/MuseaA11yConfig" }
525
- ["autogen"] = new JsonSchema { `$ref` = "#/definitions/MuseaAutogenConfig" }
526
- }
527
- additionalProperties = false
528
- }
529
-
530
420
  local globalTypeDeclarationDef: JsonSchema = new JsonSchema {
531
421
  type = "object"
532
422
  description = "Global type declaration"
@@ -617,11 +507,11 @@ output {
617
507
  ["TypeCheckerConfig"] = typeCheckerConfigDef
618
508
  ["FormatterConfig"] = formatterConfigDef
619
509
  ["LanguageServerConfig"] = languageServerConfigDef
620
- ["MuseaViewport"] = viewportDef
621
- ["MuseaVrtConfig"] = museaVrtConfigDef
622
- ["MuseaA11yConfig"] = museaA11yConfigDef
623
- ["MuseaAutogenConfig"] = museaAutogenConfigDef
624
- ["MuseaConfig"] = museaConfigDef
510
+ ["MuseaViewport"] = MuseaSchemaDefinitions.viewportDef
511
+ ["MuseaVrtConfig"] = MuseaSchemaDefinitions.museaVrtConfigDef
512
+ ["MuseaA11yConfig"] = MuseaSchemaDefinitions.museaA11yConfigDef
513
+ ["MuseaAutogenConfig"] = MuseaSchemaDefinitions.museaAutogenConfigDef
514
+ ["MuseaConfig"] = MuseaSchemaDefinitions.museaConfigDef
625
515
  ["GlobalTypeDeclaration"] = globalTypeDeclarationDef
626
516
  ["GlobalTypesConfig"] = globalTypesConfigDef
627
517
  ["VizeConfigEntry"] = configEntryDef
package/pkl/vize.pkl CHANGED
@@ -35,6 +35,7 @@ class CompilerConfig {
35
35
  jsxMode: JsxMode? = null
36
36
  jsxCompat: JsxCompat? = null
37
37
  customRenderer: Boolean? = null
38
+ customElements: Listing<String>? = null
38
39
  ssr: Boolean? = null
39
40
  templateSyntax: TemplateSyntax? = null
40
41
  sourceMap: Boolean? = null
@@ -138,6 +139,7 @@ class LspConfig {
138
139
  ecosystem: Boolean? = null
139
140
  legacyVue2: Boolean? = null
140
141
  completion: Boolean? = null
142
+ signatureHelp: Boolean? = null
141
143
  hover: Boolean? = null
142
144
  definition: Boolean? = null
143
145
  references: Boolean? = null
@@ -72,6 +72,14 @@
72
72
  "default": false,
73
73
  "type": "boolean"
74
74
  },
75
+ "customElements": {
76
+ "description": "Tag patterns that compile as custom elements instead of Vue components",
77
+ "default": [],
78
+ "type": "array",
79
+ "items": {
80
+ "type": "string"
81
+ }
82
+ },
75
83
  "ssr": {
76
84
  "description": "Enable SSR mode",
77
85
  "default": false,
@@ -548,6 +556,10 @@
548
556
  "description": "Enable completions",
549
557
  "type": "boolean"
550
558
  },
559
+ "signatureHelp": {
560
+ "description": "Enable TypeScript signature help",
561
+ "type": "boolean"
562
+ },
551
563
  "hover": {
552
564
  "description": "Enable hover information",
553
565
  "type": "boolean"
package/src/init/args.ts CHANGED
@@ -121,7 +121,7 @@ Options:
121
121
  --nuxt nuxt module (forces the Nuxt target)
122
122
  --bundler/--no-bundler vite plugin or nuxt module, auto-detected
123
123
  --fmt / --no-fmt vize fmt
124
- --typecheck vize check (needs a tsconfig.json)
124
+ --typecheck vize check (creates tsconfig.json when missing)
125
125
  --no-typecheck
126
126
  --editor / --no-editor .vscode/extensions.json recommendation
127
127
  --dry-run Print the plan without writing anything
@@ -6,7 +6,7 @@ import type { ProjectDetection } from "./detect.js";
6
6
  import type { FeatureResult } from "./plan-types.js";
7
7
  import { renderVscodeExtensions, VSCODE_EXTENSION_ID } from "./templates.js";
8
8
 
9
- const EXTENSIONS_FILE = path.join(".vscode", "extensions.json");
9
+ const EXTENSIONS_FILE = ".vscode/extensions.json";
10
10
 
11
11
  /**
12
12
  * Plans the editor recommendation.