@@ -174,9 +174,6 @@ message RenderEvent {
174
174
repeated Command commands = 4 ;
175
175
176
176
repeated string js_modules = 6 ;
177
-
178
- // Only sent in editor mode:
179
- repeated ComponentConfig component_configs = 5 ;
180
177
}
181
178
182
179
@@ -345,6 +342,18 @@ message Type {
345
342
optional int32 type_index = 7 ;
346
343
}
347
344
345
+ message ComponentName {
346
+ oneof module_id {
347
+ // Python module path, e.g. "mesop.labs.layout"
348
+ string module_path = 1 ;
349
+ // If the component belongs to Mesop
350
+ // (e.g. used with `import mesop as me`), then set to true.
351
+ bool core_module = 2 ;
352
+ }
353
+ // The Python function name (e.g. `text`).
354
+ optional string fn_name = 3 ;
355
+ }
356
+
348
357
message WebComponentType {
349
358
optional string properties_json = 1 ;
350
359
optional string events_json = 2 ;
@@ -463,76 +472,3 @@ message BorderSide {
463
472
optional string color = 2 ;
464
473
optional string style = 3 ;
465
474
}
466
-
467
- message ComponentConfig {
468
- optional ComponentName component_name = 1 ;
469
- optional string category = 2 ;
470
- repeated EditorField fields = 3 ;
471
- optional bool accepts_child = 4 ;
472
- }
473
-
474
- message ComponentName {
475
- oneof module_id {
476
- // Python module path, e.g. "mesop.labs.layout"
477
- string module_path = 1 ;
478
- // If the component belongs to Mesop
479
- // (e.g. used with `import mesop as me`), then set to true.
480
- bool core_module = 2 ;
481
- }
482
- // The Python function name (e.g. `text`).
483
- optional string fn_name = 3 ;
484
- }
485
-
486
- message EditorField {
487
- optional string name = 1 ;
488
- optional FieldType type = 2 ;
489
- }
490
-
491
- message FieldType {
492
- oneof type {
493
- BoolType bool_type = 1 ;
494
- IntType int_type = 2 ;
495
- FloatType float_type = 3 ;
496
- StringType string_type = 4 ;
497
- LiteralType literal_type = 5 ;
498
- ListType list_type = 6 ;
499
- StructType struct_type = 7 ;
500
- }
501
- }
502
-
503
- message BoolType {
504
- optional bool default_value = 1 ;
505
- }
506
-
507
- message StructType {
508
- // Name of the Python class (usually a dataclass)
509
- optional string struct_name = 2 ;
510
- repeated EditorField fields = 1 ;
511
- }
512
-
513
- message IntType {
514
- optional int32 default_value = 1 ;
515
- }
516
-
517
- message FloatType {
518
- optional double default_value = 1 ;
519
- }
520
-
521
- message StringType {
522
- optional string default_value = 1 ;
523
- }
524
-
525
- message LiteralType {
526
- repeated LiteralElement literals = 1 ; // note: defaults to first element
527
- }
528
-
529
- message LiteralElement {
530
- oneof literal {
531
- string string_literal = 1 ;
532
- int32 int_literal = 2 ;
533
- }
534
- }
535
-
536
- message ListType {
537
- optional FieldType type = 1 ;
538
- }
0 commit comments