You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

vue3-notion

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.25 to 0.0.26

dist/blocks/helpers/prism.d.ts

188

dist/library.ts

@@ -1,2 +0,3 @@

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 * as Vue from 'vue';
import { computed, defineComponent, openBlock, createElementBlock, unref, resolveComponent, createBlock, resolveDynamicComponent, mergeProps, withCtx, createTextVNode, toDisplayString, createVNode, normalizeClass, Fragment, renderList, createElementVNode, createCommentVNode, normalizeProps, guardReactiveProps, normalizeStyle, renderSlot } from 'vue';
import katex from 'katex';

@@ -135,7 +136,7 @@ import 'katex/dist/katex.min.css';

const _hoisted_1$l = ["innerHTML"];
const _hoisted_1$k = ["innerHTML"];
const __default__$l = {
name: "Katex",
};
var script$o = /*#__PURE__*/ defineComponent({
var script$n = /*#__PURE__*/ defineComponent({
...__default__$l,

@@ -152,3 +153,3 @@ props: {

return (_ctx, _cache) => {
return (openBlock(), createElementBlock("span", { innerHTML: unref(html) }, null, 8 /* PROPS */, _hoisted_1$l));
return (openBlock(), createElementBlock("span", { innerHTML: unref(html) }, null, 8 /* PROPS */, _hoisted_1$k));
};

@@ -158,7 +159,7 @@ }

script$o.__file = "src/blocks/helpers/katex.vue";
script$n.__file = "src/blocks/helpers/katex.vue";
const _hoisted_1$k = ["target", "href"];
const _hoisted_2$d = ["target", "href"];
const _hoisted_3$6 = ["target", "href"];
const _hoisted_1$j = ["target", "href"];
const _hoisted_2$c = ["target", "href"];
const _hoisted_3$5 = ["target", "href"];
const _hoisted_4$3 = { key: 5 };

@@ -179,3 +180,3 @@ const _hoisted_5$2 = {

};
var script$n = /*#__PURE__*/ defineComponent({
var script$m = /*#__PURE__*/ defineComponent({
...__default__$k,

@@ -227,3 +228,3 @@ props: {

href: unref(blockProps).mapPageUrl(unref(decoratorValue))
}, toDisplayString(unref(pageLinkTitle)), 9 /* TEXT, PROPS */, _hoisted_1$k))
}, toDisplayString(unref(pageLinkTitle)), 9 /* TEXT, PROPS */, _hoisted_1$j))
: (unref(decoratorKey) === 'a' && unref(hasPageLinkOptions) && unref(isInlinePageLink))

@@ -247,3 +248,3 @@ ? (openBlock(), createBlock(resolveDynamicComponent(unref(blockProps).pageLinkOptions?.component), mergeProps({

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')

@@ -257,3 +258,3 @@ ? (openBlock(), createElementBlock("a", {

createVNode(_component_NotionDecorator, mergeProps({ content: unref(nextContent) }, unref(pass)), null, 16 /* FULL_PROPS */, ["content"])
], 8 /* PROPS */, _hoisted_3$6))
], 8 /* PROPS */, _hoisted_3$5))
: (unref(decorators).length === 0)

@@ -285,3 +286,3 @@ ? (openBlock(), createElementBlock("span", _hoisted_4$3, toDisplayString(unref(text)), 1 /* TEXT */))

: (unref(decoratorKey) === 'e' && unref(blockProps).katex)
? (openBlock(), createBlock(script$o, {
? (openBlock(), createBlock(script$n, {
key: 11,

@@ -300,3 +301,3 @@ expression: unref(decoratorValue)

script$n.__file = "src/blocks/decorator.vue";
script$m.__file = "src/blocks/decorator.vue";

@@ -306,3 +307,3 @@ const __default__$j = {

};
var script$m = /*#__PURE__*/ defineComponent({
var script$l = /*#__PURE__*/ defineComponent({
...__default__$j,

@@ -317,3 +318,3 @@ props: { text: Object, ...defineNotionProps },

(openBlock(true), createElementBlock(Fragment, null, renderList(__props.text, (t, i) => {
return (openBlock(), createBlock(script$n, mergeProps({
return (openBlock(), createBlock(script$m, mergeProps({
key: i,

@@ -328,7 +329,7 @@ content: t

script$m.__file = "src/blocks/helpers/text-renderer.vue";
script$l.__file = "src/blocks/helpers/text-renderer.vue";
const _hoisted_1$j = { class: "notion-row" };
const _hoisted_2$c = ["href"];
const _hoisted_3$5 = { class: "notion-bookmark-title" };
const _hoisted_1$i = { class: "notion-row" };
const _hoisted_2$b = ["href"];
const _hoisted_3$4 = { class: "notion-bookmark-title" };
const _hoisted_4$2 = {

@@ -348,3 +349,3 @@ key: 0,

};
var script$l = /*#__PURE__*/ defineComponent({
var script$k = /*#__PURE__*/ defineComponent({
...__default__$i,

@@ -357,3 +358,3 @@ props: { ...defineNotionProps },

return (_ctx, _cache) => {
return (openBlock(), createElementBlock("div", _hoisted_1$j, [
return (openBlock(), createElementBlock("div", _hoisted_1$i, [
createElementVNode("a", {

@@ -363,8 +364,7 @@ target: "_blank",

class: normalizeClass(['notion-bookmark', unref(f).block_color && `notion-${unref(f).block_color}`]),
href: unref(properties).link
href: unref(properties).link[0][0]
}, [
createTextVNode(toDisplayString(unref(properties).link) + " ", 1 /* TEXT */),
createElementVNode("div", null, [
createElementVNode("div", _hoisted_3$5, [
createVNode(script$m, mergeProps({
createElementVNode("div", _hoisted_3$4, [
createVNode(script$l, mergeProps({
text: unref(title) || unref(properties).link

@@ -375,3 +375,3 @@ }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])

? (openBlock(), createElementBlock("div", _hoisted_4$2, [
createVNode(script$m, mergeProps({ text: unref(description) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
createVNode(script$l, mergeProps({ text: unref(description) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
]))

@@ -388,3 +388,3 @@ : createCommentVNode("v-if", true),

createElementVNode("div", null, [
createVNode(script$m, mergeProps({
createVNode(script$l, mergeProps({
text: unref(properties).link

@@ -403,3 +403,3 @@ }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])

: createCommentVNode("v-if", true)
], 10 /* CLASS, PROPS */, _hoisted_2$c)
], 10 /* CLASS, PROPS */, _hoisted_2$b)
]));

@@ -410,10 +410,10 @@ };

script$l.__file = "src/blocks/bookmark.vue";
script$k.__file = "src/blocks/bookmark.vue";
const _hoisted_1$i = ["src", "alt"];
const _hoisted_2$b = ["aria-label"];
const _hoisted_1$h = ["src", "alt"];
const _hoisted_2$a = ["aria-label"];
const __default__$h = {
name: "NotionPageIcon",
};
var script$k = /*#__PURE__*/ defineComponent({
var script$j = /*#__PURE__*/ defineComponent({
...__default__$h,

@@ -432,3 +432,3 @@ props: { big: Boolean, ...defineNotionProps },

alt: unref(title) ? unref(getTextContent)(unref(title)) : 'Icon'
}, null, 10 /* CLASS, PROPS */, _hoisted_1$i))
}, null, 10 /* CLASS, PROPS */, _hoisted_1$h))
: (unref(icon))

@@ -444,3 +444,3 @@ ? (openBlock(), createElementBlock("span", {

])
}, toDisplayString(unref(icon)), 11 /* TEXT, CLASS, PROPS */, _hoisted_2$b))
}, toDisplayString(unref(icon)), 11 /* TEXT, CLASS, PROPS */, _hoisted_2$a))
: createCommentVNode("v-if", true);

@@ -451,10 +451,10 @@ };

script$k.__file = "src/blocks/helpers/page-icon.vue";
script$j.__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_1$g = { style: { "font-size": "12px" } };
const _hoisted_2$9 = { class: "notion-callout-text" };
const __default__$g = {
name: "NotionCallout",
};
var script$j = /*#__PURE__*/ defineComponent({
var script$i = /*#__PURE__*/ defineComponent({
...__default__$g,

@@ -470,7 +470,7 @@ props: { ...defineNotionProps },

}, [
createElementVNode("div", _hoisted_1$h, [
createVNode(script$k, normalizeProps(guardReactiveProps(unref(pass))), null, 16 /* FULL_PROPS */)
createElementVNode("div", _hoisted_1$g, [
createVNode(script$j, normalizeProps(guardReactiveProps(unref(pass))), null, 16 /* FULL_PROPS */)
]),
createElementVNode("div", _hoisted_2$a, [
createVNode(script$m, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
createElementVNode("div", _hoisted_2$9, [
createVNode(script$l, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
])

@@ -482,8 +482,5 @@ ], 2 /* CLASS */));

script$j.__file = "src/blocks/callout.vue";
script$i.__file = "src/blocks/callout.vue";
const _hoisted_1$g = /*#__PURE__*/ createTextVNode(" code test ");
const _hoisted_2$9 = ["innerHTML"];
const _hoisted_3$4 = ["innerHTML"];
var script$i = /*#__PURE__*/ defineComponent({
var PrismBlock = Vue.defineComponent({
props: {

@@ -502,34 +499,25 @@ code: {

},
setup(__props) {
const props = __props;
const slots = useSlots();
const { inline, language } = toRefs(props);
const className = computed(() => `language-${language.value}`);
const defaultSlot = (slots && slots.default && slots.default()) || [];
const code = props.code || (defaultSlot && defaultSlot.length && defaultSlot[0]?.children)
? defaultSlot[0].children
: "";
const d = computed(() => Prism?.highlight(code, Prism?.languages[language.value], "en"));
return (_ctx, _cache) => {
return (openBlock(), createElementBlock(Fragment, null, [
_hoisted_1$g,
(unref(inline))
? (openBlock(), createElementBlock("code", {
key: 0,
class: normalizeClass(unref(className)),
innerHTML: unref(d)
}, null, 10 /* CLASS, PROPS */, _hoisted_2$9))
: (openBlock(), createElementBlock("pre", {
key: 1,
class: normalizeClass(unref(className))
}, [
createElementVNode("code", { innerHTML: unref(d) }, null, 8 /* PROPS */, _hoisted_3$4)
], 2 /* CLASS */))
], 64 /* STABLE_FRAGMENT */));
};
}
setup(props, { slots, attrs }) {
const { h } = Vue;
const slotsData = (slots && slots.default && slots.default()) || [];
const code = props.code || (slotsData.length > 0 ? slotsData[0].children : "");
const { inline, language } = props;
const prismLanguage = Prism.languages[language];
const className = `language-${language}`;
if (inline) {
return () =>
//@ts-ignore
h("code", { ...attrs, class: [attrs.class, className], innerHTML: Prism.highlight(code, prismLanguage) });
}
//@ts-ignore
const d = Prism.highlight(code, prismLanguage);
return () => h("pre", { ...attrs, class: [attrs.class, className] }, [
h("code", {
class: className,
innerHTML: d,
}),
]);
},
});
script$i.__file = "src/blocks/helpers/prism.vue";
const _hoisted_1$f = {

@@ -565,3 +553,3 @@ key: 0,

? (openBlock(), createElementBlock("div", _hoisted_1$f, [
createVNode(script$i, { language: unref(lang) }, {
createVNode(unref(PrismBlock), { language: unref(lang) }, {
default: withCtx(() => [

@@ -640,3 +628,3 @@ createTextVNode(toDisplayString(unref(properties)?.title[0][0]), 1 /* TEXT */)

? (openBlock(), createElementBlock("div", _hoisted_1$e, [
createVNode(script$o, { expression: unref(equation) }, null, 8 /* PROPS */, ["expression"])
createVNode(script$n, { expression: unref(equation) }, null, 8 /* PROPS */, ["expression"])
]))

@@ -765,3 +753,3 @@ : (openBlock(), createBlock(script$h, mergeProps({ key: 1 }, unref(pass), {

? (openBlock(), createElementBlock("figcaption", _hoisted_1$b, [
createVNode(script$m, mergeProps({ text: unref(caption) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
createVNode(script$l, mergeProps({ text: unref(caption) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
]))

@@ -801,11 +789,11 @@ : createCommentVNode("v-if", true)

? (openBlock(), createElementBlock("h1", _hoisted_1$a, [
createVNode(script$m, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
createVNode(script$l, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
]))
: (unref(type) === 'sub_header')
? (openBlock(), createElementBlock("h2", _hoisted_2$6, [
createVNode(script$m, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
createVNode(script$l, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
]))
: (unref(type) === 'sub_sub_header')
? (openBlock(), createElementBlock("h3", _hoisted_3$3, [
createVNode(script$m, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
createVNode(script$l, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
]))

@@ -879,3 +867,3 @@ : createCommentVNode("v-if", true);

createElementVNode("li", null, [
createVNode(script$m, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
createVNode(script$l, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
]),

@@ -894,3 +882,3 @@ (unref(block).value.content)

createElementVNode("li", null, [
createVNode(script$m, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
createVNode(script$l, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
]),

@@ -908,3 +896,3 @@ (unref(block).value.content)

createElementVNode("li", null, [
createVNode(script$m, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
createVNode(script$l, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
]),

@@ -978,5 +966,5 @@ (unref(block).value.content)

}, [
createVNode(script$k, mergeProps(unref(pass), { big: "" }), null, 16 /* FULL_PROPS */),
createVNode(script$j, mergeProps(unref(pass), { big: "" }), null, 16 /* FULL_PROPS */),
createElementVNode("div", _hoisted_3$1, [
createVNode(script$m, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
createVNode(script$l, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
]),

@@ -997,6 +985,6 @@ renderSlot(_ctx.$slots, "default")

createElementVNode("div", _hoisted_5, [
createVNode(script$k, normalizeProps(guardReactiveProps(unref(pass))), null, 16 /* FULL_PROPS */)
createVNode(script$j, normalizeProps(guardReactiveProps(unref(pass))), null, 16 /* FULL_PROPS */)
]),
createElementVNode("div", _hoisted_6, [
createVNode(script$m, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
createVNode(script$l, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
])

@@ -1013,6 +1001,6 @@ ]),

createElementVNode("div", _hoisted_8, [
createVNode(script$k, normalizeProps(guardReactiveProps(unref(pass))), null, 16 /* FULL_PROPS */)
createVNode(script$j, normalizeProps(guardReactiveProps(unref(pass))), null, 16 /* FULL_PROPS */)
]),
createElementVNode("div", _hoisted_9, [
createVNode(script$m, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
createVNode(script$l, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
])

@@ -1043,3 +1031,3 @@ ], 8 /* PROPS */, _hoisted_7));

? (openBlock(), createElementBlock("blockquote", _hoisted_1$6, [
createVNode(script$m, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
createVNode(script$l, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
]))

@@ -1103,3 +1091,3 @@ : createCommentVNode("v-if", true);

createElementVNode("div", _hoisted_2$1, [
createVNode(script$m, mergeProps({
createVNode(script$l, mergeProps({
text: cell(columnId)

@@ -1138,3 +1126,3 @@ }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])

}, [
createVNode(script$m, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
createVNode(script$l, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
], 2 /* CLASS */))

@@ -1170,3 +1158,3 @@ : (openBlock(), createElementBlock("div", _hoisted_1$3, " "));

createElementVNode("label", null, [
createVNode(script$m, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
createVNode(script$l, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
])

@@ -1194,3 +1182,3 @@ ]));

createElementVNode("summary", null, [
createVNode(script$m, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
createVNode(script$l, mergeProps({ text: unref(title) }, unref(pass)), null, 16 /* FULL_PROPS */, ["text"])
]),

@@ -1240,5 +1228,5 @@ createElementVNode("div", null, [

: (unref(isType)('bookmark'))
? (openBlock(), createBlock(script$l, normalizeProps(mergeProps({ key: 2 }, unref(pass))), null, 16 /* FULL_PROPS */))
? (openBlock(), createBlock(script$k, normalizeProps(mergeProps({ key: 2 }, unref(pass))), null, 16 /* FULL_PROPS */))
: (unref(isType)('callout'))
? (openBlock(), createBlock(script$j, normalizeProps(mergeProps({ key: 3 }, unref(pass))), null, 16 /* FULL_PROPS */))
? (openBlock(), createBlock(script$i, normalizeProps(mergeProps({ key: 3 }, unref(pass))), null, 16 /* FULL_PROPS */))
: (unref(isType)('code'))

@@ -1245,0 +1233,0 @@ ? (openBlock(), createBlock(script$h, normalizeProps(mergeProps({ key: 4 }, unref(pass))), null, 16 /* FULL_PROPS */))

{
"name": "vue3-notion",
"version": "0.0.25",
"version": "0.0.26",
"description": "Vue 3 Unofficial Notion Renderer",

@@ -5,0 +5,0 @@ "repository": "github:zernonia/vue3-notion",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc