@combos-fun/inspector-decorator 0.0.32 → 0.0.34

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.
@@ -155,8 +155,10 @@ function step(stepValue) {
155
155
  };
156
156
  }
157
157
 
158
+ exports.COMPONENT_EXECUTE_MODE_METADATA = COMPONENT_EXECUTE_MODE_METADATA;
158
159
  exports.ExecuteInEditMode = ExecuteInEditMode;
159
160
  exports.Field = Field;
161
+ exports.IDE_PROPERTY_METADATA = IDE_PROPERTY_METADATA;
160
162
  exports.getPropertiesOf = getPropertiesOf;
161
163
  exports.shouldExecuteInEditMode = shouldExecuteInEditMode;
162
164
  exports.step = step;
@@ -1 +1 @@
1
- {"version":3,"file":"inspector-decorator.cjs.js","sources":["../lib/exceptions.ts","../lib/constants.ts","../lib/decorators.ts","../lib/ideLegacy.ts"],"sourcesContent":["export class SymbolKeysNotSupportedError extends Error {\n constructor() {\n super('Symbol keys are not supported yet!');\n\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n\nexport class StaticGetPropertiesIsNotAFunctionError extends Error {\n constructor() {\n super('getProperties is not a function!');\n\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n","export const IDE_PROPERTY_METADATA = 'IDE_PROPERTY_METADATA';\nexport const COMPONENT_EXECUTE_MODE_METADATA = 'COMPONENT_EXECUTE_MODE_METADATA';\n","import {TypeDecoratorParams, ReturnTypeFunc, FieldOptions, ClassType, FieldMetadata} from './interface';\nimport {SymbolKeysNotSupportedError} from './exceptions';\nimport {IDE_PROPERTY_METADATA, COMPONENT_EXECUTE_MODE_METADATA} from './constants';\n\nfunction isFunction(val: unknown): val is Function {\n return typeof val === 'function';\n}\n\nfunction transformBasicType(type: unknown): 'string' | 'number' | 'boolean' | 'unknown' {\n if (type === String) {\n return 'string';\n }\n if (type === Number) {\n return 'number';\n }\n if (type === Boolean) {\n return 'boolean';\n }\n return 'unknown';\n}\n\nfunction defineTypes(target: any, key: string | symbol, options: FieldOptions, returnTypeFunction?: ReturnTypeFunc) {\n let type = Reflect.getMetadata('design:type', target, key);\n let isArray = type === Array;\n const str = transformBasicType(type);\n if (str !== 'unknown') {\n type = str;\n }\n if (returnTypeFunction) {\n const returnType = returnTypeFunction();\n if (Array.isArray(returnType)) {\n isArray = true;\n // not support Tuples yet\n type = returnType[0];\n } else {\n type = returnType;\n }\n }\n const properties = Reflect.getMetadata(IDE_PROPERTY_METADATA, target.constructor) || {};\n properties[key] = {\n type,\n isArray: isArray,\n ...options,\n };\n Reflect.defineMetadata(IDE_PROPERTY_METADATA, properties, target.constructor);\n}\n\nfunction getTypeDecoratorParams(\n returnTypeFuncOrOptions: ReturnTypeFunc | FieldOptions | undefined,\n maybeOptions: FieldOptions | undefined,\n): TypeDecoratorParams {\n if (typeof returnTypeFuncOrOptions === 'function') {\n return {\n returnTypeFunc: returnTypeFuncOrOptions,\n options: maybeOptions || {},\n };\n }\n return {\n options: returnTypeFuncOrOptions || {},\n };\n}\n\nexport function Field(): PropertyDecorator;\nexport function Field(options: FieldOptions): PropertyDecorator;\nexport function Field(returnTypeFunction?: ReturnTypeFunc): PropertyDecorator;\nexport function Field(returnTypeFunction?: ReturnTypeFunc | FieldOptions, maybeOptions?: FieldOptions): PropertyDecorator;\nexport function Field(returnTypeFunction?: ReturnTypeFunc | FieldOptions, maybeOptions?: FieldOptions): PropertyDecorator {\n return (target, propertyKey) => {\n if (typeof propertyKey === 'symbol') {\n throw new SymbolKeysNotSupportedError();\n }\n\n const {options, returnTypeFunc} = getTypeDecoratorParams(returnTypeFunction, maybeOptions);\n defineTypes(target, propertyKey, options, returnTypeFunc);\n };\n}\n\nexport function getPropertiesOf<\n T extends ClassType<any> & {\n componentName?: string;\n },\n>(target: T, isRoot = true): FieldMetadata {\n const properties = Reflect.getMetadata(IDE_PROPERTY_METADATA, target) || {};\n const name = target.componentName;\n const rootObject: FieldMetadata = {\n name,\n type: name,\n isArray: false,\n };\n if (isRoot) {\n rootObject.isFolder = true;\n }\n if (!Object.keys(properties).length && target.componentName) {\n return rootObject;\n }\n\n rootObject.type = 'object';\n rootObject.children = [];\n Object.keys(properties).forEach(propertyKey => {\n if (isFunction(properties[propertyKey].type)) {\n const maybeBasicType = transformBasicType(properties[propertyKey].type);\n if (maybeBasicType !== 'unknown') {\n properties[propertyKey].type = maybeBasicType;\n } else {\n const child = getPropertiesOf(properties[propertyKey].type, false);\n properties[propertyKey].type = 'object';\n if (!properties[propertyKey].children) {\n properties[propertyKey].children = [];\n }\n properties[propertyKey].children.push(...(child.children || []));\n }\n }\n if (!properties[propertyKey].name) {\n properties[propertyKey].name = propertyKey;\n }\n if (properties[propertyKey].isArray) {\n properties[propertyKey].addable = true;\n }\n rootObject.children!.push(properties[propertyKey]);\n });\n return rootObject;\n}\n\nenum ExecuteMode {\n Edit = 1 << 1,\n Game = 1 << 2,\n All = Edit | Game,\n}\n\nexport const ExecuteInEditMode: ClassDecorator = target => {\n Reflect.defineMetadata(COMPONENT_EXECUTE_MODE_METADATA, ExecuteMode.Edit, target);\n};\n\nexport const shouldExecuteInEditMode = (target: ClassType<any>): boolean => {\n const mode = Reflect.getMetadata(COMPONENT_EXECUTE_MODE_METADATA, target);\n return !!(mode & ExecuteMode.Edit);\n};\n","/**\n * Legacy inspector hints used across Combos plugins: writes `constructor.IDEProps`\n * (object keyed by property name). Compatible with legacy inspector-decorator style (v0.0.x IDEProps).\n */\nfunction getIDEPropsPropertyObj(target: any, propertyKey: string | symbol): Record<string, unknown> {\n if (!target.constructor.IDEProps) {\n target.constructor.IDEProps = {};\n }\n if (!target.constructor.IDEProps[propertyKey]) {\n target.constructor.IDEProps[propertyKey] = {};\n }\n return target.constructor.IDEProps[propertyKey];\n}\n\nexport function type(typeString: string) {\n return function (target: any, propertyKey: string | symbol): void {\n const prop = getIDEPropsPropertyObj(target, propertyKey);\n prop.key = propertyKey;\n prop.type = typeString;\n };\n}\n\nexport function step(stepValue: number) {\n return function (target: any, propertyKey: string | symbol): void {\n const prop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W,CAAC,GAAG,EAAE;IAC/C;IACA,OAAO,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC;AACjD;AAEM,SAAU,IAAI,CAAC,UAAkB,EAAA;IACrC,OAAO,UAAU,MAAW,EAAE,WAA4B,EAAA;QACxD,MAAM,IAAI,GAAG,sBAAsB,CAAC,MAAM,EAAE,WAAW,CAAC;AACxD,QAAA,IAAI,CAAC,GAAG,GAAG,WAAW;AACtB,QAAA,IAAI,CAAC,IAAI,GAAG,UAAU;AACxB,IAAA,CAAC;AACH;AAEM,SAAU,IAAI,CAAC,SAAiB,EAAA;IACpC,OAAO,UAAU,MAAW,EAAE,WAA4B,EAAA;QACxD,MAAM,IAAI,GAAG,sBAAsB,CAAC,MAAM,EAAE,WAAW,CAAC;AACxD,QAAA,IAAI,CAAC,IAAI,GAAG,SAAS;AACvB,IAAA,CAAC;AACH;;;;;;;;;"}
1
+ {"version":3,"file":"inspector-decorator.cjs.js","sources":["../lib/exceptions.ts","../lib/constants.ts","../lib/decorators.ts","../lib/ideLegacy.ts"],"sourcesContent":["export class SymbolKeysNotSupportedError extends Error {\n constructor() {\n super('Symbol keys are not supported yet!');\n\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n\nexport class StaticGetPropertiesIsNotAFunctionError extends Error {\n constructor() {\n super('getProperties is not a function!');\n\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n","export const IDE_PROPERTY_METADATA = 'IDE_PROPERTY_METADATA';\nexport const COMPONENT_EXECUTE_MODE_METADATA = 'COMPONENT_EXECUTE_MODE_METADATA';\n","import {TypeDecoratorParams, ReturnTypeFunc, FieldOptions, ClassType, FieldMetadata} from './interface';\nimport {SymbolKeysNotSupportedError} from './exceptions';\nimport {IDE_PROPERTY_METADATA, COMPONENT_EXECUTE_MODE_METADATA} from './constants';\n\nfunction isFunction(val: unknown): val is Function {\n return typeof val === 'function';\n}\n\nfunction transformBasicType(type: unknown): 'string' | 'number' | 'boolean' | 'unknown' {\n if (type === String) {\n return 'string';\n }\n if (type === Number) {\n return 'number';\n }\n if (type === Boolean) {\n return 'boolean';\n }\n return 'unknown';\n}\n\nfunction defineTypes(target: any, key: string | symbol, options: FieldOptions, returnTypeFunction?: ReturnTypeFunc) {\n let type = Reflect.getMetadata('design:type', target, key);\n let isArray = type === Array;\n const str = transformBasicType(type);\n if (str !== 'unknown') {\n type = str;\n }\n if (returnTypeFunction) {\n const returnType = returnTypeFunction();\n if (Array.isArray(returnType)) {\n isArray = true;\n // not support Tuples yet\n type = returnType[0];\n } else {\n type = returnType;\n }\n }\n const properties = Reflect.getMetadata(IDE_PROPERTY_METADATA, target.constructor) || {};\n properties[key] = {\n type,\n isArray: isArray,\n ...options,\n };\n Reflect.defineMetadata(IDE_PROPERTY_METADATA, properties, target.constructor);\n}\n\nfunction getTypeDecoratorParams(\n returnTypeFuncOrOptions: ReturnTypeFunc | FieldOptions | undefined,\n maybeOptions: FieldOptions | undefined,\n): TypeDecoratorParams {\n if (typeof returnTypeFuncOrOptions === 'function') {\n return {\n returnTypeFunc: returnTypeFuncOrOptions,\n options: maybeOptions || {},\n };\n }\n return {\n options: returnTypeFuncOrOptions || {},\n };\n}\n\nexport function Field(): PropertyDecorator;\nexport function Field(options: FieldOptions): PropertyDecorator;\nexport function Field(returnTypeFunction?: ReturnTypeFunc): PropertyDecorator;\nexport function Field(returnTypeFunction?: ReturnTypeFunc | FieldOptions, maybeOptions?: FieldOptions): PropertyDecorator;\nexport function Field(returnTypeFunction?: ReturnTypeFunc | FieldOptions, maybeOptions?: FieldOptions): PropertyDecorator {\n return (target, propertyKey) => {\n if (typeof propertyKey === 'symbol') {\n throw new SymbolKeysNotSupportedError();\n }\n\n const {options, returnTypeFunc} = getTypeDecoratorParams(returnTypeFunction, maybeOptions);\n defineTypes(target, propertyKey, options, returnTypeFunc);\n };\n}\n\nexport function getPropertiesOf<\n T extends ClassType<any> & {\n componentName?: string;\n },\n>(target: T, isRoot = true): FieldMetadata {\n const properties = Reflect.getMetadata(IDE_PROPERTY_METADATA, target) || {};\n const name = target.componentName;\n const rootObject: FieldMetadata = {\n name,\n type: name,\n isArray: false,\n };\n if (isRoot) {\n rootObject.isFolder = true;\n }\n if (!Object.keys(properties).length && target.componentName) {\n return rootObject;\n }\n\n rootObject.type = 'object';\n rootObject.children = [];\n Object.keys(properties).forEach(propertyKey => {\n if (isFunction(properties[propertyKey].type)) {\n const maybeBasicType = transformBasicType(properties[propertyKey].type);\n if (maybeBasicType !== 'unknown') {\n properties[propertyKey].type = maybeBasicType;\n } else {\n const child = getPropertiesOf(properties[propertyKey].type, false);\n properties[propertyKey].type = 'object';\n if (!properties[propertyKey].children) {\n properties[propertyKey].children = [];\n }\n properties[propertyKey].children.push(...(child.children || []));\n }\n }\n if (!properties[propertyKey].name) {\n properties[propertyKey].name = propertyKey;\n }\n if (properties[propertyKey].isArray) {\n properties[propertyKey].addable = true;\n }\n rootObject.children!.push(properties[propertyKey]);\n });\n return rootObject;\n}\n\nenum ExecuteMode {\n Edit = 1 << 1,\n Game = 1 << 2,\n All = Edit | Game,\n}\n\nexport const ExecuteInEditMode: ClassDecorator = target => {\n Reflect.defineMetadata(COMPONENT_EXECUTE_MODE_METADATA, ExecuteMode.Edit, target);\n};\n\nexport const shouldExecuteInEditMode = (target: ClassType<any>): boolean => {\n const mode = Reflect.getMetadata(COMPONENT_EXECUTE_MODE_METADATA, target);\n return !!(mode & ExecuteMode.Edit);\n};\n","/**\n * Legacy inspector hints used across Combos plugins: writes `constructor.IDEProps`\n * (object keyed by property name). Compatible with legacy inspector-decorator style (v0.0.x IDEProps).\n */\nfunction getIDEPropsPropertyObj(target: any, propertyKey: string | symbol): Record<string, unknown> {\n if (!target.constructor.IDEProps) {\n target.constructor.IDEProps = {};\n }\n if (!target.constructor.IDEProps[propertyKey]) {\n target.constructor.IDEProps[propertyKey] = {};\n }\n return target.constructor.IDEProps[propertyKey];\n}\n\nexport function type(typeString: string) {\n return function (target: any, propertyKey: string | symbol): void {\n const prop = getIDEPropsPropertyObj(target, propertyKey);\n prop.key = propertyKey;\n prop.type = typeString;\n };\n}\n\nexport function step(stepValue: number) {\n return function (target: any, propertyKey: string | symbol): void {\n const prop = getIDEPropsPropertyObj(target, propertyKey);\n prop.step = stepValue;\n };\n}\n"],"names":[],"mappings":";;;;AAAM,MAAO,2BAA4B,SAAQ,KAAK,CAAA;AACpD,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,oCAAoC,CAAC;QAE3C,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC;IACnD;AACD;;ACNM,MAAM,qBAAqB,GAAG;AAC9B,MAAM,+BAA+B,GAAG;;ACG/C,SAAS,UAAU,CAAC,GAAY,EAAA;AAC9B,IAAA,OAAO,OAAO,GAAG,KAAK,UAAU;AAClC;AAEA,SAAS,kBAAkB,CAAC,IAAa,EAAA;AACvC,IAAA,IAAI,IAAI,KAAK,MAAM,EAAE;AACnB,QAAA,OAAO,QAAQ;IACjB;AACA,IAAA,IAAI,IAAI,KAAK,MAAM,EAAE;AACnB,QAAA,OAAO,QAAQ;IACjB;AACA,IAAA,IAAI,IAAI,KAAK,OAAO,EAAE;AACpB,QAAA,OAAO,SAAS;IAClB;AACA,IAAA,OAAO,SAAS;AAClB;AAEA,SAAS,WAAW,CAAC,MAAW,EAAE,GAAoB,EAAE,OAAqB,EAAE,kBAAmC,EAAA;AAChH,IAAA,IAAI,IAAI,GAAG,OAAO,CAAC,WAAW,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,CAAC;AAC1D,IAAA,IAAI,OAAO,GAAG,IAAI,KAAK,KAAK;AAC5B,IAAA,MAAM,GAAG,GAAG,kBAAkB,CAAC,IAAI,CAAC;AACpC,IAAA,IAAI,GAAG,KAAK,SAAS,EAAE;QACrB,IAAI,GAAG,GAAG;IACZ;IACA,IAAI,kBAAkB,EAAE;AACtB,QAAA,MAAM,UAAU,GAAG,kBAAkB,EAAE;AACvC,QAAA,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,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE;QAC7C,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,EAAE;IAC/C;IACA,OAAO,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC;AACjD;AAEM,SAAU,IAAI,CAAC,UAAkB,EAAA;IACrC,OAAO,UAAU,MAAW,EAAE,WAA4B,EAAA;QACxD,MAAM,IAAI,GAAG,sBAAsB,CAAC,MAAM,EAAE,WAAW,CAAC;AACxD,QAAA,IAAI,CAAC,GAAG,GAAG,WAAW;AACtB,QAAA,IAAI,CAAC,IAAI,GAAG,UAAU;AACxB,IAAA,CAAC;AACH;AAEM,SAAU,IAAI,CAAC,SAAiB,EAAA;IACpC,OAAO,UAAU,MAAW,EAAE,WAA4B,EAAA;QACxD,MAAM,IAAI,GAAG,sBAAsB,CAAC,MAAM,EAAE,WAAW,CAAC;AACxD,QAAA,IAAI,CAAC,IAAI,GAAG,SAAS;AACvB,IAAA,CAAC;AACH;;;;;;;;;;;"}
@@ -1 +1 @@
1
- "use strict";require("reflect-metadata");class t extends Error{constructor(){super("Symbol keys are not supported yet!"),Object.setPrototypeOf(this,new.target.prototype)}}const e="IDE_PROPERTY_METADATA",n="COMPONENT_EXECUTE_MODE_METADATA";function o(t){return t===String?"string":t===Number?"number":t===Boolean?"boolean":"unknown"}var r;!function(t){t[t.Edit=2]="Edit",t[t.Game=4]="Game",t[t.All=6]="All"}(r||(r={}));function c(t,e){return t.constructor.IDEProps||(t.constructor.IDEProps={}),t.constructor.IDEProps[e]||(t.constructor.IDEProps[e]={}),t.constructor.IDEProps[e]}exports.ExecuteInEditMode=t=>{Reflect.defineMetadata(n,r.Edit,t)},exports.Field=function(n,r){return(c,s)=>{if("symbol"==typeof s)throw new t;const{options:i,returnTypeFunc:u}=function(t,e){return"function"==typeof t?{returnTypeFunc:t,options:e||{}}:{options:t||{}}}(n,r);!function(t,n,r,c){let s=Reflect.getMetadata("design:type",t,n),i=s===Array;const u=o(s);if("unknown"!==u&&(s=u),c){const t=c();Array.isArray(t)?(i=!0,s=t[0]):s=t}const a=Reflect.getMetadata(e,t.constructor)||{};a[n]={type:s,isArray:i,...r},Reflect.defineMetadata(e,a,t.constructor)}(c,s,i,u)}},exports.getPropertiesOf=function t(n,r=!0){const c=Reflect.getMetadata(e,n)||{},s=n.componentName,i={name:s,type:s,isArray:!1};return r&&(i.isFolder=!0),!Object.keys(c).length&&n.componentName||(i.type="object",i.children=[],Object.keys(c).forEach(e=>{if("function"==typeof c[e].type){const n=o(c[e].type);if("unknown"!==n)c[e].type=n;else{const n=t(c[e].type,!1);c[e].type="object",c[e].children||(c[e].children=[]),c[e].children.push(...n.children||[])}}c[e].name||(c[e].name=e),c[e].isArray&&(c[e].addable=!0),i.children.push(c[e])})),i},exports.shouldExecuteInEditMode=t=>!!(Reflect.getMetadata(n,t)&r.Edit),exports.step=function(t){return function(e,n){c(e,n).step=t}},exports.type=function(t){return function(e,n){const o=c(e,n);o.key=n,o.type=t}};
1
+ "use strict";require("reflect-metadata");class t extends Error{constructor(){super("Symbol keys are not supported yet!"),Object.setPrototypeOf(this,new.target.prototype)}}const e="IDE_PROPERTY_METADATA",n="COMPONENT_EXECUTE_MODE_METADATA";function o(t){return t===String?"string":t===Number?"number":t===Boolean?"boolean":"unknown"}var r;!function(t){t[t.Edit=2]="Edit",t[t.Game=4]="Game",t[t.All=6]="All"}(r||(r={}));function c(t,e){return t.constructor.IDEProps||(t.constructor.IDEProps={}),t.constructor.IDEProps[e]||(t.constructor.IDEProps[e]={}),t.constructor.IDEProps[e]}exports.COMPONENT_EXECUTE_MODE_METADATA=n,exports.ExecuteInEditMode=t=>{Reflect.defineMetadata(n,r.Edit,t)},exports.Field=function(n,r){return(c,s)=>{if("symbol"==typeof s)throw new t;const{options:i,returnTypeFunc:u}=function(t,e){return"function"==typeof t?{returnTypeFunc:t,options:e||{}}:{options:t||{}}}(n,r);!function(t,n,r,c){let s=Reflect.getMetadata("design:type",t,n),i=s===Array;const u=o(s);if("unknown"!==u&&(s=u),c){const t=c();Array.isArray(t)?(i=!0,s=t[0]):s=t}const p=Reflect.getMetadata(e,t.constructor)||{};p[n]={type:s,isArray:i,...r},Reflect.defineMetadata(e,p,t.constructor)}(c,s,i,u)}},exports.IDE_PROPERTY_METADATA=e,exports.getPropertiesOf=function t(n,r=!0){const c=Reflect.getMetadata(e,n)||{},s=n.componentName,i={name:s,type:s,isArray:!1};return r&&(i.isFolder=!0),!Object.keys(c).length&&n.componentName||(i.type="object",i.children=[],Object.keys(c).forEach(e=>{if("function"==typeof c[e].type){const n=o(c[e].type);if("unknown"!==n)c[e].type=n;else{const n=t(c[e].type,!1);c[e].type="object",c[e].children||(c[e].children=[]),c[e].children.push(...n.children||[])}}c[e].name||(c[e].name=e),c[e].isArray&&(c[e].addable=!0),i.children.push(c[e])})),i},exports.shouldExecuteInEditMode=t=>!!(Reflect.getMetadata(n,t)&r.Edit),exports.step=function(t){return function(e,n){c(e,n).step=t}},exports.type=function(t){return function(e,n){const o=c(e,n);o.key=n,o.type=t}};
@@ -13,8 +13,21 @@ interface NumberOptions {
13
13
  max?: number;
14
14
  step?: number;
15
15
  }
16
+ /** Inspector / Scene Edit editor control hints. */
17
+ type FieldEditorKind = 'volume-slider' | 'number-slider' | 'number-stepper' | 'color' | 'enum' | 'toggle' | 'text';
16
18
  interface FieldOptions extends NumberOptions, FillterOptions, FilltersOptions, AnyOptions {
17
19
  type?: string;
20
+ /** Display title shown in the host inspector (plain text, no i18n). */
21
+ label?: string;
22
+ /** Human-readable explanation shown in the host inspector (plain text, no i18n). */
23
+ description?: string;
24
+ /** Optional inspector group (e.g. `Transform`, `Appearance`). */
25
+ group?: string;
26
+ /** Preferred editor control. */
27
+ editor?: FieldEditorKind;
28
+ /** Allowed values when `editor` is `enum`. */
29
+ enumOptions?: string[];
30
+ unit?: string;
18
31
  }
19
32
  type AnyOptions = Record<string, any>;
20
33
  interface FillterOptions {
@@ -34,6 +47,12 @@ interface FieldMetadata extends NumberOptions, FillterOptions, FilltersOptions,
34
47
  isFolder?: boolean;
35
48
  isArray: boolean;
36
49
  addable?: boolean;
50
+ label?: string;
51
+ description?: string;
52
+ group?: string;
53
+ editor?: FieldEditorKind;
54
+ enumOptions?: string[];
55
+ unit?: string;
37
56
  }
38
57
  type ReturnTypeAsync<T extends (...args: any) => any> = T extends (...args: any) => Promise<infer R> ? R : T extends (...args: any) => infer R ? R : any;
39
58
 
@@ -47,8 +66,11 @@ declare function getPropertiesOf<T extends ClassType<any> & {
47
66
  declare const ExecuteInEditMode: ClassDecorator;
48
67
  declare const shouldExecuteInEditMode: (target: ClassType<any>) => boolean;
49
68
 
69
+ declare const IDE_PROPERTY_METADATA = "IDE_PROPERTY_METADATA";
70
+ declare const COMPONENT_EXECUTE_MODE_METADATA = "COMPONENT_EXECUTE_MODE_METADATA";
71
+
50
72
  declare function type(typeString: string): (target: any, propertyKey: string | symbol) => void;
51
73
  declare function step(stepValue: number): (target: any, propertyKey: string | symbol) => void;
52
74
 
53
- export { ExecuteInEditMode, Field, getPropertiesOf, shouldExecuteInEditMode, step, type };
54
- export type { ClassType, ClassTypeResolver, FieldMetadata, FieldOptions, FillterOptions, FilltersOptions, RecursiveArray, ReturnTypeAsync, ReturnTypeFunc, ReturnTypeFuncValue, TypeDecoratorParams, TypeValue, TypeValueThunk };
75
+ export { COMPONENT_EXECUTE_MODE_METADATA, ExecuteInEditMode, Field, IDE_PROPERTY_METADATA, getPropertiesOf, shouldExecuteInEditMode, step, type };
76
+ export type { ClassType, ClassTypeResolver, FieldEditorKind, FieldMetadata, FieldOptions, FillterOptions, FilltersOptions, RecursiveArray, ReturnTypeAsync, ReturnTypeFunc, ReturnTypeFuncValue, TypeDecoratorParams, TypeValue, TypeValueThunk };
@@ -153,5 +153,5 @@ function step(stepValue) {
153
153
  };
154
154
  }
155
155
 
156
- export { ExecuteInEditMode, Field, getPropertiesOf, shouldExecuteInEditMode, step, type };
156
+ export { COMPONENT_EXECUTE_MODE_METADATA, ExecuteInEditMode, Field, IDE_PROPERTY_METADATA, getPropertiesOf, shouldExecuteInEditMode, step, type };
157
157
  //# sourceMappingURL=inspector-decorator.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"inspector-decorator.esm.js","sources":["../lib/exceptions.ts","../lib/constants.ts","../lib/decorators.ts","../lib/ideLegacy.ts"],"sourcesContent":["export class SymbolKeysNotSupportedError extends Error {\n constructor() {\n super('Symbol keys are not supported yet!');\n\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n\nexport class StaticGetPropertiesIsNotAFunctionError extends Error {\n constructor() {\n super('getProperties is not a function!');\n\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n","export const IDE_PROPERTY_METADATA = 'IDE_PROPERTY_METADATA';\nexport const COMPONENT_EXECUTE_MODE_METADATA = 'COMPONENT_EXECUTE_MODE_METADATA';\n","import {TypeDecoratorParams, ReturnTypeFunc, FieldOptions, ClassType, FieldMetadata} from './interface';\nimport {SymbolKeysNotSupportedError} from './exceptions';\nimport {IDE_PROPERTY_METADATA, COMPONENT_EXECUTE_MODE_METADATA} from './constants';\n\nfunction isFunction(val: unknown): val is Function {\n return typeof val === 'function';\n}\n\nfunction transformBasicType(type: unknown): 'string' | 'number' | 'boolean' | 'unknown' {\n if (type === String) {\n return 'string';\n }\n if (type === Number) {\n return 'number';\n }\n if (type === Boolean) {\n return 'boolean';\n }\n return 'unknown';\n}\n\nfunction defineTypes(target: any, key: string | symbol, options: FieldOptions, returnTypeFunction?: ReturnTypeFunc) {\n let type = Reflect.getMetadata('design:type', target, key);\n let isArray = type === Array;\n const str = transformBasicType(type);\n if (str !== 'unknown') {\n type = str;\n }\n if (returnTypeFunction) {\n const returnType = returnTypeFunction();\n if (Array.isArray(returnType)) {\n isArray = true;\n // not support Tuples yet\n type = returnType[0];\n } else {\n type = returnType;\n }\n }\n const properties = Reflect.getMetadata(IDE_PROPERTY_METADATA, target.constructor) || {};\n properties[key] = {\n type,\n isArray: isArray,\n ...options,\n };\n Reflect.defineMetadata(IDE_PROPERTY_METADATA, properties, target.constructor);\n}\n\nfunction getTypeDecoratorParams(\n returnTypeFuncOrOptions: ReturnTypeFunc | FieldOptions | undefined,\n maybeOptions: FieldOptions | undefined,\n): TypeDecoratorParams {\n if (typeof returnTypeFuncOrOptions === 'function') {\n return {\n returnTypeFunc: returnTypeFuncOrOptions,\n options: maybeOptions || {},\n };\n }\n return {\n options: returnTypeFuncOrOptions || {},\n };\n}\n\nexport function Field(): PropertyDecorator;\nexport function Field(options: FieldOptions): PropertyDecorator;\nexport function Field(returnTypeFunction?: ReturnTypeFunc): PropertyDecorator;\nexport function Field(returnTypeFunction?: ReturnTypeFunc | FieldOptions, maybeOptions?: FieldOptions): PropertyDecorator;\nexport function Field(returnTypeFunction?: ReturnTypeFunc | FieldOptions, maybeOptions?: FieldOptions): PropertyDecorator {\n return (target, propertyKey) => {\n if (typeof propertyKey === 'symbol') {\n throw new SymbolKeysNotSupportedError();\n }\n\n const {options, returnTypeFunc} = getTypeDecoratorParams(returnTypeFunction, maybeOptions);\n defineTypes(target, propertyKey, options, returnTypeFunc);\n };\n}\n\nexport function getPropertiesOf<\n T extends ClassType<any> & {\n componentName?: string;\n },\n>(target: T, isRoot = true): FieldMetadata {\n const properties = Reflect.getMetadata(IDE_PROPERTY_METADATA, target) || {};\n const name = target.componentName;\n const rootObject: FieldMetadata = {\n name,\n type: name,\n isArray: false,\n };\n if (isRoot) {\n rootObject.isFolder = true;\n }\n if (!Object.keys(properties).length && target.componentName) {\n return rootObject;\n }\n\n rootObject.type = 'object';\n rootObject.children = [];\n Object.keys(properties).forEach(propertyKey => {\n if (isFunction(properties[propertyKey].type)) {\n const maybeBasicType = transformBasicType(properties[propertyKey].type);\n if (maybeBasicType !== 'unknown') {\n properties[propertyKey].type = maybeBasicType;\n } else {\n const child = getPropertiesOf(properties[propertyKey].type, false);\n properties[propertyKey].type = 'object';\n if (!properties[propertyKey].children) {\n properties[propertyKey].children = [];\n }\n properties[propertyKey].children.push(...(child.children || []));\n }\n }\n if (!properties[propertyKey].name) {\n properties[propertyKey].name = propertyKey;\n }\n if (properties[propertyKey].isArray) {\n properties[propertyKey].addable = true;\n }\n rootObject.children!.push(properties[propertyKey]);\n });\n return rootObject;\n}\n\nenum ExecuteMode {\n Edit = 1 << 1,\n Game = 1 << 2,\n All = Edit | Game,\n}\n\nexport const ExecuteInEditMode: ClassDecorator = target => {\n Reflect.defineMetadata(COMPONENT_EXECUTE_MODE_METADATA, ExecuteMode.Edit, target);\n};\n\nexport const shouldExecuteInEditMode = (target: ClassType<any>): boolean => {\n const mode = Reflect.getMetadata(COMPONENT_EXECUTE_MODE_METADATA, target);\n return !!(mode & ExecuteMode.Edit);\n};\n","/**\n * Legacy inspector hints used across Combos plugins: writes `constructor.IDEProps`\n * (object keyed by property name). Compatible with legacy inspector-decorator style (v0.0.x IDEProps).\n */\nfunction getIDEPropsPropertyObj(target: any, propertyKey: string | symbol): Record<string, unknown> {\n if (!target.constructor.IDEProps) {\n target.constructor.IDEProps = {};\n }\n if (!target.constructor.IDEProps[propertyKey]) {\n target.constructor.IDEProps[propertyKey] = {};\n }\n return target.constructor.IDEProps[propertyKey];\n}\n\nexport function type(typeString: string) {\n return function (target: any, propertyKey: string | symbol): void {\n const prop = getIDEPropsPropertyObj(target, propertyKey);\n prop.key = propertyKey;\n prop.type = typeString;\n };\n}\n\nexport function step(stepValue: number) {\n return function (target: any, propertyKey: string | symbol): void {\n const prop = getIDEPropsPropertyObj(target, propertyKey);\n prop.step = stepValue;\n };\n}\n"],"names":[],"mappings":";;AAAM,MAAO,2BAA4B,SAAQ,KAAK,CAAA;AACpD,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,oCAAoC,CAAC;QAE3C,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC;IACnD;AACD;;ACNM,MAAM,qBAAqB,GAAG,uB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AAA,IAAI,CAAC,IAAI,GAAG,UAAU;AACxB,IAAA,CAAC;AACH;AAEM,SAAU,IAAI,CAAC,SAAiB,EAAA;IACpC,OAAO,UAAU,MAAW,EAAE,WAA4B,EAAA;QACxD,MAAM,IAAI,GAAG,sBAAsB,CAAC,MAAM,EAAE,WAAW,CAAC;AACxD,QAAA,IAAI,CAAC,IAAI,GAAG,SAAS;AACvB,IAAA,CAAC;AACH;;;;"}
1
+ {"version":3,"file":"inspector-decorator.esm.js","sources":["../lib/exceptions.ts","../lib/constants.ts","../lib/decorators.ts","../lib/ideLegacy.ts"],"sourcesContent":["export class SymbolKeysNotSupportedError extends Error {\n constructor() {\n super('Symbol keys are not supported yet!');\n\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n\nexport class StaticGetPropertiesIsNotAFunctionError extends Error {\n constructor() {\n super('getProperties is not a function!');\n\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n","export const IDE_PROPERTY_METADATA = 'IDE_PROPERTY_METADATA';\nexport const COMPONENT_EXECUTE_MODE_METADATA = 'COMPONENT_EXECUTE_MODE_METADATA';\n","import {TypeDecoratorParams, ReturnTypeFunc, FieldOptions, ClassType, FieldMetadata} from './interface';\nimport {SymbolKeysNotSupportedError} from './exceptions';\nimport {IDE_PROPERTY_METADATA, COMPONENT_EXECUTE_MODE_METADATA} from './constants';\n\nfunction isFunction(val: unknown): val is Function {\n return typeof val === 'function';\n}\n\nfunction transformBasicType(type: unknown): 'string' | 'number' | 'boolean' | 'unknown' {\n if (type === String) {\n return 'string';\n }\n if (type === Number) {\n return 'number';\n }\n if (type === Boolean) {\n return 'boolean';\n }\n return 'unknown';\n}\n\nfunction defineTypes(target: any, key: string | symbol, options: FieldOptions, returnTypeFunction?: ReturnTypeFunc) {\n let type = Reflect.getMetadata('design:type', target, key);\n let isArray = type === Array;\n const str = transformBasicType(type);\n if (str !== 'unknown') {\n type = str;\n }\n if (returnTypeFunction) {\n const returnType = returnTypeFunction();\n if (Array.isArray(returnType)) {\n isArray = true;\n // not support Tuples yet\n type = returnType[0];\n } else {\n type = returnType;\n }\n }\n const properties = Reflect.getMetadata(IDE_PROPERTY_METADATA, target.constructor) || {};\n properties[key] = {\n type,\n isArray: isArray,\n ...options,\n };\n Reflect.defineMetadata(IDE_PROPERTY_METADATA, properties, target.constructor);\n}\n\nfunction getTypeDecoratorParams(\n returnTypeFuncOrOptions: ReturnTypeFunc | FieldOptions | undefined,\n maybeOptions: FieldOptions | undefined,\n): TypeDecoratorParams {\n if (typeof returnTypeFuncOrOptions === 'function') {\n return {\n returnTypeFunc: returnTypeFuncOrOptions,\n options: maybeOptions || {},\n };\n }\n return {\n options: returnTypeFuncOrOptions || {},\n };\n}\n\nexport function Field(): PropertyDecorator;\nexport function Field(options: FieldOptions): PropertyDecorator;\nexport function Field(returnTypeFunction?: ReturnTypeFunc): PropertyDecorator;\nexport function Field(returnTypeFunction?: ReturnTypeFunc | FieldOptions, maybeOptions?: FieldOptions): PropertyDecorator;\nexport function Field(returnTypeFunction?: ReturnTypeFunc | FieldOptions, maybeOptions?: FieldOptions): PropertyDecorator {\n return (target, propertyKey) => {\n if (typeof propertyKey === 'symbol') {\n throw new SymbolKeysNotSupportedError();\n }\n\n const {options, returnTypeFunc} = getTypeDecoratorParams(returnTypeFunction, maybeOptions);\n defineTypes(target, propertyKey, options, returnTypeFunc);\n };\n}\n\nexport function getPropertiesOf<\n T extends ClassType<any> & {\n componentName?: string;\n },\n>(target: T, isRoot = true): FieldMetadata {\n const properties = Reflect.getMetadata(IDE_PROPERTY_METADATA, target) || {};\n const name = target.componentName;\n const rootObject: FieldMetadata = {\n name,\n type: name,\n isArray: false,\n };\n if (isRoot) {\n rootObject.isFolder = true;\n }\n if (!Object.keys(properties).length && target.componentName) {\n return rootObject;\n }\n\n rootObject.type = 'object';\n rootObject.children = [];\n Object.keys(properties).forEach(propertyKey => {\n if (isFunction(properties[propertyKey].type)) {\n const maybeBasicType = transformBasicType(properties[propertyKey].type);\n if (maybeBasicType !== 'unknown') {\n properties[propertyKey].type = maybeBasicType;\n } else {\n const child = getPropertiesOf(properties[propertyKey].type, false);\n properties[propertyKey].type = 'object';\n if (!properties[propertyKey].children) {\n properties[propertyKey].children = [];\n }\n properties[propertyKey].children.push(...(child.children || []));\n }\n }\n if (!properties[propertyKey].name) {\n properties[propertyKey].name = propertyKey;\n }\n if (properties[propertyKey].isArray) {\n properties[propertyKey].addable = true;\n }\n rootObject.children!.push(properties[propertyKey]);\n });\n return rootObject;\n}\n\nenum ExecuteMode {\n Edit = 1 << 1,\n Game = 1 << 2,\n All = Edit | Game,\n}\n\nexport const ExecuteInEditMode: ClassDecorator = target => {\n Reflect.defineMetadata(COMPONENT_EXECUTE_MODE_METADATA, ExecuteMode.Edit, target);\n};\n\nexport const shouldExecuteInEditMode = (target: ClassType<any>): boolean => {\n const mode = Reflect.getMetadata(COMPONENT_EXECUTE_MODE_METADATA, target);\n return !!(mode & ExecuteMode.Edit);\n};\n","/**\n * Legacy inspector hints used across Combos plugins: writes `constructor.IDEProps`\n * (object keyed by property name). Compatible with legacy inspector-decorator style (v0.0.x IDEProps).\n */\nfunction getIDEPropsPropertyObj(target: any, propertyKey: string | symbol): Record<string, unknown> {\n if (!target.constructor.IDEProps) {\n target.constructor.IDEProps = {};\n }\n if (!target.constructor.IDEProps[propertyKey]) {\n target.constructor.IDEProps[propertyKey] = {};\n }\n return target.constructor.IDEProps[propertyKey];\n}\n\nexport function type(typeString: string) {\n return function (target: any, propertyKey: string | symbol): void {\n const prop = getIDEPropsPropertyObj(target, propertyKey);\n prop.key = propertyKey;\n prop.type = typeString;\n };\n}\n\nexport function step(stepValue: number) {\n return function (target: any, propertyKey: string | symbol): void {\n const prop = getIDEPropsPropertyObj(target, propertyKey);\n prop.step = stepValue;\n };\n}\n"],"names":[],"mappings":";;AAAM,MAAO,2BAA4B,SAAQ,KAAK,CAAA;AACpD,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,oCAAoC,CAAC;QAE3C,MA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,GAAG,sBAAsB,CAAC,MAAM,EAAE,WAAW,CAAC;AACxD,QAAA,IAAI,CAAC,GAAG,GAAG,WAAW;AACtB,QAAA,IAAI,CAAC,IAAI,GAAG,UAAU;AACxB,IAAA,CAAC;AACH;AAEM,SAAU,IAAI,CAAC,SAAiB,EAAA;IACpC,OAAO,UAAU,MAAW,EAAE,WAA4B,EAAA;QACxD,MAAM,IAAI,GAAG,sBAAsB,CAAC,MAAM,EAAE,WAAW,CAAC;AACxD,QAAA,IAAI,CAAC,IAAI,GAAG,SAAS;AACvB,IAAA,CAAC;AACH;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@combos-fun/inspector-decorator",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "description": "Runtime decorator helpers used by Combos Fun engine and plugin packages to expose Component fields to editor / inspector tooling",
5
5
  "publishConfig": {
6
6
  "access": "public"