sevgi-standard 0.98.2 → 1.0.0

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: 3787ffa0eaba0ccbed4e09617d690e86bd573e582a998c66f9c3aaaff1a0e5ea
4
- data.tar.gz: 0afd16d8886430a82f8294ebaeccb320adec60a6265a9ced7e765116fe74b48e
3
+ metadata.gz: e30974181bcc1ae3893e5f3bc2348a73815a425dbcf0ee4dce33dcb27388d5ae
4
+ data.tar.gz: 31833cb299407153802ac60e9ad1274141f53d88ebf417fdd958b26c46191c3e
5
5
  SHA512:
6
- metadata.gz: 928b65a3adaf1c1bf5eb5a75de77989fe7574fdb037833dea0986a08e1f89466dbe879ab28327fa14ed513bc897be0535d10ae507bc0a95ab4c8a05b4cd3d413
7
- data.tar.gz: b7016a3f90576b7e0e669a0b569a86689d95197ec06500b242b1f1f9ae79cf871f37796d4dc32ff1df517fd84bf2062a1aefda2759d858d59dd67a08284aab3d
6
+ metadata.gz: 1087087f3ca625e836654958ea79705219b806bb64eac1ae6e43e2e4f6b0e1ff4e368681a1f8b77fd0514ecd4fd785f06245dad9b53f1f105cd3286adddc224b
7
+ data.tar.gz: dbfda5403aeb0289afbbc0e76e508d1e9b02ad1b88f2c3a5b89722e5eaf4db0f4ed442e648dca0ee6966a0b78d8b75810cddbf15820275e39f9e00b490849fda
data/CHANGELOG.md CHANGED
@@ -3,7 +3,101 @@
3
3
  This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and follows
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
5
 
