Download the PHP package skylive/lienzo without Composer

On this page you can find all versions of the php package skylive/lienzo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package lienzo

Lienzo

Lienzo is an open-source landing page builder you add to your own web app. Your admins get a visual editor where they place headings, images, forms and your app's own elements on a free-form canvas, with a separate phone layout. Visitors get fast static HTML with one stylesheet and a small script. Pages are stored as a validated JSON document. A TypeScript renderer and a native PHP renderer turn that document into byte-identical HTML, so a Laravel app needs no Node at runtime. Any other backend can implement the same small HTTP protocol and render with the TypeScript package.

Lienzo has three packages:

Package What it is
skylive/lienzo (Composer) The Laravel integration: tables, editor routes, public pages, uploads, form submissions and the PHP renderer. Ships the editor prebuilt.
@skylivellc/lienzo-core (npm) The document schema, the renderer, the stylesheet, the page script and the protocol types. No framework.
@skylivellc/lienzo-editor (npm) The editor, as a Vue 3 component and as a <lienzo-editor> custom element.

Laravel quickstart

Lienzo supports Laravel 12 and 13 on PHP 8.3 or later, with the gd, dom, and mbstring extensions. examples/laravel is an app built with exactly these steps.

  1. Install the package.

  2. Publish the config and the migration, then migrate.

    lienzo:install also deletes Laravel's stock public/robots.txt. Web servers serve files in public/ before Laravel runs, so that file would hide the robots.txt that Lienzo serves. If your robots.txt has custom rules, the command keeps it and prints a warning. In that case, add a Sitemap: line to it yourself.

  3. Say who may edit the site. Define the lienzo.manage gate in a service provider, for example in AppServiceProvider::boot():

  4. Register the routes in routes/web.php. Put the editor routes inside your authenticated group and Route::lienzo() after every other route:

    Route::lienzo() serves published pages at / and /{slug}, plus sitemap.xml, robots.txt, the form endpoint and published images. Routes you declare before it win. To serve the site under a prefix, pass it: Route::lienzo('site'). To keep a slug free for your app, constrain the returned route: Route::lienzo()->where('slug', '(?!admin$)[a-z0-9]+(-[a-z0-9]+)*').

  5. Put the editor on an admin page, for example resources/views/admin.blade.php. Give it a height, because the editor fills its element:

Open the admin page. The editor asks for a first page. Leave its address empty to make it the home page, then click Publish.

Inertia or a single-page app

<x-lienzo::editor> is a Blade component. On an Inertia or single-page app page, render the <lienzo-editor> element yourself and load the bundle from Lienzo::editorScriptUrl(), which honors editor_url and busts caches the way the component does:

Tell Vue that lienzo-editor is a custom element, with isCustomElement: (tag) => tag.startsWith('lienzo-') in the Vue plugin's template.compilerOptions.

One site per team or tenant

Site::default() is the single site of a single-site app. If your app has one site per team or tenant, add the HasLienzoSite trait to the owner model, use Site::forOwner($team) on the admin page, and tell Lienzo which site a public request is for:

Both route macros also work inside a group with parameters of its own, such as Route::domain('{team}.example.com')->group(fn () => Route::lienzo()). The resolver can read the parameter with $request->route('team'), and the URLs Lienzo generates take the parameter from the current request.

config/lienzo.php holds the rest: the database connection, the upload disk and limits, how many published versions to keep, the form rate limit, the editor middleware, and a CDN URL for the editor bundle.

Other backends

The editor talks to any backend over the HTTP protocol that @skylivellc/lienzo-core/protocol describes: about a dozen JSON routes for the workspace, pages, publishing, versions, uploads, app element previews and form submissions. To host Lienzo on another stack, do these things:

  1. Implement the protocol routes. Validate every draft with parseDocument(input, catalog) and answer 422 with its issues. Answer 409 when baseRevision is stale.
  2. Serve the editor. Load the prebuilt @skylivellc/lienzo-editor/standalone file in a <script type="module"> and add <lienzo-editor endpoint="/your/endpoint">. If your app already uses Vue, import the LienzoEditor component from @skylivellc/lienzo-editor instead.
  3. Render published pages with renderPage(), passing a RenderHost that resolves images, app actions, app elements and forms.
  4. Store form submissions. Check the posted fields against formFields() of the published document, never against what the browser sent.

examples/vanilla does all of this in one file on Node's node:http module, with no framework.

Extend the editor with your app

An app adds three kinds of things to the editor. Each one is declared on the backend, and the editor builds its controls from the declaration. These examples use the Laravel API. Other backends put the same data in the catalog they send to the editor.

Elements with live data. An app element is a class with a list of fields and a render method. Lienzo stores only the field values in the page. render runs on every public request and for the editor's preview, so the canvas always shows what visitors get:

Fields come from a closed set: text, number, toggle, choice, image and action. A choice field with ->multiple() keeps every value picked, as a list. An element can also return scoped CSS from css().

Fields check type, length, range and choices, not formats. When a text value must have a shape, such as an analytics id, check it where you use it and skip it when it does not match, for example preg_match('/^G-[A-Z0-9]+$/', $site->meta['ga4'] ?? '') === 1.

Actions. A button or a link can run an app action. The closure turns the stored value into a link, or returns null to render the button inert:

Site fields. Site-wide values, such as a phone number or an analytics id, appear in the editor's site settings and are stored in the site's meta:

Lienzo::head() adds trusted markup to every page's <head>, and Lienzo::messages() overrides the public page strings per locale, including the form replies sent and formUnavailable.

Security model

Editors are trusted to change content, never to run code. Developers are trusted to run code. Lienzo enforces that line on the server:

Browser support

Published pages and the editor need container queries, color-mix() and CSS nesting. These browsers support all three:

Browser Version
Chrome and Edge 112 or later
Safari 16.5 or later
Firefox 117 or later

App element CSS is nested under the element's selector. If it uses nesting that starts with a bare element name, such as ul { }, it needs Chrome 120, Safari 17.2 or Firefox 117. Start nested rules with a class to avoid this.

Contributing

You need Node 24, pnpm 12, PHP 8.3 or later, and Composer.

pnpm e2e runs the editor's tests and then both examples. Run pnpm build before it, because the examples use the built packages.

Some changes need more than the test suites:

docs/releasing.md lists the release steps.

License

Lienzo is released under the THIRD_PARTY_NOTICES.md.


All versions of lienzo with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-dom Version *
ext-gd Version *
ext-mbstring Version *
illuminate/auth Version ^12.0|^13.0
illuminate/console Version ^12.0|^13.0
illuminate/database Version ^12.0|^13.0
illuminate/filesystem Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/routing Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
illuminate/validation Version ^12.0|^13.0
illuminate/view Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package skylive/lienzo contains the following files

Loading the files please wait ...