feat(preview): upgrade to ranui/ranuts 0.2 with builder, a11y & responsive UI - #9
Open
chaxus wants to merge 1 commit into
Open
feat(preview): upgrade to ranui/ranuts 0.2 with builder, a11y & responsive UI#9chaxus wants to merge 1 commit into
chaxus wants to merge 1 commit into
Conversation
…nsive UI Upgrade ranui 0.1.10-alpha-27 -> 0.2.0-alpha.1 and ranuts 0.1.0-alpha-23 -> 0.2.0-alpha.0, then modernize the preview component around the new APIs: - Rebuild all DOM construction with ranui's builder (ButtonBuilder/Div/View/ Style) instead of manual createElement/setAttribute. - Replace the hand-rolled spinner/text with r-loading + r-progress (real download percentage). - Accessibility: dialog semantics (role=dialog, aria-modal), native <button> close control with decorative icon, focus management (move in on open, restore on close), Escape to close, keyboard-activatable focusable trigger, progressbar + live-region loading, iframe title, focus-visible rings. - Responsive mobile/iPad/PC: dynamic viewport units, safe-area insets, touch tap targets (44/48px), breakpoints, overscroll containment, reduced-motion. - Adapt build config to the bumped toolchain (drop deprecated tsconfig baseUrl; source Rollup types from vite; drop rolldown-incompatible options). Verified: tsc clean, ES + UMD builds pass, PDF preview + a11y + responsive confirmed in-browser across mobile/iPad/desktop viewports. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
Upgrades the file-preview component to the latest ranui
0.2.0-alpha.1and ranuts0.2.0-alpha.0, and modernizes the implementation around the new APIs.Changes
ranui0.1.10-alpha-27 → 0.2.0-alpha.1,ranuts0.1.0-alpha-23 → 0.2.0-alpha.0. All APIs the component relies on (Client,MessageCodec,noop,isSafari,md5) remain intact.ButtonBuilder/Div/View/Stylefromranui/builder, replacing manualcreateElement/setAttribute.r-loading+r-progress(real download percentage).role="dialog",aria-modal,aria-label)<button>close control (decorativearia-hiddenicon)role="progressbar"+role="status"/aria-liveloading; iframetitle; visible focus ringsdvh/dvw,env(safe-area-inset-*), touch tap targets (44/48px), breakpoints,overscroll-behavior: contain,prefers-reduced-motion.baseUrl; sourced Rollup types fromvite; dropped rolldown-incompatible options).Verification
tsc --noEmitclean🤖 Generated with Claude Code