6
- ## Unreleased
6
+ ## 1.0.0 - 2026-09-16
7
+
8
+ ### Added
9
+
10
+ - Added Hatch and Orb Showcase examples and displayed both arc lengths in the Arc example.
11
+
12
+ ### Changed
13
+
14
+ - Matched documentation page widths to the homepage Showcase.
15
+ - Aligned Derender user guidance with UTF-8 normalization and safe subtree selection rules.
16
+ - Clarified the packaged skill's script invocation, subtree copying, and Derender selection and encoding rules.
17
+ - Allowed Canvas and Paper values as the first `SVG` argument when using the default document profile.
18
+ - Made element `dup` and `clone` own independent subtrees while retaining IDs and Ruby copy semantics.
19
+ - Made Segment equality compare length and direction; ordering still compares length only.
20
+ - Limited Tile cell, row, and column queries to the requested geometry and accelerated XML character validation.
21
+ - Simplified the first-run guide and aligned library constructor examples.
22
+ - Updated the packaged skill for canvas origins, alignment, Paper lookup, curved geometry, and export constraints.
23
+ - Revised DSL catalog examples and packaged Sevgi skill guidance to use statement-style calls and show inspection results.
24
+ - Refined Showcase example tabs, made Ruby and XML views fill their panels, and hid executable preambles from Ruby views.
25
+ - Documented non-rendering element data and clarified the related DSL catalog examples.
26
+ - Refined Showcase heading spacing, page-title colors, and DSL catalog cards across light and dark themes.
27
+ - Removed an obsolete ruler example and unused site code.
28
+ - Kept the Squared and Copperplate guidesheet examples together at the end of the Showcase.
29
+ - Updated the packaged skill to avoid duplicate semantic shapes and unnecessary paint passes.
30
+
31
+ ### Fixed
32
+
33
+ - Kept horizontal scrollbars visible in Showcase example code panels.
34
+ - Read Derender input in its declared XML encoding and normalized generated source, XML declarations, and markup to UTF-8.
35
+ - Preserved open-path endpoints and derived edges independently of display precision.
36
+ - Kept near-axis and near-parallel line equations and intersections independent of angle and slope rounding.
37
+ - Corrected the Showcase social image dimensions.
38
+ - Added SVG namespaces to standalone drawing examples and regenerated their outputs.
39
+ - Made failed Sevgi Rake tasks stop dependent tasks and captured required-library failures in executor results.
40
+ - Removed executor signal-handler replacement so the host and shell retain SIGINT ownership.
41
+ - Escaped late export CSS as XML text and inserted it only at a supported final root closing tag.
42
+ - Preserved Derender processing instructions and rejected custom entity references and unsupported trailing document nodes before inclusion.
43
+ - Included both box origins in `Align`, unified Tile index validation, and isolated custom numeric attribute snapshots.
44
+ - Prevented avoidable overflow and underflow in point distances.
45
+ - Corrected browser source-panel expectations and added executable documentation, YARD, and packaged-skill checks.
46
+ - Rendered inline code in DSL catalog summaries and kept linked task themes visible below the sticky header.
47
+ - Restored Showcase tab icons with embedded Font Awesome SVGs.
48
+
49
+ ## 0.100.0 - 2026-09-09
50
+
51
+ ### Added
52
+
53
+ - Added `ArcTo` and `ArcBy` for SVG-native elliptical arc paths.
54
+ - Added Geometry `Arc`, `Ellipse`, and `Circle` with bounds, length, predicates, affine transformations, and
55
+ linear/quadratic intersections. Closed ellipses and circles support sweeps and hatching.
56
+ - Added Geometry `Point.midpoint`, `Element#closed?`, lined `vertices`, open-path traversal, and `Rect#center`.
57
+ - Added Geometry aggregate bounding boxes through `Operation.box`, point collinearity through `Point.collinear?`, and
58
+ polygon `simple?`, `convex?`, and `concave?` predicates.
59
+ - Added Protractor and Arc examples and documented the drawing and calculation APIs.
60
+
61
+ ### Changed
62
+
63
+ - Removed redundant parent scans while duplicating element subtrees.
64
+ - Reused source bounds across Tile cells to reduce repeated calculations and object allocations.
65
+
66
+ ### Fixed
67
+
68
+ - Preserved Showcase card HTML through Markdown rendering so all examples and their tabs remain visible.
69
+ - Preserved XML declarations, pre-root comments, CDATA sections, inline comments, and namespace-only leaves in
70
+ Derender output and evaluation.
71
+ - Limited PDF stamp recoloring to replaced text and carried graphics state across a page's content streams.
72
+ - Corrected decimal interval fitting and made Grid point queries honor the active numeric precision.
73
+ - Prevented implicit shell interpretation of single executable arguments in `F.sh` and `F.sh!`, including paths with spaces or shell metacharacters.
74
+ - Preserved inherited namespaces on detached Derender nodes in generated source and direct evaluation, including imports through `EvaluateChildren` and `IncludeChildren`.
75
+ - Prevented sweep and Hatch lines from crossing the exterior between two tangent vertices of a concave polygon.
76
+ - Aligned Tile cells with their declared bounds for circles, rotated shapes, and polygons whose first vertex differs from their bounding-box origin.
77
+ - Limited `Load` chains to 128 active sources with `Executor::LoadDepthError`, preserving cycle detection and nested load diagnostics.
78
+ - Rejected nil and false aggregate-box inputs with the documented geometry error.
79
+ - Restored precision-aware rejection of zero-length Triangle sides.
80
+ - Made point-set collinearity independent of input order and removed eager polygon edge-pair storage.
81
+ - Applied the collinearity tolerance to every three-point subset, removing coordinate-axis-dependent baseline selection.
82
+
83
+ ## 0.99.0 - 2026-08-09
84
+
85
+ ### Added
86
+
87
+ - Added `SVG.Module` for building anonymous callable drawing modules with their contract installed before definition.
88
+ - Added responsive Mermaid diagrams for the Derender round trip and SVG validation lifecycle.
89
+
90
+ ### Changed
91
+
92
+ - Reorganized the documentation around getting started, usage, composition, documents, layout, output, and examples.
93
+ - Documented how the `igves` and `igsev` command names reflect their conversion directions.
94
+ - Normalized DSL catalog provider labels to lowercase and simplified polyfill-backed editor entries to `inkscape`.
95
+
96
+ ### Fixed
97
+
98
+ - Allowed A5-on-A4 pdfcpu conversion to replace an existing output file.
99
+ - Pre-rendered Mermaid diagrams as inline SVG instead of parsing them in site visitors' browsers.
100
+ - Removed duplicate provider and context labels from DSL catalog entries.
7
101
 
8
102
  ## 0.98.2 - 2026-07-25
9
103
 
@@ -212,7 +306,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
212
306
 
213
307
  ### Changed
214
308
 
215
- - Added the checker board example to the documentation showcase flow.
309
+ - Added the checkerboard example to the documentation showcase flow.
216
310
  - Consolidated Victor Book attribution for adapted showcase examples into a single documentation note.
217
311
 
218
312
  ### Fixed
data/README.md CHANGED
@@ -19,8 +19,12 @@ require "sevgi/standard"
19
19
  ```ruby
20
20
  Sevgi::Standard.element?(:rect)
21
21
  Sevgi::Standard.attribute?(:width)
22
+ Sevgi::Standard.conform(:rect, attributes: %i[width height]) # => true
22
23
  ```
23
24
 
