drawio_dsl 0.8.5 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.builders/.data/shapes.json +9 -0
- data/.builders/blueprint/shapes.rb +1 -0
- data/.builders/generators/project-plan.rb +3 -3
- data/.builders/generators/sample_diagrams/20-styles.rb +2 -2
- data/.builders/generators/sample_diagrams/35-ids-and-arrows.rb +0 -2
- data/CHANGELOG.md +7 -0
- data/docs/domain-modal/domain_model_custom.svg +1 -0
- data/docs/domain-modal.md +1 -1
- data/docs/project-plan/project.drawio +58 -58
- data/docs/project-plan/project_done.svg +1 -1
- data/docs/project-plan/project_in_progress.svg +1 -1
- data/docs/project-plan/project_todo.svg +1 -1
- 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/configuration_shapes.rb +3 -1
- data/lib/drawio_dsl/dom_builder_shapes.rb +7 -1
- data/lib/drawio_dsl/drawio_shapes.rb +22 -16
- data/lib/drawio_dsl/schema/_.rb +1 -0
- data/lib/drawio_dsl/schema/shapes/group.rb +9 -0
- data/lib/drawio_dsl/version.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- metadata +3 -2
- data/docs/domain-modal/domain_model_custom.png +0 -0
@@ -3,7 +3,7 @@
|
|
3
3
|
# Attach configuration to the DrawIO DSL module
|
4
4
|
# :nocov:
|
5
5
|
module DrawioDsl
|
6
|
-
#
|
6
|
+
# Used to attach configuration to KConfig module
|
7
7
|
module ConfigurationShapes
|
8
8
|
ShapeDefaults = Struct.new(:type, :category, :x, :y, :w, :h, :style_modifiers, keyword_init: true)
|
9
9
|
Shapes = Struct.new(
|
@@ -35,6 +35,7 @@ module DrawioDsl
|
|
35
35
|
:diamond,
|
36
36
|
:document,
|
37
37
|
:ellipse,
|
38
|
+
:group,
|
38
39
|
:hexagon,
|
39
40
|
:interface,
|
40
41
|
:klass,
|
@@ -84,6 +85,7 @@ module DrawioDsl
|
|
84
85
|
diamond: ShapeDefaults.new(type: :diamond, x: 0, category: :element, y: 0, w: 100, h: 100, style_modifiers: 'rhombus'),
|
85
86
|
document: ShapeDefaults.new(type: :document, x: 0, category: :element, y: 0, w: 160, h: 160, style_modifiers: 'shape=mxgraph.basic.document'),
|
86
87
|
ellipse: ShapeDefaults.new(type: :ellipse, x: 0, category: :element, y: 0, w: 200, h: 120, style_modifiers: 'ellipse'),
|
88
|
+
group: ShapeDefaults.new(type: :group, x: 0, category: :element, y: 0, w: 210, h: 210, style_modifiers: 'fontSize=20;verticalAlign=top'),
|
87
89
|
hexagon: ShapeDefaults.new(type: :hexagon, x: 0, category: :element, y: 0, w: 200, h: 120, style_modifiers: 'shape=hexagon'),
|
88
90
|
interface: ShapeDefaults.new(type: :interface, x: 0, category: :element, y: 0, w: 160, h: 160, style_modifiers: 'align=left;overflow=fill;fontSize=12;fontFamily=Helvetica'),
|
89
91
|
klass: ShapeDefaults.new(type: :klass, x: 0, category: :element, y: 0, w: 160, h: 160, style_modifiers: 'align=left;overflow=fill;fontSize=12;fontFamily=Helvetica'),
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# :nocov:
|
4
4
|
module DrawioDsl
|
5
|
-
#
|
5
|
+
# DrawioDsl is a DSL for draw-io diagrams.
|
6
6
|
module DomBuilderShapes
|
7
7
|
def add_line(id = nil, **opts, &block)
|
8
8
|
opts = { id: id }.merge(opts) if id
|
@@ -166,6 +166,12 @@ module DrawioDsl
|
|
166
166
|
add_shape(ellipse)
|
167
167
|
end
|
168
168
|
|
169
|
+
def add_group(id = nil, **opts, &block)
|
170
|
+
opts = { id: id }.merge(opts) if id
|
171
|
+
group = DrawioDsl::Schema::Group.new(current_page, **opts, &block)
|
172
|
+
add_shape(group)
|
173
|
+
end
|
174
|
+
|
169
175
|
def add_hexagon(id = nil, **opts, &block)
|
170
176
|
opts = { id: id }.merge(opts) if id
|
171
177
|
hexagon = DrawioDsl::Schema::Hexagon.new(current_page, **opts, &block)
|
@@ -5,7 +5,7 @@ module DrawioDsl
|
|
5
5
|
# :nocov:
|
6
6
|
module DrawioShapes
|
7
7
|
def random(**opts)
|
8
|
-
case rand(
|
8
|
+
case rand(44)
|
9
9
|
when 0
|
10
10
|
line(**opts)
|
11
11
|
when 1
|
@@ -61,36 +61,38 @@ module DrawioDsl
|
|
61
61
|
when 26
|
62
62
|
ellipse(**opts)
|
63
63
|
when 27
|
64
|
-
|
64
|
+
group(**opts)
|
65
65
|
when 28
|
66
|
-
|
66
|
+
hexagon(**opts)
|
67
67
|
when 29
|
68
|
-
|
68
|
+
interface(**opts)
|
69
69
|
when 30
|
70
|
-
|
70
|
+
klass(**opts)
|
71
71
|
when 31
|
72
|
-
|
72
|
+
note(**opts)
|
73
73
|
when 32
|
74
|
-
|
74
|
+
process(**opts)
|
75
75
|
when 33
|
76
|
-
|
76
|
+
rectangle(**opts)
|
77
77
|
when 34
|
78
|
-
|
78
|
+
rectangle2(**opts)
|
79
79
|
when 35
|
80
|
-
|
80
|
+
square(**opts)
|
81
81
|
when 36
|
82
|
-
|
82
|
+
step(**opts)
|
83
83
|
when 37
|
84
|
-
|
84
|
+
tick(**opts)
|
85
85
|
when 38
|
86
|
-
|
86
|
+
todo(**opts)
|
87
87
|
when 39
|
88
|
-
|
88
|
+
face(**opts)
|
89
89
|
when 40
|
90
|
-
|
90
|
+
triangle(**opts)
|
91
91
|
when 41
|
92
|
-
|
92
|
+
embed_row(**opts)
|
93
93
|
when 42
|
94
|
+
embed_col50(**opts)
|
95
|
+
when 43
|
94
96
|
embed_col200(**opts)
|
95
97
|
end
|
96
98
|
end
|
@@ -203,6 +205,10 @@ module DrawioDsl
|
|
203
205
|
builder.add_ellipse(id, **opts, &block)
|
204
206
|
end
|
205
207
|
|
208
|
+
def group(id = nil, **opts, &block)
|
209
|
+
builder.add_group(id, **opts, &block)
|
210
|
+
end
|
211
|
+
|
206
212
|
def hexagon(id = nil, **opts, &block)
|
207
213
|
builder.add_hexagon(id, **opts, &block)
|
208
214
|
end
|
data/lib/drawio_dsl/schema/_.rb
CHANGED
@@ -39,6 +39,7 @@ require_relative 'shapes/db_json'
|
|
39
39
|
require_relative 'shapes/diamond'
|
40
40
|
require_relative 'shapes/document'
|
41
41
|
require_relative 'shapes/ellipse'
|
42
|
+
require_relative 'shapes/group'
|
42
43
|
require_relative 'shapes/hexagon'
|
43
44
|
require_relative 'shapes/interface'
|
44
45
|
require_relative 'shapes/klass'
|
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.6",
|
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.6",
|
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,7 +1,7 @@
|
|
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.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Cruwys
|
@@ -119,7 +119,7 @@ files:
|
|
119
119
|
- docs/domain-modal/domain_model.drawio
|
120
120
|
- docs/domain-modal/domain_model.svg
|
121
121
|
- docs/domain-modal/domain_model_custom.drawio
|
122
|
-
- docs/domain-modal/domain_model_custom.
|
122
|
+
- docs/domain-modal/domain_model_custom.svg
|
123
123
|
- docs/extensions.md
|
124
124
|
- docs/extensions/analyti_cs.svg
|
125
125
|
- docs/extensions/android_inputs.svg
|
@@ -353,6 +353,7 @@ files:
|
|
353
353
|
- lib/drawio_dsl/schema/shapes/embed_row.rb
|
354
354
|
- lib/drawio_dsl/schema/shapes/envelop.rb
|
355
355
|
- lib/drawio_dsl/schema/shapes/face.rb
|
356
|
+
- lib/drawio_dsl/schema/shapes/group.rb
|
356
357
|
- lib/drawio_dsl/schema/shapes/h1.rb
|
357
358
|
- lib/drawio_dsl/schema/shapes/h2.rb
|
358
359
|
- lib/drawio_dsl/schema/shapes/h3.rb
|
Binary file
|