ea 0.6.151 → 0.6.153

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 515072039a1723a02b86d982018e14d5589f136dc8bbb468110fb48c00c92b9c
4
- data.tar.gz: 4aa92a3b722a8edcf8da96d4af095309d11b1492b3d49db5d571d1c13774b755
3
+ metadata.gz: 2ef7fb38e9a4c96a78c198a369e93065867cc0e8926cecf529a427bcec406e6c
4
+ data.tar.gz: 30e9bc2f91423a2b21787868d10bd78eee8ed97de160c4b72ec021696be1cc62
5
5
  SHA512:
6
- metadata.gz: '08a7d4c03c831dfae2453f0f2e801dabfc9e0c530c2b29f18abfd4ad9a00c805b03be5a233d063d7d69b58b76a970ef5fec7411cab0503b3843a4b8c65d1d796'
7
- data.tar.gz: 92094ceb4ca92a40d28543889b9de48a5466f2789fcbff331b6ac08629dcb7d36231b82c618ee5cfab2f7048d54a4fa7f02fbb96400cb86b512d2425d82b42b7
6
+ metadata.gz: 0c88a3bcde34d1e9ec516ac410a2ea130990810d5d473a7fea491024f4026efaa3d011accf1d9de9042a7b678df37a27f38aa3583ebb578dfc68efe5e38921bd
7
+ data.tar.gz: a30bf0e6faa31a95be9133b494c7f131f7cc882cc265e86d349cf8c4bd9136eb8257c8b0fd6158be375727868e3e03b9e70f4cc0c64d6cab5258ac56c82e7c72
@@ -9,39 +9,6 @@ last_updated: "2025-10-30"
9
9
  phase: "Phase 4 - EA to UML Transformation Layer"
10
10
 
11
11
  # Model class mappings
12
- model_classes:
13
- t_object: Lutaml::Qea::Models::EaObject
14
- t_attribute: Lutaml::Qea::Models::EaAttribute
15
- t_operation: Lutaml::Qea::Models::EaOperation
16
- t_operationparams: Lutaml::Qea::Models::EaOperationParam
17
- t_connector: Lutaml::Qea::Models::EaConnector
18
- t_package: Lutaml::Qea::Models::EaPackage
19
- t_diagram: Lutaml::Qea::Models::EaDiagram
20
- t_diagramobjects: Lutaml::Qea::Models::EaDiagramObject
21
- t_diagramlinks: Lutaml::Qea::Models::EaDiagramLink
22
- t_objectconstraint: Lutaml::Qea::Models::EaObjectConstraint
23
- t_taggedvalue: Lutaml::Qea::Models::EaTaggedValue
24
- t_objectproperties: Lutaml::Qea::Models::EaObjectProperty
25
- t_attributetag: Lutaml::Qea::Models::EaAttributeTag
26
- t_xref: Lutaml::Qea::Models::EaXref
27
- t_document: Lutaml::Qea::Models::EaDocument
28
- t_image: Lutaml::Qea::Models::EaImage
29
- t_glossary: Lutaml::Qea::Models::EaGlossary
30
- t_lists: Lutaml::Qea::Models::EaList
31
- t_versions: Lutaml::Qea::Models::EaVersion
32
- t_phase: Lutaml::Qea::Models::EaPhase
33
- t_authors: Lutaml::Qea::Models::EaAuthor
34
- t_script: Lutaml::Qea::Models::EaScript
35
- t_stereotypes: Lutaml::Qea::Models::EaStereotype
36
- t_datatypes: Lutaml::Qea::Models::EaDatatype
37
- t_constrainttypes: Lutaml::Qea::Models::EaConstraintType
38
- t_connectortypes: Lutaml::Qea::Models::EaConnectorType
39
- t_diagramtypes: Lutaml::Qea::Models::EaDiagramType
40
- t_objecttypes: Lutaml::Qea::Models::EaObjectType
41
- t_statustypes: Lutaml::Qea::Models::EaStatusType
42
- t_complexitytypes: Lutaml::Qea::Models::EaComplexityType
43
-
44
- # Type mappings for SQLite to Ruby
45
12
  type_mappings:
