Files
wp-asciiplayer/block.json
LamGC f04600c37b Refresh player with native block editor preview and local assets
Preserve shortcode rendering, normalize options, bundle the player locally,
and add reproducible packaging and WordPress integration tests.
2026-10-12 17:56:08 +08:00

38 lines
1.6 KiB
JSON

{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "lamgc/asciiplayer",
"version": "1.1.0",
"title": "Asciicast Player",
"category": "media",
"icon": "editor-code",
"description": "Embed and preview a terminal recording with the locally bundled asciinema player.",
"keywords": ["asciinema", "terminal", "recording"],
"textdomain": "wp-asciiplayer",
"attributes": {
"source": { "type": "string", "default": "" },
"theme": { "type": "string", "default": "asciinema" },
"speed": { "type": "number", "default": 1 },
"loop": { "type": "boolean", "default": false },
"controls": { "type": "string", "default": "auto", "enum": ["auto", "always", "never"] },
"fit": { "type": "string", "default": "width", "enum": ["width", "height", "both", "none"] },
"startAt": { "type": "number", "default": 0 },
"idleTimeLimit": { "type": "number", "default": 0 },
"autoPlay": { "type": "boolean", "default": false },
"preload": { "type": "boolean", "default": true },
"width": { "type": "string", "default": "100%" },
"legacyStyle": { "type": "string", "default": "" },
"cols": { "type": "number" },
"rows": { "type": "number" },
"terminalFontFamily": { "type": "string" },
"terminalFontSize": { "type": "string" },
"terminalLineHeight": { "type": "number" },
"poster": { "type": "string" }
},
"supports": { "html": false, "align": ["wide", "full"] },
"editorScript": "lamgc-asciiplayer-editor",
"viewScript": "lamgc-asciiplayer-view",
"editorStyle": "lamgc-asciiplayer-editor-style",
"style": "lamgc-asciiplayer-style"
}