@vite-hub/ui 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/andromeeda-DaUPZ4_A.js +147 -0
- package/dist/{announce-Cy_Tn9wW.js → announce-B0DLwflT.js} +1 -2
- package/dist/{attachments-BzTwqRTU.js → attachments-DgwoQZKY.js} +3 -5
- package/dist/aurora-x-B5RPZ9i5.js +162 -0
- package/dist/{avatar-stack-DXmCQhxd.d.ts → avatar-stack-C0IKwj6g.d.ts} +0 -2
- package/dist/ayu-dark-DXTaGA7I.js +137 -0
- package/dist/ayu-light-BCYi80Fe.js +137 -0
- package/dist/ayu-mirage-CgbXz-N5.js +137 -0
- package/dist/catppuccin-frappe-MV2xzv44.js +266 -0
- package/dist/catppuccin-latte-CL6jjlVD.js +266 -0
- package/dist/catppuccin-macchiato-Bp6oZJVK.js +266 -0
- package/dist/catppuccin-mocha-DOHrQ4dw.js +266 -0
- package/dist/{choices-input-ByXJvDn1.d.ts → choices-input-BUf-QqGj.d.ts} +0 -2
- package/dist/{code-view-DsU-xzic.js → code-view-Cg4nyTNA.js} +6 -8
- package/dist/{colors-BghReA9C-CjF9gnmy.js → colors-BghReA9C-DEq4bhEP.js} +1 -2
- package/dist/{comment-attachments-C4yNbcx5.js → comment-attachments-CMpYOJod.js} +1 -2
- package/dist/{comment-composer-DvKMTrAi.d.ts → comment-composer-BI6CNJyO.d.ts} +1 -3
- package/dist/{comment-composer-D7ZytyER.js → comment-composer-CzU7DdfD.js} +11 -14
- package/dist/{comment-layer-GTsLdABl.d.ts → comment-layer-DyVstrs-.d.ts} +5 -7
- package/dist/{comment-list-BI96empx.d.ts → comment-list-CSK5o-Ua.d.ts} +3 -5
- package/dist/{comment-panel-CsKWTms_.d.ts → comment-panel-CEvOI3gk.d.ts} +2 -4
- package/dist/{comment-person-CLPlW_SS.js → comment-person-D_IyIjXo.js} +1 -2
- package/dist/{comment-pin-CvwgRSDR.d.ts → comment-pin-C5UeLPTa.d.ts} +0 -2
- package/dist/{comment-row-JmTC0uXr.js → comment-row-DPMWI5Z0.js} +3 -4
- package/dist/{comment-selection-bar-CyVBNYl9.d.ts → comment-selection-bar-CVuS-FNL.d.ts} +0 -2
- package/dist/{comment-send-7bg4NEEM.js → comment-send-DPzV9B8S.js} +6 -8
- package/dist/{comment-send-C45dHC22.d.ts → comment-send-MmxFsOQf.d.ts} +0 -2
- package/dist/{comment-thread-B_Sc2QX6.js → comment-thread-CbPtoi8-.js} +13 -14
- package/dist/{comment-thread-C6U-bsK_.d.ts → comment-thread-DGm1cGJt.d.ts} +4 -8
- package/dist/{comment-visibility-DsVuVndP.d.ts → comment-visibility-CYctacNx.d.ts} +0 -2
- package/dist/{comments-B88zg9gC.js → comments-C0OdHh_F.js} +5 -8
- package/dist/{comments-D8hulVPy.d.ts → comments-DrE9DU-E.d.ts} +1 -3
- package/dist/{comments-context-DhbIdYQ1.js → comments-context-CrjhleVA.js} +2 -4
- package/dist/{config-B1u7zqMB.js → config-DztmAYYn.js} +3 -4
- package/dist/{config-pHazYdq6.d.ts → config-xL4EBeXw.d.ts} +0 -4
- package/dist/dark-plus-CXEBSjk4.js +148 -0
- package/dist/dracula-Bvyz6eCo.js +165 -0
- package/dist/dracula-soft-a9indxAQ.js +115 -0
- package/dist/{draw-DzSmD7uo-Dwz8zoH2.js → draw-DzSmD7uo-Cb7s9kxJ.js} +359 -708
- package/dist/{drop-field-3CDRFFRm.js → drop-field-CNZgwFVO.js} +2 -3
- package/dist/{editor-BHYGLgty.js → editor-CGiEVOnB.js} +5 -6
- package/dist/{effects-Ql6VzCRa.js → effects-g4QucvgO.js} +20 -36
- package/dist/{error-diagnostics-SXtnk6bz.js → error-diagnostics-BlgA9rI2.js} +1 -2
- package/dist/everforest-dark-9sVAxG7I.js +99 -0
- package/dist/everforest-light-BocTn_Hd.js +99 -0
- package/dist/{file-tree-C4OYgbV-.js → file-tree-CRFIdtzw.js} +58 -116
- package/dist/{file-tree-DlT9RGhu.d.ts → file-tree-DOtkeBaq.d.ts} +0 -14
- package/dist/{format-orwcdZL_.js → format-Bc9m7-r0.js} +1 -2
- package/dist/{getSingularPatch-Dsb8EgxR.js → getSingularPatch-C7LmmBrW.js} +375 -79
- package/dist/github-dark-BO9SXswM.js +142 -0
- package/dist/github-dark-default-XB_RHfBI.js +90 -0
- package/dist/github-dark-dimmed-BoGxaWUQ.js +137 -0
- package/dist/github-dark-high-contrast-B3X6t2fG.js +137 -0
- package/dist/github-light-D7VHHlUH.js +142 -0
- package/dist/github-light-default-BuDsGtcR.js +137 -0
- package/dist/github-light-high-contrast-GodZiAwh.js +137 -0
- package/dist/gruvbox-dark-hard-CU4LuKJc.js +140 -0
- package/dist/gruvbox-dark-medium-DjAsuXuH.js +140 -0
- package/dist/gruvbox-dark-soft-D3Zttj6R.js +140 -0
- package/dist/gruvbox-light-hard-4M_9onwE.js +140 -0
- package/dist/gruvbox-light-medium-D9QwS4kQ.js +140 -0
- package/dist/gruvbox-light-soft-DhYcfQql.js +140 -0
- package/dist/{handlers-DMl-Na3x.js → handlers-CnbkvXjX.js} +1 -2
- package/dist/headless.d.ts +4 -4
- package/dist/headless.js +1 -1
- package/dist/highlights-C2AbEdDI.js +2630 -0
- package/dist/{hold-to-delete-DjWzRDyY.d.ts → hold-to-delete-BSMrpE-i.d.ts} +0 -2
- package/dist/{hold-to-delete-ROLQRZg_.js → hold-to-delete-Cludb56v.js} +6 -7
- package/dist/horizon-bright-B9u59onx.js +97 -0
- package/dist/horizon-tItY9ATR.js +97 -0
- package/dist/houston-BqKrKNQv.js +207 -0
- package/dist/{icon-c5Jb_Tl7.d.ts → icon-XZaCUZTG.d.ts} +0 -2
- package/dist/{image-preview-BigoAvb3.js → image-preview-DrLXrHpp.js} +3 -4
- package/dist/{index-CNY1uNTh.d.ts → index-B2cbt3py.d.ts} +3945 -2445
- package/dist/{index-YUvL2nV8.d.ts → index-B_PSX-5h.d.ts} +0 -4
- package/dist/index.d.ts +29 -31
- package/dist/index.js +42 -45
- package/dist/{install-D5f6msEU.js → install-Ba9mkkqI.js} +2 -3
- package/dist/kanagawa-dragon-BH1K3aMw.js +159 -0
- package/dist/kanagawa-lotus-C-4JB2io.js +159 -0
- package/dist/kanagawa-wave-DTQqNe5k.js +159 -0
- package/dist/laserwave-BkV0uIaG.js +84 -0
- package/dist/light-plus-CxYgEz7U.js +149 -0
- package/dist/{list-RCbNZ14q.js → list-DUTAo0uC.js} +5 -6
- package/dist/loader-CYMEjzwc.js +79 -0
- package/dist/{markdown-editor-Dfl2DgPS.js → markdown-editor-3gY9MLvy.js} +237 -38
- package/dist/{markdown-editor-wQF0yD5o.d.ts → markdown-editor-B7gD60tp.d.ts} +0 -6
- package/dist/markdown-editor.d.ts +1 -5
- package/dist/markdown-editor.js +2 -2
- package/dist/markdown-renderer-DFS1vf1h.js +26578 -0
- package/dist/material-theme-Xdm37UUJ.js +105 -0
- package/dist/material-theme-darker-Blaz0cgN.js +105 -0
- package/dist/material-theme-lighter-BddVxBVA.js +105 -0
- package/dist/material-theme-ocean-C4qhfFHi.js +105 -0
- package/dist/material-theme-palenight-ChHDqoiA.js +105 -0
- package/dist/{message-scroller-Bm1YWTeY.d.ts → message-scroller-a6qaYHno.d.ts} +0 -2
- package/dist/min-dark-DpGSNjaW.js +125 -0
- package/dist/min-light-BMfJUsU2.js +122 -0
- package/dist/monokai-DW19E-zg.js +162 -0
- package/dist/motion/core.d.ts +3 -3
- package/dist/motion/core.js +10 -10
- package/dist/{motion-core-lHRF8PZz.d.ts → motion-core-DNl7TR1T.d.ts} +0 -54
- package/dist/motion.d.ts +3 -5
- package/dist/motion.js +11 -11
- package/dist/night-owl-B7Of8ee9.js +188 -0
- package/dist/night-owl-light-Vu9tTNpS.js +189 -0
- package/dist/nord-CDzJumeN.js +128 -0
- package/dist/{nuxt-ui-CgvMzO5v.js → nuxt-ui-7ByUrymx.js} +1 -2
- package/dist/nuxt.d.ts +1 -7
- package/dist/nuxt.js +4 -8
- package/dist/one-dark-pro-hS_sNo5p.js +124 -0
- package/dist/one-light-CD4ItzSC.js +153 -0
- package/dist/{opt-out-b6bnUjIT.js → opt-out-D66l60sg.js} +3 -6
- package/dist/parts/components/agent-session.d.ts +1 -3
- package/dist/parts/components/agent-session.js +3 -4
- package/dist/parts/components/attachment.d.ts +1 -3
- package/dist/parts/components/attachment.js +3 -4
- package/dist/parts/components/avatar-stack.d.ts +1 -1
- package/dist/parts/components/avatar-stack.js +2 -3
- package/dist/parts/components/bubble.d.ts +1 -3
- package/dist/parts/components/bubble.js +2 -3
- package/dist/parts/components/chat-message.d.ts +1 -3
- package/dist/parts/components/chat-message.js +1 -2
- package/dist/parts/components/chat-session.d.ts +2 -4
- package/dist/parts/components/chat-session.js +1 -2
- package/dist/parts/components/chat.d.ts +1 -3
- package/dist/parts/components/chat.js +4 -5
- package/dist/parts/components/code-block.d.ts +1 -3
- package/dist/parts/components/code-block.js +2 -3
- package/dist/parts/components/code-view.d.ts +1 -3
- package/dist/parts/components/code-view.js +1 -2
- package/dist/parts/components/comment-composer.d.ts +1 -1
- package/dist/parts/components/comment-composer.js +1 -2
- package/dist/parts/components/comment-layer.d.ts +1 -1
- package/dist/parts/components/comment-layer.js +10 -11
- package/dist/parts/components/comment-list.d.ts +1 -1
- package/dist/parts/components/comment-list.js +5 -6
- package/dist/parts/components/comment-panel.d.ts +1 -1
- package/dist/parts/components/comment-panel.js +9 -10
- package/dist/parts/components/comment-pin.d.ts +1 -1
- package/dist/parts/components/comment-pin.js +2 -3
- package/dist/parts/components/comment-selection-bar.d.ts +1 -1
- package/dist/parts/components/comment-selection-bar.js +3 -4
- package/dist/parts/components/comment-send.d.ts +1 -1
- package/dist/parts/components/comment-send.js +1 -2
- package/dist/parts/components/comment-thread.d.ts +1 -1
- package/dist/parts/components/comment-thread.js +2 -2
- package/dist/parts/components/comments.d.ts +8 -8
- package/dist/parts/components/comments.js +6 -6
- package/dist/parts/components/connection-status.d.ts +1 -3
- package/dist/parts/components/connection-status.js +1 -2
- package/dist/parts/components/copy-button.d.ts +1 -3
- package/dist/parts/components/copy-button.js +6 -7
- package/dist/parts/components/device-frame.d.ts +1 -3
- package/dist/parts/components/device-frame.js +1 -2
- package/dist/parts/components/drop-field.d.ts +1 -3
- package/dist/parts/components/drop-field.js +2 -3
- package/dist/parts/components/file-tree.d.ts +1 -1
- package/dist/parts/components/file-tree.js +1 -2
- package/dist/parts/components/filter-search.d.ts +2 -4
- package/dist/parts/components/filter-search.js +2 -3
- package/dist/parts/components/hold-to-delete.d.ts +2 -4
- package/dist/parts/components/hold-to-delete.js +2 -3
- package/dist/parts/components/markdown-editor.d.ts +1 -1
- package/dist/parts/components/markdown-editor.js +1 -2
- package/dist/parts/components/markdown-renderer.d.ts +1 -3
- package/dist/parts/components/markdown-renderer.js +1 -23077
- package/dist/parts/components/markdown.d.ts +1 -3
- package/dist/parts/components/markdown.js +2 -3
- package/dist/parts/components/marker.d.ts +1 -3
- package/dist/parts/components/marker.js +2 -3
- package/dist/parts/components/message-parts.d.ts +1 -3
- package/dist/parts/components/message-parts.js +2 -3
- package/dist/parts/components/message.d.ts +1 -3
- package/dist/parts/components/message.js +2 -3
- package/dist/parts/components/motion-list.d.ts +1 -3
- package/dist/parts/components/motion-list.js +2 -3
- package/dist/parts/components/motion.d.ts +2 -4
- package/dist/parts/components/motion.js +4 -5
- package/dist/parts/components/patch-parsers.d.ts +1 -1
- package/dist/parts/components/patch-parsers.js +1 -2
- package/dist/parts/components/progress.d.ts +1 -3
- package/dist/parts/components/progress.js +2 -3
- package/dist/parts/components/prompt-input.d.ts +2 -4
- package/dist/parts/components/prompt-input.js +5 -6
- package/dist/parts/components/relative-time.d.ts +1 -3
- package/dist/parts/components/relative-time.js +1 -2
- package/dist/parts/components/status.d.ts +1 -3
- package/dist/parts/components/status.js +1 -2
- package/dist/parts/components/sync-status.d.ts +1 -3
- package/dist/parts/components/sync-status.js +1 -2
- package/dist/parts/components/tool-list.d.ts +2 -4
- package/dist/parts/components/tool-list.js +2 -3
- package/dist/parts/components/trace-run.d.ts +2 -4
- package/dist/parts/components/trace-run.js +4 -5
- package/dist/parts/components/trace.d.ts +1 -3
- package/dist/parts/components/trace.js +2 -3
- package/dist/parts/composables/attachments.d.ts +1 -3
- package/dist/parts/composables/attachments.js +1 -2
- package/dist/parts/composables/highlighted-code.d.ts +1 -3
- package/dist/parts/composables/highlighted-code.js +1 -2
- package/dist/parts/headless/choices-input.d.ts +1 -1
- package/dist/parts/headless/choices-input.js +3 -4
- package/dist/parts/headless/comment-visibility.d.ts +1 -1
- package/dist/parts/headless/comment-visibility.js +1 -2
- package/dist/parts/headless/comments.d.ts +1 -1
- package/dist/parts/headless/comments.js +1 -2
- package/dist/parts/headless/message-scroller.d.ts +1 -1
- package/dist/parts/headless/message-scroller.js +2 -3
- package/dist/parts/playground/paths.d.ts +1 -3
- package/dist/parts/playground/paths.js +1 -2
- package/dist/parts/playground/share.d.ts +1 -3
- package/dist/parts/playground/share.js +1 -2
- package/dist/parts/playground/zip.d.ts +1 -3
- package/dist/parts/playground/zip.js +2 -3
- package/dist/parts/workspace/browser-support-notice.d.ts +1 -3
- package/dist/parts/workspace/browser-support-notice.js +3 -4
- package/dist/parts/workspace/codemirror.d.ts +1 -3
- package/dist/parts/workspace/codemirror.js +3 -4
- package/dist/parts/workspace/connect-panel.d.ts +1 -3
- package/dist/parts/workspace/connect-panel.js +2 -3
- package/dist/parts/workspace/connect-store.d.ts +1 -3
- package/dist/parts/workspace/connect-store.js +1 -2
- package/dist/parts/workspace/file-icons.d.ts +1 -3
- package/dist/parts/workspace/file-icons.js +1 -2
- package/dist/parts/workspace/icons.d.ts +1 -2
- package/dist/parts/workspace/icons.js +1 -2
- package/dist/parts/workspace/runners/render.d.ts +1 -3
- package/dist/parts/workspace/runners/render.js +1 -2
- package/dist/parts/workspace/runners/web-container.d.ts +1 -3
- package/dist/parts/workspace/runners/web-container.js +1 -2
- package/dist/parts/workspace/workspace-bar.d.ts +1 -3
- package/dist/parts/workspace/workspace-bar.js +2 -3
- package/dist/parts/workspace/workspace-boot-status.d.ts +1 -2
- package/dist/parts/workspace/workspace-boot-status.js +2 -3
- package/dist/parts/workspace/workspace-editor-head.d.ts +1 -3
- package/dist/parts/workspace/workspace-editor-head.js +3 -4
- package/dist/parts/workspace/workspace-editor.d.ts +1 -3
- package/dist/parts/workspace/workspace-editor.js +1 -2
- package/dist/parts/workspace/workspace-examples.d.ts +1 -3
- package/dist/parts/workspace/workspace-examples.js +2 -3
- package/dist/parts/workspace/workspace-file-link.d.ts +1 -3
- package/dist/parts/workspace/workspace-file-link.js +1 -2
- package/dist/parts/workspace/workspace-file-tree.d.ts +1 -3
- package/dist/parts/workspace/workspace-file-tree.js +2 -3
- package/dist/parts/workspace/workspace-guide.d.ts +2 -4
- package/dist/parts/workspace/workspace-guide.js +2 -3
- package/dist/parts/workspace/workspace-issues.d.ts +1 -3
- package/dist/parts/workspace/workspace-issues.js +1 -2
- package/dist/parts/workspace/workspace-preview.d.ts +1 -3
- package/dist/parts/workspace/workspace-preview.js +2 -3
- package/dist/parts/workspace/workspace-shell.d.ts +1 -1
- package/dist/parts/workspace/workspace-shell.js +2 -3
- package/dist/parts/workspace/workspace-sidebar.d.ts +2 -4
- package/dist/parts/workspace/workspace-sidebar.js +3 -4
- package/dist/parts/workspace/workspace-start.d.ts +1 -3
- package/dist/parts/workspace/workspace-start.js +2 -3
- package/dist/parts/workspace/workspace-status.d.ts +1 -3
- package/dist/parts/workspace/workspace-status.js +1 -2
- package/dist/parts/workspace/workspace-steps.d.ts +1 -1
- package/dist/parts/workspace/workspace-steps.js +2 -3
- package/dist/parts/workspace/workspace-task.d.ts +1 -3
- package/dist/parts/workspace/workspace-task.js +1 -2
- package/dist/parts/workspace/workspace-terminal.d.ts +1 -3
- package/dist/parts/workspace/workspace-terminal.js +1 -2
- package/dist/parts/workspace/workspace.d.ts +3 -5
- package/dist/parts/workspace/workspace.js +6 -7
- package/dist/{payload-text-sjkYAwvw.js → payload-text-DQNRbJY5.js} +1 -2
- package/dist/{pierre-code-view-NE35tkmR.js → pierre-code-view-C49BVDrc.js} +11333 -6718
- package/dist/pierre-dark-BtKHt2e4.js +166 -0
- package/dist/pierre-dark-CXW3KeKO.js +5 -0
- package/dist/pierre-dark-protanopia-deuteranopia-CS0Gs25Q.js +166 -0
- package/dist/pierre-dark-protanopia-deuteranopia-DajNv_A3.js +3 -0
- package/dist/pierre-dark-soft-BUFoeBEf.js +3 -0
- package/dist/pierre-dark-soft-D__0FtYP.js +166 -0
- package/dist/pierre-dark-tritanopia-C6fHROmA.js +166 -0
- package/dist/pierre-dark-tritanopia-oa3gpgIR.js +3 -0
- package/dist/pierre-dark-vibrant-COXpyAHb.js +166 -0
- package/dist/pierre-dark-vibrant-CYRHyDoW.js +3 -0
- package/dist/pierre-light-BD28C_vh.js +166 -0
- package/dist/pierre-light-BN0rL1e5.js +5 -0
- package/dist/pierre-light-protanopia-deuteranopia-CYsDHJt0.js +3 -0
- package/dist/pierre-light-protanopia-deuteranopia-CwWH1xGL.js +166 -0
- package/dist/pierre-light-soft-BkKY4pMj.js +166 -0
- package/dist/pierre-light-soft-F2QIpNbb.js +3 -0
- package/dist/pierre-light-tritanopia-BbKKIkua.js +3 -0
- package/dist/pierre-light-tritanopia-Mpubahl7.js +166 -0
- package/dist/pierre-light-vibrant-CdV9Besm.js +3 -0
- package/dist/pierre-light-vibrant-x11J3_aO.js +166 -0
- package/dist/plastic-BQnXkmvK.js +137 -0
- package/dist/playground.d.ts +1 -1
- package/dist/poimandres-DEfG-8RI.js +124 -0
- package/dist/{progress-C7afI5vq.js → progress-DL9k-ERG.js} +3 -4
- package/dist/red-BfKrAjYG.js +169 -0
- package/dist/{registry-D3-ysX7l.js → registry-DAIjCjWd.js} +2 -3
- package/dist/{relative-time-DgSS3zKN.js → relative-time-DJnw45tr.js} +5 -8
- package/dist/{ring-B7Qxu7zd.js → ring-BN4d8vtw.js} +4 -6
- package/dist/{rolldown-runtime-C9mWXvCC.js → rolldown-runtime-CahUhzF3.js} +2 -3
- package/dist/rose-pine-D0rhGGFg.js +136 -0
- package/dist/rose-pine-dawn-7jVaYUiD.js +136 -0
- package/dist/rose-pine-moon-CFyS0Mvu.js +136 -0
- package/dist/runtime/nuxt-plugin.d.ts +0 -2
- package/dist/runtime/nuxt-plugin.js +3 -4
- package/dist/{sankey-CAYwt82B-D4uDQoMR.js → sankey-CAYwt82B-BAAk7WkJ.js} +147 -151
- package/dist/shiki-CbfEu_Az.js +607 -0
- package/dist/slack-dark-Bv-KFSBD.js +87 -0
- package/dist/slack-ochin-Dg2BAv1D.js +107 -0
- package/dist/{slot-part-Doic71uh.js → slot-part-BWHvQ3mK.js} +1 -2
- package/dist/snazzy-light-sYDdR9rx.js +93 -0
- package/dist/solarized-dark-COt2tTmN.js +160 -0
- package/dist/solarized-light-BJrwFarZ.js +160 -0
- package/dist/stream-tokenizer-ByC3l0HQ.js +263 -0
- package/dist/styles.css +4 -0
- package/dist/synthwave-84-NUDBykTM.js +410 -0
- package/dist/{temml-BilSAAws.js → temml-m3ad3bfq.js} +2 -3
- package/dist/{text-BCJflBJf.js → text-BWzZFnGY.js} +8 -12
- package/dist/theme.d.ts +1 -3
- package/dist/theme.js +1 -2
- package/dist/themes-DKugPHlg.js +323 -0
- package/dist/tokyo-night-DD3B2QcO.js +153 -0
- package/dist/{travel-C87xd5Wh.js → travel-CwVhU_GS.js} +6 -8
- package/dist/{tween-CO24nMpf.js → tween-Dv3IIIQG.js} +2 -3
- package/dist/{types-BX64qHlV.d.ts → types-Ceh7h7NT.d.ts} +1 -3
- package/dist/vesper-oVQYrv8Y.js +99 -0
- package/dist/{visual-copy-CrVc3z4n.js → visual-copy-CHHBfJ6O.js} +1 -2
- package/dist/vite.d.ts +1 -3
- package/dist/vite.js +13 -3
- package/dist/vitesse-black-D84DQZAP.js +196 -0
- package/dist/vitesse-dark-CMZ6olk_.js +196 -0
- package/dist/vitesse-light-D9d8hLOY.js +196 -0
- package/dist/{vue-DGstVdGn.js → vue-BlknIGIm.js} +43 -34
- package/dist/{vue-BDmSCtay.js → vue-kCdzBu0N.js} +4 -7
- package/dist/{workspace-shell-BJGnoF3p.d.ts → workspace-shell-ChCwWPyv.d.ts} +0 -2
- package/dist/{workspace-steps-Bgph2rpr.d.ts → workspace-steps-BKByX9DW.d.ts} +0 -2
- package/dist/workspace.d.ts +6 -8
- package/dist/workspace.js +6 -6
- package/package.json +52 -52
- package/dist/pierre-dark-CzUmjETS.js +0 -6
- package/dist/pierre-dark-protanopia-deuteranopia-C35UMuvO.js +0 -4
- package/dist/pierre-dark-soft-Bb-4-biO.js +0 -4
- package/dist/pierre-dark-tritanopia-CIJISGWF.js +0 -4
- package/dist/pierre-dark-vibrant-8oZzB3gw.js +0 -4
- package/dist/pierre-light-Dn6E0sWv.js +0 -6
- package/dist/pierre-light-protanopia-deuteranopia-u0U7N4Hn.js +0 -4
- package/dist/pierre-light-soft-BCU6fuhO.js +0 -4
- package/dist/pierre-light-tritanopia-3c8Yx3co.js +0 -4
- package/dist/pierre-light-vibrant-Cwh332o_.js +0 -4
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
// ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/constants.js
|
|
2
2
|
const DIFFS_TAG_NAME = "diffs-container";
|
|
3
|
-
const DIFFS_DEVELOPMENT_BUILD = (() => {
|
|
4
|
-
try {
|
|
5
|
-
return process.env.NODE_ENV === "development";
|
|
6
|
-
} catch {
|
|
7
|
-
return false;
|
|
8
|
-
}
|
|
9
|
-
})();
|
|
10
3
|
const COMMIT_METADATA_SPLIT = /(?=^From [a-f0-9]+ .+$)/m;
|
|
11
4
|
const GIT_DIFF_FILE_BREAK_REGEX = /(?=^diff --git)/gm;
|
|
12
5
|
const SPLIT_WITH_NEWLINES = /(?<=\n)/;
|
|
@@ -27,6 +20,62 @@ const CODE_VIEW_HEADER_ATTRIBUTE = "data-diffs-code-view-header";
|
|
|
27
20
|
const CODE_VIEW_FOOTER_ATTRIBUTE = "data-diffs-code-view-footer";
|
|
28
21
|
const DIFFS_SCROLLBAR_GUTTER_MEASURED_PROPERTY = "--diffs-scrollbar-gutter-measured";
|
|
29
22
|
const DEFAULT_TOKENIZE_MAX_LENGTH = 1e5;
|
|
23
|
+
const DEFAULT_MESSAGES = {
|
|
24
|
+
/**
|
|
25
|
+
* Hunk separator text for a collapsed region with a known line count.
|
|
26
|
+
* Receives `count`.
|
|
27
|
+
*/
|
|
28
|
+
unmodifiedLines: "{count, plural, one {# unmodified line} other {# unmodified lines}}",
|
|
29
|
+
/**
|
|
30
|
+
* Hunk separator text for a collapsed region whose size is unknown, which
|
|
31
|
+
* happens for partial diffs parsed from patches.
|
|
32
|
+
*/
|
|
33
|
+
unknownUnmodifiedLines: "More unchanged context may be available",
|
|
34
|
+
/** Button that expands an entire collapsed region at once. */
|
|
35
|
+
expandAll: "Expand all",
|
|
36
|
+
expandLine: "Show full line",
|
|
37
|
+
/** Marker shown after a final line that has no trailing newline. */
|
|
38
|
+
noNewlineAtEndOfFile: "No newline at end of file",
|
|
39
|
+
/** Merge conflict button that keeps the current (ours) side. */
|
|
40
|
+
acceptCurrentChange: "Accept current change",
|
|
41
|
+
/** Merge conflict button that keeps the incoming (theirs) side. */
|
|
42
|
+
acceptIncomingChange: "Accept incoming change",
|
|
43
|
+
/** Merge conflict button that keeps both sides. */
|
|
44
|
+
acceptBoth: "Accept both",
|
|
45
|
+
/** Placeholder of the editor search input. */
|
|
46
|
+
searchPlaceholder: "Search",
|
|
47
|
+
/** Placeholder of the editor replace input. */
|
|
48
|
+
replacePlaceholder: "Replace",
|
|
49
|
+
/** Search panel status when the query is empty or matches nothing. */
|
|
50
|
+
noSearchResults: "0/0",
|
|
51
|
+
/** Search panel status while scanning without any completed matches yet. */
|
|
52
|
+
searching: "Searching…",
|
|
53
|
+
/** Search panel status when no match is selected. Receives `count`. */
|
|
54
|
+
searchResultCount: "{count, plural, one {# result} other {# results}}",
|
|
55
|
+
/**
|
|
56
|
+
* Search panel status for the selected match. Receives the 1-based `index`
|
|
57
|
+
* and the `count` of matches.
|
|
58
|
+
*/
|
|
59
|
+
searchResultPosition: "{index}/{count}",
|
|
60
|
+
/** Search option toggle for case-sensitive matching. */
|
|
61
|
+
matchCase: "Match Case",
|
|
62
|
+
/** Search option toggle for whole-word matching. */
|
|
63
|
+
wholeWord: "Whole Word",
|
|
64
|
+
/** Search option toggle for regular-expression matching. */
|
|
65
|
+
regularExpression: "Regexp",
|
|
66
|
+
/** Button that replaces the selected match. */
|
|
67
|
+
replaceMatch: "Replace",
|
|
68
|
+
/** Button that replaces every match. */
|
|
69
|
+
replaceAllMatches: "Replace All",
|
|
70
|
+
/** Button that selects the previous match. */
|
|
71
|
+
previousMatch: "Previous",
|
|
72
|
+
/** Button that selects the next match. */
|
|
73
|
+
nextMatch: "Next",
|
|
74
|
+
/** Button that closes the search panel. */
|
|
75
|
+
closeSearch: "Close",
|
|
76
|
+
/** Button that shows or hides the replace row. */
|
|
77
|
+
toggleReplace: "Toggle Replace"
|
|
78
|
+
};
|
|
30
79
|
const DEFAULT_VIRTUAL_FILE_METRICS = {
|
|
31
80
|
hunkLineCount: 50,
|
|
32
81
|
lineHeight: 20,
|
|
@@ -57,14 +106,8 @@ const DEFAULT_RENDER_RANGE = {
|
|
|
57
106
|
bufferBefore: 0,
|
|
58
107
|
bufferAfter: 0
|
|
59
108
|
};
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
totalLines: 0,
|
|
63
|
-
bufferBefore: 0,
|
|
64
|
-
bufferAfter: 0
|
|
65
|
-
};
|
|
66
|
-
//#endregion
|
|
67
|
-
//#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/getHunkSideBoundaries.js
|
|
109
|
+
const EMPTY_LINE_ANNOTATIONS = Object.freeze([]);
|
|
110
|
+
// ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/getHunkSideBoundaries.js
|
|
68
111
|
/** Converts a unified hunk side's start/count into its consumed-file range. */
|
|
69
112
|
function getHunkSideStartBoundary(start, count) {
|
|
70
113
|
return start - (count === 0 ? 0 : 1);
|
|
@@ -72,15 +115,7 @@ function getHunkSideStartBoundary(start, count) {
|
|
|
72
115
|
function getHunkSideEndBoundary(start, count) {
|
|
73
116
|
return getHunkSideStartBoundary(start, count) + count;
|
|
74
117
|
}
|
|
75
|
-
|
|
76
|
-
//#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/composeCacheKey.js
|
|
77
|
-
const CACHE_KEY_VERSION = 1;
|
|
78
|
-
/** Encodes caller-controlled segments without delimiter ambiguity. */
|
|
79
|
-
function composeCacheKey(scope, ...segments) {
|
|
80
|
-
return `ck${CACHE_KEY_VERSION}:${JSON.stringify([scope, ...segments])}`;
|
|
81
|
-
}
|
|
82
|
-
//#endregion
|
|
83
|
-
//#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/cleanLastNewline.js
|
|
118
|
+
// ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/cleanLastNewline.js
|
|
84
119
|
function cleanLastNewline(contents) {
|
|
85
120
|
let end = contents.length;
|
|
86
121
|
if (contents.charCodeAt(end - 1) === 10) {
|
|
@@ -89,8 +124,13 @@ function cleanLastNewline(contents) {
|
|
|
89
124
|
}
|
|
90
125
|
return contents.slice(0, end);
|
|
91
126
|
}
|
|
92
|
-
|
|
93
|
-
|
|
127
|
+
// ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/composeCacheKey.js
|
|
128
|
+
const CACHE_KEY_VERSION = 1;
|
|
129
|
+
/** Encodes caller-controlled segments without delimiter ambiguity. */
|
|
130
|
+
function composeCacheKey(scope, ...segments) {
|
|
131
|
+
return `ck${CACHE_KEY_VERSION}:${JSON.stringify([scope, ...segments])}`;
|
|
132
|
+
}
|
|
133
|
+
// ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/detachString.js
|
|
94
134
|
const stringDetachEncoder = new TextEncoder();
|
|
95
135
|
const stringDetachDecoder = new TextDecoder("utf-8", { ignoreBOM: true });
|
|
96
136
|
const SURROGATE_CODE_UNIT_PATTERN = /[\uD800-\uDFFF]/;
|
|
@@ -107,8 +147,7 @@ function detachString(value) {
|
|
|
107
147
|
const { written } = stringDetachEncoder.encodeInto(value, stringDetachBuffer);
|
|
108
148
|
return stringDetachDecoder.decode(stringDetachBuffer.subarray(0, written));
|
|
109
149
|
}
|
|
110
|
-
|
|
111
|
-
//#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/parseQuotedDiffFileName.js
|
|
150
|
+
// ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/parseQuotedDiffFileName.js
|
|
112
151
|
const filenameDecoder = new TextDecoder("utf-8", { ignoreBOM: true });
|
|
113
152
|
const NAMED_ESCAPES = {
|
|
114
153
|
"\"": "\"",
|
|
@@ -158,8 +197,7 @@ function readOctalByte(input, index) {
|
|
|
158
197
|
const third = input.charCodeAt(index + 2) - 48;
|
|
159
198
|
if (first >= 0 && first <= 3 && second >= 0 && second <= 7 && third >= 0 && third <= 7) return first * 64 + second * 8 + third;
|
|
160
199
|
}
|
|
161
|
-
|
|
162
|
-
//#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/realignChangeContent.js
|
|
200
|
+
// ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/realignChangeContent.js
|
|
163
201
|
const MAX_ALIGNMENT_COMPARISONS = 4096;
|
|
164
202
|
const MIN_IMPROVEMENT_PER_PAIR = .5;
|
|
165
203
|
/**
|
|
@@ -307,12 +345,12 @@ function lineSimilarity(a, b) {
|
|
|
307
345
|
while (suffix < minLength - prefix && a[a.length - 1 - suffix] === b[b.length - 1 - suffix]) suffix++;
|
|
308
346
|
return (prefix + suffix) / maxLength;
|
|
309
347
|
}
|
|
310
|
-
|
|
311
|
-
//#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/parsePatchFiles.js
|
|
348
|
+
// ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/parsePatchFiles.js
|
|
312
349
|
const GIT_DIFF_HEADER_FILENAMES = /^diff --git ("a\/(?:[^"\\]|\\.)*"|a\/.+?) ("b\/(?:[^"\\]|\\.)*"|b\/.+?)$/;
|
|
313
|
-
function _processPatch(data, cacheKeyPrefix, throwOnError = false, patchIndex) {
|
|
350
|
+
function _processPatch(data, { cacheKeyPrefix, disableLineMatching, throwOnError = false } = {}, patchIndex) {
|
|
314
351
|
const isGitDiff = isGitDiffPatch(data);
|
|
315
352
|
const rawFiles = isGitDiff ? splitGitDiffFiles(data) : splitUnifiedDiffFiles(data);
|
|
353
|
+
const cacheKeyScope = disableLineMatching === true ? "patch-file-raw" : "patch-file";
|
|
316
354
|
let patchMetadata;
|
|
317
355
|
const files = [];
|
|
318
356
|
for (const fileOrPatchMetadata of rawFiles) {
|
|
@@ -328,8 +366,9 @@ function _processPatch(data, cacheKeyPrefix, throwOnError = false, patchIndex) {
|
|
|
328
366
|
continue;
|
|
329
367
|
}
|
|
330
368
|
const currentFile = _processFile(fileOrPatchMetadata, {
|
|
331
|
-
cacheKey: cacheKeyPrefix != null ? patchIndex == null ? composeCacheKey(
|
|
369
|
+
cacheKey: cacheKeyPrefix != null ? patchIndex == null ? composeCacheKey(cacheKeyScope, cacheKeyPrefix, String(files.length)) : composeCacheKey(cacheKeyScope, cacheKeyPrefix, String(patchIndex), String(files.length)) : void 0,
|
|
332
370
|
isGitDiff,
|
|
371
|
+
disableLineMatching,
|
|
333
372
|
throwOnError
|
|
334
373
|
});
|
|
335
374
|
if (currentFile != null) files.push(currentFile);
|
|
@@ -346,7 +385,7 @@ function processFile(fileDiffString, options) {
|
|
|
346
385
|
releaseStringDetachBuffer();
|
|
347
386
|
}
|
|
348
387
|
}
|
|
349
|
-
function _processFile(fileDiffString, { cacheKey, isGitDiff = GIT_DIFF_FILE_BREAK_REGEX.test(fileDiffString), oldFile, newFile, throwOnError = false } = {}) {
|
|
388
|
+
function _processFile(fileDiffString, { cacheKey, disableLineMatching = false, isGitDiff = GIT_DIFF_FILE_BREAK_REGEX.test(fileDiffString), oldFile, newFile, throwOnError = false } = {}) {
|
|
350
389
|
let lastHunkEnd = 0;
|
|
351
390
|
const hunks = splitAtLinePrefix(fileDiffString, "@@ ");
|
|
352
391
|
let currentFile;
|
|
@@ -379,6 +418,8 @@ function _processFile(fileDiffString, { cacheKey, isGitDiff = GIT_DIFF_FILE_BREA
|
|
|
379
418
|
isPartial,
|
|
380
419
|
additionLines: !isPartial && oldFile != null && newFile != null ? splitFileContents(newFile.contents) : [],
|
|
381
420
|
deletionLines: !isPartial && oldFile != null && newFile != null ? splitFileContents(oldFile.contents) : [],
|
|
421
|
+
additionCharacterCount: !isPartial && oldFile != null && newFile != null ? newFile.contents.length : 0,
|
|
422
|
+
deletionCharacterCount: !isPartial && oldFile != null && newFile != null ? oldFile.contents.length : 0,
|
|
382
423
|
cacheKey: maybeDetachOptionalString(cacheKey)
|
|
383
424
|
};
|
|
384
425
|
if (currentFile.additionLines.length === 1 && newFile?.contents === "") currentFile.additionLines.length = 0;
|
|
@@ -484,7 +525,10 @@ function _processFile(fileDiffString, { cacheKey, isGitDiff = GIT_DIFF_FILE_BREA
|
|
|
484
525
|
}
|
|
485
526
|
additionLineIndex++;
|
|
486
527
|
parsedAdditionLines++;
|
|
487
|
-
if (isPartial)
|
|
528
|
+
if (isPartial) {
|
|
529
|
+
currentFile.additionLines.push(line);
|
|
530
|
+
currentFile.additionCharacterCount += line.length;
|
|
531
|
+
}
|
|
488
532
|
currentContent.additions++;
|
|
489
533
|
additionLines++;
|
|
490
534
|
lastLineType = "addition";
|
|
@@ -497,7 +541,10 @@ function _processFile(fileDiffString, { cacheKey, isGitDiff = GIT_DIFF_FILE_BREA
|
|
|
497
541
|
}
|
|
498
542
|
deletionLineIndex++;
|
|
499
543
|
parsedDeletionLines++;
|
|
500
|
-
if (isPartial)
|
|
544
|
+
if (isPartial) {
|
|
545
|
+
currentFile.deletionLines.push(line);
|
|
546
|
+
currentFile.deletionCharacterCount += line.length;
|
|
547
|
+
}
|
|
501
548
|
currentContent.deletions++;
|
|
502
549
|
deletionLines++;
|
|
503
550
|
lastLineType = "deletion";
|
|
@@ -515,6 +562,8 @@ function _processFile(fileDiffString, { cacheKey, isGitDiff = GIT_DIFF_FILE_BREA
|
|
|
515
562
|
if (isPartial) {
|
|
516
563
|
currentFile.deletionLines.push(line);
|
|
517
564
|
currentFile.additionLines.push(line);
|
|
565
|
+
currentFile.deletionCharacterCount += line.length;
|
|
566
|
+
currentFile.additionCharacterCount += line.length;
|
|
518
567
|
}
|
|
519
568
|
currentContent.lines++;
|
|
520
569
|
lastLineType = "context";
|
|
@@ -526,11 +575,21 @@ function _processFile(fileDiffString, { cacheKey, isGitDiff = GIT_DIFF_FILE_BREA
|
|
|
526
575
|
else if (lastLineType === "addition") hunkData.noEOFCRAdditions = true;
|
|
527
576
|
if (isPartial && (lastLineType === "addition" || lastLineType === "context")) {
|
|
528
577
|
const lastIndex = currentFile.additionLines.length - 1;
|
|
529
|
-
if (lastIndex >= 0)
|
|
578
|
+
if (lastIndex >= 0) {
|
|
579
|
+
const line = currentFile.additionLines[lastIndex];
|
|
580
|
+
const cleanedLine = cleanLastNewline(line);
|
|
581
|
+
currentFile.additionLines[lastIndex] = cleanedLine;
|
|
582
|
+
currentFile.additionCharacterCount += cleanedLine.length - line.length;
|
|
583
|
+
}
|
|
530
584
|
}
|
|
531
585
|
if (isPartial && (lastLineType === "deletion" || lastLineType === "context")) {
|
|
532
586
|
const lastIndex = currentFile.deletionLines.length - 1;
|
|
533
|
-
if (lastIndex >= 0)
|
|
587
|
+
if (lastIndex >= 0) {
|
|
588
|
+
const line = currentFile.deletionLines[lastIndex];
|
|
589
|
+
const cleanedLine = cleanLastNewline(line);
|
|
590
|
+
currentFile.deletionLines[lastIndex] = cleanedLine;
|
|
591
|
+
currentFile.deletionCharacterCount += cleanedLine.length - line.length;
|
|
592
|
+
}
|
|
534
593
|
}
|
|
535
594
|
}
|
|
536
595
|
}
|
|
@@ -589,25 +648,21 @@ function _processFile(fileDiffString, { cacheKey, isGitDiff = GIT_DIFF_FILE_BREA
|
|
|
589
648
|
else if (oldFile != null && oldFile.contents !== "" && (newFile == null || newFile.contents === "")) currentFile.type = "deleted";
|
|
590
649
|
}
|
|
591
650
|
if (currentFile.type !== "rename-pure" && currentFile.type !== "rename-changed") currentFile.prevName = void 0;
|
|
592
|
-
realignChangeContentBySimilarity(currentFile);
|
|
651
|
+
if (!disableLineMatching) realignChangeContentBySimilarity(currentFile);
|
|
593
652
|
return currentFile;
|
|
594
653
|
}
|
|
595
654
|
/**
|
|
596
655
|
* Parses a patch file string into an array of parsed patches.
|
|
597
656
|
*
|
|
598
657
|
* @param data - The raw patch file content (supports multi-commit patches)
|
|
599
|
-
* @param
|
|
600
|
-
* from the prefix, patch index, and file index. This enables caching of
|
|
601
|
-
* rendered diff results in the worker pool.
|
|
602
|
-
* @param throwOnError - When true, invalid data throws. When false, invalid data
|
|
603
|
-
* is reported with `console.error` and the parser attempts to recover when
|
|
604
|
-
* possible. Recovery is best-effort and does not guarantee valid output.
|
|
658
|
+
* @param options - Options for parsing patch text and generating cache keys.
|
|
605
659
|
*/
|
|
606
|
-
function parsePatchFiles(data,
|
|
660
|
+
function parsePatchFiles(data, options = {}) {
|
|
661
|
+
const { cacheKeyPrefix, throwOnError = false } = options;
|
|
607
662
|
const patches = [];
|
|
608
663
|
const rawPatches = hasCommitMetadataBoundary(data) ? data.split(COMMIT_METADATA_SPLIT) : [data];
|
|
609
664
|
for (const patch of rawPatches) try {
|
|
610
|
-
patches.push(_processPatch(patch,
|
|
665
|
+
patches.push(_processPatch(patch, options, cacheKeyPrefix != null ? patches.length : void 0));
|
|
611
666
|
} catch (error) {
|
|
612
667
|
if (throwOnError) throw error;
|
|
613
668
|
else console.error(error);
|
|
@@ -829,8 +884,211 @@ function createContentGroup(type, deletionLineIndex, additionLineIndex) {
|
|
|
829
884
|
deletionLineIndex
|
|
830
885
|
};
|
|
831
886
|
}
|
|
832
|
-
|
|
833
|
-
|
|
887
|
+
// ../../node_modules/.pnpm/@pierre+patches@0.0.1/node_modules/@pierre/patches/dist/core.js
|
|
888
|
+
const enc = new TextEncoder();
|
|
889
|
+
const dec = new TextDecoder("utf-8", { ignoreBOM: true });
|
|
890
|
+
const patchKeys = [
|
|
891
|
+
...["ignoreWhitespace", "stripTrailingCr"],
|
|
892
|
+
"context",
|
|
893
|
+
"headerOptions"
|
|
894
|
+
];
|
|
895
|
+
let load;
|
|
896
|
+
let wasm;
|
|
897
|
+
let memory;
|
|
898
|
+
let diffCall;
|
|
899
|
+
let u8;
|
|
900
|
+
let dv;
|
|
901
|
+
let maxBytes = 32 << 20;
|
|
902
|
+
let wtf8;
|
|
903
|
+
/**
|
|
904
|
+
* Set the function that returns the compiled wasm module (the index and
|
|
905
|
+
* workerd entries call it). The first diff call runs it, so importing the
|
|
906
|
+
* package works where WebAssembly is unavailable. A new call drops the current
|
|
907
|
+
* instance; the next diff call starts with empty wasm memory.
|
|
908
|
+
*/
|
|
909
|
+
function init(loadModule) {
|
|
910
|
+
load = loadModule;
|
|
911
|
+
wasm = void 0;
|
|
912
|
+
}
|
|
913
|
+
/** Create a wasm instance, compiling the module first if needed. */
|
|
914
|
+
function start() {
|
|
915
|
+
const compiled = wasm ?? load();
|
|
916
|
+
const { exports } = new WebAssembly.Instance(compiled, {});
|
|
917
|
+
wasm = compiled;
|
|
918
|
+
memory = exports.memory;
|
|
919
|
+
diffCall = exports.diff;
|
|
920
|
+
bind();
|
|
921
|
+
try {
|
|
922
|
+
crypto.getRandomValues(u8.subarray(1016, 1024));
|
|
923
|
+
u8[1016] |= 1;
|
|
924
|
+
} catch {}
|
|
925
|
+
}
|
|
926
|
+
/** Diff two texts, treating each Unicode code point as a token. */
|
|
927
|
+
function diffChars$1(oldStr, newStr, options) {
|
|
928
|
+
check(options, "diffChars");
|
|
929
|
+
return run(1, oldStr, newStr);
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* Diff two texts, treating each word, run of spaces, newline, and other
|
|
933
|
+
* character as a token.
|
|
934
|
+
*/
|
|
935
|
+
function diffWordsWithSpace$1(oldStr, newStr, options) {
|
|
936
|
+
check(options, "diffWordsWithSpace");
|
|
937
|
+
return run(2, oldStr, newStr);
|
|
938
|
+
}
|
|
939
|
+
/** Create a unified diff of two files, byte-identical to jsdiff. */
|
|
940
|
+
function createTwoFilesPatch$1(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
|
|
941
|
+
if (options?.newlineIsToken ?? false) throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");
|
|
942
|
+
check(options, "createTwoFilesPatch", patchKeys);
|
|
943
|
+
const h = options?.headerOptions;
|
|
944
|
+
const c = options?.context;
|
|
945
|
+
const context = c === void 0 ? 4 : c === null || c === false ? 0 : c;
|
|
946
|
+
if (!(Number.isInteger(context) && context >= 0) && context !== Infinity) throw new Error("options.context must be a non-negative integer");
|
|
947
|
+
return run(3, oldStr, newStr, options, Math.min(context, 268435455), (Boolean(h) === false ? 7 : (h.includeIndex ?? false ? 1 : 0) | (h.includeUnderline ?? false ? 2 : 0) | (h.includeFileHeaders ?? false ? 4 : 0)) | (oldFileName !== void 0 ? 8 : 0) | (newFileName !== void 0 ? 16 : 0), [
|
|
948
|
+
oldFileName === void 0 ? "" : String(oldFileName),
|
|
949
|
+
newFileName === void 0 ? "" : String(newFileName),
|
|
950
|
+
oldHeader ? String(oldHeader) : "",
|
|
951
|
+
newHeader ? String(newHeader) : ""
|
|
952
|
+
]);
|
|
953
|
+
}
|
|
954
|
+
/**
|
|
955
|
+
* Throw for callbacks and for options outside `allowed` that would change the
|
|
956
|
+
* result. Like jsdiff, an option set to `undefined`, `null`, or `false` is off,
|
|
957
|
+
* so it is accepted.
|
|
958
|
+
*/
|
|
959
|
+
function check(options, api, allowed) {
|
|
960
|
+
if (typeof options === "function") throw new Error("callbacks are not supported by @pierre/patches");
|
|
961
|
+
if (options == null) return;
|
|
962
|
+
for (const [key, value] of Object.entries(options)) if (value != null && value !== false && !(allowed?.includes(key) ?? false)) throw new Error(`options.${key} is not supported by @pierre/patches ${api}`);
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
* Run op [0] (src/mem.wat) and read its result: the change objects, or the
|
|
966
|
+
* patch text for op 3. `headers` are the filenames and headers of op 3.
|
|
967
|
+
*/
|
|
968
|
+
function run(op, oldStr, newStr, options, context = 0, headerFlags = 0, headers) {
|
|
969
|
+
if (typeof oldStr !== "string" || typeof newStr !== "string") throw new TypeError("expected the texts to diff to be strings");
|
|
970
|
+
if (options?.stripTrailingCr ?? false) {
|
|
971
|
+
oldStr = oldStr.replaceAll("\r\n", "\n");
|
|
972
|
+
newStr = newStr.replaceAll("\r\n", "\n");
|
|
973
|
+
}
|
|
974
|
+
if (oldStr.length >= 268435456 || newStr.length >= 268435456) throw new Error("out of memory");
|
|
975
|
+
if (wasm === void 0) start();
|
|
976
|
+
let need = 65600 + (oldStr.length + newStr.length) * 3;
|
|
977
|
+
if (headers !== void 0) for (const s of headers) need += s.length * 3;
|
|
978
|
+
if (need > u8.length) {
|
|
979
|
+
try {
|
|
980
|
+
memory.grow(Math.ceil((need - u8.length) / 65536));
|
|
981
|
+
} catch {
|
|
982
|
+
throw new Error("out of memory");
|
|
983
|
+
}
|
|
984
|
+
bind();
|
|
985
|
+
}
|
|
986
|
+
wtf8 = false;
|
|
987
|
+
const oldLen = encode(oldStr, 65536);
|
|
988
|
+
const newLen = encode(newStr, 65536 + oldLen);
|
|
989
|
+
if (headers !== void 0) {
|
|
990
|
+
let p = 65536 + oldLen + newLen;
|
|
991
|
+
for (let i = 0; i < 4; i++) {
|
|
992
|
+
const n = encode(headers[i], p);
|
|
993
|
+
dv.setUint32(28 + i * 4, n, true);
|
|
994
|
+
p += n;
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
dv.setUint32(0, op | headerFlags << 16 | (oldLen === oldStr.length ? 1 << 24 : 0) | (newLen === newStr.length ? 2 << 24 : 0) | (options?.ignoreWhitespace ?? false ? 4 << 24 : 0), true);
|
|
998
|
+
dv.setUint32(4, oldLen, true);
|
|
999
|
+
dv.setUint32(8, newLen, true);
|
|
1000
|
+
dv.setUint32(24, context, true);
|
|
1001
|
+
diffCall();
|
|
1002
|
+
if (u8.length === 0) bind();
|
|
1003
|
+
let ptr = dv.getUint32(16, true);
|
|
1004
|
+
if (u8[1] === 0) {
|
|
1005
|
+
const message = dec.decode(u8.subarray(ptr, ptr + dv.getUint32(12, true)));
|
|
1006
|
+
release();
|
|
1007
|
+
throw new Error(message);
|
|
1008
|
+
}
|
|
1009
|
+
let result;
|
|
1010
|
+
if (op === 3) {
|
|
1011
|
+
const bytes = u8.subarray(ptr, ptr + dv.getUint32(20, true));
|
|
1012
|
+
result = "";
|
|
1013
|
+
let from = 0;
|
|
1014
|
+
if (wtf8) for (let i = bytes.indexOf(237); i !== -1; i = bytes.indexOf(237, i + 1)) {
|
|
1015
|
+
if (bytes[i + 1] < 160) continue;
|
|
1016
|
+
result += dec.decode(bytes.subarray(from, i)) + String.fromCharCode(53248 | (bytes[i + 1] & 63) << 6 | bytes[i + 2] & 63);
|
|
1017
|
+
from = i + 3;
|
|
1018
|
+
}
|
|
1019
|
+
result += dec.decode(bytes.subarray(from));
|
|
1020
|
+
} else {
|
|
1021
|
+
const count = dv.getUint32(12, true);
|
|
1022
|
+
result = new Array(count);
|
|
1023
|
+
for (let i = 0; i < count; i++, ptr += 16) {
|
|
1024
|
+
const removed = u8[ptr] === 1;
|
|
1025
|
+
result[i] = {
|
|
1026
|
+
count: dv.getUint32(ptr + 4, true),
|
|
1027
|
+
added: u8[ptr] === 2,
|
|
1028
|
+
removed,
|
|
1029
|
+
value: (removed ? oldStr : newStr).slice(dv.getUint32(ptr + 8, true), dv.getUint32(ptr + 12, true))
|
|
1030
|
+
};
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
release();
|
|
1034
|
+
return result;
|
|
1035
|
+
}
|
|
1036
|
+
/**
|
|
1037
|
+
* Write `s` at `p` as WTF-8 and return the byte count. Short texts and texts
|
|
1038
|
+
* with lone surrogates go through the JS encoder: encodeInto costs more per
|
|
1039
|
+
* call, and it writes lone surrogates as U+FFFD.
|
|
1040
|
+
*/
|
|
1041
|
+
function encode(s, p) {
|
|
1042
|
+
if (s.length < 256) return encodeJS(s, p);
|
|
1043
|
+
const written = enc.encodeInto(s, u8.subarray(p)).written;
|
|
1044
|
+
return written === s.length || (s.isWellFormed?.() ?? false) ? written : encodeJS(s, p);
|
|
1045
|
+
}
|
|
1046
|
+
/** Write `s` at `p` as WTF-8 and return the byte count; lone surrogates set `wtf8`. */
|
|
1047
|
+
function encodeJS(s, p) {
|
|
1048
|
+
let q = p;
|
|
1049
|
+
for (let i = 0; i < s.length; i++) {
|
|
1050
|
+
const c = s.codePointAt(i);
|
|
1051
|
+
if (c < 128) {
|
|
1052
|
+
u8[q++] = c;
|
|
1053
|
+
continue;
|
|
1054
|
+
}
|
|
1055
|
+
if (c < 2048) u8[q++] = 192 | c >> 6;
|
|
1056
|
+
else {
|
|
1057
|
+
if (c < 65536) {
|
|
1058
|
+
u8[q++] = 224 | c >> 12;
|
|
1059
|
+
if ((c & 63488) === 55296) wtf8 = true;
|
|
1060
|
+
} else {
|
|
1061
|
+
u8[q++] = 240 | c >> 18;
|
|
1062
|
+
u8[q++] = 128 | c >> 12 & 63;
|
|
1063
|
+
i++;
|
|
1064
|
+
}
|
|
1065
|
+
u8[q++] = 128 | c >> 6 & 63;
|
|
1066
|
+
}
|
|
1067
|
+
u8[q++] = 128 | c & 63;
|
|
1068
|
+
}
|
|
1069
|
+
return q - p;
|
|
1070
|
+
}
|
|
1071
|
+
/** Bind the views to the current wasm memory. */
|
|
1072
|
+
function bind() {
|
|
1073
|
+
u8 = new Uint8Array(memory.buffer);
|
|
1074
|
+
dv = new DataView(memory.buffer);
|
|
1075
|
+
}
|
|
1076
|
+
/** Replace the instance when its memory passed the limit; the GC frees the old one. */
|
|
1077
|
+
function release() {
|
|
1078
|
+
if (u8.length > maxBytes) try {
|
|
1079
|
+
start();
|
|
1080
|
+
} catch {}
|
|
1081
|
+
}
|
|
1082
|
+
// ../../node_modules/.pnpm/@pierre+patches@0.0.1/node_modules/@pierre/patches/dist/patch.wasm.mjs
|
|
1083
|
+
var patch_wasm_default = "AGFzbQEAAAABRgtgA39/fwF/YAF/AX9gA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/node_modules/@pierre/patches/dist/index.js
|
|
1085
|
+
init(() => {
|
|
1086
|
+
const s = atob(patch_wasm_default);
|
|
1087
|
+
const bytes = new Uint8Array(s.length);
|
|
1088
|
+
for (let i = 0; i < s.length; i++) bytes[i] = s.charCodeAt(i);
|
|
1089
|
+
return new WebAssembly.Module(bytes);
|
|
1090
|
+
});
|
|
1091
|
+
// ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/base.js
|
|
834
1092
|
var Diff = class {
|
|
835
1093
|
diff(oldStr, newStr, options = {}) {
|
|
836
1094
|
let callback;
|
|
@@ -1007,15 +1265,13 @@ var Diff = class {
|
|
|
1007
1265
|
return components;
|
|
1008
1266
|
}
|
|
1009
1267
|
};
|
|
1010
|
-
|
|
1011
|
-
//#region ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/character.js
|
|
1268
|
+
// ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/character.js
|
|
1012
1269
|
var CharacterDiff = class extends Diff {};
|
|
1013
1270
|
const characterDiff = new CharacterDiff();
|
|
1014
1271
|
function diffChars(oldStr, newStr, options) {
|
|
1015
1272
|
return characterDiff.diff(oldStr, newStr, options);
|
|
1016
1273
|
}
|
|
1017
|
-
|
|
1018
|
-
//#region ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/util/string.js
|
|
1274
|
+
// ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/util/string.js
|
|
1019
1275
|
function longestCommonPrefix(str1, str2) {
|
|
1020
1276
|
let i = 0;
|
|
1021
1277
|
for (; i < str1.length && i < str2.length; i++) if (str1[i] != str2[i]) return str1.slice(0, i);
|
|
@@ -1104,8 +1360,7 @@ function leadingAndTrailingWs(string, segmenter) {
|
|
|
1104
1360
|
const lastSeg = segments[segments.length - 1];
|
|
1105
1361
|
return [/\s/.test(firstSeg) ? firstSeg : "", /\s/.test(lastSeg) ? lastSeg : ""];
|
|
1106
1362
|
}
|
|
1107
|
-
|
|
1108
|
-
//#region ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/word.js
|
|
1363
|
+
// ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/word.js
|
|
1109
1364
|
const extendedWordChars = "a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";
|
|
1110
1365
|
const tokenizeIncludingWhitespace = new RegExp(`[${extendedWordChars}]+|\\s+|[^${extendedWordChars}]`, "ug");
|
|
1111
1366
|
var WordDiff = class extends Diff {
|
|
@@ -1215,8 +1470,7 @@ const wordsWithSpaceDiff = new WordsWithSpaceDiff();
|
|
|
1215
1470
|
function diffWordsWithSpace(oldStr, newStr, options) {
|
|
1216
1471
|
return wordsWithSpaceDiff.diff(oldStr, newStr, options);
|
|
1217
1472
|
}
|
|
1218
|
-
|
|
1219
|
-
//#region ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/line.js
|
|
1473
|
+
// ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/line.js
|
|
1220
1474
|
var LineDiff = class extends Diff {
|
|
1221
1475
|
constructor() {
|
|
1222
1476
|
super(...arguments);
|
|
@@ -1248,8 +1502,7 @@ function tokenize(value, options) {
|
|
|
1248
1502
|
}
|
|
1249
1503
|
return retLines;
|
|
1250
1504
|
}
|
|
1251
|
-
|
|
1252
|
-
//#region ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/sentence.js
|
|
1505
|
+
// ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/sentence.js
|
|
1253
1506
|
function isSentenceEndPunct(char) {
|
|
1254
1507
|
return char == "." || char == "!" || char == "?";
|
|
1255
1508
|
}
|
|
@@ -1275,16 +1528,14 @@ var SentenceDiff = class extends Diff {
|
|
|
1275
1528
|
}
|
|
1276
1529
|
};
|
|
1277
1530
|
new SentenceDiff();
|
|
1278
|
-
|
|
1279
|
-
//#region ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/css.js
|
|
1531
|
+
// ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/css.js
|
|
1280
1532
|
var CssDiff = class extends Diff {
|
|
1281
1533
|
tokenize(value) {
|
|
1282
1534
|
return value.split(/([{}:;,]|\s+)/);
|
|
1283
1535
|
}
|
|
1284
1536
|
};
|
|
1285
1537
|
new CssDiff();
|
|
1286
|
-
|
|
1287
|
-
//#region ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/json.js
|
|
1538
|
+
// ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/json.js
|
|
1288
1539
|
var JsonDiff = class extends Diff {
|
|
1289
1540
|
constructor() {
|
|
1290
1541
|
super(...arguments);
|
|
@@ -1338,8 +1589,7 @@ function canonicalize(obj, stack, replacementStack, replacer, key) {
|
|
|
1338
1589
|
} else canonicalizedObj = obj;
|
|
1339
1590
|
return canonicalizedObj;
|
|
1340
1591
|
}
|
|
1341
|
-
|
|
1342
|
-
//#region ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/array.js
|
|
1592
|
+
// ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/array.js
|
|
1343
1593
|
var ArrayDiff = class extends Diff {
|
|
1344
1594
|
tokenize(value) {
|
|
1345
1595
|
return value.slice();
|
|
@@ -1352,8 +1602,7 @@ var ArrayDiff = class extends Diff {
|
|
|
1352
1602
|
}
|
|
1353
1603
|
};
|
|
1354
1604
|
new ArrayDiff();
|
|
1355
|
-
|
|
1356
|
-
//#region ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/patch/create.js
|
|
1605
|
+
// ../../node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/patch/create.js
|
|
1357
1606
|
/**
|
|
1358
1607
|
* Returns true if the filename contains characters that require C-style
|
|
1359
1608
|
* quoting (as used by Git and GNU diffutils in diff output).
|
|
@@ -1571,27 +1820,76 @@ function splitLines(text) {
|
|
|
1571
1820
|
else result.push(result.pop().slice(0, -1));
|
|
1572
1821
|
return result;
|
|
1573
1822
|
}
|
|
1574
|
-
|
|
1575
|
-
|
|
1823
|
+
// ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/diffLibs.js
|
|
1824
|
+
const diffLibs = {
|
|
1825
|
+
jsdiff: {
|
|
1826
|
+
createTwoFilesPatch,
|
|
1827
|
+
diffChars,
|
|
1828
|
+
diffWordsWithSpace
|
|
1829
|
+
},
|
|
1830
|
+
"@pierre/patches": {
|
|
1831
|
+
createTwoFilesPatch: createTwoFilesPatch$1,
|
|
1832
|
+
diffChars: diffChars$1,
|
|
1833
|
+
diffWordsWithSpace: diffWordsWithSpace$1
|
|
1834
|
+
}
|
|
1835
|
+
};
|
|
1836
|
+
let patchesWork;
|
|
1837
|
+
/**
|
|
1838
|
+
* Pick jsdiff when `@pierre/patches` cannot load, so a page that blocks
|
|
1839
|
+
* WebAssembly fails and logs once, not on every diff.
|
|
1840
|
+
* WARNING: do not use `canUseWASM` here. Cloudflare Workers block its runtime
|
|
1841
|
+
* compile, but this package loads a precompiled module there and works.
|
|
1842
|
+
*/
|
|
1843
|
+
function resolveDiffLib(preferred) {
|
|
1844
|
+
if (preferred === "jsdiff") return preferred;
|
|
1845
|
+
if (patchesWork === void 0) try {
|
|
1846
|
+
diffChars$1("", "");
|
|
1847
|
+
patchesWork = true;
|
|
1848
|
+
} catch (error) {
|
|
1849
|
+
console.error(error);
|
|
1850
|
+
patchesWork = false;
|
|
1851
|
+
}
|
|
1852
|
+
return patchesWork ? preferred : "jsdiff";
|
|
1853
|
+
}
|
|
1854
|
+
// ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/parseDiffFromFile.js
|
|
1576
1855
|
const MISSING_FILE_NAME = "/dev/null";
|
|
1577
1856
|
/**
|
|
1578
1857
|
* Parses a diff from two file contents objects.
|
|
1579
1858
|
*
|
|
1580
1859
|
* If both `oldFile` and `newFile` have a `cacheKey`, the resulting diff gets a
|
|
1581
|
-
* collision-safe key derived from both values.
|
|
1860
|
+
* collision-safe key derived from both values and the line-matching mode.
|
|
1582
1861
|
*/
|
|
1583
|
-
function parseDiffFromFile(oldFile, newFile,
|
|
1862
|
+
function parseDiffFromFile(oldFile, newFile, { preferredDiffLib = "jsdiff", disableLineMatching, ...diffOptions } = {}, throwOnError = false) {
|
|
1584
1863
|
if (oldFile === null && newFile === null) throw new Error("parseDiffFromFile: You must pass oldFile, newFile, or both");
|
|
1585
1864
|
const resolvedOldFile = oldFile ?? createMissingFile();
|
|
1586
1865
|
const resolvedNewFile = newFile ?? createMissingFile();
|
|
1587
|
-
const
|
|
1866
|
+
const patchArgs = [
|
|
1867
|
+
resolvedOldFile.name,
|
|
1868
|
+
resolvedNewFile.name,
|
|
1869
|
+
resolvedOldFile.contents,
|
|
1870
|
+
resolvedNewFile.contents,
|
|
1871
|
+
resolvedOldFile.header,
|
|
1872
|
+
resolvedNewFile.header,
|
|
1873
|
+
diffOptions
|
|
1874
|
+
];
|
|
1875
|
+
const diffLib = throwOnError ? preferredDiffLib : resolveDiffLib(preferredDiffLib);
|
|
1876
|
+
let patch;
|
|
1877
|
+
try {
|
|
1878
|
+
patch = diffLibs[diffLib].createTwoFilesPatch(...patchArgs);
|
|
1879
|
+
} catch (error) {
|
|
1880
|
+
if (throwOnError || diffLib === "jsdiff") throw error;
|
|
1881
|
+
console.error(error);
|
|
1882
|
+
patch = diffLibs.jsdiff.createTwoFilesPatch(...patchArgs);
|
|
1883
|
+
}
|
|
1884
|
+
const fileData = processFile(patch, {
|
|
1588
1885
|
cacheKey: (() => {
|
|
1589
1886
|
const oldCacheKey = oldFile?.cacheKey;
|
|
1590
1887
|
const newCacheKey = newFile?.cacheKey;
|
|
1591
|
-
return oldCacheKey != null && newCacheKey != null ? composeCacheKey("diff", oldCacheKey, newCacheKey) : void 0;
|
|
1888
|
+
return oldCacheKey != null && newCacheKey != null ? composeCacheKey(disableLineMatching === true ? "diff-raw" : "diff", oldCacheKey, newCacheKey) : void 0;
|
|
1592
1889
|
})(),
|
|
1593
1890
|
oldFile: resolvedOldFile,
|
|
1594
1891
|
newFile: resolvedNewFile,
|
|
1892
|
+
disableLineMatching,
|
|
1595
1893
|
throwOnError
|
|
1596
1894
|
});
|
|
1597
1895
|
if (fileData == null) throw new Error("parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?");
|
|
@@ -1612,8 +1910,7 @@ function createMissingFile() {
|
|
|
1612
1910
|
contents: ""
|
|
1613
1911
|
};
|
|
1614
1912
|
}
|
|
1615
|
-
|
|
1616
|
-
//#region ../../node_modules/.pnpm/@pierre+diffs@1.5.2_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/getSingularPatch.js
|
|
1913
|
+
// ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/getSingularPatch.js
|
|
1617
1914
|
function getSingularPatch(patch) {
|
|
1618
1915
|
const parsedPatches = parsePatchFiles(patch);
|
|
1619
1916
|
if (parsedPatches.length !== 1) {
|
|
@@ -1627,5 +1924,4 @@ function getSingularPatch(patch) {
|
|
|
1627
1924
|
}
|
|
1628
1925
|
return files[0];
|
|
1629
1926
|
}
|
|
1630
|
-
|
|
1631
|
-
export { SPLIT_WITH_NEWLINES as A, DIFFS_SCROLLBAR_GUTTER_MEASURED_PROPERTY as C, HEADER_FILENAME_SUFFIX_SLOT_ID as D, EMPTY_RENDER_RANGE as E, UNSAFE_CSS_ATTRIBUTE as M, HEADER_METADATA_SLOT_ID as O, DIFFS_DEVELOPMENT_BUILD as S, DIFFS_TAG_NAME as T, DEFAULT_RENDER_RANGE as _, parsePatchFiles as a, DEFAULT_TOKENIZE_MAX_LENGTH as b, composeCacheKey as c, CODE_VIEW_FOOTER_ATTRIBUTE as d, CODE_VIEW_HEADER_ATTRIBUTE as f, DEFAULT_EXPANDED_REGION as g, DEFAULT_CODE_VIEW_LAYOUT as h, diffChars as i, THEME_CSS_ATTRIBUTE as j, HEADER_PREFIX_SLOT_ID as k, getHunkSideEndBoundary as l, DEFAULT_CODE_VIEW_FILE_METRICS as m, parseDiffFromFile as n, slideBlankBoundaryBlocksUp as o, CUSTOM_HEADER_SLOT_ID as p, diffWordsWithSpace as r, cleanLastNewline as s, getSingularPatch as t, getHunkSideStartBoundary as u, DEFAULT_SMOOTH_SCROLL_SETTINGS as v, DIFFS_SCROLLBAR_MEASURE_ATTRIBUTE as w, DEFAULT_VIRTUAL_FILE_METRICS as x, DEFAULT_THEMES as y };
|
|
1927
|
+
export { SPLIT_WITH_NEWLINES as A, DIFFS_SCROLLBAR_GUTTER_MEASURED_PROPERTY as C, HEADER_FILENAME_SUFFIX_SLOT_ID as D, EMPTY_LINE_ANNOTATIONS as E, UNSAFE_CSS_ATTRIBUTE as M, HEADER_METADATA_SLOT_ID as O, DEFAULT_VIRTUAL_FILE_METRICS as S, DIFFS_TAG_NAME as T, DEFAULT_MESSAGES as _, parsePatchFiles as a, DEFAULT_THEMES as b, cleanLastNewline as c, CODE_VIEW_FOOTER_ATTRIBUTE as d, CODE_VIEW_HEADER_ATTRIBUTE as f, DEFAULT_EXPANDED_REGION as g, DEFAULT_CODE_VIEW_LAYOUT as h, resolveDiffLib as i, THEME_CSS_ATTRIBUTE as j, HEADER_PREFIX_SLOT_ID as k, getHunkSideEndBoundary as l, DEFAULT_CODE_VIEW_FILE_METRICS as m, parseDiffFromFile as n, slideBlankBoundaryBlocksUp as o, CUSTOM_HEADER_SLOT_ID as p, diffLibs as r, composeCacheKey as s, getSingularPatch as t, getHunkSideStartBoundary as u, DEFAULT_RENDER_RANGE as v, DIFFS_SCROLLBAR_MEASURE_ATTRIBUTE as w, DEFAULT_TOKENIZE_MAX_LENGTH as x, DEFAULT_SMOOTH_SCROLL_SETTINGS as y };
|