Import HTML CSS GSAP and anime.js animations into PAGX with html-to-pagx skill and snapshot toolchain.#3508
Open
OnionsYu wants to merge 416 commits into
Open
Conversation
…resolved typeface lacks the requested weight or slant." This reverts commit 630cc34.
…eight and slant survive missing styled faces.
…riting-mode support and new normalization passes.
…ont assets across snapshot requests.
…rt_html2 # Conflicts: # include/pagx/PAGXDocument.h # src/pagx/svg/SVGExporter.cpp
…per frame against the original page.
…animation keyframes.
…s animate on the captured timeline clock.
…mpling and HTML report playback.
…set is preserved under the absolute x and y channel.
…API animations so ease-in-out and cubic-bezier easings reach the snapshot instead of being clobbered to linear.
…acity-zero visibility cull so fade-in subjects survive the snapshot walker.
…le clamping color lerp to keep channels valid.
…HTML import so step animations actually advance instead of holding the start value for the full duration.
…everse and delayed animations capture the base layout position instead of the current animation frame.
…ns no longer show the start keyframe value during the delay or revert correctly when finished.
…r target for HTML color animations so text color keyframes are applied instead of being silently dropped.
…nstances no longer drop out of anime.running and freeze every later frame at the start state.
…and yoyo tweens import as a clean alternating loop.
…imated elements so autoAlpha entrances render.
…resent so GSAP animations preserve their position.
…S animation-direction reverse so ease-in plays as ease-out and steps jump-end as jump-start.
…oot and matrix parser edge cases.
…ender path ignores the crop region.
… satisfy the code formatter.
…ngth normalization, mask/clip-path handling, inline-SVG currentColor and shared-defs injection, flex inference edge cases, text-fragment whitespace/writing-mode/decoration branches, and HTML transform-pass skeleton/filter paths, raising line coverage of the SVG and HTML importer sources from 84.7% to 92.3%.
…mask> of white stroke shapes plus a masked <foreignObject> whose <div> carries the paint as a CSS gradient) back into native stroked shapes during inline-SVG import, recolouring each mask shape's stroke to a concrete colour sampled from the div background (solid verbatim, gradient sampled to its representative hue over the shape box), because the downstream SVG importer does not understand <foreignObject> and would otherwise paint the masked region opaque black and drop the shape on dark backgrounds, which was erasing the conic-gradient petals in the showcase_mandala pagx_to_html round-trip.
…eStorage.cpp), exercising ParseImageStorageMode aliases and both Embed and External modes end to end, including data-URI/remote/inline skips, relative-path resolution via baseDir/outputDir, absolute and CWD-relative reads, document-dir prefix stripping, co-located cleanup, and the missing-file, create-directory, and copy-file failure paths, raising line coverage of the file from 0% to 99%.
…isfy the code formatter.
…spec and expand the pagx skill's reference table. Redirect spec/html_subset.md (and its zh_CN mirror) from the nonexistent references/patterns.md, references/guide.md, and "PAGX guide" pointers to the real spec/pagx_spec.md Container Layout section (and inline the text-decoration/pitfalls notes), and correct the §11 auto-normalization prose to describe autoNormalize/preserveUnknownElements as HTMLImporter::Options fields rather than the nonexistent --html-no-normalize/--html-preserve-unknown CLI flags. Also list resolve and PPTX export in the pagx SKILL.md CLI reference row, add spec/html_subset.md as a listed reference, and broaden the description triggers accordingly.
…port_html_animation # Conflicts: # .codebuddy/skills/pagx/SKILL.md # src/pagx/PAGXExporter.cpp # test/src/PAGXHTMLImporterTest.cpp
… id export image-storage pass and SVG PPTX exporters into the HTML animation branch.
… runner, mirroring the static eval so animation cases can download external images into a shared content-addressed cache and store images in each .pagx as external files or embedded base64.
…first and switch to partial render mode.
…struction and the pagx import CLI options raising line coverage of HTMLInlineSvgEmitter to 99 percent and CommandImport to 52 percent.
…channels the importer already supports, correcting the stale claim that scale/rotate/skew are non-playable and adding the matrix, drop-shadow/blur filter, clip-path morph, animation-fill-mode, steps, and inline-SVG fill/stroke/dashoffset channels, and add the missing section 13 Animation to the Chinese spec. Co-authored-by: Cursor <cursoragent@cursor.com>
… a main merge, adding shrink-to-fit flex-grow and justify-content tolerance boundary tests, and replacing decimal test values with integers.
…y parsing them with SVGBlendModeFromString (hyphenated CSS keywords such as color-dodge/hard-light/plus-lighter) instead of BlendModeFromString (which only accepts PAGX's camelCase names, so single-word modes worked by coincidence while every multi-word mode silently fell back to Normal), and recover BlendMode::PlusDarker from the exporter's baked pagx_pd_* feImage+feComposite filter marker so the pagx->html->pagx round-trip preserves all blend modes, with new importer tests covering the hyphenated keywords and the plus-darker filter marker.
…rt_html2 # Conflicts: # src/pagx/PAGXExporter.cpp
… the locally built pagx directly instead of the html2pagx wrapper, reframing html2pagx as an optional convenience tool.
…tory instead of test/out so CI artifact upload no longer fails on the illegal colon character.
…tandalone workflow into an update-only flow for editing existing PAGX files, and vendor the html_subset spec into the skill so its reference resolves.
…d CLI: correct the HTMLSubsetTransformer header path and rename the AbsoluteToFlexInference pass to HTMLFlexInference in the spec, fix pagx import resolve-failure behavior (aborts without writing) and format inference wording in cli.md, note the render/layout/bounds/export/font-embed resolved-file prerequisite and the verify --json file field, correct the warm-server no-resolve output and the --embed-fonts font guidance to pagx font embed across SKILL/pipeline/authoring-html, and fix the stale off-by-default --html-infer-flex comment on HTMLFlexInferencePass.
…nto feature/onionsyu_import_html_animation # Conflicts: # .codebuddy/skills/pagx/SKILL.md
…rt_html_animation # Conflicts: # .codebuddy/skills/pagx/SKILL.md # .codebuddy/skills/pagx/references/authoring-html.md # CMakeLists.txt # spec/html_subset.md # spec/html_subset.zh_CN.md # src/cli/CommandImport.cpp # src/pagx/html/importer/HTMLCssCascade.cpp # src/pagx/html/importer/HTMLCssCascade.h # src/pagx/html/importer/HTMLElementEmitter.cpp # src/pagx/html/importer/HTMLLayerBuilder.cpp # src/pagx/html/importer/HTMLParserContext.cpp # src/pagx/html/importer/HTMLParserContext.h # src/pagx/html/importer/HTMLStyleCascade.cpp # src/pagx/html/importer/HTMLStyleCascade.h # src/pagx/html/importer/HTMLSubsetPropertyTable.cpp # src/pagx/html/importer/HTMLTransformPasses.cpp # src/pagx/html/importer/HTMLValueParser.cpp # src/pagx/html/importer/HTMLValueParser.h # src/pagx/svg/SVGImporter.cpp # src/pagx/utils/StringParser.cpp # src/pagx/utils/StringParser.h # test/src/PAGXHTMLImporterTest.cpp # tools/html-snapshot/README.md # tools/html-snapshot/eval/compare.js # tools/html-snapshot/html2pagx # tools/html-snapshot/lib/batch.ts # tools/html-snapshot/lib/browser-engine.ts # tools/html-snapshot/lib/browser-snapshot.ts # tools/html-snapshot/lib/cli.ts # tools/html-snapshot/lib/pipeline.ts # tools/html-snapshot/lib/resource-cache.ts # tools/html-snapshot/lib/snapshot-runner.ts # tools/html-snapshot/snapshot.js # tools/html-snapshot/test/browser-engine.test.js
… so the SVG viewBox scale is asserted on the layer matrix and the unsupported-filter warning uses a genuinely unrecognized filter function.
…re helpers for transform matrix filter clip-path and step timing.
…ons in html-snapshot animation-capture. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…capture pipeline functions.
… rate, and loop mode into a single Animation so a staggered grid of siblings no longer produces a long run of near-identical Animation blocks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
将 HTML 页面(含 CSS keyframes、GSAP、anime.js 等动画)导入为带动画的 PAGX,并配套提供 html-to-pagx skill 与 html-snapshot 工具链,便于非技术用户从描述或现有网页生成动画 PAGX。
主要变更:
HTML 动画导入器
html-snapshot 工具与 npm 包
html-to-pagx skill
CLI 与 spec 文档
其它修复