Download the PHP package spora-ai/spora-plugin-typst-frontend without Composer

On this page you can find all versions of the php package spora-ai/spora-plugin-typst-frontend. 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 spora-plugin-typst-frontend

Spora Plugin: Typst Frontend

Vue 3 admin SPA for spora-plugin-typst. Built and shipped as Composer type spora-plugin-frontend; the host SPA (spora-frontend) lazy-loads it via /plugins/typst/main.js — the parent plugin's plugin.json#slug, not this package's name.

What's in the box

Five tabs behind the plugin's /apps/typst admin slot:

Tab Purpose Backend endpoints consumed
Fonts Drag-drop upload + table view of the principal's font library. Skill-shipped Inter OFL is read-only; principal uploads can be deleted. GET /typst/fonts, POST /typst/fonts, DELETE /typst/fonts/{name}
Templates Reusable .typ template upload + card view with inline source preview. Skill-shipped vs principal distinction as fonts. GET /typst/templates, POST /typst/templates, DELETE /typst/templates/{name}
Examples .typ example upload + card view with inline source preview. Same skill-shipped vs principal distinction as fonts. GET /typst/examples, POST /typst/examples, DELETE /typst/examples/{name}
Images Image upload + thumbnail grid. Each row carries the canonical /api/v1/assets/<uuid>.<ext> URL — copyable into Typst #image("…") source. GET /typst/images, POST /typst/images, DELETE /typst/images/{name}
Playground Single-shot Typst editor with format selector. POST /api/v1/typst/compile is always available; failures surface in the in-page error banner. POST /api/v1/typst/compile, GET /api/v1/typst/sources[?principal_id=N&kind=…]

Layout

Architectural invariants

Plugin boundary

The bundle declares important: '#spora-plugin-typst' in Tailwind config — every generated utility is scoped beneath that selector so plugin classes can't leak into the host SPA or another plugin slot. The smoke check in CI asserts this guard is in place (rejects unscoped .text-typst-* utilities) so a future Tailwind config drift fails the build.

corePlugins.preflight: false — Tailwind's global reset is omitted because the host SPA owns document-level resets. The plugin's stylesheet sits inside the slot and inherits the host's cascade.

Host contract

The bundle is mounted by spora-frontend's PluginAppPage.vue, which passes a PluginHostContext to mount(). The context exposes api (typed REST client with CSRF + envelope unwrap), pinia (host's Pinia — we don't setActivePinia(host.pinia) because that would collide with the host's stores), theme, and router. The plugin installs a local Pinia for plugin-only state (the resource store, the image store, the sources store, the principals store).

api/client.ts → setApi(...) is called once per mount(). The rest of the plugin reads through getApi() at call-time, so the host's CSRF token / base URL / envelope unwrap is preserved without re-implementation.

Architectural distinction from fonts/templates/examples

Fonts, templates, examples, and images are all plugin-private filesystem files under <storage>/typst/<kind>/<principal>/<name>. The Playground tab also surfaces the cross-plugin media archive (GET /api/v1/media?types=image) for operators who want to pull in images uploaded by other plugins.

Quality gates

The CI pipeline runs all of them on every push and PR. A size-budget job fails if main.js + style.css exceed 280 KB pre-gzip.

Languages

The panel ships its own vue-i18n instance (src/i18n/index.ts) built from its own catalogue — the host does not publish its instance. The locale comes from the host through PluginHostContext.locale; the dev sandbox reads it from ?locale=de.

The catalogue key is the English source string — t('Save & Render'), not a slug. That means a copy edit orphans the German entry, which is what the extractor's orphan rule catches.

npm run i18n:check fails on an operator-facing string that is not wrapped in t(). The strings that stay unwrapped are the ones that read the same in every language — Typst, Principal, PPI, URL, Esc — plus the technical identifiers (file names, URL paths, Typst snippets) that are held in script constants.

Depends on

spora-ai/spora-plugin-typst — the backend plugin must be merged first; the frontend consumes:

Until then, the operator uses Copy source to drop the source into the chat composer for the agent to render via typst_render.

Local development

Or stand up the host (spora-local or spora-fgrassl) with spora-plugin-typst installed and visit /apps/typst — the host lazy-loads frontend/main.js from the typst plugin's public/plugins/typst/ directory.

Releasing

  1. Build the IIFE bundle: npm run build
  2. Create a tarball: composer archive --file=spora-plugin-typst-frontend-v0.1.0.tar.gz spora-plugin-typst-frontend (uses the archive.exclude list in composer.json)
  3. Tag + push: git tag v0.1.0 && git push --tags
  4. Attach the tarball to the GitHub release. The dist.url in composer.json must match the uploaded asset URL.

SporaPluginFrontendInstaller reads composer.json#extra.spora-plugin-slug (must equal 'typst' — same as spora-plugin-typst/plugin.json#slug) and the dist URL to know where to pull the bundle from.

Authoring guidelines

Framework-level conventions — which classes are plugin-stable, what's framework-internal, schema versioning, deprecation policy — live in the Spora docs → Plugin system. This plugin's PHP twin is the source of truth for the wire contracts the SPA talks to; any breaking change there propagates here as a composer update + npm run build cycle.


All versions of spora-plugin-typst-frontend with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4.1
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 spora-ai/spora-plugin-typst-frontend contains the following files

Loading the files please wait ...