Download the PHP package pushinbr/pam-native-svg without Composer
On this page you can find all versions of the php package pushinbr/pam-native-svg. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pushinbr/pam-native-svg
More information about pushinbr/pam-native-svg
Files in pushinbr/pam-native-svg
Package pam-native-svg
Short Description Native SVG for PAM Native: retained vector nodes, gradients, dashes and render-thread animations on Android Canvas and Core Animation.
License Apache-2.0
Homepage https://github.com/push-in/pam-native-svg
Informations about the package pam-native-svg
Icons, progress rings, gradients and dashed strokes parsed once, retained natively and animated without crossing back to PHP. [](https://packagist.org/packages/pushinbr/pam-native-svg) [](https://github.com/push-in/pam-native-svg/releases/latest)  [](LICENSE) [Install](#install) · [Quick example](#quick-example) · [Platforms](#platform-support) · [Features](#features) · [Docs](#docs) · [Issues](https://github.com/push-in/pam-native-svg/issues)
Install
Inside a PAM Native project, add only this capability:
New to PAM? Create a project with pam init my-app --template native (see the PAM Native overview), then come back here. Composer owns the manifest and the lockfile; pam composer runs it on PAM's verified PHP runtime.
Quick example
Declarative .pam components use the same native view:
PHP builds or loads the markup; the native side parses each content hash once into a retained tree (Android Canvas + RenderNode, iOS CAShapeLayer) and runs animations itself, so a progress ring updating 30 times a second never re-renders PHP or re-parses a path. A complete screen is in examples/UploadProgress.php.
Platform support
| Platform | Support | Notes |
|---|---|---|
| Android | API 24+ | Canvas / RenderNode; Choreographer animations only while visible |
| iOS | 15.0+ | Core Animation (CAShapeLayer, CABasicAnimation); see iOS validation |
| PAM Native | 1.0.0 to < 2.0.0 | From pam-native.plugin.json (composer.json requires ^1.0.15); PHP 8.5+ |
Requirements
No permissions and no dependencies beyond the platform SDKs (iOS frameworks: CoreGraphics, QuartzCore, UIKit). The plugin registers one host view, svg.view.
Features
Svg,Path(all commands incl. arcs),Circle,Ellipse,Rect,Line,Polyline,Polygon,G,ClipPath,LinearGradient,RadialGradient, transforms, opacity, dash arrays/offsets withpathLength,trim().Svg::fromString()/Svg::fromFile()with hash-keyed caches on both sides;tint(),color()(currentColor),size(),fit().- Native animations of opacity, dash offset, trim, rotation, scale, translation and stroke
width; continuous retargeting; repeat/reverse/delay;
onAnimationEnd. - Bounded memory: 128-entry/4 MiB PHP source LRU, 64-document/2 MiB native LRU trimmed on memory pressure; no frames while a view is hidden or detached.
| Best for | Icons, progress rings, badges, gradients, decorative vectors |
| Native path | Android Canvas / RenderNode · Core Animation |
| Animation | Choreographer (only while visible) · CABasicAnimation |
| Dependencies | None beyond the platform SDKs |
See docs/svg.md for the full API, supported markup and the comparison with react-native-svg.
Testing
iOS: follow docs/ios-validation.md on a Mac.
Docs
- PAM Native overview
- Plugin and native capability model
- PAM introduction
- Changelog
- Report an issue
- Full API, supported markup and react-native-svg comparison
- iOS validation
- Example: upload progress
Part of the PAM ecosystem
PAM runs PHP natively on servers, desktops and phones. This repository is one piece of it.
| PAM | PAM Desktop | PAM Native | Ecosystem |
|---|---|---|---|
| the runtime and CLI | native desktop apps in PHP | native Android and iOS apps in PHP | every official package and plugin |
Docs: push-in.github.io/pam-docs · Issues
Apache License 2.0 · Made in Brazil by Pushin