mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-09 09:52:34 +01:00
32 lines
769 B
TypeScript
32 lines
769 B
TypeScript
import {Plugin} from "plugable/pluginSystem";
|
|
import {AttributesService} from "cad/attributes/attributesService";
|
|
|
|
interface AttributesPluginInputContext {
|
|
}
|
|
|
|
export interface AttributesPluginContext {
|
|
attributesService: AttributesService;
|
|
}
|
|
|
|
type AttributesPluginWorkingContext = AttributesPluginInputContext&AttributesPluginContext;
|
|
|
|
declare module 'context' {
|
|
interface ApplicationContext extends AttributesPluginContext {}
|
|
}
|
|
|
|
export const AttributesPlugin: Plugin<AttributesPluginInputContext, AttributesPluginContext, AttributesPluginWorkingContext> = {
|
|
|
|
inputContextSpec: {
|
|
},
|
|
|
|
outputContextSpec: {
|
|
attributesService: 'required',
|
|
},
|
|
|
|
activate(ctx: AttributesPluginWorkingContext) {
|
|
ctx.attributesService = new AttributesService();
|
|
},
|
|
|
|
}
|
|
|
|
|