46
13
  INTEGER: integer
47
14
  TEXT: string
@@ -1326,55 +1293,3 @@ tables:
1326
1293
  type: TEXT
1327
1294
  nullable: true
1328
1295
 
1329
- # Transformation mappings for EA to UML conversion
1330
- transformations:
1331
- # EA Object Type to UML Model mappings
1332
- object_types:
1333
- Class: Lutaml::Uml::Class
1334
- Interface: Lutaml::Uml::Class # With interface stereotype
1335
- Enumeration: Lutaml::Uml::Enum
1336
- DataType: Lutaml::Uml::DataType
1337
- Package: Lutaml::Uml::Package
1338
- Component: Lutaml::Uml::Class # With component stereotype
1339
- Node: Lutaml::Uml::Class
1340
- Actor: Lutaml::Uml::Actor
1341
- UseCase: Lutaml::Uml::Class
1342
-
1343
- # EA Connector Type to UML Model mappings
1344
- connector_types:
1345
- Association: Lutaml::Uml::Association
1346
- Generalization: Lutaml::Uml::Generalization
1347
- Aggregation: Lutaml::Uml::Association # With aggregation property
1348
- Composition: Lutaml::Uml::Association # With composition property
1349
- Dependency: Lutaml::Uml::Dependency
1350
- Realization: Lutaml::Uml::Realization
1351
- Abstraction: Lutaml::Uml::Abstraction
1352
-
1353
- # Visibility mapping from EA to UML
1354
- visibility_mapping:
1355
- Public: public
1356
- Private: private
1357
- Protected: protected
1358
- Package: package
1359
-
1360
- # Cardinality patterns
1361
- cardinality_patterns:
1362
- "0..1": { min: "0", max: "1" }
1363
- "1": { min: "1", max: "1" }
1364
- "0..*": { min: "0", max: "*" }
1365
- "1..*": { min: "1", max: "*" }
1366
- "*": { min: "0", max: "*" }
1367
-
1368
- # Transformer class mappings
1369
- transformers:
1370
- class: Lutaml::Qea::Factory::ClassTransformer
1371
- attribute: Lutaml::Qea::Factory::AttributeTransformer
1372
- operation: Lutaml::Qea::Factory::OperationTransformer
1373
- association: Lutaml::Qea::Factory::AssociationTransformer
1374
- generalization: Lutaml::Qea::Factory::GeneralizationTransformer
1375
- package: Lutaml::Qea::Factory::PackageTransformer
1376
- diagram: Lutaml::Qea::Factory::DiagramTransformer
1377
- constraint: Lutaml::Qea::Factory::ConstraintTransformer
1378
- tagged_value: Lutaml::Qea::Factory::TaggedValueTransformer
1379
- object_property: Lutaml::Qea::Factory::ObjectPropertyTransformer
1380
- attribute_tag: Lutaml::Qea::Factory::AttributeTagTransformer
@@ -36,20 +36,38 @@ module Ea
36
36
  ]
37
37
  end
38
38
 
39
+ # `ea list --type` keyword registries. Object types go through
40
+ # EaObjectRepository#find_by_type; the rest map to Database
41
+ # collections. Register new keywords here — no dispatch code
42
+ # changes needed.
43
+ OBJECT_TYPE_ALIASES = {
44
+ "class" => "Class",
45
+ "interface" => "Interface",
46
+ "enum" => "Enumeration"
47
+ }.freeze
48
+ COLLECTION_ALIASES = {
49
+ "package" => :packages,
50
+ "diagram" => :diagrams,
51
+ "connector" => :connectors
52
+ }.freeze
53
+
39
54
  def list_by_type(type)
40
55
  db = load_database
