sevgi-showcase 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: 5cfa0ec43c375bc4dadcf8a6c9ffbfcae8e4fbab1d967207185e7160462eab36
4
- data.tar.gz: 5a57c57405839b8cce479e7dc6b9f5eff9ed62a9c3a42ef51ff836761b8528e3
3
+ metadata.gz: eecc3014d3bbf6524c0c30eed7632c3414de707442fa4c89a38b151cea344696
4
+ data.tar.gz: 7d8bf35039daedc891b88f55a32e622eee708c9af0350f7940d83826207e6634
5
5
  SHA512:
6
- metadata.gz: 2edf1a1607b43a582c3a8b35be8a77c81d0768715b25542a630a86cb6f10b94df2510a3ec64ab143690c75e82de2efab5b80c6911ec34300cf4329501b76dd34
7
- data.tar.gz: 5d5dc597fc58f6e7a3995b4f13a289ff3766f9452c64d50886086ddb9d8d6731f53de4cd8fd48643fb8d3844e93f746c3a9c1727540c22190a66fb156f8803a8
6
+ metadata.gz: 808da584d85c10cf7cb4587afdd1451b3d83accfc1b76c06b961680085d9ccbcdc5a0b2800bbc5ac2d16b92218b23e45076a15b9e2af0c8e979ddb11fe11ffd6
7
+ data.tar.gz: bbff818a26174051d81fdba11f7b4ba031a9dead679b7d31d0daf030b975a818e08bd36165e54c9636b467614dfbb33964684a45157556aa080b03bbf387e9a7
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
@@ -10,8 +10,9 @@ gem install sevgi-showcase
10
10
 
11
11
  ## Contents
12
12
 
13
- The gem is an asset package rather than a runtime API. It contains the executable `.sevgi` examples, their expected
14
- SVG output, and private build support used by the documentation site.
13
+ The gem is an asset package rather than a runtime API. It contains executable `.sevgi` examples and their expected SVG
14
+ output. It also contains private build support for the documentation site. The test suite runs each example and
15
+ compares its output.
15
16
 
16
17
  ## Ruby compatibility
17
18
 
@@ -32,8 +32,8 @@ module Sevgi
32
32
  # @overload run(*args)
33
33
  # Runs the script directly.
34
34
  # @param args [Array<String>] extra command arguments
35
- # @return [Sevgi::Showcase::Test::Shell::Result]
36
- def run(*) = Shell.run(file, *)
35
+ # @return [Sevgi::Function::Shell::Result]
36
+ def run(*) = F.sh(file, *)
37
37
 
38
38
  # Returns the script suite name.
39
39
  # @return [String]
@@ -62,10 +62,10 @@ module Sevgi
62
62
  # @overload run_passive(*args)
63
63
  # Runs the script without writing Save output to files.
64
64
  # @param args [Array<String>] extra command arguments
65
- # @return [Sevgi::Showcase::Test::Shell::Result]
65
+ # @return [Sevgi::Function::Shell::Result]
66
66
  def run_passive(*)
67
67
  warn("...#{name}")
68
- Shell.run("sevgi", "-r", "sevgi/showcase/passive", file, *)
68
+ F.sh("sevgi", "-r", "sevgi/showcase/passive", file, *)
69
69
  end
70
70
 
71
71
  private
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "sevgi/function"
4
+
3
5
  require_relative "minitest/script"
4
- require_relative "minitest/shell"
5
6
  require_relative "minitest/suite"
6
7
 
7
8
  module Sevgi
@@ -4,6 +4,6 @@ module Sevgi
4
4
  # Showcase component namespace.
5
5
  module Showcase
6
6
  # Current showcase component version.
7
- VERSION = "0.98.2"
7
+ VERSION = "1.0.0"
8
8
  end
9
9
  end
