drawio_dsl 0.8.5 → 0.8.8
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/blueprint/shapes.rb +1 -0
- data/.builders/generators/domain_diagram.rb +1 -0
- data/.builders/generators/project-plan.rb +8 -4
- data/.builders/generators/sample_diagrams/20-styles.rb +2 -2
- data/.builders/generators/sample_diagrams/30-html-shapes.rb +36 -14
- data/.builders/generators/sample_diagrams/35-ids-and-arrows.rb +0 -2
- data/.vscode/settings.json +2 -1
- data/CHANGELOG.md +22 -0
- data/README.md +0 -7
- data/docs/domain-modal/domain_model_custom.svg +1 -0
- data/docs/domain-modal.md +1 -1
- data/docs/domain_model.drawio +265 -0
- data/docs/domain_model.json +1038 -0
- data/docs/domain_model.svg +3 -0
- data/docs/project-plan/project.drawio +68 -56
- 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.rb +16 -0
- data/lib/drawio_dsl/drawio_shapes.rb +22 -16
- data/lib/drawio_dsl/formatters/base_formatter.rb +120 -0
- data/lib/drawio_dsl/formatters/html_builder.rb +39 -0
- data/lib/drawio_dsl/formatters/interface_formatter.rb +13 -1
- data/lib/drawio_dsl/formatters/klass_formatter.rb +13 -1
- 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 +7 -3
- data/docs/domain-modal/domain_model_custom.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b4e4efff291343bee599d6dffa5bbf0d134f291fe4a796af5a90d677286c5c3
|
4
|
+
data.tar.gz: ab995805c3ee1a31fb3df3c6648cf5d0d5df0bca96168d0d59b5c820b51050a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7990da7e2905a18560a953f44fd5843edb23b0081059bedfb430813535310fea8947dcdf51b0257e878535b21cceb94bc29e37624315feba3651edf6c1f59a7
|
7
|
+
data.tar.gz: 129dff49839b135244f3a252ec5b8a4e4ccc0870b9a559c51cdfd4e6051910f6502e017d7562619ca0604a1421d23b86d97eef089682eb97da6eadf04a155c94
|
data/.builders/.data/shapes.json
CHANGED
@@ -451,6 +451,15 @@
|
|
451
451
|
"h": 120,
|
452
452
|
"style_modifiers": "ellipse"
|
453
453
|
},
|
454
|
+
{
|
455
|
+
"type": "group",
|
456
|
+
"category": "element",
|
457
|
+
"x": 0,
|
458
|
+
"y": 0,
|
459
|
+
"w": 210,
|
460
|
+
"h": 210,
|
461
|
+
"style_modifiers": "fontSize=20;verticalAlign=top"
|
462
|
+
},
|
454
463
|
{
|
455
464
|
"type": "hexagon",
|
456
465
|
"category": "element",
|
@@ -129,6 +129,7 @@ m = KManager.model :shapes, namespace: %i[domain] do
|
|
129
129
|
row :diamond , :element, 0, 0, 100, 100, 'rhombus'
|
130
130
|
row :document , :element, 0, 0, 160, 160, 'shape=mxgraph.basic.document'
|
131
131
|
row :ellipse , :element, 0, 0, 200, 120, 'ellipse'
|
132
|
+
row :group , :element, 0, 0, 210, 210, 'fontSize=20;verticalAlign=top'
|
132
133
|
row :hexagon , :element, 0, 0, 200, 120, 'shape=hexagon'
|
133
134
|
row :interface , :element, 0, 0, 160, 160, 'align=left;overflow=fill;fontSize=12;fontFamily=Helvetica'
|
134
135
|
row :klass , :element, 0, 0, 160, 160, 'align=left;overflow=fill;fontSize=12;fontFamily=Helvetica'
|
@@ -11,9 +11,8 @@ KManager.action :project_plan do
|
|
11
11
|
|
12
12
|
grid_layout(y: 90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
|
13
13
|
|
14
|
-
todo(title: '
|
15
|
-
todo(title: '
|
16
|
-
todo(title: 'class html builder to support include/extend modules, class methods and regular html nodes such as p, h1.. ul, li')
|
14
|
+
todo(title: 'improve coverage')
|
15
|
+
todo(title: 'class html builder to support include/extend modules, class methods')
|
17
16
|
todo(title: 'add new shapes related to line connectors')
|
18
17
|
todo(title: 'line connector aliases gives a simple way to use predefined line configurations')
|
19
18
|
todo(title: 'line connectors need to support autolinking using ids')
|
@@ -27,12 +26,13 @@ KManager.action :project_plan do
|
|
27
26
|
|
28
27
|
grid_layout(y:90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
|
29
28
|
|
29
|
+
todo(title: 'refactor HTML builder to custom GEM or use existing ruby GEM')
|
30
30
|
todo(title: 'add page background to theme, use it whenever the theme is set at a diagram/page level')
|
31
31
|
todo(title: 'move DrawioDsl::Formatters::Factory::FORMATTERS to resource file')
|
32
32
|
todo(title: 'move DrawioDsl::Formatters::StyleBuilder::MAPPINGS to resource file')
|
33
33
|
todo(title: 'settings style attributes need to de-duplicate, might be best to utilize the new StyleBuilder class')
|
34
34
|
todo(title: 'write SVG directly into other projects')
|
35
|
-
todo(title: 'add :shape, :line and :text to random shape generator')
|
35
|
+
todo(title: 'add :shape, :line and :text to random shape generator, note: you can see the issue in the samples/20-styled-shapes.rb where the text is not rendered')
|
36
36
|
todo(title: 'Nodes need to support child nodes')
|
37
37
|
todo(title: 'Grid layout does not position itself in relation to the last element')
|
38
38
|
todo(title: 'Dynamic sized shapes that expand to the size of their text')
|
@@ -48,6 +48,10 @@ KManager.action :project_plan do
|
|
48
48
|
|
49
49
|
grid_layout(y:90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
|
50
50
|
|
51
|
+
todo(title: 'export_json will output a diagram in machine readable format')
|
52
|
+
todo(title: 'class html formatter to support regular html nodes such as p, h1.. ul, li that are found on the builder')
|
53
|
+
todo(title: 'group box, like a regular box but with a top aligned h1 style title')
|
54
|
+
todo(title: 'build a domain (class) diagram')
|
51
55
|
todo(title: 'build configuration for line strokes %i[dashed dotted dashdot dashdotdot dotdotdot longdash)')
|
52
56
|
todo(title: 'build configuration for line compass %i[n ne e se s sw w nw]')
|
53
57
|
todo(title: 'build configuration for line shape %i[style1 style2 style3 style4]')
|
@@ -1,4 +1,4 @@
|
|
1
|
-
KManager.action :
|
1
|
+
KManager.action :styled_shapes do
|
2
2
|
action do
|
3
3
|
|
4
4
|
DrawioDsl::Drawio
|
@@ -50,7 +50,7 @@ KManager.action :bootstrap do
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
.cd(:spec)
|
53
|
-
.
|
53
|
+
.osave('.samples/20-styled-shapes.drawio')
|
54
54
|
.cd(:docs)
|
55
55
|
.export_svg('samples/styles-plain', page: 1)
|
56
56
|
.export_svg('samples/styles-shadow', page: 2)
|
@@ -8,20 +8,6 @@ KManager.action :html_shapes do
|
|
8
8
|
.page('Style-Plain', margin_left: 0, margin_top: 0, rounded: 0, background: '#FFEADB') do
|
9
9
|
grid_layout(wrap_at: 8)
|
10
10
|
|
11
|
-
# html = DrawioDsl::Formatters::KlassFormatter.new
|
12
|
-
# .header('IPerson')
|
13
|
-
# .field(:first_name, type: :string)
|
14
|
-
# .field(:last_name, type: :string)
|
15
|
-
# .field(:age, type: :integer)
|
16
|
-
# .field(:birthday, type: :date)
|
17
|
-
# .method(:full_name)
|
18
|
-
# .method(:sean)
|
19
|
-
# .as_html
|
20
|
-
|
21
|
-
# square(title: html,
|
22
|
-
# style_modifiers: 'align=left;overflow=fill;fontSize=12;fontFamily=Helvetica'
|
23
|
-
# )
|
24
|
-
|
25
11
|
interface(theme: :style_07) do
|
26
12
|
format
|
27
13
|
.header('IPerson')
|
@@ -39,6 +25,42 @@ KManager.action :html_shapes do
|
|
39
25
|
.field(:birthday, type: :date)
|
40
26
|
.method(:full_name, type: :string)
|
41
27
|
end
|
28
|
+
|
29
|
+
klass(h: 280) do
|
30
|
+
format
|
31
|
+
.header('Custom HTML')
|
32
|
+
.p('David')
|
33
|
+
.b('Cruwys')
|
34
|
+
.hr
|
35
|
+
.h1('h1')
|
36
|
+
.h2('h2')
|
37
|
+
.h3('h3')
|
38
|
+
.h4('h4')
|
39
|
+
.h5('h5')
|
40
|
+
.h6('h6')
|
41
|
+
.ul_s
|
42
|
+
.li('li')
|
43
|
+
.li('li')
|
44
|
+
.ul_e
|
45
|
+
end
|
46
|
+
|
47
|
+
interface(theme: :style_07, h: 280) do
|
48
|
+
format
|
49
|
+
.header('ICustom HTML')
|
50
|
+
.p('David')
|
51
|
+
.b('Cruwys')
|
52
|
+
.hr
|
53
|
+
.h1('h1')
|
54
|
+
.h2('h2')
|
55
|
+
.h3('h3')
|
56
|
+
.h4('h4')
|
57
|
+
.h5('h5')
|
58
|
+
.h6('h6')
|
59
|
+
.ul_s
|
60
|
+
.li('li')
|
61
|
+
.li('li')
|
62
|
+
.ul_e
|
63
|
+
end
|
42
64
|
end
|
43
65
|
.cd(:spec)
|
44
66
|
.osave('.samples/30-html-shapes.drawio')
|
data/.vscode/settings.json
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,25 @@
|
|
1
|
+
## [0.8.7](https://github.com/klueless-io/drawio_dsl/compare/v0.8.6...v0.8.7) (2022-03-20)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* class html formatter to support regular html nodes such as p, h1.. ul, li that are found on the builder ([a414f73](https://github.com/klueless-io/drawio_dsl/commit/a414f73260221a6d1db30620d5ef2d665b44d96c))
|
7
|
+
* class html formatter to support regular html nodes such as p, h1.. ul, li that are found on the builder + update cops ([40c945c](https://github.com/klueless-io/drawio_dsl/commit/40c945cc963a80e10267fcca977015d4620b54b0))
|
8
|
+
|
9
|
+
## [0.8.6](https://github.com/klueless-io/drawio_dsl/compare/v0.8.5...v0.8.6) (2022-03-20)
|
10
|
+
|
11
|
+
|
12
|
+
### Bug Fixes
|
13
|
+
|
14
|
+
* group box, like a regular box but with a top aligned h1 style title ([282c7e8](https://github.com/klueless-io/drawio_dsl/commit/282c7e8ab8c932082ba9d6914b34767163f1e5e3))
|
15
|
+
|
16
|
+
## [0.8.5](https://github.com/klueless-io/drawio_dsl/compare/v0.8.4...v0.8.5) (2022-03-20)
|
17
|
+
|
18
|
+
|
19
|
+
### Bug Fixes
|
20
|
+
|
21
|
+
* build a domain (class) diagram ([673cbba](https://github.com/klueless-io/drawio_dsl/commit/673cbba2e84bac025f43b64f93547d1547dc6d63))
|
22
|
+
|
1
23
|
## [0.8.4](https://github.com/klueless-io/drawio_dsl/compare/v0.8.3...v0.8.4) (2022-03-17)
|
2
24
|
|
3
25
|
|
data/README.md
CHANGED
@@ -58,13 +58,6 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
58
58
|
|
59
59
|
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
60
60
|
|
61
|
-
```bash
|
62
|
-
bin/console
|
63
|
-
|
64
|
-
Aaa::Bbb::Program.execute()
|
65
|
-
# => ""
|
66
|
-
```
|
67
|
-
|
68
61
|
`drawio_dsl` is setup with Guard, run `guard`, this will watch development file changes and run tests automatically, if successful, it will then run rubocop for style quality.
|
69
62
|
|
70
63
|
To release a new version, update the version number in `version.rb`, build the gem and push the `.gem` file to [rubygems.org](https://rubygems.org).
|