41
- case type.to_s
42
- when "class" then db.objects.find_by_type("Class").map { |o| [o.name, o.ea_guid] }
43
- when "interface" then db.objects.find_by_type("Interface").map { |o| [o.name, o.ea_guid] }
44
- when "enum" then db.objects.find_by_type("Enumeration").map { |o| [o.name, o.ea_guid] }
45
- when "package" then db.packages.map { |p| [p.name, p.ea_guid] }
46
- when "diagram" then db.diagrams.map { |d| [d.name, d.ea_guid] }
47
- when "connector" then db.connectors.map { |c| [c.name, c.ea_guid] }
48
- else
49
- raise Ea::Cli::Error,
50
- "Unknown type '#{type}'. " \
51
- "Valid: class, interface, package, diagram, connector, enum"
52
- end
56
+ key = type.to_s
57
+ return named_object_rows(db, OBJECT_TYPE_ALIASES.fetch(key)) if OBJECT_TYPE_ALIASES.key?(key)
58
+ return collection_rows(db, COLLECTION_ALIASES.fetch(key)) if COLLECTION_ALIASES.key?(key)
59
+
60
+ raise Ea::Cli::Error,
61
+ "Unknown type '#{type}'. " \
62
+ "Valid: #{(OBJECT_TYPE_ALIASES.keys + COLLECTION_ALIASES.keys).join(', ')}"
63
+ end
64
+
65
+ def named_object_rows(db, ea_type)
66
+ db.objects.find_by_type(ea_type).map { |o| [o.name, o.ea_guid] }
67
+ end
68
+
69
+ def collection_rows(db, collection)
70
+ db.public_send(collection).map { |r| [r.name, r.ea_guid] }
53
71
  end
54
72
 
55
73
  def columns_for_current_mode
@@ -15,7 +15,6 @@ module Ea
15
15
  autoload :Render, "ea/cli/command/render"
16
16
  autoload :Export, "ea/cli/command/export"
17
17
  autoload :Mdg, "ea/cli/command/mdg"
18
- autoload :RepositoryBuilder, "ea/cli/command/repository_builder"
19
18
  autoload :Diff, "ea/cli/command/diff"
20
19
  autoload :Lint, "ea/cli/command/lint"
21
20
  autoload :Query, "ea/cli/command/query"
@@ -57,31 +57,56 @@ module Ea
57
57
  objs.flat_map { |o| class_block(o) }
58
58
  end
59
59
 
60
- # Emit `class X { +attr: T ... }` or `enum X { LITERAL1 ... }`.
60
+ # EA connector type → PlantUML arrow. Generalization is
61
+ # special-cased in connector_lines (reversed `<|--` form);
62
+ # unregistered types fall back to the dependency arrow.
63
+ ARROWS = {
64
+ "Association" => "--",
65
+ "Aggregation" => "o--",
66
+ "Composition" => "*--"
67
+ }.freeze
68
+
69
+ # EA object_type → PlantUML declaration keyword for the
70
+ # body-less emitters; Class/Enumeration have their own body
71
+ # builders (see class_block). Unregistered types emit `class`.
72
+ KEYWORD_BY_TYPE = {
73
+ "Interface" => "interface",
74
+ "DataType" => "abstract class"
75
+ }.freeze
76
+
61
77
  def class_block(obj)
62
78
  case obj.object_type
63
79
  when "Class"
64
- attrs = class_attributes(obj)
65
- body = attrs.map { |a| "+#{a.name}: #{a.type || 'String'}" }
66
- return ["class #{obj.name}"] if body.empty?
67
-
68
- ["class #{obj.name} {", *body.map { |b| " #{b}" }, "}"]
80
+ class_with_attributes_block(obj)
69
81
  when "Enumeration"
70
- literals = enum_literals(obj)
71
- return ["enum #{obj.name}"] if literals.empty?
72
-
73
- ["enum #{obj.name} {",
74
- *literals.map { |l| " #{l.name || l}" },
75
- "}"]
76
- when "Interface"
77
- ["interface #{obj.name}"]
78
- when "DataType"
79
- ["abstract class #{obj.name}"]
82
+ enum_block(obj)
80
83
  else
81
- ["class #{obj.name}"]
84
+ keyword_block(obj)
82
85
  end
83
86
  end
84
87
 
