Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
639cdc1
Add WASI platform support with conditional imports
khoi May 15, 2025
cb81297
Add conditional compilation for model properties in WASI target
khoi May 15, 2025
a764e06
Refactor WASI conditional compilation directives
khoi May 15, 2025
fab1eae
Update package to Swift 5.9 and macOS 14
khoi May 19, 2025
020fd0b
Remove cgPath property from MBezierPath macOS extension
khoi May 19, 2025
3682ff3
Add Linux platform support
khoi May 20, 2025
eb8bb34
Add CoreGraphics polyfill for Linux and WASI platforms
khoi May 20, 2025
8ca0735
Move ObservableObject to extensions across SVG component classes
khoi May 20, 2025
053bb04
Improve cross-platform support by conditionally compiling SwiftUI code
khoi May 20, 2025
c179754
Refactor SVGPathReader platform-specific imports and type aliases
khoi May 20, 2025
cbf5c70
Refactor DOMParser platform-specific imports
khoi May 20, 2025
a196fee
Refactor text anchor handling for improved cross-platform support
khoi May 20, 2025
6601c42
Refactor SVGPaint SwiftUI extension with conditional compilation
khoi May 20, 2025
0a6a559
Refactor SVGPolygon and SVGPolyline to use Swift's typed constants
khoi May 20, 2025
31cea92
Simplify CGAffineTransform serialization
khoi May 20, 2025
c672e04
Fix import statements in DOMParser for Linux/WASI
khoi May 20, 2025
e24b4ed
Reorganize SwiftUI conditional compilation in SVGGradient
khoi May 22, 2025
42bcbee
Fix SVGPathReader bezierPath initialization for Linux/WASI
khoi May 22, 2025
00f6c68
Fix Foundation imports and remove redundant typealiases
khoi May 22, 2025
642372c
Remove redundant math functions from Linux/WASI polyfill
khoi May 22, 2025
5b1af60
Convert CGPath and MBezierPath to classes in CoreGraphicsPolyfill
khoi May 22, 2025
85aca57
Add comprehensive test suite for CoreGraphicsPolyfill
khoi May 23, 2025
c7e476c
Add CI workflow and configure test target
khoi May 23, 2025
8e8f553
Add macOS CI job for native CoreGraphics testing
khoi May 23, 2025
2a4afcc
Simplify macOS test job name in CI workflow
khoi May 23, 2025
554086d
Remove Swift PM caching from CI workflow
khoi May 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test-linux:
name: Test on Linux
runs-on: ubuntu-latest
container:
image: swift:5.9

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run tests
run: swift test --enable-test-discovery

test-macos:
name: Test on macOS
runs-on: macos-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run tests
run: swift test --enable-test-discovery

11 changes: 7 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// swift-tools-version:5.3
// swift-tools-version:5.9

import PackageDescription

let package = Package(
name: "SVGView",
platforms: [
.macOS(.v11),
.macOS(.v14),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bumping to match our packages, also to get rid of some of the unnecessary methods like cgPath on NSBezierPath

.iOS(.v14),
.watchOS(.v7)
],
Expand All @@ -18,8 +18,11 @@ let package = Package(
targets: [
.target(
name: "SVGView",
path: "Source",
exclude: ["Info.plist"]
path: "Source"
),
.testTarget(
name: "CoreGraphicsPolyfillTests",
dependencies: ["SVGView"]
)
],
swiftLanguageVersions: [.v5]
Expand Down
Loading