base.ts 742 B

123456789101112131415161718192021
  1. /**
  2. * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
  3. *
  4. * @author David Sehnal <david.sehnal@gmail.com>
  5. */
  6. import { StateObject, Transformer } from 'mol-state';
  7. export type TypeClass = 'root' | 'data' | 'prop'
  8. export namespace PluginStateObject {
  9. export type TypeClass = 'Root' | 'Group' | 'Data' | 'Object' | 'Representation' | 'Behaviour'
  10. export interface TypeInfo { name: string, shortName: string, description: string, typeClass: TypeClass }
  11. export interface Props { label: string, desctiption?: string }
  12. export const Create = StateObject.factory<TypeInfo, Props>();
  13. }
  14. export namespace PluginStateTransform {
  15. export const Create = Transformer.factory('ms-plugin');
  16. }