@halo-dev/shiki-code-element 1.4.0 → 1.4.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/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -605,7 +605,7 @@ function X(e, t, n) {
|
|
|
605
605
|
}
|
|
606
606
|
//#endregion
|
|
607
607
|
//#region src/styles/shiki.css?inline
|
|
608
|
-
var Te = ".shiki{--shiki-code-padding:.875em;--shiki-fold-highlight-offset:.5em;--shiki-tail-control-offset:1em;--shiki-fold-accent:#3b82f6d9;--shiki-fold-accent-strong:#3b82f6;--shiki-fold-accent-muted:#3b82f66b;--shiki-fold-background:#60a5fa1a;--shiki-fold-background-hover:#60a5fa29;--shiki-fold-background-muted:#60a5fa14;--shiki-fold-label-color:#93c5fdf2;--shiki-fold-label-border:#60a5fa61;--shiki-fold-label-background:#3b82f629;--shiki-fold-tail-color:#738a94d1;--shiki-fold-tail-gradient-mid:#738a940b;--shiki-fold-tail-gradient-end:#738a9424;--shiki-fold-tail-hover-color:#60a5faeb;--shiki-fold-tail-expanded-color:#60a5fad9;padding:var(--shiki-code-padding);color-scheme:var(--shiki-theme-type,light);overflow-x:auto}@supports (color:color-mix(in srgb, white, black)){.shiki{--shiki-fold-accent:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 54%, transparent);--shiki-fold-accent-strong:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 72%, transparent);--shiki-fold-accent-muted:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 30%, transparent);--shiki-fold-background:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 8%, transparent);--shiki-fold-background-hover:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 12%, transparent);--shiki-fold-background-muted:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 6%, transparent);--shiki-fold-label-color:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 72%, var(--shiki-theme-bg,transparent));--shiki-fold-label-border:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 22%, transparent);--shiki-fold-label-background:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 10%, transparent);--shiki-fold-tail-color:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 58%, var(--shiki-theme-bg,transparent));--shiki-fold-tail-gradient-mid:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 3%, transparent);--shiki-fold-tail-gradient-end:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 9%, transparent);--shiki-fold-tail-hover-color:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 76%, var(--shiki-theme-bg,transparent));--shiki-fold-tail-expanded-color:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 68%, var(--shiki-theme-bg,transparent))}}code{z-index:0;width:max-content;min-width:100%;font-size:var(--font-size,.875em);counter-reset:step;counter-increment:step 0;display:block;position:relative}code .line:before{content:counter(step);counter-increment:step;text-align:right;color:#738a9480;width:1rem;margin-right:1.5rem;display:inline-block}code .line:last-child:empty{display:none}code .line:last-child:has(>span:empty:only-child){display:none}.has-diff .diff,.has-highlighted .highlighted{width:100%;display:inline-block;position:relative}.has-diff .diff.remove:before{content:\"-\"}.has-diff .diff.add:before{content:\"+\"}.has-diff .diff.remove:after{content:\"\";z-index:-1;background:#ef444426;border-left:1px solid #ef4444cc;position:absolute;inset:0 -.875em}.has-diff .diff.add:after{content:\"\";z-index:-1;background:#22c55e26;border-left:1px solid #22c55ecc;position:absolute;inset:0 -.875em}.has-focused .line:not(.focused){opacity:.7;filter:blur(.095rem);transition:filter .35s,opacity .35s}.has-focused:hover .line:not(.focused){opacity:1;filter:blur()}.has-highlighted .highlighted:after{content:\"\";z-index:-1;background:#65758529;border-left:1px solid #22c55ecc;position:absolute;inset:0 -.875em}.has-highlighted .highlighted.error:after{background:#f43f5e29!important;border-left:1px solid #f43f5ecc!important}.has-highlighted .highlighted.warning:after{background:#eab30829!important;border-left:1px solid #eab308cc!important}.has-highlighted .highlighted.info:after{background:#65758529!important;border-left:1px solid #657585cc!important}.has-fold code .line{display:block}.has-fold .fold-line{width:100%}.has-fold .fold-start{cursor:pointer;box-sizing:border-box;width:calc(100% + var(--shiki-fold-highlight-offset) + var(--shiki-fold-highlight-offset));margin-left:calc(0px - var(--shiki-fold-highlight-offset));padding-left:var(--shiki-fold-highlight-offset);background:var(--shiki-fold-background);box-shadow:inset 3px 0 var(--shiki-fold-accent);border-radius:.375rem;transition:background .2s,box-shadow .2s}.has-fold .fold-start:hover{background:var(--shiki-fold-background-hover);box-shadow:inset 3px 0 var(--shiki-fold-accent-strong)}.has-fold .fold-start:focus-visible{outline:2px solid var(--shiki-fold-accent);outline-offset:2px}.has-fold .fold-start:after{content:\"▸ \" attr(data-fold-lines) \" lines hidden\";border:1px solid var(--shiki-fold-label-border);color:var(--shiki-fold-label-color);background:var(--shiki-fold-label-background);font-weight:600;line-height:1.5;font-size:var(--font-size,.875em);border-radius:999px;align-items:center;margin-left:1rem;padding:.0625rem .5rem;display:inline-flex;box-shadow:0 1px 2px #00000029}.has-fold .fold-start.fold-expanded:after{content:\"▾ collapse\";opacity:.75}.has-fold .fold-start.fold-expanded:has(+.fold-hidden.fold-expanded:not(.fold-tail-line)){border-bottom-right-radius:0;border-bottom-left-radius:0}.has-fold .fold-hidden.fold-expanded:not(.fold-tail-line){box-sizing:border-box;width:calc(100% + var(--shiki-fold-highlight-offset) + var(--shiki-fold-highlight-offset));margin-left:calc(0px - var(--shiki-fold-highlight-offset));padding-left:var(--shiki-fold-highlight-offset);background:var(--shiki-fold-background-muted);box-shadow:inset 3px 0 var(--shiki-fold-accent-muted)}.has-fold .fold-hidden.fold-expanded:not(.fold-tail-line):not(:has(+.fold-hidden.fold-expanded:not(.fold-tail-line))){border-bottom-right-radius:.375rem;border-bottom-left-radius:.375rem}.has-fold .fold-hidden:not(.fold-expanded){opacity:0;pointer-events:none;height:0;line-height:0;display:block;overflow:hidden}.has-fold .fold-hidden:not(.fold-expanded) *{line-height:0}.has-fold-tail{padding-bottom:0}.has-fold-tail .fold-tail-control{z-index:1;width:calc(100% + var(--shiki-tail-control-offset) + var(--shiki-tail-control-offset));box-sizing:border-box;min-height:1.5rem;margin:0 0 0 calc(0px - var(--shiki-tail-control-offset));cursor:pointer;background:0 0;border-top:0;justify-content:center;align-items:center;transition:color .2s;display:flex;position:
|
|
608
|
+
var Te = ".shiki{--shiki-code-padding:.875em;--shiki-fold-highlight-offset:.5em;--shiki-tail-control-offset:1em;--shiki-fold-accent:#3b82f6d9;--shiki-fold-accent-strong:#3b82f6;--shiki-fold-accent-muted:#3b82f66b;--shiki-fold-background:#60a5fa1a;--shiki-fold-background-hover:#60a5fa29;--shiki-fold-background-muted:#60a5fa14;--shiki-fold-label-color:#93c5fdf2;--shiki-fold-label-border:#60a5fa61;--shiki-fold-label-background:#3b82f629;--shiki-fold-tail-color:#738a94d1;--shiki-fold-tail-gradient-mid:#738a940b;--shiki-fold-tail-gradient-end:#738a9424;--shiki-fold-tail-hover-color:#60a5faeb;--shiki-fold-tail-expanded-color:#60a5fad9;padding:var(--shiki-code-padding);color-scheme:var(--shiki-theme-type,light);overflow-x:auto}@supports (color:color-mix(in srgb, white, black)){.shiki{--shiki-fold-accent:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 54%, transparent);--shiki-fold-accent-strong:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 72%, transparent);--shiki-fold-accent-muted:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 30%, transparent);--shiki-fold-background:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 8%, transparent);--shiki-fold-background-hover:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 12%, transparent);--shiki-fold-background-muted:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 6%, transparent);--shiki-fold-label-color:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 72%, var(--shiki-theme-bg,transparent));--shiki-fold-label-border:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 22%, transparent);--shiki-fold-label-background:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 10%, transparent);--shiki-fold-tail-color:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 58%, var(--shiki-theme-bg,transparent));--shiki-fold-tail-gradient-mid:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 3%, transparent);--shiki-fold-tail-gradient-end:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 9%, transparent);--shiki-fold-tail-hover-color:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 76%, var(--shiki-theme-bg,transparent));--shiki-fold-tail-expanded-color:color-mix(in srgb, var(--shiki-theme-fg,currentColor) 68%, var(--shiki-theme-bg,transparent))}}code{z-index:0;width:max-content;min-width:100%;font-size:var(--font-size,.875em);counter-reset:step;counter-increment:step 0;display:block;position:relative}code .line:before{content:counter(step);counter-increment:step;text-align:right;color:#738a9480;width:1rem;margin-right:1.5rem;display:inline-block}code .line:last-child:empty{display:none}code .line:last-child:has(>span:empty:only-child){display:none}.has-diff .diff,.has-highlighted .highlighted{width:100%;display:inline-block;position:relative}.has-diff .diff.remove:before{content:\"-\"}.has-diff .diff.add:before{content:\"+\"}.has-diff .diff.remove:after{content:\"\";z-index:-1;background:#ef444426;border-left:1px solid #ef4444cc;position:absolute;inset:0 -.875em}.has-diff .diff.add:after{content:\"\";z-index:-1;background:#22c55e26;border-left:1px solid #22c55ecc;position:absolute;inset:0 -.875em}.has-focused .line:not(.focused){opacity:.7;filter:blur(.095rem);transition:filter .35s,opacity .35s}.has-focused:hover .line:not(.focused){opacity:1;filter:blur()}.has-highlighted .highlighted:after{content:\"\";z-index:-1;background:#65758529;border-left:1px solid #22c55ecc;position:absolute;inset:0 -.875em}.has-highlighted .highlighted.error:after{background:#f43f5e29!important;border-left:1px solid #f43f5ecc!important}.has-highlighted .highlighted.warning:after{background:#eab30829!important;border-left:1px solid #eab308cc!important}.has-highlighted .highlighted.info:after{background:#65758529!important;border-left:1px solid #657585cc!important}.has-fold code .line{display:block}.has-fold .fold-line{width:100%}.has-fold .fold-start{cursor:pointer;box-sizing:border-box;width:calc(100% + var(--shiki-fold-highlight-offset) + var(--shiki-fold-highlight-offset));margin-left:calc(0px - var(--shiki-fold-highlight-offset));padding-left:var(--shiki-fold-highlight-offset);background:var(--shiki-fold-background);box-shadow:inset 3px 0 var(--shiki-fold-accent);border-radius:.375rem;transition:background .2s,box-shadow .2s}.has-fold .fold-start:hover{background:var(--shiki-fold-background-hover);box-shadow:inset 3px 0 var(--shiki-fold-accent-strong)}.has-fold .fold-start:focus-visible{outline:2px solid var(--shiki-fold-accent);outline-offset:2px}.has-fold .fold-start:after{content:\"▸ \" attr(data-fold-lines) \" lines hidden\";border:1px solid var(--shiki-fold-label-border);color:var(--shiki-fold-label-color);background:var(--shiki-fold-label-background);font-weight:600;line-height:1.5;font-size:var(--font-size,.875em);border-radius:999px;align-items:center;margin-left:1rem;padding:.0625rem .5rem;display:inline-flex;box-shadow:0 1px 2px #00000029}.has-fold .fold-start.fold-expanded:after{content:\"▾ collapse\";opacity:.75}.has-fold .fold-start.fold-expanded:has(+.fold-hidden.fold-expanded:not(.fold-tail-line)){border-bottom-right-radius:0;border-bottom-left-radius:0}.has-fold .fold-hidden.fold-expanded:not(.fold-tail-line){box-sizing:border-box;width:calc(100% + var(--shiki-fold-highlight-offset) + var(--shiki-fold-highlight-offset));margin-left:calc(0px - var(--shiki-fold-highlight-offset));padding-left:var(--shiki-fold-highlight-offset);background:var(--shiki-fold-background-muted);box-shadow:inset 3px 0 var(--shiki-fold-accent-muted)}.has-fold .fold-hidden.fold-expanded:not(.fold-tail-line):not(:has(+.fold-hidden.fold-expanded:not(.fold-tail-line))){border-bottom-right-radius:.375rem;border-bottom-left-radius:.375rem}.has-fold .fold-hidden:not(.fold-expanded){opacity:0;pointer-events:none;height:0;line-height:0;display:block;overflow:hidden}.has-fold .fold-hidden:not(.fold-expanded) *{line-height:0}.has-fold-tail{padding-bottom:0;container-type:inline-size}.has-fold-tail .fold-tail-control{left:calc(0px - var(--shiki-tail-control-offset));z-index:1;width:calc(100% + var(--shiki-tail-control-offset) + var(--shiki-tail-control-offset));box-sizing:border-box;min-height:1.5rem;margin:0 0 0 calc(0px - var(--shiki-tail-control-offset));cursor:pointer;background:0 0;border-top:0;justify-content:center;align-items:center;transition:color .2s;display:flex;position:sticky;box-shadow:0 -.5rem 1.25rem #0f172a0f;color:var(--shiki-fold-tail-color)!important;-webkit-text-fill-color:var(--shiki-fold-tail-color)!important}@supports (width:100cqw){.has-fold-tail .fold-tail-control{width:calc(100cqw + var(--shiki-tail-control-offset) + var(--shiki-tail-control-offset))}}.has-fold-tail .fold-tail-control:before{content:\"\";pointer-events:none;background:linear-gradient(to bottom, transparent, var(--shiki-fold-tail-gradient-mid) 42%, var(--shiki-fold-tail-gradient-end));height:3.5rem;position:absolute;bottom:0;left:0;right:0}.has-fold-tail .fold-tail-label{z-index:1;border-radius:999px;justify-content:center;align-items:center;gap:.375rem;min-width:7.5rem;padding:.0625rem .5rem;font-size:.875em;font-weight:500;line-height:1.35;display:inline-flex;position:relative}.has-fold-tail .fold-tail-icon{flex:0 0 .75rem;justify-content:center;align-items:center;width:.75rem;height:1em;font-size:.8125em;line-height:1;display:inline-flex}.has-fold-tail .fold-tail-control .fold-tail-label,.has-fold-tail .fold-tail-control .fold-tail-icon,.has-fold-tail .fold-tail-control .fold-tail-text{color:inherit!important;-webkit-text-fill-color:inherit!important}.has-fold-tail .fold-tail-label-expanded{display:none}.has-fold-tail .fold-tail-control:hover{color:var(--shiki-fold-tail-hover-color)!important;-webkit-text-fill-color:var(--shiki-fold-tail-hover-color)!important}.has-fold-tail .fold-tail-control:focus-visible{outline:2px solid var(--shiki-fold-accent);outline-offset:-3px}.has-fold-tail .fold-tail-control.fold-expanded{color:var(--shiki-fold-tail-expanded-color)!important;-webkit-text-fill-color:var(--shiki-fold-tail-expanded-color)!important}.has-fold-tail .fold-tail-control.fold-expanded:before,.has-fold-tail .fold-tail-control.fold-expanded .fold-tail-label-collapsed{display:none}.has-fold-tail .fold-tail-control.fold-expanded .fold-tail-label-expanded{display:inline-flex}:host([color-scheme=dark]) .shiki,:host([color-scheme=dark]) .shiki span{color:var(--shiki-dark)!important}:host([color-scheme=dark]) .shiki{background-color:var(--shiki-dark-bg)!important}";
|
|
609
609
|
//#endregion
|
|
610
610
|
//#region src/utils/copy-to-clipboard.ts
|
|
611
611
|
function Ee(e, t) {
|