Files
llm-in-text/.build-check/assets/vendor-micromark-extension-gfm-strikethrough-r4kRFlAf.js
ydy0615 838eec30a8 feat: add theme management with light and dark modes
- Implemented a new composable `useTheme` for managing theme state.
- Added functions to read and write theme preference to local storage.
- Applied theme styles to the DOM based on user preference.
- Introduced a toggle function to switch between light and dark themes.

refactor: enhance copilot plugin functionality

- Improved request handling with sequence and document versioning.
- Refactored ghost text handling to improve clarity and efficiency.
- Updated markdown insertion logic to handle parsed content more robustly.
- Enhanced error handling and logging for better debugging.

style: update global styles for light and dark themes

- Defined CSS variables for light and dark themes to streamline styling.
- Improved overall styling consistency and responsiveness.
- Added transitions for smoother theme changes and interactions.
2026-02-15 15:44:09 +08:00

2 lines
1.7 KiB
JavaScript

import{s as g}from"./vendor-micromark-util-chunked-DrRIdSP-.js";import{c as k}from"./vendor-micromark-util-classify-character-Bc1Mydac.js";import{r as d}from"./vendor-micromark-util-resolve-all-PQCKh0dx.js";function j(m){let l=(m||{}).singleTilde;const f={name:"strikethrough",tokenize:S,resolveAll:y};return l==null&&(l=!0),{text:{126:f},insideSpan:{null:[f]},attentionMarkers:{null:[126]}};function y(r,i){let t=-1;for(;++t<r.length;)if(r[t][0]==="enter"&&r[t][1].type==="strikethroughSequenceTemporary"&&r[t][1]._close){let e=t;for(;e--;)if(r[e][0]==="exit"&&r[e][1].type==="strikethroughSequenceTemporary"&&r[e][1]._open&&r[t][1].end.offset-r[t][1].start.offset===r[e][1].end.offset-r[e][1].start.offset){r[t][1].type="strikethroughSequence",r[e][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},r[e][1].start),end:Object.assign({},r[t][1].end)},s={type:"strikethroughText",start:Object.assign({},r[e][1].end),end:Object.assign({},r[t][1].start)},o=[["enter",u,i],["enter",r[e][1],i],["exit",r[e][1],i],["enter",s,i]],h=i.parser.constructs.insideSpan.null;h&&g(o,o.length,0,d(h,r.slice(e+1,t),i)),g(o,o.length,0,[["exit",s,i],["enter",r[t][1],i],["exit",r[t][1],i],["exit",u,i]]),g(r,e-1,t-e+3,o),t=e+o.length-2;break}}for(t=-1;++t<r.length;)r[t][1].type==="strikethroughSequenceTemporary"&&(r[t][1].type="data");return r}function S(r,i,t){const e=this.previous,u=this.events;let s=0;return o;function o(n){return e===126&&u[u.length-1][1].type!=="characterEscape"?t(n):(r.enter("strikethroughSequenceTemporary"),h(n))}function h(n){const a=k(e);if(n===126)return s>1?t(n):(r.consume(n),s++,h);if(s<2&&!l)return t(n);const c=r.exit("strikethroughSequenceTemporary"),p=k(n);return c._open=!p||p===2&&!!a,c._close=!a||a===2&&!!p,i(n)}}}export{j as g};