xlsxrb 0.1.4 → 0.1.6
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/.devcontainer/Dockerfile +1 -1
- data/.gem_rbs_collection/ast/2.4/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/ast/2.4/ast.rbs +73 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/array.rbs +4 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/atomic_reference.rbs +16 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/executor.rbs +96 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/hash.rbs +4 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/map.rbs +68 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/promises.rbs +249 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/set.rbs +4 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/timer_task.rbs +47 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/utility/processor_counter.rbs +5 -0
- data/.gem_rbs_collection/csv/3.3/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/csv/3.3/csv.rbs +3871 -0
- data/.gem_rbs_collection/csv/3.3/manifest.yaml +3 -0
- data/.gem_rbs_collection/lint_roller/1.1/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/lint_roller/1.1/lint_roller.rbs +48 -0
- data/.gem_rbs_collection/listen/3.9/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/listen/3.9/listen.rbs +25 -0
- data/.gem_rbs_collection/listen/3.9/listener.rbs +24 -0
- data/.gem_rbs_collection/logger/1.7/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/logger/1.7/formatter.rbs +45 -0
- data/.gem_rbs_collection/logger/1.7/log_device.rbs +100 -0
- data/.gem_rbs_collection/logger/1.7/logger.rbs +796 -0
- data/.gem_rbs_collection/logger/1.7/manifest.yaml +2 -0
- data/.gem_rbs_collection/logger/1.7/period.rbs +17 -0
- data/.gem_rbs_collection/logger/1.7/severity.rbs +34 -0
- data/.gem_rbs_collection/nokogiri/1.11/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/nokogiri/1.11/nokogiri.rbs +2332 -0
- data/.gem_rbs_collection/nokogiri/1.11/patch.rbs +4 -0
- data/.gem_rbs_collection/parallel/1.20/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/parallel/1.20/parallel.rbs +86 -0
- data/.gem_rbs_collection/parser/3.2/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/parser/3.2/manifest.yaml +7 -0
- data/.gem_rbs_collection/parser/3.2/parser.rbs +194 -0
- data/.gem_rbs_collection/parser/3.2/polyfill.rbs +4 -0
- data/.gem_rbs_collection/rainbow/3.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rainbow/3.0/global.rbs +7 -0
- data/.gem_rbs_collection/rainbow/3.0/presenter.rbs +209 -0
- data/.gem_rbs_collection/rainbow/3.0/rainbow.rbs +5 -0
- data/.gem_rbs_collection/rake/13.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rake/13.0/manifest.yaml +2 -0
- data/.gem_rbs_collection/rake/13.0/rake.rbs +39 -0
- data/.gem_rbs_collection/regexp_parser/2.8/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/regexp_parser/2.8/regexp_parser.rbs +17 -0
- data/.gem_rbs_collection/rubocop/1.57/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rubocop/1.57/rubocop.rbs +208 -0
- data/.gem_rbs_collection/rubocop-ast/1.46/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rubocop-ast/1.46/rubocop-ast.rbs +903 -0
- data/.gem_rbs_collection/rubyzip/3.2/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rubyzip/3.2/manifest.yaml +8 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/central_directory.rbs +42 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/compressor.rbs +5 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/constants.rbs +47 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/crypto/aes_encryption.rbs +30 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/crypto/decrypted_io.rbs +9 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/crypto/encryption.rbs +7 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/crypto/null_encryption.rbs +19 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/crypto/traditional_encryption.rbs +31 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/decompressor.rbs +18 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/deflater.rbs +12 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/dirtyable.rbs +11 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/dos_time.rbs +13 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/entry.rbs +95 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/entry_set.rbs +31 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/errors.rbs +58 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/extra_field/aes.rbs +24 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/extra_field/generic.rbs +17 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/extra_field/ntfs.rbs +23 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/extra_field/old_unix.rbs +22 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/extra_field/universal_time.rbs +30 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/extra_field/unix.rbs +20 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/extra_field/unknown.rbs +15 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/extra_field/zip64.rbs +26 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/extra_field.rbs +21 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/file.rbs +131 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/file_split.rbs +14 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/filesystem/dir.rbs +33 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/filesystem/directory_iterator.rbs +21 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/filesystem/file.rbs +63 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/filesystem/file_stat.rbs +55 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/filesystem/zip_file_name_mapper.rbs +35 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/filesystem.rbs +7 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/inflater.rbs +10 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/input_stream.rbs +22 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/ioextras/abstract_input_stream.rbs +29 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/ioextras/abstract_output_stream.rbs +17 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/ioextras.rbs +13 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/null_compressor.rbs +10 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/null_decompressor.rbs +8 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/null_input_stream.rbs +6 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/output_stream.rbs +30 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/pass_thru_compressor.rbs +10 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/pass_thru_decompressor.rbs +10 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/streamable_directory.rbs +5 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/streamable_stream.rbs +15 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip/version.rbs +3 -0
- data/.gem_rbs_collection/rubyzip/3.2/zip.rbs +40 -0
- data/CHANGELOG.md +42 -3
- data/README.md +130 -49
- data/Rakefile +23 -2
- data/Steepfile +17 -0
- data/benchmark.rb +324 -348
- data/docs/ARCHITECTURE.md +24 -0
- data/docs/DEVELOPMENT.md +58 -0
- data/docs/QUALITY_ASSURANCE.md +26 -0
- data/docs/visual/VisualGallery.md +893 -938
- data/docs/wasm/ruby.wasm +0 -0
- data/lib/xlsxrb/elements/cell.rb +113 -8
- data/lib/xlsxrb/elements/column.rb +2 -0
- data/lib/xlsxrb/elements/row.rb +52 -4
- data/lib/xlsxrb/elements/types.rb +6 -0
- data/lib/xlsxrb/elements/workbook.rb +29 -0
- data/lib/xlsxrb/elements/worksheet.rb +98 -1
- data/lib/xlsxrb/elements.rb +2 -0
- data/lib/xlsxrb/ooxml/reader.rb +8 -6
- data/lib/xlsxrb/ooxml/shared_strings_parser.rb +106 -40
- data/lib/xlsxrb/ooxml/styles_parser.rb +2 -0
- data/lib/xlsxrb/ooxml/utils.rb +2 -0
- data/lib/xlsxrb/ooxml/workbook_parser.rb +6 -1
- data/lib/xlsxrb/ooxml/workbook_writer.rb +15 -4
- data/lib/xlsxrb/ooxml/worksheet_parser.rb +156 -23
- data/lib/xlsxrb/ooxml/worksheet_writer.rb +207 -152
- data/lib/xlsxrb/ooxml/writer.rb +217 -5
- data/lib/xlsxrb/ooxml/xml_builder.rb +18 -10
- data/lib/xlsxrb/ooxml/xml_parser.rb +2 -0
- data/lib/xlsxrb/ooxml/zip_generator.rb +5 -8
- data/lib/xlsxrb/ooxml/zip_reader.rb +179 -57
- data/lib/xlsxrb/ooxml/zip_writer.rb +65 -25
- data/lib/xlsxrb/ooxml.rb +3 -1
- data/lib/xlsxrb/style_builder.rb +284 -36
- data/lib/xlsxrb/version.rb +3 -1
- data/lib/xlsxrb.rb +1761 -275
- data/rbs_collection.lock.yaml +252 -0
- data/rbs_collection.yaml +19 -0
- data/sig/generated/xlsxrb/elements/cell.rbs +30 -0
- data/sig/generated/xlsxrb/elements/column.rbs +30 -0
- data/sig/generated/xlsxrb/elements/row.rbs +32 -0
- data/sig/generated/xlsxrb/elements/types.rbs +74 -0
- data/sig/generated/xlsxrb/elements/workbook.rbs +25 -0
- data/sig/generated/xlsxrb/elements/worksheet.rbs +27 -0
- data/sig/generated/xlsxrb/elements.rbs +8 -0
- data/sig/generated/xlsxrb/ooxml/reader.rbs +1412 -0
- data/sig/generated/xlsxrb/ooxml/shared_strings_parser.rbs +21 -0
- data/sig/generated/xlsxrb/ooxml/styles_parser.rbs +44 -0
- data/sig/generated/xlsxrb/ooxml/utils.rbs +40 -0
- data/sig/generated/xlsxrb/ooxml/workbook_parser.rbs +46 -0
- data/sig/generated/xlsxrb/ooxml/workbook_writer.rbs +66 -0
- data/sig/generated/xlsxrb/ooxml/worksheet_parser.rbs +67 -0
- data/sig/generated/xlsxrb/ooxml/worksheet_writer.rbs +92 -0
- data/sig/generated/xlsxrb/ooxml/writer.rbs +880 -0
- data/sig/generated/xlsxrb/ooxml/xml_builder.rbs +45 -0
- data/sig/generated/xlsxrb/ooxml/xml_parser.rbs +30 -0
- data/sig/generated/xlsxrb/ooxml/zip_generator.rbs +38 -0
- data/sig/generated/xlsxrb/ooxml/zip_reader.rbs +45 -0
- data/sig/generated/xlsxrb/ooxml/zip_writer.rbs +45 -0
- data/sig/generated/xlsxrb/ooxml.rbs +23 -0
- data/sig/generated/xlsxrb/style_builder.rbs +250 -0
- data/sig/generated/xlsxrb/version.rbs +5 -0
- data/sig/generated/xlsxrb.rbs +1276 -0
- data/sig/rexml.rbs +4 -0
- metadata +145 -4
- data/measure_memory.rb +0 -42
- data/sig/xlsxrb.rbs +0 -23
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Generated from lib/xlsxrb/ooxml/xml_builder.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Xlsxrb
|
|
4
|
+
module Ooxml
|
|
5
|
+
# Streams well-formed XML to a writable IO without building a DOM.
|
|
6
|
+
class XmlBuilder
|
|
7
|
+
XML_HEADER: ::String
|
|
8
|
+
|
|
9
|
+
ESCAPE_MAP: untyped
|
|
10
|
+
|
|
11
|
+
ESCAPE_RE: ::Regexp
|
|
12
|
+
|
|
13
|
+
def initialize: (untyped io) -> untyped
|
|
14
|
+
|
|
15
|
+
def declaration: () -> untyped
|
|
16
|
+
|
|
17
|
+
EMPTY_HASH: untyped
|
|
18
|
+
|
|
19
|
+
# Opens a tag, yields for children, then closes the tag.
|
|
20
|
+
def tag: (untyped name, ?untyped attrs) ?{ (?) -> untyped } -> untyped
|
|
21
|
+
|
|
22
|
+
def open_tag: (untyped name, ?untyped attrs) -> untyped
|
|
23
|
+
|
|
24
|
+
def close_tag: (untyped name) -> untyped
|
|
25
|
+
|
|
26
|
+
def empty_tag: (untyped name, ?untyped attrs) -> untyped
|
|
27
|
+
|
|
28
|
+
def text: (untyped content) -> untyped
|
|
29
|
+
|
|
30
|
+
# Write raw XML string (for unmapped_data restoration).
|
|
31
|
+
def raw: (untyped xml_string) -> untyped
|
|
32
|
+
|
|
33
|
+
# Serialize an unmapped_data hash back to XML.
|
|
34
|
+
def write_unmapped: (untyped node) -> untyped
|
|
35
|
+
|
|
36
|
+
def to_s: () -> untyped
|
|
37
|
+
|
|
38
|
+
private
|
|
39
|
+
|
|
40
|
+
def write_attrs: (untyped attrs) -> untyped
|
|
41
|
+
|
|
42
|
+
def escape: (untyped value) -> untyped
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Generated from lib/xlsxrb/ooxml/xml_parser.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Xlsxrb
|
|
4
|
+
module Ooxml
|
|
5
|
+
# Thin wrapper around REXML SAX2 parser for streaming XML processing.
|
|
6
|
+
# Unknown elements are captured as unmapped data hashes.
|
|
7
|
+
module XmlParser
|
|
8
|
+
# Parses XML string using SAX2, calling the given listener.
|
|
9
|
+
def self.parse: (untyped xml_string, untyped listener) -> untyped
|
|
10
|
+
|
|
11
|
+
# Base listener with unmapped-data collection support.
|
|
12
|
+
class BaseListener
|
|
13
|
+
include REXML::SAX2Listener
|
|
14
|
+
|
|
15
|
+
attr_reader unmapped_data: untyped
|
|
16
|
+
|
|
17
|
+
def initialize: () -> untyped
|
|
18
|
+
|
|
19
|
+
# Override in subclass: return true if the tag is recognized.
|
|
20
|
+
def recognized_tag?: (untyped _uri, untyped _localname, untyped _qname) -> untyped
|
|
21
|
+
|
|
22
|
+
def start_element: (untyped uri, untyped localname, untyped qname, untyped attrs) -> untyped
|
|
23
|
+
|
|
24
|
+
def end_element: (untyped _uri, untyped _localname, untyped _qname) -> untyped
|
|
25
|
+
|
|
26
|
+
def characters: (untyped text) -> untyped
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Generated from lib/xlsxrb/ooxml/zip_generator.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Xlsxrb
|
|
4
|
+
module Ooxml
|
|
5
|
+
# Generates a simple ZIP file using only the standard library.
|
|
6
|
+
class ZipGenerator
|
|
7
|
+
def initialize: (untyped filepath) -> untyped
|
|
8
|
+
|
|
9
|
+
# Adds an entry to the ZIP archive.
|
|
10
|
+
def add_entry: (untyped filepath, untyped content) -> untyped
|
|
11
|
+
|
|
12
|
+
# Generates the ZIP file.
|
|
13
|
+
def generate: () -> untyped
|
|
14
|
+
|
|
15
|
+
private
|
|
16
|
+
|
|
17
|
+
def write_entries: () -> untyped
|
|
18
|
+
|
|
19
|
+
def write_local_header: (untyped entry) -> untyped
|
|
20
|
+
|
|
21
|
+
def write_file_data: (untyped entry) -> untyped
|
|
22
|
+
|
|
23
|
+
def write_central_directory: () -> untyped
|
|
24
|
+
|
|
25
|
+
def compress: (untyped content) -> untyped
|
|
26
|
+
|
|
27
|
+
def crc32: (untyped content) -> untyped
|
|
28
|
+
|
|
29
|
+
def dos_datetime: (untyped time) -> untyped
|
|
30
|
+
|
|
31
|
+
def le16: (untyped value) -> untyped
|
|
32
|
+
|
|
33
|
+
def le32: (untyped value) -> untyped
|
|
34
|
+
|
|
35
|
+
def calculate_central_dir_size: () -> untyped
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Generated from lib/xlsxrb/ooxml/zip_reader.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Xlsxrb
|
|
4
|
+
module Ooxml
|
|
5
|
+
# Reads ZIP archives using only stdlib (zlib).
|
|
6
|
+
# Scans local file headers sequentially — works with non-seekable IO.
|
|
7
|
+
class ZipReader
|
|
8
|
+
LOCAL_HEADER_SIG: untyped
|
|
9
|
+
|
|
10
|
+
MAX_UNCOMPRESSED_SIZE: untyped
|
|
11
|
+
|
|
12
|
+
attr_accessor max_uncompressed_size: untyped
|
|
13
|
+
|
|
14
|
+
# Opens a ZIP from a file path or IO and yields the reader.
|
|
15
|
+
# : (untyped source, ?max_uncompressed_size: Integer) ?{ (ZipReader) -> untyped } -> (ZipReader | untyped)
|
|
16
|
+
def self.open: (untyped source, ?max_uncompressed_size: Integer) ?{ (ZipReader) -> untyped } -> (ZipReader | untyped)
|
|
17
|
+
|
|
18
|
+
# : (untyped io, ?max_uncompressed_size: Integer) -> void
|
|
19
|
+
def initialize: (untyped io, ?max_uncompressed_size: Integer) -> void
|
|
20
|
+
|
|
21
|
+
# Returns a Hash { entry_name => raw_bytes } for all entries.
|
|
22
|
+
def read_all: () -> untyped
|
|
23
|
+
|
|
24
|
+
# Returns raw bytes for a single entry, or nil if not found.
|
|
25
|
+
def read_entry: (untyped name) -> untyped
|
|
26
|
+
|
|
27
|
+
# Yields (entry_name, data_string) for each file in the archive.
|
|
28
|
+
def each_entry: () ?{ (?) -> untyped } -> untyped
|
|
29
|
+
|
|
30
|
+
private
|
|
31
|
+
|
|
32
|
+
def entries: () -> untyped
|
|
33
|
+
|
|
34
|
+
def parse_entries: () -> untyped
|
|
35
|
+
|
|
36
|
+
def parse_from_central_directory: (untyped io) -> untyped
|
|
37
|
+
|
|
38
|
+
def find_data_descriptor_stream: (untyped io, untyped method) -> untyped
|
|
39
|
+
|
|
40
|
+
def decompress: (untyped raw, untyped method) -> untyped
|
|
41
|
+
|
|
42
|
+
def safe_inflate: (untyped raw, untyped wbits) -> untyped
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Generated from lib/xlsxrb/ooxml/zip_writer.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Xlsxrb
|
|
4
|
+
module Ooxml
|
|
5
|
+
# Writes ZIP archives using only stdlib (zlib).
|
|
6
|
+
# Supports streaming: entries are written sequentially, central directory at close.
|
|
7
|
+
class ZipWriter
|
|
8
|
+
def self.open: (untyped target) ?{ (?) -> untyped } -> untyped
|
|
9
|
+
|
|
10
|
+
def initialize: (untyped io) -> untyped
|
|
11
|
+
|
|
12
|
+
# Add a file entry with string content.
|
|
13
|
+
def add_entry: (untyped path, untyped content) -> untyped
|
|
14
|
+
|
|
15
|
+
# Add a file entry with binary content (no encoding conversion).
|
|
16
|
+
def add_binary_entry: (untyped path, untyped content) -> untyped
|
|
17
|
+
|
|
18
|
+
# Write a string directly into the current ZIP entry stream.
|
|
19
|
+
# Use start_entry / write_data / finish_entry for true streaming.
|
|
20
|
+
def start_entry: (untyped path) -> untyped
|
|
21
|
+
|
|
22
|
+
def write_data: (untyped str) -> untyped
|
|
23
|
+
|
|
24
|
+
def finish_entry: () -> untyped
|
|
25
|
+
|
|
26
|
+
def close: () -> untyped
|
|
27
|
+
|
|
28
|
+
private
|
|
29
|
+
|
|
30
|
+
def determine_seekable: () -> untyped
|
|
31
|
+
|
|
32
|
+
def write_bytes: (untyped data) -> untyped
|
|
33
|
+
|
|
34
|
+
def write_raw_entry: (untyped path, untyped content_bytes) -> untyped
|
|
35
|
+
|
|
36
|
+
def deflate: (untyped content) -> untyped
|
|
37
|
+
|
|
38
|
+
def write_local_header: (untyped path, untyped crc, untyped compressed_size, untyped uncompressed_size, ?gp_flag: untyped, ?count_bytes: untyped) -> untyped
|
|
39
|
+
|
|
40
|
+
def write_central_directory: () -> untyped
|
|
41
|
+
|
|
42
|
+
def write_end_of_central_directory: (untyped cd_offset, untyped cd_size) -> untyped
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Generated from lib/xlsxrb/ooxml.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Xlsxrb
|
|
4
|
+
# Low-level OOXML infrastructure layer.
|
|
5
|
+
# Handles ZIP extraction, SAX XML parsing, and XML generation
|
|
6
|
+
# in strict accordance with ECMA-376.
|
|
7
|
+
module Ooxml
|
|
8
|
+
class Event < Data
|
|
9
|
+
attr_reader type(): untyped
|
|
10
|
+
|
|
11
|
+
attr_reader args(): untyped
|
|
12
|
+
|
|
13
|
+
attr_reader source(): untyped
|
|
14
|
+
|
|
15
|
+
def self.new: (untyped type, untyped args, untyped source) -> instance
|
|
16
|
+
| (type: untyped, args: untyped, source: untyped) -> instance
|
|
17
|
+
|
|
18
|
+
def self.members: () -> [ :type, :args, :source ]
|
|
19
|
+
|
|
20
|
+
def members: () -> [ :type, :args, :source ]
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# Generated from lib/xlsxrb/style_builder.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Xlsxrb
|
|
4
|
+
# Helper class for building cell styles with a fluent DSL.
|
|
5
|
+
# Encapsulates font, fill, border, alignment, and number format properties.
|
|
6
|
+
# @api public
|
|
7
|
+
class StyleBuilder
|
|
8
|
+
COLORS: untyped
|
|
9
|
+
|
|
10
|
+
def resolve_color: (untyped color) -> untyped
|
|
11
|
+
|
|
12
|
+
# : (?String? name) -> void
|
|
13
|
+
def initialize: (?String? name) -> void
|
|
14
|
+
|
|
15
|
+
attr_reader name: untyped
|
|
16
|
+
|
|
17
|
+
attr_reader font_props: untyped
|
|
18
|
+
|
|
19
|
+
attr_reader fill_props: untyped
|
|
20
|
+
|
|
21
|
+
attr_reader border_props: untyped
|
|
22
|
+
|
|
23
|
+
attr_reader num_fmt_id: untyped
|
|
24
|
+
|
|
25
|
+
attr_reader alignment: untyped
|
|
26
|
+
|
|
27
|
+
# Applies option-style definitions so callers can use add_style(name, **opts)
|
|
28
|
+
# as an alternative to block-based fluent chaining.
|
|
29
|
+
# Applies option-style definitions so callers can use add_style(name, **opts)
|
|
30
|
+
# as an alternative to block-based fluent chaining.
|
|
31
|
+
# @param opts [Hash] The styling options.
|
|
32
|
+
# @return [self]
|
|
33
|
+
# @api public
|
|
34
|
+
# : (**untyped) -> self
|
|
35
|
+
def apply_options!: (**untyped) -> self
|
|
36
|
+
|
|
37
|
+
# Configures multiple font properties at once.
|
|
38
|
+
# @param opts [Hash] The font properties.
|
|
39
|
+
# @return [self]
|
|
40
|
+
# @api public
|
|
41
|
+
# : (**untyped) -> self
|
|
42
|
+
def font: (**untyped) -> self
|
|
43
|
+
|
|
44
|
+
# rubocop:disable Style/OptionalBooleanParameter
|
|
45
|
+
# Sets the font to bold.
|
|
46
|
+
# @param value [Boolean] Whether to apply bold.
|
|
47
|
+
# @return [self]
|
|
48
|
+
# @api public
|
|
49
|
+
# : (?bool) -> self
|
|
50
|
+
def bold: (?bool) -> self
|
|
51
|
+
|
|
52
|
+
# Sets the font to italic.
|
|
53
|
+
# @param value [Boolean] Whether to apply italic.
|
|
54
|
+
# @return [self]
|
|
55
|
+
# @api public
|
|
56
|
+
# : (?bool) -> self
|
|
57
|
+
def italic: (?bool) -> self
|
|
58
|
+
|
|
59
|
+
# Sets the font size.
|
|
60
|
+
# @param size_value [Numeric] The size.
|
|
61
|
+
# @return [self]
|
|
62
|
+
# @api public
|
|
63
|
+
# : (Numeric) -> self
|
|
64
|
+
def size: (Numeric) -> self
|
|
65
|
+
|
|
66
|
+
# Sets the font name.
|
|
67
|
+
# @param name [String] The font name.
|
|
68
|
+
# @return [self]
|
|
69
|
+
# @api public
|
|
70
|
+
# : (String) -> self
|
|
71
|
+
def font_name: (String) -> self
|
|
72
|
+
|
|
73
|
+
# Sets the font color.
|
|
74
|
+
# @param color [String, Symbol] The color.
|
|
75
|
+
# @return [self]
|
|
76
|
+
# @api public
|
|
77
|
+
# : (String | Symbol) -> self
|
|
78
|
+
def font_color: (String | Symbol) -> self
|
|
79
|
+
|
|
80
|
+
# Sets the font underline style.
|
|
81
|
+
# @param val [String] The underline style (e.g., 'single').
|
|
82
|
+
# @return [self]
|
|
83
|
+
# @api public
|
|
84
|
+
# : (?String) -> self
|
|
85
|
+
def underline: (?String) -> self
|
|
86
|
+
|
|
87
|
+
# Sets the font strikethrough.
|
|
88
|
+
# @param value [Boolean] Whether to apply strike.
|
|
89
|
+
# @return [self]
|
|
90
|
+
# @api public
|
|
91
|
+
# : (?bool) -> self
|
|
92
|
+
def strike: (?bool) -> self
|
|
93
|
+
|
|
94
|
+
# Sets the vertical alignment of the font.
|
|
95
|
+
# @param value [String] The alignment value.
|
|
96
|
+
# @return [self]
|
|
97
|
+
# @api public
|
|
98
|
+
# : (String) -> self
|
|
99
|
+
def vert_align: (String) -> self
|
|
100
|
+
|
|
101
|
+
# Sets the fill pattern.
|
|
102
|
+
# @param pattern [String, Symbol] The pattern type.
|
|
103
|
+
# @param fg_color [String, Symbol, nil] The foreground color.
|
|
104
|
+
# @param bg_color [String, Symbol, nil] The background color.
|
|
105
|
+
# @return [self]
|
|
106
|
+
# @api public
|
|
107
|
+
# Configures fill properties.
|
|
108
|
+
# @param pattern [String, Symbol] The pattern type.
|
|
109
|
+
# @param fg_color [String, Symbol, nil] The foreground color.
|
|
110
|
+
# @param bg_color [String, Symbol, nil] The background color.
|
|
111
|
+
# @return [self]
|
|
112
|
+
# @api public
|
|
113
|
+
# : (String | Symbol pattern, ?fg_color: String | Symbol | nil, ?bg_color: String | Symbol | nil) -> self
|
|
114
|
+
def fill_pattern: (String | Symbol pattern, ?fg_color: String | Symbol | nil, ?bg_color: String | Symbol | nil) -> self
|
|
115
|
+
|
|
116
|
+
# Sets a solid fill color.
|
|
117
|
+
# @param color [String, Symbol] The color.
|
|
118
|
+
# @return [self]
|
|
119
|
+
# @api public
|
|
120
|
+
# : (String | Symbol) -> self
|
|
121
|
+
def fill_color: (String | Symbol) -> self
|
|
122
|
+
|
|
123
|
+
# : (?pattern: String | Symbol, ?fg_color: String | Symbol | nil, ?bg_color: String | Symbol | nil) -> self
|
|
124
|
+
def fill: (?pattern: String | Symbol, ?fg_color: String | Symbol | nil, ?bg_color: String | Symbol | nil) -> self
|
|
125
|
+
|
|
126
|
+
# Sets a gradient fill.
|
|
127
|
+
# @param type [String] The gradient type.
|
|
128
|
+
# @param degree [Numeric, nil] The degree.
|
|
129
|
+
# @param stops [Array] The gradient stops.
|
|
130
|
+
# @return [self]
|
|
131
|
+
# @api public
|
|
132
|
+
# : (type: String, ?degree: Numeric | nil, ?stops: Array[untyped]) -> self
|
|
133
|
+
def fill_gradient: (type: String, ?degree: Numeric | nil, ?stops: Array[untyped]) -> self
|
|
134
|
+
|
|
135
|
+
# Configures multiple border properties.
|
|
136
|
+
# @param opts [Hash] Border options.
|
|
137
|
+
# @return [self]
|
|
138
|
+
# @api public
|
|
139
|
+
# : (**untyped) -> self
|
|
140
|
+
def border: (**untyped) -> self
|
|
141
|
+
|
|
142
|
+
# Sets all borders.
|
|
143
|
+
# @param style [String, Symbol] The border style.
|
|
144
|
+
# @param color [String, Symbol, nil] The color.
|
|
145
|
+
# @return [self]
|
|
146
|
+
# @api public
|
|
147
|
+
# : (?style: String | Symbol, ?color: String | Symbol | nil) -> self
|
|
148
|
+
def border_all: (?style: String | Symbol, ?color: String | Symbol | nil) -> self
|
|
149
|
+
|
|
150
|
+
# Sets the left border.
|
|
151
|
+
# @param style [String, Symbol] The border style.
|
|
152
|
+
# @param color [String, Symbol, nil] The color.
|
|
153
|
+
# @return [self]
|
|
154
|
+
# @api public
|
|
155
|
+
# : (?style: String | Symbol, ?color: String | Symbol | nil) -> self
|
|
156
|
+
def border_left: (?style: String | Symbol, ?color: String | Symbol | nil) -> self
|
|
157
|
+
|
|
158
|
+
# Sets the right border.
|
|
159
|
+
# @param style [String, Symbol] The border style.
|
|
160
|
+
# @param color [String, Symbol, nil] The color.
|
|
161
|
+
# @return [self]
|
|
162
|
+
# @api public
|
|
163
|
+
# : (?style: String | Symbol, ?color: String | Symbol | nil) -> self
|
|
164
|
+
def border_right: (?style: String | Symbol, ?color: String | Symbol | nil) -> self
|
|
165
|
+
|
|
166
|
+
# Sets the top border.
|
|
167
|
+
# @param style [String, Symbol] The border style.
|
|
168
|
+
# @param color [String, Symbol, nil] The color.
|
|
169
|
+
# @return [self]
|
|
170
|
+
# @api public
|
|
171
|
+
# : (?style: String | Symbol, ?color: String | Symbol | nil) -> self
|
|
172
|
+
def border_top: (?style: String | Symbol, ?color: String | Symbol | nil) -> self
|
|
173
|
+
|
|
174
|
+
# Sets the bottom border.
|
|
175
|
+
# @param style [String, Symbol] The border style.
|
|
176
|
+
# @param color [String, Symbol, nil] The color.
|
|
177
|
+
# @return [self]
|
|
178
|
+
# @api public
|
|
179
|
+
# : (?style: String | Symbol, ?color: String | Symbol | nil) -> self
|
|
180
|
+
def border_bottom: (?style: String | Symbol, ?color: String | Symbol | nil) -> self
|
|
181
|
+
|
|
182
|
+
# rubocop:disable Naming/MethodParameterName
|
|
183
|
+
# Sets diagonal borders.
|
|
184
|
+
# @param style [String, Symbol] The border style.
|
|
185
|
+
# @param color [String, Symbol, nil] The color.
|
|
186
|
+
# @param up [Boolean] Diagonal up.
|
|
187
|
+
# @param down [Boolean] Diagonal down.
|
|
188
|
+
# @return [self]
|
|
189
|
+
# @api public
|
|
190
|
+
# : (?style: String | Symbol, ?color: String | Symbol | nil, ?up: bool, ?down: bool) -> self
|
|
191
|
+
def border_diagonal: (?style: String | Symbol, ?color: String | Symbol | nil, ?up: bool, ?down: bool) -> self
|
|
192
|
+
|
|
193
|
+
# Sets horizontal alignment.
|
|
194
|
+
# @param value [String, Symbol] The alignment.
|
|
195
|
+
# @return [self]
|
|
196
|
+
# @api public
|
|
197
|
+
# : (String | Symbol) -> self
|
|
198
|
+
def align_horizontal: (String | Symbol) -> self
|
|
199
|
+
|
|
200
|
+
# Sets vertical alignment.
|
|
201
|
+
# @param value [String, Symbol] The alignment.
|
|
202
|
+
# @return [self]
|
|
203
|
+
# @api public
|
|
204
|
+
# : (String | Symbol) -> self
|
|
205
|
+
def align_vertical: (String | Symbol) -> self
|
|
206
|
+
|
|
207
|
+
# rubocop:disable Style/OptionalBooleanParameter
|
|
208
|
+
# Sets text wrapping.
|
|
209
|
+
# @param value [Boolean] Whether to wrap text.
|
|
210
|
+
# @return [self]
|
|
211
|
+
# @api public
|
|
212
|
+
# : (?bool) -> self
|
|
213
|
+
def wrap_text: (?bool) -> self
|
|
214
|
+
|
|
215
|
+
# Sets shrink to fit.
|
|
216
|
+
# @param value [Boolean] Whether to shrink text.
|
|
217
|
+
# @return [self]
|
|
218
|
+
# @api public
|
|
219
|
+
# : (?bool) -> self
|
|
220
|
+
def shrink_to_fit: (?bool) -> self
|
|
221
|
+
|
|
222
|
+
# Sets text rotation.
|
|
223
|
+
# @param value [Numeric] The rotation angle.
|
|
224
|
+
# @return [self]
|
|
225
|
+
# @api public
|
|
226
|
+
# : (Numeric) -> self
|
|
227
|
+
def text_rotation: (Numeric) -> self
|
|
228
|
+
|
|
229
|
+
# Sets text indent.
|
|
230
|
+
# @param value [Numeric] The indent level.
|
|
231
|
+
# @return [self]
|
|
232
|
+
# @api public
|
|
233
|
+
# : (Numeric) -> self
|
|
234
|
+
def indent: (Numeric) -> self
|
|
235
|
+
|
|
236
|
+
# Sets the number format.
|
|
237
|
+
# @param num_fmt_id [String, Integer] The format id or format string.
|
|
238
|
+
# @return [self]
|
|
239
|
+
# @api public
|
|
240
|
+
# : (String | Integer) -> self
|
|
241
|
+
def number_format: (String | Integer) -> self
|
|
242
|
+
|
|
243
|
+
alias num_fmt number_format
|
|
244
|
+
|
|
245
|
+
# Register this style with the given Writer, returning the style_id.
|
|
246
|
+
# writer:: Xlsxrb::Ooxml::Writer instance
|
|
247
|
+
# : (untyped writer) -> Integer
|
|
248
|
+
def register_with: (untyped writer) -> Integer
|
|
249
|
+
end
|
|
250
|
+
end
|