Skip to content

Commit 7771d33

Browse files
authored
Unship devtools/editor-related code (#1135)
1 parent 721219a commit 7771d33

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+19
-4023
lines changed

mesop/editor/BUILD

-31
This file was deleted.

mesop/editor/__init__.py

Whitespace-only changes.

mesop/editor/component_configs.py

-153
This file was deleted.

mesop/editor/component_configs_test.py

-89
This file was deleted.

mesop/protos/ui.proto

+12-76
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,6 @@ message RenderEvent {
174174
repeated Command commands = 4;
175175

176176
repeated string js_modules = 6;
177-
178-
// Only sent in editor mode:
179-
repeated ComponentConfig component_configs = 5;
180177
}
181178

182179

@@ -345,6 +342,18 @@ message Type {
345342
optional int32 type_index = 7;
346343
}
347344

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+
348357
message WebComponentType {
349358
optional string properties_json = 1;
350359
optional string events_json = 2;
@@ -463,76 +472,3 @@ message BorderSide {
463472
optional string color = 2;
464473
optional string style = 3;
465474
}
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-
}

mesop/server/BUILD

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ py_library(
3232
),
3333
deps = [
3434
"//mesop/component_helpers",
35-
"//mesop/editor",
3635
"//mesop/env",
3736
"//mesop/events",
3837
"//mesop/protos:ui_py_pb2",

0 commit comments

Comments
 (0)