@cocojs/mvc 0.0.1-alpha202511172037 → 0.1.0-beta.6

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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.cjs.js +1813 -2153
  3. package/dist/index.d.ts +218 -55
  4. package/package.json +35 -27
package/dist/index.d.ts CHANGED
@@ -17,6 +17,8 @@ export declare class Application {
17
17
  metadataRepository: MetadataRepository;
18
18
  idClassMap: IdClassMap;
19
19
  propertiesConfig: PropertiesConfig;
20
+ iocComponentDefinition: IocComponentDefinition;
21
+ iocComponentFactory: IocComponentFactory;
20
22
  constructor(jsonConfig?: Record<string, any>);
21
23
  /**
22
24
  * 在项目中,所以的组件都已经收集到coco/index里面了,所以不需要进行组件收集;
@@ -43,7 +45,7 @@ export declare class Application {
43
45
  */
44
46
  getViewComponent<T>(viewClass: Class<T>, props?: any[]): any;
45
47
  listFieldByMetadataCls(beDecoratedCls: Class<any>, MetadataCls: Class<any>): string[];
46
- findClassKindMetadataRecursively(beDecoratedCls: Class<any>, TargetCls: Class<any>, upward?: number): any;
48
+ findClassKindMetadataRecursively(beDecoratedCls: Class<any>, TargetCls: Class<any>, levels?: number): any;
47
49
  listBeDecoratedClsByClassKindMetadata(MetadataCls: Class<any>): Map<Class<any>, Metadata>;
48
50
  getMetaClassById(id: string): Class<Metadata>;
49
51
  /**
@@ -61,6 +63,8 @@ declare class Application_2 {
61
63
  metadataRepository: MetadataRepository_2;
62
64
  idClassMap: IdClassMap_2;
63
65
  propertiesConfig: PropertiesConfig_2;
66
+ iocComponentDefinition: IocComponentDefinition_2;
67
+ iocComponentFactory: IocComponentFactory_2;
64
68
  constructor(jsonConfig?: Record<string, any>);
65
69
  /**
66
70
  * 在项目中,所以的组件都已经收集到coco/index里面了,所以不需要进行组件收集;
@@ -87,7 +91,7 @@ declare class Application_2 {
87
91
  */
88
92
  getViewComponent<T>(viewClass: Class<T>, props?: any[]): any;
89
93
  listFieldByMetadataCls(beDecoratedCls: Class<any>, MetadataCls: Class<any>): string[];
90
- findClassKindMetadataRecursively(beDecoratedCls: Class<any>, TargetCls: Class<any>, upward?: number): any;
94
+ findClassKindMetadataRecursively(beDecoratedCls: Class<any>, TargetCls: Class<any>, levels?: number): any;
91
95
  listBeDecoratedClsByClassKindMetadata(MetadataCls: Class<any>): Map<Class<any>, Metadata_2>;
92
96
  getMetaClassById(id: string): Class<Metadata_2>;
93
97
  /**
@@ -105,6 +109,8 @@ declare class Application_3 {
105
109
  metadataRepository: MetadataRepository_3;
106
110
  idClassMap: IdClassMap_3;
107
111
  propertiesConfig: PropertiesConfig_3;
112
+ iocComponentDefinition: IocComponentDefinition_3;
113
+ iocComponentFactory: IocComponentFactory_3;
108
114
  constructor(jsonConfig?: Record<string, any>);
109
115
  /**
110
116
  * 在项目中,所以的组件都已经收集到coco/index里面了,所以不需要进行组件收集;
@@ -131,7 +137,7 @@ declare class Application_3 {
131
137
  */
132
138
  getViewComponent<T>(viewClass: Class<T>, props?: any[]): any;
133
139
  listFieldByMetadataCls(beDecoratedCls: Class<any>, MetadataCls: Class<any>): string[];
134
- findClassKindMetadataRecursively(beDecoratedCls: Class<any>, TargetCls: Class<any>, upward?: number): any;
140
+ findClassKindMetadataRecursively(beDecoratedCls: Class<any>, TargetCls: Class<any>, levels?: number): any;
135
141
  listBeDecoratedClsByClassKindMetadata(MetadataCls: Class<any>): Map<Class<any>, Metadata_4>;
136
142
  getMetaClassById(id: string): Class<Metadata_4>;
137
143
  /**
@@ -217,6 +223,7 @@ declare type ComponentFieldPostConstructFn = (metadata: Metadata, application: A
217
223
 
218
224
  declare class ComponentMetadataClass {
219
225
  isComponent: Map<Class<Metadata>, boolean>;
226
+ destructor(): void;
220
227
  isComponentMetadata(MetadataClass: Class<Metadata>): boolean;
221
228
  /**
222
229
  * 校验元数据类的组件类,过滤掉所有非法的组件元数据信息
@@ -234,6 +241,7 @@ declare class ComponentMetadataClass {
234
241
 
235
242
  declare class ComponentMetadataClass_2 {
236
243
  isComponent: Map<Class<Metadata_2>, boolean>;
244
+ destructor(): void;
237
245
  isComponentMetadata(MetadataClass: Class<Metadata_2>): boolean;
238
246
  /**
239
247
  * 校验元数据类的组件类,过滤掉所有非法的组件元数据信息
@@ -251,6 +259,7 @@ declare class ComponentMetadataClass_2 {
251
259
 
252
260
  declare class ComponentMetadataClass_3 {
253
261
  isComponent: Map<Class<Metadata_4>, boolean>;
262
+ destructor(): void;
254
263
  isComponentMetadata(MetadataClass: Class<Metadata_4>): boolean;
255
264
  /**
256
265
  * 校验元数据类的组件类,过滤掉所有非法的组件元数据信息
@@ -281,6 +290,21 @@ export declare class Configuration extends Metadata {
281
290
 
282
291
  export declare const configuration: () => Decorator<ClassDecoratorContext>;
283
292
 
293
+ declare type ConstructOption = {
294
+ classOrId: Class<any> | string;
295
+ qualifier?: string;
296
+ };
297
+
298
+ declare type ConstructOption_2 = {
299
+ classOrId: Class<any> | string;
300
+ qualifier?: string;
301
+ };
302
+
303
+ declare type ConstructOption_3 = {
304
+ classOrId: Class<any> | string;
305
+ qualifier?: string;
306
+ };
307
+
284
308
  /**
285
309
  * @public
286
310
  */
@@ -317,7 +341,8 @@ declare interface CreateDecoratorExpOption {
317
341
  }
318
342
 
319
343
  /**
320
- * 创建一个未绑定元数据的装饰器表达式,后续通过表达式的第二个参数来绑定
344
+ * 创建一个未绑定元数据的装饰器表达式
345
+ * 需要在正式的元数据类上添加decorateSelf装饰器来关联真实的元数据类,装饰器到其他类的使用方式和createDecoratorExp是一致的。
321
346
  * 适用于装饰器装饰自己元数据类的场景
322
347
  * @public
323
348
  */
@@ -347,6 +372,8 @@ declare interface DecoratorExpWithDecoratorSelf<T extends any> {
347
372
  decorateSelf: (userParam?: T) => Decorator<DecoratorContext>;
348
373
  }
349
374
 
375
+ export declare function defineReactive(object: Record<any, any>, field: string, getter: IGetter, setter?: ISetter): void;
376
+
350
377
  declare interface Diagnose {
351
378
  code: DiagnoseCode;
352
379
  args: any[];
@@ -387,6 +414,9 @@ declare enum DiagnoseCode {
387
414
  'CO10022' = 'CO10022', // 元数据类不能有字段装饰器
388
415
  'CO10023' = 'CO10023', // 元数据类不能有方法装饰器
389
416
  'CO10024' = 'CO10024', // 元数据类存在多个组件装饰器
417
+ 'CO10025' = 'CO10025', // findClassKindMetadataRecursively参数错误,入参不是元数据类
418
+ 'CO10026' = 'CO10026', // 不能添加多个相同的 field 装饰器
419
+ 'CO10027' = 'CO10027', // 不能添加多个相同的 method 装饰器
390
420
  }
391
421
 
392
422
  declare enum DiagnoseCode_2 {
@@ -414,6 +444,9 @@ declare enum DiagnoseCode_2 {
414
444
  'CO10022' = 'CO10022', // 元数据类不能有字段装饰器
415
445
  'CO10023' = 'CO10023', // 元数据类不能有方法装饰器
416
446
  'CO10024' = 'CO10024', // 元数据类存在多个组件装饰器
447
+ 'CO10025' = 'CO10025', // findClassKindMetadataRecursively参数错误,入参不是元数据类
448
+ 'CO10026' = 'CO10026', // 不能添加多个相同的 field 装饰器
449
+ 'CO10027' = 'CO10027', // 不能添加多个相同的 method 装饰器
417
450
  }
418
451
 
419
452
  declare enum DiagnoseCode_3 {
@@ -441,6 +474,9 @@ declare enum DiagnoseCode_3 {
441
474
  'CO10022' = 'CO10022', // 元数据类不能有字段装饰器
442
475
  'CO10023' = 'CO10023', // 元数据类不能有方法装饰器
443
476
  'CO10024' = 'CO10024', // 元数据类存在多个组件装饰器
477
+ 'CO10025' = 'CO10025', // findClassKindMetadataRecursively参数错误,入参不是元数据类
478
+ 'CO10026' = 'CO10026', // 不能添加多个相同的 field 装饰器
479
+ 'CO10027' = 'CO10027', // 不能添加多个相同的 method 装饰器
444
480
  }
445
481
 
446
482
  declare class DynamicRoute {
@@ -500,14 +536,13 @@ export declare class Id extends Metadata {
500
536
  value: string;
501
537
  }
502
538
 
503
- /**
504
- * @public
505
- * @id()装饰器
506
- * 用于为元数据类或者组件类设置id,id的作用是可以根据id返回元数据类,也可以根据id实例化组件,所以id必须要唯一。
507
- * 如果一个组件不添加id装饰器,那么组件或者元数据类的id就是class.name(webpack目前打包不会压缩class关键字,TODO: rollup打包会压缩class关键字,要么强制添加id装饰器,要么强制不压缩class关键字)
508
- * 如果用户显式设置了id装饰器,那么会使用用户设置的id
509
- */
510
- export declare const id: DecoratorExpWithDecoratorSelf<string>;
539
+ export declare const id: (id: string) => Decorator<ClassMethodDecoratorContext>;
540
+
541
+ declare type Id_2 = string;
542
+
543
+ declare type Id_2_2 = string;
544
+
545
+ declare type Id_2_3 = string;
511
546
 
512
547
  declare class IdClassMap {
513
548
  private idClassMap;
@@ -517,7 +552,7 @@ declare class IdClassMap {
517
552
  */
518
553
  constructor(metaMetadataMap: Map<Class<Metadata>, MetaMetadata>);
519
554
  /**
520
- * * 根据id获取元数据类
555
+ * * 根据$$id获取元数据类
521
556
  * * @param id 元数据类id
522
557
  * * @returns 元数据类
523
558
  */
@@ -533,7 +568,7 @@ declare class IdClassMap_2 {
533
568
  */
534
569
  constructor(metaMetadataMap: Map<Class<Metadata_2>, MetaMetadata_2>);
535
570
  /**
536
- * * 根据id获取元数据类
571
+ * * 根据$$id获取元数据类
537
572
  * * @param id 元数据类id
538
573
  * * @returns 元数据类
539
574
  */
@@ -549,7 +584,7 @@ declare class IdClassMap_3 {
549
584
  */
550
585
  constructor(metaMetadataMap: Map<Class<Metadata_4>, MetaMetadata_3>);
551
586
  /**
552
- * * 根据id获取元数据类
587
+ * * 根据$$id获取元数据类
553
588
  * * @param id 元数据类id
554
589
  * * @returns 元数据类
555
590
  */
@@ -557,6 +592,152 @@ declare class IdClassMap_3 {
557
592
  destructor(): void;
558
593
  }
559
594
 
595
+ declare interface IGetter {
596
+ (): any;
597
+ }
598
+
599
+ /**
600
+ * 所有被扫描的规范的组件
601
+ * 包括:
602
+ * 1. 项目中添加@component类装饰的组件
603
+ * 2. 第三方添加@component类装饰的组件
604
+ * 3. 项目中通过@component方法装饰注册的组件
605
+ */
606
+ declare interface IocComDef<T> {
607
+ id: string;
608
+ cls: Class<T>;
609
+ isSingleton: boolean;
610
+ instantiateType: 'new' | 'method';
611
+ methodInstantiateOpts?: {
612
+ configurationCls: Class<any>;
613
+ method: string;
614
+ };
615
+ }
616
+
617
+ /**
618
+ * 所有被扫描的规范的组件
619
+ * 包括:
620
+ * 1. 项目中添加@component类装饰的组件
621
+ * 2. 第三方添加@component类装饰的组件
622
+ * 3. 项目中通过@component方法装饰注册的组件
623
+ */
624
+ declare interface IocComDef_2<T> {
625
+ id: string;
626
+ cls: Class<T>;
627
+ isSingleton: boolean;
628
+ instantiateType: 'new' | 'method';
629
+ methodInstantiateOpts?: {
630
+ configurationCls: Class<any>;
631
+ method: string;
632
+ };
633
+ }
634
+
635
+ /**
636
+ * 所有被扫描的规范的组件
637
+ * 包括:
638
+ * 1. 项目中添加@component类装饰的组件
639
+ * 2. 第三方添加@component类装饰的组件
640
+ * 3. 项目中通过@component方法装饰注册的组件
641
+ */
642
+ declare interface IocComDef_3<T> {
643
+ id: string;
644
+ cls: Class<T>;
645
+ isSingleton: boolean;
646
+ instantiateType: 'new' | 'method';
647
+ methodInstantiateOpts?: {
648
+ configurationCls: Class<any>;
649
+ method: string;
650
+ };
651
+ }
652
+
653
+ declare class IocComponentDefinition {
654
+ idDefinitionMap: Map<Id_2, IocComDef<any>>;
655
+ clsDefinitionMap: Map<Class<any>, IocComDef<any>>;
656
+ newIocComponentDefinition<T>(id: string, cls: Class<T>, isSingleton: boolean, instantiateType: 'new' | 'method'): IocComDef<T>;
657
+ addDefinition(cls: Class<any>, id: string, isSingleton: boolean, methodInstantiateOpts?: {
658
+ configurationCls: Class<any>;
659
+ method: string;
660
+ }): void;
661
+ /**
662
+ * 获取真正会实例化的类定义
663
+ * @param ClsOrId 想要实例化的类或类id
664
+ * @param qualifier 如果存在多个后端类,需要通过qualifier指定具体的类id
665
+ * @returns 真正会实例化的类定义
666
+ */
667
+ getInstantiateDefinition(ClsOrId: Class<any> | Id_2, qualifier?: string): IocComDef<any>;
668
+ getDefinition(ClsOrId: Class<any> | Id_2): IocComDef<any>;
669
+ existDefinition(ClsOrId: Class<any> | Id_2): boolean;
670
+ destructor(): void;
671
+ }
672
+
673
+ declare class IocComponentDefinition_2 {
674
+ idDefinitionMap: Map<Id_2_2, IocComDef_2<any>>;
675
+ clsDefinitionMap: Map<Class<any>, IocComDef_2<any>>;
676
+ newIocComponentDefinition<T>(id: string, cls: Class<T>, isSingleton: boolean, instantiateType: 'new' | 'method'): IocComDef_2<T>;
677
+ addDefinition(cls: Class<any>, id: string, isSingleton: boolean, methodInstantiateOpts?: {
678
+ configurationCls: Class<any>;
679
+ method: string;
680
+ }): void;
681
+ /**
682
+ * 获取真正会实例化的类定义
683
+ * @param ClsOrId 想要实例化的类或类id
684
+ * @param qualifier 如果存在多个后端类,需要通过qualifier指定具体的类id
685
+ * @returns 真正会实例化的类定义
686
+ */
687
+ getInstantiateDefinition(ClsOrId: Class<any> | Id_2_2, qualifier?: string): IocComDef_2<any>;
688
+ getDefinition(ClsOrId: Class<any> | Id_2_2): IocComDef_2<any>;
689
+ existDefinition(ClsOrId: Class<any> | Id_2_2): boolean;
690
+ destructor(): void;
691
+ }
692
+
693
+ declare class IocComponentDefinition_3 {
694
+ idDefinitionMap: Map<Id_2_3, IocComDef_3<any>>;
695
+ clsDefinitionMap: Map<Class<any>, IocComDef_3<any>>;
696
+ newIocComponentDefinition<T>(id: string, cls: Class<T>, isSingleton: boolean, instantiateType: 'new' | 'method'): IocComDef_3<T>;
697
+ addDefinition(cls: Class<any>, id: string, isSingleton: boolean, methodInstantiateOpts?: {
698
+ configurationCls: Class<any>;
699
+ method: string;
700
+ }): void;
701
+ /**
702
+ * 获取真正会实例化的类定义
703
+ * @param ClsOrId 想要实例化的类或类id
704
+ * @param qualifier 如果存在多个后端类,需要通过qualifier指定具体的类id
705
+ * @returns 真正会实例化的类定义
706
+ */
707
+ getInstantiateDefinition(ClsOrId: Class<any> | Id_2_3, qualifier?: string): IocComDef_3<any>;
708
+ getDefinition(ClsOrId: Class<any> | Id_2_3): IocComDef_3<any>;
709
+ existDefinition(ClsOrId: Class<any> | Id_2_3): boolean;
710
+ destructor(): void;
711
+ }
712
+
713
+ declare class IocComponentFactory {
714
+ singletonInstances: Map<Class<any>, any>;
715
+ private createComponent;
716
+ getComponents(application: Application, userOption: ConstructOption): any;
717
+ getViewComponent(application: Application, viewClass: Class<any>, props: any[]): any;
718
+ destructor(): void;
719
+ }
720
+
721
+ declare class IocComponentFactory_2 {
722
+ singletonInstances: Map<Class<any>, any>;
723
+ private createComponent;
724
+ getComponents(application: Application_2, userOption: ConstructOption_2): any;
725
+ getViewComponent(application: Application_2, viewClass: Class<any>, props: any[]): any;
726
+ destructor(): void;
727
+ }
728
+
729
+ declare class IocComponentFactory_3 {
730
+ singletonInstances: Map<Class<any>, any>;
731
+ private createComponent;
732
+ getComponents(application: Application_3, userOption: ConstructOption_3): any;
733
+ getViewComponent(application: Application_3, viewClass: Class<any>, props: any[]): any;
734
+ destructor(): void;
735
+ }
736
+
737
+ declare interface ISetter {
738
+ (object: Record<any, any>, field: string, newValue: any): void;
739
+ }
740
+
560
741
  declare function jsx(component: any, config: any, maybeKey?: any): {
561
742
  $$typeof: any;
562
743
  type: any;
@@ -680,10 +861,12 @@ declare class MetadataRepository {
680
861
  */
681
862
  listMethodKindMetadata(beDecoratedCls: Class<any>, field: Field, findMetadataCls?: Class<any>): Metadata[];
682
863
  /**
683
- * 在类的所有类类型的元数据中递归查找某个元数据类实例,找到就直接返回
684
- * TODO: 因为现在组件装饰器的层数没有限制了,那么upward这个参数是否还有必要存在
864
+ * listClassKindMetadata的递归版本,在类装饰器的元数据类递归,但只返回一个
865
+ * @param beDecoratedCls 被查找的类
866
+ * @param TargetCls 想要匹配的元数据类定义
867
+ * @param levels 递归层数,默认无限制,就是查找所有的装饰器的元数据类,也可以使用数字指定,0表示只查当前装饰器,1表示再查当前装饰器的元数据的装饰器,依次类推
685
868
  */
686
- findClassKindMetadataRecursively(beDecoratedCls: Class<any>, TargetCls: Class<any>, upward?: number): any;
869
+ findClassKindMetadataRecursively(beDecoratedCls: Class<any>, TargetCls: Class<any>, levels?: number): any;
687
870
  /**
688
871
  * 返回包含指定元数据类的所有field
689
872
  * @param beDecoratedCls 指定类
@@ -735,10 +918,12 @@ declare class MetadataRepository_2 {
735
918
  */
736
919
  listMethodKindMetadata(beDecoratedCls: Class<any>, field: Field_2, findMetadataCls?: Class<any>): Metadata_2[];
737
920
  /**
738
- * 在类的所有类类型的元数据中递归查找某个元数据类实例,找到就直接返回
739
- * TODO: 因为现在组件装饰器的层数没有限制了,那么upward这个参数是否还有必要存在
921
+ * listClassKindMetadata的递归版本,在类装饰器的元数据类递归,但只返回一个
922
+ * @param beDecoratedCls 被查找的类
923
+ * @param TargetCls 想要匹配的元数据类定义
924
+ * @param levels 递归层数,默认无限制,就是查找所有的装饰器的元数据类,也可以使用数字指定,0表示只查当前装饰器,1表示再查当前装饰器的元数据的装饰器,依次类推
740
925
  */
741
- findClassKindMetadataRecursively(beDecoratedCls: Class<any>, TargetCls: Class<any>, upward?: number): any;
926
+ findClassKindMetadataRecursively(beDecoratedCls: Class<any>, TargetCls: Class<any>, levels?: number): any;
742
927
  /**
743
928
  * 返回包含指定元数据类的所有field
744
929
  * @param beDecoratedCls 指定类
@@ -790,10 +975,12 @@ declare class MetadataRepository_3 {
790
975
  */
791
976
  listMethodKindMetadata(beDecoratedCls: Class<any>, field: Field_3, findMetadataCls?: Class<any>): Metadata_4[];
792
977
  /**
793
- * 在类的所有类类型的元数据中递归查找某个元数据类实例,找到就直接返回
794
- * TODO: 因为现在组件装饰器的层数没有限制了,那么upward这个参数是否还有必要存在
978
+ * listClassKindMetadata的递归版本,在类装饰器的元数据类递归,但只返回一个
979
+ * @param beDecoratedCls 被查找的类
980
+ * @param TargetCls 想要匹配的元数据类定义
981
+ * @param levels 递归层数,默认无限制,就是查找所有的装饰器的元数据类,也可以使用数字指定,0表示只查当前装饰器,1表示再查当前装饰器的元数据的装饰器,依次类推
795
982
  */
796
- findClassKindMetadataRecursively(beDecoratedCls: Class<any>, TargetCls: Class<any>, upward?: number): any;
983
+ findClassKindMetadataRecursively(beDecoratedCls: Class<any>, TargetCls: Class<any>, levels?: number): any;
797
984
  /**
798
985
  * 返回包含指定元数据类的所有field
799
986
  * @param beDecoratedCls 指定类
@@ -838,12 +1025,11 @@ export declare const page: () => Decorator_2<ClassDecoratorContext>;
838
1025
  declare type Params = {
839
1026
  metadataKind: Kind;
840
1027
  metadataClass: Class<any>;
841
- placeholderMetadataClass?: Class<any>;
842
1028
  metadataParam: any;
843
1029
  /**
844
1030
  * 如果metadataKind是'class',field是undefined
845
- * 如果metadataKind是'method'\'field',field就是对应的prop名字
846
- * todo 测试是否支持Symbol类型
1031
+ * 如果metadataKind是'method'\'field',field就是对应的函数名或字段名
1032
+ * TODO: 测试是否支持Symbol类型
847
1033
  */
848
1034
  field?: Field;
849
1035
  };
@@ -851,12 +1037,11 @@ declare type Params = {
851
1037
  declare type Params_2 = {
852
1038
  metadataKind: Kind_2;
853
1039
  metadataClass: Class<any>;
854
- placeholderMetadataClass?: Class<any>;
855
1040
  metadataParam: any;
856
1041
  /**
857
1042
  * 如果metadataKind是'class',field是undefined
858
- * 如果metadataKind是'method'\'field',field就是对应的prop名字
859
- * todo 测试是否支持Symbol类型
1043
+ * 如果metadataKind是'method'\'field',field就是对应的函数名或字段名
1044
+ * TODO: 测试是否支持Symbol类型
860
1045
  */
861
1046
  field?: Field_2;
862
1047
  };
@@ -864,12 +1049,11 @@ declare type Params_2 = {
864
1049
  declare type Params_3 = {
865
1050
  metadataKind: Kind_3;
866
1051
  metadataClass: Class<any>;
867
- placeholderMetadataClass?: Class<any>;
868
1052
  metadataParam: any;
869
1053
  /**
870
1054
  * 如果metadataKind是'class',field是undefined
871
- * 如果metadataKind是'method'\'field',field就是对应的prop名字
872
- * todo 测试是否支持Symbol类型
1055
+ * 如果metadataKind是'method'\'field',field就是对应的函数名或字段名
1056
+ * TODO: 测试是否支持Symbol类型
873
1057
  */
874
1058
  field?: Field_3;
875
1059
  };
@@ -910,15 +1094,6 @@ declare class PropertiesConfig_3 {
910
1094
  getAllBootComponents(): string[];
911
1095
  }
912
1096
 
913
- export declare class Publisher {
914
- private readonly name;
915
- private subscribers;
916
- constructor(name?: string);
917
- addListener(subscriber: Subscriber): void;
918
- removeListener(subscriber: Subscriber): void;
919
- notify(): void;
920
- }
921
-
922
1097
  /**
923
1098
  * @public
924
1099
  */
@@ -1051,7 +1226,7 @@ export declare class Store extends Metadata_3 {
1051
1226
 
1052
1227
  export declare const store: () => Decorator_2<ClassDecoratorContext>;
1053
1228
 
1054
- export declare class StorePublisher {
1229
+ declare class StorePublisher {
1055
1230
  private id;
1056
1231
  private subscribers;
1057
1232
  constructor();
@@ -1071,18 +1246,6 @@ export declare class StoreSubscriber {
1071
1246
  exec(): void;
1072
1247
  }
1073
1248
 
1074
- export declare class Subscriber {
1075
- static Executing: Subscriber;
1076
- private isDirty;
1077
- private publishers;
1078
- private readonly fn;
1079
- private value;
1080
- constructor(bindThisFn: Function);
1081
- subscribe: (publisher: Publisher) => void;
1082
- memoizedFn: () => any;
1083
- dirty(): void;
1084
- }
1085
-
1086
1249
  /**
1087
1250
  * @public
1088
1251
  */
package/package.json CHANGED
@@ -1,29 +1,37 @@
1
1
  {
2
- "name": "@cocojs/mvc",
3
- "version": "0.0.1-alpha202511172037",
4
- "description": "由装饰器驱动,快速构建可扩展的 Web 应用。",
5
- "main": "dist/index.cjs.js",
6
- "types": "dist/index.d.ts",
7
- "scripts": {},
8
- "exports": {
9
- ".": {
10
- "import": "./dist/index.cjs.js",
11
- "require": "./dist/index.cjs.js",
12
- "types": "./dist/index.d.ts"
13
- },
14
- "./jsx-runtime": {
15
- "import": "./dist/index.cjs.js",
16
- "require": "./dist/index.cjs.js",
17
- "types": "./dist/index.d.ts"
18
- }
2
+ "name": "@cocojs/mvc",
3
+ "version": "0.1.0-beta.6",
4
+ "description": "由装饰器驱动,快速构建可扩展的 Web 应用。",
5
+ "main": "dist/index.cjs.js",
6
+ "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/index.cjs.js",
10
+ "require": "./dist/index.cjs.js",
11
+ "types": "./dist/index.d.ts"
19
12
  },
20
- "files": [
21
- "dist"
22
- ],
23
- "keywords": [
24
- "cocojs"
25
- ],
26
- "author": "",
27
- "homepage": "https://github.com/cocojs-org/coconut-framework",
28
- "license": "MIT"
29
- }
13
+ "./jsx-runtime": {
14
+ "import": "./dist/index.cjs.js",
15
+ "require": "./dist/index.cjs.js",
16
+ "types": "./dist/index.d.ts"
17
+ }
18
+ },
19
+ "files": [
20
+ "dist"
21
+ ],
22
+ "keywords": [
23
+ "cocojs"
24
+ ],
25
+ "author": "",
26
+ "publishConfig": {
27
+ "registry": "https://registry.npmjs.org/",
28
+ "access": "public"
29
+ },
30
+ "homepage": "https://github.com/cocojs-org/coconut-framework",
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "https://github.com/cocojs-org/coconut-framework.git"
34
+ },
35
+ "license": "MIT",
36
+ "scripts": {}
37
+ }