vue-stream-markdown 0.1.4 → 0.1.5
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-C5s0Sn8o.js +25 -0
- package/dist/{blockquote-DdEg2gww.js → blockquote-bkADuiGm.js} +1 -9
- package/dist/{button-jFTF378X.js → button-BQhuT7wh.js} +2 -3
- package/dist/button-JYC8d-B-.js +5 -0
- package/dist/{code-BxWvKFxG.js → code-DF8PTNol.js} +10 -18
- package/dist/code-block-BhMDz2ZL.js +9 -0
- package/dist/{code-block-uZcUI59D.js → code-block-Dm2wl0cb.js} +60 -65
- package/dist/{composables-Cx0nvyHl.js → composables-yny5gJo3.js} +495 -227
- package/dist/{delete-BdWzKJCy.js → delete-D17YBeI-.js} +1 -9
- package/dist/dropdown-Y5_Z4a_u.js +5 -0
- package/dist/{emphasis-CTuGt1Ok.js → emphasis-B-2R_0Q5.js} +1 -9
- package/dist/{en-US-Bfc50l3I.js → en-US-Kw2LYAMk.js} +7 -1
- package/dist/{error-component-Bhl770lu.js → error-component-Bb0gIZsx.js} +1 -1
- package/dist/error-component-DEIWb6kB.js +4 -0
- package/dist/flip-horizontal-BFWjqDbQ.js +25 -0
- package/dist/{heading-2vpQQtTH.js → heading-DyJIwNrN.js} +1 -9
- package/dist/{html-DL0PcUXX.js → html-DXNqMvt_.js} +0 -8
- package/dist/{image-BDtPwitR.js → image-BPhFn1xp.js} +38 -75
- package/dist/image-DXBD47sF.js +8 -0
- package/dist/image-DvOGBhi-.js +327 -0
- package/dist/index.css +44 -64
- package/dist/index.d.ts +115 -70
- package/dist/index.js +42 -61
- package/dist/{inline-code-CBoqhfz7.js → inline-code-C44UJ2TH.js} +0 -8
- package/dist/{inline-math-CAqboT7h.js → inline-math-wO1rMt9T.js} +2 -10
- package/dist/{link-C8BSlPhZ.js → link-sGo7CEll.js} +3 -11
- package/dist/{list-BCiFKGaz.js → list-C0I1ysSI.js} +1 -9
- package/dist/{list-item-p-OLUR_9.js → list-item-BoC2wKBL.js} +1 -9
- package/dist/{math-CT1TB2pK.js → math-BlqtUf2r.js} +2 -10
- package/dist/{mermaid-CYrA8rCl.js → mermaid-Ka1jnXrR.js} +6 -14
- package/dist/modal-Duhc-vVa.js +4 -0
- package/dist/modal-Rc_RoeYA.js +94 -0
- package/dist/node-list-C1je2nLd.js +3 -0
- package/dist/{node-list-CGr_EVtn.js → node-list-YhpHXdM_.js} +0 -16
- package/dist/{paragraph-DYjqr_Sa.js → paragraph-BN-4-Dn7.js} +1 -9
- package/dist/previewers-D0VVcdjL.js +10 -0
- package/dist/rotate-ccw-square-C2KVFUF3.js +24 -0
- package/dist/{segmented-DBW9ignu.js → segmented-CaC54iz_.js} +1 -1
- package/dist/segmented-XdoLnuuq.js +6 -0
- package/dist/{shiki-bQYWLdW3.js → shiki-sJNZTn1K.js} +4 -12
- package/dist/spin-wM2KE8mO.js +3 -0
- package/dist/{strong-CvOjLZiq.js → strong-NdAS3VjP.js} +1 -9
- package/dist/{table-l_3z210v.js → table-CWX5B2i1.js} +11 -16
- package/dist/table-R9gmCXm_.js +3 -0
- package/dist/{text-DuONUqRA.js → text-DpleLvNh.js} +0 -8
- package/dist/{thematic-break-CcNPEI9Y.js → thematic-break-D5GvzU5S.js} +0 -8
- package/dist/tooltip-BJDs-A8d.js +4 -0
- package/dist/tooltip-Bgbzbk4Q.js +68 -0
- package/dist/{vanilla-CFWVwBvD.js → vanilla-BTOVqKl7.js} +1 -1
- package/dist/vanilla-DA5bwIkr.js +4 -0
- package/dist/{yaml-DJHrmzSe.js → yaml-y0snrPRx.js} +1 -9
- package/dist/{zh-CN-CL1XGe0H.js → zh-CN-Dfow4Yn2.js} +7 -1
- package/dist/{zoom-container-gjQ0EMyk.js → zoom-container-B1qbA-7z.js} +52 -23
- package/dist/zoom-container-KztuE4ri.js +6 -0
- 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-Mip1mspI.js} +0 -0
- /package/dist/{angular-component-Cc_FANXU.js → angular-component-Cq5UbX7R.js} +0 -0
- /package/dist/{apache-COYnc6xR.js → apache-BSq7fX32.js} +0 -0
- /package/dist/{asciidoc-BabXBDAL.js → asciidoc-DS-PMOLv.js} +0 -0
- /package/dist/{assembly-CDqKhexW.js → assembly-BPatlOM7.js} +0 -0
- /package/dist/{astro-C9kftzFG.js → astro-CSD_ZjXp.js} +0 -0
- /package/dist/{bash-Ce4pNIkV.js → bash-RITislE1.js} +0 -0
- /package/dist/{batch-CHQBRjFL.js → batch-DWPShYhN.js} +0 -0
- /package/dist/{bicep-8jxWtuBF.js → bicep-C6BEHfP6.js} +0 -0
- /package/dist/{c-FBUef746.js → c-DNo3tsNy.js} +0 -0
- /package/dist/{check-C4xOk8um.js → check-BfpxIITS.js} +0 -0
- /package/dist/{chevron-down-cnOJ4h1g.js → chevron-down-LeNeemjn.js} +0 -0
- /package/dist/{circle-alert-CLX-h5rZ.js → circle-alert-BjDuIzgc.js} +0 -0
- /package/dist/{clojure-BulUroSy.js → clojure-C1DEYHW0.js} +0 -0
- /package/dist/{cmake-CW3vz1Mo.js → cmake-B69mdXcH.js} +0 -0
- /package/dist/{cobol-CIn3oFju.js → cobol-qmL-zIWi.js} +0 -0
- /package/dist/{code-D8LSp8rK.js → code-D9CiymEK.js} +0 -0
- /package/dist/{codeowners-CJggXF_b.js → codeowners-Crklt5nF.js} +0 -0
- /package/dist/{coffeescript-CBrVvzGY.js → coffeescript-k3huSp23.js} +0 -0
- /package/dist/{copy-Cabve0xf.js → copy-C4580J93.js} +0 -0
- /package/dist/{cpp-BTKeuyd-.js → cpp-Cn3MB35e.js} +0 -0
- /package/dist/{crystal-DyIYvZbm.js → crystal-D5aGETSx.js} +0 -0
- /package/dist/{csharp-NqZ1vyF9.js → csharp-CgkTkbPx.js} +0 -0
- /package/dist/{css-BpR5Lajb.js → css-DRH4n_IV.js} +0 -0
- /package/dist/{csv-eCMFnKKK.js → csv-D5nNTIzO.js} +0 -0
- /package/dist/{cue-TY97dGOQ.js → cue-B5mC88-N.js} +0 -0
- /package/dist/{d-NftUsdTd.js → d-BdQRMgma.js} +0 -0
- /package/dist/{dart-DJpwZZbk.js → dart-BGnfn0NN.js} +0 -0
- /package/dist/{database-aZwE71Px.js → database-Ca1VGX7u.js} +0 -0
- /package/dist/{diff-CYRzypaU.js → diff-DVaTsnqu.js} +0 -0
- /package/dist/{docker-CxHBuukH.js → docker-E47qYlmL.js} +0 -0
- /package/dist/{download-Bnn7rtYw.js → download-DytrK56a.js} +0 -0
- /package/dist/{elixir-BKSxVc1h.js → elixir-C-jqqu6q.js} +0 -0
- /package/dist/{elm-DScuAf3X.js → elm-CmeHvaWl.js} +0 -0
- /package/dist/{env-CDAKsodl.js → env-Ck1BHoxR.js} +0 -0
- /package/dist/{erlang-D2M1ZL3m.js → erlang-CIP8kpGJ.js} +0 -0
- /package/dist/{eye-CdeX8PhP.js → eye-TaEwQS2Z.js} +0 -0
- /package/dist/{fortran-CORyQ0wt.js → fortran-DJVP2s7V.js} +0 -0
- /package/dist/{fsharp-BJz_Jgpl.js → fsharp-Bp6mUcG0.js} +0 -0
- /package/dist/{git-DgrlTr1E.js → git-BDcqJ1Gp.js} +0 -0
- /package/dist/{gleam-t_xad9Kw.js → gleam-JLiZVlev.js} +0 -0
- /package/dist/{go-Cvlh1xtL.js → go-ClcCiS7e.js} +0 -0
- /package/dist/{graphql-ApIm0mDD.js → graphql-D2RDo-DF.js} +0 -0
- /package/dist/{groovy-CaLnK8PV.js → groovy-DLZBw8xE.js} +0 -0
- /package/dist/{haml-MwijEO_6.js → haml-Da74jRwZ.js} +0 -0
- /package/dist/{handlebars-CKdUPI9h.js → handlebars-CNgS57Sz.js} +0 -0
- /package/dist/{haskell-NPOXEnck.js → haskell-DCvfD6VB.js} +0 -0
- /package/dist/{haxe-DyKBMsDE.js → haxe-CHVK1TId.js} +0 -0
- /package/dist/{html-CMgES1dE.js → html-Du4235Z-.js} +0 -0
- /package/dist/{http-B9FFNmUr.js → http-B8VAFeQ5.js} +0 -0
- /package/dist/{image-CMZAakWu.js → image-D8MZj4W5.js} +0 -0
- /package/dist/{java-iU-L9wJz.js → java-CoSdnK1N.js} +0 -0
- /package/dist/{javascript-DtnWdTFC.js → javascript-BCDeVll0.js} +0 -0
- /package/dist/{jinja-CoWszo_D.js → jinja-DYbiqZy0.js} +0 -0
- /package/dist/{json-C80qKCnh.js → json-CdzCyWJA.js} +0 -0
- /package/dist/{julia-DG2BCBLx.js → julia-pswJGtpP.js} +0 -0
- /package/dist/{kdl-7twRfIlJ.js → kdl-M8rfQ85l.js} +0 -0
- /package/dist/{kotlin-BjrOgP7R.js → kotlin-CfCV33oB.js} +0 -0
- /package/dist/{latex-DIQfUvG8.js → latex-DK8DFhTm.js} +0 -0
- /package/dist/{less-BJ1yEAWt.js → less-BFnNZiIs.js} +0 -0
- /package/dist/{link-DeV4CQOB.js → link-C7eU_yi-.js} +0 -0
- /package/dist/{liquid-BqKFZ1wQ.js → liquid-C8h46DoX.js} +0 -0
- /package/dist/{lisp-oekhB2ti.js → lisp-C3FbGuD1.js} +0 -0
- /package/dist/{log-D1XEqR9q.js → log-D-O3FXf2.js} +0 -0
- /package/dist/{lua-C5Q97-1D.js → lua-BC_aR1_i.js} +0 -0
- /package/dist/{luau-BT8KwqZ2.js → luau-DFUOrNN7.js} +0 -0
- /package/dist/{makefile-B4a0ciG4.js → makefile-Ck67veVV.js} +0 -0
- /package/dist/{markdown-DvNyKsiJ.js → markdown-BX13X3kd.js} +0 -0
- /package/dist/{marko-BzsIf6bg.js → marko-CQE8YTCc.js} +0 -0
- /package/dist/{matlab-cMBkmDhQ.js → matlab-Bd9O2Ml3.js} +0 -0
- /package/dist/{maximize-4PIqBONS.js → maximize-CDZ9rnYF.js} +0 -0
- /package/dist/{mermaid-8JIH2gkQ.js → mermaid-Dv-Pr0W-.js} +0 -0
- /package/dist/{minimize-BJ8htyDF.js → minimize-B9ER7p2X.js} +0 -0
- /package/dist/{nextflow-DNmqU1xg.js → nextflow-D3lDq1Yi.js} +0 -0
- /package/dist/{nginx-DDfYF_rj.js → nginx-CgsqCL4l.js} +0 -0
- /package/dist/{nim-D9xEmy4k.js → nim-BJdSu3c6.js} +0 -0
- /package/dist/{nix-BV1Deshw.js → nix-B7K_D6CN.js} +0 -0
- /package/dist/{ocaml-BkFn4LL3.js → ocaml-gYS1Y45s.js} +0 -0
- /package/dist/{perl-BytUHDE7.js → perl-DXFhFWhI.js} +0 -0
- /package/dist/{php-BImJJtNM.js → php-We35bF4E.js} +0 -0
- /package/dist/{postcss-CrZ9_0sT.js → postcss-BWovY_YV.js} +0 -0
- /package/dist/{powershell-DYSGu7TM.js → powershell-C6teiBsq.js} +0 -0
- /package/dist/{prisma-BhRvcOFY.js → prisma-UyJEg0_X.js} +0 -0
- /package/dist/{prolog-DuaCKek_.js → prolog-YZsPgdnw.js} +0 -0
- /package/dist/{properties-BbIJwuP-.js → properties-DaPbL0e2.js} +0 -0
- /package/dist/{proto-CE0aVW11.js → proto-1LIwu2O1.js} +0 -0
- /package/dist/{pug-B1-IC-Tc.js → pug-CzkUK-Ec.js} +0 -0
- /package/dist/{puppet-8nYquiMG.js → puppet-CNhB1MHb.js} +0 -0
- /package/dist/{python-DhRyfBrD.js → python-B_hgEobv.js} +0 -0
- /package/dist/{r-Cjje17IA.js → r-CVeKYmPK.js} +0 -0
- /package/dist/{racket-Dx0gMnpg.js → racket-D5UfvXuw.js} +0 -0
- /package/dist/{razor-DPht_bdD.js → razor-RIKaANTN.js} +0 -0
- /package/dist/{ruby-B8RxtCzI.js → ruby-C8wV0pMO.js} +0 -0
- /package/dist/{rust-Cjtli6yf.js → rust-75Gei1mP.js} +0 -0
- /package/dist/{sass-Dv3DMzjs.js → sass-Cq68xmQ4.js} +0 -0
- /package/dist/{scala-B7bZGKXq.js → scala-C_E5rjSc.js} +0 -0
- /package/dist/{scheme-B2PsEdVN.js → scheme-Bm-q-nLL.js} +0 -0
- /package/dist/{shader-BZzu3zGr.js → shader-DPaRkMCs.js} +0 -0
- /package/dist/{shiki-token-renderer-D164wC7Y.js → shiki-token-renderer-CLmUjKa3.js} +0 -0
- /package/dist/{solidity-CLieFYpL.js → solidity-DvHG_0CD.js} +0 -0
- /package/dist/{spin-Ds5W7qC_.js → spin--f5jNjBn.js} +0 -0
- /package/dist/{stata-C0yUiO47.js → stata-DoVloJLm.js} +0 -0
- /package/dist/{svelte-rtF4yNGL.js → svelte-tlbA11de.js} +0 -0
- /package/dist/{swift-CzvYoIM0.js → swift-BZn5eRnK.js} +0 -0
- /package/dist/{table-4ec9FVB_.js → table-CaUMjs4M.js} +0 -0
- /package/dist/{terraform-CD_BZGb-.js → terraform-c5-k7yB1.js} +0 -0
- /package/dist/{text-D1-vbZ7l.js → text-DPCGWvDK.js} +0 -0
- /package/dist/{toml-C6jUF0Xd.js → toml-DdLGBe1A.js} +0 -0
- /package/dist/{twig-C4dfP84J.js → twig-D_jzZxh6.js} +0 -0
- /package/dist/{typescript-Bk-pp-cK.js → typescript-B95hq2ns.js} +0 -0
- /package/dist/{typst-DPCpaVSH.js → typst-CSAEQ4yK.js} +0 -0
- /package/dist/{v-nRGMJ2Ki.js → v-BAhebuOB.js} +0 -0
- /package/dist/{vala-B78bKcY0.js → vala-RAu83-lp.js} +0 -0
- /package/dist/{verilog-CRpkl76S.js → verilog-BgmTn52U.js} +0 -0
- /package/dist/{vim-DpKnut7b.js → vim-c8oTCLkH.js} +0 -0
- /package/dist/{vue-D5eadhjo.js → vue-TGT6HTBA.js} +0 -0
- /package/dist/{xml-Dvx5F-hl.js → xml-C1HDr874.js} +0 -0
- /package/dist/{yaml-n1S8nAOh.js → yaml-BO7FjFQZ.js} +0 -0
- /package/dist/{zig-R-iFzxfW.js → zig-qANBp1SU.js} +0 -0
- /package/dist/{zoomIn-CEukuh3x.js → zoomIn-iVMAUxIz.js} +0 -0
- /package/dist/{zoomOut-qlzQyQli.js → zoomOut-Cxq1_dIQ.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as node_list_default } from "./node-list-
|
|
1
|
+
import { t as node_list_default } from "./node-list-YhpHXdM_.js";
|
|
2
2
|
import { createElementBlock, createVNode, defineComponent, mergeProps, openBlock } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/renderers/delete.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -18,18 +18,10 @@ var delete_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineC
|
|
|
18
18
|
type: Object,
|
|
19
19
|
required: true
|
|
20
20
|
},
|
|
21
|
-
mediumZoom: {
|
|
22
|
-
type: Object,
|
|
23
|
-
required: true
|
|
24
|
-
},
|
|
25
21
|
indexKey: {
|
|
26
22
|
type: [Number, String],
|
|
27
23
|
required: true
|
|
28
24
|
},
|
|
29
|
-
getContainer: {
|
|
30
|
-
type: Function,
|
|
31
|
-
required: true
|
|
32
|
-
},
|
|
33
25
|
controls: {
|
|
34
26
|
type: [Boolean, Object],
|
|
35
27
|
required: false
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as node_list_default } from "./node-list-
|
|
1
|
+
import { t as node_list_default } from "./node-list-YhpHXdM_.js";
|
|
2
2
|
import { createElementBlock, createVNode, defineComponent, mergeProps, openBlock } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/renderers/emphasis.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -18,18 +18,10 @@ var emphasis_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defin
|
|
|
18
18
|
type: Object,
|
|
19
19
|
required: true
|
|
20
20
|
},
|
|
21
|
-
mediumZoom: {
|
|
22
|
-
type: Object,
|
|
23
|
-
required: true
|
|
24
|
-
},
|
|
25
21
|
indexKey: {
|
|
26
22
|
type: [Number, String],
|
|
27
23
|
required: true
|
|
28
24
|
},
|
|
29
|
-
getContainer: {
|
|
30
|
-
type: Function,
|
|
31
|
-
required: true
|
|
32
|
-
},
|
|
33
25
|
controls: {
|
|
34
26
|
type: [Boolean, Object],
|
|
35
27
|
required: false
|
|
@@ -9,7 +9,13 @@ var button = {
|
|
|
9
9
|
"copy": "Copy",
|
|
10
10
|
"download": "Download",
|
|
11
11
|
"minimize": "Minimize",
|
|
12
|
-
"maximize": "Maximize"
|
|
12
|
+
"maximize": "Maximize",
|
|
13
|
+
"flipY": "Flip Y",
|
|
14
|
+
"flipX": "Flip X",
|
|
15
|
+
"rotateLeft": "Rotate Left",
|
|
16
|
+
"rotateRight": "Rotate Right",
|
|
17
|
+
"previous": "Previous",
|
|
18
|
+
"next": "Next"
|
|
13
19
|
};
|
|
14
20
|
var error = {
|
|
15
21
|
"vanilla": "Error",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as useContext, u as useI18n } from "./composables-yny5gJo3.js";
|
|
2
2
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, openBlock, renderSlot, resolveDynamicComponent, toDisplayString } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/error-component.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { createElementBlock, createElementVNode, markRaw, openBlock } from "vue";
|
|
2
|
+
|
|
3
|
+
//#region ~icons/lucide/flip-horizontal
|
|
4
|
+
const _hoisted_1 = {
|
|
5
|
+
viewBox: "0 0 24 24",
|
|
6
|
+
width: "1.2em",
|
|
7
|
+
height: "1.2em"
|
|
8
|
+
};
|
|
9
|
+
function render(_ctx, _cache) {
|
|
10
|
+
return openBlock(), createElementBlock("svg", _hoisted_1, [..._cache[0] || (_cache[0] = [createElementVNode("path", {
|
|
11
|
+
fill: "none",
|
|
12
|
+
stroke: "currentColor",
|
|
13
|
+
"stroke-linecap": "round",
|
|
14
|
+
"stroke-linejoin": "round",
|
|
15
|
+
"stroke-width": "2",
|
|
16
|
+
d: "M8 3H5a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h3m8-18h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-3m-4-1v2m0-8v2m0-8v2m0-8v2"
|
|
17
|
+
}, null, -1)])]);
|
|
18
|
+
}
|
|
19
|
+
var flip_horizontal_default = markRaw({
|
|
20
|
+
name: "lucide-flip-horizontal",
|
|
21
|
+
render
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { flip_horizontal_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as node_list_default } from "./node-list-
|
|
1
|
+
import { t as node_list_default } from "./node-list-YhpHXdM_.js";
|
|
2
2
|
import { computed, createBlock, createVNode, defineComponent, mergeProps, openBlock, resolveDynamicComponent, withCtx } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/renderers/heading.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -17,18 +17,10 @@ var heading_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
17
17
|
type: Object,
|
|
18
18
|
required: true
|
|
19
19
|
},
|
|
20
|
-
mediumZoom: {
|
|
21
|
-
type: Object,
|
|
22
|
-
required: true
|
|
23
|
-
},
|
|
24
20
|
indexKey: {
|
|
25
21
|
type: [Number, String],
|
|
26
22
|
required: true
|
|
27
23
|
},
|
|
28
|
-
getContainer: {
|
|
29
|
-
type: Function,
|
|
30
|
-
required: true
|
|
31
|
-
},
|
|
32
24
|
controls: {
|
|
33
25
|
type: [Boolean, Object],
|
|
34
26
|
required: false
|
|
@@ -17,18 +17,10 @@ var html_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
17
17
|
type: Object,
|
|
18
18
|
required: true
|
|
19
19
|
},
|
|
20
|
-
mediumZoom: {
|
|
21
|
-
type: Object,
|
|
22
|
-
required: true
|
|
23
|
-
},
|
|
24
20
|
indexKey: {
|
|
25
21
|
type: [Number, String],
|
|
26
22
|
required: true
|
|
27
23
|
},
|
|
28
|
-
getContainer: {
|
|
29
|
-
type: Function,
|
|
30
|
-
required: true
|
|
31
|
-
},
|
|
32
24
|
controls: {
|
|
33
25
|
type: [Boolean, Object],
|
|
34
26
|
required: false
|
|
@@ -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, V as useControls, g as useHardenSanitizers, k as saveImage, u as useI18n } from "./composables-yny5gJo3.js";
|
|
2
|
+
import "./tooltip-Bgbzbk4Q.js";
|
|
3
|
+
import { t as button_default } from "./button-BQhuT7wh.js";
|
|
4
|
+
import "./modal-Rc_RoeYA.js";
|
|
5
|
+
import { t as error_component_default } from "./error-component-Bb0gIZsx.js";
|
|
6
|
+
import { t as image_default$1 } from "./image-DvOGBhi-.js";
|
|
7
|
+
import "./zoom-container-B1qbA-7z.js";
|
|
8
|
+
import { t as spin_default } from "./spin--f5jNjBn.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,18 +29,10 @@ var image_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
31
29
|
type: Object,
|
|
32
30
|
required: true
|
|
33
31
|
},
|
|
34
|
-
mediumZoom: {
|
|
35
|
-
type: Object,
|
|
36
|
-
required: true
|
|
37
|
-
},
|
|
38
32
|
indexKey: {
|
|
39
33
|
type: [Number, String],
|
|
40
34
|
required: true
|
|
41
35
|
},
|
|
42
|
-
getContainer: {
|
|
43
|
-
type: Function,
|
|
44
|
-
required: true
|
|
45
|
-
},
|
|
46
36
|
controls: {
|
|
47
37
|
type: [Boolean, Object],
|
|
48
38
|
required: false
|
|
@@ -82,18 +72,17 @@ 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) ?? "";
|
|
@@ -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,29 @@ 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
|
-
onError: handleError
|
|
201
|
-
}, null, 44, _hoisted_2)) : unref(isHardenUrl) || loadError.value ? (openBlock(), createBlock(resolveDynamicComponent(Error.value), mergeProps({
|
|
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
|
+
onLoad: handleLoaded,
|
|
159
|
+
onError: handleError
|
|
160
|
+
}, null, 8, [
|
|
161
|
+
"src",
|
|
162
|
+
"alt",
|
|
163
|
+
"title",
|
|
164
|
+
"preview",
|
|
165
|
+
"controls"
|
|
166
|
+
])) : unref(isHardenUrl) || loadError.value ? (openBlock(), createBlock(resolveDynamicComponent(Error.value), mergeProps({
|
|
167
|
+
key: 3,
|
|
168
|
+
variant: unref(isHardenUrl) ? "harden-image" : "image"
|
|
169
|
+
}, props), {
|
|
170
|
+
default: withCtx(() => [createTextVNode(toDisplayString(title.value), 1)]),
|
|
208
171
|
_: 1
|
|
209
|
-
})
|
|
210
|
-
]), showCaption.value && title.value ? (openBlock(), createElementBlock("figcaption",
|
|
172
|
+
}, 16, ["variant"])) : createCommentVNode("v-if", true)
|
|
173
|
+
]), showCaption.value && title.value ? (openBlock(), createElementBlock("figcaption", _hoisted_2, toDisplayString(title.value), 1)) : createCommentVNode("v-if", true)], 36);
|
|
211
174
|
};
|
|
212
175
|
}
|
|
213
176
|
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./composables-yny5gJo3.js";
|
|
2
|
+
import "./tooltip-Bgbzbk4Q.js";
|
|
3
|
+
import "./button-BQhuT7wh.js";
|
|
4
|
+
import "./modal-Rc_RoeYA.js";
|
|
5
|
+
import { t as image_default } from "./image-DvOGBhi-.js";
|
|
6
|
+
import "./zoom-container-B1qbA-7z.js";
|
|
7
|
+
|
|
8
|
+
export { image_default as default };
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
import { H as useContext, V as useControls, a as useMediumZoom, k as saveImage, u as useI18n } from "./composables-yny5gJo3.js";
|
|
2
|
+
import { t as button_default } from "./button-BQhuT7wh.js";
|
|
3
|
+
import { t as modal_default } from "./modal-Rc_RoeYA.js";
|
|
4
|
+
import { t as zoom_container_default } from "./zoom-container-B1qbA-7z.js";
|
|
5
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeStyle, openBlock, ref, toRefs, unref, watch, withCtx } from "vue";
|
|
6
|
+
import { useCycleList } from "@vueuse/core";
|
|
7
|
+
|
|
8
|
+
//#region node_modules/.pnpm/treechop@0.1.2/node_modules/treechop/dist/index.js
|
|
9
|
+
const DEFAULT_CHILDREN_KEY = "children";
|
|
10
|
+
function createTreeUtils(options = {}) {
|
|
11
|
+
const { childrenKey = DEFAULT_CHILDREN_KEY } = options;
|
|
12
|
+
return {
|
|
13
|
+
childrenKey,
|
|
14
|
+
getChildrenKey(node, meta) {
|
|
15
|
+
return typeof this.childrenKey === "function" ? this.childrenKey(node, meta) : this.childrenKey;
|
|
16
|
+
},
|
|
17
|
+
getChildren(node, meta) {
|
|
18
|
+
return node[this.getChildrenKey(node, meta)] || [];
|
|
19
|
+
},
|
|
20
|
+
hasChildren(node, meta) {
|
|
21
|
+
const children = this.getChildren(node, meta);
|
|
22
|
+
return Array.isArray(children) && children.length > 0;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function preOrderTraverse(tree, callback, utils) {
|
|
27
|
+
const result = [];
|
|
28
|
+
const traverse = (nodes, parents = [], depth = 0) => {
|
|
29
|
+
nodes.forEach((node, index) => {
|
|
30
|
+
const meta = {
|
|
31
|
+
depth,
|
|
32
|
+
index,
|
|
33
|
+
parents
|
|
34
|
+
};
|
|
35
|
+
result.push(callback(node, meta));
|
|
36
|
+
if (utils.hasChildren(node, meta)) traverse(utils.getChildren(node, meta), [...parents, node], depth + 1);
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
traverse(tree);
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
function postOrderTraverse(tree, callback, utils) {
|
|
43
|
+
const result = [];
|
|
44
|
+
const traverse = (nodes, parents = [], depth = 0) => {
|
|
45
|
+
nodes.forEach((node, index) => {
|
|
46
|
+
const meta = {
|
|
47
|
+
depth,
|
|
48
|
+
index,
|
|
49
|
+
parents
|
|
50
|
+
};
|
|
51
|
+
if (utils.hasChildren(node, meta)) traverse(utils.getChildren(node, meta), [...parents, node], depth + 1);
|
|
52
|
+
result.push(callback(node, meta));
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
traverse(tree);
|
|
56
|
+
return result;
|
|
57
|
+
}
|
|
58
|
+
function breadthTraverse(tree, callback, utils) {
|
|
59
|
+
const result = [];
|
|
60
|
+
const queue = tree.map((node, index) => [
|
|
61
|
+
node,
|
|
62
|
+
index,
|
|
63
|
+
[],
|
|
64
|
+
0
|
|
65
|
+
]);
|
|
66
|
+
while (queue.length) {
|
|
67
|
+
const [node, index, parents, depth] = queue.shift();
|
|
68
|
+
const meta = {
|
|
69
|
+
depth,
|
|
70
|
+
index,
|
|
71
|
+
parents
|
|
72
|
+
};
|
|
73
|
+
result.push(callback(node, meta));
|
|
74
|
+
if (utils.hasChildren(node, meta)) utils.getChildren(node, meta).forEach((child, childIndex) => {
|
|
75
|
+
queue.push([
|
|
76
|
+
child,
|
|
77
|
+
childIndex,
|
|
78
|
+
[...parents, node],
|
|
79
|
+
depth + 1
|
|
80
|
+
]);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
return result;
|
|
84
|
+
}
|
|
85
|
+
function treeFlatFilter(tree, predicate, options = {}) {
|
|
86
|
+
const { strategy = "pre" } = options;
|
|
87
|
+
const utils = createTreeUtils(options);
|
|
88
|
+
const callback = (node, meta) => {
|
|
89
|
+
return predicate(node, meta) ? node : null;
|
|
90
|
+
};
|
|
91
|
+
switch (strategy) {
|
|
92
|
+
case "post": return postOrderTraverse(tree, callback, utils).filter(Boolean);
|
|
93
|
+
case "breadth": return breadthTraverse(tree, callback, utils).filter(Boolean);
|
|
94
|
+
case "pre":
|
|
95
|
+
default: return preOrderTraverse(tree, callback, utils).filter(Boolean);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region src/components/image.vue?vue&type=script&setup=true&lang.ts
|
|
101
|
+
const _hoisted_1 = [
|
|
102
|
+
"src",
|
|
103
|
+
"alt",
|
|
104
|
+
"title"
|
|
105
|
+
];
|
|
106
|
+
const _hoisted_2 = [
|
|
107
|
+
"src",
|
|
108
|
+
"alt",
|
|
109
|
+
"title"
|
|
110
|
+
];
|
|
111
|
+
var image_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
112
|
+
__name: "image",
|
|
113
|
+
props: {
|
|
114
|
+
src: {
|
|
115
|
+
type: String,
|
|
116
|
+
required: false
|
|
117
|
+
},
|
|
118
|
+
alt: {
|
|
119
|
+
type: String,
|
|
120
|
+
required: false
|
|
121
|
+
},
|
|
122
|
+
title: {
|
|
123
|
+
type: String,
|
|
124
|
+
required: false
|
|
125
|
+
},
|
|
126
|
+
preview: {
|
|
127
|
+
type: Boolean,
|
|
128
|
+
required: false,
|
|
129
|
+
default: true
|
|
130
|
+
},
|
|
131
|
+
margin: {
|
|
132
|
+
type: Number,
|
|
133
|
+
required: false,
|
|
134
|
+
default: 16
|
|
135
|
+
},
|
|
136
|
+
controls: {
|
|
137
|
+
type: [Boolean, Object],
|
|
138
|
+
required: false,
|
|
139
|
+
default: true
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
emits: ["load", "error"],
|
|
143
|
+
setup(__props, { emit: __emit }) {
|
|
144
|
+
const props = __props;
|
|
145
|
+
const emits = __emit;
|
|
146
|
+
const { margin, controls } = toRefs(props);
|
|
147
|
+
const { t } = useI18n();
|
|
148
|
+
const { icons, parsedNodes } = useContext();
|
|
149
|
+
const { isControlEnabled, getControlValue } = useControls({ controls });
|
|
150
|
+
const imageNodes = computed(() => treeFlatFilter(parsedNodes.value, (node) => node.type === "image" && !node.loading));
|
|
151
|
+
const imageList = computed(() => [...new Set(imageNodes.value.map((node) => node.url))]);
|
|
152
|
+
const { state: imageSrc, prev, next } = useCycleList(imageList, {
|
|
153
|
+
initialValue: props.src,
|
|
154
|
+
fallbackIndex: 0
|
|
155
|
+
});
|
|
156
|
+
const enableDownload = computed(() => isControlEnabled("image.download"));
|
|
157
|
+
const enableCarousel = computed(() => isControlEnabled("image.carousel"));
|
|
158
|
+
const enableFlip = computed(() => isControlEnabled("image.flip"));
|
|
159
|
+
const enableRotate = computed(() => isControlEnabled("image.rotate"));
|
|
160
|
+
const controlPosition = computed(() => {
|
|
161
|
+
const position = getControlValue("image.controlPosition");
|
|
162
|
+
if (typeof position === "boolean") return "bottom-center";
|
|
163
|
+
return position || "bottom-center";
|
|
164
|
+
});
|
|
165
|
+
const loaded = ref(false);
|
|
166
|
+
const open = ref(false);
|
|
167
|
+
const scaleX = ref(1);
|
|
168
|
+
const scaleY = ref(1);
|
|
169
|
+
const rotate = ref(0);
|
|
170
|
+
const { isAnimating, elementRef, zoomElementRef: _zoomElementRef, elementStyle, zoomIn, zoomOut } = useMediumZoom({
|
|
171
|
+
margin,
|
|
172
|
+
open: () => open.value = true,
|
|
173
|
+
close: () => open.value = false
|
|
174
|
+
});
|
|
175
|
+
const imageStyle = computed(() => ({
|
|
176
|
+
transform: `
|
|
177
|
+
scaleX(${scaleX.value})
|
|
178
|
+
scaleY(${scaleY.value})
|
|
179
|
+
rotate(${rotate.value}deg)
|
|
180
|
+
`,
|
|
181
|
+
transition: "transform 0.3s ease",
|
|
182
|
+
...elementStyle.value
|
|
183
|
+
}));
|
|
184
|
+
function handleLoad(event) {
|
|
185
|
+
loaded.value = true;
|
|
186
|
+
emits("load", event);
|
|
187
|
+
}
|
|
188
|
+
function handleError(event) {
|
|
189
|
+
emits("error", event);
|
|
190
|
+
}
|
|
191
|
+
function handleOpen() {
|
|
192
|
+
if (!props.preview || !elementRef.value || !loaded.value) return;
|
|
193
|
+
zoomIn();
|
|
194
|
+
}
|
|
195
|
+
function handleClose() {
|
|
196
|
+
if (isAnimating.value) return;
|
|
197
|
+
zoomOut();
|
|
198
|
+
}
|
|
199
|
+
function download() {
|
|
200
|
+
if (!imageSrc.value) return;
|
|
201
|
+
saveImage(imageSrc.value, props.alt);
|
|
202
|
+
}
|
|
203
|
+
function flipHorizontal() {
|
|
204
|
+
scaleX.value *= -1;
|
|
205
|
+
}
|
|
206
|
+
function flipVertical() {
|
|
207
|
+
scaleY.value *= -1;
|
|
208
|
+
}
|
|
209
|
+
function rotateLeft() {
|
|
210
|
+
rotate.value -= 90;
|
|
211
|
+
}
|
|
212
|
+
function rotateRight() {
|
|
213
|
+
rotate.value += 90;
|
|
214
|
+
}
|
|
215
|
+
watch(open, (data) => {
|
|
216
|
+
if (!data) {
|
|
217
|
+
scaleX.value = 1;
|
|
218
|
+
scaleY.value = 1;
|
|
219
|
+
rotate.value = 0;
|
|
220
|
+
if (props.src) imageSrc.value = props.src;
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
return (_ctx, _cache) => {
|
|
224
|
+
return openBlock(), createElementBlock(Fragment, null, [createElementVNode("img", {
|
|
225
|
+
ref_key: "elementRef",
|
|
226
|
+
ref: elementRef,
|
|
227
|
+
"data-stream-markdown": "image",
|
|
228
|
+
src: __props.src,
|
|
229
|
+
alt: __props.alt,
|
|
230
|
+
title: __props.title,
|
|
231
|
+
style: { transition: "transform 300ms cubic-bezier(0.2, 0, 0.2, 1)" },
|
|
232
|
+
loading: "lazy",
|
|
233
|
+
decoding: "async",
|
|
234
|
+
onLoad: handleLoad,
|
|
235
|
+
onError: handleError,
|
|
236
|
+
onClick: handleOpen
|
|
237
|
+
}, null, 40, _hoisted_1), createVNode(modal_default, {
|
|
238
|
+
open: open.value,
|
|
239
|
+
"onUpdate:open": _cache[2] || (_cache[2] = ($event) => open.value = $event),
|
|
240
|
+
transition: "",
|
|
241
|
+
"modal-style": { backgroundColor: "rgba(0, 0, 0, 0.45)" },
|
|
242
|
+
close: handleClose
|
|
243
|
+
}, {
|
|
244
|
+
default: withCtx(() => [createVNode(zoom_container_default, {
|
|
245
|
+
"control-size": "large",
|
|
246
|
+
position: controlPosition.value,
|
|
247
|
+
"container-style": {
|
|
248
|
+
width: "auto",
|
|
249
|
+
maxWidth: `calc(100% - ${props.margin * 2}px)`,
|
|
250
|
+
cursor: "grab"
|
|
251
|
+
},
|
|
252
|
+
onClick: handleClose
|
|
253
|
+
}, {
|
|
254
|
+
controls: withCtx((buttonProps) => [
|
|
255
|
+
unref(imageSrc) && enableDownload.value ? (openBlock(), createBlock(button_default, mergeProps({ key: 0 }, buttonProps, {
|
|
256
|
+
icon: unref(icons).download,
|
|
257
|
+
name: unref(t)("button.download"),
|
|
258
|
+
onClick: download
|
|
259
|
+
}), null, 16, ["icon", "name"])) : createCommentVNode("v-if", true),
|
|
260
|
+
imageList.value.length > 1 && enableCarousel.value ? (openBlock(), createBlock(button_default, mergeProps({ key: 1 }, buttonProps, {
|
|
261
|
+
icon: unref(icons).arrowLeft,
|
|
262
|
+
name: unref(t)("button.previous"),
|
|
263
|
+
onClick: _cache[0] || (_cache[0] = () => unref(prev)())
|
|
264
|
+
}), null, 16, ["icon", "name"])) : createCommentVNode("v-if", true),
|
|
265
|
+
imageList.value.length > 1 && enableCarousel.value ? (openBlock(), createBlock(button_default, mergeProps({ key: 2 }, buttonProps, {
|
|
266
|
+
icon: unref(icons).arrowRight || unref(icons).arrowLeft,
|
|
267
|
+
name: unref(t)("button.next"),
|
|
268
|
+
"button-style": { transform: unref(icons).arrowRight ? void 0 : "scaleX(-1)" },
|
|
269
|
+
onClick: _cache[1] || (_cache[1] = () => unref(next)())
|
|
270
|
+
}), null, 16, [
|
|
271
|
+
"icon",
|
|
272
|
+
"name",
|
|
273
|
+
"button-style"
|
|
274
|
+
])) : createCommentVNode("v-if", true),
|
|
275
|
+
enableFlip.value ? (openBlock(), createBlock(button_default, mergeProps({ key: 3 }, buttonProps, {
|
|
276
|
+
icon: unref(icons).flipHorizontal,
|
|
277
|
+
name: unref(t)("button.flipX"),
|
|
278
|
+
onClick: flipHorizontal
|
|
279
|
+
}), null, 16, ["icon", "name"])) : createCommentVNode("v-if", true),
|
|
280
|
+
enableFlip.value ? (openBlock(), createBlock(button_default, mergeProps({ key: 4 }, buttonProps, {
|
|
281
|
+
icon: unref(icons).flipVertical || unref(icons).flipHorizontal,
|
|
282
|
+
name: unref(t)("button.flipY"),
|
|
283
|
+
"button-style": { rotate: unref(icons).flipVertical ? void 0 : "90deg" },
|
|
284
|
+
onClick: flipVertical
|
|
285
|
+
}), null, 16, [
|
|
286
|
+
"icon",
|
|
287
|
+
"name",
|
|
288
|
+
"button-style"
|
|
289
|
+
])) : createCommentVNode("v-if", true),
|
|
290
|
+
enableRotate.value ? (openBlock(), createBlock(button_default, mergeProps({ key: 5 }, buttonProps, {
|
|
291
|
+
icon: unref(icons).rotateLeft,
|
|
292
|
+
name: unref(t)("button.rotateLeft"),
|
|
293
|
+
onClick: rotateLeft
|
|
294
|
+
}), null, 16, ["icon", "name"])) : createCommentVNode("v-if", true),
|
|
295
|
+
enableRotate.value ? (openBlock(), createBlock(button_default, mergeProps({ key: 6 }, buttonProps, {
|
|
296
|
+
icon: unref(icons).rotateRight || unref(icons).rotateLeft,
|
|
297
|
+
name: unref(t)("button.rotateRight"),
|
|
298
|
+
"button-style": { transform: unref(icons).rotateRight ? void 0 : "scaleX(-1)" },
|
|
299
|
+
onClick: rotateRight
|
|
300
|
+
}), null, 16, [
|
|
301
|
+
"icon",
|
|
302
|
+
"name",
|
|
303
|
+
"button-style"
|
|
304
|
+
])) : createCommentVNode("v-if", true)
|
|
305
|
+
]),
|
|
306
|
+
default: withCtx(() => [createElementVNode("img", {
|
|
307
|
+
ref_key: "_zoomElementRef",
|
|
308
|
+
ref: _zoomElementRef,
|
|
309
|
+
src: unref(imageSrc),
|
|
310
|
+
alt: __props.alt,
|
|
311
|
+
title: __props.title,
|
|
312
|
+
style: normalizeStyle(imageStyle.value)
|
|
313
|
+
}, null, 12, _hoisted_2)]),
|
|
314
|
+
_: 1
|
|
315
|
+
}, 8, ["position", "container-style"])]),
|
|
316
|
+
_: 1
|
|
317
|
+
}, 8, ["open"])], 64);
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
//#endregion
|
|
323
|
+
//#region src/components/image.vue
|
|
324
|
+
var image_default = image_vue_vue_type_script_setup_true_lang_default;
|
|
325
|
+
|
|
326
|
+
//#endregion
|
|
327
|
+
export { image_default as t };
|