drawio_dsl 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DrawioDsl
4
+ module Schema
5
+ class Line < Shape
6
+ configure_shape(:line)
7
+ end
8
+ end
9
+ end
@@ -23,6 +23,7 @@ module DrawioDsl
23
23
 
24
24
  configure_shape(:shape)
25
25
 
26
+ attr_accessor :category
26
27
  attr_accessor :theme
27
28
  attr_accessor :title
28
29
  attr_accessor :value
@@ -40,7 +41,6 @@ module DrawioDsl
40
41
  attr_accessor :font_color
41
42
  attr_accessor :gradient
42
43
 
43
- attr_accessor :text_only
44
44
  attr_accessor :x
45
45
  attr_accessor :y
46
46
  attr_accessor :w
@@ -76,16 +76,16 @@ module DrawioDsl
76
76
  @glass = args[:glass] || page.style.glass
77
77
 
78
78
  @type = args[:type] || shape_defaults.type
79
- @text_only = args[:text_only] || shape_defaults.text_only
79
+ @category = args[:category] || shape_defaults.category
80
80
  @x = args[:x] || shape_defaults.x
81
81
  @y = args[:y] || shape_defaults.y
82
82
  @w = args[:w] || shape_defaults.w
83
83
  @h = args[:h] || shape_defaults.h
84
84
  @style_modifiers = args[:style_modifiers] || shape_defaults.style_modifiers
85
85
 
86
- @fill_color = args[:fill_color] || (text_only ? nil : theme_palette.fill_color)
87
- @stroke_color = args[:stroke_color] || (text_only ? nil : theme_palette.stroke_color)
88
- @gradient = args[:gradient] || (text_only ? nil : theme_palette.gradient)
86
+ @fill_color = args[:fill_color] || (category == :text ? nil : theme_palette.fill_color)
87
+ @stroke_color = args[:stroke_color] || (category == :text ? nil : theme_palette.stroke_color)
88
+ @gradient = args[:gradient] || (category == :text ? nil : theme_palette.gradient)
89
89
  @font_color = args[:font_color] || theme_palette.font_color
90
90
  end
91
91
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DrawioDsl
4
- VERSION = '0.8.1'
4
+ VERSION = '0.8.2'
5
5
  end
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "drawio_dsl",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "drawio_dsl",
9
- "version": "0.8.1",
9
+ "version": "0.8.2",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drawio_dsl",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "DrawIO DSL can build DrawIO diagrams using a Domain Specific Language",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
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.1
4
+ version: 0.8.2
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-16 00:00:00.000000000 Z
11
+ date: 2022-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: k_config
@@ -346,6 +346,7 @@ files:
346
346
  - lib/drawio_dsl/schema/shapes/hexagon.rb
347
347
  - lib/drawio_dsl/schema/shapes/interface.rb
348
348
  - lib/drawio_dsl/schema/shapes/klass.rb
349
+ - lib/drawio_dsl/schema/shapes/line.rb
349
350
  - lib/drawio_dsl/schema/shapes/note.rb
350
351
  - lib/drawio_dsl/schema/shapes/p.rb
351
352
  - lib/drawio_dsl/schema/shapes/process.rb