25
+ The component validates names, attributes, content, and nesting against Sevgi's bundled SVG compatibility data.
26
+ `conform` raises `Sevgi::ValidationError` when a known usage violates that data.
27
+
24
28
  ## Ruby compatibility
25
29
 
26
30
  Requires Ruby 3.4.0 or newer. CI verifies the current Ruby 3.4 release and the development Ruby from `.ruby-version`.
@@ -494,7 +494,7 @@ module Sevgi
494
494
  RESERVED_NAMESPACE_PREFIXES = %w[xlink: xml:].freeze
495
495
  private_constant :RESERVED_NAMESPACE_PREFIXES
496
496
 
497
- # Reports whether an attribute name should be ignored by standard validation.
497
+ # Reports whether standard validation ignores an attribute name.
498
498
  # @param attribute [String, Symbol, Object] candidate attribute name
499
499
  # @return [Boolean] true for valid private, data, xmlns, or foreign namespaced attributes
500
500
  def ignore?(attribute)
@@ -265,9 +265,9 @@ module Sevgi
265
265
  ]
266
266
  )
267
267
 
268
- # Reports whether an element name should be ignored by standard validation.
268
+ # Reports whether standard validation ignores an element name.
269
269
  # @param element [String, Symbol, Object] candidate element name
270
- # @return [Boolean] true for valid private or namespaced element names that Sevgi should not validate
270
+ # @return [Boolean] true for valid private or namespaced element names outside Sevgi validation
271
271
  def ignore?(element)
272
272
  return false unless element.is_a?(::String) || element.is_a?(::Symbol)
273
273
 
@@ -86,7 +86,7 @@ module Sevgi
86
86
 
87
87
  # Removes ignored names from a list.
88
88
  # @param names [Array<Symbol>, nil] names to filter
89
- # @return [Array<Symbol>, nil] names that should be validated
89
+ # @return [Array<Symbol>, nil] names selected for validation
90
90
  def concerns(names) = names ? names.reject { ignore?(it) } : names
91
91
 
92
92
  # Installs low-level list helpers into data modules.
@@ -71,15 +71,12 @@ module Sevgi
71
71
  def self.extended(base)
72
72
  super
73
73
 
74
- base.class_exec do
75
- @data = {}
76
-
77
- class << self
78
- attr_reader :data
79
- private :data
80
- end
81
- end
74
+ base.instance_variable_set(:@data, {})
82
75
  end
76
+
77
+ private
78
+
79
+ attr_reader :data
83
80
  end
84
81
 
85
82
  private_constant :List
@@ -3,6 +3,6 @@
3
3
  module Sevgi
4
4
  module Standard
5
5
  # Current version of the Sevgi standard gem.
6
- VERSION = "0.98.2"
6
+ VERSION = "1.0.0"
7
7
  end
8
8
  end
@@ -13,7 +13,7 @@ require_relative "standard/version"
13
13
  module Sevgi
14
14
  # SVG standard data and validation helpers.
15
15
  # The registry is a Sevgi compatibility set based on SVG 2 plus the split-out SVG modules and legacy entries already
16
- # modeled in the bundled specifications. Supported element names must have matching specification data; abandoned or
16
+ # modeled in the bundled specifications. Supported element names must have matching specification data. Abandoned or
17
17
  # unspecified proposal entries are not exposed as supported elements.
18
18
  #
19
19
  # @example Validate an SVG element usage
@@ -89,7 +89,7 @@ module Sevgi
89
89
  def model?(...) = Specification.model?(...)
90
90
 
91
91
  # Returns the expanded standard contract for an SVG element.
92
- # The returned hash and nested arrays are mutation-isolated snapshots; changing them does not alter the registry.
92
+ # The returned hash and nested arrays are mutation-isolated snapshots. Changing them does not alter the registry.
93
93
  # @param name [String, Symbol] SVG element name
94
94
  # @return [Hash, nil] expanded specification snapshot, or nil when name is unknown
95
95
  # @raise [Sevgi::ArgumentError] when name is not a String or Symbol
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sevgi-standard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.98.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recai Oktaş
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 0.98.2
18
+ version: 1.0.0
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: 0.98.2
25
+ version: 1.0.0
26
26
  description: Checks generated SVG against standard element and attribute rules.
27
27
  email: roktas@gmail.com
28
28
  executables: []
@@ -65,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
65
  - !ruby/object:Gem::Version
66
66
  version: '0'
67
67
  requirements: []
68
- rubygems_version: 4.0.16
68
+ rubygems_version: 4.0.20
69
69
  specification_version: 4
70
70
  summary: SVG element and attribute validation for Sevgi.
71
71
  test_files: []