88
+ def class_with_attributes_block(obj)
89
+ attrs = class_attributes(obj)
90
+ body = attrs.map { |a| "+#{a.name}: #{a.type || 'String'}" }
91
+ return ["class #{obj.name}"] if body.empty?
92
+
93
+ ["class #{obj.name} {", *body.map { |b| " #{b}" }, "}"]
94
+ end
95
+
96
+ def enum_block(obj)
97
+ literals = enum_literals(obj)
98
+ return ["enum #{obj.name}"] if literals.empty?
99
+
100
+ ["enum #{obj.name} {",
101
+ *literals.map { |l| " #{l.name || l}" },
102
+ "}"]
103
+ end
104
+
105
+ def keyword_block(obj)
106
+ keyword = KEYWORD_BY_TYPE.fetch(obj.object_type, "class")
107
+ ["#{keyword} #{obj.name}"]
108
+ end
109
+
85
110
  # Generalizations: `<|`-style inheritance.
86
111
  # Associations: multiplicity + role names.
87
112
  def connector_lines
@@ -90,28 +115,16 @@ module Ea
90
115
  tgt = find_object(conn.end_object_id)
91
116
  next nil unless src && tgt
92
117
 
93
- case conn.connector_type
94
- when "Generalization"
118
+ if conn.connector_type == "Generalization"
95
119
  "#{tgt.name} <|-- #{src.name}"
96
- when "Association", "Aggregation", "Composition"
97
- assoc_arrow(src, tgt, conn)
98
120
  else
121
+ arrow = ARROWS.fetch(conn.connector_type, "-->")
99
122
  label = conn.name ? " : #{conn.name}" : ""
100
- "#{src.name} --> #{tgt.name}#{label}"
123
+ "#{src.name} #{arrow} #{tgt.name}#{label}"
101
124
  end
102
125
  end
103
126
  end
104
127
 
105
- def assoc_arrow(src, tgt, conn)
106
- arrow = case conn.connector_type
107
- when "Composition" then "*--"
108
- when "Aggregation" then "o--"
109
- else "--"
110
- end
111
- label = conn.name ? " : #{conn.name}" : ""
112
- "#{src.name} #{arrow} #{tgt.name}#{label}"
113
- end
114
-
115
128
  def packages_index
116
129
  (model.collections[:packages] || []).each_with_object({}) do |p, acc|
117
130
  acc[p.package_id] = p
@@ -217,29 +217,37 @@ module Ea
217
217
  pkg&.qualified_name || ""
218
218
  end
219
219
 
220
+ # Element-kind registries. Register a new Ea::Model type here —
221
+ # no dispatch code changes needed. Payload augmenters are matched
222
+ # by ancestry, so Classifier registrations cover its subclasses.
223
+ KIND_BY_CLASS = {
224
+ Ea::Model::Klass => "class",
225
+ Ea::Model::Enumeration => "enumeration",
226
+ Ea::Model::DataType => "data_type",
227
+ Ea::Model::PrimitiveType => "primitive_type",
228
+ Ea::Model::Interface => "interface",
229
+ Ea::Model::Package => "package",
230
+ Ea::Model::Diagram => "diagram"
231
+ }.freeze
232
+
233
+ PAYLOAD_AUGMENTERS = {
234
+ Ea::Model::Classifier => :augment_classifier_payload!,
235
+ Ea::Model::Package => :augment_package_payload!,
236
+ Ea::Model::Diagram => :augment_diagram_payload!
237
+ }.freeze
238
+
220
239
  def kind_of(element)
221
- case element
222
- when Ea::Model::Klass then "class"
223
- when Ea::Model::Enumeration then "enumeration"
224
- when Ea::Model::DataType then "data_type"
225
- when Ea::Model::PrimitiveType then "primitive_type"
226
- when Ea::Model::Interface then "interface"
227
- when Ea::Model::Package then "package"
228
- when Ea::Model::Diagram then "diagram"
229
- else "element"
230
- end
240
+ KIND_BY_CLASS.fetch(element.class, "element")
231
241
  end
232
242
 
