drawio_dsl 0.8.0 → 0.8.1
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 +4 -4
- data/.builders/.data/shapes.json +9 -0
- data/.builders/.templates/basic/dom_builder_shapes.rb +2 -1
- data/.builders/.templates/basic/drawio_shapes.rb +2 -2
- data/.builders/blueprint/shapes.rb +18 -0
- data/.builders/generators/{project_plans/drawio_dsl.rb → project-plan.rb} +14 -11
- data/.builders/generators/sample_diagrams/05-samples.rb +19 -6
- data/.builders/generators/sample_diagrams/30-html-shapes.rb +6 -6
- data/.builders/generators/sample_diagrams/35-ids-and-arrows.rb +20 -0
- data/CHANGELOG.md +7 -0
- data/docs/project-plan/project.drawio +128 -0
- data/docs/project-plan/project_done.svg +3 -0
- data/docs/project-plan/project_in_progress.svg +3 -0
- data/docs/project-plan/project_todo.svg +3 -0
- data/docs/project-plan.md +3 -3
- data/docs/samples/styles-glass.svg +1 -1
- data/docs/samples/styles-plain.svg +1 -1
- data/docs/samples/styles-rounded.svg +1 -1
- data/docs/samples/styles-shadow.svg +1 -1
- data/docs/samples/styles-sketch.svg +1 -1
- data/lib/drawio_dsl/dom_builder_shapes.rb +80 -40
- data/lib/drawio_dsl/drawio_shapes.rb +80 -80
- data/lib/drawio_dsl/formatters/interface_formatter.rb +5 -3
- data/lib/drawio_dsl/formatters/klass_formatter.rb +4 -2
- data/lib/drawio_dsl/version.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- metadata +8 -7
- data/.builders/generators/project_plans/k_doc.rb +0 -39
- data/docs/project_done.svg +0 -3
- data/docs/project_in_progress.svg +0 -3
- data/docs/project_todo.svg +0 -3
@@ -4,202 +4,242 @@
|
|
4
4
|
module DrawioDsl
|
5
5
|
# DrawioDsl is a DSL for draw-io diagrams.
|
6
6
|
module DomBuilderShapes
|
7
|
-
def add_h1(**opts, &block)
|
7
|
+
def add_h1(id = nil, **opts, &block)
|
8
|
+
opts = { id: id }.merge(opts) if id
|
8
9
|
h1 = DrawioDsl::Schema::H1.new(current_page, **opts, &block)
|
9
10
|
add_shape(h1)
|
10
11
|
end
|
11
12
|
|
12
|
-
def add_h2(**opts, &block)
|
13
|
+
def add_h2(id = nil, **opts, &block)
|
14
|
+
opts = { id: id }.merge(opts) if id
|
13
15
|
h2 = DrawioDsl::Schema::H2.new(current_page, **opts, &block)
|
14
16
|
add_shape(h2)
|
15
17
|
end
|
16
18
|
|
17
|
-
def add_h3(**opts, &block)
|
19
|
+
def add_h3(id = nil, **opts, &block)
|
20
|
+
opts = { id: id }.merge(opts) if id
|
18
21
|
h3 = DrawioDsl::Schema::H3.new(current_page, **opts, &block)
|
19
22
|
add_shape(h3)
|
20
23
|
end
|
21
24
|
|
22
|
-
def add_h4(**opts, &block)
|
25
|
+
def add_h4(id = nil, **opts, &block)
|
26
|
+
opts = { id: id }.merge(opts) if id
|
23
27
|
h4 = DrawioDsl::Schema::H4.new(current_page, **opts, &block)
|
24
28
|
add_shape(h4)
|
25
29
|
end
|
26
30
|
|
27
|
-
def add_h5(**opts, &block)
|
31
|
+
def add_h5(id = nil, **opts, &block)
|
32
|
+
opts = { id: id }.merge(opts) if id
|
28
33
|
h5 = DrawioDsl::Schema::H5.new(current_page, **opts, &block)
|
29
34
|
add_shape(h5)
|
30
35
|
end
|
31
36
|
|
32
|
-
def add_h6(**opts, &block)
|
37
|
+
def add_h6(id = nil, **opts, &block)
|
38
|
+
opts = { id: id }.merge(opts) if id
|
33
39
|
h6 = DrawioDsl::Schema::H6.new(current_page, **opts, &block)
|
34
40
|
add_shape(h6)
|
35
41
|
end
|
36
42
|
|
37
|
-
def add_p(**opts, &block)
|
43
|
+
def add_p(id = nil, **opts, &block)
|
44
|
+
opts = { id: id }.merge(opts) if id
|
38
45
|
p = DrawioDsl::Schema::P.new(current_page, **opts, &block)
|
39
46
|
add_shape(p)
|
40
47
|
end
|
41
48
|
|
42
|
-
def add_actor(**opts, &block)
|
49
|
+
def add_actor(id = nil, **opts, &block)
|
50
|
+
opts = { id: id }.merge(opts) if id
|
43
51
|
actor = DrawioDsl::Schema::Actor.new(current_page, **opts, &block)
|
44
52
|
add_shape(actor)
|
45
53
|
end
|
46
54
|
|
47
|
-
def add_actor2(**opts, &block)
|
55
|
+
def add_actor2(id = nil, **opts, &block)
|
56
|
+
opts = { id: id }.merge(opts) if id
|
48
57
|
actor2 = DrawioDsl::Schema::Actor2.new(current_page, **opts, &block)
|
49
58
|
add_shape(actor2)
|
50
59
|
end
|
51
60
|
|
52
|
-
def add_callout(**opts, &block)
|
61
|
+
def add_callout(id = nil, **opts, &block)
|
62
|
+
opts = { id: id }.merge(opts) if id
|
53
63
|
callout = DrawioDsl::Schema::Callout.new(current_page, **opts, &block)
|
54
64
|
add_shape(callout)
|
55
65
|
end
|
56
66
|
|
57
|
-
def add_callout2(**opts, &block)
|
67
|
+
def add_callout2(id = nil, **opts, &block)
|
68
|
+
opts = { id: id }.merge(opts) if id
|
58
69
|
callout2 = DrawioDsl::Schema::Callout2.new(current_page, **opts, &block)
|
59
70
|
add_shape(callout2)
|
60
71
|
end
|
61
72
|
|
62
|
-
def add_callout3(**opts, &block)
|
73
|
+
def add_callout3(id = nil, **opts, &block)
|
74
|
+
opts = { id: id }.merge(opts) if id
|
63
75
|
callout3 = DrawioDsl::Schema::Callout3.new(current_page, **opts, &block)
|
64
76
|
add_shape(callout3)
|
65
77
|
end
|
66
78
|
|
67
|
-
def add_callout4(**opts, &block)
|
79
|
+
def add_callout4(id = nil, **opts, &block)
|
80
|
+
opts = { id: id }.merge(opts) if id
|
68
81
|
callout4 = DrawioDsl::Schema::Callout4.new(current_page, **opts, &block)
|
69
82
|
add_shape(callout4)
|
70
83
|
end
|
71
84
|
|
72
|
-
def add_circle(**opts, &block)
|
85
|
+
def add_circle(id = nil, **opts, &block)
|
86
|
+
opts = { id: id }.merge(opts) if id
|
73
87
|
circle = DrawioDsl::Schema::Circle.new(current_page, **opts, &block)
|
74
88
|
add_shape(circle)
|
75
89
|
end
|
76
90
|
|
77
|
-
def add_cloud(**opts, &block)
|
91
|
+
def add_cloud(id = nil, **opts, &block)
|
92
|
+
opts = { id: id }.merge(opts) if id
|
78
93
|
cloud = DrawioDsl::Schema::Cloud.new(current_page, **opts, &block)
|
79
94
|
add_shape(cloud)
|
80
95
|
end
|
81
96
|
|
82
|
-
def add_container(**opts, &block)
|
97
|
+
def add_container(id = nil, **opts, &block)
|
98
|
+
opts = { id: id }.merge(opts) if id
|
83
99
|
container = DrawioDsl::Schema::Container.new(current_page, **opts, &block)
|
84
100
|
add_shape(container)
|
85
101
|
end
|
86
102
|
|
87
|
-
def add_container2(**opts, &block)
|
103
|
+
def add_container2(id = nil, **opts, &block)
|
104
|
+
opts = { id: id }.merge(opts) if id
|
88
105
|
container2 = DrawioDsl::Schema::Container2.new(current_page, **opts, &block)
|
89
106
|
add_shape(container2)
|
90
107
|
end
|
91
108
|
|
92
|
-
def add_container3(**opts, &block)
|
109
|
+
def add_container3(id = nil, **opts, &block)
|
110
|
+
opts = { id: id }.merge(opts) if id
|
93
111
|
container3 = DrawioDsl::Schema::Container3.new(current_page, **opts, &block)
|
94
112
|
add_shape(container3)
|
95
113
|
end
|
96
114
|
|
97
|
-
def add_container4(**opts, &block)
|
115
|
+
def add_container4(id = nil, **opts, &block)
|
116
|
+
opts = { id: id }.merge(opts) if id
|
98
117
|
container4 = DrawioDsl::Schema::Container4.new(current_page, **opts, &block)
|
99
118
|
add_shape(container4)
|
100
119
|
end
|
101
120
|
|
102
|
-
def add_cross(**opts, &block)
|
121
|
+
def add_cross(id = nil, **opts, &block)
|
122
|
+
opts = { id: id }.merge(opts) if id
|
103
123
|
cross = DrawioDsl::Schema::Cross.new(current_page, **opts, &block)
|
104
124
|
add_shape(cross)
|
105
125
|
end
|
106
126
|
|
107
|
-
def add_envelop(**opts, &block)
|
127
|
+
def add_envelop(id = nil, **opts, &block)
|
128
|
+
opts = { id: id }.merge(opts) if id
|
108
129
|
envelop = DrawioDsl::Schema::Envelop.new(current_page, **opts, &block)
|
109
130
|
add_shape(envelop)
|
110
131
|
end
|
111
132
|
|
112
|
-
def add_diamond(**opts, &block)
|
133
|
+
def add_diamond(id = nil, **opts, &block)
|
134
|
+
opts = { id: id }.merge(opts) if id
|
113
135
|
diamond = DrawioDsl::Schema::Diamond.new(current_page, **opts, &block)
|
114
136
|
add_shape(diamond)
|
115
137
|
end
|
116
138
|
|
117
|
-
def add_document(**opts, &block)
|
139
|
+
def add_document(id = nil, **opts, &block)
|
140
|
+
opts = { id: id }.merge(opts) if id
|
118
141
|
document = DrawioDsl::Schema::Document.new(current_page, **opts, &block)
|
119
142
|
add_shape(document)
|
120
143
|
end
|
121
144
|
|
122
|
-
def add_ellipse(**opts, &block)
|
145
|
+
def add_ellipse(id = nil, **opts, &block)
|
146
|
+
opts = { id: id }.merge(opts) if id
|
123
147
|
ellipse = DrawioDsl::Schema::Ellipse.new(current_page, **opts, &block)
|
124
148
|
add_shape(ellipse)
|
125
149
|
end
|
126
150
|
|
127
|
-
def add_hexagon(**opts, &block)
|
151
|
+
def add_hexagon(id = nil, **opts, &block)
|
152
|
+
opts = { id: id }.merge(opts) if id
|
128
153
|
hexagon = DrawioDsl::Schema::Hexagon.new(current_page, **opts, &block)
|
129
154
|
add_shape(hexagon)
|
130
155
|
end
|
131
156
|
|
132
|
-
def add_interface(**opts, &block)
|
157
|
+
def add_interface(id = nil, **opts, &block)
|
158
|
+
opts = { id: id }.merge(opts) if id
|
133
159
|
interface = DrawioDsl::Schema::Interface.new(current_page, **opts, &block)
|
134
160
|
add_shape(interface)
|
135
161
|
end
|
136
162
|
|
137
|
-
def add_klass(**opts, &block)
|
163
|
+
def add_klass(id = nil, **opts, &block)
|
164
|
+
opts = { id: id }.merge(opts) if id
|
138
165
|
klass = DrawioDsl::Schema::Klass.new(current_page, **opts, &block)
|
139
166
|
add_shape(klass)
|
140
167
|
end
|
141
168
|
|
142
|
-
def add_note(**opts, &block)
|
169
|
+
def add_note(id = nil, **opts, &block)
|
170
|
+
opts = { id: id }.merge(opts) if id
|
143
171
|
note = DrawioDsl::Schema::Note.new(current_page, **opts, &block)
|
144
172
|
add_shape(note)
|
145
173
|
end
|
146
174
|
|
147
|
-
def add_process(**opts, &block)
|
175
|
+
def add_process(id = nil, **opts, &block)
|
176
|
+
opts = { id: id }.merge(opts) if id
|
148
177
|
process = DrawioDsl::Schema::Process.new(current_page, **opts, &block)
|
149
178
|
add_shape(process)
|
150
179
|
end
|
151
180
|
|
152
|
-
def add_rectangle(**opts, &block)
|
181
|
+
def add_rectangle(id = nil, **opts, &block)
|
182
|
+
opts = { id: id }.merge(opts) if id
|
153
183
|
rectangle = DrawioDsl::Schema::Rectangle.new(current_page, **opts, &block)
|
154
184
|
add_shape(rectangle)
|
155
185
|
end
|
156
186
|
|
157
|
-
def add_rectangle2(**opts, &block)
|
187
|
+
def add_rectangle2(id = nil, **opts, &block)
|
188
|
+
opts = { id: id }.merge(opts) if id
|
158
189
|
rectangle2 = DrawioDsl::Schema::Rectangle2.new(current_page, **opts, &block)
|
159
190
|
add_shape(rectangle2)
|
160
191
|
end
|
161
192
|
|
162
|
-
def add_square(**opts, &block)
|
193
|
+
def add_square(id = nil, **opts, &block)
|
194
|
+
opts = { id: id }.merge(opts) if id
|
163
195
|
square = DrawioDsl::Schema::Square.new(current_page, **opts, &block)
|
164
196
|
add_shape(square)
|
165
197
|
end
|
166
198
|
|
167
|
-
def add_step(**opts, &block)
|
199
|
+
def add_step(id = nil, **opts, &block)
|
200
|
+
opts = { id: id }.merge(opts) if id
|
168
201
|
step = DrawioDsl::Schema::Step.new(current_page, **opts, &block)
|
169
202
|
add_shape(step)
|
170
203
|
end
|
171
204
|
|
172
|
-
def add_tick(**opts, &block)
|
205
|
+
def add_tick(id = nil, **opts, &block)
|
206
|
+
opts = { id: id }.merge(opts) if id
|
173
207
|
tick = DrawioDsl::Schema::Tick.new(current_page, **opts, &block)
|
174
208
|
add_shape(tick)
|
175
209
|
end
|
176
210
|
|
177
|
-
def add_todo(**opts, &block)
|
211
|
+
def add_todo(id = nil, **opts, &block)
|
212
|
+
opts = { id: id }.merge(opts) if id
|
178
213
|
todo = DrawioDsl::Schema::Todo.new(current_page, **opts, &block)
|
179
214
|
add_shape(todo)
|
180
215
|
end
|
181
216
|
|
182
|
-
def add_face(**opts, &block)
|
217
|
+
def add_face(id = nil, **opts, &block)
|
218
|
+
opts = { id: id }.merge(opts) if id
|
183
219
|
face = DrawioDsl::Schema::Face.new(current_page, **opts, &block)
|
184
220
|
add_shape(face)
|
185
221
|
end
|
186
222
|
|
187
|
-
def add_triangle(**opts, &block)
|
223
|
+
def add_triangle(id = nil, **opts, &block)
|
224
|
+
opts = { id: id }.merge(opts) if id
|
188
225
|
triangle = DrawioDsl::Schema::Triangle.new(current_page, **opts, &block)
|
189
226
|
add_shape(triangle)
|
190
227
|
end
|
191
228
|
|
192
|
-
def add_embed_row(**opts, &block)
|
229
|
+
def add_embed_row(id = nil, **opts, &block)
|
230
|
+
opts = { id: id }.merge(opts) if id
|
193
231
|
embed_row = DrawioDsl::Schema::EmbedRow.new(current_page, **opts, &block)
|
194
232
|
add_shape(embed_row)
|
195
233
|
end
|
196
234
|
|
197
|
-
def add_embed_col50(**opts, &block)
|
235
|
+
def add_embed_col50(id = nil, **opts, &block)
|
236
|
+
opts = { id: id }.merge(opts) if id
|
198
237
|
embed_col50 = DrawioDsl::Schema::EmbedCol50.new(current_page, **opts, &block)
|
199
238
|
add_shape(embed_col50)
|
200
239
|
end
|
201
240
|
|
202
|
-
def add_embed_col200(**opts, &block)
|
241
|
+
def add_embed_col200(id = nil, **opts, &block)
|
242
|
+
opts = { id: id }.merge(opts) if id
|
203
243
|
embed_col200 = DrawioDsl::Schema::EmbedCol200.new(current_page, **opts, &block)
|
204
244
|
add_shape(embed_col200)
|
205
245
|
end
|
@@ -89,164 +89,164 @@ module DrawioDsl
|
|
89
89
|
end
|
90
90
|
end
|
91
91
|
|
92
|
-
def h1(**opts, &block)
|
93
|
-
builder.add_h1(**opts, &block)
|
92
|
+
def h1(id = nil, **opts, &block)
|
93
|
+
builder.add_h1(id, **opts, &block)
|
94
94
|
end
|
95
95
|
|
96
|
-
def h2(**opts, &block)
|
97
|
-
builder.add_h2(**opts, &block)
|
96
|
+
def h2(id = nil, **opts, &block)
|
97
|
+
builder.add_h2(id, **opts, &block)
|
98
98
|
end
|
99
99
|
|
100
|
-
def h3(**opts, &block)
|
101
|
-
builder.add_h3(**opts, &block)
|
100
|
+
def h3(id = nil, **opts, &block)
|
101
|
+
builder.add_h3(id, **opts, &block)
|
102
102
|
end
|
103
103
|
|
104
|
-
def h4(**opts, &block)
|
105
|
-
builder.add_h4(**opts, &block)
|
104
|
+
def h4(id = nil, **opts, &block)
|
105
|
+
builder.add_h4(id, **opts, &block)
|
106
106
|
end
|
107
107
|
|
108
|
-
def h5(**opts, &block)
|
109
|
-
builder.add_h5(**opts, &block)
|
108
|
+
def h5(id = nil, **opts, &block)
|
109
|
+
builder.add_h5(id, **opts, &block)
|
110
110
|
end
|
111
111
|
|
112
|
-
def h6(**opts, &block)
|
113
|
-
builder.add_h6(**opts, &block)
|
112
|
+
def h6(id = nil, **opts, &block)
|
113
|
+
builder.add_h6(id, **opts, &block)
|
114
114
|
end
|
115
115
|
|
116
|
-
def p(**opts, &block)
|
117
|
-
builder.add_p(**opts, &block)
|
116
|
+
def p(id = nil, **opts, &block)
|
117
|
+
builder.add_p(id, **opts, &block)
|
118
118
|
end
|
119
119
|
|
120
|
-
def actor(**opts, &block)
|
121
|
-
builder.add_actor(**opts, &block)
|
120
|
+
def actor(id = nil, **opts, &block)
|
121
|
+
builder.add_actor(id, **opts, &block)
|
122
122
|
end
|
123
123
|
|
124
|
-
def actor2(**opts, &block)
|
125
|
-
builder.add_actor2(**opts, &block)
|
124
|
+
def actor2(id = nil, **opts, &block)
|
125
|
+
builder.add_actor2(id, **opts, &block)
|
126
126
|
end
|
127
127
|
|
128
|
-
def callout(**opts, &block)
|
129
|
-
builder.add_callout(**opts, &block)
|
128
|
+
def callout(id = nil, **opts, &block)
|
129
|
+
builder.add_callout(id, **opts, &block)
|
130
130
|
end
|
131
131
|
|
132
|
-
def callout2(**opts, &block)
|
133
|
-
builder.add_callout2(**opts, &block)
|
132
|
+
def callout2(id = nil, **opts, &block)
|
133
|
+
builder.add_callout2(id, **opts, &block)
|
134
134
|
end
|
135
135
|
|
136
|
-
def callout3(**opts, &block)
|
137
|
-
builder.add_callout3(**opts, &block)
|
136
|
+
def callout3(id = nil, **opts, &block)
|
137
|
+
builder.add_callout3(id, **opts, &block)
|
138
138
|
end
|
139
139
|
|
140
|
-
def callout4(**opts, &block)
|
141
|
-
builder.add_callout4(**opts, &block)
|
140
|
+
def callout4(id = nil, **opts, &block)
|
141
|
+
builder.add_callout4(id, **opts, &block)
|
142
142
|
end
|
143
143
|
|
144
|
-
def circle(**opts, &block)
|
145
|
-
builder.add_circle(**opts, &block)
|
144
|
+
def circle(id = nil, **opts, &block)
|
145
|
+
builder.add_circle(id, **opts, &block)
|
146
146
|
end
|
147
147
|
|
148
|
-
def cloud(**opts, &block)
|
149
|
-
builder.add_cloud(**opts, &block)
|
148
|
+
def cloud(id = nil, **opts, &block)
|
149
|
+
builder.add_cloud(id, **opts, &block)
|
150
150
|
end
|
151
151
|
|
152
|
-
def container(**opts, &block)
|
153
|
-
builder.add_container(**opts, &block)
|
152
|
+
def container(id = nil, **opts, &block)
|
153
|
+
builder.add_container(id, **opts, &block)
|
154
154
|
end
|
155
155
|
|
156
|
-
def container2(**opts, &block)
|
157
|
-
builder.add_container2(**opts, &block)
|
156
|
+
def container2(id = nil, **opts, &block)
|
157
|
+
builder.add_container2(id, **opts, &block)
|
158
158
|
end
|
159
159
|
|
160
|
-
def container3(**opts, &block)
|
161
|
-
builder.add_container3(**opts, &block)
|
160
|
+
def container3(id = nil, **opts, &block)
|
161
|
+
builder.add_container3(id, **opts, &block)
|
162
162
|
end
|
163
163
|
|
164
|
-
def container4(**opts, &block)
|
165
|
-
builder.add_container4(**opts, &block)
|
164
|
+
def container4(id = nil, **opts, &block)
|
165
|
+
builder.add_container4(id, **opts, &block)
|
166
166
|
end
|
167
167
|
|
168
|
-
def cross(**opts, &block)
|
169
|
-
builder.add_cross(**opts, &block)
|
168
|
+
def cross(id = nil, **opts, &block)
|
169
|
+
builder.add_cross(id, **opts, &block)
|
170
170
|
end
|
171
171
|
|
172
|
-
def envelop(**opts, &block)
|
173
|
-
builder.add_envelop(**opts, &block)
|
172
|
+
def envelop(id = nil, **opts, &block)
|
173
|
+
builder.add_envelop(id, **opts, &block)
|
174
174
|
end
|
175
175
|
|
176
|
-
def diamond(**opts, &block)
|
177
|
-
builder.add_diamond(**opts, &block)
|
176
|
+
def diamond(id = nil, **opts, &block)
|
177
|
+
builder.add_diamond(id, **opts, &block)
|
178
178
|
end
|
179
179
|
|
180
|
-
def document(**opts, &block)
|
181
|
-
builder.add_document(**opts, &block)
|
180
|
+
def document(id = nil, **opts, &block)
|
181
|
+
builder.add_document(id, **opts, &block)
|
182
182
|
end
|
183
183
|
|
184
|
-
def ellipse(**opts, &block)
|
185
|
-
builder.add_ellipse(**opts, &block)
|
184
|
+
def ellipse(id = nil, **opts, &block)
|
185
|
+
builder.add_ellipse(id, **opts, &block)
|
186
186
|
end
|
187
187
|
|
188
|
-
def hexagon(**opts, &block)
|
189
|
-
builder.add_hexagon(**opts, &block)
|
188
|
+
def hexagon(id = nil, **opts, &block)
|
189
|
+
builder.add_hexagon(id, **opts, &block)
|
190
190
|
end
|
191
191
|
|
192
|
-
def interface(**opts, &block)
|
193
|
-
builder.add_interface(**opts, &block)
|
192
|
+
def interface(id = nil, **opts, &block)
|
193
|
+
builder.add_interface(id, **opts, &block)
|
194
194
|
end
|
195
195
|
|
196
|
-
def klass(**opts, &block)
|
197
|
-
builder.add_klass(**opts, &block)
|
196
|
+
def klass(id = nil, **opts, &block)
|
197
|
+
builder.add_klass(id, **opts, &block)
|
198
198
|
end
|
199
199
|
|
200
|
-
def note(**opts, &block)
|
201
|
-
builder.add_note(**opts, &block)
|
200
|
+
def note(id = nil, **opts, &block)
|
201
|
+
builder.add_note(id, **opts, &block)
|
202
202
|
end
|
203
203
|
|
204
|
-
def process(**opts, &block)
|
205
|
-
builder.add_process(**opts, &block)
|
204
|
+
def process(id = nil, **opts, &block)
|
205
|
+
builder.add_process(id, **opts, &block)
|
206
206
|
end
|
207
207
|
|
208
|
-
def rectangle(**opts, &block)
|
209
|
-
builder.add_rectangle(**opts, &block)
|
208
|
+
def rectangle(id = nil, **opts, &block)
|
209
|
+
builder.add_rectangle(id, **opts, &block)
|
210
210
|
end
|
211
211
|
|
212
|
-
def rectangle2(**opts, &block)
|
213
|
-
builder.add_rectangle2(**opts, &block)
|
212
|
+
def rectangle2(id = nil, **opts, &block)
|
213
|
+
builder.add_rectangle2(id, **opts, &block)
|
214
214
|
end
|
215
215
|
|
216
|
-
def square(**opts, &block)
|
217
|
-
builder.add_square(**opts, &block)
|
216
|
+
def square(id = nil, **opts, &block)
|
217
|
+
builder.add_square(id, **opts, &block)
|
218
218
|
end
|
219
219
|
|
220
|
-
def step(**opts, &block)
|
221
|
-
builder.add_step(**opts, &block)
|
220
|
+
def step(id = nil, **opts, &block)
|
221
|
+
builder.add_step(id, **opts, &block)
|
222
222
|
end
|
223
223
|
|
224
|
-
def tick(**opts, &block)
|
225
|
-
builder.add_tick(**opts, &block)
|
224
|
+
def tick(id = nil, **opts, &block)
|
225
|
+
builder.add_tick(id, **opts, &block)
|
226
226
|
end
|
227
227
|
|
228
|
-
def todo(**opts, &block)
|
229
|
-
builder.add_todo(**opts, &block)
|
228
|
+
def todo(id = nil, **opts, &block)
|
229
|
+
builder.add_todo(id, **opts, &block)
|
230
230
|
end
|
231
231
|
|
232
|
-
def face(**opts, &block)
|
233
|
-
builder.add_face(**opts, &block)
|
232
|
+
def face(id = nil, **opts, &block)
|
233
|
+
builder.add_face(id, **opts, &block)
|
234
234
|
end
|
235
235
|
|
236
|
-
def triangle(**opts, &block)
|
237
|
-
builder.add_triangle(**opts, &block)
|
236
|
+
def triangle(id = nil, **opts, &block)
|
237
|
+
builder.add_triangle(id, **opts, &block)
|
238
238
|
end
|
239
239
|
|
240
|
-
def embed_row(**opts, &block)
|
241
|
-
builder.add_embed_row(**opts, &block)
|
240
|
+
def embed_row(id = nil, **opts, &block)
|
241
|
+
builder.add_embed_row(id, **opts, &block)
|
242
242
|
end
|
243
243
|
|
244
|
-
def embed_col50(**opts, &block)
|
245
|
-
builder.add_embed_col50(**opts, &block)
|
244
|
+
def embed_col50(id = nil, **opts, &block)
|
245
|
+
builder.add_embed_col50(id, **opts, &block)
|
246
246
|
end
|
247
247
|
|
248
|
-
def embed_col200(**opts, &block)
|
249
|
-
builder.add_embed_col200(**opts, &block)
|
248
|
+
def embed_col200(id = nil, **opts, &block)
|
249
|
+
builder.add_embed_col200(id, **opts, &block)
|
250
250
|
end
|
251
251
|
end
|
252
252
|
# :nocov:
|
@@ -10,11 +10,13 @@ module DrawioDsl
|
|
10
10
|
super({ p: { margin: '0px', margin_left: '4px', margin_top: '4px' } })
|
11
11
|
end
|
12
12
|
|
13
|
-
def header(
|
14
|
-
html.p(
|
15
|
-
html.p("<b>#{
|
13
|
+
def header(name, description: nil, interface_type: 'Interface')
|
14
|
+
html.p("<i><< #{interface_type} >></i>", text_align: :center)
|
15
|
+
html.p("<b>#{name}</b>", text_align: :center)
|
16
16
|
html.hr
|
17
17
|
|
18
|
+
html.group(:description).p(description) if description
|
19
|
+
|
18
20
|
self
|
19
21
|
end
|
20
22
|
|
@@ -10,10 +10,12 @@ module DrawioDsl
|
|
10
10
|
super({ p: { margin: '0px', margin_left: '4px', margin_top: '4px' } })
|
11
11
|
end
|
12
12
|
|
13
|
-
def header(
|
14
|
-
html.p("<b>#{
|
13
|
+
def header(name, description: nil)
|
14
|
+
html.p("<b>#{name}</b>", text_align: :center)
|
15
15
|
html.hr
|
16
16
|
|
17
|
+
html.group(:description).p(description) if description
|
18
|
+
|
17
19
|
self
|
18
20
|
end
|
19
21
|
|
data/lib/drawio_dsl/version.rb
CHANGED
data/package-lock.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "drawio_dsl",
|
3
|
-
"version": "0.8.
|
3
|
+
"version": "0.8.1",
|
4
4
|
"lockfileVersion": 2,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "drawio_dsl",
|
9
|
-
"version": "0.8.
|
9
|
+
"version": "0.8.1",
|
10
10
|
"devDependencies": {
|
11
11
|
"@klueless-js/semantic-release-rubygem": "github:klueless-js/semantic-release-rubygem",
|
12
12
|
"@semantic-release/changelog": "^6.0.1",
|
data/package.json
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: drawio_dsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Cruwys
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: k_config
|
@@ -88,8 +88,7 @@ files:
|
|
88
88
|
- ".builders/generators/02-generate-app.rb"
|
89
89
|
- ".builders/generators/10-transform-drawio-js.rb"
|
90
90
|
- ".builders/generators/20-drawio-extensions.rb"
|
91
|
-
- ".builders/generators/
|
92
|
-
- ".builders/generators/project_plans/k_doc.rb"
|
91
|
+
- ".builders/generators/project-plan.rb"
|
93
92
|
- ".builders/generators/sample_diagrams/05-samples.rb"
|
94
93
|
- ".builders/generators/sample_diagrams/10-page-margin.rb"
|
95
94
|
- ".builders/generators/sample_diagrams/15-grid-direction.rb"
|
@@ -97,6 +96,7 @@ files:
|
|
97
96
|
- ".builders/generators/sample_diagrams/20-styles.rb"
|
98
97
|
- ".builders/generators/sample_diagrams/25-themes.rb"
|
99
98
|
- ".builders/generators/sample_diagrams/30-html-shapes.rb"
|
99
|
+
- ".builders/generators/sample_diagrams/35-ids-and-arrows.rb"
|
100
100
|
- ".builders/generators/sample_diagrams/50-willoughby-council.rb"
|
101
101
|
- ".releaserc.json"
|
102
102
|
- ".rspec"
|
@@ -266,9 +266,10 @@ files:
|
|
266
266
|
- docs/extensions/venn_plain.svg
|
267
267
|
- docs/extensions/vessels.svg
|
268
268
|
- docs/project-plan.md
|
269
|
-
- docs/
|
270
|
-
- docs/
|
271
|
-
- docs/
|
269
|
+
- docs/project-plan/project.drawio
|
270
|
+
- docs/project-plan/project_done.svg
|
271
|
+
- docs/project-plan/project_in_progress.svg
|
272
|
+
- docs/project-plan/project_todo.svg
|
272
273
|
- docs/samples/grid-alignment-center.svg
|
273
274
|
- docs/samples/grid-alignment.svg
|
274
275
|
- docs/samples/grid-direction-horizontal.svg
|