@nasti-toolchain/nasti 1.4.1 → 1.5.1

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/dist/index.d.cts CHANGED
@@ -295,4 +295,25 @@ declare function startElectronDev(inlineConfig?: ElectronDevOptions): Promise<vo
295
295
  */
296
296
  declare function electronPlugin(config: ResolvedConfig): NastiPlugin;
297
297
 
298
- export { type DevServer, type ElectronConfig, type HmrPayload, type ModuleNode, type NastiConfig, type NastiPlugin, type ResolvedConfig, type TransformResult, build, buildElectron, createServer, defineConfig, electronPlugin, resolveConfig, startElectronDev };
298
+ type MonacoEditorLanguageWorker = 'editorWorkerService' | 'css' | 'html' | 'json' | 'typescript';
299
+ interface MonacoCustomWorker {
300
+ label: string;
301
+ entry: string;
302
+ }
303
+ interface MonacoEditorPluginOptions {
304
+ /** 启用的 Monaco 语言 Worker,默认启用全部 */
305
+ languageWorkers?: MonacoEditorLanguageWorker[];
306
+ /** 额外自定义 Worker(如 monaco-graphql/esm/graphql.worker) */
307
+ customWorkers?: MonacoCustomWorker[];
308
+ /** Worker 在 URL 上的公共路径,默认 'monacoeditorwork'。可填 CDN 绝对 URL */
309
+ publicPath?: string;
310
+ /** 是否将 Monaco API 暴露到 window.monaco(兼容 0.22 之前的 globalAPI 模式) */
311
+ globalAPI?: boolean;
312
+ /** publicPath 是 CDN 时仍强制本地打包 Worker 产物 */
313
+ forceBuildCDN?: boolean;
314
+ /** 自定义生产构建下 Worker 产物目录(绝对路径) */
315
+ customDistPath?: (root: string, outDir: string, base: string) => string;
316
+ }
317
+ declare function monacoEditorPlugin(options?: MonacoEditorPluginOptions): NastiPlugin;
318
+
319
+ export { type DevServer, type ElectronConfig, type HmrPayload, type ModuleNode, type MonacoCustomWorker, type MonacoEditorLanguageWorker, type MonacoEditorPluginOptions, type NastiConfig, type NastiPlugin, type ResolvedConfig, type TransformResult, build, buildElectron, createServer, defineConfig, electronPlugin, monacoEditorPlugin, resolveConfig, startElectronDev };
package/dist/index.d.ts CHANGED
@@ -295,4 +295,25 @@ declare function startElectronDev(inlineConfig?: ElectronDevOptions): Promise<vo
295
295
  */
296
296
  declare function electronPlugin(config: ResolvedConfig): NastiPlugin;
297
297
 
298
- export { type DevServer, type ElectronConfig, type HmrPayload, type ModuleNode, type NastiConfig, type NastiPlugin, type ResolvedConfig, type TransformResult, build, buildElectron, createServer, defineConfig, electronPlugin, resolveConfig, startElectronDev };
298
+ type MonacoEditorLanguageWorker = 'editorWorkerService' | 'css' | 'html' | 'json' | 'typescript';
299
+ interface MonacoCustomWorker {
300
+ label: string;
301
+ entry: string;
302
+ }
303
+ interface MonacoEditorPluginOptions {
304
+ /** 启用的 Monaco 语言 Worker,默认启用全部 */
305
+ languageWorkers?: MonacoEditorLanguageWorker[];
306
+ /** 额外自定义 Worker(如 monaco-graphql/esm/graphql.worker) */
307
+ customWorkers?: MonacoCustomWorker[];
308
+ /** Worker 在 URL 上的公共路径,默认 'monacoeditorwork'。可填 CDN 绝对 URL */
309
+ publicPath?: string;
310
+ /** 是否将 Monaco API 暴露到 window.monaco(兼容 0.22 之前的 globalAPI 模式) */
311
+ globalAPI?: boolean;
312
+ /** publicPath 是 CDN 时仍强制本地打包 Worker 产物 */
313
+ forceBuildCDN?: boolean;
314
+ /** 自定义生产构建下 Worker 产物目录(绝对路径) */
315
+ customDistPath?: (root: string, outDir: string, base: string) => string;
316
+ }
317
+ declare function monacoEditorPlugin(options?: MonacoEditorPluginOptions): NastiPlugin;
318
+
319
+ export { type DevServer, type ElectronConfig, type HmrPayload, type ModuleNode, type MonacoCustomWorker, type MonacoEditorLanguageWorker, type MonacoEditorPluginOptions, type NastiConfig, type NastiPlugin, type ResolvedConfig, type TransformResult, build, buildElectron, createServer, defineConfig, electronPlugin, monacoEditorPlugin, resolveConfig, startElectronDev };