tiptap-ruby 0.9.6 → 0.9.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf4e24b21ee43e50ccf243e3f6a11b66da023ac6be0b63b1569671f3598816f6
4
- data.tar.gz: 70769d5a1646a931af8ce778214eef3275e52114137b5b14deb5a4d27e51b5fa
3
+ metadata.gz: ee6a6b20a8496bb8fe99b58d394b71f35a539e35a798ffbfba3c83febc30884b
4
+ data.tar.gz: 4d30fb76f8dfa76478816db99efc6d058c0a4ecedca5a23d180ccb01989d392a
5
5
  SHA512:
6
- metadata.gz: 82940cc57f9403b444848358dcf47ef93e62b4cac0b9b25863d6488b641c8c2823592698d37e2d72c02d2c1473a7ec5d54efdf8027415fb132854125f4e224d3
7
- data.tar.gz: fea8908137c508b939e43da1fbc67caa04caf64b7200fc4b5b770d722cd7deaf9e5dd2161477b1a223c29ebba005e01567b717009ab0c33fb8abc7b890fcad11
6
+ metadata.gz: c6ad08309ba3ebf0c7260c5fed3a687aa20cab20bd2e4d11e74966936992f8dce70e4f6a82ec58d88ab8968a7b9774014e43f8ad8918c91e9973cb13114101d2
7
+ data.tar.gz: 3e87106f44a98e03cc4a58db85e62fb1b1be9a99293fadc8bd617a9593f3e47e6f96404164bd98aa28b8787791e91d728e203d0b17703a9dc65450cd02f1dd1e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.9.8] - 2024-09-10
4
+
5
+ - Table support (Table, TableRow, TableCell, TableHeader)
6
+
3
7
  ## [0.9.6] - 2024-08-06
4
8
 
5
9
  - Bump rexml version to 3.3.4 for CVE
@@ -47,5 +47,11 @@ module TipTap
47
47
 
48
48
  add_content(Nodes::Codeblock.new(&block))
49
49
  end
50
+
51
+ def table(&block)
52
+ raise ArgumentError, "Block required" if block.nil?
53
+
54
+ add_content(Nodes::Table.new(&block))
55
+ end
50
56
  end
51
57
  end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "tip_tap/node"
4
+
5
+ module TipTap
6
+ module Nodes
7
+ class Table < Node
8
+ self.type_name = "table"
9
+ self.html_tag = :table
10
+
11
+ def table_row(&block)
12
+ raise ArgumentError, "Block required" if block.nil?
13
+
14
+ add_content(TableRow.new(&block))
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "tip_tap/node"
4
+
5
+ module TipTap
6
+ module Nodes
7
+ class TableCell < Node
8
+ self.type_name = "tableCell"
9
+ self.html_tag = :td
10
+
11
+ def paragraph(&block)
12
+ raise ArgumentError, "Block required" if block.nil?
13
+
14
+ add_content(Paragraph.new(&block))
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "tip_tap/node"
4
+
5
+ module TipTap
6
+ module Nodes
7
+ class TableHeader < Node
8
+ self.type_name = "tableHeader"
9
+ self.html_tag = :th
10
+
11
+ def paragraph(&block)
12
+ raise ArgumentError, "Block required" if block.nil?
13
+
14
+ add_content(Paragraph.new(&block))
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "tip_tap/node"
4
+
5
+ module TipTap
6
+ module Nodes
7
+ class TableRow < Node
8
+ self.type_name = "tableRow"
9
+ self.html_tag = :tr
10
+
11
+ def table_cell(&block)
12
+ raise ArgumentError, "Block required" if block.nil?
13
+
14
+ add_content(TableCell.new(&block))
15
+ end
16
+
17
+ def table_header(&block)
18
+ raise ArgumentError, "Block required" if block.nil?
19
+
20
+ add_content(TableHeader.new(&block))
21
+ end
22
+ end
23
+ end
24
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TipTap
4
- VERSION = "0.9.6"
4
+ VERSION = "0.9.8"
5
5
  end
data/lib/tip_tap.rb CHANGED
@@ -16,6 +16,10 @@ require "tip_tap/nodes/text"
16
16
  require "tip_tap/nodes/image"
17
17
  require "tip_tap/nodes/blockquote"
18
18
  require "tip_tap/nodes/codeblock"
19
+ require "tip_tap/nodes/table"
20
+ require "tip_tap/nodes/table_row"
21
+ require "tip_tap/nodes/table_cell"
22
+ require "tip_tap/nodes/table_header"
19
23
 
20
24
  module TipTap
21
25
  class Error < StandardError; end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiptap-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6
4
+ version: 0.9.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chad Wilken
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-06 00:00:00.000000000 Z
11
+ date: 2024-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -65,6 +65,10 @@ files:
65
65
  - lib/tip_tap/nodes/list_item.rb
66
66
  - lib/tip_tap/nodes/ordered_list.rb
67
67
  - lib/tip_tap/nodes/paragraph.rb
68
+ - lib/tip_tap/nodes/table.rb
69
+ - lib/tip_tap/nodes/table_cell.rb
70
+ - lib/tip_tap/nodes/table_header.rb
71
+ - lib/tip_tap/nodes/table_row.rb
68
72
  - lib/tip_tap/nodes/task_item.rb
69
73
  - lib/tip_tap/nodes/task_list.rb
70
74
  - lib/tip_tap/nodes/text.rb
@@ -80,7 +84,7 @@ metadata:
80
84
  homepage_uri: https://github.com/CompanyCam/tiptap-ruby
81
85
  source_code_uri: https://github.com/CompanyCam/tiptap-ruby
82
86
  changelog_uri: https://github.com/CompanyCam/tiptap-ruby/blob/master/CHANGELOG.md
83
- post_install_message:
87
+ post_install_message:
84
88
  rdoc_options: []
85
89
  require_paths:
86
90
  - lib
@@ -96,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
100
  version: '0'
97
101
  requirements: []
98
102
  rubygems_version: 3.4.6
99
- signing_key:
103
+ signing_key:
100
104
  specification_version: 4
101
105
  summary: Parse, generate and render TipTap documents in Ruby.
102
106
  test_files: []