vue3-notion
Advanced tools
Comparing version 0.0.28 to 0.0.29
import * as Vue from "vue"; | ||
import "prismjs/themes/prism.css"; | ||
import { VNode } from "vue"; | ||
@@ -4,0 +3,0 @@ declare const _default: Vue.DefineComponent<{ |
@@ -1,2 +0,2 @@ | ||
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var vue=require('vue'),katex=require('katex');require('katex/dist/katex.min.css');var Prism=require('prismjs');require('prismjs/themes/prism.css');var vue3=require('fragment-for-vue/vue3');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var katex__default=/*#__PURE__*/_interopDefaultLegacy(katex);var Prism__default=/*#__PURE__*/_interopDefaultLegacy(Prism);// utils from react-notion | ||
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var vue=require('vue'),katex=require('katex'),Prism=require('prismjs'),vue3=require('fragment-for-vue/vue3');require('prismjs/themes/prism.css'),require('katex/dist/katex.min.css');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var katex__default=/*#__PURE__*/_interopDefaultLegacy(katex);var Prism__default=/*#__PURE__*/_interopDefaultLegacy(Prism);// utils from react-notion | ||
const getTextContent = (text) => { | ||
@@ -144,3 +144,3 @@ return text.reduce((prev, current) => prev + current[0], ""); | ||
});script$o.__file = "src/blocks/helpers/katex.vue";const _hoisted_1$k = ["target", "href"]; | ||
const _hoisted_2$d = ["target", "href"]; | ||
const _hoisted_2$c = ["target", "href"]; | ||
const _hoisted_3$5 = ["target", "href"]; | ||
@@ -228,3 +228,3 @@ const _hoisted_4$3 = { key: 5 }; | ||
vue.createVNode(_component_NotionDecorator, vue.mergeProps({ content: vue.unref(nextContent) }, vue.unref(pass)), null, 16 /* FULL_PROPS */, ["content"]) | ||
], 8 /* PROPS */, _hoisted_2$d)) | ||
], 8 /* PROPS */, _hoisted_2$c)) | ||
: (vue.unref(decoratorKey) === 'a') | ||
@@ -299,3 +299,3 @@ ? (vue.openBlock(), vue.createElementBlock("a", { | ||
});script$m.__file = "src/blocks/helpers/text-renderer.vue";const _hoisted_1$j = { class: "notion-row" }; | ||
const _hoisted_2$c = ["href"]; | ||
const _hoisted_2$b = ["href"]; | ||
const _hoisted_3$4 = { class: "notion-bookmark-title" }; | ||
@@ -365,3 +365,3 @@ const _hoisted_4$2 = { | ||
: vue.createCommentVNode("v-if", true) | ||
], 10 /* CLASS, PROPS */, _hoisted_2$c) | ||
], 10 /* CLASS, PROPS */, _hoisted_2$b) | ||
])); | ||
@@ -371,3 +371,3 @@ }; | ||
});script$l.__file = "src/blocks/bookmark.vue";const _hoisted_1$i = ["src", "alt"]; | ||
const _hoisted_2$b = ["aria-label"]; | ||
const _hoisted_2$a = ["aria-label"]; | ||
const __default__$h = { | ||
@@ -401,3 +401,3 @@ name: "NotionPageIcon", | ||
]) | ||
}, vue.toDisplayString(vue.unref(icon)), 11 /* TEXT, CLASS, PROPS */, _hoisted_2$b)) | ||
}, vue.toDisplayString(vue.unref(icon)), 11 /* TEXT, CLASS, PROPS */, _hoisted_2$a)) | ||
: vue.createCommentVNode("v-if", true); | ||
@@ -407,3 +407,3 @@ }; | ||
});script$k.__file = "src/blocks/helpers/page-icon.vue";const _hoisted_1$h = { style: { "font-size": "12px" } }; | ||
const _hoisted_2$a = { class: "notion-callout-text" }; | ||
const _hoisted_2$9 = { class: "notion-callout-text" }; | ||
const __default__$g = { | ||
@@ -426,3 +426,3 @@ name: "NotionCallout", | ||
]), | ||
vue.createElementVNode("div", _hoisted_2$a, [ | ||
vue.createElementVNode("div", _hoisted_2$9, [ | ||
vue.createVNode(script$m, vue.mergeProps({ text: vue.unref(title) }, vue.unref(pass)), null, 16 /* FULL_PROPS */, ["text"]) | ||
@@ -434,3 +434,3 @@ ]) | ||
});script$j.__file = "src/blocks/callout.vue";const _hoisted_1$g = ["innerHTML"]; | ||
const _hoisted_2$9 = ["innerHTML"]; | ||
const _hoisted_2$8 = ["innerHTML"]; | ||
var script$i = /*#__PURE__*/ vue.defineComponent({ | ||
@@ -471,3 +471,3 @@ props: { | ||
}, [ | ||
vue.createElementVNode("code", { innerHTML: vue.unref(d) }, null, 8 /* PROPS */, _hoisted_2$9) | ||
vue.createElementVNode("code", { innerHTML: vue.unref(d) }, null, 8 /* PROPS */, _hoisted_2$8) | ||
], 2 /* CLASS */)); | ||
@@ -477,9 +477,4 @@ }; | ||
});script$i.__file = "src/blocks/helpers/prism.vue";const _hoisted_1$f = { | ||
key: 0, | ||
class: /*#__PURE__*/ vue.normalizeClass(['notion-code']) | ||
}; | ||
const _hoisted_2$8 = { | ||
key: 1, | ||
class: /*#__PURE__*/ vue.normalizeClass(['notion-code']) | ||
}; | ||
const __default__$f = { | ||
@@ -498,11 +493,11 @@ name: "NotionCode", | ||
}); | ||
const langClass = vue.computed(() => { | ||
vue.computed(() => { | ||
return props.overrideLangClass || `language-${lang.value}`; | ||
}); | ||
const supported = vue.computed(() => { | ||
vue.computed(() => { | ||
return lang.value ? Prism__default["default"]?.languages[lang.value] : false; | ||
}); | ||
return (_ctx, _cache) => { | ||
return (vue.unref(supported)) | ||
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [ | ||
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [ | ||
vue.createElementVNode("div", _hoisted_1$f, [ | ||
vue.createVNode(script$i, { language: vue.unref(lang) }, { | ||
@@ -514,8 +509,5 @@ default: vue.withCtx(() => [ | ||
}, 8 /* PROPS */, ["language"]) | ||
])) | ||
: (vue.openBlock(), vue.createElementBlock("pre", _hoisted_2$8, [ | ||
vue.createElementVNode("code", { | ||
class: vue.normalizeClass(vue.unref(langClass)) | ||
}, vue.toDisplayString(vue.unref(properties)?.title[0][0]), 3 /* TEXT, CLASS */) | ||
])); | ||
]), | ||
vue.createCommentVNode(" <pre v-else :class=\"['notion-code']\"><code :class=\"langClass\">{{ properties?.title[0][0] }}</code></pre> ") | ||
], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */)); | ||
}; | ||
@@ -522,0 +514,0 @@ } |
import { computed, defineComponent, openBlock, createElementBlock, unref, resolveComponent, createBlock, resolveDynamicComponent, mergeProps, withCtx, createTextVNode, toDisplayString, createVNode, normalizeClass, Fragment, renderList, createElementVNode, createCommentVNode, normalizeProps, guardReactiveProps, useSlots, toRefs, normalizeStyle, renderSlot } from 'vue'; | ||
import katex from 'katex'; | ||
import 'katex/dist/katex.min.css'; | ||
import Prism from 'prismjs'; | ||
import { Fragment as Fragment$1 } from 'fragment-for-vue/vue3'; | ||
import 'prismjs/themes/prism.css'; | ||
import { Fragment as Fragment$1 } from 'fragment-for-vue/vue3'; | ||
import 'katex/dist/katex.min.css'; | ||
@@ -159,3 +159,3 @@ // utils from react-notion | ||
const _hoisted_1$k = ["target", "href"]; | ||
const _hoisted_2$d = ["target", "href"]; | ||
const _hoisted_2$c = ["target", "href"]; | ||
const _hoisted_3$5 = ["target", "href"]; | ||
@@ -243,3 +243,3 @@ const _hoisted_4$3 = { key: 5 }; | ||
createVNode(_component_NotionDecorator, mergeProps({ content: unref(nextContent) }, unref(pass)), null, 16 /* FULL_PROPS */, ["content"]) | ||
], 8 /* PROPS */, _hoisted_2$d)) | ||
], 8 /* PROPS */, _hoisted_2$c)) | ||
: (unref(decoratorKey) === 'a') | ||
@@ -322,3 +322,3 @@ ? (openBlock(), createElementBlock("a", { | ||
const _hoisted_1$j = { class: "notion-row" }; | ||
const _hoisted_2$c = ["href"]; | ||
const _hoisted_2$b = ["href"]; | ||
const _hoisted_3$4 = { class: "notion-bookmark-title" }; | ||
@@ -388,3 +388,3 @@ const _hoisted_4$2 = { | ||
: createCommentVNode("v-if", true) | ||
], 10 /* CLASS, PROPS */, _hoisted_2$c) | ||
], 10 /* CLASS, PROPS */, _hoisted_2$b) | ||
])); | ||
@@ -398,3 +398,3 @@ }; | ||
const _hoisted_1$i = ["src", "alt"]; | ||
const _hoisted_2$b = ["aria-label"]; | ||
const _hoisted_2$a = ["aria-label"]; | ||
const __default__$h = { | ||
@@ -428,3 +428,3 @@ name: "NotionPageIcon", | ||
]) | ||
}, toDisplayString(unref(icon)), 11 /* TEXT, CLASS, PROPS */, _hoisted_2$b)) | ||
}, toDisplayString(unref(icon)), 11 /* TEXT, CLASS, PROPS */, _hoisted_2$a)) | ||
: createCommentVNode("v-if", true); | ||
@@ -438,3 +438,3 @@ }; | ||
const _hoisted_1$h = { style: { "font-size": "12px" } }; | ||
const _hoisted_2$a = { class: "notion-callout-text" }; | ||
const _hoisted_2$9 = { class: "notion-callout-text" }; | ||
const __default__$g = { | ||
@@ -457,3 +457,3 @@ name: "NotionCallout", | ||
]), | ||
createElementVNode("div", _hoisted_2$a, [ | ||
createElementVNode("div", _hoisted_2$9, [ | ||
createVNode(script$m, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"]) | ||
@@ -469,3 +469,3 @@ ]) | ||
const _hoisted_1$g = ["innerHTML"]; | ||
const _hoisted_2$9 = ["innerHTML"]; | ||
const _hoisted_2$8 = ["innerHTML"]; | ||
var script$i = /*#__PURE__*/ defineComponent({ | ||
@@ -506,3 +506,3 @@ props: { | ||
}, [ | ||
createElementVNode("code", { innerHTML: unref(d) }, null, 8 /* PROPS */, _hoisted_2$9) | ||
createElementVNode("code", { innerHTML: unref(d) }, null, 8 /* PROPS */, _hoisted_2$8) | ||
], 2 /* CLASS */)); | ||
@@ -516,9 +516,4 @@ }; | ||
const _hoisted_1$f = { | ||
key: 0, | ||
class: /*#__PURE__*/ normalizeClass(['notion-code']) | ||
}; | ||
const _hoisted_2$8 = { | ||
key: 1, | ||
class: /*#__PURE__*/ normalizeClass(['notion-code']) | ||
}; | ||
const __default__$f = { | ||
@@ -537,11 +532,11 @@ name: "NotionCode", | ||
}); | ||
const langClass = computed(() => { | ||
computed(() => { | ||
return props.overrideLangClass || `language-${lang.value}`; | ||
}); | ||
const supported = computed(() => { | ||
computed(() => { | ||
return lang.value ? Prism?.languages[lang.value] : false; | ||
}); | ||
return (_ctx, _cache) => { | ||
return (unref(supported)) | ||
? (openBlock(), createElementBlock("div", _hoisted_1$f, [ | ||
return (openBlock(), createElementBlock(Fragment, null, [ | ||
createElementVNode("div", _hoisted_1$f, [ | ||
createVNode(script$i, { language: unref(lang) }, { | ||
@@ -553,8 +548,5 @@ default: withCtx(() => [ | ||
}, 8 /* PROPS */, ["language"]) | ||
])) | ||
: (openBlock(), createElementBlock("pre", _hoisted_2$8, [ | ||
createElementVNode("code", { | ||
class: normalizeClass(unref(langClass)) | ||
}, toDisplayString(unref(properties)?.title[0][0]), 3 /* TEXT, CLASS */) | ||
])); | ||
]), | ||
createCommentVNode(" <pre v-else :class=\"['notion-code']\"><code :class=\"langClass\">{{ properties?.title[0][0] }}</code></pre> ") | ||
], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */)); | ||
}; | ||
@@ -561,0 +553,0 @@ } |
{ | ||
"name": "vue3-notion", | ||
"version": "0.0.28", | ||
"version": "0.0.29", | ||
"description": "Vue 3 Unofficial Notion Renderer", | ||
@@ -5,0 +5,0 @@ "repository": "github:zernonia/vue3-notion", |
223283
4815