data/srv/arc.sevgi ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env -S ruby -S sevgi
2
+ # frozen_string_literal: true
3
+
4
+ SVG :inkscape, width: "150mm", height: "100mm", viewBox: "0 0 150 100" do
5
+ ellipse = Geometry::Ellipse[70, 40, position: [75, 50], rotation: -15]
6
+ arc = ellipse.arc starting_angle: 180, extent: 210
7
+ remainder = ellipse.arc starting_angle: arc.starting_angle, extent: arc.extent - 360
8
+
9
+ g fill: "none", stroke: "slategray", "stroke-width": 0.3, "stroke-dasharray": "2 2" do
10
+ Draw remainder, id: "arc-remainder"
11
+ Draw arc.box
12
+ end
13
+
14
+ Draw arc, id: "arc-route", fill: "none", stroke: "purple", "stroke-width": 1
15
+
16
+ text dy: 7, fill: "black", "font-family": "monospace", "font-size": 5 do
17
+ textPath arc.length.round(1).to_s, href: "#arc-route", startOffset: "50%", "text-anchor": "middle"
18
+ end
19
+
20
+ text dy: -4, fill: "slategray", "font-family": "monospace", "font-size": 5 do
21
+ textPath remainder.length.round(1).to_s, href: "#arc-remainder", startOffset: "50%", "text-anchor": "middle"
22
+ end
23
+
24
+ [arc.starting, arc.reverse.starting].each do |point|
25
+ circle cx: point.x, cy: point.y, r: 1.5, fill: "purple"
26
+ end
27
+
28
+ circle cx: arc.center.x, cy: arc.center.y, r: 1, fill: "black"
29
+ end.Save
data/srv/arc.svg ADDED
@@ -0,0 +1,32 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ xmlns:_="http://sevgi.roktas.dev"
5
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
6
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
7
+ shape-rendering="crispEdges"
8
+ width="150mm"
9
+ height="100mm"
10
+ viewBox="0 0 150 100"
11
+ >
12
+ <g fill="none" stroke="slategray" stroke-width="0.3" stroke-dasharray="2 2">
13
+ <path id="arc-remainder" d="M 7.385192159765225 68.11733315717646 A 70 40 -15 0 0 138.73252216369696 53.62844576284043"/>
14
+ <rect x="6.597208" y="7.326143" width="136.805584" height="60.79119"/>
15
+ </g>
16
+ <path
17
+ id="arc-route"
18
+ d="M 7.385192159765225 68.11733315717646 A 70 40 -15 1 1 138.73252216369696 53.62844576284043"
19
+ fill="none"
20
+ stroke="purple"
21
+ stroke-width="1"
22
+ />
23
+ <text dy="7" fill="black" font-family="monospace" font-size="5">
24
+ <textPath href="#arc-route" startOffset="50%" text-anchor="middle">198.7</textPath>
25
+ </text>
26
+ <text dy="-4" fill="slategray" font-family="monospace" font-size="5">
27
+ <textPath href="#arc-remainder" startOffset="50%" text-anchor="middle">153.3</textPath>
28
+ </text>
29
+ <circle cx="7.385192159765225" cy="68.11733315717646" r="1.5" fill="purple"/>
30
+ <circle cx="138.73252216369696" cy="53.62844576284043" r="1.5" fill="purple"/>
31
+ <circle cx="75.0" cy="50.0" r="1" fill="black"/>
32
+ </svg>
data/srv/arc.yml ADDED
@@ -0,0 +1,4 @@
1
+ dark:
2
+ black: white
3
+ purple: "#e5c39c"
4
+ slategray: silver
data/srv/checkers.sevgi CHANGED
@@ -71,8 +71,7 @@ placement = {
71
71
  }
72
72
  }
73
73
 
74
- SVG :minimal,
75
- width: CheckerBoard::SIZE,
74
+ SVG width: CheckerBoard::SIZE,
76
75
  height: CheckerBoard::SIZE,
77
76
  viewBox: "0 0 #{CheckerBoard::SIZE} #{CheckerBoard::SIZE}" do
78
77
  Call CheckerBoard, placement
