vue-stream-markdown 0.1.4 → 0.1.6
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/README.md +3 -1
- package/dist/arrow-left-DiHYz8df.js +25 -0
- package/dist/{blockquote-DdEg2gww.js → blockquote-CxA1dQZe.js} +4 -11
- package/dist/{button-jFTF378X.js → button-B2ebQt7R.js} +2 -3
- package/dist/button-C6zIegam.js +5 -0
- package/dist/{code-BxWvKFxG.js → code-CPG6B2Cw.js} +12 -20
- package/dist/code-block--1wFjtmu.js +9 -0
- package/dist/{code-block-uZcUI59D.js → code-block-I_Yd1Flg.js} +62 -67
- package/dist/{composables-Cx0nvyHl.js → composables-DWipZHuF.js} +1119 -840
- package/dist/corner-down-left-jxlwq3ox.js +24 -0
- package/dist/{delete-BdWzKJCy.js → delete-DQ21z5-F.js} +4 -11
- package/dist/dist-CYkm26BF.js +119 -0
- package/dist/dropdown-CtWjJiAf.js +5 -0
- package/dist/{emphasis-CTuGt1Ok.js → emphasis-BjLkIDQB.js} +4 -11
- package/dist/{en-US-Bfc50l3I.js → en-US-K7SXR3gy.js} +8 -1
- package/dist/{error-component-Bhl770lu.js → error-component-DSOVrE5J.js} +1 -1
- package/dist/error-component-DtcRn_0A.js +4 -0
- package/dist/flip-horizontal-CEf7aAdM.js +25 -0
- package/dist/footnote-definition-BmS8hchP.js +103 -0
- package/dist/footnote-reference-Z2tITeCE.js +86 -0
- package/dist/{heading-2vpQQtTH.js → heading-BwBFJB_E.js} +4 -11
- package/dist/{html-DL0PcUXX.js → html-DFU0myJP.js} +2 -10
- package/dist/image-BLlap3ce.js +242 -0
- package/dist/{image-BDtPwitR.js → image-IKvFWz2r.js} +43 -78
- package/dist/image-aT9xxnwh.js +8 -0
- package/dist/index.css +69 -64
- package/dist/index.d.ts +192 -82
- package/dist/index.js +291 -65
- package/dist/{inline-code-CBoqhfz7.js → inline-code-Bqu84Yyu.js} +2 -10
- package/dist/{inline-math-CAqboT7h.js → inline-math-C2Ryxm-K.js} +4 -12
- package/dist/{link-C8BSlPhZ.js → link-BXl7E_6o.js} +6 -14
- package/dist/{list-BCiFKGaz.js → list-DLcwTZns.js} +4 -11
- package/dist/{list-item-p-OLUR_9.js → list-item-H0eYeIdB.js} +4 -11
- package/dist/{math-CT1TB2pK.js → math-C-0d5PaJ.js} +4 -12
- package/dist/{mermaid-CYrA8rCl.js → mermaid-0x6C2MY5.js} +12 -18
- package/dist/modal-BDgfKnFl.js +4 -0
- package/dist/modal-CEqU9Ubu.js +94 -0
- package/dist/{node-list-CGr_EVtn.js → node-list--v2wbxOo.js} +19 -26
- package/dist/node-list-CHvX62Zh.js +4 -0
- package/dist/{paragraph-DYjqr_Sa.js → paragraph-DRPfp6DV.js} +4 -11
- package/dist/previewers-DsN-cTwd.js +10 -0
- package/dist/rotate-ccw-square-5sO65BY9.js +24 -0
- package/dist/segmented-DIVDGfR5.js +6 -0
- package/dist/{segmented-DBW9ignu.js → segmented-Drf8EBQD.js} +1 -1
- package/dist/{shiki-bQYWLdW3.js → shiki-CkwRD3TS.js} +6 -14
- package/dist/spin-DWkKEP0G.js +3 -0
- package/dist/{strong-CvOjLZiq.js → strong-D6V4fCRG.js} +4 -11
- package/dist/table-B2mghd3l.js +3 -0
- package/dist/{table-l_3z210v.js → table-DLUgGL5Q.js} +13 -18
- package/dist/{text-DuONUqRA.js → text-DoY1TIw3.js} +2 -10
- package/dist/{thematic-break-CcNPEI9Y.js → thematic-break-DXDZ5dcO.js} +2 -10
- package/dist/tooltip-Bdt9-aQx.js +68 -0
- package/dist/tooltip-DQ1-yPia.js +4 -0
- package/dist/{vanilla-CFWVwBvD.js → vanilla-BSgZTIo9.js} +1 -1
- package/dist/vanilla-DUbuBied.js +4 -0
- package/dist/{yaml-DJHrmzSe.js → yaml-3cd5rdJj.js} +3 -11
- package/dist/{zh-CN-CL1XGe0H.js → zh-CN-CykTNqF_.js} +9 -2
- package/dist/zoom-container-D2DxS8V5.js +6 -0
- package/dist/{zoom-container-gjQ0EMyk.js → zoom-container-f44XxzOI.js} +52 -23
- package/package.json +9 -10
- package/dist/button-D6ccVxGm.js +0 -5
- package/dist/code-block-B72JfFy-.js +0 -9
- package/dist/dropdown-oiCw8QVq.js +0 -5
- package/dist/error-component-8y13-fYG.js +0 -4
- package/dist/modal-CuQR21UD.js +0 -71
- package/dist/modal-DcpxxDDX.js +0 -3
- package/dist/node-list-lgY1wbfQ.js +0 -3
- package/dist/previewers-ByaS2Ksa.js +0 -10
- package/dist/segmented-B4IEw3wg.js +0 -6
- package/dist/spin-Bz4zGBEo.js +0 -3
- package/dist/table-CZLbUHiJ.js +0 -3
- package/dist/tooltip-3UDC9mw-.js +0 -71
- package/dist/tooltip-CAoc_U1X.js +0 -4
- package/dist/vanilla-De7W3PpS.js +0 -4
- package/dist/zoom-container-DBgGdbJS.js +0 -6
- /package/dist/{angular-Chs-UKBr.js → angular-CEQtRU3N.js} +0 -0
- /package/dist/{angular-component-Cc_FANXU.js → angular-component-QEWXDi5W.js} +0 -0
- /package/dist/{apache-COYnc6xR.js → apache-D1WYHuA2.js} +0 -0
- /package/dist/{asciidoc-BabXBDAL.js → asciidoc-BbV_Tvaj.js} +0 -0
- /package/dist/{assembly-CDqKhexW.js → assembly-DOdgqSeT.js} +0 -0
- /package/dist/{astro-C9kftzFG.js → astro-I7-Zr25r.js} +0 -0
- /package/dist/{bash-Ce4pNIkV.js → bash-BC7HOdMh.js} +0 -0
- /package/dist/{batch-CHQBRjFL.js → batch-XAv7F3kV.js} +0 -0
- /package/dist/{bicep-8jxWtuBF.js → bicep-B9IAZzHb.js} +0 -0
- /package/dist/{c-FBUef746.js → c-B3pMu4KG.js} +0 -0
- /package/dist/{check-C4xOk8um.js → check-BjAiKMbo.js} +0 -0
- /package/dist/{chevron-down-cnOJ4h1g.js → chevron-down-B4lkjpIC.js} +0 -0
- /package/dist/{circle-alert-CLX-h5rZ.js → circle-alert-DlAafH7h.js} +0 -0
- /package/dist/{clojure-BulUroSy.js → clojure-DwxK-YDX.js} +0 -0
- /package/dist/{cmake-CW3vz1Mo.js → cmake-DtnmI6Z6.js} +0 -0
- /package/dist/{cobol-CIn3oFju.js → cobol--wWeXL_f.js} +0 -0
- /package/dist/{code-D8LSp8rK.js → code-lfRPXNJI.js} +0 -0
- /package/dist/{codeowners-CJggXF_b.js → codeowners-Dtwyh-5g.js} +0 -0
- /package/dist/{coffeescript-CBrVvzGY.js → coffeescript-BlF7y2QG.js} +0 -0
- /package/dist/{copy-Cabve0xf.js → copy-BTFPPhff.js} +0 -0
- /package/dist/{cpp-BTKeuyd-.js → cpp-D_TbJeEH.js} +0 -0
- /package/dist/{crystal-DyIYvZbm.js → crystal-lJ2ZzJQu.js} +0 -0
- /package/dist/{csharp-NqZ1vyF9.js → csharp-D-5hlCJT.js} +0 -0
- /package/dist/{css-BpR5Lajb.js → css-Drykp8uH.js} +0 -0
- /package/dist/{csv-eCMFnKKK.js → csv-oLjD_o9N.js} +0 -0
- /package/dist/{cue-TY97dGOQ.js → cue-BBe_9OA4.js} +0 -0
- /package/dist/{d-NftUsdTd.js → d-CPNK2-3G.js} +0 -0
- /package/dist/{dart-DJpwZZbk.js → dart-BNaQZJdJ.js} +0 -0
- /package/dist/{database-aZwE71Px.js → database-DRAhifbf.js} +0 -0
- /package/dist/{diff-CYRzypaU.js → diff-D_vIvULL.js} +0 -0
- /package/dist/{docker-CxHBuukH.js → docker-BgJkkqCD.js} +0 -0
- /package/dist/{download-Bnn7rtYw.js → download-Bk2mYZyf.js} +0 -0
- /package/dist/{elixir-BKSxVc1h.js → elixir-CTx5aScS.js} +0 -0
- /package/dist/{elm-DScuAf3X.js → elm-nHy9iRuu.js} +0 -0
- /package/dist/{env-CDAKsodl.js → env-CrWzDcwP.js} +0 -0
- /package/dist/{erlang-D2M1ZL3m.js → erlang-CxR4-Qdt.js} +0 -0
- /package/dist/{eye-CdeX8PhP.js → eye-DpAj1af-.js} +0 -0
- /package/dist/{fortran-CORyQ0wt.js → fortran-DhUZYzo3.js} +0 -0
- /package/dist/{fsharp-BJz_Jgpl.js → fsharp-DyIvnsyH.js} +0 -0
- /package/dist/{git-DgrlTr1E.js → git-D4qjCZtd.js} +0 -0
- /package/dist/{gleam-t_xad9Kw.js → gleam-D-ovCBt_.js} +0 -0
- /package/dist/{go-Cvlh1xtL.js → go-CEH2y3pJ.js} +0 -0
- /package/dist/{graphql-ApIm0mDD.js → graphql-DbV-8_AJ.js} +0 -0
- /package/dist/{groovy-CaLnK8PV.js → groovy-B-_VVp4c.js} +0 -0
- /package/dist/{haml-MwijEO_6.js → haml-Cnm_v56B.js} +0 -0
- /package/dist/{handlebars-CKdUPI9h.js → handlebars-8EEQS0El.js} +0 -0
- /package/dist/{haskell-NPOXEnck.js → haskell-cLvKQFrd.js} +0 -0
- /package/dist/{haxe-DyKBMsDE.js → haxe-DtCGwrr1.js} +0 -0
- /package/dist/{html-CMgES1dE.js → html-C2NHp3i4.js} +0 -0
- /package/dist/{http-B9FFNmUr.js → http-DYO1Ugj7.js} +0 -0
- /package/dist/{image-CMZAakWu.js → image-DDiNDOKJ.js} +0 -0
- /package/dist/{java-iU-L9wJz.js → java-it6UCC5M.js} +0 -0
- /package/dist/{javascript-DtnWdTFC.js → javascript-DVxfoa-a.js} +0 -0
- /package/dist/{jinja-CoWszo_D.js → jinja-CUKX2CXM.js} +0 -0
- /package/dist/{json-C80qKCnh.js → json-O68iFOiu.js} +0 -0
- /package/dist/{julia-DG2BCBLx.js → julia-Dq3BwHeZ.js} +0 -0
- /package/dist/{kdl-7twRfIlJ.js → kdl-CFVZba8u.js} +0 -0
- /package/dist/{kotlin-BjrOgP7R.js → kotlin-BKhxhG0q.js} +0 -0
- /package/dist/{latex-DIQfUvG8.js → latex-B3hQqfJO.js} +0 -0
- /package/dist/{less-BJ1yEAWt.js → less-Bw2JZJkw.js} +0 -0
- /package/dist/{link-DeV4CQOB.js → link-DCaSecEI.js} +0 -0
- /package/dist/{liquid-BqKFZ1wQ.js → liquid-BsGDMxjJ.js} +0 -0
- /package/dist/{lisp-oekhB2ti.js → lisp-CnrazyOe.js} +0 -0
- /package/dist/{log-D1XEqR9q.js → log-BuRjhdbZ.js} +0 -0
- /package/dist/{lua-C5Q97-1D.js → lua-CA97s0xX.js} +0 -0
- /package/dist/{luau-BT8KwqZ2.js → luau-hq6gk9_N.js} +0 -0
- /package/dist/{makefile-B4a0ciG4.js → makefile-mNhrnPWo.js} +0 -0
- /package/dist/{markdown-DvNyKsiJ.js → markdown-El6B7b99.js} +0 -0
- /package/dist/{marko-BzsIf6bg.js → marko-8nTOMumd.js} +0 -0
- /package/dist/{matlab-cMBkmDhQ.js → matlab-DuqengFv.js} +0 -0
- /package/dist/{maximize-4PIqBONS.js → maximize-B1-N6kOL.js} +0 -0
- /package/dist/{mermaid-8JIH2gkQ.js → mermaid-Byu8TsQE.js} +0 -0
- /package/dist/{minimize-BJ8htyDF.js → minimize-CVVLdf2H.js} +0 -0
- /package/dist/{nextflow-DNmqU1xg.js → nextflow-DRCOPmGT.js} +0 -0
- /package/dist/{nginx-DDfYF_rj.js → nginx-DTgW--wm.js} +0 -0
- /package/dist/{nim-D9xEmy4k.js → nim-r-ftp-xj.js} +0 -0
- /package/dist/{nix-BV1Deshw.js → nix-BdWPBS1Z.js} +0 -0
- /package/dist/{ocaml-BkFn4LL3.js → ocaml-vXi6ujuu.js} +0 -0
- /package/dist/{perl-BytUHDE7.js → perl-C_g5vs30.js} +0 -0
- /package/dist/{php-BImJJtNM.js → php-C_b0sjdl.js} +0 -0
- /package/dist/{postcss-CrZ9_0sT.js → postcss-Bsz3PPjI.js} +0 -0
- /package/dist/{powershell-DYSGu7TM.js → powershell-D0kxdwKl.js} +0 -0
- /package/dist/{prisma-BhRvcOFY.js → prisma-BocqbK7a.js} +0 -0
- /package/dist/{prolog-DuaCKek_.js → prolog-D-zd1rzT.js} +0 -0
- /package/dist/{properties-BbIJwuP-.js → properties-Dds-063G.js} +0 -0
- /package/dist/{proto-CE0aVW11.js → proto-CzD9trm_.js} +0 -0
- /package/dist/{pug-B1-IC-Tc.js → pug-B1V2RxQS.js} +0 -0
- /package/dist/{puppet-8nYquiMG.js → puppet-BcnVd0q5.js} +0 -0
- /package/dist/{python-DhRyfBrD.js → python-BcZnB7mH.js} +0 -0
- /package/dist/{r-Cjje17IA.js → r-CxSFFuvL.js} +0 -0
- /package/dist/{racket-Dx0gMnpg.js → racket-DJ_82PRG.js} +0 -0
- /package/dist/{razor-DPht_bdD.js → razor-D7IkXHVQ.js} +0 -0
- /package/dist/{ruby-B8RxtCzI.js → ruby-Cidk52Rl.js} +0 -0
- /package/dist/{rust-Cjtli6yf.js → rust-DJvcpkbm.js} +0 -0
- /package/dist/{sass-Dv3DMzjs.js → sass-DTFDeixE.js} +0 -0
- /package/dist/{scala-B7bZGKXq.js → scala-GlHhGi5O.js} +0 -0
- /package/dist/{scheme-B2PsEdVN.js → scheme-rNcj5mL9.js} +0 -0
- /package/dist/{shader-BZzu3zGr.js → shader-Df9eByRK.js} +0 -0
- /package/dist/{shiki-token-renderer-D164wC7Y.js → shiki-token-renderer-BMveKuYt.js} +0 -0
- /package/dist/{solidity-CLieFYpL.js → solidity-CfuYjRuT.js} +0 -0
- /package/dist/{spin-Ds5W7qC_.js → spin-D4Oi_m7j.js} +0 -0
- /package/dist/{stata-C0yUiO47.js → stata-BB5c_hbh.js} +0 -0
- /package/dist/{svelte-rtF4yNGL.js → svelte-2ISqxu6B.js} +0 -0
- /package/dist/{swift-CzvYoIM0.js → swift-wpybyudn.js} +0 -0
- /package/dist/{table-4ec9FVB_.js → table-iNA4la0w.js} +0 -0
- /package/dist/{terraform-CD_BZGb-.js → terraform-CLzhaCaX.js} +0 -0
- /package/dist/{text-D1-vbZ7l.js → text-C0mKr3tC.js} +0 -0
- /package/dist/{toml-C6jUF0Xd.js → toml-DImd1uev.js} +0 -0
- /package/dist/{twig-C4dfP84J.js → twig-DEBVmtOq.js} +0 -0
- /package/dist/{typescript-Bk-pp-cK.js → typescript-Xo5tgeOd.js} +0 -0
- /package/dist/{typst-DPCpaVSH.js → typst-_Ui0vNYP.js} +0 -0
- /package/dist/{v-nRGMJ2Ki.js → v-Ch6vEAHG.js} +0 -0
- /package/dist/{vala-B78bKcY0.js → vala-Ds_Ad1cC.js} +0 -0
- /package/dist/{verilog-CRpkl76S.js → verilog-CUqRomTC.js} +0 -0
- /package/dist/{vim-DpKnut7b.js → vim-BFUPh6oM.js} +0 -0
- /package/dist/{vue-D5eadhjo.js → vue-DzgIlbJ2.js} +0 -0
- /package/dist/{xml-Dvx5F-hl.js → xml-CmbQxaqc.js} +0 -0
- /package/dist/{yaml-n1S8nAOh.js → yaml-BhwCoLnZ.js} +0 -0
- /package/dist/{zig-R-iFzxfW.js → zig-Bmrmp8vo.js} +0 -0
- /package/dist/{zoomIn-CEukuh3x.js → zoomIn-CCKcyIEv.js} +0 -0
- /package/dist/{zoomOut-qlzQyQli.js → zoomOut-BrSwLQZ_.js} +0 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { H as useContext, P as useI18n, V as useControls, j as saveImage, m as useMediumZoom } from "./composables-DWipZHuF.js";
|
|
2
|
+
import { n as treeFlatFilter } from "./dist-CYkm26BF.js";
|
|
3
|
+
import { t as button_default } from "./button-B2ebQt7R.js";
|
|
4
|
+
import { t as modal_default } from "./modal-CEqU9Ubu.js";
|
|
5
|
+
import { t as zoom_container_default } from "./zoom-container-f44XxzOI.js";
|
|
6
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeStyle, openBlock, ref, toRefs, unref, watch, withCtx } from "vue";
|
|
7
|
+
import { useCycleList } from "@vueuse/core";
|
|
8
|
+
|
|
9
|
+
//#region src/components/image.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
+
const _hoisted_1 = [
|
|
11
|
+
"src",
|
|
12
|
+
"alt",
|
|
13
|
+
"title"
|
|
14
|
+
];
|
|
15
|
+
const _hoisted_2 = [
|
|
16
|
+
"src",
|
|
17
|
+
"alt",
|
|
18
|
+
"title"
|
|
19
|
+
];
|
|
20
|
+
var image_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
21
|
+
__name: "image",
|
|
22
|
+
props: {
|
|
23
|
+
src: {
|
|
24
|
+
type: String,
|
|
25
|
+
required: false
|
|
26
|
+
},
|
|
27
|
+
alt: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: false
|
|
30
|
+
},
|
|
31
|
+
title: {
|
|
32
|
+
type: String,
|
|
33
|
+
required: false
|
|
34
|
+
},
|
|
35
|
+
preview: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
required: false,
|
|
38
|
+
default: true
|
|
39
|
+
},
|
|
40
|
+
margin: {
|
|
41
|
+
type: Number,
|
|
42
|
+
required: false,
|
|
43
|
+
default: 16
|
|
44
|
+
},
|
|
45
|
+
controls: {
|
|
46
|
+
type: [Boolean, Object],
|
|
47
|
+
required: false,
|
|
48
|
+
default: true
|
|
49
|
+
},
|
|
50
|
+
transformHardenUrl: {
|
|
51
|
+
type: Function,
|
|
52
|
+
required: false
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
emits: ["load", "error"],
|
|
56
|
+
setup(__props, { emit: __emit }) {
|
|
57
|
+
const props = __props;
|
|
58
|
+
const emits = __emit;
|
|
59
|
+
const { margin, controls } = toRefs(props);
|
|
60
|
+
const { t } = useI18n();
|
|
61
|
+
const { icons, parsedNodes } = useContext();
|
|
62
|
+
const { isControlEnabled, getControlValue } = useControls({ controls });
|
|
63
|
+
const imageNodes = computed(() => treeFlatFilter(parsedNodes.value, (node) => node.type === "image" && !node.loading));
|
|
64
|
+
const imageList = computed(() => {
|
|
65
|
+
return [...new Set(imageNodes.value.map((node) => node.url))].filter((url) => props.transformHardenUrl ? props.transformHardenUrl(url) : url).filter(Boolean);
|
|
66
|
+
});
|
|
67
|
+
const { state: imageSrc, prev, next } = useCycleList(imageList, {
|
|
68
|
+
initialValue: props.src,
|
|
69
|
+
fallbackIndex: 0
|
|
70
|
+
});
|
|
71
|
+
const enableDownload = computed(() => isControlEnabled("image.download"));
|
|
72
|
+
const enableCarousel = computed(() => isControlEnabled("image.carousel"));
|
|
73
|
+
const enableFlip = computed(() => isControlEnabled("image.flip"));
|
|
74
|
+
const enableRotate = computed(() => isControlEnabled("image.rotate"));
|
|
75
|
+
const controlPosition = computed(() => {
|
|
76
|
+
const position = getControlValue("image.controlPosition");
|
|
77
|
+
if (typeof position === "boolean") return "bottom-center";
|
|
78
|
+
return position || "bottom-center";
|
|
79
|
+
});
|
|
80
|
+
const loaded = ref(false);
|
|
81
|
+
const open = ref(false);
|
|
82
|
+
const scaleX = ref(1);
|
|
83
|
+
const scaleY = ref(1);
|
|
84
|
+
const rotate = ref(0);
|
|
85
|
+
const { isAnimating, elementRef, zoomElementRef: _zoomElementRef, elementStyle, zoomIn, zoomOut } = useMediumZoom({
|
|
86
|
+
margin,
|
|
87
|
+
open: () => open.value = true,
|
|
88
|
+
close: () => open.value = false
|
|
89
|
+
});
|
|
90
|
+
const imageStyle = computed(() => ({
|
|
91
|
+
transform: `
|
|
92
|
+
scaleX(${scaleX.value})
|
|
93
|
+
scaleY(${scaleY.value})
|
|
94
|
+
rotate(${rotate.value}deg)
|
|
95
|
+
`,
|
|
96
|
+
transition: "transform 0.3s ease",
|
|
97
|
+
...elementStyle.value
|
|
98
|
+
}));
|
|
99
|
+
function handleLoad(event) {
|
|
100
|
+
loaded.value = true;
|
|
101
|
+
emits("load", event);
|
|
102
|
+
}
|
|
103
|
+
function handleError(event) {
|
|
104
|
+
emits("error", event);
|
|
105
|
+
}
|
|
106
|
+
function handleOpen() {
|
|
107
|
+
if (!props.preview || !elementRef.value || !loaded.value) return;
|
|
108
|
+
zoomIn();
|
|
109
|
+
}
|
|
110
|
+
function handleClose() {
|
|
111
|
+
if (isAnimating.value) return;
|
|
112
|
+
zoomOut();
|
|
113
|
+
}
|
|
114
|
+
function download() {
|
|
115
|
+
if (!imageSrc.value) return;
|
|
116
|
+
saveImage(imageSrc.value, props.alt);
|
|
117
|
+
}
|
|
118
|
+
function flipHorizontal() {
|
|
119
|
+
scaleX.value *= -1;
|
|
120
|
+
}
|
|
121
|
+
function flipVertical() {
|
|
122
|
+
scaleY.value *= -1;
|
|
123
|
+
}
|
|
124
|
+
function rotateLeft() {
|
|
125
|
+
rotate.value -= 90;
|
|
126
|
+
}
|
|
127
|
+
function rotateRight() {
|
|
128
|
+
rotate.value += 90;
|
|
129
|
+
}
|
|
130
|
+
watch(open, (data) => {
|
|
131
|
+
if (!data) {
|
|
132
|
+
scaleX.value = 1;
|
|
133
|
+
scaleY.value = 1;
|
|
134
|
+
rotate.value = 0;
|
|
135
|
+
if (props.src) imageSrc.value = props.src;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
return (_ctx, _cache) => {
|
|
139
|
+
return openBlock(), createElementBlock(Fragment, null, [createElementVNode("img", {
|
|
140
|
+
ref_key: "elementRef",
|
|
141
|
+
ref: elementRef,
|
|
142
|
+
"data-stream-markdown": "image",
|
|
143
|
+
src: __props.src,
|
|
144
|
+
alt: __props.alt,
|
|
145
|
+
title: __props.title,
|
|
146
|
+
style: { transition: "transform 300ms cubic-bezier(0.2, 0, 0.2, 1)" },
|
|
147
|
+
loading: "lazy",
|
|
148
|
+
decoding: "async",
|
|
149
|
+
onLoad: handleLoad,
|
|
150
|
+
onError: handleError,
|
|
151
|
+
onClick: handleOpen
|
|
152
|
+
}, null, 40, _hoisted_1), createVNode(modal_default, {
|
|
153
|
+
open: open.value,
|
|
154
|
+
"onUpdate:open": _cache[2] || (_cache[2] = ($event) => open.value = $event),
|
|
155
|
+
transition: "",
|
|
156
|
+
"modal-style": { backgroundColor: "rgba(0, 0, 0, 0.45)" },
|
|
157
|
+
close: handleClose
|
|
158
|
+
}, {
|
|
159
|
+
default: withCtx(() => [createVNode(zoom_container_default, {
|
|
160
|
+
"control-size": "large",
|
|
161
|
+
position: controlPosition.value,
|
|
162
|
+
"container-style": {
|
|
163
|
+
width: "auto",
|
|
164
|
+
maxWidth: `calc(100% - ${props.margin * 2}px)`,
|
|
165
|
+
cursor: "grab"
|
|
166
|
+
},
|
|
167
|
+
onClick: handleClose
|
|
168
|
+
}, {
|
|
169
|
+
controls: withCtx((buttonProps) => [
|
|
170
|
+
unref(imageSrc) && enableDownload.value ? (openBlock(), createBlock(button_default, mergeProps({ key: 0 }, buttonProps, {
|
|
171
|
+
icon: unref(icons).download,
|
|
172
|
+
name: unref(t)("button.download"),
|
|
173
|
+
onClick: download
|
|
174
|
+
}), null, 16, ["icon", "name"])) : createCommentVNode("v-if", true),
|
|
175
|
+
imageList.value.length > 1 && enableCarousel.value ? (openBlock(), createBlock(button_default, mergeProps({ key: 1 }, buttonProps, {
|
|
176
|
+
icon: unref(icons).arrowLeft,
|
|
177
|
+
name: unref(t)("button.previous"),
|
|
178
|
+
onClick: _cache[0] || (_cache[0] = () => unref(prev)())
|
|
179
|
+
}), null, 16, ["icon", "name"])) : createCommentVNode("v-if", true),
|
|
180
|
+
imageList.value.length > 1 && enableCarousel.value ? (openBlock(), createBlock(button_default, mergeProps({ key: 2 }, buttonProps, {
|
|
181
|
+
icon: unref(icons).arrowRight || unref(icons).arrowLeft,
|
|
182
|
+
name: unref(t)("button.next"),
|
|
183
|
+
"button-style": { transform: unref(icons).arrowRight ? void 0 : "scaleX(-1)" },
|
|
184
|
+
onClick: _cache[1] || (_cache[1] = () => unref(next)())
|
|
185
|
+
}), null, 16, [
|
|
186
|
+
"icon",
|
|
187
|
+
"name",
|
|
188
|
+
"button-style"
|
|
189
|
+
])) : createCommentVNode("v-if", true),
|
|
190
|
+
enableFlip.value ? (openBlock(), createBlock(button_default, mergeProps({ key: 3 }, buttonProps, {
|
|
191
|
+
icon: unref(icons).flipHorizontal,
|
|
192
|
+
name: unref(t)("button.flipX"),
|
|
193
|
+
onClick: flipHorizontal
|
|
194
|
+
}), null, 16, ["icon", "name"])) : createCommentVNode("v-if", true),
|
|
195
|
+
enableFlip.value ? (openBlock(), createBlock(button_default, mergeProps({ key: 4 }, buttonProps, {
|
|
196
|
+
icon: unref(icons).flipVertical || unref(icons).flipHorizontal,
|
|
197
|
+
name: unref(t)("button.flipY"),
|
|
198
|
+
"button-style": { rotate: unref(icons).flipVertical ? void 0 : "90deg" },
|
|
199
|
+
onClick: flipVertical
|
|
200
|
+
}), null, 16, [
|
|
201
|
+
"icon",
|
|
202
|
+
"name",
|
|
203
|
+
"button-style"
|
|
204
|
+
])) : createCommentVNode("v-if", true),
|
|
205
|
+
enableRotate.value ? (openBlock(), createBlock(button_default, mergeProps({ key: 5 }, buttonProps, {
|
|
206
|
+
icon: unref(icons).rotateLeft,
|
|
207
|
+
name: unref(t)("button.rotateLeft"),
|
|
208
|
+
onClick: rotateLeft
|
|
209
|
+
}), null, 16, ["icon", "name"])) : createCommentVNode("v-if", true),
|
|
210
|
+
enableRotate.value ? (openBlock(), createBlock(button_default, mergeProps({ key: 6 }, buttonProps, {
|
|
211
|
+
icon: unref(icons).rotateRight || unref(icons).rotateLeft,
|
|
212
|
+
name: unref(t)("button.rotateRight"),
|
|
213
|
+
"button-style": { transform: unref(icons).rotateRight ? void 0 : "scaleX(-1)" },
|
|
214
|
+
onClick: rotateRight
|
|
215
|
+
}), null, 16, [
|
|
216
|
+
"icon",
|
|
217
|
+
"name",
|
|
218
|
+
"button-style"
|
|
219
|
+
])) : createCommentVNode("v-if", true)
|
|
220
|
+
]),
|
|
221
|
+
default: withCtx(() => [createElementVNode("img", {
|
|
222
|
+
ref_key: "_zoomElementRef",
|
|
223
|
+
ref: _zoomElementRef,
|
|
224
|
+
src: unref(imageSrc),
|
|
225
|
+
alt: __props.alt,
|
|
226
|
+
title: __props.title,
|
|
227
|
+
style: normalizeStyle(imageStyle.value)
|
|
228
|
+
}, null, 12, _hoisted_2)]),
|
|
229
|
+
_: 1
|
|
230
|
+
}, 8, ["position", "container-style"])]),
|
|
231
|
+
_: 1
|
|
232
|
+
}, 8, ["open"])], 64);
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
//#endregion
|
|
238
|
+
//#region src/components/image.vue
|
|
239
|
+
var image_default = image_vue_vue_type_script_setup_true_lang_default;
|
|
240
|
+
|
|
241
|
+
//#endregion
|
|
242
|
+
export { image_default as t };
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./tooltip-
|
|
3
|
-
import { t as button_default } from "./button-
|
|
4
|
-
import
|
|
5
|
-
import { t as
|
|
6
|
-
import
|
|
1
|
+
import { H as useContext, P as useI18n, V as useControls, i as useSanitizers, j as saveImage } from "./composables-DWipZHuF.js";
|
|
2
|
+
import "./tooltip-Bdt9-aQx.js";
|
|
3
|
+
import { t as button_default } from "./button-B2ebQt7R.js";
|
|
4
|
+
import "./modal-CEqU9Ubu.js";
|
|
5
|
+
import { t as error_component_default } from "./error-component-DSOVrE5J.js";
|
|
6
|
+
import "./zoom-container-f44XxzOI.js";
|
|
7
|
+
import { t as image_default$1 } from "./image-BLlap3ce.js";
|
|
8
|
+
import { t as spin_default } from "./spin-D4Oi_m7j.js";
|
|
9
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, mergeProps, normalizeStyle, openBlock, ref, resolveDynamicComponent, toDisplayString, toRefs, unref, withCtx } from "vue";
|
|
7
10
|
|
|
8
11
|
//#region src/components/renderers/image.vue?vue&type=script&setup=true&lang.ts
|
|
9
12
|
const _hoisted_1 = { "data-stream-markdown": "image-wrapper" };
|
|
10
|
-
const _hoisted_2 =
|
|
11
|
-
"src",
|
|
12
|
-
"alt",
|
|
13
|
-
"title"
|
|
14
|
-
];
|
|
15
|
-
const _hoisted_3 = {
|
|
13
|
+
const _hoisted_2 = {
|
|
16
14
|
key: 0,
|
|
17
15
|
"data-stream-markdown": "image-caption"
|
|
18
16
|
};
|
|
@@ -31,16 +29,8 @@ var image_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
31
29
|
type: Object,
|
|
32
30
|
required: true
|
|
33
31
|
},
|
|
34
|
-
|
|
35
|
-
type:
|
|
36
|
-
required: true
|
|
37
|
-
},
|
|
38
|
-
indexKey: {
|
|
39
|
-
type: [Number, String],
|
|
40
|
-
required: true
|
|
41
|
-
},
|
|
42
|
-
getContainer: {
|
|
43
|
-
type: Function,
|
|
32
|
+
nodeKey: {
|
|
33
|
+
type: String,
|
|
44
34
|
required: true
|
|
45
35
|
},
|
|
46
36
|
controls: {
|
|
@@ -82,24 +72,23 @@ var image_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
82
72
|
},
|
|
83
73
|
setup(__props) {
|
|
84
74
|
const props = __props;
|
|
85
|
-
const fileExtensionPattern = /\.[^/.]+$/;
|
|
86
75
|
const { t } = useI18n();
|
|
87
76
|
const { icons } = useContext();
|
|
88
77
|
const { controls, hardenOptions } = toRefs(props);
|
|
89
78
|
const { isControlEnabled } = useControls({ controls });
|
|
90
|
-
const imgRef = ref();
|
|
91
79
|
const maskRef = ref();
|
|
92
80
|
const loadError = ref(false);
|
|
93
81
|
const imageLoaded = ref(false);
|
|
94
82
|
const fallbackAttempted = ref(false);
|
|
95
83
|
const isLoading = computed(() => props.node.loading || !props.node.url);
|
|
96
|
-
const
|
|
84
|
+
const enableDownload = computed(() => isControlEnabled("image.download"));
|
|
85
|
+
const enablePreview = computed(() => isControlEnabled("image.preview"));
|
|
97
86
|
const fallback = computed(() => {
|
|
98
87
|
var _props$imageOptions;
|
|
99
88
|
return ((_props$imageOptions = props.imageOptions) === null || _props$imageOptions === void 0 ? void 0 : _props$imageOptions.fallback) ?? "";
|
|
100
89
|
});
|
|
101
90
|
const imageSrc = computed(() => fallbackAttempted.value && fallback.value ? fallback.value : props.node.url);
|
|
102
|
-
const { transformedUrl, isHardenUrl } =
|
|
91
|
+
const { transformedUrl, isHardenUrl, transformHardenUrl } = useSanitizers({
|
|
103
92
|
url: imageSrc,
|
|
104
93
|
hardenOptions,
|
|
105
94
|
loading: isLoading,
|
|
@@ -117,8 +106,6 @@ var image_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
117
106
|
});
|
|
118
107
|
function handleLoaded() {
|
|
119
108
|
imageLoaded.value = true;
|
|
120
|
-
if (fallbackAttempted.value) return;
|
|
121
|
-
if (imgRef.value) props.mediumZoom.attach(imgRef.value);
|
|
122
109
|
}
|
|
123
110
|
function handleError() {
|
|
124
111
|
if (fallback.value && !fallbackAttempted.value) {
|
|
@@ -129,29 +116,13 @@ var image_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
129
116
|
}
|
|
130
117
|
async function handleDownload() {
|
|
131
118
|
if (!imageSrc.value) return;
|
|
132
|
-
|
|
133
|
-
const originalFilename = new URL(imageSrc.value, window.location.origin).pathname.split("/").pop() || "";
|
|
134
|
-
const extension = originalFilename.split(".").pop();
|
|
135
|
-
const hasExtension = originalFilename.includes(".") && extension !== void 0 && extension.length <= 4;
|
|
136
|
-
let filename = "";
|
|
137
|
-
if (hasExtension) filename = originalFilename;
|
|
138
|
-
else {
|
|
139
|
-
const mimeType = blob.type;
|
|
140
|
-
let fileExtension = "png";
|
|
141
|
-
if (mimeType.includes("jpeg") || mimeType.includes("jpg")) fileExtension = "jpg";
|
|
142
|
-
else if (mimeType.includes("png")) fileExtension = "png";
|
|
143
|
-
else if (mimeType.includes("svg")) fileExtension = "svg";
|
|
144
|
-
else if (mimeType.includes("gif")) fileExtension = "gif";
|
|
145
|
-
else if (mimeType.includes("webp")) fileExtension = "webp";
|
|
146
|
-
filename = `${(alt.value || originalFilename || "image").replace(fileExtensionPattern, "")}.${fileExtension}`;
|
|
147
|
-
}
|
|
148
|
-
save(filename, blob, blob.type);
|
|
119
|
+
saveImage(imageSrc.value, alt.value);
|
|
149
120
|
}
|
|
150
121
|
function handleMouseEnter() {
|
|
151
|
-
if (maskRef.value) maskRef.value.style.
|
|
122
|
+
if (maskRef.value) maskRef.value.style.opacity = 1;
|
|
152
123
|
}
|
|
153
124
|
function handleMouseLeave() {
|
|
154
|
-
if (maskRef.value) maskRef.value.style.
|
|
125
|
+
if (maskRef.value) maskRef.value.style.opacity = 0;
|
|
155
126
|
}
|
|
156
127
|
return (_ctx, _cache) => {
|
|
157
128
|
return openBlock(), createElementBlock("figure", {
|
|
@@ -165,7 +136,7 @@ var image_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
165
136
|
ref_key: "maskRef",
|
|
166
137
|
ref: maskRef,
|
|
167
138
|
"data-stream-markdown": "image-mask"
|
|
168
|
-
}, [!isLoading.value &&
|
|
139
|
+
}, [!isLoading.value && enableDownload.value ? (openBlock(), createBlock(button_default, {
|
|
169
140
|
key: 0,
|
|
170
141
|
"data-stream-markdown": "image-download-button",
|
|
171
142
|
icon: unref(icons).download,
|
|
@@ -177,37 +148,31 @@ var image_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
177
148
|
onClick: handleDownload
|
|
178
149
|
}, null, 8, ["icon", "name"])) : createCommentVNode("v-if", true)], 512)) : createCommentVNode("v-if", true),
|
|
179
150
|
(isLoading.value || !imageLoaded.value) && !unref(isHardenUrl) ? (openBlock(), createBlock(spin_default, { key: 1 })) : createCommentVNode("v-if", true),
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
key: 1,
|
|
203
|
-
variant: unref(isHardenUrl) ? "harden-image" : "image"
|
|
204
|
-
}, props), {
|
|
205
|
-
default: withCtx(() => [createTextVNode(toDisplayString(title.value), 1)]),
|
|
206
|
-
_: 1
|
|
207
|
-
}, 16, ["variant"])) : createCommentVNode("v-if", true)]),
|
|
151
|
+
!isLoading.value && !unref(isHardenUrl) && typeof unref(transformedUrl) === "string" ? (openBlock(), createBlock(image_default$1, {
|
|
152
|
+
key: unref(transformedUrl),
|
|
153
|
+
src: unref(transformedUrl),
|
|
154
|
+
alt: alt.value,
|
|
155
|
+
title: title.value,
|
|
156
|
+
preview: !fallbackAttempted.value && enablePreview.value,
|
|
157
|
+
controls: unref(controls),
|
|
158
|
+
"transform-harden-url": unref(transformHardenUrl),
|
|
159
|
+
onLoad: handleLoaded,
|
|
160
|
+
onError: handleError
|
|
161
|
+
}, null, 8, [
|
|
162
|
+
"src",
|
|
163
|
+
"alt",
|
|
164
|
+
"title",
|
|
165
|
+
"preview",
|
|
166
|
+
"controls",
|
|
167
|
+
"transform-harden-url"
|
|
168
|
+
])) : unref(isHardenUrl) || loadError.value ? (openBlock(), createBlock(resolveDynamicComponent(Error.value), mergeProps({
|
|
169
|
+
key: 3,
|
|
170
|
+
variant: unref(isHardenUrl) ? "harden-image" : "image"
|
|
171
|
+
}, props), {
|
|
172
|
+
default: withCtx(() => [createTextVNode(toDisplayString(title.value), 1)]),
|
|
208
173
|
_: 1
|
|
209
|
-
})
|
|
210
|
-
]), showCaption.value && title.value ? (openBlock(), createElementBlock("figcaption",
|
|
174
|
+
}, 16, ["variant"])) : createCommentVNode("v-if", true)
|
|
175
|
+
]), showCaption.value && title.value ? (openBlock(), createElementBlock("figcaption", _hoisted_2, toDisplayString(title.value), 1)) : createCommentVNode("v-if", true)], 36);
|
|
211
176
|
};
|
|
212
177
|
}
|
|
213
178
|
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./composables-DWipZHuF.js";
|
|
2
|
+
import "./tooltip-Bdt9-aQx.js";
|
|
3
|
+
import "./button-B2ebQt7R.js";
|
|
4
|
+
import "./modal-CEqU9Ubu.js";
|
|
5
|
+
import "./zoom-container-f44XxzOI.js";
|
|
6
|
+
import { t as image_default } from "./image-BLlap3ce.js";
|
|
7
|
+
|
|
8
|
+
export { image_default as default };
|
package/dist/index.css
CHANGED
|
@@ -43,18 +43,23 @@
|
|
|
43
43
|
opacity: 0.5;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.stream-markdown
|
|
46
|
+
.stream-markdown [data-stream-markdown='tooltip'] {
|
|
47
47
|
background: var(--popover);
|
|
48
48
|
color: var(--popover-foreground);
|
|
49
49
|
border: 1px solid var(--border);
|
|
50
|
+
border-radius: 0.5rem;
|
|
51
|
+
z-index: 100;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
|
-
.stream-markdown
|
|
53
|
-
|
|
54
|
+
.stream-markdown [data-stream-markdown='tooltip-overlay'] {
|
|
55
|
+
padding-block: 0.25rem;
|
|
56
|
+
padding-inline: 0.5rem;
|
|
57
|
+
font-size: 0.875rem;
|
|
58
|
+
line-height: 1.25rem;
|
|
54
59
|
}
|
|
55
60
|
|
|
56
|
-
.stream-markdown
|
|
57
|
-
|
|
61
|
+
.stream-markdown [data-stream-markdown='dropdown-overlay'] {
|
|
62
|
+
padding: 0.25rem;
|
|
58
63
|
}
|
|
59
64
|
|
|
60
65
|
.stream-markdown [data-stream-markdown='button'] {
|
|
@@ -78,10 +83,6 @@
|
|
|
78
83
|
background-color: var(--accent);
|
|
79
84
|
}
|
|
80
85
|
|
|
81
|
-
.stream-markdown [data-stream-markdown='dropdown-overlay'] {
|
|
82
|
-
padding: 0.25rem;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
86
|
.stream-markdown [data-stream-markdown='error-component'] {
|
|
86
87
|
display: inline-block;
|
|
87
88
|
color: var(--muted-foreground);
|
|
@@ -144,15 +145,6 @@
|
|
|
144
145
|
flex-shrink: 0;
|
|
145
146
|
padding-inline: 1rem;
|
|
146
147
|
padding-block: 0.5rem;
|
|
147
|
-
background-color: color-mix(in oklab, var(--muted) 80%, transparent);
|
|
148
|
-
color: var(--muted-foreground);
|
|
149
|
-
border-bottom: 1px solid var(--border);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.stream-markdown [data-stream-markdown='modal-actions'] {
|
|
153
|
-
display: flex;
|
|
154
|
-
align-items: center;
|
|
155
|
-
gap: 0.5rem;
|
|
156
148
|
}
|
|
157
149
|
|
|
158
150
|
.stream-markdown [data-stream-markdown='modal-body'] {
|
|
@@ -176,17 +168,6 @@
|
|
|
176
168
|
transform: translateX(-50%);
|
|
177
169
|
}
|
|
178
170
|
|
|
179
|
-
.stream-markdown .typewriter-enter-from {
|
|
180
|
-
opacity: 0;
|
|
181
|
-
}
|
|
182
|
-
.stream-markdown .typewriter-enter-active {
|
|
183
|
-
transition: opacity var(--typewriter-transition-duration) ease-out;
|
|
184
|
-
will-change: opacity;
|
|
185
|
-
}
|
|
186
|
-
.stream-markdown .typewriter-enter-to {
|
|
187
|
-
opacity: 1;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
171
|
.stream-markdown [data-stream-markdown='segmented'] {
|
|
191
172
|
display: flex;
|
|
192
173
|
align-items: center;
|
|
@@ -247,11 +228,6 @@
|
|
|
247
228
|
line-height: 1.25rem;
|
|
248
229
|
}
|
|
249
230
|
|
|
250
|
-
.stream-markdown [data-stream-markdown='tooltip-overlay'] {
|
|
251
|
-
padding-block: 0.25rem;
|
|
252
|
-
padding-inline: 0.5rem;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
231
|
.stream-markdown [data-stream-markdown='zoom-container'] {
|
|
256
232
|
height: 100%;
|
|
257
233
|
position: relative;
|
|
@@ -315,12 +291,6 @@
|
|
|
315
291
|
color: var(--muted-foreground);
|
|
316
292
|
}
|
|
317
293
|
|
|
318
|
-
@media (max-width: 1024px) {
|
|
319
|
-
.stream-markdown [data-stream-markdown='code-block-header'] {
|
|
320
|
-
padding-inline: 0.75rem;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
|
|
324
294
|
.stream-markdown [data-stream-markdown='code-block-content'] {
|
|
325
295
|
overflow: auto;
|
|
326
296
|
}
|
|
@@ -328,11 +298,13 @@
|
|
|
328
298
|
.stream-markdown [data-stream-markdown='code-block-header'] > :first-child {
|
|
329
299
|
flex: 1;
|
|
330
300
|
}
|
|
301
|
+
|
|
331
302
|
.stream-markdown [data-stream-markdown='code-block-header'] > :last-child {
|
|
332
303
|
flex: 1;
|
|
333
304
|
display: flex;
|
|
334
305
|
justify-content: flex-end;
|
|
335
306
|
}
|
|
307
|
+
|
|
336
308
|
.stream-markdown [data-stream-markdown='code-block-header'] > :nth-child(2) {
|
|
337
309
|
position: absolute;
|
|
338
310
|
left: 50%;
|
|
@@ -430,6 +402,15 @@
|
|
|
430
402
|
line-height: 1.25rem;
|
|
431
403
|
}
|
|
432
404
|
|
|
405
|
+
.stream-markdown [data-stream-markdown='image'] {
|
|
406
|
+
display: block;
|
|
407
|
+
height: auto;
|
|
408
|
+
max-width: 100%;
|
|
409
|
+
border-radius: 0.5rem;
|
|
410
|
+
object-fit: contain;
|
|
411
|
+
cursor: pointer;
|
|
412
|
+
}
|
|
413
|
+
|
|
433
414
|
.stream-markdown [data-stream-markdown='image-figure'] {
|
|
434
415
|
display: inline-block;
|
|
435
416
|
}
|
|
@@ -439,14 +420,6 @@
|
|
|
439
420
|
text-align: center;
|
|
440
421
|
}
|
|
441
422
|
|
|
442
|
-
.stream-markdown [data-stream-markdown='image'] {
|
|
443
|
-
display: block;
|
|
444
|
-
max-width: 100%;
|
|
445
|
-
height: auto;
|
|
446
|
-
object-fit: contain;
|
|
447
|
-
border-radius: 0.5rem;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
423
|
.stream-markdown [data-stream-markdown='image-caption'] {
|
|
451
424
|
text-align: center;
|
|
452
425
|
font-size: 0.875rem;
|
|
@@ -455,12 +428,13 @@
|
|
|
455
428
|
}
|
|
456
429
|
|
|
457
430
|
.stream-markdown [data-stream-markdown='image-mask'] {
|
|
458
|
-
|
|
431
|
+
opacity: 0;
|
|
459
432
|
position: absolute;
|
|
460
433
|
inset: 0;
|
|
461
434
|
border-radius: 0.5rem;
|
|
462
435
|
background-color: rgb(0 0 0 / 0.1);
|
|
463
436
|
pointer-events: none;
|
|
437
|
+
transition: opacity var(--default-transition-duration) ease;
|
|
464
438
|
}
|
|
465
439
|
|
|
466
440
|
.stream-markdown [data-stream-markdown='image-download-button'] {
|
|
@@ -617,31 +591,62 @@
|
|
|
617
591
|
padding: 1rem;
|
|
618
592
|
}
|
|
619
593
|
|
|
594
|
+
.stream-markdown [data-stream-markdown='footnote-reference'] {
|
|
595
|
+
color: var(--primary);
|
|
596
|
+
cursor: pointer;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
.stream-markdown [data-stream-markdown='footnote-definition'] {
|
|
600
|
+
color: var(--muted-foreground);
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.stream-markdown [data-stream-markdown='footnote-definition'] [data-stream-markdown='footnote-definition-label'] {
|
|
604
|
+
display: inline-block;
|
|
605
|
+
vertical-align: middle;
|
|
606
|
+
margin-right: 0.25rem;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
.stream-markdown [data-stream-markdown='footnote-definition'] [data-stream-markdown='footnote-definition-button'] {
|
|
610
|
+
display: inline-block;
|
|
611
|
+
vertical-align: middle;
|
|
612
|
+
margin-left: 0.25rem;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
.stream-markdown [data-stream-markdown='footnote-definition'] p {
|
|
616
|
+
display: inline;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
@media (max-width: 1024px) {
|
|
620
|
+
.stream-markdown [data-stream-markdown='code-block-header'] {
|
|
621
|
+
padding-inline: 0.75rem;
|
|
622
|
+
}
|
|
623
|
+
.stream-markdown [data-stream-markdown='zoom-controls'] {
|
|
624
|
+
gap: 0;
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.stream-markdown .typewriter-enter-from {
|
|
629
|
+
opacity: 0;
|
|
630
|
+
}
|
|
631
|
+
.stream-markdown .typewriter-enter-active {
|
|
632
|
+
transition: opacity var(--typewriter-transition-duration) ease-out;
|
|
633
|
+
will-change: opacity;
|
|
634
|
+
}
|
|
635
|
+
.stream-markdown .typewriter-enter-to {
|
|
636
|
+
opacity: 1;
|
|
637
|
+
}
|
|
638
|
+
|
|
620
639
|
.stream-markdown .modal-enter-from,
|
|
621
640
|
.stream-markdown .modal-leave-to {
|
|
622
641
|
opacity: 0;
|
|
642
|
+
transform: scale(0.95);
|
|
623
643
|
}
|
|
624
644
|
.stream-markdown .modal-enter-active,
|
|
625
645
|
.stream-markdown .modal-leave-active {
|
|
626
|
-
transition: opacity var(--default-transition-duration) ease;
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
.stream-markdown .img-switch-enter-active,
|
|
630
|
-
.stream-markdown .img-switch-leave-active {
|
|
631
646
|
transition:
|
|
632
647
|
opacity var(--default-transition-duration) ease,
|
|
633
648
|
transform var(--default-transition-duration) ease;
|
|
634
649
|
}
|
|
635
|
-
.stream-markdown .img-switch-enter-from,
|
|
636
|
-
.stream-markdown .img-switch-leave-to {
|
|
637
|
-
opacity: 0;
|
|
638
|
-
transform: translateY(6px);
|
|
639
|
-
}
|
|
640
|
-
.stream-markdown .img-switch-enter-to,
|
|
641
|
-
.stream-markdown .img-switch-leave-from {
|
|
642
|
-
opacity: 1;
|
|
643
|
-
transform: translateY(0);
|
|
644
|
-
}
|
|
645
650
|
|
|
646
651
|
@keyframes spin {
|
|
647
652
|
from {
|