keystone_ui-blocks 0.5.0 → 0.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b5a38e9322149fa1db0084582ad61e83f284a4132b1ed0451c410511092f702e
4
- data.tar.gz: 48cf1159d0401ffe28f5eb90a3f429b0b22510a01466ddcf70e091efdf629f97
3
+ metadata.gz: 5ac90b987ef1b3cf2dc65a2fa4fe61aaceb40f9692197a5ef8733f0d3dbece48
4
+ data.tar.gz: ab784fcd6edb6fe19fd98053321cde79efe4ae3a9c6682d39fbe8adb12cd5ab4
5
5
  SHA512:
6
- metadata.gz: 913901839f2a7911cab94c054359b7de2ea1eff279115fc8ac6d44f249c19fa4a7602297ecf5f83f362a436e7167323b0cb21a982d1492f22254c431b47eef9c
7
- data.tar.gz: d42be8c0f2af470c3e30f6242e6ff01ec2c1fc34e2d9a2aab7ca41a2daa5b17027add34ec9a351cb2c3fd9faf0ae3263dd634428ef11e69dd7a8fcbdee661bfe
6
+ metadata.gz: d9bc578c8874da43adb7beee5f5aa1cffd3e942203be4d1a82bb3d66bc06fbaf2ddedb5149a764a4f063a2971c70b6e07cbf6e0cd36da35e5b4d3bda0ebb18ab
7
+ data.tar.gz: 8be83deeecdae5f2eaaf0a136e47d195d746b463edb5b1198330d2372194f080a164115c9ea1b62ece069a2fd396371a10a902ee4db2afb0ac86fcdcce878732
@@ -2,6 +2,6 @@
2
2
 
3
3
  module KeystoneUi
4
4
  module Blocks
5
- VERSION = "0.5.0"
5
+ VERSION = "0.5.1"
6
6
  end
7
7
  end
@@ -9,6 +9,7 @@ module KsBlocks
9
9
  COLUMNS = 12
10
10
  ROW_HEIGHT = 60
11
11
  GAP = 10
12
+ NARROW_BELOW = 640
12
13
 
13
14
  module_function
14
15
 
@@ -7,7 +7,16 @@ module KsBlocks
7
7
  extend ActiveSupport::Concern
8
8
 
9
9
  class_methods do
10
- def block_layout(column, kind: :blocks, columns: Grid::COLUMNS, row_height: Grid::ROW_HEIGHT, gap: Grid::GAP)
10
+ def block_layout(column, kind: :blocks, columns: Grid::COLUMNS, row_height: Grid::ROW_HEIGHT, gap: Grid::GAP,
11
+ narrow_columns: nil, narrow_row_height: nil, narrow_gap: nil, narrow_below: Grid::NARROW_BELOW)
12
+ shape = {
13
+ columns: columns, row_height: row_height, gap: gap,
14
+ narrow_columns: narrow_columns || columns,
15
+ narrow_row_height: narrow_row_height || row_height,
16
+ narrow_gap: narrow_gap || gap,
17
+ narrow_below: narrow_below
18
+ }
19
+
11
20
  define_method(:add_block) do |block_type, x: nil, y: nil|
12
21
  update!(column => Grid.add(public_send(column), block_type, x: x, y: y, columns: columns))
13
22
  end
@@ -33,7 +42,7 @@ module KsBlocks
33
42
  define_method(:block_layout_offered) { block_layout_types }
34
43
 
35
44
  define_method(:layout_data) do
36
- KsBlocks.layout_data(public_send(column), kind: block_layout_kind, grid: { columns: columns, row_height: row_height, gap: gap }, offered: block_layout_offered)
45
+ KsBlocks.layout_data(public_send(column), kind: block_layout_kind, grid: shape, offered: block_layout_offered)
37
46
  end
38
47
  end
39
48
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keystone_ui-blocks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Schneider