From 621fc38f0bfef5ff31ef1e188c5048cba309d53d Mon Sep 17 00:00:00 2001 From: meteorlxy Date: Wed, 10 May 2023 22:08:25 +0800 Subject: [PATCH] build: version 4.1.0 --- CHANGELOG.md | 9 +++++++++ dist/vue-showdown.cjs.js | 4 ++-- dist/vue-showdown.d.ts | 14 +++++++------- dist/vue-showdown.esm.js | 4 ++-- dist/vue-showdown.esm.min.js | 4 ++-- dist/vue-showdown.js | 4 ++-- dist/vue-showdown.min.js | 4 ++-- package.json | 2 +- 8 files changed, 27 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be7d5db..3f43d8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# [4.1.0](https://github.com/meteorlxy/vue-showdown/compare/v4.0.0...v4.1.0) (2023-05-10) + + +### Features + +* drop node 14 ([bba3951](https://github.com/meteorlxy/vue-showdown/commit/bba395150e4466d0eb11cb23a3fc72dad6a5b7c5)) + + + # [4.0.0](https://github.com/meteorlxy/vue-showdown/compare/v3.3.0...v4.0.0) (2022-12-14) diff --git a/dist/vue-showdown.cjs.js b/dist/vue-showdown.cjs.js index af2d993..5792b62 100644 --- a/dist/vue-showdown.cjs.js +++ b/dist/vue-showdown.cjs.js @@ -1,10 +1,10 @@ /*! * vue-showdown - Use showdown as a vue component * - * @version v4.0.0 + * @version v4.1.0 * @link https://vue-showdown.js.org * @license MIT - * @copyright 2018-2022 meteorlxy + * @copyright 2018-2023 meteorlxy */ 'use strict'; diff --git a/dist/vue-showdown.d.ts b/dist/vue-showdown.d.ts index 0b56024..e71970d 100644 --- a/dist/vue-showdown.d.ts +++ b/dist/vue-showdown.d.ts @@ -1,4 +1,4 @@ -import showdown from 'showdown'; +import showdown, { Flavor, ShowdownOptions } from 'showdown'; export { default as showdown } from 'showdown'; import * as vue from 'vue'; import { PropType, Plugin } from 'vue'; @@ -49,7 +49,7 @@ declare const VueShowdown: vue.DefineComponent<{ * @see https://github.com/showdownjs/showdown#flavors */ flavor: { - type: PropType; + type: PropType; required: false; default: null; }; @@ -59,7 +59,7 @@ declare const VueShowdown: vue.DefineComponent<{ * @see https://github.com/showdownjs/showdown#valid-options */ options: { - type: PropType; + type: PropType; required: false; default: () => {}; }; @@ -114,7 +114,7 @@ declare const VueShowdown: vue.DefineComponent<{ * @see https://github.com/showdownjs/showdown#flavors */ flavor: { - type: PropType; + type: PropType; required: false; default: null; }; @@ -124,7 +124,7 @@ declare const VueShowdown: vue.DefineComponent<{ * @see https://github.com/showdownjs/showdown#valid-options */ options: { - type: PropType; + type: PropType; required: false; default: () => {}; }; @@ -158,8 +158,8 @@ declare const VueShowdown: vue.DefineComponent<{ extensions: Required<(string | (() => showdown.ShowdownExtension | showdown.ShowdownExtension[]) | showdown.ShowdownExtension | showdown.ShowdownExtension[])[] | null | undefined>; markdown: string | null; tag: string; - flavor: showdown.Flavor | null; - options: showdown.ShowdownOptions; + flavor: Flavor | null; + options: ShowdownOptions; vueTemplate: boolean; vueTemplateData: Record; }>; diff --git a/dist/vue-showdown.esm.js b/dist/vue-showdown.esm.js index c29e362..031c741 100644 --- a/dist/vue-showdown.esm.js +++ b/dist/vue-showdown.esm.js @@ -1,10 +1,10 @@ /*! * vue-showdown - Use showdown as a vue component * - * @version v4.0.0 + * @version v4.1.0 * @link https://vue-showdown.js.org * @license MIT - * @copyright 2018-2022 meteorlxy + * @copyright 2018-2023 meteorlxy */ import showdown from 'showdown'; diff --git a/dist/vue-showdown.esm.min.js b/dist/vue-showdown.esm.min.js index 3cf1184..069cde4 100644 --- a/dist/vue-showdown.esm.min.js +++ b/dist/vue-showdown.esm.min.js @@ -1,9 +1,9 @@ /*! * vue-showdown - Use showdown as a vue component * - * @version v4.0.0 + * @version v4.1.0 * @link https://vue-showdown.js.org * @license MIT - * @copyright 2018-2022 meteorlxy + * @copyright 2018-2023 meteorlxy */ import e from"showdown";export{default as showdown}from"showdown";import{defineComponent as t,computed as r,Text as o,h as n}from"vue";const a=t({name:"VueShowdown",props:{markdown:{type:String,required:!1,default:null},tag:{type:String,required:!1,default:"div"},flavor:{type:String,required:!1,default:null},options:{type:Object,required:!1,default:()=>({})},extensions:{type:Array,required:!1,default:null},vueTemplate:{type:Boolean,required:!1,default:!1},vueTemplateData:{type:Object,required:!1,default:()=>({})}},setup(t,{slots:a}){const l=r((()=>{const r=new e.Converter({extensions:t.extensions||void 0});return null!==t.flavor&&r.setFlavor(t.flavor),Object.entries(t.options).forEach((([e,t])=>{r.setOption(e,t)})),r})),u=r((()=>{if(null!==t.markdown)return t.markdown;const e=a.default?.()[0];return e?.type===o?e.children:""})),s=r((()=>l.value.makeHtml(u.value)));return()=>t.vueTemplate?n({setup:()=>t.vueTemplateData,template:`<${t.tag}>${s.value}`}):n(t.tag,{innerHTML:s.value})}}),l={install(t,{flavor:r=null,options:o={}}={}){null!==r&&e.setFlavor(r),Object.entries(o).forEach((([t,r])=>{e.setOption(t,r)})),t.component("VueShowdown",a)}};export{a as VueShowdown,l as VueShowdownPlugin,l as default}; diff --git a/dist/vue-showdown.js b/dist/vue-showdown.js index 1ace5b0..ce1db82 100644 --- a/dist/vue-showdown.js +++ b/dist/vue-showdown.js @@ -1,10 +1,10 @@ /*! * vue-showdown - Use showdown as a vue component * - * @version v4.0.0 + * @version v4.1.0 * @link https://vue-showdown.js.org * @license MIT - * @copyright 2018-2022 meteorlxy + * @copyright 2018-2023 meteorlxy */ (function (global, factory) { diff --git a/dist/vue-showdown.min.js b/dist/vue-showdown.min.js index e9a1b03..01a3a9f 100644 --- a/dist/vue-showdown.min.js +++ b/dist/vue-showdown.min.js @@ -1,9 +1,9 @@ /*! * vue-showdown - Use showdown as a vue component * - * @version v4.0.0 + * @version v4.1.0 * @link https://vue-showdown.js.org * @license MIT - * @copyright 2018-2022 meteorlxy + * @copyright 2018-2023 meteorlxy */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("showdown"),require("vue")):"function"==typeof define&&define.amd?define(["exports","showdown","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VueShowdown={},e.showdown,e.Vue)}(this,(function(e,t,o){"use strict";const n=o.defineComponent({name:"VueShowdown",props:{markdown:{type:String,required:!1,default:null},tag:{type:String,required:!1,default:"div"},flavor:{type:String,required:!1,default:null},options:{type:Object,required:!1,default:()=>({})},extensions:{type:Array,required:!1,default:null},vueTemplate:{type:Boolean,required:!1,default:!1},vueTemplateData:{type:Object,required:!1,default:()=>({})}},setup(e,{slots:n}){const u=o.computed((()=>{const o=new t.Converter({extensions:e.extensions||void 0});return null!==e.flavor&&o.setFlavor(e.flavor),Object.entries(e.options).forEach((([e,t])=>{o.setOption(e,t)})),o})),r=o.computed((()=>{if(null!==e.markdown)return e.markdown;const t=n.default?.()[0];return t?.type===o.Text?t.children:""})),l=o.computed((()=>u.value.makeHtml(r.value)));return()=>e.vueTemplate?o.h({setup:()=>e.vueTemplateData,template:`<${e.tag}>${l.value}`}):o.h(e.tag,{innerHTML:l.value})}}),u={install(e,{flavor:o=null,options:u={}}={}){null!==o&&t.setFlavor(o),Object.entries(u).forEach((([e,o])=>{t.setOption(e,o)})),e.component("VueShowdown",n)}};"undefined"!=typeof window&&(window.VueShowdownPlugin=u,window.VueShowdown=n),e.showdown=t,e.VueShowdown=n,e.VueShowdownPlugin=u})); diff --git a/package.json b/package.json index e725764..da0d6c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-showdown", - "version": "4.0.0", + "version": "4.1.0", "description": "Use showdown as a vue component", "keywords": [ "vue",