data/srv/checkers.svg CHANGED
@@ -1,4 +1,5 @@
1
- <svg width="900" height="900" viewBox="0 0 900 900">
1
+ <?xml version="1.0" standalone="no"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="900" height="900" viewBox="0 0 900 900">
2
3
  <style type="text/css">
3
4
  <![CDATA[
4
5
  .board-frame {
data/srv/clover.sevgi CHANGED
@@ -8,7 +8,7 @@ PATH
8
8
  CENTER = 13
9
9
  SIZE = 26
10
10
 
11
- SVG :minimal, width: SIZE, height: SIZE do
11
+ SVG width: SIZE, height: SIZE do
12
12
  rect width: SIZE, height: SIZE, rx: 0.75, fill: "white"
13
13
  defs { path id: "Clover", d: CLOVER, fill: "purple" }
14
14
 
data/srv/clover.svg CHANGED
@@ -1,4 +1,5 @@
1
- <svg width="26" height="26">
1
+ <?xml version="1.0" standalone="no"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="26" height="26">
2
3
  <rect width="26" height="26" rx="0.75" fill="white"/>
3
4
  <defs>
4
5
  <path id="Clover" d="m 0,10 c 5.53264,0 10,-4.479747 10,-10 -5.52589,0 -10,4.488702 -10,10
data/srv/gear.sevgi CHANGED
@@ -7,7 +7,7 @@ STYLE = {
7
7
  stroke: "none"
8
8
  }.freeze
9
9
 
10
- SVG :minimal, width: 100, height: 100, viewBox: "0 0 100 100" do
10
+ SVG width: 100, height: 100, viewBox: "0 0 100 100" do
11
11
  mask id: "hole",
12
12
  maskUnits: "userSpaceOnUse",
13
13
  maskContentUnits: "userSpaceOnUse",
data/srv/gear.svg CHANGED
@@ -1,4 +1,5 @@
1
- <svg width="100" height="100" viewBox="0 0 100 100">
1
+ <?xml version="1.0" standalone="no"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">
2
3
  <mask id="hole" maskUnits="userSpaceOnUse" maskContentUnits="userSpaceOnUse" x="0" y="0" width="100" height="100">
3
4
  <rect width="100" height="100" fill="white"/>
4
5
  <circle cx="50" cy="50" r="15" fill="black"/>
data/srv/grid.sevgi CHANGED
@@ -6,8 +6,7 @@ COLORS = %w[#FF6961 #77DD77 #FFD700].freeze
6
6
  COLS = 9
7
7
  ROWS = 4
8
8
 
9
- SVG :minimal,
10
- width: COLS * SIZE,
9
+ SVG width: COLS * SIZE,
11
10
  height: ROWS * SIZE,
12
11
  viewBox: "0 0 #{COLS * SIZE} #{ROWS * SIZE}" do
13
12
  css ".cell" => { stroke: "white" }
data/srv/grid.svg CHANGED
@@ -1,4 +1,5 @@
1
- <svg width="180" height="80" viewBox="0 0 180 80">
1
+ <?xml version="1.0" standalone="no"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="180" height="80" viewBox="0 0 180 80">
2
3
  <style type="text/css">
3
4
  <![CDATA[
4
5
  .cell {
data/srv/hatch.sevgi ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env -S ruby -S sevgi
2
+ # frozen_string_literal: true
3
+
4
+ SVG :inkscape, width: 150, height: 100, viewBox: "0 0 150 100" do
5
+ ellipse = Geometry::Ellipse[70, 40, position: [75, 50]]
6
+
7
+ Draw ellipse, fill: "#f8e6f8", stroke: "blue", "stroke-width": 1.5
8
+ Hatch ellipse, angle: 35, step: 6, stroke: "purple", "stroke-width": 0.5
9
+ end.Save
data/srv/hatch.svg ADDED
@@ -0,0 +1,30 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ xmlns:_="http://sevgi.roktas.dev"
5
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
6
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
7
+ shape-rendering="crispEdges"
8
+ width="150"
9
+ height="100"
10
+ viewBox="0 0 150 100"
11
+ >
12
+ <ellipse cx="75.0" cy="50.0" rx="70.0" ry="40.0" fill="#f8e6f8" stroke="blue" stroke-width="1.5"/>
13
+ <path d="M 8.083983 61.742081 L 41.452937 85.107274" stroke="purple" stroke-width="0.5"/>
14
+ <path d="M 5.120097 52.342098 L 56.974708 88.651087" stroke="purple" stroke-width="0.5"/>
15
+ <path d="M 5.489812 45.276328 L 69.162877 89.860688" stroke="purple" stroke-width="0.5"/>
16
+ <path d="M 7.516638 39.370879 L 79.693937 89.909968" stroke="purple" stroke-width="0.5"/>
17
+ <path d="M 10.657929 34.245787 L 89.110531 89.17889" stroke="purple" stroke-width="0.5"/>
18
+ <path d="M 14.660149 29.723524 L 97.666196 87.844984" stroke="purple" stroke-width="0.5"/>
19
+ <path d="M 19.386506 25.708308 L 105.497723 86.004031" stroke="purple" stroke-width="0.5"/>
20
+ <path d="M 24.76021 22.146368 L 112.681905 83.709801" stroke="purple" stroke-width="0.5"/>
21
+ <path d="M 30.741521 19.009879 L 119.258479 80.990121" stroke="purple" stroke-width="0.5"/>
22
+ <path d="M 37.318095 16.290199 L 125.23979 77.853632" stroke="purple" stroke-width="0.5"/>
23
+ <path d="M 44.502277 13.995969 L 130.613494 74.291692" stroke="purple" stroke-width="0.5"/>
24
+ <path d="M 52.333804 12.155016 L 135.339851 70.276476" stroke="purple" stroke-width="0.5"/>
25
+ <path d="M 60.889469 10.82111 L 139.342071 65.754213" stroke="purple" stroke-width="0.5"/>
26
+ <path d="M 70.306063 10.090032 L 142.483362 60.629121" stroke="purple" stroke-width="0.5"/>
27
+ <path d="M 80.837123 10.139312 L 144.510188 54.723672" stroke="purple" stroke-width="0.5"/>
28
+ <path d="M 93.025292 11.348913 L 144.879903 47.657902" stroke="purple" stroke-width="0.5"/>
29
+ <path d="M 108.547063 14.892726 L 141.916017 38.257919" stroke="purple" stroke-width="0.5"/>
30
+ </svg>
data/srv/hatch.yml ADDED
@@ -0,0 +1,4 @@
1
+ dark:
2
+ "#f8e6f8": "#2c251e"
3
+ blue: "#60a5fa"
4
+ purple: "#e5c39c"
data/srv/heart.sevgi CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  HEART = "M10,35 A20,20,0,0,1,50,35 A20,20,0,0,1,90,35 Q90,65,50,95 Q10,65,10,35 Z"
5
5
 
6
- SVG :minimal, width: 120, height: 120, viewBox: "-10 -10 120 120" do
6
+ SVG width: 120, height: 120, viewBox: "-10 -10 120 120" do
7
7
  mask id: "heart",
8
8
  maskUnits: "userSpaceOnUse",
9
9
  maskContentUnits: "userSpaceOnUse",
data/srv/heart.svg CHANGED
@@ -1,4 +1,5 @@
1
- <svg width="120" height="120" viewBox="-10 -10 120 120">
1
+ <?xml version="1.0" standalone="no"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="-10 -10 120 120">
2
3
  <mask id="heart" maskUnits="userSpaceOnUse" maskContentUnits="userSpaceOnUse" x="0" y="0" width="100" height="100">
3
4
  <rect width="100" height="100" fill="white"/>
4
5
  <path d="M10,35 A20,20,0,0,1,50,35 A20,20,0,0,1,90,35 Q90,65,50,95 Q10,65,10,35 Z" fill="black"/>
data/srv/logo.sevgi CHANGED
@@ -33,7 +33,7 @@ module Logo
33
33
  end
34
34
  end
35
35
 
36
- SVG :minimal, width: 120, height: 120, viewBox: "-1 -1 62 62" do
36
+ SVG width: 120, height: 120, viewBox: "-1 -1 62 62" do
37
37
  rect x: -1, y: -1, width: 62, height: 62, fill: "white"
38
38
  Call Logo
39
39
  end.Save
data/srv/logo.svg CHANGED
@@ -1,4 +1,5 @@
1
- <svg width="120" height="120" viewBox="-1 -1 62 62">
1
+ <?xml version="1.0" standalone="no"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="-1 -1 62 62">
2
3
  <rect x="-1" y="-1" width="62" height="62" fill="white"/>
3
4
  <style type="text/css">
4
5
  <![CDATA[
data/srv/logos.sevgi CHANGED
@@ -25,7 +25,7 @@ fade = proc do |tile, x:, y:, **|
25
25
  tile[:opacity] = opacities.fetch(x + y)
26
26
  end
27
27
 
28
- SVG :minimal, width: 260, height: 135, viewBox: "0 0 260 135" do
28
+ SVG width: 260, height: 135, viewBox: "0 0 260 135" do
29
29
  css STYLE
30
30
  rect width: 260, height: 135, fill: "white"
31
31
 
data/srv/logos.svg CHANGED
@@ -1,4 +1,5 @@
1
- <svg width="260" height="135" viewBox="0 0 260 135">
1
+ <?xml version="1.0" standalone="no"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="260" height="135" viewBox="0 0 260 135">
2
3
  <style type="text/css">
3
4
  <![CDATA[
4
5
  .active {
data/srv/meter.sevgi CHANGED
@@ -10,7 +10,7 @@ dim = proc do |led, x:, **|
10
10
  led[:"fill-opacity"] = 0.3 if x >= 7
11
11
  end
12
12
 
13
- SVG :minimal, width: TOTAL_WIDTH, height: 30, viewBox: "0 0 #{TOTAL_WIDTH} 30" do
13
+ SVG width: TOTAL_WIDTH, height: 30, viewBox: "0 0 #{TOTAL_WIDTH} 30" do
14
14
  rect x: 2, y: 2, width: TOTAL_WIDTH - 4, height: 26,
15
15
  rx: 4, fill: "none", stroke: "#666"
16
16
 
data/srv/meter.svg CHANGED
@@ -1,4 +1,5 @@
1
- <svg width="128" height="30" viewBox="0 0 128 30">
1
+ <?xml version="1.0" standalone="no"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="128" height="30" viewBox="0 0 128 30">
2
3
  <rect x="2" y="2" width="124" height="26" rx="4" fill="none" stroke="#666"/>
3
4
  <defs>
4
5
  <g id="led">
data/srv/orb.sevgi ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env -S ruby -S sevgi
2
+ # frozen_string_literal: true
3
+
4
+ SVG width: 150, height: 100, viewBox: "0 0 150 100" do
5
+ defs do
6
+ radialGradient id: "orb", cx: "35%", cy: "30%", r: "65%" do
7
+ stop offset: 0, "stop-color": "#f8e6f8"
8
+ stop offset: 0.5, "stop-color": "purple"
9
+ stop offset: 1, "stop-color": "#600060"
10
+ end
11
+ end
12
+
13
+ circle cx: 75, cy: 50, r: 43, fill: "url(#orb)"
14
+ end.Save
data/srv/orb.svg ADDED
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="150" height="100" viewBox="0 0 150 100">
3
+ <defs>
4
+ <radialGradient id="orb" cx="35%" cy="30%" r="65%">
5
+ <stop offset="0" stop-color="#f8e6f8"/>
6
+ <stop offset="0.5" stop-color="purple"/>
7
+ <stop offset="1" stop-color="#600060"/>
8
+ </radialGradient>
9
+ </defs>
10
+ <circle cx="75" cy="50" r="43" fill="url(#orb)"/>
11
+ </svg>
data/srv/orb.yml ADDED
@@ -0,0 +1,4 @@
1
+ dark:
2
+ "#600060": "#2c251e"
3
+ "#f8e6f8": "#f0d6b8"
4
+ purple: "#e5c39c"
data/srv/pacman.sevgi CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env -S ruby -S sevgi
2
2
  # frozen_string_literal: true
3
3
 
4
- SVG :minimal, width: 180, height: 90 do
4
+ SVG width: 180, height: 90 do
5
5
  rect id: "frame", width: 180, height: 90, rx: 5, fill: "white"
6
6
 
7
7
  circle id: "head", cx: 70, cy: 45, r: 40, fill: "purple"
data/srv/pacman.svg CHANGED
@@ -1,4 +1,5 @@
1
- <svg width="180" height="90">
1
+ <?xml version="1.0" standalone="no"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="180" height="90">
2
3
  <rect id="frame" width="180" height="90" rx="5" fill="white"/>
3
4
  <circle id="head" cx="70" cy="45" r="40" fill="purple"/>
4
5
  <circle id="eye" cx="80" cy="23" r="6" fill="white"/>
data/srv/pokey.sevgi CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env -S ruby -S sevgi
2
2
  # frozen_string_literal: true
3
3
 
4
- SVG :minimal, width: 100, height: 100 do
4
+ SVG width: 100, height: 100 do
5
5
  rect x: 0, y: 0, width: 100, height: 100, fill: "white"
6
6
  path fill: "purple", d: %w[
7
7
  M10 101 V50 A40 40 0 0 1 90 50 V101
data/srv/pokey.svg CHANGED
@@ -1,4 +1,5 @@
1
- <svg width="100" height="100">
1
+ <?xml version="1.0" standalone="no"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
2
3
  <rect x="0" y="0" width="100" height="100" fill="white"/>
3
4
  <path fill="purple" d="M10 101 V50 A40 40 0 0 1 90 50 V101 L76 85 L63 101 L50 85 L37 101 L24 85 Z"/>
4
5
  <circle cx="25" cy="40" r="8" fill="white"/>
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env -S ruby -S sevgi
2
+ # frozen_string_literal: true
3
+
4
+ CX = 75
5
+ CY = 75
6
+ RADIUS = 70
7
+
8
+ SVG width: "150mm", height: "85mm", viewBox: "0 0 150 85" do
9
+ ruler = Ruler brut: 180, unit: 1, multiple: 10
10
+
11
+ g fill: "none", stroke: "black", "stroke-width": 0.2 do
12
+ ArcTo x1: CX - RADIUS, y1: CY, x2: CX + RADIUS, y2: CY,
13
+ rx: RADIUS, ry: RADIUS, sweep: true
14
+ HLineBy x: CX - RADIUS, y: CY, length: 2 * RADIUS
15
+
16
+ [
17
+ [ruler.ms - ruler.ds - ruler.hs, 2],
18
+ [ruler.hs, 4],
19
+ [ruler.ds, 6]
20
+ ].each do |degrees, length|
21
+ degrees.each do |degree|
22
+ g transform: "rotate(#{degree} #{CX} #{CY})" do
23
+ HLineBy x: CX - RADIUS, y: CY, length:
24
+ end
25
+ end
26
+ end
27
+
28
+ HLineBy x: CX - 2, y: CY, length: 4
29
+ VLineBy x: CX, y: CY - 2, length: 4
30
+ end
31
+
32
+ g fill: "black", "font-family": "monospace", "font-size": "2.5pt", "text-anchor": "middle" do
33
+ ruler.ds[1...-1].each do |degree|
34
+ g transform: "rotate(#{degree} #{CX} #{CY})" do
35
+ text degree.to_i.to_s, x: 18, y: CY, dy: 1,
36
+ transform: "rotate(#{-degree} 18 #{CY})"
37
+ end
38
+ end
39
+ end
40
+ end.Save