233
243
  def payload_for(model_element)
234
244
  payload = JSON.parse(model_element.to_json)
235
- case model_element
236
- when Ea::Model::Classifier
237
- augment_classifier_payload!(payload, model_element)
238
- when Ea::Model::Package
239
- payload["classifierIds"] = classifiers_in_package_ids(model_element.id)
240
- payload["diagramIds"] = diagram_ids_for_package(model_element.id)
241
- when Ea::Model::Diagram
242
- augment_diagram_payload!(payload, model_element)
245
+ augmenter_class = PAYLOAD_AUGMENTERS.keys.find do |klass|
246
+ model_element.is_a?(klass)
247
+ end
248
+ if augmenter_class
249
+ public_send(PAYLOAD_AUGMENTERS[augmenter_class], payload,
250
+ model_element)
243
251
  end
244
252
  payload
245
253
  end
@@ -249,6 +257,9 @@ module Ea
249
257
  []) + document.diagrams.select { |d| d.package_id == package_id }.map(&:id)
250
258
  end
251
259
 
260
+ # Payload augmenters — public (dispatched by PAYLOAD_AUGMENTERS).
261
+ public
262
+
252
263
  def augment_classifier_payload!(payload, classifier)
253
264
  rels = document.relationships_for(classifier.id)
254
265
  payload["generalizations"] = rels
@@ -298,6 +309,12 @@ module Ea
298
309
  "(#{diagram.name.inspect}): #{e.class}: #{e.message}"
299
310
  payload
300
311
  end
312
+
313
+ def augment_package_payload!(payload, package)
314
+ payload["classifierIds"] = classifiers_in_package_ids(package.id)
315
+ payload["diagramIds"] = diagram_ids_for_package(package.id)
316
+ payload
317
+ end
301
318
  end
302
319
  end
303
- end
320
+ end
@@ -102,18 +102,13 @@ module Ea
102
102
  end
103
103
 
104
104
  def diagram_label_prefix(diagram)
105
- case diagram.diagram_type&.downcase
106
- when "logical" then "class"
107
- when "package" then "pkg"
108
- when "usecase" then "uc"
109
- when "sequence" then "seq"
110
- when "activity" then "act"
111
- when "statechart" then "sm"
112
- when "deployment" then "dep"
113
- when "component" then "comp"
114
- when "object" then "object"
115
- when "custom", "conceptual" then nil
116
- else diagram.diagram_type&.downcase
105
+ type = diagram.diagram_type&.downcase
106
+ return unless type
107
+
108
+ if DIAGRAM_TYPE_LABELS.key?(type)
109
+ DIAGRAM_TYPE_LABELS[type]
110
+ else
111
+ type
117
112
  end
118
113
  end
119
114
 
@@ -144,6 +139,24 @@ module Ea
144
139
  BORDER_STYLE = "stroke-width:1;stroke-linecap:square;stroke-linejoin:miter; fill:#000000;fill-opacity:0.00; stroke:#000000; stroke-opacity:1.00"
145
140
  TAB_STYLE = "stroke-width:1;stroke-linecap:square;stroke-linejoin:miter; fill:#FFFFFF;fill-opacity:1.00; stroke:#000000; stroke-opacity:1.00"
146
141
  LABEL_STYLE = "stroke-width:1;stroke-linecap:square;stroke-linejoin:miter; fill:#000000;fill-opacity:1.00; stroke:#000000; stroke-opacity:0.00"
142
+
143
+ # EA diagram type → tab-label prefix. `nil` suppresses the
144
+ # prefix (custom/conceptual diagrams show only the name).
145
+ # Unregistered types fall through as-is (downcased).
146
+ # Register new types here — no dispatch code changes needed.
147
+ DIAGRAM_TYPE_LABELS = {
148
+ "logical" => "class",
149
+ "package" => "pkg",
150
+ "usecase" => "uc",
151
+ "sequence" => "seq",
152
+ "activity" => "act",
153
+ "statechart" => "sm",
154
+ "deployment" => "dep",
155
+ "component" => "comp",
156
+ "object" => "object",
157
+ "custom" => nil,
158
+ "conceptual" => nil
159
+ }.freeze
147
160
  end
