@elmethis/core 0.5.1 → 0.5.2
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.
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export interface ElmMarkdownProps {
|
|
2
2
|
markdown: string;
|
|
3
|
+
tag?: keyof HTMLElementTagNameMap;
|
|
3
4
|
}
|
|
4
|
-
declare const _default: import('vue').DefineComponent<ElmMarkdownProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmMarkdownProps> & Readonly<{}>, {
|
|
5
|
+
declare const _default: import('vue').DefineComponent<ElmMarkdownProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmMarkdownProps> & Readonly<{}>, {
|
|
6
|
+
tag: keyof HTMLElementTagNameMap;
|
|
7
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
8
|
export default _default;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
console.error("vite-plugin-css-injected-by-js", e);
|
|
11
11
|
}
|
|
12
12
|
})();
|
|
13
|
-
import { defineComponent, defineAsyncComponent,
|
|
13
|
+
import { defineComponent, defineAsyncComponent, createBlock, openBlock, resolveDynamicComponent, withCtx, unref, h } from "vue";
|
|
14
14
|
import { marked as d } from "../../node_modules/.pnpm/marked@16.2.0/node_modules/marked/lib/marked.esm.mjs";
|
|
15
15
|
import "@mdi/js";
|
|
16
16
|
import "polished";
|
|
@@ -27,9 +27,11 @@ import "nanoid";
|
|
|
27
27
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
28
28
|
__name: "ElmMarkdown",
|
|
29
29
|
props: {
|
|
30
|
-
markdown: {}
|
|
30
|
+
markdown: {},
|
|
31
|
+
tag: { default: "div" }
|
|
31
32
|
},
|
|
32
33
|
setup(__props) {
|
|
34
|
+
const props = __props;
|
|
33
35
|
const AsyncElmInlineText = defineAsyncComponent({
|
|
34
36
|
loader: () => import("../typography/ElmInlineText.vue.mjs")
|
|
35
37
|
});
|
|
@@ -284,10 +286,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
284
286
|
const tokens = d.setOptions({ gfm: true }).lexer(markdown);
|
|
285
287
|
return renderByToken({ tokens });
|
|
286
288
|
};
|
|
289
|
+
const renderResult = render({ markdown: props.markdown });
|
|
287
290
|
return (_ctx, _cache) => {
|
|
288
|
-
return openBlock(),
|
|
289
|
-
|
|
290
|
-
|
|
291
|
+
return openBlock(), createBlock(resolveDynamicComponent(), null, {
|
|
292
|
+
default: withCtx(() => [
|
|
293
|
+
(openBlock(), createBlock(resolveDynamicComponent(() => unref(renderResult))))
|
|
294
|
+
]),
|
|
295
|
+
_: 1
|
|
296
|
+
});
|
|
291
297
|
};
|
|
292
298
|
}
|
|
293
299
|
});
|