148
161
  end
149
162
  end
@@ -8,23 +8,174 @@ module Ea
8
8
  # fonts, colors, strokes, canvas insets, compartment spacing,
9
9
  # marker geometry, etc. No renderer hardcodes appearance
10
10
  # numbers — every value comes from the active Definition.
11
+ #
12
+ # The nested group classes below are lutaml-model Serializable:
13
+ # they are the declared wire shapes parsed by ThemeDocument from
14
+ # config/themes/*.yml. Values are nil-able here — group-level
15
+ # coalescing defaults are applied by the Loader when flattening
16
+ # into Definition.
11
17
  class Definition
12
- Geometry = Struct.new(:inset_left, :inset_right, :inset_top, :inset_bottom,
13
- keyword_init: true)
14
- FrameSpec = Struct.new(:inset, :tab_height, :tab_slant, :tab_label_x,
15
- :tab_label_y, :tab_padding, keyword_init: true)
16
- CompartmentSpec = Struct.new(:header_top_padding, :header_line_offset,
17
- :divider_offset, :attr_line_offset,
18
- :attr_first_offset, :op_line_offset,
19
- keyword_init: true)
20
- AttrSpec = Struct.new(:visibility_x_offset, :content_x_offset, keyword_init: true)
21
- MarkerSpec = Struct.new(:diamond_half_width, :diamond_half_height,
22
- :triangle_half_base, :triangle_height,
23
- :arrow_half_base, :arrow_height, keyword_init: true)
24
- PackageSpec = Struct.new(:tab_height, :tab_label_padding, :default_tab_width,
25
- keyword_init: true)
26
- NoteSpec = Struct.new(:fold_size, :text_x_offset, :text_y_offset,
27
- :line_height, keyword_init: true)
18
+ class FontSpec < Lutaml::Model::Serializable
19
+ attribute :family, :string
20
+ attribute :size, :integer
21
+ attribute :unit, :string
22
+ attribute :weight_normal, :integer
23
+ attribute :weight_bold, :integer
24
+
25
+ yaml do
26
+ map "family", to: :family
27
+ map "size", to: :size
28
+ map "unit", to: :unit
29
+ map "weight_normal", to: :weight_normal
30
+ map "weight_bold", to: :weight_bold
31
+ end
32
+ end
33
+
34
+ class ColorsSpec < Lutaml::Model::Serializable
35
+ attribute :text, :string
36
+ attribute :attribute_text, :string
37
+ attribute :method_text, :string
38
+ attribute :border, :string
39
+ attribute :fill, :string
40
+ attribute :background, :string
41
+ attribute :stroke_in_text, :string
42
+
43
+ yaml do
44
+ map "text", to: :text
45
+ map "attribute_text", to: :attribute_text
46
+ map "method_text", to: :method_text
47
+ map "border", to: :border
48
+ map "fill", to: :fill
49
+ map "background", to: :background
50
+ map "stroke_in_text", to: :stroke_in_text
51
+ end
52
+ end
53
+
54
+ class StrokesSpec < Lutaml::Model::Serializable
55
+ attribute :element_border, :integer
56
+ attribute :connector_line, :integer
57
+ attribute :divider, :integer
58
+ attribute :marker, :integer
59
+
60
+ yaml do
61
+ map "element_border", to: :element_border
62
+ map "connector_line", to: :connector_line
63
+ map "divider", to: :divider
64
+ map "marker", to: :marker
65
+ end
66
+ end
67
+
68
+ class TextMetricsSpec < Lutaml::Model::Serializable
69
+ attribute :width_factor, :float
70
+
71
+ yaml do
72
+ map "width_factor", to: :width_factor
73
+ end
74
+ end
75
+
76
+ class Geometry < Lutaml::Model::Serializable
77
+ attribute :inset_left, :integer
78
+ attribute :inset_right, :integer
79
+ attribute :inset_top, :integer
80
+ attribute :inset_bottom, :integer
81
+
82
+ yaml do
83
+ map "inset_left", to: :inset_left
84
+ map "inset_right", to: :inset_right
85
+ map "inset_top", to: :inset_top
86
+ map "inset_bottom", to: :inset_bottom
87
+ end
88
+ end
89
+
90
+ class FrameSpec < Lutaml::Model::Serializable
91
+ attribute :inset, :integer
92
+ attribute :tab_height, :integer
93
+ attribute :tab_slant, :integer
94
+ attribute :tab_label_x, :integer
95
+ attribute :tab_label_y, :integer
96
+ attribute :tab_padding, :integer
97
+
98
+ yaml do
99
+ map "inset", to: :inset
100
+ map "tab_height", to: :tab_height
101
+ map "tab_slant", to: :tab_slant
102
+ map "tab_label_x", to: :tab_label_x
103
+ map "tab_label_y", to: :tab_label_y
104
+ map "tab_padding", to: :tab_padding
105
+ end
106
+ end
107
+
108
+ class CompartmentSpec < Lutaml::Model::Serializable
109
+ attribute :header_top_padding, :integer
110
+ attribute :header_line_offset, :integer
111
+ attribute :divider_offset, :integer
112
+ attribute :attr_line_offset, :integer
113
+ attribute :attr_first_offset, :integer
114
+ attribute :op_line_offset, :integer
115
+
116
+ yaml do
117
+ map "header_top_padding", to: :header_top_padding
118
+ map "header_line_offset", to: :header_line_offset
119
+ map "divider_offset", to: :divider_offset
120
+ map "attr_line_offset", to: :attr_line_offset
121
+ map "attr_first_offset", to: :attr_first_offset
122
+ map "op_line_offset", to: :op_line_offset
123
+ end
124
+ end
125
+
126
+ class AttrSpec < Lutaml::Model::Serializable
127
+ attribute :visibility_x_offset, :integer
128
+ attribute :content_x_offset, :integer
129
+
130
+ yaml do
131
+ map "visibility_x_offset", to: :visibility_x_offset
132
+ map "content_x_offset", to: :content_x_offset
133
+ end
134
+ end
135
+
136
+ class MarkerSpec < Lutaml::Model::Serializable
137
+ attribute :diamond_half_width, :integer
138
+ attribute :diamond_half_height, :integer
139
+ attribute :triangle_half_base, :integer
140
+ attribute :triangle_height, :integer
141
+ attribute :arrow_half_base, :integer
142
+ attribute :arrow_height, :integer
143
+
144
+ yaml do
145
+ map "diamond_half_width", to: :diamond_half_width
146
+ map "diamond_half_height", to: :diamond_half_height
147
+ map "triangle_half_base", to: :triangle_half_base
148
+ map "triangle_height", to: :triangle_height
149
+ map "arrow_half_base", to: :arrow_half_base
150
+ map "arrow_height", to: :arrow_height
151
+ end
152
+ end
153
+
154
+ class PackageSpec < Lutaml::Model::Serializable
155
+ attribute :tab_height, :integer
156
+ attribute :tab_label_padding, :integer
157
+ attribute :default_tab_width, :integer
158
+
159
+ yaml do
160
+ map "tab_height", to: :tab_height
161
+ map "tab_label_padding", to: :tab_label_padding
162
+ map "default_tab_width", to: :default_tab_width
163
+ end
164
+ end
165
+
166
+ class NoteSpec < Lutaml::Model::Serializable
167
+ attribute :fold_size, :integer
168
+ attribute :text_x_offset, :integer
169
+ attribute :text_y_offset, :integer
170
+ attribute :line_height, :integer
171
+
172
+ yaml do
173
+ map "fold_size", to: :fold_size
174
+ map "text_x_offset", to: :text_x_offset
175
+ map "text_y_offset", to: :text_y_offset
176
+ map "line_height", to: :line_height
177
+ end
178
+ end
28
179
 
29
180
  attr_reader :id, :name,
30
181
  :font_family, :font_size, :font_size_unit,